Built motion from commit c738b9ac.|2.6.25
authorsupport <support@xcally.com>
Wed, 28 Dec 2022 10:10:40 +0000 (10:10 +0000)
committersupport <support@xcally.com>
Wed, 28 Dec 2022 10:10:40 +0000 (10:10 +0000)
1205 files changed:
apidoc/api_project.js
apidoc/api_project.json
public/index.html
public/scripts/vendor.1fe6f84b.js [moved from public/scripts/vendor.7fe7facb.js with 67% similarity]
server/api/action/action.attributes.js
server/api/action/action.controller.js
server/api/action/action.model.js
server/api/action/action.rpc.js
server/api/action/index.js
server/api/analyticCustomReport/analyticCustomReport.attributes.js
server/api/analyticCustomReport/analyticCustomReport.controller.js
server/api/analyticCustomReport/analyticCustomReport.model.js
server/api/analyticCustomReport/analyticCustomReport.rpc.js
server/api/analyticCustomReport/index.js
server/api/analyticDefaultReport/analyticDefaultReport.attributes.js
server/api/analyticDefaultReport/analyticDefaultReport.controller.js
server/api/analyticDefaultReport/analyticDefaultReport.model.js
server/api/analyticDefaultReport/analyticDefaultReport.rpc.js
server/api/analyticDefaultReport/index.js
server/api/analyticExtractedReport/analyticExtractedReport.attributes.js
server/api/analyticExtractedReport/analyticExtractedReport.controller.js
server/api/analyticExtractedReport/analyticExtractedReport.model.js
server/api/analyticExtractedReport/analyticExtractedReport.rpc.js
server/api/analyticExtractedReport/index.js
server/api/analyticFieldReport/analyticFieldReport.attributes.js
server/api/analyticFieldReport/analyticFieldReport.controller.js
server/api/analyticFieldReport/analyticFieldReport.model.js
server/api/analyticFieldReport/analyticFieldReport.rpc.js
server/api/analyticFieldReport/index.js
server/api/analyticMetric/analyticMetric.attributes.js
server/api/analyticMetric/analyticMetric.controller.js
server/api/analyticMetric/analyticMetric.model.js
server/api/analyticMetric/analyticMetric.rpc.js
server/api/analyticMetric/index.js
server/api/analyticTreeReport/analyticTreeReport.attributes.js
server/api/analyticTreeReport/analyticTreeReport.controller.js
server/api/analyticTreeReport/analyticTreeReport.model.js
server/api/analyticTreeReport/analyticTreeReport.rpc.js
server/api/analyticTreeReport/index.js
server/api/attachment/attachment.attributes.js
server/api/attachment/attachment.controller.js
server/api/attachment/attachment.model.js
server/api/attachment/attachment.rpc.js
server/api/attachment/index.js
server/api/authActiveDirectory/authActiveDirectory.controller.js
server/api/authActiveDirectory/index.js
server/api/authGoogle/authGoogle.controller.js
server/api/authGoogle/index.js
server/api/authLocal/authLocal.controller.js
server/api/authLocal/index.js
server/api/automation/automation.attributes.js
server/api/automation/automation.controller.js
server/api/automation/automation.model.js
server/api/automation/automation.rpc.js
server/api/automation/index.js
server/api/campaign/campaign.attributes.js
server/api/campaign/campaign.controller.js
server/api/campaign/campaign.model.js
server/api/campaign/campaign.rpc.js
server/api/campaign/index.js
server/api/cannedAnswer/cannedAnswer.attributes.js
server/api/cannedAnswer/cannedAnswer.controller.js
server/api/cannedAnswer/cannedAnswer.model.js
server/api/cannedAnswer/cannedAnswer.rpc.js
server/api/cannedAnswer/index.js
server/api/cdr/cdr.attributes.js
server/api/cdr/cdr.controller.js
server/api/cdr/cdr.model.js
server/api/cdr/cdr.rpc.js
server/api/cdr/index.js
server/api/chatApplication/chatApplication.attributes.js
server/api/chatApplication/chatApplication.controller.js
server/api/chatApplication/chatApplication.model.js
server/api/chatApplication/chatApplication.rpc.js
server/api/chatApplication/index.js
server/api/chatGroup/chatGroup.attributes.js
server/api/chatGroup/chatGroup.controller.js
server/api/chatGroup/chatGroup.events.js
server/api/chatGroup/chatGroup.model.js
server/api/chatGroup/chatGroup.rpc.js
server/api/chatGroup/chatGroup.socket.js
server/api/chatGroup/index.js
server/api/chatInteraction/chatInteraction.attributes.js
server/api/chatInteraction/chatInteraction.controller.js
server/api/chatInteraction/chatInteraction.events.js
server/api/chatInteraction/chatInteraction.model.js
server/api/chatInteraction/chatInteraction.rpc.js
server/api/chatInteraction/chatInteraction.socket.js
server/api/chatInteraction/index.js
server/api/chatInternalMessage/chatInternalMessage.attributes.js
server/api/chatInternalMessage/chatInternalMessage.controller.js
server/api/chatInternalMessage/chatInternalMessage.events.js
server/api/chatInternalMessage/chatInternalMessage.model.js
server/api/chatInternalMessage/chatInternalMessage.rpc.js
server/api/chatInternalMessage/chatInternalMessage.socket.js
server/api/chatInternalMessage/index.js
server/api/chatMessage/chatMessage.attributes.js
server/api/chatMessage/chatMessage.controller.js
server/api/chatMessage/chatMessage.events.js
server/api/chatMessage/chatMessage.model.js
server/api/chatMessage/chatMessage.rpc.js
server/api/chatMessage/chatMessage.socket.js
server/api/chatMessage/index.js
server/api/chatOfflineMessage/chatOfflineMessage.attributes.js
server/api/chatOfflineMessage/chatOfflineMessage.controller.js
server/api/chatOfflineMessage/chatOfflineMessage.events.js
server/api/chatOfflineMessage/chatOfflineMessage.model.js
server/api/chatOfflineMessage/chatOfflineMessage.rpc.js
server/api/chatOfflineMessage/index.js
server/api/chatProactiveAction/chatProactiveAction.attributes.js
server/api/chatProactiveAction/chatProactiveAction.controller.js
server/api/chatProactiveAction/chatProactiveAction.model.js
server/api/chatProactiveAction/chatProactiveAction.rpc.js
server/api/chatProactiveAction/index.js
server/api/chatQueue/chatQueue.attributes.js
server/api/chatQueue/chatQueue.controller.js
server/api/chatQueue/chatQueue.events.js
server/api/chatQueue/chatQueue.model.js
server/api/chatQueue/chatQueue.rpc.js
server/api/chatQueue/chatQueue.socket.js
server/api/chatQueue/index.js
server/api/chatQueueReport/chatQueueReport.attributes.js
server/api/chatQueueReport/chatQueueReport.controller.js
server/api/chatQueueReport/chatQueueReport.model.js
server/api/chatQueueReport/chatQueueReport.rpc.js
server/api/chatQueueReport/index.js
server/api/chatTransferReport/chatTransferReport.attributes.js
server/api/chatTransferReport/chatTransferReport.controller.js
server/api/chatTransferReport/chatTransferReport.model.js
server/api/chatTransferReport/chatTransferReport.rpc.js
server/api/chatTransferReport/index.js
server/api/chatWebsite/chatWebsite.attributes.js
server/api/chatWebsite/chatWebsite.controller.js
server/api/chatWebsite/chatWebsite.events.js
server/api/chatWebsite/chatWebsite.model.js
server/api/chatWebsite/chatWebsite.rpc.js
server/api/chatWebsite/chatWebsite.socket.js
server/api/chatWebsite/index.js
server/api/client-side-logs.js
server/api/cloudProvider/cloudProvider.attributes.js
server/api/cloudProvider/cloudProvider.controller.js
server/api/cloudProvider/cloudProvider.model.js
server/api/cloudProvider/cloudProvider.oauth.js
server/api/cloudProvider/cloudProvider.rpc.js
server/api/cloudProvider/index.js
server/api/cmCompany/cmCompany.attributes.js
server/api/cmCompany/cmCompany.controller.js
server/api/cmCompany/cmCompany.model.js
server/api/cmCompany/cmCompany.rpc.js
server/api/cmCompany/index.js
server/api/cmContact/cmContact.attributes.js
server/api/cmContact/cmContact.controller.js
server/api/cmContact/cmContact.events.js
server/api/cmContact/cmContact.model.js
server/api/cmContact/cmContact.rpc.js
server/api/cmContact/cmContact.socket.js
server/api/cmContact/index.js
server/api/cmContactHasItem/cmContactHasItem.attributes.js
server/api/cmContactHasItem/cmContactHasItem.controller.js
server/api/cmContactHasItem/cmContactHasItem.model.js
server/api/cmContactHasItem/cmContactHasItem.rpc.js
server/api/cmContactHasItem/index.js
server/api/cmCustomField/cmCustomField.attributes.js
server/api/cmCustomField/cmCustomField.controller.js
server/api/cmCustomField/cmCustomField.model.js
server/api/cmCustomField/cmCustomField.rpc.js
server/api/cmCustomField/index.js
server/api/cmHopper/cmHopper.attributes.js
server/api/cmHopper/cmHopper.controller.js
server/api/cmHopper/cmHopper.model.js
server/api/cmHopper/cmHopper.rpc.js
server/api/cmHopper/index.js
server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.attributes.js
server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.controller.js
server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.model.js
server/api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.rpc.js
server/api/cmHopperAdditionalPhone/index.js
server/api/cmHopperBlack/cmHopperBlack.attributes.js
server/api/cmHopperBlack/cmHopperBlack.controller.js
server/api/cmHopperBlack/cmHopperBlack.model.js
server/api/cmHopperBlack/cmHopperBlack.rpc.js
server/api/cmHopperBlack/index.js
server/api/cmHopperFinal/cmHopperFinal.attributes.js
server/api/cmHopperFinal/cmHopperFinal.controller.js
server/api/cmHopperFinal/cmHopperFinal.model.js
server/api/cmHopperFinal/cmHopperFinal.rpc.js
server/api/cmHopperFinal/index.js
server/api/cmHopperHistory/cmHopperHistory.attributes.js
server/api/cmHopperHistory/cmHopperHistory.controller.js
server/api/cmHopperHistory/cmHopperHistory.model.js
server/api/cmHopperHistory/cmHopperHistory.rpc.js
server/api/cmHopperHistory/index.js
server/api/cmList/cmList.attributes.js
server/api/cmList/cmList.controller.js
server/api/cmList/cmList.events.js
server/api/cmList/cmList.model.js
server/api/cmList/cmList.rpc.js
server/api/cmList/cmList.socket.js
server/api/cmList/index.js
server/api/condition/condition.attributes.js
server/api/condition/condition.controller.js
server/api/condition/condition.model.js
server/api/condition/condition.rpc.js
server/api/condition/index.js
server/api/contactItemType/contactItemType.attributes.js
server/api/contactItemType/contactItemType.controller.js
server/api/contactItemType/contactItemType.model.js
server/api/contactItemType/contactItemType.rpc.js
server/api/contactItemType/index.js
server/api/dashboard/dashboard.attributes.js
server/api/dashboard/dashboard.controller.js
server/api/dashboard/dashboard.events.js
server/api/dashboard/dashboard.model.js
server/api/dashboard/dashboard.rpc.js
server/api/dashboard/dashboard.socket.js
server/api/dashboard/index.js
server/api/dashboardItem/dashboardItem.attributes.js
server/api/dashboardItem/dashboardItem.controller.js
server/api/dashboardItem/dashboardItem.events.js
server/api/dashboardItem/dashboardItem.model.js
server/api/dashboardItem/dashboardItem.rpc.js
server/api/dashboardItem/dashboardItem.socket.js
server/api/dashboardItem/index.js
server/api/disposition/disposition.attributes.js
server/api/disposition/disposition.controller.js
server/api/disposition/disposition.model.js
server/api/disposition/disposition.rpc.js
server/api/disposition/index.js
server/api/faxAccount/faxAccount.attributes.js
server/api/faxAccount/faxAccount.controller.js
server/api/faxAccount/faxAccount.events.js
server/api/faxAccount/faxAccount.model.js
server/api/faxAccount/faxAccount.rpc.js
server/api/faxAccount/faxAccount.socket.js
server/api/faxAccount/index.js
server/api/faxApplication/faxApplication.attributes.js
server/api/faxApplication/faxApplication.controller.js
server/api/faxApplication/faxApplication.model.js
server/api/faxApplication/faxApplication.rpc.js
server/api/faxApplication/index.js
server/api/faxInteraction/faxInteraction.attributes.js
server/api/faxInteraction/faxInteraction.controller.js
server/api/faxInteraction/faxInteraction.events.js
server/api/faxInteraction/faxInteraction.model.js
server/api/faxInteraction/faxInteraction.rpc.js
server/api/faxInteraction/faxInteraction.socket.js
server/api/faxInteraction/index.js
server/api/faxMessage/faxMessage.attributes.js
server/api/faxMessage/faxMessage.controller.js
server/api/faxMessage/faxMessage.events.js
server/api/faxMessage/faxMessage.model.js
server/api/faxMessage/faxMessage.rpc.js
server/api/faxMessage/faxMessage.socket.js
server/api/faxMessage/index.js
server/api/faxQueue/faxQueue.attributes.js
server/api/faxQueue/faxQueue.controller.js
server/api/faxQueue/faxQueue.events.js
server/api/faxQueue/faxQueue.model.js
server/api/faxQueue/faxQueue.rpc.js
server/api/faxQueue/faxQueue.socket.js
server/api/faxQueue/index.js
server/api/faxQueueReport/faxQueueReport.attributes.js
server/api/faxQueueReport/faxQueueReport.controller.js
server/api/faxQueueReport/faxQueueReport.model.js
server/api/faxQueueReport/faxQueueReport.rpc.js
server/api/faxQueueReport/index.js
server/api/faxTransferReport/faxTransferReport.attributes.js
server/api/faxTransferReport/faxTransferReport.controller.js
server/api/faxTransferReport/faxTransferReport.model.js
server/api/faxTransferReport/faxTransferReport.rpc.js
server/api/faxTransferReport/index.js
server/api/intDeskAccount/index.js
server/api/intDeskAccount/intDeskAccount.attributes.js
server/api/intDeskAccount/intDeskAccount.controller.js
server/api/intDeskAccount/intDeskAccount.model.js
server/api/intDeskAccount/intDeskAccount.rpc.js
server/api/intDeskConfiguration/index.js
server/api/intDeskConfiguration/intDeskConfiguration.attributes.js
server/api/intDeskConfiguration/intDeskConfiguration.controller.js
server/api/intDeskConfiguration/intDeskConfiguration.model.js
server/api/intDeskConfiguration/intDeskConfiguration.rpc.js
server/api/intDeskField/index.js
server/api/intDeskField/intDeskField.attributes.js
server/api/intDeskField/intDeskField.controller.js
server/api/intDeskField/intDeskField.model.js
server/api/intDeskField/intDeskField.rpc.js
server/api/intDynamics365Account/index.js
server/api/intDynamics365Account/intDynamics365Account.attributes.js
server/api/intDynamics365Account/intDynamics365Account.controller.js
server/api/intDynamics365Account/intDynamics365Account.model.js
server/api/intDynamics365Account/intDynamics365Account.rpc.js
server/api/intDynamics365Configuration/index.js
server/api/intDynamics365Configuration/intDynamics365Configuration.attributes.js
server/api/intDynamics365Configuration/intDynamics365Configuration.controller.js
server/api/intDynamics365Configuration/intDynamics365Configuration.model.js
server/api/intDynamics365Configuration/intDynamics365Configuration.rpc.js
server/api/intDynamics365Field/index.js
server/api/intDynamics365Field/intDynamics365Field.attributes.js
server/api/intDynamics365Field/intDynamics365Field.controller.js
server/api/intDynamics365Field/intDynamics365Field.model.js
server/api/intDynamics365Field/intDynamics365Field.rpc.js
server/api/intFreshdeskAccount/index.js
server/api/intFreshdeskAccount/intFreshdeskAccount.attributes.js
server/api/intFreshdeskAccount/intFreshdeskAccount.controller.js
server/api/intFreshdeskAccount/intFreshdeskAccount.model.js
server/api/intFreshdeskAccount/intFreshdeskAccount.rpc.js
server/api/intFreshdeskConfiguration/index.js
server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.attributes.js
server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.controller.js
server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.model.js
server/api/intFreshdeskConfiguration/intFreshdeskConfiguration.rpc.js
server/api/intFreshdeskField/index.js
server/api/intFreshdeskField/intFreshdeskField.attributes.js
server/api/intFreshdeskField/intFreshdeskField.controller.js
server/api/intFreshdeskField/intFreshdeskField.model.js
server/api/intFreshdeskField/intFreshdeskField.rpc.js
server/api/intFreshsalesAccount/index.js
server/api/intFreshsalesAccount/intFreshsalesAccount.attributes.js
server/api/intFreshsalesAccount/intFreshsalesAccount.controller.js
server/api/intFreshsalesAccount/intFreshsalesAccount.model.js
server/api/intFreshsalesAccount/intFreshsalesAccount.rpc.js
server/api/intFreshsalesConfiguration/index.js
server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.attributes.js
server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.controller.js
server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.model.js
server/api/intFreshsalesConfiguration/intFreshsalesConfiguration.rpc.js
server/api/intFreshsalesField/index.js
server/api/intFreshsalesField/intFreshsalesField.attributes.js
server/api/intFreshsalesField/intFreshsalesField.controller.js
server/api/intFreshsalesField/intFreshsalesField.model.js
server/api/intFreshsalesField/intFreshsalesField.rpc.js
server/api/intSalesforceAccount/index.js
server/api/intSalesforceAccount/intSalesforceAccount.attributes.js
server/api/intSalesforceAccount/intSalesforceAccount.controller.js
server/api/intSalesforceAccount/intSalesforceAccount.model.js
server/api/intSalesforceAccount/intSalesforceAccount.rpc.js
server/api/intSalesforceConfiguration/index.js
server/api/intSalesforceConfiguration/intSalesforceConfiguration.attributes.js
server/api/intSalesforceConfiguration/intSalesforceConfiguration.controller.js
server/api/intSalesforceConfiguration/intSalesforceConfiguration.model.js
server/api/intSalesforceConfiguration/intSalesforceConfiguration.rpc.js
server/api/intSalesforceField/index.js
server/api/intSalesforceField/intSalesforceField.attributes.js
server/api/intSalesforceField/intSalesforceField.controller.js
server/api/intSalesforceField/intSalesforceField.model.js
server/api/intSalesforceField/intSalesforceField.rpc.js
server/api/intServicenowAccount/index.js
server/api/intServicenowAccount/intServicenowAccount.attributes.js
server/api/intServicenowAccount/intServicenowAccount.controller.js
server/api/intServicenowAccount/intServicenowAccount.model.js
server/api/intServicenowAccount/intServicenowAccount.rpc.js
server/api/intServicenowConfiguration/index.js
server/api/intServicenowConfiguration/intServicenowConfiguration.attributes.js
server/api/intServicenowConfiguration/intServicenowConfiguration.controller.js
server/api/intServicenowConfiguration/intServicenowConfiguration.model.js
server/api/intServicenowConfiguration/intServicenowConfiguration.rpc.js
server/api/intServicenowField/index.js
server/api/intServicenowField/intServicenowField.attributes.js
server/api/intServicenowField/intServicenowField.controller.js
server/api/intServicenowField/intServicenowField.model.js
server/api/intServicenowField/intServicenowField.rpc.js
server/api/intSugarcrmAccount/index.js
server/api/intSugarcrmAccount/intSugarcrmAccount.attributes.js
server/api/intSugarcrmAccount/intSugarcrmAccount.controller.js
server/api/intSugarcrmAccount/intSugarcrmAccount.model.js
server/api/intSugarcrmAccount/intSugarcrmAccount.rpc.js
server/api/intSugarcrmConfiguration/index.js
server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.attributes.js
server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.controller.js
server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.model.js
server/api/intSugarcrmConfiguration/intSugarcrmConfiguration.rpc.js
server/api/intSugarcrmField/index.js
server/api/intSugarcrmField/intSugarcrmField.attributes.js
server/api/intSugarcrmField/intSugarcrmField.controller.js
server/api/intSugarcrmField/intSugarcrmField.model.js
server/api/intSugarcrmField/intSugarcrmField.rpc.js
server/api/intVtigerAccount/index.js
server/api/intVtigerAccount/intVtigerAccount.attributes.js
server/api/intVtigerAccount/intVtigerAccount.controller.js
server/api/intVtigerAccount/intVtigerAccount.model.js
server/api/intVtigerAccount/intVtigerAccount.rpc.js
server/api/intVtigerConfiguration/index.js
server/api/intVtigerConfiguration/intVtigerConfiguration.attributes.js
server/api/intVtigerConfiguration/intVtigerConfiguration.controller.js
server/api/intVtigerConfiguration/intVtigerConfiguration.model.js
server/api/intVtigerConfiguration/intVtigerConfiguration.rpc.js
server/api/intVtigerField/index.js
server/api/intVtigerField/intVtigerField.attributes.js
server/api/intVtigerField/intVtigerField.controller.js
server/api/intVtigerField/intVtigerField.model.js
server/api/intVtigerField/intVtigerField.rpc.js
server/api/intZendeskAccount/index.js
server/api/intZendeskAccount/intZendeskAccount.attributes.js
server/api/intZendeskAccount/intZendeskAccount.controller.js
server/api/intZendeskAccount/intZendeskAccount.model.js
server/api/intZendeskAccount/intZendeskAccount.rpc.js
server/api/intZendeskConfiguration/index.js
server/api/intZendeskConfiguration/intZendeskConfiguration.attributes.js
server/api/intZendeskConfiguration/intZendeskConfiguration.controller.js
server/api/intZendeskConfiguration/intZendeskConfiguration.model.js
server/api/intZendeskConfiguration/intZendeskConfiguration.rpc.js
server/api/intZendeskField/index.js
server/api/intZendeskField/intZendeskField.attributes.js
server/api/intZendeskField/intZendeskField.controller.js
server/api/intZendeskField/intZendeskField.model.js
server/api/intZendeskField/intZendeskField.rpc.js
server/api/intZohoAccount/index.js
server/api/intZohoAccount/intZohoAccount.attributes.js
server/api/intZohoAccount/intZohoAccount.controller.js
server/api/intZohoAccount/intZohoAccount.model.js
server/api/intZohoAccount/intZohoAccount.rpc.js
server/api/intZohoConfiguration/index.js
server/api/intZohoConfiguration/intZohoConfiguration.attributes.js
server/api/intZohoConfiguration/intZohoConfiguration.controller.js
server/api/intZohoConfiguration/intZohoConfiguration.model.js
server/api/intZohoConfiguration/intZohoConfiguration.rpc.js
server/api/intZohoField/index.js
server/api/intZohoField/intZohoField.attributes.js
server/api/intZohoField/intZohoField.controller.js
server/api/intZohoField/intZohoField.model.js
server/api/intZohoField/intZohoField.rpc.js
server/api/integration/index.js
server/api/integration/integration.attributes.js
server/api/integration/integration.controller.js
server/api/integration/integration.model.js
server/api/integration/integration.rpc.js
server/api/integrationReport/index.js
server/api/integrationReport/integrationReport.attributes.js
server/api/integrationReport/integrationReport.controller.js
server/api/integrationReport/integrationReport.model.js
server/api/integrationReport/integrationReport.rpc.js
server/api/interval/index.js
server/api/interval/interval.attributes.js
server/api/interval/interval.controller.js
server/api/interval/interval.model.js
server/api/interval/interval.rpc.js
server/api/jira/index.js
server/api/jira/jira.controller.js
server/api/jscriptyAnswerReport/index.js
server/api/jscriptyAnswerReport/jscriptyAnswerReport.attributes.js
server/api/jscriptyAnswerReport/jscriptyAnswerReport.controller.js
server/api/jscriptyAnswerReport/jscriptyAnswerReport.model.js
server/api/jscriptyAnswerReport/jscriptyAnswerReport.rpc.js
server/api/jscriptyProject/index.js
server/api/jscriptyProject/jscriptyProject.attributes.js
server/api/jscriptyProject/jscriptyProject.controller.js
server/api/jscriptyProject/jscriptyProject.model.js
server/api/jscriptyProject/jscriptyProject.rpc.js
server/api/jscriptyQuestionReport/index.js
server/api/jscriptyQuestionReport/jscriptyQuestionReport.attributes.js
server/api/jscriptyQuestionReport/jscriptyQuestionReport.controller.js
server/api/jscriptyQuestionReport/jscriptyQuestionReport.model.js
server/api/jscriptyQuestionReport/jscriptyQuestionReport.rpc.js
server/api/jscriptySessionReport/index.js
server/api/jscriptySessionReport/jscriptySessionReport.attributes.js
server/api/jscriptySessionReport/jscriptySessionReport.controller.js
server/api/jscriptySessionReport/jscriptySessionReport.model.js
server/api/jscriptySessionReport/jscriptySessionReport.rpc.js
server/api/license/index.js
server/api/license/license.attributes.js
server/api/license/license.controller.js
server/api/license/license.model.js
server/api/license/license.rpc.js
server/api/mailAccount/index.js
server/api/mailAccount/mailAccount.attributes.js
server/api/mailAccount/mailAccount.controller.js
server/api/mailAccount/mailAccount.events.js
server/api/mailAccount/mailAccount.model.js
server/api/mailAccount/mailAccount.rpc.js
server/api/mailAccount/mailAccount.socket.js
server/api/mailApplication/index.js
server/api/mailApplication/mailApplication.attributes.js
server/api/mailApplication/mailApplication.controller.js
server/api/mailApplication/mailApplication.model.js
server/api/mailApplication/mailApplication.rpc.js
server/api/mailInteraction/index.js
server/api/mailInteraction/mailInteraction.attributes.js
server/api/mailInteraction/mailInteraction.controller.js
server/api/mailInteraction/mailInteraction.events.js
server/api/mailInteraction/mailInteraction.model.js
server/api/mailInteraction/mailInteraction.rpc.js
server/api/mailInteraction/mailInteraction.socket.js
server/api/mailMessage/index.js
server/api/mailMessage/mailMessage.attributes.js
server/api/mailMessage/mailMessage.controller.js
server/api/mailMessage/mailMessage.events.js
server/api/mailMessage/mailMessage.model.js
server/api/mailMessage/mailMessage.rpc.js
server/api/mailMessage/mailMessage.socket.js
server/api/mailQueue/index.js
server/api/mailQueue/mailQueue.attributes.js
server/api/mailQueue/mailQueue.controller.js
server/api/mailQueue/mailQueue.events.js
server/api/mailQueue/mailQueue.model.js
server/api/mailQueue/mailQueue.rpc.js
server/api/mailQueue/mailQueue.socket.js
server/api/mailQueueReport/index.js
server/api/mailQueueReport/mailQueueReport.attributes.js
server/api/mailQueueReport/mailQueueReport.controller.js
server/api/mailQueueReport/mailQueueReport.model.js
server/api/mailQueueReport/mailQueueReport.rpc.js
server/api/mailServerIn/index.js
server/api/mailServerIn/mailServerIn.attributes.js
server/api/mailServerIn/mailServerIn.model.js
server/api/mailServerIn/mailServerIn.rpc.js
server/api/mailServerOut/index.js
server/api/mailServerOut/mailServerOut.attributes.js
server/api/mailServerOut/mailServerOut.controller.js
server/api/mailServerOut/mailServerOut.model.js
server/api/mailServerOut/mailServerOut.rpc.js
server/api/mailSubstatus/index.js
server/api/mailSubstatus/mailSubstatus.attributes.js
server/api/mailSubstatus/mailSubstatus.controller.js
server/api/mailSubstatus/mailSubstatus.events.js
server/api/mailSubstatus/mailSubstatus.model.js
server/api/mailSubstatus/mailSubstatus.rpc.js
server/api/mailTransferReport/index.js
server/api/mailTransferReport/mailTransferReport.attributes.js
server/api/mailTransferReport/mailTransferReport.controller.js
server/api/mailTransferReport/mailTransferReport.model.js
server/api/mailTransferReport/mailTransferReport.rpc.js
server/api/memberReport/index.js
server/api/memberReport/memberReport.attributes.js
server/api/memberReport/memberReport.controller.js
server/api/memberReport/memberReport.model.js
server/api/memberReport/memberReport.rpc.js
server/api/migration/index.js
server/api/migration/migration.attributes.js
server/api/migration/migration.controller.js
server/api/migration/migration.model.js
server/api/migration/migration.rpc.js
server/api/network/index.js
server/api/network/network.attributes.js
server/api/network/network.controller.js
server/api/network/network.model.js
server/api/network/network.rpc.js
server/api/openchannelAccount/index.js
server/api/openchannelAccount/openchannelAccount.attributes.js
server/api/openchannelAccount/openchannelAccount.controller.js
server/api/openchannelAccount/openchannelAccount.events.js
server/api/openchannelAccount/openchannelAccount.model.js
server/api/openchannelAccount/openchannelAccount.rpc.js
server/api/openchannelAccount/openchannelAccount.socket.js
server/api/openchannelApplication/index.js
server/api/openchannelApplication/openchannelApplication.attributes.js
server/api/openchannelApplication/openchannelApplication.controller.js
server/api/openchannelApplication/openchannelApplication.model.js
server/api/openchannelApplication/openchannelApplication.rpc.js
server/api/openchannelInteraction/index.js
server/api/openchannelInteraction/openchannelInteraction.attributes.js
server/api/openchannelInteraction/openchannelInteraction.controller.js
server/api/openchannelInteraction/openchannelInteraction.events.js
server/api/openchannelInteraction/openchannelInteraction.model.js
server/api/openchannelInteraction/openchannelInteraction.rpc.js
server/api/openchannelInteraction/openchannelInteraction.socket.js
server/api/openchannelMessage/index.js
server/api/openchannelMessage/openchannelMessage.attributes.js
server/api/openchannelMessage/openchannelMessage.controller.js
server/api/openchannelMessage/openchannelMessage.events.js
server/api/openchannelMessage/openchannelMessage.model.js
server/api/openchannelMessage/openchannelMessage.rpc.js
server/api/openchannelMessage/openchannelMessage.socket.js
server/api/openchannelQueue/index.js
server/api/openchannelQueue/openchannelQueue.attributes.js
server/api/openchannelQueue/openchannelQueue.controller.js
server/api/openchannelQueue/openchannelQueue.events.js
server/api/openchannelQueue/openchannelQueue.model.js
server/api/openchannelQueue/openchannelQueue.rpc.js
server/api/openchannelQueue/openchannelQueue.socket.js
server/api/openchannelQueueReport/index.js
server/api/openchannelQueueReport/openchannelQueueReport.attributes.js
server/api/openchannelQueueReport/openchannelQueueReport.controller.js
server/api/openchannelQueueReport/openchannelQueueReport.model.js
server/api/openchannelQueueReport/openchannelQueueReport.rpc.js
server/api/openchannelTransferReport/index.js
server/api/openchannelTransferReport/openchannelTransferReport.attributes.js
server/api/openchannelTransferReport/openchannelTransferReport.controller.js
server/api/openchannelTransferReport/openchannelTransferReport.model.js
server/api/openchannelTransferReport/openchannelTransferReport.rpc.js
server/api/pause/index.js
server/api/pause/pause.attributes.js
server/api/pause/pause.controller.js
server/api/pause/pause.model.js
server/api/pause/pause.rpc.js
server/api/plugin/index.js
server/api/plugin/plugin.attributes.js
server/api/plugin/plugin.controller.js
server/api/plugin/plugin.events.js
server/api/plugin/plugin.model.js
server/api/plugin/plugin.rpc.js
server/api/plugin/plugin.socket.js
server/api/pm2/index.js
server/api/pm2/pm2.controller.js
server/api/realtime/index.js
server/api/realtime/realtime.controller.js
server/api/reportAgentPreview/index.js
server/api/reportAgentPreview/reportAgentPreview.attributes.js
server/api/reportAgentPreview/reportAgentPreview.model.js
server/api/reportAgentPreview/reportAgentPreview.rpc.js
server/api/rpc/index.js
server/api/rpc/rpc.controller.js
server/api/schedule/index.js
server/api/schedule/schedule.attributes.js
server/api/schedule/schedule.controller.js
server/api/schedule/schedule.model.js
server/api/schedule/schedule.rpc.js
server/api/screenRecording/index.js
server/api/screenRecording/screenRecording.attributes.js
server/api/screenRecording/screenRecording.controller.js
server/api/screenRecording/screenRecording.model.js
server/api/screenRecording/screenRecording.rpc.js
server/api/setting/index.js
server/api/setting/setting.attributes.js
server/api/setting/setting.controller.js
server/api/setting/setting.model.js
server/api/setting/setting.rpc.js
server/api/smsAccount/index.js
server/api/smsAccount/smsAccount.attributes.js
server/api/smsAccount/smsAccount.controller.js
server/api/smsAccount/smsAccount.events.js
server/api/smsAccount/smsAccount.model.js
server/api/smsAccount/smsAccount.rpc.js
server/api/smsAccount/smsAccount.socket.js
server/api/smsApplication/index.js
server/api/smsApplication/smsApplication.attributes.js
server/api/smsApplication/smsApplication.controller.js
server/api/smsApplication/smsApplication.model.js
server/api/smsApplication/smsApplication.rpc.js
server/api/smsInteraction/index.js
server/api/smsInteraction/smsInteraction.attributes.js
server/api/smsInteraction/smsInteraction.controller.js
server/api/smsInteraction/smsInteraction.events.js
server/api/smsInteraction/smsInteraction.model.js
server/api/smsInteraction/smsInteraction.rpc.js
server/api/smsInteraction/smsInteraction.socket.js
server/api/smsMessage/index.js
server/api/smsMessage/smsMessage.attributes.js
server/api/smsMessage/smsMessage.controller.js
server/api/smsMessage/smsMessage.events.js
server/api/smsMessage/smsMessage.model.js
server/api/smsMessage/smsMessage.rpc.js
server/api/smsMessage/smsMessage.socket.js
server/api/smsQueue/index.js
server/api/smsQueue/smsQueue.attributes.js
server/api/smsQueue/smsQueue.controller.js
server/api/smsQueue/smsQueue.events.js
server/api/smsQueue/smsQueue.model.js
server/api/smsQueue/smsQueue.rpc.js
server/api/smsQueue/smsQueue.socket.js
server/api/smsQueueReport/index.js
server/api/smsQueueReport/smsQueueReport.attributes.js
server/api/smsQueueReport/smsQueueReport.controller.js
server/api/smsQueueReport/smsQueueReport.model.js
server/api/smsQueueReport/smsQueueReport.rpc.js
server/api/smsTransferReport/index.js
server/api/smsTransferReport/smsTransferReport.attributes.js
server/api/smsTransferReport/smsTransferReport.controller.js
server/api/smsTransferReport/smsTransferReport.model.js
server/api/smsTransferReport/smsTransferReport.rpc.js
server/api/sound/index.js
server/api/sound/sound.attributes.js
server/api/sound/sound.controller.js
server/api/sound/sound.model.js
server/api/sound/sound.rpc.js
server/api/squareMessage/index.js
server/api/squareMessage/squareMessage.attributes.js
server/api/squareMessage/squareMessage.controller.js
server/api/squareMessage/squareMessage.model.js
server/api/squareMessage/squareMessage.rpc.js
server/api/squareOdbc/index.js
server/api/squareOdbc/squareOdbc.attributes.js
server/api/squareOdbc/squareOdbc.controller.js
server/api/squareOdbc/squareOdbc.model.js
server/api/squareOdbc/squareOdbc.rpc.js
server/api/squareProject/index.js
server/api/squareProject/squareProject.attributes.js
server/api/squareProject/squareProject.controller.js
server/api/squareProject/squareProject.events.js
server/api/squareProject/squareProject.model.js
server/api/squareProject/squareProject.rpc.js
server/api/squareProject/squareProject.socket.js
server/api/squareRecording/index.js
server/api/squareRecording/squareRecording.attributes.js
server/api/squareRecording/squareRecording.controller.js
server/api/squareRecording/squareRecording.model.js
server/api/squareRecording/squareRecording.rpc.js
server/api/squareReport/index.js
server/api/squareReport/squareReport.attributes.js
server/api/squareReport/squareReport.controller.js
server/api/squareReport/squareReport.model.js
server/api/squareReport/squareReport.rpc.js
server/api/squareReportDetail/index.js
server/api/squareReportDetail/squareReportDetail.attributes.js
server/api/squareReportDetail/squareReportDetail.controller.js
server/api/squareReportDetail/squareReportDetail.model.js
server/api/squareReportDetail/squareReportDetail.rpc.js
server/api/system/index.js
server/api/system/system.controller.js
server/api/tag/index.js
server/api/tag/tag.attributes.js
server/api/tag/tag.controller.js
server/api/tag/tag.model.js
server/api/tag/tag.rpc.js
server/api/team/index.js
server/api/team/team.attributes.js
server/api/team/team.controller.js
server/api/team/team.events.js
server/api/team/team.model.js
server/api/team/team.rpc.js
server/api/team/team.socket.js
server/api/teamVoicePrefix/teamVoicePrefix.attributes.js
server/api/teamVoicePrefix/teamVoicePrefix.model.js
server/api/teamVoiceQueue/index.js
server/api/teamVoiceQueue/teamVoiceQueue.attributes.js
server/api/teamVoiceQueue/teamVoiceQueue.model.js
server/api/teamVoiceQueue/teamVoiceQueue.rpc.js
server/api/template/index.js
server/api/template/template.attributes.js
server/api/template/template.controller.js
server/api/template/template.model.js
server/api/template/template.rpc.js
server/api/trigger/index.js
server/api/trigger/trigger.attributes.js
server/api/trigger/trigger.controller.js
server/api/trigger/trigger.model.js
server/api/trigger/trigger.rpc.js
server/api/trunk/index.js
server/api/trunk/trunk.attributes.js
server/api/trunk/trunk.controller.js
server/api/trunk/trunk.model.js
server/api/trunk/trunk.rpc.js
server/api/user-setting/index.js
server/api/user-setting/user-setting.attributes.js
server/api/user-setting/user-setting.controller.js
server/api/user-setting/user-setting.events.js
server/api/user-setting/user-setting.model.js
server/api/user-setting/user-setting.socket.js
server/api/user/index.js
server/api/user/user.attributes.js
server/api/user/user.controller.js
server/api/user/user.events.js
server/api/user/user.model.js
server/api/user/user.rpc.js
server/api/user/user.socket.js
server/api/userChatQueue/index.js
server/api/userChatQueue/userChatQueue.attributes.js
server/api/userChatQueue/userChatQueue.model.js
server/api/userChatQueue/userChatQueue.rpc.js
server/api/userFaxQueue/index.js
server/api/userFaxQueue/userFaxQueue.attributes.js
server/api/userFaxQueue/userFaxQueue.model.js
server/api/userFaxQueue/userFaxQueue.rpc.js
server/api/userMailQueue/index.js
server/api/userMailQueue/userMailQueue.attributes.js
server/api/userMailQueue/userMailQueue.model.js
server/api/userMailQueue/userMailQueue.rpc.js
server/api/userNotification/index.js
server/api/userNotification/userNotification.attributes.js
server/api/userNotification/userNotification.controller.js
server/api/userNotification/userNotification.events.js
server/api/userNotification/userNotification.model.js
server/api/userNotification/userNotification.rpc.js
server/api/userNotification/userNotification.socket.js
server/api/userOpenchannelQueue/index.js
server/api/userOpenchannelQueue/userOpenchannelQueue.attributes.js
server/api/userOpenchannelQueue/userOpenchannelQueue.model.js
server/api/userOpenchannelQueue/userOpenchannelQueue.rpc.js
server/api/userProfile/index.js
server/api/userProfile/userProfile.attributes.js
server/api/userProfile/userProfile.controller.js
server/api/userProfile/userProfile.events.js
server/api/userProfile/userProfile.model.js
server/api/userProfile/userProfile.rpc.js
server/api/userProfile/userProfile.socket.js
server/api/userProfileResource/index.js
server/api/userProfileResource/userProfileResource.attributes.js
server/api/userProfileResource/userProfileResource.controller.js
server/api/userProfileResource/userProfileResource.model.js
server/api/userProfileResource/userProfileResource.rpc.js
server/api/userProfileSection/index.js
server/api/userProfileSection/userProfileSection.attributes.js
server/api/userProfileSection/userProfileSection.controller.js
server/api/userProfileSection/userProfileSection.model.js
server/api/userProfileSection/userProfileSection.rpc.js
server/api/userSmsQueue/index.js
server/api/userSmsQueue/userSmsQueue.attributes.js
server/api/userSmsQueue/userSmsQueue.model.js
server/api/userSmsQueue/userSmsQueue.rpc.js
server/api/userVoicePrefix/userVoicePrefix.attributes.js
server/api/userVoicePrefix/userVoicePrefix.model.js
server/api/userVoiceQueue/index.js
server/api/userVoiceQueue/userVoiceQueue.attributes.js
server/api/userVoiceQueue/userVoiceQueue.model.js
server/api/userVoiceQueue/userVoiceQueue.rpc.js
server/api/userVoiceQueueRt/index.js
server/api/userVoiceQueueRt/userVoiceQueueRt.attributes.js
server/api/userVoiceQueueRt/userVoiceQueueRt.events.js
server/api/userVoiceQueueRt/userVoiceQueueRt.model.js
server/api/userVoiceQueueRt/userVoiceQueueRt.rpc.js
server/api/userVoiceQueueRt/userVoiceQueueRt.socket.js
server/api/userWhatsappQueue/index.js
server/api/userWhatsappQueue/userWhatsappQueue.attributes.js
server/api/userWhatsappQueue/userWhatsappQueue.model.js
server/api/userWhatsappQueue/userWhatsappQueue.rpc.js
server/api/variable/index.js
server/api/variable/variable.attributes.js
server/api/variable/variable.controller.js
server/api/variable/variable.model.js
server/api/variable/variable.rpc.js
server/api/version/index.js
server/api/version/version.controller.js
server/api/voiceAgentReport/index.js
server/api/voiceAgentReport/voiceAgentReport.attributes.js
server/api/voiceAgentReport/voiceAgentReport.controller.js
server/api/voiceAgentReport/voiceAgentReport.model.js
server/api/voiceAgentReport/voiceAgentReport.rpc.js
server/api/voiceCallReport/index.js
server/api/voiceCallReport/voiceCallReport.attributes.js
server/api/voiceCallReport/voiceCallReport.controller.js
server/api/voiceCallReport/voiceCallReport.model.js
server/api/voiceCallReport/voiceCallReport.rpc.js
server/api/voiceChanSpy/index.js
server/api/voiceChanSpy/voiceChanSpy.attributes.js
server/api/voiceChanSpy/voiceChanSpy.controller.js
server/api/voiceChanSpy/voiceChanSpy.model.js
server/api/voiceChanSpy/voiceChanSpy.rpc.js
server/api/voiceContext/index.js
server/api/voiceContext/voiceContext.attributes.js
server/api/voiceContext/voiceContext.controller.js
server/api/voiceContext/voiceContext.model.js
server/api/voiceContext/voiceContext.rpc.js
server/api/voiceDialReport/index.js
server/api/voiceDialReport/voiceDialReport.attributes.js
server/api/voiceDialReport/voiceDialReport.controller.js
server/api/voiceDialReport/voiceDialReport.model.js
server/api/voiceDialReport/voiceDialReport.rpc.js
server/api/voiceExtension/index.js
server/api/voiceExtension/voiceExtension.attributes.js
server/api/voiceExtension/voiceExtension.controller.js
server/api/voiceExtension/voiceExtension.events.js
server/api/voiceExtension/voiceExtension.model.js
server/api/voiceExtension/voiceExtension.rpc.js
server/api/voiceExtension/voiceExtension.socket.js
server/api/voiceMail/index.js
server/api/voiceMail/voiceMail.attributes.js
server/api/voiceMail/voiceMail.controller.js
server/api/voiceMail/voiceMail.model.js
server/api/voiceMail/voiceMail.rpc.js
server/api/voiceMailMessage/index.js
server/api/voiceMailMessage/voiceMailMessage.attributes.js
server/api/voiceMailMessage/voiceMailMessage.controller.js
server/api/voiceMailMessage/voiceMailMessage.model.js
server/api/voiceMailMessage/voiceMailMessage.rpc.js
server/api/voiceMusicOnHold/index.js
server/api/voiceMusicOnHold/voiceMusicOnHold.attributes.js
server/api/voiceMusicOnHold/voiceMusicOnHold.controller.js
server/api/voiceMusicOnHold/voiceMusicOnHold.model.js
server/api/voiceMusicOnHold/voiceMusicOnHold.rpc.js
server/api/voicePrefix/index.js
server/api/voicePrefix/voicePrefix.attributes.js
server/api/voicePrefix/voicePrefix.controller.js
server/api/voicePrefix/voicePrefix.events.js
server/api/voicePrefix/voicePrefix.model.js
server/api/voicePrefix/voicePrefix.rpc.js
server/api/voicePrefix/voicePrefix.socket.js
server/api/voiceQueue/index.js
server/api/voiceQueue/voiceQueue.attributes.js
server/api/voiceQueue/voiceQueue.controller.js
server/api/voiceQueue/voiceQueue.events.js
server/api/voiceQueue/voiceQueue.model.js
server/api/voiceQueue/voiceQueue.rpc.js
server/api/voiceQueue/voiceQueue.socket.js
server/api/voiceQueueReport/index.js
server/api/voiceQueueReport/voiceQueueReport.attributes.js
server/api/voiceQueueReport/voiceQueueReport.controller.js
server/api/voiceQueueReport/voiceQueueReport.events.js
server/api/voiceQueueReport/voiceQueueReport.model.js
server/api/voiceQueueReport/voiceQueueReport.rpc.js
server/api/voiceQueueReport/voiceQueueReport.socket.js
server/api/voiceQueuesLog/index.js
server/api/voiceQueuesLog/voiceQueuesLog.attributes.js
server/api/voiceQueuesLog/voiceQueuesLog.controller.js
server/api/voiceQueuesLog/voiceQueuesLog.model.js
server/api/voiceQueuesLog/voiceQueuesLog.rpc.js
server/api/voiceRecording/index.js
server/api/voiceRecording/voiceRecording.attributes.js
server/api/voiceRecording/voiceRecording.controller.js
server/api/voiceRecording/voiceRecording.model.js
server/api/voiceRecording/voiceRecording.rpc.js
server/api/voiceTransferReport/index.js
server/api/voiceTransferReport/voiceTransferReport.attributes.js
server/api/voiceTransferReport/voiceTransferReport.controller.js
server/api/voiceTransferReport/voiceTransferReport.model.js
server/api/voiceTransferReport/voiceTransferReport.rpc.js
server/api/webbar/index.js
server/api/webbar/webbar.controller.js
server/api/whatsappAccount/index.js
server/api/whatsappAccount/whatsappAccount.attributes.js
server/api/whatsappAccount/whatsappAccount.controller.js
server/api/whatsappAccount/whatsappAccount.events.js
server/api/whatsappAccount/whatsappAccount.model.js
server/api/whatsappAccount/whatsappAccount.rpc.js
server/api/whatsappAccount/whatsappAccount.socket.js
server/api/whatsappApplication/index.js
server/api/whatsappApplication/whatsappApplication.attributes.js
server/api/whatsappApplication/whatsappApplication.controller.js
server/api/whatsappApplication/whatsappApplication.model.js
server/api/whatsappApplication/whatsappApplication.rpc.js
server/api/whatsappInteraction/index.js
server/api/whatsappInteraction/whatsappInteraction.attributes.js
server/api/whatsappInteraction/whatsappInteraction.controller.js
server/api/whatsappInteraction/whatsappInteraction.events.js
server/api/whatsappInteraction/whatsappInteraction.model.js
server/api/whatsappInteraction/whatsappInteraction.rpc.js
server/api/whatsappInteraction/whatsappInteraction.socket.js
server/api/whatsappMessage/index.js
server/api/whatsappMessage/whatsappMessage.attributes.js
server/api/whatsappMessage/whatsappMessage.controller.js
server/api/whatsappMessage/whatsappMessage.events.js
server/api/whatsappMessage/whatsappMessage.model.js
server/api/whatsappMessage/whatsappMessage.rpc.js
server/api/whatsappMessage/whatsappMessage.socket.js
server/api/whatsappQueue/index.js
server/api/whatsappQueue/whatsappQueue.attributes.js
server/api/whatsappQueue/whatsappQueue.controller.js
server/api/whatsappQueue/whatsappQueue.events.js
server/api/whatsappQueue/whatsappQueue.model.js
server/api/whatsappQueue/whatsappQueue.rpc.js
server/api/whatsappQueue/whatsappQueue.socket.js
server/api/whatsappQueueReport/index.js
server/api/whatsappQueueReport/whatsappQueueReport.attributes.js
server/api/whatsappQueueReport/whatsappQueueReport.controller.js
server/api/whatsappQueueReport/whatsappQueueReport.model.js
server/api/whatsappQueueReport/whatsappQueueReport.rpc.js
server/api/whatsappTransferReport/index.js
server/api/whatsappTransferReport/whatsappTransferReport.attributes.js
server/api/whatsappTransferReport/whatsappTransferReport.controller.js
server/api/whatsappTransferReport/whatsappTransferReport.model.js
server/api/whatsappTransferReport/whatsappTransferReport.rpc.js
server/app.js
server/components/auth/service.js
server/components/contacts/index.js
server/components/contacts/sql-utils.js
server/components/encryptor/index.js
server/components/export/csv.js
server/components/export/pdf.js
server/components/export/xlsx.js
server/components/extensions/rewrite.js
server/components/import/cm/csv.js
server/components/import/cm/csv2.js
server/components/import/cm/csvUpdates.js
server/components/integrations/configuration.js
server/components/interaction/service.js
server/components/interaction/sql-utils.js
server/components/interaction/update-interaction.js
server/components/interaction/utils.js
server/components/license/service.js
server/components/parsers/advancedSearch.js
server/components/parsers/qs.js
server/components/realtime/agents.js
server/components/realtime/queues.js
server/config/express.js
server/config/license/hardware.js
server/config/license/index.js
server/config/license/util.js
server/config/local.env.js
server/config/logger.js
server/config/pm2/config.js
server/config/pm2/index.js
server/config/schedule/chat.js
server/config/schedule/cloud-provider.js
server/config/schedule/index.js
server/config/schedule/transcribe.js
server/config/schedule/whatsapp.js
server/config/seedContact.js
server/config/seedUsers.js
server/config/socketio.js
server/config/triggers/index.js
server/config/utils.js
server/errors/api.js
server/errors/index.js
server/mysqldb/index.js
server/routes.js
server/rpc/index.js
server/services/agi/channel.js
server/services/agi/error.js
server/services/agi/events.js
server/services/agi/graph/index.js
server/services/agi/index.js
server/services/agi/mailRpc/index.js
server/services/agi/project.js
server/services/agi/reply.js
server/services/agi/rpc/index.js
server/services/agi/scripts/aws/index.js
server/services/agi/scripts/aws/lex/index.js
server/services/agi/scripts/aws/lex/lib/api.js
server/services/agi/scripts/aws/polly/index.js
server/services/agi/scripts/aws/polly/lib/api.js
server/services/agi/scripts/google/asr/index.js
server/services/agi/scripts/google/asr/lib/api.js
server/services/agi/scripts/google/index.js
server/services/agi/scripts/index.js
server/services/agi/scripts/sestek/index.js
server/services/agi/scripts/sestek/nda/index.js
server/services/agi/scripts/tilde/asr/index.js
server/services/agi/scripts/tilde/asr/lib/api.js
server/services/agi/scripts/tilde/index.js
server/services/agi/server.js
server/services/agi/vertices.js
server/services/ami/acw/index.js
server/services/ami/ami.js
server/services/ami/client.js
server/services/ami/dialer/index.js
server/services/ami/dialer/models/action.js
server/services/ami/dialer/models/agentComplete.js
server/services/ami/dialer/models/final.js
server/services/ami/dialer/models/hangup.js
server/services/ami/dialer/models/history.js
server/services/ami/dialer/models/queueCallerAbandon.js
server/services/ami/dialer/utils/hopper.js
server/services/ami/dialer/utils/index.js
server/services/ami/fax/action.js
server/services/ami/fax/index.js
server/services/ami/fax/rpcDb.js
server/services/ami/fax/util/gs.js
server/services/ami/fax/util/util.js
server/services/ami/index.js
server/services/ami/model/agent.js
server/services/ami/model/campaign.js
server/services/ami/model/channel.js
server/services/ami/model/deskAccount.js
server/services/ami/model/dynamics365Account.js
server/services/ami/model/faxAccount.js
server/services/ami/model/freshdeskAccount.js
server/services/ami/model/freshsalesAccount.js
server/services/ami/model/queueReport.js
server/services/ami/model/salesforceAccount.js
server/services/ami/model/servicenowAccount.js
server/services/ami/model/sugarcrmAccount.js
server/services/ami/model/telephone.js
server/services/ami/model/template.js
server/services/ami/model/trigger.js
server/services/ami/model/trunk.js
server/services/ami/model/voiceExtension.js
server/services/ami/model/voiceQueue.js
server/services/ami/model/voiceQueueSummary.js
server/services/ami/model/vtigerAccount.js
server/services/ami/model/zendeskAccount.js
server/services/ami/model/zohoAccount.js
server/services/ami/preview/action.js
server/services/ami/preview/index.js
server/services/ami/preview/rpcDb.js
server/services/ami/preview/util/util.js
server/services/ami/properties.js
server/services/ami/realtime/index.js
server/services/ami/realtime/utils.js
server/services/ami/report/index.js
server/services/ami/report/userReport.js
server/services/ami/report/voiceAgentReport.js
server/services/ami/report/voiceCallReport.js
server/services/ami/report/voiceDialReport.js
server/services/ami/report/voiceQueueReport.js
server/services/ami/rpc/agentReportPreview.js
server/services/ami/rpc/attachment.js
server/services/ami/rpc/campaign.js
server/services/ami/rpc/cmContact.js
server/services/ami/rpc/cmHopper.js
server/services/ami/rpc/cmHopperAdditionalPhone.js
server/services/ami/rpc/cmHopperBlack.js
server/services/ami/rpc/cmHopperFinal.js
server/services/ami/rpc/cmHopperHistory.js
server/services/ami/rpc/faxAccount.js
server/services/ami/rpc/faxMessage.js
server/services/ami/rpc/integrations/desk.js
server/services/ami/rpc/integrations/dynamics365.js
server/services/ami/rpc/integrations/freshdesk.js
server/services/ami/rpc/integrations/freshsales.js
server/services/ami/rpc/integrations/salesforce.js
server/services/ami/rpc/integrations/servicenow.js
server/services/ami/rpc/integrations/sugarcrm.js
server/services/ami/rpc/integrations/vtiger.js
server/services/ami/rpc/integrations/zendesk.js
server/services/ami/rpc/integrations/zoho.js
server/services/ami/rpc/interval.js
server/services/ami/rpc/memberReport.js
server/services/ami/rpc/setting.js
server/services/ami/rpc/template.js
server/services/ami/rpc/trigger.js
server/services/ami/rpc/trunk.js
server/services/ami/rpc/user.js
server/services/ami/rpc/voiceAgentReport.js
server/services/ami/rpc/voiceCallReport.js
server/services/ami/rpc/voiceDialReport.js
server/services/ami/rpc/voiceExtension.js
server/services/ami/rpc/voiceQueue.js
server/services/ami/rpc/voiceQueueReport.js
server/services/ami/rpc/voiceQueueRt.js
server/services/ami/rpc/voiceRecording.js
server/services/ami/rpc/voiceTransferReport.js
server/services/ami/server/index.js
server/services/ami/trigger/cmContact/index.js
server/services/ami/trigger/index.js
server/services/ami/trigger/integration/desk.js
server/services/ami/trigger/integration/dynamics365.js
server/services/ami/trigger/integration/freshdesk.js
server/services/ami/trigger/integration/freshsales.js
server/services/ami/trigger/integration/index.js
server/services/ami/trigger/integration/salesforce.js
server/services/ami/trigger/integration/servicenow.js
server/services/ami/trigger/integration/sugarcrm.js
server/services/ami/trigger/integration/util.js
server/services/ami/trigger/integration/vtiger.js
server/services/ami/trigger/integration/zendesk.js
server/services/ami/trigger/integration/zoho.js
server/services/ami/trigger/script/index.js
server/services/ami/trigger/urlforward/index.js
server/services/email/client.js
server/services/email/index.js
server/services/email/lib/email.js
server/services/email/lib/imap.js
server/services/email/lib/smtp.js
server/services/email/lib/utils.js
server/services/email/model/mailAccount.js
server/services/email/realtime/index.js
server/services/email/rpc/mailAccount.js
server/services/email/rpc/setting.js
server/services/email/server/index.js
server/services/express/index.js
server/services/routing/client.js
server/services/routing/index.js
server/services/routing/lib/rule-engine.js
server/services/routing/mailRpc/index.js
server/services/routing/model/agent.js
server/services/routing/model/chatQueue.js
server/services/routing/model/faxQueue.js
server/services/routing/model/interval.js
server/services/routing/model/mailQueue.js
server/services/routing/model/openchannelQueue.js
server/services/routing/model/smsQueue.js
server/services/routing/model/whatsappQueue.js
server/services/routing/realtime/index.js
server/services/routing/rpc/chatInteraction.js
server/services/routing/rpc/chatMessage.js
server/services/routing/rpc/chatQueue.js
server/services/routing/rpc/chatQueueReport.js
server/services/routing/rpc/faxInteraction.js
server/services/routing/rpc/faxMessage.js
server/services/routing/rpc/faxQueue.js
server/services/routing/rpc/faxQueueReport.js
server/services/routing/rpc/interval.js
server/services/routing/rpc/mailInteraction.js
server/services/routing/rpc/mailMessage.js
server/services/routing/rpc/mailQueue.js
server/services/routing/rpc/mailQueueReport.js
server/services/routing/rpc/openchannelInteraction.js
server/services/routing/rpc/openchannelMessage.js
server/services/routing/rpc/openchannelQueue.js
server/services/routing/rpc/openchannelQueueReport.js
server/services/routing/rpc/smsInteraction.js
server/services/routing/rpc/smsMessage.js
server/services/routing/rpc/smsQueue.js
server/services/routing/rpc/smsQueueReport.js
server/services/routing/rpc/user.js
server/services/routing/rpc/whatsappInteraction.js
server/services/routing/rpc/whatsappMessage.js
server/services/routing/rpc/whatsappQueue.js
server/services/routing/rpc/whatsappQueueReport.js
server/services/routing/server/applications/agent.js
server/services/routing/server/applications/amazonlex.js
server/services/routing/server/applications/autoreply.js
server/services/routing/server/applications/close.js
server/services/routing/server/applications/dialogflow.js
server/services/routing/server/applications/dialogflowV2.js
server/services/routing/server/applications/gotoif.js
server/services/routing/server/applications/gotop.js
server/services/routing/server/applications/message.js
server/services/routing/server/applications/noop.js
server/services/routing/server/applications/queue.js
server/services/routing/server/applications/strategy/agent.js
server/services/routing/server/applications/strategy/beepall.js
server/services/routing/server/applications/strategy/index.js
server/services/routing/server/applications/strategy/rrmemory.js
server/services/routing/server/applications/strategy/util.js
server/services/routing/server/applications/system.js
server/services/routing/server/applications/tag.js
server/services/routing/server/applications/tvox.js
server/services/routing/server/applications/utils.js
server/services/routing/server/index.js
server/services/routing/server/interval.js
server/services/xdr/agents.controller.js
server/services/xdr/calls.controller.js
server/services/xdr/core.controller.js
server/services/xdr/dials.controller.js
server/services/xdr/index.js
server/services/xdr/members.controller.js
server/services/xdr/queues.controller.js
server/services/xdr/recordings.controller.js
server/services/xdr/transfers.controller.js
server/services/xdr/utils.js
server/utils/client-side-logger.js
server/utils/iftime.js
server/utils/loggers.js
server/utils/mask-sensitive-data.js
server/utils/safe-template.js
server/utils/update-app-config.js

index a007b24..3e69736 100644 (file)
@@ -17,7 +17,7 @@ define({
   "apidoc": "0.3.0",
   "generator": {
     "name": "apidoc",
-    "time": "2022-12-15T16:25:26.484Z",
+    "time": "2022-12-28T10:02:54.754Z",
     "url": "http://apidocjs.com",
     "version": "0.24.0"
   }
index 86b7021..9b21adc 100644 (file)
@@ -17,7 +17,7 @@
   "apidoc": "0.3.0",
   "generator": {
     "name": "apidoc",
-    "time": "2022-12-15T16:25:26.484Z",
+    "time": "2022-12-28T10:02:54.754Z",
     "url": "http://apidocjs.com",
     "version": "0.24.0"
   }
index 31b7420..beaaa51 100644 (file)
@@ -60,7 +60,7 @@
 
   <toasty></toasty>
 
-  <script src="scripts/vendor.7fe7facb.js"></script>
+  <script src="scripts/vendor.1fe6f84b.js"></script>
 
   <!-- ANGULAR-MATERIAL-FORM-BUILDER -->
   <script src="assets/plugins/angular-material-form-builder/dist/angular-material-form-builder.min.js"></script>
similarity index 67%
rename from public/scripts/vendor.7fe7facb.js
rename to public/scripts/vendor.1fe6f84b.js
index 6d42535..4aebdbb 100644 (file)
@@ -1 +1 @@
-if(function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(A,e){var t=[],S=A.document,u=t.slice,m=t.concat,s=t.push,i=t.indexOf,n={},r=n.toString,p=n.hasOwnProperty,g={},a="2.2.4",T=function(e,t){return new T.fn.init(e,t)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,c=/^-ms-/,l=/-([\da-z])/gi,f=function(e,t){return t.toUpperCase()};function d(e){var t=!!e&&"length"in e&&e.length,n=T.type(e);return"function"!==n&&!T.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}T.fn=T.prototype={jquery:a,constructor:T,selector:"",length:0,toArray:function(){return u.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:u.call(this)},pushStack:function(e){var t=T.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return T.each(this,e)},map:function(n){return this.pushStack(T.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:t.sort,splice:t.splice},T.extend=T.fn.extend=function(){var e,t,n,r,i,a,o=arguments[0]||{},s=1,c=arguments.length,l=!1;for("boolean"==typeof o&&(l=o,o=arguments[s]||{},s++),"object"==typeof o||T.isFunction(o)||(o={}),s===c&&(o=this,s--);s<c;s++)if(null!=(e=arguments[s]))for(t in e)n=o[t],o!==(r=e[t])&&(l&&r&&(T.isPlainObject(r)||(i=T.isArray(r)))?(a=i?(i=!1,n&&T.isArray(n)?n:[]):n&&T.isPlainObject(n)?n:{},o[t]=T.extend(l,a,r)):void 0!==r&&(o[t]=r));return o},T.extend({expando:"jQuery"+(a+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===T.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=e&&e.toString();return!T.isArray(e)&&0<=t-parseFloat(t)+1},isPlainObject:function(e){var t;if("object"!==T.type(e)||e.nodeType||T.isWindow(e))return!1;if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||p.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[r.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;(e=T.trim(e))&&(1===e.indexOf("use strict")?((t=S.createElement("script")).text=e,S.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(c,"ms-").replace(l,f)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(d(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(o,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?T.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,a=e.length,o=!n;i<a;i++)!t(e[i],i)!==o&&r.push(e[i]);return r},map:function(e,t,n){var r,i,a=0,o=[];if(d(e))for(r=e.length;a<r;a++)null!=(i=t(e[a],a,n))&&o.push(i);else for(a in e)null!=(i=t(e[a],a,n))&&o.push(i);return m.apply([],o)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),T.isFunction(e))return r=u.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(u.call(arguments)))}).guid=e.guid=e.guid||T.guid++,i},now:Date.now,support:g}),"function"==typeof Symbol&&(T.fn[Symbol.iterator]=t[Symbol.iterator]),T.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var h=function(n){var e,p,y,a,i,m,f,g,w,c,l,C,A,o,S,_,s,u,b,T="sizzle"+1*new Date,v=n.document,x=0,r=0,d=ie(),h=ie(),k=ie(),E=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],I=t.pop,P=t.push,M=t.push,$=t.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",N="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",F="\\["+N+"*("+L+")(?:"+N+"*([*^$|!~]?=)"+N+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+N+"*\\]",G=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+F+")*)|.*)\\)|)",j=new RegExp(N+"+","g"),B=new RegExp("^"+N+"+|((?:^|[^\\\\])(?:\\\\.)*)"+N+"+$","g"),U=new RegExp("^"+N+"*,"+N+"*"),H=new RegExp("^"+N+"*([>+~]|"+N+")"+N+"*"),W=new RegExp("="+N+"*([^\\]'\"]*?)"+N+"*\\]","g"),q=new RegExp(G),z=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+G),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+N+"*(even|odd|(([+-]|)(\\d*)n|)"+N+"*(?:([+-]|)"+N+"*(\\d+)|))"+N+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+N+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+N+"*((?:-\\d)?\\d*)"+N+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/[+~]/,J=/'|\\/g,ee=new RegExp("\\\\([\\da-f]{1,6}"+N+"?|("+N+")|.)","ig"),te=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},ne=function(){C()};try{M.apply(t=$.call(v.childNodes),v.childNodes),t[v.childNodes.length].nodeType}catch(e){M={apply:t.length?function(e,t){P.apply(e,$.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function re(e,t,n,r){var i,a,o,s,c,l,u,f,d=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:v)!==A&&C(t),t=t||A,S)){if(11!==h&&(l=X.exec(e)))if(i=l[1]){if(9===h){if(!(o=t.getElementById(i)))return n;if(o.id===i)return n.push(o),n}else if(d&&(o=d.getElementById(i))&&b(t,o)&&o.id===i)return n.push(o),n}else{if(l[2])return M.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&p.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(i)),n}if(p.qsa&&!k[e+" "]&&(!_||!_.test(e))){if(1!==h)d=t,f=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(J,"\\$&"):t.setAttribute("id",s=T),a=(u=m(e)).length,c=z.test(s)?"#"+s:"[id='"+s+"']";a--;)u[a]=c+" "+pe(u[a]);f=u.join(","),d=Z.test(e)&&de(t.parentNode)||t}if(f)try{return M.apply(n,d.querySelectorAll(f)),n}catch(e){}finally{s===T&&t.removeAttribute("id")}}}return g(e.replace(B,"$1"),t,n,r)}function ie(){var r=[];return function e(t,n){return r.push(t+" ")>y.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function ae(e){return e[T]=!0,e}function oe(e){var t=A.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function se(e,t){for(var n=e.split("|"),r=n.length;r--;)y.attrHandle[n[r]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function le(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ue(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function fe(o){return ae(function(a){return a=+a,ae(function(e,t){for(var n,r=o([],e.length,a),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function de(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in p=re.support={},i=re.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},C=re.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:v;return r!==A&&9===r.nodeType&&r.documentElement&&(o=(A=r).documentElement,S=!i(A),(n=A.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ne,!1):n.attachEvent&&n.attachEvent("onunload",ne)),p.attributes=oe(function(e){return e.className="i",!e.getAttribute("className")}),p.getElementsByTagName=oe(function(e){return e.appendChild(A.createComment("")),!e.getElementsByTagName("*").length}),p.getElementsByClassName=Q.test(A.getElementsByClassName),p.getById=oe(function(e){return o.appendChild(e).id=T,!A.getElementsByName||!A.getElementsByName(T).length}),p.getById?(y.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n=t.getElementById(e);return n?[n]:[]}},y.filter.ID=function(e){var t=e.replace(ee,te);return function(e){return e.getAttribute("id")===t}}):(delete y.find.ID,y.filter.ID=function(e){var n=e.replace(ee,te);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}}),y.find.TAG=p.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):p.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,a=t.getElementsByTagName(e);if("*"!==e)return a;for(;n=a[i++];)1===n.nodeType&&r.push(n);return r},y.find.CLASS=p.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&S)return t.getElementsByClassName(e)},s=[],_=[],(p.qsa=Q.test(A.querySelectorAll))&&(oe(function(e){o.appendChild(e).innerHTML="<a id='"+T+"'></a><select id='"+T+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&_.push("[*^$]="+N+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||_.push("\\["+N+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+T+"-]").length||_.push("~="),e.querySelectorAll(":checked").length||_.push(":checked"),e.querySelectorAll("a#"+T+"+*").length||_.push(".#.+[+~]")}),oe(function(e){var t=A.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&_.push("name"+N+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||_.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),_.push(",.*:")})),(p.matchesSelector=Q.test(u=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&oe(function(e){p.disconnectedMatch=u.call(e,"div"),u.call(e,"[s!='']:x"),s.push("!=",G)}),_=_.length&&new RegExp(_.join("|")),s=s.length&&new RegExp(s.join("|")),t=Q.test(o.compareDocumentPosition),b=t||Q.test(o.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},E=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!p.sortDetached&&t.compareDocumentPosition(e)===n?e===A||e.ownerDocument===v&&b(v,e)?-1:t===A||t.ownerDocument===v&&b(v,t)?1:c?O(c,e)-O(c,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,a=t.parentNode,o=[e],s=[t];if(!i||!a)return e===A?-1:t===A?1:i?-1:a?1:c?O(c,e)-O(c,t):0;if(i===a)return ce(e,t);for(n=e;n=n.parentNode;)o.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;o[r]===s[r];)r++;return r?ce(o[r],s[r]):o[r]===v?-1:s[r]===v?1:0}),A},re.matches=function(e,t){return re(e,null,null,t)},re.matchesSelector=function(e,t){if((e.ownerDocument||e)!==A&&C(e),t=t.replace(W,"='$1']"),p.matchesSelector&&S&&!k[t+" "]&&(!s||!s.test(t))&&(!_||!_.test(t)))try{var n=u.call(e,t);if(n||p.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0<re(t,A,null,[e]).length},re.contains=function(e,t){return(e.ownerDocument||e)!==A&&C(e),b(e,t)},re.attr=function(e,t){(e.ownerDocument||e)!==A&&C(e);var n=y.attrHandle[t.toLowerCase()],r=n&&D.call(y.attrHandle,t.toLowerCase())?n(e,t,!S):void 0;return void 0!==r?r:p.attributes||!S?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},re.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},re.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!p.detectDuplicates,c=!p.sortStable&&e.slice(0),e.sort(E),l){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return c=null,e},a=re.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=a(t);return n},(y=re.selectors={cacheLength:50,createPseudo:ae,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ee,te),e[3]=(e[3]||e[4]||e[5]||"").replace(ee,te),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||re.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&re.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&q.test(n)&&(t=m(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ee,te).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=d[e+" "];return t||(t=new RegExp("(^|"+N+")"+e+"("+N+"|$)"))&&d(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=re.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(j," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(p,e,t,m,g){var _="nth"!==p.slice(0,3),b="last"!==p.slice(-4),v="of-type"===e;return 1===m&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,i,a,o,s,c,l=_!==b?"nextSibling":"previousSibling",u=e.parentNode,f=v&&e.nodeName.toLowerCase(),d=!n&&!v,h=!1;if(u){if(_){for(;l;){for(o=e;o=o[l];)if(v?o.nodeName.toLowerCase()===f:1===o.nodeType)return!1;c=l="only"===p&&!c&&"nextSibling"}return!0}if(c=[b?u.firstChild:u.lastChild],b&&d){for(h=(s=(r=(i=(a=(o=u)[T]||(o[T]={}))[o.uniqueID]||(a[o.uniqueID]={}))[p]||[])[0]===x&&r[1])&&r[2],o=s&&u.childNodes[s];o=++s&&o&&o[l]||(h=s=0)||c.pop();)if(1===o.nodeType&&++h&&o===e){i[p]=[x,s,h];break}}else if(d&&(h=s=(r=(i=(a=(o=e)[T]||(o[T]={}))[o.uniqueID]||(a[o.uniqueID]={}))[p]||[])[0]===x&&r[1]),!1===h)for(;(o=++s&&o&&o[l]||(h=s=0)||c.pop())&&((v?o.nodeName.toLowerCase()!==f:1!==o.nodeType)||!++h||(d&&((i=(a=o[T]||(o[T]={}))[o.uniqueID]||(a[o.uniqueID]={}))[p]=[x,h]),o!==e)););return(h-=g)===m||h%m==0&&0<=h/m}}},PSEUDO:function(e,a){var t,o=y.pseudos[e]||y.setFilters[e.toLowerCase()]||re.error("unsupported pseudo: "+e);return o[T]?o(a):1<o.length?(t=[e,e,"",a],y.setFilters.hasOwnProperty(e.toLowerCase())?ae(function(e,t){for(var n,r=o(e,a),i=r.length;i--;)e[n=O(e,r[i])]=!(t[n]=r[i])}):function(e){return o(e,0,t)}):o}},pseudos:{not:ae(function(e){var r=[],i=[],s=f(e.replace(B,"$1"));return s[T]?ae(function(e,t,n,r){for(var i,a=s(e,null,r,[]),o=e.length;o--;)(i=a[o])&&(e[o]=!(t[o]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:ae(function(t){return function(e){return 0<re(t,e).length}}),contains:ae(function(t){return t=t.replace(ee,te),function(e){return-1<(e.textContent||e.innerText||a(e)).indexOf(t)}}),lang:ae(function(n){return z.test(n||"")||re.error("unsupported lang: "+n),n=n.replace(ee,te).toLowerCase(),function(e){var t;do{if(t=S?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===o},focus:function(e){return e===A.activeElement&&(!A.hasFocus||A.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!y.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:fe(function(){return[0]}),last:fe(function(e,t){return[t-1]}),eq:fe(function(e,t,n){return[n<0?n+t:n]}),even:fe(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:fe(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:fe(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:fe(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=y.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})y.pseudos[e]=le(e);for(e in{submit:!0,reset:!0})y.pseudos[e]=ue(e);function he(){}function pe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function me(s,e,t){var c=e.dir,l=t&&"parentNode"===c,u=r++;return e.first?function(e,t,n){for(;e=e[c];)if(1===e.nodeType||l)return s(e,t,n)}:function(e,t,n){var r,i,a,o=[x,u];if(n){for(;e=e[c];)if((1===e.nodeType||l)&&s(e,t,n))return!0}else for(;e=e[c];)if(1===e.nodeType||l){if((r=(i=(a=e[T]||(e[T]={}))[e.uniqueID]||(a[e.uniqueID]={}))[c])&&r[0]===x&&r[1]===u)return o[2]=r[2];if((i[c]=o)[2]=s(e,t,n))return!0}}}function ge(i){return 1<i.length?function(e,t,n){for(var r=i.length;r--;)if(!i[r](e,t,n))return!1;return!0}:i[0]}function _e(e,t,n,r,i){for(var a,o=[],s=0,c=e.length,l=null!=t;s<c;s++)(a=e[s])&&(n&&!n(a,r,i)||(o.push(a),l&&t.push(s)));return o}function be(h,p,m,g,_,e){return g&&!g[T]&&(g=be(g)),_&&!_[T]&&(_=be(_,e)),ae(function(e,t,n,r){var i,a,o,s=[],c=[],l=t.length,u=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)re(e,t[r],n);return n}(p||"*",n.nodeType?[n]:n,[]),f=!h||!e&&p?u:_e(u,s,h,n,r),d=m?_||(e?h:l||g)?[]:t:f;if(m&&m(f,d,n,r),g)for(i=_e(d,c),g(i,[],n,r),a=i.length;a--;)(o=i[a])&&(d[c[a]]=!(f[c[a]]=o));if(e){if(_||h){if(_){for(i=[],a=d.length;a--;)(o=d[a])&&i.push(f[a]=o);_(null,d=[],i,r)}for(a=d.length;a--;)(o=d[a])&&-1<(i=_?O(e,o):s[a])&&(e[i]=!(t[i]=o))}}else d=_e(d===t?d.splice(l,d.length):d),_?_(null,t,d,r):M.apply(t,d)})}function ve(e){for(var i,t,n,r=e.length,a=y.relative[e[0].type],o=a||y.relative[" "],s=a?1:0,c=me(function(e){return e===i},o,!0),l=me(function(e){return-1<O(i,e)},o,!0),u=[function(e,t,n){var r=!a&&(n||t!==w)||((i=t).nodeType?c(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=y.relative[e[s].type])u=[me(ge(u),t)];else{if((t=y.filter[e[s].type].apply(null,e[s].matches))[T]){for(n=++s;n<r&&!y.relative[e[n].type];n++);return be(1<s&&ge(u),1<s&&pe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(B,"$1"),t,s<n&&ve(e.slice(s,n)),n<r&&ve(e=e.slice(n)),n<r&&pe(e))}u.push(t)}return ge(u)}return he.prototype=y.filters=y.pseudos,y.setFilters=new he,m=re.tokenize=function(e,t){var n,r,i,a,o,s,c,l=h[e+" "];if(l)return t?0:l.slice(0);for(o=e,s=[],c=y.preFilter;o;){for(a in n&&!(r=U.exec(o))||(r&&(o=o.slice(r[0].length)||o),s.push(i=[])),n=!1,(r=H.exec(o))&&(n=r.shift(),i.push({value:n,type:r[0].replace(B," ")}),o=o.slice(n.length)),y.filter)!(r=V[a].exec(o))||c[a]&&!(r=c[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),o=o.slice(n.length));if(!n)break}return t?o.length:o?re.error(e):h(e,s).slice(0)},f=re.compile=function(e,t){var n,g,_,b,v,r,i=[],a=[],o=k[e+" "];if(!o){for(t||(t=m(e)),n=t.length;n--;)(o=ve(t[n]))[T]?i.push(o):a.push(o);(o=k(e,(g=a,b=0<(_=i).length,v=0<g.length,r=function(e,t,n,r,i){var a,o,s,c=0,l="0",u=e&&[],f=[],d=w,h=e||v&&y.find.TAG("*",i),p=x+=null==d?1:Math.random()||.1,m=h.length;for(i&&(w=t===A||t||i);l!==m&&null!=(a=h[l]);l++){if(v&&a){for(o=0,t||a.ownerDocument===A||(C(a),n=!S);s=g[o++];)if(s(a,t||A,n)){r.push(a);break}i&&(x=p)}b&&((a=!s&&a)&&c--,e&&u.push(a))}if(c+=l,b&&l!==c){for(o=0;s=_[o++];)s(u,f,t,n);if(e){if(0<c)for(;l--;)u[l]||f[l]||(f[l]=I.call(r));f=_e(f)}M.apply(r,f),i&&!e&&0<f.length&&1<c+_.length&&re.uniqueSort(r)}return i&&(x=p,w=d),u},b?ae(r):r))).selector=e}return o},g=re.select=function(e,t,n,r){var i,a,o,s,c,l="function"==typeof e&&e,u=!r&&m(e=l.selector||e);if(n=n||[],1===u.length){if(2<(a=u[0]=u[0].slice(0)).length&&"ID"===(o=a[0]).type&&p.getById&&9===t.nodeType&&S&&y.relative[a[1].type]){if(!(t=(y.find.ID(o.matches[0].replace(ee,te),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(i=V.needsContext.test(e)?0:a.length;i--&&(o=a[i],!y.relative[s=o.type]);)if((c=y.find[s])&&(r=c(o.matches[0].replace(ee,te),Z.test(a[0].type)&&de(t.parentNode)||t))){if(a.splice(i,1),!(e=r.length&&pe(a)))return M.apply(n,r),n;break}}return(l||f(e,u))(r,t,!S,n,!t||Z.test(e)&&de(t.parentNode)||t),n},p.sortStable=T.split("").sort(E).join("")===T,p.detectDuplicates=!!l,C(),p.sortDetached=oe(function(e){return 1&e.compareDocumentPosition(A.createElement("div"))}),oe(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||se("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),p.attributes&&oe(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||se("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),oe(function(e){return null==e.getAttribute("disabled")})||se(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),re}(A);T.find=h,T.expr=h.selectors,T.expr[":"]=T.expr.pseudos,T.uniqueSort=T.unique=h.uniqueSort,T.text=h.getText,T.isXMLDoc=h.isXML,T.contains=h.contains;var _=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&T(e).is(n))break;r.push(e)}return r},b=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},v=T.expr.match.needsContext,y=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function C(e,n,r){if(T.isFunction(n))return T.grep(e,function(e,t){return!!n.call(e,t,e)!==r});if(n.nodeType)return T.grep(e,function(e){return e===n!==r});if("string"==typeof n){if(w.test(n))return T.filter(n,e,r);n=T.filter(n,e)}return T.grep(e,function(e){return-1<i.call(n,e)!==r})}T.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?T.find.matchesSelector(r,e)?[r]:[]:T.find.matches(e,T.grep(t,function(e){return 1===e.nodeType}))},T.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(T(e).filter(function(){for(t=0;t<n;t++)if(T.contains(i[t],this))return!0}));for(t=0;t<n;t++)T.find(e,i[t],r);return(r=this.pushStack(1<n?T.unique(r):r)).selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(C(this,e||[],!1))},not:function(e){return this.pushStack(C(this,e||[],!0))},is:function(e){return!!C(this,"string"==typeof e&&v.test(e)?T(e):e||[],!1).length}});var x,k=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(T.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||x,"string"!=typeof e)return e.nodeType?(this.context=this[0]=e,this.length=1,this):T.isFunction(e)?void 0!==n.ready?n.ready(e):e(T):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),T.makeArray(e,this));if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:k.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof T?t[0]:t,T.merge(this,T.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),y.test(r[1])&&T.isPlainObject(t))for(r in t)T.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=S.getElementById(r[2]))&&i.parentNode&&(this.length=1,this[0]=i),this.context=S,this.selector=e,this}).prototype=T.fn,x=T(S);var E=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};function I(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(T.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,a=[],o=v.test(e)||"string"!=typeof e?T(e,t||this.context):0;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?-1<o.index(n):1===n.nodeType&&T.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(1<a.length?T.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?i.call(T(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),T.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return _(e,"parentNode")},parentsUntil:function(e,t,n){return _(e,"parentNode",n)},next:function(e){return I(e,"nextSibling")},prev:function(e){return I(e,"previousSibling")},nextAll:function(e){return _(e,"nextSibling")},prevAll:function(e){return _(e,"previousSibling")},nextUntil:function(e,t,n){return _(e,"nextSibling",n)},prevUntil:function(e,t,n){return _(e,"previousSibling",n)},siblings:function(e){return b((e.parentNode||{}).firstChild,e)},children:function(e){return b(e.firstChild)},contents:function(e){return e.contentDocument||T.merge([],e.childNodes)}},function(r,i){T.fn[r]=function(e,t){var n=T.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=T.filter(t,n)),1<this.length&&(D[r]||T.uniqueSort(n),E.test(r)&&n.reverse()),this.pushStack(n)}});var P,M=/\S+/g;function $(){S.removeEventListener("DOMContentLoaded",$),A.removeEventListener("load",$),T.ready()}T.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},T.each(e.match(M)||[],function(e,t){n[t]=!0}),n):T.extend({},r);var i,t,a,o,s=[],c=[],l=-1,u=function(){for(o=r.once,a=i=!0;c.length;l=-1)for(t=c.shift();++l<s.length;)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1);r.memory||(t=!1),i=!1,o&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,c.push(t)),function n(e){T.each(e,function(e,t){T.isFunction(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==T.type(t)&&n(t)})}(arguments),t&&!i&&u()),this},remove:function(){return T.each(arguments,function(e,t){for(var n;-1<(n=T.inArray(t,s,n));)s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<T.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return o=c=[],s=t="",this},disabled:function(){return!s},lock:function(){return o=c=[],t||(s=t=""),this},locked:function(){return!!o},fireWith:function(e,t){return o||(t=[e,(t=t||[]).slice?t.slice():t],c.push(t),i||u()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!a}};return f},T.extend({Deferred:function(e){var a=[["resolve","done",T.Callbacks("once memory"),"resolved"],["reject","fail",T.Callbacks("once memory"),"rejected"],["notify","progress",T.Callbacks("memory")]],i="pending",o={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var i=arguments;return T.Deferred(function(r){T.each(a,function(e,t){var n=T.isFunction(i[e])&&i[e];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&T.isFunction(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this===o?r.promise():this,n?[e]:arguments)})}),i=null}).promise()},promise:function(e){return null!=e?T.extend(e,o):o}},s={};return o.pipe=o.then,T.each(a,function(e,t){var n=t[2],r=t[3];o[t[1]]=n.add,r&&n.add(function(){i=r},a[1^e][2].disable,a[2][2].lock),s[t[0]]=function(){return s[t[0]+"With"](this===s?o:this,arguments),this},s[t[0]+"With"]=n.fireWith}),o.promise(s),e&&e.call(s,s),s},when:function(e){var i,t,n,r=0,a=u.call(arguments),o=a.length,s=1!==o||e&&T.isFunction(e.promise)?o:0,c=1===s?e:T.Deferred(),l=function(t,n,r){return function(e){n[t]=this,r[t]=1<arguments.length?u.call(arguments):e,r===i?c.notifyWith(n,r):--s||c.resolveWith(n,r)}};if(1<o)for(i=new Array(o),t=new Array(o),n=new Array(o);r<o;r++)a[r]&&T.isFunction(a[r].promise)?a[r].promise().progress(l(r,t,i)).done(l(r,n,a)).fail(c.reject):--s;return s||c.resolveWith(n,a),c.promise()}}),T.fn.ready=function(e){return T.ready.promise().done(e),this},T.extend({isReady:!1,readyWait:1,holdReady:function(e){e?T.readyWait++:T.ready(!0)},ready:function(e){(!0===e?--T.readyWait:T.isReady)||(T.isReady=!0)!==e&&0<--T.readyWait||(P.resolveWith(S,[T]),T.fn.triggerHandler&&(T(S).triggerHandler("ready"),T(S).off("ready")))}}),T.ready.promise=function(e){return P||(P=T.Deferred(),"complete"===S.readyState||"loading"!==S.readyState&&!S.documentElement.doScroll?A.setTimeout(T.ready):(S.addEventListener("DOMContentLoaded",$),A.addEventListener("load",$))),P.promise(e)},T.ready.promise();var O=function(e,t,n,r,i,a,o){var s=0,c=e.length,l=null==n;if("object"===T.type(n))for(s in i=!0,n)O(e,t,s,n[s],!0,a,o);else if(void 0!==r&&(i=!0,T.isFunction(r)||(o=!0),l&&(t=o?(t.call(e,r),null):(l=t,function(e,t,n){return l.call(T(e),n)})),t))for(;s<c;s++)t(e[s],n,o?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):c?t(e[0],n):a},R=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function N(){this.expando=T.expando+N.uid++}N.uid=1,N.prototype={register:function(e,t){var n=t||{};return e.nodeType?e[this.expando]=n:Object.defineProperty(e,this.expando,{value:n,writable:!0,configurable:!0}),e[this.expando]},cache:function(e){if(!R(e))return{};var t=e[this.expando];return t||(t={},R(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[t]=n;else for(r in t)i[r]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?void 0!==(r=this.get(e,t))?r:this.get(e,T.camelCase(t)):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,i,a=e[this.expando];if(void 0!==a){if(void 0===t)this.register(e);else{n=(r=T.isArray(t)?t.concat(t.map(T.camelCase)):(i=T.camelCase(t),t in a?[t,i]:(r=i)in a?[r]:r.match(M)||[])).length;for(;n--;)delete a[r[n]]}(void 0===t||T.isEmptyObject(a))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!T.isEmptyObject(t)}};var L=new N,F=new N,G=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,j=/[A-Z]/g;function B(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(j,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:G.test(n)?T.parseJSON(n):n)}catch(e){}F.set(e,t,n)}else n=void 0;return n}T.extend({hasData:function(e){return F.hasData(e)||L.hasData(e)},data:function(e,t,n){return F.access(e,t,n)},removeData:function(e,t){F.remove(e,t)},_data:function(e,t,n){return L.access(e,t,n)},_removeData:function(e,t){L.remove(e,t)}}),T.fn.extend({data:function(r,e){var t,n,i,a=this[0],o=a&&a.attributes;if(void 0!==r)return"object"==typeof r?this.each(function(){F.set(this,r)}):O(this,function(t){var e,n;if(a&&void 0===t)return void 0!==(e=F.get(a,r)||F.get(a,r.replace(j,"-$&").toLowerCase()))?e:(n=T.camelCase(r),void 0!==(e=F.get(a,n))?e:void 0!==(e=B(a,n,void 0))?e:void 0);n=T.camelCase(r),this.each(function(){var e=F.get(this,n);F.set(this,n,t),-1<r.indexOf("-")&&void 0!==e&&F.set(this,r,t)})},null,e,1<arguments.length,null,!0);if(this.length&&(i=F.get(a),1===a.nodeType&&!L.get(a,"hasDataAttrs"))){for(t=o.length;t--;)o[t]&&0===(n=o[t].name).indexOf("data-")&&(n=T.camelCase(n.slice(5)),B(a,n,i[n]));L.set(a,"hasDataAttrs",!0)}return i},removeData:function(e){return this.each(function(){F.remove(this,e)})}}),T.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=L.get(e,t),n&&(!r||T.isArray(n)?r=L.access(e,t,T.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=T.queue(e,t),r=n.length,i=n.shift(),a=T._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete a.stop,i.call(e,function(){T.dequeue(e,t)},a)),!r&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return L.get(e,n)||L.access(e,n,{empty:T.Callbacks("once memory").add(function(){L.remove(e,[t+"queue",n])})})}}),T.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?T.queue(this[0],t):void 0===n?this:this.each(function(){var e=T.queue(this,t,n);T._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&T.dequeue(this,t)})},dequeue:function(e){return this.each(function(){T.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=T.Deferred(),a=this,o=this.length,s=function(){--r||i.resolveWith(a,[a])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";o--;)(n=L.get(a[o],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var U=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,H=new RegExp("^(?:([+-])=|)("+U+")([a-z%]*)$","i"),W=["Top","Right","Bottom","Left"],q=function(e,t){return e=t||e,"none"===T.css(e,"display")||!T.contains(e.ownerDocument,e)};function z(e,t,n,r){var i,a=1,o=20,s=r?function(){return r.cur()}:function(){return T.css(e,t,"")},c=s(),l=n&&n[3]||(T.cssNumber[t]?"":"px"),u=(T.cssNumber[t]||"px"!==l&&+c)&&H.exec(T.css(e,t));if(u&&u[3]!==l)for(l=l||u[3],n=n||[],u=+c||1;u/=a=a||".5",T.style(e,t,u+l),a!==(a=s()/c)&&1!==a&&--o;);return n&&(u=+u||+c||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=u,r.end=i)),i}var V=/^(?:checkbox|radio)$/i,Y=/<([\w:-]+)/,K=/^$|\/(?:java|ecma)script/i,Q={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function X(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&T.nodeName(e,t)?T.merge([e],n):n}function Z(e,t){for(var n=0,r=e.length;n<r;n++)L.set(e[n],"globalEval",!t||L.get(t[n],"globalEval"))}Q.optgroup=Q.option,Q.tbody=Q.tfoot=Q.colgroup=Q.caption=Q.thead,Q.th=Q.td;var J,ee,te=/<|&#?\w+;/;function ne(e,t,n,r,i){for(var a,o,s,c,l,u,f=t.createDocumentFragment(),d=[],h=0,p=e.length;h<p;h++)if((a=e[h])||0===a)if("object"===T.type(a))T.merge(d,a.nodeType?[a]:a);else if(te.test(a)){for(o=o||f.appendChild(t.createElement("div")),s=(Y.exec(a)||["",""])[1].toLowerCase(),c=Q[s]||Q._default,o.innerHTML=c[1]+T.htmlPrefilter(a)+c[2],u=c[0];u--;)o=o.lastChild;T.merge(d,o.childNodes),(o=f.firstChild).textContent=""}else d.push(t.createTextNode(a));for(f.textContent="",h=0;a=d[h++];)if(r&&-1<T.inArray(a,r))i&&i.push(a);else if(l=T.contains(a.ownerDocument,a),o=X(f.appendChild(a),"script"),l&&Z(o),n)for(u=0;a=o[u++];)K.test(a.type||"")&&n.push(a);return f}J=S.createDocumentFragment().appendChild(S.createElement("div")),(ee=S.createElement("input")).setAttribute("type","radio"),ee.setAttribute("checked","checked"),ee.setAttribute("name","t"),J.appendChild(ee),g.checkClone=J.cloneNode(!0).cloneNode(!0).lastChild.checked,J.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!J.cloneNode(!0).lastChild.defaultValue;var re=/^key/,ie=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ae=/^([^.]*)(?:\.(.+)|)/;function oe(){return!0}function se(){return!1}function ce(){try{return S.activeElement}catch(e){}}function le(e,t,n,r,i,a){var o,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)le(e,s,n,r,t[s],a);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=se;else if(!i)return e;return 1===a&&(o=i,(i=function(e){return T().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=T.guid++)),e.each(function(){T.event.add(this,t,i,r,n)})}T.event={global:{},add:function(t,e,n,r,i){var a,o,s,c,l,u,f,d,h,p,m,g=L.get(t);if(g)for(n.handler&&(n=(a=n).handler,i=a.selector),n.guid||(n.guid=T.guid++),(c=g.events)||(c=g.events={}),(o=g.handle)||(o=g.handle=function(e){return void 0!==T&&T.event.triggered!==e.type?T.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(M)||[""]).length;l--;)h=m=(s=ae.exec(e[l])||[])[1],p=(s[2]||"").split(".").sort(),h&&(f=T.event.special[h]||{},h=(i?f.delegateType:f.bindType)||h,f=T.event.special[h]||{},u=T.extend({type:h,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&T.expr.match.needsContext.test(i),namespace:p.join(".")},a),(d=c[h])||((d=c[h]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,p,o)||t.addEventListener&&t.addEventListener(h,o)),f.add&&(f.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,u):d.push(u),T.event.global[h]=!0)},remove:function(e,t,n,r,i){var a,o,s,c,l,u,f,d,h,p,m,g=L.hasData(e)&&L.get(e);if(g&&(c=g.events)){for(l=(t=(t||"").match(M)||[""]).length;l--;)if(h=m=(s=ae.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),h){for(f=T.event.special[h]||{},d=c[h=(r?f.delegateType:f.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=d.length;a--;)u=d[a],!i&&m!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(d.splice(a,1),u.selector&&d.delegateCount--,f.remove&&f.remove.call(e,u));o&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,p,g.handle)||T.removeEvent(e,h,g.handle),delete c[h])}else for(h in c)T.event.remove(e,h+t[l],n,r,!0);T.isEmptyObject(c)&&L.remove(e,"handle events")}},dispatch:function(e){e=T.event.fix(e);var t,n,r,i,a,o,s=u.call(arguments),c=(L.get(this,"events")||{})[e.type]||[],l=T.event.special[e.type]||{};if((s[0]=e).delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,e)){for(o=T.event.handlers.call(this,e,c),t=0;(i=o[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(a=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(a.namespace)||(e.handleObj=a,e.data=a.data,void 0!==(r=((T.event.special[a.origType]||{}).handle||a.handler).apply(i.elem,s))&&!1===(e.result=r)&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,a,o=[],s=t.delegateCount,c=e.target;if(s&&c.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&(!0!==c.disabled||"click"!==e.type)){for(r=[],n=0;n<s;n++)void 0===r[i=(a=t[n]).selector+" "]&&(r[i]=a.needsContext?-1<T(i,this).index(c):T.find(i,this,null,[c]).length),r[i]&&r.push(a);r.length&&o.push({elem:c,handlers:r})}return s<t.length&&o.push({elem:this,handlers:t.slice(s)}),o},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,a=t.button;return null==e.pageX&&null!=t.clientX&&(r=(n=e.target.ownerDocument||S).documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||void 0===a||(e.which=1&a?1:2&a?3:4&a?2:0),e}},fix:function(e){if(e[T.expando])return e;var t,n,r,i=e.type,a=e,o=this.fixHooks[i];for(o||(this.fixHooks[i]=o=ie.test(i)?this.mouseHooks:re.test(i)?this.keyHooks:{}),r=o.props?this.props.concat(o.props):this.props,e=new T.Event(a),t=r.length;t--;)e[n=r[t]]=a[n];return e.target||(e.target=S),3===e.target.nodeType&&(e.target=e.target.parentNode),o.filter?o.filter(e,a):e},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ce()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===ce()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&T.nodeName(this,"input"))return this.click(),!1},_default:function(e){return T.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},T.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},T.Event=function(e,t){if(!(this instanceof T.Event))return new T.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?oe:se):this.type=e,t&&T.extend(this,t),this.timeStamp=e&&e.timeStamp||T.now(),this[T.expando]=!0},T.Event.prototype={constructor:T.Event,isDefaultPrevented:se,isPropagationStopped:se,isImmediatePropagationStopped:se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=oe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=oe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=oe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},T.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){T.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||T.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),T.fn.extend({on:function(e,t,n,r){return le(this,e,t,n,r)},one:function(e,t,n,r){return le(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,T(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=se),this.each(function(){T.event.remove(this,e,n,t)});for(i in e)this.off(i,t,e[i]);return this}});var ue=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,fe=/<script|<style|<link/i,de=/checked\s*(?:[^=]|=\s*.checked.)/i,he=/^true\/(.*)/,pe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function me(e,t){return T.nodeName(e,"table")&&T.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ge(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function _e(e){var t=he.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function be(e,t){var n,r,i,a,o,s,c,l;if(1===t.nodeType){if(L.hasData(e)&&(a=L.access(e),o=L.set(t,a),l=a.events))for(i in delete o.handle,o.events={},l)for(n=0,r=l[i].length;n<r;n++)T.event.add(t,i,l[i][n]);F.hasData(e)&&(s=F.access(e),c=T.extend({},s),F.set(t,c))}}function ve(n,r,i,a){r=m.apply([],r);var e,t,o,s,c,l,u=0,f=n.length,d=f-1,h=r[0],p=T.isFunction(h);if(p||1<f&&"string"==typeof h&&!g.checkClone&&de.test(h))return n.each(function(e){var t=n.eq(e);p&&(r[0]=h.call(this,e,t.html())),ve(t,r,i,a)});if(f&&(t=(e=ne(r,n[0].ownerDocument,!1,n,a)).firstChild,1===e.childNodes.length&&(e=t),t||a)){for(s=(o=T.map(X(e,"script"),ge)).length;u<f;u++)c=e,u!==d&&(c=T.clone(c,!0,!0),s&&T.merge(o,X(c,"script"))),i.call(n[u],c,u);if(s)for(l=o[o.length-1].ownerDocument,T.map(o,_e),u=0;u<s;u++)c=o[u],K.test(c.type||"")&&!L.access(c,"globalEval")&&T.contains(l,c)&&(c.src?T._evalUrl&&T._evalUrl(c.src):T.globalEval(c.textContent.replace(pe,"")))}return n}function ye(e,t,n){for(var r,i=t?T.filter(t,e):e,a=0;null!=(r=i[a]);a++)n||1!==r.nodeType||T.cleanData(X(r)),r.parentNode&&(n&&T.contains(r.ownerDocument,r)&&Z(X(r,"script")),r.parentNode.removeChild(r));return e}T.extend({htmlPrefilter:function(e){return e.replace(ue,"<$1></$2>")},clone:function(e,t,n){var r,i,a,o,s,c,l,u=e.cloneNode(!0),f=T.contains(e.ownerDocument,e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||T.isXMLDoc(e)))for(o=X(u),r=0,i=(a=X(e)).length;r<i;r++)s=a[r],c=o[r],void 0,"input"===(l=c.nodeName.toLowerCase())&&V.test(s.type)?c.checked=s.checked:"input"!==l&&"textarea"!==l||(c.defaultValue=s.defaultValue);if(t)if(n)for(a=a||X(e),o=o||X(u),r=0,i=a.length;r<i;r++)be(a[r],o[r]);else be(e,u);return 0<(o=X(u,"script")).length&&Z(o,!f&&X(e,"script")),u},cleanData:function(e){for(var t,n,r,i=T.event.special,a=0;void 0!==(n=e[a]);a++)if(R(n)){if(t=n[L.expando]){if(t.events)for(r in t.events)i[r]?T.event.remove(n,r):T.removeEvent(n,r,t.handle);n[L.expando]=void 0}n[F.expando]&&(n[F.expando]=void 0)}}}),T.fn.extend({domManip:ve,detach:function(e){return ye(this,e,!0)},remove:function(e){return ye(this,e)},text:function(e){return O(this,function(e){return void 0===e?T.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return ve(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||me(this,e).appendChild(e)})},prepend:function(){return ve(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=me(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return ve(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return ve(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(T.cleanData(X(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return T.clone(this,e,t)})},html:function(e){return O(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!fe.test(e)&&!Q[(Y.exec(e)||["",""])[1].toLowerCase()]){e=T.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(T.cleanData(X(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return ve(this,arguments,function(e){var t=this.parentNode;T.inArray(this,n)<0&&(T.cleanData(X(this)),t&&t.replaceChild(e,this))},n)}}),T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,o){T.fn[e]=function(e){for(var t,n=[],r=T(e),i=r.length-1,a=0;a<=i;a++)t=a===i?this:this.clone(!0),T(r[a])[o](t),s.apply(n,t.get());return this.pushStack(n)}});var we,Ce={HTML:"block",BODY:"block"};function Ae(e,t){var n=T(t.createElement(e)).appendTo(t.body),r=T.css(n[0],"display");return n.detach(),r}function Se(e){var t=S,n=Ce[e];return n||("none"!==(n=Ae(e,t))&&n||((t=(we=(we||T("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentDocument).write(),t.close(),n=Ae(e,t),we.detach()),Ce[e]=n),n}var Te=/^margin/,xe=new RegExp("^("+U+")(?!px)[a-z%]+$","i"),ke=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=A),t.getComputedStyle(e)},Ee=function(e,t,n,r){var i,a,o={};for(a in t)o[a]=e.style[a],e.style[a]=t[a];for(a in i=n.apply(e,r||[]),t)e.style[a]=o[a];return i},De=S.documentElement;function Ie(e,t,n){var r,i,a,o,s=e.style;return""!==(o=(n=n||ke(e))?n.getPropertyValue(t)||n[t]:void 0)&&void 0!==o||T.contains(e.ownerDocument,e)||(o=T.style(e,t)),n&&!g.pixelMarginRight()&&xe.test(o)&&Te.test(t)&&(r=s.width,i=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=n.width,s.width=r,s.minWidth=i,s.maxWidth=a),void 0!==o?o+"":o}function Pe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){var t,n,r,i,a=S.createElement("div"),o=S.createElement("div");function e(){o.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",o.innerHTML="",De.appendChild(a);var e=A.getComputedStyle(o);t="1%"!==e.top,i="2px"===e.marginLeft,n="4px"===e.width,o.style.marginRight="50%",r="4px"===e.marginRight,De.removeChild(a)}o.style&&(o.style.backgroundClip="content-box",o.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===o.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(o),T.extend(g,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return null==n&&e(),n},pixelMarginRight:function(){return null==n&&e(),r},reliableMarginLeft:function(){return null==n&&e(),i},reliableMarginRight:function(){var e,t=o.appendChild(S.createElement("div"));return t.style.cssText=o.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",o.style.width="1px",De.appendChild(a),e=!parseFloat(A.getComputedStyle(t).marginRight),De.removeChild(a),o.removeChild(t),e}}))}();var Me=/^(none|table(?!-c[ea]).+)/,$e={position:"absolute",visibility:"hidden",display:"block"},Oe={letterSpacing:"0",fontWeight:"400"},Re=["Webkit","O","Moz","ms"],Ne=S.createElement("div").style;function Le(e){if(e in Ne)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=Re.length;n--;)if((e=Re[n]+t)in Ne)return e}function Fe(e,t,n){var r=H.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ge(e,t,n,r,i){for(var a=n===(r?"border":"content")?4:"width"===t?1:0,o=0;a<4;a+=2)"margin"===n&&(o+=T.css(e,n+W[a],!0,i)),r?("content"===n&&(o-=T.css(e,"padding"+W[a],!0,i)),"margin"!==n&&(o-=T.css(e,"border"+W[a]+"Width",!0,i))):(o+=T.css(e,"padding"+W[a],!0,i),"padding"!==n&&(o+=T.css(e,"border"+W[a]+"Width",!0,i)));return o}function je(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,a=ke(e),o="border-box"===T.css(e,"boxSizing",!1,a);if(i<=0||null==i){if(((i=Ie(e,t,a))<0||null==i)&&(i=e.style[t]),xe.test(i))return i;r=o&&(g.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+Ge(e,t,n||(o?"border":"content"),r,a)+"px"}function Be(e,t){for(var n,r,i,a=[],o=0,s=e.length;o<s;o++)(r=e[o]).style&&(a[o]=L.get(r,"olddisplay"),n=r.style.display,t?(a[o]||"none"!==n||(r.style.display=""),""===r.style.display&&q(r)&&(a[o]=L.access(r,"olddisplay",Se(r.nodeName)))):(i=q(r),"none"===n&&i||L.set(r,"olddisplay",i?n:T.css(r,"display"))));for(o=0;o<s;o++)(r=e[o]).style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?a[o]||"":"none"));return e}function Ue(e,t,n,r,i){return new Ue.prototype.init(e,t,n,r,i)}T.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ie(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,a,o,s=T.camelCase(t),c=e.style;if(t=T.cssProps[s]||(T.cssProps[s]=Le(s)||s),o=T.cssHooks[t]||T.cssHooks[s],void 0===n)return o&&"get"in o&&void 0!==(i=o.get(e,!1,r))?i:c[t];"string"===(a=typeof n)&&(i=H.exec(n))&&i[1]&&(n=z(e,t,i),a="number"),null!=n&&n==n&&("number"===a&&(n+=i&&i[3]||(T.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,r))||(c[t]=n))}},css:function(e,t,n,r){var i,a,o,s=T.camelCase(t);return t=T.cssProps[s]||(T.cssProps[s]=Le(s)||s),(o=T.cssHooks[t]||T.cssHooks[s])&&"get"in o&&(i=o.get(e,!0,n)),void 0===i&&(i=Ie(e,t,r)),"normal"===i&&t in Oe&&(i=Oe[t]),""===n||n?(a=parseFloat(i),!0===n||isFinite(a)?a||0:i):i}}),T.each(["height","width"],function(e,o){T.cssHooks[o]={get:function(e,t,n){if(t)return Me.test(T.css(e,"display"))&&0===e.offsetWidth?Ee(e,$e,function(){return je(e,o,n)}):je(e,o,n)},set:function(e,t,n){var r,i=n&&ke(e),a=n&&Ge(e,o,n,"border-box"===T.css(e,"boxSizing",!1,i),i);return a&&(r=H.exec(t))&&"px"!==(r[3]||"px")&&(e.style[o]=t,t=T.css(e,o)),Fe(0,t,a)}}}),T.cssHooks.marginLeft=Pe(g.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ie(e,"marginLeft"))||e.getBoundingClientRect().left-Ee(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),T.cssHooks.marginRight=Pe(g.reliableMarginRight,function(e,t){if(t)return Ee(e,{display:"inline-block"},Ie,[e,"marginRight"])}),T.each({margin:"",padding:"",border:"Width"},function(i,a){T.cssHooks[i+a]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+W[t]+a]=r[t]||r[t-2]||r[0];return n}},Te.test(i)||(T.cssHooks[i+a].set=Fe)}),T.fn.extend({css:function(e,t){return O(this,function(e,t,n){var r,i,a={},o=0;if(T.isArray(t)){for(r=ke(e),i=t.length;o<i;o++)a[t[o]]=T.css(e,t[o],!1,r);return a}return void 0!==n?T.style(e,t,n):T.css(e,t)},e,t,1<arguments.length)},show:function(){return Be(this,!0)},hide:function(){return Be(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){q(this)?T(this).show():T(this).hide()})}}),((T.Tween=Ue).prototype={constructor:Ue,init:function(e,t,n,r,i,a){this.elem=e,this.prop=n,this.easing=i||T.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=a||(T.cssNumber[n]?"":"px")},cur:function(){var e=Ue.propHooks[this.prop];return e&&e.get?e.get(this):Ue.propHooks._default.get(this)},run:function(e){var t,n=Ue.propHooks[this.prop];return this.options.duration?this.pos=t=T.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ue.propHooks._default.set(this),this}}).init.prototype=Ue.prototype,(Ue.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=T.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){T.fx.step[e.prop]?T.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[T.cssProps[e.prop]]&&!T.cssHooks[e.prop]?e.elem[e.prop]=e.now:T.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ue.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},T.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},T.fx=Ue.prototype.init,T.fx.step={};var He,We,qe,ze,Ve,Ye=/^(?:toggle|show|hide)$/,Ke=/queueHooks$/;function Qe(){return A.setTimeout(function(){He=void 0}),He=T.now()}function Xe(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=W[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function Ze(e,t,n){for(var r,i=(Je.tweeners[t]||[]).concat(Je.tweeners["*"]),a=0,o=i.length;a<o;a++)if(r=i[a].call(n,t,e))return r}function Je(a,e,t){var n,o,r=0,i=Je.prefilters.length,s=T.Deferred().always(function(){delete c.elem}),c=function(){if(o)return!1;for(var e=He||Qe(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(a,[l,n,t]),n<1&&i?t:(s.resolveWith(a,[l]),!1)},l=s.promise({elem:a,props:T.extend({},e),opts:T.extend(!0,{specialEasing:{},easing:T.easing._default},t),originalProperties:e,originalOptions:t,startTime:He||Qe(),duration:t.duration,tweens:[],createTween:function(e,t){var n=T.Tween(a,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(o)return this;for(o=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(a,[l,1,0]),s.resolveWith(a,[l,e])):s.rejectWith(a,[l,e]),this}}),u=l.props;for(!function(e,t){var n,r,i,a,o;for(n in e)if(i=t[r=T.camelCase(n)],a=e[n],T.isArray(a)&&(i=a[1],a=e[n]=a[0]),n!==r&&(e[r]=a,delete e[n]),(o=T.cssHooks[r])&&"expand"in o)for(n in a=o.expand(a),delete e[r],a)n in e||(e[n]=a[n],t[n]=i);else t[r]=i}(u,l.opts.specialEasing);r<i;r++)if(n=Je.prefilters[r].call(l,a,u,l.opts))return T.isFunction(n.stop)&&(T._queueHooks(l.elem,l.opts.queue).stop=T.proxy(n.stop,n)),n;return T.map(u,Ze,l),T.isFunction(l.opts.start)&&l.opts.start.call(a,l),T.fx.timer(T.extend(c,{elem:a,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}T.Animation=T.extend(Je,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return z(n.elem,e,H.exec(t),n),n}]},tweener:function(e,t){for(var n,r=0,i=(e=T.isFunction(e)?(t=e,["*"]):e.match(M)).length;r<i;r++)n=e[r],Je.tweeners[n]=Je.tweeners[n]||[],Je.tweeners[n].unshift(t)},prefilters:[function(t,e,n){var r,i,a,o,s,c,l,u=this,f={},d=t.style,h=t.nodeType&&q(t),p=L.get(t,"fxshow");for(r in n.queue||(null==(s=T._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,c=s.empty.fire,s.empty.fire=function(){s.unqueued||c()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,T.queue(t,"fx").length||s.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===("none"===(l=T.css(t,"display"))?L.get(t,"olddisplay")||Se(t.nodeName):l)&&"none"===T.css(t,"float")&&(d.display="inline-block")),n.overflow&&(d.overflow="hidden",u.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]})),e)if(i=e[r],Ye.exec(i)){if(delete e[r],a=a||"toggle"===i,i===(h?"hide":"show")){if("show"!==i||!p||void 0===p[r])continue;h=!0}f[r]=p&&p[r]||T.style(t,r)}else l=void 0;if(T.isEmptyObject(f))"inline"===("none"===l?Se(t.nodeName):l)&&(d.display=l);else for(r in p?"hidden"in p&&(h=p.hidden):p=L.access(t,"fxshow",{}),a&&(p.hidden=!h),h?T(t).show():u.done(function(){T(t).hide()}),u.done(function(){var e;for(e in L.remove(t,"fxshow"),f)T.style(t,e,f[e])}),f)o=Ze(h?p[r]:0,r,u),r in p||(p[r]=o.start,h&&(o.end=o.start,o.start="width"===r||"height"===r?1:0))}],prefilter:function(e,t){t?Je.prefilters.unshift(e):Je.prefilters.push(e)}}),T.speed=function(e,t,n){var r=e&&"object"==typeof e?T.extend({},e):{complete:n||!n&&t||T.isFunction(e)&&e,duration:e,easing:n&&t||t&&!T.isFunction(t)&&t};return r.duration=T.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in T.fx.speeds?T.fx.speeds[r.duration]:T.fx.speeds._default,null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){T.isFunction(r.old)&&r.old.call(this),r.queue&&T.dequeue(this,r.queue)},r},T.fn.extend({fadeTo:function(e,t,n,r){return this.filter(q).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=T.isEmptyObject(t),a=T.speed(e,n,r),o=function(){var e=Je(this,T.extend({},t),a);(i||L.get(this,"finish"))&&e.stop(!0)};return o.finish=o,i||!1===a.queue?this.each(o):this.queue(a.queue,o)},stop:function(i,e,a){var o=function(e){var t=e.stop;delete e.stop,t(a)};return"string"!=typeof i&&(a=e,e=i,i=void 0),e&&!1!==i&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=T.timers,r=L.get(this);if(t)r[t]&&r[t].stop&&o(r[t]);else for(t in r)r[t]&&r[t].stop&&Ke.test(t)&&o(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(a),e=!1,n.splice(t,1));!e&&a||T.dequeue(this,i)})},finish:function(o){return!1!==o&&(o=o||"fx"),this.each(function(){var e,t=L.get(this),n=t[o+"queue"],r=t[o+"queueHooks"],i=T.timers,a=n?n.length:0;for(t.finish=!0,T.queue(this,o,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===o&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<a;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),T.each(["toggle","show","hide"],function(e,r){var i=T.fn[r];T.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(Xe(r,!0),e,t,n)}}),T.each({slideDown:Xe("show"),slideUp:Xe("hide"),slideToggle:Xe("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){T.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),T.timers=[],T.fx.tick=function(){var e,t=0,n=T.timers;for(He=T.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||T.fx.stop(),He=void 0},T.fx.timer=function(e){T.timers.push(e),e()?T.fx.start():T.timers.pop()},T.fx.interval=13,T.fx.start=function(){We||(We=A.setInterval(T.fx.tick,T.fx.interval))},T.fx.stop=function(){A.clearInterval(We),We=null},T.fx.speeds={slow:600,fast:200,_default:400},T.fn.delay=function(r,e){return r=T.fx&&T.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=A.setTimeout(e,r);t.stop=function(){A.clearTimeout(n)}})},qe=S.createElement("input"),ze=S.createElement("select"),Ve=ze.appendChild(S.createElement("option")),qe.type="checkbox",g.checkOn=""!==qe.value,g.optSelected=Ve.selected,ze.disabled=!0,g.optDisabled=!Ve.disabled,(qe=S.createElement("input")).value="t",qe.type="radio",g.radioValue="t"===qe.value;var et,tt=T.expr.attrHandle;T.fn.extend({attr:function(e,t){return O(this,T.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){T.removeAttr(this,e)})}}),T.extend({attr:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?T.prop(e,t,n):(1===a&&T.isXMLDoc(e)||(t=t.toLowerCase(),i=T.attrHooks[t]||(T.expr.match.bool.test(t)?et:void 0)),void 0!==n?null===n?void T.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=T.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&T.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,a=t&&t.match(M);if(a&&1===e.nodeType)for(;n=a[i++];)r=T.propFix[n]||n,T.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)}}),et={set:function(e,t,n){return!1===t?T.removeAttr(e,n):e.setAttribute(n,n),n}},T.each(T.expr.match.bool.source.match(/\w+/g),function(e,t){var a=tt[t]||T.find.attr;tt[t]=function(e,t,n){var r,i;return n||(i=tt[t],tt[t]=r,r=null!=a(e,t,n)?t.toLowerCase():null,tt[t]=i),r}});var nt=/^(?:input|select|textarea|button)$/i,rt=/^(?:a|area)$/i;T.fn.extend({prop:function(e,t){return O(this,T.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[T.propFix[e]||e]})}}),T.extend({prop:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&T.isXMLDoc(e)||(t=T.propFix[t]||t,i=T.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=T.find.attr(e,"tabindex");return t?parseInt(t,10):nt.test(e.nodeName)||rt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(T.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){T.propFix[this.toLowerCase()]=this});var it=/[\t\r\n\f]/g;function at(e){return e.getAttribute&&e.getAttribute("class")||""}T.fn.extend({addClass:function(t){var e,n,r,i,a,o,s,c=0;if(T.isFunction(t))return this.each(function(e){T(this).addClass(t.call(this,e,at(this)))});if("string"==typeof t&&t)for(e=t.match(M)||[];n=this[c++];)if(i=at(n),r=1===n.nodeType&&(" "+i+" ").replace(it," ")){for(o=0;a=e[o++];)r.indexOf(" "+a+" ")<0&&(r+=a+" ");i!==(s=T.trim(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,a,o,s,c=0;if(T.isFunction(t))return this.each(function(e){T(this).removeClass(t.call(this,e,at(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(M)||[];n=this[c++];)if(i=at(n),r=1===n.nodeType&&(" "+i+" ").replace(it," ")){for(o=0;a=e[o++];)for(;-1<r.indexOf(" "+a+" ");)r=r.replace(" "+a+" "," ");i!==(s=T.trim(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var a=typeof i;return"boolean"==typeof t&&"string"===a?t?this.addClass(i):this.removeClass(i):T.isFunction(i)?this.each(function(e){T(this).toggleClass(i.call(this,e,at(this),t),t)}):this.each(function(){var e,t,n,r;if("string"===a)for(t=0,n=T(this),r=i.match(M)||[];e=r[t++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else void 0!==i&&"boolean"!==a||((e=at(this))&&L.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":L.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&-1<(" "+at(n)+" ").replace(it," ").indexOf(t))return!0;return!1}});var ot=/\r/g,st=/[\x20\t\r\n\f]+/g;T.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=T.isFunction(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,T(this).val()):n)?t="":"number"==typeof t?t+="":T.isArray(t)&&(t=T.map(t,function(e){return null==e?"":e+""})),(r=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=T.valHooks[t.type]||T.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(ot,""):null==e?"":e:void 0}}),T.extend({valHooks:{option:{get:function(e){var t=T.find.attr(e,"value");return null!=t?t:T.trim(T.text(e)).replace(st," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,a="select-one"===e.type||i<0,o=a?null:[],s=a?i+1:r.length,c=i<0?s:a?i:0;c<s;c++)if(((n=r[c]).selected||c===i)&&(g.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!T.nodeName(n.parentNode,"optgroup"))){if(t=T(n).val(),a)return t;o.push(t)}return o},set:function(e,t){for(var n,r,i=e.options,a=T.makeArray(t),o=i.length;o--;)((r=i[o]).selected=-1<T.inArray(T.valHooks.option.get(r),a))&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),T.each(["radio","checkbox"],function(){T.valHooks[this]={set:function(e,t){if(T.isArray(t))return e.checked=-1<T.inArray(T(e).val(),t)}},g.checkOn||(T.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var ct=/^(?:focusinfocus|focusoutblur)$/;T.extend(T.event,{trigger:function(e,t,n,r){var i,a,o,s,c,l,u,f=[n||S],d=p.call(e,"type")?e.type:e,h=p.call(e,"namespace")?e.namespace.split("."):[];if(a=o=n=n||S,3!==n.nodeType&&8!==n.nodeType&&!ct.test(d+T.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),c=d.indexOf(":")<0&&"on"+d,(e=e[T.expando]?e:new T.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:T.makeArray(t,[e]),u=T.event.special[d]||{},r||!u.trigger||!1!==u.trigger.apply(n,t))){if(!r&&!u.noBubble&&!T.isWindow(n)){for(s=u.delegateType||d,ct.test(s+d)||(a=a.parentNode);a;a=a.parentNode)f.push(a),o=a;o===(n.ownerDocument||S)&&f.push(o.defaultView||o.parentWindow||A)}for(i=0;(a=f[i++])&&!e.isPropagationStopped();)e.type=1<i?s:u.bindType||d,(l=(L.get(a,"events")||{})[e.type]&&L.get(a,"handle"))&&l.apply(a,t),(l=c&&a[c])&&l.apply&&R(a)&&(e.result=l.apply(a,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||u._default&&!1!==u._default.apply(f.pop(),t)||!R(n)||c&&T.isFunction(n[d])&&!T.isWindow(n)&&((o=n[c])&&(n[c]=null),n[T.event.triggered=d](),T.event.triggered=void 0,o&&(n[c]=o)),e.result}},simulate:function(e,t,n){var r=T.extend(new T.Event,n,{type:e,isSimulated:!0});T.event.trigger(r,null,t)}}),T.fn.extend({trigger:function(e,t){return this.each(function(){T.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return T.event.trigger(e,t,n,!0)}}),T.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,n){T.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),T.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),g.focusin="onfocusin"in A,g.focusin||T.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){T.event.simulate(r,e.target,T.event.fix(e))};T.event.special[r]={setup:function(){var e=this.ownerDocument||this,t=L.access(e,r);t||e.addEventListener(n,i,!0),L.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=L.access(e,r)-1;t?L.access(e,r,t):(e.removeEventListener(n,i,!0),L.remove(e,r))}}});var lt=A.location,ut=T.now(),ft=/\?/;T.parseJSON=function(e){return JSON.parse(e+"")},T.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new A.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||T.error("Invalid XML: "+e),t};var dt=/#.*$/,ht=/([?&])_=[^&]*/,pt=/^(.*?):[ \t]*([^\r\n]*)$/gm,mt=/^(?:GET|HEAD)$/,gt=/^\/\//,_t={},bt={},vt="*/".concat("*"),yt=S.createElement("a");function wt(a){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(M)||[];if(T.isFunction(t))for(;n=i[r++];)"+"===n[0]?(n=n.slice(1)||"*",(a[n]=a[n]||[]).unshift(t)):(a[n]=a[n]||[]).push(t)}}function Ct(t,i,a,o){var s={},c=t===bt;function l(e){var r;return s[e]=!0,T.each(t[e]||[],function(e,t){var n=t(i,a,o);return"string"!=typeof n||c||s[n]?c?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function At(e,t){var n,r,i=T.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&T.extend(!0,e,r),e}yt.href=lt.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:lt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(lt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":vt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":T.parseJSON,"text xml":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?At(At(e,T.ajaxSettings),t):At(T.ajaxSettings,e)},ajaxPrefilter:wt(_t),ajaxTransport:wt(bt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var u,f,d,n,h,r,p,i,m=T.ajaxSetup({},t),g=m.context||m,_=m.context&&(g.nodeType||g.jquery)?T(g):T.event,b=T.Deferred(),v=T.Callbacks("once memory"),y=m.statusCode||{},a={},o={},w=0,s="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!n)for(n={};t=pt.exec(d);)n[t[1].toLowerCase()]=t[2];t=n[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?d:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=o[n]=o[n]||e,a[e]=t),this},overrideMimeType:function(e){return w||(m.mimeType=e),this},statusCode:function(e){var t;if(e)if(w<2)for(t in e)y[t]=[y[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||s;return u&&u.abort(t),c(0,t),this}};if(b.promise(C).complete=v.add,C.success=C.done,C.error=C.fail,m.url=((e||m.url||lt.href)+"").replace(dt,"").replace(gt,lt.protocol+"//"),m.type=t.method||t.type||m.method||m.type,m.dataTypes=T.trim(m.dataType||"*").toLowerCase().match(M)||[""],null==m.crossDomain){r=S.createElement("a");try{r.href=m.url,r.href=r.href,m.crossDomain=yt.protocol+"//"+yt.host!=r.protocol+"//"+r.host}catch(e){m.crossDomain=!0}}if(m.data&&m.processData&&"string"!=typeof m.data&&(m.data=T.param(m.data,m.traditional)),Ct(_t,m,t,C),2===w)return C;for(i in(p=T.event&&m.global)&&0==T.active++&&T.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!mt.test(m.type),f=m.url,m.hasContent||(m.data&&(f=m.url+=(ft.test(f)?"&":"?")+m.data,delete m.data),!1===m.cache&&(m.url=ht.test(f)?f.replace(ht,"$1_="+ut++):f+(ft.test(f)?"&":"?")+"_="+ut++)),m.ifModified&&(T.lastModified[f]&&C.setRequestHeader("If-Modified-Since",T.lastModified[f]),T.etag[f]&&C.setRequestHeader("If-None-Match",T.etag[f])),(m.data&&m.hasContent&&!1!==m.contentType||t.contentType)&&C.setRequestHeader("Content-Type",m.contentType),C.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+vt+"; q=0.01":""):m.accepts["*"]),m.headers)C.setRequestHeader(i,m.headers[i]);if(m.beforeSend&&(!1===m.beforeSend.call(g,C,m)||2===w))return C.abort();for(i in s="abort",{success:1,error:1,complete:1})C[i](m[i]);if(u=Ct(bt,m,t,C)){if(C.readyState=1,p&&_.trigger("ajaxSend",[C,m]),2===w)return C;m.async&&0<m.timeout&&(h=A.setTimeout(function(){C.abort("timeout")},m.timeout));try{w=1,u.send(a,c)}catch(e){if(!(w<2))throw e;c(-1,e)}}else c(-1,"No Transport");function c(e,t,n,r){var i,a,o,s,c,l=t;2!==w&&(w=2,h&&A.clearTimeout(h),u=void 0,d=r||"",C.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){for(var r,i,a,o,s=e.contents,c=e.dataTypes;"*"===c[0];)c.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){c.unshift(i);break}if(c[0]in n)a=c[0];else{for(i in n){if(!c[0]||e.converters[i+" "+c[0]]){a=i;break}o||(o=i)}a=a||o}if(a)return a!==c[0]&&c.unshift(a),n[a]}(m,C,n)),s=function(e,t,n,r){var i,a,o,s,c,l={},u=e.dataTypes.slice();if(u[1])for(o in e.converters)l[o.toLowerCase()]=e.converters[o];for(a=u.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!c&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),c=a,a=u.shift())if("*"===a)a=c;else if("*"!==c&&c!==a){if(!(o=l[c+" "+a]||l["* "+a]))for(i in l)if((s=i.split(" "))[1]===a&&(o=l[c+" "+s[0]]||l["* "+s[0]])){!0===o?o=l[i]:!0!==l[i]&&(a=s[0],u.unshift(s[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+c+" to "+a}}}return{state:"success",data:t}}(m,s,C,i),i?(m.ifModified&&((c=C.getResponseHeader("Last-Modified"))&&(T.lastModified[f]=c),(c=C.getResponseHeader("etag"))&&(T.etag[f]=c)),204===e||"HEAD"===m.type?l="nocontent":304===e?l="notmodified":(l=s.state,a=s.data,i=!(o=s.error))):(o=l,!e&&l||(l="error",e<0&&(e=0))),C.status=e,C.statusText=(t||l)+"",i?b.resolveWith(g,[a,l,C]):b.rejectWith(g,[C,l,o]),C.statusCode(y),y=void 0,p&&_.trigger(i?"ajaxSuccess":"ajaxError",[C,m,i?a:o]),v.fireWith(g,[C,l]),p&&(_.trigger("ajaxComplete",[C,m]),--T.active||T.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return T.get(e,t,n,"json")},getScript:function(e,t){return T.get(e,void 0,t,"script")}}),T.each(["get","post"],function(e,i){T[i]=function(e,t,n,r){return T.isFunction(t)&&(r=r||n,n=t,t=void 0),T.ajax(T.extend({url:e,type:i,dataType:r,data:t,success:n},T.isPlainObject(e)&&e))}}),T._evalUrl=function(e){return T.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},T.fn.extend({wrapAll:function(t){var e;return T.isFunction(t)?this.each(function(e){T(this).wrapAll(t.call(this,e))}):(this[0]&&(e=T(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(n){return T.isFunction(n)?this.each(function(e){T(this).wrapInner(n.call(this,e))}):this.each(function(){var e=T(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=T.isFunction(t);return this.each(function(e){T(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(){return this.parent().each(function(){T.nodeName(this,"body")||T(this).replaceWith(this.childNodes)}).end()}}),T.expr.filters.hidden=function(e){return!T.expr.filters.visible(e)},T.expr.filters.visible=function(e){return 0<e.offsetWidth||0<e.offsetHeight||0<e.getClientRects().length};var St=/%20/g,Tt=/\[\]$/,xt=/\r?\n/g,kt=/^(?:submit|button|image|reset|file)$/i,Et=/^(?:input|select|textarea|keygen)/i;function Dt(n,e,r,i){var t;if(T.isArray(e))T.each(e,function(e,t){r||Tt.test(n)?i(n,t):Dt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==T.type(e))i(n,e);else for(t in e)Dt(n+"["+t+"]",e[t],r,i)}T.param=function(e,t){var n,r=[],i=function(e,t){t=T.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=T.ajaxSettings&&T.ajaxSettings.traditional),T.isArray(e)||e.jquery&&!T.isPlainObject(e))T.each(e,function(){i(this.name,this.value)});else for(n in e)Dt(n,e[n],t,i);return r.join("&").replace(St,"+")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=T.prop(this,"elements");return e?T.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!T(this).is(":disabled")&&Et.test(this.nodeName)&&!kt.test(e)&&(this.checked||!V.test(e))}).map(function(e,t){var n=T(this).val();return null==n?null:T.isArray(n)?T.map(n,function(e){return{name:t.name,value:e.replace(xt,"\r\n")}}):{name:t.name,value:n.replace(xt,"\r\n")}}).get()}}),T.ajaxSettings.xhr=function(){try{return new A.XMLHttpRequest}catch(e){}};var It={0:200,1223:204},Pt=T.ajaxSettings.xhr();g.cors=!!Pt&&"withCredentials"in Pt,g.ajax=Pt=!!Pt,T.ajaxTransport(function(i){var a,o;if(g.cors||Pt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);a=function(e){return function(){a&&(a=o=r.onload=r.onerror=r.onabort=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(It[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=a(),o=r.onerror=a("error"),void 0!==r.onabort?r.onabort=o:r.onreadystatechange=function(){4===r.readyState&&A.setTimeout(function(){a&&o()})},a=a("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(a)throw e}},abort:function(){a&&a()}}}),T.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return T.globalEval(e),e}}}),T.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),T.ajaxTransport("script",function(n){var r,i;if(n.crossDomain)return{send:function(e,t){r=T("<script>").prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),S.head.appendChild(r[0])},abort:function(){i&&i()}}});var Mt=[],$t=/(=)\?(?=&|$)|\?\?/;T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mt.pop()||T.expando+"_"+ut++;return this[e]=!0,e}}),T.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,a,o=!1!==e.jsonp&&($t.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&$t.test(e.data)&&"data");if(o||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=T.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,o?e[o]=e[o].replace($t,"$1"+r):!1!==e.jsonp&&(e.url+=(ft.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||T.error(r+" was not called"),a[0]},e.dataTypes[0]="json",i=A[r],A[r]=function(){a=arguments},n.always(function(){void 0===i?T(A).removeProp(r):A[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Mt.push(r)),a&&T.isFunction(i)&&i(a[0]),a=i=void 0}),"script"}),T.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||S;var r=y.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=ne([e],t,i),i&&i.length&&T(i).remove(),T.merge([],r.childNodes))};var Ot=T.fn.load;function Rt(e){return T.isWindow(e)?e:9===e.nodeType&&e.defaultView}T.fn.load=function(e,t,n){if("string"!=typeof e&&Ot)return Ot.apply(this,arguments);var r,i,a,o=this,s=e.indexOf(" ");return-1<s&&(r=T.trim(e.slice(s)),e=e.slice(0,s)),T.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<o.length&&T.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){a=arguments,o.html(r?T("<div>").append(T.parseHTML(e)).find(r):e)}).always(n&&function(e,t){o.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){T.fn[t]=function(e){return this.on(t,e)}}),T.expr.filters.animated=function(t){return T.grep(T.timers,function(e){return t===e.elem}).length},T.offset={setOffset:function(e,t,n){var r,i,a,o,s,c,l=T.css(e,"position"),u=T(e),f={};"static"===l&&(e.style.position="relative"),s=u.offset(),a=T.css(e,"top"),c=T.css(e,"left"),i=("absolute"===l||"fixed"===l)&&-1<(a+c).indexOf("auto")?(o=(r=u.position()).top,r.left):(o=parseFloat(a)||0,parseFloat(c)||0),T.isFunction(t)&&(t=t.call(e,n,T.extend({},s))),null!=t.top&&(f.top=t.top-s.top+o),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):u.css(f)}},T.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){T.offset.setOffset(this,t,e)});var e,n,r=this[0],i={top:0,left:0},a=r&&r.ownerDocument;return a?(e=a.documentElement,T.contains(e,r)?(i=r.getBoundingClientRect(),n=Rt(a),{top:i.top+n.pageYOffset-e.clientTop,left:i.left+n.pageXOffset-e.clientLeft}):i):void 0},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===T.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),T.nodeName(e[0],"html")||(r=e.offset()),r.top+=T.css(e[0],"borderTopWidth",!0),r.left+=T.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-T.css(n,"marginTop",!0),left:t.left-r.left-T.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===T.css(e,"position");)e=e.offsetParent;return e||De})}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var a="pageYOffset"===i;T.fn[t]=function(e){return O(this,function(e,t,n){var r=Rt(e);if(void 0===n)return r?r[i]:e[t];r?r.scrollTo(a?r.pageXOffset:n,a?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),T.each(["top","left"],function(e,n){T.cssHooks[n]=Pe(g.pixelPosition,function(e,t){if(t)return t=Ie(e,n),xe.test(t)?T(e).position()[n]+"px":t})}),T.each({Height:"height",Width:"width"},function(a,o){T.each({padding:"inner"+a,content:o,"":"outer"+a},function(r,e){T.fn[e]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return O(this,function(e,t,n){var r;return T.isWindow(e)?e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?T.css(e,t,i):T.style(e,t,n,i)},o,n?e:void 0,n,null)}})}),T.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},size:function(){return this.length}}),T.fn.andSelf=T.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return T});var Nt=A.jQuery,Lt=A.$;return T.noConflict=function(e){return A.$===T&&(A.$=Lt),e&&A.jQuery===T&&(A.jQuery=Nt),T},e||(A.jQuery=A.$=T),T}),function(j){"use strict";function w(a,o){return o=o||Error,function(){var e,t,n=arguments,r=n[0],i="["+(a?a+":":"")+r+"] ";for(i+=n[1].replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1)+2;return t<n.length?Be(n[t]):e}),i+="\nhttp://errors.angularjs.org/1.5.10/"+(a?a+"/":"")+r,t=2,e="?";t<n.length;t++,e="&")i+=e+"p"+(t-2)+"="+encodeURIComponent(Be(n[t]));return new o(i)}}var a=/^\/(.+)\/([a-z]*)$/,f="validity",B=Object.prototype.hasOwnProperty,S=function(e){return ve(e)?e.toLowerCase():e},u=function(e){return ve(e)?e.toUpperCase():e};"i"!=="I".toLowerCase()&&(S=function(e){return ve(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},u=function(e){return ve(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e});var U,ue,o,g,s=[].slice,r=[].splice,e=[].push,H=Object.prototype.toString,c=Object.getPrototypeOf,l=w("ng"),v=j.angular||(j.angular={}),t=0;function O(e){if(null==e||D(e))return!1;if(ye(e)||ve(e)||ue&&e instanceof ue)return!0;var t="length"in Object(e)&&e.length;return C(t)&&(0<=t&&(t-1 in e||e instanceof Array)||"function"==typeof e.item)}function fe(e,t,n){var r,i;if(e)if(we(e))for(r in e)"prototype"===r||"length"===r||"name"===r||e.hasOwnProperty&&!e.hasOwnProperty(r)||t.call(n,e[r],r,e);else if(ye(e)||O(e)){var a="object"!=typeof e;for(r=0,i=e.length;r<i;r++)(a||r in e)&&t.call(n,e[r],r,e)}else if(e.forEach&&e.forEach!==fe)e.forEach(t,n,e);else if(y(e))for(r in e)t.call(n,e[r],r,e);else if("function"==typeof e.hasOwnProperty)for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e);else for(r in e)B.call(e,r)&&t.call(n,e[r],r,e);return e}function d(e,t,n){for(var r=Object.keys(e).sort(),i=0;i<r.length;i++)t.call(n,e[r[i]],r[i]);return r}function _(n){return function(e,t){n(t,e)}}function k(){return++t}function h(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function p(e,t,n){for(var r=e.$$hashKey,i=0,a=t.length;i<a;++i){var o=t[i];if(be(o)||we(o))for(var s=Object.keys(o),c=0,l=s.length;c<l;c++){var u=s[c],f=o[u];n&&be(f)?A(f)?e[u]=new Date(f.valueOf()):T(f)?e[u]=new RegExp(f):f.nodeName?e[u]=f.cloneNode(!0):$(f)?e[u]=f.clone():(be(e[u])||(e[u]=ye(f)?[]:{}),p(e[u],[f],!0)):e[u]=f}}return h(e,r),e}function de(e){return p(e,s.call(arguments,1),!1)}function n(e){return p(e,s.call(arguments,1),!0)}function m(e){return parseInt(e,10)}U=j.document.documentMode;var E=Number.isNaN||function(e){return e!=e};function he(e,t){return de(Object.create(e),t)}function pe(){}function me(e){return e}function x(e){return function(){return e}}function b(e){return we(e.toString)&&e.toString!==H}function ge(e){return void 0===e}function _e(e){return void 0!==e}function be(e){return null!==e&&"object"==typeof e}function y(e){return null!==e&&"object"==typeof e&&!c(e)}function ve(e){return"string"==typeof e}function C(e){return"number"==typeof e}function A(e){return"[object Date]"===H.call(e)}pe.$inject=[],me.$inject=[];var ye=Array.isArray;function we(e){return"function"==typeof e}function T(e){return"[object RegExp]"===H.call(e)}function D(e){return e&&e.window===e}function Ce(e){return e&&e.$evalAsync&&e.$watch}function Ae(e){return"boolean"==typeof e}function I(e){return e&&we(e.then)}var P=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/;var Se=function(e){return ve(e)?e.trim():e},M=function(e){return e.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};function $(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function Te(e){return S(e.nodeName||e[0]&&e[0].nodeName)}function xe(e,t){var n=e.indexOf(t);return 0<=n&&e.splice(n,1),n}function R(e,n){var t,r,i=[],a=[];if(n){if((r=n)&&C(r.length)&&P.test(H.call(r))||(t=n,"[object ArrayBuffer]"===H.call(t)))throw l("cpta","Can't copy! TypedArray destination cannot be mutated.");if(e===n)throw l("cpi","Can't copy! Source and destination are identical.");return ye(n)?n.length=0:fe(n,function(e,t){"$$hashKey"!==t&&delete n[t]}),i.push(e),a.push(n),o(e,n)}return s(e);function o(e,t){var n,r=t.$$hashKey;if(ye(e))for(var i=0,a=e.length;i<a;i++)t.push(s(e[i]));else if(y(e))for(n in e)t[n]=s(e[n]);else if(e&&"function"==typeof e.hasOwnProperty)for(n in e)e.hasOwnProperty(n)&&(t[n]=s(e[n]));else for(n in e)B.call(e,n)&&(t[n]=s(e[n]));return h(t,r),t}function s(e){if(!be(e))return e;var t=i.indexOf(e);if(-1!==t)return a[t];if(D(e)||Ce(e))throw l("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var n=!1,r=function(e){switch(H.call(e)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new e.constructor(s(e.buffer),e.byteOffset,e.length);case"[object ArrayBuffer]":if(e.slice)return e.slice(0);var t=new ArrayBuffer(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t;case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new e.constructor(e.valueOf());case"[object RegExp]":var n=new RegExp(e.source,e.toString().match(/[^/]*$/)[0]);return n.lastIndex=e.lastIndex,n;case"[object Blob]":return new e.constructor([e],{type:e.type})}if(we(e.cloneNode))return e.cloneNode(!0)}(e);return void 0===r&&(r=ye(e)?[]:Object.create(c(e)),n=!0),i.push(e),a.push(r),n?o(e,r):r}}function ke(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!=e&&t!=t)return!0;var n,r,i,a=typeof e;if(a===typeof t&&"object"===a){if(!ye(e)){if(A(e))return!!A(t)&&ke(e.getTime(),t.getTime());if(T(e))return!!T(t)&&e.toString()===t.toString();if(Ce(e)||Ce(t)||D(e)||D(t)||ye(t)||A(t)||T(t))return!1;for(r in i=Oe(),e)if("$"!==r.charAt(0)&&!we(e[r])){if(!ke(e[r],t[r]))return!1;i[r]=!0}for(r in t)if(!(r in i)&&"$"!==r.charAt(0)&&_e(t[r])&&!we(t[r]))return!1;return!0}if(!ye(t))return!1;if((n=e.length)===t.length){for(r=0;r<n;r++)if(!ke(e[r],t[r]))return!1;return!0}}return!1}var N=function(){if(!_e(N.rules)){var e=j.document.querySelector("[ng-csp]")||j.document.querySelector("[data-ng-csp]");if(e){var t=e.getAttribute("ng-csp")||e.getAttribute("data-ng-csp");N.rules={noUnsafeEval:!t||-1!==t.indexOf("no-unsafe-eval"),noInlineStyle:!t||-1!==t.indexOf("no-inline-style")}}else N.rules={noUnsafeEval:function(){try{return new Function(""),!1}catch(e){return!0}}(),noInlineStyle:!1}}return N.rules},L=function(){if(_e(L.name_))return L.name_;var e,t,n,r,i=J.length;for(t=0;t<i;++t)if(n=J[t],e=j.document.querySelector("["+n.replace(":","\\:")+"jq]")){r=e.getAttribute(n+"jq");break}return L.name_=r};function F(e,t,n){return e.concat(s.call(t,n))}function Ee(e,t){return s.call(e,t||0)}function De(e,t){var n=2<arguments.length?Ee(arguments,2):[];return!we(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,F(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function i(e,t){var n=t;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?n=void 0:D(t)?n="$WINDOW":t&&j.document===t?n="$DOCUMENT":Ce(t)&&(n="$SCOPE"),n}function G(e,t){if(!ge(e))return C(t)||(t=t?2:null),JSON.stringify(e,i,t)}function W(e){return ve(e)?JSON.parse(e):e}var q=/:/g;function z(e,t){e=e.replace(q,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return E(n)?t:n}function V(e,t,n){n=n?-1:1;var r,i,a=e.getTimezoneOffset(),o=z(t,a);return r=e,i=n*(o-a),(r=new Date(r.getTime())).setMinutes(r.getMinutes()+i),r}function Ie(e){e=ue(e).clone();try{e.empty()}catch(e){}var t=ue("<div>").append(e).html();try{return e[0].nodeType===Ne?S(t):t.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(e,t){return"<"+S(t)})}catch(e){return S(t)}}function Y(e){try{return decodeURIComponent(e)}catch(e){}}function K(e){var i={};return fe((e||"").split("&"),function(e){var t,n,r;e&&(n=e=e.replace(/\+/g,"%20"),-1!==(t=e.indexOf("="))&&(n=e.substring(0,t),r=e.substring(t+1)),_e(n=Y(n))&&(r=!_e(r)||Y(r),B.call(i,n)?ye(i[n])?i[n].push(r):i[n]=[i[n],r]:i[n]=r))}),i}function Q(e){var n=[];return fe(e,function(e,t){ye(e)?fe(e,function(e){n.push(Z(t,!0)+(!0===e?"":"="+Z(e,!0)))}):n.push(Z(t,!0)+(!0===e?"":"="+Z(e,!0)))}),n.length?n.join("&"):""}function X(e){return Z(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Z(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}var J=["ng-","data-ng-","ng:","x-ng-"];var ee=function(e){if(!e.currentScript)return!0;var t=e.currentScript.getAttribute("src"),n=e.createElement("a");if(n.href=t,e.location.origin===n.origin)return!0;switch(n.protocol){case"http:":case"https:":case"ftp:":case"blob:":case"file:":case"data:":return!0;default:return!1}}(j.document);function te(r,e){var i,a,t={};if(fe(J,function(e){var t=e+"app";!i&&r.hasAttribute&&r.hasAttribute(t)&&(a=(i=r).getAttribute(t))}),fe(J,function(e){var t,n=e+"app";!i&&(t=r.querySelector("["+n.replace(":","\\:")+"]"))&&(a=(i=t).getAttribute(n))}),i){if(!ee)return void j.console.error("Angular: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match.");t.strictDi=null!==function(e,t){var n,r,i=J.length;for(r=0;r<i;++r)if(n=J[r]+t,ve(n=e.getAttribute(n)))return n;return null}(i,"strict-di"),e(i,a?[a]:[],t)}}function ne(n,r,i){be(i)||(i={});i=de({strictDi:!1},i);var t=function(){if((n=ue(n)).injector()){var e=n[0]===j.document?"document":Ie(n);throw l("btstrpd","App already bootstrapped with this element '{0}'",e.replace(/</,"&lt;").replace(/>/,"&gt;"))}(r=r||[]).unshift(["$provide",function(e){e.value("$rootElement",n)}]),i.debugInfoEnabled&&r.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),r.unshift("ng");var t=Ut(r,i.strictDi);return t.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),t},e=/^NG_ENABLE_DEBUG_INFO!/,a=/^NG_DEFER_BOOTSTRAP!/;if(j&&e.test(j.name)&&(i.debugInfoEnabled=!0,j.name=j.name.replace(e,"")),j&&!a.test(j.name))return t();j.name=j.name.replace(a,""),v.resumeBootstrap=function(e){return fe(e,function(e){r.push(e)}),t()},we(v.resumeDeferredBootstrap)&&v.resumeDeferredBootstrap()}function re(){j.name="NG_ENABLE_DEBUG_INFO!"+j.name,j.location.reload()}function ie(e){var t=v.element(e).injector();if(!t)throw l("test","no injector found for element argument to getTestability");return t.get("$$testability")}var ae=/[A-Z]/g;function Pe(e,n){return n=n||"_",e.replace(ae,function(e,t){return(t?n:"")+e.toLowerCase()})}var oe=!1;function Me(e,t,n){if(!e)throw l("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function se(e,t,n){return n&&ye(e)&&(e=e[e.length-1]),Me(we(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function ce(e,t){if("hasOwnProperty"===e)throw l("badname","hasOwnProperty is not a valid {0} name",t)}function le(e,t,n){if(!t)return e;for(var r,i=t.split("."),a=e,o=i.length,s=0;s<o;s++)r=i[s],e&&(e=(a=e)[r]);return!n&&we(e)?De(a,e):e}function $e(e){for(var t,n=e[0],r=e[e.length-1],i=1;n!==r&&(n=n.nextSibling);i++)(t||e[i]!==n)&&(t||(t=ue(s.call(e,0,i))),t.push(n));return t||e}function Oe(){return Object.create(null)}var Re=1,Ne=3,Le=8,Fe=9,Ge=11;function je(e,t){if(ye(e)){t=t||[];for(var n=0,r=e.length;n<r;n++)t[n]=e[n]}else if(be(e))for(var i in t=t||{},e)"$"===i.charAt(0)&&"$"===i.charAt(1)||(t[i]=e[i]);return t||e}function Be(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):ge(e)?"undefined":"string"!=typeof e?(t=e,n=[],JSON.stringify(t,function(e,t){if(be(t=i(e,t))){if(0<=n.indexOf(t))return"...";n.push(t)}return t})):e;var t,n}var Ue={full:"1.5.10",major:1,minor:5,dot:10,codeName:"asynchronous-synchronization"};ct.expando="ng339";var He=ct.cache={},We=1,qe=function(e,t,n){e.addEventListener(t,n,!1)},ze=function(e,t,n){e.removeEventListener(t,n,!1)};ct._data=function(e){return this.cache[e[this.expando]]||{}};var Ve=/([:\-_]+(.))/g,Ye=/^moz([A-Z])/,Ke={mouseleave:"mouseout",mouseenter:"mouseover"},Qe=w("jqLite");function Xe(e){return e.replace(Ve,function(e,t,n,r){return r?n.toUpperCase():n}).replace(Ye,"Moz$1")}var Ze=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Je=/<|&#?\w+;/,et=/<([\w:-]+)/,tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function rt(e){return!Je.test(e)}function it(e){var t=e.nodeType;return t===Re||!t||t===Fe}function at(e,t){var n,r,i,a,o=t.createDocumentFragment(),s=[];if(rt(e))s.push(t.createTextNode(e));else{for(n=o.appendChild(t.createElement("div")),r=(et.exec(e)||["",""])[1].toLowerCase(),i=nt[r]||nt._default,n.innerHTML=i[1]+e.replace(tt,"<$1></$2>")+i[2],a=i[0];a--;)n=n.lastChild;s=F(s,n.childNodes),(n=o.firstChild).textContent=""}return o.textContent="",o.innerHTML="",fe(s,function(e){o.appendChild(e)}),o}function ot(e,t){var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)}nt.optgroup=nt.option,nt.tbody=nt.tfoot=nt.colgroup=nt.caption=nt.thead,nt.th=nt.td;var st=j.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))};function ct(e){if(e instanceof ct)return e;var t,n,r,i;if(ve(e)&&(e=Se(e),t=!0),!(this instanceof ct)){if(t&&"<"!==e.charAt(0))throw Qe("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new ct(e)}bt(this,t?(n=e,r=r||j.document,(i=Ze.exec(n))?[r.createElement(i[1])]:(i=at(n,r))?i.childNodes:[]):e)}function lt(e){return e.cloneNode(!0)}function ut(e,t){if(t||dt(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,i=n.length;r<i;r++)dt(n[r])}function ft(n,e,r,t){if(_e(t))throw Qe("offargs","jqLite#off() does not support the `selector` argument");var i=ht(n),a=i&&i.events,o=i&&i.handle;if(o)if(e){var s=function(e){var t=a[e];_e(r)&&xe(t||[],r),_e(r)&&t&&0<t.length||(ze(n,e,o),delete a[e])};fe(e.split(" "),function(e){s(e),Ke[e]&&s(Ke[e])})}else for(e in a)"$destroy"!==e&&ze(n,e,o),delete a[e]}function dt(e,t){var n=e.ng339,r=n&&He[n];if(r){if(t)return void delete r.data[t];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),ft(e)),delete He[n],e.ng339=void 0}}function ht(e,t){var n=e.ng339,r=n&&He[n];return t&&!r&&(e.ng339=n=++We,r=He[n]={events:{},data:{},handle:void 0}),r}function pt(e,t,n){if(it(e)){var r=_e(n),i=!r&&t&&!be(t),a=!t,o=ht(e,!i),s=o&&o.data;if(r)s[t]=n;else{if(a)return s;if(i)return s&&s[t];de(s,t)}}}function mt(e,t){return!!e.getAttribute&&-1<(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")}function gt(t,e){e&&t.setAttribute&&fe(e.split(" "),function(e){t.setAttribute("class",Se((" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Se(e)+" "," ")))})}function _t(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");fe(t.split(" "),function(e){e=Se(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",Se(n))}}function bt(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var r=0;r<n;r++)e[e.length++]=t[r]}else e[e.length++]=t}}function vt(e,t){return yt(e,"$"+(t||"ngController")+"Controller")}function yt(e,t,n){e.nodeType===Fe&&(e=e.documentElement);for(var r=ye(t)?t:[t];e;){for(var i=0,a=r.length;i<a;i++)if(_e(n=ue.data(e,r[i])))return n;e=e.parentNode||e.nodeType===Ge&&e.host}}function wt(e){for(ut(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function Ct(e,t){t||ut(e);var n=e.parentNode;n&&n.removeChild(e)}var At=ct.prototype={ready:function(e){var t=!1;function n(){t||(t=!0,e())}"complete"===j.document.readyState?j.setTimeout(n):(this.on("DOMContentLoaded",n),ct(j).on("load",n))},toString:function(){var t=[];return fe(this,function(e){t.push(""+e)}),"["+t.join(", ")+"]"},eq:function(e){return ue(0<=e?this[e]:this[this.length+e])},length:0,push:e,sort:[].sort,splice:[].splice},St={};fe("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){St[S(e)]=e});var Tt={};fe("input,select,option,textarea,button,form,details".split(","),function(e){Tt[e]=!0});var xt={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};function kt(e,t){var n=St[t.toLowerCase()];return n&&Tt[Te(e)]&&n}function Et(e,t,n){n.call(e,t)}function Dt(e,t,n){var r=t.relatedTarget;r&&(r===e||st.call(e,r))||n.call(e,t)}function It(){this.$get=function(){return de(ct,{hasClass:function(e,t){return e.attr&&(e=e[0]),mt(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),_t(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),gt(e,t)}})}}function Pt(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var r=typeof e;return n="function"===r||"object"===r&&null!==e?e.$$hashKey=r+":"+(t||k)():r+":"+e}function Mt(e,t){if(t){var n=0;this.nextUid=function(){return++n}}fe(e,this.put,this)}fe({data:pt,removeData:dt,hasData:function(e){for(var t in He[e.ng339])return!0;return!1},cleanData:function(e){for(var t=0,n=e.length;t<n;t++)dt(e[t])}},function(e,t){ct[t]=e}),fe({data:pt,inheritedData:yt,scope:function(e){return ue.data(e,"$scope")||yt(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return ue.data(e,"$isolateScope")||ue.data(e,"$isolateScopeNoTemplate")},controller:vt,injector:function(e){return yt(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:mt,css:function(e,t,n){if(t=Xe(t),!_e(n))return e.style[t];e.style[t]=n},attr:function(e,t,n){var r=e.nodeType;if(r!==Ne&&2!==r&&r!==Le){var i=S(t);if(St[i]){if(!_e(n))return e[t]||(e.attributes.getNamedItem(t)||pe).specified?i:void 0;n?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(_e(n))e.setAttribute(t,n);else if(e.getAttribute){var a=e.getAttribute(t,2);return null===a?void 0:a}}},prop:function(e,t,n){if(!_e(n))return e[t];e[t]=n},text:function(){return e.$dv="",e;function e(e,t){if(ge(t)){var n=e.nodeType;return n===Re||n===Ne?e.textContent:""}e.textContent=t}}(),val:function(e,t){if(ge(t)){if(e.multiple&&"select"===Te(e)){var n=[];return fe(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){if(ge(t))return e.innerHTML;ut(e,!0),e.innerHTML=t},empty:wt},function(l,e){ct.prototype[e]=function(e,t){var n,r,i=this.length;if(l!==wt&&ge(2===l.length&&l!==mt&&l!==vt?e:t)){if(be(e)){for(n=0;n<i;n++)if(l===pt)l(this[n],e);else for(r in e)l(this[n],r,e[r]);return this}for(var a=l.$dv,o=ge(a)?Math.min(i,1):i,s=0;s<o;s++){var c=l(this[s],e,t);a=a?a+c:c}return a}for(n=0;n<i;n++)l(this[n],e,t);return this}}),fe({removeData:dt,on:function(i,e,a,t){if(_e(t))throw Qe("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(it(i)){var s,c,n,r=ht(i,!0),o=r.events,l=r.handle;l||(l=r.handle=(c=o,(n=function(e,t){e.isDefaultPrevented=function(){return e.defaultPrevented};var n=c[t||e.type],r=n?n.length:0;if(r){if(ge(e.immediatePropagationStopped)){var i=e.stopImmediatePropagation;e.stopImmediatePropagation=function(){e.immediatePropagationStopped=!0,e.stopPropagation&&e.stopPropagation(),i&&i.call(e)}}e.isImmediatePropagationStopped=function(){return!0===e.immediatePropagationStopped};var a=n.specialHandlerWrapper||Et;1<r&&(n=je(n));for(var o=0;o<r;o++)e.isImmediatePropagationStopped()||a(s,e,n[o])}}).elem=s=i,n));for(var u=0<=e.indexOf(" ")?e.split(" "):[e],f=u.length,d=function(e,t,n){var r=o[e];r||((r=o[e]=[]).specialHandlerWrapper=t,"$destroy"===e||n||qe(i,e,l)),r.push(a)};f--;)e=u[f],Ke[e]?(d(Ke[e],Dt),d(e,void 0,!0)):d(e)}},off:ft,one:function(t,n,r){(t=ue(t)).on(n,function e(){t.off(n,r),t.off(n,e)}),t.on(n,r)},replaceWith:function(t,e){var n,r=t.parentNode;ut(t),fe(new ct(e),function(e){n?r.insertBefore(e,n.nextSibling):r.replaceChild(e,t),n=e})},children:function(e){var t=[];return fe(e.childNodes,function(e){e.nodeType===Re&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===Re||n===Ge)for(var r=0,i=(t=new ct(t)).length;r<i;r++){var a=t[r];e.appendChild(a)}},prepend:function(t,e){if(t.nodeType===Re){var n=t.firstChild;fe(new ct(e),function(e){t.insertBefore(e,n)})}},wrap:function(e,t){ot(e,ue(t).eq(0).clone()[0])},remove:Ct,detach:function(e){Ct(e,!0)},after:function(e,t){var n=e,r=e.parentNode;if(r)for(var i=0,a=(t=new ct(t)).length;i<a;i++){var o=t[i];r.insertBefore(o,n.nextSibling),n=o}},addClass:_t,removeClass:gt,toggleClass:function(n,e,r){e&&fe(e.split(" "),function(e){var t=r;ge(t)&&(t=!mt(n,e)),(t?_t:gt)(n,e)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==Ge?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:lt,triggerHandler:function(t,e,n){var r,i,a,o=e.type||e,s=ht(t),c=s&&s.events,l=c&&c[o];l&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:pe,type:o,target:t},e.type&&(r=de(r,e)),i=je(l),a=n?[r].concat(n):[r],fe(i,function(e){r.isImmediatePropagationStopped()||e.apply(t,a)}))}},function(o,e){ct.prototype[e]=function(e,t,n){for(var r,i=0,a=this.length;i<a;i++)ge(r)?_e(r=o(this[i],e,t,n))&&(r=ue(r)):bt(r,o(this[i],e,t,n));return _e(r)?r:this}}),ct.prototype.bind=ct.prototype.on,ct.prototype.unbind=ct.prototype.off,Mt.prototype={put:function(e,t){this[Pt(e,this.nextUid)]=t},get:function(e){return this[Pt(e,this.nextUid)]},remove:function(e){var t=this[e=Pt(e,this.nextUid)];return delete this[e],t}};var $t=[function(){this.$get=[function(){return Mt}]}],Ot=/^([^(]+?)=>/,Rt=/^[^(]*\(\s*([^)]*)\)/m,Nt=/,/,Lt=/^\s*(_?)(\S+?)\1\s*$/,Ft=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Gt=w("$injector");function jt(e){return Function.prototype.toString.call(e)+" "}function Bt(e){var t=jt(e).replace(Ft,"");return t.match(Ot)||t.match(Rt)}function Ut(e,l){l=!0===l;var i={},a="Provider",s=[],o=new Mt([],!0),u={$provide:{provider:d(h),factory:d(p),service:d(function(e,t){return p(e,["$injector",function(e){return e.instantiate(t)}])}),value:d(function(e,t){return p(e,x(t),!1)}),constant:d(function(e,t){ce(e,"constant"),u[e]=t,n[e]=t}),decorator:function(e,t){var n=c.get(e+a),r=n.$get;n.$get=function(){var e=f.invoke(r,n);return f.invoke(t,null,{$delegate:e})}}}},c=u.$injector=m(u,function(e,t){throw v.isString(t)&&s.push(t),Gt("unpr","Unknown provider: {0}",s.join(" <- "))}),n={},t=m(n,function(e,t){var n=c.get(e+a,t);return f.invoke(n.$get,n,void 0,e)}),f=t;u["$injector"+a]={$get:x(t)};var r=function n(e){Me(ge(e)||ye(e),"modulesToLoad","not an array");var r,i=[];fe(e,function(t){if(!o.get(t)){o.put(t,!0);try{ve(t)?(r=g(t),i=i.concat(n(r.requires)).concat(r._runBlocks),e(r._invokeQueue),e(r._configBlocks)):we(t)?i.push(c.invoke(t)):ye(t)?i.push(c.invoke(t)):se(t,"module")}catch(e){throw ye(t)&&(t=t[t.length-1]),e.message&&e.stack&&-1===e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Gt("modulerr","Failed to instantiate module {0} due to:\n{1}",t,e.stack||e.message||e)}}function e(e){var t,n;for(t=0,n=e.length;t<n;t++){var r=e[t],i=c.get(r[0]);i[r[1]].apply(i,r[2])}}});return i}(e);return(f=t.get("$injector")).strictDi=l,fe(r,function(e){e&&f.invoke(e)}),f;function d(n){return function(e,t){if(!be(e))return n(e,t);fe(e,_(n))}}function h(e,t){if(ce(e,"service"),(we(t)||ye(t))&&(t=c.instantiate(t)),!t.$get)throw Gt("pget","Provider '{0}' must define $get factory method.",e);return u[e+a]=t}function p(e,t,n){return h(e,{$get:!1!==n?(r=e,i=t,function(){var e=f.invoke(i,this);if(ge(e))throw Gt("undef","Provider '{0}' must return a value from $get factory method.",r);return e}):t});var r,i}function m(n,r){function c(t,e){if(n.hasOwnProperty(t)){if(n[t]===i)throw Gt("cdep","Circular dependency found: {0}",t+" <- "+s.join(" <- "));return n[t]}try{return s.unshift(t),n[t]=i,n[t]=r(t,e),n[t]}catch(e){throw n[t]===i&&delete n[t],e}finally{s.shift()}}function o(e,t,n){for(var r=[],i=Ut.$$annotate(e,l,n),a=0,o=i.length;a<o;a++){var s=i[a];if("string"!=typeof s)throw Gt("itkn","Incorrect injection token! Expected service name as string, got {0}",s);r.push(t&&t.hasOwnProperty(s)?t[s]:c(s,n))}return r}return{invoke:function(e,t,n,r){"string"==typeof n&&(r=n,n=null);var i,a=o(e,n,r);return ye(e)&&(e=e[e.length-1]),i=e,U<=11||"function"!=typeof i||!/^(?:class\b|constructor\()/.test(jt(i))?e.apply(t,a):(a.unshift(null),new(Function.prototype.bind.apply(e,a)))},instantiate:function(e,t,n){var r=ye(e)?e[e.length-1]:e,i=o(e,t,n);return i.unshift(null),new(Function.prototype.bind.apply(r,i))},get:c,annotate:Ut.$$annotate,has:function(e){return u.hasOwnProperty(e+a)||n.hasOwnProperty(e)}}}}function Ht(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(r,i,a){var o=r.document;function s(e){if(e){e.scrollIntoView();var t=function(){var e=c.yOffset;if(we(e))e=e();else if($(e)){var t=e[0];e="fixed"!==r.getComputedStyle(t).position?0:t.getBoundingClientRect().bottom}else C(e)||(e=0);return e}();if(t){var n=e.getBoundingClientRect().top;r.scrollBy(0,n-t)}}else r.scrollTo(0,0)}function c(e){var t,n,r;(e=ve(e)?e:C(e)?e.toString():i.hash())?(t=o.getElementById(e))?s(t):(n=o.getElementsByName(e),r=null,Array.prototype.some.call(n,function(e){if("a"===Te(e))return r=e,!0}),(t=r)?s(t):"top"===e&&s(null)):s(null)}return e&&a.$watch(function(){return i.hash()},function(e,t){var n,r;e===t&&""===e||(n=function(){a.$evalAsync(c)},"complete"===(r=r||j).document.readyState?r.setTimeout(n):ue(r).on("load",n))}),c}]}Ut.$$annotate=function(e,t,n){var r,i,a;if("function"==typeof e){if(!(r=e.$inject)){if(r=[],e.length){if(t)throw ve(n)&&n||(n=e.name||((a=Bt(e))?"function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn")),Gt("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);fe(Bt(e)[1].split(Nt),function(e){e.replace(Lt,function(e,t,n){r.push(n)})})}e.$inject=r}}else ye(e)?(se(e[i=e.length-1],"fn"),r=e.slice(0,i)):se(e,"fn",!0);return r};var Wt=w("$animate"),qt=1,zt="ng-animate";function Vt(e,t){return e||t?e?t?(ye(e)&&(e=e.join(" ")),ye(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function Yt(e){return be(e)?e:{}}var Kt=function(){this.$get=pe},Qt=function(){var m=new Mt,g=[];this.$get=["$$AnimateRunner","$rootScope",function(f,d){return{enabled:pe,on:pe,off:pe,pin:pe,push:function(e,t,n,r){var i,a,o,s,c,l;r&&r(),(n=n||{}).from&&e.css(n.from),n.to&&e.css(n.to),(n.addClass||n.removeClass)&&(i=e,a=n.addClass,o=n.removeClass,s=m.get(i)||{},c=h(s,a,!0),l=h(s,o,!1),(c||l)&&(m.put(i,s),g.push(i),1===g.length&&d.$$postDigest(p)));var u=new f;return u.complete(),u}};function h(t,e,n){var r=!1;return e&&fe(e=ve(e)?e.split(" "):ye(e)?e:[],function(e){e&&(r=!0,t[e]=n)}),r}function p(){fe(g,function(e){var t=m.get(e);if(t){var n=function(e){ve(e)&&(e=e.split(" "));var t=Oe();return fe(e,function(e){e.length&&(t[e]=!0)}),t}(e.attr("class")),r="",i="";fe(t,function(e,t){e!==!!n[t]&&(e?r+=(r.length?" ":"")+t:i+=(i.length?" ":"")+t)}),fe(e,function(e){r&&_t(e,r),i&&gt(e,i)}),m.remove(e)}}),g.length=0}}]},Xt=["$provide",function(r){var i=this;this.$$registeredAnimations=Object.create(null),this.register=function(e,t){if(e&&"."!==e.charAt(0))throw Wt("notcsel","Expecting class selector starting with '.' got '{0}'.",e);var n=e+"-animation";i.$$registeredAnimations[e.substr(1)]=n,r.factory(n,t)},this.classNameFilter=function(e){if(1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null,this.$$classNameFilter&&new RegExp("(\\s+|\\/)"+zt+"(\\s+|\\/)").test(this.$$classNameFilter.toString())))throw Wt("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',zt);return this.$$classNameFilter},this.$get=["$$animateQueue",function(a){function i(e,t,n){if(n){var r=function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType===qt)return n}}(n);!r||r.parentNode||r.previousElementSibling||(n=null)}n?n.after(e):t.prepend(e)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(e){e.end&&e.end()},enter:function(e,t,n,r){return t=t&&ue(t),n=n&&ue(n),i(e,t=t||n.parent(),n),a.push(e,"enter",Yt(r))},move:function(e,t,n,r){return t=t&&ue(t),n=n&&ue(n),i(e,t=t||n.parent(),n),a.push(e,"move",Yt(r))},leave:function(e,t){return a.push(e,"leave",Yt(t),function(){e.remove()})},addClass:function(e,t,n){return(n=Yt(n)).addClass=Vt(n.addclass,t),a.push(e,"addClass",n)},removeClass:function(e,t,n){return(n=Yt(n)).removeClass=Vt(n.removeClass,t),a.push(e,"removeClass",n)},setClass:function(e,t,n,r){return(r=Yt(r)).addClass=Vt(r.addClass,t),r.removeClass=Vt(r.removeClass,n),a.push(e,"setClass",r)},animate:function(e,t,n,r,i){return(i=Yt(i)).from=i.from?de(i.from,t):t,i.to=i.to?de(i.to,n):n,r=r||"ng-inline-animate",i.tempClasses=Vt(i.tempClasses,r),a.push(e,"animate",i)}}}]}],Zt=function(){this.$get=["$$rAF",function(t){var n=[];function r(e){n.push(e),1<n.length||t(function(){for(var e=0;e<n.length;e++)n[e]();n=[]})}return function(){var t=!1;return r(function(){t=!0}),function(e){t?e():r(e)}}}]},Jt=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function(t,e,r,i,a){function n(e){this.setHost(e);var n=r();this._doneCallbacks=[],this._tick=function(e){var t=i[0];t&&t.hidden?a(e,0,!1):n(e)},this._state=0}return n.chain=function(e,n){var r=0;!function t(){if(r===e.length)return void n(!0);e[r](function(e){!1!==e?(r++,t()):n(!1)})}()},n.all=function(t,n){var r=0,i=!0;function a(e){i=i&&e,++r===t.length&&n(i)}fe(t,function(e){e.done(a)})},n.prototype={setHost:function(e){this.host=e||{}},done:function(e){2===this._state?e():this._doneCallbacks.push(e)},progress:pe,getPromise:function(){if(!this.promise){var e=this;this.promise=t(function(t,n){e.done(function(e){!1===e?n():t()})})}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},catch:function(e){return this.getPromise().catch(e)},finally:function(e){return this.getPromise().finally(e)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(e){var t=this;0===t._state&&(t._state=1,t._tick(function(){t._resolve(e)}))},_resolve:function(t){2!==this._state&&(fe(this._doneCallbacks,function(e){e(t)}),this._doneCallbacks.length=0,this._state=2)}},n}]},en=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(o,e,s){return function(e,t){var n=t||{};n.$$prepared||(n=R(n)),n.cleanupStyles&&(n.from=n.to=null),n.from&&(e.css(n.from),n.from=null);var r,i=new s;return{start:a,end:a};function a(){return o(function(){!function(){n.addClass&&(e.addClass(n.addClass),n.addClass=null);n.removeClass&&(e.removeClass(n.removeClass),n.removeClass=null);n.to&&(e.css(n.to),n.to=null)}(),r||i.complete(),r=!0}),i}}}]};function tn(s,e,t,c){var l=this,u=s.location,f=s.history,r=s.setTimeout,n=s.clearTimeout,i={};l.isMock=!1;var a=0,o=[];function d(e){try{e.apply(null,Ee(arguments,1))}finally{if(0===--a)for(;o.length;)try{o.pop()()}catch(e){t.error(e)}}}l.$$completeOutstandingRequest=d,l.$$incOutstandingRequestCount=function(){a++},l.notifyWhenNoOutstandingRequests=function(e){0===a?e():o.push(e)};var h,p,m=u.href,g=e.find("base"),_=null,b=c.history?function(){try{return f.state}catch(e){}}:pe;A(),p=h,l.url=function(e,t,n){if(ge(n)&&(n=null),u!==s.location&&(u=s.location),f!==s.history&&(f=s.history),e){var r=p===n;if(m===e&&(!c.history||r))return l;var i=m&&Xn(m)===Xn(e);return m=e,p=n,!c.history||i&&r?(i||(_=e),t?u.replace(e):i?u.hash=-1===(o=(a=e).indexOf("#"))?"":a.substr(o):u.href=e,u.href!==e&&(_=e)):(f[t?"replaceState":"pushState"](n,"",e),A(),p=h),_&&(_=e),l}return _||u.href.replace(/%27/g,"'");var a,o},l.state=function(){return h};var v=[],y=!1;function w(){_=null,A(),S()}var C=null;function A(){ke(h=ge(h=b())?null:h,C)&&(h=C),C=h}function S(){m===l.url()&&p===h||(m=l.url(),p=h,fe(v,function(e){e(l.url(),h)}))}l.onUrlChange=function(e){return y||(c.history&&ue(s).on("popstate",w),ue(s).on("hashchange",w),y=!0),v.push(e),e},l.$$applicationDestroyed=function(){ue(s).off("hashchange popstate",w)},l.$$checkUrlChange=S,l.baseHref=function(){var e=g.attr("href");return e?e.replace(/^(https?:)?\/\/[^/]*/,""):""},l.defer=function(e,t){var n;return a++,n=r(function(){delete i[n],d(e)},t||0),i[n]=!0,n},l.defer.cancel=function(e){return!!i[e]&&(delete i[e],n(e),d(pe),!0)}}function nn(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new tn(e,r,t,n)}]}function rn(){this.$get=function(){var f={};function e(e,t){if(e in f)throw w("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var n=0,r=de({},t,{id:e}),i=Oe(),a=t&&t.capacity||Number.MAX_VALUE,o=Oe(),s=null,c=null;return f[e]={put:function(e,t){if(!ge(t)){if(a<Number.MAX_VALUE)l(o[e]||(o[e]={key:e}));return e in i||n++,i[e]=t,a<n&&this.remove(c.key),t}},get:function(e){if(a<Number.MAX_VALUE){var t=o[e];if(!t)return;l(t)}return i[e]},remove:function(e){if(a<Number.MAX_VALUE){var t=o[e];if(!t)return;t===s&&(s=t.p),t===c&&(c=t.n),u(t.n,t.p),delete o[e]}e in i&&(delete i[e],n--)},removeAll:function(){i=Oe(),n=0,o=Oe(),s=c=null},destroy:function(){o=r=i=null,delete f[e]},info:function(){return de({},r,{size:n})}};function l(e){e!==s&&(c?c===e&&(c=e.n):c=e,u(e.n,e.p),u(e,s),(s=e).n=null)}function u(e,t){e!==t&&(e&&(e.p=t),t&&(t.n=e))}}return e.info=function(){var n={};return fe(f,function(e,t){n[t]=e.info()}),n},e.get=function(e){return f[e]},e}}function an(){this.$get=["$cacheFactory",function(e){return e("templates")}]}var on=w("$compile");var sn=new function(){};function cn(n,t){var p={},m="Directive",F=/^\s*directive:\s*([\w-]+)\s+(.*)$/,G=/(([\w-]+)(?::([^;]+))?;?)/,u=function(e){var t,n={},r=e.split(",");for(t=0;t<r.length;t++)n[r[t]]=!0;return n}("ngSrc,ngSrcset,src,srcset"),d=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,f=/^(on[a-z]+|formaction)$/,s=Oe();function r(e,r,i){var a=/^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/,o=Oe();return fe(e,function(e,t){if(e in s)o[t]=s[e];else{var n=e.match(a);if(!n)throw on("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",r,t,e,i?"controller bindings definition":"isolate scope definition");o[t]={mode:n[1][0],collection:"*"===n[2],optional:"?"===n[3],attrName:n[4]||t},n[4]&&(s[e]=o[t])}}),o}function g(e,t){var n={isolateScope:null,bindToController:null};if(be(e.scope)&&(!0===e.bindToController?(n.bindToController=r(e.scope,t,!0),n.isolateScope={}):n.isolateScope=r(e.scope,t,!1)),be(e.bindToController)&&(n.bindToController=r(e.bindToController,t,!0)),n.bindToController&&!e.controller)throw on("noctrl","Cannot bind to controller without directive '{0}'s controller.",t);return n}this.directive=function e(c,t){return Me(c,"name"),ce(c,"directive"),ve(c)?(!function(e){var t=e.charAt(0);if(!t||t!==S(t))throw on("baddir","Directive/Component name '{0}' is invalid. The first character must be a lowercase letter",e);if(e!==e.trim())throw on("baddir","Directive/Component name '{0}' is invalid. The name should not contain leading or trailing whitespaces",e)}(c),Me(t,"directiveFactory"),p.hasOwnProperty(c)||(p[c]=[],n.factory(c+m,["$injector","$exceptionHandler",function(a,o){var s=[];return fe(p[c],function(e,t){try{var n=a.invoke(e);we(n)?n={compile:x(n)}:!n.compile&&n.link&&(n.compile=x(n.link)),n.priority=n.priority||0,n.index=t,n.name=n.name||c,n.require=(i=(r=n).require||r.controller&&r.name,!ye(i)&&be(i)&&fe(i,function(e,t){var n=e.match(d);e.substring(n[0].length)||(i[t]=n[0]+t)}),i),n.restrict=function(e,t){if(e&&(!ve(e)||!/[EACM]/.test(e)))throw on("badrestrict","Restrict property '{0}' of directive '{1}' is invalid",e,t);return e||"EA"}(n.restrict,c),n.$$moduleName=e.$$moduleName,s.push(n)}catch(e){o(e)}var r,i}),s}])),p[c].push(t)):fe(c,_(e)),this},this.component=function(e,i){var a=i.controller||function(){};function n(r){function e(n){return we(n)||ye(n)?function(e,t){return r.invoke(n,this,{$element:e,$attrs:t})}:n}var t=i.template||i.templateUrl?i.template:"",n={controller:a,controllerAs:function(e,t){if(t&&ve(t))return t;if(ve(e)){var n=mn.exec(e);if(n)return n[3]}}(i.controller)||i.controllerAs||"$ctrl",template:e(t),templateUrl:e(i.templateUrl),transclude:i.transclude,scope:{},bindToController:i.bindings||{},restrict:"E",require:i.require};return fe(i,function(e,t){"$"===t.charAt(0)&&(n[t]=e)}),n}return fe(i,function(e,t){"$"===t.charAt(0)&&(n[t]=e,we(a)&&(a[t]=e))}),n.$inject=["$injector"],this.directive(e,n)},this.aHrefSanitizationWhitelist=function(e){return _e(e)?(t.aHrefSanitizationWhitelist(e),this):t.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return _e(e)?(t.imgSrcSanitizationWhitelist(e),this):t.imgSrcSanitizationWhitelist()};var l=!0;this.debugInfoEnabled=function(e){return _e(e)?(l=e,this):l};var le=!0;this.preAssignBindingsEnabled=function(e){return _e(e)?(le=e,this):le};var w=10;this.onChangesTtl=function(e){return arguments.length?(w=e,this):w};var C=!0;this.commentDirectivesEnabled=function(e){return arguments.length?(C=e,this):C};var A=!0;this.cssClassDirectivesEnabled=function(e){return arguments.length?(A=e,this):A},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(h,T,W,e,v,q,a,i,o,_){var s,b=/^\w/,y=j.document.createElement("div"),x=C,k=A,t=w;function c(){try{if(!--t)throw s=void 0,on("infchng","{0} $onChanges() iterations reached. Aborting!\n",w);a.$apply(function(){for(var t=[],e=0,n=s.length;e<n;++e)try{s[e]()}catch(e){t.push(e)}if(s=void 0,t.length)throw t})}finally{t++}}function z(e,t){if(t){var n,r,i,a=Object.keys(t);for(n=0,r=a.length;n<r;n++)this[i=a[n]]=t[i]}else this.$attr={};this.$$element=e}function E(e,t){try{e.addClass(t)}catch(e){}}z.prototype={$normalize:fn,$addClass:function(e){e&&0<e.length&&o.addClass(this.$$element,e)},$removeClass:function(e){e&&0<e.length&&o.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=dn(e,t);n&&n.length&&o.addClass(this.$$element,n);var r=dn(t,e);r&&r.length&&o.removeClass(this.$$element,r)},$set:function(e,t,n,r){var i,a=kt(this.$$element[0],e),o=xt[e],s=e;if(a?(this.$$element.prop(e,t),r=a):o&&(this[o]=t,s=o),this[e]=t,r?this.$attr[e]=r:(r=this.$attr[e])||(this.$attr[e]=r=Pe(e,"-")),"a"===(i=Te(this.$$element))&&("href"===e||"xlinkHref"===e)||"img"===i&&"src"===e)this[e]=t=_(t,"src"===e);else if("img"===i&&"srcset"===e&&_e(t)){for(var c="",l=Se(t),u=/\s/.test(l)?/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/:/(,)/,f=l.split(u),d=Math.floor(f.length/2),h=0;h<d;h++){var p=2*h;c+=_(Se(f[p]),!0),c+=" "+Se(f[p+1])}var m=Se(f[2*h]).split(/\s/);c+=_(Se(m[0]),!0),2===m.length&&(c+=" "+Se(m[1])),this[e]=t=c}!1!==n&&(null===t||ge(t)?this.$$element.removeAttr(r):b.test(r)?this.$$element.attr(r,t):function(e,t,n){y.innerHTML="<span "+t+">";var r=y.firstChild.attributes,i=r[0];r.removeNamedItem(i.name),i.value=n,e.attributes.setNamedItem(i)}(this.$$element[0],r,t));var g=this.$$observers;g&&fe(g[s],function(e){try{e(t)}catch(e){W(e)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers=Oe()),i=r[e]||(r[e]=[]);return i.push(t),a.$evalAsync(function(){i.$$inter||!n.hasOwnProperty(e)||ge(n[e])||t(n[e])}),function(){xe(i,t)}}};var n=T.startSymbol(),r=T.endSymbol(),V="{{"===n&&"}}"===r?me:function(e){return e.replace(/\{\{/g,n).replace(/}}/g,r)},D=/^ngAttr[A-Z]/,I=/^(.+)Start$/;return Y.$$addBindingInfo=l?function(e,t){var n=e.data("$binding")||[];ye(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:pe,Y.$$addBindingClass=l?function(e){E(e,"ng-binding")}:pe,Y.$$addScopeInfo=l?function(e,t,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)}:pe,Y.$$addScopeClass=l?function(e,t){E(e,t?"ng-isolate-scope":"ng-scope")}:pe,Y.$$createComment=function(e,t){var n="";return l&&(n=" "+(e||"")+": ",t&&(n+=t+" ")),j.document.createComment(n)},Y;function Y(u,e,t,n,f){u instanceof ue||(u=ue(u));for(var r=/\S+/,i=0,a=u.length;i<a;i++){var o=u[i];o.nodeType===Ne&&o.nodeValue.match(r)&&ot(o,u[i]=j.document.createElement("span"))}var d=P(u,e,u,t,n,f);Y.$$addScopeClass(u);var h=null;return function(e,t,n){Me(e,"scope"),f&&f.needsNewScope&&(e=e.$parent.$new());var r,i,a,o=(n=n||{}).parentBoundTranscludeFn,s=n.transcludeControllers,c=n.futureParentElement;if(o&&o.$$boundTransclude&&(o=o.$$boundTransclude),h||(i=(r=c)&&r[0],h=i&&"foreignobject"!==Te(i)&&H.call(i).match(/SVG/)?"svg":"html"),a="html"!==h?ue(ie(h,ue("<div>").append(u).html())):t?At.clone.call(u):u,s)for(var l in s)a.data("$"+l+"Controller",s[l].instance);return Y.$$addScopeInfo(a,e),t&&t(a,e),d&&d(e,a,a,o),a}}function P(e,p,t,n,r,i){for(var a,o,s,c,l,u,m,g=[],f=0;f<e.length;f++)a=new z,(s=(o=K(e[f],[],a,0===f?n:void 0,r)).length?$(o,e[f],a,p,t,null,[],[],i):null)&&s.scope&&Y.$$addScopeClass(a.$$element),l=s&&s.terminal||!(c=e[f].childNodes)||!c.length?null:P(c,s?(s.transcludeOnThisElement||!s.templateOnThisElement)&&s.transclude:p),(s||l)&&(g.push(f,s,l),u=!0,m=m||s),i=null;return u?function(e,t,n,r){var i,a,o,s,c,l,u,f,d;if(m){var h=t.length;for(d=new Array(h),c=0;c<g.length;c+=3)u=g[c],d[u]=t[u]}else d=t;for(c=0,l=g.length;c<l;)o=d[g[c++]],i=g[c++],a=g[c++],i?(i.scope?(s=e.$new(),Y.$$addScopeInfo(ue(o),s)):s=e,f=i.transcludeOnThisElement?M(e,i.transclude,r):!i.templateOnThisElement&&r?r:!r&&p?M(e,p):null,i(a,s,o,n,f)):a&&a(e,o.childNodes,void 0,r)}:null}function M(a,o,s){function e(e,t,n,r,i){return e||((e=a.$new(!1,i)).$$transcluded=!0),o(e,t,{parentBoundTranscludeFn:s,transcludeControllers:n,futureParentElement:r})}var t=e.$$slots=Oe();for(var n in o.$$slots)o.$$slots[n]?t[n]=M(a,o.$$slots[n],s):t[n]=null;return e}function K(e,t,n,r,i){var a,o,s,c,l,u,f=e.nodeType,d=n.$attr;switch(f){case Re:O(t,fn(o=Te(e)),"E",r,i);for(var h,p,m,g,_,b,v=e.attributes,y=0,w=v&&v.length;y<w;y++){var C=!1,A=!1;p=(h=v[y]).name,_=Se(h.value),g=fn(p),(b=D.test(g))&&(p=p.replace(un,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var S=g.match(I);S&&R(S[1])&&(A=(C=p).substr(0,p.length-5)+"end",p=p.substr(0,p.length-6)),d[m=fn(p.toLowerCase())]=p,!b&&n.hasOwnProperty(m)||(n[m]=_,kt(e,m)&&(n[m]=!0)),L(e,t,_,m,b),O(t,m,"A",r,i,C,A)}if("input"===o&&"hidden"===e.getAttribute("type")&&e.setAttribute("autocomplete","off"),!k)break;if(be(s=e.className)&&(s=s.animVal),ve(s)&&""!==s)for(;a=G.exec(s);)O(t,m=fn(a[2]),"C",r,i)&&(n[m]=Se(a[3])),s=s.substr(a.index+a[0].length);break;case Ne:if(11===U)for(;e.parentNode&&e.nextSibling&&e.nextSibling.nodeType===Ne;)e.nodeValue=e.nodeValue+e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);c=t,l=e.nodeValue,(u=T(l,!0))&&c.push({priority:0,compile:function(e){var t=e.parent(),r=!!t.length;return r&&Y.$$addBindingClass(t),function(e,t){var n=t.parent();r||Y.$$addBindingClass(n),Y.$$addBindingInfo(n,u.expressions),e.$watch(u,function(e){t[0].nodeValue=e})}}});break;case Le:if(!x)break;!function(e,t,n,r,i){try{var a=F.exec(e.nodeValue);if(a){var o=fn(a[1]);O(t,o,"M",r,i)&&(n[o]=Se(a[2]))}}catch(e){}}(e,t,n,r,i)}return t.sort(N),t}function Q(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t))do{if(!e)throw on("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType===Re&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(0<i);else r.push(e);return ue(r)}function X(a,o,s){return function(e,t,n,r,i){return t=Q(t[0],o,s),a(e,t,n,r,i)}}function Z(e,t,n,r,i,a){var o;return e?Y(t,n,r,i,a):function(){return o||(o=Y(t,n,r,i,a),t=n=a=null),o.apply(this,arguments)}}function $(e,w,C,t,n,r,A,S,i){i=i||{};for(var a,o,s,c,l,u=-Number.MAX_VALUE,T=i.newScopeDirective,x=i.controllerDirectives,k=i.newIsolateScopeDirective,E=i.templateDirective,f=i.nonTlbTranscludeDirective,d=!1,h=!1,D=i.hasElementTranscludeDirective,p=C.$$element=ue(w),m=r,g=t,_=!1,b=!1,v=0,y=e.length;v<y;v++){var I=(a=e[v]).$$start,P=a.$$end;if(I&&(p=Q(w,I,P)),s=void 0,u>a.priority)break;if((l=a.scope)&&(a.templateUrl||(be(l)?(re("new/isolated scope",k||T,a,p),k=a):re("new/isolated scope",k,a,p)),T=T||a),o=a.name,!_&&(a.replace&&(a.templateUrl||a.template)||a.transclude&&!a.$$tlb)){for(var M,$=v+1;M=e[$++];)if(M.transclude&&!M.$$tlb||M.replace&&(M.templateUrl||M.template)){b=!0;break}_=!0}if(!a.templateUrl&&a.controller&&(x=x||Oe(),re("'"+o+"' controller",x[o],a,p),x[o]=a),l=a.transclude)if(d=!0,a.$$tlb||(re("transclusion",f,a,p),f=a),"element"===l)D=!0,u=a.priority,s=p,p=C.$$element=ue(Y.$$createComment(o,C[o])),w=p[0],ae(n,Ee(s),w),s[0].$$parentNode=s[0].parentNode,g=Z(b,s,t,u,m&&m.name,{nonTlbTranscludeDirective:f});else{var O=Oe();if(s=ue(lt(w)).contents(),be(l)){s=[];var R=Oe(),N=Oe();for(var L in fe(l,function(e,t){var n="?"===e.charAt(0);e=n?e.substring(1):e,R[e]=t,O[t]=null,N[t]=n}),fe(p.contents(),function(e){var t=R[fn(Te(e))];t?(N[t]=!0,O[t]=O[t]||[],O[t].push(e)):s.push(e)}),fe(N,function(e,t){if(!e)throw on("reqslot","Required transclusion slot `{0}` was not filled.",t)}),O)O[L]&&(O[L]=Z(b,O[L],t))}p.empty(),(g=Z(b,s,t,void 0,void 0,{needsNewScope:a.$$isolateScope||a.$$newScope})).$$slots=O}if(a.template)if(h=!0,re("template",E,a,p),l=we((E=a).template)?a.template(p,C):a.template,l=V(l),a.replace){if(m=a,s=rt(l)?[]:hn(ie(a.templateNamespace,Se(l))),w=s[0],1!==s.length||w.nodeType!==Re)throw on("tplrt","Template for directive '{0}' must have exactly one root element. {1}",o,"");ae(n,p,w);var F={$attr:{}},G=K(w,[],F),j=e.splice(v+1,e.length-(v+1));(k||T)&&ee(G,k,T),e=e.concat(G).concat(j),te(C,F),y=e.length}else p.html(l);if(a.templateUrl)h=!0,re("template",E,a,p),(E=a).replace&&(m=a),H=ne(e.splice(v,e.length-v),p,C,n,d&&g,A,S,{controllerDirectives:x,newScopeDirective:T!==a&&T,newIsolateScopeDirective:k,templateDirective:E,nonTlbTranscludeDirective:f}),y=e.length;else if(a.compile)try{c=a.compile(p,C,g);var B=a.$$originalDirective||a;we(c)?U(null,De(B,c),I,P):c&&U(De(B,c.pre),De(B,c.post),I,P)}catch(e){W(e,Ie(p))}a.terminal&&(H.terminal=!0,u=Math.max(u,a.priority))}return H.scope=T&&!0===T.scope,H.transcludeOnThisElement=d,H.templateOnThisElement=h,H.transclude=g,i.hasElementTranscludeDirective=D,H;function U(e,t,n,r){e&&(n&&(e=X(e,n,r)),e.require=a.require,e.directiveName=o,(k===a||a.$$isolateScope)&&(e=oe(e,{isolateScope:!0})),A.push(e)),t&&(n&&(t=X(t,n,r)),t.require=a.require,t.directiveName=o,(k===a||a.$$isolateScope)&&(t=oe(t,{isolateScope:!0})),S.push(t))}function H(e,t,n,r,o){var i,a,s,c,l,u,f,d,h,p;for(var m in w===n?d=(h=C).$$element:h=new z(d=ue(n),C),l=t,k?c=t.$new(!0):T&&(l=t.$parent),o&&((f=function(e,t,n,r){var i;Ce(e)||(r=n,n=t,t=e,e=void 0);D&&(i=u);n||(n=D?d.parent():d);{if(!r)return o(e,t,i,n,y);var a=o.$$slots[r];if(a)return a(e,t,i,n,y);if(ge(a))throw on("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',r,Ie(d))}}).$$boundTransclude=o,f.isSlotFilled=function(e){return!!o.$$slots[e]}),x&&(u=function(e,t,n,r,i,a,o){var s=Oe();for(var c in r){var l=r[c],u={$scope:l===o||l.$$isolateScope?i:a,$element:e,$attrs:t,$transclude:n},f=l.controller;"@"===f&&(f=t[l.name]);var d=q(f,u,!0,l.controllerAs);s[l.name]=d,e.data("$"+l.name+"Controller",d.instance)}return s}(d,h,f,x,c,t,k)),k&&(Y.$$addScopeInfo(d,c,!0,!(E&&(E===k||E===k.$$originalDirective))),Y.$$addScopeClass(d,!0),c.$$isolateBindings=k.$$isolateBindings,(p=ce(t,h,c,c.$$isolateBindings,k)).removeWatches&&c.$on("$destroy",p.removeWatches)),u){var g=x[m],_=u[m],b=g.$$bindings.bindToController;if(le){_.bindingInfo=b?ce(l,h,_.instance,b,g):{};var v=_();v!==_.instance&&(_.instance=v,d.data("$"+g.name+"Controller",v),_.bindingInfo.removeWatches&&_.bindingInfo.removeWatches(),_.bindingInfo=ce(l,h,_.instance,b,g))}else _.instance=_(),d.data("$"+g.name+"Controller",_.instance),_.bindingInfo=ce(l,h,_.instance,b,g)}for(fe(x,function(e,t){var n=e.require;e.bindToController&&!ye(n)&&be(n)&&de(u[t].instance,J(t,n,d,u))}),fe(u,function(e){var t=e.instance;if(we(t.$onChanges))try{t.$onChanges(e.bindingInfo.initialChanges)}catch(e){W(e)}if(we(t.$onInit))try{t.$onInit()}catch(e){W(e)}we(t.$doCheck)&&(l.$watch(function(){t.$doCheck()}),t.$doCheck()),we(t.$onDestroy)&&l.$on("$destroy",function(){t.$onDestroy()})}),i=0,a=A.length;i<a;i++)se(s=A[i],s.isolateScope?c:t,d,h,s.require&&J(s.directiveName,s.require,d,u),f);var y=t;for(k&&(k.template||null===k.templateUrl)&&(y=c),e&&e(y,n.childNodes,void 0,o),i=S.length-1;0<=i;i--)se(s=S[i],s.isolateScope?c:t,d,h,s.require&&J(s.directiveName,s.require,d,u),f);fe(u,function(e){var t=e.instance;we(t.$postLink)&&t.$postLink()})}}function J(n,e,r,i){var a;if(ve(e)){var t=e.match(d),o=e.substring(t[0].length),s=t[1]||t[3],c="?"===t[2];if("^^"===s?r=r.parent():a=(a=i&&i[o])&&a.instance,!a){var l="$"+o+"Controller";a=s?r.inheritedData(l):r.data(l)}if(!a&&!c)throw on("ctreq","Controller '{0}', required by directive '{1}', can't be found!",o,n)}else if(ye(e)){a=[];for(var u=0,f=e.length;u<f;u++)a[u]=J(n,e[u],r,i)}else be(e)&&(a={},fe(e,function(e,t){a[t]=J(n,e,r,i)}));return a||null}function ee(e,t,n){for(var r=0,i=e.length;r<i;r++)e[r]=he(e[r],{$$isolateScope:t,$$newScope:n})}function O(e,t,n,r,i,a,o){if(t===i)return null;var s=null;if(p.hasOwnProperty(t))for(var c,l=h.get(t+m),u=0,f=l.length;u<f;u++)if(c=l[u],(ge(r)||r>c.priority)&&-1!==c.restrict.indexOf(n)){if(a&&(c=he(c,{$$start:a,$$end:o})),!c.$$bindings){var d=c.$$bindings=g(c,c.name);be(d.isolateScope)&&(c.$$isolateBindings=d.isolateScope)}e.push(c),s=c}return s}function R(e){if(p.hasOwnProperty(e))for(var t=h.get(e+m),n=0,r=t.length;n<r;n++)if(t[n].multiElement)return!0;return!1}function te(n,r){var i=r.$attr,a=n.$attr;fe(n,function(e,t){"$"!==t.charAt(0)&&(r[t]&&r[t]!==e&&(e+=("style"===t?";":" ")+r[t]),n.$set(t,e,!0,i[t]))}),fe(r,function(e,t){n.hasOwnProperty(t)||"$"===t.charAt(0)||(n[t]=e,"class"!==t&&"style"!==t&&(a[t]=i[t]))})}function ne(d,h,p,m,g,_,b,v){var y,w,C=[],A=h[0],S=d.shift(),T=he(S,{templateUrl:null,transclude:null,replace:null,$$originalDirective:S}),x=we(S.templateUrl)?S.templateUrl(h,p):S.templateUrl,k=S.templateNamespace;return h.empty(),e(x).then(function(e){var n,t,r,i;if(e=V(e),S.replace){if(r=rt(e)?[]:hn(ie(k,Se(e))),n=r[0],1!==r.length||n.nodeType!==Re)throw on("tplrt","Template for directive '{0}' must have exactly one root element. {1}",S.name,x);t={$attr:{}},ae(m,h,n);var a=K(n,[],t);be(S.scope)&&ee(a,!0),d=a.concat(d),te(p,t)}else n=A,h.html(e);for(d.unshift(T),y=$(d,n,p,g,h,S,_,b,v),fe(m,function(e,t){e===n&&(m[t]=h[0])}),w=P(h[0].childNodes,g);C.length;){var o=C.shift(),s=C.shift(),c=C.shift(),l=C.shift(),u=h[0];if(!o.$$destroyed){if(s!==A){var f=s.className;v.hasElementTranscludeDirective&&S.replace||(u=lt(n)),ae(c,ue(s),u),E(ue(u),f)}i=y.transcludeOnThisElement?M(o,y.transclude,l):l,y(w,o,u,m,i)}}C=null}),function(e,t,n,r,i){var a=i;t.$$destroyed||(C?C.push(t,n,r,a):(y.transcludeOnThisElement&&(a=M(t,y.transclude,i)),y(w,t,n,r,a)))}}function N(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function re(e,t,n,r){function i(e){return e?" (module: "+e+")":""}if(t)throw on("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",t.name,i(t.$$moduleName),n.name,i(n.$$moduleName),e,Ie(r))}function ie(e,t){switch(e=S(e||"html")){case"svg":case"math":var n=j.document.createElement("div");return n.innerHTML="<"+e+">"+t+"</"+e+">",n.childNodes[0].childNodes;default:return t}}function L(e,t,a,o,n){var s=function(e,t){if("srcdoc"===t)return i.HTML;var n=Te(e);if("src"===t||"ngSrc"===t){if(-1===["img","video","audio","source","track"].indexOf(n))return i.RESOURCE_URL}else if("xlinkHref"===t||"form"===n&&"action"===t)return i.RESOURCE_URL}(e,o),r=!n,c=u[o]||n,l=T(a,r,s,c);if(l){if("multiple"===o&&"select"===Te(e))throw on("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",Ie(e));t.push({priority:100,compile:function(){return{pre:function(e,t,n){var r=n.$$observers||(n.$$observers=Oe());if(f.test(o))throw on("nodomevents","Interpolations for HTML DOM event attributes are disallowed.  Please use the ng- versions (such as ng-click instead of onclick) instead.");var i=n[o];i!==a&&(l=i&&T(i,!0,s,c),a=i),l&&(n[o]=l(e),(r[o]||(r[o]=[])).$$inter=!0,(n.$$observers&&n.$$observers[o].$$scope||e).$watch(l,function(e,t){"class"===o&&e!==t?n.$updateClass(e,t):n.$set(o,e)}))}}}})}}function ae(e,t,n){var r,i,a=t[0],o=t.length,s=a.parentNode;if(e)for(r=0,i=e.length;r<i;r++)if(e[r]===a){e[r++]=n;for(var c=r,l=c+o-1,u=e.length;c<u;c++,l++)l<u?e[c]=e[l]:delete e[c];e.length-=o-1,e.context===a&&(e.context=n);break}s&&s.replaceChild(n,a);var f=j.document.createDocumentFragment();for(r=0;r<o;r++)f.appendChild(t[r]);for(ue.hasData(a)&&(ue.data(n,ue.data(a)),ue(a).off("$destroy")),ue.cleanData(f.querySelectorAll("*")),r=1;r<o;r++)delete t[r];t[0]=n,t.length=1}function oe(e,t){return de(function(){return e.apply(null,arguments)},e,t)}function se(e,t,n,r,i,a){try{e(t,n,r,i,a)}catch(e){W(e,Ie(n))}}function ce(d,h,p,e,m){var r,g=[],_={};function b(e,t,n){!we(p.$onChanges)||t===n||t!=t&&n!=n||(s||(d.$$postDigest(c),s=[]),r||(r={},s.push(i)),r[e]&&(n=r[e].previousValue),r[e]=new ln(n,t))}function i(){p.$onChanges(r),r=void 0}return fe(e,function(e,n){var t,r,i,a,o,s=e.attrName,c=e.optional;switch(e.mode){case"@":c||B.call(h,s)||(p[n]=h[s]=void 0),o=h.$observe(s,function(e){if(ve(e)||Ae(e)){var t=p[n];b(n,e,t),p[n]=e}}),h.$$observers[s].$$scope=d,ve(t=h[s])?p[n]=T(t)(d):Ae(t)&&(p[n]=t),_[n]=new ln(sn,p[n]),g.push(o);break;case"=":if(!B.call(h,s)){if(c)break;h[s]=void 0}if(c&&!h[s])break;r=v(h[s]),a=r.literal?ke:function(e,t){return e===t||e!=e&&t!=t},i=r.assign||function(){throw t=p[n]=r(d),on("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",h[s],s,m.name)},t=p[n]=r(d);var l=function(e){return a(e,p[n])||(a(e,t)?i(d,e=p[n]):p[n]=e),t=e};l.$stateful=!0,o=e.collection?d.$watchCollection(h[s],l):d.$watch(v(h[s],l),null,r.literal),g.push(o);break;case"<":if(!B.call(h,s)){if(c)break;h[s]=void 0}if(c&&!h[s])break;var u=(r=v(h[s])).literal,f=p[n]=r(d);_[n]=new ln(sn,p[n]),o=d.$watch(r,function(e,t){if(t===e){if(t===f||u&&ke(t,f))return;t=f}b(n,e,t),p[n]=e},u),g.push(o);break;case"&":if((r=h.hasOwnProperty(s)?v(h[s]):pe)===pe&&c)break;p[n]=function(e){return r(d,e)}}}),{initialChanges:_,removeWatches:g.length&&function(){for(var e=0,t=g.length;e<t;++e)g[e]()}}}}]}function ln(e,t){this.previousValue=e,this.currentValue=t}cn.$inject=["$provide","$$sanitizeUriProvider"],ln.prototype.isFirstChange=function(){return this.previousValue===sn};var un=/^((?:x|data)[:\-_])/i;function fn(e){return Xe(e.replace(un,""))}function dn(e,t){var n="",r=e.split(/\s+/),i=t.split(/\s+/);e:for(var a=0;a<r.length;a++){for(var o=r[a],s=0;s<i.length;s++)if(o===i[s])continue e;n+=(0<n.length?" ":"")+o}return n}function hn(e){var t=(e=ue(e)).length;if(t<=1)return e;for(;t--;){var n=e[t];(n.nodeType===Le||n.nodeType===Ne&&""===n.nodeValue.trim())&&r.call(e,t,1)}return e}var pn=w("$controller"),mn=/^(\S+)(\s+as\s+([\w$]+))?$/;function gn(){var d={},h=!1;this.has=function(e){return d.hasOwnProperty(e)},this.register=function(e,t){ce(e,"controller"),be(e)?de(d,e):d[e]=t},this.allowGlobals=function(){h=!0},this.$get=["$injector","$window",function(l,u){return function(t,n,e,r){var i,a,o,s;if(e=!0===e,r&&ve(r)&&(s=r),ve(t)){if(!(a=t.match(mn)))throw pn("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",t);if(o=a[1],s=s||a[3],!(t=d.hasOwnProperty(o)?d[o]:le(n.$scope,o,!0)||(h?le(u,o,!0):void 0)))throw pn("ctrlreg","The controller with the name '{0}' is not registered.",o);se(t,o,!0)}if(e){var c=(ye(t)?t[t.length-1]:t).prototype;return i=Object.create(c||null),s&&f(n,s,i,o||t.name),de(function(){var e=l.invoke(t,i,n,o);return e!==i&&(be(e)||we(e))&&(i=e,s&&f(n,s,i,o||t.name)),i},{instance:i,identifier:s})}return i=l.instantiate(t,n,o),s&&f(n,s,i,o||t.name),i};function f(e,t,n,r){if(!e||!be(e.$scope))throw w("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",r,t);e.$scope[t]=n}}]}function _n(){this.$get=["$window",function(e){return ue(e.document)}]}function bn(){this.$get=["$log",function(n){return function(e,t){n.error.apply(n,arguments)}}]}var vn=function(){this.$get=["$document",function(t){return function(e){return e?!e.nodeType&&e instanceof ue&&(e=e[0]):e=t[0].body,e.offsetWidth+1}}]},yn="application/json",wn={"Content-Type":yn+";charset=utf-8"},Cn=/^\[|^\{(?!\{)/,An={"[":/]$/,"{":/}$/},Sn=/^\)]\}',?\n/,Tn=w("$http"),xn=function(e){return function(){throw Tn("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",e)}};function kn(e){return be(e)?A(e)?e.toISOString():G(e):e}function En(){this.$get=function(){return function(e){if(!e)return"";var n=[];return d(e,function(e,t){null===e||ge(e)||(ye(e)?fe(e,function(e){n.push(Z(t)+"="+Z(kn(e)))}):n.push(Z(t)+"="+Z(kn(e))))}),n.join("&")}}}function Dn(){this.$get=function(){return function(e){if(!e)return"";var t=[];return function n(e,r,i){if(null===e||ge(e))return;ye(e)?fe(e,function(e,t){n(e,r+"["+(be(e)?t:"")+"]")}):be(e)&&!A(e)?d(e,function(e,t){n(e,r+(i?"":"[")+t+(i?"":"]"))}):t.push(Z(r)+"="+Z(kn(e)))}(e,"",!0),t.join("&")}}}function In(e,t){if(ve(e)){var n=e.replace(Sn,"").trim();if(n){var r=t("Content-Type");(r&&0===r.indexOf(yn)||(a=(i=n).match(Cn))&&An[a[0]].test(i))&&(e=W(n))}}var i,a;return e}function Pn(e){var t,n=Oe();function r(e,t){e&&(n[e]=n[e]?n[e]+", "+t:t)}return ve(e)?fe(e.split("\n"),function(e){t=e.indexOf(":"),r(S(Se(e.substr(0,t))),Se(e.substr(t+1)))}):be(e)&&fe(e,function(e,t){r(S(t),Se(e))}),n}function Mn(n){var r;return function(e){if(r||(r=Pn(n)),e){var t=r[S(e)];return void 0===t&&(t=null),t}return r}}function $n(t,n,r,e){return we(e)?e(t,n,r):(fe(e,function(e){t=e(t,n,r)}),t)}function On(e){return 200<=e&&e<300}function Rn(){var v=this.defaults={transformResponse:[In],transformRequest:[function(e){return be(e)&&(r=e,"[object File]"!==H.call(r))&&(n=e,"[object Blob]"!==H.call(n))&&(t=e,"[object FormData]"!==H.call(t))?G(e):e;var t,n,r}],headers:{common:{Accept:"application/json, text/plain, */*"},post:je(wn),put:je(wn),patch:je(wn)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},y=!1;this.useApplyAsync=function(e){return _e(e)?(y=!!e,this):y};var l=!0;this.useLegacyPromiseExtensions=function(e){return _e(e)?(l=!!e,this):l};var t=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(h,p,e,m,g,s){var _=e("$http");v.paramSerializer=ve(v.paramSerializer)?s.get(v.paramSerializer):v.paramSerializer;var c=[];function b(e){if(!be(e))throw w("$http")("badreq","Http request configuration must be an object.  Received: {0}",e);if(!ve(e.url))throw w("$http")("badreq","Http request configuration url must be a string.  Received: {0}",e.url);var n=de({method:"get",transformRequest:v.transformRequest,transformResponse:v.transformResponse,paramSerializer:v.paramSerializer},e);n.headers=function(e){var t,n,r,i=v.headers,a=de({},e.headers);i=de({},i.common,i[S(e.method)]);e:for(t in i){for(r in n=S(t),a)if(S(r)===n)continue e;a[t]=i[t]}return o=a,s=je(e),l={},fe(o,function(e,t){we(e)?null!=(c=e(s))&&(l[t]=c):l[t]=e}),l;var o,s,c,l}(e),n.method=u(n.method),n.paramSerializer=ve(n.paramSerializer)?s.get(n.paramSerializer):n.paramSerializer;var t=[],r=[],i=g.when(n);return fe(c,function(e){(e.request||e.requestError)&&t.unshift(e.request,e.requestError),(e.response||e.responseError)&&r.push(e.response,e.responseError)}),i=a(i=(i=a(i,t)).then(function(e){var n=e.headers,t=$n(e.data,Mn(n),void 0,e.transformRequest);ge(t)&&fe(n,function(e,t){"content-type"===S(t)&&delete n[t]});ge(e.withCredentials)&&!ge(v.withCredentials)&&(e.withCredentials=v.withCredentials);return function(i,e){var a,t,o=g.defer(),n=o.promise,r=i.headers,s=function(e,t){0<t.length&&(e+=(-1===e.indexOf("?")?"?":"&")+t);return e}(i.url,i.paramSerializer(i.params));b.pendingRequests.push(i),n.then(d,d),!i.cache&&!v.cache||!1===i.cache||"GET"!==i.method&&"JSONP"!==i.method||(a=be(i.cache)?i.cache:be(v.cache)?v.cache:_);a&&(_e(t=a.get(s))?I(t)?t.then(f,f):ye(t)?u(t[1],t[0],je(t[2]),t[3]):u(t,200,{},"OK"):a.put(s,n));if(ge(t)){var c=di(i.url)?p()[i.xsrfCookieName||v.xsrfCookieName]:void 0;c&&(r[i.xsrfHeaderName||v.xsrfHeaderName]=c),h(i.method,s,e,function(e,t,n,r){a&&(On(e)?a.put(s,[e,t,Pn(n),r]):a.remove(s));function i(){u(t,e,n,r)}y?m.$applyAsync(i):(i(),m.$$phase||m.$apply())},r,i.timeout,i.withCredentials,i.responseType,l(i.eventHandlers),l(i.uploadEventHandlers))}return n;function l(e){if(e){var t={};return fe(e,function(n,e){t[e]=function(e){function t(){n(e)}y?m.$applyAsync(t):m.$$phase?t():m.$apply(t)}}),t}}function u(e,t,n,r){(On(t=-1<=t?t:0)?o.resolve:o.reject)({data:e,status:t,headers:Mn(n),config:i,statusText:r})}function f(e){u(e.data,e.status,je(e.headers()),e.statusText)}function d(){var e=b.pendingRequests.indexOf(i);-1!==e&&b.pendingRequests.splice(e,1)}}(e,t).then(o,o)}),r),l?(i.success=function(t){return se(t,"fn"),i.then(function(e){t(e.data,e.status,e.headers,n)}),i},i.error=function(t){return se(t,"fn"),i.then(null,function(e){t(e.data,e.status,e.headers,n)}),i}):(i.success=xn("success"),i.error=xn("error")),i;function a(e,t){for(var n=0,r=t.length;n<r;){var i=t[n++],a=t[n++];e=e.then(i,a)}return t.length=0,e}function o(e){var t=de({},e);return t.data=$n(e.data,e.headers,e.status,n.transformResponse),On(e.status)?t:g.reject(t)}}return fe(t,function(e){c.unshift(ve(e)?s.get(e):s.invoke(e))}),b.pendingRequests=[],function(e){fe(arguments,function(n){b[n]=function(e,t){return b(de({},t||{},{method:n,url:e}))}})}("get","delete","head","jsonp"),function(e){fe(arguments,function(r){b[r]=function(e,t,n){return b(de({},n||{},{method:r,url:e,data:t}))}})}("post","put","patch"),b.defaults=v,b}]}function Nn(){this.$get=function(){return function(){return new j.XMLHttpRequest}}}function Ln(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(e,t,n,r){return b=r,v=(_=e).defer,y=t,w=n[0],function(e,r,t,i,n,a,o,s,c,l){if(_.$$incOutstandingRequestCount(),r=r||_.url(),"jsonp"===S(e))var u=y.createCallback(r),f=function(e,r,i){e=e.replace("JSON_CALLBACK",r);var a=w.createElement("script"),o=null;return a.type="text/javascript",a.src=e,a.async=!0,o=function(e){ze(a,"load",o),ze(a,"error",o),w.body.removeChild(a),a=null;var t=-1,n="unknown";e&&("load"!==e.type||y.wasCalled(r)||(e={type:"error"}),n=e.type,t="error"===e.type?404:200),i&&i(t,n)},qe(a,"load",o),qe(a,"error",o),w.body.appendChild(a),o}(r,u,function(e,t){var n=200===e&&y.getResponse(u);g(i,e,n,"",t),y.removeCallback(u)});else{var d=b(e,r);d.open(e,r,!0),fe(n,function(e,t){_e(e)&&d.setRequestHeader(t,e)}),d.onload=function(){var e=d.statusText||"",t="response"in d?d.response:d.responseText,n=1223===d.status?204:d.status;0===n&&(n=t?200:"file"===fi(r).protocol?404:0),g(i,n,t,d.getAllResponseHeaders(),e)};var h=function(){g(i,-1,null,null,"")};if(d.onerror=h,d.onabort=h,d.ontimeout=h,fe(c,function(e,t){d.addEventListener(t,e)}),fe(l,function(e,t){d.upload.addEventListener(t,e)}),o&&(d.withCredentials=!0),s)try{d.responseType=s}catch(e){if("json"!==s)throw e}d.send(ge(t)?null:t)}if(0<a)var p=v(m,a);else I(a)&&a.then(m);function m(){f&&f(),d&&d.abort()}function g(e,t,n,r,i){_e(p)&&v.cancel(p),f=d=null,e(t,n,r,i),_.$$completeOutstandingRequest(pe)}};var _,b,v,y,w}]}var Fn=v.$interpolateMinErr=w("$interpolate");function Gn(){var S="{{",T="}}";this.startSymbol=function(e){return e?(S=e,this):S},this.endSymbol=function(e){return e?(T=e,this):T},this.$get=["$parse","$exceptionHandler","$sce",function(_,b,v){var y=S.length,w=T.length,t=new RegExp(S.replace(/./g,e),"g"),n=new RegExp(T.replace(/./g,e),"g");function e(e){return"\\\\\\"+e}function C(e){return e.replace(t,S).replace(n,T)}function A(e,t,n,r){var i=e.$watch(function(e){return i(),r(e)},t,n);return i}function r(i,e,t,r){if(!i.length||-1===i.indexOf(S)){var n;if(!e)(n=x(C(i))).exp=i,n.expressions=[],n.$$watchDelegate=A;return n}r=!!r;for(var a,o,s,c=0,l=[],u=[],f=i.length,d=[],h=[];c<f;){if(-1===(a=i.indexOf(S,c))||-1===(o=i.indexOf(T,a+y))){c!==f&&d.push(C(i.substring(c)));break}c!==a&&d.push(C(i.substring(c,a))),s=i.substring(a+y,o),l.push(s),u.push(_(s,g)),c=o+w,h.push(d.length),d.push("")}if(t&&1<d.length&&Fn.throwNoconcat(i),!e||l.length){var p=function(e){for(var t=0,n=l.length;t<n;t++){if(r&&ge(e[t]))return;d[h[t]]=e[t]}return d.join("")},m=function(e){return t?v.getTrusted(t,e):v.valueOf(e)};return de(function(e){var t=0,n=l.length,r=new Array(n);try{for(;t<n;t++)r[t]=u[t](e);return p(r)}catch(e){b(Fn.interr(i,e))}},{exp:i,expressions:l,$$watchDelegate:function(r,i){var a;return r.$watchGroup(u,function(e,t){var n=p(e);we(i)&&i.call(this,n,e!==t?a:n,r),a=n})}})}function g(e){try{return e=m(e),r&&!_e(e)?e:function(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=G(e)}return e}(e)}catch(e){b(Fn.interr(i,e))}}}return r.startSymbol=function(){return S},r.endSymbol=function(){return T},r}]}function jn(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(h,p,m,g,_){var b={};function e(e,t,n,r){var i=4<arguments.length,a=i?Ee(arguments,4):[],o=p.setInterval,s=p.clearInterval,c=0,l=_e(r)&&!r,u=(l?g:m).defer(),f=u.promise;return n=_e(n)?n:0,f.$$intervalId=o(function(){l?_.defer(d):h.$evalAsync(d),u.notify(c++),0<n&&n<=c&&(u.resolve(c),s(f.$$intervalId),delete b[f.$$intervalId]),l||h.$apply()},t),b[f.$$intervalId]=u,f;function d(){i?e.apply(null,a):e(c)}}return e.cancel=function(e){return!!(e&&e.$$intervalId in b)&&(b[e.$$intervalId].reject("canceled"),p.clearInterval(e.$$intervalId),delete b[e.$$intervalId],!0)},e}]}Fn.throwNoconcat=function(e){throw Fn("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required.  See http://docs.angularjs.org/api/ng.$sce",e)},Fn.interr=function(e,t){return Fn("interr","Can't interpolate: {0}\n{1}",e,t.toString())};var Bn=function(){this.$get=["$window",function(e){var a=e.angular.callbacks,o={};return{createCallback:function(e){var t,n="_"+(a.$$counter++).toString(36),r="angular.callbacks."+n,i=((t=function(e){t.data=e,t.called=!0}).id=n,t);return o[r]=a[n]=i,r},wasCalled:function(e){return o[e].called},getResponse:function(e){return o[e].data},removeCallback:function(e){var t=o[e];delete a[t.id],delete o[e]}}}]},Un=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,Hn={http:80,https:443,ftp:21},Wn=w("$location");function qn(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=X(t[n]);return t.join("/")}function zn(e,t){var n=fi(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=m(n.port)||Hn[n.protocol]||null}var Vn=/^\s*[\\/]{2,}/;function Yn(e,t){if(Vn.test(e))throw Wn("badpath",'Invalid url "{0}".',e);var n="/"!==e.charAt(0);n&&(e="/"+e);var r=fi(e);t.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=K(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!==t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function Kn(e,t){return e.slice(0,t.length)===t}function Qn(e,t){if(Kn(t,e))return t.substr(e.length)}function Xn(e){var t=e.indexOf("#");return-1===t?e:e.substr(0,t)}function Zn(e){return e.replace(/(#.+)|#$/,"$1")}function Jn(a,o,s){this.$$html5=!0,s=s||"",zn(a,this),this.$$parse=function(e){var t=Qn(o,e);if(!ve(t))throw Wn("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,o);Yn(t,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=Q(this.$$search),t=this.$$hash?"#"+X(this.$$hash):"";this.$$url=qn(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=o+this.$$url.substr(1)},this.$$parseLinkUrl=function(e,t){return t&&"#"===t[0]?(this.hash(t.slice(1)),!0):(_e(n=Qn(a,e))?(r=n,i=s&&_e(n=Qn(s,n))?o+(Qn("/",n)||n):a+r):_e(n=Qn(o,e))?i=o+n:o===e+"/"&&(i=o),i&&this.$$parse(i),!!i);var n,r,i}}function er(r,i,a){zn(r,this),this.$$parse=function(e){var t,n=Qn(r,e)||Qn(i,e);ge(n)||"#"!==n.charAt(0)?this.$$html5?t=n:(t="",ge(n)&&(r=e,this.replace())):ge(t=Qn(a,n))&&(t=n),Yn(t,this),this.$$path=function(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;Kn(t,n)&&(t=t.replace(n,""));if(i.exec(t))return e;return(r=i.exec(e))?r[1]:e}(this.$$path,t,r),this.$$compose()},this.$$compose=function(){var e=Q(this.$$search),t=this.$$hash?"#"+X(this.$$hash):"";this.$$url=qn(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=r+(this.$$url?a+this.$$url:"")},this.$$parseLinkUrl=function(e,t){return Xn(r)===Xn(e)&&(this.$$parse(e),!0)}}function tr(i,a,o){this.$$html5=!0,er.apply(this,arguments),this.$$parseLinkUrl=function(e,t){return t&&"#"===t[0]?(this.hash(t.slice(1)),!0):(i===Xn(e)?n=e:(r=Qn(a,e))?n=i+o+r:a===e+"/"&&(n=a),n&&this.$$parse(n),!!n);var n,r},this.$$compose=function(){var e=Q(this.$$search),t=this.$$hash?"#"+X(this.$$hash):"";this.$$url=qn(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=i+o+this.$$url}}var nr={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:rr("$$absUrl"),url:function(e){if(ge(e))return this.$$url;var t=Un.exec(e);return(t[1]||""===e)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:rr("$$protocol"),host:rr("$$host"),port:rr("$$port"),path:ir("$$path",function(e){return"/"===(e=null!==e?e.toString():"").charAt(0)?e:"/"+e}),search:function(n,e){switch(arguments.length){case 0:return this.$$search;case 1:if(ve(n)||C(n))n=n.toString(),this.$$search=K(n);else{if(!be(n))throw Wn("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");fe(n=R(n,{}),function(e,t){null==e&&delete n[t]}),this.$$search=n}break;default:ge(e)||null===e?delete this.$$search[n]:this.$$search[n]=e}return this.$$compose(),this},hash:ir("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};function rr(e){return function(){return this[e]}}function ir(t,n){return function(e){return ge(e)?this[t]:(this[t]=n(e),this.$$compose(),this)}}function ar(){var _="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(e){return _e(e)?(_=e,this):_},this.html5Mode=function(e){return Ae(e)?(b.enabled=e,this):be(e)?(Ae(e.enabled)&&(b.enabled=e.enabled),Ae(e.requireBase)&&(b.requireBase=e.requireBase),(Ae(e.rewriteLinks)||ve(e.rewriteLinks))&&(b.rewriteLinks=e.rewriteLinks),this):b},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(o,s,t,a,c){var l,e,n,r,i=s.baseHref(),u=s.url();if(b.enabled){if(!i&&b.requireBase)throw Wn("nobase","$location in HTML5 mode requires a <base> tag to be present!");n=(r=u).substring(0,r.indexOf("/",r.indexOf("//")+2))+(i||"/"),e=t.history?Jn:tr}else n=Xn(u),e=er;var f,d=(f=n).substr(0,Xn(f).lastIndexOf("/")+1);(l=new e(n,d,"#"+_)).$$parseLinkUrl(u,u),l.$$state=s.state();var h=/^\s*(javascript|mailto):/i;function p(e,t,n){var r=l.url(),i=l.$$state;try{s.url(e,t,n),l.$$state=s.state()}catch(e){throw l.url(r),l.$$state=i,e}}a.on("click",function(e){var t=b.rewriteLinks;if(t&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!==e.which&&2!==e.button){for(var n=ue(e.target);"a"!==Te(n[0]);)if(n[0]===a[0]||!(n=n.parent())[0])return;if(!ve(t)||!ge(n.attr(t))){var r=n.prop("href"),i=n.attr("href")||n.attr("xlink:href");be(r)&&"[object SVGAnimatedString]"===r.toString()&&(r=fi(r.animVal).href),h.test(r)||!r||n.attr("target")||e.isDefaultPrevented()||l.$$parseLinkUrl(r,i)&&(e.preventDefault(),l.absUrl()!==s.url()&&(o.$apply(),c.angular["ff-684208-preventDefault"]=!0))}}}),Zn(l.absUrl())!==Zn(u)&&s.url(l.absUrl(),!0);var m=!0;return s.onUrlChange(function(r,i){ge(Qn(d,r))?c.location.href=r:(o.$evalAsync(function(){var e,t=l.absUrl(),n=l.$$state;r=Zn(r),l.$$parse(r),l.$$state=i,e=o.$broadcast("$locationChangeStart",r,t,i,n).defaultPrevented,l.absUrl()===r&&(e?(l.$$parse(t),p(t,!1,l.$$state=n)):(m=!1,g(t,n)))}),o.$$phase||o.$digest())}),o.$watch(function(){var n=Zn(s.url()),e=Zn(l.absUrl()),r=s.state(),i=l.$$replace,a=n!==e||l.$$html5&&t.history&&r!==l.$$state;(m||a)&&(m=!1,o.$evalAsync(function(){var e=l.absUrl(),t=o.$broadcast("$locationChangeStart",e,n,l.$$state,r).defaultPrevented;l.absUrl()===e&&(t?(l.$$parse(n),l.$$state=r):(a&&p(e,i,r===l.$$state?null:l.$$state),g(n,r)))})),l.$$replace=!1}),l;function g(e,t){o.$broadcast("$locationChangeSuccess",l.absUrl(),e,l.$$state,t)}}]}function or(){var n=!0,r=this;this.debugEnabled=function(e){return _e(e)?(n=e,this):n},this.$get=["$window",function(i){return{log:t("log"),info:t("info"),warn:t("warn"),error:t("error"),debug:(e=t("debug"),function(){n&&e.apply(r,arguments)})};var e;function t(e){var t=i.console||{},r=t[e]||t.log||pe,n=!1;try{n=!!r.apply}catch(e){}return n?function(){var n=[];return fe(arguments,function(e){var t;n.push(((t=e)instanceof Error&&(t.stack?t=t.message&&-1===t.stack.indexOf(t.message)?"Error: "+t.message+"\n"+t.stack:t.stack:t.sourceURL&&(t=t.message+"\n"+t.sourceURL+":"+t.line)),t))}),r.apply(t,n)}:function(e,t){r(e,null==t?"":t)}}}]}fe([tr,er,Jn],function(t){t.prototype=Object.create(nr),t.prototype.state=function(e){if(!arguments.length)return this.$$state;if(t!==Jn||!this.$$html5)throw Wn("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=ge(e)?null:e,this}});var sr=w("$parse"),cr=[].constructor,lr=(!1).constructor,ur=Function.constructor,fr=(0).constructor,dr={}.constructor,hr="".constructor,pr=cr.prototype,mr=lr.prototype,gr=ur.prototype,_r=fr.prototype,br=dr.prototype,vr=hr.prototype,yr=gr.call,wr=gr.apply,Cr=gr.bind,Ar=br.valueOf;function Sr(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw sr("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function Tr(e){return e+""}function xr(e,t){if(e){if(e.constructor===e)throw sr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw sr("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw sr("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw sr("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function kr(e,t){if(e){if(e.constructor===e)throw sr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===yr||e===wr||e===Cr)throw sr("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function Er(e,t){if(e&&(e===cr||e===lr||e===ur||e===fr||e===dr||e===hr||e===pr||e===mr||e===gr||e===_r||e===br||e===vr))throw sr("isecaf","Assigning to a constructor or its prototype is disallowed! Expression: {0}",t)}var Dr=Oe();fe("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){Dr[e]=!0});var Ir={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Pr=function(e){this.options=e};Pr.prototype={constructor:Pr,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index<this.text.length;){var t=this.text.charAt(this.index);if('"'===t||"'"===t)this.readString(t);else if(this.isNumber(t)||"."===t&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(t,"(){}[].,;:?"))this.tokens.push({index:this.index,text:t}),this.index++;else if(this.isWhitespace(t))this.index++;else{var n=t+this.peek(),r=n+this.peek(2),i=Dr[t],a=Dr[n],o=Dr[r];if(i||a||o){var s=o?r:a?n:t;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(e,t){return-1!==t.indexOf(e)},peek:function(e){var t=e||1;return this.index+t<this.text.length&&this.text.charAt(this.index+t)},isNumber:function(e){return"0"<=e&&e<="9"&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||"\t"===e||"\n"===e||"\v"===e||" "===e},isIdentifierStart:function(e){return this.options.isIdentifierStart?this.options.isIdentifierStart(e,this.codePointAt(e)):this.isValidIdentifierStart(e)},isValidIdentifierStart:function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"===e||"$"===e},isIdentifierContinue:function(e){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(e,this.codePointAt(e)):this.isValidIdentifierContinue(e)},isValidIdentifierContinue:function(e,t){return this.isValidIdentifierStart(e,t)||this.isNumber(e)},codePointAt:function(e){return 1===e.length?e.charCodeAt(0):(e.charCodeAt(0)<<10)+e.charCodeAt(1)-56613888},peekMultichar:function(){var e=this.text.charAt(this.index),t=this.peek();if(!t)return e;var n=e.charCodeAt(0),r=t.charCodeAt(0);return 55296<=n&&n<=56319&&56320<=r&&r<=57343?e+t:e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var r=_e(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw sr("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,r,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=S(this.text.charAt(this.index));if("."===n||this.isNumber(n))e+=n;else{var r=this.peek();if("e"===n&&this.isExpOperator(r))e+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"===e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!==e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:t,text:e,constant:!0,value:Number(e)})},readIdent:function(){var e=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var t=this.peekMultichar();if(!this.isIdentifierContinue(t))break;this.index+=t.length}this.tokens.push({index:e,text:this.text.slice(e,this.index),identifier:!0})},readString:function(e){var t=this.index;this.index++;for(var n="",r=e,i=!1;this.index<this.text.length;){var a=this.text.charAt(this.index);if(r+=a,i){if("u"===a){var o=this.text.substring(this.index+1,this.index+5);o.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+o+"]"),this.index+=4,n+=String.fromCharCode(parseInt(o,16))}else{n+=Ir[a]||a}i=!1}else if("\\"===a)i=!0;else{if(a===e)return this.index++,void this.tokens.push({index:t,text:r,constant:!0,value:n});n+=a}this.index++}this.throwError("Unterminated quote",t)}};var Mr=function(e,t){this.lexer=e,this.options=t};function $r(e,t){return void 0!==e?e:t}function Or(e,t){return void 0===e?t:void 0===t?e:e+t}function Rr(e,t){var n,r,i,a,o;switch(e.type){case Mr.Program:n=!0,fe(e.body,function(e){Rr(e.expression,t),n=n&&e.expression.constant}),e.constant=n;break;case Mr.Literal:e.constant=!0,e.toWatch=[];break;case Mr.UnaryExpression:Rr(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case Mr.BinaryExpression:Rr(e.left,t),Rr(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case Mr.LogicalExpression:Rr(e.left,t),Rr(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case Mr.ConditionalExpression:Rr(e.test,t),Rr(e.alternate,t),Rr(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case Mr.Identifier:e.constant=!1,e.toWatch=[e];break;case Mr.MemberExpression:Rr(e.object,t),e.computed&&Rr(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case Mr.CallExpression:i=!!e.filter&&(a=t,o=e.callee.name,!a(o).$stateful),n=i,r=[],fe(e.arguments,function(e){Rr(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=i?r:[e];break;case Mr.AssignmentExpression:Rr(e.left,t),Rr(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case Mr.ArrayExpression:n=!0,r=[],fe(e.elements,function(e){Rr(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=r;break;case Mr.ObjectExpression:n=!0,r=[],fe(e.properties,function(e){Rr(e.value,t),n=n&&e.value.constant&&!e.computed,e.value.constant||r.push.apply(r,e.value.toWatch)}),e.constant=n,e.toWatch=r;break;case Mr.ThisExpression:case Mr.LocalsExpression:e.constant=!1,e.toWatch=[]}}function Nr(e){if(1===e.length){var t=e[0].expression,n=t.toWatch;return 1!==n.length?n:n[0]!==t?n:void 0}}function Lr(e){return e.type===Mr.Identifier||e.type===Mr.MemberExpression}function Fr(e){if(1===e.body.length&&Lr(e.body[0].expression))return{type:Mr.AssignmentExpression,left:e.body[0].expression,right:{type:Mr.NGValueParameter},operator:"="}}function Gr(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===Mr.Literal||e.body[0].expression.type===Mr.ArrayExpression||e.body[0].expression.type===Mr.ObjectExpression)}function jr(e){return e.constant}function Br(e,t){this.astBuilder=e,this.$filter=t}function Ur(e,t){this.astBuilder=e,this.$filter=t}Mr.Program="Program",Mr.ExpressionStatement="ExpressionStatement",Mr.AssignmentExpression="AssignmentExpression",Mr.ConditionalExpression="ConditionalExpression",Mr.LogicalExpression="LogicalExpression",Mr.BinaryExpression="BinaryExpression",Mr.UnaryExpression="UnaryExpression",Mr.CallExpression="CallExpression",Mr.MemberExpression="MemberExpression",Mr.Identifier="Identifier",Mr.Literal="Literal",Mr.ArrayExpression="ArrayExpression",Mr.Property="Property",Mr.ObjectExpression="ObjectExpression",Mr.ThisExpression="ThisExpression",Mr.LocalsExpression="LocalsExpression",Mr.NGValueParameter="NGValueParameter",Mr.prototype={ast:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t},program:function(){for(var e=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:Mr.Program,body:e}},expressionStatement:function(){return{type:Mr.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e=this.expression();this.expect("|");)e=this.filter(e);return e},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();if(this.expect("=")){if(!Lr(e))throw sr("lval","Trying to assign a value to a non l-value");e={type:Mr.AssignmentExpression,left:e,right:this.assignment(),operator:"="}}return e},ternary:function(){var e,t,n=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:Mr.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:Mr.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:Mr.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:Mr.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:Mr.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:Mr.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:Mr.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:Mr.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e,t;for(this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?e=R(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?e={type:Mr.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());t=this.expect("(","[",".");)"("===t.text?(e={type:Mr.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:Mr.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:Mr.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],n={type:Mr.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return n},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)for(;e.push(this.filterChain()),this.expect(","););return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:Mr.Identifier,name:e.text}},constant:function(){return{type:Mr.Literal,value:this.consume().value}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:Mr.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:Mr.Property,kind:"init"},this.peek().constant?(e.key=this.constant(),e.computed=!1,this.consume(":"),e.value=this.expression()):this.peek().identifier?(e.key=this.identifier(),e.computed=!1,this.peek(":")?(this.consume(":"),e.value=this.expression()):e.value=e.key):this.peek("[")?(this.consume("["),e.key=this.expression(),this.consume("]"),e.computed=!0,this.consume(":"),e.value=this.expression()):this.throwError("invalid key",this.peek()),t.push(e)}while(this.expect(","));return this.consume("}"),{type:Mr.ObjectExpression,properties:t}},throwError:function(e,t){throw sr("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(0===this.tokens.length)throw sr("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},peekToken:function(){if(0===this.tokens.length)throw sr("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,r){return this.peekAhead(0,e,t,n,r)},peekAhead:function(e,t,n,r,i){if(this.tokens.length>e){var a=this.tokens[e],o=a.text;if(o===t||o===n||o===r||o===i||!t&&!n&&!r&&!i)return a}return!1},expect:function(e,t,n,r){var i=this.peek(e,t,n,r);return!!i&&(this.tokens.shift(),i)},selfReferential:{this:{type:Mr.ThisExpression},$locals:{type:Mr.LocalsExpression}}},Br.prototype={compile:function(e,t){var i=this,n=this.astBuilder.ast(e);this.state={nextId:0,filters:{},expensiveChecks:t,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},Rr(n,i.$filter);var r,a="";if(this.stage="assign",r=Fr(n)){this.state.computing="assign";var o=this.nextId();this.recurse(r,o),this.return_(o),a="fn.assign="+this.generateFunction("assign","s,v,l")}var s=Nr(n.body);i.stage="inputs",fe(s,function(e,t){var n="fn"+t;i.state[n]={vars:[],body:[],own:{}},i.state.computing=n;var r=i.nextId();i.recurse(e,r),i.return_(r),i.state.inputs.push(n),e.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(n);var c='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+a+this.watchFns()+"return fn;",l=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",c)(this.$filter,Sr,xr,kr,Tr,Er,$r,Or,e);return this.state=this.stage=void 0,l.literal=Gr(n),l.constant=jr(n),l},USE:"use",STRICT:"strict",watchFns:function(){var t=[],e=this.state.inputs,n=this;return fe(e,function(e){t.push("var "+e+"="+n.generateFunction(e,"s"))}),e.length&&t.push("fn.inputs=["+e.join(",")+"];"),t.join("")},generateFunction:function(e,t){return"function("+t+"){"+this.varsPrefix(e)+this.body(e)+"};"},filterPrefix:function(){var n=[],r=this;return fe(this.state.filters,function(e,t){n.push(e+"=$filter("+r.escape(t)+")")}),n.length?"var "+n.join(",")+";":""},varsPrefix:function(e){return this.state[e].vars.length?"var "+this.state[e].vars.join(",")+";":""},body:function(e){return this.state[e].body.join("")},recurse:function(n,t,e,r,i,a){var o,s,c,l,u,f=this;if(r=r||pe,!a&&_e(n.watchId))return t=t||this.nextId(),void this.if_("i",this.lazyAssign(t,this.computedMember("i",n.watchId)),this.lazyRecurse(n,t,e,r,i,!0));switch(n.type){case Mr.Program:fe(n.body,function(e,t){f.recurse(e.expression,void 0,void 0,function(e){s=e}),t!==n.body.length-1?f.current().body.push(s,";"):f.return_(s)});break;case Mr.Literal:l=this.escape(n.value),this.assign(t,l),r(l);break;case Mr.UnaryExpression:this.recurse(n.argument,void 0,void 0,function(e){s=e}),l=n.operator+"("+this.ifDefined(s,0)+")",this.assign(t,l),r(l);break;case Mr.BinaryExpression:this.recurse(n.left,void 0,void 0,function(e){o=e}),this.recurse(n.right,void 0,void 0,function(e){s=e}),l="+"===n.operator?this.plus(o,s):"-"===n.operator?this.ifDefined(o,0)+n.operator+this.ifDefined(s,0):"("+o+")"+n.operator+"("+s+")",this.assign(t,l),r(l);break;case Mr.LogicalExpression:t=t||this.nextId(),f.recurse(n.left,t),f.if_("&&"===n.operator?t:f.not(t),f.lazyRecurse(n.right,t)),r(t);break;case Mr.ConditionalExpression:t=t||this.nextId(),f.recurse(n.test,t),f.if_(t,f.lazyRecurse(n.alternate,t),f.lazyRecurse(n.consequent,t)),r(t);break;case Mr.Identifier:t=t||this.nextId(),e&&(e.context="inputs"===f.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",n.name)+"?l:s"),e.computed=!1,e.name=n.name),Sr(n.name),f.if_("inputs"===f.stage||f.not(f.getHasOwnProperty("l",n.name)),function(){f.if_("inputs"===f.stage||"s",function(){i&&1!==i&&f.if_(f.not(f.nonComputedMember("s",n.name)),f.lazyAssign(f.nonComputedMember("s",n.name),"{}")),f.assign(t,f.nonComputedMember("s",n.name))})},t&&f.lazyAssign(t,f.nonComputedMember("l",n.name))),(f.state.expensiveChecks||Wr(n.name))&&f.addEnsureSafeObject(t),r(t);break;case Mr.MemberExpression:o=e&&(e.context=this.nextId())||this.nextId(),t=t||this.nextId(),f.recurse(n.object,o,void 0,function(){f.if_(f.notNull(o),function(){i&&1!==i&&f.addEnsureSafeAssignContext(o),n.computed?(s=f.nextId(),f.recurse(n.property,s),f.getStringValue(s),f.addEnsureSafeMemberName(s),i&&1!==i&&f.if_(f.not(f.computedMember(o,s)),f.lazyAssign(f.computedMember(o,s),"{}")),l=f.ensureSafeObject(f.computedMember(o,s)),f.assign(t,l),e&&(e.computed=!0,e.name=s)):(Sr(n.property.name),i&&1!==i&&f.if_(f.not(f.nonComputedMember(o,n.property.name)),f.lazyAssign(f.nonComputedMember(o,n.property.name),"{}")),l=f.nonComputedMember(o,n.property.name),(f.state.expensiveChecks||Wr(n.property.name))&&(l=f.ensureSafeObject(l)),f.assign(t,l),e&&(e.computed=!1,e.name=n.property.name))},function(){f.assign(t,"undefined")}),r(t)},!!i);break;case Mr.CallExpression:t=t||this.nextId(),n.filter?(s=f.filter(n.callee.name),c=[],fe(n.arguments,function(e){var t=f.nextId();f.recurse(e,t),c.push(t)}),l=s+"("+c.join(",")+")",f.assign(t,l),r(t)):(s=f.nextId(),o={},c=[],f.recurse(n.callee,s,o,function(){f.if_(f.notNull(s),function(){f.addEnsureSafeFunction(s),fe(n.arguments,function(e){f.recurse(e,f.nextId(),void 0,function(e){c.push(f.ensureSafeObject(e))})}),l=o.name?(f.state.expensiveChecks||f.addEnsureSafeObject(o.context),f.member(o.context,o.name,o.computed)+"("+c.join(",")+")"):s+"("+c.join(",")+")",l=f.ensureSafeObject(l),f.assign(t,l)},function(){f.assign(t,"undefined")}),r(t)}));break;case Mr.AssignmentExpression:s=this.nextId(),o={},this.recurse(n.left,void 0,o,function(){f.if_(f.notNull(o.context),function(){f.recurse(n.right,s),f.addEnsureSafeObject(f.member(o.context,o.name,o.computed)),f.addEnsureSafeAssignContext(o.context),l=f.member(o.context,o.name,o.computed)+n.operator+s,f.assign(t,l),r(t||l)})},1);break;case Mr.ArrayExpression:c=[],fe(n.elements,function(e){f.recurse(e,f.nextId(),void 0,function(e){c.push(e)})}),l="["+c.join(",")+"]",this.assign(t,l),r(l);break;case Mr.ObjectExpression:u=!(c=[]),fe(n.properties,function(e){e.computed&&(u=!0)}),u?(t=t||this.nextId(),this.assign(t,"{}"),fe(n.properties,function(e){e.computed?(o=f.nextId(),f.recurse(e.key,o)):o=e.key.type===Mr.Identifier?e.key.name:""+e.key.value,s=f.nextId(),f.recurse(e.value,s),f.assign(f.member(t,o,e.computed),s)})):(fe(n.properties,function(t){f.recurse(t.value,n.constant?void 0:f.nextId(),void 0,function(e){c.push(f.escape(t.key.type===Mr.Identifier?t.key.name:""+t.key.value)+":"+e)})}),l="{"+c.join(",")+"}",this.assign(t,l)),r(t||l);break;case Mr.ThisExpression:this.assign(t,"s"),r("s");break;case Mr.LocalsExpression:this.assign(t,"l"),r("l");break;case Mr.NGValueParameter:this.assign(t,"v"),r("v")}},getHasOwnProperty:function(e,t){var n=e+"."+t,r=this.current().own;return r.hasOwnProperty(n)||(r[n]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),r[n]},assign:function(e,t){if(e)return this.current().body.push(e,"=",t,";"),e},filter:function(e){return this.state.filters.hasOwnProperty(e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefined("+e+","+this.escape(t)+")"},plus:function(e,t){return"plus("+e+","+t+")"},return_:function(e){this.current().body.push("return ",e,";")},if_:function(e,t,n){if(!0===e)t();else{var r=this.current().body;r.push("if(",e,"){"),t(),r.push("}"),n&&(r.push("else{"),n(),r.push("}"))}},not:function(e){return"!("+e+")"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(t)?e+"."+t:e+'["'+t.replace(/[^$_a-zA-Z0-9]/g,this.stringEscapeFn)+'"]'},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,n){return n?this.computedMember(e,t):this.nonComputedMember(e,t)},addEnsureSafeObject:function(e){this.current().body.push(this.ensureSafeObject(e),";")},addEnsureSafeMemberName:function(e){this.current().body.push(this.ensureSafeMemberName(e),";")},addEnsureSafeFunction:function(e){this.current().body.push(this.ensureSafeFunction(e),";")},addEnsureSafeAssignContext:function(e){this.current().body.push(this.ensureSafeAssignContext(e),";")},ensureSafeObject:function(e){return"ensureSafeObject("+e+",text)"},ensureSafeMemberName:function(e){return"ensureSafeMemberName("+e+",text)"},ensureSafeFunction:function(e){return"ensureSafeFunction("+e+",text)"},getStringValue:function(e){this.assign(e,"getStringValue("+e+")")},ensureSafeAssignContext:function(e){return"ensureSafeAssignContext("+e+",text)"},lazyRecurse:function(e,t,n,r,i,a){var o=this;return function(){o.recurse(e,t,n,r,i,a)}},lazyAssign:function(e,t){var n=this;return function(){n.assign(e,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},escape:function(e){if(ve(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(C(e))return e.toString();if(!0===e)return"true";if(!1===e)return"false";if(null===e)return"null";if(void 0===e)return"undefined";throw sr("esc","IMPOSSIBLE")},nextId:function(e,t){var n="v"+this.state.nextId++;return e||this.current().vars.push(n+(t?"="+t:"")),n},current:function(){return this.state[this.state.computing]}},Ur.prototype={compile:function(e,t){var n,r,i=this,a=this.astBuilder.ast(e);this.expression=e,this.expensiveChecks=t,Rr(a,i.$filter),(n=Fr(a))&&(r=this.recurse(n));var o,s=Nr(a.body);s&&(o=[],fe(s,function(e,t){var n=i.recurse(e);e.input=n,o.push(n),e.watchId=t}));var c=[];fe(a.body,function(e){c.push(i.recurse(e.expression))});var l=0===a.body.length?pe:1===a.body.length?c[0]:function(t,n){var r;return fe(c,function(e){r=e(t,n)}),r};return r&&(l.assign=function(e,t,n){return r(e,n,t)}),o&&(l.inputs=o),l.literal=Gr(a),l.constant=jr(a),l},recurse:function(e,c,t){var o,l,u,f=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case Mr.Literal:return this.value(e.value,c);case Mr.UnaryExpression:return l=this.recurse(e.argument),this["unary"+e.operator](l,c);case Mr.BinaryExpression:case Mr.LogicalExpression:return o=this.recurse(e.left),l=this.recurse(e.right),this["binary"+e.operator](o,l,c);case Mr.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),c);case Mr.Identifier:return Sr(e.name,f.expression),f.identifier(e.name,f.expensiveChecks||Wr(e.name),c,t,f.expression);case Mr.MemberExpression:return o=this.recurse(e.object,!1,!!t),e.computed||(Sr(e.property.name,f.expression),l=e.property.name),e.computed&&(l=this.recurse(e.property)),e.computed?this.computedMember(o,l,c,t,f.expression):this.nonComputedMember(o,l,f.expensiveChecks,c,t,f.expression);case Mr.CallExpression:return u=[],fe(e.arguments,function(e){u.push(f.recurse(e))}),e.filter&&(l=this.$filter(e.callee.name)),e.filter||(l=this.recurse(e.callee,!0)),e.filter?function(e,t,n,r){for(var i=[],a=0;a<u.length;++a)i.push(u[a](e,t,n,r));var o=l.apply(void 0,i,r);return c?{context:void 0,name:void 0,value:o}:o}:function(e,t,n,r){var i,a=l(e,t,n,r);if(null!=a.value){xr(a.context,f.expression),kr(a.value,f.expression);for(var o=[],s=0;s<u.length;++s)o.push(xr(u[s](e,t,n,r),f.expression));i=xr(a.value.apply(a.context,o),f.expression)}return c?{value:i}:i};case Mr.AssignmentExpression:return o=this.recurse(e.left,!0,1),l=this.recurse(e.right),function(e,t,n,r){var i=o(e,t,n,r),a=l(e,t,n,r);return xr(i.value,f.expression),Er(i.context),i.context[i.name]=a,c?{value:a}:a};case Mr.ArrayExpression:return u=[],fe(e.elements,function(e){u.push(f.recurse(e))}),function(e,t,n,r){for(var i=[],a=0;a<u.length;++a)i.push(u[a](e,t,n,r));return c?{value:i}:i};case Mr.ObjectExpression:return u=[],fe(e.properties,function(e){e.computed?u.push({key:f.recurse(e.key),computed:!0,value:f.recurse(e.value)}):u.push({key:e.key.type===Mr.Identifier?e.key.name:""+e.key.value,computed:!1,value:f.recurse(e.value)})}),function(e,t,n,r){for(var i={},a=0;a<u.length;++a)u[a].computed?i[u[a].key(e,t,n,r)]=u[a].value(e,t,n,r):i[u[a].key]=u[a].value(e,t,n,r);return c?{value:i}:i};case Mr.ThisExpression:return function(e){return c?{value:e}:e};case Mr.LocalsExpression:return function(e,t){return c?{value:t}:t};case Mr.NGValueParameter:return function(e,t,n){return c?{value:n}:n}}},"unary+":function(a,o){return function(e,t,n,r){var i=a(e,t,n,r);return i=_e(i)?+i:0,o?{value:i}:i}},"unary-":function(a,o){return function(e,t,n,r){var i=a(e,t,n,r);return i=_e(i)?-i:0,o?{value:i}:i}},"unary!":function(a,o){return function(e,t,n,r){var i=!a(e,t,n,r);return o?{value:i}:i}},"binary+":function(a,o,s){return function(e,t,n,r){var i=Or(a(e,t,n,r),o(e,t,n,r));return s?{value:i}:i}},"binary-":function(s,c,l){return function(e,t,n,r){var i=s(e,t,n,r),a=c(e,t,n,r),o=(_e(i)?i:0)-(_e(a)?a:0);return l?{value:o}:o}},"binary*":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)*o(e,t,n,r);return s?{value:i}:i}},"binary/":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)/o(e,t,n,r);return s?{value:i}:i}},"binary%":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)%o(e,t,n,r);return s?{value:i}:i}},"binary===":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)===o(e,t,n,r);return s?{value:i}:i}},"binary!==":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)!==o(e,t,n,r);return s?{value:i}:i}},"binary==":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)==o(e,t,n,r);return s?{value:i}:i}},"binary!=":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)!=o(e,t,n,r);return s?{value:i}:i}},"binary<":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)<o(e,t,n,r);return s?{value:i}:i}},"binary>":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)>o(e,t,n,r);return s?{value:i}:i}},"binary<=":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)<=o(e,t,n,r);return s?{value:i}:i}},"binary>=":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)>=o(e,t,n,r);return s?{value:i}:i}},"binary&&":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)&&o(e,t,n,r);return s?{value:i}:i}},"binary||":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)||o(e,t,n,r);return s?{value:i}:i}},"ternary?:":function(a,o,s,c){return function(e,t,n,r){var i=a(e,t,n,r)?o(e,t,n,r):s(e,t,n,r);return c?{value:i}:i}},value:function(e,t){return function(){return t?{context:void 0,name:void 0,value:e}:e}},identifier:function(o,s,c,l,u){return function(e,t,n,r){var i=t&&o in t?t:e;l&&1!==l&&i&&!i[o]&&(i[o]={});var a=i?i[o]:void 0;return s&&xr(a,u),c?{context:i,name:o,value:a}:a}},computedMember:function(s,c,l,u,f){return function(e,t,n,r){var i,a,o=s(e,t,n,r);return null!=o&&(Sr(i=Tr(i=c(e,t,n,r)),f),u&&1!==u&&(Er(o),o&&!o[i]&&(o[i]={})),xr(a=o[i],f)),l?{context:o,name:i,value:a}:a}},nonComputedMember:function(o,s,c,l,u,f){return function(e,t,n,r){var i=o(e,t,n,r);u&&1!==u&&(Er(i),i&&!i[s]&&(i[s]={}));var a=null!=i?i[s]:void 0;return(c||Wr(s))&&xr(a,f),l?{context:i,name:s,value:a}:a}},inputs:function(i,a){return function(e,t,n,r){return r?r[a]:i(e,t,n)}}};var Hr=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n,this.ast=new Mr(e,n),this.astCompiler=n.csp?new Ur(this.ast,t):new Br(this.ast,t)};function Wr(e){return"constructor"===e}function qr(e){return we(e.valueOf)?e.valueOf():Ar.call(e)}function zr(){var n,r,v=Oe(),y=Oe(),i={true:!0,false:!1,null:null,undefined:void 0};this.addLiteral=function(e,t){i[e]=t},this.setIdentifierFns=function(e,t){return n=e,r=t,this},this.$get=["$filter",function(l){var e=N().noUnsafeEval,u={csp:e,expensiveChecks:!1,literals:R(i),isIdentifierStart:we(n)&&n,isIdentifierContinue:we(r)&&r},f={csp:e,expensiveChecks:!0,literals:R(i),isIdentifierStart:we(n)&&n,isIdentifierContinue:we(r)&&r},d=!1;return t.$$runningExpensiveChecks=function(){return d},t;function t(e,t,n){var r,i,a;switch(n=n||d,typeof e){case"string":e=e.trim();var o=n?y:v;if(!(r=o[a=e])){":"===e.charAt(0)&&":"===e.charAt(1)&&(i=!0,e=e.substring(2));var s=n?f:u,c=new Pr(s);(r=new Hr(c,l,s).parse(e)).constant?r.$$watchDelegate=_:i?r.$$watchDelegate=r.literal?g:m:r.inputs&&(r.$$watchDelegate=p),n&&(r=function e(a){if(!a)return a;n.$$watchDelegate=a.$$watchDelegate;n.assign=e(a.assign);n.constant=a.constant;n.literal=a.literal;for(var t=0;a.inputs&&t<a.inputs.length;++t)a.inputs[t]=e(a.inputs[t]);n.inputs=a.inputs;return n;function n(e,t,n,r){var i=d;d=!0;try{return a(e,t,n,r)}finally{d=i}}}(r)),o[a]=r}return b(r,t);case"function":return b(e,t);default:return b(pe,t)}}function h(e,t){return null==e||null==t?e===t:("object"!=typeof e||"object"!=typeof(e=qr(e)))&&(e===t||e!=e&&t!=t)}function p(e,t,n,a,r){var o,s=a.inputs;if(1===s.length){var i=h;return s=s[0],e.$watch(function(e){var t=s(e);return h(t,i)||(o=a(e,void 0,void 0,[t]),i=t&&qr(t)),o},t,n,r)}for(var c=[],l=[],u=0,f=s.length;u<f;u++)c[u]=h,l[u]=null;return e.$watch(function(e){for(var t=!1,n=0,r=s.length;n<r;n++){var i=s[n](e);(t||(t=!h(i,c[n])))&&(l[n]=i,c[n]=i&&qr(i))}return t&&(o=a(e,void 0,void 0,l)),o},t,n,r)}function m(e,r,t,n){var i,a;return i=e.$watch(function(e){return n(e)},function(e,t,n){a=e,we(r)&&r.apply(this,arguments),_e(e)&&n.$$postDigest(function(){_e(a)&&i()})},t)}function g(e,r,t,n){var i,a;return i=e.$watch(function(e){return n(e)},function(e,t,n){a=e,we(r)&&r.call(this,e,t,n),o(e)&&n.$$postDigest(function(){o(a)&&i()})},t);function o(e){var t=!0;return fe(e,function(e){_e(e)||(t=!1)}),t}}function _(e,t,n,r){var i=e.$watch(function(e){return i(),r(e)},t,n);return i}function b(o,s){if(!s)return o;var e=o.$$watchDelegate,a=!1,t=e!==g&&e!==m?function(e,t,n,r){var i=a&&r?r[0]:o(e,t,n,r);return s(i,e,t)}:function(e,t,n,r){var i=o(e,t,n,r),a=s(i,e,t);return _e(i)?a:i};return o.$$watchDelegate&&o.$$watchDelegate!==p?t.$$watchDelegate=o.$$watchDelegate:s.$stateful||(t.$$watchDelegate=p,a=!o.inputs,t.inputs=o.inputs?o.inputs:[o]),t}}]}function Vr(){this.$get=["$rootScope","$exceptionHandler",function(t,e){return Kr(function(e){t.$evalAsync(e)},e)}]}function Yr(){this.$get=["$browser","$exceptionHandler",function(t,e){return Kr(function(e){t.defer(e)},e)}]}function Kr(t,o){var n=w("$q",TypeError);function r(){var e=new c;return e.resolve=a(e,e.resolve),e.reject=a(e,e.reject),e.notify=a(e,e.notify),e}function e(){this.$$state={status:0}}function a(t,n){return function(e){n.call(t,e)}}function s(e){!e.processScheduled&&e.pending&&(e.processScheduled=!0,t(function(){!function(e){var t,n,r;r=e.pending,e.processScheduled=!1,e.pending=void 0;for(var i=0,a=r.length;i<a;++i){n=r[i][0],t=r[i][e.status];try{we(t)?n.resolve(t(e.value)):1===e.status?n.resolve(e.value):n.reject(e.value)}catch(e){n.reject(e),o(e)}}}(e)}))}function c(){this.promise=new e}function i(e){var t=new c;return t.reject(e),t.promise}function l(e,t,n){var r=null;try{we(n)&&(r=n())}catch(e){return i(e)}return I(r)?r.then(function(){return t(e)},i):t(e)}function u(e,t,n,r){var i=new c;return i.resolve(e),i.promise.then(t,n,r)}de(e.prototype,{then:function(e,t,n){if(ge(e)&&ge(t)&&ge(n))return this;var r=new c;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),0<this.$$state.status&&s(this.$$state),r.promise},catch:function(e){return this.then(null,e)},finally:function(t,e){return this.then(function(e){return l(e,f,t)},function(e){return l(e,i,t)},e)}}),de(c.prototype,{resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(n("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){var t,n=this,r=!1;try{(be(e)||we(e))&&(t=e&&e.then),we(t)?(this.promise.$$state.status=-1,t.call(e,function(e){if(r)return;r=!0,n.$$resolve(e)},i,a(this,this.notify))):(this.promise.$$state.value=e,this.promise.$$state.status=1,s(this.promise.$$state))}catch(e){i(e),o(e)}function i(e){r||(r=!0,n.$$reject(e))}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,s(this.promise.$$state)},notify:function(i){var a=this.promise.$$state.pending;this.promise.$$state.status<=0&&a&&a.length&&t(function(){for(var e,t,n=0,r=a.length;n<r;n++){t=a[n][0],e=a[n][3];try{t.notify(we(e)?e(i):i)}catch(e){o(e)}}})}});var f=u;function d(e){if(!we(e))throw n("norslvr","Expected resolverFn, got '{0}'",e);var t=new c;return e(function(e){t.resolve(e)},function(e){t.reject(e)}),t.promise}return d.prototype=e.prototype,d.defer=r,d.reject=i,d.when=u,d.resolve=f,d.all=function(e){var n=new c,r=0,i=ye(e)?[]:{};return fe(e,function(e,t){r++,u(e).then(function(e){i[t]=e,--r||n.resolve(i)},function(e){n.reject(e)})}),0===r&&n.resolve(i),n.promise},d.race=function(e){var t=r();return fe(e,function(e){u(e).then(t.resolve,t.reject)}),t.promise},d}function Qr(){this.$get=["$window","$timeout",function(e,n){var r=e.requestAnimationFrame||e.webkitRequestAnimationFrame,i=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,t=!!r,a=t?function(e){var t=r(e);return function(){i(t)}}:function(e){var t=n(e,16.66,!1);return function(){n.cancel(t)}};return a.supported=t,a}]}function Xr(){var A=10,S=w("$rootScope"),T=null,x=null;this.digestTtl=function(e){return arguments.length&&(A=e),A},this.$get=["$exceptionHandler","$parse","$browser",function(d,p,h){function r(e){e.currentScope.$$destroyed=!0}function i(){this.$id=k(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,(this.$root=this).$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}i.prototype={constructor:i,$new:function(e,t){var n;return t=t||this,e?(n=new i).$root=this.$root:(this.$$ChildScope||(this.$$ChildScope=function(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=k(),this.$$ChildScope=null}return t.prototype=e,t}(this)),n=new this.$$ChildScope),n.$parent=t,n.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=n,t.$$childTail=n):t.$$childHead=t.$$childTail=n,(e||t!==this)&&n.$on("$destroy",r),n},$watch:function(e,t,n,r){var i=p(e);if(i.$$watchDelegate)return i.$$watchDelegate(this,t,n,i,e);var a=this,o=a.$$watchers,s={fn:t,last:w,get:i,exp:r||e,eq:!!n};return T=null,we(t)||(s.fn=pe),o||((o=a.$$watchers=[]).$$digestWatchIndex=-1),o.unshift(s),o.$$digestWatchIndex++,c(this,1),function(){var e=xe(o,s);0<=e&&(c(a,-1),e<o.$$digestWatchIndex&&o.$$digestWatchIndex--),T=null}},$watchGroup:function(e,r){var i=new Array(e.length),a=new Array(e.length),o=[],s=this,c=!1,t=!0;if(!e.length){var n=!0;return s.$evalAsync(function(){n&&r(a,a,s)}),function(){n=!1}}if(1===e.length)return this.$watch(e[0],function(e,t,n){a[0]=e,i[0]=t,r(a,e===t?a:i,n)});function l(){c=!1,t?(t=!1,r(a,a,s)):r(a,i,s)}return fe(e,function(e,n){var t=s.$watch(e,function(e,t){a[n]=e,i[n]=t,c||(c=!0,s.$evalAsync(l))});o.push(t)}),function(){for(;o.length;)o.shift()()}},$watchCollection:function(e,n){h.$stateful=!0;var o,s,r,i=this,a=1<n.length,c=0,t=p(e,h),l=[],u={},f=!0,d=0;function h(e){var t,n,r,i;if(!ge(o=e)){if(be(o))if(O(o)){s!==l&&(d=(s=l).length=0,c++),t=o.length,d!==t&&(c++,s.length=d=t);for(var a=0;a<t;a++)i=s[a],r=o[a],i!=i&&r!=r||i===r||(c++,s[a]=r)}else{for(n in s!==u&&(s=u={},d=0,c++),t=0,o)B.call(o,n)&&(t++,r=o[n],i=s[n],n in s?i!=i&&r!=r||i===r||(c++,s[n]=r):(d++,s[n]=r,c++));if(t<d)for(n in c++,s)B.call(o,n)||(d--,delete s[n])}else s!==o&&(s=o,c++);return c}}return this.$watch(t,function(){if(f?(f=!1,n(o,o,i)):n(o,r,i),a)if(be(o))if(O(o)){r=new Array(o.length);for(var e=0;e<o.length;e++)r[e]=o[e]}else for(var t in r={},o)B.call(o,t)&&(r[t]=o[t]);else r=o})},$digest:function(){var e,t,n,r,i,a,o,s,c,l=A,u=[];v("$digest"),h.$$checkUrlChange(),this===m&&null!==x&&(h.defer.cancel(x),C()),T=null;do{i=!1,o=this;for(var f=0;f<g.length;f++){try{(c=g[f]).scope.$eval(c.expression,c.locals)}catch(e){d(e)}T=null}g.length=0;e:do{if(r=o.$$watchers)for(r.$$digestWatchIndex=r.length;r.$$digestWatchIndex--;)try{if(e=r[r.$$digestWatchIndex])if((t=(0,e.get)(o))===(n=e.last)||(e.eq?ke(t,n):E(t)&&E(n))){if(e===T){i=!1;break e}}else i=!0,(T=e).last=e.eq?R(t,null):t,(0,e.fn)(t,n===w?t:n,o),l<5&&(u[s=4-l]||(u[s]=[]),u[s].push({msg:we(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:t,oldVal:n}))}catch(e){d(e)}if(!(a=o.$$watchersCount&&o.$$childHead||o!==this&&o.$$nextSibling))for(;o!==this&&!(a=o.$$nextSibling);)o=o.$parent}while(o=a);if((i||g.length)&&!l--)throw y(),S("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",A,u)}while(i||g.length);for(y();b<_.length;)try{_[b++]()}catch(e){d(e)}_.length=b=0},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;for(var t in this.$broadcast("$destroy"),this.$$destroyed=!0,this===m&&h.$$applicationDestroyed(),c(this,-this.$$watchersCount),this.$$listenerCount)a(this,this.$$listenerCount[t],t);e&&e.$$childHead===this&&(e.$$childHead=this.$$nextSibling),e&&e.$$childTail===this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=pe,this.$on=this.$watch=this.$watchGroup=function(){return pe},this.$$listeners={},this.$$nextSibling=null,function e(t){9===U&&(t.$$childHead&&e(t.$$childHead),t.$$nextSibling&&e(t.$$nextSibling)),t.$parent=t.$$nextSibling=t.$$prevSibling=t.$$childHead=t.$$childTail=t.$root=t.$$watchers=null}(this)}},$eval:function(e,t){return p(e)(this,t)},$evalAsync:function(e,t){m.$$phase||g.length||h.defer(function(){g.length&&m.$digest()}),g.push({scope:this,expression:p(e),locals:t})},$$postDigest:function(e){_.push(e)},$apply:function(e){try{v("$apply");try{return this.$eval(e)}finally{y()}}catch(e){d(e)}finally{try{m.$digest()}catch(e){throw d(e),e}}},$applyAsync:function(e){var t=this;e&&n.push(function(){t.$eval(e)}),e=p(e),null===x&&(x=h.defer(function(){m.$apply(C)}))},$on:function(t,n){var r=this.$$listeners[t];r||(this.$$listeners[t]=r=[]),r.push(n);for(var e=this;e.$$listenerCount[t]||(e.$$listenerCount[t]=0),e.$$listenerCount[t]++,e=e.$parent;);var i=this;return function(){var e=r.indexOf(n);-1!==e&&(r[e]=null,a(i,1,t))}},$emit:function(e,t){var n,r,i,a=[],o=this,s=!1,c={name:e,targetScope:o,stopPropagation:function(){s=!0},preventDefault:function(){c.defaultPrevented=!0},defaultPrevented:!1},l=F([c],arguments,1);do{for(n=o.$$listeners[e]||a,c.currentScope=o,r=0,i=n.length;r<i;r++)if(n[r])try{n[r].apply(null,l)}catch(e){d(e)}else n.splice(r,1),r--,i--;if(s)return c.currentScope=null,c;o=o.$parent}while(o);return c.currentScope=null,c},$broadcast:function(e,t){var n=this,r=this,i={name:e,targetScope:this,preventDefault:function(){i.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[e])return i;for(var a,o,s,c=F([i],arguments,1);n=r;){for(o=0,s=(a=(i.currentScope=n).$$listeners[e]||[]).length;o<s;o++)if(a[o])try{a[o].apply(null,c)}catch(e){d(e)}else a.splice(o,1),o--,s--;if(!(r=n.$$listenerCount[e]&&n.$$childHead||n!==this&&n.$$nextSibling))for(;n!==this&&!(r=n.$$nextSibling);)n=n.$parent}return i.currentScope=null,i}};var m=new i,g=m.$$asyncQueue=[],_=m.$$postDigestQueue=[],n=m.$$applyAsyncQueue=[],b=0;return m;function v(e){if(m.$$phase)throw S("inprog","{0} already in progress",m.$$phase);m.$$phase=e}function y(){m.$$phase=null}function c(e,t){for(;e.$$watchersCount+=t,e=e.$parent;);}function a(e,t,n){for(;e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n],e=e.$parent;);}function w(){}function C(){for(;n.length;)try{n.shift()()}catch(e){d(e)}x=null}}]}function Zr(){var i=/^\s*(https?|ftp|mailto|tel|file):/,a=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(e){return _e(e)?(i=e,this):i},this.imgSrcSanitizationWhitelist=function(e){return _e(e)?(a=e,this):a},this.$get=function(){return function(e,t){var n,r=t?a:i;return""===(n=fi(e).href)||n.match(r)?e:"unsafe:"+n}}}Hr.prototype={constructor:Hr,parse:function(e){return this.astCompiler.compile(e,this.options.expensiveChecks)}};var Jr=w("$sce"),ei={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"};function ti(e){var t=[];return _e(e)&&fe(e,function(e){t.push(function(e){if("self"===e)return e;if(ve(e)){if(-1<e.indexOf("***"))throw Jr("iwcard","Illegal sequence *** in string matcher.  String: {0}",e);return e=M(e).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*"),new RegExp("^"+e+"$")}if(T(e))return new RegExp("^"+e.source+"$");throw Jr("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}(e))}),t}function ni(){this.SCE_CONTEXTS=ei;var o=["self"],s=[];this.resourceUrlWhitelist=function(e){return arguments.length&&(o=ti(e)),o},this.resourceUrlBlacklist=function(e){return arguments.length&&(s=ti(e)),s},this.$get=["$injector",function(e){var r=function(e){throw Jr("unsafe","Attempting to use an unsafe value in a safe context.")};function a(e,t){return"self"===e?di(t):!!e.exec(t.href)}function t(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}e.has("$sanitize")&&(r=e.get("$sanitize"));var n=t(),i={};return i[ei.HTML]=t(n),i[ei.CSS]=t(n),i[ei.URL]=t(n),i[ei.JS]=t(n),i[ei.RESOURCE_URL]=t(i[ei.URL]),{trustAs:function(e,t){var n=i.hasOwnProperty(e)?i[e]:null;if(!n)throw Jr("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||ge(t)||""===t)return t;if("string"!=typeof t)throw Jr("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new n(t)},getTrusted:function(e,t){if(null===t||ge(t)||""===t)return t;var n=i.hasOwnProperty(e)?i[e]:null;if(n&&t instanceof n)return t.$$unwrapTrustedValue();if(e===ei.RESOURCE_URL){if(function(e){var t,n,r=fi(e.toString()),i=!1;for(t=0,n=o.length;t<n;t++)if(a(o[t],r)){i=!0;break}if(i)for(t=0,n=s.length;t<n;t++)if(a(s[t],r)){i=!1;break}return i}(t))return t;throw Jr("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}",t.toString())}if(e===ei.HTML)return r(t);throw Jr("unsafe","Attempting to use an unsafe value in a safe context.")},valueOf:function(e){return e instanceof n?e.$$unwrapTrustedValue():e}}}]}function ri(){var t=!0;this.enabled=function(e){return arguments.length&&(t=!!e),t},this.$get=["$parse","$sceDelegate",function(r,e){if(t&&U<8)throw Jr("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode.  You can fix this by adding the text <!doctype html> to the top of your HTML document.  See http://docs.angularjs.org/api/ng.$sce for more information.");var i=je(ei);i.isEnabled=function(){return t},i.trustAs=e.trustAs,i.getTrusted=e.getTrusted,i.valueOf=e.valueOf,t||(i.trustAs=i.getTrusted=function(e,t){return t},i.valueOf=me),i.parseAs=function(t,e){var n=r(e);return n.literal&&n.constant?n:r(e,function(e){return i.getTrusted(t,e)})};var a=i.parseAs,o=i.getTrusted,s=i.trustAs;return fe(ei,function(t,e){var n=S(e);i[Xe("parse_as_"+n)]=function(e){return a(t,e)},i[Xe("get_trusted_"+n)]=function(e){return o(t,e)},i[Xe("trust_as_"+n)]=function(e){return s(t,e)}}),i}]}function ii(){this.$get=["$window","$document",function(e,t){var n,r,i={},a=!(e.chrome&&(e.chrome.app&&e.chrome.app.runtime||!e.chrome.app&&e.chrome.runtime&&e.chrome.runtime.id))&&e.history&&e.history.pushState,o=m((/android (\d+)/.exec(S((e.navigator||{}).userAgent))||[])[1]),s=/Boxee/i.test((e.navigator||{}).userAgent),c=t[0]||{},l=/^(Moz|webkit|ms)(?=[A-Z])/,u=c.body&&c.body.style,f=!1,d=!1;if(u){for(var h in u)if(r=l.exec(h)){n=(n=r[0])[0].toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in u&&"webkit"),f=!!("transition"in u||n+"Transition"in u),d=!!("animation"in u||n+"Animation"in u),!o||f&&d||(f=ve(u.webkitTransition),d=ve(u.webkitAnimation))}return{history:!(!a||o<4||s),hasEvent:function(e){if("input"===e&&U<=11)return!1;if(ge(i[e])){var t=c.createElement("div");i[e]="on"+e in t}return i[e]},csp:N(),vendorPrefix:n,transitions:f,animations:d,android:o}}]}var ai=w("$compile");function oi(){var c;this.httpOptions=function(e){return e?(c=e,this):c},this.$get=["$templateCache","$http","$q","$sce",function(r,i,a,o){function s(t,n){s.totalPendingRequests++,ve(t)&&!ge(r.get(t))||(t=o.getTrustedResourceUrl(t));var e=i.defaults&&i.defaults.transformResponse;return ye(e)?e=e.filter(function(e){return e!==In}):e===In&&(e=null),i.get(t,de({cache:r,transformResponse:e},c)).finally(function(){s.totalPendingRequests--}).then(function(e){return r.put(t,e.data),e.data},function(e){if(n)return a.reject(e);throw ai("tpload","Failed to load template: {0} (HTTP status: {1} {2})",t,e.status,e.statusText)})}return s.totalPendingRequests=0,s}]}function si(){this.$get=["$rootScope","$browser","$location",function(t,n,r){var e={findBindings:function(e,n,r){var t=e.getElementsByClassName("ng-binding"),i=[];return fe(t,function(t){var e=v.element(t).data("$binding");e&&fe(e,function(e){r?new RegExp("(^|\\s)"+M(n)+"(\\s|\\||$)").test(e)&&i.push(t):-1!==e.indexOf(n)&&i.push(t)})}),i},findModels:function(e,t,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i<r.length;++i){var a="["+r[i]+"model"+(n?"=":"*=")+'"'+t+'"]',o=e.querySelectorAll(a);if(o.length)return o}},getLocation:function(){return r.url()},setLocation:function(e){e!==r.url()&&(r.url(e),t.$digest())},whenStable:function(e){n.notifyWhenNoOutstandingRequests(e)}};return e}]}function ci(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(c,l,u,f,d){var h={};function e(e,t,n){we(e)||(n=t,t=e,e=pe);var r,i=Ee(arguments,3),a=_e(n)&&!n,o=(a?f:u).defer(),s=o.promise;return r=l.defer(function(){try{o.resolve(e.apply(null,i))}catch(e){o.reject(e),d(e)}finally{delete h[s.$$timeoutId]}a||c.$apply()},t),s.$$timeoutId=r,h[r]=o,s}return e.cancel=function(e){return!!(e&&e.$$timeoutId in h)&&(h[e.$$timeoutId].reject("canceled"),delete h[e.$$timeoutId],l.defer.cancel(e.$$timeoutId))},e}]}var li=j.document.createElement("a"),ui=fi(j.location.href);function fi(e){var t=e;return U&&(li.setAttribute("href",t),t=li.href),li.setAttribute("href",t),{href:li.href,protocol:li.protocol?li.protocol.replace(/:$/,""):"",host:li.host,search:li.search?li.search.replace(/^\?/,""):"",hash:li.hash?li.hash.replace(/^#/,""):"",hostname:li.hostname,port:li.port,pathname:"/"===li.pathname.charAt(0)?li.pathname:"/"+li.pathname}}function di(e){var t=ve(e)?fi(e):e;return t.protocol===ui.protocol&&t.host===ui.host}function hi(){this.$get=x(j)}function pi(e){var o=e[0]||{},s={},c="";function l(t){try{return decodeURIComponent(t)}catch(e){return t}}return function(){var e,t,n,r,i,a=o.cookie||"";if(a!==c)for(e=(c=a).split("; "),s={},n=0;n<e.length;n++)0<(r=(t=e[n]).indexOf("="))&&(i=l(t.substring(0,r)),ge(s[i])&&(s[i]=l(t.substring(r+1))));return s}}function mi(){this.$get=pi}function gi(r){var i="Filter";function a(e,t){if(be(e)){var n={};return fe(e,function(e,t){n[t]=a(t,e)}),n}return r.factory(e+i,t)}this.register=a,this.$get=["$injector",function(t){return function(e){return t.get(e+i)}}],a("currency",Ai),a("date",Ri),a("filter",_i),a("json",Ni),a("limitTo",Gi),a("lowercase",Li),a("number",Si),a("orderBy",Bi),a("uppercase",Fi)}function _i(){return function(e,t,n,r){if(!O(e)){if(null==e)return e;throw w("filter")("notarray","Expected array but received: {0}",e)}var i,a;switch(r=r||"$",vi(t)){case"function":i=t;break;case"boolean":case"null":case"number":case"string":a=!0;case"object":i=function(t,n,r,i){var a=be(t)&&r in t;!0===n?n=ke:we(n)||(n=function(e,t){return!ge(e)&&(null===e||null===t?e===t:!(be(t)||be(e)&&!b(e))&&(e=S(""+e),t=S(""+t),-1!==e.indexOf(t)))});return function(e){return a&&!be(e)?bi(e,t[r],n,r,!1):bi(e,t,n,r,i)}}(t,n,r,a);break;default:return e}return Array.prototype.filter.call(e,i)}}function bi(e,t,n,r,i,a){var o=vi(e),s=vi(t);if("string"===s&&"!"===t.charAt(0))return!bi(e,t.substring(1),n,r,i);if(ye(e))return e.some(function(e){return bi(e,t,n,r,i)});switch(o){case"object":var c;if(i){for(c in e)if("$"!==c.charAt(0)&&bi(e[c],t,n,r,!0))return!0;return!a&&bi(e,t,n,r,!1)}if("object"!==s)return n(e,t);for(c in t){var l=t[c];if(!we(l)&&!ge(l)){var u=c===r;if(!bi(u?e:e[c],l,n,r,u,u))return!1}}return!0;case"function":return!1;default:return n(e,t)}}function vi(e){return null===e?"null":typeof e}pi.$inject=["$document"],gi.$inject=["$provide"];var yi=22,wi=".",Ci="0";function Ai(e){var r=e.NUMBER_FORMATS;return function(e,t,n){return ge(t)&&(t=r.CURRENCY_SYM),ge(n)&&(n=r.PATTERNS[1].maxFrac),null==e?e:Ti(e,r.PATTERNS[1],r.GROUP_SEP,r.DECIMAL_SEP,n).replace(/\u00A4/g,t)}}function Si(e){var n=e.NUMBER_FORMATS;return function(e,t){return null==e?e:Ti(e,n.PATTERNS[0],n.GROUP_SEP,n.DECIMAL_SEP,t)}}function Ti(e,t,n,r,i){if(!ve(e)&&!C(e)||isNaN(e))return"";var a,o=!isFinite(e),s=!1,c=Math.abs(e)+"",l="";if(o)l="∞";else{(function(e,t,n,r){var i=e.d,a=i.length-e.i,o=(t=ge(t)?Math.min(Math.max(n,a),r):+t)+e.i,s=i[o];if(0<o){i.splice(Math.max(e.i,o));for(var c=o;c<i.length;c++)i[c]=0}else{a=Math.max(0,a),e.i=1,i.length=Math.max(1,o=t+1),i[0]=0;for(var l=1;l<o;l++)i[l]=0}if(5<=s)if(o-1<0){for(var u=0;o<u;u--)i.unshift(0),e.i++;i.unshift(1),e.i++}else i[o-1]++;for(;a<Math.max(0,t);a++)i.push(0);var f=i.reduceRight(function(e,t,n,r){return t+=e,r[n]=t%10,Math.floor(t/10)},0);f&&(i.unshift(f),e.i++)})(a=function(e){var t,n,r,i,a,o=0;for(-1<(n=e.indexOf(wi))&&(e=e.replace(wi,"")),0<(r=e.search(/e/i))?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;e.charAt(r)===Ci;r++);if(r===(a=e.length))t=[0],n=1;else{for(a--;e.charAt(a)===Ci;)a--;for(n-=r,t=[],i=0;r<=a;r++,i++)t[i]=+e.charAt(r)}return yi<n&&(t=t.splice(0,yi-1),o=n-1,n=1),{d:t,e:o,i:n}}(c),i,t.minFrac,t.maxFrac);var u=a.d,f=a.i,d=a.e,h=[];for(s=u.reduce(function(e,t){return e&&!t},!0);f<0;)u.unshift(0),f++;0<f?h=u.splice(f,u.length):(h=u,u=[0]);var p=[];for(u.length>=t.lgSize&&p.unshift(u.splice(-t.lgSize,u.length).join(""));u.length>t.gSize;)p.unshift(u.splice(-t.gSize,u.length).join(""));u.length&&p.unshift(u.join("")),l=p.join(n),h.length&&(l+=r+h.join("")),d&&(l+="e+"+d)}return e<0&&!s?t.negPre+l+t.negSuf:t.posPre+l+t.posSuf}function xi(e,t,n,r){var i="";for((e<0||r&&e<=0)&&(r?e=1-e:(e=-e,i="-")),e=""+e;e.length<t;)e=Ci+e;return n&&(e=e.substr(e.length-t)),i+e}function ki(n,r,i,a,o){return i=i||0,function(e){var t=e["get"+n]();return(0<i||-i<t)&&(t+=i),0===t&&-12===i&&(t=12),xi(t,r,a,o)}}function Ei(r,i,a){return function(e,t){var n=e["get"+r]();return t[u((a?"STANDALONE":"")+(i?"SHORT":"")+r)][n]}}function Di(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(t<=4?5:12)-t)}function Ii(i){return function(e){var t,n=Di(e.getFullYear()),r=+(t=e,new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay())))-+n;return xi(1+Math.round(r/6048e5),i)}}function Pi(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}Ai.$inject=["$locale"];var Mi={yyyy:ki("FullYear",4,0,!(Si.$inject=["$locale"]),!0),yy:ki("FullYear",2,0,!0,!0),y:ki("FullYear",1,0,!1,!0),MMMM:Ei("Month"),MMM:Ei("Month",!0),MM:ki("Month",2,1),M:ki("Month",1,1),LLLL:Ei("Month",!1,!0),dd:ki("Date",2),d:ki("Date",1),HH:ki("Hours",2),H:ki("Hours",1),hh:ki("Hours",2,-12),h:ki("Hours",1,-12),mm:ki("Minutes",2),m:ki("Minutes",1),ss:ki("Seconds",2),s:ki("Seconds",1),sss:ki("Milliseconds",3),EEEE:Ei("Day"),EEE:Ei("Day",!0),a:function(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]},Z:function(e,t,n){var r=-1*n,i=0<=r?"+":"";return i+=xi(Math[0<r?"floor":"ceil"](r/60),2)+xi(Math.abs(r%60),2)},ww:Ii(2),w:Ii(1),G:Pi,GG:Pi,GGG:Pi,GGGG:function(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}},$i=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Oi=/^-?\d+$/;function Ri(c){var f=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(t,e,n){var r,i,a="",o=[];if(e=e||"mediumDate",e=c.DATETIME_FORMATS[e]||e,ve(t)&&(t=Oi.test(t)?m(t):function(e){var t;if(t=e.match(f)){var n=new Date(0),r=0,i=0,a=t[8]?n.setUTCFullYear:n.setFullYear,o=t[8]?n.setUTCHours:n.setHours;t[9]&&(r=m(t[9]+t[10]),i=m(t[9]+t[11])),a.call(n,m(t[1]),m(t[2])-1,m(t[3]));var s=m(t[4]||0)-r,c=m(t[5]||0)-i,l=m(t[6]||0),u=Math.round(1e3*parseFloat("0."+(t[7]||0)));return o.call(n,s,c,l,u),n}return e}(t)),C(t)&&(t=new Date(t)),!A(t)||!isFinite(t.getTime()))return t;for(;e;)e=(i=$i.exec(e))?(o=F(o,i,1)).pop():(o.push(e),null);var s=t.getTimezoneOffset();return n&&(s=z(n,s),t=V(t,n,!0)),fe(o,function(e){r=Mi[e],a+=r?r(t,c.DATETIME_FORMATS,s):"''"===e?"'":e.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),a}}function Ni(){return function(e,t){return ge(t)&&(t=2),G(e,t)}}Ri.$inject=["$locale"];var Li=x(S),Fi=x(u);function Gi(){return function(e,t,n){return t=Math.abs(Number(t))===1/0?Number(t):m(t),E(t)?e:(C(e)&&(e=e.toString()),O(e)?(n=(n=!n||isNaN(n)?0:m(n))<0?Math.max(0,e.length+n):n,0<=t?ji(e,n,n+t):0===n?ji(e,t,e.length):ji(e,Math.max(0,n+t),n)):e)}}function ji(e,t,n){return ve(e)?e.slice(t,n):s.call(e,t,n)}function Bi(c){return function(e,t,n,r){if(null==e)return e;if(!O(e))throw w("orderBy")("notarray","Expected array but received: {0}",e);ye(t)||(t=[t]),0===t.length&&(t=["+"]);var a=t.map(function(e){var t=1,n=me;if(we(e))n=e;else if(ve(e)&&("+"!==e.charAt(0)&&"-"!==e.charAt(0)||(t="-"===e.charAt(0)?-1:1,e=e.substring(1)),""!==e&&(n=c(e)).constant)){var r=n();n=function(e){return e[r]}}return{get:n,descending:t}}),o=n?-1:1,s=we(r)?r:u,i=Array.prototype.map.call(e,function(t,n){return{value:t,tieBreaker:{value:n,type:"number",index:n},predicateValues:a.map(function(e){return function(e,t){var n=typeof e;null===e?(n="string",e="null"):"object"===n&&(e=function(e){if(we(e.valueOf)&&l(e=e.valueOf()))return e;if(b(e)&&l(e=e.toString()))return e;return e}(e));return{value:e,type:n,index:t}}(e.get(t),n)})}});return i.sort(function(e,t){for(var n=0,r=a.length;n<r;n++){var i=s(e.predicateValues[n],t.predicateValues[n]);if(i)return i*a[n].descending*o}return s(e.tieBreaker,t.tieBreaker)*o}),e=i.map(function(e){return e.value})};function l(e){switch(typeof e){case"number":case"boolean":case"string":return!0;default:return!1}}function u(e,t){var n=0,r=e.type,i=t.type;if(r===i){var a=e.value,o=t.value;"string"===r?(a=a.toLowerCase(),o=o.toLowerCase()):"object"===r&&(be(a)&&(a=e.index),be(o)&&(o=t.index)),a!==o&&(n=a<o?-1:1)}else n=r<i?-1:1;return n}}function Ui(e){return we(e)&&(e={link:e}),e.restrict=e.restrict||"AC",x(e)}Bi.$inject=["$parse"];var Hi=x({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref)return function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===H.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),Wi={};fe(St,function(e,r){if("multiple"!==e){var i=fn("ng-"+r),t=a;"checked"===e&&(t=function(e,t,n){n.ngModel!==n[i]&&a(e,0,n)}),Wi[i]=function(){return{restrict:"A",priority:100,link:t}}}function a(e,t,n){e.$watch(n[i],function(e){n.$set(r,!!e)})}}),fe(xt,function(e,i){Wi[i]=function(){return{priority:100,link:function(e,t,n){if("ngPattern"===i&&"/"===n.ngPattern.charAt(0)){var r=n.ngPattern.match(a);if(r)return void n.$set("ngPattern",new RegExp(r[1],r[2]))}e.$watch(n[i],function(e){n.$set(i,e)})}}}}),fe(["src","srcset","href"],function(a){var o=fn("ng-"+a);Wi[o]=function(){return{priority:99,link:function(e,t,n){var r=a,i=a;"href"===a&&"[object SVGAnimatedString]"===H.call(t.prop("href"))&&(i="xlinkHref",n.$attr[i]="xlink:href",r=null),n.$observe(o,function(e){e?(n.$set(i,e),U&&r&&t.prop(r,n[i])):"href"===a&&n.$set(i,null)})}}}});var qi={$addControl:pe,$$renameControl:function(e,t){e.$name=t},$removeControl:pe,$setValidity:pe,$setDirty:pe,$setPristine:pe,$setSubmitted:pe},zi="ng-submitted";function Vi(e,t,n,r,i){var a=this,o=[];a.$error={},a.$$success={},a.$pending=void 0,a.$name=i(t.name||t.ngForm||"")(n),a.$dirty=!1,a.$pristine=!0,a.$valid=!0,a.$invalid=!1,a.$submitted=!1,a.$$parentForm=qi,a.$rollbackViewValue=function(){fe(o,function(e){e.$rollbackViewValue()})},a.$commitViewValue=function(){fe(o,function(e){e.$commitViewValue()})},a.$addControl=function(e){ce(e.$name,"input"),o.push(e),e.$name&&(a[e.$name]=e),e.$$parentForm=a},a.$$renameControl=function(e,t){var n=e.$name;a[n]===e&&delete a[n],(a[t]=e).$name=t},a.$removeControl=function(n){n.$name&&a[n.$name]===n&&delete a[n.$name],fe(a.$pending,function(e,t){a.$setValidity(t,null,n)}),fe(a.$error,function(e,t){a.$setValidity(t,null,n)}),fe(a.$$success,function(e,t){a.$setValidity(t,null,n)}),xe(o,n),n.$$parentForm=qi},Ja({ctrl:this,$element:e,set:function(e,t,n){var r=e[t];r?-1===r.indexOf(n)&&r.push(n):e[t]=[n]},unset:function(e,t,n){var r=e[t];r&&(xe(r,n),0===r.length&&delete e[t])},$animate:r}),a.$setDirty=function(){r.removeClass(e,Ba),r.addClass(e,Ua),a.$dirty=!0,a.$pristine=!1,a.$$parentForm.$setDirty()},a.$setPristine=function(){r.setClass(e,Ba,Ua+" "+zi),a.$dirty=!1,a.$pristine=!0,a.$submitted=!1,fe(o,function(e){e.$setPristine()})},a.$setUntouched=function(){fe(o,function(e){e.$setUntouched()})},a.$setSubmitted=function(){r.addClass(e,zi),a.$submitted=!0,a.$$parentForm.$setSubmitted()}}Vi.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Yi=function(n){return["$timeout","$parse",function(c,t){return{name:"form",restrict:n?"EAC":"E",require:["form","^^?form"],controller:Vi,compile:function(e,t){e.addClass(Ba).addClass(Ga);var s=t.name?"name":!(!n||!t.ngForm)&&"ngForm";return{pre:function(t,e,n,r){var i=r[0];if(!("action"in n)){var a=function(e){t.$apply(function(){i.$commitViewValue(),i.$setSubmitted()}),e.preventDefault()};qe(e[0],"submit",a),e.on("$destroy",function(){c(function(){ze(e[0],"submit",a)},0,!1)})}(r[1]||i.$$parentForm).$addControl(i);var o=s?l(i.$name):pe;s&&(o(t,i),n.$observe(s,function(e){i.$name!==e&&(o(t,void 0),i.$$parentForm.$$renameControl(i,e),(o=l(i.$name))(t,i))})),e.on("$destroy",function(){i.$$parentForm.$removeControl(i),o(t,void 0),de(i,qi)})}}}};function l(e){return""===e?t('this[""]').assign:t(e).assign||pe}}]},Ki=Yi(),Qi=Yi(!0),Xi=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,Zi=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Ji=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,ea=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,ta=/^(\d{4,})-(\d{2})-(\d{2})$/,na=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ra=/^(\d{4,})-W(\d\d)$/,ia=/^(\d{4,})-(\d\d)$/,aa=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,oa="keydown wheel mousedown",sa=Oe();fe("date,datetime-local,month,time,week".split(","),function(e){sa[e]=!0});var ca={text:function(e,t,n,r,i,a){ua(e,t,n,r,i,a),la(r)},date:da("date",ta,fa(ta,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":da("datetimelocal",na,fa(na,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:da("time",aa,fa(aa,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:da("week",ra,function(e,t){if(A(e))return e;if(ve(e)){ra.lastIndex=0;var n=ra.exec(e);if(n){var r=+n[1],i=+n[2],a=0,o=0,s=0,c=0,l=Di(r),u=7*(i-1);return t&&(a=t.getHours(),o=t.getMinutes(),s=t.getSeconds(),c=t.getMilliseconds()),new Date(r,0,l.getDate()+u,a,o,s,c)}}return NaN},"yyyy-Www"),month:da("month",ia,fa(ia,["yyyy","MM"]),"yyyy-MM"),number:function(e,t,n,r,i,a){var o,s;ha(e,t,n,r),ua(e,t,n,r,i,a),pa(r),(_e(n.min)||n.ngMin)&&(r.$validators.min=function(e){return r.$isEmpty(e)||ge(o)||o<=e},n.$observe("min",function(e){o=ma(e),r.$validate()}));(_e(n.max)||n.ngMax)&&(r.$validators.max=function(e){return r.$isEmpty(e)||ge(s)||e<=s},n.$observe("max",function(e){s=ma(e),r.$validate()}))},url:function(e,t,n,r,i,a){ua(e,t,n,r,i,a),la(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||Zi.test(n)}},email:function(e,t,n,r,i,a){ua(e,t,n,r,i,a),la(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||Ji.test(n)}},radio:function(e,t,n,r){ge(n.name)&&t.attr("name",k());t.on("click",function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)}),r.$render=function(){var e=n.value;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)},range:function(e,n,r,i,t,a){ha(e,n,r,i),pa(i),ua(e,n,r,i,t,a);var o=i.$$hasNativeValidators&&"range"===n[0].type,s=o?0:void 0,c=o?100:void 0,l=o?1:void 0,u=n[0].validity,f=_e(r.min),d=_e(r.max),h=_e(r.step),p=i.$render;i.$render=o&&_e(u.rangeUnderflow)&&_e(u.rangeOverflow)?function(){p(),i.$setViewValue(n.val())}:p,f&&(i.$validators.min=o?function(){return!0}:function(e,t){return i.$isEmpty(t)||ge(s)||s<=t},m("min",function(e){if(s=ma(e),E(i.$modelValue))return;if(o){var t=n.val();t<s&&(t=s,n.val(t)),i.$setViewValue(t)}else i.$validate()}));d&&(i.$validators.max=o?function(){return!0}:function(e,t){return i.$isEmpty(t)||ge(c)||t<=c},m("max",function(e){if(c=ma(e),E(i.$modelValue))return;if(o){var t=n.val();c<t&&(n.val(c),t=c<s?s:c),i.$setViewValue(t)}else i.$validate()}));h&&(i.$validators.step=o?function(){return!u.stepMismatch}:function(e,t){return i.$isEmpty(t)||ge(l)||function(e,t,n){var r=Number(e);if(!ga(r)||!ga(t)||!ga(n)){var i=Math.max(_a(r),_a(t),_a(n)),a=Math.pow(10,i);r*=a,t*=a,n*=a}return(r-t)%n==0}(t,s||0,l)},m("step",function(e){if(l=ma(e),E(i.$modelValue))return;o&&i.$viewValue!==n.val()?i.$setViewValue(n.val()):i.$validate()}));function m(e,t){n.attr(e,r[e]),r.$observe(e,t)}},checkbox:function(e,t,n,r,i,a,o,s){var c=ba(s,e,"ngTrueValue",n.ngTrueValue,!0),l=ba(s,e,"ngFalseValue",n.ngFalseValue,!1);t.on("click",function(e){r.$setViewValue(t[0].checked,e&&e.type)}),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return!1===e},r.$formatters.push(function(e){return ke(e,c)}),r.$parsers.push(function(e){return e?c:l})},hidden:pe,button:pe,submit:pe,reset:pe,file:pe};function la(t){t.$formatters.push(function(e){return t.$isEmpty(e)?e:e.toString()})}function ua(e,r,i,a,t,o){var s,c=S(r[0].type);if(!t.android){var l=!1;r.on("compositionstart",function(){l=!0}),r.on("compositionend",function(){l=!1,u()})}var u=function(e){if(s&&(o.defer.cancel(s),s=null),!l){var t=r.val(),n=e&&e.type;"password"===c||i.ngTrim&&"false"===i.ngTrim||(t=Se(t)),(a.$viewValue!==t||""===t&&a.$$hasNativeValidators)&&a.$setViewValue(t,n)}};if(t.hasEvent("input"))r.on("input",u);else{var n=function(e,t,n){s||(s=o.defer(function(){s=null,t&&t.value===n||u(e)}))};r.on("keydown",function(e){var t=e.keyCode;91===t||15<t&&t<19||37<=t&&t<=40||n(e,this,this.value)}),t.hasEvent("paste")&&r.on("paste cut",n)}r.on("change",u),sa[c]&&a.$$hasNativeValidators&&c===i.type&&r.on(oa,function(e){if(!s){var t=this[f],n=t.badInput,r=t.typeMismatch;s=o.defer(function(){s=null,t.badInput===n&&t.typeMismatch===r||u(e)})}}),a.$render=function(){var e=a.$isEmpty(a.$viewValue)?"":a.$viewValue;r.val()!==e&&r.val(e)}}function fa(i,a){return function(e,t){var n,r;if(A(e))return e;if(ve(e)){if('"'===e.charAt(0)&&'"'===e.charAt(e.length-1)&&(e=e.substring(1,e.length-1)),Xi.test(e))return new Date(e);if(i.lastIndex=0,n=i.exec(e))return n.shift(),r=t?{yyyy:t.getFullYear(),MM:t.getMonth()+1,dd:t.getDate(),HH:t.getHours(),mm:t.getMinutes(),ss:t.getSeconds(),sss:t.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},fe(n,function(e,t){t<a.length&&(r[a[t]]=+e)}),new Date(r.yyyy,r.MM-1,r.dd,r.HH,r.mm,r.ss||0,1e3*r.sss||0)}return NaN}}function da(h,p,m,g){return function(e,t,n,r,i,a,o){ha(e,t,n,r),ua(0,t,n,r,i,a);var s,c,l,u=r&&r.$options&&r.$options.timezone;(r.$$parserName=h,r.$parsers.push(function(e){if(r.$isEmpty(e))return null;if(p.test(e)){var t=m(e,s);return u&&(t=V(t,u)),t}}),r.$formatters.push(function(e){if(e&&!A(e))throw Ya("datefmt","Expected `{0}` to be a date",e);return f(e)?((s=e)&&u&&(s=V(s,u,!0)),o("date")(e,g,u)):(s=null,"")}),_e(n.min)||n.ngMin)&&(r.$validators.min=function(e){return!f(e)||ge(c)||m(e)>=c},n.$observe("min",function(e){c=d(e),r.$validate()}));(_e(n.max)||n.ngMax)&&(r.$validators.max=function(e){return!f(e)||ge(l)||m(e)<=l},n.$observe("max",function(e){l=d(e),r.$validate()}));function f(e){return e&&!(e.getTime&&e.getTime()!=e.getTime())}function d(e){return _e(e)&&!A(e)?m(e)||void 0:e}}}function ha(e,n,t,r){var i=n[0];(r.$$hasNativeValidators=be(i.validity))&&r.$parsers.push(function(e){var t=n.prop(f)||{};return t.badInput||t.typeMismatch?void 0:e})}function pa(t){t.$$parserName="number",t.$parsers.push(function(e){return t.$isEmpty(e)?null:ea.test(e)?parseFloat(e):void 0}),t.$formatters.push(function(e){if(!t.$isEmpty(e)){if(!C(e))throw Ya("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e})}function ma(e){return _e(e)&&!C(e)&&(e=parseFloat(e)),E(e)?void 0:e}function ga(e){return(0|e)===e}function _a(e){var t=e.toString(),n=t.indexOf(".");if(-1!==n)return t.length-n-1;if(-1<e&&e<1){var r=/e-(\d+)$/.exec(t);if(r)return Number(r[1])}return 0}function ba(e,t,n,r,i){var a;if(_e(r)){if(!(a=e(r)).constant)throw Ya("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return a(t)}return i}var va=["$browser","$sniffer","$filter","$parse",function(a,o,s,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,t,n,r){if(r[0]){var i=S(n.type);"range"!==i||n.hasOwnProperty("ngInputRange")||(i="text"),(ca[i]||ca.text)(e,t,n,r[0],o,a,s,c)}}}}}],ya=/^(true|false|\d+)$/,wa=function(){return{restrict:"A",priority:100,compile:function(e,t){return ya.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},Ca=["$compile",function(r){return{restrict:"AC",compile:function(e){return r.$$addBindingClass(e),function(e,t,n){r.$$addBindingInfo(t,n.ngBind),t=t[0],e.$watch(n.ngBind,function(e){t.textContent=ge(e)?"":e})}}}}],Aa=["$interpolate","$compile",function(i,a){return{compile:function(e){return a.$$addBindingClass(e),function(e,t,n){var r=i(t.attr(n.$attr.ngBindTemplate));a.$$addBindingInfo(t,r.expressions),t=t[0],n.$observe("ngBindTemplate",function(e){t.textContent=ge(e)?"":e})}}}}],Sa=["$sce","$parse","$compile",function(a,n,o){return{restrict:"A",compile:function(e,t){var r=n(t.ngBindHtml),i=n(t.ngBindHtml,function(e){return a.valueOf(e)});return o.$$addBindingClass(e),function(t,n,e){o.$$addBindingInfo(n,e.ngBindHtml),t.$watch(i,function(){var e=r(t);n.html(a.getTrustedHtml(e)||"")})}}}}],Ta=x({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}});function xa(n,m){return n="ngClass"+n,["$animate",function(d){return{restrict:"AC",link:function(s,c,a){var l;function u(e){var t=f(e,1);a.$addClass(t)}function f(e,t){var n=c.data("$classCounts")||Oe(),r=[];return fe(e,function(e){(0<t||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(0<t)&&r.push(e))}),c.data("$classCounts",n),r.join(" ")}function t(e){if(!0===m||(1&s.$index)===m){var t=p(e||[]);if(l){if(!ke(e,l)){var n=p(l);a=h(i=t,r=n),o=h(r,i),a=f(a,1),o=f(o,-1),a&&a.length&&d.addClass(c,a),o&&o.length&&d.removeClass(c,o)}}else u(t)}var r,i,a,o;l=ye(e)?e.map(function(e){return je(e)}):je(e)}a.$observe("class",function(e){t(s.$eval(a[n]))}),"ngClass"!==n&&s.$watch("$index",function(e,t){var n,r=1&e;if(r!==(1&t)){var i=p(l);r===m?u(i):(n=f(i,-1),a.$removeClass(n))}}),s.$watch(a[n],t,!0)}};function h(e,t){var n=[];e:for(var r=0;r<e.length;r++){for(var i=e[r],a=0;a<t.length;a++)if(i===t[a])continue e;n.push(i)}return n}function p(e){var n=[];return ye(e)?(fe(e,function(e){n=n.concat(p(e))}),n):ve(e)?e.split(" "):be(e)?(fe(e,function(e,t){e&&(n=n.concat(t.split(" ")))}),n):e}}]}var ka=xa("",!0),Ea=xa("Odd",0),Da=xa("Even",1),Ia=Ui({compile:function(e,t){t.$set("ngCloak",void 0),e.removeClass("ng-cloak")}}),Pa=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Ma={},$a={blur:!0,focus:!0};fe("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var o=fn("ng-"+a);Ma[o]=["$parse","$rootScope",function(n,i){return{restrict:"A",compile:function(e,t){var r=n(t[o],null,!0);return function(n,e){e.on(a,function(e){var t=function(){r(n,{$event:e})};$a[a]&&i.$$phase?n.$evalAsync(t):n.$apply(t)})}}}}]});var Oa=["$animate","$compile",function(c,l){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(e,n,r,t,i){var a,o,s;e.$watch(r.ngIf,function(e){e?o||i(function(e,t){o=t,e[e.length++]=l.$$createComment("end ngIf",r.ngIf),a={clone:e},c.enter(e,n.parent(),n)}):(s&&(s.remove(),s=null),o&&(o.$destroy(),o=null),a&&(s=$e(a.clone),c.leave(s).done(function(e){!1!==e&&(s=null)}),a=null))})}}}],Ra=["$templateRequest","$anchorScroll","$animate",function(g,_,b){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:v.noop,compile:function(e,t){var n=t.ngInclude||t.src,p=t.onload||"",m=t.autoscroll;return function(o,s,e,c,l){var u,t,f,d=0,h=function(){t&&(t.remove(),t=null),u&&(u.$destroy(),u=null),f&&(b.leave(f).done(function(e){!1!==e&&(t=null)}),t=f,f=null)};o.$watch(n,function(r){var i=function(e){!1===e||!_e(m)||m&&!o.$eval(m)||_()},a=++d;r?(g(r,!0).then(function(e){if(!o.$$destroyed&&a===d){var t=o.$new();c.template=e;var n=l(t,function(e){h(),b.enter(e,null,s).done(i)});f=n,(u=t).$emit("$includeContentLoaded",r),o.$eval(p)}},function(){o.$$destroyed||a===d&&(h(),o.$emit("$includeContentError",r))}),o.$emit("$includeContentRequested",r)):(h(),c.template=null)})}}}}],Na=["$compile",function(i){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(e,t,n,r){if(H.call(t[0]).match(/SVG/))return t.empty(),void i(at(r.template,j.document).childNodes)(e,function(e){t.append(e)},{futureParentElement:t});t.html(r.template),i(t.contents())(e)}}}],La=Ui({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),Fa=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,n,r){var i=t.attr(n.$attr.ngList)||", ",a="false"!==n.ngTrim,o=a?Se(i):i;r.$parsers.push(function(e){if(!ge(e)){var t=[];return e&&fe(e.split(o),function(e){e&&t.push(a?Se(e):e)}),t}}),r.$formatters.push(function(e){if(ye(e))return e.join(i)}),r.$isEmpty=function(e){return!e||!e.length}}}},Ga="ng-valid",ja="ng-invalid",Ba="ng-pristine",Ua="ng-dirty",Ha="ng-untouched",Wa="ng-touched",qa="ng-pending",za="ng-empty",Va="ng-not-empty",Ya=w("ngModel"),Ka=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,t,i,o,s,n,c,l,u,e){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=void 0,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=void 0,this.$name=e(i.name||"",!1)(a),this.$$parentForm=qi;var f,d=s(i.ngModel),h=d.assign,p=d,m=h,g=null,_=this;this.$$setOptions=function(e){if((_.$options=e)&&e.getterSetter){var n=s(i.ngModel+"()"),r=s(i.ngModel+"($$$p)");p=function(e){var t=d(e);return we(t)&&(t=n(e)),t},m=function(e,t){we(d(e))?r(e,{$$$p:t}):h(e,t)}}else if(!d.assign)throw Ya("nonassign","Expression '{0}' is non-assignable. Element: {1}",i.ngModel,Ie(o))},this.$render=pe,this.$isEmpty=function(e){return ge(e)||""===e||null===e||e!=e},this.$$updateEmptyClasses=function(e){_.$isEmpty(e)?(n.removeClass(o,Va),n.addClass(o,za)):(n.removeClass(o,za),n.addClass(o,Va))};var b=0;Ja({ctrl:this,$element:o,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},$animate:n}),this.$setPristine=function(){_.$dirty=!1,_.$pristine=!0,n.removeClass(o,Ua),n.addClass(o,Ba)},this.$setDirty=function(){_.$dirty=!0,_.$pristine=!1,n.removeClass(o,Ba),n.addClass(o,Ua),_.$$parentForm.$setDirty()},this.$setUntouched=function(){_.$touched=!1,_.$untouched=!0,n.setClass(o,Ha,Wa)},this.$setTouched=function(){_.$touched=!0,_.$untouched=!1,n.setClass(o,Wa,Ha)},this.$rollbackViewValue=function(){c.cancel(g),_.$viewValue=_.$$lastCommittedViewValue,_.$render()},this.$validate=function(){if(!E(_.$modelValue)){var e=_.$$lastCommittedViewValue,t=_.$$rawModelValue,n=_.$valid,r=_.$modelValue,i=_.$options&&_.$options.allowInvalid;_.$$runValidators(t,e,function(e){i||n===e||(_.$modelValue=e?t:void 0,_.$modelValue!==r&&_.$$writeModelToScope())})}},this.$$runValidators=function(r,i,t){var a,o,s,n=++b;(function(){var e=_.$$parserName||"parse";{if(!ge(f))return f||(fe(_.$validators,function(e,t){c(t,null)}),fe(_.$asyncValidators,function(e,t){c(t,null)})),c(e,f),f;c(e,null)}return!0})()?(a=!0,fe(_.$validators,function(e,t){var n=e(r,i);a=a&&n,c(t,n)}),a||(fe(_.$asyncValidators,function(e,t){c(t,null)}),0)?(o=[],s=!0,fe(_.$asyncValidators,function(e,t){var n=e(r,i);if(!I(n))throw Ya("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",n);c(t,void 0),o.push(n.then(function(){c(t,!0)},function(){c(t,s=!1)}))}),o.length?u.all(o).then(function(){e(s)},pe):e(!0)):e(!1)):e(!1);function c(e,t){n===b&&_.$setValidity(e,t)}function e(e){n===b&&t(e)}},this.$commitViewValue=function(){var e=_.$viewValue;c.cancel(g),(_.$$lastCommittedViewValue!==e||""===e&&_.$$hasNativeValidators)&&(_.$$updateEmptyClasses(e),_.$$lastCommittedViewValue=e,_.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){var t=_.$$lastCommittedViewValue;if(f=!ge(t)||void 0)for(var e=0;e<_.$parsers.length;e++)if(ge(t=_.$parsers[e](t))){f=!1;break}E(_.$modelValue)&&(_.$modelValue=p(a));var n=_.$modelValue,r=_.$options&&_.$options.allowInvalid;function i(){_.$modelValue!==n&&_.$$writeModelToScope()}_.$$rawModelValue=t,r&&(_.$modelValue=t,i()),_.$$runValidators(t,_.$$lastCommittedViewValue,function(e){r||(_.$modelValue=e?t:void 0,i())})},this.$$writeModelToScope=function(){m(a,_.$modelValue),fe(_.$viewChangeListeners,function(e){try{e()}catch(e){t(e)}})},this.$setViewValue=function(e,t){_.$viewValue=e,_.$options&&!_.$options.updateOnDefault||_.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(e){var t,n=0,r=_.$options;r&&_e(r.debounce)&&(C(t=r.debounce)?n=t:C(t[e])?n=t[e]:C(t.default)&&(n=t.default)),c.cancel(g),n?g=c(function(){_.$commitViewValue()},n):l.$$phase?_.$commitViewValue():a.$apply(function(){_.$commitViewValue()})},a.$watch(function(){var e=p(a);if(e!==_.$modelValue&&(_.$modelValue==_.$modelValue||e==e)){_.$modelValue=_.$$rawModelValue=e,f=void 0;for(var t=_.$formatters,n=t.length,r=e;n--;)r=t[n](r);_.$viewValue!==r&&(_.$$updateEmptyClasses(r),_.$viewValue=_.$$lastCommittedViewValue=r,_.$render(),_.$$runValidators(_.$modelValue,_.$viewValue,pe))}return e})}],Qa=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Ka,priority:1,compile:function(e){return e.addClass(Ba).addClass(Ha).addClass(Ga),{pre:function(e,t,n,r){var i=r[0],a=r[1]||i.$$parentForm;i.$$setOptions(r[2]&&r[2].$options),a.$addControl(i),n.$observe("name",function(e){i.$name!==e&&i.$$parentForm.$$renameControl(i,e)}),e.$on("$destroy",function(){i.$$parentForm.$removeControl(i)})},post:function(e,t,n,r){var i=r[0];i.$options&&i.$options.updateOn&&t.on(i.$options.updateOn,function(e){i.$$debounceViewValueCommit(e&&e.type)}),t.on("blur",function(){i.$touched||(a.$$phase?e.$evalAsync(i.$setTouched):e.$apply(i.$setTouched))})}}}}}],Xa=/(\s+|^)default(\s+|$)/,Za=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var n=this;this.$options=R(e.$eval(t.ngModelOptions)),_e(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=Se(this.$options.updateOn.replace(Xa,function(){return n.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}};function Ja(e){var i=e.ctrl,n=e.$element,r={},a=e.set,o=e.unset,s=e.$animate;function c(e,t){t&&!r[e]?(s.addClass(n,e),r[e]=!0):!t&&r[e]&&(s.removeClass(n,e),r[e]=!1)}function l(e,t){e=e?"-"+Pe(e,"-"):"",c(Ga+e,!0===t),c(ja+e,!1===t)}r[ja]=!(r[Ga]=n.hasClass(Ga)),i.$setValidity=function(e,t,n){ge(t)?function(e,t,n){i[e]||(i[e]={});a(i[e],t,n)}("$pending",e,n):function(e,t,n){i[e]&&o(i[e],t,n);eo(i[e])&&(i[e]=void 0)}("$pending",e,n);Ae(t)?t?(o(i.$error,e,n),a(i.$$success,e,n)):(a(i.$error,e,n),o(i.$$success,e,n)):(o(i.$error,e,n),o(i.$$success,e,n));i.$pending?(c(qa,!0),i.$valid=i.$invalid=void 0,l("",null)):(c(qa,!1),i.$valid=eo(i.$error),i.$invalid=!i.$valid,l("",i.$valid));var r;r=i.$pending&&i.$pending[e]?void 0:!i.$error[e]&&(!!i.$$success[e]||null);l(e,r),i.$$parentForm.$setValidity(e,r,i)}}function eo(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}var to=Ui({terminal:!0,priority:1e3}),no=w("ngOptions"),ro=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,io=["$compile","$document","$parse",function(w,C,S){var A=j.document.createElement("option"),T=j.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(e,t,n,r){r[0].registerOption=pe},post:function(e,a,t,n){for(var o,s=n[0],c=n[1],l=t.multiple,r=0,i=a.children(),u=i.length;r<u;r++)if(""===i[r].value){o=i.eq(r);break}var f,d=!!o,h=!1,p=ue(A.cloneNode(!1));p.val("?");var m=function(e,t,d){var f=e.match(ro);if(!f)throw no("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,Ie(t));var n=f[5]||f[7],r=f[6],i=/ as /.test(f[0])&&f[1],h=f[9],a=S(f[2]?f[1]:n),p=i&&S(i)||a,o=h&&S(h),m=h?function(e,t){return o(d,t)}:function(e){return Pt(e)},g=function(e,t){return m(e,w(e,t))},_=S(f[2]||f[1]),b=S(f[3]||""),v=S(f[4]||""),y=S(f[8]),s={},w=r?function(e,t){return s[r]=t,s[n]=e,s}:function(e){return s[n]=e,s};function C(e,t,n,r,i){this.selectValue=e,this.viewValue=t,this.label=n,this.group=r,this.disabled=i}function A(e){var t;if(!r&&O(e))t=e;else for(var n in t=[],e)e.hasOwnProperty(n)&&"$"!==n.charAt(0)&&t.push(n);return t}return{trackBy:h,getTrackByValue:g,getWatchables:S(y,function(e){for(var t=[],n=A(e=e||[]),r=n.length,i=0;i<r;i++){var a=e===n?i:n[i],o=e[a],s=w(o,a),c=m(o,s);if(t.push(c),f[2]||f[1]){var l=_(d,s);t.push(l)}if(f[4]){var u=v(d,s);t.push(u)}}return t}),getOptions:function(){for(var e=[],t={},n=y(d)||[],r=A(n),i=r.length,a=0;a<i;a++){var o=n===r?a:r[a],s=n[o],c=w(s,o),l=p(d,c),u=m(l,c),f=new C(u,l,_(d,c),b(d,c),v(d,c));e.push(f),t[u]=f}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[g(e)]},getViewValueFromOption:function(e){return h?R(e.viewValue):e.viewValue}}}}}(t.ngOptions,a,e),g=C[0].createDocumentFragment(),_=function(){d?h&&o.removeAttr("selected"):o.remove()},b=function(){p.remove()};function v(e,t){var n,r,i=A.cloneNode(!1);t.appendChild(i),r=i,((n=e).element=r).disabled=n.disabled,n.label!==r.label&&(r.label=n.label,r.textContent=n.label),r.value=n.selectValue}function y(){var e=f&&s.readValue();if(f)for(var t=f.items.length-1;0<=t;t--){var n=f.items[t];_e(n.group)?Ct(n.element.parentNode):Ct(n.element)}f=m.getOptions();var r={};if(d&&a.prepend(o),f.items.forEach(function(e){var t;_e(e.group)?((t=r[e.group])||(t=T.cloneNode(!1),g.appendChild(t),t.label=null===e.group?"null":e.group,r[e.group]=t),v(e,t)):v(e,g)}),a[0].appendChild(g),c.$render(),!c.$isEmpty(e)){var i=s.readValue();(m.trackBy||l?ke(e,i):e===i)||(c.$setViewValue(i),c.$render())}}l?(c.$isEmpty=function(e){return!e||0===e.length},s.writeValue=function(e){f.items.forEach(function(e){e.element.selected=!1}),e&&e.forEach(function(e){var t=f.getOptionFromViewValue(e);t&&(t.element.selected=!0)})},s.readValue=function(){var e=a.val()||[],n=[];return fe(e,function(e){var t=f.selectValueMap[e];t&&!t.disabled&&n.push(f.getViewValueFromOption(t))}),n},m.trackBy&&e.$watchCollection(function(){if(ye(c.$viewValue))return c.$viewValue.map(function(e){return m.getTrackByValue(e)})},function(){c.$render()})):(s.writeValue=function(e){var t=f.selectValueMap[a.val()],n=f.getOptionFromViewValue(e);t&&t.element.removeAttribute("selected"),n?(a[0].value!==n.selectValue&&(b(),_(),a[0].value=n.selectValue,n.element.selected=!0),n.element.setAttribute("selected","selected")):null===e||d?(b(),d||a.prepend(o),a.val(""),h&&(o.prop("selected",!0),o.attr("selected",!0))):(_(),a.prepend(p),a.val("?"),p.prop("selected",!0),p.attr("selected",!0))},s.readValue=function(){var e=f.selectValueMap[a.val()];return e&&!e.disabled?(_(),b(),f.getViewValueFromOption(e)):null},m.trackBy&&e.$watch(function(){return m.getTrackByValue(c.$viewValue)},function(){c.$render()})),d?(o.remove(),w(o)(e),o[0].nodeType===Le?(h=!1,s.registerOption=function(e,t){""===t.val()&&(h=!0,(o=t).removeClass("ng-scope"),c.$render(),t.on("$destroy",function(){o=void 0,h=!1}))}):(o.removeClass("ng-scope"),h=!0)):o=ue(A.cloneNode(!1)),a.empty(),y(),e.$watchCollection(m.getWatchables,y)}}}}],ao=["$locale","$interpolate","$log",function(p,m,g){var _=/{}/g,b=/^when(Minus)?(.+)$/;return{link:function(i,a,o){var s,e=o.count,c=o.$attr.when&&a.attr(o.$attr.when),l=o.offset||0,u=i.$eval(c)||{},f={},t=m.startSymbol(),n=m.endSymbol(),r=t+e+"-"+l+n,d=v.noop;function h(e){a.text(e||"")}fe(o,function(e,t){var n=b.exec(t);if(n){var r=(n[1]?"-":"")+S(n[2]);u[r]=a.attr(o.$attr[t])}}),fe(u,function(e,t){f[t]=m(e.replace(_,r))}),i.$watch(e,function(e){var t=parseFloat(e),n=E(t);if(n||t in u||(t=p.pluralCat(t-l)),!(t===s||n&&E(s))){d();var r=f[t];ge(r)?(null!=e&&g.debug("ngPluralize: no rule defined for '"+t+"' in "+c),d=pe,h()):d=i.$watch(r,h),s=t}})}}}],oo=["$parse","$animate","$compile",function(c,I,l){var P="$$NG_REMOVED",M=w("ngRepeat"),$=function(e,t,n,r,i,a,o){e[n]=r,i&&(e[i]=a),e.$index=t,e.$first=0===t,e.$last=t===o-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0==(1&t))};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(e,t){var C=t.ngRepeat,A=l.$$createComment("end ngRepeat",C),n=C.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!n)throw M("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",C);var r=n[1],i=n[2],S=n[3],a=n[4];if(!(n=r.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/)))throw M("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",r);var o,T,x,k,E=n[3]||n[1],D=n[2];if(S&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(S)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(S)))throw M("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",S);var s={$id:Pt};return a?o=c(a):(x=function(e,t){return Pt(t)},k=function(e){return e}),function(b,v,e,t,y){o&&(T=function(e,t,n){return D&&(s[D]=e),s[E]=t,s.$index=n,o(b,s)});var w=Oe();b.$watchCollection(i,function(e){var r,t,n,i,a,o,s,c,l,u,f,d,h,p=v[0],m=Oe();if(S&&(b[S]=e),O(e))l=e,c=T||x;else for(var g in c=T||k,l=[],e)B.call(e,g)&&"$"!==g.charAt(0)&&l.push(g);for(i=l.length,f=new Array(i),r=0;r<i;r++)if(a=e===l?r:l[r],o=e[a],s=c(a,o,r),w[s])u=w[s],delete w[s],m[s]=u,f[r]=u;else{if(m[s])throw fe(f,function(e){e&&e.scope&&(w[e.id]=e)}),M("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",C,s,o);f[r]={id:s,scope:void 0,clone:void 0},m[s]=!0}for(var _ in w){if(d=$e((u=w[_]).clone),I.leave(d),d[0].parentNode)for(r=0,t=d.length;r<t;r++)d[r][P]=!0;u.scope.$destroy()}for(r=0;r<i;r++)if(a=e===l?r:l[r],o=e[a],(u=f[r]).scope){for(n=p;(n=n.nextSibling)&&n[P];);u.clone[0]!==n&&I.move($e(u.clone),null,p),p=(h=u).clone[h.clone.length-1],$(u.scope,r,E,o,D,a,i)}else y(function(e,t){u.scope=t;var n=A.cloneNode(!1);e[e.length++]=n,I.enter(e,null,p),p=n,u.clone=e,m[u.id]=u,$(u.scope,r,E,o,D,a,i)});w=m})}}}}],so="ng-hide",co="ng-hide-animate",lo=["$animate",function(r){return{restrict:"A",multiElement:!0,link:function(e,t,n){e.$watch(n.ngShow,function(e){r[e?"removeClass":"addClass"](t,so,{tempClasses:co})})}}}],uo=["$animate",function(r){return{restrict:"A",multiElement:!0,link:function(e,t,n){e.$watch(n.ngHide,function(e){r[e?"addClass":"removeClass"](t,so,{tempClasses:co})})}}}],fo=Ui(function(e,n,t){e.$watch(t.ngStyle,function(e,t){t&&e!==t&&fe(t,function(e,t){n.css(t,"")}),e&&n.css(e)},!0)}),ho=["$animate","$compile",function(u,f){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(e,t,n,i){var r=n.ngSwitch||n.on,a=[],o=[],s=[],c=[],l=function(t,n){return function(e){!1!==e&&t.splice(n,1)}};e.$watch(r,function(e){for(var t,n;s.length;)u.cancel(s.pop());for(t=0,n=c.length;t<n;++t){var r=$e(o[t].clone);c[t].$destroy(),(s[t]=u.leave(r)).done(l(s,t))}o.length=0,c.length=0,(a=i.cases["!"+e]||i.cases["?"])&&fe(a,function(i){i.transclude(function(e,t){c.push(t);var n=i.element;e[e.length++]=f.$$createComment("end ngSwitchWhen");var r={clone:e};o.push(r),u.enter(e,n.parent(),n)})})})}}}],po=Ui({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){fe(n.ngSwitchWhen.split(n.ngSwitchWhenSeparator).sort().filter(function(e,t,n){return n[t-1]!==e}),function(e){r.cases["!"+e]=r.cases["!"+e]||[],r.cases["!"+e].push({transclude:i,element:t})})}}),mo=Ui({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),go=w("ngTransclude"),_o=["$compile",function(t){return{restrict:"EAC",terminal:!0,compile:function(e){var s=t(e.contents());return e.empty(),function(e,n,t,r,i){if(!i)throw go("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",Ie(n));t.ngTransclude===t.$attr.ngTransclude&&(t.ngTransclude="");var a=t.ngTransclude||t.ngTranscludeSlot;function o(){s(e,function(e){n.append(e)})}i(function(e,t){e.length?n.append(e):(o(),t.$destroy())},null,a),a&&!i.isSlotFilled(a)&&o()}}}}],bo=["$templateCache",function(i){return{restrict:"E",terminal:!0,compile:function(e,t){if("text/ng-template"===t.type){var n=t.id,r=e[0].text;i.put(n,r)}}}}],vo={$setViewValue:pe,$render:pe};var yo=["$element","$scope",function(n,e){var o=this,i=new Mt;o.ngModelCtrl=vo,o.unknownOption=ue(j.document.createElement("option")),o.renderUnknownOption=function(e){var t="? "+Pt(e)+" ?";o.unknownOption.val(t),n.prepend(o.unknownOption),n.val(t)},e.$on("$destroy",function(){o.renderUnknownOption=pe}),o.removeUnknownOption=function(){o.unknownOption.parent()&&o.unknownOption.remove()},o.readValue=function(){return o.removeUnknownOption(),n.val()},o.writeValue=function(e){o.hasOption(e)?(o.removeUnknownOption(),n.val(e),""===e&&o.emptyOption.prop("selected",!0)):null==e&&o.emptyOption?(o.removeUnknownOption(),n.val("")):o.renderUnknownOption(e)},o.addOption=function(e,t){if(t[0].nodeType!==Le){ce(e,'"option value"'),""===e&&(o.emptyOption=t);var n,r=i.get(e)||0;i.put(e,r+1),o.ngModelCtrl.$render(),(n=t)[0].hasAttribute("selected")&&(n[0].selected=!0)}},o.removeOption=function(e){var t=i.get(e);t&&(1===t?(i.remove(e),""===e&&(o.emptyOption=void 0)):i.put(e,t-1))},o.hasOption=function(e){return!!i.get(e)},o.registerOption=function(e,n,r,t,i){var a;t?r.$observe("value",function(e){_e(a)&&o.removeOption(a),a=e,o.addOption(e,n)}):i?e.$watch(i,function(e,t){r.$set("value",e),t!==e&&o.removeOption(t),o.addOption(e,n)}):o.addOption(r.value,n);n.on("$destroy",function(){o.removeOption(r.value),o.ngModelCtrl.$render()})}}],wo=function(){return{restrict:"E",require:["select","?ngModel"],controller:yo,priority:1,link:{pre:function(e,n,t,r){var i=r[1];if(!i)return;var a=r[0];if(a.ngModelCtrl=i,n.on("change",function(){e.$apply(function(){i.$setViewValue(a.readValue())})}),t.multiple){a.readValue=function(){var t=[];return fe(n.find("option"),function(e){e.selected&&t.push(e.value)}),t},a.writeValue=function(e){var t=new Mt(e);fe(n.find("option"),function(e){e.selected=_e(t.get(e.value))})};var o,s=NaN;e.$watch(function(){s!==i.$viewValue||ke(o,i.$viewValue)||(o=je(i.$viewValue),i.$render()),s=i.$viewValue}),i.$isEmpty=function(e){return!e||0===e.length}}},post:function(e,t,n,r){var i=r[1];if(!i)return;var a=r[0];i.$render=function(){a.writeValue(i.$viewValue)}}}}},Co=["$interpolate",function(n){return{restrict:"E",priority:100,compile:function(e,t){var o,s;return _e(t.ngValue)?o=!0:_e(t.value)?o=n(t.value,!0):(s=n(e.text(),!0))||t.$set("value",e.text()),function(e,t,n){var r="$selectController",i=t.parent(),a=i.data(r)||i.parent().data(r);a&&a.registerOption(e,t,n,o,s)}}}}],Ao=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){r&&(n.required=!0,r.$validators.required=function(e,t){return!n.required||!r.$isEmpty(t)},n.$observe("required",function(){r.$validate()}))}}},So=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i,a=n.ngPattern||n.pattern;n.$observe("pattern",function(e){if(ve(e)&&0<e.length&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw w("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",a,e,Ie(t));i=e||void 0,r.$validate()}),r.$validators.pattern=function(e,t){return r.$isEmpty(t)||ge(i)||i.test(t)}}}}},To=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=-1;n.$observe("maxlength",function(e){var t=m(e);i=E(t)?-1:t,r.$validate()}),r.$validators.maxlength=function(e,t){return i<0||r.$isEmpty(t)||t.length<=i}}}}},xo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=0;n.$observe("minlength",function(e){i=m(e)||0,r.$validate()}),r.$validators.minlength=function(e,t){return r.$isEmpty(t)||t.length>=i}}}}};j.angular.bootstrap?j.console&&console.log("WARNING: Tried to load angular more than once."):(!function(){var i;if(!oe){var e=L();(o=ge(e)?j.jQuery:e?j[e]:void 0)&&o.fn.on?(de((ue=o).fn,{scope:At.scope,isolateScope:At.isolateScope,controller:At.controller,injector:At.injector,inheritedData:At.inheritedData}),i=o.cleanData,o.cleanData=function(e){for(var t,n,r=0;null!=(n=e[r]);r++)(t=o._data(n,"events"))&&t.$destroy&&o(n).triggerHandler("$destroy");i(e)}):ue=ct,v.element=ue,oe=!0}}(),de(v,{bootstrap:ne,copy:R,extend:de,merge:n,equals:ke,element:ue,forEach:fe,injector:Ut,noop:pe,bind:De,toJson:G,fromJson:W,identity:me,isUndefined:ge,isDefined:_e,isString:ve,isFunction:we,isObject:be,isNumber:C,isElement:$,isArray:ye,version:Ue,isDate:A,lowercase:S,uppercase:u,callbacks:{$$counter:0},getTestability:ie,$$minErr:w,$$csp:N,reloadWithDebugInfo:re}),(g=function(e){var u=w("$injector"),n=w("ng");function t(e,t,n){return e[t]||(e[t]=n())}var r=t(e,"angular",Object);return r.$$minErr=r.$$minErr||w,t(r,"module",function(){var e={};return function(s,c,l){return function(e,t){if("hasOwnProperty"===e)throw n("badname","hasOwnProperty is not a valid {0} name",t)}(s,"module"),c&&e.hasOwnProperty(s)&&(e[s]=null),t(e,s,function(){if(!c)throw u("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",s);var i=[],e=[],t=[],n=r("$injector","invoke","push",e),a={_invokeQueue:i,_configBlocks:e,_runBlocks:t,requires:c,name:s,provider:o("$provide","provider"),factory:o("$provide","factory"),service:o("$provide","service"),value:r("$provide","value"),constant:r("$provide","constant","unshift"),decorator:o("$provide","decorator"),animation:o("$animateProvider","register"),filter:o("$filterProvider","register"),controller:o("$controllerProvider","register"),directive:o("$compileProvider","directive"),component:o("$compileProvider","component"),config:n,run:function(e){return t.push(e),this}};return l&&n(l),a;function r(e,t,n,r){return r||(r=i),function(){return r[n||"push"]([e,t,arguments]),a}}function o(n,r){return function(e,t){return t&&we(t)&&(t.$$moduleName=s),i.push([n,r,arguments]),a}}})}})}(j))("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:Zr}),e.provider("$compile",cn).directive({a:Hi,input:va,textarea:va,form:Ki,script:bo,select:wo,option:Co,ngBind:Ca,ngBindHtml:Sa,ngBindTemplate:Aa,ngClass:ka,ngClassEven:Da,ngClassOdd:Ea,ngCloak:Ia,ngController:Pa,ngForm:Qi,ngHide:uo,ngIf:Oa,ngInclude:Ra,ngInit:La,ngNonBindable:to,ngPluralize:ao,ngRepeat:oo,ngShow:lo,ngStyle:fo,ngSwitch:ho,ngSwitchWhen:po,ngSwitchDefault:mo,ngOptions:io,ngTransclude:_o,ngModel:Qa,ngList:Fa,ngChange:Ta,pattern:So,ngPattern:So,required:Ao,ngRequired:Ao,minlength:xo,ngMinlength:xo,maxlength:To,ngMaxlength:To,ngValue:wa,ngModelOptions:Za}).directive({ngInclude:Na}).directive(Wi).directive(Ma),e.provider({$anchorScroll:Ht,$animate:Xt,$animateCss:en,$$animateJs:Kt,$$animateQueue:Qt,$$AnimateRunner:Jt,$$animateAsyncRun:Zt,$browser:nn,$cacheFactory:rn,$controller:gn,$document:_n,$exceptionHandler:bn,$filter:gi,$$forceReflow:vn,$interpolate:Gn,$interval:jn,$http:Rn,$httpParamSerializer:En,$httpParamSerializerJQLike:Dn,$httpBackend:Ln,$xhrFactory:Nn,$jsonpCallbacks:Bn,$location:ar,$log:or,$parse:zr,$rootScope:Xr,$q:Vr,$$q:Yr,$sce:ri,$sceDelegate:ni,$sniffer:ii,$templateCache:an,$templateRequest:oi,$$testability:si,$timeout:ci,$window:hi,$$rAF:Qr,$$jqLite:It,$$HashMap:$t,$$cookieReader:mi})}]),v.module("ngLocale",[],["$provide",function(e){var i="one",a="other";e.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a",short:"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(e,t){var n=0|e,r=function(e,t){var n,r,i=t;void 0===i&&(i=Math.min((n=e,-1==(r=(n+="").indexOf("."))?0:n.length-r-1),3));var a=Math.pow(10,i);return{v:i,f:(e*a|0)%a}}(e,t);return 1==n&&0==r.v?i:a}})}]),ue(j.document).ready(function(){te(j.document,ne)}))}(window),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'),function(l,e){"use strict";var oe,se,ce,le,Y=1,ue="-add",fe="-remove",de="ng-",A="ng-animate",K="$$ngAnimateChildren";se=void 0===l.ontransitionend&&void 0!==l.onwebkittransitionend?("-webkit-",oe="WebkitTransition","webkitTransitionEnd transitionend"):(oe="transition","transitionend"),le=void 0===l.onanimationend&&void 0!==l.onwebkitanimationend?("-webkit-",ce="WebkitAnimation","webkitAnimationEnd animationend"):(ce="animation","animationend");var i="Duration",he="TimingFunction",a="PlayState",n=ce+"Delay",pe=ce+i,r=oe+"Delay",t=oe+i,o=e.$$minErr("ng");function u(e,t,n){if(!e)throw o("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function S(e,t){return e||t?e?t?($e(e)&&(e=e.join(" ")),$e(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function me(e,n,r){var i="";return e=$e(e)?e:e&&te(e)&&e.length?e.split(/\s+/):[],Me(e,function(e,t){e&&0<e.length&&(i+=0<t?" ":"",i+=r?n+e:e+n)}),i}function Q(e){if(!e[0])return e;for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType==Y)return n}}function T(c){return function(e,t){var n,r,i,a,o,s;t.addClass&&(n=c,r=e,i=t.addClass,Me(r,function(e){n.addClass(e,i)}),t.addClass=null),t.removeClass&&(a=c,o=e,s=t.removeClass,Me(o,function(e){a.removeClass(e,s)}),t.removeClass=null)}}function ge(e){if(!(e=e||{}).$$prepared){var t=e.domOperation||Oe;e.domOperation=function(){e.$$domOperationFired=!0,t(),t=Oe},e.$$prepared=!0}return e}function _e(e,t){be(e,t),ve(e,t)}function be(e,t){t.from&&(e.css(t.from),t.from=null)}function ve(e,t){t.to&&(e.css(t.to),t.to=null)}function X(e,t,n){var r=t.options||{},i=n.options||{},a=(r.addClass||"")+" "+(i.addClass||""),o=(r.removeClass||"")+" "+(i.removeClass||""),s=function(i,e,t){var n={};i=r(i),e=r(e),Me(e,function(e,t){n[t]=1}),t=r(t),Me(t,function(e,t){n[t]=1===n[t]?null:-1});var a={addClass:"",removeClass:""};function r(e){te(e)&&(e=e.split(" "));var t={};return Me(e,function(e){e.length&&(t[e]=!0)}),t}return Me(n,function(e,t){var n,r;1===e?(n="addClass",r=!i[t]||i[t+fe]):-1===e&&(n="removeClass",r=i[t]||i[t+ue]),r&&(a[n].length&&(a[n]+=" "),a[n]+=t)}),a}(e.attr("class"),a,o);i.preparationClasses&&(r.preparationClasses=Z(i.preparationClasses,r.preparationClasses),delete i.preparationClasses);var c=r.domOperation!==Oe?r.domOperation:null;return d(r,i),c&&(r.domOperation=c),s.addClass?r.addClass=s.addClass:r.addClass=null,s.removeClass?r.removeClass=s.removeClass:r.removeClass=null,t.addClass=r.addClass,t.removeClass=r.removeClass,r}function ye(e){return e instanceof re?e[0]:e}function we(e,t){var n=t?"-"+t+"s":"";return Ae(e,[r,n]),[r,n]}function Ce(e,t){var n=t?"paused":"",r=ce+a;return Ae(e,[r,n]),[r,n]}function Ae(e,t){var n=t[0],r=t[1];e.style[n]=r}function Z(e,t){return e?t?e+" "+t:e:t}var s=["$interpolate",function(a){return{link:function(e,t,n){var r=n.ngAnimateChildren;function i(e){e="on"===e||"true"===e,t.data(K,e)}te(r)&&0===r.length?t.data(K,!0):(i(a(r)(e)),n.$observe("ngAnimateChildren",i))}}}],Se="$$animateCss",f={transitionDuration:t,transitionDelay:r,transitionProperty:oe+"Property",animationDuration:pe,animationDelay:n,animationIterationCount:ce+"IterationCount"},Te={transitionDuration:t,transitionDelay:r,animationDuration:pe,animationDelay:n};function xe(e,t){return[t?n:r,e+"s"]}function ke(e,t,n){var o=Object.create(null),s=e.getComputedStyle(t)||{};return Me(n,function(e,t){var n,r,i=s[e];if(i){var a=i.charAt(0);("-"===a||"+"===a||0<=a)&&(n=0,r=i.split(/\s*,\s*/),Me(r,function(e){"s"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e=parseFloat(e)||0,n=n?Math.max(e,n):e}),i=n),0===i&&(i=null),o[t]=i}}),o}function Ee(e){return 0===e||null!=e}function De(e,t){var n=oe,r=e+"s";return t?n+=i:r+=" linear all",[n,r]}function c(){var n=Object.create(null);return{flush:function(){n=Object.create(null)},count:function(e){var t=n[e];return t?t.total:0},get:function(e){var t=n[e];return t&&t.value},put:function(e,t){n[e]?n[e].total++:n[e]={total:1,value:t}}}}function Ie(t,n,e){Me(e,function(e){t[e]=J(t[e])?t[e]:n.style.getPropertyValue(e)})}var Pe,d,Me,$e,J,h,w,ee,te,ne,re,Oe,p=["$animateProvider",function(e){var ie=c(),ae=c();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(Y,K,Q,X,n,Z,t,J){var ee=T(K),i=0;function te(e,t){var n="$$ngAnimateParentKey",r=e.parentNode;return(r[n]||(r[n]=++i))+"-"+e.getAttribute("class")+"-"+t}var r=[];function ne(e){r.push(e),t.waitUntilQuiet(function(){ie.flush(),ae.flush();for(var e=n(),t=0;t<r.length;t++)r[t](e);r.length=0})}function re(e,t,n){var r,i,a,o,s=(r=e,i=n,a=f,(o=ie.get(i))||"infinite"===(o=ke(Y,r,a)).animationIterationCount&&(o.animationIterationCount=1),ie.put(i,o),o),c=s.animationDelay,l=s.transitionDelay;return s.maxDelay=c&&l?Math.max(c,l):c||l,s.maxDuration=Math.max(s.animationDuration*s.animationIterationCount,s.transitionDuration),s}return function(l,e){var u=e||{};u.$$prepared||(u=ge(Pe(u)));var f={},d=ye(l);if(!d||!d.parentNode||!J.enabled())return q();var t,n,h,a,o,r,i,p,m,g,_,b,v=[],s=l.attr("class"),c=(n={},(t=u)&&(t.to||t.from)&&(n.to=t.to,n.from=t.from),n),y=[];if(0===u.duration||!Z.animations&&!Z.transitions)return q();var w=u.event&&$e(u.event)?u.event.join(" "):u.event,C="",A="";w&&u.structural?C=me(w,de,!0):w&&(C=w),u.addClass&&(A+=me(u.addClass,ue)),u.removeClass&&(A.length&&(A+=" "),A+=me(u.removeClass,fe)),u.applyClassesEarly&&A.length&&ee(l,u);var S,T,x,k=[C,A].join(" ").trim(),E=s+" "+k,D=me(k,"-active"),I=c.to&&0<Object.keys(c.to).length;if(!(0<(u.keyframeStyle||"").length)&&!I&&!k)return q();if(0<u.stagger){var P=parseFloat(u.stagger);T={transitionDelay:P,animationDelay:P,transitionDuration:0,animationDuration:0}}else S=te(d,E),T=function(e,t,n,r){var i;if(0<ie.count(n)&&!(i=ae.get(n))){var a=me(t,"-stagger");K.addClass(e,a),(i=ke(Y,e,r)).animationDuration=Math.max(i.animationDuration,0),i.transitionDuration=Math.max(i.transitionDuration,0),K.removeClass(e,a),ae.put(n,i)}return i||{}}(d,k,S,Te);if(u.$$skipPreparationClasses||K.addClass(l,k),u.transitionStyle){var M=[oe,u.transitionStyle];Ae(d,M),v.push(M)}if(0<=u.duration){x=0<d.style[oe].length;var $=De(u.duration,x);Ae(d,$),v.push($)}if(u.keyframeStyle){var O=[ce,u.keyframeStyle];Ae(d,O),v.push(O)}var R=T?0<=u.staggerIndex?u.staggerIndex:ie.count(S):0,N=0===R;N&&!u.skipBlocking&&we(d,9999);var L=re(d,0,S),F=L.maxDelay;p=Math.max(F,0),g=L.maxDuration;var G,j={};if(j.hasTransitions=0<L.transitionDuration,j.hasAnimations=0<L.animationDuration,j.hasTransitionAll=j.hasTransitions&&"all"==L.transitionProperty,j.applyTransitionDuration=I&&(j.hasTransitions&&!j.hasTransitionAll||j.hasAnimations&&!j.hasTransitions),j.applyAnimationDuration=u.duration&&j.hasAnimations,j.applyTransitionDelay=Ee(u.delay)&&(j.applyTransitionDuration||j.hasTransitions),j.applyAnimationDelay=Ee(u.delay)&&j.hasAnimations,j.recalculateTimingStyles=0<A.length,(j.applyTransitionDuration||j.applyAnimationDuration)&&(g=u.duration?parseFloat(u.duration):g,j.applyTransitionDuration&&(j.hasTransitions=!0,L.transitionDuration=g,x=0<d.style[oe+"Property"].length,v.push(De(g,x))),j.applyAnimationDuration&&(j.hasAnimations=!0,L.animationDuration=g,v.push([pe,g+"s"]))),0===g&&!j.recalculateTimingStyles)return q();null!=u.delay&&("boolean"!=typeof u.delay&&(G=parseFloat(u.delay),p=Math.max(G,0)),j.applyTransitionDelay&&v.push(xe(G)),j.applyAnimationDelay&&v.push(xe(G,!0)));return null==u.duration&&0<L.transitionDuration&&(j.recalculateTimingStyles=j.recalculateTimingStyles||N),m=1e3*p,_=1e3*g,u.skipBlocking||(j.blockTransition=0<L.transitionDuration,j.blockKeyframeAnimation=0<L.animationDuration&&0<T.animationDelay&&0===T.animationDuration),u.from&&(u.cleanupStyles&&Ie(f,d,Object.keys(u.from)),be(l,u)),j.blockTransition||j.blockKeyframeAnimation?W(g):u.skipBlocking||we(d,!1),{$$willAnimate:!0,end:B,start:function(){if(!h)return r=new Q(i={end:B,cancel:U,resume:null,pause:null}),ne(V),r}};function B(){H()}function U(){H(!0)}function H(e){if(!(h||o&&a)){a=!(h=!0),u.$$skipPreparationClasses||K.removeClass(l,k),K.removeClass(l,D),Ce(d,!1),we(d,!1),Me(v,function(e){d.style[e[0]]=""}),ee(l,u),_e(l,u),Object.keys(f).length&&Me(f,function(e,t){e?d.style.setProperty(t,e):d.style.removeProperty(t)}),u.onDone&&u.onDone(),y&&y.length&&l.off(y.join(" "),z);var t=l.data(Se);t&&(X.cancel(t[0].timer),l.removeData(Se)),r&&r.complete(!e)}}function W(e){j.blockTransition&&we(d,e),j.blockKeyframeAnimation&&Ce(d,!!e)}function q(){return r=new Q({end:B,cancel:U}),ne(Oe),H(),{$$willAnimate:!1,start:function(){return r},end:B}}function z(e){e.stopPropagation();var t=e.originalEvent||e,n=t.$manualTimeStamp||Date.now(),r=parseFloat(t.elapsedTime.toFixed(3));Math.max(n-b,0)>=m&&g<=r&&(o=!0,H())}function V(){if(!h)if(d.parentNode){var e=function(e){if(o)a&&e&&(a=!1,H());else if(a=!e,L.animationDuration){var t=Ce(d,a);a?v.push(t):(r=t,i=(n=v).indexOf(r),0<=r&&n.splice(i,1))}var n,r,i},t=0<R&&(L.transitionDuration&&0===T.transitionDuration||L.animationDuration&&0===T.animationDuration)&&Math.max(T.animationDelay,T.transitionDelay);t?X(n,Math.floor(t*R*1e3),!1):n(),i.resume=function(){e(!0)},i.pause=function(){e(!1)}}else H();function n(){if(!h){if(W(!1),Me(v,function(e){var t=e[0],n=e[1];d.style[t]=n}),ee(l,u),K.addClass(l,D),j.recalculateTimingStyles){if(E=d.className+" "+k,S=te(d,E),L=re(d,0,S),F=L.maxDelay,p=Math.max(F,0),0===(g=L.maxDuration))return void H();j.hasTransitions=0<L.transitionDuration,j.hasAnimations=0<L.animationDuration}if(j.applyAnimationDelay&&(F="boolean"!=typeof u.delay&&Ee(u.delay)?parseFloat(u.delay):F,p=Math.max(F,0),L.animationDelay=F,G=xe(F,!0),v.push(G),d.style[G[0]]=G[1]),m=1e3*p,_=1e3*g,u.easing){var e,t=u.easing;j.hasTransitions&&(e=oe+he,v.push([e,t]),d.style[e]=t),j.hasAnimations&&(e=ce+he,v.push([e,t]),d.style[e]=t)}L.transitionDuration&&y.push(se),L.animationDuration&&y.push(le),b=Date.now();var n=m+1.5*_,r=b+n,i=l.data(Se)||[],a=!0;if(i.length){var o=i[0];(a=r>o.expectedEndTime)?X.cancel(o.timer):i.push(H)}if(a){var s=X(c,n,!1);i[0]={timer:s,expectedEndTime:r},i.push(H),l.data(Se,i)}y.length&&l.on(y.join(" "),z),u.to&&(u.cleanupStyles&&Ie(f,d,Object.keys(u.to)),ve(l,u))}}function c(){var e=l.data(Se);if(e){for(var t=1;t<e.length;t++)e[t]();l.removeData(Se)}}}}}]}],m=["$$animationProvider",function(e){e.drivers.push("$$animateCssDriver");var v="ng-animate-shim",y="ng-anchor-out";this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(h,e,p,t,n,r,i){if(!n.animations&&!n.transitions)return Oe;var a,m=i[0].body,o=ye(t),g=re((a=o).parentNode&&11===a.parentNode.nodeType||m.contains(o)?o:m);T(r);return function(e){return e.from&&e.to?function(e,t,n,r){var i=s(e),a=s(t),o=[];if(Me(r,function(e){var t=function(e,t,i){var a=re(ye(t).cloneNode(!0)),o=_(u(a));t.addClass(v),i.addClass(v),a.addClass("ng-anchor"),g.append(a);var r,n,s=(n=h(a,{addClass:y,delay:!0,from:l(t)})).$$willAnimate?n:null;if(!s&&!(r=f()))return d();var c=s||r;return{start:function(){var e,t=c.start();return t.done(function(){if(t=null,!r&&(r=f()))return(t=r.start()).done(function(){t=null,d(),e.complete()}),t;d(),e.complete()}),e=new p({end:n,cancel:n});function n(){t&&t.end()}}};function l(e){var n={},r=ye(e).getBoundingClientRect();return Me(["width","height","top","left"],function(e){var t=r[e];switch(e){case"top":t+=m.scrollTop;break;case"left":t+=m.scrollLeft}n[e]=Math.floor(t)+"px"}),n}function u(e){return e.attr("class")||""}function f(){var e=_(u(i)),t=b(e,o),n=b(o,e),r=h(a,{to:l(i),addClass:"ng-anchor-in "+t,removeClass:y+" "+n,delay:!0});return r.$$willAnimate?r:null}function d(){a.remove(),t.removeClass(v),i.removeClass(v)}}(0,e.out,e.in);t&&o.push(t)}),!i&&!a&&0===o.length)return;return{start:function(){var t=[];i&&t.push(i.start()),a&&t.push(a.start()),Me(o,function(e){t.push(e.start())});var n=new p({end:e,cancel:e});return p.all(t,function(e){n.complete(e)}),n;function e(){Me(t,function(e){e.end()})}}}}(e.from,e.to,e.classes,e.anchors):s(e)};function _(e){return e.replace(/\bng-\S+\b/g,"")}function b(e,t){return te(e)&&(e=e.split(" ")),te(t)&&(t=t.split(" ")),e.filter(function(e){return-1===t.indexOf(e)}).join(" ")}function s(e){var t=e.element,n=e.options||{};e.structural&&(n.event=e.event,n.structural=!0,n.applyClassesEarly=!0,"leave"===e.event&&(n.onDone=n.domOperation)),n.preparationClasses&&(n.event=Z(n.event,n.preparationClasses));var r=h(t,n);return r.$$willAnimate?r:null}}]}],g=["$animateProvider",function(y){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(_,b,e){var v=T(e);return function(e,t,n,r){var i=!1;3===arguments.length&&ee(n)&&(r=n,n=null),r=ge(r),n||(n=e.attr("class")||"",r.addClass&&(n+=" "+r.addClass),r.removeClass&&(n+=" "+r.removeClass));var a,o,s,c,l,u=r.addClass,f=r.removeClass,d=function(e){e=$e(e)?e:e.split(" ");for(var t=[],n={},r=0;r<e.length;r++){var i=e[r],a=y.$$registeredAnimations[i];a&&!n[i]&&(t.push(_.get(a)),n[i]=!0)}return t}(n);d.length&&(s="leave"==t?(c="leave","afterLeave"):(c="before"+t.charAt(0).toUpperCase()+t.substr(1),t),"enter"!==t&&"move"!==t&&(a=g(e,t,r,d,c)),o=g(e,t,r,d,s));if(a||o)return{$$willAnimate:!0,end:function(){return l?l.end():(p(),(l=new b).complete(!0)),l},start:function(){if(l)return l;var t;l=new b;var e=[];return a&&e.push(function(e){t=a(e)}),e.length?e.push(function(e){h(),e(!0)}):h(),o&&e.push(function(e){t=o(e)}),l.setHost({end:function(){r()},cancel:function(){r(!0)}}),b.chain(e,n),l;function n(e){p(),l.complete(e)}function r(e){i||((t||Oe)(e),n(e))}}};function h(){r.domOperation(),v(e,r)}function p(){i=!0,h(),_e(e,r)}function m(o,s,c,e,t){var n=[];return Me(e,function(e){var a=e[t];a&&n.push(function(){var t,n,r=!1,i=function(e){r||(r=!0,(n||Oe)(e),t.complete(!e))};return t=new b({end:function(){i()},cancel:function(){i(!0)}}),n=function(e,t,n,r,i){var a;switch(n){case"animate":a=[t,r.from,r.to,i];break;case"setClass":a=[t,u,f,i];break;case"addClass":a=[t,u,i];break;case"removeClass":a=[t,f,i];break;default:a=[t,i]}a.push(r);var o=e.apply(e,a);if(o)if(w(o.start)&&(o=o.start()),o instanceof b)o.done(i);else if(w(o))return o;return Oe}(a,o,s,c,function(e){i(!1===e)}),t})}),n}function g(e,t,n,r,i){var a,o,s=m(e,t,n,r,i);0===s.length&&("beforeSetClass"===i?(a=m(e,"removeClass",n,r,"beforeRemoveClass"),o=m(e,"addClass",n,r,"beforeAddClass")):"setClass"===i&&(a=m(e,"removeClass",n,r,"removeClass"),o=m(e,"addClass",n,r,"addClass")),a&&(s=s.concat(a)),o&&(s=s.concat(o)));if(0!==s.length)return function(e){var n=[];return s.length&&Me(s,function(e){n.push(e())}),n.length?b.all(n,e):e(),function(t){Me(n,function(e){t?e.cancel():e.end()})}}}}}]}],_=["$$animationProvider",function(e){e.drivers.push("$$animateJsDriver"),this.$get=["$$animateJs","$$AnimateRunner",function(a,o){return function(e){if(e.from&&e.to){var r=t(e.from),i=t(e.to);if(!r&&!i)return;return{start:function(){var e=[];r&&e.push(r.start()),i&&e.push(i.start()),o.all(e,function(e){t.complete(e)});var t=new o({end:n(),cancel:n()});return t;function n(){return function(){Me(e,function(e){e.end()})}}}}}return t(e)};function t(e){var t=e.element,n=e.event,r=e.options,i=e.classes;return a(t,n,i,r)}}]}],ie="data-ng-animate",ae="$ngAnimatePin",b=["$animateProvider",function(c){var r=" ",i=this.rules={skip:[],cancel:[],join:[]};function s(e,t){if(e&&t){var n=function(e){if(!e)return null;var t=e.split(r),n=Object.create(null);return Me(t,function(e){n[e]=!0}),n}(t);return e.split(r).some(function(e){return n[e]})}}function z(e,t,n,r){return i[e].some(function(e){return e(t,n,r)})}function V(e,t){var n=0<(e.addClass||"").length,r=0<(e.removeClass||"").length;return t?n&&r:n||r}i.join.push(function(e,t,n){return!t.structural&&V(t)}),i.skip.push(function(e,t,n){return!t.structural&&!V(t)}),i.skip.push(function(e,t,n){return"leave"==n.event&&t.structural}),i.skip.push(function(e,t,n){return n.structural&&2===n.state&&!t.structural}),i.cancel.push(function(e,t,n){return n.structural&&t.structural}),i.cancel.push(function(e,t,n){return 2===n.state&&t.structural}),i.cancel.push(function(e,t,n){if(n.structural)return!1;var r=t.addClass,i=t.removeClass,a=n.addClass,o=n.removeClass;return!(ne(r)&&ne(i)||ne(a)&&ne(o))&&(s(r,o)||s(i,a))}),this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow",function(E,D,I,P,e,M,$,t,n,r){var O=new e,R=new e,N=null;var i=D.$watch(function(){return 0===t.totalPendingRequests},function(e){e&&(i(),D.$$postDigest(function(){D.$$postDigest(function(){null===N&&(N=!0)})}))}),L=Object.create(null),a=c.classNameFilter(),F=a?function(e){return a.test(e)}:function(){return!0},G=T(n);function j(e,t){return X(e,t,{})}var B=l.Node.prototype.contains||function(e){return this===e||!!(16&this.compareDocumentPosition(e))};function o(e,t,n){var r=Q(t);return e.filter(function(e){return!(e.node===r&&(!n||e.callback===n))})}function U(e,t){"close"!==e||t[0].parentNode||s.off(t)}var s={on:function(e,t,n){var r=Q(t);L[e]=L[e]||[],L[e].push({node:r,callback:n}),re(t).on("$destroy",function(){O.get(r)||s.off(e,t,n)})},off:function(e,t,n){if(1!==arguments.length||te(e)){var r=L[e];r&&(L[e]=1===arguments.length?null:o(r,t,n))}else for(var i in t=e,L)L[i]=o(L[i],t)},pin:function(e,t){u(h(e),"element","not an element"),u(h(t),"parentElement","not an element"),e.data(ae,t)},push:function(e,t,n,r){return(n=n||{}).domOperation=r,function(u,i,e){var a,f,o=Pe(e);(u=function(e){if(e instanceof re)switch(e.length){case 0:return e;case 1:if(e[0].nodeType===Y)return e;break;default:return re(Q(e))}if(e.nodeType===Y)return re(e)}(u))&&(a=ye(u),f=u.parent());o=ge(o);var s=new $,t=(n=!1,function(e){n?e():D.$$postDigest(function(){n=!0,e()})});var n;$e(o.addClass)&&(o.addClass=o.addClass.join(" "));o.addClass&&!te(o.addClass)&&(o.addClass=null);$e(o.removeClass)&&(o.removeClass=o.removeClass.join(" "));o.removeClass&&!te(o.removeClass)&&(o.removeClass=null);o.from&&!ee(o.from)&&(o.from=null);o.to&&!ee(o.to)&&(o.to=null);if(!a)return k(),s;var r=[a.className,o.addClass,o.removeClass].join(" ");if(!F(r))return k(),s;var c=0<=["enter","move","leave"].indexOf(i),l=P[0].hidden,d=!N||l||R.get(a),h=!d&&O.get(a)||{},p=!!h.state;d||p&&1==h.state||(d=!function(e,t,n){var r,i=re(P[0].body),a=W(e,i)||"HTML"===e[0].nodeName,o=W(e,I),s=!1,c=R.get(ye(e)),l=re.data(e[0],ae);l&&(t=l);t=ye(t);for(;t&&(o||(o=W(t,I)),t.nodeType===Y);){var u=O.get(t)||{};if(!s){var f=R.get(t);if(!0===f&&!1!==c){c=!0;break}!1===f&&(c=!1),s=u.structural}if(ne(r)||!0===r){var d=re.data(t,K);J(d)&&(r=d)}if(s&&!1===r)break;if(a||(a=W(t,i)),a&&o)break;t=o||!(l=re.data(t,ae))?t.parentNode:ye(l)}return(!s||r)&&!0!==c&&o&&a}(u,f));if(d)return l&&x(s,i,"start"),k(),l&&x(s,i,"close"),s;c&&(m=ye(u).querySelectorAll("["+ie+"]"),Me(m,function(e){var t=parseInt(e.getAttribute(ie)),n=O.get(e);if(n)switch(t){case 2:n.runner.end();case 1:O.remove(e)}}));var m;var g={structural:c,element:u,event:i,addClass:o.addClass,removeClass:o.removeClass,close:k,options:o,runner:s};if(p){var _=z("skip",u,g,h);if(_)return 2===h.state?(k(),s):(X(u,h,g),h.runner);var b=z("cancel",u,g,h);if(b)if(2===h.state)h.runner.end();else{if(!h.structural)return X(u,h,g),h.runner;h.close()}else{var v=z("join",u,g,h);if(v){if(2!==h.state)return y=u,C=o,A="",(w=c?i:null)&&(A=me(w,de,!0)),C.addClass&&(A=Z(A,me(C.addClass,ue))),C.removeClass&&(A=Z(A,me(C.removeClass,fe))),A.length&&(C.preparationClasses=A,y.addClass(A)),i=g.event=h.event,o=X(u,h,g),h.runner;j(u,g)}}}else j(u,g);var y,w,C,A;var S=g.structural;S||(S="animate"===g.event&&0<Object.keys(g.options.to||{}).length||V(g));if(!S)return k(),H(u),s;var T=(h.counter||0)+1;return g.counter=T,q(u,1,g),D.$$postDigest(function(){var e=O.get(a),t=!e;e=e||{};var n=0<(u.parent()||[]).length&&("animate"===e.event||e.structural||V(e));if(t||e.counter!==T||!n)return t&&(G(u,o),_e(u,o)),(t||c&&e.event!==i)&&(o.domOperation(),s.end()),void(n||H(u));i=!e.structural&&V(e,!0)?"setClass":e.event,q(u,2);var r=M(u,i,e.options);s.setHost(r),x(s,i,"start",{}),r.done(function(e){k(!e);var t=O.get(a);t&&t.counter===T&&H(ye(u)),x(s,i,"close",{})})}),s;function x(e,s,c,l){t(function(){var e,t,n,r,i,a,o=(e=f,t=s,n=ye(u),r=ye(e),i=[],(a=L[t])&&Me(a,function(e){B.call(e.node,n)?i.push(e.callback):"leave"===t&&B.call(e.node,r)&&i.push(e.callback)}),i);o.length?E(function(){Me(o,function(e){e(u,c,l)}),U(c,u)}):U(c,u)}),e.progress(s,c,l)}function k(e){var t,n;t=u,(n=o).preparationClasses&&(t.removeClass(n.preparationClasses),n.preparationClasses=null),n.activeClasses&&(t.removeClass(n.activeClasses),n.activeClasses=null),G(u,o),_e(u,o),o.domOperation(),s.complete(!e)}}(e,t,n)},enabled:function(e,t){var n=arguments.length;if(0===n)t=!!N;else if(h(e)){var r=ye(e);1===n?t=!R.get(r):R.put(r,!t)}else t=N=!!e;return t}};return s;function H(e){var t=ye(e);t.removeAttribute(ie),O.remove(t)}function W(e,t){return ye(e)===ye(t)}function q(e,t,n){(n=n||{}).state=t;var r=ye(e);r.setAttribute(ie,t);var i=O.get(r),a=i?d(i,n):n;O.put(r,a)}}]}],v=["$animateProvider",function(e){var v="ng-animate-ref",y=this.drivers=[],w="$$animationRunner";function C(e){return e.data(w)}this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(f,d,h,p,m,g){var _=[],b=T(f);return function(t,n,r){r=ge(r);var e,i=0<=["enter","move","leave"].indexOf(n),a=new p({end:function(){u()},cancel:function(){u(!0)}});if(!y.length)return u(),a;e=a,t.data(w,e);var o,s=S(t.attr("class"),S(r.addClass,r.removeClass)),c=r.tempClasses;return c&&(s+=" "+c,r.tempClasses=null),i&&(o="ng-"+n+"-prepare",f.addClass(t,o)),_.push({element:t,classes:s,event:n,structural:i,options:r,beforeStart:function(){t.addClass(A),c&&f.addClass(t,c);o&&(f.removeClass(t,o),o=null)},close:u}),t.on("$destroy",l),1<_.length||d.$$postDigest(function(){var t=[];Me(_,function(e){C(e.element)?t.push(e):e.close()}),_.length=0;var e=function(u){var f=[],d={};Me(u,function(e,n){var t,r,i,a=e.element,o=ye(a),s=e.event,c=0<=["enter","move"].indexOf(s),l=e.structural?(r=(t=o).hasAttribute(v)?[t]:t.querySelectorAll("[ng-animate-ref]"),i=[],Me(r,function(e){var t=e.getAttribute(v);t&&t.length&&i.push(e)}),i):[];if(l.length){var u=c?"to":"from";Me(l,function(e){var t=e.getAttribute(v);d[t]=d[t]||{},d[t][u]={animationID:n,element:re(e)}})}else f.push(e)});var h={},p={};return Me(d,function(e,t){var n=e.from,r=e.to;if(n&&r){var i=u[n.animationID],a=u[r.animationID],o=n.animationID.toString();if(!p[o]){var s=p[o]={structural:!0,beforeStart:function(){i.beforeStart(),a.beforeStart()},close:function(){i.close(),a.close()},classes:function(e,t){e=e.split(" "),t=t.split(" ");for(var n=[],r=0;r<e.length;r++){var i=e[r];if("ng-"!==i.substring(0,3))for(var a=0;a<t.length;a++)if(i===t[a]){n.push(i);break}}return n.join(" ")}(i.classes,a.classes),from:i,to:a,anchors:[]};s.classes.length?f.push(s):(f.push(i),f.push(a))}p[o].anchors.push({out:n.element,in:r.element})}else{var c=n?n.animationID:r.animationID,l=c.toString();h[l]||(h[l]=!0,f.push(u[c]))}}),f}(t),n=[];Me(e,function(i){n.push({domNode:ye(i.from?i.from.element:i.element),fn:function(){i.beforeStart();var e,t=i.close;if(C(i.anchors?i.from.element||i.to.element:i.element)){var n=function(e){for(var t=y.length-1;0<=t;t--){var n=y[t],r=h.get(n),i=r(e);if(i)return i}}(i);n&&(e=n.start)}if(e){var r=e();r.done(function(e){t(!e)}),function(e,n){e.from&&e.to?(t(e.from.element),t(e.to.element)):t(e.element);function t(e){var t=C(e);t&&t.setHost(n)}}(i,r)}else t()}})}),g(function(e){var t,i={children:[]},a=new m;for(t=0;t<e.length;t++){var n=e[t];a.put(n.domNode,e[t]={domNode:n.domNode,fn:n.fn,children:[]})}for(t=0;t<e.length;t++)o(e[t]);return function(e){var t,n=[],r=[];for(t=0;t<e.children.length;t++)r.push(e.children[t]);var i=r.length,a=0,o=[];for(t=0;t<r.length;t++){var s=r[t];i<=0&&(i=a,a=0,n.push(o),o=[]),o.push(s.fn),s.children.forEach(function(e){a++,r.push(e)}),i--}return o.length&&n.push(o),n}(i);function o(e){if(e.processed)return e;e.processed=!0;var t,n=e.domNode,r=n.parentNode;for(a.put(n,e);r;){if(t=a.get(r)){t.processed||(t=o(t));break}r=r.parentNode}return(t||i).children.push(e),e}}(n))}),a;function l(){var e=C(t);!e||"leave"===n&&r.$$domOperationFired||e.end()}function u(e){t.off("$destroy",l),t.removeData(w),b(t,r),_e(t,r),r.domOperation(),c&&f.removeClass(t,c),t.removeClass(A),a.complete(!e)}}}]}];e.module("ngAnimate",[],function(){Oe=e.noop,Pe=e.copy,d=e.extend,re=e.element,Me=e.forEach,$e=e.isArray,te=e.isString,ee=e.isObject,ne=e.isUndefined,J=e.isDefined,w=e.isFunction,h=e.isElement}).directive("ngAnimateSwap",["$animate","$rootScope",function(s,e){return{restrict:"A",transclude:"element",terminal:!0,priority:600,link:function(t,n,e,r,i){var a,o;t.$watchCollection(e.ngAnimateSwap||e.for,function(e){a&&s.leave(a),o&&(o.$destroy(),o=null),(e||0===e)&&(o=t.$new(),i(o,function(e){a=e,s.enter(e,null,n)}))})}}}]).directive("ngAnimateChildren",s).factory("$$rAFScheduler",["$$rAF",function(n){var r,i;function e(e){r=r.concat(e),a()}return r=e.queue=[],e.waitUntilQuiet=function(e){i&&i(),i=n(function(){i=null,e(),a()})},e;function a(){if(r.length){for(var e=r.shift(),t=0;t<e.length;t++)e[t]();i||n(function(){i||a()})}}}]).provider("$$animateQueue",b).provider("$$animation",v).provider("$animateCss",p).provider("$$animateCssDriver",m).provider("$$animateJs",g).provider("$$animateJsDriver",_)}(window,window.angular),function(e,t){"use strict";var n=t.module("ngAria",["ng"]).provider("$aria",function(){var c={ariaHidden:!0,ariaChecked:!0,ariaReadonly:!0,ariaDisabled:!0,ariaRequired:!0,ariaInvalid:!0,ariaValue:!0,tabindex:!0,bindKeypress:!0,bindRoleForClick:!0};function e(i,a,o,s){return function(e,t,n){var r=n.$normalize(a);!c[r]||l(t,o)||n[r]||e.$watch(n[i],function(e){e=s?!e:!!e,t.attr(a,e)})}}this.config=function(e){c=t.extend(c,e)},this.$get=function(){return{config:function(e){return c[e]},$$watchExpr:e}}}),a=["BUTTON","A","INPUT","TEXTAREA","SELECT","DETAILS","SUMMARY"],l=function(e,t){if(-1!==t.indexOf(e[0].nodeName))return!0};n.directive("ngShow",["$aria",function(e){return e.$$watchExpr("ngShow","aria-hidden",[],!0)}]).directive("ngHide",["$aria",function(e){return e.$$watchExpr("ngHide","aria-hidden",[],!1)}]).directive("ngValue",["$aria",function(e){return e.$$watchExpr("ngValue","aria-checked",a,!1)}]).directive("ngChecked",["$aria",function(e){return e.$$watchExpr("ngChecked","aria-checked",a,!1)}]).directive("ngReadonly",["$aria",function(e){return e.$$watchExpr("ngReadonly","aria-readonly",a,!1)}]).directive("ngRequired",["$aria",function(e){return e.$$watchExpr("ngRequired","aria-required",a,!1)}]).directive("ngModel",["$aria",function(u){function f(e,t,n,r){return u.config(t)&&!n.attr(e)&&(r||!l(n,a))}function d(e,t){return!t.attr("role")&&t.attr("type")===e&&"INPUT"!==t[0].nodeName}return{restrict:"A",require:"ngModel",priority:200,compile:function(e,t){var n,r,i,l=(r=(n=t).type,i=n.role,"checkbox"===(r||i)||"menuitemcheckbox"===i?"checkbox":"radio"===(r||i)||"menuitemradio"===i?"radio":"range"===r||"progressbar"===i||"slider"===i?"range":"");return{pre:function(e,t,n,r){"checkbox"===l&&(r.$isEmpty=function(e){return!1===e})},post:function(e,n,r,i){var t=f("tabindex","tabindex",n,!1);function a(){return i.$modelValue}switch(l){case"radio":case"checkbox":d(l,n)&&n.attr("role",l),f("aria-checked","ariaChecked",n,!1)&&e.$watch(a,"radio"===l?function(e){var t=r.value==i.$viewValue;n.attr("aria-checked",t)}:function(){n.attr("aria-checked",!i.$isEmpty(i.$viewValue))}),t&&n.attr("tabindex",0);break;case"range":if(d(l,n)&&n.attr("role","slider"),u.config("ariaValue")){var o=!n.attr("aria-valuemin")&&(r.hasOwnProperty("min")||r.hasOwnProperty("ngMin")),s=!n.attr("aria-valuemax")&&(r.hasOwnProperty("max")||r.hasOwnProperty("ngMax")),c=!n.attr("aria-valuenow");o&&r.$observe("min",function(e){n.attr("aria-valuemin",e)}),s&&r.$observe("max",function(e){n.attr("aria-valuemax",e)}),c&&e.$watch(a,function(e){n.attr("aria-valuenow",e)})}t&&n.attr("tabindex",0)}!r.hasOwnProperty("ngRequired")&&i.$validators.required&&f("aria-required","ariaRequired",n,!1)&&r.$observe("required",function(){n.attr("aria-required",!!r.required)}),f("aria-invalid","ariaInvalid",n,!0)&&e.$watch(function(){return i.$invalid},function(e){n.attr("aria-invalid",!!e)})}}}}}]).directive("ngDisabled",["$aria",function(e){return e.$$watchExpr("ngDisabled","aria-disabled",a,!1)}]).directive("ngMessages",function(){return{restrict:"A",require:"?ngMessages",link:function(e,t,n,r){t.attr("aria-live")||t.attr("aria-live","assertive")}}}).directive("ngClick",["$aria","$parse",function(i,n){return{restrict:"A",compile:function(e,t){var r=n(t.ngClick,null,!0);return function(n,e,t){l(e,a)||(i.config("bindRoleForClick")&&!e.attr("role")&&e.attr("role","button"),i.config("tabindex")&&!e.attr("tabindex")&&e.attr("tabindex",0),i.config("bindKeypress")&&!t.ngKeypress&&e.on("keypress",function(e){var t=e.which||e.keyCode;32!==t&&13!==t||n.$apply(function(){r(n,{$event:e})})}))}}}}]).directive("ngDblclick",["$aria",function(r){return function(e,t,n){!r.config("tabindex")||t.attr("tabindex")||l(t,a)||t.attr("tabindex",0)}}])}(window,window.angular),function(e,l){"use strict";function t(e,s,t){var c=t.baseHref(),r=e[0];return function(e,t,n){r.cookie=function(e,t,n){var r,i;i=(n=n||{}).expires,r=l.isDefined(n.path)?n.path:c,l.isUndefined(t)&&(i="Thu, 01 Jan 1970 00:00:00 GMT",t=""),l.isString(i)&&(i=new Date(i));var a=encodeURIComponent(e)+"="+encodeURIComponent(t);a+=r?";path="+r:"",a+=n.domain?";domain="+n.domain:"",a+=i?";expires="+i.toUTCString():"";var o=(a+=n.secure?";secure":"").length+1;return 4096<o&&s.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+o+" > 4096 bytes)!"),a}(e,t,n)}}l.module("ngCookies",["ng"]).provider("$cookies",[function(){var t=this.defaults={};function i(e){return e?l.extend({},t,e):t}this.$get=["$$cookieReader","$$cookieWriter",function(t,r){return{get:function(e){return t()[e]},getObject:function(e){var t=this.get(e);return t?l.fromJson(t):t},getAll:function(){return t()},put:function(e,t,n){r(e,t,i(n))},putObject:function(e,t,n){this.put(e,l.toJson(t),n)},remove:function(e,t){r(e,void 0,i(t))}}}]}]),l.module("ngCookies").factory("$cookieStore",["$cookies",function(n){return{get:function(e){return n.getObject(e)},put:function(e,t){n.putObject(e,t)},remove:function(e){n.remove(e)}}}]),t.$inject=["$document","$log","$browser"],l.module("ngCookies").provider("$$cookieWriter",function(){this.$get=t})}(window,window.angular),function(n){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return n(e,window,document)}):"object"==typeof exports?module.exports=function(e,t){return e||(e=window),t||(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t,e,e.document)}:n(jQuery,window,document)}(function(U,E,y,H){"use strict";var p,b,t,e,k=function(A){this.$=function(e,t){return this.api(!0).$(e,t)},this._=function(e,t){return this.api(!0).rows(e,t).data()},this.api=function(e){return new b(e?at(this[p.iApiIndex]):this)},this.fnAddData=function(e,t){var n=this.api(!0),r=U.isArray(e)&&(U.isArray(e[0])||U.isPlainObject(e[0]))?n.rows.add(e):n.row.add(e);return(t===H||t)&&n.draw(),r.flatten().toArray()},this.fnAdjustColumnSizing=function(e){var t=this.api(!0).columns.adjust(),n=t.settings()[0],r=n.oScroll;e===H||e?t.draw(!1):""===r.sX&&""===r.sY||Be(n)},this.fnClearTable=function(e){var t=this.api(!0).clear();(e===H||e)&&t.draw()},this.fnClose=function(e){this.api(!0).row(e).child.hide()},this.fnDeleteRow=function(e,t,n){var r=this.api(!0),i=r.rows(e),a=i.settings()[0],o=a.aoData[i[0][0]];return i.remove(),t&&t.call(this,a,o),(n===H||n)&&r.draw(),o},this.fnDestroy=function(e){this.api(!0).destroy(e)},this.fnDraw=function(e){this.api(!0).draw(e)},this.fnFilter=function(e,t,n,r,i,a){var o=this.api(!0);null===t||t===H?o.search(e,n,r,a):o.column(t).search(e,n,r,a),o.draw()},this.fnGetData=function(e,t){var n=this.api(!0);if(e===H)return n.data().toArray();var r=e.nodeName?e.nodeName.toLowerCase():"";return t!==H||"td"==r||"th"==r?n.cell(e,t).data():n.row(e).data()||null},this.fnGetNodes=function(e){var t=this.api(!0);return e!==H?t.row(e).node():t.rows().nodes().flatten().toArray()},this.fnGetPosition=function(e){var t=this.api(!0),n=e.nodeName.toUpperCase();if("TR"==n)return t.row(e).index();if("TD"!=n&&"TH"!=n)return null;var r=t.cell(e).index();return[r.row,r.columnVisible,r.column]},this.fnIsOpen=function(e){return this.api(!0).row(e).child.isShown()},this.fnOpen=function(e,t,n){return this.api(!0).row(e).child(t,n).show().child()[0]},this.fnPageChange=function(e,t){var n=this.api(!0).page(e);(t===H||t)&&n.draw(!1)},this.fnSetColumnVis=function(e,t,n){var r=this.api(!0).column(e).visible(t);(n===H||n)&&r.columns.adjust().draw()},this.fnSettings=function(){return at(this[p.iApiIndex])},this.fnSort=function(e){this.api(!0).order(e).draw()},this.fnSortListener=function(e,t,n){this.api(!0).order.listener(e,t,n)},this.fnUpdate=function(e,t,n,r,i){var a=this.api(!0);return n===H||null===n?a.row(t).data(e):a.cell(t,n).data(e),(i===H||i)&&a.columns.adjust(),(r===H||r)&&a.draw(),0},this.fnVersionCheck=p.fnVersionCheck;var S=this,T=A===H,x=this.length;for(var e in T&&(A={}),this.oApi=this.internal=p.internal,k.ext.internal)e&&(this[e]=Rt(e));return this.each(function(){var a,o=1<x?ct({},A,!0):A,s=0,e=this.getAttribute("id"),c=!1,t=k.defaults,l=U(this);if("table"==this.nodeName.toLowerCase()){P(t),M(t.column),D(t,t,!0),D(t.column,t.column,!0),D(t,U.extend(o,l.data()),!0);var n=k.settings;for(s=0,a=n.length;s<a;s++){var r=n[s];if(r.nTable==this||r.nTHead&&r.nTHead.parentNode==this||r.nTFoot&&r.nTFoot.parentNode==this){var i=o.bRetrieve!==H?o.bRetrieve:t.bRetrieve,u=o.bDestroy!==H?o.bDestroy:t.bDestroy;if(T||i)return r.oInstance;if(u){r.oInstance.fnDestroy();break}return void ot(r,0,"Cannot reinitialise DataTable",3)}if(r.sTableId==this.id){n.splice(s,1);break}}null!==e&&""!==e||(e="DataTables_Table_"+k.ext._unique++,this.id=e);var f=U.extend(!0,{},k.models.oSettings,{sDestroyWidth:l[0].style.width,sInstance:e,sTableId:e});f.nTable=this,f.oApi=S.internal,f.oInit=o,n.push(f),f.oInstance=1===S.length?S:l.dataTable(),P(o),I(o.oLanguage),o.aLengthMenu&&!o.iDisplayLength&&(o.iDisplayLength=U.isArray(o.aLengthMenu[0])?o.aLengthMenu[0][0]:o.aLengthMenu[0]),o=ct(U.extend(!0,{},t),o),st(f.oFeatures,o,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),st(f,o,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]),st(f.oScroll,o,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),st(f.oLanguage,o,"fnInfoCallback"),ut(f,"aoDrawCallback",o.fnDrawCallback,"user"),ut(f,"aoServerParams",o.fnServerParams,"user"),ut(f,"aoStateSaveParams",o.fnStateSaveParams,"user"),ut(f,"aoStateLoadParams",o.fnStateLoadParams,"user"),ut(f,"aoStateLoaded",o.fnStateLoaded,"user"),ut(f,"aoRowCallback",o.fnRowCallback,"user"),ut(f,"aoRowCreatedCallback",o.fnCreatedRow,"user"),ut(f,"aoHeaderCallback",o.fnHeaderCallback,"user"),ut(f,"aoFooterCallback",o.fnFooterCallback,"user"),ut(f,"aoInitComplete",o.fnInitComplete,"user"),ut(f,"aoPreDrawCallback",o.fnPreDrawCallback,"user"),f.rowIdFn=Q(o.rowId),$(f);var d=f.oClasses;if(U.extend(d,k.ext.classes,o.oClasses),l.addClass(d.sTable),f.iInitDisplayStart===H&&(f.iInitDisplayStart=o.iDisplayStart,f._iDisplayStart=o.iDisplayStart),null!==o.iDeferLoading){f.bDeferLoading=!0;var h=U.isArray(o.iDeferLoading);f._iRecordsDisplay=h?o.iDeferLoading[0]:o.iDeferLoading,f._iRecordsTotal=h?o.iDeferLoading[1]:o.iDeferLoading}var p=f.oLanguage;U.extend(!0,p,o.oLanguage),p.sUrl&&(U.ajax({dataType:"json",url:p.sUrl,success:function(e){I(e),D(t.oLanguage,e),U.extend(!0,p,e),Me(f)},error:function(){Me(f)}}),c=!0),null===o.asStripeClasses&&(f.asStripeClasses=[d.sStripeOdd,d.sStripeEven]);var m=f.asStripeClasses,g=l.children("tbody").find("tr").eq(0);-1!==U.inArray(!0,U.map(m,function(e,t){return g.hasClass(e)}))&&(U("tbody tr",this).removeClass(m.join(" ")),f.asDestroyStripes=m.slice());var _,b=[],v=this.getElementsByTagName("thead");if(0!==v.length&&(ue(f.aoHeader,v[0]),b=fe(f)),null===o.aoColumns)for(_=[],s=0,a=b.length;s<a;s++)_.push(null);else _=o.aoColumns;for(s=0,a=_.length;s<a;s++)O(f,b?b[s]:null);if(F(f,o.aoColumnDefs,_,function(e,t){R(f,e,t)}),g.length){var y=function(e,t){return null!==e.getAttribute("data-"+t)?t:null};U(g[0]).children("th, td").each(function(e,t){var n=f.aoColumns[e];if(n.mData===e){var r=y(t,"sort")||y(t,"order"),i=y(t,"filter")||y(t,"search");null===r&&null===i||(n.mData={_:e+".display",sort:null!==r?e+".@data-"+r:H,type:null!==r?e+".@data-"+r:H,filter:null!==i?e+".@data-"+i:H},R(f,e))}})}var w=f.oFeatures,C=function(){if(o.aaSorting===H){var e=f.aaSorting;for(s=0,a=e.length;s<a;s++)e[s][1]=f.aoColumns[s].asSorting[0]}tt(f),w.bSort&&ut(f,"aoDrawCallback",function(){if(f.bSorted){var e=Qe(f),n={};U.each(e,function(e,t){n[t.src]=t.dir}),ft(f,null,"order",[f,e,n]),Ze(f)}}),ut(f,"aoDrawCallback",function(){(f.bSorted||"ssp"===pt(f)||w.bDeferRender)&&tt(f)},"sc");var t=l.children("caption").each(function(){this._captionSide=U(this).css("caption-side")}),n=l.children("thead");0===n.length&&(n=U("<thead/>").appendTo(l)),f.nTHead=n[0];var r=l.children("tbody");0===r.length&&(r=U("<tbody/>").appendTo(l)),f.nTBody=r[0];var i=l.children("tfoot");if(0===i.length&&0<t.length&&(""!==f.oScroll.sX||""!==f.oScroll.sY)&&(i=U("<tfoot/>").appendTo(l)),0===i.length||0===i.children().length?l.addClass(d.sNoFooter):0<i.length&&(f.nTFoot=i[0],ue(f.aoFooter,f.nTFoot)),o.aaData)for(s=0;s<o.aaData.length;s++)G(f,o.aaData[s]);else(f.bDeferLoading||"dom"==pt(f))&&j(f,U(f.nTBody).children("tr"));f.aiDisplay=f.aiDisplayMaster.slice(),!(f.bInitialised=!0)===c&&Me(f)};o.bStateSave?(w.bStateSave=!0,ut(f,"aoDrawCallback",rt,"state_save"),it(f,o,C)):C()}else ot(null,0,"Non-table node initialisation ("+this.nodeName+")",2)}),S=null,this},n={},r=/[\r\n\u2028]/g,i=/<.*?>/g,a=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,o=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),s=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,c=function(e){return!e||!0===e||"-"===e},h=function(e){var t=parseInt(e,10);return!isNaN(t)&&isFinite(e)?t:null},l=function(e,t){return n[t]||(n[t]=new RegExp(Ae(t),"g")),"string"==typeof e&&"."!==t?e.replace(/\./g,"").replace(n[t],"."):e},u=function(e,t,n){var r="string"==typeof e;return!!c(e)||(t&&r&&(e=l(e,t)),n&&r&&(e=e.replace(s,"")),!isNaN(parseFloat(e))&&isFinite(e))},f=function(e,t,n){return!!c(e)||((c(r=e)||"string"==typeof r)&&!!u(d(e),t,n)||null);var r},W=function(e,t,n){var r=[],i=0,a=e.length;if(n!==H)for(;i<a;i++)e[i]&&e[i][t]&&r.push(e[i][t][n]);else for(;i<a;i++)e[i]&&r.push(e[i][t]);return r},v=function(e,t,n,r){var i=[],a=0,o=t.length;if(r!==H)for(;a<o;a++)e[t[a]][n]&&i.push(e[t[a]][n][r]);else for(;a<o;a++)i.push(e[t[a]][n]);return i},m=function(e,t){var n,r=[];t===H?(t=0,n=e):(n=t,t=e);for(var i=t;i<n;i++)r.push(i);return r},w=function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&t.push(e[n]);return t},d=function(e){return e.replace(i,"")},g=function(e){if(function(e){if(e.length<2)return!0;for(var t=e.slice().sort(),n=t[0],r=1,i=t.length;r<i;r++){if(t[r]===n)return!1;n=t[r]}return!0}(e))return e.slice();var t,n,r,i=[],a=e.length,o=0;e:for(n=0;n<a;n++){for(t=e[n],r=0;r<o;r++)if(i[r]===t)continue e;i.push(t),o++}return i};function _(n){var r,i,a={};U.each(n,function(e,t){(r=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(r[1]+" ")&&(i=e.replace(r[0],r[2].toLowerCase()),a[i]=e,"o"===r[1]&&_(n[e]))}),n._hungarianMap=a}function D(n,r,i){var a;n._hungarianMap||_(n),U.each(r,function(e,t){(a=n._hungarianMap[e])===H||!i&&r[a]!==H||("o"===a.charAt(0)?(r[a]||(r[a]={}),U.extend(!0,r[a],r[e]),D(n[a],r[a],i)):r[a]=r[e])})}function I(e){var t=k.defaults.oLanguage,n=t.sDecimal;if(n&&$t(n),e){var r=e.sZeroRecords;!e.sEmptyTable&&r&&"No data available in table"===t.sEmptyTable&&st(e,e,"sZeroRecords","sEmptyTable"),!e.sLoadingRecords&&r&&"Loading..."===t.sLoadingRecords&&st(e,e,"sZeroRecords","sLoadingRecords"),e.sInfoThousands&&(e.sThousands=e.sInfoThousands);var i=e.sDecimal;i&&n!==i&&$t(i)}}k.util={throttle:function(r,e){var i,a,o=e!==H?e:200;return function(){var e=this,t=+new Date,n=arguments;i&&t<i+o?(clearTimeout(a),a=setTimeout(function(){i=H,r.apply(e,n)},o)):(i=t,r.apply(e,n))}},escapeRegex:function(e){return e.replace(o,"\\$1")}};var C=function(e,t,n){e[t]!==H&&(e[n]=e[t])};function P(e){C(e,"ordering","bSort"),C(e,"orderMulti","bSortMulti"),C(e,"orderClasses","bSortClasses"),C(e,"orderCellsTop","bSortCellsTop"),C(e,"order","aaSorting"),C(e,"orderFixed","aaSortingFixed"),C(e,"paging","bPaginate"),C(e,"pagingType","sPaginationType"),C(e,"pageLength","iDisplayLength"),C(e,"searching","bFilter"),"boolean"==typeof e.sScrollX&&(e.sScrollX=e.sScrollX?"100%":""),"boolean"==typeof e.scrollX&&(e.scrollX=e.scrollX?"100%":"");var t=e.aoSearchCols;if(t)for(var n=0,r=t.length;n<r;n++)t[n]&&D(k.models.oSearch,t[n])}function M(e){C(e,"orderable","bSortable"),C(e,"orderData","aDataSort"),C(e,"orderSequence","asSorting"),C(e,"orderDataType","sortDataType");var t=e.aDataSort;"number"!=typeof t||U.isArray(t)||(e.aDataSort=[t])}function $(e){if(!k.__browser){var t={};k.__browser=t;var n=U("<div/>").css({position:"fixed",top:0,left:-1*U(E).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(U("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(U("<div/>").css({width:"100%",height:10}))).appendTo("body"),r=n.children(),i=r.children();t.barWidth=r[0].offsetWidth-r[0].clientWidth,t.bScrollOversize=100===i[0].offsetWidth&&100!==r[0].clientWidth,t.bScrollbarLeft=1!==Math.round(i.offset().left),t.bBounding=!!n[0].getBoundingClientRect().width,n.remove()}U.extend(e.oBrowser,k.__browser),e.oScroll.iBarWidth=k.__browser.barWidth}function A(e,t,n,r,i,a){var o,s=r,c=!1;for(n!==H&&(o=n,c=!0);s!==i;)e.hasOwnProperty(s)&&(o=c?t(o,e[s],s,e):e[s],c=!0,s+=a);return o}function O(e,t){var n=k.defaults.column,r=e.aoColumns.length,i=U.extend({},k.models.oColumn,n,{nTh:t||y.createElement("th"),sTitle:n.sTitle?n.sTitle:t?t.innerHTML:"",aDataSort:n.aDataSort?n.aDataSort:[r],mData:n.mData?n.mData:r,idx:r});e.aoColumns.push(i);var a=e.aoPreSearchCols;a[r]=U.extend({},k.models.oSearch,a[r]),R(e,r,U(t).data())}function R(e,t,n){var r=e.aoColumns[t],i=e.oClasses,a=U(r.nTh);if(!r.sWidthOrig){r.sWidthOrig=a.attr("width")||null;var o=(a.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);o&&(r.sWidthOrig=o[1])}n!==H&&null!==n&&(M(n),D(k.defaults.column,n,!0),n.mDataProp===H||n.mData||(n.mData=n.mDataProp),n.sType&&(r._sManualType=n.sType),n.className&&!n.sClass&&(n.sClass=n.className),n.sClass&&a.addClass(n.sClass),U.extend(r,n),st(r,n,"sWidth","sWidthOrig"),n.iDataSort!==H&&(r.aDataSort=[n.iDataSort]),st(r,n,"aDataSort"));var s=r.mData,c=Q(s),l=r.mRender?Q(r.mRender):null,u=function(e){return"string"==typeof e&&-1!==e.indexOf("@")};r._bAttrSrc=U.isPlainObject(s)&&(u(s.sort)||u(s.type)||u(s.filter)),r._setter=null,r.fnGetData=function(e,t,n){var r=c(e,t,H,n);return l&&t?l(r,t,e,n):r},r.fnSetData=function(e,t,n){return X(s)(e,t,n)},"number"!=typeof s&&(e._rowReadObject=!0),e.oFeatures.bSort||(r.bSortable=!1,a.addClass(i.sSortableNone));var f=-1!==U.inArray("asc",r.asSorting),d=-1!==U.inArray("desc",r.asSorting);r.bSortable&&(f||d)?f&&!d?(r.sSortingClass=i.sSortableAsc,r.sSortingClassJUI=i.sSortJUIAscAllowed):!f&&d?(r.sSortingClass=i.sSortableDesc,r.sSortingClassJUI=i.sSortJUIDescAllowed):(r.sSortingClass=i.sSortable,r.sSortingClassJUI=i.sSortJUI):(r.sSortingClass=i.sSortableNone,r.sSortingClassJUI="")}function q(e){if(!1!==e.oFeatures.bAutoWidth){var t=e.aoColumns;We(e);for(var n=0,r=t.length;n<r;n++)t[n].nTh.style.width=t[n].sWidth}var i=e.oScroll;""===i.sY&&""===i.sX||Be(e),ft(e,null,"column-sizing",[e])}function z(e,t){var n=L(e,"bVisible");return"number"==typeof n[t]?n[t]:null}function S(e,t){var n=L(e,"bVisible"),r=U.inArray(t,n);return-1!==r?r:null}function N(e){var n=0;return U.each(e.aoColumns,function(e,t){t.bVisible&&"none"!==U(t.nTh).css("display")&&n++}),n}function L(e,n){var r=[];return U.map(e.aoColumns,function(e,t){e[n]&&r.push(t)}),r}function T(e){var t,n,r,i,a,o,s,c,l,u=e.aoColumns,f=e.aoData,d=k.ext.type.detect;for(t=0,n=u.length;t<n;t++)if(l=[],!(s=u[t]).sType&&s._sManualType)s.sType=s._sManualType;else if(!s.sType){for(r=0,i=d.length;r<i;r++){for(a=0,o=f.length;a<o&&(l[a]===H&&(l[a]=x(e,a,t,"type")),(c=d[r](l[a],e))||r===d.length-1)&&"html"!==c;a++);if(c){s.sType=c;break}}s.sType||(s.sType="string")}}function F(e,t,n,r){var i,a,o,s,c,l,u,f=e.aoColumns;if(t)for(i=t.length-1;0<=i;i--){var d=(u=t[i]).targets!==H?u.targets:u.aTargets;for(U.isArray(d)||(d=[d]),o=0,s=d.length;o<s;o++)if("number"==typeof d[o]&&0<=d[o]){for(;f.length<=d[o];)O(e);r(d[o],u)}else if("number"==typeof d[o]&&d[o]<0)r(f.length+d[o],u);else if("string"==typeof d[o])for(c=0,l=f.length;c<l;c++)("_all"==d[o]||U(f[c].nTh).hasClass(d[o]))&&r(c,u)}if(n)for(i=0,a=n.length;i<a;i++)r(i,n[i])}function G(e,t,n,r){var i=e.aoData.length,a=U.extend(!0,{},k.models.oRow,{src:n?"dom":"data",idx:i});a._aData=t,e.aoData.push(a);for(var o=e.aoColumns,s=0,c=o.length;s<c;s++)o[s].sType=null;e.aiDisplayMaster.push(i);var l=e.rowIdFn(t);return l!==H&&(e.aIds[l]=a),!n&&e.oFeatures.bDeferRender||re(e,i,n,r),i}function j(n,e){var r;return e instanceof U||(e=U(e)),e.map(function(e,t){return r=ne(n,t),G(n,r.data,t,r.cells)})}function x(e,t,n,r){var i=e.iDraw,a=e.aoColumns[n],o=e.aoData[t]._aData,s=a.sDefaultContent,c=a.fnGetData(o,r,{settings:e,row:t,col:n});if(c===H)return e.iDrawError!=i&&null===s&&(ot(e,0,"Requested unknown parameter "+("function"==typeof a.mData?"{function}":"'"+a.mData+"'")+" for row "+t+", column "+n,4),e.iDrawError=i),s;if(c!==o&&null!==c||null===s||r===H){if("function"==typeof c)return c.call(o)}else c=s;return null===c&&"display"==r?"":c}function B(e,t,n,r){var i=e.aoColumns[n],a=e.aoData[t]._aData;i.fnSetData(a,r,{settings:e,row:t,col:n})}var V=/\[.*?\]$/,Y=/\(\)$/;function K(e){return U.map(e.match(/(\\.|[^\.])+/g)||[""],function(e){return e.replace(/\\\./g,".")})}function Q(i){if(U.isPlainObject(i)){var a={};return U.each(i,function(e,t){t&&(a[e]=Q(t))}),function(e,t,n,r){var i=a[t]||a._;return i!==H?i(e,t,n,r):e}}if(null===i)return function(e){return e};if("function"==typeof i)return function(e,t,n,r){return i(e,t,n,r)};if("string"!=typeof i||-1===i.indexOf(".")&&-1===i.indexOf("[")&&-1===i.indexOf("("))return function(e,t){return e[i]};var h=function(e,t,n){var r,i,a,o;if(""!==n)for(var s=K(n),c=0,l=s.length;c<l;c++){if(r=s[c].match(V),i=s[c].match(Y),r){if(s[c]=s[c].replace(V,""),""!==s[c]&&(e=e[s[c]]),a=[],s.splice(0,c+1),o=s.join("."),U.isArray(e))for(var u=0,f=e.length;u<f;u++)a.push(h(e[u],t,o));var d=r[0].substring(1,r[0].length-1);e=""===d?a:a.join(d);break}if(i)s[c]=s[c].replace(Y,""),e=e[s[c]]();else{if(null===e||e[s[c]]===H)return H;e=e[s[c]]}}return e};return function(e,t){return h(e,t,i)}}function X(r){if(U.isPlainObject(r))return X(r._);if(null===r)return function(){};if("function"==typeof r)return function(e,t,n){r(e,"set",t,n)};if("string"!=typeof r||-1===r.indexOf(".")&&-1===r.indexOf("[")&&-1===r.indexOf("("))return function(e,t){e[r]=t};var p=function(e,t,n){for(var r,i,a,o,s,c=K(n),l=c[c.length-1],u=0,f=c.length-1;u<f;u++){if(i=c[u].match(V),a=c[u].match(Y),i){if(c[u]=c[u].replace(V,""),e[c[u]]=[],(r=c.slice()).splice(0,u+1),s=r.join("."),U.isArray(t))for(var d=0,h=t.length;d<h;d++)p(o={},t[d],s),e[c[u]].push(o);else e[c[u]]=t;return}a&&(c[u]=c[u].replace(Y,""),e=e[c[u]](t)),null!==e[c[u]]&&e[c[u]]!==H||(e[c[u]]={}),e=e[c[u]]}l.match(Y)?e=e[l.replace(Y,"")](t):e[l.replace(V,"")]=t};return function(e,t){return p(e,t,r)}}function Z(e){return W(e.aoData,"_aData")}function J(e){e.aoData.length=0,e.aiDisplayMaster.length=0,e.aiDisplay.length=0,e.aIds={}}function ee(e,t,n){for(var r=-1,i=0,a=e.length;i<a;i++)e[i]==t?r=i:e[i]>t&&e[i]--;-1!=r&&n===H&&e.splice(r,1)}function te(n,r,e,t){var i,a,o=n.aoData[r],s=function(e,t){for(;e.childNodes.length;)e.removeChild(e.firstChild);e.innerHTML=x(n,r,t,"display")};if("dom"!==e&&(e&&"auto"!==e||"dom"!==o.src)){var c=o.anCells;if(c)if(t!==H)s(c[t],t);else for(i=0,a=c.length;i<a;i++)s(c[i],i)}else o._aData=ne(n,o,t,t===H?H:o._aData).data;o._aSortData=null,o._aFilterData=null;var l=n.aoColumns;if(t!==H)l[t].sType=null;else{for(i=0,a=l.length;i<a;i++)l[i].sType=null;ie(n,o)}}function ne(e,t,n,i){var r,a,o,s=[],c=t.firstChild,l=0,u=e.aoColumns,f=e._rowReadObject;i=i!==H?i:f?{}:[];var d=function(e,t){if("string"==typeof e){var n=e.indexOf("@");if(-1!==n){var r=e.substring(n+1);X(e)(i,t.getAttribute(r))}}},h=function(e){n!==H&&n!==l||(a=u[l],o=U.trim(e.innerHTML),a&&a._bAttrSrc?(X(a.mData._)(i,o),d(a.mData.sort,e),d(a.mData.type,e),d(a.mData.filter,e)):f?(a._setter||(a._setter=X(a.mData)),a._setter(i,o)):i[l]=o);l++};if(c)for(;c;)"TD"!=(r=c.nodeName.toUpperCase())&&"TH"!=r||(h(c),s.push(c)),c=c.nextSibling;else for(var p=0,m=(s=t.anCells).length;p<m;p++)h(s[p]);var g=t.firstChild?t:t.nTr;if(g){var _=g.getAttribute("id");_&&X(e.rowId)(i,_)}return{data:i,cells:s}}function re(e,t,n,r){var i,a,o,s,c,l,u=e.aoData[t],f=u._aData,d=[];if(null===u.nTr){for(i=n||y.createElement("tr"),u.nTr=i,u.anCells=d,i._DT_RowIndex=t,ie(e,u),s=0,c=e.aoColumns.length;s<c;s++)o=e.aoColumns[s],(a=(l=!n)?y.createElement(o.sCellType):r[s])._DT_CellIndex={row:t,column:s},d.push(a),!l&&(n&&!o.mRender&&o.mData===s||U.isPlainObject(o.mData)&&o.mData._===s+".display")||(a.innerHTML=x(e,t,s,"display")),o.sClass&&(a.className+=" "+o.sClass),o.bVisible&&!n?i.appendChild(a):!o.bVisible&&n&&a.parentNode.removeChild(a),o.fnCreatedCell&&o.fnCreatedCell.call(e.oInstance,a,x(e,t,s),f,t,s);ft(e,"aoRowCreatedCallback",null,[i,f,t,d])}u.nTr.setAttribute("role","row")}function ie(e,t){var n=t.nTr,r=t._aData;if(n){var i=e.rowIdFn(r);if(i&&(n.id=i),r.DT_RowClass){var a=r.DT_RowClass.split(" ");t.__rowc=t.__rowc?g(t.__rowc.concat(a)):a,U(n).removeClass(t.__rowc.join(" ")).addClass(r.DT_RowClass)}r.DT_RowAttr&&U(n).attr(r.DT_RowAttr),r.DT_RowData&&U(n).data(r.DT_RowData)}}function ae(e){var t,n,r,i,a,o=e.nTHead,s=e.nTFoot,c=0===U("th, td",o).length,l=e.oClasses,u=e.aoColumns;for(c&&(i=U("<tr/>").appendTo(o)),t=0,n=u.length;t<n;t++)a=u[t],r=U(a.nTh).addClass(a.sClass),c&&r.appendTo(i),e.oFeatures.bSort&&(r.addClass(a.sSortingClass),!1!==a.bSortable&&(r.attr("tabindex",e.iTabIndex).attr("aria-controls",e.sTableId),et(e,a.nTh,t))),a.sTitle!=r[0].innerHTML&&r.html(a.sTitle),ht(e,"header")(e,r,a,l);if(c&&ue(e.aoHeader,o),U(o).find(">tr").attr("role","row"),U(o).find(">tr>th, >tr>td").addClass(l.sHeaderTH),U(s).find(">tr>th, >tr>td").addClass(l.sFooterTH),null!==s){var f=e.aoFooter[0];for(t=0,n=f.length;t<n;t++)(a=u[t]).nTf=f[t].cell,a.sClass&&U(a.nTf).addClass(a.sClass)}}function oe(e,t,n){var r,i,a,o,s,c,l,u,f,d=[],h=[],p=e.aoColumns.length;if(t){for(n===H&&(n=!1),r=0,i=t.length;r<i;r++){for(d[r]=t[r].slice(),d[r].nTr=t[r].nTr,a=p-1;0<=a;a--)e.aoColumns[a].bVisible||n||d[r].splice(a,1);h.push([])}for(r=0,i=d.length;r<i;r++){if(l=d[r].nTr)for(;c=l.firstChild;)l.removeChild(c);for(a=0,o=d[r].length;a<o;a++)if(f=u=1,h[r][a]===H){for(l.appendChild(d[r][a].cell),h[r][a]=1;d[r+u]!==H&&d[r][a].cell==d[r+u][a].cell;)h[r+u][a]=1,u++;for(;d[r][a+f]!==H&&d[r][a].cell==d[r][a+f].cell;){for(s=0;s<u;s++)h[r+s][a+f]=1;f++}U(d[r][a].cell).attr("rowspan",u).attr("colspan",f)}}}}function se(e){var t=ft(e,"aoPreDrawCallback","preDraw",[e]);if(-1===U.inArray(!1,t)){var n=[],r=0,i=e.asStripeClasses,a=i.length,o=(e.aoOpenRows.length,e.oLanguage),s=e.iInitDisplayStart,c="ssp"==pt(e),l=e.aiDisplay;e.bDrawing=!0,s!==H&&-1!==s&&(e._iDisplayStart=c?s:s>=e.fnRecordsDisplay()?0:s,e.iInitDisplayStart=-1);var u=e._iDisplayStart,f=e.fnDisplayEnd();if(e.bDeferLoading)e.bDeferLoading=!1,e.iDraw++,Ge(e,!1);else if(c){if(!e.bDestroying&&!he(e))return}else e.iDraw++;if(0!==l.length)for(var d=c?0:u,h=c?e.aoData.length:f,p=d;p<h;p++){var m=l[p],g=e.aoData[m];null===g.nTr&&re(e,m);var _=g.nTr;if(0!==a){var b=i[r%a];g._sRowStripe!=b&&(U(_).removeClass(g._sRowStripe).addClass(b),g._sRowStripe=b)}ft(e,"aoRowCallback",null,[_,g._aData,r,p,m]),n.push(_),r++}else{var v=o.sZeroRecords;1==e.iDraw&&"ajax"==pt(e)?v=o.sLoadingRecords:o.sEmptyTable&&0===e.fnRecordsTotal()&&(v=o.sEmptyTable),n[0]=U("<tr/>",{class:a?i[0]:""}).append(U("<td />",{valign:"top",colSpan:N(e),class:e.oClasses.sRowEmpty}).html(v))[0]}ft(e,"aoHeaderCallback","header",[U(e.nTHead).children("tr")[0],Z(e),u,f,l]),ft(e,"aoFooterCallback","footer",[U(e.nTFoot).children("tr")[0],Z(e),u,f,l]);var y=U(e.nTBody);y.children().detach(),y.append(U(n)),ft(e,"aoDrawCallback","draw",[e]),e.bSorted=!1,e.bFiltered=!1,e.bDrawing=!1}else Ge(e,!1)}function ce(e,t){var n=e.oFeatures,r=n.bSort,i=n.bFilter;r&&Xe(e),i?be(e,e.oPreviousSearch):e.aiDisplay=e.aiDisplayMaster.slice(),!0!==t&&(e._iDisplayStart=0),e._drawHold=t,se(e),e._drawHold=!1}function le(e){var t=e.oClasses,n=U(e.nTable),r=U("<div/>").insertBefore(n),i=e.oFeatures,a=U("<div/>",{id:e.sTableId+"_wrapper",class:t.sWrapper+(e.nTFoot?"":" "+t.sNoFooter)});e.nHolding=r[0],e.nTableWrapper=a[0],e.nTableReinsertBefore=e.nTable.nextSibling;for(var o,s,c,l,u,f,d=e.sDom.split(""),h=0;h<d.length;h++){if(o=null,"<"==(s=d[h])){if(c=U("<div/>")[0],"'"==(l=d[h+1])||'"'==l){for(u="",f=2;d[h+f]!=l;)u+=d[h+f],f++;if("H"==u?u=t.sJUIHeader:"F"==u&&(u=t.sJUIFooter),-1!=u.indexOf(".")){var p=u.split(".");c.id=p[0].substr(1,p[0].length-1),c.className=p[1]}else"#"==u.charAt(0)?c.id=u.substr(1,u.length-1):c.className=u;h+=f}a.append(c),a=U(c)}else if(">"==s)a=a.parent();else if("l"==s&&i.bPaginate&&i.bLengthChange)o=Re(e);else if("f"==s&&i.bFilter)o=_e(e);else if("r"==s&&i.bProcessing)o=Fe(e);else if("t"==s)o=je(e);else if("i"==s&&i.bInfo)o=De(e);else if("p"==s&&i.bPaginate)o=Ne(e);else if(0!==k.ext.feature.length)for(var m=k.ext.feature,g=0,_=m.length;g<_;g++)if(s==m[g].cFeature){o=m[g].fnInit(e);break}if(o){var b=e.aanFeatures;b[s]||(b[s]=[]),b[s].push(o),a.append(o)}}r.replaceWith(a),e.nHolding=null}function ue(e,t){var n,r,i,a,o,s,c,l,u,f,d=U(t).children("tr"),h=function(e,t,n){for(var r=e[t];r[n];)n++;return n};for(e.splice(0,e.length),i=0,s=d.length;i<s;i++)e.push([]);for(i=0,s=d.length;i<s;i++)for(0,r=(n=d[i]).firstChild;r;){if("TD"==r.nodeName.toUpperCase()||"TH"==r.nodeName.toUpperCase())for(l=(l=1*r.getAttribute("colspan"))&&0!==l&&1!==l?l:1,u=(u=1*r.getAttribute("rowspan"))&&0!==u&&1!==u?u:1,c=h(e,i,0),f=1===l,o=0;o<l;o++)for(a=0;a<u;a++)e[i+a][c+o]={cell:r,unique:f},e[i+a].nTr=n;r=r.nextSibling}}function fe(e,t,n){var r=[];n||(n=e.aoHeader,t&&ue(n=[],t));for(var i=0,a=n.length;i<a;i++)for(var o=0,s=n[i].length;o<s;o++)!n[i][o].unique||r[o]&&e.bSortCellsTop||(r[o]=n[i][o].cell);return r}function de(i,e,t){if(ft(i,"aoServerParams","serverParams",[e]),e&&U.isArray(e)){var a={},o=/(.*?)\[\]$/;U.each(e,function(e,t){var n=t.name.match(o);if(n){var r=n[0];a[r]||(a[r]=[]),a[r].push(t.value)}else a[t.name]=t.value}),e=a}var n,r=i.ajax,s=i.oInstance,c=function(e){ft(i,null,"xhr",[i,e,i.jqXHR]),t(e)};if(U.isPlainObject(r)&&r.data){var l="function"==typeof(n=r.data)?n(e,i):n;e="function"==typeof n&&l?l:U.extend(!0,e,l),delete r.data}var u={data:e,success:function(e){var t=e.error||e.sError;t&&ot(i,0,t),i.json=e,c(e)},dataType:"json",cache:!1,type:i.sServerMethod,error:function(e,t,n){var r=ft(i,null,"xhr",[i,null,i.jqXHR]);-1===U.inArray(!0,r)&&("parsererror"==t?ot(i,0,"Invalid JSON response",1):4===e.readyState&&ot(i,0,"Ajax error",7)),Ge(i,!1)}};i.oAjaxData=e,ft(i,null,"preXhr",[i,e]),i.fnServerData?i.fnServerData.call(s,i.sAjaxSource,U.map(e,function(e,t){return{name:t,value:e}}),c,i):i.sAjaxSource||"string"==typeof r?i.jqXHR=U.ajax(U.extend(u,{url:r||i.sAjaxSource})):"function"==typeof r?i.jqXHR=r.call(s,e,c,i):(i.jqXHR=U.ajax(U.extend(u,r)),r.data=n)}function he(t){return!t.bAjaxDataGet||(t.iDraw++,Ge(t,!0),de(t,pe(t),function(e){me(t,e)}),!1)}function pe(e){var t,n,r,i,a=e.aoColumns,o=a.length,s=e.oFeatures,c=e.oPreviousSearch,l=e.aoPreSearchCols,u=[],f=Qe(e),d=e._iDisplayStart,h=!1!==s.bPaginate?e._iDisplayLength:-1,p=function(e,t){u.push({name:e,value:t})};p("sEcho",e.iDraw),p("iColumns",o),p("sColumns",W(a,"sName").join(",")),p("iDisplayStart",d),p("iDisplayLength",h);var m={draw:e.iDraw,columns:[],order:[],start:d,length:h,search:{value:c.sSearch,regex:c.bRegex}};for(t=0;t<o;t++)r=a[t],i=l[t],n="function"==typeof r.mData?"function":r.mData,m.columns.push({data:n,name:r.sName,searchable:r.bSearchable,orderable:r.bSortable,search:{value:i.sSearch,regex:i.bRegex}}),p("mDataProp_"+t,n),s.bFilter&&(p("sSearch_"+t,i.sSearch),p("bRegex_"+t,i.bRegex),p("bSearchable_"+t,r.bSearchable)),s.bSort&&p("bSortable_"+t,r.bSortable);s.bFilter&&(p("sSearch",c.sSearch),p("bRegex",c.bRegex)),s.bSort&&(U.each(f,function(e,t){m.order.push({column:t.col,dir:t.dir}),p("iSortCol_"+e,t.col),p("sSortDir_"+e,t.dir)}),p("iSortingCols",f.length));var g=k.ext.legacy.ajax;return null===g?e.sAjaxSource?u:m:g?u:m}function me(e,n){var t=function(e,t){return n[e]!==H?n[e]:n[t]},r=ge(e,n),i=t("sEcho","draw"),a=t("iTotalRecords","recordsTotal"),o=t("iTotalDisplayRecords","recordsFiltered");if(i!==H){if(1*i<e.iDraw)return;e.iDraw=1*i}J(e),e._iRecordsTotal=parseInt(a,10),e._iRecordsDisplay=parseInt(o,10);for(var s=0,c=r.length;s<c;s++)G(e,r[s]);e.aiDisplay=e.aiDisplayMaster.slice(),e.bAjaxDataGet=!1,se(e),e._bInitComplete||$e(e,n),e.bAjaxDataGet=!0,Ge(e,!1)}function ge(e,t){var n=U.isPlainObject(e.ajax)&&e.ajax.dataSrc!==H?e.ajax.dataSrc:e.sAjaxDataProp;return"data"===n?t.aaData||t[n]:""!==n?Q(n)(t):t}function _e(n){var e=n.oClasses,t=n.sTableId,r=n.oLanguage,i=n.oPreviousSearch,a=n.aanFeatures,o='<input type="search" class="'+e.sFilterInput+'"/>',s=r.sSearch;s=s.match(/_INPUT_/)?s.replace("_INPUT_",o):s+o;var c=U("<div/>",{id:a.f?null:t+"_filter",class:e.sFilter}).append(U("<label/>").append(s)),l=function(){a.f;var e=this.value?this.value:"";e!=i.sSearch&&(be(n,{sSearch:e,bRegex:i.bRegex,bSmart:i.bSmart,bCaseInsensitive:i.bCaseInsensitive}),n._iDisplayStart=0,se(n))},u=null!==n.searchDelay?n.searchDelay:"ssp"===pt(n)?400:0,f=U("input",c).val(i.sSearch).attr("placeholder",r.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",u?qe(l,u):l).on("mouseup",function(e){setTimeout(function(){l.call(f[0])},10)}).on("keypress.DT",function(e){if(13==e.keyCode)return!1}).attr("aria-controls",t);return U(n.nTable).on("search.dt.DT",function(e,t){if(n===t)try{f[0]!==y.activeElement&&f.val(i.sSearch)}catch(e){}}),c[0]}function be(e,t,n){var r=e.oPreviousSearch,i=e.aoPreSearchCols,a=function(e){r.sSearch=e.sSearch,r.bRegex=e.bRegex,r.bSmart=e.bSmart,r.bCaseInsensitive=e.bCaseInsensitive},o=function(e){return e.bEscapeRegex!==H?!e.bEscapeRegex:e.bRegex};if(T(e),"ssp"!=pt(e)){we(e,t.sSearch,n,o(t),t.bSmart,t.bCaseInsensitive),a(t);for(var s=0;s<i.length;s++)ye(e,i[s].sSearch,s,o(i[s]),i[s].bSmart,i[s].bCaseInsensitive);ve(e)}else a(t);e.bFiltered=!0,ft(e,null,"search",[e])}function ve(e){for(var t,n,r=k.ext.search,i=e.aiDisplay,a=0,o=r.length;a<o;a++){for(var s=[],c=0,l=i.length;c<l;c++)n=i[c],t=e.aoData[n],r[a](e,t._aFilterData,n,t._aData,c)&&s.push(n);i.length=0,U.merge(i,s)}}function ye(e,t,n,r,i,a){if(""!==t){for(var o,s=[],c=e.aiDisplay,l=Ce(t,r,i,a),u=0;u<c.length;u++)o=e.aoData[c[u]]._aFilterData[n],l.test(o)&&s.push(c[u]);e.aiDisplay=s}}function we(e,t,n,r,i,a){var o,s,c,l=Ce(t,r,i,a),u=e.oPreviousSearch.sSearch,f=e.aiDisplayMaster,d=[];if(0!==k.ext.search.length&&(n=!0),s=xe(e),t.length<=0)e.aiDisplay=f.slice();else{for((s||n||r||u.length>t.length||0!==t.indexOf(u)||e.bSorted)&&(e.aiDisplay=f.slice()),o=e.aiDisplay,c=0;c<o.length;c++)l.test(e.aoData[o[c]]._sFilterRow)&&d.push(o[c]);e.aiDisplay=d}}function Ce(e,t,n,r){(e=t?e:Ae(e),n)&&(e="^(?=.*?"+U.map(e.match(/"[^"]+"|[^ ]+/g)||[""],function(e){if('"'===e.charAt(0)){var t=e.match(/^"(.*)"$/);e=t?t[1]:e}return e.replace('"',"")}).join(")(?=.*?")+").*$");return new RegExp(e,r?"i":"")}var Ae=k.util.escapeRegex,Se=U("<div>")[0],Te=Se.textContent!==H;function xe(e){var t,n,r,i,a,o,s,c,l=e.aoColumns,u=k.ext.type.search,f=!1;for(n=0,i=e.aoData.length;n<i;n++)if(!(c=e.aoData[n])._aFilterData){for(o=[],r=0,a=l.length;r<a;r++)(t=l[r]).bSearchable?(s=x(e,n,r,"filter"),u[t.sType]&&(s=u[t.sType](s)),null===s&&(s=""),"string"!=typeof s&&s.toString&&(s=s.toString())):s="",s.indexOf&&-1!==s.indexOf("&")&&(Se.innerHTML=s,s=Te?Se.textContent:Se.innerText),s.replace&&(s=s.replace(/[\r\n\u2028]/g,"")),o.push(s);c._aFilterData=o,c._sFilterRow=o.join("  "),f=!0}return f}function ke(e){return{search:e.sSearch,smart:e.bSmart,regex:e.bRegex,caseInsensitive:e.bCaseInsensitive}}function Ee(e){return{sSearch:e.search,bSmart:e.smart,bRegex:e.regex,bCaseInsensitive:e.caseInsensitive}}function De(e){var t=e.sTableId,n=e.aanFeatures.i,r=U("<div/>",{class:e.oClasses.sInfo,id:n?null:t+"_info"});return n||(e.aoDrawCallback.push({fn:Ie,sName:"information"}),r.attr("role","status").attr("aria-live","polite"),U(e.nTable).attr("aria-describedby",t+"_info")),r[0]}function Ie(e){var t=e.aanFeatures.i;if(0!==t.length){var n=e.oLanguage,r=e._iDisplayStart+1,i=e.fnDisplayEnd(),a=e.fnRecordsTotal(),o=e.fnRecordsDisplay(),s=o?n.sInfo:n.sInfoEmpty;o!==a&&(s+=" "+n.sInfoFiltered),s=Pe(e,s+=n.sInfoPostFix);var c=n.fnInfoCallback;null!==c&&(s=c.call(e.oInstance,e,r,i,a,o,s)),U(t).html(s)}}function Pe(e,t){var n=e.fnFormatNumber,r=e._iDisplayStart+1,i=e._iDisplayLength,a=e.fnRecordsDisplay(),o=-1===i;return t.replace(/_START_/g,n.call(e,r)).replace(/_END_/g,n.call(e,e.fnDisplayEnd())).replace(/_MAX_/g,n.call(e,e.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(e,a)).replace(/_PAGE_/g,n.call(e,o?1:Math.ceil(r/i))).replace(/_PAGES_/g,n.call(e,o?1:Math.ceil(a/i)))}function Me(n){var r,e,t,i=n.iInitDisplayStart,a=n.aoColumns,o=n.oFeatures,s=n.bDeferLoading;if(n.bInitialised){for(le(n),ae(n),oe(n,n.aoHeader),oe(n,n.aoFooter),Ge(n,!0),o.bAutoWidth&&We(n),r=0,e=a.length;r<e;r++)(t=a[r]).sWidth&&(t.nTh.style.width=Ke(t.sWidth));ft(n,null,"preInit",[n]),ce(n);var c=pt(n);("ssp"!=c||s)&&("ajax"==c?de(n,[],function(e){var t=ge(n,e);for(r=0;r<t.length;r++)G(n,t[r]);n.iInitDisplayStart=i,ce(n),Ge(n,!1),$e(n,e)}):(Ge(n,!1),$e(n)))}else setTimeout(function(){Me(n)},200)}function $e(e,t){e._bInitComplete=!0,(t||e.oInit.aaData)&&q(e),ft(e,null,"plugin-init",[e,t]),ft(e,"aoInitComplete","init",[e,t])}function Oe(e,t){var n=parseInt(t,10);e._iDisplayLength=n,dt(e),ft(e,null,"length",[e,n])}function Re(r){for(var e=r.oClasses,t=r.sTableId,n=r.aLengthMenu,i=U.isArray(n[0]),a=i?n[0]:n,o=i?n[1]:n,s=U("<select/>",{name:t+"_length","aria-controls":t,class:e.sLengthSelect}),c=0,l=a.length;c<l;c++)s[0][c]=new Option("number"==typeof o[c]?r.fnFormatNumber(o[c]):o[c],a[c]);var u=U("<div><label/></div>").addClass(e.sLength);return r.aanFeatures.l||(u[0].id=t+"_length"),u.children().append(r.oLanguage.sLengthMenu.replace("_MENU_",s[0].outerHTML)),U("select",u).val(r._iDisplayLength).on("change.DT",function(e){Oe(r,U(this).val()),se(r)}),U(r.nTable).on("length.dt.DT",function(e,t,n){r===t&&U("select",u).val(n)}),u[0]}function Ne(e){var t=e.sPaginationType,u=k.ext.pager[t],f="function"==typeof u,d=function(e){se(e)},n=U("<div/>").addClass(e.oClasses.sPaging+t)[0],h=e.aanFeatures;return f||u.fnInit(e,n,d),h.p||(n.id=e.sTableId+"_paginate",e.aoDrawCallback.push({fn:function(e){if(f){var t,n,r=e._iDisplayStart,i=e._iDisplayLength,a=e.fnRecordsDisplay(),o=-1===i,s=o?0:Math.ceil(r/i),c=o?1:Math.ceil(a/i),l=u(s,c);for(t=0,n=h.p.length;t<n;t++)ht(e,"pageButton")(e,h.p[t],t,l,s,c)}else u.fnUpdate(e,d)},sName:"pagination"})),n}function Le(e,t,n){var r=e._iDisplayStart,i=e._iDisplayLength,a=e.fnRecordsDisplay();0===a||-1===i?r=0:"number"==typeof t?a<(r=t*i)&&(r=0):"first"==t?r=0:"previous"==t?(r=0<=i?r-i:0)<0&&(r=0):"next"==t?r+i<a&&(r+=i):"last"==t?r=Math.floor((a-1)/i)*i:ot(e,0,"Unknown paging action: "+t,5);var o=e._iDisplayStart!==r;return e._iDisplayStart=r,o&&(ft(e,null,"page",[e]),n&&se(e)),o}function Fe(e){return U("<div/>",{id:e.aanFeatures.r?null:e.sTableId+"_processing",class:e.oClasses.sProcessing}).html(e.oLanguage.sProcessing).insertBefore(e.nTable)[0]}function Ge(e,t){e.oFeatures.bProcessing&&U(e.aanFeatures.r).css("display",t?"block":"none"),ft(e,null,"processing",[e,t])}function je(e){var t=U(e.nTable);t.attr("role","grid");var n=e.oScroll;if(""===n.sX&&""===n.sY)return e.nTable;var r=n.sX,i=n.sY,a=e.oClasses,o=t.children("caption"),s=o.length?o[0]._captionSide:null,c=U(t[0].cloneNode(!1)),l=U(t[0].cloneNode(!1)),u=t.children("tfoot"),f="<div/>",d=function(e){return e?Ke(e):null};u.length||(u=null);var h=U(f,{class:a.sScrollWrapper}).append(U(f,{class:a.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:r?d(r):"100%"}).append(U(f,{class:a.sScrollHeadInner}).css({"box-sizing":"content-box",width:n.sXInner||"100%"}).append(c.removeAttr("id").css("margin-left",0).append("top"===s?o:null).append(t.children("thead"))))).append(U(f,{class:a.sScrollBody}).css({position:"relative",overflow:"auto",width:d(r)}).append(t));u&&h.append(U(f,{class:a.sScrollFoot}).css({overflow:"hidden",border:0,width:r?d(r):"100%"}).append(U(f,{class:a.sScrollFootInner}).append(l.removeAttr("id").css("margin-left",0).append("bottom"===s?o:null).append(t.children("tfoot")))));var p=h.children(),m=p[0],g=p[1],_=u?p[2]:null;return r&&U(g).on("scroll.DT",function(e){var t=this.scrollLeft;m.scrollLeft=t,u&&(_.scrollLeft=t)}),U(g).css("max-height",i),n.bCollapse||U(g).css("height",i),e.nScrollHead=m,e.nScrollBody=g,e.nScrollFoot=_,e.aoDrawCallback.push({fn:Be,sName:"scrolling"}),h[0]}function Be(n){var e,t,r,i,a,o,s,c,l,u=n.oScroll,f=u.sX,d=u.sXInner,h=u.sY,p=u.iBarWidth,m=U(n.nScrollHead),g=m[0].style,_=m.children("div"),b=_[0].style,v=_.children("table"),y=n.nScrollBody,w=U(y),C=y.style,A=U(n.nScrollFoot).children("div"),S=A.children("table"),T=U(n.nTHead),x=U(n.nTable),k=x[0],E=k.style,D=n.nTFoot?U(n.nTFoot):null,I=n.oBrowser,P=I.bScrollOversize,M=W(n.aoColumns,"nTh"),$=[],O=[],R=[],N=[],L=function(e){var t=e.style;t.paddingTop="0",t.paddingBottom="0",t.borderTopWidth="0",t.borderBottomWidth="0",t.height=0},F=y.scrollHeight>y.clientHeight;if(n.scrollBarVis!==F&&n.scrollBarVis!==H)return n.scrollBarVis=F,void q(n);n.scrollBarVis=F,x.children("thead, tfoot").remove(),D&&(o=D.clone().prependTo(x),t=D.find("tr"),i=o.find("tr")),a=T.clone().prependTo(x),e=T.find("tr"),r=a.find("tr"),a.find("th, td").removeAttr("tabindex"),f||(C.width="100%",m[0].style.width="100%"),U.each(fe(n,a),function(e,t){s=z(n,e),t.style.width=n.aoColumns[s].sWidth}),D&&Ue(function(e){e.style.width=""},i),l=x.outerWidth(),""===f?(E.width="100%",P&&(x.find("tbody").height()>y.offsetHeight||"scroll"==w.css("overflow-y"))&&(E.width=Ke(x.outerWidth()-p)),l=x.outerWidth()):""!==d&&(E.width=Ke(d),l=x.outerWidth()),Ue(L,r),Ue(function(e){R.push(e.innerHTML),$.push(Ke(U(e).css("width")))},r),Ue(function(e,t){-1!==U.inArray(e,M)&&(e.style.width=$[t])},e),U(r).height(0),D&&(Ue(L,i),Ue(function(e){N.push(e.innerHTML),O.push(Ke(U(e).css("width")))},i),Ue(function(e,t){e.style.width=O[t]},t),U(i).height(0)),Ue(function(e,t){e.innerHTML='<div class="dataTables_sizing">'+R[t]+"</div>",e.childNodes[0].style.height="0",e.childNodes[0].style.overflow="hidden",e.style.width=$[t]},r),D&&Ue(function(e,t){e.innerHTML='<div class="dataTables_sizing">'+N[t]+"</div>",e.childNodes[0].style.height="0",e.childNodes[0].style.overflow="hidden",e.style.width=O[t]},i),x.outerWidth()<l?(c=y.scrollHeight>y.offsetHeight||"scroll"==w.css("overflow-y")?l+p:l,P&&(y.scrollHeight>y.offsetHeight||"scroll"==w.css("overflow-y"))&&(E.width=Ke(c-p)),""!==f&&""===d||ot(n,1,"Possible column misalignment",6)):c="100%",C.width=Ke(c),g.width=Ke(c),D&&(n.nScrollFoot.style.width=Ke(c)),h||P&&(C.height=Ke(k.offsetHeight+p));var G=x.outerWidth();v[0].style.width=Ke(G),b.width=Ke(G);var j=x.height()>y.clientHeight||"scroll"==w.css("overflow-y"),B="padding"+(I.bScrollbarLeft?"Left":"Right");b[B]=j?p+"px":"0px",D&&(S[0].style.width=Ke(G),A[0].style.width=Ke(G),A[0].style[B]=j?p+"px":"0px"),x.children("colgroup").insertBefore(x.children("thead")),w.trigger("scroll"),!n.bSorted&&!n.bFiltered||n._drawHold||(y.scrollTop=0)}function Ue(e,t,n){for(var r,i,a=0,o=0,s=t.length;o<s;){for(r=t[o].firstChild,i=n?n[o].firstChild:null;r;)1===r.nodeType&&(n?e(r,i,a):e(r,a),a++),r=r.nextSibling,i=n?i.nextSibling:null;o++}}var He=/<.*?>/g;function We(e){var t,n,r,i=e.nTable,a=e.aoColumns,o=e.oScroll,s=o.sY,c=o.sX,l=o.sXInner,u=a.length,f=L(e,"bVisible"),d=U("th",e.nTHead),h=i.getAttribute("width"),p=i.parentNode,m=!1,g=e.oBrowser,_=g.bScrollOversize,b=i.style.width;for(b&&-1!==b.indexOf("%")&&(h=b),t=0;t<f.length;t++)null!==(n=a[f[t]]).sWidth&&(n.sWidth=ze(n.sWidthOrig,p),m=!0);if(_||!m&&!c&&!s&&u==N(e)&&u==d.length)for(t=0;t<u;t++){var v=z(e,t);null!==v&&(a[v].sWidth=Ke(d.eq(t).width()))}else{var y=U(i).clone().css("visibility","hidden").removeAttr("id");y.find("tbody tr").remove();var w=U("<tr/>").appendTo(y.find("tbody"));for(y.find("thead, tfoot").remove(),y.append(U(e.nTHead).clone()).append(U(e.nTFoot).clone()),y.find("tfoot th, tfoot td").css("width",""),d=fe(e,y.find("thead")[0]),t=0;t<f.length;t++)n=a[f[t]],d[t].style.width=null!==n.sWidthOrig&&""!==n.sWidthOrig?Ke(n.sWidthOrig):"",n.sWidthOrig&&c&&U(d[t]).append(U("<div/>").css({width:n.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(e.aoData.length)for(t=0;t<f.length;t++)n=a[r=f[t]],U(Ve(e,r)).clone(!1).append(n.sContentPadding).appendTo(w);U("[name]",y).removeAttr("name");var C=U("<div/>").css(c||s?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(y).appendTo(p);c&&l?y.width(l):c?(y.css("width","auto"),y.removeAttr("width"),y.width()<p.clientWidth&&h&&y.width(p.clientWidth)):s?y.width(p.clientWidth):h&&y.width(h);var A=0;for(t=0;t<f.length;t++){var S=U(d[t]),T=S.outerWidth()-S.width(),x=g.bBounding?Math.ceil(d[t].getBoundingClientRect().width):S.outerWidth();A+=x,a[f[t]].sWidth=Ke(x-T)}i.style.width=Ke(A),C.remove()}if(h&&(i.style.width=Ke(h)),(h||c)&&!e._reszEvt){var k=function(){U(E).on("resize.DT-"+e.sInstance,qe(function(){q(e)}))};_?setTimeout(k,1e3):k(),e._reszEvt=!0}}var qe=k.util.throttle;function ze(e,t){if(!e)return 0;var n=U("<div/>").css("width",Ke(e)).appendTo(t||y.body),r=n[0].offsetWidth;return n.remove(),r}function Ve(e,t){var n=Ye(e,t);if(n<0)return null;var r=e.aoData[n];return r.nTr?r.anCells[t]:U("<td/>").html(x(e,n,t,"display"))[0]}function Ye(e,t){for(var n,r=-1,i=-1,a=0,o=e.aoData.length;a<o;a++)(n=(n=(n=x(e,a,t,"display")+"").replace(He,"")).replace(/&nbsp;/g," ")).length>r&&(r=n.length,i=a);return i}function Ke(e){return null===e?"0px":"number"==typeof e?e<0?"0px":e+"px":e.match(/\d$/)?e+"px":e}function Qe(e){var t,n,r,i,a,o,s,c=[],l=e.aoColumns,u=e.aaSortingFixed,f=U.isPlainObject(u),d=[],h=function(e){e.length&&!U.isArray(e[0])?d.push(e):U.merge(d,e)};for(U.isArray(u)&&h(u),f&&u.pre&&h(u.pre),h(e.aaSorting),f&&u.post&&h(u.post),t=0;t<d.length;t++)for(n=0,r=(i=l[s=d[t][0]].aDataSort).length;n<r;n++)o=l[a=i[n]].sType||"string",d[t]._idx===H&&(d[t]._idx=U.inArray(d[t][1],l[a].asSorting)),c.push({src:s,col:a,dir:d[t][1],index:d[t]._idx,type:o,formatter:k.ext.type.order[o+"-pre"]});return c}function Xe(e){var t,n,r,i,u,f=[],d=k.ext.type.order,h=e.aoData,a=(e.aoColumns,0),o=e.aiDisplayMaster;for(T(e),t=0,n=(u=Qe(e)).length;t<n;t++)(i=u[t]).formatter&&a++,nt(e,i.col);if("ssp"!=pt(e)&&0!==u.length){for(t=0,r=o.length;t<r;t++)f[o[t]]=t;a===u.length?o.sort(function(e,t){var n,r,i,a,o,s=u.length,c=h[e]._aSortData,l=h[t]._aSortData;for(i=0;i<s;i++)if(0!==(a=(n=c[(o=u[i]).col])<(r=l[o.col])?-1:r<n?1:0))return"asc"===o.dir?a:-a;return(n=f[e])<(r=f[t])?-1:r<n?1:0}):o.sort(function(e,t){var n,r,i,a,o,s=u.length,c=h[e]._aSortData,l=h[t]._aSortData;for(i=0;i<s;i++)if(n=c[(o=u[i]).col],r=l[o.col],0!==(a=(d[o.type+"-"+o.dir]||d["string-"+o.dir])(n,r)))return a;return(n=f[e])<(r=f[t])?-1:r<n?1:0})}e.bSorted=!0}function Ze(e){for(var t,n=e.aoColumns,r=Qe(e),i=e.oLanguage.oAria,a=0,o=n.length;a<o;a++){var s=n[a],c=s.asSorting,l=s.sTitle.replace(/<.*?>/g,""),u=s.nTh;u.removeAttribute("aria-sort"),t=s.bSortable?l+("asc"===(0<r.length&&r[0].col==a?(u.setAttribute("aria-sort","asc"==r[0].dir?"ascending":"descending"),c[r[0].index+1]||c[0]):c[0])?i.sSortAscending:i.sSortDescending):l,u.setAttribute("aria-label",t)}}function Je(e,t,n,r){var i,a=e.aoColumns[t],o=e.aaSorting,s=a.asSorting,c=function(e,t){var n=e._idx;return n===H&&(n=U.inArray(e[1],s)),n+1<s.length?n+1:t?null:0};if("number"==typeof o[0]&&(o=e.aaSorting=[o]),n&&e.oFeatures.bSortMulti){var l=U.inArray(t,W(o,"0"));-1!==l?(null===(i=c(o[l],!0))&&1===o.length&&(i=0),null===i?o.splice(l,1):(o[l][1]=s[i],o[l]._idx=i)):(o.push([t,s[0],0]),o[o.length-1]._idx=0)}else o.length&&o[0][0]==t?(i=c(o[0]),o.length=1,o[0][1]=s[i],o[0]._idx=i):(o.length=0,o.push([t,s[0]]),o[0]._idx=0);ce(e),"function"==typeof r&&r(e)}function et(t,e,n,r){var i=t.aoColumns[n];lt(e,{},function(e){!1!==i.bSortable&&(t.oFeatures.bProcessing?(Ge(t,!0),setTimeout(function(){Je(t,n,e.shiftKey,r),"ssp"!==pt(t)&&Ge(t,!1)},0)):Je(t,n,e.shiftKey,r))})}function tt(e){var t,n,r,i=e.aLastSort,a=e.oClasses.sSortColumn,o=Qe(e),s=e.oFeatures;if(s.bSort&&s.bSortClasses){for(t=0,n=i.length;t<n;t++)r=i[t].src,U(W(e.aoData,"anCells",r)).removeClass(a+(t<2?t+1:3));for(t=0,n=o.length;t<n;t++)r=o[t].src,U(W(e.aoData,"anCells",r)).addClass(a+(t<2?t+1:3))}e.aLastSort=o}function nt(e,t){var n,r,i,a=e.aoColumns[t],o=k.ext.order[a.sSortDataType];o&&(n=o.call(e.oInstance,e,t,S(e,t)));for(var s=k.ext.type.order[a.sType+"-pre"],c=0,l=e.aoData.length;c<l;c++)(r=e.aoData[c])._aSortData||(r._aSortData=[]),r._aSortData[t]&&!o||(i=o?n[c]:x(e,c,t,"sort"),r._aSortData[t]=s?s(i):i)}function rt(n){if(n.oFeatures.bStateSave&&!n.bDestroying){var e={time:+new Date,start:n._iDisplayStart,length:n._iDisplayLength,order:U.extend(!0,[],n.aaSorting),search:ke(n.oPreviousSearch),columns:U.map(n.aoColumns,function(e,t){return{visible:e.bVisible,search:ke(n.aoPreSearchCols[t])}})};ft(n,"aoStateSaveParams","stateSaveParams",[n,e]),n.oSavedState=e,n.fnStateSaveCallback.call(n.oInstance,n,e)}}function it(i,e,a){var o,s,c=i.aoColumns,t=function(e){if(e&&e.time){var t=ft(i,"aoStateLoadParams","stateLoadParams",[i,e]);if(-1===U.inArray(!1,t)){var n=i.iStateDuration;if(0<n&&e.time<+new Date-1e3*n)a();else if(e.columns&&c.length!==e.columns.length)a();else{if(i.oLoadedState=U.extend(!0,{},e),e.start!==H&&(i._iDisplayStart=e.start,i.iInitDisplayStart=e.start),e.length!==H&&(i._iDisplayLength=e.length),e.order!==H&&(i.aaSorting=[],U.each(e.order,function(e,t){i.aaSorting.push(t[0]>=c.length?[0,t[1]]:t)})),e.search!==H&&U.extend(i.oPreviousSearch,Ee(e.search)),e.columns)for(o=0,s=e.columns.length;o<s;o++){var r=e.columns[o];r.visible!==H&&(c[o].bVisible=r.visible),r.search!==H&&U.extend(i.aoPreSearchCols[o],Ee(r.search))}ft(i,"aoStateLoaded","stateLoaded",[i,e]),a()}}else a()}else a()};if(i.oFeatures.bStateSave){var n=i.fnStateLoadCallback.call(i.oInstance,i,t);n!==H&&t(n)}else a()}function at(e){var t=k.settings,n=U.inArray(e,W(t,"nTable"));return-1!==n?t[n]:null}function ot(e,t,n,r){if(n="DataTables warning: "+(e?"table id="+e.sTableId+" - ":"")+n,r&&(n+=". For more information about this error, please see http://datatables.net/tn/"+r),t)E.console&&console.log&&console.log(n);else{var i=k.ext,a=i.sErrMode||i.errMode;if(e&&ft(e,null,"error",[e,r,n]),"alert"==a)alert(n);else{if("throw"==a)throw new Error(n);"function"==typeof a&&a(e,r,n)}}}function st(n,r,e,t){U.isArray(e)?U.each(e,function(e,t){U.isArray(t)?st(n,r,t[0],t[1]):st(n,r,t)}):(t===H&&(t=e),r[e]!==H&&(n[t]=r[e]))}function ct(e,t,n){var r;for(var i in t)t.hasOwnProperty(i)&&(r=t[i],U.isPlainObject(r)?(U.isPlainObject(e[i])||(e[i]={}),U.extend(!0,e[i],r)):n&&"data"!==i&&"aaData"!==i&&U.isArray(r)?e[i]=r.slice():e[i]=r);return e}function lt(t,e,n){U(t).on("click.DT",e,function(e){U(t).trigger("blur"),n(e)}).on("keypress.DT",e,function(e){13===e.which&&(e.preventDefault(),n(e))}).on("selectstart.DT",function(){return!1})}function ut(e,t,n,r){n&&e[t].push({fn:n,sName:r})}function ft(n,e,t,r){var i=[];if(e&&(i=U.map(n[e].slice().reverse(),function(e,t){return e.fn.apply(n.oInstance,r)})),null!==t){var a=U.Event(t+".dt");U(n.nTable).trigger(a,r),i.push(a.result)}return i}function dt(e){var t=e._iDisplayStart,n=e.fnDisplayEnd(),r=e._iDisplayLength;n<=t&&(t=n-r),t-=t%r,(-1===r||t<0)&&(t=0),e._iDisplayStart=t}function ht(e,t){var n=e.renderer,r=k.ext.renderer[t];return U.isPlainObject(n)&&n[t]?r[n[t]]||r._:"string"==typeof n&&r[n]||r._}function pt(e){return e.oFeatures.bServerSide?"ssp":e.ajax||e.sAjaxSource?"ajax":"dom"}var mt=[],gt=Array.prototype;b=function(e,t){if(!(this instanceof b))return new b(e,t);var s=[],n=function(e){var t,n,r,i,a,o=(t=e,i=k.settings,a=U.map(i,function(e,t){return e.nTable}),t?t.nTable&&t.oApi?[t]:t.nodeName&&"table"===t.nodeName.toLowerCase()?-1!==(n=U.inArray(t,a))?[i[n]]:null:t&&"function"==typeof t.settings?t.settings().toArray():("string"==typeof t?r=U(t):t instanceof U&&(r=t),r?r.map(function(e){return-1!==(n=U.inArray(this,a))?i[n]:null}).toArray():void 0):[]);o&&s.push.apply(s,o)};if(U.isArray(e))for(var r=0,i=e.length;r<i;r++)n(e[r]);else n(e);this.context=g(s),t&&U.merge(this,t),this.selector={rows:null,cols:null,opts:null},b.extend(this,this,mt)},k.Api=b,U.extend(b.prototype,{any:function(){return 0!==this.count()},concat:gt.concat,context:[],count:function(){return this.flatten().length},each:function(e){for(var t=0,n=this.length;t<n;t++)e.call(this,this[t],t,this);return this},eq:function(e){var t=this.context;return t.length>e?new b(t[e],this[e]):null},filter:function(e){var t=[];if(gt.filter)t=gt.filter.call(this,e,this);else for(var n=0,r=this.length;n<r;n++)e.call(this,this[n],n,this)&&t.push(this[n]);return new b(this.context,t)},flatten:function(){var e=[];return new b(this.context,e.concat.apply(e,this.toArray()))},join:gt.join,indexOf:gt.indexOf||function(e,t){for(var n=t||0,r=this.length;n<r;n++)if(this[n]===e)return n;return-1},iterator:function(e,t,n,r){var i,a,o,s,c,l,u,f,d=[],h=this.context,p=this.selector;for("string"==typeof e&&(r=n,n=t,t=e,e=!1),a=0,o=h.length;a<o;a++){var m=new b(h[a]);if("table"===t)(i=n.call(m,h[a],a))!==H&&d.push(i);else if("columns"===t||"rows"===t)(i=n.call(m,h[a],this[a],a))!==H&&d.push(i);else if("column"===t||"column-rows"===t||"row"===t||"cell"===t)for(u=this[a],"column-rows"===t&&(l=Ct(h[a],p.opts)),s=0,c=u.length;s<c;s++)f=u[s],(i="cell"===t?n.call(m,h[a],f.row,f.column,a,s):n.call(m,h[a],f,a,s,l))!==H&&d.push(i)}if(d.length||r){var g=new b(h,e?d.concat.apply([],d):d),_=g.selector;return _.rows=p.rows,_.cols=p.cols,_.opts=p.opts,g}return this},lastIndexOf:gt.lastIndexOf||function(e,t){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(e){var t=[];if(gt.map)t=gt.map.call(this,e,this);else for(var n=0,r=this.length;n<r;n++)t.push(e.call(this,this[n],n));return new b(this.context,t)},pluck:function(t){return this.map(function(e){return e[t]})},pop:gt.pop,push:gt.push,reduce:gt.reduce||function(e,t){return A(this,e,t,0,this.length,1)},reduceRight:gt.reduceRight||function(e,t){return A(this,e,t,this.length-1,-1,-1)},reverse:gt.reverse,selector:null,shift:gt.shift,slice:function(){return new b(this.context,this)},sort:gt.sort,splice:gt.splice,toArray:function(){return gt.slice.call(this)},to$:function(){return U(this)},toJQuery:function(){return U(this)},unique:function(){return new b(this.context,g(this))},unshift:gt.unshift}),b.extend=function(e,t,n){if(n.length&&t&&(t instanceof b||t.__dt_wrapper)){var r,i,a,o=function(t,n,r){return function(){var e=n.apply(t,arguments);return b.extend(e,e,r.methodExt),e}};for(r=0,i=n.length;r<i;r++)t[(a=n[r]).name]="function"===a.type?o(e,a.val,a):"object"===a.type?{}:a.val,t[a.name].__dt_wrapper=!0,b.extend(e,t[a.name],a.propExt)}},b.register=t=function(e,t){if(U.isArray(e))for(var n=0,r=e.length;n<r;n++)b.register(e[n],t);else{var i,a,o,s,c=e.split("."),l=mt,u=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n].name===t)return e[n];return null};for(i=0,a=c.length;i<a;i++){var f=u(l,o=(s=-1!==c[i].indexOf("()"))?c[i].replace("()",""):c[i]);f||(f={name:o,val:{},methodExt:[],propExt:[],type:"object"},l.push(f)),i===a-1?(f.val=t,f.type="function"==typeof t?"function":U.isPlainObject(t)?"object":"other"):l=s?f.methodExt:f.propExt}}},b.registerPlural=e=function(e,t,n){b.register(e,n),b.register(t,function(){var e=n.apply(this,arguments);return e===this?this:e instanceof b?e.length?U.isArray(e[0])?new b(e.context,e[0]):e[0]:H:e})};var _t=function(e,n){if(U.isArray(e))return U.map(e,function(e){return _t(e,n)});if("number"==typeof e)return[n[e]];var r=U.map(n,function(e,t){return e.nTable});return U(r).filter(e).map(function(e){var t=U.inArray(this,r);return n[t]}).toArray()};t("tables()",function(e){return e!==H&&null!==e?new b(_t(e,this.context)):this}),t("table()",function(e){var t=this.tables(e),n=t.context;return n.length?new b(n[0]):t}),e("tables().nodes()","table().node()",function(){return this.iterator("table",function(e){return e.nTable},1)}),e("tables().body()","table().body()",function(){return this.iterator("table",function(e){return e.nTBody},1)}),e("tables().header()","table().header()",function(){return this.iterator("table",function(e){return e.nTHead},1)}),e("tables().footer()","table().footer()",function(){return this.iterator("table",function(e){return e.nTFoot},1)}),e("tables().containers()","table().container()",function(){return this.iterator("table",function(e){return e.nTableWrapper},1)}),t("draw()",function(t){return this.iterator("table",function(e){"page"===t?se(e):("string"==typeof t&&(t="full-hold"!==t),ce(e,!1===t))})}),t("page()",function(t){return t===H?this.page.info().page:this.iterator("table",function(e){Le(e,t)})}),t("page.info()",function(e){if(0===this.context.length)return H;var t=this.context[0],n=t._iDisplayStart,r=t.oFeatures.bPaginate?t._iDisplayLength:-1,i=t.fnRecordsDisplay(),a=-1===r;return{page:a?0:Math.floor(n/r),pages:a?1:Math.ceil(i/r),start:n,end:t.fnDisplayEnd(),length:r,recordsTotal:t.fnRecordsTotal(),recordsDisplay:i,serverSide:"ssp"===pt(t)}}),t("page.len()",function(t){return t===H?0!==this.context.length?this.context[0]._iDisplayLength:H:this.iterator("table",function(e){Oe(e,t)})});var bt=function(i,a,e){if(e){var t=new b(i);t.one("draw",function(){e(t.ajax.json())})}if("ssp"==pt(i))ce(i,a);else{Ge(i,!0);var n=i.jqXHR;n&&4!==n.readyState&&n.abort(),de(i,[],function(e){J(i);for(var t=ge(i,e),n=0,r=t.length;n<r;n++)G(i,t[n]);ce(i,a),Ge(i,!1)})}};t("ajax.json()",function(){var e=this.context;if(0<e.length)return e[0].json}),t("ajax.params()",function(){var e=this.context;if(0<e.length)return e[0].oAjaxData}),t("ajax.reload()",function(t,n){return this.iterator("table",function(e){bt(e,!1===n,t)})}),t("ajax.url()",function(t){var e=this.context;return t===H?0===e.length?H:(e=e[0]).ajax?U.isPlainObject(e.ajax)?e.ajax.url:e.ajax:e.sAjaxSource:this.iterator("table",function(e){U.isPlainObject(e.ajax)?e.ajax.url=t:e.ajax=t})}),t("ajax.url().load()",function(t,n){return this.iterator("table",function(e){bt(e,!1===n,t)})});var vt=function(e,t,n,r,i){var a,o,s,c,l,u,f=[],d=typeof t;for(t&&"string"!==d&&"function"!==d&&t.length!==H||(t=[t]),s=0,c=t.length;s<c;s++)for(l=0,u=(o=t[s]&&t[s].split&&!t[s].match(/[\[\(:]/)?t[s].split(","):[t[s]]).length;l<u;l++)(a=n("string"==typeof o[l]?U.trim(o[l]):o[l]))&&a.length&&(f=f.concat(a));var h=p.selector[e];if(h.length)for(s=0,c=h.length;s<c;s++)f=h[s](r,i,f);return g(f)},yt=function(e){return e||(e={}),e.filter&&e.search===H&&(e.search=e.filter),U.extend({search:"none",order:"current",page:"all"},e)},wt=function(e){for(var t=0,n=e.length;t<n;t++)if(0<e[t].length)return e[0]=e[t],e[0].length=1,e.length=1,e.context=[e.context[t]],e;return e.length=0,e},Ct=function(e,t){var n,r=[],i=e.aiDisplay,a=e.aiDisplayMaster,o=t.search,s=t.order,c=t.page;if("ssp"==pt(e))return"removed"===o?[]:m(0,a.length);if("current"==c)for(u=e._iDisplayStart,f=e.fnDisplayEnd();u<f;u++)r.push(i[u]);else if("current"==s||"applied"==s){if("none"==o)r=a.slice();else if("applied"==o)r=i.slice();else if("removed"==o){for(var l={},u=0,f=i.length;u<f;u++)l[i[u]]=null;r=U.map(a,function(e){return l.hasOwnProperty(e)?null:e})}}else if("index"==s||"original"==s)for(u=0,f=e.aoData.length;u<f;u++)"none"==o?r.push(u):(-1===(n=U.inArray(u,i))&&"removed"==o||0<=n&&"applied"==o)&&r.push(u);return r};t("rows()",function(t,n){t===H?t="":U.isPlainObject(t)&&(n=t,t=""),n=yt(n);var e=this.iterator("table",function(e){return vt("row",t,function(n){var e=h(n),r=c.aoData;if(null!==e&&!l)return[e];if(u||(u=Ct(c,l)),null!==e&&-1!==U.inArray(e,u))return[e];if(null===n||n===H||""===n)return u;if("function"==typeof n)return U.map(u,function(e){var t=r[e];return n(e,t._aData,t.nTr)?e:null});if(n.nodeName){var t=n._DT_RowIndex,i=n._DT_CellIndex;if(t!==H)return r[t]&&r[t].nTr===n?[t]:[];if(i)return r[i.row]&&r[i.row].nTr===n.parentNode?[i.row]:[];var a=U(n).closest("*[data-dt-row]");return a.length?[a.data("dt-row")]:[]}if("string"==typeof n&&"#"===n.charAt(0)){var o=c.aIds[n.replace(/^#/,"")];if(o!==H)return[o.idx]}var s=w(v(c.aoData,u,"nTr"));return U(s).filter(n).map(function(){return this._DT_RowIndex}).toArray()},c=e,l=n);var c,l,u},1);return e.selector.rows=t,e.selector.opts=n,e}),t("rows().nodes()",function(){return this.iterator("row",function(e,t){return e.aoData[t].nTr||H},1)}),t("rows().data()",function(){return this.iterator(!0,"rows",function(e,t){return v(e.aoData,t,"_aData")},1)}),e("rows().cache()","row().cache()",function(r){return this.iterator("row",function(e,t){var n=e.aoData[t];return"search"===r?n._aFilterData:n._aSortData},1)}),e("rows().invalidate()","row().invalidate()",function(n){return this.iterator("row",function(e,t){te(e,t,n)})}),e("rows().indexes()","row().index()",function(){return this.iterator("row",function(e,t){return t},1)}),e("rows().ids()","row().id()",function(e){for(var t=[],n=this.context,r=0,i=n.length;r<i;r++)for(var a=0,o=this[r].length;a<o;a++){var s=n[r].rowIdFn(n[r].aoData[this[r][a]]._aData);t.push((!0===e?"#":"")+s)}return new b(n,t)}),e("rows().remove()","row().remove()",function(){var d=this;return this.iterator("row",function(e,t,n){var r,i,a,o,s,c,l=e.aoData,u=l[t];for(l.splice(t,1),r=0,i=l.length;r<i;r++)if(c=(s=l[r]).anCells,null!==s.nTr&&(s.nTr._DT_RowIndex=r),null!==c)for(a=0,o=c.length;a<o;a++)c[a]._DT_CellIndex.row=r;ee(e.aiDisplayMaster,t),ee(e.aiDisplay,t),ee(d[n],t,!1),0<e._iRecordsDisplay&&e._iRecordsDisplay--,dt(e);var f=e.rowIdFn(u._aData);f!==H&&delete e.aIds[f]}),this.iterator("table",function(e){for(var t=0,n=e.aoData.length;t<n;t++)e.aoData[t].idx=t}),this}),t("rows.add()",function(a){var e=this.iterator("table",function(e){var t,n,r,i=[];for(n=0,r=a.length;n<r;n++)(t=a[n]).nodeName&&"TR"===t.nodeName.toUpperCase()?i.push(j(e,t)[0]):i.push(G(e,t));return i},1),t=this.rows(-1);return t.pop(),U.merge(t,e),t}),t("row()",function(e,t){return wt(this.rows(e,t))}),t("row().data()",function(e){var t=this.context;if(e===H)return t.length&&this.length?t[0].aoData[this[0]]._aData:H;var n=t[0].aoData[this[0]];return n._aData=e,U.isArray(e)&&n.nTr&&n.nTr.id&&X(t[0].rowId)(e,n.nTr.id),te(t[0],this[0],"data"),this}),t("row().node()",function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]].nTr||null}),t("row.add()",function(t){t instanceof U&&t.length&&(t=t[0]);var e=this.iterator("table",function(e){return t.nodeName&&"TR"===t.nodeName.toUpperCase()?j(e,t)[0]:G(e,t)});return this.row(e[0])});var At=function(e,t){var n=e.context;if(n.length){var r=n[0].aoData[t!==H?t:e[0]];r&&r._details&&(r._details.remove(),r._detailsShow=H,r._details=H)}},St=function(e,t){var n=e.context;if(n.length&&e.length){var r=n[0].aoData[e[0]];r._details&&((r._detailsShow=t)?r._details.insertAfter(r.nTr):r._details.detach(),Tt(n[0]))}},Tt=function(c){var i=new b(c),e=".dt.DT_details",t="draw"+e,n="column-visibility"+e,r="destroy"+e,l=c.aoData;i.off(t+" "+n+" "+r),0<W(l,"_details").length&&(i.on(t,function(e,t){c===t&&i.rows({page:"current"}).eq(0).each(function(e){var t=l[e];t._detailsShow&&t._details.insertAfter(t.nTr)})}),i.on(n,function(e,t,n,r){if(c===t)for(var i,a=N(t),o=0,s=l.length;o<s;o++)(i=l[o])._details&&i._details.children("td[colspan]").attr("colspan",a)}),i.on(r,function(e,t){if(c===t)for(var n=0,r=l.length;n<r;n++)l[n]._details&&At(i,n)}))},xt="row().child",kt=xt+"()";t(kt,function(e,t){var a,n,o,s,r=this.context;return e===H?r.length&&this.length?r[0].aoData[this[0]]._details:H:(!0===e?this.child.show():!1===e?At(this):r.length&&this.length&&(a=r[0],n=r[0].aoData[this[0]],o=[],(s=function(e,t){if(U.isArray(e)||e instanceof U)for(var n=0,r=e.length;n<r;n++)s(e[n],t);else if(e.nodeName&&"tr"===e.nodeName.toLowerCase())o.push(e);else{var i=U("<tr><td/></tr>").addClass(t);U("td",i).addClass(t).html(e)[0].colSpan=N(a),o.push(i[0])}})(e,t),n._details&&n._details.detach(),n._details=U(o),n._detailsShow&&n._details.insertAfter(n.nTr)),this)}),t([xt+".show()",kt+".show()"],function(e){return St(this,!0),this}),t([xt+".hide()",kt+".hide()"],function(){return St(this,!1),this}),t([xt+".remove()",kt+".remove()"],function(){return At(this),this}),t(xt+".isShown()",function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]]._detailsShow||!1});var Et=/^([^:]+):(name|visIdx|visible)$/,Dt=function(e,t,n,r,i){for(var a=[],o=0,s=i.length;o<s;o++)a.push(x(e,i[o],t));return a};t("columns()",function(n,r){n===H?n="":U.isPlainObject(n)&&(r=n,n=""),r=yt(r);var e=this.iterator("table",function(e){return t=n,l=r,u=(c=e).aoColumns,f=W(u,"sName"),d=W(u,"nTh"),vt("column",t,function(n){var e=h(n);if(""===n)return m(u.length);if(null!==e)return[0<=e?e:u.length+e];if("function"==typeof n){var r=Ct(c,l);return U.map(u,function(e,t){return n(t,Dt(c,t,0,0,r),d[t])?t:null})}var i="string"==typeof n?n.match(Et):"";if(i)switch(i[2]){case"visIdx":case"visible":var t=parseInt(i[1],10);if(t<0){var a=U.map(u,function(e,t){return e.bVisible?t:null});return[a[a.length+t]]}return[z(c,t)];case"name":return U.map(f,function(e,t){return e===i[1]?t:null});default:return[]}if(n.nodeName&&n._DT_CellIndex)return[n._DT_CellIndex.column];var o=U(d).filter(n).map(function(){return U.inArray(this,d)}).toArray();if(o.length||!n.nodeName)return o;var s=U(n).closest("*[data-dt-column]");return s.length?[s.data("dt-column")]:[]},c,l);var c,t,l,u,f,d},1);return e.selector.cols=n,e.selector.opts=r,e}),e("columns().header()","column().header()",function(e,t){return this.iterator("column",function(e,t){return e.aoColumns[t].nTh},1)}),e("columns().footer()","column().footer()",function(e,t){return this.iterator("column",function(e,t){return e.aoColumns[t].nTf},1)}),e("columns().data()","column().data()",function(){return this.iterator("column-rows",Dt,1)}),e("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].mData},1)}),e("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(e,t,n,r,i){return v(e.aoData,i,"search"===a?"_aFilterData":"_aSortData",t)},1)}),e("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(e,t,n,r,i){return v(e.aoData,i,"anCells",t)},1)}),e("columns().visible()","column().visible()",function(n,r){var t=this,e=this.iterator("column",function(e,t){if(n===H)return e.aoColumns[t].bVisible;!function(e,t,n){var r,i,a,o,s=e.aoColumns,c=s[t],l=e.aoData;if(n===H)return c.bVisible;if(c.bVisible!==n){if(n){var u=U.inArray(!0,W(s,"bVisible"),t+1);for(i=0,a=l.length;i<a;i++)o=l[i].nTr,r=l[i].anCells,o&&o.insertBefore(r[t],r[u]||null)}else U(W(e.aoData,"anCells",t)).detach();c.bVisible=n}}(e,t,n)});return n!==H&&this.iterator("table",function(e){oe(e,e.aoHeader),oe(e,e.aoFooter),e.aiDisplay.length||U(e.nTBody).find("td[colspan]").attr("colspan",N(e)),rt(e),t.iterator("column",function(e,t){ft(e,null,"column-visibility",[e,t,n,r])}),(r===H||r)&&t.columns.adjust()}),e}),e("columns().indexes()","column().index()",function(n){return this.iterator("column",function(e,t){return"visible"===n?S(e,t):t},1)}),t("columns.adjust()",function(){return this.iterator("table",function(e){q(e)},1)}),t("column.index()",function(e,t){if(0!==this.context.length){var n=this.context[0];if("fromVisible"===e||"toData"===e)return z(n,t);if("fromData"===e||"toVisible"===e)return S(n,t)}}),t("column()",function(e,t){return wt(this.columns(e,t))});t("cells()",function(g,e,_){if(U.isPlainObject(g)&&(g.row===H?(_=g,g=null):(_=e,e=null)),U.isPlainObject(e)&&(_=e,e=null),null===e||e===H)return this.iterator("table",function(e){return r=e,t=g,n=yt(_),f=r.aoData,d=Ct(r,n),h=w(v(f,d,"anCells")),p=U([].concat.apply([],h)),m=r.aoColumns.length,vt("cell",t,function(e){var t="function"==typeof e;if(null===e||e===H||t){for(a=[],o=0,s=d.length;o<s;o++)for(i=d[o],c=0;c<m;c++)l={row:i,column:c},t?(u=f[i],e(l,x(r,i,c),u.anCells?u.anCells[c]:null)&&a.push(l)):a.push(l);return a}if(U.isPlainObject(e))return e.column!==H&&e.row!==H&&-1!==U.inArray(e.row,d)?[e]:[];var n=p.filter(e).map(function(e,t){return{row:t._DT_CellIndex.row,column:t._DT_CellIndex.column}}).toArray();return n.length||!e.nodeName?n:(u=U(e).closest("*[data-dt-row]")).length?[{row:u.data("dt-row"),column:u.data("dt-column")}]:[]},r,n);var r,t,n,i,a,o,s,c,l,u,f,d,h,p,m});var r,i,a,o,t=_?{page:_.page,order:_.order,search:_.search}:{},s=this.columns(e,t),c=this.rows(g,t),n=this.iterator("table",function(e,t){var n=[];for(r=0,i=c[t].length;r<i;r++)for(a=0,o=s[t].length;a<o;a++)n.push({row:c[t][r],column:s[t][a]});return n},1),l=_&&_.selected?this.cells(n,_):n;return U.extend(l.selector,{cols:e,rows:g,opts:_}),l}),e("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(e,t,n){var r=e.aoData[t];return r&&r.anCells?r.anCells[n]:H},1)}),t("cells().data()",function(){return this.iterator("cell",function(e,t,n){return x(e,t,n)},1)}),e("cells().cache()","cell().cache()",function(r){return r="search"===r?"_aFilterData":"_aSortData",this.iterator("cell",function(e,t,n){return e.aoData[t][r][n]},1)}),e("cells().render()","cell().render()",function(r){return this.iterator("cell",function(e,t,n){return x(e,t,n,r)},1)}),e("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(e,t,n){return{row:t,column:n,columnVisible:S(e,n)}},1)}),e("cells().invalidate()","cell().invalidate()",function(r){return this.iterator("cell",function(e,t,n){te(e,t,r,n)})}),t("cell()",function(e,t,n){return wt(this.cells(e,t,n))}),t("cell().data()",function(e){var t=this.context,n=this[0];return e===H?t.length&&n.length?x(t[0],n[0].row,n[0].column):H:(B(t[0],n[0].row,n[0].column,e),te(t[0],n[0].row,"data",n[0].column),this)}),t("order()",function(t,e){var n=this.context;return t===H?0!==n.length?n[0].aaSorting:H:("number"==typeof t?t=[[t,e]]:t.length&&!U.isArray(t[0])&&(t=Array.prototype.slice.call(arguments)),this.iterator("table",function(e){e.aaSorting=t.slice()}))}),t("order.listener()",function(t,n,r){return this.iterator("table",function(e){et(e,t,n,r)})}),t("order.fixed()",function(t){if(t)return this.iterator("table",function(e){e.aaSortingFixed=U.extend(!0,{},t)});var e=this.context,n=e.length?e[0].aaSortingFixed:H;return U.isArray(n)?{pre:n}:n}),t(["columns().order()","column().order()"],function(r){var i=this;return this.iterator("table",function(e,t){var n=[];U.each(i[t],function(e,t){n.push([t,r])}),e.aaSorting=n})}),t("search()",function(t,n,r,i){var e=this.context;return t===H?0!==e.length?e[0].oPreviousSearch.sSearch:H:this.iterator("table",function(e){e.oFeatures.bFilter&&be(e,U.extend({},e.oPreviousSearch,{sSearch:t+"",bRegex:null!==n&&n,bSmart:null===r||r,bCaseInsensitive:null===i||i}),1)})}),e("columns().search()","column().search()",function(r,i,a,o){return this.iterator("column",function(e,t){var n=e.aoPreSearchCols;if(r===H)return n[t].sSearch;e.oFeatures.bFilter&&(U.extend(n[t],{sSearch:r+"",bRegex:null!==i&&i,bSmart:null===a||a,bCaseInsensitive:null===o||o}),be(e,e.oPreviousSearch,1))})}),t("state()",function(){return this.context.length?this.context[0].oSavedState:null}),t("state.clear()",function(){return this.iterator("table",function(e){e.fnStateSaveCallback.call(e.oInstance,e,{})})}),t("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null}),t("state.save()",function(){return this.iterator("table",function(e){rt(e)})}),k.versionCheck=k.fnVersionCheck=function(e){for(var t,n,r=k.version.split("."),i=e.split("."),a=0,o=i.length;a<o;a++)if((t=parseInt(r[a],10)||0)!==(n=parseInt(i[a],10)||0))return n<t;return!0},k.isDataTable=k.fnIsDataTable=function(e){var i=U(e).get(0),a=!1;return e instanceof k.Api||(U.each(k.settings,function(e,t){var n=t.nScrollHead?U("table",t.nScrollHead)[0]:null,r=t.nScrollFoot?U("table",t.nScrollFoot)[0]:null;t.nTable!==i&&n!==i&&r!==i||(a=!0)}),a)},k.tables=k.fnTables=function(t){var e=!1;U.isPlainObject(t)&&(e=t.api,t=t.visible);var n=U.map(k.settings,function(e){if(!t||t&&U(e.nTable).is(":visible"))return e.nTable});return e?new b(n):n},k.camelToHungarian=D,t("$()",function(e,t){var n=this.rows(t).nodes(),r=U(n);return U([].concat(r.filter(e).toArray(),r.find(e).toArray()))}),U.each(["on","one","off"],function(e,n){t(n+"()",function(){var e=Array.prototype.slice.call(arguments);e[0]=U.map(e[0].split(/\s/),function(e){return e.match(/\.dt\b/)?e:e+".dt"}).join(" ");var t=U(this.tables().nodes());return t[n].apply(t,e),this})}),t("clear()",function(){return this.iterator("table",function(e){J(e)})}),t("settings()",function(){return new b(this.context,this.context)}),t("init()",function(){var e=this.context;return e.length?e[0].oInit:null}),t("data()",function(){return this.iterator("table",function(e){return W(e.aoData,"_aData")}).flatten()}),t("destroy()",function(p){return p=p||!1,this.iterator("table",function(t){var n,e=t.nTableWrapper.parentNode,r=t.oClasses,i=t.nTable,a=t.nTBody,o=t.nTHead,s=t.nTFoot,c=U(i),l=U(a),u=U(t.nTableWrapper),f=U.map(t.aoData,function(e){return e.nTr});t.bDestroying=!0,ft(t,"aoDestroyCallback","destroy",[t]),p||new b(t).columns().visible(!0),u.off(".DT").find(":not(tbody *)").off(".DT"),U(E).off(".DT-"+t.sInstance),i!=o.parentNode&&(c.children("thead").detach(),c.append(o)),s&&i!=s.parentNode&&(c.children("tfoot").detach(),c.append(s)),t.aaSorting=[],t.aaSortingFixed=[],tt(t),U(f).removeClass(t.asStripeClasses.join(" ")),U("th, td",o).removeClass(r.sSortable+" "+r.sSortableAsc+" "+r.sSortableDesc+" "+r.sSortableNone),l.children().detach(),l.append(f);var d=p?"remove":"detach";c[d](),u[d](),!p&&e&&(e.insertBefore(i,t.nTableReinsertBefore),c.css("width",t.sDestroyWidth).removeClass(r.sTable),(n=t.asDestroyStripes.length)&&l.children().each(function(e){U(this).addClass(t.asDestroyStripes[e%n])}));var h=U.inArray(t,k.settings);-1!==h&&k.settings.splice(h,1)})}),U.each(["column","row","cell"],function(e,c){t(c+"s().every()",function(a){var o=this.selector.opts,s=this;return this.iterator(c,function(e,t,n,r,i){a.call(s[c](t,"cell"===c?n:o,"cell"===c?o:H),t,n,r,i)})})}),t("i18n()",function(e,t,n){var r=this.context[0],i=Q(e)(r.oLanguage);return i===H&&(i=t),n!==H&&U.isPlainObject(i)&&(i=i[n]!==H?i[n]:i._),i.replace("%d",n)}),k.version="1.10.21",k.settings=[],k.models={},k.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0},k.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1},k.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},k.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(e){try{return JSON.parse((-1===e.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+e.sInstance+"_"+location.pathname))}catch(e){return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(e,t){try{(-1===e.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+e.sInstance+"_"+location.pathname,JSON.stringify(t))}catch(e){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:U.extend({},k.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"},_(k.defaults),k.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},_(k.defaults.column),k.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:H,oAjaxData:H,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==pt(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==pt(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var e=this._iDisplayLength,t=this._iDisplayStart,n=t+e,r=this.aiDisplay.length,i=this.oFeatures,a=i.bPaginate;return i.bServerSide?!1===a||-1===e?t+r:Math.min(t+e,this._iRecordsDisplay):!a||r<n||-1===e?r:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null},k.ext=p={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:k.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:k.version},U.extend(p,{afnFiltering:p.search,aTypes:p.type.detect,ofnSearch:p.type.search,oSort:p.type.order,afnSortData:p.order,aoFeatures:p.feature,oApi:p.internal,oStdClasses:p.classes,oPagination:p.pager}),U.extend(k.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var It=k.ext.pager;function Pt(e,t){var n=[],r=It.numbers_length,i=Math.floor(r/2);return t<=r?n=m(0,t):e<=i?((n=m(0,r-2)).push("ellipsis"),n.push(t-1)):(t-1-i<=e?(n=m(t-(r-2),t)).splice(0,0,"ellipsis"):((n=m(e-i+2,e+i-1)).push("ellipsis"),n.push(t-1),n.splice(0,0,"ellipsis")),n.splice(0,0,0)),n.DT_el="span",n}U.extend(It,{simple:function(e,t){return["previous","next"]},full:function(e,t){return["first","previous","next","last"]},numbers:function(e,t){return[Pt(e,t)]},simple_numbers:function(e,t){return["previous",Pt(e,t),"next"]},full_numbers:function(e,t){return["first","previous",Pt(e,t),"next","last"]},first_last_numbers:function(e,t){return["first",Pt(e,t),"last"]},_numbers:Pt,numbers_length:7}),U.extend(!0,k.ext.renderer,{pageButton:{_:function(l,e,u,t,f,d){var h,p,n,m=l.oClasses,g=l.oLanguage.oPaginate,_=l.oLanguage.oAria.paginate||{},b=0,v=function(e,t){var n,r,i,a,o=m.sPageButtonDisabled,s=function(e){Le(l,e.data.action,!0)};for(n=0,r=t.length;n<r;n++)if(i=t[n],U.isArray(i)){var c=U("<"+(i.DT_el||"div")+"/>").appendTo(e);v(c,i)}else{switch(h=null,p=i,a=l.iTabIndex,i){case"ellipsis":e.append('<span class="ellipsis">&#x2026;</span>');break;case"first":h=g.sFirst,0===f&&(a=-1,p+=" "+o);break;case"previous":h=g.sPrevious,0===f&&(a=-1,p+=" "+o);break;case"next":h=g.sNext,0!==d&&f!==d-1||(a=-1,p+=" "+o);break;case"last":h=g.sLast,f===d-1&&(a=-1,p+=" "+o);break;default:h=i+1,p=f===i?m.sPageButtonActive:""}null!==h&&(lt(U("<a>",{class:m.sPageButton+" "+p,"aria-controls":l.sTableId,"aria-label":_[i],"data-dt-idx":b,tabindex:a,id:0===u&&"string"==typeof i?l.sTableId+"_"+i:null}).html(h).appendTo(e),{action:i},s),b++)}};try{n=U(e).find(y.activeElement).data("dt-idx")}catch(e){}v(U(e).empty(),t),n!==H&&U(e).find("[data-dt-idx="+n+"]").trigger("focus")}}}),U.extend(k.ext.type.detect,[function(e,t){var n=t.oLanguage.sDecimal;return u(e,n)?"num"+n:null},function(e,t){if(e&&!(e instanceof Date)&&!a.test(e))return null;var n=Date.parse(e);return null!==n&&!isNaN(n)||c(e)?"date":null},function(e,t){var n=t.oLanguage.sDecimal;return u(e,n,!0)?"num-fmt"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return f(e,n)?"html-num"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return f(e,n,!0)?"html-num-fmt"+n:null},function(e,t){return c(e)||"string"==typeof e&&-1!==e.indexOf("<")?"html":null}]),U.extend(k.ext.type.search,{html:function(e){return c(e)?e:"string"==typeof e?e.replace(r," ").replace(i,""):""},string:function(e){return c(e)?e:"string"==typeof e?e.replace(r," "):e}});var Mt=function(e,t,n,r){return 0===e||e&&"-"!==e?(t&&(e=l(e,t)),e.replace&&(n&&(e=e.replace(n,"")),r&&(e=e.replace(r,""))),1*e):-1/0};function $t(n){U.each({num:function(e){return Mt(e,n)},"num-fmt":function(e){return Mt(e,n,s)},"html-num":function(e){return Mt(e,n,i)},"html-num-fmt":function(e){return Mt(e,n,i,s)}},function(e,t){p.type.order[e+n+"-pre"]=t,e.match(/^html\-/)&&(p.type.search[e+n]=p.type.search.html)})}U.extend(p.type.order,{"date-pre":function(e){var t=Date.parse(e);return isNaN(t)?-1/0:t},"html-pre":function(e){return c(e)?"":e.replace?e.replace(/<.*?>/g,"").toLowerCase():e+""},"string-pre":function(e){return c(e)?"":"string"==typeof e?e.toLowerCase():e.toString?e.toString():""},"string-asc":function(e,t){return e<t?-1:t<e?1:0},"string-desc":function(e,t){return e<t?1:t<e?-1:0}}),$t(""),U.extend(!0,k.ext.renderer,{header:{_:function(a,o,s,c){U(a.nTable).on("order.dt.DT",function(e,t,n,r){if(a===t){var i=s.idx;o.removeClass(s.sSortingClass+" "+c.sSortAsc+" "+c.sSortDesc).addClass("asc"==r[i]?c.sSortAsc:"desc"==r[i]?c.sSortDesc:s.sSortingClass)}})},jqueryui:function(a,o,s,c){U("<div/>").addClass(c.sSortJUIWrapper).append(o.contents()).append(U("<span/>").addClass(c.sSortIcon+" "+s.sSortingClassJUI)).appendTo(o),U(a.nTable).on("order.dt.DT",function(e,t,n,r){if(a===t){var i=s.idx;o.removeClass(c.sSortAsc+" "+c.sSortDesc).addClass("asc"==r[i]?c.sSortAsc:"desc"==r[i]?c.sSortDesc:s.sSortingClass),o.find("span."+c.sSortIcon).removeClass(c.sSortJUIAsc+" "+c.sSortJUIDesc+" "+c.sSortJUI+" "+c.sSortJUIAscAllowed+" "+c.sSortJUIDescAllowed).addClass("asc"==r[i]?c.sSortJUIAsc:"desc"==r[i]?c.sSortJUIDesc:s.sSortingClassJUI)}})}}});var Ot=function(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):e};function Rt(t){return function(){var e=[at(this[k.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return k.ext.internal[t].apply(this,e)}}return k.render={number:function(a,o,s,c,l){return{display:function(e){if("number"!=typeof e&&"string"!=typeof e)return e;var t=e<0?"-":"",n=parseFloat(e);if(isNaN(n))return Ot(e);n=n.toFixed(s),e=Math.abs(n);var r=parseInt(e,10),i=s?o+(e-r).toFixed(s).substring(2):"";return t+(c||"")+r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+i+(l||"")}}},text:function(){return{display:Ot,filter:Ot}}},U.extend(k.ext.internal,{_fnExternApiFunc:Rt,_fnBuildAjax:de,_fnAjaxUpdate:he,_fnAjaxParameters:pe,_fnAjaxUpdateDraw:me,_fnAjaxDataSrc:ge,_fnAddColumn:O,_fnColumnOptions:R,_fnAdjustColumnSizing:q,_fnVisibleToColumnIndex:z,_fnColumnIndexToVisible:S,_fnVisbleColumns:N,_fnGetColumns:L,_fnColumnTypes:T,_fnApplyColumnDefs:F,_fnHungarianMap:_,_fnCamelToHungarian:D,_fnLanguageCompat:I,_fnBrowserDetect:$,_fnAddData:G,_fnAddTr:j,_fnNodeToDataIndex:function(e,t){return t._DT_RowIndex!==H?t._DT_RowIndex:null},_fnNodeToColumnIndex:function(e,t,n){return U.inArray(n,e.aoData[t].anCells)},_fnGetCellData:x,_fnSetCellData:B,_fnSplitObjNotation:K,_fnGetObjectDataFn:Q,_fnSetObjectDataFn:X,_fnGetDataMaster:Z,_fnClearTable:J,_fnDeleteIndex:ee,_fnInvalidate:te,_fnGetRowElements:ne,_fnCreateTr:re,_fnBuildHead:ae,_fnDrawHead:oe,_fnDraw:se,_fnReDraw:ce,_fnAddOptionsHtml:le,_fnDetectHeader:ue,_fnGetUniqueThs:fe,_fnFeatureHtmlFilter:_e,_fnFilterComplete:be,_fnFilterCustom:ve,_fnFilterColumn:ye,_fnFilter:we,_fnFilterCreateSearch:Ce,_fnEscapeRegex:Ae,_fnFilterData:xe,_fnFeatureHtmlInfo:De,_fnUpdateInfo:Ie,_fnInfoMacros:Pe,_fnInitialise:Me,_fnInitComplete:$e,_fnLengthChange:Oe,_fnFeatureHtmlLength:Re,_fnFeatureHtmlPaginate:Ne,_fnPageChange:Le,_fnFeatureHtmlProcessing:Fe,_fnProcessingDisplay:Ge,_fnFeatureHtmlTable:je,_fnScrollDraw:Be,_fnApplyToChildren:Ue,_fnCalculateColumnWidths:We,_fnThrottle:qe,_fnConvertToWidth:ze,_fnGetWidestNode:Ve,_fnGetMaxLenString:Ye,_fnStringToCss:Ke,_fnSortFlatten:Qe,_fnSort:Xe,_fnSortAria:Ze,_fnSortListener:Je,_fnSortAttachListener:et,_fnSortingClasses:tt,_fnSortData:nt,_fnSaveState:rt,_fnLoadState:it,_fnSettingsFromNode:at,_fnLog:ot,_fnMap:st,_fnBindAction:lt,_fnCallbackReg:ut,_fnCallbackFire:ft,_fnLengthOverflow:dt,_fnRenderer:ht,_fnDataSource:pt,_fnRowAttributes:ie,_fnExtend:ct,_fnCalculateEnd:function(){}}),((U.fn.dataTable=k).$=U).fn.dataTableSettings=k.settings,U.fn.dataTableExt=k.ext,U.fn.DataTable=function(e){return U(this).dataTable(e).api()},U.each(k,function(e,t){U.fn.DataTable[e]=t}),U.fn.dataTable}),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables"),function(p,e,m,_){"use strict";function t(s,c,l,u,f){return e.$inject=["tElm"],t.$inject=["$scope"],{restrict:"A",scope:{dtOptions:"=",dtColumns:"=",dtColumnDefs:"=",datatable:"@",dtInstance:"="},compile:e,controller:t};function e(e){var o=e[0].innerHTML;return function(t,n,e,r){function i(e,t){e!==t&&r.render(n,r.buildOptionsPromise(),o)}var a=e.dtDisableDeepWatchers?"$watchCollection":"$watch";_.forEach(["dtColumns","dtColumnDefs","dtOptions"],function(e){t[a].call(t,e,i,!0)}),u.showLoading(n,t),r.render(n,r.buildOptionsPromise(),o)}}function t(i){var a;function o(e){_.isFunction(i.dtInstance)?i.dtInstance(e):_.isDefined(i.dtInstance)&&(i.dtInstance=e)}this.buildOptionsPromise=function(){var t=s.defer();return s.all([s.when(i.dtOptions),s.when(i.dtColumns),s.when(i.dtColumnDefs)]).then(function(e){var t,n=e[0],r=e[1],i=e[2];if(f.deleteProperty(n,"$promise"),f.deleteProperty(r,"$promise"),f.deleteProperty(i,"$promise"),_.isDefined(n)&&(t={},_.extend(t,n),_.isArray(r)&&(t.aoColumns=r),_.isArray(i)&&(t.aoColumnDefs=i),t.language&&t.language.url)){var a=s.defer();c.get(t.language.url).success(function(e){a.resolve(e)}),t.language=a.promise}return f.resolveObjectPromises(t,["data","aaData","fnPromise"])}).then(function(e){t.resolve(e)}),t.promise},this.render=function(n,e,r){e.then(function(e){u.preRender(e);var t=i.datatable&&"ng"===i.datatable;a&&a._renderer?a._renderer.withOptions(e).render(n,i,r).then(function(e){o(a=e)}):l.fromOptions(e,t).render(n,i,r).then(function(e){o(a=e)})})}}}function n(n){return{newColumnDef:function(e){if(_.isUndefined(e))throw new Error('The parameter "targets" must be defined! See https://datatables.net/reference/option/columnDefs.targets');var t=Object.create(n.DTColumn);return _.isArray(e)?t.aTargets=e:t.aTargets=[e],t}}}function r(t,n,r){return{compileHtml:function(e){return t(_.element('<div class="'+r+'">'+n.loadingTemplate+"</div>"))(e)},isLoading:function(e){return e.hasClass(r)}}}function i(r){var i=[],n={showLoading:function(e,t){var n=_.element(r.compileHtml(t));e.after(n),e.hide(),n.show()},hideLoading:function(e){e.show();var t=e.next();r.isLoading(t)&&t.remove()},renderDataTable:function(e,t){var n="#"+e.attr("id");m.fn.dataTable.isDataTable(n)&&_.isObject(t)&&(t.destroy=!0);var r=e.DataTable(t),i=e.dataTable(),a={id:e.attr("id"),DataTable:r,dataTable:i};return o(t,a),a},hideLoadingAndRenderDataTable:function(e,t){return n.hideLoading(e),n.renderDataTable(e,t)},registerPlugin:function(e){i.push(e)},postRender:o,preRender:function(t){_.forEach(i,function(e){_.isFunction(e.preRender)&&e.preRender(t)})}};return n;function o(t,n){_.forEach(i,function(e){_.isFunction(e.postRender)&&e.postRender(t,n)})}}function a(c,n,l,u){return{create:function(e){var i,a,o,s=Object.create(n);function t(e,t){a=e,o=t;var n=u.newDTInstance(s),r=l.hideLoadingAndRenderDataTable(e,s.options);return i=r.DataTable,u.copyDTProperties(r,n),c.when(n)}return s.name="DTDefaultRenderer",s.options=e,s.render=t,s.reloadData=function(){},s.changeData=function(){},s.rerender=function(){i.destroy(),l.showLoading(a,o),t(a,o)},s}}}function o(n,m,r,g,i,_,b){return{create:function(e){var c,l,u,f,t,d,h=Object.create(i);return h.name="DTNGRenderer",h.options=e,h.render=function(e,t,n){c=n,u=e,f=t.$parent,d=b.newDTInstance(h);var r=m.defer(),i=e.find("tbody").html(),a=i.match(/^\s*.+?\s+in\s+(\S*)\s*/m);if(!a)throw new Error('Expected expression in form of "_item_ in _collection_[ track by _id_]" but got "{0}".',i);var o=a[1],s=!1;return f.$watchCollection(o,function(){l&&s&&p(),g(function(){s=!0,_.preRender(h.options);var e=_.hideLoadingAndRenderDataTable(u,h.options);l=e.DataTable,b.copyDTProperties(e,d),r.resolve(d)},0,!1)},!0),r.promise},h.reloadData=function(){n.warn("The Angular Renderer does not support reloading data. You need to do it directly on your model")},h.changeData=function(){n.warn("The Angular Renderer does not support changing the data. You need to change your model directly.")},h.rerender=function(){p(),_.showLoading(u,f),_.preRender(e),g(function(){var e=_.hideLoadingAndRenderDataTable(u,h.options);l=e.DataTable,b.copyDTProperties(e,d)},0,!1)},h;function p(){t&&t.$destroy(),l.ngDestroy(),u.html(c),t=f.$new(),r(u.contents())(t)}}}}function s(p,m,l,n,g,u){return{create:function(e){var i,f,r,a,d=null,h=Object.create(n);return h.name="DTPromiseRenderer",h.options=e,h.render=t,h.reloadData=function(t,n){var r=i&&i.page()?i.page():0;_.isFunction(h.options.fnPromise)?o(h.options.fnPromise,c).then(function(e){_.isFunction(t)&&t(e.DataTable.data()),!1===n&&e.DataTable.page(r).draw(!1)}):l.warn("In order to use the reloadData functionality with a Promise renderer, you need to provide a function that returns a promise.")},h.changeData=function(e){h.options.fnPromise=e,r.dtOptions.fnPromise=e,o(h.options.fnPromise,c)},h.rerender=function(){i.destroy(),g.showLoading(f,r),g.preRender(e),t(f,r)},h;function t(e,t){var n=p.defer();return a=u.newDTInstance(h),f=e,r=t,o(h.options.fnPromise,g.renderDataTable).then(function(e){i=e.DataTable,u.copyDTProperties(e,a),n.resolve(a)}),n.promise}function o(e,t){var n=p.defer();if(_.isUndefined(e))throw new Error("You must provide a promise or a function that returns a promise!");return d?d.then(function(){n.resolve(s(e,t))}):n.resolve(s(e,t)),n.promise}function s(e,l){var u=p.defer();return(d=_.isFunction(e)?e():e).then(function(e){var t,n,r,i,a,o=e;if(h.options.sAjaxDataProp)for(var s=h.options.sAjaxDataProp.split(".");s.length;){var c=s.shift();c in o&&(o=o[c])}d=null,u.resolve((t=h.options,n=f,r=o,i=l,a=p.defer(),delete r.$promise,t.aaData=r,m(function(){g.hideLoading(n),t.bDestroy=!0,a.resolve(i(n,t))},0,!1),a.promise))}),u.promise}function c(e,t){return i.clear(),i.rows.add(t.aaData).draw(t.redraw),{id:a.id,DataTable:a.DataTable,dataTable:a.dataTable}}}}}function c(c,l,n,u,f,d){return{create:function(e){var i,a,o,s=Object.create(n);return s.name="DTAjaxRenderer",s.options=e,s.render=t,s.reloadData=function(e,t){i&&i.ajax.reload(e,t)},s.changeData=function(e){s.options.ajax=e,o.dtOptions.ajax=e},s.rerender=function(){u.preRender(e),t(a,o)},s;function t(e,t){a=e,o=t;var n=c.defer(),r=d.newDTInstance(s);return _.isUndefined(s.options.sAjaxDataProp)&&(s.options.sAjaxDataProp=f.sAjaxDataProp),_.isUndefined(s.options.aoColumns)&&(s.options.aoColumns=f.aoColumns),function(e,t){var n=c.defer();e.bDestroy=!0,i&&(i.destroy(),u.showLoading(a,o),t.empty());u.hideLoading(t),r=e,_.isDefined(r)&&_.isDefined(r.dom)&&0<=r.dom.indexOf("S")?l(function(){n.resolve(u.renderDataTable(t,e))},0,!1):n.resolve(u.renderDataTable(t,e));var r;return n.promise}(s.options,e).then(function(e){i=e.DataTable,d.copyDTProperties(e,r),n.resolve(r)}),n.promise}}}}function l(n,r,i,a){return{fromOptions:function(e,t){if(t){if(e&&e.serverSide)throw new Error("You cannot use server side processing along with the Angular renderer!");return r.create(e)}if(_.isDefined(e)){if(_.isDefined(e.fnPromise)&&null!==e.fnPromise){if(e.serverSide)throw new Error("You cannot use server side processing along with the Promise renderer!");return i.create(e)}return _.isDefined(e.ajax)&&null!==e.ajax||_.isDefined(e.ajax)&&null!==e.ajax?a.create(e):n.create(e)}return n.create()}}}function u(s){return{overrideProperties:function e(t,n){var r=_.copy(t);(_.isUndefined(r)||null===r)&&(r={});if(_.isUndefined(n)||null===n)return r;if(_.isObject(n))for(var i in n)n.hasOwnProperty(i)&&(r[i]=e(r[i],n[i]));else r=_.copy(n);return r},deleteProperty:function(e,t){_.isObject(e)&&delete e[t]},resolveObjectPromises:i,resolveArrayPromises:c};function i(e,t){var r=s.defer(),n=[],i={},a=t||[];if(!_.isObject(e)||_.isArray(e))r.resolve(e);else{for(var o in i=_.extend(i,e))i.hasOwnProperty(o)&&-1===m.inArray(o,a)&&(_.isArray(i[o])?n.push(c(i[o])):n.push(s.when(i[o])));s.all(n).then(function(e){var t=0;for(var n in i)i.hasOwnProperty(n)&&-1===m.inArray(n,a)&&(i[n]=e[t++]);r.resolve(i)})}return r.promise}function c(e){var t=s.defer(),n=[],r=[];return _.isArray(e)?(_.forEach(e,function(e){_.isObject(e)?n.push(i(e)):n.push(s.when(e))}),s.all(n).then(function(e){_.forEach(e,function(e){r.push(e)}),t.resolve(r)})):t.resolve(e),t.promise}}_.module("datatables.directive",["datatables.instances","datatables.renderer","datatables.options","datatables.util"]).directive("datatable",t),t.$inject=["$q","$http","DTRendererFactory","DTRendererService","DTPropertyUtil"],_.module("datatables.factory",[]).factory("DTOptionsBuilder",function(){var n={withOption:function(e,t){return _.isString(e)&&(this[e]=t),this},withSource:function(e){return this.ajax=e,this},withDataProp:function(e){return this.sAjaxDataProp=e,this},withFnServerData:function(e){if(!_.isFunction(e))throw new Error("The parameter must be a function");return this.fnServerData=e,this},withPaginationType:function(e){if(!_.isString(e))throw new Error("The pagination type must be provided");return this.sPaginationType=e,this},withLanguage:function(e){return this.language=e,this},withLanguageSource:function(e){return this.withLanguage({url:e})},withDisplayLength:function(e){return this.iDisplayLength=e,this},withFnPromise:function(e){return this.fnPromise=e,this},withDOM:function(e){return this.dom=e,this}};return{newOptions:function(){return Object.create(n)},fromSource:function(e){var t=Object.create(n);return t.ajax=e,t},fromFnPromise:function(e){var t=Object.create(n);return t.fnPromise=e,t}}}).factory("DTColumnBuilder",function(){var r={withOption:function(e,t){return _.isString(e)&&(this[e]=t),this},withTitle:function(e){return this.sTitle=e,this},withClass:function(e){return this.sClass=e,this},notVisible:function(){return this.bVisible=!1,this},notSortable:function(){return this.bSortable=!1,this},renderWith:function(e){return this.mRender=e,this}};return{newColumn:function(e,t){if(_.isUndefined(e))throw new Error('The parameter "mData" is not defined!');var n=Object.create(r);return n.mData=e,_.isDefined(t)&&(n.sTitle=t),n},DTColumn:r}}).factory("DTColumnDefBuilder",n).factory("DTLoadingTemplate",r),n.$inject=["DTColumnBuilder"],r.$inject=["$compile","DTDefaultOptions","DT_LOADING_CLASS"],_.module("datatables.instances",["datatables.util"]).factory("DTInstanceFactory",function(){var n={reloadData:function(e,t){this._renderer.reloadData(e,t)},changeData:function(e){this._renderer.changeData(e)},rerender:function(){this._renderer.rerender()}};return{newDTInstance:function(e){var t=Object.create(n);return t._renderer=e,t},copyDTProperties:function(e,t){t.id=e.id,t.DataTable=e.DataTable,t.dataTable=e.dataTable}}}),_.module("datatables",["datatables.directive","datatables.factory"]).run(function(){m.fn.DataTable.Api&&m.fn.DataTable.Api.register("ngDestroy()",function(h){return h=h||!1,this.iterator("table",function(t){var n,e=t.nTableWrapper.parentNode,r=t.oClasses,i=t.nTable,a=t.nTBody,o=t.nTHead,s=t.nTFoot,c=m(i),l=m(a),u=m(t.nTableWrapper),f=m.map(t.aoData,function(e){return e.nTr});t.bDestroying=!0,m.fn.DataTable.ext.internal._fnCallbackFire(t,"aoDestroyCallback","destroy",[t]),h||new m.fn.DataTable.Api(t).columns().visible(!0),u.unbind(".DT").find(":not(tbody *)").unbind(".DT"),m(p).unbind(".DT-"+t.sInstance),i!==o.parentNode&&(c.children("thead").detach(),c.append(o)),s&&i!==s.parentNode&&(c.children("tfoot").detach(),c.append(s)),c.detach(),u.detach(),t.aaSorting=[],t.aaSortingFixed=[],m.fn.DataTable.ext.internal._fnSortingClasses(t),m(f).removeClass(t.asStripeClasses.join(" ")),m("th, td",o).removeClass(r.sSortable+" "+r.sSortableAsc+" "+r.sSortableDesc+" "+r.sSortableNone),t.bJUI&&(m("th span."+r.sSortIcon+", td span."+r.sSortIcon,o).detach(),m("th, td",o).each(function(){var e=m("div."+r.sSortJUIWrapper,this);m(this).append(e.contents()),e.detach()})),!h&&e&&(e.contains(t.nTableReinsertBefore)?e.insertBefore(i,t.nTableReinsertBefore):e.appendChild(i)),c.css("width",t.sDestroyWidth).removeClass(r.sTable),(n=t.asDestroyStripes.length)&&l.children().each(function(e){m(this).addClass(t.asDestroyStripes[e%n])});var d=m.inArray(t,m.fn.DataTable.settings);-1!==d&&m.fn.DataTable.settings.splice(d,1)})})}),_.module("datatables.options",[]).constant("DT_DEFAULT_OPTIONS",{sAjaxDataProp:"",aoColumns:[]}).constant("DT_LOADING_CLASS","dt-loading").service("DTDefaultOptions",function(){var t={loadingTemplate:"<h3>Loading...</h3>",bootstrapOptions:{},setLoadingTemplate:function(e){return t.loadingTemplate=e,t},setLanguageSource:function(e){return m.ajax({dataType:"json",url:e,success:function(e){m.extend(!0,m.fn.DataTable.defaults,{language:e})}}),t},setLanguage:function(e){return m.extend(!0,m.fn.DataTable.defaults,{language:e}),t},setDisplayLength:function(e){return m.extend(m.fn.DataTable.defaults,{displayLength:e}),t},setBootstrapOptions:function(e){return t.bootstrapOptions=e,t},setDOM:function(e){return m.extend(m.fn.DataTable.defaults,{dom:e}),t}};return t}),_.module("datatables.renderer",["datatables.instances","datatables.factory","datatables.options","datatables.instances"]).factory("DTRendererService",i).factory("DTRenderer",function(){return{withOptions:function(e){return this.options=e,this}}}).factory("DTDefaultRenderer",a).factory("DTNGRenderer",o).factory("DTPromiseRenderer",s).factory("DTAjaxRenderer",c).factory("DTRendererFactory",l),i.$inject=["DTLoadingTemplate"],a.$inject=["$q","DTRenderer","DTRendererService","DTInstanceFactory"],o.$inject=["$log","$q","$compile","$timeout","DTRenderer","DTRendererService","DTInstanceFactory"],s.$inject=["$q","$timeout","$log","DTRenderer","DTRendererService","DTInstanceFactory"],c.$inject=["$q","$timeout","DTRenderer","DTRendererService","DT_DEFAULT_OPTIONS","DTInstanceFactory"],l.$inject=["DTDefaultRenderer","DTNGRenderer","DTPromiseRenderer","DTAjaxRenderer"],_.module("datatables.util",[]).factory("DTPropertyUtil",u),u.$inject=["$q"]}(window,document,jQuery,angular),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.bootstrap"),function(e,y,w,d){"use strict";function t(r,i){var a=!1;return{integrate:function(e,t){if(!a){var n=r.overrideProperties(i.getOptions().ColVis,t?t.ColVis:null);w.fn.DataTable.ColVis&&e(function(){w(".ColVis_MasterButton").attr("class","ColVis_MasterButton "+n.classes.masterButton),w(".ColVis_Button").removeClass("ColVis_Button")}),a=!0}},deIntegrate:function(){a&&w.fn.DataTable.ColVis&&(a=!1)}}}function n(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withBootstrap=function(){n.hasBootstrap=!0,d.isObject(n.oClasses)?n.oClasses.sPageButtonActive="active":n.oClasses={sPageButtonActive:"active"};return n},n.withBootstrapOptions=function(e){return n.bootstrap=e,n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}function r(e,t){var n={preRender:function(e){e&&e.hasBootstrap?t.integrate(e):t.deIntegrate()}};e.registerPlugin(n)}function i(r,i,o,s){var c=!1,l=[],u={};return{integrate:function(e){n=e.bootstrap,c||(u.oStdClasses=d.copy(w.fn.dataTableExt.oStdClasses),u.fnPagingInfo=w.fn.dataTableExt.oApi.fnPagingInfo,u.renderer=d.copy(w.fn.DataTable.ext.renderer),w.fn.DataTable.TableTools&&(u.TableTools={classes:d.copy(w.fn.DataTable.TableTools.classes),oTags:d.copy(w.fn.DataTable.TableTools.DEFAULTS.oTags)}),w.extend(w.fn.dataTableExt.oStdClasses,{sWrapper:"dataTables_wrapper form-inline",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sFilter:"dataTables_filter",sLength:"dataTables_length"}),w.fn.dataTableExt.oApi.fnPagingInfo=function(e){return{iStart:e._iDisplayStart,iEnd:e.fnDisplayEnd(),iLength:e._iDisplayLength,iTotal:e.fnRecordsTotal(),iFilteredTotal:e.fnRecordsDisplay(),iPage:-1===e._iDisplayLength?0:Math.ceil(e._iDisplayStart/e._iDisplayLength),iTotalPages:-1===e._iDisplayLength?0:Math.ceil(e.fnRecordsDisplay()/e._iDisplayLength)}},a=n,w.extend(!0,w.fn.DataTable.ext.renderer,{pageButton:{_:function(l,e,u,t,f,d){var h,p,m=l.oClasses,g=l.language?l.language.oPaginate:l.oLanguage.oPaginate,_=0,n=s.overrideProperties(o.getOptions().pagination,a?a.pagination:null),b=w("<ul></ul>",{class:n.classes.ul}),v=function(e,t){var n,r,i,a,o=function(e){e.preventDefault(),w.fn.DataTable.ext.internal._fnPageChange(l,e.data.action,!0)};for(n=0,r=t.length;n<r;n++)if(a=t[n],w.isArray(a)){a.DT_el="li";var s=w("<"+(a.DT_el||"div")+"/>").appendTo(b);v(s,a)}else{p=h="";var c=w("<li></li>");switch(a){case"ellipsis":b.append('<li class="disabled"><a href="#" onClick="event.preventDefault()">&hellip;</a></li>');break;case"first":h=g.sFirst,p=a,f<=0&&c.addClass(m.sPageButtonDisabled);break;case"previous":h=g.sPrevious,p=a,f<=0&&c.addClass(m.sPageButtonDisabled);break;case"next":h=g.sNext,p=a,d-1<=f&&c.addClass(m.sPageButtonDisabled);break;case"last":h=g.sLast,p=a,d-1<=f&&c.addClass(m.sPageButtonDisabled);break;default:h=a+1,p="",f===a&&c.addClass(m.sPageButtonActive)}h&&(c.appendTo(b),i=w("<a>",{href:"#",class:p,"aria-controls":l.sTableId,"data-dt-idx":_,tabindex:l.iTabIndex,id:0===u&&"string"==typeof a?l.sTableId+"_"+a:null}).html(h).appendTo(c),w.fn.DataTable.ext.internal._fnBindAction(i,{action:a},o),_++)}};try{var r=w(y.activeElement).data("dt-idx"),i=w(e).empty();b.appendTo(i),v(i,t),null!==r&&w(e).find("[data-dt-idx="+r+"]").focus()}catch(e){}}}}),f(function(){w("div.dataTables_filter").find("input").addClass("form-control"),w("div.dataTables_length").find("select").addClass("form-control")}),c=!0),r.integrate(e.bootstrap),i.integrate(f,e.bootstrap),e.dom=(t=e,t.dom&&t.dom!==w.fn.dataTable.defaults.sDom?t.dom:o.getOptions().dom),d.isUndefined(e.fnDrawCallback)&&(e.fnDrawCallback=function(){for(var e=0;e<l.length;e++)l[e]()});var t;var n,a},deIntegrate:function(){c&&(w.extend(w.fn.dataTableExt.oStdClasses,u.oStdClasses),w.fn.dataTableExt.oApi.fnPagingInfo=u.fnPagingInfo,w.extend(!0,w.fn.DataTable.ext.renderer,u.renderer),r.deIntegrate(),i.deIntegrate(),c=!1)}};function f(e){d.isFunction(e)&&l.push(e)}}function a(e,t,n){return{getOptions:function(){return t.overrideProperties(n,e.bootstrapOptions)}}}function o(n,r){var i=!1,a={};return{integrate:function(e){if(!i){if(w.fn.DataTable.TableTools&&(a.TableTools={classes:d.copy(w.fn.DataTable.TableTools.classes),oTags:d.copy(w.fn.DataTable.TableTools.DEFAULTS.oTags)}),w.fn.DataTable.TableTools){var t=n.overrideProperties(r.getOptions().TableTools,e?e.TableTools:null);w.extend(!0,w.fn.DataTable.TableTools.classes,t.classes),w.extend(!0,w.fn.DataTable.TableTools.DEFAULTS.oTags,t.DEFAULTS.oTags)}i=!0}},deIntegrate:function(){i&&w.fn.DataTable.TableTools&&a.TableTools&&(w.extend(!0,w.fn.DataTable.TableTools.classes,a.TableTools.classes),w.extend(!0,w.fn.DataTable.TableTools.DEFAULTS.oTags,a.TableTools.oTags),i=!1)}}}d.module("datatables.bootstrap.colvis",["datatables.bootstrap.options","datatables.util"]).service("DTBootstrapColVis",t),t.$inject=["DTPropertyUtil","DTBootstrapDefaultOptions"],d.module("datatables.bootstrap",["datatables.bootstrap.options","datatables.bootstrap.tabletools","datatables.bootstrap.colvis"]).config(n).run(r).service("DTBootstrap",i),n.$inject=["$provide"],r.$inject=["DTRendererService","DTBootstrap"],i.$inject=["DTBootstrapTableTools","DTBootstrapColVis","DTBootstrapDefaultOptions","DTPropertyUtil"],d.module("datatables.bootstrap.options",["datatables.options","datatables.util"]).constant("DT_BOOTSTRAP_DEFAULT_OPTIONS",{TableTools:{classes:{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info modal"},select:{row:"active"}},DEFAULTS:{oTags:{collection:{container:"ul",button:"li",liner:"a"}}}},ColVis:{classes:{masterButton:"btn btn-default"}},pagination:{classes:{ul:"pagination"}},dom:"<'row'<'col-xs-6'l><'col-xs-6'f>r>t<'row'<'col-xs-6'i><'col-xs-6'p>>"}).factory("DTBootstrapDefaultOptions",a),a.$inject=["DTDefaultOptions","DTPropertyUtil","DT_BOOTSTRAP_DEFAULT_OPTIONS"],d.module("datatables.bootstrap.tabletools",["datatables.bootstrap.options","datatables.util"]).service("DTBootstrapTableTools",o),o.$inject=["DTPropertyUtil","DTBootstrapDefaultOptions"]}(window,document,jQuery,angular),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.colreorder"),function(e,t,a,o){"use strict";function n(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withColReorder=function(){n.dom=n.dom?n.dom:a.fn.dataTable.defaults.sDom,-1===n.dom.indexOf("R")&&(n.dom="R"+n.dom);return n.hasColReorder=!0,n},n.withColReorderOption=function(e,t){o.isString(e)&&(n.oColReorder=n.oColReorder&&null!==n.oColReorder?n.oColReorder:{},n.oColReorder[e]=t);return n},n.withColReorderOrder=function(e){o.isArray(e)&&n.withColReorderOption("aiOrder",e);return n},n.withColReorderCallback=function(e){{if(!o.isFunction(e))throw new Error("The reorder callback must be a function");n.withColReorderOption("fnReorderCallback",e)}return n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}o.module("datatables.colreorder",["datatables"]).config(n),n.$inject=["$provide"]}(window,document,jQuery,angular),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.columnfilter"),function(e,t,n,r){"use strict";function i(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withColumnFilter=function(e){n.hasColumnFilter=!0,e&&(n.columnFilterOptions=e);return n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}function a(e){var t={postRender:function(e,t){e&&e.hasColumnFilter&&t.dataTable.columnFilter(e.columnFilterOptions)}};e.registerPlugin(t)}angular.module("datatables.columnfilter",["datatables"]).config(i).run(a),i.$inject=["$provide"],a.$inject=["DTRendererService"]}(window,document,jQuery),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.light-columnfilter"),function(e,t,n,r){"use strict";function i(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withLightColumnFilter=function(e){n.hasLightColumnFilter=!0,e&&(n.lightColumnFilterOptions=e);return n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}function a(e){var t={postRender:function(e,t){e&&e.hasLightColumnFilter&&new n.fn.dataTable.ColumnFilter(t.DataTable,e.lightColumnFilterOptions)}};e.registerPlugin(t)}angular.module("datatables.light-columnfilter",["datatables"]).config(i).run(a),i.$inject=["$provide"],a.$inject=["DTRendererService"]}(window,document,jQuery),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.colvis"),function(e,t,a,o){"use strict";function n(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withColVis=function(){console.warn("The colvis extension has been retired. Please use the button extension instead: https://datatables.net/extensions/buttons/");n.dom=n.dom?n.dom:a.fn.dataTable.defaults.sDom,-1===n.dom.indexOf("C")&&(n.dom="C"+n.dom);return n.hasColVis=!0,n},n.withColVisOption=function(e,t){o.isString(e)&&(n.oColVis=n.oColVis&&null!==n.oColVis?n.oColVis:{},n.oColVis[e]=t);return n},n.withColVisStateChange=function(e){{if(!o.isFunction(e))throw new Error("The state change must be a function");n.withColVisOption("fnStateChange",e)}return n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}o.module("datatables.colvis",["datatables"]).config(n),n.$inject=["$provide"]}(window,document,jQuery,angular),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.fixedcolumns"),function(e,t,n,r){"use strict";function i(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withFixedColumns=function(e){n.fixedColumns=!0,e&&(n.fixedColumns=e);return n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}angular.module("datatables.fixedcolumns",["datatables"]).config(i),i.$inject=["$provide"]}(window,document,jQuery),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.fixedheader"),function(e,t,n,r){"use strict";function i(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withFixedHeader=function(e){n.hasFixedHeader=!0,e&&(n.fixedHeaderOptions=e);return n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}function a(e){var t={postRender:function(e,t){e&&e.hasFixedHeader&&new n.fn.dataTable.FixedHeader(t.DataTable,e.fixedHeaderOptions)}};e.registerPlugin(t)}angular.module("datatables.fixedheader",["datatables"]).config(i).run(a),i.$inject=["$provide"],a.$inject=["DTRendererService"]}(window,document,jQuery),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.scroller"),function(e,t,a,n){"use strict";function r(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withScroller=function(){n.dom=n.dom?n.dom:a.fn.dataTable.defaults.sDom,-1===n.dom.indexOf("S")&&(n.dom=n.dom+"S");return n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}angular.module("datatables.scroller",["datatables"]).config(r),r.$inject=["$provide"]}(window,document,jQuery),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.tabletools"),function(e,t,a,o){"use strict";function n(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withTableTools=function(e){console.warn("The tabletools extension has been retired. Please use the select and buttons extensions instead: https://datatables.net/extensions/select/ and https://datatables.net/extensions/buttons/");n.dom=n.dom?n.dom:a.fn.dataTable.defaults.sDom,-1===n.dom.indexOf("T")&&(n.dom="T"+n.dom);n.hasTableTools=!0,o.isString(e)&&n.withTableToolsOption("sSwfPath",e);return n},n.withTableToolsOption=function(e,t){o.isString(e)&&(n.oTableTools=n.oTableTools&&null!==n.oTableTools?n.oTableTools:{},n.oTableTools[e]=t);return n},n.withTableToolsButtons=function(e){o.isArray(e)&&n.withTableToolsOption("aButtons",e);return n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}o.module("datatables.tabletools",["datatables"]).config(n),n.$inject=["$provide"]}(window,document,jQuery,angular),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.buttons"),function(e,t,a,o){"use strict";function n(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withButtons=function(e){n.dom=n.dom?n.dom:a.fn.dataTable.defaults.sDom,-1===n.dom.indexOf("B")&&(n.dom="B"+n.dom);if(o.isUndefined(e))throw new Error("You must define the options for the button extension. See https://datatables.net/reference/option/buttons#Examples for some example");return n.buttons=e,n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}function r(e){var t={preRender:function(e){e&&o.isArray(e.buttons)&&(e.buttonsTmp=e.buttons.slice())},postRender:function(e){e&&o.isDefined(e.buttonsTmp)&&(e.buttons=e.buttonsTmp,delete e.buttonsTmp)}};e.registerPlugin(t)}o.module("datatables.buttons",["datatables"]).config(n).run(r),n.$inject=["$provide"],r.$inject=["DTRendererService"]}(window,document,jQuery,angular),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.select"),function(e,t,n,a){"use strict";function r(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withSelect=function(e){if(a.isUndefined(e))throw new Error("You must define the options for the select extension. See https://datatables.net/reference/option/#select");return n.select=e,n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}a.module("datatables.select",["datatables"]).config(r),r.$inject=["$provide"]}(window,document,jQuery,angular),function(v){"use strict";function y(e){e.dataTransfer&&"none"===e.dataTransfer.dropEffect&&("copy"===e.dataTransfer.effectAllowed||"move"===e.dataTransfer.effectAllowed?e.dataTransfer.dropEffect=e.dataTransfer.effectAllowed:"copyMove"!==e.dataTransfer.effectAllowed&&"copymove"!==e.dataTransfer.effectAllowed||(e.dataTransfer.dropEffect=e.ctrlKey?"copy":"move"))}if("ondrag"in document.createElement("a")){window.jQuery&&-1===window.jQuery.event.props.indexOf("dataTransfer")&&window.jQuery.event.props.push("dataTransfer");var e=v.module("ang-drag-drop",[]);e.directive("uiDraggable",["$parse","$rootScope","$dragImage",function(g,_,b){return function(c,l,u){var f,d,h=!1,p=u.draggingClass||"on-dragging";function m(e){setTimeout(function(){l.unbind("$destroy",m)},0);var t=u.dragChannel||"defaultchannel";if(_.$broadcast("ANGULAR_DRAG_END",e,t),y(e),e.dataTransfer&&"none"!==e.dataTransfer.dropEffect)if(u.onDropSuccess){var n=g(u.onDropSuccess);c.$evalAsync(function(){n(c,{$event:e})})}else if(u.onDropFailure){var r=g(u.onDropFailure);c.$evalAsync(function(){r(c,{$event:e})})}l.removeClass(p)}function t(r){if(!h||d.classList.contains(f)){var e=u.dragChannel||"defaultchannel",t="";u.drag&&(t=c.$eval(u.drag));var n=u.dragImage||null;l.addClass(p),l.bind("$destroy",m);var i=!(document.uniqueID||window.opera);if(n&&i){var a=g(u.dragImage);c.$apply(function(){var e=a(c,{$event:r});if(e&&(v.isString(e)&&(e=b.generate(e)),e.image)){var t=e.xOffset||0,n=e.yOffset||0;r.dataTransfer.setDragImage(e.image,t,n)}})}var o={data:t,channel:e},s=v.toJson(o);r.dataTransfer.setData("text",s),r.dataTransfer.effectAllowed="copyMove",_.$broadcast("ANGULAR_DRAG_START",r,e,o)}else r.preventDefault()}l.attr("draggable",!1),c.$watch(u.uiDraggable,function(e){e?(l.attr("draggable",e),l.bind("dragend",m),l.bind("dragstart",t)):(l.removeAttr("draggable"),l.unbind("dragend",m),l.unbind("dragstart",t))}),v.isString(u.dragHandleClass)&&(h=!0,f=u.dragHandleClass.trim()||"drag-handle",l.bind("mousedown",function(e){d=e.target}))}}]),e.directive("uiOnDrop",["$parse","$rootScope",function(b,o){return function(s,c,l){var r=0,u=l.dropChannel||"defaultchannel",f="",d=l.dragEnterClass||"on-drag-enter",n=l.dragHoverClass||"on-drag-hover",i=b(l.onDragEnter),a=b(l.onDragLeave);function h(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation();var t=b(l.uiOnDragOver);return s.$evalAsync(function(){t(s,{$event:e,$channel:u})}),!1}function p(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),0===--r&&(s.$evalAsync(function(){a(s,{$event:e,$channel:u})}),c.addClass(d),c.removeClass(n));var t=b(l.uiOnDragLeave);s.$evalAsync(function(){t(s,{$event:e,$channel:u})})}function m(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),0===r&&(s.$evalAsync(function(){i(s,{$event:e,$channel:u})}),c.removeClass(d),c.addClass(n)),r++;var t=b(l.uiOnDragEnter);s.$evalAsync(function(){t(s,{$event:e,$channel:u})}),o.$broadcast("ANGULAR_HOVER",f)}function g(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation();var t=e.dataTransfer.getData("text");t=v.fromJson(t),y(e);var n=b(l.uiOnDrop);s.$evalAsync(function(){n(s,{$data:t.data,$event:e,$channel:t.channel})}),c.removeClass(d),r=0}function _(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!(e.dataTransfer.dropEffect="none")}var e=o.$on("ANGULAR_DRAG_START",function(e,t,n,r){var i,a,o=!0;(i=f=n,"*"===(a=u)||new RegExp("(\\s|[,])+("+i+")(\\s|[,])+","i").test(","+a+",")||(o=!1),o&&l.dropValidate)&&(o=b(l.dropValidate)(s,{$drop:{scope:s,element:c},$event:t,$data:r.data,$channel:r.channel}));o?(c.bind("dragover",h),c.bind("dragenter",m),c.bind("dragleave",p),c.bind("drop",g),c.addClass(d)):(c.bind("dragover",_),c.bind("dragenter",_),c.bind("dragleave",_),c.bind("drop",_),c.removeClass(d))}),t=o.$on("ANGULAR_DRAG_END",function(){c.unbind("dragover",h),c.unbind("dragenter",m),c.unbind("dragleave",p),c.unbind("drop",g),c.removeClass(n),c.removeClass(d),c.unbind("dragover",_),c.unbind("dragenter",_),c.unbind("dragleave",_),c.unbind("drop",_)});s.$on("$destroy",function(){e(),t()}),l.$observe("dropChannel",function(e){e&&(u=e)})}}]),e.constant("$dragImageConfig",{height:20,width:200,padding:10,font:"bold 11px Arial",fontColor:"#eee8d5",backgroundColor:"#93a1a1",xOffset:0,yOffset:0}),e.service("$dragImage",["$dragImageConfig",function(s){this.generate=function(e,t){var n=v.extend({},s,t||{}),r=document.createElement("canvas");r.height=n.height,r.width=n.width;var i=r.getContext("2d");i.fillStyle=n.backgroundColor,i.fillRect(0,0,n.width,n.height),i.font=n.font,i.fillStyle=n.fontColor;var a=function(e,t,n){var r=e.measureText(t).width;if(r<n.width)return t;for(;r+n.padding>n.width;)t=t.substring(0,t.length-1),r=e.measureText(t+"…").width;return t+"…"}(i,e,n);i.fillText(a,4,n.padding+4);var o=new Image;return o.src=r.toDataURL(),{image:o,xOffset:n.xOffset,yOffset:n.yOffset}}}])}else v.module("ang-drag-drop",[])}(angular),function(e,t){"use strict";var v,h,c,l;function n(){return["$animate",function(d){return{restrict:"AE",transclude:"element",priority:1,terminal:!0,require:"^^ngMessages",link:function(e,r,t,i,n){var a,o,s,c=r[0],l=t.ngMessage||t.when,u=t.ngMessageExp||t.whenExp,f=function(e){a=e?h(e)?e:e.split(/[\s,]+/):null,i.reRender()};u?(f(e.$eval(u)),e.$watchCollection(u,f)):f(l),i.register(c,s={test:function(e){return function(e,t){if(e)return h(e)?0<=e.indexOf(t):e.hasOwnProperty(t)}(a,e)},attach:function(){o||n(function(e,t){d.enter(e,null,r);var n=(o=e).$$attachId=i.getAttachId();o.on("$destroy",function(){o&&o.$$attachId===n&&(i.deregister(c),s.detach()),t.$destroy()})})},detach:function(){if(o){var e=o;o=null,d.leave(e)}}})}}}]}t.module("ngMessages",[],function(){v=t.forEach,h=t.isArray,c=t.isString,l=t.element}).directive("ngMessages",["$animate",function(m){var g="ng-inactive";return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(l,u,f){var d=this,r=0,e=0;this.getAttachId=function(){return e++};var h,p,o=this.messages={};function s(e,t){for(var n=t,r=[];n&&n!==e;){var i=n.$$ngMessageNode;if(i&&i.length)return o[i];n.childNodes.length&&-1===r.indexOf(n)?(r.push(n),n=n.childNodes[n.childNodes.length-1]):n.previousSibling?n=n.previousSibling:(n=n.parentNode,r.push(n))}}this.render=function(e){h=!1,p=e=e||{};for(var t=_(u,f.ngMessagesMultiple)||_(u,f.multiple),n=[],r={},i=d.head,a=!1,o=0;null!=i;){o++;var s=i.message,c=!1;a||v(e,function(e,t){if(!c&&b(e)&&s.test(t)){if(r[t])return;r[t]=!0,c=!0,s.attach()}}),c?a=!t:n.push(s),i=i.next}v(n,function(e){e.detach()}),n.length!==o?m.setClass(l,"ng-active",g):m.setClass(l,g,"ng-active")},u.$watchCollection(f.ngMessages||f.for,d.render),l.on("$destroy",function(){v(o,function(e){e.message.detach()})}),this.reRender=function(){h||(h=!0,u.$evalAsync(function(){h&&p&&d.render(p)}))},this.register=function(e,t){var n=r.toString();o[n]={message:t},function(e,t,n){var r=o[n];if(d.head){var i=s(e,t);i?(r.next=i.next,i.next=r):(r.next=d.head,d.head=r)}else d.head=r}(l[0],e,n),e.$$ngMessageNode=n,r++,d.reRender()},this.deregister=function(e){var t,n,r,i,a=e.$$ngMessageNode;delete e.$$ngMessageNode,t=l[0],n=e,r=o[a],(i=s(t,n))?i.next=r.next:d.head=r.next,delete o[a],d.reRender()}}]};function _(e,t){return c(t)&&0===t.length||b(e.$eval(t))}function b(e){return c(e)?e.length:!!e}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(i,a,o){return{restrict:"AE",require:"^^ngMessages",link:function(t,n,e){var r=e.ngMessagesInclude||e.src;i(r).then(function(e){t.$$destroyed||(c(e)&&!e.trim()?s(n,r):o(e)(t,function(e){n.after(e),s(n,r)}))})}};function s(e,t){var n=o.$$createComment?o.$$createComment("ngMessagesInclude",t):a[0].createComment(" ngMessagesInclude: "+t+" "),r=l(n);e.after(r),e.remove()}}]).directive("ngMessage",n()).directive("ngMessageExp",n())}(window,window.angular),function(G,ie,ae){"use strict";ie.module("ngMaterial",["ng","ngAnimate","ngAria","material.core","material.core.gestures","material.core.layout","material.core.meta","material.core.theming.palette","material.core.theming","material.core.animate","material.components.autocomplete","material.components.backdrop","material.components.bottomSheet","material.components.button","material.components.card","material.components.chips","material.components.checkbox","material.components.colors","material.components.content","material.components.datepicker","material.components.dialog","material.components.divider","material.components.fabActions","material.components.fabShared","material.components.fabSpeedDial","material.components.fabToolbar","material.components.gridList","material.components.icon","material.components.input","material.components.list","material.components.menu","material.components.menuBar","material.components.navBar","material.components.panel","material.components.progressCircular","material.components.progressLinear","material.components.radioButton","material.components.select","material.components.showHide","material.components.sidenav","material.components.slider","material.components.sticky","material.components.subheader","material.components.swipe","material.components.switch","material.components.tabs","material.components.toast","material.components.toolbar","material.components.tooltip","material.components.virtualRepeat","material.components.whiteframe"]),function(){function e(e,t){if(t.has("$swipe")){e.warn("You are using the ngTouch module. \nAngular Material already has mobile click, tap, and swipe support... \nngTouch is not supported with Angular Material!")}}function t(e,t){e.decorator("$$rAF",["$delegate",n]),t.theme("default").primaryPalette("indigo").accentPalette("pink").warnPalette("deep-orange").backgroundPalette("grey")}function n(a){return a.throttle=function(e){var t,n,r,i;return function(){t=arguments,i=this,r=e,n||(n=!0,a(function(){r.apply(i,Array.prototype.slice.call(t)),n=!1}))}},a}e.$inject=["$log","$injector"],t.$inject=["$provide","$mdThemingProvider"],n.$inject=["$delegate"],ie.module("material.core",["ngAnimate","material.core.animate","material.core.layout","material.core.gestures","material.core.theming"]).config(t).run(e)}(),function(){function e(){return{restrict:"A",link:t}}function t(e,t,n){var r=n.mdAutoFocus||n.mdAutofocus||n.mdSidenavFocus;e.$watch(r,function(e){t.toggleClass("md-autofocus",e)})}ie.module("material.core").directive("mdAutofocus",e).directive("mdAutoFocus",e).directive("mdSidenavFocus",e)}(),ie.module("material.core").factory("$mdColorUtil",function(){return{rgbaToHex:function(e){return((e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):"").toUpperCase()},hexToRgba:function(e){var t="#"===e[0]?e.substr(1):e,n=t.length/3,r=t.substr(0,n),i=t.substr(n,n),a=t.substr(2*n);return 1===n&&(r+=r,i+=i,a+=a),"rgba("+parseInt(r,16)+","+parseInt(i,16)+","+parseInt(a,16)+",0.1)"},rgbToRgba:function(e){return e.replace(")",", 0.1)").replace("(","a(")},rgbaToRgb:function(e){return e?e.replace("rgba","rgb").replace(/,[^\),]+\)/,")"):"rgb(0,0,0)"}}}),function(){function e(e,t,n){var r=e.vendorPrefix,i=/webkit/i.test(r),a=/([:\-_]+(.))/g,o=document.createElement("div");function s(e){var t=(r+"-"+e).replace(a,function(e,t,n,r){return r?n.toUpperCase():n}),n=t.charAt(0).toLowerCase()+t.substring(1);return c(e)?e:c(t)?t:c(n)?n:e}function c(e){return ie.isDefined(o.style[e])}var l={isInputKey:function(e){return 31<=e.keyCode&&e.keyCode<=90},isNumPadKey:function(e){return 3===e.location&&97<=e.keyCode&&e.keyCode<=105},isNavigationKey:function(e){var t=l.KEY_CODE;return-1!=[t.SPACE,t.ENTER,t.UP_ARROW,t.DOWN_ARROW].indexOf(e.keyCode)},KEY_CODE:{COMMA:188,SEMICOLON:186,ENTER:13,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,TAB:9,BACKSPACE:8,DELETE:46},CSS:{TRANSITIONEND:"transitionend"+(i?" webkitTransitionEnd":""),ANIMATIONEND:"animationend"+(i?" webkitAnimationEnd":""),TRANSFORM:s("transform"),TRANSFORM_ORIGIN:s("transformOrigin"),TRANSITION:s("transition"),TRANSITION_DURATION:s("transitionDuration"),ANIMATION_PLAY_STATE:s("animationPlayState"),ANIMATION_DURATION:s("animationDuration"),ANIMATION_NAME:s("animationName"),ANIMATION_TIMING:s("animationTimingFunction"),ANIMATION_DIRECTION:s("animationDirection")},MEDIA:{xs:"(max-width: 599px)","gt-xs":"(min-width: 600px)",sm:"(min-width: 600px) and (max-width: 959px)","gt-sm":"(min-width: 960px)",md:"(min-width: 960px) and (max-width: 1279px)","gt-md":"(min-width: 1280px)",lg:"(min-width: 1280px) and (max-width: 1919px)","gt-lg":"(min-width: 1920px)",xl:"(min-width: 1920px)",landscape:"(orientation: landscape)",portrait:"(orientation: portrait)",print:"print"},MEDIA_PRIORITY:["xl","gt-lg","lg","gt-md","md","gt-sm","sm","gt-xs","xs","landscape","portrait","print"]};return l}e.$inject=["$sniffer","$window","$document"],ie.module("material.core").factory("$mdConstant",e)}(),function(){function t(e,s){var c=function(){return!0};e&&!ie.isArray(e)&&(e=Array.prototype.slice.call(e)),s=!!s;var l=e||[];return{items:function(){return[].concat(l)},count:function(){return l.length},inRange:u,contains:t,indexOf:f,itemAt:function(e){return u(e)?l[e]:null},findBy:function(t,n){return l.filter(function(e){return e[t]===n})},add:function(e,t){if(!e)return-1;ie.isNumber(t)||(t=l.length);return l.splice(t,0,e),f(e)},remove:function(e){t(e)&&l.splice(f(e),1)},first:d,last:h,next:ie.bind(null,n,!1),previous:ie.bind(null,n,!0),hasPrevious:function(e){return!!e&&u(f(e)-1)},hasNext:function(e){return!!e&&u(f(e)+1)}};function u(e){return l.length&&-1<e&&e<l.length}function f(e){return l.indexOf(e)}function t(e){return e&&-1<f(e)}function d(){return l.length?l[0]:null}function h(){return l.length?l[l.length-1]:null}function n(e,t,n,r){n=n||c;for(var i=f(t);;){if(!u(i))return null;var a=i+(e?-1:1),o=null;if(u(a)?o=l[a]:s&&(a=f(o=e?h():d())),null===o||a===r)return null;if(n(o))return o;ie.isUndefined(r)&&(r=a),i=a}}}ie.module("material.core").config(["$provide",function(e){e.decorator("$mdUtil",["$delegate",function(e){return e.iterator=t,e}])}])}(),function(){function e(o,t,i){var a={},s={},c={},n={};return e.getResponsiveAttribute=function(e,t){for(var n=0;n<o.MEDIA_PRIORITY.length;n++){var r=o.MEDIA_PRIORITY[n];if(s[a[r]].matches){var i=u(e,t+"-"+r);if(e[i])return e[i]}}return e[u(e,t)]},e.getQuery=function(e){return s[e]},e.watchResponsiveAttributes=function(e,r,i){var a=[];return e.forEach(function(e){var t=u(r,e);for(var n in ie.isDefined(r[t])&&a.push(r.$observe(t,ie.bind(void 0,i,null))),o.MEDIA)t=u(r,e+"-"+n),ie.isDefined(r[t])&&a.push(r.$observe(t,ie.bind(void 0,i,n)))}),function(){a.forEach(function(e){e()})}},e;function e(e){var t,n=a[e];ie.isUndefined(n)&&(n=a[e]=(t=e,o.MEDIA[t]||("("!==t.charAt(0)?"("+t+")":t)));var r=c[n];return ie.isUndefined(r)&&(r=function(e){var t=s[e];t||(t=s[e]=i.matchMedia(e));return t.addListener(l),c[t.media]=!!t.matches}(n)),r}function l(e){t.$evalAsync(function(){c[e.media]=!!e.matches})}function u(e,t){return n[t]||(n[t]=e.$normalize(t))}}e.$inject=["$mdConstant","$rootScope","$window"],ie.module("material.core").factory("$mdMedia",e)}(),function(){function t(e,t){var r=["data","x"];return e?t?n(e):i(e):{buildList:i,buildSelector:n,hasAttribute:function(e,t){if(!(e=a(e)))return!1;for(var n=i(t),r=0;r<n.length;r++)if(e.hasAttribute(n[r]))return!0;return!1},removeAttribute:function(t,e){if(!(t=a(t)))return;i(e).forEach(function(e){t.removeAttribute(e)})}};function i(n){return(n=ie.isArray(n)?n:[n]).forEach(function(t){r.forEach(function(e){n.push(e+"-"+t)})}),n}function n(e){return i(e=ie.isArray(e)?e:[e]).map(function(e){return"["+e+"]"}).join(",")}function a(e){if((e=e[0]||e).nodeType)return e}}ie.module("material.core").config(["$provide",function(e){e.decorator("$mdUtil",["$delegate",function(e){return e.prefixer=t,e}])}])}(),function(){e.$inject=["$document","$timeout","$compile","$rootScope","$$mdAnimate","$interpolate","$log","$rootElement","$window","$$rAF"];var _=0;function e(s,c,n,o,e,t,a,r,l,u){var i=t.startSymbol(),f=t.endSymbol(),d="{{"===i&&"}}"===f,h=function(e,t,n){var r=!1;if(e&&e.length){var i=l.getComputedStyle(e[0]);r=ie.isDefined(i[t])&&(!n||i[t]==n)}return r};function p(e){return e?-1<String(e).indexOf("px")||-1<String(e).indexOf("%")?e:e+"px":"0"}var m={dom:{},now:G.performance?ie.bind(G.performance,G.performance.now):Date.now||function(){return(new Date).getTime()},bidi:function(e,t,n,r){var i=!("rtl"==s[0].dir||"rtl"==s[0].body.dir);if(0==arguments.length)return i?"ltr":"rtl";var a=ie.element(e);i&&ie.isDefined(n)?a.css(t,p(n)):!i&&ie.isDefined(r)&&a.css(t,p(r))},bidiProperty:function(e,t,n,r){var i=!("rtl"==s[0].dir||"rtl"==s[0].body.dir),a=ie.element(e);i&&ie.isDefined(t)?(a.css(t,p(r)),a.css(n,"")):!i&&ie.isDefined(n)&&(a.css(n,p(r)),a.css(t,""))},clientRect:function(e,t,n){var r=g(e);t=g(t||r.offsetParent||document.body);var i=r.getBoundingClientRect(),a=n?t.getBoundingClientRect():{left:0,top:0,width:0,height:0};return{left:i.left-a.left,top:i.top-a.top,width:i.width,height:i.height}},offsetRect:function(e,t){return m.clientRect(e,t,!0)},nodesToArray:function(e){e=e||[];for(var t=[],n=0;n<e.length;++n)t.push(e.item(n));return t},scrollTop:function(e){var t=(e=ie.element(e||s[0].body))[0]==s[0].body?s[0].body:ae;return(t?t.scrollTop+t.parentElement.scrollTop:0)||Math.abs(e[0].getBoundingClientRect().top)},findFocusTarget:function(e,t){var n,r=this.prefixer("md-autofocus",!0);return(n=i(e,t||r))||t==r||(n=i(e,this.prefixer("md-auto-focus",!0)))||(n=i(e,r)),n;function i(e,t){var n,r=e[0].querySelectorAll(t);return r&&r.length&&r.length&&ie.forEach(r,function(e){(e=ie.element(e)).hasClass("md-autofocus")&&(n=e)}),n}},disableScrollAround:function(e,t,r){if(m.disableScrollAround._count=m.disableScrollAround._count||0,++m.disableScrollAround._count,m.disableScrollAround._enableScrolling)return m.disableScrollAround._enableScrolling;var a=s[0].body,n=function(){var e=a.parentNode,t=e.style.cssText||"",n=a.style.cssText||"",r=m.scrollTop(a),i=a.clientWidth;a.scrollHeight>a.clientHeight+1&&(o(a,{position:"fixed",width:"100%",top:-r+"px"}),e.style.overflowY="scroll");a.clientWidth<i&&o(a,{overflow:"hidden"});return function(){a.style.cssText=n,e.style.cssText=t,a.scrollTop=r,e.scrollTop=r}}(),i=function(e){var t;e=ie.element(e||a),r&&r.disableScrollMask?t=e:(e=e[0],t=ie.element('<div class="md-scroll-mask">  <div class="md-scroll-mask-bar"></div></div>'),e.appendChild(t[0]));return t.on("wheel",n),t.on("touchmove",n),function(){t.off("wheel"),t.off("touchmove"),t[0].parentNode.removeChild(t[0]),delete m.disableScrollAround._enableScrolling};function n(e){e.preventDefault()}}(t);return m.disableScrollAround._enableScrolling=function(){--m.disableScrollAround._count||(n(),i(),delete m.disableScrollAround._enableScrolling)};function o(e,t){for(var n in t)e.style[n]=t[n]}},enableScrolling:function(){var e=this.disableScrollAround._enableScrolling;e&&e()},floatingScrollbars:function(){if(this.floatingScrollbars.cached===ae){var e=ie.element("<div><div></div></div>").css({width:"100%","z-index":-1,position:"absolute",height:"35px","overflow-y":"scroll"});e.children().css("height","60px"),s[0].body.appendChild(e[0]),this.floatingScrollbars.cached=e[0].offsetWidth==e[0].childNodes[0].offsetWidth,e.remove()}return this.floatingScrollbars.cached},forceFocus:function(e){var n=e[0]||e;document.addEventListener("click",function e(t){t.target===n&&t.$focus&&(n.focus(),t.stopImmediatePropagation(),t.preventDefault(),n.removeEventListener("click",e))},!0);var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!1,!0,G,{},0,0,0,0,!1,!1,!1,!1,0,null),t.$material=!0,t.$focus=!0,n.dispatchEvent(t)},createBackdrop:function(e,t){return n(m.supplant('<md-backdrop class="{0}">',[t]))(e)},supplant:function(e,a,t){return t=t||/\{([^\{\}]*)\}/g,e.replace(t,function(t,e){var n=e.split("."),r=a;try{for(var i in n)n.hasOwnProperty(i)&&(r=r[n[i]])}catch(e){r=t}return"string"==typeof r||"number"==typeof r?r:t})},fakeNgModel:function(){return{$fake:!0,$setTouched:ie.noop,$setViewValue:function(e){this.$viewValue=e,this.$render(e),this.$viewChangeListeners.forEach(function(e){e()})},$isEmpty:function(e){return 0===(""+e).length},$parsers:[],$formatters:[],$viewChangeListeners:[],$render:ie.noop}},debounce:function(n,r,i,a){var o;return function(){var e=i,t=Array.prototype.slice.call(arguments);c.cancel(o),o=c(function(){o=ae,n.apply(e,t)},r||10,a)}},throttle:function(n,r){var i;return function(){var e=arguments,t=m.now();(!i||r<t-i)&&(n.apply(this,e),i=t)}},time:function(e){var t=m.now();return e(),m.now()-t},valueOnUse:function(e,t,n){var r=null,i=Array.prototype.slice.call(arguments),a=3<i.length?i.slice(3):[];Object.defineProperty(e,t,{get:function(){return null===r&&(r=n.apply(e,a)),r}})},nextUid:function(){return""+_++},disconnectScope:function(e){if(e&&e.$root!==e&&!e.$$destroyed){var t=e.$parent;e.$$disconnected=!0,t.$$childHead===e&&(t.$$childHead=e.$$nextSibling),t.$$childTail===e&&(t.$$childTail=e.$$prevSibling),e.$$prevSibling&&(e.$$prevSibling.$$nextSibling=e.$$nextSibling),e.$$nextSibling&&(e.$$nextSibling.$$prevSibling=e.$$prevSibling),e.$$nextSibling=e.$$prevSibling=null}},reconnectScope:function(e){if(e&&e.$root!==e&&e.$$disconnected){var t=e,n=t.$parent;t.$$disconnected=!1,t.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=t,n.$$childTail=t):n.$$childHead=n.$$childTail=t}},getClosest:function(e,t,n){if(ie.isString(t)){var r=t.toUpperCase();t=function(e){return e.nodeName===r}}if(e instanceof ie.element&&(e=e[0]),n&&(e=e.parentNode),!e)return null;do{if(t(e))return e}while(e=e.parentNode);return null},elementContains:function(t,n){return(G.Node&&G.Node.prototype&&Node.prototype.contains?ie.bind(t,t.contains):ie.bind(t,function(e){return t===n||!!(16&this.compareDocumentPosition(e))}))(n)},extractElementByName:function(e,r,t,n){var i=s(e);return!i&&n&&a.warn(m.supplant("Unable to find node '{0}' in element '{1}'.",[r,e[0].outerHTML])),ie.element(i||e);function s(e){return function(e){if(e)for(var t=0,n=e.length;t<n;t++)if(e[t].nodeName.toLowerCase()===r)return e[t];return null}(e)||(t?function(e){var t;if(e)for(var n=0,r=e.length;n<r;n++){var i=e[n];if(!t)for(var a=0,o=i.childNodes.length;a<o;a++)t=t||s([i.childNodes[a]])}return t}(e):null)}},initOptionalProperties:function(r,i,a){a=a||{},ie.forEach(r.$$isolateBindings,function(e,t){if(e.optional&&ie.isUndefined(r[t])){var n=ie.isDefined(i[e.attrName]);r[t]=ie.isDefined(a[t])?a[t]:n}})},nextTick:function(e,t,n){var r=m.nextTick,i=r.timeout,a=r.queue||[];return a.push({scope:n,callback:e}),null==t&&(t=!0),r.digest=r.digest||t,r.queue=a,i||(r.timeout=c(function(){var e=r.queue,t=r.digest;r.queue=[],r.timeout=null,r.digest=!1,e.forEach(function(e){e.scope&&e.scope.$$destroyed||e.callback()}),t&&o.$digest()},0,!1))},processTemplate:function(e){return d?e:e&&ie.isString(e)?e.replace(/\{\{/g,i).replace(/}}/g,f):e},getParentWithPointerEvents:function(e){for(var t=e.parent();h(t,"pointer-events","none");)t=t.parent();return t},getNearestContentElement:function(e){for(var t=e.parent()[0];t&&t!==r[0]&&t!==document.body&&"MD-CONTENT"!==t.nodeName.toUpperCase();)t=t.parentNode;return t},checkStickySupport:function(){var e,t=ie.element("<div>");s[0].body.appendChild(t[0]);for(var n=["sticky","-webkit-sticky"],r=0;r<n.length;++r)if(t.css({position:n[r],top:0,"z-index":2}),t.css("position")==n[r]){e=n[r];break}return t.remove(),e},parseAttributeBoolean:function(e,t){return""===e||!!e&&(!1===t||"false"!==e&&"0"!==e)},hasComputedStyle:h,isParentFormSubmitted:function(e){var t=m.getClosest(e,"form"),n=t?ie.element(t).controller("form"):null;return!!n&&n.$submitted},animateScrollTo:function(r,i){var a=r.scrollTop,o=i-a,s=a<i,c=m.now();u(function e(){var t=(1e3,n=m.now()-c,function(e,t,n,r){if(r<e)return t+n;var i=(e/=r)*e;return t+n*(i*e*-2+3*i)}(n,a,o,1e3));var n;r.scrollTop=t;(s?t<i:i<t)&&u(e)})}};return m.dom.animator=e(m),m;function g(e){return e[0]||e}}ie.module("material.core").factory("$mdUtil",e),ie.element.prototype.focus=ie.element.prototype.focus||function(){return this.length&&this[0].focus(),this},ie.element.prototype.blur=ie.element.prototype.blur||function(){return this.length&&this[0].blur(),this}}(),function(){function a(r,i,c,a){var o=this.showWarnings;return{expect:s,expectAsync:l,expectWithText:function(e,t){var n=u(e)||"";-1<n.indexOf(a.startSymbol())?l(e,t,function(){return u(e)}):s(e,t,n)},expectWithoutText:function(e,t){var n=u(e);-1<n.indexOf(a.startSymbol())||n||s(e,t,n)}};function s(e,t,n){var r=ie.element(e)[0]||e;!r||r.hasAttribute(t)&&0!==r.getAttribute(t).length||function(e,t){var n=e.hasChildNodes(),r=!1;if(n)for(var i=e.childNodes,a=0;a<i.length;a++){var o=i[a];1===o.nodeType&&o.hasAttribute(t)&&(void 0,"none"!==((s=o).currentStyle?s.currentStyle:c.getComputedStyle(s)).display&&(r=!0))}var s;return r}(r,t)||((n=ie.isString(n)?n.trim():"").length?e.attr(t,n):o&&i.warn('ARIA: Attribute "',t,'", required for accessibility, is missing on node:',r))}function l(e,t,n){r(function(){s(e,t,n())})}function u(t){t=t[0]||t;for(var e,n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1),r="";e=n.nextNode();)i(e)||(r+=e.textContent);return r.trim()||"";function i(e){for(;e.parentNode&&(e=e.parentNode)!==t;)if(e.getAttribute&&"true"===e.getAttribute("aria-hidden"))return!0}}}a.$inject=["$$rAF","$log","$window","$interpolate"],ie.module("material.core").provider("$mdAria",function(){var i=this;return i.showWarnings=!0,{disableWarnings:function(){i.showWarnings=!1},$get:["$$rAF","$log","$window","$interpolate",function(e,t,n,r){return a.apply(i,arguments)}]}})}(),function(){function e(a,o,f,d,h){this.compile=function(t){var e=t.templateUrl,n=t.template||"",s=t.controller,c=t.controllerAs,r=ie.extend({},t.resolve||{}),i=ie.extend({},t.locals||{}),l=t.transformTemplate||ie.identity,u=t.bindToController;return ie.forEach(r,function(e,t){ie.isString(e)?r[t]=f.get(e):r[t]=f.invoke(e)}),ie.extend(r,i),r.$template=e?o(e).then(function(e){return e}):a.when(n),a.all(r).then(function(r){var i,e=l(r.$template,t),a=t.element||ie.element("<div>").html(e.trim()).contents(),o=d(a);return i={locals:r,element:a,link:function(e){if(r.$scope=e,s){var t=h(s,r,!0,c);u&&ie.extend(t.instance,r);var n=t();a.data("$ngControllerController",n),a.children().data("$ngControllerController",n),i.controller=n}return o(e)}}})}}e.$inject=["$q","$templateRequest","$injector","$compile","$controller"],ie.module("material.core").service("$mdCompiler",e)}(),function(){i.$inject=["$$MdGestureHandler","$$rAF","$timeout"];var a,r,u={},f=!(n.$inject=["$mdGesture","$$MdGestureHandler"]),o=null,s=!1;function e(){}function i(r,e,n){var t=navigator.userAgent||navigator.vendor||G.opera,i=t.match(/ipad|iphone|ipod/i),a=t.match(/android/i),o=function(){for(var e=document.createElement("div"),t=["","webkit","Moz","MS","ms","o"],n=0;n<t.length;n++){var r=t[n],i=r?r+"TouchAction":"touchAction";if(ie.isDefined(e.style[i]))return i}}(),s=void 0!==G.jQuery&&ie.element===G.jQuery,c={handler:function(e,t){var n=new r(e);return ie.extend(n,t),u[e]=n,c},register:function(e,t,n){var r=u[t.replace(/^\$md./,"")];if(r)return r.registerElement(e,n);throw new Error("Failed to register element with handler "+t+". Available handlers: "+Object.keys(u).join(", "))},isIos:i,isAndroid:a,isHijackingClicks:(i||a)&&!s&&!f};if(c.isHijackingClicks){c.handler("click",{options:{maxDistance:6},onEnd:l("click")}),c.handler("focus",{options:{maxDistance:6},onEnd:function(e,t){var n;t.distance<this.state.options.maxDistance&&"-1"!=(n=e.target).getAttribute("tabindex")&&!n.hasAttribute("DISABLED")&&(n.hasAttribute("tabindex")||n.hasAttribute("href")||n.isContentEditable||-1!=["INPUT","SELECT","BUTTON","TEXTAREA","VIDEO","AUDIO"].indexOf(n.nodeName))&&(this.dispatchEvent(e,"focus",t),e.target.focus())}}),c.handler("mouseup",{options:{maxDistance:6},onEnd:l("mouseup")}),c.handler("mousedown",{onStart:function(e){this.dispatchEvent(e,"mousedown")}})}function l(n){return function(e,t){t.distance<this.state.options.maxDistance&&this.dispatchEvent(e,n,t)}}return c.handler("press",{onStart:function(e,t){this.dispatchEvent(e,"$md.pressdown")},onEnd:function(e,t){this.dispatchEvent(e,"$md.pressup")}}).handler("hold",{options:{maxDistance:6,delay:500},onCancel:function(){n.cancel(this.state.timeout)},onStart:function(e,t){if(!this.state.registeredParent)return this.cancel();this.state.pos={x:t.x,y:t.y},this.state.timeout=n(ie.bind(this,function(){this.dispatchEvent(e,"$md.hold"),this.cancel()}),this.state.options.delay,!1)},onMove:function(e,t){o||"touchmove"!==e.type||e.preventDefault();var n=this.state.pos.x-t.x,r=this.state.pos.y-t.y;Math.sqrt(n*n+r*r)>this.options.maxDistance&&this.cancel()},onEnd:function(){this.onCancel()}}).handler("drag",{options:{minDistance:6,horizontal:!0,cancelMultiplier:1.5},onSetup:function(e,t){o&&(this.oldTouchAction=e[0].style[o],e[0].style[o]=!1===t.horizontal?"pan-y":"pan-x")},onCleanup:function(e){this.oldTouchAction&&(e[0].style[o]=this.oldTouchAction)},onStart:function(e){this.state.registeredParent||this.cancel()},onMove:function(e,t){var n,r;o||"touchmove"!==e.type||e.preventDefault(),this.state.dragPointer?this.dispatchDragMove(e):(r=this.state.options.horizontal?(n=Math.abs(t.distanceX)>this.state.options.minDistance,Math.abs(t.distanceY)>this.state.options.minDistance*this.state.options.cancelMultiplier):(n=Math.abs(t.distanceY)>this.state.options.minDistance,Math.abs(t.distanceX)>this.state.options.minDistance*this.state.options.cancelMultiplier),n?(this.state.dragPointer=d(e),h(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragstart",this.state.dragPointer)):r&&this.cancel())},dispatchDragMove:e.throttle(function(e){this.state.isRunning&&(h(e,this.state.dragPointer),this.dispatchEvent(e,"$md.drag",this.state.dragPointer))}),onEnd:function(e,t){this.state.dragPointer&&(h(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragend",this.state.dragPointer))}}).handler("swipe",{options:{minVelocity:.65,minDistance:10},onEnd:function(e,t){var n;Math.abs(t.velocityX)>this.state.options.minVelocity&&Math.abs(t.distanceX)>this.state.options.minDistance?(n="left"==t.directionX?"$md.swipeleft":"$md.swiperight",this.dispatchEvent(e,n)):Math.abs(t.velocityY)>this.state.options.minVelocity&&Math.abs(t.distanceY)>this.state.options.minDistance&&(n="up"==t.directionY?"$md.swipeup":"$md.swipedown",this.dispatchEvent(e,n))}})}function t(e){this.name=e,this.state={}}function n(e,i){function t(e){!e.clientX&&!e.clientY||e.$material||e.isIonicTap||l(e)||(e.preventDefault(),e.stopPropagation())}document.contains||(document.contains=function(e){return document.body.contains(e)}),!s&&e.isHijackingClicks&&(document.addEventListener("click",function(e){0===e.clientX&&0===e.clientY||e.$material||e.isIonicTap||l(e)?(o=null,"label"==e.target.tagName.toLowerCase()&&(o={x:e.x,y:e.y})):(e.preventDefault(),e.stopPropagation(),o=null)},!0),document.addEventListener("mouseup",t,!0),document.addEventListener("mousedown",t,!0),document.addEventListener("focus",t,!0),s=!0);function n(e,t){var n;for(var r in u)(n=u[r])instanceof i&&("start"===e&&n.cancel(),n[e](t,a))}ie.element(document).on("mousedown touchstart pointerdown",function(e){if(a)return;var t=+Date.now();if(r&&!c(e,r)&&t-r.endTime<1500)return;a=d(e),n("start",e)}).on("mousemove touchmove pointermove",function(e){if(!a||!c(e,a))return;h(e,a),n("move",e)}).on("mouseup mouseleave touchend touchcancel pointerup pointercancel",function(e){if(!a||!c(e,a))return;h(e,a),a.endTime=+Date.now(),n("end",e),r=a,a=null}).on("$$mdGestureReset",function(){r=a=null})}function d(e){var t=p(e),n={startTime:+Date.now(),target:e.target,type:e.type.charAt(0)};return n.startX=n.x=t.pageX,n.startY=n.y=t.pageY,n}function c(e,t){return e&&t&&e.type.charAt(0)===t.type}function l(e){return o&&o.x==e.x&&o.y==e.y}function h(e,t){var n=p(e),r=t.x=n.pageX,i=t.y=n.pageY;t.distanceX=r-t.startX,t.distanceY=i-t.startY,t.distance=Math.sqrt(t.distanceX*t.distanceX+t.distanceY*t.distanceY),t.directionX=0<t.distanceX?"right":t.distanceX<0?"left":"",t.directionY=0<t.distanceY?"down":t.distanceY<0?"up":"",t.duration=+Date.now()-t.startTime,t.velocityX=t.distanceX/t.duration,t.velocityY=t.distanceY/t.duration}function p(e){return(e=e.originalEvent||e).touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0]||e}ie.module("material.core.gestures",[]).provider("$mdGesture",e).factory("$$MdGestureHandler",function(){var e=void 0!==G.jQuery&&ie.element===G.jQuery;return t.prototype={options:{},dispatchEvent:e?function(e,t,n){n=n||a;var r=new ie.element.Event(t);r.$material=!0,r.pointer=n,r.srcEvent=e,ie.extend(r,{clientX:n.x,clientY:n.y,screenX:n.x,screenY:n.y,pageX:n.x,pageY:n.y,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey}),ie.element(n.target).trigger(r)}:function(e,t,n){var r;n=n||a,"click"===t||"mouseup"==t||"mousedown"==t?(r=document.createEvent("MouseEvents")).initMouseEvent(t,!0,!0,G,e.detail,n.x,n.y,n.x,n.y,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget||null):(r=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,{}),r.$material=!0,r.pointer=n,r.srcEvent=e,n.target.dispatchEvent(r)},onSetup:ie.noop,onCleanup:ie.noop,onStart:ie.noop,onMove:ie.noop,onEnd:ie.noop,onCancel:ie.noop,start:function(e,t){if(!this.state.isRunning){var n=this.getNearestParent(e.target),r=n&&n.$mdGesture[this.name]||{};this.state={isRunning:!0,options:ie.extend({},this.options,r),registeredParent:n},this.onStart(e,t)}},move:function(e,t){this.state.isRunning&&this.onMove(e,t)},end:function(e,t){this.state.isRunning&&(this.onEnd(e,t),this.state.isRunning=!1)},cancel:function(e,t){this.onCancel(e,t),this.state={}},getNearestParent:function(e){for(var t=e;t;){if((t.$mdGesture||{})[this.name])return t;t=t.parentNode}return null},registerElement:function(e,t){var n=this;return e[0].$mdGesture=e[0].$mdGesture||{},e[0].$mdGesture[this.name]=t||{},e.on("$destroy",r),n.onSetup(e,t||{}),r;function r(){delete e[0].$mdGesture[n.name],e.off("$destroy",r),n.onCleanup(e,t||{})}}},t}).run(n),e.prototype={skipClickHijack:function(){return f=!0},$get:["$$MdGestureHandler","$$rAF","$timeout",function(e,t,n){return new i(e,t,n)}]}}(),ie.module("material.core").provider("$$interimElement",function(){return t.$inject=["$document","$q","$$q","$rootScope","$timeout","$rootElement","$animate","$mdUtil","$mdCompiler","$mdTheming","$injector"],e.$get=t,e;function e(i){e.$inject=["$$interimElement","$injector"];var n=["onHide","onShow","onRemove"],a={},l={presets:{}},r={setDefaults:function(e){return l.optionsFactory=e.options,l.methods=(e.methods||[]).concat(n),r},addPreset:function(e,t){if((t=t||{}).methods=t.methods||[],t.options=t.options||function(){return{}},/^cancel|hide|show$/.test(e))throw new Error("Preset '"+e+"' in "+i+" is reserved!");if(-1<t.methods.indexOf("_options"))throw new Error("Method '_options' in "+i+" is reserved!");return l.presets[e]={methods:t.methods.concat(n),optionsFactory:t.options,argOption:t.argOption},r},addMethod:function(e,t){return a[e]=t,r},$get:e};return r.addPreset("build",{methods:["controller","controllerAs","resolve","template","templateUrl","themable","transformTemplate","parent"]}),r;function e(e,r){var o,t,n=e(),s={hide:n.hide,cancel:n.cancel,show:function(e){return(e=e||{})._options&&(e=e._options),n.show(ie.extend({},t,e))},destroy:function(e){return n.destroy(e)}};return o=l.methods||[],t=c(l.optionsFactory,{}),ie.forEach(a,function(e,t){s[t]=e}),ie.forEach(l.presets,function(t,n){var r=c(t.optionsFactory,{}),e=(t.methods||[]).concat(o);function i(e){this._options=ie.extend({},r,e)}if(ie.extend(r,{$type:n}),ie.forEach(e,function(t){i.prototype[t]=function(e){return this._options[t]=e,this}}),t.argOption){var a="show"+n.charAt(0).toUpperCase()+n.slice(1);s[a]=function(e){var t=s[n](e);return s.show(t)}}s[n]=function(e){return arguments.length&&t.argOption&&!ie.isObject(e)&&!ie.isArray(e)?(new i)[t.argOption](e):new i(e)}}),s;function c(e,t){var n={};return n[i]=s,r.invoke(e||function(){return t},{},n)}}}function t(d,h,s,t,p,m,r,i,g,_,e){return function(){var f,a=[];return f={show:function(e){var t=new n((e=e||{})||{});return(!e.skipHide&&a.length?f.cancel():h.when(!0)).finally(function(){a.push(t),t.show().catch(function(e){return e})}),t.deferred.promise},hide:function(t,n){if(!a.length)return h.when(t);if((n=n||{}).closeAll){var e=h.all(a.reverse().map(i));return a=[],e}if(n.closeTo!==ae)return h.all(a.splice(n.closeTo).map(i));var r=a.pop();return i(r);function i(e){return e.remove(t,!1,n||{}).catch(function(e){return e}),e.deferred.promise}},cancel:function(e,t){var n=a.pop();return n?(n.remove(e,!0,t||{}).catch(function(e){return e}),n.deferred.promise.catch(ie.noop)):h.when(e)},destroy:function(e){var t=e?null:a.shift(),n=ie.element(e).length?ie.element(e)[0].parentNode:null;if(n){var r=a.filter(function(e){var t=e.options.element[0];return t===n});0<r.length&&(t=r[0],a.splice(a.indexOf(t),1))}return t?t.remove(!1,!1,{$destroy:!0}):h.when(!1)},$injector_:e};function n(c){var a,l,e,u=h.when(!0);return(e=(e=c)||{}).template&&(e.template=i.processTemplate(e.template)),c=ie.extend({preserveScope:!1,cancelAutoHide:ie.noop,scope:e.scope||t.$new(e.isolateScope),onShow:function(e,t,n){return r.enter(t,n.parent)},onRemove:function(e,t){return t&&r.leave(t)||h.when()}},e),a={options:c,deferred:h.defer(),show:function(){return h(function(n,t){var r;function s(e){a.deferred.reject(e),t(e)}c.onCompiling&&c.onCompiling(c),(r=c,(r.skipCompile?null:g.compile(r))||h(function(e){e({locals:{},link:function(){return r.element}})})).then(function(e){var r,i,a,t,o;l=function(e,t){ie.extend(e.locals,t);var n,r,i,a,o=e.link(t.scope);return t.element=o,t.parent=(n=o,a=(r=t).parent,((a=ie.isFunction(a)?a(r.scope,n,r):ie.isString(a)?ie.element(d[0].querySelector(a)):ie.element(a))||{}).length?a:(m[0]&&m[0].querySelector&&(i=m[0].querySelector(":not(svg) > body")),i||(i=m[0]),"#comment"==i.nodeName&&(i=d[0].body),ie.element(i))),t.themable&&_(o),o}(e,c),u=(r=l,i=c,a=e.controller,t=i.onShowing||ie.noop,o=i.onComplete||ie.noop,t(i.scope,r,i,a),h(function(n,t){try{h.when(i.onShow(i.scope,r,i,a)).then(function(){var e,t;o(i.scope,r,i),t=ie.noop,c.hideDelay&&(e=p(f.hide,c.hideDelay),t=function(){p.cancel(e)}),c.cancelAutoHide=function(){t(),c.cancelAutoHide=ae},n(r)},t)}catch(e){t(e.message)}})).then(n,s)},s)})},remove:function(e,t,n){return l?((c=ie.extend(c||{},n||{})).cancelAutoHide&&c.cancelAutoHide(),c.element.triggerHandler("$mdInterimElementRemove"),!0===c.$destroy?o(c.element,c).then(function(){t&&i(e)||r(e)}):(h.when(u).finally(function(){o(c.element,c).then(function(){t&&i(e)||r(e)},i)}),a.deferred.promise)):h.when(!1);function r(e){a.deferred.resolve(e)}function i(e){a.deferred.reject(e)}}};function o(r,i){var a=i.onRemoving||ie.noop;return s(function(e,t){try{var n=s.when(i.onRemove(i.scope,r,i)||!0);a(r,n),1==i.$destroy?e(r):n.then(function(){!i.preserveScope&&i.scope&&i.scope.$destroy(),e(r)},t)}catch(e){t(e)}})}}}}}),function(){var l,s,u,c=/(-gt)?-(sm|md|lg|print)/g,f=/\s+/g,d=["grow","initial","auto","none","noshrink","nogrow"],h=["row","column"],p=["","start","center","end","stretch","space-around","space-between"],m=["","start","center","end","stretch"],g={enabled:!0,breakpoints:[]};function _(){var e=!!document.querySelector("[md-layouts-disabled]");g.enabled=!e}function b(){return g.enabled=!1,{restrict:"A",priority:"900"}}function v(r){return["$mdUtil","$interpolate","$log",function(e,t,n){return l=e,s=t,u=n,{restrict:"A",compile:function(e,t){var n;return g.enabled&&(C(r,T(r,t,""),A(0,r,t)),i(0,e),n=i),n||ie.noop}}}];function i(e,t){t.addClass(r)}}function y(t){var n=t.split("-");return["$log",function(e){return e.warn(t+"has been deprecated. Please use a `"+n[0]+"-gt-<xxx>` variant."),ie.noop}]}function w(e,t,n,r){var i,a=n[0].nodeName.toLowerCase();switch(e.replace(c,"")){case"flex":"md-button"!=a&&"fieldset"!=a||(i="<"+a+" "+e+"></"+a+">",r.warn(l.supplant("Markup '{0}' may not work as expected in IE Browsers. Consult '{1}' for details.",[i,"https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers"])))}}function C(e,t,n){var r,i,a,o=t;if(!S(t)){switch(e.replace(c,"")){case"layout":x(t,h)||(t=h[0]);break;case"flex":x(t,d)||isNaN(t)&&(t="");break;case"flex-offset":case"flex-order":t&&!isNaN(+t)||(t="0");break;case"layout-align":var s=(a={main:"start",cross:"stretch"},0!==(r=(r=t)||"").indexOf("-")&&0!==r.indexOf(" ")||(r="none"+r),(i=r.toLowerCase().trim().replace(f,"-").split("-")).length&&"space"===i[0]&&(i=[i[0]+"-"+i[1],i[2]]),0<i.length&&(a.main=i[0]||a.main),1<i.length&&(a.cross=i[1]||a.cross),p.indexOf(a.main)<0&&(a.main="start"),m.indexOf(a.cross)<0&&(a.cross="stretch"),a);t=l.supplant("{main}-{cross}",s);break;case"layout-padding":case"layout-margin":case"layout-fill":case"layout-wrap":case"layout-nowrap":case"layout-nowrap":t=""}t!=o&&(n||ie.noop)(t)}return t}function A(e,t,n){return function(e){S(e)||(n[n.$normalize(t)]=e)}}function S(e){return-1<(e||"").indexOf(s.startSymbol())}function T(e,t,n){var r=t.$normalize(e);return t[r]?t[r].replace(f,"-"):n||null}function x(t,e,n){t=n&&t?t.replace(f,n):t;var r=!1;return t&&e.forEach(function(e){e=n?e.replace(f,n):e,r=r||e===t}),r}!function(r){var i,t=/^((?:x|data)[\:\-_])/i,n=/([\:\-\_]+(.))/g,e=["layout","flex","flex-order","flex-offset","layout-align"],a=["show","hide","layout-padding","layout-margin"];function o(e){return e.replace(t,"").replace(n,function(e,t,n,r){return r?n.toUpperCase():n})}ie.forEach(["","xs","gt-xs","sm","gt-sm","md","gt-md","lg","gt-lg","xl","print"],function(n){ie.forEach(e,function(e){var t=n?e+"-"+n:e;r.directive(o(t),function(c){return["$mdUtil","$interpolate","$log",function(e,t,n){return l=e,s=t,u=n,{restrict:"A",compile:function(e,t){var n;return g.enabled&&(w(c,0,e,u),C(c,T(c,t,""),A(0,c,t)),n=r),n||ie.noop}}}];function r(e,t,n){var r,i,a,o=(r=t,i=c,function(e){var t=C(i,e||"");ie.isDefined(t)&&(a&&r.removeClass(a),a=t?i+"-"+t.replace(f,"-"):i,r.addClass(a))}),s=n.$observe(n.$normalize(c),o);o(T(c,n,"")),e.$on("$destroy",function(){s()})}}(t))}),ie.forEach(a,function(e){var t=n?e+"-"+n:e;r.directive(o(t),v(t))})}),r.provider("$$mdLayout",function(){return{$get:ie.noop,validateAttributeValue:C,validateAttributeUsage:w,disableLayouts:function(e){g.enabled=!0!==e}}}).directive("mdLayoutCss",b).directive("ngCloak",(i="ng-cloak",["$timeout",function(n){return{restrict:"A",priority:-10,compile:function(e){return g.enabled?(e.addClass(i),function(e,t){n(function(){t.removeClass(i)},10,!1)}):ie.noop}}}])).directive("layoutWrap",v("layout-wrap")).directive("layoutNowrap",v("layout-nowrap")).directive("layoutNoWrap",v("layout-no-wrap")).directive("layoutFill",v("layout-fill")).directive("layoutLtMd",y("layout-lt-md")).directive("layoutLtLg",y("layout-lt-lg")).directive("flexLtMd",y("flex-lt-md")).directive("flexLtLg",y("flex-lt-lg")).directive("layoutAlignLtMd",y("layout-align-lt-md")).directive("layoutAlignLtLg",y("layout-align-lt-lg")).directive("flexOrderLtMd",y("flex-order-lt-md")).directive("flexOrderLtLg",y("flex-order-lt-lg")).directive("offsetLtMd",y("flex-offset-lt-md")).directive("offsetLtLg",y("flex-offset-lt-lg")).directive("hideLtMd",y("hide-lt-md")).directive("hideLtLg",y("hide-lt-lg")).directive("showLtMd",y("show-lt-md")).directive("showLtLg",y("show-lt-lg")).config(_)}(ie.module("material.core.layout",["ng"]))}(),ie.module("material.core.meta",[]).provider("$$mdMeta",function(){var r=ie.element(document.head),i={};function a(e){if(i[e])return!0;var t=document.getElementsByName(e)[0];return!!t&&(i[e]=ie.element(t),!0)}var e={setMeta:function(e,t){if(a(e),i[e])i[e].attr("content",t);else{var n=ie.element('<meta name="'+e+'" content="'+t+'"/>');r.append(n),i[e]=n}return function(){i[e].attr("content",""),i[e].remove(),delete i[e]}},getMeta:function(e){if(!a(e))throw Error("$$mdMeta: could not find a meta tag with the name '"+e+"'");return i[e].attr("content")}};return ie.extend({},e,{$get:function(){return e}})}),function(){function e(n,r){var i,a=[],o={};return i={notFoundError:function(e,t){n.error((t||"")+"No instance found for handle",e)},getInstances:function(){return a},get:function(e){if(!s(e))return null;var t,n,r;for(t=0,n=a.length;t<n;t++)if((r=a[t]).$$mdHandle===e)return r;return null},register:function(t,e){return e?(t.$$mdHandle=e,a.push(t),(n=o[e])&&(n.forEach(function(e){e.resolve(t)}),delete o[e]),function(){var e=a.indexOf(t);-1!==e&&a.splice(e,1)}):ie.noop;var n},when:function(e){if(s(e)){var t=r.defer(),n=i.get(e);return n?t.resolve(n):(o[e]===ae&&(o[e]=[]),o[e].push(t)),t.promise}return r.reject("Invalid `md-component-id` value.")}};function s(e){return e&&""!==e}}e.$inject=["$log","$q"],ie.module("material.core").factory("$mdComponentRegistry",e)}(),function(){function e(i){return{attach:function(e,t,n){var r;return n=ie.extend((r=t).hasClass("md-icon-button")?{isMenuItem:r.hasClass("md-menu-item"),fitRipple:!0,center:!0}:{isMenuItem:r.hasClass("md-menu-item"),dimBackground:!0},n),i.attach(e,t,n)}}}e.$inject=["$mdInkRipple"],ie.module("material.core").factory("$mdButtonInkRipple",e)}(),function(){function e(r){return{attach:function(e,t,n){return r.attach(e,t,ie.extend({center:!0,dimBackground:!1,fitRipple:!0},n))}}}e.$inject=["$mdInkRipple"],ie.module("material.core").factory("$mdCheckboxInkRipple",e)}(),function(){function e(r){return{attach:function(e,t,n){return r.attach(e,t,ie.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},n))}}}e.$inject=["$mdInkRipple"],ie.module("material.core").factory("$mdListInkRipple",e)}(),function(){a.$inject=["$scope","$element","rippleOptions","$window","$timeout","$mdUtil","$mdColorUtil"],e.$inject=["$mdButtonInkRipple","$mdCheckboxInkRipple"],ie.module("material.core").provider("$mdInkRipple",function(){var i=!1;return{disableInkRipple:function(){i=!0},$get:["$injector",function(r){return{attach:function(e,t,n){return i||t.controller("mdNoInk")?ie.noop:r.instantiate(a,{$scope:e,$element:t,rippleOptions:n})}}}]}}).directive("mdInkRipple",e).directive("mdNoInk",n).directive("mdNoBar",n).directive("mdNoStretch",n);function e(r,i){return{controller:ie.noop,link:function(e,t,n){n.hasOwnProperty("mdInkRippleCheckbox")?i.attach(e,t):r.attach(e,t)}}}function a(e,t,n,r,i,a,o){this.$window=r,this.$timeout=i,this.$mdUtil=a,this.$mdColorUtil=o,this.$scope=e,this.$element=t,this.options=n,this.mousedown=!1,this.ripples=[],this.timeout=null,this.lastRipple=null,a.valueOnUse(this,"container",this.createContainer),this.$element.addClass("md-ink-ripple"),(t.controller("mdInkRipple")||{}).createRipple=ie.bind(this,this.createRipple),(t.controller("mdInkRipple")||{}).setColor=ie.bind(this,this.color),this.bindEvents()}function t(e,t){(e.mousedown||e.lastRipple)&&(e.mousedown=!1,e.$mdUtil.nextTick(ie.bind(e,t),!1))}function n(){return{controller:ie.noop}}a.prototype.color=function(e){var t,n,r=this;return ie.isDefined(e)&&(r._color=r._parseColor(e)),r._color||r._parseColor(r.inkRipple())||r._parseColor((t=r.options&&r.options.colorElement?r.options.colorElement:[],(n=t.length?t[0]:r.$element[0])?r.$window.getComputedStyle(n).color:"rgb(0,0,0)"))},a.prototype.calculateColor=function(){return this.color()},a.prototype._parseColor=function(e,t){t=t||1;var n=this.$mdColorUtil;if(e)return 0===e.indexOf("rgba")?e.replace(/\d?\.?\d*\s*\)\s*$/,(.1*t).toString()+")"):0===e.indexOf("rgb")?n.rgbToRgba(e):0===e.indexOf("#")?n.hexToRgba(e):void 0},a.prototype.bindEvents=function(){this.$element.on("mousedown",ie.bind(this,this.handleMousedown)),this.$element.on("mouseup touchend",ie.bind(this,this.handleMouseup)),this.$element.on("mouseleave",ie.bind(this,this.handleMouseup)),this.$element.on("touchmove",ie.bind(this,this.handleTouchmove))},a.prototype.handleMousedown=function(e){if(!this.mousedown)if(e.hasOwnProperty("originalEvent")&&(e=e.originalEvent),this.mousedown=!0,this.options.center)this.createRipple(this.container.prop("clientWidth")/2,this.container.prop("clientWidth")/2);else if(e.srcElement!==this.$element[0]){var t=this.$element[0].getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;this.createRipple(n,r)}else this.createRipple(e.offsetX,e.offsetY)},a.prototype.handleMouseup=function(){t(this,this.clearRipples)},a.prototype.handleTouchmove=function(){t(this,this.deleteRipples)},a.prototype.deleteRipples=function(){for(var e=0;e<this.ripples.length;e++)this.ripples[e].remove()},a.prototype.clearRipples=function(){for(var e=0;e<this.ripples.length;e++)this.fadeInComplete(this.ripples[e])},a.prototype.createContainer=function(){var e=ie.element('<div class="md-ripple-container"></div>');return this.$element.append(e),e},a.prototype.clearTimeout=function(){this.timeout&&(this.$timeout.cancel(this.timeout),this.timeout=null)},a.prototype.isRippleAllowed=function(){var e=this.$element[0];do{if(!e.tagName||"BODY"===e.tagName)break;if(e&&ie.isFunction(e.hasAttribute)){if(e.hasAttribute("disabled"))return!1;if("false"===this.inkRipple()||"0"===this.inkRipple())return!1}}while(e=e.parentNode);return!0},a.prototype.inkRipple=function(){return this.$element.attr("md-ink-ripple")},a.prototype.createRipple=function(e,t){if(this.isRippleAllowed()){var n,r,i,a=this,o=a.$mdColorUtil,s=ie.element('<div class="md-ripple"></div>'),c=this.$element.prop("clientWidth"),l=this.$element.prop("clientHeight"),u=2*Math.max(Math.abs(c-e),e),f=2*Math.max(Math.abs(l-t),t),d=(n=this.options.fitRipple,r=u,i=f,n?Math.max(r,i):Math.sqrt(Math.pow(r,2)+Math.pow(i,2))),h=this.calculateColor();s.css({left:e+"px",top:t+"px",background:"black",width:d+"px",height:d+"px",backgroundColor:o.rgbaToRgb(h),borderColor:o.rgbaToRgb(h)}),this.lastRipple=s,this.clearTimeout(),this.timeout=this.$timeout(function(){a.clearTimeout(),a.mousedown||a.fadeInComplete(s)},157.5,!1),this.options.dimBackground&&this.container.css({backgroundColor:h}),this.container.append(s),this.ripples.push(s),s.addClass("md-ripple-placed"),this.$mdUtil.nextTick(function(){s.addClass("md-ripple-scaled md-ripple-active"),a.$timeout(function(){a.clearRipples()},450,!1)},!1)}},a.prototype.fadeInComplete=function(e){this.lastRipple===e&&(this.timeout||this.mousedown)||this.removeRipple(e)},a.prototype.removeRipple=function(e){var t=this;this.ripples.indexOf(e)<0||(this.ripples.splice(this.ripples.indexOf(e),1),e.removeClass("md-ripple-active"),e.addClass("md-ripple-remove"),0===this.ripples.length&&this.container.css({backgroundColor:""}),this.$timeout(function(){t.fadeOutComplete(e)},450,!1))},a.prototype.fadeOutComplete=function(e){e.remove(),this.lastRipple=null}}(),function(){function e(r){return{attach:function(e,t,n){return r.attach(e,t,ie.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},n))}}}e.$inject=["$mdInkRipple"],ie.module("material.core").factory("$mdTabInkRipple",e)}(),ie.module("material.core.theming.palette",[]).constant("$mdColorPalette",{red:{50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 A100",contrastStrongLightColors:"400 500 600 700 A200 A400 A700"},pink:{50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"500 600 A200 A400 A700"},purple:{50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200 A400 A700"},"deep-purple":{50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200"},indigo:{50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200 A400"},blue:{50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100",contrastStrongLightColors:"500 600 700 A200 A400 A700"},"light-blue":{50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea",contrastDefaultColor:"dark",contrastLightColors:"600 700 800 900 A700",contrastStrongLightColors:"600 700 800 A700"},cyan:{50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4",contrastDefaultColor:"dark",contrastLightColors:"700 800 900",contrastStrongLightColors:"700 800 900"},teal:{50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700"},green:{50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700"},"light-green":{50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17",contrastDefaultColor:"dark",contrastLightColors:"700 800 900",contrastStrongLightColors:"700 800 900"},lime:{50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00",contrastDefaultColor:"dark",contrastLightColors:"900",contrastStrongLightColors:"900"},yellow:{50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600",contrastDefaultColor:"dark"},amber:{50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00",contrastDefaultColor:"dark"},orange:{50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00",contrastDefaultColor:"dark",contrastLightColors:"800 900",contrastStrongLightColors:"800 900"},"deep-orange":{50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100 A200",contrastStrongLightColors:"500 600 700 800 900 A400 A700"},brown:{50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100 A200",contrastStrongLightColors:"300 400"},grey:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#ffffff",A200:"#000000",A400:"#303030",A700:"#616161",contrastDefaultColor:"dark",contrastLightColors:"600 700 800 900 A200 A400 A700"},"blue-grey":{50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 A100 A200",contrastStrongLightColors:"400 500 700"}}),function(p){function e(e){var t=!!document.querySelector("[md-themes-disabled]");e.disableTheming(t)}e.$inject=["$mdThemingProvider"],n.$inject=["$mdTheming","$interpolate","$log"],r.$inject=["$mdTheming"],t.$inject=["$mdColorPalette","$$mdMetaProvider"],i.$inject=["$injector","$mdTheming"],p.module("material.core.theming",["material.core.theming.palette","material.core.meta"]).directive("mdTheme",n).directive("mdThemable",r).directive("mdThemesDisabled",function(){return C.disableTheming=!0,{restrict:"A",priority:"900"}}).provider("$mdTheming",t).config(e).run(i);var m,c={},s={name:"dark",1:"rgba(0,0,0,0.87)",2:"rgba(0,0,0,0.54)",3:"rgba(0,0,0,0.38)",4:"rgba(0,0,0,0.12)"},l={name:"light",1:"rgba(255,255,255,1.0)",2:"rgba(255,255,255,0.7)",3:"rgba(255,255,255,0.5)",4:"rgba(255,255,255,0.12)"},u="1px 1px 0px rgba(0,0,0,0.4), -1px -1px 0px rgba(0,0,0,0.4)",g="",f=x("rgba(0,0,0,0.87)"),d=x("rgba(255,255,255,0.87)"),h=x("rgb(255,255,255)"),_=["primary","accent","warn","background"],b="primary",v={accent:{default:"A200","hue-1":"A100","hue-2":"A400","hue-3":"A700"},background:{default:"50","hue-1":"A100","hue-2":"100","hue-3":"300"}},y={background:{default:"A400","hue-1":"800","hue-2":"900","hue-3":"A200"}};_.forEach(function(e){var t={default:"500","hue-1":"300","hue-2":"800","hue-3":"A100"};v[e]||(v[e]=t),y[e]||(y[e]=t)});var w=["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"],C={disableTheming:!1,generateOnDemand:!1,registeredStyles:[],nonce:null};function t(e,c){a.$inject=["$rootScope","$log"];var n,f={},d=!(m={}),h="default";p.extend(m,e);var t=function(e){var t,n,r,i=(e=p.isObject(e)?e:{}).theme||"default",a=e.hue||"800",o=m[e.palette]||m[f[i].colors[e.palette||"primary"].name],s=p.isObject(o[a])?o[a].hex:o[a];return t=s,n=c.setMeta("theme-color",t),r=c.setMeta("msapplication-navbutton-color",t),function(){n(),r()}};return n={definePalette:function(e,t){return t=t||{},m[e]=r(e,t),n},extendPalette:function(e,t){return r(e,p.extend({},m[e]||{},t))},theme:function(e,t){if(f[e])return f[e];var n="string"==typeof(t=t||"default")?f[t]:t,r=new i(e);return n&&p.forEach(n.colors,function(e,t){r.colors[t]={name:e.name,hues:p.extend({},e.hues)}}),f[e]=r},configuration:function(){return p.extend({},C,{defaultTheme:h,alwaysWatchTheme:d,registeredStyles:[].concat(C.registeredStyles)})},disableTheming:function(e){C.disableTheming=p.isUndefined(e)||!!e},registerStyles:function(e){C.registeredStyles.push(e)},setNonce:function(e){C.nonce=e},generateThemesOnDemand:function(e){C.generateOnDemand=e},setDefaultTheme:function(e){h=e},alwaysWatchTheme:function(e){d=e},enableBrowserColor:t,$get:a,_LIGHT_DEFAULT_HUES:v,_DARK_DEFAULT_HUES:y,_PALETTES:m,_THEMES:f,_parseRules:A,_rgba:k};function r(e,t){var n=w.filter(function(e){return!t[e]});if(n.length)throw new Error("Missing colors %1 in palette %2!".replace("%1",n.join(", ")).replace("%2",e));return t}function i(e){var o=this;function t(e){if((e=0===arguments.length||!!e)!==o.isDark){o.isDark=e,o.foregroundPalette=o.isDark?l:s,o.foregroundShadow=o.isDark?u:g;var t=o.isDark?y:v,a=o.isDark?v:y;return p.forEach(t,function(e,t){var n=o.colors[t],r=a[t];if(n)for(var i in n.hues)n.hues[i]===r[i]&&(n.hues[i]=e[i])}),o}}o.name=e,o.colors={},(o.dark=t)(!1),_.forEach(function(r){var i=(o.isDark?y:v)[r];o[r+"Palette"]=function(t,e){var n=o.colors[r]={name:t,hues:p.extend({},i,e)};return Object.keys(n.hues).forEach(function(e){if(!i[e])throw new Error("Invalid hue name '%1' in theme %2's %3 color %4. Available hue names: %4".replace("%1",e).replace("%2",o.name).replace("%3",t).replace("%4",Object.keys(i).join(", ")))}),Object.keys(n.hues).map(function(e){return n.hues[e]}).forEach(function(e){if(-1==w.indexOf(e))throw new Error("Invalid hue value '%1' in theme %2's %3 color %4. Available hue values: %5".replace("%1",e).replace("%2",o.name).replace("%3",r).replace("%4",t).replace("%5",w.join(", ")))}),o},o[r+"Color"]=function(){var e=Array.prototype.slice.call(arguments);return console.warn("$mdThemingProviderTheme."+r+"Color() has been deprecated. Use $mdThemingProviderTheme."+r+"Palette() instead."),o[r+"Palette"].apply(o,e)}})}function a(c,l){var n=function(e,t){t===ae&&(t=e,e=ae),e===ae&&(e=c),n.inherit(t,t)};return n.THEMES=p.extend({},f),n.PALETTES=p.extend({},m),n.inherit=function(n,e){var t,r=e.controller("mdTheme"),i=n.attr("md-theme-watch"),a=(d||p.isDefined(i))&&"false"!=i;function o(){return(r=e.controller("mdTheme")||n.data("$mdThemeController"))&&r.$mdTheme||("default"==h?"":h)}function s(e){if(e){u(e)||l.warn("Attempted to use unregistered theme '"+e+"'. Register it with $mdThemingProvider.theme().");var t=n.data("$mdThemeName");t&&n.removeClass("md-"+t+"-theme"),n.addClass("md-"+e+"-theme"),n.data("$mdThemeName",e),r&&n.data("$mdThemeController",r)}}s(o()),(d&&(!(t=e.controller("mdTheme"))||(n.on("$destroy",t.registerChanges(function(){s(o())})),0))||!d&&a)&&n.on("$destroy",c.$watch(o,s))},n.registered=u,n.defaultTheme=function(){return h},n.generateTheme=function(e){T(f[e],e,C.nonce)},n.setBrowserColor=t,n;function u(e){return e===ae||""===e||n.THEMES[e]!==ae}}}function n(a,o,s){return{priority:100,link:{pre:function(e,t,n){var r=[],i={registerChanges:function(t,e){return e&&(t=p.bind(e,t)),r.push(t),function(){var e=r.indexOf(t);-1<e&&r.splice(e,1)}},$setTheme:function(e){a.registered(e)||s.warn("attempted to use unregistered theme '"+e+"'"),i.$mdTheme=e,r.forEach(function(e){e()})}};t.data("$mdThemeController",i),i.$setTheme(o(n.mdTheme)(e)),n.$observe("mdTheme",i.$setTheme)}}}}function r(e){return e}function A(o,e,n){!function(e,t){if(!m[(e.colors[t]||{}).name])throw new Error("You supplied an invalid color palette for theme %1's %2 palette. Available palettes: %3".replace("%1",e.name).replace("%2",t).replace("%3",Object.keys(m).join(", ")))}(o,e),n=n.replace(/THEME_NAME/g,o.name);var r=[],t=o.colors[e],i=new RegExp("\\.md-"+o.name+"-theme","g"),s=new RegExp("('|\")?{{\\s*("+e+")-(color|contrast)-?(\\d\\.?\\d*)?\\s*}}(\"|')?","g"),c=m[t.name];return n=n.replace(/'?"?\{\{\s*([a-zA-Z]+)-(A?\d+|hue\-[0-3]|shadow|default)-?(\d\.?\d*)?(contrast)?\s*\}\}'?"?/g,function(e,t,n,r,i){return"foreground"===t?"shadow"==n?o.foregroundShadow:o.foregroundPalette[n]||o.foregroundPalette[1]:(0!==n.indexOf("hue")&&"default"!==n||(n=o.colors[t].hues[n]),k((m[o.colors[t].name][n]||"")[i?"contrast":"value"],r))}),p.forEach(t.hues,function(a,e){var t=n.replace(s,function(e,t,n,r,i){return k(c[a]["color"===r?"value":"contrast"],i)});"default"!==e&&(t=t.replace(i,".md-"+o.name+"-theme.md-"+e)),"default"==o.name&&(t=t.replace(/((?:(?:(?: |>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)+) )?)((?:(?:\w|\.|-)+)?)\.md-default-theme((?: |>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)*)/g,function(e,t,n,r){return e+", "+t+n+r})),r.push(t)}),r}var S={};function i(e,t){var n=document.head,r=n?n.firstElementChild:null,i=!C.disableTheming&&e.has("$MD_THEME_CSS")?e.get("$MD_THEME_CSS"):"";if(i+=C.registeredStyles.join(""),r&&0!==i.length){p.forEach(m,function(r,e){var i=r.contrastDefaultColor,a=r.contrastLightColors||[],o=r.contrastStrongLightColors||[],s=r.contrastDarkColors||[];"string"==typeof a&&(a=a.split(" ")),"string"==typeof o&&(o=o.split(" ")),"string"==typeof s&&(s=s.split(" ")),delete r.contrastDefaultColor,delete r.contrastLightColors,delete r.contrastStrongLightColors,delete r.contrastDarkColors,p.forEach(r,function(e,t){if(!p.isObject(e)){var n=x(e);if(!n)throw new Error("Color %1, in palette %2's hue %3, is invalid. Hex or rgb(a) color expected.".replace("%1",e).replace("%2",r.name).replace("%3",t));r[t]={hex:r[t],value:n,contrast:"light"===i?-1<s.indexOf(t)?f:-1<o.indexOf(t)?h:d:-1<a.indexOf(t)?-1<o.indexOf(t)?h:d:f}}})});var a=i.split(/\}(?!(\}|'|"|;))/).filter(function(e){return e&&e.trim().length}).map(function(e){return e.trim()+"}"}),o=new RegExp("md-("+_.join("|")+")","g");_.forEach(function(e){S[e]=""}),a.forEach(function(e){e.match(o);for(var t,n=0;t=_[n];n++)if(-1<e.indexOf(".md-"+t))return S[t]+=e;for(n=0;t=_[n];n++)if(-1<e.indexOf(t))return S[t]+=e;return S[b]+=e}),C.generateOnDemand||p.forEach(t.THEMES,function(e){c[e.name]||"default"!==t.defaultTheme()&&"default"===e.name||T(e,e.name,C.nonce)})}}function T(i,e,a){var o=document.head,s=o?o.firstElementChild:null;c[e]||(_.forEach(function(e){for(var t=A(i,e,S[e]);t.length;){var n=t.shift();if(n){var r=document.createElement("style");r.setAttribute("md-theme-style",""),a&&r.setAttribute("nonce",a),r.appendChild(document.createTextNode(n)),o.insertBefore(r,s)}}}),c[i.name]=!0)}function x(e){if(p.isArray(e)&&3==e.length)return e;if(/^rgb/.test(e))return e.replace(/(^\s*rgba?\(|\)\s*$)/g,"").split(",").map(function(e,t){return 3==t?parseFloat(e,10):parseInt(e,10)});if("#"==e.charAt(0)&&(e=e.substring(1)),/^([a-fA-F0-9]{3}){1,2}$/g.test(e)){var t=e.length/3,n=e.substr(0,t),r=e.substr(t,t),i=e.substr(2*t);return 1===t&&(n+=n,r+=r,i+=i),[parseInt(n,16),parseInt(r,16),parseInt(i,16)]}}function k(e,t){return e?(4==e.length&&(e=p.copy(e),t?e.pop():t=e.pop()),t&&("number"==typeof t||"string"==typeof t&&t.length)?"rgba("+e.join(",")+","+t+")":"rgb("+e.join(",")+")"):"rgb('0,0,0')"}}(G.angular),ie.module("material.core").factory("$$mdAnimate",["$q","$timeout","$mdConstant","$animateCss",function(n,i,o,s){return function(e){return r=e,t=n,c=i,l=o,a=s,u={translate3d:function(t,n,e,r){return a(t,{from:n,to:e,addClass:r.transitionInClass,removeClass:r.transitionOutClass}).start().then(function(){return i});function i(e){return a(t,{to:e||n,addClass:r.transitionOutClass,removeClass:r.transitionInClass}).start()}},waitTransitionEnd:function(a,o){var s=3e3;return t(function(t,e){var n;("0s"==(n=(n=(o=o||{}).cachedTransitionStyles)||G.getComputedStyle(a[0])).transitionDuration||!n.transition&&!n.transitionProperty)&&(s=0);var r=c(i,o.timeout||s);function i(e){e&&e.target!==a[0]||(e&&c.cancel(r),a.off(l.CSS.TRANSITIONEND,i),t())}a.on(l.CSS.TRANSITIONEND,i)})},calculateTransformValues:function(e,t){var n,r,i=t.element,a=t.bounds;if(i||a){var o=i?u.clientRect(i)||(n=e?e.parent():null,(r=n?n.parent():null)?u.clientRect(r):null):u.copyRect(a),s=u.copyRect(e[0].getBoundingClientRect()),c=u.centerPointFor(s),l=u.centerPointFor(o);return{centerX:l.x-c.x,centerY:l.y-c.y,scaleX:Math.round(100*Math.min(.5,o.width/s.width))/100,scaleY:Math.round(100*Math.min(.5,o.height/s.height))/100}}return{centerX:0,centerY:0,scaleX:.5,scaleY:.5}},calculateZoomToOrigin:function(e,t){var n=ie.bind(null,r.supplant,"translate3d( {centerX}px, {centerY}px, 0 ) scale( {scaleX}, {scaleY} )");return n(u.calculateTransformValues(e,t))},calculateSlideToOrigin:function(e,t){var n=ie.bind(null,r.supplant,"translate3d( {centerX}px, {centerY}px, 0 )");return n(u.calculateTransformValues(e,t))},toCss:function(e){var r={};return ie.forEach(e,function(e,t){if(!ie.isUndefined(e))if(0<="left top right bottom width height x y min-width min-height max-width max-height".indexOf(t))r[t]=e+"px";else switch(t){case"transition":n(t,l.CSS.TRANSITION,e);break;case"transform":n(t,l.CSS.TRANSFORM,e);break;case"transformOrigin":n(t,l.CSS.TRANSFORM_ORIGIN,e);break;case"font-size":r["font-size"]=e}}),r;function n(e,t,n){ie.forEach(t.split(" "),function(e){r[e]=n})}},toTransformCss:function(t,e,n){var r={};return ie.forEach(l.CSS.TRANSFORM.split(" "),function(e){r[e]=t}),e&&(n=n||"all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important",r.transition=n),r},copyRect:function(t,n){return t?(n=n||{},ie.forEach("left top right bottom width height".split(" "),function(e){n[e]=Math.round(t[e])}),n.width=n.width||n.right-n.left,n.height=n.height||n.bottom-n.top,n):null},clientRect:function(e){var t,n=ie.element(e)[0].getBoundingClientRect();return(t=n)&&0<t.width&&0<t.height?u.copyRect(n):null},centerPointFor:function(e){return e?{x:Math.round(e.left+e.width/2),y:Math.round(e.top+e.height/2)}:{x:0,y:0}}};var r,t,c,l,a,u}}]),4<=ie.version.minor?ie.module("material.core.animate",[]):function(){var T=ie.forEach,x=ie.isDefined(document.documentElement.style.WebkitAppearance),k=x?"-webkit-":"",E=(x?"webkitTransitionEnd ":"")+"transitionend",D=(x?"webkitAnimationEnd ":"")+"animationend",e=["$q","$$rAFMutex",function(t,n){function e(e){this.setHost(e),this._doneCallbacks=[],this._runInAnimationFrame=n(),this._state=0}return e.prototype={setHost:function(e){this.host=e||{}},done:function(e){2===this._state?e():this._doneCallbacks.push(e)},progress:ie.noop,getPromise:function(){if(!this.promise){var e=this;this.promise=t(function(t,n){e.done(function(e){!1===e?n():t()})})}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},catch:function(e){return this.getPromise().catch(e)},finally:function(e){return this.getPromise().finally(e)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(e){var t=this;0===t._state&&(t._state=1,t._runInAnimationFrame(function(){t._resolve(e)}))},_resolve:function(t){2!==this._state&&(T(this._doneCallbacks,function(e){e(t)}),this._doneCallbacks.length=0,this._state=2)}},e.all=function(t,n){var r=0,i=!0;function a(e){i=i&&e,++r===t.length&&n(i)}T(t,function(e){e.done(a)})},e}];function I(e){return e.replace(/-[a-z]/g,function(e){return e.charAt(1).toUpperCase()})}ie.module("material.core.animate",[]).factory("$$forceReflow",["$document",function(e){return function(){return e[0].body.clientWidth+1}}]).factory("$$AnimateRunner",e).factory("$$rAFMutex",["$$rAF",function(n){return function(){var t=!1;return n(function(){t=!0}),function(e){t?e():n(e)}}}]).factory("$animateCss",["$window","$$rAF","$$AnimateRunner","$$forceReflow","$$jqLite","$timeout","$animate",function(p,a,o,m,n,g,s){function _(e,t){t.addClass&&(n.addClass(e,t.addClass),t.addClass=null),t.removeClass&&(n.removeClass(e,t.removeClass),t.removeClass=null)}function b(e){var t=0,n=(e||"").split(/\s*,\s*/);return T(n,function(e){"s"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e=parseFloat(e)||0,t=t?Math.max(e,t):e}),t}var v,y=[];function w(e,t){t.from&&(e.css(t.from),t.from=null)}function C(e,t){t.to&&(e.css(t.to),t.to=null)}function A(e){for(var t=0;t<e.length;t++)if(1===e[t].nodeType)return e[t]}function S(e,t){var n=A(e),r=I(k+"transition-delay");n.style[r]=t?"-9999s":""}return function(r,c){var l=[],u=A(r),e=u&&s.enabled(),t=!1,n=!1;e&&(c.transitionStyle&&l.push([k+"transition",c.transitionStyle]),c.keyframeStyle&&l.push([k+"animation",c.keyframeStyle]),c.delay&&l.push([k+"transition-delay",c.delay+"s"]),c.duration&&l.push([k+"transition-duration",c.duration+"s"]),t=c.keyframeStyle||c.to&&(0<c.duration||c.transitionStyle),n=!!c.addClass||!!c.removeClass,S(r,!0));var f=e&&(t||n);w(r,c);var d,h,i=!1;return{close:p.close,start:function(){var e,n=new o;return e=function(){if(S(r,!1),!f)return s();T(l,function(e){var t=e[0],n=e[1];u.style[I(t)]=n}),_(r,c);var e=function(e){var t=A(e),n=p.getComputedStyle(t),r=b(n[l("transitionDuration")]),i=b(n[l("animationDuration")]),a=b(n[l("transitionDelay")]),o=b(n[l("animationDelay")]);i*=parseInt(n[l("animationIterationCount")],10)||1;var s=Math.max(i,r),c=Math.max(o,a);return{duration:s,delay:c,animationDuration:i,transitionDuration:r,animationDelay:o,transitionDelay:a};function l(e){return x?"Webkit"+e.charAt(0).toUpperCase()+e.substr(1):e}}(r);if(0===e.duration)return s();var t=[];c.easing&&(e.transitionDuration&&t.push([k+"transition-timing-function",c.easing]),e.animationDuration&&t.push([k+"animation-timing-function",c.easing])),c.delay&&e.animationDelay&&t.push([k+"animation-delay",c.delay+"s"]),c.duration&&e.animationDuration&&t.push([k+"animation-duration",c.duration+"s"]),T(t,function(e){var t=e[0],n=e[1];u.style[I(t)]=n,l.push(e)});var i=1e3*e.delay,a=e.duration,n=1e3*a,o=Date.now();d=[],e.transitionDuration&&d.push(E),e.animationDuration&&d.push(D),d=d.join(" "),h=function(e){e.stopPropagation();var t=e.originalEvent||e,n=t.timeStamp||Date.now(),r=parseFloat(t.elapsedTime.toFixed(3));Math.max(n-o,0)>=i&&a<=r&&s()},r.on(d,h),C(r,c),g(s,i+1.5*n,!1)},v&&v(),y.push(e),v=a(function(){v=null;for(var e=m(),t=0;t<y.length;t++)y[t](e);y.length=0}),n;function s(){var e,t;if(!i)return i=!0,d&&h&&r.off(d,h),_(r,c),w(e=r,t=c),C(e,t),T(l,function(e){u.style[I(e[0])]=""}),n.complete(!0),n}}}}}])}(),ie.module("material.components.autocomplete",["material.core","material.components.icon","material.components.virtualRepeat"]),ie.module("material.components.backdrop",["material.core"]).directive("mdBackdrop",["$mdTheming","$mdUtil","$animate","$rootElement","$window","$log","$$rAF","$document",function(s,c,t,n,l,u,f,d){return{restrict:"E",link:function(r,i,e){var a;function o(){var e=parseInt(a.height,10)+Math.abs(parseInt(a.top,10));i.css("height",e+"px")}t.pin&&t.pin(i,n),f(function(){if("fixed"===(a=l.getComputedStyle(d[0].body)).position){var e=c.debounce(function(){a=l.getComputedStyle(d[0].body),o()},60,null,!1);o(),ie.element(l).on("resize",e),r.$on("$destroy",function(){ie.element(l).off("resize",e)})}var t=i.parent();if(t.length){"BODY"===t[0].nodeName&&i.css("position","fixed");var n=l.getComputedStyle(t[0]);"static"===n.position&&u.warn("<md-backdrop> may not work properly in a scrolled, static-positioned parent container."),s.inherit(i,t)}})}}}]),function(){function e(n){return{restrict:"E",link:function(e,t){t.addClass("_md"),e.$on("$destroy",function(){n.destroy()})}}}function t(e){t.$inject=["$animate","$mdConstant","$mdUtil","$mdTheming","$mdBottomSheet","$rootElement","$mdGesture","$log"];var m=.5,g=80;return e("$mdBottomSheet").setDefaults({methods:["disableParentScroll","escapeToClose","clickOutsideToClose"],options:t});function t(a,o,s,c,l,u,f,d){var h;return{themable:!0,onShow:function(e,t,n,r){if((t=s.extractElementByName(t,"md-bottom-sheet")).attr("tabindex","-1"),t.hasClass("ng-cloak")){d.warn("$mdBottomSheet: using `<md-bottom-sheet ng-cloak >` will affect the bottom-sheet opening animations.",t[0])}n.disableBackdrop||((h=s.createBackdrop(e,"md-bottom-sheet-backdrop md-opaque"))[0].tabIndex=-1,n.clickOutsideToClose&&h.on("click",function(){s.nextTick(l.cancel,!0)}),c.inherit(h,n.parent),a.enter(h,n.parent,null));var i=new p(t,n.parent);n.bottomSheet=i,c.inherit(i.element,n.parent),n.disableParentScroll&&(n.restoreScroll=s.disableScrollAround(i.element,n.parent));return a.enter(i.element,n.parent,h).then(function(){var e=s.findFocusTarget(t)||ie.element(t[0].querySelector("button")||t[0].querySelector("a")||t[0].querySelector(s.prefixer("ng-click",!0)))||h;n.escapeToClose&&(n.rootElementKeyupCallback=function(e){e.keyCode===o.KEY_CODE.ESCAPE&&s.nextTick(l.cancel,!0)},u.on("keyup",n.rootElementKeyupCallback),e&&e.focus())})},onRemove:function(e,t,n){var r=n.bottomSheet;n.disableBackdrop||a.leave(h);return a.leave(r.element).then(function(){n.disableParentScroll&&(n.restoreScroll(),delete n.restoreScroll),r.cleanup()})},disableBackdrop:!1,escapeToClose:!0,clickOutsideToClose:!0,disableParentScroll:!0};function p(r,e){var t=f.register(e,"drag",{horizontal:!1});return e.on("$md.dragstart",n).on("$md.drag",i).on("$md.dragend",a),{element:r,cleanup:function(){t(),e.off("$md.dragstart",n),e.off("$md.drag",i),e.off("$md.dragend",a)}};function n(e){r.css(o.CSS.TRANSITION_DURATION,"0ms")}function i(e){var t=e.pointer.distanceY;t<5&&(t=Math.max(-g,t/2)),r.css(o.CSS.TRANSFORM,"translate3d(0,"+(g+t)+"px,0)")}function a(e){if(0<e.pointer.distanceY&&(20<e.pointer.distanceY||Math.abs(e.pointer.velocityY)>m)){var t=r.prop("offsetHeight")-e.pointer.distanceY,n=Math.min(t/e.pointer.velocityY*.75,500);r.css(o.CSS.TRANSITION_DURATION,n+"ms"),s.nextTick(l.cancel,!0)}else r.css(o.CSS.TRANSITION_DURATION,""),r.css(o.CSS.TRANSFORM,"")}}}}e.$inject=["$mdBottomSheet"],t.$inject=["$$interimElementProvider"],ie.module("material.components.bottomSheet",["material.core","material.components.backdrop"]).directive("mdBottomSheet",e).provider("$mdBottomSheet",t)}(),function(){function e(n){return{restrict:"E",link:function(e,t){n(t)}}}function t(r,i,a,o){return{restrict:"EA",replace:!0,transclude:!0,template:function(e,t){{if(s(t))return'<a class="md-button" ng-transclude></a>';var n=void 0===t.type?"button":t.type;return'<button class="md-button" type="'+n+'" ng-transclude></button>'}},link:function(e,t,n){i(t),r.attach(e,t),a.expectWithoutText(t,"aria-label"),s(n)&&ie.isDefined(n.ngDisabled)&&e.$watch(n.ngDisabled,function(e){t.attr("tabindex",e?-1:0)});t.on("click",function(e){!0===n.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),t.hasClass("md-no-focus")||(e.mouseActive=!1,t.on("mousedown",function(){e.mouseActive=!0,o(function(){e.mouseActive=!1},100)}).on("focus",function(){!1===e.mouseActive&&t.addClass("md-focused")}).on("blur",function(e){t.removeClass("md-focused")}))}};function s(e){return ie.isDefined(e.href)||ie.isDefined(e.ngHref)||ie.isDefined(e.ngLink)||ie.isDefined(e.uiSref)}}t.$inject=["$mdButtonInkRipple","$mdTheming","$mdAria","$timeout"],e.$inject=["$mdTheming"],ie.module("material.components.button",["material.core"]).directive("mdButton",t).directive("a",e)}(),function(){function e(r){return{restrict:"E",link:function(e,t,n){t.addClass("_md"),r(t)}}}e.$inject=["$mdTheming"],ie.module("material.components.card",["material.core"]).directive("mdCard",e)}(),ie.module("material.components.chips",["material.core","material.components.autocomplete"]),function(){function e(u,f,d,h,p,m){return u=u[0],{restrict:"E",transclude:!0,require:"?ngModel",priority:210,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-icon"></div></div><div ng-transclude class="md-label"></div>',compile:function(e,t){return t.$set("tabindex",t.tabindex||"0"),t.$set("type","checkbox"),t.$set("role",t.type),{pre:function(e,t){t.on("click",function(e){this.hasAttribute("disabled")&&e.stopImmediatePropagation()})},post:function(e,n,r,i){var t,a,o,s;function c(t){n[0].hasAttribute("disabled")||e.skipToggle||e.$apply(function(){var e=r.ngChecked?r.checked:!i.$viewValue;i.$setViewValue(e,t&&t.type),i.$render()})}function l(e){(t=!1!==e)&&n.attr("aria-checked","mixed"),n.toggleClass("md-indeterminate",t)}i=i||p.fakeNgModel(),h(n),n.children().on("focus",function(){n.focus()}),p.parseAttributeBoolean(r.mdIndeterminate)&&(l(),e.$watch(r.mdIndeterminate,l)),r.ngChecked&&e.$watch(e.$eval.bind(e,r.ngChecked),function(e){i.$setViewValue(e),i.$render()}),a="ngDisabled",o="tabindex",s={true:"-1",false:r.tabindex},r[a]&&e.$watch(r[a],function(e){s[e]&&n.attr(o,s[e])}),f.expectWithText(n,"aria-label"),u.link.pre(e,{on:ie.noop,0:{}},r,[i]),e.mouseActive=!1,n.on("click",c).on("keypress",function(e){var t=e.which||e.keyCode;t!==d.KEY_CODE.SPACE&&t!==d.KEY_CODE.ENTER||(e.preventDefault(),n.addClass("md-focused"),c(e))}).on("mousedown",function(){e.mouseActive=!0,m(function(){e.mouseActive=!1},100)}).on("focus",function(){!1===e.mouseActive&&n.addClass("md-focused")}).on("blur",function(){n.removeClass("md-focused")}),i.$render=function(){n.toggleClass("md-checked",!!i.$viewValue&&!t)}}}}}}e.$inject=["inputDirective","$mdAria","$mdConstant","$mdTheming","$mdUtil","$timeout"],ie.module("material.components.checkbox",["material.core"]).directive("mdCheckbox",e)}(),function(){t.$inject=["$mdColors","$mdUtil","$log","$parse"],e.$inject=["$mdTheming","$mdUtil","$log"];var o=/^{((\s|,)*?["'a-zA-Z-]+?\s*?:\s*?('|")[a-zA-Z0-9-.]*('|"))+\s*}$/,l=null;function e(a,o,r){return l=l||Object.keys(a.PALETTES),{applyThemeColors:function(e,t){try{t&&e.css((i={},a=(n=t).hasOwnProperty("color"),ie.forEach(n,function(e,t){var n=c(e),r=-1<t.indexOf("background");i[t]=s(n),r&&!a&&(i.color=s(n,!0))}),i))}catch(e){r.error(e.message)}var n,i,a},getThemeColor:function(e){return s(c(e))},hasTheme:function(e){return ie.isDefined(a.THEMES[e.split("-")[0]])}};function s(e,t){t=t||!1;var n=a.PALETTES[e.palette][e.hue];return n=t?n.contrast:n.value,o.supplant("rgba({0}, {1}, {2}, {3})",[n[0],n[1],n[2],n[3]||e.opacity])}function c(e){var t=e.split("-"),n=ie.isDefined(a.THEMES[t[0]])?t.splice(0,1)[0]:a.defaultTheme();return{theme:n,palette:function(e,t){var n=1<e.length&&-1!==l.indexOf(e[1]),r=e[0].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if(n&&(r=e[0]+"-"+e.splice(1,1)),-1===l.indexOf(r)){var i=a.THEMES[t].colors[r];if(!i)throw new Error(o.supplant("mdColors: couldn't find '{palette}' in the palettes.",{palette:r}));r=i.name}return r}(t,n),hue:function(e,t){var n=a.THEMES[t].colors;if("hue"!==e[1])return e[1]||n[e[0]in n?e[0]:"primary"].hues.default;var r=parseInt(e.splice(2,1)[0],10);if(r<1||3<r)throw new Error(o.supplant("mdColors: 'hue-{hueNumber}' is not a valid hue, can be only 'hue-1', 'hue-2' and 'hue-3'",{hueNumber:r}));if(e[1]="hue-"+r,e[0]in n)return n[e[0]].hues[e[1]];throw new Error(o.supplant("mdColors: 'hue-x' can only be used with [{availableThemes}], but was used with '{usedTheme}'",{availableThemes:Object.keys(n).join(", "),usedTheme:e[0]}))}(t,n),opacity:t[2]||1}}}function t(u,a,f,d){return{restrict:"A",require:["^?mdTheme"],compile:function(e,i){var l=function(){var e=i.mdColors,t=-1<e.indexOf("::"),n=!!t||o.test(i.mdColors);i.mdColors=e.replace("::","");var r=ie.isDefined(i.mdColorsWatch);return!t&&!n&&(!r||a.parseAttributeBoolean(i.mdColorsWatch))}();return function(e,n,t,r){var i=r[0],a={},o=function(n){"string"!=typeof n&&(n=""),t.mdColors||(t.mdColors="{}");var r=d(t.mdColors)(e);return i&&Object.keys(r).forEach(function(e){var t=r[e];u.hasTheme(t)||(r[e]=(n||i.$mdTheme)+"-"+t)}),s(r),r},s=function(e){if(!ie.equals(e,a)){var t=Object.keys(a);a.background&&!t.color&&t.push("color"),t.forEach(function(e){n.css(e,"")})}a=e},c=ie.noop;i&&(c=i.registerChanges(function(e){u.applyThemeColors(n,o(e))})),e.$on("$destroy",function(){c()});try{l?e.$watch(o,ie.bind(this,u.applyThemeColors,n),!0):u.applyThemeColors(n,o())}catch(e){f.error(e.message)}}}}}ie.module("material.components.colors",["material.core"]).directive("mdColors",t).service("$mdColors",e)}(),function(){function e(r){return{restrict:"E",controller:["$scope","$element",function(e,t){this.$scope=e,this.$element=t}],link:function(e,t){var n;t.addClass("_md"),r(t),e.$broadcast("$mdContentLoaded",t),n=t[0],ie.element(n).on("$md.pressdown",function(e){"t"===e.pointer.type&&(e.$materialScrollFixed||(e.$materialScrollFixed=!0,0===n.scrollTop?n.scrollTop=1:n.scrollHeight===n.scrollTop+n.offsetHeight&&(n.scrollTop-=1)))})}}}e.$inject=["$mdTheming"],ie.module("material.components.content",["material.core"]).directive("mdContent",e)}(),ie.module("material.components.datepicker",["material.core","material.components.icon","material.components.virtualRepeat"]),function(){function e(e,t,a){return{restrict:"E",link:function(r,i){i.addClass("_md"),t(i),e(function(){var e,t=i[0].querySelector("md-dialog-content");function n(){i.toggleClass("md-content-overflow",t.scrollHeight>t.clientHeight)}t&&(e=t.getElementsByTagName("img"),n(),ie.element(e).on("load",n)),r.$on("$destroy",function(){a.destroy(i)})})}}}function t(e){var v,y;return t.$inject=["$mdDialog","$mdConstant"],n.$inject=["$mdDialog","$mdAria","$mdUtil","$mdConstant","$animate","$document","$window","$rootElement","$log","$injector","$mdTheming"],e("$mdDialog").setDefaults({methods:["disableParentScroll","hasBackdrop","clickOutsideToClose","escapeToClose","targetEvent","closeTo","openFrom","parent","fullscreen","contentElement"],options:n}).addPreset("alert",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","theme","css"],options:t}).addPreset("confirm",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","cancel","theme","css"],options:t}).addPreset("prompt",{methods:["title","htmlContent","textContent","initialValue","content","placeholder","ariaLabel","ok","cancel","theme","css"],options:t});function t(t,n){return{template:['<md-dialog md-theme="{{ dialog.theme }}" aria-label="{{ dialog.ariaLabel }}" ng-class="dialog.css">','  <md-dialog-content class="md-dialog-content" role="document" tabIndex="-1">','    <h2 class="md-title">{{ dialog.title }}</h2>','    <div ng-if="::dialog.mdHtmlContent" class="md-dialog-content-body" ','        ng-bind-html="::dialog.mdHtmlContent"></div>','    <div ng-if="::!dialog.mdHtmlContent" class="md-dialog-content-body">',"      <p>{{::dialog.mdTextContent}}</p>","    </div>",'    <md-input-container md-no-float ng-if="::dialog.$type == \'prompt\'" class="md-prompt-input-container">','      <input ng-keypress="dialog.keypress($event)" md-autofocus ng-model="dialog.result"              placeholder="{{::dialog.placeholder}}">',"    </md-input-container>","  </md-dialog-content>","  <md-dialog-actions>",'    <md-button ng-if="dialog.$type === \'confirm\' || dialog.$type === \'prompt\'"               ng-click="dialog.abort()" class="md-primary md-cancel-button">',"      {{ dialog.cancel }}","    </md-button>",'    <md-button ng-click="dialog.hide()" class="md-primary md-confirm-button" md-autofocus="dialog.$type===\'alert\'">',"      {{ dialog.ok }}","    </md-button>","  </md-dialog-actions>","</md-dialog>"].join("").replace(/\s\s+/g,""),controller:function(){var e="prompt"==this.$type;e&&this.initialValue&&(this.result=this.initialValue),this.hide=function(){t.hide(!e||this.result)},this.abort=function(){t.cancel()},this.keypress=function(e){e.keyCode===n.KEY_CODE.ENTER&&t.hide(this.result)}},controllerAs:"dialog",bindToController:!0}}function n(d,c,h,p,l,u,m,f,g,i,n){return{hasBackdrop:!0,isolateScope:!0,onCompiling:function(e){(function(e){if(!e.theme&&(e.theme=n.defaultTheme(),e.targetEvent&&e.targetEvent.target)){var t=ie.element(e.targetEvent.target);e.theme=(t.controller("mdTheme")||{}).$mdTheme||e.theme}})(e),e.contentElement&&(e.restoreContentElement=function(e){var t=e.contentElement,n=null;n=ie.isString(t)?(t=document.querySelector(t),r(t)):(t=t[0]||t,document.contains(t)?r(t):function(){t.parentNode.removeChild(t)});return e.element=ie.element(t),e.skipCompile=!0,n;function r(e){var t=e.parentNode,n=e.nextElementSibling;return function(){n?t.insertBefore(e,n):t.appendChild(e)}}}(e))},onShow:function(e,n,t,r){ie.element(u[0].body).addClass("md-dialog-is-showing");var i=n.find("md-dialog");if(i.hasClass("ng-cloak")){g.warn("$mdDialog: using `<md-dialog ng-cloak >` will affect the dialog opening animations.",n[0])}return function(e){function t(e,t){var n=ie.element(e||{});if(n&&n.length){var r=ie.isFunction(n[0].getBoundingClientRect);return ie.extend(t||{},{element:r?n:ae,bounds:r?n[0].getBoundingClientRect():ie.extend({},{top:0,left:0,height:0,width:0},n[0]),focus:ie.bind(n,n.focus)})}}function n(e,t){return ie.isString(e)&&(e=u[0].querySelector(e)),ie.element(e||t)}e.origin=ie.extend({element:null,bounds:null,focus:ie.noop},e.origin||{}),e.parent=n(e.parent,f),e.closeTo=t(n(e.closeTo)),e.openFrom=t(n(e.openFrom)),e.targetEvent&&(e.origin=t(e.targetEvent.target,e.origin))}(t),function(e,t){var n="alert"===t.$type?"alertdialog":"dialog",r=e.find("md-dialog-content"),i=e.attr("id"),a="dialogContent_"+(i||h.nextUid());e.attr({role:n,tabIndex:"-1"}),0===r.length&&(r=e,i&&(a=i)),r.attr("id",a),e.attr("aria-describedby",a),t.ariaLabel?c.expect(e,"aria-label",t.ariaLabel):c.expectAsync(e,"aria-label",function(){var e=r.text().split(/\s+/);return 3<e.length&&(e=e.slice(0,3).concat("...")),e.join(" ")}),(v=document.createElement("div")).classList.add("md-dialog-focus-trap"),v.tabIndex=0,y=v.cloneNode(!1);var o=function(){e.focus()};v.addEventListener("focus",o),y.addEventListener("focus",o),e[0].parentNode.insertBefore(v,e[0]),e.after(y)}(i,t),a=e,o=n,s=t,s.disableParentScroll&&(s.restoreScroll=h.disableScrollAround(o,s.parent)),s.hasBackdrop&&(s.backdrop=h.createBackdrop(a,"md-dialog-backdrop md-opaque"),l.enter(s.backdrop,s.parent)),s.hideBackdrop=function(e){s.backdrop&&(e?s.backdrop.remove():l.leave(s.backdrop)),s.disableParentScroll&&(s.restoreScroll(),delete s.restoreScroll),s.hideBackdrop=null},function(e,t){var n=ie.element(m),r=h.debounce(function(){_(e,t)},60),i=[],a=function(){var e="alert"==t.$type?d.hide:d.cancel;h.nextTick(e,!0)};if(t.escapeToClose){var o=t.parent,s=function(e){e.keyCode===p.KEY_CODE.ESCAPE&&(e.stopPropagation(),e.preventDefault(),a())};e.on("keydown",s),o.on("keydown",s),i.push(function(){e.off("keydown",s),o.off("keydown",s)})}if(n.on("resize",r),i.push(function(){n.off("resize",r)}),t.clickOutsideToClose){var c,l=e,u=function(e){c=e.target},f=function(e){c===l[0]&&e.target===l[0]&&(e.stopPropagation(),e.preventDefault(),a())};l.on("mousedown",u),l.on("mouseup",f),i.push(function(){l.off("mousedown",u),l.off("mouseup",f)})}t.deactivateListeners=function(){i.forEach(function(e){e()}),t.deactivateListeners=null}}(n,t),function(e,t){t.parent.append(e),t.reverseContainerStretch=_(e,t);var n=e.find("md-dialog"),r=h.dom.animator,i=r.calculateZoomToOrigin,a={transitionInClass:"md-transition-in",transitionOutClass:"md-transition-out"},o=r.toTransformCss(i(n,t.openFrom||t.origin)),s=r.toTransformCss("");return n.toggleClass("md-dialog-fullscreen",!!t.fullscreen),r.translate3d(n,o,s,a).then(function(e){return t.reverseAnimate=function(){return delete t.reverseAnimate,t.closeTo?(a={transitionInClass:"md-transition-out",transitionOutClass:"md-transition-in"},o=s,s=r.toTransformCss(i(n,t.closeTo)),r.translate3d(n,o,s,a)):e(s=r.toTransformCss(i(n,t.origin)))},t.clearAnimate=function(){return delete t.clearAnimate,n.removeClass([a.transitionOutClass,a.transitionInClass].join(" ")),r.translate3d(n,s,r.toTransformCss(""),{})},!0})}(n,t).then(function(){!function(e,t){var r=!0;function i(e){for(;e.parentNode;){if(e===document.body)return;for(var t=e.parentNode.children,n=0;n<t.length;n++)e===t[n]||b(t[n],["SCRIPT","STYLE"])||t[n].setAttribute("aria-hidden",r);i(e=e.parentNode)}}i(e[0]),t.unlockScreenReader=function(){r=!1,i(e[0]),t.unlockScreenReader=null}}(n,t),n[0].querySelector(".md-actions")&&g.warn("Using a class of md-actions is deprecated, please use <md-dialog-actions>."),function(){if(t.focusOnOpen){var e=h.findFocusTarget(n)||function(){var e=n[0].querySelector(".dialog-close");if(!e){var t=n[0].querySelectorAll(".md-actions button, md-dialog-actions button");e=t[t.length-1]}return e}()||i;e.focus()}}()});var a,o,s},onShowing:function(e,t,n,r){if(r){if(r.mdHtmlContent=r.htmlContent||n.htmlContent||"",r.mdTextContent=r.textContent||n.textContent||r.content||n.content||"",r.mdHtmlContent&&!i.has("$sanitize"))throw Error("The ngSanitize module must be loaded in order to use htmlContent.");if(r.mdHtmlContent&&r.mdTextContent)throw Error("md-dialog cannot have both `htmlContent` and `textContent`")}},onRemove:function(e,t,n){n.deactivateListeners(),n.unlockScreenReader(),n.hideBackdrop(n.$destroy),v&&v.parentNode&&v.parentNode.removeChild(v);y&&y.parentNode&&y.parentNode.removeChild(y);return n.$destroy?i():(r=n,r.reverseAnimate().then(function(){r.contentElement&&r.clearAnimate()})).then(i);var r;function i(){ie.element(u[0].body).removeClass("md-dialog-is-showing"),n.contentElement?(n.reverseContainerStretch(),n.restoreContentElement()):t.remove(),n.$destroy||n.origin.focus()}},clickOutsideToClose:!1,escapeToClose:!0,targetEvent:null,contentElement:null,closeTo:null,openFrom:null,focusOnOpen:!0,disableParentScroll:!0,autoWrap:!0,fullscreen:!1,transformTemplate:function(e,t){return'<div class="md-dialog-container" tabindex="-1">'+(n=e,t.autoWrap&&!/<\/md-dialog>/g.test(n)?"<md-dialog>"+(n||"")+"</md-dialog>":n||"")+"</div>";var n}};function _(e,t){var n="fixed"==m.getComputedStyle(u[0].body).position,r=t.backdrop?m.getComputedStyle(t.backdrop[0]):null,i=r?Math.min(u[0].body.clientHeight,Math.ceil(Math.abs(parseInt(r.height,10)))):0,a={top:e.css("top"),height:e.css("height")};return e.css({top:(n?h.scrollTop(t.parent):0)+"px",height:i?i+"px":"100%"}),function(){e.css(a)}}function b(e,t){if(-1!==t.indexOf(e.nodeName))return!0}}}e.$inject=["$$rAF","$mdTheming","$mdDialog"],t.$inject=["$$interimElementProvider"],ie.module("material.components.dialog",["material.core","material.components.backdrop"]).directive("mdDialog",e).provider("$mdDialog",t)}(),function(){function e(e){return{restrict:"E",link:e}}e.$inject=["$mdTheming"],ie.module("material.components.divider",["material.core"]).directive("mdDivider",e)}(),function(){function e(r){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"],compile:function(e,t){var n=e.children();r.prefixer().hasAttribute(n,"ng-repeat")?n.addClass("md-fab-action-item"):n.wrap('<div class="md-fab-action-item">')}}}e.$inject=["$mdUtil"],ie.module("material.components.fabActions",["material.core"]).directive("mdFabActions",e)}(),function(){function e(e,r,i,a,o,s){var t,c,l,u=this;u.open=function(){e.$evalAsync("vm.isOpen = true")},u.close=function(){e.$evalAsync("vm.isOpen = false"),r.find("md-fab-trigger")[0].focus()},u.toggle=function(){e.$evalAsync("vm.isOpen = !vm.isOpen")},u.direction=u.direction||"down",u.isOpen=u.isOpen||!1,h(),r.addClass("md-animations-waiting"),t=["click","focusin","focusout"],ie.forEach(t,function(e){r.on(e,d)}),e.$on("$destroy",function(){ie.forEach(t,function(e){r.off(e,d)}),p()}),e.$watch("vm.direction",function(e,t){i.removeClass(r,"md-"+t),i.addClass(r,"md-"+e),h()}),e.$watch("vm.isOpen",function(e){h(),c&&l||(c=r.find("md-fab-trigger"),l=y()),e?(r.on("keydown",g),a.nextTick(function(){ie.element(document).on("click touchend",m)})):p();var t=e?"md-is-open":"",n=e?"":"md-is-open";c.attr("aria-haspopup",!0),c.attr("aria-expanded",e),l.attr("aria-hidden",!e),i.setClass(r,t,n)});var f,n=0;function d(e){var t,n,r;"click"==e.type&&(n=(t=e).target,a.getClosest(n,"md-fab-trigger")&&u.toggle(),r=t.target,a.getClosest(r,"md-fab-actions")&&u.close()),"focusout"!=e.type||f||(f=s(function(){u.close()},100,!1)),"focusin"==e.type&&f&&(s.cancel(f),f=null)}function h(){u.currentActionIndex=-1}function p(){r.off("keydown",g),ie.element(document).off("click touchend",m)}function m(e){if(e.target){var t=a.getClosest(e.target,"md-fab-trigger"),n=a.getClosest(e.target,"md-fab-actions");t||n||u.close()}}function g(e){switch(e.which){case o.KEY_CODE.ESCAPE:return u.close(),e.preventDefault(),!1;case o.KEY_CODE.LEFT_ARROW:return i=e,"left"===u.direction?b(i):_(i),!1;case o.KEY_CODE.UP_ARROW:return r=e,"down"===u.direction?_(r):b(r),!1;case o.KEY_CODE.RIGHT_ARROW:return n=e,"left"===u.direction?_(n):b(n),!1;case o.KEY_CODE.DOWN_ARROW:return t=e,"up"===u.direction?_(t):b(t),!1}var t,n,r,i}function _(e){v(e,-1)}function b(e){v(e,1)}function v(e,t){var n,r=(n=y()[0].querySelectorAll(".md-fab-action-item"),ie.forEach(n,function(e){ie.element(ie.element(e).children()[0]).attr("tabindex",-1)}),n);u.currentActionIndex=u.currentActionIndex+t,u.currentActionIndex=Math.min(r.length-1,u.currentActionIndex),u.currentActionIndex=Math.max(0,u.currentActionIndex);var i=ie.element(r[u.currentActionIndex]).children()[0];ie.element(i).attr("tabindex",0),i.focus(),e.preventDefault(),e.stopImmediatePropagation()}function y(){return r.find("md-fab-actions")}!function e(){0<r[0].scrollHeight?i.addClass(r,"_md-animations-ready").then(function(){r.removeClass("md-animations-waiting")}):n<10&&(s(e,100),n+=1)}()}e.$inject=["$scope","$element","$animate","$mdUtil","$mdConstant","$timeout"],ie.module("material.components.fabShared",["material.core"]).controller("MdFabController",e)}(),function(){e.$inject=["$timeout"],t.$inject=["$timeout"];var n=300;function e(t){function r(e){t(e,n,!1)}function i(e){if(!e.hasClass("md-animations-waiting")||e.hasClass("_md-animations-ready")){var t=e[0],c=e.controller("mdFabSpeedDial"),r=t.querySelectorAll(".md-fab-action-item"),l=t.querySelector("md-fab-trigger"),n=t.querySelector("._md-css-variables"),i=parseInt(G.getComputedStyle(n).zIndex);ie.forEach(r,function(e,t){var n=e.style;n.transform=n.webkitTransform="",n.transitionDelay="",n.opacity=1,n.zIndex=r.length-t+i}),l.style.zIndex=i+r.length+1,c.isOpen||ie.forEach(r,function(e,t){var n,r,i=e.style,a=(l.clientHeight-e.clientHeight)/2,o=(l.clientWidth-e.clientWidth)/2;switch(c.direction){case"up":n=e.scrollHeight*(t+1)+a,r="Y";break;case"down":n=-(e.scrollHeight*(t+1)+a),r="Y";break;case"left":n=e.scrollWidth*(t+1)+o,r="X";break;case"right":n=-(e.scrollWidth*(t+1)+o),r="X"}var s="translate"+r+"("+n+"px)";i.transform=i.webkitTransform=s})}}return{addClass:function(e,t,n){e.hasClass("md-fling")?(i(e),r(n)):n()},removeClass:function(e,t,n){i(e),r(n)}}}function t(t){function r(e){t(e,n,!1)}function i(e){var t=e[0],i=e.controller("mdFabSpeedDial"),a=t.querySelectorAll(".md-fab-action-item"),n=t.querySelector("._md-css-variables"),o=parseInt(G.getComputedStyle(n).zIndex);ie.forEach(a,function(e,t){var n=e.style,r=65*t;n.opacity=i.isOpen?1:0,n.transform=n.webkitTransform=i.isOpen?"scale(1)":"scale(0)",n.transitionDelay=(i.isOpen?r:a.length-r)+"ms",n.zIndex=a.length-t+o})}return{addClass:function(e,t,n){i(e),r(n)},removeClass:function(e,t,n){i(e),r(n)}}}ie.module("material.components.fabSpeedDial",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabSpeedDial",function(){return{restrict:"E",scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:function(e,t){t.prepend('<div class="_md-css-variables"></div>')}}}).animation(".md-fling",e).animation(".md-scale",t).service("mdFabSpeedDialFlingAnimation",e).service("mdFabSpeedDialScaleAnimation",t)}(),function(){function e(){function r(e,t,n){if(t){var r=e[0],i=e.controller("mdFabToolbar"),a=r.querySelector(".md-fab-toolbar-background"),o=r.querySelector("md-fab-trigger button"),s=r.querySelector("md-toolbar"),c=r.querySelector("md-fab-trigger button md-icon"),l=e.find("md-fab-actions").children();if(o&&a){var u=G.getComputedStyle(o).getPropertyValue("background-color"),f=r.offsetWidth,d=(r.offsetHeight,f/o.offsetWidth*2);a.style.backgroundColor=u,a.style.borderRadius=f+"px",i.isOpen?(s.style.pointerEvents="inherit",a.style.width=o.offsetWidth+"px",a.style.height=o.offsetHeight+"px",a.style.transform="scale("+d+")",a.style.transitionDelay="0ms",c&&(c.style.transitionDelay=".3s"),ie.forEach(l,function(e,t){e.style.transitionDelay=25*(l.length-t)+"ms"})):(s.style.pointerEvents="none",a.style.transform="scale(1)",a.style.top="0",e.hasClass("md-right")&&(a.style.left="0",a.style.right=null),e.hasClass("md-left")&&(a.style.right="0",a.style.left=null),a.style.transitionDelay="200ms",c&&(c.style.transitionDelay="0ms"),ie.forEach(l,function(e,t){e.style.transitionDelay=200+25*t+"ms"}))}}}return{addClass:function(e,t,n){r(e,t),n()},removeClass:function(e,t,n){r(e,t),n()}}}ie.module("material.components.fabToolbar",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabToolbar",function(){return{restrict:"E",transclude:!0,template:'<div class="md-fab-toolbar-wrapper">  <div class="md-fab-toolbar-content" ng-transclude></div></div>',scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:function(e,t,n){t.addClass("md-fab-toolbar"),t.find("md-fab-trigger").find("button").prepend('<div class="md-fab-toolbar-background"></div>')}}}).animation(".md-fab-toolbar",e).service("mdFabToolbarAnimation",e)}(),function(){function e(h,_,b,v){return{restrict:"E",controller:t,scope:{mdOnLayout:"&"},link:function(a,o,s,t){o.addClass("_md"),o.attr("role","list"),t.layoutDelegate=function(e){var r=[].filter.call(o.children(),function(e){return"MD-GRID-TILE"==e.tagName&&!e.$$mdDestroyed}),i={tileSpans:(t=r,[].map.call(t,function(e){var t=ie.element(e).controller("mdGridTile");return{row:parseInt(v.getResponsiveAttribute(t.$attrs,"md-rowspan"),10)||1,col:parseInt(v.getResponsiveAttribute(t.$attrs,"md-colspan"),10)||1}})),colCount:function(){var e=parseInt(v.getResponsiveAttribute(s,"md-cols"),10);if(isNaN(e))throw"md-grid-list: md-cols attribute was not found, or contained a non-numeric value";return e}(),rowMode:f(),rowHeight:function(){var e=v.getResponsiveAttribute(s,"md-row-height");if(!e)throw"md-grid-list: md-row-height attribute was not found";switch(f()){case"fixed":return d(e);case"ratio":var t=e.split(":");return parseFloat(t[0])/parseFloat(t[1]);case"fit":return 0}}(),gutter:d(v.getResponsiveAttribute(s,"md-gutter")||1)};var t;if(!e&&ie.equals(i,c))return;var n=b(i.colCount,i.tileSpans,r).map(function(e,n){return{grid:{element:o,style:function(e,t,n,r,i){var a={};switch(r){case"fixed":a.height=g({unit:i,span:t,gutter:n}),a.paddingBottom="";break;case"ratio":var o=1===e?0:(e-1)/e,s=1/e*100,c=s*(1/i),l=p({share:c,gutterShare:o,gutter:n});a.height="",a.paddingBottom=g({unit:l,span:t,gutter:n})}return a}(i.colCount,n,i.gutter,i.rowMode,i.rowHeight)},tiles:e.map(function(e,t){return{element:ie.element(r[t]),style:function(e,t,n,r,i,a,o){var s=1/n*100,c=(n-1)/n,l=p({share:s,gutterShare:c,gutter:i}),u={left:m({unit:l,offset:e.col,gutter:i}),width:g({unit:l,span:t.col,gutter:i}),paddingTop:"",marginTop:"",top:"",height:""};switch(a){case"fixed":u.top=m({unit:o,offset:e.row,gutter:i}),u.height=g({unit:o,span:t.row,gutter:i});break;case"ratio":var f=s/o,d=p({share:f,gutterShare:c,gutter:i});u.paddingTop=g({unit:d,span:t.row,gutter:i}),u.marginTop=m({unit:d,offset:e.row,gutter:i});break;case"fit":var h=(r-1)/r,f=1/r*100,d=p({share:f,gutterShare:h,gutter:i});u.top=m({unit:d,offset:e.row,gutter:i}),u.height=g({unit:d,span:t.row,gutter:i})}return u}(e.position,e.spans,i.colCount,n,i.gutter,i.rowMode,i.rowHeight)}})}}).reflow().performance();a.mdOnLayout({$event:{performance:n}}),c=i};var c,n=ie.bind(t,t.invalidateLayout),r=function(){for(var e in _.MEDIA)v(e),v.getQuery(_.MEDIA[e]).addListener(n);return v.watchResponsiveAttributes(["md-cols","md-row-height","md-gutter"],s,i)}();function i(e){null==e?t.invalidateLayout():v(e)&&t.invalidateLayout()}a.$on("$destroy",function(){for(var e in t.layoutDelegate=ie.noop,r(),_.MEDIA)v.getQuery(_.MEDIA[e]).removeListener(n)});var l=h.startSymbol(),u=h.endSymbol();function e(e){return l+e+u}var p=h(e("share")+"% - ("+e("gutter")+" * "+e("gutterShare")+")"),m=h("calc(("+e("unit")+" + "+e("gutter")+") * "+e("offset")+")"),g=h("calc(("+e("unit")+") * "+e("span")+" + ("+e("span")+" - 1) * "+e("gutter")+")");function f(){var e=v.getResponsiveAttribute(s,"md-row-height");if(!e)throw"md-grid-list: md-row-height attribute was not found";return"fit"==e?"fit":-1!==e.indexOf(":")?"ratio":"fixed"}function d(e){return/\D$/.test(e)?e:e+"px"}}}}function t(e){this.layoutInvalidated=!1,this.tilesInvalidated=!1,this.$timeout_=e.nextTick,this.layoutDelegate=ie.noop}function n(c){var l=t;return e.animateWith=function(e){l=ie.isFunction(e)?e:t},e;function e(e,t){var n,r,i,a,o,s;return a=c.time(function(){r=function(i,e){var a=0,o=0,s=function(){for(var e=[],t=0;t<i;t++)e.push(0);return e}();return{positioning:e.map(function(e,t){return{spans:e,position:function(e,t){if(e.col>i)throw"md-grid-list: Tile at position "+t+" has a colspan ("+e.col+") that exceeds the column count ("+i+")";var n=0,r=0;for(;r-n<e.col;)i<=a?c():-1!==(n=s.indexOf(0,a))&&-1!==(r=u(n+1))?a=r+1:(n=r=0,c());return l(n,e.col,e.row),a=n+e.col,{col:n,row:o}}(e,t)}}),rowCount:o+Math.max.apply(Math,s)};function c(){o++,l(a=0,i,-1)}function l(e,t,n){for(var r=e;r<e+t;r++)s[r]=Math.max(s[r]+n,0)}function u(e){var t;for(t=e;t<s.length;t++)if(0!==s[t])return t;if(t===s.length)return t}}(e,t)}),n={layoutInfo:function(){return r},map:function(t){return o=c.time(function(){var e=n.layoutInfo();i=t(e.positioning,e.rowCount)}),n},reflow:function(e){return s=c.time(function(){(e||l)(i.grid,i.tiles)}),n},performance:function(){return{tileCount:t.length,layoutTime:a,mapTime:o,reflowTime:s,totalTime:a+o+s}}}}function t(e,t){e.element.css(e.style),t.forEach(function(e){e.element.css(e.style)})}}function r(a){return{restrict:"E",require:"^mdGridList",template:"<figure ng-transclude></figure>",transclude:!0,scope:{},controller:["$attrs",function(e){this.$attrs=e}],link:function(e,t,n,r){t.attr("role","listitem");var i=a.watchResponsiveAttributes(["md-colspan","md-rowspan"],n,ie.bind(r,r.invalidateLayout));r.invalidateTiles(),e.$on("$destroy",function(){t[0].$$mdDestroyed=!0,i(),r.invalidateLayout()}),ie.isDefined(e.$parent.$index)&&e.$watch(function(){return e.$parent.$index},function(e,t){e!==t&&r.invalidateTiles()})}}}function i(){return{template:"<figcaption ng-transclude></figcaption>",transclude:!0}}t.$inject=["$mdUtil"],n.$inject=["$mdUtil"],e.$inject=["$interpolate","$mdConstant","$mdGridLayout","$mdMedia"],r.$inject=["$mdMedia"],ie.module("material.components.gridList",["material.core"]).directive("mdGridList",e).directive("mdGridTile",r).directive("mdGridTileFooter",i).directive("mdGridTileHeader",i).factory("$mdGridLayout",n),t.prototype={invalidateTiles:function(){this.tilesInvalidated=!0,this.invalidateLayout()},invalidateLayout:function(){this.layoutInvalidated||(this.layoutInvalidated=!0,this.$timeout_(ie.bind(this,this.layout)))},layout:function(){try{this.layoutDelegate(this.tilesInvalidated)}finally{this.layoutInvalidated=!1,this.tilesInvalidated=!1}}}}(),ie.module("material.components.icon",["material.core"]),function(){function e(r,a){t.$inject=["$scope","$element","$attrs","$animate"];var e=["INPUT","TEXTAREA","SELECT","MD-SELECT"],i=e.reduce(function(e,t){return e.concat(["md-icon ~ "+t,".md-icon ~ "+t])},[]).join(","),o=e.reduce(function(e,t){return e.concat([t+" ~ md-icon",t+" ~ .md-icon"])},[]).join(",");return{restrict:"E",compile:function(e){var t=e[0].querySelector(i),n=e[0].querySelector(o);t&&e.addClass("md-icon-left");n&&e.addClass("md-icon-right");return function(e,t){r(t)}},controller:t};function t(e,t,n,r){var i=this;i.isErrorGetter=n.mdIsError&&a(n.mdIsError),i.delegateClick=function(){i.input.focus()},i.element=t,i.setFocused=function(e){t.toggleClass("md-input-focused",!!e)},i.setHasValue=function(e){t.toggleClass("md-input-has-value",!!e)},i.setHasPlaceholder=function(e){t.toggleClass("md-input-has-placeholder",!!e)},i.setInvalid=function(e){e?r.addClass(t,"md-input-invalid"):r.removeClass(t,"md-input-invalid")},e.$watch(function(){return i.label&&i.input},function(e){e&&!i.label.attr("for")&&i.label.attr("for",i.input.attr("id"))})}}function t(_,b,l,v,y){return{restrict:"E",require:["^?mdInputContainer","?ngModel","?^form"],link:function(f,d,h,e){var p=e[0],m=!!e[1],g=e[1]||_.fakeNgModel(),t=e[2],n=ie.isDefined(h.readonly),r=_.parseAttributeBoolean(h.mdNoAsterisk),i=d[0].tagName.toLowerCase();if(!p)return;{if("hidden"===h.type)return void d.attr("aria-hidden","true");if(p.input){if(p.input[0].contains(d[0]))return;throw new Error("<md-input-container> can only have *one* <input>, <textarea> or <md-select> child element!")}}p.input=d,p.label&&h.$observe("required",function(e){p.label.toggleClass("md-required",e&&!r)});var a=ie.element('<div class="md-errors-spacer">');d.after(a),p.label||l.expect(d,"aria-label",h.placeholder);d.addClass("md-input"),d.attr("id")||d.attr("id","input_"+_.nextUid());"input"===i&&"number"===h.type&&h.min&&h.max&&!h.step?d.attr("step","any"):"textarea"===i&&function(){var t=!h.hasOwnProperty("mdNoAutogrow");if(function(){if(!h.hasOwnProperty("mdNoResize")){var e=ie.element('<div class="md-resize-handle"></div>'),t=!1,n=null,r=0,i=p.element,a=y.register(e,"drag",{horizontal:!1});d.wrap('<div class="md-resize-wrapper">').after(e),e.on("mousedown",o),i.on("$md.dragstart",s).on("$md.drag",c).on("$md.dragend",l),f.$on("$destroy",function(){e.off("mousedown",o).remove(),i.off("$md.dragstart",s).off("$md.drag",c).off("$md.dragend",l),a(),a=i=e=null})}function o(e){e.preventDefault(),t=!0,n=e.clientY,r=parseFloat(d.css("height"))||d.prop("offsetHeight")}function s(e){t&&(e.preventDefault(),u(),i.addClass("md-input-resized"))}function c(e){t&&d.css("height",r+(e.pointer.y-n)-_.scrollTop()+"px")}function l(e){t&&(t=!1,i.removeClass("md-input-resized"))}}(),!t)return;var a=h.hasOwnProperty("rows")?parseInt(h.rows):NaN,o=h.hasOwnProperty("maxRows")?parseInt(h.maxRows):NaN,n=f.$on("md-resize-textarea",r),s=null,c=d[0];v(function(){_.nextTick(r)},10,!1),d.on("input",r),m&&g.$formatters.push(i);a||d.attr("rows",1);function r(){d.attr("rows",1).css("height","auto").addClass("md-no-flex");var e,t,n=(e=c.offsetHeight,t=c.scrollHeight-e,e+Math.max(t,0));if(!s){var r=d[0].style.padding||"";s=d.css("padding",0).prop("offsetHeight"),d[0].style.padding=r}if(a&&s&&(n=Math.max(n,s*a)),o&&s){var i=s*o;i<n?(d.attr("md-no-autogrow",""),n=i):d.removeAttr("md-no-autogrow")}s&&d.attr("rows",Math.round(n/s)),d.css("height",n+"px").removeClass("md-no-flex")}function i(e){return _.nextTick(r),e}function u(){if(t&&(t=!1,ie.element(b).off("resize",r),n&&n(),d.attr("md-no-autogrow","").off("input",r),m)){var e=g.$formatters.indexOf(i);-1<e&&g.$formatters.splice(e,1)}}if(ie.element(b).on("resize",r),f.$on("$destroy",u),h.hasOwnProperty("mdDetectHidden")){var e=(l=!1,function(){var e=0===c.offsetHeight;!1===e&&!0===l&&r(),l=e});f.$watch(function(){return _.nextTick(e,!1),!0})}var l}();m||c();var o=p.isErrorGetter||function(){return g.$invalid&&(g.$touched||t&&t.$submitted)};f.$watch(o,p.setInvalid),h.ngValue&&h.$observe("value",c);g.$parsers.push(s),g.$formatters.push(s),d.on("input",c),n||d.on("focus",function(e){_.nextTick(function(){p.setFocused(!0)})}).on("blur",function(e){_.nextTick(function(){p.setFocused(!1),c()})});function s(e){return p.setHasValue(!g.$isEmpty(e)),e}function c(){p.setHasValue(0<d.val().length||(d[0].validity||{}).badInput)}f.$on("$destroy",function(){p.setFocused(!1),p.setHasValue(!1),p.input=null})}}}function n(u,f){return{restrict:"A",require:["ngModel","^mdInputContainer"],link:function(e,n,t,r){var i,a,o,s=r[0],c=r[1];function l(e){return a.parent&&a.text(String(n.val()||e||"").length+" / "+i),e}f.nextTick(function(){o=ie.element(c.element[0].querySelector(".md-errors-spacer")),a=ie.element('<div class="md-char-counter">'),o.append(a),t.$set("ngTrim","false"),s.$formatters.push(l),s.$viewChangeListeners.push(l),n.on("input keydown keyup",function(){l()}),e.$watch(t.mdMaxlength,function(e){i=e,ie.isNumber(e)&&0<e?(a.parent().length||u.enter(a,o),l()):u.leave(a)}),s.$validators["md-maxlength"]=function(e,t){return!ie.isNumber(i)||i<0||(e||n.val()||t||"").length<=i}})}}}function r(s){return{restrict:"A",require:"^^?mdInputContainer",priority:200,link:{pre:function(e,t,n,r){if(!r)return;var i=r.element.find("label"),a=r.element.attr("md-no-float");if(i&&i.length||""===a||e.$eval(a))return void r.setHasPlaceholder(!0);if("MD-SELECT"!=t[0].nodeName){var o=ie.element('<label ng-click="delegateClick()" tabindex="-1">'+n.placeholder+"</label>");n.$set("placeholder",null),r.element.addClass("md-icon-float").prepend(o),s(o)(e)}}}}}function i(o){return{restrict:"A",link:function(e,t,n){if("INPUT"!==t[0].nodeName&&"TEXTAREA"!==t[0].nodeName)return;var r=!1;function i(){o(function(){t[0].select(),r=!1},1,!(r=!0))}function a(e){r&&e.preventDefault()}t.on("focus",i).on("mouseup",a),e.$on("$destroy",function(){t.off("focus",i).off("mouseup",a)})}}}e.$inject=["$mdTheming","$parse"],t.$inject=["$mdUtil","$window","$mdAria","$timeout","$mdGesture"],n.$inject=["$animate","$mdUtil"],r.$inject=["$compile"],l.$inject=["$mdUtil"],i.$inject=["$timeout"],u.$inject=["$$AnimateRunner","$animateCss","$mdUtil"],f.$inject=["$$AnimateRunner","$animateCss","$mdUtil"],d.$inject=["$$AnimateRunner","$animateCss","$mdUtil"],ie.module("material.components.input",["material.core"]).directive("mdInputContainer",e).directive("label",function(){return{restrict:"E",require:"^?mdInputContainer",link:function(e,t,n,r){!r||n.mdNoFloat||t.hasClass("md-container-ignore")||(r.label=t,e.$on("$destroy",function(){r.label=null}))}}}).directive("input",t).directive("textarea",t).directive("mdMaxlength",n).directive("placeholder",r).directive("ngMessages",function(){return{restrict:"EA",link:function(e,t,n,r){if(!r)return;t.toggleClass("md-input-messages-animation",!0),t.toggleClass("md-auto-hide",!0),("false"==n.mdAutoHide||(i=n,c.some(function(e){return i[e]})))&&t.toggleClass("md-auto-hide",!1);var i},require:"^^?mdInputContainer"}}).directive("ngMessage",l).directive("ngMessageExp",l).directive("mdSelectOnFocus",i).animation(".md-input-invalid",u).animation(".md-input-messages-animation",f).animation(".md-input-message-animation",d).service("mdInputInvalidAnimation",u).service("mdInputMessagesAnimation",f).service("mdInputMessageAnimation",d);var a,o,s,c=["ngIf","ngShow","ngHide","ngSwitchWhen","ngSwitchDefault"];function l(t){return{restrict:"EA",compile:function(n){if(r(n))i(n);else if(function(){var e=n[0];for(;e=e.parentNode;)if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!0;return!1}())return function(e,t){r(t)&&i(n)};function r(e){return!!t.getClosest(e,"md-input-container")}function i(e){e.toggleClass("md-input-message-animation",!0)}},priority:100}}function u(e,t,n){return b(e,t,n),{addClass:function(e,t,n){h(e,n)}}}function f(e,t,n){return b(e,t,n),{enter:function(e,t){h(e,t)},leave:function(e,t){p(e,t)},addClass:function(e,t,n){"ng-hide"==t?p(e,n):n()},removeClass:function(e,t,n){"ng-hide"==t?h(e,n):n()}}}function d(e,t,n){return b(e,t,n),{enter:function(e,t){m(e).start().done(t)},leave:function(e,t){g(e).start().done(t)}}}function h(e,t){var n,r=[],i=_(e);ie.forEach(i.children(),function(e){n=m(ie.element(e)),r.push(n.start())}),a.all(r,t)}function p(e,t){var n,r=[],i=_(e);ie.forEach(i.children(),function(e){n=g(ie.element(e)),r.push(n.start())}),a.all(r,t)}function m(e){var t=parseInt(G.getComputedStyle(e[0]).height),n=parseInt(G.getComputedStyle(e[0]).marginTop),r=_(e),i=e.controller("mdInputContainer").element;return-t<n||r.hasClass("md-auto-hide")&&!i.hasClass("md-input-invalid")?o(e,{}):o(e,{event:"enter",structural:!0,from:{opacity:0,"margin-top":-t+"px"},to:{opacity:1,"margin-top":"0"},duration:.3})}function g(e){var t=e[0].offsetHeight;return 0==G.getComputedStyle(e[0]).opacity?o(e,{}):o(e,{event:"leave",structural:!0,from:{opacity:1,"margin-top":0},to:{opacity:0,"margin-top":-t+"px"},duration:.3})}function _(e){return e.hasClass("md-input-message-animation")?ie.element(s.getClosest(e,function(e){return e.classList.contains("md-input-messages-animation")})):ie.element(e[0].querySelector(".md-input-messages-animation"))}function b(e,t,n){a=e,o=t,s=n}}(),function(){function e(t){return{restrict:"E",compile:function(e){return e[0].setAttribute("role","list"),t}}}function t(d,h,p,m){var g=["md-checkbox","md-switch","md-menu"];return{restrict:"E",controller:"MdListController",compile:function(a,o){var e,i,t,n=a[0].querySelectorAll(".md-secondary"),r=a;if(a[0].setAttribute("role","listitem"),o.ngClick||o.ngDblclick||o.ngHref||o.href||o.uiSref||o.ngAttrUiSref)l("button");else{for(var s,c=0;s=g[c];++c)if(i=a[0].querySelector(s)){e=!0;break}e?l("div"):a[0].querySelector("md-button:not(.md-secondary):not(.md-exclude)")||a.addClass("md-no-proxy")}function l(e){if("div"==e)(r=ie.element('<div class="md-no-style md-list-item-inner">')).append(a.contents()),a.addClass("md-proxy-focus");else{r=ie.element('<div class="md-button md-no-style">   <div class="md-list-item-inner"></div></div>');var t=ie.element('<md-button class="md-no-style"></md-button>');t[0].setAttribute("aria-label",a[0].textContent),u(a[0],t[0]),a.hasClass("md-no-focus")&&t.addClass("md-no-focus"),r.prepend(t),r.children().eq(1).append(a.contents()),a.addClass("_md-button-wrap")}a[0].setAttribute("tabindex","-1"),a.append(r)}function u(t,n,e){var r=p.prefixer(["ng-if","ng-click","ng-dblclick","aria-label","ng-disabled","ui-sref","href","ng-href","target","ng-attr-ui-sref","ui-sref-opts"]);e&&(r=r.concat(p.prefixer(e))),ie.forEach(r,function(e){t.hasAttribute(e)&&(n.setAttribute(e,t.getAttribute(e)),t.removeAttribute(e))})}function f(e){for(var t=e.attributes,n=0;n<t.length;n++)if("ngClick"===o.$normalize(t[n].name))return!0;return!1}return t=ie.element('<div class="md-secondary-container">'),ie.forEach(n,function(e){!function(e,t){if(e&&("MD-BUTTON"!=(r=e.nodeName.toUpperCase())&&"BUTTON"!=r)&&e.hasAttribute("ng-click")){d.expect(e,"aria-label");var n=ie.element('<md-button class="md-secondary md-icon-button">');u(e,n[0],["ng-if","ng-hide","ng-show"]),e.setAttribute("tabindex","-1"),n.append(e),e=n[0]}var r,i;!e||f(e)&&(o.ngClick||(i=e,-1==g.indexOf(i.nodeName.toLowerCase())))||ie.element(e).removeClass("md-secondary"),a.addClass("md-with-secondary"),t.append(e)}(e,t)}),r.append(t),function(){for(var e,t,n=["md-switch","md-checkbox"],r=0;t=n[r];++r)if((e=a.find(t)[0])&&!e.hasAttribute("aria-label")){var i=a.find("p")[0];if(!i)return;e.setAttribute("aria-label","Toggle "+i.textContent)}}(),e&&"MD-MENU"===i.nodeName&&function(){var e=ie.element(i),t=e.parent().hasClass("md-secondary-container")||i.parentNode.firstElementChild!==i,n="left";t&&(n="right");e.attr("md-position-mode")||e.attr("md-position-mode",n+" target");var r=e.children().eq(0);f(r[0])||r.attr("ng-click","$mdOpenMenu($event)");r.attr("aria-label")||r.attr("aria-label","Open List Menu")}(),function(e,i,t,n){i.addClass("_md");var r=[],a=i[0].firstElementChild,o=i.hasClass("_md-button-wrap")?a.firstElementChild:a,s=o&&f(o);a&&a.children&&!s&&ie.forEach(g,function(e){ie.forEach(a.querySelectorAll(e+":not(.md-secondary)"),function(e){r.push(e)})}),(1==r.length||s)&&(i.addClass("md-clickable"),s||n.attachRipple(e,ie.element(i[0].querySelector(".md-no-style")))),i.hasClass("md-proxy-focus")&&r.length&&ie.forEach(r,function(t){t=ie.element(t),e.mouseActive=!1,t.on("mousedown",function(){e.mouseActive=!0,m(function(){e.mouseActive=!1},100)}).on("focus",function(){!1===e.mouseActive&&i.addClass("md-focused"),t.on("blur",function e(){i.removeClass("md-focused"),t.off("blur",e)})})});var c=function(e){if("INPUT"!=e.target.nodeName&&"TEXTAREA"!=e.target.nodeName&&!e.target.isContentEditable){var t=e.which||e.keyCode;t==h.KEY_CODE.SPACE&&o&&(o.click(),e.preventDefault(),e.stopPropagation())}};s||r.length||o&&o.addEventListener("keypress",c);i.off("click"),i.off("keypress"),1==r.length&&o&&i.children().eq(0).on("click",function(t){if(!function(e){var t=["md-slider"];if(!e.path)return-1!==t.indexOf(e.target.tagName.toLowerCase());for(var n=e.path.indexOf(i.children()[0]),r=0;r<n;r++)if(-1!==t.indexOf(e.path[r].tagName.toLowerCase()))return!0}(t)){var e=p.getClosest(t.target,"BUTTON");!e&&o.contains(t.target)&&ie.forEach(r,function(e){t.target===e||e.contains(t.target)||("MD-MENU"===e.nodeName&&(e=e.children[0]),ie.element(e).triggerHandler("click"))})}});e.$on("$destroy",function(){o&&o.removeEventListener("keypress",c)})}}}}function n(e,t,n){this.attachRipple=function(e,t){n.attach(e,t,{})}}n.$inject=["$scope","$element","$mdListInkRipple"],e.$inject=["$mdTheming"],t.$inject=["$mdAria","$mdConstant","$mdUtil","$timeout"],ie.module("material.components.list",["material.core"]).controller("MdListController",n).directive("mdList",e).directive("mdListItem",t)}(),ie.module("material.components.menu",["material.core","material.components.backdrop"]),ie.module("material.components.menuBar",["material.core","material.components.icon","material.components.menu"]),function(){function e(i,a){return{restrict:"E",transclude:!0,controller:t,controllerAs:"ctrl",bindToController:!0,scope:{mdSelectedNavItem:"=?",navBarAriaLabel:"@?"},template:'<div class="md-nav-bar"><nav role="navigation"><ul class="_md-nav-bar-list" ng-transclude role="listbox"tabindex="0"ng-focus="ctrl.onFocus()"ng-blur="ctrl.onBlur()"ng-keydown="ctrl.onKeydown($event)"aria-label="{{ctrl.navBarAriaLabel}}"></ul></nav><md-nav-ink-bar></md-nav-ink-bar></div>',link:function(e,t,n,r){a(t),r.navBarAriaLabel||i.expectAsync(t,"aria-label",ie.noop)}}}function t(e,t,n,r){this._$timeout=n,this._$scope=t,this._$mdConstant=r,this.mdSelectedNavItem,this.navBarAriaLabel,this._navBarEl=e[0],this._inkbar;var i=this,a=this._$scope.$watch(function(){return i._navBarEl.querySelectorAll("._md-nav-button").length},function(e){0<e&&(i._initTabs(),a())})}function n(o){return{restrict:"E",require:["mdNavItem","^mdNavBar"],controller:r,bindToController:!0,controllerAs:"ctrl",replace:!0,transclude:!0,template:'<li class="md-nav-item" role="option" aria-selected="{{ctrl.isSelected()}}"><md-button ng-if="ctrl.mdNavSref" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ui-sref="{{ctrl.mdNavSref}}"><span ng-transclude class="_md-nav-button-text"></span></md-button><md-button ng-if="ctrl.mdNavHref" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ng-href="{{ctrl.mdNavHref}}"><span ng-transclude class="_md-nav-button-text"></span></md-button><md-button ng-if="ctrl.mdNavClick" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ng-click="ctrl.mdNavClick()"><span ng-transclude class="_md-nav-button-text"></span></md-button></li>',scope:{mdNavClick:"&?",mdNavHref:"@?",mdNavSref:"@?",name:"@"},link:function(e,t,n,r){var i=r[0],a=r[1];o(function(){i.name||(i.name=ie.element(t[0].querySelector("._md-nav-button-text")).text().trim()),ie.element(t[0].querySelector("._md-nav-button")).on("click",function(){a.mdSelectedNavItem=i.name,e.$apply()})})}}}function r(e){if(this._$element=e,this.mdNavClick,this.mdNavHref,this.name,this._selected=!1,this._focused=!1,1<(!!e.attr("md-nav-click")?1:0)+(!!e.attr("md-nav-href")?1:0)+(!!e.attr("md-nav-sref")?1:0))throw Error("Must specify exactly one of md-nav-click, md-nav-href, md-nav-sref for nav-item directive")}t.$inject=["$element","$scope","$timeout","$mdConstant"],n.$inject=["$$rAF"],r.$inject=["$element"],e.$inject=["$mdAria","$mdTheming"],ie.module("material.components.navBar",["material.core"]).controller("MdNavBarController",t).directive("mdNavBar",e).controller("MdNavItemController",r).directive("mdNavItem",n),t.prototype._initTabs=function(){this._inkbar=ie.element(this._navBarEl.getElementsByTagName("md-nav-ink-bar")[0]);var n=this;this._$timeout(function(){n._updateTabs(n.mdSelectedNavItem,ae)}),this._$scope.$watch("ctrl.mdSelectedNavItem",function(e,t){n._$timeout(function(){n._updateTabs(e,t)})})},t.prototype._updateTabs=function(e,t){var n=this,r=this._getTabs(),i=-1,a=-1,o=this._getTabByName(e),s=this._getTabByName(t);s&&(s.setSelected(!1),i=r.indexOf(s)),o&&(o.setSelected(!0),a=r.indexOf(o)),this._$timeout(function(){n._updateInkBarStyles(o,a,i)})},t.prototype._updateInkBarStyles=function(e,t,n){if(this._inkbar.toggleClass("_md-left",t<n).toggleClass("_md-right",n<t),this._inkbar.css({display:t<0?"none":""}),e){var r=e.getButtonEl(),i=r.offsetLeft;this._inkbar.css({left:i+"px",width:r.offsetWidth+"px"})}},t.prototype._getTabs=function(){return Array.prototype.slice.call(this._navBarEl.querySelectorAll(".md-nav-item")).map(function(e){return ie.element(e).controller("mdNavItem")})},t.prototype._getTabByName=function(t){return this._findTab(function(e){return e.getName()==t})},t.prototype._getSelectedTab=function(){return this._findTab(function(e){return e.isSelected()})},t.prototype.getFocusedTab=function(){return this._findTab(function(e){return e.hasFocus()})},t.prototype._findTab=function(e){for(var t=this._getTabs(),n=0;n<t.length;n++)if(e(t[n]))return t[n];return null},t.prototype.onFocus=function(){var e=this._getSelectedTab();e&&e.setFocused(!0)},t.prototype.onBlur=function(){var e=this.getFocusedTab();e&&e.setFocused(!1)},t.prototype._moveFocus=function(e,t){e.setFocused(!1),t.setFocused(!0)},t.prototype.onKeydown=function(e){var t=this._$mdConstant.KEY_CODE,n=this._getTabs(),r=this.getFocusedTab();if(r){var i=n.indexOf(r);switch(e.keyCode){case t.UP_ARROW:case t.LEFT_ARROW:0<i&&this._moveFocus(r,n[i-1]);break;case t.DOWN_ARROW:case t.RIGHT_ARROW:i<n.length-1&&this._moveFocus(r,n[i+1]);break;case t.SPACE:case t.ENTER:this._$timeout(function(){r.getButtonEl().click()})}}},r.prototype.getNgClassMap=function(){return{"md-active":this._selected,"md-primary":this._selected,"md-unselected":!this._selected,"md-focused":this._focused}},r.prototype.getName=function(){return this.name},r.prototype.getButtonEl=function(){return this._$element[0].querySelector("._md-nav-button")},r.prototype.setSelected=function(e){this._selected=e},r.prototype.isSelected=function(){return this._selected},r.prototype.setFocused=function(e){this._focused=e},r.prototype.hasFocus=function(){return this._focused}}(),function(){e.$inject=["$rootElement","$rootScope","$injector","$window"],ie.module("material.components.panel",["material.core","material.components.backdrop"]).service("$mdPanel",e);var i=80,a="_md-panel-hidden",n=ie.element('<div class="_md-panel-focus-trap" tabindex="0"></div>');function e(e,t,n,r){this._defaultConfigOptions={bindToController:!0,clickOutsideToClose:!1,disableParentScroll:!1,escapeToClose:!1,focusOnOpen:!0,fullscreen:!1,hasBackdrop:!1,propagateContainerEvents:!1,transformTemplate:ie.bind(this,this._wrapTemplate),trapFocus:!1,zIndex:i},this._config={},this._$rootElement=e,this._$rootScope=t,this._$injector=n,this._$window=r,this._trackedPanels={},this.animation=c.animation,this.xPosition=p.xPosition,this.yPosition=p.yPosition}function r(e,t){this._$q=t.get("$q"),this._$mdCompiler=t.get("$mdCompiler"),this._$mdConstant=t.get("$mdConstant"),this._$mdUtil=t.get("$mdUtil"),this._$rootScope=t.get("$rootScope"),this._$animate=t.get("$animate"),this._$mdPanel=t.get("$mdPanel"),this._$log=t.get("$log"),this._$window=t.get("$window"),this._$$rAF=t.get("$$rAF"),this.id=e.id,this.config=e,this.panelContainer,this.panelEl,this.isAttached=!1,this._removeListeners=[],this._topFocusTrap,this._bottomFocusTrap,this._backdropRef,this._restoreScroll=null}function p(e){this._$window=e.get("$window"),this._isRTL="rtl"===e.get("$mdUtil").bidi(),this._absolute=!1,this._relativeToEl,this._top="",this._bottom="",this._left="",this._right="",this._translateX=[],this._translateY=[],this._positions=[],this._actualPosition}function c(e){this._$mdUtil=e.get("$mdUtil"),this._openFrom,this._closeTo,this._animationClass=""}function o(e){var t=ie.isString(e)?document.querySelector(e):e;return ie.element(t)}e.prototype.create=function(e){if(e=e||{},ie.isDefined(e.id)&&this._trackedPanels[e.id])return this._trackedPanels[e.id];this._config={id:e.id||"panel_"+this._$injector.get("$mdUtil").nextUid(),scope:this._$rootScope.$new(!0),attachTo:this._$rootElement},ie.extend(this._config,this._defaultConfigOptions,e);var t=new r(this._config,this._$injector);return this._trackedPanels[e.id]=t},e.prototype.open=function(e){var t=this.create(e);return t.open().then(function(){return t})},e.prototype.newPanelPosition=function(){return new p(this._$injector)},e.prototype.newPanelAnimation=function(){return new c(this._$injector)},e.prototype._wrapTemplate=function(e){return'<div class="md-panel-outer-wrapper">  <div class="md-panel" style="left: -9999px;">'+(e||"")+"</div></div>"},r.prototype.open=function(){var i=this;return this._$q(function(e,t){var n=i._done(e,i),r=i._simpleBind(i.show,i);i.attach().then(r).then(n).catch(t)})},r.prototype.close=function(){var i=this;return this._$q(function(e,t){var n=i._done(e,i),r=i._simpleBind(i.detach,i);i.hide().then(r).then(n).catch(t)})},r.prototype.attach=function(){if(this.isAttached&&this.panelEl)return this._$q.when(this);var i=this;return this._$q(function(e,t){var n=i._done(e,i),r=i.config.onDomAdded||ie.noop;i._$q.all([i._createBackdrop(),i._createPanel().then(function(e){return i.isAttached=!0,i._addEventListeners(),e}).catch(t)]).then(r).then(n).catch(t)})},r.prototype.detach=function(){if(!this.isAttached)return this._$q.when(this);var r=this,i=r.config.onDomRemoved||ie.noop;return this._restoreScroll&&(this._restoreScroll(),this._restoreScroll=null),this._$q(function(e,t){var n=r._done(e,r);r._$q.all([(r._removeEventListeners(),r._topFocusTrap&&r._topFocusTrap.parentNode&&r._topFocusTrap.parentNode.removeChild(r._topFocusTrap),r._bottomFocusTrap&&r._bottomFocusTrap.parentNode&&r._bottomFocusTrap.parentNode.removeChild(r._bottomFocusTrap),r.panelContainer.remove(),r.isAttached=!1,r._$q.when(r)),!r._backdropRef||r._backdropRef.detach()]).then(i).then(n).catch(t)})},r.prototype.destroy=function(){this.config.scope.$destroy(),this.config.locals=null},r.prototype.show=function(){if(!this.panelContainer)return this._$q(function(e,t){t("Panel does not exist yet. Call open() or attach().")});if(!this.panelContainer.hasClass(a))return this._$q.when(this);var i=this;return this._$q(function(e,t){var n=i._done(e,i),r=i.config.onOpenComplete||ie.noop;i._$q.all([i._backdropRef?i._backdropRef.show():i,(i.panelContainer.removeClass(a),i._animateOpen()).then(function(){i._focusOnOpen()},t)]).then(r).then(n).catch(t)})},r.prototype.hide=function(){if(!this.panelContainer)return this._$q(function(e,t){t("Panel does not exist yet. Call open() or attach().")});if(this.panelContainer.hasClass(a))return this._$q.when(this);var i=this;return this._$q(function(e,t){var n=i._done(e,i),r=i.config.onRemoving||ie.noop;i._$q.all([i._backdropRef?i._backdropRef.hide():i,i._animateClose().then(r).then(function(){i.panelContainer.addClass(a)}).then(function(){var e=i.config.origin;e&&o(e).focus()}).catch(t)]).then(n,t)})},r.prototype.addClass=function(e,t){if(this._$log.warn("The addClass method is in the process of being deprecated. Full deprecation is scheduled for the Angular Material 1.2 release. To achieve the same results, use the panelContainer or panelEl JQLite elements that are referenced in MdPanelRef."),!this.panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");t||this.panelContainer.hasClass(e)?t&&!this.panelEl.hasClass(e)&&this.panelEl.addClass(e):this.panelContainer.addClass(e)},r.prototype.removeClass=function(e,t){if(this._$log.warn("The removeClass method is in the process of being deprecated. Full deprecation is scheduled for the Angular Material 1.2 release. To achieve the same results, use the panelContainer or panelEl JQLite elements that are referenced in MdPanelRef."),!this.panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");!t&&this.panelContainer.hasClass(e)?this.panelContainer.removeClass(e):t&&this.panelEl.hasClass(e)&&this.panelEl.removeClass(e)},r.prototype.toggleClass=function(e,t){if(this._$log.warn("The toggleClass method is in the process of being deprecated. Full deprecation is scheduled for the Angular Material 1.2 release. To achieve the same results, use the panelContainer or panelEl JQLite elements that are referenced in MdPanelRef."),!this.panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");t?this.panelEl.toggleClass(e):this.panelContainer.toggleClass(e)},r.prototype._createPanel=function(){var r=this;return this._$q(function(t,n){r.config.locals||(r.config.locals={}),(r.config.locals.mdPanelRef=r)._$mdCompiler.compile(r.config).then(function(e){r.panelContainer=e.link(r.config.scope),o(r.config.attachTo).append(r.panelContainer),r.config.disableParentScroll&&(r._restoreScroll=r._$mdUtil.disableScrollAround(null,r.panelContainer,{disableScrollMask:!0})),r.panelEl=ie.element(r.panelContainer[0].querySelector(".md-panel")),r.config.panelClass&&r.panelEl.addClass(r.config.panelClass),r.config.propagateContainerEvents&&r.panelContainer.css("pointer-events","none"),r._$animate.pin&&r._$animate.pin(r.panelContainer,o(r.config.attachTo)),r._configureTrapFocus(),r._addStyles().then(function(){t(r)},n)},n)})},r.prototype._addStyles=function(){var n=this;return this._$q(function(e){n.panelContainer.css("z-index",n.config.zIndex),n.panelEl.css("z-index",n.config.zIndex+1);var t=function(){n.panelEl.css("left",""),n.panelContainer.addClass(a),e(n)};if(n.config.fullscreen)return n.panelEl.addClass("_md-panel-fullscreen"),void t();n.config.position?n._$rootScope.$$postDigest(function(){n._updatePosition(!0),e(n)}):t()})},r.prototype.updatePosition=function(e){if(!this.panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");this.config.position=e,this._updatePosition()},r.prototype._updatePosition=function(e){var t=this.config.position;if(t){t._setPanelPosition(this.panelEl),e&&this.panelContainer.addClass(a),this.panelEl.css(p.absPosition.TOP,t.getTop()),this.panelEl.css(p.absPosition.BOTTOM,t.getBottom()),this.panelEl.css(p.absPosition.LEFT,t.getLeft()),this.panelEl.css(p.absPosition.RIGHT,t.getRight());var n=this._$mdConstant.CSS.TRANSFORM;this.panelEl.css(n,t.getTransform())}},r.prototype._focusOnOpen=function(){if(this.config.focusOnOpen){var e=this;this._$rootScope.$$postDigest(function(){(e._$mdUtil.findFocusTarget(e.panelEl)||e.panelEl).focus()})}},r.prototype._createBackdrop=function(){if(this.config.hasBackdrop){if(!this._backdropRef){var e={animation:this._$mdPanel.newPanelAnimation().openFrom(this.config.attachTo).withAnimation({open:"_md-opaque-enter",close:"_md-opaque-leave"}),attachTo:this.config.attachTo,focusOnOpen:!1,panelClass:"_md-panel-backdrop",zIndex:this.config.zIndex-1};this._backdropRef=this._$mdPanel.create(e)}if(!this._backdropRef.isAttached)return this._backdropRef.attach()}},r.prototype._addEventListeners=function(){this._configureEscapeToClose(),this._configureClickOutsideToClose(),this._configureScrollListener()},r.prototype._removeEventListeners=function(){this._removeListeners&&this._removeListeners.forEach(function(e){e()}),this._removeListeners=[]},r.prototype._configureEscapeToClose=function(){if(this.config.escapeToClose){var e=o(this.config.attachTo),t=this,n=function(e){e.keyCode===t._$mdConstant.KEY_CODE.ESCAPE&&(e.stopPropagation(),e.preventDefault(),t.close())};this.panelContainer.on("keydown",n),e.on("keydown",n),this._removeListeners.push(function(){t.panelContainer.off("keydown",n),e.off("keydown",n)})}},r.prototype._configureClickOutsideToClose=function(){if(this.config.clickOutsideToClose){var t,n=this.panelContainer,e=function(e){t=e.target},r=this,i=function(e){t===n[0]&&e.target===n[0]&&(e.stopPropagation(),e.preventDefault(),r.close())};n.on("mousedown",e),n.on("mouseup",i),this._removeListeners.push(function(){n.off("mousedown",e),n.off("mouseup",i)})}},r.prototype._configureScrollListener=function(){var e=ie.bind(this,this._updatePosition),t=this._$$rAF.throttle(e),n=this,r=function(){n.config.disableParentScroll||t()};this._$window.addEventListener("scroll",r,!0),this._removeListeners.push(function(){n._$window.removeEventListener("scroll",r,!0)})},r.prototype._configureTrapFocus=function(){if(this.panelEl.attr("tabIndex","-1"),this.config.trapFocus){var e=this.panelEl;this._topFocusTrap=n.clone()[0],this._bottomFocusTrap=n.clone()[0];var t=function(){e.focus()};this._topFocusTrap.addEventListener("focus",t),this._bottomFocusTrap.addEventListener("focus",t),this._removeListeners.push(this._simpleBind(function(){this._topFocusTrap.removeEventListener("focus",t),this._bottomFocusTrap.removeEventListener("focus",t)},this)),e[0].parentNode.insertBefore(this._topFocusTrap,e[0]),e.after(this._bottomFocusTrap)}},r.prototype._animateOpen=function(){this.panelContainer.addClass("md-panel-is-showing");var n=this.config.animation;if(!n)return this.panelContainer.addClass("_md-panel-shown"),this._$q.when(this);var r=this;return this._$q(function(e){var t=r._done(e,r);n.animateOpen(r.panelEl).then(t,function(){r._$log.warn("MdPanel Animations failed. Showing panel without animating."),t()})})},r.prototype._animateClose=function(){var n=this.config.animation;if(!n)return this.panelContainer.removeClass("md-panel-is-showing"),this.panelContainer.removeClass("_md-panel-shown"),this._$q.when(this);var r=this;return this._$q(function(e){var t=function(){r.panelContainer.removeClass("md-panel-is-showing"),e(r)};n.animateClose(r.panelEl).then(t,function(){r._$log.warn("MdPanel Animations failed. Hiding panel without animating."),t()})})},r.prototype._simpleBind=function(t,n){return function(e){return t.apply(n,e)}},r.prototype._done=function(e,t){return function(){e(t)}},p.xPosition={CENTER:"center",ALIGN_START:"align-start",ALIGN_END:"align-end",OFFSET_START:"offset-start",OFFSET_END:"offset-end"},p.yPosition={CENTER:"center",ALIGN_TOPS:"align-tops",ALIGN_BOTTOMS:"align-bottoms",ABOVE:"above",BELOW:"below"},p.absPosition={TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},p.prototype.absolute=function(){return this._absolute=!0,this},p.prototype._setPosition=function(e,t){if(e===p.absPosition.RIGHT||e===p.absPosition.LEFT)this._left=this._right="";else{if(e!==p.absPosition.BOTTOM&&e!==p.absPosition.TOP){var n=Object.keys(p.absPosition).join().toLowerCase();throw new Error("Position must be one of "+n+".")}this._top=this._bottom=""}return this["_"+e]=ie.isString(t)?t:"0",this},p.prototype.top=function(e){return this._setPosition(p.absPosition.TOP,e)},p.prototype.bottom=function(e){return this._setPosition(p.absPosition.BOTTOM,e)},p.prototype.start=function(e){var t=this._isRTL?p.absPosition.RIGHT:p.absPosition.LEFT;return this._setPosition(t,e)},p.prototype.end=function(e){var t=this._isRTL?p.absPosition.LEFT:p.absPosition.RIGHT;return this._setPosition(t,e)},p.prototype.left=function(e){return this._setPosition(p.absPosition.LEFT,e)},p.prototype.right=function(e){return this._setPosition(p.absPosition.RIGHT,e)},p.prototype.centerHorizontally=function(){return this._left="50%",this._right="",this._translateX=["-50%"],this},p.prototype.centerVertically=function(){return this._top="50%",this._bottom="",this._translateY=["-50%"],this},p.prototype.center=function(){return this.centerHorizontally().centerVertically()},p.prototype.relativeTo=function(e){return this._absolute=!1,this._relativeToEl=o(e),this},p.prototype.addPanelPosition=function(e,t){if(!this._relativeToEl)throw new Error("addPanelPosition can only be used with relative positioning. Set relativeTo first.");return this._validateXPosition(e),this._validateYPosition(t),this._positions.push({x:e,y:t}),this},p.prototype._validateYPosition=function(e){if(null!=e){for(var t,n=Object.keys(p.yPosition),r=[],i=0;t=n[i];i++){var a=p.yPosition[t];if(r.push(a),a===e)return}throw new Error("Panel y position only accepts the following values:\n"+r.join(" | "))}},p.prototype._validateXPosition=function(e){if(null!=e){for(var t,n=Object.keys(p.xPosition),r=[],i=0;t=n[i];i++){var a=p.xPosition[t];if(r.push(a),a===e)return}throw new Error("Panel x Position only accepts the following values:\n"+r.join(" | "))}},p.prototype.withOffsetX=function(e){return this._translateX.push(e),this},p.prototype.withOffsetY=function(e){return this._translateY.push(e),this},p.prototype.getTop=function(){return this._top},p.prototype.getBottom=function(){return this._bottom},p.prototype.getLeft=function(){return this._left},p.prototype.getRight=function(){return this._right},p.prototype.getTransform=function(){return(this._reduceTranslateValues("translateX",this._translateX)+" "+this._reduceTranslateValues("translateY",this._translateY)).trim()},p.prototype._isOnscreen=function(e){var t=parseInt(this.getLeft()),n=parseInt(this.getTop()),r=t+e[0].offsetWidth,i=n+e[0].offsetHeight;return 0<=t&&0<=n&&i<=this._$window.innerHeight&&r<=this._$window.innerWidth},p.prototype.getActualPosition=function(){return this._actualPosition},p.prototype._reduceTranslateValues=function(t,e){return e.map(function(e){return t+"("+e+")"}).join(" ")},p.prototype._setPanelPosition=function(e){if(!this._absolute)if(this._actualPosition)this._calculatePanelPosition(e,this._actualPosition);else for(var t=0;t<this._positions.length&&(this._actualPosition=this._positions[t],this._calculatePanelPosition(e,this._actualPosition),!this._isOnscreen(e));t++);},p.prototype._reverseXPosition=function(e){if(e!==p.xPosition.CENTER){return-1<e.indexOf("start")?e.replace("start","end"):e.replace("end","start")}},p.prototype._bidi=function(e){return this._isRTL?this._reverseXPosition(e):e},p.prototype._calculatePanelPosition=function(e,t){var n=e[0].getBoundingClientRect(),r=n.width,i=n.height,a=this._relativeToEl[0].getBoundingClientRect(),o=a.left,s=a.right,c=a.width;switch(this._bidi(t.x)){case p.xPosition.OFFSET_START:this._left=o-r+"px";break;case p.xPosition.ALIGN_END:this._left=s-r+"px";break;case p.xPosition.CENTER:var l=o+.5*c-.5*r;this._left=l+"px";break;case p.xPosition.ALIGN_START:this._left=o+"px";break;case p.xPosition.OFFSET_END:this._left=s+"px"}var u=a.top,f=a.bottom,d=a.height;switch(t.y){case p.yPosition.ABOVE:this._top=u-i+"px";break;case p.yPosition.ALIGN_BOTTOMS:this._top=f-i+"px";break;case p.yPosition.CENTER:var h=u+.5*d-.5*i;this._top=h+"px";break;case p.yPosition.ALIGN_TOPS:this._top=u+"px";break;case p.yPosition.BELOW:this._top=f+"px"}},c.animation={SLIDE:"md-panel-animate-slide",SCALE:"md-panel-animate-scale",FADE:"md-panel-animate-fade"},c.prototype.openFrom=function(e){return e=e.target?e.target:e,this._openFrom=this._getPanelAnimationTarget(e),this._closeTo||(this._closeTo=this._openFrom),this},c.prototype.closeTo=function(e){return this._closeTo=this._getPanelAnimationTarget(e),this},c.prototype._getPanelAnimationTarget=function(e){return ie.isDefined(e.top)||ie.isDefined(e.left)?{element:ae,bounds:{top:e.top||0,left:e.left||0}}:this._getBoundingClientRect(o(e))},c.prototype.withAnimation=function(e){return this._animationClass=e,this},c.prototype.animateOpen=function(e){var t=this._$mdUtil.dom.animator;this._fixBounds(e);var n={},r=e[0].style.transform||"",i=t.toTransformCss(r),a=t.toTransformCss(r);switch(this._animationClass){case c.animation.SLIDE:e.css("opacity","1"),n={transitionInClass:"_md-panel-animate-enter"};var o=t.calculateSlideToOrigin(e,this._openFrom)||"";i=t.toTransformCss(o+" "+r);break;case c.animation.SCALE:n={transitionInClass:"_md-panel-animate-enter"};var s=t.calculateZoomToOrigin(e,this._openFrom)||"";i=t.toTransformCss(s+" "+r);break;case c.animation.FADE:n={transitionInClass:"_md-panel-animate-enter"};break;default:n=ie.isString(this._animationClass)?{transitionInClass:this._animationClass}:{transitionInClass:this._animationClass.open,transitionOutClass:this._animationClass.close}}return t.translate3d(e,i,a,n)},c.prototype.animateClose=function(e){var t=this._$mdUtil.dom.animator,n={},r=e[0].style.transform||"",i=t.toTransformCss(r),a=t.toTransformCss(r);switch(this._animationClass){case c.animation.SLIDE:e.css("opacity","1"),n={transitionInClass:"_md-panel-animate-leave"};var o=t.calculateSlideToOrigin(e,this._closeTo)||"";a=t.toTransformCss(o+" "+r);break;case c.animation.SCALE:n={transitionInClass:"_md-panel-animate-scale-out _md-panel-animate-leave"};var s=t.calculateZoomToOrigin(e,this._closeTo)||"";a=t.toTransformCss(s+" "+r);break;case c.animation.FADE:n={transitionInClass:"_md-panel-animate-fade-out _md-panel-animate-leave"};break;default:n=ie.isString(this._animationClass)?{transitionOutClass:this._animationClass}:{transitionInClass:this._animationClass.close,transitionOutClass:this._animationClass.open}}return t.translate3d(e,i,a,n)},c.prototype._fixBounds=function(e){var t=e[0].offsetWidth,n=e[0].offsetHeight;this._openFrom&&null==this._openFrom.bounds.height&&(this._openFrom.bounds.height=n),this._openFrom&&null==this._openFrom.bounds.width&&(this._openFrom.bounds.width=t),this._closeTo&&null==this._closeTo.bounds.height&&(this._closeTo.bounds.height=n),this._closeTo&&null==this._closeTo.bounds.width&&(this._closeTo.bounds.width=t)},c.prototype._getBoundingClientRect=function(e){if(e instanceof ie.element)return{element:e,bounds:e[0].getBoundingClientRect()}}}(),ie.module("material.components.progressCircular",["material.core"]),function(){function e(f,d,e){var h="determinate",p="indeterminate",m="buffer",g="query",_="_md-progress-linear-disabled";return{restrict:"E",template:'<div class="md-container"><div class="md-dashed"></div><div class="md-bar md-bar1"></div><div class="md-bar md-bar2"></div></div>',compile:function(e,t,n){return e.attr("aria-valuemin",0),e.attr("aria-valuemax",100),e.attr("role","progressbar"),r}};function r(e,n,r){var t;f(n);var i=r.hasOwnProperty("disabled"),a=d.dom.animator.toCss,o=ie.element(n[0].querySelector(".md-bar1")),s=ie.element(n[0].querySelector(".md-bar2")),c=ie.element(n[0].querySelector(".md-container"));function l(){var e=(r.mdMode||"").trim();if(e)switch(e){case h:case p:case m:case g:break;default:e=p}return e}function u(e,t){if(!i&&l()){var n=d.supplant("translateX({0}%) scale({1},1)",[(t-100)/2,t/100]),r=a({transform:n});ie.element(e).css(r)}}n.attr("md-mode",l()).toggleClass(_,i),function(){if(ie.isUndefined(r.mdMode)){var e=ie.isDefined(r.value),t=e?h:p;n.attr("md-mode",t),r.mdMode=t}}(),r.$observe("value",function(e){var t=b(e);n.attr("aria-valuenow",t),l()!=g&&u(s,t)}),r.$observe("mdBufferValue",function(e){u(o,b(e))}),r.$observe("disabled",function(e){i=!0===e||!1===e?!!e:ie.isDefined(e),n.toggleClass(_,i),c.toggleClass(t,!i)}),r.$observe("mdMode",function(e){switch(t&&c.removeClass(t),e){case g:case m:case h:case p:c.addClass(t="md-mode-"+e);break;default:c.addClass(t="md-mode-"+p)}})}function b(e){return Math.max(0,Math.min(e||0,100))}}e.$inject=["$mdTheming","$mdUtil","$log"],ie.module("material.components.progressLinear",["material.core"]).directive("mdProgressLinear",e)}(),function(){function e(s,c,l,u){return e.prototype={init:function(e){this._ngModelCtrl=e,this._ngModelCtrl.$render=ie.bind(this,this.render)},add:function(e){this._radioButtonRenderFns.push(e)},remove:function(e){var t=this._radioButtonRenderFns.indexOf(e);-1!==t&&this._radioButtonRenderFns.splice(t,1)},render:function(){this._radioButtonRenderFns.forEach(function(e){e()})},setViewValue:function(e,t){this._ngModelCtrl.$setViewValue(e,t),this.render()},getViewValue:function(){return this._ngModelCtrl.$viewValue},selectNext:function(){return t(this.$element,1)},selectPrevious:function(){return t(this.$element,-1)},setActiveDescendant:function(e){this.$element.attr("aria-activedescendant",e)},isDisabled:function(){return this.$element[0].hasAttribute("disabled")}},{restrict:"E",controller:["$element",e],require:["mdRadioGroup","?ngModel"],link:{pre:function(t,r,e,n){r.addClass("_md"),l(r);var i=n[0],a=n[1]||s.fakeNgModel();function o(){r.hasClass("md-focused")||r.addClass("md-focused")}i.init(a),t.mouseActive=!1,r.attr({role:"radiogroup",tabIndex:r.attr("tabindex")||"0"}).on("keydown",function(e){var t=e.which||e.keyCode;if(t!=c.KEY_CODE.ENTER&&e.currentTarget!=e.target)return;switch(t){case c.KEY_CODE.LEFT_ARROW:case c.KEY_CODE.UP_ARROW:e.preventDefault(),i.selectPrevious(),o();break;case c.KEY_CODE.RIGHT_ARROW:case c.KEY_CODE.DOWN_ARROW:e.preventDefault(),i.selectNext(),o();break;case c.KEY_CODE.ENTER:var n=ie.element(s.getClosest(r[0],"form"));0<n.length&&n.triggerHandler("submit")}}).on("mousedown",function(e){t.mouseActive=!0,u(function(){t.mouseActive=!1},100)}).on("focus",function(){!1===t.mouseActive&&i.$element.addClass("md-focused")}).on("blur",function(){i.$element.removeClass("md-focused")})}}};function e(e){this._radioButtonRenderFns=[],this.$element=e}function t(e,t){var n=s.iterator(e[0].querySelectorAll("md-radio-button"),!0);if(n.count()){var r=e[0].querySelector("md-radio-button.md-checked"),i=n[t<0?"previous":"next"](r,function(e){return!ie.element(e).attr("disabled")})||n.first();ie.element(i).triggerHandler("click")}}}function t(l,u,f){var d="md-checked";return{restrict:"E",require:"^mdRadioGroup",transclude:!0,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-off"></div><div class="md-on"></div></div><div ng-transclude class="md-label"></div>',link:function(t,n,r,i){var a;function e(e){n[0].hasAttribute("disabled")||i.isDisabled()||t.$apply(function(){i.setViewValue(r.value,e&&e.type)})}function o(){var e=i.getViewValue()==r.value;function t(e){"MD-RADIO-GROUP"!=n.parent()[0].nodeName&&n.parent()[e?"addClass":"removeClass"](d)}e!==a&&(a=e,n.attr("aria-checked",e),e?(t(!0),n.addClass(d),i.setActiveDescendant(n.attr("id"))):(t(!1),n.removeClass(d)))}f(n),s=n,c=t,c.ariaId=r.id||"radio_"+u.nextUid(),s.attr({id:c.ariaId,role:"radio","aria-checked":"false"}),l.expectWithText(s,"aria-label"),function(){if(!i)throw"RadioButton: No RadioGroupController could be found.";i.add(o),r.$observe("value",o),n.on("click",e).on("$destroy",function(){i.remove(o)})}();var s,c}}}e.$inject=["$mdUtil","$mdConstant","$mdTheming","$timeout"],t.$inject=["$mdAria","$mdUtil","$mdTheming"],ie.module("material.components.radioButton",["material.core"]).directive("mdRadioGroup",e).directive("mdRadioButton",t)}(),function(){e.$inject=["$mdSelect","$mdUtil","$mdConstant","$mdTheming","$mdAria","$compile","$parse"],t.$inject=["$parse","$mdUtil","$mdConstant","$mdTheming"],n.$inject=["$mdButtonInkRipple","$mdUtil"],r.$inject=["$$interimElementProvider"];var F=8,g=0,l=ie.element('<div class="md-container"><div class="md-icon"></div></div>');function e(E,D,I,P,M,e,$){var t=I.KEY_CODE;t.SPACE,t.ENTER,t.UP_ARROW,t.DOWN_ARROW;return{restrict:"E",require:["^?mdInputContainer","mdSelect","ngModel","?^form"],compile:function(e,t){var n=ie.element("<md-select-value><span></span></md-select-value>");n.append('<span class="md-select-icon" aria-hidden="true"></span>'),n.addClass("md-select-value"),n[0].hasAttribute("id")||n.attr("id","select_value_label_"+D.nextUid());e.find("md-content").length||e.append(ie.element("<md-content>").append(e.contents()));t.mdOnOpen&&(e.find("md-content").prepend(ie.element('<div> <md-progress-circular md-mode="indeterminate" ng-if="$$loadingAsyncDone === false" md-diameter="25px"></md-progress-circular></div>')),e.find("md-option").attr("ng-show","$$loadingAsyncDone"));if(t.name){var r=ie.element('<select class="md-visually-hidden">');r.attr({name:t.name,"aria-hidden":"true",tabindex:"-1"});var i=e.find("md-option");ie.forEach(i,function(e){var t=ie.element("<option>"+e.innerHTML+"</option>");e.hasAttribute("ng-value")?t.attr("ng-value",e.getAttribute("ng-value")):e.hasAttribute("value")&&t.attr("value",e.getAttribute("value")),r.append(t)}),r.append('<option ng-value="'+t.ngModel+'" selected></option>'),e.parent().append(r)}var k=D.parseAttributeBoolean(t.multiple),a=k?"multiple":"",o='<div class="md-select-menu-container" aria-hidden="true"><md-select-menu {0}>{1}</md-select-menu></div>';o=D.supplant(o,[a,e.html()]),e.empty().append(n),e.append(o),t.tabindex||t.$set("tabindex",0);return function(r,n,i,e){var t,a,o,s,c,l=!0,u=e[0],f=e[1],d=e[2],h=e[3],p=n.find("md-select-value"),m=ie.isDefined(i.readonly),g=D.parseAttributeBoolean(i.mdNoAsterisk);if(g&&n.addClass("md-no-asterisk"),u){var _=u.isErrorGetter||function(){return d.$invalid&&(d.$touched||h&&h.$submitted)};if(u.input&&n.find("md-select-header").find("input")[0]!==u.input[0])throw new Error("<md-input-container> can only have *one* child <input>, <textarea> or <select> element!");u.input=n,u.label||M.expect(n,"aria-label",n.attr("placeholder")),r.$watch(_,u.setInvalid)}!function(){if(o=ie.element(n[0].querySelector(".md-select-menu-container")),s=r,i.mdContainerClass){var e=o[0].getAttribute("class")+" "+i.mdContainerClass;o[0].setAttribute("class",e)}(c=o.find("md-select-menu").controller("mdSelectMenu")).init(d,i.ngModel),n.on("$destroy",function(){o.remove()})}(),P(n),h&&ie.isDefined(i.multiple)&&D.nextTick(function(){var e=d.$modelValue||d.$viewValue;e&&h.$setPristine()});var b,v=d.$render;function y(){o&&(c=c||o.find("md-select-menu").controller("mdSelectMenu"),f.setLabelText(c.selectedLabels()))}function w(){if(a){var e=c.selectedLabels({mode:"aria"});n.attr("aria-label",e.length?a+": "+e:a)}}d.$render=function(){v(),y(),w(),S()},i.$observe("placeholder",d.$render),u&&u.label&&i.$observe("required",function(e){u.label.toggleClass("md-required",e&&!g)}),f.setLabelText=function(e){if(f.setIsPlaceholder(!e),i.mdSelectedText)e=$(i.mdSelectedText)(r);else{var t=i.placeholder||(u&&u.label?u.label.text():"");e=e||t||""}var n=p.children().eq(0);n.html(e)},f.setIsPlaceholder=function(e){e?(p.addClass("md-select-placeholder"),u&&u.label&&u.label.addClass("md-placeholder")):(p.removeClass("md-select-placeholder"),u&&u.label&&u.label.removeClass("md-placeholder"))},m||(n.on("focus",function(e){u&&u.setFocused(!0)}),n.on("blur",function(e){l&&(l=!1,s._mdSelectIsOpen&&e.stopImmediatePropagation()),s._mdSelectIsOpen||(u&&u.setFocused(!1),S())})),f.triggerClose=function(){$(i.mdOnClose)(r)},r.$$postDigest(function(){!function(){var e=n.attr("aria-label")||n.attr("placeholder");!e&&u&&u.label&&(e=u.label.text());a=e,M.expect(n,"aria-label",e)}(),y(),w()}),r.$watch(function(){return c.selectedLabels()},y),i.$observe("ngMultiple",function(e){b&&b();var t=$(e);b=r.$watch(function(){return t(r)},function(e,t){e===ae&&t===ae||(e?n.attr("multiple","multiple"):n.removeAttr("multiple"),n.attr("aria-multiselectable",e?"true":"false"),o&&(c.setMultiple(e),v=d.$render,d.$render=function(){v(),y(),w(),S()},d.$render()))})}),i.$observe("disabled",function(e){ie.isString(e)&&(e=!0),t!==ae&&t===e||((t=e)?n.attr({"aria-disabled":"true"}).removeAttr("tabindex").off("click",x).off("keydown",T):n.attr({tabindex:i.tabindex,"aria-disabled":"false"}).on("click",x).on("keydown",T))}),i.hasOwnProperty("disabled")||i.hasOwnProperty("ngDisabled")||(n.attr({"aria-disabled":"false"}),n.on("click",x),n.on("keydown",T));var C={role:"listbox","aria-expanded":"false","aria-multiselectable":k&&!i.ngMultiple?"true":"false"};n[0].hasAttribute("id")||(C.id="select_"+D.nextUid());var A="select_container_"+D.nextUid();function S(){u&&u.setHasValue(0<c.selectedLabels().length||(n[0].validity||{}).badInput)}function T(e){if(I.isNavigationKey(e))e.preventDefault(),x();else if(I.isInputKey(e)||I.isNumPadKey(e)){e.preventDefault();var t=c.optNodeForKeyboardSearch(e);if(!t||t.hasAttribute("disabled"))return;var n=ie.element(t).controller("mdOption");c.isMultiple||c.deselect(Object.keys(c.selected)[0]),c.select(n.hashKey,n.value),c.refreshViewValue()}}function x(){s._mdSelectIsOpen=!0,n.attr("aria-expanded","true"),E.show({scope:s,preserveScope:!0,skipCompile:!0,element:o,target:n[0],selectCtrl:f,preserveElement:!0,hasBackdrop:!0,loadingAsync:!!i.mdOnOpen&&(r.$eval(i.mdOnOpen)||!0)}).finally(function(){s._mdSelectIsOpen=!1,n.focus(),n.attr("aria-expanded","false"),d.$setTouched()})}o.attr("id",A),C["aria-owns"]=A,n.attr(C),r.$on("$destroy",function(){E.destroy().finally(function(){u&&(u.setFocused(!1),u.setHasValue(!1),u.input=null),d.$setTouched()})})}},controller:function(){}}}function t(h,p,m,i){return{restrict:"E",require:["mdSelectMenu"],scope:!(e.$inject=["$scope","$attrs","$element"]),controller:e,link:{pre:function(a,e,t,n){var o=n[0];function r(e){var t=p.getClosest(e.target,"md-option"),n=t&&ie.element(t).data("$mdOptionController");if(t&&n){if(t.hasAttribute("disabled"))return e.stopImmediatePropagation(),!1;var r=o.hashGetter(n.value),i=ie.isDefined(o.selected[r]);a.$apply(function(){o.isMultiple?i?o.deselect(r):o.select(r,n.value):i||(o.deselect(Object.keys(o.selected)[0]),o.select(r,n.value)),o.refreshViewValue()})}}e.addClass("_md"),i(e),e.on("click",r),e.on("keypress",function(e){13!=e.keyCode&&32!=e.keyCode||r(e)})}}};function e(i,e,a){var r,o=this;o.isMultiple=ie.isDefined(e.multiple),o.selected={},o.options={},i.$watchCollection(function(){return o.options},function(){o.ngModel.$render()}),o.setMultiple=function(e){var t=o.ngModel;function n(e,t){return ie.isArray(e||t||[])}r=r||t.$isEmpty,o.isMultiple=e,o.isMultiple?(t.$validators["md-multiple"]=n,t.$render=f,i.$watchCollection(o.modelBinding,function(e){n(e)&&f(),o.ngModel.$setPristine()}),t.$isEmpty=function(e){return!e||0===e.length}):(delete t.$validators["md-multiple"],t.$render=d)};var s,c,l,u="";function f(){var n=o.ngModel.$modelValue||o.ngModel.$viewValue||[];if(ie.isArray(n)){var e=Object.keys(o.selected),t=n.map(o.hashGetter);e.filter(function(e){return-1===t.indexOf(e)}).forEach(o.deselect),t.forEach(function(e,t){o.select(e,n[t])})}}function d(){var e=o.ngModel.$viewValue||o.ngModel.$modelValue;Object.keys(o.selected).forEach(o.deselect),o.select(o.hashGetter(e),e)}o.optNodeForKeyboardSearch=function(e){s&&clearTimeout(s),s=setTimeout(function(){u="",c=l=s=ae},300);var t=e.keyCode-(m.isNumPadKey(e)?48:0);u+=String.fromCharCode(t);var n=new RegExp("^"+u,"i");c||(c=a.find("md-option"),l=new Array(c.length),ie.forEach(c,function(e,t){l[t]=e.textContent.trim()}));for(var r=0;r<l.length;++r)if(n.test(l[r]))return c[r]},o.init=function(e,t){if(o.ngModel=e,o.modelBinding=t,o.ngModel.$isEmpty=function(e){return!o.options[o.hashGetter(e)]},e.$options&&e.$options.trackBy){var n={},r=h(e.$options.trackBy);o.hashGetter=function(e,t){return n.$value=e,r(t||i,n)}}else o.hashGetter=function(e){return ie.isObject(e)?"object_"+(e.$$mdSelectId||(e.$$mdSelectId=++g)):e};o.setMultiple(o.isMultiple)},o.selectedLabels=function(e){var t,n=(e=e||{}).mode||"html",r=p.nodesToArray(a[0].querySelectorAll("md-option[selected]"));return r.length?("html"==n?t=function(e){if(e.hasAttribute("md-option-empty"))return"";var t=e.innerHTML,n=e.querySelector(".md-ripple-container");n&&(t=t.replace(n.outerHTML,""));var r=e.querySelector(".md-container");return r&&(t=t.replace(r.outerHTML,"")),t}:"aria"==n&&(t=function(e){return e.hasAttribute("aria-label")?e.getAttribute("aria-label"):e.textContent}),r.map(t).join(", ")):""},o.select=function(e,t){var n=o.options[e];n&&n.setSelected(!0),o.selected[e]=t},o.deselect=function(e){var t=o.options[e];t&&t.setSelected(!1),delete o.selected[e]},o.addOption=function(e,t){if(ie.isDefined(o.options[e]))throw new Error('Duplicate md-option values are not allowed in a select. Duplicate value "'+t.value+'" found.');o.options[e]=t,ie.isDefined(o.selected[e])&&(o.select(e,t.value),ie.isDefined(o.ngModel.$modelValue)&&o.hashGetter(o.ngModel.$modelValue)===e&&o.ngModel.$validate(),o.refreshViewValue())},o.removeOption=function(e){delete o.options[e]},o.refreshViewValue=function(){var e,t=[];for(var n in o.selected)(e=o.options[n])?t.push(e.value):t.push(o.selected[n]);var r=o.ngModel.$options&&o.ngModel.$options.trackBy,i=o.isMultiple?t:t[0],a=o.ngModel.$modelValue;(r?ie.equals(a,i):a==i)||(o.ngModel.$setViewValue(i),o.ngModel.$render())}}}function n(r,i){return e.$inject=["$element"],{restrict:"E",require:["mdOption","^^mdSelectMenu"],controller:e,compile:function(e,t){e.append(ie.element('<div class="md-text">').append(e.contents())),e.attr("tabindex",t.tabindex||"0"),n=t,r=n.value,i=n.ngValue,r||i||e.attr("md-option-empty","");var n,r,i;return a}};function a(a,t,e,n){var o=n[0],s=n[1];function c(e,t,n){if(s.hashGetter){var r=s.hashGetter(t,a),i=s.hashGetter(e,a);o.hashKey=i,o.value=e,s.removeOption(r,o),s.addOption(i,o)}else n||a.$$postDigest(function(){c(e,t,!0)})}s.isMultiple&&(t.addClass("md-checkbox-enabled"),t.prepend(l.clone())),ie.isDefined(e.ngValue)?a.$watch(e.ngValue,c):ie.isDefined(e.value)?c(e.value):a.$watch(function(){return t.text().trim()},c),e.$observe("disabled",function(e){e?t.attr("tabindex","-1"):t.attr("tabindex","0")}),a.$$postDigest(function(){e.$observe("selected",function(e){ie.isDefined(e)&&("string"==typeof e&&(e=!0),e?(s.isMultiple||s.deselect(Object.keys(s.selected)[0]),s.select(o.hashKey,o.value)):s.deselect(o.hashKey),s.refreshViewValue())})}),r.attach(a,t),function(){var e={role:"option","aria-selected":"false"};t[0].hasAttribute("id")||(e.id="select_option_"+i.nextUid());t.attr(e)}(),a.$on("$destroy",function(){s.removeOption(o.hashKey,o)})}function e(t){this.selected=!1,this.setSelected=function(e){e&&!this.selected?t.attr({selected:"selected","aria-selected":"true"}):!e&&this.selected&&(t.removeAttr("selected"),t.attr("aria-selected","false")),this.selected=e}}}function r(e){return t.$inject=["$mdSelect","$mdConstant","$mdUtil","$window","$q","$$rAF","$animateCss","$animate","$document"],e("$mdSelect").setDefaults({methods:["target"],options:t});function t(l,u,O,R,a,f,d,h,N){var p=O.dom.animator,m=u.KEY_CODE;return{parent:"body",themable:!0,onShow:function(o,s,c){return c.loadingAsync&&!c.isRemoved&&(o.$$loadingAsyncDone=!1,a.when(c.loadingAsync).then(function(){o.$$loadingAsyncDone=!0,delete c.loadingAsync}).then(function(){f(i)})),function(e,t){var n=s.find("md-select-menu");if(!t.target)throw new Error(O.supplant("$mdSelect.show() expected a target element in options.target but got '{0}'!",[t.target]));ie.extend(t,{isRemoved:!1,target:ie.element(t.target),parent:ie.element(t.parent),selectEl:n,contentEl:s.find("md-content"),optionNodes:n[0].getElementsByTagName("md-option")})}(0,c),c.hideBackdrop=(t=o,r=c,r.disableParentScroll&&!O.getClosest(r.target,"MD-DIALOG")?r.restoreScroll=O.disableScrollAround(r.element,r.parent):r.disableParentScroll=!1,r.hasBackdrop&&(r.backdrop=O.createBackdrop(t,"md-select-backdrop md-click-catcher"),h.enter(r.backdrop,N[0].body,null,{duration:0})),function(){r.backdrop&&r.backdrop.remove(),r.disableParentScroll&&r.restoreScroll(),delete r.restoreScroll}),(n=s,e=c,e.parent.append(n),a(function(e,t){try{d(n,{removeClass:"md-leave",duration:0}).start().then(i).then(e)}catch(e){t(e)}})).then(function(e){var t,n,r,i,a;return s.attr("aria-hidden","false"),c.alreadyOpen=!0,c.cleanupInteraction=function(){if(!c.isRemoved){var r=c.selectEl,t=r.controller("mdSelectMenu")||{};return s.addClass("md-clickable"),c.backdrop&&c.backdrop.on("click",e),r.on("keydown",n),r.on("click",a),function(){c.backdrop&&c.backdrop.off("click",e),r.off("keydown",n),r.off("click",a),s.removeClass("md-clickable"),c.isRemoved=!0}}function e(e){e.preventDefault(),e.stopPropagation(),c.restoreFocus=!1,O.nextTick(l.hide,!0)}function n(e){switch(e.preventDefault(),e.stopPropagation(),e.keyCode){case m.UP_ARROW:return void i("prev");case m.DOWN_ARROW:return void i("next");case m.SPACE:case m.ENTER:var t=O.getClosest(e.target,"md-option");t&&(r.triggerHandler({type:"click",target:t}),e.preventDefault()),a(e);break;case m.TAB:case m.ESCAPE:e.stopPropagation(),e.preventDefault(),c.restoreFocus=!0,O.nextTick(l.hide,!0);break;default:if(u.isInputKey(e)||u.isNumPadKey(e)){var n=r.controller("mdSelectMenu").optNodeForKeyboardSearch(e);c.focusedNode=n||c.focusedNode,n&&n.focus()}}}function i(e){for(var t,n=O.nodesToArray(c.optionNodes),r=n.indexOf(c.focusedNode);-1===r?r=0:"next"===e&&r<n.length-1?r++:"prev"===e&&0<r&&r--,(t=n[r]).hasAttribute("disabled")&&(t=ae),!t&&r<n.length-1&&0<r;);t&&t.focus(),c.focusedNode=t}function a(i){if(!(i&&"click"==i.type&&i.currentTarget!=r[0]||function(){var e=!1;if(i&&0<i.currentTarget.children.length){var t=i.currentTarget.children[0],n=t.scrollHeight>t.clientHeight;if(n&&0<t.children.length){var r=i.pageX-i.currentTarget.getBoundingClientRect().left;r>t.querySelector("md-option").offsetWidth&&(e=!0)}}return e}())){var e=O.getClosest(i.target,"md-option");e&&e.hasAttribute&&!e.hasAttribute("disabled")&&(i.preventDefault(),i.stopPropagation(),t.isMultiple||(c.restoreFocus=!0,O.nextTick(function(){l.hide(t.ngModel.$viewValue)},!0)))}}}(),c.cleanupResizing=(r=o,i=s,a=c,t=function(){if(!a.isRemoved){var e=g(r,i,a),t=e.container,n=e.dropDown;t.element.css(p.toCss(t.styles)),n.element.css(p.toCss(n.styles))}},(n=ie.element(R)).on("resize",t),n.on("orientationchange",t),function(){n.off("resize",t),n.off("orientationchange",t)}),e},c.hideBackdrop);var n,e;var t,r;function i(){return a(function(t){if(c.isRemoved)return a.reject(!1);var n=g(o,s,c);n.container.element.css(p.toCss(n.container.styles)),n.dropDown.element.css(p.toCss(n.dropDown.styles)),f(function(){var e;s.addClass("md-active"),n.dropDown.element.css(p.toCss({transform:""})),(e=c.focusedNode)&&!e.hasAttribute("disabled")&&e.focus(),t()})})}},onRemove:function(e,t,n){return(n=n||{}).cleanupInteraction(),n.cleanupResizing(),n.hideBackdrop(),!0===n.$destroy?r():d(t,{addClass:"md-leave"}).start().then(r);function r(){t.removeClass("md-active"),t.attr("aria-hidden","true"),t[0].style.display="none",function(e){var t=e.selectCtrl;if(t){var n=e.selectEl.controller("mdSelectMenu");t.setLabelText(n?n.selectedLabels():""),t.triggerClose()}}(n),!n.$destroy&&n.restoreFocus&&n.target.focus()}},hasBackdrop:!0,disableParentScroll:!0};function g(e,t,n){var r,i,a=t[0],o=n.target[0].children[0],s=N[0].body,c=n.selectEl[0],l=n.contentEl[0],u=s.getBoundingClientRect(),f=o.getBoundingClientRect(),d={left:u.left+F,top:F,bottom:u.height-F,right:u.width-F-(O.floatingScrollbars()?16:0)},h=f.top-d.top,p=(f.left,f.left,f.width,d.bottom-(f.top+f.height)),m=u.width-2*F,g=c.querySelector("md-option[selected]"),_=c.getElementsByTagName("md-option"),b=c.getElementsByTagName("md-optgroup"),v=function(e,t){var n=!1;try{var r=e[0].style.display;e[0].style.display="block",n=t.scrollHeight>t.offsetHeight,e[0].style.display=r}finally{}return n}(t,l);r=(i=n.loadingAsync)&&ie.isFunction(i.then)?l.firstElementChild||l:g||(b.length?b[0]:_.length?_[0]:l.firstElementChild||l),l.offsetWidth>m?l.style["max-width"]=m+"px":l.style.maxWidth=null,v&&c.classList.add("md-overflow");var y=r;"MD-OPTGROUP"===(y.tagName||"").toUpperCase()&&(r=y=_[0]||l.firstElementChild||l),n.focusedNode=y,a.style.display="block";var w,C,A,S,T,x,k=c.getBoundingClientRect(),E=(w=r)?{left:w.offsetLeft,top:w.offsetTop,width:w.offsetWidth,height:w.offsetHeight}:{left:0,top:0,width:0,height:0};if(r){var D=R.getComputedStyle(r);E.paddingLeft=parseInt(D.paddingLeft,10)||0,E.paddingRight=parseInt(D.paddingRight,10)||0}if(v){var I=l.offsetHeight/2;l.scrollTop=E.top+E.height/2-I,h<I?l.scrollTop=Math.min(E.top,l.scrollTop+I-h):p<I&&(l.scrollTop=Math.max(E.top+E.height-k.height,l.scrollTop-I+p))}C=f.left+E.left-E.paddingLeft+2,A=Math.floor(f.top+f.height/2-E.height/2-E.top+l.scrollTop)+2,S=E.left+f.width/2+"px "+(E.top+E.height/2-l.scrollTop)+"px 0px",T=Math.min(f.width+E.paddingLeft+E.paddingRight,m),x=G.getComputedStyle(o)["font-size"];var P=a.getBoundingClientRect(),M=Math.round(100*Math.min(f.width/k.width,1))/100,$=Math.round(100*Math.min(f.height/k.height,1))/100;return{container:{element:ie.element(a),styles:{left:Math.floor(L(d.left,C,d.right-P.width)),top:Math.floor(L(d.top,A,d.bottom-P.height)),"min-width":T,"font-size":x}},dropDown:{element:ie.element(c),styles:{transformOrigin:S,transform:n.alreadyOpen?"":O.supplant("scale({0},{1})",[M,$])}}}}}function L(e,t,n){return Math.max(e,Math.min(t,n))}}ie.module("material.components.select",["material.core","material.components.backdrop"]).directive("mdSelect",e).directive("mdSelectMenu",t).directive("mdOption",n).directive("mdOptgroup",function(){return{restrict:"E",compile:function(t,n){t.parent().find("md-select-header").length||function(){var e=t.find("label");e.length||(e=ie.element("<label>"),t.prepend(e));e.addClass("md-container-ignore"),n.label&&e.text(n.label)}()}}}).directive("mdSelectHeader",function(){return{restrict:"E"}}).provider("$mdSelect",r)}(),function(){function e(c,l){return["$mdUtil","$window",function(o,s){return{restrict:"A",multiElement:!0,link:function(r,i,t){var a=r.$on("$md-resize-enable",function(){a();var e=i[0],n=e.nodeType===s.Node.ELEMENT_NODE?s.getComputedStyle(e):{};r.$watch(t[c],function(e){if(!!e===l){o.nextTick(function(){r.$broadcast("$md-resize")});var t={cachedTransitionStyles:n};o.dom.animator.waitTransitionEnd(i,t).then(function(){r.$broadcast("$md-resize")})}})})}}}]}ie.module("material.components.showHide",["material.core"]).directive("ngShow",e("ngShow",!0)).directive("ngHide",e("ngHide",!1))}(),function(){function e(r,c,l,i){var u="SideNav '{0}' is not available! Did you use md-component-id='{0}'?",f={find:function(e,t){var n=r.get(e);return n||t?n:(i.error(c.supplant(u,[e||""])),ae)},waitFor:d};return function(e,t){if(ie.isUndefined(e))return f;var n,r,i,a,o=!0===t,s=f.find(e,o);return!s&&o?f.waitFor(e):!s&&ie.isUndefined(t)?(n=f,r=e,i=function(){return!1},a=function(){return l.when(c.supplant(u,[r||""]))},ie.extend({isLockedOpen:i,isOpen:i,toggle:a,open:a,close:a,onClose:ie.noop,then:function(e){return d(r).then(e||ie.noop)}},n)):s};function d(e){return r.when(e).catch(i.error)}}function t(r,m,i,g,_,e,b,v,y,w){return{restrict:"E",scope:{isOpen:"=?mdIsOpen"},controller:"$mdSidenavController",compile:function(e){return e.addClass("md-closed"),e.attr("tabIndex","-1"),t}};function t(a,o,e,t){var s,c,l,u=null,f=null,d=y.when(!0),n=b(e.mdIsLockedOpen);function h(e){return e.keyCode===i.KEY_CODE.ESCAPE?p(e):y.when(!0)}function p(e){return e.preventDefault(),t.close()}e.mdDisableScrollTarget&&((u=w[0].querySelector(e.mdDisableScrollTarget))?u=ie.element(u):v.warn(m.supplant('mdSidenav: couldn\'t find element matching selector "{selector}". Falling back to parent.',{selector:e.mdDisableScrollTarget}))),u||(u=o.parent()),e.hasOwnProperty("mdDisableBackdrop")||(c=m.createBackdrop(a,"md-sidenav-backdrop md-opaque ng-enter")),o.addClass("_md"),g(o),c&&g.inherit(c,o),o.on("$destroy",function(){c&&c.remove(),t.destroy()}),a.$on("$destroy",function(){c&&c.remove()}),a.$watch(function(){return n(a.$parent,{$media:function(e){return v.warn("$media is deprecated for is-locked-open. Use $mdMedia instead."),r(e)},$mdMedia:r})},function(e,t){(a.isLockedOpen=e)===t?o.toggleClass("md-locked-open",!!e):_[e?"addClass":"removeClass"](o,"md-locked-open");c&&c.toggleClass("md-locked-open",!!e)}),a.$watch("isOpen",function(e){var t=m.findFocusTarget(o)||m.findFocusTarget(o,"[md-sidenav-focus]")||o,n=o.parent();n[e?"on":"off"]("keydown",h),c&&c[e?"on":"off"]("click",p);var r=function(e,t){var n=o[0],r=e[0].scrollTop;if(t&&r){l={top:n.style.top,bottom:n.style.bottom,height:n.style.height};var i={top:r+"px",bottom:"auto",height:e[0].clientHeight+"px"};o.css(i),c.css(i)}if(!t&&l)return function(){n.style.top=l.top,n.style.bottom=l.bottom,n.style.height=l.height,c[0].style.top=null,c[0].style.bottom=null,c[0].style.height=null,l=null}}(n,e);e&&(f=w[0].activeElement);return i=e,i&&!s?(s=u.css("overflow"),u.css("overflow","hidden")):ie.isDefined(s)&&(u.css("overflow",s),s=ae),d=y.all([e&&c?_.enter(c,n):c?_.leave(c):y.when(!0),_[e?"removeClass":"addClass"](o,"md-closed")]).then(function(){a.isOpen&&t&&t.focus(),r&&r()});var i}),t.$toggleOpen=function(e){return a.isOpen==e?y.when(!0):(a.isOpen&&t.onCloseCb&&t.onCloseCb(),y(function(t){a.isOpen=e,m.nextTick(function(){d.then(function(e){a.isOpen||(f&&f.focus(),f=null),t(e)})})}))}}}function n(t,e,n,r,i){var a=this;a.isOpen=function(){return!!t.isOpen},a.isLockedOpen=function(){return!!t.isLockedOpen},a.onClose=function(e){return a.onCloseCb=e,a},a.open=function(){return a.$toggleOpen(!0)},a.close=function(){return a.$toggleOpen(!1)},a.toggle=function(){return a.$toggleOpen(!t.isOpen)},a.$toggleOpen=function(e){return i.when(t.isOpen=e)},a.destroy=r.register(a,n.mdComponentId)}e.$inject=["$mdComponentRegistry","$mdUtil","$q","$log"],t.$inject=["$mdMedia","$mdUtil","$mdConstant","$mdTheming","$animate","$compile","$parse","$log","$q","$document"],n.$inject=["$scope","$element","$attrs","$mdComponentRegistry","$q"],ie.module("material.components.sidenav",["material.core","material.components.backdrop"]).factory("$mdSidenav",e).directive("mdSidenav",t).directive("mdSidenavFocus",function(){return{restrict:"A",require:"^mdSidenav",link:function(e,t,n,r){}}}).controller("$mdSidenavController",n)}(),function(){function e(H,W,i,q,z,V,Y,K,Q,X){return{scope:{},require:["?ngModel","?^mdSliderContainer"],template:'<div class="md-slider-wrapper"><div class="md-slider-content"><div class="md-track-container"><div class="md-track"></div><div class="md-track md-track-fill"></div><div class="md-track-ticks"></div></div><div class="md-thumb-container"><div class="md-thumb"></div><div class="md-focus-thumb"></div><div class="md-focus-ring"></div><div class="md-sign"><span class="md-thumb-text"></span></div><div class="md-disabled-thumb"></div></div></div></div>',compile:function(e,t){var n=ie.element(e[0].getElementsByClassName("md-slider-wrapper")),r=t.tabindex||0;n.attr("tabindex",r),(t.disabled||t.ngDisabled)&&n.attr("tabindex",-1);return n.attr("role","slider"),i.expect(e,"aria-label"),a}};function a(i,a,e,t){V(a);var n=t[0]||{$setViewValue:function(e){this.$viewValue=e,this.$viewChangeListeners.forEach(function(e){e()})},$parsers:[],$formatters:[],$viewChangeListeners:[]},r=t[1],o=(ie.element(q.getClosest(a,"_md-slider-container",!0)),e.ngDisabled?ie.bind(null,K(e.ngDisabled),i.$parent):function(){return a[0].hasAttribute("disabled")}),s=ie.element(a[0].querySelector(".md-thumb")),c=ie.element(a[0].querySelector(".md-thumb-text")),l=s.parent(),u=ie.element(a[0].querySelector(".md-track-container")),f=ie.element(a[0].querySelector(".md-track-fill")),d=ie.element(a[0].querySelector(".md-track-ticks")),h=ie.element(a[0].getElementsByClassName("md-slider-wrapper")),p=(ie.element(a[0].getElementsByClassName("md-slider-content")),q.throttle(P,5e3)),m=ie.isDefined(e.mdVertical),g=ie.isDefined(e.mdDiscrete),_=ie.isDefined(e.mdInvert);ie.isDefined(e.min)?e.$observe("min",x):x(0),ie.isDefined(e.max)?e.$observe("max",k):k(100),ie.isDefined(e.step)?e.$observe("step",E):E(1),ie.isDefined(e.round)?e.$observe("round",D):D(3);ie.noop;function b(){P(),O()}e.ngDisabled&&i.$parent.$watch(e.ngDisabled,function(){a.attr("aria-disabled",!!o())}),Y.register(h,"drag",{horizontal:!m}),i.mouseActive=!1,h.on("keydown",function(e){if(o())return;var t;(m?e.keyCode===z.KEY_CODE.DOWN_ARROW:e.keyCode===z.KEY_CODE.LEFT_ARROW)?t=-w:(m?e.keyCode===z.KEY_CODE.UP_ARROW:e.keyCode===z.KEY_CODE.RIGHT_ARROW)&&(t=w);(t=_?-t:t)&&((e.metaKey||e.ctrlKey||e.altKey)&&(t*=4),e.preventDefault(),e.stopPropagation(),i.$evalAsync(function(){$(n.$viewValue+t)}))}).on("mousedown",function(){(function(){if(!g||o())return;if(ie.isUndefined(w))return;if(w<=0){var e="Slider step value must be greater than zero when in discrete mode";throw Q.error(e),new Error(e)}var t=Math.floor((y-v)/w);A||(A=ie.element("<canvas>").css("position","absolute"),d.append(A),S=A[0].getContext("2d"));var n,r=M();!r||r.height||r.width||(P(),r=I);A[0].width=r.width,A[0].height=r.height;for(var i=0;i<=t;i++){var a=W.getComputedStyle(d[0]);S.fillStyle=a.color||"black",n=Math.floor((m?r.height:r.width)*(i/t)),S.fillRect(m?0:n-1,m?n-1:0,m?r.width:2,m?2:r.height)}})(),i.mouseActive=!0,h.removeClass("md-focused"),X(function(){i.mouseActive=!1},100)}).on("focus",function(){!1===i.mouseActive&&h.addClass("md-focused")}).on("blur",function(){h.removeClass("md-focused"),a.removeClass("md-active"),function(){if(A&&S){var e=M();S.clearRect(0,0,e.width,e.height)}}()}).on("$md.pressdown",function(e){if(o())return;a.addClass("md-active"),a[0].focus(),P();var t=R(N(B(j(m?e.pointer.y:e.pointer.x))));i.$apply(function(){$(t),L(U(t))})}).on("$md.pressup",function(e){if(o())return;a.removeClass("md-dragging");var t=R(N(B(j(m?e.pointer.y:e.pointer.x))));i.$apply(function(){$(t),O()})}).on("$md.dragstart",function(e){if(o())return;F=!0,e.stopPropagation(),a.addClass("md-dragging"),G(e)}).on("$md.drag",function(e){if(!F)return;e.stopPropagation(),G(e)}).on("$md.dragend",function(e){if(!F)return;e.stopPropagation(),F=!1}),setTimeout(b,0);var v,y,w,C,A,S,T=H.throttle(b);function x(e){v=parseFloat(e),a.attr("aria-valuemin",e),b()}function k(e){y=parseFloat(e),a.attr("aria-valuemax",e),b()}function E(e){w=parseFloat(e)}function D(e){C=R(parseInt(e),0,6)}ie.element(W).on("resize",T),i.$on("$destroy",function(){ie.element(W).off("resize",T)}),n.$render=O,n.$viewChangeListeners.push(O),n.$formatters.push(R),n.$formatters.push(N);var I={};function P(){I=u[0].getBoundingClientRect()}function M(){return p(),I}function $(e){n.$setViewValue(R(N(e)))}function O(){isNaN(n.$viewValue)&&(n.$viewValue=n.$modelValue),n.$viewValue=R(n.$viewValue);var e=U(n.$viewValue);i.modelValue=n.$viewValue,a.attr("aria-valuenow",n.$viewValue),L(e),c.text(n.$viewValue)}function R(e,t,n){if(ie.isNumber(e))return t=ie.isNumber(t)?t:v,n=ie.isNumber(n)?n:y,Math.max(t,Math.min(n,e))}function N(e){if(ie.isNumber(e)){var t=Math.round((e-v)/w)*w+v;return t=Math.round(t*Math.pow(10,C))/Math.pow(10,C),r&&r.fitInputWidthToTextLength&&q.debounce(function(){r.fitInputWidthToTextLength(t.toString().length)},100)(),t}}function L(e){var t;t=e;var n=100*(e=Math.max(0,Math.min(t||0,1)))+"%",r=_?100*(1-e)+"%":n;m?l.css("bottom",n):q.bidiProperty(l,"left","right",n),f.css(m?"height":"width",r),a.toggleClass(_?"md-max":"md-min",0===e),a.toggleClass(_?"md-min":"md-max",1===e)}P();var F=!1;function G(e){var t,n,r;g?(n=m?e.pointer.y:e.pointer.x,r=R(N(B(j(n)))),L(j(n)),c.text(r)):(t=m?e.pointer.y:e.pointer.x,i.$evalAsync(function(){$(B(j(t)))}))}function j(e){var t=(e-(m?I.top:I.left))/(m?I.height:I.width);return m||"rtl"!==q.bidi()||(t=1-t),Math.max(0,Math.min(1,m?1-t:t))}function B(e){return v+(_?1-e:e)*(y-v)}function U(e){var t=(e-v)/(y-v);return _?1-t:t}}}e.$inject=["$$rAF","$window","$mdAria","$mdUtil","$mdConstant","$mdTheming","$mdGesture","$parse","$log","$timeout"],ie.module("material.components.slider",["material.core"]).directive("mdSlider",e).directive("mdSliderContainer",function(){return{controller:function(){},compile:function(e){var t=e.find("md-slider");if(t){var n=t.attr("md-vertical");return n!==ae&&e.attr("md-vertical",""),t.attr("flex")||t.attr("flex",""),function(e,o,t,n){function r(e){o.children().attr("disabled",e),o.find("input").attr("disabled",e)}o.addClass("_md");var s,i=ie.noop;t.disabled?r(!0):t.ngDisabled&&(i=e.$watch(t.ngDisabled,function(e){r(e)})),e.$on("$destroy",function(){i()}),n.fitInputWidthToTextLength=function(e){var t=o[0].querySelector("md-input-container");if(t){var n=getComputedStyle(t),r=parseInt(n.minWidth),i=2*parseInt(n.padding);s=s||parseInt(n.maxWidth);var a=Math.max(s,r+i+r/2*e);t.style.maxWidth=a+"px"}}}}}}})}(),function(){function e(l,u,f,s){var c=f.checkStickySupport();return function(e,t,n){var r=t.controller("mdContent");if(r)if(c)t.css({position:c,top:0,"z-index":2});else{var i=r.$element.data("$$sticky");i||(i=function(e){var r,i=e.$element,a=u.throttle(t);return function(e){var t,n,r=200;function i(){+f.now()-n>r?(t=!1,e.triggerHandler("$scrollend")):(e.triggerHandler("$scroll"),u.throttle(i))}e.on("scroll touchmove",function(){t||(t=!0,u.throttle(i),e.triggerHandler("$scrollstart")),e.triggerHandler("$scroll"),n=+f.now()})}(i),i.on("$scrollstart",a),i.on("$scroll",function e(){var t=i.prop("scrollTop"),n=(e.prevScrollTop||0)<t;if(0!==(e.prevScrollTop=t)){if(n){if(r.next&&r.next.top<=t)return void s(r.next);if(r.current&&r.next&&r.next.top-t<=r.next.height)return void c(r.current,t+(r.next.top-r.next.height-t))}if(!n){if(r.current&&r.prev&&t<r.current.top)return void s(r.prev);if(r.next&&r.current&&t>=r.next.top-r.current.height)return void c(r.current,t+(r.next.top-t-r.current.height))}r.current&&c(r.current,t)}else s(null)}),r={prev:null,current:null,next:null,items:[],add:function(n,e){e.addClass("md-sticky-clone");var t={element:n,clone:e};return r.items.push(t),f.nextTick(function(){i.prepend(t.clone)}),a(),function(){r.items.forEach(function(e,t){e.element[0]===n[0]&&(r.items.splice(t,1),e.clone.remove())}),a()}},refreshElements:t};function t(){var e;r.items.forEach(o),r.items=r.items.sort(function(e,t){return e.top<t.top?-1:1});for(var t=i.prop("scrollTop"),n=r.items.length-1;0<=n;n--)if(t>r.items[n].top){e=r.items[n];break}s(e)}function o(e){var t=e.element[0];for(e.top=0,e.left=0,e.right=0;t&&t!==i[0];)e.top+=t.offsetTop,e.left+=t.offsetLeft,t.offsetParent&&(e.right+=t.offsetParent.offsetWidth-t.offsetWidth-t.offsetLeft),t=t.offsetParent;e.height=e.element.prop("offsetHeight");var n=f.floatingScrollbars()?"0":ae;f.bidi(e.clone,"margin-left",e.left,n),f.bidi(e.clone,"margin-right",n,e.right)}function s(e){if(r.current!==e){r.current&&(c(r.current,null),n(r.current,null)),e&&n(e,"active"),r.current=e;var t=r.items.indexOf(e);r.next=r.items[t+1],r.prev=r.items[t-1],n(r.next,"next"),n(r.prev,"prev")}}function n(e,t){e&&e.state!==t&&(e.state&&(e.clone.attr("sticky-prev-state",e.state),e.element.attr("sticky-prev-state",e.state)),e.clone.attr("sticky-state",t),e.element.attr("sticky-state",t),e.state=t)}function c(e,t){e&&(null===t||t===ae?e.translateY&&(e.translateY=null,e.clone.css(l.CSS.TRANSFORM,"")):(e.translateY=t,f.bidi(e.clone,l.CSS.TRANSFORM,"translate3d("+e.left+"px,"+t+"px,0)","translateY("+t+"px)")))}}(r),r.$element.data("$$sticky",i));var a=n||s(t.clone())(e),o=i.add(t,a);e.$on("$destroy",o)}}}e.$inject=["$mdConstant","$$rAF","$mdUtil","$compile"],ie.module("material.components.sticky",["material.core","material.components.content"]).factory("$mdSticky",e)}(),function(){function e(s,c,l,u){return{restrict:"E",replace:!0,transclude:!0,template:'<div class="md-subheader _md">  <div class="md-subheader-inner">    <div class="md-subheader-content"></div>  </div></div>',link:function(n,r,e,t,i){l(r),r.addClass("_md"),u.prefixer().removeAttribute(r,"ng-repeat");var a=r[0].outerHTML;function o(e){return ie.element(e[0].querySelector(".md-subheader-content"))}i(n,function(e){o(r).append(e)}),r.hasClass("md-no-sticky")||i(n,function(e){var t=c('<div class="md-subheader-wrapper">'+a+"</div>")(n);u.nextTick(function(){o(t).append(e)}),s(n,r,t)})}}}e.$inject=["$mdSticky","$compile","$mdTheming","$mdUtil"],ie.module("material.components.subheader",["material.core","material.components.sticky"]).directive("mdSubheader",e)}(),function(){function e(e){t.$inject=["$parse"];var a="md"+e,o="$md."+e.toLowerCase();return t;function t(i){return{restrict:"A",link:function(t,e,n){var r=i(n[a]);e.on(o,function(e){t.$applyAsync(function(){r(t,{$event:e})})})}}}}ie.module("material.components.swipe",["material.core"]).directive("mdSwipeLeft",e("SwipeLeft")).directive("mdSwipeRight",e("SwipeRight")).directive("mdSwipeUp",e("SwipeUp")).directive("mdSwipeDown",e("SwipeDown"))}(),function(){function e(e,l,u,f,d,h,p){var n=e[0];return{restrict:"E",priority:210,transclude:!0,template:'<div class="md-container"><div class="md-bar"></div><div class="md-thumb-container"><div class="md-thumb" md-ink-ripple md-ink-ripple-checkbox></div></div></div><div ng-transclude class="md-label"></div>',require:"?ngModel",compile:function(e,t){var c=n.compile(e,t).post;return e.addClass("md-dragging"),function(n,r,e,i){i=i||l.fakeNgModel();var t=null;null!=e.disabled?t=function(){return!0}:e.ngDisabled&&(t=f(e.ngDisabled));var a,o=ie.element(r[0].querySelector(".md-thumb-container")),s=ie.element(r[0].querySelector(".md-container"));d(function(){r.removeClass("md-dragging")}),c(n,r,e,i),t&&n.$watch(t,function(e){r.attr("tabindex",e?-1:0)}),h.register(s,"drag"),s.on("$md.dragstart",function(e){t&&t(n)||(e.stopPropagation(),r.addClass("md-dragging"),a={width:o.prop("offsetWidth")})}).on("$md.drag",function(e){if(a){e.stopPropagation(),e.srcEvent&&e.srcEvent.preventDefault();var t=e.pointer.distanceX/a.width,n=i.$viewValue?1+t:t;n=Math.max(0,Math.min(1,n)),o.css(u.CSS.TRANSFORM,"translate3d("+100*n+"%,0,0)"),a.translate=n}}).on("$md.dragend",function(e){var t;a&&(e.stopPropagation(),r.removeClass("md-dragging"),o.css(u.CSS.TRANSFORM,""),(i.$viewValue?a.translate<.5:.5<a.translate)&&(t=!i.$viewValue,n.$apply(function(){i.$setViewValue(t),i.$render()})),a=null,n.skipToggle=!0,p(function(){n.skipToggle=!1},1))})}}}}e.$inject=["mdCheckboxDirective","$mdUtil","$mdConstant","$parse","$$rAF","$mdGesture","$timeout"],ie.module("material.components.switch",["material.core","material.components.checkbox"]).directive("mdSwitch",e)}(),ie.module("material.components.tabs",["material.core","material.components.icon"]),function(){function e(n){return{restrict:"E",link:function(e,t){t.addClass("_md"),e.$on("$destroy",function(){n.destroy()})}}}function t(e){n.$inject=["$animate","$mdToast","$mdUtil","$mdMedia"];var u;function t(e){u=e}return e("$mdToast").setDefaults({methods:["position","hideDelay","capsule","parent","position","toastClass"],options:n}).addPreset("simple",{argOption:"textContent",methods:["textContent","content","action","highlightAction","highlightClass","theme","parent"],options:["$mdToast","$mdTheming",function(n,e){return{template:'<md-toast md-theme="{{ toast.theme }}" ng-class="{\'md-capsule\': toast.capsule}">  <div class="md-toast-content">    <span class="md-toast-text" role="alert" aria-relevant="all" aria-atomic="true">      {{ toast.content }}    </span>    <md-button class="md-action" ng-if="toast.action" ng-click="toast.resolve()"         ng-class="highlightClasses">      {{ toast.action }}    </md-button>  </div></md-toast>',controller:["$scope",function(e){var t=this;t.highlightAction&&(e.highlightClasses=["md-highlight",t.highlightClass]),e.$watch(function(){return u},function(){t.content=u}),this.resolve=function(){n.hide("ok")}}],theme:e.defaultTheme(),controllerAs:"toast",bindToController:!0}}]}).addMethod("updateTextContent",t).addMethod("updateContent",t);function n(r,s,c,n){var l="$md.swipeleft $md.swiperight $md.swipeup $md.swipedown";return{onShow:function(e,i,a){u=a.textContent||a.content;var o=!n("gt-sm");i=c.extractElementByName(i,"md-toast",!0),a.element=i,a.onSwipe=function(e,t){var n=e.type.replace("$md.",""),r=n.replace("swipe","");"down"===r&&-1!=a.position.indexOf("top")&&!o||"up"===r&&(-1!=a.position.indexOf("bottom")||o)||("left"!==r&&"right"!==r||!o)&&(i.addClass("md-"+n),c.nextTick(s.cancel))},a.openClass=(t=a.position,n("gt-xs")?"md-toast-open-"+(-1<t.indexOf("top")?"top":"bottom"):"md-toast-open-bottom"),i.addClass(a.toastClass),a.parent.addClass(a.openClass),c.hasComputedStyle(a.parent,"position","static")&&a.parent.css("position","relative");var t;i.on(l,a.onSwipe),i.addClass(o?"md-bottom":a.position.split(" ").map(function(e){return"md-"+e}).join(" ")),a.parent&&a.parent.addClass("md-toast-animating");return r.enter(i,a.parent).then(function(){a.parent&&a.parent.removeClass("md-toast-animating")})},onRemove:function(e,t,n){t.off(l,n.onSwipe),n.parent&&n.parent.addClass("md-toast-animating");n.openClass&&n.parent.removeClass(n.openClass);return(1==n.$destroy?t.remove():r.leave(t)).then(function(){n.parent&&n.parent.removeClass("md-toast-animating"),c.hasComputedStyle(n.parent,"position","static")&&n.parent.css("position","")})},toastClass:"",position:"bottom left",themable:!0,hideDelay:3e3,autoWrap:!0,transformTemplate:function(e,t){if(t.autoWrap&&e&&!/md-toast-content/g.test(e)){var n=document.createElement("md-template");n.innerHTML=e;for(var r=0;r<n.children.length;r++)if("MD-TOAST"===n.children[r].nodeName){var i=ie.element('<div class="md-toast-content">');i.append(ie.element(n.children[r].childNodes)),n.children[r].appendChild(i[0])}return n.innerHTML}return e||""}}}}e.$inject=["$mdToast"],t.$inject=["$$interimElementProvider"],ie.module("material.components.toast",["material.core","material.components.button"]).directive("mdToast",e).provider("$mdToast",t)}(),function(){function e(m,g,_,e,b){var v=ie.bind(null,_.supplant,"translate3d(0,{0}px,0)");return{template:"",restrict:"E",link:function(d,h,p){h.addClass("_md"),e(h),_.nextTick(function(){h.addClass("_md-toolbar-transitions")},!1),ie.isDefined(p.mdScrollShrink)&&function(){var n,r,i=ie.noop,a=0,o=0,s=p.mdShrinkSpeedFactor||.5,c=m.throttle(t),l=_.debounce(e,5e3);d.$on("$mdContentLoaded",u),p.$observe("mdScrollShrink",function(e){var t=h.parent().find("md-content");!r&&t.length&&u(null,t),!1===(e=d.$eval(e))?i():i=f()}),p.ngShow&&d.$watch(p.ngShow,e);p.ngHide&&d.$watch(p.ngHide,e);function u(e,t){t&&h.parent()[0]===t.parent()[0]&&(r&&r.off("scroll",c),r=t,i=f())}function t(e){var t=e?e.target.scrollTop:o;l(),a=Math.min(n/s,Math.max(0,a+t-o)),h.css(g.CSS.TRANSFORM,v([-a*s])),r.css(g.CSS.TRANSFORM,v([(n-a)*s])),o=t,_.nextTick(function(){var e=h.hasClass("md-whiteframe-z1");e&&!a?b.removeClass(h,"md-whiteframe-z1"):!e&&a&&b.addClass(h,"md-whiteframe-z1")})}function f(){return r?(r.on("scroll",c),r.attr("scroll-shrink","true"),_.nextTick(e,!1),function(){r.off("scroll",c),r.attr("scroll-shrink","false"),e()}):ie.noop}function e(){var e=-(n=h.prop("offsetHeight"))*s+"px";r.css({"margin-top":e,"margin-bottom":e}),t()}d.$on("$destroy",i)}()}}}e.$inject=["$$rAF","$mdConstant","$mdUtil","$mdTheming","$animate"],ie.module("material.components.toolbar",["material.core","material.components.content"]).directive("mdToolbar",e)}(),function(){function e(p,m,a,g,_,b,e,v,t,y){var w="focus touchstart mouseenter",C="blur touchcancel mouseleave",A="md-show";return{restrict:"E",transclude:!0,priority:210,template:'<div class="md-content _md" ng-transclude></div>',scope:{delay:"=?mdDelay",visible:"=?mdVisible",autohide:"=?mdAutohide",direction:"@?mdDirection"},compile:function(e,t){return t.mdDirection||t.$set("mdDirection","bottom"),n}};function n(c,o,l){b(o);var u=_.getParentWithPointerEvents(o),t=ie.element(o[0].getElementsByClassName("md-content")[0]),s=ie.element(document.body),f=null,d=a.throttle(function(){i()});function e(){var e="center top";switch(c.direction){case"left":e="right center";break;case"right":e="left center";break;case"top":e="center bottom";break;case"bottom":e="center top"}t.css("transform-origin",e)}function n(e){e?function(){if(!o[0].textContent.trim())return;if(o.css({top:0,left:0}),s.append(o),_.hasComputedStyle(o,"display","none"))return c.visible=!1,o.detach();i(),v.addClass(t,A).then(function(){o.addClass(A)})}():v.removeClass(t,A).then(function(){o.removeClass(A),c.visible||o.detach()})}function r(e){if((e||!u.attr("aria-label"))&&!u.text().trim()){var t=e||o.text().trim(),n=y(t)(u.scope());u.attr("aria-label",n)}}function h(e){h.queued&&h.value===!!e||!h.queued&&c.visible===!!e||(h.value=!!e,h.queued||(e?(h.queued=!0,f=p(function(){c.visible=h.value,h.queued=!1,f=null,c.visibleWatcher||n(c.visible)},c.delay)):_.nextTick(function(){c.visible=!1,c.visibleWatcher||n(!1)})))}function i(){c.visible&&(e(),function(){var n=_.offsetRect(o,s),t=_.offsetRect(u,s),e=a(c.direction),r=o.prop("offsetParent");c.direction?e=i(e):r&&e.top>r.scrollHeight-n.height-8&&(e=i(a("top")));function i(e){var t={left:e.left,top:e.top};return t.left=Math.min(t.left,s.prop("scrollWidth")-n.width-8),t.left=Math.max(t.left,8),t.top=Math.min(t.top,s.prop("scrollHeight")-n.height-8),t.top=Math.max(t.top,8),t}function a(e){return"left"===e?{left:t.left-n.width-8,top:t.top+t.height/2-n.height/2}:"right"===e?{left:t.left+t.width+8,top:t.top+t.height/2-n.height/2}:"top"===e?{left:t.left+t.width/2-n.width/2,top:t.top-n.height-8}:{left:t.left+t.width/2-n.width/2,top:t.top+t.height+8}}o.css({left:e.left+"px",top:e.top+"px"})}())}v.pin&&v.pin(o,u),c.delay=c.delay||0,o.detach(),o.attr("role","tooltip"),function(){var t=!1;if(u[0]&&"MutationObserver"in m){var e=new MutationObserver(function(e){e.some(function(e){return"disabled"===e.attributeName&&u[0].disabled})&&_.nextTick(function(){h(!1)})});e.observe(u[0],{attributes:!0})}var n=function(){r=document.activeElement===u[0]},r=!1;function i(){h(!1)}ie.element(m).on("blur",n).on("resize",d),document.addEventListener("scroll",i,!0),c.$on("$destroy",function(){ie.element(m).off("blur",n).off("resize",d),u.off(w,a).off(C,o).off("mousedown",s),o(),document.removeEventListener("scroll",i,!0),e&&e.disconnect()});var a=function(e){"focus"===e.type&&r?r=!1:c.visible||(u.on(C,o),h(!0),"touchstart"===e.type&&u.one("touchend",function(){_.nextTick(function(){g.one("touchend",o)},!1)}))},o=function(){var e=c.hasOwnProperty("autohide")?c.autohide:l.hasOwnProperty("mdAutohide");(e||t||g[0].activeElement!==u[0])&&(f&&(p.cancel(f),h.queued=!1,f=null),u.off(C,o),u.triggerHandler("blur"),h(!1)),t=!1},s=function(){t=!0};u.on("mousedown",s),u.on(w,a)}(),e(),function(){if(o[0]&&"MutationObserver"in m){var e=new MutationObserver(function(e){e.forEach(function(e){"md-visible"===e.attributeName&&(c.visibleWatcher||(c.visibleWatcher=c.$watch("visible",n))),"md-direction"===e.attributeName&&i(c.direction)})});e.observe(o[0],{attributes:!0}),l.hasOwnProperty("mdVisible")&&(c.visibleWatcher=c.$watch("visible",n))}else c.visibleWatcher=c.$watch("visible",n),c.$watch("direction",i);var t=function(){c.$destroy()};o.one("$destroy",t),u.one("$destroy",t),c.$on("$destroy",function(){h(!1),o.remove(),e&&e.disconnect()}),-1<o.text().indexOf(y.startSymbol())&&c.$watch(function(){return o.text().trim()},r)}(),r()}}e.$inject=["$timeout","$window","$$rAF","$document","$mdUtil","$mdTheming","$rootElement","$animate","$q","$interpolate"],ie.module("material.components.tooltip",["material.core"]).directive("mdTooltip",e)}(),function(){function e(e){return'<div class="md-virtual-repeat-scroller"><div class="md-virtual-repeat-sizer"></div><div class="md-virtual-repeat-offsetter">'+e[0].innerHTML+"</div></div>"}t.$inject=["$$rAF","$mdUtil","$parse","$rootScope","$window","$scope","$element","$attrs"],i.$inject=["$scope","$element","$attrs","$browser","$document","$rootScope","$$rAF","$mdUtil"],n.$inject=["$parse"],ie.module("material.components.virtualRepeat",["material.core","material.components.showHide"]).directive("mdVirtualRepeatContainer",function(){return{controller:t,template:e,compile:function(e,t){e.addClass("md-virtual-repeat-container").addClass(t.hasOwnProperty("mdOrientHorizontal")?"md-orient-horizontal":"md-orient-vertical")}}}).directive("mdVirtualRepeat",n);var o=1533917;function t(e,n,t,r,i,a,o,s){this.$rootScope=r,this.$scope=a,this.$element=o,this.$attrs=s,this.size=0,this.scrollSize=0,this.scrollOffset=0,this.horizontal=this.$attrs.hasOwnProperty("mdOrientHorizontal"),this.repeater=null,this.autoShrink=this.$attrs.hasOwnProperty("mdAutoShrink"),this.autoShrinkMin=parseInt(this.$attrs.mdAutoShrinkMin,10)||0,this.originalSize=null,this.offsetSize=parseInt(this.$attrs.mdOffsetSize,10)||0,this.oldElementSize=null,this.$attrs.mdTopIndex?(this.bindTopIndex=t(this.$attrs.mdTopIndex),this.topIndex=this.bindTopIndex(this.$scope),ie.isDefined(this.topIndex)||(this.topIndex=0,this.bindTopIndex.assign(this.$scope,0)),this.$scope.$watch(this.bindTopIndex,ie.bind(this,function(e){e!==this.topIndex&&this.scrollToIndex(e)}))):this.topIndex=0,this.scroller=o[0].querySelector(".md-virtual-repeat-scroller"),this.sizer=this.scroller.querySelector(".md-virtual-repeat-sizer"),this.offsetter=this.scroller.querySelector(".md-virtual-repeat-offsetter");var c=ie.bind(this,this.updateSize);e(ie.bind(this,function(){c();var e=n.debounce(c,10,null,!1),t=ie.element(i);this.size||e(),t.on("resize",e),a.$on("$destroy",function(){t.off("resize",e)}),a.$emit("$md-resize-enable"),a.$on("$md-resize",c)}))}function n(r){return{controller:i,priority:1e3,require:["mdVirtualRepeat","^^mdVirtualRepeatContainer"],restrict:"A",terminal:!0,transclude:"element",compile:function(e,t){var n=t.mdVirtualRepeat.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/),a=n[1],o=r(n[2]),s=t.mdExtraName&&r(t.mdExtraName);return function(e,t,n,r,i){r[0].link_(r[1],i,a,o,s)}}}}function i(e,t,n,r,i,a,o,s){this.$scope=e,this.$element=t,this.$attrs=n,this.$browser=r,this.$document=i,this.$rootScope=a,this.$$rAF=o,this.onDemand=s.parseAttributeBoolean(n.mdOnDemand),this.browserCheckUrlChange=r.$$checkUrlChange,this.newStartIndex=0,this.newEndIndex=0,this.newVisibleEnd=0,this.startIndex=0,this.endIndex=0,this.itemSize=e.$eval(n.mdItemSize)||null,this.isFirstRender=!0,this.isVirtualRepeatUpdating_=!1,this.itemsLength=0,this.unwatchItemSize_=ie.noop,this.blocks={},this.pooledBlocks=[],e.$on("$destroy",ie.bind(this,this.cleanupBlocks_))}function r(e){if(!ie.isFunction(e.getItemAtIndex)||!ie.isFunction(e.getLength))throw Error("When md-on-demand is enabled, the Object passed to md-virtual-repeat must implement functions getItemAtIndex() and getLength() ");this.model=e}t.prototype.register=function(e){this.repeater=e,ie.element(this.scroller).on("scroll wheel touchmove touchend",ie.bind(this,this.handleScroll_))},t.prototype.isHorizontal=function(){return this.horizontal},t.prototype.getSize=function(){return this.size},t.prototype.setSize_=function(e){var t=this.getDimensionName_();this.size=e,this.$element[0].style[t]=e+"px"},t.prototype.unsetSize_=function(){this.$element[0].style[this.getDimensionName_()]=this.oldElementSize,this.oldElementSize=null},t.prototype.updateSize=function(){this.originalSize||(this.size=this.isHorizontal()?this.$element[0].clientWidth:this.$element[0].clientHeight,this.handleScroll_(),this.repeater&&this.repeater.containerUpdated())},t.prototype.getScrollSize=function(){return this.scrollSize},t.prototype.getDimensionName_=function(){return this.isHorizontal()?"width":"height"},t.prototype.sizeScroller_=function(e){var t=this.getDimensionName_(),n=this.isHorizontal()?"height":"width";if(this.sizer.innerHTML="",e<o)this.sizer.style[t]=e+"px";else{this.sizer.style[t]="auto",this.sizer.style[n]="auto";var r=Math.floor(e/o),i=document.createElement("div");i.style[t]=o+"px",i.style[n]="1px";for(var a=0;a<r;a++)this.sizer.appendChild(i.cloneNode(!1));i.style[t]=e-r*o+"px",this.sizer.appendChild(i)}},t.prototype.autoShrink_=function(e){var t=Math.max(e,this.autoShrinkMin*this.repeater.getItemSize());if(this.autoShrink&&t!==this.size){null===this.oldElementSize&&(this.oldElementSize=this.$element[0].style[this.getDimensionName_()]);var n=this.originalSize||this.size;if(!n||t<n)this.originalSize||(this.originalSize=this.size),this.setSize_(t);else if(null!==this.originalSize){this.unsetSize_();var r=this.originalSize;this.originalSize=null,r||this.updateSize(),this.setSize_(r||this.size)}this.repeater.containerUpdated()}},t.prototype.setScrollSize=function(e){var t=e+this.offsetSize;this.scrollSize!==t&&(this.sizeScroller_(t),this.autoShrink_(t),this.scrollSize=t)},t.prototype.getScrollOffset=function(){return this.scrollOffset},t.prototype.scrollTo=function(e){this.scroller[this.isHorizontal()?"scrollLeft":"scrollTop"]=e,this.handleScroll_()},t.prototype.scrollToIndex=function(e){var t=this.repeater.getItemSize(),n=this.repeater.itemsLength;n<e&&(e=n-1),this.scrollTo(t*e)},t.prototype.resetScroll=function(){this.scrollTo(0)},t.prototype.handleScroll_=function(){var e=ie.element(document)[0],t="rtl"!=e.dir&&"rtl"!=e.body.dir;t||this.maxSize||(this.scroller.scrollLeft=this.scrollSize,this.maxSize=this.scroller.scrollLeft);var n=this.isHorizontal()?t?this.scroller.scrollLeft:this.maxSize-this.scroller.scrollLeft:this.scroller.scrollTop;if(!(n===this.scrollOffset||n>this.scrollSize-this.size)){var r=this.repeater.getItemSize();if(r){var i=Math.max(0,Math.floor(n/r)-3),a=(this.isHorizontal()?"translateX(":"translateY(")+(!this.isHorizontal()||t?i*r:-i*r)+"px)";if(this.scrollOffset=n,this.offsetter.style.webkitTransform=a,this.offsetter.style.transform=a,this.bindTopIndex){var o=Math.floor(n/r);o!==this.topIndex&&o<this.repeater.getItemCount()&&(this.topIndex=o,this.bindTopIndex.assign(this.$scope,o),this.$rootScope.$$phase||this.$scope.$digest())}this.repeater.containerUpdated()}}},i.prototype.link_=function(e,t,n,r,i){this.container=e,this.transclude=t,this.repeatName=n,this.rawRepeatListExpression=r,this.extraName=i,this.sized=!1,this.repeatListExpression=ie.bind(this,this.repeatListExpression_),this.container.register(this)},i.prototype.cleanupBlocks_=function(){ie.forEach(this.pooledBlocks,function(e){e.element.remove()})},i.prototype.readItemSize_=function(){if(!this.itemSize){this.items=this.repeatListExpression(this.$scope),this.parentNode=this.$element[0].parentNode;var e=this.getBlock_(0);e.element[0].parentNode||this.parentNode.appendChild(e.element[0]),this.itemSize=e.element[0][this.container.isHorizontal()?"offsetWidth":"offsetHeight"]||null,this.blocks[0]=e,this.poolBlock_(0),this.itemSize&&this.containerUpdated()}},i.prototype.repeatListExpression_=function(e){var t=this.rawRepeatListExpression(e);if(this.onDemand&&t){var n=new r(t);return n.$$includeIndexes(this.newStartIndex,this.newVisibleEnd),n}return t},i.prototype.containerUpdated=function(){if(!this.itemSize)return this.unwatchItemSize_&&this.unwatchItemSize_!==ie.noop&&this.unwatchItemSize_(),this.unwatchItemSize_=this.$scope.$watchCollection(this.repeatListExpression,ie.bind(this,function(e){e&&e.length&&this.readItemSize_()})),void(this.$rootScope.$$phase||this.$scope.$digest());this.sized||(this.items=this.repeatListExpression(this.$scope)),this.sized||(this.unwatchItemSize_(),this.sized=!0,this.$scope.$watchCollection(this.repeatListExpression,ie.bind(this,function(e,t){this.isVirtualRepeatUpdating_||this.virtualRepeatUpdate_(e,t)}))),this.updateIndexes_(),(this.newStartIndex!==this.startIndex||this.newEndIndex!==this.endIndex||this.container.getScrollOffset()>this.container.getScrollSize())&&(this.items instanceof r&&this.items.$$includeIndexes(this.newStartIndex,this.newEndIndex),this.virtualRepeatUpdate_(this.items,this.items))},i.prototype.getItemSize=function(){return this.itemSize},i.prototype.getItemCount=function(){return this.itemsLength},i.prototype.virtualRepeatUpdate_=function(e,t){this.isVirtualRepeatUpdating_=!0;var n=e&&e.length||0,r=!1;if(this.items&&n<this.items.length&&0!==this.container.getScrollOffset()){this.items=e;var i=this.container.getScrollOffset();this.container.resetScroll(),this.container.scrollTo(i)}if(n!==this.itemsLength&&(r=!0,this.itemsLength=n),((this.items=e)!==t||r)&&this.updateIndexes_(),this.parentNode=this.$element[0].parentNode,r&&this.container.setScrollSize(n*this.itemSize),this.isFirstRender){this.isFirstRender=!1;var a=this.$attrs.mdStartIndex?this.$scope.$eval(this.$attrs.mdStartIndex):this.container.topIndex;this.container.scrollToIndex(a)}Object.keys(this.blocks).forEach(function(e){var t=parseInt(e,10);(t<this.newStartIndex||t>=this.newEndIndex)&&this.poolBlock_(t)},this),this.$browser.$$checkUrlChange=ie.noop;var o,s,c=[],l=[];for(o=this.newStartIndex;o<this.newEndIndex&&null==this.blocks[o];o++)s=this.getBlock_(o),this.updateBlock_(s,o),c.push(s);for(;null!=this.blocks[o];o++)this.updateBlock_(this.blocks[o],o);for(var u=o-1;o<this.newEndIndex;o++)s=this.getBlock_(o),this.updateBlock_(s,o),l.push(s);c.length&&this.parentNode.insertBefore(this.domFragmentFromBlocks_(c),this.$element[0].nextSibling),l.length&&this.parentNode.insertBefore(this.domFragmentFromBlocks_(l),this.blocks[u]&&this.blocks[u].element[0].nextSibling),this.$browser.$$checkUrlChange=this.browserCheckUrlChange,this.startIndex=this.newStartIndex,this.endIndex=this.newEndIndex,this.isVirtualRepeatUpdating_=!1},i.prototype.getBlock_=function(n){return this.pooledBlocks.length?this.pooledBlocks.pop():(this.transclude(ie.bind(this,function(e,t){r={element:e,new:!0,scope:t},this.updateScope_(t,n),this.parentNode.appendChild(e[0])})),r);var r},i.prototype.updateBlock_=function(e,t){((this.blocks[t]=e).new||e.scope.$index!==t||e.scope[this.repeatName]!==this.items[t])&&(e.new=!1,this.updateScope_(e.scope,t),this.$rootScope.$$phase||e.scope.$digest())},i.prototype.updateScope_=function(e,t){e.$index=t,e[this.repeatName]=this.items&&this.items[t],this.extraName&&(e[this.extraName(this.$scope)]=this.items[t])},i.prototype.poolBlock_=function(e){this.pooledBlocks.push(this.blocks[e]),this.parentNode.removeChild(this.blocks[e].element[0]),delete this.blocks[e]},i.prototype.domFragmentFromBlocks_=function(e){var t=this.$document[0].createDocumentFragment();return e.forEach(function(e){t.appendChild(e.element[0])}),t},i.prototype.updateIndexes_=function(){var e=this.items?this.items.length:0,t=Math.ceil(this.container.getSize()/this.itemSize);this.newStartIndex=Math.max(0,Math.min(e-t,Math.floor(this.container.getScrollOffset()/this.itemSize))),this.newVisibleEnd=this.newStartIndex+t+3,this.newEndIndex=Math.min(e,this.newVisibleEnd),this.newStartIndex=Math.max(0,this.newStartIndex-3)},r.prototype.$$includeIndexes=function(e,t){for(var n=e;n<t;n++)this.hasOwnProperty(n)||(this[n]=this.model.getItemAtIndex(n));this.length=this.model.getLength()}}(),function(){function e(a){return{link:function(e,n,r){var i="";r.$observe("mdWhiteframe",function(e){-1!=(e=parseInt(e,10)||4)&&(24<e||e<1)&&(a.warn("md-whiteframe attribute value is invalid. It should be a number between 1 and 24",n[0]),e=4);var t=-1==e?"":"md-whiteframe-"+e+"dp";r.$updateClass(t,i),i=t})}}}e.$inject=["$log"],ie.module("material.components.whiteframe",["material.core"]).directive("mdWhiteframe",e)}(),function(){e.$inject=["$scope","$element","$mdUtil","$mdConstant","$mdTheming","$window","$animate","$rootElement","$attrs","$q","$log"],ie.module("material.components.autocomplete").controller("MdAutocompleteCtrl",e);var te=225.5,ne=8,re=2;function e(l,u,f,t,e,n,r,i,d,s,a){var o,c,h,p,m=this,g=l.itemsExpr.split(/ in /i),_=g[1],b=null,v={},y=!1,w=[],C=!1,A=0,S=0,T=null,x=null;return o="hidden",c=function(e,t){!e&&t?(E(),b&&(f.disableScrollAround(b.ul),T=function(e){function t(e){e.preventDefault()}return e.on("wheel",t),e.on("touchmove",t),function(){e.off("wheel",t),e.off("touchmove",t)}}(ie.element(b.wrap)))):e&&!t&&(f.enableScrolling(),T&&(T(),T=null))},h=!0,Object.defineProperty(m,o,{get:function(){return h},set:function(e){var t=h;c(h=e,t)}}),m.scope=l,m.parent=l.$parent,m.itemName=g[0],m.matches=[],m.loading=!1,m.hidden=!0,m.index=null,m.messages=[],m.id=f.nextUid(),m.isDisabled=null,m.isRequired=null,m.isReadonly=null,m.hasNotFound=!1,m.keydown=function(e){switch(e.keyCode){case t.KEY_CODE.DOWN_ARROW:if(m.loading)return;e.stopPropagation(),e.preventDefault(),m.index=Math.min(m.index+1,m.matches.length-1),K(),Y();break;case t.KEY_CODE.UP_ARROW:if(m.loading)return;e.stopPropagation(),e.preventDefault(),m.index=m.index<0?m.matches.length-1:Math.max(0,m.index-1),K(),Y();break;case t.KEY_CODE.TAB:if(P(),m.hidden||m.loading||m.index<0||m.matches.length<1)return;q(m.index);break;case t.KEY_CODE.ENTER:if(m.hidden||m.loading||m.index<0||m.matches.length<1)return;if(U())return;e.stopPropagation(),e.preventDefault(),q(m.index);break;case t.KEY_CODE.ESCAPE:if(e.preventDefault(),!(j("blur")||!m.hidden||m.loading||j("clear")&&l.searchText))return;e.stopPropagation(),z(),l.searchText&&j("clear")&&V(),m.hidden=!0,j("blur")&&function(e){e&&(C=y=!1);b.input.blur()}(!0)}},m.blur=function(e){C=!1,y||(m.hidden=F(),ee("ngBlur",{$event:e}))},m.focus=function(e){C=!0,G()&&W()&&Z();m.hidden=F(),ee("ngFocus",{$event:e})},m.clear=function(){z(),V()},m.select=q,m.listEnter=function(){y=!0},m.listLeave=P,m.mouseUp=function(){b.input.focus()},m.getCurrentDisplayValue=H,m.registerSelectedItemWatcher=function(e){-1==w.indexOf(e)&&w.push(e)},m.unregisterSelectedItemWatcher=function(e){var t=w.indexOf(e);-1!=t&&w.splice(t,1)},m.notFoundVisible=X,m.loadingIsVisible=function(){return m.loading&&!U()},m.positionDropdown=E,f.initOptionalProperties(l,d,{searchText:"",selectedItem:null}),e(u),p=parseInt(l.delay,10)||0,d.$observe("disabled",function(e){m.isDisabled=f.parseAttributeBoolean(e,!1)}),d.$observe("required",function(e){m.isRequired=f.parseAttributeBoolean(e,!1)}),d.$observe("readonly",function(e){m.isReadonly=f.parseAttributeBoolean(e,!1)}),l.$watch("searchText",p?f.debounce($,p):$),l.$watch("selectedItem",M),ie.element(n).on("resize",E),l.$on("$destroy",I),void f.nextTick(function(){(b={main:u[0],scrollContainer:u[0].querySelector(".md-virtual-repeat-container"),scroller:u[0].querySelector(".md-virtual-repeat-scroller"),ul:u.find("ul")[0],input:u.find("input")[0],wrap:u.find("md-autocomplete-wrap")[0],root:document.body}).li=b.ul.getElementsByTagName("li"),b.snap=function(){for(var e=u;e.length;e=e.parent())if(ie.isDefined(e.attr("md-autocomplete-snap")))return e[0];return b.wrap}(),b.$=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=ie.element(e[n]));return t}(b),x=b.$.input.controller("ngModel"),b.$.root.length&&(e(b.$.scrollContainer),b.$.scrollContainer.detach(),b.$.root.append(b.$.scrollContainer),r.pin&&r.pin(b.$.scrollContainer,i)),l.autofocus&&u.on("focus",D)});function k(){l.requireMatch&&x&&x.$setValidity("md-require-match",!!l.selectedItem)}function E(){if(!b)return f.nextTick(E,!1,l);var e,n=b.wrap.getBoundingClientRect(),t=b.snap.getBoundingClientRect(),r=b.root.getBoundingClientRect(),i=t.bottom-r.top,a=r.bottom-t.top,o=n.left-r.left,s=n.width,c=function(){var e=0,t=u.find("md-input-container");if(t.length){var n=t.find("input");e=t.prop("offsetHeight"),e-=n.prop("offsetTop"),e-=n.prop("offsetHeight"),e+=t.prop("offsetTop")}return e}();d.mdFloatingLabel&&(o+=re,s-=2*re),e={left:o+"px",minWidth:s+"px",maxWidth:Math.max(n.right-r.left,r.right-n.left)-ne+"px"},a<i&&r.height-n.bottom-ne<te?(e.top="auto",e.bottom=a+"px",e.maxHeight=Math.min(te,n.top-r.top-ne)+"px"):(e.top=i-c+"px",e.bottom="auto",e.maxHeight=Math.min(te,r.bottom+f.scrollTop()-n.bottom-ne)+"px"),b.$.scrollContainer.css(e),f.nextTick(function(){var e=b.scrollContainer.getBoundingClientRect(),t={};e.right>r.right-ne&&(t.left=n.right-e.width+"px");b.$.scrollContainer.css(t)},!1)}function D(){b.input.focus()}function I(){if(m.hidden||f.enableScrolling(),ie.element(n).off("resize",E),b){ie.forEach(["ul","scroller","scrollContainer","input"],function(e){b.$[e].remove()})}}function P(){C||m.hidden||b.input.focus(),y=!1,m.hidden=F()}function M(r,i){k(),r?R(r).then(function(e){var t,n;l.searchText=e,t=r,n=i,w.forEach(function(e){e(t,n)})}):i&&l.searchText&&R(i).then(function(e){e.toString().toLowerCase()===l.searchText.toLowerCase()&&(l.searchText="")}),r!==i&&ie.isFunction(l.itemChange)&&l.itemChange(N(l.selectedItem))}function $(t,n){m.index=l.autoselect?0:-1,t!==n&&(k(),R(l.selectedItem).then(function(e){t!==e&&(l.selectedItem=null,t!==n&&ie.isFunction(l.textChange)&&l.textChange(),W()?Z():(L(!(m.matches=[])),Y()))}))}function O(){return ie.isNumber(l.minLength)?l.minLength:1}function R(e){return s.when((t=e,(t&&l.itemText?l.itemText(N(t)):null)||e)).then(function(e){return e&&!ie.isString(e)&&a.warn("md-autocomplete: Could not resolve display value to a string. Please check the `md-item-text` attribute."),e});var t}function N(e){if(!e)return ae;var t={};return m.itemName&&(t[m.itemName]=e),t}function L(e){m.loading!=e&&(m.loading=e),m.hidden=F()}function F(){return!G()||!(W()&&B()||X())}function G(){return!(m.loading&&!B())&&(!U()&&!!C)}function j(e){return!l.escapeOptions||-1!==l.escapeOptions.toLowerCase().indexOf(e)}function B(){return!!m.matches.length}function U(){return!!m.scope.selectedItem}function H(){return R(m.matches[m.index])}function W(){return(l.searchText||"").length>=O()}function q(e){f.nextTick(function(){R(m.matches[e]).then(function(e){var t=b.$.input.controller("ngModel");t.$setViewValue(e),t.$render()}).finally(function(){l.selectedItem=m.matches[e],L(!1)})},!1)}function z(){m.index=0,m.matches=[]}function V(){L(!0),l.searchText="";var e=document.createEvent("CustomEvent");e.initCustomEvent("change",!0,!0,{value:""}),b.input.dispatchEvent(e),b.input.blur(),l.searchText="",b.input.focus()}function Y(){H().then(function(e){m.messages=[function(){if(A===m.matches.length)return"";switch(A=m.matches.length,m.matches.length){case 0:return"There are no matches available.";case 1:return"There is 1 match available.";default:return"There are "+m.matches.length+" matches available."}}(),e]})}function K(){if(b.li[0]){var e=b.li[0].offsetHeight,t=e*m.index,n=t+e,r=b.scroller.clientHeight,i=b.scroller.scrollTop;t<i?Q(t):i+r<n&&Q(n-r)}}function Q(e){b.$.scrollContainer.controller("mdVirtualRepeatContainer").scrollTo(e)}function X(){var e=(m.scope.searchText||"").length;return m.hasNotFound&&!B()&&(!m.loading||0!==S)&&e>=O()&&(C||y)&&!U()}function Z(){var e=l.searchText||"",t=e.toLowerCase();!l.noCache&&v[t]?J(v[t]):function(t){var e=l.$parent.$eval(_),n=t.toLowerCase(),r=ie.isArray(e),i=!!e.then;function a(e){v[n]=e,(t||"")===(l.searchText||"")&&J(e)}r?a(e):i&&(o=e,o&&(o=s.when(o),S++,L(!0),f.nextTick(function(){o.then(a).finally(function(){0==--S&&L(!1)})},!0,l)));var o}(e),m.hidden=F()}function J(e){var n,t,r;m.matches=e,m.hidden=F(),m.loading&&L(!1),l.selectOnMatch&&(n=l.searchText,t=m.matches,r=t[0],1===t.length&&R(r).then(function(e){var t=n==e;l.matchInsensitive&&!t&&(t=n.toLowerCase()==e.toLowerCase()),t&&q(0)})),Y(),E()}function ee(e,t){d[e]&&l.$parent.$eval(d[e],t||{})}}}(),function(){function e(c){return{controller:"MdAutocompleteCtrl",controllerAs:"$mdAutocompleteCtrl",scope:{inputName:"@mdInputName",inputMinlength:"@mdInputMinlength",inputMaxlength:"@mdInputMaxlength",searchText:"=?mdSearchText",selectedItem:"=?mdSelectedItem",itemsExpr:"@mdItems",itemText:"&mdItemText",placeholder:"@placeholder",noCache:"=?mdNoCache",requireMatch:"=?mdRequireMatch",selectOnMatch:"=?mdSelectOnMatch",matchInsensitive:"=?mdMatchCaseInsensitive",itemChange:"&?mdSelectedItemChange",textChange:"&?mdSearchTextChange",minLength:"=?mdMinLength",delay:"=?mdDelay",autofocus:"=?mdAutofocus",floatingLabel:"@?mdFloatingLabel",autoselect:"=?mdAutoselect",menuClass:"@?mdMenuClass",inputId:"@?mdInputId",escapeOptions:"@?mdEscapeOptions"},link:function(e,t,n,r){r.hasNotFound=!!t.attr("md-has-not-found")},template:function(n,e){var t,r,i=(t=n.find("md-not-found").detach(),(r=t.length?t.html():"")?'<li ng-if="$mdAutocompleteCtrl.notFoundVisible()"                         md-autocomplete-parent-scope>'+r+"</li>":""),a=function(){var e=n.find("md-item-template").detach(),t=e.length?e.html():n.html();e.length||n.empty();return"<md-autocomplete-parent-scope md-autocomplete-replace>"+t+"</md-autocomplete-parent-scope>"}(),o=n.html(),s=e.tabindex;return i&&n.attr("md-has-not-found",!0),n.attr("tabindex","-1"),"        <md-autocomplete-wrap            ng-class=\"{ 'md-whiteframe-z1': !floatingLabel, 'md-menu-showing': !$mdAutocompleteCtrl.hidden }\">          "+(e.mdFloatingLabel?'            <md-input-container ng-if="floatingLabel">              <label>{{floatingLabel}}</label>              <input type="search"                  '+(null!=s?'tabindex="'+s+'"':"")+'                  id="{{ inputId || \'fl-input-\' + $mdAutocompleteCtrl.id }}"                  name="{{inputName}}"                  autocomplete="off"                  ng-required="$mdAutocompleteCtrl.isRequired"                  ng-readonly="$mdAutocompleteCtrl.isReadonly"                  ng-minlength="inputMinlength"                  ng-maxlength="inputMaxlength"                  ng-disabled="$mdAutocompleteCtrl.isDisabled"                  ng-model="$mdAutocompleteCtrl.scope.searchText"                  ng-model-options="{ allowInvalid: true }"                  ng-keydown="$mdAutocompleteCtrl.keydown($event)"                  ng-blur="$mdAutocompleteCtrl.blur($event)"                  ng-focus="$mdAutocompleteCtrl.focus($event)"                  aria-owns="ul-{{$mdAutocompleteCtrl.id}}"                  '+(null!=e.mdNoAsterisk?'md-no-asterisk="'+e.mdNoAsterisk+'"':"")+"                  "+(null!=e.mdSelectOnFocus?'md-select-on-focus=""':"")+'                  aria-label="{{floatingLabel}}"                  aria-autocomplete="list"                  role="combobox"                  aria-haspopup="true"                  aria-activedescendant=""                  aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/>              <div md-autocomplete-parent-scope md-autocomplete-replace>'+o+"</div>            </md-input-container>":'            <input type="search"                '+(null!=s?'tabindex="'+s+'"':"")+'                id="{{ inputId || \'input-\' + $mdAutocompleteCtrl.id }}"                name="{{inputName}}"                ng-if="!floatingLabel"                autocomplete="off"                ng-required="$mdAutocompleteCtrl.isRequired"                ng-disabled="$mdAutocompleteCtrl.isDisabled"                ng-readonly="$mdAutocompleteCtrl.isReadonly"                ng-model="$mdAutocompleteCtrl.scope.searchText"                ng-keydown="$mdAutocompleteCtrl.keydown($event)"                ng-blur="$mdAutocompleteCtrl.blur($event)"                ng-focus="$mdAutocompleteCtrl.focus($event)"                placeholder="{{placeholder}}"                aria-owns="ul-{{$mdAutocompleteCtrl.id}}"                '+(null!=e.mdSelectOnFocus?'md-select-on-focus=""':"")+'                aria-label="{{placeholder}}"                aria-autocomplete="list"                role="combobox"                aria-haspopup="true"                aria-activedescendant=""                aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/>            <button                type="button"                tabindex="-1"                ng-if="$mdAutocompleteCtrl.scope.searchText && !$mdAutocompleteCtrl.isDisabled"                ng-click="$mdAutocompleteCtrl.clear($event)">              <md-icon md-svg-src="'+c.mdClose+'"></md-icon>              <span class="md-visually-hidden">Clear</span>            </button>                ')+'          <md-progress-linear              class="'+(e.mdFloatingLabel?"md-inline":"")+'"              ng-if="$mdAutocompleteCtrl.loadingIsVisible()"              md-mode="indeterminate"></md-progress-linear>          <md-virtual-repeat-container              md-auto-shrink              md-auto-shrink-min="1"              ng-mouseenter="$mdAutocompleteCtrl.listEnter()"              ng-mouseleave="$mdAutocompleteCtrl.listLeave()"              ng-mouseup="$mdAutocompleteCtrl.mouseUp()"              ng-hide="$mdAutocompleteCtrl.hidden"              class="md-autocomplete-suggestions-container md-whiteframe-z1"              ng-class="{ \'md-not-found\': $mdAutocompleteCtrl.notFoundVisible() }"              role="presentation">            <ul class="md-autocomplete-suggestions"                ng-class="::menuClass"                id="ul-{{$mdAutocompleteCtrl.id}}">              <li md-virtual-repeat="item in $mdAutocompleteCtrl.matches"                  ng-class="{ selected: $index === $mdAutocompleteCtrl.index }"                  ng-click="$mdAutocompleteCtrl.select($index)"                  md-extra-name="$mdAutocompleteCtrl.itemName">                  '+a+"                  </li>"+i+'            </ul>          </md-virtual-repeat-container>        </md-autocomplete-wrap>        <aria-status            class="md-visually-hidden"            role="status"            aria-live="assertive">          <p ng-repeat="message in $mdAutocompleteCtrl.messages track by $index" ng-if="message">{{message}}</p>        </aria-status>'}}}e.$inject=["$$mdSvgRegistry"],ie.module("material.components.autocomplete").directive("mdAutocomplete",e)}(),function(){function e(e,u){return{restrict:"AE",compile:function(e,t,l){return function(n,t,e){var r,i,a=n.$mdAutocompleteCtrl,o=a.parent.$new(),s=a.itemName;function c(e,t){o[t]=n[e],n.$watch(e,function(e){u.nextTick(function(){o[t]=e})})}c("$index","$index"),c("item",s),i=r=!1,n.$watch(function(){i||r||(r=!0,n.$$postDigest(function(){i||o.$digest(),r=i=!1}))}),o.$watch(function(){i=!0}),l(o,function(e){t.after(e)})}},terminal:!0,transclude:"element"}}e.$inject=["$compile","$mdUtil"],ie.module("material.components.autocomplete").directive("mdAutocompleteParentScope",e)}(),function(){function e(e,t,n){this.$scope=e,this.$element=t,this.$attrs=n,this.regex=null}e.$inject=["$scope","$element","$attrs"],ie.module("material.components.autocomplete").controller("MdHighlightCtrl",e),e.prototype.init=function(t,n){this.flags=this.$attrs.mdHighlightFlags||"",this.unregisterFn=this.$scope.$watch(function(e){return{term:t(e),contentText:n(e)}}.bind(this),this.onRender.bind(this),!0),this.$element.on("$destroy",this.unregisterFn)},e.prototype.onRender=function(e,t){var n=e.contentText;null!==this.regex&&e.term===t.term||(this.regex=this.createRegex(e.term,this.flags)),e.term?this.applyRegex(n):this.$element.text(n)},e.prototype.applyRegex=function(e){var t=this.resolveTokens(e);this.$element.empty(),t.forEach(function(e){if(e.isMatch){var t=ie.element('<span class="highlight">').text(e.text);this.$element.append(t)}else this.$element.append(document.createTextNode(e))}.bind(this))},e.prototype.resolveTokens=function(r){var i=[],n=0;return r.replace(this.regex,function(e,t){a(n,t),i.push({text:e,isMatch:!0}),n=t+e.length}),a(n),i;function a(e,t){var n=r.slice(e,t);n&&i.push(n)}},e.prototype.createRegex=function(e,t){var n="",r="",i=this.sanitizeRegex(e);return 0<=t.indexOf("^")&&(n="^"),0<=t.indexOf("$")&&(r="$"),new RegExp(n+i+r,t.replace(/[$\^]/g,""))},e.prototype.sanitizeRegex=function(e){return e&&e.toString().replace(/[\\\^\$\*\+\?\.\(\)\|\{}\[\]]/g,"\\$&")}}(),function(){function e(n,r){return{terminal:!0,controller:"MdHighlightCtrl",compile:function(e,t){var i=r(t.mdHighlightText),a=n(e.html());return function(e,t,n,r){r.init(i,a)}}}}e.$inject=["$interpolate","$parse"],ie.module("material.components.autocomplete").directive("mdHighlightText",e)}(),function(){function e(e,t,n,r,i){this.$scope=e,this.$element=t,this.$mdConstant=n,this.$timeout=r,this.$mdUtil=i,this.isEditting=!1,this.parentController=ae,this.enableChipEdit=!1}e.$inject=["$scope","$element","$mdConstant","$timeout","$mdUtil"],ie.module("material.components.chips").controller("MdChipCtrl",e),e.prototype.init=function(e){this.parentController=e,this.enableChipEdit=this.parentController.enableChipEdit,this.enableChipEdit&&(this.$element.on("keydown",this.chipKeyDown.bind(this)),this.$element.on("mousedown",this.chipMouseDown.bind(this)),this.getChipContent().addClass("_md-chip-content-edit-is-enabled"))},e.prototype.getChipContent=function(){var e=this.$element[0].getElementsByClassName("md-chip-content");return ie.element(e[0])},e.prototype.getContentElement=function(){return ie.element(this.getChipContent().children()[0])},e.prototype.getChipIndex=function(){return parseInt(this.$element.attr("index"))},e.prototype.goOutOfEditMode=function(){if(this.isEditting){this.isEditting=!1,this.$element.removeClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="false";var e=this.getChipIndex();this.getContentElement().text()?(this.parentController.updateChipContents(e,this.getContentElement().text()),this.$mdUtil.nextTick(function(){this.parentController.selectedChip===e&&this.parentController.focusChip(e)}.bind(this))):this.parentController.removeChipAndFocusInput(e)}},e.prototype.selectNodeContents=function(e){var t,n;document.body.createTextRange?((t=document.body.createTextRange()).moveToElementText(e),t.select()):G.getSelection&&(n=G.getSelection(),(t=document.createRange()).selectNodeContents(e),n.removeAllRanges(),n.addRange(t))},e.prototype.goInEditMode=function(){this.isEditting=!0,this.$element.addClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="true",this.getChipContent().on("blur",function(){this.goOutOfEditMode()}.bind(this)),this.selectNodeContents(this.getChipContent()[0])},e.prototype.chipKeyDown=function(e){this.isEditting||e.keyCode!==this.$mdConstant.KEY_CODE.ENTER&&e.keyCode!==this.$mdConstant.KEY_CODE.SPACE?this.isEditting&&e.keyCode===this.$mdConstant.KEY_CODE.ENTER&&(e.preventDefault(),this.goOutOfEditMode()):(e.preventDefault(),this.goInEditMode())},e.prototype.chipMouseDown=function(){this.getChipIndex()==this.parentController.selectedChip&&this.enableChipEdit&&!this.isEditting&&this.goInEditMode()}}(),function(){t.$inject=["$mdTheming","$mdUtil"],ie.module("material.components.chips").directive("mdChip",t);var e='    <span ng-if="!$mdChipsCtrl.readonly" class="md-visually-hidden">      {{$mdChipsCtrl.deleteHint}}    </span>';function t(o,n){var r=n.processTemplate(e);return{restrict:"E",require:["^?mdChips","mdChip"],compile:function(e,t){return e.append(n.processTemplate(r)),function(e,t,n,r){var i=r.shift(),a=r.shift();o(t),i&&(a.init(i),ie.element(t[0].querySelector(".md-chip-content")).on("blur",function(){i.resetSelectedChip(),i.$scope.$applyAsync()}))}},controller:"MdChipCtrl"}}}(),function(){function e(i){return{restrict:"A",require:"^mdChips",scope:!1,link:function(t,e,n,r){e.on("click",function(e){t.$apply(function(){r.removeChip(t.$$replacedScope.$index)})}),i(function(){e.attr({tabindex:-1,"aria-hidden":!0}),e.find("button").attr("tabindex","-1")})}}}e.$inject=["$timeout"],ie.module("material.components.chips").directive("mdChipRemove",e)}(),function(){function e(o){return{restrict:"EA",terminal:!0,link:function(e,t,n){var r=e.$parent.$mdChipsCtrl,i=r.parent.$new(!1,r.parent);i.$$replacedScope=e,i.$chip=e.$chip,i.$index=e.$index;var a=(i.$mdChipsCtrl=r).$scope.$eval(n.mdChipTransclude);t.html(a),o(t.contents())(i)},scope:!1}}e.$inject=["$compile"],ie.module("material.components.chips").directive("mdChipTransclude",e)}(),function(){function e(e,t,n,r,i,a,o){this.$timeout=a,this.$mdConstant=n,this.$scope=e,this.parent=e.$parent,this.$log=r,this.$element=i,this.ngModelCtrl=null,this.userInputNgModelCtrl=null,this.autocompleteCtrl=null,this.userInputElement=null,this.items=[],this.selectedChip=-1,this.enableChipEdit=o.parseAttributeBoolean(t.mdEnableChipEdit),this.addOnBlur=o.parseAttributeBoolean(t.mdAddOnBlur),this.deleteHint="Press delete to remove this chip.",this.deleteButtonLabel="Remove",this.chipBuffer="",this.useTransformChip=!1,this.useOnAdd=!1,this.useOnRemove=!1}e.$inject=["$scope","$attrs","$mdConstant","$log","$element","$timeout","$mdUtil"],ie.module("material.components.chips").controller("MdChipsCtrl",e),e.prototype.inputKeydown=function(e){var t=this.getChipBuffer();if(!(this.autocompleteCtrl&&e.isDefaultPrevented&&e.isDefaultPrevented())){if(e.keyCode===this.$mdConstant.KEY_CODE.BACKSPACE){if(0!==this.getCursorPosition(e.target))return;return e.preventDefault(),e.stopPropagation(),void(this.items.length&&this.selectAndFocusChipSafe(this.items.length-1))}if((!this.separatorKeys||this.separatorKeys.length<1)&&(this.separatorKeys=[this.$mdConstant.KEY_CODE.ENTER]),-1!==this.separatorKeys.indexOf(e.keyCode)){if(this.autocompleteCtrl&&this.requireMatch||!t)return;if(e.preventDefault(),this.hasMaxChipsReached())return;this.appendChip(t.trim()),this.resetChipBuffer()}}},e.prototype.getCursorPosition=function(t){try{if(t.selectionStart===t.selectionEnd)return t.selectionStart}catch(e){if(!t.value)return 0}},e.prototype.updateChipContents=function(e,t){0<=e&&e<this.items.length&&(this.items[e]=t,this.ngModelCtrl.$setDirty())},e.prototype.isEditingChip=function(){return!!this.$element[0].getElementsByClassName("_md-chip-editing").length},e.prototype.isRemovable=function(){return!!this.ngModelCtrl&&(this.readonly?this.removable:!ie.isDefined(this.removable)||this.removable)},e.prototype.chipKeydown=function(e){if(!this.getChipBuffer()&&!this.isEditingChip())switch(e.keyCode){case this.$mdConstant.KEY_CODE.BACKSPACE:case this.$mdConstant.KEY_CODE.DELETE:if(this.selectedChip<0)return;if(e.preventDefault(),!this.isRemovable())return;this.removeAndSelectAdjacentChip(this.selectedChip);break;case this.$mdConstant.KEY_CODE.LEFT_ARROW:e.preventDefault(),this.selectedChip<0&&(this.selectedChip=this.items.length),this.items.length&&this.selectAndFocusChipSafe(this.selectedChip-1);break;case this.$mdConstant.KEY_CODE.RIGHT_ARROW:e.preventDefault(),this.selectAndFocusChipSafe(this.selectedChip+1);break;case this.$mdConstant.KEY_CODE.ESCAPE:case this.$mdConstant.KEY_CODE.TAB:if(this.selectedChip<0)return;e.preventDefault(),this.onFocus()}},e.prototype.getPlaceholder=function(){return this.items&&this.items.length&&(""==this.secondaryPlaceholder||this.secondaryPlaceholder)?this.secondaryPlaceholder:this.placeholder},e.prototype.removeAndSelectAdjacentChip=function(e){var t=this.getAdjacentChipIndex(e);this.removeChip(e),this.$timeout(ie.bind(this,function(){this.selectAndFocusChipSafe(t)}))},e.prototype.resetSelectedChip=function(){this.selectedChip=-1},e.prototype.getAdjacentChipIndex=function(e){var t=this.items.length-1;return 0==t?-1:e==t?e-1:e},e.prototype.appendChip=function(t){if(this.useTransformChip&&this.transformChip){var e=this.transformChip({$chip:t});ie.isDefined(e)&&(t=e)}if(ie.isObject(t)&&this.items.some(function(e){return ie.equals(t,e)}))return;if(!(null==t||this.items.indexOf(t)+1)){var n=this.items.push(t);this.ngModelCtrl.$setDirty(),this.validateModel(),this.useOnAdd&&this.onAdd&&this.onAdd({$chip:t,$index:n})}},e.prototype.useTransformChipExpression=function(){this.useTransformChip=!0},e.prototype.useOnAddExpression=function(){this.useOnAdd=!0},e.prototype.useOnRemoveExpression=function(){this.useOnRemove=!0},e.prototype.useOnSelectExpression=function(){this.useOnSelect=!0},e.prototype.getChipBuffer=function(){return this.userInputElement?this.userInputNgModelCtrl?this.userInputNgModelCtrl.$viewValue:this.userInputElement[0].value:this.chipBuffer},e.prototype.resetChipBuffer=function(){this.userInputElement?this.userInputNgModelCtrl?(this.userInputNgModelCtrl.$setViewValue(""),this.userInputNgModelCtrl.$render()):this.userInputElement[0].value="":this.chipBuffer=""},e.prototype.hasMaxChipsReached=function(){return ie.isString(this.maxChips)&&(this.maxChips=parseInt(this.maxChips,10)||0),0<this.maxChips&&this.items.length>=this.maxChips},e.prototype.validateModel=function(){this.ngModelCtrl.$setValidity("md-max-chips",!this.hasMaxChipsReached())},e.prototype.removeChip=function(e){var t=this.items.splice(e,1);this.ngModelCtrl.$setDirty(),this.validateModel(),t&&t.length&&this.useOnRemove&&this.onRemove&&this.onRemove({$chip:t[0],$index:e})},e.prototype.removeChipAndFocusInput=function(e){this.removeChip(e),this.autocompleteCtrl?(this.autocompleteCtrl.hidden=!0,this.$mdUtil.nextTick(this.onFocus.bind(this))):this.onFocus()},e.prototype.selectAndFocusChipSafe=function(e){return this.items.length?e===this.items.length?this.onFocus():(e=Math.max(e,0),e=Math.min(e,this.items.length-1),this.selectChip(e),void this.focusChip(e)):(this.selectChip(-1),void this.onFocus())},e.prototype.selectChip=function(e){-1<=e&&e<=this.items.length?(this.selectedChip=e,this.useOnSelect&&this.onSelect&&this.onSelect({$chip:this.items[this.selectedChip]})):this.$log.warn("Selected Chip index out of bounds; ignoring.")},e.prototype.selectAndFocusChip=function(e){this.selectChip(e),-1!=e&&this.focusChip(e)},e.prototype.focusChip=function(e){this.$element[0].querySelector('md-chip[index="'+e+'"] .md-chip-content').focus()},e.prototype.configureNgModel=function(e){this.ngModelCtrl=e;var t=this;e.$render=function(){t.items=t.ngModelCtrl.$viewValue}},e.prototype.onFocus=function(){var e=this.$element[0].querySelector("input");e&&e.focus(),this.resetSelectedChip()},e.prototype.onInputFocus=function(){this.inputHasFocus=!0,this.resetSelectedChip()},e.prototype.onInputBlur=function(){this.inputHasFocus=!1;var e=this.getChipBuffer().trim();this.validateModel();var t=this.ngModelCtrl.$valid;this.userInputNgModelCtrl&&(t&=this.userInputNgModelCtrl.$valid),this.addOnBlur&&e&&t&&(this.appendChip(e),this.resetChipBuffer())},e.prototype.configureUserInput=function(e){var t=(this.userInputElement=e).controller("ngModel");t!=this.ngModelCtrl&&(this.userInputNgModelCtrl=t);var n=this.$scope,r=this,i=function(e,t){n.$evalAsync(ie.bind(r,t,e))};e.attr({tabindex:0}).on("keydown",function(e){i(e,r.inputKeydown)}).on("focus",function(e){i(e,r.onInputFocus)}).on("blur",function(e){i(e,r.onInputBlur)})},e.prototype.configureAutocomplete=function(e){e&&((this.autocompleteCtrl=e).registerSelectedItemWatcher(ie.bind(this,function(e){if(e){if(this.hasMaxChipsReached())return;this.appendChip(e),this.resetChipBuffer()}})),this.$element.find("input").on("focus",ie.bind(this,this.onInputFocus)).on("blur",ie.bind(this,this.onInputBlur)))},e.prototype.hasFocus=function(){return this.inputHasFocus||0<=this.selectedChip}}(),function(){r.$inject=["$mdTheming","$mdUtil","$compile","$log","$timeout","$$mdSvgRegistry"],ie.module("material.components.chips").directive("mdChips",r);var e='      <md-chips-wrap          ng-keydown="$mdChipsCtrl.chipKeydown($event)"          ng-class="{ \'md-focused\': $mdChipsCtrl.hasFocus(),                       \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly,                      \'md-removable\': $mdChipsCtrl.isRemovable() }"          class="md-chips">        <md-chip ng-repeat="$chip in $mdChipsCtrl.items"            index="{{$index}}"            ng-class="{\'md-focused\': $mdChipsCtrl.selectedChip == $index, \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly}">          <div class="md-chip-content"              tabindex="-1"              aria-hidden="true"              ng-click="!$mdChipsCtrl.readonly && $mdChipsCtrl.focusChip($index)"              ng-focus="!$mdChipsCtrl.readonly && $mdChipsCtrl.selectChip($index)"              md-chip-transclude="$mdChipsCtrl.chipContentsTemplate"></div>          <div ng-if="$mdChipsCtrl.isRemovable()"               class="md-chip-remove-container"               md-chip-transclude="$mdChipsCtrl.chipRemoveTemplate"></div>        </md-chip>        <div class="md-chip-input-container" ng-if="!$mdChipsCtrl.readonly && $mdChipsCtrl.ngModelCtrl">          <div md-chip-transclude="$mdChipsCtrl.chipInputTemplate"></div>        </div>      </md-chips-wrap>',t='        <input            class="md-input"            tabindex="0"            placeholder="{{$mdChipsCtrl.getPlaceholder()}}"            aria-label="{{$mdChipsCtrl.getPlaceholder()}}"            ng-model="$mdChipsCtrl.chipBuffer"            ng-focus="$mdChipsCtrl.onInputFocus()"            ng-blur="$mdChipsCtrl.onInputBlur()"            ng-keydown="$mdChipsCtrl.inputKeydown($event)">',n="      <span>{{$chip}}</span>",i='      <button          class="md-chip-remove"          ng-if="$mdChipsCtrl.isRemovable()"          ng-click="$mdChipsCtrl.removeChipAndFocusInput($$replacedScope.$index)"          type="button"          aria-hidden="true"          tabindex="-1">        <md-icon md-svg-src="{{ $mdChipsCtrl.mdCloseIcon }}"></md-icon>        <span class="md-visually-hidden">          {{$mdChipsCtrl.deleteButtonLabel}}        </span>      </button>';function r(d,h,p,r,m,g){var _={chips:h.processTemplate(e),input:h.processTemplate(t),default:h.processTemplate(n),remove:h.processTemplate(i)};return{template:function(e,t){return t.$mdUserTemplate=e.clone(),_.chips},require:["mdChips"],restrict:"E",controller:"MdChipsCtrl",controllerAs:"$mdChipsCtrl",bindToController:!0,compile:function(e,o){var n=o.$mdUserTemplate;o.$mdUserTemplate=null;var s=t("md-chips>md-chip-template"),c=t(h.prefixer().buildList("md-chip-remove").map(function(e){return"md-chips>*["+e+"]"}).join(","))||_.remove,l=s||_.default,u=t("md-chips>md-autocomplete")||t("md-chips>input")||_.input,f=n.find("md-chip");n[0].querySelector("md-chip-template>*[md-chip-remove]")&&r.warn("invalid placement of md-chip-remove within md-chip-template.");function t(e){if(o.ngModel){var t=n[0].querySelector(e);return t&&t.outerHTML}}return function(e,t,n,r){h.initOptionalProperties(e,o),d(t);var i=r[0];if(s&&(i.enableChipEdit=!1),i.chipContentsTemplate=l,i.chipRemoveTemplate=c,i.chipInputTemplate=u,i.mdCloseIcon=g.mdClose,t.attr({"aria-hidden":!0,tabindex:-1}).on("focus",function(){i.onFocus()}),o.ngModel&&(i.configureNgModel(t.controller("ngModel")),n.mdTransformChip&&i.useTransformChipExpression(),n.mdOnAppend&&i.useOnAppendExpression(),n.mdOnAdd&&i.useOnAddExpression(),n.mdOnRemove&&i.useOnRemoveExpression(),n.mdOnSelect&&i.useOnSelectExpression(),u!=_.input&&e.$watch("$mdChipsCtrl.readonly",function(e){e||h.nextTick(function(){if(0===u.indexOf("<md-autocomplete")){var e=t.find("md-autocomplete");i.configureAutocomplete(e.controller("mdAutocomplete"))}i.configureUserInput(t.find("input"))})}),h.nextTick(function(){var e=t.find("input");e&&e.toggleClass("md-input",!0)})),0<f.length){var a=p(f.clone())(e.$parent);m(function(){t.find("md-chips-wrap").prepend(a)})}}},scope:{readonly:"=readonly",removable:"=mdRemovable",placeholder:"@",secondaryPlaceholder:"@",maxChips:"@mdMaxChips",transformChip:"&mdTransformChip",onAppend:"&mdOnAppend",onAdd:"&mdOnAdd",onRemove:"&mdOnRemove",onSelect:"&mdOnSelect",deleteHint:"@",deleteButtonLabel:"@",separatorKeys:"=?mdSeparatorKeys",requireMatch:"=?mdRequireMatch"}}}}(),function(){function e(){this.selectedItem=null,this.searchText=""}ie.module("material.components.chips").controller("MdContactChipsCtrl",e),e.prototype.queryContact=function(e){var t=this.contactQuery({$query:e});return this.filterSelected?t.filter(ie.bind(this,this.filterSelectedContacts)):t},e.prototype.itemName=function(e){return e[this.contactName]},e.prototype.filterSelectedContacts=function(e){return-1==this.contacts.indexOf(e)}}(),function(){e.$inject=["$mdTheming","$mdUtil"],ie.module("material.components.chips").directive("mdContactChips",e);var n='      <md-chips class="md-contact-chips"          ng-model="$mdContactChipsCtrl.contacts"          md-require-match="$mdContactChipsCtrl.requireMatch"          md-autocomplete-snap>          <md-autocomplete              md-menu-class="md-contact-chips-suggestions"              md-selected-item="$mdContactChipsCtrl.selectedItem"              md-search-text="$mdContactChipsCtrl.searchText"              md-items="item in $mdContactChipsCtrl.queryContact($mdContactChipsCtrl.searchText)"              md-item-text="$mdContactChipsCtrl.itemName(item)"              md-no-cache="true"              md-autoselect              placeholder="{{$mdContactChipsCtrl.contacts.length == 0 ?                  $mdContactChipsCtrl.placeholder : $mdContactChipsCtrl.secondaryPlaceholder}}">            <div class="md-contact-suggestion">              <img                   ng-src="{{item[$mdContactChipsCtrl.contactImage]}}"                  alt="{{item[$mdContactChipsCtrl.contactName]}}"                  ng-if="item[$mdContactChipsCtrl.contactImage]" />              <span class="md-contact-name" md-highlight-text="$mdContactChipsCtrl.searchText"                    md-highlight-flags="{{$mdContactChipsCtrl.highlightFlags}}">                {{item[$mdContactChipsCtrl.contactName]}}              </span>              <span class="md-contact-email" >{{item[$mdContactChipsCtrl.contactEmail]}}</span>            </div>          </md-autocomplete>          <md-chip-template>            <div class="md-contact-avatar">              <img                   ng-src="{{$chip[$mdContactChipsCtrl.contactImage]}}"                  alt="{{$chip[$mdContactChipsCtrl.contactName]}}"                  ng-if="$chip[$mdContactChipsCtrl.contactImage]" />            </div>            <div class="md-contact-name">              {{$chip[$mdContactChipsCtrl.contactName]}}            </div>          </md-chip-template>      </md-chips>';function e(a,o){return{template:function(e,t){return n},restrict:"E",controller:"MdContactChipsCtrl",controllerAs:"$mdContactChipsCtrl",bindToController:!0,compile:function(e,i){return function(e,t,n,r){o.initOptionalProperties(e,i),a(t),t.attr("tabindex","-1")}},scope:{contactQuery:"&mdContacts",placeholder:"@",secondaryPlaceholder:"@",contactName:"@mdContactName",contactImage:"@mdContactImage",contactEmail:"@mdContactEmail",contacts:"=ngModel",requireMatch:"=?mdRequireMatch",highlightFlags:"@?mdHighlightFlags"}}}}(),function(){e.$inject=["$element","$scope","$$mdDateUtil","$mdUtil","$mdConstant","$mdTheming","$$rAF","$attrs","$mdDateLocale"],ie.module("material.components.datepicker").directive("mdCalendar",function(){return{template:function(e,t){var n=t.hasOwnProperty("ngIf")?"":'ng-if="calendarCtrl.isInitialized"',r='<div ng-switch="calendarCtrl.currentView" '+n+'><md-calendar-year ng-switch-when="year"></md-calendar-year><md-calendar-month ng-switch-default></md-calendar-month></div>';return r},scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",dateFilter:"=mdDateFilter",_currentView:"@mdCurrentView"},require:["ngModel","mdCalendar"],controller:e,controllerAs:"calendarCtrl",bindToController:!0,link:function(e,t,n,r){var i=r[0],a=r[1];a.configureNgModel(i)}}});var u=0;function e(e,t,n,r,i,a,o,s,c){a(e),this.$element=e,this.$scope=t,this.dateUtil=n,this.$mdUtil=r,this.keyCode=i.KEY_CODE,this.$$rAF=o,this.today=this.dateUtil.createDateAtMidnight(),this.ngModelCtrl=null,this.currentView=this._currentView||"month",this.SELECTED_DATE_CLASS="md-calendar-selected-date",this.TODAY_CLASS="md-calendar-date-today",this.FOCUSED_DATE_CLASS="md-focus",this.id=u++,this.displayDate=null,this.selectedDate=null,this.firstRenderableDate=null,this.lastRenderableDate=null,this.isInitialized=!1,this.width=0,this.scrollbarWidth=0,s.tabindex||e.attr("tabindex","-1");var l=ie.bind(this,this.handleKeyEvent);ie.element(document.body).on("keydown",l),t.$on("$destroy",function(){ie.element(document.body).off("keydown",l)}),this.minDate&&this.minDate>c.firstRenderableDate?this.firstRenderableDate=this.minDate:this.firstRenderableDate=c.firstRenderableDate,this.maxDate&&this.maxDate<c.lastRenderableDate?this.lastRenderableDate=this.maxDate:this.lastRenderableDate=c.lastRenderableDate}e.prototype.configureNgModel=function(e){var t=this;t.ngModelCtrl=e,t.$mdUtil.nextTick(function(){t.isInitialized=!0}),e.$render=function(){var e=this.$viewValue;t.$scope.$broadcast("md-calendar-parent-changed",e),t.selectedDate||(t.selectedDate=e),t.displayDate||(t.displayDate=t.selectedDate||t.today)}},e.prototype.setNgModelValue=function(e){var t=this.dateUtil.createDateAtMidnight(e);return this.focus(t),this.$scope.$emit("md-calendar-change",t),this.ngModelCtrl.$setViewValue(t),this.ngModelCtrl.$render(),t},e.prototype.setCurrentView=function(e,t){var n=this;n.$mdUtil.nextTick(function(){n.currentView=e,t&&(n.displayDate=ie.isDate(t)?t:new Date(t))})},e.prototype.focus=function(e){if(this.dateUtil.isValidDate(e)){var t=this.$element[0].querySelector(".md-focus");t&&t.classList.remove(this.FOCUSED_DATE_CLASS);var n=this.getDateId(e,this.currentView),r=document.getElementById(n);r&&(r.classList.add(this.FOCUSED_DATE_CLASS),r.focus(),this.displayDate=e)}else{var i=this.$element[0].querySelector("[ng-switch]");i&&i.focus()}},e.prototype.getActionFromKeyEvent=function(e){var t=this.keyCode;switch(e.which){case t.ENTER:return"select";case t.RIGHT_ARROW:return"move-right";case t.LEFT_ARROW:return"move-left";case t.DOWN_ARROW:return e.metaKey?"move-page-down":"move-row-down";case t.UP_ARROW:return e.metaKey?"move-page-up":"move-row-up";case t.PAGE_DOWN:return"move-page-down";case t.PAGE_UP:return"move-page-up";case t.HOME:return"start";case t.END:return"end";default:return null}},e.prototype.handleKeyEvent=function(t){var n=this;this.$scope.$apply(function(){if(t.which==n.keyCode.ESCAPE||t.which==n.keyCode.TAB)return n.$scope.$emit("md-calendar-close"),void(t.which==n.keyCode.TAB&&t.preventDefault());var e=n.getActionFromKeyEvent(t);e&&(t.preventDefault(),t.stopPropagation(),n.$scope.$broadcast("md-calendar-parent-action",e))})},e.prototype.hideVerticalScrollbar=function(r){var i=this,t=r.$element[0],a=t.querySelector(".md-calendar-scroll-mask");function n(){var e=i.width||340,t=i.scrollbarWidth,n=r.calendarScroller;a.style.width=e+"px",n.style.width=e+t+"px",n.style.paddingRight=t+"px"}0<i.width?n():i.$$rAF(function(){var e=r.calendarScroller;i.scrollbarWidth=e.offsetWidth-e.clientWidth,i.width=t.querySelector("table").offsetWidth,n()})},e.prototype.getDateId=function(e,t){if(!t)throw new Error("A namespace for the date id has to be specified.");return["md",this.id,t,e.getFullYear(),e.getMonth(),e.getDate()].join("-")},e.prototype.updateVirtualRepeat=function(){var e=this.$scope,t=e.$on("$md-resize-enable",function(){e.$$phase||e.$apply(),t()})}}(),function(){t.$inject=["$element","$scope","$animate","$q","$$mdDateUtil","$mdDateLocale"],ie.module("material.components.datepicker").directive("mdCalendarMonth",function(){return{template:'<table aria-hidden="true" class="md-calendar-day-header"><thead></thead></table><div class="md-calendar-scroll-mask"><md-virtual-repeat-container class="md-calendar-scroll-container" md-offset-size="'+(e-n)+'"><table role="grid" tabindex="0" class="md-calendar" aria-readonly="true"><tbody md-calendar-month-body role="rowgroup" md-virtual-repeat="i in monthCtrl.items" md-month-offset="$index" class="md-calendar-month" md-start-index="monthCtrl.getSelectedMonthIndex()" md-item-size="'+n+'"></tbody></table></md-virtual-repeat-container></div>',require:["^^mdCalendar","mdCalendarMonth"],controller:t,controllerAs:"monthCtrl",bindToController:!0,link:function(e,t,n,r){var i=r[0],a=r[1];a.initialize(i)}}});var n=265,e=45;function t(e,t,n,r,i,a){this.$element=e,this.$scope=t,this.$animate=n,this.$q=r,this.dateUtil=i,this.dateLocale=a,this.calendarScroller=e[0].querySelector(".md-virtual-repeat-scroller"),this.isInitialized=!1,this.isMonthTransitionInProgress=!1;var o=this;this.cellClickHandler=function(){var e=i.getTimestampFromNode(this);o.$scope.$apply(function(){o.calendarCtrl.setNgModelValue(e)})},this.headerClickHandler=function(){o.calendarCtrl.setCurrentView("year",i.getTimestampFromNode(this))}}t.prototype.initialize=function(e){this.items={length:this.dateUtil.getMonthDistance(e.firstRenderableDate,e.lastRenderableDate)+2},this.calendarCtrl=e,this.attachScopeListeners(),e.updateVirtualRepeat(),e.ngModelCtrl&&e.ngModelCtrl.$render()},t.prototype.getSelectedMonthIndex=function(){var e=this.calendarCtrl;return this.dateUtil.getMonthDistance(e.firstRenderableDate,e.displayDate||e.selectedDate||e.today)},t.prototype.changeSelectedDate=function(r){var i=this.calendarCtrl,a=i.selectedDate;i.selectedDate=r,this.changeDisplayDate(r).then(function(){var e=i.SELECTED_DATE_CLASS;if(a){var t=document.getElementById(i.getDateId(a,"month"));t&&(t.classList.remove(e),t.setAttribute("aria-selected","false"))}if(r){var n=document.getElementById(i.getDateId(r,"month"));n&&(n.classList.add(e),n.setAttribute("aria-selected","true"))}})},t.prototype.changeDisplayDate=function(e){if(!this.isInitialized)return this.buildWeekHeader(),this.calendarCtrl.hideVerticalScrollbar(this),this.isInitialized=!0,this.$q.when();if(!this.dateUtil.isValidDate(e)||this.isMonthTransitionInProgress)return this.$q.when();this.isMonthTransitionInProgress=!0;var t=this.animateDateChange(e);this.calendarCtrl.displayDate=e;var n=this;return t.then(function(){n.isMonthTransitionInProgress=!1}),t},t.prototype.animateDateChange=function(e){if(this.dateUtil.isValidDate(e)){var t=this.dateUtil.getMonthDistance(this.calendarCtrl.firstRenderableDate,e);this.calendarScroller.scrollTop=t*n}return this.$q.when()},t.prototype.buildWeekHeader=function(){for(var e=this.dateLocale.firstDayOfWeek,t=this.dateLocale.shortDays,n=document.createElement("tr"),r=0;r<7;r++){var i=document.createElement("th");i.textContent=t[(r+e)%7],n.appendChild(i)}this.$element.find("thead").append(n)},t.prototype.attachScopeListeners=function(){var n=this;n.$scope.$on("md-calendar-parent-changed",function(e,t){n.changeSelectedDate(t)}),n.$scope.$on("md-calendar-parent-action",ie.bind(this,this.handleKeyEvent))},t.prototype.handleKeyEvent=function(e,t){var n=this.calendarCtrl,r=n.displayDate;if("select"===t)n.setNgModelValue(r);else{var i=null,a=this.dateUtil;switch(t){case"move-right":i=a.incrementDays(r,1);break;case"move-left":i=a.incrementDays(r,-1);break;case"move-page-down":i=a.incrementMonths(r,1);break;case"move-page-up":i=a.incrementMonths(r,-1);break;case"move-row-down":i=a.incrementDays(r,7);break;case"move-row-up":i=a.incrementDays(r,-7);break;case"start":i=a.getFirstDateOfMonth(r);break;case"end":i=a.getLastDateOfMonth(r)}i&&(i=this.dateUtil.clampDate(i,n.minDate,n.maxDate),this.changeDisplayDate(i).then(function(){n.focus(i)}))}}}(),function(){function e(e,t){var s=e('<md-icon md-svg-src="'+t.mdTabsArrow+'"></md-icon>')({})[0];return{require:["^^mdCalendar","^^mdCalendarMonth","mdCalendarMonthBody"],scope:{offset:"=mdMonthOffset"},controller:n,controllerAs:"mdMonthBodyCtrl",bindToController:!0,link:function(e,t,n,r){var i=r[0],a=r[1],o=r[2];o.calendarCtrl=i,o.monthCtrl=a,o.arrowIcon=s.cloneNode(!0),e.$watch(function(){return o.offset},function(e,t){e!==t&&o.generateContent()})}}}function n(e,t,n){this.$element=e,this.dateUtil=t,this.dateLocale=n,this.monthCtrl=null,this.calendarCtrl=null,this.offset=null,this.focusAfterAppend=null}e.$inject=["$compile","$$mdSvgRegistry"],n.$inject=["$element","$$mdDateUtil","$mdDateLocale"],ie.module("material.components.datepicker").directive("mdCalendarMonthBody",e),n.prototype.generateContent=function(){var e=this.dateUtil.incrementMonths(this.calendarCtrl.firstRenderableDate,this.offset);this.$element.empty().append(this.buildCalendarForMonth(e)),this.focusAfterAppend&&(this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS),this.focusAfterAppend.focus(),this.focusAfterAppend=null)},n.prototype.buildDateCell=function(e){var t=this.monthCtrl,n=this.calendarCtrl,r=document.createElement("td");if(r.tabIndex=-1,r.classList.add("md-calendar-date"),r.setAttribute("role","gridcell"),e){r.setAttribute("tabindex","-1"),r.setAttribute("aria-label",this.dateLocale.longDateFormatter(e)),r.id=n.getDateId(e,"month"),r.setAttribute("data-timestamp",e.getTime()),this.dateUtil.isSameDay(e,n.today)&&r.classList.add(n.TODAY_CLASS),this.dateUtil.isValidDate(n.selectedDate)&&this.dateUtil.isSameDay(e,n.selectedDate)&&(r.classList.add(n.SELECTED_DATE_CLASS),r.setAttribute("aria-selected","true"));var i=this.dateLocale.dates[e.getDate()];if(this.isDateEnabled(e)){var a=document.createElement("span");a.classList.add("md-calendar-date-selection-indicator"),a.textContent=i,r.appendChild(a),r.addEventListener("click",t.cellClickHandler),n.displayDate&&this.dateUtil.isSameDay(e,n.displayDate)&&(this.focusAfterAppend=r)}else r.classList.add("md-calendar-date-disabled"),r.textContent=i}return r},n.prototype.isDateEnabled=function(e){return this.dateUtil.isDateWithinRange(e,this.calendarCtrl.minDate,this.calendarCtrl.maxDate)&&(!ie.isFunction(this.calendarCtrl.dateFilter)||this.calendarCtrl.dateFilter(e))},n.prototype.buildDateRow=function(e){var t=document.createElement("tr");return t.setAttribute("role","row"),t.setAttribute("aria-label",this.dateLocale.weekNumberFormatter(e)),t},n.prototype.buildCalendarForMonth=function(e){var t=this.dateUtil.isValidDate(e)?e:new Date,n=this.dateUtil.getFirstDateOfMonth(t),r=this.getLocaleDay_(n),i=this.dateUtil.getNumberOfDaysInMonth(t),a=document.createDocumentFragment(),o=1,s=this.buildDateRow(o);a.appendChild(s);var c=this.offset===this.monthCtrl.items.length-1,l=0,u=document.createElement("td"),f=document.createElement("span");if(f.textContent=this.dateLocale.monthHeaderFormatter(t),u.appendChild(f),u.classList.add("md-calendar-month-label"),this.calendarCtrl.maxDate&&n>this.calendarCtrl.maxDate?u.classList.add("md-calendar-month-label-disabled"):(u.addEventListener("click",this.monthCtrl.headerClickHandler),u.setAttribute("data-timestamp",n.getTime()),u.setAttribute("aria-label",this.dateLocale.monthFormatter(t)),u.appendChild(this.arrowIcon.cloneNode(!0))),r<=2){u.setAttribute("colspan","7");var d=this.buildDateRow();if(d.appendChild(u),a.insertBefore(d,s),c)return a}else l=3,u.setAttribute("colspan","3"),s.appendChild(u);for(var h=l;h<r;h++)s.appendChild(this.buildDateCell());for(var p=r,m=n,g=1;g<=i;g++){if(7===p){if(c)return a;p=0,o++,s=this.buildDateRow(o),a.appendChild(s)}m.setDate(g);var _=this.buildDateCell(m);s.appendChild(_),p++}for(;s.childNodes.length<7;)s.appendChild(this.buildDateCell());for(;a.childNodes.length<6;){for(var b=this.buildDateRow(),v=0;v<7;v++)b.appendChild(this.buildDateCell());a.appendChild(b)}return a},n.prototype.getLocaleDay_=function(e){return(e.getDay()+(7-this.dateLocale.firstDayOfWeek))%7}}(),function(){e.$inject=["$element","$scope","$animate","$q","$$mdDateUtil"],ie.module("material.components.datepicker").directive("mdCalendarYear",function(){return{template:'<div class="md-calendar-scroll-mask"><md-virtual-repeat-container class="md-calendar-scroll-container"><table role="grid" tabindex="0" class="md-calendar" aria-readonly="true"><tbody md-calendar-year-body role="rowgroup" md-virtual-repeat="i in yearCtrl.items" md-year-offset="$index" class="md-calendar-year" md-start-index="yearCtrl.getFocusedYearIndex()" md-item-size="'+n+'"></tbody></table></md-virtual-repeat-container></div>',require:["^^mdCalendar","mdCalendarYear"],controller:e,controllerAs:"yearCtrl",bindToController:!0,link:function(e,t,n,r){var i=r[0],a=r[1];a.initialize(i)}}});var n=88;function e(e,t,n,r,i){this.$element=e,this.$scope=t,this.$animate=n,this.$q=r,this.dateUtil=i,this.calendarScroller=e[0].querySelector(".md-virtual-repeat-scroller"),this.isInitialized=!1,this.isMonthTransitionInProgress=!1;var a=this;this.cellClickHandler=function(){a.calendarCtrl.setCurrentView("month",i.getTimestampFromNode(this))}}e.prototype.initialize=function(e){this.items={length:this.dateUtil.getYearDistance(e.firstRenderableDate,e.lastRenderableDate)+1},this.calendarCtrl=e,this.attachScopeListeners(),e.updateVirtualRepeat(),e.ngModelCtrl&&e.ngModelCtrl.$render()},e.prototype.getFocusedYearIndex=function(){var e=this.calendarCtrl;return this.dateUtil.getYearDistance(e.firstRenderableDate,e.displayDate||e.selectedDate||e.today)},e.prototype.changeDate=function(e){if(!this.isInitialized)return this.calendarCtrl.hideVerticalScrollbar(this),this.isInitialized=!0,this.$q.when();if(this.dateUtil.isValidDate(e)&&!this.isMonthTransitionInProgress){var t=this,n=this.animateDateChange(e);return t.isMonthTransitionInProgress=!0,t.calendarCtrl.displayDate=e,n.then(function(){t.isMonthTransitionInProgress=!1})}},e.prototype.animateDateChange=function(e){if(this.dateUtil.isValidDate(e)){var t=this.dateUtil.getYearDistance(this.calendarCtrl.firstRenderableDate,e);this.calendarScroller.scrollTop=t*n}return this.$q.when()},e.prototype.handleKeyEvent=function(e,t){var n=this.calendarCtrl,r=n.displayDate;if("select"===t)this.changeDate(r).then(function(){n.setCurrentView("month",r),n.focus(r)});else{var i=null,a=this.dateUtil;switch(t){case"move-right":i=a.incrementMonths(r,1);break;case"move-left":i=a.incrementMonths(r,-1);break;case"move-row-down":i=a.incrementMonths(r,6);break;case"move-row-up":i=a.incrementMonths(r,-6)}if(i){var o=n.minDate?a.getFirstDateOfMonth(n.minDate):null,s=n.maxDate?a.getFirstDateOfMonth(n.maxDate):null;i=a.getFirstDateOfMonth(this.dateUtil.clampDate(i,o,s)),this.changeDate(i).then(function(){n.focus(i)})}}},e.prototype.attachScopeListeners=function(){var n=this;n.$scope.$on("md-calendar-parent-changed",function(e,t){n.changeDate(t)}),n.$scope.$on("md-calendar-parent-action",ie.bind(n,n.handleKeyEvent))}}(),function(){function e(e,t,n){this.$element=e,this.dateUtil=t,this.dateLocale=n,this.calendarCtrl=null,this.yearCtrl=null,this.offset=null,this.focusAfterAppend=null}e.$inject=["$element","$$mdDateUtil","$mdDateLocale"],ie.module("material.components.datepicker").directive("mdCalendarYearBody",function(){return{require:["^^mdCalendar","^^mdCalendarYear","mdCalendarYearBody"],scope:{offset:"=mdYearOffset"},controller:e,controllerAs:"mdYearBodyCtrl",bindToController:!0,link:function(e,t,n,r){var i=r[0],a=r[1],o=r[2];o.calendarCtrl=i,o.yearCtrl=a,e.$watch(function(){return o.offset},function(e,t){e!==t&&o.generateContent()})}}}),e.prototype.generateContent=function(){var e=this.dateUtil.incrementYears(this.calendarCtrl.firstRenderableDate,this.offset);this.$element.empty().append(this.buildCalendarForYear(e)),this.focusAfterAppend&&(this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS),this.focusAfterAppend.focus(),this.focusAfterAppend=null)},e.prototype.buildMonthCell=function(e,t){var n=this.calendarCtrl,r=this.yearCtrl,i=this.buildBlankCell(),a=new Date(e,t,1);i.setAttribute("aria-label",this.dateLocale.monthFormatter(a)),i.id=n.getDateId(a,"year"),i.setAttribute("data-timestamp",a.getTime()),this.dateUtil.isSameMonthAndYear(a,n.today)&&i.classList.add(n.TODAY_CLASS),this.dateUtil.isValidDate(n.selectedDate)&&this.dateUtil.isSameMonthAndYear(a,n.selectedDate)&&(i.classList.add(n.SELECTED_DATE_CLASS),i.setAttribute("aria-selected","true"));var o=this.dateLocale.shortMonths[t];if(this.dateUtil.isMonthWithinRange(a,n.minDate,n.maxDate)){var s=document.createElement("span");s.classList.add("md-calendar-date-selection-indicator"),s.textContent=o,i.appendChild(s),i.addEventListener("click",r.cellClickHandler),n.displayDate&&this.dateUtil.isSameMonthAndYear(a,n.displayDate)&&(this.focusAfterAppend=i)}else i.classList.add("md-calendar-date-disabled"),i.textContent=o;return i},e.prototype.buildBlankCell=function(){var e=document.createElement("td");return e.tabIndex=-1,e.classList.add("md-calendar-date"),e.setAttribute("role","gridcell"),e.setAttribute("tabindex","-1"),e},e.prototype.buildCalendarForYear=function(e){var t,n=e.getFullYear(),r=document.createDocumentFragment(),i=document.createElement("tr"),a=document.createElement("td");for(a.className="md-calendar-month-label",a.textContent=n,i.appendChild(a),t=0;t<6;t++)i.appendChild(this.buildMonthCell(n,t));r.appendChild(i);var o=document.createElement("tr");for(o.appendChild(this.buildBlankCell()),t=6;t<12;t++)o.appendChild(this.buildMonthCell(n,t));return r.appendChild(o),r}}(),ie.module("material.components.datepicker").config(["$provide",function(e){function t(){this.months=null,this.shortMonths=null,this.days=null,this.shortDays=null,this.dates=null,this.firstDayOfWeek=0,this.formatDate=null,this.parseDate=null,this.monthHeaderFormatter=null,this.weekNumberFormatter=null,this.longDateFormatter=null,this.msgCalendar="",this.msgOpenCalendar=""}(t.prototype.$get=function(e,r){for(var t=e.DATETIME_FORMATS.SHORTDAY.map(function(e){return e.substring(0,1)}),n=Array(32),i=1;i<=31;i++)n[i]=i;var a=new Date(1880,0,1),o=new Date(a.getFullYear()+250,0,1),s={months:this.months||e.DATETIME_FORMATS.MONTH,shortMonths:this.shortMonths||e.DATETIME_FORMATS.SHORTMONTH,days:this.days||e.DATETIME_FORMATS.DAY,shortDays:this.shortDays||t,dates:this.dates||n,firstDayOfWeek:this.firstDayOfWeek||0,formatDate:this.formatDate||function(e){if(!e)return"";var t=e.toLocaleTimeString(),n=e;return 0!=e.getHours()||-1===t.indexOf("11:")&&-1===t.indexOf("23:")||(n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),1,0,0)),r("date")(n,"M/d/yyyy")},parseDate:this.parseDate||function(e){return new Date(e)},isDateComplete:this.isDateComplete||function(e){return e=e.trim(),/^(([a-zA-Z]{3,}|[0-9]{1,4})([ \.,]+|[\/\-])){2}([a-zA-Z]{3,}|[0-9]{1,4})$/.test(e)},monthHeaderFormatter:this.monthHeaderFormatter||function(e){return s.shortMonths[e.getMonth()]+" "+e.getFullYear()},monthFormatter:this.monthFormatter||function(e){return s.months[e.getMonth()]+" "+e.getFullYear()},weekNumberFormatter:this.weekNumberFormatter||function(e){return"Week "+e},longDateFormatter:this.longDateFormatter||function(e){return[s.days[e.getDay()],s.months[e.getMonth()],s.dates[e.getDate()],e.getFullYear()].join(" ")},msgCalendar:this.msgCalendar||"Calendar",msgOpenCalendar:this.msgOpenCalendar||"Open calendar",firstRenderableDate:this.firstRenderableDate||a,lastRenderableDate:this.lastRenderableDate||o};return s}).$inject=["$locale","$filter"],e.provider("$mdDateLocale",new t)}]),ie.module("material.components.datepicker").factory("$$mdDateUtil",function(){return{getFirstDateOfMonth:n,getNumberOfDaysInMonth:i,getDateInNextMonth:r,getDateInPreviousMonth:a,isInNextMonth:function(e,t){return o(r(e),t)},isInPreviousMonth:function(e,t){var n=a(e);return o(t,n)},getDateMidpoint:function(e,t){return u((e.getTime()+t.getTime())/2)},isSameMonthAndYear:o,getWeekOfMonth:function(e){var t=n(e);return Math.floor((t.getDay()+e.getDate()-1)/7)},incrementDays:function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)},incrementMonths:s,getLastDateOfMonth:function(e){return new Date(e.getFullYear(),e.getMonth(),i(e))},isSameDay:function(e,t){return e.getDate()==t.getDate()&&o(e,t)},getMonthDistance:function(e,t){return 12*(t.getFullYear()-e.getFullYear())+(t.getMonth()-e.getMonth())},isValidDate:c,setDateTimeToMidnight:l,createDateAtMidnight:u,isDateWithinRange:function(e,t,n){var r=u(e),i=c(t)?u(t):null,a=c(n)?u(n):null;return(!i||i<=r)&&(!a||r<=a)},incrementYears:function(e,t){return s(e,12*t)},getYearDistance:function(e,t){return t.getFullYear()-e.getFullYear()},clampDate:function(e,t,n){var r=e;return t&&e<t&&(r=new Date(t.getTime())),n&&n<e&&(r=new Date(n.getTime())),r},getTimestampFromNode:function(e){if(e&&e.hasAttribute("data-timestamp"))return Number(e.getAttribute("data-timestamp"))},isMonthWithinRange:function(e,t,n){var r=e.getMonth(),i=e.getFullYear();return(!t||t.getFullYear()<i||t.getMonth()<=r)&&(!n||n.getFullYear()>i||n.getMonth()>=r)}};function n(e){return new Date(e.getFullYear(),e.getMonth(),1)}function i(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function r(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function a(e){return new Date(e.getFullYear(),e.getMonth()-1,1)}function o(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function s(e,t){var n=new Date(e.getFullYear(),e.getMonth()+t,1),r=i(n);return r<e.getDate()?n.setDate(r):n.setDate(e.getDate()),n}function c(e){return null!=e&&e.getTime&&!isNaN(e.getTime())}function l(e){c(e)&&e.setHours(0,0,0,0)}function u(e){var t;return l(t=ie.isUndefined(e)?new Date:new Date(e)),t}}),function(){function e(i,f,d,h){return{template:function(e,t){var n=t.mdHideIcons,r=t.ariaLabel||t.mdPlaceholder;return("all"===n||"calendar"===n?"":'<md-button class="md-datepicker-button md-icon-button" type="button" tabindex="-1" aria-hidden="true" ng-click="ctrl.openCalendarPane($event)"><md-icon class="md-datepicker-calendar-icon" aria-label="md-calendar" md-svg-src="'+i.mdCalendar+'"></md-icon></md-button>')+'<div class="md-datepicker-input-container" ng-class="{\'md-datepicker-focused\': ctrl.isFocused}"><input '+(r?'aria-label="'+r+'" ':"")+'class="md-datepicker-input" aria-haspopup="true" ng-focus="ctrl.setFocused(true)" ng-blur="ctrl.setFocused(false)"> '+("all"===n||"triangle"===n?"":'<md-button type="button" md-no-ink class="md-datepicker-triangle-button md-icon-button" ng-click="ctrl.openCalendarPane($event)" aria-label="{{::ctrl.dateLocale.msgOpenCalendar}}"><div class="md-datepicker-expand-triangle"></div></md-button>')+'</div><div class="md-datepicker-calendar-pane md-whiteframe-z1"><div class="md-datepicker-input-mask"><div class="md-datepicker-input-mask-opaque"></div></div><div class="md-datepicker-calendar"><md-calendar role="dialog" aria-label="{{::ctrl.dateLocale.msgCalendar}}" md-current-view="{{::ctrl.currentView}}"md-min-date="ctrl.minDate"md-max-date="ctrl.maxDate"md-date-filter="ctrl.dateFilter"ng-model="ctrl.date" ng-if="ctrl.isCalendarOpen"></md-calendar></div></div>'},require:["ngModel","mdDatepicker","?^mdInputContainer","?^form"],scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",placeholder:"@mdPlaceholder",currentView:"@mdCurrentView",dateFilter:"=mdDateFilter",isOpen:"=?mdIsOpen",debounceInterval:"=mdDebounceInterval"},controller:t,controllerAs:"ctrl",bindToController:!0,link:function(e,t,n,r){var i=r[0],a=r[1],o=r[2],s=r[3],c=f.parseAttributeBoolean(n.mdNoAsterisk);if(a.configureNgModel(i,o,h),o){var l=t[0].querySelector(".md-errors-spacer");l&&t.after(ie.element("<div>").append(l)),o.setHasPlaceholder(n.mdPlaceholder),o.input=t,o.element.addClass(p).toggleClass(m,"calendar"!==n.mdHideIcons&&"all"!==n.mdHideIcons),o.label?c||n.$observe("required",function(e){o.label.toggleClass("md-required",!!e)}):d.expect(t,"aria-label",n.mdPlaceholder),e.$watch(o.isErrorGetter||function(){return i.$invalid&&(i.$touched||s&&s.$submitted)},o.setInvalid)}else if(s)var u=e.$watch(function(){return s.$submitted},function(e){e&&(a.updateErrorState(),u())})}}}t.$inject=["$scope","$element","$attrs","$window","$mdConstant","$mdTheming","$mdUtil","$mdDateLocale","$$mdDateUtil","$$rAF","$mdGesture","$filter"],e.$inject=["$$mdSvgRegistry","$mdUtil","$mdAria","inputDirective"],ie.module("material.components.datepicker").directive("mdDatepicker",e);var i="md-datepicker-invalid",f="md-datepicker-open",p="_md-datepicker-floating-label",m="_md-datepicker-has-calendar-icon";function t(e,t,n,r,i,a,o,s,c,l,u,f){this.$window=r,this.dateLocale=s,this.dateUtil=c,this.$mdConstant=i,this.$mdUtil=o,this.$$rAF=l,this.documentElement=ie.element(document.documentElement),this.ngModelCtrl=null,this.inputElement=t[0].querySelector("input"),this.ngInputElement=ie.element(this.inputElement),this.inputContainer=t[0].querySelector(".md-datepicker-input-container"),this.calendarPane=t[0].querySelector(".md-datepicker-calendar-pane"),this.calendarButton=t[0].querySelector(".md-datepicker-button"),this.inputMask=ie.element(t[0].querySelector(".md-datepicker-input-mask-opaque")),this.$element=t,this.$attrs=n,this.$scope=e,this.date=null,this.isFocused=!1,this.isDisabled,this.setDisabled(t[0].disabled||ie.isString(n.disabled)),this.isCalendarOpen=!1,this.openOnFocus=n.hasOwnProperty("mdOpenOnFocus"),this.mdInputContainer=null,this.calendarPaneOpenedFrom=null,this.calendarPane.id="md-date-pane"+o.nextUid(),this.bodyClickHandler=ie.bind(this,this.handleBodyClick),this.windowEventName=u.isIos||u.isAndroid?"orientationchange":"resize",this.windowEventHandler=o.debounce(ie.bind(this,this.closeCalendarPane),100),this.windowBlurHandler=ie.bind(this,this.handleWindowBlur),this.ngDateFilter=f("date"),this.leftMargin=20,this.topMargin=null,n.tabindex?(this.ngInputElement.attr("tabindex",n.tabindex),n.$set("tabindex",null)):n.$set("tabindex","-1"),a(t),a(ie.element(this.calendarPane)),this.installPropertyInterceptors(),this.attachChangeListeners(),this.attachInteractionListeners();var d=this;e.$on("$destroy",function(){d.detachCalendarPane()}),n.mdIsOpen&&e.$watch("ctrl.isOpen",function(e){e?d.openCalendarPane({target:d.inputElement}):d.closeCalendarPane()})}t.prototype.configureNgModel=function(e,t,n){this.ngModelCtrl=e,this.mdInputContainer=t,this.$attrs.$set("type","date"),n[0].link.pre(this.$scope,{on:ie.noop,val:ie.noop,0:{}},this.$attrs,[e]);var r=this;r.ngModelCtrl.$formatters.push(function(e){if(e&&!(e instanceof Date))throw Error("The ng-model for md-datepicker must be a Date instance. Currently the model is a: "+typeof e);return r.date=e,r.inputElement.value=r.dateLocale.formatDate(e),r.mdInputContainer&&r.mdInputContainer.setHasValue(!!e),r.resizeInputElement(),r.updateErrorState(),e}),e.$viewChangeListeners.unshift(ie.bind(this,this.updateErrorState))},t.prototype.attachChangeListeners=function(){var n=this;n.$scope.$on("md-calendar-change",function(e,t){n.setModelValue(t),n.date=t,n.inputElement.value=n.dateLocale.formatDate(t),n.mdInputContainer&&n.mdInputContainer.setHasValue(!!t),n.closeCalendarPane(),n.resizeInputElement(),n.updateErrorState()}),n.ngInputElement.on("input",ie.bind(n,n.resizeInputElement));var e=ie.isDefined(this.debounceInterval)?this.debounceInterval:500;n.ngInputElement.on("input",n.$mdUtil.debounce(n.handleInputEvent,e,n))},t.prototype.attachInteractionListeners=function(){var t=this,n=this.$scope,r=this.$mdConstant.KEY_CODE;t.ngInputElement.on("keydown",function(e){e.altKey&&e.keyCode==r.DOWN_ARROW&&(t.openCalendarPane(e),n.$digest())}),t.openOnFocus&&(t.ngInputElement.on("focus",ie.bind(t,t.openCalendarPane)),ie.element(t.$window).on("blur",t.windowBlurHandler),n.$on("$destroy",function(){ie.element(t.$window).off("blur",t.windowBlurHandler)})),n.$on("md-calendar-close",function(){t.closeCalendarPane()})},t.prototype.installPropertyInterceptors=function(){var t=this;if(this.$attrs.ngDisabled){var e=this.$scope.$parent;e&&e.$watch(this.$attrs.ngDisabled,function(e){t.setDisabled(e)})}Object.defineProperty(this,"placeholder",{get:function(){return t.inputElement.placeholder},set:function(e){t.inputElement.placeholder=e||""}})},t.prototype.setDisabled=function(e){this.isDisabled=e,this.inputElement.disabled=e,this.calendarButton&&(this.calendarButton.disabled=e)},t.prototype.updateErrorState=function(e){var t=e||this.date;if(this.clearErrorState(),this.dateUtil.isValidDate(t)){if(t=this.dateUtil.createDateAtMidnight(t),this.dateUtil.isValidDate(this.minDate)){var n=this.dateUtil.createDateAtMidnight(this.minDate);this.ngModelCtrl.$setValidity("mindate",n<=t)}if(this.dateUtil.isValidDate(this.maxDate)){var r=this.dateUtil.createDateAtMidnight(this.maxDate);this.ngModelCtrl.$setValidity("maxdate",t<=r)}ie.isFunction(this.dateFilter)&&this.ngModelCtrl.$setValidity("filtered",this.dateFilter(t))}else this.ngModelCtrl.$setValidity("valid",null==t);this.ngModelCtrl.$valid||this.inputContainer.classList.add(i)},t.prototype.clearErrorState=function(){this.inputContainer.classList.remove(i),["mindate","maxdate","filtered","valid"].forEach(function(e){this.ngModelCtrl.$setValidity(e,!0)},this)},t.prototype.resizeInputElement=function(){this.inputElement.size=this.inputElement.value.length+3},t.prototype.handleInputEvent=function(){var e=this.inputElement.value,t=e?this.dateLocale.parseDate(e):null;this.dateUtil.setDateTimeToMidnight(t),(""==e||this.dateUtil.isValidDate(t)&&this.dateLocale.isDateComplete(e)&&this.isDateEnabled(t))&&(this.setModelValue(t),this.date=t),this.updateErrorState(t)},t.prototype.isDateEnabled=function(e){return this.dateUtil.isDateWithinRange(e,this.minDate,this.maxDate)&&(!ie.isFunction(this.dateFilter)||this.dateFilter(e))},t.prototype.attachCalendarPane=function(){var e=this.calendarPane,t=document.body;e.style.transform="",this.$element.addClass(f),this.mdInputContainer&&this.mdInputContainer.element.addClass(f),ie.element(t).addClass("md-datepicker-is-showing");var n=this.inputContainer.getBoundingClientRect(),r=t.getBoundingClientRect();(!this.topMargin||this.topMargin<0)&&(this.topMargin=(this.inputMask.parent().prop("clientHeight")-this.ngInputElement.prop("clientHeight"))/2);var i=n.top-r.top-this.topMargin,a=n.left-r.left-this.leftMargin,o=r.top<0&&0==document.body.scrollTop?-r.top:document.body.scrollTop,s=r.left<0&&0==document.body.scrollLeft?-r.left:document.body.scrollLeft,c=o+this.$window.innerHeight,l=s+this.$window.innerWidth;if(this.inputMask.css({position:"absolute",left:this.leftMargin+"px",top:this.topMargin+"px",width:n.width-1+"px",height:n.height-2+"px"}),l<a+360){if(0<l-360)a=l-360;else{a=s;var u=this.$window.innerWidth/360;e.style.transform="scale("+u+")"}e.classList.add("md-datepicker-pos-adjusted")}c<i+368&&o<c-368&&(i=c-368,e.classList.add("md-datepicker-pos-adjusted")),e.style.left=a+"px",e.style.top=i+"px",document.body.appendChild(e),this.$$rAF(function(){e.classList.add("md-pane-open")})},t.prototype.detachCalendarPane=function(){this.$element.removeClass(f),this.mdInputContainer&&this.mdInputContainer.element.removeClass(f),ie.element(document.body).removeClass("md-datepicker-is-showing"),this.calendarPane.classList.remove("md-pane-open"),this.calendarPane.classList.remove("md-datepicker-pos-adjusted"),this.isCalendarOpen&&this.$mdUtil.enableScrolling(),this.calendarPane.parentNode&&this.calendarPane.parentNode.removeChild(this.calendarPane)},t.prototype.openCalendarPane=function(e){if(!this.isCalendarOpen&&!this.isDisabled&&!this.inputFocusedOnWindowBlur){this.isCalendarOpen=this.isOpen=!0,this.calendarPaneOpenedFrom=e.target,this.$mdUtil.disableScrollAround(this.calendarPane),this.attachCalendarPane(),this.focusCalendar(),this.evalAttr("ngFocus");var t=this;this.$mdUtil.nextTick(function(){t.documentElement.on("click touchstart",t.bodyClickHandler)},!1),G.addEventListener(this.windowEventName,this.windowEventHandler)}},t.prototype.closeCalendarPane=function(){if(this.isCalendarOpen){var e=this;e.detachCalendarPane(),e.ngModelCtrl.$setTouched(),e.evalAttr("ngBlur"),e.documentElement.off("click touchstart",e.bodyClickHandler),G.removeEventListener(e.windowEventName,e.windowEventHandler),e.calendarPaneOpenedFrom.focus(),e.calendarPaneOpenedFrom=null,e.openOnFocus?e.$mdUtil.nextTick(t):t()}function t(){e.isCalendarOpen=e.isOpen=!1}},t.prototype.getCalendarCtrl=function(){return ie.element(this.calendarPane.querySelector("md-calendar")).controller("mdCalendar")},t.prototype.focusCalendar=function(){var e=this;this.$mdUtil.nextTick(function(){e.getCalendarCtrl().focus()},!1)},t.prototype.setFocused=function(e){e||this.ngModelCtrl.$setTouched(),this.openOnFocus||this.evalAttr(e?"ngFocus":"ngBlur"),this.isFocused=e},t.prototype.handleBodyClick=function(e){this.isCalendarOpen&&(this.$mdUtil.getClosest(e.target,"md-calendar")||this.closeCalendarPane(),this.$scope.$digest())},t.prototype.handleWindowBlur=function(){this.inputFocusedOnWindowBlur=document.activeElement===this.inputElement},t.prototype.evalAttr=function(e){this.$attrs[e]&&this.$scope.$parent.$eval(this.$attrs[e])},t.prototype.setModelValue=function(e){this.ngModelCtrl.$setViewValue(this.ngDateFilter(e,"yyyy-MM-dd"))}}(),ie.module("material.components.icon").directive("mdIcon",["$mdIcon","$mdTheming","$mdAria","$sce",function(l,u,f,e){return{restrict:"E",link:function(e,t,n){u(t);var r=n.mdFontIcon,i=l.fontSet(n.mdFontSet);n.mdSvgIcon||n.mdSvgSrc||(n.mdFontIcon&&t.addClass("md-font "+n.mdFontIcon),t.addClass(i)),n.$observe("mdFontIcon",c),n.$observe("mdFontSet",c),t[0].getAttribute(n.$attr.mdSvgSrc);var a,o=n.alt||n.mdFontIcon||n.mdSvgIcon||t.text(),s=n.$normalize(n.$attr.mdSvgIcon||n.$attr.mdSvgSrc||"");function c(){if(!n.mdSvgIcon&&!n.mdSvgSrc){n.mdFontIcon&&(t.removeClass(r),t.addClass(n.mdFontIcon),r=n.mdFontIcon);var e=l.fontSet(n.mdFontSet);i!==e&&(t.removeClass(i),t.addClass(e),i=e)}}n["aria-label"]||(""===o||((a=t.parent()).attr("aria-label")||a.text()||a.parent().attr("aria-label")||a.parent().text())?t.text()||f.expect(t,"aria-hidden","true"):(f.expect(t,"aria-label",o),f.expect(t,"role","img"))),s&&n.$observe(s,function(e){t.empty(),e&&l(e).then(function(e){t.empty(),t.append(e)})})}}}]),function(){o.$inject=["config","$templateRequest","$q","$log","$mdUtil","$sce"],ie.module("material.components.icon").constant("$$mdSvgRegistry",{mdTabsArrow:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4=",mdClose:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xOSA2LjQxbC0xLjQxLTEuNDEtNS41OSA1LjU5LTUuNTktNS41OS0xLjQxIDEuNDEgNS41OSA1LjU5LTUuNTkgNS41OSAxLjQxIDEuNDEgNS41OS01LjU5IDUuNTkgNS41OSAxLjQxLTEuNDEtNS41OS01LjU5eiIvPjwvZz48L3N2Zz4=",mdCancel:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xMiAyYy01LjUzIDAtMTAgNC40Ny0xMCAxMHM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTAtNC40Ny0xMC0xMC0xMHptNSAxMy41OWwtMS40MSAxLjQxLTMuNTktMy41OS0zLjU5IDMuNTktMS40MS0xLjQxIDMuNTktMy41OS0zLjU5LTMuNTkgMS40MS0xLjQxIDMuNTkgMy41OSAzLjU5LTMuNTkgMS40MSAxLjQxLTMuNTkgMy41OSAzLjU5IDMuNTl6Ii8+PC9nPjwvc3ZnPg==",mdMenu:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0zLDZIMjFWOEgzVjZNMywxMUgyMVYxM0gzVjExTTMsMTZIMjFWMThIM1YxNloiIC8+PC9zdmc+",mdToggleArrow:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDggNDgiPjxwYXRoIGQ9Ik0yNCAxNmwtMTIgMTIgMi44MyAyLjgzIDkuMTctOS4xNyA5LjE3IDkuMTcgMi44My0yLjgzeiIvPjxwYXRoIGQ9Ik0wIDBoNDh2NDhoLTQ4eiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==",mdCalendar:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgM2gtMVYxaC0ydjJIOFYxSDZ2Mkg1Yy0xLjExIDAtMS45OS45LTEuOTkgMkwzIDE5YzAgMS4xLjg5IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0yVjVjMC0xLjEtLjktMi0yLTJ6bTAgMTZINVY4aDE0djExek03IDEwaDV2NUg3eiIvPjwvc3ZnPg==",mdChecked:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik05IDE2LjE3TDQuODMgMTJsLTEuNDIgMS40MUw5IDE5IDIxIDdsLTEuNDEtMS40MXoiLz48L2c+PC9zdmc+"}).provider("$mdIcon",e);var a={defaultViewBoxSize:24,defaultFontSet:"material-icons",fontSets:[]};function e(){}function r(e,t){this.url=e,this.viewBoxSize=t||a.defaultViewBoxSize}function o(o,a,s,c,r,t){var i={},l={},n=/[-\w@:%\+.~#?&//=]{2,}\.[a-z]{2,4}\b(\/[-\w@:%\+.~#?&//=]*)?/i,u=/^data:image\/svg\+xml[\s*;\w\-\=]*?(base64)?,(.*)$/i;return m.prototype={clone:function(){return this.element.cloneNode(!0)},prepare:function(){var e=this.config?this.config.viewBoxSize:o.defaultViewBoxSize;ie.forEach({fit:"",height:"100%",width:"100%",preserveAspectRatio:"xMidYMid meet",viewBox:this.element.getAttribute("viewBox")||"0 0 "+e+" "+e,focusable:!1},function(e,t){this.element.setAttribute(t,e)},this)}},e.fontSet=function(t){if(ie.isUndefined(t)||!t||!t.length)return o.defaultFontSet;var n=t;return ie.forEach(o.fontSets,function(e){e.alias==t&&(n=e.fontSet||n)}),n},e;function e(e){return e=e||"",ie.isString(e)||(e=t.getTrustedUrl(e)),i[e]?s.when(function(e){var t=e.clone(),n="_cache"+r.nextUid();t.id&&(t.id+=n);return ie.forEach(t.querySelectorAll("[id]"),function(e){e.id+=n}),t}(i[e])):n.test(e)||u.test(e)?p(e).then(f(e)):(-1==e.indexOf(":")&&(e="$default:"+e),(o[e]?d:h)(e).then(f(e)))}function f(n){return function(e){var t;return i[n]=(t=e,ie.isDefined(t.element)&&ie.isDefined(t.config)?e:new m(e,o[n])),i[n].clone()}}function d(e){var t=o[e];return p(t.url).then(function(e){return new m(e,t)})}function h(r){var e=r.substring(0,r.lastIndexOf(":"))||"$default",i=o[e];return i?p(i.url).then(function(e){var t=r.slice(r.lastIndexOf(":")+1),n=e.querySelector("#"+t);return n?new m(n,i):a(r)}):a(r);function a(e){var t="icon "+e+" not found";return c.warn(t),s.reject(t||e)}}function p(e){return u.test(e)?(t=e,n=u.exec(t),i=/base64/i.test(t)?G.atob(n[2]):n[2],s.when(ie.element(i)[0])):(r=e,s(function(t,n){a(r,!0).then(function(e){l[r]||(l[r]=ie.element("<div>").append(e)[0].querySelector("svg")),t(l[r])},function(e){var t=ie.isString(e)?e:e.message||e.data||e.statusText;c.warn(t),n(e)})}));var r,t,n,i}function m(e,t){e&&"svg"!=e.tagName&&(e=ie.element('<svg xmlns="http://www.w3.org/2000/svg">').append(e.cloneNode(!0))[0]),e.getAttribute("xmlns")||e.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.element=e,this.config=t,this.prepare()}}e.prototype={icon:function(e,t,n){return-1==e.indexOf(":")&&(e="$default:"+e),a[e]=new r(t,n),this},iconSet:function(e,t,n){return a[e]=new r(t,n),this},defaultIconSet:function(e,t){var n="$default";return a[n]||(a[n]=new r(e,t)),a[n].viewBoxSize=t||a.defaultViewBoxSize,this},defaultViewBoxSize:function(e){return a.defaultViewBoxSize=e,this},fontSet:function(e,t){return a.fontSets.push({alias:e,fontSet:t||e}),this},defaultFontSet:function(e){return a.defaultFontSet=e||"",this},defaultIconSize:function(e){return a.defaultIconSize=e,this},$get:["$templateRequest","$q","$log","$mdUtil","$sce",function(e,t,n,r,i){return o(a,e,t,n,r,i)}]}}(),function(){function e(i,t,a,o,s,r,e,n){var c,l,u=s.prefixer(),f=this;this.nestLevel=parseInt(t.mdNestLevel,10)||0,this.init=function(e,t){t=t||{},c=e,(l=a[0].querySelector(u.buildSelector(["ng-click","ng-mouseenter"]))).setAttribute("aria-expanded","false"),this.isInMenuBar=t.isInMenuBar,this.nestedMenus=s.nodesToArray(c[0].querySelectorAll(".md-nested-menu")),c.on("$mdInterimElementRemove",function(){f.isOpen=!1,s.nextTick(function(){f.onIsOpenChanged(f.isOpen)})}),s.nextTick(function(){f.onIsOpenChanged(f.isOpen)});var n="menu_container_"+s.nextUid();c.attr("id",n),ie.element(l).attr({"aria-owns":n,"aria-haspopup":"true"}),o.$on("$destroy",ie.bind(this,function(){this.disableHoverListener(),i.destroy()})),c.on("$destroy",function(){i.destroy()})};var d,h,p=[];this.enableHoverListener=function(){p.push(e.$on("$mdMenuOpen",function(e,t){c[0].contains(t[0])&&(f.currentlyOpenMenu=t.controller("mdMenu"),f.isAlreadyOpening=!1,f.currentlyOpenMenu.registerContainerProxy(f.triggerContainerProxy.bind(f)))})),p.push(e.$on("$mdMenuClose",function(e,t){c[0].contains(t[0])&&(f.currentlyOpenMenu=ae)})),(h=ie.element(s.nodesToArray(c[0].children[0].children))).on("mouseenter",f.handleMenuItemHover),h.on("mouseleave",f.handleMenuItemMouseLeave)},this.disableHoverListener=function(){for(;p.length;)p.shift()();h&&h.off("mouseenter",f.handleMenuItemHover),h&&h.off("mouseleave",f.handleMenuItemMouseLeave)},this.handleMenuItemHover=function(e){if(!f.isAlreadyOpening){var t=e.target.querySelector("md-menu")||s.getClosest(e.target,"MD-MENU");d=r(function(){if(t&&(t=ie.element(t).controller("mdMenu")),f.currentlyOpenMenu&&f.currentlyOpenMenu!=t){var e=f.nestLevel+1;f.currentlyOpenMenu.close(!0,{closeTo:e}),f.isAlreadyOpening=!!t,t&&t.open()}else t&&!t.isOpen&&t.open&&(f.isAlreadyOpening=!!t,t&&t.open())},t?100:250);var n=e.currentTarget.querySelector(".md-button:not([disabled])");n&&n.focus()}},this.handleMenuItemMouseLeave=function(){d&&(r.cancel(d),d=ae)},this.open=function(e){e&&e.stopPropagation(),e&&e.preventDefault(),f.isOpen||(f.enableHoverListener(),f.isOpen=!0,s.nextTick(function(){f.onIsOpenChanged(f.isOpen)}),(l=l||(e?e.target:a[0])).setAttribute("aria-expanded","true"),o.$emit("$mdMenuOpen",a),i.show({scope:o,mdMenuCtrl:f,nestLevel:f.nestLevel,element:c,target:l,preserveElement:!0,parent:"body"}).finally(function(){l.setAttribute("aria-expanded","false"),f.disableHoverListener()}))},o.$mdOpenMenu=this.open,this.onIsOpenChanged=function(e){e?(c.attr("aria-hidden","false"),a[0].classList.add("md-open"),ie.forEach(f.nestedMenus,function(e){e.classList.remove("md-open")})):(c.attr("aria-hidden","true"),a[0].classList.remove("md-open")),o.$mdMenuIsOpen=f.isOpen},this.focusMenuContainer=function(){var e=c[0].querySelector(u.buildSelector(["md-menu-focus-target","md-autofocus"]));e||(e=c[0].querySelector(".md-button")),e.focus()},this.registerContainerProxy=function(e){this.containerProxy=e},this.triggerContainerProxy=function(e){this.containerProxy&&this.containerProxy(e)},this.destroy=function(){return f.isOpen?i.destroy():n.when(!1)},this.close=function(e,t){if(f.isOpen){f.isOpen=!1,s.nextTick(function(){f.onIsOpenChanged(f.isOpen)});var n=ie.extend({},t,{skipFocus:e});if(o.$emit("$mdMenuClose",a,n),i.hide(null,t),!e){var r=f.restoreFocusTo||a.find("button")[0];r instanceof ie.element&&(r=r[0]),r&&r.focus()}}},this.positionMode=function(){var e=(t.mdPositionMode||"target").split(" ");return 1==e.length&&e.push(e[0]),{left:e[0],top:e[1]}},this.offsets=function(){var e=(t.mdOffset||"0 0").split(" ").map(parseFloat);if(2==e.length)return{left:e[0],top:e[1]};if(1==e.length)return{top:e[0],left:e[0]};throw Error("Invalid offsets specified. Please follow format <x, y> or <n>")}}e.$inject=["$mdMenu","$attrs","$element","$scope","$mdUtil","$timeout","$rootScope","$q"],ie.module("material.components.menu").controller("mdMenuCtrl",e)}(),function(){function e(a){return{restrict:"E",require:["mdMenu","?^mdMenuBar"],controller:"mdMenuCtrl",scope:!0,compile:function(e){e.addClass("md-menu");var t=e.children()[0],n=a.prefixer();n.hasAttribute(t,"ng-click")||(t=t.querySelector(n.buildSelector(["ng-click","ng-mouseenter"]))||t);!t||"MD-BUTTON"!=t.nodeName&&"BUTTON"!=t.nodeName||t.hasAttribute("type")||t.setAttribute("type","button");if(2!=e.children().length)throw Error("Invalid HTML for md-menu: Expected two children elements.");t&&t.setAttribute("aria-haspopup","true");var r=e[0].querySelectorAll("md-menu"),i=parseInt(e[0].getAttribute("md-nest-level"),10)||0;r&&ie.forEach(a.nodesToArray(r),function(e){e.hasAttribute("md-position-mode")||e.setAttribute("md-position-mode","cascade"),e.classList.add("_md-nested-menu"),e.setAttribute("md-nest-level",i+1)});return o}};function o(e,t,n,r){var i=r[0],a=r[1]!=ae,o=ie.element('<div class="_md md-open-menu-container md-whiteframe-z2"></div>'),s=t.children()[1];t.addClass("_md"),s.hasAttribute("role")||s.setAttribute("role","menu"),o.append(s),t.on("$destroy",function(){o.remove()}),t.append(o),o[0].style.display="none",i.init(o,{isInMenuBar:a})}}e.$inject=["$mdUtil"],ie.module("material.components.menu").directive("mdMenu",e)}(),function(){function e(e){t.$inject=["$mdUtil","$mdTheming","$mdConstant","$document","$window","$q","$$rAF","$animateCss","$animate"];var x=8;return e("$mdMenu").setDefaults({methods:["target"],options:t});function t(C,c,l,A,S,u,f,d,h){var T=C.prefixer(),p=C.dom.animator;return{parent:"body",onShow:function(a,o,s){return function(){if(!s.target)throw Error("$mdMenu.show() expected a target to animate from in options.target");ie.extend(s,{alreadyOpen:!1,isRemoved:!1,target:ie.element(s.target),parent:ie.element(s.parent),menuContentEl:ie.element(o[0].querySelector("md-menu-content"))})}(),c.inherit(s.menuContentEl,s.target),s.cleanupResizing=(n=o,r=s,i=f.throttle(function(){if(!s.isRemoved){var e=_(n,r);n.css(p.toCss(e))}}),S.addEventListener("resize",i),S.addEventListener("orientationchange",i),function(){S.removeEventListener("resize",i),S.removeEventListener("orientationchange",i)}),s.hideBackdrop=(e=a,t=s,t.nestLevel?ie.noop:(t.disableParentScroll&&!C.getClosest(t.target,"MD-DIALOG")?t.restoreScroll=C.disableScrollAround(t.element,t.parent):t.disableParentScroll=!1,t.hasBackdrop&&(t.backdrop=C.createBackdrop(e,"md-menu-backdrop md-click-catcher"),h.enter(t.backdrop,A[0].body)),function(){t.backdrop&&t.backdrop.remove(),t.disableParentScroll&&t.restoreScroll()})),(s.parent.append(o),o[0].style.display="",u(function(e){var t=_(o,s);o.removeClass("md-leave"),d(o,{addClass:"md-active",from:p.toCss(t),to:p.toCss({transform:""})}).start().then(e)})).then(function(e){return s.alreadyOpen=!0,s.cleanupInteraction=function(){o.addClass("md-clickable"),s.backdrop&&s.backdrop.on("click",r),s.menuContentEl.on("keydown",n),s.menuContentEl[0].addEventListener("click",i,!0);var e=s.menuContentEl[0].querySelector(T.buildSelector(["md-menu-focus-target","md-autofocus"]));if(!e){var t=s.menuContentEl[0].firstElementChild;e=t&&(t.querySelector(".md-button:not([disabled])")||t.firstElementChild)}return e&&e.focus(),function(){o.removeClass("md-clickable"),s.backdrop&&s.backdrop.off("click",r),s.menuContentEl.off("keydown",n),s.menuContentEl[0].removeEventListener("click",i,!0)};function n(e){var t;switch(e.keyCode){case l.KEY_CODE.ESCAPE:s.mdMenuCtrl.close(!1,{closeAll:!0}),t=!0;break;case l.KEY_CODE.UP_ARROW:m(e,s.menuContentEl,s,-1)||s.nestLevel||s.mdMenuCtrl.triggerContainerProxy(e),t=!0;break;case l.KEY_CODE.DOWN_ARROW:m(e,s.menuContentEl,s,1)||s.nestLevel||s.mdMenuCtrl.triggerContainerProxy(e),t=!0;break;case l.KEY_CODE.LEFT_ARROW:s.nestLevel?s.mdMenuCtrl.close():s.mdMenuCtrl.triggerContainerProxy(e),t=!0;break;case l.KEY_CODE.RIGHT_ARROW:var n=C.getClosest(e.target,"MD-MENU");n&&n!=s.parent[0]?e.target.click():s.mdMenuCtrl.triggerContainerProxy(e),t=!0}t&&(e.preventDefault(),e.stopImmediatePropagation())}function r(e){e.preventDefault(),e.stopPropagation(),a.$apply(function(){s.mdMenuCtrl.close(!0,{closeAll:!0})})}function i(e){var t=e.target;do{if(t==s.menuContentEl[0])return;if((r(t,["ng-click","ng-href","ui-sref"])||"BUTTON"==t.nodeName||"MD-BUTTON"==t.nodeName)&&!r(t,["md-prevent-menu-close"])){var n=C.getClosest(t,"MD-MENU");t.hasAttribute("disabled")||n&&n!=s.parent[0]||a.$apply(function(){s.mdMenuCtrl.close(!0,{closeAll:!0})});break}}while(t=t.parentNode);function r(e,t){if(!e)return!1;for(var n,r=0;n=t[r];++r)if(T.hasAttribute(e,n))return!0;return!1}}}(),e});var e,t;var n,r,i},onRemove:function(e,n,r){return r.cleanupInteraction&&r.cleanupInteraction(),r.cleanupResizing(),r.hideBackdrop(),!0===r.$destroy?t():d(n,{addClass:"md-leave"}).start().then(t);function t(){var e,t;n.removeClass("md-active"),e=n,(t=r).preserveElement?i(e).style.display="none":i(e).parentNode===i(t.parent)&&i(t.parent).removeChild(i(e)),r.alreadyOpen=!1}},hasBackdrop:!0,disableParentScroll:!0,skipCompile:!0,preserveScope:!0,skipHide:!0,themable:!0};function m(e,t,n,r){for(var i,a=C.getClosest(e.target,"MD-MENU-ITEM"),o=C.nodesToArray(t[0].children),s=o.indexOf(a)+r;0<=s&&s<o.length;s+=r){if(i=g(o[s].querySelector(".md-button")))break}return i}function g(e){if(e&&-1!=e.getAttribute("tabindex"))return e.focus(),A[0].activeElement==e}function _(e,t){var n,r=e[0],i=e[0].firstElementChild,a=i.getBoundingClientRect(),o=A[0].body.getBoundingClientRect(),s=S.getComputedStyle(i),c=t.target[0].querySelector(T.buildSelector("md-menu-origin"))||t.target[0],l=c.getBoundingClientRect(),u={left:o.left+x,top:Math.max(o.top,0)+x,bottom:Math.max(o.bottom,Math.max(o.top,0)+o.height)-x,right:o.right-x},f={top:0,left:0,right:0,bottom:0},d={top:0,left:0,right:0,bottom:0},h=t.mdMenuCtrl.positionMode();"target"!=h.top&&"target"!=h.left&&"target-right"!=h.left||(n=function(){for(var e=0;e<i.children.length;++e)if("none"!=S.getComputedStyle(i.children[e]).display)return i.children[e]}())&&(f=(n=(n=n.firstElementChild||n).querySelector(T.buildSelector("md-menu-align-target"))||n).getBoundingClientRect(),d={top:parseFloat(r.style.top||0),left:parseFloat(r.style.left||0)});var p={},m="top ";switch(h.top){case"target":p.top=d.top+l.top-f.top;break;case"cascade":p.top=l.top-parseFloat(s.paddingTop)-c.style.top;break;case"bottom":p.top=l.top+l.height;break;default:throw new Error('Invalid target mode "'+h.top+'" specified for md-menu on Y axis.')}var g="rtl"==C.bidi();switch(h.left){case"target":p.left=d.left+l.left-f.left,m+=g?"right":"left";break;case"target-left":p.left=l.left,m+="left";break;case"target-right":p.left=l.right-a.width+(a.right-f.right),m+="right";break;case"cascade":var _=g?l.left-a.width<u.left:l.right+a.width<u.right;p.left=_?l.right-c.style.left:l.left-c.style.left-a.width,m+=_?"left":"right";break;case"right":g?(p.left=l.right-l.width,m+="left"):(p.left=l.right-a.width,m+="right");break;case"left":g?(p.left=l.right-a.width,m+="right"):(p.left=l.left,m+="left");break;default:throw new Error('Invalid target mode "'+h.left+'" specified for md-menu on X axis.')}var b,v=t.mdMenuCtrl.offsets();p.top+=v.top,p.left+=v.left,(b=p).top=Math.max(Math.min(b.top,u.bottom-r.offsetHeight),u.top),b.left=Math.max(Math.min(b.left,u.right-r.offsetWidth),u.left);var y=Math.round(100*Math.min(l.width/r.offsetWidth,1))/100,w=Math.round(100*Math.min(l.height/r.offsetHeight,1))/100;return{top:Math.round(p.top),left:Math.round(p.left),transform:t.alreadyOpen?ae:C.supplant("scale({0},{1})",[y,w]),transformOrigin:m}}}function i(e){return e instanceof ie.element&&(e=e[0]),e}}e.$inject=["$$interimElementProvider"],ie.module("material.components.menu").provider("$mdMenu",e)}(),function(){e.$inject=["$scope","$rootScope","$element","$attrs","$mdConstant","$document","$mdUtil","$timeout"],ie.module("material.components.menuBar").controller("MenuBarController",e);var l=["handleKeyDown","handleMenuHover","scheduleOpenHoveredMenu","cancelScheduledOpen"];function e(e,t,n,r,i,a,o,s){this.$element=n,this.$attrs=r,this.$mdConstant=i,this.$mdUtil=o,this.$document=a,this.$scope=e,this.$rootScope=t,this.$timeout=s;var c=this;ie.forEach(l,function(e){c[e]=ie.bind(c,c[e])})}e.prototype.init=function(){var a=this.$element,o=this.$mdUtil,e=this.$scope,s=this,t=[];a.on("keydown",this.handleKeyDown),this.parentToolbar=o.getClosest(a,"MD-TOOLBAR"),t.push(this.$rootScope.$on("$mdMenuOpen",function(e,t){-1!=s.getMenus().indexOf(t[0])&&(a[0].classList.add("md-open"),t[0].classList.add("md-open"),s.currentlyOpenMenu=t.controller("mdMenu"),s.currentlyOpenMenu.registerContainerProxy(s.handleKeyDown),s.enableOpenOnHover())})),t.push(this.$rootScope.$on("$mdMenuClose",function(e,t,n){var r=s.getMenus();if(-1!=r.indexOf(t[0])&&(a[0].classList.remove("md-open"),t[0].classList.remove("md-open")),a[0].contains(t[0])){for(var i=t[0];i&&-1==r.indexOf(i);)i=o.getClosest(i,"MD-MENU",!0);i&&(n.skipFocus||i.querySelector("button:not([disabled])").focus(),s.currentlyOpenMenu=ae,s.disableOpenOnHover(),s.setKeyboardMode(!0))}})),e.$on("$destroy",function(){for(s.disableOpenOnHover();t.length;)t.shift()()}),this.setKeyboardMode(!0)},e.prototype.setKeyboardMode=function(e){e?this.$element[0].classList.add("md-keyboard-mode"):this.$element[0].classList.remove("md-keyboard-mode")},e.prototype.enableOpenOnHover=function(){if(!this.openOnHoverEnabled){var e=this;e.openOnHoverEnabled=!0,e.parentToolbar&&(e.parentToolbar.classList.add("md-has-open-menu"),e.$mdUtil.nextTick(function(){ie.element(e.parentToolbar).on("click",e.handleParentClick)},!1)),ie.element(e.getMenus()).on("mouseenter",e.handleMenuHover)}},e.prototype.handleMenuHover=function(e){this.setKeyboardMode(!1),this.openOnHoverEnabled&&this.scheduleOpenHoveredMenu(e)},e.prototype.disableOpenOnHover=function(){this.openOnHoverEnabled&&(this.openOnHoverEnabled=!1,this.parentToolbar&&(this.parentToolbar.classList.remove("md-has-open-menu"),ie.element(this.parentToolbar).off("click",this.handleParentClick)),ie.element(this.getMenus()).off("mouseenter",this.handleMenuHover))},e.prototype.scheduleOpenHoveredMenu=function(e){var t=ie.element(e.currentTarget).controller("mdMenu");this.setKeyboardMode(!1),this.scheduleOpenMenu(t)},e.prototype.scheduleOpenMenu=function(e){var t=this,n=this.$timeout;e!=t.currentlyOpenMenu&&(n.cancel(t.pendingMenuOpen),t.pendingMenuOpen=n(function(){t.pendingMenuOpen=ae,t.currentlyOpenMenu&&t.currentlyOpenMenu.close(!0,{closeAll:!0}),e.open()},200,!1))},e.prototype.handleKeyDown=function(e){var t,n,r,i=this.$mdConstant.KEY_CODE,a=this.currentlyOpenMenu,o=a&&a.isOpen;switch(this.setKeyboardMode(!0),e.keyCode){case i.DOWN_ARROW:a?a.focusMenuContainer():this.openFocusedMenu(),t=!0;break;case i.UP_ARROW:a&&a.close(),t=!0;break;case i.LEFT_ARROW:n=this.focusMenu(-1),o&&(r=ie.element(n).controller("mdMenu"),this.scheduleOpenMenu(r)),t=!0;break;case i.RIGHT_ARROW:n=this.focusMenu(1),o&&(r=ie.element(n).controller("mdMenu"),this.scheduleOpenMenu(r)),t=!0}t&&(e&&e.preventDefault&&e.preventDefault(),e&&e.stopImmediatePropagation&&e.stopImmediatePropagation())},e.prototype.focusMenu=function(e){var t=this.getMenus(),n=this.getFocusedMenuIndex();-1==n&&(n=this.getOpenMenuIndex());var r=!1;if(-1==n?r=!(n=0):(e<0&&0<n||0<e&&n<t.length-e)&&(n+=e,r=!0),r)return t[n].querySelector("button").focus(),t[n]},e.prototype.openFocusedMenu=function(){var e=this.getFocusedMenu();e&&ie.element(e).controller("mdMenu").open()},e.prototype.getMenus=function(){var e=this.$element;return this.$mdUtil.nodesToArray(e[0].children).filter(function(e){return"MD-MENU"==e.nodeName})},e.prototype.getFocusedMenu=function(){return this.getMenus()[this.getFocusedMenuIndex()]},e.prototype.getFocusedMenuIndex=function(){var e=this.$mdUtil.getClosest(this.$document[0].activeElement,"MD-MENU");return e?this.getMenus().indexOf(e):-1},e.prototype.getOpenMenuIndex=function(){for(var e=this.getMenus(),t=0;t<e.length;++t)if(e[t].classList.contains("md-open"))return t;return-1},e.prototype.handleParentClick=function(e){var t=this.querySelector("md-menu.md-open");t&&!t.contains(e.target)&&ie.element(t).controller("mdMenu").close()}}(),function(){function e(n,i){return{restrict:"E",require:"mdMenuBar",controller:"MenuBarController",compile:function(e,t){return t.ariaRole||e[0].setAttribute("role","menubar"),ie.forEach(e[0].children,function(e){if("MD-MENU"==e.nodeName){e.hasAttribute("md-position-mode")||(e.setAttribute("md-position-mode","left bottom"),e.querySelector("button, a, md-button").setAttribute("role","menuitem"));var t=n.nodesToArray(e.querySelectorAll("md-menu-content"));ie.forEach(t,function(e){e.classList.add("md-menu-bar-menu"),e.classList.add("md-dense"),e.hasAttribute("width")||e.setAttribute("width",5)})}}),e.find("md-menu-item").addClass("md-in-menu-bar"),function(e,t,n,r){t.addClass("_md"),i(e,t),r.init()}}}}e.$inject=["$mdUtil","$mdTheming"],ie.module("material.components.menuBar").directive("mdMenuBar",e)}(),ie.module("material.components.menuBar").directive("mdMenuDivider",function(){return{restrict:"E",compile:function(e,t){t.role||e[0].setAttribute("role","separator")}}}),function(){function e(e,t,n){this.$element=t,this.$attrs=n,this.$scope=e}e.$inject=["$scope","$element","$attrs"],ie.module("material.components.menuBar").controller("MenuItemController",e),e.prototype.init=function(e){var t=this.$element,n=this.$attrs;this.ngModel=e,"checkbox"!=n.type&&"radio"!=n.type||(this.mode=n.type,this.iconEl=t[0].children[0],this.buttonEl=t[0].children[1],e&&this.initClickListeners())},e.prototype.clearNgAria=function(){var t=this.$element[0];ie.forEach(["role","tabindex","aria-invalid","aria-checked"],function(e){t.removeAttribute(e)})},e.prototype.initClickListeners=function(){var e=this,t=this.ngModel,n=this.$scope,r=this.$attrs,i=(this.$element,this.mode);this.handleClick=ie.bind(this,this.handleClick);var a=this.iconEl,o=ie.element(this.buttonEl),s=this.handleClick;function c(e){e?o.off("click",s):o.on("click",s)}r.$observe("disabled",c),c(r.disabled),t.$render=function(){e.clearNgAria(),!function(){{if("radio"!=i)return t.$modelValue;var e=r.ngValue?n.$eval(r.ngValue):r.value;return t.$modelValue==e}}()?(a.style.display="none",o.attr("aria-checked","false")):(a.style.display="",o.attr("aria-checked","true"))},n.$$postDigest(t.$render)},e.prototype.handleClick=function(e){var t,n=this.mode,r=this.ngModel,i=this.$attrs;"checkbox"==n?t=!r.$modelValue:"radio"==n&&(t=i.ngValue?this.$scope.$eval(i.ngValue):i.value),r.$setViewValue(t),r.$render()}}(),function(){function e(u,f){return{controller:"MenuItemController",require:["mdMenuItem","?ngModel"],priority:210,compile:function(r,e){var t,n,i=e.type,a="md-in-menu-bar";if("checkbox"!=i&&"radio"!=i||!r.hasClass(a))l("role","menuitem",r[0].querySelector("md-button, button, a"));else{var o=r[0].textContent,s=ie.element('<md-button type="button"></md-button>'),c='<md-icon md-svg-src="'+f.mdChecked+'"></md-icon>';s.html(o),s.attr("tabindex","0"),r.html(""),r.append(ie.element(c)),r.append(s),r.addClass("md-indent").removeClass(a),l("role","checkbox"==i?"menuitemcheckbox":"menuitemradio",s),t="ng-disabled",n=u.prefixer(t),ie.forEach(n,function(e){if(r[0].hasAttribute(e)){var t=r[0].getAttribute(e);s[0].setAttribute(e,t),r[0].removeAttribute(e)}})}return function(e,t,n,r){var i=r[0],a=r[1];i.init(a)};function l(e,t,n){(n=n||r)instanceof ie.element&&(n=n[0]),n.hasAttribute(e)||n.setAttribute(e,t)}}}}e.$inject=["$mdUtil","$$mdSvgRegistry"],ie.module("material.components.menuBar").directive("mdMenuItem",e)}(),function(){function e(g,_,b,v,y,e){var w=g.requestAnimationFrame||g.webkitRequestAnimationFrame||ie.noop,C=g.cancelAnimationFrame||g.webkitCancelAnimationFrame||g.webkitCancelRequestAnimationFrame||ie.noop,i=g.Math.PI/180,A="determinate",S="indeterminate",T="_md-progress-circular-disabled",x="md-mode-indeterminate";return{restrict:"E",scope:{value:"@",mdDiameter:"@",mdMode:"@"},template:'<svg xmlns="http://www.w3.org/2000/svg"><path fill="none"/></svg>',compile:function(e,t){if(e.attr({"aria-valuemin":0,"aria-valuemax":100,role:"progressbar"}),ie.isUndefined(t.mdMode)){var n=ie.isDefined(t.value)?A:S;t.$set("mdMode",n)}else t.$set("mdMode",t.mdMode.trim());return r}};function r(d,a,o){var h,e,t=a[0],s=ie.element(t.querySelector("svg")),p=ie.element(t.querySelector("path")),n=_.startIndeterminate,r=_.endIndeterminate,i=0,m=0;function c(n,e,t,r,i){var a=++m,o=v.now(),s=e-n,c=D(d.mdDiameter),l=c-I(c),u=t||_.easeFn,f=r||_.duration;e===n?p.attr("d",k(e,c,l,i)):h=w(function e(){var t=g.Math.max(0,g.Math.min(v.now()-o,f));p.attr("d",k(u(t,n,s,f),c,l,i)),a===m&&t<f&&(h=w(e))})}function l(){c(n,r,_.easeFnIndeterminate,_.durationIndeterminate,i),i=(i+r)%100;var e=n;n=-r,r=-e}function u(){e||(e=y(l,_.durationIndeterminate+50,0,!1),l(),a.addClass(x).removeAttr("aria-valuenow"))}function f(){e&&(y.cancel(e),e=null,a.removeClass(x))}b(a),a.toggleClass(T,o.hasOwnProperty("disabled")),d.mdMode===S&&u(),d.$on("$destroy",function(){f(),h&&C(h)}),d.$watchGroup(["value","mdMode",function(){var e=t.disabled;return!0===e||!1===e?e:ie.isDefined(a.attr("disabled"))}],function(e,t){var n=e[1],r=e[2];if(r!==t[2]&&a.toggleClass(T,!!r),r)f();else if(n!==A&&n!==S&&(n=S,o.$set("mdMode",n)),n===S)u();else{var i=E(e[0]);f(),a.attr("aria-valuenow",i),c(E(t[0]),i)}}),d.$watch("mdDiameter",function(e){var t=D(e),n=I(t),r=t/2+"px",i={width:t+"px",height:t+"px"};s[0].setAttribute("viewBox","0 0 "+t+" "+t),s.css(i).css("transform-origin",r+" "+r+" "+r),a.css(i),p.css("stroke-width",n+"px")})}function k(e,t,n,r){var i=t/2,a=n/2,o=3.5999*(r||0),s=3.5999*e;return"M"+c(i,a,o)+"A"+a+","+a+" 0 "+(s<0?-180<=s?0:1:s<=180?0:1)+","+(s<0?0:1)+" "+c(i,a,s+o)}function c(e,t,n){var r=(n-90)*i;return e+t*g.Math.cos(r)+","+(e+t*g.Math.sin(r))}function E(e){return g.Math.max(0,g.Math.min(e||0,100))}function D(e){var t=_.progressSize;if(e){var n=parseFloat(e);return e.lastIndexOf("%")===e.length-1&&(n=n/100*t),n}return t}function I(e){return _.strokeWidth/100*e}}e.$inject=["$window","$mdProgressCircular","$mdTheming","$mdUtil","$interval","$log"],ie.module("material.components.progressCircular").directive("mdProgressCircular",e)}(),ie.module("material.components.progressCircular").provider("$mdProgressCircular",function(){var t={progressSize:50,strokeWidth:10,duration:100,easeFn:e,durationIndeterminate:500,startIndeterminate:3,endIndeterminate:80,easeFnIndeterminate:n,easingPresets:{linearEase:e,materialEase:n}};return{configure:function(e){return t=ie.extend(t,e||{})},$get:function(){return t}};function e(e,t,n,r){return n*e/r+t}function n(e,t,n,r){var i=(e/=r)*e,a=i*e;return t+n*(6*a*i+-15*i*i+10*a)}}),ie.module("material.components.tabs").directive("mdTab",function(){return{require:"^?mdTabs",terminal:!0,compile:function(e,t){var n=c(e,"md-tab-label"),r=c(e,"md-tab-body");if(0==n.length&&(n=ie.element("<md-tab-label></md-tab-label>"),t.label?n.text(t.label):n.append(e.contents()),0==r.length)){var i=e.contents().detach();(r=ie.element("<md-tab-body></md-tab-body>")).append(i)}return e.append(n),r.html()&&e.append(r),a},scope:{active:"=?mdActive",disabled:"=?ngDisabled",select:"&?mdOnSelect",deselect:"&?mdOnDeselect"}};function a(e,t,n,r){if(r){var i=r.getTabElementIndex(t),a=c(t,"md-tab-body").remove(),o=c(t,"md-tab-label").remove(),s=r.insertTab({scope:e,parent:e.$parent,index:i,element:t,template:a.html(),label:o.html()},i);e.select=e.select||ie.noop,e.deselect=e.deselect||ie.noop,e.$watch("active",function(e){e&&r.select(s.getIndex(),!0)}),e.$watch("disabled",function(){r.refreshIndex()}),e.$watch(function(){return r.getTabElementIndex(t)},function(e){s.index=e,r.updateTabOrder()}),e.$on("$destroy",function(){r.removeTab(s)})}}function c(e,t){for(var n=e[0].children,r=0,i=n.length;r<i;r++){var a=n[r];if(a.tagName===t.toUpperCase())return ie.element(a)}return ie.element()}}),ie.module("material.components.tabs").directive("mdTabItem",function(){return{require:"^?mdTabs",link:function(e,t,n,r){r&&r.attachRipple(e,t)}}}),ie.module("material.components.tabs").directive("mdTabLabel",function(){return{terminal:!0}}),function(){function e(r){return{restrict:"A",compile:function(e,t){var n=r(t.mdTabScroll,null,!0);return function(t,e){e.on("mousewheel",function(e){t.$apply(function(){n(t,{$event:e})})})}}}}e.$inject=["$parse"],ie.module("material.components.tabs").directive("mdTabScroll",e)}(),function(){function e(o,c,e,r,i,l,u,a,t,n){var s,f,d=this,h=!1,p=(C(),[]),m=!1,g=!1;function _(t,e){var n=a.$normalize("md-"+t);function r(e){d[t]="false"!==e}e&&x(t,e),a.hasOwnProperty(n)&&r(a[n]),a.$observe(n,r)}function b(){m=!0,ie.element(e).off("resize",w)}function v(e,t){e!==t&&(d.selectedIndex=T(e),d.lastSelectedIndex=t,d.updateInkBarStyles(),O(),M(e),o.$broadcast("$mdTabsChanged"),d.tabs[t]&&d.tabs[t].scope.deselect(),d.tabs[e]&&d.tabs[e].scope.select())}function y(e,t){h||(d.focusIndex=d.selectedIndex=e),d.lastClick=!0,t&&d.noSelectClick||l.nextTick(function(){d.tabs[e].element.triggerHandler("click")},!1)}function w(){d.lastSelectedIndex=d.selectedIndex,d.offsetLeft=N(d.offsetLeft),l.nextTick(function(){d.updateInkBarStyles(),k()})}function C(){var e={},t=c[0];return e.wrapper=t.querySelector("md-tabs-wrapper"),e.canvas=e.wrapper.querySelector("md-tabs-canvas"),e.paging=e.canvas.querySelector("md-pagination-wrapper"),e.inkBar=e.paging.querySelector("md-ink-bar"),e.contents=t.querySelectorAll("md-tabs-content-wrapper > md-tab-content"),e.tabs=e.paging.querySelectorAll("md-tab-item"),e.dummies=e.canvas.querySelectorAll("md-dummy-tab"),e}function A(){switch(d.stretchTabs){case"always":return!0;case"never":return!1;default:return!d.shouldPaginate&&e.matchMedia("(max-width: 600px)").matches}}function S(){return d.centerTabs&&!d.shouldPaginate}function T(e){if(-1===e)return-1;var t,n,r=Math.max(d.tabs.length-e,e);for(t=0;t<=r;t++){if((n=d.tabs[e+t])&&!0!==n.scope.disabled)return n.getIndex();if((n=d.tabs[e-t])&&!0!==n.scope.disabled)return n.getIndex()}return e}function x(e,n,r){Object.defineProperty(d,e,{get:function(){return r},set:function(e){var t=r;r=e,n&&n(e,t)}})}function k(){var e;e=C(),A()?ie.element(e.paging).css("width",""):ie.element(e.paging).css("width",E(C().dummies)+"px"),d.maxTabWidth=D(),d.shouldPaginate=function(){if(d.noPagination||!g)return!1;var t=c.prop("clientWidth");return ie.forEach(C().dummies,function(e){t-=e.offsetWidth}),t<0}()}function E(e){var t=0;return ie.forEach(e,function(e){t+=Math.max(e.offsetWidth,e.getBoundingClientRect().width)}),Math.ceil(t)}function D(){return c.prop("clientWidth")}function I(e,t){var n,r=t?"focusIndex":"selectedIndex";for(n=d[r]+e;d.tabs[n]&&d.tabs[n].scope.disabled;n+=e);d.tabs[n]&&(d[r]=n)}function P(){C().dummies[d.focusIndex].focus()}function M(e){var t=C();if(null==e&&(e=d.focusIndex),t.tabs[e]&&!d.shouldCenterTabs){var n=t.tabs[e],r=n.offsetLeft,i=n.offsetWidth+r;d.offsetLeft=Math.max(d.offsetLeft,N(i-t.canvas.clientWidth+64)),d.offsetLeft=Math.min(d.offsetLeft,N(r))}}function $(){d.selectedIndex=T(d.selectedIndex),d.focusIndex=T(d.focusIndex)}function O(){if(!d.dynamicHeight)return c.css("height","");if(!d.tabs.length)return p.push(O);var e=C(),t=e.contents[d.selectedIndex],n=t?t.offsetHeight:0,r=e.wrapper.offsetHeight,i=n+r,a=c.prop("clientHeight");if(a!==i){"bottom"===c.attr("md-align-tabs")&&(a-=r,i-=r,c.attr("md-border-bottom")!==ae&&++a),h=!0;var o={height:a+"px"},s={height:i+"px"};c.css(o),u(c,{from:o,to:s,easing:"cubic-bezier(0.35, 0, 0.25, 1)",duration:.5}).start().done(function(){c.css({transition:"none",height:""}),l.nextTick(function(){c.css("transition","")}),h=!1})}}function R(){var e=C();if(e.tabs[d.selectedIndex]){if(!d.tabs.length)return p.push(d.updateInkBarStyles);if(!c.prop("offsetParent"))return function e(){e.watcher||(e.watcher=o.$watch(function(){l.nextTick(function(){e.watcher&&c.prop("offsetParent")&&(e.watcher(),e.watcher=null,w())},!1)}))}();var t=d.selectedIndex,n=e.paging.offsetWidth,r=e.tabs[t],i=r.offsetLeft,a=n-i-r.offsetWidth;if(d.shouldCenterTabs)E(e.tabs)<n&&l.nextTick(R,!1);!function(){var e=C(),t=d.selectedIndex,n=d.lastSelectedIndex,r=ie.element(e.inkBar);if(!ie.isNumber(n))return;r.toggleClass("md-left",t<n).toggleClass("md-right",n<t)}(),ie.element(e.inkBar).css({left:i+"px",right:a+"px"})}else ie.element(e.inkBar).css({left:"auto",right:"auto"})}function N(e){var t=C();if(!t.tabs.length||!d.shouldPaginate)return 0;var n=t.tabs[t.tabs.length-1],r=n.offsetLeft+n.offsetWidth;return e=Math.max(0,e),e=Math.min(r-t.canvas.clientWidth,e)}!function(t,e){var n=a.$normalize("md-"+t);e&&x(t,e);a.$observe(n,function(e){d[t]=e})}("stretchTabs",function(e){var t=C();ie.element(t.wrapper).toggleClass("md-stretch-tabs",A()),R()}),x("focusIndex",function(e,t){if(e===t)return;if(!C().tabs[e])return;M(),P()},d.selectedIndex||0),x("offsetLeft",function(e){var t=C(),n=d.shouldCenterTabs?"":"-"+e+"px";ie.element(t.paging).css(r.CSS.TRANSFORM,"translate3d("+n+", 0, 0)"),o.$broadcast("$mdTabsPaginationChanged")},0),x("hasContent",function(e){c[e?"removeClass":"addClass"]("md-no-tab-content")},!1),x("maxTabWidth",function(t,e){if(t!==e){var n=C();ie.forEach(n.tabs,function(e){e.style.maxWidth=t+"px"}),l.nextTick(d.updateInkBarStyles)}},D()),x("shouldPaginate",function(e,t){e!==t&&(d.maxTabWidth=D(),d.shouldCenterTabs=S(),l.nextTick(function(){d.maxTabWidth=D(),M(d.selectedIndex)}))},!1),_("noInkBar",function(e){ie.element(C().inkBar).toggleClass("ng-hide",e)}),_("dynamicHeight",function(e){c.toggleClass("md-dynamic-height",e)}),_("noPagination"),_("swipeContent"),_("noDisconnect"),_("autoselect"),_("noSelectClick"),_("centerTabs",function(e){d.shouldCenterTabs=S()}),_("enableDisconnect"),d.scope=o,d.parent=o.$parent,d.tabs=[],d.lastSelectedIndex=null,d.hasFocus=!1,d.lastClick=!0,d.shouldCenterTabs=S(),d.updatePagination=l.debounce(k,100),d.redirectFocus=P,d.attachRipple=function(e,t){var n=C(),r={colorElement:ie.element(n.inkBar)};i.attach(e,t,r)},d.insertTab=function(e,t){var n=g,r={getIndex:function(){return d.tabs.indexOf(i)},isActive:function(){return this.getIndex()===d.selectedIndex},isLeft:function(){return this.getIndex()<d.selectedIndex},isRight:function(){return this.getIndex()>d.selectedIndex},shouldRender:function(){return!d.noDisconnect||this.isActive()},hasFocus:function(){return!d.lastClick&&d.hasFocus&&this.getIndex()===d.focusIndex},id:l.nextUid()},i=ie.extend(r,e);ie.isDefined(t)?d.tabs.splice(t,0,i):d.tabs.push(i);return p.forEach(function(e){l.nextTick(e)}),p=[],a=!1,ie.forEach(d.tabs,function(e){e.template&&(a=!0)}),d.hasContent=a,l.nextTick(function(){k(),n&&d.autoselect&&l.nextTick(function(){l.nextTick(function(){y(d.tabs.indexOf(i))})})}),i;var a},d.removeTab=function(e){if(m)return;var t=d.selectedIndex,n=d.tabs.splice(e.getIndex(),1)[0];$(),d.selectedIndex===t&&(n.scope.deselect(),d.tabs[d.selectedIndex]&&d.tabs[d.selectedIndex].scope.select());l.nextTick(function(){k(),d.offsetLeft=N(d.offsetLeft)})},d.select=y,d.scroll=function(e){if(!d.shouldPaginate)return;e.preventDefault(),d.offsetLeft=N(d.offsetLeft-e.wheelDelta)},d.nextPage=function(){var e,t,n=C(),r=n.canvas.clientWidth,i=r+d.offsetLeft;for(e=0;e<n.tabs.length&&!((t=n.tabs[e]).offsetLeft+t.offsetWidth>i);e++);r>t.offsetWidth?d.offsetLeft=N(t.offsetLeft):d.offsetLeft=N(t.offsetLeft+(t.offsetWidth-r+1))},d.previousPage=function(){var e,t,n=C();for(e=0;e<n.tabs.length&&!((t=n.tabs[e]).offsetLeft+t.offsetWidth>=d.offsetLeft);e++);n.canvas.clientWidth>t.offsetWidth?d.offsetLeft=N(t.offsetLeft+t.offsetWidth-n.canvas.clientWidth):d.offsetLeft=N(t.offsetLeft)},d.keydown=function(e){switch(e.keyCode){case r.KEY_CODE.LEFT_ARROW:e.preventDefault(),I(-1,!0);break;case r.KEY_CODE.RIGHT_ARROW:e.preventDefault(),I(1,!0);break;case r.KEY_CODE.SPACE:case r.KEY_CODE.ENTER:e.preventDefault(),h||y(d.focusIndex)}d.lastClick=!1},d.canPageForward=function(){var e=C(),t=e.tabs[e.tabs.length-1];return t&&t.offsetLeft+t.offsetWidth>e.canvas.clientWidth+d.offsetLeft},d.canPageBack=function(){return 0<d.offsetLeft},d.refreshIndex=$,d.incrementIndex=I,d.getTabElementIndex=function(e){var t=c[0].getElementsByTagName("md-tab");return Array.prototype.indexOf.call(t,e[0])},d.updateInkBarStyles=l.debounce(R,100),d.updateTabOrder=l.debounce(function(){var e=d.tabs[d.selectedIndex],t=d.tabs[d.focusIndex];d.tabs=d.tabs.sort(function(e,t){return e.index-t.index}),d.selectedIndex=d.tabs.indexOf(e),d.focusIndex=d.tabs.indexOf(t)},100),d.selectedIndex=d.selectedIndex||0,s=a.$mdTabsTemplate,(f=ie.element(c[0].querySelector("md-tab-data"))).html(s),t(f.contents())(d.parent),delete a.$mdTabsTemplate,o.$watch("$mdTabsCtrl.selectedIndex",v),ie.element(e).on("resize",w),o.$on("$destroy",b),n(c),l.nextTick(function(){C(),O(),M(),R(),d.tabs[d.selectedIndex]&&d.tabs[d.selectedIndex].scope.select(),g=!0,k()})}e.$inject=["$scope","$element","$window","$mdConstant","$mdTabInkRipple","$mdUtil","$animateCss","$attrs","$compile","$mdTheming"],ie.module("material.components.tabs").controller("MdTabsController",e)}(),function(){function e(n){return{scope:{selectedIndex:"=?mdSelected"},template:function(e,t){return t.$mdTabsTemplate=e.html(),'<md-tabs-wrapper> <md-tab-data></md-tab-data> <md-prev-button tabindex="-1" role="button" aria-label="Previous Page" aria-disabled="{{!$mdTabsCtrl.canPageBack()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageBack() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.previousPage()"> <md-icon md-svg-src="'+n.mdTabsArrow+'"></md-icon> </md-prev-button> <md-next-button tabindex="-1" role="button" aria-label="Next Page" aria-disabled="{{!$mdTabsCtrl.canPageForward()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageForward() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.nextPage()"> <md-icon md-svg-src="'+n.mdTabsArrow+'"></md-icon> </md-next-button> <md-tabs-canvas tabindex="{{ $mdTabsCtrl.hasFocus ? -1 : 0 }}" aria-activedescendant="tab-item-{{$mdTabsCtrl.tabs[$mdTabsCtrl.focusIndex].id}}" ng-focus="$mdTabsCtrl.redirectFocus()" ng-class="{ \'md-paginated\': $mdTabsCtrl.shouldPaginate, \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" ng-keydown="$mdTabsCtrl.keydown($event)" role="tablist"> <md-pagination-wrapper ng-class="{ \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" md-tab-scroll="$mdTabsCtrl.scroll($event)"> <md-tab-item tabindex="-1" class="md-tab" ng-repeat="tab in $mdTabsCtrl.tabs" role="tab" aria-controls="tab-content-{{::tab.id}}" aria-selected="{{tab.isActive()}}" aria-disabled="{{tab.scope.disabled || \'false\'}}" ng-click="$mdTabsCtrl.select(tab.getIndex())" ng-class="{ \'md-active\':    tab.isActive(), \'md-focused\':   tab.hasFocus(), \'md-disabled\':  tab.scope.disabled }" ng-disabled="tab.scope.disabled" md-swipe-left="$mdTabsCtrl.nextPage()" md-swipe-right="$mdTabsCtrl.previousPage()" md-tabs-template="::tab.label" md-scope="::tab.parent"></md-tab-item> <md-ink-bar></md-ink-bar> </md-pagination-wrapper> <md-tabs-dummy-wrapper class="md-visually-hidden md-dummy-wrapper"> <md-dummy-tab class="md-tab" tabindex="-1" id="tab-item-{{::tab.id}}" role="tab" aria-controls="tab-content-{{::tab.id}}" aria-selected="{{tab.isActive()}}" aria-disabled="{{tab.scope.disabled || \'false\'}}" ng-focus="$mdTabsCtrl.hasFocus = true" ng-blur="$mdTabsCtrl.hasFocus = false" ng-repeat="tab in $mdTabsCtrl.tabs" md-tabs-template="::tab.label" md-scope="::tab.parent"></md-dummy-tab> </md-tabs-dummy-wrapper> </md-tabs-canvas> </md-tabs-wrapper> <md-tabs-content-wrapper ng-show="$mdTabsCtrl.hasContent && $mdTabsCtrl.selectedIndex >= 0" class="_md"> <md-tab-content id="tab-content-{{::tab.id}}" class="_md" role="tabpanel" aria-labelledby="tab-item-{{::tab.id}}" md-swipe-left="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(1)" md-swipe-right="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(-1)" ng-if="$mdTabsCtrl.hasContent" ng-repeat="(index, tab) in $mdTabsCtrl.tabs" ng-class="{ \'md-no-transition\': $mdTabsCtrl.lastSelectedIndex == null, \'md-active\':        tab.isActive(), \'md-left\':          tab.isLeft(), \'md-right\':         tab.isRight(), \'md-no-scroll\':     $mdTabsCtrl.dynamicHeight }"> <div md-tabs-template="::tab.template" md-connected-if="tab.isActive()" md-scope="::tab.parent" ng-if="$mdTabsCtrl.enableDisconnect || tab.shouldRender()"></div> </md-tab-content> </md-tabs-content-wrapper>'},controller:"MdTabsController",controllerAs:"$mdTabsCtrl",bindToController:!0}}e.$inject=["$$mdSvgRegistry"],ie.module("material.components.tabs").directive("mdTabs",e)}(),function(){function e(c,l){return{require:"^?mdTabs",link:function(e,t,n,r){if(r){var i,a,o=function(){r.updatePagination(),r.updateInkBarStyles()};if("MutationObserver"in l){(i=new MutationObserver(o)).observe(t[0],{childList:!0,subtree:!0,characterData:!0}),a=i.disconnect.bind(i)}else{var s=c.debounce(o,15,null,!1);t.on("DOMSubtreeModified",s),a=t.off.bind(t,"DOMSubtreeModified",s)}e.$on("$destroy",function(){a()})}}}}e.$inject=["$mdUtil","$window"],ie.module("material.components.tabs").directive("mdTabsDummyWrapper",e)}(),function(){function e(o,s){return{restrict:"A",link:function(e,t,n,r){if(!r)return;var i=r.enableDisconnect?e.compileScope.$new():e.compileScope;return t.html(e.template),o(t.contents())(i),s.nextTick(function(){e.$watch("connected",function(e){!1===e?r.enableDisconnect&&s.disconnectScope(i):a()}),e.$on("$destroy",a)});function a(){r.enableDisconnect&&s.reconnectScope(i)}},scope:{template:"=mdTabsTemplate",connected:"=?mdConnectedIf",compileScope:"=mdScope"},require:"^?mdTabs"}}e.$inject=["$compile","$mdUtil"],ie.module("material.components.tabs").directive("mdTabsTemplate",e)}(),ie.module("material.core").constant("$MD_THEME_CSS","md-autocomplete.md-THEME_NAME-theme {  background: '{{background-A100}}'; }  md-autocomplete.md-THEME_NAME-theme[disabled]:not([md-floating-label]) {    background: '{{background-100}}'; }  md-autocomplete.md-THEME_NAME-theme button md-icon path {    fill: '{{background-600}}'; }  md-autocomplete.md-THEME_NAME-theme button:after {    background: '{{background-600-0.3}}'; }.md-autocomplete-suggestions-container.md-THEME_NAME-theme {  background: '{{background-A100}}'; }  .md-autocomplete-suggestions-container.md-THEME_NAME-theme li {    color: '{{background-900}}'; }    .md-autocomplete-suggestions-container.md-THEME_NAME-theme li .highlight {      color: '{{background-600}}'; }    .md-autocomplete-suggestions-container.md-THEME_NAME-theme li:hover, .md-autocomplete-suggestions-container.md-THEME_NAME-theme li.selected {      background: '{{background-200}}'; }md-backdrop {  background-color: '{{background-900-0.0}}'; }  md-backdrop.md-opaque.md-THEME_NAME-theme {    background-color: '{{background-900-1.0}}'; }md-bottom-sheet.md-THEME_NAME-theme {  background-color: '{{background-50}}';  border-top-color: '{{background-300}}'; }  md-bottom-sheet.md-THEME_NAME-theme.md-list md-list-item {    color: '{{foreground-1}}'; }  md-bottom-sheet.md-THEME_NAME-theme .md-subheader {    background-color: '{{background-50}}'; }  md-bottom-sheet.md-THEME_NAME-theme .md-subheader {    color: '{{foreground-1}}'; }.md-button.md-THEME_NAME-theme:not([disabled]):hover {  background-color: '{{background-500-0.2}}'; }.md-button.md-THEME_NAME-theme:not([disabled]).md-focused {  background-color: '{{background-500-0.2}}'; }.md-button.md-THEME_NAME-theme:not([disabled]).md-icon-button:hover {  background-color: transparent; }.md-button.md-THEME_NAME-theme.md-fab {  background-color: '{{accent-color}}';  color: '{{accent-contrast}}'; }  .md-button.md-THEME_NAME-theme.md-fab md-icon {    color: '{{accent-contrast}}'; }  .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover {    background-color: '{{accent-A700}}'; }  .md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused {    background-color: '{{accent-A700}}'; }.md-button.md-THEME_NAME-theme.md-primary {  color: '{{primary-color}}'; }  .md-button.md-THEME_NAME-theme.md-primary.md-raised, .md-button.md-THEME_NAME-theme.md-primary.md-fab {    color: '{{primary-contrast}}';    background-color: '{{primary-color}}'; }    .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]) md-icon {      color: '{{primary-contrast}}'; }    .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover {      background-color: '{{primary-600}}'; }    .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]).md-focused {      background-color: '{{primary-600}}'; }  .md-button.md-THEME_NAME-theme.md-primary:not([disabled]) md-icon {    color: '{{primary-color}}'; }.md-button.md-THEME_NAME-theme.md-fab {  background-color: '{{accent-color}}';  color: '{{accent-contrast}}'; }  .md-button.md-THEME_NAME-theme.md-fab:not([disabled]) .md-icon {    color: '{{accent-contrast}}'; }  .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover {    background-color: '{{accent-A700}}'; }  .md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused {    background-color: '{{accent-A700}}'; }.md-button.md-THEME_NAME-theme.md-raised {  color: '{{background-900}}';  background-color: '{{background-50}}'; }  .md-button.md-THEME_NAME-theme.md-raised:not([disabled]) md-icon {    color: '{{background-900}}'; }  .md-button.md-THEME_NAME-theme.md-raised:not([disabled]):hover {    background-color: '{{background-50}}'; }  .md-button.md-THEME_NAME-theme.md-raised:not([disabled]).md-focused {    background-color: '{{background-200}}'; }.md-button.md-THEME_NAME-theme.md-warn {  color: '{{warn-color}}'; }  .md-button.md-THEME_NAME-theme.md-warn.md-raised, .md-button.md-THEME_NAME-theme.md-warn.md-fab {    color: '{{warn-contrast}}';    background-color: '{{warn-color}}'; }    .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]) md-icon {      color: '{{warn-contrast}}'; }    .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]):hover {      background-color: '{{warn-600}}'; }    .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]).md-focused {      background-color: '{{warn-600}}'; }  .md-button.md-THEME_NAME-theme.md-warn:not([disabled]) md-icon {    color: '{{warn-color}}'; }.md-button.md-THEME_NAME-theme.md-accent {  color: '{{accent-color}}'; }  .md-button.md-THEME_NAME-theme.md-accent.md-raised, .md-button.md-THEME_NAME-theme.md-accent.md-fab {    color: '{{accent-contrast}}';    background-color: '{{accent-color}}'; }    .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]) md-icon {      color: '{{accent-contrast}}'; }    .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]):hover {      background-color: '{{accent-A700}}'; }    .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]).md-focused {      background-color: '{{accent-A700}}'; }  .md-button.md-THEME_NAME-theme.md-accent:not([disabled]) md-icon {    color: '{{accent-color}}'; }.md-button.md-THEME_NAME-theme[disabled], .md-button.md-THEME_NAME-theme.md-raised[disabled], .md-button.md-THEME_NAME-theme.md-fab[disabled], .md-button.md-THEME_NAME-theme.md-accent[disabled], .md-button.md-THEME_NAME-theme.md-warn[disabled] {  color: '{{foreground-3}}';  cursor: default; }  .md-button.md-THEME_NAME-theme[disabled] md-icon, .md-button.md-THEME_NAME-theme.md-raised[disabled] md-icon, .md-button.md-THEME_NAME-theme.md-fab[disabled] md-icon, .md-button.md-THEME_NAME-theme.md-accent[disabled] md-icon, .md-button.md-THEME_NAME-theme.md-warn[disabled] md-icon {    color: '{{foreground-3}}'; }.md-button.md-THEME_NAME-theme.md-raised[disabled], .md-button.md-THEME_NAME-theme.md-fab[disabled] {  background-color: '{{foreground-4}}'; }.md-button.md-THEME_NAME-theme[disabled] {  background-color: transparent; }._md a.md-THEME_NAME-theme:not(.md-button).md-primary {  color: '{{primary-color}}'; }  ._md a.md-THEME_NAME-theme:not(.md-button).md-primary:hover {    color: '{{primary-700}}'; }._md a.md-THEME_NAME-theme:not(.md-button).md-accent {  color: '{{accent-color}}'; }  ._md a.md-THEME_NAME-theme:not(.md-button).md-accent:hover {    color: '{{accent-700}}'; }._md a.md-THEME_NAME-theme:not(.md-button).md-accent {  color: '{{accent-color}}'; }  ._md a.md-THEME_NAME-theme:not(.md-button).md-accent:hover {    color: '{{accent-A700}}'; }._md a.md-THEME_NAME-theme:not(.md-button).md-warn {  color: '{{warn-color}}'; }  ._md a.md-THEME_NAME-theme:not(.md-button).md-warn:hover {    color: '{{warn-700}}'; }md-card.md-THEME_NAME-theme {  color: '{{foreground-1}}';  background-color: '{{background-hue-1}}';  border-radius: 2px; }  md-card.md-THEME_NAME-theme .md-card-image {    border-radius: 2px 2px 0 0; }  md-card.md-THEME_NAME-theme md-card-header md-card-avatar md-icon {    color: '{{background-color}}';    background-color: '{{foreground-3}}'; }  md-card.md-THEME_NAME-theme md-card-header md-card-header-text .md-subhead {    color: '{{foreground-2}}'; }  md-card.md-THEME_NAME-theme md-card-title md-card-title-text:not(:only-child) .md-subhead {    color: '{{foreground-2}}'; }md-chips.md-THEME_NAME-theme .md-chips {  box-shadow: 0 1px '{{foreground-4}}'; }  md-chips.md-THEME_NAME-theme .md-chips.md-focused {    box-shadow: 0 2px '{{primary-color}}'; }  md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input {    color: '{{foreground-1}}'; }    md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::-webkit-input-placeholder {      color: '{{foreground-3}}'; }    md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input:-moz-placeholder {      color: '{{foreground-3}}'; }    md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::-moz-placeholder {      color: '{{foreground-3}}'; }    md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input:-ms-input-placeholder {      color: '{{foreground-3}}'; }    md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::-webkit-input-placeholder {      color: '{{foreground-3}}'; }md-chips.md-THEME_NAME-theme md-chip {  background: '{{background-300}}';  color: '{{background-800}}'; }  md-chips.md-THEME_NAME-theme md-chip md-icon {    color: '{{background-700}}'; }  md-chips.md-THEME_NAME-theme md-chip.md-focused {    background: '{{primary-color}}';    color: '{{primary-contrast}}'; }    md-chips.md-THEME_NAME-theme md-chip.md-focused md-icon {      color: '{{primary-contrast}}'; }  md-chips.md-THEME_NAME-theme md-chip._md-chip-editing {    background: transparent;    color: '{{background-800}}'; }md-chips.md-THEME_NAME-theme md-chip-remove .md-button md-icon path {  fill: '{{background-500}}'; }.md-contact-suggestion span.md-contact-email {  color: '{{background-400}}'; }md-checkbox.md-THEME_NAME-theme .md-ripple {  color: '{{accent-A700}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-ripple {  color: '{{background-600}}'; }md-checkbox.md-THEME_NAME-theme.md-checked.md-focused .md-container:before {  background-color: '{{accent-color-0.26}}'; }md-checkbox.md-THEME_NAME-theme .md-ink-ripple {  color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-ink-ripple {  color: '{{accent-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not(.md-checked) .md-icon {  border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-icon {  background-color: '{{accent-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-icon:after {  border-color: '{{accent-contrast-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ripple {  color: '{{primary-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ripple {  color: '{{background-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ink-ripple {  color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple {  color: '{{primary-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary:not(.md-checked) .md-icon {  border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon {  background-color: '{{primary-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked.md-focused .md-container:before {  background-color: '{{primary-color-0.26}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon:after {  border-color: '{{primary-contrast-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-indeterminate[disabled] .md-container {  color: '{{foreground-3}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ripple {  color: '{{warn-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ink-ripple {  color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple {  color: '{{warn-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn:not(.md-checked) .md-icon {  border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon {  background-color: '{{warn-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked.md-focused:not([disabled]) .md-container:before {  background-color: '{{warn-color-0.26}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon:after {  border-color: '{{background-200}}'; }md-checkbox.md-THEME_NAME-theme[disabled]:not(.md-checked) .md-icon {  border-color: '{{foreground-3}}'; }md-checkbox.md-THEME_NAME-theme[disabled].md-checked .md-icon {  background-color: '{{foreground-3}}'; }md-checkbox.md-THEME_NAME-theme[disabled].md-checked .md-icon:after {  border-color: '{{background-200}}'; }md-checkbox.md-THEME_NAME-theme[disabled] .md-icon:after {  border-color: '{{foreground-3}}'; }md-checkbox.md-THEME_NAME-theme[disabled] .md-label {  color: '{{foreground-3}}'; }md-content.md-THEME_NAME-theme {  color: '{{foreground-1}}';  background-color: '{{background-default}}'; }/** Theme styles for mdCalendar. */.md-calendar.md-THEME_NAME-theme {  background: '{{background-A100}}';  color: '{{background-A200-0.87}}'; }  .md-calendar.md-THEME_NAME-theme tr:last-child td {    border-bottom-color: '{{background-200}}'; }.md-THEME_NAME-theme .md-calendar-day-header {  background: '{{background-300}}';  color: '{{background-A200-0.87}}'; }.md-THEME_NAME-theme .md-calendar-date.md-calendar-date-today .md-calendar-date-selection-indicator {  border: 1px solid '{{primary-500}}'; }.md-THEME_NAME-theme .md-calendar-date.md-calendar-date-today.md-calendar-date-disabled {  color: '{{primary-500-0.6}}'; }.md-calendar-date.md-focus .md-THEME_NAME-theme .md-calendar-date-selection-indicator, .md-THEME_NAME-theme .md-calendar-date-selection-indicator:hover {  background: '{{background-300}}'; }.md-THEME_NAME-theme .md-calendar-date.md-calendar-selected-date .md-calendar-date-selection-indicator,.md-THEME_NAME-theme .md-calendar-date.md-focus.md-calendar-selected-date .md-calendar-date-selection-indicator {  background: '{{primary-500}}';  color: '{{primary-500-contrast}}';  border-color: transparent; }.md-THEME_NAME-theme .md-calendar-date-disabled,.md-THEME_NAME-theme .md-calendar-month-label-disabled {  color: '{{background-A200-0.435}}'; }/** Theme styles for mdDatepicker. */.md-THEME_NAME-theme .md-datepicker-input {  color: '{{foreground-1}}'; }  .md-THEME_NAME-theme .md-datepicker-input::-webkit-input-placeholder {    color: '{{foreground-3}}'; }  .md-THEME_NAME-theme .md-datepicker-input:-moz-placeholder {    color: '{{foreground-3}}'; }  .md-THEME_NAME-theme .md-datepicker-input::-moz-placeholder {    color: '{{foreground-3}}'; }  .md-THEME_NAME-theme .md-datepicker-input:-ms-input-placeholder {    color: '{{foreground-3}}'; }  .md-THEME_NAME-theme .md-datepicker-input::-webkit-input-placeholder {    color: '{{foreground-3}}'; }.md-THEME_NAME-theme .md-datepicker-input-container {  border-bottom-color: '{{foreground-4}}'; }  .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused {    border-bottom-color: '{{primary-color}}'; }    .md-accent .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused {      border-bottom-color: '{{accent-color}}'; }    .md-warn .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused {      border-bottom-color: '{{warn-A700}}'; }  .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-invalid {    border-bottom-color: '{{warn-A700}}'; }.md-THEME_NAME-theme .md-datepicker-calendar-pane {  border-color: '{{background-hue-1}}'; }.md-THEME_NAME-theme .md-datepicker-triangle-button .md-datepicker-expand-triangle {  border-top-color: '{{foreground-3}}'; }.md-THEME_NAME-theme .md-datepicker-triangle-button:hover .md-datepicker-expand-triangle {  border-top-color: '{{foreground-2}}'; }.md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon {  color: '{{primary-color}}'; }.md-THEME_NAME-theme .md-datepicker-open.md-accent .md-datepicker-calendar-icon, .md-accent .md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon {  color: '{{accent-color}}'; }.md-THEME_NAME-theme .md-datepicker-open.md-warn .md-datepicker-calendar-icon, .md-warn .md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon {  color: '{{warn-A700}}'; }.md-THEME_NAME-theme .md-datepicker-calendar {  background: '{{background-A100}}'; }.md-THEME_NAME-theme .md-datepicker-input-mask-opaque {  box-shadow: 0 0 0 9999px \"{{background-hue-1}}\"; }.md-THEME_NAME-theme .md-datepicker-open .md-datepicker-input-container {  background: \"{{background-hue-1}}\"; }md-dialog.md-THEME_NAME-theme {  border-radius: 4px;  background-color: '{{background-hue-1}}';  color: '{{foreground-1}}'; }  md-dialog.md-THEME_NAME-theme.md-content-overflow .md-actions, md-dialog.md-THEME_NAME-theme.md-content-overflow md-dialog-actions {    border-top-color: '{{foreground-4}}'; }md-divider.md-THEME_NAME-theme {  border-top-color: '{{foreground-4}}'; }.layout-row > md-divider.md-THEME_NAME-theme,.layout-xs-row > md-divider.md-THEME_NAME-theme, .layout-gt-xs-row > md-divider.md-THEME_NAME-theme,.layout-sm-row > md-divider.md-THEME_NAME-theme, .layout-gt-sm-row > md-divider.md-THEME_NAME-theme,.layout-md-row > md-divider.md-THEME_NAME-theme, .layout-gt-md-row > md-divider.md-THEME_NAME-theme,.layout-lg-row > md-divider.md-THEME_NAME-theme, .layout-gt-lg-row > md-divider.md-THEME_NAME-theme,.layout-xl-row > md-divider.md-THEME_NAME-theme {  border-right-color: '{{foreground-4}}'; }md-icon.md-THEME_NAME-theme {  color: '{{foreground-2}}'; }  md-icon.md-THEME_NAME-theme.md-primary {    color: '{{primary-color}}'; }  md-icon.md-THEME_NAME-theme.md-accent {    color: '{{accent-color}}'; }  md-icon.md-THEME_NAME-theme.md-warn {    color: '{{warn-color}}'; }md-input-container.md-THEME_NAME-theme .md-input {  color: '{{foreground-1}}';  border-color: '{{foreground-4}}'; }  md-input-container.md-THEME_NAME-theme .md-input::-webkit-input-placeholder {    color: '{{foreground-3}}'; }  md-input-container.md-THEME_NAME-theme .md-input:-moz-placeholder {    color: '{{foreground-3}}'; }  md-input-container.md-THEME_NAME-theme .md-input::-moz-placeholder {    color: '{{foreground-3}}'; }  md-input-container.md-THEME_NAME-theme .md-input:-ms-input-placeholder {    color: '{{foreground-3}}'; }  md-input-container.md-THEME_NAME-theme .md-input::-webkit-input-placeholder {    color: '{{foreground-3}}'; }md-input-container.md-THEME_NAME-theme > md-icon {  color: '{{foreground-1}}'; }md-input-container.md-THEME_NAME-theme label,md-input-container.md-THEME_NAME-theme .md-placeholder {  color: '{{foreground-3}}'; }md-input-container.md-THEME_NAME-theme label.md-required:after {  color: '{{warn-A700}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-focused):not(.md-input-invalid) label.md-required:after {  color: '{{foreground-2}}'; }md-input-container.md-THEME_NAME-theme .md-input-messages-animation, md-input-container.md-THEME_NAME-theme .md-input-message-animation {  color: '{{warn-A700}}'; }  md-input-container.md-THEME_NAME-theme .md-input-messages-animation .md-char-counter, md-input-container.md-THEME_NAME-theme .md-input-message-animation .md-char-counter {    color: '{{foreground-1}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-has-value label {  color: '{{foreground-2}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused .md-input, md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-resized .md-input {  border-color: '{{primary-color}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused md-icon {  color: '{{primary-color}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent .md-input {  border-color: '{{accent-color}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent md-icon {  color: '{{accent-color}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn .md-input {  border-color: '{{warn-A700}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn md-icon {  color: '{{warn-A700}}'; }md-input-container.md-THEME_NAME-theme.md-input-invalid .md-input {  border-color: '{{warn-A700}}'; }md-input-container.md-THEME_NAME-theme.md-input-invalid label,md-input-container.md-THEME_NAME-theme.md-input-invalid .md-input-message-animation,md-input-container.md-THEME_NAME-theme.md-input-invalid .md-char-counter {  color: '{{warn-A700}}'; }md-input-container.md-THEME_NAME-theme .md-input[disabled],[disabled] md-input-container.md-THEME_NAME-theme .md-input {  border-bottom-color: transparent;  color: '{{foreground-3}}';  background-image: linear-gradient(to right, \"{{foreground-3}}\" 0%, \"{{foreground-3}}\" 33%, transparent 0%);  background-image: -ms-linear-gradient(left, transparent 0%, \"{{foreground-3}}\" 100%); }md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text h3, md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text h4,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text h3,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text h4 {  color: '{{foreground-1}}'; }md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text p,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text p {  color: '{{foreground-2}}'; }md-list.md-THEME_NAME-theme .md-proxy-focus.md-focused div.md-no-style {  background-color: '{{background-100}}'; }md-list.md-THEME_NAME-theme md-list-item .md-avatar-icon {  background-color: '{{foreground-3}}';  color: '{{background-color}}'; }md-list.md-THEME_NAME-theme md-list-item > md-icon {  color: '{{foreground-2}}'; }  md-list.md-THEME_NAME-theme md-list-item > md-icon.md-highlight {    color: '{{primary-color}}'; }    md-list.md-THEME_NAME-theme md-list-item > md-icon.md-highlight.md-accent {      color: '{{accent-color}}'; }md-menu-content.md-THEME_NAME-theme {  background-color: '{{background-A100}}'; }  md-menu-content.md-THEME_NAME-theme md-menu-item {    color: '{{background-A200-0.87}}'; }    md-menu-content.md-THEME_NAME-theme md-menu-item md-icon {      color: '{{background-A200-0.54}}'; }    md-menu-content.md-THEME_NAME-theme md-menu-item .md-button[disabled] {      color: '{{background-A200-0.25}}'; }      md-menu-content.md-THEME_NAME-theme md-menu-item .md-button[disabled] md-icon {        color: '{{background-A200-0.25}}'; }  md-menu-content.md-THEME_NAME-theme md-menu-divider {    background-color: '{{background-A200-0.11}}'; }md-menu-bar.md-THEME_NAME-theme > button.md-button {  color: '{{foreground-2}}';  border-radius: 2px; }md-menu-bar.md-THEME_NAME-theme md-menu.md-open > button, md-menu-bar.md-THEME_NAME-theme md-menu > button:focus {  outline: none;  background: '{{background-200}}'; }md-menu-bar.md-THEME_NAME-theme.md-open:not(.md-keyboard-mode) md-menu:hover > button {  background-color: '{{ background-500-0.2}}'; }md-menu-bar.md-THEME_NAME-theme:not(.md-keyboard-mode):not(.md-open) md-menu button:hover,md-menu-bar.md-THEME_NAME-theme:not(.md-keyboard-mode):not(.md-open) md-menu button:focus {  background: transparent; }md-menu-content.md-THEME_NAME-theme .md-menu > .md-button:after {  color: '{{background-A200-0.54}}'; }md-menu-content.md-THEME_NAME-theme .md-menu.md-open > .md-button {  background-color: '{{ background-500-0.2}}'; }md-toolbar.md-THEME_NAME-theme.md-menu-toolbar {  background-color: '{{background-A100}}';  color: '{{background-A200}}'; }  md-toolbar.md-THEME_NAME-theme.md-menu-toolbar md-toolbar-filler {    background-color: '{{primary-color}}';    color: '{{background-A100-0.87}}'; }    md-toolbar.md-THEME_NAME-theme.md-menu-toolbar md-toolbar-filler md-icon {      color: '{{background-A100-0.87}}'; }md-nav-bar.md-THEME_NAME-theme .md-nav-bar {  background-color: transparent;  border-color: '{{foreground-4}}'; }md-nav-bar.md-THEME_NAME-theme .md-button._md-nav-button.md-unselected {  color: '{{foreground-2}}'; }md-nav-bar.md-THEME_NAME-theme md-nav-ink-bar {  color: '{{accent-color}}';  background: '{{accent-color}}'; }.md-panel {  background-color: '{{background-900-0.0}}'; }  .md-panel._md-panel-backdrop.md-THEME_NAME-theme {    background-color: '{{background-900-1.0}}'; }md-progress-circular.md-THEME_NAME-theme path {  stroke: '{{primary-color}}'; }md-progress-circular.md-THEME_NAME-theme.md-warn path {  stroke: '{{warn-color}}'; }md-progress-circular.md-THEME_NAME-theme.md-accent path {  stroke: '{{accent-color}}'; }md-progress-linear.md-THEME_NAME-theme .md-container {  background-color: '{{primary-100}}'; }md-progress-linear.md-THEME_NAME-theme .md-bar {  background-color: '{{primary-color}}'; }md-progress-linear.md-THEME_NAME-theme.md-warn .md-container {  background-color: '{{warn-100}}'; }md-progress-linear.md-THEME_NAME-theme.md-warn .md-bar {  background-color: '{{warn-color}}'; }md-progress-linear.md-THEME_NAME-theme.md-accent .md-container {  background-color: '{{accent-100}}'; }md-progress-linear.md-THEME_NAME-theme.md-accent .md-bar {  background-color: '{{accent-color}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-bar1 {  background-color: '{{warn-100}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-dashed:before {  background: radial-gradient(\"{{warn-100}}\" 0%, \"{{warn-100}}\" 16%, transparent 42%); }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-bar1 {  background-color: '{{accent-100}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-dashed:before {  background: radial-gradient(\"{{accent-100}}\" 0%, \"{{accent-100}}\" 16%, transparent 42%); }md-radio-button.md-THEME_NAME-theme .md-off {  border-color: '{{foreground-2}}'; }md-radio-button.md-THEME_NAME-theme .md-on {  background-color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme.md-checked .md-off {  border-color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme.md-checked .md-ink-ripple {  color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme .md-container .md-ripple {  color: '{{accent-A700}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-on, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-on {  background-color: '{{primary-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off {  border-color: '{{primary-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple {  color: '{{primary-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-container .md-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple {  color: '{{primary-600}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-on, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-on {  background-color: '{{warn-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off {  border-color: '{{warn-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple {  color: '{{warn-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-container .md-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple {  color: '{{warn-600}}'; }md-radio-group.md-THEME_NAME-theme[disabled],md-radio-button.md-THEME_NAME-theme[disabled] {  color: '{{foreground-3}}'; }  md-radio-group.md-THEME_NAME-theme[disabled] .md-container .md-off,  md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-off {    border-color: '{{foreground-3}}'; }  md-radio-group.md-THEME_NAME-theme[disabled] .md-container .md-on,  md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-on {    border-color: '{{foreground-3}}'; }md-radio-group.md-THEME_NAME-theme .md-checked .md-ink-ripple {  color: '{{accent-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme.md-primary .md-checked:not([disabled]) .md-ink-ripple, md-radio-group.md-THEME_NAME-theme .md-checked:not([disabled]).md-primary .md-ink-ripple {  color: '{{primary-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme .md-checked.md-primary .md-ink-ripple {  color: '{{warn-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked .md-container:before {  background-color: '{{accent-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty).md-primary .md-checked .md-container:before,md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked.md-primary .md-container:before {  background-color: '{{primary-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty).md-warn .md-checked .md-container:before,md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked.md-warn .md-container:before {  background-color: '{{warn-color-0.26}}'; }md-input-container md-select.md-THEME_NAME-theme .md-select-value span:first-child:after {  color: '{{warn-A700}}'; }md-input-container:not(.md-input-focused):not(.md-input-invalid) md-select.md-THEME_NAME-theme .md-select-value span:first-child:after {  color: '{{foreground-3}}'; }md-input-container.md-input-focused:not(.md-input-has-value) md-select.md-THEME_NAME-theme .md-select-value {  color: '{{primary-color}}'; }  md-input-container.md-input-focused:not(.md-input-has-value) md-select.md-THEME_NAME-theme .md-select-value.md-select-placeholder {    color: '{{primary-color}}'; }md-input-container.md-input-invalid md-select.md-THEME_NAME-theme .md-select-value {  color: '{{warn-A700}}' !important;  border-bottom-color: '{{warn-A700}}' !important; }md-input-container.md-input-invalid md-select.md-THEME_NAME-theme.md-no-underline .md-select-value {  border-bottom-color: transparent !important; }md-select.md-THEME_NAME-theme[disabled] .md-select-value {  border-bottom-color: transparent;  background-image: linear-gradient(to right, \"{{foreground-3}}\" 0%, \"{{foreground-3}}\" 33%, transparent 0%);  background-image: -ms-linear-gradient(left, transparent 0%, \"{{foreground-3}}\" 100%); }md-select.md-THEME_NAME-theme .md-select-value {  border-bottom-color: '{{foreground-4}}'; }  md-select.md-THEME_NAME-theme .md-select-value.md-select-placeholder {    color: '{{foreground-3}}'; }  md-select.md-THEME_NAME-theme .md-select-value span:first-child:after {    color: '{{warn-A700}}'; }md-select.md-THEME_NAME-theme.md-no-underline .md-select-value {  border-bottom-color: transparent !important; }md-select.md-THEME_NAME-theme.ng-invalid.ng-touched .md-select-value {  color: '{{warn-A700}}' !important;  border-bottom-color: '{{warn-A700}}' !important; }md-select.md-THEME_NAME-theme.ng-invalid.ng-touched.md-no-underline .md-select-value {  border-bottom-color: transparent !important; }md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-value {  border-bottom-color: '{{primary-color}}';  color: '{{ foreground-1 }}'; }  md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-value.md-select-placeholder {    color: '{{ foreground-1 }}'; }md-select.md-THEME_NAME-theme:not([disabled]):focus.md-no-underline .md-select-value {  border-bottom-color: transparent !important; }md-select.md-THEME_NAME-theme:not([disabled]):focus.md-accent .md-select-value {  border-bottom-color: '{{accent-color}}'; }md-select.md-THEME_NAME-theme:not([disabled]):focus.md-warn .md-select-value {  border-bottom-color: '{{warn-color}}'; }md-select.md-THEME_NAME-theme[disabled] .md-select-value {  color: '{{foreground-3}}'; }  md-select.md-THEME_NAME-theme[disabled] .md-select-value.md-select-placeholder {    color: '{{foreground-3}}'; }md-select-menu.md-THEME_NAME-theme md-content {  background: '{{background-A100}}'; }  md-select-menu.md-THEME_NAME-theme md-content md-optgroup {    color: '{{background-600-0.87}}'; }  md-select-menu.md-THEME_NAME-theme md-content md-option {    color: '{{background-900-0.87}}'; }    md-select-menu.md-THEME_NAME-theme md-content md-option[disabled] .md-text {      color: '{{background-400-0.87}}'; }    md-select-menu.md-THEME_NAME-theme md-content md-option:not([disabled]):focus, md-select-menu.md-THEME_NAME-theme md-content md-option:not([disabled]):hover {      background: '{{background-200}}'; }    md-select-menu.md-THEME_NAME-theme md-content md-option[selected] {      color: '{{primary-500}}'; }      md-select-menu.md-THEME_NAME-theme md-content md-option[selected]:focus {        color: '{{primary-600}}'; }      md-select-menu.md-THEME_NAME-theme md-content md-option[selected].md-accent {        color: '{{accent-color}}'; }        md-select-menu.md-THEME_NAME-theme md-content md-option[selected].md-accent:focus {          color: '{{accent-A700}}'; }.md-checkbox-enabled.md-THEME_NAME-theme .md-ripple {  color: '{{primary-600}}'; }.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-ripple {  color: '{{background-600}}'; }.md-checkbox-enabled.md-THEME_NAME-theme .md-ink-ripple {  color: '{{foreground-2}}'; }.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-ink-ripple {  color: '{{primary-color-0.87}}'; }.md-checkbox-enabled.md-THEME_NAME-theme:not(.md-checked) .md-icon {  border-color: '{{foreground-2}}'; }.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-icon {  background-color: '{{primary-color-0.87}}'; }.md-checkbox-enabled.md-THEME_NAME-theme[selected].md-focused .md-container:before {  background-color: '{{primary-color-0.26}}'; }.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-icon:after {  border-color: '{{primary-contrast-0.87}}'; }.md-checkbox-enabled.md-THEME_NAME-theme .md-indeterminate[disabled] .md-container {  color: '{{foreground-3}}'; }.md-checkbox-enabled.md-THEME_NAME-theme md-option .md-text {  color: '{{background-900-0.87}}'; }md-sidenav.md-THEME_NAME-theme, md-sidenav.md-THEME_NAME-theme md-content {  background-color: '{{background-hue-1}}'; }md-slider.md-THEME_NAME-theme .md-track {  background-color: '{{foreground-3}}'; }md-slider.md-THEME_NAME-theme .md-track-ticks {  color: '{{background-contrast}}'; }md-slider.md-THEME_NAME-theme .md-focus-ring {  background-color: '{{accent-A200-0.2}}'; }md-slider.md-THEME_NAME-theme .md-disabled-thumb {  border-color: '{{background-color}}';  background-color: '{{background-color}}'; }md-slider.md-THEME_NAME-theme.md-min .md-thumb:after {  background-color: '{{background-color}}';  border-color: '{{foreground-3}}'; }md-slider.md-THEME_NAME-theme.md-min .md-focus-ring {  background-color: '{{foreground-3-0.38}}'; }md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-thumb:after {  background-color: '{{background-contrast}}';  border-color: transparent; }md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-sign {  background-color: '{{background-400}}'; }  md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-sign:after {    border-top-color: '{{background-400}}'; }md-slider.md-THEME_NAME-theme.md-min[md-discrete][md-vertical] .md-sign:after {  border-top-color: transparent;  border-left-color: '{{background-400}}'; }md-slider.md-THEME_NAME-theme .md-track.md-track-fill {  background-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-thumb:after {  border-color: '{{accent-color}}';  background-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-sign {  background-color: '{{accent-color}}'; }  md-slider.md-THEME_NAME-theme .md-sign:after {    border-top-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme[md-vertical] .md-sign:after {  border-top-color: transparent;  border-left-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-thumb-text {  color: '{{accent-contrast}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-focus-ring {  background-color: '{{warn-200-0.38}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-track.md-track-fill {  background-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-thumb:after {  border-color: '{{warn-color}}';  background-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-sign {  background-color: '{{warn-color}}'; }  md-slider.md-THEME_NAME-theme.md-warn .md-sign:after {    border-top-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn[md-vertical] .md-sign:after {  border-top-color: transparent;  border-left-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-thumb-text {  color: '{{warn-contrast}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-focus-ring {  background-color: '{{primary-200-0.38}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-track.md-track-fill {  background-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-thumb:after {  border-color: '{{primary-color}}';  background-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-sign {  background-color: '{{primary-color}}'; }  md-slider.md-THEME_NAME-theme.md-primary .md-sign:after {    border-top-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary[md-vertical] .md-sign:after {  border-top-color: transparent;  border-left-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-thumb-text {  color: '{{primary-contrast}}'; }md-slider.md-THEME_NAME-theme[disabled] .md-thumb:after {  border-color: transparent; }md-slider.md-THEME_NAME-theme[disabled]:not(.md-min) .md-thumb:after, md-slider.md-THEME_NAME-theme[disabled][md-discrete] .md-thumb:after {  background-color: '{{foreground-3}}';  border-color: transparent; }md-slider.md-THEME_NAME-theme[disabled][readonly] .md-sign {  background-color: '{{background-400}}'; }  md-slider.md-THEME_NAME-theme[disabled][readonly] .md-sign:after {    border-top-color: '{{background-400}}'; }md-slider.md-THEME_NAME-theme[disabled][readonly][md-vertical] .md-sign:after {  border-top-color: transparent;  border-left-color: '{{background-400}}'; }md-slider.md-THEME_NAME-theme[disabled][readonly] .md-disabled-thumb {  border-color: transparent;  background-color: transparent; }md-slider-container[disabled] > *:first-child:not(md-slider),md-slider-container[disabled] > *:last-child:not(md-slider) {  color: '{{foreground-3}}'; }.md-subheader.md-THEME_NAME-theme {  color: '{{ foreground-2-0.23 }}';  background-color: '{{background-default}}'; }  .md-subheader.md-THEME_NAME-theme.md-primary {    color: '{{primary-color}}'; }  .md-subheader.md-THEME_NAME-theme.md-accent {    color: '{{accent-color}}'; }  .md-subheader.md-THEME_NAME-theme.md-warn {    color: '{{warn-color}}'; }md-switch.md-THEME_NAME-theme .md-ink-ripple {  color: '{{background-500}}'; }md-switch.md-THEME_NAME-theme .md-thumb {  background-color: '{{background-50}}'; }md-switch.md-THEME_NAME-theme .md-bar {  background-color: '{{background-500}}'; }md-switch.md-THEME_NAME-theme.md-checked .md-ink-ripple {  color: '{{accent-color}}'; }md-switch.md-THEME_NAME-theme.md-checked .md-thumb {  background-color: '{{accent-color}}'; }md-switch.md-THEME_NAME-theme.md-checked .md-bar {  background-color: '{{accent-color-0.5}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-focused .md-thumb:before {  background-color: '{{accent-color-0.26}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-ink-ripple {  color: '{{primary-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-thumb {  background-color: '{{primary-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-bar {  background-color: '{{primary-color-0.5}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary.md-focused .md-thumb:before {  background-color: '{{primary-color-0.26}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-ink-ripple {  color: '{{warn-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-thumb {  background-color: '{{warn-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-bar {  background-color: '{{warn-color-0.5}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn.md-focused .md-thumb:before {  background-color: '{{warn-color-0.26}}'; }md-switch.md-THEME_NAME-theme[disabled] .md-thumb {  background-color: '{{background-400}}'; }md-switch.md-THEME_NAME-theme[disabled] .md-bar {  background-color: '{{foreground-4}}'; }md-tabs.md-THEME_NAME-theme md-tabs-wrapper {  background-color: transparent;  border-color: '{{foreground-4}}'; }md-tabs.md-THEME_NAME-theme .md-paginator md-icon {  color: '{{primary-color}}'; }md-tabs.md-THEME_NAME-theme md-ink-bar {  color: '{{accent-color}}';  background: '{{accent-color}}'; }md-tabs.md-THEME_NAME-theme .md-tab {  color: '{{foreground-2}}'; }  md-tabs.md-THEME_NAME-theme .md-tab[disabled], md-tabs.md-THEME_NAME-theme .md-tab[disabled] md-icon {    color: '{{foreground-3}}'; }  md-tabs.md-THEME_NAME-theme .md-tab.md-active, md-tabs.md-THEME_NAME-theme .md-tab.md-active md-icon, md-tabs.md-THEME_NAME-theme .md-tab.md-focused, md-tabs.md-THEME_NAME-theme .md-tab.md-focused md-icon {    color: '{{primary-color}}'; }  md-tabs.md-THEME_NAME-theme .md-tab.md-focused {    background: '{{primary-color-0.1}}'; }  md-tabs.md-THEME_NAME-theme .md-tab .md-ripple-container {    color: '{{accent-A100}}'; }md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper {  background-color: '{{accent-color}}'; }  md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) {    color: '{{accent-A100}}'; }    md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon {      color: '{{accent-contrast}}'; }    md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused {      background: '{{accent-contrast-0.1}}'; }  md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-ink-bar {    color: '{{primary-600-1}}';    background: '{{primary-600-1}}'; }md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper {  background-color: '{{primary-color}}'; }  md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) {    color: '{{primary-100}}'; }    md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon {      color: '{{primary-contrast}}'; }    md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused {      background: '{{primary-contrast-0.1}}'; }md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper {  background-color: '{{warn-color}}'; }  md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) {    color: '{{warn-100}}'; }    md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon {      color: '{{warn-contrast}}'; }    md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused {      background: '{{warn-contrast-0.1}}'; }md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper {  background-color: '{{primary-color}}'; }  md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) {    color: '{{primary-100}}'; }    md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon {      color: '{{primary-contrast}}'; }    md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused {      background: '{{primary-contrast-0.1}}'; }md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper {  background-color: '{{accent-color}}'; }  md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) {    color: '{{accent-A100}}'; }    md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon {      color: '{{accent-contrast}}'; }    md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused {      background: '{{accent-contrast-0.1}}'; }  md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-ink-bar {    color: '{{primary-600-1}}';    background: '{{primary-600-1}}'; }md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper {  background-color: '{{warn-color}}'; }  md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) {    color: '{{warn-100}}'; }    md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon {      color: '{{warn-contrast}}'; }    md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused {      background: '{{warn-contrast-0.1}}'; }md-toast.md-THEME_NAME-theme .md-toast-content {  background-color: #323232;  color: '{{background-50}}'; }  md-toast.md-THEME_NAME-theme .md-toast-content .md-button {    color: '{{background-50}}'; }    md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight {      color: '{{accent-color}}'; }      md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight.md-primary {        color: '{{primary-color}}'; }      md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight.md-warn {        color: '{{warn-color}}'; }md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) {  background-color: '{{primary-color}}';  color: '{{primary-contrast}}'; }  md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-icon {    color: '{{primary-contrast}}';    fill: '{{primary-contrast}}'; }  md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) .md-button[disabled] md-icon {    color: '{{primary-contrast-0.26}}';    fill: '{{primary-contrast-0.26}}'; }  md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent {    background-color: '{{accent-color}}';    color: '{{accent-contrast}}'; }    md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent .md-ink-ripple {      color: '{{accent-contrast}}'; }    md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-icon {      color: '{{accent-contrast}}';      fill: '{{accent-contrast}}'; }    md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent .md-button[disabled] md-icon {      color: '{{accent-contrast-0.26}}';      fill: '{{accent-contrast-0.26}}'; }  md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn {    background-color: '{{warn-color}}';    color: '{{warn-contrast}}'; }md-tooltip.md-THEME_NAME-theme {  color: '{{background-700-contrast}}'; }  md-tooltip.md-THEME_NAME-theme .md-content {    background-color: '{{background-700}}'; }/*  Only used with Theme processes */html.md-THEME_NAME-theme, body.md-THEME_NAME-theme {  color: '{{foreground-1}}';  background-color: '{{background-color}}'; }")}(window,window.angular),window.ngMaterial={version:{full:"1.1.1"}},function(e,N){"use strict";var L=N.$$minErr("$resource"),s=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;function F(e,t){if(null==(n=t)||""===n||"hasOwnProperty"===n||!s.test("."+n))throw L("badmember",'Dotted member path "@{0}" is invalid.',t);for(var n,r=t.split("."),i=0,a=r.length;i<a&&N.isDefined(e);i++){var o=r[i];e=null!==e?e[o]:void 0}return e}function G(e,n){for(var t in n=n||{},N.forEach(n,function(e,t){delete n[t]}),e)!e.hasOwnProperty(t)||"$"===t.charAt(0)&&"$"===t.charAt(1)||(n[t]=e[t]);return n}N.module("ngResource",["ng"]).provider("$resource",function(){var u=/^https?:\/\/[^\/]*/,o=this;this.defaults={stripTrailingSlashes:!0,cancellable:!1,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},delete:{method:"DELETE"}}},this.$get=["$http","$log","$q","$timeout",function(E,i,D,I){var P=N.noop,M=N.forEach,$=N.extend,O=N.copy,R=N.isFunction;function l(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function a(e,t){this.template=e,this.defaults=$({},o.defaults,t),this.urlParams={}}return a.prototype={setUrlParams:function(n,r,e){var i,a,o=this,s=e||o.template,t="",c=o.urlParams={};M(s.split(/\W/),function(e){if("hasOwnProperty"===e)throw L("badname","hasOwnProperty is not a valid parameter name.");!new RegExp("^\\d+$").test(e)&&e&&new RegExp("(^|[^\\\\]):"+e+"(\\W|$)").test(s)&&(c[e]={isQueryParamValue:new RegExp("\\?.*=:"+e+"(?:\\W|$)").test(s)})}),s=(s=s.replace(/\\:/g,":")).replace(u,function(e){return t=e,""}),r=r||{},M(o.urlParams,function(e,t){i=r.hasOwnProperty(t)?r[t]:o.defaults[t],s=N.isDefined(i)&&null!==i?(a=e.isQueryParamValue?l(i,!0):l(i,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),s.replace(new RegExp(":"+t+"(\\W|$)","g"),function(e,t){return a+t})):s.replace(new RegExp("(/?):"+t+"(\\W|$)","g"),function(e,t,n){return"/"==n.charAt(0)?n:t+n})}),o.defaults.stripTrailingSlashes&&(s=s.replace(/\/+$/,"")||"/"),s=s.replace(/\/\.(?=\w+($|\?))/,"."),n.url=t+s.replace(/\/\\\./,"/."),M(r,function(e,t){o.urlParams[t]||(n.params=n.params||{},n.params[t]=e)})}},function t(n,S,r,e){var T=new a(n,e);function x(e){return e.resource}function k(e){G(e||{},this)}return r=$({},o.defaults.actions,r),k.prototype.toJSON=function(){var e=$({},this);return delete e.$promise,delete e.$resolved,e},M(r,function(v,y){var w=/^(POST|PUT|PATCH)$/i.test(v.method),C=v.timeout,A=N.isDefined(v.cancellable)?v.cancellable:e&&N.isDefined(e.cancellable)?e.cancellable:o.defaults.cancellable;C&&!N.isNumber(C)&&(i.debug("ngResource:\n  Only numeric values are allowed as `timeout`.\n  Promises are not supported in $resource, because the same value would be used for multiple requests. If you are looking for a way to cancel requests, you should use the `cancellable` option."),delete v.timeout,C=null),k[y]=function(e,t,n,r){var i,a,o,s={};switch(arguments.length){case 4:o=r,a=n;case 3:case 2:if(!R(t)){s=e,i=t,a=n;break}if(R(e)){a=e,o=t;break}a=t,o=n;case 1:R(e)?a=e:w?i=e:s=e;break;case 0:break;default:throw L("badargs","Expected up to 4 arguments [params, data, success, error], got {0} arguments",arguments.length)}var c,l,u,f,d,h=this instanceof k,p=h?i:v.isArray?[]:new k(i),m={},g=v.interceptor&&v.interceptor.response||x,_=v.interceptor&&v.interceptor.responseError||void 0;M(v,function(e,t){switch(t){default:m[t]=O(e);break;case"params":case"isArray":case"interceptor":case"cancellable":}}),!h&&A&&(c=D.defer(),m.timeout=c.promise,C&&(l=I(c.resolve,C))),w&&(m.data=i),T.setUrlParams(m,$({},(u=i,f=v.params||{},d={},f=$({},S,f),M(f,function(e,t){R(e)&&(e=e(u)),d[t]=e&&e.charAt&&"@"==e.charAt(0)?F(u,e.substr(1)):e}),d),s),v.url);var b=E(m).then(function(e){var t=e.data;if(t){if(N.isArray(t)!==!!v.isArray)throw L("badcfg","Error in resource configuration for action `{0}`. Expected response to contain an {1} but got an {2} (Request: {3} {4})",y,v.isArray?"array":"object",N.isArray(t)?"array":"object",m.method,m.url);if(v.isArray)p.length=0,M(t,function(e){"object"==typeof e?p.push(new k(e)):p.push(e)});else{var n=p.$promise;G(t,p),p.$promise=n}}return e.resource=p,e},function(e){return(o||P)(e),D.reject(e)});return b.finally(function(){p.$resolved=!0,!h&&A&&(p.$cancelRequest=N.noop,I.cancel(l),c=l=m.timeout=null)}),b=b.then(function(e){var t=g(e);return(a||P)(t,e.headers),t},_),h?b:(p.$promise=b,p.$resolved=!1,A&&(p.$cancelRequest=c.resolve),p)},k.prototype["$"+y]=function(e,t,n){R(e)&&(n=t,t=e,e={});var r=k[y].call(this,e,this,t,n);return r.$promise||r}}),k.bind=function(e){return t(n,$({},S,e),r)},k}}]})}(window,window.angular),function(w,C){"use strict";var A,S,T,x,k,E,D,I,P=C.$$minErr("$sanitize");C.module("ngSanitize",[]).provider("$sanitize",function(){var t=!1;this.$get=["$$sanitizeUri",function(n){return t&&S(d,u),function(e){var t=[];return D(e,I(t,function(e,t){return!/^unsafe:/.test(n(e,t))})),t.join("")}}],this.enableSvg=function(e){return x(e)?(t=e,this):t},A=C.bind,S=C.extend,T=C.forEach,x=C.isDefined,k=C.lowercase,E=C.noop,D=function(e,t){null==e?e="":"string"!=typeof e&&(e=""+e),a.innerHTML=e;var n=5;do{if(0===n)throw P("uinput","Failed to sanitize html because the input is unstable");n--,w.document.documentMode&&y(a),e=a.innerHTML,a.innerHTML=e}while(e!==a.innerHTML);for(var r=a.firstChild;r;){switch(r.nodeType){case 1:t.start(r.nodeName.toLowerCase(),b(r.attributes));break;case 3:t.chars(r.textContent)}var i;if(!((i=r.firstChild)||(1==r.nodeType&&t.end(r.nodeName.toLowerCase()),i=r.nextSibling)))for(;null==i&&(r=r.parentNode)!==a;)i=r.nextSibling,1==r.nodeType&&t.end(r.nodeName.toLowerCase());r=i}for(;r=a.firstChild;)a.removeChild(r)},I=function(e,a){var t=!1,o=A(e,e.push);return{start:function(i,e){i=k(i),!t&&f[i]&&(t=i),t||!0!==d[i]||(o("<"),o(i),T(e,function(e,t){var n=k(t),r="img"===i&&"src"===n||"background"===n;!0!==g[n]||!0===h[n]&&!a(e,r)||(o(" "),o(t),o('="'),o(v(e)),o('"'))}),o(">"))},end:function(e){e=k(e),t||!0!==d[e]||!0===i[e]||(o("</"),o(e),o(">")),e==t&&(t=!1)},chars:function(e){t||o(v(e))}}};var a,n=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r=/([^\#-~ |!])/g,i=_("area,br,col,hr,img,wbr"),e=_("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),o=_("rp,rt"),s=S({},o,e),c=S({},e,_("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),l=S({},o,_("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),u=_("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),f=_("script,style"),d=S({},i,c,l,s),h=_("background,cite,href,longdesc,src,xlink:href"),p=_("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),m=_("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),g=S({},h,m,p);function _(e,t){var n,r={},i=e.split(",");for(n=0;n<i.length;n++)r[t?k(i[n]):i[n]]=!0;return r}function b(e){for(var t={},n=0,r=e.length;n<r;n++){var i=e[n];t[i.name]=i.value}return t}function v(e){return e.replace(/&/g,"&amp;").replace(n,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(r,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function y(e){if(e.nodeType===w.Node.ELEMENT_NODE)for(var t=e.attributes,n=0,r=t.length;n<r;n++){var i=t[n],a=i.name.toLowerCase();"xmlns:ns1"!==a&&0!==a.lastIndexOf("ns1:",0)||(e.removeAttributeNode(i),n--,r--)}var o=e.firstChild;o&&y(o),(o=e.nextSibling)&&y(o)}!function(e){var t;if(!e.document||!e.document.implementation)throw P("noinert","Can't create an inert html document");var n=((t=e.document.implementation.createHTMLDocument("inert")).documentElement||t.getDocumentElement()).getElementsByTagName("body");if(1===n.length)a=n[0];else{var r=t.createElement("html");a=t.createElement("body"),r.appendChild(a),t.appendChild(r)}}(w)}),C.module("ngSanitize").filter("linky",["$sanitize",function(f){var d=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,h=/^mailto:/i,p=C.$$minErr("linky"),m=C.isDefined,g=C.isFunction,_=C.isObject,b=C.isString;return function(e,i,t){if(null==e||""===e)return e;if(!b(e))throw p("notstring","Expected string but received: {0}",e);for(var n,r,a,o=g(t)?t:_(t)?function(){return t}:function(){return{}},s=e,c=[];n=s.match(d);)r=n[0],n[2]||n[4]||(r=(n[3]?"http://":"mailto:")+r),a=n.index,l(s.substr(0,a)),u(r,n[0].replace(h,"")),s=s.substring(a+n[0].length);return l(s),f(c.join(""));function l(e){var t,n;e&&c.push((t=e,I(n=[],E).chars(t),n.join("")))}function u(e,t){var n,r=o(e);for(n in c.push("<a "),r)c.push(n+'="'+r[n]+'" ');!m(i)||"target"in r||c.push('target="',i,'" '),c.push('href="',e.replace(/"/g,"&quot;"),'">'),l(t),c.push("</a>")}}}])}(window,window.angular),function(e,t){"function"==typeof define&&define.amd?define([],function(){return t()}):"object"==typeof exports?module.exports=t():t()}(0,function(){function e(t){"use strict";var n=t.storageKey(),r=t.storage(),e=function(){var e=t.preferredLanguage();angular.isString(e)?t.use(e):r.put(n,t.use())};e.displayName="fallbackFromIncorrectStorageValue",r?r.get(n)?t.use(r.get(n)).catch(e):e():angular.isString(t.preferredLanguage())&&t.use(t.preferredLanguage())}function t(e,i,t,a){"use strict";var M,u,$,O,R,N,L,n,F,G,j,B,U,H,W,q,z={},V=[],Y=e,K=[],Q="translate-cloak",X=!1,Z=!1,J=".",ee=!1,te=0,ne=!0,r="default",o={default:function(e){return(e||"").split("-").join("_")},java:function(e){var t=(e||"").split("-").join("_"),n=t.split("_");return 1<n.length?n[0].toLowerCase()+"_"+n[1].toUpperCase():t},bcp47:function(e){var t=(e||"").split("_").join("-"),n=t.split("-");return 1<n.length?n[0].toLowerCase()+"-"+n[1].toUpperCase():t},"iso639-1":function(e){return(e||"").split("_").join("-").split("-")[0].toLowerCase()}},s=function(){if(angular.isFunction(a.getLocale))return a.getLocale();var e,t,n=i.$get().navigator,r=["language","browserLanguage","systemLanguage","userLanguage"];if(angular.isArray(n.languages))for(e=0;e<n.languages.length;e++)if((t=n.languages[e])&&t.length)return t;for(e=0;e<r.length;e++)if((t=n[r[e]])&&t.length)return t;return null};s.displayName="angular-translate/service: getFirstBrowserLanguage";var re=function(){var e=s()||"";return o[r]&&(e=o[r](e)),e};re.displayName="angular-translate/service: getLocale";var ie=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},ae=function(){return this.toString().replace(/^\s+|\s+$/g,"")},oe=function(e){if(e){for(var t,n=[],r=angular.lowercase(e),i=0,a=V.length;i<a;i++)n.push(angular.lowercase(V[i]));if(-1<ie(n,r))return e;if(u)for(var o in u)if(u.hasOwnProperty(o)){var s=!1,c=Object.prototype.hasOwnProperty.call(u,o)&&angular.lowercase(o)===angular.lowercase(e);if("*"===o.slice(-1)&&(s=o.slice(0,-1)===e.slice(0,o.length-1)),(c||s)&&(t=u[o],-1<ie(n,angular.lowercase(t))))return t}var l=e.split("_");return 1<l.length&&-1<ie(n,angular.lowercase(l[0]))?l[0]:void 0}},se=function(e,t){if(!e&&!t)return z;if(e&&!t){if(angular.isString(e))return z[e]}else angular.isObject(z[e])||(z[e]={}),angular.extend(z[e],ce(t));return this};this.translations=se,this.cloakClassName=function(e){return e?(Q=e,this):Q},this.nestedObjectDelimeter=function(e){return e?(J=e,this):J};var ce=function(e,t,n,r){var i,a,o;for(i in t||(t=[]),n||(n={}),e)Object.prototype.hasOwnProperty.call(e,i)&&(o=e[i],angular.isObject(o)?ce(o,t.concat(i),n,i):(a=t.length?""+t.join(J)+J+i:i,t.length&&i===r&&(n[""+t.join(J)]="@:"+a),n[a]=o));return n};ce.displayName="flatObject",this.addInterpolation=function(e){return K.push(e),this},this.useMessageFormatInterpolation=function(){return this.useInterpolation("$translateMessageFormatInterpolation")},this.useInterpolation=function(e){return G=e,this},this.useSanitizeValueStrategy=function(e){return t.useStrategy(e),this},this.preferredLanguage=function(e){return e?(le(e),this):M};var le=function(e){return e&&(M=e),M};this.translationNotFoundIndicator=function(e){return this.translationNotFoundIndicatorLeft(e),this.translationNotFoundIndicatorRight(e),this},this.translationNotFoundIndicatorLeft=function(e){return e?(U=e,this):U},this.translationNotFoundIndicatorRight=function(e){return e?(H=e,this):H},this.fallbackLanguage=function(e){return ue(e),this};var ue=function(e){return e?(angular.isString(e)?(O=!0,$=[e]):angular.isArray(e)&&(O=!1,$=e),angular.isString(M)&&ie($,M)<0&&$.push(M),this):O?$[0]:$};this.use=function(e){if(e){if(!z[e]&&!j)throw new Error("$translateProvider couldn't find translationTable for langKey: '"+e+"'");return R=e,this}return R},this.resolveClientLocale=function(){return re()};var fe=function(e){return e?(Y=e,this):n?n+Y:Y};this.storageKey=fe,this.useUrlLoader=function(e,t){return this.useLoader("$translateUrlLoader",angular.extend({url:e},t))},this.useStaticFilesLoader=function(e){return this.useLoader("$translateStaticFilesLoader",e)},this.useLoader=function(e,t){return j=e,B=t||{},this},this.useLocalStorage=function(){return this.useStorage("$translateLocalStorage")},this.useCookieStorage=function(){return this.useStorage("$translateCookieStorage")},this.useStorage=function(e){return L=e,this},this.storagePrefix=function(e){return e?(n=e,this):e},this.useMissingTranslationHandlerLog=function(){return this.useMissingTranslationHandler("$translateMissingTranslationHandlerLog")},this.useMissingTranslationHandler=function(e){return F=e,this},this.usePostCompiling=function(e){return X=!!e,this},this.forceAsyncReload=function(e){return Z=!!e,this},this.uniformLanguageTag=function(e){return e?angular.isString(e)&&(e={standard:e}):e={},r=e.standard,this},this.determinePreferredLanguage=function(e){var t=e&&angular.isFunction(e)?e():re();return M=V.length&&oe(t)||t,this},this.registerAvailableLanguageKeys=function(e,t){return e?(V=e,t&&(u=t),this):V},this.useLoaderCache=function(e){return!1===e?W=void 0:!0===e?W=!0:void 0===e?W="$translationCache":e&&(W=e),this},this.directivePriority=function(e){return void 0===e?te:(te=e,this)},this.statefulFilter=function(e){return void 0===e?ne:(ne=e,this)},this.postProcess=function(e){return q=e||void 0,this},this.$get=["$log","$injector","$rootScope","$q",function(e,o,u,m){var a,g,_,b=o.get(G||"$translateDefaultInterpolation"),v=!1,y={},f={},w=function(e,o,s,c,l){!R&&M&&(R=M);var r=l&&l!==R?oe(l)||l:R;if(l&&k(l),angular.isArray(e)){return function(e){for(var r={},t=[],n=function(t){var n=m.defer(),e=function(e){r[t]=e,n.resolve([t,e])};return w(t,o,s,c,l).then(e,e),n.promise},i=0,a=e.length;i<a;i++)t.push(n(e[i]));return m.all(t).then(function(){return r})}(e)}var t=m.defer();e&&(e=ae.apply(e));var n=function(){var e=M?f[M]:f[r];if(g=0,L&&!e){var t=a.get(Y);if(e=f[t],$&&$.length){var n=ie($,t);g=0===n?1:0,ie($,M)<0&&$.push(M)}}return e}();if(n){var i=function(){l||(r=R),p(e,o,s,c,r).then(t.resolve,t.reject)};i.displayName="promiseResolved",n.finally(i)}else p(e,o,s,c,r).then(t.resolve,t.reject);return t.promise},C=function(e){return U&&(e=[U,e].join(" ")),H&&(e=[e,H].join(" ")),e},d=function(e){R=e,L&&a.put(w.storageKey(),R),u.$emit("$translateChangeSuccess",{language:e}),b.setLocale(R);var t=function(e,t){y[t].setLocale(R)};t.displayName="eachInterpolatorLocaleSetter",angular.forEach(y,t),u.$emit("$translateChangeEnd",{language:e})},h=function(n){if(!n)throw"No language key specified for loading.";var r=m.defer();u.$emit("$translateLoadingStart",{language:n}),v=!0;var e=W;"string"==typeof e&&(e=o.get(e));var t=angular.extend({},B,{key:n,$http:angular.extend({},{cache:e},B.$http)}),i=function(e){var t={};u.$emit("$translateLoadingSuccess",{language:n}),angular.isArray(e)?angular.forEach(e,function(e){angular.extend(t,ce(e))}):angular.extend(t,ce(e)),v=!1,r.resolve({key:n,table:t}),u.$emit("$translateLoadingEnd",{language:n})};i.displayName="onLoaderSuccess";var a=function(e){u.$emit("$translateLoadingError",{language:e}),r.reject(e),u.$emit("$translateLoadingEnd",{language:e})};return a.displayName="onLoaderError",o.get(j)(t).then(i,a),r.promise};if(L&&(!(a=o.get(L)).get||!a.put))throw new Error("Couldn't use storage '"+L+"', missing get() or put() method!");if(K.length){var t=function(e){var t=o.get(e);t.setLocale(M||R),y[t.getInterpolationIdentifier()]=t};t.displayName="interpolationFactoryAdder",angular.forEach(K,t)}var c=function(r,i,a,o){var s=m.defer(),e=function(e){if(Object.prototype.hasOwnProperty.call(e,i)){o.setLocale(r);var t=e[i];if("@:"===t.substr(0,2))c(r,t.substr(2),a,o).then(s.resolve,s.reject);else{var n=o.interpolate(e[i],a);n=x(i,e[i],n,a,r),s.resolve(n)}o.setLocale(R)}else s.reject()};return e.displayName="fallbackTranslationResolver",function(e){var t=m.defer();if(Object.prototype.hasOwnProperty.call(z,e))t.resolve(z[e]);else if(f[e]){var n=function(e){se(e.key,e.table),t.resolve(e.table)};n.displayName="translationTableResolver",f[e].then(n,t.reject)}else t.reject();return t.promise}(r).then(e,s.reject),s.promise},s=function(e,t,n,r){var i,a=z[e];if(a&&Object.prototype.hasOwnProperty.call(a,t)){if(r.setLocale(e),"@:"===(i=r.interpolate(a[t],n)).substr(0,2))return s(e,i.substr(2),n,r);r.setLocale(R)}return i},A=function(e,t,n){if(F){var r=o.get(F)(e,R,t,n);return void 0!==r?r:e}return e},S=function(e,t,n,r,i){var a=m.defer();if(e<$.length){var o=$[e];c(o,t,n,r).then(function(e){a.resolve(e)},function(){return S(e+1,t,n,r,i).then(a.resolve,a.reject)})}else i?a.resolve(i):F?a.resolve(A(t,n)):a.reject(A(t,n));return a.promise},l=function(e,t,n,r){var i;if(e<$.length){var a=$[e];(i=s(a,t,n,r))||(i=l(e+1,t,n,r))}return i},p=function(e,t,n,r,i){var a,o,s,c,l=m.defer(),u=i?z[i]:z,f=n?y[n]:b;if(u&&Object.prototype.hasOwnProperty.call(u,e)){var d=u[e];if("@:"===d.substr(0,2))w(d.substr(2),t,n,r,i).then(l.resolve,l.reject);else{var h=f.interpolate(d,t);h=x(e,d,h,t,i),l.resolve(h)}}else{var p;F&&!v&&(p=A(e,t,r)),i&&$&&$.length?(a=e,o=t,s=f,c=r,S(0<_?_:g,a,o,s,c)).then(function(e){l.resolve(e)},function(e){l.reject(C(e))}):F&&!v&&p?r?l.resolve(r):l.resolve(p):r?l.resolve(r):l.reject(C(e))}return l.promise},T=function(e,t,n,r){var i,a=r?z[r]:z,o=b;if(y&&Object.prototype.hasOwnProperty.call(y,n)&&(o=y[n]),a&&Object.prototype.hasOwnProperty.call(a,e)){var s=a[e];i="@:"===s.substr(0,2)?T(s.substr(2),t,n,r):o.interpolate(s,t)}else{var c;F&&!v&&(c=A(e,t)),i=r&&$&&$.length?l((g=0)<_?_:g,e,t,o):F&&!v&&c?c:C(e)}return i},x=function(e,t,n,r,i){var a=q;return a&&("string"==typeof a&&(a=o.get(a)),a)?a(e,t,n,r,i):n},k=function(e){z[e]||!j||f[e]||(f[e]=h(e).then(function(e){se(e.key,e.table)}))};w.preferredLanguage=function(e){return e&&le(e),M},w.cloakClassName=function(){return Q},w.nestedObjectDelimeter=function(){return J},w.fallbackLanguage=function(e){if(null!=e){if(ue(e),j&&$&&$.length)for(var t=0,n=$.length;t<n;t++)f[$[t]]||(f[$[t]]=h($[t]));w.use(w.use())}return O?$[0]:$},w.useFallbackLanguage=function(e){if(null!=e)if(e){var t=ie($,e);-1<t&&(_=t)}else _=0},w.proposedLanguage=function(){return N},w.storage=function(){return a},w.negotiateLocale=oe,w.use=function(t){if(!t)return R;var n=m.defer();u.$emit("$translateChangeStart",{language:t});var e=oe(t);return 0<V.length&&!e?m.reject(t):(e&&(t=e),N=t,!Z&&z[t]||!j||f[t]?f[t]?f[t].then(function(e){return N===e.key&&d(e.key),n.resolve(e.key),e},function(e){return!R&&$&&0<$.length?w.use($[0]).then(n.resolve,n.reject):n.reject(e)}):(n.resolve(t),d(t)):(f[t]=h(t).then(function(e){return se(e.key,e.table),n.resolve(e.key),N===t&&d(e.key),e},function(e){return u.$emit("$translateChangeError",{language:e}),n.reject(e),u.$emit("$translateChangeEnd",{language:e}),m.reject(e)}),f[t].finally(function(){var e;N===(e=t)&&(N=void 0),f[e]=void 0})),n.promise)},w.resolveClientLocale=function(){return re()},w.storageKey=function(){return fe()},w.isPostCompilingEnabled=function(){return X},w.isForceAsyncReloadEnabled=function(){return Z},w.refresh=function(t){if(!j)throw new Error("Couldn't refresh translation table, no loader registered!");var e=m.defer();function n(){e.resolve(),u.$emit("$translateRefreshEnd",{language:t})}function r(){e.reject(),u.$emit("$translateRefreshEnd",{language:t})}if(u.$emit("$translateRefreshStart",{language:t}),t)if(z[t]){var i=function(e){se(e.key,e.table),t===R&&d(R),n()};i.displayName="refreshPostProcessor",h(t).then(i,r)}else r();else{var a=[],o={};if($&&$.length)for(var s=0,c=$.length;s<c;s++)a.push(h($[s])),o[$[s]]=!0;R&&!o[R]&&a.push(h(R));var l=function(e){z={},angular.forEach(e,function(e){se(e.key,e.table)}),R&&d(R),n()};l.displayName="refreshPostProcessor",m.all(a).then(l,r)}return e.promise},w.instant=function(e,t,n,r){var i=r&&r!==R?oe(r)||r:R;if(null===e||angular.isUndefined(e))return e;if(r&&k(r),angular.isArray(e)){for(var a={},o=0,s=e.length;o<s;o++)a[e[o]]=w.instant(e[o],t,n,r);return a}if(angular.isString(e)&&e.length<1)return e;e&&(e=ae.apply(e));var c,l=[];M&&l.push(M),i&&l.push(i),$&&$.length&&(l=l.concat($));for(var u=0,f=l.length;u<f;u++){var d=l[u];if(z[d]&&void 0!==z[d][e]&&(c=T(e,t,n,i)),void 0!==c)break}return c||""===c||(U||H?c=C(e):(c=b.interpolate(e,t),F&&!v&&(c=A(e,t)))),c},w.versionInfo=function(){return"2.11.0"},w.loaderCache=function(){return W},w.directivePriority=function(){return te},w.statefulFilter=function(){return ne},w.isReady=function(){return ee};var n=m.defer();n.promise.then(function(){ee=!0}),w.onReady=function(e){var t=m.defer();return angular.isFunction(e)&&t.promise.then(e),ee?t.resolve():n.promise.then(t.resolve),t.promise},w.getAvailableLanguageKeys=function(){return 0<V.length?V:null};var r=u.$on("$translateReady",function(){n.resolve(),r(),r=null}),i=u.$on("$translateChangeEnd",function(){n.resolve(),i(),i=null});if(j){if(angular.equals(z,{})&&w.use()&&w.use(w.use()),$&&$.length)for(var E=function(e){return se(e.key,e.table),u.$emit("$translateChangeEnd",{language:e.key}),e},D=0,I=$.length;D<I;D++){var P=$[D];!Z&&z[P]||(f[P]=h(P).then(E))}}else u.$emit("$translateReady",{language:w.use()});return w}]}function n(r,i){"use strict";var e={};return e.setLocale=function(e){e},e.getInterpolationIdentifier=function(){return"default"},e.useSanitizeValueStrategy=function(e){return i.useStrategy(e),this},e.interpolate=function(e,t){t=t||{},t=i.sanitize(t,"params");var n=r(e)(t);return n=i.sanitize(n,"text")},e}function r(w,e,C,A,S,T){"use strict";return{restrict:"AE",scope:!0,priority:w.directivePriority(),compile:function(e,m){var g=m.translateValues?m.translateValues:void 0,_=m.translateInterpolation?m.translateInterpolation:void 0,b=e[0].outerHTML.match(/translate-value-+/i),v="^(.*)("+C.startSymbol()+".*"+C.endSymbol()+")(.*)",y="^(.*)"+C.startSymbol()+"(.*)"+C.endSymbol()+"(.*)";return function(i,c,l){i.interpolateParams={},i.preText="",i.postText="",i.translateNamespace=x(i);var a={},o=function(e){if(angular.isFunction(o._unwatchOld)&&(o._unwatchOld(),o._unwatchOld=void 0),angular.equals(e,"")||!angular.isDefined(e)){var t=function(){return this.toString().replace(/^\s+|\s+$/g,"")}.apply(c.text()),n=t.match(v);if(angular.isArray(n)){i.preText=n[1],i.postText=n[3],a.translate=C(n[2])(i.$parent);var r=t.match(y);angular.isArray(r)&&r[2]&&r[2].length&&(o._unwatchOld=i.$watch(r[2],function(e){a.translate=e,u()}))}else a.translate=t||void 0}else a.translate=e;u()},e=function(t){l.$observe(t,function(e){a[t]=e,u()})};!function(e,t,n){if(t.translateValues&&angular.extend(e,S(t.translateValues)(i.$parent)),b)for(var r in n)Object.prototype.hasOwnProperty.call(t,r)&&"translateValue"===r.substr(0,14)&&"translateValues"!==r&&(e[angular.lowercase(r.substr(14,1))+r.substr(15)]=n[r])}(i.interpolateParams,l,m);var t=!0;for(var n in l.$observe("translate",function(e){void 0===e?o(""):""===e&&t||(a.translate=e,u()),t=!1}),l)l.hasOwnProperty(n)&&"translateAttr"===n.substr(0,13)&&e(n);if(l.$observe("translateDefault",function(e){i.defaultText=e,u()}),g&&l.$observe("translateValues",function(e){e&&i.$parent.$watch(function(){angular.extend(i.interpolateParams,S(e)(i.$parent))})}),b){var r=function(n){l.$observe(n,function(e){var t=angular.lowercase(n.substr(14,1))+n.substr(15);i.interpolateParams[t]=e})};for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&"translateValue"===s.substr(0,14)&&"translateValues"!==s&&r(s)}var u=function(){for(var e in a)a.hasOwnProperty(e)&&void 0!==a[e]&&f(e,a[e],i,i.interpolateParams,i.defaultText,i.translateNamespace)},f=function(t,e,n,r,i,a){e?(a&&"."===e.charAt(0)&&(e=a+e),w(e,r,_,i,n.translateLanguage).then(function(e){d(e,n,!0,t)},function(e){d(e,n,!1,t)})):d(e,n,!1,t)},d=function(e,t,n,r){if(n||void 0!==t.defaultText&&(e=t.defaultText),"translate"===r){(n||!n&&void 0===l.translateKeepContent)&&c.empty().append(t.preText+e+t.postText);var i=w.isPostCompilingEnabled(),a=void 0!==m.translateCompile,o=a&&"false"!==m.translateCompile;(i&&!a||o)&&A(c.contents())(t)}else{var s=l.$attr[r];"data-"===s.substr(0,5)&&(s=s.substr(5)),s=s.substr(15),c.attr(s,e)}};(g||b||l.translateDefault)&&i.$watch("interpolateParams",u,!0);var h=i.$on("translateLanguageChanged",u),p=T.$on("$translateChangeSuccess",u);c.text().length?l.translate?o(l.translate):o(""):l.translate&&o(l.translate),u(),i.$on("$destroy",function(){h(),p()})}}}}function x(e){"use strict";return e.translateNamespace?e.translateNamespace:e.$parent?x(e.$parent):void 0}function i(a,o){"use strict";return{compile:function(e){var r=function(){e.addClass(a.cloakClassName())},i=function(){e.removeClass(a.cloakClassName())};return a.onReady(function(){i()}),r(),function(e,t,n){n.translateCloak&&n.translateCloak.length&&(n.$observe("translateCloak",function(e){a(e).then(i,r)}),o.$on("$translateChangeSuccess",function(){a(n.translateCloak).then(i,r)}))}}}}function a(){"use strict";return{restrict:"A",scope:!0,compile:function(){return{pre:function(e,t,n){e.translateNamespace=x(e),e.translateNamespace&&"."===n.translateNamespace.charAt(0)?e.translateNamespace+=n.translateNamespace:e.translateNamespace=n.translateNamespace}}}}}function x(e){"use strict";return e.translateNamespace?e.translateNamespace:e.$parent?x(e.$parent):void 0}function o(){"use strict";return{restrict:"A",scope:!0,compile:function(){return function(t,e,n){n.$observe("translateLanguage",function(e){t.translateLanguage=e}),t.$watch("translateLanguage",function(){t.$broadcast("translateLanguageChanged")})}}}}function s(i,a){"use strict";var e=function(e,t,n,r){return angular.isObject(t)||(t=i(t)(this)),a.instant(e,t,n,r)};return a.statefulFilter()&&(e.$stateful=!0),e}function c(e){"use strict";return e("translations")}return e.$inject=["$translate"],t.$inject=["$STORAGE_KEY","$windowProvider","$translateSanitizationProvider","pascalprechtTranslateOverrider"],n.$inject=["$interpolate","$translateSanitization"],r.$inject=["$translate","$q","$interpolate","$compile","$parse","$rootScope"],i.$inject=["$translate","$rootScope"],s.$inject=["$parse","$translate"],c.$inject=["$cacheFactory"],angular.module("pascalprecht.translate",["ng"]).run(e),e.displayName="runTranslate",angular.module("pascalprecht.translate").provider("$translateSanitization",function(){"use strict";var n,u,f=null,d=!1,h=!1;(u={sanitize:function(e,t){return"text"===t&&(e=i(e)),e},escape:function(e,t){return"text"===t&&(e=r(e)),e},sanitizeParameters:function(e,t){return"params"===t&&(e=a(e,i)),e},escapeParameters:function(e,t){return"params"===t&&(e=a(e,r)),e}}).escaped=u.escapeParameters,this.addStrategy=function(e,t){return u[e]=t,this},this.removeStrategy=function(e){return delete u[e],this},this.useStrategy=function(e){return d=!0,f=e,this},this.$get=["$injector","$log",function(s,c){var t,l={};return s.has("$sanitize")&&(n=s.get("$sanitize")),{useStrategy:(t=this,function(e){t.useStrategy(e)}),sanitize:function(e,t,n){if(f||d||h||(c.warn("pascalprecht.translate.$translateSanitization: No sanitization strategy has been configured. This can have serious security implications. See http://angular-translate.github.io/docs/#/guide/19_security for details."),h=!0),arguments.length<3&&(n=f),!n)return e;var r,i,a,o=angular.isArray(n)?n:[n];return r=e,i=t,a=o,angular.forEach(a,function(t){if(angular.isFunction(t))r=t(r,i);else if(angular.isFunction(u[t]))r=u[t](r,i);else{if(!angular.isString(u[t]))throw new Error("pascalprecht.translate.$translateSanitization: Unknown sanitization strategy: '"+t+"'");if(!l[u[t]])try{l[u[t]]=s.get(u[t])}catch(e){throw l[u[t]]=function(){},new Error("pascalprecht.translate.$translateSanitization: Unknown sanitization strategy: '"+t+"'")}r=l[u[t]](r,i)}}),r}}}];var r=function(e){var t=angular.element("<div></div>");return t.text(e),t.html()},i=function(e){if(!n)throw new Error("pascalprecht.translate.$translateSanitization: Error cannot find $sanitize service. Either include the ngSanitize module (https://docs.angularjs.org/api/ngSanitize) or use a sanitization strategy which does not depend on $sanitize, such as 'escape'.");return n(e)},a=function(e,n,r){if(angular.isObject(e)){var i=angular.isArray(e)?[]:{};if(r){if(-1<r.indexOf(e))throw new Error("pascalprecht.translate.$translateSanitization: Error cannot interpolate parameter due recursive object")}else r=[];return r.push(e),angular.forEach(e,function(e,t){i[t]=a(e,n,r)}),r.splice(-1,1),i}return angular.isNumber(e)?e:n(e)}}),angular.module("pascalprecht.translate").constant("pascalprechtTranslateOverrider",{}).provider("$translate",t),t.displayName="displayName",angular.module("pascalprecht.translate").factory("$translateDefaultInterpolation",n),n.displayName="$translateDefaultInterpolation",angular.module("pascalprecht.translate").constant("$STORAGE_KEY","NG_TRANSLATE_LANG_KEY"),angular.module("pascalprecht.translate").directive("translate",r),r.displayName="translateDirective",angular.module("pascalprecht.translate").directive("translateCloak",i),i.displayName="translateCloakDirective",angular.module("pascalprecht.translate").directive("translateNamespace",a),a.displayName="translateNamespaceDirective",angular.module("pascalprecht.translate").directive("translateLanguage",o),o.displayName="translateLanguageDirective",angular.module("pascalprecht.translate").filter("translate",s),s.displayName="translateFilterFactory",angular.module("pascalprecht.translate").factory("$translationCache",c),c.displayName="$translationCache","pascalprecht.translate"}),function(e,t){"function"==typeof define&&define.amd?define([],function(){return t()}):"object"==typeof exports?module.exports=t():t()}(0,function(){function e(){"use strict";function r(e,t){this.name=e,this.isActive=!0,this.tables={},this.priority=t||0}r.prototype.parseUrl=function(e,t){return angular.isFunction(e)?e(this.name,t):e.replace(/\{part\}/g,this.name).replace(/\{lang\}/g,t)},r.prototype.getTable=function(t,e,n,r,i,a){if(this.tables[t])return e.when(this.tables[t]);var o=this;return n(angular.extend({method:"GET",url:this.parseUrl(i,t)},r)).then(function(e){return o.tables[t]=e.data,e.data},function(){return a?a(o.name,t).then(function(e){return o.tables[t]=e},function(){return e.reject(o.name)}):e.reject(o.name)})};var l={};function u(e){return Object.prototype.hasOwnProperty.call(l,e)}function f(e){return angular.isString(e)&&""!==e}function e(e){if(!f(e))throw new TypeError("Invalid type of a first argument, a non-empty string expected.");return u(e)&&l[e].isActive}function d(){var e=[];for(var t in l)l[t].isActive&&e.push(l[t]);return e.sort(function(e,t){return e.priority-t.priority}),e}this.addPart=function(e,t){if(!f(e))throw new TypeError("Couldn't add part, part name has to be a string!");return u(e)||(l[e]=new r(e,t)),l[e].isActive=!0,this},this.setPart=function(e,t,n){if(!f(e))throw new TypeError("Couldn't set part.`lang` parameter has to be a string!");if(!f(t))throw new TypeError("Couldn't set part.`part` parameter has to be a string!");if("object"!=typeof n||null===n)throw new TypeError("Couldn't set part. `table` parameter has to be an object!");return u(t)||(l[t]=new r(t),l[t].isActive=!1),l[t].tables[e]=n,this},this.deletePart=function(e){if(!f(e))throw new TypeError("Couldn't delete part, first arg has to be string.");return u(e)&&(l[e].isActive=!1),this},this.isPartAvailable=e,this.$get=["$rootScope","$injector","$q","$http",function(i,a,o,s){var c=function(n){if(!f(n.key))throw new TypeError("Unable to load data, a key is not a non-empty string.");if(!f(n.urlTemplate)&&!angular.isFunction(n.urlTemplate))throw new TypeError("Unable to load data, a urlTemplate is not a non-empty string or not a function.");var t=n.loadFailureHandler;if(void 0!==t){if(!angular.isString(t))throw new Error("Unable to load data, a loadFailureHandler is not a string.");t=a.get(t)}var r=[],e=d();return angular.forEach(e,function(e){r.push(e.getTable(n.key,o,s,n.$http,n.urlTemplate,t)),e.urlTemplate=n.urlTemplate}),o.all(r).then(function(){var t={};return e=d(),angular.forEach(e,function(e){!function e(t,n){for(var r in n)n[r]&&n[r].constructor&&n[r].constructor===Object?(t[r]=t[r]||{},e(t[r],n[r])):t[r]=n[r];return t}(t,e.tables[n.key])}),t},function(){return o.reject(n.key)})};return c.addPart=function(e,t){if(!f(e))throw new TypeError("Couldn't add part, first arg has to be a string");return u(e)?l[e].isActive||(l[e].isActive=!0,i.$emit("$translatePartialLoaderStructureChanged",e)):(l[e]=new r(e,t),i.$emit("$translatePartialLoaderStructureChanged",e)),c},c.deletePart=function(n,e){if(!f(n))throw new TypeError("Couldn't delete part, first arg has to be string");if(void 0===e)e=!1;else if("boolean"!=typeof e)throw new TypeError("Invalid type of a second argument, a boolean expected.");if(u(n)){var t=l[n].isActive;if(e){var r=a.get("$translate").loaderCache();"string"==typeof r&&(r=a.get(r)),"object"==typeof r&&angular.forEach(l[n].tables,function(e,t){r.remove(l[n].parseUrl(l[n].urlTemplate,t))}),delete l[n]}else l[n].isActive=!1;t&&i.$emit("$translatePartialLoaderStructureChanged",n)}return c},c.isPartLoaded=function(e,t){return angular.isDefined(l[e])&&angular.isDefined(l[e].tables[t])},c.getRegisteredParts=function(){var t=[];return angular.forEach(l,function(e){e.isActive&&t.push(e.name)}),t},c.isPartAvailable=e,c}]}return angular.module("pascalprecht.translate").provider("$translatePartialLoader",e),e.displayName="$translatePartialLoader","pascalprecht.translate"}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,r;function d(){return e.apply(null,arguments)}function s(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function l(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){for(var n in t)h(t,n)&&(e[n]=t[n]);return h(t,"toString")&&(e.toString=t.toString),h(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return st(e,t,n,r,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}),e._pf}function m(e){if(null==e._isValid){var t=p(e),n=r.call(t.parsedDateParts,function(e){return null!=e});e._isValid=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(e._isValid=e._isValid&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)}return e._isValid}function g(e){var t=f(NaN);return null!=e?u(p(t),e):p(t).userInvalidated=!0,t}function a(e){return void 0===e}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var o=d.momentProperties=[];function _(e,t){var n,r,i;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=p(t)),a(t._locale)||(e._locale=t._locale),0<o.length)for(n in o)a(i=t[r=o[n]])||(e[r]=i);return e}var t=!1;function b(e){_(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),!1===t&&(t=!0,d.updateOffset(this),t=!1)}function v(e){return e instanceof b||null!=e&&null!=e._isAMomentObject}function y(e){return e<0?Math.ceil(e):Math.floor(e)}function w(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=y(t)),n}function C(e,t,n){var r,i=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),o=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&w(e[r])!==w(t[r]))&&o++;return o+a}function i(e){!1===d.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function n(e,t){var n=!0;return u(function(){return null!=d.deprecationHandler&&d.deprecationHandler(null,e),n&&(i(e+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),n=!1),t.apply(this,arguments)},t)}var A,S={};function T(e,t){null!=d.deprecationHandler&&d.deprecationHandler(e,t),S[e]||(i(t),S[e]=!0)}function x(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function k(e){return"[object Object]"===Object.prototype.toString.call(e)}function E(e,t){var n,r=u({},e);for(n in t)h(t,n)&&(k(e[n])&&k(t[n])?(r[n]={},u(r[n],e[n]),u(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);return r}function D(e){null!=e&&this.set(e)}d.suppressDeprecationWarnings=!1,d.deprecationHandler=null,A=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)h(e,t)&&n.push(t);return n};var I,P={};function M(e){return e?e.toLowerCase().replace("_","-"):e}function $(e){var t=null;if(!P[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=I._abbr,require("./locale/"+e),O(t)}catch(e){}return P[e]}function O(e,t){var n;return e&&(n=a(t)?N(e):R(e,t))&&(I=n),I._abbr}function R(e,t){return null!==t?(t.abbr=e,null!=P[e]?(T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),t=E(P[e]._config,t)):null!=t.parentLocale&&(null!=P[t.parentLocale]?t=E(P[t.parentLocale]._config,t):T("parentLocaleUndefined","specified parentLocale is not defined yet")),P[e]=new D(t),O(e),P[e]):(delete P[e],null)}function N(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return I;if(!s(e)){if(t=$(e))return t;e=[e]}return function(e){for(var t,n,r,i,a=0;a<e.length;){for(t=(i=M(e[a]).split("-")).length,n=(n=M(e[a+1]))?n.split("-"):null;0<t;){if(r=$(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&C(i,n,!0)>=t-1)break;t--}a++}return null}(e)}var L={};function F(e,t){var n=e.toLowerCase();L[n]=L[n+"s"]=L[t]=e}function G(e){return"string"==typeof e?L[e]||L[e.toLowerCase()]:void 0}function j(e){var t,n,r={};for(n in e)h(e,n)&&(t=G(n))&&(r[t]=e[n]);return r}function B(t,n){return function(e){return null!=e?(H(this,t,e),d.updateOffset(this,n),this):U(this,t)}}function U(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function H(e,t,n){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](n)}function W(e,t){var n;if("object"==typeof e)for(n in e)this.set(n,e[n]);else if(x(this[e=G(e)]))return this[e](t);return this}function q(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var z=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,V=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Y={},K={};function Q(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(K[e]=i),t&&(K[t[0]]=function(){return q(i.apply(this,arguments),t[1],t[2])}),n&&(K[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function X(e,t){return e.isValid()?(t=Z(t,e.localeData()),Y[t]=Y[t]||function(r){var e,i,t,a=r.match(z);for(e=0,i=a.length;e<i;e++)K[a[e]]?a[e]=K[a[e]]:a[e]=(t=a[e]).match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"");return function(e){var t,n="";for(t=0;t<i;t++)n+=a[t]instanceof Function?a[t].call(e,r):a[t];return n}}(t),Y[t](e)):e.localeData().invalidDate()}function Z(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(V.lastIndex=0;0<=n&&V.test(e);)e=e.replace(V,r),V.lastIndex=0,n-=1;return e}var J=/\d/,ee=/\d\d/,te=/\d{3}/,ne=/\d{4}/,re=/[+-]?\d{6}/,ie=/\d\d?/,ae=/\d\d\d\d?/,oe=/\d\d\d\d\d\d?/,se=/\d{1,3}/,ce=/\d{1,4}/,le=/[+-]?\d{1,6}/,ue=/\d+/,fe=/[+-]?\d+/,de=/Z|[+-]\d\d:?\d\d/gi,he=/Z|[+-]\d\d(?::?\d\d)?/gi,pe=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,me={};function ge(e,n,r){me[e]=x(n)?n:function(e,t){return e&&r?r:n}}function _e(e,t){return h(me,e)?me[e](t._strict,t._locale):new RegExp(be(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i})))}function be(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ve={};function ye(e,n){var t,r=n;for("string"==typeof e&&(e=[e]),"number"==typeof n&&(r=function(e,t){t[n]=w(e)}),t=0;t<e.length;t++)ve[e[t]]=r}function we(e,i){ye(e,function(e,t,n,r){n._w=n._w||{},i(e,n._w,n,r)})}var Ce,Ae=0,Se=1,Te=2,xe=3,ke=4,Ee=5,De=6,Ie=7,Pe=8;function Me(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}Ce=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},Q("M",["MM",2],"Mo",function(){return this.month()+1}),Q("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Q("MMMM",0,0,function(e){return this.localeData().months(this,e)}),F("month","M"),ge("M",ie),ge("MM",ie,ee),ge("MMM",function(e,t){return t.monthsShortRegex(e)}),ge("MMMM",function(e,t){return t.monthsRegex(e)}),ye(["M","MM"],function(e,t){t[Se]=w(e)-1}),ye(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[Se]=i:p(n).invalidMonth=e});var $e=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,Oe="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Re="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ne(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=w(t);else if("number"!=typeof(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Me(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Le(e){return null!=e?(Ne(this,e),d.updateOffset(this,!0),this):U(this,"Month")}var Fe=pe;var Ge=pe;function je(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],a=[];for(t=0;t<12;t++)n=f([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),a.sort(e),t=0;t<12;t++)r[t]=be(r[t]),i[t]=be(i[t]),a[t]=be(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Be(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[Se]<0||11<n[Se]?Se:n[Te]<1||n[Te]>Me(n[Ae],n[Se])?Te:n[xe]<0||24<n[xe]||24===n[xe]&&(0!==n[ke]||0!==n[Ee]||0!==n[De])?xe:n[ke]<0||59<n[ke]?ke:n[Ee]<0||59<n[Ee]?Ee:n[De]<0||999<n[De]?De:-1,p(e)._overflowDayOfYear&&(t<Ae||Te<t)&&(t=Te),p(e)._overflowWeeks&&-1===t&&(t=Ie),p(e)._overflowWeekday&&-1===t&&(t=Pe),p(e).overflow=t),e}var Ue=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,He=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,We=/Z|[+-]\d\d(?::?\d\d)?/,qe=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ze=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ve=/^\/?Date\((\-?\d+)/i;function Ye(e){var t,n,r,i,a,o,s=e._i,c=Ue.exec(s)||He.exec(s);if(c){for(p(e).iso=!0,t=0,n=qe.length;t<n;t++)if(qe[t][1].exec(c[1])){i=qe[t][0],r=!1!==qe[t][2];break}if(null==i)return void(e._isValid=!1);if(c[3]){for(t=0,n=ze.length;t<n;t++)if(ze[t][1].exec(c[3])){a=(c[2]||" ")+ze[t][0];break}if(null==a)return void(e._isValid=!1)}if(!r&&null!=a)return void(e._isValid=!1);if(c[4]){if(!We.exec(c[4]))return void(e._isValid=!1);o="Z"}e._f=i+(a||"")+(o||""),at(e)}else e._isValid=!1}function Ke(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&0<=e&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Qe(e){return Xe(e)?366:365}function Xe(e){return e%4==0&&e%100!=0||e%400==0}d.createFromInputFallback=n("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),Q("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),Q(0,["YY",2],0,function(){return this.year()%100}),Q(0,["YYYY",4],0,"year"),Q(0,["YYYYY",5],0,"year"),Q(0,["YYYYYY",6,!0],0,"year"),F("year","y"),ge("Y",fe),ge("YY",ie,ee),ge("YYYY",ce,ne),ge("YYYYY",le,re),ge("YYYYYY",le,re),ye(["YYYYY","YYYYYY"],Ae),ye("YYYY",function(e,t){t[Ae]=2===e.length?d.parseTwoDigitYear(e):w(e)}),ye("YY",function(e,t){t[Ae]=d.parseTwoDigitYear(e)}),ye("Y",function(e,t){t[Ae]=parseInt(e,10)}),d.parseTwoDigitYear=function(e){return w(e)+(68<w(e)?1900:2e3)};var Ze=B("FullYear",!0);function Je(e,t,n){var r=7+t-n;return-((7+Ke(e,0,r).getUTCDay()-t)%7)+r-1}function et(e,t,n,r,i){var a,o,s=1+7*(t-1)+(7+n-r)%7+Je(e,r,i);return o=s<=0?Qe(a=e-1)+s:s>Qe(e)?(a=e+1,s-Qe(e)):(a=e,s),{year:a,dayOfYear:o}}function tt(e,t,n){var r,i,a=Je(e.year(),t,n),o=Math.floor((e.dayOfYear()-a-1)/7)+1;return o<1?r=o+nt(i=e.year()-1,t,n):o>nt(e.year(),t,n)?(r=o-nt(e.year(),t,n),i=e.year()+1):(i=e.year(),r=o),{week:r,year:i}}function nt(e,t,n){var r=Je(e,t,n),i=Je(e+1,t,n);return(Qe(e)-r+i)/7}function rt(e,t,n){return null!=e?e:null!=t?t:n}function it(e){var t,n,r,i,a=[];if(!e._d){var o,s;for(o=e,s=new Date(d.now()),r=o._useUTC?[s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()]:[s.getFullYear(),s.getMonth(),s.getDate()],e._w&&null==e._a[Te]&&null==e._a[Se]&&function(e){var t,n,r,i,a,o,s,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,o=4,n=rt(t.GG,e._a[Ae],tt(ct(),1,4).year),r=rt(t.W,1),((i=rt(t.E,1))<1||7<i)&&(c=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,n=rt(t.gg,e._a[Ae],tt(ct(),a,o).year),r=rt(t.w,1),null!=t.d?((i=t.d)<0||6<i)&&(c=!0):null!=t.e?(i=t.e+a,(t.e<0||6<t.e)&&(c=!0)):i=a);r<1||r>nt(n,a,o)?p(e)._overflowWeeks=!0:null!=c?p(e)._overflowWeekday=!0:(s=et(n,r,i,a,o),e._a[Ae]=s.year,e._dayOfYear=s.dayOfYear)}(e),e._dayOfYear&&(i=rt(e._a[Ae],r[Ae]),e._dayOfYear>Qe(i)&&(p(e)._overflowDayOfYear=!0),n=Ke(i,0,e._dayOfYear),e._a[Se]=n.getUTCMonth(),e._a[Te]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[xe]&&0===e._a[ke]&&0===e._a[Ee]&&0===e._a[De]&&(e._nextDay=!0,e._a[xe]=0),e._d=(e._useUTC?Ke:function(e,t,n,r,i,a,o){var s=new Date(e,t,n,r,i,a,o);return e<100&&0<=e&&isFinite(s.getFullYear())&&s.setFullYear(e),s}).apply(null,a),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[xe]=24)}}function at(e){if(e._f!==d.ISO_8601){e._a=[],p(e).empty=!0;var t,n,r,i,a,o,s,c,l=""+e._i,u=l.length,f=0;for(r=Z(e._f,e._locale).match(z)||[],t=0;t<r.length;t++)i=r[t],(n=(l.match(_e(i,e))||[])[0])&&(0<(a=l.substr(0,l.indexOf(n))).length&&p(e).unusedInput.push(a),l=l.slice(l.indexOf(n)+n.length),f+=n.length),K[i]?(n?p(e).empty=!1:p(e).unusedTokens.push(i),o=i,c=e,null!=(s=n)&&h(ve,o)&&ve[o](s,c._a,c,o)):e._strict&&!n&&p(e).unusedTokens.push(i);p(e).charsLeftOver=u-f,0<l.length&&p(e).unusedInput.push(l),!0===p(e).bigHour&&e._a[xe]<=12&&0<e._a[xe]&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[xe]=function(e,t,n){var r;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0)),t)}(e._locale,e._a[xe],e._meridiem),it(e),Be(e)}else Ye(e)}function ot(e){var t,n,r,i,a=e._i,o=e._f;return e._locale=e._locale||N(e._l),null===a||void 0===o&&""===a?g({nullInput:!0}):("string"==typeof a&&(e._i=a=e._locale.preparse(a)),v(a)?new b(Be(a)):(s(o)?function(e){var t,n,r,i,a;if(0===e._f.length)return p(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)a=0,t=_({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],at(t),m(t)&&(a+=p(t).charsLeftOver,a+=10*p(t).unusedTokens.length,p(t).score=a,(null==r||a<r)&&(r=a,n=t));u(e,n||t)}(e):o?at(e):c(a)?e._d=a:void 0===(n=(t=e)._i)?t._d=new Date(d.now()):c(n)?t._d=new Date(n.valueOf()):"string"==typeof n?(r=t,null===(i=Ve.exec(r._i))?(Ye(r),!1===r._isValid&&(delete r._isValid,d.createFromInputFallback(r))):r._d=new Date(+i[1])):s(n)?(t._a=l(n.slice(0),function(e){return parseInt(e,10)}),it(t)):"object"==typeof n?function(e){if(!e._d){var t=j(e._i);e._a=l([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),it(e)}}(t):"number"==typeof n?t._d=new Date(n):d.createFromInputFallback(t),m(e)||(e._d=null),e))}function st(e,t,n,r,i){var a,o={};return"boolean"==typeof n&&(r=n,n=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=i,o._l=n,o._i=e,o._f=t,o._strict=r,(a=new b(Be(ot(o))))._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function ct(e,t,n,r){return st(e,t,n,r,!1)}d.ISO_8601=function(){};var lt=n("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var e=ct.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()}),ut=n("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var e=ct.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:g()});function ft(e,t){var n,r;if(1===t.length&&s(t[0])&&(t=t[0]),!t.length)return ct();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function dt(e){var t=j(e),n=t.year||0,r=t.quarter||0,i=t.month||0,a=t.week||0,o=t.day||0,s=t.hour||0,c=t.minute||0,l=t.second||0,u=t.millisecond||0;this._milliseconds=+u+1e3*l+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=N(),this._bubble()}function ht(e){return e instanceof dt}function pt(e,n){Q(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+q(~~(e/60),2)+n+q(~~e%60,2)})}pt("Z",":"),pt("ZZ",""),ge("Z",he),ge("ZZ",he),ye(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=gt(he,e)});var mt=/([\+\-]|\d\d)/gi;function gt(e,t){var n=(t||"").match(e)||[],r=((n[n.length-1]||[])+"").match(mt)||["-",0,0],i=60*r[1]+w(r[2]);return"+"===r[0]?i:-i}function _t(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(v(e)||c(e)?e.valueOf():ct(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),d.updateOffset(n,!1),n):ct(e).local()}function bt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function vt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}d.updateOffset=function(){};var yt=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,wt=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;function Ct(e,t){var n,r,i,a=e,o=null;return ht(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:"number"==typeof e?(a={},t?a[t]=e:a.milliseconds=e):(o=yt.exec(e))?(n="-"===o[1]?-1:1,a={y:0,d:w(o[Te])*n,h:w(o[xe])*n,m:w(o[ke])*n,s:w(o[Ee])*n,ms:w(o[De])*n}):(o=wt.exec(e))?(n="-"===o[1]?-1:1,a={y:At(o[2],n),M:At(o[3],n),w:At(o[4],n),d:At(o[5],n),h:At(o[6],n),m:At(o[7],n),s:At(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=_t(t,e),e.isBefore(t)?n=St(e,t):((n=St(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(ct(a.from),ct(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new dt(a),ht(e)&&h(e,"_locale")&&(r._locale=e._locale),r}function At(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function St(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Tt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function xt(r,i){return function(e,t){var n;return null===t||isNaN(+t)||(T(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period)."),n=e,e=t,t=n),kt(this,Ct(e="string"==typeof e?+e:e,t),r),this}}function kt(e,t,n,r){var i=t._milliseconds,a=Tt(t._days),o=Tt(t._months);e.isValid()&&(r=null==r||r,i&&e._d.setTime(e._d.valueOf()+i*n),a&&H(e,"Date",U(e,"Date")+a*n),o&&Ne(e,U(e,"Month")+o*n),r&&d.updateOffset(e,a||o))}Ct.fn=dt.prototype;var Et=xt(1,"add"),Dt=xt(-1,"subtract");function It(e){var t;return void 0===e?this._locale._abbr:(null!=(t=N(e))&&(this._locale=t),this)}d.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",d.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Pt=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Mt(){return this._locale}function $t(e,t){Q(0,[e,e.length],0,t)}function Ot(e,t,n,r,i){var a;return null==e?tt(this,r,i).year:((a=nt(e,r,i))<t&&(t=a),function(e,t,n,r,i){var a=et(e,t,n,r,i),o=Ke(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,e,t,n,r,i))}Q(0,["gg",2],0,function(){return this.weekYear()%100}),Q(0,["GG",2],0,function(){return this.isoWeekYear()%100}),$t("gggg","weekYear"),$t("ggggg","weekYear"),$t("GGGG","isoWeekYear"),$t("GGGGG","isoWeekYear"),F("weekYear","gg"),F("isoWeekYear","GG"),ge("G",fe),ge("g",fe),ge("GG",ie,ee),ge("gg",ie,ee),ge("GGGG",ce,ne),ge("gggg",ce,ne),ge("GGGGG",le,re),ge("ggggg",le,re),we(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=w(e)}),we(["gg","GG"],function(e,t,n,r){t[r]=d.parseTwoDigitYear(e)}),Q("Q",0,"Qo","quarter"),F("quarter","Q"),ge("Q",J),ye("Q",function(e,t){t[Se]=3*(w(e)-1)}),Q("w",["ww",2],"wo","week"),Q("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),ge("w",ie),ge("ww",ie,ee),ge("W",ie),ge("WW",ie,ee),we(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=w(e)});Q("D",["DD",2],"Do","date"),F("date","D"),ge("D",ie),ge("DD",ie,ee),ge("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),ye(["D","DD"],Te),ye("Do",function(e,t){t[Te]=w(e.match(ie)[0])});var Rt=B("Date",!0);Q("d",0,"do","day"),Q("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Q("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Q("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Q("e",0,0,"weekday"),Q("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),ge("d",ie),ge("e",ie),ge("E",ie),ge("dd",function(e,t){return t.weekdaysMinRegex(e)}),ge("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ge("dddd",function(e,t){return t.weekdaysRegex(e)}),we(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:p(n).invalidWeekday=e}),we(["d","e","E"],function(e,t,n,r){t[r]=w(e)});var Nt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Lt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Ft="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Gt=pe;var jt=pe;var Bt=pe;function Ut(){function e(e,t){return t.length-e.length}var t,n,r,i,a,o=[],s=[],c=[],l=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),c.push(a),l.push(r),l.push(i),l.push(a);for(o.sort(e),s.sort(e),c.sort(e),l.sort(e),t=0;t<7;t++)s[t]=be(s[t]),c[t]=be(c[t]),l[t]=be(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Ht(){return this.hours()%12||12}function Wt(e,t){Q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function qt(e,t){return t._meridiemParse}Q("DDD",["DDDD",3],"DDDo","dayOfYear"),F("dayOfYear","DDD"),ge("DDD",se),ge("DDDD",te),ye(["DDD","DDDD"],function(e,t,n){n._dayOfYear=w(e)}),Q("H",["HH",2],0,"hour"),Q("h",["hh",2],0,Ht),Q("k",["kk",2],0,function(){return this.hours()||24}),Q("hmm",0,0,function(){return""+Ht.apply(this)+q(this.minutes(),2)}),Q("hmmss",0,0,function(){return""+Ht.apply(this)+q(this.minutes(),2)+q(this.seconds(),2)}),Q("Hmm",0,0,function(){return""+this.hours()+q(this.minutes(),2)}),Q("Hmmss",0,0,function(){return""+this.hours()+q(this.minutes(),2)+q(this.seconds(),2)}),Wt("a",!0),Wt("A",!1),F("hour","h"),ge("a",qt),ge("A",qt),ge("H",ie),ge("h",ie),ge("HH",ie,ee),ge("hh",ie,ee),ge("hmm",ae),ge("hmmss",oe),ge("Hmm",ae),ge("Hmmss",oe),ye(["H","HH"],xe),ye(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ye(["h","hh"],function(e,t,n){t[xe]=w(e),p(n).bigHour=!0}),ye("hmm",function(e,t,n){var r=e.length-2;t[xe]=w(e.substr(0,r)),t[ke]=w(e.substr(r)),p(n).bigHour=!0}),ye("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[xe]=w(e.substr(0,r)),t[ke]=w(e.substr(r,2)),t[Ee]=w(e.substr(i)),p(n).bigHour=!0}),ye("Hmm",function(e,t,n){var r=e.length-2;t[xe]=w(e.substr(0,r)),t[ke]=w(e.substr(r))}),ye("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[xe]=w(e.substr(0,r)),t[ke]=w(e.substr(r,2)),t[Ee]=w(e.substr(i))});var zt=B("Hours",!0);Q("m",["mm",2],0,"minute"),F("minute","m"),ge("m",ie),ge("mm",ie,ee),ye(["m","mm"],ke);var Vt=B("Minutes",!1);Q("s",["ss",2],0,"second"),F("second","s"),ge("s",ie),ge("ss",ie,ee),ye(["s","ss"],Ee);var Yt,Kt=B("Seconds",!1);for(Q("S",0,0,function(){return~~(this.millisecond()/100)}),Q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Q(0,["SSS",3],0,"millisecond"),Q(0,["SSSS",4],0,function(){return 10*this.millisecond()}),Q(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),Q(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),Q(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),Q(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),Q(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),F("millisecond","ms"),ge("S",se,J),ge("SS",se,ee),ge("SSS",se,te),Yt="SSSS";Yt.length<=9;Yt+="S")ge(Yt,ue);function Qt(e,t){t[De]=w(1e3*("0."+e))}for(Yt="S";Yt.length<=9;Yt+="S")ye(Yt,Qt);var Xt=B("Milliseconds",!1);Q("z",0,0,"zoneAbbr"),Q("zz",0,0,"zoneName");var Zt=b.prototype;Zt.add=Et,Zt.calendar=function(e,t){var n=e||ct(),r=_t(n,this).startOf("day"),i=this.diff(r,"days",!0),a=i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse",o=t&&(x(t[a])?t[a]():t[a]);return this.format(o||this.localeData().calendar(a,this,ct(n)))},Zt.clone=function(){return new b(this)},Zt.diff=function(e,t,n){var r,i,a,o;return this.isValid()&&(r=_t(e,this)).isValid()?(i=6e4*(r.utcOffset()-this.utcOffset()),"year"===(t=G(t))||"month"===t||"quarter"===t?(s=this,c=r,f=12*(c.year()-s.year())+(c.month()-s.month()),d=s.clone().add(f,"months"),u=c-d<0?(l=s.clone().add(f-1,"months"),(c-d)/(d-l)):(l=s.clone().add(f+1,"months"),(c-d)/(l-d)),o=-(f+u)||0,"quarter"===t?o/=3:"year"===t&&(o/=12)):(a=this-r,o="second"===t?a/1e3:"minute"===t?a/6e4:"hour"===t?a/36e5:"day"===t?(a-i)/864e5:"week"===t?(a-i)/6048e5:a),n?o:y(o)):NaN;var s,c,l,u,f,d},Zt.endOf=function(e){return void 0===(e=G(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},Zt.format=function(e){e||(e=this.isUtc()?d.defaultFormatUtc:d.defaultFormat);var t=X(this,e);return this.localeData().postformat(t)},Zt.from=function(e,t){return this.isValid()&&(v(e)&&e.isValid()||ct(e).isValid())?Ct({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Zt.fromNow=function(e){return this.from(ct(),e)},Zt.to=function(e,t){return this.isValid()&&(v(e)&&e.isValid()||ct(e).isValid())?Ct({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Zt.toNow=function(e){return this.to(ct(),e)},Zt.get=W,Zt.invalidAt=function(){return p(this).overflow},Zt.isAfter=function(e,t){var n=v(e)?e:ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=G(a(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},Zt.isBefore=function(e,t){var n=v(e)?e:ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=G(a(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},Zt.isBetween=function(e,t,n,r){return("("===(r=r||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===r[1]?this.isBefore(t,n):!this.isAfter(t,n))},Zt.isSame=function(e,t){var n,r=v(e)?e:ct(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=G(t||"millisecond"))?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},Zt.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Zt.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Zt.isValid=function(){return m(this)},Zt.lang=Pt,Zt.locale=It,Zt.localeData=Mt,Zt.max=ut,Zt.min=lt,Zt.parsingFlags=function(){return u({},p(this))},Zt.set=W,Zt.startOf=function(e){switch(e=G(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},Zt.subtract=Dt,Zt.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]},Zt.toObject=function(){return{years:this.year(),months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}},Zt.toDate=function(){return this._offset?new Date(this.valueOf()):this._d},Zt.toISOString=function(){var e=this.clone().utc();return 0<e.year()&&e.year()<=9999?x(Date.prototype.toISOString)?this.toDate().toISOString():X(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):X(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},Zt.toJSON=function(){return this.isValid()?this.toISOString():null},Zt.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Zt.unix=function(){return Math.floor(this.valueOf()/1e3)},Zt.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Zt.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Zt.year=Ze,Zt.isLeapYear=function(){return Xe(this.year())},Zt.weekYear=function(e){return Ot.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Zt.isoWeekYear=function(e){return Ot.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Zt.quarter=Zt.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Zt.month=Le,Zt.daysInMonth=function(){return Me(this.year(),this.month())},Zt.week=Zt.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Zt.isoWeek=Zt.isoWeeks=function(e){var t=tt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Zt.weeksInYear=function(){var e=this.localeData()._week;return nt(this.year(),e.dow,e.doy)},Zt.isoWeeksInYear=function(){return nt(this.year(),1,4)},Zt.date=Rt,Zt.day=Zt.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-r,"d")):r},Zt.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Zt.isoWeekday=function(e){return this.isValid()?null==e?this.day()||7:this.day(this.day()%7?e:e-7):null!=e?this:NaN},Zt.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Zt.hour=Zt.hours=zt,Zt.minute=Zt.minutes=Vt,Zt.second=Zt.seconds=Kt,Zt.millisecond=Zt.milliseconds=Xt,Zt.utcOffset=function(e,t){var n,r=this._offset||0;return this.isValid()?null!=e?("string"==typeof e?e=gt(he,e):Math.abs(e)<16&&(e*=60),!this._isUTC&&t&&(n=bt(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),r!==e&&(!t||this._changeInProgress?kt(this,Ct(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,d.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?r:bt(this):null!=e?this:NaN},Zt.utc=function(e){return this.utcOffset(0,e)},Zt.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(bt(this),"m")),this},Zt.parseZone=function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(gt(de,this._i)),this},Zt.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?ct(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Zt.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Zt.isDSTShifted=function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={};if(_(e,this),(e=ot(e))._a){var t=e._isUTC?f(e._a):ct(e._a);this._isDSTShifted=this.isValid()&&0<C(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted},Zt.isLocal=function(){return!!this.isValid()&&!this._isUTC},Zt.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Zt.isUtc=vt,Zt.isUTC=vt,Zt.zoneAbbr=function(){return this._isUTC?"UTC":""},Zt.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Zt.dates=n("dates accessor is deprecated. Use date instead.",Rt),Zt.months=n("months accessor is deprecated. Use month instead",Le),Zt.years=n("years accessor is deprecated. Use year instead",Ze),Zt.zone=n("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()});var Jt=Zt;function en(e){return e}var tn=D.prototype;function nn(e,t,n,r){var i=N(),a=f().set(r,t);return i[n](a,e)}function rn(e,t,n){if("number"==typeof e&&(t=e,e=void 0),e=e||"",null!=t)return nn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=nn(e,r,n,"month");return i}function an(e,t,n,r){t=("boolean"==typeof e?"number"==typeof t&&(n=t,t=void 0):(t=e,e=!1,"number"==typeof(n=t)&&(n=t,t=void 0)),t||"");var i,a=N(),o=e?a._week.dow:0;if(null!=n)return nn(t,(n+o)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=nn(t,(i+o)%7,r,"day");return s}tn._calendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},tn.calendar=function(e,t,n){var r=this._calendar[e];return x(r)?r.call(t,n):r},tn._longDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},tn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},tn._invalidDate="Invalid date",tn.invalidDate=function(){return this._invalidDate},tn._ordinal="%d",tn.ordinal=function(e){return this._ordinal.replace("%d",e)},tn._ordinalParse=/\d{1,2}/,tn.preparse=en,tn.postformat=en,tn._relativeTime={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},tn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return x(i)?i(e,t,n,r):i.replace(/%d/i,e)},tn.pastFuture=function(e,t){var n=this._relativeTime[0<e?"future":"past"];return x(n)?n(t):n.replace(/%s/i,t)},tn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},tn.months=function(e,t){return s(this._months)?this._months[e.month()]:this._months[$e.test(t)?"format":"standalone"][e.month()]},tn._months=Oe,tn.monthsShort=function(e,t){return s(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[$e.test(t)?"format":"standalone"][e.month()]},tn._monthsShort=Re,tn.monthsParse=function(e,t,n){var r,i,a;if(this._monthsParseExact)return function(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Ce.call(this._shortMonthsParse,o))?i:null:-1!==(i=Ce.call(this._longMonthsParse,o))?i:null:"MMM"===t?-1!==(i=Ce.call(this._shortMonthsParse,o))?i:-1!==(i=Ce.call(this._longMonthsParse,o))?i:null:-1!==(i=Ce.call(this._longMonthsParse,o))?i:-1!==(i=Ce.call(this._shortMonthsParse,o))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},tn._monthsRegex=Ge,tn.monthsRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||je.call(this),e?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex},tn._monthsShortRegex=Fe,tn.monthsShortRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||je.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex},tn.week=function(e){return tt(e,this._week.dow,this._week.doy).week},tn._week={dow:0,doy:6},tn.firstDayOfYear=function(){return this._week.doy},tn.firstDayOfWeek=function(){return this._week.dow},tn.weekdays=function(e,t){return s(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]},tn._weekdays=Nt,tn.weekdaysMin=function(e){return this._weekdaysMin[e.day()]},tn._weekdaysMin=Ft,tn.weekdaysShort=function(e){return this._weekdaysShort[e.day()]},tn._weekdaysShort=Lt,tn.weekdaysParse=function(e,t,n){var r,i,a;if(this._weekdaysParseExact)return function(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ce.call(this._weekdaysParse,o))?i:null:"ddd"===t?-1!==(i=Ce.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=Ce.call(this._minWeekdaysParse,o))?i:null:"dddd"===t?-1!==(i=Ce.call(this._weekdaysParse,o))?i:-1!==(i=Ce.call(this._shortWeekdaysParse,o))?i:-1!==(i=Ce.call(this._minWeekdaysParse,o))?i:null:"ddd"===t?-1!==(i=Ce.call(this._shortWeekdaysParse,o))?i:-1!==(i=Ce.call(this._weekdaysParse,o))?i:-1!==(i=Ce.call(this._minWeekdaysParse,o))?i:null:-1!==(i=Ce.call(this._minWeekdaysParse,o))?i:-1!==(i=Ce.call(this._weekdaysParse,o))?i:-1!==(i=Ce.call(this._shortWeekdaysParse,o))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},tn._weekdaysRegex=Gt,tn.weekdaysRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Ut.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex},tn._weekdaysShortRegex=jt,tn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Ut.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex},tn._weekdaysMinRegex=Bt,tn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Ut.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex},tn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},tn._meridiemParse=/[ap]\.?m?\.?/i,tn.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},O("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),d.lang=n("moment.lang is deprecated. Use moment.locale instead.",O),d.langData=n("moment.langData is deprecated. Use moment.localeData instead.",N);var on=Math.abs;function sn(e,t,n,r){var i=Ct(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function cn(e){return e<0?Math.floor(e):Math.ceil(e)}function ln(e){return 4800*e/146097}function un(e){return 146097*e/4800}function fn(e){return function(){return this.as(e)}}var dn=fn("ms"),hn=fn("s"),pn=fn("m"),mn=fn("h"),gn=fn("d"),_n=fn("w"),bn=fn("M"),vn=fn("y");function yn(e){return function(){return this._data[e]}}var wn=yn("milliseconds"),Cn=yn("seconds"),An=yn("minutes"),Sn=yn("hours"),Tn=yn("days"),xn=yn("months"),kn=yn("years");var En=Math.round,Dn={s:45,m:45,h:22,d:26,M:11};var In=Math.abs;function Pn(){var e,t,n=In(this._milliseconds)/1e3,r=In(this._days),i=In(this._months);t=y((e=y(n/60))/60),n%=60,e%=60;var a=y(i/12),o=i%=12,s=r,c=t,l=e,u=n,f=this.asSeconds();return f?(f<0?"-":"")+"P"+(a?a+"Y":"")+(o?o+"M":"")+(s?s+"D":"")+(c||l||u?"T":"")+(c?c+"H":"")+(l?l+"M":"")+(u?u+"S":""):"P0D"}var Mn=dt.prototype;return Mn.abs=function(){var e=this._data;return this._milliseconds=on(this._milliseconds),this._days=on(this._days),this._months=on(this._months),e.milliseconds=on(e.milliseconds),e.seconds=on(e.seconds),e.minutes=on(e.minutes),e.hours=on(e.hours),e.months=on(e.months),e.years=on(e.years),this},Mn.add=function(e,t){return sn(this,e,t,1)},Mn.subtract=function(e,t){return sn(this,e,t,-1)},Mn.as=function(e){var t,n,r=this._milliseconds;if("month"===(e=G(e))||"year"===e)return t=this._days+r/864e5,n=this._months+ln(t),"month"===e?n:n/12;switch(t=this._days+Math.round(un(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Mn.asMilliseconds=dn,Mn.asSeconds=hn,Mn.asMinutes=pn,Mn.asHours=mn,Mn.asDays=gn,Mn.asWeeks=_n,Mn.asMonths=bn,Mn.asYears=vn,Mn.valueOf=function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12)},Mn._bubble=function(){var e,t,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return 0<=a&&0<=o&&0<=s||a<=0&&o<=0&&s<=0||(a+=864e5*cn(un(s)+o),s=o=0),c.milliseconds=a%1e3,e=y(a/1e3),c.seconds=e%60,t=y(e/60),c.minutes=t%60,n=y(t/60),c.hours=n%24,s+=i=y(ln(o+=y(n/24))),o-=cn(un(i)),r=y(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},Mn.get=function(e){return this[(e=G(e))+"s"]()},Mn.milliseconds=wn,Mn.seconds=Cn,Mn.minutes=An,Mn.hours=Sn,Mn.days=Tn,Mn.weeks=function(){return y(this.days()/7)},Mn.months=xn,Mn.years=kn,Mn.humanize=function(e){var t,n,r,i,a,o,s,c,l,u,f,d=this.localeData(),h=(n=!e,r=d,i=Ct(t=this).abs(),a=En(i.as("s")),o=En(i.as("m")),s=En(i.as("h")),c=En(i.as("d")),l=En(i.as("M")),u=En(i.as("y")),(f=a<Dn.s&&["s",a]||o<=1&&["m"]||o<Dn.m&&["mm",o]||s<=1&&["h"]||s<Dn.h&&["hh",s]||c<=1&&["d"]||c<Dn.d&&["dd",c]||l<=1&&["M"]||l<Dn.M&&["MM",l]||u<=1&&["y"]||["yy",u])[2]=n,f[3]=0<+t,f[4]=r,function(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}.apply(null,f));return e&&(h=d.pastFuture(+this,h)),d.postformat(h)},Mn.toISOString=Pn,Mn.toString=Pn,Mn.toJSON=Pn,Mn.locale=It,Mn.localeData=Mt,Mn.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Pn),Mn.lang=Pt,Q("X",0,0,"unix"),Q("x",0,0,"valueOf"),ge("x",fe),ge("X",/[+-]?\d+(\.\d{1,3})?/),ye("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ye("x",function(e,t,n){n._d=new Date(w(e))}),d.version="2.13.0",e=ct,d.fn=Jt,d.min=function(){return ft("isBefore",[].slice.call(arguments,0))},d.max=function(){return ft("isAfter",[].slice.call(arguments,0))},d.now=function(){return Date.now?Date.now():+new Date},d.utc=f,d.unix=function(e){return ct(1e3*e)},d.months=function(e,t){return rn(e,t,"months")},d.isDate=c,d.locale=O,d.invalid=g,d.duration=Ct,d.isMoment=v,d.weekdays=function(e,t,n){return an(e,t,n,"weekdays")},d.parseZone=function(){return ct.apply(null,arguments).parseZone()},d.localeData=N,d.isDuration=ht,d.monthsShort=function(e,t){return rn(e,t,"monthsShort")},d.weekdaysMin=function(e,t,n){return an(e,t,n,"weekdaysMin")},d.defineLocale=R,d.updateLocale=function(e,t){var n;return null!=t?(null!=P[e]&&(t=E(P[e]._config,t)),(n=new D(t)).parentLocale=P[e],P[e]=n,O(e)):null!=P[e]&&(null!=P[e].parentLocale?P[e]=P[e].parentLocale:null!=P[e]&&delete P[e]),P[e]},d.locales=function(){return A(P)},d.weekdaysShort=function(e,t,n){return an(e,t,n,"weekdaysShort")},d.normalizeUnits=G,d.relativeTimeThreshold=function(e,t){return void 0!==Dn[e]&&(void 0===t?Dn[e]:(Dn[e]=t,!0))},d.prototype=Jt,d}),function(e){"function"==typeof define&&define.amd?define(["jquery","moment"],e):"object"==typeof exports?module.exports=e(require("jquery"),require("moment")):e(jQuery,moment)}(function(M,$){var O=M.fullCalendar={version:"2.3.1"},f=O.views={};M.fn.fullCalendar=function(a){var o=Array.prototype.slice.call(arguments,1),s=this;return this.each(function(e,t){var n,r=M(t),i=r.data("fullCalendar");"string"==typeof a?i&&M.isFunction(i[a])&&(n=i[a].apply(i,o),e||(s=n),"destroy"===a&&r.removeData("fullCalendar")):i||(i=new O.CalendarBase(r,a),r.data("fullCalendar",i),i.render())}),s};var s=["header","buttonText","buttonIcons","themeButtonIcons"];function d(){var e,t,n,r,i,a=Array.prototype.slice.call(arguments),o={};for(e=0;e<s.length;e++){for(t=s[e],n=null,r=0;r<a.length;r++)i=a[r][t],M.isPlainObject(i)?n=M.extend(n||{},i):null!=i&&(n=null);null!==n&&(o[t]=n)}return a.unshift({}),a.push(o),M.extend.apply(M,a)}function i(e,t){t.left&&e.css({"border-left-width":1,"margin-left":t.left-1}),t.right&&e.css({"border-right-width":1,"margin-right":t.right-1})}function a(e){e.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}function h(){M("body").addClass("fc-not-allowed")}function p(){M("body").removeClass("fc-not-allowed")}function n(i,e,t){var a=Math.floor(e/i.length),o=Math.floor(e-a*(i.length-1)),s=[],c=[],l=[],u=0;r(i),i.each(function(e,t){var n=e===i.length-1?o:a,r=M(t).outerHeight(!0);r<n?(s.push(t),c.push(r),l.push(M(t).height())):u+=r}),t&&(e-=u,a=Math.floor(e/s.length),o=Math.floor(e-a*(s.length-1))),M(s).each(function(e,t){var n=e===s.length-1?o:a,r=c[e],i=n-(r-l[e]);r<n&&M(t).height(i)})}function r(e){e.height("")}function e(e){var r=0;return e.find("> *").each(function(e,t){var n=M(t).outerWidth();r<n&&(r=n)}),r++,e.width(r),r}function o(e,t){return e.height(t).addClass("fc-scroller"),e[0].scrollHeight-1>e[0].clientHeight||(c(e),!1)}function c(e){e.height("").removeClass("fc-scroller")}function m(e){var t=e.css("position"),n=e.parents().filter(function(){var e=M(this);return/(auto|scroll)/.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==t&&n.length?n:M(e[0].ownerDocument||document)}function g(e){var t=e.offset();return{left:t.left,right:t.left+e.outerWidth(),top:t.top,bottom:t.top+e.outerHeight()}}function t(e){var t=e.offset(),n=l(e),r=t.left+_(e,"border-left-width")+n.left,i=t.top+_(e,"border-top-width")+n.top;return{left:r,right:r+e[0].clientWidth,top:i,bottom:i+e[0].clientHeight}}function l(e){var t=e.innerWidth()-e[0].clientWidth,n={left:0,right:0,top:0,bottom:e.innerHeight()-e[0].clientHeight};return!function(){null===u&&(e=M("<div><div/></div>").css({position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}).appendTo("body"),t=e.children().offset().left>e.offset().left,e.remove(),u=t);var e,t;return u}()||"rtl"!=e.css("direction")?n.right=t:n.left=t,n}O.intersectionToSeg=v,O.applyAll=F,O.debounce=H,O.isInt=B,O.htmlEscape=E,O.cssToStr=P,O.proxy=U,O.getClientRect=t,O.getContentRect=function(e){var t=e.offset(),n=t.left+_(e,"border-left-width")+_(e,"padding-left"),r=t.top+_(e,"border-top-width")+_(e,"padding-top");return{left:n,right:n+e.width(),top:r,bottom:r+e.height()}},O.getScrollbarWidths=l;var u=null;function _(e,t){return parseFloat(e.css(t))||0}function b(e){return 1==e.which&&!e.ctrlKey}function v(e,t){var n,r,i,a,o=e.start,s=e.end,c=t.start,l=t.end;if(c<s&&o<l)return i=c<=o?(n=o.clone(),!0):(n=c.clone(),!1),a=s<=l?(r=s.clone(),!0):(r=l.clone(),!1),{start:n,end:r,isStart:i,isEnd:a}}O.computeIntervalUnit=C,O.durationHasTime=S;var y=["sun","mon","tue","wed","thu","fri","sat"],w=["year","month","week","day","hour","minute","second","millisecond"];function R(e,t){return $.duration({days:e.clone().stripTime().diff(t.clone().stripTime(),"days"),ms:e.time()-t.time()})}function N(e,t,n){return $.duration(Math.round(e.diff(t,n,!0)),n)}function C(e,t){var n,r,i;for(n=0;n<w.length&&!(1<=(i=A(r=w[n],e,t))&&B(i));n++);return r}function A(e,t,n){return null!=n?n.diff(t,e,!0):$.isDuration(t)?t.as(e):t.end.diff(t.start,e,!0)}function S(e){return Boolean(e.hours()||e.minutes()||e.seconds()||e.milliseconds())}function L(e){return/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(e)}var T={}.hasOwnProperty;function I(e){var t=function(){};return t.prototype=e,new t}function x(e,t){for(var n in e)k(e,n)&&(t[n]=e[n])}function k(e,t){return T.call(e,t)}function F(e,t,n){if(M.isFunction(e)&&(e=[e]),e){var r,i;for(r=0;r<e.length;r++)i=e[r].apply(t,n)||i;return i}}function G(){for(var e=0;e<arguments.length;e++)if(void 0!==arguments[e])return arguments[e]}function E(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#039;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}function D(e){return e.replace(/&.*?;/g,"")}function P(e){var n=[];return M.each(e,function(e,t){null!=t&&n.push(e+":"+t)}),n.join(";")}function j(e,t){return e-t}function B(e){return e%1==0}function U(e,t){var n=e[t];return function(){return n.apply(e,arguments)}}function H(t,n){var r,i,a,o,s=function(){var e=+new Date-o;e<n&&0<e?r=setTimeout(s,n-e):(r=null,t.apply(a,i),r||(a=i=null))};return function(){a=this,i=arguments,o=+new Date,r||(r=setTimeout(s,n))}}var W,q,z,V=/^\s*\d{4}-\d\d$/,Y=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?)?$/,K=$.fn,Q=M.extend({},K);function X(e,t,n){var r,i,a,o,s,c=e[0],l=1==e.length&&"string"==typeof c;return $.isMoment(c)?J(c,o=$.apply(null,e)):(s=c,"[object Date]"===Object.prototype.toString.call(s)||s instanceof Date||void 0===c?o=$.apply(null,e):(i=r=!1,l?V.test(c)?(e=[c+="-01"],i=r=!0):(a=Y.exec(c))&&(r=!a[5],i=!0):M.isArray(c)&&(i=!0),o=t||r?$.utc.apply($,e):$.apply(null,e),r?(o._ambigTime=!0,o._ambigZone=!0):n&&(i?o._ambigZone=!0:l&&(o.utcOffset?o.utcOffset(c):o.zone(c))))),o._fullCalendar=!0,o}function Z(e,t){var n,r,i=!1,a=!1,o=e.length,s=[];for(n=0;n<o;n++)r=e[n],$.isMoment(r)||(r=O.moment.parseZone(r)),i=i||r._ambigTime,a=a||r._ambigZone,s.push(r);for(n=0;n<o;n++)r=s[n],t||!i||r._ambigTime?a&&!r._ambigZone&&(s[n]=r.clone().stripZone()):s[n]=r.clone().stripTime();return s}function J(e,t){e._ambigTime?t._ambigTime=!0:t._ambigTime&&(t._ambigTime=!1),e._ambigZone?t._ambigZone=!0:t._ambigZone&&(t._ambigZone=!1)}function ee(e,t){e.year(t[0]||0).month(t[1]||0).date(t[2]||0).hours(t[3]||0).minutes(t[4]||0).seconds(t[5]||0).milliseconds(t[6]||0)}function te(e,t){return Q.format.call(e,t)}function ne(e,t){var n,r="";for(n=0;n<t.length;n++)r+=ie(e,t[n]);return r}O.moment=function(){return X(arguments)},O.moment.utc=function(){var e=X(arguments,!0);return e.hasTime()&&e.utc(),e},O.moment.parseZone=function(){return X(arguments,!0,!0)},K.clone=function(){var e=Q.clone.apply(this,arguments);return J(this,e),this._fullCalendar&&(e._fullCalendar=!0),e},K.week=K.weeks=function(e){var t=(this._locale||this._lang)._fullCalendar_weekCalc;return null==e&&"function"==typeof t?t(this):"ISO"===t?Q.isoWeek.apply(this,arguments):Q.week.apply(this,arguments)},K.time=function(e){if(!this._fullCalendar)return Q.time.apply(this,arguments);if(null==e)return $.duration({hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()});this._ambigTime=!1,$.isDuration(e)||$.isMoment(e)||(e=$.duration(e));var t=0;return $.isDuration(e)&&(t=24*Math.floor(e.asDays())),this.hours(t+e.hours()).minutes(e.minutes()).seconds(e.seconds()).milliseconds(e.milliseconds())},K.stripTime=function(){var e;return this._ambigTime||(e=this.toArray(),this.utc(),q(this,e.slice(0,3)),this._ambigTime=!0,this._ambigZone=!0),this},K.hasTime=function(){return!this._ambigTime},K.stripZone=function(){var e,t;return this._ambigZone||(e=this.toArray(),t=this._ambigTime,this.utc(),q(this,e),this._ambigTime=t||!1,this._ambigZone=!0),this},K.hasZone=function(){return!this._ambigZone},K.local=function(){var e=this.toArray(),t=this._ambigZone;return Q.local.apply(this,arguments),this._ambigTime=!1,this._ambigZone=!1,t&&z(this,e),this},K.utc=function(){return Q.utc.apply(this,arguments),this._ambigTime=!1,this._ambigZone=!1,this},M.each(["zone","utcOffset"],function(e,t){Q[t]&&(K[t]=function(e){return null!=e&&(this._ambigTime=!1,this._ambigZone=!1),Q[t].apply(this,arguments)})}),K.format=function(){return this._fullCalendar&&arguments[0]?(e=this,t=arguments[0],ne(e,le(t))):this._ambigTime?te(this,"YYYY-MM-DD"):this._ambigZone?te(this,"YYYY-MM-DD[T]HH:mm:ss"):Q.format.apply(this,arguments);var e,t},K.toISOString=function(){return this._ambigTime?te(this,"YYYY-MM-DD"):this._ambigZone?te(this,"YYYY-MM-DD[T]HH:mm:ss"):Q.toISOString.apply(this,arguments)},K.isWithin=function(e,t){var n=Z([this,e,t]);return n[0]>=n[1]&&n[0]<n[2]},K.isSame=function(e,t){var n;return this._fullCalendar?t?(n=Z([this,e],!0),Q.isSame.call(n[0],n[1],t)):(e=O.moment.parseZone(e),Q.isSame.call(this,e)&&Boolean(this._ambigTime)===Boolean(e._ambigTime)&&Boolean(this._ambigZone)===Boolean(e._ambigZone)):Q.isSame.apply(this,arguments)},M.each(["isBefore","isAfter"],function(e,r){K[r]=function(e,t){var n;return this._fullCalendar?(n=Z([this,e]),Q[r].call(n[0],n[1],t)):Q[r].apply(this,arguments)}}),W="_d"in $()&&"updateOffset"in $,q=W?function(e,t){e._d.setTime(Date.UTC.apply(Date,t)),$.updateOffset(e,!1)}:ee,z=W?function(e,t){e._d.setTime(+new Date(t[0]||0,t[1]||0,t[2]||0,t[3]||0,t[4]||0,t[5]||0,t[6]||0)),$.updateOffset(e,!1)}:ee;var re={t:function(e){return te(e,"a").charAt(0)},T:function(e){return te(e,"A").charAt(0)}};function ie(e,t){var n,r;return"string"==typeof t?t:(n=t.token)?re[n]?re[n](e):te(e,n):t.maybe&&(r=ne(e,t.maybe)).match(/[1-9]/)?r:""}function ae(e,t,n,r,i){return r=r||" - ",function(e,t,n,r,i){var a,o,s,c,l="",u="",f="",d="",h="";for(o=0;o<n.length&&!1!==(a=se(e,t,n[o]));o++)l+=a;for(s=n.length-1;o<s&&!1!==(a=se(e,t,n[s]));s--)u=a+u;for(c=o;c<=s;c++)f+=ie(e,n[c]),d+=ie(t,n[c]);(f||d)&&(h=i?d+r+f:f+r+d);return l+h+u}(e=O.moment.parseZone(e),t=O.moment.parseZone(t),le(n=(e.localeData||e.lang).call(e).longDateFormat(n)||n),r,i)}O.formatRange=ae;var oe={Y:"year",M:"month",D:"day",d:"day",A:"second",a:"second",T:"second",t:"second",H:"second",h:"second",m:"second",s:"second"};function se(e,t,n){var r,i;return"string"==typeof n?n:!!((r=n.token)&&(i=oe[r.charAt(0)])&&e.isSame(t,i))&&te(e,r)}var ce={};function le(e){return e in ce?ce[e]:ce[e]=function e(t){var n=[];var r=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g;var i;for(;i=r.exec(t);)i[1]?n.push(i[1]):i[2]?n.push({maybe:e(i[2])}):i[3]?n.push({token:i[3]}):i[5]&&n.push(i[5]);return n}(e)}function ue(){}(O.Class=ue).extend=function(e){var t,n=this;return k(e=e||{},"constructor")&&(t=e.constructor),"function"!=typeof t&&(t=e.constructor=function(){n.apply(this,arguments)}),t.prototype=I(n.prototype),x(e,t.prototype),function(e,t){var n,r,i=["constructor","toString","valueOf"];for(n=0;n<i.length;n++)e[r=i[n]]!==Object.prototype[r]&&(t[r]=e[r])}(e,t.prototype),x(n,t),t},ue.mixin=function(e){x(e.prototype||e,this.prototype)};var fe=ue.extend({isHidden:!0,options:null,el:null,documentMousedownProxy:null,margin:10,constructor:function(e){this.options=e||{}},show:function(){this.isHidden&&(this.el||this.render(),this.el.show(),this.position(),this.isHidden=!1,this.trigger("show"))},hide:function(){this.isHidden||(this.el.hide(),this.isHidden=!0,this.trigger("hide"))},render:function(){var e=this,t=this.options;this.el=M('<div class="fc-popover"/>').addClass(t.className||"").css({top:0,left:0}).append(t.content).appendTo(t.parentEl),this.el.on("click",".fc-close",function(){e.hide()}),t.autoHide&&M(document).on("mousedown",this.documentMousedownProxy=U(this,"documentMousedown"))},documentMousedown:function(e){this.el&&!M(e.target).closest(this.el).length&&this.hide()},destroy:function(){this.hide(),this.el&&(this.el.remove(),this.el=null),M(document).off("mousedown",this.documentMousedownProxy)},position:function(){var e,t,n,r,i,a=this.options,o=this.el.offsetParent().offset(),s=this.el.outerWidth(),c=this.el.outerHeight(),l=M(window),u=m(this.el);r=a.top||0,i=void 0!==a.left?a.left:void 0!==a.right?a.right-s:0,t=u.is(window)||u.is(document)?(u=l,e=0):(e=(n=u.offset()).top,n.left),e+=l.scrollTop(),t+=l.scrollLeft(),!1!==a.viewportConstrain&&(r=Math.min(r,e+u.outerHeight()-c-this.margin),r=Math.max(r,e+this.margin),i=Math.min(i,t+u.outerWidth()-s-this.margin),i=Math.max(i,t+this.margin)),this.el.css({top:r-o.top,left:i-o.left})},trigger:function(e){this.options[e]&&this.options[e].apply(this,Array.prototype.slice.call(arguments,1))}}),de=ue.extend({grid:null,rowCoords:null,colCoords:null,containerEl:null,bounds:null,constructor:function(e){this.grid=e},build:function(){this.rowCoords=this.grid.computeRowCoords(),this.colCoords=this.grid.computeColCoords(),this.computeBounds()},clear:function(){this.rowCoords=null,this.colCoords=null},getCell:function(e,t){var n,r,i,a=this.rowCoords,o=a.length,s=this.colCoords,c=s.length,l=null,u=null;if(this.inBounds(e,t)){for(n=0;n<o;n++)if(t>=(r=a[n]).top&&t<r.bottom){l=n;break}for(n=0;n<c;n++)if(e>=(r=s[n]).left&&e<r.right){u=n;break}if(null!==l&&null!==u)return(i=this.grid.getCell(l,u)).grid=this.grid,M.extend(i,a[l],s[u]),i}return null},computeBounds:function(){this.bounds=this.containerEl?t(this.containerEl):null},inBounds:function(e,t){var n=this.bounds;return!n||e>=n.left&&e<n.right&&t>=n.top&&t<n.bottom}}),he=ue.extend({coordMaps:null,constructor:function(e){this.coordMaps=e},build:function(){var e,t=this.coordMaps;for(e=0;e<t.length;e++)t[e].build()},getCell:function(e,t){var n,r=this.coordMaps,i=null;for(n=0;n<r.length&&!i;n++)i=r[n].getCell(e,t);return i},clear:function(){var e,t=this.coordMaps;for(e=0;e<t.length;e++)t[e].clear()}}),pe=O.DragListener=ue.extend({options:null,isListening:!1,isDragging:!1,originX:null,originY:null,mousemoveProxy:null,mouseupProxy:null,subjectEl:null,subjectHref:null,scrollEl:null,scrollBounds:null,scrollTopVel:null,scrollLeftVel:null,scrollIntervalId:null,scrollHandlerProxy:null,scrollSensitivity:30,scrollSpeed:200,scrollIntervalMs:50,constructor:function(e){e=e||{},this.options=e,this.subjectEl=e.subjectEl},mousedown:function(e){b(e)&&(e.preventDefault(),this.startListening(e),this.options.distance||this.startDrag(e))},startListening:function(e){var t;this.isListening||(e&&this.options.scroll&&((t=m(M(e.target))).is(window)||t.is(document)||(this.scrollEl=t,this.scrollHandlerProxy=H(U(this,"scrollHandler"),100),this.scrollEl.on("scroll",this.scrollHandlerProxy))),M(document).on("mousemove",this.mousemoveProxy=U(this,"mousemove")).on("mouseup",this.mouseupProxy=U(this,"mouseup")).on("selectstart",this.preventDefault),e?(this.originX=e.pageX,this.originY=e.pageY):(this.originX=0,this.originY=0),this.isListening=!0,this.listenStart(e))},listenStart:function(e){this.trigger("listenStart",e)},mousemove:function(e){var t,n=e.pageX-this.originX,r=e.pageY-this.originY;this.isDragging||(t=this.options.distance||1)*t<=n*n+r*r&&this.startDrag(e),this.isDragging&&this.drag(n,r,e)},startDrag:function(e){this.isListening||this.startListening(),this.isDragging||(this.isDragging=!0,this.dragStart(e))},dragStart:function(e){var t=this.subjectEl;this.trigger("dragStart",e),(this.subjectHref=t?t.attr("href"):null)&&t.removeAttr("href")},drag:function(e,t,n){this.trigger("drag",e,t,n),this.updateScroll(n)},mouseup:function(e){this.stopListening(e)},stopDrag:function(e){this.isDragging&&(this.stopScrolling(),this.dragStop(e),this.isDragging=!1)},dragStop:function(e){var t=this;this.trigger("dragStop",e),setTimeout(function(){t.subjectHref&&t.subjectEl.attr("href",t.subjectHref)},0)},stopListening:function(e){this.stopDrag(e),this.isListening&&(this.scrollEl&&(this.scrollEl.off("scroll",this.scrollHandlerProxy),this.scrollHandlerProxy=null),M(document).off("mousemove",this.mousemoveProxy).off("mouseup",this.mouseupProxy).off("selectstart",this.preventDefault),this.mousemoveProxy=null,this.mouseupProxy=null,this.isListening=!1,this.listenStop(e))},listenStop:function(e){this.trigger("listenStop",e)},trigger:function(e){this.options[e]&&this.options[e].apply(this,Array.prototype.slice.call(arguments,1))},preventDefault:function(e){e.preventDefault()},computeScrollBounds:function(){var e=this.scrollEl;this.scrollBounds=e?g(e):null},updateScroll:function(e){var t,n,r,i,a=this.scrollSensitivity,o=this.scrollBounds,s=0,c=0;o&&(t=(a-(e.pageY-o.top))/a,n=(a-(o.bottom-e.pageY))/a,r=(a-(e.pageX-o.left))/a,i=(a-(o.right-e.pageX))/a,0<=t&&t<=1?s=t*this.scrollSpeed*-1:0<=n&&n<=1&&(s=n*this.scrollSpeed),0<=r&&r<=1?c=r*this.scrollSpeed*-1:0<=i&&i<=1&&(c=i*this.scrollSpeed)),this.setScrollVel(s,c)},setScrollVel:function(e,t){this.scrollTopVel=e,this.scrollLeftVel=t,this.constrainScrollVel(),!this.scrollTopVel&&!this.scrollLeftVel||this.scrollIntervalId||(this.scrollIntervalId=setInterval(U(this,"scrollIntervalFunc"),this.scrollIntervalMs))},constrainScrollVel:function(){var e=this.scrollEl;this.scrollTopVel<0?e.scrollTop()<=0&&(this.scrollTopVel=0):0<this.scrollTopVel&&e.scrollTop()+e[0].clientHeight>=e[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?e.scrollLeft()<=0&&(this.scrollLeftVel=0):0<this.scrollLeftVel&&e.scrollLeft()+e[0].clientWidth>=e[0].scrollWidth&&(this.scrollLeftVel=0)},scrollIntervalFunc:function(){var e=this.scrollEl,t=this.scrollIntervalMs/1e3;this.scrollTopVel&&e.scrollTop(e.scrollTop()+this.scrollTopVel*t),this.scrollLeftVel&&e.scrollLeft(e.scrollLeft()+this.scrollLeftVel*t),this.constrainScrollVel(),this.scrollTopVel||this.scrollLeftVel||this.stopScrolling()},stopScrolling:function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.scrollStop())},scrollHandler:function(){this.scrollIntervalId||this.scrollStop()},scrollStop:function(){}}),me=pe.extend({coordMap:null,origCell:null,cell:null,coordAdjust:null,constructor:function(e,t){pe.prototype.constructor.call(this,t),this.coordMap=e},listenStart:function(e){var t,n,r,i,a,o,s,c,l,u,f,d=this.subjectEl;pe.prototype.listenStart.apply(this,arguments),this.computeCoords(),e?(r=n={left:e.pageX,top:e.pageY},d&&(t=g(d),u=r,f=t,r={left:Math.min(Math.max(u.left,f.left),f.right),top:Math.min(Math.max(u.top,f.top),f.bottom)}),this.origCell=this.getCell(r.left,r.top),d&&this.options.subjectCenter&&(this.origCell&&(s=this.origCell,c=t,t=(l={left:Math.max(s.left,c.left),right:Math.min(s.right,c.right),top:Math.max(s.top,c.top),bottom:Math.min(s.bottom,c.bottom)}).left<l.right&&l.top<l.bottom&&l||t),r={left:((o=t).left+o.right)/2,top:(o.top+o.bottom)/2}),this.coordAdjust=(a=n,{left:(i=r).left-a.left,top:i.top-a.top})):(this.origCell=null,this.coordAdjust=null)},computeCoords:function(){this.coordMap.build(),this.computeScrollBounds()},dragStart:function(e){var t;pe.prototype.dragStart.apply(this,arguments),(t=this.getCell(e.pageX,e.pageY))&&this.cellOver(t)},drag:function(e,t,n){var r;pe.prototype.drag.apply(this,arguments),ge(r=this.getCell(n.pageX,n.pageY),this.cell)||(this.cell&&this.cellOut(),r&&this.cellOver(r))},dragStop:function(){this.cellDone(),pe.prototype.dragStop.apply(this,arguments)},cellOver:function(e){this.cell=e,this.trigger("cellOver",e,ge(e,this.origCell),this.origCell)},cellOut:function(){this.cell&&(this.trigger("cellOut",this.cell),this.cellDone(),this.cell=null)},cellDone:function(){this.cell&&this.trigger("cellDone",this.cell)},listenStop:function(){pe.prototype.listenStop.apply(this,arguments),this.origCell=this.cell=null,this.coordMap.clear()},scrollStop:function(){pe.prototype.scrollStop.apply(this,arguments),this.computeCoords()},getCell:function(e,t){return this.coordAdjust&&(e+=this.coordAdjust.left,t+=this.coordAdjust.top),this.coordMap.getCell(e,t)}});function ge(e,t){return!e&&!t||!(!e||!t)&&(e.grid===t.grid&&e.row===t.row&&e.col===t.col)}var _e=ue.extend({options:null,sourceEl:null,el:null,parentEl:null,top0:null,left0:null,mouseY0:null,mouseX0:null,topDelta:null,leftDelta:null,mousemoveProxy:null,isFollowing:!1,isHidden:!1,isAnimating:!1,constructor:function(e,t){this.options=t=t||{},this.sourceEl=e,this.parentEl=t.parentEl?M(t.parentEl):e.parent()},start:function(e){this.isFollowing||(this.isFollowing=!0,this.mouseY0=e.pageY,this.mouseX0=e.pageX,this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),M(document).on("mousemove",this.mousemoveProxy=U(this,"mousemove")))},stop:function(e,t){var n=this,r=this.options.revertDuration;function i(){this.isAnimating=!1,n.destroyEl(),this.top0=this.left0=null,t&&t()}this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,M(document).off("mousemove",this.mousemoveProxy),e&&r&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:r,complete:i})):i())},getEl:function(){var e=this.el;return e||(this.sourceEl.width(),e=this.el=this.sourceEl.clone().css({position:"absolute",visibility:"",display:this.isHidden?"none":"",margin:0,right:"auto",bottom:"auto",width:this.sourceEl.width(),height:this.sourceEl.height(),opacity:this.options.opacity||"",zIndex:this.options.zIndex}).appendTo(this.parentEl)),e},destroyEl:function(){this.el&&(this.el.remove(),this.el=null)},updatePosition:function(){var e,t;this.getEl(),null===this.top0&&(this.sourceEl.width(),e=this.sourceEl.offset(),t=this.el.offsetParent().offset(),this.top0=e.top-t.top,this.left0=e.left-t.left),this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta})},mousemove:function(e){this.topDelta=e.pageY-this.mouseY0,this.leftDelta=e.pageX-this.mouseX0,this.isHidden||this.updatePosition()},hide:function(){this.isHidden||(this.isHidden=!0,this.el&&this.el.hide())},show:function(){this.isHidden&&(this.isHidden=!1,this.updatePosition(),this.getEl().show())}}),be=ue.extend({view:null,isRTL:null,cellHtml:"<td/>",constructor:function(e){this.view=e,this.isRTL=e.opt("isRTL")},rowHtml:function(e,t){var n,r=this.getHtmlRenderer("cell",e),i="";for(t=t||0,n=0;n<this.colCnt;n++)i+=r(this.getCell(t,n));return"<tr>"+(i=this.bookendCells(i,e,t))+"</tr>"},bookendCells:function(e,t,n){var r=this.getHtmlRenderer("intro",t)(n||0),i=this.getHtmlRenderer("outro",t)(n||0),a=this.isRTL?i:r,o=this.isRTL?r:i;return"string"==typeof e?a+e+o:e.prepend(a).append(o)},getHtmlRenderer:function(e,t){var n,r,i,a,o,s=this.view;return n=e+"Html",t&&(r=t+((o=e).charAt(0).toUpperCase()+o.slice(1))+"Html"),r&&(a=s[r])?i=s:r&&(a=this[r])?i=this:(a=s[n])?i=s:(a=this[n])&&(i=this),"function"==typeof a?function(){return a.apply(i,arguments)||""}:function(){return a||""}}}),ve=O.Grid=be.extend({start:null,end:null,rowCnt:0,colCnt:0,rowData:null,colData:null,el:null,coordMap:null,elsByFill:null,externalDragStartProxy:null,colHeadFormat:null,eventTimeFormat:null,displayEventTime:null,displayEventEnd:null,cellDuration:null,largeUnit:null,constructor:function(){be.apply(this,arguments),this.coordMap=new de(this),this.elsByFill={},this.externalDragStartProxy=U(this,"externalDragStart")},computeColHeadFormat:function(){},computeEventTimeFormat:function(){return this.view.opt("smallTimeFormat")},computeDisplayEventTime:function(){return!0},computeDisplayEventEnd:function(){return!0},setRange:function(e){var t,n,r=this.view;this.start=e.start.clone(),this.end=e.end.clone(),this.rowData=[],this.colData=[],this.updateCells(),this.colHeadFormat=r.opt("columnFormat")||this.computeColHeadFormat(),this.eventTimeFormat=r.opt("eventTimeFormat")||r.opt("timeFormat")||this.computeEventTimeFormat(),null==(t=r.opt("displayEventTime"))&&(t=this.computeDisplayEventTime()),null==(n=r.opt("displayEventEnd"))&&(n=this.computeDisplayEventEnd()),this.displayEventTime=t,this.displayEventEnd=n},updateCells:function(){},rangeToSegs:function(e){},diffDates:function(e,t){return this.largeUnit?N(e,t,this.largeUnit):R(e,t)},getCell:function(e,t){var n;return null==t&&(e="number"==typeof e?(t=e%this.colCnt,Math.floor(e/this.colCnt)):(t=e.col,e.row)),n={row:e,col:t},M.extend(n,this.getRowData(e),this.getColData(t)),M.extend(n,this.computeCellRange(n)),n},computeCellRange:function(e){var t=this.computeCellDate(e);return{start:t,end:t.clone().add(this.cellDuration)}},computeCellDate:function(e){},getRowData:function(e){return this.rowData[e]||{}},getColData:function(e){return this.colData[e]||{}},getRowEl:function(e){},getColEl:function(e){},getCellDayEl:function(e){return this.getColEl(e.col)||this.getRowEl(e.row)},computeRowCoords:function(){var e,t,n,r=[];for(e=0;e<this.rowCnt;e++)n=(t=this.getRowEl(e)).offset().top,r.push({top:n,bottom:n+t.outerHeight()});return r},computeColCoords:function(){var e,t,n,r=[];for(e=0;e<this.colCnt;e++)n=(t=this.getColEl(e)).offset().left,r.push({left:n,right:n+t.outerWidth()});return r},setElement:function(e){var t=this;(this.el=e).on("mousedown",function(e){M(e.target).is(".fc-event-container *, .fc-more")||M(e.target).closest(".fc-popover").length||t.dayMousedown(e)}),this.bindSegHandlers(),this.bindGlobalHandlers()},removeElement:function(){this.unbindGlobalHandlers(),this.el.remove()},renderSkeleton:function(){},renderDates:function(){},destroyDates:function(){},bindGlobalHandlers:function(){M(document).on("dragstart sortstart",this.externalDragStartProxy)},unbindGlobalHandlers:function(){M(document).off("dragstart sortstart",this.externalDragStartProxy)},dayMousedown:function(e){var r,i,a=this,t=this.view,o=t.opt("selectable");new me(this.coordMap,{scroll:t.opt("dragScroll"),dragStart:function(){t.unselect()},cellOver:function(e,t,n){n&&(r=t?e:null,o&&((i=a.computeSelection(n,e))?a.renderSelection(i):h()))},cellOut:function(e){i=r=null,a.destroySelection(),p()},listenStop:function(e){r&&t.trigger("dayClick",a.getCellDayEl(r),r.start,e),i&&t.reportSelection(i,e),p()}}).mousedown(e)},renderRangeHelper:function(e,t){var n=this.fabricateHelperEvent(e,t);this.renderHelper(n,t)},fabricateHelperEvent:function(e,t){var n=t?I(t.event):{};return n.start=e.start.clone(),n.end=e.end?e.end.clone():null,n.allDay=null,this.view.calendar.normalizeEventRange(n),n.className=(n.className||[]).concat("fc-helper"),t||(n.editable=!1),n},renderHelper:function(e,t){},destroyHelper:function(){},renderSelection:function(e){this.renderHighlight(e)},destroySelection:function(){this.destroyHighlight()},computeSelection:function(e,t){var n,r=[e.start,e.end,t.start,t.end];return r.sort(j),n={start:r[0].clone(),end:r[3].clone()},this.view.calendar.isSelectionRangeAllowed(n)?n:null},renderHighlight:function(e){this.renderFill("highlight",this.rangeToSegs(e))},destroyHighlight:function(){this.destroyFill("highlight")},highlightSegClasses:function(){return["fc-highlight"]},renderFill:function(e,t){},destroyFill:function(e){var t=this.elsByFill[e];t&&(t.remove(),delete this.elsByFill[e])},renderFillSegEls:function(e,i){var t,a=this,o=this[e+"SegEl"],n="",s=[];if(i.length){for(t=0;t<i.length;t++)n+=this.fillSegHtml(e,i[t]);M(n).each(function(e,t){var n=i[e],r=M(t);o&&(r=o.call(a,n,r)),r&&(r=M(r)).is(a.fillSegTag)&&(n.el=r,s.push(n))})}return s},fillSegTag:"div",fillSegHtml:function(e,t){var n=this[e+"SegClasses"],r=this[e+"SegCss"],i=n?n.call(this,t):[],a=P(r?r.call(this,t):{});return"<"+this.fillSegTag+(i.length?' class="'+i.join(" ")+'"':"")+(a?' style="'+a+'"':"")+" />"},headHtml:function(){return'<div class="fc-row '+this.view.widgetHeaderClass+'"><table><thead>'+this.rowHtml("head")+"</thead></table></div>"},headCellHtml:function(e){var t=this.view,n=e.start;return'<th class="fc-day-header '+t.widgetHeaderClass+" fc-"+y[n.day()]+'">'+E(n.format(this.colHeadFormat))+"</th>"},bgCellHtml:function(e){var t=this.view,n=e.start,r=this.getDayClasses(n);return r.unshift("fc-day",t.widgetContentClass),'<td class="'+r.join(" ")+'" data-date="'+n.format("YYYY-MM-DD")+'"></td>'},getDayClasses:function(e){var t=this.view,n=t.calendar.getNow().stripTime(),r=["fc-"+y[e.day()]];return 1==t.intervalDuration.as("months")&&e.month()!=t.intervalStart.month()&&r.push("fc-other-month"),e.isSame(n,"day")?r.push("fc-today",t.highlightStateClass):e<n?r.push("fc-past"):r.push("fc-future"),r}});function ye(e){return G((e.source||{}).rendering,e.rendering)}function we(e,t){return e.eventStartMS-t.eventStartMS}function Ce(e,t){return e.eventStartMS-t.eventStartMS||t.eventDurationMS-e.eventDurationMS||t.event.allDay-e.event.allDay||(e.event.title||"").localeCompare(t.event.title)}ve.mixin({mousedOverSeg:null,isDraggingSeg:!1,isResizingSeg:!1,isDraggingExternal:!1,segs:null,renderEvents:function(e){var t,n,r,i,a=this.eventsToSegs(e),o=[],s=[];for(t=0;t<a.length;t++)n=a[t],r=n.event,void 0,"background"===(i=ye(r))||"inverse-background"===i?o.push(n):s.push(n);o=this.renderBgSegs(o)||o,s=this.renderFgSegs(s)||s,this.segs=o.concat(s)},destroyEvents:function(){this.triggerSegMouseout(),this.destroyFgSegs(),this.destroyBgSegs(),this.segs=null},getEventSegs:function(){return this.segs||[]},renderFgSegs:function(e){},destroyFgSegs:function(){},renderFgSegEls:function(i,e){var t,a=this.view,n="",o=[];if(i.length){for(t=0;t<i.length;t++)n+=this.fgSegHtml(i[t],e);M(n).each(function(e,t){var n=i[e],r=a.resolveEventEl(n.event,M(t));r&&(r.data("fc-seg",n),n.el=r,o.push(n))})}return o},fgSegHtml:function(e,t){},renderBgSegs:function(e){return this.renderFill("bgEvent",e)},destroyBgSegs:function(){this.destroyFill("bgEvent")},bgEventSegEl:function(e,t){return this.view.resolveEventEl(e.event,t)},bgEventSegClasses:function(e){var t=e.event,n=t.source||{};return["fc-bgevent"].concat(t.className,n.className||[])},bgEventSegCss:function(e){var t=this.view,n=e.event,r=n.source||{};return{"background-color":n.backgroundColor||n.color||r.backgroundColor||r.color||t.opt("eventBackgroundColor")||t.opt("eventColor")}},businessHoursSegClasses:function(e){return["fc-nonbusiness","fc-bgevent"]},bindSegHandlers:function(){var r=this,n=this.view;M.each({mouseenter:function(e,t){r.triggerSegMouseover(e,t)},mouseleave:function(e,t){r.triggerSegMouseout(e,t)},click:function(e,t){return n.trigger("eventClick",this,e.event,t)},mousedown:function(e,t){M(t.target).is(".fc-resizer")&&n.isEventResizable(e.event)?r.segResizeMousedown(e,t,M(t.target).is(".fc-start-resizer")):n.isEventDraggable(e.event)&&r.segDragMousedown(e,t)}},function(e,n){r.el.on(e,".fc-event-container > *",function(e){var t=M(this).data("fc-seg");if(t&&!r.isDraggingSeg&&!r.isResizingSeg)return n.call(this,t,e)})})},triggerSegMouseover:function(e,t){this.mousedOverSeg||(this.mousedOverSeg=e,this.view.trigger("eventMouseover",e.el[0],e.event,t))},triggerSegMouseout:function(e,t){t=t||{},this.mousedOverSeg&&(e=e||this.mousedOverSeg,this.mousedOverSeg=null,this.view.trigger("eventMouseout",e.el[0],e.event,t))},segDragMousedown:function(r,e){var i,a=this,o=this.view,s=o.calendar,t=r.el,c=r.event,l=new _e(r.el,{parentEl:o.el,opacity:o.opt("dragOpacity"),revertDuration:o.opt("dragRevertDuration"),zIndex:2});new me(o.coordMap,{distance:5,scroll:o.opt("dragScroll"),subjectEl:t,subjectCenter:!0,listenStart:function(e){l.hide(),l.start(e)},dragStart:function(e){a.triggerSegMouseout(r,e),a.segDragStart(r,e),o.hideEvent(c)},cellOver:function(e,t,n){r.cell&&(n=r.cell),(i=a.computeEventDrop(n,e,c))&&!s.isEventRangeAllowed(i,c)&&(h(),i=null),i&&o.renderDrag(i,r)?l.hide():l.show(),t&&(i=null)},cellOut:function(){o.destroyDrag(),l.show(),i=null},cellDone:function(){p()},dragStop:function(e){l.stop(!i,function(){o.destroyDrag(),o.showEvent(c),a.segDragStop(r,e),i&&o.reportEventDrop(c,i,this.largeUnit,t,e)})},listenStop:function(){l.stop()}}).mousedown(e)},segDragStart:function(e,t){this.isDraggingSeg=!0,this.view.trigger("eventDragStart",e.el[0],e.event,t,{})},segDragStop:function(e,t){this.isDraggingSeg=!1,this.view.trigger("eventDragStop",e.el[0],e.event,t,{})},computeEventDrop:function(e,t,n){var r,i,a=this.view.calendar,o=e.start,s=t.start;return o.hasTime()===s.hasTime()?(r=this.diffDates(s,o),n.allDay&&S(r)?(i={start:n.start.clone(),end:a.getEventEnd(n),allDay:!1},a.normalizeEventRangeTimes(i)):i={start:n.start.clone(),end:n.end?n.end.clone():null,allDay:n.allDay},i.start.add(r),i.end&&i.end.add(r)):i={start:s.clone(),end:null,allDay:!s.hasTime()},i},applyDragOpacity:function(e){var n=this.view.opt("dragOpacity");null!=n&&e.each(function(e,t){t.style.opacity=n})},externalDragStart:function(e,t){var n,r,i=this.view;i.opt("droppable")&&(n=M((t?t.item:null)||e.target),r=i.opt("dropAccept"),(M.isFunction(r)?r.call(n[0],n):n.is(r))&&(this.isDraggingExternal||this.listenToExternalDrag(n,e,t)))},listenToExternalDrag:function(e,t,n){var r,i=this,a=function(e){var t,n,r,i,a=O.dataAttrPrefix;a&&(a+="-");(t=e.data(a+"event")||null)&&(t="object"==typeof t?M.extend({},t):{},null==(n=t.start)&&(n=t.time),r=t.duration,i=t.stick,delete t.start,delete t.time,delete t.duration,delete t.stick);null==n&&(n=e.data(a+"start"));null==n&&(n=e.data(a+"time"));null==r&&(r=e.data(a+"duration"));null==i&&(i=e.data(a+"stick"));return n=null!=n?$.duration(n):null,r=null!=r?$.duration(r):null,i=Boolean(i),{eventProps:t,startTime:n,duration:r,stick:i}}(e);new me(this.coordMap,{listenStart:function(){i.isDraggingExternal=!0},cellOver:function(e){(r=i.computeExternalDrop(e,a))?i.renderDrag(r):h()},cellOut:function(){r=null,i.destroyDrag(),p()},dragStop:function(){i.destroyDrag(),p(),r&&i.view.reportExternalDrop(a,r,e,t,n)},listenStop:function(){i.isDraggingExternal=!1}}).startDrag(t)},computeExternalDrop:function(e,t){var n={start:e.start.clone(),end:null};return t.startTime&&!n.start.hasTime()&&n.start.time(t.startTime),t.duration&&(n.end=n.start.clone().add(t.duration)),this.view.calendar.isExternalDropRangeAllowed(n,t.eventProps)?n:null},renderDrag:function(e,t){},destroyDrag:function(){},segResizeMousedown:function(r,e,i){var a,o=this,s=this.view,c=s.calendar,t=r.el,l=r.event,u=c.getEventEnd(l);new me(this.coordMap,{distance:5,scroll:s.opt("dragScroll"),subjectEl:t,dragStart:function(e){o.triggerSegMouseout(r,e),o.segResizeStart(r,e)},cellOver:function(e,t,n){(a=i?o.computeEventStartResize(n,e,l):o.computeEventEndResize(n,e,l))&&(c.isEventRangeAllowed(a,l)?a.start.isSame(l.start)&&a.end.isSame(u)&&(a=null):(h(),a=null)),a&&(s.hideEvent(l),o.renderEventResize(a,r))},cellOut:function(){a=null},cellDone:function(){o.destroyEventResize(),s.showEvent(l),p()},dragStop:function(e){o.segResizeStop(r,e),a&&s.reportEventResize(l,a,this.largeUnit,t,e)}}).mousedown(e)},segResizeStart:function(e,t){this.isResizingSeg=!0,this.view.trigger("eventResizeStart",e.el[0],e.event,t,{})},segResizeStop:function(e,t){this.isResizingSeg=!1,this.view.trigger("eventResizeStop",e.el[0],e.event,t,{})},computeEventStartResize:function(e,t,n){return this.computeEventResize("start",e,t,n)},computeEventEndResize:function(e,t,n){return this.computeEventResize("end",e,t,n)},computeEventResize:function(e,t,n,r){var i,a,o=this.view.calendar,s=this.diffDates(n[e],t[e]);return(i={start:r.start.clone(),end:o.getEventEnd(r),allDay:r.allDay}).allDay&&S(s)&&(i.allDay=!1,o.normalizeEventRangeTimes(i)),i[e].add(s),i.start.isBefore(i.end)||(a=r.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration,this.cellDuration&&this.cellDuration<a&&(a=this.cellDuration),"start"==e?i.start=i.end.clone().subtract(a):i.end=i.start.clone().add(a)),i},renderEventResize:function(e,t){},destroyEventResize:function(){},getEventTimeText:function(e,t,n){return null==t&&(t=this.eventTimeFormat),null==n&&(n=this.displayEventEnd),this.displayEventTime&&e.start.hasTime()?n&&e.end?this.view.formatRange(e,t):e.start.format(t):""},getSegClasses:function(e,t,n){var r=e.event,i=["fc-event",e.isStart?"fc-start":"fc-not-start",e.isEnd?"fc-end":"fc-not-end"].concat(r.className,r.source?r.source.className:[]);return t&&i.push("fc-draggable"),n&&i.push("fc-resizable"),i},getEventSkinCss:function(e){var t=this.view,n=e.source||{},r=e.color,i=n.color,a=t.opt("eventColor");return{"background-color":e.backgroundColor||r||n.backgroundColor||i||t.opt("eventBackgroundColor")||a,"border-color":e.borderColor||r||n.borderColor||i||t.opt("eventBorderColor")||a,color:e.textColor||n.textColor||t.opt("eventTextColor")}},eventsToSegs:function(e,t){var n,r=this.eventsToRanges(e),i=[];for(n=0;n<r.length;n++)i.push.apply(i,this.eventRangeToSegs(r[n],t));return i},eventsToRanges:function(e){var n=this,t=function(e){var t,n,r={};for(t=0;t<e.length;t++)n=e[t],(r[n._id]||(r[n._id]=[])).push(n);return r}(e),r=[];return M.each(t,function(e,t){t.length&&r.push.apply(r,"inverse-background"===ye(t[0])?n.eventsToInverseRanges(t):n.eventsToNormalRanges(t))}),r},eventsToNormalRanges:function(e){var t,n,r,i,a=this.view.calendar,o=[];for(t=0;t<e.length;t++)r=(n=e[t]).start.clone().stripZone(),i=a.getEventEnd(n).stripZone(),o.push({event:n,start:r,end:i,eventStartMS:+r,eventDurationMS:i-r});return o},eventsToInverseRanges:function(e){var t,n,r=this.view,i=r.start.clone().stripZone(),a=r.end.clone().stripZone(),o=this.eventsToNormalRanges(e),s=[],c=e[0],l=i;for(o.sort(we),t=0;t<o.length;t++)(n=o[t]).start>l&&s.push({event:c,start:l,end:n.start}),l=n.end;return l<a&&s.push({event:c,start:l,end:a}),s},eventRangeToSegs:function(e,t){var n,r,i;for(n=t?t(e):this.rangeToSegs(e),r=0;r<n.length;r++)(i=n[r]).event=e.event,i.eventStartMS=e.eventStartMS,i.eventDurationMS=e.eventDurationMS;return n}}),O.compareSegs=Ce,O.dataAttrPrefix="";var Ae=ve.extend({numbersVisible:!1,bottomCoordPadding:0,breakOnWeeks:null,cellDates:null,dayToCellOffsets:null,rowEls:null,dayEls:null,helperEls:null,constructor:function(){ve.apply(this,arguments),this.cellDuration=$.duration(1,"day")},renderDates:function(e){var t,n,r,i=this.view,a=this.rowCnt,o=a*this.colCnt,s="";for(t=0;t<a;t++)s+=this.dayRowHtml(t,e);for(this.el.html(s),this.rowEls=this.el.find(".fc-row"),this.dayEls=this.el.find(".fc-day"),n=0;n<o;n++)r=this.getCell(n),i.trigger("dayRender",null,r.start,this.dayEls.eq(n))},destroyDates:function(){this.destroySegPopover()},renderBusinessHours:function(){var e=this.view.calendar.getBusinessHoursEvents(!0),t=this.eventsToSegs(e);this.renderFill("businessHours",t,"bgevent")},dayRowHtml:function(e,t){var n=["fc-row","fc-week",this.view.widgetContentClass];return t&&n.push("fc-rigid"),'<div class="'+n.join(" ")+'"><div class="fc-bg"><table>'+this.rowHtml("day",e)+'</table></div><div class="fc-content-skeleton"><table>'+(this.numbersVisible?"<thead>"+this.rowHtml("number",e)+"</thead>":"")+"</table></div></div>"},dayCellHtml:function(e){return this.bgCellHtml(e)},computeColHeadFormat:function(){return 1<this.rowCnt?"ddd":1<this.colCnt?this.view.opt("dayOfMonthFormat"):"dddd"},computeEventTimeFormat:function(){return this.view.opt("extraSmallTimeFormat")},computeDisplayEventEnd:function(){return 1==this.colCnt},updateCells:function(){var e,t,n,r;if(this.updateCellDates(),e=this.cellDates,this.breakOnWeeks){for(t=e[0].day(),r=1;r<e.length&&e[r].day()!=t;r++);n=Math.ceil(e.length/r)}else n=1,r=e.length;this.rowCnt=n,this.colCnt=r},updateCellDates:function(){for(var e=this.view,t=this.start.clone(),n=[],r=-1,i=[];t.isBefore(this.end);)e.isHiddenDay(t)?i.push(r+.5):(r++,i.push(r),n.push(t.clone())),t.add(1,"days");this.cellDates=n,this.dayToCellOffsets=i},computeCellDate:function(e){var t=this.colCnt,n=e.row*t+(this.isRTL?t-e.col-1:e.col);return this.cellDates[n].clone()},getRowEl:function(e){return this.rowEls.eq(e)},getColEl:function(e){return this.dayEls.eq(e)},getCellDayEl:function(e){return this.dayEls.eq(e.row*this.colCnt+e.col)},computeRowCoords:function(){var e=ve.prototype.computeRowCoords.call(this);return e[e.length-1].bottom+=this.bottomCoordPadding,e},rangeToSegs:function(e){var t,n,r,i,a,o,s,c,l,u,f=this.isRTL,d=this.rowCnt,h=this.colCnt,p=[];for(e=this.view.computeDayRange(e),t=this.dateToCellOffset(e.start),n=this.dateToCellOffset(e.end.subtract(1,"days")),r=0;r<d;r++)a=(i=r*h)+h-1,c=Math.max(i,t),l=Math.min(a,n),(c=Math.ceil(c))<=(l=Math.floor(l))&&(o=c===t,s=l===n,c-=i,l-=i,u={row:r,isStart:o,isEnd:s},f?(u.leftCol=h-l-1,u.rightCol=h-c-1):(u.leftCol=c,u.rightCol=l),p.push(u));return p},dateToCellOffset:function(e){var t=this.dayToCellOffsets,n=e.diff(this.start,"days");return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]},renderDrag:function(e,t){if(this.renderHighlight(this.view.calendar.ensureVisibleEventRange(e)),t&&!t.el.closest(this.el).length)return this.renderRangeHelper(e,t),this.applyDragOpacity(this.helperEls),!0},destroyDrag:function(){this.destroyHighlight(),this.destroyHelper()},renderEventResize:function(e,t){this.renderHighlight(e),this.renderRangeHelper(e,t)},destroyEventResize:function(){this.destroyHighlight(),this.destroyHelper()},renderHelper:function(e,a){var o,s=[],t=this.eventsToSegs([e]);t=this.renderFgSegEls(t),o=this.renderSegRows(t),this.rowEls.each(function(e,t){var n,r=M(t),i=M('<div class="fc-helper-skeleton"><table/></div>');n=a&&a.row===e?a.el.position().top:r.find(".fc-content-skeleton tbody").position().top,i.css("top",n).find("table").append(o[e].tbodyEl),r.append(i),s.push(i[0])}),this.helperEls=M(s)},destroyHelper:function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},fillSegTag:"td",renderFill:function(e,t,n){var r,i,a,o=[];for(t=this.renderFillSegEls(e,t),r=0;r<t.length;r++)i=t[r],a=this.renderFillRow(e,i,n),this.rowEls.eq(i.row).append(a),o.push(a[0]);return this.elsByFill[e]=M(o),t},renderFillRow:function(e,t,n){var r,i,a=this.colCnt,o=t.leftCol,s=t.rightCol+1;return n=n||e.toLowerCase(),i=(r=M('<div class="fc-'+n+'-skeleton"><table><tr/></table></div>')).find("tr"),0<o&&i.append('<td colspan="'+o+'"/>'),i.append(t.el.attr("colspan",s-o)),s<a&&i.append('<td colspan="'+(a-s)+'"/>'),this.bookendCells(i,e),r}});function Se(e,t){var n,r;for(n=0;n<t.length;n++)if((r=t[n]).leftCol<=e.rightCol&&r.rightCol>=e.leftCol)return!0;return!1}function Te(e,t){return e.leftCol-t.leftCol}Ae.mixin({rowStructs:null,destroyEvents:function(){this.destroySegPopover(),ve.prototype.destroyEvents.apply(this,arguments)},getEventSegs:function(){return ve.prototype.getEventSegs.call(this).concat(this.popoverSegs||[])},renderBgSegs:function(e){var t=M.grep(e,function(e){return e.event.allDay});return ve.prototype.renderBgSegs.call(this,t)},renderFgSegs:function(e){var n;return e=this.renderFgSegEls(e),n=this.rowStructs=this.renderSegRows(e),this.rowEls.each(function(e,t){M(t).find(".fc-content-skeleton > table").append(n[e].tbodyEl)}),e},destroyFgSegs:function(){for(var e,t=this.rowStructs||[];e=t.pop();)e.tbodyEl.remove();this.rowStructs=null},renderSegRows:function(e){var t,n,r=[];for(t=this.groupSegRows(e),n=0;n<t.length;n++)r.push(this.renderSegRow(n,t[n]));return r},fgSegHtml:function(e,t){var n,r,i=this.view,a=e.event,o=i.isEventDraggable(a),s=!t&&a.allDay&&e.isStart&&i.isEventResizableFromStart(a),c=!t&&a.allDay&&e.isEnd&&i.isEventResizableFromEnd(a),l=this.getSegClasses(e,o,s||c),u=P(this.getEventSkinCss(a)),f="";return l.unshift("fc-day-grid-event","fc-h-event"),e.isStart&&(n=this.getEventTimeText(a))&&(f='<span class="fc-time">'+E(n)+"</span>"),r='<span class="fc-title">'+(E(a.title||"")||"&nbsp;")+"</span>",'<a class="'+l.join(" ")+'"'+(a.url?' href="'+E(a.url)+'"':"")+(u?' style="'+u+'"':"")+'><div class="fc-content">'+(this.isRTL?r+" "+f:f+" "+r)+"</div>"+(s?'<div class="fc-resizer fc-start-resizer" />':"")+(c?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},renderSegRow:function(e,t){var n,r,i,a,o,s,c,l=this.colCnt,u=this.buildSegLevels(t),f=Math.max(1,u.length),d=M("<tbody/>"),h=[],p=[],m=[];function g(e){for(;i<e;)(c=(m[n-1]||[])[i])?c.attr("rowspan",parseInt(c.attr("rowspan")||1,10)+1):(c=M("<td/>"),a.append(c)),p[n][i]=c,m[n][i]=c,i++}for(n=0;n<f;n++){if(r=u[n],i=0,a=M("<tr/>"),h.push([]),p.push([]),m.push([]),r)for(o=0;o<r.length;o++){for(g((s=r[o]).leftCol),c=M('<td class="fc-event-container"/>').append(s.el),s.leftCol!=s.rightCol?c.attr("colspan",s.rightCol-s.leftCol+1):m[n][i]=c;i<=s.rightCol;)p[n][i]=c,h[n][i]=s,i++;a.append(c)}g(l),this.bookendCells(a,"eventSkeleton"),d.append(a)}return{row:e,tbodyEl:d,cellMatrix:p,segMatrix:h,segLevels:u,segs:t}},buildSegLevels:function(e){var t,n,r,i=[];for(e.sort(Ce),t=0;t<e.length;t++){for(n=e[t],r=0;r<i.length&&Se(n,i[r]);r++);(i[n.level=r]||(i[r]=[])).push(n)}for(r=0;r<i.length;r++)i[r].sort(Te);return i},groupSegRows:function(e){var t,n=[];for(t=0;t<this.rowCnt;t++)n.push([]);for(t=0;t<e.length;t++)n[e[t].row].push(e[t]);return n}}),Ae.mixin({segPopover:null,popoverSegs:null,destroySegPopover:function(){this.segPopover&&this.segPopover.hide()},limitRows:function(e){var t,n,r=this.rowStructs||[];for(t=0;t<r.length;t++)this.unlimitRow(t),!1!==(n=!!e&&("number"==typeof e?e:this.computeRowLevelLimit(t)))&&this.limitRow(t,n)},computeRowLevelLimit:function(e){var t,n,r,i=this.rowEls.eq(e).height(),a=this.rowStructs[e].tbodyEl.children();function o(e,t){r=Math.max(r,M(t).outerHeight())}for(t=0;t<a.length;t++)if(n=a.eq(t).removeClass("fc-limited"),r=0,n.find("> td > :first-child").each(o),n.position().top+r>i)return t;return!1},limitRow:function(t,n){var r,e,i,a,o,s,c,l,u,f,d,h,p,m,g,_,b=this,v=this.rowStructs[t],y=[],w=0;function C(e){for(;w<e;)r=b.getCell(t,w),(c=b.getCellSegs(r,n)).length&&(f=i[n-1][w],_=b.renderMoreLink(r,c),g=M("<div/>").append(_),f.append(g),y.push(g[0])),w++}if(n&&n<v.segLevels.length){for(e=v.segLevels[n-1],i=v.cellMatrix,a=v.tbodyEl.children().slice(n).addClass("fc-limited").get(),o=0;o<e.length;o++){for(C((s=e[o]).leftCol),u=[],l=0;w<=s.rightCol;)r=this.getCell(t,w),c=this.getCellSegs(r,n),u.push(c),l+=c.length,w++;if(l){for(d=(f=i[n-1][s.leftCol]).attr("rowspan")||1,h=[],p=0;p<u.length;p++)m=M('<td class="fc-more-cell"/>').attr("rowspan",d),c=u[p],r=this.getCell(t,s.leftCol+p),_=this.renderMoreLink(r,[s].concat(c)),g=M("<div/>").append(_),m.append(g),h.push(m[0]),y.push(m[0]);f.addClass("fc-limited").after(M(h)),a.push(f[0])}}C(this.colCnt),v.moreEls=M(y),v.limitedEls=M(a)}},unlimitRow:function(e){var t=this.rowStructs[e];t.moreEls&&(t.moreEls.remove(),t.moreEls=null),t.limitedEls&&(t.limitedEls.removeClass("fc-limited"),t.limitedEls=null)},renderMoreLink:function(c,l){var u=this,f=this.view;return M('<a class="fc-more"/>').text(this.getMoreLinkText(l.length)).on("click",function(e){var t=f.opt("eventLimitClick"),n=c.start,r=M(this),i=u.getCellDayEl(c),a=u.getCellSegs(c),o=u.resliceDaySegs(a,n),s=u.resliceDaySegs(l,n);"function"==typeof t&&(t=f.trigger("eventLimitClick",null,{date:n,dayEl:i,moreEl:r,segs:o,hiddenSegs:s},e)),"popover"===t?u.showSegPopover(c,r,o):"string"==typeof t&&f.calendar.zoomTo(n,t)})},showSegPopover:function(e,t,n){var r,i,a=this,o=this.view,s=t.parent();r=1==this.rowCnt?o.el:this.rowEls.eq(e.row),i={className:"fc-more-popover",content:this.renderSegPopoverContent(e,n),parentEl:this.el,top:r.offset().top,autoHide:!0,viewportConstrain:o.opt("popoverViewportConstrain"),hide:function(){a.segPopover.destroy(),a.segPopover=null,a.popoverSegs=null}},this.isRTL?i.right=s.offset().left+s.outerWidth()+1:i.left=s.offset().left-1,this.segPopover=new fe(i),this.segPopover.show()},renderSegPopoverContent:function(e,t){var n,r=this.view,i=r.opt("theme"),a=e.start.format(r.opt("dayPopoverFormat")),o=M('<div class="fc-header '+r.widgetHeaderClass+'"><span class="fc-close '+(i?"ui-icon ui-icon-closethick":"fc-icon fc-icon-x")+'"></span><span class="fc-title">'+E(a)+'</span><div class="fc-clear"/></div><div class="fc-body '+r.widgetContentClass+'"><div class="fc-event-container"></div></div>'),s=o.find(".fc-event-container");for(t=this.renderFgSegEls(t,!0),this.popoverSegs=t,n=0;n<t.length;n++)t[n].cell=e,s.append(t[n].el);return o},resliceDaySegs:function(e,t){var n=M.map(e,function(e){return e.event}),r=t.clone().stripTime(),i=r.clone().add(1,"days"),a={start:r,end:i};return(e=this.eventsToSegs(n,function(e){var t=v(e,a);return t?[t]:[]})).sort(Ce),e},getMoreLinkText:function(e){var t=this.view.opt("eventLimitText");return"function"==typeof t?t(e):"+"+e+" "+t},getCellSegs:function(e,t){for(var n,r=this.rowStructs[e.row].segMatrix,i=t||0,a=[];i<r.length;)(n=r[i][e.col])&&a.push(n),i++;return a}});var xe=ve.extend({slotDuration:null,snapDuration:null,minTime:null,maxTime:null,axisFormat:null,dayEls:null,slatEls:null,slatTops:null,helperEl:null,businessHourSegs:null,constructor:function(){ve.apply(this,arguments),this.processOptions()},renderDates:function(){this.el.html(this.renderHtml()),this.dayEls=this.el.find(".fc-day"),this.slatEls=this.el.find(".fc-slats tr")},renderBusinessHours:function(){var e=this.view.calendar.getBusinessHoursEvents();this.businessHourSegs=this.renderFill("businessHours",this.eventsToSegs(e),"bgevent")},renderHtml:function(){return'<div class="fc-bg"><table>'+this.rowHtml("slotBg")+'</table></div><div class="fc-slats"><table>'+this.slatRowHtml()+"</table></div>"},slotBgCellHtml:function(e){return this.bgCellHtml(e)},slatRowHtml:function(){for(var e,t,n,r=this.view,i=this.isRTL,a="",o=this.slotDuration.asMinutes()%15==0,s=$.duration(+this.minTime);s<this.maxTime;)t=(e=this.start.clone().time(s)).minutes(),n='<td class="fc-axis fc-time '+r.widgetContentClass+'" '+r.axisStyleAttr()+">"+(o&&t?"":"<span>"+E(e.format(this.axisFormat))+"</span>")+"</td>",a+="<tr "+(t?'class="fc-minor"':"")+">"+(i?"":n)+'<td class="'+r.widgetContentClass+'"/>'+(i?n:"")+"</tr>",s.add(this.slotDuration);return a},processOptions:function(){var e=this.view,t=e.opt("slotDuration"),n=e.opt("snapDuration");t=$.duration(t),n=n?$.duration(n):t,this.slotDuration=t,this.snapDuration=n,this.cellDuration=n,this.minTime=$.duration(e.opt("minTime")),this.maxTime=$.duration(e.opt("maxTime")),this.axisFormat=e.opt("axisFormat")||e.opt("smallTimeFormat")},computeColHeadFormat:function(){return 1<this.colCnt?this.view.opt("dayOfMonthFormat"):"dddd"},computeEventTimeFormat:function(){return this.view.opt("noMeridiemTimeFormat")},computeDisplayEventEnd:function(){return!0},updateCells:function(){var e,t=this.view,n=[];for(e=this.start.clone();e.isBefore(this.end);)n.push({day:e.clone()}),e.add(1,"day"),e=t.skipHiddenDays(e);this.isRTL&&n.reverse(),this.colData=n,this.colCnt=n.length,this.rowCnt=Math.ceil((this.maxTime-this.minTime)/this.snapDuration)},computeCellDate:function(e){var t=this.computeSnapTime(e.row);return this.view.calendar.rezoneDate(e.day).time(t)},getColEl:function(e){return this.dayEls.eq(e)},computeSnapTime:function(e){return $.duration(this.minTime+this.snapDuration*e)},rangeToSegs:function(e){var t,n,r,i=this.colCnt,a=[];for(e={start:e.start.clone().stripZone(),end:e.end.clone().stripZone()},n=0;n<i;n++)(t=v(e,{start:(r=this.colData[n].day).clone().time(this.minTime),end:r.clone().time(this.maxTime)}))&&(t.col=n,a.push(t));return a},updateSize:function(e){this.computeSlatTops(),e&&this.updateSegVerticals()},computeRowCoords:function(){var e,t,n=this.el.offset().top,r=[];for(e=0;e<this.rowCnt;e++)t={top:n+this.computeTimeTop(this.computeSnapTime(e))},0<e&&(r[e-1].bottom=t.top),r.push(t);return t.bottom=t.top+this.computeTimeTop(this.computeSnapTime(e)),r},computeDateTop:function(e,t){return this.computeTimeTop($.duration(e.clone().stripZone()-t.clone().stripTime()))},computeTimeTop:function(e){var t,n,r,i=(e-this.minTime)/this.slotDuration;return i=Math.max(0,i),n=(i=Math.min(this.slatEls.length,i))-(t=Math.floor(i)),r=this.slatTops[t],n?r+(this.slatTops[t+1]-r)*n:r},computeSlatTops:function(){var n,r=[];this.slatEls.each(function(e,t){n=M(t).position().top,r.push(n)}),r.push(n+this.slatEls.last().outerHeight()),this.slatTops=r},renderDrag:function(e,t){if(t)return this.renderRangeHelper(e,t),this.applyDragOpacity(this.helperEl),!0;this.renderHighlight(this.view.calendar.ensureVisibleEventRange(e))},destroyDrag:function(){this.destroyHelper(),this.destroyHighlight()},renderEventResize:function(e,t){this.renderRangeHelper(e,t)},destroyEventResize:function(){this.destroyHelper()},renderHelper:function(e,t){var n,r,i,a,o=this.eventsToSegs([e]);for(o=this.renderFgSegEls(o),n=this.renderSegTable(o),r=0;r<o.length;r++)i=o[r],t&&t.col===i.col&&(a=t.el,i.el.css({left:a.css("left"),right:a.css("right"),"margin-left":a.css("margin-left"),"margin-right":a.css("margin-right")}));this.helperEl=M('<div class="fc-helper-skeleton"/>').append(n).appendTo(this.el)},destroyHelper:function(){this.helperEl&&(this.helperEl.remove(),this.helperEl=null)},renderSelection:function(e){this.view.opt("selectHelper")?this.renderRangeHelper(e):this.renderHighlight(e)},destroySelection:function(){this.destroyHelper(),this.destroyHighlight()},renderFill:function(e,t,n){var r,i,a,o,s,c,l,u,f,d;if(t.length){for(t=this.renderFillSegEls(e,t),r=this.groupSegCols(t),n=n||e.toLowerCase(),a=(i=M('<div class="fc-'+n+'-skeleton"><table><tr/></table></div>')).find("tr"),o=0;o<r.length;o++)if(s=r[o],c=M("<td/>").appendTo(a),s.length)for(l=M('<div class="fc-'+n+'-container"/>').appendTo(c),u=this.colData[o].day,f=0;f<s.length;f++)d=s[f],l.append(d.el.css({top:this.computeDateTop(d.start,u),bottom:-this.computeDateTop(d.end,u)}));this.bookendCells(a,e),this.el.append(i),this.elsByFill[e]=i}return t}});function ke(e){var t,n,r;if(e.sort(Ce),function(e){var t,n,r,i,a;for(t=0;t<e.length;t++)for(n=e[t],r=0;r<n.length;r++)for((i=n[r]).forwardSegs=[],a=t+1;a<e.length;a++)Ie(i,e[a],i.forwardSegs)}(t=function(e){var t,n,r,i=[];for(t=0;t<e.length;t++){for(n=e[t],r=0;r<i.length&&Ie(n,i[r]).length;r++);n.level=r,(i[r]||(i[r]=[])).push(n)}return i}(e)),n=t[0]){for(r=0;r<n.length;r++)Ee(n[r]);for(r=0;r<n.length;r++)De(n[r],0,0)}}function Ee(e){var t,n,r=e.forwardSegs,i=0;if(void 0===e.forwardPressure){for(t=0;t<r.length;t++)Ee(n=r[t]),i=Math.max(i,1+n.forwardPressure);e.forwardPressure=i}}function De(e,t,n){var r,i=e.forwardSegs;if(void 0===e.forwardCoord)for(i.length?(i.sort(Pe),De(i[0],t+1,n),e.forwardCoord=i[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(t+1),r=0;r<i.length;r++)De(i[r],0,e.forwardCoord)}function Ie(e,t,n){n=n||[];for(var r=0;r<t.length;r++)i=e,a=t[r],i.bottom>a.top&&i.top<a.bottom&&n.push(t[r]);var i,a;return n}function Pe(e,t){return t.forwardPressure-e.forwardPressure||(e.backwardCoord||0)-(t.backwardCoord||0)||Ce(e,t)}xe.mixin({eventSkeletonEl:null,renderFgSegs:function(e){return e=this.renderFgSegEls(e),this.el.append(this.eventSkeletonEl=M('<div class="fc-content-skeleton"/>').append(this.renderSegTable(e))),e},destroyFgSegs:function(e){this.eventSkeletonEl&&(this.eventSkeletonEl.remove(),this.eventSkeletonEl=null)},renderSegTable:function(e){var t,n,r,i,a,o,s=M("<table><tr/></table>"),c=s.find("tr");for(t=this.groupSegCols(e),this.computeSegVerticals(e),i=0;i<t.length;i++){for(ke(a=t[i]),o=M('<div class="fc-event-container"/>'),n=0;n<a.length;n++)(r=a[n]).el.css(this.generateSegPositionCss(r)),r.bottom-r.top<30&&r.el.addClass("fc-short"),o.append(r.el);c.append(M("<td/>").append(o))}return this.bookendCells(c,"eventSkeleton"),s},updateSegVerticals:function(){var e,t=(this.segs||[]).concat(this.businessHourSegs||[]);for(this.computeSegVerticals(t),e=0;e<t.length;e++)t[e].el.css(this.generateSegVerticalCss(t[e]))},computeSegVerticals:function(e){var t,n;for(t=0;t<e.length;t++)(n=e[t]).top=this.computeDateTop(n.start,n.start),n.bottom=this.computeDateTop(n.end,n.start)},fgSegHtml:function(e,t){var n,r,i,a=this.view,o=e.event,s=a.isEventDraggable(o),c=!t&&e.isStart&&a.isEventResizableFromStart(o),l=!t&&e.isEnd&&a.isEventResizableFromEnd(o),u=this.getSegClasses(e,s,c||l),f=P(this.getEventSkinCss(o));return u.unshift("fc-time-grid-event","fc-v-event"),a.isMultiDayEvent(o)?(e.isStart||e.isEnd)&&(n=this.getEventTimeText(e),r=this.getEventTimeText(e,"LT"),i=this.getEventTimeText(e,null,!1)):(n=this.getEventTimeText(o),r=this.getEventTimeText(o,"LT"),i=this.getEventTimeText(o,null,!1)),'<a class="'+u.join(" ")+'"'+(o.url?' href="'+E(o.url)+'"':"")+(f?' style="'+f+'"':"")+'><div class="fc-content">'+(n?'<div class="fc-time" data-start="'+E(i)+'" data-full="'+E(r)+'"><span>'+E(n)+"</span></div>":"")+(o.title?'<div class="fc-title">'+E(o.title)+"</div>":"")+'</div><div class="fc-bg"/>'+(l?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},generateSegPositionCss:function(e){var t,n,r=this.view.opt("slotEventOverlap"),i=e.backwardCoord,a=e.forwardCoord,o=this.generateSegVerticalCss(e);return r&&(a=Math.min(1,i+2*(a-i))),n=this.isRTL?(t=1-a,i):(t=i,1-a),o.zIndex=e.level+1,o.left=100*t+"%",o.right=100*n+"%",r&&e.forwardPressure&&(o[this.isRTL?"marginLeft":"marginRight"]=20),o},generateSegVerticalCss:function(e){return{top:e.top,bottom:-e.bottom}},groupSegCols:function(e){var t,n=[];for(t=0;t<this.colCnt;t++)n.push([]);for(t=0;t<e.length;t++)n[e[t].col].push(e[t]);return n}});var Me=O.View=ue.extend({type:null,name:null,title:null,calendar:null,options:null,coordMap:null,el:null,isDisplayed:!1,isSkeletonRendered:!1,isEventsRendered:!1,start:null,end:null,intervalStart:null,intervalEnd:null,intervalDuration:null,intervalUnit:null,isSelected:!1,scrollerEl:null,scrollTop:null,widgetHeaderClass:null,widgetContentClass:null,highlightStateClass:null,nextDayThreshold:null,isHiddenDayHash:null,documentMousedownProxy:null,constructor:function(e,t,n,r){this.calendar=e,this.type=this.name=t,this.options=n,this.intervalDuration=r||$.duration(1,"day"),this.nextDayThreshold=$.duration(this.opt("nextDayThreshold")),this.initThemingProps(),this.initHiddenDays(),this.documentMousedownProxy=U(this,"documentMousedown"),this.initialize()},initialize:function(){},opt:function(e){return this.options[e]},trigger:function(e,t){var n=this.calendar;return n.trigger.apply(n,[e,t||this].concat(Array.prototype.slice.call(arguments,2),[this]))},setDate:function(e){this.setRange(this.computeRange(e))},setRange:function(e){M.extend(this,e),this.updateTitle()},computeRange:function(e){var t,n,r=C(this.intervalDuration),i=e.clone().startOf(r),a=i.clone().add(this.intervalDuration);return/year|month|week|day/.test(r)?(i.stripTime(),a.stripTime()):(i.hasTime()||(i=this.calendar.rezoneDate(i)),a.hasTime()||(a=this.calendar.rezoneDate(a))),t=i.clone(),t=this.skipHiddenDays(t),n=a.clone(),{intervalUnit:r,intervalStart:i,intervalEnd:a,start:t,end:n=this.skipHiddenDays(n,-1,!0)}},computePrevDate:function(e){return this.massageCurrentDate(e.clone().startOf(this.intervalUnit).subtract(this.intervalDuration),-1)},computeNextDate:function(e){return this.massageCurrentDate(e.clone().startOf(this.intervalUnit).add(this.intervalDuration))},massageCurrentDate:function(e,t){return this.intervalDuration.as("days")<=1&&this.isHiddenDay(e)&&(e=this.skipHiddenDays(e,t)).startOf("day"),e},updateTitle:function(){this.title=this.computeTitle()},computeTitle:function(){return this.formatRange({start:this.intervalStart,end:this.intervalEnd},this.opt("titleFormat")||this.computeTitleFormat(),this.opt("titleRangeSeparator"))},computeTitleFormat:function(){return"year"==this.intervalUnit?"YYYY":"month"==this.intervalUnit?this.opt("monthYearFormat"):1<this.intervalDuration.as("days")?"ll":"LL"},formatRange:function(e,t,n){var r=e.end;return r.hasTime()||(r=r.clone().subtract(1)),ae(e.start,r,t,n,this.opt("isRTL"))},setElement:function(e){this.el=e,this.bindGlobalHandlers()},removeElement:function(){this.clear(),this.isSkeletonRendered&&(this.destroySkeleton(),this.isSkeletonRendered=!1),this.unbindGlobalHandlers(),this.el.remove()},display:function(e){var t=null;this.isDisplayed&&(t=this.queryScroll()),this.clear(),this.setDate(e),this.render(),this.updateSize(),this.renderBusinessHours(),this.isDisplayed=!0,t=this.computeInitialScroll(t),this.forceScroll(t),this.triggerRender()},clear:function(){this.isDisplayed&&(this.unselect(),this.clearEvents(),this.triggerDestroy(),this.destroyBusinessHours(),this.destroy(),this.isDisplayed=!1)},render:function(){this.isSkeletonRendered||(this.renderSkeleton(),this.isSkeletonRendered=!0),this.renderDates()},destroy:function(){this.destroyDates()},renderSkeleton:function(){},destroySkeleton:function(){},renderDates:function(){},destroyDates:function(){},renderBusinessHours:function(){},destroyBusinessHours:function(){},triggerRender:function(){this.trigger("viewRender",this,this,this.el)},triggerDestroy:function(){this.trigger("viewDestroy",this,this,this.el)},bindGlobalHandlers:function(){M(document).on("mousedown",this.documentMousedownProxy)},unbindGlobalHandlers:function(){M(document).off("mousedown",this.documentMousedownProxy)},initThemingProps:function(){var e=this.opt("theme")?"ui":"fc";this.widgetHeaderClass=e+"-widget-header",this.widgetContentClass=e+"-widget-content",this.highlightStateClass=e+"-state-highlight"},updateSize:function(e){var t;e&&(t=this.queryScroll()),this.updateHeight(),this.updateWidth(),e&&this.setScroll(t)},updateWidth:function(){},updateHeight:function(){var e=this.calendar;this.setHeight(e.getSuggestedViewHeight(),e.isHeightAuto())},setHeight:function(e,t){},computeScrollerHeight:function(e){var t,n,r=this.scrollerEl;return(t=this.el.add(r)).css({position:"relative",left:-1}),n=this.el.outerHeight()-r.height(),t.css({position:"",left:""}),e-n},computeInitialScroll:function(e){return 0},queryScroll:function(){if(this.scrollerEl)return this.scrollerEl.scrollTop()},setScroll:function(e){if(this.scrollerEl)return this.scrollerEl.scrollTop(e)},forceScroll:function(e){var t=this;this.setScroll(e),setTimeout(function(){t.setScroll(e)},0)},displayEvents:function(e){var t=this.queryScroll();this.clearEvents(),this.renderEvents(e),this.isEventsRendered=!0,this.setScroll(t),this.triggerEventRender()},clearEvents:function(){this.isEventsRendered&&(this.triggerEventDestroy(),this.destroyEvents(),this.isEventsRendered=!1)},renderEvents:function(e){},destroyEvents:function(){},triggerEventRender:function(){this.renderedEventSegEach(function(e){this.trigger("eventAfterRender",e.event,e.event,e.el)}),this.trigger("eventAfterAllRender")},triggerEventDestroy:function(){this.renderedEventSegEach(function(e){this.trigger("eventDestroy",e.event,e.event,e.el)})},resolveEventEl:function(e,t){var n=this.trigger("eventRender",e,e,t);return!1===n?t=null:n&&!0!==n&&(t=M(n)),t},showEvent:function(e){this.renderedEventSegEach(function(e){e.el.css("visibility","")},e)},hideEvent:function(e){this.renderedEventSegEach(function(e){e.el.css("visibility","hidden")},e)},renderedEventSegEach:function(e,t){var n,r=this.getEventSegs();for(n=0;n<r.length;n++)t&&r[n].event._id!==t._id||r[n].el&&e.call(this,r[n])},getEventSegs:function(){return[]},isEventDraggable:function(e){var t=e.source||{};return G(e.startEditable,t.startEditable,this.opt("eventStartEditable"),e.editable,t.editable,this.opt("editable"))},reportEventDrop:function(e,t,n,r,i){var a=this.calendar,o=a.mutateEvent(e,t,n);this.triggerEventDrop(e,o.dateDelta,function(){o.undo(),a.reportEventChange()},r,i),a.reportEventChange()},triggerEventDrop:function(e,t,n,r,i){this.trigger("eventDrop",r[0],e,t,n,i,{})},reportExternalDrop:function(e,t,n,r,i){var a,o,s=e.eventProps;s&&(a=M.extend({},s,t),o=this.calendar.renderEvent(a,e.stick)[0]),this.triggerExternalDrop(o,t,n,r,i)},triggerExternalDrop:function(e,t,n,r,i){this.trigger("drop",n[0],t.start,r,i),e&&this.trigger("eventReceive",null,e)},renderDrag:function(e,t){},destroyDrag:function(){},isEventResizableFromStart:function(e){return this.opt("eventResizableFromStart")&&this.isEventResizable(e)},isEventResizableFromEnd:function(e){return this.isEventResizable(e)},isEventResizable:function(e){var t=e.source||{};return G(e.durationEditable,t.durationEditable,this.opt("eventDurationEditable"),e.editable,t.editable,this.opt("editable"))},reportEventResize:function(e,t,n,r,i){var a=this.calendar,o=a.mutateEvent(e,t,n);this.triggerEventResize(e,o.durationDelta,function(){o.undo(),a.reportEventChange()},r,i),a.reportEventChange()},triggerEventResize:function(e,t,n,r,i){this.trigger("eventResize",r[0],e,t,n,i,{})},select:function(e,t){this.unselect(t),this.renderSelection(e),this.reportSelection(e,t)},renderSelection:function(e){},reportSelection:function(e,t){this.isSelected=!0,this.trigger("select",null,e.start,e.end,t)},unselect:function(e){this.isSelected&&(this.isSelected=!1,this.destroySelection(),this.trigger("unselect",null,e))},destroySelection:function(){},documentMousedown:function(e){var t;this.isSelected&&this.opt("unselectAuto")&&b(e)&&((t=this.opt("unselectCancel"))&&M(e.target).closest(t).length||this.unselect(e))},initHiddenDays:function(){var e,t=this.opt("hiddenDays")||[],n=[],r=0;for(!1===this.opt("weekends")&&t.push(0,6),e=0;e<7;e++)(n[e]=-1!==M.inArray(e,t))||r++;if(!r)throw"invalid hiddenDays";this.isHiddenDayHash=n},isHiddenDay:function(e){return $.isMoment(e)&&(e=e.day()),this.isHiddenDayHash[e]},skipHiddenDays:function(e,t,n){var r=e.clone();for(t=t||1;this.isHiddenDayHash[(r.day()+(n?t:0)+7)%7];)r.add(t,"days");return r},computeDayRange:function(e){var t,n=e.start.clone().stripTime(),r=e.end,i=null;return r&&(i=r.clone().stripTime(),(t=+r.time())&&t>=this.nextDayThreshold&&i.add(1,"days")),(!r||i<=n)&&(i=n.clone().add(1,"days")),{start:n,end:i}},isMultiDayEvent:function(e){var t=this.computeDayRange(e);return 1<t.end.diff(t.start,"days")}}),$e=O.Calendar=O.CalendarBase=ue.extend({dirDefaults:null,langDefaults:null,overrides:null,options:null,viewSpecCache:null,view:null,header:null,constructor:function(e,t){var r=this;r.initOptions(t||{});var n=this.options;r.render=function(){l?y()&&(A(),w()):function(){n.theme?"ui":"fc",e.addClass("fc"),n.isRTL?e.addClass("fc-rtl"):e.addClass("fc-ltr");n.theme?e.addClass("ui-widget"):e.addClass("fc-unthemed");l=M("<div class='fc-view-container'/>").prependTo(e),s=r.header=new je(r,n),(c=s.render())&&e.prepend(c);w(n.defaultView),n.handleWindowResize&&(d=H(T,n.windowResizeDelay),M(window).resize(d))}()},r.destroy=function(){u&&u.removeElement();s.destroy(),l.remove(),e.removeClass("fc fc-ltr fc-rtl fc-unthemed ui-widget"),d&&M(window).unbind("resize",d)},r.refetchEvents=function(){E(),u.clearEvents(),D(),k()},r.reportEvents=function(e){v=e,x()},r.reportEventChange=function(){x()},r.rerenderEvents=x,r.changeView=w,r.select=function(e,t){e=r.moment(e),t=t?r.moment(t):e.hasTime()?e.clone().add(r.defaultTimedEventDuration):e.clone().add(r.defaultAllDayEventDuration);u.select({start:e,end:t})},r.unselect=function(){u&&u.unselect()},r.prev=function(){h=u.computePrevDate(h),w()},r.next=function(){h=u.computeNextDate(h),w()},r.prevYear=function(){h.add(-1,"years"),w()},r.nextYear=function(){h.add(1,"years"),w()},r.today=function(){h=r.getNow(),w()},r.gotoDate=function(e){h=r.moment(e),w()},r.incrementDate=function(e){h.add($.duration(e)),w()},r.zoomTo=function(e,t){var n;t=t||"day",n=r.getViewSpec(t)||r.getUnitViewSpec(t),h=e,w(n?n.type:null)},r.getDate=function(){return h.clone()},r.getCalendar=function(){return r},r.getView=function(){return u},r.option=function(e,t){if(void 0===t)return n[e];"height"!=e&&"contentHeight"!=e&&"aspectRatio"!=e||(n[e]=t,C(!0))},r.trigger=function(e,t){if(n[e])return n[e].apply(t||g,Array.prototype.slice.call(arguments,2))};var i=I(Ge(n.lang));n.monthNames&&(i._months=n.monthNames);n.monthNamesShort&&(i._monthsShort=n.monthNamesShort);n.dayNames&&(i._weekdays=n.dayNames);n.dayNamesShort&&(i._weekdaysShort=n.dayNamesShort);if(null!=n.firstDay){var a=I(i._week);a.dow=n.firstDay,i._week=a}i._fullCalendar_weekCalc=(o=n.weekNumberCalculation,"function"==typeof o?o:"local"===o?o:"iso"===o||"ISO"===o?"ISO":void 0),r.defaultAllDayEventDuration=$.duration(n.defaultAllDayEventDuration),r.defaultTimedEventDuration=$.duration(n.defaultTimedEventDuration),r.moment=function(){var e;return"local"===n.timezone?(e=O.moment.apply(null,arguments)).hasTime()&&e.local():e="UTC"===n.timezone?O.moment.utc.apply(null,arguments):O.moment.parseZone.apply(null,arguments),"_locale"in e?e._locale=i:e._lang=i,e},r.getIsAmbigTimezone=function(){return"local"!==n.timezone&&"UTC"!==n.timezone},r.rezoneDate=function(e){return r.moment(e.toArray())},r.getNow=function(){var e=n.now;return"function"==typeof e&&(e=e()),r.moment(e)},r.getEventEnd=function(e){return e.end?e.end.clone():r.getDefaultEventEnd(e.allDay,e.start)},r.getDefaultEventEnd=function(e,t){var n=t.clone();return e?n.stripTime().add(r.defaultAllDayEventDuration):n.add(r.defaultTimedEventDuration),r.getIsAmbigTimezone()&&n.stripZone(),n},r.humanizeDuration=function(e){return(e.locale||e.lang).call(e,n.lang).humanize()},function(g){var v=this;v.isFetchNeeded=function(e,t){return!_||e.clone().stripZone()<_.clone().stripZone()||t.clone().stripZone()>b.clone().stripZone()},v.fetchEvents=function(e,t){_=e,b=t,u=[];var n=++c,r=a.length;l=r;for(var i=0;i<r;i++)f(a[i],n)},v.addEventSource=function(e){var t=r(e);t&&(a.push(t),l++,f(t,c))},v.removeEventSource=function(t){a=M.grep(a,function(e){return!i(e,t)}),u=M.grep(u,function(e){return!i(e.source,t)}),s(u)},v.updateEvent=function(e){e.start=v.moment(e.start),e.end?e.end=v.moment(e.end):e.end=null;k(e,(t=e,r={},M.each(t,function(e,t){var n;h(e)&&void 0!==t&&(n=t,/undefined|null|boolean|number|string/.test(M.type(n)))&&(r[e]=t)}),r)),s(u);var t,r},v.renderEvent=function(e,t){var n,r,i,a=A(e);if(a){for(n=x(a),r=0;r<n.length;r++)(i=n[r]).source||(t&&(o.events.push(i),i.source=o),u.push(i));return s(u),n}return[]},v.removeEvents=function(e){var t,n;null==e?e=function(){return!0}:M.isFunction(e)||(t=e+"",e=function(e){return e._id==t});for(u=M.grep(u,e,!0),n=0;n<a.length;n++)M.isArray(a[n].events)&&(a[n].events=M.grep(a[n].events,e,!0));s(u)},v.clientEvents=y,v.mutateEvent=k,v.normalizeEventRange=m,v.normalizeEventRangeTimes=S,v.ensureVisibleEventRange=T;var _,b,e=v.trigger,t=v.getView,s=v.reportEvents,o={events:[]},a=[o],c=0,l=0,n=0,u=[];function f(a,o){!function e(t,n){var r;var i=O.sourceFetchers;var a;for(r=0;r<i.length;r++){if(!0===(a=i[r].call(v,t,_.clone(),b.clone(),g.timezone,n)))return;if("object"==typeof a)return void e(a,n)}var o=t.events;if(o)M.isFunction(o)?(w(),o.call(v,_.clone(),b.clone(),g.timezone,function(e){n(e),C()})):M.isArray(o)?n(o):n();else{var s=t.url;if(s){var c,l=t.success,u=t.error,f=t.complete;c=M.isFunction(t.data)?t.data():t.data;var d=M.extend({},c||{}),h=G(t.startParam,g.startParam),p=G(t.endParam,g.endParam),m=G(t.timezoneParam,g.timezoneParam);h&&(d[h]=_.format()),p&&(d[p]=b.format()),g.timezone&&"local"!=g.timezone&&(d[m]=g.timezone),w(),M.ajax(M.extend({},Be,t,{data:d,success:function(e){e=e||[];var t=F(l,this,arguments);M.isArray(t)&&(e=t),n(e)},error:function(){F(u,this,arguments),n()},complete:function(){F(f,this,arguments),C()}}))}else n()}}(a,function(e){var t,n,r,i=M.isArray(a.events);if(o==c){if(e)for(t=0;t<e.length;t++)n=e[t],(r=i?n:A(n,a))&&u.push.apply(u,x(r));--l||s(u)}})}function r(e){var t,n,r=O.sourceNormalizers;if(M.isFunction(e)||M.isArray(e)?t={events:e}:"string"==typeof e?t={url:e}:"object"==typeof e&&(t=M.extend({},e)),t){for(t.className?"string"==typeof t.className&&(t.className=t.className.split(/\s+/)):t.className=[],M.isArray(t.events)&&(t.origArray=t.events,t.events=M.map(t.events,function(e){return A(e,t)})),n=0;n<r.length;n++)r[n].call(v,t);return t}}function i(e,t){return e&&t&&d(e)==d(t)}function d(e){return("object"==typeof e?e.origArray||e.googleCalendarId||e.url||e.events:null)||e}function h(e){return!/^_|^(id|allDay|start|end)$/.test(e)}function y(t){return M.isFunction(t)?M.grep(u,t):null!=t?(t+="",M.grep(u,function(e){return e._id==t})):u}function w(){n++||e("loading",null,!0,t())}function C(){--n||e("loading",null,!1,t())}function A(e,t){var n,r,i,a={};if(g.eventDataTransform&&(e=g.eventDataTransform(e)),t&&t.eventDataTransform&&(e=t.eventDataTransform(e)),M.extend(a,e),t&&(a.source=t),a._id=e._id||(void 0===e.id?"_fc"+Ue++:e.id+""),e.className?"string"==typeof e.className?a.className=e.className.split(/\s+/):a.className=e.className:a.className=[],n=e.start||e.date,r=e.end,L(n)&&(n=$.duration(n)),L(r)&&(r=$.duration(r)),e.dow||$.isDuration(n)||$.isDuration(r))a.start=n?$.duration(n):null,a.end=r?$.duration(r):null,a._recurring=!0;else{if(n&&!(n=v.moment(n)).isValid())return!1;r&&((r=v.moment(r)).isValid()||(r=null)),void 0===(i=e.allDay)&&(i=G(t?t.allDayDefault:void 0,g.allDayDefault)),p(n,r,i,a)}return a}function p(e,t,n,r){r.start=e,r.end=t,r.allDay=n,m(r),He(r)}function m(e){S(e),e.end&&!e.end.isAfter(e.start)&&(e.end=null),e.end||(g.forceEventDuration?e.end=v.getDefaultEventEnd(e.allDay,e.start):e.end=null)}function S(e){null==e.allDay&&(e.allDay=!(e.start.hasTime()||e.end&&e.end.hasTime())),e.allDay?(e.start.stripTime(),e.end&&e.end.stripTime()):(e.start.hasTime()||(e.start=v.rezoneDate(e.start)),e.end&&!e.end.hasTime()&&(e.end=v.rezoneDate(e.end)))}function T(e){var t;return e.end||(null==(t=e.allDay)&&(t=!e.start.hasTime()),(e=M.extend({},e)).end=v.getDefaultEventEnd(t,e.start)),e}function x(e,t,n){var r,i,a,o,s,c,l,u,f,d=[];if(t=t||_,n=n||b,e)if(e._recurring){if(i=e.dow)for(r={},a=0;a<i.length;a++)r[i[a]]=!0;for(o=t.clone().stripTime();o.isBefore(n);)r&&!r[o.day()]||(s=e.start,c=e.end,l=o.clone(),u=null,s&&(l=l.time(s)),c&&(u=o.clone().time(c)),f=M.extend({},e),p(l,u,!s&&!c,f),d.push(f)),o.add(1,"days")}else d.push(e);return d}function k(e,i,a){var t,n,r,o,s,c={};function l(e,t){return a?N(e,t,a):i.allDay?(n=e,r=t,$.duration({days:n.clone().stripTime().diff(r.clone().stripTime(),"days")})):R(e,t);var n,r}return(i=i||{}).start||(i.start=e.start.clone()),void 0===i.end&&(i.end=e.end?e.end.clone():null),null==i.allDay&&(i.allDay=e.allDay),m(i),m(t={start:e._start.clone(),end:e._end?e._end.clone():v.getDefaultEventEnd(e._allDay,e._start),allDay:i.allDay}),n=null!==e._end&&null===i.end,r=l(i.start,t.start),o=i.end?l(i.end,t.end).subtract(r):null,M.each(i,function(e,t){h(e)&&void 0!==t&&(c[e]=t)}),s=function(e,i,a,o,s,c){var l=v.getIsAmbigTimezone(),u=[];o&&!o.valueOf()&&(o=null);s&&!s.valueOf()&&(s=null);return M.each(e,function(e,t){var n,r;n={start:t.start.clone(),end:t.end?t.end.clone():null,allDay:t.allDay},M.each(c,function(e){n[e]=t[e]}),m(r={start:t._start,end:t._end,allDay:a}),i?r.end=null:s&&!r.end&&(r.end=v.getDefaultEventEnd(r.allDay,r.start)),o&&(r.start.add(o),r.end&&r.end.add(o)),s&&r.end.add(s),l&&!r.allDay&&(o||s)&&(r.start.stripZone(),r.end&&r.end.stripZone()),M.extend(t,c,r),He(t),u.push(function(){M.extend(t,n),He(t)})}),function(){for(var e=0;e<u.length;e++)u[e]()}}(y(e._id),n,i.allDay,r,o,c),{dateDelta:r,durationDelta:o,undo:s}}function E(e){var t,n=g.businessHours,r=v.getView();return n&&(t=M.extend({},{className:"fc-nonbusiness",start:"09:00",end:"17:00",dow:[1,2,3,4,5],rendering:"inverse-background"},"object"==typeof n?n:{})),t?(e&&(t.start=null,t.end=null),x(A(t),r.start,r.end)):[]}function D(e,t){var n=t.source||{},r=G(t.constraint,n.constraint,g.eventConstraint),i=G(t.overlap,n.overlap,g.eventOverlap);return P(e=T(e),r,i,t)}function I(e){return P(e,g.selectConstraint,g.selectOverlap)}function P(e,t,n,r){var i,a,o,s,c,l,u,f,d,h,p,m,g,_,b;if((e=M.extend({},e)).start=e.start.clone().stripZone(),e.end=e.end.clone().stripZone(),null!=t){for(i="businessHours"!==(p=t)?"object"!=typeof p?y(p):x(A(p)):E(),a=!1,s=0;s<i.length;s++)if(u=i[s],f=e,void 0,d=u.start.clone().stripZone(),h=v.getEventEnd(u).stripZone(),f.start>=d&&f.end<=h){a=!0;break}if(!a)return!1}for(o=v.getPeerEvents(r,e),s=0;s<o.length;s++)if(c=o[s],g=e,void 0,_=(m=c).start.clone().stripZone(),b=v.getEventEnd(m).stripZone(),g.start<b&&g.end>_){if(!1===n)return!1;if("function"==typeof n&&!n(c,r))return!1;if(r){if(!1===(l=G(c.overlap,(c.source||{}).overlap)))return!1;if("function"==typeof l&&!l(r,c))return!1}}return!0}M.each((g.events?[g.events]:[]).concat(g.eventSources||[]),function(e,t){var n=r(t);n&&a.push(n)}),v.getBusinessHoursEvents=E,v.isEventRangeAllowed=D,v.isSelectionRangeAllowed=I,v.isExternalDropRangeAllowed=function(e,t){var n,r;t&&(n=M.extend({},t,e),r=x(A(n))[0]);return r?D(e,r):I(e=T(e))},v.getEventCache=function(){return u}}.call(r,n);var o;var s,c,l,u,f,d,h,p=r.isFetchNeeded,m=r.fetchEvents,g=e[0],_={},b=0,v=[];h=null!=n.defaultDate?r.moment(n.defaultDate):r.getNow();function y(){return e.is(":visible")}function w(e){b++,u&&e&&u.type!==e&&(s.deactivateButton(u.type),E(),u.removeElement(),u=r.view=null),!u&&e&&((u=r.view=_[e]||(_[e]=r.instantiateView(e))).setElement(M("<div class='fc-view fc-"+e+"-view' />").appendTo(l)),s.activateButton(e)),u&&(h=u.massageCurrentDate(h),u.isDisplayed&&h.isWithin(u.intervalStart,u.intervalEnd)||y()&&(E(),u.display(h),D(),s.updateTitle(u.title),r.getNow().isWithin(u.intervalStart,u.intervalEnd)?s.disableButton("today"):s.enableButton("today"),!n.lazyFetching||p(u.start,u.end)?k():x())),D(),b--}function C(e){if(y())return e&&S(),b++,u.updateSize(!0),b--,!0}function A(){y()&&S()}function S(){f="number"==typeof n.contentHeight?n.contentHeight:"number"==typeof n.height?n.height-(c?c.outerHeight(!0):0):Math.round(l.width()/Math.max(n.aspectRatio,.5))}function T(e){!b&&e.target===window&&u.start&&C(!0)&&u.trigger("windowResize",g)}function x(){y()&&(E(),u.displayEvents(v),D())}function k(){m(u.start,u.end)}function E(){l.css({width:"100%",height:l.height(),overflow:"hidden"})}function D(){l.css({width:"",height:"",overflow:""})}r.getSuggestedViewHeight=function(){return void 0===f&&A(),f},r.isHeightAuto=function(){return"auto"===n.contentHeight||"auto"===n.height}},initOptions:function(e){var t,n,r,i,a,o;o={views:(i=e).views||{}},M.each(i,function(n,e){"views"!=n&&(M.isPlainObject(e)&&!/(time|duration|interval)$/i.test(n)&&-1==M.inArray(n,s)?(a=null,M.each(e,function(e,t){/^(month|week|day|default|basic(Week|Day)?|agenda(Week|Day)?)$/.test(e)?(o.views[e]||(o.views[e]={}),o.views[e][n]=t):(a||(a={}),a[e]=t)}),a&&(o[n]=a)):o[n]=e)}),t=(e=o).lang,(n=Oe[t])||(t=$e.defaults.lang,n=Oe[t]||{}),r=G(e.isRTL,n.isRTL,$e.defaults.isRTL)?$e.rtlDefaults:{},this.dirDefaults=r,this.langDefaults=n,this.overrides=e,this.options=d($e.defaults,r,n,e),Fe(this.options),this.viewSpecCache={}},getViewSpec:function(e){var t=this.viewSpecCache;return t[e]||(t[e]=this.buildViewSpec(e))},getUnitViewSpec:function(e){var t,n,r;if(-1!=M.inArray(e,w))for(t=this.header.getViewsWithButtons(),M.each(O.views,function(e){t.push(e)}),n=0;n<t.length;n++)if((r=this.getViewSpec(t[n]))&&r.singleUnit==e)return r},buildViewSpec:function(e){for(var t,n,r,i,a,o,s=this.overrides.views||{},c=[],l=[],u=e;u&&!t;)n=f[u]||{},r=s[u]||{},i=i||r.duration||n.duration,u=r.type||n.type,"function"==typeof n?(t=n,c.unshift(t.defaults||{})):c.unshift(n),l.unshift(r);if(t)return o={class:t,type:e},i&&((i=$.duration(i)).valueOf()||(i=null)),i&&(a=C(o.duration=i),1===i.as(a)&&(o.singleUnit=a,l.unshift(s[a]||{}))),o.defaults=d.apply(null,c),o.overrides=d.apply(null,l),this.buildViewSpecOptions(o),this.buildViewSpecButtonText(o,e),o},buildViewSpecOptions:function(e){e.options=d($e.defaults,e.defaults,this.dirDefaults,this.langDefaults,this.overrides,e.overrides),Fe(e.options)},buildViewSpecButtonText:function(n,r){function e(e){var t=e.buttonText||{};return t[r]||(n.singleUnit?t[n.singleUnit]:null)}n.buttonTextOverride=e(this.overrides)||n.overrides.buttonText,n.buttonTextDefault=e(this.langDefaults)||e(this.dirDefaults)||n.defaults.buttonText||e($e.defaults)||(n.duration?this.humanizeDuration(n.duration):null)||r},instantiateView:function(e){var t=this.getViewSpec(e);return new t.class(this,e,t.options,t.duration)},isValidViewType:function(e){return Boolean(this.getViewSpec(e))}});$e.defaults={titleRangeSeparator:" — ",monthYearFormat:"MMMM YYYY",defaultTimedEventDuration:"02:00:00",defaultAllDayEventDuration:{days:1},forceEventDuration:!1,nextDayThreshold:"09:00:00",defaultView:"month",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberTitle:"W",weekNumberCalculation:"local",lazyFetching:!0,startParam:"start",endParam:"end",timezoneParam:"timezone",timezone:!1,isRTL:!1,buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day"},buttonIcons:{prev:"left-single-arrow",next:"right-single-arrow",prevYear:"left-double-arrow",nextYear:"right-double-arrow"},theme:!1,themeButtonIcons:{prev:"circle-triangle-w",next:"circle-triangle-e",prevYear:"seek-prev",nextYear:"seek-next"},dragOpacity:.75,dragRevertDuration:500,dragScroll:!0,unselectAuto:!0,dropAccept:"*",eventLimit:!1,eventLimitText:"more",eventLimitClick:"popover",dayPopoverFormat:"LL",handleWindowResize:!0,windowResizeDelay:200},$e.englishDefaults={dayPopoverFormat:"dddd, MMMM D"},$e.rtlDefaults={header:{left:"next,prev today",center:"",right:"title"},buttonIcons:{prev:"right-single-arrow",next:"left-single-arrow",prevYear:"right-double-arrow",nextYear:"left-double-arrow"},themeButtonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w",nextYear:"seek-prev",prevYear:"seek-next"}};var Oe=O.langs={};O.datepickerLang=function(e,t,n){var r=Oe[e]||(Oe[e]={});r.isRTL=n.isRTL,r.weekNumberTitle=n.weekHeader,M.each(Re,function(e,t){r[e]=t(n)}),M.datepicker&&(M.datepicker.regional[t]=M.datepicker.regional[e]=n,M.datepicker.regional.en=M.datepicker.regional[""],M.datepicker.setDefaults(n))},O.lang=function(e,t){var n,r;n=Oe[e]||(Oe[e]={}),t&&(n=Oe[e]=d(n,t)),r=Ge(e),M.each(Ne,function(e,t){null==n[e]&&(n[e]=t(r,n))}),$e.defaults.lang=e};var Re={buttonText:function(e){return{prev:D(e.prevText),next:D(e.nextText),today:D(e.currentText)}},monthYearFormat:function(e){return e.showMonthAfterYear?"YYYY["+e.yearSuffix+"] MMMM":"MMMM YYYY["+e.yearSuffix+"]"}},Ne={dayOfMonthFormat:function(e,t){var n=e.longDateFormat("l");return n=n.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,""),t.isRTL?n+=" ddd":n="ddd "+n,n},mediumTimeFormat:function(e){return e.longDateFormat("LT").replace(/\s*a$/i,"a")},smallTimeFormat:function(e){return e.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"a")},extraSmallTimeFormat:function(e){return e.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"t")},hourFormat:function(e){return e.longDateFormat("LT").replace(":mm","").replace(/(\Wmm)$/,"").replace(/\s*a$/i,"a")},noMeridiemTimeFormat:function(e){return e.longDateFormat("LT").replace(/\s*a$/i,"")}},Le={smallDayDateFormat:function(e){return e.isRTL?"D dd":"dd D"},weekFormat:function(e){return e.isRTL?"w[ "+e.weekNumberTitle+"]":"["+e.weekNumberTitle+" ]w"},smallWeekFormat:function(e){return e.isRTL?"w["+e.weekNumberTitle+"]":"["+e.weekNumberTitle+"]w"}};function Fe(n){M.each(Le,function(e,t){null==n[e]&&(n[e]=t(n))})}function Ge(e){var t=$.localeData||$.langData;return t.call($,e)||t.call($,"en")}function je(d,h){this.render=function(){var e=h.header;if(p=h.theme?"ui":"fc",e)return t=M("<div class='fc-toolbar'/>").append(n("left")).append(n("right")).append(n("center")).append('<div class="fc-clear"/>')},this.destroy=function(){t.remove()},this.updateTitle=function(e){t.find("h2").text(e)},this.activateButton=function(e){t.find(".fc-"+e+"-button").addClass(p+"-state-active")},this.deactivateButton=function(e){t.find(".fc-"+e+"-button").removeClass(p+"-state-active")},this.disableButton=function(e){t.find(".fc-"+e+"-button").attr("disabled","disabled").addClass(p+"-state-disabled")},this.enableButton=function(e){t.find(".fc-"+e+"-button").removeAttr("disabled").removeClass(p+"-state-disabled")},this.getViewsWithButtons=function(){return m};var p,t=M(),m=[];function n(e){var n=M('<div class="fc-'+e+'"/>'),t=h.header[e];return t&&M.each(t.split(" "),function(e){var t,u=M(),f=!0;M.each(this.split(","),function(e,t){var n,r,i,a,o,s,c,l;"title"==t?(u=u.add(M("<h2>&nbsp;</h2>")),f=!1):((n=d.getViewSpec(t))?(r=function(){d.changeView(t)},m.push(t),i=n.buttonTextOverride,a=n.buttonTextDefault):d[t]&&(r=function(){d[t]()},i=(d.overrides.buttonText||{})[t],a=h.buttonText[t]),r&&(o=h.themeButtonIcons[t],s=h.buttonIcons[t],c=i?E(i):o&&h.theme?"<span class='ui-icon ui-icon-"+o+"'></span>":s&&!h.theme?"<span class='fc-icon fc-icon-"+s+"'></span>":E(a),l=M('<button type="button" class="'+["fc-"+t+"-button",p+"-button",p+"-state-default"].join(" ")+'">'+c+"</button>").click(function(){l.hasClass(p+"-state-disabled")||(r(),(l.hasClass(p+"-state-active")||l.hasClass(p+"-state-disabled"))&&l.removeClass(p+"-state-hover"))}).mousedown(function(){l.not("."+p+"-state-active").not("."+p+"-state-disabled").addClass(p+"-state-down")}).mouseup(function(){l.removeClass(p+"-state-down")}).hover(function(){l.not("."+p+"-state-active").not("."+p+"-state-disabled").addClass(p+"-state-hover")},function(){l.removeClass(p+"-state-hover").removeClass(p+"-state-down")}),u=u.add(l)))}),f&&u.first().addClass(p+"-corner-left").end().last().addClass(p+"-corner-right").end(),1<u.length?(t=M("<div/>"),f&&t.addClass("fc-button-group"),t.append(u),n.append(t)):n.append(u)}),n}}O.lang("en",$e.englishDefaults),O.sourceNormalizers=[];var Be={dataType:"json",cache:!(O.sourceFetchers=[])},Ue=1;function He(e){e._allDay=e.allDay,e._start=e.start.clone(),e._end=e.end?e.end.clone():null}$e.prototype.getPeerEvents=function(e,t){var n,r,i=this.getEventCache(),a=[];for(n=0;n<i.length;n++)r=i[n],e&&e._id===r._id||a.push(r);return a};var We=f.basic=Me.extend({dayGrid:null,dayNumbersVisible:!1,weekNumbersVisible:!1,weekNumberWidth:null,headRowEl:null,initialize:function(){this.dayGrid=new Ae(this),this.coordMap=this.dayGrid.coordMap},setRange:function(e){Me.prototype.setRange.call(this,e),this.dayGrid.breakOnWeeks=/year|month|week/.test(this.intervalUnit),this.dayGrid.setRange(e)},computeRange:function(e){var t=Me.prototype.computeRange.call(this,e);return/year|month/.test(t.intervalUnit)&&(t.start.startOf("week"),t.start=this.skipHiddenDays(t.start),t.end.weekday()&&(t.end.add(1,"week").startOf("week"),t.end=this.skipHiddenDays(t.end,-1,!0))),t},render:function(){this.dayNumbersVisible=1<this.dayGrid.rowCnt,this.weekNumbersVisible=this.opt("weekNumbers"),this.dayGrid.numbersVisible=this.dayNumbersVisible||this.weekNumbersVisible,this.el.addClass("fc-basic-view").html(this.renderHtml()),this.headRowEl=this.el.find("thead .fc-row"),this.scrollerEl=this.el.find(".fc-day-grid-container"),this.dayGrid.coordMap.containerEl=this.scrollerEl,this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.renderDates(this.hasRigidRows())},destroy:function(){this.dayGrid.destroyDates(),this.dayGrid.removeElement()},renderBusinessHours:function(){this.dayGrid.renderBusinessHours()},renderHtml:function(){return'<table><thead class="fc-head"><tr><td class="'+this.widgetHeaderClass+'">'+this.dayGrid.headHtml()+'</td></tr></thead><tbody class="fc-body"><tr><td class="'+this.widgetContentClass+'"><div class="fc-day-grid-container"><div class="fc-day-grid"/></div></td></tr></tbody></table>'},headIntroHtml:function(){if(this.weekNumbersVisible)return'<th class="fc-week-number '+this.widgetHeaderClass+'" '+this.weekNumberStyleAttr()+"><span>"+E(this.opt("weekNumberTitle"))+"</span></th>"},numberIntroHtml:function(e){if(this.weekNumbersVisible)return'<td class="fc-week-number" '+this.weekNumberStyleAttr()+"><span>"+this.dayGrid.getCell(e,0).start.format("w")+"</span></td>"},dayIntroHtml:function(){if(this.weekNumbersVisible)return'<td class="fc-week-number '+this.widgetContentClass+'" '+this.weekNumberStyleAttr()+"></td>"},introHtml:function(){if(this.weekNumbersVisible)return'<td class="fc-week-number" '+this.weekNumberStyleAttr()+"></td>"},numberCellHtml:function(e){var t,n=e.start;return this.dayNumbersVisible?((t=this.dayGrid.getDayClasses(n)).unshift("fc-day-number"),'<td class="'+t.join(" ")+'" data-date="'+n.format()+'">'+n.date()+"</td>"):"<td/>"},weekNumberStyleAttr:function(){return null!==this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},hasRigidRows:function(){var e=this.opt("eventLimit");return e&&"number"!=typeof e},updateWidth:function(){this.weekNumbersVisible&&(this.weekNumberWidth=e(this.el.find(".fc-week-number")))},setHeight:function(e,t){var n,r=this.opt("eventLimit");c(this.scrollerEl),a(this.headRowEl),this.dayGrid.destroySegPopover(),r&&"number"==typeof r&&this.dayGrid.limitRows(r),n=this.computeScrollerHeight(e),this.setGridHeight(n,t),r&&"number"!=typeof r&&this.dayGrid.limitRows(r),!t&&o(this.scrollerEl,n)&&(i(this.headRowEl,l(this.scrollerEl)),n=this.computeScrollerHeight(e),this.scrollerEl.height(n))},setGridHeight:function(e,t){t?r(this.dayGrid.rowEls):n(this.dayGrid.rowEls,e,!0)},renderEvents:function(e){this.dayGrid.renderEvents(e),this.updateHeight()},getEventSegs:function(){return this.dayGrid.getEventSegs()},destroyEvents:function(){this.dayGrid.destroyEvents()},renderDrag:function(e,t){return this.dayGrid.renderDrag(e,t)},destroyDrag:function(){this.dayGrid.destroyDrag()},renderSelection:function(e){this.dayGrid.renderSelection(e)},destroySelection:function(){this.dayGrid.destroySelection()}}),qe=f.month=We.extend({computeRange:function(e){var t,n=We.prototype.computeRange.call(this,e);return this.isFixedWeeks()&&(t=Math.ceil(n.end.diff(n.start,"weeks",!0)),n.end.add(6-t,"weeks")),n},setGridHeight:function(e,t){(t=t||"variable"===this.opt("weekMode"))&&(e*=this.rowCnt/6),n(this.dayGrid.rowEls,e,!t)},isFixedWeeks:function(){var e=this.opt("weekMode");return e?"fixed"===e:this.opt("fixedWeekCount")}});qe.duration={months:1},qe.defaults={fixedWeekCount:!0},f.basicWeek={type:"basic",duration:{weeks:1}},f.basicDay={type:"basic",duration:{days:1}};return(f.agenda=Me.extend({timeGrid:null,dayGrid:null,axisWidth:null,noScrollRowEls:null,bottomRuleEl:null,bottomRuleHeight:null,initialize:function(){this.timeGrid=new xe(this),this.opt("allDaySlot")?(this.dayGrid=new Ae(this),this.coordMap=new he([this.dayGrid.coordMap,this.timeGrid.coordMap])):this.coordMap=this.timeGrid.coordMap},setRange:function(e){Me.prototype.setRange.call(this,e),this.timeGrid.setRange(e),this.dayGrid&&this.dayGrid.setRange(e)},render:function(){this.el.addClass("fc-agenda-view").html(this.renderHtml()),this.scrollerEl=this.el.find(".fc-time-grid-container"),this.timeGrid.coordMap.containerEl=this.scrollerEl,this.timeGrid.setElement(this.el.find(".fc-time-grid")),this.timeGrid.renderDates(),this.bottomRuleEl=M('<hr class="fc-divider '+this.widgetHeaderClass+'"/>').appendTo(this.timeGrid.el),this.dayGrid&&(this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.renderDates(),this.dayGrid.bottomCoordPadding=this.dayGrid.el.next("hr").outerHeight()),this.noScrollRowEls=this.el.find(".fc-row:not(.fc-scroller *)")},destroy:function(){this.timeGrid.destroyDates(),this.timeGrid.removeElement(),this.dayGrid&&(this.dayGrid.destroyDates(),this.dayGrid.removeElement())},renderBusinessHours:function(){this.timeGrid.renderBusinessHours(),this.dayGrid&&this.dayGrid.renderBusinessHours()},renderHtml:function(){return'<table><thead class="fc-head"><tr><td class="'+this.widgetHeaderClass+'">'+this.timeGrid.headHtml()+'</td></tr></thead><tbody class="fc-body"><tr><td class="'+this.widgetContentClass+'">'+(this.dayGrid?'<div class="fc-day-grid"/><hr class="fc-divider '+this.widgetHeaderClass+'"/>':"")+'<div class="fc-time-grid-container"><div class="fc-time-grid"/></div></td></tr></tbody></table>'},headIntroHtml:function(){var e;return this.opt("weekNumbers")?(e=this.timeGrid.getCell(0).start.format(this.opt("smallWeekFormat")),'<th class="fc-axis fc-week-number '+this.widgetHeaderClass+'" '+this.axisStyleAttr()+"><span>"+E(e)+"</span></th>"):'<th class="fc-axis '+this.widgetHeaderClass+'" '+this.axisStyleAttr()+"></th>"},dayIntroHtml:function(){return'<td class="fc-axis '+this.widgetContentClass+'" '+this.axisStyleAttr()+"><span>"+(this.opt("allDayHtml")||E(this.opt("allDayText")))+"</span></td>"},slotBgIntroHtml:function(){return'<td class="fc-axis '+this.widgetContentClass+'" '+this.axisStyleAttr()+"></td>"},introHtml:function(){return'<td class="fc-axis" '+this.axisStyleAttr()+"></td>"},axisStyleAttr:function(){return null!==this.axisWidth?'style="width:'+this.axisWidth+'px"':""},updateSize:function(e){this.timeGrid.updateSize(e),Me.prototype.updateSize.call(this,e)},updateWidth:function(){this.axisWidth=e(this.el.find(".fc-axis"))},setHeight:function(e,t){var n,r;null===this.bottomRuleHeight&&(this.bottomRuleHeight=this.bottomRuleEl.outerHeight()),this.bottomRuleEl.hide(),this.scrollerEl.css("overflow",""),c(this.scrollerEl),a(this.noScrollRowEls),this.dayGrid&&(this.dayGrid.destroySegPopover(),(n=this.opt("eventLimit"))&&"number"!=typeof n&&(n=5),n&&this.dayGrid.limitRows(n)),t||(r=this.computeScrollerHeight(e),o(this.scrollerEl,r)?(i(this.noScrollRowEls,l(this.scrollerEl)),r=this.computeScrollerHeight(e),this.scrollerEl.height(r)):(this.scrollerEl.height(r).css("overflow","hidden"),this.bottomRuleEl.show()))},computeInitialScroll:function(){var e=$.duration(this.opt("scrollTime")),t=this.timeGrid.computeTimeTop(e);return(t=Math.ceil(t))&&t++,t},renderEvents:function(e){var t,n=[],r=[];for(t=0;t<e.length;t++)e[t].allDay?n.push(e[t]):r.push(e[t]);this.timeGrid.renderEvents(r),this.dayGrid&&this.dayGrid.renderEvents(n),this.updateHeight()},getEventSegs:function(){return this.timeGrid.getEventSegs().concat(this.dayGrid?this.dayGrid.getEventSegs():[])},destroyEvents:function(){this.timeGrid.destroyEvents(),this.dayGrid&&this.dayGrid.destroyEvents()},renderDrag:function(e,t){return e.start.hasTime()?this.timeGrid.renderDrag(e,t):this.dayGrid?this.dayGrid.renderDrag(e,t):void 0},destroyDrag:function(){this.timeGrid.destroyDrag(),this.dayGrid&&this.dayGrid.destroyDrag()},renderSelection:function(e){e.start.hasTime()||e.end.hasTime()?this.timeGrid.renderSelection(e):this.dayGrid&&this.dayGrid.renderSelection(e)},destroySelection:function(){this.timeGrid.destroySelection(),this.dayGrid&&this.dayGrid.destroySelection()}})).defaults={allDaySlot:!0,allDayText:"all-day",scrollTime:"06:00:00",slotDuration:"00:30:00",minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0},f.agendaWeek={type:"agenda",duration:{weeks:1}},f.agendaDay={type:"agenda",duration:{days:1}},O}),angular.module("ui.calendar",[]).constant("uiCalendarConfig",{calendars:{}}).controller("uiCalendarCtrl",["$scope","$locale",function(i,r){var s=i.eventSources,t=i.calendarWatchEvent?i.calendarWatchEvent:angular.noop,n=1;this.eventFingerprint=function(e){return e._id||(e._id=n++),""+e._id+(e.id||"")+(e.title||"")+(e.url||"")+(+e.start||"")+(+e.end||"")+(e.allDay||"")+(e.className||"")+t({event:e})||""};var a=1,o=1;this.sourceFingerprint=function(e){var t=""+(e.__id||(e.__id=a++)),n=angular.isObject(e)&&e.events;return n&&(t=t+"-"+(n.__id||(n.__id=o++))),t},this.allEvents=function(){for(var e=[],t=0,n=s.length;t<n;t++){var r=s[t];if(angular.isArray(r))e.push(r);else if(angular.isObject(r)&&angular.isArray(r.events)){var i={};for(var a in r)"_id"!==a&&"events"!==a&&(i[a]=r[a]);for(var o=0;o<r.events.length;o++)angular.extend(r.events[o],i);e.push(r.events)}}return Array.prototype.concat.apply([],e)},this.changeWatcher=function(o,f){var d,t=function(){for(var e,t,n=angular.isFunction(o)?o():o,r=[],i=0,a=n.length;i<a;i++)t=n[i],e=f(t),p[e]=t,r.push(e);return r},h=function(e,t){var n,r,i=[],a={};for(n=0,r=t.length;n<r;n++)a[t[n]]=!0;for(n=0,r=e.length;n<r;n++)a[e[n]]||i.push(e[n]);return i},p={};return d={subscribe:function(e,n){e.$watch(t,function(e,t){!(n&&!1===n(e,t))&&function(e,t){var n,r,i,a,o={},s=h(t,e);for(n=0,r=s.length;n<r;n++){var c=s[n];i=p[c],delete p[c];var l=f(i);l===c?d.onRemoved(i):(o[l]=c,d.onChanged(i))}var u=h(e,t);for(n=0,r=u.length;n<r;n++)a=u[n],i=p[a],o[a]||d.onAdded(i)}(e,t)},!0)},onAdded:angular.noop,onChanged:angular.noop,onRemoved:angular.noop}},this.getFullCalendarConfig=function(e,t){var r={};return angular.extend(r,t),angular.extend(r,e),angular.forEach(r,function(e,t){var n;"function"==typeof e&&(r[t]=(n=r[t],function(){if(i.$root.$$phase)return n.apply(this,arguments);var e=arguments,t=this;return i.$root.$apply(function(){return n.apply(t,e)})}))}),r},this.getLocaleConfig=function(e){if(e.lang&&!e.useNgLocale)return{};var t=function(e){var t,n;for(n in t=[],e)t[n]=e[n];return t},n=r.DATETIME_FORMATS;return{monthNames:t(n.MONTH),monthNamesShort:t(n.SHORTMONTH),dayNames:t(n.DAY),dayNamesShort:t(n.SHORTDAY)}}}]).directive("uiCalendar",["uiCalendarConfig",function(u){return{restrict:"A",scope:{eventSources:"=ngModel",calendarWatchEvent:"&"},controller:"uiCalendarCtrl",link:function(a,e,o,s){var i,c=a.eventSources,t=!1,n=s.changeWatcher(c,s.sourceFingerprint),r=s.changeWatcher(s.allEvents,s.eventFingerprint),l=null;a.destroy=function(){i&&i.fullCalendar&&i.fullCalendar("destroy"),i=o.calendar?u.calendars[o.calendar]=$(e).html(""):$(e).html("")},a.init=function(){i.fullCalendar(l),o.calendar&&(u.calendars[o.calendar]=i)},n.onAdded=function(e){i.fullCalendar("addEventSource",e),t=!0},n.onRemoved=function(e){i.fullCalendar("removeEventSource",e),t=!0},n.onChanged=function(e){i.fullCalendar("refetchEvents"),t=!0},r.onAdded=function(e){i.fullCalendar("renderEvent",e,!!e.stick)},r.onRemoved=function(e){i.fullCalendar("removeEvents",e._id)},r.onChanged=function(e){for(var t=i.fullCalendar("clientEvents",e._id),n=0;n<t.length;n++){var r=t[n];r=angular.extend(r,e),i.fullCalendar("updateEvent",r)}},n.subscribe(a),r.subscribe(a,function(){if(!0===t)return t=!1}),a.$watch(function(){var e,t=o.uiCalendar?a.$parent.$eval(o.uiCalendar):{};e=s.getFullCalendarConfig(t,u);var n=s.getLocaleConfig(e);angular.extend(n,e),l={eventSources:c},angular.extend(l,n),l.calendars=null;var r={};for(var i in l)"eventSources"!==i&&(r[i]=l[i]);return JSON.stringify(r)},function(e,t){a.destroy(),a.init()})}}}]),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("angular")):"function"==typeof define&&define.amd?define(["exports","angular"],t):t((e=e||self)["@uirouter/angularjs"]={},e.angular)}(this,function(m,e){"use strict";kr.$inject=["state"];var t=angular,A=e&&e.module?e:t,r=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r};function l(n){return function e(){if(arguments.length>=n.length)return n.apply(this,arguments);var t=Array.prototype.slice.call(arguments);return e.bind.apply(e,r([this],t))}}function n(){var n=arguments,r=n.length-1;return function(){for(var e=r,t=n[r].apply(this,arguments);e--;)t=n[e].call(this,t);return t}}function c(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.apply(null,[].slice.call(arguments).reverse())}var v=function(t){return function(e){return e&&e[t]}},_=l(function(e,t,n){return n&&n[e]===t}),S=function(e){return c.apply(null,e.split(".").map(v))},f=function(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,e)}};function i(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.apply(null,e)&&r.apply(null,e)}}function a(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.apply(null,e)||r.apply(null,e)}}var u=function(n){return function(e){return e.reduce(function(e,t){return e&&!!n(t)},!0)}},d=function(n){return function(e){return e.reduce(function(e,t){return e||!!n(t)},!1)}},h=function(t){return function(e){return null!=e&&e.constructor===t||e instanceof t}},o=function(t){return function(e){return t===e}},p=function(e){return function(){return e}};function s(t,n){return function(e){return e[t].apply(e,n)}}function g(n){return function(e){for(var t=0;t<n.length;t++)if(n[t][0](e))return n[t][1](e)}}var b=Object.prototype.toString,y=function(t){return function(e){return typeof e===t}},w=y("undefined"),T=f(w),C=function(e){return null===e},x=a(C,w),k=y("function"),E=y("number"),D=y("string"),I=function(e){return null!==e&&"object"==typeof e},P=Array.isArray,M=function(e){return"[object Date]"===b.call(e)},$=function(e){return"[object RegExp]"===b.call(e)};function O(e){if(P(e)&&e.length){var t=e.slice(0,-1),n=e.slice(-1);return!(t.filter(f(D)).length||n.filter(f(k)).length)}return k(e)}var R=i(I,c(v("then"),k)),N=function(r,e){return e.reduce(function(e,t){return e[t]=(n=r+"."+t+"()",function(){throw new Error("No implementation for "+n+". The framework specific code did not implement this method.")}),e;var n},{})},L={$q:void 0,$injector:void 0},F=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r},G="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||void 0,j=G.angular||{},B=j.fromJson||JSON.parse.bind(JSON),U=j.toJson||JSON.stringify.bind(JSON),H=j.forEach||function(t,n,e){if(P(t))return t.forEach(n,e);Object.keys(t).forEach(function(e){return n(t[e],e)})},W=Object.assign||Ie,q=j.equals||Pe;function z(e){return e}function V(){}function Y(t,r,n,e,i){void 0===i&&(i=!1);var a=function(e){return t()[e].bind(n())};return(e=e||Object.keys(t())).reduce(function(e,t){var n;return e[t]=i?(n=t,function(){return r[n]=a(n),r[n].apply(null,arguments)}):a(t),e},r)}var K=function(e,t){return W(Object.create(e),t)},Q=l(X);function X(e,t){return-1!==e.indexOf(t)}var Z=l(J);function J(e,t){var n=e.indexOf(t);return 0<=n&&e.splice(n,1),e}var ee=l(te);function te(e,t){return e.push(t),t}var ne=function(t){return t.slice().forEach(function(e){"function"==typeof e&&e(),Z(t,e)})};function re(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=W.apply(void 0,F([{}],t.reverse()));return W(r,oe(e||{},Object.keys(r)))}var ie=function(e,t){return W(e,t)};function ae(e,t){var n=[];for(var r in e.path){if(e.path[r]!==t.path[r])break;n.push(e.path[r])}return n}function oe(e,t){var n={};for(var r in e)-1!==t.indexOf(r)&&(n[r]=e[r]);return n}function se(n,e){return Object.keys(n).filter(f(Q(e))).reduce(function(e,t){return e[t]=n[t],e},{})}function ce(e,t){return de(e,v(t))}function le(e,n){var t=P(e),r=t?[]:{},i=t?function(e){return r.push(e)}:function(e,t){return r[t]=e};return H(e,function(e,t){n(e,t)&&i(e,t)}),r}function ue(e,n){var r;return H(e,function(e,t){r||n(e,t)&&(r=e)}),r}var fe=de;function de(e,n,r){return r=r||(P(e)?[]:{}),H(e,function(e,t){return r[t]=n(e,t)}),r}var he=function(t){return Object.keys(t).map(function(e){return t[e]})},pe=function(e,t){return e&&t},me=function(e,t){return e||t},ge=function(e,t){return e.concat(t)},_e=function(e,t){return P(t)?e.concat(t.reduce(_e,[])):be(e,t)};function be(e,t){return e.push(t),e}var ve=function(e,t){return Q(e,t)?e:be(e,t)},ye=function(e){return e.reduce(ge,[])},we=function(e){return e.reduce(_e,[])},Ce=Se,Ae=Se;function Se(n,r){return void 0===r&&(r="assert failure"),function(e){var t=n(e);if(!t)throw new Error(k(r)?r(e):r);return t}}var Te=function(t){return Object.keys(t).map(function(e){return[e,t[e]]})};function xe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)return[];for(var n=e.reduce(function(e,t){return Math.min(t.length,e)},9007199254740991),r=[],i=function(t){switch(e.length){case 1:r.push([e[0][t]]);break;case 2:r.push([e[0][t],e[1][t]]);break;case 3:r.push([e[0][t],e[1][t],e[2][t]]);break;case 4:r.push([e[0][t],e[1][t],e[2][t],e[3][t]]);break;default:r.push(e.map(function(e){return e[t]}))}},a=0;a<n;a++)i(a);return r}function ke(e,t){var n,r;if(P(t)&&(n=t[0],r=t[1]),!D(n))throw new Error("invalid parameters to applyPairs");return e[n]=r,e}function Ee(e){return e.length&&e[e.length-1]||void 0}function De(e,t){return t&&Object.keys(t).forEach(function(e){return delete t[e]}),t||(t={}),W(t,e)}function Ie(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n)for(var r=Object.keys(n),i=0;i<r.length;i++)e[r[i]]=n[r[i]]}return e}function Pe(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!=e&&t!=t)return!0;var n=typeof e;if(n!==typeof t||"object"!==n)return!1;var r,i,a=[e,t];if(u(P)(a))return i=t,(r=e).length===i.length&&xe(r,i).reduce(function(e,t){return e&&Pe(t[0],t[1])},!0);if(u(M)(a))return e.getTime()===t.getTime();if(u($)(a))return e.toString()===t.toString();if(u(k)(a))return!0;if([k,P,M,$].map(d).reduce(function(e,t){return e||!!t(a)},!1))return!1;var o={};for(var s in e){if(!Pe(e[s],t[s]))return!1;o[s]=!0}for(var s in t)if(!o[s])return!1;return!0}var Me,$e=function(e){return e.catch(function(e){return 0})&&e},Oe=function(e){return $e(L.$q.reject(e))},Re=function(){function t(e){this.text=e,this.glob=e.split(".");var t=this.text.split(".").map(function(e){return"**"===e?"(?:|(?:\\.[^.]*)*)":"*"===e?"\\.[^.]*":"\\."+e}).join("");this.regexp=new RegExp("^"+t+"$")}return t.is=function(e){return!!/[!,*]+/.exec(e)},t.fromString=function(e){return t.is(e)?new t(e):null},t.prototype.matches=function(e){return this.regexp.test("."+e)},t}(),Ne=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=null),this._items=e,this._limit=t,this._evictListeners=[],this.onEvict=ee(this._evictListeners)}return e.prototype.enqueue=function(e){var t=this._items;return t.push(e),this._limit&&t.length>this._limit&&this.evict(),e},e.prototype.evict=function(){var t=this._items.shift();return this._evictListeners.forEach(function(e){return e(t)}),t},e.prototype.dequeue=function(){if(this.size())return this._items.splice(0,1)[0]},e.prototype.clear=function(){var e=this._items;return this._items=[],e},e.prototype.size=function(){return this._items.length},e.prototype.remove=function(e){var t=this._items.indexOf(e);return-1<t&&this._items.splice(t,1)[0]},e.prototype.peekTail=function(){return this._items[this._items.length-1]},e.prototype.peekHead=function(){if(this.size())return this._items[0]},e}();(Me=m.RejectType||(m.RejectType={}))[Me.SUPERSEDED=2]="SUPERSEDED",Me[Me.ABORTED=3]="ABORTED",Me[Me.INVALID=4]="INVALID",Me[Me.IGNORED=5]="IGNORED",Me[Me.ERROR=6]="ERROR";var Le=0,Fe=function(){function r(e,t,n){this.$id=Le++,this.type=e,this.message=t,this.detail=n}return r.isRejectionPromise=function(e){return e&&"function"==typeof e.then&&h(r)(e._transitionRejection)},r.superseded=function(e,t){var n=new r(m.RejectType.SUPERSEDED,"The transition has been superseded by a different transition",e);return t&&t.redirected&&(n.redirected=!0),n},r.redirected=function(e){return r.superseded(e,{redirected:!0})},r.invalid=function(e){return new r(m.RejectType.INVALID,"This transition is invalid",e)},r.ignored=function(e){return new r(m.RejectType.IGNORED,"The transition was ignored",e)},r.aborted=function(e){return new r(m.RejectType.ABORTED,"The transition has been aborted",e)},r.errored=function(e){return new r(m.RejectType.ERROR,"The transition errored",e)},r.normalize=function(e){return h(r)(e)?e:r.errored(e)},r.prototype.toString=function(){var e,t=(e=this.detail)&&e.toString!==Object.prototype.toString?e.toString():ze(e);return"Transition Rejection($id: "+this.$id+" type: "+this.type+", message: "+this.message+", detail: "+t+")"},r.prototype.toPromise=function(){return W(Oe(this),{_transitionRejection:this})},r}();function Ge(e,t){return t.length<=e?t:t.substr(0,e-3)+"..."}function je(e,t){for(;t.length<e;)t+=" ";return t}function Be(e){return e.replace(/^([A-Z])/,function(e){return e.toLowerCase()}).replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function Ue(e){var t=He(e),n=t.match(/^(function [^ ]+\([^)]*\))/),r=n?n[1]:t,i=e.name||"";return i&&r.match(/function \(/)?"function "+i+r.substr(9):r}function He(e){var t=P(e)?e.slice(-1)[0]:e;return t&&t.toString()||"undefined"}var We=Fe.isRejectionPromise,qe=g([[w,p("undefined")],[C,p("null")],[R,p("[Promise]")],[We,function(e){return e._transitionRejection.toString()}],[function(e){return I(e)&&!P(e)&&e.constructor!==Object&&k(e.toString)},function(e){return e.toString()}],[O,Ue],[p(!0),z]]);function ze(e){var t=[];function n(e){if(I(e)){if(-1!==t.indexOf(e))return"[circular ref]";t.push(e)}return qe(e)}return w(e)?n(e):JSON.stringify(e,function(e,t){return n(t)}).replace(/\\"/g,'"')}var Ve=function(n){return function(e){if(!e)return["",""];var t=e.indexOf(n);return-1===t?[e,""]:[e.substr(0,t),e.substr(t+1)]}},Ye=new RegExp("^(?:[a-z]+:)?//[^/]+/"),Ke=function(e){return e.replace(/\/[^/]*$/,"")},Qe=Ve("#"),Xe=Ve("?"),Ze=Ve("="),Je=function(e){return e?e.replace(/^#/,""):""};function et(e){var t=new RegExp("("+e+")","g");return function(e){return e.split(t).filter(z)}}function tt(e,t){return D(Ee(e))&&D(t)?e.slice(0,-1).concat(Ee(e)+t):be(e,t)}var nt={log:V,error:V,table:V};var rt,it,at,ot,st="undefined"!=typeof document&&document.documentMode&&9===document.documentMode?window&&window.console?(at=window.console,{log:(ot=function(e){return Function.prototype.bind.call(e,at)})(at.log),error:ot(at.log),table:ot(at.log)}):nt:console.table&&console.error?console:(rt=console,{log:it=rt.log.bind(rt),error:rt.error?rt.error.bind(rt):it,table:rt.table?rt.table.bind(rt):it});function ct(e){if(!e)return"ui-view (defunct)";var t=e.creationContext?e.creationContext.name||"(root)":"(none)";return"[ui-view#"+e.id+" "+e.$type+":"+e.fqn+" ("+e.name+"@"+t+")]"}var lt;function ut(e){return E(e)?m.Category[e]:m.Category[m.Category[e]]}(lt=m.Category||(m.Category={}))[lt.RESOLVE=0]="RESOLVE",lt[lt.TRANSITION=1]="TRANSITION",lt[lt.HOOK=2]="HOOK",lt[lt.UIVIEW=3]="UIVIEW",lt[lt.VIEWCONFIG=4]="VIEWCONFIG";var ft=S("$id"),dt=S("router.$id"),ht=function(e){return"Transition #"+ft(e)+"-"+dt(e)},pt=function(){function e(){this._enabled={},this.approximateDigests=0}return e.prototype._set=function(t,e){var n=this;e.length||(e=Object.keys(m.Category).map(function(e){return parseInt(e,10)}).filter(function(e){return!isNaN(e)}).map(function(e){return m.Category[e]})),e.map(ut).forEach(function(e){return n._enabled[e]=t})},e.prototype.enable=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._set(!0,e)},e.prototype.disable=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._set(!1,e)},e.prototype.enabled=function(e){return!!this._enabled[ut(e)]},e.prototype.traceTransitionStart=function(e){this.enabled(m.Category.TRANSITION)&&st.log(ht(e)+": Started  -> "+ze(e))},e.prototype.traceTransitionIgnored=function(e){this.enabled(m.Category.TRANSITION)&&st.log(ht(e)+": Ignored  <> "+ze(e))},e.prototype.traceHookInvocation=function(e,t,n){if(this.enabled(m.Category.HOOK)){var r=S("traceData.hookType")(n)||"internal",i=S("traceData.context.state.name")(n)||S("traceData.context")(n)||"unknown",a=Ue(e.registeredHook.callback);st.log(ht(t)+":   Hook -> "+r+" context: "+i+", "+Ge(200,a))}},e.prototype.traceHookResult=function(e,t,n){this.enabled(m.Category.HOOK)&&st.log(ht(t)+":   <- Hook returned: "+Ge(200,ze(e)))},e.prototype.traceResolvePath=function(e,t,n){this.enabled(m.Category.RESOLVE)&&st.log(ht(n)+":         Resolving "+e+" ("+t+")")},e.prototype.traceResolvableResolved=function(e,t){this.enabled(m.Category.RESOLVE)&&st.log(ht(t)+":               <- Resolved  "+e+" to: "+Ge(200,ze(e.data)))},e.prototype.traceError=function(e,t){this.enabled(m.Category.TRANSITION)&&st.log(ht(t)+": <- Rejected "+ze(t)+", reason: "+e)},e.prototype.traceSuccess=function(e,t){this.enabled(m.Category.TRANSITION)&&st.log(ht(t)+": <- Success  "+ze(t)+", final state: "+e.name)},e.prototype.traceUIViewEvent=function(e,t,n){void 0===n&&(n=""),this.enabled(m.Category.UIVIEW)&&st.log("ui-view: "+je(30,e)+" "+ct(t)+n)},e.prototype.traceUIViewConfigUpdated=function(e,t){this.enabled(m.Category.UIVIEW)&&this.traceUIViewEvent("Updating",e," with ViewConfig from context='"+t+"'")},e.prototype.traceUIViewFill=function(e,t){this.enabled(m.Category.UIVIEW)&&this.traceUIViewEvent("Fill",e," with: "+Ge(200,t))},e.prototype.traceViewSync=function(e){if(this.enabled(m.Category.VIEWCONFIG)){var o="uiview component fqn",t=e.map(function(e){var t,n=e.uiView,r=e.viewConfig,i=n&&n.fqn,a=r&&r.viewDecl.$context.name+": ("+r.viewDecl.$name+")";return(t={})[o]=i,t["view config state (view name)"]=a,t}).sort(function(e,t){return(e[o]||"").localeCompare(t[o]||"")});st.table(t)}},e.prototype.traceViewServiceEvent=function(e,t){var n,r,i;this.enabled(m.Category.VIEWCONFIG)&&st.log("VIEWCONFIG: "+e+" "+(r=(n=t).viewDecl,i=r.$context.name||"(root)","[View#"+n.$id+" from '"+i+"' state]: target ui-view: '"+r.$uiViewName+"@"+r.$uiViewContextAnchor+"'"))},e.prototype.traceViewServiceUIViewEvent=function(e,t){this.enabled(m.Category.VIEWCONFIG)&&st.log("VIEWCONFIG: "+e+" "+ct(t))},e}(),mt=new pt,gt=function(){function e(e){this.pattern=/.*/,this.inherit=!0,W(this,e)}return e.prototype.is=function(e,t){return!0},e.prototype.encode=function(e,t){return e},e.prototype.decode=function(e,t){return e},e.prototype.equals=function(e,t){return e==t},e.prototype.$subPattern=function(){var e=this.pattern.toString();return e.substr(1,e.length-2)},e.prototype.toString=function(){return"{ParamType:"+this.name+"}"},e.prototype.$normalize=function(e){return this.is(e)?e:this.decode(e)},e.prototype.$asArray=function(e,t){if(!e)return this;if("auto"===e&&!t)throw new Error("'auto' array mode is for query parameters only");return new _t(this,e)},e}();function _t(r,i){var a=this;function o(e){return P(e)?e:T(e)?[e]:[]}function s(n,r){return function(e){if(P(e)&&0===e.length)return e;var t=de(o(e),n);return!0===r?0===le(t,function(e){return!e}).length:function(e){switch(e.length){case 0:return;case 1:return"auto"===i?e[0]:e;default:return e}}(t)}}function c(a){return function(e,t){var n=o(e),r=o(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!a(n[i],r[i]))return!1;return!0}}["encode","decode","equals","$normalize"].forEach(function(e){var t=r[e].bind(r),n="equals"===e?c:s;a[e]=n(t)}),W(this,{dynamic:r.dynamic,name:r.name,pattern:r.pattern,inherit:r.inherit,raw:r.raw,is:s(r.is.bind(r),!0),$arrayMode:i})}var bt,vt=Object.prototype.hasOwnProperty,yt=function(e){return 0===["value","type","squash","array","dynamic"].filter(vt.bind(e||{})).length};function wt(e,t,n){var r=!1===n.reloadOnSearch&&t===m.DefType.SEARCH||void 0,i=ue([n.dynamic,r],T),a=T(i)?{dynamic:i}:{},o=function(e){function t(){return e.value}e=yt(e)?{value:e}:e,t.__cacheable=!0;var n=O(e.value)?e.value:t;return W(e,{$$fn:n})}(n&&n.params&&n.params[e]);return W(a,o)}(bt=m.DefType||(m.DefType={}))[bt.PATH=0]="PATH",bt[bt.SEARCH=1]="SEARCH",bt[bt.CONFIG=2]="CONFIG";var Ct,At=function(){function r(e,t,n,r,i){var a=wt(e,n,i);t=function(e,t,n,r,i){if(e.type&&t&&"string"!==t.name)throw new Error("Param '"+r+"' has two type configurations.");if(e.type&&t&&"string"===t.name&&i.type(e.type))return i.type(e.type);if(t)return t;if(e.type)return e.type instanceof gt?e.type:i.type(e.type);var a=n===m.DefType.CONFIG?"any":n===m.DefType.PATH?"path":n===m.DefType.SEARCH?"query":"string";return i.type(a)}(a,t,n,e,r.paramTypes);var o,s,c=(o={array:n===m.DefType.SEARCH&&"auto"},s=e.match(/\[\]$/)?{array:!0}:{},W(o,s,a).array);t=c?t.$asArray(c,n===m.DefType.SEARCH):t;var l=void 0!==a.value||n===m.DefType.SEARCH,u=T(a.dynamic)?!!a.dynamic:!!t.dynamic,f=T(a.raw)?!!a.raw:!!t.raw,d=function(e,t,n){var r=e.squash;if(!t||!1===r)return!1;if(!T(r)||null==r)return n;if(!0===r||D(r))return r;throw new Error("Invalid squash policy: '"+r+"'. Valid policies: false, true, or arbitrary string")}(a,l,r.defaultSquashPolicy()),h=function(e,t,n,r){var i=[{from:"",to:n||t?void 0:""},{from:null,to:n||t?void 0:""}],a=P(e.replace)?e.replace:[];D(r)&&a.push({from:r,to:void 0});var o=de(a,v("from"));return le(i,function(e){return-1===o.indexOf(e.from)}).concat(a)}(a,c,l,d),p=T(a.inherit)?!!a.inherit:!!t.inherit;W(this,{id:e,type:t,location:n,isOptional:l,dynamic:u,raw:f,squash:d,replace:h,inherit:p,array:c,config:a})}return r.values=function(e,t){void 0===t&&(t={});for(var n={},r=0,i=e;r<i.length;r++){var a=i[r];n[a.id]=a.value(t[a.id])}return n},r.changed=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e.filter(function(e){return!e.type.equals(t[e.id],n[e.id])})},r.equals=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),0===r.changed(e,t,n).length},r.validates=function(e,t){return void 0===t&&(t={}),e.map(function(e){return e.validates(t[e.id])}).reduce(pe,!0)},r.prototype.isDefaultValue=function(e){return this.isOptional&&this.type.equals(this.value(),e)},r.prototype.value=function(e){var i=this;return e=function(e){for(var t=0,n=i.replace;t<n.length;t++){var r=n[t];if(r.from===e)return r.to}return e}(e),w(e)?function(){if(i._defaultValueCache)return i._defaultValueCache.defaultValue;if(!L.$injector)throw new Error("Injectable functions cannot be called at configuration time");var e=L.$injector.invoke(i.config.$$fn);if(null!=e&&!i.type.is(e))throw new Error("Default value ("+e+") for parameter '"+i.id+"' is not an instance of ParamType ("+i.type.name+")");return i.config.$$fn.__cacheable&&(i._defaultValueCache={defaultValue:e}),e}():this.type.$normalize(e)},r.prototype.isSearch=function(){return this.location===m.DefType.SEARCH},r.prototype.validates=function(e){if((w(e)||null===e)&&this.isOptional)return!0;var t=this.type.$normalize(e);if(!this.type.is(t))return!1;var n=this.type.encode(t);return!(D(n)&&!this.type.pattern.exec(n))},r.prototype.toString=function(){return"{Param:"+this.id+" "+this.type+" squash: '"+this.squash+"' optional: "+this.isOptional+"}"},r}(),St=function(){function e(){this.enqueue=!0,this.typeQueue=[],this.defaultTypes=oe(e.prototype,["hash","string","query","path","int","bool","date","json","any"]);this.types=K(de(this.defaultTypes,function(e,t){return new gt(W({name:t},e))}),{})}return e.prototype.dispose=function(){this.types={}},e.prototype.type=function(e,t,n){if(!T(t))return this.types[e];if(this.types.hasOwnProperty(e))throw new Error("A type named '"+e+"' has already been defined.");return this.types[e]=new gt(W({name:e},t)),n&&(this.typeQueue.push({name:e,def:n}),this.enqueue||this._flushTypeQueue()),this},e.prototype._flushTypeQueue=function(){for(;this.typeQueue.length;){var e=this.typeQueue.shift();if(e.pattern)throw new Error("You cannot override a type's .pattern at runtime.");W(this.types[e.name],L.$injector.invoke(e.def))}},e}();Ct=function(e){var t=function(e){return null!=e?e.toString():e},n={encode:t,decode:t,is:h(String),pattern:/.*/,equals:function(e,t){return e==t}};return W({},n,e)},W(St.prototype,{string:Ct({}),path:Ct({pattern:/[^/]*/}),query:Ct({}),hash:Ct({inherit:!1}),int:Ct({decode:function(e){return parseInt(e,10)},is:function(e){return!x(e)&&this.decode(e.toString())===e},pattern:/-?\d+/}),bool:Ct({encode:function(e){return e?1:0},decode:function(e){return 0!==parseInt(e,10)},is:h(Boolean),pattern:/0|1/}),date:Ct({encode:function(e){return this.is(e)?[e.getFullYear(),("0"+(e.getMonth()+1)).slice(-2),("0"+e.getDate()).slice(-2)].join("-"):void 0},decode:function(e){if(this.is(e))return e;var t=this.capture.exec(e);return t?new Date(t[1],t[2]-1,t[3]):void 0},is:function(e){return e instanceof Date&&!isNaN(e.valueOf())},equals:function(n,r){return["getFullYear","getMonth","getDate"].reduce(function(e,t){return e&&n[t]()===r[t]()},!0)},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/}),json:Ct({encode:U,decode:B,is:h(Object),equals:q,pattern:/[^/]*/}),any:Ct({encode:z,decode:z,is:function(){return!0},equals:q})});var Tt=function(){function e(e){void 0===e&&(e={}),W(this,e)}return e.prototype.$inherit=function(e,t,n){var r,i=ae(t,n),a={},o=[];for(var s in i)if(i[s]&&i[s].params&&(r=Object.keys(i[s].params)).length)for(var c in r)0<=o.indexOf(r[c])||(o.push(r[c]),a[r[c]]=this[r[c]]);return W({},a,e)},e}(),xt=function(){function r(e){if(e instanceof r){var t=e;this.state=t.state,this.paramSchema=t.paramSchema.slice(),this.paramValues=W({},t.paramValues),this.resolvables=t.resolvables.slice(),this.views=t.views&&t.views.slice()}else{var n=e;this.state=n,this.paramSchema=n.parameters({inherit:!1}),this.paramValues={},this.resolvables=n.resolvables.map(function(e){return e.clone()})}}return r.prototype.clone=function(){return new r(this)},r.prototype.applyRawParams=function(r){return this.paramValues=this.paramSchema.reduce(function(e,t){return ke(e,[(n=t).id,n.value(r[n.id])]);var n},{}),this},r.prototype.parameter=function(e){return ue(this.paramSchema,_("id",e))},r.prototype.equals=function(e,t){var n=this.diff(e,t);return n&&0===n.length},r.prototype.diff=function(e,t){if(this.state!==e.state)return!1;var n=t?t(this):this.paramSchema;return At.changed(n,this.paramValues,e.paramValues)},r.clone=function(e){return e.clone()},r}(),kt=function(){function r(e,t,n,r){this._stateRegistry=e,this._identifier=t,this._identifier=t,this._params=W({},n||{}),this._options=W({},r||{}),this._definition=e.matcher.find(t,this._options.relative)}return r.prototype.name=function(){return this._definition&&this._definition.name||this._identifier},r.prototype.identifier=function(){return this._identifier},r.prototype.params=function(){return this._params},r.prototype.$state=function(){return this._definition},r.prototype.state=function(){return this._definition&&this._definition.self},r.prototype.options=function(){return this._options},r.prototype.exists=function(){return!(!this._definition||!this._definition.self)},r.prototype.valid=function(){return!this.error()},r.prototype.error=function(){var e=this.options().relative;if(this._definition||!e)return this._definition?this._definition.self?void 0:"State '"+this.name()+"' has an invalid definition":"No such state '"+this.name()+"'";var t=e.name?e.name:e;return"Could not resolve '"+this.name()+"' from state '"+t+"'"},r.prototype.toString=function(){return"'"+this.name()+"'"+ze(this.params())},r.prototype.withState=function(e){return new r(this._stateRegistry,e,this._params,this._options)},r.prototype.withParams=function(e,t){void 0===t&&(t=!1);var n=t?e:W({},this._params,e);return new r(this._stateRegistry,this._identifier,n,this._options)},r.prototype.withOptions=function(e,t){void 0===t&&(t=!1);var n=t?e:W({},this._options,e);return new r(this._stateRegistry,this._identifier,this._params,n)},r.isDef=function(e){return e&&e.state&&(D(e.state)||D(e.state.name))},r}(),Et=function(){function d(){}return d.makeTargetState=function(e,t){var n=Ee(t).state;return new kt(e,n,t.map(v("paramValues")).reduce(ie,{}),{})},d.buildPath=function(e){var t=e.params();return e.$state().path.map(function(e){return new xt(e).applyRawParams(t)})},d.buildToPath=function(e,t){var n=d.buildPath(t);return t.options().inherit?d.inheritParams(e,n,Object.keys(t.params())):n},d.applyViewConfigs=function(i,a,t){a.filter(function(e){return Q(t,e.state)}).forEach(function(t){var e=he(t.state.views||{}),n=d.subPath(a,function(e){return e===t}),r=e.map(function(e){return i.createViewConfig(n,e)});t.views=r.reduce(ge,[])})},d.inheritParams=function(c,e,l){void 0===l&&(l=[]);var u=c.map(function(e){return e.paramSchema}).reduce(ge,[]).filter(function(e){return!e.inherit}).map(v("id"));return e.map(function(e){var t=W({},e&&e.paramValues),n=oe(t,l);t=se(t,l);var r,i,a,o=se((r=c,i=e.state,a=ue(r,_("state",i)),W({},a&&a.paramValues)||{}),u),s=W(t,o,n);return new xt(e.state).applyRawParams(s)})},d.treeChanges=function(e,r,t){for(var n,i,a,o,s,c,l=Math.min(e.length,r.length),u=0;u<l&&e[u].state!==t&&(n=e[u],i=r[u],n.equals(i,d.nonDynamicParams));)u++;o=(a=e).slice(0,u),s=a.slice(u);var f=o.map(function(e,t){var n=e.clone();return n.paramValues=r[t].paramValues,n});return c=r.slice(u),{from:a,to:f.concat(c),retained:o,retainedWithToParams:f,exiting:s,entering:c}},d.matching=function(e,t,i){var a=!1;return xe(e,t).reduce(function(e,t){var n=t[0],r=t[1];return(a=a||!n.equals(r,i))?e:e.concat(n)},[])},d.equals=function(e,t,n){return e.length===t.length&&d.matching(e,t,n).length===e.length},d.subPath=function(e,t){var n=ue(e,t),r=e.indexOf(n);return-1===r?void 0:e.slice(0,r+1)},d.nonDynamicParams=function(e){return e.state.parameters({inherit:!1}).filter(function(e){return!e.dynamic})},d.paramValues=function(e){return e.reduce(function(e,t){return W(e,t.paramValues)},{})},d}(),Dt={when:{LAZY:"LAZY",EAGER:"EAGER"},async:{WAIT:"WAIT",NOWAIT:"NOWAIT"}},It={when:"LAZY",async:"WAIT"},Pt=function(){function o(e,t,n,r,i){if(this.resolved=!1,this.promise=void 0,e instanceof o)W(this,e);else if(k(t)){if(x(e))throw new Error("new Resolvable(): token argument is required");if(!k(t))throw new Error("new Resolvable(): resolveFn argument must be a function");this.token=e,this.policy=r,this.resolveFn=t,this.deps=n||[],this.data=i,this.resolved=void 0!==i,this.promise=this.resolved?L.$q.when(this.data):void 0}else if(I(e)&&e.token&&(e.hasOwnProperty("resolveFn")||e.hasOwnProperty("data"))){var a=e;return new o(a.token,a.resolveFn,a.deps,a.policy,a.data)}}return o.prototype.getPolicy=function(e){var t=this.policy||{},n=e&&e.resolvePolicy||{};return{when:t.when||n.when||It.when,async:t.async||n.async||It.async}},o.prototype.resolve=function(t,n){var r=this,e=L.$q,i=t.findNode(this),a=i&&i.state,o=this.getPolicy(a).async,s=k(o)?o:z;return this.promise=e.when().then(function(){return e.all(t.getDependencies(r).map(function(e){return e.get(t,n)}))}).then(function(e){return r.resolveFn.apply(null,e)}).then(s).then(function(e){return r.data=e,r.resolved=!0,r.resolveFn=null,mt.traceResolvableResolved(r,n),r.data})},o.prototype.get=function(e,t){return this.promise||this.resolve(e,t)},o.prototype.toString=function(){return"Resolvable(token: "+ze(this.token)+", requires: ["+this.deps.map(ze)+"])"},o.prototype.clone=function(){return new o(this)},o.fromData=function(e,t){return new o(e,function(){return t},null,null,t)},o}(),Mt=Dt.when,$t=[Mt.EAGER,Mt.LAZY],Ot=[Mt.EAGER],Rt="Native Injector",Nt=function(){function e(e){this._path=e}return e.prototype.getTokens=function(){return this._path.reduce(function(e,t){return e.concat(t.resolvables.map(function(e){return e.token}))},[]).reduce(ve,[])},e.prototype.getResolvable=function(t){return Ee(this._path.map(function(e){return e.resolvables}).reduce(ge,[]).filter(function(e){return e.token===t}))},e.prototype.getPolicy=function(e){var t=this.findNode(e);return e.getPolicy(t.state)},e.prototype.subContext=function(t){return new e(Et.subPath(this._path,function(e){return e.state===t}))},e.prototype.addResolvables=function(e,t){var n=ue(this._path,_("state",t)),r=e.map(function(e){return e.token});n.resolvables=n.resolvables.filter(function(e){return-1===r.indexOf(e.token)}).concat(e)},e.prototype.resolvePath=function(e,s){var c=this;void 0===e&&(e="LAZY");var l=(Q($t,e)?e:"LAZY")===Dt.when.EAGER?Ot:$t;mt.traceResolvePath(this._path,e,s);var u=function(t,n){return function(e){return Q(t,c.getPolicy(e)[n])}},t=this._path.reduce(function(e,t){var n=t.resolvables.filter(u(l,"when")),r=n.filter(u(["NOWAIT"],"async")),i=n.filter(f(u(["NOWAIT"],"async"))),a=c.subContext(t.state),o=function(t){return t.get(a,s).then(function(e){return{token:t.token,value:e}})};return r.forEach(o),e.concat(i.map(o))},[]);return L.$q.all(t)},e.prototype.injector=function(){return this._injector||(this._injector=new Lt(this))},e.prototype.findNode=function(t){return ue(this._path,function(e){return Q(e.resolvables,t)})},e.prototype.getDependencies=function(t){var r=this,n=this.findNode(t),i=(Et.subPath(this._path,function(e){return e===n})||this._path).reduce(function(e,t){return e.concat(t.resolvables)},[]).filter(function(e){return e!==t});return t.deps.map(function(t){var e=i.filter(function(e){return e.token===t});if(e.length)return Ee(e);var n=r.injector().getNative(t);if(w(n))throw new Error("Could not find Dependency Injection token: "+ze(t));return new Pt(t,function(){return n},[],n)})},e}(),Lt=function(){function e(e){this.context=e,this.native=this.get(Rt)||L.$injector}return e.prototype.get=function(e){var t=this.context.getResolvable(e);if(t){if("NOWAIT"===this.context.getPolicy(t).async)return t.get(this.context);if(!t.resolved)throw new Error("Resolvable async .get() not complete:"+ze(t.token));return t.data}return this.getNative(e)},e.prototype.getAsync=function(e){var t=this.context.getResolvable(e);return t?t.get(this.context):L.$q.when(this.native.get(e))},e.prototype.getNative=function(e){return this.native&&this.native.get(e)},e}();function Ft(e){return e.name}function Gt(e){return e.self.$$state=function(){return e},e.self}function jt(e){return e.parent&&e.parent.data&&(e.data=e.self.data=K(e.parent.data,e.data)),e.data}var Bt=function(o,s){return function(e){var t=e.self;if(t&&t.url&&t.name&&t.name.match(/\.\*\*$/)){var n={};De(t,n),n.url+="{remainder:any}",t=n}var r=e.parent,i=function(e){if(!D(e))return!1;var t="^"===e.charAt(0);return{val:t?e.substring(1):e,root:t}}(t.url),a=i?o.compile(i.val,{state:t}):t.url;if(!a)return null;if(!o.isMatcher(a))throw new Error("Invalid url '"+a+"' in state '"+e+"'");return i&&i.root?a:(r&&r.navigable||s()).url.append(a)}};function Ut(e){return e.parent?e.parent.path.concat(e):[e]}function Ht(e){var t=e.parent?W({},e.parent.includes):{};return t[e.name]=!0,t}function Wt(e){var t,n,r=function(e){return e.provide||e.token},i=g([[v("resolveFn"),function(e){return new Pt(r(e),e.resolveFn,e.deps,e.policy)}],[v("useFactory"),function(e){return new Pt(r(e),e.useFactory,e.deps||e.dependencies,e.policy)}],[v("useClass"),function(e){return new Pt(r(e),function(){return new e.useClass},[],e.policy)}],[v("useValue"),function(e){return new Pt(r(e),function(){return e.useValue},[],e.policy,e.useValue)}],[v("useExisting"),function(e){return new Pt(r(e),z,[e.useExisting],e.policy)}]]),a=g([[c(v("val"),D),function(e){return new Pt(e.token,z,[e.val],e.policy)}],[c(v("val"),P),function(e){return new Pt(e.token,Ee(e.val),e.val.slice(0,-1),e.policy)}],[c(v("val"),k),function(e){return new Pt(e.token,e.val,(t=e.val,n=L.$injector,t.$inject||n&&n.annotate(t,n.strictDi)||"deferred"),e.policy);var t,n}]]),o=g([[h(Pt),function(e){return e}],[function(e){return!(!e.token||!e.resolveFn)},i],[function(e){return!(!e.provide&&!e.token||!(e.useValue||e.useFactory||e.useExisting||e.useClass))},i],[function(e){return!!(e&&e.val&&(D(e.val)||P(e.val)||k(e.val)))},a],[p(!0),function(e){throw new Error("Invalid resolve value: "+ze(e))}]]),s=e.resolve;return(P(s)?s:(t=s,n=e.resolvePolicy||{},Object.keys(t||{}).map(function(e){return{token:e,val:t[e],deps:void 0,policy:n[e]}}))).map(o)}var qt,zt,Vt=function(){function e(t,e){this.matcher=t;var r,n,i=this,a=function(){return t.find("")},o=function(e){return""===e.name};this.builders={name:[Ft],self:[Gt],parent:[function(e){return o(e)?null:t.find(i.parentName(e))||a()}],data:[jt],url:[Bt(e,a)],navigable:[(n=o,function(e){return!n(e)&&e.url?e:e.parent?e.parent.navigable:null})],params:[(r=e.paramFactory,function(n){var e=n.url&&n.url.parameters({inherit:!1})||[],t=he(fe(se(n.params||{},e.map(v("id"))),function(e,t){return r.fromConfig(t,null,n.self)}));return e.concat(t).map(function(e){return[e.id,e]}).reduce(ke,{})})],views:[],path:[Ut],includes:[Ht],resolvables:[Wt]}}return e.prototype.builder=function(e,t){var n=this.builders,r=n[e]||[];return D(e)&&!T(t)?1<r.length?r:r[0]:D(e)&&k(t)?(n[e]=r,n[e].push(t),function(){return n[e].splice(n[e].indexOf(t,1))&&null}):void 0},e.prototype.build=function(e){var t=this.matcher,n=this.builders,r=this.parentName(e);if(r&&!t.find(r,void 0,!1))return null;for(var i in n)if(n.hasOwnProperty(i)){var a=n[i].reduce(function(t,n){return function(e){return n(e,t)}},V);e[i]=a(e)}return e},e.prototype.parentName=function(e){var t=e.name||"",n=t.split(".");if("**"===n.pop()&&n.pop(),n.length){if(e.parent)throw new Error("States that specify the 'parent:' property should not have a '.' in their name ("+t+")");return n.join(".")}return e.parent?D(e.parent)?e.parent:e.parent.name:""},e.prototype.name=function(e){var t=e.name;if(-1!==t.indexOf(".")||!e.parent)return t;var n=D(e.parent)?e.parent:e.parent.name;return n?n+"."+t:t},e}(),Yt=function(){function n(e){return n.create(e||{})}return n.create=function(e){e=n.isStateClass(e)?new e:e;var t=K(K(e,n.prototype));return e.$$state=function(){return t},t.self=e,t.__stateObjectCache={nameGlob:Re.fromString(t.name)},t},n.prototype.is=function(e){return this===e||this.self===e||this.fqn()===e},n.prototype.fqn=function(){if(!(this.parent&&this.parent instanceof this.constructor))return this.name;var e=this.parent.fqn();return e?e+"."+this.name:this.name},n.prototype.root=function(){return this.parent&&this.parent.root()||this},n.prototype.parameters=function(t){return((t=re(t,{inherit:!0,matchingKeys:null})).inherit&&this.parent&&this.parent.parameters()||[]).concat(he(this.params)).filter(function(e){return!t.matchingKeys||t.matchingKeys.hasOwnProperty(e.id)})},n.prototype.parameter=function(e,t){return void 0===t&&(t={}),this.url&&this.url.parameter(e,t)||ue(he(this.params),_("id",e))||t.inherit&&this.parent&&this.parent.parameter(e)},n.prototype.toString=function(){return this.fqn()},n.isStateClass=function(e){return k(e)&&!0===e.__uiRouterState},n.isState=function(e){return I(e.__stateObjectCache)},n}(),Kt=function(){function e(e){this._states=e}return e.prototype.isRelative=function(e){return 0===(e=e||"").indexOf(".")||0===e.indexOf("^")},e.prototype.find=function(e,t,n){if(void 0===n&&(n=!0),e||""===e){var r=D(e),i=r?e:e.name;this.isRelative(i)&&(i=this.resolvePath(i,t));var a=this._states[i];if(a&&(r||!(r||a!==e&&a.self!==e)))return a;if(r&&n){var o=he(this._states).filter(function(e){return e.__stateObjectCache.nameGlob&&e.__stateObjectCache.nameGlob.matches(i)});return 1<o.length&&st.error("stateMatcher.find: Found multiple matches for "+i+" using glob: ",o.map(function(e){return e.name})),o[0]}}},e.prototype.resolvePath=function(e,t){if(!t)throw new Error("No reference point given for path '"+e+"'");for(var n=this.find(t),r=e.split("."),i=r.length,a=0,o=n;a<i;a++)if(""!==r[a]||0!==a){if("^"!==r[a])break;if(!o.parent)throw new Error("Path '"+e+"' not valid for state '"+n.name+"'");o=o.parent}else o=n;var s=r.slice(a).join(".");return o.name+(o.name&&s?".":"")+s},e}(),Qt=function(){function e(e,t,n,r){this.router=e,this.states=t,this.builder=n,this.listeners=r,this.queue=[]}return e.prototype.dispose=function(){this.queue=[]},e.prototype.register=function(e){var t=this.queue,n=Yt.create(e),r=n.name;if(!D(r))throw new Error("State must have a valid name");if(this.states.hasOwnProperty(r)||Q(t.map(v("name")),r))throw new Error("State '"+r+"' is already defined");return t.push(n),this.flush(),n},e.prototype.flush=function(){for(var t=this,e=this.queue,n=this.states,r=this.builder,i=[],a=[],o={},s=function(e){return t.states.hasOwnProperty(e)&&t.states[e]},c=function(){i.length&&t.listeners.forEach(function(e){return e("registered",i.map(function(e){return e.self}))})};0<e.length;){var l=e.shift(),u=l.name,f=r.build(l),d=a.indexOf(l);if(f){var h=s(u);if(h&&h.name===u)throw new Error("State '"+u+"' is already defined");var p=s(u+".**");p&&this.router.stateRegistry.deregister(p),n[u]=l,this.attachRoute(l),0<=d&&a.splice(d,1),i.push(l)}else{var m=o[u];if(o[u]=e.length,0<=d&&m===e.length)return e.push(l),c(),n;d<0&&a.push(l),e.push(l)}}return c(),n},e.prototype.attachRoute=function(e){if(!e.abstract&&e.url){var t=this.router.urlService.rules;t.rule(t.urlRuleFactory.create(e))}},e}(),Xt=function(){function e(e){this.router=e,this.states={},this.listeners=[],this.matcher=new Kt(this.states),this.builder=new Vt(this.matcher,e.urlMatcherFactory),this.stateQueue=new Qt(e,this.states,this.builder,this.listeners),this._registerRoot()}return e.prototype._registerRoot=function(){(this._root=this.stateQueue.register({name:"",url:"^",views:null,params:{"#":{value:null,type:"hash",dynamic:!0}},abstract:!0})).navigable=null},e.prototype.dispose=function(){var t=this;this.stateQueue.dispose(),this.listeners=[],this.get().forEach(function(e){return t.get(e)&&t.deregister(e)})},e.prototype.onStatesChanged=function(e){return this.listeners.push(e),function(){Z(this.listeners)(e)}.bind(this)},e.prototype.root=function(){return this._root},e.prototype.register=function(e){return this.stateQueue.register(e)},e.prototype._deregisterTree=function(e){var n=this,r=this.get().map(function(e){return e.$$state()}),i=function(t){var e=r.filter(function(e){return-1!==t.indexOf(e.parent)});return 0===e.length?e:e.concat(i(e))},t=i([e]),a=[e].concat(t).reverse();return a.forEach(function(e){var t=n.router.urlService.rules;t.rules().filter(_("state",e)).forEach(function(e){return t.removeRule(e)}),delete n.states[e.name]}),a},e.prototype.deregister=function(e){var t=this.get(e);if(!t)throw new Error("Can't deregister state; not found: "+e);var n=this._deregisterTree(t.$$state());return this.listeners.forEach(function(e){return e("deregistered",n.map(function(e){return e.self}))}),n},e.prototype.get=function(e,t){var n=this;if(0===arguments.length)return Object.keys(this.states).map(function(e){return n.states[e].self});var r=this.matcher.find(e,t);return r&&r.self||null},e.prototype.decorator=function(e,t){return this.builder.builder(e,t)},e}();(qt=m.TransitionHookPhase||(m.TransitionHookPhase={}))[qt.CREATE=0]="CREATE",qt[qt.BEFORE=1]="BEFORE",qt[qt.RUN=2]="RUN",qt[qt.SUCCESS=3]="SUCCESS",qt[qt.ERROR=4]="ERROR",(zt=m.TransitionHookScope||(m.TransitionHookScope={}))[zt.TRANSITION=0]="TRANSITION",zt[zt.STATE=1]="STATE";var Zt={current:V,transition:null,traceData:{},bind:null},Jt=function(){function a(e,t,n,r){var i=this;this.transition=e,this.stateContext=t,this.registeredHook=n,this.options=r,this.isSuperseded=function(){return i.type.hookPhase===m.TransitionHookPhase.RUN&&!i.options.transition.isActive()},this.options=re(r,Zt),this.type=n.eventType}return a.chain=function(e,t){return e.reduce(function(e,t){return e.then(function(){return t.invokeHook()})},t||L.$q.when())},a.invokeHooks=function(e,t){for(var n=0;n<e.length;n++){var r=e[n].invokeHook();if(R(r)){var i=e.slice(n+1);return a.chain(i,r).then(t)}}return t()},a.runAllHooks=function(e){e.forEach(function(e){return e.invokeHook()})},a.prototype.logError=function(e){this.transition.router.stateService.defaultErrorHandler()(e)},a.prototype.invokeHook=function(){var t=this,n=this.registeredHook;if(!n._deregistered){var e=this.getNotCurrentRejection();if(e)return e;var r=this.options;mt.traceHookInvocation(this,this.transition,r);var i=function(e){return n.eventType.getErrorHandler(t)(e)},a=function(e){return n.eventType.getResultHandler(t)(e)};try{var o=n.callback.call(r.bind,t.transition,t.stateContext);return!this.type.synchronous&&R(o)?o.catch(function(e){return Fe.normalize(e).toPromise()}).then(a,i):a(o)}catch(e){return i(Fe.normalize(e))}finally{n.invokeLimit&&++n.invokeCount>=n.invokeLimit&&n.deregister()}}},a.prototype.handleHookResult=function(e){var t=this,n=this.getNotCurrentRejection();return n||(R(e)?e.then(function(e){return t.handleHookResult(e)}):(mt.traceHookResult(e,this.transition,this.options),!1===e?Fe.aborted("Hook aborted transition").toPromise():h(kt)(e)?Fe.redirected(e).toPromise():void 0))},a.prototype.getNotCurrentRejection=function(){var e=this.transition.router;return e._disposed?Fe.aborted("UIRouter instance #"+e.$id+" has been stopped (disposed)").toPromise():this.transition._aborted?Fe.aborted().toPromise():this.isSuperseded()?Fe.superseded(this.options.current()).toPromise():void 0},a.prototype.toString=function(){var e=this.options,t=this.registeredHook;return(S("traceData.hookType")(e)||"internal")+" context: "+(S("traceData.context.state.name")(e)||S("traceData.context")(e)||"unknown")+", "+Ge(200,He(t.callback))},a.HANDLE_RESULT=function(t){return function(e){return t.handleHookResult(e)}},a.LOG_REJECTED_RESULT=function(t){return function(e){R(e)&&e.catch(function(e){return t.logError(Fe.normalize(e))})}},a.LOG_ERROR=function(t){return function(e){return t.logError(e)}},a.REJECT_ERROR=function(e){return function(e){return Oe(e)}},a.THROW_ERROR=function(e){return function(e){throw e}},a}();function en(e,t,n){var i=D(t)?[t]:t;return!!(k(i)?i:function(e){for(var t=i,n=0;n<t.length;n++){var r=new Re(t[n]);if(r&&r.matches(e.name)||!r&&t[n]===e.name)return!0}return!1})(e,n)}var tn=function(){function e(e,t,n,r,i,a){void 0===a&&(a={}),this.tranSvc=e,this.eventType=t,this.callback=n,this.matchCriteria=r,this.removeHookFromRegistry=i,this.invokeCount=0,this._deregistered=!1,this.priority=a.priority||0,this.bind=a.bind||null,this.invokeLimit=a.invokeLimit}return e.prototype._matchingNodes=function(e,t,n){if(!0===t)return e;var r=e.filter(function(e){return en(e.state,t,n)});return r.length?r:null},e.prototype._getDefaultMatchCriteria=function(){return fe(this.tranSvc._pluginapi._getPathTypes(),function(){return!0})},e.prototype._getMatchingNodes=function(a,o){var s=this,c=W(this._getDefaultMatchCriteria(),this.matchCriteria);return he(this.tranSvc._pluginapi._getPathTypes()).reduce(function(e,t){var n=t.scope===m.TransitionHookScope.STATE,r=a[t.name]||[],i=n?r:[Ee(r)];return e[t.name]=s._matchingNodes(i,c[t.name],o),e},{})},e.prototype.matches=function(e,t){var n=this._getMatchingNodes(e,t);return he(n).every(z)?n:null},e.prototype.deregister=function(){this.removeHookFromRegistry(this),this._deregistered=!0},e}();function nn(e,i,a){var o=(e._registeredHooks=e._registeredHooks||{})[a.name]=[],s=Z(o);function t(e,t,n){void 0===n&&(n={});var r=new tn(i,a,t,e,s,n);return o.push(r),r.deregister.bind(r)}return e[a.name]=t}var rn=function(){function e(e){this.transition=e}return e.prototype.buildHooksForPhase=function(e){var t=this;return this.transition.router.transitionService._pluginapi._getEvents(e).map(function(e){return t.buildHooks(e)}).reduce(ge,[]).filter(z)},e.prototype.buildHooks=function(a){var o=this.transition,e=o.treeChanges(),t=this.getMatchingHooks(a,e,o);if(!t)return[];var s={transition:o,current:o.options().current};return t.map(function(i){return i.matches(e,o)[a.criteriaMatchPath.name].map(function(e){var t=W({bind:i.bind,traceData:{hookType:a.name,context:e}},s),n=a.criteriaMatchPath.scope===m.TransitionHookScope.STATE?e.state.self:null,r=new Jt(o,n,i,t);return{hook:i,node:e,transitionHook:r}})}).reduce(ge,[]).sort(function(i){void 0===i&&(i=!1);return function(e,t){var n=i?-1:1,r=(e.node.state.path.length-t.node.state.path.length)*n;return 0!==r?r:t.hook.priority-e.hook.priority}}(a.reverseSort)).map(function(e){return e.transitionHook})},e.prototype.getMatchingHooks=function(t,n,r){var e=t.hookPhase===m.TransitionHookPhase.CREATE,i=this.transition.router.transitionService;return(e?[i]:[this.transition,i]).map(function(e){return e.getHooks(t.name)}).filter(Ce(P,"broken event named: "+t.name)).reduce(ge,[]).filter(function(e){return e.matches(n,r)})},e}();var an=v("self"),on=function(){function t(e,t,n){var r=this;if(this._deferred=L.$q.defer(),this.promise=this._deferred.promise,this._registeredHooks={},this._hookBuilder=new rn(this),this.isActive=function(){return r.router.globals.transition===r},this.router=n,!(this._targetState=t).valid())throw new Error(t.error());this._options=W({current:p(this)},t.options()),this.$id=n.transitionService._transitionCount++;var i=Et.buildToPath(e,t);this._treeChanges=Et.treeChanges(e,i,this._options.reloadState),this.createTransitionHookRegFns();var a=this._hookBuilder.buildHooksForPhase(m.TransitionHookPhase.CREATE);Jt.invokeHooks(a,function(){return null}),this.applyViewConfigs(n)}return t.prototype.onBefore=function(e,t,n){},t.prototype.onStart=function(e,t,n){},t.prototype.onExit=function(e,t,n){},t.prototype.onRetain=function(e,t,n){},t.prototype.onEnter=function(e,t,n){},t.prototype.onFinish=function(e,t,n){},t.prototype.onSuccess=function(e,t,n){},t.prototype.onError=function(e,t,n){},t.prototype.createTransitionHookRegFns=function(){var t=this;this.router.transitionService._pluginapi._getEvents().filter(function(e){return e.hookPhase!==m.TransitionHookPhase.CREATE}).forEach(function(e){return nn(t,t.router.transitionService,e)})},t.prototype.getHooks=function(e){return this._registeredHooks[e]},t.prototype.applyViewConfigs=function(e){var t=this._treeChanges.entering.map(function(e){return e.state});Et.applyViewConfigs(e.transitionService.$view,this._treeChanges.to,t)},t.prototype.$from=function(){return Ee(this._treeChanges.from).state},t.prototype.$to=function(){return Ee(this._treeChanges.to).state},t.prototype.from=function(){return this.$from().self},t.prototype.to=function(){return this.$to().self},t.prototype.targetState=function(){return this._targetState},t.prototype.is=function(e){return e instanceof t?this.is({to:e.$to().name,from:e.$from().name}):!(e.to&&!en(this.$to(),e.to,this)||e.from&&!en(this.$from(),e.from,this))},t.prototype.params=function(e){return void 0===e&&(e="to"),Object.freeze(this._treeChanges[e].map(v("paramValues")).reduce(ie,{}))},t.prototype.paramsChanged=function(){var e=this.params("from"),n=this.params("to"),t=[].concat(this._treeChanges.to).concat(this._treeChanges.from).map(function(e){return e.paramSchema}).reduce(_e,[]).reduce(ve,[]);return At.changed(t,e,n).reduce(function(e,t){return e[t.id]=n[t.id],e},{})},t.prototype.injector=function(t,e){void 0===e&&(e="to");var n=this._treeChanges[e];return t&&(n=Et.subPath(n,function(e){return e.state===t||e.state.name===t})),new Nt(n).injector()},t.prototype.getResolveTokens=function(e){return void 0===e&&(e="to"),new Nt(this._treeChanges[e]).getTokens()},t.prototype.addResolvable=function(e,t){void 0===t&&(t=""),e=h(Pt)(e)?e:new Pt(e);var n="string"==typeof t?t:t.name,r=this._treeChanges.to,i=ue(r,function(e){return e.state.name===n});new Nt(r).addResolvables([e],i.state)},t.prototype.redirectedFrom=function(){return this._options.redirectedFrom||null},t.prototype.originalTransition=function(){var e=this.redirectedFrom();return e&&e.originalTransition()||this},t.prototype.options=function(){return this._options},t.prototype.entering=function(){return de(this._treeChanges.entering,v("state")).map(an)},t.prototype.exiting=function(){return de(this._treeChanges.exiting,v("state")).map(an).reverse()},t.prototype.retained=function(){return de(this._treeChanges.retained,v("state")).map(an)},t.prototype.views=function(e,t){void 0===e&&(e="entering");var n=this._treeChanges[e];return(n=t?n.filter(_("state",t)):n).map(v("views")).filter(z).reduce(ge,[])},t.prototype.treeChanges=function(e){return e?this._treeChanges[e]:this._treeChanges},t.prototype.redirect=function(e){for(var t=1,n=this;null!=(n=n.redirectedFrom());)if(20<++t)throw new Error("Too many consecutive Transition redirects (20+)");var r={redirectedFrom:this,source:"redirect"};"url"===this.options().source&&!1!==e.options().location&&(r.location="replace");var i=W({},this.options(),e.options(),r);e=e.withOptions(i,!0);var a,o=this.router.transitionService.create(this._treeChanges.from,e),s=this._treeChanges.entering,c=o._treeChanges.entering;return Et.matching(c,s,Et.nonDynamicParams).filter(f((a=e.options().reloadState,function(e){return a&&e.state.includes[a.name]}))).forEach(function(e,t){e.resolvables=s[t].resolvables}),o},t.prototype._changedParams=function(){var e=this._treeChanges;if(!this._options.reload&&(!e.exiting.length&&!e.entering.length&&e.to.length===e.from.length&&!xe(e.to,e.from).map(function(e){return e[0].state!==e[1].state}).reduce(me,!1))){var t=e.to.map(function(e){return e.paramSchema}),n=[e.to,e.from].map(function(e){return e.map(function(e){return e.paramValues})});return xe(t,n[0],n[1]).map(function(e){var t=e[0],n=e[1],r=e[2];return At.changed(t,n,r)}).reduce(ge,[])}},t.prototype.dynamic=function(){var e=this._changedParams();return!!e&&e.map(function(e){return e.dynamic}).reduce(me,!1)},t.prototype.ignored=function(){return!!this._ignoredReason()},t.prototype._ignoredReason=function(){var e=this.router.globals.transition,r=this._options.reloadState,t=function(e,t){if(e.length!==t.length)return!1;var n=Et.matching(e,t);return e.length===n.filter(function(e){return!r||!e.state.includes[r.name]}).length},n=this.treeChanges(),i=e&&e.treeChanges();return i&&t(i.to,n.to)&&t(i.exiting,n.exiting)?"SameAsPending":0===n.exiting.length&&0===n.entering.length&&t(n.from,n.to)?"SameAsCurrent":void 0},t.prototype.run=function(){var t=this,n=Jt.runAllHooks,r=function(e){return t._hookBuilder.buildHooksForPhase(e)},e=r(m.TransitionHookPhase.BEFORE);return Jt.invokeHooks(e,function(){var e=t.router.globals;return e.lastStartedTransitionId=t.$id,e.transition=t,e.transitionHistory.enqueue(t),mt.traceTransitionStart(t),L.$q.when(void 0)}).then(function(){var e=r(m.TransitionHookPhase.RUN);return Jt.invokeHooks(e,function(){return L.$q.when(void 0)})}).then(function(){mt.traceSuccess(t.$to(),t),t.success=!0,t._deferred.resolve(t.to()),n(r(m.TransitionHookPhase.SUCCESS))},function(e){mt.traceError(e,t),t.success=!1,t._deferred.reject(e),t._error=e,n(r(m.TransitionHookPhase.ERROR))}),this.promise},t.prototype.valid=function(){return!this.error()||void 0!==this.success},t.prototype.abort=function(){w(this.success)&&(this._aborted=!0)},t.prototype.error=function(){var e=this.$to();if(e.self.abstract)return Fe.invalid("Cannot transition to abstract state '"+e.name+"'");var t=e.parameters(),n=this.params(),r=t.filter(function(e){return!e.validates(n[e.id])});if(r.length){var i=r.map(function(e){return"["+e.id+":"+ze(n[e.id])+"]"}).join(", "),a="The following parameter values are not valid for state '"+e.name+"': "+i;return Fe.invalid(a)}return!1===this.success?this._error:void 0},t.prototype.toString=function(){var e=this.from(),t=this.to(),n=function(e){return null!==e["#"]&&void 0!==e["#"]?e:se(e,["#"])};return"Transition#"+this.$id+"( '"+(I(e)?e.name:e)+"'"+ze(n(this._treeChanges.from.map(v("paramValues")).reduce(ie,{})))+" -> "+(this.valid()?"":"(X) ")+"'"+(I(t)?t.name:t)+"'"+ze(n(this.params()))+" )"},t.diToken=t}();function sn(e,t){var n=["",""],r=e.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!t)return r;switch(t.squash){case!1:n=["(",")"+(t.isOptional?"?":"")];break;case!0:r=r.replace(/\/$/,""),n=["(?:/(",")|/)?"];break;default:n=["("+t.squash+"|",")?"]}return r+n[0]+t.type.pattern.source+n[1]}var cn=et("/"),ln={state:{params:{}},strict:!0,caseInsensitive:!0},un=function(){function g(a,o,e,t){var s=this;this._cache={path:[this]},this._children=[],this._params=[],this._segments=[],this._compiled=[],this.config=t=re(t,ln),this.pattern=a;for(var n,r,i,c=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,u=[],f=0,d=function(e){if(!g.nameValidator.test(e))throw new Error("Invalid parameter name '"+e+"' in pattern '"+a+"'");if(ue(s._params,_("id",e)))throw new Error("Duplicate parameter name '"+e+"' in pattern '"+a+"'")},h=function(e,t){var n,r=e[2]||e[3],i=t?e[4]:e[4]||("*"===e[1]?"[\\s\\S]*":null);return{id:r,regexp:i,segment:a.substring(f,e.index),type:i?o.type(i)||(n=i,K(o.type(t?"query":"path"),{pattern:new RegExp(n,s.config.caseInsensitive?"i":void 0)})):null}};(n=c.exec(a))&&!(0<=(r=h(n,!1)).segment.indexOf("?"));)d(r.id),this._params.push(e.fromPath(r.id,r.type,t.state)),this._segments.push(r.segment),u.push([r.segment,Ee(this._params)]),f=c.lastIndex;var p=(i=a.substring(f)).indexOf("?");if(0<=p){var m=i.substring(p);if(i=i.substring(0,p),0<m.length)for(f=0;n=l.exec(m);)d((r=h(n,!0)).id),this._params.push(e.fromSearch(r.id,r.type,t.state)),f=c.lastIndex}this._segments.push(i),this._compiled=u.map(function(e){return sn.apply(null,e)}).concat(sn(i))}return g.encodeDashes=function(e){return encodeURIComponent(e).replace(/-/g,function(e){return"%5C%"+e.charCodeAt(0).toString(16).toUpperCase()})},g.pathSegmentsAndParams=function(e){return xe(e._segments,e._params.filter(function(e){return e.location===m.DefType.PATH}).concat(void 0)).reduce(ge,[]).filter(function(e){return""!==e&&T(e)})},g.queryParams=function(e){return e._params.filter(function(e){return e.location===m.DefType.SEARCH})},g.compare=function(e,t){var n=function(e){return e._cache.weights=e._cache.weights||(t=e,t._cache.segments=t._cache.segments||t._cache.path.map(g.pathSegmentsAndParams).reduce(ge,[]).reduce(tt,[]).map(function(e){return D(e)?cn(e):e}).reduce(ge,[])).map(function(e){return"/"===e?1:D(e)?2:e instanceof At?3:void 0});var t},r=n(e),i=n(t);!function(e,t,n){for(var r=Math.max(e.length,t.length);e.length<r;)e.push(n);for(;t.length<r;)t.push(n)}(r,i,0);var a,o,s=xe(r,i);for(o=0;o<s.length;o++)if(0!==(a=s[o][0]-s[o][1]))return a;return 0},g.prototype.append=function(e){return this._children.push(e),e._cache={path:this._cache.path.concat(e),parent:this,pattern:null},e},g.prototype.isRoot=function(){return this._cache.path[0]===this},g.prototype.toString=function(){return this.pattern},g.prototype.exec=function(e,r,t,n){var i=this;void 0===r&&(r={});var a,o,s,c=(a=this._cache,o="pattern",s=function(){return new RegExp(["^",ye(i._cache.path.map(v("_compiled"))).join(""),!1===i.config.strict?"/?":"","$"].join(""),i.config.caseInsensitive?"i":void 0)},a[o]=a[o]||s()).exec(e);if(!c)return null;var l,u=this.parameters(),f=u.filter(function(e){return!e.isSearch()}),d=u.filter(function(e){return e.isSearch()}),h=this._cache.path.map(function(e){return e._segments.length-1}).reduce(function(e,t){return e+t}),p={};if(h!==c.length-1)throw new Error("Unbalanced capture group in route '"+this.pattern+"'");for(var m=0;m<h;m++){for(var g=f[m],_=c[m+1],b=0;b<g.replace.length;b++)g.replace[b].from===_&&(_=g.replace[b].to);_&&!0===g.array&&(void 0,_=de(de((l=function(e){return e.split("").reverse().join("")})(_).split(/-(?!\\)/),l),function(e){return e.replace(/\\-/g,"-")}).reverse()),T(_)&&(_=g.type.decode(_)),p[g.id]=g.value(_)}return d.forEach(function(e){for(var t=r[e.id],n=0;n<e.replace.length;n++)e.replace[n].from===t&&(t=e.replace[n].to);T(t)&&(t=e.type.decode(t)),p[e.id]=e.value(t)}),t&&(p["#"]=t),p},g.prototype.parameters=function(e){return void 0===e&&(e={}),!1===e.inherit?this._params:ye(this._cache.path.map(function(e){return e._params}))},g.prototype.parameter=function(r,e){var i=this;void 0===e&&(e={});var t=this._cache.parent;return function(){for(var e=0,t=i._params;e<t.length;e++){var n=t[e];if(n.id===r)return n}}()||!1!==e.inherit&&t&&t.parameter(r,e)||null},g.prototype.validates=function(r){return r=r||{},this.parameters().filter(function(e){return r.hasOwnProperty(e.id)}).map(function(e){return n=r[(t=e).id],!t||t.validates(n);var t,n}).reduce(pe,!0)},g.prototype.format=function(o){void 0===o&&(o={});var e=this._cache.path,t=e.map(g.pathSegmentsAndParams).reduce(ge,[]).map(function(e){return D(e)?e:r(e)}),n=e.map(g.queryParams).reduce(ge,[]).map(r);if(t.concat(n).filter(function(e){return!1===e.isValid}).length)return null;function r(e){var t=e.value(o[e.id]),n=e.validates(t),r=e.isDefaultValue(t),i=!!r&&e.squash,a=e.type.encode(t);return{param:e,value:t,isValid:n,isDefaultValue:r,squash:i,encoded:a}}var i=t.reduce(function(e,t){if(D(t))return e+t;var n=t.squash,r=t.encoded,i=t.param;return!0===n?e.match(/\/$/)?e.slice(0,-1):e:D(n)?e+n:!1!==n?e:null==r?e:P(r)?e+de(r,g.encodeDashes).join("-"):i.raw?e+r:e+encodeURIComponent(r)},""),a=n.map(function(e){var t=e.param,n=e.squash,r=e.encoded,i=e.isDefaultValue;if(!(null==r||i&&!1!==n)&&(P(r)||(r=[r]),0!==r.length))return t.raw||(r=de(r,encodeURIComponent)),r.map(function(e){return t.id+"="+e})}).filter(z).reduce(ge,[]).join("&");return i+(a?"?"+a:"")+(o["#"]?"#"+o["#"]:"")},g.nameValidator=/^\w+([-.]+\w+)*(?:\[\])?$/,g}(),fn=function(){return(fn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},dn=function(){function e(e){this.router=e}return e.prototype.fromConfig=function(e,t,n){return new At(e,t,m.DefType.CONFIG,this.router.urlService.config,n)},e.prototype.fromPath=function(e,t,n){return new At(e,t,m.DefType.PATH,this.router.urlService.config,n)},e.prototype.fromSearch=function(e,t,n){return new At(e,t,m.DefType.SEARCH,this.router.urlService.config,n)},e}(),hn=function(){function e(e){var r=this;this.router=e,this.paramFactory=new dn(this.router),this.caseInsensitive=function(e){return r.router.urlService.config.caseInsensitive(e)},this.defaultSquashPolicy=function(e){return r.router.urlService.config.defaultSquashPolicy(e)},this.strictMode=function(e){return r.router.urlService.config.strictMode(e)},this.type=function(e,t,n){return r.router.urlService.config.type(e,t,n)||r},W(this,{UrlMatcher:un,Param:At})}return e.prototype.compile=function(e,t){var n=this.router.urlService.config,r=t&&!t.state&&t.params;t=r?fn({state:{params:r}},t):t;var i={strict:n._isStrictMode,caseInsensitive:n._isCaseInsensitive};return new un(e,n.paramTypes,this.paramFactory,W(i,t))},e.prototype.isMatcher=function(n){if(!I(n))return!1;var r=!0;return H(un.prototype,function(e,t){k(e)&&(r=r&&T(n[t])&&k(n[t]))}),r},e.prototype.$get=function(){var e=this.router.urlService.config;return e.paramTypes.enqueue=!1,e.paramTypes._flushTypeQueue(),this},e}(),pn=function(){function e(e){this.router=e}return e.prototype.compile=function(e){return this.router.urlMatcherFactory.compile(e)},e.prototype.create=function(e,t){var n=this,r=Yt.isState,i=g([[D,function(e){return i(n.compile(e))}],[h(un),function(e){return n.fromUrlMatcher(e,t)}],[r,function(e){return n.fromState(e,n.router)}],[h(RegExp),function(e){return n.fromRegExp(e,t)}],[k,function(e){return new mn(e,t)}]]),a=i(e);if(!a)throw new Error("invalid 'what' in when()");return a},e.prototype.fromUrlMatcher=function(n,t){var e=t;D(t)&&(t=this.router.urlMatcherFactory.compile(t)),h(un)(t)&&(e=function(e){return t.format(e)});var r={urlMatcher:n,matchPriority:function(t){var e=n.parameters().filter(function(e){return e.isOptional});return e.length?e.filter(function(e){return t[e.id]}).length/e.length:1e-6},type:"URLMATCHER"};return W(new mn(function(e){var t=n.exec(e.path,e.search,e.hash);return n.validates(t)&&t},e),r)},e.prototype.fromState=function(r,i){var e={state:r,type:"STATE"};return W(this.fromUrlMatcher(r.url,function(e){var t=i.stateService,n=i.globals;t.href(r,e)!==t.href(n.current,n.params)&&t.transitionTo(r,e,{inherit:!0,source:"url"})}),e)},e.prototype.fromRegExp=function(t,e){if(t.global||t.sticky)throw new Error("Rule RegExp must not be global or sticky");var n=D(e)?function(n){return e.replace(/\$(\$|\d{1,2})/,function(e,t){return n["$"===t?0:Number(t)]})}:e,r={regexp:t,type:"REGEXP"};return W(new mn(function(e){return t.exec(e.path)},n),r)},e.isUrlRule=function(t){return t&&["type","match","handler"].every(function(e){return T(t[e])})},e}(),mn=function(e,t){var n=this;this.match=e,this.type="RAW",this.matchPriority=function(e){return 0-n.$id},this.handler=t||z};var gn,_n=function(){function e(e){var r=this;this.router=e,this.sync=function(e){return r.router.urlService.sync(e)},this.listen=function(e){return r.router.urlService.listen(e)},this.deferIntercept=function(e){return r.router.urlService.deferIntercept(e)},this.match=function(e){return r.router.urlService.match(e)},this.initial=function(e){return r.router.urlService.rules.initial(e)},this.otherwise=function(e){return r.router.urlService.rules.otherwise(e)},this.removeRule=function(e){return r.router.urlService.rules.removeRule(e)},this.rule=function(e){return r.router.urlService.rules.rule(e)},this.rules=function(){return r.router.urlService.rules.rules()},this.sort=function(e){return r.router.urlService.rules.sort(e)},this.when=function(e,t,n){return r.router.urlService.rules.when(e,t,n)},this.urlRuleFactory=new pn(e)}return e.prototype.update=function(e){var t=this.router.locationService;e?this.location=t.url():t.url()!==this.location&&t.url(this.location,!0)},e.prototype.push=function(e,t,n){var r=n&&!!n.replace;this.router.urlService.url(e.format(t||{}),r)},e.prototype.href=function(e,t,n){var r=e.format(t);if(null==r)return null;n=n||{absolute:!1};var i,a,o,s,c=this.router.urlService.config,l=c.html5Mode();if(l||null===r||(r="#"+c.hashPrefix()+r),i=r,a=l,o=n.absolute,r="/"===(s=c.baseHref())?i:a?Ke(s)+i:o?s.slice(1)+i:i,!n.absolute||!r)return r;var u=!l&&r?"/":"",f=c.port(),d=80===f||443===f?"":":"+f;return[c.protocol(),"://",c.host(),d,u,r].join("")},Object.defineProperty(e.prototype,"interceptDeferred",{get:function(){return this.router.urlService.interceptDeferred},enumerable:!0,configurable:!0}),e}(),bn=function(){function c(e){var n=this;this.router=e,this._uiViews=[],this._viewConfigs=[],this._viewConfigFactories={},this._listeners=[],this._pluginapi={_rootViewContext:this._rootViewContext.bind(this),_viewConfigFactory:this._viewConfigFactory.bind(this),_registeredUIView:function(t){return ue(n._uiViews,function(e){return n.router.$id+"."+e.id===t})},_registeredUIViews:function(){return n._uiViews},_activeViewConfigs:function(){return n._viewConfigs},_onSync:function(e){return n._listeners.push(e),function(){return Z(n._listeners,e)}}}}return c.normalizeUIViewTarget=function(e,t){void 0===t&&(t="");var n=t.split("@"),r=n[0]||"$default",i=D(n[1])?n[1]:"^",a=/^(\^(?:\.\^)*)\.(.*$)/.exec(r);a&&(i=a[1],r=a[2]),"!"===r.charAt(0)&&(r=r.substr(1),i="");/^(\^(?:\.\^)*)$/.exec(i)?i=i.split(".").reduce(function(e,t){return e.parent},e).name:"."===i&&(i=e.name);return{uiViewName:r,uiViewContextAnchor:i}},c.prototype._rootViewContext=function(e){return this._rootContext=e||this._rootContext},c.prototype._viewConfigFactory=function(e,t){this._viewConfigFactories[e]=t},c.prototype.createViewConfig=function(e,t){var n=this._viewConfigFactories[t.$type];if(!n)throw new Error("ViewService: No view config factory registered for type "+t.$type);var r=n(e,t);return P(r)?r:[r]},c.prototype.deactivateViewConfig=function(e){mt.traceViewServiceEvent("<- Removing",e),Z(this._viewConfigs,e)},c.prototype.activateViewConfig=function(e){mt.traceViewServiceEvent("-> Registering",e),this._viewConfigs.push(e)},c.prototype.sync=function(){var n=this,r=this._uiViews.map(function(e){return[e.fqn,e]}).reduce(ke,{});function i(e){for(var t=e.viewDecl.$context,n=0;++n&&t.parent;)t=t.parent;return n}var a=l(function(e,t,n,r){return t*(e(n)-e(r))}),e=this._uiViews.sort(a(function(e){var t=function(e){return e&&e.parent?t(e.parent)+1:1};return 1e4*e.fqn.split(".").length+t(e.creationContext)},1)).map(function(e){var t=n._viewConfigs.filter(c.matches(r,e));return 1<t.length&&t.sort(a(i,-1)),{uiView:e,viewConfig:t[0]}}),t=e.map(function(e){return e.viewConfig}),o=this._viewConfigs.filter(function(e){return!Q(t,e)}).map(function(e){return{uiView:void 0,viewConfig:e}});e.forEach(function(e){-1!==n._uiViews.indexOf(e.uiView)&&e.uiView.configUpdated(e.viewConfig)});var s=e.concat(o);this._listeners.forEach(function(e){return e(s)}),mt.traceViewSync(s)},c.prototype.registerUIView=function(t){mt.traceViewServiceUIViewEvent("-> Registering",t);var e=this._uiViews;return e.filter(function(e){return e.fqn===t.fqn&&e.$type===t.$type}).length&&mt.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",t),e.push(t),this.sync(),function(){-1!==e.indexOf(t)?(mt.traceViewServiceUIViewEvent("<- Deregistering",t),Z(e)(t)):mt.traceViewServiceUIViewEvent("Tried removing non-registered uiView",t)}},c.prototype.available=function(){return this._uiViews.map(v("fqn"))},c.prototype.active=function(){return this._uiViews.filter(v("$config")).map(v("name"))},c.matches=function(s,c){return function(e){if(c.$type!==e.viewDecl.$type)return!1;var t=e.viewDecl,n=t.$uiViewName.split("."),r=c.fqn.split(".");if(!q(n,r.slice(0-n.length)))return!1;var i=1-n.length||void 0,a=r.slice(0,i).join("."),o=s[a].creationContext;return t.$uiViewContextAnchor===(o&&o.name)}},c}(),vn=function(){function e(){this.params=new Tt,this.lastStartedTransitionId=-1,this.transitionHistory=new Ne([],1),this.successfulTransitions=new Ne([],1)}return e.prototype.dispose=function(){this.transitionHistory.clear(),this.successfulTransitions.clear(),this.transition=null},e}();function yn(e){if(!(k(e)||D(e)||h(kt)(e)||kt.isDef(e)))throw new Error("'handler' must be a string, function, TargetState, or have a state: 'newtarget' property");return k(e)?e:p(e)}gn=function(e,t){var n,r,i,a,o,s,c,l,u=(n=e,(t.priority||0)-(n.priority||0));return 0!==u?u:(r=t,0!==(u=((i={STATE:4,URLMATCHER:4,REGEXP:3,RAW:2,OTHER:1})[e.type]||0)-(i[r.type]||0))?u:(o=t,0!==(u=(a=e).urlMatcher&&o.urlMatcher?un.compare(a.urlMatcher,o.urlMatcher):0)?u:(c=t,(l={STATE:!0,URLMATCHER:!0})[(s=e).type]&&l[c.type]?0:(s.$id||0)-(c.$id||0))))};var wn=function(){function e(e){this.router=e,this._sortFn=gn,this._rules=[],this._id=0,this.urlRuleFactory=new pn(e)}return e.prototype.dispose=function(e){this._rules=[],delete this._otherwiseFn},e.prototype.initial=function(e){var t=yn(e);this.rule(this.urlRuleFactory.create(function(e,t){return 0===t.globals.transitionHistory.size()&&!!/^\/?$/.exec(e.path)},t))},e.prototype.otherwise=function(e){var t=yn(e);this._otherwiseFn=this.urlRuleFactory.create(p(!0),t),this._sorted=!1},e.prototype.removeRule=function(e){Z(this._rules,e)},e.prototype.rule=function(e){var t=this;if(!pn.isUrlRule(e))throw new Error("invalid rule");return e.$id=this._id++,e.priority=e.priority||0,this._rules.push(e),this._sorted=!1,function(){return t.removeRule(e)}},e.prototype.rules=function(){return this.ensureSorted(),this._rules.concat(this._otherwiseFn?[this._otherwiseFn]:[])},e.prototype.sort=function(e){for(var t=this.stableSort(this._rules,this._sortFn=e||this._sortFn),n=0,r=0;r<t.length;r++)t[r]._group=n,r<t.length-1&&0!==this._sortFn(t[r],t[r+1])&&n++;this._rules=t,this._sorted=!0},e.prototype.ensureSorted=function(){this._sorted||this.sort()},e.prototype.stableSort=function(e,r){var t=e.map(function(e,t){return{elem:e,idx:t}});return t.sort(function(e,t){var n=r(e.elem,t.elem);return 0===n?e.idx-t.idx:n}),t.map(function(e){return e.elem})},e.prototype.when=function(e,t,n){var r=this.urlRuleFactory.create(e,t);return T(n&&n.priority)&&(r.priority=n.priority),this.rule(r),r},e}(),Cn=function(){function e(e){var t=this;this.router=e,this.paramTypes=new St,this._isCaseInsensitive=!1,this._isStrictMode=!0,this._defaultSquashPolicy=!1,this.dispose=function(){return t.paramTypes.dispose()},this.baseHref=function(){return t.router.locationConfig.baseHref()},this.hashPrefix=function(e){return t.router.locationConfig.hashPrefix(e)},this.host=function(){return t.router.locationConfig.host()},this.html5Mode=function(){return t.router.locationConfig.html5Mode()},this.port=function(){return t.router.locationConfig.port()},this.protocol=function(){return t.router.locationConfig.protocol()}}return e.prototype.caseInsensitive=function(e){return this._isCaseInsensitive=T(e)?e:this._isCaseInsensitive},e.prototype.defaultSquashPolicy=function(e){if(T(e)&&!0!==e&&!1!==e&&!D(e))throw new Error("Invalid squash policy: "+e+". Valid policies: false, true, arbitrary-string");return this._defaultSquashPolicy=T(e)?e:this._defaultSquashPolicy},e.prototype.strictMode=function(e){return this._isStrictMode=T(e)?e:this._isStrictMode},e.prototype.type=function(e,t,n){var r=this.paramTypes.type(e,t,n);return T(t)?this:r},e}(),An=function(){function e(e){var r=this;this.router=e,this.interceptDeferred=!1,this.rules=new wn(this.router),this.config=new Cn(this.router),this.url=function(e,t,n){return r.router.locationService.url(e,t,n)},this.path=function(){return r.router.locationService.path()},this.search=function(){return r.router.locationService.search()},this.hash=function(){return r.router.locationService.hash()},this.onChange=function(e){return r.router.locationService.onChange(e)}}return e.prototype.dispose=function(){this.listen(!1),this.rules.dispose()},e.prototype.parts=function(){return{path:this.path(),search:this.search(),hash:this.hash()}},e.prototype.sync=function(e){if(!e||!e.defaultPrevented){var t=this.router,n=t.urlService,r=t.stateService,i={path:n.path(),search:n.search(),hash:n.hash()},a=this.match(i);g([[D,function(e){return n.url(e,!0)}],[kt.isDef,function(e){return r.go(e.state,e.params,e.options)}],[h(kt),function(e){return r.go(e.state(),e.params(),e.options())}]])(a&&a.rule.handler(a.match,i,this.router))}},e.prototype.listen=function(e){var t=this;if(!1!==e)return this._stopListeningFn=this._stopListeningFn||this.router.urlService.onChange(function(e){return t.sync(e)});this._stopListeningFn&&this._stopListeningFn(),delete this._stopListeningFn},e.prototype.deferIntercept=function(e){void 0===e&&(e=!0),this.interceptDeferred=e},e.prototype.match=function(e){var t=this;e=W({path:"",search:{},hash:""},e);for(var n,r,i,a=this.rules.rules(),o=0;o<a.length&&(!n||n.rule._group===a[o]._group);o++){var s=(r=a[o],void 0,(i=r.match(e,t.router))&&{match:i,rule:r,weight:r.matchPriority(i)});n=!n||s&&s.weight>n.weight?s:n}return n},e}(),Sn=0,Tn=N("LocationServices",["url","path","search","hash","onChange"]),xn=N("LocationConfig",["port","protocol","host","baseHref","html5Mode","hashPrefix"]),kn=function(){function e(e,t){void 0===e&&(e=Tn),void 0===t&&(t=xn),this.locationService=e,this.locationConfig=t,this.$id=Sn++,this._disposed=!1,this._disposables=[],this.trace=mt,this.viewService=new bn(this),this.globals=new vn,this.transitionService=new Kn(this),this.urlMatcherFactory=new hn(this),this.urlRouter=new _n(this),this.urlService=new An(this),this.stateRegistry=new Xt(this),this.stateService=new Qn(this),this._plugins={},this.viewService._pluginapi._rootViewContext(this.stateRegistry.root()),this.globals.$current=this.stateRegistry.root(),this.globals.current=this.globals.$current.self,this.disposable(this.globals),this.disposable(this.stateService),this.disposable(this.stateRegistry),this.disposable(this.transitionService),this.disposable(this.urlService),this.disposable(e),this.disposable(t)}return e.prototype.disposable=function(e){this._disposables.push(e)},e.prototype.dispose=function(e){var t=this;e&&k(e.dispose)?e.dispose(this):(this._disposed=!0,this._disposables.slice().forEach(function(e){try{"function"==typeof e.dispose&&e.dispose(t),Z(t._disposables,e)}catch(e){}}))},e.prototype.plugin=function(e,t){void 0===t&&(t={});var n=new e(this,t);if(!n.name)throw new Error("Required property `name` missing on plugin: "+n);return this._disposables.push(n),this._plugins[n.name]=n},e.prototype.getPlugin=function(e){return e?this._plugins[e]:he(this._plugins)},e}();function En(t){t.addResolvable(Pt.fromData(kn,t.router),""),t.addResolvable(Pt.fromData(on,t),""),t.addResolvable(Pt.fromData("$transition$",t),""),t.addResolvable(Pt.fromData("$stateParams",t.params()),""),t.entering().forEach(function(e){t.addResolvable(Pt.fromData("$state$",e),e)})}var Dn=Q(["$transition$",on]),In=function(e){var t=he(e.treeChanges()).reduce(ge,[]).reduce(ve,[]),n=function(e){return Dn(e.token)?Pt.fromData(e.token,null):e};t.forEach(function(e){e.resolvables=e.resolvables.map(n)})},Pn=function(t){var e=t.to().redirectTo;if(e){var n=t.router.stateService;return k(e)?L.$q.when(e(t)).then(r):r(e)}function r(e){if(e)return e instanceof kt?e:D(e)?n.target(e,t.params(),t.options()):e.state||e.params?n.target(e.state||t.to(),e.params||t.params(),t.options()):void 0}};function Mn(n){return function(e,t){return(0,t.$$state()[n])(e,t)}}var $n=Mn("onExit"),On=Mn("onRetain"),Rn=Mn("onEnter"),Nn=function(e){return new Nt(e.treeChanges().to).resolvePath("EAGER",e).then(V)},Ln=function(e,t){return new Nt(e.treeChanges().to).subContext(t.$$state()).resolvePath("LAZY",e).then(V)},Fn=function(e){return new Nt(e.treeChanges().to).resolvePath("LAZY",e).then(V)},Gn=function(e){var t=L.$q,n=e.views("entering");if(n.length)return t.all(n.map(function(e){return t.when(e.load())})).then(V)},jn=function(e){var t=e.views("entering"),n=e.views("exiting");if(t.length||n.length){var r=e.router.viewService;n.forEach(function(e){return r.deactivateViewConfig(e)}),t.forEach(function(e){return r.activateViewConfig(e)}),r.sync()}},Bn=function(e){var t=e.router.globals,n=function(){t.transition===e&&(t.transition=null)};e.onSuccess({},function(){t.successfulTransitions.enqueue(e),t.$current=e.$to(),t.current=t.$current.self,De(e.params(),t.params)},{priority:1e4}),e.promise.then(n,n)},Un=function(e){var t=e.options(),n=e.router.stateService,r=e.router.urlRouter;if("url"!==t.source&&t.location&&n.$current.navigable){var i={replace:"replace"===t.location};r.push(n.$current.navigable.url,n.params,i)}r.update(!0)},Hn=function(o){var s=o.router;var e=o.entering().filter(function(e){return!!e.$$state().lazyLoad}).map(function(e){return Wn(o,e)});return L.$q.all(e).then(function(){if("url"!==o.originalTransition().options().source){var e=o.targetState();return s.stateService.target(e.identifier(),e.params(),e.options())}var t=s.urlService,n=t.match(t.parts()),r=n&&n.rule;if(r&&"STATE"===r.type){var i=r.state,a=n.match;return s.stateService.target(i,a,o.options())}s.urlService.sync()})};function Wn(t,n){var r=n.$$state().lazyLoad,e=r._promise;if(!e){e=r._promise=L.$q.when(r(t,n)).then(function(e){e&&Array.isArray(e.states)&&e.states.forEach(function(e){return t.router.stateRegistry.register(e)});return e}).then(function(e){return delete n.lazyLoad,delete n.$$state().lazyLoad,delete r._promise,e},function(e){return delete r._promise,L.$q.reject(e)})}return e}var qn=function(e,t,n,r,i,a,o,s){void 0===i&&(i=!1),void 0===a&&(a=Jt.HANDLE_RESULT),void 0===o&&(o=Jt.REJECT_ERROR),void 0===s&&(s=!1),this.name=e,this.hookPhase=t,this.hookOrder=n,this.criteriaMatchPath=r,this.reverseSort=i,this.getResultHandler=a,this.getErrorHandler=o,this.synchronous=s};function zn(e){var t=e._ignoredReason();if(t){mt.traceTransitionIgnored(e);var n=e.router.globals.transition;return"SameAsCurrent"===t&&n&&n.abort(),Fe.ignored().toPromise()}}function Vn(e){if(!e.valid())throw new Error(e.error().toString())}var Yn={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,supercede:!0,custom:{},current:function(){return null},source:"unknown"},Kn=function(){function e(e){this._transitionCount=0,this._eventTypes=[],this._registeredHooks={},this._criteriaPaths={},this._router=e,this.$view=e.viewService,this._deregisterHookFns={},this._pluginapi=Y(p(this),{},p(this),["_definePathType","_defineEvent","_getPathTypes","_getEvents","getHooks"]),this._defineCorePaths(),this._defineCoreEvents(),this._registerCoreTransitionHooks(),e.globals.successfulTransitions.onEvict(In)}return e.prototype.onCreate=function(e,t,n){},e.prototype.onBefore=function(e,t,n){},e.prototype.onStart=function(e,t,n){},e.prototype.onExit=function(e,t,n){},e.prototype.onRetain=function(e,t,n){},e.prototype.onEnter=function(e,t,n){},e.prototype.onFinish=function(e,t,n){},e.prototype.onSuccess=function(e,t,n){},e.prototype.onError=function(e,t,n){},e.prototype.dispose=function(e){he(this._registeredHooks).forEach(function(t){return t.forEach(function(e){e._deregistered=!0,Z(t,e)})})},e.prototype.create=function(e,t){return new on(e,t,this._router)},e.prototype._defineCoreEvents=function(){var e=m.TransitionHookPhase,t=Jt,n=this._criteriaPaths;this._defineEvent("onCreate",e.CREATE,0,n.to,!1,t.LOG_REJECTED_RESULT,t.THROW_ERROR,!0),this._defineEvent("onBefore",e.BEFORE,0,n.to),this._defineEvent("onStart",e.RUN,0,n.to),this._defineEvent("onExit",e.RUN,100,n.exiting,!0),this._defineEvent("onRetain",e.RUN,200,n.retained),this._defineEvent("onEnter",e.RUN,300,n.entering),this._defineEvent("onFinish",e.RUN,400,n.to),this._defineEvent("onSuccess",e.SUCCESS,0,n.to,!1,t.LOG_REJECTED_RESULT,t.LOG_ERROR,!0),this._defineEvent("onError",e.ERROR,0,n.to,!1,t.LOG_REJECTED_RESULT,t.LOG_ERROR,!0)},e.prototype._defineCorePaths=function(){var e=m.TransitionHookScope.STATE,t=m.TransitionHookScope.TRANSITION;this._definePathType("to",t),this._definePathType("from",t),this._definePathType("exiting",e),this._definePathType("retained",e),this._definePathType("entering",e)},e.prototype._defineEvent=function(e,t,n,r,i,a,o,s){void 0===i&&(i=!1),void 0===a&&(a=Jt.HANDLE_RESULT),void 0===o&&(o=Jt.REJECT_ERROR),void 0===s&&(s=!1);var c=new qn(e,t,n,r,i,a,o,s);this._eventTypes.push(c),nn(this,this,c)},e.prototype._getEvents=function(t){return(T(t)?this._eventTypes.filter(function(e){return e.hookPhase===t}):this._eventTypes.slice()).sort(function(e,t){var n=e.hookPhase-t.hookPhase;return 0===n?e.hookOrder-t.hookOrder:n})},e.prototype._definePathType=function(e,t){this._criteriaPaths[e]={name:e,scope:t}},e.prototype._getPathTypes=function(){return this._criteriaPaths},e.prototype.getHooks=function(e){return this._registeredHooks[e]},e.prototype._registerCoreTransitionHooks=function(){var e=this._deregisterHookFns;e.addCoreResolves=this.onCreate({},En),e.ignored=this.onBefore({},zn,{priority:-9999}),e.invalid=this.onBefore({},Vn,{priority:-1e4}),e.redirectTo=this.onStart({to:function(e){return!!e.redirectTo}},Pn),e.onExit=this.onExit({exiting:function(e){return!!e.onExit}},$n),e.onRetain=this.onRetain({retained:function(e){return!!e.onRetain}},On),e.onEnter=this.onEnter({entering:function(e){return!!e.onEnter}},Rn),e.eagerResolve=this.onStart({},Nn,{priority:1e3}),e.lazyResolve=this.onEnter({entering:p(!0)},Ln,{priority:1e3}),e.resolveAll=this.onFinish({},Fn,{priority:1e3}),e.loadViews=this.onFinish({},Gn),e.activateViews=this.onSuccess({},jn),e.updateGlobals=this.onCreate({},Bn),e.updateUrl=this.onSuccess({},Un,{priority:9999}),e.lazyLoad=this.onBefore({entering:function(e){return!!e.lazyLoad}},Hn)},e}(),Qn=function(){function n(e){this.router=e,this.invalidCallbacks=[],this._defaultErrorHandler=function(e){e instanceof Error&&e.stack?(console.error(e),console.error(e.stack)):e instanceof Fe?(console.error(e.toString()),e.detail&&e.detail.stack&&console.error(e.detail.stack)):console.error(e)};var t=Object.keys(n.prototype).filter(f(Q(["current","$current","params","transition"])));Y(p(n.prototype),this,p(this),t)}return Object.defineProperty(n.prototype,"transition",{get:function(){return this.router.globals.transition},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"params",{get:function(){return this.router.globals.params},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"current",{get:function(){return this.router.globals.current},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"$current",{get:function(){return this.router.globals.$current},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){this.defaultErrorHandler(V),this.invalidCallbacks=[]},n.prototype._handleInvalidTargetState=function(e,n){var r=this,i=Et.makeTargetState(this.router.stateRegistry,e),t=this.router.globals,a=function(){return t.transitionHistory.peekTail()},o=a(),s=new Ne(this.invalidCallbacks.slice()),c=new Nt(e).injector(),l=function(e){if(e instanceof kt){var t=e;return(t=r.target(t.identifier(),t.params(),t.options())).valid()?a()!==o?Fe.superseded().toPromise():r.transitionTo(t.identifier(),t.params(),t.options()):Fe.invalid(t.error()).toPromise()}};return function t(){var e=s.dequeue();return void 0===e?Fe.invalid(n.error()).toPromise():L.$q.when(e(n,i,c)).then(l).then(function(e){return e||t()})}()},n.prototype.onInvalid=function(e){return this.invalidCallbacks.push(e),function(){Z(this.invalidCallbacks)(e)}.bind(this)},n.prototype.reload=function(e){return this.transitionTo(this.current,this.params,{reload:!T(e)||e,inherit:!1,notify:!1})},n.prototype.go=function(e,t,n){var r=re(n,{relative:this.$current,inherit:!0},Yn);return this.transitionTo(e,t,r)},n.prototype.target=function(e,t,n){if(void 0===n&&(n={}),I(n.reload)&&!n.reload.name)throw new Error("Invalid reload state object");var r=this.router.stateRegistry;if(n.reloadState=!0===n.reload?r.root():r.matcher.find(n.reload,n.relative),n.reload&&!n.reloadState)throw new Error("No such reload state '"+(D(n.reload)?n.reload:n.reload.name)+"'");return new kt(this.router.stateRegistry,e,t,n)},n.prototype.getCurrentPath=function(){var e=this,t=this.router.globals.successfulTransitions.peekTail();return t?t.treeChanges().to:[new xt(e.router.stateRegistry.root())]},n.prototype.transitionTo=function(e,t,n){var a=this;void 0===t&&(t={}),void 0===n&&(n={});var o=this.router,s=o.globals;n=re(n,Yn);var r=function(){return s.transition};n=W(n,{current:r});var i=this.target(e,t,n),c=this.getCurrentPath();if(!i.exists())return this._handleInvalidTargetState(c,i);if(!i.valid())return Oe(i.error());if(!1===n.supercede&&r())return Fe.ignored("Another transition is in progress and supercede has been set to false in TransitionOptions for the transition. So the transition was ignored in favour of the existing one in progress.").toPromise();var l=function(i){return function(e){if(e instanceof Fe){var t=o.globals.lastStartedTransitionId<=i.$id;if(e.type===m.RejectType.IGNORED)return t&&o.urlRouter.update(),L.$q.when(s.current);var n=e.detail;if(e.type===m.RejectType.SUPERSEDED&&e.redirected&&n instanceof kt){var r=i.redirect(n);return r.run().catch(l(r))}if(e.type===m.RejectType.ABORTED)return t&&o.urlRouter.update(),L.$q.reject(e)}return a.defaultErrorHandler()(e),L.$q.reject(e)}},u=this.router.transitionService.create(c,i),f=u.run().catch(l(u));return $e(f),W(f,{transition:u})},n.prototype.is=function(e,t,n){n=re(n,{relative:this.$current});var r=this.router.stateRegistry.matcher.find(e,n.relative);if(T(r)){if(this.$current!==r)return!1;if(!t)return!0;var i=r.parameters({inherit:!0,matchingKeys:t});return At.equals(i,At.values(i,t),this.params)}},n.prototype.includes=function(e,t,n){n=re(n,{relative:this.$current});var r=D(e)&&Re.fromString(e);if(r){if(!r.matches(this.$current.name))return!1;e=this.$current.name}var i=this.router.stateRegistry.matcher.find(e,n.relative),a=this.$current.includes;if(T(i)){if(!T(a[i.name]))return!1;if(!t)return!0;var o=i.parameters({inherit:!0,matchingKeys:t});return At.equals(o,At.values(o,t),this.params)}},n.prototype.href=function(e,t,n){n=re(n,{lossy:!0,inherit:!0,absolute:!1,relative:this.$current}),t=t||{};var r=this.router.stateRegistry.matcher.find(e,n.relative);if(!T(r))return null;n.inherit&&(t=this.params.$inherit(t,this.$current,r));var i=r&&n.lossy?r.navigable:r;return i&&void 0!==i.url&&null!==i.url?this.router.urlRouter.href(i.url,t,{absolute:n.absolute}):null},n.prototype.defaultErrorHandler=function(e){return this._defaultErrorHandler=e||this._defaultErrorHandler},n.prototype.get=function(e,t){var n=this.router.stateRegistry;return 0===arguments.length?n.get():n.get(e,t||this.$current)},n.prototype.lazyLoad=function(e,t){var n=this.get(e);if(!n||!n.lazyLoad)throw new Error("Can not lazy load "+e);var r=this.getCurrentPath(),i=Et.makeTargetState(this.router.stateRegistry,r);return Wn(t=t||this.router.transitionService.create(r,i),n)},n}(),Xn={when:function(n){return new Promise(function(e,t){return e(n)})},reject:function(n){return new Promise(function(e,t){t(n)})},defer:function(){var n={};return n.promise=new Promise(function(e,t){n.resolve=e,n.reject=t}),n},all:function(e){if(P(e))return Promise.all(e);if(I(e)){var t=Object.keys(e).map(function(t){return e[t].then(function(e){return{key:t,val:e}})});return Xn.all(t).then(function(e){return e.reduce(function(e,t){return e[t.key]=t.val,e},{})})}}},Zn={},Jn=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,er=/([^\s,]+)/g,tr={get:function(e){return Zn[e]},has:function(e){return null!=tr.get(e)},invoke:function(e,t,n){var r=W({},Zn,n||{}),i=tr.annotate(e),a=Ce(function(e){return r.hasOwnProperty(e)},function(e){return"DI can't find injectable: '"+e+"'"}),o=i.filter(a).map(function(e){return r[e]});return k(e)?e.apply(t,o):e.slice(-1)[0].apply(t,o)},annotate:function(e){if(!O(e))throw new Error("Not an injectable function: "+e);if(e&&e.$inject)return e.$inject;if(P(e))return e.slice(0,-1);var t=e.toString().replace(Jn,"");return t.slice(t.indexOf("(")+1,t.indexOf(")")).match(er)||[]}},nr=function(e,t){var n=t[0],r=t[1];return e.hasOwnProperty(n)?P(e[n])?e[n].push(r):e[n]=[e[n],r]:e[n]=r,e},rr=function(e){return e.split("&").filter(z).map(Ze).reduce(nr,{})};function ir(e){var t=function(e){return e||""},n=Qe(e).map(t),r=n[0],i=n[1],a=Xe(r).map(t);return{path:a[0],search:a[1],hash:i,url:e}}var ar=function(e){var t=e.path(),n=e.search(),r=e.hash(),i=Object.keys(n).map(function(t){var e=n[t];return(P(e)?e:[e]).map(function(e){return t+"="+e})}).reduce(ge,[]).join("&");return t+(i?"?"+i:"")+(r?"#"+r:"")};function or(r,i,a,o){return function(e){var t=e.locationService=new a(e),n=e.locationConfig=new o(e,i);return{name:r,service:t,configuration:n,dispose:function(e){e.dispose(t),e.dispose(n)}}}}var sr,cr,lr,ur=function(){function e(e,t){var n=this;this.fireAfterUpdate=t,this._listeners=[],this._listener=function(t){return n._listeners.forEach(function(e){return e(t)})},this.hash=function(){return ir(n._get()).hash},this.path=function(){return ir(n._get()).path},this.search=function(){return rr(ir(n._get()).search)},this._location=G.location,this._history=G.history}return e.prototype.url=function(t,e){return void 0===e&&(e=!0),T(t)&&t!==this._get()&&(this._set(null,null,t,e),this.fireAfterUpdate&&this._listeners.forEach(function(e){return e({url:t})})),ar(this)},e.prototype.onChange=function(e){var t=this;return this._listeners.push(e),function(){return Z(t._listeners,e)}},e.prototype.dispose=function(e){ne(this._listeners)},e}(),fr=(sr=function(e,t){return(sr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}sr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),dr=function(n){function e(e){var t=n.call(this,e,!1)||this;return G.addEventListener("hashchange",t._listener,!1),t}return fr(e,n),e.prototype._get=function(){return Je(this._location.hash)},e.prototype._set=function(e,t,n,r){this._location.hash=n},e.prototype.dispose=function(e){n.prototype.dispose.call(this,e),G.removeEventListener("hashchange",this._listener)},e}(ur),hr=(cr=function(e,t){return(cr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}cr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),pr=function(t){function e(e){return t.call(this,e,!0)||this}return hr(e,t),e.prototype._get=function(){return this._url},e.prototype._set=function(e,t,n,r){this._url=n},e}(ur),mr=(lr=function(e,t){return(lr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}lr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),gr=function(n){function e(e){var t=n.call(this,e,!0)||this;return t._config=e.urlService.config,G.addEventListener("popstate",t._listener,!1),t}return mr(e,n),e.prototype._getBasePrefix=function(){return Ke(this._config.baseHref())},e.prototype._get=function(){var e=this._location,t=e.pathname,n=e.hash,r=e.search;r=Xe(r)[1],n=Qe(n)[1];var i=this._getBasePrefix(),a=t===this._config.baseHref(),o=t.substr(0,i.length)===i;return(t=a?"/":o?t.substring(i.length):t)+(r?"?"+r:"")+(n?"#"+n:"")},e.prototype._set=function(e,t,n,r){var i=this._getBasePrefix(),a=n&&"/"!==n[0]?"/":"",o=""===n||"/"===n?this._config.baseHref():i+a+n;r?this._history.replaceState(e,t,o):this._history.pushState(e,t,o)},e.prototype.dispose=function(e){n.prototype.dispose.call(this,e),G.removeEventListener("popstate",this._listener)},e}(ur),_r=function(){var t=this;this.dispose=V,this._baseHref="",this._port=80,this._protocol="http",this._host="localhost",this._hashPrefix="",this.port=function(){return t._port},this.protocol=function(){return t._protocol},this.host=function(){return t._host},this.baseHref=function(){return t._baseHref},this.html5Mode=function(){return!1},this.hashPrefix=function(e){return T(e)?t._hashPrefix=e:t._hashPrefix}},br=function(){function e(e,t){void 0===t&&(t=!1),this._isHtml5=t,this._baseHref=void 0,this._hashPrefix=""}return e.prototype.port=function(){return location.port?Number(location.port):"https"===this.protocol()?443:80},e.prototype.protocol=function(){return location.protocol.replace(/:/g,"")},e.prototype.host=function(){return location.hostname},e.prototype.html5Mode=function(){return this._isHtml5},e.prototype.hashPrefix=function(e){return T(e)?this._hashPrefix=e:this._hashPrefix},e.prototype.baseHref=function(e){return T(e)&&(this._baseHref=e),w(this._baseHref)&&(this._baseHref=this.getBaseHref()),this._baseHref},e.prototype.getBaseHref=function(){var e=document.getElementsByTagName("base")[0];return e&&e.href?e.href.replace(/^([^/:]*:)?\/\/[^/]*/,""):this._isHtml5?"/":location.pathname||"/"},e.prototype.dispose=function(){},e}();function vr(e){return L.$injector=tr,{name:"vanilla.services",$q:L.$q=Xn,$injector:tr,dispose:function(){return null}}}var yr=or("vanilla.hashBangLocation",!1,dr,br),wr=or("vanilla.pushStateLocation",!0,gr,br),Cr=or("vanilla.memoryLocation",!1,pr,_r),Ar=function(){function e(){}return e.prototype.dispose=function(e){},e}(),Sr=Object.freeze({__proto__:null,root:G,fromJson:B,toJson:U,forEach:H,extend:W,equals:q,identity:z,noop:V,createProxyFunctions:Y,inherit:K,inArray:Q,_inArray:X,removeFrom:Z,_removeFrom:J,pushTo:ee,_pushTo:te,deregAll:ne,defaults:re,mergeR:ie,ancestors:ae,pick:oe,omit:se,pluck:ce,filter:le,find:ue,mapObj:fe,map:de,values:he,allTrueR:pe,anyTrueR:me,unnestR:ge,flattenR:_e,pushR:be,uniqR:ve,unnest:ye,flatten:we,assertPredicate:Ce,assertMap:Ae,assertFn:Se,pairs:Te,arrayTuples:xe,applyPairs:ke,tail:Ee,copy:De,_extend:Ie,silenceUncaughtInPromise:$e,silentRejection:Oe,makeStub:N,services:L,Glob:Re,curry:l,compose:n,pipe:c,prop:v,propEq:_,parse:S,not:f,and:i,or:a,all:u,any:d,is:h,eq:o,val:p,invoke:s,pattern:g,isUndefined:w,isDefined:T,isNull:C,isNullOrUndefined:x,isFunction:k,isNumber:E,isString:D,isObject:I,isArray:P,isDate:M,isRegExp:$,isInjectable:O,isPromise:R,Queue:Ne,maxLength:Ge,padString:je,kebobString:Be,functionToString:Ue,fnToString:He,stringify:ze,beforeAfterSubstr:Ve,hostRegex:Ye,stripLastPathElement:Ke,splitHash:Qe,splitQuery:Xe,splitEqual:Ze,trimHashVal:Je,splitOnDelim:et,joinNeighborsR:tt,get Category(){return m.Category},Trace:pt,trace:mt,get DefType(){return m.DefType},Param:At,ParamTypes:St,StateParams:Tt,ParamType:gt,PathNode:xt,PathUtils:Et,resolvePolicies:Dt,defaultResolvePolicy:It,Resolvable:Pt,NATIVE_INJECTOR_TOKEN:Rt,ResolveContext:Nt,resolvablesBuilder:Wt,StateBuilder:Vt,StateObject:Yt,StateMatcher:Kt,StateQueueManager:Qt,StateRegistry:Xt,StateService:Qn,TargetState:kt,get TransitionHookPhase(){return m.TransitionHookPhase},get TransitionHookScope(){return m.TransitionHookScope},HookBuilder:rn,matchState:en,RegisteredHook:tn,makeEvent:nn,get RejectType(){return m.RejectType},Rejection:Fe,Transition:on,TransitionHook:Jt,TransitionEventType:qn,defaultTransOpts:Yn,TransitionService:Kn,UrlRules:wn,UrlConfig:Cn,UrlMatcher:un,ParamFactory:dn,UrlMatcherFactory:hn,UrlRouter:_n,UrlRuleFactory:pn,BaseUrlRule:mn,UrlService:An,ViewService:bn,UIRouterGlobals:vn,UIRouter:kn,$q:Xn,$injector:tr,BaseLocationServices:ur,HashLocationService:dr,MemoryLocationService:pr,PushStateLocationService:gr,MemoryLocationConfig:_r,BrowserLocationConfig:br,keyValsToObjectR:nr,getParams:rr,parseUrl:ir,buildUrl:ar,locationPluginFactory:or,servicesPlugin:vr,hashLocationPlugin:yr,pushStateLocationPlugin:wr,memoryLocationPlugin:Cr,UIRouterPluginBase:Ar});function Tr(){var n=null;return function(e,t){return n=n||L.$injector.get("$templateFactory"),[new Dr(e,t,n)]}}var xr=function(e,n){return e.reduce(function(e,t){return e||T(n[t])},!1)};function kr(r){if(!r.parent)return{};var i=["component","bindings","componentProvider"],a=["templateProvider","templateUrl","template","notify","async"].concat(["controller","controllerProvider","controllerAs","resolveAs"]),e=i.concat(a);if(T(r.views)&&xr(e,r))throw new Error("State '"+r.name+"' has a 'views' object. It cannot also have \"view properties\" at the state level.  Move the following properties into a view (in the 'views' object):  "+e.filter(function(e){return T(r[e])}).join(", "));var o={},t=r.views||{$default:oe(r,e)};return H(t,function(e,t){if(t=t||"$default",D(e)&&(e={component:e}),e=W({},e),xr(i,e)&&xr(a,e))throw new Error("Cannot combine: "+i.join("|")+" with: "+a.join("|")+" in stateview: '"+t+"@"+r.name+"'");e.resolveAs=e.resolveAs||"$resolve",e.$type="ng1",e.$context=r,e.$name=t;var n=bn.normalizeUIViewTarget(e.$context,e.$name);e.$uiViewName=n.uiViewName,e.$uiViewContextAnchor=n.uiViewContextAnchor,o[t]=e}),o}var Er=0,Dr=function(){function e(e,t,n){var r=this;this.path=e,this.viewDecl=t,this.factory=n,this.$id=Er++,this.loaded=!1,this.getTemplate=function(e,t){return r.component?r.factory.makeComponentTemplate(e,t,r.component,r.viewDecl.bindings):r.template}}return e.prototype.load=function(){var t=this,e=L.$q,n=new Nt(this.path),r=this.path.reduce(function(e,t){return W(e,t.paramValues)},{}),i={template:e.when(this.factory.fromConfig(this.viewDecl,r,n)),controller:e.when(this.getController(n))};return e.all(i).then(function(e){return mt.traceViewServiceEvent("Loaded",t),t.controller=e.controller,W(t,e.template),t})},e.prototype.getController=function(e){var t=this.viewDecl.controllerProvider;if(!O(t))return this.viewDecl.controller;var n=L.$injector.annotate(t),r=P(t)?Ee(t):t;return new Pt("",r,n).get(e)},e}(),Ir=function(){function e(){var r=this;this._useHttp=A.version.minor<3,this.$get=["$http","$templateCache","$injector",function(e,t,n){return r.$templateRequest=n.has&&n.has("$templateRequest")&&n.get("$templateRequest"),r.$http=e,r.$templateCache=t,r}]}return e.prototype.useHttpService=function(e){this._useHttp=e},e.prototype.fromConfig=function(e,t,n){var r=function(e){return L.$q.when(e).then(function(e){return{template:e}})},i=function(e){return L.$q.when(e).then(function(e){return{component:e}})};return T(e.template)?r(this.fromString(e.template,t)):T(e.templateUrl)?r(this.fromUrl(e.templateUrl,t)):T(e.templateProvider)?r(this.fromProvider(e.templateProvider,t,n)):T(e.component)?i(e.component):T(e.componentProvider)?i(this.fromComponentProvider(e.componentProvider,t,n)):r("<ui-view></ui-view>")},e.prototype.fromString=function(e,t){return k(e)?e(t):e},e.prototype.fromUrl=function(e,t){return k(e)&&(e=e(t)),null==e?null:this._useHttp?this.$http.get(e,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then(function(e){return e.data}):this.$templateRequest(e)},e.prototype.fromProvider=function(e,t,n){var r=L.$injector.annotate(e),i=P(e)?Ee(e):e;return new Pt("",i,r).get(n)},e.prototype.fromComponentProvider=function(e,t,n){var r=L.$injector.annotate(e),i=P(e)?Ee(e):e;return new Pt("",i,r).get(n)},e.prototype.makeComponentTemplate=function(c,l,e,u){u=u||{};var f=3<=A.version.minor?"::":"",d=function(e){var t=Be(e);return/^(x|data)-/.exec(t)?"x-"+t:t},t=function(e){var t=L.$injector.get(e+"Directive");if(!t||!t.length)throw new Error("Unable to find component named '"+e+"'");return t.map(Pr).reduce(ge,[])}(e).map(function(e){var t=e.name,n=e.type,r=d(t);if(c.attr(r)&&!u[t])return r+"='"+c.attr(r)+"'";var i=u[t]||t;if("@"===n)return r+"='{{"+f+"$resolve."+i+"}}'";if("&"!==n)return r+"='"+f+"$resolve."+i+"'";var a=l.getResolvable(i),o=a&&a.data,s=o&&L.$injector.annotate(o)||[];return r+"='$resolve."+i+(P(o)?"["+(o.length-1)+"]":"")+"("+s.join(",")+")'"}).join(" "),n=d(e);return"<"+n+" "+t+"></"+n+">"},e}();var Pr=function(e){return I(e.bindToController)?Mr(e.bindToController):Mr(e.scope)},Mr=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@&])[?]?(.*)/.exec(t[e])]}).filter(function(e){return T(e)&&P(e[1])}).map(function(e){return{name:e[1][2]||e[0],type:e[1][1]}})},$r=function(){function n(e,t){this.stateRegistry=e,this.stateService=t,Y(p(n.prototype),this,p(this))}return n.prototype.decorator=function(e,t){return this.stateRegistry.decorator(e,t)||this},n.prototype.state=function(e,t){return I(e)?t=e:t.name=e,this.stateRegistry.register(t),this},n.prototype.onInvalid=function(e){return this.stateService.onInvalid(e)},n}(),Or=function(n){return function(e,t){var i=e[n],a="onExit"===n?"from":"to";return i?function(e,t){var n=new Nt(e.treeChanges(a)).subContext(t.$$state()),r=W(Xr(n),{$state$:t,$transition$:e});return L.$injector.invoke(i,this,r)}:void 0}},Rr=function(){function e(e){this._urlListeners=[],this.$locationProvider=e;var t=p(e);Y(t,this,t,["hashPrefix"])}return e.monkeyPatchPathParameterType=function(e){var t=e.urlMatcherFactory.type("path");t.encode=function(e){return null!=e?e.toString().replace(/(~|\/)/g,function(e){return{"~":"~~","/":"~2F"}[e]}):e},t.decode=function(e){return null!=e?e.toString().replace(/(~~|~2F)/g,function(e){return{"~~":"~","~2F":"/"}[e]}):e}},e.prototype.dispose=function(){},e.prototype.onChange=function(e){var t=this;return this._urlListeners.push(e),function(){return Z(t._urlListeners)(e)}},e.prototype.html5Mode=function(){var e=this.$locationProvider.html5Mode();return(e=I(e)?e.enabled:e)&&this.$sniffer.history},e.prototype.baseHref=function(){return this._baseHref||(this._baseHref=this.$browser.baseHref()||this.$window.location.pathname)},e.prototype.url=function(e,t,n){return void 0===t&&(t=!1),T(e)&&this.$location.url(e),t&&this.$location.replace(),n&&this.$location.state(n),this.$location.url()},e.prototype._runtimeServices=function(e,t,n,r,i){var a=this;this.$location=t,this.$sniffer=n,this.$browser=r,this.$window=i,e.$on("$locationChangeSuccess",function(t){return a._urlListeners.forEach(function(e){return e(t)})});var o=p(t);Y(o,this,o,["replace","path","search","hash"]),Y(o,this,o,["port","protocol","host"])},e}(),Nr=function(){function n(e){this.router=e}return n.injectableHandler=function(t,n){return function(e){return L.$injector.invoke(n,null,{$match:e,$stateParams:t.globals.params})}},n.prototype.$get=function(){var e=this.router.urlService;return this.router.urlRouter.update(!0),e.interceptDeferred||e.listen(),this.router.urlRouter},n.prototype.rule=function(e){var t=this;if(!k(e))throw new Error("'rule' must be a function");var n=new mn(function(){return e(L.$injector,t.router.locationService)},z);return this.router.urlService.rules.rule(n),this},n.prototype.otherwise=function(e){var t=this,n=this.router.urlService.rules;if(D(e))n.otherwise(e);else{if(!k(e))throw new Error("'rule' must be a string or function");n.otherwise(function(){return e(L.$injector,t.router.locationService)})}return this},n.prototype.when=function(e,t){return(P(t)||k(t))&&(t=n.injectableHandler(this.router,t)),this.router.urlService.rules.when(e,t),this},n.prototype.deferIntercept=function(e){this.router.urlService.deferIntercept(e)},n}();A.module("ui.router.angular1",[]);var Lr=A.module("ui.router.init",["ng"]),Fr=A.module("ui.router.util",["ui.router.init"]),Gr=A.module("ui.router.router",["ui.router.util"]),jr=A.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),Br=A.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),Ur=(A.module("ui.router.compat",["ui.router"]),null);function Hr(e){(Ur=this.router=new kn).stateProvider=new $r(Ur.stateRegistry,Ur.stateService),Ur.stateRegistry.decorator("views",kr),Ur.stateRegistry.decorator("onExit",Or("onExit")),Ur.stateRegistry.decorator("onRetain",Or("onRetain")),Ur.stateRegistry.decorator("onEnter",Or("onEnter")),Ur.viewService._pluginapi._viewConfigFactory("ng1",Tr());var s=Ur.locationService=Ur.locationConfig=new Rr(e);function t(e,t,n,r,i,a,o){return s._runtimeServices(i,e,r,t,n),delete Ur.router,delete Ur.$get,Ur}return Rr.monkeyPatchPathParameterType(Ur),((Ur.router=Ur).$get=t).$inject=["$location","$browser","$window","$sniffer","$rootScope","$http","$templateCache"],Ur}Hr.$inject=["$locationProvider"];var Wr=function(n){return["$uiRouterProvider",function(e){var t=e.router[n];return t.$get=function(){return t},t}]};function qr(t,e,n){if(L.$injector=t,L.$q=e,!t.hasOwnProperty("strictDi"))try{t.invoke(["checkStrictDi",function(e){}])}catch(e){t.strictDi=!!/strict mode/.exec(e&&e.toString())}n.stateRegistry.get().map(function(e){return e.$$state().resolvables}).reduce(ge,[]).filter(function(e){return"deferred"===e.deps}).forEach(function(e){return e.deps=t.annotate(e.resolveFn,t.strictDi)})}qr.$inject=["$injector","$q","$uiRouter"];function zr(e){e.$watch(function(){mt.approximateDigests++})}zr.$inject=["$rootScope"],Lr.provider("$uiRouter",Hr),Gr.provider("$urlRouter",["$uiRouterProvider",function(e){return e.urlRouterProvider=new Nr(e)}]),Fr.provider("$urlService",Wr("urlService")),Fr.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return Ur.urlMatcherFactory}]),Fr.provider("$templateFactory",function(){return new Ir}),jr.provider("$stateRegistry",Wr("stateRegistry")),jr.provider("$uiRouterGlobals",Wr("globals")),jr.provider("$transitions",Wr("transitionService")),jr.provider("$state",["$uiRouterProvider",function(){return W(Ur.stateProvider,{$get:function(){return Ur.stateService}})}]),jr.factory("$stateParams",["$uiRouter",function(e){return e.globals.params}]),Br.factory("$view",function(){return Ur.viewService}),Br.service("$trace",function(){return mt}),Br.run(zr),Fr.run(["$urlMatcherFactory",function(e){}]),jr.run(["$state",function(e){}]),Gr.run(["$urlRouter",function(e){}]),Lr.run(qr);var Vr,Yr,Kr,Qr,Xr=function(n){return n.getTokens().filter(D).map(function(e){var t=n.getResolvable(e);return[e,"NOWAIT"===n.getPolicy(t).async?t.promise:t.data]}).reduce(ke,{})};function Zr(e){var t,n=e.match(/^\s*({[^}]*})\s*$/);if(n&&(e="("+n[1]+")"),!(t=e.replace(/\n/g," ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/))||4!==t.length)throw new Error("Invalid state ref '"+e+"'");return{state:t[1]||null,paramExpr:t[3]||null}}function Jr(e){var t=e.parent().inheritedData("$uiView"),n=S("$cfg.path")(t);return n?Ee(n).state.name:void 0}function ei(e,t,n){var r,i=n.uiState||e.current.name,a=W((r=e,{relative:Jr(t)||r.$current,inherit:!0,source:"sref"}),n.uiStateOpts||{}),o=e.href(i,n.uiStateParams,a);return{uiState:i,uiStateParams:n.uiStateParams,uiStateOpts:a,href:o}}function ti(e){var t="[object SVGAnimatedString]"===Object.prototype.toString.call(e.prop("href")),n="FORM"===e[0].nodeName;return{attr:n?"action":t?"xlink:href":"href",isAnchor:"A"===e.prop("tagName").toUpperCase(),clickable:!n}}function ni(a,o,s,c,l){return function(e){var t=e.which||e.button,n=l();if(!(1<t||e.ctrlKey||e.metaKey||e.shiftKey||a.attr("target"))){var r=s(function(){a.attr("disabled")||o.go(n.uiState,n.uiStateParams,n.uiStateOpts)});e.preventDefault();var i=c.isAnchor&&!n.href?1:0;e.preventDefault=function(){i--<=0&&s.cancel(r)}}}}function ri(i,e,a,t){var o;t&&(o=t.events),P(o)||(o=["click"]);for(var n=i.on?"on":"bind",r=0,s=o;r<s.length;r++){var c=s[r];i[n](c,a)}e.$on("$destroy",function(){for(var e=i.off?"off":"unbind",t=0,n=o;t<n.length;t++){var r=n[t];i[e](r,a)}})}function ii(r){var e=function(e,t,n){return r.is(e,t,n)};return e.$stateful=!0,e}function ai(r){var e=function(e,t,n){return r.includes(e,t,n)};return e.$stateful=!0,e}function oi(m,g,_,e,b,t){var v=S("viewDecl.controllerAs"),y=S("viewDecl.resolveAs");return{restrict:"ECA",priority:-400,compile:function(e){var p=e.html();return e.empty(),function(t,n){var e=n.data("$uiView");if(!e)return n.html(p),void m(n.contents())(t);var r=e.$cfg||{viewDecl:{},getTemplate:V},i=r.path&&new Nt(r.path);n.html(r.getTemplate(n,i)||p),mt.traceUIViewFill(e.$uiView,n.html());var a=m(n.contents()),o=r.controller,s=v(r),c=y(r),l=i&&Xr(i);if(t[c]=l,o){var u=g(o,W({},l,{$scope:t,$element:n}));s&&(t[s]=u,t[s][c]=l),n.data("$ngControllerController",u),n.children().data("$ngControllerController",u),li(b,_,u,t,r)}if(D(r.component))var f=Be(r.component),d=new RegExp("^(x-|data-)?"+f+"$","i"),h=t.$watch(function(){var e=[].slice.call(n[0].children).filter(function(e){return e&&e.tagName&&d.exec(e.tagName)});return e&&A.element(e).data("$"+r.component+"Controller")},function(e){e&&(li(b,_,e,t,r),h())});a(t)}}}}Vr=["$uiRouter","$timeout",function(d,h){var p=d.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(e,t,n,r){var i,a=ti(t),o=r[1]||r[0],s=null,c={},l=function(){return ei(p,t,c)},u=Zr(n.uiSref);function f(){var e=l();s&&s(),o&&(s=o.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&n.$set(a.attr,e.href)}c.uiState=u.state,c.uiStateOpts=n.uiSrefOpts?e.$eval(n.uiSrefOpts):{},u.paramExpr&&(e.$watch(u.paramExpr,function(e){c.uiStateParams=W({},e),f()},!0),c.uiStateParams=W({},e.$eval(u.paramExpr))),f(),e.$on("$destroy",d.stateRegistry.onStatesChanged(f)),e.$on("$destroy",d.transitionService.onSuccess({},f)),a.clickable&&(i=ni(t,p,h,a,l),ri(t,e,i,c.uiStateOpts))}}}],Yr=["$uiRouter","$timeout",function(h,p){var m=h.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,e,r,t){var i,a=ti(e),o=t[1]||t[0],s=null,c={},l=function(){return ei(m,e,c)},u=["uiState","uiStateParams","uiStateOpts"],f=u.reduce(function(e,t){return e[t]=V,e},{});function d(){var e=l();s&&s(),o&&(s=o.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&r.$set(a.attr,e.href)}u.forEach(function(t){c[t]=r[t]?n.$eval(r[t]):null,r.$observe(t,function(e){f[t](),f[t]=n.$watch(e,function(e){c[t]=e,d()},!0)})}),d(),n.$on("$destroy",h.stateRegistry.onStatesChanged(d)),n.$on("$destroy",h.transitionService.onSuccess({},d)),a.clickable&&(i=ni(e,m,p,a,l),ri(e,n,i,c.uiStateOpts))}}}],Kr=["$state","$stateParams","$interpolate","$uiRouter",function(p,e,m,g){return{restrict:"A",controller:["$scope","$element","$attrs",function(s,c,e){var l,r,t,n,i,u=[];l=m(e.uiSrefActiveEq||"",!1)(s);try{r=s.$eval(e.uiSrefActive)}catch(e){}function a(e){e.promise.then(h,V)}function o(){f(r)}function f(e){I(e)&&(u=[],H(e,function(e,t){var n=function(e,t){var n=Zr(e);d(n.state,s.$eval(n.paramExpr),t)};D(e)?n(e,t):P(e)&&H(e,function(e){n(e,t)})}))}function d(e,t,n){var r={state:p.get(e,Jr(c))||{name:e},params:t,activeClass:n};return u.push(r),function(){Z(u)(r)}}function h(){var t=function(e){return e.split(/\s/).filter(z)},e=function(e){return e.map(function(e){return e.activeClass}).map(t).reduce(ge,[])},n=e(u).concat(t(l)).reduce(ve,[]),r=e(u.filter(function(e){return p.includes(e.state.name,e.params)})),i=!!u.filter(function(e){return p.is(e.state.name,e.params)}).length?t(l):[],a=r.concat(i).reduce(ve,[]),o=n.filter(function(e){return!Q(a,e)});s.$evalAsync(function(){a.forEach(function(e){return c.addClass(e)}),o.forEach(function(e){return c.removeClass(e)})})}f(r=r||m(e.uiSrefActive||"",!1)(s)),this.$$addStateInfo=function(e,t){if(!(I(r)&&0<u.length)){var n=d(e,t,r);return h(),n}},s.$on("$destroy",(t=g.stateRegistry.onStatesChanged(o),n=g.transitionService.onStart({},a),i=s.$on("$stateChangeSuccess",h),function(){t(),n(),i()})),g.globals.transition&&a(g.globals.transition),h()}]}}],A.module("ui.router.state").directive("uiSref",Vr).directive("uiSrefActive",Kr).directive("uiSrefActiveEq",Kr).directive("uiState",Yr),ii.$inject=["$state"],ai.$inject=["$state"],A.module("ui.router.state").filter("isState",ii).filter("includedByState",ai),Qr=["$view","$animate","$uiViewScroll","$interpolate","$q",function(i,a,b,v,y){var w={$cfg:{viewDecl:{$context:i._pluginapi._rootViewContext()}},$uiView:{}},C={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(e,t,_){return function(o,s,e){var c,l,u,f,t,d=e.onload||"",h=e.autoscroll,p={enter:function(e,t,n){2<A.version.minor?a.enter(e,null,t).then(n):a.enter(e,null,t,n)},leave:function(e,t){2<A.version.minor?a.leave(e).then(t):a.leave(e,t)}},n=s.inheritedData("$uiView")||w,m=v(e.uiView||e.name||"")(o)||"$default",g={$type:"ng1",id:C.count++,name:m,fqn:n.$uiView.fqn?n.$uiView.fqn+"."+m:m,config:null,configUpdated:function(e){if(e&&!(e instanceof Dr))return;if(t=f,n=e,t===n)return;var t,n;mt.traceUIViewConfigUpdated(g,e&&e.viewDecl&&e.viewDecl.$context),r(f=e)},get creationContext(){var e=S("$cfg.viewDecl.$context")(n),t=S("$uiView.creationContext")(n);return e||t}};function r(e){var t=o.$new(),n=y.defer(),r=y.defer(),i={$cfg:e,$uiView:g},a={$animEnter:n.promise,$animLeave:r.promise,$$animLeave:r};t.$emit("$viewContentLoading",m),l=_(t,function(e){e.data("$uiViewAnim",a),e.data("$uiView",i),p.enter(e,s,function(){n.resolve(),u&&u.$emit("$viewContentAnimationEnded"),(T(h)&&!h||o.$eval(h))&&b(e)}),function(){if(c&&(mt.traceUIViewEvent("Removing (previous) el",c.data("$uiView")),c.remove(),c=null),u&&(mt.traceUIViewEvent("Destroying scope",g),u.$destroy(),u=null),l){var e=l.data("$uiViewAnim");mt.traceUIViewEvent("Animate out",e),p.leave(l,function(){e.$$animLeave.resolve(),c=null}),c=l,l=null}}()}),(u=t).$emit("$viewContentLoaded",e||f),u.$eval(d)}mt.traceUIViewEvent("Linking",g),s.data("$uiView",{$uiView:g}),r(),t=i.registerUIView(g),o.$on("$destroy",function(){mt.traceUIViewEvent("Destroying/Unregistering",g),t()})}}};return C}],oi.$inject=["$compile","$controller","$transitions","$view","$q","$timeout"];var si="function"==typeof A.module("ui.router").component,ci=0;function li(r,e,l,t,n){!k(l.$onInit)||(n.viewDecl.component||n.viewDecl.componentProvider)&&si||l.$onInit();var u=Ee(n.path).state.self,i={bind:l};if(k(l.uiOnParamsChanged)){var f=new Nt(n.path).getResolvable("$transition$").data;t.$on("$destroy",e.onSuccess({},function(e){if(e!==f&&-1===e.exiting().indexOf(u)){var n=e.params("to"),r=e.params("from"),t=function(e){return e.paramSchema},i=e.treeChanges("to").map(t).reduce(ge,[]),a=e.treeChanges("from").map(t).reduce(ge,[]),o=i.filter(function(e){var t=a.indexOf(e);return-1===t||!a[t].type.equals(n[e.id],r[e.id])});if(o.length){var s=o.map(function(e){return e.id}),c=le(n,function(e,t){return-1!==s.indexOf(t)});l.uiOnParamsChanged(c,e)}}},i))}if(k(l.uiCanExit)){var a=ci++,o="_uiCanExitIds",s=function(e){return!!e&&(e[o]&&!0===e[o][a]||s(e.redirectedFrom()))},c={exiting:u.name};t.$on("$destroy",e.onBefore(c,function(e){var t,n=e[o]=e[o]||{};return s(e)||(t=r.when(l.uiCanExit(e))).then(function(e){return n[a]=!1!==e}),t},i))}}A.module("ui.router.state").directive("uiView",Qr),A.module("ui.router.state").directive("uiView",oi),A.module("ui.router.state").provider("$uiViewScroll",function(){var n=!1;this.useAnchorScroll=function(){n=!0},this.$get=["$anchorScroll","$timeout",function(e,t){return n?e:function(e){return t(function(){e[0].scrollIntoView()},0,!1)}}]});m.$injector=tr,m.$q=Xn,m.BaseLocationServices=ur,m.BaseUrlRule=mn,m.BrowserLocationConfig=br,m.Glob=Re,m.HashLocationService=dr,m.HookBuilder=rn,m.MemoryLocationConfig=_r,m.MemoryLocationService=pr,m.NATIVE_INJECTOR_TOKEN=Rt,m.Ng1ViewConfig=Dr,m.Param=At,m.ParamFactory=dn,m.ParamType=gt,m.ParamTypes=St,m.PathNode=xt,m.PathUtils=Et,m.PushStateLocationService=gr,m.Queue=Ne,m.RegisteredHook=tn,m.Rejection=Fe,m.Resolvable=Pt,m.ResolveContext=Nt,m.StateBuilder=Vt,m.StateMatcher=Kt,m.StateObject=Yt,m.StateParams=Tt,m.StateProvider=$r,m.StateQueueManager=Qt,m.StateRegistry=Xt,m.StateService=Qn,m.TargetState=kt,m.Trace=pt,m.Transition=on,m.TransitionEventType=qn,m.TransitionHook=Jt,m.TransitionService=Kn,m.UIRouter=kn,m.UIRouterGlobals=vn,m.UIRouterPluginBase=Ar,m.UrlConfig=Cn,m.UrlMatcher=un,m.UrlMatcherFactory=hn,m.UrlRouter=_n,m.UrlRouterProvider=Nr,m.UrlRuleFactory=pn,m.UrlRules=wn,m.UrlService=An,m.ViewService=bn,m._extend=Ie,m._inArray=X,m._pushTo=te,m._removeFrom=J,m.all=u,m.allTrueR=pe,m.ancestors=ae,m.and=i,m.any=d,m.anyTrueR=me,m.applyPairs=ke,m.arrayTuples=xe,m.assertFn=Se,m.assertMap=Ae,m.assertPredicate=Ce,m.beforeAfterSubstr=Ve,m.buildUrl=ar,m.compose=n,m.copy=De,m.core=Sr,m.createProxyFunctions=Y,m.curry=l,m.default="ui.router",m.defaultResolvePolicy=It,m.defaultTransOpts=Yn,m.defaults=re,m.deregAll=ne,m.eq=o,m.equals=q,m.extend=W,m.filter=le,m.find=ue,m.flatten=we,m.flattenR=_e,m.fnToString=He,m.forEach=H,m.fromJson=B,m.functionToString=Ue,m.getLocals=Xr,m.getNg1ViewConfigFactory=Tr,m.getParams=rr,m.hashLocationPlugin=yr,m.hostRegex=Ye,m.identity=z,m.inArray=Q,m.inherit=K,m.invoke=s,m.is=h,m.isArray=P,m.isDate=M,m.isDefined=T,m.isFunction=k,m.isInjectable=O,m.isNull=C,m.isNullOrUndefined=x,m.isNumber=E,m.isObject=I,m.isPromise=R,m.isRegExp=$,m.isString=D,m.isUndefined=w,m.joinNeighborsR=tt,m.kebobString=Be,m.keyValsToObjectR=nr,m.locationPluginFactory=or,m.makeEvent=nn,m.makeStub=N,m.map=de,m.mapObj=fe,m.matchState=en,m.maxLength=Ge,m.memoryLocationPlugin=Cr,m.mergeR=ie,m.ng1ViewsBuilder=kr,m.noop=V,m.not=f,m.omit=se,m.or=a,m.padString=je,m.pairs=Te,m.parse=S,m.parseUrl=ir,m.pattern=g,m.pick=oe,m.pipe=c,m.pluck=ce,m.prop=v,m.propEq=_,m.pushR=be,m.pushStateLocationPlugin=wr,m.pushTo=ee,m.removeFrom=Z,m.resolvablesBuilder=Wt,m.resolvePolicies=Dt,m.root=G,m.services=L,m.servicesPlugin=vr,m.silenceUncaughtInPromise=$e,m.silentRejection=Oe,m.splitEqual=Ze,m.splitHash=Qe,m.splitOnDelim=et,m.splitQuery=Xe,m.stringify=ze,m.stripLastPathElement=Ke,m.tail=Ee,m.toJson=U,m.trace=mt,m.trimHashVal=Je,m.uniqR=ve,m.unnest=ye,m.unnestR=ge,m.val=p,m.values=he,m.watchDigests=zr,Object.defineProperty(m,"__esModule",{value:!0})}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("angular")):"function"==typeof define&&define.amd?define(["exports","angular"],t):t((e=e||self)["@uirouter/angularjs-state-events"]={},e.angular)}(this,function(e,t){"use strict";var n=angular,r=t&&t.module?t:n;!function(){var l=r.isFunction,i=r.isString;function o(e,t){var n,r;if(Array.isArray(t)&&(n=t[0],r=t[1]),!i(n))throw new Error("invalid parameters to applyPairs");return e[n]=r,e}function s(t){if(t.options().notify&&t.valid()&&!t.ignored()){var e=t.injector(),n=e.get("$stateEvents"),r=e.get("$rootScope"),i=e.get("$state"),a=e.get("$urlRouter"),o=n.provider.enabled(),s=t.params("to"),c=t.params("from");if(o.$stateChangeSuccess){if(r.$broadcast("$stateChangeStart",t.to(),s,t.from(),c,t.options(),t).defaultPrevented)return o.$stateChangeCancel&&r.$broadcast("$stateChangeCancel",t.to(),s,t.from(),c,t.options(),t),null==i.transition&&a.update(),!1;t.onSuccess({},function(){r.$broadcast("$stateChangeSuccess",t.to(),s,t.from(),c,t.options(),t)},{priority:9999})}o.$stateChangeError&&t.promise.catch(function(e){(!e||2!==e.type&&3!==e.type)&&(r.$broadcast("$stateChangeError",t.to(),s,t.from(),c,e,t.options(),t).defaultPrevented||a.update())})}}function c(e,t,n){var r=n.get("$state"),i=n.get("$rootScope"),a=n.get("$urlRouter"),o={to:e.identifier(),toParams:e.params(),options:e.options()},s=i.$broadcast("$stateNotFound",o,t.state(),t.params());function c(){return r.target(o.to,o.toParams,o.options)}return(s.defaultPrevented||s.retry)&&a.update(),!s.defaultPrevented&&(s.retry||r.get(o.to)?s.retry&&l(s.retry.then)?s.retry.then(c):c():void 0)}function u(t){u.prototype.instance=this;var n=!1,r=["$stateChangeStart","$stateNotFound","$stateChangeSuccess","$stateChangeError"],i=r.map(function(e){return[e,!0]}).reduce(o,{});function a(){if(n)throw new Error("Cannot enable events at runtime (use $stateEventsProvider")}function e(e){return n=!0,i.$stateNotFound&&t.onInvalid(c),i.$stateChangeStart&&e.onBefore({},s,{priority:1e3}),{provider:u.prototype.instance}}this.enable=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a(),e&&e.length||(e=r),e.forEach(function(e){return i[e]=!0})},this.disable=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a(),e&&e.length||(e=r),e.forEach(function(e){return delete i[e]})},this.enabled=function(){return i},(this.$get=e).$inject=["$transitions"]}c.$inject=["$to$","$from$","$state","$rootScope","$urlRouter"],u.$inject=["$stateProvider"],r.module("ui.router.state.events",["ui.router.state"]).provider("$stateEvents",u).run(["$stateEvents",function(e){}])}(),e.$stateChangeCancel=void 0,e.$stateChangeError=void 0,e.$stateChangeStart=void 0,e.$stateChangeSuccess=void 0,e.$stateNotFound=void 0,Object.defineProperty(e,"__esModule",{value:!0})}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(x){x.ui=x.ui||{};x.ui.version="1.12.1";var i,n=0,s=Array.prototype.slice;x.cleanData=(i=x.cleanData,function(e){var t,n,r;for(r=0;null!=(n=e[r]);r++)try{(t=x._data(n,"events"))&&t.remove&&x(n).triggerHandler("remove")}catch(e){}i(e)}),x.widget=function(e,n,t){var r,i,a,o={},s=e.split(".")[0],c=s+"-"+(e=e.split(".")[1]);return t||(t=n,n=x.Widget),x.isArray(t)&&(t=x.extend.apply(null,[{}].concat(t))),x.expr[":"][c.toLowerCase()]=function(e){return!!x.data(e,c)},x[s]=x[s]||{},r=x[s][e],i=x[s][e]=function(e,t){if(!this._createWidget)return new i(e,t);arguments.length&&this._createWidget(e,t)},x.extend(i,r,{version:t.version,_proto:x.extend({},t),_childConstructors:[]}),(a=new n).options=x.widget.extend({},a.options),x.each(t,function(t,a){x.isFunction(a)?o[t]=function(){function r(){return n.prototype[t].apply(this,arguments)}function i(e){return n.prototype[t].apply(this,e)}return function(){var e,t=this._super,n=this._superApply;return this._super=r,this._superApply=i,e=a.apply(this,arguments),this._super=t,this._superApply=n,e}}():o[t]=a}),i.prototype=x.widget.extend(a,{widgetEventPrefix:r&&a.widgetEventPrefix||e},o,{constructor:i,namespace:s,widgetName:e,widgetFullName:c}),r?(x.each(r._childConstructors,function(e,t){var n=t.prototype;x.widget(n.namespace+"."+n.widgetName,i,t._proto)}),delete r._childConstructors):n._childConstructors.push(i),x.widget.bridge(e,i),i},x.widget.extend=function(e){for(var t,n,r=s.call(arguments,1),i=0,a=r.length;i<a;i++)for(t in r[i])n=r[i][t],r[i].hasOwnProperty(t)&&void 0!==n&&(x.isPlainObject(n)?e[t]=x.isPlainObject(e[t])?x.widget.extend({},e[t],n):x.widget.extend({},n):e[t]=n);return e},x.widget.bridge=function(a,t){var o=t.prototype.widgetFullName||a;x.fn[a]=function(n){var e="string"==typeof n,r=s.call(arguments,1),i=this;return e?this.length||"instance"!==n?this.each(function(){var e,t=x.data(this,o);return"instance"===n?(i=t,!1):t?x.isFunction(t[n])&&"_"!==n.charAt(0)?(e=t[n].apply(t,r))!==t&&void 0!==e?(i=e&&e.jquery?i.pushStack(e.get()):e,!1):void 0:x.error("no such method '"+n+"' for "+a+" widget instance"):x.error("cannot call methods on "+a+" prior to initialization; attempted to call method '"+n+"'")}):i=void 0:(r.length&&(n=x.widget.extend.apply(null,[n].concat(r))),this.each(function(){var e=x.data(this,o);e?(e.option(n||{}),e._init&&e._init()):x.data(this,o,new t(n,this))})),i}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,t){t=x(t||this.defaultElement||this)[0],this.element=x(t),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},t!==this&&(x.data(t,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===t&&this.destroy()}}),this.document=x(t.style?t.ownerDocument:t.document||t),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var n=this;this._destroy(),x.each(this.classesElementLookup,function(e,t){n._removeClass(t,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(e,t){var n,r,i,a=e;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof e)if(a={},e=(n=e.split(".")).shift(),n.length){for(r=a[e]=x.widget.extend({},this.options[e]),i=0;i<n.length-1;i++)r[n[i]]=r[n[i]]||{},r=r[n[i]];if(e=n.pop(),1===arguments.length)return void 0===r[e]?null:r[e];r[e]=t}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=t}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(e){var t,n,r;for(t in e)r=this.classesElementLookup[t],e[t]!==this.options.classes[t]&&r&&r.length&&(n=x(r.get()),this._removeClass(r,t),n.addClass(this._classes({element:n,keys:t,classes:e,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(i){var a=[],o=this;function e(e,t){var n,r;for(r=0;r<e.length;r++)n=o.classesElementLookup[e[r]]||x(),n=i.add?x(x.unique(n.get().concat(i.element.get()))):x(n.not(i.element).get()),o.classesElementLookup[e[r]]=n,a.push(e[r]),t&&i.classes[e[r]]&&a.push(i.classes[e[r]])}return i=x.extend({element:this.element,classes:this.options.classes||{}},i),this._on(i.element,{remove:"_untrackClassesElement"}),i.keys&&e(i.keys.match(/\S+/g)||[],!0),i.extra&&e(i.extra.match(/\S+/g)||[]),a.join(" ")},_untrackClassesElement:function(n){var r=this;x.each(r.classesElementLookup,function(e,t){-1!==x.inArray(n.target,t)&&(r.classesElementLookup[e]=x(t.not(n.target).get()))})},_removeClass:function(e,t,n){return this._toggleClass(e,t,n,!1)},_addClass:function(e,t,n){return this._toggleClass(e,t,n,!0)},_toggleClass:function(e,t,n,r){r="boolean"==typeof r?r:n;var i="string"==typeof e||null===e,a={extra:i?t:n,keys:i?e:t,element:i?this.element:e,add:r};return a.element.toggleClass(this._classes(a),r),this},_on:function(o,s,e){var c,l=this;"boolean"!=typeof o&&(e=s,s=o,o=!1),e?(s=c=x(s),this.bindings=this.bindings.add(s)):(e=s,s=this.element,c=this.widget()),x.each(e,function(e,t){function n(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof t?l[t]:t).apply(l,arguments)}"string"!=typeof t&&(n.guid=t.guid=t.guid||n.guid||x.guid++);var r=e.match(/^([\w:-]*)\s*(.*)$/),i=r[1]+l.eventNamespace,a=r[2];a?c.on(i,a,n):s.on(i,n)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(t).off(t),this.bindings=x(this.bindings.not(e).get()),this.focusable=x(this.focusable.not(e).get()),this.hoverable=x(this.hoverable.not(e).get())},_delay:function(e,t){var n=this;return setTimeout(function(){return("string"==typeof e?n[e]:e).apply(n,arguments)},t||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(x(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(x(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(x(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(x(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,t,n){var r,i,a=this.options[e];if(n=n||{},(t=x.Event(t)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),t.target=this.element[0],i=t.originalEvent)for(r in i)r in t||(t[r]=i[r]);return this.element.trigger(t,n),!(x.isFunction(a)&&!1===a.apply(this.element[0],[t].concat(n))||t.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(a,o){x.Widget.prototype["_"+a]=function(t,e,n){var r;"string"==typeof e&&(e={effect:e});var i=e?!0===e||"number"==typeof e?o:e.effect||o:a;"number"==typeof(e=e||{})&&(e={duration:e}),r=!x.isEmptyObject(e),e.complete=n,e.delay&&t.delay(e.delay),r&&x.effects&&x.effects.effect[i]?t[a](e):i!==a&&t[i]?t[i](e.duration,e.easing,n):t.queue(function(e){x(this)[a](),n&&n.call(t[0]),e()})}});x.widget;!function(){var i,C=Math.max,A=Math.abs,r=/left|center|right/,a=/top|center|bottom/,o=/[\+\-]\d+(\.[\d]+)?%?/,s=/^\w+/,c=/%$/,l=x.fn.position;function S(e,t,n){return[parseFloat(e[0])*(c.test(e[0])?t/100:1),parseFloat(e[1])*(c.test(e[1])?n/100:1)]}function T(e,t){return parseInt(x.css(e,t),10)||0}x.position={scrollbarWidth:function(){if(void 0!==i)return i;var e,t,n=x("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=n.children()[0];return x("body").append(n),e=r.offsetWidth,n.css("overflow","scroll"),e===(t=r.offsetWidth)&&(t=n[0].clientWidth),n.remove(),i=e-t},getScrollInfo:function(e){var t=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),r="scroll"===t||"auto"===t&&e.width<e.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight?x.position.scrollbarWidth():0,height:r?x.position.scrollbarWidth():0}},getWithinInfo:function(e){var t=x(e||window),n=x.isWindow(t[0]),r=!!t[0]&&9===t[0].nodeType;return{element:t,isWindow:n,isDocument:r,offset:!n&&!r?x(e).offset():{left:0,top:0},scrollLeft:t.scrollLeft(),scrollTop:t.scrollTop(),width:t.outerWidth(),height:t.outerHeight()}}},x.fn.position=function(f){if(!f||!f.of)return l.apply(this,arguments);f=x.extend({},f);var d,h,p,m,g,e,t,n,_=x(f.of),b=x.position.getWithinInfo(f.within),v=x.position.getScrollInfo(b),y=(f.collision||"flip").split(" "),w={};return e=9===(n=(t=_)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:x.isWindow(n)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},_[0].preventDefault&&(f.at="left top"),h=e.width,p=e.height,m=e.offset,g=x.extend({},m),x.each(["my","at"],function(){var e,t,n=(f[this]||"").split(" ");1===n.length&&(n=r.test(n[0])?n.concat(["center"]):a.test(n[0])?["center"].concat(n):["center","center"]),n[0]=r.test(n[0])?n[0]:"center",n[1]=a.test(n[1])?n[1]:"center",e=o.exec(n[0]),t=o.exec(n[1]),w[this]=[e?e[0]:0,t?t[0]:0],f[this]=[s.exec(n[0])[0],s.exec(n[1])[0]]}),1===y.length&&(y[1]=y[0]),"right"===f.at[0]?g.left+=h:"center"===f.at[0]&&(g.left+=h/2),"bottom"===f.at[1]?g.top+=p:"center"===f.at[1]&&(g.top+=p/2),d=S(w.at,h,p),g.left+=d[0],g.top+=d[1],this.each(function(){var n,e,o=x(this),s=o.outerWidth(),c=o.outerHeight(),t=T(this,"marginLeft"),r=T(this,"marginTop"),i=s+t+T(this,"marginRight")+v.width,a=c+r+T(this,"marginBottom")+v.height,l=x.extend({},g),u=S(w.my,o.outerWidth(),o.outerHeight());"right"===f.my[0]?l.left-=s:"center"===f.my[0]&&(l.left-=s/2),"bottom"===f.my[1]?l.top-=c:"center"===f.my[1]&&(l.top-=c/2),l.left+=u[0],l.top+=u[1],n={marginLeft:t,marginTop:r},x.each(["left","top"],function(e,t){x.ui.position[y[e]]&&x.ui.position[y[e]][t](l,{targetWidth:h,targetHeight:p,elemWidth:s,elemHeight:c,collisionPosition:n,collisionWidth:i,collisionHeight:a,offset:[d[0]+u[0],d[1]+u[1]],my:f.my,at:f.at,within:b,elem:o})}),f.using&&(e=function(e){var t=m.left-l.left,n=t+h-s,r=m.top-l.top,i=r+p-c,a={target:{element:_,left:m.left,top:m.top,width:h,height:p},element:{element:o,left:l.left,top:l.top,width:s,height:c},horizontal:n<0?"left":0<t?"right":"center",vertical:i<0?"top":0<r?"bottom":"middle"};h<s&&A(t+n)<h&&(a.horizontal="center"),p<c&&A(r+i)<p&&(a.vertical="middle"),C(A(t),A(n))>C(A(r),A(i))?a.important="horizontal":a.important="vertical",f.using.call(this,e,a)}),o.offset(x.extend(l,{using:e}))})},x.ui.position={fit:{left:function(e,t){var n,r=t.within,i=r.isWindow?r.scrollLeft:r.offset.left,a=r.width,o=e.left-t.collisionPosition.marginLeft,s=i-o,c=o+t.collisionWidth-a-i;t.collisionWidth>a?0<s&&c<=0?(n=e.left+s+t.collisionWidth-a-i,e.left+=s-n):e.left=0<c&&s<=0?i:c<s?i+a-t.collisionWidth:i:0<s?e.left+=s:0<c?e.left-=c:e.left=C(e.left-o,e.left)},top:function(e,t){var n,r=t.within,i=r.isWindow?r.scrollTop:r.offset.top,a=t.within.height,o=e.top-t.collisionPosition.marginTop,s=i-o,c=o+t.collisionHeight-a-i;t.collisionHeight>a?0<s&&c<=0?(n=e.top+s+t.collisionHeight-a-i,e.top+=s-n):e.top=0<c&&s<=0?i:c<s?i+a-t.collisionHeight:i:0<s?e.top+=s:0<c?e.top-=c:e.top=C(e.top-o,e.top)}},flip:{left:function(e,t){var n,r,i=t.within,a=i.offset.left+i.scrollLeft,o=i.width,s=i.isWindow?i.scrollLeft:i.offset.left,c=e.left-t.collisionPosition.marginLeft,l=c-s,u=c+t.collisionWidth-o-s,f="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,d="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,h=-2*t.offset[0];l<0?((n=e.left+f+d+h+t.collisionWidth-o-a)<0||n<A(l))&&(e.left+=f+d+h):0<u&&(0<(r=e.left-t.collisionPosition.marginLeft+f+d+h-s)||A(r)<u)&&(e.left+=f+d+h)},top:function(e,t){var n,r,i=t.within,a=i.offset.top+i.scrollTop,o=i.height,s=i.isWindow?i.scrollTop:i.offset.top,c=e.top-t.collisionPosition.marginTop,l=c-s,u=c+t.collisionHeight-o-s,f="top"===t.my[1]?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,d="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,h=-2*t.offset[1];l<0?((r=e.top+f+d+h+t.collisionHeight-o-a)<0||r<A(l))&&(e.top+=f+d+h):0<u&&(0<(n=e.top-t.collisionPosition.marginTop+f+d+h-s)||A(n)<u)&&(e.top+=f+d+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}}}();x.ui.position,x.extend(x.expr[":"],{data:x.expr.createPseudo?x.expr.createPseudo(function(t){return function(e){return!!x.data(e,t)}}):function(e,t,n){return!!x.data(e,n[3])}}),x.fn.extend({disableSelection:(e="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(e+".ui-disableSelection",function(e){e.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});var e,r,c="ui-effects-",l="ui-effects-style",f="ui-effects-animated",u=x;x.effects={effect:{}},function(u,f){var l,d=/^([\-+])=\s*(\d+\.?\d*)/,e=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],h=u.Color=function(e,t,n,r){return new u.Color.fn.parse(e,t,n,r)},p={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},m={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},o=h.support={},t=u("<p>")[0],g=u.each;function _(e,t,n){var r=m[t.type]||{};return null==e?n||!t.def?null:t.def:(e=r.floor?~~e:parseFloat(e),isNaN(e)?t.def:r.mod?(e+r.mod)%r.mod:e<0?0:r.max<e?r.max:e)}function s(o){var s=h(),c=s._rgba=[];return o=o.toLowerCase(),g(e,function(e,t){var n,r=t.re.exec(o),i=r&&t.parse(r),a=t.space||"rgba";if(i)return n=s[a](i),s[p[a].cache]=n[p[a].cache],c=s._rgba=n._rgba,!1}),c.length?("0,0,0,0"===c.join()&&u.extend(c,l.transparent),s):l[o]}function c(e,t,n){return 6*(n=(n+1)%1)<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}t.style.cssText="background-color:rgba(1,1,1,.5)",o.rgba=-1<t.style.backgroundColor.indexOf("rgba"),g(p,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),h.fn=u.extend(h.prototype,{parse:function(i,e,t,n){if(i===f)return this._rgba=[null,null,null,null],this;(i.jquery||i.nodeType)&&(i=u(i).css(e),e=f);var a=this,r=u.type(i),o=this._rgba=[];return e!==f&&(i=[i,e,t,n],r="array"),"string"===r?this.parse(s(i)||l._default):"array"===r?(g(p.rgba.props,function(e,t){o[t.idx]=_(i[t.idx],t)}),this):"object"===r?(g(p,i instanceof h?function(e,t){i[t.cache]&&(a[t.cache]=i[t.cache].slice())}:function(e,n){var r=n.cache;g(n.props,function(e,t){if(!a[r]&&n.to){if("alpha"===e||null==i[e])return;a[r]=n.to(a._rgba)}a[r][t.idx]=_(i[e],t,!0)}),a[r]&&u.inArray(null,a[r].slice(0,3))<0&&(a[r][3]=1,n.from&&(a._rgba=n.from(a[r])))}),this):void 0},is:function(e){var i=h(e),a=!0,o=this;return g(p,function(e,t){var n,r=i[t.cache];return r&&(n=o[t.cache]||t.to&&t.to(o._rgba)||[],g(t.props,function(e,t){if(null!=r[t.idx])return a=r[t.idx]===n[t.idx]})),a}),a},_space:function(){var n=[],r=this;return g(p,function(e,t){r[t.cache]&&n.push(e)}),n.pop()},transition:function(e,o){var s=h(e),t=s._space(),n=p[t],r=0===this.alpha()?h("transparent"):this,c=r[n.cache]||n.to(r._rgba),l=c.slice();return s=s[n.cache],g(n.props,function(e,t){var n=t.idx,r=c[n],i=s[n],a=m[t.type]||{};null!==i&&(null===r?l[n]=i:(a.mod&&(i-r>a.mod/2?r+=a.mod:r-i>a.mod/2&&(r-=a.mod)),l[n]=_((i-r)*o+r,t)))}),this[t](l)},blend:function(e){if(1===this._rgba[3])return this;var t=this._rgba.slice(),n=t.pop(),r=h(e)._rgba;return h(u.map(t,function(e,t){return(1-n)*r[t]+n*e}))},toRgbaString:function(){var e="rgba(",t=u.map(this._rgba,function(e,t){return null==e?2<t?1:0:e});return 1===t[3]&&(t.pop(),e="rgb("),e+t.join()+")"},toHslaString:function(){var e="hsla(",t=u.map(this.hsla(),function(e,t){return null==e&&(e=2<t?1:0),t&&t<3&&(e=Math.round(100*e)+"%"),e});return 1===t[3]&&(t.pop(),e="hsl("),e+t.join()+")"},toHexString:function(e){var t=this._rgba.slice(),n=t.pop();return e&&t.push(~~(255*n)),"#"+u.map(t,function(e){return 1===(e=(e||0).toString(16)).length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,p.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,n,r=e[0]/255,i=e[1]/255,a=e[2]/255,o=e[3],s=Math.max(r,i,a),c=Math.min(r,i,a),l=s-c,u=s+c,f=.5*u;return t=c===s?0:r===s?60*(i-a)/l+360:i===s?60*(a-r)/l+120:60*(r-i)/l+240,n=0===l?0:f<=.5?l/u:l/(2-u),[Math.round(t)%360,n,f,null==o?1:o]},p.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,n=e[1],r=e[2],i=e[3],a=r<=.5?r*(1+n):r+n-r*n,o=2*r-a;return[Math.round(255*c(o,a,t+1/3)),Math.round(255*c(o,a,t)),Math.round(255*c(o,a,t-1/3)),i]},g(p,function(c,e){var n=e.props,o=e.cache,s=e.to,l=e.from;h.fn[c]=function(e){if(s&&!this[o]&&(this[o]=s(this._rgba)),e===f)return this[o].slice();var t,r=u.type(e),i="array"===r||"object"===r?e:arguments,a=this[o].slice();return g(n,function(e,t){var n=i["object"===r?e:t.idx];null==n&&(n=a[t.idx]),a[t.idx]=_(n,t)}),l?((t=h(l(a)))[o]=a,t):h(a)},g(n,function(o,s){h.fn[o]||(h.fn[o]=function(e){var t,n=u.type(e),r="alpha"===o?this._hsla?"hsla":"rgba":c,i=this[r](),a=i[s.idx];return"undefined"===n?a:("function"===n&&(e=e.call(this,a),n=u.type(e)),null==e&&s.empty?this:("string"===n&&(t=d.exec(e))&&(e=a+parseFloat(t[2])*("+"===t[1]?1:-1)),i[s.idx]=e,this[r](i)))})})}),h.hook=function(e){var t=e.split(" ");g(t,function(e,a){u.cssHooks[a]={set:function(e,t){var n,r,i="";if("transparent"!==t&&("string"!==u.type(t)||(n=s(t)))){if(t=h(n||t),!o.rgba&&1!==t._rgba[3]){for(r="backgroundColor"===a?e.parentNode:e;(""===i||"transparent"===i)&&r&&r.style;)try{i=u.css(r,"backgroundColor"),r=r.parentNode}catch(e){}t=t.blend(i&&"transparent"!==i?i:"_default")}t=t.toRgbaString()}try{e.style[a]=t}catch(e){}}},u.fx.step[a]=function(e){e.colorInit||(e.start=h(e.elem,a),e.end=h(e.end),e.colorInit=!0),u.cssHooks[a].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),u.cssHooks.borderColor={expand:function(n){var r={};return g(["Top","Right","Bottom","Left"],function(e,t){r["border"+t+"Color"]=n}),r}},l=u.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(u),function(){var a,i,o,s=["add","remove","toggle"],c={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function l(e){var t,n,r=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,i={};if(r&&r.length&&r[0]&&r[r[0]])for(n=r.length;n--;)"string"==typeof r[t=r[n]]&&(i[x.camelCase(t)]=r[t]);else for(t in r)"string"==typeof r[t]&&(i[t]=r[t]);return i}x.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,t){x.fx.step[t]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(u.style(e.elem,t,e.end),e.setAttr=!0)}}),x.fn.addBack||(x.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),x.effects.animateClass=function(i,e,t,n){var a=x.speed(e,t,n);return this.queue(function(){var e,n=x(this),t=n.attr("class")||"",r=a.children?n.find("*").addBack():n;r=r.map(function(){return{el:x(this),start:l(this)}}),(e=function(){x.each(s,function(e,t){i[t]&&n[t+"Class"](i[t])})})(),r=r.map(function(){return this.end=l(this.el[0]),this.diff=function(e,t){var n,r,i={};for(n in t)r=t[n],e[n]!==r&&(c[n]||!x.fx.step[n]&&isNaN(parseFloat(r))||(i[n]=r));return i}(this.start,this.end),this}),n.attr("class",t),r=r.map(function(){var e=this,t=x.Deferred(),n=x.extend({},a,{queue:!1,complete:function(){t.resolve(e)}});return this.el.animate(this.diff,n),t.promise()}),x.when.apply(x,r.get()).done(function(){e(),x.each(arguments,function(){var t=this.el;x.each(this.diff,function(e){t.css(e,"")})}),a.complete.call(n[0])})})},x.fn.extend({addClass:(o=x.fn.addClass,function(e,t,n,r){return t?x.effects.animateClass.call(this,{add:e},t,n,r):o.apply(this,arguments)}),removeClass:(i=x.fn.removeClass,function(e,t,n,r){return 1<arguments.length?x.effects.animateClass.call(this,{remove:e},t,n,r):i.apply(this,arguments)}),toggleClass:(a=x.fn.toggleClass,function(e,t,n,r,i){return"boolean"==typeof t||void 0===t?n?x.effects.animateClass.call(this,t?{add:e}:{remove:e},n,r,i):a.apply(this,arguments):x.effects.animateClass.call(this,{toggle:e},t,n,r)}),switchClass:function(e,t,n,r,i){return x.effects.animateClass.call(this,{add:t,remove:e},n,r,i)}})}(),function(){var t,n,r,i;function u(e,t,n,r){return x.isPlainObject(e)&&(e=(t=e).effect),e={effect:e},null==t&&(t={}),x.isFunction(t)&&(r=t,n=null,t={}),("number"==typeof t||x.fx.speeds[t])&&(r=n,n=t,t={}),x.isFunction(n)&&(r=n,n=null),t&&x.extend(e,t),n=n||t.duration,e.duration=x.fx.off?0:"number"==typeof n?n:n in x.fx.speeds?x.fx.speeds[n]:x.fx.speeds._default,e.complete=r||t.complete,e}function a(e){return!(e&&"number"!=typeof e&&!x.fx.speeds[e])||("string"==typeof e&&!x.effects.effect[e]||(!!x.isFunction(e)||"object"==typeof e&&!e.effect))}function o(e,t){var n=t.outerWidth(),r=t.outerHeight(),i=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(e)||["",0,n,r,0];return{top:parseFloat(i[1])||0,right:"auto"===i[2]?n:parseFloat(i[2]),bottom:"auto"===i[3]?r:parseFloat(i[3]),left:parseFloat(i[4])||0}}x.expr&&x.expr.filters&&x.expr.filters.animated&&(x.expr.filters.animated=(t=x.expr.filters.animated,function(e){return!!x(e).data(f)||t(e)})),!1!==x.uiBackCompat&&x.extend(x.effects,{save:function(e,t){for(var n=0,r=t.length;n<r;n++)null!==t[n]&&e.data(c+t[n],e[0].style[t[n]])},restore:function(e,t){for(var n,r=0,i=t.length;r<i;r++)null!==t[r]&&(n=e.data(c+t[r]),e.css(t[r],n))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},createWrapper:function(n){if(n.parent().is(".ui-effects-wrapper"))return n.parent();var r={width:n.outerWidth(!0),height:n.outerHeight(!0),float:n.css("float")},e=x("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),t={width:n.width(),height:n.height()},i=document.activeElement;try{i.id}catch(e){i=document.body}return n.wrap(e),(n[0]===i||x.contains(n[0],i))&&x(i).trigger("focus"),e=n.parent(),"static"===n.css("position")?(e.css({position:"relative"}),n.css({position:"relative"})):(x.extend(r,{position:n.css("position"),zIndex:n.css("z-index")}),x.each(["top","left","bottom","right"],function(e,t){r[t]=n.css(t),isNaN(parseInt(r[t],10))&&(r[t]="auto")}),n.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),n.css(t),e.css(r).show()},removeWrapper:function(e){var t=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===t||x.contains(e[0],t))&&x(t).trigger("focus")),e}}),x.extend(x.effects,{version:"1.12.1",define:function(e,t,n){return n||(n=t,t="effect"),x.effects.effect[e]=n,x.effects.effect[e].mode=t,n},scaledDimensions:function(e,t,n){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var r="horizontal"!==n?(t||100)/100:1,i="vertical"!==n?(t||100)/100:1;return{height:e.height()*i,width:e.width()*r,outerHeight:e.outerHeight()*i,outerWidth:e.outerWidth()*r}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},unshift:function(e,t,n){var r=e.queue();1<t&&r.splice.apply(r,[1,0].concat(r.splice(t,n))),e.dequeue()},saveStyle:function(e){e.data(l,e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data(l)||"",e.removeData(l)},mode:function(e,t){var n=e.is(":hidden");return"toggle"===t&&(t=n?"show":"hide"),(n?"hide"===t:"show"===t)&&(t="none"),t},getBaseline:function(e,t){var n,r;switch(e[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=e[0]/t.height}switch(e[1]){case"left":r=0;break;case"center":r=.5;break;case"right":r=1;break;default:r=e[1]/t.width}return{x:r,y:n}},createPlaceholder:function(e){var t,n=e.css("position"),r=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",t=x("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(c+"placeholder",t)),e.css({position:n,left:r.left,top:r.top}),t},removePlaceholder:function(e){var t=c+"placeholder",n=e.data(t);n&&(n.remove(),e.removeData(t))},cleanUp:function(e){x.effects.restoreStyle(e),x.effects.removePlaceholder(e)},setTransition:function(r,e,i,a){return a=a||{},x.each(e,function(e,t){var n=r.cssUnit(t);0<n[0]&&(a[t]=n[0]*i+n[1])}),a}}),x.fn.extend({effect:function(){var r=u.apply(this,arguments),i=x.effects.effect[r.effect],a=i.mode,e=r.queue,t=e||"fx",o=r.complete,s=r.mode,c=[],n=function(e){var t=x(this),n=x.effects.mode(t,s)||a;t.data(f,!0),c.push(n),a&&("show"===n||n===a&&"hide"===n)&&t.show(),a&&"none"===n||x.effects.saveStyle(t),x.isFunction(e)&&e()};if(x.fx.off||!i)return s?this[s](r.duration,o):this.each(function(){o&&o.call(this)});function l(e){var t=x(this);function n(){x.isFunction(o)&&o.call(t[0]),x.isFunction(e)&&e()}r.mode=c.shift(),!1===x.uiBackCompat||a?"none"===r.mode?(t[s](),n()):i.call(t[0],r,function(){t.removeData(f),x.effects.cleanUp(t),"hide"===r.mode&&t.hide(),n()}):(t.is(":hidden")?"hide"===s:"show"===s)?(t[s](),n()):i.call(t[0],r,n)}return!1===e?this.each(n).each(l):this.queue(t,n).queue(t,l)},show:(i=x.fn.show,function(e){if(a(e))return i.apply(this,arguments);var t=u.apply(this,arguments);return t.mode="show",this.effect.call(this,t)}),hide:(r=x.fn.hide,function(e){if(a(e))return r.apply(this,arguments);var t=u.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)}),toggle:(n=x.fn.toggle,function(e){if(a(e)||"boolean"==typeof e)return n.apply(this,arguments);var t=u.apply(this,arguments);return t.mode="toggle",this.effect.call(this,t)}),cssUnit:function(e){var n=this.css(e),r=[];return x.each(["em","px","%","pt"],function(e,t){0<n.indexOf(t)&&(r=[parseFloat(n),t])}),r},cssClip:function(e){return e?this.css("clip","rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"):o(this.css("clip"),this)},transfer:function(e,t){var n=x(this),r=x(e.to),i="fixed"===r.css("position"),a=x("body"),o=i?a.scrollTop():0,s=i?a.scrollLeft():0,c=r.offset(),l={top:c.top-o,left:c.left-s,height:r.innerHeight(),width:r.innerWidth()},u=n.offset(),f=x("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-o,left:u.left-s,height:n.innerHeight(),width:n.innerWidth(),position:i?"fixed":"absolute"}).animate(l,e.duration,e.easing,function(){f.remove(),x.isFunction(t)&&t()})}}),x.fx.step.clip=function(e){e.clipInit||(e.start=x(e.elem).cssClip(),"string"==typeof e.end&&(e.end=o(e.end,e.elem)),e.clipInit=!0),x(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),r={},x.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,e){r[e]=function(e){return Math.pow(e,t+2)}}),x.extend(r,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}}),x.each(r,function(e,t){x.easing["easeIn"+e]=t,x.easing["easeOut"+e]=function(e){return 1-t(1-e)},x.easing["easeInOut"+e]=function(e){return e<.5?t(2*e)/2:1-t(-2*e+2)/2}});x.effects,x.effects.define("blind","hide",function(e,t){var n={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},r=x(this),i=e.direction||"up",a=r.cssClip(),o={clip:x.extend({},a)},s=x.effects.createPlaceholder(r);o.clip[n[i][0]]=o.clip[n[i][1]],"show"===e.mode&&(r.cssClip(o.clip),s&&s.css(x.effects.clipToBox(o)),o.clip=a),s&&s.animate(x.effects.clipToBox(o),e.duration,e.easing),r.animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),x.effects.define("bounce",function(e,t){var n,r,i,a=x(this),o=e.mode,s="hide"===o,c="show"===o,l=e.direction||"up",u=e.distance,f=e.times||5,d=2*f+(c||s?1:0),h=e.duration/d,p=e.easing,m="up"===l||"down"===l?"top":"left",g="up"===l||"left"===l,_=0,b=a.queue().length;for(x.effects.createPlaceholder(a),i=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),c&&((r={opacity:1})[m]=i,a.css("opacity",0).css(m,g?2*-u:2*u).animate(r,h,p)),s&&(u/=Math.pow(2,f-1)),(r={})[m]=i;_<f;_++)(n={})[m]=(g?"-=":"+=")+u,a.animate(n,h,p).animate(r,h,p),u=s?2*u:u/2;s&&((n={opacity:0})[m]=(g?"-=":"+=")+u,a.animate(n,h,p)),a.queue(t),x.effects.unshift(a,b,d+1)}),x.effects.define("clip","hide",function(e,t){var n,r={},i=x(this),a=e.direction||"vertical",o="both"===a,s=o||"horizontal"===a,c=o||"vertical"===a;n=i.cssClip(),r.clip={top:c?(n.bottom-n.top)/2:n.top,right:s?(n.right-n.left)/2:n.right,bottom:c?(n.bottom-n.top)/2:n.bottom,left:s?(n.right-n.left)/2:n.left},x.effects.createPlaceholder(i),"show"===e.mode&&(i.cssClip(r.clip),r.clip=n),i.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),x.effects.define("drop","hide",function(e,t){var n,r=x(this),i="show"===e.mode,a=e.direction||"left",o="up"===a||"down"===a?"top":"left",s="up"===a||"left"===a?"-=":"+=",c="+="===s?"-=":"+=",l={opacity:0};x.effects.createPlaceholder(r),n=e.distance||r["top"===o?"outerHeight":"outerWidth"](!0)/2,l[o]=s+n,i&&(r.css(l),l[o]=c+n,l.opacity=1),r.animate(l,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),x.effects.define("explode","hide",function(e,t){var n,r,i,a,o,s,c=e.pieces?Math.round(Math.sqrt(e.pieces)):3,l=c,u=x(this),f="show"===e.mode,d=u.show().css("visibility","hidden").offset(),h=Math.ceil(u.outerWidth()/l),p=Math.ceil(u.outerHeight()/c),m=[];function g(){m.push(this),m.length===c*l&&(u.css({visibility:"visible"}),x(m).remove(),t())}for(n=0;n<c;n++)for(a=d.top+n*p,s=n-(c-1)/2,r=0;r<l;r++)i=d.left+r*h,o=r-(l-1)/2,u.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-r*h,top:-n*p}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h,height:p,left:i+(f?o*h:0),top:a+(f?s*p:0),opacity:f?0:1}).animate({left:i+(f?0:o*h),top:a+(f?0:s*p),opacity:f?1:0},e.duration||500,e.easing,g)}),x.effects.define("fade","toggle",function(e,t){var n="show"===e.mode;x(this).css("opacity",n?0:1).animate({opacity:n?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),x.effects.define("fold","hide",function(t,e){var n=x(this),r=t.mode,i="show"===r,a="hide"===r,o=t.size||15,s=/([0-9]+)%/.exec(o),c=!!t.horizFirst?["right","bottom"]:["bottom","right"],l=t.duration/2,u=x.effects.createPlaceholder(n),f=n.cssClip(),d={clip:x.extend({},f)},h={clip:x.extend({},f)},p=[f[c[0]],f[c[1]]],m=n.queue().length;s&&(o=parseInt(s[1],10)/100*p[a?0:1]),d.clip[c[0]]=o,h.clip[c[0]]=o,h.clip[c[1]]=0,i&&(n.cssClip(h.clip),u&&u.css(x.effects.clipToBox(h)),h.clip=f),n.queue(function(e){u&&u.animate(x.effects.clipToBox(d),l,t.easing).animate(x.effects.clipToBox(h),l,t.easing),e()}).animate(d,l,t.easing).animate(h,l,t.easing).queue(e),x.effects.unshift(n,m,4)}),x.effects.define("highlight","show",function(e,t){var n=x(this),r={backgroundColor:n.css("backgroundColor")};"hide"===e.mode&&(r.opacity=0),x.effects.saveStyle(n),n.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),x.effects.define("size",function(i,t){var e,a,n,r=x(this),o=["fontSize"],s=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],c=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],l=i.mode,u="effect"!==l,f=i.scale||"both",d=i.origin||["middle","center"],h=r.css("position"),p=r.position(),m=x.effects.scaledDimensions(r),g=i.from||m,_=i.to||x.effects.scaledDimensions(r,0);x.effects.createPlaceholder(r),"show"===l&&(n=g,g=_,_=n),a={from:{y:g.height/m.height,x:g.width/m.width},to:{y:_.height/m.height,x:_.width/m.width}},"box"!==f&&"both"!==f||(a.from.y!==a.to.y&&(g=x.effects.setTransition(r,s,a.from.y,g),_=x.effects.setTransition(r,s,a.to.y,_)),a.from.x!==a.to.x&&(g=x.effects.setTransition(r,c,a.from.x,g),_=x.effects.setTransition(r,c,a.to.x,_))),"content"!==f&&"both"!==f||a.from.y!==a.to.y&&(g=x.effects.setTransition(r,o,a.from.y,g),_=x.effects.setTransition(r,o,a.to.y,_)),d&&(e=x.effects.getBaseline(d,m),g.top=(m.outerHeight-g.outerHeight)*e.y+p.top,g.left=(m.outerWidth-g.outerWidth)*e.x+p.left,_.top=(m.outerHeight-_.outerHeight)*e.y+p.top,_.left=(m.outerWidth-_.outerWidth)*e.x+p.left),r.css(g),"content"!==f&&"both"!==f||(s=s.concat(["marginTop","marginBottom"]).concat(o),c=c.concat(["marginLeft","marginRight"]),r.find("*[width]").each(function(){var e=x(this),t=x.effects.scaledDimensions(e),n={height:t.height*a.from.y,width:t.width*a.from.x,outerHeight:t.outerHeight*a.from.y,outerWidth:t.outerWidth*a.from.x},r={height:t.height*a.to.y,width:t.width*a.to.x,outerHeight:t.height*a.to.y,outerWidth:t.width*a.to.x};a.from.y!==a.to.y&&(n=x.effects.setTransition(e,s,a.from.y,n),r=x.effects.setTransition(e,s,a.to.y,r)),a.from.x!==a.to.x&&(n=x.effects.setTransition(e,c,a.from.x,n),r=x.effects.setTransition(e,c,a.to.x,r)),u&&x.effects.saveStyle(e),e.css(n),e.animate(r,i.duration,i.easing,function(){u&&x.effects.restoreStyle(e)})})),r.animate(_,{queue:!1,duration:i.duration,easing:i.easing,complete:function(){var e=r.offset();0===_.opacity&&r.css("opacity",g.opacity),u||(r.css("position","static"===h?"relative":h).offset(e),x.effects.saveStyle(r)),t()}})}),x.effects.define("scale",function(e,t){var n=x(this),r=e.mode,i=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==r?0:100),a=x.extend(!0,{from:x.effects.scaledDimensions(n),to:x.effects.scaledDimensions(n,i,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),x.effects.effect.size.call(this,a,t)}),x.effects.define("puff","hide",function(e,t){var n=x.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});x.effects.effect.scale.call(this,n,t)}),x.effects.define("pulsate","show",function(e,t){var n=x(this),r=e.mode,i="show"===r,a=i||"hide"===r,o=2*(e.times||5)+(a?1:0),s=e.duration/o,c=0,l=1,u=n.queue().length;for(!i&&n.is(":visible")||(n.css("opacity",0).show(),c=1);l<o;l++)n.animate({opacity:c},s,e.easing),c=1-c;n.animate({opacity:c},s,e.easing),n.queue(t),x.effects.unshift(n,u,o+1)}),x.effects.define("shake",function(e,t){var n=1,r=x(this),i=e.direction||"left",a=e.distance||20,o=e.times||3,s=2*o+1,c=Math.round(e.duration/s),l="up"===i||"down"===i?"top":"left",u="up"===i||"left"===i,f={},d={},h={},p=r.queue().length;for(x.effects.createPlaceholder(r),f[l]=(u?"-=":"+=")+a,d[l]=(u?"+=":"-=")+2*a,h[l]=(u?"-=":"+=")+2*a,r.animate(f,c,e.easing);n<o;n++)r.animate(d,c,e.easing).animate(h,c,e.easing);r.animate(d,c,e.easing).animate(f,c/2,e.easing).queue(t),x.effects.unshift(r,p,s+1)}),x.effects.define("slide","show",function(e,t){var n,r,i=x(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},o=e.mode,s=e.direction||"left",c="up"===s||"down"===s?"top":"left",l="up"===s||"left"===s,u=e.distance||i["top"===c?"outerHeight":"outerWidth"](!0),f={};x.effects.createPlaceholder(i),n=i.cssClip(),r=i.position()[c],f[c]=(l?-1:1)*u+r,f.clip=i.cssClip(),f.clip[a[s][1]]=f.clip[a[s][0]],"show"===o&&(i.cssClip(f.clip),i.css(c,f[c]),f.clip=n,f[c]=r),i.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:t})});!1!==x.uiBackCompat&&x.effects.define("transfer",function(e,t){x(this).transfer(e,t)});x.ui.focusable=function(e,t){var n,r,i,a,o,s=e.nodeName.toLowerCase();return"area"===s?(r=(n=e.parentNode).name,!(!e.href||!r||"map"!==n.nodeName.toLowerCase())&&(0<(i=x("img[usemap='#"+r+"']")).length&&i.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(s)?(a=!e.disabled)&&(o=x(e).closest("fieldset")[0])&&(a=!o.disabled):a="a"===s&&e.href||t,a&&x(e).is(":visible")&&function(e){var t=e.css("visibility");for(;"inherit"===t;)e=e.parent(),t=e.css("visibility");return"hidden"!==t}(x(e)))},x.extend(x.expr[":"],{focusable:function(e){return x.ui.focusable(e,null!=x.attr(e,"tabindex"))}});x.ui.focusable,x.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},x.ui.formResetMixin={_formResetHandler:function(){var t=x(this);setTimeout(function(){var e=t.data("ui-form-reset-instances");x.each(e,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var e=this.form.data("ui-form-reset-instances")||[];e.length||this.form.on("reset.ui-form-reset",this._formResetHandler),e.push(this),this.form.data("ui-form-reset-instances",e)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(x.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}};"1.7"===x.fn.jquery.substring(0,3)&&(x.each(["Width","Height"],function(e,n){var i="Width"===n?["Left","Right"]:["Top","Bottom"],r=n.toLowerCase(),a={innerWidth:x.fn.innerWidth,innerHeight:x.fn.innerHeight,outerWidth:x.fn.outerWidth,outerHeight:x.fn.outerHeight};function o(e,t,n,r){return x.each(i,function(){t-=parseFloat(x.css(e,"padding"+this))||0,n&&(t-=parseFloat(x.css(e,"border"+this+"Width"))||0),r&&(t-=parseFloat(x.css(e,"margin"+this))||0)}),t}x.fn["inner"+n]=function(e){return void 0===e?a["inner"+n].call(this):this.each(function(){x(this).css(r,o(this,e)+"px")})},x.fn["outer"+n]=function(e,t){return"number"!=typeof e?a["outer"+n].call(this,e):this.each(function(){x(this).css(r,o(this,e,!0,t)+"px")})}}),x.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))});var t,a;x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},x.ui.escapeSelector=(t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,function(e){return e.replace(t,"\\$1")}),x.fn.labels=function(){var e,t,n,r,i;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(r=this.eq(0).parents("label"),(n=this.attr("id"))&&(i=(e=this.eq(0).parents().last()).add(e.length?e.siblings():this.siblings()),t="label[for='"+x.ui.escapeSelector(n)+"']",r=r.add(i.find(t).addBack(t))),this.pushStack(r))},x.fn.scrollParent=function(e){var t=this.css("position"),n="absolute"===t,r=e?/(auto|scroll|hidden)/:/(auto|scroll)/,i=this.parents().filter(function(){var e=x(this);return(!n||"static"!==e.css("position"))&&r.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==t&&i.length?i:x(this[0].ownerDocument||document)},x.extend(x.expr[":"],{tabbable:function(e){var t=x.attr(e,"tabindex"),n=null!=t;return(!n||0<=t)&&x.ui.focusable(e,n)}}),x.fn.extend({uniqueId:(a=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}}),x.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=x(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():x()}},_createIcons:function(){var e,t,n=this.options.icons;n&&(e=x("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+n.header),e.prependTo(this.headers),t=this.active.children(".ui-accordion-header-icon"),this._removeClass(t,n.header)._addClass(t,null,n.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){"active"!==e?("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons())):this._activate(t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!e)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var t=x.ui.keyCode,n=this.headers.length,r=this.headers.index(e.target),i=!1;switch(e.keyCode){case t.RIGHT:case t.DOWN:i=this.headers[(r+1)%n];break;case t.LEFT:case t.UP:i=this.headers[(r-1+n)%n];break;case t.SPACE:case t.ENTER:this._eventHandler(e);break;case t.HOME:i=this.headers[0];break;case t.END:i=this.headers[n-1]}i&&(x(e.target).attr("tabIndex",-1),x(i).attr("tabIndex",0),x(i).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===x.ui.keyCode.UP&&e.ctrlKey&&x(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=x()):!1===e.active?this._activate(0):this.active.length&&!x.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=x()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var n,e=this.options,t=e.heightStyle,r=this.element.parent();this.active=this._findActive(e.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=x(this),t=e.uniqueId().attr("id"),n=e.next(),r=n.uniqueId().attr("id");e.attr("aria-controls",r),n.attr("aria-labelledby",t)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(e.event),"fill"===t?(n=r.height(),this.element.siblings(":visible").each(function(){var e=x(this),t=e.css("position");"absolute"!==t&&"fixed"!==t&&(n-=e.outerHeight(!0))}),this.headers.each(function(){n-=x(this).outerHeight(!0)}),this.headers.next().each(function(){x(this).height(Math.max(0,n-x(this).innerHeight()+x(this).height()))}).css("overflow","auto")):"auto"===t&&(n=0,this.headers.next().each(function(){var e=x(this).is(":visible");e||x(this).show(),n=Math.max(n,x(this).css("height","").height()),e||x(this).hide()}).height(n))},_activate:function(e){var t=this._findActive(e)[0];t!==this.active[0]&&(t=t||this.active[0],this._eventHandler({target:t,currentTarget:t,preventDefault:x.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):x()},_setupEvents:function(e){var n={keydown:"_keydown"};e&&x.each(e.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,n),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var t,n,r=this.options,i=this.active,a=x(e.currentTarget),o=a[0]===i[0],s=o&&r.collapsible,c=s?x():a.next(),l=i.next(),u={oldHeader:i,oldPanel:l,newHeader:s?x():a,newPanel:c};e.preventDefault(),o&&!r.collapsible||!1===this._trigger("beforeActivate",e,u)||(r.active=!s&&this.headers.index(a),this.active=o?x():a,this._toggle(u),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),r.icons&&(t=i.children(".ui-accordion-header-icon"),this._removeClass(t,null,r.icons.activeHeader)._addClass(t,null,r.icons.header)),o||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),r.icons&&(n=a.children(".ui-accordion-header-icon"),this._removeClass(n,null,r.icons.header)._addClass(n,null,r.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var t=e.newPanel,n=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=t,this.prevHide=n,this.options.animate?this._animate(t,n,e):(n.hide(),t.show(),this._toggleComplete(e)),n.attr({"aria-hidden":"true"}),n.prev().attr({"aria-selected":"false","aria-expanded":"false"}),t.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):t.length&&this.headers.filter(function(){return 0===parseInt(x(this).attr("tabIndex"),10)}).attr("tabIndex",-1),t.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,n,t){var r,i,a,o=this,s=0,c=e.css("box-sizing"),l=e.length&&(!n.length||e.index()<n.index()),u=this.options.animate||{},f=l&&u.down||u,d=function(){o._toggleComplete(t)};return"number"==typeof f&&(a=f),"string"==typeof f&&(i=f),i=i||f.easing||u.easing,a=a||f.duration||u.duration,n.length?e.length?(r=e.show().outerHeight(),n.animate(this.hideProps,{duration:a,easing:i,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(this.showProps,{duration:a,easing:i,complete:d,step:function(e,t){t.now=Math.round(e),"height"!==t.prop?"content-box"===c&&(s+=t.now):"content"!==o.options.heightStyle&&(t.now=Math.round(r-n.outerHeight()-s),s=0)}})):n.animate(this.hideProps,a,i,d):e.animate(this.showProps,a,i,d)},_toggleComplete:function(e){var t=e.oldPanel,n=t.prev();this._removeClass(t,"ui-accordion-content-active"),this._removeClass(n,"ui-accordion-header-active")._addClass(n,"ui-accordion-header-collapsed"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),x.ui.safeActiveElement=function(t){var n;try{n=t.activeElement}catch(e){n=t.body}return n||(n=t.body),n.nodeName||(n=t.body),n},x.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(e){var t=x(e.target),n=x(x.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&t.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),t.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&n.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var t=x(e.target).closest(".ui-menu-item"),n=x(e.currentTarget);t[0]===n[0]&&(this._removeClass(n.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,n))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,n)},blur:function(e){this._delay(function(){!x.contains(this.element[0],x.ui.safeActiveElement(this.document[0]))&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),e.children().each(function(){var e=x(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var t,n,r,i,a=!0;switch(e.keyCode){case x.ui.keyCode.PAGE_UP:this.previousPage(e);break;case x.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case x.ui.keyCode.HOME:this._move("first","first",e);break;case x.ui.keyCode.END:this._move("last","last",e);break;case x.ui.keyCode.UP:this.previous(e);break;case x.ui.keyCode.DOWN:this.next(e);break;case x.ui.keyCode.LEFT:this.collapse(e);break;case x.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case x.ui.keyCode.ENTER:case x.ui.keyCode.SPACE:this._activate(e);break;case x.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,n=this.previousFilter||"",i=!1,r=96<=e.keyCode&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),r===n?i=!0:r=n+r,t=this._filterMenuItems(r),(t=i&&-1!==t.index(this.active.next())?this.active.nextAll(".ui-menu-item"):t).length||(r=String.fromCharCode(e.keyCode),t=this._filterMenuItems(r)),t.length?(this.focus(e,t),this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(e){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var e,t,n,r,i=this,a=this.options.icons.submenu,o=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),t=o.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=x(this),t=e.prev(),n=x("<span>").data("ui-menu-submenu-caret",!0);i._addClass(n,"ui-menu-icon","ui-icon "+a),t.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",t.attr("id"))}),this._addClass(t,"ui-menu","ui-widget ui-widget-content ui-front"),(e=o.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var e=x(this);i._isDivider(e)&&i._addClass(e,"ui-menu-divider","ui-widget-content")}),r=(n=e.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(r,"ui-menu-item-wrapper"),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!x.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){if("icons"===e){var n=this.element.find(".ui-menu-icon");this._removeClass(n,null,this.options.icons.submenu)._addClass(n,null,t.submenu)}this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",String(e)),this._toggleClass(null,"ui-state-disabled",!!e)},focus:function(e,t){var n,r,i;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),r=this.active.children(".ui-menu-item-wrapper"),this._addClass(r,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",r.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(n=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(e){var t,n,r,i,a,o;this._hasScroll()&&(t=parseFloat(x.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(x.css(this.activeMenu[0],"paddingTop"))||0,r=e.offset().top-this.activeMenu.offset().top-t-n,i=this.activeMenu.scrollTop(),a=this.activeMenu.height(),o=e.outerHeight(),r<0?this.activeMenu.scrollTop(i+r):a<r+o&&this.activeMenu.scrollTop(i+r-a+o))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",e,{item:this.active}),this.active=null)},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(e){var t=x.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(t)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var e=n?this.element:x(t&&t.target).closest(this.element.find(".ui-menu"));e.length||(e=this.element),this._close(e),this.blur(t),this._removeClass(e.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=e},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!x(e.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,n){var r;this.active&&(r="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),r&&r.length&&this.active||(r=this.activeMenu.find(this.options.items)[t]()),this.focus(n,r)},nextPage:function(e){var t,n,r;this.active?this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,r=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(t=x(this)).offset().top-n-r<0}),this.focus(e,t)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(e)},previousPage:function(e){var t,n,r;this.active?this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,r=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return 0<(t=x(this)).offset().top-n+r}),this.focus(e,t)):this.focus(e,this.activeMenu.find(this.options.items).first())):this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||x(e.target).closest(".ui-menu-item");var t={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,t)},_filterMenuItems:function(e){var t=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=new RegExp("^"+t,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return n.test(x.trim(x(this).children(".ui-menu-item-wrapper").text()))})}});x.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var n,r,i,e=this.element[0].nodeName.toLowerCase(),t="textarea"===e,a="input"===e;this.isMultiLine=t||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[t||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))r=i=n=!0;else{r=i=n=!1;var t=x.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:n=!0,this._move("previousPage",e);break;case t.PAGE_DOWN:n=!0,this._move("nextPage",e);break;case t.UP:n=!0,this._keyEvent("previous",e);break;case t.DOWN:n=!0,this._keyEvent("next",e);break;case t.ENTER:this.menu.active&&(n=!0,e.preventDefault(),this.menu.select(e));break;case t.TAB:this.menu.active&&this.menu.select(e);break;case t.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:r=!0,this._searchTimeout(e)}}},keypress:function(e){if(n)return n=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||e.preventDefault());if(!r){var t=x.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:this._move("previousPage",e);break;case t.PAGE_DOWN:this._move("nextPage",e);break;case t.UP:this._keyEvent("previous",e);break;case t.DOWN:this._keyEvent("next",e)}}},input:function(e){if(i)return i=!1,void e.preventDefault();this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),this._change(e))}}),this._initSource(),this.menu=x("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==x.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,t){var n,r;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){x(e.target).trigger(e.originalEvent)});r=t.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:r})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(r.value),(n=t.item.attr("aria-label")||r.value)&&x.trim(n).length&&(this.liveRegion.children().hide(),x("<div>").text(n).appendTo(this.liveRegion))},menuselect:function(e,t){var n=t.item.data("ui-autocomplete-item"),r=this.previous;this.element[0]!==x.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=r,this._delay(function(){this.previous=r,this.selectedItem=n})),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=x("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var t=this.menu.element[0];return e.target===this.element[0]||e.target===t||x.contains(t,e.target)},_closeOnClickOutside:function(e){this._isEventTargetInWidget(e)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?x(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var n,r,i=this;x.isArray(this.options.source)?(n=this.options.source,this.source=function(e,t){t(x.ui.autocomplete.filter(n,e.term))}):"string"==typeof this.options.source?(r=this.options.source,this.source=function(e,t){i.xhr&&i.xhr.abort(),i.xhr=x.ajax({url:r,data:e,dataType:"json",success:function(e){t(e)},error:function(){t([])}})}):this.source=this.options.source},_searchTimeout:function(r){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),t=this.menu.element.is(":visible"),n=r.altKey||r.ctrlKey||r.metaKey||r.shiftKey;e&&(!e||t||n)||(this.selectedItem=null,this.search(null,r))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):!1!==this._trigger("search",t)?this._search(e):void 0},_search:function(e){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return x.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:x.map(e,function(e){return"string"==typeof e?{label:e,value:e}:x.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var t=this.menu.element.empty();this._renderMenu(t,e),this.isNewMenu=!0,this.menu.refresh(),t.show(),this._resizeMenu(),t.position(x.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(n,e){var r=this;x.each(e,function(e,t){r._renderItemData(n,t)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(e,t){return x("<li>").append(x("<div>").text(t.label)).appendTo(e)},_move:function(e,t){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[e](t);this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())},_isContentEditable:function(e){if(!e.length)return!1;var t=e.prop("contentEditable");return"inherit"===t?this._isContentEditable(e.parent()):"true"===t}}),x.extend(x.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,t){var n=new RegExp(x.ui.autocomplete.escapeRegex(t),"i");return x.grep(e,function(e){return n.test(e.label||e.value||e)})}}),x.widget("ui.autocomplete",x.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(1<e?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),x("<div>").text(t).appendTo(this.liveRegion))}});x.ui.autocomplete;var o=/ui-corner-([a-z]){2,6}/g;x.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var o=this,s=[];x.each(this.options.items,function(i,e){var t,a={};if(e)return"controlgroupLabel"===i?((t=o.element.find(e)).each(function(){var e=x(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),o._addClass(t,null,"ui-widget ui-widget-content ui-state-default"),void(s=s.concat(t.get()))):void(x.fn[i]&&(a=o["_"+i+"Options"]?o["_"+i+"Options"]("middle"):{classes:{}},o.element.find(e).each(function(){var e=x(this),t=e[i]("instance"),n=x.widget.extend({},a);if("button"!==i||!e.parent(".ui-spinner").length){t||(t=e[i]()[i]("instance")),t&&(n.classes=o._resolveClassesValues(n.classes,t)),e[i](n);var r=e[i]("widget");x.data(r[0],"ui-controlgroup-data",t||e[i]("instance")),s.push(r[0])}})))}),this.childWidgets=x(x.unique(s)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(t){this.childWidgets.each(function(){var e=x(this).data("ui-controlgroup-data");e&&e[t]&&e[t]()})},_updateCornerClass:function(e,t){var n=this._buildSimpleOptions(t,"label").classes.label;this._removeClass(e,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(e,null,n)},_buildSimpleOptions:function(e,t){var n="vertical"===this.options.direction,r={classes:{}};return r.classes[t]={middle:"",first:"ui-corner-"+(n?"top":"left"),last:"ui-corner-"+(n?"bottom":"right"),only:"ui-corner-all"}[e],r},_spinnerOptions:function(e){var t=this._buildSimpleOptions(e,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(e){return this._buildSimpleOptions(e,"ui-button")},_checkboxradioOptions:function(e){return this._buildSimpleOptions(e,"ui-checkboxradio-label")},_selectmenuOptions:function(e){var t="vertical"===this.options.direction;return{width:!!t&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(t?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(t?"top":"left")},last:{"ui-selectmenu-button-open":t?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(t?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[e]}},_resolveClassesValues:function(n,r){var i={};return x.each(n,function(e){var t=r.options.classes[e]||"";t=x.trim(t.replace(o,"")),i[e]=(t+" "+n[e]).replace(/\s+/g," ")}),i},_setOption:function(e,t){"direction"===e&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(e,t),"disabled"!==e?this.refresh():this._callChildMethod(t?"disable":"enable")},refresh:function(){var i,a=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),i=this.childWidgets,this.options.onlyVisible&&(i=i.filter(":visible")),i.length&&(x.each(["first","last"],function(e,t){var n=i[t]().data("ui-controlgroup-data");if(n&&a["_"+n.widgetName+"Options"]){var r=a["_"+n.widgetName+"Options"](1===i.length?"only":t);r.classes=a._resolveClassesValues(r.classes,n),n.element[n.widgetName](r)}else a._updateCornerClass(i[t](),t)}),this._callChildMethod("refresh"))}});x.widget("ui.checkboxradio",[x.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,t,n=this,r=this._super()||{};return this._readType(),t=this.element.labels(),this.label=x(t[t.length-1]),this.label.length||x.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){n.originalLabel+=3===this.nodeType?x(this).text():this.outerHTML}),this.originalLabel&&(r.label=this.originalLabel),null!=(e=this.element[0].disabled)&&(r.disabled=e),r},_create:function(){var e=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),e&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||x.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e=this.element[0].name,t="input[name='"+x.ui.escapeSelector(e)+"']";return e?(this.form.length?x(this.form[0].elements).filter(t):x(t).filter(function(){return 0===x(this).form().length})).not(this.element):x([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=x(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(e,t){if("label"!==e||t){if(this._super(e,t),"disabled"===e)return this._toggleClass(this.label,null,"ui-state-disabled",t),void(this.element[0].disabled=t);this.refresh()}},_updateIcon:function(e){var t="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=x("<span>"),this.iconSpace=x("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(t+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):t+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",t),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var e=this.label.contents().not(this.element[0]);this.icon&&(e=e.not(this.icon[0])),this.iconSpace&&(e=e.not(this.iconSpace[0])),e.remove(),this.label.append(this.options.label)},refresh:function(){var e=this.element[0].checked,t=this.element[0].disabled;this._updateIcon(e),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),null!==this.options.label&&this._updateLabel(),t!==this.options.disabled&&this._setOptions({disabled:t})}}]);var d;x.ui.checkboxradio;x.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var e,t=this._super()||{};return this.isInput=this.element.is("input"),null!=(e=this.element[0].disabled)&&(t.disabled=e),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(t.label=this.originalLabel),t},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===x.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,t){var n="iconPosition"!==e,r=n?this.options.iconPosition:t,i="top"===r||"bottom"===r;this.icon?n&&this._removeClass(this.icon,null,this.options.icon):(this.icon=x("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),n&&this._addClass(this.icon,null,t),this._attachIcon(r),i?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=x("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(r))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(e){this.icon[/^(?:end|bottom)/.test(e)?"before":"after"](this.iconSpace)},_attachIcon:function(e){this.element[/^(?:end|bottom)/.test(e)?"append":"prepend"](this.icon)},_setOptions:function(e){var t=void 0===e.showLabel?this.options.showLabel:e.showLabel,n=void 0===e.icon?this.options.icon:e.icon;t||n||(e.showLabel=!0),this._super(e)},_setOption:function(e,t){"icon"===e&&(t?this._updateIcon(e,t):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===e&&this._updateIcon(e,t),"showLabel"===e&&(this._toggleClass("ui-button-icon-only",null,!t),this._updateTooltip()),"label"===e&&(this.isInput?this.element.val(t):(this.element.html(t),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(e,t),"disabled"===e&&(this._toggleClass(null,"ui-state-disabled",t),(this.element[0].disabled=t)&&this.element.blur())},refresh:function(){var e=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOptions({disabled:e}),this._updateTooltip()}}),!1!==x.uiBackCompat&&(x.widget("ui.button",x.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(e,t){"text"!==e?("showLabel"===e&&(this.options.text=t),"icon"===e&&(this.options.icons.primary=t),"icons"===e&&(t.primary?(this._super("icon",t.primary),this._super("iconPosition","beginning")):t.secondary&&(this._super("icon",t.secondary),this._super("iconPosition","end"))),this._superApply(arguments)):this._super("showLabel",t)}}),x.fn.button=(d=x.fn.button,function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?d.apply(this,arguments):(x.ui.checkboxradio||x.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}),x.fn.buttonset=function(){return x.ui.controlgroup||x.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});var h;x.ui.button;function p(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},x.extend(this._defaults,this.regional[""]),this.regional.en=x.extend(!0,{},this.regional[""]),this.regional["en-US"]=x.extend(!0,{},this.regional.en),this.dpDiv=m(x("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function m(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",t,function(){x(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&x(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&x(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",t,g)}function g(){x.datepicker._isDisabledDatepicker(h.inline?h.dpDiv.parent()[0]:h.input[0])||(x(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),x(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&x(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&x(this).addClass("ui-datepicker-next-hover"))}function _(e,t){for(var n in x.extend(e,t),t)null==t[n]&&(e[n]=t[n]);return e}x.extend(x.ui,{datepicker:{version:"1.12.1"}}),x.extend(p.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return _(this._defaults,e||{}),this},_attachDatepicker:function(e,t){var n,r,i;r="div"===(n=e.nodeName.toLowerCase())||"span"===n,e.id||(this.uuid+=1,e.id="dp"+this.uuid),(i=this._newInst(x(e),r)).settings=x.extend({},t||{}),"input"===n?this._connectDatepicker(e,i):r&&this._inlineDatepicker(e,i)},_newInst:function(e,t){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?m(x("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,t){var n=x(e);t.append=x([]),t.trigger=x([]),n.hasClass(this.markerClassName)||(this._attachments(n,t),n.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(t),x.data(e,"datepicker",t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var n,r,i,a=this._get(t,"appendText"),o=this._get(t,"isRTL");t.append&&t.append.remove(),a&&(t.append=x("<span class='"+this._appendClass+"'>"+a+"</span>"),e[o?"before":"after"](t.append)),e.off("focus",this._showDatepicker),t.trigger&&t.trigger.remove(),"focus"!==(n=this._get(t,"showOn"))&&"both"!==n||e.on("focus",this._showDatepicker),"button"!==n&&"both"!==n||(r=this._get(t,"buttonText"),i=this._get(t,"buttonImage"),t.trigger=x(this._get(t,"buttonImageOnly")?x("<img/>").addClass(this._triggerClass).attr({src:i,alt:r,title:r}):x("<button type='button'></button>").addClass(this._triggerClass).html(i?x("<img/>").attr({src:i,alt:r,title:r}):r)),e[o?"before":"after"](t.trigger),t.trigger.on("click",function(){return x.datepicker._datepickerShowing&&x.datepicker._lastInput===e[0]?x.datepicker._hideDatepicker():(x.datepicker._datepickerShowing&&x.datepicker._lastInput!==e[0]&&x.datepicker._hideDatepicker(),x.datepicker._showDatepicker(e[0])),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,n,r,i,a=new Date(2009,11,20),o=this._get(e,"dateFormat");o.match(/[DM]/)&&(t=function(e){for(i=r=n=0;i<e.length;i++)e[i].length>n&&(n=e[i].length,r=i);return r},a.setMonth(t(this._get(e,o.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(t(this._get(e,o.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),e.input.attr("size",this._formatDate(e,a).length)}},_inlineDatepicker:function(e,t){var n=x(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(t.dpDiv),x.data(e,"datepicker",t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,n,r,i){var a,o,s,c,l,u=this._dialogInst;return u||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=x("<input type='text' id='"+a+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),x("body").append(this._dialogInput),(u=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},x.data(this._dialogInput[0],"datepicker",u)),_(u.settings,r||{}),t=t&&t.constructor===Date?this._formatDate(u,t):t,this._dialogInput.val(t),this._pos=i?i.length?i:[i.pageX,i.pageY]:null,this._pos||(o=document.documentElement.clientWidth,s=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,l=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[o/2-100+c,s/2-150+l]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),u.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),x.blockUI&&x.blockUI(this.dpDiv),x.data(this._dialogInput[0],"datepicker",u),this},_destroyDatepicker:function(e){var t,n=x(e),r=x.data(e,"datepicker");n.hasClass(this.markerClassName)&&(t=e.nodeName.toLowerCase(),x.removeData(e,"datepicker"),"input"===t?(r.append.remove(),r.trigger.remove(),n.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==t&&"span"!==t||n.removeClass(this.markerClassName).empty(),h===r&&(h=null))},_enableDatepicker:function(t){var e,n,r=x(t),i=x.data(t,"datepicker");r.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!1,i.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==e&&"span"!==e||((n=r.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=x.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var e,n,r=x(t),i=x.data(t,"datepicker");r.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!0,i.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==e&&"span"!==e||((n=r.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=x.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(e){try{return x.data(e,"datepicker")}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,n){var r,i,a,o,s=this._getInst(e);if(2===arguments.length&&"string"==typeof t)return"defaults"===t?x.extend({},x.datepicker._defaults):s?"all"===t?x.extend({},s.settings):this._get(s,t):null;r=t||{},"string"==typeof t&&((r={})[t]=n),s&&(this._curInst===s&&this._hideDatepicker(),i=this._getDateDatepicker(e,!0),a=this._getMinMaxDate(s,"min"),o=this._getMinMaxDate(s,"max"),_(s.settings,r),null!==a&&void 0!==r.dateFormat&&void 0===r.minDate&&(s.settings.minDate=this._formatDate(s,a)),null!==o&&void 0!==r.dateFormat&&void 0===r.maxDate&&(s.settings.maxDate=this._formatDate(s,o)),"disabled"in r&&(r.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(x(e),s),this._autoSize(s),this._setDate(s,i),this._updateAlternate(s),this._updateDatepicker(s))},_changeDatepicker:function(e,t,n){this._optionDatepicker(e,t,n)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var n=this._getInst(e);n&&(this._setDate(n,t),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(e,t){var n=this._getInst(e);return n&&!n.inline&&this._setDateFromField(n,t),n?this._getDate(n):null},_doKeyDown:function(e){var t,n,r,i=x.datepicker._getInst(e.target),a=!0,o=i.dpDiv.is(".ui-datepicker-rtl");if(i._keyEvent=!0,x.datepicker._datepickerShowing)switch(e.keyCode){case 9:x.datepicker._hideDatepicker(),a=!1;break;case 13:return(r=x("td."+x.datepicker._dayOverClass+":not(."+x.datepicker._currentClass+")",i.dpDiv))[0]&&x.datepicker._selectDay(e.target,i.selectedMonth,i.selectedYear,r[0]),(t=x.datepicker._get(i,"onSelect"))?(n=x.datepicker._formatDate(i),t.apply(i.input?i.input[0]:null,[n,i])):x.datepicker._hideDatepicker(),!1;case 27:x.datepicker._hideDatepicker();break;case 33:x.datepicker._adjustDate(e.target,e.ctrlKey?-x.datepicker._get(i,"stepBigMonths"):-x.datepicker._get(i,"stepMonths"),"M");break;case 34:x.datepicker._adjustDate(e.target,e.ctrlKey?+x.datepicker._get(i,"stepBigMonths"):+x.datepicker._get(i,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&x.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&x.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&x.datepicker._adjustDate(e.target,o?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&x.datepicker._adjustDate(e.target,e.ctrlKey?-x.datepicker._get(i,"stepBigMonths"):-x.datepicker._get(i,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&x.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&x.datepicker._adjustDate(e.target,o?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&x.datepicker._adjustDate(e.target,e.ctrlKey?+x.datepicker._get(i,"stepBigMonths"):+x.datepicker._get(i,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&x.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?x.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t,n,r=x.datepicker._getInst(e.target);if(x.datepicker._get(r,"constrainInput"))return t=x.datepicker._possibleChars(x.datepicker._get(r,"dateFormat")),n=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||n<" "||!t||-1<t.indexOf(n)},_doKeyUp:function(e){var t=x.datepicker._getInst(e.target);if(t.input.val()!==t.lastVal)try{x.datepicker.parseDate(x.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,x.datepicker._getFormatConfig(t))&&(x.datepicker._setDateFromField(t),x.datepicker._updateAlternate(t),x.datepicker._updateDatepicker(t))}catch(e){}return!0},_showDatepicker:function(e){var t,n,r,i,a,o,s;("input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=x("input",e.parentNode)[0]),x.datepicker._isDisabledDatepicker(e)||x.datepicker._lastInput===e)||(t=x.datepicker._getInst(e),x.datepicker._curInst&&x.datepicker._curInst!==t&&(x.datepicker._curInst.dpDiv.stop(!0,!0),t&&x.datepicker._datepickerShowing&&x.datepicker._hideDatepicker(x.datepicker._curInst.input[0])),!1!==(r=(n=x.datepicker._get(t,"beforeShow"))?n.apply(e,[e,t]):{})&&(_(t.settings,r),t.lastVal=null,x.datepicker._lastInput=e,x.datepicker._setDateFromField(t),x.datepicker._inDialog&&(e.value=""),x.datepicker._pos||(x.datepicker._pos=x.datepicker._findPos(e),x.datepicker._pos[1]+=e.offsetHeight),i=!1,x(e).parents().each(function(){return!(i|="fixed"===x(this).css("position"))}),a={left:x.datepicker._pos[0],top:x.datepicker._pos[1]},x.datepicker._pos=null,t.dpDiv.empty(),t.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),x.datepicker._updateDatepicker(t),a=x.datepicker._checkOffset(t,a,i),t.dpDiv.css({position:x.datepicker._inDialog&&x.blockUI?"static":i?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),t.inline||(o=x.datepicker._get(t,"showAnim"),s=x.datepicker._get(t,"duration"),t.dpDiv.css("z-index",function(e){for(var t,n;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&(n=parseInt(e.css("zIndex"),10),!isNaN(n)&&0!==n))return n;e=e.parent()}return 0}(x(e))+1),x.datepicker._datepickerShowing=!0,x.effects&&x.effects.effect[o]?t.dpDiv.show(o,x.datepicker._get(t,"showOptions"),s):t.dpDiv[o||"show"](o?s:null),x.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),x.datepicker._curInst=t)))},_updateDatepicker:function(e){this.maxRows=4,(h=e).dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var t,n=this._getNumberOfMonths(e),r=n[1],i=e.dpDiv.find("."+this._dayOverClass+" a");0<i.length&&g.apply(i.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<r&&e.dpDiv.addClass("ui-datepicker-multi-"+r).css("width",17*r+"em"),e.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===x.datepicker._curInst&&x.datepicker._datepickerShowing&&x.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(t=e.yearshtml,setTimeout(function(){t===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),t=e.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(e,t,n){var r=e.dpDiv.outerWidth(),i=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,o=e.input?e.input.outerHeight():0,s=document.documentElement.clientWidth+(n?0:x(document).scrollLeft()),c=document.documentElement.clientHeight+(n?0:x(document).scrollTop());return t.left-=this._get(e,"isRTL")?r-a:0,t.left-=n&&t.left===e.input.offset().left?x(document).scrollLeft():0,t.top-=n&&t.top===e.input.offset().top+o?x(document).scrollTop():0,t.left-=Math.min(t.left,t.left+r>s&&r<s?Math.abs(t.left+r-s):0),t.top-=Math.min(t.top,t.top+i>c&&i<c?Math.abs(i+o):0),t},_findPos:function(e){for(var t,n=this._getInst(e),r=this._get(n,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||x.expr.filters.hidden(e));)e=e[r?"previousSibling":"nextSibling"];return[(t=x(e).offset()).left,t.top]},_hideDatepicker:function(e){var t,n,r,i,a=this._curInst;!a||e&&a!==x.data(e,"datepicker")||this._datepickerShowing&&(t=this._get(a,"showAnim"),n=this._get(a,"duration"),r=function(){x.datepicker._tidyDialog(a)},x.effects&&(x.effects.effect[t]||x.effects[t])?a.dpDiv.hide(t,x.datepicker._get(a,"showOptions"),n,r):a.dpDiv["slideDown"===t?"slideUp":"fadeIn"===t?"fadeOut":"hide"](t?n:null,r),t||r(),this._datepickerShowing=!1,(i=this._get(a,"onClose"))&&i.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),x.blockUI&&(x.unblockUI(),x("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(x.datepicker._curInst){var t=x(e.target),n=x.datepicker._getInst(t[0]);(t[0].id===x.datepicker._mainDivId||0!==t.parents("#"+x.datepicker._mainDivId).length||t.hasClass(x.datepicker.markerClassName)||t.closest("."+x.datepicker._triggerClass).length||!x.datepicker._datepickerShowing||x.datepicker._inDialog&&x.blockUI)&&(!t.hasClass(x.datepicker.markerClassName)||x.datepicker._curInst===n)||x.datepicker._hideDatepicker()}},_adjustDate:function(e,t,n){var r=x(e),i=this._getInst(r[0]);this._isDisabledDatepicker(r[0])||(this._adjustInstDate(i,t+("M"===n?this._get(i,"showCurrentAtPos"):0),n),this._updateDatepicker(i))},_gotoToday:function(e){var t,n=x(e),r=this._getInst(n[0]);this._get(r,"gotoCurrent")&&r.currentDay?(r.selectedDay=r.currentDay,r.drawMonth=r.selectedMonth=r.currentMonth,r.drawYear=r.selectedYear=r.currentYear):(t=new Date,r.selectedDay=t.getDate(),r.drawMonth=r.selectedMonth=t.getMonth(),r.drawYear=r.selectedYear=t.getFullYear()),this._notifyChange(r),this._adjustDate(n)},_selectMonthYear:function(e,t,n){var r=x(e),i=this._getInst(r[0]);i["selected"+("M"===n?"Month":"Year")]=i["draw"+("M"===n?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(i),this._adjustDate(r)},_selectDay:function(e,t,n,r){var i,a=x(e);x(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||((i=this._getInst(a[0])).selectedDay=i.currentDay=x("a",r).html(),i.selectedMonth=i.currentMonth=t,i.selectedYear=i.currentYear=n,this._selectDate(e,this._formatDate(i,i.currentDay,i.currentMonth,i.currentYear)))},_clearDate:function(e){var t=x(e);this._selectDate(t,"")},_selectDate:function(e,t){var n,r=x(e),i=this._getInst(r[0]);t=null!=t?t:this._formatDate(i),i.input&&i.input.val(t),this._updateAlternate(i),(n=this._get(i,"onSelect"))?n.apply(i.input?i.input[0]:null,[t,i]):i.input&&i.input.trigger("change"),i.inline?this._updateDatepicker(i):(this._hideDatepicker(),this._lastInput=i.input[0],"object"!=typeof i.input[0]&&i.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var t,n,r,i=this._get(e,"altField");i&&(t=this._get(e,"altFormat")||this._get(e,"dateFormat"),n=this._getDate(e),r=this.formatDate(t,n,this._getFormatConfig(e)),x(i).val(r))},noWeekends:function(e){var t=e.getDay();return[0<t&&t<6,""]},iso8601Week:function(e){var t,n=new Date(e.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),t=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((t-n)/864e5)/7)+1},parseDate:function(n,a,e){if(null==n||null==a)throw"Invalid arguments";if(""===(a="object"==typeof a?a.toString():a+""))return null;var r,t,i,o,s=0,c=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff,l="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),u=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,f=(e?e.dayNames:null)||this._defaults.dayNames,d=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,h=(e?e.monthNames:null)||this._defaults.monthNames,p=-1,m=-1,g=-1,_=-1,b=!1,v=function(e){var t=r+1<n.length&&n.charAt(r+1)===e;return t&&r++,t},y=function(e){var t=v(e),n="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,r=new RegExp("^\\d{"+("y"===e?n:1)+","+n+"}"),i=a.substring(s).match(r);if(!i)throw"Missing number at position "+s;return s+=i[0].length,parseInt(i[0],10)},w=function(e,t,n){var r=-1,i=x.map(v(e)?n:t,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(x.each(i,function(e,t){var n=t[1];if(a.substr(s,n.length).toLowerCase()===n.toLowerCase())return r=t[0],s+=n.length,!1}),-1!==r)return r+1;throw"Unknown name at position "+s},C=function(){if(a.charAt(s)!==n.charAt(r))throw"Unexpected literal at position "+s;s++};for(r=0;r<n.length;r++)if(b)"'"!==n.charAt(r)||v("'")?C():b=!1;else switch(n.charAt(r)){case"d":g=y("d");break;case"D":w("D",u,f);break;case"o":_=y("o");break;case"m":m=y("m");break;case"M":m=w("M",d,h);break;case"y":p=y("y");break;case"@":p=(o=new Date(y("@"))).getFullYear(),m=o.getMonth()+1,g=o.getDate();break;case"!":p=(o=new Date((y("!")-this._ticksTo1970)/1e4)).getFullYear(),m=o.getMonth()+1,g=o.getDate();break;case"'":v("'")?C():b=!0;break;default:C()}if(s<a.length&&(i=a.substr(s),!/^\s+/.test(i)))throw"Extra/unparsed characters found in date: "+i;if(-1===p?p=(new Date).getFullYear():p<100&&(p+=(new Date).getFullYear()-(new Date).getFullYear()%100+(p<=l?0:-100)),-1<_)for(m=1,g=_;;){if(g<=(t=this._getDaysInMonth(p,m-1)))break;m++,g-=t}if((o=this._daylightSavingAdjust(new Date(p,m-1,g))).getFullYear()!==p||o.getMonth()+1!==m||o.getDate()!==g)throw"Invalid date";return o},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(n,e,t){if(!e)return"";var r,i=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,a=(t?t.dayNames:null)||this._defaults.dayNames,o=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,s=(t?t.monthNames:null)||this._defaults.monthNames,c=function(e){var t=r+1<n.length&&n.charAt(r+1)===e;return t&&r++,t},l=function(e,t,n){var r=""+t;if(c(e))for(;r.length<n;)r="0"+r;return r},u=function(e,t,n,r){return c(e)?r[t]:n[t]},f="",d=!1;if(e)for(r=0;r<n.length;r++)if(d)"'"!==n.charAt(r)||c("'")?f+=n.charAt(r):d=!1;else switch(n.charAt(r)){case"d":f+=l("d",e.getDate(),2);break;case"D":f+=u("D",e.getDay(),i,a);break;case"o":f+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":f+=l("m",e.getMonth()+1,2);break;case"M":f+=u("M",e.getMonth(),o,s);break;case"y":f+=c("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":f+=e.getTime();break;case"!":f+=1e4*e.getTime()+this._ticksTo1970;break;case"'":c("'")?f+="'":d=!0;break;default:f+=n.charAt(r)}return f},_possibleChars:function(n){var r,e="",t=!1,i=function(e){var t=r+1<n.length&&n.charAt(r+1)===e;return t&&r++,t};for(r=0;r<n.length;r++)if(t)"'"!==n.charAt(r)||i("'")?e+=n.charAt(r):t=!1;else switch(n.charAt(r)){case"d":case"m":case"y":case"@":e+="0123456789";break;case"D":case"M":return null;case"'":i("'")?e+="'":t=!0;break;default:e+=n.charAt(r)}return e},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var n=this._get(e,"dateFormat"),r=e.lastVal=e.input?e.input.val():null,i=this._getDefaultDate(e),a=i,o=this._getFormatConfig(e);try{a=this.parseDate(n,r,o)||i}catch(e){r=t?"":r}e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),e.currentDay=r?a.getDate():0,e.currentMonth=r?a.getMonth():0,e.currentYear=r?a.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(s,e,t){var n,r,i=null==e||""===e?t:"string"==typeof e?function(e){try{return x.datepicker.parseDate(x.datepicker._get(s,"dateFormat"),e,x.datepicker._getFormatConfig(s))}catch(e){}for(var t=(e.toLowerCase().match(/^c/)?x.datepicker._getDate(s):null)||new Date,n=t.getFullYear(),r=t.getMonth(),i=t.getDate(),a=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,o=a.exec(e);o;){switch(o[2]||"d"){case"d":case"D":i+=parseInt(o[1],10);break;case"w":case"W":i+=7*parseInt(o[1],10);break;case"m":case"M":r+=parseInt(o[1],10),i=Math.min(i,x.datepicker._getDaysInMonth(n,r));break;case"y":case"Y":n+=parseInt(o[1],10),i=Math.min(i,x.datepicker._getDaysInMonth(n,r))}o=a.exec(e)}return new Date(n,r,i)}(e):"number"==typeof e?isNaN(e)?t:(n=e,(r=new Date).setDate(r.getDate()+n),r):new Date(e.getTime());return(i=i&&"Invalid Date"===i.toString()?t:i)&&(i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0)),this._daylightSavingAdjust(i)},_daylightSavingAdjust:function(e){return e?(e.setHours(12<e.getHours()?e.getHours()+2:0),e):null},_setDate:function(e,t,n){var r=!t,i=e.selectedMonth,a=e.selectedYear,o=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=o.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth(),e.drawYear=e.selectedYear=e.currentYear=o.getFullYear(),i===e.selectedMonth&&a===e.selectedYear||n||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(r?"":this._formatDate(e))},_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},_attachHandlers:function(e){var t=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){x.datepicker._adjustDate(n,-t,"M")},next:function(){x.datepicker._adjustDate(n,+t,"M")},hide:function(){x.datepicker._hideDatepicker()},today:function(){x.datepicker._gotoToday(n)},selectDay:function(){return x.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return x.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return x.datepicker._selectMonthYear(n,this,"Y"),!1}};x(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,n,r,i,a,o,s,c,l,u,f,d,h,p,m,g,_,b,v,y,w,C,A,S,T,x,k,E,D,I,P,M,$,O,R,N,L,F,G,j=new Date,B=this._daylightSavingAdjust(new Date(j.getFullYear(),j.getMonth(),j.getDate())),U=this._get(e,"isRTL"),H=this._get(e,"showButtonPanel"),W=this._get(e,"hideIfNoPrevNext"),q=this._get(e,"navigationAsDateFormat"),z=this._getNumberOfMonths(e),V=this._get(e,"showCurrentAtPos"),Y=this._get(e,"stepMonths"),K=1!==z[0]||1!==z[1],Q=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),X=this._getMinMaxDate(e,"min"),Z=this._getMinMaxDate(e,"max"),J=e.drawMonth-V,ee=e.drawYear;if(J<0&&(J+=12,ee--),Z)for(t=this._daylightSavingAdjust(new Date(Z.getFullYear(),Z.getMonth()-z[0]*z[1]+1,Z.getDate())),t=X&&t<X?X:t;this._daylightSavingAdjust(new Date(ee,J,1))>t;)--J<0&&(J=11,ee--);for(e.drawMonth=J,e.drawYear=ee,n=this._get(e,"prevText"),n=q?this.formatDate(n,this._daylightSavingAdjust(new Date(ee,J-Y,1)),this._getFormatConfig(e)):n,r=this._canAdjustMonth(e,-1,ee,J)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(U?"e":"w")+"'>"+n+"</span></a>":W?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(U?"e":"w")+"'>"+n+"</span></a>",i=this._get(e,"nextText"),i=q?this.formatDate(i,this._daylightSavingAdjust(new Date(ee,J+Y,1)),this._getFormatConfig(e)):i,a=this._canAdjustMonth(e,1,ee,J)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(U?"w":"e")+"'>"+i+"</span></a>":W?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(U?"w":"e")+"'>"+i+"</span></a>",o=this._get(e,"currentText"),s=this._get(e,"gotoCurrent")&&e.currentDay?Q:B,o=q?this.formatDate(o,s,this._getFormatConfig(e)):o,c=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",l=H?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(U?c:"")+(this._isInRange(e,s)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+o+"</button>":"")+(U?"":c)+"</div>":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,f=this._get(e,"showWeek"),d=this._get(e,"dayNames"),h=this._get(e,"dayNamesMin"),p=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),_=this._get(e,"showOtherMonths"),b=this._get(e,"selectOtherMonths"),v=this._getDefaultDate(e),y="",C=0;C<z[0];C++){for(A="",this.maxRows=4,S=0;S<z[1];S++){if(T=this._daylightSavingAdjust(new Date(ee,J,e.selectedDay)),x=" ui-corner-all",k="",K){if(k+="<div class='ui-datepicker-group",1<z[1])switch(S){case 0:k+=" ui-datepicker-group-first",x=" ui-corner-"+(U?"right":"left");break;case z[1]-1:k+=" ui-datepicker-group-last",x=" ui-corner-"+(U?"left":"right");break;default:k+=" ui-datepicker-group-middle",x=""}k+="'>"}for(k+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+x+"'>"+(/all|left/.test(x)&&0===C?U?a:r:"")+(/all|right/.test(x)&&0===C?U?r:a:"")+this._generateMonthYearHeader(e,J,ee,X,Z,0<C||0<S,p,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",E=f?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",w=0;w<7;w++)E+="<th scope='col'"+(5<=(w+u+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+d[D=(w+u)%7]+"'>"+h[D]+"</span></th>";for(k+=E+"</tr></thead><tbody>",I=this._getDaysInMonth(ee,J),ee===e.selectedYear&&J===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,I)),P=(this._getFirstDayOfMonth(ee,J)-u+7)%7,M=Math.ceil((P+I)/7),$=K&&this.maxRows>M?this.maxRows:M,this.maxRows=$,O=this._daylightSavingAdjust(new Date(ee,J,1-P)),R=0;R<$;R++){for(k+="<tr>",N=f?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(O)+"</td>":"",w=0;w<7;w++)L=g?g.apply(e.input?e.input[0]:null,[O]):[!0,""],G=(F=O.getMonth()!==J)&&!b||!L[0]||X&&O<X||Z&&Z<O,N+="<td class='"+(5<=(w+u+6)%7?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(O.getTime()===T.getTime()&&J===e.selectedMonth&&e._keyEvent||v.getTime()===O.getTime()&&v.getTime()===T.getTime()?" "+this._dayOverClass:"")+(G?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+L[1]+(O.getTime()===Q.getTime()?" "+this._currentClass:"")+(O.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!L[2]?"":" title='"+L[2].replace(/'/g,"&#39;")+"'")+(G?"":" data-handler='selectDay' data-event='click' data-month='"+O.getMonth()+"' data-year='"+O.getFullYear()+"'")+">"+(F&&!_?"&#xa0;":G?"<span class='ui-state-default'>"+O.getDate()+"</span>":"<a class='ui-state-default"+(O.getTime()===B.getTime()?" ui-state-highlight":"")+(O.getTime()===Q.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+O.getDate()+"</a>")+"</td>",O.setDate(O.getDate()+1),O=this._daylightSavingAdjust(O);k+=N+"</tr>"}11<++J&&(J=0,ee++),A+=k+="</tbody></table>"+(K?"</div>"+(0<z[0]&&S===z[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}y+=A}return y+=l,e._keyEvent=!1,y},_generateMonthYearHeader:function(e,t,n,r,i,a,o,s){var c,l,u,f,d,h,p,m,g=this._get(e,"changeMonth"),_=this._get(e,"changeYear"),b=this._get(e,"showMonthAfterYear"),v="<div class='ui-datepicker-title'>",y="";if(a||!g)y+="<span class='ui-datepicker-month'>"+o[t]+"</span>";else{for(c=r&&r.getFullYear()===n,l=i&&i.getFullYear()===n,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;u<12;u++)(!c||u>=r.getMonth())&&(!l||u<=i.getMonth())&&(y+="<option value='"+u+"'"+(u===t?" selected='selected'":"")+">"+s[u]+"</option>");y+="</select>"}if(b||(v+=y+(!a&&g&&_?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",a||!_)v+="<span class='ui-datepicker-year'>"+n+"</span>";else{for(f=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),p=(h=function(e){var t=e.match(/c[+\-].*/)?n+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10);return isNaN(t)?d:t})(f[0]),m=Math.max(p,h(f[1]||"")),p=r?Math.max(p,r.getFullYear()):p,m=i?Math.min(m,i.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";p<=m;p++)e.yearshtml+="<option value='"+p+"'"+(p===n?" selected='selected'":"")+">"+p+"</option>";e.yearshtml+="</select>",v+=e.yearshtml,e.yearshtml=null}return v+=this._get(e,"yearSuffix"),b&&(v+=(!a&&g&&_?"":"&#xa0;")+y),v+="</div>"},_adjustInstDate:function(e,t,n){var r=e.selectedYear+("Y"===n?t:0),i=e.selectedMonth+("M"===n?t:0),a=Math.min(e.selectedDay,this._getDaysInMonth(r,i))+("D"===n?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(r,i,a)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),"M"!==n&&"Y"!==n||this._notifyChange(e)},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max"),i=n&&t<n?n:t;return r&&r<i?r:i},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,n,r){var i=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(n,r+(t<0?t:i[0]*i[1]),1));return t<0&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var n,r,i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),o=null,s=null,c=this._get(e,"yearRange");return c&&(n=c.split(":"),r=(new Date).getFullYear(),o=parseInt(n[0],10),s=parseInt(n[1],10),n[0].match(/[+\-].*/)&&(o+=r),n[1].match(/[+\-].*/)&&(s+=r)),(!i||t.getTime()>=i.getTime())&&(!a||t.getTime()<=a.getTime())&&(!o||t.getFullYear()>=o)&&(!s||t.getFullYear()<=s)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,r){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var i=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(r,n,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e))}}),x.fn.datepicker=function(e){if(!this.length)return this;x.datepicker.initialized||(x(document).on("mousedown",x.datepicker._checkExternalClick),x.datepicker.initialized=!0),0===x("#"+x.datepicker._mainDivId).length&&x("body").append(x.datepicker.dpDiv);var t=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?x.datepicker["_"+e+"Datepicker"].apply(x.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?x.datepicker["_"+e+"Datepicker"].apply(x.datepicker,[this].concat(t)):x.datepicker._attachDatepicker(this,e)}):x.datepicker["_"+e+"Datepicker"].apply(x.datepicker,[this[0]].concat(t))},x.datepicker=new p,x.datepicker.initialized=!1,x.datepicker.uuid=(new Date).getTime(),x.datepicker.version="1.12.1";x.datepicker,x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var b=!1;x(document).on("mouseup",function(){b=!1});x.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).on("click."+this.widgetName,function(e){if(!0===x.data(e.target,t.widgetName+".preventClickEvent"))return x.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!b){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var t=this,n=1===e.which,r=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&x(e.target).closest(this.options.cancel).length;return!(n&&!r&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){t.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===x.data(e.target,this.widgetName+".preventClickEvent")&&x.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return t._mouseMove(e)},this._mouseUpDelegate=function(e){return t._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),b=!0))}},_mouseMove:function(e){if(this._mouseMoved){if(x.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&x.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,b=!1,e.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),x.ui.plugin={add:function(e,t,n){var r,i=x.ui[e].prototype;for(r in n)i.plugins[r]=i.plugins[r]||[],i.plugins[r].push([t,n[r]])},call:function(e,t,n,r){var i,a=e.plugins[t];if(a&&(r||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(i=0;i<a.length;i++)e.options[a[i][0]]&&a[i][1].apply(e.element,n)}},x.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&x(e).trigger("blur")};x.widget("ui.draggable",x.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(e){var t=this.options;return!(this.helper||t.disabled||0<x(e.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===t.iframeFix?"iframe":t.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=x(this);return x("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var t=x.ui.safeActiveElement(this.document[0]);x(e.target).closest(t).length||x.ui.safeBlur(t)},_mouseStart:function(e){var t=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),x.ui.ddmanager&&(x.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===x(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,t.cursorAt&&this._adjustOffsetFromHelper(t.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),x.ui.ddmanager&&!t.dropBehaviour&&x.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),x.ui.ddmanager&&x.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(e,t){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!t){var n=this._uiHash();if(!1===this._trigger("drag",e,n))return this._mouseUp(new x.Event("mouseup",e)),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",x.ui.ddmanager&&x.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var t=this,n=!1;return x.ui.ddmanager&&!this.options.dropBehaviour&&(n=x.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||!0===this.options.revert||x.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?x(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==t._trigger("stop",e)&&t._clear()}):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),x.ui.ddmanager&&x.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),x.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new x.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!x(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var t=this.options,n=x.isFunction(t.helper),r=n?x(t.helper.apply(this.element[0],[e])):"clone"===t.helper?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo("parent"===t.appendTo?this.element[0].parentNode:t.appendTo),n&&r[0]===this.element[0]&&this._setPositionRelative(),r[0]===this.element[0]||/(fixed|absolute)/.test(r.css("position"))||r.css("position","absolute"),r},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),x.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),t=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==t&&x.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,t,n,r=this.options,i=this.document[0];this.relativeContainer=null,r.containment?"window"!==r.containment?"document"!==r.containment?r.containment.constructor!==Array?("parent"===r.containment&&(r.containment=this.helper[0].parentNode),(n=(t=x(r.containment))[0])&&(e=/(scroll|auto)/.test(t.css("overflow")),this.containment=[(parseInt(t.css("borderLeftWidth"),10)||0)+(parseInt(t.css("paddingLeft"),10)||0),(parseInt(t.css("borderTopWidth"),10)||0)+(parseInt(t.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(t.css("borderRightWidth"),10)||0)-(parseInt(t.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(t.css("borderBottomWidth"),10)||0)-(parseInt(t.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=t)):this.containment=r.containment:this.containment=[0,0,x(i).width()-this.helperProportions.width-this.margins.left,(x(i).height()||i.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[x(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,x(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,x(window).scrollLeft()+x(window).width()-this.helperProportions.width-this.margins.left,x(window).scrollTop()+(x(window).height()||i.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(e,t){t||(t=this.position);var n="absolute"===e?1:-1,r=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top)*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)*n}},_generatePosition:function(e,t){var n,r,i,a,o=this.options,s=this._isRootNode(this.scrollParent[0]),c=e.pageX,l=e.pageY;return s&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(n=this.relativeContainer?(r=this.relativeContainer.offset(),[this.containment[0]+r.left,this.containment[1]+r.top,this.containment[2]+r.left,this.containment[3]+r.top]):this.containment,e.pageX-this.offset.click.left<n[0]&&(c=n[0]+this.offset.click.left),e.pageY-this.offset.click.top<n[1]&&(l=n[1]+this.offset.click.top),e.pageX-this.offset.click.left>n[2]&&(c=n[2]+this.offset.click.left),e.pageY-this.offset.click.top>n[3]&&(l=n[3]+this.offset.click.top)),o.grid&&(i=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=n?i-this.offset.click.top>=n[1]||i-this.offset.click.top>n[3]?i:i-this.offset.click.top>=n[1]?i-o.grid[1]:i+o.grid[1]:i,a=o.grid[0]?this.originalPageX+Math.round((c-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,c=n?a-this.offset.click.left>=n[0]||a-this.offset.click.left>n[2]?a:a-this.offset.click.left>=n[0]?a-o.grid[0]:a+o.grid[0]:a),"y"===o.axis&&(c=this.originalPageX),"x"===o.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top),left:c-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,t,n){return n=n||this._uiHash(),x.ui.plugin.call(this,e,[t,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),x.Widget.prototype._trigger.call(this,e,t,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),x.ui.plugin.add("draggable","connectToSortable",{start:function(t,e,n){var r=x.extend({},e,{item:n.element});n.sortables=[],x(n.options.connectToSortable).each(function(){var e=x(this).sortable("instance");e&&!e.options.disabled&&(n.sortables.push(e),e.refreshPositions(),e._trigger("activate",t,r))})},stop:function(t,e,n){var r=x.extend({},e,{item:n.element});n.cancelHelperRemoval=!1,x.each(n.sortables,function(){var e=this;e.isOver?(e.isOver=0,n.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,r))})},drag:function(n,r,i){x.each(i.sortables,function(){var e=!1,t=this;t.positionAbs=i.positionAbs,t.helperProportions=i.helperProportions,t.offset.click=i.offset.click,t._intersectsWith(t.containerCache)&&(e=!0,x.each(i.sortables,function(){return this.positionAbs=i.positionAbs,this.helperProportions=i.helperProportions,this.offset.click=i.offset.click,this!==t&&this._intersectsWith(this.containerCache)&&x.contains(t.element[0],this.element[0])&&(e=!1),e})),e?(t.isOver||(t.isOver=1,i._parent=r.helper.parent(),t.currentItem=r.helper.appendTo(t.element).data("ui-sortable-item",!0),t.options._helper=t.options.helper,t.options.helper=function(){return r.helper[0]},n.target=t.currentItem[0],t._mouseCapture(n,!0),t._mouseStart(n,!0,!0),t.offset.click.top=i.offset.click.top,t.offset.click.left=i.offset.click.left,t.offset.parent.left-=i.offset.parent.left-t.offset.parent.left,t.offset.parent.top-=i.offset.parent.top-t.offset.parent.top,i._trigger("toSortable",n),i.dropped=t.element,x.each(i.sortables,function(){this.refreshPositions()}),i.currentItem=i.element,t.fromOutside=i),t.currentItem&&(t._mouseDrag(n),r.position=t.position)):t.isOver&&(t.isOver=0,t.cancelHelperRemoval=!0,t.options._revert=t.options.revert,t.options.revert=!1,t._trigger("out",n,t._uiHash(t)),t._mouseStop(n,!0),t.options.revert=t.options._revert,t.options.helper=t.options._helper,t.placeholder&&t.placeholder.remove(),r.helper.appendTo(i._parent),i._refreshOffsets(n),r.position=i._generatePosition(n,!0),i._trigger("fromSortable",n),i.dropped=!1,x.each(i.sortables,function(){this.refreshPositions()}))})}}),x.ui.plugin.add("draggable","cursor",{start:function(e,t,n){var r=x("body"),i=n.options;r.css("cursor")&&(i._cursor=r.css("cursor")),r.css("cursor",i.cursor)},stop:function(e,t,n){var r=n.options;r._cursor&&x("body").css("cursor",r._cursor)}}),x.ui.plugin.add("draggable","opacity",{start:function(e,t,n){var r=x(t.helper),i=n.options;r.css("opacity")&&(i._opacity=r.css("opacity")),r.css("opacity",i.opacity)},stop:function(e,t,n){var r=n.options;r._opacity&&x(t.helper).css("opacity",r._opacity)}}),x.ui.plugin.add("draggable","scroll",{start:function(e,t,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(e,t,n){var r=n.options,i=!1,a=n.scrollParentNotHidden[0],o=n.document[0];a!==o&&"HTML"!==a.tagName?(r.axis&&"x"===r.axis||(n.overflowOffset.top+a.offsetHeight-e.pageY<r.scrollSensitivity?a.scrollTop=i=a.scrollTop+r.scrollSpeed:e.pageY-n.overflowOffset.top<r.scrollSensitivity&&(a.scrollTop=i=a.scrollTop-r.scrollSpeed)),r.axis&&"y"===r.axis||(n.overflowOffset.left+a.offsetWidth-e.pageX<r.scrollSensitivity?a.scrollLeft=i=a.scrollLeft+r.scrollSpeed:e.pageX-n.overflowOffset.left<r.scrollSensitivity&&(a.scrollLeft=i=a.scrollLeft-r.scrollSpeed))):(r.axis&&"x"===r.axis||(e.pageY-x(o).scrollTop()<r.scrollSensitivity?i=x(o).scrollTop(x(o).scrollTop()-r.scrollSpeed):x(window).height()-(e.pageY-x(o).scrollTop())<r.scrollSensitivity&&(i=x(o).scrollTop(x(o).scrollTop()+r.scrollSpeed))),r.axis&&"y"===r.axis||(e.pageX-x(o).scrollLeft()<r.scrollSensitivity?i=x(o).scrollLeft(x(o).scrollLeft()-r.scrollSpeed):x(window).width()-(e.pageX-x(o).scrollLeft())<r.scrollSensitivity&&(i=x(o).scrollLeft(x(o).scrollLeft()+r.scrollSpeed)))),!1!==i&&x.ui.ddmanager&&!r.dropBehaviour&&x.ui.ddmanager.prepareOffsets(n,e)}}),x.ui.plugin.add("draggable","snap",{start:function(e,t,n){var r=n.options;n.snapElements=[],x(r.snap.constructor!==String?r.snap.items||":data(ui-draggable)":r.snap).each(function(){var e=x(this),t=e.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:t.top,left:t.left})})},drag:function(e,t,n){var r,i,a,o,s,c,l,u,f,d,h=n.options,p=h.snapTolerance,m=t.offset.left,g=m+n.helperProportions.width,_=t.offset.top,b=_+n.helperProportions.height;for(f=n.snapElements.length-1;0<=f;f--)c=(s=n.snapElements[f].left-n.margins.left)+n.snapElements[f].width,u=(l=n.snapElements[f].top-n.margins.top)+n.snapElements[f].height,g<s-p||c+p<m||b<l-p||u+p<_||!x.contains(n.snapElements[f].item.ownerDocument,n.snapElements[f].item)?(n.snapElements[f].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,e,x.extend(n._uiHash(),{snapItem:n.snapElements[f].item})),n.snapElements[f].snapping=!1):("inner"!==h.snapMode&&(r=Math.abs(l-b)<=p,i=Math.abs(u-_)<=p,a=Math.abs(s-g)<=p,o=Math.abs(c-m)<=p,r&&(t.position.top=n._convertPositionTo("relative",{top:l-n.helperProportions.height,left:0}).top),i&&(t.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),a&&(t.position.left=n._convertPositionTo("relative",{top:0,left:s-n.helperProportions.width}).left),o&&(t.position.left=n._convertPositionTo("relative",{top:0,left:c}).left)),d=r||i||a||o,"outer"!==h.snapMode&&(r=Math.abs(l-_)<=p,i=Math.abs(u-b)<=p,a=Math.abs(s-m)<=p,o=Math.abs(c-g)<=p,r&&(t.position.top=n._convertPositionTo("relative",{top:l,left:0}).top),i&&(t.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),a&&(t.position.left=n._convertPositionTo("relative",{top:0,left:s}).left),o&&(t.position.left=n._convertPositionTo("relative",{top:0,left:c-n.helperProportions.width}).left)),!n.snapElements[f].snapping&&(r||i||a||o||d)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,e,x.extend(n._uiHash(),{snapItem:n.snapElements[f].item})),n.snapElements[f].snapping=r||i||a||o||d)}}),x.ui.plugin.add("draggable","stack",{start:function(e,t,n){var r,i=n.options,a=x.makeArray(x(i.stack)).sort(function(e,t){return(parseInt(x(e).css("zIndex"),10)||0)-(parseInt(x(t).css("zIndex"),10)||0)});a.length&&(r=parseInt(x(a[0]).css("zIndex"),10)||0,x(a).each(function(e){x(this).css("zIndex",r+e)}),this.css("zIndex",r+a.length))}}),x.ui.plugin.add("draggable","zIndex",{start:function(e,t,n){var r=x(t.helper),i=n.options;r.css("zIndex")&&(i._zIndex=r.css("zIndex")),r.css("zIndex",i.zIndex)},stop:function(e,t,n){var r=n.options;r._zIndex&&x(t.helper).css("zIndex",r._zIndex)}});x.ui.draggable;x.widget("ui.resizable",x.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseFloat(e)||0},_isNumber:function(e){return!isNaN(parseFloat(e))},_hasScroll:function(e,t){if("hidden"===x(e).css("overflow"))return!1;var n,r=t&&"left"===t?"scrollLeft":"scrollTop";return 0<e[r]||(e[r]=1,n=0<e[r],e[r]=0,n)},_create:function(){var e,t=this.options,n=this;this._addClass("ui-resizable"),x.extend(this,{_aspectRatio:!!t.aspectRatio,aspectRatio:t.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:t.helper||t.ghost||t.animate?t.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(x("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),t.autoHide&&x(this.element).on("mouseenter",function(){t.disabled||(n._removeClass("ui-resizable-autohide"),n._handles.show())}).on("mouseleave",function(){t.disabled||n.resizing||(n._addClass("ui-resizable-autohide"),n._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,t=function(e){x(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(e,t){switch(this._super(e,t),e){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var e,t,n,r,i,a=this.options,o=this;if(this.handles=a.handles||(x(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=x(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),n=this.handles.split(","),this.handles={},t=0;t<n.length;t++)r="ui-resizable-"+(e=x.trim(n[t])),i=x("<div>"),this._addClass(i,"ui-resizable-handle "+r),i.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(i);this._renderAxis=function(e){var t,n,r,i;for(t in e=e||this.element,this.handles)this.handles[t].constructor===String?this.handles[t]=this.element.children(this.handles[t]).first().show():(this.handles[t].jquery||this.handles[t].nodeType)&&(this.handles[t]=x(this.handles[t]),this._on(this.handles[t],{mousedown:o._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(n=x(this.handles[t],this.element),i=/sw|ne|nw|se|n|s/.test(t)?n.outerHeight():n.outerWidth(),r=["padding",/ne|nw|n/.test(t)?"Top":/se|sw|s/.test(t)?"Bottom":/^e$/.test(t)?"Right":"Left"].join(""),e.css(r,i),this._proportionallyResize()),this._handles=this._handles.add(this.handles[t])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){o.resizing||(this.className&&(i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=i&&i[1]?i[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var t,n,r=!1;for(t in this.handles)((n=x(this.handles[t])[0])===e.target||x.contains(n,e.target))&&(r=!0);return!this.options.disabled&&r},_mouseStart:function(e){var t,n,r,i=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),t=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),i.containment&&(t+=x(i.containment).scrollLeft()||0,n+=x(i.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:t,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:t,top:n},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof i.aspectRatio?i.aspectRatio:this.originalSize.width/this.originalSize.height||1,r=x(".ui-resizable-"+this.axis).css("cursor"),x("body").css("cursor","auto"===r?this.axis+"-resize":r),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var t,n,r=this.originalMousePosition,i=this.axis,a=e.pageX-r.left||0,o=e.pageY-r.top||0,s=this._change[i];return this._updatePrevProperties(),s&&(t=s.apply(this,[e,a,o]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(t=this._updateRatio(t,e)),t=this._respectSize(t,e),this._updateCache(t),this._propagate("resize",e),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),x.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges())),!1},_mouseStop:function(e){this.resizing=!1;var t,n,r,i,a,o,s,c=this.options,l=this;return this._helper&&(r=(n=(t=this._proportionallyResizeElements).length&&/textarea/i.test(t[0].nodeName))&&this._hasScroll(t[0],"left")?0:l.sizeDiff.height,i=n?0:l.sizeDiff.width,a={width:l.helper.width()-i,height:l.helper.height()-r},o=parseFloat(l.element.css("left"))+(l.position.left-l.originalPosition.left)||null,s=parseFloat(l.element.css("top"))+(l.position.top-l.originalPosition.top)||null,c.animate||this.element.css(x.extend(a,{top:s,left:o})),l.helper.height(l.size.height),l.helper.width(l.size.width),this._helper&&!c.animate&&this._proportionallyResize()),x("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,n,r,i,a,o=this.options;a={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||e)&&(t=a.minHeight*this.aspectRatio,r=a.minWidth/this.aspectRatio,n=a.maxHeight*this.aspectRatio,i=a.maxWidth/this.aspectRatio,t>a.minWidth&&(a.minWidth=t),r>a.minHeight&&(a.minHeight=r),n<a.maxWidth&&(a.maxWidth=n),i<a.maxHeight&&(a.maxHeight=i)),this._vBoundaries=a},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,n=this.size,r=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===r&&(e.left=t.left+(n.width-e.width),e.top=null),"nw"===r&&(e.top=t.top+(n.height-e.height),e.left=t.left+(n.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,n=this.axis,r=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,i=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,a=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,o=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,s=this.originalPosition.left+this.originalSize.width,c=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(n),u=/nw|ne|n/.test(n);return a&&(e.width=t.minWidth),o&&(e.height=t.minHeight),r&&(e.width=t.maxWidth),i&&(e.height=t.maxHeight),a&&l&&(e.left=s-t.minWidth),r&&l&&(e.left=s-t.maxWidth),o&&u&&(e.top=c-t.minHeight),i&&u&&(e.top=c-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,n=[],r=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],i=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];t<4;t++)n[t]=parseFloat(r[t])||0,n[t]+=parseFloat(i[t])||0;return{height:n[0]+n[2],width:n[1]+n[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,n=this.helper||this.element;t<this._proportionallyResizeElements.length;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:n.height()-this.outerDimensions.height||0,width:n.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,t=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||x("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++t.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var n=this.originalSize;return{left:this.originalPosition.left+t,width:n.width-t}},n:function(e,t,n){var r=this.originalSize;return{top:this.originalPosition.top+n,height:r.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(e,t,n){return x.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,t,n]))},sw:function(e,t,n){return x.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,t,n]))},ne:function(e,t,n){return x.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,t,n]))},nw:function(e,t,n){return x.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,t,n]))}},_propagate:function(e,t){x.ui.plugin.call(this,e,[t,this.ui()]),"resize"!==e&&this._trigger(e,t,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),x.ui.plugin.add("resizable","animate",{stop:function(t){var n=x(this).resizable("instance"),e=n.options,r=n._proportionallyResizeElements,i=r.length&&/textarea/i.test(r[0].nodeName),a=i&&n._hasScroll(r[0],"left")?0:n.sizeDiff.height,o=i?0:n.sizeDiff.width,s={width:n.size.width-o,height:n.size.height-a},c=parseFloat(n.element.css("left"))+(n.position.left-n.originalPosition.left)||null,l=parseFloat(n.element.css("top"))+(n.position.top-n.originalPosition.top)||null;n.element.animate(x.extend(s,l&&c?{top:l,left:c}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var e={width:parseFloat(n.element.css("width")),height:parseFloat(n.element.css("height")),top:parseFloat(n.element.css("top")),left:parseFloat(n.element.css("left"))};r&&r.length&&x(r[0]).css({width:e.width,height:e.height}),n._updateCache(e),n._propagate("resize",t)}})}}),x.ui.plugin.add("resizable","containment",{start:function(){var n,r,e,t,i,a,o,s=x(this).resizable("instance"),c=s.options,l=s.element,u=c.containment,f=u instanceof x?u.get(0):/parent/.test(u)?l.parent().get(0):u;f&&(s.containerElement=x(f),/document/.test(u)||u===document?(s.containerOffset={left:0,top:0},s.containerPosition={left:0,top:0},s.parentData={element:x(document),left:0,top:0,width:x(document).width(),height:x(document).height()||document.body.parentNode.scrollHeight}):(n=x(f),r=[],x(["Top","Right","Left","Bottom"]).each(function(e,t){r[e]=s._num(n.css("padding"+t))}),s.containerOffset=n.offset(),s.containerPosition=n.position(),s.containerSize={height:n.innerHeight()-r[3],width:n.innerWidth()-r[1]},e=s.containerOffset,t=s.containerSize.height,i=s.containerSize.width,a=s._hasScroll(f,"left")?f.scrollWidth:i,o=s._hasScroll(f)?f.scrollHeight:t,s.parentData={element:f,left:e.left,top:e.top,width:a,height:o}))},resize:function(e){var t,n,r,i,a=x(this).resizable("instance"),o=a.options,s=a.containerOffset,c=a.position,l=a._aspectRatio||e.shiftKey,u={top:0,left:0},f=a.containerElement,d=!0;f[0]!==document&&/static/.test(f.css("position"))&&(u=s),c.left<(a._helper?s.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-s.left:a.position.left-u.left),l&&(a.size.height=a.size.width/a.aspectRatio,d=!1),a.position.left=o.helper?s.left:0),c.top<(a._helper?s.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-s.top:a.position.top),l&&(a.size.width=a.size.height*a.aspectRatio,d=!1),a.position.top=a._helper?s.top:0),r=a.containerElement.get(0)===a.element.parent().get(0),i=/relative|absolute/.test(a.containerElement.css("position")),r&&i?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),t=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-s.left)),n=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-s.top)),t+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-t,l&&(a.size.height=a.size.width/a.aspectRatio,d=!1)),n+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-n,l&&(a.size.width=a.size.height*a.aspectRatio,d=!1)),d||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=x(this).resizable("instance"),t=e.options,n=e.containerOffset,r=e.containerPosition,i=e.containerElement,a=x(e.helper),o=a.offset(),s=a.outerWidth()-e.sizeDiff.width,c=a.outerHeight()-e.sizeDiff.height;e._helper&&!t.animate&&/relative/.test(i.css("position"))&&x(this).css({left:o.left-r.left-n.left,width:s,height:c}),e._helper&&!t.animate&&/static/.test(i.css("position"))&&x(this).css({left:o.left-r.left-n.left,width:s,height:c})}}),x.ui.plugin.add("resizable","alsoResize",{start:function(){var e=x(this).resizable("instance").options;x(e.alsoResize).each(function(){var e=x(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,n){var t=x(this).resizable("instance"),r=t.options,i=t.originalSize,a=t.originalPosition,o={height:t.size.height-i.height||0,width:t.size.width-i.width||0,top:t.position.top-a.top||0,left:t.position.left-a.left||0};x(r.alsoResize).each(function(){var e=x(this),r=x(this).data("ui-resizable-alsoresize"),i={},t=e.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];x.each(t,function(e,t){var n=(r[t]||0)+(o[t]||0);n&&0<=n&&(i[t]=n||null)}),e.css(i)})},stop:function(){x(this).removeData("ui-resizable-alsoresize")}}),x.ui.plugin.add("resizable","ghost",{start:function(){var e=x(this).resizable("instance"),t=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:t.height,width:t.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),!1!==x.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=x(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=x(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),x.ui.plugin.add("resizable","grid",{resize:function(){var e,t=x(this).resizable("instance"),n=t.options,r=t.size,i=t.originalSize,a=t.originalPosition,o=t.axis,s="number"==typeof n.grid?[n.grid,n.grid]:n.grid,c=s[0]||1,l=s[1]||1,u=Math.round((r.width-i.width)/c)*c,f=Math.round((r.height-i.height)/l)*l,d=i.width+u,h=i.height+f,p=n.maxWidth&&n.maxWidth<d,m=n.maxHeight&&n.maxHeight<h,g=n.minWidth&&n.minWidth>d,_=n.minHeight&&n.minHeight>h;n.grid=s,g&&(d+=c),_&&(h+=l),p&&(d-=c),m&&(h-=l),/^(se|s|e)$/.test(o)?(t.size.width=d,t.size.height=h):/^(ne)$/.test(o)?(t.size.width=d,t.size.height=h,t.position.top=a.top-f):/^(sw)$/.test(o)?(t.size.width=d,t.size.height=h,t.position.left=a.left-u):((h-l<=0||d-c<=0)&&(e=t._getPaddingPlusBorderDimensions(this)),0<h-l?(t.size.height=h,t.position.top=a.top-f):(h=l-e.height,t.size.height=h,t.position.top=a.top+i.height-h),0<d-c?(t.size.width=d,t.position.left=a.left-u):(d=c-e.width,t.size.width=d,t.position.left=a.left+i.width-d))}});x.ui.resizable;x.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var t=x(this).css(e).offset().top;t<0&&x(this).css("top",e.top-t)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&x.fn.draggable&&this._makeDraggable(),this.options.resizable&&x.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?x(e):this.document.find(e||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(e=t.parent.children().eq(t.index)).length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:x.noop,enable:x.noop,close:function(e){var t=this;this._isOpen&&!1!==this._trigger("beforeClose",e)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||x.ui.safeBlur(x.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){t._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,t){var n=!1,r=this.uiDialog.siblings(".ui-front:visible").map(function(){return+x(this).css("z-index")}).get(),i=Math.max.apply(null,r);return i>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",i+1),n=!0),n&&!t&&this._trigger("focus",e),n},open:function(){var e=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=x(x.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).trigger("focus")},_keepFocus:function(e){function t(){var e=x.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===e||x.contains(this.uiDialog[0],e)||this._focusTabbable()}e.preventDefault(),t.call(this),this._delay(t)},_createWrapper:function(){this.uiDialog=x("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===x.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===x.ui.keyCode.TAB&&!e.isDefaultPrevented()){var t=this.uiDialog.find(":tabbable"),n=t.filter(":first"),r=t.filter(":last");e.target!==r[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==n[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){r.trigger("focus")}),e.preventDefault()):(this._delay(function(){n.trigger("focus")}),e.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=x("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){x(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=x("<button type='button'></button>").button({label:x("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),e=x("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(e){this.options.title?e.text(this.options.title):e.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=x("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=x("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var i=this,e=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),x.isEmptyObject(e)||x.isArray(e)&&!e.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(x.each(e,function(e,t){var n,r;t=x.isFunction(t)?{click:t,text:e}:t,t=x.extend({type:"button"},t),n=t.click,r={icon:t.icon,iconPosition:t.iconPosition,showLabel:t.showLabel,icons:t.icons,text:t.text},delete t.click,delete t.icon,delete t.iconPosition,delete t.showLabel,delete t.icons,"boolean"==typeof t.text&&delete t.text,x("<button></button>",t).button(r).appendTo(i.uiButtonSet).on("click",function(){n.apply(i.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var i=this,a=this.options;function o(e){return{position:e.position,offset:e.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(e,t){i._addClass(x(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",e,o(t))},drag:function(e,t){i._trigger("drag",e,o(t))},stop:function(e,t){var n=t.offset.left-i.document.scrollLeft(),r=t.offset.top-i.document.scrollTop();a.position={my:"left top",at:"left"+(0<=n?"+":"")+n+" top"+(0<=r?"+":"")+r,of:i.window},i._removeClass(x(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",e,o(t))}})},_makeResizable:function(){var a=this,o=this.options,e=o.resizable,t=this.uiDialog.css("position"),n="string"==typeof e?e:"n,e,s,w,se,sw,ne,nw";function s(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:o.maxWidth,maxHeight:o.maxHeight,minWidth:o.minWidth,minHeight:this._minHeight(),handles:n,start:function(e,t){a._addClass(x(this),"ui-dialog-resizing"),a._blockFrames(),a._trigger("resizeStart",e,s(t))},resize:function(e,t){a._trigger("resize",e,s(t))},stop:function(e,t){var n=a.uiDialog.offset(),r=n.left-a.document.scrollLeft(),i=n.top-a.document.scrollTop();o.height=a.uiDialog.height(),o.width=a.uiDialog.width(),o.position={my:"left top",at:"left"+(0<=r?"+":"")+r+" top"+(0<=i?"+":"")+i,of:a.window},a._removeClass(x(this),"ui-dialog-resizing"),a._unblockFrames(),a._trigger("resizeStop",e,s(t))}}).css("position",t)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=x(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),t=x.inArray(this,e);-1!==t&&e.splice(t,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(e){var n=this,r=!1,i={};x.each(e,function(e,t){n._setOption(e,t),e in n.sizeRelatedOptions&&(r=!0),e in n.resizableRelatedOptions&&(i[e]=t)}),r&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",i)},_setOption:function(e,t){var n,r,i=this.uiDialog;"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:x("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&((n=i.is(":data(ui-draggable)"))&&!t&&i.draggable("destroy"),!n&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&((r=i.is(":data(ui-resizable)"))&&!t&&i.resizable("destroy"),r&&"string"==typeof t&&i.resizable("option","handles",t),r||!1===t||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,n,r=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),r.minWidth>r.width&&(r.width=r.minWidth),e=this.uiDialog.css({height:"auto",width:r.width}).outerHeight(),t=Math.max(0,r.minHeight-e),n="number"==typeof r.maxHeight?Math.max(0,r.maxHeight-e):"none","auto"===r.height?this.element.css({minHeight:t,maxHeight:n,height:"auto"}):this.element.height(Math.max(0,r.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=x(this);return x("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return!!x(e.target).closest(".ui-dialog").length||!!x(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=x("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!1!==x.uiBackCompat&&x.widget("ui.dialog",x.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(e,t){"dialogClass"===e&&this.uiDialog.removeClass(this.options.dialogClass).addClass(t),this._superApply(arguments)}});x.ui.dialog;x.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,t=this.options,n=t.accept;this.isover=!1,this.isout=!0,this.accept=x.isFunction(n)?n:function(e){return e.is(n)},this.proportions=function(){if(!arguments.length)return e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});e=arguments[0]},this._addToManager(t.scope),t.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){x.ui.ddmanager.droppables[e]=x.ui.ddmanager.droppables[e]||[],x.ui.ddmanager.droppables[e].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var e=x.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,t){if("accept"===e)this.accept=x.isFunction(t)?t:function(e){return e.is(t)};else if("scope"===e){var n=x.ui.ddmanager.droppables[this.options.scope];this._splice(n),this._addToManager(t)}this._super(e,t)},_activate:function(e){var t=x.ui.ddmanager.current;this._addActiveClass(),t&&this._trigger("activate",e,this.ui(t))},_deactivate:function(e){var t=x.ui.ddmanager.current;this._removeActiveClass(),t&&this._trigger("deactivate",e,this.ui(t))},_over:function(e){var t=x.ui.ddmanager.current;t&&(t.currentItem||t.element)[0]!==this.element[0]&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(t)))},_out:function(e){var t=x.ui.ddmanager.current;t&&(t.currentItem||t.element)[0]!==this.element[0]&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(t)))},_drop:function(t,e){var n=e||x.ui.ddmanager.current,r=!1;return!(!n||(n.currentItem||n.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=x(this).droppable("instance");if(e.options.greedy&&!e.options.disabled&&e.options.scope===n.options.scope&&e.accept.call(e.element[0],n.currentItem||n.element)&&v(n,x.extend(e,{offset:e.element.offset()}),e.options.tolerance,t))return!(r=!0)}),!r&&(!!this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",t,this.ui(n)),this.element)))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var v=x.ui.intersect=function(){function d(e,t,n){return t<=e&&e<t+n}return function(e,t,n,r){if(!t.offset)return!1;var i=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,o=i+e.helperProportions.width,s=a+e.helperProportions.height,c=t.offset.left,l=t.offset.top,u=c+t.proportions().width,f=l+t.proportions().height;switch(n){case"fit":return c<=i&&o<=u&&l<=a&&s<=f;case"intersect":return c<i+e.helperProportions.width/2&&o-e.helperProportions.width/2<u&&l<a+e.helperProportions.height/2&&s-e.helperProportions.height/2<f;case"pointer":return d(r.pageY,l,t.proportions().height)&&d(r.pageX,c,t.proportions().width);case"touch":return(l<=a&&a<=f||l<=s&&s<=f||a<l&&f<s)&&(c<=i&&i<=u||c<=o&&o<=u||i<c&&u<o);default:return!1}}}();!(x.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,t){var n,r,i=x.ui.ddmanager.droppables[e.options.scope]||[],a=t?t.type:null,o=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();e:for(n=0;n<i.length;n++)if(!(i[n].options.disabled||e&&!i[n].accept.call(i[n].element[0],e.currentItem||e.element))){for(r=0;r<o.length;r++)if(o[r]===i[n].element[0]){i[n].proportions().height=0;continue e}i[n].visible="none"!==i[n].element.css("display"),i[n].visible&&("mousedown"===a&&i[n]._activate.call(i[n],t),i[n].offset=i[n].element.offset(),i[n].proportions({width:i[n].element[0].offsetWidth,height:i[n].element[0].offsetHeight}))}},drop:function(e,t){var n=!1;return x.each((x.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&v(e,this,this.options.tolerance,t)&&(n=this._drop.call(this,t)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,t)))}),n},dragStart:function(e,t){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||x.ui.ddmanager.prepareOffsets(e,t)})},drag:function(a,o){a.options.refreshPositions&&x.ui.ddmanager.prepareOffsets(a,o),x.each(x.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var e,t,n,r=v(a,this,this.options.tolerance,o),i=!r&&this.isover?"isout":r&&!this.isover?"isover":null;i&&(this.options.greedy&&(t=this.options.scope,(n=this.element.parents(":data(ui-droppable)").filter(function(){return x(this).droppable("instance").options.scope===t})).length&&((e=x(n[0]).droppable("instance")).greedyChild="isover"===i)),e&&"isover"===i&&(e.isover=!1,e.isout=!0,e._out.call(e,o)),this[i]=!0,this["isout"===i?"isover":"isout"]=!1,this["isover"===i?"_over":"_out"].call(this,o),e&&"isout"===i&&(e.isout=!1,e.isover=!0,e._over.call(e,o)))}})},dragStop:function(e,t){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||x.ui.ddmanager.prepareOffsets(e,t)}})!==x.uiBackCompat&&x.widget("ui.droppable",x.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});x.ui.droppable,x.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=x("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(e){if(void 0===e)return this.options.value;this.options.value=this._constrainedValue(e),this._refreshValue()},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=!1===e,"number"!=typeof e&&(e=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,t=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(t.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=x("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),x.widget("ui.selectable",x.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var r=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){r.elementPos=x(r.element[0]).offset(),r.selectees=x(r.options.filter,r.element[0]),r._addClass(r.selectees,"ui-selectee"),r.selectees.each(function(){var e=x(this),t=e.offset(),n={left:t.left-r.elementPos.left,top:t.top-r.elementPos.top};x.data(this,"selectable-item",{element:this,$element:e,left:n.left,top:n.top,right:n.left+e.outerWidth(),bottom:n.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=x("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(n){var r=this,e=this.options;this.opos=[n.pageX,n.pageY],this.elementPos=x(this.element[0]).offset(),this.options.disabled||(this.selectees=x(e.filter,this.element[0]),this._trigger("start",n),x(e.appendTo).append(this.helper),this.helper.css({left:n.pageX,top:n.pageY,width:0,height:0}),e.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var e=x.data(this,"selectable-item");e.startselected=!0,n.metaKey||n.ctrlKey||(r._removeClass(e.$element,"ui-selected"),e.selected=!1,r._addClass(e.$element,"ui-unselecting"),e.unselecting=!0,r._trigger("unselecting",n,{unselecting:e.element}))}),x(n.target).parents().addBack().each(function(){var e,t=x.data(this,"selectable-item");if(t)return e=!n.metaKey&&!n.ctrlKey||!t.$element.hasClass("ui-selected"),r._removeClass(t.$element,e?"ui-unselecting":"ui-selected")._addClass(t.$element,e?"ui-selecting":"ui-unselecting"),t.unselecting=!e,t.selecting=e,(t.selected=e)?r._trigger("selecting",n,{selecting:t.element}):r._trigger("unselecting",n,{unselecting:t.element}),!1}))},_mouseDrag:function(r){if(this.dragged=!0,!this.options.disabled){var e,i=this,a=this.options,o=this.opos[0],s=this.opos[1],c=r.pageX,l=r.pageY;return c<o&&(e=c,c=o,o=e),l<s&&(e=l,l=s,s=e),this.helper.css({left:o,top:s,width:c-o,height:l-s}),this.selectees.each(function(){var e=x.data(this,"selectable-item"),t=!1,n={};e&&e.element!==i.element[0]&&(n.left=e.left+i.elementPos.left,n.right=e.right+i.elementPos.left,n.top=e.top+i.elementPos.top,n.bottom=e.bottom+i.elementPos.top,"touch"===a.tolerance?t=!(n.left>c||n.right<o||n.top>l||n.bottom<s):"fit"===a.tolerance&&(t=n.left>o&&n.right<c&&n.top>s&&n.bottom<l),t?(e.selected&&(i._removeClass(e.$element,"ui-selected"),e.selected=!1),e.unselecting&&(i._removeClass(e.$element,"ui-unselecting"),e.unselecting=!1),e.selecting||(i._addClass(e.$element,"ui-selecting"),e.selecting=!0,i._trigger("selecting",r,{selecting:e.element}))):(e.selecting&&((r.metaKey||r.ctrlKey)&&e.startselected?(i._removeClass(e.$element,"ui-selecting"),e.selecting=!1,i._addClass(e.$element,"ui-selected"),e.selected=!0):(i._removeClass(e.$element,"ui-selecting"),e.selecting=!1,e.startselected&&(i._addClass(e.$element,"ui-unselecting"),e.unselecting=!0),i._trigger("unselecting",r,{unselecting:e.element}))),e.selected&&(r.metaKey||r.ctrlKey||e.startselected||(i._removeClass(e.$element,"ui-selected"),e.selected=!1,i._addClass(e.$element,"ui-unselecting"),e.unselecting=!0,i._trigger("unselecting",r,{unselecting:e.element})))))}),!1}},_mouseStop:function(t){var n=this;return this.dragged=!1,x(".ui-unselecting",this.element[0]).each(function(){var e=x.data(this,"selectable-item");n._removeClass(e.$element,"ui-unselecting"),e.unselecting=!1,e.startselected=!1,n._trigger("unselected",t,{unselected:e.element})}),x(".ui-selecting",this.element[0]).each(function(){var e=x.data(this,"selectable-item");n._removeClass(e.$element,"ui-selecting")._addClass(e.$element,"ui-selected"),e.selecting=!1,e.selected=!0,e.startselected=!0,n._trigger("selected",t,{selected:e.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),x.widget("ui.selectmenu",[x.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=x()},_drawButton:function(){var e,t=this,n=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(e){this.button.focus(),e.preventDefault()}}),this.element.hide(),this.button=x("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=x("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(n).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){t._rendered||t._refreshMenu()})},_drawMenu:function(){var r=this;this.menu=x("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=x("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(e,t){e.preventDefault(),r._setSelection(),r._select(t.item.data("ui-selectmenu-item"),e)},focus:function(e,t){var n=t.item.data("ui-selectmenu-item");null!=r.focusIndex&&n.index!==r.focusIndex&&(r._trigger("focus",e,{item:n}),r.isOpen||r._select(n,e)),r.focusIndex=n.index,r.button.attr("aria-activedescendant",r.menuItems.eq(n.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var e,t=this.element.find("option");this.menu.empty(),this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,t.length&&(e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e)))},_position:function(){this.menuWrap.position(x.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var t=x("<span>");return this._setText(t,e.label),this._addClass(t,"ui-selectmenu-text"),t},_renderMenu:function(r,e){var i=this,a="";x.each(e,function(e,t){var n;t.optgroup!==a&&(n=x("<li>",{text:t.optgroup}),i._addClass(n,"ui-selectmenu-optgroup","ui-menu-divider"+(t.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),n.appendTo(r),a=t.optgroup),i._renderItemData(r,t)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(e,t){var n=x("<li>"),r=x("<div>",{title:t.element.attr("title")});return t.disabled&&this._addClass(n,null,"ui-state-disabled"),this._setText(r,t.label),n.append(r).appendTo(e)},_setText:function(e,t){t?e.text(t):e.html("&#160;")},_move:function(e,t){var n,r,i=".ui-menu-item";this.isOpen?n=this.menuItems.eq(this.focusIndex).parent("li"):(n=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),i+=":not(.ui-state-disabled)"),(r="first"===e||"last"===e?n["first"===e?"prevAll":"nextAll"](i).eq(-1):n[e+"All"](i).eq(0)).length&&this.menuInstance.focus(t,r)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&(window.getSelection?((e=window.getSelection()).removeAllRanges(),e.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(x(e.target).closest(".ui-selectmenu-menu, #"+x.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var e;window.getSelection?(e=window.getSelection()).rangeCount&&(this.range=e.getRangeAt(0)):this.range=document.selection.createRange()},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(e){var t=!0;switch(e.keyCode){case x.ui.keyCode.TAB:case x.ui.keyCode.ESCAPE:this.close(e),t=!1;break;case x.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case x.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case x.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case x.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case x.ui.keyCode.LEFT:this._move("prev",e);break;case x.ui.keyCode.RIGHT:this._move("next",e);break;case x.ui.keyCode.HOME:case x.ui.keyCode.PAGE_UP:this._move("first",e);break;case x.ui.keyCode.END:case x.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),t=!1}t&&e.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex).parent("li");t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var n=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(e)),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==n&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){var t=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(e,t){if("icons"===e){var n=this.button.find("span.ui-icon");this._removeClass(n,null,this.options.icons.button)._addClass(n,null,t.button)}this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"width"===e&&this._resizeButton()},_setOptionDisabled:function(e){this._super(e),this.menuInstance.option("disabled",e),this.button.attr("aria-disabled",e),this._toggleClass(this.button,null,"ui-state-disabled",e),this.element.prop("disabled",e),e?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?x(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;!1!==e?(null===e&&(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e)):this.button.css("width","")},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var e=this._super();return e.disabled=this.element.prop("disabled"),e},_parseOptions:function(e){var n=this,r=[];e.each(function(e,t){r.push(n._parseOption(x(t),e))}),this.items=r},_parseOption:function(e,t){var n=e.parent("optgroup");return{element:e,index:t,value:e.val(),label:e.text(),optgroup:n.attr("label")||"",disabled:n.prop("disabled")||e.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),x.widget("ui.slider",x.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,t,n=this.options,r=this.element.find(".ui-slider-handle"),i=[];for(t=n.values&&n.values.length||1,r.length>t&&(r.slice(t).remove(),r=r.slice(0,t)),e=r.length;e<t;e++)i.push("<span tabindex='0'></span>");this.handles=r.add(x(i.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){x(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:x.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=x("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==e.range&&"max"!==e.range||this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var t,n,r,i,a,o,s,c=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t),r=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var t=Math.abs(n-c.values(e));(t<r||r===t&&(e===c._lastChangedValue||c.values(e)===l.min))&&(r=t,i=x(this),a=e)}),!1!==this._start(e,a)&&(this._mouseSliding=!0,this._handleIndex=a,this._addClass(i,null,"ui-state-active"),i.trigger("focus"),o=i.offset(),s=!x(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=s?{left:0,top:0}:{left:e.pageX-o.left-i.width()/2,top:e.pageY-o.top-i.height()/2-(parseInt(i.css("borderTopWidth"),10)||0)-(parseInt(i.css("borderBottomWidth"),10)||0)+(parseInt(i.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,n),this._animateOff=!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,r,i;return 1<(n=("horizontal"===this.orientation?(t=this.elementSize.width,e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)))/t)&&(n=1),n<0&&(n=0),"vertical"===this.orientation&&(n=1-n),r=this._valueMax()-this._valueMin(),i=this._valueMin()+n*r,this._trimAlignValue(i)},_uiHash:function(e,t,n){var r={handle:this.handles[e],handleIndex:e,value:void 0!==t?t:this.value()};return this._hasMultipleValues()&&(r.value=void 0!==t?t:this.values(e),r.values=n||this.values()),r},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(e,t){return this._trigger("start",e,this._uiHash(t))},_slide:function(e,t,n){var r,i=this.value(),a=this.values();this._hasMultipleValues()&&(r=this.values(t?0:1),i=this.values(t),2===this.options.values.length&&!0===this.options.range&&(n=0===t?Math.min(r,n):Math.max(r,n)),a[t]=n),n!==i&&!1!==this._trigger("slide",e,this._uiHash(t,n,a))&&(this._hasMultipleValues()?this.values(t,n):this.value(n))},_stop:function(e,t){this._trigger("stop",e,this._uiHash(t))},_change:function(e,t){this._keySliding||this._mouseSliding||(this._lastChangedValue=t,this._trigger("change",e,this._uiHash(t)))},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,t){var n,r,i;if(1<arguments.length)return this.options.values[e]=this._trimAlignValue(t),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!x.isArray(e))return this._hasMultipleValues()?this._values(e):this.value();for(n=this.options.values,r=e,i=0;i<n.length;i+=1)n[i]=this._trimAlignValue(r[i]),this._change(null,i);this._refreshValue()},_setOption:function(e,t){var n,r=0;switch("range"===e&&!0===this.options.range&&("min"===t?(this.options.value=this._values(0),this.options.values=null):"max"===t&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),x.isArray(this.options.values)&&(r=this.options.values.length),this._super(e,t),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(t),this.handles.css("horizontal"===t?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=r-1;0<=n;n--)this._change(null,n);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(e){this._super(e),this._toggleClass(null,"ui-state-disabled",!!e)},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,n,r;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this._hasMultipleValues()){for(n=this.options.values.slice(),r=0;r<n.length;r+=1)n[r]=this._trimAlignValue(n[r]);return n}return[]},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=0<this.options.step?this.options.step:1,n=(e-this._valueMin())%t,r=e-n;return 2*Math.abs(n)>=t&&(r+=0<n?t:-t),parseFloat(r.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),n=this.options.step;(e=Math.round((e-t)/n)*n+t)>this.options.max&&(e-=n),this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return-1===n?0:t.length-n-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(e){"vertical"===e&&this.range.css({width:"",left:""}),"horizontal"===e&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var t,n,e,r,i,a=this.options.range,o=this.options,s=this,c=!this._animateOff&&o.animate,l={};this._hasMultipleValues()?this.handles.each(function(e){n=(s.values(e)-s._valueMin())/(s._valueMax()-s._valueMin())*100,l["horizontal"===s.orientation?"left":"bottom"]=n+"%",x(this).stop(1,1)[c?"animate":"css"](l,o.animate),!0===s.options.range&&("horizontal"===s.orientation?(0===e&&s.range.stop(1,1)[c?"animate":"css"]({left:n+"%"},o.animate),1===e&&s.range[c?"animate":"css"]({width:n-t+"%"},{queue:!1,duration:o.animate})):(0===e&&s.range.stop(1,1)[c?"animate":"css"]({bottom:n+"%"},o.animate),1===e&&s.range[c?"animate":"css"]({height:n-t+"%"},{queue:!1,duration:o.animate}))),t=n}):(e=this.value(),r=this._valueMin(),i=this._valueMax(),n=i!==r?(e-r)/(i-r)*100:0,l["horizontal"===this.orientation?"left":"bottom"]=n+"%",this.handle.stop(1,1)[c?"animate":"css"](l,o.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:n+"%"},o.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:100-n+"%"},o.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:n+"%"},o.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:100-n+"%"},o.animate))},_handleEvents:{keydown:function(e){var t,n,r,i=x(e.target).data("ui-slider-handle-index");switch(e.keyCode){case x.ui.keyCode.HOME:case x.ui.keyCode.END:case x.ui.keyCode.PAGE_UP:case x.ui.keyCode.PAGE_DOWN:case x.ui.keyCode.UP:case x.ui.keyCode.RIGHT:case x.ui.keyCode.DOWN:case x.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(x(e.target),null,"ui-state-active"),!1===this._start(e,i)))return}switch(r=this.options.step,t=n=this._hasMultipleValues()?this.values(i):this.value(),e.keyCode){case x.ui.keyCode.HOME:n=this._valueMin();break;case x.ui.keyCode.END:n=this._valueMax();break;case x.ui.keyCode.PAGE_UP:n=this._trimAlignValue(t+(this._valueMax()-this._valueMin())/this.numPages);break;case x.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(t-(this._valueMax()-this._valueMin())/this.numPages);break;case x.ui.keyCode.UP:case x.ui.keyCode.RIGHT:if(t===this._valueMax())return;n=this._trimAlignValue(t+r);break;case x.ui.keyCode.DOWN:case x.ui.keyCode.LEFT:if(t===this._valueMin())return;n=this._trimAlignValue(t-r)}this._slide(e,i,n)},keyup:function(e){var t=x(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,t),this._change(e,t),this._removeClass(x(e.target),null,"ui-state-active"))}}}),x.widget("ui.sortable",x.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,n){return t<=e&&e<t+n},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),x.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var e=this.items.length-1;0<=e;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,t){var n=null,r=!1,i=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),x(e.target).parents().each(function(){if(x.data(this,i.widgetName+"-item")===i)return n=x(this),!1}),x.data(e.target,i.widgetName+"-item")===i&&(n=x(e.target)),!!n&&(!(this.options.handle&&!t&&(x(this.options.handle,n).find("*").addBack().each(function(){this===e.target&&(r=!0)}),!r))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,t,n){var r,i,a=this.options;if((this.currentContainer=this).refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},x.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(i=this.document.find("body"),this.storedCursor=i.css("cursor"),i.css("cursor",a.cursor),this.storedStylesheet=x("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(i)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(r=this.containers.length-1;0<=r;r--)this.containers[r]._trigger("activate",e,this._uiHash(this));return x.ui.ddmanager&&(x.ui.ddmanager.current=this),x.ui.ddmanager&&!a.dropBehaviour&&x.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var t,n,r,i,a=this.options,o=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=o=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=o=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=o=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=o=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?o=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(o=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?o=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(o=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),!1!==o&&x.ui.ddmanager&&!a.dropBehaviour&&x.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t=this.items.length-1;0<=t;t--)if(r=(n=this.items[t]).item[0],(i=this._intersectsWithPointer(n))&&n.instance===this.currentContainer&&!(r===this.currentItem[0]||this.placeholder[1===i?"next":"prev"]()[0]===r||x.contains(this.placeholder[0],r)||"semi-dynamic"===this.options.type&&x.contains(this.element[0],r))){if(this.direction=1===i?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),x.ui.ddmanager&&x.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,t){if(e){if(x.ui.ddmanager&&!this.options.dropBehaviour&&x.ui.ddmanager.drop(this,e),this.options.revert){var n=this,r=this.placeholder.offset(),i=this.options.axis,a={};i&&"x"!==i||(a.left=r.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),i&&"y"!==i||(a.top=r.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,x(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){n._clear(e)})}else this._clear(e,t);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new x.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;0<=e;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),x.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?x(this.domPosition.prev).after(this.currentItem):x(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var e=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},x(e).each(function(){var e=(x(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);e&&n.push((t.key||e[1]+"[]")+"="+(t.key&&t.expression?e[1]:e[2]))}),!n.length&&t.key&&n.push(t.key+"="),n.join("&")},toArray:function(e){var t=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t.each(function(){n.push(x(e.item||this).attr(e.attribute||"id")||"")}),n},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,a=e.left,o=a+e.width,s=e.top,c=s+e.height,l=this.offset.click.top,u=this.offset.click.left,f="x"===this.options.axis||s<r+l&&r+l<c,d="y"===this.options.axis||a<t+u&&t+u<o,h=f&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?h:a<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<o&&s<r+this.helperProportions.height/2&&i-this.helperProportions.height/2<c},_intersectsWithPointer:function(e){var t,n,r="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width);return!(!r||!i)&&(t=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection(),this.floating?"right"===n||"down"===t?2:1:t&&("down"===t?2:1))},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),r=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection();return this.floating&&i?"right"===i&&n||"left"===i&&!n:r&&("down"===r&&t||"up"===r&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(0<e?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(0<e?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(e){var t,n,r,i,a=[],o=[],s=this._connectWith();if(s&&e)for(t=s.length-1;0<=t;t--)for(n=(r=x(s[t],this.document[0])).length-1;0<=n;n--)(i=x.data(r[n],this.widgetFullName))&&i!==this&&!i.options.disabled&&o.push([x.isFunction(i.options.items)?i.options.items.call(i.element):x(i.options.items,i.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),i]);function c(){a.push(this)}for(o.push([x.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):x(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),t=o.length-1;0<=t;t--)o[t][0].each(c);return x(a)},_removeCurrentsFromItems:function(){var n=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=x.grep(this.items,function(e){for(var t=0;t<n.length;t++)if(n[t]===e.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var t,n,r,i,a,o,s,c,l=this.items,u=[[x.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):x(this.options.items,this.element),this]],f=this._connectWith();if(f&&this.ready)for(t=f.length-1;0<=t;t--)for(n=(r=x(f[t],this.document[0])).length-1;0<=n;n--)(i=x.data(r[n],this.widgetFullName))&&i!==this&&!i.options.disabled&&(u.push([x.isFunction(i.options.items)?i.options.items.call(i.element[0],e,{item:this.currentItem}):x(i.options.items,i.element),i]),this.containers.push(i));for(t=u.length-1;0<=t;t--)for(a=u[t][1],n=0,c=(o=u[t][0]).length;n<c;n++)(s=x(o[n])).data(this.widgetName+"-item",a),l.push({item:s,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){var t,n,r,i;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),t=this.items.length-1;0<=t;t--)(n=this.items[t]).instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(r=this.options.toleranceElement?x(this.options.toleranceElement,n.item):n.item,e||(n.width=r.outerWidth(),n.height=r.outerHeight()),i=r.offset(),n.left=i.left,n.top=i.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(t=this.containers.length-1;0<=t;t--)i=this.containers[t].element.offset(),this.containers[t].containerCache.left=i.left,this.containers[t].containerCache.top=i.top,this.containers[t].containerCache.width=this.containers[t].element.outerWidth(),this.containers[t].containerCache.height=this.containers[t].element.outerHeight();return this},_createPlaceholder:function(n){var r,i=(n=n||this).options;i.placeholder&&i.placeholder.constructor!==String||(r=i.placeholder,i.placeholder={element:function(){var e=n.currentItem[0].nodeName.toLowerCase(),t=x("<"+e+">",n.document[0]);return n._addClass(t,"ui-sortable-placeholder",r||n.currentItem[0].className)._removeClass(t,"ui-sortable-helper"),"tbody"===e?n._createTrPlaceholder(n.currentItem.find("tr").eq(0),x("<tr>",n.document[0]).appendTo(t)):"tr"===e?n._createTrPlaceholder(n.currentItem,t):"img"===e&&t.attr("src",n.currentItem.attr("src")),r||t.css("visibility","hidden"),t},update:function(e,t){r&&!i.forcePlaceholderSize||(t.height()||t.height(n.currentItem.innerHeight()-parseInt(n.currentItem.css("paddingTop")||0,10)-parseInt(n.currentItem.css("paddingBottom")||0,10)),t.width()||t.width(n.currentItem.innerWidth()-parseInt(n.currentItem.css("paddingLeft")||0,10)-parseInt(n.currentItem.css("paddingRight")||0,10)))}}),n.placeholder=x(i.placeholder.element.call(n.element,n.currentItem)),n.currentItem.after(n.placeholder),i.placeholder.update(n,n.placeholder)},_createTrPlaceholder:function(e,t){var n=this;e.children().each(function(){x("<td>&#160;</td>",n.document[0]).attr("colspan",x(this).attr("colspan")||1).appendTo(t)})},_contactContainers:function(e){var t,n,r,i,a,o,s,c,l,u,f=null,d=null;for(t=this.containers.length-1;0<=t;t--)if(!x.contains(this.currentItem[0],this.containers[t].element[0]))if(this._intersectsWith(this.containers[t].containerCache)){if(f&&x.contains(this.containers[t].element[0],f.element[0]))continue;f=this.containers[t],d=t}else this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",e,this._uiHash(this)),this.containers[t].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[d].containerCache.over||(this.containers[d]._trigger("over",e,this._uiHash(this)),this.containers[d].containerCache.over=1);else{for(r=1e4,i=null,a=(l=f.floating||this._isFloating(this.currentItem))?"left":"top",o=l?"width":"height",u=l?"pageX":"pageY",n=this.items.length-1;0<=n;n--)x.contains(this.containers[d].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(s=this.items[n].item.offset()[a],c=!1,e[u]-s>this.items[n][o]/2&&(c=!0),Math.abs(e[u]-s)<r&&(r=Math.abs(e[u]-s),i=this.items[n],this.direction=c?"up":"down"));if(!i&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[d])return void(this.currentContainer.containerCache.over||(this.containers[d]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));i?this._rearrange(e,i,null,!0):this._rearrange(e,null,this.containers[d].element,!0),this._trigger("change",e,this._uiHash()),this.containers[d]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[d],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",e,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(e){var t=this.options,n=x.isFunction(t.helper)?x(t.helper.apply(this.element[0],[e,this.currentItem])):"clone"===t.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||x("parent"!==t.appendTo?t.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),n[0].style.width&&!t.forceHelperSize||n.width(this.currentItem.width()),n[0].style.height&&!t.forceHelperSize||n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),x.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&x.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&x.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,t,n,r=this.options;"parent"===r.containment&&(r.containment=this.helper[0].parentNode),"document"!==r.containment&&"window"!==r.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===r.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===r.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(r.containment)||(e=x(r.containment)[0],t=x(r.containment).offset(),n="hidden"!==x(e).css("overflow"),this.containment=[t.left+(parseInt(x(e).css("borderLeftWidth"),10)||0)+(parseInt(x(e).css("paddingLeft"),10)||0)-this.margins.left,t.top+(parseInt(x(e).css("borderTopWidth"),10)||0)+(parseInt(x(e).css("paddingTop"),10)||0)-this.margins.top,t.left+(n?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(x(e).css("borderLeftWidth"),10)||0)-(parseInt(x(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,t.top+(n?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(x(e).css("borderTopWidth"),10)||0)-(parseInt(x(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,t){t||(t=this.position);var n="absolute"===e?1:-1,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&x.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():i?0:r.scrollTop())*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():i?0:r.scrollLeft())*n}},_generatePosition:function(e){var t,n,r=this.options,i=e.pageX,a=e.pageY,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&x.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(o[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(i=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(i=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),r.grid&&(t=this.originalPageY+Math.round((a-this.originalPageY)/r.grid[1])*r.grid[1],a=this.containment?t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-r.grid[1]:t+r.grid[1]:t,n=this.originalPageX+Math.round((i-this.originalPageX)/r.grid[0])*r.grid[0],i=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-r.grid[0]:n+r.grid[0]:n)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:o.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:o.scrollLeft())}},_rearrange:function(e,t,n,r){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var i=this.counter;this._delay(function(){i===this.counter&&this.refreshPositions(!r)})},_clear:function(e,t){this.reverting=!1;var n,r=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function i(t,n,r){return function(e){r._trigger(t,e,n._uiHash(n))}}for(this.fromOutside&&!t&&r.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||r.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(r.push(function(e){this._trigger("remove",e,this._uiHash())}),r.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;0<=n;n--)t||r.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(r.push(i("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(n=0;n<r.length;n++)r[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===x.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var t=e||this;return{helper:t.helper,placeholder:t.placeholder||x([]),position:t.position,originalPosition:t.originalPosition,offset:t.positionAbs,item:t.currentItem,sender:e?e.element:null}}});function y(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}x.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var r=this._super(),i=this.element;return x.each(["min","max","step"],function(e,t){var n=i.attr(t);null!=n&&n.length&&(r[t]=n)}),r},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e))},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((0<t?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(e){var t;function n(){this.element[0]===x.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=t,this._delay(function(){this.previous=t}))}t=this.element[0]===x.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),n.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,n.call(this)}),!1!==this._start(e)&&this._repeat(null,x(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(x(e.currentTarget).hasClass("ui-state-active"))return!1!==this._start(e)&&void this._repeat(null,x(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&0<this.uiSpinner.height()&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var t=this.options,n=x.ui.keyCode;switch(e.keyCode){case n.UP:return this._repeat(null,1,e),!0;case n.DOWN:return this._repeat(null,-1,e),!0;case n.PAGE_UP:return this._repeat(null,t.page,e),!0;case n.PAGE_DOWN:return this._repeat(null,-t.page,e),!0}return!1},_start:function(e){return!(!this.spinning&&!1===this._trigger("start",e))&&(this.counter||(this.counter=1),this.spinning=!0)},_repeat:function(e,t,n){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,n)},e),this._spin(t*this.options.step,n)},_spin:function(e,t){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+e*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",t,{value:n})||(this._value(n),this.counter++)},_increment:function(e){var t=this.options.incremental;return t?x.isFunction(t)?t(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return-1===n?0:t.length-n-1},_adjustValue:function(e){var t,n,r=this.options;return n=e-(t=null!==r.min?r.min:0),e=t+(n=Math.round(n/r.step)*r.step),e=parseFloat(e.toFixed(this._precision())),null!==r.max&&e>r.max?r.max:null!==r.min&&e<r.min?r.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){var n,r,i;if("culture"===e||"numberFormat"===e)return n=this._parse(this.element.val()),this.options[e]=t,void this.element.val(this._format(n));"max"!==e&&"min"!==e&&"step"!==e||"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(r=this.buttons.first().find(".ui-icon"),this._removeClass(r,null,this.options.icons.up),this._addClass(r,null,t.up),i=this.buttons.last().find(".ui-icon"),this._removeClass(i,null,this.options.icons.down),this._addClass(i,null,t.down)),this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!e),this.element.prop("disabled",!!e),this.buttons.button(e?"disable":"enable")},_setOptions:y(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null!==e&&e===this._adjustValue(e)},_value:function(e,t){var n;""!==e&&null!==(n=this._parse(e))&&(t||(n=this._adjustValue(n)),e=this._format(n)),this.element.val(e),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:y(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:y(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:y(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:y(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){if(!arguments.length)return this._parse(this.element.val());y(this._value).call(this,e)},widget:function(){return this.uiSpinner}}),!1!==x.uiBackCompat&&x.widget("ui.spinner",x.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});var w;x.ui.spinner;x.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(w=/#.*$/,function(e){var t,n;t=e.href.replace(w,""),n=location.href.replace(w,"");try{t=decodeURIComponent(t)}catch(e){}try{n=decodeURIComponent(n)}catch(e){}return 1<e.hash.length&&t===n}),_create:function(){var t=this,e=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,e.collapsible),this._processTabs(),e.active=this._initialActive(),x.isArray(e.disabled)&&(e.disabled=x.unique(e.disabled.concat(x.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(e.active):this.active=x(),this._refresh(),this.active.length&&this.load(e.active)},_initialActive:function(){var n=this.options.active,e=this.options.collapsible,r=location.hash.substring(1);return null===n&&(r&&this.tabs.each(function(e,t){if(x(t).attr("aria-controls")===r)return n=e,!1}),null===n&&(n=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==n&&-1!==n||(n=!!this.tabs.length&&0)),!1!==n&&-1===(n=this.tabs.index(this.tabs.eq(n)))&&(n=!e&&0),!e&&!1===n&&this.anchors.length&&(n=0),n},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):x()}},_tabKeydown:function(e){var t=x(x.ui.safeActiveElement(this.document[0])).closest("li"),n=this.tabs.index(t),r=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case x.ui.keyCode.RIGHT:case x.ui.keyCode.DOWN:n++;break;case x.ui.keyCode.UP:case x.ui.keyCode.LEFT:r=!1,n--;break;case x.ui.keyCode.END:n=this.anchors.length-1;break;case x.ui.keyCode.HOME:n=0;break;case x.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n);case x.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n!==this.options.active&&n);default:return}e.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,r),e.ctrlKey||e.metaKey||(t.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===x.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===x.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===x.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,t){var n=this.tabs.length-1;for(;-1!==x.inArray((n<e&&(e=0),e<0&&(e=n),e),this.options.disabled);)e=t?e+1:e-1;return e},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).trigger("focus"),e},_setOption:function(e,t){"active"!==e?(this._super(e,t),"collapsible"===e&&(this._toggleClass("ui-tabs-collapsible",null,t),t||!1!==this.options.active||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t)):this._activate(t)},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,t=this.tablist.children(":has(a[href])");e.disabled=x.map(t.filter(".ui-state-disabled"),function(e){return t.index(e)}),this._processTabs(),!1!==e.active&&this.anchors.length?this.active.length&&!x.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=x()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=x()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var c=this,e=this.tabs,t=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){x(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){x(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return x("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=x(),this.anchors.each(function(e,t){var n,r,i,a=x(t).uniqueId().attr("id"),o=x(t).closest("li"),s=o.attr("aria-controls");c._isLocal(t)?(i=(n=t.hash).substring(1),r=c.element.find(c._sanitizeSelector(n))):(n="#"+(i=o.attr("aria-controls")||x({}).uniqueId()[0].id),(r=c.element.find(n)).length||(r=c._createPanel(i)).insertAfter(c.panels[e-1]||c.tablist),r.attr("aria-live","polite")),r.length&&(c.panels=c.panels.add(r)),s&&o.data("ui-tabs-aria-controls",s),o.attr({"aria-controls":i,"aria-labelledby":a}),r.attr("aria-labelledby",a)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),e&&(this._off(e.not(this.tabs)),this._off(t.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return x("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var t,n,r;for(x.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),r=0;n=this.tabs[r];r++)t=x(n),!0===e||-1!==x.inArray(r,e)?(t.attr("aria-disabled","true"),this._addClass(t,null,"ui-state-disabled")):(t.removeAttr("aria-disabled"),this._removeClass(t,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===e)},_setupEvents:function(e){var n={};e&&x.each(e.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var n,t=this.element.parent();"fill"===e?(n=t.height(),n-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=x(this),t=e.css("position");"absolute"!==t&&"fixed"!==t&&(n-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){n-=x(this).outerHeight(!0)}),this.panels.each(function(){x(this).height(Math.max(0,n-x(this).innerHeight()+x(this).height()))}).css("overflow","auto")):"auto"===e&&(n=0,this.panels.each(function(){n=Math.max(n,x(this).height("").height())}).height(n))},_eventHandler:function(e){var t=this.options,n=this.active,r=x(e.currentTarget).closest("li"),i=r[0]===n[0],a=i&&t.collapsible,o=a?x():this._getPanelForTab(r),s=n.length?this._getPanelForTab(n):x(),c={oldTab:n,oldPanel:s,newTab:a?x():r,newPanel:o};e.preventDefault(),r.hasClass("ui-state-disabled")||r.hasClass("ui-tabs-loading")||this.running||i&&!t.collapsible||!1===this._trigger("beforeActivate",e,c)||(t.active=!a&&this.tabs.index(r),this.active=i?x():r,this.xhr&&this.xhr.abort(),s.length||o.length||x.error("jQuery UI Tabs: Mismatching fragment identifier."),o.length&&this.load(this.tabs.index(r),e),this._toggle(e,c))},_toggle:function(e,t){var n=this,r=t.newPanel,i=t.oldPanel;function a(){n.running=!1,n._trigger("activate",e,t)}function o(){n._addClass(t.newTab.closest("li"),"ui-tabs-active","ui-state-active"),r.length&&n.options.show?n._show(r,n.options.show,a):(r.show(),a())}this.running=!0,i.length&&this.options.hide?this._hide(i,this.options.hide,function(){n._removeClass(t.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),o()}):(this._removeClass(t.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),i.hide(),o()),i.attr("aria-hidden","true"),t.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),r.length&&i.length?t.oldTab.attr("tabIndex",-1):r.length&&this.tabs.filter(function(){return 0===x(this).attr("tabIndex")}).attr("tabIndex",-1),r.attr("aria-hidden","false"),t.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var t,n=this._findActive(e);n[0]!==this.active[0]&&(n.length||(n=this.active),t=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:x.noop}))},_findActive:function(e){return!1===e?x():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+x.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){x.data(this,"ui-tabs-destroy")?x(this).remove():x(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=x(this),t=e.data("ui-tabs-aria-controls");t?e.attr("aria-controls",t).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(n){var e=this.options.disabled;!1!==e&&(e=void 0!==n&&(n=this._getIndex(n),x.isArray(e)?x.map(e,function(e){return e!==n?e:null}):x.map(this.tabs,function(e,t){return t!==n?t:null})),this._setOptionDisabled(e))},disable:function(e){var t=this.options.disabled;if(!0!==t){if(void 0===e)t=!0;else{if(e=this._getIndex(e),-1!==x.inArray(e,t))return;t=x.isArray(t)?x.merge([e],t).sort():[e]}this._setOptionDisabled(t)}},load:function(e,r){e=this._getIndex(e);var i=this,n=this.tabs.eq(e),t=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),o={tab:n,panel:a},s=function(e,t){"abort"===t&&i.panels.stop(!1,!0),i._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),e===i.xhr&&delete i.xhr};this._isLocal(t[0])||(this.xhr=x.ajax(this._ajaxSettings(t,r,o)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(e,t,n){setTimeout(function(){a.html(e),i._trigger("load",r,o),s(n,t)},1)}).fail(function(e,t){setTimeout(function(){s(e,t)},1)})))},_ajaxSettings:function(e,n,r){var i=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,t){return i._trigger("beforeLoad",n,x.extend({jqXHR:e,ajaxSettings:t},r))}}},_getPanelForTab:function(e){var t=x(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+t))}}),!1!==x.uiBackCompat&&x.widget("ui.tabs",x.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});x.ui.tabs;x.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=x(this).attr("title")||"";return x("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,t){var n=(e.attr("aria-describedby")||"").split(/\s+/);n.push(t),e.data("ui-tooltip-id",t).attr("aria-describedby",x.trim(n.join(" ")))},_removeDescribedBy:function(e){var t=e.data("ui-tooltip-id"),n=(e.attr("aria-describedby")||"").split(/\s+/),r=x.inArray(t,n);-1!==r&&n.splice(r,1),e.removeData("ui-tooltip-id"),(n=x.trim(n.join(" ")))?e.attr("aria-describedby",n):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=x("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=x([])},_setOption:function(e,t){var n=this;this._super(e,t),"content"===e&&x.each(this.tooltips,function(e,t){n._updateContent(t.element)})},_setOptionDisabled:function(e){this[e?"_disable":"_enable"]()},_disable:function(){var r=this;x.each(this.tooltips,function(e,t){var n=x.Event("blur");n.target=n.currentTarget=t.element[0],r.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=x(this);if(e.is("[title]"))return e.data("ui-tooltip-title",e.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var e=x(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=x([])},open:function(e){var n=this,t=x(e?e.target:this.element).closest(this.options.items);t.length&&!t.data("ui-tooltip-id")&&(t.attr("title")&&t.data("ui-tooltip-title",t.attr("title")),t.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&t.parents().each(function(){var e,t=x(this);t.data("ui-tooltip-open")&&((e=x.Event("blur")).target=e.currentTarget=this,n.close(e,!0)),t.attr("title")&&(t.uniqueId(),n.parents[this.id]={element:this,title:t.attr("title")},t.attr("title",""))}),this._registerCloseHandlers(e,t),this._updateContent(t,e))},_updateContent:function(t,n){var e,r=this.options.content,i=this,a=n?n.type:null;if("string"==typeof r||r.nodeType||r.jquery)return this._open(n,t,r);(e=r.call(t[0],function(e){i._delay(function(){t.data("ui-tooltip-open")&&(n&&(n.type=a),this._open(n,t,e))})}))&&this._open(n,t,e)},_open:function(e,t,n){var r,i,a,o,s=x.extend({},this.options.position);function c(e){s.of=e,i.is(":hidden")||i.position(s)}n&&((r=this._find(t))?r.tooltip.find(".ui-tooltip-content").html(n):(t.is("[title]")&&(e&&"mouseover"===e.type?t.attr("title",""):t.removeAttr("title")),r=this._tooltip(t),i=r.tooltip,this._addDescribedBy(t,i.attr("id")),i.find(".ui-tooltip-content").html(n),this.liveRegion.children().hide(),(o=x("<div>").html(i.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),o.removeAttr("id").find("[id]").removeAttr("id"),o.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:c}),c(e)):i.position(x.extend({of:t},this.options.position)),i.hide(),this._show(i,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(a=this.delayedShow=setInterval(function(){i.is(":visible")&&(c(s.of),clearInterval(a))},x.fx.interval)),this._trigger("open",e,{tooltip:i})))},_registerCloseHandlers:function(e,n){var t={keyup:function(e){if(e.keyCode===x.ui.keyCode.ESCAPE){var t=x.Event(e);t.currentTarget=n[0],this.close(t,!0)}}};n[0]!==this.element[0]&&(t.remove=function(){this._removeTooltip(this._find(n).tooltip)}),e&&"mouseover"!==e.type||(t.mouseleave="close"),e&&"focusin"!==e.type||(t.focusout="close"),this._on(!0,n,t)},close:function(e){var t,n=this,r=x(e?e.currentTarget:this.element),i=this._find(r);i?(t=i.tooltip,i.closing||(clearInterval(this.delayedShow),r.data("ui-tooltip-title")&&!r.attr("title")&&r.attr("title",r.data("ui-tooltip-title")),this._removeDescribedBy(r),i.hiding=!0,t.stop(!0),this._hide(t,this.options.hide,function(){n._removeTooltip(x(this))}),r.removeData("ui-tooltip-open"),this._off(r,"mouseleave focusout keyup"),r[0]!==this.element[0]&&this._off(r,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&x.each(this.parents,function(e,t){x(t.element).attr("title",t.title),delete n.parents[e]}),i.closing=!0,this._trigger("close",e,{tooltip:t}),i.hiding||(i.closing=!1))):r.removeData("ui-tooltip-open")},_tooltip:function(e){var t=x("<div>").attr("role","tooltip"),n=x("<div>").appendTo(t),r=t.uniqueId().attr("id");return this._addClass(n,"ui-tooltip-content"),this._addClass(t,"ui-tooltip","ui-widget ui-widget-content"),t.appendTo(this._appendTo(e)),this.tooltips[r]={element:e,tooltip:t}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_appendTo:function(e){var t=e.closest(".ui-front, dialog");return t.length||(t=this.document[0].body),t},_destroy:function(){var i=this;x.each(this.tooltips,function(e,t){var n=x.Event("blur"),r=t.element;n.target=n.currentTarget=r[0],i.close(n,!0),x("#"+e).remove(),r.data("ui-tooltip-title")&&(r.attr("title")||r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==x.uiBackCompat&&x.widget("ui.tooltip",x.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var e=this._superApply(arguments);return this.options.tooltipClass&&e.tooltip.addClass(this.options.tooltipClass),e}});x.ui.tooltip}),function(e,w,t){"use strict";w.module("ui.sortable",[]).value("uiSortableConfig",{items:"> [ng-repeat],> [data-ng-repeat],> [x-ng-repeat]"}).directive("uiSortable",["uiSortableConfig","$timeout","$log",function(b,v,y){return{require:"?ngModel",scope:{ngModel:"=",uiSortable:"="},link:function(c,l,e,a){var u;function n(e,t){var n=t&&"function"==typeof t;return e&&"function"==typeof e&&n?function(){e.apply(this,arguments),t.apply(this,arguments)}:n?t:e}function o(e){var t=e.data("ui-sortable");return t&&"object"==typeof t&&"ui-sortable"===t.widgetFullName?t:null}function s(e,t){return m[e]?("stop"===e&&(t=n(t=n(t,function(){c.$apply()}),r)),t=n(m[e],t)):g[e]&&(t=g[e](t)),t||("items"===e?t=b.items:"ui-model-items"===e&&(t=b.items)),t}function i(r,e,n){w.forEach(m,function(e,t){t in h||(h[t]=null)});var i,a=null;e&&w.forEach(e,function(e,t){if(!(r&&t in r)){if(t in p)return void(h[t]="ui-floating"===t?"auto":s(t,void 0));i||(i=w.element.ui.sortable().options);var n=i[t];n=s(t,n),a||(a={}),a[t]=n,h[t]=n}});return w.forEach(r,function(e,t){if(t in p)return"ui-floating"!==t||!1!==e&&!0!==e||!n||(n.floating=e),void(h[t]=s(t,e));e=s(t,e),a||(a={}),a[t]=e,h[t]=e}),a}function f(e,t,n){var r,i,a=null;return r=t,("clone"===(i=e.sortable("option","helper"))||"function"==typeof i&&r.item.sortable.isCustomHelperUsed())&&"parent"===e.sortable("option","appendTo")&&(a=n.last()),a}function r(e,t){t.item.sortable._destroy()}function d(e){return e.item.parent().find(h["ui-model-items"]).index(e.item)}var h={},p={"ui-floating":void 0,"ui-model-items":b.items},m={receive:null,remove:null,start:null,stop:null,update:null},g={helper:null};function t(){c.$watchCollection("ngModel",function(){v(function(){o(l)&&l.sortable("refresh")},0,!1)}),m.start=function(e,n){if("auto"===h["ui-floating"]){var t=n.item.siblings();o(w.element(e.target)).floating=/left|right/.test((r=t).css("float"))||/inline|table-cell/.test(r.css("display"))}var r,i=d(n);n.item.sortable={model:a.$modelValue[i],index:i,source:n.item.parent(),sourceModel:a.$modelValue,cancel:function(){n.item.sortable._isCanceled=!0},isCanceled:function(){return n.item.sortable._isCanceled},isCustomHelperUsed:function(){return!!n.item.sortable._isCustomHelperUsed},_isCanceled:!1,_isCustomHelperUsed:n.item.sortable._isCustomHelperUsed,_destroy:function(){w.forEach(n.item.sortable,function(e,t){n.item.sortable[t]=void 0})}}},m.activate=function(e,t){u=l.contents();var n,r,i,a=function(e){var t=e.sortable("option","placeholder");if(t&&t.element&&"function"==typeof t.element){var n=t.element();return n=w.element(n)}return null}(l);if(a&&a.length){var o=(n=l,r=a,i=h["ui-model-items"].replace(/[^,]*>/g,""),n.find('[class="'+r.attr("class")+'"]:not('+i+")"));u=u.not(o)}var s=t.item.sortable._connectedSortables||[];s.push({element:l,scope:c}),t.item.sortable._connectedSortables=s},m.update=function(e,t){if(!t.item.sortable.received){t.item.sortable.dropindex=d(t);var n=t.item.parent();t.item.sortable.droptarget=n;var r=function(e,t){for(var n=null,r=0;r<e.length;r++){var i=e[r];if(i.element[0]===t[0]){n=i.scope;break}}return n}(t.item.sortable._connectedSortables,n);t.item.sortable.droptargetModel=r.ngModel,l.sortable("cancel")}var i=!t.item.sortable.received&&f(l,t,u);i&&i.length&&(u=u.not(i)),u.appendTo(l),t.item.sortable.received&&(u=null),t.item.sortable.received&&!t.item.sortable.isCanceled()&&c.$apply(function(){a.$modelValue.splice(t.item.sortable.dropindex,0,t.item.sortable.moved)})},m.stop=function(e,t){if(!t.item.sortable.received&&"dropindex"in t.item.sortable&&!t.item.sortable.isCanceled())c.$apply(function(){a.$modelValue.splice(t.item.sortable.dropindex,0,a.$modelValue.splice(t.item.sortable.index,1)[0])});else if((!("dropindex"in t.item.sortable)||t.item.sortable.isCanceled())&&!w.equals(l.contents(),u)){var n=f(l,t,u);n&&n.length&&(u=u.not(n)),u.appendTo(l)}u=null},m.receive=function(e,t){t.item.sortable.received=!0},m.remove=function(e,t){"dropindex"in t.item.sortable||(l.sortable("cancel"),t.item.sortable.cancel()),t.item.sortable.isCanceled()||c.$apply(function(){t.item.sortable.moved=a.$modelValue.splice(t.item.sortable.index,1)[0]})},g.helper=function(r){return r&&"function"==typeof r?function(e,t){var n=r.apply(this,arguments);return t.sortable._isCustomHelperUsed=t!==n,n}:r},c.$watchCollection("uiSortable",function(e,t){var n=o(l);if(n){var r=i(e,t,n);r&&l.sortable("option",r)}},!0),i(h)}function _(){return(!c.uiSortable||!c.uiSortable.disabled)&&(a?t():y.info("ui.sortable: ngModel not provided!",l),l.sortable(h),_.cancelWatcher(),_.cancelWatcher=w.noop,!0)}w.extend(h,p,b,c.uiSortable),w.element.fn&&w.element.fn.jquery?(_.cancelWatcher=w.noop,_()||(_.cancelWatcher=c.$watch("uiSortable.disabled",_))):y.error("ui.sortable: jQuery should be included before AngularJS!")}}}])}(window,window.angular),function(){"use strict";angular.module("ui.tree",[]).constant("treeConfig",{treeClass:"angular-ui-tree",emptyTreeClass:"angular-ui-tree-empty",hiddenClass:"angular-ui-tree-hidden",nodesClass:"angular-ui-tree-nodes",nodeClass:"angular-ui-tree-node",handleClass:"angular-ui-tree-handle",placeholderClass:"angular-ui-tree-placeholder",dragClass:"angular-ui-tree-drag",dragThreshold:3,levelThreshold:30,defaultCollapsed:!1})}(),function(){"use strict";angular.module("ui.tree").controller("TreeHandleController",["$scope","$element",function(e,t){(this.scope=e).$element=t,e.$nodeScope=null,e.$type="uiTreeHandle"}])}(),function(){"use strict";angular.module("ui.tree").controller("TreeNodeController",["$scope","$element",function(n,r){(this.scope=n).$element=r,n.$modelValue=null,n.$parentNodeScope=null,n.$childNodesScope=null,n.$parentNodesScope=null,n.$treeScope=null,n.$handleScope=null,n.$type="uiTreeNode",n.$$allowNodeDrop=!1,n.collapsed=!1,n.init=function(e){var t=e[0];n.$treeScope=e[1]?e[1].scope:null,n.$parentNodeScope=t.scope.$nodeScope,n.$modelValue=t.scope.$modelValue[n.$index],n.$parentNodesScope=t.scope,t.scope.initSubNode(n),r.on("$destroy",function(){t.scope.destroySubNode(n)})},n.index=function(){return n.$parentNodesScope.$modelValue.indexOf(n.$modelValue)},n.dragEnabled=function(){return!(n.$treeScope&&!n.$treeScope.dragEnabled)},n.isSibling=function(e){return n.$parentNodesScope==e.$parentNodesScope},n.isChild=function(e){var t=n.childNodes();return t&&-1<t.indexOf(e)},n.prev=function(){var e=n.index();return 0<e?n.siblings()[e-1]:null},n.siblings=function(){return n.$parentNodesScope.childNodes()},n.childNodesCount=function(){return n.childNodes()?n.childNodes().length:0},n.hasChild=function(){return 0<n.childNodesCount()},n.childNodes=function(){return n.$childNodesScope&&n.$childNodesScope.$modelValue?n.$childNodesScope.childNodes():null},n.accept=function(e,t){return n.$childNodesScope&&n.$childNodesScope.$modelValue&&n.$childNodesScope.accept(e,t)},n.remove=function(){return n.$parentNodesScope.removeNode(n)},n.toggle=function(){n.collapsed=!n.collapsed},n.collapse=function(){n.collapsed=!0},n.expand=function(){n.collapsed=!1},n.depth=function(){var e=n.$parentNodeScope;return e?e.depth()+1:1},n.maxSubDepth=function(){return n.$childNodesScope?function e(t){var n,r,i=0,a=t.childNodes();if(!a||0===a.length)return 0;for(r=a.length-1;0<=r;r--)n=1+e(a[r]),i=Math.max(i,n);return i}(n.$childNodesScope):0}}])}(),function(){"use strict";angular.module("ui.tree").controller("TreeNodesController",["$scope","$element",function(n,e){(this.scope=n).$element=e,n.$modelValue=null,n.$nodeScope=null,n.$treeScope=null,n.$type="uiTreeNodes",n.$nodesMap={},n.nodropEnabled=!1,n.maxDepth=0,n.cloneEnabled=!1,n.initSubNode=function(e){if(!e.$modelValue)return null;n.$nodesMap[e.$modelValue.$$hashKey]=e},n.destroySubNode=function(e){if(!e.$modelValue)return null;n.$nodesMap[e.$modelValue.$$hashKey]=null},n.accept=function(e,t){return n.$treeScope.$callbacks.accept(e,n,t)},n.beforeDrag=function(e){return n.$treeScope.$callbacks.beforeDrag(e)},n.isParent=function(e){return e.$parentNodesScope==n},n.hasChild=function(){return 0<n.$modelValue.length},n.safeApply=function(e){var t=this.$root.$$phase;"$apply"==t||"$digest"==t?e&&"function"==typeof e&&e():this.$apply(e)},n.removeNode=function(e){var t=n.$modelValue.indexOf(e.$modelValue);return-1<t?(n.safeApply(function(){n.$modelValue.splice(t,1)[0]}),n.$treeScope.$callbacks.removed(e)):null},n.insertNode=function(e,t){n.safeApply(function(){n.$modelValue.splice(e,0,t)})},n.childNodes=function(){var e,t=[];if(n.$modelValue)for(e=0;e<n.$modelValue.length;e++)t.push(n.$nodesMap[n.$modelValue[e].$$hashKey]);return t},n.depth=function(){return n.$nodeScope?n.$nodeScope.depth():0},n.outOfDepth=function(e){var t=n.maxDepth||n.$treeScope.maxDepth;return 0<t&&n.depth()+e.maxSubDepth()+1>t}}])}(),function(){"use strict";angular.module("ui.tree").controller("TreeController",["$scope","$element",function(t,e){(this.scope=t).$element=e,t.$nodesScope=null,t.$type="uiTree",t.$emptyElm=null,t.$callbacks=null,t.dragEnabled=!0,t.emptyPlaceholderEnabled=!0,t.maxDepth=0,t.dragDelay=0,t.cloneEnabled=!1,t.nodropEnabled=!1,t.isEmpty=function(){return t.$nodesScope&&t.$nodesScope.$modelValue&&0===t.$nodesScope.$modelValue.length},t.place=function(e){t.$nodesScope.$element.append(e),t.$emptyElm.remove()},this.resetEmptyElement=function(){t.$nodesScope.$modelValue&&0!==t.$nodesScope.$modelValue.length||!t.emptyPlaceholderEnabled?t.$emptyElm.remove():e.append(t.$emptyElm)},t.resetEmptyElement=this.resetEmptyElement}])}(),function(){"use strict";angular.module("ui.tree").directive("uiTree",["treeConfig","$window",function(l,u){return{restrict:"A",scope:!0,controller:"TreeController",link:function(n,e,t,r){var i,a,o,s={accept:null,beforeDrag:null},c={};angular.extend(c,l),c.treeClass&&e.addClass(c.treeClass),"table"===e.prop("tagName").toLowerCase()?(n.$emptyElm=angular.element(u.document.createElement("tr")),o=0<(a=e.find("tr")).length?angular.element(a).children().length:1e6,i=angular.element(u.document.createElement("td")).attr("colspan",o),n.$emptyElm.append(i)):n.$emptyElm=angular.element(u.document.createElement("div")),c.emptyTreeClass&&n.$emptyElm.addClass(c.emptyTreeClass),n.$watch("$nodesScope.$modelValue.length",function(e){angular.isNumber(e)&&r.resetEmptyElement()},!0),n.$watch(t.dragEnabled,function(e){"boolean"==typeof e&&(n.dragEnabled=e)}),n.$watch(t.emptyPlaceholderEnabled,function(e){"boolean"==typeof e&&(n.emptyPlaceholderEnabled=e,r.resetEmptyElement())}),n.$watch(t.nodropEnabled,function(e){"boolean"==typeof e&&(n.nodropEnabled=e)}),n.$watch(t.cloneEnabled,function(e){"boolean"==typeof e&&(n.cloneEnabled=e)}),n.$watch(t.maxDepth,function(e){"number"==typeof e&&(n.maxDepth=e)}),n.$watch(t.dragDelay,function(e){"number"==typeof e&&(n.dragDelay=e)}),s.accept=function(e,t,n){return!(t.nodropEnabled||t.$treeScope.nodropEnabled||t.outOfDepth(e))},s.beforeDrag=function(e){return!0},s.removed=function(e){},s.dropped=function(e){},s.dragStart=function(e){},s.dragMove=function(e){},s.dragStop=function(e){},s.beforeDrop=function(e){},n.$watch(t.uiTree,function(e,t){angular.forEach(e,function(e,t){s[t]&&"function"==typeof e&&(s[t]=e)}),n.$callbacks=s},!0)}}}])}(),function(){"use strict";angular.module("ui.tree").directive("uiTreeHandle",["treeConfig",function(a){return{require:"^uiTreeNode",restrict:"A",scope:!0,controller:"TreeHandleController",link:function(e,t,n,r){var i={};angular.extend(i,a),i.handleClass&&t.addClass(i.handleClass),e!=r.scope&&(e.$nodeScope=r.scope,r.scope.$handleScope=e)}}}])}(),function(){"use strict";angular.module("ui.tree").directive("uiTreeNode",["treeConfig","UiTreeHelper","$window","$document","$timeout","$q","$rootElement",function(O,R,N,L,F,G,j){return{require:["^uiTreeNodes","^uiTree"],restrict:"A",controller:"TreeNodeController",link:function(g,f,t,e){var _,b,v,y,d,w,C,A,S,n,r,i,a,o,s,c,l,u,h,p,m,T,x,k,E,D={},I="ontouchstart"in window,P=null,M=document.body,$=document.documentElement;angular.extend(D,O),D.nodeClass&&f.addClass(D.nodeClass),g.init(e),g.collapsed=!!R.getNodeAttribute(g,"collapsed")||O.defaultCollapsed,g.sourceOnly=g.nodropEnabled||g.$treeScope.nodropEnabled,g.$watch(t.collapsed,function(e){"boolean"==typeof e&&(g.collapsed=e)}),g.$watch("collapsed",function(e){R.setNodeAttribute(g,"collapsed",e),t.$set("collapsed",e)}),g.$on("angular-ui-tree:collapse-all",function(){g.collapsed=!0}),g.$on("angular-ui-tree:expand-all",function(){g.collapsed=!1}),n=function(e){if((I||2!==e.button&&3!==e.which)&&!(e.uiTreeDragging||e.originalEvent&&e.originalEvent.uiTreeDragging)){var t,n,r,i,a,o,s,c,l,u=angular.element(e.target);if((t=R.treeNodeHandlerContainerOfElement(u))&&(u=angular.element(t)),n=f.clone(),c=R.elementIsTreeNode(u),l=R.elementIsTreeNodeHandle(u),(c||l)&&!(c&&R.elementContainsTreeNodeHandler(u)||"input"==(r=u.prop("tagName").toLowerCase())||"textarea"==r||"button"==r||"select"==r)){for(k=angular.element(e.target);k&&k[0]&&k[0]!==f;){if(R.nodrag(k))return;k=k.parent()}g.beforeDrag(g)&&(e.uiTreeDragging=!0,e.originalEvent&&(e.originalEvent.uiTreeDragging=!0),e.preventDefault(),a=R.eventObj(e),_=!0,b=R.dragInfo(g),"tr"===(i=f.prop("tagName")).toLowerCase()?(y=angular.element(N.document.createElement(i)),o=angular.element(N.document.createElement("td")).addClass(D.placeholderClass).attr("colspan",f[0].children.length),y.append(o)):y=angular.element(N.document.createElement(i)).addClass(D.placeholderClass),d=angular.element(N.document.createElement(i)),D.hiddenClass&&d.addClass(D.hiddenClass),v=R.positionStarted(a,f),y.css("height",R.height(f)+"px"),(w=angular.element(N.document.createElement(g.$parentNodesScope.$element.prop("tagName"))).addClass(g.$parentNodesScope.$element.attr("class")).addClass(D.dragClass)).css("width",R.width(f)+"px"),w.css("z-index",9999),(s=(f[0].querySelector(".angular-ui-tree-handle")||f[0]).currentStyle)&&(document.body.setAttribute("ui-tree-cursor",L.find("body").css("cursor")||""),L.find("body").css({cursor:s.cursor+"!important"})),g.sourceOnly&&y.css("display","none"),f.after(y),f.after(d),b.isClone()&&g.sourceOnly?w.append(n):w.append(f),j.append(w),w.css({left:a.pageX-v.offsetX+"px",top:a.pageY-v.offsetY+"px"}),C={placeholder:y,dragging:w},h(),g.$apply(function(){g.$treeScope.$callbacks.dragStart(b.eventArgs(C,v))}),A=Math.max(M.scrollHeight,M.offsetHeight,$.clientHeight,$.scrollHeight,$.offsetHeight),S=Math.max(M.scrollWidth,M.offsetWidth,$.clientWidth,$.scrollWidth,$.offsetWidth))}}},r=function(e){var t,n,r,i,a,o,s,c,l,u,f,d,h,p,m=R.eventObj(e);if(w){if(e.preventDefault(),N.getSelection?N.getSelection().removeAllRanges():N.document.selection&&N.document.selection.empty(),(n=m.pageX-v.offsetX)<0&&(n=0),(r=m.pageY-v.offsetY)<0&&(r=0),A<r+10&&(r=A-10),S<n+10&&(n=S-10),w.css({left:n+"px",top:r+"px"}),(a=(i=window.pageYOffset||N.document.documentElement.scrollTop)+(window.innerHeight||N.document.clientHeight||N.document.clientHeight))<m.pageY&&a<=A&&window.scrollBy(0,10),i>m.pageY&&window.scrollBy(0,-10),R.positionMoved(e,v,_),_)return void(_=!1);if(R.offset(w).left-R.offset(y).left>=D.threshold,s=m.pageX-(N.pageXOffset||N.document.body.scrollLeft||N.document.documentElement.scrollLeft)-(N.document.documentElement.clientLeft||0),c=m.pageY-(N.pageYOffset||N.document.body.scrollTop||N.document.documentElement.scrollTop)-(N.document.documentElement.clientTop||0),angular.isFunction(w.hide)?w.hide():(l=w[0].style.display,w[0].style.display="none"),N.document.elementFromPoint(s,c),f=angular.element(N.document.elementFromPoint(s,c)),(x=R.treeNodeHandlerContainerOfElement(f))&&(f=angular.element(x)),angular.isFunction(w.show)?w.show():w[0].style.display=l,(T=!(R.elementIsTreeNodeHandle(f)||R.elementIsTreeNode(f)||R.elementIsTreeNodes(f)||R.elementIsTree(f)||R.elementIsPlaceholder(f)))&&(y.remove(),P&&(P.resetEmptyElement(),P=null)),v.dirAx&&v.distAxX>=D.levelThreshold&&((v.distAxX=0)<v.distX&&(t=b.prev())&&!t.collapsed&&t.accept(g,t.childNodesCount())&&(t.$childNodesScope.$element.append(y),b.moveTo(t.$childNodesScope,t.childNodes(),t.childNodesCount())),v.distX<0&&(b.next()||(o=b.parentNode())&&o.$parentNodesScope.accept(g,o.index()+1)&&(o.$element.after(y),b.moveTo(o.$parentNodesScope,o.siblings(),o.index()+1)))),!v.dirAx){if(R.elementIsTree(f)?u=f.controller("uiTree").scope:R.elementIsTreeNodeHandle(f)?u=f.controller("uiTreeHandle").scope:R.elementIsTreeNode(f)?u=f.controller("uiTreeNode").scope:R.elementIsTreeNodes(f)?u=f.controller("uiTreeNodes").scope:R.elementIsPlaceholder(f)?u=f.controller("uiTreeNodes").scope:f.controller("uiTreeNode")&&(u=f.controller("uiTreeNode").scope),d=!1,!u)return;if(!u.$treeScope||u.$parent.nodropEnabled||u.$treeScope.nodropEnabled||y.css("display",""),"uiTree"==u.$type&&u.dragEnabled&&(d=u.isEmpty()),"uiTreeHandle"==u.$type&&(u=u.$nodeScope),"uiTreeNode"!=u.$type&&!d)return;P&&y.parent()[0]!=P.$element[0]&&(P.resetEmptyElement(),P=null),d?(P=u).$nodesScope.accept(g,0)&&(u.place(y),b.moveTo(u.$nodesScope,u.$nodesScope.childNodes(),0)):u.dragEnabled()&&(f=u.$element,h=R.offset(f),p=u.horizontal?m.pageX<h.left+R.width(f)/2:m.pageY<h.top+R.height(f)/2,u.$parentNodesScope.accept(g,u.index())?p?(f[0].parentNode.insertBefore(y[0],f[0]),b.moveTo(u.$parentNodesScope,u.siblings(),u.index())):(f.after(y),b.moveTo(u.$parentNodesScope,u.siblings(),u.index()+1)):!p&&u.accept(g,u.childNodesCount())?(u.$childNodesScope.$element.append(y),b.moveTo(u.$childNodesScope,u.childNodes(),u.childNodesCount())):T=!0)}g.$apply(function(){g.$treeScope.$callbacks.dragMove(b.eventArgs(C,v))})}},i=function(e){var t=b.eventArgs(C,v);e.preventDefault(),p(),g.$treeScope.$apply(function(){G.when(g.$treeScope.$callbacks.beforeDrop(t)).then(function(e){!1!==e&&g.$$allowNodeDrop&&!T?(b.apply(),g.$treeScope.$callbacks.dropped(t)):u()}).catch(function(){u()}).finally(function(){d.replaceWith(g.$element),y.remove(),w&&(w.remove(),w=null),g.$treeScope.$callbacks.dragStop(t),g.$$allowNodeDrop=!1,b=null;var e=document.body.getAttribute("ui-tree-cursor");null!==e&&(L.find("body").css({cursor:e}),document.body.removeAttribute("ui-tree-cursor"))})})},a=function(e){g.dragEnabled()&&n(e)},o=function(e){r(e)},s=function(e){g.$$allowNodeDrop=!0,i(e)},c=function(e){i(e)},l={exec:function(e,t){t||(t=0),this.cancel(),E=F(e,t)},cancel:function(){F.cancel(E)}},(u=function(){f.bind("touchstart mousedown",function(e){l.exec(function(){a(e)},g.dragDelay||0)}),f.bind("touchend touchcancel mouseup",function(){l.cancel()})})(),h=function(){angular.element(L).bind("touchend",s),angular.element(L).bind("touchcancel",s),angular.element(L).bind("touchmove",o),angular.element(L).bind("mouseup",s),angular.element(L).bind("mousemove",o),angular.element(L).bind("mouseleave",c)},p=function(){angular.element(L).unbind("touchend",s),angular.element(L).unbind("touchcancel",s),angular.element(L).unbind("touchmove",o),angular.element(L).unbind("mouseup",s),angular.element(L).unbind("mousemove",o),angular.element(L).unbind("mouseleave",c)},m=function(e){27==e.keyCode&&(g.$$allowNodeDrop=!1,i(e))},angular.element(N.document).bind("keydown",m),g.$on("$destroy",function(){angular.element(N.document).unbind("keydown",m)})}}}])}(),function(){"use strict";angular.module("ui.tree").directive("uiTreeNodes",["treeConfig","$window",function(c){return{require:["ngModel","?^uiTreeNode","^uiTree"],restrict:"A",scope:!0,controller:"TreeNodesController",link:function(t,e,n,r){var i={},a=r[0],o=r[1],s=r[2];angular.extend(i,c),i.nodesClass&&e.addClass(i.nodesClass),o?(o.scope.$childNodesScope=t).$nodeScope=o.scope:s.scope.$nodesScope=t,t.$treeScope=s.scope,a&&(a.$render=function(){t.$modelValue=a.$modelValue}),t.$watch(function(){return n.maxDepth},function(e){"number"==typeof e&&(t.maxDepth=e)}),t.$watch(function(){return n.nodropEnabled},function(e){void 0!==e&&(t.nodropEnabled=!0)},!0),n.$observe("horizontal",function(e){t.horizontal=void 0!==e})}}}])}(),function(){"use strict";angular.module("ui.tree").factory("UiTreeHelper",["$document","$window","treeConfig",function(n,r,t){return{nodesData:{},setNodeAttribute:function(e,t,n){if(!e.$modelValue)return null;var r=this.nodesData[e.$modelValue.$$hashKey];r||(r={},this.nodesData[e.$modelValue.$$hashKey]=r),r[t]=n},getNodeAttribute:function(e,t){if(!e.$modelValue)return null;var n=this.nodesData[e.$modelValue.$$hashKey];return n?n[t]:null},nodrag:function(e){return void 0!==e.attr("data-nodrag")&&"false"!==e.attr("data-nodrag")},eventObj:function(e){var t=e;return void 0!==e.targetTouches?t=e.targetTouches.item(0):void 0!==e.originalEvent&&void 0!==e.originalEvent.targetTouches&&(t=e.originalEvent.targetTouches.item(0)),t},dragInfo:function(e){return{source:e,sourceInfo:{cloneModel:!0===e.$treeScope.cloneEnabled?angular.copy(e.$modelValue):void 0,nodeScope:e,index:e.index(),nodesScope:e.$parentNodesScope},index:e.index(),siblings:e.siblings().slice(0),parent:e.$parentNodesScope,moveTo:function(e,t,n){this.parent=e,this.siblings=t.slice(0);var r=this.siblings.indexOf(this.source);-1<r&&(this.siblings.splice(r,1),this.source.index()<n&&n--),this.siblings.splice(n,0,this.source),this.index=n},parentNode:function(){return this.parent.$nodeScope},prev:function(){return 0<this.index?this.siblings[this.index-1]:null},next:function(){return this.index<this.siblings.length-1?this.siblings[this.index+1]:null},isClone:function(){return!0===this.source.$treeScope.cloneEnabled},clonedNode:function(e){return angular.copy(e)},isDirty:function(){return this.source.$parentNodesScope!=this.parent||this.source.index()!=this.index},isForeign:function(){return this.source.$treeScope!==this.parent.$treeScope},eventArgs:function(e,t){return{source:this.sourceInfo,dest:{index:this.index,nodesScope:this.parent},elements:e,pos:t}},apply:function(){var e=this.source.$modelValue;this.parent.nodropEnabled||this.parent.$treeScope.nodropEnabled||this.isDirty()&&(this.isClone()&&this.isForeign()?this.parent.insertNode(this.index,this.sourceInfo.cloneModel):(this.source.remove(),this.parent.insertNode(this.index,e)))}}},height:function(e){return e.prop("scrollHeight")},width:function(e){return e.prop("scrollWidth")},offset:function(e){var t=e[0].getBoundingClientRect();return{width:e.prop("offsetWidth"),height:e.prop("offsetHeight"),top:t.top+(r.pageYOffset||n[0].body.scrollTop||n[0].documentElement.scrollTop),left:t.left+(r.pageXOffset||n[0].body.scrollLeft||n[0].documentElement.scrollLeft)}},positionStarted:function(e,t){var n={},r=e.pageX,i=e.pageY;return e.originalEvent&&e.originalEvent.touches&&0<e.originalEvent.touches.length&&(r=e.originalEvent.touches[0].pageX,i=e.originalEvent.touches[0].pageY),n.offsetX=r-this.offset(t).left,n.offsetY=i-this.offset(t).top,n.startX=n.lastX=r,n.startY=n.lastY=i,n.nowX=n.nowY=n.distX=n.distY=n.dirAx=0,n.dirX=n.dirY=n.lastDirX=n.lastDirY=n.distAxX=n.distAxY=0,n},positionMoved:function(e,t,n){var r,i=e.pageX,a=e.pageY;if(e.originalEvent&&e.originalEvent.touches&&0<e.originalEvent.touches.length&&(i=e.originalEvent.touches[0].pageX,a=e.originalEvent.touches[0].pageY),t.lastX=t.nowX,t.lastY=t.nowY,t.nowX=i,t.nowY=a,t.distX=t.nowX-t.lastX,t.distY=t.nowY-t.lastY,t.lastDirX=t.dirX,t.lastDirY=t.dirY,t.dirX=0===t.distX?0:0<t.distX?1:-1,t.dirY=0===t.distY?0:0<t.distY?1:-1,r=Math.abs(t.distX)>Math.abs(t.distY)?1:0,n)return t.dirAx=r,void(t.moving=!0);t.dirAx!==r?(t.distAxX=0,t.distAxY=0):(t.distAxX+=Math.abs(t.distX),0!==t.dirX&&t.dirX!==t.lastDirX&&(t.distAxX=0),t.distAxY+=Math.abs(t.distY),0!==t.dirY&&t.dirY!==t.lastDirY&&(t.distAxY=0)),t.dirAx=r},elementIsTreeNode:function(e){return void 0!==e.attr("ui-tree-node")},elementIsTreeNodeHandle:function(e){return void 0!==e.attr("ui-tree-handle")},elementIsTree:function(e){return void 0!==e.attr("ui-tree")},elementIsTreeNodes:function(e){return void 0!==e.attr("ui-tree-nodes")},elementIsPlaceholder:function(e){return e.hasClass(t.placeholderClass)},elementContainsTreeNodeHandler:function(e){return 1<=e[0].querySelectorAll("[ui-tree-handle]").length},treeNodeHandlerContainerOfElement:function(e){return function(e,t){if(void 0===t)return null;var n=t.parentNode,r="function"==typeof n.setAttribute&&n.hasAttribute(e)?n:null;for(;n&&"function"==typeof n.setAttribute&&!n.hasAttribute(e);){if(n=n.parentNode,(r=n)===document.documentElement){r=null;break}0}return r}("ui-tree-handle",e[0])}}}])}(),function(){var _=window.ResizeSensor;"undefined"!=typeof module&&void 0!==module.exports&&(_=require("./ResizeSensor"));var t=this.ElementQueries=function(){var d=!1,h=[];function a(e){e||(e=document.documentElement);var t=getComputedStyle(e,"fontSize");return parseFloat(t)||16}function f(e,t){var n=t.replace(/[0-9]*/,"");switch(t=parseFloat(t),n){case"px":return t;case"em":return t*a(e);case"rem":return t*a();case"vw":return t*document.documentElement.clientWidth/100;case"vh":return t*document.documentElement.clientHeight/100;case"vmin":case"vmax":var r=document.documentElement.clientWidth/100,i=document.documentElement.clientHeight/100;return t*(0,Math["vmin"===n?"min":"max"])(r,i);default:return t}}function n(e){this.element=e,this.options={};var t,n,r,i,a,o,s,c=0,l=0;this.addOption=function(e){var t=[e.mode,e.property,e.value].join(",");this.options[t]=e};var u=["min-width","min-height","max-width","max-height"];this.call=function(){for(t in c=this.element.offsetWidth,l=this.element.offsetHeight,a={},this.options)this.options.hasOwnProperty(t)&&(n=this.options[t],r=f(this.element,n.value),i="width"==n.property?c:l,s=n.mode+"-"+n.property,o="","min"==n.mode&&r<=i&&(o+=n.value),"max"==n.mode&&i<=r&&(o+=n.value),a[s]||(a[s]=""),o&&-1===(" "+a[s]+" ").indexOf(" "+o+" ")&&(a[s]+=" "+o));for(var e in u)u.hasOwnProperty(e)&&(a[u[e]]?this.element.setAttribute(u[e],a[u[e]].substr(1)):this.element.removeAttribute(u[e]))}}function s(e,t){e.elementQueriesSetupInformation?e.elementQueriesSetupInformation.addOption(t):(e.elementQueriesSetupInformation=new n(e),e.elementQueriesSetupInformation.addOption(t),e.elementQueriesSensor=new _(e,function(){e.elementQueriesSetupInformation.call()})),e.elementQueriesSetupInformation.call(),d&&h.indexOf(e)<0&&h.push(e)}var c={};function l(){var e;if(document.querySelectorAll&&(e=document.querySelectorAll.bind(document)),e||"undefined"==typeof $$||(e=$$),e||"undefined"==typeof jQuery||(e=jQuery),!e)throw"No document.querySelectorAll, jQuery or Mootools's $$ found.";return e}function i(r){var i=[],a=[],o=[],s=0,c=-1,l=[];for(var e in r.children)if(r.children.hasOwnProperty(e)&&r.children[e].tagName&&"img"===r.children[e].tagName.toLowerCase()){i.push(r.children[e]);var t=r.children[e].getAttribute("min-width")||r.children[e].getAttribute("data-min-width"),n=r.children[e].getAttribute("data-src")||r.children[e].getAttribute("url");o.push(n);var u={minWidth:t};a.push(u),t?r.children[e].style.display="none":(s=i.length-1,r.children[e].style.display="block")}function f(){var e,t=!1;for(e in i)i.hasOwnProperty(e)&&a[e].minWidth&&r.offsetWidth>a[e].minWidth&&(t=e);if(t||(t=s),c!=t)if(l[t])i[c].style.display="none",i[t].style.display="block",c=t;else{var n=new Image;n.onload=function(){i[t].src=o[t],i[c].style.display="none",i[t].style.display="block",l[t]=!0,c=t},n.src=o[t]}else i[t].src=o[t]}c=s,r.resizeSensor=new _(r,f),f(),d&&h.push(r)}var u=/,?[\s\t]*([^,\n]*?)((?:\[[\s\t]*?(?:min|max)-(?:width|height)[\s\t]*?[~$\^]?=[\s\t]*?"[^"]*?"[\s\t]*?])+)([^,\n\s\{]*)/gim,p=/\[[\s\t]*?(min|max)-(width|height)[\s\t]*?[~$\^]?=[\s\t]*?"([^"]*?)"[\s\t]*?]/gim;function o(e){var t,n,r,i,a,o;for(e=e.replace(/'/g,'"');null!==(t=u.exec(e));)for(n=t[1]+t[3],attrs=t[2];null!==(attrMatch=p.exec(attrs));)r=n,i=attrMatch[1],a=attrMatch[2],o=attrMatch[3],void 0===c[i]&&(c[i]={}),void 0===c[i][a]&&(c[i][a]={}),void 0===c[i][a][o]?c[i][a][o]=r:c[i][a][o]+=","+r}function m(e){var t="";if(e)if("string"==typeof e)-1===(e=e.toLowerCase()).indexOf("min-width")&&-1===e.indexOf("max-width")||o(e);else for(var n=0,r=e.length;n<r;n++)1===e[n].type?-1!==(t=e[n].selectorText||e[n].cssText).indexOf("min-height")||-1!==t.indexOf("max-height")?o(t):-1===t.indexOf("min-width")&&-1===t.indexOf("max-width")||o(t):4===e[n].type&&m(e[n].cssRules||e[n].rules)}var g=!1;this.init=function(e){d=void 0!==e&&e;for(var t=0,n=document.styleSheets.length;t<n;t++)try{m(document.styleSheets[t].cssRules||document.styleSheets[t].rules||document.styleSheets[t].cssText)}catch(e){if("SecurityError"!==e.name)throw e}if(!g){var r=document.createElement("style");r.type="text/css",r.innerHTML="[responsive-image] > img, [data-responsive-image] {overflow: hidden; padding: 0; } [responsive-image] > img, [data-responsive-image] > img { width: 100%;}",document.getElementsByTagName("head")[0].appendChild(r),g=!0}!function(){var e=l();for(var t in c)if(c.hasOwnProperty(t))for(var n in c[t])if(c[t].hasOwnProperty(n))for(var r in c[t][n])if(c[t][n].hasOwnProperty(r))for(var i=e(c[t][n][r]),a=0,o=i.length;a<o;a++)s(i[a],{mode:t,property:n,value:r})}(),function(){for(var e=l()("[data-responsive-image],[responsive-image]"),t=0,n=e.length;t<n;t++)i(e[t])}()},this.update=function(e){this.init(e)},this.detach=function(){if(!this.withTracking)throw"withTracking is not enabled. We can not detach elements since we don not store it.Use ElementQueries.withTracking = true; before domready or call ElementQueryes.update(true).";for(var e;e=h.pop();)t.detach(e);h=[]}};t.update=function(e){t.instance.update(e)},t.detach=function(e){e.elementQueriesSetupInformation?(e.elementQueriesSensor.detach(),delete e.elementQueriesSetupInformation,delete e.elementQueriesSensor):e.resizeSensor&&(e.resizeSensor.detach(),delete e.resizeSensor)},t.withTracking=!1,t.init=function(){t.instance||(t.instance=new t),t.instance.init(t.withTracking)};t.listen=function(){!function(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",e,!1);else if(/KHTML|WebKit|iCab/i.test(navigator.userAgent))var t=setInterval(function(){/loaded|complete/i.test(document.readyState)&&(e(),clearInterval(t))},10);else window.onload=e}(t.init)},"undefined"!=typeof module&&void 0!==module.exports?module.exports=t:(window.ElementQueries=t).listen()}(),function(){var s=function(n,e){function p(){var e,t;this.q=[],this.add=function(e){this.q.push(e)},this.call=function(){for(e=0,t=this.q.length;e<t;e++)this.q[e].call()}}function t(e,t){if(e.resizedAttached){if(e.resizedAttached)return void e.resizedAttached.add(t)}else e.resizedAttached=new p,e.resizedAttached.add(t);e.resizeSensor=document.createElement("div"),e.resizeSensor.className="resize-sensor";var n,r,i="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;",a="position: absolute; left: 0; top: 0; transition: 0s;";e.resizeSensor.style.cssText=i,e.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+i+'"><div style="'+a+'"></div></div><div class="resize-sensor-shrink" style="'+i+'"><div style="'+a+' width: 200%; height: 200%"></div></div>',e.appendChild(e.resizeSensor),{fixed:1,absolute:1}[(n=e,r="position",n.currentStyle?n.currentStyle[r]:window.getComputedStyle?window.getComputedStyle(n,null).getPropertyValue(r):n.style[r])]||(e.style.position="relative");var o,s,c=e.resizeSensor.childNodes[0],l=c.childNodes[0],u=e.resizeSensor.childNodes[1],f=(u.childNodes[0],function(){l.style.width=c.offsetWidth+10+"px",l.style.height=c.offsetHeight+10+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight,u.scrollLeft=u.scrollWidth,u.scrollTop=u.scrollHeight,o=e.offsetWidth,s=e.offsetHeight});f();var d=function(e,t,n){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener(t,n)},h=function(){e.offsetWidth==o&&e.offsetHeight==s||e.resizedAttached&&e.resizedAttached.call(),f()};d(c,"scroll",h),d(u,"scroll",h)}var r=Object.prototype.toString.call(n),i="[object Array]"===r||"[object NodeList]"===r||"[object HTMLCollection]"===r||"undefined"!=typeof jQuery&&n instanceof jQuery||"undefined"!=typeof Elements&&n instanceof Elements;if(i)for(var a=0,o=n.length;a<o;a++)t(n[a],e);else t(n,e);this.detach=function(){if(i)for(var e=0,t=n.length;e<t;e++)s.detach(n[e]);else s.detach(n)}};s.detach=function(e){e.resizeSensor&&(e.removeChild(e.resizeSensor),delete e.resizeSensor,delete e.resizedAttached)},"undefined"!=typeof module&&void 0!==module.exports?module.exports=s:window.ResizeSensor=s}(),function(n){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return n(e,window,document)}):"object"==typeof exports?module.exports=function(e,t){return e||(e=window),t&&t.fn.dataTable||(t=require("datatables.net")(e,t).$),n(t,e,e.document)}:n(jQuery,window,document)}(function(p,d,o,h){"use strict";var a=p.fn.dataTable,i=function(e,t){if(!a.versionCheck||!a.versionCheck("1.10.3"))throw"DataTables Responsive requires DataTables 1.10.3 or newer";this.s={dt:new a.Api(e),columns:[],current:[]},this.s.dt.settings()[0].responsive||(t&&"string"==typeof t.details?t.details={type:t.details}:t&&!1===t.details?t.details={type:!1}:t&&!0===t.details&&(t.details={type:"inline"}),this.c=p.extend(!0,{},i.defaults,a.defaults.responsive,t),(e.responsive=this)._constructor())};p.extend(i.prototype,{_constructor:function(){var i=this,r=this.s.dt,e=r.settings()[0],t=p(d).width();r.settings()[0]._responsive=this,p(d).on("resize.dtr orientationchange.dtr",a.util.throttle(function(){var e=p(d).width();e!==t&&(i._resize(),t=e)})),e.oApi._fnCallbackReg(e,"aoRowCreatedCallback",function(e,t,n){-1!==p.inArray(!1,i.s.current)&&p("td, th",e).each(function(e){var t=r.column.index("toData",e);!1===i.s.current[t]&&p(this).css("display","none")})}),r.on("destroy.dtr",function(){r.off(".dtr"),p(r.table().body()).off(".dtr"),p(d).off("resize.dtr orientationchange.dtr"),p.each(i.s.current,function(e,t){!1===t&&i._setColumnVis(e,!0)})}),this.c.breakpoints.sort(function(e,t){return e.width<t.width?1:e.width>t.width?-1:0}),this._classLogic(),this._resizeAuto();var n=this.c.details;!1!==n.type&&(i._detailsInit(),r.on("column-visibility.dtr",function(e,t,n,r){i._classLogic(),i._resizeAuto(),i._resize()}),r.on("draw.dtr",function(){i._redrawChildren()}),p(r.table().node()).addClass("dtr-"+n.type)),r.on("column-reorder.dtr",function(e,t,n){i._classLogic(),i._resizeAuto(),i._resize()}),r.on("column-sizing.dtr",function(){i._resizeAuto(),i._resize()}),r.on("init.dtr",function(e,t,n){i._resizeAuto(),i._resize(),p.inArray(!1,i.s.current)&&r.columns.adjust()}),this._resize()},_columnsVisiblity:function(t){var e,n,r=this.s.dt,i=this.s.columns,a=i.map(function(e,t){return{columnIdx:t,priority:e.priority}}).sort(function(e,t){return e.priority!==t.priority?e.priority-t.priority:e.columnIdx-t.columnIdx}),o=p.map(i,function(e){return(!e.auto||null!==e.minWidth)&&(!0===e.auto?"-":-1!==p.inArray(t,e.includeIn))}),s=0;for(e=0,n=o.length;e<n;e++)!0===o[e]&&(s+=i[e].minWidth);var c=r.settings()[0].oScroll,l=c.sY||c.sX?c.iBarWidth:0,u=r.table().container().offsetWidth-l-s;for(e=0,n=o.length;e<n;e++)i[e].control&&(u-=i[e].minWidth);var f=!1;for(e=0,n=a.length;e<n;e++){var d=a[e].columnIdx;"-"===o[d]&&!i[d].control&&i[d].minWidth&&(f||u-i[d].minWidth<0?(f=!0,o[d]=!1):o[d]=!0,u-=i[d].minWidth)}var h=!1;for(e=0,n=i.length;e<n;e++)if(!i[e].control&&!i[e].never&&!o[e]){h=!0;break}for(e=0,n=i.length;e<n;e++)i[e].control&&(o[e]=h);return-1===p.inArray(!0,o)&&(o[0]=!0),o},_classLogic:function(){var s=this,c=this.c.breakpoints,a=this.s.dt,l=a.columns().eq(0).map(function(e){var t=this.column(e),n=t.header().className,r=a.settings()[0].aoColumns[e].responsivePriority;if(r===h){var i=p(t.header()).data("priority");r=i!==h?1*i:1e4}return{className:n,includeIn:[],auto:!1,control:!1,never:!!n.match(/\bnever\b/),priority:r}}),u=function(e,t){var n=l[e].includeIn;-1===p.inArray(t,n)&&n.push(t)},f=function(e,t,n,r){var i,a,o;if(n){if("max-"===n)for(i=s._find(t).width,a=0,o=c.length;a<o;a++)c[a].width<=i&&u(e,c[a].name);else if("min-"===n)for(i=s._find(t).width,a=0,o=c.length;a<o;a++)c[a].width>=i&&u(e,c[a].name);else if("not-"===n)for(a=0,o=c.length;a<o;a++)-1===c[a].name.indexOf(r)&&u(e,c[a].name)}else l[e].includeIn.push(t)};l.each(function(e,a){for(var t=e.className.split(" "),o=!1,n=0,r=t.length;n<r;n++){var s=p.trim(t[n]);if("all"===s)return o=!0,void(e.includeIn=p.map(c,function(e){return e.name}));if("none"===s||e.never)return void(o=!0);if("control"===s)return o=!0,void(e.control=!0);p.each(c,function(e,t){var n=t.name.split("-"),r=new RegExp("(min\\-|max\\-|not\\-)?("+n[0]+")(\\-[_a-zA-Z0-9])?"),i=s.match(r);i&&(o=!0,i[2]===n[0]&&i[3]==="-"+n[1]?f(a,t.name,i[1],i[2]+i[3]):i[2]!==n[0]||i[3]||f(a,t.name,i[1],i[2]))})}o||(e.auto=!0)}),this.s.columns=l},_detailsDisplay:function(e,t){var n=this,r=this.s.dt,i=this.c.details;if(i&&!1!==i.type){var a=i.display(e,t,function(){return i.renderer(r,e[0],n._detailsObj(e[0]))});!0!==a&&!1!==a||p(r.table().node()).triggerHandler("responsive-display.dt",[r,e,a,t])}},_detailsInit:function(){var r=this,i=this.s.dt,e=this.c.details;"inline"===e.type&&(e.target="td:first-child, th:first-child"),i.on("draw.dtr",function(){r._tabIndexes()}),r._tabIndexes(),p(i.table().body()).on("keyup.dtr","td, th",function(e){13===e.keyCode&&p(this).data("dtr-keyboard")&&p(this).click()});var a=e.target,t="string"==typeof a?a:"td, th";p(i.table().body()).on("click.dtr mousedown.dtr mouseup.dtr",t,function(e){if(p(i.table().node()).hasClass("collapsed")&&i.row(p(this).closest("tr")).length){if("number"==typeof a){var t=a<0?i.columns().eq(0).length+a:a;if(i.cell(this).index().column!==t)return}var n=i.row(p(this).closest("tr"));"click"===e.type?r._detailsDisplay(n,!1):"mousedown"===e.type?p(this).css("outline","none"):"mouseup"===e.type&&p(this).blur().css("outline","")}})},_detailsObj:function(n){var r=this,i=this.s.dt;return p.map(this.s.columns,function(e,t){if(!e.never&&!e.control)return{title:i.settings()[0].aoColumns[t].sTitle,data:i.cell(n,t).render(r.c.orthogonal),hidden:i.column(t).visible()&&!r.s.current[t],columnIndex:t,rowIndex:n}})},_find:function(e){for(var t=this.c.breakpoints,n=0,r=t.length;n<r;n++)if(t[n].name===e)return t[n]},_redrawChildren:function(){var n=this,r=this.s.dt;r.rows({page:"current"}).iterator("row",function(e,t){r.row(t);n._detailsDisplay(r.row(t),!0)})},_resize:function(){var e,t,n=this,r=this.s.dt,i=p(d).width(),a=this.c.breakpoints,o=a[0].name,s=this.s.columns,c=this.s.current.slice();for(e=a.length-1;0<=e;e--)if(i<=a[e].width){o=a[e].name;break}var l=this._columnsVisiblity(o);this.s.current=l;var u=!1;for(e=0,t=s.length;e<t;e++)if(!1===l[e]&&!s[e].never&&!s[e].control){u=!0;break}p(r.table().node()).toggleClass("collapsed",u);var f=!1;r.columns().eq(0).each(function(e,t){l[t]!==c[t]&&(f=!0,n._setColumnVis(e,l[t]))}),f&&(this._redrawChildren(),p(r.table().node()).trigger("responsive-resize.dt",[r,this.s.current]))},_resizeAuto:function(){var n=this.s.dt,r=this.s.columns;if(this.c.auto&&-1!==p.inArray(!0,p.map(r,function(e){return e.auto}))){n.table().node().offsetWidth,n.columns;var e=n.table().node().cloneNode(!1),t=p(n.table().header().cloneNode(!1)).appendTo(e),i=p(n.table().body()).clone(!1,!1).empty().appendTo(e),a=n.columns().header().filter(function(e){return n.column(e).visible()}).to$().clone(!1).css("display","table-cell");p(i).append(p(n.rows({page:"current"}).nodes()).clone(!1)).find("th, td").css("display","");var o=n.table().footer();if(o){var s=p(o.cloneNode(!1)).appendTo(e),c=n.columns().footer().filter(function(e){return n.column(e).visible()}).to$().clone(!1).css("display","table-cell");p("<tr/>").append(c).appendTo(s)}p("<tr/>").append(a).appendTo(t),"inline"===this.c.details.type&&p(e).addClass("dtr-inline collapsed"),p(e).find("[name]").removeAttr("name");var l=p("<div/>").css({width:1,height:1,overflow:"hidden"}).append(e);l.insertBefore(n.table().node()),a.each(function(e){var t=n.column.index("fromVisible",e);r[t].minWidth=this.offsetWidth||0}),l.remove()}},_setColumnVis:function(e,t){var n=this.s.dt,r=t?"":"none";p(n.column(e).header()).css("display",r),p(n.column(e).footer()).css("display",r),n.column(e).nodes().to$().css("display",r)},_tabIndexes:function(){var e=this.s.dt,t=e.cells({page:"current"}).nodes().to$(),n=e.settings()[0],r=this.c.details.target;t.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]"),p("number"==typeof r?":eq("+r+")":r,e.rows({page:"current"}).nodes()).attr("tabIndex",n.iTabIndex).data("dtr-keyboard",1)}}),i.breakpoints=[{name:"desktop",width:1/0},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}],i.display={childRow:function(e,t,n){return t?p(e.node()).hasClass("parent")?(e.child(n(),"child").show(),!0):void 0:e.child.isShown()?(e.child(!1),p(e.node()).removeClass("parent"),!1):(e.child(n(),"child").show(),p(e.node()).addClass("parent"),!0)},childRowImmediate:function(e,t,n){return!t&&e.child.isShown()||!e.responsive.hasHidden()?(e.child(!1),p(e.node()).removeClass("parent"),!1):(e.child(n(),"child").show(),p(e.node()).addClass("parent"),!0)},modal:function(a){return function(e,t,n){if(t)p("div.dtr-modal-content").empty().append(n());else{var r=function(){i.remove(),p(o).off("keypress.dtr")},i=p('<div class="dtr-modal"/>').append(p('<div class="dtr-modal-display"/>').append(p('<div class="dtr-modal-content"/>').append(n())).append(p('<div class="dtr-modal-close">&times;</div>').click(function(){r()}))).append(p('<div class="dtr-modal-background"/>').click(function(){r()})).appendTo("body");p(o).on("keyup.dtr",function(e){27===e.keyCode&&(e.stopPropagation(),r())})}a&&a.header&&p("div.dtr-modal-content").prepend("<h2>"+a.header(e)+"</h2>")}}},i.renderer={listHidden:function(){return function(e,t,n){var r=p.map(n,function(e){return e.hidden?'<li data-dtr-index="'+e.columnIndex+'" data-dt-row="'+e.rowIndex+'" data-dt-column="'+e.columnIndex+'"><span class="dtr-title">'+e.title+'</span> <span class="dtr-data">'+e.data+"</span></li>":""}).join("");return!!r&&p('<ul data-dtr-index="'+t+'"/>').append(r)}},tableAll:function(i){return i=p.extend({tableClass:""},i),function(e,t,n){var r=p.map(n,function(e){return'<tr data-dt-row="'+e.rowIndex+'" data-dt-column="'+e.columnIndex+'"><td>'+e.title+":</td> <td>"+e.data+"</td></tr>"}).join("");return p('<table class="'+i.tableClass+'" width="100%"/>').append(r)}}},i.defaults={breakpoints:i.breakpoints,auto:!0,details:{display:i.display.childRow,renderer:i.renderer.listHidden(),target:0,type:"inline"},orthogonal:"display"};var e=p.fn.dataTable.Api;return e.register("responsive()",function(){return this}),e.register("responsive.index()",function(e){return{column:(e=p(e)).data("dtr-index"),row:e.parent().data("dtr-index")}}),e.register("responsive.rebuild()",function(){return this.iterator("table",function(e){e._responsive&&e._responsive._classLogic()})}),e.register("responsive.recalc()",function(){return this.iterator("table",function(e){e._responsive&&(e._responsive._resizeAuto(),e._responsive._resize())})}),e.register("responsive.hasHidden()",function(){var e=this.context[0];return!!e._responsive&&-1!==p.inArray(!1,e._responsive.s.current)}),i.version="2.1.0",p.fn.dataTable.Responsive=i,p.fn.DataTable.Responsive=i,p(o).on("preInit.dt.dtr",function(e,t,n){if("dt"===e.namespace&&(p(t.nTable).hasClass("responsive")||p(t.nTable).hasClass("dt-responsive")||t.oInit.responsive||a.defaults.responsive)){var r=t.oInit.responsive;!1!==r&&new i(t,p.isPlainObject(r)?r:{})}}),i}),function(e){"undefined"!=typeof exports?e(exports):(window.hljs=e({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return window.hljs}))}(function(i){function b(e){return e.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function d(e){return e.nodeName.toLowerCase()}function v(e,t){var n=e&&e.exec(t);return n&&0==n.index}function h(e){return/^(no-?highlight|plain|text)$/i.test(e)}function y(e,t){var n,r={};for(n in e)r[n]=e[n];if(t)for(n in t)r[n]=t[n];return r}function p(e){var i=[];return function e(t,n){for(var r=t.firstChild;r;r=r.nextSibling)3==r.nodeType?n+=r.nodeValue.length:1==r.nodeType&&(i.push({event:"start",offset:n,node:r}),n=e(r,n),d(r).match(/br|hr|img|input/)||i.push({event:"stop",offset:n,node:r}));return n}(e,0),i}function w(e,t,s,n){function c(e,t,n,r){var i='<span class="'+(r?"":A.classPrefix);return(i+=e+'">')+t+(n?"":"</span>")}function l(){return void 0!==d.subLanguage?function(){var e="string"==typeof d.subLanguage;if(e&&!S[d.subLanguage])return b(p);var t=e?w(d.subLanguage,p,!0,a[d.subLanguage]):C(p,d.subLanguage.length?d.subLanguage:void 0);return 0<d.relevance&&(m+=t.relevance),e&&(a[d.subLanguage]=t.top),c(t.language,t.value,!1,!0)}():function(){if(!d.keywords)return b(p);var e="",t=0;d.lexemesRe.lastIndex=0;for(var n,r,i,a=d.lexemesRe.exec(p);a;){e+=b(p.substr(t,a.index-t));var o=(n=d,r=a,i=f.case_insensitive?r[0].toLowerCase():r[0],n.keywords.hasOwnProperty(i)&&n.keywords[i]);o?(m+=o[1],e+=c(o[0],b(a[0]))):e+=b(a[0]),t=d.lexemesRe.lastIndex,a=d.lexemesRe.exec(p)}return e+b(p.substr(t))}()}function u(e,t){var n=e.className?c(e.className,"",!0):"";p=e.returnBegin?(h+=n,""):e.excludeBegin?(h+=b(t)+n,""):(h+=n,t),d=Object.create(e,{parent:{value:d}})}function r(e,t){if(p+=e,void 0===t)return h+=l(),0;var n=function(e,t){for(var n=0;n<t.contains.length;n++)if(v(t.contains[n].beginRe,e))return t.contains[n]}(t,d);if(n)return h+=l(),u(n,t),n.returnBegin?0:t.length;var r,i,a=function e(t,n){if(v(t.endRe,n)){for(;t.endsParent&&t.parent;)t=t.parent;return t}if(t.endsWithParent)return e(t.parent,n)}(d,t);if(a){var o=d;for(o.returnEnd||o.excludeEnd||(p+=t),h+=l();d.className&&(h+="</span>"),m+=d.relevance,(d=d.parent)!=a.parent;);return o.excludeEnd&&(h+=b(t)),p="",a.starts&&u(a.starts,""),o.returnEnd?0:t.length}if(r=t,i=d,!s&&v(i.illegalRe,r))throw new Error('Illegal lexeme "'+t+'" for mode "'+(d.className||"<unnamed>")+'"');return p+=t,t.length||1}var f=T(e);if(!f)throw new Error('Unknown language: "'+e+'"');!function(s){function c(e){return e&&e.source||e}function l(e,t){return new RegExp(c(e),"m"+(s.case_insensitive?"i":"")+(t?"g":""))}!function t(n,e){if(!n.compiled){if(n.compiled=!0,n.keywords=n.keywords||n.beginKeywords,n.keywords){var r={},i=function(n,e){s.case_insensitive&&(e=e.toLowerCase()),e.split(" ").forEach(function(e){var t=e.split("|");r[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof n.keywords?i("keyword",n.keywords):Object.keys(n.keywords).forEach(function(e){i(e,n.keywords[e])}),n.keywords=r}n.lexemesRe=l(n.lexemes||/\b\w+\b/,!0),e&&(n.beginKeywords&&(n.begin="\\b("+n.beginKeywords.split(" ").join("|")+")\\b"),n.begin||(n.begin=/\B|\b/),n.beginRe=l(n.begin),n.end||n.endsWithParent||(n.end=/\B|\b/),n.end&&(n.endRe=l(n.end)),n.terminator_end=c(n.end)||"",n.endsWithParent&&e.terminator_end&&(n.terminator_end+=(n.end?"|":"")+e.terminator_end)),n.illegal&&(n.illegalRe=l(n.illegal)),void 0===n.relevance&&(n.relevance=1),n.contains||(n.contains=[]);var a=[];n.contains.forEach(function(t){t.variants?t.variants.forEach(function(e){a.push(y(t,e))}):a.push("self"==t?n:t)}),n.contains=a,n.contains.forEach(function(e){t(e,n)}),n.starts&&t(n.starts,e);var o=n.contains.map(function(e){return e.beginKeywords?"\\.?("+e.begin+")\\.?":e.begin}).concat([n.terminator_end,n.illegal]).map(c).filter(Boolean);n.terminators=o.length?l(o.join("|"),!0):{exec:function(){return null}}}}(s)}(f);var i,d=n||f,a={},h="";for(i=d;i!=f;i=i.parent)i.className&&(h=c(i.className,"",!0)+h);var p="",m=0;try{for(var o,g,_=0;d.terminators.lastIndex=_,o=d.terminators.exec(t);)g=r(t.substr(_,o.index-_),o[0]),_=o.index+g;for(r(t.substr(_)),i=d;i.parent;i=i.parent)i.className&&(h+="</span>");return{relevance:m,value:h,language:e,top:d}}catch(e){if(-1!=e.message.indexOf("Illegal"))return{relevance:0,value:b(t)};throw e}}function C(n,e){e=e||A.languages||Object.keys(S);var r={relevance:0,value:b(n)},i=r;return e.forEach(function(e){if(T(e)){var t=w(e,n,!1);t.language=e,t.relevance>i.relevance&&(i=t),t.relevance>r.relevance&&(i=r,r=t)}}),i.language&&(r.second_best=i),r}function m(e){return A.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,t){return t.replace(/\t/g,A.tabReplace)})),A.useBR&&(e=e.replace(/\n/g,"<br>")),e}function t(e){var t=function(e){var t,n,r,i=e.className+" ";if(i+=e.parentNode?e.parentNode.className:"",n=/\blang(?:uage)?-([\w-]+)\b/i.exec(i))return T(n[1])?n[1]:"no-highlight";for(t=0,r=(i=i.split(/\s+/)).length;t<r;t++)if(T(i[t])||h(i[t]))return i[t]}(e);if(!h(t)){var n;A.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div")).innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n"):n=e;var r,i,a,o,s,c=n.textContent,l=t?w(t,c,!0):C(c),u=p(n);if(u.length){var f=document.createElementNS("http://www.w3.org/1999/xhtml","div");f.innerHTML=l.value,l.value=function(e,t,n){var r=0,i="",a=[];function o(){return e.length&&t.length?e[0].offset!=t[0].offset?e[0].offset<t[0].offset?e:t:"start"==t[0].event?e:t:e.length?e:t}function s(e){i+="<"+d(e)+Array.prototype.map.call(e.attributes,function(e){return" "+e.nodeName+'="'+b(e.value)+'"'}).join("")+">"}function c(e){i+="</"+d(e)+">"}function l(e){("start"==e.event?s:c)(e.node)}for(;e.length||t.length;){var u=o();if(i+=b(n.substr(r,u[0].offset-r)),r=u[0].offset,u==e){for(a.reverse().forEach(c);l(u.splice(0,1)[0]),(u=o())==e&&u.length&&u[0].offset==r;);a.reverse().forEach(s)}else"start"==u[0].event?a.push(u[0].node):a.pop(),l(u.splice(0,1)[0])}return i+b(n.substr(r))}(u,p(f),c)}l.value=m(l.value),e.innerHTML=l.value,e.className=(r=e.className,i=t,a=l.language,o=i?g[i]:a,s=[r.trim()],r.match(/\bhljs\b/)||s.push("hljs"),-1===r.indexOf(o)&&s.push(o),s.join(" ").trim()),e.result={language:l.language,re:l.relevance},l.second_best&&(e.second_best={language:l.second_best.language,re:l.second_best.relevance})}}var A={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};function n(){if(!n.called){n.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,t)}}var S={},g={};function T(e){return e=(e||"").toLowerCase(),S[e]||S[g[e]]}return i.highlight=w,i.highlightAuto=C,i.fixMarkup=m,i.highlightBlock=t,i.configure=function(e){A=y(A,e)},i.initHighlighting=n,i.initHighlightingOnLoad=function(){addEventListener("DOMContentLoaded",n,!1),addEventListener("load",n,!1)},i.registerLanguage=function(t,e){var n=S[t]=e(i);n.aliases&&n.aliases.forEach(function(e){g[e]=t})},i.listLanguages=function(){return Object.keys(S)},i.getLanguage=T,i.inherit=y,i.IDENT_RE="[a-zA-Z]\\w*",i.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",i.NUMBER_RE="\\b\\d+(\\.\\d+)?",i.C_NUMBER_RE="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",i.BINARY_NUMBER_RE="\\b(0b[01]+)",i.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",i.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},i.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[i.BACKSLASH_ESCAPE]},i.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[i.BACKSLASH_ESCAPE]},i.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},i.COMMENT=function(e,t,n){var r=i.inherit({className:"comment",begin:e,end:t,contains:[]},n||{});return r.contains.push(i.PHRASAL_WORDS_MODE),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),r},i.C_LINE_COMMENT_MODE=i.COMMENT("//","$"),i.C_BLOCK_COMMENT_MODE=i.COMMENT("/\\*","\\*/"),i.HASH_COMMENT_MODE=i.COMMENT("#","$"),i.NUMBER_MODE={className:"number",begin:i.NUMBER_RE,relevance:0},i.C_NUMBER_MODE={className:"number",begin:i.C_NUMBER_RE,relevance:0},i.BINARY_NUMBER_MODE={className:"number",begin:i.BINARY_NUMBER_RE,relevance:0},i.CSS_NUMBER_MODE={className:"number",begin:i.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},i.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[i.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[i.BACKSLASH_ESCAPE]}]},i.TITLE_MODE={className:"title",begin:i.IDENT_RE,relevance:0},i.UNDERSCORE_TITLE_MODE={className:"title",begin:i.UNDERSCORE_IDENT_RE,relevance:0},i.registerLanguage("1c",function(e){var t="[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*",n={className:"dquote",begin:'""'},r={className:"string",begin:'"',end:'"|$',contains:[n]},i={className:"string",begin:"\\|",end:'"|$',contains:[n]};return{case_insensitive:!0,lexemes:t,keywords:{keyword:"возврат дата для если и или иначе иначеесли исключение конецесли конецпопытки конецпроцедуры конецфункции конеццикла константа не перейти перем перечисление по пока попытка прервать продолжить процедура строка тогда фс функция цикл число экспорт",built_in:"ansitooem oemtoansi ввестивидсубконто ввестидату ввестизначение ввестиперечисление ввестипериод ввестиплансчетов ввестистроку ввестичисло вопрос восстановитьзначение врег выбранныйплансчетов вызватьисключение датагод датамесяц датачисло добавитьмесяц завершитьработусистемы заголовоксистемы записьжурналарегистрации запуститьприложение зафиксироватьтранзакцию значениевстроку значениевстрокувнутр значениевфайл значениеизстроки значениеизстрокивнутр значениеизфайла имякомпьютера имяпользователя каталогвременныхфайлов каталогиб каталогпользователя каталогпрограммы кодсимв командасистемы конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лев лог лог10 макс максимальноеколичествосубконто мин монопольныйрежим названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найти найтипомеченныенаудаление найтиссылки началопериодаби началостандартногоинтервала начатьтранзакцию начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода нрег обработкаожидания окр описаниеошибки основнойжурналрасчетов основнойплансчетов основнойязык открытьформу открытьформумодально отменитьтранзакцию очиститьокносообщений периодстр полноеимяпользователя получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта прав праводоступа предупреждение префиксавтонумерации пустаястрока пустоезначение рабочаядаттьпустоезначение рабочаядата разделительстраниц разделительстрок разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо сигнал симв символтабуляции создатьобъект сокрл сокрлп сокрп сообщить состояние сохранитьзначение сред статусвозврата стрдлина стрзаменить стрколичествострок стрполучитьстроку  стрчисловхождений сформироватьпозициюдокумента счетпокоду текущаядата текущеевремя типзначения типзначениястр удалитьобъекты установитьтана установитьтапо фиксшаблон формат цел шаблон"},contains:[e.C_LINE_COMMENT_MODE,e.NUMBER_MODE,r,i,{className:"function",begin:"(процедура|функция)",end:"$",lexemes:t,keywords:"процедура функция",contains:[e.inherit(e.TITLE_MODE,{begin:t}),{className:"tail",endsWithParent:!0,contains:[{className:"params",begin:"\\(",end:"\\)",lexemes:t,keywords:"знач",contains:[r,i]},{className:"export",begin:"экспорт",endsWithParent:!0,lexemes:t,keywords:"экспорт",contains:[e.C_LINE_COMMENT_MODE]}]},e.C_LINE_COMMENT_MODE]},{className:"preprocessor",begin:"#",end:"$"},{className:"date",begin:"'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})'"}]}}),i.registerLanguage("accesslog",function(e){return{contains:[{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+\\b",relevance:0},{className:"string",begin:'"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)',end:'"',keywords:"GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE",illegal:"\\n",relevance:10},{className:"string",begin:/\[/,end:/\]/,illegal:"\\n"},{className:"string",begin:'"',end:'"',illegal:"\\n"}]}}),i.registerLanguage("actionscript",function(e){var t={className:"rest_arg",begin:"[.]{3}",end:"[a-zA-Z_$][a-zA-Z0-9_$]*",relevance:10};return{aliases:["as"],keywords:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"package",beginKeywords:"package",end:"{",contains:[e.TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.TITLE_MODE]},{className:"preprocessor",beginKeywords:"import include",end:";"},{className:"function",beginKeywords:"function",end:"[{;]",excludeEnd:!0,illegal:"\\S",contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t]},{className:"type",begin:":",end:"([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",relevance:10}]}],illegal:/#/}}),i.registerLanguage("apache",function(e){var t={className:"number",begin:"[\\$%]\\d+"};return{aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"tag",begin:"</?",end:">"},{className:"keyword",begin:/\w+/,relevance:0,keywords:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all"},contains:[{className:"sqbracket",begin:"\\s\\[",end:"\\]$"},{className:"cbracket",begin:"[\\$%]\\{",end:"\\}",contains:["self",t]},t,e.QUOTE_STRING_MODE]}}],illegal:/\S/}}),i.registerLanguage("applescript",function(e){var t=e.inherit(e.QUOTE_STRING_MODE,{illegal:""}),n={className:"params",begin:"\\(",end:"\\)",contains:["self",e.C_NUMBER_MODE,t]},r=e.COMMENT("--","$"),i=[r,e.COMMENT("\\(\\*","\\*\\)",{contains:["self",r]}),e.HASH_COMMENT_MODE];return{aliases:["osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",constant:"AppleScript false linefeed return pi quote result space tab true",type:"alias application boolean class constant date file integer list number real record string text",command:"activate beep count delay launch log offset read round run say summarize write",property:"character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},contains:[t,e.C_NUMBER_MODE,{className:"type",begin:"\\bPOSIX file\\b"},{className:"command",begin:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{className:"constant",begin:"\\b(text item delimiters|current application|missing value)\\b"},{className:"keyword",begin:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b"},{className:"property",begin:"\\b(POSIX path|(date|time) string|quoted form)\\b"},{className:"function_start",beginKeywords:"on",illegal:"[${=;\\n]",contains:[e.UNDERSCORE_TITLE_MODE,n]}].concat(i),illegal:"//|->|=>|\\[\\["}}),i.registerLanguage("armasm",function(e){return{case_insensitive:!0,aliases:["arm"],lexemes:"\\.?"+e.IDENT_RE,keywords:{literal:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 ",preprocessor:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"{PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @ "},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?",end:"\\s"},e.COMMENT("[;@]","$",{relevance:0}),e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"label",variants:[{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"[=#]\\w+"}],relevance:0}]}}),i.registerLanguage("xml",function(e){var t={begin:/<\?(php)?(?!\w)/,end:/\?>/,subLanguage:"php"},n={endsWithParent:!0,illegal:/</,relevance:0,contains:[t,{className:"attribute",begin:"[A-Za-z0-9\\._:-]+",relevance:0},{begin:"=",relevance:0,contains:[{className:"value",contains:[t],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/[^\s\/>]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],case_insensitive:!0,contains:[{className:"doctype",begin:"<!DOCTYPE",end:">",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{className:"cdata",begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{className:"tag",begin:"<style(?=\\s|>|$)",end:">",keywords:{title:"style"},contains:[n],starts:{end:"</style>",returnEnd:!0,subLanguage:"css"}},{className:"tag",begin:"<script(?=\\s|>|$)",end:">",keywords:{title:"script"},contains:[n],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars"]}},t,{className:"pi",begin:/<\?\w+/,end:/\?>/,relevance:10},{className:"tag",begin:"</?",end:"/?>",contains:[{className:"title",begin:/[^ \/><\n\t]+/,relevance:0},n]}]}}),i.registerLanguage("asciidoc",function(e){return{aliases:["adoc"],contains:[e.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),e.COMMENT("^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"header",begin:"^(={1,5}) .+?( \\1)?$",relevance:10},{className:"header",begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$",relevance:10},{className:"attribute",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"attribute",begin:"^\\[.+?\\]$",relevance:0},{className:"blockquote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]{4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},{className:"bullet",begin:"^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"},{className:"label",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},{className:"strong",begin:"\\B\\*(?![\\*\\s])",end:"(\\n{2}|\\*)",contains:[{begin:"\\\\*\\w",relevance:0}]},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0},{className:"emphasis",begin:"_(?![_\\s])",end:"(\\n{2}|_)",relevance:0},{className:"smartquote",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},{className:"code",begin:"^[ \\t]",end:"$",relevance:0},{className:"horizontal_rule",begin:"^'{3,}[ \\t]*$",relevance:10},{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link_url",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"link_label",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}),i.registerLanguage("aspectj",function(e){var t="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else extends implements break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws privileged aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization staticinitialization withincode target within execution getWithinTypeName handler thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents warning error soft precedence thisAspectInstance",n="get set args call";return{keywords:t,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"aspect",beginKeywords:"aspect",end:/[{;=]/,excludeEnd:!0,illegal:/[:;"\[\]]/,contains:[{beginKeywords:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},e.UNDERSCORE_TITLE_MODE,{begin:/\([^\)]*/,end:/[)]+/,keywords:t+" "+n,excludeEnd:!1}]},{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,relevance:0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"pointcut after before around throwing returning",end:/[)]/,excludeEnd:!1,illegal:/["\[\]]/,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[e.UNDERSCORE_TITLE_MODE]}]},{begin:/[:]/,returnBegin:!0,end:/[{;]/,relevance:0,excludeEnd:!1,keywords:t,illegal:/["\[\]]/,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",keywords:t+" "+n},e.QUOTE_STRING_MODE]},{beginKeywords:"new throw",relevance:0},{className:"function",begin:/\w+ +\w+(\.)?\w+\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,returnBegin:!0,end:/[{;=]/,keywords:t,excludeEnd:!0,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,relevance:0,keywords:t,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"}]}}),i.registerLanguage("autohotkey",function(e){var t={className:"escape",begin:"`[\\s\\S]"},n=e.COMMENT(";","$",{relevance:0});return{case_insensitive:!0,keywords:{keyword:"Break Continue Else Gosub If Loop Return While",literal:"A true false NOT AND OR"},contains:[{className:"built_in",begin:"A_[a-zA-Z0-9]+"},{className:"built_in",beginKeywords:"ComSpec Clipboard ClipboardAll ErrorLevel"}].concat([t,e.inherit(e.QUOTE_STRING_MODE,{contains:[t]}),n,{className:"number",begin:e.NUMBER_RE,relevance:0},{className:"var_expand",begin:"%",end:"%",illegal:"\\n",contains:[t]},{className:"label",contains:[t],variants:[{begin:'^[^\\n";]+::(?!=)'},{begin:'^[^\\n";]+:(?!=)',relevance:0}]},{begin:",\\s*,",relevance:10}])}}),i.registerLanguage("autoit",function(e){var t={variants:[e.COMMENT(";","$",{relevance:0}),e.COMMENT("#cs","#ce"),e.COMMENT("#comments-start","#comments-end")]},n={className:"variable",begin:"\\$[A-z0-9_]+"},r={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},i={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:"ByRef Case Const ContinueCase ContinueLoop Default Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",built_in:"Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Opt Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown TCPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend UDPShutdown UDPStartup VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait WinWaitActive WinWaitClose WinWaitNotActive Array1DToHistogram ArrayAdd ArrayBinarySearch ArrayColDelete ArrayColInsert ArrayCombinations ArrayConcatenate ArrayDelete ArrayDisplay ArrayExtract ArrayFindAll ArrayInsert ArrayMax ArrayMaxIndex ArrayMin ArrayMinIndex ArrayPermute ArrayPop ArrayPush ArrayReverse ArraySearch ArrayShuffle ArraySort ArraySwap ArrayToClip ArrayToString ArrayTranspose ArrayTrim ArrayUnique Assert ChooseColor ChooseFont ClipBoard_ChangeChain ClipBoard_Close ClipBoard_CountFormats ClipBoard_Empty ClipBoard_EnumFormats ClipBoard_FormatStr ClipBoard_GetData ClipBoard_GetDataEx ClipBoard_GetFormatName ClipBoard_GetOpenWindow ClipBoard_GetOwner ClipBoard_GetPriorityFormat ClipBoard_GetSequenceNumber ClipBoard_GetViewer ClipBoard_IsFormatAvailable ClipBoard_Open ClipBoard_RegisterFormat ClipBoard_SetData ClipBoard_SetDataEx ClipBoard_SetViewer ClipPutFile ColorConvertHSLtoRGB ColorConvertRGBtoHSL ColorGetBlue ColorGetCOLORREF ColorGetGreen ColorGetRed ColorGetRGB ColorSetCOLORREF ColorSetRGB Crypt_DecryptData Crypt_DecryptFile Crypt_DeriveKey Crypt_DestroyKey Crypt_EncryptData Crypt_EncryptFile Crypt_GenRandom Crypt_HashData Crypt_HashFile Crypt_Shutdown Crypt_Startup DateAdd DateDayOfWeek DateDaysInMonth DateDiff DateIsLeapYear DateIsValid DateTimeFormat DateTimeSplit DateToDayOfWeek DateToDayOfWeekISO DateToDayValue DateToMonth Date_Time_CompareFileTime Date_Time_DOSDateTimeToArray Date_Time_DOSDateTimeToFileTime Date_Time_DOSDateTimeToStr Date_Time_DOSDateToArray Date_Time_DOSDateToStr Date_Time_DOSTimeToArray Date_Time_DOSTimeToStr Date_Time_EncodeFileTime Date_Time_EncodeSystemTime Date_Time_FileTimeToArray Date_Time_FileTimeToDOSDateTime Date_Time_FileTimeToLocalFileTime Date_Time_FileTimeToStr Date_Time_FileTimeToSystemTime Date_Time_GetFileTime Date_Time_GetLocalTime Date_Time_GetSystemTime Date_Time_GetSystemTimeAdjustment Date_Time_GetSystemTimeAsFileTime Date_Time_GetSystemTimes Date_Time_GetTickCount Date_Time_GetTimeZoneInformation Date_Time_LocalFileTimeToFileTime Date_Time_SetFileTime Date_Time_SetLocalTime Date_Time_SetSystemTime Date_Time_SetSystemTimeAdjustment Date_Time_SetTimeZoneInformation Date_Time_SystemTimeToArray Date_Time_SystemTimeToDateStr Date_Time_SystemTimeToDateTimeStr Date_Time_SystemTimeToFileTime Date_Time_SystemTimeToTimeStr Date_Time_SystemTimeToTzSpecificLocalTime Date_Time_TzSpecificLocalTimeToSystemTime DayValueToDate DebugBugReportEnv DebugCOMError DebugOut DebugReport DebugReportEx DebugReportVar DebugSetup Degree EventLog__Backup EventLog__Clear EventLog__Close EventLog__Count EventLog__DeregisterSource EventLog__Full EventLog__Notify EventLog__Oldest EventLog__Open EventLog__OpenBackup EventLog__Read EventLog__RegisterSource EventLog__Report Excel_BookAttach Excel_BookClose Excel_BookList Excel_BookNew Excel_BookOpen Excel_BookOpenText Excel_BookSave Excel_BookSaveAs Excel_Close Excel_ColumnToLetter Excel_ColumnToNumber Excel_ConvertFormula Excel_Export Excel_FilterGet Excel_FilterSet Excel_Open Excel_PictureAdd Excel_Print Excel_RangeCopyPaste Excel_RangeDelete Excel_RangeFind Excel_RangeInsert Excel_RangeLinkAddRemove Excel_RangeRead Excel_RangeReplace Excel_RangeSort Excel_RangeValidate Excel_RangeWrite Excel_SheetAdd Excel_SheetCopyMove Excel_SheetDelete Excel_SheetList FileCountLines FileCreate FileListToArray FileListToArrayRec FilePrint FileReadToArray FileWriteFromArray FileWriteLog FileWriteToLine FTP_Close FTP_Command FTP_Connect FTP_DecodeInternetStatus FTP_DirCreate FTP_DirDelete FTP_DirGetCurrent FTP_DirPutContents FTP_DirSetCurrent FTP_FileClose FTP_FileDelete FTP_FileGet FTP_FileGetSize FTP_FileOpen FTP_FilePut FTP_FileRead FTP_FileRename FTP_FileTimeLoHiToStr FTP_FindFileClose FTP_FindFileFirst FTP_FindFileNext FTP_GetLastResponseInfo FTP_ListToArray FTP_ListToArray2D FTP_ListToArrayEx FTP_Open FTP_ProgressDownload FTP_ProgressUpload FTP_SetStatusCallback GDIPlus_ArrowCapCreate GDIPlus_ArrowCapDispose GDIPlus_ArrowCapGetFillState GDIPlus_ArrowCapGetHeight GDIPlus_ArrowCapGetMiddleInset GDIPlus_ArrowCapGetWidth GDIPlus_ArrowCapSetFillState GDIPlus_ArrowCapSetHeight GDIPlus_ArrowCapSetMiddleInset GDIPlus_ArrowCapSetWidth GDIPlus_BitmapApplyEffect GDIPlus_BitmapApplyEffectEx GDIPlus_BitmapCloneArea GDIPlus_BitmapConvertFormat GDIPlus_BitmapCreateApplyEffect GDIPlus_BitmapCreateApplyEffectEx GDIPlus_BitmapCreateDIBFromBitmap GDIPlus_BitmapCreateFromFile GDIPlus_BitmapCreateFromGraphics GDIPlus_BitmapCreateFromHBITMAP GDIPlus_BitmapCreateFromHICON GDIPlus_BitmapCreateFromHICON32 GDIPlus_BitmapCreateFromMemory GDIPlus_BitmapCreateFromResource GDIPlus_BitmapCreateFromScan0 GDIPlus_BitmapCreateFromStream GDIPlus_BitmapCreateHBITMAPFromBitmap GDIPlus_BitmapDispose GDIPlus_BitmapGetHistogram GDIPlus_BitmapGetHistogramEx GDIPlus_BitmapGetHistogramSize GDIPlus_BitmapGetPixel GDIPlus_BitmapLockBits GDIPlus_BitmapSetPixel GDIPlus_BitmapUnlockBits GDIPlus_BrushClone GDIPlus_BrushCreateSolid GDIPlus_BrushDispose GDIPlus_BrushGetSolidColor GDIPlus_BrushGetType GDIPlus_BrushSetSolidColor GDIPlus_ColorMatrixCreate GDIPlus_ColorMatrixCreateGrayScale GDIPlus_ColorMatrixCreateNegative GDIPlus_ColorMatrixCreateSaturation GDIPlus_ColorMatrixCreateScale GDIPlus_ColorMatrixCreateTranslate GDIPlus_CustomLineCapClone GDIPlus_CustomLineCapCreate GDIPlus_CustomLineCapDispose GDIPlus_CustomLineCapGetStrokeCaps GDIPlus_CustomLineCapSetStrokeCaps GDIPlus_Decoders GDIPlus_DecodersGetCount GDIPlus_DecodersGetSize GDIPlus_DrawImageFX GDIPlus_DrawImageFXEx GDIPlus_DrawImagePoints GDIPlus_EffectCreate GDIPlus_EffectCreateBlur GDIPlus_EffectCreateBrightnessContrast GDIPlus_EffectCreateColorBalance GDIPlus_EffectCreateColorCurve GDIPlus_EffectCreateColorLUT GDIPlus_EffectCreateColorMatrix GDIPlus_EffectCreateHueSaturationLightness GDIPlus_EffectCreateLevels GDIPlus_EffectCreateRedEyeCorrection GDIPlus_EffectCreateSharpen GDIPlus_EffectCreateTint GDIPlus_EffectDispose GDIPlus_EffectGetParameters GDIPlus_EffectSetParameters GDIPlus_Encoders GDIPlus_EncodersGetCLSID GDIPlus_EncodersGetCount GDIPlus_EncodersGetParamList GDIPlus_EncodersGetParamListSize GDIPlus_EncodersGetSize GDIPlus_FontCreate GDIPlus_FontDispose GDIPlus_FontFamilyCreate GDIPlus_FontFamilyCreateFromCollection GDIPlus_FontFamilyDispose GDIPlus_FontFamilyGetCellAscent GDIPlus_FontFamilyGetCellDescent GDIPlus_FontFamilyGetEmHeight GDIPlus_FontFamilyGetLineSpacing GDIPlus_FontGetHeight GDIPlus_FontPrivateAddFont GDIPlus_FontPrivateAddMemoryFont GDIPlus_FontPrivateCollectionDispose GDIPlus_FontPrivateCreateCollection GDIPlus_GraphicsClear GDIPlus_GraphicsCreateFromHDC GDIPlus_GraphicsCreateFromHWND GDIPlus_GraphicsDispose GDIPlus_GraphicsDrawArc GDIPlus_GraphicsDrawBezier GDIPlus_GraphicsDrawClosedCurve GDIPlus_GraphicsDrawClosedCurve2 GDIPlus_GraphicsDrawCurve GDIPlus_GraphicsDrawCurve2 GDIPlus_GraphicsDrawEllipse GDIPlus_GraphicsDrawImage GDIPlus_GraphicsDrawImagePointsRect GDIPlus_GraphicsDrawImageRect GDIPlus_GraphicsDrawImageRectRect GDIPlus_GraphicsDrawLine GDIPlus_GraphicsDrawPath GDIPlus_GraphicsDrawPie GDIPlus_GraphicsDrawPolygon GDIPlus_GraphicsDrawRect GDIPlus_GraphicsDrawString GDIPlus_GraphicsDrawStringEx GDIPlus_GraphicsFillClosedCurve GDIPlus_GraphicsFillClosedCurve2 GDIPlus_GraphicsFillEllipse GDIPlus_GraphicsFillPath GDIPlus_GraphicsFillPie GDIPlus_GraphicsFillPolygon GDIPlus_GraphicsFillRect GDIPlus_GraphicsFillRegion GDIPlus_GraphicsGetCompositingMode GDIPlus_GraphicsGetCompositingQuality GDIPlus_GraphicsGetDC GDIPlus_GraphicsGetInterpolationMode GDIPlus_GraphicsGetSmoothingMode GDIPlus_GraphicsGetTransform GDIPlus_GraphicsMeasureCharacterRanges GDIPlus_GraphicsMeasureString GDIPlus_GraphicsReleaseDC GDIPlus_GraphicsResetClip GDIPlus_GraphicsResetTransform GDIPlus_GraphicsRestore GDIPlus_GraphicsRotateTransform GDIPlus_GraphicsSave GDIPlus_GraphicsScaleTransform GDIPlus_GraphicsSetClipPath GDIPlus_GraphicsSetClipRect GDIPlus_GraphicsSetClipRegion GDIPlus_GraphicsSetCompositingMode GDIPlus_GraphicsSetCompositingQuality GDIPlus_GraphicsSetInterpolationMode GDIPlus_GraphicsSetPixelOffsetMode GDIPlus_GraphicsSetSmoothingMode GDIPlus_GraphicsSetTextRenderingHint GDIPlus_GraphicsSetTransform GDIPlus_GraphicsTransformPoints GDIPlus_GraphicsTranslateTransform GDIPlus_HatchBrushCreate GDIPlus_HICONCreateFromBitmap GDIPlus_ImageAttributesCreate GDIPlus_ImageAttributesDispose GDIPlus_ImageAttributesSetColorKeys GDIPlus_ImageAttributesSetColorMatrix GDIPlus_ImageDispose GDIPlus_ImageGetDimension GDIPlus_ImageGetFlags GDIPlus_ImageGetGraphicsContext GDIPlus_ImageGetHeight GDIPlus_ImageGetHorizontalResolution GDIPlus_ImageGetPixelFormat GDIPlus_ImageGetRawFormat GDIPlus_ImageGetThumbnail GDIPlus_ImageGetType GDIPlus_ImageGetVerticalResolution GDIPlus_ImageGetWidth GDIPlus_ImageLoadFromFile GDIPlus_ImageLoadFromStream GDIPlus_ImageResize GDIPlus_ImageRotateFlip GDIPlus_ImageSaveToFile GDIPlus_ImageSaveToFileEx GDIPlus_ImageSaveToStream GDIPlus_ImageScale GDIPlus_LineBrushCreate GDIPlus_LineBrushCreateFromRect GDIPlus_LineBrushCreateFromRectWithAngle GDIPlus_LineBrushGetColors GDIPlus_LineBrushGetRect GDIPlus_LineBrushMultiplyTransform GDIPlus_LineBrushResetTransform GDIPlus_LineBrushSetBlend GDIPlus_LineBrushSetColors GDIPlus_LineBrushSetGammaCorrection GDIPlus_LineBrushSetLinearBlend GDIPlus_LineBrushSetPresetBlend GDIPlus_LineBrushSetSigmaBlend GDIPlus_LineBrushSetTransform GDIPlus_MatrixClone GDIPlus_MatrixCreate GDIPlus_MatrixDispose GDIPlus_MatrixGetElements GDIPlus_MatrixInvert GDIPlus_MatrixMultiply GDIPlus_MatrixRotate GDIPlus_MatrixScale GDIPlus_MatrixSetElements GDIPlus_MatrixShear GDIPlus_MatrixTransformPoints GDIPlus_MatrixTranslate GDIPlus_PaletteInitialize GDIPlus_ParamAdd GDIPlus_ParamInit GDIPlus_ParamSize GDIPlus_PathAddArc GDIPlus_PathAddBezier GDIPlus_PathAddClosedCurve GDIPlus_PathAddClosedCurve2 GDIPlus_PathAddCurve GDIPlus_PathAddCurve2 GDIPlus_PathAddCurve3 GDIPlus_PathAddEllipse GDIPlus_PathAddLine GDIPlus_PathAddLine2 GDIPlus_PathAddPath GDIPlus_PathAddPie GDIPlus_PathAddPolygon GDIPlus_PathAddRectangle GDIPlus_PathAddString GDIPlus_PathBrushCreate GDIPlus_PathBrushCreateFromPath GDIPlus_PathBrushGetCenterPoint GDIPlus_PathBrushGetFocusScales GDIPlus_PathBrushGetPointCount GDIPlus_PathBrushGetRect GDIPlus_PathBrushGetWrapMode GDIPlus_PathBrushMultiplyTransform GDIPlus_PathBrushResetTransform GDIPlus_PathBrushSetBlend GDIPlus_PathBrushSetCenterColor GDIPlus_PathBrushSetCenterPoint GDIPlus_PathBrushSetFocusScales GDIPlus_PathBrushSetGammaCorrection GDIPlus_PathBrushSetLinearBlend GDIPlus_PathBrushSetPresetBlend GDIPlus_PathBrushSetSigmaBlend GDIPlus_PathBrushSetSurroundColor GDIPlus_PathBrushSetSurroundColorsWithCount GDIPlus_PathBrushSetTransform GDIPlus_PathBrushSetWrapMode GDIPlus_PathClone GDIPlus_PathCloseFigure GDIPlus_PathCreate GDIPlus_PathCreate2 GDIPlus_PathDispose GDIPlus_PathFlatten GDIPlus_PathGetData GDIPlus_PathGetFillMode GDIPlus_PathGetLastPoint GDIPlus_PathGetPointCount GDIPlus_PathGetPoints GDIPlus_PathGetWorldBounds GDIPlus_PathIsOutlineVisiblePoint GDIPlus_PathIsVisiblePoint GDIPlus_PathIterCreate GDIPlus_PathIterDispose GDIPlus_PathIterGetSubpathCount GDIPlus_PathIterNextMarkerPath GDIPlus_PathIterNextSubpathPath GDIPlus_PathIterRewind GDIPlus_PathReset GDIPlus_PathReverse GDIPlus_PathSetFillMode GDIPlus_PathSetMarker GDIPlus_PathStartFigure GDIPlus_PathTransform GDIPlus_PathWarp GDIPlus_PathWiden GDIPlus_PathWindingModeOutline GDIPlus_PenCreate GDIPlus_PenCreate2 GDIPlus_PenDispose GDIPlus_PenGetAlignment GDIPlus_PenGetColor GDIPlus_PenGetCustomEndCap GDIPlus_PenGetDashCap GDIPlus_PenGetDashStyle GDIPlus_PenGetEndCap GDIPlus_PenGetMiterLimit GDIPlus_PenGetWidth GDIPlus_PenSetAlignment GDIPlus_PenSetColor GDIPlus_PenSetCustomEndCap GDIPlus_PenSetDashCap GDIPlus_PenSetDashStyle GDIPlus_PenSetEndCap GDIPlus_PenSetLineCap GDIPlus_PenSetLineJoin GDIPlus_PenSetMiterLimit GDIPlus_PenSetStartCap GDIPlus_PenSetWidth GDIPlus_RectFCreate GDIPlus_RegionClone GDIPlus_RegionCombinePath GDIPlus_RegionCombineRect GDIPlus_RegionCombineRegion GDIPlus_RegionCreate GDIPlus_RegionCreateFromPath GDIPlus_RegionCreateFromRect GDIPlus_RegionDispose GDIPlus_RegionGetBounds GDIPlus_RegionGetHRgn GDIPlus_RegionTransform GDIPlus_RegionTranslate GDIPlus_Shutdown GDIPlus_Startup GDIPlus_StringFormatCreate GDIPlus_StringFormatDispose GDIPlus_StringFormatGetMeasurableCharacterRangeCount GDIPlus_StringFormatSetAlign GDIPlus_StringFormatSetLineAlign GDIPlus_StringFormatSetMeasurableCharacterRanges GDIPlus_TextureCreate GDIPlus_TextureCreate2 GDIPlus_TextureCreateIA GetIP GUICtrlAVI_Close GUICtrlAVI_Create GUICtrlAVI_Destroy GUICtrlAVI_IsPlaying GUICtrlAVI_Open GUICtrlAVI_OpenEx GUICtrlAVI_Play GUICtrlAVI_Seek GUICtrlAVI_Show GUICtrlAVI_Stop GUICtrlButton_Click GUICtrlButton_Create GUICtrlButton_Destroy GUICtrlButton_Enable GUICtrlButton_GetCheck GUICtrlButton_GetFocus GUICtrlButton_GetIdealSize GUICtrlButton_GetImage GUICtrlButton_GetImageList GUICtrlButton_GetNote GUICtrlButton_GetNoteLength GUICtrlButton_GetSplitInfo GUICtrlButton_GetState GUICtrlButton_GetText GUICtrlButton_GetTextMargin GUICtrlButton_SetCheck GUICtrlButton_SetDontClick GUICtrlButton_SetFocus GUICtrlButton_SetImage GUICtrlButton_SetImageList GUICtrlButton_SetNote GUICtrlButton_SetShield GUICtrlButton_SetSize GUICtrlButton_SetSplitInfo GUICtrlButton_SetState GUICtrlButton_SetStyle GUICtrlButton_SetText GUICtrlButton_SetTextMargin GUICtrlButton_Show GUICtrlComboBoxEx_AddDir GUICtrlComboBoxEx_AddString GUICtrlComboBoxEx_BeginUpdate GUICtrlComboBoxEx_Create GUICtrlComboBoxEx_CreateSolidBitMap GUICtrlComboBoxEx_DeleteString GUICtrlComboBoxEx_Destroy GUICtrlComboBoxEx_EndUpdate GUICtrlComboBoxEx_FindStringExact GUICtrlComboBoxEx_GetComboBoxInfo GUICtrlComboBoxEx_GetComboControl GUICtrlComboBoxEx_GetCount GUICtrlComboBoxEx_GetCurSel GUICtrlComboBoxEx_GetDroppedControlRect GUICtrlComboBoxEx_GetDroppedControlRectEx GUICtrlComboBoxEx_GetDroppedState GUICtrlComboBoxEx_GetDroppedWidth GUICtrlComboBoxEx_GetEditControl GUICtrlComboBoxEx_GetEditSel GUICtrlComboBoxEx_GetEditText GUICtrlComboBoxEx_GetExtendedStyle GUICtrlComboBoxEx_GetExtendedUI GUICtrlComboBoxEx_GetImageList GUICtrlComboBoxEx_GetItem GUICtrlComboBoxEx_GetItemEx GUICtrlComboBoxEx_GetItemHeight GUICtrlComboBoxEx_GetItemImage GUICtrlComboBoxEx_GetItemIndent GUICtrlComboBoxEx_GetItemOverlayImage GUICtrlComboBoxEx_GetItemParam GUICtrlComboBoxEx_GetItemSelectedImage GUICtrlComboBoxEx_GetItemText GUICtrlComboBoxEx_GetItemTextLen GUICtrlComboBoxEx_GetList GUICtrlComboBoxEx_GetListArray GUICtrlComboBoxEx_GetLocale GUICtrlComboBoxEx_GetLocaleCountry GUICtrlComboBoxEx_GetLocaleLang GUICtrlComboBoxEx_GetLocalePrimLang GUICtrlComboBoxEx_GetLocaleSubLang GUICtrlComboBoxEx_GetMinVisible GUICtrlComboBoxEx_GetTopIndex GUICtrlComboBoxEx_GetUnicode GUICtrlComboBoxEx_InitStorage GUICtrlComboBoxEx_InsertString GUICtrlComboBoxEx_LimitText GUICtrlComboBoxEx_ReplaceEditSel GUICtrlComboBoxEx_ResetContent GUICtrlComboBoxEx_SetCurSel GUICtrlComboBoxEx_SetDroppedWidth GUICtrlComboBoxEx_SetEditSel GUICtrlComboBoxEx_SetEditText GUICtrlComboBoxEx_SetExtendedStyle GUICtrlComboBoxEx_SetExtendedUI GUICtrlComboBoxEx_SetImageList GUICtrlComboBoxEx_SetItem GUICtrlComboBoxEx_SetItemEx GUICtrlComboBoxEx_SetItemHeight GUICtrlComboBoxEx_SetItemImage GUICtrlComboBoxEx_SetItemIndent GUICtrlComboBoxEx_SetItemOverlayImage GUICtrlComboBoxEx_SetItemParam GUICtrlComboBoxEx_SetItemSelectedImage GUICtrlComboBoxEx_SetMinVisible GUICtrlComboBoxEx_SetTopIndex GUICtrlComboBoxEx_SetUnicode GUICtrlComboBoxEx_ShowDropDown GUICtrlComboBox_AddDir GUICtrlComboBox_AddString GUICtrlComboBox_AutoComplete GUICtrlComboBox_BeginUpdate GUICtrlComboBox_Create GUICtrlComboBox_DeleteString GUICtrlComboBox_Destroy GUICtrlComboBox_EndUpdate GUICtrlComboBox_FindString GUICtrlComboBox_FindStringExact GUICtrlComboBox_GetComboBoxInfo GUICtrlComboBox_GetCount GUICtrlComboBox_GetCueBanner GUICtrlComboBox_GetCurSel GUICtrlComboBox_GetDroppedControlRect GUICtrlComboBox_GetDroppedControlRectEx GUICtrlComboBox_GetDroppedState GUICtrlComboBox_GetDroppedWidth GUICtrlComboBox_GetEditSel GUICtrlComboBox_GetEditText GUICtrlComboBox_GetExtendedUI GUICtrlComboBox_GetHorizontalExtent GUICtrlComboBox_GetItemHeight GUICtrlComboBox_GetLBText GUICtrlComboBox_GetLBTextLen GUICtrlComboBox_GetList GUICtrlComboBox_GetListArray GUICtrlComboBox_GetLocale GUICtrlComboBox_GetLocaleCountry GUICtrlComboBox_GetLocaleLang GUICtrlComboBox_GetLocalePrimLang GUICtrlComboBox_GetLocaleSubLang GUICtrlComboBox_GetMinVisible GUICtrlComboBox_GetTopIndex GUICtrlComboBox_InitStorage GUICtrlComboBox_InsertString GUICtrlComboBox_LimitText GUICtrlComboBox_ReplaceEditSel GUICtrlComboBox_ResetContent GUICtrlComboBox_SelectString GUICtrlComboBox_SetCueBanner GUICtrlComboBox_SetCurSel GUICtrlComboBox_SetDroppedWidth GUICtrlComboBox_SetEditSel GUICtrlComboBox_SetEditText GUICtrlComboBox_SetExtendedUI GUICtrlComboBox_SetHorizontalExtent GUICtrlComboBox_SetItemHeight GUICtrlComboBox_SetMinVisible GUICtrlComboBox_SetTopIndex GUICtrlComboBox_ShowDropDown GUICtrlDTP_Create GUICtrlDTP_Destroy GUICtrlDTP_GetMCColor GUICtrlDTP_GetMCFont GUICtrlDTP_GetMonthCal GUICtrlDTP_GetRange GUICtrlDTP_GetRangeEx GUICtrlDTP_GetSystemTime GUICtrlDTP_GetSystemTimeEx GUICtrlDTP_SetFormat GUICtrlDTP_SetMCColor GUICtrlDTP_SetMCFont GUICtrlDTP_SetRange GUICtrlDTP_SetRangeEx GUICtrlDTP_SetSystemTime GUICtrlDTP_SetSystemTimeEx GUICtrlEdit_AppendText GUICtrlEdit_BeginUpdate GUICtrlEdit_CanUndo GUICtrlEdit_CharFromPos GUICtrlEdit_Create GUICtrlEdit_Destroy GUICtrlEdit_EmptyUndoBuffer GUICtrlEdit_EndUpdate GUICtrlEdit_Find GUICtrlEdit_FmtLines GUICtrlEdit_GetCueBanner GUICtrlEdit_GetFirstVisibleLine GUICtrlEdit_GetLimitText GUICtrlEdit_GetLine GUICtrlEdit_GetLineCount GUICtrlEdit_GetMargins GUICtrlEdit_GetModify GUICtrlEdit_GetPasswordChar GUICtrlEdit_GetRECT GUICtrlEdit_GetRECTEx GUICtrlEdit_GetSel GUICtrlEdit_GetText GUICtrlEdit_GetTextLen GUICtrlEdit_HideBalloonTip GUICtrlEdit_InsertText GUICtrlEdit_LineFromChar GUICtrlEdit_LineIndex GUICtrlEdit_LineLength GUICtrlEdit_LineScroll GUICtrlEdit_PosFromChar GUICtrlEdit_ReplaceSel GUICtrlEdit_Scroll GUICtrlEdit_SetCueBanner GUICtrlEdit_SetLimitText GUICtrlEdit_SetMargins GUICtrlEdit_SetModify GUICtrlEdit_SetPasswordChar GUICtrlEdit_SetReadOnly GUICtrlEdit_SetRECT GUICtrlEdit_SetRECTEx GUICtrlEdit_SetRECTNP GUICtrlEdit_SetRectNPEx GUICtrlEdit_SetSel GUICtrlEdit_SetTabStops GUICtrlEdit_SetText GUICtrlEdit_ShowBalloonTip GUICtrlEdit_Undo GUICtrlHeader_AddItem GUICtrlHeader_ClearFilter GUICtrlHeader_ClearFilterAll GUICtrlHeader_Create GUICtrlHeader_CreateDragImage GUICtrlHeader_DeleteItem GUICtrlHeader_Destroy GUICtrlHeader_EditFilter GUICtrlHeader_GetBitmapMargin GUICtrlHeader_GetImageList GUICtrlHeader_GetItem GUICtrlHeader_GetItemAlign GUICtrlHeader_GetItemBitmap GUICtrlHeader_GetItemCount GUICtrlHeader_GetItemDisplay GUICtrlHeader_GetItemFlags GUICtrlHeader_GetItemFormat GUICtrlHeader_GetItemImage GUICtrlHeader_GetItemOrder GUICtrlHeader_GetItemParam GUICtrlHeader_GetItemRect GUICtrlHeader_GetItemRectEx GUICtrlHeader_GetItemText GUICtrlHeader_GetItemWidth GUICtrlHeader_GetOrderArray GUICtrlHeader_GetUnicodeFormat GUICtrlHeader_HitTest GUICtrlHeader_InsertItem GUICtrlHeader_Layout GUICtrlHeader_OrderToIndex GUICtrlHeader_SetBitmapMargin GUICtrlHeader_SetFilterChangeTimeout GUICtrlHeader_SetHotDivider GUICtrlHeader_SetImageList GUICtrlHeader_SetItem GUICtrlHeader_SetItemAlign GUICtrlHeader_SetItemBitmap GUICtrlHeader_SetItemDisplay GUICtrlHeader_SetItemFlags GUICtrlHeader_SetItemFormat GUICtrlHeader_SetItemImage GUICtrlHeader_SetItemOrder GUICtrlHeader_SetItemParam GUICtrlHeader_SetItemText GUICtrlHeader_SetItemWidth GUICtrlHeader_SetOrderArray GUICtrlHeader_SetUnicodeFormat GUICtrlIpAddress_ClearAddress GUICtrlIpAddress_Create GUICtrlIpAddress_Destroy GUICtrlIpAddress_Get GUICtrlIpAddress_GetArray GUICtrlIpAddress_GetEx GUICtrlIpAddress_IsBlank GUICtrlIpAddress_Set GUICtrlIpAddress_SetArray GUICtrlIpAddress_SetEx GUICtrlIpAddress_SetFocus GUICtrlIpAddress_SetFont GUICtrlIpAddress_SetRange GUICtrlIpAddress_ShowHide GUICtrlListBox_AddFile GUICtrlListBox_AddString GUICtrlListBox_BeginUpdate GUICtrlListBox_ClickItem GUICtrlListBox_Create GUICtrlListBox_DeleteString GUICtrlListBox_Destroy GUICtrlListBox_Dir GUICtrlListBox_EndUpdate GUICtrlListBox_FindInText GUICtrlListBox_FindString GUICtrlListBox_GetAnchorIndex GUICtrlListBox_GetCaretIndex GUICtrlListBox_GetCount GUICtrlListBox_GetCurSel GUICtrlListBox_GetHorizontalExtent GUICtrlListBox_GetItemData GUICtrlListBox_GetItemHeight GUICtrlListBox_GetItemRect GUICtrlListBox_GetItemRectEx GUICtrlListBox_GetListBoxInfo GUICtrlListBox_GetLocale GUICtrlListBox_GetLocaleCountry GUICtrlListBox_GetLocaleLang GUICtrlListBox_GetLocalePrimLang GUICtrlListBox_GetLocaleSubLang GUICtrlListBox_GetSel GUICtrlListBox_GetSelCount GUICtrlListBox_GetSelItems GUICtrlListBox_GetSelItemsText GUICtrlListBox_GetText GUICtrlListBox_GetTextLen GUICtrlListBox_GetTopIndex GUICtrlListBox_InitStorage GUICtrlListBox_InsertString GUICtrlListBox_ItemFromPoint GUICtrlListBox_ReplaceString GUICtrlListBox_ResetContent GUICtrlListBox_SelectString GUICtrlListBox_SelItemRange GUICtrlListBox_SelItemRangeEx GUICtrlListBox_SetAnchorIndex GUICtrlListBox_SetCaretIndex GUICtrlListBox_SetColumnWidth GUICtrlListBox_SetCurSel GUICtrlListBox_SetHorizontalExtent GUICtrlListBox_SetItemData GUICtrlListBox_SetItemHeight GUICtrlListBox_SetLocale GUICtrlListBox_SetSel GUICtrlListBox_SetTabStops GUICtrlListBox_SetTopIndex GUICtrlListBox_Sort GUICtrlListBox_SwapString GUICtrlListBox_UpdateHScroll GUICtrlListView_AddArray GUICtrlListView_AddColumn GUICtrlListView_AddItem GUICtrlListView_AddSubItem GUICtrlListView_ApproximateViewHeight GUICtrlListView_ApproximateViewRect GUICtrlListView_ApproximateViewWidth GUICtrlListView_Arrange GUICtrlListView_BeginUpdate GUICtrlListView_CancelEditLabel GUICtrlListView_ClickItem GUICtrlListView_CopyItems GUICtrlListView_Create GUICtrlListView_CreateDragImage GUICtrlListView_CreateSolidBitMap GUICtrlListView_DeleteAllItems GUICtrlListView_DeleteColumn GUICtrlListView_DeleteItem GUICtrlListView_DeleteItemsSelected GUICtrlListView_Destroy GUICtrlListView_DrawDragImage GUICtrlListView_EditLabel GUICtrlListView_EnableGroupView GUICtrlListView_EndUpdate GUICtrlListView_EnsureVisible GUICtrlListView_FindInText GUICtrlListView_FindItem GUICtrlListView_FindNearest GUICtrlListView_FindParam GUICtrlListView_FindText GUICtrlListView_GetBkColor GUICtrlListView_GetBkImage GUICtrlListView_GetCallbackMask GUICtrlListView_GetColumn GUICtrlListView_GetColumnCount GUICtrlListView_GetColumnOrder GUICtrlListView_GetColumnOrderArray GUICtrlListView_GetColumnWidth GUICtrlListView_GetCounterPage GUICtrlListView_GetEditControl GUICtrlListView_GetExtendedListViewStyle GUICtrlListView_GetFocusedGroup GUICtrlListView_GetGroupCount GUICtrlListView_GetGroupInfo GUICtrlListView_GetGroupInfoByIndex GUICtrlListView_GetGroupRect GUICtrlListView_GetGroupViewEnabled GUICtrlListView_GetHeader GUICtrlListView_GetHotCursor GUICtrlListView_GetHotItem GUICtrlListView_GetHoverTime GUICtrlListView_GetImageList GUICtrlListView_GetISearchString GUICtrlListView_GetItem GUICtrlListView_GetItemChecked GUICtrlListView_GetItemCount GUICtrlListView_GetItemCut GUICtrlListView_GetItemDropHilited GUICtrlListView_GetItemEx GUICtrlListView_GetItemFocused GUICtrlListView_GetItemGroupID GUICtrlListView_GetItemImage GUICtrlListView_GetItemIndent GUICtrlListView_GetItemParam GUICtrlListView_GetItemPosition GUICtrlListView_GetItemPositionX GUICtrlListView_GetItemPositionY GUICtrlListView_GetItemRect GUICtrlListView_GetItemRectEx GUICtrlListView_GetItemSelected GUICtrlListView_GetItemSpacing GUICtrlListView_GetItemSpacingX GUICtrlListView_GetItemSpacingY GUICtrlListView_GetItemState GUICtrlListView_GetItemStateImage GUICtrlListView_GetItemText GUICtrlListView_GetItemTextArray GUICtrlListView_GetItemTextString GUICtrlListView_GetNextItem GUICtrlListView_GetNumberOfWorkAreas GUICtrlListView_GetOrigin GUICtrlListView_GetOriginX GUICtrlListView_GetOriginY GUICtrlListView_GetOutlineColor GUICtrlListView_GetSelectedColumn GUICtrlListView_GetSelectedCount GUICtrlListView_GetSelectedIndices GUICtrlListView_GetSelectionMark GUICtrlListView_GetStringWidth GUICtrlListView_GetSubItemRect GUICtrlListView_GetTextBkColor GUICtrlListView_GetTextColor GUICtrlListView_GetToolTips GUICtrlListView_GetTopIndex GUICtrlListView_GetUnicodeFormat GUICtrlListView_GetView GUICtrlListView_GetViewDetails GUICtrlListView_GetViewLarge GUICtrlListView_GetViewList GUICtrlListView_GetViewRect GUICtrlListView_GetViewSmall GUICtrlListView_GetViewTile GUICtrlListView_HideColumn GUICtrlListView_HitTest GUICtrlListView_InsertColumn GUICtrlListView_InsertGroup GUICtrlListView_InsertItem GUICtrlListView_JustifyColumn GUICtrlListView_MapIDToIndex GUICtrlListView_MapIndexToID GUICtrlListView_RedrawItems GUICtrlListView_RegisterSortCallBack GUICtrlListView_RemoveAllGroups GUICtrlListView_RemoveGroup GUICtrlListView_Scroll GUICtrlListView_SetBkColor GUICtrlListView_SetBkImage GUICtrlListView_SetCallBackMask GUICtrlListView_SetColumn GUICtrlListView_SetColumnOrder GUICtrlListView_SetColumnOrderArray GUICtrlListView_SetColumnWidth GUICtrlListView_SetExtendedListViewStyle GUICtrlListView_SetGroupInfo GUICtrlListView_SetHotItem GUICtrlListView_SetHoverTime GUICtrlListView_SetIconSpacing GUICtrlListView_SetImageList GUICtrlListView_SetItem GUICtrlListView_SetItemChecked GUICtrlListView_SetItemCount GUICtrlListView_SetItemCut GUICtrlListView_SetItemDropHilited GUICtrlListView_SetItemEx GUICtrlListView_SetItemFocused GUICtrlListView_SetItemGroupID GUICtrlListView_SetItemImage GUICtrlListView_SetItemIndent GUICtrlListView_SetItemParam GUICtrlListView_SetItemPosition GUICtrlListView_SetItemPosition32 GUICtrlListView_SetItemSelected GUICtrlListView_SetItemState GUICtrlListView_SetItemStateImage GUICtrlListView_SetItemText GUICtrlListView_SetOutlineColor GUICtrlListView_SetSelectedColumn GUICtrlListView_SetSelectionMark GUICtrlListView_SetTextBkColor GUICtrlListView_SetTextColor GUICtrlListView_SetToolTips GUICtrlListView_SetUnicodeFormat GUICtrlListView_SetView GUICtrlListView_SetWorkAreas GUICtrlListView_SimpleSort GUICtrlListView_SortItems GUICtrlListView_SubItemHitTest GUICtrlListView_UnRegisterSortCallBack GUICtrlMenu_AddMenuItem GUICtrlMenu_AppendMenu GUICtrlMenu_CalculatePopupWindowPosition GUICtrlMenu_CheckMenuItem GUICtrlMenu_CheckRadioItem GUICtrlMenu_CreateMenu GUICtrlMenu_CreatePopup GUICtrlMenu_DeleteMenu GUICtrlMenu_DestroyMenu GUICtrlMenu_DrawMenuBar GUICtrlMenu_EnableMenuItem GUICtrlMenu_FindItem GUICtrlMenu_FindParent GUICtrlMenu_GetItemBmp GUICtrlMenu_GetItemBmpChecked GUICtrlMenu_GetItemBmpUnchecked GUICtrlMenu_GetItemChecked GUICtrlMenu_GetItemCount GUICtrlMenu_GetItemData GUICtrlMenu_GetItemDefault GUICtrlMenu_GetItemDisabled GUICtrlMenu_GetItemEnabled GUICtrlMenu_GetItemGrayed GUICtrlMenu_GetItemHighlighted GUICtrlMenu_GetItemID GUICtrlMenu_GetItemInfo GUICtrlMenu_GetItemRect GUICtrlMenu_GetItemRectEx GUICtrlMenu_GetItemState GUICtrlMenu_GetItemStateEx GUICtrlMenu_GetItemSubMenu GUICtrlMenu_GetItemText GUICtrlMenu_GetItemType GUICtrlMenu_GetMenu GUICtrlMenu_GetMenuBackground GUICtrlMenu_GetMenuBarInfo GUICtrlMenu_GetMenuContextHelpID GUICtrlMenu_GetMenuData GUICtrlMenu_GetMenuDefaultItem GUICtrlMenu_GetMenuHeight GUICtrlMenu_GetMenuInfo GUICtrlMenu_GetMenuStyle GUICtrlMenu_GetSystemMenu GUICtrlMenu_InsertMenuItem GUICtrlMenu_InsertMenuItemEx GUICtrlMenu_IsMenu GUICtrlMenu_LoadMenu GUICtrlMenu_MapAccelerator GUICtrlMenu_MenuItemFromPoint GUICtrlMenu_RemoveMenu GUICtrlMenu_SetItemBitmaps GUICtrlMenu_SetItemBmp GUICtrlMenu_SetItemBmpChecked GUICtrlMenu_SetItemBmpUnchecked GUICtrlMenu_SetItemChecked GUICtrlMenu_SetItemData GUICtrlMenu_SetItemDefault GUICtrlMenu_SetItemDisabled GUICtrlMenu_SetItemEnabled GUICtrlMenu_SetItemGrayed GUICtrlMenu_SetItemHighlighted GUICtrlMenu_SetItemID GUICtrlMenu_SetItemInfo GUICtrlMenu_SetItemState GUICtrlMenu_SetItemSubMenu GUICtrlMenu_SetItemText GUICtrlMenu_SetItemType GUICtrlMenu_SetMenu GUICtrlMenu_SetMenuBackground GUICtrlMenu_SetMenuContextHelpID GUICtrlMenu_SetMenuData GUICtrlMenu_SetMenuDefaultItem GUICtrlMenu_SetMenuHeight GUICtrlMenu_SetMenuInfo GUICtrlMenu_SetMenuStyle GUICtrlMenu_TrackPopupMenu GUICtrlMonthCal_Create GUICtrlMonthCal_Destroy GUICtrlMonthCal_GetCalendarBorder GUICtrlMonthCal_GetCalendarCount GUICtrlMonthCal_GetColor GUICtrlMonthCal_GetColorArray GUICtrlMonthCal_GetCurSel GUICtrlMonthCal_GetCurSelStr GUICtrlMonthCal_GetFirstDOW GUICtrlMonthCal_GetFirstDOWStr GUICtrlMonthCal_GetMaxSelCount GUICtrlMonthCal_GetMaxTodayWidth GUICtrlMonthCal_GetMinReqHeight GUICtrlMonthCal_GetMinReqRect GUICtrlMonthCal_GetMinReqRectArray GUICtrlMonthCal_GetMinReqWidth GUICtrlMonthCal_GetMonthDelta GUICtrlMonthCal_GetMonthRange GUICtrlMonthCal_GetMonthRangeMax GUICtrlMonthCal_GetMonthRangeMaxStr GUICtrlMonthCal_GetMonthRangeMin GUICtrlMonthCal_GetMonthRangeMinStr GUICtrlMonthCal_GetMonthRangeSpan GUICtrlMonthCal_GetRange GUICtrlMonthCal_GetRangeMax GUICtrlMonthCal_GetRangeMaxStr GUICtrlMonthCal_GetRangeMin GUICtrlMonthCal_GetRangeMinStr GUICtrlMonthCal_GetSelRange GUICtrlMonthCal_GetSelRangeMax GUICtrlMonthCal_GetSelRangeMaxStr GUICtrlMonthCal_GetSelRangeMin GUICtrlMonthCal_GetSelRangeMinStr GUICtrlMonthCal_GetToday GUICtrlMonthCal_GetTodayStr GUICtrlMonthCal_GetUnicodeFormat GUICtrlMonthCal_HitTest GUICtrlMonthCal_SetCalendarBorder GUICtrlMonthCal_SetColor GUICtrlMonthCal_SetCurSel GUICtrlMonthCal_SetDayState GUICtrlMonthCal_SetFirstDOW GUICtrlMonthCal_SetMaxSelCount GUICtrlMonthCal_SetMonthDelta GUICtrlMonthCal_SetRange GUICtrlMonthCal_SetSelRange GUICtrlMonthCal_SetToday GUICtrlMonthCal_SetUnicodeFormat GUICtrlRebar_AddBand GUICtrlRebar_AddToolBarBand GUICtrlRebar_BeginDrag GUICtrlRebar_Create GUICtrlRebar_DeleteBand GUICtrlRebar_Destroy GUICtrlRebar_DragMove GUICtrlRebar_EndDrag GUICtrlRebar_GetBandBackColor GUICtrlRebar_GetBandBorders GUICtrlRebar_GetBandBordersEx GUICtrlRebar_GetBandChildHandle GUICtrlRebar_GetBandChildSize GUICtrlRebar_GetBandCount GUICtrlRebar_GetBandForeColor GUICtrlRebar_GetBandHeaderSize GUICtrlRebar_GetBandID GUICtrlRebar_GetBandIdealSize GUICtrlRebar_GetBandLength GUICtrlRebar_GetBandLParam GUICtrlRebar_GetBandMargins GUICtrlRebar_GetBandMarginsEx GUICtrlRebar_GetBandRect GUICtrlRebar_GetBandRectEx GUICtrlRebar_GetBandStyle GUICtrlRebar_GetBandStyleBreak GUICtrlRebar_GetBandStyleChildEdge GUICtrlRebar_GetBandStyleFixedBMP GUICtrlRebar_GetBandStyleFixedSize GUICtrlRebar_GetBandStyleGripperAlways GUICtrlRebar_GetBandStyleHidden GUICtrlRebar_GetBandStyleHideTitle GUICtrlRebar_GetBandStyleNoGripper GUICtrlRebar_GetBandStyleTopAlign GUICtrlRebar_GetBandStyleUseChevron GUICtrlRebar_GetBandStyleVariableHeight GUICtrlRebar_GetBandText GUICtrlRebar_GetBarHeight GUICtrlRebar_GetBarInfo GUICtrlRebar_GetBKColor GUICtrlRebar_GetColorScheme GUICtrlRebar_GetRowCount GUICtrlRebar_GetRowHeight GUICtrlRebar_GetTextColor GUICtrlRebar_GetToolTips GUICtrlRebar_GetUnicodeFormat GUICtrlRebar_HitTest GUICtrlRebar_IDToIndex GUICtrlRebar_MaximizeBand GUICtrlRebar_MinimizeBand GUICtrlRebar_MoveBand GUICtrlRebar_SetBandBackColor GUICtrlRebar_SetBandForeColor GUICtrlRebar_SetBandHeaderSize GUICtrlRebar_SetBandID GUICtrlRebar_SetBandIdealSize GUICtrlRebar_SetBandLength GUICtrlRebar_SetBandLParam GUICtrlRebar_SetBandStyle GUICtrlRebar_SetBandStyleBreak GUICtrlRebar_SetBandStyleChildEdge GUICtrlRebar_SetBandStyleFixedBMP GUICtrlRebar_SetBandStyleFixedSize GUICtrlRebar_SetBandStyleGripperAlways GUICtrlRebar_SetBandStyleHidden GUICtrlRebar_SetBandStyleHideTitle GUICtrlRebar_SetBandStyleNoGripper GUICtrlRebar_SetBandStyleTopAlign GUICtrlRebar_SetBandStyleUseChevron GUICtrlRebar_SetBandStyleVariableHeight GUICtrlRebar_SetBandText GUICtrlRebar_SetBarInfo GUICtrlRebar_SetBKColor GUICtrlRebar_SetColorScheme GUICtrlRebar_SetTextColor GUICtrlRebar_SetToolTips GUICtrlRebar_SetUnicodeFormat GUICtrlRebar_ShowBand GUICtrlRichEdit_AppendText GUICtrlRichEdit_AutoDetectURL GUICtrlRichEdit_CanPaste GUICtrlRichEdit_CanPasteSpecial GUICtrlRichEdit_CanRedo GUICtrlRichEdit_CanUndo GUICtrlRichEdit_ChangeFontSize GUICtrlRichEdit_Copy GUICtrlRichEdit_Create GUICtrlRichEdit_Cut GUICtrlRichEdit_Deselect GUICtrlRichEdit_Destroy GUICtrlRichEdit_EmptyUndoBuffer GUICtrlRichEdit_FindText GUICtrlRichEdit_FindTextInRange GUICtrlRichEdit_GetBkColor GUICtrlRichEdit_GetCharAttributes GUICtrlRichEdit_GetCharBkColor GUICtrlRichEdit_GetCharColor GUICtrlRichEdit_GetCharPosFromXY GUICtrlRichEdit_GetCharPosOfNextWord GUICtrlRichEdit_GetCharPosOfPreviousWord GUICtrlRichEdit_GetCharWordBreakInfo GUICtrlRichEdit_GetFirstCharPosOnLine GUICtrlRichEdit_GetFont GUICtrlRichEdit_GetLineCount GUICtrlRichEdit_GetLineLength GUICtrlRichEdit_GetLineNumberFromCharPos GUICtrlRichEdit_GetNextRedo GUICtrlRichEdit_GetNextUndo GUICtrlRichEdit_GetNumberOfFirstVisibleLine GUICtrlRichEdit_GetParaAlignment GUICtrlRichEdit_GetParaAttributes GUICtrlRichEdit_GetParaBorder GUICtrlRichEdit_GetParaIndents GUICtrlRichEdit_GetParaNumbering GUICtrlRichEdit_GetParaShading GUICtrlRichEdit_GetParaSpacing GUICtrlRichEdit_GetParaTabStops GUICtrlRichEdit_GetPasswordChar GUICtrlRichEdit_GetRECT GUICtrlRichEdit_GetScrollPos GUICtrlRichEdit_GetSel GUICtrlRichEdit_GetSelAA GUICtrlRichEdit_GetSelText GUICtrlRichEdit_GetSpaceUnit GUICtrlRichEdit_GetText GUICtrlRichEdit_GetTextInLine GUICtrlRichEdit_GetTextInRange GUICtrlRichEdit_GetTextLength GUICtrlRichEdit_GetVersion GUICtrlRichEdit_GetXYFromCharPos GUICtrlRichEdit_GetZoom GUICtrlRichEdit_GotoCharPos GUICtrlRichEdit_HideSelection GUICtrlRichEdit_InsertText GUICtrlRichEdit_IsModified GUICtrlRichEdit_IsTextSelected GUICtrlRichEdit_Paste GUICtrlRichEdit_PasteSpecial GUICtrlRichEdit_PauseRedraw GUICtrlRichEdit_Redo GUICtrlRichEdit_ReplaceText GUICtrlRichEdit_ResumeRedraw GUICtrlRichEdit_ScrollLineOrPage GUICtrlRichEdit_ScrollLines GUICtrlRichEdit_ScrollToCaret GUICtrlRichEdit_SetBkColor GUICtrlRichEdit_SetCharAttributes GUICtrlRichEdit_SetCharBkColor GUICtrlRichEdit_SetCharColor GUICtrlRichEdit_SetEventMask GUICtrlRichEdit_SetFont GUICtrlRichEdit_SetLimitOnText GUICtrlRichEdit_SetModified GUICtrlRichEdit_SetParaAlignment GUICtrlRichEdit_SetParaAttributes GUICtrlRichEdit_SetParaBorder GUICtrlRichEdit_SetParaIndents GUICtrlRichEdit_SetParaNumbering GUICtrlRichEdit_SetParaShading GUICtrlRichEdit_SetParaSpacing GUICtrlRichEdit_SetParaTabStops GUICtrlRichEdit_SetPasswordChar GUICtrlRichEdit_SetReadOnly GUICtrlRichEdit_SetRECT GUICtrlRichEdit_SetScrollPos GUICtrlRichEdit_SetSel GUICtrlRichEdit_SetSpaceUnit GUICtrlRichEdit_SetTabStops GUICtrlRichEdit_SetText GUICtrlRichEdit_SetUndoLimit GUICtrlRichEdit_SetZoom GUICtrlRichEdit_StreamFromFile GUICtrlRichEdit_StreamFromVar GUICtrlRichEdit_StreamToFile GUICtrlRichEdit_StreamToVar GUICtrlRichEdit_Undo GUICtrlSlider_ClearSel GUICtrlSlider_ClearTics GUICtrlSlider_Create GUICtrlSlider_Destroy GUICtrlSlider_GetBuddy GUICtrlSlider_GetChannelRect GUICtrlSlider_GetChannelRectEx GUICtrlSlider_GetLineSize GUICtrlSlider_GetLogicalTics GUICtrlSlider_GetNumTics GUICtrlSlider_GetPageSize GUICtrlSlider_GetPos GUICtrlSlider_GetRange GUICtrlSlider_GetRangeMax GUICtrlSlider_GetRangeMin GUICtrlSlider_GetSel GUICtrlSlider_GetSelEnd GUICtrlSlider_GetSelStart GUICtrlSlider_GetThumbLength GUICtrlSlider_GetThumbRect GUICtrlSlider_GetThumbRectEx GUICtrlSlider_GetTic GUICtrlSlider_GetTicPos GUICtrlSlider_GetToolTips GUICtrlSlider_GetUnicodeFormat GUICtrlSlider_SetBuddy GUICtrlSlider_SetLineSize GUICtrlSlider_SetPageSize GUICtrlSlider_SetPos GUICtrlSlider_SetRange GUICtrlSlider_SetRangeMax GUICtrlSlider_SetRangeMin GUICtrlSlider_SetSel GUICtrlSlider_SetSelEnd GUICtrlSlider_SetSelStart GUICtrlSlider_SetThumbLength GUICtrlSlider_SetTic GUICtrlSlider_SetTicFreq GUICtrlSlider_SetTipSide GUICtrlSlider_SetToolTips GUICtrlSlider_SetUnicodeFormat GUICtrlStatusBar_Create GUICtrlStatusBar_Destroy GUICtrlStatusBar_EmbedControl GUICtrlStatusBar_GetBorders GUICtrlStatusBar_GetBordersHorz GUICtrlStatusBar_GetBordersRect GUICtrlStatusBar_GetBordersVert GUICtrlStatusBar_GetCount GUICtrlStatusBar_GetHeight GUICtrlStatusBar_GetIcon GUICtrlStatusBar_GetParts GUICtrlStatusBar_GetRect GUICtrlStatusBar_GetRectEx GUICtrlStatusBar_GetText GUICtrlStatusBar_GetTextFlags GUICtrlStatusBar_GetTextLength GUICtrlStatusBar_GetTextLengthEx GUICtrlStatusBar_GetTipText GUICtrlStatusBar_GetUnicodeFormat GUICtrlStatusBar_GetWidth GUICtrlStatusBar_IsSimple GUICtrlStatusBar_Resize GUICtrlStatusBar_SetBkColor GUICtrlStatusBar_SetIcon GUICtrlStatusBar_SetMinHeight GUICtrlStatusBar_SetParts GUICtrlStatusBar_SetSimple GUICtrlStatusBar_SetText GUICtrlStatusBar_SetTipText GUICtrlStatusBar_SetUnicodeFormat GUICtrlStatusBar_ShowHide GUICtrlTab_ActivateTab GUICtrlTab_ClickTab GUICtrlTab_Create GUICtrlTab_DeleteAllItems GUICtrlTab_DeleteItem GUICtrlTab_DeselectAll GUICtrlTab_Destroy GUICtrlTab_FindTab GUICtrlTab_GetCurFocus GUICtrlTab_GetCurSel GUICtrlTab_GetDisplayRect GUICtrlTab_GetDisplayRectEx GUICtrlTab_GetExtendedStyle GUICtrlTab_GetImageList GUICtrlTab_GetItem GUICtrlTab_GetItemCount GUICtrlTab_GetItemImage GUICtrlTab_GetItemParam GUICtrlTab_GetItemRect GUICtrlTab_GetItemRectEx GUICtrlTab_GetItemState GUICtrlTab_GetItemText GUICtrlTab_GetRowCount GUICtrlTab_GetToolTips GUICtrlTab_GetUnicodeFormat GUICtrlTab_HighlightItem GUICtrlTab_HitTest GUICtrlTab_InsertItem GUICtrlTab_RemoveImage GUICtrlTab_SetCurFocus GUICtrlTab_SetCurSel GUICtrlTab_SetExtendedStyle GUICtrlTab_SetImageList GUICtrlTab_SetItem GUICtrlTab_SetItemImage GUICtrlTab_SetItemParam GUICtrlTab_SetItemSize GUICtrlTab_SetItemState GUICtrlTab_SetItemText GUICtrlTab_SetMinTabWidth GUICtrlTab_SetPadding GUICtrlTab_SetToolTips GUICtrlTab_SetUnicodeFormat GUICtrlToolbar_AddBitmap GUICtrlToolbar_AddButton GUICtrlToolbar_AddButtonSep GUICtrlToolbar_AddString GUICtrlToolbar_ButtonCount GUICtrlToolbar_CheckButton GUICtrlToolbar_ClickAccel GUICtrlToolbar_ClickButton GUICtrlToolbar_ClickIndex GUICtrlToolbar_CommandToIndex GUICtrlToolbar_Create GUICtrlToolbar_Customize GUICtrlToolbar_DeleteButton GUICtrlToolbar_Destroy GUICtrlToolbar_EnableButton GUICtrlToolbar_FindToolbar GUICtrlToolbar_GetAnchorHighlight GUICtrlToolbar_GetBitmapFlags GUICtrlToolbar_GetButtonBitmap GUICtrlToolbar_GetButtonInfo GUICtrlToolbar_GetButtonInfoEx GUICtrlToolbar_GetButtonParam GUICtrlToolbar_GetButtonRect GUICtrlToolbar_GetButtonRectEx GUICtrlToolbar_GetButtonSize GUICtrlToolbar_GetButtonState GUICtrlToolbar_GetButtonStyle GUICtrlToolbar_GetButtonText GUICtrlToolbar_GetColorScheme GUICtrlToolbar_GetDisabledImageList GUICtrlToolbar_GetExtendedStyle GUICtrlToolbar_GetHotImageList GUICtrlToolbar_GetHotItem GUICtrlToolbar_GetImageList GUICtrlToolbar_GetInsertMark GUICtrlToolbar_GetInsertMarkColor GUICtrlToolbar_GetMaxSize GUICtrlToolbar_GetMetrics GUICtrlToolbar_GetPadding GUICtrlToolbar_GetRows GUICtrlToolbar_GetString GUICtrlToolbar_GetStyle GUICtrlToolbar_GetStyleAltDrag GUICtrlToolbar_GetStyleCustomErase GUICtrlToolbar_GetStyleFlat GUICtrlToolbar_GetStyleList GUICtrlToolbar_GetStyleRegisterDrop GUICtrlToolbar_GetStyleToolTips GUICtrlToolbar_GetStyleTransparent GUICtrlToolbar_GetStyleWrapable GUICtrlToolbar_GetTextRows GUICtrlToolbar_GetToolTips GUICtrlToolbar_GetUnicodeFormat GUICtrlToolbar_HideButton GUICtrlToolbar_HighlightButton GUICtrlToolbar_HitTest GUICtrlToolbar_IndexToCommand GUICtrlToolbar_InsertButton GUICtrlToolbar_InsertMarkHitTest GUICtrlToolbar_IsButtonChecked GUICtrlToolbar_IsButtonEnabled GUICtrlToolbar_IsButtonHidden GUICtrlToolbar_IsButtonHighlighted GUICtrlToolbar_IsButtonIndeterminate GUICtrlToolbar_IsButtonPressed GUICtrlToolbar_LoadBitmap GUICtrlToolbar_LoadImages GUICtrlToolbar_MapAccelerator GUICtrlToolbar_MoveButton GUICtrlToolbar_PressButton GUICtrlToolbar_SetAnchorHighlight GUICtrlToolbar_SetBitmapSize GUICtrlToolbar_SetButtonBitMap GUICtrlToolbar_SetButtonInfo GUICtrlToolbar_SetButtonInfoEx GUICtrlToolbar_SetButtonParam GUICtrlToolbar_SetButtonSize GUICtrlToolbar_SetButtonState GUICtrlToolbar_SetButtonStyle GUICtrlToolbar_SetButtonText GUICtrlToolbar_SetButtonWidth GUICtrlToolbar_SetCmdID GUICtrlToolbar_SetColorScheme GUICtrlToolbar_SetDisabledImageList GUICtrlToolbar_SetDrawTextFlags GUICtrlToolbar_SetExtendedStyle GUICtrlToolbar_SetHotImageList GUICtrlToolbar_SetHotItem GUICtrlToolbar_SetImageList GUICtrlToolbar_SetIndent GUICtrlToolbar_SetIndeterminate GUICtrlToolbar_SetInsertMark GUICtrlToolbar_SetInsertMarkColor GUICtrlToolbar_SetMaxTextRows GUICtrlToolbar_SetMetrics GUICtrlToolbar_SetPadding GUICtrlToolbar_SetParent GUICtrlToolbar_SetRows GUICtrlToolbar_SetStyle GUICtrlToolbar_SetStyleAltDrag GUICtrlToolbar_SetStyleCustomErase GUICtrlToolbar_SetStyleFlat GUICtrlToolbar_SetStyleList GUICtrlToolbar_SetStyleRegisterDrop GUICtrlToolbar_SetStyleToolTips GUICtrlToolbar_SetStyleTransparent GUICtrlToolbar_SetStyleWrapable GUICtrlToolbar_SetToolTips GUICtrlToolbar_SetUnicodeFormat GUICtrlToolbar_SetWindowTheme GUICtrlTreeView_Add GUICtrlTreeView_AddChild GUICtrlTreeView_AddChildFirst GUICtrlTreeView_AddFirst GUICtrlTreeView_BeginUpdate GUICtrlTreeView_ClickItem GUICtrlTreeView_Create GUICtrlTreeView_CreateDragImage GUICtrlTreeView_CreateSolidBitMap GUICtrlTreeView_Delete GUICtrlTreeView_DeleteAll GUICtrlTreeView_DeleteChildren GUICtrlTreeView_Destroy GUICtrlTreeView_DisplayRect GUICtrlTreeView_DisplayRectEx GUICtrlTreeView_EditText GUICtrlTreeView_EndEdit GUICtrlTreeView_EndUpdate GUICtrlTreeView_EnsureVisible GUICtrlTreeView_Expand GUICtrlTreeView_ExpandedOnce GUICtrlTreeView_FindItem GUICtrlTreeView_FindItemEx GUICtrlTreeView_GetBkColor GUICtrlTreeView_GetBold GUICtrlTreeView_GetChecked GUICtrlTreeView_GetChildCount GUICtrlTreeView_GetChildren GUICtrlTreeView_GetCount GUICtrlTreeView_GetCut GUICtrlTreeView_GetDropTarget GUICtrlTreeView_GetEditControl GUICtrlTreeView_GetExpanded GUICtrlTreeView_GetFirstChild GUICtrlTreeView_GetFirstItem GUICtrlTreeView_GetFirstVisible GUICtrlTreeView_GetFocused GUICtrlTreeView_GetHeight GUICtrlTreeView_GetImageIndex GUICtrlTreeView_GetImageListIconHandle GUICtrlTreeView_GetIndent GUICtrlTreeView_GetInsertMarkColor GUICtrlTreeView_GetISearchString GUICtrlTreeView_GetItemByIndex GUICtrlTreeView_GetItemHandle GUICtrlTreeView_GetItemParam GUICtrlTreeView_GetLastChild GUICtrlTreeView_GetLineColor GUICtrlTreeView_GetNext GUICtrlTreeView_GetNextChild GUICtrlTreeView_GetNextSibling GUICtrlTreeView_GetNextVisible GUICtrlTreeView_GetNormalImageList GUICtrlTreeView_GetParentHandle GUICtrlTreeView_GetParentParam GUICtrlTreeView_GetPrev GUICtrlTreeView_GetPrevChild GUICtrlTreeView_GetPrevSibling GUICtrlTreeView_GetPrevVisible GUICtrlTreeView_GetScrollTime GUICtrlTreeView_GetSelected GUICtrlTreeView_GetSelectedImageIndex GUICtrlTreeView_GetSelection GUICtrlTreeView_GetSiblingCount GUICtrlTreeView_GetState GUICtrlTreeView_GetStateImageIndex GUICtrlTreeView_GetStateImageList GUICtrlTreeView_GetText GUICtrlTreeView_GetTextColor GUICtrlTreeView_GetToolTips GUICtrlTreeView_GetTree GUICtrlTreeView_GetUnicodeFormat GUICtrlTreeView_GetVisible GUICtrlTreeView_GetVisibleCount GUICtrlTreeView_HitTest GUICtrlTreeView_HitTestEx GUICtrlTreeView_HitTestItem GUICtrlTreeView_Index GUICtrlTreeView_InsertItem GUICtrlTreeView_IsFirstItem GUICtrlTreeView_IsParent GUICtrlTreeView_Level GUICtrlTreeView_SelectItem GUICtrlTreeView_SelectItemByIndex GUICtrlTreeView_SetBkColor GUICtrlTreeView_SetBold GUICtrlTreeView_SetChecked GUICtrlTreeView_SetCheckedByIndex GUICtrlTreeView_SetChildren GUICtrlTreeView_SetCut GUICtrlTreeView_SetDropTarget GUICtrlTreeView_SetFocused GUICtrlTreeView_SetHeight GUICtrlTreeView_SetIcon GUICtrlTreeView_SetImageIndex GUICtrlTreeView_SetIndent GUICtrlTreeView_SetInsertMark GUICtrlTreeView_SetInsertMarkColor GUICtrlTreeView_SetItemHeight GUICtrlTreeView_SetItemParam GUICtrlTreeView_SetLineColor GUICtrlTreeView_SetNormalImageList GUICtrlTreeView_SetScrollTime GUICtrlTreeView_SetSelected GUICtrlTreeView_SetSelectedImageIndex GUICtrlTreeView_SetState GUICtrlTreeView_SetStateImageIndex GUICtrlTreeView_SetStateImageList GUICtrlTreeView_SetText GUICtrlTreeView_SetTextColor GUICtrlTreeView_SetToolTips GUICtrlTreeView_SetUnicodeFormat GUICtrlTreeView_Sort GUIImageList_Add GUIImageList_AddBitmap GUIImageList_AddIcon GUIImageList_AddMasked GUIImageList_BeginDrag GUIImageList_Copy GUIImageList_Create GUIImageList_Destroy GUIImageList_DestroyIcon GUIImageList_DragEnter GUIImageList_DragLeave GUIImageList_DragMove GUIImageList_Draw GUIImageList_DrawEx GUIImageList_Duplicate GUIImageList_EndDrag GUIImageList_GetBkColor GUIImageList_GetIcon GUIImageList_GetIconHeight GUIImageList_GetIconSize GUIImageList_GetIconSizeEx GUIImageList_GetIconWidth GUIImageList_GetImageCount GUIImageList_GetImageInfoEx GUIImageList_Remove GUIImageList_ReplaceIcon GUIImageList_SetBkColor GUIImageList_SetIconSize GUIImageList_SetImageCount GUIImageList_Swap GUIScrollBars_EnableScrollBar GUIScrollBars_GetScrollBarInfoEx GUIScrollBars_GetScrollBarRect GUIScrollBars_GetScrollBarRGState GUIScrollBars_GetScrollBarXYLineButton GUIScrollBars_GetScrollBarXYThumbBottom GUIScrollBars_GetScrollBarXYThumbTop GUIScrollBars_GetScrollInfo GUIScrollBars_GetScrollInfoEx GUIScrollBars_GetScrollInfoMax GUIScrollBars_GetScrollInfoMin GUIScrollBars_GetScrollInfoPage GUIScrollBars_GetScrollInfoPos GUIScrollBars_GetScrollInfoTrackPos GUIScrollBars_GetScrollPos GUIScrollBars_GetScrollRange GUIScrollBars_Init GUIScrollBars_ScrollWindow GUIScrollBars_SetScrollInfo GUIScrollBars_SetScrollInfoMax GUIScrollBars_SetScrollInfoMin GUIScrollBars_SetScrollInfoPage GUIScrollBars_SetScrollInfoPos GUIScrollBars_SetScrollRange GUIScrollBars_ShowScrollBar GUIToolTip_Activate GUIToolTip_AddTool GUIToolTip_AdjustRect GUIToolTip_BitsToTTF GUIToolTip_Create GUIToolTip_Deactivate GUIToolTip_DelTool GUIToolTip_Destroy GUIToolTip_EnumTools GUIToolTip_GetBubbleHeight GUIToolTip_GetBubbleSize GUIToolTip_GetBubbleWidth GUIToolTip_GetCurrentTool GUIToolTip_GetDelayTime GUIToolTip_GetMargin GUIToolTip_GetMarginEx GUIToolTip_GetMaxTipWidth GUIToolTip_GetText GUIToolTip_GetTipBkColor GUIToolTip_GetTipTextColor GUIToolTip_GetTitleBitMap GUIToolTip_GetTitleText GUIToolTip_GetToolCount GUIToolTip_GetToolInfo GUIToolTip_HitTest GUIToolTip_NewToolRect GUIToolTip_Pop GUIToolTip_PopUp GUIToolTip_SetDelayTime GUIToolTip_SetMargin GUIToolTip_SetMaxTipWidth GUIToolTip_SetTipBkColor GUIToolTip_SetTipTextColor GUIToolTip_SetTitle GUIToolTip_SetToolInfo GUIToolTip_SetWindowTheme GUIToolTip_ToolExists GUIToolTip_ToolToArray GUIToolTip_TrackActivate GUIToolTip_TrackPosition GUIToolTip_Update GUIToolTip_UpdateTipText HexToString IEAction IEAttach IEBodyReadHTML IEBodyReadText IEBodyWriteHTML IECreate IECreateEmbedded IEDocGetObj IEDocInsertHTML IEDocInsertText IEDocReadHTML IEDocWriteHTML IEErrorNotify IEFormElementCheckBoxSelect IEFormElementGetCollection IEFormElementGetObjByName IEFormElementGetValue IEFormElementOptionSelect IEFormElementRadioSelect IEFormElementSetValue IEFormGetCollection IEFormGetObjByName IEFormImageClick IEFormReset IEFormSubmit IEFrameGetCollection IEFrameGetObjByName IEGetObjById IEGetObjByName IEHeadInsertEventScript IEImgClick IEImgGetCollection IEIsFrameSet IELinkClickByIndex IELinkClickByText IELinkGetCollection IELoadWait IELoadWaitTimeout IENavigate IEPropertyGet IEPropertySet IEQuit IETableGetCollection IETableWriteToArray IETagNameAllGetCollection IETagNameGetCollection IE_Example IE_Introduction IE_VersionInfo INetExplorerCapable INetGetSource INetMail INetSmtpMail IsPressed MathCheckDiv Max MemGlobalAlloc MemGlobalFree MemGlobalLock MemGlobalSize MemGlobalUnlock MemMoveMemory MemVirtualAlloc MemVirtualAllocEx MemVirtualFree MemVirtualFreeEx Min MouseTrap NamedPipes_CallNamedPipe NamedPipes_ConnectNamedPipe NamedPipes_CreateNamedPipe NamedPipes_CreatePipe NamedPipes_DisconnectNamedPipe NamedPipes_GetNamedPipeHandleState NamedPipes_GetNamedPipeInfo NamedPipes_PeekNamedPipe NamedPipes_SetNamedPipeHandleState NamedPipes_TransactNamedPipe NamedPipes_WaitNamedPipe Net_Share_ConnectionEnum Net_Share_FileClose Net_Share_FileEnum Net_Share_FileGetInfo Net_Share_PermStr Net_Share_ResourceStr Net_Share_SessionDel Net_Share_SessionEnum Net_Share_SessionGetInfo Net_Share_ShareAdd Net_Share_ShareCheck Net_Share_ShareDel Net_Share_ShareEnum Net_Share_ShareGetInfo Net_Share_ShareSetInfo Net_Share_StatisticsGetSvr Net_Share_StatisticsGetWrk Now NowCalc NowCalcDate NowDate NowTime PathFull PathGetRelative PathMake PathSplit ProcessGetName ProcessGetPriority Radian ReplaceStringInFile RunDos ScreenCapture_Capture ScreenCapture_CaptureWnd ScreenCapture_SaveImage ScreenCapture_SetBMPFormat ScreenCapture_SetJPGQuality ScreenCapture_SetTIFColorDepth ScreenCapture_SetTIFCompression Security__AdjustTokenPrivileges Security__CreateProcessWithToken Security__DuplicateTokenEx Security__GetAccountSid Security__GetLengthSid Security__GetTokenInformation Security__ImpersonateSelf Security__IsValidSid Security__LookupAccountName Security__LookupAccountSid Security__LookupPrivilegeValue Security__OpenProcessToken Security__OpenThreadToken Security__OpenThreadTokenEx Security__SetPrivilege Security__SetTokenInformation Security__SidToStringSid Security__SidTypeStr Security__StringSidToSid SendMessage SendMessageA SetDate SetTime Singleton SoundClose SoundLength SoundOpen SoundPause SoundPlay SoundPos SoundResume SoundSeek SoundStatus SoundStop SQLite_Changes SQLite_Close SQLite_Display2DResult SQLite_Encode SQLite_ErrCode SQLite_ErrMsg SQLite_Escape SQLite_Exec SQLite_FastEncode SQLite_FastEscape SQLite_FetchData SQLite_FetchNames SQLite_GetTable SQLite_GetTable2d SQLite_LastInsertRowID SQLite_LibVersion SQLite_Open SQLite_Query SQLite_QueryFinalize SQLite_QueryReset SQLite_QuerySingleRow SQLite_SafeMode SQLite_SetTimeout SQLite_Shutdown SQLite_SQLiteExe SQLite_Startup SQLite_TotalChanges StringBetween StringExplode StringInsert StringProper StringRepeat StringTitleCase StringToHex TCPIpToName TempFile TicksToTime Timer_Diff Timer_GetIdleTime Timer_GetTimerID Timer_Init Timer_KillAllTimers Timer_KillTimer Timer_SetTimer TimeToTicks VersionCompare viClose viExecCommand viFindGpib viGpibBusReset viGTL viInteractiveControl viOpen viSetAttribute viSetTimeout WeekNumberISO WinAPI_AbortPath WinAPI_ActivateKeyboardLayout WinAPI_AddClipboardFormatListener WinAPI_AddFontMemResourceEx WinAPI_AddFontResourceEx WinAPI_AddIconOverlay WinAPI_AddIconTransparency WinAPI_AddMRUString WinAPI_AdjustBitmap WinAPI_AdjustTokenPrivileges WinAPI_AdjustWindowRectEx WinAPI_AlphaBlend WinAPI_AngleArc WinAPI_AnimateWindow WinAPI_Arc WinAPI_ArcTo WinAPI_ArrayToStruct WinAPI_AssignProcessToJobObject WinAPI_AssocGetPerceivedType WinAPI_AssocQueryString WinAPI_AttachConsole WinAPI_AttachThreadInput WinAPI_BackupRead WinAPI_BackupReadAbort WinAPI_BackupSeek WinAPI_BackupWrite WinAPI_BackupWriteAbort WinAPI_Beep WinAPI_BeginBufferedPaint WinAPI_BeginDeferWindowPos WinAPI_BeginPaint WinAPI_BeginPath WinAPI_BeginUpdateResource WinAPI_BitBlt WinAPI_BringWindowToTop WinAPI_BroadcastSystemMessage WinAPI_BrowseForFolderDlg WinAPI_BufferedPaintClear WinAPI_BufferedPaintInit WinAPI_BufferedPaintSetAlpha WinAPI_BufferedPaintUnInit WinAPI_CallNextHookEx WinAPI_CallWindowProc WinAPI_CallWindowProcW WinAPI_CascadeWindows WinAPI_ChangeWindowMessageFilterEx WinAPI_CharToOem WinAPI_ChildWindowFromPointEx WinAPI_ClientToScreen WinAPI_ClipCursor WinAPI_CloseDesktop WinAPI_CloseEnhMetaFile WinAPI_CloseFigure WinAPI_CloseHandle WinAPI_CloseThemeData WinAPI_CloseWindow WinAPI_CloseWindowStation WinAPI_CLSIDFromProgID WinAPI_CoInitialize WinAPI_ColorAdjustLuma WinAPI_ColorHLSToRGB WinAPI_ColorRGBToHLS WinAPI_CombineRgn WinAPI_CombineTransform WinAPI_CommandLineToArgv WinAPI_CommDlgExtendedError WinAPI_CommDlgExtendedErrorEx WinAPI_CompareString WinAPI_CompressBitmapBits WinAPI_CompressBuffer WinAPI_ComputeCrc32 WinAPI_ConfirmCredentials WinAPI_CopyBitmap WinAPI_CopyCursor WinAPI_CopyEnhMetaFile WinAPI_CopyFileEx WinAPI_CopyIcon WinAPI_CopyImage WinAPI_CopyRect WinAPI_CopyStruct WinAPI_CoTaskMemAlloc WinAPI_CoTaskMemFree WinAPI_CoTaskMemRealloc WinAPI_CoUninitialize WinAPI_Create32BitHBITMAP WinAPI_Create32BitHICON WinAPI_CreateANDBitmap WinAPI_CreateBitmap WinAPI_CreateBitmapIndirect WinAPI_CreateBrushIndirect WinAPI_CreateBuffer WinAPI_CreateBufferFromStruct WinAPI_CreateCaret WinAPI_CreateColorAdjustment WinAPI_CreateCompatibleBitmap WinAPI_CreateCompatibleBitmapEx WinAPI_CreateCompatibleDC WinAPI_CreateDesktop WinAPI_CreateDIB WinAPI_CreateDIBColorTable WinAPI_CreateDIBitmap WinAPI_CreateDIBSection WinAPI_CreateDirectory WinAPI_CreateDirectoryEx WinAPI_CreateEllipticRgn WinAPI_CreateEmptyIcon WinAPI_CreateEnhMetaFile WinAPI_CreateEvent WinAPI_CreateFile WinAPI_CreateFileEx WinAPI_CreateFileMapping WinAPI_CreateFont WinAPI_CreateFontEx WinAPI_CreateFontIndirect WinAPI_CreateGUID WinAPI_CreateHardLink WinAPI_CreateIcon WinAPI_CreateIconFromResourceEx WinAPI_CreateIconIndirect WinAPI_CreateJobObject WinAPI_CreateMargins WinAPI_CreateMRUList WinAPI_CreateMutex WinAPI_CreateNullRgn WinAPI_CreateNumberFormatInfo WinAPI_CreateObjectID WinAPI_CreatePen WinAPI_CreatePoint WinAPI_CreatePolygonRgn WinAPI_CreateProcess WinAPI_CreateProcessWithToken WinAPI_CreateRect WinAPI_CreateRectEx WinAPI_CreateRectRgn WinAPI_CreateRectRgnIndirect WinAPI_CreateRoundRectRgn WinAPI_CreateSemaphore WinAPI_CreateSize WinAPI_CreateSolidBitmap WinAPI_CreateSolidBrush WinAPI_CreateStreamOnHGlobal WinAPI_CreateString WinAPI_CreateSymbolicLink WinAPI_CreateTransform WinAPI_CreateWindowEx WinAPI_CreateWindowStation WinAPI_DecompressBuffer WinAPI_DecryptFile WinAPI_DeferWindowPos WinAPI_DefineDosDevice WinAPI_DefRawInputProc WinAPI_DefSubclassProc WinAPI_DefWindowProc WinAPI_DefWindowProcW WinAPI_DeleteDC WinAPI_DeleteEnhMetaFile WinAPI_DeleteFile WinAPI_DeleteObject WinAPI_DeleteObjectID WinAPI_DeleteVolumeMountPoint WinAPI_DeregisterShellHookWindow WinAPI_DestroyCaret WinAPI_DestroyCursor WinAPI_DestroyIcon WinAPI_DestroyWindow WinAPI_DeviceIoControl WinAPI_DisplayStruct WinAPI_DllGetVersion WinAPI_DllInstall WinAPI_DllUninstall WinAPI_DPtoLP WinAPI_DragAcceptFiles WinAPI_DragFinish WinAPI_DragQueryFileEx WinAPI_DragQueryPoint WinAPI_DrawAnimatedRects WinAPI_DrawBitmap WinAPI_DrawEdge WinAPI_DrawFocusRect WinAPI_DrawFrameControl WinAPI_DrawIcon WinAPI_DrawIconEx WinAPI_DrawLine WinAPI_DrawShadowText WinAPI_DrawText WinAPI_DrawThemeBackground WinAPI_DrawThemeEdge WinAPI_DrawThemeIcon WinAPI_DrawThemeParentBackground WinAPI_DrawThemeText WinAPI_DrawThemeTextEx WinAPI_DuplicateEncryptionInfoFile WinAPI_DuplicateHandle WinAPI_DuplicateTokenEx WinAPI_DwmDefWindowProc WinAPI_DwmEnableBlurBehindWindow WinAPI_DwmEnableComposition WinAPI_DwmExtendFrameIntoClientArea WinAPI_DwmGetColorizationColor WinAPI_DwmGetColorizationParameters WinAPI_DwmGetWindowAttribute WinAPI_DwmInvalidateIconicBitmaps WinAPI_DwmIsCompositionEnabled WinAPI_DwmQueryThumbnailSourceSize WinAPI_DwmRegisterThumbnail WinAPI_DwmSetColorizationParameters WinAPI_DwmSetIconicLivePreviewBitmap WinAPI_DwmSetIconicThumbnail WinAPI_DwmSetWindowAttribute WinAPI_DwmUnregisterThumbnail WinAPI_DwmUpdateThumbnailProperties WinAPI_DWordToFloat WinAPI_DWordToInt WinAPI_EjectMedia WinAPI_Ellipse WinAPI_EmptyWorkingSet WinAPI_EnableWindow WinAPI_EncryptFile WinAPI_EncryptionDisable WinAPI_EndBufferedPaint WinAPI_EndDeferWindowPos WinAPI_EndPaint WinAPI_EndPath WinAPI_EndUpdateResource WinAPI_EnumChildProcess WinAPI_EnumChildWindows WinAPI_EnumDesktops WinAPI_EnumDesktopWindows WinAPI_EnumDeviceDrivers WinAPI_EnumDisplayDevices WinAPI_EnumDisplayMonitors WinAPI_EnumDisplaySettings WinAPI_EnumDllProc WinAPI_EnumFiles WinAPI_EnumFileStreams WinAPI_EnumFontFamilies WinAPI_EnumHardLinks WinAPI_EnumMRUList WinAPI_EnumPageFiles WinAPI_EnumProcessHandles WinAPI_EnumProcessModules WinAPI_EnumProcessThreads WinAPI_EnumProcessWindows WinAPI_EnumRawInputDevices WinAPI_EnumResourceLanguages WinAPI_EnumResourceNames WinAPI_EnumResourceTypes WinAPI_EnumSystemGeoID WinAPI_EnumSystemLocales WinAPI_EnumUILanguages WinAPI_EnumWindows WinAPI_EnumWindowsPopup WinAPI_EnumWindowStations WinAPI_EnumWindowsTop WinAPI_EqualMemory WinAPI_EqualRect WinAPI_EqualRgn WinAPI_ExcludeClipRect WinAPI_ExpandEnvironmentStrings WinAPI_ExtCreatePen WinAPI_ExtCreateRegion WinAPI_ExtFloodFill WinAPI_ExtractIcon WinAPI_ExtractIconEx WinAPI_ExtSelectClipRgn WinAPI_FatalAppExit WinAPI_FatalExit WinAPI_FileEncryptionStatus WinAPI_FileExists WinAPI_FileIconInit WinAPI_FileInUse WinAPI_FillMemory WinAPI_FillPath WinAPI_FillRect WinAPI_FillRgn WinAPI_FindClose WinAPI_FindCloseChangeNotification WinAPI_FindExecutable WinAPI_FindFirstChangeNotification WinAPI_FindFirstFile WinAPI_FindFirstFileName WinAPI_FindFirstStream WinAPI_FindNextChangeNotification WinAPI_FindNextFile WinAPI_FindNextFileName WinAPI_FindNextStream WinAPI_FindResource WinAPI_FindResourceEx WinAPI_FindTextDlg WinAPI_FindWindow WinAPI_FlashWindow WinAPI_FlashWindowEx WinAPI_FlattenPath WinAPI_FloatToDWord WinAPI_FloatToInt WinAPI_FlushFileBuffers WinAPI_FlushFRBuffer WinAPI_FlushViewOfFile WinAPI_FormatDriveDlg WinAPI_FormatMessage WinAPI_FrameRect WinAPI_FrameRgn WinAPI_FreeLibrary WinAPI_FreeMemory WinAPI_FreeMRUList WinAPI_FreeResource WinAPI_GdiComment WinAPI_GetActiveWindow WinAPI_GetAllUsersProfileDirectory WinAPI_GetAncestor WinAPI_GetApplicationRestartSettings WinAPI_GetArcDirection WinAPI_GetAsyncKeyState WinAPI_GetBinaryType WinAPI_GetBitmapBits WinAPI_GetBitmapDimension WinAPI_GetBitmapDimensionEx WinAPI_GetBkColor WinAPI_GetBkMode WinAPI_GetBoundsRect WinAPI_GetBrushOrg WinAPI_GetBufferedPaintBits WinAPI_GetBufferedPaintDC WinAPI_GetBufferedPaintTargetDC WinAPI_GetBufferedPaintTargetRect WinAPI_GetBValue WinAPI_GetCaretBlinkTime WinAPI_GetCaretPos WinAPI_GetCDType WinAPI_GetClassInfoEx WinAPI_GetClassLongEx WinAPI_GetClassName WinAPI_GetClientHeight WinAPI_GetClientRect WinAPI_GetClientWidth WinAPI_GetClipboardSequenceNumber WinAPI_GetClipBox WinAPI_GetClipCursor WinAPI_GetClipRgn WinAPI_GetColorAdjustment WinAPI_GetCompressedFileSize WinAPI_GetCompression WinAPI_GetConnectedDlg WinAPI_GetCurrentDirectory WinAPI_GetCurrentHwProfile WinAPI_GetCurrentObject WinAPI_GetCurrentPosition WinAPI_GetCurrentProcess WinAPI_GetCurrentProcessExplicitAppUserModelID WinAPI_GetCurrentProcessID WinAPI_GetCurrentThemeName WinAPI_GetCurrentThread WinAPI_GetCurrentThreadId WinAPI_GetCursor WinAPI_GetCursorInfo WinAPI_GetDateFormat WinAPI_GetDC WinAPI_GetDCEx WinAPI_GetDefaultPrinter WinAPI_GetDefaultUserProfileDirectory WinAPI_GetDesktopWindow WinAPI_GetDeviceCaps WinAPI_GetDeviceDriverBaseName WinAPI_GetDeviceDriverFileName WinAPI_GetDeviceGammaRamp WinAPI_GetDIBColorTable WinAPI_GetDIBits WinAPI_GetDiskFreeSpaceEx WinAPI_GetDlgCtrlID WinAPI_GetDlgItem WinAPI_GetDllDirectory WinAPI_GetDriveBusType WinAPI_GetDriveGeometryEx WinAPI_GetDriveNumber WinAPI_GetDriveType WinAPI_GetDurationFormat WinAPI_GetEffectiveClientRect WinAPI_GetEnhMetaFile WinAPI_GetEnhMetaFileBits WinAPI_GetEnhMetaFileDescription WinAPI_GetEnhMetaFileDimension WinAPI_GetEnhMetaFileHeader WinAPI_GetErrorMessage WinAPI_GetErrorMode WinAPI_GetExitCodeProcess WinAPI_GetExtended WinAPI_GetFileAttributes WinAPI_GetFileID WinAPI_GetFileInformationByHandle WinAPI_GetFileInformationByHandleEx WinAPI_GetFilePointerEx WinAPI_GetFileSizeEx WinAPI_GetFileSizeOnDisk WinAPI_GetFileTitle WinAPI_GetFileType WinAPI_GetFileVersionInfo WinAPI_GetFinalPathNameByHandle WinAPI_GetFinalPathNameByHandleEx WinAPI_GetFocus WinAPI_GetFontMemoryResourceInfo WinAPI_GetFontName WinAPI_GetFontResourceInfo WinAPI_GetForegroundWindow WinAPI_GetFRBuffer WinAPI_GetFullPathName WinAPI_GetGeoInfo WinAPI_GetGlyphOutline WinAPI_GetGraphicsMode WinAPI_GetGuiResources WinAPI_GetGUIThreadInfo WinAPI_GetGValue WinAPI_GetHandleInformation WinAPI_GetHGlobalFromStream WinAPI_GetIconDimension WinAPI_GetIconInfo WinAPI_GetIconInfoEx WinAPI_GetIdleTime WinAPI_GetKeyboardLayout WinAPI_GetKeyboardLayoutList WinAPI_GetKeyboardState WinAPI_GetKeyboardType WinAPI_GetKeyNameText WinAPI_GetKeyState WinAPI_GetLastActivePopup WinAPI_GetLastError WinAPI_GetLastErrorMessage WinAPI_GetLayeredWindowAttributes WinAPI_GetLocaleInfo WinAPI_GetLogicalDrives WinAPI_GetMapMode WinAPI_GetMemorySize WinAPI_GetMessageExtraInfo WinAPI_GetModuleFileNameEx WinAPI_GetModuleHandle WinAPI_GetModuleHandleEx WinAPI_GetModuleInformation WinAPI_GetMonitorInfo WinAPI_GetMousePos WinAPI_GetMousePosX WinAPI_GetMousePosY WinAPI_GetMUILanguage WinAPI_GetNumberFormat WinAPI_GetObject WinAPI_GetObjectID WinAPI_GetObjectInfoByHandle WinAPI_GetObjectNameByHandle WinAPI_GetObjectType WinAPI_GetOpenFileName WinAPI_GetOutlineTextMetrics WinAPI_GetOverlappedResult WinAPI_GetParent WinAPI_GetParentProcess WinAPI_GetPerformanceInfo WinAPI_GetPEType WinAPI_GetPhysicallyInstalledSystemMemory WinAPI_GetPixel WinAPI_GetPolyFillMode WinAPI_GetPosFromRect WinAPI_GetPriorityClass WinAPI_GetProcAddress WinAPI_GetProcessAffinityMask WinAPI_GetProcessCommandLine WinAPI_GetProcessFileName WinAPI_GetProcessHandleCount WinAPI_GetProcessID WinAPI_GetProcessIoCounters WinAPI_GetProcessMemoryInfo WinAPI_GetProcessName WinAPI_GetProcessShutdownParameters WinAPI_GetProcessTimes WinAPI_GetProcessUser WinAPI_GetProcessWindowStation WinAPI_GetProcessWorkingDirectory WinAPI_GetProfilesDirectory WinAPI_GetPwrCapabilities WinAPI_GetRawInputBuffer WinAPI_GetRawInputBufferLength WinAPI_GetRawInputData WinAPI_GetRawInputDeviceInfo WinAPI_GetRegionData WinAPI_GetRegisteredRawInputDevices WinAPI_GetRegKeyNameByHandle WinAPI_GetRgnBox WinAPI_GetROP2 WinAPI_GetRValue WinAPI_GetSaveFileName WinAPI_GetShellWindow WinAPI_GetStartupInfo WinAPI_GetStdHandle WinAPI_GetStockObject WinAPI_GetStretchBltMode WinAPI_GetString WinAPI_GetSysColor WinAPI_GetSysColorBrush WinAPI_GetSystemDefaultLangID WinAPI_GetSystemDefaultLCID WinAPI_GetSystemDefaultUILanguage WinAPI_GetSystemDEPPolicy WinAPI_GetSystemInfo WinAPI_GetSystemMetrics WinAPI_GetSystemPowerStatus WinAPI_GetSystemTimes WinAPI_GetSystemWow64Directory WinAPI_GetTabbedTextExtent WinAPI_GetTempFileName WinAPI_GetTextAlign WinAPI_GetTextCharacterExtra WinAPI_GetTextColor WinAPI_GetTextExtentPoint32 WinAPI_GetTextFace WinAPI_GetTextMetrics WinAPI_GetThemeAppProperties WinAPI_GetThemeBackgroundContentRect WinAPI_GetThemeBackgroundExtent WinAPI_GetThemeBackgroundRegion WinAPI_GetThemeBitmap WinAPI_GetThemeBool WinAPI_GetThemeColor WinAPI_GetThemeDocumentationProperty WinAPI_GetThemeEnumValue WinAPI_GetThemeFilename WinAPI_GetThemeFont WinAPI_GetThemeInt WinAPI_GetThemeMargins WinAPI_GetThemeMetric WinAPI_GetThemePartSize WinAPI_GetThemePosition WinAPI_GetThemePropertyOrigin WinAPI_GetThemeRect WinAPI_GetThemeString WinAPI_GetThemeSysBool WinAPI_GetThemeSysColor WinAPI_GetThemeSysColorBrush WinAPI_GetThemeSysFont WinAPI_GetThemeSysInt WinAPI_GetThemeSysSize WinAPI_GetThemeSysString WinAPI_GetThemeTextExtent WinAPI_GetThemeTextMetrics WinAPI_GetThemeTransitionDuration WinAPI_GetThreadDesktop WinAPI_GetThreadErrorMode WinAPI_GetThreadLocale WinAPI_GetThreadUILanguage WinAPI_GetTickCount WinAPI_GetTickCount64 WinAPI_GetTimeFormat WinAPI_GetTopWindow WinAPI_GetUDFColorMode WinAPI_GetUpdateRect WinAPI_GetUpdateRgn WinAPI_GetUserDefaultLangID WinAPI_GetUserDefaultLCID WinAPI_GetUserDefaultUILanguage WinAPI_GetUserGeoID WinAPI_GetUserObjectInformation WinAPI_GetVersion WinAPI_GetVersionEx WinAPI_GetVolumeInformation WinAPI_GetVolumeInformationByHandle WinAPI_GetVolumeNameForVolumeMountPoint WinAPI_GetWindow WinAPI_GetWindowDC WinAPI_GetWindowDisplayAffinity WinAPI_GetWindowExt WinAPI_GetWindowFileName WinAPI_GetWindowHeight WinAPI_GetWindowInfo WinAPI_GetWindowLong WinAPI_GetWindowOrg WinAPI_GetWindowPlacement WinAPI_GetWindowRect WinAPI_GetWindowRgn WinAPI_GetWindowRgnBox WinAPI_GetWindowSubclass WinAPI_GetWindowText WinAPI_GetWindowTheme WinAPI_GetWindowThreadProcessId WinAPI_GetWindowWidth WinAPI_GetWorkArea WinAPI_GetWorldTransform WinAPI_GetXYFromPoint WinAPI_GlobalMemoryStatus WinAPI_GradientFill WinAPI_GUIDFromString WinAPI_GUIDFromStringEx WinAPI_HashData WinAPI_HashString WinAPI_HiByte WinAPI_HideCaret WinAPI_HiDWord WinAPI_HiWord WinAPI_InflateRect WinAPI_InitMUILanguage WinAPI_InProcess WinAPI_IntersectClipRect WinAPI_IntersectRect WinAPI_IntToDWord WinAPI_IntToFloat WinAPI_InvalidateRect WinAPI_InvalidateRgn WinAPI_InvertANDBitmap WinAPI_InvertColor WinAPI_InvertRect WinAPI_InvertRgn WinAPI_IOCTL WinAPI_IsAlphaBitmap WinAPI_IsBadCodePtr WinAPI_IsBadReadPtr WinAPI_IsBadStringPtr WinAPI_IsBadWritePtr WinAPI_IsChild WinAPI_IsClassName WinAPI_IsDoorOpen WinAPI_IsElevated WinAPI_IsHungAppWindow WinAPI_IsIconic WinAPI_IsInternetConnected WinAPI_IsLoadKBLayout WinAPI_IsMemory WinAPI_IsNameInExpression WinAPI_IsNetworkAlive WinAPI_IsPathShared WinAPI_IsProcessInJob WinAPI_IsProcessorFeaturePresent WinAPI_IsRectEmpty WinAPI_IsThemeActive WinAPI_IsThemeBackgroundPartiallyTransparent WinAPI_IsThemePartDefined WinAPI_IsValidLocale WinAPI_IsWindow WinAPI_IsWindowEnabled WinAPI_IsWindowUnicode WinAPI_IsWindowVisible WinAPI_IsWow64Process WinAPI_IsWritable WinAPI_IsZoomed WinAPI_Keybd_Event WinAPI_KillTimer WinAPI_LineDDA WinAPI_LineTo WinAPI_LoadBitmap WinAPI_LoadCursor WinAPI_LoadCursorFromFile WinAPI_LoadIcon WinAPI_LoadIconMetric WinAPI_LoadIconWithScaleDown WinAPI_LoadImage WinAPI_LoadIndirectString WinAPI_LoadKeyboardLayout WinAPI_LoadLibrary WinAPI_LoadLibraryEx WinAPI_LoadMedia WinAPI_LoadResource WinAPI_LoadShell32Icon WinAPI_LoadString WinAPI_LoadStringEx WinAPI_LoByte WinAPI_LocalFree WinAPI_LockDevice WinAPI_LockFile WinAPI_LockResource WinAPI_LockWindowUpdate WinAPI_LockWorkStation WinAPI_LoDWord WinAPI_LongMid WinAPI_LookupIconIdFromDirectoryEx WinAPI_LoWord WinAPI_LPtoDP WinAPI_MAKELANGID WinAPI_MAKELCID WinAPI_MakeLong WinAPI_MakeQWord WinAPI_MakeWord WinAPI_MapViewOfFile WinAPI_MapVirtualKey WinAPI_MaskBlt WinAPI_MessageBeep WinAPI_MessageBoxCheck WinAPI_MessageBoxIndirect WinAPI_MirrorIcon WinAPI_ModifyWorldTransform WinAPI_MonitorFromPoint WinAPI_MonitorFromRect WinAPI_MonitorFromWindow WinAPI_Mouse_Event WinAPI_MoveFileEx WinAPI_MoveMemory WinAPI_MoveTo WinAPI_MoveToEx WinAPI_MoveWindow WinAPI_MsgBox WinAPI_MulDiv WinAPI_MultiByteToWideChar WinAPI_MultiByteToWideCharEx WinAPI_NtStatusToDosError WinAPI_OemToChar WinAPI_OffsetClipRgn WinAPI_OffsetPoints WinAPI_OffsetRect WinAPI_OffsetRgn WinAPI_OffsetWindowOrg WinAPI_OpenDesktop WinAPI_OpenFileById WinAPI_OpenFileDlg WinAPI_OpenFileMapping WinAPI_OpenIcon WinAPI_OpenInputDesktop WinAPI_OpenJobObject WinAPI_OpenMutex WinAPI_OpenProcess WinAPI_OpenProcessToken WinAPI_OpenSemaphore WinAPI_OpenThemeData WinAPI_OpenWindowStation WinAPI_PageSetupDlg WinAPI_PaintDesktop WinAPI_PaintRgn WinAPI_ParseURL WinAPI_ParseUserName WinAPI_PatBlt WinAPI_PathAddBackslash WinAPI_PathAddExtension WinAPI_PathAppend WinAPI_PathBuildRoot WinAPI_PathCanonicalize WinAPI_PathCommonPrefix WinAPI_PathCompactPath WinAPI_PathCompactPathEx WinAPI_PathCreateFromUrl WinAPI_PathFindExtension WinAPI_PathFindFileName WinAPI_PathFindNextComponent WinAPI_PathFindOnPath WinAPI_PathGetArgs WinAPI_PathGetCharType WinAPI_PathGetDriveNumber WinAPI_PathIsContentType WinAPI_PathIsDirectory WinAPI_PathIsDirectoryEmpty WinAPI_PathIsExe WinAPI_PathIsFileSpec WinAPI_PathIsLFNFileSpec WinAPI_PathIsRelative WinAPI_PathIsRoot WinAPI_PathIsSameRoot WinAPI_PathIsSystemFolder WinAPI_PathIsUNC WinAPI_PathIsUNCServer WinAPI_PathIsUNCServerShare WinAPI_PathMakeSystemFolder WinAPI_PathMatchSpec WinAPI_PathParseIconLocation WinAPI_PathRelativePathTo WinAPI_PathRemoveArgs WinAPI_PathRemoveBackslash WinAPI_PathRemoveExtension WinAPI_PathRemoveFileSpec WinAPI_PathRenameExtension WinAPI_PathSearchAndQualify WinAPI_PathSkipRoot WinAPI_PathStripPath WinAPI_PathStripToRoot WinAPI_PathToRegion WinAPI_PathUndecorate WinAPI_PathUnExpandEnvStrings WinAPI_PathUnmakeSystemFolder WinAPI_PathUnquoteSpaces WinAPI_PathYetAnotherMakeUniqueName WinAPI_PickIconDlg WinAPI_PlayEnhMetaFile WinAPI_PlaySound WinAPI_PlgBlt WinAPI_PointFromRect WinAPI_PolyBezier WinAPI_PolyBezierTo WinAPI_PolyDraw WinAPI_Polygon WinAPI_PostMessage WinAPI_PrimaryLangId WinAPI_PrintDlg WinAPI_PrintDlgEx WinAPI_PrintWindow WinAPI_ProgIDFromCLSID WinAPI_PtInRect WinAPI_PtInRectEx WinAPI_PtInRegion WinAPI_PtVisible WinAPI_QueryDosDevice WinAPI_QueryInformationJobObject WinAPI_QueryPerformanceCounter WinAPI_QueryPerformanceFrequency WinAPI_RadialGradientFill WinAPI_ReadDirectoryChanges WinAPI_ReadFile WinAPI_ReadProcessMemory WinAPI_Rectangle WinAPI_RectInRegion WinAPI_RectIsEmpty WinAPI_RectVisible WinAPI_RedrawWindow WinAPI_RegCloseKey WinAPI_RegConnectRegistry WinAPI_RegCopyTree WinAPI_RegCopyTreeEx WinAPI_RegCreateKey WinAPI_RegDeleteEmptyKey WinAPI_RegDeleteKey WinAPI_RegDeleteKeyValue WinAPI_RegDeleteTree WinAPI_RegDeleteTreeEx WinAPI_RegDeleteValue WinAPI_RegDisableReflectionKey WinAPI_RegDuplicateHKey WinAPI_RegEnableReflectionKey WinAPI_RegEnumKey WinAPI_RegEnumValue WinAPI_RegFlushKey WinAPI_RegisterApplicationRestart WinAPI_RegisterClass WinAPI_RegisterClassEx WinAPI_RegisterHotKey WinAPI_RegisterPowerSettingNotification WinAPI_RegisterRawInputDevices WinAPI_RegisterShellHookWindow WinAPI_RegisterWindowMessage WinAPI_RegLoadMUIString WinAPI_RegNotifyChangeKeyValue WinAPI_RegOpenKey WinAPI_RegQueryInfoKey WinAPI_RegQueryLastWriteTime WinAPI_RegQueryMultipleValues WinAPI_RegQueryReflectionKey WinAPI_RegQueryValue WinAPI_RegRestoreKey WinAPI_RegSaveKey WinAPI_RegSetValue WinAPI_ReleaseCapture WinAPI_ReleaseDC WinAPI_ReleaseMutex WinAPI_ReleaseSemaphore WinAPI_ReleaseStream WinAPI_RemoveClipboardFormatListener WinAPI_RemoveDirectory WinAPI_RemoveFontMemResourceEx WinAPI_RemoveFontResourceEx WinAPI_RemoveWindowSubclass WinAPI_ReOpenFile WinAPI_ReplaceFile WinAPI_ReplaceTextDlg WinAPI_ResetEvent WinAPI_RestartDlg WinAPI_RestoreDC WinAPI_RGB WinAPI_RotatePoints WinAPI_RoundRect WinAPI_SaveDC WinAPI_SaveFileDlg WinAPI_SaveHBITMAPToFile WinAPI_SaveHICONToFile WinAPI_ScaleWindowExt WinAPI_ScreenToClient WinAPI_SearchPath WinAPI_SelectClipPath WinAPI_SelectClipRgn WinAPI_SelectObject WinAPI_SendMessageTimeout WinAPI_SetActiveWindow WinAPI_SetArcDirection WinAPI_SetBitmapBits WinAPI_SetBitmapDimensionEx WinAPI_SetBkColor WinAPI_SetBkMode WinAPI_SetBoundsRect WinAPI_SetBrushOrg WinAPI_SetCapture WinAPI_SetCaretBlinkTime WinAPI_SetCaretPos WinAPI_SetClassLongEx WinAPI_SetColorAdjustment WinAPI_SetCompression WinAPI_SetCurrentDirectory WinAPI_SetCurrentProcessExplicitAppUserModelID WinAPI_SetCursor WinAPI_SetDCBrushColor WinAPI_SetDCPenColor WinAPI_SetDefaultPrinter WinAPI_SetDeviceGammaRamp WinAPI_SetDIBColorTable WinAPI_SetDIBits WinAPI_SetDIBitsToDevice WinAPI_SetDllDirectory WinAPI_SetEndOfFile WinAPI_SetEnhMetaFileBits WinAPI_SetErrorMode WinAPI_SetEvent WinAPI_SetFileAttributes WinAPI_SetFileInformationByHandleEx WinAPI_SetFilePointer WinAPI_SetFilePointerEx WinAPI_SetFileShortName WinAPI_SetFileValidData WinAPI_SetFocus WinAPI_SetFont WinAPI_SetForegroundWindow WinAPI_SetFRBuffer WinAPI_SetGraphicsMode WinAPI_SetHandleInformation WinAPI_SetInformationJobObject WinAPI_SetKeyboardLayout WinAPI_SetKeyboardState WinAPI_SetLastError WinAPI_SetLayeredWindowAttributes WinAPI_SetLocaleInfo WinAPI_SetMapMode WinAPI_SetMessageExtraInfo WinAPI_SetParent WinAPI_SetPixel WinAPI_SetPolyFillMode WinAPI_SetPriorityClass WinAPI_SetProcessAffinityMask WinAPI_SetProcessShutdownParameters WinAPI_SetProcessWindowStation WinAPI_SetRectRgn WinAPI_SetROP2 WinAPI_SetSearchPathMode WinAPI_SetStretchBltMode WinAPI_SetSysColors WinAPI_SetSystemCursor WinAPI_SetTextAlign WinAPI_SetTextCharacterExtra WinAPI_SetTextColor WinAPI_SetTextJustification WinAPI_SetThemeAppProperties WinAPI_SetThreadDesktop WinAPI_SetThreadErrorMode WinAPI_SetThreadExecutionState WinAPI_SetThreadLocale WinAPI_SetThreadUILanguage WinAPI_SetTimer WinAPI_SetUDFColorMode WinAPI_SetUserGeoID WinAPI_SetUserObjectInformation WinAPI_SetVolumeMountPoint WinAPI_SetWindowDisplayAffinity WinAPI_SetWindowExt WinAPI_SetWindowLong WinAPI_SetWindowOrg WinAPI_SetWindowPlacement WinAPI_SetWindowPos WinAPI_SetWindowRgn WinAPI_SetWindowsHookEx WinAPI_SetWindowSubclass WinAPI_SetWindowText WinAPI_SetWindowTheme WinAPI_SetWinEventHook WinAPI_SetWorldTransform WinAPI_SfcIsFileProtected WinAPI_SfcIsKeyProtected WinAPI_ShellAboutDlg WinAPI_ShellAddToRecentDocs WinAPI_ShellChangeNotify WinAPI_ShellChangeNotifyDeregister WinAPI_ShellChangeNotifyRegister WinAPI_ShellCreateDirectory WinAPI_ShellEmptyRecycleBin WinAPI_ShellExecute WinAPI_ShellExecuteEx WinAPI_ShellExtractAssociatedIcon WinAPI_ShellExtractIcon WinAPI_ShellFileOperation WinAPI_ShellFlushSFCache WinAPI_ShellGetFileInfo WinAPI_ShellGetIconOverlayIndex WinAPI_ShellGetImageList WinAPI_ShellGetKnownFolderIDList WinAPI_ShellGetKnownFolderPath WinAPI_ShellGetLocalizedName WinAPI_ShellGetPathFromIDList WinAPI_ShellGetSetFolderCustomSettings WinAPI_ShellGetSettings WinAPI_ShellGetSpecialFolderLocation WinAPI_ShellGetSpecialFolderPath WinAPI_ShellGetStockIconInfo WinAPI_ShellILCreateFromPath WinAPI_ShellNotifyIcon WinAPI_ShellNotifyIconGetRect WinAPI_ShellObjectProperties WinAPI_ShellOpenFolderAndSelectItems WinAPI_ShellOpenWithDlg WinAPI_ShellQueryRecycleBin WinAPI_ShellQueryUserNotificationState WinAPI_ShellRemoveLocalizedName WinAPI_ShellRestricted WinAPI_ShellSetKnownFolderPath WinAPI_ShellSetLocalizedName WinAPI_ShellSetSettings WinAPI_ShellStartNetConnectionDlg WinAPI_ShellUpdateImage WinAPI_ShellUserAuthenticationDlg WinAPI_ShellUserAuthenticationDlgEx WinAPI_ShortToWord WinAPI_ShowCaret WinAPI_ShowCursor WinAPI_ShowError WinAPI_ShowLastError WinAPI_ShowMsg WinAPI_ShowOwnedPopups WinAPI_ShowWindow WinAPI_ShutdownBlockReasonCreate WinAPI_ShutdownBlockReasonDestroy WinAPI_ShutdownBlockReasonQuery WinAPI_SizeOfResource WinAPI_StretchBlt WinAPI_StretchDIBits WinAPI_StrFormatByteSize WinAPI_StrFormatByteSizeEx WinAPI_StrFormatKBSize WinAPI_StrFromTimeInterval WinAPI_StringFromGUID WinAPI_StringLenA WinAPI_StringLenW WinAPI_StrLen WinAPI_StrokeAndFillPath WinAPI_StrokePath WinAPI_StructToArray WinAPI_SubLangId WinAPI_SubtractRect WinAPI_SwapDWord WinAPI_SwapQWord WinAPI_SwapWord WinAPI_SwitchColor WinAPI_SwitchDesktop WinAPI_SwitchToThisWindow WinAPI_SystemParametersInfo WinAPI_TabbedTextOut WinAPI_TerminateJobObject WinAPI_TerminateProcess WinAPI_TextOut WinAPI_TileWindows WinAPI_TrackMouseEvent WinAPI_TransparentBlt WinAPI_TwipsPerPixelX WinAPI_TwipsPerPixelY WinAPI_UnhookWindowsHookEx WinAPI_UnhookWinEvent WinAPI_UnionRect WinAPI_UnionStruct WinAPI_UniqueHardwareID WinAPI_UnloadKeyboardLayout WinAPI_UnlockFile WinAPI_UnmapViewOfFile WinAPI_UnregisterApplicationRestart WinAPI_UnregisterClass WinAPI_UnregisterHotKey WinAPI_UnregisterPowerSettingNotification WinAPI_UpdateLayeredWindow WinAPI_UpdateLayeredWindowEx WinAPI_UpdateLayeredWindowIndirect WinAPI_UpdateResource WinAPI_UpdateWindow WinAPI_UrlApplyScheme WinAPI_UrlCanonicalize WinAPI_UrlCombine WinAPI_UrlCompare WinAPI_UrlCreateFromPath WinAPI_UrlFixup WinAPI_UrlGetPart WinAPI_UrlHash WinAPI_UrlIs WinAPI_UserHandleGrantAccess WinAPI_ValidateRect WinAPI_ValidateRgn WinAPI_VerQueryRoot WinAPI_VerQueryValue WinAPI_VerQueryValueEx WinAPI_WaitForInputIdle WinAPI_WaitForMultipleObjects WinAPI_WaitForSingleObject WinAPI_WideCharToMultiByte WinAPI_WidenPath WinAPI_WindowFromDC WinAPI_WindowFromPoint WinAPI_WordToShort WinAPI_Wow64EnableWow64FsRedirection WinAPI_WriteConsole WinAPI_WriteFile WinAPI_WriteProcessMemory WinAPI_ZeroMemory WinNet_AddConnection WinNet_AddConnection2 WinNet_AddConnection3 WinNet_CancelConnection WinNet_CancelConnection2 WinNet_CloseEnum WinNet_ConnectionDialog WinNet_ConnectionDialog1 WinNet_DisconnectDialog WinNet_DisconnectDialog1 WinNet_EnumResource WinNet_GetConnection WinNet_GetConnectionPerformance WinNet_GetLastError WinNet_GetNetworkInformation WinNet_GetProviderName WinNet_GetResourceInformation WinNet_GetResourceParent WinNet_GetUniversalName WinNet_GetUser WinNet_OpenEnum WinNet_RestoreConnection WinNet_UseConnection Word_Create Word_DocAdd Word_DocAttach Word_DocClose Word_DocExport Word_DocFind Word_DocFindReplace Word_DocGet Word_DocLinkAdd Word_DocLinkGet Word_DocOpen Word_DocPictureAdd Word_DocPrint Word_DocRangeSet Word_DocSave Word_DocSaveAs Word_DocTableRead Word_DocTableWrite Word_Quit",literal:"True False And Null Not Or"},contains:[t,n,r,i,{className:"preprocessor",begin:"#",end:"$",keywords:"include include-once NoTrayIcon OnAutoItStartRegister RequireAdmin pragma Au3Stripper_Ignore_Funcs Au3Stripper_Ignore_Variables Au3Stripper_Off Au3Stripper_On Au3Stripper_Parameters AutoIt3Wrapper_Add_Constants AutoIt3Wrapper_Au3Check_Parameters AutoIt3Wrapper_Au3Check_Stop_OnWarning AutoIt3Wrapper_Aut2Exe AutoIt3Wrapper_AutoIt3 AutoIt3Wrapper_AutoIt3Dir AutoIt3Wrapper_Change2CUI AutoIt3Wrapper_Compile_Both AutoIt3Wrapper_Compression AutoIt3Wrapper_EndIf AutoIt3Wrapper_Icon AutoIt3Wrapper_If_Compile AutoIt3Wrapper_If_Run AutoIt3Wrapper_Jump_To_First_Error AutoIt3Wrapper_OutFile AutoIt3Wrapper_OutFile_Type AutoIt3Wrapper_OutFile_X64 AutoIt3Wrapper_PlugIn_Funcs AutoIt3Wrapper_Res_Comment Autoit3Wrapper_Res_Compatibility AutoIt3Wrapper_Res_Description AutoIt3Wrapper_Res_Field AutoIt3Wrapper_Res_File_Add AutoIt3Wrapper_Res_FileVersion AutoIt3Wrapper_Res_FileVersion_AutoIncrement AutoIt3Wrapper_Res_Icon_Add AutoIt3Wrapper_Res_Language AutoIt3Wrapper_Res_LegalCopyright AutoIt3Wrapper_Res_ProductVersion AutoIt3Wrapper_Res_requestedExecutionLevel AutoIt3Wrapper_Res_SaveSource AutoIt3Wrapper_Run_After AutoIt3Wrapper_Run_Au3Check AutoIt3Wrapper_Run_Au3Stripper AutoIt3Wrapper_Run_Before AutoIt3Wrapper_Run_Debug_Mode AutoIt3Wrapper_Run_SciTE_Minimized AutoIt3Wrapper_Run_SciTE_OutputPane_Minimized AutoIt3Wrapper_Run_Tidy AutoIt3Wrapper_ShowProgress AutoIt3Wrapper_Testing AutoIt3Wrapper_Tidy_Stop_OnError AutoIt3Wrapper_UPX_Parameters AutoIt3Wrapper_UseUPX AutoIt3Wrapper_UseX64 AutoIt3Wrapper_Version AutoIt3Wrapper_Versioning AutoIt3Wrapper_Versioning_Parameters Tidy_Off Tidy_On Tidy_Parameters EndRegion Region",contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",contains:[r,{className:"string",variants:[{begin:"<",end:">"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},r,t]},{className:"constant",begin:"@[A-z0-9_]+"},{className:"function",beginKeywords:"Func",end:"$",excludeEnd:!0,illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[n,r,i]}]}]}}),i.registerLanguage("avrasm",function(e){return{case_insensitive:!0,lexemes:"\\.?"+e.IDENT_RE,keywords:{keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",preprocessor:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT(";","$",{relevance:0}),e.C_NUMBER_MODE,e.BINARY_NUMBER_MODE,{className:"number",begin:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"},{className:"label",begin:"^[A-Za-z0-9_.$]+:"},{className:"preprocessor",begin:"#",end:"$"},{className:"localvars",begin:"@[0-9]+"}]}}),i.registerLanguage("axapta",function(e){return{keywords:"false int abstract private char boolean static null if for true while long throw finally protected final return void enum else break new catch byte super case short default double public try this switch continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count order group by asc desc index hint like dispaly edit client server ttsbegin ttscommit str real date container anytype common div mod",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$"},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:":",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]}]}}),i.registerLanguage("bash",function(e){var t={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)}/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t,{className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]}]};return{aliases:["sh","zsh"],lexemes:/-?[a-z\.]+/,keywords:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[{className:"shebang",begin:/^#![^\n]+sh\s*$/,relevance:10},{className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},e.HASH_COMMENT_MODE,e.NUMBER_MODE,n,{className:"string",begin:/'/,end:/'/},t]}}),i.registerLanguage("brainfuck",function(e){var t={className:"literal",begin:"[\\+\\-]",relevance:0};return{aliases:["bf"],contains:[e.COMMENT("[^\\[\\]\\.,\\+\\-<> \r\n]","[\\[\\]\\.,\\+\\-<> \r\n]",{returnEnd:!0,relevance:0}),{className:"title",begin:"[\\[\\]]",relevance:0},{className:"string",begin:"[\\.,]",relevance:0},{begin:/\+\+|\-\-/,returnBegin:!0,contains:[t]},t]}}),i.registerLanguage("cal",function(e){var t="div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to until while with var",n=[e.C_LINE_COMMENT_MODE,e.COMMENT(/\{/,/\}/,{relevance:0}),e.COMMENT(/\(\*/,/\*\)/,{relevance:10})],r={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},i={className:"string",begin:/(#\d+)+/},a={className:"function",beginKeywords:"procedure",end:/[:;]/,keywords:"procedure|10",contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,contains:[r,i]}].concat(n)},o={className:"class",begin:"OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\d+) ([^\\r\\n]+)",returnBegin:!0,contains:[e.TITLE_MODE,a]};return{case_insensitive:!0,keywords:{keyword:t,literal:"false true"},illegal:/\/\*/,contains:[r,i,{className:"date",begin:"\\b\\d+(\\.\\d+)?(DT|D|T)",relevance:0},{className:"variable",begin:'"',end:'"'},e.NUMBER_MODE,o,a]}}),i.registerLanguage("capnproto",function(e){return{aliases:["capnp"],keywords:{keyword:"struct enum interface union group import using const annotation extends in of on as with from fixed",built_in:"Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 Text Data AnyPointer AnyStruct Capability List",literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.HASH_COMMENT_MODE,{className:"shebang",begin:/@0x[\w\d]{16};/,illegal:/\n/},{className:"number",begin:/@\d+\b/},{className:"class",beginKeywords:"struct enum",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"class",beginKeywords:"interface",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]}]}}),i.registerLanguage("ceylon",function(e){var t="assembly module package import alias class interface object given value assign void function new of extends satisfies abstracts in out return break continue throw assert dynamic if else switch case for while try catch finally then let this outer super is exists nonempty",n={className:"subst",excludeBegin:!0,excludeEnd:!0,begin:/``/,end:/``/,keywords:t,relevance:10},r=[{className:"string",begin:'"""',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[n]},{className:"string",begin:"'",end:"'"},{className:"number",begin:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?",relevance:0}];return n.contains=r,{keywords:{keyword:t,annotation:"shared abstract formal default actual variable late native deprecatedfinal sealed annotation suppressWarnings small doc by license see throws tagged"},illegal:"\\$[^01]|#[^0-9a-fA-F]",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),{className:"annotation",begin:'@[a-z]\\w*(?:\\:"[^"]*")?'}].concat(r)}}),i.registerLanguage("clojure",function(e){var t="a-zA-Z_\\-!.?+*=<>&#'",n="["+t+"]["+t+"0-9/;:]*",r={begin:n,relevance:0},i={className:"number",begin:"[-+]?\\d+(\\.\\d+)?",relevance:0},a=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),o=e.COMMENT(";","$",{relevance:0}),s={className:"literal",begin:/\b(true|false|nil)\b/},c={className:"collection",begin:"[\\[\\{]",end:"[\\]\\}]"},l={className:"comment",begin:"\\^"+n},u=e.COMMENT("\\^\\{","\\}"),f={className:"attribute",begin:"[:]"+n},d={className:"list",begin:"\\(",end:"\\)"},h={endsWithParent:!0,relevance:0},p={keywords:{built_in:"def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},lexemes:n,className:"keyword",begin:n,starts:h},m=[d,a,l,u,o,f,c,i,s,r];return d.contains=[e.COMMENT("comment",""),p,h],h.contains=m,c.contains=m,{aliases:["clj"],illegal:/\S/,contains:[d,a,l,u,o,f,c,i,s]}}),i.registerLanguage("clojure-repl",function(e){return{contains:[{className:"prompt",begin:/^([\w.-]+|\s*#_)=>/,starts:{end:/$/,subLanguage:"clojure"}}]}}),i.registerLanguage("cmake",function(e){return{aliases:["cmake.in"],case_insensitive:!0,keywords:{keyword:"add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_minimum_required cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile execute_process export find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install link_directories load_cache load_command macro mark_as_advanced message option output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_link_libraries try_compile try_run unset variable_watch while build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or",operator:"equal less greater strless strgreater strequal matches"},contains:[{className:"envvar",begin:"\\${",end:"}"},e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}),i.registerLanguage("coffeescript",function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",r={className:"subst",begin:/#\{/,end:/}/,keywords:t},i=[e.BINARY_NUMBER_MODE,e.inherit(e.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,r]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[r,e.HASH_COMMENT_MODE]},{begin:"//[gim]*",relevance:0},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{className:"property",begin:"@"+n},{begin:"`",end:"`",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];r.contains=i;var a=e.inherit(e.TITLE_MODE,{begin:n}),o="(\\(.*\\))?\\s*\\B[-=]>",s={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(i)}]};return{aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/,contains:i.concat([e.COMMENT("###","###"),e.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+n+"\\s*=\\s*"+o,end:"[-=]>",returnBegin:!0,contains:[a,s]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:o,end:"[-=]>",returnBegin:!0,contains:[s]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[a]},a]},{className:"attribute",begin:n+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}),i.registerLanguage("cpp",function(e){var t={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},n={className:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{begin:'((u8?|U)|L)?"'}),{begin:'(u8?|U)?R"',end:'"',contains:[e.BACKSLASH_ESCAPE]},{begin:"'\\\\?.",end:"'",illegal:"."}]},r={className:"number",variants:[{begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{begin:e.C_NUMBER_RE}]},i={className:"preprocessor",begin:"#",end:"$",keywords:"if else elif endif define undef warning error line pragma ifdef ifndef",contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",contains:[n,{className:"string",begin:"<",end:">",illegal:"\\n"}]},n,r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},a=e.IDENT_RE+"\\s*\\(",o={keyword:"int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf",literal:"true false nullptr NULL"};return{aliases:["c","cc","h","c++","h++","hpp"],keywords:o,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,n,i,{begin:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",end:">",keywords:o,contains:["self",t]},{begin:e.IDENT_RE+"::",keywords:o},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"("+e.IDENT_RE+"[\\*&\\s]+)+"+a,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:o,illegal:/[^\w\s\*&]/,contains:[{begin:a,returnBegin:!0,contains:[e.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,r]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i]}]}}),i.registerLanguage("crmsh",function(e){var t="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml";return{aliases:["crm","pcmk"],case_insensitive:!0,keywords:{keyword:"params meta operations op rule attributes utilization",operator:"read write deny defined not_defined in_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\",type:"number string",literal:"Master Started Slave Stopped start promote demote stop monitor true false"},contains:[e.HASH_COMMENT_MODE,{beginKeywords:"node",starts:{className:"identifier",end:"\\s*([\\w_-]+:)?",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*"}}},{beginKeywords:"primitive rsc_template",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*",starts:{className:"pragma",end:"\\s*@?[\\w_][\\w_\\.:-]*"}}},{begin:"\\b("+t.split(" ").join("|")+")\\s+",keywords:t,starts:{className:"title",end:"[\\$\\w_][\\w_-]*"}},{beginKeywords:"property rsc_defaults op_defaults",starts:{className:"title",end:"\\s*([\\w_-]+:)?"}},e.QUOTE_STRING_MODE,{className:"pragma",begin:"(ocf|systemd|service|lsb):[\\w_:-]+",relevance:0},{className:"number",begin:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",relevance:0},{className:"number",begin:"[-]?(infinity|inf)",relevance:0},{className:"variable",begin:/([A-Za-z\$_\#][\w_-]+)=/,relevance:0},{className:"tag",begin:"</?",end:"/?>",relevance:0}]}}),i.registerLanguage("crystal",function(e){var t="(_[uif](8|16|32|64))?",n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\][=?]?",r={keyword:"abstract alias as asm begin break case class def do else elsif end ensure enum extend for fun if ifdef include instance_sizeof is_a? lib macro module next of out pointerof private protected rescue responds_to? return require self sizeof struct super then type typeof union unless until when while with yield __DIR__ __FILE__ __LINE__",literal:"false nil true"},i={className:"subst",begin:"#{",end:"}",keywords:r},a={className:"expansion",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:r,relevance:10};function o(e,t){var n=[{begin:e,end:t}];return n[0].contains=n}var s={className:"string",contains:[e.BACKSLASH_ESCAPE,i],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%w?\\(",end:"\\)",contains:o("\\(","\\)")},{begin:"%w?\\[",end:"\\]",contains:o("\\[","\\]")},{begin:"%w?{",end:"}",contains:o("{","}")},{begin:"%w?<",end:">",contains:o("<",">")},{begin:"%w?/",end:"/"},{begin:"%w?%",end:"%"},{begin:"%w?-",end:"-"},{begin:"%w?\\|",end:"\\|"}],relevance:0},c={className:"annotation",begin:"@\\[",end:"\\]",relevance:5},l=[a,s,{begin:"(!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~)\\s*",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,i],variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r\\(",end:"\\)",contains:o("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:o("\\[","\\]")},{begin:"%r{",end:"}",contains:o("{","}")},{begin:"%r<",end:">",contains:o("<",">")},{begin:"%r/",end:"/"},{begin:"%r%",end:"%"},{begin:"%r-",end:"-"},{begin:"%r\\|",end:"\\|"}]}],relevance:0},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,i],variants:[{begin:"%r\\(",end:"\\)",contains:o("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:o("\\[","\\]")},{begin:"%r{",end:"}",contains:o("{","}")},{begin:"%r<",end:">",contains:o("<",">")},{begin:"%r/",end:"/"},{begin:"%r%",end:"%"},{begin:"%r-",end:"-"},{begin:"%r\\|",end:"\\|"}],relevance:0},c,e.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{className:"inheritance",begin:"<\\s*",contains:[{className:"parent",begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"})],relevance:10},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:n,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:n,endsParent:!0})],relevance:5},{className:"constant",begin:"(::)?(\\b[A-Z]\\w*(::)?)+",relevance:0},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[s,{begin:n}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]*[01])"+t},{begin:"\\b0o([0-7_]*[0-7])"+t},{begin:"\\b0x([A-Fa-f0-9_]*[A-Fa-f0-9])"+t},{begin:"\\b(([0-9][0-9_]*[0-9]|[0-9])(\\.[0-9_]*[0-9])?([eE][+-]?[0-9_]*[0-9])?)"+t}],relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?|%)(\\w+))"}];return i.contains=l,c.contains=l,a.contains=l.slice(1),{aliases:["cr"],lexemes:"[a-zA-Z_]\\w*[!?=]?",keywords:r,contains:l}}),i.registerLanguage("cs",function(e){var t="abstract as base bool break byte case catch char checked const continue decimal dynamic default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long null when object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async protected public private internal ascending descending from get group into join let orderby partial select set value var where yield",n=e.IDENT_RE+"(<"+e.IDENT_RE+">)?";return{aliases:["csharp"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"xmlDocTag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"preprocessor",begin:"#",end:"$",keywords:"if else elif endif define undef warning error line region endregion pragma checksum"},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:]/,contains:[e.TITLE_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[{className:"title",begin:"[a-zA-Z](\\.?\\w)*",relevance:0},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new return throw await",relevance:0},{className:"function",begin:"("+n+"\\s+)+"+e.IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:t,contains:[{begin:e.IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}]}}),i.registerLanguage("css",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",n={className:"function",begin:t+"\\(",returnBegin:!0,excludeEnd:!0,end:"\\("},r={className:"rule",begin:/[A-Z\_\.\-]+\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{className:"value",endsWithParent:!0,excludeEnd:!0,contains:[n,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"hexcolor",begin:"#[0-9A-Fa-f]+"},{className:"important",begin:"!important"}]}}]};return{case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[e.C_BLOCK_COMMENT_MODE,{className:"id",begin:/\#[A-Za-z0-9_-]+/},{className:"class",begin:/\.[A-Za-z0-9_-]+/},{className:"attr_selector",begin:/\[/,end:/\]/,illegal:"$"},{className:"pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"']+/},{className:"at_rule",begin:"@(font-face|page)",lexemes:"[a-z-]+",keywords:"font-face page"},{className:"at_rule",begin:"@",end:"[{;]",contains:[{className:"keyword",begin:/\S+/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,contains:[n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},{className:"tag",begin:t,relevance:0},{className:"rules",begin:"{",end:"}",illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,r]}]}}),i.registerLanguage("d",function(e){var t="(0|[1-9][\\d_]*)",n="("+t+"|0[bB][01_]+|0[xX]([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))",r="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",i={className:"number",begin:"\\b"+n+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},a={className:"number",begin:"\\b(((0[xX](([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)\\.([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)|\\.?([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))[pP][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))|((0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(\\.\\d*|([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)))|\\d+\\.(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)|\\.(0|[1-9][\\d_]*)([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))?))([fF]|L|i|[fF]i|Li)?|"+n+"(i|[fF]i|Li))",relevance:0},o={className:"string",begin:"'("+r+"|.)",end:"'",illegal:"."},s={className:"string",begin:'"',contains:[{begin:r,relevance:0}],end:'"[cwd]?'},c=e.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{lexemes:e.UNDERSCORE_IDENT_RE,keywords:{keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,c,{className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},s,{className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},{className:"string",begin:"`",end:"`[cwd]?"},{className:"string",begin:'q"\\{',end:'\\}"'},a,i,o,{className:"shebang",begin:"^#!",end:"$",relevance:5},{className:"preprocessor",begin:"#(line)",end:"$",relevance:5},{className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"}]}}),i.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],contains:[{className:"header",variants:[{begin:"^#{1,6}",end:"$"},{begin:"^.+?\\n[=-]{2,}$"}]},{begin:"<",end:">",subLanguage:"xml",relevance:0},{className:"bullet",begin:"^([*+-]|(\\d+\\.))\\s+"},{className:"strong",begin:"[*_]{2}.+?[*_]{2}"},{className:"emphasis",variants:[{begin:"\\*.+?\\*"},{begin:"_.+?_",relevance:0}]},{className:"blockquote",begin:"^>\\s+",end:"$"},{className:"code",variants:[{begin:"`.+?`"},{begin:"^( {4}|\t)",end:"$",relevance:0}]},{className:"horizontal_rule",begin:"^[-\\*]{3,}",end:"$"},{begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"link_label",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link_url",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"link_reference",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},{begin:"^\\[.+\\]:",returnBegin:!0,contains:[{className:"link_reference",begin:"\\[",end:"\\]:",excludeBegin:!0,excludeEnd:!0,starts:{className:"link_url",end:"$"}}]}]}}),i.registerLanguage("dart",function(e){var t={className:"subst",begin:"\\$\\{",end:"}",keywords:"true false null this is new super"},n={className:"string",variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[e.BACKSLASH_ESCAPE,t]},{begin:'"""',end:'"""',contains:[e.BACKSLASH_ESCAPE,t]},{begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t]},{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t]}]};t.contains=[e.C_NUMBER_MODE,n];return{keywords:{keyword:"assert break case catch class const continue default do else enum extends false final finally for if in is new null rethrow return super switch this throw true try var void while with",literal:"abstract as dynamic export external factory get implements import library operator part set static typedef",built_in:"print Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set Stopwatch String StringBuffer StringSink Symbol Type Uri bool double int num document window querySelector querySelectorAll Element ElementList"},contains:[n,e.COMMENT("/\\*\\*","\\*/",{subLanguage:"markdown"}),e.COMMENT("///","$",{subLanguage:"markdown"}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},e.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"},{begin:"=>"}]}}),i.registerLanguage("delphi",function(e){var t="exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure",n=[e.C_LINE_COMMENT_MODE,e.COMMENT(/\{/,/\}/,{relevance:0}),e.COMMENT(/\(\*/,/\*\)/,{relevance:10})],r={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},i={className:"string",begin:/(#\d+)+/},a={begin:e.IDENT_RE+"\\s*=\\s*class\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE]},o={className:"function",beginKeywords:"function constructor destructor procedure",end:/[:;]/,keywords:"function constructor|10 destructor|10 procedure|10",contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,contains:[r,i]}].concat(n)};return{case_insensitive:!0,keywords:t,illegal:/"|\$[G-Zg-z]|\/\*|<\/|\|/,contains:[r,i,e.NUMBER_MODE,a,o].concat(n)}}),i.registerLanguage("diff",function(e){return{aliases:["patch"],contains:[{className:"chunk",relevance:10,variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{className:"header",variants:[{begin:/Index: /,end:/$/},{begin:/=====/,end:/=====$/},{begin:/^\-\-\-/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+\+\+/,end:/$/},{begin:/\*{5}/,end:/\*{5}$/}]},{className:"addition",begin:"^\\+",end:"$"},{className:"deletion",begin:"^\\-",end:"$"},{className:"change",begin:"^\\!",end:"$"}]}}),i.registerLanguage("django",function(e){var t={className:"filter",begin:/\|[A-Za-z]+:?/,keywords:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone",contains:[{className:"argument",begin:/"/,end:/"/},{className:"argument",begin:/'/,end:/'/}]};return{aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{%\s*comment\s*%}/,/\{%\s*endcomment\s*%}/),e.COMMENT(/\{#/,/#}/),{className:"template_tag",begin:/\{%/,end:/%}/,keywords:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor in ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup by as ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim",contains:[t]},{className:"variable",begin:/\{\{/,end:/}}/,contains:[t]}]}}),i.registerLanguage("dns",function(e){return{aliases:["bind","zone"],keywords:{keyword:"IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT"},contains:[e.COMMENT(";","$"),{className:"operator",beginKeywords:"$TTL $GENERATE $INCLUDE $ORIGIN"},{className:"number",begin:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))"},{className:"number",begin:"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"}]}}),i.registerLanguage("dockerfile",function(e){return{aliases:["docker"],case_insensitive:!0,keywords:{built_ins:"from maintainer cmd expose add copy entrypoint volume user workdir onbuild run env label"},contains:[e.HASH_COMMENT_MODE,{keywords:{built_in:"run cmd entrypoint volume add copy workdir onbuild label"},begin:/^ *(onbuild +)?(run|cmd|entrypoint|volume|add|copy|workdir|label) +/,starts:{end:/[^\\]\n/,subLanguage:"bash"}},{keywords:{built_in:"from maintainer expose env user onbuild"},begin:/^ *(onbuild +)?(from|maintainer|expose|env|user|onbuild) +/,end:/[^\\]\n/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.HASH_COMMENT_MODE]}]}}),i.registerLanguage("dos",function(e){var t=e.COMMENT(/@?rem\b/,/$/,{relevance:10});return{aliases:["bat","cmd"],case_insensitive:!0,illegal:/\/\*/,keywords:{flow:"if else goto for in do call exit not exist errorlevel defined",operator:"equ neq lss leq gtr geq",keyword:"shift cd dir echo setlocal endlocal set pause copy",stream:"prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux",winutils:"ping net ipconfig taskkill xcopy ren del",built_in:"append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color comp compact convert date dir diskcomp diskcopy doskey erase fs find findstr format ftype graftabl help keyb label md mkdir mode more move path pause print popd pushd promt rd recover rem rename replace restore rmdir shiftsort start subst time title tree type ver verify vol"},contains:[{className:"envvar",begin:/%%[^ ]|%[^ ]+?%|![^ ]+?!/},{className:"function",begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)",end:"goto:eof",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),t]},{className:"number",begin:"\\b\\d+",relevance:0},t]}}),i.registerLanguage("dust",function(e){var t="if eq ne lt lte gt gte select default math sep";return{aliases:["dst"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"expression",begin:"{",end:"}",relevance:0,contains:[{className:"begin-block",begin:"#[a-zA-Z- .]+",keywords:t},{className:"string",begin:'"',end:'"'},{className:"end-block",begin:"\\/[a-zA-Z- .]+",keywords:t},{className:"variable",begin:"[a-zA-Z-.]+",keywords:t,relevance:0}]}]}}),i.registerLanguage("elixir",function(e){var t="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?",n="and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote",r={className:"subst",begin:"#\\{",end:"}",lexemes:t,keywords:n},i={className:"string",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},a={className:"function",beginKeywords:"def defp defmacro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:t,endsParent:!0})]},o=e.inherit(a,{className:"class",beginKeywords:"defmodule defrecord",end:/\bdo\b|$|;/}),s=[i,e.HASH_COMMENT_MODE,o,a,{className:"constant",begin:"(\\b[A-Z_]\\w*(.)?)+",relevance:0},{className:"symbol",begin:":",contains:[i,{begin:"[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?"}],relevance:0},{className:"symbol",begin:t+":",relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{begin:"->"},{begin:"("+e.RE_STARTERS_RE+")\\s*",contains:[e.HASH_COMMENT_MODE,{className:"regexp",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}],relevance:0}];return{lexemes:t,keywords:n,contains:r.contains=s}}),i.registerLanguage("elm",function(e){var t=[e.COMMENT("--","$"),e.COMMENT("{-","-}",{contains:["self"]})],n={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},r={className:"container",begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"}].concat(t)},i={className:"container",begin:"{",end:"}",contains:r.contains};return{keywords:"let in if then else case of where module import exposing type alias as infix infixl infixr port",contains:[{className:"module",begin:"\\bmodule\\b",end:"where",keywords:"module where",contains:[r].concat(t),illegal:"\\W\\.|;"},{className:"import",begin:"\\bimport\\b",end:"$",keywords:"import|0 as exposing",contains:[r].concat(t),illegal:"\\W\\.|;"},{className:"typedef",begin:"\\btype\\b",end:"$",keywords:"type alias",contains:[n,r,i].concat(t)},{className:"infix",beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE].concat(t)},{className:"foreign",begin:"\\bport\\b",end:"$",keywords:"port",contains:t},e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,n,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),{begin:"->|<-"}].concat(t)}}),i.registerLanguage("ruby",function(e){var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",n="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",r={className:"doctag",begin:"@[A-Za-z]+"},i={className:"value",begin:"#<",end:">"},a=[e.COMMENT("#","$",{contains:[r]}),e.COMMENT("^\\=begin","^\\=end",{contains:[r],relevance:10}),e.COMMENT("^__END__","\\n$")],o={className:"subst",begin:"#\\{",end:"}",keywords:n},s={className:"string",contains:[e.BACKSLASH_ESCAPE,o],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},c={className:"params",begin:"\\(",end:"\\)",keywords:n},l=[s,i,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{className:"inheritance",begin:"<\\s*",contains:[{className:"parent",begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}].concat(a)},{className:"function",beginKeywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:t}),c].concat(a)},{className:"constant",begin:"(::)?(\\b[A-Z]\\w*(::)?)+",relevance:0},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[s,{begin:t}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{begin:"("+e.RE_STARTERS_RE+")\\s*",contains:[i,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,o],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(a),relevance:0}].concat(a);o.contains=l;var u=[{begin:/^\s*=>/,className:"status",starts:{end:"$",contains:c.contains=l}},{className:"prompt",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>)",starts:{end:"$",contains:l}}];return{aliases:["rb","gemspec","podspec","thor","irb"],keywords:n,illegal:/\/\*/,contains:a.concat(u).concat(l)}}),i.registerLanguage("erb",function(e){return{subLanguage:"xml",contains:[e.COMMENT("<%#","%>"),{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}),i.registerLanguage("erlang-repl",function(e){return{keywords:{special_functions:"spawn spawn_link self",reserved:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},contains:[{className:"prompt",begin:"^[0-9]+> ",relevance:10},e.COMMENT("%","$"),{className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"constant",begin:"\\?(::)?([A-Z]\\w*(::)?)+"},{className:"arrow",begin:"->"},{className:"ok",begin:"ok"},{className:"exclamation_mark",begin:"!"},{className:"function_or_atom",begin:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",relevance:0},{className:"variable",begin:"[A-Z][a-zA-Z0-9_']*",relevance:0}]}}),i.registerLanguage("erlang",function(e){var t="[a-z'][a-zA-Z0-9_']*",n="("+t+":"+t+"|"+t+")",r={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},i=e.COMMENT("%","$"),a={className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},o={begin:"fun\\s+"+t+"/\\d+"},s={begin:n+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{className:"function_name",begin:n,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},c={className:"tuple",begin:"{",end:"}",relevance:0},l={className:"variable",begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},u={className:"variable",begin:"[A-Z][a-zA-Z0-9_]*",relevance:0},f={begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{className:"record_name",begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0},{begin:"{",end:"}",relevance:0}]},d={beginKeywords:"fun receive if try case",end:"end",keywords:r};d.contains=[i,o,e.inherit(e.APOS_STRING_MODE,{className:""}),d,s,e.QUOTE_STRING_MODE,a,c,l,u,f];var h=[i,o,d,s,e.QUOTE_STRING_MODE,a,c,l,u,f];s.contains[1].contains=h,c.contains=h;var p={className:"params",begin:"\\(",end:"\\)",contains:f.contains[1].contains=h};return{aliases:["erl"],keywords:r,illegal:"(</|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))",contains:[{className:"function",begin:"^"+t+"\\s*\\(",end:"->",returnBegin:!0,illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[p,e.inherit(e.TITLE_MODE,{begin:t})],starts:{end:";|\\.",keywords:r,contains:h}},i,{className:"pp",begin:"^-",end:"\\.",relevance:0,excludeEnd:!0,returnBegin:!0,lexemes:"-"+e.IDENT_RE,keywords:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec",contains:[p]},a,e.QUOTE_STRING_MODE,f,l,u,c,{begin:/\.$/}]}}),i.registerLanguage("fix",function(e){return{contains:[{begin:/[^\u2401\u0001]+/,end:/[\u2401\u0001]/,excludeEnd:!0,returnBegin:!0,returnEnd:!1,contains:[{begin:/([^\u2401\u0001=]+)/,end:/=([^\u2401\u0001=]+)/,returnEnd:!0,returnBegin:!1,className:"attribute"},{begin:/=/,end:/([\u2401\u0001])/,excludeEnd:!0,excludeBegin:!0,className:"string"}]}],case_insensitive:!0}}),i.registerLanguage("fortran",function(e){return{case_insensitive:!0,aliases:["f90","f95"],keywords:{constant:".False. .True.",type:"integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated  c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image"},illegal:/\/\*/,contains:[e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},e.COMMENT("!","$",{relevance:0}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}),i.registerLanguage("fsharp",function(e){var t={begin:"<",end:">",contains:[e.inherit(e.TITLE_MODE,{begin:/'[a-zA-Z0-9_]+/})]};return{aliases:["fs"],keywords:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",illegal:/\/\*/,contains:[{className:"keyword",begin:/\b(yield|return|let|do)!/},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:'"""',end:'"""'},e.COMMENT("\\(\\*","\\*\\)"),{className:"class",beginKeywords:"type",end:"\\(|=|$",excludeEnd:!0,contains:[e.UNDERSCORE_TITLE_MODE,t]},{className:"annotation",begin:"\\[<",end:">\\]",relevance:10},{className:"attribute",begin:"\\B('[A-Za-z])\\b",contains:[e.BACKSLASH_ESCAPE]},e.C_LINE_COMMENT_MODE,e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),e.C_NUMBER_MODE]}}),i.registerLanguage("gams",function(e){return{aliases:["gms"],case_insensitive:!0,keywords:"abort acronym acronyms alias all and assign binary card diag display else1 eps eq equation equations file files for1 free ge gt if inf integer le loop lt maximizing minimizing model models na ne negative no not option options or ord parameter parameters positive prod putpage puttl repeat sameas scalar scalars semicont semiint set1 sets smax smin solve sos1 sos2 sum system table then until using variable variables while1 xor yes",contains:[{className:"section",beginKeywords:"sets parameters variables equations",end:";",contains:[{begin:"/",end:"/",contains:[e.NUMBER_MODE]}]},{className:"string",begin:"\\*{3}",end:"\\*{3}"},e.NUMBER_MODE,{className:"number",begin:"\\$[a-zA-Z0-9]+"}]}}),i.registerLanguage("gcode",function(e){var t=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT(/\(/,/\)/),e.inherit(e.C_NUMBER_MODE,{begin:"([-+]?([0-9]*\\.?[0-9]+\\.?))|"+e.C_NUMBER_RE}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"keyword",begin:"([G])([0-9]+\\.?[0-9]?)"},{className:"title",begin:"([M])([0-9]+\\.?[0-9]?)"},{className:"title",begin:"(VC|VS|#)",end:"(\\d+)"},{className:"title",begin:"(VZOFX|VZOFY|VZOFZ)"},{className:"built_in",begin:"(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)",end:"([-+]?([0-9]*\\.?[0-9]+\\.?))(\\])"},{className:"label",variants:[{begin:"N",end:"\\d+",illegal:"\\W"}]}];return{aliases:["nc"],case_insensitive:!0,lexemes:"[A-Z_][A-Z0-9_.]*",keywords:{literal:"",built_in:"",keyword:"IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT EQ LT GT NE GE LE OR XOR"},contains:[{className:"preprocessor",begin:"\\%"},{className:"preprocessor",begin:"([O])([0-9]+)"}].concat(t)}}),i.registerLanguage("gherkin",function(e){return{aliases:["feature"],keywords:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Then But When",contains:[{className:"keyword",begin:"\\*"},e.COMMENT("@[^@\r\n\t ]+","$"),{begin:"\\|",end:"\\|\\w*$",contains:[{className:"string",begin:"[^|]+"}]},{className:"variable",begin:"<",end:">"},e.HASH_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},e.QUOTE_STRING_MODE]}}),i.registerLanguage("glsl",function(e){return{keywords:{keyword:"atomic_uint attribute bool break bvec2 bvec3 bvec4 case centroid coherent const continue default discard dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 do double dvec2 dvec3 dvec4 else flat float for highp if iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray in inout int invariant isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 layout lowp mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 mediump noperspective out patch precision readonly restrict return sample sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow smooth struct subroutine switch uimage1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint uniform usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D usamplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 varying vec2 vec3 vec4 void volatile while writeonly",built_in:"gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffsetgl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_PerVertex gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicCounter atomicCounterDecrement atomicCounterIncrement barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow gl_TextureMatrix gl_TextureMatrixInverse",literal:"true false"},illegal:'"',contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$"}]}}),i.registerLanguage("go",function(e){return{aliases:["golang"],keywords:{keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer",constant:"true false iota nil",typename:"bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",built_in:"append cap close complex copy imag len make new panic print println real recover delete"},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'"},{className:"string",begin:"`",end:"`"},{className:"number",begin:e.C_NUMBER_RE+"[dflsi]?",relevance:0},e.C_NUMBER_MODE]}}),i.registerLanguage("golo",function(e){return{keywords:{keyword:"println readln print import module function local return let var while for foreach times in case when match with break continue augment augmentation each find filter reduce if then else otherwise try catch finally raise throw orIfNull",typename:"DynamicObject|10 DynamicVariable struct Observable map set vector list array",literal:"true false null"},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"}]}}),i.registerLanguage("gradle",function(e){return{case_insensitive:!0,keywords:{keyword:"task project allprojects subprojects artifacts buildscript configurations dependencies repositories sourceSets description delete from into include exclude source classpath destinationDir includes options sourceCompatibility targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant def abstract break case catch continue default do else extends final finally for if implements instanceof native new private protected public return static switch synchronized throw throws transient try volatile while strictfp package import false null super this true antlrtask checkstyle codenarc copy boolean byte char class double float int interface long short void compile runTime file fileTree abs any append asList asWritable call collect compareTo count div dump each eachByte eachFile eachLine every find findAll flatten getAt getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter newReader newWriter next plus pop power previous print println push putAt read readBytes readLines reverse reverseEach round size sort splitEachLine step subMap times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader withStream withWriter withWriterAppend write writeLine"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.REGEXP_MODE]}}),i.registerLanguage("groovy",function(e){return{keywords:{typename:"byte short char int long boolean float double void",literal:"true false null",keyword:"def as in assert trait super this abstract static volatile transient public private protected synchronized final class interface enum if else for while switch case break default continue throw throws try catch finally implements extends new import package return instanceof"},contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},{className:"string",begin:"'''",end:"'''"},{className:"string",begin:"\\$/",end:"/\\$",relevance:10},e.APOS_STRING_MODE,{className:"regexp",begin:/~?\/[^\/\n]+\//,contains:[e.BACKSLASH_ESCAPE]},e.QUOTE_STRING_MODE,{className:"shebang",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},e.BINARY_NUMBER_MODE,{className:"class",beginKeywords:"class interface trait enum",end:"{",illegal:":",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},e.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"},{className:"string",begin:/[^\?]{0}[A-Za-z0-9_$]+ *:/},{begin:/\?/,end:/\:/},{className:"label",begin:"^\\s*[A-Za-z0-9_$]+:",relevance:0}],illegal:/#/}}),i.registerLanguage("haml",function(e){return{case_insensitive:!0,contains:[{className:"doctype",begin:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",relevance:10},e.COMMENT("^\\s*(!=#|=#|-#|/).*$",!1,{relevance:0}),{begin:"^\\s*(-|=|!=)(?!#)",starts:{end:"\\n",subLanguage:"ruby"}},{className:"tag",begin:"^\\s*%",contains:[{className:"title",begin:"\\w+"},{className:"value",begin:"[#\\.][\\w-]+"},{begin:"{\\s*",end:"\\s*}",excludeEnd:!0,contains:[{begin:":\\w+\\s*=>",end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"symbol",begin:":\\w+"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=",end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attribute",begin:"\\w+",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]}]},{className:"bullet",begin:"^\\s*[=~]\\s*",relevance:0},{begin:"#{",starts:{end:"}",subLanguage:"ruby"}}]}}),i.registerLanguage("handlebars",function(e){var t="each in with if else unless bindattr action collection debugger log outlet template unbound view yield";return{aliases:["hbs","html.hbs","html.handlebars"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"expression",begin:"{{",end:"}}",contains:[{className:"begin-block",begin:"#[a-zA-Z- .]+",keywords:t},{className:"string",begin:'"',end:'"'},{className:"end-block",begin:"\\/[a-zA-Z- .]+",keywords:t},{className:"variable",begin:"[a-zA-Z-.]+",keywords:t}]}]}}),i.registerLanguage("haskell",function(e){var t=[e.COMMENT("--","$"),e.COMMENT("{-","-}",{contains:["self"]})],n={className:"pragma",begin:"{-#",end:"#-}"},r={className:"preprocessor",begin:"^#",end:"$"},i={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},a={className:"container",begin:"\\(",end:"\\)",illegal:'"',contains:[n,r,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TITLE_MODE,{begin:"[_a-z][\\w']*"})].concat(t)},o={className:"container",begin:"{",end:"}",contains:a.contains};return{aliases:["hs"],keywords:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",contains:[{className:"module",begin:"\\bmodule\\b",end:"where",keywords:"module where",contains:[a].concat(t),illegal:"\\W\\.|;"},{className:"import",begin:"\\bimport\\b",end:"$",keywords:"import|0 qualified as hiding",contains:[a].concat(t),illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|instance)\\b",end:"where",keywords:"class family instance where",contains:[i,a].concat(t)},{className:"typedef",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[n,i,a,o].concat(t)},{className:"default",beginKeywords:"default",end:"$",contains:[i,a].concat(t)},{className:"infix",beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE].concat(t)},{className:"foreign",begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",contains:[i,e.QUOTE_STRING_MODE].concat(t)},{className:"shebang",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},n,r,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,i,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),{begin:"->|<-"}].concat(t)}}),i.registerLanguage("haxe",function(e){return{aliases:["hx"],keywords:{keyword:"break callback case cast catch class continue default do dynamic else enum extends extern for function here if implements import in inline interface never new override package private public return static super switch this throw trace try typedef untyped using var while",literal:"true false null"},contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.TITLE_MODE]},{className:"preprocessor",begin:"#",end:"$",keywords:"if else elseif end error"},{className:"function",beginKeywords:"function",end:"[{;]",excludeEnd:!0,illegal:"\\S",contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"type",begin:":",end:"([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",relevance:10}]}]}}),i.registerLanguage("http",function(e){return{aliases:["https"],illegal:"\\S",contains:[{className:"status",begin:"^HTTP/[0-9\\.]+",end:"$",contains:[{className:"number",begin:"\\b\\d{3}\\b"}]},{className:"request",begin:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",returnBegin:!0,end:"$",contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0}]},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,illegal:"\\n|\\s|=",starts:{className:"string",end:"$"}},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}]}}),i.registerLanguage("inform7",function(e){return{aliases:["i7"],case_insensitive:!0,keywords:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind of rule"},contains:[{className:"string",begin:'"',end:'"',relevance:0,contains:[{className:"subst",begin:"\\[",end:"\\]"}]},{className:"title",begin:/^(Volume|Book|Part|Chapter|Section|Table)\b/,end:"$"},{begin:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,end:":",contains:[{begin:"\\b\\(This",end:"\\)"}]},{className:"comment",begin:"\\[",end:"\\]",contains:["self"]}]}}),i.registerLanguage("ini",function(e){var t={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]};return{aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT(";","$"),e.HASH_COMMENT_MODE,{className:"title",begin:/^\s*\[+/,end:/\]+/},{className:"setting",begin:/^[a-z0-9\[\]_-]+\s*=\s*/,end:"$",contains:[{className:"value",endsWithParent:!0,keywords:"on off true false yes no",contains:[{className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)}/}]},t,{className:"number",begin:/([\+\-]+)?[\d]+_[\d_]+/},e.NUMBER_MODE],relevance:0}]}]}}),i.registerLanguage("irpf90",function(e){return{case_insensitive:!0,keywords:{constant:".False. .True.",type:"integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated  c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image IRP_ALIGN irp_here"},illegal:/\/\*/,contains:[e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},e.COMMENT("!","$",{relevance:0}),e.COMMENT("begin_doc","end_doc",{relevance:10}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}),i.registerLanguage("java",function(e){var t=e.UNDERSCORE_IDENT_RE+"(<"+e.UNDERSCORE_IDENT_RE+">)?",n="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",r={className:"number",begin:"\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",relevance:0};return{aliases:["jsp"],keywords:n,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"("+t+"\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:n,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:n,relevance:0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},r,{className:"annotation",begin:"@[A-Za-z]+"}]}}),i.registerLanguage("javascript",function(e){return{aliases:["js"],keywords:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},contains:[{className:"pi",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{begin:/</,end:/>\s*[);\]]/,relevance:0,subLanguage:"xml"}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}],illegal:/\[|%/},{begin:/\$[(.]/},{begin:"\\."+e.IDENT_RE,relevance:0},{beginKeywords:"import",end:"[;$]",keywords:"import from as",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},e.UNDERSCORE_TITLE_MODE]}],illegal:/#/}}),i.registerLanguage("json",function(e){var t={literal:"true false null"},n=[e.QUOTE_STRING_MODE,e.C_NUMBER_MODE],r={className:"value",end:",",endsWithParent:!0,excludeEnd:!0,contains:n,keywords:t},i={begin:"{",end:"}",contains:[{className:"attribute",begin:'\\s*"',end:'"\\s*:\\s*',excludeBegin:!0,excludeEnd:!0,contains:[e.BACKSLASH_ESCAPE],illegal:"\\n",starts:r}],illegal:"\\S"},a={begin:"\\[",end:"\\]",contains:[e.inherit(r,{className:null})],illegal:"\\S"};return n.splice(n.length,0,i,a),{contains:n,keywords:t,illegal:"\\S"}}),i.registerLanguage("julia",function(e){var t={keyword:"in abstract baremodule begin bitstype break catch ccall const continue do else elseif end export finally for function global if immutable import importall let local macro module quote return try type typealias using while",literal:"true false ANY ARGS CPU_CORES C_NULL DL_LOAD_PATH DevNull ENDIAN_BOM ENV I|0 Inf Inf16 Inf32 InsertionSort JULIA_HOME LOAD_PATH MS_ASYNC MS_INVALIDATE MS_SYNC MergeSort NaN NaN16 NaN32 OS_NAME QuickSort RTLD_DEEPBIND RTLD_FIRST RTLD_GLOBAL RTLD_LAZY RTLD_LOCAL RTLD_NODELETE RTLD_NOLOAD RTLD_NOW RoundDown RoundFromZero RoundNearest RoundToZero RoundUp STDERR STDIN STDOUT VERSION WORD_SIZE catalan cglobal e|0 eu|0 eulergamma golden im nothing pi γ π φ",built_in:"ASCIIString AbstractArray AbstractRNG AbstractSparseArray Any ArgumentError Array Associative Base64Pipe Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError Box CFILE Cchar Cdouble Cfloat Char CharString Cint Clong Clonglong ClusterManager Cmd Coff_t Colon Complex Complex128 Complex32 Complex64 Condition Cptrdiff_t Cshort Csize_t Cssize_t Cuchar Cuint Culong Culonglong Cushort Cwchar_t DArray DataType DenseArray Diagonal Dict DimensionMismatch DirectIndexString Display DivideError DomainError EOFError EachLine Enumerate ErrorException Exception Expr Factorization FileMonitor FileOffset Filter Float16 Float32 Float64 FloatRange FloatingPoint Function GetfieldNode GotoNode Hermitian IO IOBuffer IOStream IPv4 IPv6 InexactError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException IntrinsicFunction KeyError LabelNode LambdaStaticData LineNumberNode LoadError LocalProcess MIME MathConst MemoryError MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode Nothing Number ObjectIdDict OrdinalRange OverflowError ParseError PollingFileWatcher ProcessExitedException ProcessGroup Ptr QuoteNode Range Range1 Ranges Rational RawFD Real Regex RegexMatch RemoteRef RepString RevString RopeString RoundingMode Set SharedArray Signed SparseMatrixCSC StackOverflowError Stat StatStruct StepRange String SubArray SubString SymTridiagonal Symbol SymbolNode Symmetric SystemError Task TextDisplay Timer TmStruct TopNode Triangular Tridiagonal Type TypeConstructor TypeError TypeName TypeVar UTF16String UTF32String UTF8String UdpSocket Uint Uint128 Uint16 Uint32 Uint64 Uint8 UndefRefError UndefVarError UniformScaling UnionType UnitRange Unsigned Vararg VersionNumber WString WeakKeyDict WeakRef Woodbury Zip"},n="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",r={lexemes:n,keywords:t},i={className:"subst",begin:/\$\(/,end:/\)/,keywords:t},a={className:"variable",begin:"\\$"+n},o={className:"string",contains:[e.BACKSLASH_ESCAPE,i,a],variants:[{begin:/\w*"/,end:/"\w*/},{begin:/\w*"""/,end:/"""\w*/}]},s={className:"string",contains:[e.BACKSLASH_ESCAPE,i,a],begin:"`",end:"`"},c={className:"macrocall",begin:"@"+n};return r.contains=[{className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},{className:"char",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},{className:"type-annotation",begin:/::/},{className:"subtype",begin:/<:/},o,s,c,{className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]},e.HASH_COMMENT_MODE],i.contains=r.contains,r}),i.registerLanguage("kotlin",function(e){var t="val var get set class trait object public open private protected final enum if else do while for when break continue throw try catch finally import package is as in return fun override default companion reified inline volatile transient native";return{keywords:{typename:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null",keyword:t},contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"type",begin:/</,end:/>/,returnBegin:!0,excludeEnd:!1,relevance:0},{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:t,relevance:0,illegal:/\([^\(,\s:]+,/,contains:[{className:"typename",begin:/:\s*/,end:/\s*[=\)]/,excludeBegin:!0,returnEnd:!0,relevance:0}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",beginKeywords:"class trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"typename",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0}]},{className:"variable",beginKeywords:"var val",end:/\s*[=:$]/,excludeEnd:!0},e.QUOTE_STRING_MODE,{className:"shebang",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},e.C_NUMBER_MODE]}}),i.registerLanguage("lasso",function(e){var t="[a-zA-Z_][a-zA-Z0-9_.]*",n="<\\?(lasso(script)?|=)",r="\\]|\\?>",i={literal:"true false none minimal full all void bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"error_code error_msg error_pop error_push error_reset cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},a=e.COMMENT("\x3c!--","--\x3e",{relevance:0}),o={className:"preprocessor",begin:"\\[noprocess\\]",starts:{className:"markup",end:"\\[/noprocess\\]",returnEnd:!0,contains:[a]}},s={className:"preprocessor",begin:"\\[/noprocess|"+n},c={className:"variable",begin:"'"+t+"'"},l=[e.COMMENT("/\\*\\*!","\\*/"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.inherit(e.C_NUMBER_MODE,{begin:e.C_NUMBER_RE+"|(infinity|nan)\\b"}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{className:"variable",variants:[{begin:"[#$]"+t},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"tag",begin:"::\\s*",end:t,illegal:"\\W"},{className:"attribute",variants:[{begin:"-(?!infinity)"+e.UNDERSCORE_IDENT_RE,relevance:0},{begin:"(\\.\\.\\.)"}]},{className:"subst",variants:[{begin:"->\\s*",contains:[c]},{begin:"->|\\\\|&&?|\\|\\||!(?!=|>)|(and|or|not)\\b",relevance:0}]},{className:"built_in",begin:"\\.\\.?\\s*",relevance:0,contains:[c]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[e.inherit(e.TITLE_MODE,{begin:e.UNDERSCORE_IDENT_RE+"(=(?!>))?"})]}];return{aliases:["ls","lassoscript"],case_insensitive:!0,lexemes:t+"|&[lg]t;",keywords:i,contains:[{className:"preprocessor",begin:r,relevance:0,starts:{className:"markup",end:"\\[|"+n,returnEnd:!0,relevance:0,contains:[a]}},o,s,{className:"preprocessor",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",lexemes:t+"|&[lg]t;",keywords:i,contains:[{className:"preprocessor",begin:r,relevance:0,starts:{className:"markup",end:"\\[noprocess\\]|"+n,returnEnd:!0,contains:[a]}},o,s].concat(l)}},{className:"preprocessor",begin:"\\[",relevance:0},{className:"shebang",begin:"^#!.+lasso9\\b",relevance:10}].concat(l)}}),i.registerLanguage("less",function(r){var e="[\\w-]+",t="([\\w-]+|@{[\\w-]+})",n=[],i=[],a=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},o=function(e,t,n){return{className:e,begin:t,relevance:n}},s=function(e,t,n){return r.inherit({className:e,begin:t+"\\(",end:"\\(",returnBegin:!0,excludeEnd:!0,relevance:0},n)},c={begin:"\\(",end:"\\)",contains:i,relevance:0};i.push(r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,a("'"),a('"'),r.CSS_NUMBER_MODE,o("hexcolor","#[0-9A-Fa-f]+\\b"),s("function","(url|data-uri)",{starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}}),s("function",e),c,o("variable","@@?"+e,10),o("variable","@{[\\w-]+}"),o("built_in","~?`[^`]*?`"),{className:"attribute",begin:e+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0});var l=i.concat({begin:"{",end:"}",contains:n}),u={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(i)},f={className:"attribute",begin:t,end:":",excludeEnd:!0,contains:[r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE],illegal:/\S/,starts:{end:"[;}]",returnEnd:!0,contains:i,illegal:"[<=$]"}},d={className:"at_rule",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:i,relevance:0}},h={className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{begin:"@"+e}],starts:{end:"[;}]",returnEnd:!0,contains:l}},p={variants:[{begin:"[\\.#:&\\[]",end:"[;{}]"},{begin:t+"[^;]*{",end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",contains:[r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,u,o("keyword","all\\b"),o("variable","@{[\\w-]+}"),o("tag",t+"%?",0),o("id","#"+t),o("class","\\."+t,0),o("keyword","&",0),s("pseudo",":not"),s("keyword",":extend"),o("pseudo","::?"+t),{className:"attr_selector",begin:"\\[",end:"\\]"},{begin:"\\(",end:"\\)",contains:l},{begin:"!important"}]};return n.push(r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,d,h,p,f),{case_insensitive:!0,illegal:"[=>'/<($\"]",contains:n}}),i.registerLanguage("lisp",function(e){var t="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*",n="\\|[^]*?\\|",r="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|\\-)?\\d+)?",i={className:"literal",begin:"\\b(t{1}|nil)\\b"},a={className:"number",variants:[{begin:r,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{begin:"#(c|C)\\("+r+" +"+r,end:"\\)"}]},o=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),s=e.COMMENT(";","$",{relevance:0}),c={className:"variable",begin:"\\*",end:"\\*"},l={className:"keyword",begin:"[:&]"+t},u={begin:t,relevance:0},f={begin:n},d={className:"quoted",contains:[a,o,c,l,{begin:"\\(",end:"\\)",contains:["self",i,o,a,u]},u],variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:"quote"},{begin:"'"+n}]},h={className:"quoted",variants:[{begin:"'"+t},{begin:"#'"+t+"(::"+t+")*"}]},p={className:"list",begin:"\\(\\s*",end:"\\)"},m={endsWithParent:!0,relevance:0};return p.contains=[{className:"keyword",variants:[{begin:t},{begin:n}]},m],m.contains=[d,h,p,i,a,o,s,c,l,f,u],{illegal:/\S/,contains:[a,{className:"shebang",begin:"^#!",end:"$"},i,o,s,d,h,p,u]}}),i.registerLanguage("livecodeserver",function(e){var t={className:"variable",begin:"\\b[gtps][A-Z]+[A-Za-z0-9_\\-]*\\b|\\$_[A-Z]+",relevance:0},n=[e.C_BLOCK_COMMENT_MODE,e.HASH_COMMENT_MODE,e.COMMENT("--","$"),e.COMMENT("[^:]//","$")],r=e.inherit(e.TITLE_MODE,{variants:[{begin:"\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*"},{begin:"\\b_[a-z0-9\\-]+"}]}),i=e.inherit(e.TITLE_MODE,{begin:"\\b([A-Za-z0-9_\\-]+)\\b"});return{case_insensitive:!1,keywords:{keyword:"$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word words fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if",constant:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",operator:"div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode base64Encode baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress constantNames cos date dateFormat decompress directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge millisec millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessIDs openSockets paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load multiply socket prepare process post seek rel relative read from process rename replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop subtract union unload wait write"},contains:[t,{className:"keyword",begin:"\\bend\\sif\\b"},{className:"function",beginKeywords:"function",end:"$",contains:[t,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r]},{className:"function",begin:"\\bend\\s+",end:"$",keywords:"end",contains:[i,r]},{className:"command",beginKeywords:"command on",end:"$",contains:[t,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r]},{className:"preprocessor",variants:[{begin:"<\\?(rev|lc|livecode)",relevance:10},{begin:"<\\?"},{begin:"\\?>"}]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r].concat(n),illegal:";$|^\\[|^="}}),i.registerLanguage("livescript",function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger case default function var with then unless until loop of by when and or is isnt not it that otherwise from to til fallthrough super case default function var void const let enum export import native __hasProp __extends __slice __bind __indexOf",literal:"true false null undefined yes no on off it that void",built_in:"npm require console print module global window document"},n="[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*",r=e.inherit(e.TITLE_MODE,{begin:n}),i={className:"subst",begin:/#\{/,end:/}/,keywords:t},a={className:"subst",begin:/#[A-Za-z$_]/,end:/(?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,keywords:t},o=[e.BINARY_NUMBER_MODE,{className:"number",begin:"(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)",relevance:0,starts:{end:"(\\s*/)?",relevance:0}},{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,i,a]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i,a]},{begin:/\\/,end:/(\s|$)/,excludeEnd:!0}]},{className:"pi",variants:[{begin:"//",end:"//[gim]*",contains:[i,e.HASH_COMMENT_MODE]},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{className:"property",begin:"@"+n},{begin:"``",end:"``",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];i.contains=o;var s={className:"params",begin:"\\(",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(o)}]};return{aliases:["ls"],keywords:t,illegal:/\/\*/,contains:o.concat([e.COMMENT("\\/\\*","\\*\\/"),e.HASH_COMMENT_MODE,{className:"function",contains:[r,s],returnBegin:!0,variants:[{begin:"("+n+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B\\->\\*?",end:"\\->\\*?"},{begin:"("+n+"\\s*(?:=|:=)\\s*)?!?(\\(.*\\))?\\s*\\B[-~]{1,2}>\\*?",end:"[-~]{1,2}>\\*?"},{begin:"("+n+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B!?[-~]{1,2}>\\*?",end:"!?[-~]{1,2}>\\*?"}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[r]},r]},{className:"attribute",begin:n+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}),i.registerLanguage("lua",function(e){var t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{lexemes:e.UNDERSCORE_IDENT_RE,keywords:{keyword:"and break do else elseif end false for if in local nil not or repeat return then true until while",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}),i.registerLanguage("makefile",function(e){var t={className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]};return{aliases:["mk","mak"],contains:[e.HASH_COMMENT_MODE,{begin:/^\w+\s*\W*=/,returnBegin:!0,relevance:0,starts:{className:"constant",end:/\s*\W*=/,excludeEnd:!0,starts:{end:/$/,relevance:0,contains:[t]}}},{className:"title",begin:/^[\w]+:\s*$/},{className:"phony",begin:/^\.PHONY:/,end:/$/,keywords:".PHONY",lexemes:/[\.\w]+/},{begin:/^\t+/,end:/$/,relevance:0,contains:[e.QUOTE_STRING_MODE,t]}]}}),i.registerLanguage("mathematica",function(e){return{aliases:["mma"],lexemes:"(\\$|\\b)"+e.IDENT_RE+"\\b",keywords:"AbelianGroup Abort AbortKernels AbortProtect Above Abs Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Active ActiveItem ActiveStyle AcyclicGraphQ AddOnHelpPath AddTo AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AffineTransform After AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowedDimensions AllowGroupClose AllowInlineCells AllowKernelInitialization AllowReverseGroupClose AllowScriptLevelChange AlphaChannel AlternatingGroup AlternativeHypothesis Alternatives AmbientLight Analytic AnchoredSearch And AndersonDarlingTest AngerJ AngleBracket AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotation Annuity AnnuityDue Antialiasing Antisymmetric Apart ApartSquareFree Appearance AppearanceElements AppellF1 Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess ARProcess Array ArrayComponents ArrayDepth ArrayFlatten ArrayPad ArrayPlot ArrayQ ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads AspectRatio AspectRatioFixed Assert Assuming Assumptions AstronomicalData Asynchronous AsynchronousTaskObject AsynchronousTasks AtomQ Attributes AugmentedSymmetricPolynomial AutoAction AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords Axes AxesEdge AxesLabel AxesOrigin AxesStyle Axis BabyMonsterGroupB Back Background BackgroundTasksSettings Backslash Backsubstitution Backward Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseForm Baseline BaselinePosition BaseStyle BatesDistribution BattleLemarieWavelet Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized BetweennessCentrality BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms Booleans BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryStyle Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BubbleChart BubbleChart3D BubbleScale BubbleSizes BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteCount ByteOrdering C CachedValue CacheGraphics CalendarData CalendarType CallPacket CanberraDistance Cancel CancelButton CandlestickChart Cap CapForm CapitalDifferentialD CardinalBSplineBasis CarmichaelLambda Cases Cashflow Casoratian Catalan CatalanNumber Catch CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterDot CentralMoment CentralMomentGeneratingFunction CForm ChampernowneNumber ChanVeseBinarize Character CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop Circle CircleBox CircleDot CircleMinus CirclePlus CircleTimes CirculantGraph CityData Clear ClearAll ClearAttributes ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent ClusteringComponents CMYKColor Coarse Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorCombine ColorConvert ColorData ColorDataFunction ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorSpace Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CommonDefaultFormatTypes Commonest CommonestFilter CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledFunction Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries Composition CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath Congruent Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphQ ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray Constants ConstrainedMax ConstrainedMin ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFilename ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean Control ControlActive ControlAlignment ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateDialog CreateDirectory CreateDocument CreateIntermediateDirectories CreatePalette CreatePalettePacket CreateScheduledTask CreateTemporary CreateWindow CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossingDetect CrossMatrix Csc Csch CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrentImage CurrentlySpeakingPacket CurrentValue CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition D DagumDistribution DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DataCompression DataDistribution DataRange DataReversed Date DateDelimiters DateDifference DateFunction DateList DateListLogPlot DateListPlot DatePattern DatePlus DateRange DateString DateTicksFormat DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayMatchQ DayName DayPlus DayRange DayRound DeBruijnGraph Debug DebugTag Decimal DeclareKnownSymbols DeclarePackage Decompose Decrement DedekindEta Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic Deinitialization Del Deletable Delete DeleteBorderComponents DeleteCases DeleteContents DeleteDirectory DeleteDuplicates DeleteFile DeleteSmallComponents DeleteWithContents DeletionWarning Delimiter DelimiterFlashTime DelimiterMatching Delimiters Denominator DensityGraphics DensityHistogram DensityPlot DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DescriptorStateSpace DesignMatrix Det DGaussianWavelet DiacriticalPositioning Diagonal DiagonalMatrix Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DifferenceDelta DifferenceOrder DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralGroup Dilation Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletCharacter DirichletConvolve DirichletDistribution DirichletL DirichletTransform DirichletWindow DisableConsolePrintPacket DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform Discriminant Disjunction Disk DiskBox DiskMatrix Dispatch DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentNotebook DominantColors DOSTextFormat Dot DotDashed DotEqual Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DSolve Dt DualLinearProgramming DualSystemsModel DumpGet DumpSave DuplicateFreeQ Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions E EccentricityCentrality EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeCost EdgeCount EdgeCoverQ EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData Eliminate EliminationOrder EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EnableConsolePrintPacket Enabled Encode End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfFile EndOfLine EndOfString EndPackage EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entropy EntropyFilter Environment Epilog Equal EqualColumns EqualRows EqualTilde EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerE EulerGamma EulerianGraphQ EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluationCell EvaluationCompletionAction EvaluationElements EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpToTrig ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalCall ExternalDataCharacterEncoding Extract ExtractArchive ExtremeValueDistribution FaceForm FaceGrids FaceGridsStyle Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail FailureDistribution False FARIMAProcess FEDisableConsolePrintPacket FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket Fibonacci FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileDate FileExistsQ FileExtension FileFormat FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileType FilledCurve FilledCurveBox Filling FillingStyle FillingTransform FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindArgMax FindArgMin FindClique FindClusters FindCurvePath FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEulerianCycle FindFaces FindFile FindFit FindGeneratingFunction FindGeoLocation FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMaximum FindMaximumFlow FindMaxValue FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindPermutation FindPostmanTour FindProcessParameters FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindThreshold FindVertexCover FindVertexCut Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstPassageTimeDistribution FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FittedModel FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlatTopWindow FlipView Floor FlushPrintOutputPacket Fold FoldList Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrequencySamplingFilterKernel FresnelC FresnelS Friday FrobeniusNumber FrobeniusSolve FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullOptions FullSimplify Function FunctionExpand FunctionInterpolation FunctionSpace FussellVeselyImportance GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins Gamma GammaDistribution GammaRegularized GapPenalty Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateConditions GeneratedCell GeneratedParameters GeneratingFunction Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDistance GeoGridPosition GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoPosition GeoPositionENU GeoPositionXYZ GeoProjectionData GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter Graph GraphAssortativity GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel GreatCircleDistance Greater GreaterEqual GreaterEqualLess GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterTilde Green Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain Gudermannian GumbelDistribution HaarWavelet HadamardMatrix HalfNormalDistribution HamiltonianGraphQ HammingDistance HammingWindow HankelH1 HankelH2 HankelMatrix HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash HashTable Haversine HazardFunction Head HeadCompose Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenSurface HighlightGraph HighlightImage HighpassFilter HigmanSimsGroupHS HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HitMissTransform HITSCentrality HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HotellingTSquareDistribution HoytDistribution HTMLSave Hue HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData I Identity IdentityMatrix If IgnoreCase Im Image Image3D Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageAspectRatio ImageAssemble ImageCache ImageCacheValid ImageCapture ImageChannels ImageClip ImageColorSpace ImageCompose ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDataPacket ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDistance ImageEffect ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageForestingComponents ImageForwardTransformation ImageHistogram ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarkers ImageMeasurements ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImageQ ImageRangeCache ImageReflect ImageRegion ImageResize ImageResolution ImageRotate ImageRotated ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions Implies Import ImportAutoReplacements ImportString ImprovementImportance In IncidenceGraph IncidenceList IncidenceMatrix IncludeConstantBasis IncludeFileExtension IncludePods IncludeSingularTerm Increment Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentUnit IndependentVertexSetQ Indeterminate IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers Infinity Infix Information Inherited InheritScope Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InlineCounterAssignments InlineCounterIncrements InlineRules Inner Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionPointObject InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Install InstallService InString Integer IntegerDigits IntegerExponent IntegerLength IntegerPart IntegerPartitions IntegerQ Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction InterpretTemplate InterquartileRange Interrupt InterruptSettings Intersection Interval IntervalIntersection IntervalMemberQ IntervalUnion Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHaversine InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InversePermutation InverseRadon InverseSeries InverseSurvivalFunction InverseWaveletTransform InverseWeierstrassP InverseZTransform Invisible InvisibleApplication InvisibleTimes IrreduciblePolynomialQ IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join Joined JoinedCurve JoinedCurveBox JoinForm JordanDecomposition JordanModelDecomposition K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelMixtureDistribution KernelObject Kernels Ket Khinchin KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnightTourGraph KnotData KnownUnitQ KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter Label Labeled LabeledSlider LabelingFunction LabelStyle LaguerreL LambdaComponents LambertW LanczosWindow LandauDistribution Language LanguageCategory LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCM LeafCount LeapYearQ LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessFullEqual LessGreater LessLess LessSlantEqual LessTilde LetterCharacter LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox LinearFilter LinearFractionalTransform LinearModelFit LinearOffsetFunction LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBreak LinebreakAdjustments LineBreakChart LineBreakWithin LineColor LineForm LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRead LinkReadHeld LinkReadyQ Links LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot Listen ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalClusteringCoefficient LocalizeVariables LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestAscendingSequence LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow Loopback LoopFreeGraphQ LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LyapunovSolve LyonsGroupLy MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules MangoldtLambda ManhattanDistance Manipulate Manipulator MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixPlot MatrixPower MatrixQ MatrixRank Max MaxBend MaxDetect MaxExtraBandwidths MaxExtraConditions MaxFeatures MaxFilter Maximize MaxIterations MaxMemoryUsed MaxMixtureKernels MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxValue MaxwellDistribution McLaughlinGroupMcL Mean MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter Median MedianDeviation MedianFilter Medium MeijerG MeixnerDistribution MemberQ MemoryConstrained MemoryInUse Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuPacket MenuSortingValue MenuStyle MenuView MergeDifferences Mesh MeshFunctions MeshRange MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation Method MethodOptions MexicanHatWavelet MeyerWavelet Min MinDetect MinFilter MinimalPolynomial MinimalStateSpaceModel Minimize Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingDataMethod MittagLefflerE MixedRadix MixedRadixQuantity MixtureDistribution Mod Modal Mode Modular ModularLambda Module Modulus MoebiusMu Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction Monday Monitor MonomialList MonomialOrder MonsterGroupM MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform Most MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovingAverage MovingMedian MoyalDistribution MultiedgeStyle MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution N NakagamiDistribution NameQ Names NamespaceBox Nand NArgMax NArgMin NBernoulliB NCache NDSolve NDSolveValue Nearest NearestFunction NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeMultinomialDistribution NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestList NestWhile NestWhileList NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextPrime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants None NonlinearModelFit NonlocalMeansFilter NonNegative NonPositive Nor NorlundB Norm Normal NormalDistribution NormalGrouping Normalize NormalizedSquaredEuclideanDistance NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde NotHumpDownHump NotHumpEqual NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms Null NullRecords NullSpace NullWords Number NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OddQ Off Offset OLEData On ONanGroupON OneIdentity Opacity Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering Orderless OrnsteinUhlenbeckProcess Orthogonalize Out Outer OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OwenT OwnValues PackingMethod PaddedForm Padding PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageWidth PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParetoDistribution Part PartialCorrelationFunction PartialD ParticleData Partition PartitionsP PartitionsQ ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PerformanceGoal PeriodicInterpolation Periodogram PeriodogramArray PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PERTDistribution PetersenGraph PhaseMargins Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest Pink Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarGraphQ Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangePadding PlotRegion PlotStyle Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox PointBox PointFigureChart PointForm PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonBox PolygonBoxOptions PolygonHoleScale PolygonIntersections PolygonScale PolyhedronData PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position Positive PositiveDefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement PredictionRoot PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependTo PreserveImageOptions Previous PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitiveRoot PrincipalComponents PrincipalValue Print PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessEstimator ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions QBinomial QFactorial QGamma QHypergeometricPFQ QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ Quantile QuantilePlot Quantity QuantityForm QuantityMagnitude QuantityQ QuantityUnit Quartics QuartileDeviation Quartiles QuartileSkewness QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Random RandomChoice RandomComplex RandomFunction RandomGraph RandomImage RandomInteger RandomPermutation RandomPrime RandomReal RandomSample RandomSeed RandomVariate RandomWalkProcess Range RangeFilter RangeSpecification RankedMax RankedMin Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios Raw RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadList ReadProtected Real RealBlockDiagonalForm RealDigits RealExponent Reals Reap Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate RegionBinarize RegionFunction RegionPlot RegionPlot3D RegularExpression Regularization Reinstall Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot Remove RemoveAlphaChannel RemoveAsynchronousTask Removed RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart Repeated RepeatedNull RepeatedString Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated Resampling Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask Residue Resolve Rest Resultant ResumePacket Return ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulerUnits Run RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity SameQ SameTest SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveDefinitions SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTaskActiveQ ScheduledTaskData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition Sec Sech SechDistribution SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemialgebraicComponentInstances SendMail Sequence SequenceAlignment SequenceForm SequenceHold SequenceLimit Series SeriesCoefficient SeriesData SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPrecision SetProperty SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share Sharpen ShearingMatrix ShearingTransform ShenCastanMatrix Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortUpArrow Show ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiegelTheta SiegelTukeyTest Sign Signature SignedRankTest SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution Skip SliceDistribution Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SocialMediaData Socket SokalSneathDissimilarity Solve SolveAlways SolveDelayed Sort SortBy Sound SoundAndGraphics SoundNote SoundVolume Sow Space SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution Speak SpeakTextPacket SpearmanRankTest SpearmanRho Spectrogram SpectrogramArray Specularity SpellingCorrection SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackInhibit StandardDeviation StandardDeviationFilter StandardForm Standardize StandbyDistribution Star StarGraph StartAsynchronousTask StartingStepSize StartOfLine StartOfString StartScheduledTask StartupSound StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringCount StringDrop StringExpression StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPosition StringQ StringReplace StringReplaceList StringReplacePart StringReverse StringRotateLeft StringRotateRight StringSkeleton StringSplit StringTake StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleBoxOptions StyleData StyleDefinitions StyleForm StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subset SubsetEqual Subsets SubStar Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde SuchThat Sum SumConvergence Sunday SuperDagger SuperMinus SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceColor SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SystemDialogInput SystemException SystemHelpPath SystemInformation SystemInformationData SystemOpen SystemOptions SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemStub Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeWhile Tally Tan Tanh TargetFunctions TargetUnits TautologyQ TelegraphProcess TemplateBox TemplateBoxOptions TemplateSlotSequence TemporalData Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCell TextClipboardType TextData TextForm TextJustification TextLine TextPacket TextParagraph TextRecognize TextRendering TextStyle Texture TextureCoordinateFunction TextureCoordinateScaling Therefore ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreeJSymbol Threshold Through Throw Thumbnail Thursday Ticks TicksStyle Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint Times TimesBy TimeSeriesForecast TimeSeriesInvertibility TimeUsed TimeValue TimeZone Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate ToDiscreteTimeModel ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform TopologicalSort ToRadicals ToRules ToString Total TotalHeight TotalVariationFilter TotalWidth TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField Translate TranslationTransform TransparentColor Transpose TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle TriangleWave TriangularDistribution Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean True TrueQ TruncatedDistribution TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow Tuples TuranGraph TuringMachine Transparent UnateQ Uncompress Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UndirectedEdge UndirectedGraph UndirectedGraphQ UndocumentedTestFEParserPacket UndocumentedTestGetSelectionPacket Unequal Unevaluated UniformDistribution UniformGraphDistribution UniformSumDistribution Uninstall Union UnionPlus Unique UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitTriangle UnitVector Unprotect UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpValues URL URLFetch URLFetchAsynchronous URLSave URLSaveAsynchronous UseGraphicsRange Using UsingFrontEnd V2Get ValidationLength Value ValueBox ValueBoxOptions ValueForm ValueQ ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerifyConvergence VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoigtDistribution VonMisesDistribution WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeberE Wedge Wednesday WeibullDistribution WeierstrassHalfPeriods WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WilksW WilksWTest WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult Word WordBoundary WordCharacter WordData WordSearch WordSeparators WorkingPrecision Write WriteString Wronskian XMLElement XMLObject Xnor Xor Yellow YuleDissimilarity ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZipfDistribution ZTest ZTransform $Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AssertFunction $Assumptions $AsynchronousTask $BaseDirectory $BatchInput $BatchOutput $BoxForms $ByteOrdering $Canceled $CharacterEncoding $CharacterEncodings $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $CreationDate $CurrentLink $DateStringFormat $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $Epilog $ExportFormats $Failed $FinancialDataSource $FormatType $FrontEnd $FrontEndSession $GeoLocation $HistoryLength $HomeDirectory $HTTPCookies $IgnoreEOF $ImagingDevices $ImportFormats $InitialDirectory $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $ModuleNumber $NetworkLicense $NewMessage $NewSymbol $Notebooks $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $PipeSupported $Post $Pre $PreferencesDirectory $PrePrint $PreRead $PrintForms $PrintLiteral $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $RandomState $RecursionLimit $ReleaseNumber $RootDirectory $ScheduledTask $ScriptCommandLine $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemWordLength $TemporaryDirectory $TemporaryPrefix $TextStyle $TimedOut $TimeUnit $TimeZone $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $Urgent $UserAddOnsDirectory $UserBaseDirectory $UserDocumentsDirectory $UserName $Version $VersionNumber",contains:[{className:"comment",begin:/\(\*/,end:/\*\)/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"list",begin:/\{/,end:/\}/,illegal:/:/}]}}),i.registerLanguage("matlab",function(e){var t=[e.C_NUMBER_MODE,{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]}],n={relevance:0,contains:[{className:"operator",begin:/'['\.]*/}]};return{keywords:{keyword:"break case catch classdef continue else elseif end enumerated events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson"},illegal:'(//|"|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"},{className:"params",begin:"\\[",end:"\\]"}]},{begin:/[a-zA-Z_][a-zA-Z_0-9]*'['\.]*/,returnBegin:!0,relevance:0,contains:[{begin:/[a-zA-Z_][a-zA-Z_0-9]*/,relevance:0},n.contains[0]]},{className:"matrix",begin:"\\[",end:"\\]",contains:t,relevance:0,starts:n},{className:"cell",begin:"\\{",end:/}/,contains:t,relevance:0,starts:n},{begin:/\)/,relevance:0,starts:n},e.COMMENT("^\\s*\\%\\{\\s*$","^\\s*\\%\\}\\s*$"),e.COMMENT("\\%","$")].concat(t)}}),i.registerLanguage("mel",function(e){return{keywords:"int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration panelHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType selectedNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFromName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform",illegal:"</",contains:[e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{className:"variable",variants:[{begin:"\\$\\d"},{begin:"[\\$\\%\\@](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)"},{begin:"\\*(\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)",relevance:0}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}),i.registerLanguage("mercury",function(e){var t={className:"label",begin:"XXX",end:"$",endsWithParent:!0,relevance:0},n=e.inherit(e.C_LINE_COMMENT_MODE,{begin:"%"}),r=e.inherit(e.C_BLOCK_COMMENT_MODE,{relevance:0});n.contains.push(t),r.contains.push(t);var i=e.inherit(e.APOS_STRING_MODE,{relevance:0}),a=e.inherit(e.QUOTE_STRING_MODE,{relevance:0});a.contains.push({className:"constant",begin:"\\\\[abfnrtv]\\|\\\\x[0-9a-fA-F]*\\\\\\|%[-+# *.0-9]*[dioxXucsfeEgGp]",relevance:0});return{aliases:["m","moo"],keywords:{keyword:"module use_module import_module include_module end_module initialise mutable initialize finalize finalise interface implementation pred mode func type inst solver any_pred any_func is semidet det nondet multi erroneous failure cc_nondet cc_multi typeclass instance where pragma promise external trace atomic or_else require_complete_switch require_det require_semidet require_multi require_nondet require_cc_multi require_cc_nondet require_erroneous require_failure",pragma:"inline no_inline type_spec source_file fact_table obsolete memo loop_check minimal_model terminates does_not_terminate check_termination promise_equivalent_clauses",preprocessor:"foreign_proc foreign_decl foreign_code foreign_type foreign_import_module foreign_export_enum foreign_export foreign_enum may_call_mercury will_not_call_mercury thread_safe not_thread_safe maybe_thread_safe promise_pure promise_semipure tabled_for_io local untrailed trailed attach_to_io_state can_pass_as_mercury_type stable will_not_throw_exception may_modify_trail will_not_modify_trail may_duplicate may_not_duplicate affects_liveness does_not_affect_liveness doesnt_affect_liveness no_sharing unknown_sharing sharing",built_in:"some all not if then else true fail false try catch catch_any semidet_true semidet_false semidet_fail impure_true impure semipure"},contains:[{className:"built_in",variants:[{begin:"<=>"},{begin:"<=",relevance:0},{begin:"=>",relevance:0},{begin:"/\\\\"},{begin:"\\\\/"}]},{className:"built_in",variants:[{begin:":-\\|--\x3e"},{begin:"=",relevance:0}]},n,r,{className:"number",begin:"0'.\\|0[box][0-9a-fA-F]*"},e.NUMBER_MODE,i,a,{begin:/:-/}]}}),i.registerLanguage("mizar",function(e){return{keywords:"environ vocabularies notations constructors definitions registrations theorems schemes requirements begin end definition registration cluster existence pred func defpred deffunc theorem proof let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from be being by means equals implies iff redefine define now not or attr is mode suppose per cases set thesis contradiction scheme reserve struct correctness compatibility coherence symmetry assymetry reflexivity irreflexivity connectedness uniqueness commutativity idempotence involutiveness projectivity",contains:[e.COMMENT("::","$")]}}),i.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",n={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:t},r={begin:"->{",end:"}"},i={className:"variable",variants:[{begin:/\$\d/},{begin:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{begin:/[\$%@][^\s\w{]/,relevance:0}]},a=[e.BACKSLASH_ESCAPE,n,i],o=[i,e.HASH_COMMENT_MODE,e.COMMENT("^\\=\\w","\\=cut",{endsWithParent:!0}),r,{className:"string",contains:a,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*\\<",end:"\\>",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:"{\\w+}",contains:[],relevance:0},{begin:"-?\\w+\\s*\\=\\>",contains:[],relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",begin:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",relevance:10},{className:"regexp",begin:"(m|qr)?/",end:"/[a-z]*",contains:[e.BACKSLASH_ESCAPE],relevance:0}]},{className:"sub",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",relevance:5},{className:"operator",begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return n.contains=o,{aliases:["pl"],keywords:t,contains:r.contains=o}}),i.registerLanguage("mojolicious",function(e){return{subLanguage:"xml",contains:[{className:"preprocessor",begin:"^__(END|DATA)__$"},{begin:"^\\s*%{1,2}={0,2}",end:"$",subLanguage:"perl"},{begin:"<%{1,2}={0,2}",end:"={0,1}%>",subLanguage:"perl",excludeBegin:!0,excludeEnd:!0}]}}),i.registerLanguage("monkey",function(e){var t={className:"number",relevance:0,variants:[{begin:"[$][a-fA-F0-9]+"},e.NUMBER_MODE]};return{case_insensitive:!0,keywords:{keyword:"public private property continue exit extern new try catch eachin not abstract final select case default const local global field end if then else elseif endif while wend repeat until forever for to step next return module inline throw",built_in:"DebugLog DebugStop Error Print ACos ACosr ASin ASinr ATan ATan2 ATan2r ATanr Abs Abs Ceil Clamp Clamp Cos Cosr Exp Floor Log Max Max Min Min Pow Sgn Sgn Sin Sinr Sqrt Tan Tanr Seed PI HALFPI TWOPI",literal:"true false null and or shl shr mod"},illegal:/\/\*/,contains:[e.COMMENT("#rem","#end"),e.COMMENT("'","$",{relevance:0}),{className:"function",beginKeywords:"function method",end:"[(=:]|$",illegal:/\n/,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"$",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{className:"variable",begin:"\\b(self|super)\\b"},{className:"preprocessor",beginKeywords:"import",end:"$"},{className:"preprocessor",begin:"\\s*#",end:"$",keywords:"if else elseif endif end then"},{className:"pi",begin:"^\\s*strict\\b"},{beginKeywords:"alias",end:"=",contains:[e.UNDERSCORE_TITLE_MODE]},e.QUOTE_STRING_MODE,t]}}),i.registerLanguage("nginx",function(e){var t={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/}/},{begin:"[\\$\\@]"+e.UNDERSCORE_IDENT_RE}]},n={endsWithParent:!0,lexemes:"[a-z/_]+",keywords:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{className:"url",begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[t]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:"\\s\\^",end:"\\s|{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},t]};return{aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|{",returnBegin:!0,contains:[{className:"title",begin:e.UNDERSCORE_IDENT_RE,starts:n}],relevance:0}],illegal:"[^\\s\\}]"}}),i.registerLanguage("nimrod",function(e){return{aliases:["nim"],keywords:{keyword:"addr and as asm bind block break|0 case|0 cast const|0 continue|0 converter discard distinct|10 div do elif else|0 end|0 enum|0 except export finally for from generic if|0 import|0 in include|0 interface is isnot|10 iterator|10 let|0 macro method|10 mixin mod nil not notin|10 object|0 of or out proc|10 ptr raise ref|10 return shl shr static template try|0 tuple type|0 using|0 var|0 when while|0 with without xor yield",literal:"shared guarded stdin stdout stderr result|10 true false"},contains:[{className:"decorator",begin:/{\./,end:/\.}/,relevance:10},{className:"string",begin:/[a-zA-Z]\w*"/,end:/"/,contains:[{begin:/""/}]},{className:"string",begin:/([a-zA-Z]\w*)?"""/,end:/"""/},e.QUOTE_STRING_MODE,{className:"type",begin:/\b[A-Z]\w+\b/,relevance:0},{className:"type",begin:/\b(int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float|float32|float64|bool|char|string|cstring|pointer|expr|stmt|void|auto|any|range|array|openarray|varargs|seq|set|clong|culong|cchar|cschar|cshort|cint|csize|clonglong|cfloat|cdouble|clongdouble|cuchar|cushort|cuint|culonglong|cstringarray|semistatic)\b/},{className:"number",begin:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/,relevance:0},{className:"number",begin:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/,relevance:0},{className:"number",begin:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/,relevance:0},{className:"number",begin:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/,relevance:0},e.HASH_COMMENT_MODE]}}),i.registerLanguage("nix",function(e){var t={keyword:"rec with let in inherit assert if else then",constant:"true false or and null",built_in:"import abort baseNameOf dirOf isNull builtins map removeAttrs throw toString derivation"},n={className:"subst",begin:/\$\{/,end:/}/,keywords:t},r={className:"string",begin:"''",end:"''",contains:[n]},i={className:"string",begin:'"',end:'"',contains:[n]},a=[e.NUMBER_MODE,e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,i,{className:"variable",begin:/[a-zA-Z0-9-_]+(\s*=)/,relevance:0}];return{aliases:["nixos"],keywords:t,contains:n.contains=a}}),i.registerLanguage("nsis",function(e){var t={className:"constant",begin:"\\$+{[a-zA-Z0-9_]+}"},n={className:"variable",begin:"\\$+[a-zA-Z0-9_]+",illegal:"\\(\\){}"},r={className:"constant",begin:"\\$+\\([a-zA-Z0-9_]+\\)"};return{case_insensitive:!1,keywords:{keyword:"Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileSeek FileWrite FileWriteByte FileWriteUTF16LE FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI FunctionEnd GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText IntCmp IntCmpU IntFmt IntOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PageExEnd Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionEnd SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionGroupEnd SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetPluginUnload SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption SubSectionEnd Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr WriteUninstaller XPStyle",literal:"admin all auto both colored current false force hide highest lastused leave listonly none normal notset off on open print show silent silentlog smooth textonly true user "},contains:[e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"',end:'"',illegal:"\\n",contains:[{className:"symbol",begin:"\\$(\\\\(n|r|t)|\\$)"},{className:"symbol",begin:"\\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)"},t,n,r]},e.COMMENT(";","$",{relevance:0}),{className:"function",beginKeywords:"Function PageEx Section SectionGroup SubSection",end:"$"},{className:"constant",begin:"\\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning)"},t,n,r,{className:"params",begin:"(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)"},e.NUMBER_MODE,{className:"literal",begin:e.IDENT_RE+"::"+e.IDENT_RE}]}}),i.registerLanguage("objectivec",function(e){var t=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],keywords:{keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},lexemes:t,illegal:"</",contains:[{className:"built_in",begin:"(AV|CA|CF|CG|CI|MK|MP|NS|UI)\\w+"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"}]},{className:"preprocessor",begin:"#",end:"$",contains:[{className:"title",variants:[{begin:'"',end:'"'},{begin:"<",end:">"}]}]},{className:"class",begin:"("+n.split(" ").join("|")+")\\b",end:"({|$)",excludeEnd:!0,keywords:n,lexemes:t,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"variable",begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}),i.registerLanguage("ocaml",function(e){return{aliases:["ml"],keywords:{keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},illegal:/\/\/|>>/,lexemes:"[a-z_]\\w*!?",contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"tag",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"char",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}),i.registerLanguage("openscad",function(e){var t={className:"keyword",begin:"\\$(f[asn]|t|vp[rtd]|children)"},n={className:"number",begin:"\\b\\d+(\\.\\d+)?(e-?\\d+)?",relevance:0},r=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),i={className:"function",beginKeywords:"module function",end:"\\=|\\{",contains:[{className:"params",begin:"\\(",end:"\\)",contains:["self",n,r,t,{className:"literal",begin:"false|true|PI|undef"}]},e.UNDERSCORE_TITLE_MODE]};return{aliases:["scad"],keywords:{keyword:"function module include use for intersection_for if else \\%",literal:"false true PI undef",built_in:"circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"preprocessor",keywords:"include use",begin:"include|use <",end:">"},r,t,{className:"built_in",begin:"[*!#%]",relevance:0},i]}}),i.registerLanguage("oxygene",function(e){var t="abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained",n=e.COMMENT("{","}",{relevance:0}),r=e.COMMENT("\\(\\*","\\*\\)",{relevance:10}),i={className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},a={className:"string",begin:"(#\\d+)+"},o={className:"function",beginKeywords:"function constructor destructor procedure method",end:"[:;]",keywords:"function constructor|10 destructor|10 procedure|10 method|10",contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",keywords:t,contains:[i,a]},n,r]};return{case_insensitive:!0,keywords:t,illegal:'("|\\$[G-Zg-z]|\\/\\*|</|=>|->)',contains:[n,r,e.C_LINE_COMMENT_MODE,i,a,e.NUMBER_MODE,o,{className:"class",begin:"=\\bclass\\b",end:"end;",keywords:t,contains:[i,a,n,r,e.C_LINE_COMMENT_MODE,o]}]}}),i.registerLanguage("parser3",function(e){var t=e.COMMENT("{","}",{contains:["self"]});return{subLanguage:"xml",relevance:0,contains:[e.COMMENT("^#","$"),e.COMMENT("\\^rem{","}",{relevance:10,contains:[t]}),{className:"preprocessor",begin:"^@(?:BASE|USE|CLASS|OPTIONS)$",relevance:10},{className:"title",begin:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{className:"variable",begin:"\\$\\{?[\\w\\-\\.\\:]+\\}?"},{className:"keyword",begin:"\\^[\\w\\-\\.\\:]+"},{className:"number",begin:"\\^#[0-9a-fA-F]+"},e.C_NUMBER_MODE]}}),i.registerLanguage("pf",function(e){return{aliases:["pf.conf"],lexemes:/[a-z0-9_<>-]+/,keywords:{built_in:"block match pass load anchor|5 antispoof|10 set table",keyword:"in out log quick on rdomain inet inet6 proto from port os to routeallow-opts divert-packet divert-reply divert-to flags group icmp-typeicmp6-type label once probability recieved-on rtable prio queuetos tag tagged user keep fragment for os dropaf-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robinsource-hash static-portdup-to reply-to route-toparent bandwidth default min max qlimitblock-policy debug fingerprints hostid limit loginterface optimizationreassemble ruleset-optimization basic none profile skip state-defaultsstate-policy timeoutconst counters persistno modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppysource-track global rule max-src-nodes max-src-states max-src-connmax-src-conn-rate overload flushscrub|5 max-mss min-ttl no-df|10 random-id",literal:"all any no-route self urpf-failed egress|5 unknown"},contains:[e.HASH_COMMENT_MODE,e.NUMBER_MODE,e.QUOTE_STRING_MODE,{className:"variable",begin:/\$[\w\d#@][\w\d_]*/},{className:"variable",begin:/</,end:/>/}]}}),i.registerLanguage("php",function(e){var t={className:"variable",begin:"\\$+[a-zA-Z_\7f-ÿ][a-zA-Z0-9_\7f-ÿ]*"},n={className:"preprocessor",begin:/<\?(php)?|\?>/},r={className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},i={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{aliases:["php3","php4","php5","php6"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",contains:[e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"},n]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:e.UNDERSCORE_IDENT_RE}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;?$/,contains:[e.BACKSLASH_ESCAPE,{className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]}]},n,t,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",t,e.C_BLOCK_COMMENT_MODE,r,i]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},r,i]}}),i.registerLanguage("powershell",function(e){var t={className:"variable",variants:[{begin:/\$[\w\d][\w\d_:]*/}]},n={className:"string",begin:/"/,end:/"/,contains:[{begin:"`[\\s\\S]",relevance:0},t,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]};return{aliases:["ps"],lexemes:/-?[A-z\.\-]+/,case_insensitive:!0,keywords:{keyword:"if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch",literal:"$null $true $false",built_in:"Add-Content Add-History Add-Member Add-PSSnapin Clear-Content Clear-Item Clear-Item Property Clear-Variable Compare-Object ConvertFrom-SecureString Convert-Path ConvertTo-Html ConvertTo-SecureString Copy-Item Copy-ItemProperty Export-Alias Export-Clixml Export-Console Export-Csv ForEach-Object Format-Custom Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-Content Get-Credential Get-Culture Get-Date Get-EventLog Get-ExecutionPolicy Get-Help Get-History Get-Host Get-Item Get-ItemProperty Get-Location Get-Member Get-PfxCertificate Get-Process Get-PSDrive Get-PSProvider Get-PSSnapin Get-Service Get-TraceSource Get-UICulture Get-Unique Get-Variable Get-WmiObject Group-Object Import-Alias Import-Clixml Import-Csv Invoke-Expression Invoke-History Invoke-Item Join-Path Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-Item New-ItemProperty New-Object New-PSDrive New-Service New-TimeSpan New-Variable Out-Default Out-File Out-Host Out-Null Out-Printer Out-String Pop-Location Push-Location Read-Host Remove-Item Remove-ItemProperty Remove-PSDrive Remove-PSSnapin Remove-Variable Rename-Item Rename-ItemProperty Resolve-Path Restart-Service Resume-Service Select-Object Select-String Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-Location Set-PSDebug Set-Service Set-TraceSource Set-Variable Sort-Object Split-Path Start-Service Start-Sleep Start-Transcript Stop-Process Stop-Service Stop-Transcript Suspend-Service Tee-Object Test-Path Trace-Command Update-FormatData Update-TypeData Where-Object Write-Debug Write-Error Write-Host Write-Output Write-Progress Write-Verbose Write-Warning",operator:"-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace"},contains:[e.HASH_COMMENT_MODE,e.NUMBER_MODE,n,{className:"string",begin:/'/,end:/'/},t]}}),i.registerLanguage("processing",function(e){return{keywords:{keyword:"BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject Object StringDict StringList Table TableRow XML false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",constant:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI",variable:"displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key keyCode pixels focused frameCount frameRate height width",title:"setup draw",built_in:"size createGraphics beginDraw createShape loadShape PShape arc ellipse line point quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour millis minute month second year background clear colorMode fill noFill noStroke stroke alpha blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}),i.registerLanguage("profile",function(e){return{contains:[e.C_NUMBER_MODE,{className:"built_in",begin:"{",end:"}$",excludeBegin:!0,excludeEnd:!0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE],relevance:0},{className:"filename",begin:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",end:":",excludeEnd:!0},{className:"header",begin:"(ncalls|tottime|cumtime)",end:"$",keywords:"ncalls tottime|10 cumtime|10 filename",relevance:10},{className:"summary",begin:"function calls",end:"$",contains:[e.C_NUMBER_MODE],relevance:10},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"function",begin:"\\(",end:"\\)$",contains:[e.UNDERSCORE_TITLE_MODE],relevance:0}]}}),i.registerLanguage("prolog",function(e){var t={begin:/\(/,end:/\)/,relevance:0},n={begin:/\[/,end:/\]/},r={className:"comment",begin:/%/,end:/$/,contains:[e.PHRASAL_WORDS_MODE]},i={className:"string",begin:/`/,end:/`/,contains:[e.BACKSLASH_ESCAPE]},a=[{className:"atom",begin:/[a-z][A-Za-z0-9_]*/,relevance:0},{className:"name",variants:[{begin:/[A-Z][a-zA-Z0-9_]*/},{begin:/_[A-Za-z0-9_]*/}],relevance:0},t,{begin:/:-/},n,r,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,i,{className:"string",begin:/0\'(\\\'|.)/},{className:"string",begin:/0\'\\s/},e.C_NUMBER_MODE];return t.contains=a,{contains:(n.contains=a).concat([{begin:/\.$/}])}}),i.registerLanguage("protobuf",function(e){return{keywords:{keyword:"package import option optional required repeated group",built_in:"double float int32 int64 uint32 uint64 sint32 sint64 fixed32 fixed64 sfixed32 sfixed64 bool string bytes",literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,{className:"class",beginKeywords:"message enum service",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"function",beginKeywords:"rpc",end:/;/,excludeEnd:!0,keywords:"rpc returns"},{className:"constant",begin:/^\s*[A-Z_]+/,end:/\s*=/,excludeEnd:!0}]}}),i.registerLanguage("puppet",function(e){var t=e.COMMENT("#","$"),n="([A-Za-z_]|::)(\\w|::)*",r=e.inherit(e.TITLE_MODE,{begin:n}),i={className:"variable",begin:"\\$"+n},a={className:"string",contains:[e.BACKSLASH_ESCAPE,i],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]};return{aliases:["pp"],contains:[t,i,a,{beginKeywords:"class",end:"\\{|;",illegal:/=/,contains:[r,t]},{beginKeywords:"define",end:/\{/,contains:[{className:"title",begin:e.IDENT_RE,endsParent:!0}]},{begin:e.IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\S/,contains:[{className:"name",begin:e.IDENT_RE},{begin:/\{/,end:/\}/,keywords:{keyword:"and case default else elsif false if in import enherits node or true undef unless main settings $string ",literal:"alias audit before loglevel noop require subscribe tag owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check en_address ip_address realname command environment hour monute month monthday special target weekday creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey sslverify mounted",built_in:"architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version"},relevance:0,contains:[a,t,{begin:"[a-zA-Z_]+\\s*=>"},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},i]}],relevance:0}]}}),i.registerLanguage("python",function(e){var t={className:"prompt",begin:/^(>>>|\.\.\.) /},n={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,contains:[t],relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,contains:[t],relevance:10},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},r={className:"number",relevance:0,variants:[{begin:e.BINARY_NUMBER_RE+"[lLjJ]?"},{begin:"\\b(0o[0-7]+)[lLjJ]?"},{begin:e.C_NUMBER_RE+"[lLjJ]?"}]},i={className:"params",begin:/\(/,end:/\)/,contains:["self",t,r,n]};return{aliases:["py","gyp"],keywords:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},illegal:/(<\/|->|\?)/,contains:[t,r,n,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def",relevance:10},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,i]},{className:"decorator",begin:/^[\t ]*@/,end:/$/},{begin:/\b(print|exec)\(/}]}}),i.registerLanguage("q",function(e){return{aliases:["k","kdb"],keywords:{keyword:"do while select delete by update from",constant:"0b 1b",built_in:"neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum",typename:"`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid"},lexemes:/\b(`?)[A-Za-z0-9_]+\b/,contains:[e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}),i.registerLanguage("r",function(e){var t="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{contains:[e.HASH_COMMENT_MODE,{begin:t,lexemes:t,keywords:{keyword:"function if in break next repeat else for return switch while try tryCatch stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",relevance:0},{className:"number",begin:"\\d+\\.(?!\\d)(?:i\\b)?",relevance:0},{className:"number",begin:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{className:"number",begin:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{begin:"`",end:"`",relevance:0},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:'"',end:'"'},{begin:"'",end:"'"}]}]}}),i.registerLanguage("rib",function(e){return{keywords:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",illegal:"</",contains:[e.HASH_COMMENT_MODE,e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}}),i.registerLanguage("roboconf",function(e){var t="[a-zA-Z-_][^\n{\r\n]+\\{";return{aliases:["graph","instances"],case_insensitive:!0,keywords:"import",contains:[{className:"facet",begin:"^facet "+t,end:"}",keywords:"facet installer exports children extends",contains:[e.HASH_COMMENT_MODE]},{className:"instance-of",begin:"^instance of "+t,end:"}",keywords:"name count channels instance-data instance-state instance of",contains:[{className:"keyword",begin:"[a-zA-Z-_]+( |\t)*:"},e.HASH_COMMENT_MODE]},{className:"component",begin:"^"+t,end:"}",lexemes:"\\(?[a-zA-Z]+\\)?",keywords:"installer exports children extends imports facets alias (optional)",contains:[{className:"string",begin:"\\.[a-zA-Z-_]+",end:"\\s|,|;",excludeEnd:!0},e.HASH_COMMENT_MODE]},e.HASH_COMMENT_MODE]}}),i.registerLanguage("rsl",function(e){return{keywords:{keyword:"float color point normal vector matrix while for if do return else break extern continue",built_in:"abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp faceforward filterstep floor format fresnel incident length lightsource log match max min mod noise normalize ntransform opposite option phong pnoise pow printf ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan texture textureinfo trace transform vtransform xcomp ycomp zcomp"},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$"},{className:"shader",beginKeywords:"surface displacement light volume imager",end:"\\("},{className:"shading",beginKeywords:"illuminate illuminance gather",end:"\\("}]}}),i.registerLanguage("ruleslanguage",function(e){return{keywords:{keyword:"BILL_PERIOD BILL_START BILL_STOP RS_EFFECTIVE_START RS_EFFECTIVE_STOP RS_JURIS_CODE RS_OPCO_CODE INTDADDATTRIBUTE|5 INTDADDVMSG|5 INTDBLOCKOP|5 INTDBLOCKOPNA|5 INTDCLOSE|5 INTDCOUNT|5 INTDCOUNTSTATUSCODE|5 INTDCREATEMASK|5 INTDCREATEDAYMASK|5 INTDCREATEFACTORMASK|5 INTDCREATEHANDLE|5 INTDCREATEOVERRIDEDAYMASK|5 INTDCREATEOVERRIDEMASK|5 INTDCREATESTATUSCODEMASK|5 INTDCREATETOUPERIOD|5 INTDDELETE|5 INTDDIPTEST|5 INTDEXPORT|5 INTDGETERRORCODE|5 INTDGETERRORMESSAGE|5 INTDISEQUAL|5 INTDJOIN|5 INTDLOAD|5 INTDLOADACTUALCUT|5 INTDLOADDATES|5 INTDLOADHIST|5 INTDLOADLIST|5 INTDLOADLISTDATES|5 INTDLOADLISTENERGY|5 INTDLOADLISTHIST|5 INTDLOADRELATEDCHANNEL|5 INTDLOADSP|5 INTDLOADSTAGING|5 INTDLOADUOM|5 INTDLOADUOMDATES|5 INTDLOADUOMHIST|5 INTDLOADVERSION|5 INTDOPEN|5 INTDREADFIRST|5 INTDREADNEXT|5 INTDRECCOUNT|5 INTDRELEASE|5 INTDREPLACE|5 INTDROLLAVG|5 INTDROLLPEAK|5 INTDSCALAROP|5 INTDSCALE|5 INTDSETATTRIBUTE|5 INTDSETDSTPARTICIPANT|5 INTDSETSTRING|5 INTDSETVALUE|5 INTDSETVALUESTATUS|5 INTDSHIFTSTARTTIME|5 INTDSMOOTH|5 INTDSORT|5 INTDSPIKETEST|5 INTDSUBSET|5 INTDTOU|5 INTDTOURELEASE|5 INTDTOUVALUE|5 INTDUPDATESTATS|5 INTDVALUE|5 STDEV INTDDELETEEX|5 INTDLOADEXACTUAL|5 INTDLOADEXCUT|5 INTDLOADEXDATES|5 INTDLOADEX|5 INTDLOADEXRELATEDCHANNEL|5 INTDSAVEEX|5 MVLOAD|5 MVLOADACCT|5 MVLOADACCTDATES|5 MVLOADACCTHIST|5 MVLOADDATES|5 MVLOADHIST|5 MVLOADLIST|5 MVLOADLISTDATES|5 MVLOADLISTHIST|5 IF FOR NEXT DONE SELECT END CALL ABORT CLEAR CHANNEL FACTOR LIST NUMBER OVERRIDE SET WEEK DISTRIBUTIONNODE ELSE WHEN THEN OTHERWISE IENUM CSV INCLUDE LEAVE RIDER SAVE DELETE NOVALUE SECTION WARN SAVE_UPDATE DETERMINANT LABEL REPORT REVENUE EACH IN FROM TOTAL CHARGE BLOCK AND OR CSV_FILE RATE_CODE AUXILIARY_DEMAND UIDACCOUNT RS BILL_PERIOD_SELECT HOURS_PER_MONTH INTD_ERROR_STOP SEASON_SCHEDULE_NAME ACCOUNTFACTOR ARRAYUPPERBOUND CALLSTOREDPROC GETADOCONNECTION GETCONNECT GETDATASOURCE GETQUALIFIER GETUSERID HASVALUE LISTCOUNT LISTOP LISTUPDATE LISTVALUE PRORATEFACTOR RSPRORATE SETBINPATH SETDBMONITOR WQ_OPEN BILLINGHOURS DATE DATEFROMFLOAT DATETIMEFROMSTRING DATETIMETOSTRING DATETOFLOAT DAY DAYDIFF DAYNAME DBDATETIME HOUR MINUTE MONTH MONTHDIFF MONTHHOURS MONTHNAME ROUNDDATE SAMEWEEKDAYLASTYEAR SECOND WEEKDAY WEEKDIFF YEAR YEARDAY YEARSTR COMPSUM HISTCOUNT HISTMAX HISTMIN HISTMINNZ HISTVALUE MAXNRANGE MAXRANGE MINRANGE COMPIKVA COMPKVA COMPKVARFROMKQKW COMPLF IDATTR FLAG LF2KW LF2KWH MAXKW POWERFACTOR READING2USAGE AVGSEASON MAXSEASON MONTHLYMERGE SEASONVALUE SUMSEASON ACCTREADDATES ACCTTABLELOAD CONFIGADD CONFIGGET CREATEOBJECT CREATEREPORT EMAILCLIENT EXPBLKMDMUSAGE EXPMDMUSAGE EXPORT_USAGE FACTORINEFFECT GETUSERSPECIFIEDSTOP INEFFECT ISHOLIDAY RUNRATE SAVE_PROFILE SETREPORTTITLE USEREXIT WATFORRUNRATE TO TABLE ACOS ASIN ATAN ATAN2 BITAND CEIL COS COSECANT COSH COTANGENT DIVQUOT DIVREM EXP FABS FLOOR FMOD FREPM FREXPN LOG LOG10 MAX MAXN MIN MINNZ MODF POW ROUND ROUND2VALUE ROUNDINT SECANT SIN SINH SQROOT TAN TANH FLOAT2STRING FLOAT2STRINGNC INSTR LEFT LEN LTRIM MID RIGHT RTRIM STRING STRINGNC TOLOWER TOUPPER TRIM NUMDAYS READ_DATE STAGING",built_in:"IDENTIFIER OPTIONS XML_ELEMENT XML_OP XML_ELEMENT_OF DOMDOCCREATE DOMDOCLOADFILE DOMDOCLOADXML DOMDOCSAVEFILE DOMDOCGETROOT DOMDOCADDPI DOMNODEGETNAME DOMNODEGETTYPE DOMNODEGETVALUE DOMNODEGETCHILDCT DOMNODEGETFIRSTCHILD DOMNODEGETSIBLING DOMNODECREATECHILDELEMENT DOMNODESETATTRIBUTE DOMNODEGETCHILDELEMENTCT DOMNODEGETFIRSTCHILDELEMENT DOMNODEGETSIBLINGELEMENT DOMNODEGETATTRIBUTECT DOMNODEGETATTRIBUTEI DOMNODEGETATTRIBUTEBYNAME DOMNODEGETBYNAME"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"array",variants:[{begin:"#\\s+[a-zA-Z\\ \\.]*",relevance:0},{begin:"#[a-zA-Z\\ \\.]+"}]}]}}),i.registerLanguage("rust",function(e){var t="([uif](8|16|32|64|size))?",n=e.inherit(e.C_BLOCK_COMMENT_MODE);return n.contains.push("self"),{aliases:["rs"],keywords:{keyword:"alignof as be box break const continue crate do else enum extern false fn for if impl in let loop match mod mut offsetof once priv proc pub pure ref return self Self sizeof static struct super trait true type typeof unsafe unsized use virtual while where yield int i8 i16 i32 i64 uint u8 u32 u64 float f32 f64 str char bool",built_in:"Copy Send Sized Sync Drop Fn FnMut FnOnce drop Box ToOwned Clone PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator Option Some None Result Ok Err SliceConcatExt String ToString Vec assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln!"},lexemes:e.IDENT_RE+"!?",illegal:"</",contains:[e.C_LINE_COMMENT_MODE,n,e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",variants:[{begin:/r(#*)".*?"\1(?!#)/},{begin:/'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/},{begin:/'[a-zA-Z_][a-zA-Z0-9_]*/}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+t},{begin:"\\b0o([0-7_]+)"+t},{begin:"\\b0x([A-Fa-f0-9_]+)"+t},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+t}],relevance:0},{className:"function",beginKeywords:"fn",end:"(\\(|<)",excludeEnd:!0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"preprocessor",begin:"#\\!?\\[",end:"\\]"},{beginKeywords:"type",end:"(=|<)",contains:[e.UNDERSCORE_TITLE_MODE],illegal:"\\S"},{beginKeywords:"trait enum",end:"{",contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{endsParent:!0})],illegal:"[\\w\\d]"},{begin:e.IDENT_RE+"::"},{begin:"->"}]}}),i.registerLanguage("scala",function(e){var t={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,relevance:0},n={className:"class",beginKeywords:"class object trait type",end:/[:={\[(\n;]/,contains:[{className:"keyword",beginKeywords:"extends with",relevance:10},t]},r={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,contains:[t]};return{keywords:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'u?r?"""',end:'"""',relevance:10},e.QUOTE_STRING_MODE,{className:"symbol",begin:"'\\w[\\w\\d_]*(?!')"},{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},r,n,e.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"}]}}),i.registerLanguage("scheme",function(e){var t="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",n="(\\-|\\+)?\\d+([./]\\d+)?",r={className:"literal",begin:"(#t|#f|#\\\\"+t+"|#\\\\.)"},i={className:"number",variants:[{begin:n,relevance:0},{begin:"(\\-|\\+)?\\d+([./]\\d+)?[+\\-](\\-|\\+)?\\d+([./]\\d+)?i",relevance:0},{begin:"#b[0-1]+(/[0-1]+)?"},{begin:"#o[0-7]+(/[0-7]+)?"},{begin:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},a=e.QUOTE_STRING_MODE,o=[e.COMMENT(";","$",{relevance:0}),e.COMMENT("#\\|","\\|#")],s={begin:t,relevance:0},c={className:"variable",begin:"'"+t},l={endsWithParent:!0,relevance:0},u={className:"list",variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}],contains:[{className:"keyword",begin:t,lexemes:t,keywords:{built_in:"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"}},l]};return l.contains=[r,i,a,s,c,u].concat(o),{illegal:/\S/,contains:[{className:"shebang",begin:"^#!",end:"$"},i,a,c,u].concat(o)}}),i.registerLanguage("scilab",function(e){var t=[e.C_NUMBER_MODE,{className:"string",begin:"'|\"",end:"'|\"",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]}];return{aliases:["sci"],keywords:{keyword:"abort break case clear catch continue do elseif else endfunction end for functionglobal if pause return resume select try then while%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp errorexec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isemptyisinfisnan isvector lasterror length load linspace list listfiles log10 log2 logmax min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand realround sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tantype typename warning zeros matrix"},illegal:'("|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function endfunction",end:"$",keywords:"function endfunction|10",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{className:"transposed_variable",begin:"[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",end:"",relevance:0},{className:"matrix",begin:"\\[",end:"\\]'*[\\.']*",relevance:0,contains:t},e.COMMENT("//","$")].concat(t)}}),i.registerLanguage("scss",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",n={className:"variable",begin:"(\\$"+t+")\\b"},r={className:"function",begin:t+"\\(",returnBegin:!0,excludeEnd:!0,end:"\\("},i={className:"hexcolor",begin:"#[0-9A-Fa-f]+"};e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE;return{case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,{className:"id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"attr_selector",begin:"\\[",end:"\\]",illegal:"$"},{className:"tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{className:"pseudo",begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{className:"pseudo",begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},n,{className:"attribute",begin:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{className:"value",begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{className:"value",begin:":",end:";",contains:[r,n,i,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"important",begin:"!important"}]},{className:"at_rule",begin:"@",end:"[{;]",keywords:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",contains:[r,n,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,i,e.CSS_NUMBER_MODE,{className:"preprocessor",begin:"\\s[A-Za-z0-9_.-]+",relevance:0}]}]}}),i.registerLanguage("smali",function(e){var t=["add","and","cmp","cmpg","cmpl","const","div","double","float","goto","if","int","long","move","mul","neg","new","nop","not","or","rem","return","shl","shr","sput","sub","throw","ushr","xor"];return{aliases:["smali"],contains:[{className:"string",begin:'"',end:'"',relevance:0},e.COMMENT("#","$",{relevance:0}),{className:"keyword",begin:"\\s*\\.end\\s[a-zA-Z0-9]*",relevance:1},{className:"keyword",begin:"^[ ]*\\.[a-zA-Z]*",relevance:0},{className:"keyword",begin:"\\s:[a-zA-Z_0-9]*",relevance:0},{className:"keyword",begin:"\\s("+["transient","constructor","abstract","final","synthetic","public","private","protected","static","bridge","system"].join("|")+")",relevance:1},{className:"keyword",begin:"\\[",relevance:0},{className:"instruction",begin:"\\s("+t.join("|")+")\\s",relevance:1},{className:"instruction",begin:"\\s("+t.join("|")+")((\\-|/)[a-zA-Z0-9]+)+\\s",relevance:10},{className:"instruction",begin:"\\s("+["aget","aput","array","check","execute","fill","filled","goto/16","goto/32","iget","instance","invoke","iput","monitor","packed","sget","sparse"].join("|")+")((\\-|/)[a-zA-Z0-9]+)*\\s",relevance:10},{className:"class",begin:"L[^(;:\n]*;",relevance:0},{className:"function",begin:'( |->)[^(\n ;"]*\\(',relevance:0},{className:"function",begin:"\\)",relevance:0},{className:"variable",begin:"[vp][0-9]+",relevance:0}]}}),i.registerLanguage("smalltalk",function(e){var t="[a-z][a-zA-Z0-9_]*",n={className:"char",begin:"\\$.{1}"},r={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{aliases:["st"],keywords:"self super nil true false thisContext",contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"class",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{className:"method",begin:t+":",relevance:0},e.C_NUMBER_MODE,r,n,{className:"localvars",begin:"\\|[ ]*"+t+"([ ]+"+t+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+t}]},{className:"array",begin:"\\#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,n,e.C_NUMBER_MODE,r]}]}}),i.registerLanguage("sml",function(e){return{aliases:["ml"],keywords:{keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,lexemes:"[a-z_]\\w*!?",contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)"},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"tag",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"char",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}),i.registerLanguage("sqf",function(e){var t=["case","catch","default","do","else","exit","exitWith|5","for","forEach","from","if","switch","then","throw","to","try","while","with"],n=["!","-","+","!=","%","&&","*","/","=","==",">",">=","<","<=","^",":",">>"],r=["true","false","nil"],i=["!","-","+","!=","%","&&","*","/","=","==",">",">=","<","<=","or","plus","^",":",">>","abs","accTime","acos","action","actionKeys","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","activateAddons","activatedAddons","activateKey","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagazine","addMagazine array","addMagazineAmmoCargo","addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember","addToRemainsCollector","addUniform","addVehicle","addVest","addWaypoint","addWeapon","addWeaponCargo","addWeaponCargoGlobal","addWeaponGlobal","addWeaponPool","addWeaponTurret","agent","agents","AGLToASL","aimedAtTarget","aimPos","airDensityRTD","airportSide","AISFinishHeal","alive","allControls","allCurators","allDead","allDeadMen","allDisplays","allGroups","allMapMarkers","allMines","allMissionObjects","allow3DMode","allowCrewInImmobile","allowCuratorLogicIgnoreAreas","allowDamage","allowDammage","allowFileOperations","allowFleeing","allowGetIn","allPlayers","allSites","allTurrets","allUnits","allUnitsUAV","allVariables","ammo","and","animate","animateDoor","animationPhase","animationState","append","armoryPoints","arrayIntersect","asin","ASLToAGL","ASLToATL","assert","assignAsCargo","assignAsCargoIndex","assignAsCommander","assignAsDriver","assignAsGunner","assignAsTurret","assignCurator","assignedCargo","assignedCommander","assignedDriver","assignedGunner","assignedItems","assignedTarget","assignedTeam","assignedVehicle","assignedVehicleRole","assignItem","assignTeam","assignToAirport","atan","atan2","atg","ATLToASL","attachedObject","attachedObjects","attachedTo","attachObject","attachTo","attackEnabled","backpack","backpackCargo","backpackContainer","backpackItems","backpackMagazines","backpackSpaceFor","behaviour","benchmark","binocular","blufor","boundingBox","boundingBoxReal","boundingCenter","breakOut","breakTo","briefingName","buildingExit","buildingPos","buttonAction","buttonSetAction","cadetMode","call","callExtension","camCommand","camCommit","camCommitPrepared","camCommitted","camConstuctionSetParams","camCreate","camDestroy","cameraEffect","cameraEffectEnableHUD","cameraInterest","cameraOn","cameraView","campaignConfigFile","camPreload","camPreloaded","camPrepareBank","camPrepareDir","camPrepareDive","camPrepareFocus","camPrepareFov","camPrepareFovRange","camPreparePos","camPrepareRelPos","camPrepareTarget","camSetBank","camSetDir","camSetDive","camSetFocus","camSetFov","camSetFovRange","camSetPos","camSetRelPos","camSetTarget","camTarget","camUseNVG","canAdd","canAddItemToBackpack","canAddItemToUniform","canAddItemToVest","cancelSimpleTaskDestination","canFire","canMove","canSlingLoad","canStand","canUnloadInCombat","captive","captiveNum","case","catch","cbChecked","cbSetChecked","ceil","cheatsEnabled","checkAIFeature","civilian","className","clearAllItemsFromBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearGroupIcons","clearItemCargo","clearItemCargoGlobal","clearItemPool","clearMagazineCargo","clearMagazineCargoGlobal","clearMagazinePool","clearOverlay","clearRadio","clearWeaponCargo","clearWeaponCargoGlobal","clearWeaponPool","closeDialog","closeDisplay","closeOverlay","collapseObjectTree","combatMode","commandArtilleryFire","commandChat","commander","commandFire","commandFollow","commandFSM","commandGetOut","commandingMenu","commandMove","commandRadio","commandStop","commandTarget","commandWatch","comment","commitOverlay","compile","compileFinal","completedFSM","composeText","configClasses","configFile","configHierarchy","configName","configProperties","configSourceMod","configSourceModList","connectTerminalToUAV","controlNull","controlsGroupCtrl","copyFromClipboard","copyToClipboard","copyWaypoints","cos","count","countEnemy","countFriendly","countSide","countType","countUnknown","createAgent","createCenter","createDialog","createDiaryLink","createDiaryRecord","createDiarySubject","createDisplay","createGearDialog","createGroup","createGuardedPoint","createLocation","createMarker","createMarkerLocal","createMenu","createMine","createMissionDisplay","createSimpleTask","createSite","createSoundSource","createTask","createTeam","createTrigger","createUnit","createUnit array","createVehicle","createVehicle array","createVehicleCrew","createVehicleLocal","crew","ctrlActivate","ctrlAddEventHandler","ctrlAutoScrollDelay","ctrlAutoScrollRewind","ctrlAutoScrollSpeed","ctrlChecked","ctrlClassName","ctrlCommit","ctrlCommitted","ctrlCreate","ctrlDelete","ctrlEnable","ctrlEnabled","ctrlFade","ctrlHTMLLoaded","ctrlIDC","ctrlIDD","ctrlMapAnimAdd","ctrlMapAnimClear","ctrlMapAnimCommit","ctrlMapAnimDone","ctrlMapCursor","ctrlMapMouseOver","ctrlMapScale","ctrlMapScreenToWorld","ctrlMapWorldToScreen","ctrlModel","ctrlModelDirAndUp","ctrlModelScale","ctrlParent","ctrlPosition","ctrlRemoveAllEventHandlers","ctrlRemoveEventHandler","ctrlScale","ctrlSetActiveColor","ctrlSetAutoScrollDelay","ctrlSetAutoScrollRewind","ctrlSetAutoScrollSpeed","ctrlSetBackgroundColor","ctrlSetChecked","ctrlSetEventHandler","ctrlSetFade","ctrlSetFocus","ctrlSetFont","ctrlSetFontH1","ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrlSetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B","ctrlSetFontHeight","ctrlSetFontHeightH1","ctrlSetFontHeightH2","ctrlSetFontHeightH3","ctrlSetFontHeightH4","ctrlSetFontHeightH5","ctrlSetFontHeightH6","ctrlSetFontP","ctrlSetFontPB","ctrlSetForegroundColor","ctrlSetModel","ctrlSetModelDirAndUp","ctrlSetModelScale","ctrlSetPosition","ctrlSetScale","ctrlSetStructuredText","ctrlSetText","ctrlSetTextColor","ctrlSetTooltip","ctrlSetTooltipColorBox","ctrlSetTooltipColorShade","ctrlSetTooltipColorText","ctrlShow","ctrlShown","ctrlText","ctrlTextHeight","ctrlType","ctrlVisible","curatorAddons","curatorCamera","curatorCameraArea","curatorCameraAreaCeiling","curatorCoef","curatorEditableObjects","curatorEditingArea","curatorEditingAreaType","curatorMouseOver","curatorPoints","curatorRegisteredObjects","curatorSelected","curatorWaypointCost","currentChannel","currentCommand","currentMagazine","currentMagazineDetail","currentMagazineDetailTurret","currentMagazineTurret","currentMuzzle","currentNamespace","currentTask","currentTasks","currentThrowable","currentVisionMode","currentWaypoint","currentWeapon","currentWeaponMode","currentWeaponTurret","currentZeroing","cursorTarget","customChat","customRadio","cutFadeOut","cutObj","cutRsc","cutText","damage","date","dateToNumber","daytime","deActivateKey","debriefingText","debugFSM","debugLog","default","deg","deleteAt","deleteCenter","deleteCollection","deleteEditorObject","deleteGroup","deleteIdentity","deleteLocation","deleteMarker","deleteMarkerLocal","deleteRange","deleteResources","deleteSite","deleteStatus","deleteTeam","deleteVehicle","deleteVehicleCrew","deleteWaypoint","detach","detectedMines","diag activeMissionFSMs","diag activeSQFScripts","diag activeSQSScripts","diag captureFrame","diag captureSlowFrame","diag fps","diag fpsMin","diag frameNo","diag log","diag logSlowFrame","diag tickTime","dialog","diarySubjectExists","didJIP","didJIPOwner","difficulty","difficultyEnabled","difficultyEnabledRTD","direction","directSay","disableAI","disableCollisionWith","disableConversation","disableDebriefingStats","disableSerialization","disableTIEquipment","disableUAVConnectability","disableUserInput","displayAddEventHandler","displayCtrl","displayNull","displayRemoveAllEventHandlers","displayRemoveEventHandler","displaySetEventHandler","dissolveTeam","distance","distance2D","distanceSqr","distributionRegion","do","doArtilleryFire","doFire","doFollow","doFSM","doGetOut","doMove","doorPhase","doStop","doTarget","doWatch","drawArrow","drawEllipse","drawIcon","drawIcon3D","drawLine","drawLine3D","drawLink","drawLocation","drawRectangle","driver","drop","east","echo","editObject","editorSetEventHandler","effectiveCommander","else","emptyPositions","enableAI","enableAIFeature","enableAttack","enableCamShake","enableCaustics","enableCollisionWith","enableCopilot","enableDebriefingStats","enableDiagLegend","enableEndDialog","enableEngineArtillery","enableEnvironment","enableFatigue","enableGunLights","enableIRLasers","enableMimics","enablePersonTurret","enableRadio","enableReload","enableRopeAttach","enableSatNormalOnDetail","enableSaving","enableSentences","enableSimulation","enableSimulationGlobal","enableTeamSwitch","enableUAVConnectability","enableUAVWaypoints","endLoadingScreen","endMission","engineOn","enginesIsOnRTD","enginesRpmRTD","enginesTorqueRTD","entities","estimatedEndServerTime","estimatedTimeLeft","evalObjectArgument","everyBackpack","everyContainer","exec","execEditorScript","execFSM","execVM","exit","exitWith","exp","expectedDestination","eyeDirection","eyePos","face","faction","fadeMusic","fadeRadio","fadeSound","fadeSpeech","failMission","false","fillWeaponsFromPool","find","findCover","findDisplay","findEditorObject","findEmptyPosition","findEmptyPositionReady","findNearestEnemy","finishMissionInit","finite","fire","fireAtTarget","firstBackpack","flag","flagOwner","fleeing","floor","flyInHeight","fog","fogForecast","fogParams","for","forceAddUniform","forceEnd","forceMap","forceRespawn","forceSpeed","forceWalk","forceWeaponFire","forceWeatherChange","forEach","forEachMember","forEachMemberAgent","forEachMemberTeam","format","formation","formationDirection","formationLeader","formationMembers","formationPosition","formationTask","formatText","formLeader","freeLook","from","fromEditor","fuel","fullCrew","gearSlotAmmoCount","gearSlotData","getAllHitPointsDamage","getAmmoCargo","getArray","getArtilleryAmmo","getArtilleryComputerSettings","getArtilleryETA","getAssignedCuratorLogic","getAssignedCuratorUnit","getBackpackCargo","getBleedingRemaining","getBurningValue","getCargoIndex","getCenterOfMass","getClientState","getConnectedUAV","getDammage","getDescription","getDir","getDirVisual","getDLCs","getEditorCamera","getEditorMode","getEditorObjectScope","getElevationOffset","getFatigue","getFriend","getFSMVariable","getFuelCargo","getGroupIcon","getGroupIconParams","getGroupIcons","getHideFrom","getHit","getHitIndex","getHitPointDamage","getItemCargo","getMagazineCargo","getMarkerColor","getMarkerPos","getMarkerSize","getMarkerType","getMass","getModelInfo","getNumber","getObjectArgument","getObjectChildren","getObjectDLC","getObjectMaterials","getObjectProxy","getObjectTextures","getObjectType","getObjectViewDistance","getOxygenRemaining","getPersonUsedDLCs","getPlayerChannel","getPlayerUID","getPos","getPosASL","getPosASLVisual","getPosASLW","getPosATL","getPosATLVisual","getPosVisual","getPosWorld","getRepairCargo","getResolution","getShadowDistance","getSlingLoad","getSpeed","getSuppression","getTerrainHeightASL","getText","getVariable","getWeaponCargo","getWPPos","glanceAt","globalChat","globalRadio","goggles","goto","group","groupChat","groupFromNetId","groupIconSelectable","groupIconsVisible","groupId","groupOwner","groupRadio","groupSelectedUnits","groupSelectUnit","grpNull","gunner","gusts","halt","handgunItems","handgunMagazine","handgunWeapon","handsHit","hasInterface","hasWeapon","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","headgear","hideBody","hideObject","hideObjectGlobal","hint","hintC","hintCadet","hintSilent","hmd","hostMission","htmlLoad","HUDMovementLevels","humidity","if","image","importAllGroups","importance","in","incapacitatedState","independent","inflame","inflamed","inGameUISetEventHandler","inheritsFrom","initAmbientLife","inputAction","inRangeOfArtillery","insertEditorObject","intersect","isAbleToBreathe","isAgent","isArray","isAutoHoverOn","isAutonomous","isAutotest","isBleeding","isBurning","isClass","isCollisionLightOn","isCopilotEnabled","isDedicated","isDLCAvailable","isEngineOn","isEqualTo","isFlashlightOn","isFlatEmpty","isForcedWalk","isFormationLeader","isHidden","isInRemainsCollector","isInstructorFigureEnabled","isIRLaserOn","isKeyActive","isKindOf","isLightOn","isLocalized","isManualFire","isMarkedForCollection","isMultiplayer","isNil","isNull","isNumber","isObjectHidden","isObjectRTD","isOnRoad","isPipEnabled","isPlayer","isRealTime","isServer","isShowing3DIcons","isSteamMission","isStreamFriendlyUIEnabled","isText","isTouchingGround","isTurnedOut","isTutHintsEnabled","isUAVConnectable","isUAVConnected","isUniformAllowed","isWalking","isWeaponDeployed","isWeaponRested","itemCargo","items","itemsWithMagazines","join","joinAs","joinAsSilent","joinSilent","joinString","kbAddDatabase","kbAddDatabaseTargets","kbAddTopic","kbHasTopic","kbReact","kbRemoveTopic","kbTell","kbWasSaid","keyImage","keyName","knowsAbout","land","landAt","landResult","language","laserTarget","lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetPicture","lbSetPictureColor","lbSetPictureColorDisabled","lbSetPictureColorSelected","lbSetSelectColor","lbSetSelectColorRight","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue","leader","leaderboardDeInit","leaderboardGetRows","leaderboardInit","leaveVehicle","libraryCredits","libraryDisclaimers","lifeState","lightAttachObject","lightDetachObject","lightIsOn","lightnings","limitSpeed","linearConversion","lineBreak","lineIntersects","lineIntersectsObjs","lineIntersectsSurfaces","lineIntersectsWith","linkItem","list","listObjects","ln","lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue","load","loadAbs","loadBackpack","loadFile","loadGame","loadIdentity","loadMagazine","loadOverlay","loadStatus","loadUniform","loadVest","local","localize","locationNull","locationPosition","lock","lockCameraTo","lockCargo","lockDriver","locked","lockedCargo","lockedDriver","lockedTurret","lockTurret","lockWP","log","logEntities","lookAt","lookAtPos","magazineCargo","magazines","magazinesAllTurrets","magazinesAmmo","magazinesAmmoCargo","magazinesAmmoFull","magazinesDetail","magazinesDetailBackpack","magazinesDetailUniform","magazinesDetailVest","magazinesTurret","magazineTurretAmmo","mapAnimAdd","mapAnimClear","mapAnimCommit","mapAnimDone","mapCenterOnCamera","mapGridPosition","markAsFinishedOnSteam","markerAlpha","markerBrush","markerColor","markerDir","markerPos","markerShape","markerSize","markerText","markerType","max","members","min","mineActive","mineDetectedBy","missionConfigFile","missionName","missionNamespace","missionStart","mod","modelToWorld","modelToWorldVisual","moonIntensity","morale","move","moveInAny","moveInCargo","moveInCommander","moveInDriver","moveInGunner","moveInTurret","moveObjectToEnd","moveOut","moveTime","moveTo","moveToCompleted","moveToFailed","musicVolume","name","name location","nameSound","nearEntities","nearestBuilding","nearestLocation","nearestLocations","nearestLocationWithDubbing","nearestObject","nearestObjects","nearObjects","nearObjectsReady","nearRoads","nearSupplies","nearTargets","needReload","netId","netObjNull","newOverlay","nextMenuItemIndex","nextWeatherChange","nil","nMenuItems","not","numberToDate","objectCurators","objectFromNetId","objectParent","objNull","objStatus","onBriefingGroup","onBriefingNotes","onBriefingPlan","onBriefingTeamSwitch","onCommandModeChanged","onDoubleClick","onEachFrame","onGroupIconClick","onGroupIconOverEnter","onGroupIconOverLeave","onHCGroupSelectionChanged","onMapSingleClick","onPlayerConnected","onPlayerDisconnected","onPreloadFinished","onPreloadStarted","onShowNewObject","onTeamSwitch","openCuratorInterface","openMap","openYoutubeVideo","opfor","or","orderGetIn","overcast","overcastForecast","owner","param","params","parseNumber","parseText","parsingNamespace","particlesQuality","pi","pickWeaponPool","pitch","playableSlotsNumber","playableUnits","playAction","playActionNow","player","playerRespawnTime","playerSide","playersNumber","playGesture","playMission","playMove","playMoveNow","playMusic","playScriptedMission","playSound","playSound3D","position","positionCameraToWorld","posScreenToWorld","posWorldToScreen","ppEffectAdjust","ppEffectCommit","ppEffectCommitted","ppEffectCreate","ppEffectDestroy","ppEffectEnable","ppEffectForceInNVG","precision","preloadCamera","preloadObject","preloadSound","preloadTitleObj","preloadTitleRsc","preprocessFile","preprocessFileLineNumbers","primaryWeapon","primaryWeaponItems","primaryWeaponMagazine","priority","private","processDiaryLink","productVersion","profileName","profileNamespace","profileNameSteam","progressLoadingScreen","progressPosition","progressSetPosition","publicVariable","publicVariableClient","publicVariableServer","pushBack","putWeaponPool","queryItemsPool","queryMagazinePool","queryWeaponPool","rad","radioChannelAdd","radioChannelCreate","radioChannelRemove","radioChannelSetCallSign","radioChannelSetLabel","radioVolume","rain","rainbow","random","rank","rankId","rating","rectangular","registeredTasks","registerTask","reload","reloadEnabled","remoteControl","remoteExec","remoteExecCall","removeAction","removeAllActions","removeAllAssignedItems","removeAllContainers","removeAllCuratorAddons","removeAllCuratorCameraAreas","removeAllCuratorEditingAreas","removeAllEventHandlers","removeAllHandgunItems","removeAllItems","removeAllItemsWithMagazines","removeAllMissionEventHandlers","removeAllMPEventHandlers","removeAllMusicEventHandlers","removeAllPrimaryWeaponItems","removeAllWeapons","removeBackpack","removeBackpackGlobal","removeCuratorAddons","removeCuratorCameraArea","removeCuratorEditableObjects","removeCuratorEditingArea","removeDrawIcon","removeDrawLinks","removeEventHandler","removeFromRemainsCollector","removeGoggles","removeGroupIcon","removeHandgunItem","removeHeadgear","removeItem","removeItemFromBackpack","removeItemFromUniform","removeItemFromVest","removeItems","removeMagazine","removeMagazineGlobal","removeMagazines","removeMagazinesTurret","removeMagazineTurret","removeMenuItem","removeMissionEventHandler","removeMPEventHandler","removeMusicEventHandler","removePrimaryWeaponItem","removeSecondaryWeaponItem","removeSimpleTask","removeSwitchableUnit","removeTeamMember","removeUniform","removeVest","removeWeapon","removeWeaponGlobal","removeWeaponTurret","requiredVersion","resetCamShake","resetSubgroupDirection","resistance","resize","resources","respawnVehicle","restartEditorCamera","reveal","revealMine","reverse","reversedMouseY","roadsConnectedTo","roleDescription","ropeAttachedObjects","ropeAttachedTo","ropeAttachEnabled","ropeAttachTo","ropeCreate","ropeCut","ropeEndPosition","ropeLength","ropes","ropeUnwind","ropeUnwound","rotorsForcesRTD","rotorsRpmRTD","round","runInitScript","safeZoneH","safeZoneW","safeZoneWAbs","safeZoneX","safeZoneXAbs","safeZoneY","saveGame","saveIdentity","saveJoysticks","saveOverlay","saveProfileNamespace","saveStatus","saveVar","savingEnabled","say","say2D","say3D","scopeName","score","scoreSide","screenToWorld","scriptDone","scriptName","scriptNull","scudState","secondaryWeapon","secondaryWeaponItems","secondaryWeaponMagazine","select","selectBestPlaces","selectDiarySubject","selectedEditorObjects","selectEditorObject","selectionPosition","selectLeader","selectNoPlayer","selectPlayer","selectWeapon","selectWeaponTurret","sendAUMessage","sendSimpleCommand","sendTask","sendTaskResult","sendUDPMessage","serverCommand","serverCommandAvailable","serverCommandExecutable","serverName","serverTime","set","setAccTime","setAirportSide","setAmmo","setAmmoCargo","setAperture","setApertureNew","setArmoryPoints","setAttributes","setAutonomous","setBehaviour","setBleedingRemaining","setCameraInterest","setCamShakeDefParams","setCamShakeParams","setCamUseTi","setCaptive","setCenterOfMass","setCollisionLight","setCombatMode","setCompassOscillation","setCuratorCameraAreaCeiling","setCuratorCoef","setCuratorEditingAreaType","setCuratorWaypointCost","setCurrentChannel","setCurrentTask","setCurrentWaypoint","setDamage","setDammage","setDate","setDebriefingText","setDefaultCamera","setDestination","setDetailMapBlendPars","setDir","setDirection","setDrawIcon","setDropInterval","setEditorMode","setEditorObjectScope","setEffectCondition","setFace","setFaceAnimation","setFatigue","setFlagOwner","setFlagSide","setFlagTexture","setFog","setFog array","setFormation","setFormationTask","setFormDir","setFriend","setFromEditor","setFSMVariable","setFuel","setFuelCargo","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible","setGroupId","setGroupIdGlobal","setGroupOwner","setGusts","setHideBehind","setHit","setHitIndex","setHitPointDamage","setHorizonParallaxCoef","setHUDMovementLevels","setIdentity","setImportance","setLeader","setLightAmbient","setLightAttenuation","setLightBrightness","setLightColor","setLightDayLight","setLightFlareMaxDistance","setLightFlareSize","setLightIntensity","setLightnings","setLightUseFlare","setLocalWindParams","setMagazineTurretAmmo","setMarkerAlpha","setMarkerAlphaLocal","setMarkerBrush","setMarkerBrushLocal","setMarkerColor","setMarkerColorLocal","setMarkerDir","setMarkerDirLocal","setMarkerPos","setMarkerPosLocal","setMarkerShape","setMarkerShapeLocal","setMarkerSize","setMarkerSizeLocal","setMarkerText","setMarkerTextLocal","setMarkerType","setMarkerTypeLocal","setMass","setMimic","setMousePosition","setMusicEffect","setMusicEventHandler","setName","setNameSound","setObjectArguments","setObjectMaterial","setObjectProxy","setObjectTexture","setObjectTextureGlobal","setObjectViewDistance","setOvercast","setOwner","setOxygenRemaining","setParticleCircle","setParticleClass","setParticleFire","setParticleParams","setParticleRandom","setPilotLight","setPiPEffect","setPitch","setPlayable","setPlayerRespawnTime","setPos","setPosASL","setPosASL2","setPosASLW","setPosATL","setPosition","setPosWorld","setRadioMsg","setRain","setRainbow","setRandomLip","setRank","setRectangular","setRepairCargo","setShadowDistance","setSide","setSimpleTaskDescription","setSimpleTaskDestination","setSimpleTaskTarget","setSimulWeatherLayers","setSize","setSkill","setSkill array","setSlingLoad","setSoundEffect","setSpeaker","setSpeech","setSpeedMode","setStatValue","setSuppression","setSystemOfUnits","setTargetAge","setTaskResult","setTaskState","setTerrainGrid","setText","setTimeMultiplier","setTitleEffect","setTriggerActivation","setTriggerArea","setTriggerStatements","setTriggerText","setTriggerTimeout","setTriggerType","setType","setUnconscious","setUnitAbility","setUnitPos","setUnitPosWeak","setUnitRank","setUnitRecoilCoefficient","setUnloadInCombat","setUserActionText","setVariable","setVectorDir","setVectorDirAndUp","setVectorUp","setVehicleAmmo","setVehicleAmmoDef","setVehicleArmor","setVehicleId","setVehicleLock","setVehiclePosition","setVehicleTiPars","setVehicleVarName","setVelocity","setVelocityTransformation","setViewDistance","setVisibleIfTreeCollapsed","setWaves","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointLoiterRadius","setWaypointLoiterType","setWaypointName","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","setWeaponReloadingTime","setWind","setWindDir","setWindForce","setWindStr","setWPPos","show3DIcons","showChat","showCinemaBorder","showCommandingMenu","showCompass","showCuratorCompass","showGPS","showHUD","showLegend","showMap","shownArtilleryComputer","shownChat","shownCompass","shownCuratorCompass","showNewEditorObject","shownGPS","shownHUD","shownMap","shownPad","shownRadio","shownUAVFeed","shownWarrant","shownWatch","showPad","showRadio","showSubtitles","showUAVFeed","showWarrant","showWatch","showWaypoint","side","sideChat","sideEnemy","sideFriendly","sideLogic","sideRadio","sideUnknown","simpleTasks","simulationEnabled","simulCloudDensity","simulCloudOcclusion","simulInClouds","simulWeatherSync","sin","size","sizeOf","skill","skillFinal","skipTime","sleep","sliderPosition","sliderRange","sliderSetPosition","sliderSetRange","sliderSetSpeed","sliderSpeed","slingLoadAssistantShown","soldierMagazines","someAmmo","sort","soundVolume","spawn","speaker","speed","speedMode","splitString","sqrt","squadParams","stance","startLoadingScreen","step","stop","stopped","str","sunOrMoon","supportInfo","suppressFor","surfaceIsWater","surfaceNormal","surfaceType","swimInDepth","switch","switchableUnits","switchAction","switchCamera","switchGesture","switchLight","switchMove","synchronizedObjects","synchronizedTriggers","synchronizedWaypoints","synchronizeObjectsAdd","synchronizeObjectsRemove","synchronizeTrigger","synchronizeWaypoint","synchronizeWaypoint trigger","systemChat","systemOfUnits","tan","targetKnowledge","targetsAggregate","targetsQuery","taskChildren","taskCompleted","taskDescription","taskDestination","taskHint","taskNull","taskParent","taskResult","taskState","teamMember","teamMemberNull","teamName","teams","teamSwitch","teamSwitchEnabled","teamType","terminate","terrainIntersect","terrainIntersectASL","text","text location","textLog","textLogFormat","tg","then","throw","time","timeMultiplier","titleCut","titleFadeOut","titleObj","titleRsc","titleText","to","toArray","toLower","toString","toUpper","triggerActivated","triggerActivation","triggerArea","triggerAttachedVehicle","triggerAttachObject","triggerAttachVehicle","triggerStatements","triggerText","triggerTimeout","triggerTimeoutCurrent","triggerType","true","try","turretLocal","turretOwner","turretUnit","tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetPictureColor","tvSetTooltip","tvSetValue","tvSort","tvSortByValue","tvText","tvValue","type","typeName","typeOf","UAVControl","uiNamespace","uiSleep","unassignCurator","unassignItem","unassignTeam","unassignVehicle","underwater","uniform","uniformContainer","uniformItems","uniformMagazines","unitAddons","unitBackpack","unitPos","unitReady","unitRecoilCoefficient","units","unitsBelowHeight","unlinkItem","unlockAchievement","unregisterTask","updateDrawIcon","updateMenuItem","updateObjectTree","useAudioTimeForMoves","vectorAdd","vectorCos","vectorCrossProduct","vectorDiff","vectorDir","vectorDirVisual","vectorDistance","vectorDistanceSqr","vectorDotProduct","vectorFromTo","vectorMagnitude","vectorMagnitudeSqr","vectorMultiply","vectorNormalized","vectorUp","vectorUpVisual","vehicle","vehicleChat","vehicleRadio","vehicles","vehicleVarName","velocity","velocityModelSpace","verifySignature","vest","vestContainer","vestItems","vestMagazines","viewDistance","visibleCompass","visibleGPS","visibleMap","visiblePosition","visiblePositionASL","visibleWatch","waitUntil","waves","waypointAttachedObject","waypointAttachedVehicle","waypointAttachObject","waypointAttachVehicle","waypointBehaviour","waypointCombatMode","waypointCompletionRadius","waypointDescription","waypointFormation","waypointHousePosition","waypointLoiterRadius","waypointLoiterType","waypointName","waypointPosition","waypoints","waypointScript","waypointsEnabledUAV","waypointShow","waypointSpeed","waypointStatements","waypointTimeout","waypointTimeoutCurrent","waypointType","waypointVisible","weaponAccessories","weaponCargo","weaponDirection","weaponLowered","weapons","weaponsItems","weaponsItemsCargo","weaponState","weaponsTurret","weightRTD","west","WFSideText","while","wind","windDir","windStr","wingsForcesRTD","with","worldName","worldSize","worldToModel","worldToModelVisual","worldToScreen"].filter(function(e){return-1==t.indexOf(e)&&-1==r.indexOf(e)&&-1==n.indexOf(e)});i=i.concat(["_forEachIndex|10","_this|10","_x|10"]);var a={className:"number",begin:e.NUMBER_RE,relevance:0},o={className:"string",variants:[e.QUOTE_STRING_MODE,{begin:"'\\\\?.",end:"'",illegal:"."}]},s={className:"preprocessor",begin:"#",end:"$",keywords:"if else elif endif define undef warning error line pragma ifdef ifndef",contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",contains:[o,{className:"string",begin:"<",end:">",illegal:"\\n"}]},o,a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]};return{aliases:["sqf"],case_insensitive:!0,keywords:{keyword:t.join(" "),built_in:i.join(" "),literal:r.join(" ")},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,{className:"string",relevance:0,variants:[{begin:'"',end:'"',contains:[{begin:'""'}]},{begin:"'",end:"'",contains:[{begin:"''"}]}]},s]}}),i.registerLanguage("sql",function(e){var t=e.COMMENT("--","$");return{case_insensitive:!0,illegal:/[<>{}*]/,contains:[{className:"operator",beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke",end:/;/,endsWithParent:!0,keywords:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes c cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle d data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration e each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract f failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function g general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http i id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists k keep keep_duplicates key keys kill l language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim m main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex n name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding p package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime t table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE,{begin:'""'}]},{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t]},e.C_BLOCK_COMMENT_MODE,t]}}),i.registerLanguage("stata",function(e){return{aliases:["do","ado"],case_insensitive:!0,keywords:"if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate g gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph graph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmeans hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intreg_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kappa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l la lab labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot lvr2plot_7 m ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me_derd mean means median memory memsize meqparse mer merg merge mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bhhh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mor more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver olo olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross pkequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_time procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot qqplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape restore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rreg rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate serrbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_fr_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyratio svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symmetry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tobit_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u unab unabbrev unabcmd update us use uselabel var var_mkcompanion var_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd vec_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf weib2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wntestb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p xtcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_refe_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_5 zttoct_5 ztvary_5 ztweib_5",contains:[{className:"label",variants:[{begin:"\\$\\{?[a-zA-Z0-9_]+\\}?"},{begin:"`[a-zA-Z0-9_]+'"}]},{className:"string",variants:[{begin:'`"[^\r\n]*?"\''},{begin:'"[^\r\n"]*"'}]},{className:"literal",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\(|$)"}]},e.COMMENT("^[ \t]*\\*.*$",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}),i.registerLanguage("step21",function(e){var t=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*!","\\*/"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"label",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}];return{aliases:["p21","step","stp"],case_insensitive:!0,lexemes:"[A-Z_][A-Z0-9_.]*",keywords:{literal:"",built_in:"",keyword:"HEADER ENDSEC DATA"},contains:[{className:"preprocessor",begin:"END-ISO-10303-21;",relevance:10},{className:"preprocessor",begin:"ISO-10303-21;",relevance:10}].concat(t)}}),i.registerLanguage("stylus",function(e){var t={className:"variable",begin:"\\$"+e.IDENT_RE},n={className:"hexcolor",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})",relevance:10},r="[\\.\\s\\n\\[\\:,]";return{aliases:["styl"],case_insensitive:!1,illegal:"("+["\\{","\\}","\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"].join("|")+")",keywords:"if else for in",contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+r,returnBegin:!0,contains:[{className:"class",begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"\\#[a-zA-Z][a-zA-Z0-9_-]*"+r,returnBegin:!0,contains:[{className:"id",begin:"\\#[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"\\b("+["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"].join("|")+")"+r,returnBegin:!0,contains:[{className:"tag",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"}]},{className:"pseudo",begin:"&?:?:\\b("+["after","before","first-letter","first-line","active","first-child","focus","hover","lang","link","visited"].join("|")+")"+r},{className:"at_rule",begin:"@("+["charset","css","debug","extend","font-face","for","import","include","media","mixin","page","warn","while"].join("|")+")\\b"},t,e.CSS_NUMBER_MODE,e.NUMBER_MODE,{className:"function",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",illegal:"[\\n]",returnBegin:!0,contains:[{className:"title",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{className:"params",begin:/\(/,end:/\)/,contains:[n,t,e.APOS_STRING_MODE,e.CSS_NUMBER_MODE,e.NUMBER_MODE,e.QUOTE_STRING_MODE]}]},{className:"attribute",begin:"\\b("+["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-variant-ligatures","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse().join("|")+")\\b"}]}}),i.registerLanguage("swift",function(e){var t={keyword:"__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r={className:"subst",begin:/\\\(/,end:"\\)",keywords:t,contains:[]},i={className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",relevance:0},a=e.inherit(e.QUOTE_STRING_MODE,{contains:[r,e.BACKSLASH_ESCAPE]});return r.contains=[i],{keywords:t,contains:[a,e.C_LINE_COMMENT_MODE,n,{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},i,{className:"func",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/,illegal:/\(/}),{className:"generics",begin:/</,end:/>/,illegal:/>/},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,contains:["self",i,a,e.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],illegal:/\[|%/},{className:"class",beginKeywords:"struct protocol class extension enum",keywords:t,end:"\\{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/})]},{className:"preprocessor",begin:"(@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain)"},{beginKeywords:"import",end:/$/,contains:[e.C_LINE_COMMENT_MODE,n]}]}}),i.registerLanguage("tcl",function(e){return{aliases:["tk"],keywords:"after append apply array auto_execok auto_import auto_load auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd chan clock close concat continue dde dict encoding eof error eval exec exit expr fblocked fconfigure fcopy file fileevent filename flush for foreach format gets glob global history http if incr info interp join lappend|10 lassign|10 lindex|10 linsert|10 list llength|10 load lrange|10 lrepeat|10 lreplace|10 lreverse|10 lsearch|10 lset|10 lsort|10 mathfunc mathop memory msgcat namespace open package parray pid pkg::create pkg_mkIndex platform platform::shell proc puts pwd read refchan regexp registry regsub|10 rename return safe scan seek set socket source split string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter tcl_wordBreakBefore tcltest tclvars tell time tm trace unknown unload unset update uplevel upvar variable vwait while",contains:[e.COMMENT(";[ \\t]*#","$"),e.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"symbol",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",excludeEnd:!0,variants:[{begin:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*\\(([a-zA-Z0-9_])*\\)",end:"[^a-zA-Z0-9_\\}\\$]"},{begin:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"(\\))?[^a-zA-Z0-9_\\}\\$]"}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},{className:"number",variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]}]}}),i.registerLanguage("tex",function(e){var t={className:"command",begin:"\\\\[a-zA-Zа-яА-я]+[\\*]?"},n={className:"command",begin:"\\\\[^a-zA-Zа-яА-я0-9]"},r={className:"special",begin:"[{}\\[\\]\\&#~]",relevance:0};return{contains:[{begin:"\\\\[a-zA-Zа-яА-я]+[\\*]? *= *-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",returnBegin:!0,contains:[t,n,{className:"number",begin:" *=",end:"-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",excludeBegin:!0}],relevance:10},t,n,r,{className:"formula",begin:"\\$\\$",end:"\\$\\$",contains:[t,n,r],relevance:0},{className:"formula",begin:"\\$",end:"\\$",contains:[t,n,r],relevance:0},e.COMMENT("%","$",{relevance:0})]}}),i.registerLanguage("thrift",function(e){var t="bool byte i16 i32 i64 double string binary";return{keywords:{keyword:"namespace const typedef struct enum service exception void oneway set list map required optional",built_in:t,literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",end:">",keywords:t,contains:["self"]}]}}),i.registerLanguage("tp",function(e){var t={className:"number",begin:"[1-9][0-9]*",relevance:0},n={className:"comment",begin:":[^\\]]+"};return{keywords:{keyword:"ABORT ACC ADJUST AND AP_LD BREAK CALL CNT COL CONDITION CONFIG DA DB DIV DETECT ELSE END ENDFOR ERR_NUM ERROR_PROG FINE FOR GP GUARD INC IF JMP LINEAR_MAX_SPEED LOCK MOD MONITOR OFFSET Offset OR OVERRIDE PAUSE PREG PTH RT_LD RUN SELECT SKIP Skip TA TB TO TOOL_OFFSET Tool_Offset UF UT UFRAME_NUM UTOOL_NUM UNLOCK WAIT X Y Z W P R STRLEN SUBSTR FINDSTR VOFFSET",constant:"ON OFF max_speed LPOS JPOS ENABLE DISABLE START STOP RESET"},contains:[{className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|    TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",t,n]},{className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",t,e.QUOTE_STRING_MODE,n]},{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},e.COMMENT("//","[;$]"),e.COMMENT("!","[;$]"),e.COMMENT("--eg:","$"),e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},e.C_NUMBER_MODE,{className:"variable",begin:"\\$[A-Za-z0-9_]+"}]}}),i.registerLanguage("twig",function(e){var t={className:"function",beginKeywords:"attribute block constant cycle date dump include max min parent random range source template_from_string",relevance:0,contains:[{className:"params",begin:"\\(",end:"\\)"}]},n={className:"filter",begin:/\|[A-Za-z_]+:?/,keywords:"abs batch capitalize convert_encoding date date_modify default escape first format join json_encode keys last length lower merge nl2br number_format raw replace reverse round slice sort split striptags title trim upper url_encode",contains:[t]},r="autoescape block do embed extends filter flush for if import include macro sandbox set spaceless use verbatim";return r=r+" "+r.split(" ").map(function(e){return"end"+e}).join(" "),{aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{#/,/#}/),{className:"template_tag",begin:/\{%/,end:/%}/,keywords:r,contains:[n,t]},{className:"variable",begin:/\{\{/,end:/}}/,contains:[n,t]}]}}),i.registerLanguage("typescript",function(e){var t={keyword:"in if for while finally var new function|0 do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void"};return{aliases:["ts"],keywords:t,contains:[{className:"pi",begin:/^\s*['"]use strict['"]/,relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE],relevance:0},{className:"function",begin:"function",end:/[\{;]/,excludeEnd:!0,keywords:t,contains:["self",e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:/["'\(]/}],illegal:/\[|%/,relevance:0},{className:"constructor",beginKeywords:"constructor",end:/\{/,excludeEnd:!0,relevance:10},{className:"module",beginKeywords:"module",end:/\{/,excludeEnd:!0},{className:"interface",beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+e.IDENT_RE,relevance:0}]}}),i.registerLanguage("vala",function(e){return{keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface delegate namespace",end:"{",excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[e.UNDERSCORE_TITLE_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"preprocessor",begin:"^#",end:"$",relevance:2},{className:"constant",begin:" [A-Z_]+ ",relevance:0}]}}),i.registerLanguage("vbnet",function(e){return{aliases:["vb"],case_insensitive:!0,keywords:{keyword:"addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor",built_in:"boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",literal:"true false nothing"},illegal:"//|{|}|endif|gosub|variant|wend",contains:[e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT("'","$",{returnBegin:!0,contains:[{className:"xmlDocTag",begin:"'''|\x3c!--|--\x3e",contains:[e.PHRASAL_WORDS_MODE]},{className:"xmlDocTag",begin:"</?",end:">",contains:[e.PHRASAL_WORDS_MODE]}]}),e.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$",keywords:"if else elseif end region externalsource"}]}}),i.registerLanguage("vbscript",function(e){return{aliases:["vbs"],case_insensitive:!0,keywords:{keyword:"call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",built_in:"lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err",literal:"true false null nothing empty"},illegal:"//",contains:[e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT(/'/,/$/,{relevance:0}),e.C_NUMBER_MODE]}}),i.registerLanguage("vbscript-html",function(e){return{subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}),i.registerLanguage("verilog",function(e){return{aliases:["v"],case_insensitive:!0,keywords:{keyword:"always and assign begin buf bufif0 bufif1 case casex casez cmos deassign default defparam disable edge else end endcase endfunction endmodule endprimitive endspecify endtable endtask event for force forever fork function if ifnone initial inout input join macromodule module nand negedge nmos nor not notif0 notif1 or output parameter pmos posedge primitive pulldown pullup rcmos release repeat rnmos rpmos rtran rtranif0 rtranif1 specify specparam table task timescale tran tranif0 tranif1 wait while xnor xor",typename:"highz0 highz1 integer large medium pull0 pull1 real realtime reg scalared signed small strong0 strong1 supply0 supply0 supply1 supply1 time tri tri0 tri1 triand trior trireg vectored wand weak0 weak1 wire wor"},contains:[e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"number",begin:"\\b(\\d+'(b|h|o|d|B|H|O|D))?[0-9xzXZ]+",contains:[e.BACKSLASH_ESCAPE],relevance:0},{className:"typename",begin:"\\.\\w+",relevance:0},{className:"value",begin:"#\\((?!parameter).+\\)"},{className:"keyword",begin:"\\+|-|\\*|/|%|<|>|=|#|`|\\!|&|\\||@|:|\\^|~|\\{|\\}",relevance:0}]}}),i.registerLanguage("vhdl",function(e){return{case_insensitive:!0,keywords:{keyword:"abs access after alias all and architecture array assert attribute begin block body buffer bus case component configuration constant context cover disconnect downto default else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package port postponed procedure process property protected pure range record register reject release rem report restrict restrict_guarantee return rol ror select sequence severity shared signal sla sll sra srl strong subtype then to transport type unaffected units until use variable vmode vprop vunit wait when while with xnor xor",typename:"boolean bit character severity_level integer time delay_length natural positive string bit_vector file_open_kind file_open_status std_ulogic std_ulogic_vector std_logic std_logic_vector unsigned signed boolean_vector integer_vector real_vector time_vector"},illegal:"{",contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT("--","$"),e.QUOTE_STRING_MODE,{className:"number",begin:"\\b(\\d(_|\\d)*#\\w+(\\.\\w+)?#([eE][-+]?\\d(_|\\d)*)?|\\d(_|\\d)*(\\.\\d(_|\\d)*)?([eE][-+]?\\d(_|\\d)*)?)",relevance:0},{className:"literal",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[e.BACKSLASH_ESCAPE]},{className:"attribute",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[e.BACKSLASH_ESCAPE]}]}}),i.registerLanguage("vim",function(e){return{lexemes:/[!#@\w]+/,keywords:{keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw d|0 delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu g|0 go gr grepa gu gv ha h|0 helpf helpg helpt hi hid his i|0 ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs n|0 new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf q|0 quita qa r|0 rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv s|0 sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync t|0 tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up v|0 ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"abs acos add and append argc argidx argv asin atan atan2 browse browsedir bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line byteidx call ceil changenr char2nr cindent clearmatches col complete complete_add complete_check confirm copy cos cosh count cscope_connection cursor deepcopy delete did_filetype diff_filler diff_hlID empty escape eval eventhandler executable exists exp expand extend feedkeys filereadable filewritable filter finddir findfile float2nr floor fmod fnameescape fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreground function garbagecollect get getbufline getbufvar getchar getcharmod getcmdline getcmdpos getcmdtype getcwd getfontname getfperm getfsize getftime getftype getline getloclist getmatches getpid getpos getqflist getreg getregtype gettabvar gettabwinvar getwinposx getwinposy getwinvar glob globpath has has_key haslocaldir hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent index input inputdialog inputlist inputrestore inputsave inputsecret insert invert isdirectory islocked items join keys len libcall libcallnr line line2byte lispindent localtime log log10 luaeval map maparg mapcheck match matchadd matcharg matchdelete matchend matchlist matchstr max min mkdir mode mzeval nextnonblank nr2char or pathshorten pow prevnonblank printf pumvisible py3eval pyeval range readfile reltime reltimestr remote_expr remote_foreground remote_peek remote_read remote_send remove rename repeat resolve reverse round screenattr screenchar screencol screenrow search searchdecl searchpair searchpairpos searchpos server2client serverlist setbufvar setcmdpos setline setloclist setmatches setpos setqflist setreg settabvar settabwinvar setwinvar sha256 shellescape shiftwidth simplify sin sinh sort soundfold spellbadword spellsuggest split sqrt str2float str2nr strchars strdisplaywidth strftime stridx string strlen strpart strridx strtrans strwidth submatch substitute synconcealed synID synIDattr synIDtrans synstack system tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tan tanh tempname tolower toupper tr trunc type undofile undotree values virtcol visualmode wildmenumode winbufnr wincol winheight winline winnr winrestcmd winrestview winsaveview winwidth writefile xor"},illegal:/[{:]/,contains:[e.NUMBER_MODE,e.APOS_STRING_MODE,{className:"string",begin:/"((\\")|[^"\n])*("|\n)/},{className:"variable",begin:/[bwtglsav]:[\w\d_]*/},{className:"function",beginKeywords:"function function!",end:"$",relevance:0,contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]}]}}),i.registerLanguage("x86asm",function(e){return{case_insensitive:!0,lexemes:"\\.?"+e.IDENT_RE,keywords:{keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",literal:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0  xmm1  xmm2  xmm3  xmm4  xmm5  xmm6  xmm7  xmm8  xmm9 xmm10  xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0  ymm1  ymm2  ymm3  ymm4  ymm5  ymm6  ymm7  ymm8  ymm9 ymm10  ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0  zmm1  zmm2  zmm3  zmm4  zmm5  zmm6  zmm7  zmm8  zmm9 zmm10  zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l",pseudo:"db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times",preprocessor:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr __FILE__ __LINE__ __SECT__  __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__  __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public ",built_in:"bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[e.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"},{begin:"\\.[A-Za-z0-9]+"}],relevance:0},{className:"label",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"argument",begin:"%[0-9]+",relevance:0},{className:"built_in",begin:"%!S+",relevance:0}]}}),i.registerLanguage("xl",function(e){var t="ObjectLoader Animate MovieCredits Slides Filters Shading Materials LensFlare Mapping VLCAudioVideo StereoDecoder PointCloud NetworkAccess RemoteControl RegExp ChromaKey Snowfall NodeJS Speech Charts",n={className:"string",begin:'"',end:'"',illegal:"\\n"},r={className:"import",beginKeywords:"import",end:"$",keywords:{keyword:"import",module:t},relevance:0,contains:[n]};return{aliases:["tao"],lexemes:/[a-zA-Z][a-zA-Z0-9_?]*/,keywords:{keyword:"if then else do while until for loop import with is as where when by data constant",literal:"true false nil",type:"integer real text name boolean symbol infix prefix postfix block tree",built_in:"in mod rem and or xor not abs sign floor ceil sqrt sin cos tan asin acos atan exp expm1 log log2 log10 log1p pi at",module:t,id:"text_length text_range text_find text_replace contains page slide basic_slide title_slide title subtitle fade_in fade_out fade_at clear_color color line_color line_width texture_wrap texture_transform texture scale_?x scale_?y scale_?z? translate_?x translate_?y translate_?z? rotate_?x rotate_?y rotate_?z? rectangle circle ellipse sphere path line_to move_to quad_to curve_to theme background contents locally time mouse_?x mouse_?y mouse_buttons"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"string",begin:"'",end:"'",illegal:"\\n"},{className:"string",begin:"<<",end:">>"},{className:"function",begin:"[a-z].*->"},r,{className:"constant",begin:"[A-Z][A-Z_0-9]+",relevance:0},{className:"variable",begin:"([A-Z][a-z_0-9]+)+",relevance:0},{className:"id",begin:"[a-z][a-z_0-9]+",relevance:0},{className:"number",begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?",relevance:10},e.NUMBER_MODE]}}),i.registerLanguage("xquery",function(e){var t={begin:"{",end:"}"},n=[{className:"variable",begin:/\$[a-zA-Z0-9\-]+/,relevance:5},{className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{className:"comment",begin:"\\(:",end:":\\)",relevance:10,contains:[{className:"doc",begin:"@\\w+"}]},{className:"decorator",begin:"%\\w+"},t];return{aliases:["xpath","xq"],case_insensitive:!1,lexemes:/[a-zA-Z\$][a-zA-Z0-9_:\-]*/,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{keyword:"for let if while then else return where group by xquery encoding versionmodule namespace boundary-space preserve strip default collation base-uri orderingcopy-namespaces order declare import schema namespace function option in allowing emptyat tumbling window sliding window start when only end when previous next stable ascendingdescending empty greatest least some every satisfies switch case typeswitch try catch andor to union intersect instance of treat as castable cast map array delete insert intoreplace value rename copy modify update",literal:"false true xs:string xs:integer element item xs:date xs:datetime xs:float xs:double xs:decimal QName xs:anyURI xs:long xs:int xs:short xs:byte attribute"},contains:t.contains=n}}),i.registerLanguage("zephir",function(e){var t={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},n={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{aliases:["zep"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var let while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally int uint long ulong char uchar double float bool boolean stringlikely unlikely",contains:[e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:e.UNDERSCORE_IDENT_RE}),{className:"string",begin:"<<<['\"]?\\w+['\"]?$",end:"^\\w+;",contains:[e.BACKSLASH_ESCAPE]},{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",e.C_BLOCK_COMMENT_MODE,t,n]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},t,n]}}),i}),function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){"use strict";function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},r=n[e]=n[e]||[];return-1==r.indexOf(t)&&r.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{};return(n[e]=n[e]||{})[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var r=n.indexOf(t);return-1!=r&&n.splice(r,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var r=0,i=n[r];t=t||[];for(var a=this._onceEvents&&this._onceEvents[e];i;){var o=a&&a[i];o&&(this.off(e,i),delete a[i]),i.apply(this,t),i=n[r+=o?0:1]}return this}},e}),function(t,n){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(e){return n(t,e)}):"object"==typeof module&&module.exports?module.exports=n(t,require("ev-emitter")):t.imagesLoaded=n(t,t.EvEmitter)}(window,function(t,e){"use strict";var r=t.jQuery,i=t.console;function a(e,t){for(var n in t)e[n]=t[n];return e}function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=function(e){var t=[];if(Array.isArray(e))t=e;else if("number"==typeof e.length)for(var n=0;n<e.length;n++)t.push(e[n]);else t.push(e);return t}(e),this.options=a({},this.options),"function"==typeof t?n=t:a(this.options,t),n&&this.on("always",n),this.getImages(),r&&(this.jqDeferred=new r.Deferred),setTimeout(function(){this.check()}.bind(this))}(o.prototype=Object.create(e.prototype)).options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),!0===this.options.background&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&s[t]){for(var n=e.querySelectorAll("img"),r=0;r<n.length;r++){var i=n[r];this.addImage(i)}if("string"==typeof this.options.background){var a=e.querySelectorAll(this.options.background);for(r=0;r<a.length;r++){var o=a[r];this.addElementBackgroundImages(o)}}}};var s={1:!0,9:!0,11:!0};function n(e){this.img=e}function c(e,t){this.url=e,this.element=t,this.img=new Image}return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var n=/url\((['"])?(.*?)\1\)/gi,r=n.exec(t.backgroundImage);null!==r;){var i=r&&r[2];i&&this.addBackground(i,e),r=n.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new n(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var n=new c(e,t);this.images.push(n)},o.prototype.check=function(){var r=this;function t(e,t,n){setTimeout(function(){r.progress(e,t,n)})}this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?this.images.forEach(function(e){e.once("progress",t),e.check()}):this.complete()},o.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&i&&i.log("progress: "+n,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},(n.prototype=Object.create(e.prototype)).check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.src)},n.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},n.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},n.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},n.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},n.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},n.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},(c.prototype=Object.create(n.prototype)).check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},c.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},c.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&((r=e).fn.imagesLoaded=function(e,t){return new o(this,e,t).jqDeferred.promise(r(this))})},o.makeJQueryPlugin(),o}),function(e){function t(e,t){if(!(1<e.originalEvent.touches.length)){e.preventDefault();var n=e.originalEvent.changedTouches[0],r=document.createEvent("MouseEvents");r.initMouseEvent(t,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(r)}}if(e.support.touch="ontouchend"in document,e.support.touch){var n,r=e.ui.mouse.prototype,i=r._mouseInit,a=r._mouseDestroy;r._touchStart=function(e){!n&&this._mouseCapture(e.originalEvent.changedTouches[0])&&(n=!0,this._touchMoved=!1,t(e,"mouseover"),t(e,"mousemove"),t(e,"mousedown"))},r._touchMove=function(e){n&&(this._touchMoved=!0,t(e,"mousemove"))},r._touchEnd=function(e){n&&(t(e,"mouseup"),t(e,"mouseout"),this._touchMoved||t(e,"click"),n=!1)},r._mouseInit=function(){this.element.bind({touchstart:e.proxy(this,"_touchStart"),touchmove:e.proxy(this,"_touchMove"),touchend:e.proxy(this,"_touchEnd")}),i.call(this)},r._mouseDestroy=function(){this.element.unbind({touchstart:e.proxy(this,"_touchStart"),touchmove:e.proxy(this,"_touchMove"),touchend:e.proxy(this,"_touchEnd")}),a.call(this)}}}(jQuery),function(e,f){(function(e){if(typeof module!=="undefined"&&module.exports){return function(e){module.exports=e()}}else if(typeof define==="function"&&define.amd){return define}else if(typeof window!=="undefined"){return function(e){window.MobileDetect=e()}}else{throw new Error("unknown environment")}})()(function(){"use strict";var s,c={mobileDetectRules:{phones:{iPhone:"\\biPhone\\b|\\biPod\\b",BlackBerry:"BlackBerry|\\bBB10\\b|rim[0-9]+",HTC:"HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\\bEVO\\b|T-Mobile G1|Z520m",Nexus:"Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6",Dell:"Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\\b001DL\\b|\\b101DL\\b|\\bGS01\\b",Motorola:"Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b",Samsung:"Samsung|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350",LG:"\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323)",Sony:"SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533",Asus:"Asus.*Galaxy|PadFone.*Mobile",Micromax:"Micromax.*\\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\\b",Palm:"PalmSource|Palm",Vertu:"Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature",Pantech:"PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790",Fly:"IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250",Wiko:"KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM",iMobile:"i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)",SimValley:"\\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\\b",Wolfgang:"AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q",Alcatel:"Alcatel",Nintendo:"Nintendo 3DS",Amoi:"Amoi",INQ:"INQ",GenericPhone:"Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\\bwap\\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser"},tablets:{iPad:"iPad|iPad.*Mobile",NexusTablet:"Android.*Nexus[\\s]+(7|9|10)",SamsungTablet:"SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561",Kindle:"Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI)\\b",SurfaceTablet:"Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)",HPTablet:"HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10",AsusTablet:"^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K017 |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|ME581CL|ME8510C|ME181C",BlackBerryTablet:"PlayBook|RIM Tablet",HTCtablet:"HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410",MotorolaTablet:"xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617",NookTablet:"Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2",AcerTablet:"Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b",ToshibaTablet:"Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO",LGTablet:"\\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\\b",FujitsuTablet:"Android.*\\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\\b",PrestigioTablet:"PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002",LenovoTablet:"Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)",DellTablet:"Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7",YarvikTablet:"Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b",MedionTablet:"Android.*\\bOYO\\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB",ArnovaTablet:"AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2",IntensoTablet:"INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004",IRUTablet:"M702pro",MegafonTablet:"MegaFon V9|\\bZTE V9\\b|Android.*\\bMT7A\\b",EbodaTablet:"E-Boda (Supreme|Impresspeed|Izzycomm|Essential)",AllViewTablet:"Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)",ArchosTablet:"\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b",AinolTablet:"NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark",SonyTablet:"Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP612|SOT31",PhilipsTablet:"\\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\\b",CubeTablet:"Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT",CobyTablet:"MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010",MIDTablet:"M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10",MSITablet:"MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b",SMiTTablet:"Android.*(\\bMID\\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)",RockChipTablet:"Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A",FlyTablet:"IQ310|Fly Vision",bqTablet:"Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris E10)|Maxwell.*Lite|Maxwell.*Plus",HuaweiTablet:"MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim",NecTablet:"\\bN-06D|\\bN-08D",PantechTablet:"Pantech.*P4100",BronchoTablet:"Broncho.*(N701|N708|N802|a710)",VersusTablet:"TOUCHPAD.*[78910]|\\bTOUCHTAB\\b",ZyncTablet:"z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900",PositivoTablet:"TB07STA|TB10STA|TB07FTA|TB10FTA",NabiTablet:"Android.*\\bNabi",KoboTablet:"Kobo Touch|\\bK080\\b|\\bVox\\b Build|\\bArc\\b Build",DanewTablet:"DSlide.*\\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\\b",TexetTablet:"NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE",PlaystationTablet:"Playstation.*(Portable|Vita)",TrekstorTablet:"ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab",PyleAudioTablet:"\\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\\b",AdvanTablet:"Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b ",DanyTechTablet:"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1",GalapadTablet:"Android.*\\bG1\\b",MicromaxTablet:"Funbook|Micromax.*\\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\\b",KarbonnTablet:"Android.*\\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\\b",AllFineTablet:"Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide",PROSCANTablet:"\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b",YONESTablet:"BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026",ChangJiaTablet:"TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503",GUTablet:"TX-A1301|TX-M9002|Q702|kf026",PointOfViewTablet:"TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10",OvermaxTablet:"OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)",HCLTablet:"HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync",DPSTablet:"DPS Dream 9|DPS Dual 7",VistureTablet:"V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10",CrestaTablet:"CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989",MediatekTablet:"\\bMT8125|MT8389|MT8135|MT8377\\b",ConcordeTablet:"Concorde([ ]+)?Tab|ConCorde ReadMan",GoCleverTablet:"GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042",ModecomTablet:"FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003",VoninoTablet:"\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b",ECSTablet:"V07OT2|TM105A|S10OT1|TR10CS1",StorexTablet:"eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab",VodafoneTablet:"SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7",EssentielBTablet:"Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2",RossMoorTablet:"RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711",iMobileTablet:"i-mobile i-note",TolinoTablet:"tolino tab [0-9.]+|tolino shine",AudioSonicTablet:"\\bC-22Q|T7-QC|T-17B|T-17P\\b",AMPETablet:"Android.* A78 ",SkkTablet:"Android.* (SKYPAD|PHOENIX|CYCLOPS)",TecnoTablet:"TECNO P9",JXDTablet:"Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\\b",iJoyTablet:"Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)",FX2Tablet:"FX2 PAD7|FX2 PAD10",XoroTablet:"KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151",ViewsonicTablet:"ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a",OdysTablet:"LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\\bXELIO\\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10",CaptivaTablet:"CAPTIVA PAD",IconbitTablet:"NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S",TeclastTablet:"T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi",OndaTablet:"\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\\b[\\s]+",JaytechTablet:"TPC-PA762",BlaupunktTablet:"Endeavour 800NG|Endeavour 1010",DigmaTablet:"\\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\\b",EvolioTablet:"ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\\bEvotab\\b|\\bNeura\\b",LavaTablet:"QPAD E704|\\bIvoryS\\b|E-TAB IVORY|\\bE-TAB\\b",AocTablet:"MW0811|MW0812|MW0922|MTK8382",MpmanTablet:"MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010",CelkonTablet:"CT695|CT888|CT[\\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\\bCT-1\\b",WolderTablet:"miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b",MiTablet:"\\bMI PAD\\b|\\bHM NOTE 1W\\b",NibiruTablet:"Nibiru M1|Nibiru Jupiter One",NexoTablet:"NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI",LeaderTablet:"TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100",UbislateTablet:"UbiSlate[\\s]?7C",PocketBookTablet:"Pocketbook",Hudl:"Hudl HT7S3|Hudl 2",TelstraTablet:"T-Hub2",GenericTablet:"Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bJolla\\b|\\bTP750\\b"},oss:{AndroidOS:"Android",BlackBerryOS:"blackberry|\\bBB10\\b|rim tablet os",PalmOS:"PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino",SymbianOS:"Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\\bS60\\b",WindowsMobileOS:"Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;",WindowsPhoneOS:"Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;",iOS:"\\biPhone.*Mobile|\\biPod|\\biPad",MeeGoOS:"MeeGo",MaemoOS:"Maemo",JavaOS:"J2ME/|\\bMIDP\\b|\\bCLDC\\b",webOS:"webOS|hpwOS",badaOS:"\\bBada\\b",BREWOS:"BREW"},uas:{Chrome:"\\bCrMo\\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?",Dolfin:"\\bDolfin\\b",Opera:"Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+|Coast/[0-9.]+",Skyfire:"Skyfire",IE:"IEMobile|MSIEMobile",Firefox:"fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile",Bolt:"bolt",TeaShark:"teashark",Blazer:"Blazer",Safari:"Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari",Tizen:"Tizen",UCBrowser:"UC.*Browser|UCWEB",baiduboxapp:"baiduboxapp",baidubrowser:"baidubrowser",DiigoBrowser:"DiigoBrowser",Puffin:"Puffin",Mercury:"\\bMercury\\b",ObigoBrowser:"Obigo",NetFront:"NF-Browser",GenericBrowser:"NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger"},props:{Mobile:"Mobile/[VER]",Build:"Build/[VER]",Version:"Version/[VER]",VendorID:"VendorID/[VER]",iPad:"iPad.*CPU[a-z ]+[VER]",iPhone:"iPhone.*CPU[a-z ]+[VER]",iPod:"iPod.*CPU[a-z ]+[VER]",Kindle:"Kindle/[VER]",Chrome:["Chrome/[VER]","CriOS/[VER]","CrMo/[VER]"],Coast:["Coast/[VER]"],Dolfin:"Dolfin/[VER]",Firefox:"Firefox/[VER]",Fennec:"Fennec/[VER]",IE:["IEMobile/[VER];","IEMobile [VER]","MSIE [VER];","Trident/[0-9.]+;.*rv:[VER]"],NetFront:"NetFront/[VER]",NokiaBrowser:"NokiaBrowser/[VER]",Opera:[" OPR/[VER]","Opera Mini/[VER]","Version/[VER]"],"Opera Mini":"Opera Mini/[VER]","Opera Mobi":"Version/[VER]","UC Browser":"UC Browser[VER]",MQQBrowser:"MQQBrowser/[VER]",MicroMessenger:"MicroMessenger/[VER]",baiduboxapp:"baiduboxapp/[VER]",baidubrowser:"baidubrowser/[VER]",Iron:"Iron/[VER]",Safari:["Version/[VER]","Safari/[VER]"],Skyfire:"Skyfire/[VER]",Tizen:"Tizen/[VER]",Webkit:"webkit[ /][VER]",Gecko:"Gecko/[VER]",Trident:"Trident/[VER]",Presto:"Presto/[VER]",iOS:" \\bi?OS\\b [VER][ ;]{1}",Android:"Android [VER]",BlackBerry:["BlackBerry[\\w]+/[VER]","BlackBerry.*Version/[VER]","Version/[VER]"],BREW:"BREW [VER]",Java:"Java/[VER]","Windows Phone OS":["Windows Phone OS [VER]","Windows Phone [VER]"],"Windows Phone":"Windows Phone [VER]","Windows CE":"Windows CE/[VER]","Windows NT":"Windows NT [VER]",Symbian:["SymbianOS/[VER]","Symbian/[VER]"],webOS:["webOS/[VER]","hpwOS/[VER];"]},utils:{Bot:"Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom",MobileBot:"Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2",DesktopMode:"WPDesktop",TV:"SonyDTV|HbbTV",WebKit:"(webkit)[ /]([\\w.]+)",Console:"\\b(Nintendo|Nintendo WiiU|Nintendo 3DS|PLAYSTATION|Xbox)\\b",Watch:"SM-V700"}},detectMobileBrowsers:{fullPattern:/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,shortPattern:/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,tabletPattern:/android|ipad|playbook|silk/i}},l=Object.prototype.hasOwnProperty;function t(e,t){return null!=e&&null!=t&&e.toLowerCase()===t.toLowerCase()}function n(e,t){var n,r,i=e.length;if(!i||!t)return!1;for(n=t.toLowerCase(),r=0;r<i;++r)if(n===e[r].toLowerCase())return!0;return!1}function u(e){for(var t in e)l.call(e,t)&&(e[t]=new RegExp(e[t],"i"))}function o(e,t){this.ua=e||"",this._cache={},this.maxPhoneWidth=t||600}return c.FALLBACK_PHONE="UnknownPhone",c.FALLBACK_TABLET="UnknownTablet",c.FALLBACK_MOBILE="UnknownMobile",s="isArray"in Array?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},function(){var e,t,n,r,i,a,o=c.mobileDetectRules;for(e in o.props)if(l.call(o.props,e)){for(t=o.props[e],s(t)||(t=[t]),i=t.length,r=0;r<i;++r)0<=(a=(n=t[r]).indexOf("[VER]"))&&(n=n.substring(0,a)+"([\\w._\\+]+)"+n.substring(a+5)),t[r]=new RegExp(n,"i");o.props[e]=t}u(o.oss),u(o.phones),u(o.tablets),u(o.uas),u(o.utils),o.oss0={WindowsPhoneOS:o.oss.WindowsPhoneOS,WindowsMobileOS:o.oss.WindowsMobileOS}}(),c.findMatch=function(e,t){for(var n in e)if(l.call(e,n)&&e[n].test(t))return n;return null},c.findMatches=function(e,t){var n=[];for(var r in e)l.call(e,r)&&e[r].test(t)&&n.push(r);return n},c.getVersionStr=function(e,t){var n,r,i,a,o=c.mobileDetectRules.props;if(l.call(o,e))for(i=(n=o[e]).length,r=0;r<i;++r)if(null!==(a=n[r].exec(t)))return a[1];return null},c.getVersion=function(e,t){var n=c.getVersionStr(e,t);return n?c.prepareVersionNo(n):NaN},c.prepareVersionNo=function(e){var t;return 1===(t=e.split(/[a-z._ \/\-]/i)).length&&(e=t[0]),1<t.length&&(e=t[0]+".",t.shift(),e+=t.join("")),Number(e)},c.isMobileFallback=function(e){return c.detectMobileBrowsers.fullPattern.test(e)||c.detectMobileBrowsers.shortPattern.test(e.substr(0,4))},c.isTabletFallback=function(e){return c.detectMobileBrowsers.tabletPattern.test(e)},c.prepareDetectionCache=function(e,t,n){if(e.mobile===f){var r,i,a;if(i=c.findMatch(c.mobileDetectRules.tablets,t))return e.mobile=e.tablet=i,void(e.phone=null);if(r=c.findMatch(c.mobileDetectRules.phones,t))return e.mobile=e.phone=r,void(e.tablet=null);c.isMobileFallback(t)?(a=o.isPhoneSized(n))===f?(e.mobile=c.FALLBACK_MOBILE,e.tablet=e.phone=null):a?(e.mobile=e.phone=c.FALLBACK_PHONE,e.tablet=null):(e.mobile=e.tablet=c.FALLBACK_TABLET,e.phone=null):c.isTabletFallback(t)?(e.mobile=e.tablet=c.FALLBACK_TABLET,e.phone=null):e.mobile=e.tablet=e.phone=null}},c.mobileGrade=function(e){var t=null!==e.mobile();return e.os("iOS")&&4.3<=e.version("iPad")||e.os("iOS")&&3.1<=e.version("iPhone")||e.os("iOS")&&3.1<=e.version("iPod")||2.1<e.version("Android")&&e.is("Webkit")||7<=e.version("Windows Phone OS")||e.is("BlackBerry")&&6<=e.version("BlackBerry")||e.match("Playbook.*Tablet")||1.4<=e.version("webOS")&&e.match("Palm|Pre|Pixi")||e.match("hp.*TouchPad")||e.is("Firefox")&&12<=e.version("Firefox")||e.is("Chrome")&&e.is("AndroidOS")&&4<=e.version("Android")||e.is("Skyfire")&&4.1<=e.version("Skyfire")&&e.is("AndroidOS")&&2.3<=e.version("Android")||e.is("Opera")&&11<e.version("Opera Mobi")&&e.is("AndroidOS")||e.is("MeeGoOS")||e.is("Tizen")||e.is("Dolfin")&&2<=e.version("Bada")||(e.is("UC Browser")||e.is("Dolfin"))&&2.3<=e.version("Android")||e.match("Kindle Fire")||e.is("Kindle")&&3<=e.version("Kindle")||e.is("AndroidOS")&&e.is("NookTablet")||11<=e.version("Chrome")&&!t||5<=e.version("Safari")&&!t||4<=e.version("Firefox")&&!t||7<=e.version("MSIE")&&!t||10<=e.version("Opera")&&!t?"A":e.os("iOS")&&e.version("iPad")<4.3||e.os("iOS")&&e.version("iPhone")<3.1||e.os("iOS")&&e.version("iPod")<3.1||e.is("Blackberry")&&5<=e.version("BlackBerry")&&e.version("BlackBerry")<6||5<=e.version("Opera Mini")&&e.version("Opera Mini")<=6.5&&(2.3<=e.version("Android")||e.is("iOS"))||e.match("NokiaN8|NokiaC7|N97.*Series60|Symbian/3")||11<=e.version("Opera Mobi")&&e.is("SymbianOS")?"B":(e.version("BlackBerry")<5||e.match("MSIEMobile|Windows CE.*Mobile")||e.version("Windows Mobile"),"C")},c.detectOS=function(e){return c.findMatch(c.mobileDetectRules.oss0,e)||c.findMatch(c.mobileDetectRules.oss,e)},c.getDeviceSmallerSide=function(){return window.screen.width<window.screen.height?window.screen.width:window.screen.height},o.prototype={constructor:o,mobile:function(){return c.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.mobile},phone:function(){return c.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.phone},tablet:function(){return c.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.tablet},userAgent:function(){return this._cache.userAgent===f&&(this._cache.userAgent=c.findMatch(c.mobileDetectRules.uas,this.ua)),this._cache.userAgent},userAgents:function(){return this._cache.userAgents===f&&(this._cache.userAgents=c.findMatches(c.mobileDetectRules.uas,this.ua)),this._cache.userAgents},os:function(){return this._cache.os===f&&(this._cache.os=c.detectOS(this.ua)),this._cache.os},version:function(e){return c.getVersion(e,this.ua)},versionStr:function(e){return c.getVersionStr(e,this.ua)},is:function(e){return n(this.userAgents(),e)||t(e,this.os())||t(e,this.phone())||t(e,this.tablet())||n(c.findMatches(c.mobileDetectRules.utils,this.ua),e)},match:function(e){return e instanceof RegExp||(e=new RegExp(e,"i")),e.test(this.ua)},isPhoneSized:function(e){return o.isPhoneSized(e||this.maxPhoneWidth)},mobileGrade:function(){return this._cache.grade===f&&(this._cache.grade=c.mobileGrade(this)),this._cache.grade}},o.isPhoneSized="undefined"!=typeof window&&window.screen?function(e){return e<0?f:c.getDeviceSmallerSide()<=e}:function(){},o._impl=c,o})}(),function(o){var s,c,l,u,f,e=function(){function e(){defaults={locale:"en",format:"L LTS",minView:"year",maxView:"minute",startView:"year",leftArrow:"&larr;",rightArrow:"&rarr;",monthsFormat:"MMM",daysFormat:"D",hoursFormat:"HH:[00]",minutesFormat:moment.localeData().longDateFormat("LT").replace(/[aA]/,""),secondsFormat:"ss",minutesStep:5,secondsStep:1}}return e.prototype.options=function(e){return o.extend(defaults,e),o.copy(defaults)},e.prototype.$get=function(){return defaults},e}(),a=function(){function e(e,t,n,r,i){this.restrict="A",this.scope={model:"=momentPicker",locale:"@?",format:"@?",minView:"@?",maxView:"@?",startView:"@?",minDate:"=?",maxDate:"=?",disabled:"=?disable",change:"&?"},s=e,c=t,l=n,u=r,f=i}return e.prototype.$inject=["$timeout","$sce","$compile","$document","momentPicker"],e.prototype.link=function(a,e,t){a.template='<div class="moment-picker-container {{view.selected}}-view" ng-show="view.isOpen && !disabled" ng-class="{\'moment-picker-disabled\': disabled}"><table class="header-view"><thead><tr><th ng-class="{disabled: !view.previous.selectable}" ng-bind-html="view.previous.label" ng-click="view.previous.set()"></th><th ng-bind="view.title" ng-click="view.setParentView()"></th><th ng-class="{disabled: !view.next.selectable}" ng-bind-html="view.next.label" ng-click="view.next.set()"></th></tr></thead></table><div class="moment-picker-specific-views"><table ng-if="view.selected == \'year\'"><tbody><tr ng-repeat="fourMonth in yearView.fourMonths"><td ng-repeat="month in fourMonth track by month.month" ng-class="month.class" ng-bind="month.label" ng-click="yearView.setMonth(month)"></td></tr></tbody></table><table ng-if="view.selected == \'month\'"><thead><tr><th ng-repeat="day in monthView.days" ng-bind="day"></th></tr></thead><tbody><tr ng-repeat="days in monthView.weeks"><td ng-repeat="day in days track by day.date" ng-class="day.class" ng-bind="day.label" ng-click="monthView.setDate(day)"></td></tr></tbody></table><table ng-if="view.selected == \'day\'"><tbody><tr ng-repeat="threeHours in dayView.threeHours"><td ng-repeat="hour in threeHours track by hour.hour" ng-class="hour.class" ng-bind="hour.label" ng-click="dayView.setHour(hour)"></td></tr></tbody></table><table ng-if="view.selected == \'hour\'"><tbody><tr ng-repeat="minutes in hourView.minutes"><td ng-repeat="minute in minutes" ng-class="minute.class" ng-bind="minute.label" ng-click="hourView.setMinute(minute)"></td></tr></tbody></table><table ng-if="view.selected == \'minute\'"><tbody><tr ng-repeat="seconds in minuteView.seconds"><td ng-repeat="second in seconds" ng-class="second.class" ng-bind="second.label" ng-click="minuteView.setSecond(second)"></td></tr></tbody></table></div></div>',o.forEach(["locale","format","minView","maxView","startView","leftArrow","rightArrow"],function(e){o.isDefined(a[e])||(a[e]=f[e]),o.isDefined(t[e])||(t[e]=a[e])}),a.momentToDate=function(e){return o.isDefined(e)&&e.isValid()?e.clone().toDate():void 0},a.valueUpdate=function(){a.disabled||(a.value=a.momentToDate(a.valueMoment))},a.limits={isAfterOrEqualMin:function(e,t){return!o.isDefined(a.minDateMoment)||e.isAfter(a.minDateMoment,t)||e.isSame(a.minDateMoment,t)},isBeforeOrEqualMax:function(e,t){return!o.isDefined(a.maxDateMoment)||e.isBefore(a.maxDateMoment,t)||e.isSame(a.maxDateMoment,t)},isSelectable:function(e,t){return a.limits.isAfterOrEqualMin(e,t)&&a.limits.isBeforeOrEqualMax(e,t)},checkValue:function(){o.isDefined(a.valueMoment)&&(a.limits.isAfterOrEqualMin(a.valueMoment)||a.valueUpdate(a.valueMoment=a.minDateMoment.clone()),a.limits.isBeforeOrEqualMax(a.valueMoment)||a.valueUpdate(a.valueMoment=a.maxDateMoment.clone()))},checkView:function(){o.isDefined(a.view.moment)||(a.view.moment=moment().locale(a.locale)),a.limits.isAfterOrEqualMin(a.view.moment)||(a.view.moment=a.minDateMoment.clone()),a.limits.isBeforeOrEqualMax(a.view.moment)||(a.view.moment=a.maxDateMoment.clone()),a.view.update()}},a.views={all:["year","month","day","hour","minute"],formats:{year:"M{1,4}(?![Mo])|Mo|Q|[Ll]{1,4}(?!T)",month:"[Dd]{1,4}(?![Ddo])|DDDo|[Dd]o|[Ww]{1,2}(?![Wwo])|[Ww]o|[Ee]|L{1,4}(?!T)|l{1,4}",day:"[Hh]{1,2}|LTS?",hour:"m{1,2}|[Ll]{3,4}|LT(?!S)",minute:"s{1,2}|S{1,}|X|LTS"},detectMinMax:function(){var r,i;o.forEach(a.views.formats,function(e,t){var n=new RegExp("("+e+")(?![^[]*])","g");a.format.match(n)&&(o.isDefined(r)||(r=t),i=t)}),r=o.isDefined(r)?Math.max(0,a.views.all.indexOf(r)):0,i=o.isDefined(i)?Math.min(a.views.all.length-1,a.views.all.indexOf(i)):a.views.all.length-1,r>a.views.all.indexOf(a.minView)&&(a.minView=a.views.all[r]),i<a.views.all.indexOf(a.maxView)&&(a.maxView=a.views.all[i])}},a.view={isOpen:!1,selected:a.startView,update:function(){a.view.value=a.momentToDate(a.view.moment)},toggle:function(){a.view.isOpen?a.view.close():a.view.open()},open:function(){o.forEach(u[0].querySelectorAll(".moment-picker-container.open"),function(e){((o.element(e).scope().view||{}).close||o.noop)()}),a.view.isOpen=!0},close:function(){a.view.isOpen=!1,a.view.selected=a.startView},title:"",previous:{selectable:!0,label:c.trustAsHtml(a.leftArrow),selectable:!0,set:function(){a.view.previous.selectable&&a.view.update(a.view.moment.subtract(1,a.view.selected).toDate())}},next:{selectable:!0,label:c.trustAsHtml(a.rightArrow),set:function(){a.view.next.selectable&&a.view.update(a.view.moment.add(1,a.view.selected).toDate())}},setParentView:function(){a.view.change(a.views.all[Math.max(0,a.views.all.indexOf(a.view.selected)-1)])},render:function(){var e=a.view.moment.clone().startOf(a.view.selected).subtract(1,a.view.selected),t=a.view.moment.clone().endOf(a.view.selected).add(1,a.view.selected);a.view.previous.selectable=a.limits.isAfterOrEqualMin(e,a.view.selected),a.view.previous.label=c.trustAsHtml(a.view.previous.selectable?a.leftArrow:"&nbsp;"),a.view.next.selectable=a.limits.isBeforeOrEqualMax(t,a.view.selected),a.view.next.label=c.trustAsHtml(a.view.next.selectable?a.rightArrow:"&nbsp;"),a.view.title=a[a.view.selected+"View"].render()},change:function(e){var t=a.views.all.indexOf(e),n=a.views.all.indexOf(a.minView),r=a.views.all.indexOf(a.maxView);t<0||r<t?(a.valueUpdate(a.valueMoment=a.view.moment.clone()),a.view.close()):n<=t&&(a.view.selected=e)}},a.yearView={fourMonths:{},render:function(){var i=a.view.moment.clone().startOf("year"),e=moment.monthsShort();return a.yearView.fourMonths=[],e.forEach(function(e,t){var n=Math.floor(t/4),r=a.limits.isSelectable(i,"month");a.yearView.fourMonths[n]||(a.yearView.fourMonths[n]=[]),a.yearView.fourMonths[n].push({label:i.format(f.monthsFormat),year:i.year(),month:i.month(),class:r?i.isSame(a.valueMoment,"month")?"selected":"":"disabled",selectable:r}),i.add(1,"months")}),a.view.moment.format("YYYY")},setMonth:function(e){e.selectable&&(a.view.update(a.view.moment.year(e.year).month(e.month)),a.view.change("month"))}},a.monthView={days:function(){for(var e=[],t=moment().locale(a.locale).startOf("week"),n=0;n<7;n++)e.push(t.format("dd")),t.add(1,"days");return e}(),weeks:[],render:function(){var n=a.view.moment.month(),r=a.view.moment.clone().startOf("month").startOf("week"),e=(a.view.moment.clone().endOf("month").endOf("week"),r.week()),t=e+5;weeks={},a.monthView.weeks=[];for(var i=e;i<=t;i++)weeks[i]="0000000".split("").map(function(){var e=a.limits.isSelectable(r,"day"),t={label:r.format(f.daysFormat),year:r.year(),date:r.date(),month:r.month(),class:e&&r.month()==n?r.isSame(a.valueMoment,"day")?"selected":"":"disabled",selectable:e};return r.add(1,"days"),t});return o.forEach(weeks,function(e){a.monthView.weeks.push(e)}),a.view.moment.format("MMMM YYYY")},setDate:function(e){e.selectable&&(a.view.update(a.view.moment.year(e.year).month(e.month).date(e.date)),a.view.change("day"))}},a.dayView={threeHours:[],render:function(){var e=a.view.moment.clone().startOf("day");moment.localeData().longDateFormat("LT").replace(/[aA]/,""),a.dayView.threeHours=[];for(var t=0;t<24;t++){var n=Math.floor(t/4),r=a.limits.isSelectable(e,"hour");a.dayView.threeHours[n]||(a.dayView.threeHours[n]=[]),a.dayView.threeHours[n].push({label:e.format(f.hoursFormat),year:e.year(),month:e.month(),date:e.date(),hour:e.hour(),class:r?e.isSame(a.valueMoment,"hour")?"selected":"":"disabled",selectable:r}),e.add(1,"hours")}return a.view.moment.format("LL")},setHour:function(e){e.selectable&&(a.view.update(a.view.moment.year(e.year).month(e.month).date(e.date).hour(e.hour)),a.view.change("hour"))}},a.hourView={minutes:[],render:function(){var e=0,t=a.view.moment.clone().startOf("hour");a.hourView.minutes=[];for(var n=0;n<60;n+=f.minutesStep){var r=Math.floor(e/4),i=a.limits.isSelectable(t,"minute");a.hourView.minutes[r]||(a.hourView.minutes[r]=[]),a.hourView.minutes[r].push({label:t.format(f.minutesFormat),year:t.year(),month:t.month(),date:t.date(),hour:t.hour(),minute:t.minute(),class:i?t.isSame(a.valueMoment,"minute")?"selected":"":"disabled",selectable:i}),e++,t.add(f.minutesStep,"minutes")}return a.view.moment.clone().startOf("hour").format("lll")},setMinute:function(e){e.selectable&&(a.view.update(a.view.moment.year(e.year).month(e.month).date(e.date).hour(e.hour).minute(e.minute)),a.view.change("minute"))}},a.minuteView={seconds:[],render:function(){var e=0,t=a.view.moment.clone().startOf("minute");a.minuteView.seconds=[];for(var n=0;n<60;n+=f.secondsStep){var r=Math.floor(e/6),i=a.limits.isSelectable(t,"second");a.minuteView.seconds[r]||(a.minuteView.seconds[r]=[]),a.minuteView.seconds[r].push({label:t.format(f.secondsFormat),year:t.year(),month:t.month(),date:t.date(),hour:t.hour(),minute:t.minute(),second:t.second(),class:i?t.isSame(a.valueMoment,"second")?"selected":"":"disabled",selectable:i}),e++,t.add(f.secondsStep,"seconds")}return a.view.moment.clone().startOf("minute").format("lll")},setSecond:function(e){e.selectable&&(a.view.update(a.view.moment.year(e.year).month(e.month).date(e.date).hour(e.hour).minute(e.minute).second(e.second)),a.view.change("second"))}},a.picker=o.element('<span class="moment-picker"></span>'),e.after(a.picker),a.contents=e.addClass("moment-picker-contents").removeAttr("moment-picker"),a.container=l(a.template)(a),a.picker.append(a.contents),a.picker.append(a.container),a.views.detectMinMax(),a.limits.checkView(),a.$watch("model",function(e,t){o.isDefined(e)&&(a.valueMoment=moment(e,a.format,a.locale),a.valueMoment.isValid()?(a.view.moment=a.valueMoment.clone(),a.view.update()):a.valueMoment=void 0),a.valueUpdate(a.valueMoment),a.limits.checkValue()}),a.$watch("value",function(e,t){if(o.isDefined(a.valueMoment)){var n=a.model,r=a.valueMoment.format(a.format);r!=n&&s(function(){a.view.update(a.view.moment=a.valueMoment.clone()),a.model=r,o.isFunction(a.change)&&a.change({newValue:r,oldValue:n})})}}),a.$watch("[view.selected, view.value]",a.view.render,!0),a.$watch("[minView, maxView]",function(){a.views.detectMinMax(),a.startView=a.views.all[Math.max(Math.min(a.views.all.indexOf(a.startView),a.views.all.indexOf(a.maxView)),a.views.all.indexOf(a.minView))],a.view.selected=a.startView}),a.$watch("[minDate, maxDate]",function(){o.forEach(["minDate","maxDate"],function(e){o.isDefined(a[e])&&(a[e+"Moment"]=moment(a[e],a.format,a.locale),a[e+"Moment"].isValid()||(a[e+"Moment"]=void 0))}),a.limits.checkValue(),a.limits.checkView(),a.view.render()},!0),u.on("click",function(){a.view.isOpen&&s(a.view.close)}),a.container.on("click",function(e){e.stopPropagation()}),a.contents.on("click",function(e){e.stopPropagation(),a.view.isOpen||s(a.view.open)}),o.element(a.contents[0].querySelector("input")).on("focus",function(){a.view.isOpen||s(a.view.open)})},e}();o.module("moment-picker",[]).provider("momentPicker",[function(){return new e}]).directive("momentPicker",["$timeout","$sce","$compile","$document","momentPicker",function(e,t,n,r,i){return new a(e,t,n,r,i)}])}(window.angular),function(t,n){"function"==typeof define&&define.amd?define(["moment"],function(e){return t.DateRange=n(e)}):"object"==typeof exports?module.exports=n(require("moment")):t.DateRange=n(moment)}(this,function(o){var n={year:!0,month:!0,week:!0,day:!0,hour:!0,minute:!0,second:!0};function i(e,t){var n,r=e,i=t;1!==arguments.length&&void 0!==t||("object"==typeof e&&2===e.length?(r=e[0],i=e[1]):"string"==typeof e&&(r=(n=e.split("/"))[0],i=n[1])),this.start=o(null===r?-864e13:r),this.end=o(null===i?864e13:i)}return(i.prototype.constructor=i).prototype.clone=function(){return o().range(this.start,this.end)},i.prototype.contains=function(e,t){var n=this.start,r=this.end;return e instanceof i?n<=e.start&&(r>e.end||r.isSame(e.end)&&!t):n<=e&&(e<r||r.isSame(e)&&!t)},i.prototype.overlaps=function(e){return null!==this.intersect(e)},i.prototype.intersect=function(e){var t=this.start,n=this.end;return t<=e.start&&e.start<n&&n<e.end?new i(e.start,n):e.start<t&&t<e.end&&e.end<=n?new i(t,e.end):e.start<t&&t<=n&&n<e.end?this:t<=e.start&&e.start<=e.end&&e.end<=n?e:null},i.prototype.add=function(e){return this.overlaps(e)?new i(o.min(this.start,e.start),o.max(this.end,e.end)):null},i.prototype.subtract=function(e){var t=this.start,n=this.end;return null===this.intersect(e)?[this]:e.start<=t&&t<n&&n<=e.end?[]:e.start<=t&&t<e.end&&e.end<n?[new i(e.end,n)]:t<e.start&&e.start<n&&n<=e.end?[new i(t,e.start)]:t<e.start&&e.start<e.end&&e.end<n?[new i(t,e.start),new i(e.end,n)]:t<e.start&&e.start<n&&e.end<n?[new i(t,e.start),new i(e.start,n)]:void 0},i.prototype.toArray=function(e,t){var n=[];return this.by(e,function(e){n.push(e)},t),n},i.prototype.by=function(e,t,n){return"string"==typeof e?function(e,t,n){var r=o(this.start);for(;this.contains(r,n);)t.call(this,r.clone()),r.add(1,e)}.call(this,e,t,n):function(e,t,n){var r=this/e,i=Math.floor(r);if(i===1/0)return;i===r&&n&&i--;for(var a=0;a<=i;a++)t.call(this,o(this.start.valueOf()+e.valueOf()*a))}.call(this,e,t,n),this},i.prototype.toString=function(){return this.start.format()+"/"+this.end.format()},i.prototype.valueOf=function(){return this.end-this.start},i.prototype.center=function(){var e=this.start+this.diff()/2;return o(e)},i.prototype.toDate=function(){return[this.start.toDate(),this.end.toDate()]},i.prototype.isSame=function(e){return this.start.isSame(e.start)&&this.end.isSame(e.end)},i.prototype.diff=function(e){return this.end.diff(this.start,e)},o.range=function(e,t){return e in n?new i(o(this).startOf(e),o(this).endOf(e)):new i(e,t)},o.range.constructor=i,o.fn.range=o.range,o.fn.within=function(e){return e.contains(this._d)},i}),function(e){"use strict";"function"==typeof define&&define.amd?define(e):"undefined"!=typeof module&&void 0!==module.exports?module.exports=e():"undefined"!=typeof Package?Sortable=e():window.Sortable=e()}(function(){"use strict";var T,x,k,E,D,I,h,p,P,M,$,l,r,O,c,a,R,e,m={},i=/\s+/g,N="Sortable"+(new Date).getTime(),g=window,u=g.document,o=g.parseInt,s=!!("draggable"in u.createElement("div")),f=((e=u.createElement("x")).style.cssText="pointer-events:auto","auto"===e.style.pointerEvents),L=!1,_=Math.abs,d=[],F=t(function(e,t,n){if(n&&t.scroll){var r,i,a,o,s=t.scrollSensitivity,c=t.scrollSpeed,l=e.clientX,u=e.clientY,f=window.innerWidth,d=window.innerHeight;if(p!==n&&(h=t.scroll,p=n,!0===h)){h=n;do{if(h.offsetWidth<h.scrollWidth||h.offsetHeight<h.scrollHeight)break}while(h=h.parentNode)}h&&(i=(r=h).getBoundingClientRect(),a=(_(i.right-l)<=s)-(_(i.left-l)<=s),o=(_(i.bottom-u)<=s)-(_(i.top-u)<=s)),a||o||(o=(d-u<=s)-(u<=s),((a=(f-l<=s)-(l<=s))||o)&&(r=g)),m.vx===a&&m.vy===o&&m.el===r||(m.el=r,m.vx=a,m.vy=o,clearInterval(m.pid),r&&(m.pid=setInterval(function(){r===g?g.scrollTo(g.pageXOffset+a*c,g.pageYOffset+o*c):(o&&(r.scrollTop+=o*c),a&&(r.scrollLeft+=a*c))},24)))}},30),b=function(e){var t=e.group;t&&"object"==typeof t||(t=e.group={name:t}),["pull","put"].forEach(function(e){e in t||(t[e]=!0)}),e.groups=" "+t.name+(t.put.join?" "+t.put.join(" "):"")+" "};function v(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(e);this.el=e,this.options=t=V({},t),e[N]=this;var n={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(e.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",ignore:"a, img",filter:null,animation:0,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1};for(var r in n)!(r in t)&&(t[r]=n[r]);for(var i in b(t),this)"_"===i.charAt(0)&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&s,y(e,"mousedown",this._onTapStart),y(e,"touchstart",this._onTapStart),this.nativeDraggable&&(y(e,"dragover",this),y(e,"dragenter",this)),d.push(this._onDragOver),t.store&&this.sort(t.store.get(this))}function G(e){E&&E.state!==e&&(B(E,"display",e?"none":""),!e&&E.state&&D.insertBefore(E,T),E.state=e)}function j(e,t,n){if(e){n=n||u;var r=(t=t.split(".")).shift().toUpperCase(),i=new RegExp("\\s("+t.join("|")+")(?=\\s)","g");do{if(">*"===r&&e.parentNode===n||(""===r||e.nodeName.toUpperCase()==r)&&(!t.length||((" "+e.className+" ").match(i)||[]).length==t.length))return e}while(e!==n&&(e=e.parentNode))}return null}function y(e,t,n){e.addEventListener(t,n,!1)}function w(e,t,n){e.removeEventListener(t,n,!1)}function C(e,t,n){if(e)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(i," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(i," ")}}function B(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return u.defaultView&&u.defaultView.getComputedStyle?n=u.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function A(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,a=r.length;if(n)for(;i<a;i++)n(r[i],i);return r}return[]}function S(e,t,n,r,i,a,o){var s=u.createEvent("Event"),c=(e||t[N]).options,l="on"+n.charAt(0).toUpperCase()+n.substr(1);s.initEvent(n,!0,!0),s.to=t,s.from=i||t,s.item=r||t,s.clone=E,s.oldIndex=a,s.newIndex=o,t.dispatchEvent(s),c[l]&&c[l].call(e,s)}function U(e,t,n,r,i,a){var o,s,c=e[N],l=c.options.onMove;return(o=u.createEvent("Event")).initEvent("move",!0,!0),o.to=t,o.from=e,o.dragged=n,o.draggedRect=r,o.related=i||t,o.relatedRect=a||t.getBoundingClientRect(),e.dispatchEvent(o),l&&(s=l.call(c,o)),s}function H(e){e.draggable=!1}function W(){L=!1}function q(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function z(e){var t=0;if(!e||!e.parentNode)return-1;for(;e&&(e=e.previousElementSibling);)"TEMPLATE"!==e.nodeName.toUpperCase()&&t++;return t}function t(e,t){var n,r;return function(){void 0===n&&(n=arguments,r=this,setTimeout(function(){1===n.length?e.call(r,n[0]):e.apply(r,n),n=void 0},t))}}function V(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}return v.prototype={constructor:v,_onTapStart:function(e){var t=this,n=this.el,r=this.options,i=e.type,a=e.touches&&e.touches[0],o=(a||e).target,s=o,c=r.filter;if(!("mousedown"===i&&0!==e.button||r.disabled)&&(o=j(o,r.draggable,n))){if(l=z(o),"function"==typeof c){if(c.call(this,e,o,this))return S(t,s,"filter",o,n,l),void e.preventDefault()}else if(c&&(c=c.split(",").some(function(e){if(e=j(s,e.trim(),n))return S(t,e,"filter",o,n,l),!0})))return void e.preventDefault();r.handle&&!j(s,r.handle,n)||this._prepareDragStart(e,a,o)}},_prepareDragStart:function(e,t,n){var r,i=this,a=i.el,o=i.options,s=a.ownerDocument;n&&!T&&n.parentNode===a&&(c=e,D=a,x=(T=n).parentNode,I=T.nextSibling,O=o.group,r=function(){i._disableDelayedDrag(),T.draggable=!0,C(T,i.options.chosenClass,!0),i._triggerDragStart(t)},o.ignore.split(",").forEach(function(e){A(T,e.trim(),H)}),y(s,"mouseup",i._onDrop),y(s,"touchend",i._onDrop),y(s,"touchcancel",i._onDrop),o.delay?(y(s,"mouseup",i._disableDelayedDrag),y(s,"touchend",i._disableDelayedDrag),y(s,"touchcancel",i._disableDelayedDrag),y(s,"mousemove",i._disableDelayedDrag),y(s,"touchmove",i._disableDelayedDrag),i._dragStartTimer=setTimeout(r,o.delay)):r())},_disableDelayedDrag:function(){var e=this.el.ownerDocument;clearTimeout(this._dragStartTimer),w(e,"mouseup",this._disableDelayedDrag),w(e,"touchend",this._disableDelayedDrag),w(e,"touchcancel",this._disableDelayedDrag),w(e,"mousemove",this._disableDelayedDrag),w(e,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(e){e?(c={target:T,clientX:e.clientX,clientY:e.clientY},this._onDragStart(c,"touch")):this.nativeDraggable?(y(T,"dragend",this),y(D,"dragstart",this._onDragStart)):this._onDragStart(c,!0);try{u.selection?u.selection.empty():window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(){D&&T&&(C(T,this.options.ghostClass,!0),S(v.active=this,D,"start",T,D,l))},_emulateDragOver:function(){if(a){if(this._lastX===a.clientX&&this._lastY===a.clientY)return;this._lastX=a.clientX,this._lastY=a.clientY,f||B(k,"display","none");var e=u.elementFromPoint(a.clientX,a.clientY),t=e,n=" "+this.options.group.name,r=d.length;if(t)do{if(t[N]&&-1<t[N].options.groups.indexOf(n)){for(;r--;)d[r]({clientX:a.clientX,clientY:a.clientY,target:e,rootEl:t});break}e=t}while(t=t.parentNode);f||B(k,"display","")}},_onTouchMove:function(e){if(c){v.active||this._dragStarted(),this._appendGhost();var t=e.touches?e.touches[0]:e,n=t.clientX-c.clientX,r=t.clientY-c.clientY,i=e.touches?"translate3d("+n+"px,"+r+"px,0)":"translate("+n+"px,"+r+"px)";R=!0,a=t,B(k,"webkitTransform",i),B(k,"mozTransform",i),B(k,"msTransform",i),B(k,"transform",i),e.preventDefault()}},_appendGhost:function(){if(!k){var e,t=T.getBoundingClientRect(),n=B(T),r=this.options;C(k=T.cloneNode(!0),r.ghostClass,!1),C(k,r.fallbackClass,!0),B(k,"top",t.top-o(n.marginTop,10)),B(k,"left",t.left-o(n.marginLeft,10)),B(k,"width",t.width),B(k,"height",t.height),B(k,"opacity","0.8"),B(k,"position","fixed"),B(k,"zIndex","100000"),B(k,"pointerEvents","none"),r.fallbackOnBody&&u.body.appendChild(k)||D.appendChild(k),e=k.getBoundingClientRect(),B(k,"width",2*t.width-e.width),B(k,"height",2*t.height-e.height)}},_onDragStart:function(e,t){var n=e.dataTransfer,r=this.options;this._offUpEvents(),"clone"==O.pull&&(B(E=T.cloneNode(!0),"display","none"),D.insertBefore(E,T)),t?("touch"===t?(y(u,"touchmove",this._onTouchMove),y(u,"touchend",this._onDrop),y(u,"touchcancel",this._onDrop)):(y(u,"mousemove",this._onTouchMove),y(u,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,50)):(n&&(n.effectAllowed="move",r.setData&&r.setData.call(this,n,T)),y(u,"drop",this),setTimeout(this._dragStarted,0))},_onDragOver:function(e){var t,n,r,i,a,o,s=this.el,c=this.options,l=c.group,u=l.put,f=O===l,d=c.sort;if(void 0!==e.preventDefault&&(e.preventDefault(),!c.dragoverBubble&&e.stopPropagation()),R=!0,O&&!c.disabled&&(f?d||(r=!D.contains(T)):O.pull&&u&&(O.name===l.name||u.indexOf&&~u.indexOf(O.name)))&&(void 0===e.rootEl||e.rootEl===this.el)){if(F(e,c,this.el),L)return;if(t=j(e.target,c.draggable,s),n=T.getBoundingClientRect(),r)return G(!0),void(E||I?D.insertBefore(T,E||I):d||D.appendChild(T));if(0===s.children.length||s.children[0]===k||s===e.target&&(i=e,a=s.lastElementChild,o=a.getBoundingClientRect(),t=(5<i.clientY-(o.top+o.height)||5<i.clientX-(o.right+o.width))&&a)){if(t){if(t.animated)return;p=t.getBoundingClientRect()}G(f),!1!==U(D,s,T,n,t,p)&&(T.contains(s)||(s.appendChild(T),x=s),this._animate(n,T),t&&this._animate(p,t))}else if(t&&!t.animated&&t!==T&&void 0!==t.parentNode[N]){P!==t&&(M=B(P=t),$=B(t.parentNode));var h,p=t.getBoundingClientRect(),m=p.right-p.left,g=p.bottom-p.top,_=/left|right|inline/.test(M.cssFloat+M.display)||"flex"==$.display&&0===$["flex-direction"].indexOf("row"),b=t.offsetWidth>T.offsetWidth,v=t.offsetHeight>T.offsetHeight,y=.5<(_?(e.clientX-p.left)/m:(e.clientY-p.top)/g),w=t.nextElementSibling,C=U(D,s,T,n,t,p);if(!1!==C){if(L=!0,setTimeout(W,30),G(f),1===C||-1===C)h=1===C;else if(_){var A=T.offsetTop,S=t.offsetTop;h=A===S?t.previousElementSibling===T&&!b||y&&b:A<S}else h=w!==T&&!v||y&&v;T.contains(s)||(h&&!w?s.appendChild(T):t.parentNode.insertBefore(T,h?w:t)),x=T.parentNode,this._animate(n,T),this._animate(p,t)}}}},_animate:function(e,t){var n=this.options.animation;if(n){var r=t.getBoundingClientRect();B(t,"transition","none"),B(t,"transform","translate3d("+(e.left-r.left)+"px,"+(e.top-r.top)+"px,0)"),t.offsetWidth,B(t,"transition","all "+n+"ms"),B(t,"transform","translate3d(0,0,0)"),clearTimeout(t.animated),t.animated=setTimeout(function(){B(t,"transition",""),B(t,"transform",""),t.animated=!1},n)}},_offUpEvents:function(){var e=this.el.ownerDocument;w(u,"touchmove",this._onTouchMove),w(e,"mouseup",this._onDrop),w(e,"touchend",this._onDrop),w(e,"touchcancel",this._onDrop)},_onDrop:function(e){var t=this.el,n=this.options;clearInterval(this._loopId),clearInterval(m.pid),clearTimeout(this._dragStartTimer),w(u,"mousemove",this._onTouchMove),this.nativeDraggable&&(w(u,"drop",this),w(t,"dragstart",this._onDragStart)),this._offUpEvents(),e&&(R&&(e.preventDefault(),!n.dropBubble&&e.stopPropagation()),k&&k.parentNode.removeChild(k),T&&(this.nativeDraggable&&w(T,"dragend",this),H(T),C(T,this.options.ghostClass,!1),C(T,this.options.chosenClass,!1),D!==x?0<=(r=z(T))&&(S(null,x,"sort",T,D,l,r),S(this,D,"sort",T,D,l,r),S(null,x,"add",T,D,l,r),S(this,D,"remove",T,D,l,r)):(E&&E.parentNode.removeChild(E),T.nextSibling!==I&&0<=(r=z(T))&&(S(this,D,"update",T,D,l,r),S(this,D,"sort",T,D,l,r))),v.active&&(null!==r&&-1!==r||(r=l),S(this,D,"end",T,D,l,r),this.save())),D=T=x=k=I=E=h=p=c=a=R=r=P=M=O=v.active=null)},handleEvent:function(e){var t=e.type;"dragover"===t||"dragenter"===t?T&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.preventDefault()}(e)):"drop"!==t&&"dragend"!==t||this._onDrop(e)},toArray:function(){for(var e,t=[],n=this.el.children,r=0,i=n.length,a=this.options;r<i;r++)j(e=n[r],a.draggable,this.el)&&t.push(e.getAttribute(a.dataIdAttr)||q(e));return t},sort:function(e){var r={},i=this.el;this.toArray().forEach(function(e,t){var n=i.children[t];j(n,this.options.draggable,i)&&(r[e]=n)},this),e.forEach(function(e){r[e]&&(i.removeChild(r[e]),i.appendChild(r[e]))})},save:function(){var e=this.options.store;e&&e.set(this)},closest:function(e,t){return j(e,t||this.options.draggable,this.el)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];n[e]=t,"group"===e&&b(n)},destroy:function(){var e=this.el;e[N]=null,w(e,"mousedown",this._onTapStart),w(e,"touchstart",this._onTapStart),this.nativeDraggable&&(w(e,"dragover",this),w(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),d.splice(d.indexOf(this._onDragOver),1),this._onDrop(),this.el=e=null}},v.utils={on:y,off:w,css:B,find:A,is:function(e,t){return!!j(e,t,e)},extend:V,throttle:t,closest:j,toggleClass:C,index:z},v.create=function(e,t){return new v(e,t)},v.version="1.4.2",v}),function(e){"use strict";"function"==typeof define&&define.amd?define(["angular","./Sortable"],e):"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?(require("angular"),e(angular,require("./Sortable")),module.exports="ng-sortable"):window.angular&&window.Sortable&&e(angular,Sortable)}(function(h,p){"use strict";var m="Sortable:ng-sortable";h.module("ng-sortable",[]).constant("ngSortableVersion","0.4.0").constant("ngSortableConfig",{}).directive("ngSortable",["$parse","ngSortableConfig",function(l,u){var f,d;return{restrict:"AC",scope:{ngSortable:"=?"},link:function(a,e){var n,o=e[0],i=h.extend(a.ngSortable||{},u),r=[],s=function(e,t){var n=[].filter.call(e.childNodes,function(e){return 8===e.nodeType&&-1!==e.nodeValue.indexOf("ngRepeat:")})[0];if(!n)return function(){return null};n=n.nodeValue.match(/ngRepeat:\s*(?:\(.*?,\s*)?([^\s)]+)[\s)]+in\s+([^\s|]+)/);var r=l(n[2]);return function(){return r(t.$parent)||[]}}(o,a);function t(e,t){var n="on"+e.type.charAt(0).toUpperCase()+e.type.substr(1),r=s();i[n]&&i[n]({model:t||r[e.newIndex],models:r,oldIndex:e.oldIndex,newIndex:e.newIndex})}function c(e){var t=s();if(t){var n=e.oldIndex,r=e.newIndex;if(o!==e.from){var i=e.from[m]();f=i[n],e.clone?(f=h.copy(f),i.splice(p.utils.index(e.clone),0,i.splice(n,1)[0]),e.from.removeChild(e.clone)):i.splice(n,1),t.splice(r,0,f),e.from.insertBefore(e.item,d)}else t.splice(r,0,t.splice(n,1)[0]);a.$apply()}}o[m]=s,n=p.create(o,Object.keys(i).reduce(function(e,t){return e[t]=e[t]||i[t],e},{onStart:function(e){d=e.item.nextSibling,t(e),a.$apply()},onEnd:function(e){t(e,f),a.$apply()},onAdd:function(e){c(e),t(e,f),a.$apply()},onUpdate:function(e){c(e),t(e)},onRemove:function(e){t(e,f)},onSort:function(e){t(e)}})),e.on("$destroy",function(){h.forEach(r,function(e){e()}),n.destroy(),o[m]=null,d=n=r=o=null}),h.forEach(["sort","disabled","draggable","handle","animation","group","ghostClass","filter","onStart","onEnd","onAdd","onUpdate","onRemove","onSort"],function(t){r.push(a.$watch("ngSortable."+t,function(e){void 0!==e&&(i[t]=e,/^on[A-Z]/.test(t)||n.option(t,e))}))})}}}])}),function(l){angular.module("ngCsv.config",[]).value("ngCsv.config",{debug:!0}).config(["$compileProvider",function(e){angular.isDefined(e.urlSanitizationWhitelist)?e.urlSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|data):/):e.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|data):/)}]),angular.module("ngCsv.directives",["ngCsv.services"]),angular.module("ngCsv.services",[]),angular.module("ngCsv",["ngCsv.config","ngCsv.services","ngCsv.directives","ngSanitize"]),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ngCsv"),angular.module("ngCsv.services").service("CSV",["$q",function(n){var t={"\\t":"\t","\\b":"\b","\\v":"\v","\\f":"\f","\\r":"\r"};this.stringifyField=function(e,t){return"locale"===t.decimalSep&&this.isFloat(e)?e.toLocaleString():"."!==t.decimalSep&&this.isFloat(e)?e.toString().replace(".",t.decimalSep):"string"==typeof e?(e=e.replace(/"/g,'""'),(t.quoteStrings||-1<e.indexOf(",")||-1<e.indexOf("\n")||-1<e.indexOf("\r"))&&(e=t.txtDelim+e+t.txtDelim),e):"boolean"==typeof e?e?"TRUE":"FALSE":e},this.isFloat=function(e){return+e===e&&(!isFinite(e)||Boolean(e%1))},this.stringify=function(e,s){var a=n.defer(),c=this,l="",u="",t=n.when(e).then(function(e){var t,n;angular.isDefined(s.header)&&s.header&&(t=[],angular.forEach(s.header,function(e){this.push(c.stringifyField(e,s))},t),n=t.join(s.fieldSep?s.fieldSep:","),u+=n+"\r\n");var r,i,o=[];(angular.isArray(e)?o=e:angular.isFunction(e)&&(o=e()),angular.isDefined(s.label)&&s.label&&"boolean"==typeof s.label)&&(r=[],angular.forEach(o[0],function(e,t){this.push(c.stringifyField(t,s))},r),i=r.join(s.fieldSep?s.fieldSep:","),u+=i+"\r\n");angular.forEach(o,function(e,t){var n,r,i=angular.copy(o[t]);r=[];var a=s.columnOrder?s.columnOrder:i;angular.forEach(a,function(e){var t=s.columnOrder?i[e]:e;this.push(c.stringifyField(t,s))},r),n=r.join(s.fieldSep?s.fieldSep:","),u+=t<o.length?n+"\r\n":n}),s.addByteOrderMarker&&(l+="\ufeff"),l+=u,a.resolve(l)});return"function"==typeof t.catch&&t.catch(function(e){a.reject(e)}),a.promise},this.isSpecialChar=function(e){return void 0!==t[e]},this.getSpecialChar=function(e){return t[e]}}]),angular.module("ngCsv.directives").directive("ngCsv",["$parse","$q","CSV","$document","$timeout",function(e,a,o,s,c){return{restrict:"AC",scope:{data:"&ngCsv",filename:"@filename",header:"&csvHeader",columnOrder:"&csvColumnOrder",txtDelim:"@textDelimiter",decimalSep:"@decimalSeparator",quoteStrings:"@quoteStrings",fieldSep:"@fieldSeparator",lazyLoad:"@lazyLoad",addByteOrderMarker:"@addBom",ngClick:"&",charset:"@charset",label:"&csvLabel"},controller:["$scope","$element","$attrs","$transclude",function(n,r,i){n.csv="",angular.isDefined(n.lazyLoad)&&"true"==n.lazyLoad||angular.isArray(n.data)&&n.$watch("data",function(){n.buildCSV()},!0),n.getFilename=function(){return n.filename||"download.csv"},n.buildCSV=function(){var e,t=a.defer();return r.addClass(i.ngCsvLoadingClass||"ng-csv-loading"),o.stringify(n.data(),(e={txtDelim:n.txtDelim?n.txtDelim:'"',decimalSep:n.decimalSep?n.decimalSep:".",quoteStrings:n.quoteStrings,addByteOrderMarker:n.addByteOrderMarker},angular.isDefined(i.csvHeader)&&(e.header=n.$eval(n.header)),angular.isDefined(i.csvColumnOrder)&&(e.columnOrder=n.$eval(n.columnOrder)),angular.isDefined(i.csvLabel)&&(e.label=n.$eval(n.label)),e.fieldSep=n.fieldSep?n.fieldSep:",",e.fieldSep=o.isSpecialChar(e.fieldSep)?o.getSpecialChar(e.fieldSep):e.fieldSep,e)).then(function(e){n.csv=e,r.removeClass(i.ngCsvLoadingClass||"ng-csv-loading"),t.resolve(e)}),n.$apply(),t.promise}}],link:function(i,e){e.bind("click",function(){i.buildCSV().then(function(){!function(){var e=i.charset||"utf-8",t=new Blob([i.csv],{type:"text/csv;charset="+e+";"});if(l.navigator.msSaveOrOpenBlob)navigator.msSaveBlob(t,i.getFilename());else{var n=angular.element('<div data-tap-disabled="true"><a></a></div>'),r=angular.element(n.children()[0]);r.attr("href",l.URL.createObjectURL(t)),r.attr("download",i.getFilename()),r.attr("target","_blank"),s.find("body").append(n),c(function(){r[0].click(),r.remove()},null)}}()}),i.$apply()})}}}])}(window,document),function(){"use strict";angular.module("ngPassword",[]).directive("matchPassword",function(){return{restrict:"A",require:["^ngModel","^form"],link:function(e,t,n,r){var i=r[1],a=r[0],o=i[n.matchPassword];e.$watch(function(){return o.$viewValue},function(){a.$$parseAndValidate()}),a.$validators?a.$validators.passwordMatch=function(e){return!e&&!o.$modelValue||e===o.$modelValue}:a.$parsers.push(function(e){return a.$setValidity("passwordMatch",!e&&!o.$viewValue||e===o.$viewValue),e}),o.$parsers.push(function(e){return a.$setValidity("passwordMatch",!e&&!a.$viewValue||e===a.$viewValue),e})}}}),angular.module("angular.password",["ngPassword"]),angular.module("angular-password",["ngPassword"]),"object"==typeof module&&"function"!=typeof define&&(module.exports=angular.module("ngPassword"))}(),function(e,k,t){"use strict";function n(h,p){function t(t,n,e,r){var i=r.shift(),a=r.shift();function o(){Array.prototype.some.call(n.find("md-icon"),function(e){return e.classList.contains("md-sort-icon")&&n[0].removeChild(e)}),n.removeClass("md-sort").off("click",f)}function s(){var e;e=k.element('<md-icon md-svg-icon="arrow-up.svg">'),h(e.addClass("md-sort-icon").attr("ng-class","getDirection()"))(t),n.hasClass("md-numeric")?n.prepend(e):n.append(e),n.addClass("md-sort").on("click",f)}function c(){return Array.prototype.indexOf.call(n.parent().children(),n[0])}function l(){return t.orderBy&&(i.order===t.orderBy||i.order==="-"+t.orderBy)}function u(){return""===e.mdNumeric||t.numeric}function f(){t.$applyAsync(function(){l()?i.order="md-asc"===t.getDirection()?"-"+t.orderBy:t.orderBy:i.order="md-asc"===t.getDirection()?t.orderBy:"-"+t.orderBy,k.isFunction(i.onReorder)&&p.nextTick(function(){i.onReorder(i.order)})})}function d(e,t){(a.$$columns[e]=t).numeric?n.addClass("md-numeric"):n.removeClass("md-numeric")}t.getDirection=function(){return l()?"-"===i.order.charAt(0)?"md-desc":"md-asc":""===e.mdDesc||t.$eval(e.mdDesc)?"md-desc":"md-asc"},t.$watch(l,function(e){e?n.addClass("md-active"):n.removeClass("md-active")}),t.$watch(c,function(e){d(e,{numeric:u()})}),t.$watch(u,function(e){d(c(),{numeric:e})}),t.$watch("orderBy",function(e){e?n.hasClass("md-sort")||s():n.hasClass("md-sort")&&o()})}return{compile:function(e){return e.addClass("md-column"),t},require:["^^mdHead","^^mdTable"],restrict:"A",scope:{numeric:"=?mdNumeric",orderBy:"@?mdOrderBy"}}}function r(a){return function(e,t,n,r){if(n&&"object"==typeof n){var i=a(e,t,!0,r);return k.extend(i.instance,n),i()}return a(e,t,n,r)}}function i(v,y,e,w,a,C,o,s,A){var S=27,T=!1,x=k.element(e.prop("body")),c={clickOutsideToClose:!0,disableScroll:!0,escToClose:!0,focusOnOpen:!0};function l(e,t){var n,r,i,a,o,s,c,l,u,f,d,h,p,m,g=C.$new(),_=v(e)(g),b=w.createBackdrop(g,"md-edit-dialog-backdrop");return t.controller?n=function(e,t,n){if(!e.controller)return;e.resolve&&k.extend(n,e.resolve);e.locals&&k.extend(n,e.locals);e.controllerAs?(t[e.controllerAs]={},e.bindToController?k.extend(t[e.controllerAs],e.scope):k.extend(t,e.scope)):k.extend(t,e.scope);return e.bindToController?y(e.controller,n,t[e.controllerAs]):y(e.controller,n)}(t,g,{$element:_,$scope:g}):k.extend(g,t.scope),t.disableScroll&&(r=_,i=w.disableScrollAround(r,x),r.on("$destroy",function(){i()})),x.prepend(b).append(_.addClass("md-whiteframe-1dp")),a=_,o=t.target,s=k.element(o).controller("mdCell").getTable(),c=function(){return a.prop("clientHeight")},l=function(){return a.prop("clientWidth")},u=function(){var e,t={width:l(),height:c()},n=o.getBoundingClientRect(),r="MD-TABLE-CONTAINER"===(e=s.parent()).prop("tagName")?e[0].getBoundingClientRect():s[0].getBoundingClientRect();t.width>r.right-n.left?a.css("left",r.right-t.width+"px"):a.css("left",n.left+"px"),t.height>r.bottom-n.top?a.css("top",r.bottom-t.height+"px"):a.css("top",n.top+1+"px"),a.css("minWidth",n.width+"px")},f=C.$watch(l,u),d=C.$watch(c,u),A.addEventListener("resize",u),a.on("$destroy",function(){f(),d(),A.removeEventListener("resize",u)}),t.focusOnOpen&&(h=_,w.nextTick(function(){var e=w.findFocusTarget(h);e&&e.focus()},!1)),t.clickOutsideToClose&&b.on("click",function(){_.remove()}),t.escToClose&&(p=_,m=function(e){e.keyCode===S&&p.remove()},x.on("keyup",m),p.on("$destroy",function(){x.off("keyup",m)})),_.on("$destroy",function(){T=!1,b.remove()}),n}function u(e){T=!1,console.error(e)}function t(e,n){return{controller:["$element","$q","save","$scope",function(e,t,n,r){this.dismiss=function(){e.remove()},this.getInput=function(){return r.editDialog.input},r.dismiss=this.dismiss,r.submit=function(){(r.editDialog.$invalid?t.reject():k.isFunction(n)?t.when(n(r.editDialog.input)):t.resolve()).then(function(){r.dismiss()})}}],locals:{save:n.save},scope:{cancel:n.cancel||"Cancel",messages:n.messages,model:n.modelValue,ok:n.ok||"Save",placeholder:n.placeholder,title:n.title,size:e},template:'<md-edit-dialog><div layout="column" class="md-content"><div ng-if="size === \'large\'" class="md-title">{{title || \'Edit\'}}</div><form name="editDialog" layout="column" ng-submit="submit(model)"><md-input-container md-no-float><input name="input" ng-model="model" md-autofocus placeholder="{{placeholder}} "'+function(){var e='type="'+(n.type||"text")+'"';for(var t in n.validators)e+=" "+t+'="'+n.validators[t]+'"';return e}()+'><div ng-messages="editDialog.input.$error"><div ng-repeat="(key, message) in messages" ng-message="{{key}}">{{message}}</div></div></md-input-container></form></div><div ng-if="size === \'large\'" layout="row" layout-align="end" class="md-actions"><md-button class="md-primary" ng-click="dismiss()">{{cancel}}</md-button><md-button class="md-primary" ng-click="submit()">{{ok}}</md-button></div></md-edit-dialog>'}}return this.show=function(r){if(T)return a.reject();if(T=!0,!(r=k.extend({},c,r)).targetEvent)return u("options.targetEvent is required to align the dialog with the table cell.");if(!r.targetEvent.currentTarget.classList.contains("md-cell"))return u("The event target must be a table cell.");if(r.bindToController&&!r.controllerAs)return u("You must define options.controllerAs when options.bindToController is true.");r.target=r.targetEvent.currentTarget;var i,e=(i=r,a(function(t,e){var n=i.template;return n?k.isString(n)?t(n):void e("Unexpected template value. Expected a string; received a "+typeof n+"."):i.templateUrl?(n=o.get(i.templateUrl))?t(n):s(i.templateUrl).then(function(e){return t(e)},function(){return e("Error retrieving template from URL.")}):void e("Template not provided.")})),t=[e];for(var n in r.resolve)e=r.resolve[n],t.push(a.when(k.isFunction(e)?e():e));return(e=a.all(t)).catch(u),e.then(function(e){var t=e.shift();for(var n in r.resolve)r.resolve[n]=e.shift();return l(t,r)})},this.small=function(e){return this.show(k.extend({},e,t("small",e)))}.bind(this),this.large=function(e){return this.show(k.extend({},e,t("large",e)))}.bind(this),this}function a(s){function t(t,n,e,r){var i=new Array(2);function a(){n.prop("lastElementChild").firstElementChild.appendChild(s(k.element("<md-checkbox>").attr({"aria-label":"Select All","ng-click":"toggleAll()","ng-checked":"allSelected()","ng-disabled":"!getSelectableRows().length"}))(t)[0])}function o(e){return k.element(e).controller("mdSelect")}t.allSelected=function(){var e=t.getSelectableRows();return e.length&&e.every(function(e){return e.isSelected()})},t.getSelectableRows=function(){return r.getBodyRows().map(o).filter(function(e){return e&&!e.disabled})},t.selectAll=function(){r.getBodyRows().map(o).forEach(function(e){e&&!e.isSelected()&&e.select()})},t.toggleAll=function(){return t.allSelected()?t.unSelectAll():t.selectAll()},t.unSelectAll=function(){r.getBodyRows().map(o).forEach(function(e){e&&e.isSelected()&&e.deselect()})},t.$watchGroup([function(){return r.$$rowSelect},r.enableMultiSelect],function(e){var t;e[0]!==i[0]?e[0]?(n.children().prepend('<th class="md-column md-checkbox-column">'),e[1]&&a()):Array.prototype.some.call(n.find("th"),function(e){return e.classList.contains("md-checkbox-column")&&e.remove()}):e[0]&&e[1]!==i[1]&&(e[1]?a():(t=n.prop("lastElementChild").firstElementChild).classList.contains("md-checkbox-column")&&k.element(t).empty()),k.copy(e,i)})}return{bindToController:!0,compile:function(e){return e.addClass("md-head"),t},controller:function(){},controllerAs:"$mdHead",require:"^^mdTable",restrict:"A",scope:{order:"=?mdOrder",onReorder:"=?mdOnReorder"}}}function o(d,h){return{bindToController:!0,controller:function(){},controllerAs:"$mdSelect",link:function(t,n,e,r){var i=r.shift(),a=r.shift(),o=h(e.mdSelectId);if(i.id=o(i.model),a.$$rowSelect&&i.id)if(a.$$hash.has(i.id)){var s=a.selected.indexOf(a.$$hash.get(i.id));-1===s?a.$$hash.purge(i.id):a.$$hash.equals(i.id,i.model)||(a.$$hash.update(i.id,i.model),a.selected.splice(s,1,i.model))}else a.selected.some(function(e,t){if(o(e)===i.id)return a.$$hash.update(i.id,i.model),a.selected.splice(t,1,i.model),!0});function c(){return""===e.mdAutoSelect||i.autoSelect}function l(){var e;n.prepend((e=k.element("<md-checkbox>").attr({"aria-label":"Select Row","ng-click":"$mdSelect.toggle($event)","ng-checked":"$mdSelect.isSelected()","ng-disabled":"$mdSelect.disabled"}),k.element('<td class="md-cell md-checkbox-cell">').append(d(e)(t)))),c()&&n.on("click",f)}function u(e){i.id&&(a.$$hash.has(i.id)?-1===e.indexOf(a.$$hash.get(i.id))&&a.$$hash.purge(i.id):-1!==e.indexOf(i.model)&&a.$$hash.update(i.id,i.model))}function f(e){t.$applyAsync(function(){i.toggle(e)})}i.isSelected=function(){return!!a.$$rowSelect&&(i.id?a.$$hash.has(i.id):-1!==a.selected.indexOf(i.model))},i.select=function(){i.disabled||(a.enableMultiSelect()?a.selected.push(i.model):a.selected.splice(0,a.selected.length,i.model),k.isFunction(i.onSelect)&&i.onSelect(i.model))},i.deselect=function(){i.disabled||(a.selected.splice(a.selected.indexOf(i.model),1),k.isFunction(i.onDeselect)&&i.onDeselect(i.model))},i.toggle=function(e){return e&&e.stopPropagation&&e.stopPropagation(),i.isSelected()?i.deselect():i.select()},t.$watch(function(){return a.$$rowSelect},function(e){e?l():(Array.prototype.some.call(n.children(),function(e){return e.classList.contains("md-checkbox-cell")&&n[0].removeChild(e)}),c()&&n.off("click",f))}),t.$watch(c,function(e,t){e!==t&&(a.$$rowSelect&&e?n.on("click",f):n.off("click",f))}),t.$watch(i.isSelected,function(e){return e?n.addClass("md-selected"):n.removeClass("md-selected")}),t.$watch(a.enableMultiSelect,function(e){a.$$rowSelect&&!e&&a.selected.splice(1)}),a.registerModelChangeListener(u),n.on("$destroy",function(){a.removeModelChangeListener(u)})},require:["mdSelect","^^mdTable"],restrict:"A",scope:{model:"=mdSelect",disabled:"=ngDisabled",onSelect:"=?mdOnSelect",onDeselect:"=?mdOnDeselect",autoSelect:"=mdAutoSelect"}}}function c(){var n={};this.equals=function(e,t){return n[e]===t},this.get=function(e){return n[e]},this.has=function(e){return n.hasOwnProperty(e)},this.purge=function(e){delete n[e]},this.update=function(e,t){n[e]=t}}k.module("md.table.templates",["md-table-pagination.html","md-table-progress.html","arrow-up.svg","navigate-before.svg","navigate-first.svg","navigate-last.svg","navigate-next.svg"]),k.module("md-table-pagination.html",[]).run(["$templateCache",function(e){e.put("md-table-pagination.html",'<div class="page-select" ng-if="$pagination.showPageSelect()">\n  <div class="label">{{$pagination.label.page}}</div>\n\n  <md-select virtual-page-select total="{{$pagination.pages()}}" class="md-table-select" ng-model="$pagination.page" md-container-class="md-pagination-select" ng-change="$pagination.onPaginationChange()" ng-disabled="$pagination.disabled" aria-label="Page">\n    <md-content>\n      <md-option ng-repeat="page in $pageSelect.pages" ng-value="page">{{page}}</md-option>\n    </md-content>\n  </md-select>\n</div>\n\n<div class="limit-select" ng-if="$pagination.limitOptions">\n  <div class="label">{{$pagination.label.rowsPerPage}}</div>\n\n  <md-select class="md-table-select" ng-model="$pagination.limit" md-container-class="md-pagination-select" ng-disabled="$pagination.disabled" aria-label="Rows" placeholder="{{ $pagination.limitOptions[0] }}">\n    <md-option ng-repeat="option in $pagination.limitOptions" ng-value="option.value ? $pagination.eval(option.value) : option">{{::option.label ? option.label : option}}</md-option>\n  </md-select>\n</div>\n\n<div class="buttons">\n  <div class="label">{{$pagination.min()}} - {{$pagination.max()}} {{$pagination.label.of}} {{$pagination.total}}</div>\n\n  <md-button class="md-icon-button" type="button" ng-if="$pagination.showBoundaryLinks()" ng-click="$pagination.first()" ng-disabled="$pagination.disabled || !$pagination.hasPrevious()" aria-label="First">\n    <md-icon md-svg-icon="navigate-first.svg"></md-icon>\n  </md-button>\n\n  <md-button class="md-icon-button" type="button" ng-click="$pagination.previous()" ng-disabled="$pagination.disabled || !$pagination.hasPrevious()" aria-label="Previous">\n    <md-icon md-svg-icon="navigate-before.svg"></md-icon>\n  </md-button>\n\n  <md-button class="md-icon-button" type="button" ng-click="$pagination.next()" ng-disabled="$pagination.disabled || !$pagination.hasNext()" aria-label="Next">\n    <md-icon md-svg-icon="navigate-next.svg"></md-icon>\n  </md-button>\n\n  <md-button class="md-icon-button" type="button" ng-if="$pagination.showBoundaryLinks()" ng-click="$pagination.last()" ng-disabled="$pagination.disabled || !$pagination.hasNext()" aria-label="Last">\n    <md-icon md-svg-icon="navigate-last.svg"></md-icon>\n  </md-button>\n</div>')}]),k.module("md-table-progress.html",[]).run(["$templateCache",function(e){e.put("md-table-progress.html",'<tr>\n  <th colspan="{{columnCount()}}">\n    <md-progress-linear ng-show="deferred()" md-mode="indeterminate"></md-progress-linear>\n  </th>\n</tr>')}]),k.module("arrow-up.svg",[]).run(["$templateCache",function(e){e.put("arrow-up.svg",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"/></svg>')}]),k.module("navigate-before.svg",[]).run(["$templateCache",function(e){e.put("navigate-before.svg",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>')}]),k.module("navigate-first.svg",[]).run(["$templateCache",function(e){e.put("navigate-first.svg",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7 6 v12 h2 v-12 h-2z M17.41 7.41L16 6l-6 6 6 6 1.41-1.41L12.83 12z"/></svg>')}]),k.module("navigate-last.svg",[]).run(["$templateCache",function(e){e.put("navigate-last.svg",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15 6 v12 h2 v-12 h-2z M8 6L6.59 7.41 11.17 12l-4.58 4.59L8 18l6-6z"/></svg>')}]),k.module("navigate-next.svg",[]).run(["$templateCache",function(e){e.put("navigate-next.svg",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>')}]),k.module("md.data.table",["md.table.templates"]),k.module("md.data.table").directive("mdBody",function(){return{compile:function(e){e.addClass("md-body")},restrict:"A"}}),k.module("md.data.table").directive("mdCell",function(){function n(e,t,n,r){var i=t.find("md-select"),a=r.shift(),o=r.shift();n.ngClick&&t.addClass("md-clickable"),i.length&&(i.on("click",function(e){e.stopPropagation()}),t.addClass("md-clickable").on("click",function(e){e.stopPropagation(),i[0].click()})),a.getTable=o.getElement,e.$watch(function(){return o.$$columns[Array.prototype.indexOf.call(t.parent().children(),t[0])]},function(e){e&&(e.numeric?t.addClass("md-numeric"):t.removeClass("md-numeric"))})}return{controller:function(){},compile:function(e){var t=e.find("md-select");t.length&&t.addClass("md-table-select").attr("md-container-class","md-table-select");return e.addClass("md-cell"),n},require:["mdCell","^^mdTable"],restrict:"A"}}),k.module("md.data.table").directive("mdColumn",n),n.$inject=["$compile","$mdUtil"],k.module("md.data.table").decorator("$controller",r).factory("$mdEditDialog",i),r.$inject=["$delegate"],i.$inject=["$compile","$controller","$document","$mdUtil","$q","$rootScope","$templateCache","$templateRequest","$window"],k.module("md.data.table").directive("mdFoot",function(){return{compile:function(e){e.addClass("md-foot")},restrict:"A"}}),k.module("md.data.table").directive("mdHead",a),a.$inject=["$compile"],k.module("md.data.table").directive("mdRow",function(){function t(e,t,n,r){function i(e){return t[0].contains(e[0])}if(-1!==r.getBodyRows().indexOf(t[0])){var a=k.element('<td class="md-cell">');e.$watch(function(){return r.$$rowSelect},function(e){!e||n.mdSelect?i(a)&&a.remove():i(a)||t.prepend(a)})}}return{compile:function(e){return e.addClass("md-row"),t},require:"^^mdTable",restrict:"A"}}),k.module("md.data.table").directive("mdSelect",o),o.$inject=["$compile","$parse"],k.module("md.data.table").directive("mdTable",function(){function e(e,t,n,r){var i,a=this,o=[],s=[];a.$$hash=new c,a.$$columns={},a.columnCount=function(){return a.getRows(t[0]).reduce(function(e,t){return t.cells.length>e?t.cells.length:e},0)},a.getRows=function(e){return Array.prototype.filter.call(e.rows,function(e){return!e.classList.contains("ng-leave")})},a.getBodyRows=function(){return Array.prototype.reduce.call(t.prop("tBodies"),function(e,t){return e.concat(a.getRows(t))},[])},a.getElement=function(){return t},a.getHeaderRows=function(){return a.getRows(t.prop("tHead"))},a.enableMultiSelect=function(){return""===e.multiple||r.$eval(e.multiple)},a.waitingOnPromise=function(){return!!o.length},a.queuePromise=function(e){e&&1===o.push(k.isArray(e)?n.all(e):n.when(e))&&function e(){if(!o.length)return r.$applyAsync();o[0].finally(function(){o.shift(),e()})}()},a.registerModelChangeListener=function(e){s.push(e)},a.removeModelChangeListener=function(e){var t=s.indexOf(e);-1!==t&&s.splice(t,1)},e.hasOwnProperty("mdProgress")&&r.$watch("$mdTable.progress",a.queuePromise),r.$watch(function(){return""===e.mdRowSelect||a.rowSelect},function(e){e&&(a.selected?k.isArray(a.selected)||console.error("Row selection: Expected an array. Recived "+typeof a.selected+"."):console.error("Row selection: ngModel is not defined."))?(a.$$rowSelect=!0,i=r.$watchCollection("$mdTable.selected",function(t){s.forEach(function(e){e(t)})}),t.addClass("md-row-select")):function(){a.$$rowSelect=!1,k.isFunction(i)&&i();t.removeClass("md-row-select")}()})}return e.$inject=["$attrs","$element","$q","$scope"],{bindToController:!0,compile:function(e,t){if(e.addClass("md-table"),t.hasOwnProperty("mdProgress")){var n=e.find("tbody")[0],r=k.element('<thead class="md-table-progress" md-table-progress>');n&&e[0].insertBefore(r[0],n)}},controller:e,controllerAs:"$mdTable",restrict:"A",scope:{progress:"=?mdProgress",selected:"=ngModel",rowSelect:"=mdRowSelect"}}}),k.module("md.data.table").directive("mdTablePagination",function(){function e(e,t,n){var r=this,i={page:"Page:",rowsPerPage:"Rows per page:",of:"of"};function a(e){return 0<parseInt(e,10)}r.label=k.copy(i),r.eval=function(e){return n.$eval(e)},r.first=function(){r.page=1,r.onPaginationChange()},r.hasNext=function(){return r.page*r.limit<r.total},r.hasPrevious=function(){return 1<r.page},r.last=function(){r.page=r.pages(),r.onPaginationChange()},r.max=function(){return r.hasNext()?r.page*r.limit:r.total},r.min=function(){return a(r.total)?r.page*r.limit-r.limit+1:0},r.next=function(){r.page++,r.onPaginationChange()},r.onPaginationChange=function(){k.isFunction(r.onPaginate)&&t.nextTick(function(){r.onPaginate(r.page,r.limit)})},r.pages=function(){return a(r.total)?Math.ceil(r.total/(a(r.limit)?r.limit:1)):1},r.previous=function(){r.page--,r.onPaginationChange()},r.showBoundaryLinks=function(){return""===e.mdBoundaryLinks||r.boundaryLinks},r.showPageSelect=function(){return""===e.mdPageSelect||r.pageSelect},n.$watch("$pagination.limit",function(e,t){isNaN(e)||isNaN(t)||e===t||(r.page=Math.floor((r.page*t-t+e)/(a(e)?e:1)),r.onPaginationChange())}),e.$observe("mdLabel",function(e){k.extend(r.label,i,n.$eval(e))}),n.$watch("$pagination.total",function(e,t){isNaN(e)||e===t||r.page>r.pages()&&r.last()})}return e.$inject=["$attrs","$mdUtil","$scope"],{bindToController:{boundaryLinks:"=?mdBoundaryLinks",disabled:"=ngDisabled",limit:"=mdLimit",page:"=mdPage",pageSelect:"=?mdPageSelect",onPaginate:"=?mdOnPaginate",limitOptions:"=?mdLimitOptions",total:"@mdTotal"},compile:function(e){e.addClass("md-table-pagination")},controller:e,controllerAs:"$pagination",restrict:"E",scope:{},templateUrl:"md-table-pagination.html"}}),k.module("md.data.table").directive("mdTableProgress",function(){return{link:function(e,t,n,r){e.columnCount=r.columnCount,e.deferred=r.waitingOnPromise},require:"^^mdTable",restrict:"A",scope:{},templateUrl:"md-table-progress.html"}}),k.module("md.data.table").directive("virtualPageSelect",function(){function e(e,t){var n=this,r=e.find("md-content");function i(e,t){return Math.min(e,isFinite(t)&&0<t?t:1)}function a(e){if(n.pages.length>e)return n.pages.splice(e);for(var t=n.pages.length;t<e;t++)n.pages.push(t+1)}n.pages=[],r.on("scroll",function(){r.prop("clientHeight")+r.prop("scrollTop")>=r.prop("scrollHeight")&&t.$applyAsync(function(){a(i(n.pages.length+10,n.total))})}),t.$watch("$pageSelect.total",function(e){a(i(Math.max(n.pages.length,10),e))}),t.$watch("$pagination.page",function(e){for(var t=n.pages.length;t<e;t++)n.pages.push(t+1)})}return e.$inject=["$element","$scope"],{bindToController:{total:"@"},controller:e,controllerAs:"$pageSelect"}})}(window,angular),angular.module("angular-toasty",[]),angular.module("angular-toasty").directive("toasty",["toasty","$timeout","$sce",function(e,g,_){return{replace:!0,restrict:"EA",scope:!0,link:function(f,e,t){var d=0,h=["default","material","bootstrap"];function p(n){n?angular.forEach(f.toasty,function(e,t){e.id==n&&(f.$broadcast("toasty-cleared",f.toasty[t]),e.onRemove&&angular.isFunction(e.onRemove)&&e.onRemove.call(f.toasty[t]),f.toasty.splice(t,1),f.$$phase||f.$digest())}):(angular.forEach(f.toasty,function(e,t){e.onRemove&&angular.isFunction(e.onRemove)&&e.onRemove.call(f.toasty[t])}),f.toasty=[],f.$broadcast("toasty-cleared"))}function m(e,t,n){return 0!=t[n]&&(!!t[n]||e[n])}f.position="",f.toasty=[],f.$on("toasty-new",function(e,t){var n=t.config,r=t.options;f.position||(f.position="toasty-position-"+n.position),function(e,t){d++;var n,r=m(e,t,"sound"),i=m(e,t,"showClose"),a=m(e,t,"clickToClose"),o=m(e,t,"html"),s=m(e,t,"shake");n=t.theme&&-1<h.indexOf(t.theme)?t.theme:e.theme;f.toasty.length>=e.limit&&f.toasty.shift();r&&document.getElementById("toasty-sound").play();var c={id:d,title:o?_.trustAsHtml(t.title):t.title,msg:o?_.trustAsHtml(t.msg):t.msg,showClose:i,clickToClose:a,sound:r,shake:s?"toasty-shake":"",html:o,type:"toasty-type-"+t.type,theme:"toasty-theme-"+n,onAdd:t.onAdd&&angular.isFunction(t.onAdd)?t.onAdd:null,onRemove:t.onRemove&&angular.isFunction(t.onRemove)?t.onRemove:null,onClick:t.onClick&&angular.isFunction(t.onClick)?t.onClick:null,onAccept:t.onAccept&&angular.isFunction(t.onAccept)?t.onAccept:null,onReject:t.onReject&&angular.isFunction(t.onReject)?t.onReject:null};f.toasty.push(c),t.onAdd&&angular.isFunction(t.onAdd)&&t.onAdd.call(c);f.$broadcast("toasty-added",c),0!=t.timeout&&(t.timeout||e.timeout)&&(l=f.toasty[f.toasty.length-1],u=t.timeout||e.timeout,l.timeout=g(function(){p(l.id)},u));var l,u}(n,r)}),f.$on("toasty-clear",function(e,t){p(t.id)}),f.close=function(e){p(e)},f.clickToasty=function(e){f.$broadcast("toasty-clicked",e),e.onClick&&angular.isFunction(e.onClick)&&e.onClick.call(e),e.clickToClose&&p(e.id)}},template:'<div id="toasty" ng-class="[position]"><audio id="toasty-sound" src="data:audio/wav;base64,UklGRiQ9AABXQVZFZm10IBAAAAABAAEAIlYAAESsAAACABAAZGF0YQA9AAA4AFAASABAADgAQAAwACgAGAAoADAAIAAoADgAKAAgACAAKAA4ADgAMABIADgAQABIAFAAWABQAHAASABYAFAAUAA4AEAAMAAwADgAQABQAFAASABYAFgAaABwAHgAeABoAGgAaABoAGgAUABQAFAAWABQAEgASAA4AEAAOAAgADAAMABIAEAAOABAADAAQAAwADgAKAAwACAAIAAwACAAIAAwACgAGAAQABAAAAD4//D/2P/o/+j/8P/o/+D/0P/Y/9D/2P/I/8D/yP/g/8j/0P/Y/+j/2P/w/9D/2P/A/8D/yP/A/9D/yP/A/9D/0P/I/8j/yP+4/9j/6P/g/+D/2P/Y/+D/4P/Y/9j/4P/o/+j/0P/g/+D/4P/o/+D/4P/g/9D/4P/g/+D/4P/w/wAAIAAwABgAMABAADAAOAAwADAAKAAwADgAIAAYACAAAAAAAAgAIAAIABAACAAgACAAIAAgAAgAEAAIAAAAAAAAAOj/8P8AAAAA+P/4//j/+P/o/+j/6P/g/+j/+P8AAPD/6P/o//D/2P/o/9D/4P/w/+j/4P8IABAAAAAQABgAAAAAAAgAAAAAAPj/8P/w//D/6P/4//D/+P8AAPj/AAAAAAgACAD4//j/CAAAAPj/CAAAAAAAAAAQABgAIAA4ADgAMABIAEgAOAAwAFAAOABAAEAASABIAEAAOAAgACgAGAAwACAAKAAwADgAMAA4ADgAQABAADAAKAAYAPj/6P/4/+j/4P/I/8D/uP+w/8D/uP+o/7j/qP/A/9j/qP/I/9j/wP/A/8D/4P/g/9j/2P+4/8D/wP+w/9D/wP/Q/9j/0P/Q/8D/2P/I/9j/6P/o/+j/+P/o//j/AAAAAAgAEAAIAAAAAAAIAAgAEAAYABAACAAgACAAAAAYADgAMABIAEAAKAA4ADAASABQAFAAUABYAEAAKAAQAAgAEAAQACgAGAAYABgAGAAgACAAMAAgADgAMAAwADgAMABIAEAASAAoAEgAQABYADAAUABQADgAMAAoACgAOABAAEAAMAAoACgAIAAgACAAOAAwACgAKAAoADAAKAAwACAAIAAYADAAKAAgACgAIAAQABgAGAAIAAgAAAAIAAAAAAD4//j/EAAYAAAAAAAQAPD/GAAgABAAEAAYACAAOABIAEAAMABAACgAKAAoAAgAEAAgABgACAAQAAgAEAAgAAgAAAAAABgACAAYABAACAAQAAAAAAAQAAgA+P/w/+j/4P/w/+D/6P/o//D/2P/g/9D/6P/o/8D/wP+w/7j/0P/I/9D/wP/g/9j/6P/g/+D/2P/Y/9D/2P/g/9j/0P+w/6j/4P/Y/9j/2P/Y/9D/0P/A/8D/8P+w/8D/uP/A/8j/0P/Q/9D/0P/w//D/2P/g/+D/6P8AAPD/6P/g/+j/6P/Q/+D/4P/4/+j/+P/o/+D/8P/4/wAAAAD4//j/6P/Y/9D/yP/g/+j/2P/Y/9j/yP/Q/9D/yP/Q/9D/yP+4/6D/qP+g/7j/sP+4/8D/yP/Y/8D/wP/Q//D/0P/g/8j/wP/A/7j/qP+w/7D/sP+w/6j/sP+w/7j/uP/A/8D/2P/A/+D/6P/o/+j/4P/Y/+j/2P/Q/9j/4P/o//j/EAAAAAgA+P/4//D/AAAAAAAAAAD4//j/8P/4/wAAIAAQACAAEAAIABgACAAQADAAKAAgACAAMABAAEgAMAAwAFgAWABgAFgAQABIAFgAYABYAGgAUABwAEgAQABAADgAOAA4ADgAMAAgACgAKAAoACgAMAAoACAAEAAQABAACAAIAAAAAAD4/wAAEAAIAPj/6P/Y//D/AAAAAOj/4P/w//j/8P8IAPj/EAAAAPj/6P/4/+D/4P/Y/9j/2P/g//D/8P/o/+D/6P8gABAACAD4/yAAIABAADgAMAA4ADgAIAAQACAAIAAgADAAKAAwAEgAOAA4AEAAQABIAEAAMABAAEAAMABQADAAYABAAEgAQABQADAAUABYABgAQABAAEAAKABIADAAIAAYABgAAAAgACAAGAAgAAgAGAAAAAgACAAQABAACAAQAPD/IAAoAPD/CAAgAPj/4P/w//D/+P/g/9j/2P/Y/9j/6P/I/6j/4P/Y/+D/0P/A/8D/yP/A/8D/2P8AAPD/CAAAAAAAGAAQAOj/GAAoAPD/GAAYAPD/IAAgAOj/GAAgAAAACABQACgAEABQADAAKADw//j/+P8IABAAGAAYADgAEAD4/8D/2P8AAFAAKAAoAPj/8P8QAOj/6P/Q/7j/iP+I/7j/8P8oAPj/aP9w/5j/+P8YAAAACAB4/5j/CAAQAOj/GADg/1D/uP8oAHAAKADw/4D/sAAwABAA4P9I/2j/AACAAXAAiABo/zAAMAAA/+D9EP7w/2AAKAGAAOAAiP8YAFD/YP5I/7j+mP2g/jAAIAPQAYAAMP/Y/8D/SP6g/ID9yP/QAYgCiAGQAMgAKAD4/0j+CP9g/ij9AP+QAAACQAAwADAAmP8gATD/cP6Y/rD/gADA/7j8iP04/WD/QAEYATD+yP9g/Lj8WP/I/tAAIP6I/wj+uP8IAagA8P9g/gj+cAOw/dD+QADYAYgDSP8QAhj8uP5wAXj+wAMIAfgBsP+w/7gBmAMwA4AAmAC4AAj/SP0IAegEoAWw/lD7iPrY/IACuP+QA4gEqAgAACj4CAFQ+9gB8P9wAjgDOP5QBbgCSAfgAfD/IP+Y/qgFmACIAsAEIP0wBTAAeAGo/OgFWP2oDrADoAZAAqgK+P5ACsgBCALwD0AL0AlwBhgCiP9o/dj7+AJg/6AEWAXICej7KADYAjgCEP94B4j4SAEY/yAAWP4Y/8D8QACIAYgDUP4w/fj98AEYANgDGAIoAJD90AcIBXgC4AeYB+D9OP0Q+IAAWAKQCPgFsAZI/AADmPxQBKD/kABIAcAFqP+IBnAH4AQoApgSYP4QDmjvwAGgBdgCiAJw+wgDAAE4B6gT8P6wB9D78AdQCbj/aACo/oAAWPtYAvj/IPug+MgDQAJQA7D7EPdI/yD2uPSg+dDyyPWw7pjysOvY9vjugO8Y6ZjfeOZw62jkgOXA4ijgsOSw4dDdKOBY1QjTMNUg1GDciNfY0ADbUNhA29DUqNQY3HDe4Ncg1QjVoND41aDUcNno2QDWYNdw2tDjUOEA5QDpoO3Y70D46PFY8vj3iP4QBRgBAAiADVAP6BDIFogfqCHQKTgzcDGgNfg48EPQRzBGCEvQUMhQ4FLgV2BZ8FpAUnBVUFhgUehRCFDYUShKeEMYQhg9uDCAMfgrACUwG8AUcBXYDBAGuALA/oD0mOt451jlyOAg3vDaQNhw1BDRgNBgzVDOIM+Y04jR0NJA0pDY0N0g3rjlUOow7tDt4PdA/agACASYCGAOSBHgEhAX8ByQH1AneCd4KbApACqALhAv+C4gMLgvuC/4MPgqyCmIJRgfAB2QGTgTyA6QCjgHcAK4+oj4MPHI7BDrYOgg4fjcSNrg1zDUINHAz2jNuMqAybjJaMewydjJYM7wz4DSgNRQ2XjciOP46ODrmPCg9UD5SP1YAcAE4AqYDDgSUBPAGKgb4BqYHiAg6CFoIFAj8CNgIvggoCBoHqAawBUwEygQMAtoB2gCYP6Y+Pj3APFA7UDqeOfw4qDeQN7I2nDYWNUQ1qjRCNJg0KjRANKQ1NDWGNfo2qDckN/44NjnyOuY8LD1OPvI/lgEAAegCqgOwBGoGFgZKB6IH3Ak8CHYJgAnqCh4KZgpACqQJ8gnICdQJUghuCDQHFAYMBPgD+gMaAfoBQgB2PwQ+LD1OPLo7kDsOOwo6ojn4OYw5vDj4OO45CDk2OSQ5MDnuOlI7SjukO9Q8yD2cPuY/LgBoAQAB0ALUA4wEVgTMBUQF9AYUBloG2ga+BlwGzgamBlIF3gWSBQoE7ARQBHADfAJaAdQA+AAaP14+iD2WPKQ8fjsCOuI6EDmqOM44ujhyOAQ30DgIOIg4tDiyOPA5ODlgOgw60DsIO+Y8hD22PmY+xD/cAB4AhgHoAgoDKAOOBIgFNAVOBcAGPAWgBewF/AWCBeQF7gUuBMAEuAPGA2ACfgJUAd4BWADKALg/pD6APo49sjz+PAg8PjtMO7Q7mjtEOpg6xjs2Ozg7MDtMO9A8HDySPQ49oD3iPpI/KD+QAEwBMgFaAjIC7gNAA4gDrAQCBGQEtATABVAFHgUgBR4E5gR4BB4DwgNAAzwCQAHUAQQA/gAeP5w/ID6IPcY9Yj0cPIY8RDu6O3g6jjrMOqY6SDpMOo462DsqO5g7uDvmO+A8nj0OPbo+GD7wP4QAbgDGAUYBkAJQAzIDbAQaBE4FMgTWBa4FogWABZAFiAXGBbIFfgUgBSoE7gRyA4IDXgKwAjYBUgEsAJo/xj9oPoA+Zj28PXg8xDycPEo8NDuIO1g7CjsqOo46/jrGO0w7WjvSPII80D0CPWo9hD5WPtA/Xj+uABYA+gFcAcQCmgLWAxYDSAQQBHYETgS8BKIEzATGBPwEWARmBGgEEgQUA+4DlANKAuYCegHcAWoA9AB4AA4/xj+aP3w+xD6IPlI95j26PV49qD1wPWA9RD1mPRw9aD10PUo9yD5kPp4+qD7SP1I/pj+eAA4APAAUAK4A3gECAWwBzAGuAfgBuAGUAeQBugGgAYgBqgEkAMIA2ACoAAYAIj/UP/Y/Wj98Psg+wj6CPhY9wD28PUo9cD1iPWY9VD14PT49MD1uPXQ9QD26Pao+Lj4OPqg+6D8oP2I/nAAUAKAA2AF0AbwB3AIMAgwCbAJcAsQCzAM8AzgDDgNSA04DVAMeAswC6AJsAjwBxgHAAY4BQgE8AHQAEgAyP8I/hj9OP3w+3j6EPqw+LD46Peo9tj32PfI+Gj4yPiA+dj5ePqo+kj8cP3I/Sj/WAAwAVgCYAKQBKgEwAUwBuAHuAhQCUgKqAkwCpAJWAmoCOAIaAiwCOAHEAgAB/AFUATQAtAB0P8A/9D9yP1I/MD6EPqI+Ej4KPco9nD20PUg9Sj0kPMA9GDzGPMQ8/DyiPPQ9MD1IPeg95j44PiA+RD6cPqo++D8aP2Y/qD/SABoAegBsAJ4A9ADUAT4BAgFcAVgBTAFuASQBHAE2AOgAzADaAMIAxgCoAEIAFj/wP4g/ij9uPxo/BD8ePvA+kD6uPm4+dD5aPlw+Yj5QPmY+WD50Pkw+jj6APtg+0j8QP0g/gD/OP/Y/xAAkP9oAFAA4AFIAvACCARwBIAEiASIBBgFgAXgBDgG2AUoBhgFSAVoBVgFKAVwBDAEgARYBAAE4ATQA3AEsANIA+ACqALwAhgDIAOwA6AD8AKAAzADMAOoAuACGAM4A3gDMANQA5gDCAQABLgEgAVoBQgGeAWgBfAEgARgBPADuANgA3gDgAP4A3ADUAMYA2gC8AFwAdgAWAAAAPj/oP8g/0j+yP2g/Xj9KP1Q/Bj9mPxA/Cj8WPzQ+6D7kPuo+1D7mPvg+1j8aP2A/Wj9UPwg/BD8gPwY/aj9SP6o/sj+gP6g/qj+gP5A/zj/mP+w/xD/QP9o/nj+IP7A/dD9yP3w/Rj+2P34/eD9SP3I/JD8GPz4+0D8EPwo/Cj8+PuQ+9D7cPsQ+8j7+Ptg/Aj8YPzI/PD82PyY/Aj9UP1g/lj+eP8IAEgAOADo/wAAUAAAAXABOAKAApgC6AL4AgADkAMwA/gDAATgA6ADiAOQA6ADSAMgA8gCyAGQAbAB2AGYASABiADwAAgAYP+o/iD+iP2Q/ZD9gP14/eD8iPyo+zj7APtQ+wD7EPsQ+zD7CPv4+nD72PvY+3D8qP2g/eD9cP6w/rj+6P4IAOj/OACYAHgBCALQAngDmAMIBAAE+APYA2AE4ATYBcAF4AWoBTAFUAXYBJAEqAQQBVgFYAXgBHAEiAO4AyADAAPwAhAD4AJYAoACGAKoARgBAAFYADAAmACAAKgAEADQ/yAA8P/A/wAAWACwAEgAuACoACAA4P9gAHAA0ACAAJAAsAAAATABAAF4ARABKAHgAJgAsABwAAABmABQAEAA2P+o/2j/eP+A/1j/WP8Y/4D/KP/Q/tj+uP7Q/pj+oP7A/rD+0P7Y/rD+gP5o/kj+OP64/mj+kP4I/yD/EP9I/4D/sP/Y/ygASAA4AHAAkADgAPAAmACIAKAAwAA4ATgB0AG4AZgBYAE4AcgAsACwAHgAsABYAIgAWABoAPD/sP+o/+j+0P7Y/gD/cP74/Qj+IP6A/Yj9QP0o/VD9cP1Y/ZD9CP3w/CD9+Pz4/PD84Px4/Vj9iP24/Yj9kP3Q/fD9aP7Y/lj/uP/Y/xgAeAB4ALgAMAFgAcgBYAJoApACaAIoAhgCiAJwAkACQAIwAlACQAIYAngCCALQAaAB8AC4AGgAAAD4/+j/UP/4/rj+4P2Q/cj9iP1A/Tj9QP1Y/cj8+Pzo/Mj8EP2I/XD9oP3w/Rj+KP5A/jj+aP7w/lD/yP+AAAgBmAHgAYACwALwAmgDoAMgBFAEgASYBDgEcAQIBfgEAAU4BUAFQAV4BUgFCAW4BGAECARwA+gCoAJgAigCkAEQAXAA6P9o//j+2P5w/hj+cP3A/Gj8KPwI/Nj7mPtA++D6kPp4+tD6uPq4+sD6APvQ+sD6yPpo+wj8CPwQ/Hj8UPzg/Ej9YP1o/dj9SP54/oj+2P5I/zj/eP+Y/5D/sP8QAFgAkACAAHgAWAAYALj/QP84/7j+2P7w/hD/8P6I/nj+gP54/kD+OP4w/kD+aP54/nD+0P6w/hD/GP8o/1D/gP8IAEgA+ABoAbABoAJYA4gD8ANwBNAEMAWIBegF8AX4BRAGeAagBrgGyAaoBoAGQAZABugFqAVgBRgFqARwBMADaAPwApgCwAHYACAAYP9Y/+D+mP4w/sD9KP34/ID8IPwQ/Pj7EPwA/OD7uPuw+4D7APwY/Ej8sPwY/RD9mP0Q/oD+2P7w/rj/0P+IABgBqAHYAUACqALYAvgCCAOIA8ADOATQA9gD+AMABJgDsANIAyADmAJIAgAC0AGgAVABEAFAAMj/OP/A/nD+6P2g/UD98PzA/HD8GPy4+5j7kPt4+zD7OPtI+2j7oPuY++D78Pvw+1j8uPzo/FD9oP0g/mj+uP4w/4j/yP9wABABUAGoAZgB8AEAAgAC6AEwAggCSAJIAiAC0AFYAfgA2ADQAIAAeAD4/6D/WP9A/4j+aP64/aD9cP0I/dj8yPyI/GD8iPww/Cj8EPxI/KD8uPz4/Kj9yP1A/sj+gP/Y/wgAiADQAIABEAKwAmgDIATIBAgFYAXIBSgGsAYoB7gH6AcYCCgIsAeIB1gHIAfIBqgGGAbgBWgF+ASIBNgDMAOIAugBmAGwAOj/KP9I/rD96PxA/JD72PqI+jD6wPmQ+Yj5QPnw+GD4gPiA+MD4MPlo+ej5+PlA+pj68Pqg+zD84PyY/Uj+2P6I/9j/SAD4AJgBAAKIAsACMAOIA9ADOAQYBCAEIAT4AxgEyAOAA3gDOAPAAnAC6AFoAeAAoABAAND/UP/I/ij+wP1o/fj8oPwY/Mj7YPuY+8D7sPug+6D7iPuo+9D76Ps4/LD8SP2o/Sj+cP44/3j/8P+AABABmAEQAsACKAO4A/ADWASIBOgESAVwBdgF6AXIBZgFkAVwBTgFAAUABaAEeAQIBJgDMAPQAmAC0AEwAeAAQAC4/xj/oP74/XD9yPxg/Mj7IPvw+qj6aPoY+uj54PnI+bD5mPl4+Xj5ePn4+Xj6IPsg+6j78PsY/KD8UP0w/rD+iP9AANAAWAEIAsACgAMgBHAE4AQYBdAFQAaoBvgG4AYoBygHSAc4B1AHYAdQB2AHEAfIBiAG2AWQBSAFsAQABHAD2AI4AtABEAGQADAAkP8Q/3D+GP6w/Uj9KP3Y/JD8EPzY+8j7ePu4+6D7uPvo+7D7qPvY++j7OPyY/BD9gP3g/Sj+WP6A/tj+EP+o/+j/OACAAIgA+ABoAcABsAHIAeABIAJQAmACcAJIAlACMAIoAtABeAEwAQgBKAHYAKgAWADY/2D/OP8Y/7D+oP5w/jj+2P3I/aj9gP2I/Vj9EP3Q/PD8+Pw4/XD9eP1Q/Uj9kP2I/fj9SP6Q/rD+uP4A/xj/CP9o/1j/cP9g/4j/eP9w/5j/gP+Y/5j/sP/Q/yAAGAAwAIAAQABQADAAMABgAFgAiACIAFgAYABwAHgAIADQ/9j/IAAgAPj/MAA4AAgA+P/I/6j/yP/I/7j/qP9o/0D/SP8Y/xj/AP/g/qj+cP54/oD+gP64/oj+YP5Q/uD90P0o/nD+qP6Y/uD+GP8g/yj/UP94/+j/EABQALgAAAEQAXgB6AHIAQACUAJwAqgC8AIwA1gDIAMQAygDSANgA5ADoANwA4gDSANQAygDyAKYAlAC6AG4AUAB+AC4AHAA4P+o/xj/yP6I/lj+MP4A/rD9SP3o/KD8iPxQ/DD8KPw4/ED8aPyQ/ID8wPwI/UD9cP24/VD+6P6A/+D/KABYAMgAWAHYATgCsAIQA5AD0AMoBHgE+AQQBWAFiAWwBcgF8AUABhAGoAVoBSgF2ASoBIAEAASoAygDoAIQAlgBsAAoAIj/AP94/hj+cP24/Dj8sPs4+7D6YPr4+fD52Pnw+cj5sPmY+cD56Pko+rD6APt4++j7gPzQ/HD98P2g/ij/2P9QAMAAkAFAAnAC6AKIA+ADaATIBCAFiAWgBfgF4AXwBegFuAWABXAFSAUgBeAEgAQQBHgDCAOQAvgBaAEAAYgAIACY/0j/sP5I/gj+cP34/Lj8aPwI/DD8KPwo/BD8KPwo/Fj8aPyg/Cj9qP1A/pj+8P4I/5D/EACYABABkAH4AWgC+AIoA5AD0AP4AyAEQARoBIgEeASYBFgE+AN4AxAD2AKQApgCCAJQAdgAUAC4/wD/eP7I/SD9aPwA/Ij7GPvY+mj6wPlQ+RD58PjA+LD4wPiQ+Lj46Pj4+Dj5cPng+Wj62PpA++j7aPwA/Yj90P1I/sj+UP/w/6AAMAGoATACwAIYAxgDMAN4A7gDAAQIBPgDwAOwA4ADIAPYArgCQALgAZgBcAEwAbAASACg/xD/uP5A/kD++P0I/uD9qP1w/VD9+PwY/UD9QP2Q/aj94P3w/RD+aP7Y/ij/kP/A/xAAeADQABABcAHAAdAB+AE4AmgCkAKwAtgC+AIIAwADsAKIAnACUAIgAugBiAEwAdgAeAAoAOj/aP/4/qj+eP4o/gD+yP1o/UD9CP3Q/MD8yPwI/XD9WP1Y/Tj9cP2Q/cj9GP5w/vD+QP+I//D/KACAANgAQAG4ASACoALoAkADmAPIA+ADEARYBJAE2AToBBgF+ATwBOAEqASYBJgEYAQYBOADsANYAxgD6AIoAuABmAFgASgB0ACQAFgA+P/Q/4j/QP8Y/wD/2P7g/sD+wP7o/rD+0P7Q/rj+4P4A/zj/UP9o/5D/uP/g//D/AAAQACgASABYAIgAkAB4AJAAoABgACgAGAAIAAAA6P/Y/7D/kP9w/1D/+P6o/lj+OP5I/gD+8P2w/Xj9QP0I/QD9GP0g/UD9eP2Q/Zj9wP3Q/QD+SP6Q/uj+IP+Y/8j/CABIAIgA2AAYAXABoAEQAkACmALYAhgDWAOAA5gDoAOwA7ADyAOwA4ADYAMwA8gCiAJQAhAC+AGYAUgB6AC4AGgA8P+w/2j/CP+4/pD+UP44/vj9gP1Q/Sj9AP3o/Mj88Pzw/AD9CP0g/WD9iP2Y/dj9EP5A/qj+AP8o/5D/8P8gAHgAoADIABgBUAHAAdgBCAIQAjACMAIgAggCEAIIAvAByAGoAWABGAHIAIgAMAD4/8D/eP8o/+j+aP4w/vD9wP1w/Tj98PzQ/MD8sPy4/ID8aPxg/Fj8YPyY/Lj8CP1Y/Yj9qP2w/eD9AP6A/tD+SP9w/9j/EABoAMAAAAEwAVABmAGgAdgB+AEYAgACKAI4AhAC6AHgAegBwAHIAcABmAFAASgB2AC4AJgAcABgAGgASAAIAOj/yP9o/0D/cP9A/zj/OP8Q//j+0P7A/rj+kP5w/nj+gP5g/nj+mP6I/qD+gP6Y/nD+eP6A/mD+cP6I/mj+YP6Q/oD+kP6o/qD+0P6o/tD+2P7g/vj+CP8g/xj/QP9o/8D/4P/w/wAAGABQAHgAsAC4ABABWAGgAdAB+AEIAigCUAJgApgCgAKgAtgC6ALoAgADCAP4AtgCoAJwAkACIALwAeABuAGAATgBKAHIAKAAeAAYAAgAsP9g/xD/oP5w/jD+6P3A/aj9iP1Y/Uj9MP0o/QD9EP1A/Xj9iP2g/bD96P1A/mD+gP6o/tj+CP9Q/6D/GAAwAIAAsADYAPAAMAFwAbgBAAIgAjgCQAIoAkgCWAJoAoACWAJIAmACYAJIAkgCGALwAagBaAFQAVgBEAEAAfgAyACwAIAAWABIAEgAMAAIAMj/uP+Q/5D/oP+o/8j/2P/Y/8D/0P/Q/9D/wP/Q/+D/+P8AAPj/CAAAABAAEAAoAEAAUABYABgACAAIAAgAEAA4ACgAWABoAFgAQAAwAEgAOABIADgAIAD4//j/AAD4/wAAMAAwACAACAAIAAAAAAAYABgACAAIACAAIAA4ADgAWABwAIAAgACIAHgAmACgALAAsACgALgAoACYAKAAmACgALAAmACgAJAAeABwAGgAgABoAEgAMAAgABAA4P/I/6j/kP9Y/0j/GP8Q/wD/0P7Q/pD+gP5o/lD+UP5Q/lj+eP5A/lj+SP44/jj+QP5g/lj+aP6Y/rj+wP74/iD/SP9g/2D/gP+I/7j/wP/Y/+j/CAAIAPD/8P/w/wgA+P/g/9j/2P/A/8D/eP+A/2D/QP9I/0D/CP/o/sj+qP6I/mj+YP44/jj+QP4I/vj9KP44/kj+UP54/oj+sP7Q/vD+MP9Q/4j/wP+g/zAAIACIAKgAAAEgAWABeAFwAbgB0AHgAfABCAIgAjgCQAJAAiACKAIIAugByAGoAbABuAGgAVgBIAEIAcgAkABgAEgAUABIACAA6P/Q/8j/mP94/3D/aP9g/0D/QP9I/yD/OP84/0j/IP9I/0j/aP94/3j/gP+Y/6D/sP+4/9j/6P/g/xAAGAA4ABAAAAAIAAAA+P8QACAAQAAwACgAOAAYADAAKAAIAPj/+P/o/9j/qP/Y/9j/sP+4/5D/kP+w/7D/yP+o/7j/qP+g/8D/4P/Q/8D/yP/w//j/CAAoADAAaAB4AIAAkACIALgAsACoAMAAsACoALAA8ADQAOAA2ADAAKgAmACYAKAAeAB4AGgASABQAGAAaABoAFAAWABgAHAAaABYAFgAeABwAHAAcACQAIAAeACQAJAAcACAAJgAiACwAMgAwADQALgAsADIAMgAyAC4ALgAmACIAIAAcABYAFAAOAAYAAgA8P/o/7j/uP+Q/4D/gP9I/yj/MP8w/wD/+P7Q/qj+kP54/pj+oP6o/qj+eP54/qj+oP64/tj+AP8I/xj/SP84/1j/gP+w/9D/6P8AABAAQABwAIgAsACwAPAAIAFAAVABSAFoAXgBcAGYAagBsAGoAYgBeAGgAYgBcAF4AVgBQAEIAfgAuACAAEAAQAAQAAAAuP+A/0j/OP8I/+D+qP6Y/nD+eP5g/lj+aP5Q/mD+YP5w/nj+mP6w/rj+4P4A/yj/OP9w/5j/mP+o/9j/AAAYAEgAiAB4AKAAuADAALgAAAEgAQABOAEIARAB+ADwAPAA6ADQAMAAqACIAEgAMAAIAPj/6P+w/3j/QP8Y/wj/6P7Y/pj+eP5Y/iD+AP4Y/iD+IP4g/jD+OP5A/kD+MP5A/oj+uP7Y/vD+IP9Q/4D/yP/o/xgAUAB4AKAA2AD4APgAKAFYAZABoAGwAbgBwAHYAdgB4AHwAegB0AGgAYgBeAFQATABGAH4AMgAuABwAGAAGAAAANj/sP+Y/3D/UP8Y//j++P7o/uD+yP7Q/tj+wP7A/sD+wP7w/gj/OP9A/0j/cP+I/7j/+P8QADAASABwAIgAuADYAOgA6ADwAOgA4AAAAfgAIAEwASgBMAE4AQgBEAHwAPAA4ADIAKAAqAB4AGgAGAAIAOj/0P+g/5D/cP9I/0j/QP8g//D+AP8A/+D+8P7Q/uj+8P74/hj/GP8Y/yj/GP8Y/1D/eP+4/7j/0P/A/9D/6P8AACAAKAAwADAAUABYADgAaAB4AFgAWABIAFgAQABQAGgAGAAAAAgAEAD4//j/AADo/9D/wP+o/5D/kP+Q/6D/mP+Q/4j/oP+Q/5D/kP+I/5D/qP+Y/7j/0P/o/wAA8P/o//D/6P/w/wAAEAAIACAACAAoAEgAQABYAFAAUABoAEgASABAACgAGAAoABgAKAA4ACgAIAAIAAgAAADw/+j/+P/w/+j/AAAAAPj/AAAAABgAIAAQACAAQAAoAGgAgACIALAAuADAAOAAAAEwAUgBcAFwAXgBiAGYAZABuAGwAbgBuAGoAaABkAGQAXABYAEoAQAB4ACwAJAAaABQABgA4P+w/3D/KP8Y/9D+oP5w/lD+OP4Q/uD9wP2w/aD9qP2I/Zj9oP2g/cD96P34/TD+UP54/qj++P4o/5D/uP8IAFgAkACwAAABUAGAAcgBEAI4AjgCUAJIAlgCcAJgAlgCOAJAAjACIALgAbABeAFQARAB2ACoAFgAAADQ/6j/WP8Y/7j+iP5Y/gD+wP2g/XD9UP0w/Qj96PzQ/Oj8+Pzw/Pj8CP1A/XD9mP3Q/Qj+QP6A/tD+IP9o/5j/2P8oAHAAoADoADgBSAGIAdAB0AHwARACIAIoAjACSAJAAjgCOAIIAuABqAF4ATgBKAHoALAAeAA4ABgA2P+w/3D/OP8g/+j+wP6Y/pD+cP5g/mj+WP5o/oj+kP7I/vj++P5I/2j/oP/A//D/SACgAMgAAAFAAWgBqAHYAfgBQAJIAlgCcAKAAogCiAKAAngCWAJQAkgCGALoAcABkAFIARAB0ACIAEAA8P+o/1j/CP+w/oD+aP5A/uj9sP2g/Wj9UP1I/Rj9EP0Q/RD9QP0w/WD9mP2Y/dj9KP5Y/pD+6P4w/3D/oP/w/xAAcADAAPgAOAF4AagByAHoARgCKAI4AkgCYAJQAkgCSAIgAgACuAF4AWABKAEIAdAAkABQACgA4P+4/1D/GP+4/nD+WP4Q/tj9mP2Q/XD9WP04/Sj9IP0I/Sj9MP1A/VD9aP2Y/bj9+P0A/lD+gP7Q/vj+QP9w/7j/8P8gAHgAuAAIAUABWAFoAZABmAG4AcgB0AHYAdgB2AG4AagBkAFwAXABUAE4AQgBwACoAHAASAAgAOj/uP+Y/4D/MP/g/uD+wP6Y/oj+aP5Q/kj+UP5Q/mD+cP6I/oj+iP6w/rj+0P7o/iD/KP9Q/4D/mP/Q/+j/EAAwAGgAmACwANgACAEwARgBMAE4AUgBKAFAATgBMAE4ASgBEAEYAfgA+ADoANAA0ADAAKAAkABwAGgAWAAwAPD/6P/Q/+D/4P/w/8j/0P/I/8j/0P/I/+j/8P/o/wAA6P8AAPj/AAAIADAAMAAwADAAQABAAFgAcACQAIAAsAC4ANgAwADgAOAA+ADoANgA2ACwALgAmACIAHgAcABwAGAAWABYAEgASABIAEAASABQAEAAQAAoABgAGAAIAAgAEAD4/wAAAAD4/wAA+P/w/+j/8P8AACAAKAA4AEAAKABYAEgAaABoAGAAeACQALAAkACIAJAAiAB4AIAAiACIAHgAgABwAGAAQAAwACAAIAAoABAAAAD4/wAA6P/Y/9j/wP+g/5j/kP+o/5j/kP+I/6j/mP+w/4j/mP+o/6j/oP+o/8D/qP+4/6j/sP/I/9j/2P/g//D/AAAIABAACAAAAPj/AADo//D/2P+4/6D/mP+o/6j/uP+Y/5D/kP94/3D/eP9w/2D/UP9o/0j/UP9Q/1j/YP94/3D/iP+Q/5j/mP/A/+D/+P8QACAAMAA4AFAAUABwAHgAsADYAOAA6ADwAAgBEAEQAQABOAFAAUABQAFIAVgBUAEoASABCAHgANgAuACgAHgAYAAwAAgA6P+w/3j/UP8w/xj/AP/w/sD+sP6Q/oj+YP5g/mD+SP5g/jj+OP4g/ij+OP44/jj+SP5Y/lj+cP6Q/rD+4P4I/0D/cP+Y/7D/4P8YADAAcACgANAA2ADwAAgBGAE4AWABYAFYAWgBcAFoAWgBSAFQATABIAHoANgAsAB4AJAAkABIAEgAKAAIAPj/wP+Y/5D/eP9o/1D/OP8w/yD/AP8A//D+4P7o/uD+6P74/gD/GP8g/yD/QP9I/2j/iP/A/9j/+P8QABAAIAAQADAAQABAAFgAgACAAJAAmACgAKgAoACoAJAAiACIAHgAaABYAFAAOAAYAAgA+P/Y/8j/uP+Q/3j/YP9I/1D/MP84/zj/KP8Y/xj/EP/o/uj+AP8Q/xD/KP9I/3j/mP+w/8D/0P/g/wAAIAA4AFgAkAC4AMgA4AAQARABGAFIAUgBWAFoAXgBmAGgAagBiAGQAXgBcAFwAVgBUAFIAUABKAEAAfgA0AC4AKgAmACQAHAAaABQAEgAKAAoABAAGAAAAAAACADo//D/0P/A/7j/uP/I/9j/6P/Y//D/+P8IABAAKAAIACgAEAAYABgAKAAYAAAACAAAAAAA+P/o/+D/yP/A/8j/mP+A/2j/cP9I/1D/SP9A/zj/KP8o/wD/+P7g/uj+8P7o/vD++P7o/tD+0P74/uD+8P4A//j+8P4Q/yD/SP9g/3D/cP94/3j/oP+w/8j/6P/4/wgAAAAYABgAGAAwADAAMAAoADAAEAAQAAAAAADo//j/+P/4/+j/8P/4/8j/4P/g/+D/4P/I/9D/yP/Q/9D/2P/Y/9D/uP/Q/8D/2P/A/+D/4P/w//j/8P/4/+j/EAA4ADgASABQAFAASABAADAAOAAYACAAKAAAAPj/CAD4//D/8P/Y/+j/0P/I/8j/oP+Q/5D/cP9g/1D/MP84/zj/OP8o/0j/KP8o/zj/KP9A/1D/SP9o/2j/eP+I/5D/mP+4/+j/4P8IABAAKAA4AFAAeACIAKAAwADIANAA0ADoAOgA+ADwAPgACAEAAfgA6ADYAOAA0AC4AKgAkAB4AGgAWABYAEgAOAAwABgA8P/g/+j/2P+4/8D/uP+4/7j/wP+w/8j/wP+4/8D/yP/g/9j/8P/g//D/+P8AAAAAEAAgADAAKABAAEgAWABgAGAAQABQAFgAWABwAGAAaAB4AFgAUAAwACgAEAAwAAgACAAAAPj/6P/Y/7j/wP+w/5j/kP+Q/5j/mP9w/3D/eP94/2j/gP+Q/6D/2P/Q/+D/8P8AAAAAEAAoAEgAYAB4AKAAqACwANAA4AAAAfgA8ADwAPAAEAEQAQgBEAEIASABAAEAAfgA8AD4AOgA2ADIALAAkACIAHAAYABAAFAAIAAoABAAAADo/9j/2P/I/7D/0P/A/7D/qP+g/6j/oP+w/9D/0P/Y/9j/+P/g/+D/UAB4AHAAeACIAJAAqACYAMAA4AAAATABMAFIATgBGAEoASgBMAEwAVABSAFIATABMAEgAQgBCAEAAdgAyACwAKgAsACQAJAAiABwAGAAOAAoABgAEAD4//j/4P/I/6D/eP9w/2D/UP9Q/0D/IP8w/yD/QP8o/xj/OP8o/xD/GP8g/wj/EP8Y/xj/CP8g/xj/IP8Y/yj/KP8g/xj/IP8Y/wj/GP8o/yD/OP9Q/1D/WP9w/1j/UP9g/2D/YP9Y/2D/aP9w/4j/kP+g/6j/uP+4/6j/oP+w/5j/sP+g/5j/kP+I/3j/cP9g/1j/WP9Y/1D/SP9A/zj/KP8w/zj/OP84/yD/KP8o/yj/KP9A/0j/OP8w/0D/OP9Q/1D/gP9w/4D/aP+A/4j/kP/A/7j/0P/I//D/+P8AABgAMABQAGgAiACQAKgAsACgALgAwADYAPAA6ADgAOgA4ADYAMgAyAC4AMAAwACoAJgAkABwAFgAUABQACgAMAAIABAA+P/g/8D/oP+I/3j/aP9o/2j/YP9A/zj/QP84/0D/UP9Y/1D/aP9o/2j/cP94/5D/kP+Y/7D/sP+4/7D/0P/4/wgAIABAAFgAWABoAIgAgACAAIgAkACQAJAAmACQAJAAiAB4AHAAcABoAFgAUAAwADgAMAAQAAgAAADg/9D/2P/Q/8D/yP+o/6D/iP+I/4j/gP+Q/3j/cP+A/5D/kP+I/5D/mP+o/6j/kP+w/9D/wP/o//D/+P8IABgAIAA4ADgAQABIAFAAUABQAGgAkABwAHAAcABoAHAAWABgAFAAOABAADAAIAAYADAAKAAgADAAIAAYAAAAAADo/wAA+P/4/+j/4P/A/7j/sP+Y/6D/sP+w/8D/wP/Q/9D/0P/Q/9D/2P/g//j/AAAgADAAQABAAGAAeACAAJgAwADAAOAAyADgAMAA6ADgANAA8ADoAAAB+AAIAdgAyADoAOgA2ADYAMgAwAC4AKgAqACQAHgAaABQAEAAKAAYAAgAAAAAAOD/uP+w/7D/oP+Y/5j/gP+A/3j/aP9w/3D/SP9g/2j/YP9g/2j/eP9w/3j/eP9w/3D/iP+Q/5D/mP+4/7j/wP/I/+j/6P/4/wAAAAAIABAAAAAIADAAOAAwAEgAQABIAFAASABQAGgAWABIAEgAUABYAFgAQAAoABgACAAQAPD/2P/Q/+D/yP/A/7j/uP/A/8D/sP+4/6j/oP+Y/4j/mP+Q/4D/gP+A/3j/iP+I/5j/oP+g/7D/yP/Y/+D/4P/g//D/+P8AAAAA6P8QAAAA+P8YABgACAAQACAAGAAYACAAKAA4AEgAUABYAGgAUAA4AEgASABAAEgAQAAoACgAMAAgABAAGAAwADAAIAAQACAAGAAwADgAKAAoADAAIAAYABgAIAAIABAACAAYAAAACAAoACgAMABAADgAUABIAFgAaABoAHgAeABwAGgAUABAADgAKAAwACAAGAAgABgACAAQACAAIAAgADAAQABAAFAAUABQAFAASABIADgAOAAwAEAAOABAACgAIAAgACgAKAAoADAAMAAYADAAMABAAEAAOABQAGgAaABwAIAAcABoAHAAYABIAFgAQABgAFAAcABwAHgAeABwAIAAiAB4AHAAaABoAEAAWABIACgAMAAgACAAAAAAAOj/6P/Q/+j/yP/A/7D/qP+g/4j/iP94/3D/aP9o/3D/OP8w/zj/GP8o/0D/MP9A/0D/OP8w/yj/OP9A/0j/UP9A/2D/WP9o/3j/gP9w/6D/mP+o/7j/qP+4/7D/2P/A/+D/yP/Q//D/6P/o/+D/AAD4/wgAKAAgADgAKAAgACgAMAAoACgACAAAABgAAAAIAAgACAAAAPD/AADw/9j/4P/Q/8j/0P+w/7j/sP+w/5j/iP9w/3D/YP9Y/1j/UP84/yj/IP9I/1j/WP9w/3D/cP+I/4j/eP+Q/4j/oP+w/6j/uP+4/7D/0P/Y//D/AAAIABAAIAAwAEAASABwAHgAcAB4AJAAmACIAIAAcABgAFAAYAAwADAAQAAgAAgACAD4//D/0P/Q/8D/qP+Y/4j/aP9w/2j/YP9A/yD/IP8I//D+GP8I/wj/AP8I/xD/KP9A/0j/UP9Y/3j/eP+Q/6j/yP/Q//D/AAAAADAAQABIAFAAaACIAJgAsAC4ANAA2ADgANAA2ADoAOgAyADQAMAAsACYAIgAgACIAIAAaABgAEgAKAAQAAAA+P/w/+D/wP+4/6D/mP+A/4D/UP9Q/0D/UP9A/xj/IP8g/yD/KP8g/zD/QP9A/0j/YP9w/4D/kP+Y/7D/wP/Q/+D/+P8AAAgAGAAoADgAUABQAGAAcACAAIgAiACIAJgAgACIAJAAiACYAJgAoACIAIgAkACIAHgAcABwAGAAWABAADgAKAAwACAAQAAoACAAKAAYACgAIAAwADAAKAAgADgAIAAgAEAAMABYAFgAaABoAGgAgACAAHAAaACAAHgAiABoAGgAeABgAGgAiABwAGgAQABAACAAIAAQAAAACAAIAAAA6P/Y/9D/4P/Y/8D/0P+4/7D/sP+o/5j/eP9w/0j/UP9I/0j/MP9Y/1j/aP+I/3j/kP+Y/5j/qP/A/8D/wP/Y//j/8P8QABAACAAgABAAEAAgADAAMABIAGAAYABYAFgAaABoAGgAaABoAFAAaABQAFgAUAAwADAAIAAgABAACAAYABAAAAAAAAgA+P8IAPj/CADw/+D/AAAAAAAAAAAYAAgAAAAAAAAAAAD4//j/AAAAAPj/8P/w//D/8P/w/wAACAAQAAAA8P/w//D/4P/w/+D/2P/o/8D/2P/g/7j/0P+w/8D/qP/A/7D/sP+o/7j/uP/I/8j/yP/Y/9j/0P/I/8j/4P/o//j/+P8QAAgAGAAYACAAEAAgAEAASABIAEgAUABgAGAAcABYAFgAaABQAEgAWABIAFgAWABgAFAASABQAEgAQABYAEgAUABYAEgAUAAwADAAOAAYABgAEAAAAPj/+P/4/+D/wP/A/7D/qP+w/6j/sP/Q/8j/2P/g/+D/AAAAAPj/+P8IAPD/AAAQAAgAAAAYABgACAAQABgAIAAgABgAGAAgACAAKAAwADAAKAAgABgAEAAYAAAA+P/o//D/2P/o/+D/0P/Q/9j/2P/I/+j/4P/w/9D/0P/A/7j/qP+w/5D/qP+Y/7D/sP+o/8D/yP/Y/+D/6P/4/wgAKAAwACgAOABAAEgASABAAEAAQAA4ACgAMABIAEgAUABwAGgAaABoAHgAaABoAGgAYABwAFAAWABQAEgASAA4ACgAOAAwABgAKAAAAAgAAAD4//j/6P/o//D/yP/I/9j/4P/g/9D/yP/I/8j/sP/I/8D/yP/Y/9D/4P/Y/+D/4P/Y//D/+P/g/wAACAAIAPD/EAAgADAAIAAQABAAGAAYABAAEAAwAEgAMAAwAEgAMAA4ACgAMAAgADAAKAAoABgACADw/+D/2P+4/8D/wP+g/5j/mP+o/6D/kP+Q/5j/qP+o/5j/qP+g/7D/qP+g/6D/qP+Y/6j/uP/A/8j/2P/Y/wAA8P/4/wAACAAYABgAIAAoABgAOAA4AEAAYAB4AHAAcABwAHgAeABQAGAAOAAgACgACAAQAAgACAAIAPj/4P/Y/+D/uP+w/7D/qP+Q/5j/kP94/2D/UP9A/1D/SP9I/2D/OP9A/0j/UP9Y/1D/UP9I/2D/aP94/4D/gP+Q/6D/oP+o/6D/qP/I/+D/4P/w/wAACAAQAAgAAAAgACAAMAAwAEAASABQAGgAYABoAHAAaACAAGAAaABQAEgASABAADAAMABAADgAMAAgABAAGAAQABgAIAAoABAAGAAoACAAGAAIAAAAAAAQAAAAAAAIAPD/AAAYAOj/AAAQABAAMAAoABgAMABAAEAAIAA4ADgAQABAACAAKAAYADgAKAA4AEgAOABIAFgAYABgAFgAcABwAIgAiACAAGAAaABwAHAAgABoAGAAeABIAGAAcABYAGgAUABIAFgAUABQAGAAWABgAGAAYABoAEgASABIADAAKAAwACgAIAAYABAACAAIAPj/6P/4/wAA+P/w/+j/AADo/+j/AADY//j/AADw//j/4P/Q/9j/2P/g/8D/uP/Q/8D/uP/I/8D/0P/Q/9D/wP+4/7D/mP+Y/5D/eP9w/2j/cP9g/2j/YP9Q/1j/WP9g/1j/cP94/4D/gP+A/4j/aP9g/2D/UP9o/2j/cP9Y/4D/gP94/4j/kP+Q/6D/sP+4/9j/4P8IAAAAAAAYABgAEAAQABgAKAAwACAAGAAgAEAAMAAwADgAKAAwADgAOAAYADAAGAAgABAAGAAAAAgAAADg/9D/yP/Y/9D/wP+4/8j/2P+4/7D/sP+4/8D/qP+Y/4j/cP9w/3D/cP9w/4j/kP+Y/6D/sP+w/7j/uP/Y/+D/4P8QAAgAIABAAEgAUABgAHAAeAB4AJAAmACoALAAuADAAMgAyADYAMAAuADAALAAoACYAJAAcABwAFAAQAAwABgAAAAQAOj/4P/Y/6D/oP+Y/4D/aP9g/1D/QP9I/1j/SP84/zD/SP9g/2j/cP+A/3j/iP+A/5j/kP+w/8D/4P/4//D/AAAQACAAUABAAFAAWACAAJAAiACIAIgAcAB4AGAAWABoAEgAUABIADAAMAAoACgAGAAQAPD/8P8AAPD/8P/Y/+D/+P/Q/8D/yP+w/7D/sP+w/6j/oP+g/5D/iP+I/5j/qP+o/6j/wP/Y/+D/8P8IACAAMAAoAEAAUABYAGAAcACIAKAAoACIAKgAsACwAKgAqACgALgAsACoAKgAsACgAJgAmACAAIgAYABQAFAASABgAEgASAAoADAAKAAYAAAAEAAYABAAAAAAAAAAAAAQAAgAAAAQAAgAAAAYACgAIAA4AEAAWABoAHAAeACIAIAAiACAAIAAcACAAIgAiACIAIgAeACAAHAAeABoAHgAeABIAEgAKAAoADgAMAAwADAAMAAYAAAAAADo/+j/+P/w//j/8P/g/+j/0P/I/7j/wP/A/7j/sP+w/7D/uP+w/5j/sP+o/7D/sP/A/8j/wP/I/+D/2P/g/+j/0P+4/9D/yP/Q/7j/uP/I/8D/wP+o/5j/gP94/2D/cP9w/4D/aP9w/1j/WP9g/0j/UP9Y/1D/QP9Q/zj/QP8o/zj/QP8w/0D/MP9I/1j/WP9o/2j/YP+A/2j/eP94/2D/aP94/3D/cP+Y/6D/sP+o/8D/uP+4/7j/sP/A/8D/uP+4/5j/uP+g/5j/mP+g/5j/kP+A/5D/iP+g/5j/sP+Y/4j/mP+g/5D/qP+Y/5D/mP+Y/4j/sP+o/7D/wP/Q/9D/0P8AAAgAAAAAACgAMAAwADgAWABYAFAAaABgAGAAUABgAFgA" preload="auto"></audio><div class="toast" ng-repeat="toast in toasty" ng-class="[toast.type, toast.interact, toast.shake, toast.theme]" ng-click="clickToasty(toast)"><div ng-click="close(toast.id)" class="close-button" ng-if="toast.showClose"></div><div ng-if="toast.title || toast.msg" class="toast-text"><span class="toast-title" ng-if="!toast.html && toast.title" ng-bind="toast.title"></span><span class="toast-title" ng-if="toast.html && toast.title" ng-bind-html="toast.title"></span><br ng-if="toast.title && toast.msg" /><span class="toast-msg" ng-if="!toast.html && toast.msg" ng-bind="toast.msg"></span><span class="toast-msg" ng-if="toast.html && toast.msg" ng-bind-html="toast.msg"></span><div layout="row"><span ng-if="toast.onAccept" class="md-button md-raised md-accent" ng-click="toast.onAccept()">ACCEPT</span><span ng-if="toast.onReject" class="md-button md-raised md-warn" ng-click="toast.onReject()">REJECT</span></div></div></div></div>'}}]),angular.module("angular-toasty").provider("toastyConfig",function(){var e={limit:5,showClose:!0,clickToClose:!1,position:"bottom-right",timeout:5e3,sound:!0,html:!1,shake:!1,theme:"default"},t={};return{setConfig:function(e){t=e},$get:function(){return{config:angular.extend(e,t)}}}}),angular.module("angular-toasty").factory("toasty",["$rootScope","toastyConfig",function(n,e){var r=e.config,t=function(e,t){(angular.isString(e)&&""!=e||angular.isNumber(e))&&(e={title:e.toString()}),e&&(e.title||e.msg)?(e.type=t||"default",n.$broadcast("toasty-new",{config:r,options:e})):console.error("angular-toasty: No toast title or message specified!")};return t.default=function(e){t(e)},t.info=function(e){t(e,"info")},t.wait=function(e){t(e,"wait")},t.success=function(e){t(e,"success")},t.error=function(e){t(e,"error")},t.warning=function(e){t(e,"warning")},t.clear=function(e){n.$broadcast("toasty-clear",{id:e})},t.getGlobalConfig=function(){return r},t}]),function(e,n,s){"use strict";var a=n.isDefined,p=n.isUndefined,c=n.isFunction,l=n.isString,u=n.isNumber,m=n.isObject,f=n.isArray,g=n.forEach,o=n.extend,d=n.copy,h=n.equals;function _(t){return f(t)?t:Object.keys(t).map(function(e){return t[e]})}function b(e){return null===e}function r(t,n){return-1==Object.keys(t).map(function(e){return n[e]!==s&&n[e]==t[e]}).indexOf(!1)}function v(e,t){function n(e,t,n){for(var r=0;t+r<=e.length;){if(e.charAt(t+r)==n)return r;r++}return-1}for(var r=0,i=0;i<=t.length;i++){var a=n(e,r,t.charAt(i));if(-1==a)return!1;r+=a+1}return!0}function y(e,n,r){var i=0;return e.filter(function(e){var t=a(r)?i<n&&r(e):i<n;return i=t?i+1:i,t})}function i(e,t){return Math.round(e*Math.pow(10,t))/Math.pow(10,t)}function w(e){return e&&e.$evalAsync&&e.$watch}function t(){return function(e,t){return t<e}}function C(){return function(e,t){return t<=e}}function A(){return function(e,t){return e<t}}function S(){return function(e,t){return e<=t}}function T(){return function(e,t){return e==t}}function x(){return function(e,t){return e!=t}}function k(){return function(e,t){return e===t}}function E(){return function(e,t){return e!==t}}function D(n){return function(e,t){return e=m(e)?_(e):e,!(!f(e)||p(t))&&e.some(function(e){return l(t)&&m(e)||c(t)?n(t)(e):e===t})}}function I(i){return function(e,t){if(e=m(e)?_(e):e,!f(e))return e;var n=[],r=i(t);return p(t)?e.filter(function(e,t,n){return n.indexOf(e)===t}):e.filter(function(e){var t=r(e);return!function(e,t){if(p(t))return!1;return e.some(function(e){return h(e,t)})}(n,t)&&(n.push(t),!0)})}}function P(){return function(e){return l(e)?e.split(" ").map(function(e){return e.charAt(0).toUpperCase()+e.substring(1)}).join(" "):e}}String.prototype.contains||(String.prototype.contains=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),n.module("a8m.angular",[]).filter("isUndefined",function(){return function(e){return n.isUndefined(e)}}).filter("isDefined",function(){return function(e){return n.isDefined(e)}}).filter("isFunction",function(){return function(e){return n.isFunction(e)}}).filter("isString",function(){return function(e){return n.isString(e)}}).filter("isNumber",function(){return function(e){return n.isNumber(e)}}).filter("isArray",function(){return function(e){return n.isArray(e)}}).filter("isObject",function(){return function(e){return n.isObject(e)}}).filter("isEqual",function(){return function(e,t){return n.equals(e,t)}}),n.module("a8m.conditions",[]).filter({isGreaterThan:t,">":t,isGreaterThanOrEqualTo:C,">=":C,isLessThan:A,"<":A,isLessThanOrEqualTo:S,"<=":S,isEqualTo:T,"==":T,isNotEqualTo:x,"!=":x,isIdenticalTo:k,"===":k,isNotIdenticalTo:E,"!==":E}),n.module("a8m.is-null",[]).filter("isNull",function(){return function(e){return b(e)}}),n.module("a8m.after-where",[]).filter("afterWhere",function(){return function(e,t){if(e=m(e)?_(e):e,!f(e)||p(t))return e;var n=e.map(function(e){return r(t,e)}).indexOf(!0);return e.slice(-1===n?0:n)}}),n.module("a8m.after",[]).filter("after",function(){return function(e,t){return e=m(e)?_(e):e,f(e)?e.slice(t):e}}),n.module("a8m.before-where",[]).filter("beforeWhere",function(){return function(e,t){if(e=m(e)?_(e):e,!f(e)||p(t))return e;var n=e.map(function(e){return r(t,e)}).indexOf(!0);return e.slice(0,-1===n?e.length:++n)}}),n.module("a8m.before",[]).filter("before",function(){return function(e,t){return e=m(e)?_(e):e,f(e)?e.slice(0,t?--t:t):e}}),n.module("a8m.chunk-by",["a8m.filter-watcher"]).filter("chunkBy",["filterWatcher",function(o){return function(e,t,n){return o.isMemoized("chunkBy",arguments)||o.memoize("chunkBy",arguments,this,(i=t,a=n,f(r=e)?r.map(function(e,t,n){return t*=i,e=n.slice(t,t+i),!p(a)&&e.length<i?e.concat(function(e,t){for(var n=[];e--;)n[e]=t;return n}(i-e.length,a)):e}).slice(0,Math.ceil(r.length/i)):r));var r,i,a}}]),n.module("a8m.concat",[]).filter("concat",[function(){return function(e,t){if(p(t))return e;if(f(e))return m(t)?e.concat(_(t)):e.concat(t);if(m(e)){var n=_(e);return m(t)?n.concat(_(t)):n.concat(t)}return e}}]),n.module("a8m.contains",[]).filter({contains:["$parse",D],some:["$parse",D]}),n.module("a8m.count-by",[]).filter("countBy",["$parse",function(a){return function(e,t){var n,r={},i=a(t);return e=m(e)?_(e):e,!f(e)||p(t)?e:(e.forEach(function(e){n=i(e),r[n]||(r[n]=0),r[n]++}),r)}}]),n.module("a8m.defaults",[]).filter("defaults",["$parse",function(a){return function(e,i){if(e=m(e)?_(e):e,!f(e)||!m(i))return e;var t=function r(i,a,o){return a=a||[],Object.keys(i).forEach(function(e){if(m(i[e])&&!f(i[e])){var t=o?o+"."+e:o;r(i[e],a,t||e)}else{var n=o?o+"."+e:e;a.push(n)}}),a}(i);return e.forEach(function(r){t.forEach(function(e){var t=a(e),n=t.assign;p(t(r))&&n(r,t(i))})}),e}}]),n.module("a8m.every",[]).filter("every",["$parse",function(n){return function(e,t){return e=m(e)?_(e):e,!(f(e)&&!p(t))||e.every(function(e){return m(e)||c(t)?n(t)(e):e===t})}}]),n.module("a8m.filter-by",[]).filter("filterBy",["$parse",function(o){return function(e,t,r,i){var a;return r=l(r)||u(r)?String(r).toLowerCase():s,e=m(e)?_(e):e,!f(e)||p(r)?e:e.filter(function(n){return t.some(function(e){if(~e.indexOf("+")){var t=e.replace(/\s+/g,"").split("+");a=t.map(function(e){return o(e)(n)}).join(" ")}else a=o(e)(n);return!(!l(a)&&!u(a))&&(a=String(a).toLowerCase(),i?a===r:a.contains(r))})})}}]),n.module("a8m.first",[]).filter("first",["$parse",function(i){return function(e){var t,n,r;return e=m(e)?_(e):e,f(e)?(r=Array.prototype.slice.call(arguments,1),t=u(r[0])?r[0]:1,n=u(r[0])?u(r[1])?s:r[1]:r[0],r.length?y(e,t,n?i(n):n):e[0]):e}}]),n.module("a8m.flatten",[]).filter("flatten",function(){return function(e,t){return t=t||!1,e=m(e)?_(e):e,f(e)?t?[].concat.apply([],e):function e(t,n){n=n||0;if(n>=t.length)return t;if(f(t[n]))return e(t.slice(0,n).concat(t[n],t.slice(n+1)),n);return e(t,n+1)}(e,0):e}}),n.module("a8m.fuzzy-by",[]).filter("fuzzyBy",["$parse",function(s){return function(e,t,n,r){var i,a,o=r||!1;return e=m(e)?_(e):e,!f(e)||p(t)||p(n)?e:(a=s(t),e.filter(function(e){return i=a(e),!!l(i)&&(i=o?i:i.toLowerCase(),n=o?n:n.toLowerCase(),!1!==v(i,n))}))}}]),n.module("a8m.fuzzy",[]).filter("fuzzy",function(){return function(e,a,t){var o=t||!1;return e=m(e)?_(e):e,!f(e)||p(a)?e:(a=o?a:a.toLowerCase(),e.filter(function(e){return l(e)?!1!==v(e=o?e:e.toLowerCase(),a):!!m(e)&&(t=e,n=a,0<Object.keys(t).filter(function(e){return r=t[e],!!i||!!l(r)&&(r=o?r:r.toLowerCase(),i=!1!==v(r,n))}).length);var t,n,r,i}))}}),n.module("a8m.group-by",["a8m.filter-watcher"]).filter("groupBy",["$parse","filterWatcher",function(o,s){return function(e,t){return!m(e)||p(t)?e:s.isMemoized("groupBy",arguments)||s.memoize("groupBy",arguments,this,(n=e,r=o(t),a={},g(n,function(e){i=r(e),a[i]||(a[i]=[]),a[i].push(e)}),a));var n,r,i,a}}]),n.module("a8m.is-empty",[]).filter("isEmpty",function(){return function(e){return m(e)?!_(e).length:!e.length}}),n.module("a8m.join",[]).filter("join",function(){return function(e,t){return p(e)||!f(e)?e:(p(t)&&(t=" "),e.join(t))}}),n.module("a8m.last",[]).filter("last",["$parse",function(a){return function(e){var t,n,r,i=d(e);return i=m(i)?_(i):i,f(i)?(r=Array.prototype.slice.call(arguments,1),t=u(r[0])?r[0]:1,n=u(r[0])?u(r[1])?s:r[1]:r[0],r.length?y(i.reverse(),t,n?a(n):n).reverse():i[i.length-1]):i}}]),n.module("a8m.map",[]).filter("map",["$parse",function(n){return function(e,t){return e=m(e)?_(e):e,!f(e)||p(t)?e:e.map(function(e){return n(t)(e)})}}]),n.module("a8m.omit",[]).filter("omit",["$parse",function(n){return function(e,t){return e=m(e)?_(e):e,!f(e)||p(t)?e:e.filter(function(e){return!n(t)(e)})}}]),n.module("a8m.pick",[]).filter("pick",["$parse",function(n){return function(e,t){return e=m(e)?_(e):e,!f(e)||p(t)?e:e.filter(function(e){return n(t)(e)})}}]),n.module("a8m.range",[]).filter("range",function(){return function(e,t,n,r,i){n=n||0,r=r||1;for(var a=0;a<parseInt(t);a++){var o=n+a*r;e.push(c(i)?i(o):o)}return e}}),n.module("a8m.remove-with",[]).filter("removeWith",function(){return function(e,t){return p(t)?e:(e=m(e)?_(e):e).filter(function(e){return!r(t,e)})}}),n.module("a8m.remove",[]).filter("remove",function(){return function(e){e=m(e)?_(e):e;var n=Array.prototype.slice.call(arguments,1);return f(e)?e.filter(function(t){return!n.some(function(e){return h(e,t)})}):e}}),n.module("a8m.reverse",[]).filter("reverse",[function(){return function(e){return e=m(e)?_(e):e,l(e)?e.split("").reverse().join(""):f(e)?e.slice().reverse():e}}]),n.module("a8m.search-field",[]).filter("searchField",["$parse",function(i){return function(e){var n;e=m(e)?_(e):e;var r=Array.prototype.slice.call(arguments,1);return f(e)&&r.length?e.map(function(t){return n=r.map(function(e){return i(e)(t)}).join(" "),o(t,{searchField:n})}):e}}]),n.module("a8m.to-array",[]).filter("toArray",function(){return function(t,e){return m(t)?e?Object.keys(t).map(function(e){return o(t[e],{$key:e})}):_(t):t}}),n.module("a8m.unique",[]).filter({unique:["$parse",I],uniq:["$parse",I]}),n.module("a8m.where",[]).filter("where",function(){return function(e,t){return p(t)?e:(e=m(e)?_(e):e).filter(function(e){return r(t,e)})}}),n.module("a8m.xor",[]).filter("xor",["$parse",function(a){return function(t,n,r){return r=r||!1,t=m(t)?_(t):t,n=m(n)?_(n):n,f(t)&&f(n)?t.concat(n).filter(function(e){return!(i(e,t)&&i(e,n))}):t;function i(t,e){var n=a(r);return e.some(function(e){return r?h(n(e),n(t)):h(e,t)})}}}]),n.module("a8m.math.abs",[]).filter("abs",function(){return function(e){return Math.abs(e)}}),n.module("a8m.math.byteFmt",[]).filter("byteFmt",function(){var r=[{str:"B",val:1024}];return["KB","MB","GB","TB","PB","EB","ZB","YB"].forEach(function(e,t){r.push({str:e,val:1024*r[t].val})}),function(e,t){if(u(t)&&isFinite(t)&&t%1==0&&0<=t&&u(e)&&isFinite(e)){for(var n=0;n<r.length-1&&e>=r[n].val;)n++;return i(e/=0<n?r[n-1].val:1,t)+" "+r[n].str}return"NaN"}}),n.module("a8m.math.degrees",[]).filter("degrees",function(){return function(e,t){if(u(t)&&isFinite(t)&&t%1==0&&0<=t&&u(e)&&isFinite(e)){var n=180*e/Math.PI;return Math.round(n*Math.pow(10,t))/Math.pow(10,t)}return"NaN"}}),n.module("a8m.math.kbFmt",[]).filter("kbFmt",function(){var r=[{str:"KB",val:1024}];return["MB","GB","TB","PB","EB","ZB","YB"].forEach(function(e,t){r.push({str:e,val:1024*r[t].val})}),function(e,t){if(u(t)&&isFinite(t)&&t%1==0&&0<=t&&u(e)&&isFinite(e)){for(var n=0;n<r.length-1&&e>=r[n].val;)n++;return i(e/=0<n?r[n-1].val:1,t)+" "+r[n].str}return"NaN"}}),n.module("a8m.math.max",[]).filter("max",["$parse",function(a){return function(e,t){return f(e)?p(t)?Math.max.apply(Math,e):e[(n=e,r=t,i=n.map(function(e){return a(r)(e)}),i.indexOf(Math.max.apply(Math,i)))]:e;var n,r,i}}]),n.module("a8m.math.min",[]).filter("min",["$parse",function(a){return function(e,t){return f(e)?p(t)?Math.min.apply(Math,e):e[(n=e,r=t,i=n.map(function(e){return a(r)(e)}),i.indexOf(Math.min.apply(Math,i)))]:e;var n,r,i}}]),n.module("a8m.math.percent",[]).filter("percent",function(){return function(e,t,n){var r=l(e)?Number(e):e;return t=t||100,n=n||!1,!u(r)||isNaN(r)?e:n?Math.round(r/t*100):r/t*100}}),n.module("a8m.math.radians",[]).filter("radians",function(){return function(e,t){if(u(t)&&isFinite(t)&&t%1==0&&0<=t&&u(e)&&isFinite(e)){var n=3.14159265359*e/180;return Math.round(n*Math.pow(10,t))/Math.pow(10,t)}return"NaN"}}),n.module("a8m.math.radix",[]).filter("radix",function(){return function(e,t){return u(e)&&/^[2-9]$|^[1-2]\d$|^3[0-6]$/.test(t)?e.toString(t).toUpperCase():e}}),n.module("a8m.math.shortFmt",[]).filter("shortFmt",function(){return function(e,t){return u(t)&&isFinite(t)&&t%1==0&&0<=t&&u(e)&&isFinite(e)?e<1e3?""+e:e<1e6?i(e/1e3,t)+" K":e<1e9?i(e/1e6,t)+" M":i(e/1e9,t)+" B":"NaN"}}),n.module("a8m.math.sum",[]).filter("sum",function(){return function(e,t){return f(e)?e.reduce(function(e,t){return e+t},t||0):e}}),n.module("a8m.ends-with",[]).filter("endsWith",function(){return function(e,t,n){var r,i=n||!1;return!l(e)||p(t)?e:(r=(e=i?e:e.toLowerCase()).length-t.length,-1!==e.indexOf(i?t:t.toLowerCase(),r))}}),n.module("a8m.latinize",[]).filter("latinize",[function(){for(var e=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"OE",letters:"\8cŒ"},{base:"oe",letters:"\9cœ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],t={},n=0;n<e.length;n++)for(var r=e[n].letters.split(""),i=0;i<r.length;i++)t[r[i]]=e[n].base;return function(e){return l(e)?e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e}):e}}]),n.module("a8m.ltrim",[]).filter("ltrim",function(){return function(e,t){var n=t||"\\s";return l(e)?e.replace(new RegExp("^"+n+"+"),""):e}}),n.module("a8m.match",[]).filter("match",function(){return function(e,t,n){var r=new RegExp(t,n);return l(e)?e.match(r):null}}),n.module("a8m.phoneUS",[]).filter("phoneUS",function(){return function(e){return"("+(e+="").slice(0,3)+") "+e.slice(3,6)+"-"+e.slice(6)}}),n.module("a8m.repeat",[]).filter("repeat",[function(){return function(e,t,n){var r=~~t;return l(e)&&r?function e(t,n,r){if(!n)return t;return t+r+e(t,--n,r)}(e,--t,n||""):e}}]),n.module("a8m.rtrim",[]).filter("rtrim",function(){return function(e,t){var n=t||"\\s";return l(e)?e.replace(new RegExp(n+"+$"),""):e}}),n.module("a8m.slugify",[]).filter("slugify",[function(){return function(e,t){var n=p(t)?"-":t;return l(e)?e.toLowerCase().replace(/\s+/g,n):e}}]),n.module("a8m.split",[]).filter("split",function(){return function(e,t,n){var r,i,a,o;return p(e)||!l(e)?null:(p(t)&&(t=""),isNaN(n)&&(n=0),r=new RegExp(t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),"g"),b(i=e.match(r))||n>=i.length?[e]:0===n?e.split(t):(o=(a=e.split(t)).splice(0,n+1),a.unshift(o.join(t)),a))}}),n.module("a8m.starts-with",[]).filter("startsWith",function(){return function(e,t,n){var r=n||!1;return!l(e)||p(t)?e:!(e=r?e:e.toLowerCase()).indexOf(r?t:t.toLowerCase())}}),n.module("a8m.stringular",[]).filter("stringular",function(){return function(e){var n=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return p(n[t])?e:n[t]})}}),n.module("a8m.strip-tags",[]).filter("stripTags",function(){return function(e){return l(e)?e.replace(/<\S[^><]*>/g,""):e}}),n.module("a8m.test",[]).filter("test",function(){return function(e,t,n){var r=new RegExp(t,n);return l(e)?r.test(e):e}}),n.module("a8m.trim",[]).filter("trim",function(){return function(e,t){var n=t||"\\s";return l(e)?e.replace(new RegExp("^"+n+"+|"+n+"+$","g"),""):e}}),n.module("a8m.truncate",[]).filter("truncate",function(){return function(e,t,n,r){return t=p(t)?e.length:t,r=r||!1,n=n||"",!l(e)||e.length<=t?e:e.substring(0,r?-1===e.indexOf(" ",t)?e.length:e.indexOf(" ",t):t)+n}}),n.module("a8m.ucfirst",[]).filter({ucfirst:P,titleize:P}),n.module("a8m.uri-component-encode",[]).filter("uriComponentEncode",["$window",function(t){return function(e){return l(e)?t.encodeURIComponent(e):e}}]),n.module("a8m.uri-encode",[]).filter("uriEncode",["$window",function(t){return function(e){return l(e)?t.encodeURI(e):e}}]),n.module("a8m.wrap",[]).filter("wrap",function(){return function(e,t,n){return l(e)&&a(t)?[t,e,n||t].join(""):e}}),n.module("a8m.filter-watcher",[]).provider("filterWatcher",function(){this.$get=["$window","$rootScope",function(r,c){var l={},u={},f=r.setTimeout;function d(e,t){return[e,JSON.stringify(t,(n=[],function(e,t){if(m(t)&&!b(t)){if(~n.indexOf(t))return"[Circular]";n.push(t)}return r==t?"$WINDOW":r.document==t?"$DOCUMENT":w(t)?"$SCOPE":t}))].join("#").replace(/"/g,"");var n}function h(e){var t=e.targetScope.$id;g(u[t],function(e){delete l[e]}),delete u[t]}return{isMemoized:function(e,t){var n=d(e,t);return l[n]},memoize:function(e,t,n,r){var i,a,o,s=d(e,t);return l[s]=r,w(n)?(a=s,o=(i=n).$id,p(u[o])&&(i.$on("$destroy",h),u[o]=[]),u[o].push(a)):f(function(){c.$$phase||(l={})},2e3),r}}}]}),n.module("angular.filter",["a8m.ucfirst","a8m.uri-encode","a8m.uri-component-encode","a8m.slugify","a8m.latinize","a8m.strip-tags","a8m.stringular","a8m.truncate","a8m.starts-with","a8m.ends-with","a8m.wrap","a8m.trim","a8m.ltrim","a8m.rtrim","a8m.repeat","a8m.test","a8m.match","a8m.split","a8m.phoneUS","a8m.to-array","a8m.concat","a8m.contains","a8m.unique","a8m.is-empty","a8m.after","a8m.after-where","a8m.before","a8m.before-where","a8m.defaults","a8m.where","a8m.reverse","a8m.remove","a8m.remove-with","a8m.group-by","a8m.count-by","a8m.chunk-by","a8m.search-field","a8m.fuzzy-by","a8m.fuzzy","a8m.omit","a8m.pick","a8m.every","a8m.filter-by","a8m.xor","a8m.map","a8m.first","a8m.last","a8m.flatten","a8m.join","a8m.range","a8m.math.max","a8m.math.min","a8m.math.abs","a8m.math.percent","a8m.math.radix","a8m.math.sum","a8m.math.degrees","a8m.math.radians","a8m.math.byteFmt","a8m.math.kbFmt","a8m.math.shortFmt","a8m.angular","a8m.conditions","a8m.is-null","a8m.filter-watcher"])}(window,window.angular),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof module&&"undefined"!=typeof exports?module.exports=t():e.Papa=t()}(this,function(){"use strict";var a,e,u="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==u?u:{},i=!u.document&&!!u.postMessage,s=i&&/(\?|&)papaworker(=|&|$)/.test(u.location.search),o=!1,c={},l=0,y={parse:function(e,t){var n=(t=t||{}).dynamicTyping||!1;L(n)&&(t.dynamicTypingFunction=n,n={});if(t.dynamicTyping=n,t.transform=!!L(t.transform)&&t.transform,t.worker&&y.WORKERS_SUPPORTED){var r=function(){if(!y.WORKERS_SUPPORTED)return!1;if(!o&&null===y.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var e=y.SCRIPT_PATH||a;e+=(-1!==e.indexOf("?")?"&":"?")+"papaworker";var t=new u.Worker(e);return t.onmessage=b,t.id=l++,c[t.id]=t}();return r.userStep=t.step,r.userChunk=t.chunk,r.userComplete=t.complete,r.userError=t.error,t.step=L(t.step),t.chunk=L(t.chunk),t.complete=L(t.complete),t.error=L(t.error),delete t.worker,void r.postMessage({input:e,config:t,workerId:r.id})}var i=null;{if(e===y.NODE_STREAM_INPUT&&"undefined"==typeof PAPA_BROWSER_CONTEXT)return(i=new _(t)).getStream();"string"==typeof e?i=t.download?new h(t):new m(t):!0===e.readable&&L(e.read)&&L(e.on)?i=new g(t):(u.File&&e instanceof File||e instanceof Object)&&(i=new p(t))}return i.stream(e)},unparse:function(e,t){var r=!1,g=!0,_=",",b="\r\n",i='"',n=!1;!function(){if("object"!=typeof t)return;"string"!=typeof t.delimiter||y.BAD_DELIMITERS.filter(function(e){return-1!==t.delimiter.indexOf(e)}).length||(_=t.delimiter);("boolean"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes);"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(n=t.skipEmptyLines);"string"==typeof t.newline&&(b=t.newline);"string"==typeof t.quoteChar&&(i=t.quoteChar);"boolean"==typeof t.header&&(g=t.header)}();var a=new RegExp(N(i),"g");"string"==typeof e&&(e=JSON.parse(e));if(Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return s(null,e,n);if("object"==typeof e[0])return s(o(e[0]),e,n)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:o(e.data[0])),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),s(e.fields||[],e.data||[],n);throw"exception: Unable to serialize unrecognized input";function o(e){if("object"!=typeof e)return[];var t=[];for(var n in e)t.push(n);return t}function s(e,t,n){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var i=Array.isArray(e)&&0<e.length,a=!Array.isArray(t[0]);if(i&&g){for(var o=0;o<e.length;o++)0<o&&(r+=_),r+=v(e[o],o);0<t.length&&(r+=b)}for(var s=0;s<t.length;s++){var c=i?e.length:t[s].length,l=!1,u=i?0===Object.keys(t[s]).length:0===t[s].length;if(n&&!i&&(l="greedy"===n?""===t[s].join("").trim():1===t[s].length&&0===t[s][0].length),"greedy"===n&&i){for(var f=[],d=0;d<c;d++){var h=a?e[d]:d;f.push(t[s][h])}l=""===f.join("").trim()}if(!l){for(var p=0;p<c;p++){0<p&&!u&&(r+=_);var m=i&&a?e[p]:p;r+=v(t[s][m],p)}s<t.length-1&&(!n||0<c&&!u)&&(r+=b)}}return r}function v(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);e=e.toString().replace(a,i+i);var n="boolean"==typeof r&&r||Array.isArray(r)&&r[t]||function(e,t){for(var n=0;n<t.length;n++)if(-1<e.indexOf(t[n]))return!0;return!1}(e,y.BAD_DELIMITERS)||-1<e.indexOf(_)||" "===e.charAt(0)||" "===e.charAt(e.length-1);return n?i+e+i:e}}};if(y.RECORD_SEP=String.fromCharCode(30),y.UNIT_SEP=String.fromCharCode(31),y.BYTE_ORDER_MARK="\ufeff",y.BAD_DELIMITERS=["\r","\n",'"',y.BYTE_ORDER_MARK],y.WORKERS_SUPPORTED=!i&&!!u.Worker,y.SCRIPT_PATH=null,y.NODE_STREAM_INPUT=1,y.LocalChunkSize=10485760,y.RemoteChunkSize=5242880,y.DefaultDelimiter=",",y.Parser=v,y.ParserHandle=n,y.NetworkStreamer=h,y.FileStreamer=p,y.StringStreamer=m,y.ReadableStreamStreamer=g,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(y.DuplexStreamStreamer=_),u.jQuery){var f=u.jQuery;f.fn.parse=function(s){var n=s.config||{},c=[];return this.each(function(e){if(!("INPUT"===f(this).prop("tagName").toUpperCase()&&"file"===f(this).attr("type").toLowerCase()&&u.FileReader)||!this.files||0===this.files.length)return!0;for(var t=0;t<this.files.length;t++)c.push({file:this.files[t],inputElem:this,instanceConfig:f.extend({},n)})}),e(),this;function e(){if(0!==c.length){var e,t,n,r,i=c[0];if(L(s.before)){var a=s.before(i.file,i.inputElem);if("object"==typeof a){if("abort"===a.action)return e="AbortError",t=i.file,n=i.inputElem,r=a.reason,void(L(s.error)&&s.error({name:e},t,n,r));if("skip"===a.action)return void l();"object"==typeof a.config&&(i.instanceConfig=f.extend(i.instanceConfig,a.config))}else if("skip"===a)return void l()}var o=i.instanceConfig.complete;i.instanceConfig.complete=function(e){L(o)&&o(e,i.file,i.inputElem),l()},y.parse(i.file,i.instanceConfig)}else L(s.complete)&&s.complete()}function l(){c.splice(0,1),e()}}}function d(e){this._handle=null,this._finished=!1,this._completed=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=A(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null);this._handle=new n(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,t){if(this.isFirstChunk&&L(this._config.beforeFirstChunk)){var n=this._config.beforeFirstChunk(e);void 0!==n&&(e=n)}this.isFirstChunk=!1;var r=this._partialLine+e;this._partialLine="";var i=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var a=i.meta.cursor;this._finished||(this._partialLine=r.substring(a-this._baseIndex),this._baseIndex=a),i&&i.data&&(this._rowCount+=i.data.length);var o=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(s)u.postMessage({results:i,workerId:y.WORKER_ID,finished:o});else if(L(this._config.chunk)&&!t){if(this._config.chunk(i,this._handle),this._handle.paused()||this._handle.aborted())return;i=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(i.data),this._completeResults.errors=this._completeResults.errors.concat(i.errors),this._completeResults.meta=i.meta),this._completed||!o||!L(this._config.complete)||i&&i.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),o||i&&i.meta.paused||this._nextChunk(),i}},this._sendError=function(e){L(this._config.error)?this._config.error(e):s&&this._config.error&&u.postMessage({workerId:y.WORKER_ID,error:e,finished:!1})}}function h(e){var r;(e=e||{}).chunkSize||(e.chunkSize=y.RemoteChunkSize),d.call(this,e),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),i||(r.onload=S(this._chunkLoaded,this),r.onerror=S(this._chunkError,this)),r.open("GET",this._input,!i),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var t in e)r.setRequestHeader(t,e[t])}if(this._config.chunkSize){var n=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+n),r.setRequestHeader("If-None-Match","webkit-no-cache")}try{r.send()}catch(e){this._chunkError(e.message)}i&&0===r.status?this._chunkError():this._start+=this._config.chunkSize}},this._chunkLoaded=function(){var e;4===r.readyState&&(r.status<200||400<=r.status?this._chunkError():(this._finished=!this._config.chunkSize||this._start>(null!==(e=r.getResponseHeader("Content-Range"))?parseInt(e.substr(e.lastIndexOf("/")+1)):-1),this.parseChunk(r.responseText)))},this._chunkError=function(e){var t=r.statusText||e;this._sendError(new Error(t))}}function p(e){var r,i;(e=e||{}).chunkSize||(e.chunkSize=y.LocalChunkSize),d.call(this,e);var a="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,i=e.slice||e.webkitSlice||e.mozSlice,a?((r=new FileReader).onload=S(this._chunkLoaded,this),r.onerror=S(this._chunkError,this)):r=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var t=Math.min(this._start+this._config.chunkSize,this._input.size);e=i.call(e,this._start,t)}var n=r.readAsText(e,this._config.encoding);a||this._chunkLoaded({target:{result:n}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(r.error)}}function m(e){var n;d.call(this,e=e||{}),this.stream=function(e){return n=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,t=e?n.substr(0,e):n;return n=e?n.substr(e):"",this._finished=!n,this.parseChunk(t)}}}function g(e){d.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){d.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){d.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=S(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=S(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=S(function(){this._streamCleanUp(),r=!0,this._streamData("")},this),this._streamCleanUp=S(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function _(e){var t=require("stream").Duplex,n=A(e),r=!0,i=!1,a=[],o=null;this._onCsvData=function(e){for(var t=e.data,n=0;n<t.length;n++)o.push(t[n])||this._handle.paused()||this._handle.pause()},this._onCsvComplete=function(){o.push(null)},n.step=S(this._onCsvData,this),n.complete=S(this._onCsvComplete,this),d.call(this,n),this._nextChunk=function(){i&&1===a.length&&(this._finished=!0),a.length?a.shift()():r=!0},this._addToParseQueue=function(e,t){a.push(S(function(){if(this.parseChunk("string"==typeof e?e:e.toString(n.encoding)),L(t))return t()},this)),r&&(r=!1,this._nextChunk())},this._onRead=function(){this._handle.paused()&&this._handle.resume()},this._onWrite=function(e,t,n){this._addToParseQueue(e,n)},this._onWriteComplete=function(){i=!0,this._addToParseQueue("")},this.getStream=function(){return o},(o=new t({readableObjectMode:!0,decodeStrings:!1,read:S(this._onRead,this),write:S(this._onWrite,this)})).once("finish",S(this._onWriteComplete,this))}function n(g){var o,s,c,r=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,i=/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/,t=this,n=0,a=0,l=!1,e=!1,u=[],f={data:[],errors:[],meta:{}};if(L(g.step)){var d=g.step;g.step=function(e){if(f=e,p())h();else{if(h(),0===f.data.length)return;n+=e.data.length,g.preview&&n>g.preview?s.abort():d(f,t)}}}function _(e){return"greedy"===g.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function h(){if(f&&c&&(b("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+y.DefaultDelimiter+"'"),c=!1),g.skipEmptyLines)for(var e=0;e<f.data.length;e++)_(f.data[e])&&f.data.splice(e--,1);return p()&&function(){if(!f)return;for(var e=0;p()&&e<f.data.length;e++)for(var t=0;t<f.data[e].length;t++){var n=f.data[e][t];g.trimHeaders&&(n=n.trim()),u.push(n)}f.data.splice(0,1)}(),function(){if(!f||!g.header&&!g.dynamicTyping&&!g.transform)return f;for(var e=0;e<f.data.length;e++){var t,n=g.header?{}:[];for(t=0;t<f.data[e].length;t++){var r=t,i=f.data[e][t];g.header&&(r=t>=u.length?"__parsed_extra":u[t]),g.transform&&(i=g.transform(i,r)),i=m(r,i),"__parsed_extra"===r?(n[r]=n[r]||[],n[r].push(i)):n[r]=i}f.data[e]=n,g.header&&(t>u.length?b("FieldMismatch","TooManyFields","Too many fields: expected "+u.length+" fields but parsed "+t,a+e):t<u.length&&b("FieldMismatch","TooFewFields","Too few fields: expected "+u.length+" fields but parsed "+t,a+e))}g.header&&f.meta&&(f.meta.fields=u);return a+=f.data.length,f}()}function p(){return g.header&&0===u.length}function m(e,t){return n=e,g.dynamicTypingFunction&&void 0===g.dynamicTyping[n]&&(g.dynamicTyping[n]=g.dynamicTypingFunction(n)),!0===(g.dynamicTyping[n]||g.dynamicTyping)?"true"===t||"TRUE"===t||"false"!==t&&"FALSE"!==t&&(r.test(t)?parseFloat(t):i.test(t)?new Date(t):""===t?null:t):t;var n}function b(e,t,n,r){f.errors.push({type:e,code:t,message:n,row:r})}this.parse=function(e,t,n){var r=g.quoteChar||'"';if(g.newline||(g.newline=function(e,t){e=e.substr(0,1048576);var n=new RegExp(N(t)+"([^]*?)"+N(t),"gm"),r=(e=e.replace(n,"")).split("\r"),i=e.split("\n"),a=1<i.length&&i[0].length<r[0].length;if(1===r.length||a)return"\n";for(var o=0,s=0;s<r.length;s++)"\n"===r[s][0]&&o++;return o>=r.length/2?"\r\n":"\r"}(e,r)),c=!1,g.delimiter)L(g.delimiter)&&(g.delimiter=g.delimiter(e),f.meta.delimiter=g.delimiter);else{var i=function(e,t,n,r){for(var i,a,o,s=[",","\t","|",";",y.RECORD_SEP,y.UNIT_SEP],c=0;c<s.length;c++){var l=s[c],u=0,f=0,d=0;o=void 0;for(var h=new v({comments:r,delimiter:l,newline:t,preview:10}).parse(e),p=0;p<h.data.length;p++)if(n&&_(h.data[p]))d++;else{var m=h.data[p].length;f+=m,void 0!==o?1<m&&(u+=Math.abs(m-o),o=m):o=0}0<h.data.length&&(f/=h.data.length-d),(void 0===a||a<u)&&1.99<f&&(a=u,i=l)}return{successful:!!(g.delimiter=i),bestDelimiter:i}}(e,g.newline,g.skipEmptyLines,g.comments);i.successful?g.delimiter=i.bestDelimiter:(c=!0,g.delimiter=y.DefaultDelimiter),f.meta.delimiter=g.delimiter}var a=A(g);return g.preview&&g.header&&a.preview++,o=e,s=new v(a),f=s.parse(o,t,n),h(),l?{meta:{paused:!0}}:f||{meta:{paused:!1}}},this.paused=function(){return l},this.pause=function(){l=!0,s.abort(),o=o.substr(s.getCharIndex())},this.resume=function(){l=!1,t.streamer.parseChunk(o,!0)},this.aborted=function(){return e},this.abort=function(){e=!0,s.abort(),f.meta.aborted=!0,L(g.complete)&&g.complete(f),o=""}}function N(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function v(e){var x,k=(e=e||{}).delimiter,E=e.newline,D=e.comments,I=e.step,P=e.preview,M=e.fastMode,$=x=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&($=e.escapeChar),("string"!=typeof k||-1<y.BAD_DELIMITERS.indexOf(k))&&(k=","),D===k)throw"Comment character same as delimiter";!0===D?D="#":("string"!=typeof D||-1<y.BAD_DELIMITERS.indexOf(D))&&(D=!1),"\n"!==E&&"\r"!==E&&"\r\n"!==E&&(E="\n");var O=0,R=!1;this.parse=function(r,t,n){if("string"!=typeof r)throw"Input must be a string";var i=r.length,e=k.length,a=E.length,o=D.length,s=L(I),c=[],l=[],u=[],f=O=0;if(!r)return S();if(M||!1!==M&&-1===r.indexOf(x)){for(var d=r.split(E),h=0;h<d.length;h++){if(u=d[h],O+=u.length,h!==d.length-1)O+=E.length;else if(n)return S();if(!D||u.substr(0,o)!==D){if(s){if(c=[],y(u.split(k)),T(),R)return S()}else y(u.split(k));if(P&&P<=h)return c=c.slice(0,P),S(!0)}}return S()}for(var p,m=r.indexOf(k,O),g=r.indexOf(E,O),_=new RegExp(N($)+N(x),"g");;)if(r[O]!==x)if(D&&0===u.length&&r.substr(O,o)===D){if(-1===g)return S();O=g+a,g=r.indexOf(E,O),m=r.indexOf(k,O)}else if(-1!==m&&(m<g||-1===g))u.push(r.substring(O,m)),O=m+e,m=r.indexOf(k,O);else{if(-1===g)break;if(u.push(r.substring(O,g)),A(g+a),s&&(T(),R))return S();if(P&&c.length>=P)return S(!0)}else for(p=O,O++;;){if(-1===(p=r.indexOf(x,p+1)))return n||l.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:c.length,index:O}),C();if(p===i-1)return C(r.substring(O,p).replace(_,x));if(x!==$||r[p+1]!==$){if(x===$||0===p||r[p-1]!==$){var b=w(-1===g?m:Math.min(m,g));if(r[p+1+b]===k){u.push(r.substring(O,p).replace(_,x)),O=p+1+b+e,m=r.indexOf(k,O),g=r.indexOf(E,O);break}var v=w(g);if(r.substr(p+1+v,a)===E){if(u.push(r.substring(O,p).replace(_,x)),A(p+1+v+a),m=r.indexOf(k,O),s&&(T(),R))return S();if(P&&c.length>=P)return S(!0);break}l.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:c.length,index:O}),p++}}else p++}return C();function y(e){c.push(e),f=O}function w(e){var t=0;if(-1!==e){var n=r.substring(p+1,e);n&&""===n.trim()&&(t=n.length)}return t}function C(e){return n||(void 0===e&&(e=r.substr(O)),u.push(e),O=i,y(u),s&&T()),S()}function A(e){O=e,y(u),u=[],g=r.indexOf(E,O)}function S(e){return{data:c,errors:l,meta:{delimiter:k,linebreak:E,aborted:R,truncated:!!e,cursor:f+(t||0)}}}function T(){I(S()),c=[],l=[]}},this.abort=function(){R=!0},this.getCharIndex=function(){return O}}function b(e){var t=e.data,n=c[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var i={abort:function(){r=!0,w(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:C,resume:C};if(L(n.userStep)){for(var a=0;a<t.results.data.length&&(n.userStep({data:[t.results.data[a]],errors:t.results.errors,meta:t.results.meta},i),!r);a++);delete t.results}else L(n.userChunk)&&(n.userChunk(t.results,i,t.file),delete t.results)}t.finished&&!r&&w(t.workerId,t.results)}function w(e,t){var n=c[e];L(n.userComplete)&&n.userComplete(t),n.terminate(),delete c[e]}function C(){throw"Not implemented."}function A(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=A(e[n]);return t}function S(e,t){return function(){e.apply(t,arguments)}}function L(e){return"function"==typeof e}return s?u.onmessage=function(e){var t=e.data;void 0===y.WORKER_ID&&t&&(y.WORKER_ID=t.workerId);if("string"==typeof t.input)u.postMessage({workerId:y.WORKER_ID,results:y.parse(t.input,t.config),finished:!0});else if(u.File&&t.input instanceof File||t.input instanceof Object){var n=y.parse(t.input,t.config);n&&u.postMessage({workerId:y.WORKER_ID,results:n,finished:!0})}}:y.WORKERS_SUPPORTED&&(e=document.getElementsByTagName("script"),a=e.length?e[e.length-1].src:"",document.body?document.addEventListener("DOMContentLoaded",function(){o=!0},!0):o=!0),(h.prototype=Object.create(d.prototype)).constructor=h,(p.prototype=Object.create(d.prototype)).constructor=p,(m.prototype=Object.create(m.prototype)).constructor=m,(g.prototype=Object.create(d.prototype)).constructor=g,"undefined"==typeof PAPA_BROWSER_CONTEXT&&((_.prototype=Object.create(d.prototype)).constructor=_),y}),function(){"use strict";var e=angular.module("mdPickers",["ngMaterial","ngAnimate","ngAria"]);function u(t,n,e,r,i,a){var o=this;this.date=moment(i),this.minDate=a.minDate&&moment(a.minDate).isValid()?moment(a.minDate):null,this.maxDate=a.maxDate&&moment(a.maxDate).isValid()?moment(a.maxDate):null,this.displayFormat=a.displayFormat||"ddd, MMM DD",this.dateFilter=angular.isFunction(a.dateFilter)?a.dateFilter:null,this.selectingYear=!1,this.minDate&&this.maxDate&&this.maxDate.isBefore(this.minDate)&&(this.maxDate=moment(this.minDate).add(1,"days")),this.date&&(this.minDate&&this.date.isBefore(this.minDate)&&(this.date=moment(this.minDate)),this.maxDate&&this.date.isAfter(this.maxDate)&&(this.date=moment(this.maxDate))),this.yearItems={currentIndex_:0,PAGE_SIZE:5,START:o.minDate?o.minDate.year():1900,END:o.maxDate?o.maxDate.year():0,getItemAtIndex:function(e){return this.currentIndex_<e&&(this.currentIndex_=e),this.START+e},getLength:function(){return Math.min(this.currentIndex_+Math.floor(this.PAGE_SIZE/2),Math.abs(this.START-this.END)+1)}},t.$mdMedia=e,t.year=this.date.year(),this.selectYear=function(e){o.date.year(e),t.year=e,o.selectingYear=!1,o.animate()},this.showYear=function(){o.yearTopIndex=o.date.year()-o.yearItems.START+Math.floor(o.yearItems.PAGE_SIZE/2),o.yearItems.currentIndex_=o.date.year()-o.yearItems.START+1,o.selectingYear=!0},this.showCalendar=function(){o.selectingYear=!1},this.cancel=function(){n.cancel()},this.confirm=function(){var e=this.date;this.minDate&&this.date.isBefore(this.minDate)&&(e=moment(this.minDate)),this.maxDate&&this.date.isAfter(this.maxDate)&&(e=moment(this.maxDate)),n.hide(e.toDate())},this.animate=function(){o.animating=!0,r(angular.noop).then(function(){o.animating=!1})}}function t(e){var a=this;this.$onInit=function(){a.daysInMonth=[],a.dow=moment.localeData().firstDayOfWeek(),a.weekDays=[].concat(moment.weekdaysMin().slice(a.dow),moment.weekdaysMin().slice(0,a.dow)),e.$watch(function(){return a.date.unix()},function(e,t){e&&e!==t&&a.updateDaysInMonth()}),a.updateDaysInMonth()},this.getDaysInMonth=function(){var e=a.date.daysInMonth(),t=moment(a.date).date(1).day()-this.dow;t<0&&(t=this.weekDays.length-1);for(var n=[],r=1;r<=t+e;r++){var i=null;t<r&&(i={value:r-t,enabled:a.isDayEnabled(moment(a.date).date(r-t).toDate())}),n.push(i)}return n},this.isDayEnabled=function(e){return!(this.minDate&&!(this.minDate<=e)||this.maxDate&&!(this.maxDate>=e)||a.dateFilter&&a.dateFilter(e))},this.selectDate=function(e){a.date.date(e)},this.nextMonth=function(){a.date.add(1,"months")},this.prevMonth=function(){a.date.subtract(1,"months")},this.updateDaysInMonth=function(){a.daysInMonth=a.getDaysInMonth()},e.$watch(function(){return a.date.unix()},function(e,t){e&&e!==t&&a.updateDaysInMonth()})}function _(e,t){return!e||angular.isDate(e)||moment(e,t,!0).isValid()}function r(e,t,n,r){angular.isDate(n)&&(n=moment(n).format(t)),n=moment(n,t,!0);var i=angular.isDate(e)?moment(e):moment(e,t,!0);return!e||angular.isDate(e)||!n.isValid()||r(i,n)}function b(e,t,n){return r(e,t,n,function(e,t){return e.isSameOrAfter(t)})}function v(e,t,n){return r(e,t,n,function(e,t){return e.isSameOrBefore(t)})}function y(e,t,n){var r=angular.isDate(e)?moment(e):moment(e,t,!0);return!e||angular.isDate(e)||!angular.isFunction(n)||!n(r.toDate())}function l(e,t,n,r,i,a){var o=this;this.VIEW_HOURS=1,this.VIEW_MINUTES=2,this.currentView=this.VIEW_HOURS,this.time=moment(n),this.autoSwitch=!!r,this.ampm=!!i,this.hoursFormat=o.ampm?"h":"H",this.minutesFormat="mm",this.clockHours=parseInt(this.time.format(this.hoursFormat)),this.clockMinutes=parseInt(this.time.format(this.minutesFormat)),e.$mdMedia=a,this.switchView=function(){o.currentView=o.currentView==o.VIEW_HOURS?o.VIEW_MINUTES:o.VIEW_HOURS},this.setAM=function(){12<=o.time.hours()&&o.time.hour(o.time.hour()-12)},this.setPM=function(){o.time.hours()<12&&o.time.hour(o.time.hour()+12)},this.cancel=function(){t.cancel()},this.confirm=function(){t.hide(this.time.toDate())}}function n(e){var r=this,i="hours",a="minutes";this.$onInit=function(){switch(r.STEP_DEG=30,r.steps=[],this.CLOCK_TYPES={hours:{range:r.ampm?12:24},minutes:{range:60}},r.type=r.type||"hours",r.type){case i:for(var e=r.ampm?1:2,t=r.ampm?12:23,n=e;n<=t;n+=e)r.steps.push(n);r.ampm||r.steps.push(0),r.selected=r.time.hours()||0,r.ampm&&12<r.selected&&(r.selected-=12);break;case a:for(n=5;n<=55;n+=5)r.steps.push(n);r.steps.push(0),r.selected=r.time.minutes()||0}},this.getPointerStyle=function(){var e=1;switch(r.type){case i:e=r.ampm?12:24;break;case a:e=60}var t=Math.round(r.selected*(360/e))-180;return{"-webkit-transform":"rotate("+t+"deg)","-ms-transform":"rotate("+t+"deg)",transform:"rotate("+t+"deg)"}},this.setTimeByDeg=function(e){e=360<=e?0:e;var t=0;switch(r.type){case i:t=r.ampm?12:24;break;case a:t=60}r.setTime(Math.round(t/360*e))},this.setTime=function(e,t){switch(this.selected=e,r.type){case i:r.ampm&&"PM"==r.time.format("A")&&(e+=12),this.time.hours(e);break;case a:59<e&&(e-=60),this.time.minutes(e)}}}function w(e,t,n,r){angular.isDate(n)&&(n=moment(n).format(t)),n=moment(n,t,!0);var i=angular.isDate(e)?moment(e):moment(e,t,!0);return!e||angular.isDate(e)||!n.isValid()||r(i,n)}e.config(["$mdIconProvider","mdpIconsRegistry",function(n,e){angular.forEach(e,function(e,t){n.icon(e.id,e.url)})}]),e.run(["$templateCache","mdpIconsRegistry",function(n,e){angular.forEach(e,function(e,t){n.put(e.url,e.svg)})}]),e.constant("mdpIconsRegistry",[{id:"mdp-chevron-left",url:"mdp-chevron-left.svg",svg:'<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'},{id:"mdp-chevron-right",url:"mdp-chevron-right.svg",svg:'<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'},{id:"mdp-access-time",url:"mdp-access-time.svg",svg:'<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/><path d="M0 0h24v24H0z" fill="none"/><path d="M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"/></svg>'},{id:"mdp-event",url:"mdp-event.svg",svg:'<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'}]),e.factory("$mdpLocale",[function(){return{time:{minTime:null,maxTime:null,okLabel:"OK",cancelLabel:"Cancel",timeFormat:"HH:mm",noFloat:!1,openOnClick:!1,autoSwitch:!1,ampm:!0,clearOnCancel:!1},date:{minDate:null,maxDate:null,okLabel:"OK",cancelLabel:"Cancel",dateFilter:null,dateFormat:"YYYY-MM-DD",displayFormat:"ddd, MMM DD",noFloat:!1,openOnClick:!1,clearOnCancel:!1}}}]),e.directive("ngMessage",["$mdUtil",function(t){return{restrict:"EA",priority:101,compile:function(e){if(t.getClosest(e,"mdp-time-picker",!0)||t.getClosest(e,"mdp-date-picker",!0))return e.toggleClass("md-input-message-animation",!0),{}}}}]),e.provider("$mdpDatePicker",function(){var o="OK",s="Cancel",c="ddd, MMM DD",l=function(){};this.setDisplayFormat=function(e){c=e},this.setOKButtonLabel=function(e){o=e},this.setCancelButtonLabel=function(e){s=e},this.setDialogParentGetter=function(e){l=e},this.$get=["$mdDialog","$mdpLocale",function(i,a){return function(e,t){angular.isDate(e)||(e=Date.now()),angular.isObject(t)||(t={}),t.displayFormat=t.displayFormat||a.date.displayFormat||c;var n=t.okLabel||a.date.okLabel||o,r=t.cancelLabel||a.date.cancelLabel||s;return i.show({controller:["$scope","$mdDialog","$mdMedia","$timeout","currentDate","options",u],controllerAs:"datepicker",clickOutsideToClose:!0,skipHide:!0,multiple:!0,template:'<md-dialog aria-label="" class="mdp-datepicker" ng-class="{ \'portrait\': !$mdMedia(\'gt-xs\') }"><md-dialog-content layout="row" layout-wrap><div layout="column" layout-align="start center"><md-toolbar layout-align="start start" flex class="mdp-datepicker-date-wrapper md-hue-1 md-primary" layout="column"><span class="mdp-datepicker-year" ng-click="datepicker.showYear()" ng-class="{ \'active\': datepicker.selectingYear }">{{ datepicker.date.format(\'YYYY\') }}</span><span class="mdp-datepicker-date" ng-click="datepicker.showCalendar()" ng-class="{ \'active\': !datepicker.selectingYear }">{{ datepicker.date.format(datepicker.displayFormat) }}</span> </md-toolbar></div><div><div class="mdp-datepicker-select-year mdp-animation-zoom" layout="column" layout-align="center start" ng-if="datepicker.selectingYear"><md-virtual-repeat-container md-auto-shrink md-top-index="datepicker.yearTopIndex"><div flex md-virtual-repeat="item in datepicker.yearItems" md-on-demand class="repeated-year"><span class="md-button" ng-click="datepicker.selectYear(item)" md-ink-ripple ng-class="{ \'md-primary current\': item == year }">{{ item }}</span></div></md-virtual-repeat-container></div><mdp-calendar ng-if="!datepicker.selectingYear" class="mdp-animation-zoom" date="datepicker.date" min-date="datepicker.minDate" date-filter="datepicker.dateFilter" max-date="datepicker.maxDate"></mdp-calendar><md-dialog-actions layout="row"><span flex></span><md-button ng-click="datepicker.cancel()" aria-label="'+r+'">'+r+'</md-button><md-button ng-click="datepicker.confirm()" class="md-primary" aria-label="'+n+'">'+n+"</md-button></md-dialog-actions></div></md-dialog-content></md-dialog>",targetEvent:t.targetEvent,locals:{currentDate:e,options:t},parent:l()})}}]}),e.directive("mdpCalendar",["$animate",function(a){return{restrict:"E",bindToController:{date:"=",minDate:"=",maxDate:"=",dateFilter:"="},template:'<div class="mdp-calendar"><div layout="row" layout-align="space-between center"><md-button aria-label="previous month" class="md-icon-button" ng-click="calendar.prevMonth()"><md-icon md-svg-icon="mdp-chevron-left"></md-icon></md-button><div class="mdp-calendar-monthyear" ng-show="!calendar.animating">{{ calendar.date.format("MMMM YYYY") }}</div><md-button aria-label="next month" class="md-icon-button" ng-click="calendar.nextMonth()"><md-icon md-svg-icon="mdp-chevron-right"></md-icon></md-button></div><div layout="row" layout-align="space-around center" class="mdp-calendar-week-days" ng-show="!calendar.animating"><div layout layout-align="center center" ng-repeat="d in calendar.weekDays track by $index">{{ d }}</div></div><div layout="row" layout-align="start center" layout-wrap class="mdp-calendar-days" ng-class="{ \'mdp-animate-next\': calendar.animating }" ng-show="!calendar.animating" md-swipe-left="calendar.nextMonth()" md-swipe-right="calendar.prevMonth()"><div layout layout-align="center center" ng-repeat-start="day in calendar.daysInMonth track by $index" ng-class="{ \'mdp-day-placeholder\': !day }"><md-button class="md-icon-button" aria-label="Select day" ng-mouseenter="raised = true" ng-mouseleave="raised = false" ng-if="day" ng-class="{ \'md-accent\': calendar.date.date() == day.value, \'md-raised\': raised || calendar.date.date() == day.value }" ng-click="calendar.selectDate(day.value)" ng-disabled="!day.enabled">{{ day.value }}</md-button></div><div flex="100" ng-if="($index + 1) % 7 == 0" ng-repeat-end></div></div></div>',controller:["$scope",t],controllerAs:"calendar",link:function(e,t,n,r){var i=[t[0].querySelector(".mdp-calendar-week-days"),t[0].querySelector(".mdp-calendar-days"),t[0].querySelector(".mdp-calendar-monthyear")].map(function(e){return angular.element(e)});e.raised=!1,e.$watch(function(){return r.date.format("YYYYMM")},function(e,t){var n=null;if(t<e?n="mdp-animate-next":e<t&&(n="mdp-animate-prev"),n)for(var r in i)i[r].addClass(n),a.removeClass(i[r],n)})}}}]),e.directive("mdpDatePicker",["$mdpDatePicker","$timeout","$mdpLocale",function(m,e,g){return{restrict:"E",require:["ngModel","^^?form"],transclude:!0,template:function(e,t){var n=angular.isDefined(t.mdpNoFloat)||g.date.noFloat,r=angular.isDefined(t.mdpOpenOnClick)||g.date.openOnClick;return'<div layout layout-align="start start"><md-button'+(angular.isDefined(t.mdpDisabled)?' ng-disabled="disabled"':"")+' class="md-icon-button" ng-click="showPicker($event)"><md-icon md-svg-icon="mdp-event"></md-icon></md-button><md-input-container'+(n?" md-no-float":"")+' md-is-error="isError()"><input name="{{ inputName }}" ng-model="model.$viewValue" ng-required="required()" type="{{ ::type }}"'+(angular.isDefined(t.mdpDisabled)?' ng-disabled="disabled"':"")+' aria-label="{{placeholder}}" placeholder="{{placeholder}}"'+(r?' ng-click="showPicker($event)" ':"")+" /></md-input-container></div>"},scope:{minDate:"=mdpMinDate",maxDate:"=mdpMaxDate",okLabel:"@?mdpOkLabel",cancelLabel:"@?mdpCancelLabel",dateFilter:"=mdpDateFilter",dateFormat:"@mdpFormat",placeholder:"@mdpPlaceholder",noFloat:"=mdpNoFloat",openOnClick:"=mdpOpenOnClick",disabled:"=?mdpDisabled",inputName:"@?mdpInputName",clearOnCancel:"=?mdpClearOnCancel"},link:{pre:function(e,t,n,r,i){},post:function(r,e,n,t,i){var a=t[0],o=t[1],s={get minDate(){return r.minDate||g.date.minDate},get maxDate(){return r.maxDate||g.date.maxDate},get dateFilter(){return r.dateFilter||g.date.dateFilter},get clearOnCancel(){return angular.isDefined(r.clearOnCancel)?r.clearOnCancel:g.date.clearOnCancel}},c=angular.element(e[0].querySelector("input")),l=angular.element(e[0].querySelector("md-input-container")),u=l.controller("mdInputContainer");i(function(e){l.append(e)});var f=angular.element(l[0].querySelector("[ng-messages]"));function d(e){c[0].value=e,u.setHasValue(!a.$isEmpty(e))}function h(e){var t=moment(e,angular.isDate(e)?null:r.dateFormat,!0),n=t.format(r.dateFormat);t.isValid()?(d(n),a.$setViewValue(n)):(d(e),a.$setViewValue(e)),!a.$pristine&&f.hasClass("md-auto-hide")&&l.hasClass("md-input-invalid")&&f.removeClass("md-auto-hide"),a.$render()}function p(e){e.target.value!==a.$viewVaue&&h(e.target.value)}r.type=r.dateFormat||g.date.dateFormat?"text":"date",r.dateFormat=r.dateFormat||g.date.dateFormat||"YYYY-MM-DD",r.model=a,r.isError=function(){return!!a.$invalid&&(!a.$pristine||null!=o&&o.$submitted)},r.required=function(){return!!n.required},a.$formatters.unshift(function(e){var t=angular.isDate(e)&&moment(e);if(t&&t.isValid()){var n=t.format(r.dateFormat);return d(n),n}return d(null),null}),a.$validators.format=function(e,t){return _(t,r.dateFormat)},a.$validators.minDate=function(e,t){return b(t,r.dateFormat,s.minDate)},a.$validators.maxDate=function(e,t){return v(t,r.dateFormat,s.maxDate)},a.$validators.filter=function(e,t){return y(t,r.dateFormat,s.dateFilter)},a.$validators.required=function(e,t){return angular.isUndefined(n.required)||!1===n.required||!a.$isEmpty(e)||!a.$isEmpty(t)},a.$parsers.unshift(function(e){var t=moment(e,r.dateFormat,!0);if(t.isValid()){if(angular.isDate(a.$modelValue)){var n=moment(a.$modelValue);n.year(t.year()),n.month(t.month()),n.date(t.date()),t=n}return t.toDate()}return null}),r.showPicker=function(e){m(a.$modelValue,{minDate:s.minDate,maxDate:s.maxDate,dateFilter:s.dateFilter,okLabel:r.okLabel,cancelLabel:r.cancelLabel,targetEvent:e}).then(function(e){h(e)},function(e){s.clearOnCancel&&h(null)})},c.on("reset input blur",p),r.$on("$destroy",function(){c.off("reset input blur",p)}),r.$watch("minDate + maxDate",function(){a.$validate()})}}}}]),e.directive("mdpDatePicker",["$mdpDatePicker","$timeout",function(o,e){return{restrict:"A",require:"ngModel",scope:{minDate:"@min",maxDate:"@max",okLabel:"@?mdpOkLabel",cancelLabel:"@?mdpCancelLabel",dateFilter:"=mdpDateFilter",dateFormat:"@mdpFormat"},link:function(n,e,t,r,i){function a(e){o(r.$modelValue,{minDate:n.minDate,maxDate:n.maxDate,dateFilter:n.dateFilter,okLabel:n.okLabel,cancelLabel:n.cancelLabel,targetEvent:e}).then(function(e){r.$setViewValue(moment(e).format(n.format)),r.$render()})}n.dateFormat=n.dateFormat||"YYYY-MM-DD",r.$validators.format=function(e,t){return _(t,n.format)},r.$validators.minDate=function(e,t){return b(t,n.format,n.minDate)},r.$validators.maxDate=function(e,t){return v(t,n.format,n.maxDate)},r.$validators.filter=function(e,t){return y(t,n.format,n.dateFilter)},e.on("click",a),n.$on("$destroy",function(){e.off("click",a)})}}}]),e.directive("mdpClock",["$animate","$timeout",function(e,s){return{restrict:"E",bindToController:{type:"@?",time:"=",autoSwitch:"=?",ampm:"=?"},replace:!0,template:'<md-card class="mdp-clock"><div class="mdp-clock-container"><md-toolbar class="mdp-clock-center md-primary"></md-toolbar><md-toolbar ng-style="clock.getPointerStyle()" class="mdp-pointer md-primary"><span class="mdp-clock-selected md-button md-raised md-primary"></span></md-toolbar><md-button ng-class="{ \'md-primary\': clock.selected == step, \'md-raised\': raised || clock.selected == step  }" ng-mouseenter="raised = true" ng-mouseleave="raised = false" class="md-icon-button mdp-clock-deg{{ ::(clock.STEP_DEG * ($index + 1)) }}" ng-repeat="step in clock.steps" ng-click="clock.setTime(step)">{{ step }}</md-button></div></md-card>',controller:["$scope",n],controllerAs:"clock",link:function(e,t,n,a){angular.element(t[0].querySelector(".mdp-pointer"));var o=e.$parent.timepicker;e.raised=!1;var r=function(e){var t=e.currentTarget.getClientRects()[0],n=e.currentTarget.offsetWidth/2-(e.pageX-t.left),r=e.pageY-t.top-e.currentTarget.offsetHeight/2,i=Math.round(Math.atan2(n,r)*(180/Math.PI));s(function(){a.setTimeByDeg(i+180),a.autoSwitch&&-1!==["mouseup","click"].indexOf(e.type)&&o&&o.switchView()})};t.on("mousedown",function(){t.on("mousemove",r)}),t.on("mouseup",function(e){t.off("mousemove")}),t.on("click",r),e.$on("$destroy",function(){t.off("click",r),t.off("mousemove",r)})}}}]),e.provider("$mdpTimePicker",function(){var o="OK",s="Cancel",c=function(){};this.setOKButtonLabel=function(e){o=e},this.setCancelButtonLabel=function(e){s=e},this.setDialogParentGetter=function(e){c=e},this.$get=["$mdDialog","$mdpLocale",function(i,a){return function(e,t){angular.isDate(e)||(e=Date.now()),angular.isObject(t)||(t={});var n=t.okLabel||a.time.okLabel||o,r=t.cancelLabel||a.time.cancelLabel||s;return i.show({controller:["$scope","$mdDialog","time","autoSwitch","ampm","$mdMedia",l],controllerAs:"timepicker",clickOutsideToClose:!0,skipHide:!0,multiple:!0,template:'<md-dialog aria-label="" class="mdp-timepicker" ng-class="{ \'portrait\': !$mdMedia(\'gt-xs\') }"><md-dialog-content layout-gt-xs="row" layout-wrap><md-toolbar layout-gt-xs="column" layout-xs="row" layout-align="center center" flex class="mdp-timepicker-time md-hue-1 md-primary"><div class="mdp-timepicker-selected-time"><span ng-class="{ \'active\': timepicker.currentView == timepicker.VIEW_HOURS }" ng-click="timepicker.currentView = timepicker.VIEW_HOURS">{{ timepicker.time.format(timepicker.hoursFormat) }}</span>:<span ng-class="{ \'active\': timepicker.currentView == timepicker.VIEW_MINUTES }" ng-click="timepicker.currentView = timepicker.VIEW_MINUTES">{{ timepicker.time.format(timepicker.minutesFormat) }}</span></div><div layout="column" ng-show="timepicker.ampm" class="mdp-timepicker-selected-ampm"><span ng-click="timepicker.setAM()" ng-class="{ \'active\': timepicker.time.hours() < 12 }">AM</span><span ng-click="timepicker.setPM()" ng-class="{ \'active\': timepicker.time.hours() >= 12 }">PM</span></div></md-toolbar><md-content><div class="mdp-clock-switch-container" ng-switch="timepicker.currentView" layout layout-align="center center"><mdp-clock class="mdp-animation-zoom" ampm="timepicker.ampm" auto-switch="timepicker.autoSwitch" time="timepicker.time" type="hours" ng-switch-when="1"></mdp-clock><mdp-clock class="mdp-animation-zoom" ampm="timepicker.ampm" auto-switch="timepicker.autoSwitch" time="timepicker.time" type="minutes" ng-switch-when="2"></mdp-clock></div><md-dialog-actions layout="row"><span flex></span><md-button ng-click="timepicker.cancel()" aria-label="'+r+'">'+r+'</md-button><md-button ng-click="timepicker.confirm()" class="md-primary" aria-label="'+n+'">'+n+"</md-button></md-dialog-actions></md-content></md-dialog-content></md-dialog>",targetEvent:t.targetEvent,locals:{time:e,autoSwitch:t.autoSwitch,ampm:angular.isDefined(t.ampm)?t.ampm:a.time.ampm},parent:c()})}}]}),e.directive("mdpTimePicker",["$mdpTimePicker","$timeout","$mdpLocale",function(m,e,g){return{restrict:"E",require:["ngModel","^^?form"],transclude:!0,template:function(e,t){var n=angular.isDefined(t.mdpNoFloat)||g.time.noFloat,r=angular.isDefined(t.mdpOpenOnClick)||g.time.openOnClick;return'<div layout layout-align="start start"><md-button class="md-icon-button" ng-click="showPicker($event)"'+(angular.isDefined(t.mdpDisabled)?' ng-disabled="disabled"':"")+'><md-icon md-svg-icon="mdp-access-time"></md-icon></md-button><md-input-container'+(n?" md-no-float":"")+' md-is-error="isError()"><input name="{{ inputName }}" ng-model="model.$viewValue" ng-required="required()" type="{{ ::type }}"'+(angular.isDefined(t.mdpDisabled)?' ng-disabled="disabled"':"")+' aria-label="{{placeholder}}" placeholder="{{placeholder}}"'+(r?' ng-click="showPicker($event)" ':"")+" /></md-input-container></div>"},scope:{minTime:"=?mdpMinTime",maxTime:"=?mdpMaxTime",timeFormat:"@mdpFormat",okLabel:"@?mdpOkLabel",cancelLabel:"@?mdpCancelLabel",placeholder:"@mdpPlaceholder",autoSwitch:"=?mdpAutoSwitch",disabled:"=?mdpDisabled",ampm:"=?mdpAmpm",inputName:"@?mdpInputName",clearOnCancel:"=?mdpClearOnCancel"},link:function(a,e,n,t,r){var i=t[0],o=t[1],s={get minTime(){return a.minTime||g.time.minTime},get maxTime(){return a.maxTime||g.time.maxTime},get clearOnCancel(){return angular.isDefined(a.clearOnCancel)?a.clearOnCancel:g.time.clearOnCancel}},c=angular.element(e[0].querySelector("input")),l=angular.element(e[0].querySelector("md-input-container")),u=l.controller("mdInputContainer");r(function(e){l.append(e)});var f=angular.element(l[0].querySelector("[ng-messages]"));function d(e){c[0].value=e,u.setHasValue(!i.$isEmpty(e))}function h(e){var t=moment(e,angular.isDate(e)?null:a.timeFormat,!0),n=t.format(a.timeFormat);t.isValid()?(d(n),i.$setViewValue(n)):(d(e),i.$setViewValue(e)),!i.$pristine&&f.hasClass("md-auto-hide")&&l.hasClass("md-input-invalid")&&f.removeClass("md-auto-hide"),i.$render()}function p(e){e.target.value!==i.$viewVaue&&h(e.target.value)}a.type=a.timeFormat||g.time.timeFormat?"text":"time",a.timeFormat=a.timeFormat||g.time.timeFormat||"HH:mm",a.autoSwitch=void 0===a.autoSwitch?g.time.autoSwitch:a.autoSwitch,a.model=i,a.isError=function(){return!!i.$invalid&&(!i.$pristine||null!=o&&o.$submitted)},a.required=function(){return!!n.required},a.$watch(function(){return i.$error},function(e,t){u.setInvalid(!i.$pristine&&!!Object.keys(i.$error).length)},!0),i.$formatters.unshift(function(e){var t=angular.isDate(e)&&moment(e);if(t&&t.isValid()){var n=t.format(a.timeFormat);return d(n),n}return d(null),null}),i.$validators.format=function(e,t){return!t||angular.isDate(t)||moment(t,a.timeFormat,!0).isValid()},i.$validators.required=function(e,t){return angular.isUndefined(n.required)||!1===n.required||!i.$isEmpty(e)||!i.$isEmpty(t)},i.$validators.minTime=function(e,t){return n=t,r=a.timeFormat,i=s.minTime,w(n,r,i,function(e,t){return e.isSameOrAfter(t)});var n,r,i},i.$validators.maxTime=function(e,t){return n=t,r=a.timeFormat,i=s.maxTime,w(n,r,i,function(e,t){return e.isSameOrBefore(t)});var n,r,i},i.$parsers.unshift(function(e){var t=moment(e,a.timeFormat,!0);if(t.isValid()){if(angular.isDate(i.$modelValue)){var n=moment(i.$modelValue);n.minutes(t.minutes()),n.hours(t.hours()),n.seconds(t.seconds()),t=n}return t.toDate()}return null}),a.showPicker=function(e){m(i.$modelValue,{targetEvent:e,okLabel:a.okLabel,cancelLabel:a.cancelLabel,autoSwitch:a.autoSwitch,ampm:a.ampm}).then(function(e){h(e)},function(e){s.clearOnCancel&&h(null)})},c.on("reset input blur",p),a.$on("$destroy",function(){c.off("reset input blur",p)}),a.$watch("minTime + maxTime",function(){i.$validate()})}}}]),e.directive("mdpTimePicker",["$mdpTimePicker","$timeout",function(o,e){return{restrict:"A",require:"ngModel",scope:{timeFormat:"@mdpFormat",okLabel:"@?mdpOkLabel",cancelLabel:"@?mdpCancelLabel",autoSwitch:"=?mdpAutoSwitch",ampm:"=?mdpAmpm"},link:function(t,e,n,r,i){function a(e){o(r.$modelValue,{targetEvent:e,autoSwitch:t.autoSwitch,okLabel:t.okLabel,cancelLabel:t.cancelLabel,ampm:t.ampm}).then(function(e){r.$setViewValue(moment(e).format(t.format)),r.$render()})}t.format=t.format||"HH:mm",e.on("click",a),t.$on("$destroy",function(){e.off("click",a)})}}}])}(),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(P,M){"use strict";if(!P.jstree){var i=0,a=!1,o=!1,s=!1,r=[],e=P("script:last").attr("src"),y=window.document,l=window.setImmediate,n=window.Promise;!l&&n&&(l=function(e,t){n.resolve(t).then(e)}),P.jstree={version:"3.3.12",defaults:{plugins:[]},plugins:{},path:e&&-1!==e.indexOf("/")?e.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},P.jstree.create=function(e,n){var r=new P.jstree.core(++i),t=n;return n=P.extend(!0,{},P.jstree.defaults,n),t&&t.plugins&&(n.plugins=t.plugins),P.each(n.plugins,function(e,t){"core"!==e&&(r=r.plugin(t,n[t]))}),P(e).data("jstree",r),r.init(e,n),r},P.jstree.destroy=function(){P(".jstree:jstree").jstree("destroy"),P(y).off(".jstree")},P.jstree.core=function(e){this._id=e,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},P.jstree.reference=function(t){var n=null,e=null;if(!t||!t.id||t.tagName&&t.nodeType||(t=t.id),!e||!e.length)try{e=P(t)}catch(e){}if(!e||!e.length)try{e=P("#"+t.replace(P.jstree.idregex,"\\$&"))}catch(e){}return e&&e.length&&(e=e.closest(".jstree")).length&&(e=e.data("jstree"))?n=e:P(".jstree").each(function(){var e=P(this).data("jstree");if(e&&e._model.data[t])return n=e,!1}),n},P.fn.jstree=function(n){var r="string"==typeof n,i=Array.prototype.slice.call(arguments,1),a=null;return!(!0===n&&!this.length)&&(this.each(function(){var e=P.jstree.reference(this),t=r&&e?e[n]:null;if(a=r&&t?t.apply(e,i):null,e||r||n!==M&&!P.isPlainObject(n)||P.jstree.create(this,n),(e&&!r||!0===n)&&(a=e||!1),null!==a&&a!==M)return!1}),null!==a&&a!==M?a:this)},P.expr.pseudos.jstree=P.expr.createPseudo(function(e){return function(e){return P(e).hasClass("jstree")&&P(e).data("jstree")!==M}}),P.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:P.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,compute_elements_positions:!1,keyboard:{"ctrl-space":function(e){e.type="click",P(e.currentTarget).trigger(e)},enter:function(e){e.type="click",P(e.currentTarget).trigger(e)},left:function(e){if(e.preventDefault(),this.is_open(e.currentTarget))this.close_node(e.currentTarget);else{var t=this.get_parent(e.currentTarget);t&&t.id!==P.jstree.root&&this.get_node(t,!0).children(".jstree-anchor").trigger("focus")}},up:function(e){e.preventDefault();var t=this.get_prev_dom(e.currentTarget);t&&t.length&&t.children(".jstree-anchor").trigger("focus")},right:function(e){if(e.preventDefault(),this.is_closed(e.currentTarget))this.open_node(e.currentTarget,function(e){this.get_node(e,!0).children(".jstree-anchor").trigger("focus")});else if(this.is_open(e.currentTarget)){var t=this.get_node(e.currentTarget,!0).children(".jstree-children")[0];t&&P(this._firstChild(t)).children(".jstree-anchor").trigger("focus")}},down:function(e){e.preventDefault();var t=this.get_next_dom(e.currentTarget);t&&t.length&&t.children(".jstree-anchor").trigger("focus")},"*":function(e){this.open_all()},home:function(e){e.preventDefault();var t=this._firstChild(this.get_container_ul()[0]);t&&P(t).children(".jstree-anchor").filter(":visible").trigger("focus")},end:function(e){e.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().trigger("focus")},f2:function(e){e.preventDefault(),this.edit(e.currentTarget)}}},P.jstree.core.prototype={plugin:function(e,t){var n=P.jstree.plugins[e];return n?(this._data[e]={},n.prototype=this,new n(t,this)):this},init:function(e,t){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[P.jstree.root]={id:P.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=P(e).addClass("jstree jstree-"+this._id),this.settings=t,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html("<ul class='jstree-container-ul jstree-children' role='group'><li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' role='treeitem' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(P.jstree.root)},destroy:function(e){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(e){}e||this.element.empty(),this.teardown()},_create_prototype_node:function(){var e,t,n=y.createElement("LI");return n.setAttribute("role","none"),(e=y.createElement("I")).className="jstree-icon jstree-ocl",e.setAttribute("role","presentation"),n.appendChild(e),(e=y.createElement("A")).className="jstree-anchor",e.setAttribute("href","#"),e.setAttribute("tabindex","-1"),e.setAttribute("role","treeitem"),(t=y.createElement("I")).className="jstree-icon jstree-themeicon",t.setAttribute("role","presentation"),e.appendChild(t),n.appendChild(e),e=t=null,n},_kbevent_to_func:function(e){var t=[];if(e.ctrlKey&&t.push("ctrl"),e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),t.push({8:"Backspace",9:"Tab",13:"Enter",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"}[e.which]||e.which),"shift-shift"===(t=t.sort().join("-").toLowerCase())||"ctrl-ctrl"===t||"alt-alt"===t)return null;var n,r,i=this.settings.core.keyboard;for(n in i)if(i.hasOwnProperty(n)&&("-"!==(r=n)&&"+"!==r&&(r=(r=r.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS")).split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),r===t))return i[n];return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var a="",o=null,t=0;this.element.on("dblclick.jstree",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;if(y.selection&&y.selection.empty)y.selection.empty();else if(window.getSelection){var t=window.getSelection();try{t.removeAllRanges(),t.collapse()}catch(e){}}}).on("mousedown.jstree",function(e){e.target===this.element[0]&&(e.preventDefault(),t=+new Date)}.bind(this)).on("mousedown.jstree",".jstree-ocl",function(e){e.preventDefault()}).on("click.jstree",".jstree-ocl",function(e){this.toggle_node(e.target)}.bind(this)).on("dblclick.jstree",".jstree-anchor",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;this.settings.core.dblclick_toggle&&this.toggle_node(e.target)}.bind(this)).on("click.jstree",".jstree-anchor",function(e){e.preventDefault(),e.currentTarget!==y.activeElement&&P(e.currentTarget).trigger("focus"),this.activate_node(e.currentTarget,e)}.bind(this)).on("keydown.jstree",".jstree-anchor",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;this._data.core.rtl&&(37===e.which?e.which=39:39===e.which&&(e.which=37));var t=this._kbevent_to_func(e);if(t){var n=t.call(this,e);if(!1===n||!0===n)return n}}.bind(this)).on("load_node.jstree",function(e,t){t.status&&(t.node.id!==P.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var e,t,n=[];for(e=0,t=this._data.core.selected.length;e<t;e++)n=n.concat(this._model.data[this._data.core.selected[e]].parents);for(e=0,t=(n=P.vakata.array_unique(n)).length;e<t;e++)this.open_node(n[e],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}}.bind(this),0))}.bind(this)).on("keypress.jstree",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;o&&clearTimeout(o),o=setTimeout(function(){a=""},500);var n=String.fromCharCode(e.which).toLowerCase(),t=this.element.find(".jstree-anchor").filter(":visible"),r=t.index(y.activeElement)||0,i=!1;if(1<(a+=n).length){if(t.slice(r).each(function(e,t){if(0===P(t).text().toLowerCase().indexOf(a))return P(t).trigger("focus"),!(i=!0)}.bind(this)),i)return;if(t.slice(0,r).each(function(e,t){if(0===P(t).text().toLowerCase().indexOf(a))return P(t).trigger("focus"),!(i=!0)}.bind(this)),i)return}if(new RegExp("^"+n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(a)){if(t.slice(r+1).each(function(e,t){if(P(t).text().toLowerCase().charAt(0)===n)return P(t).trigger("focus"),!(i=!0)}.bind(this)),i)return;if(t.slice(0,r+1).each(function(e,t){if(P(t).text().toLowerCase().charAt(0)===n)return P(t).trigger("focus"),!(i=!0)}.bind(this)),i)return}}.bind(this)).on("init.jstree",function(){var e=this.settings.core.themes;this._data.core.themes.dots=e.dots,this._data.core.themes.stripes=e.stripes,this._data.core.themes.icons=e.icons,this._data.core.themes.ellipsis=e.ellipsis,this.set_theme(e.name||"default",e.url),this.set_theme_variant(e.variant)}.bind(this)).on("loading.jstree",function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()}.bind(this)).on("blur.jstree",".jstree-anchor",function(e){this._data.core.focused=null,P(e.currentTarget).filter(".jstree-hovered").trigger("mouseleave"),this.element.attr("tabindex","0")}.bind(this)).on("focus.jstree",".jstree-anchor",function(e){var t=this.get_node(e.currentTarget);t&&t.id&&(this._data.core.focused=t.id),this.element.find(".jstree-hovered").not(e.currentTarget).trigger("mouseleave"),P(e.currentTarget).trigger("mouseenter"),this.element.attr("tabindex","-1")}.bind(this)).on("focus.jstree",function(){if(500<+new Date-t&&!this._data.core.focused&&this.settings.core.restore_focus){t=0;var e=this.get_node(this.element.attr("aria-activedescendant"),!0);e&&e.find("> .jstree-anchor").trigger("focus")}}.bind(this)).on("mouseenter.jstree",".jstree-anchor",function(e){this.hover_node(e.currentTarget)}.bind(this)).on("mouseleave.jstree",".jstree-anchor",function(e){this.dehover_node(e.currentTarget)}.bind(this))},unbind:function(){this.element.off(".jstree"),P(y).off(".jstree-"+this._id)},trigger:function(e,t){t||(t={}),(t.instance=this).element.triggerHandler(e.replace(".jstree","")+".jstree",t)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(e){var t=this.settings.core.strings;return P.vakata.is_function(t)?t.call(this,e):t&&t[e]?t[e]:e},_firstChild:function(e){for(e=e?e.firstChild:null;null!==e&&1!==e.nodeType;)e=e.nextSibling;return e},_nextSibling:function(e){for(e=e?e.nextSibling:null;null!==e&&1!==e.nodeType;)e=e.nextSibling;return e},_previousSibling:function(e){for(e=e?e.previousSibling:null;null!==e&&1!==e.nodeType;)e=e.previousSibling;return e},get_node:function(e,t){var n;e&&e.id&&(e=e.id),e instanceof P&&e.length&&e[0].id&&(e=e[0].id);try{if(this._model.data[e])e=this._model.data[e];else if("string"==typeof e&&this._model.data[e.replace(/^#/,"")])e=this._model.data[e.replace(/^#/,"")];else if("string"==typeof e&&(n=P("#"+e.replace(P.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[n.closest(".jstree-node").attr("id")])e=this._model.data[n.closest(".jstree-node").attr("id")];else if((n=this.element.find(e)).length&&this._model.data[n.closest(".jstree-node").attr("id")])e=this._model.data[n.closest(".jstree-node").attr("id")];else{if(!(n=this.element.find(e)).length||!n.hasClass("jstree"))return!1;e=this._model.data[P.jstree.root]}return t&&(e=e.id===P.jstree.root?this.element:P("#"+e.id.replace(P.jstree.idregex,"\\$&"),this.element)),e}catch(e){return!1}},get_path:function(e,t,n){if(!(e=e.parents?e:this.get_node(e))||e.id===P.jstree.root||!e.parents)return!1;var r,i,a=[];for(a.push(n?e.id:e.text),r=0,i=e.parents.length;r<i;r++)a.push(n?e.parents[r]:this.get_text(e.parents[r]));return a=a.reverse().slice(1),t?a.join(t):a},get_next_dom:function(e,t){var n;if((e=this.get_node(e,!0))[0]===this.element[0]){for(n=this._firstChild(this.get_container_ul()[0]);n&&0===n.offsetHeight;)n=this._nextSibling(n);return!!n&&P(n)}if(!e||!e.length)return!1;if(t){for(n=e[0];(n=this._nextSibling(n))&&0===n.offsetHeight;);return!!n&&P(n)}if(e.hasClass("jstree-open")){for(n=this._firstChild(e.children(".jstree-children")[0]);n&&0===n.offsetHeight;)n=this._nextSibling(n);if(null!==n)return P(n)}for(n=e[0];(n=this._nextSibling(n))&&0===n.offsetHeight;);return null!==n?P(n):e.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(e,t){var n;if((e=this.get_node(e,!0))[0]===this.element[0]){for(n=this.get_container_ul()[0].lastChild;n&&0===n.offsetHeight;)n=this._previousSibling(n);return!!n&&P(n)}if(!e||!e.length)return!1;if(t){for(n=e[0];(n=this._previousSibling(n))&&0===n.offsetHeight;);return!!n&&P(n)}for(n=e[0];(n=this._previousSibling(n))&&0===n.offsetHeight;);if(null===n)return!(!(n=e[0].parentNode.parentNode)||!n.className||-1===n.className.indexOf("jstree-node"))&&P(n);for(e=P(n);e.hasClass("jstree-open");)e=e.children(".jstree-children").first().children(".jstree-node:visible:last");return e},get_parent:function(e){return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&e.parent},get_children_dom:function(e){return(e=this.get_node(e,!0))[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):!(!e||!e.length)&&e.children(".jstree-children").children(".jstree-node")},is_parent:function(e){return(e=this.get_node(e))&&(!1===e.state.loaded||0<e.children.length)},is_loaded:function(e){return(e=this.get_node(e))&&e.state.loaded},is_loading:function(e){return(e=this.get_node(e))&&e.state&&e.state.loading},is_open:function(e){return(e=this.get_node(e))&&e.state.opened},is_closed:function(e){return(e=this.get_node(e))&&this.is_parent(e)&&!e.state.opened},is_leaf:function(e){return!this.is_parent(e)},load_node:function(o,s){var e,t,n,r,i;if(P.vakata.is_array(o))return this._load_nodes(o.slice(),s),!0;if(!(o=this.get_node(o)))return s&&s.call(this,o,!1),!1;if(o.state.loaded){for(o.state.loaded=!1,n=0,r=o.parents.length;n<r;n++)this._model.data[o.parents[n]].children_d=P.vakata.array_filter(this._model.data[o.parents[n]].children_d,function(e){return-1===P.inArray(e,o.children_d)});for(e=0,t=o.children_d.length;e<t;e++)this._model.data[o.children_d[e]].state.selected&&(i=!0),delete this._model.data[o.children_d[e]];i&&(this._data.core.selected=P.vakata.array_filter(this._data.core.selected,function(e){return-1===P.inArray(e,o.children_d)})),o.children=[],o.children_d=[],i&&this.trigger("changed",{action:"load_node",node:o,selected:this._data.core.selected})}return o.state.failed=!1,o.state.loading=!0,this.get_node(o,!0).addClass("jstree-loading").attr("aria-busy",!0),this._load_node(o,function(e){(o=this._model.data[o.id]).state.loading=!1,o.state.loaded=e,o.state.failed=!o.state.loaded;var t,n=this.get_node(o,!0),r=0,i=this._model.data,a=!1;for(r=0,t=o.children.length;r<t;r++)if(i[o.children[r]]&&!i[o.children[r]].state.hidden){a=!0;break}o.state.loaded&&n&&n.length&&(n.removeClass("jstree-closed jstree-open jstree-leaf"),a?"#"!==o.id&&n.addClass(o.state.opened?"jstree-open":"jstree-closed"):n.addClass("jstree-leaf")),n.removeClass("jstree-loading").attr("aria-busy",!1),this.trigger("load_node",{node:o,status:e}),s&&s.call(this,o,e)}.bind(this)),!0},_load_nodes:function(e,t,n,r){var i,a,o=!0,s=function(){this._load_nodes(e,t,!0)},c=this._model.data,l=[];for(i=0,a=e.length;i<a;i++)c[e[i]]&&(!c[e[i]].state.loaded&&!c[e[i]].state.failed||!n&&r)&&(this.is_loading(e[i])||this.load_node(e[i],s),o=!1);if(o){for(i=0,a=e.length;i<a;i++)c[e[i]]&&c[e[i]].state.loaded&&l.push(e[i]);t&&!t.done&&(t.call(this,l),t.done=!0)}},load_all:function(e,t){if(e||(e=P.jstree.root),!(e=this.get_node(e)))return!1;var n,r,i=[],a=this._model.data,o=a[e.id].children_d;for(e.state&&!e.state.loaded&&i.push(e.id),n=0,r=o.length;n<r;n++)a[o[n]]&&a[o[n]].state&&!a[o[n]].state.loaded&&i.push(o[n]);i.length?this._load_nodes(i,function(){this.load_all(e,t)}):(t&&t.call(this,e),this.trigger("load_all",{node:e}))},_load_node:function(i,a){var e,t=this.settings.core.data,o=function(){return 3!==this.nodeType&&8!==this.nodeType};return t?P.vakata.is_function(t)?t.call(this,i,function(e){!1===e?a.call(this,!1):this["string"==typeof e?"_append_html_data":"_append_json_data"](i,"string"==typeof e?P(P.parseHTML(e)).filter(o):e,function(e){a.call(this,e)})}.bind(this)):"object"==typeof t?t.url?(t=P.extend(!0,{},t),P.vakata.is_function(t.url)&&(t.url=t.url.call(this,i)),P.vakata.is_function(t.data)&&(t.data=t.data.call(this,i)),P.ajax(t).done(function(e,t,n){var r=n.getResponseHeader("Content-Type");return r&&-1!==r.indexOf("json")||"object"==typeof e?this._append_json_data(i,e,function(e){a.call(this,e)}):r&&-1!==r.indexOf("html")||"string"==typeof e?this._append_html_data(i,P(P.parseHTML(e)).filter(o),function(e){a.call(this,e)}):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:i.id,xhr:n})},this.settings.core.error.call(this,this._data.core.last_error),a.call(this,!1))}.bind(this)).fail(function(e){this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:i.id,xhr:e})},a.call(this,!1),this.settings.core.error.call(this,this._data.core.last_error)}.bind(this))):(e=P.vakata.is_array(t)?P.extend(!0,[],t):P.isPlainObject(t)?P.extend(!0,{},t):t,i.id===P.jstree.root?this._append_json_data(i,e,function(e){a.call(this,e)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could not load node",data:JSON.stringify({id:i.id})},this.settings.core.error.call(this,this._data.core.last_error),a.call(this,!1))):"string"==typeof t?i.id===P.jstree.root?this._append_html_data(i,P(P.parseHTML(t)).filter(o),function(e){a.call(this,e)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could not load node",data:JSON.stringify({id:i.id})},this.settings.core.error.call(this,this._data.core.last_error),a.call(this,!1)):a.call(this,!1):i.id===P.jstree.root?this._append_html_data(i,this._data.core.original_container_html.clone(!0),function(e){a.call(this,e)}):a.call(this,!1)},_node_changed:function(e){(e=this.get_node(e))&&-1===P.inArray(e.id,this._model.changed)&&this._model.changed.push(e.id)},_append_html_data:function(e,t,n){(e=this.get_node(e)).children=[],e.children_d=[];var r,i,a,o=t.is("ul")?t.children():t,s=e.id,c=[],l=[],u=this._model.data,f=u[s],d=this._data.core.selected.length;for(o.each(function(e,t){(r=this._parse_model_from_html(P(t),s,f.parents.concat()))&&(c.push(r),l.push(r),u[r].children_d.length&&(l=l.concat(u[r].children_d)))}.bind(this)),f.children=c,f.children_d=l,i=0,a=f.parents.length;i<a;i++)u[f.parents[i]].children_d=u[f.parents[i]].children_d.concat(l);this.trigger("model",{nodes:l,parent:s}),s!==P.jstree.root?(this._node_changed(s),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==d&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),n.call(this,!0)},_append_json_data:function(e,t,c,n){if(null!==this.element){(e=this.get_node(e)).children=[],e.children_d=[],t.d&&"string"==typeof(t=t.d)&&(t=JSON.parse(t)),P.vakata.is_array(t)||(t=[t]);var r=null,i={df:this._model.default_state,dat:t,par:e.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},v=this,a=function(e,l){e.data&&(e=e.data);var t,n,r,i,a=e.dat,o=e.par,s=[],c=[],u=[],f=e.df,d=e.t_id,h=e.t_cnt,p=e.m,m=p[o],g=e.sel,_=function(e,t,n){n=n?n.concat():[],t&&n.unshift(t);var r,i,a,o,s=e.id.toString(),c={id:s,text:e.text||"",icon:e.icon===l||e.icon,parent:t,parents:n,children:e.children||[],children_d:e.children_d||[],data:e.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(r in f)f.hasOwnProperty(r)&&(c.state[r]=f[r]);if(e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(c.icon=e.data.jstree.icon),c.icon!==l&&null!==c.icon&&""!==c.icon||(c.icon=!0),e&&e.data&&(c.data=e.data,e.data.jstree))for(r in e.data.jstree)e.data.jstree.hasOwnProperty(r)&&(c.state[r]=e.data.jstree[r]);if(e&&"object"==typeof e.state)for(r in e.state)e.state.hasOwnProperty(r)&&(c.state[r]=e.state[r]);if(e&&"object"==typeof e.li_attr)for(r in e.li_attr)e.li_attr.hasOwnProperty(r)&&(c.li_attr[r]=e.li_attr[r]);if(c.li_attr.id||(c.li_attr.id=s),e&&"object"==typeof e.a_attr)for(r in e.a_attr)e.a_attr.hasOwnProperty(r)&&(c.a_attr[r]=e.a_attr[r]);for(e&&e.children&&!0===e.children&&(c.state.loaded=!1,c.children=[],c.children_d=[]),r=0,i=(p[c.id]=c).children.length;r<i;r++)a=_(p[c.children[r]],c.id,n),o=p[a],c.children_d.push(a),o.children_d.length&&(c.children_d=c.children_d.concat(o.children_d));return delete e.data,delete e.children,p[c.id].original=e,c.state.selected&&u.push(c.id),c.id},b=function(e,t,n){n=n?n.concat():[],t&&n.unshift(t);for(var r,i,a,o,s,c=!1;c="j"+d+"_"+ ++h,p[c];);for(r in s={id:!1,text:"string"==typeof e?e:"",icon:"object"!=typeof e||e.icon===l||e.icon,parent:t,parents:n,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},f)f.hasOwnProperty(r)&&(s.state[r]=f[r]);if(e&&e.id&&(s.id=e.id.toString()),e&&e.text&&(s.text=e.text),e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(s.icon=e.data.jstree.icon),s.icon!==l&&null!==s.icon&&""!==s.icon||(s.icon=!0),e&&e.data&&(s.data=e.data,e.data.jstree))for(r in e.data.jstree)e.data.jstree.hasOwnProperty(r)&&(s.state[r]=e.data.jstree[r]);if(e&&"object"==typeof e.state)for(r in e.state)e.state.hasOwnProperty(r)&&(s.state[r]=e.state[r]);if(e&&"object"==typeof e.li_attr)for(r in e.li_attr)e.li_attr.hasOwnProperty(r)&&(s.li_attr[r]=e.li_attr[r]);if(s.li_attr.id&&!s.id&&(s.id=s.li_attr.id.toString()),s.id||(s.id=c),s.li_attr.id||(s.li_attr.id=s.id),e&&"object"==typeof e.a_attr)for(r in e.a_attr)e.a_attr.hasOwnProperty(r)&&(s.a_attr[r]=e.a_attr[r]);if(e&&e.children&&e.children.length){for(r=0,i=e.children.length;r<i;r++)a=b(e.children[r],s.id,n),o=p[a],s.children.push(a),o.children_d.length&&(s.children_d=s.children_d.concat(o.children_d));s.children_d=s.children_d.concat(s.children)}return e&&e.children&&!0===e.children&&(s.state.loaded=!1,s.children=[],s.children_d=[]),delete e.data,delete e.children,s.original=e,(p[s.id]=s).state.selected&&u.push(s.id),s.id};if(a.length&&a[0].id!==l&&a[0].parent!==l){for(n=0,r=a.length;n<r;n++)a[n].children||(a[n].children=[]),a[n].state||(a[n].state={}),p[a[n].id.toString()]=a[n];for(n=0,r=a.length;n<r;n++)p[a[n].parent.toString()]?(p[a[n].parent.toString()].children.push(a[n].id.toString()),m.children_d.push(a[n].id.toString())):void 0!==v&&(v._data.core.last_error={error:"parse",plugin:"core",id:"core_07",reason:"Node with invalid parent",data:JSON.stringify({id:a[n].id.toString(),parent:a[n].parent.toString()})},v.settings.core.error.call(v,v._data.core.last_error));for(n=0,r=m.children.length;n<r;n++)t=_(p[m.children[n]],o,m.parents.concat()),c.push(t),p[t].children_d.length&&(c=c.concat(p[t].children_d));for(n=0,r=m.parents.length;n<r;n++)p[m.parents[n]].children_d=p[m.parents[n]].children_d.concat(c);i={cnt:h,mod:p,sel:g,par:o,dpc:c,add:u}}else{for(n=0,r=a.length;n<r;n++)(t=b(a[n],o,m.parents.concat()))&&(s.push(t),c.push(t),p[t].children_d.length&&(c=c.concat(p[t].children_d)));for(m.children=s,m.children_d=c,n=0,r=m.parents.length;n<r;n++)p[m.parents[n]].children_d=p[m.parents[n]].children_d.concat(c);i={cnt:h,mod:p,sel:g,par:o,dpc:c,add:u}}if("undefined"!=typeof window&&void 0!==window.document)return i;postMessage(i)},o=function(e,t){if(null!==this.element){this._cnt=e.cnt;var n,r=this._model.data;for(n in r)r.hasOwnProperty(n)&&r[n].state&&r[n].state.loading&&e.mod[n]&&(e.mod[n].state.loading=!0);if(this._model.data=e.mod,t){var i,a=e.add,o=e.sel,s=this._data.core.selected.slice();if(r=this._model.data,o.length!==s.length||P.vakata.array_unique(o.concat(s)).length!==o.length){for(n=0,i=o.length;n<i;n++)-1===P.inArray(o[n],a)&&-1===P.inArray(o[n],s)&&(r[o[n]].state.selected=!1);for(n=0,i=s.length;n<i;n++)-1===P.inArray(s[n],o)&&(r[s[n]].state.selected=!0)}}e.add.length&&(this._data.core.selected=this._data.core.selected.concat(e.add)),this.trigger("model",{nodes:e.dpc,parent:e.par}),e.par!==P.jstree.root?(this._node_changed(e.par),this.redraw()):this.redraw(!0),e.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),!t&&l?l(function(){c.call(v,!0)}):c.call(v,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+a.toString()],{type:"text/javascript"}))),!this._data.core.working||n?(this._data.core.working=!0,(r=new window.Worker(this._wrk)).onmessage=function(e){o.call(this,e.data,!0);try{r.terminate(),r=null}catch(e){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}.bind(this),i.par?r.postMessage(i):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([e,t,c,!0])}catch(e){o.call(this,a(i),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else o.call(this,a(i),!1)}},_parse_model_from_html:function(e,t,n){n=n?[].concat(n):[],t&&n.unshift(t);var r,i,a,o,s,c=this._model.data,l={id:!1,text:!1,icon:!0,parent:t,parents:n,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(a in this._model.default_state)this._model.default_state.hasOwnProperty(a)&&(l.state[a]=this._model.default_state[a]);if(o=P.vakata.attributes(e,!0),P.each(o,function(e,t){if(!(t=P.vakata.trim(t)).length)return!0;l.li_attr[e]=t,"id"===e&&(l.id=t.toString())}),(o=e.children("a").first()).length&&(o=P.vakata.attributes(o,!0),P.each(o,function(e,t){(t=P.vakata.trim(t)).length&&(l.a_attr[e]=t)})),(o=e.children("a").first().length?e.children("a").first().clone():e.clone()).children("ins, i, ul").remove(),o=o.html(),o=P("<div></div>").html(o),l.text=this.settings.core.force_text?o.text():o.html(),o=e.data(),l.data=o?P.extend(!0,{},o):null,l.state.opened=e.hasClass("jstree-open"),l.state.selected=e.children("a").hasClass("jstree-clicked"),l.state.disabled=e.children("a").hasClass("jstree-disabled"),l.data&&l.data.jstree)for(a in l.data.jstree)l.data.jstree.hasOwnProperty(a)&&(l.state[a]=l.data.jstree[a]);for((o=e.children("a").children(".jstree-themeicon")).length&&(l.icon=!o.hasClass("jstree-themeicon-hidden")&&o.attr("rel")),l.state.icon!==M&&(l.icon=l.state.icon),l.icon!==M&&null!==l.icon&&""!==l.icon||(l.icon=!0),o=e.children("ul").children("li");c[s="j"+this._id+"_"+ ++this._cnt];);return l.id=l.li_attr.id?l.li_attr.id.toString():s,o.length?(o.each(function(e,t){r=this._parse_model_from_html(P(t),l.id,n),i=this._model.data[r],l.children.push(r),i.children_d.length&&(l.children_d=l.children_d.concat(i.children_d))}.bind(this)),l.children_d=l.children_d.concat(l.children)):e.hasClass("jstree-closed")&&(l.state.loaded=!1),l.li_attr.class&&(l.li_attr.class=l.li_attr.class.replace("jstree-closed","").replace("jstree-open","")),l.a_attr.class&&(l.a_attr.class=l.a_attr.class.replace("jstree-clicked","").replace("jstree-disabled","")),(c[l.id]=l).state.selected&&this._data.core.selected.push(l.id),l.id},_parse_model_from_flat_json:function(e,t,n){n=n?n.concat():[],t&&n.unshift(t);var r,i,a,o,s=e.id.toString(),c=this._model.data,l=this._model.default_state,u={id:s,text:e.text||"",icon:e.icon===M||e.icon,parent:t,parents:n,children:e.children||[],children_d:e.children_d||[],data:e.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(r in l)l.hasOwnProperty(r)&&(u.state[r]=l[r]);if(e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(u.icon=e.data.jstree.icon),u.icon!==M&&null!==u.icon&&""!==u.icon||(u.icon=!0),e&&e.data&&(u.data=e.data,e.data.jstree))for(r in e.data.jstree)e.data.jstree.hasOwnProperty(r)&&(u.state[r]=e.data.jstree[r]);if(e&&"object"==typeof e.state)for(r in e.state)e.state.hasOwnProperty(r)&&(u.state[r]=e.state[r]);if(e&&"object"==typeof e.li_attr)for(r in e.li_attr)e.li_attr.hasOwnProperty(r)&&(u.li_attr[r]=e.li_attr[r]);if(u.li_attr.id||(u.li_attr.id=s),e&&"object"==typeof e.a_attr)for(r in e.a_attr)e.a_attr.hasOwnProperty(r)&&(u.a_attr[r]=e.a_attr[r]);for(e&&e.children&&!0===e.children&&(u.state.loaded=!1,u.children=[],u.children_d=[]),r=0,i=(c[u.id]=u).children.length;r<i;r++)o=c[a=this._parse_model_from_flat_json(c[u.children[r]],u.id,n)],u.children_d.push(a),o.children_d.length&&(u.children_d=u.children_d.concat(o.children_d));return delete e.data,delete e.children,c[u.id].original=e,u.state.selected&&this._data.core.selected.push(u.id),u.id},_parse_model_from_json:function(e,t,n){n=n?n.concat():[],t&&n.unshift(t);for(var r,i,a,o,s,c=!1,l=this._model.data,u=this._model.default_state;l[c="j"+this._id+"_"+ ++this._cnt];);for(r in s={id:!1,text:"string"==typeof e?e:"",icon:"object"!=typeof e||e.icon===M||e.icon,parent:t,parents:n,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},u)u.hasOwnProperty(r)&&(s.state[r]=u[r]);if(e&&e.id&&(s.id=e.id.toString()),e&&e.text&&(s.text=e.text),e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(s.icon=e.data.jstree.icon),s.icon!==M&&null!==s.icon&&""!==s.icon||(s.icon=!0),e&&e.data&&(s.data=e.data,e.data.jstree))for(r in e.data.jstree)e.data.jstree.hasOwnProperty(r)&&(s.state[r]=e.data.jstree[r]);if(e&&"object"==typeof e.state)for(r in e.state)e.state.hasOwnProperty(r)&&(s.state[r]=e.state[r]);if(e&&"object"==typeof e.li_attr)for(r in e.li_attr)e.li_attr.hasOwnProperty(r)&&(s.li_attr[r]=e.li_attr[r]);if(s.li_attr.id&&!s.id&&(s.id=s.li_attr.id.toString()),s.id||(s.id=c),s.li_attr.id||(s.li_attr.id=s.id),e&&"object"==typeof e.a_attr)for(r in e.a_attr)e.a_attr.hasOwnProperty(r)&&(s.a_attr[r]=e.a_attr[r]);if(e&&e.children&&e.children.length){for(r=0,i=e.children.length;r<i;r++)o=l[a=this._parse_model_from_json(e.children[r],s.id,n)],s.children.push(a),o.children_d.length&&(s.children_d=s.children_d.concat(o.children_d));s.children_d=s.children.concat(s.children_d)}return e&&e.children&&!0===e.children&&(s.state.loaded=!1,s.children=[],s.children_d=[]),delete e.data,delete e.children,s.original=e,(l[s.id]=s).state.selected&&this._data.core.selected.push(s.id),s.id},_redraw:function(){var e,t,n,r=this._model.force_full_redraw?this._model.data[P.jstree.root].children.concat([]):this._model.changed.concat([]),i=y.createElement("UL"),a=this._data.core.focused;for(t=0,n=r.length;t<n;t++)(e=this.redraw_node(r[t],!0,this._model.force_full_redraw))&&this._model.force_full_redraw&&i.appendChild(e);this._model.force_full_redraw&&(i.className=this.get_container_ul()[0].className,i.setAttribute("role","group"),this.element.empty().append(i)),null!==a&&this.settings.core.restore_focus&&((e=this.get_node(a,!0))&&e.length&&e.children(".jstree-anchor")[0]!==y.activeElement?e.children(".jstree-anchor").trigger("focus"):this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:r})},redraw:function(e){e&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(e){var t=this.get_node(e),n=!1,r=!1,i=!1,a=y;if(!t)return!1;if(t.id===P.jstree.root)return this.redraw(!0);if(!(e=this.get_node(e,!0))||!e.length)return!1;if(e.children(".jstree-children").remove(),e=e[0],t.children.length&&t.state.loaded){for((i=a.createElement("UL")).setAttribute("role","group"),i.className="jstree-children",n=0,r=t.children.length;n<r;n++)i.appendChild(this.redraw_node(t.children[n],!0,!0));e.appendChild(i)}},redraw_node:function(e,t,n,r){var i=this.get_node(e),a=!1,o=!1,s=!1,c=!1,l=!1,u=!1,f="",d=y,h=this._model.data,p=!1,m=null,g=0,_=0,b=!1,v=!1;if(!i)return!1;if(i.id===P.jstree.root)return this.redraw(!0);if(t=t||0===i.children.length,e=y.querySelector?this.element[0].querySelector("#"+(-1!=="0123456789".indexOf(i.id[0])?"\\3"+i.id[0]+" "+i.id.substr(1).replace(P.jstree.idregex,"\\$&"):i.id.replace(P.jstree.idregex,"\\$&"))):y.getElementById(i.id))e=P(e),n||((a=e.parent().parent()[0])===this.element[0]&&(a=null),o=e.index()),t||!i.children.length||e.children(".jstree-children").length||(t=!0),t||(s=e.children(".jstree-children")[0]),p=e.children(".jstree-anchor")[0]===y.activeElement,e.remove();else if(t=!0,!n){if(!(null===(a=i.parent!==P.jstree.root?P("#"+i.parent.replace(P.jstree.idregex,"\\$&"),this.element)[0]:null)||a&&h[i.parent].state.opened))return!1;o=P.inArray(i.id,null===a?h[P.jstree.root].children:h[i.parent].children)}for(c in e=this._data.core.node.cloneNode(!0),f="jstree-node ",i.li_attr)if(i.li_attr.hasOwnProperty(c)){if("id"===c)continue;"class"!==c?e.setAttribute(c,i.li_attr[c]):f+=i.li_attr[c]}for(i.a_attr.id||(i.a_attr.id=i.id+"_anchor"),e.childNodes[1].setAttribute("aria-selected",!!i.state.selected),e.childNodes[1].setAttribute("aria-level",i.parents.length),this.settings.core.compute_elements_positions&&(e.childNodes[1].setAttribute("aria-setsize",h[i.parent].children.length),e.childNodes[1].setAttribute("aria-posinset",h[i.parent].children.indexOf(i.id)+1)),i.state.disabled&&e.childNodes[1].setAttribute("aria-disabled",!0),c=0,l=i.children.length;c<l;c++)if(!h[i.children[c]].state.hidden){b=!0;break}if(null!==i.parent&&h[i.parent]&&!i.state.hidden&&(c=P.inArray(i.id,h[i.parent].children),v=i.id,-1!==c))for(c++,l=h[i.parent].children.length;c<l&&(h[h[i.parent].children[c]].state.hidden||(v=h[i.parent].children[c]),v===i.id);c++);for(l in i.state.hidden&&(f+=" jstree-hidden"),i.state.loading&&(f+=" jstree-loading"),i.state.loaded&&!b?f+=" jstree-leaf":(f+=i.state.opened&&i.state.loaded?" jstree-open":" jstree-closed",e.childNodes[1].setAttribute("aria-expanded",i.state.opened&&i.state.loaded)),v===i.id&&(f+=" jstree-last"),e.id=i.id,e.className=f,f=(i.state.selected?" jstree-clicked":"")+(i.state.disabled?" jstree-disabled":""),i.a_attr)if(i.a_attr.hasOwnProperty(l)){if("href"===l&&"#"===i.a_attr[l])continue;"class"!==l?e.childNodes[1].setAttribute(l,i.a_attr[l]):f+=" "+i.a_attr[l]}if(f.length&&(e.childNodes[1].className="jstree-anchor "+f),(i.icon&&!0!==i.icon||!1===i.icon)&&(!1===i.icon?e.childNodes[1].childNodes[0].className+=" jstree-themeicon-hidden":-1===i.icon.indexOf("/")&&-1===i.icon.indexOf(".")?e.childNodes[1].childNodes[0].className+=" "+i.icon+" jstree-themeicon-custom":(e.childNodes[1].childNodes[0].style.backgroundImage='url("'+i.icon+'")',e.childNodes[1].childNodes[0].style.backgroundPosition="center center",e.childNodes[1].childNodes[0].style.backgroundSize="auto",e.childNodes[1].childNodes[0].className+=" jstree-themeicon-custom")),this.settings.core.force_text?e.childNodes[1].appendChild(d.createTextNode(i.text)):e.childNodes[1].innerHTML+=i.text,t&&i.children.length&&(i.state.opened||r)&&i.state.loaded){for((u=d.createElement("UL")).setAttribute("role","group"),u.className="jstree-children",c=0,l=i.children.length;c<l;c++)u.appendChild(this.redraw_node(i.children[c],t,!0));e.appendChild(u)}if(s&&e.appendChild(s),!n){for(a||(a=this.element[0]),c=0,l=a.childNodes.length;c<l;c++)if(a.childNodes[c]&&a.childNodes[c].className&&-1!==a.childNodes[c].className.indexOf("jstree-children")){m=a.childNodes[c];break}m||((m=d.createElement("UL")).setAttribute("role","group"),m.className="jstree-children",a.appendChild(m)),o<(a=m).childNodes.length?a.insertBefore(e,a.childNodes[o]):a.appendChild(e),p&&(g=this.element[0].scrollTop,_=this.element[0].scrollLeft,e.childNodes[1].focus(),this.element[0].scrollTop=g,this.element[0].scrollLeft=_)}return i.state.opened&&!i.state.loaded&&(i.state.opened=!1,setTimeout(function(){this.open_node(i.id,!1,0)}.bind(this),0)),e},open_node:function(e,n,r){var t,i,a,o;if(P.vakata.is_array(e)){for(t=0,i=(e=e.slice()).length;t<i;t++)this.open_node(e[t],n,r);return!0}return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&(r=r===M?this.settings.core.animation:r,this.is_closed(e)?this.is_loaded(e)?(a=this.get_node(e,!0),o=this,a.length&&(r&&a.children(".jstree-children").length&&a.children(".jstree-children").stop(!0,!0),e.children.length&&!this._firstChild(a.children(".jstree-children")[0])&&this.draw_children(e),r?(this.trigger("before_open",{node:e}),a.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").children(".jstree-anchor").attr("aria-expanded",!0).end().children(".jstree-children").stop(!0,!0).slideDown(r,function(){this.style.display="",o.element&&o.trigger("after_open",{node:e})})):(this.trigger("before_open",{node:e}),a[0].className=a[0].className.replace("jstree-closed","jstree-open"),a[0].childNodes[1].setAttribute("aria-expanded",!0))),e.state.opened=!0,n&&n.call(this,e,!0),a.length||this.trigger("before_open",{node:e}),this.trigger("open_node",{node:e}),r&&a.length||this.trigger("after_open",{node:e}),!0):this.is_loading(e)?setTimeout(function(){this.open_node(e,n,r)}.bind(this),500):void this.load_node(e,function(e,t){return t?this.open_node(e,n,r):!!n&&n.call(this,e,!1)}):(n&&n.call(this,e,!1),!1))},_open_to:function(e){if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;var t,n,r=e.parents;for(t=0,n=r.length;t<n;t+=1)t!==P.jstree.root&&this.open_node(r[t],!1,0);return P("#"+e.id.replace(P.jstree.idregex,"\\$&"),this.element)},close_node:function(e,t){var n,r,i,a;if(P.vakata.is_array(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.close_node(e[n],t);return!0}return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&(!this.is_closed(e)&&(t=t===M?this.settings.core.animation:t,a=(i=this).get_node(e,!0),e.state.opened=!1,this.trigger("close_node",{node:e}),void(a.length?t?a.children(".jstree-children").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").children(".jstree-anchor").attr("aria-expanded",!1).end().children(".jstree-children").stop(!0,!0).slideUp(t,function(){this.style.display="",a.children(".jstree-children").remove(),i.element&&i.trigger("after_close",{node:e})}):(a[0].className=a[0].className.replace("jstree-open","jstree-closed"),a.children(".jstree-anchor").attr("aria-expanded",!1),a.children(".jstree-children").remove(),this.trigger("after_close",{node:e})):this.trigger("after_close",{node:e}))))},toggle_node:function(e){var t,n;if(P.vakata.is_array(e)){for(t=0,n=(e=e.slice()).length;t<n;t++)this.toggle_node(e[t]);return!0}return this.is_closed(e)?this.open_node(e):this.is_open(e)?this.close_node(e):void 0},open_all:function(e,n,r){if(e||(e=P.jstree.root),!(e=this.get_node(e)))return!1;var t,i,a,o=e.id===P.jstree.root?this.get_container_ul():this.get_node(e,!0);if(!o.length){for(t=0,i=e.children_d.length;t<i;t++)this.is_closed(this._model.data[e.children_d[t]])&&(this._model.data[e.children_d[t]].state.opened=!0);return this.trigger("open_all",{node:e})}r=r||o,(o=(a=this).is_closed(e)?o.find(".jstree-closed").addBack():o.find(".jstree-closed")).each(function(){a.open_node(this,function(e,t){t&&this.is_parent(e)&&this.open_all(e,n,r)},n||0)}),0===r.find(".jstree-closed").length&&this.trigger("open_all",{node:this.get_node(r)})},close_all:function(e,t){if(e||(e=P.jstree.root),!(e=this.get_node(e)))return!1;var n,r,i=e.id===P.jstree.root?this.get_container_ul():this.get_node(e,!0),a=this;for(i.length&&(i=this.is_open(e)?i.find(".jstree-open").addBack():i.find(".jstree-open"),P(i.get().reverse()).each(function(){a.close_node(this,t||0)})),n=0,r=e.children_d.length;n<r;n++)this._model.data[e.children_d[n]].state.opened=!1;this.trigger("close_all",{node:e})},is_disabled:function(e){return(e=this.get_node(e))&&e.state&&e.state.disabled},enable_node:function(e){var t,n;if(P.vakata.is_array(e)){for(t=0,n=(e=e.slice()).length;t<n;t++)this.enable_node(e[t]);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;e.state.disabled=!1,this.get_node(e,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),this.trigger("enable_node",{node:e})},disable_node:function(e){var t,n;if(P.vakata.is_array(e)){for(t=0,n=(e=e.slice()).length;t<n;t++)this.disable_node(e[t]);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;e.state.disabled=!0,this.get_node(e,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),this.trigger("disable_node",{node:e})},is_hidden:function(e){return!0===(e=this.get_node(e)).state.hidden},hide_node:function(e,t){var n,r;if(P.vakata.is_array(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.hide_node(e[n],!0);return t||this.redraw(),!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;e.state.hidden||(e.state.hidden=!0,this._node_changed(e.parent),t||this.redraw(),this.trigger("hide_node",{node:e}))},show_node:function(e,t){var n,r;if(P.vakata.is_array(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.show_node(e[n],!0);return t||this.redraw(),!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;e.state.hidden&&(e.state.hidden=!1,this._node_changed(e.parent),t||this.redraw(),this.trigger("show_node",{node:e}))},hide_all:function(e){var t,n=this._model.data,r=[];for(t in n)n.hasOwnProperty(t)&&t!==P.jstree.root&&!n[t].state.hidden&&(n[t].state.hidden=!0,r.push(t));return this._model.force_full_redraw=!0,e||this.redraw(),this.trigger("hide_all",{nodes:r}),r},show_all:function(e){var t,n=this._model.data,r=[];for(t in n)n.hasOwnProperty(t)&&t!==P.jstree.root&&n[t].state.hidden&&(n[t].state.hidden=!1,r.push(t));return this._model.force_full_redraw=!0,e||this.redraw(),this.trigger("show_all",{nodes:r}),r},activate_node:function(e,t){if(this.is_disabled(e))return!1;if(t&&"object"==typeof t||(t={}),this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==M?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),this.settings.core.multiple&&(t.metaKey||t.ctrlKey||t.shiftKey)&&(!t.shiftKey||this._data.core.last_clicked&&this.get_parent(e)&&this.get_parent(e)===this._data.core.last_clicked.parent))if(t.shiftKey){var n,r,i=this.get_node(e).id,a=this._data.core.last_clicked.id,o=this.get_node(this._data.core.last_clicked.parent).children,s=!1;for(n=0,r=o.length;n<r;n+=1)o[n]===i&&(s=!s),o[n]===a&&(s=!s),this.is_disabled(o[n])||!s&&o[n]!==i&&o[n]!==a?this.deselect_node(o[n],!0,t):this.is_hidden(o[n])||this.select_node(o[n],!0,!1,t);this.trigger("changed",{action:"select_node",node:this.get_node(e),selected:this._data.core.selected,event:t})}else this.is_selected(e)?this.deselect_node(e,!1,t):this.select_node(e,!1,!1,t);else!this.settings.core.multiple&&(t.metaKey||t.ctrlKey||t.shiftKey)&&this.is_selected(e)?this.deselect_node(e,!1,t):(this.deselect_all(!0),this.select_node(e,!1,!1,t),this._data.core.last_clicked=this.get_node(e));this.trigger("activate_node",{node:this.get_node(e),event:t})},hover_node:function(e){if(!(e=this.get_node(e,!0))||!e.length||e.children(".jstree-hovered").length)return!1;var t=this.element.find(".jstree-hovered"),n=this.element;t&&t.length&&this.dehover_node(t),e.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(e)}),setTimeout(function(){n.attr("aria-activedescendant",e[0].id)},0)},dehover_node:function(e){if(!(e=this.get_node(e,!0))||!e.length||!e.children(".jstree-hovered").length)return!1;e.children(".jstree-anchor").removeClass("jstree-hovered"),this.trigger("dehover_node",{node:this.get_node(e)})},select_node:function(e,t,n,r){var i,a,o;if(P.vakata.is_array(e)){for(a=0,o=(e=e.slice()).length;a<o;a++)this.select_node(e[a],t,n,r);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;i=this.get_node(e,!0),e.state.selected||(e.state.selected=!0,this._data.core.selected.push(e.id),n||(i=this._open_to(e)),i&&i.length&&i.children(".jstree-anchor").addClass("jstree-clicked").attr("aria-selected",!0),this.trigger("select_node",{node:e,selected:this._data.core.selected,event:r}),t||this.trigger("changed",{action:"select_node",node:e,selected:this._data.core.selected,event:r}))},deselect_node:function(e,t,n){var r,i,a;if(P.vakata.is_array(e)){for(r=0,i=(e=e.slice()).length;r<i;r++)this.deselect_node(e[r],t,n);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;a=this.get_node(e,!0),e.state.selected&&(e.state.selected=!1,this._data.core.selected=P.vakata.array_remove_item(this._data.core.selected,e.id),a.length&&a.children(".jstree-anchor").removeClass("jstree-clicked").attr("aria-selected",!1),this.trigger("deselect_node",{node:e,selected:this._data.core.selected,event:n}),t||this.trigger("changed",{action:"deselect_node",node:e,selected:this._data.core.selected,event:n}))},select_all:function(e){var t,n,r=this._data.core.selected.concat([]);for(this._data.core.selected=this._model.data[P.jstree.root].children_d.concat(),t=0,n=this._data.core.selected.length;t<n;t++)this._model.data[this._data.core.selected[t]]&&(this._model.data[this._data.core.selected[t]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),e||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:r})},deselect_all:function(e){var t,n,r=this._data.core.selected.concat([]);for(t=0,n=this._data.core.selected.length;t<n;t++)this._model.data[this._data.core.selected[t]]&&(this._model.data[this._data.core.selected[t]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:r}),e||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:r})},is_selected:function(e){return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&e.state.selected},get_selected:function(e){return e?P.map(this._data.core.selected,function(e){return this.get_node(e)}.bind(this)):this._data.core.selected.slice()},get_top_selected:function(e){var t,n,r,i,a=this.get_selected(!0),o={};for(t=0,n=a.length;t<n;t++)o[a[t].id]=a[t];for(t=0,n=a.length;t<n;t++)for(r=0,i=a[t].children_d.length;r<i;r++)o[a[t].children_d[r]]&&delete o[a[t].children_d[r]];for(t in a=[],o)o.hasOwnProperty(t)&&a.push(t);return e?P.map(a,function(e){return this.get_node(e)}.bind(this)):a},get_bottom_selected:function(e){var t,n,r=this.get_selected(!0),i=[];for(t=0,n=r.length;t<n;t++)r[t].children.length||i.push(r[t].id);return e?P.map(i,function(e){return this.get_node(e)}.bind(this)):i},get_state:function(){var e,t={core:{open:[],loaded:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}};for(e in this._model.data)this._model.data.hasOwnProperty(e)&&e!==P.jstree.root&&(this._model.data[e].state.loaded&&this.settings.core.loaded_state&&t.core.loaded.push(e),this._model.data[e].state.opened&&t.core.open.push(e),this._model.data[e].state.selected&&t.core.selected.push(e));return t},set_state:function(t,n){if(t){if(t.core&&t.core.selected&&t.core.initial_selection===M&&(t.core.initial_selection=this._data.core.selected.concat([]).sort().join(",")),t.core){var r,e;if(t.core.loaded)return this.settings.core.loaded_state&&P.vakata.is_array(t.core.loaded)&&t.core.loaded.length?this._load_nodes(t.core.loaded,function(e){delete t.core.loaded,this.set_state(t,n)}):(delete t.core.loaded,this.set_state(t,n)),!1;if(t.core.open)return P.vakata.is_array(t.core.open)&&t.core.open.length?this._load_nodes(t.core.open,function(e){this.open_node(e,!1,0),delete t.core.open,this.set_state(t,n)}):(delete t.core.open,this.set_state(t,n)),!1;if(t.core.scroll)return t.core.scroll&&t.core.scroll.left!==M&&this.element.scrollLeft(t.core.scroll.left),t.core.scroll&&t.core.scroll.top!==M&&this.element.scrollTop(t.core.scroll.top),delete t.core.scroll,this.set_state(t,n),!1;if(t.core.selected)return r=this,t.core.initial_selection!==M&&t.core.initial_selection!==this._data.core.selected.concat([]).sort().join(",")||(this.deselect_all(),P.each(t.core.selected,function(e,t){r.select_node(t,!1,!0)})),delete t.core.initial_selection,delete t.core.selected,this.set_state(t,n),!1;for(e in t)t.hasOwnProperty(e)&&"core"!==e&&-1===P.inArray(e,this.settings.plugins)&&delete t[e];if(P.isEmptyObject(t.core))return delete t.core,this.set_state(t,n),!1}return!P.isEmptyObject(t)||(t=null,n&&n.call(this),this.trigger("set_state"),!1)}return!1},refresh:function(e,t){this._data.core.state=!0===t?{}:this.get_state(),t&&P.vakata.is_function(t)&&(this._data.core.state=t.call(this,this._data.core.state)),this._cnt=0,this._model.data={},this._model.data[P.jstree.root]={id:P.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this._data.core.selected=[],this._data.core.last_clicked=null,this._data.core.focused=null;var n=this.get_container_ul()[0].className;e||(this.element.html("<ul class='"+n+"' role='group'><li class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none' id='j"+this._id+"_loading'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' role='treeitem' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(P.jstree.root,function(e,t){t&&(this.get_container_ul()[0].className=n,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(P.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(t){if(!(t=this.get_node(t))||t.id===P.jstree.root)return!1;var n=[],e=[],r=this._data.core.selected.concat([]);e.push(t.id),!0===t.state.opened&&n.push(t.id),this.get_node(t,!0).find(".jstree-open").each(function(){e.push(this.id),n.push(this.id)}),this._load_nodes(e,function(e){this.open_node(n,!1,0),this.select_node(r),this.trigger("refresh_node",{node:t,nodes:e})}.bind(this),!1,!0)},set_id:function(e,t){if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;var n,r,i=this._model.data,a=e.id;for(t=t.toString(),i[e.parent].children[P.inArray(e.id,i[e.parent].children)]=t,n=0,r=e.parents.length;n<r;n++)i[e.parents[n]].children_d[P.inArray(e.id,i[e.parents[n]].children_d)]=t;for(n=0,r=e.children.length;n<r;n++)i[e.children[n]].parent=t;for(n=0,r=e.children_d.length;n<r;n++)i[e.children_d[n]].parents[P.inArray(e.id,i[e.children_d[n]].parents)]=t;return-1!==(n=P.inArray(e.id,this._data.core.selected))&&(this._data.core.selected[n]=t),(n=this.get_node(e.id,!0))&&(n.attr("id",t),this.element.attr("aria-activedescendant")===e.id&&this.element.attr("aria-activedescendant",t)),delete i[e.id],e.id=t,i[e.li_attr.id=t]=e,this.trigger("set_id",{node:e,new:e.id,old:a}),!0},get_text:function(e){return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&e.text},set_text:function(e,t){var n,r;if(P.vakata.is_array(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.set_text(e[n],t);return!0}return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&(e.text=t,this.get_node(e,!0).length&&this.redraw_node(e.id),this.trigger("set_text",{obj:e,text:t}),!0)},get_json:function(e,t,n){if(!(e=this.get_node(e||P.jstree.root)))return!1;t&&t.flat&&!n&&(n=[]);var r,i,a={id:e.id,text:e.text,icon:this.get_icon(e),li_attr:P.extend(!0,{},e.li_attr),a_attr:P.extend(!0,{},e.a_attr),state:{},data:(!t||!t.no_data)&&P.extend(!0,P.vakata.is_array(e.data)?[]:{},e.data)};if(t&&t.flat?a.parent=e.parent:a.children=[],t&&t.no_state)delete a.state;else for(r in e.state)e.state.hasOwnProperty(r)&&(a.state[r]=e.state[r]);if(t&&t.no_li_attr&&delete a.li_attr,t&&t.no_a_attr&&delete a.a_attr,t&&t.no_id&&(delete a.id,a.li_attr&&a.li_attr.id&&delete a.li_attr.id,a.a_attr&&a.a_attr.id&&delete a.a_attr.id),t&&t.flat&&e.id!==P.jstree.root&&n.push(a),!t||!t.no_children)for(r=0,i=e.children.length;r<i;r++)t&&t.flat?this.get_json(e.children[r],t,n):a.children.push(this.get_json(e.children[r],t));return t&&t.flat?n:e.id===P.jstree.root?a.children:a},create_node:function(e,t,n,r,i){if(null===e&&(e=P.jstree.root),!(e=this.get_node(e)))return!1;if(!(n=n===M?"last":n).toString().match(/^(before|after)$/)&&!i&&!this.is_loaded(e))return this.load_node(e,function(){this.create_node(e,t,n,r,!0)});var a,o,s,c;switch(t||(t={text:this.get_string("New node")}),(t="string"==typeof t?{text:t}:P.extend(!0,{},t)).text===M&&(t.text=this.get_string("New node")),e.id===P.jstree.root&&("before"===n&&(n="first"),"after"===n&&(n="last")),n){case"before":a=this.get_node(e.parent),n=P.inArray(e.id,a.children),e=a;break;case"after":a=this.get_node(e.parent),n=P.inArray(e.id,a.children)+1,e=a;break;case"inside":case"first":n=0;break;case"last":n=e.children.length;break;default:n||(n=0)}if(n>e.children.length&&(n=e.children.length),t.id||(t.id=!0),!this.check("create_node",t,e,n))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!0===t.id&&delete t.id,!(t=this._parse_model_from_json(t,e.id,e.parents.concat())))return!1;for(a=this.get_node(t),(o=[]).push(t),o=o.concat(a.children_d),this.trigger("model",{nodes:o,parent:e.id}),e.children_d=e.children_d.concat(o),s=0,c=e.parents.length;s<c;s++)this._model.data[e.parents[s]].children_d=this._model.data[e.parents[s]].children_d.concat(o);for(t=a,a=[],s=0,c=e.children.length;s<c;s++)a[n<=s?s+1:s]=e.children[s];return a[n]=t.id,e.children=a,this.redraw_node(e,!0),this.trigger("create_node",{node:this.get_node(t),parent:e.id,position:n}),r&&r.call(this,this.get_node(t)),t.id},rename_node:function(e,t){var n,r,i;if(P.vakata.is_array(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.rename_node(e[n],t);return!0}return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&(i=e.text,this.check("rename_node",e,this.get_parent(e),t)?(this.set_text(e,t),this.trigger("rename_node",{node:e,text:t,old:i}),!0):(this.settings.core.error.call(this,this._data.core.last_error),!1))},delete_node:function(e){var t,n,r,i,a,o,s,c,l,u,f,d;if(P.vakata.is_array(e)){for(t=0,n=(e=e.slice()).length;t<n;t++)this.delete_node(e[t]);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;if(r=this.get_node(e.parent),i=P.inArray(e.id,r.children),u=!1,!this.check("delete_node",e,r,i))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==i&&(r.children=P.vakata.array_remove(r.children,i)),(a=e.children_d.concat([])).push(e.id),o=0,s=e.parents.length;o<s;o++)this._model.data[e.parents[o]].children_d=P.vakata.array_filter(this._model.data[e.parents[o]].children_d,function(e){return-1===P.inArray(e,a)});for(c=0,l=a.length;c<l;c++)if(this._model.data[a[c]].state.selected){u=!0;break}for(u&&(this._data.core.selected=P.vakata.array_filter(this._data.core.selected,function(e){return-1===P.inArray(e,a)})),this.trigger("delete_node",{node:e,parent:r.id}),u&&this.trigger("changed",{action:"delete_node",node:e,selected:this._data.core.selected,parent:r.id}),c=0,l=a.length;c<l;c++)delete this._model.data[a[c]];return-1!==P.inArray(this._data.core.focused,a)&&(this._data.core.focused=null,f=this.element[0].scrollTop,d=this.element[0].scrollLeft,r.id===P.jstree.root?this._model.data[P.jstree.root].children[0]&&this.get_node(this._model.data[P.jstree.root].children[0],!0).children(".jstree-anchor").triger("focus"):this.get_node(r,!0).children(".jstree-anchor").trigger("focus"),this.element[0].scrollTop=f,this.element[0].scrollLeft=d),this.redraw_node(r,!0),!0},check:function(e,t,n,r,i){t=t&&t.id?t:this.get_node(t),n=n&&n.id?n:this.get_node(n);var a=e.match(/^move_node|copy_node|create_node$/i)?n:t,o=this.settings.core.check_callback;if("move_node"===e||"copy_node"===e){if(!(i&&i.is_multi||"move_node"!==e||P.inArray(t.id,n.children)!==r))return!(this._data.core.last_error={error:"check",plugin:"core",id:"core_08",reason:"Moving node to its current position",data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})});if(!(i&&i.is_multi||t.id!==n.id&&("move_node"!==e||P.inArray(t.id,n.children)!==r)&&-1===P.inArray(n.id,t.children_d)))return!(this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})})}return a&&a.data&&(a=a.data),a&&a.functions&&(!1===a.functions[e]||!0===a.functions[e])?(!1===a.functions[e]&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})}),a.functions[e]):!(!1===o||P.vakata.is_function(o)&&!1===o.call(this,e,t,n,r,i)||o&&!1===o[e])||!(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})})},last_error:function(){return this._data.core.last_error},move_node:function(e,t,n,r,i,a,o){var s,c,l,u,f,d,h,p,m,g,_,b,v,y;if(t=this.get_node(t),n=n===M?0:n,!t)return!1;if(!n.toString().match(/^(before|after)$/)&&!i&&!this.is_loaded(t))return this.load_node(t,function(){this.move_node(e,t,n,r,!0,!1,o)});if(P.vakata.is_array(e)){if(1!==e.length){for(s=0,c=e.length;s<c;s++)(m=this.move_node(e[s],t,n,r,i,!1,o))&&(t=m,n="after");return this.redraw(),!0}e=e[0]}if(!(e=e&&e.id?e:this.get_node(e))||e.id===P.jstree.root)return!1;if(l=(e.parent||P.jstree.root).toString(),f=n.toString().match(/^(before|after)$/)&&t.id!==P.jstree.root?this.get_node(t.parent):t,h=!(d=o||(this._model.data[e.id]?this:P.jstree.reference(e.id)))||!d._id||this._id!==d._id,u=d&&d._id&&l&&d._model.data[l]&&d._model.data[l].children?P.inArray(e.id,d._model.data[l].children):-1,d&&d._id&&(e=d._model.data[e.id]),h)return!!(m=this.copy_node(e,t,n,r,i,!1,o))&&(d&&d.delete_node(e),m);switch(t.id===P.jstree.root&&("before"===n&&(n="first"),"after"===n&&(n="last")),n){case"before":n=P.inArray(t.id,f.children);break;case"after":n=P.inArray(t.id,f.children)+1;break;case"inside":case"first":n=0;break;case"last":n=f.children.length;break;default:n||(n=0)}if(n>f.children.length&&(n=f.children.length),!this.check("move_node",e,f,n,{core:!0,origin:o,is_multi:d&&d._id&&d._id!==this._id,is_foreign:!d||!d._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(e.parent===f.id){for(p=f.children.concat(),-1!==(m=P.inArray(e.id,p))&&(p=P.vakata.array_remove(p,m),m<n&&n--),m=[],g=0,_=p.length;g<_;g++)m[n<=g?g+1:g]=p[g];m[n]=e.id,f.children=m,this._node_changed(f.id),this.redraw(f.id===P.jstree.root)}else{for((m=e.children_d.concat()).push(e.id),g=0,_=e.parents.length;g<_;g++){for(p=[],b=0,v=(y=d._model.data[e.parents[g]].children_d).length;b<v;b++)-1===P.inArray(y[b],m)&&p.push(y[b]);d._model.data[e.parents[g]].children_d=p}for(d._model.data[l].children=P.vakata.array_remove_item(d._model.data[l].children,e.id),g=0,_=f.parents.length;g<_;g++)this._model.data[f.parents[g]].children_d=this._model.data[f.parents[g]].children_d.concat(m);for(p=[],g=0,_=f.children.length;g<_;g++)p[n<=g?g+1:g]=f.children[g];for(p[n]=e.id,f.children=p,f.children_d.push(e.id),f.children_d=f.children_d.concat(e.children_d),e.parent=f.id,(m=f.parents.concat()).unshift(f.id),y=e.parents.length,m=(e.parents=m).concat(),g=0,_=e.children_d.length;g<_;g++)this._model.data[e.children_d[g]].parents=this._model.data[e.children_d[g]].parents.slice(0,-1*y),Array.prototype.push.apply(this._model.data[e.children_d[g]].parents,m);l!==P.jstree.root&&f.id!==P.jstree.root||(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(l),this._node_changed(f.id)),a||this.redraw()}return r&&r.call(this,e,f,n),this.trigger("move_node",{node:e,parent:f.id,position:n,old_parent:l,old_position:u,is_multi:d&&d._id&&d._id!==this._id,is_foreign:!d||!d._id,old_instance:d,new_instance:this}),e.id},copy_node:function(e,t,n,r,i,a,o){var s,c,l,u,f,d,h,p,m,g;if(t=this.get_node(t),n=n===M?0:n,!t)return!1;if(!n.toString().match(/^(before|after)$/)&&!i&&!this.is_loaded(t))return this.load_node(t,function(){this.copy_node(e,t,n,r,!0,!1,o)});if(P.vakata.is_array(e)){if(1!==e.length){for(s=0,c=e.length;s<c;s++)(u=this.copy_node(e[s],t,n,r,i,!0,o))&&(t=u,n="after");return this.redraw(),!0}e=e[0]}if(!(e=e&&e.id?e:this.get_node(e))||e.id===P.jstree.root)return!1;switch(p=(e.parent||P.jstree.root).toString(),m=n.toString().match(/^(before|after)$/)&&t.id!==P.jstree.root?this.get_node(t.parent):t,!(g=o||(this._model.data[e.id]?this:P.jstree.reference(e.id)))||!g._id||this._id!==g._id,g&&g._id&&(e=g._model.data[e.id]),t.id===P.jstree.root&&("before"===n&&(n="first"),"after"===n&&(n="last")),n){case"before":n=P.inArray(t.id,m.children);break;case"after":n=P.inArray(t.id,m.children)+1;break;case"inside":case"first":n=0;break;case"last":n=m.children.length;break;default:n||(n=0)}if(n>m.children.length&&(n=m.children.length),!this.check("copy_node",e,m,n,{core:!0,origin:o,is_multi:g&&g._id&&g._id!==this._id,is_foreign:!g||!g._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!(h=g?g.get_json(e,{no_id:!0,no_data:!0,no_state:!0}):e))return!1;if(!0===h.id&&delete h.id,!(h=this._parse_model_from_json(h,m.id,m.parents.concat())))return!1;for(u=this.get_node(h),e&&e.state&&!1===e.state.loaded&&(u.state.loaded=!1),(l=[]).push(h),l=l.concat(u.children_d),this.trigger("model",{nodes:l,parent:m.id}),f=0,d=m.parents.length;f<d;f++)this._model.data[m.parents[f]].children_d=this._model.data[m.parents[f]].children_d.concat(l);for(l=[],f=0,d=m.children.length;f<d;f++)l[n<=f?f+1:f]=m.children[f];return l[n]=u.id,m.children=l,m.children_d.push(u.id),m.children_d=m.children_d.concat(u.children_d),m.id===P.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(m.id),a||this.redraw(m.id===P.jstree.root),r&&r.call(this,u,m,n),this.trigger("copy_node",{node:u,original:e,parent:m.id,position:n,old_parent:p,old_position:g&&g._id&&p&&g._model.data[p]&&g._model.data[p].children?P.inArray(e.id,g._model.data[p].children):-1,is_multi:g&&g._id&&g._id!==this._id,is_foreign:!g||!g._id,old_instance:g,new_instance:this}),u.id},cut:function(e){if(e||(e=this._data.core.selected.concat()),P.vakata.is_array(e)||(e=[e]),!e.length)return!1;var t,n,r,i=[];for(n=0,r=e.length;n<r;n++)(t=this.get_node(e[n]))&&t.id&&t.id!==P.jstree.root&&i.push(t);if(!i.length)return!1;a=i,o="move_node",(s=this).trigger("cut",{node:e})},copy:function(e){if(e||(e=this._data.core.selected.concat()),P.vakata.is_array(e)||(e=[e]),!e.length)return!1;var t,n,r,i=[];for(n=0,r=e.length;n<r;n++)(t=this.get_node(e[n]))&&t.id&&t.id!==P.jstree.root&&i.push(t);if(!i.length)return!1;a=i,o="copy_node",(s=this).trigger("copy",{node:e})},get_buffer:function(){return{mode:o,node:a,inst:s}},can_paste:function(){return!1!==o&&!1!==a},paste:function(e,t){if(!((e=this.get_node(e))&&o&&o.match(/^(copy_node|move_node)$/)&&a))return!1;this[o](a,e,t,!1,!1,!1,s)&&this.trigger("paste",{parent:e.id,node:a,mode:o}),s=o=a=!1},clear_buffer:function(){s=o=a=!1,this.trigger("clear_buffer")},edit:function(i,e,a){var t,n,o,s,c,l,u,r,f,d=!1;return!!(i=this.get_node(i))&&(this.check("edit",i,this.get_parent(i))?(f=i,e="string"==typeof e?e:i.text,this.set_text(i,""),i=this._open_to(i),f.text=e,t=this._data.core.rtl,n=this.element.width(),this._data.core.focused=f.id,o=i.children(".jstree-anchor").trigger("focus"),s=P("<span></span>"),c=e,l=P("<div></div>",{css:{position:"absolute",top:"-200px",left:t?"0px":"-1000px",visibility:"hidden"}}).appendTo(y.body),u=P("<input />",{value:c,class:"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:function(e){e.stopImmediatePropagation(),e.preventDefault();var t,n=s.children(".jstree-rename-input").val(),r=this.settings.core.force_text;""===n&&(n=c),l.remove(),s.replaceWith(o),s.remove(),c=r?c:P("<div></div>").append(P.parseHTML(c)).html(),i=this.get_node(i),this.set_text(i,c),(t=!!this.rename_node(i,r?P("<div></div>").text(n).text():P("<div></div>").append(P.parseHTML(n)).html()))||this.set_text(i,c),this._data.core.focused=f.id,setTimeout(function(){var e=this.get_node(f.id,!0);e.length&&(this._data.core.focused=f.id,e.children(".jstree-anchor").trigger("focus"))}.bind(this),0),a&&a.call(this,f,t,d,n),u=null}.bind(this),keydown:function(e){var t=e.which;27===t&&(d=!0,this.value=c),27!==t&&13!==t&&37!==t&&38!==t&&39!==t&&40!==t&&32!==t||e.stopImmediatePropagation(),27!==t&&13!==t||(e.preventDefault(),this.blur())},click:function(e){e.stopImmediatePropagation()},mousedown:function(e){e.stopImmediatePropagation()},keyup:function(e){u.width(Math.min(l.text("pW"+this.value).width(),n))},keypress:function(e){if(13===e.which)return!1}}),r={fontFamily:o.css("fontFamily")||"",fontSize:o.css("fontSize")||"",fontWeight:o.css("fontWeight")||"",fontStyle:o.css("fontStyle")||"",fontStretch:o.css("fontStretch")||"",fontVariant:o.css("fontVariant")||"",letterSpacing:o.css("letterSpacing")||"",wordSpacing:o.css("wordSpacing")||""},s.attr("class",o.attr("class")).append(o.contents().clone()).append(u),o.replaceWith(s),l.css(r),u.css(r).width(Math.min(l.text("pW"+u[0].value).width(),n))[0].select(),void P(y).one("mousedown.jstree touchstart.jstree dnd_start.vakata",function(e){u&&e.target!==u&&P(u).trigger("blur")})):(this.settings.core.error.call(this,this._data.core.last_error),!1))},set_theme:function(e,t){if(!e)return!1;if(!0===t){var n=this.settings.core.themes.dir;n||(n=P.jstree.path+"/themes"),t=n+"/"+e+"/style.css"}t&&-1===P.inArray(t,r)&&(P("head").append('<link rel="stylesheet" href="'+t+'" type="text/css" />'),r.push(t)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=e,this.element.addClass("jstree-"+e),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+e+"-responsive"),this.trigger("set_theme",{theme:e})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(e){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),(this._data.core.themes.variant=e)&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(e,t){var n,r,i,a;if(P.vakata.is_array(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.set_icon(e[n],t);return!0}return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&(a=e.icon,e.icon=!0===t||null===t||t===M||""===t||t,i=this.get_node(e,!0).children(".jstree-anchor").children(".jstree-themeicon"),!1===t?(i.removeClass("jstree-themeicon-custom "+a).css("background","").removeAttr("rel"),this.hide_icon(e)):(!0===t||null===t||t===M||""===t?i.removeClass("jstree-themeicon-custom "+a).css("background","").removeAttr("rel"):-1===t.indexOf("/")&&-1===t.indexOf(".")?(i.removeClass(a).css("background",""),i.addClass(t+" jstree-themeicon-custom").attr("rel",t)):(i.removeClass(a).css("background",""),i.addClass("jstree-themeicon-custom").css("background","url('"+t+"') center center no-repeat").attr("rel",t)),!1===a&&this.show_icon(e)),!0)},get_icon:function(e){return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&e.icon},hide_icon:function(e){var t,n;if(P.vakata.is_array(e)){for(t=0,n=(e=e.slice()).length;t<n;t++)this.hide_icon(e[t]);return!0}return!(!(e=this.get_node(e))||e===P.jstree.root)&&(e.icon=!1,this.get_node(e,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),!0)},show_icon:function(e){var t,n,r;if(P.vakata.is_array(e)){for(t=0,n=(e=e.slice()).length;t<n;t++)this.show_icon(e[t]);return!0}return!(!(e=this.get_node(e))||e===P.jstree.root)&&(r=this.get_node(e,!0),e.icon=!r.length||r.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"),e.icon||(e.icon=!0),r.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"),!0)}},P.vakata={},P.vakata.attributes=function(e,n){e=P(e)[0];var r=n?{}:[];return e&&e.attributes&&P.each(e.attributes,function(e,t){-1===P.inArray(t.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==t.value&&""!==P.vakata.trim(t.value)&&(n?r[t.name]=t.value:r.push(t.name))}),r},P.vakata.array_unique=function(e){var t,n,r=[],i={};for(t=0,n=e.length;t<n;t++)i[e[t]]===M&&(r.push(e[t]),i[e[t]]=!0);return r},P.vakata.array_remove=function(e,t){return e.splice(t,1),e},P.vakata.array_remove_item=function(e,t){var n=P.inArray(t,e);return-1!==n?P.vakata.array_remove(e,n):e},P.vakata.array_filter=function(e,t,n,r,i){if(e.filter)return e.filter(t,n);for(i in r=[],e)~~i+""==i+""&&0<=i&&t.call(n,e[i],+i,e)&&r.push(e[i]);return r},P.vakata.trim=function(e){return String.prototype.trim?String.prototype.trim.call(e.toString()):e.toString().replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},P.vakata.is_function=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},P.vakata.is_array=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Function.prototype.bind||(Function.prototype.bind=function(){var t=this,n=arguments[0],r=Array.prototype.slice.call(arguments,1);if("function"!=typeof t)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");return function(){var e=r.concat(Array.prototype.slice.call(arguments));return t.apply(n,e)}}),P.jstree.plugins.changed=function(e,a){var o=[];this.trigger=function(e,t){var n,r;if(t||(t={}),"changed"===e.replace(".jstree","")){t.changed={selected:[],deselected:[]};var i={};for(n=0,r=o.length;n<r;n++)i[o[n]]=1;for(n=0,r=t.selected.length;n<r;n++)i[t.selected[n]]?i[t.selected[n]]=2:t.changed.selected.push(t.selected[n]);for(n=0,r=o.length;n<r;n++)1===i[o[n]]&&t.changed.deselected.push(o[n]);o=t.selected.slice()}a.trigger.call(this,e,t)},this.refresh=function(e,t){return o=[],a.refresh.apply(this,arguments)}};var f,d,h,c,u,p,m,S,g=y.createElement("I");g.className="jstree-icon jstree-checkbox",g.setAttribute("role","presentation"),P.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0,cascade_to_disabled:!0,cascade_to_hidden:!0},P.jstree.plugins.checkbox=function(e,c){this.bind=function(){c.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")}.bind(this)).on("loading.jstree",function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()}.bind(this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(this._undetermined.bind(this),50)}.bind(this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",function(e,t){var n,r,i=this._model.data,a=(i[t.parent],t.nodes);for(n=0,r=a.length;n<r;n++)i[a[n]].state.checked=i[a[n]].state.checked||i[a[n]].original&&i[a[n]].original.state&&i[a[n]].original.state.checked,i[a[n]].state.checked&&this._data.checkbox.selected.push(a[n])}.bind(this)),-1===this.settings.checkbox.cascade.indexOf("up")&&-1===this.settings.checkbox.cascade.indexOf("down")||this.element.on("model.jstree",function(e,t){var n,r,i,a,o,s,c=this._model.data,l=c[t.parent],u=t.nodes,f=[],d=this.settings.checkbox.cascade,h=this.settings.checkbox.tie_selection;if(-1!==d.indexOf("down"))if(l.state[h?"selected":"checked"]){for(r=0,i=u.length;r<i;r++)c[u[r]].state[h?"selected":"checked"]=!0;this._data[h?"core":"checkbox"].selected=this._data[h?"core":"checkbox"].selected.concat(u)}else for(r=0,i=u.length;r<i;r++)if(c[u[r]].state[h?"selected":"checked"]){for(a=0,o=c[u[r]].children_d.length;a<o;a++)c[c[u[r]].children_d[a]].state[h?"selected":"checked"]=!0;this._data[h?"core":"checkbox"].selected=this._data[h?"core":"checkbox"].selected.concat(c[u[r]].children_d)}if(-1!==d.indexOf("up")){for(r=0,i=l.children_d.length;r<i;r++)c[l.children_d[r]].children.length||f.push(c[l.children_d[r]].parent);for(a=0,o=(f=P.vakata.array_unique(f)).length;a<o;a++)for(l=c[f[a]];l&&l.id!==P.jstree.root;){for(r=n=0,i=l.children.length;r<i;r++)n+=c[l.children[r]].state[h?"selected":"checked"];if(n!==i)break;l.state[h?"selected":"checked"]=!0,this._data[h?"core":"checkbox"].selected.push(l.id),(s=this.get_node(l,!0))&&s.length&&s.attr("aria-selected",!0).children(".jstree-anchor").addClass(h?"jstree-clicked":"jstree-checked"),l=this.get_node(l.parent)}}this._data[h?"core":"checkbox"].selected=P.vakata.array_unique(this._data[h?"core":"checkbox"].selected)}.bind(this)).on(this.settings.checkbox.tie_selection?"select_node.jstree":"check_node.jstree",function(e,t){var n,r,i,a,o=t.node,s=this._model.data,c=this.get_node(o.parent),l=this.settings.checkbox.cascade,u=this.settings.checkbox.tie_selection,f={},d=this._data[u?"core":"checkbox"].selected;for(n=0,r=d.length;n<r;n++)f[d[n]]=!0;if(-1!==l.indexOf("down")){var h=this._cascade_new_checked_state(o.id,!0),p=o.children_d.concat(o.id);for(n=0,r=p.length;n<r;n++)-1<h.indexOf(p[n])?f[p[n]]=!0:delete f[p[n]]}if(-1!==l.indexOf("up"))for(;c&&c.id!==P.jstree.root;){for(n=i=0,r=c.children.length;n<r;n++)i+=s[c.children[n]].state[u?"selected":"checked"];if(i!==r)break;c.state[u?"selected":"checked"]=!0,f[c.id]=!0,(a=this.get_node(c,!0))&&a.length&&a.attr("aria-selected",!0).children(".jstree-anchor").addClass(u?"jstree-clicked":"jstree-checked"),c=this.get_node(c.parent)}for(n in d=[],f)f.hasOwnProperty(n)&&d.push(n);this._data[u?"core":"checkbox"].selected=d}.bind(this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",function(e,t){var n,r,i,a=this.get_node(P.jstree.root),o=this._model.data;for(n=0,r=a.children_d.length;n<r;n++)(i=o[a.children_d[n]])&&i.original&&i.original.state&&i.original.state.undetermined&&(i.original.state.undetermined=!1)}.bind(this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",function(e,t){var n,r,i,a=t.node,o=(this.get_node(a,!0),this.settings.checkbox.cascade),s=this.settings.checkbox.tie_selection,c=this._data[s?"core":"checkbox"].selected,l=a.children_d.concat(a.id);if(-1!==o.indexOf("down")){var u=this._cascade_new_checked_state(a.id,!1);c=P.vakata.array_filter(c,function(e){return-1===l.indexOf(e)||-1<u.indexOf(e)})}if(-1!==o.indexOf("up")&&-1===c.indexOf(a.id)){for(n=0,r=a.parents.length;n<r;n++)(i=this._model.data[a.parents[n]]).state[s?"selected":"checked"]=!1,i&&i.original&&i.original.state&&i.original.state.undetermined&&(i.original.state.undetermined=!1),(i=this.get_node(a.parents[n],!0))&&i.length&&i.attr("aria-selected",!1).children(".jstree-anchor").removeClass(s?"jstree-clicked":"jstree-checked");c=P.vakata.array_filter(c,function(e){return-1===a.parents.indexOf(e)})}this._data[s?"core":"checkbox"].selected=c}.bind(this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",function(e,t){for(var n,r,i,a,o=this.get_node(t.parent),s=this._model.data,c=this.settings.checkbox.tie_selection;o&&o.id!==P.jstree.root&&!o.state[c?"selected":"checked"];){for(n=i=0,r=o.children.length;n<r;n++)i+=s[o.children[n]].state[c?"selected":"checked"];if(!(0<r&&i===r))break;o.state[c?"selected":"checked"]=!0,this._data[c?"core":"checkbox"].selected.push(o.id),(a=this.get_node(o,!0))&&a.length&&a.attr("aria-selected",!0).children(".jstree-anchor").addClass(c?"jstree-clicked":"jstree-checked"),o=this.get_node(o.parent)}}.bind(this)).on("move_node.jstree",function(e,t){var n,r,i,a,o,s=t.is_multi,c=t.old_parent,l=this.get_node(t.parent),u=this._model.data,f=this.settings.checkbox.tie_selection;if(!s)for(n=this.get_node(c);n&&n.id!==P.jstree.root&&!n.state[f?"selected":"checked"];){for(i=r=0,a=n.children.length;i<a;i++)r+=u[n.children[i]].state[f?"selected":"checked"];if(!(0<a&&r===a))break;n.state[f?"selected":"checked"]=!0,this._data[f?"core":"checkbox"].selected.push(n.id),(o=this.get_node(n,!0))&&o.length&&o.attr("aria-selected",!0).children(".jstree-anchor").addClass(f?"jstree-clicked":"jstree-checked"),n=this.get_node(n.parent)}for(n=l;n&&n.id!==P.jstree.root;){for(i=r=0,a=n.children.length;i<a;i++)r+=u[n.children[i]].state[f?"selected":"checked"];if(r===a)n.state[f?"selected":"checked"]||(n.state[f?"selected":"checked"]=!0,this._data[f?"core":"checkbox"].selected.push(n.id),(o=this.get_node(n,!0))&&o.length&&o.attr("aria-selected",!0).children(".jstree-anchor").addClass(f?"jstree-clicked":"jstree-checked"));else{if(!n.state[f?"selected":"checked"])break;n.state[f?"selected":"checked"]=!1,this._data[f?"core":"checkbox"].selected=P.vakata.array_remove_item(this._data[f?"core":"checkbox"].selected,n.id),(o=this.get_node(n,!0))&&o.length&&o.attr("aria-selected",!1).children(".jstree-anchor").removeClass(f?"jstree-clicked":"jstree-checked")}n=this.get_node(n.parent)}}.bind(this))},this.get_undetermined=function(e){if(-1===this.settings.checkbox.cascade.indexOf("undetermined"))return[];var n,r,i,a,o={},s=this._model.data,t=this.settings.checkbox.tie_selection,c=this._data[t?"core":"checkbox"].selected,l=[],u=this,f=[];for(n=0,r=c.length;n<r;n++)if(s[c[n]]&&s[c[n]].parents)for(i=0,a=s[c[n]].parents.length;i<a&&o[s[c[n]].parents[i]]===M;i++)s[c[n]].parents[i]!==P.jstree.root&&(o[s[c[n]].parents[i]]=!0,l.push(s[c[n]].parents[i]));for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each(function(){var e,t=u.get_node(this);if(t)if(t.state.loaded){for(n=0,r=t.children_d.length;n<r;n++)if(!(e=s[t.children_d[n]]).state.loaded&&e.original&&e.original.state&&e.original.state.undetermined&&!0===e.original.state.undetermined)for(o[e.id]===M&&e.id!==P.jstree.root&&(o[e.id]=!0,l.push(e.id)),i=0,a=e.parents.length;i<a;i++)o[e.parents[i]]===M&&e.parents[i]!==P.jstree.root&&(o[e.parents[i]]=!0,l.push(e.parents[i]))}else if(t.original&&t.original.state&&t.original.state.undetermined&&!0===t.original.state.undetermined)for(o[t.id]===M&&t.id!==P.jstree.root&&(o[t.id]=!0,l.push(t.id)),i=0,a=t.parents.length;i<a;i++)o[t.parents[i]]===M&&t.parents[i]!==P.jstree.root&&(o[t.parents[i]]=!0,l.push(t.parents[i]))}),n=0,r=l.length;n<r;n++)s[l[n]].state[t?"selected":"checked"]||f.push(e?s[l[n]]:l[n]);return f},this._undetermined=function(){if(null!==this.element){var e,t,n,r=this.get_undetermined(!1);for(this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),e=0,t=r.length;e<t;e++)(n=this.get_node(r[e],!0))&&n.length&&n.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined")}},this.redraw_node=function(e,t,n,r){if(e=c.redraw_node.apply(this,arguments)){var i,a,o=null,s=null;for(i=0,a=e.childNodes.length;i<a;i++)if(e.childNodes[i]&&e.childNodes[i].className&&-1!==e.childNodes[i].className.indexOf("jstree-anchor")){o=e.childNodes[i];break}o&&(!this.settings.checkbox.tie_selection&&this._model.data[e.id].state.checked&&(o.className+=" jstree-checked"),s=g.cloneNode(!1),this._model.data[e.id].state.checkbox_disabled&&(s.className+=" jstree-checkbox-disabled"),o.insertBefore(s,o.childNodes[0]))}return n||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(this._undetermined.bind(this),50)),e},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(e){e=this.get_node(e);var t,n,r=this.settings.checkbox.cascade,i=this.settings.checkbox.tie_selection,a=this._data[i?"core":"checkbox"].selected,o=this._model.data;if(!e||!0===e.state[i?"selected":"checked"]||-1===r.indexOf("undetermined")||-1===r.indexOf("down")&&-1===r.indexOf("up"))return!1;if(!e.state.loaded&&!0===e.original.state.undetermined)return!0;for(t=0,n=e.children_d.length;t<n;t++)if(-1!==P.inArray(e.children_d[t],a)||!o[e.children_d[t]].state.loaded&&o[e.children_d[t]].original.state.undetermined)return!0;return!1},this.disable_checkbox=function(e){var t,n,r;if(P.vakata.is_array(e)){for(t=0,n=(e=e.slice()).length;t<n;t++)this.disable_checkbox(e[t]);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;r=this.get_node(e,!0),e.state.checkbox_disabled||(e.state.checkbox_disabled=!0,r&&r.length&&r.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-checkbox-disabled"),this.trigger("disable_checkbox",{node:e}))},this.enable_checkbox=function(e){var t,n,r;if(P.vakata.is_array(e)){for(t=0,n=(e=e.slice()).length;t<n;t++)this.enable_checkbox(e[t]);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;r=this.get_node(e,!0),e.state.checkbox_disabled&&(e.state.checkbox_disabled=!1,r&&r.length&&r.children(".jstree-anchor").children(".jstree-checkbox").removeClass("jstree-checkbox-disabled"),this.trigger("enable_checkbox",{node:e}))},this.activate_node=function(e,t){return!P(t.target).hasClass("jstree-checkbox-disabled")&&(this.settings.checkbox.tie_selection&&(this.settings.checkbox.whole_node||P(t.target).hasClass("jstree-checkbox"))&&(t.ctrlKey=!0),this.settings.checkbox.tie_selection||!this.settings.checkbox.whole_node&&!P(t.target).hasClass("jstree-checkbox")?c.activate_node.call(this,e,t):!this.is_disabled(e)&&(this.is_checked(e)?this.uncheck_node(e,t):this.check_node(e,t),void this.trigger("activate_node",{node:this.get_node(e)})))},this._cascade_new_checked_state=function(e,t){var n,r,i,a=this.settings.checkbox.tie_selection,o=this._model.data[e],s=[],c=[];if(!this.settings.checkbox.cascade_to_disabled&&o.state.disabled||!this.settings.checkbox.cascade_to_hidden&&o.state.hidden)i=this.get_checked_descendants(e),o.state[a?"selected":"checked"]&&i.push(o.id),s=s.concat(i);else{if(o.children)for(n=0,r=o.children.length;n<r;n++){var l=o.children[n];i=this._cascade_new_checked_state(l,t),s=s.concat(i),-1<i.indexOf(l)&&c.push(l)}var u=this.get_node(o,!0),f=0<c.length&&c.length<o.children.length;o.original&&o.original.state&&o.original.state.undetermined&&(o.original.state.undetermined=f),f?(o.state[a?"selected":"checked"]=!1,u.attr("aria-selected",!1).children(".jstree-anchor").removeClass(a?"jstree-clicked":"jstree-checked")):t&&c.length===o.children.length?(o.state[a?"selected":"checked"]=t,s.push(o.id),u.attr("aria-selected",!0).children(".jstree-anchor").addClass(a?"jstree-clicked":"jstree-checked")):(o.state[a?"selected":"checked"]=!1,u.attr("aria-selected",!1).children(".jstree-anchor").removeClass(a?"jstree-clicked":"jstree-checked"))}return s},this.get_checked_descendants=function(e){var t=this,n=t.settings.checkbox.tie_selection,r=t._model.data[e];return P.vakata.array_filter(r.children_d,function(e){return t._model.data[e].state[n?"selected":"checked"]})},this.check_node=function(e,t){if(this.settings.checkbox.tie_selection)return this.select_node(e,!1,!0,t);var n,r,i;if(P.vakata.is_array(e)){for(r=0,i=(e=e.slice()).length;r<i;r++)this.check_node(e[r],t);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;n=this.get_node(e,!0),e.state.checked||(e.state.checked=!0,this._data.checkbox.selected.push(e.id),n&&n.length&&n.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:e,selected:this._data.checkbox.selected,event:t}))},this.uncheck_node=function(e,t){if(this.settings.checkbox.tie_selection)return this.deselect_node(e,!1,t);var n,r,i;if(P.vakata.is_array(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.uncheck_node(e[n],t);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;i=this.get_node(e,!0),e.state.checked&&(e.state.checked=!1,this._data.checkbox.selected=P.vakata.array_remove_item(this._data.checkbox.selected,e.id),i.length&&i.children(".jstree-anchor").removeClass("jstree-checked"),this.trigger("uncheck_node",{node:e,selected:this._data.checkbox.selected,event:t}))},this.check_all=function(){if(this.settings.checkbox.tie_selection)return this.select_all();var e,t;this._data.checkbox.selected.concat([]);for(this._data.checkbox.selected=this._model.data[P.jstree.root].children_d.concat(),e=0,t=this._data.checkbox.selected.length;e<t;e++)this._model.data[this._data.checkbox.selected[e]]&&(this._model.data[this._data.checkbox.selected[e]].state.checked=!0);this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all();var e,t,n=this._data.checkbox.selected.concat([]);for(e=0,t=this._data.checkbox.selected.length;e<t;e++)this._model.data[this._data.checkbox.selected[e]]&&(this._model.data[this._data.checkbox.selected[e]].state.checked=!1);this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:n})},this.is_checked=function(e){return this.settings.checkbox.tie_selection?this.is_selected(e):!(!(e=this.get_node(e))||e.id===P.jstree.root)&&e.state.checked},this.get_checked=function(e){return this.settings.checkbox.tie_selection?this.get_selected(e):e?P.map(this._data.checkbox.selected,function(e){return this.get_node(e)}.bind(this)):this._data.checkbox.selected.slice()},this.get_top_checked=function(e){if(this.settings.checkbox.tie_selection)return this.get_top_selected(e);var t,n,r,i,a=this.get_checked(!0),o={};for(t=0,n=a.length;t<n;t++)o[a[t].id]=a[t];for(t=0,n=a.length;t<n;t++)for(r=0,i=a[t].children_d.length;r<i;r++)o[a[t].children_d[r]]&&delete o[a[t].children_d[r]];for(t in a=[],o)o.hasOwnProperty(t)&&a.push(t);return e?P.map(a,function(e){return this.get_node(e)}.bind(this)):a},this.get_bottom_checked=function(e){if(this.settings.checkbox.tie_selection)return this.get_bottom_selected(e);var t,n,r=this.get_checked(!0),i=[];for(t=0,n=r.length;t<n;t++)r[t].children.length||i.push(r[t].id);return e?P.map(i,function(e){return this.get_node(e)}.bind(this)):i},this.load_node=function(e,t){var n,r,i;if(!P.vakata.is_array(e)&&!this.settings.checkbox.tie_selection&&(i=this.get_node(e))&&i.state.loaded)for(n=0,r=i.children_d.length;n<r;n++)this._model.data[i.children_d[n]].state.checked&&(!0,this._data.checkbox.selected=P.vakata.array_remove_item(this._data.checkbox.selected,i.children_d[n]));return c.load_node.apply(this,arguments)},this.get_state=function(){var e=c.get_state.apply(this,arguments);return this.settings.checkbox.tie_selection||(e.checkbox=this._data.checkbox.selected.slice()),e},this.set_state=function(e,t){var n=c.set_state.apply(this,arguments);if(n&&e.checkbox){if(!this.settings.checkbox.tie_selection){this.uncheck_all();var r=this;P.each(e.checkbox,function(e,t){r.check_node(t)})}return delete e.checkbox,this.set_state(e,t),!1}return n},this.refresh=function(e,t){return this.settings.checkbox.tie_selection&&(this._data.checkbox.selected=[]),c.refresh.apply(this,arguments)}},P.jstree.defaults.conditionalselect=function(){return!0},P.jstree.plugins.conditionalselect=function(e,n){this.activate_node=function(e,t){if(this.settings.conditionalselect.call(this,this.get_node(e),t))return n.activate_node.call(this,e,t)}},P.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(e,t){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(e){var n=P.jstree.reference(e.reference),t=n.get_node(e.reference);n.create_node(t,{},"last",function(t){try{n.edit(t)}catch(e){setTimeout(function(){n.edit(t)},0)}})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(e){var t=P.jstree.reference(e.reference),n=t.get_node(e.reference);t.edit(n)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(e){var t=P.jstree.reference(e.reference),n=t.get_node(e.reference);t.is_selected(n)?t.delete_node(t.get_selected()):t.delete_node(n)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(e){var t=P.jstree.reference(e.reference),n=t.get_node(e.reference);t.is_selected(n)?t.cut(t.get_top_selected()):t.cut(n)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(e){var t=P.jstree.reference(e.reference),n=t.get_node(e.reference);t.is_selected(n)?t.copy(t.get_top_selected()):t.copy(n)}},paste:{separator_before:!1,icon:!1,_disabled:function(e){return!P.jstree.reference(e.reference).can_paste()},separator_after:!1,label:"Paste",action:function(e){var t=P.jstree.reference(e.reference),n=t.get_node(e.reference);t.paste(n)}}}}}}},P.jstree.plugins.contextmenu=function(e,a){this.bind=function(){a.bind.call(this);var t,n,r=0,i=null;this.element.on("init.jstree loading.jstree ready.jstree",function(){this.get_container_ul().addClass("jstree-contextmenu")}.bind(this)).on("contextmenu.jstree",".jstree-anchor",function(e,t){"input"!==e.target.tagName.toLowerCase()&&(e.preventDefault(),r=e.ctrlKey?+new Date:0,(t||i)&&(r=+new Date+1e4),i&&clearTimeout(i),this.is_loading(e.currentTarget)||this.show_contextmenu(e.currentTarget,e.pageX,e.pageY,e))}.bind(this)).on("click.jstree",".jstree-anchor",function(e){this._data.contextmenu.visible&&(!r||250<+new Date-r)&&P.vakata.context.hide(),r=0}.bind(this)).on("touchstart.jstree",".jstree-anchor",function(e){e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(t=e.originalEvent.changedTouches[0].clientX,n=e.originalEvent.changedTouches[0].clientY,i=setTimeout(function(){P(e.currentTarget).trigger("contextmenu",!0)},750))}).on("touchmove.vakata.jstree",function(e){i&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(10<Math.abs(t-e.originalEvent.changedTouches[0].clientX)||10<Math.abs(n-e.originalEvent.changedTouches[0].clientY))&&(clearTimeout(i),P.vakata.context.hide())}).on("touchend.vakata.jstree",function(e){i&&clearTimeout(i)}),P(y).on("context_hide.vakata.jstree",function(e,t){this._data.contextmenu.visible=!1,P(t.reference).removeClass("jstree-context")}.bind(this))},this.teardown=function(){this._data.contextmenu.visible&&P.vakata.context.hide(),P(y).off("context_hide.vakata.jstree"),a.teardown.call(this)},this.show_contextmenu=function(t,n,r,e){if(!(t=this.get_node(t))||t.id===P.jstree.root)return!1;var i=this.settings.contextmenu,a=this.get_node(t,!0).children(".jstree-anchor"),o=!1,s=!1;(i.show_at_node||n===M||r===M)&&(o=a.offset(),n=o.left,r=o.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(t)&&this.activate_node(t,e),s=i.items,P.vakata.is_function(s)&&(s=s.call(this,t,function(e){this._show_contextmenu(t,n,r,e)}.bind(this))),P.isPlainObject(s)&&this._show_contextmenu(t,n,r,s)},this._show_contextmenu=function(e,t,n,r){var i=this.get_node(e,!0).children(".jstree-anchor");P(y).one("context_show.vakata.jstree",function(e,t){var n="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";P(t.element).addClass(n),i.addClass("jstree-context")}.bind(this)),this._data.contextmenu.visible=!0,P.vakata.context.show(i,{x:t,y:n},r),this.trigger("show_contextmenu",{node:e,x:t,y:n})}},h={element:d=!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1},(f=P).vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(e){f(y).triggerHandler("context_"+e+".vakata",{reference:h.reference,element:h.element,position:{x:h.position_x,y:h.position_y}})},_execute:function(e){return!(!(e=h.items[e])||e._disabled&&(!f.vakata.is_function(e._disabled)||e._disabled({item:e,reference:h.reference,element:h.element}))||!e.action)&&e.action.call(null,{item:e,reference:h.reference,element:h.element,position:{x:h.position_x,y:h.position_y}})},_parse:function(e,t){if(!e)return!1;t||(h.html="",h.items=[]);var n,r="",i=!1;return t&&(r+="<ul>"),f.each(e,function(e,t){if(!t)return!0;h.items.push(t),!i&&t.separator_before&&(r+="<li class='vakata-context-separator'><a href='#' "+(f.vakata.context.settings.icons?"":'class="vakata-context-no-icons"')+">&#160;</a></li>"),i=!1,r+="<li class='"+(t._class||"")+(!0===t._disabled||f.vakata.is_function(t._disabled)&&t._disabled({item:t,reference:h.reference,element:h.element})?" vakata-contextmenu-disabled ":"")+"' "+(t.shortcut?" data-shortcut='"+t.shortcut+"' ":"")+">",r+="<a href='#' rel='"+(h.items.length-1)+"' "+(t.title?"title='"+t.title+"'":"")+">",f.vakata.context.settings.icons&&(r+="<i ",t.icon&&(-1!==t.icon.indexOf("/")||-1!==t.icon.indexOf(".")?r+=" style='background:url(\""+t.icon+"\") center center no-repeat' ":r+=" class='"+t.icon+"' "),r+="></i><span class='vakata-contextmenu-sep'>&#160;</span>"),r+=(f.vakata.is_function(t.label)?t.label({item:e,reference:h.reference,element:h.element}):t.label)+(t.shortcut?' <span class="vakata-contextmenu-shortcut vakata-contextmenu-shortcut-'+t.shortcut+'">'+(t.shortcut_label||"")+"</span>":"")+"</a>",t.submenu&&(n=f.vakata.context._parse(t.submenu,!0))&&(r+=n),r+="</li>",t.separator_after&&(r+="<li class='vakata-context-separator'><a href='#' "+(f.vakata.context.settings.icons?"":'class="vakata-context-no-icons"')+">&#160;</a></li>",i=!0)}),r=r.replace(/<li class\='vakata-context-separator'\><\/li\>$/,""),t&&(r+="</ul>"),t||(h.html=r,f.vakata.context._trigger("parse")),10<r.length&&r},_show_submenu:function(e){if((e=f(e)).length&&e.children("ul").length){var t=e.children("ul"),n=e.offset().left,r=n+e.outerWidth(),i=e.offset().top,a=t.width(),o=t.height(),s=f(window).width()+f(window).scrollLeft(),c=f(window).height()+f(window).scrollTop();d?e[r-(a+10+e.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):e[s<r+a&&s-r<n?"addClass":"removeClass"]("vakata-context-right"),c<i+o+10&&t.css("bottom","-1px"),e.hasClass("vakata-context-right")?n<a&&t.css("margin-right",n-a):s-r<a&&t.css("margin-left",s-r-a),t.show()}},show:function(e,t,n){var r,i,a,o,s,c,l,u;switch(h.element&&h.element.length&&h.element.width(""),!0){case!t&&!e:return!1;case!!t&&!!e:h.reference=e,h.position_x=t.x,h.position_y=t.y;break;case!t&&!!e:r=(h.reference=e).offset(),h.position_x=r.left+e.outerHeight(),h.position_y=r.top;break;case!!t&&!e:h.position_x=t.x,h.position_y=t.y}e&&!n&&f(e).data("vakata_contextmenu")&&(n=f(e).data("vakata_contextmenu")),f.vakata.context._parse(n)&&h.element.html(h.html),h.items.length&&(h.element.appendTo(y.body),i=h.element,a=h.position_x,o=h.position_y,s=i.width(),c=i.height(),l=f(window).width()+f(window).scrollLeft(),u=f(window).height()+f(window).scrollTop(),d&&(a-=i.outerWidth()-f(e).outerWidth())<f(window).scrollLeft()+20&&(a=f(window).scrollLeft()+20),l<a+s+20&&(a=l-(s+20)),u<o+c+20&&(o=u-(c+20)),h.element.css({left:a,top:o}).show().find("a").first().trigger("focus").parent().addClass("vakata-context-hover"),h.is_visible=!0,f.vakata.context._trigger("show"))},hide:function(){h.is_visible&&(h.element.hide().find("ul").hide().end().find(":focus").trigger("blur").end().detach(),h.is_visible=!1,f.vakata.context._trigger("hide"))}},f(function(){d="rtl"===f(y.body).css("direction");var t=!1;h.element=f("<ul class='vakata-context'></ul>"),h.element.on("mouseenter","li",function(e){e.stopImmediatePropagation(),f.contains(this,e.relatedTarget)||(t&&clearTimeout(t),h.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),f(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),f.vakata.context._show_submenu(this))}).on("mouseleave","li",function(e){f.contains(this,e.relatedTarget)||f(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(e){f(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),f.vakata.context.settings.hide_onmouseleave&&(t=setTimeout(function(){f.vakata.context.hide()},f.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(e){e.preventDefault(),f(this).trigger("blur").parent().hasClass("vakata-context-disabled")||!1===f.vakata.context._execute(f(this).attr("rel"))||f.vakata.context.hide()}).on("keydown","a",function(e){var t=null;switch(e.which){case 13:case 32:e.type="click",e.preventDefault(),f(e.currentTarget).trigger(e);break;case 37:h.is_visible&&(h.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").trigger("focus"),e.stopImmediatePropagation(),e.preventDefault());break;case 38:h.is_visible&&((t=h.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first()).length||(t=h.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),t.addClass("vakata-context-hover").children("a").trigger("focus"),e.stopImmediatePropagation(),e.preventDefault());break;case 39:h.is_visible&&(h.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").trigger("focus"),e.stopImmediatePropagation(),e.preventDefault());break;case 40:h.is_visible&&((t=h.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first()).length||(t=h.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),t.addClass("vakata-context-hover").children("a").trigger("focus"),e.stopImmediatePropagation(),e.preventDefault());break;case 27:f.vakata.context.hide(),e.preventDefault()}}).on("keydown",function(e){e.preventDefault();var t=h.element.find(".vakata-contextmenu-shortcut-"+e.which).parent();t.parent().not(".vakata-context-disabled")&&t.trigger("click")}),f(y).on("mousedown.vakata.jstree",function(e){h.is_visible&&h.element[0]!==e.target&&!f.contains(h.element[0],e.target)&&f.vakata.context.hide()}).on("context_show.vakata.jstree",function(e,t){h.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),d&&h.element.addClass("vakata-context-rtl").css("direction","rtl"),h.element.find("ul").hide().end()})}),P.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1},P.jstree.plugins.dnd=function(e,s){this.init=function(e,t){s.init.call(this,e,t),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in y.createElement("span")},this.bind=function(){s.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",function(e){if(this.settings.dnd.large_drag_target&&P(e.target).closest(".jstree-node")[0]!==e.currentTarget)return!0;if("touchstart"===e.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!P(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var t=this.get_node(e.target),n=this.is_selected(t)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,r=1<n?n+" "+this.get_string("nodes"):this.get_text(e.currentTarget);if(this.settings.core.force_text&&(r=P.vakata.html.escape(r)),t&&t.id&&t.id!==P.jstree.root&&(1===e.which||"touchstart"===e.type||"dragstart"===e.type)&&(!0===this.settings.dnd.is_draggable||P.vakata.is_function(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,1<n?this.get_top_selected(!0):[t],e))){if(c={jstree:!0,origin:this,obj:this.get_node(t,!0),nodes:1<n?this.get_top_selected():[t.id]},u=e.currentTarget,!this.settings.dnd.use_html5)return this.element.trigger("mousedown.jstree"),P.vakata.dnd.start(e,c,'<div id="jstree-dnd" class="jstree-'+this.get_theme()+" jstree-"+this.get_theme()+"-"+this.get_theme_variant()+" "+(this.settings.core.themes.responsive?" jstree-dnd-responsive":"")+'"><i class="jstree-icon jstree-er"></i>'+r+'<ins class="jstree-copy">+</ins></div>');P.vakata.dnd._trigger("start",e,{helper:P(),element:u,data:c})}}.bind(this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",function(e){return e.preventDefault(),P.vakata.dnd._trigger("move",e,{helper:P(),element:u,data:c}),!1}).on("drop.jstree",function(e){return e.preventDefault(),P.vakata.dnd._trigger("stop",e,{helper:P(),element:u,data:c}),!1}.bind(this))},this.redraw_node=function(e,t,n,r){if((e=s.redraw_node.apply(this,arguments))&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)e.setAttribute("draggable",!0);else{var i,a,o=null;for(i=0,a=e.childNodes.length;i<a;i++)if(e.childNodes[i]&&e.childNodes[i].className&&-1!==e.childNodes[i].className.indexOf("jstree-anchor")){o=e.childNodes[i];break}o&&o.setAttribute("draggable",!0)}return e}},P(function(){var x=!1,k=!1,E=!1,D=!1,I=P('<div id="jstree-marker">&#160;</div>').hide();P(y).on("dragover.vakata.jstree",function(e){u&&P.vakata.dnd._trigger("move",e,{helper:P(),element:u,data:c})}).on("drop.vakata.jstree",function(e){u&&(P.vakata.dnd._trigger("stop",e,{helper:P(),element:u,data:c}),c=u=null)}).on("dnd_start.vakata.jstree",function(e,t){E=x=!1,t&&t.data&&t.data.jstree&&I.appendTo(y.body)}).on("dnd_move.vakata.jstree",function(e,i){var a=i.event.target!==E.target;if(D&&(i.event&&"dragover"===i.event.type&&!a||clearTimeout(D)),i&&i.data&&i.data.jstree&&(!i.event.target.id||"jstree-marker"!==i.event.target.id)){E=i.event;var o,s,c,l,u,f,d,h,p,m,g,_,b,v,y,w,C,A=P.jstree.reference(i.event.target),S=!1,T=!1,t=!1;if(A&&A._data&&A._data.dnd)if(I.attr("class","jstree-"+A.get_theme()+(A.settings.core.themes.responsive?" jstree-dnd-responsive":"")),y=i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey)),i.helper.children().attr("class","jstree-"+A.get_theme()+" jstree-"+A.get_theme()+"-"+A.get_theme_variant()+" "+(A.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[y?"show":"hide"](),i.event.target!==A.element[0]&&i.event.target!==A.get_container_ul()[0]||0!==A.get_container_ul().children().length){if((S=A.settings.dnd.large_drop_target?P(i.event.target).closest(".jstree-node").children(".jstree-anchor"):P(i.event.target).closest(".jstree-anchor"))&&S.length&&S.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(T=S.offset(),t=(i.event.pageY!==M?i.event.pageY:i.event.originalEvent.pageY)-T.top,c=S.outerHeight(),f=t<c/3?["b","i","a"]:c-c/3<t?["a","i","b"]:c/2<t?["i","a","b"]:["i","b","a"],P.each(f,function(e,t){switch(t){case"b":o=T.left-6,s=T.top,l=A.get_parent(S),u=S.parent().index(),C="jstree-below";break;case"i":b=A.settings.dnd.inside_pos,v=A.get_node(S.parent()),o=T.left-2,s=T.top+c/2+1,l=v.id,u="first"===b?0:"last"===b?v.children.length:Math.min(b,v.children.length),C="jstree-inside";break;case"a":o=T.left-6,s=T.top+c,l=A.get_parent(S),u=S.parent().index()+1,C="jstree-above"}for(d=!0,h=0,p=i.data.nodes.length;h<p;h++)if(m=i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey))?"copy_node":"move_node",g=u,"move_node"===m&&"a"===t&&i.data.origin&&i.data.origin===A&&l===A.get_parent(i.data.nodes[h])&&(_=A.get_node(l),g>P.inArray(i.data.nodes[h],_.children)&&(g-=1)),!(d=d&&(A&&A.settings&&A.settings.dnd&&!1===A.settings.dnd.check_while_dragging||A.check(m,i.data.origin&&i.data.origin!==A?i.data.origin.get_node(i.data.nodes[h]):i.data.nodes[h],l,g,{dnd:!0,ref:A.get_node(S.parent()),pos:t,origin:i.data.origin,is_multi:i.data.origin&&i.data.origin!==A,is_foreign:!i.data.origin})))){A&&A.last_error&&(k=A.last_error());break}var n,r;if("i"===t&&S.parent().is(".jstree-closed")&&A.settings.dnd.open_timeout&&(i.event&&"dragover"===i.event.type&&!a||(D&&clearTimeout(D),D=setTimeout((n=A,r=S,function(){n.open_node(r)}),A.settings.dnd.open_timeout))),d)return(w=A.get_node(l,!0)).hasClass(".jstree-dnd-parent")||(P(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),w.addClass("jstree-dnd-parent")),x={ins:A,par:l,pos:"i"!==t||"last"!==b||0!==u||A.is_loaded(v)?u:"last"},I.css({left:o+"px",top:s+"px"}).show(),I.removeClass("jstree-above jstree-inside jstree-below").addClass(C),i.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),i.event.originalEvent&&i.event.originalEvent.dataTransfer&&(i.event.originalEvent.dataTransfer.dropEffect=y?"copy":"move"),k={},!(f=!0)}),!0===f))return}else{for(d=!0,h=0,p=i.data.nodes.length;h<p&&(d=d&&A.check(i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey))?"copy_node":"move_node",i.data.origin&&i.data.origin!==A?i.data.origin.get_node(i.data.nodes[h]):i.data.nodes[h],P.jstree.root,"last",{dnd:!0,ref:A.get_node(P.jstree.root),pos:"i",origin:i.data.origin,is_multi:i.data.origin&&i.data.origin!==A,is_foreign:!i.data.origin}));h++);if(d)return x={ins:A,par:P.jstree.root,pos:"last"},I.hide(),i.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),void(i.event.originalEvent&&i.event.originalEvent.dataTransfer&&(i.event.originalEvent.dataTransfer.dropEffect=y?"copy":"move"))}P(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),x=!1,i.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),i.event.originalEvent&&i.event.originalEvent.dataTransfer,I.hide()}}).on("dnd_scroll.vakata.jstree",function(e,t){t&&t.data&&t.data.jstree&&(I.hide(),E=x=!1,t.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(e,t){if(P(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),D&&clearTimeout(D),t&&t.data&&t.data.jstree){I.hide().detach();var n,r,i=[];if(x){for(n=0,r=t.data.nodes.length;n<r;n++)i[n]=t.data.origin?t.data.origin.get_node(t.data.nodes[n]):t.data.nodes[n];x.ins[t.data.origin&&(t.data.origin.settings.dnd.always_copy||t.data.origin.settings.dnd.copy&&(t.event.metaKey||t.event.ctrlKey))?"copy_node":"move_node"](i,x.par,x.pos,!1,!1,!1,t.data.origin)}else(n=P(t.event.target).closest(".jstree")).length&&k&&k.error&&"check"===k.error&&(n=n.jstree(!0))&&n.settings.core.error.call(this,k);x=E=!1}}).on("keyup.jstree keydown.jstree",function(e,t){(t=P.vakata.dnd._get())&&t.data&&t.data.jstree&&("keyup"===e.type&&27===e.which?(D&&clearTimeout(D),D=E=k=x=!1,I.hide().detach(),P.vakata.dnd._clean()):(t.helper.find(".jstree-copy").first()[t.data.origin&&(t.data.origin.settings.dnd.always_copy||t.data.origin.settings.dnd.copy&&(e.metaKey||e.ctrlKey))?"show":"hide"](),E&&(E.metaKey=e.metaKey,E.ctrlKey=e.ctrlKey,P.vakata.dnd._trigger("move",E))))})}),m={element:!((p=P).vakata.html={div:p("<div></div>"),escape:function(e){return p.vakata.html.div.text(e).html()},strip:function(e){return p.vakata.html.div.empty().append(p.parseHTML(e)).text()}}),target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},p.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(e,t,n){n===M&&(n=p.vakata.dnd._get()),n.event=t,p(y).triggerHandler("dnd_"+e+".vakata",n)},_get:function(){return{data:m.data,element:m.element,helper:m.helper}},_clean:function(){m.helper&&m.helper.remove(),m.scroll_i&&(clearInterval(m.scroll_i),m.scroll_i=!1),m={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},u=null,p(y).off("mousemove.vakata.jstree touchmove.vakata.jstree",p.vakata.dnd.drag),p(y).off("mouseup.vakata.jstree touchend.vakata.jstree",p.vakata.dnd.stop)},_scroll:function(e){if(!m.scroll_e||!m.scroll_l&&!m.scroll_t)return m.scroll_i&&(clearInterval(m.scroll_i),m.scroll_i=!1),!1;if(!m.scroll_i)return m.scroll_i=setInterval(p.vakata.dnd._scroll,100),!1;if(!0===e)return!1;var t=m.scroll_e.scrollTop(),n=m.scroll_e.scrollLeft();m.scroll_e.scrollTop(t+m.scroll_t*p.vakata.dnd.settings.scroll_speed),m.scroll_e.scrollLeft(n+m.scroll_l*p.vakata.dnd.settings.scroll_speed),t===m.scroll_e.scrollTop()&&n===m.scroll_e.scrollLeft()||p.vakata.dnd._trigger("scroll",m.scroll_e)},start:function(e,t,n){"touchstart"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=y.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),m.is_drag&&p.vakata.dnd.stop({});try{e.currentTarget.unselectable="on",e.currentTarget.onselectstart=function(){return!1},e.currentTarget.style&&(e.currentTarget.style.touchAction="none",e.currentTarget.style.msTouchAction="none",e.currentTarget.style.MozUserSelect="none")}catch(e){}return m.init_x=e.pageX,m.init_y=e.pageY,m.data=t,m.is_down=!0,m.element=e.currentTarget,m.target=e.target,m.is_touch="touchstart"===e.type,!1!==n&&(m.helper=p("<div id='vakata-dnd'></div>").html(n).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),p(y).on("mousemove.vakata.jstree touchmove.vakata.jstree",p.vakata.dnd.drag),p(y).on("mouseup.vakata.jstree touchend.vakata.jstree",p.vakata.dnd.stop),!1},drag:function(n){if("touchmove"===n.type&&n.originalEvent&&n.originalEvent.changedTouches&&n.originalEvent.changedTouches[0]&&(n.pageX=n.originalEvent.changedTouches[0].pageX,n.pageY=n.originalEvent.changedTouches[0].pageY,n.target=y.elementFromPoint(n.originalEvent.changedTouches[0].pageX-window.pageXOffset,n.originalEvent.changedTouches[0].pageY-window.pageYOffset)),m.is_down){if(!m.is_drag){if(!(Math.abs(n.pageX-m.init_x)>(m.is_touch?p.vakata.dnd.settings.threshold_touch:p.vakata.dnd.settings.threshold)||Math.abs(n.pageY-m.init_y)>(m.is_touch?p.vakata.dnd.settings.threshold_touch:p.vakata.dnd.settings.threshold)))return;m.helper&&(m.helper.appendTo(y.body),m.helper_w=m.helper.outerWidth()),m.is_drag=!0,p(m.target).one("click.vakata",!1),p.vakata.dnd._trigger("start",n)}var e=!1,t=!1,r=!1,i=!1,a=!1,o=!1,s=!1,c=!1,l=!1,u=!1;return m.scroll_t=0,m.scroll_l=0,m.scroll_e=!1,p(p(n.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return/^auto|scroll$/.test(p(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var e=p(this),t=e.offset();if(this.scrollHeight>this.offsetHeight&&(t.top+e.height()-n.pageY<p.vakata.dnd.settings.scroll_proximity&&(m.scroll_t=1),n.pageY-t.top<p.vakata.dnd.settings.scroll_proximity&&(m.scroll_t=-1)),this.scrollWidth>this.offsetWidth&&(t.left+e.width()-n.pageX<p.vakata.dnd.settings.scroll_proximity&&(m.scroll_l=1),n.pageX-t.left<p.vakata.dnd.settings.scroll_proximity&&(m.scroll_l=-1)),m.scroll_t||m.scroll_l)return m.scroll_e=p(this),!1}),m.scroll_e||(e=p(y),t=p(window),r=e.height(),i=t.height(),a=e.width(),o=t.width(),s=e.scrollTop(),c=e.scrollLeft(),i<r&&n.pageY-s<p.vakata.dnd.settings.scroll_proximity&&(m.scroll_t=-1),i<r&&i-(n.pageY-s)<p.vakata.dnd.settings.scroll_proximity&&(m.scroll_t=1),o<a&&n.pageX-c<p.vakata.dnd.settings.scroll_proximity&&(m.scroll_l=-1),o<a&&o-(n.pageX-c)<p.vakata.dnd.settings.scroll_proximity&&(m.scroll_l=1),(m.scroll_t||m.scroll_l)&&(m.scroll_e=e)),m.scroll_e&&p.vakata.dnd._scroll(!0),m.helper&&(l=parseInt(n.pageY+p.vakata.dnd.settings.helper_top,10),u=parseInt(n.pageX+p.vakata.dnd.settings.helper_left,10),r&&r<l+25&&(l=r-50),a&&u+m.helper_w>a&&(u=a-(m.helper_w+2)),m.helper.css({left:u+"px",top:l+"px"})),p.vakata.dnd._trigger("move",n),!1}},stop:function(e){if("touchend"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=y.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),m.is_drag)e.target!==m.target&&p(m.target).off("click.vakata"),p.vakata.dnd._trigger("stop",e);else if("touchend"===e.type&&e.target===m.target){var t=setTimeout(function(){p(e.target).trigger("click")},100);p(e.target).one("click",function(){t&&clearTimeout(t)})}return p.vakata.dnd._clean(),!1}},P.jstree.defaults.massload=null,P.jstree.plugins.massload=function(e,u){this.init=function(e,t){this._data.massload={},u.init.call(this,e,t)},this._load_nodes=function(a,o,s,c){var e,t,l,n=this.settings.massload,r=[],i=this._model.data;if(!s){for(e=0,t=a.length;e<t;e++)i[a[e]]&&(i[a[e]].state.loaded||i[a[e]].state.failed)&&!c||(r.push(a[e]),(l=this.get_node(a[e],!0))&&l.length&&l.addClass("jstree-loading").attr("aria-busy",!0));if(this._data.massload={},r.length){if(P.vakata.is_function(n))return n.call(this,r,function(e){var t,n;if(e)for(t in e)e.hasOwnProperty(t)&&(this._data.massload[t]=e[t]);for(t=0,n=a.length;t<n;t++)(l=this.get_node(a[t],!0))&&l.length&&l.removeClass("jstree-loading").attr("aria-busy",!1);u._load_nodes.call(this,a,o,s,c)}.bind(this));if("object"==typeof n&&n&&n.url)return n=P.extend(!0,{},n),P.vakata.is_function(n.url)&&(n.url=n.url.call(this,r)),P.vakata.is_function(n.data)&&(n.data=n.data.call(this,r)),P.ajax(n).done(function(e,t,n){var r,i;if(e)for(r in e)e.hasOwnProperty(r)&&(this._data.massload[r]=e[r]);for(r=0,i=a.length;r<i;r++)(l=this.get_node(a[r],!0))&&l.length&&l.removeClass("jstree-loading").attr("aria-busy",!1);u._load_nodes.call(this,a,o,s,c)}.bind(this)).fail(function(e){u._load_nodes.call(this,a,o,s,c)}.bind(this))}}return u._load_nodes.call(this,a,o,s,c)},this._load_node=function(e,t){var n,r=this._data.massload[e.id],i=null;return r?(i=this["string"==typeof r?"_append_html_data":"_append_json_data"](e,"string"==typeof r?P(P.parseHTML(r)).filter(function(){return 3!==this.nodeType}):r,function(e){t.call(this,e)}),(n=this.get_node(e.id,!0))&&n.length&&n.removeClass("jstree-loading").attr("aria-busy",!1),delete this._data.massload[e.id],i):u._load_node.call(this,e,t)}},P.jstree.defaults.search={ajax:!1,fuzzy:!1,case_sensitive:!1,show_only_matches:!1,show_only_matches_children:!1,close_opened_onclear:!0,search_leaves_only:!1,search_callback:!1},P.jstree.plugins.search=function(e,s){this.bind=function(){s.bind.call(this),this._data.search.str="",this._data.search.dom=P(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=!1,this._data.search.smc=!1,this._data.search.hdn=[],this.element.on("search.jstree",function(e,t){if(this._data.search.som&&t.res.length){var n,r,i,a,o=this._model.data,s=[];for(n=0,r=t.res.length;n<r;n++)if(o[t.res[n]]&&!o[t.res[n]].state.hidden&&(s.push(t.res[n]),s=s.concat(o[t.res[n]].parents),this._data.search.smc))for(i=0,a=o[t.res[n]].children_d.length;i<a;i++)o[o[t.res[n]].children_d[i]]&&!o[o[t.res[n]].children_d[i]].state.hidden&&s.push(o[t.res[n]].children_d[i]);s=P.vakata.array_remove_item(P.vakata.array_unique(s),P.jstree.root),this._data.search.hdn=this.hide_all(!0),this.show_node(s,!0),this.redraw(!0)}}.bind(this)).on("clear_search.jstree",function(e,t){this._data.search.som&&t.res.length&&(this.show_node(this._data.search.hdn,!0),this.redraw(!0))}.bind(this))},this.search=function(r,e,t,n,i,a){if(!1===r||""===P.vakata.trim(r.toString()))return this.clear_search();n=(n=this.get_node(n))&&n.id?n.id:null,r=r.toString();var o,s,c=this.settings.search,l=!!c.ajax&&c.ajax,u=this._model.data,f=null,d=[],h=[];if(this._data.search.res.length&&!i&&this.clear_search(),t===M&&(t=c.show_only_matches),a===M&&(a=c.show_only_matches_children),!e&&!1!==l)return P.vakata.is_function(l)?l.call(this,r,function(e){e&&e.d&&(e=e.d),this._load_nodes(P.vakata.is_array(e)?P.vakata.array_unique(e):[],function(){this.search(r,!0,t,n,i,a)})}.bind(this),n):((l=P.extend({},l)).data||(l.data={}),l.data.str=r,n&&(l.data.inside=n),this._data.search.lastRequest&&this._data.search.lastRequest.abort(),this._data.search.lastRequest=P.ajax(l).fail(function(){this._data.core.last_error={error:"ajax",plugin:"search",id:"search_01",reason:"Could not load search parents",data:JSON.stringify(l)},this.settings.core.error.call(this,this._data.core.last_error)}.bind(this)).done(function(e){e&&e.d&&(e=e.d),this._load_nodes(P.vakata.is_array(e)?P.vakata.array_unique(e):[],function(){this.search(r,!0,t,n,i,a)})}.bind(this)),this._data.search.lastRequest);if(i||(this._data.search.str=r,this._data.search.dom=P(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=t,this._data.search.smc=a),f=new P.vakata.search(r,!0,{caseSensitive:c.case_sensitive,fuzzy:c.fuzzy}),P.each(u[n||P.jstree.root].children_d,function(e,t){var n=u[t];n.text&&!n.state.hidden&&(!c.search_leaves_only||n.state.loaded&&0===n.children.length)&&(c.search_callback&&c.search_callback.call(this,r,n)||!c.search_callback&&f.search(n.text).isMatch)&&(d.push(t),h=h.concat(n.parents))}),d.length){for(o=0,s=(h=P.vakata.array_unique(h)).length;o<s;o++)h[o]!==P.jstree.root&&u[h[o]]&&!0===this.open_node(h[o],null,0)&&this._data.search.opn.push(h[o]);i?(this._data.search.dom=this._data.search.dom.add(P(this.element[0].querySelectorAll("#"+P.map(d,function(e){return-1!=="0123456789".indexOf(e[0])?"\\3"+e[0]+" "+e.substr(1).replace(P.jstree.idregex,"\\$&"):e.replace(P.jstree.idregex,"\\$&")}).join(", #")))),this._data.search.res=P.vakata.array_unique(this._data.search.res.concat(d))):(this._data.search.dom=P(this.element[0].querySelectorAll("#"+P.map(d,function(e){return-1!=="0123456789".indexOf(e[0])?"\\3"+e[0]+" "+e.substr(1).replace(P.jstree.idregex,"\\$&"):e.replace(P.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.res=d),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search")}this.trigger("search",{nodes:this._data.search.dom,str:r,res:this._data.search.res,show_only_matches:t})},this.clear_search=function(){this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger("clear_search",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.res.length&&(this._data.search.dom=P(this.element[0].querySelectorAll("#"+P.map(this._data.search.res,function(e){return-1!=="0123456789".indexOf(e[0])?"\\3"+e[0]+" "+e.substr(1).replace(P.jstree.idregex,"\\$&"):e.replace(P.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search")),this._data.search.str="",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=P()},this.redraw_node=function(e,t,n,r){if((e=s.redraw_node.apply(this,arguments))&&-1!==P.inArray(e.id,this._data.search.res)){var i,a,o=null;for(i=0,a=e.childNodes.length;i<a;i++)if(e.childNodes[i]&&e.childNodes[i].className&&-1!==e.childNodes[i].className.indexOf("jstree-anchor")){o=e.childNodes[i];break}o&&(o.className+=" jstree-search")}return e}},(S=P).vakata.search=function(g,e,_){_=_||{},!1!==(_=S.extend({},S.vakata.search.defaults,_)).fuzzy&&(_.fuzzy=!0),g=_.caseSensitive?g:g.toLowerCase();var b,v,y,t,w=_.location,i=_.distance,C=_.threshold,A=g.length;return 32<A&&(_.fuzzy=!1),_.fuzzy&&(b=1<<A-1,v=function(){var e={},t=0;for(t=0;t<A;t++)e[g.charAt(t)]=0;for(t=0;t<A;t++)e[g.charAt(t)]|=1<<A-t-1;return e}(),y=function(e,t){var n=e/A,r=Math.abs(w-t);return i?n+r/i:r?1:n}),t=function(e){if(e=_.caseSensitive?e:e.toLowerCase(),g===e||-1!==e.indexOf(g))return{isMatch:!0,score:0};if(!_.fuzzy)return{isMatch:!1,score:1};var t,n,r,i,a,o,s,c,l,u=e.length,f=C,d=e.indexOf(g,w),h=A+u,p=1,m=[];for(-1!==d&&(f=Math.min(y(0,d),f),-1!==(d=e.lastIndexOf(g,w+A))&&(f=Math.min(y(0,d),f))),d=-1,t=0;t<A;t++){for(r=0,i=h;r<i;)y(t,w+i)<=f?r=i:h=i,i=Math.floor((h-r)/2+r);for(h=i,o=Math.max(1,w-i+1),s=Math.min(w+i,u)+A,(c=new Array(s+2))[s+1]=(1<<t)-1,n=s;o<=n;n--)if(l=v[e.charAt(n-1)],c[n]=0===t?(c[n+1]<<1|1)&l:(c[n+1]<<1|1)&l|(a[n+1]|a[n])<<1|1|a[n+1],c[n]&b&&(p=y(t,n-1))<=f){if(f=p,d=n-1,m.push(d),!(w<d))break;o=Math.max(1,2*w-d)}if(y(t+1,w)>f)break;a=c}return{isMatch:0<=d,score:p}},!0===e?{search:t}:t(e)},S.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1},P.jstree.defaults.sort=function(e,t){return this.get_text(e)>this.get_text(t)?1:-1};var _=!(P.jstree.plugins.sort=function(e,t){this.bind=function(){t.bind.call(this),this.element.on("model.jstree",function(e,t){this.sort(t.parent,!0)}.bind(this)).on("rename_node.jstree create_node.jstree",function(e,t){this.sort(t.parent||t.node.parent,!1),this.redraw_node(t.parent||t.node.parent,!0)}.bind(this)).on("move_node.jstree copy_node.jstree",function(e,t){this.sort(t.parent,!1),this.redraw_node(t.parent,!0)}.bind(this))},this.sort=function(e,t){var n,r;if((e=this.get_node(e))&&e.children&&e.children.length&&(e.children.sort(this.settings.sort.bind(this)),t))for(n=0,r=e.children_d.length;n<r;n++)this.sort(e.children_d[n],!1)}});P.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1,preserve_loaded:!1},P.jstree.plugins.state=function(e,t){this.bind=function(){t.bind.call(this);var n=function(){this.element.on(this.settings.state.events,function(){_&&clearTimeout(_),_=setTimeout(function(){this.save_state()}.bind(this),100)}.bind(this)),this.trigger("state_ready")}.bind(this);this.element.on("ready.jstree",function(e,t){this.element.one("restore_state.jstree",n),this.restore_state()||n()}.bind(this))},this.save_state=function(){var e=this.get_state();this.settings.state.preserve_loaded||delete e.core.loaded;var t={state:e,ttl:this.settings.state.ttl,sec:+new Date};P.vakata.storage.set(this.settings.state.key,JSON.stringify(t))},this.restore_state=function(){var n=P.vakata.storage.get(this.settings.state.key);if(n)try{n=JSON.parse(n)}catch(e){return!1}return!(n&&n.ttl&&n.sec&&+new Date-n.sec>n.ttl)&&(n&&n.state&&(n=n.state),n&&P.vakata.is_function(this.settings.state.filter)&&(n=this.settings.state.filter.call(this,n)),!!n&&(this.settings.state.preserve_loaded||delete n.core.loaded,this.element.one("set_state.jstree",function(e,t){t.instance.trigger("restore_state",{state:P.extend(!0,{},n)})}),this.set_state(n),!0))},this.clear_state=function(){return P.vakata.storage.del(this.settings.state.key)}},P.vakata.storage={set:function(e,t){return window.localStorage.setItem(e,t)},get:function(e){return window.localStorage.getItem(e)},del:function(e){return window.localStorage.removeItem(e)}},P.jstree.defaults.types={default:{}},P.jstree.defaults.types[P.jstree.root]={},P.jstree.plugins.types=function(e,u){this.init=function(e,t){var n,r;if(t&&t.types&&t.types.default)for(n in t.types)if("default"!==n&&n!==P.jstree.root&&t.types.hasOwnProperty(n))for(r in t.types.default)t.types.default.hasOwnProperty(r)&&t.types[n][r]===M&&(t.types[n][r]=t.types.default[r]);u.init.call(this,e,t),this._model.data[P.jstree.root].type=P.jstree.root},this.refresh=function(e,t){u.refresh.call(this,e,t),this._model.data[P.jstree.root].type=P.jstree.root},this.bind=function(){this.element.on("model.jstree",function(e,t){var n,r,i,a=this._model.data,o=t.nodes,s=this.settings.types,c="default";for(n=0,r=o.length;n<r;n++){if(c="default",a[o[n]].original&&a[o[n]].original.type&&s[a[o[n]].original.type]&&(c=a[o[n]].original.type),a[o[n]].data&&a[o[n]].data.jstree&&a[o[n]].data.jstree.type&&s[a[o[n]].data.jstree.type]&&(c=a[o[n]].data.jstree.type),a[o[n]].type=c,!0===a[o[n]].icon&&s[c].icon!==M&&(a[o[n]].icon=s[c].icon),s[c].li_attr!==M&&"object"==typeof s[c].li_attr)for(i in s[c].li_attr)if(s[c].li_attr.hasOwnProperty(i)){if("id"===i)continue;a[o[n]].li_attr[i]===M?a[o[n]].li_attr[i]=s[c].li_attr[i]:"class"===i&&(a[o[n]].li_attr.class=s[c].li_attr.class+" "+a[o[n]].li_attr.class)}if(s[c].a_attr!==M&&"object"==typeof s[c].a_attr)for(i in s[c].a_attr)if(s[c].a_attr.hasOwnProperty(i)){if("id"===i)continue;a[o[n]].a_attr[i]===M?a[o[n]].a_attr[i]=s[c].a_attr[i]:"href"===i&&"#"===a[o[n]].a_attr[i]?a[o[n]].a_attr.href=s[c].a_attr.href:"class"===i&&(a[o[n]].a_attr.class=s[c].a_attr.class+" "+a[o[n]].a_attr.class)}}a[P.jstree.root].type=P.jstree.root}.bind(this)),u.bind.call(this)},this.get_json=function(e,t,n){var r,i,a=this._model.data,o=t?P.extend(!0,{},t,{no_id:!1}):{},s=u.get_json.call(this,e,o,n);if(!1===s)return!1;if(P.vakata.is_array(s))for(r=0,i=s.length;r<i;r++)s[r].type=s[r].id&&a[s[r].id]&&a[s[r].id].type?a[s[r].id].type:"default",t&&t.no_id&&(delete s[r].id,s[r].li_attr&&s[r].li_attr.id&&delete s[r].li_attr.id,s[r].a_attr&&s[r].a_attr.id&&delete s[r].a_attr.id);else s.type=s.id&&a[s.id]&&a[s.id].type?a[s.id].type:"default",t&&t.no_id&&(s=this._delete_ids(s));return s},this._delete_ids=function(e){if(P.vakata.is_array(e)){for(var t=0,n=e.length;t<n;t++)e[t]=this._delete_ids(e[t]);return e}return delete e.id,e.li_attr&&e.li_attr.id&&delete e.li_attr.id,e.a_attr&&e.a_attr.id&&delete e.a_attr.id,e.children&&P.vakata.is_array(e.children)&&(e.children=this._delete_ids(e.children)),e},this.check=function(e,t,n,r,i){if(!1===u.check.call(this,e,t,n,r,i))return!1;t=t&&t.id?t:this.get_node(t),n=n&&n.id?n:this.get_node(n);var a,o,s,c,l=t&&t.id?i&&i.origin?i.origin:P.jstree.reference(t.id):null;switch(l=l&&l._model&&l._model.data?l._model.data:null,e){case"create_node":case"move_node":case"copy_node":if("move_node"!==e||-1===P.inArray(t.id,n.children)){if((a=this.get_rules(n)).max_children!==M&&-1!==a.max_children&&a.max_children===n.children.length)return!(this._data.core.last_error={error:"check",plugin:"types",id:"types_01",reason:"max_children prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})});if(a.valid_children!==M&&-1!==a.valid_children&&-1===P.inArray(t.type||"default",a.valid_children))return!(this._data.core.last_error={error:"check",plugin:"types",id:"types_02",reason:"valid_children prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})});if(l&&t.children_d&&t.parents){for(s=o=0,c=t.children_d.length;s<c;s++)o=Math.max(o,l[t.children_d[s]].parents.length);o=o-t.parents.length+1}(o<=0||o===M)&&(o=1);do{if(a.max_depth!==M&&-1!==a.max_depth&&a.max_depth<o)return!(this._data.core.last_error={error:"check",plugin:"types",id:"types_03",reason:"max_depth prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})});n=this.get_node(n.parent),a=this.get_rules(n),o++}while(n)}}return!0},this.get_rules=function(e){if(!(e=this.get_node(e)))return!1;var t=this.get_type(e,!0);return t.max_depth===M&&(t.max_depth=-1),t.max_children===M&&(t.max_children=-1),t.valid_children===M&&(t.valid_children=-1),t},this.get_type=function(e,t){return!!(e=this.get_node(e))&&(t?P.extend({type:e.type},this.settings.types[e.type]):e.type)},this.set_type=function(e,t){var n,r,i,a,o,s,c,l,u=this._model.data;if(P.vakata.is_array(e)){for(r=0,i=(e=e.slice()).length;r<i;r++)this.set_type(e[r],t);return!0}if(n=this.settings.types,e=this.get_node(e),!n[t]||!e)return!1;if((c=this.get_node(e,!0))&&c.length&&(l=c.children(".jstree-anchor")),a=e.type,o=this.get_icon(e),e.type=t,(!0===o||!n[a]||n[a].icon!==M&&o===n[a].icon)&&this.set_icon(e,n[t].icon===M||n[t].icon),n[a]&&n[a].li_attr!==M&&"object"==typeof n[a].li_attr)for(s in n[a].li_attr)if(n[a].li_attr.hasOwnProperty(s)){if("id"===s)continue;"class"===s?(u[e.id].li_attr.class=(u[e.id].li_attr.class||"").replace(n[a].li_attr[s],""),c&&c.removeClass(n[a].li_attr[s])):u[e.id].li_attr[s]===n[a].li_attr[s]&&(u[e.id].li_attr[s]=null,c&&c.removeAttr(s))}if(n[a]&&n[a].a_attr!==M&&"object"==typeof n[a].a_attr)for(s in n[a].a_attr)if(n[a].a_attr.hasOwnProperty(s)){if("id"===s)continue;"class"===s?(u[e.id].a_attr.class=(u[e.id].a_attr.class||"").replace(n[a].a_attr[s],""),l&&l.removeClass(n[a].a_attr[s])):u[e.id].a_attr[s]===n[a].a_attr[s]&&("href"===s?(u[e.id].a_attr[s]="#",l&&l.attr("href","#")):(delete u[e.id].a_attr[s],l&&l.removeAttr(s)))}if(n[t].li_attr!==M&&"object"==typeof n[t].li_attr)for(s in n[t].li_attr)if(n[t].li_attr.hasOwnProperty(s)){if("id"===s)continue;u[e.id].li_attr[s]===M?(u[e.id].li_attr[s]=n[t].li_attr[s],c&&("class"===s?c.addClass(n[t].li_attr[s]):c.attr(s,n[t].li_attr[s]))):"class"===s&&(u[e.id].li_attr.class=n[t].li_attr[s]+" "+u[e.id].li_attr.class,c&&c.addClass(n[t].li_attr[s]))}if(n[t].a_attr!==M&&"object"==typeof n[t].a_attr)for(s in n[t].a_attr)if(n[t].a_attr.hasOwnProperty(s)){if("id"===s)continue;u[e.id].a_attr[s]===M?(u[e.id].a_attr[s]=n[t].a_attr[s],l&&("class"===s?l.addClass(n[t].a_attr[s]):l.attr(s,n[t].a_attr[s]))):"href"===s&&"#"===u[e.id].a_attr[s]?(u[e.id].a_attr.href=n[t].a_attr.href,l&&l.attr("href",n[t].a_attr.href)):"class"===s&&(u[e.id].a_attr.class=n[t].a_attr.class+" "+u[e.id].a_attr.class,l&&l.addClass(n[t].a_attr[s]))}return!0}},P.jstree.defaults.unique={case_sensitive:!1,trim_whitespace:!1,duplicate:function(e,t){return e+" ("+t+")"}},P.jstree.plugins.unique=function(e,m){this.check=function(e,t,n,r,i){if(!1===m.check.call(this,e,t,n,r,i))return!1;if(t=t&&t.id?t:this.get_node(t),!(n=n&&n.id?n:this.get_node(n))||!n.children)return!0;var a,o,s,c="rename_node"===e?r:t.text,l=[],u=this.settings.unique.case_sensitive,f=this.settings.unique.trim_whitespace,d=this._model.data;for(a=0,o=n.children.length;a<o;a++)s=d[n.children[a]].text,u||(s=s.toLowerCase()),f&&(s=s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),l.push(s);switch(u||(c=c.toLowerCase()),f&&(c=c.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),e){case"delete_node":return!0;case"rename_node":return s=t.text||"",u||(s=s.toLowerCase()),f&&(s=s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),(a=-1===P.inArray(c,l)||t.text&&s===c)||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_01",reason:"Child with name "+c+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})}),a;case"create_node":return(a=-1===P.inArray(c,l))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_04",reason:"Child with name "+c+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})}),a;case"copy_node":return(a=-1===P.inArray(c,l))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_02",reason:"Child with name "+c+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})}),a;case"move_node":return(a=t.parent===n.id&&(!i||!i.is_multi)||-1===P.inArray(c,l))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_03",reason:"Child with name "+c+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})}),a}return!0},this.create_node=function(e,t,n,r,i){if(!t||t.text===M){if(null===e&&(e=P.jstree.root),!(e=this.get_node(e)))return m.create_node.call(this,e,t,n,r,i);if(!(n=n===M?"last":n).toString().match(/^(before|after)$/)&&!i&&!this.is_loaded(e))return m.create_node.call(this,e,t,n,r,i);t||(t={});var a,o,s,c,l,u,f=this._model.data,d=this.settings.unique.case_sensitive,h=this.settings.unique.trim_whitespace,p=this.settings.unique.duplicate;for(o=a=this.get_string("New node"),s=[],c=0,l=e.children.length;c<l;c++)u=f[e.children[c]].text,d||(u=u.toLowerCase()),h&&(u=u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),s.push(u);for(c=1,u=o,d||(u=u.toLowerCase()),h&&(u=u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));-1!==P.inArray(u,s);)u=o=p.call(this,a,++c).toString(),d||(u=u.toLowerCase()),h&&(u=u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));t.text=o}return m.create_node.call(this,e,t,n,r,i)}};var b=y.createElement("DIV");if(b.setAttribute("unselectable","on"),b.setAttribute("role","presentation"),b.className="jstree-wholerow",b.innerHTML="&#160;",P.jstree.plugins.wholerow=function(e,a){this.bind=function(){a.bind.call(this),this.element.on("ready.jstree set_state.jstree",function(){this.hide_dots()}.bind(this)).on("init.jstree loading.jstree ready.jstree",function(){this.get_container_ul().addClass("jstree-wholerow-ul")}.bind(this)).on("deselect_all.jstree",function(e,t){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")}.bind(this)).on("changed.jstree",function(e,t){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked");var n,r,i=!1;for(n=0,r=t.selected.length;n<r;n++)(i=this.get_node(t.selected[n],!0))&&i.length&&i.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")}.bind(this)).on("open_node.jstree",function(e,t){this.get_node(t.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")}.bind(this)).on("hover_node.jstree dehover_node.jstree",function(e,t){"hover_node"===e.type&&this.is_disabled(t.node)||this.get_node(t.node,!0).children(".jstree-wholerow")["hover_node"===e.type?"addClass":"removeClass"]("jstree-wholerow-hovered")}.bind(this)).on("contextmenu.jstree",".jstree-wholerow",function(e){if(this._data.contextmenu){e.preventDefault();var t=P.Event("contextmenu",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,pageX:e.pageX,pageY:e.pageY});P(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(t)}}.bind(this)).on("click.jstree",".jstree-wholerow",function(e){e.stopImmediatePropagation();var t=P.Event("click",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});P(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(t).trigger("focus")}).on("dblclick.jstree",".jstree-wholerow",function(e){e.stopImmediatePropagation();var t=P.Event("dblclick",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});P(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(t).trigger("focus")}).on("click.jstree",".jstree-leaf > .jstree-ocl",function(e){e.stopImmediatePropagation();var t=P.Event("click",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});P(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(t).trigger("focus")}.bind(this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",function(e){return e.stopImmediatePropagation(),this.is_disabled(e.currentTarget)||this.hover_node(e.currentTarget),!1}.bind(this)).on("mouseleave.jstree",".jstree-node",function(e){this.dehover_node(e.currentTarget)}.bind(this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),a.teardown.call(this)},this.redraw_node=function(e,t,n,r){if(e=a.redraw_node.apply(this,arguments)){var i=b.cloneNode(!0);-1!==P.inArray(e.id,this._data.core.selected)&&(i.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===e.id&&(i.className+=" jstree-wholerow-hovered"),e.insertBefore(i,e.childNodes[0])}return e}},window.customElements&&Object&&Object.create){var t=Object.create(HTMLElement.prototype);t.createdCallback=function(){var e,t={core:{},plugins:[]};for(e in P.jstree.plugins)P.jstree.plugins.hasOwnProperty(e)&&this.attributes[e]&&(t.plugins.push(e),this.getAttribute(e)&&JSON.parse(this.getAttribute(e))&&(t[e]=JSON.parse(this.getAttribute(e))));for(e in P.jstree.defaults.core)P.jstree.defaults.core.hasOwnProperty(e)&&this.attributes[e]&&(t.core[e]=JSON.parse(this.getAttribute(e))||this.getAttribute(e));P(this).jstree(t)};try{window.customElements.define("vakata-jstree",function(){},{prototype:t})}catch(e){}}}}),function(o,e){"use strict";o.jstree.defaults.alltrigger=null,o.jstree.plugins.alltrigger=function(i,a){this.init=function(e,t){if(i){this.trigger=function(e,t){a.trigger.call(this,e,t),i(e.replace(".jstree","")+".jstree",t)};var n=o.vakata.context._trigger;o.vakata.context._trigger=function(e){n(e),i("context_"+e+".vakata")};var r=o.vakata.dnd._trigger;o.vakata.dnd._trigger=function(e,t,n){r(e,t,n),i("dnd_"+e+".vakata",t,n)}}a.init.call(this,e,t)}}}(jQuery),function(u){"use strict";var e=u.module("ngJsTree",[]);e.controller("jsTreeCtrl",function(){var t=1;this.nodesFingerprint=function(e){return e.__uiNodeId||(e.__uiNodeId=t++),""+e.__uiNodeId+(e.id||"")+(e.text||"")+(e.type||"")},this.changeWatcher=function(o,f){var d,t=function(){var e,t,n=[];if(o)for(var r=u.isFunction(o)?o():o,i=0,a=r.length;i<a;i++)t=r[i],e=f(t),p[e]=t,n.push(e);return n},h=function(e,t){var n,r,i=[],a={};for(n=0,r=t.length;n<r;n++)a[t[n]]=!0;for(n=0,r=e.length;n<r;n++)a[e[n]]||i.push(e[n]);return i},p={};return d={subscribe:function(e,n){e.$watch(t,function(e,t){n&&!1===n(e,t)||function(e,t){var n,r,i,a,o={},s=h(t,e);for(n=0,r=s.length;n<r;n++){var c=s[n];i=p[c],delete p[c];var l=f(i);l===c?d.onRemoved(i):(o[l]=c,d.onChanged(i))}var u=h(e,t);for(n=0,r=u.length;n<r;n++)a=u[n],i=p[a],o[a]||d.onAdded(i)}(e,t)},!0)},onAdded:u.noop,onChanged:u.noop,onRemoved:u.noop}}}),e.directive("jsTree",["$timeout",function(l){return{restrict:"A",scope:{treeData:"=ngModel",treeEventsObj:"=?treeEventsObj",shouldApply:"&"},controller:"jsTreeCtrl",link:function(i,a,o,e){var n=null,t=e.changeWatcher(i.treeData,e.nodesFingerprint),s=[],r=!1;function c(n,r){return function(){var e=arguments,t=n.$parent.$eval(r);n.$root.$$phase?t.apply(n.$parent,e):n.$parent.$apply(function(){t.apply(n.$parent,e)})}}i.destroy=function(){if(s=[],o.tree)if(-1!==o.tree.indexOf(".")){for(var e=o.tree.split("."),t=e.pop(),n=i.$parent,r=0;r<e.length;r++)n=n[e[r]];i.tree=n[t]=a}else i.tree=i.$parent[o.tree]=a;else i.tree=a;i.tree.jstree("destroy")},i.init=function(){i.tree.jstree(n),l(function(){!function(n,e,t){if(t.treeEvents)for(var r=t.treeEvents.split(";"),i=0;i<r.length;i++)if(0<r[i].length){var a=r[i].split(":")[0],o=r[i].split(":")[1];-1===a.indexOf(".")&&(a+=".jstree"),s.push(a),-1===a.indexOf(".vakata")?n.tree.on(a,c(n,o)):$(document).on(a,c(n,o))}u.isObject(n.treeEventsObj)&&u.forEach(n.treeEventsObj,function(t,e){-1===e.indexOf(".")&&(e+=".jstree"),s.push(e),-1===e.indexOf(".vakata")?n.tree.on(e,function(){var e=arguments;n.$root.$$phase?t.apply(n.$parent,e):n.$parent.$apply(function(){t.apply(n.$parent,e)})}):$(document).on(e,function(){var e=arguments;n.$root.$$phase?t.apply(n.$parent,e):n.$parent.$apply(function(){t.apply(n.$parent,e)})})})}(i,0,o)})},t.onChanged=function(e){u.isDefined(i.tree.jstree(!0).set_type)&&i.tree.jstree(!0).set_type(e.id,e.type),i.tree.jstree(!0).rename_node(e.id,e.text)},t.onAdded=function(t){l(function(){for(;r;);r=!0;var e=i.tree.jstree(!0).get_node(t.parent);i.tree.jstree(!0).create_node(e,t,"inside",function(){r=!1})||(r=!1)})},t.onRemoved=function(e){i.tree.jstree(!0).delete_node(e.id)},t.subscribe(i,function(){return!i.shouldApply||i.shouldApply()}),i.$watch(function(){var e=o.jsTree?i.$parent.$eval(o.jsTree):{};n={},u.copy(e,n);var t=JSON.stringify(n);return n.core?n.core.data=i.treeData:n.core={data:i.treeData},n.plugins?n.plugins.push("alltrigger"):n.plugins=["alltrigger"],n.alltrigger=function(e){i.$root.$$phase||-1!==s.indexOf(e)||i.$apply()},t},function(){i.destroy(),i.init()})}}}])}(angular),function(){var to,no="Expected a function",ro="__lodash_hash_undefined__",io="__lodash_placeholder__",ao=9007199254740991,oo=NaN,so=4294967295,co=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],lo="[object Arguments]",uo="[object Array]",fo="[object Boolean]",ho="[object Date]",po="[object Error]",mo="[object Function]",go="[object GeneratorFunction]",_o="[object Map]",bo="[object Number]",vo="[object Object]",yo="[object Promise]",wo="[object RegExp]",Co="[object Set]",Ao="[object String]",So="[object Symbol]",To="[object WeakMap]",xo="[object ArrayBuffer]",ko="[object DataView]",Eo="[object Float32Array]",Do="[object Float64Array]",Io="[object Int8Array]",Po="[object Int16Array]",Mo="[object Int32Array]",$o="[object Uint8Array]",Oo="[object Uint8ClampedArray]",Ro="[object Uint16Array]",No="[object Uint32Array]",Lo=/\b__p \+= '';/g,Fo=/\b(__p \+=) '' \+/g,Go=/(__e\(.*?\)|\b__t\)) \+\n'';/g,jo=/&(?:amp|lt|gt|quot|#39);/g,Bo=/[&<>"']/g,Uo=RegExp(jo.source),Ho=RegExp(Bo.source),Wo=/<%-([\s\S]+?)%>/g,qo=/<%([\s\S]+?)%>/g,zo=/<%=([\s\S]+?)%>/g,Vo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Yo=/^\w*$/,Ko=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qo=/[\\^$.*+?()[\]{}|]/g,Xo=RegExp(Qo.source),Zo=/^\s+/,n=/\s/,Jo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,es=/\{\n\/\* \[wrapped with (.+)\] \*/,ts=/,? & /,ns=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,rs=/[()=,{}\[\]\/\s]/,is=/\\(\\)?/g,as=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,os=/\w*$/,ss=/^[-+]0x[0-9a-f]+$/i,cs=/^0b[01]+$/i,ls=/^\[object .+?Constructor\]$/,us=/^0o[0-7]+$/i,fs=/^(?:0|[1-9]\d*)$/,ds=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,hs=/($^)/,ps=/['\n\r\u2028\u2029\\]/g,e="\\ud800-\\udfff",t="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",r="\\u2700-\\u27bf",i="a-z\\xdf-\\xf6\\xf8-\\xff",a="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\ufe0e\\ufe0f",s="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",c="["+e+"]",l="["+s+"]",u="["+t+"]",f="\\d+",d="["+r+"]",h="["+i+"]",p="[^"+e+s+f+r+i+a+"]",m="\\ud83c[\\udffb-\\udfff]",g="[^"+e+"]",_="(?:\\ud83c[\\udde6-\\uddff]){2}",b="[\\ud800-\\udbff][\\udc00-\\udfff]",v="["+a+"]",y="(?:"+h+"|"+p+")",w="(?:"+v+"|"+p+")",C="(?:['’](?:d|ll|m|re|s|t|ve))?",A="(?:['’](?:D|LL|M|RE|S|T|VE))?",S="(?:"+u+"|"+m+")"+"?",T="["+o+"]?",x=T+S+("(?:\\u200d(?:"+[g,_,b].join("|")+")"+T+S+")*"),k="(?:"+[d,_,b].join("|")+")"+x,E="(?:"+[g+u+"?",u,_,b,c].join("|")+")",ms=RegExp("['’]","g"),gs=RegExp(u,"g"),D=RegExp(m+"(?="+m+")|"+E+x,"g"),_s=RegExp([v+"?"+h+"+"+C+"(?="+[l,v,"$"].join("|")+")",w+"+"+A+"(?="+[l,v+y,"$"].join("|")+")",v+"?"+y+"+"+C,v+"+"+A,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",f,k].join("|"),"g"),I=RegExp("[\\u200d"+e+t+o+"]"),bs=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vs=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ys=-1,ws={};ws[Eo]=ws[Do]=ws[Io]=ws[Po]=ws[Mo]=ws[$o]=ws[Oo]=ws[Ro]=ws[No]=!0,ws[lo]=ws[uo]=ws[xo]=ws[fo]=ws[ko]=ws[ho]=ws[po]=ws[mo]=ws[_o]=ws[bo]=ws[vo]=ws[wo]=ws[Co]=ws[Ao]=ws[To]=!1;var Cs={};Cs[lo]=Cs[uo]=Cs[xo]=Cs[ko]=Cs[fo]=Cs[ho]=Cs[Eo]=Cs[Do]=Cs[Io]=Cs[Po]=Cs[Mo]=Cs[_o]=Cs[bo]=Cs[vo]=Cs[wo]=Cs[Co]=Cs[Ao]=Cs[So]=Cs[$o]=Cs[Oo]=Cs[Ro]=Cs[No]=!0,Cs[po]=Cs[mo]=Cs[To]=!1;var P={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},As=parseFloat,Ss=parseInt,M="object"==typeof global&&global&&global.Object===Object&&global,$="object"==typeof self&&self&&self.Object===Object&&self,Ts=M||$||Function("return this")(),O="object"==typeof exports&&exports&&!exports.nodeType&&exports,R=O&&"object"==typeof module&&module&&!module.nodeType&&module,xs=R&&R.exports===O,N=xs&&M.process,L=function(){try{var e=R&&R.require&&R.require("util").types;return e||N&&N.binding&&N.binding("util")}catch(e){}}(),ks=L&&L.isArrayBuffer,Es=L&&L.isDate,Ds=L&&L.isMap,Is=L&&L.isRegExp,Ps=L&&L.isSet,Ms=L&&L.isTypedArray;function $s(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Os(e,t,n,r){for(var i=-1,a=null==e?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}function Rs(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Ns(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Ls(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Fs(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function Gs(e,t){return!!(null==e?0:e.length)&&-1<Ys(e,t,0)}function js(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Bs(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Us(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Hs(e,t,n,r){var i=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function Ws(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function qs(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var F=Zs("length");function zs(e,r,t){var i;return t(e,function(e,t,n){if(r(e,t,n))return i=t,!1}),i}function Vs(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Ys(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Vs(e,Qs,n)}function Ks(e,t,n,r){for(var i=n-1,a=e.length;++i<a;)if(r(e[i],t))return i;return-1}function Qs(e){return e!=e}function Xs(e,t){var n=null==e?0:e.length;return n?ec(e,t)/n:oo}function Zs(t){return function(e){return null==e?to:e[t]}}function G(t){return function(e){return null==t?to:t[e]}}function Js(e,r,i,a,t){return t(e,function(e,t,n){i=a?(a=!1,e):r(i,e,t,n)}),i}function ec(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==to&&(n=n===to?a:n+a)}return n}function tc(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function nc(e){return e?e.slice(0,bc(e)+1).replace(Zo,""):e}function rc(t){return function(e){return t(e)}}function ic(t,e){return Bs(e,function(e){return t[e]})}function ac(e,t){return e.has(t)}function oc(e,t){for(var n=-1,r=e.length;++n<r&&-1<Ys(t,e[n],0););return n}function sc(e,t){for(var n=e.length;n--&&-1<Ys(t,e[n],0););return n}var cc=G({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),lc=G({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function uc(e){return"\\"+P[e]}function fc(e){return I.test(e)}function dc(e){var n=-1,r=Array(e.size);return e.forEach(function(e,t){r[++n]=[t,e]}),r}function hc(t,n){return function(e){return t(n(e))}}function pc(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n];o!==t&&o!==io||(e[n]=io,a[i++]=n)}return a}function mc(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function gc(e){return fc(e)?function(e){var t=D.lastIndex=0;for(;D.test(e);)++t;return t}(e):F(e)}function _c(e){return fc(e)?e.match(D)||[]:e.split("")}function bc(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}var vc=G({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var yc=function e(t){var n,E=(t=null==t?Ts:yc.defaults(Ts.Object(),t,yc.pick(Ts,vs))).Array,r=t.Date,g=t.Error,_=t.Function,i=t.Math,S=t.Object,b=t.RegExp,u=t.String,D=t.TypeError,a=E.prototype,o=_.prototype,f=S.prototype,s=t["__core-js_shared__"],c=o.toString,T=f.hasOwnProperty,l=0,d=(n=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",h=f.toString,p=c.call(S),m=Ts._,v=b("^"+c.call(T).replace(Qo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=xs?t.Buffer:to,w=t.Symbol,C=t.Uint8Array,A=y?y.allocUnsafe:to,x=hc(S.getPrototypeOf,S),k=S.create,I=f.propertyIsEnumerable,P=a.splice,M=w?w.isConcatSpreadable:to,$=w?w.iterator:to,O=w?w.toStringTag:to,R=function(){try{var e=jn(S,"defineProperty");return e({},"",{}),e}catch(e){}}(),N=t.clearTimeout!==Ts.clearTimeout&&t.clearTimeout,L=r&&r.now!==Ts.Date.now&&r.now,F=t.setTimeout!==Ts.setTimeout&&t.setTimeout,G=i.ceil,j=i.floor,B=S.getOwnPropertySymbols,U=y?y.isBuffer:to,H=t.isFinite,W=a.join,q=hc(S.keys,S),z=i.max,V=i.min,Y=r.now,K=t.parseInt,Q=i.random,X=a.reverse,Z=jn(t,"DataView"),J=jn(t,"Map"),ee=jn(t,"Promise"),te=jn(t,"Set"),ne=jn(t,"WeakMap"),re=jn(S,"create"),ie=ne&&new ne,ae={},oe=pr(Z),se=pr(J),ce=pr(ee),le=pr(te),ue=pr(ne),fe=w?w.prototype:to,de=fe?fe.valueOf:to,he=fe?fe.toString:to;function pe(e){if(Pi(e)&&!yi(e)&&!(e instanceof be)){if(e instanceof _e)return e;if(T.call(e,"__wrapped__"))return mr(e)}return new _e(e)}var me=function(){function n(){}return function(e){if(!Ii(e))return{};if(k)return k(e);n.prototype=e;var t=new n;return n.prototype=to,t}}();function ge(){}function _e(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=to}function be(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=so,this.__views__=[]}function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function we(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ce(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new we;++t<n;)this.add(e[t])}function Ae(e){var t=this.__data__=new ye(e);this.size=t.size}function Se(e,t){var n=yi(e),r=!n&&vi(e),i=!n&&!r&&Si(e),a=!n&&!r&&!i&&Gi(e),o=n||r||i||a,s=o?tc(e.length,u):[],c=s.length;for(var l in e)!t&&!T.call(e,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Vn(l,c))||s.push(l);return s}function Te(e){var t=e.length;return t?e[Ct(0,t-1)]:to}function xe(e,t){return lr(rn(e),Re(t,0,e.length))}function ke(e){return lr(rn(e))}function Ee(e,t,n){(n===to||gi(e[t],n))&&(n!==to||t in e)||$e(e,t,n)}function De(e,t,n){var r=e[t];T.call(e,t)&&gi(r,n)&&(n!==to||t in e)||$e(e,t,n)}function Ie(e,t){for(var n=e.length;n--;)if(gi(e[n][0],t))return n;return-1}function Pe(e,r,i,a){return je(e,function(e,t,n){r(a,e,i(e),n)}),a}function Me(e,t){return e&&an(t,sa(t),e)}function $e(e,t,n){"__proto__"==t&&R?R(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Oe(e,t){for(var n=-1,r=t.length,i=E(r),a=null==e;++n<r;)i[n]=a?to:na(e,t[n]);return i}function Re(e,t,n){return e==e&&(n!==to&&(e=e<=n?e:n),t!==to&&(e=t<=e?e:t)),e}function Ne(n,r,i,e,t,a){var o,s=1&r,c=2&r,l=4&r;if(i&&(o=t?i(n,e,t,a):i(n)),o!==to)return o;if(!Ii(n))return n;var u,f,d,h,p,m,g,_,b,v=yi(n);if(v){if(_=(g=n).length,b=new g.constructor(_),_&&"string"==typeof g[0]&&T.call(g,"index")&&(b.index=g.index,b.input=g.input),o=b,!s)return rn(n,o)}else{var y=Hn(n),w=y==mo||y==go;if(Si(n))return Xt(n,s);if(y==vo||y==lo||w&&!t){if(o=c||w?{}:qn(n),!s)return c?(m=d=n,h=(p=o)&&an(m,ca(m),p),an(d,Un(d),h)):(f=Me(o,u=n),an(u,Bn(u),f))}else{if(!Cs[y])return t?n:{};o=function(e,t,n){var r,i,a,o,s,c=e.constructor;switch(t){case xo:return Zt(e);case fo:case ho:return new c(+e);case ko:return o=e,s=n?Zt(o.buffer):o.buffer,new o.constructor(s,o.byteOffset,o.byteLength);case Eo:case Do:case Io:case Po:case Mo:case $o:case Oo:case Ro:case No:return Jt(e,n);case _o:return new c;case bo:case Ao:return new c(e);case wo:return(a=new(i=e).constructor(i.source,os.exec(i))).lastIndex=i.lastIndex,a;case Co:return new c;case So:return r=e,de?S(de.call(r)):{}}}(n,y,s)}}a||(a=new Ae);var C=a.get(n);if(C)return C;a.set(n,o),Ni(n)?n.forEach(function(e){o.add(Ne(e,r,i,e,n,a))}):Mi(n)&&n.forEach(function(e,t){o.set(t,Ne(e,r,i,t,n,a))});var A=v?to:(l?c?$n:Mn:c?ca:sa)(n);return Rs(A||n,function(e,t){A&&(e=n[t=e]),De(o,t,Ne(e,r,i,t,n,a))}),o}function Le(e,t,n){var r=n.length;if(null==e)return!r;for(e=S(e);r--;){var i=n[r],a=t[i],o=e[i];if(o===to&&!(i in e)||!a(o))return!1}return!0}function Fe(e,t,n){if("function"!=typeof e)throw new D(no);return ar(function(){e.apply(to,n)},t)}function Ge(e,t,n,r){var i=-1,a=Gs,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=Bs(t,rc(n))),r?(a=js,o=!1):200<=t.length&&(a=ac,o=!1,t=new Ce(t));e:for(;++i<s;){var u=e[i],f=null==n?u:n(u);if(u=r||0!==u?u:0,o&&f==f){for(var d=l;d--;)if(t[d]===f)continue e;c.push(u)}else a(t,f,r)||c.push(u)}return c}pe.templateSettings={escape:Wo,evaluate:qo,interpolate:zo,variable:"",imports:{_:pe}},(pe.prototype=ge.prototype).constructor=pe,(_e.prototype=me(ge.prototype)).constructor=_e,(be.prototype=me(ge.prototype)).constructor=be,ve.prototype.clear=function(){this.__data__=re?re(null):{},this.size=0},ve.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ve.prototype.get=function(e){var t=this.__data__;if(re){var n=t[e];return n===ro?to:n}return T.call(t,e)?t[e]:to},ve.prototype.has=function(e){var t=this.__data__;return re?t[e]!==to:T.call(t,e)},ve.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=re&&t===to?ro:t,this},ye.prototype.clear=function(){this.__data__=[],this.size=0},ye.prototype.delete=function(e){var t=this.__data__,n=Ie(t,e);return!(n<0||(n==t.length-1?t.pop():P.call(t,n,1),--this.size,0))},ye.prototype.get=function(e){var t=this.__data__,n=Ie(t,e);return n<0?to:t[n][1]},ye.prototype.has=function(e){return-1<Ie(this.__data__,e)},ye.prototype.set=function(e,t){var n=this.__data__,r=Ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},we.prototype.clear=function(){this.size=0,this.__data__={hash:new ve,map:new(J||ye),string:new ve}},we.prototype.delete=function(e){var t=Fn(this,e).delete(e);return this.size-=t?1:0,t},we.prototype.get=function(e){return Fn(this,e).get(e)},we.prototype.has=function(e){return Fn(this,e).has(e)},we.prototype.set=function(e,t){var n=Fn(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ce.prototype.add=Ce.prototype.push=function(e){return this.__data__.set(e,ro),this},Ce.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.clear=function(){this.__data__=new ye,this.size=0},Ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ye){var r=n.__data__;if(!J||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new we(r)}return n.set(e,t),this.size=n.size,this};var je=cn(Ye),Be=cn(Ke,!0);function Ue(e,r){var i=!0;return je(e,function(e,t,n){return i=!!r(e,t,n)}),i}function He(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(null!=o&&(s===to?o==o&&!Fi(o):n(o,s)))var s=o,c=a}return c}function We(e,r){var i=[];return je(e,function(e,t,n){r(e,t,n)&&i.push(e)}),i}function qe(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=zn),i||(i=[]);++a<o;){var s=e[a];0<t&&n(s)?1<t?qe(s,t-1,n,r,i):Us(i,s):r||(i[i.length]=s)}return i}var ze=ln(),Ve=ln(!0);function Ye(e,t){return e&&ze(e,t,sa)}function Ke(e,t){return e&&Ve(e,t,sa)}function Qe(t,e){return Fs(e,function(e){return ki(t[e])})}function Xe(e,t){for(var n=0,r=(t=Vt(t,e)).length;null!=e&&n<r;)e=e[hr(t[n++])];return n&&n==r?e:to}function Ze(e,t,n){var r=t(e);return yi(e)?r:Us(r,n(e))}function Je(e){return null==e?e===to?"[object Undefined]":"[object Null]":O&&O in S(e)?function(e){var t=T.call(e,O),n=e[O];try{e[O]=to;var r=!0}catch(e){}var i=h.call(e);return r&&(t?e[O]=n:delete e[O]),i}(e):(t=e,h.call(t));var t}function et(e,t){return t<e}function tt(e,t){return null!=e&&T.call(e,t)}function nt(e,t){return null!=e&&t in S(e)}function rt(e,t,n){for(var r=n?js:Gs,i=e[0].length,a=e.length,o=a,s=E(a),c=1/0,l=[];o--;){var u=e[o];o&&t&&(u=Bs(u,rc(t))),c=V(u.length,c),s[o]=!n&&(t||120<=i&&120<=u.length)?new Ce(o&&u):to}u=e[0];var f=-1,d=s[0];e:for(;++f<i&&l.length<c;){var h=u[f],p=t?t(h):h;if(h=n||0!==h?h:0,!(d?ac(d,p):r(l,p,n))){for(o=a;--o;){var m=s[o];if(!(m?ac(m,p):r(e[o],p,n)))continue e}d&&d.push(p),l.push(h)}}return l}function it(e,t,n){var r=null==(e=nr(e,t=Vt(t,e)))?e:e[hr(xr(t))];return null==r?to:$s(r,e,n)}function at(e){return Pi(e)&&Je(e)==lo}function ot(e,t,n,r,i){return e===t||(null==e||null==t||!Pi(e)&&!Pi(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var o=yi(e),s=yi(t),c=o?uo:Hn(e),l=s?uo:Hn(t),u=(c=c==lo?vo:c)==vo,f=(l=l==lo?vo:l)==vo,d=c==l;if(d&&Si(e)){if(!Si(t))return!1;u=!(o=!0)}if(d&&!u)return a||(a=new Ae),o||Gi(e)?In(e,t,n,r,i,a):function(e,t,n,r,i,a,o){switch(n){case ko:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case xo:return!(e.byteLength!=t.byteLength||!a(new C(e),new C(t)));case fo:case ho:case bo:return gi(+e,+t);case po:return e.name==t.name&&e.message==t.message;case wo:case Ao:return e==t+"";case _o:var s=dc;case Co:var c=1&r;if(s||(s=mc),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=2,o.set(e,t);var u=In(s(e),s(t),r,i,a,o);return o.delete(e),u;case So:if(de)return de.call(e)==de.call(t)}return!1}(e,t,c,n,r,i,a);if(!(1&n)){var h=u&&T.call(e,"__wrapped__"),p=f&&T.call(t,"__wrapped__");if(h||p){var m=h?e.value():e,g=p?t.value():t;return a||(a=new Ae),i(m,g,n,r,a)}}return!!d&&(a||(a=new Ae),function(e,t,n,r,i,a){var o=1&n,s=Mn(e),c=s.length,l=Mn(t).length;if(c!=l&&!o)return!1;for(var u=c;u--;){var f=s[u];if(!(o?f in t:T.call(t,f)))return!1}var d=a.get(e),h=a.get(t);if(d&&h)return d==t&&h==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++u<c;){f=s[u];var g=e[f],_=t[f];if(r)var b=o?r(_,g,f,t,e,a):r(g,_,f,e,t,a);if(!(b===to?g===_||i(g,_,n,r,a):b)){p=!1;break}m||(m="constructor"==f)}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}(e,t,n,r,i,a))}(e,t,n,r,ot,i))}function st(e,t,n,r){var i=n.length,a=i,o=!r;if(null==e)return!a;for(e=S(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){var c=(s=n[i])[0],l=e[c],u=s[1];if(o&&s[2]){if(l===to&&!(c in e))return!1}else{var f=new Ae;if(r)var d=r(l,u,c,e,t,f);if(!(d===to?ot(u,l,3,r,f):d))return!1}}return!0}function ct(e){return!(!Ii(e)||(t=e,d&&d in t))&&(ki(e)?v:ls).test(pr(e));var t}function lt(e){return"function"==typeof e?e:null==e?$a:"object"==typeof e?yi(e)?mt(e[0],e[1]):pt(e):Ua(e)}function ut(e){if(!Zn(e))return q(e);var t=[];for(var n in S(e))T.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ft(e){if(!Ii(e))return function(e){var t=[];if(null!=e)for(var n in S(e))t.push(n);return t}(e);var t=Zn(e),n=[];for(var r in e)("constructor"!=r||!t&&T.call(e,r))&&n.push(r);return n}function dt(e,t){return e<t}function ht(e,r){var i=-1,a=Ci(e)?E(e.length):[];return je(e,function(e,t,n){a[++i]=r(e,t,n)}),a}function pt(t){var n=Gn(t);return 1==n.length&&n[0][2]?er(n[0][0],n[0][1]):function(e){return e===t||st(e,t,n)}}function mt(n,r){return Kn(n)&&Jn(r)?er(hr(n),r):function(e){var t=na(e,n);return t===to&&t===r?ra(e,n):ot(r,t,3)}}function gt(r,i,a,o,s){r!==i&&ze(i,function(e,t){if(s||(s=new Ae),Ii(e))!function(e,t,n,r,i,a,o){var s=rr(e,n),c=rr(t,n),l=o.get(c);if(l)return Ee(e,n,l);var u=a?a(s,c,n+"",e,t,o):to,f=u===to;if(f){var d=yi(c),h=!d&&Si(c),p=!d&&!h&&Gi(c);u=c,d||h||p?u=yi(s)?s:Ai(s)?rn(s):h?Xt(c,!(f=!1)):p?Jt(c,!(f=!1)):[]:Oi(c)||vi(c)?vi(u=s)?u=Vi(s):Ii(s)&&!ki(s)||(u=qn(c)):f=!1}f&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),Ee(e,n,u)}(r,i,t,a,gt,o,s);else{var n=o?o(rr(r,t),e,t+"",r,i,s):to;n===to&&(n=e),Ee(r,t,n)}},ca)}function _t(e,t){var n=e.length;if(n)return Vn(t+=t<0?n:0,n)?e[t]:to}function bt(e,r,n){r=r.length?Bs(r,function(t){return yi(t)?function(e){return Xe(e,1===t.length?t[0]:t)}:t}):[$a];var i=-1;return r=Bs(r,rc(Ln())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(ht(e,function(t,e,n){return{criteria:Bs(r,function(e){return e(t)}),index:++i,value:t}}),function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=en(i[r],a[r]);if(c){if(s<=r)return c;var l=n[r];return c*("desc"==l?-1:1)}}return e.index-t.index}(e,t,n)})}function vt(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=Xe(e,o);n(s,o)&&kt(a,Vt(o,e),s)}return a}function yt(e,t,n,r){var i=r?Ks:Ys,a=-1,o=t.length,s=e;for(e===t&&(t=rn(t)),n&&(s=Bs(e,rc(n)));++a<o;)for(var c=0,l=t[a],u=n?n(l):l;-1<(c=i(s,u,c,r));)s!==e&&P.call(s,c,1),P.call(e,c,1);return e}function wt(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==a){var a=i;Vn(i)?P.call(e,i,1):Gt(e,i)}}return e}function Ct(e,t){return e+j(Q()*(t-e+1))}function At(e,t){var n="";if(!e||t<1||ao<t)return n;for(;t%2&&(n+=e),(t=j(t/2))&&(e+=e),t;);return n}function St(e,t){return or(tr(e,t,$a),e+"")}function Tt(e){return Te(ga(e))}function xt(e,t){var n=ga(e);return lr(n,Re(t,0,n.length))}function kt(e,t,n,r){if(!Ii(e))return e;for(var i=-1,a=(t=Vt(t,e)).length,o=a-1,s=e;null!=s&&++i<a;){var c=hr(t[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=o){var u=s[c];(l=r?r(u,c,s):to)===to&&(l=Ii(u)?u:Vn(t[i+1])?[]:{})}De(s,c,l),s=s[c]}return e}var Et=ie?function(e,t){return ie.set(e,t),e}:$a,Dt=R?function(e,t){return R(e,"toString",{configurable:!0,enumerable:!1,value:Ia(t),writable:!0})}:$a;function It(e){return lr(ga(e))}function Pt(e,t,n){var r=-1,i=e.length;t<0&&(t=i<-t?0:i+t),(n=i<n?i:n)<0&&(n+=i),i=n<t?0:n-t>>>0,t>>>=0;for(var a=E(i);++r<i;)a[r]=e[r+t];return a}function Mt(e,r){var i;return je(e,function(e,t,n){return!(i=r(e,t,n))}),!!i}function $t(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var a=r+i>>>1,o=e[a];null!==o&&!Fi(o)&&(n?o<=t:o<t)?r=a+1:i=a}return i}return Ot(e,t,$a,n)}function Ot(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var o=(t=n(t))!=t,s=null===t,c=Fi(t),l=t===to;i<a;){var u=j((i+a)/2),f=n(e[u]),d=f!==to,h=null===f,p=f==f,m=Fi(f);if(o)var g=r||p;else g=l?p&&(r||d):s?p&&d&&(r||!h):c?p&&d&&!h&&(r||!m):!h&&!m&&(r?f<=t:f<t);g?i=u+1:a=u}return V(a,4294967294)}function Rt(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n],s=t?t(o):o;if(!n||!gi(s,c)){var c=s;a[i++]=0===o?0:o}}return a}function Nt(e){return"number"==typeof e?e:Fi(e)?oo:+e}function Lt(e){if("string"==typeof e)return e;if(yi(e))return Bs(e,Lt)+"";if(Fi(e))return he?he.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ft(e,t,n){var r=-1,i=Gs,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=js;else if(200<=a){var l=t?null:Sn(e);if(l)return mc(l);o=!1,i=ac,c=new Ce}else c=t?[]:s;e:for(;++r<a;){var u=e[r],f=t?t(u):u;if(u=n||0!==u?u:0,o&&f==f){for(var d=c.length;d--;)if(c[d]===f)continue e;t&&c.push(f),s.push(u)}else i(c,f,n)||(c!==s&&c.push(f),s.push(u))}return s}function Gt(e,t){return null==(e=nr(e,t=Vt(t,e)))||delete e[hr(xr(t))]}function jt(e,t,n,r){return kt(e,t,n(Xe(e,t)),r)}function Bt(e,t,n,r){for(var i=e.length,a=r?i:-1;(r?a--:++a<i)&&t(e[a],a,e););return n?Pt(e,r?0:a,r?a+1:i):Pt(e,r?a+1:0,r?i:a)}function Ut(e,t){var n=e;return n instanceof be&&(n=n.value()),Hs(t,function(e,t){return t.func.apply(t.thisArg,Us([e],t.args))},n)}function Ht(e,t,n){var r=e.length;if(r<2)return r?Ft(e[0]):[];for(var i=-1,a=E(r);++i<r;)for(var o=e[i],s=-1;++s<r;)s!=i&&(a[i]=Ge(a[i]||o,e[s],t,n));return Ft(qe(a,1),t,n)}function Wt(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:to;n(o,e[r],s)}return o}function qt(e){return Ai(e)?e:[]}function zt(e){return"function"==typeof e?e:$a}function Vt(e,t){return yi(e)?e:Kn(e,t)?[e]:dr(Yi(e))}var Yt=St;function Kt(e,t,n){var r=e.length;return n=n===to?r:n,!t&&r<=n?e:Pt(e,t,n)}var Qt=N||function(e){return Ts.clearTimeout(e)};function Xt(e,t){if(t)return e.slice();var n=e.length,r=A?A(n):new e.constructor(n);return e.copy(r),r}function Zt(e){var t=new e.constructor(e.byteLength);return new C(t).set(new C(e)),t}function Jt(e,t){var n=t?Zt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function en(e,t){if(e!==t){var n=e!==to,r=null===e,i=e==e,a=Fi(e),o=t!==to,s=null===t,c=t==t,l=Fi(t);if(!s&&!l&&!a&&t<e||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!c)return-1}return 0}function tn(e,t,n,r){for(var i=-1,a=e.length,o=n.length,s=-1,c=t.length,l=z(a-o,0),u=E(c+l),f=!r;++s<c;)u[s]=t[s];for(;++i<o;)(f||i<a)&&(u[n[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u}function nn(e,t,n,r){for(var i=-1,a=e.length,o=-1,s=n.length,c=-1,l=t.length,u=z(a-s,0),f=E(u+l),d=!r;++i<u;)f[i]=e[i];for(var h=i;++c<l;)f[h+c]=t[c];for(;++o<s;)(d||i<a)&&(f[h+n[o]]=e[i++]);return f}function rn(e,t){var n=-1,r=e.length;for(t||(t=E(r));++n<r;)t[n]=e[n];return t}function an(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):to;c===to&&(c=e[s]),i?$e(n,s,c):De(n,s,c)}return n}function on(i,a){return function(e,t){var n=yi(e)?Os:Pe,r=a?a():{};return n(e,i,Ln(t,2),r)}}function sn(s){return St(function(e,t){var n=-1,r=t.length,i=1<r?t[r-1]:to,a=2<r?t[2]:to;for(i=3<s.length&&"function"==typeof i?(r--,i):to,a&&Yn(t[0],t[1],a)&&(i=r<3?to:i,r=1),e=S(e);++n<r;){var o=t[n];o&&s(e,o,n,i)}return e})}function cn(a,o){return function(e,t){if(null==e)return e;if(!Ci(e))return a(e,t);for(var n=e.length,r=o?n:-1,i=S(e);(o?r--:++r<n)&&!1!==t(i[r],r,i););return e}}function ln(c){return function(e,t,n){for(var r=-1,i=S(e),a=n(e),o=a.length;o--;){var s=a[c?o:++r];if(!1===t(i[s],s,i))break}return e}}function un(i){return function(e){var t=fc(e=Yi(e))?_c(e):to,n=t?t[0]:e.charAt(0),r=t?Kt(t,1).join(""):e.slice(1);return n[i]()+r}}function fn(t){return function(e){return Hs(ka(va(e).replace(ms,"")),t,"")}}function dn(r){return function(){var e=arguments;switch(e.length){case 0:return new r;case 1:return new r(e[0]);case 2:return new r(e[0],e[1]);case 3:return new r(e[0],e[1],e[2]);case 4:return new r(e[0],e[1],e[2],e[3]);case 5:return new r(e[0],e[1],e[2],e[3],e[4]);case 6:return new r(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new r(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var t=me(r.prototype),n=r.apply(t,e);return Ii(n)?n:t}}function hn(o){return function(e,t,n){var r=S(e);if(!Ci(e)){var i=Ln(t,3);e=sa(e),t=function(e){return i(r[e],e,r)}}var a=o(e,t,n);return-1<a?r[i?e[a]:a]:to}}function pn(c){return Pn(function(i){var a=i.length,e=a,t=_e.prototype.thru;for(c&&i.reverse();e--;){var n=i[e];if("function"!=typeof n)throw new D(no);if(t&&!o&&"wrapper"==Rn(n))var o=new _e([],!0)}for(e=o?e:a;++e<a;){var r=Rn(n=i[e]),s="wrapper"==r?On(n):to;o=s&&Qn(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?o[Rn(s[0])].apply(o,s[3]):1==n.length&&Qn(n)?o[r]():o.thru(n)}return function(){var e=arguments,t=e[0];if(o&&1==e.length&&yi(t))return o.plant(t).value();for(var n=0,r=a?i[n].apply(this,e):t;++n<a;)r=i[n].call(this,r);return r}})}function mn(l,u,f,d,h,p,m,g,_,b){var v=128&u,y=1&u,w=2&u,C=24&u,A=512&u,S=w?to:dn(l);return function e(){for(var t=arguments.length,n=E(t),r=t;r--;)n[r]=arguments[r];if(C)var i=Nn(e),a=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(n,i);if(d&&(n=tn(n,d,h,C)),p&&(n=nn(n,p,m,C)),t-=a,C&&t<b){var o=pc(n,i);return Cn(l,u,mn,e.placeholder,f,n,o,g,_,b-t)}var s=y?f:this,c=w?s[l]:l;return t=n.length,g?n=function(e,t){for(var n=e.length,r=V(t.length,n),i=rn(e);r--;){var a=t[r];e[r]=Vn(a,n)?i[a]:to}return e}(n,g):A&&1<t&&n.reverse(),v&&_<t&&(n.length=_),this&&this!==Ts&&this instanceof e&&(c=S||dn(c)),c.apply(s,n)}}function gn(o,s){return function(e,t){return n=e,r=o,i=s(t),a={},Ye(n,function(e,t,n){r(a,i(e),t,n)}),a;var n,r,i,a}}function _n(r,i){return function(e,t){var n;if(e===to&&t===to)return i;if(e!==to&&(n=e),t!==to){if(n===to)return t;t="string"==typeof e||"string"==typeof t?(e=Lt(e),Lt(t)):(e=Nt(e),Nt(t)),n=r(e,t)}return n}}function bn(r){return Pn(function(e){return e=Bs(e,rc(Ln())),St(function(t){var n=this;return r(e,function(e){return $s(e,n,t)})})})}function vn(e,t){var n=(t=t===to?" ":Lt(t)).length;if(n<2)return n?At(t,e):t;var r=At(t,G(e/gc(t)));return fc(t)?Kt(_c(r),0,e).join(""):r.slice(0,e)}function yn(r){return function(e,t,n){return n&&"number"!=typeof n&&Yn(e,t,n)&&(t=n=to),e=Hi(e),t===to?(t=e,e=0):t=Hi(t),function(e,t,n,r){for(var i=-1,a=z(G((t-e)/(n||1)),0),o=E(a);a--;)o[r?a:++i]=e,e+=n;return o}(e,t,n=n===to?e<t?1:-1:Hi(n),r)}}function wn(n){return function(e,t){return"string"==typeof e&&"string"==typeof t||(e=zi(e),t=zi(t)),n(e,t)}}function Cn(e,t,n,r,i,a,o,s,c,l){var u=8&t;t|=u?32:64,4&(t&=~(u?64:32))||(t&=-4);var f=[e,t,i,u?a:to,u?o:to,u?to:a,u?to:o,s,c,l],d=n.apply(to,f);return Qn(e)&&ir(d,f),d.placeholder=r,sr(d,e,t)}function An(e){var r=i[e];return function(e,t){if(e=zi(e),(t=null==t?0:V(Wi(t),292))&&H(e)){var n=(Yi(e)+"e").split("e");return+((n=(Yi(r(n[0]+"e"+(+n[1]+t)))+"e").split("e"))[0]+"e"+(+n[1]-t))}return r(e)}}var Sn=te&&1/mc(new te([,-0]))[1]==1/0?function(e){return new te(e)}:Fa;function Tn(o){return function(e){var t,n,r,i,a=Hn(e);return a==_o?dc(e):a==Co?(t=e,n=-1,r=Array(t.size),t.forEach(function(e){r[++n]=[e,e]}),r):Bs(o(i=e),function(e){return[e,i[e]]})}}function xn(e,t,n,r,i,a,o,s){var c=2&t;if(!c&&"function"!=typeof e)throw new D(no);var l=r?r.length:0;if(l||(t&=-97,r=i=to),o=o===to?o:z(Wi(o),0),s=s===to?s:Wi(s),l-=i?i.length:0,64&t){var u=r,f=i;r=i=to}var d,h,p,m,g,_,b,v,y,w,C,A,S,T=c?to:On(e),x=[e,t,n,r,i,u,f,a,o,s];if(T&&function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,o=128==r&&8==n||128==r&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(a||o){1&r&&(e[2]=t[2],i|=1&n?0:4);var s=t[3];if(s){var c=e[3];e[3]=c?tn(c,s,t[4]):s,e[4]=c?pc(e[3],io):t[4]}(s=t[5])&&(c=e[5],e[5]=c?nn(c,s,t[6]):s,e[6]=c?pc(e[5],io):t[6]),(s=t[7])&&(e[7]=s),128&r&&(e[8]=null==e[8]?t[8]:V(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}}(x,T),e=x[0],t=x[1],n=x[2],r=x[3],i=x[4],!(s=x[9]=x[9]===to?c?0:e.length:z(x[9]-l,0))&&24&t&&(t&=-25),t&&1!=t)k=8==t||16==t?(b=t,v=s,y=dn(_=e),function e(){for(var t=arguments.length,n=E(t),r=t,i=Nn(e);r--;)n[r]=arguments[r];var a=t<3&&n[0]!==i&&n[t-1]!==i?[]:pc(n,i);return(t-=a.length)<v?Cn(_,b,mn,e.placeholder,to,n,a,to,to,v-t):$s(this&&this!==Ts&&this instanceof e?y:_,this,n)}):32!=t&&33!=t||i.length?mn.apply(to,x):(h=n,p=r,m=1&t,g=dn(d=e),function e(){for(var t=-1,n=arguments.length,r=-1,i=p.length,a=E(i+n),o=this&&this!==Ts&&this instanceof e?g:d;++r<i;)a[r]=p[r];for(;n--;)a[r++]=arguments[++t];return $s(o,m?h:this,a)});else var k=(C=n,A=1&t,S=dn(w=e),function e(){return(this&&this!==Ts&&this instanceof e?S:w).apply(A?C:this,arguments)});return sr((T?Et:ir)(k,x),e,t)}function kn(e,t,n,r){return e===to||gi(e,f[n])&&!T.call(r,n)?t:e}function En(e,t,n,r,i,a){return Ii(e)&&Ii(t)&&(a.set(t,e),gt(e,t,to,En,a),a.delete(t)),e}function Dn(e){return Oi(e)?to:e}function In(e,t,n,r,i,a){var o=1&n,s=e.length,c=t.length;if(s!=c&&!(o&&s<c))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var f=-1,d=!0,h=2&n?new Ce:to;for(a.set(e,t),a.set(t,e);++f<s;){var p=e[f],m=t[f];if(r)var g=o?r(m,p,f,t,e,a):r(p,m,f,e,t,a);if(g!==to){if(g)continue;d=!1;break}if(h){if(!qs(t,function(e,t){if(!ac(h,t)&&(p===e||i(p,e,n,r,a)))return h.push(t)})){d=!1;break}}else if(p!==m&&!i(p,m,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function Pn(e){return or(tr(e,to,wr),e+"")}function Mn(e){return Ze(e,sa,Bn)}function $n(e){return Ze(e,ca,Un)}var On=ie?function(e){return ie.get(e)}:Fa;function Rn(e){for(var t=e.name+"",n=ae[t],r=T.call(ae,t)?n.length:0;r--;){var i=n[r],a=i.func;if(null==a||a==e)return i.name}return t}function Nn(e){return(T.call(pe,"placeholder")?pe:e).placeholder}function Ln(){var e=pe.iteratee||Oa;return e=e===Oa?lt:e,arguments.length?e(arguments[0],arguments[1]):e}function Fn(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Gn(e){for(var t=sa(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Jn(i)]}return t}function jn(e,t){var n,r,i=(r=t,null==(n=e)?to:n[r]);return ct(i)?i:to}var Bn=B?function(t){return null==t?[]:(t=S(t),Fs(B(t),function(e){return I.call(t,e)}))}:qa,Un=B?function(e){for(var t=[];e;)Us(t,Bn(e)),e=x(e);return t}:qa,Hn=Je;function Wn(e,t,n){for(var r=-1,i=(t=Vt(t,e)).length,a=!1;++r<i;){var o=hr(t[r]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++r!=i?a:!!(i=null==e?0:e.length)&&Di(i)&&Vn(o,i)&&(yi(e)||vi(e))}function qn(e){return"function"!=typeof e.constructor||Zn(e)?{}:me(x(e))}function zn(e){return yi(e)||vi(e)||!!(M&&e&&e[M])}function Vn(e,t){var n=typeof e;return!!(t=null==t?ao:t)&&("number"==n||"symbol"!=n&&fs.test(e))&&-1<e&&e%1==0&&e<t}function Yn(e,t,n){if(!Ii(n))return!1;var r=typeof t;return!!("number"==r?Ci(n)&&Vn(t,n.length):"string"==r&&t in n)&&gi(n[t],e)}function Kn(e,t){if(yi(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Fi(e))||Yo.test(e)||!Vo.test(e)||null!=t&&e in S(t)}function Qn(e){var t=Rn(e),n=pe[t];if("function"!=typeof n||!(t in be.prototype))return!1;if(e===n)return!0;var r=On(n);return!!r&&e===r[0]}(Z&&Hn(new Z(new ArrayBuffer(1)))!=ko||J&&Hn(new J)!=_o||ee&&Hn(ee.resolve())!=yo||te&&Hn(new te)!=Co||ne&&Hn(new ne)!=To)&&(Hn=function(e){var t=Je(e),n=t==vo?e.constructor:to,r=n?pr(n):"";if(r)switch(r){case oe:return ko;case se:return _o;case ce:return yo;case le:return Co;case ue:return To}return t});var Xn=s?ki:za;function Zn(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||f)}function Jn(e){return e==e&&!Ii(e)}function er(t,n){return function(e){return null!=e&&e[t]===n&&(n!==to||t in S(e))}}function tr(a,o,s){return o=z(o===to?a.length-1:o,0),function(){for(var e=arguments,t=-1,n=z(e.length-o,0),r=E(n);++t<n;)r[t]=e[o+t];t=-1;for(var i=E(o+1);++t<o;)i[t]=e[t];return i[o]=s(r),$s(a,this,i)}}function nr(e,t){return t.length<2?e:Xe(e,Pt(t,0,-1))}function rr(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ir=cr(Et),ar=F||function(e,t){return Ts.setTimeout(e,t)},or=cr(Dt);function sr(e,t,n){var r,i,a,o=t+"";return or(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(1<n?"& ":"")+t[r],t=t.join(2<n?", ":" "),e.replace(Jo,"{\n/* [wrapped with "+t+"] */\n")}(o,(a=o.match(es),r=a?a[1].split(ts):[],i=n,Rs(co,function(e){var t="_."+e[0];i&e[1]&&!Gs(r,t)&&r.push(t)}),r.sort())))}function cr(n){var r=0,i=0;return function(){var e=Y(),t=16-(e-i);if(i=e,0<t){if(800<=++r)return arguments[0]}else r=0;return n.apply(to,arguments)}}function lr(e,t){var n=-1,r=e.length,i=r-1;for(t=t===to?r:t;++n<t;){var a=Ct(n,i),o=e[a];e[a]=e[n],e[n]=o}return e.length=t,e}var ur,fr,dr=(fr=(ur=ui(function(e){var i=[];return 46===e.charCodeAt(0)&&i.push(""),e.replace(Ko,function(e,t,n,r){i.push(n?r.replace(is,"$1"):t||e)}),i},function(e){return 500===fr.size&&fr.clear(),e})).cache,ur);function hr(e){if("string"==typeof e||Fi(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function pr(e){if(null!=e){try{return c.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function mr(e){if(e instanceof be)return e.clone();var t=new _e(e.__wrapped__,e.__chain__);return t.__actions__=rn(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var gr=St(function(e,t){return Ai(e)?Ge(e,qe(t,1,Ai,!0)):[]}),_r=St(function(e,t){var n=xr(t);return Ai(n)&&(n=to),Ai(e)?Ge(e,qe(t,1,Ai,!0),Ln(n,2)):[]}),br=St(function(e,t){var n=xr(t);return Ai(n)&&(n=to),Ai(e)?Ge(e,qe(t,1,Ai,!0),to,n):[]});function vr(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Wi(n);return i<0&&(i=z(r+i,0)),Vs(e,Ln(t,3),i)}function yr(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==to&&(i=Wi(n),i=n<0?z(r+i,0):V(i,r-1)),Vs(e,Ln(t,3),i,!0)}function wr(e){return null!=e&&e.length?qe(e,1):[]}function Cr(e){return e&&e.length?e[0]:to}var Ar=St(function(e){var t=Bs(e,qt);return t.length&&t[0]===e[0]?rt(t):[]}),Sr=St(function(e){var t=xr(e),n=Bs(e,qt);return t===xr(n)?t=to:n.pop(),n.length&&n[0]===e[0]?rt(n,Ln(t,2)):[]}),Tr=St(function(e){var t=xr(e),n=Bs(e,qt);return(t="function"==typeof t?t:to)&&n.pop(),n.length&&n[0]===e[0]?rt(n,to,t):[]});function xr(e){var t=null==e?0:e.length;return t?e[t-1]:to}var kr=St(Er);function Er(e,t){return e&&e.length&&t&&t.length?yt(e,t):e}var Dr=Pn(function(e,t){var n=null==e?0:e.length,r=Oe(e,t);return wt(e,Bs(t,function(e){return Vn(e,n)?+e:e}).sort(en)),r});function Ir(e){return null==e?e:X.call(e)}var Pr=St(function(e){return Ft(qe(e,1,Ai,!0))}),Mr=St(function(e){var t=xr(e);return Ai(t)&&(t=to),Ft(qe(e,1,Ai,!0),Ln(t,2))}),$r=St(function(e){var t=xr(e);return t="function"==typeof t?t:to,Ft(qe(e,1,Ai,!0),to,t)});function Or(t){if(!t||!t.length)return[];var n=0;return t=Fs(t,function(e){if(Ai(e))return n=z(e.length,n),!0}),tc(n,function(e){return Bs(t,Zs(e))})}function Rr(e,t){if(!e||!e.length)return[];var n=Or(e);return null==t?n:Bs(n,function(e){return $s(t,to,e)})}var Nr=St(function(e,t){return Ai(e)?Ge(e,t):[]}),Lr=St(function(e){return Ht(Fs(e,Ai))}),Fr=St(function(e){var t=xr(e);return Ai(t)&&(t=to),Ht(Fs(e,Ai),Ln(t,2))}),Gr=St(function(e){var t=xr(e);return t="function"==typeof t?t:to,Ht(Fs(e,Ai),to,t)}),jr=St(Or);var Br=St(function(e){var t=e.length,n=1<t?e[t-1]:to;return n="function"==typeof n?(e.pop(),n):to,Rr(e,n)});function Ur(e){var t=pe(e);return t.__chain__=!0,t}function Hr(e,t){return t(e)}var Wr=Pn(function(t){var n=t.length,e=n?t[0]:0,r=this.__wrapped__,i=function(e){return Oe(e,t)};return!(1<n||this.__actions__.length)&&r instanceof be&&Vn(e)?((r=r.slice(e,+e+(n?1:0))).__actions__.push({func:Hr,args:[i],thisArg:to}),new _e(r,this.__chain__).thru(function(e){return n&&!e.length&&e.push(to),e})):this.thru(i)});var qr=on(function(e,t,n){T.call(e,n)?++e[n]:$e(e,n,1)});var zr=hn(vr),Vr=hn(yr);function Yr(e,t){return(yi(e)?Rs:je)(e,Ln(t,3))}function Kr(e,t){return(yi(e)?Ns:Be)(e,Ln(t,3))}var Qr=on(function(e,t,n){T.call(e,n)?e[n].push(t):$e(e,n,[t])});var Xr=St(function(e,t,n){var r=-1,i="function"==typeof t,a=Ci(e)?E(e.length):[];return je(e,function(e){a[++r]=i?$s(t,e,n):it(e,t,n)}),a}),Zr=on(function(e,t,n){$e(e,n,t)});function Jr(e,t){return(yi(e)?Bs:ht)(e,Ln(t,3))}var ei=on(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});var ti=St(function(e,t){if(null==e)return[];var n=t.length;return 1<n&&Yn(e,t[0],t[1])?t=[]:2<n&&Yn(t[0],t[1],t[2])&&(t=[t[0]]),bt(e,qe(t,1),[])}),ni=L||function(){return Ts.Date.now()};function ri(e,t,n){return t=n?to:t,t=e&&null==t?e.length:t,xn(e,128,to,to,to,to,t)}function ii(e,t){var n;if("function"!=typeof t)throw new D(no);return e=Wi(e),function(){return 0<--e&&(n=t.apply(this,arguments)),e<=1&&(t=to),n}}var ai=St(function(e,t,n){var r=1;if(n.length){var i=pc(n,Nn(ai));r|=32}return xn(e,r,t,n,i)}),oi=St(function(e,t,n){var r=3;if(n.length){var i=pc(n,Nn(oi));r|=32}return xn(t,r,e,n,i)});function si(r,i,e){var a,o,s,c,l,u,f=0,d=!1,h=!1,t=!0;if("function"!=typeof r)throw new D(no);function p(e){var t=a,n=o;return a=o=to,f=e,c=r.apply(n,t)}function m(e){var t=e-u;return u===to||i<=t||t<0||h&&s<=e-f}function g(){var e,t,n=ni();if(m(n))return _(n);l=ar(g,(t=i-((e=n)-u),h?V(t,s-(e-f)):t))}function _(e){return l=to,t&&a?p(e):(a=o=to,c)}function n(){var e,t=ni(),n=m(t);if(a=arguments,o=this,u=t,n){if(l===to)return f=e=u,l=ar(g,i),d?p(e):c;if(h)return Qt(l),l=ar(g,i),p(u)}return l===to&&(l=ar(g,i)),c}return i=zi(i)||0,Ii(e)&&(d=!!e.leading,s=(h="maxWait"in e)?z(zi(e.maxWait)||0,i):s,t="trailing"in e?!!e.trailing:t),n.cancel=function(){l!==to&&Qt(l),f=0,a=u=o=l=to},n.flush=function(){return l===to?c:_(ni())},n}var ci=St(function(e,t){return Fe(e,1,t)}),li=St(function(e,t,n){return Fe(e,zi(t)||0,n)});function ui(i,a){if("function"!=typeof i||null!=a&&"function"!=typeof a)throw new D(no);var o=function(){var e=arguments,t=a?a.apply(this,e):e[0],n=o.cache;if(n.has(t))return n.get(t);var r=i.apply(this,e);return o.cache=n.set(t,r)||n,r};return o.cache=new(ui.Cache||we),o}function fi(t){if("function"!=typeof t)throw new D(no);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ui.Cache=we;var di=Yt(function(r,i){var a=(i=1==i.length&&yi(i[0])?Bs(i[0],rc(Ln())):Bs(qe(i,1),rc(Ln()))).length;return St(function(e){for(var t=-1,n=V(e.length,a);++t<n;)e[t]=i[t].call(this,e[t]);return $s(r,this,e)})}),hi=St(function(e,t){var n=pc(t,Nn(hi));return xn(e,32,to,t,n)}),pi=St(function(e,t){var n=pc(t,Nn(pi));return xn(e,64,to,t,n)}),mi=Pn(function(e,t){return xn(e,256,to,to,to,t)});function gi(e,t){return e===t||e!=e&&t!=t}var _i=wn(et),bi=wn(function(e,t){return t<=e}),vi=at(function(){return arguments}())?at:function(e){return Pi(e)&&T.call(e,"callee")&&!I.call(e,"callee")},yi=E.isArray,wi=ks?rc(ks):function(e){return Pi(e)&&Je(e)==xo};function Ci(e){return null!=e&&Di(e.length)&&!ki(e)}function Ai(e){return Pi(e)&&Ci(e)}var Si=U||za,Ti=Es?rc(Es):function(e){return Pi(e)&&Je(e)==ho};function xi(e){if(!Pi(e))return!1;var t=Je(e);return t==po||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Oi(e)}function ki(e){if(!Ii(e))return!1;var t=Je(e);return t==mo||t==go||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ei(e){return"number"==typeof e&&e==Wi(e)}function Di(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=ao}function Ii(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Pi(e){return null!=e&&"object"==typeof e}var Mi=Ds?rc(Ds):function(e){return Pi(e)&&Hn(e)==_o};function $i(e){return"number"==typeof e||Pi(e)&&Je(e)==bo}function Oi(e){if(!Pi(e)||Je(e)!=vo)return!1;var t=x(e);if(null===t)return!0;var n=T.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==p}var Ri=Is?rc(Is):function(e){return Pi(e)&&Je(e)==wo};var Ni=Ps?rc(Ps):function(e){return Pi(e)&&Hn(e)==Co};function Li(e){return"string"==typeof e||!yi(e)&&Pi(e)&&Je(e)==Ao}function Fi(e){return"symbol"==typeof e||Pi(e)&&Je(e)==So}var Gi=Ms?rc(Ms):function(e){return Pi(e)&&Di(e.length)&&!!ws[Je(e)]};var ji=wn(dt),Bi=wn(function(e,t){return e<=t});function Ui(e){if(!e)return[];if(Ci(e))return Li(e)?_c(e):rn(e);if($&&e[$])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[$]());var t=Hn(e);return(t==_o?dc:t==Co?mc:ga)(e)}function Hi(e){return e?(e=zi(e))!==1/0&&e!==-1/0?e==e?e:0:17976931348623157e292*(e<0?-1:1):0===e?e:0}function Wi(e){var t=Hi(e),n=t%1;return t==t?n?t-n:t:0}function qi(e){return e?Re(Wi(e),0,so):0}function zi(e){if("number"==typeof e)return e;if(Fi(e))return oo;if(Ii(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ii(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=nc(e);var n=cs.test(e);return n||us.test(e)?Ss(e.slice(2),n?2:8):ss.test(e)?oo:+e}function Vi(e){return an(e,ca(e))}function Yi(e){return null==e?"":Lt(e)}var Ki=sn(function(e,t){if(Zn(t)||Ci(t))an(t,sa(t),e);else for(var n in t)T.call(t,n)&&De(e,n,t[n])}),Qi=sn(function(e,t){an(t,ca(t),e)}),Xi=sn(function(e,t,n,r){an(t,ca(t),e,r)}),Zi=sn(function(e,t,n,r){an(t,sa(t),e,r)}),Ji=Pn(Oe);var ea=St(function(e,t){e=S(e);var n=-1,r=t.length,i=2<r?t[2]:to;for(i&&Yn(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],o=ca(a),s=-1,c=o.length;++s<c;){var l=o[s],u=e[l];(u===to||gi(u,f[l])&&!T.call(e,l))&&(e[l]=a[l])}return e}),ta=St(function(e){return e.push(to,En),$s(ua,to,e)});function na(e,t,n){var r=null==e?to:Xe(e,t);return r===to?n:r}function ra(e,t){return null!=e&&Wn(e,t,nt)}var ia=gn(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=h.call(t)),e[t]=n},Ia($a)),aa=gn(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=h.call(t)),T.call(e,t)?e[t].push(n):e[t]=[n]},Ln),oa=St(it);function sa(e){return Ci(e)?Se(e):ut(e)}function ca(e){return Ci(e)?Se(e,!0):ft(e)}var la=sn(function(e,t,n){gt(e,t,n)}),ua=sn(function(e,t,n,r){gt(e,t,n,r)}),fa=Pn(function(t,e){var n={};if(null==t)return n;var r=!1;e=Bs(e,function(e){return e=Vt(e,t),r||(r=1<e.length),e}),an(t,$n(t),n),r&&(n=Ne(n,7,Dn));for(var i=e.length;i--;)Gt(n,e[i]);return n});var da=Pn(function(e,t){return null==e?{}:vt(n=e,t,function(e,t){return ra(n,t)});var n});function ha(e,n){if(null==e)return{};var t=Bs($n(e),function(e){return[e]});return n=Ln(n),vt(e,t,function(e,t){return n(e,t[0])})}var pa=Tn(sa),ma=Tn(ca);function ga(e){return null==e?[]:ic(e,sa(e))}var _a=fn(function(e,t,n){return t=t.toLowerCase(),e+(n?ba(t):t)});function ba(e){return xa(Yi(e).toLowerCase())}function va(e){return(e=Yi(e))&&e.replace(ds,cc).replace(gs,"")}var ya=fn(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),wa=fn(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Ca=un("toLowerCase");var Aa=fn(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});var Sa=fn(function(e,t,n){return e+(n?" ":"")+xa(t)});var Ta=fn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),xa=un("toUpperCase");function ka(e,t,n){return e=Yi(e),(t=n?to:t)===to?(r=e,bs.test(r)?e.match(_s)||[]:e.match(ns)||[]):e.match(t)||[];var r}var Ea=St(function(e,t){try{return $s(e,to,t)}catch(e){return xi(e)?e:new g(e)}}),Da=Pn(function(t,e){return Rs(e,function(e){e=hr(e),$e(t,e,ai(t[e],t))}),t});function Ia(e){return function(){return e}}var Pa=pn(),Ma=pn(!0);function $a(e){return e}function Oa(e){return lt("function"==typeof e?e:Ne(e,1))}var Ra=St(function(t,n){return function(e){return it(e,t,n)}}),Na=St(function(t,n){return function(e){return it(t,e,n)}});function La(r,t,e){var n=sa(t),i=Qe(t,n);null!=e||Ii(t)&&(i.length||!n.length)||(e=t,t=r,r=this,i=Qe(t,sa(t)));var a=!(Ii(e)&&"chain"in e&&!e.chain),o=ki(r);return Rs(i,function(e){var n=t[e];r[e]=n,o&&(r.prototype[e]=function(){var e=this.__chain__;if(a||e){var t=r(this.__wrapped__);return(t.__actions__=rn(this.__actions__)).push({func:n,args:arguments,thisArg:r}),t.__chain__=e,t}return n.apply(r,Us([this.value()],arguments))})}),r}function Fa(){}var Ga=bn(Bs),ja=bn(Ls),Ba=bn(qs);function Ua(e){return Kn(e)?Zs(hr(e)):(t=e,function(e){return Xe(e,t)});var t}var Ha=yn(),Wa=yn(!0);function qa(){return[]}function za(){return!1}var Va=_n(function(e,t){return e+t},0),Ya=An("ceil"),Ka=_n(function(e,t){return e/t},1),Qa=An("floor");var Xa,Za=_n(function(e,t){return e*t},1),Ja=An("round"),eo=_n(function(e,t){return e-t},0);return pe.after=function(e,t){if("function"!=typeof t)throw new D(no);return e=Wi(e),function(){if(--e<1)return t.apply(this,arguments)}},pe.ary=ri,pe.assign=Ki,pe.assignIn=Qi,pe.assignInWith=Xi,pe.assignWith=Zi,pe.at=Ji,pe.before=ii,pe.bind=ai,pe.bindAll=Da,pe.bindKey=oi,pe.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return yi(e)?e:[e]},pe.chain=Ur,pe.chunk=function(e,t,n){t=(n?Yn(e,t,n):t===to)?1:z(Wi(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var i=0,a=0,o=E(G(r/t));i<r;)o[a++]=Pt(e,i,i+=t);return o},pe.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i},pe.concat=function(){var e=arguments.length;if(!e)return[];for(var t=E(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Us(yi(n)?rn(n):[n],qe(t,1))},pe.cond=function(r){var i=null==r?0:r.length,t=Ln();return r=i?Bs(r,function(e){if("function"!=typeof e[1])throw new D(no);return[t(e[0]),e[1]]}):[],St(function(e){for(var t=-1;++t<i;){var n=r[t];if($s(n[0],this,e))return $s(n[1],this,e)}})},pe.conforms=function(e){return t=Ne(e,1),n=sa(t),function(e){return Le(e,t,n)};var t,n},pe.constant=Ia,pe.countBy=qr,pe.create=function(e,t){var n=me(e);return null==t?n:Me(n,t)},pe.curry=function e(t,n,r){var i=xn(t,8,to,to,to,to,to,n=r?to:n);return i.placeholder=e.placeholder,i},pe.curryRight=function e(t,n,r){var i=xn(t,16,to,to,to,to,to,n=r?to:n);return i.placeholder=e.placeholder,i},pe.debounce=si,pe.defaults=ea,pe.defaultsDeep=ta,pe.defer=ci,pe.delay=li,pe.difference=gr,pe.differenceBy=_r,pe.differenceWith=br,pe.drop=function(e,t,n){var r=null==e?0:e.length;return r?Pt(e,(t=n||t===to?1:Wi(t))<0?0:t,r):[]},pe.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Pt(e,0,(t=r-(t=n||t===to?1:Wi(t)))<0?0:t):[]},pe.dropRightWhile=function(e,t){return e&&e.length?Bt(e,Ln(t,3),!0,!0):[]},pe.dropWhile=function(e,t){return e&&e.length?Bt(e,Ln(t,3),!0):[]},pe.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&Yn(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=Wi(n))<0&&(n=i<-n?0:i+n),(r=r===to||i<r?i:Wi(r))<0&&(r+=i),r=r<n?0:qi(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},pe.filter=function(e,t){return(yi(e)?Fs:We)(e,Ln(t,3))},pe.flatMap=function(e,t){return qe(Jr(e,t),1)},pe.flatMapDeep=function(e,t){return qe(Jr(e,t),1/0)},pe.flatMapDepth=function(e,t,n){return n=n===to?1:Wi(n),qe(Jr(e,t),n)},pe.flatten=wr,pe.flattenDeep=function(e){return null!=e&&e.length?qe(e,1/0):[]},pe.flattenDepth=function(e,t){return null!=e&&e.length?qe(e,t=t===to?1:Wi(t)):[]},pe.flip=function(e){return xn(e,512)},pe.flow=Pa,pe.flowRight=Ma,pe.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},pe.functions=function(e){return null==e?[]:Qe(e,sa(e))},pe.functionsIn=function(e){return null==e?[]:Qe(e,ca(e))},pe.groupBy=Qr,pe.initial=function(e){return null!=e&&e.length?Pt(e,0,-1):[]},pe.intersection=Ar,pe.intersectionBy=Sr,pe.intersectionWith=Tr,pe.invert=ia,pe.invertBy=aa,pe.invokeMap=Xr,pe.iteratee=Oa,pe.keyBy=Zr,pe.keys=sa,pe.keysIn=ca,pe.map=Jr,pe.mapKeys=function(e,r){var i={};return r=Ln(r,3),Ye(e,function(e,t,n){$e(i,r(e,t,n),e)}),i},pe.mapValues=function(e,r){var i={};return r=Ln(r,3),Ye(e,function(e,t,n){$e(i,t,r(e,t,n))}),i},pe.matches=function(e){return pt(Ne(e,1))},pe.matchesProperty=function(e,t){return mt(e,Ne(t,1))},pe.memoize=ui,pe.merge=la,pe.mergeWith=ua,pe.method=Ra,pe.methodOf=Na,pe.mixin=La,pe.negate=fi,pe.nthArg=function(t){return t=Wi(t),St(function(e){return _t(e,t)})},pe.omit=fa,pe.omitBy=function(e,t){return ha(e,fi(Ln(t)))},pe.once=function(e){return ii(2,e)},pe.orderBy=function(e,t,n,r){return null==e?[]:(yi(t)||(t=null==t?[]:[t]),yi(n=r?to:n)||(n=null==n?[]:[n]),bt(e,t,n))},pe.over=Ga,pe.overArgs=di,pe.overEvery=ja,pe.overSome=Ba,pe.partial=hi,pe.partialRight=pi,pe.partition=ei,pe.pick=da,pe.pickBy=ha,pe.property=Ua,pe.propertyOf=function(t){return function(e){return null==t?to:Xe(t,e)}},pe.pull=kr,pe.pullAll=Er,pe.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?yt(e,t,Ln(n,2)):e},pe.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?yt(e,t,to,n):e},pe.pullAt=Dr,pe.range=Ha,pe.rangeRight=Wa,pe.rearg=mi,pe.reject=function(e,t){return(yi(e)?Fs:We)(e,fi(Ln(t,3)))},pe.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],a=e.length;for(t=Ln(t,3);++r<a;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return wt(e,i),n},pe.rest=function(e,t){if("function"!=typeof e)throw new D(no);return St(e,t=t===to?t:Wi(t))},pe.reverse=Ir,pe.sampleSize=function(e,t,n){return t=(n?Yn(e,t,n):t===to)?1:Wi(t),(yi(e)?xe:xt)(e,t)},pe.set=function(e,t,n){return null==e?e:kt(e,t,n)},pe.setWith=function(e,t,n,r){return r="function"==typeof r?r:to,null==e?e:kt(e,t,n,r)},pe.shuffle=function(e){return(yi(e)?ke:It)(e)},pe.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n=n&&"number"!=typeof n&&Yn(e,t,n)?(t=0,r):(t=null==t?0:Wi(t),n===to?r:Wi(n)),Pt(e,t,n)):[]},pe.sortBy=ti,pe.sortedUniq=function(e){return e&&e.length?Rt(e):[]},pe.sortedUniqBy=function(e,t){return e&&e.length?Rt(e,Ln(t,2)):[]},pe.split=function(e,t,n){return n&&"number"!=typeof n&&Yn(e,t,n)&&(t=n=to),(n=n===to?so:n>>>0)?(e=Yi(e))&&("string"==typeof t||null!=t&&!Ri(t))&&!(t=Lt(t))&&fc(e)?Kt(_c(e),0,n):e.split(t,n):[]},pe.spread=function(r,i){if("function"!=typeof r)throw new D(no);return i=null==i?0:z(Wi(i),0),St(function(e){var t=e[i],n=Kt(e,0,i);return t&&Us(n,t),$s(r,this,n)})},pe.tail=function(e){var t=null==e?0:e.length;return t?Pt(e,1,t):[]},pe.take=function(e,t,n){return e&&e.length?Pt(e,0,(t=n||t===to?1:Wi(t))<0?0:t):[]},pe.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Pt(e,(t=r-(t=n||t===to?1:Wi(t)))<0?0:t,r):[]},pe.takeRightWhile=function(e,t){return e&&e.length?Bt(e,Ln(t,3),!1,!0):[]},pe.takeWhile=function(e,t){return e&&e.length?Bt(e,Ln(t,3)):[]},pe.tap=function(e,t){return t(e),e},pe.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new D(no);return Ii(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),si(e,t,{leading:r,maxWait:t,trailing:i})},pe.thru=Hr,pe.toArray=Ui,pe.toPairs=pa,pe.toPairsIn=ma,pe.toPath=function(e){return yi(e)?Bs(e,hr):Fi(e)?[e]:rn(dr(Yi(e)))},pe.toPlainObject=Vi,pe.transform=function(e,r,i){var t=yi(e),n=t||Si(e)||Gi(e);if(r=Ln(r,4),null==i){var a=e&&e.constructor;i=n?t?new a:[]:Ii(e)&&ki(a)?me(x(e)):{}}return(n?Rs:Ye)(e,function(e,t,n){return r(i,e,t,n)}),i},pe.unary=function(e){return ri(e,1)},pe.union=Pr,pe.unionBy=Mr,pe.unionWith=$r,pe.uniq=function(e){return e&&e.length?Ft(e):[]},pe.uniqBy=function(e,t){return e&&e.length?Ft(e,Ln(t,2)):[]},pe.uniqWith=function(e,t){return t="function"==typeof t?t:to,e&&e.length?Ft(e,to,t):[]},pe.unset=function(e,t){return null==e||Gt(e,t)},pe.unzip=Or,pe.unzipWith=Rr,pe.update=function(e,t,n){return null==e?e:jt(e,t,zt(n))},pe.updateWith=function(e,t,n,r){return r="function"==typeof r?r:to,null==e?e:jt(e,t,zt(n),r)},pe.values=ga,pe.valuesIn=function(e){return null==e?[]:ic(e,ca(e))},pe.without=Nr,pe.words=ka,pe.wrap=function(e,t){return hi(zt(t),e)},pe.xor=Lr,pe.xorBy=Fr,pe.xorWith=Gr,pe.zip=jr,pe.zipObject=function(e,t){return Wt(e||[],t||[],De)},pe.zipObjectDeep=function(e,t){return Wt(e||[],t||[],kt)},pe.zipWith=Br,pe.entries=pa,pe.entriesIn=ma,pe.extend=Qi,pe.extendWith=Xi,La(pe,pe),pe.add=Va,pe.attempt=Ea,pe.camelCase=_a,pe.capitalize=ba,pe.ceil=Ya,pe.clamp=function(e,t,n){return n===to&&(n=t,t=to),n!==to&&(n=(n=zi(n))==n?n:0),t!==to&&(t=(t=zi(t))==t?t:0),Re(zi(e),t,n)},pe.clone=function(e){return Ne(e,4)},pe.cloneDeep=function(e){return Ne(e,5)},pe.cloneDeepWith=function(e,t){return Ne(e,5,t="function"==typeof t?t:to)},pe.cloneWith=function(e,t){return Ne(e,4,t="function"==typeof t?t:to)},pe.conformsTo=function(e,t){return null==t||Le(e,t,sa(t))},pe.deburr=va,pe.defaultTo=function(e,t){return null==e||e!=e?t:e},pe.divide=Ka,pe.endsWith=function(e,t,n){e=Yi(e),t=Lt(t);var r=e.length,i=n=n===to?r:Re(Wi(n),0,r);return 0<=(n-=t.length)&&e.slice(n,i)==t},pe.eq=gi,pe.escape=function(e){return(e=Yi(e))&&Ho.test(e)?e.replace(Bo,lc):e},pe.escapeRegExp=function(e){return(e=Yi(e))&&Xo.test(e)?e.replace(Qo,"\\$&"):e},pe.every=function(e,t,n){var r=yi(e)?Ls:Ue;return n&&Yn(e,t,n)&&(t=to),r(e,Ln(t,3))},pe.find=zr,pe.findIndex=vr,pe.findKey=function(e,t){return zs(e,Ln(t,3),Ye)},pe.findLast=Vr,pe.findLastIndex=yr,pe.findLastKey=function(e,t){return zs(e,Ln(t,3),Ke)},pe.floor=Qa,pe.forEach=Yr,pe.forEachRight=Kr,pe.forIn=function(e,t){return null==e?e:ze(e,Ln(t,3),ca)},pe.forInRight=function(e,t){return null==e?e:Ve(e,Ln(t,3),ca)},pe.forOwn=function(e,t){return e&&Ye(e,Ln(t,3))},pe.forOwnRight=function(e,t){return e&&Ke(e,Ln(t,3))},pe.get=na,pe.gt=_i,pe.gte=bi,pe.has=function(e,t){return null!=e&&Wn(e,t,tt)},pe.hasIn=ra,pe.head=Cr,pe.identity=$a,pe.includes=function(e,t,n,r){e=Ci(e)?e:ga(e),n=n&&!r?Wi(n):0;var i=e.length;return n<0&&(n=z(i+n,0)),Li(e)?n<=i&&-1<e.indexOf(t,n):!!i&&-1<Ys(e,t,n)},pe.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Wi(n);return i<0&&(i=z(r+i,0)),Ys(e,t,i)},pe.inRange=function(e,t,n){return t=Hi(t),n===to?(n=t,t=0):n=Hi(n),e=zi(e),(r=e)>=V(i=t,a=n)&&r<z(i,a);var r,i,a},pe.invoke=oa,pe.isArguments=vi,pe.isArray=yi,pe.isArrayBuffer=wi,pe.isArrayLike=Ci,pe.isArrayLikeObject=Ai,pe.isBoolean=function(e){return!0===e||!1===e||Pi(e)&&Je(e)==fo},pe.isBuffer=Si,pe.isDate=Ti,pe.isElement=function(e){return Pi(e)&&1===e.nodeType&&!Oi(e)},pe.isEmpty=function(e){if(null==e)return!0;if(Ci(e)&&(yi(e)||"string"==typeof e||"function"==typeof e.splice||Si(e)||Gi(e)||vi(e)))return!e.length;var t=Hn(e);if(t==_o||t==Co)return!e.size;if(Zn(e))return!ut(e).length;for(var n in e)if(T.call(e,n))return!1;return!0},pe.isEqual=function(e,t){return ot(e,t)},pe.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:to)?n(e,t):to;return r===to?ot(e,t,to,n):!!r},pe.isError=xi,pe.isFinite=function(e){return"number"==typeof e&&H(e)},pe.isFunction=ki,pe.isInteger=Ei,pe.isLength=Di,pe.isMap=Mi,pe.isMatch=function(e,t){return e===t||st(e,t,Gn(t))},pe.isMatchWith=function(e,t,n){return n="function"==typeof n?n:to,st(e,t,Gn(t),n)},pe.isNaN=function(e){return $i(e)&&e!=+e},pe.isNative=function(e){if(Xn(e))throw new g("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return ct(e)},pe.isNil=function(e){return null==e},pe.isNull=function(e){return null===e},pe.isNumber=$i,pe.isObject=Ii,pe.isObjectLike=Pi,pe.isPlainObject=Oi,pe.isRegExp=Ri,pe.isSafeInteger=function(e){return Ei(e)&&-ao<=e&&e<=ao},pe.isSet=Ni,pe.isString=Li,pe.isSymbol=Fi,pe.isTypedArray=Gi,pe.isUndefined=function(e){return e===to},pe.isWeakMap=function(e){return Pi(e)&&Hn(e)==To},pe.isWeakSet=function(e){return Pi(e)&&"[object WeakSet]"==Je(e)},pe.join=function(e,t){return null==e?"":W.call(e,t)},pe.kebabCase=ya,pe.last=xr,pe.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==to&&(i=(i=Wi(n))<0?z(r+i,0):V(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Vs(e,Qs,i,!0)},pe.lowerCase=wa,pe.lowerFirst=Ca,pe.lt=ji,pe.lte=Bi,pe.max=function(e){return e&&e.length?He(e,$a,et):to},pe.maxBy=function(e,t){return e&&e.length?He(e,Ln(t,2),et):to},pe.mean=function(e){return Xs(e,$a)},pe.meanBy=function(e,t){return Xs(e,Ln(t,2))},pe.min=function(e){return e&&e.length?He(e,$a,dt):to},pe.minBy=function(e,t){return e&&e.length?He(e,Ln(t,2),dt):to},pe.stubArray=qa,pe.stubFalse=za,pe.stubObject=function(){return{}},pe.stubString=function(){return""},pe.stubTrue=function(){return!0},pe.multiply=Za,pe.nth=function(e,t){return e&&e.length?_t(e,Wi(t)):to},pe.noConflict=function(){return Ts._===this&&(Ts._=m),this},pe.noop=Fa,pe.now=ni,pe.pad=function(e,t,n){e=Yi(e);var r=(t=Wi(t))?gc(e):0;if(!t||t<=r)return e;var i=(t-r)/2;return vn(j(i),n)+e+vn(G(i),n)},pe.padEnd=function(e,t,n){e=Yi(e);var r=(t=Wi(t))?gc(e):0;return t&&r<t?e+vn(t-r,n):e},pe.padStart=function(e,t,n){e=Yi(e);var r=(t=Wi(t))?gc(e):0;return t&&r<t?vn(t-r,n)+e:e},pe.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),K(Yi(e).replace(Zo,""),t||0)},pe.random=function(e,t,n){if(n&&"boolean"!=typeof n&&Yn(e,t,n)&&(t=n=to),n===to&&("boolean"==typeof t?(n=t,t=to):"boolean"==typeof e&&(n=e,e=to)),e===to&&t===to?(e=0,t=1):(e=Hi(e),t===to?(t=e,e=0):t=Hi(t)),t<e){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Q();return V(e+i*(t-e+As("1e-"+((i+"").length-1))),t)}return Ct(e,t)},pe.reduce=function(e,t,n){var r=yi(e)?Hs:Js,i=arguments.length<3;return r(e,Ln(t,4),n,i,je)},pe.reduceRight=function(e,t,n){var r=yi(e)?Ws:Js,i=arguments.length<3;return r(e,Ln(t,4),n,i,Be)},pe.repeat=function(e,t,n){return t=(n?Yn(e,t,n):t===to)?1:Wi(t),At(Yi(e),t)},pe.replace=function(){var e=arguments,t=Yi(e[0]);return e.length<3?t:t.replace(e[1],e[2])},pe.result=function(e,t,n){var r=-1,i=(t=Vt(t,e)).length;for(i||(i=1,e=to);++r<i;){var a=null==e?to:e[hr(t[r])];a===to&&(r=i,a=n),e=ki(a)?a.call(e):a}return e},pe.round=Ja,pe.runInContext=e,pe.sample=function(e){return(yi(e)?Te:Tt)(e)},pe.size=function(e){if(null==e)return 0;if(Ci(e))return Li(e)?gc(e):e.length;var t=Hn(e);return t==_o||t==Co?e.size:ut(e).length},pe.snakeCase=Aa,pe.some=function(e,t,n){var r=yi(e)?qs:Mt;return n&&Yn(e,t,n)&&(t=to),r(e,Ln(t,3))},pe.sortedIndex=function(e,t){return $t(e,t)},pe.sortedIndexBy=function(e,t,n){return Ot(e,t,Ln(n,2))},pe.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=$t(e,t);if(r<n&&gi(e[r],t))return r}return-1},pe.sortedLastIndex=function(e,t){return $t(e,t,!0)},pe.sortedLastIndexBy=function(e,t,n){return Ot(e,t,Ln(n,2),!0)},pe.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=$t(e,t,!0)-1;if(gi(e[n],t))return n}return-1},pe.startCase=Sa,pe.startsWith=function(e,t,n){return e=Yi(e),n=null==n?0:Re(Wi(n),0,e.length),t=Lt(t),e.slice(n,n+t.length)==t},pe.subtract=eo,pe.sum=function(e){return e&&e.length?ec(e,$a):0},pe.sumBy=function(e,t){return e&&e.length?ec(e,Ln(t,2)):0},pe.template=function(o,e,t){var n=pe.templateSettings;t&&Yn(o,e,t)&&(e=to),o=Yi(o),e=Xi({},e,n,kn);var s,c,r=Xi({},e.imports,n.imports,kn),i=sa(r),a=ic(r,i),l=0,u=e.interpolate||hs,f="__p += '",d=b((e.escape||hs).source+"|"+u.source+"|"+(u===zo?as:hs).source+"|"+(e.evaluate||hs).source+"|$","g"),h="//# sourceURL="+(T.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ys+"]")+"\n";o.replace(d,function(e,t,n,r,i,a){return n||(n=r),f+=o.slice(l,a).replace(ps,uc),t&&(s=!0,f+="' +\n__e("+t+") +\n'"),i&&(c=!0,f+="';\n"+i+";\n__p += '"),n&&(f+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=a+e.length,e}),f+="';\n";var p=T.call(e,"variable")&&e.variable;if(p){if(rs.test(p))throw new g("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(c?f.replace(Lo,""):f).replace(Fo,"$1").replace(Go,"$1;"),f="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Ea(function(){return _(i,h+"return "+f).apply(to,a)});if(m.source=f,xi(m))throw m;return m},pe.times=function(e,t){if((e=Wi(e))<1||ao<e)return[];var n=so,r=V(e,so);t=Ln(t),e-=so;for(var i=tc(r,t);++n<e;)t(n);return i},pe.toFinite=Hi,pe.toInteger=Wi,pe.toLength=qi,pe.toLower=function(e){return Yi(e).toLowerCase()},pe.toNumber=zi,pe.toSafeInteger=function(e){return e?Re(Wi(e),-ao,ao):0===e?e:0},pe.toString=Yi,pe.toUpper=function(e){return Yi(e).toUpperCase()},pe.trim=function(e,t,n){if((e=Yi(e))&&(n||t===to))return nc(e);if(!e||!(t=Lt(t)))return e;var r=_c(e),i=_c(t);return Kt(r,oc(r,i),sc(r,i)+1).join("")},pe.trimEnd=function(e,t,n){if((e=Yi(e))&&(n||t===to))return e.slice(0,bc(e)+1);if(!e||!(t=Lt(t)))return e;var r=_c(e);return Kt(r,0,sc(r,_c(t))+1).join("")},pe.trimStart=function(e,t,n){if((e=Yi(e))&&(n||t===to))return e.replace(Zo,"");if(!e||!(t=Lt(t)))return e;var r=_c(e);return Kt(r,oc(r,_c(t))).join("")},pe.truncate=function(e,t){var n=30,r="...";if(Ii(t)){var i="separator"in t?t.separator:i;n="length"in t?Wi(t.length):n,r="omission"in t?Lt(t.omission):r}var a=(e=Yi(e)).length;if(fc(e)){var o=_c(e);a=o.length}if(a<=n)return e;var s=n-gc(r);if(s<1)return r;var c=o?Kt(o,0,s).join(""):e.slice(0,s);if(i===to)return c+r;if(o&&(s+=c.length-s),Ri(i)){if(e.slice(s).search(i)){var l,u=c;for(i.global||(i=b(i.source,Yi(os.exec(i))+"g")),i.lastIndex=0;l=i.exec(u);)var f=l.index;c=c.slice(0,f===to?s:f)}}else if(e.indexOf(Lt(i),s)!=s){var d=c.lastIndexOf(i);-1<d&&(c=c.slice(0,d))}return c+r},pe.unescape=function(e){return(e=Yi(e))&&Uo.test(e)?e.replace(jo,vc):e},pe.uniqueId=function(e){var t=++l;return Yi(e)+t},pe.upperCase=Ta,pe.upperFirst=xa,pe.each=Yr,pe.eachRight=Kr,pe.first=Cr,La(pe,(Xa={},Ye(pe,function(e,t){T.call(pe.prototype,t)||(Xa[t]=e)}),Xa),{chain:!1}),pe.VERSION="4.17.21",Rs(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){pe[e].placeholder=pe}),Rs(["drop","take"],function(n,r){be.prototype[n]=function(e){e=e===to?1:z(Wi(e),0);var t=this.__filtered__&&!r?new be(this):this.clone();return t.__filtered__?t.__takeCount__=V(e,t.__takeCount__):t.__views__.push({size:V(e,so),type:n+(t.__dir__<0?"Right":"")}),t},be.prototype[n+"Right"]=function(e){return this.reverse()[n](e).reverse()}}),Rs(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;be.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ln(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Rs(["head","last"],function(e,t){var n="take"+(t?"Right":"");be.prototype[e]=function(){return this[n](1).value()[0]}}),Rs(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");be.prototype[e]=function(){return this.__filtered__?new be(this):this[n](1)}}),be.prototype.compact=function(){return this.filter($a)},be.prototype.find=function(e){return this.filter(e).head()},be.prototype.findLast=function(e){return this.reverse().find(e)},be.prototype.invokeMap=St(function(t,n){return"function"==typeof t?new be(this):this.map(function(e){return it(e,t,n)})}),be.prototype.reject=function(e){return this.filter(fi(Ln(e)))},be.prototype.slice=function(e,t){e=Wi(e);var n=this;return n.__filtered__&&(0<e||t<0)?new be(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==to&&(n=(t=Wi(t))<0?n.dropRight(-t):n.take(t-e)),n)},be.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},be.prototype.toArray=function(){return this.take(so)},Ye(be.prototype,function(f,e){var d=/^(?:filter|find|map|reject)|While$/.test(e),h=/^(?:head|last)$/.test(e),p=pe[h?"take"+("last"==e?"Right":""):e],m=h||/^find/.test(e);p&&(pe.prototype[e]=function(){var e=this.__wrapped__,n=h?[1]:arguments,t=e instanceof be,r=n[0],i=t||yi(e),a=function(e){var t=p.apply(pe,Us([e],n));return h&&o?t[0]:t};i&&d&&"function"==typeof r&&1!=r.length&&(t=i=!1);var o=this.__chain__,s=!!this.__actions__.length,c=m&&!o,l=t&&!s;if(m||!i)return c&&l?f.apply(this,n):(u=this.thru(a),c?h?u.value()[0]:u.value():u);e=l?e:new be(this);var u=f.apply(e,n);return u.__actions__.push({func:Hr,args:[a],thisArg:to}),new _e(u,o)})}),Rs(["pop","push","shift","sort","splice","unshift"],function(e){var n=a[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);pe.prototype[e]=function(){var t=arguments;if(!i||this.__chain__)return this[r](function(e){return n.apply(yi(e)?e:[],t)});var e=this.value();return n.apply(yi(e)?e:[],t)}}),Ye(be.prototype,function(e,t){var n=pe[t];if(n){var r=n.name+"";T.call(ae,r)||(ae[r]=[]),ae[r].push({name:t,func:n})}}),ae[mn(to,2).name]=[{name:"wrapper",func:to}],be.prototype.clone=function(){var e=new be(this.__wrapped__);return e.__actions__=rn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=rn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=rn(this.__views__),e},be.prototype.reverse=function(){if(this.__filtered__){var e=new be(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},be.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=yi(e),r=t<0,i=n?e.length:0,a=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var a=n[r],o=a.size;switch(a.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=V(t,e+o);break;case"takeRight":e=z(e,t-o)}}return{start:e,end:t}}(0,i,this.__views__),o=a.start,s=a.end,c=s-o,l=r?s:o-1,u=this.__iteratees__,f=u.length,d=0,h=V(c,this.__takeCount__);if(!n||!r&&i==c&&h==c)return Ut(e,this.__actions__);var p=[];e:for(;c--&&d<h;){for(var m=-1,g=e[l+=t];++m<f;){var _=u[m],b=_.iteratee,v=_.type,y=b(g);if(2==v)g=y;else if(!y){if(1==v)continue e;break e}}p[d++]=g}return p},pe.prototype.at=Wr,pe.prototype.chain=function(){return Ur(this)},pe.prototype.commit=function(){return new _e(this.value(),this.__chain__)},pe.prototype.next=function(){this.__values__===to&&(this.__values__=Ui(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?to:this.__values__[this.__index__++]}},pe.prototype.plant=function(e){for(var t,n=this;n instanceof ge;){var r=mr(n);r.__index__=0,r.__values__=to,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},pe.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof be){var t=e;return this.__actions__.length&&(t=new be(this)),(t=t.reverse()).__actions__.push({func:Hr,args:[Ir],thisArg:to}),new _e(t,this.__chain__)}return this.thru(Ir)},pe.prototype.toJSON=pe.prototype.valueOf=pe.prototype.value=function(){return Ut(this.__wrapped__,this.__actions__)},pe.prototype.first=pe.prototype.head,$&&(pe.prototype[$]=function(){return this}),pe}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Ts._=yc,define(function(){return yc})):R?((R.exports=yc)._=yc,O._=yc):Ts._=yc}.call(this),function(){var t,n,r=document.attachEvent,i=!1;if(!r){var e=(n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return window.setTimeout(e,20)},function(e){return n(e)}),a=(t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(e){return t(e)});function o(e){var t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight}function s(t){var n=this;o(this),this.__resizeRAF__&&a(this.__resizeRAF__),this.__resizeRAF__=e(function(){var e;((e=n).offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height)&&(n.__resizeLast__.width=n.offsetWidth,n.__resizeLast__.height=n.offsetHeight,n.__resizeListeners__.forEach(function(e){e.call(n,t)}))})}var c=!1,l="",u="animationstart",f="Webkit Moz O ms".split(" "),d="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),h="",p=document.createElement("fakeelement");if(void 0!==p.style.animationName&&(c=!0),!1===c)for(var m=0;m<f.length;m++)if(void 0!==p.style[f[m]+"AnimationName"]){(h=f[m])+"Animation",l="-"+h.toLowerCase()+"-",u=d[m],c=!0;break}var g="resizeanim",_="@"+l+"keyframes "+g+" { from { opacity: 0; } to { opacity: 0; } } ",b=l+"animation: 1ms "+g+"; "}window.addResizeListener=function(t,e){r?t.attachEvent("onresize",e):(t.__resizeTriggers__||("static"==getComputedStyle(t).position&&(t.style.position="relative"),function(){if(!i){var e=(_||"")+".resize-triggers { "+(b||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n),i=!0}}(),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=document.createElement("div")).className="resize-triggers",t.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',t.appendChild(t.__resizeTriggers__),o(t),t.addEventListener("scroll",s,!0),u&&t.__resizeTriggers__.addEventListener(u,function(e){e.animationName==g&&o(t)})),t.__resizeListeners__.push(e))},window.removeResizeListener=function(e,t){r?e.detachEvent("onresize",t):(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.removeEventListener("scroll",s),e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)))}}(),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["angular"],t):"object"==typeof exports?module.exports=t(require("angular")):t(e.angular)}(this,function(M){"use strict";return M.module("gridster",[]).constant("gridsterConfig",{columns:6,pushing:!0,floating:!0,swapping:!1,width:"auto",colWidth:"auto",rowHeight:"match",margins:[10,10],outerMargin:!0,sparse:!1,isMobile:!1,mobileBreakPoint:600,mobileModeEnabled:!0,minColumns:1,minRows:1,maxRows:100,defaultSizeX:2,defaultSizeY:1,minSizeX:1,maxSizeX:null,minSizeY:1,maxSizeY:null,saveGridItemCalculatedHeightInMobile:!1,resizable:{enabled:!0,handles:["s","e","n","w","se","ne","sw","nw"]},draggable:{enabled:!0,scrollSensitivity:20,scrollSpeed:15}}).controller("GridsterCtrl",["gridsterConfig","$timeout",function(e,t){var n=this;M.extend(this,e),this.resizable=M.extend({},e.resizable||{}),this.draggable=M.extend({},e.draggable||{});var r=!1;this.layoutChanged=function(){r||(r=!0,t(function(){r=!1,n.loaded&&n.floatItemsUp(),n.updateHeight(n.movingItem?n.movingItem.sizeY:0)},30))},this.grid=[],this.allItems=[],this.destroy=function(){this.grid&&(this.grid=[]),this.$element=null,this.allItems&&(this.allItems.length=0,this.allItems=null)},this.setOptions=function(e){if(e)if((e=M.extend({},e)).draggable&&(M.extend(this.draggable,e.draggable),delete e.draggable),e.resizable&&(M.extend(this.resizable,e.resizable),delete e.resizable),M.extend(this,e),this.margins&&2===this.margins.length)for(var t=0,n=this.margins.length;t<n;++t)this.margins[t]=parseInt(this.margins[t],10),isNaN(this.margins[t])&&(this.margins[t]=0);else this.margins=[0,0]},this.canItemOccupy=function(e,t,n){return-1<t&&-1<n&&e.sizeX+n<=this.columns&&e.sizeY+t<=this.maxRows},this.autoSetItemPosition=function(e){for(var t=0;t<this.maxRows;++t)for(var n=0;n<this.columns;++n){if(0===this.getItems(t,n,e.sizeX,e.sizeY,e).length&&this.canItemOccupy(e,t,n))return void this.putItem(e,t,n)}throw new Error("Unable to place item!")},this.getItems=function(e,t,n,r,i){var a,o=[];if(n&&r||(n=r=1),!i||i instanceof Array||(i=[i]),!1===this.sparse)for(var s=0;s<r;++s)for(var c=0;c<n;++c)!(a=this.getItem(e+s,t+c,i))||i&&-1!==i.indexOf(a)||-1!==o.indexOf(a)||o.push(a);else for(var l=e+r-1,u=t+n-1,f=0;f<this.allItems.length;++f)!(a=this.allItems[f])||i&&-1!==i.indexOf(a)||-1!==o.indexOf(a)||!this.intersect(a,t,u,e,l)||o.push(a);return o},this.getBoundingBox=function(e){if(0===e.length)return null;if(1===e.length)return{row:e[0].row,col:e[0].col,sizeY:e[0].sizeY,sizeX:e[0].sizeX};for(var t=0,n=0,r=9999,i=9999,a=0,o=e.length;a<o;++a){var s=e[a];r=Math.min(s.row,r),i=Math.min(s.col,i),t=Math.max(s.row+s.sizeY,t),n=Math.max(s.col+s.sizeX,n)}return{row:r,col:i,sizeY:t-r,sizeX:n-i}},this.intersect=function(e,t,n,r,i){return t<=e.col+e.sizeX-1&&n>=e.col&&r<=e.row+e.sizeY-1&&i>=e.row},this.removeItem=function(e){for(var t,n=0,r=this.grid.length;n<r;++n){var i=this.grid[n];if(i&&-1!==(t=i.indexOf(e))){i[t]=null;break}}this.sparse&&-1!==(t=this.allItems.indexOf(e))&&this.allItems.splice(t,1),this.layoutChanged()},this.getItem=function(e,t,n){!n||n instanceof Array||(n=[n]);for(var r=1;-1<e;){for(var i=1,a=t;-1<a;){var o=this.grid[e];if(o){var s=o[a];if(s&&(!n||-1===n.indexOf(s))&&s.sizeX>=i&&s.sizeY>=r)return s}++i,--a}--e,++r}return null},this.putItems=function(e){for(var t=0,n=e.length;t<n;++t)this.putItem(e[t])},this.putItem=function(e,t,n,r){if(null!=t||(t=e.row,n=e.col,null!=t)){if(this.canItemOccupy(e,t,n)||(n=Math.min(this.columns-e.sizeX,Math.max(0,n)),t=Math.min(this.maxRows-e.sizeY,Math.max(0,t))),null!==e.oldRow&&void 0!==e.oldRow){var i=e.oldRow===t&&e.oldColumn===n,a=this.grid[t]&&this.grid[t][n]===e;if(i&&a)return e.row=t,void(e.col=n);var o=this.grid[e.oldRow];o&&o[e.oldColumn]===e&&delete o[e.oldColumn]}e.oldRow=e.row=t,e.oldColumn=e.col=n,this.moveOverlappingItems(e,r),this.grid[t]||(this.grid[t]=[]),this.grid[t][n]=e,this.sparse&&-1===this.allItems.indexOf(e)&&this.allItems.push(e),this.movingItem===e&&this.floatItemUp(e),this.layoutChanged()}else this.autoSetItemPosition(e)},this.swapItems=function(e,t){this.grid[e.row][e.col]=t;var n=(this.grid[t.row][t.col]=e).row,r=e.col;e.row=t.row,e.col=t.col,t.row=n,t.col=r},this.moveOverlappingItems=function(e,t){t?-1===t.indexOf(e)&&(t=t.slice(0)).push(e):t=[e];var n=this.getItems(e.row,e.col,e.sizeX,e.sizeY,t);this.moveItemsDown(n,e.row+e.sizeY,t)},this.moveItemsDown=function(e,t,n){if(e&&0!==e.length){e.sort(function(e,t){return e.row-t.row}),n=n?n.slice(0):[];var r,i,a,o={};for(i=0,a=e.length;i<a;++i){var s=o[(r=e[i]).col];(void 0===s||r.row<s)&&(o[r.col]=r.row)}for(i=0,a=e.length;i<a;++i){var c=t-o[(r=e[i]).col];this.moveItemDown(r,r.row+c,n),n.push(r)}}},this.moveItemDown=function(e,t,n){if(!(e.row>=t)){for(;e.row<t;)++e.row,this.moveOverlappingItems(e,n);this.putItem(e,e.row,e.col,n)}},this.floatItemsUp=function(){if(!1!==this.floating)for(var e=0,t=this.grid.length;e<t;++e){var n=this.grid[e];if(n)for(var r=0,i=n.length;r<i;++r){var a=n[r];a&&this.floatItemUp(a)}}},this.floatItemUp=function(e){if(!1!==this.floating){for(var t=e.col,n=e.sizeY,r=e.sizeX,i=null,a=null,o=e.row-1;-1<o;){if(0!==this.getItems(o,t,r,n,e).length)break;i=o,a=t,--o}null!==i&&this.putItem(e,i,a)}},this.updateHeight=function(e){var t=this.minRows;e=e||0;for(var n=this.grid.length;0<=n;--n){var r=this.grid[n];if(r)for(var i=0,a=r.length;i<a;++i)r[i]&&(t=Math.max(t,n+e+r[i].sizeY))}this.gridHeight=0<this.maxRows-t?Math.min(this.maxRows,t):Math.max(this.maxRows,t)},this.pixelsToRows=function(e,t){return this.outerMargin||(e+=this.margins[0]/2),!0===t?Math.ceil(e/this.curRowHeight):!1===t?Math.floor(e/this.curRowHeight):Math.round(e/this.curRowHeight)},this.pixelsToColumns=function(e,t){return this.outerMargin||(e+=this.margins[1]/2),!0===t?Math.ceil(e/this.curColWidth):!1===t?Math.floor(e/this.curColWidth):Math.round(e/this.curColWidth)}}]).directive("gridsterPreview",function(){return{replace:!0,scope:!0,require:"^gridster",template:'<div ng-style="previewStyle()" class="gridster-item gridster-preview-holder"></div>',link:function(e,t,n,r){e.previewStyle=function(){return r.movingItem?{display:"block",height:r.movingItem.sizeY*r.curRowHeight-r.margins[0]+"px",width:r.movingItem.sizeX*r.curColWidth-r.margins[1]+"px",top:r.movingItem.row*r.curRowHeight+(r.outerMargin?r.margins[0]:0)+"px",left:r.movingItem.col*r.curColWidth+(r.outerMargin?r.margins[1]:0)+"px"}:{display:"none"}}}}}).directive("gridster",["$timeout","$window","$rootScope","gridsterDebounce",function(d,h,p,m){return{scope:!0,restrict:"EAC",controller:"GridsterCtrl",controllerAs:"gridster",compile:function(e){return e.prepend('<div ng-if="gridster.movingItem" gridster-preview></div>'),function(e,s,t,c){c.loaded=!1,c.$element=s,e.gridster=c,s.addClass("gridster");var l=function(e){return"hidden"!==e.style.visibility&&"none"!==e.style.display};function u(){s.css("height",c.gridHeight*c.curRowHeight+(c.outerMargin?c.margins[0]:-c.margins[0])+"px")}function n(e){if(c.setOptions(e),l(s[0])){"auto"===c.width?c.curWidth=s[0].offsetWidth||parseInt(s.css("width"),10):c.curWidth=c.width,"auto"===c.colWidth?c.curColWidth=(c.curWidth+(c.outerMargin?-c.margins[1]:c.margins[1]))/c.columns:c.curColWidth=c.colWidth,c.curRowHeight=c.rowHeight,"string"==typeof c.rowHeight&&("match"===c.rowHeight?c.curRowHeight=Math.round(c.curColWidth):-1!==c.rowHeight.indexOf("*")?c.curRowHeight=Math.round(c.curColWidth*c.rowHeight.replace("*","").replace(" ","")):-1!==c.rowHeight.indexOf("/")&&(c.curRowHeight=Math.round(c.curColWidth/c.rowHeight.replace("/","").replace(" ","")))),c.isMobile=c.mobileModeEnabled&&c.curWidth<=c.mobileBreakPoint;for(var t=0,n=c.grid.length;t<n;++t){var r=c.grid[t];if(r)for(var i=0,a=r.length;i<a;++i)if(r[i]){var o=r[i];o.setElementPosition(),o.setElementSizeY(),o.setElementSizeX()}}u()}}e.$watch(function(){return c.gridHeight},u),e.$watch(function(){return c.movingItem},function(){c.updateHeight(c.movingItem?c.movingItem.sizeY:0)});var r=t.gridster;r?e.$parent.$watch(r,function(e){n(e)},!0):n({}),e.$watch(function(){return c.loaded},function(){c.loaded?(s.addClass("gridster-loaded"),p.$broadcast("gridster-loaded",c)):s.removeClass("gridster-loaded")}),e.$watch(function(){return c.isMobile},function(){c.isMobile?s.addClass("gridster-mobile").removeClass("gridster-desktop"):s.removeClass("gridster-mobile").addClass("gridster-desktop"),p.$broadcast("gridster-mobile-changed",c)}),e.$watch(function(){return c.draggable},function(){p.$broadcast("gridster-draggable-changed",c)},!0),e.$watch(function(){return c.resizable},function(){p.$broadcast("gridster-resizable-changed",c)},!0);var i=s[0].offsetWidth||parseInt(s.css("width"),10),a=function(){var e=s[0].offsetWidth||parseInt(s.css("width"),10);e&&e!==i&&!c.movingItem&&(i=e,c.loaded&&s.removeClass("gridster-loaded"),n(),c.loaded&&s.addClass("gridster-loaded"),p.$broadcast("gridster-resized",[e,s[0].offsetHeight],c))},o=m(function(){a(),d(function(){e.$apply()})},100);e.$watch(function(){return l(s[0])},o),"function"==typeof window.addResizeListener?window.addResizeListener(s[0],o):e.$watch(function(){return s[0].offsetWidth||parseInt(s.css("width"),10)},a);var f=M.element(h);f.on("resize",o),e.$on("$destroy",function(){c.destroy(),f.off("resize",o),"function"==typeof window.removeResizeListener&&window.removeResizeListener(s[0],o)}),d(function(){e.$watch("gridster.floating",function(){c.floatItemsUp()}),c.loaded=!0},100)}}}}]).controller("GridsterItemCtrl",function(){this.$element=null,this.gridster=null,this.row=null,this.col=null,this.sizeX=null,this.sizeY=null,this.minSizeX=0,this.minSizeY=0,this.maxSizeX=null,this.maxSizeY=null,this.init=function(e,t){this.$element=e,this.gridster=t,this.sizeX=t.defaultSizeX,this.sizeY=t.defaultSizeY},this.destroy=function(){this.gridster=null,this.$element=null},this.toJSON=function(){return{row:this.row,col:this.col,sizeY:this.sizeY,sizeX:this.sizeX}},this.isMoving=function(){return this.gridster.movingItem===this},this.setPosition=function(e,t){this.gridster.putItem(this,e,t),this.isMoving()||this.setElementPosition()},this.setSize=function(e,t,n){var r="size"+(e=e.toUpperCase()),i="Size"+e;if(""!==t){t=parseInt(t,10),(isNaN(t)||0===t)&&(t=this.gridster["default"+i]);var a="X"===e?this.gridster.columns:this.gridster.maxRows;this["max"+i]&&(a=Math.min(this["max"+i],a)),this.gridster["max"+i]&&(a=Math.min(this.gridster["max"+i],a)),"X"===e&&this.cols?a-=this.cols:"Y"===e&&this.rows&&(a-=this.rows);var o=0;this["min"+i]&&(o=Math.max(this["min"+i],o)),this.gridster["min"+i]&&(o=Math.max(this.gridster["min"+i],o)),t=Math.max(Math.min(t,a),o);var s=this[r]!==t||this["old"+i]&&this["old"+i]!==t;return this["old"+i]=this[r]=t,this.isMoving()||this["setElement"+i](),!n&&s&&(this.gridster.moveOverlappingItems(this),this.gridster.layoutChanged()),s}},this.setSizeY=function(e,t){return this.setSize("Y",e,t)},this.setSizeX=function(e,t){return this.setSize("X",e,t)},this.setElementPosition=function(){this.gridster.isMobile?this.$element.css({marginLeft:this.gridster.margins[0]+"px",marginRight:this.gridster.margins[0]+"px",marginTop:this.gridster.margins[1]+"px",marginBottom:this.gridster.margins[1]+"px",top:"",left:""}):this.$element.css({margin:0,top:this.row*this.gridster.curRowHeight+(this.gridster.outerMargin?this.gridster.margins[0]:0)+"px",left:this.col*this.gridster.curColWidth+(this.gridster.outerMargin?this.gridster.margins[1]:0)+"px"})},this.setElementSizeY=function(){this.gridster.isMobile&&!this.gridster.saveGridItemCalculatedHeightInMobile?this.$element.css("height",""):this.$element.css("height",this.sizeY*this.gridster.curRowHeight-this.gridster.margins[0]+"px")},this.setElementSizeX=function(){this.gridster.isMobile?this.$element.css("width",""):this.$element.css("width",this.sizeX*this.gridster.curColWidth-this.gridster.margins[1]+"px")},this.getElementSizeX=function(){return this.sizeX*this.gridster.curColWidth-this.gridster.margins[1]},this.getElementSizeY=function(){return this.sizeY*this.gridster.curRowHeight-this.gridster.margins[0]}}).factory("GridsterTouch",[function(){return function(f,d,h,p){var e,t,m={},g=function(e){if(Object.keys)return Object.keys(e).length;var t,n=0;for(t in e)++n;return n},_=function(e){for(var t=0,n=0,r=navigator.userAgent.match(/\bMSIE\b/),i=e;null!=i;i=i.offsetParent)r&&(!document.documentMode||document.documentMode<8)&&"relative"===i.currentStyle.position&&i.offsetParent&&"relative"===i.offsetParent.currentStyle.position&&i.offsetLeft===i.offsetParent.offsetLeft||(t+=i.offsetLeft),n+=i.offsetTop;return{x:t,y:n}},b=_(f),v=!1,y=function(e){if("mousemove"!==e.type||0!==g(m)){for(var t=!0,n=e.changedTouches?e.changedTouches:[e],r=0;r<n.length;++r){var i=n[r],a=void 0!==i.identifier?i.identifier:void 0!==i.pointerId?i.pointerId:1;if(void 0===i.pageX)if(i.pageX=i.offsetX+b.x,i.pageY=i.offsetY+b.y,i.srcElement.offsetParent===f&&document.documentMode&&8===document.documentMode&&"mousedown"===i.type)i.pageX+=i.srcElement.offsetLeft,i.pageY+=i.srcElement.offsetTop;else if(i.srcElement!==f&&!document.documentMode||document.documentMode<8){for(var o=-2,s=-2,c=i.srcElement;null!==c;c=c.parentNode)o+=c.scrollLeft?c.scrollLeft:0,s+=c.scrollTop?c.scrollTop:0;i.pageX=i.clientX+o,i.pageY=i.clientY+s}var l=i.pageX,u=i.pageY;e.type.match(/(start|down)$/i)?(b=_(f),m[a]&&(p&&p({target:e.target,which:e.which,pointerId:a,pageX:l,pageY:u}),delete m[a]),d&&t&&(t=d({target:e.target,which:e.which,pointerId:a,pageX:l,pageY:u})),m[a]={x:l,y:u},f.msSetPointerCapture&&t?f.msSetPointerCapture(a):"mousedown"===e.type&&1===g(m)&&(v?f.setCapture(!0):(document.addEventListener("mousemove",y,!1),document.addEventListener("mouseup",y,!1)))):e.type.match(/move$/i)?!m[a]||m[a].x===l&&m[a].y===u||(h&&t&&(t=h({target:e.target,which:e.which,pointerId:a,pageX:l,pageY:u})),m[a].x=l,m[a].y=u):m[a]&&e.type.match(/(up|end|cancel)$/i)&&(p&&t&&(t=p({target:e.target,which:e.which,pointerId:a,pageX:l,pageY:u})),delete m[a],f.msReleasePointerCapture?f.msReleasePointerCapture(a):"mouseup"===e.type&&0===g(m)&&(v?f.releaseCapture():(document.removeEventListener("mousemove",y,!1),document.removeEventListener("mouseup",y,!1))))}t&&(e.preventDefault&&e.preventDefault(),e.preventManipulation&&e.preventManipulation(),e.preventMouseEvent&&e.preventMouseEvent())}};return this.enable=function(){window.navigator.msPointerEnabled?(f.addEventListener("MSPointerDown",y,!1),f.addEventListener("MSPointerMove",y,!1),f.addEventListener("MSPointerUp",y,!1),f.addEventListener("MSPointerCancel",y,!1),void 0!==f.style.msContentZooming&&(e=f.style.msContentZooming,f.style.msContentZooming="none"),void 0!==f.style.msTouchAction&&(t=f.style.msTouchAction,f.style.msTouchAction="none")):f.addEventListener?(f.addEventListener("touchstart",y,!1),f.addEventListener("touchmove",y,!1),f.addEventListener("touchend",y,!1),f.addEventListener("touchcancel",y,!1),f.addEventListener("mousedown",y,!1),f.setCapture&&!window.navigator.userAgent.match(/\bGecko\b/)&&(v=!0,f.addEventListener("mousemove",y,!1),f.addEventListener("mouseup",y,!1))):f.attachEvent&&f.setCapture&&(v=!0,f.attachEvent("onmousedown",function(){return y(window.event),window.event.returnValue=!1}),f.attachEvent("onmousemove",function(){return y(window.event),window.event.returnValue=!1}),f.attachEvent("onmouseup",function(){return y(window.event),window.event.returnValue=!1}))},this.disable=function(){window.navigator.msPointerEnabled?(f.removeEventListener("MSPointerDown",y,!1),f.removeEventListener("MSPointerMove",y,!1),f.removeEventListener("MSPointerUp",y,!1),f.removeEventListener("MSPointerCancel",y,!1),e&&(f.style.msContentZooming=e),t&&(f.style.msTouchAction=t)):f.removeEventListener?(f.removeEventListener("touchstart",y,!1),f.removeEventListener("touchmove",y,!1),f.removeEventListener("touchend",y,!1),f.removeEventListener("touchcancel",y,!1),f.removeEventListener("mousedown",y,!1),f.setCapture&&!window.navigator.userAgent.match(/\bGecko\b/)&&(v=!0,f.removeEventListener("mousemove",y,!1),f.removeEventListener("mouseup",y,!1))):f.detachEvent&&f.setCapture&&(v=!0,f.detachEvent("onmousedown"),f.detachEvent("onmousemove"),f.detachEvent("onmouseup"))},this}}]).factory("GridsterDraggable",["$document","$window","GridsterTouch",function(a,P,o){return function(A,S,T,x,k){var E,D,f,d,s=0,c=0,h=0,p=0,l=0,u=0,I=a[0],m=["select","option","input","textarea","button"];function e(e){if(-1!==m.indexOf(e.target.nodeName.toLowerCase()))return!1;var t,n=M.element(e.target);if(n.hasClass("gridster-item-resizable-handler"))return!1;if(n.attr("onclick")||n.attr("ng-click"))return!1;if(n.closest&&n.closest(".gridster-no-drag").length)return!1;if(T.draggable&&T.draggable.handle){var r=M.element(A[0].querySelectorAll(T.draggable.handle)),i=!1;e:for(var a=0,o=r.length;a<o;++a){var s=r[a];if(s===e.target){i=!0;break}for(var c=e.target,l=0;l<20;++l){var u=c.parentNode;if(u===A[0]||!u)break;if(u===s){i=!0;break e}c=u}}if(!i)return!1}switch(e.which){case 1:break;case 2:case 3:return}return h=e.pageX,p=e.pageY,E=parseInt(A.css("left"),10),D=parseInt(A.css("top"),10),f=A[0].offsetWidth,d=A[0].offsetHeight,x.col,x.row,t=e,A.addClass("gridster-item-moving"),T.movingItem=x,T.updateHeight(x.sizeY),S.$apply(function(){T.draggable&&T.draggable.start&&T.draggable.start(t,A,k,x)}),!0}function t(e){if(!A.hasClass("gridster-item-moving")||A.hasClass("gridster-item-resizing"))return!1;var t=T.curWidth-1,n=T.curRowHeight*T.maxRows-1;s=e.pageX,c=e.pageY;var r=s-h+l,i=c-p+u;l=u=0,h=s,p=c;var a=r,o=i;return E+a<0?l=a-(r=0-E):t<E+f+a&&(l=a-(r=t-E-f)),D+o<0?u=o-(i=0-D):n<D+d+o&&(u=o-(i=n-D-d)),E+=r,D+=i,A.css({top:D+"px",left:E+"px"}),function(e){var t=x.row,n=x.col,r=T.draggable&&T.draggable.drag,i=T.draggable.scrollSensitivity,a=T.draggable.scrollSpeed,o=Math.min(T.pixelsToRows(D),T.maxRows-1),s=Math.min(T.pixelsToColumns(E),T.columns-1),c=T.getItems(o,s,x.sizeX,x.sizeY,x),l=0!==c.length;if(!0===T.swapping&&l){var u=T.getBoundingBox(c),f=u.sizeX===x.sizeX&&u.sizeY===x.sizeY,d=u.row===t,h=u.col===n,p=u.row===o&&u.col===s,m=d||h;if(f&&1===c.length){if(p)T.swapItems(x,c[0]);else if(m)return}else if(u.sizeX<=x.sizeX&&u.sizeY<=x.sizeY&&m)for(var g=x.row<=o?x.row:o+x.sizeY,_=x.col<=s?x.col:s+x.sizeX,b=g-u.row,v=_-u.col,y=0,w=c.length;y<w;++y){var C=c[y];0===T.getItems(C.row+b,C.col+v,C.sizeX,C.sizeY,x).length&&T.putItem(C,C.row+b,C.col+v)}}!1===T.pushing&&l||(x.row=o,x.col=s),e.pageY-I.body.scrollTop<i?I.body.scrollTop=I.body.scrollTop-a:P.innerHeight-(e.pageY-I.body.scrollTop)<i&&(I.body.scrollTop=I.body.scrollTop+a),e.pageX-I.body.scrollLeft<i?I.body.scrollLeft=I.body.scrollLeft-a:P.innerWidth-(e.pageX-I.body.scrollLeft)<i&&(I.body.scrollLeft=I.body.scrollLeft+a),(r||t!==x.row||n!==x.col)&&S.$apply(function(){r&&T.draggable.drag(e,A,k,x)})}(e),!0}function n(e){return!(!A.hasClass("gridster-item-moving")||A.hasClass("gridster-item-resizing")||(l=u=0,function(e){A.removeClass("gridster-item-moving");var t=Math.min(T.pixelsToRows(D),T.maxRows-1),n=Math.min(T.pixelsToColumns(E),T.columns-1);!1===T.pushing&&0!==T.getItems(t,n,x.sizeX,x.sizeY,x).length||(x.row=t,x.col=n),T.movingItem=null,x.setPosition(x.row,x.col),S.$apply(function(){T.draggable&&T.draggable.stop&&T.draggable.stop(e,A,k,x)})}(e),0))}var r=null,i=null;this.enable=function(){!0!==r&&(r=!0,i?i.enable():(i=new o(A[0],e,t,n)).enable())},this.disable=function(){!1!==r&&(r=!1,i&&i.disable())},this.toggle=function(e){e?this.enable():this.disable()},this.destroy=function(){this.disable()}}}]).factory("GridsterResizable",["GridsterTouch",function(T){return function(y,w,C,A,S){function e(f){var d,h,p,m,n,o=f,s=0,c=0,l=0,u=0,g=0,_=0,b=function(){return(A.minSizeY?A.minSizeY:1)*C.curRowHeight-C.margins[0]},v=function(){return(A.minSizeX?A.minSizeX:1)*C.curColWidth-C.margins[1]};function e(e){switch(e.which){case 1:break;case 2:case 3:return}var t;return(n=C.draggable.enabled)&&(C.draggable.enabled=!1,w.$broadcast("gridster-draggable-changed",C)),l=e.pageX,u=e.pageY,d=parseInt(y.css("left"),10),h=parseInt(y.css("top"),10),p=y[0].offsetWidth,m=y[0].offsetHeight,A.sizeX,A.sizeY,t=e,y.addClass("gridster-item-moving"),y.addClass("gridster-item-resizing"),(C.movingItem=A).setElementSizeX(),A.setElementSizeY(),A.setElementPosition(),C.updateHeight(1),w.$apply(function(){C.resizable&&C.resizable.start&&C.resizable.start(t,y,S,A)}),!0}function t(e){var t=C.curWidth-1;s=e.pageX,c=e.pageY;var n=s-l+g,r=c-u+_;g=_=0,l=s,u=c;var i=r,a=n;return 0<=o.indexOf("n")&&(m-i<b()?(r=m-b(),_=i-r):h+i<0&&(_=i-(r=0-h)),h+=r,m-=r),0<=o.indexOf("s")&&(m+i<b()?(r=b()-m,_=i-r):9999<h+m+i&&(_=i-(r=9999-h-m)),m+=r),0<=o.indexOf("w")&&(p-a<v()?(n=p-v(),g=a-n):d+a<0&&(g=a-(n=0-d)),d+=n,p-=n),0<=o.indexOf("e")&&(p+a<v()?(n=v()-p,g=a-n):t<d+p+a&&(g=a-(n=t-d-p)),p+=n),y.css({top:h+"px",left:d+"px",width:p+"px",height:m+"px"}),function(e){var t=A.row,n=A.col,r=A.sizeX,i=A.sizeY,a=C.resizable&&C.resizable.resize,o=A.col;-1!==["w","nw","sw"].indexOf(f)&&(o=C.pixelsToColumns(d,!1));var s=A.row;-1!==["n","ne","nw"].indexOf(f)&&(s=C.pixelsToRows(h,!1));var c=A.sizeX;-1===["n","s"].indexOf(f)&&(c=C.pixelsToColumns(p,!0));var l=A.sizeY;-1===["e","w"].indexOf(f)&&(l=C.pixelsToRows(m,!0)),!(-1<s&&-1<o&&c+o<=C.columns&&l+s<=C.maxRows)||!1===C.pushing&&0!==C.getItems(s,o,c,l,A).length||(A.row=s,A.col=o,A.sizeX=c,A.sizeY=l);var u=A.row!==t||A.col!==n||A.sizeX!==r||A.sizeY!==i;(a||u)&&w.$apply(function(){a&&C.resizable.resize(e,y,S,A)})}(e),!0}function r(e){var t;return C.draggable.enabled!==n&&(C.draggable.enabled=n,w.$broadcast("gridster-draggable-changed",C)),g=_=0,t=e,y.removeClass("gridster-item-moving"),y.removeClass("gridster-item-resizing"),C.movingItem=null,A.setPosition(A.row,A.col),A.setSizeY(A.sizeY),A.setSizeX(A.sizeX),w.$apply(function(){C.resizable&&C.resizable.stop&&C.resizable.stop(t,y,S,A)}),!0}var i,a=null;this.enable=function(){a||(a=M.element('<div class="gridster-item-resizable-handler handle-'+o+'"></div>'),y.append(a)),(i=new T(a[0],e,t,r)).enable()},this.disable=function(){a&&(a.remove(),a=null),i.disable(),i=void 0},this.destroy=function(){this.disable()}}var n=[],t=C.resizable.handles;"string"==typeof t&&(t=C.resizable.handles.split(","));for(var r=!1,i=0,a=t.length;i<a;i++)n.push(new e(t[i]));this.enable=function(){if(!r){for(var e=0,t=n.length;e<t;e++)n[e].enable();r=!0}},this.disable=function(){if(r){for(var e=0,t=n.length;e<t;e++)n[e].disable();r=!1}},this.toggle=function(e){e?this.enable():this.disable()},this.destroy=function(){for(var e=0,t=n.length;e<t;e++)n[e].destroy()}}}]).factory("gridsterDebounce",function(){return function(r,i,a){var o;return function(){var e=this,t=arguments,n=a&&!o;clearTimeout(o),o=setTimeout(function(){o=null,a||r.apply(e,t)},i),n&&r.apply(e,t)}}}).directive("gridsterItem",["$parse","GridsterDraggable","GridsterResizable","gridsterDebounce",function(w,C,A,S){return{scope:!0,restrict:"EA",controller:"GridsterItemCtrl",controllerAs:"gridsterItem",require:["^gridster","gridsterItem"],link:function(r,e,t,n){var i,a=t.gridsterItem,o=n[0],s=n[1];if(r.gridster=o,a){var c=w(a);!(i=c(r)||{})&&c.assign&&(i={row:s.row,col:s.col,sizeX:s.sizeX,sizeY:s.sizeY,minSizeX:0,minSizeY:0,maxSizeX:null,maxSizeY:null},c.assign(r,i))}else i=t;s.init(e,o),e.addClass("gridster-item");for(var l=["minSizeX","maxSizeX","minSizeY","maxSizeY","sizeX","sizeY","row","col"],u={},f=[],d=function(e){var t;if("string"==typeof i[e])t=i[e];else if("string"==typeof i[e.toLowerCase()])t=i[e.toLowerCase()];else{if(!a)return;t=a+"."+e}f.push('"'+e+'":'+t),u[e]=w(t);var n=u[e](r);"number"==typeof n&&(s[e]=n)},h=0,p=l.length;h<p;++h)d(l[h]);var m="{"+f.join(",")+"}";r.$watchCollection(m,function(e,t){for(var n in e){var r=e[n];t[n]!==r&&(r=parseInt(r,10),isNaN(r)||(s[n]=r))}}),r.$watch(function(){return s.row+","+s.col},function(){s.setPosition(s.row,s.col),u.row&&u.row.assign&&u.row.assign(r,s.row),u.col&&u.col.assign&&u.col.assign(r,s.col)}),r.$watch(function(){return s.sizeY+","+s.sizeX+","+s.minSizeX+","+s.maxSizeX+","+s.minSizeY+","+s.maxSizeY},function(){var e=s.setSizeX(s.sizeX,!0);e&&u.sizeX&&u.sizeX.assign&&u.sizeX.assign(r,s.sizeX);var t=s.setSizeY(s.sizeY,!0);t&&u.sizeY&&u.sizeY.assign&&u.sizeY.assign(r,s.sizeY),(e||t)&&(s.gridster.moveOverlappingItems(s),o.layoutChanged(),r.$broadcast("gridster-item-resized",s))});var g=new C(e,r,o,s,i),_=new A(e,r,o,s,i),b=function(){_.toggle(!o.isMobile&&o.resizable&&o.resizable.enabled)};b();var v=function(){g.toggle(!o.isMobile&&o.draggable&&o.draggable.enabled)};v(),r.$on("gridster-draggable-changed",v),r.$on("gridster-resizable-changed",b),r.$on("gridster-resized",b),r.$on("gridster-mobile-changed",function(){b(),v()});var y=S(function(){r.$apply(function(){r.$broadcast("gridster-item-transition-end",s)})},50);return e.on(function(){var e=document.createElement("div"),t={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(var n in t)if(void 0!==e.style[n])return t[n]}(),y),r.$broadcast("gridster-item-initialized",s),r.$on("$destroy",function(){try{_.destroy(),g.destroy()}catch(e){}try{o.removeItem(s)}catch(e){}try{s.destroy()}catch(e){}})}}}]).directive("gridsterNoDrag",function(){return{restrict:"A",link:function(e,t){t.addClass("gridster-no-drag")}}})}),function(){"use strict";function s(e){var t=isNaN(e.startTime)?new Date:new Date(e.startTime);if(null===e.gmtOffset||!1===e.gmtOffset)return{hrs:t.getHours(),mins:t.getMinutes(),secs:t.getSeconds(),date:t};var n=t.getTime()+6e4*t.getTimezoneOffset(),r=new Date(n+36e5*e.gmtOffset);return{hrs:r.getHours(),mins:r.getMinutes(),secs:r.getSeconds(),date:r}}angular.module("ds.clock",[]).directive("dsWidgetClock",["$interval","$filter",function(e,t){return a=e,o=t,{restrict:"EA",scope:{gmtOffset:"=gmtOffset",digitalFormat:"=digitalFormat",showDigital:"=showDigital",showAnalog:"=showAnalog",startTime:"=startTime",theme:"=theme"},template:'<div class="widget-clock" ng-class="themeClass" ng-if="date"><div class="digital" ng-if="digital"><span class="time"><span class="hours">{{digital}}</span></span></div><div class="analog" ng-if="analog"><div class="square"><svg viewBox="0 0 100 100"><g transform="translate(50,50)"><circle class="clock-face" r="48" /><line ng-repeat="minor in minors track by $index" class="minor" y1="42" y2="45" ng-attr-transform="rotate({{360 * $index / minors.length}})" /><line ng-repeat="major in majors track by $index" class="major" y1="35" y2="46" ng-attr-transform="rotate({{360 * $index / majors.length}})" /><line class="hour" y1="2" y2="-20" ng-attr-transform="rotate({{30 * date.hrs + date.mins / 2}})" /><line class="minute" y1="4" y2="-30" ng-attr-transform="rotate({{6 * date.mins + date.secs / 10}})" /><g ng-attr-transform="rotate({{6 * date.secs}})"><line class="second" y1="10" y2="-38" /><line class="second-counterweight" y1="10" y2="2" /></g></g></svg></div></div><div ng-if="gmtInfo" class="gmt-info">{{gmtInfo}}</div></div>',link:function(c,e,n){var t,l={},u=c.gmtOffset,r=c.digitalFormat?c.digitalFormat:"HH:mm:ss";l.showDigital=null!=c.showDigital?c.showDigital:void 0!==n.showDigital,l.showAnalog=null!=c.showAnalog?c.showAnalog:void 0!==n.showAnalog,l.showGmtInfo=void 0!==n.showGmtInfo,l.startTime=parseInt(c.startTime,10),c.themeClass=c.theme?c.theme:n.theme?n.theme:"light",l.showDigital||l.showAnalog||(l.showAnalog=!0,l.showDigital=!0),c.gmtInfo=!1,c.date=s(l),c.digital=!!l.showDigital&&"Loading..",c.analog=l.showAnalog,c.majors=new Array(12),c.minors=new Array(60);var i=null,f=function(){var e,t,n;isNaN(l.startTime)||(l.startTime=l.startTime+1e3),i=s(l),c.date=i,l.showDigital&&(c.digital=(e=i,t=r,n=u,o("date")(e.date,t,n)))};t=a(f,1e3),c.$watch("gmtOffset",function(e,t){var n,r,i,a,o,s;u=e,l.gmtOffset=null!=u&&(n=u,(0<(n=parseFloat(n))?Math.floor(n):Math.ceil(n))+n%1/.6),l.showGmtInfo&&!1!==l.gmtOffset&&(c.gmtInfo=(r=l.gmtOffset,i=0<r?Math.floor(r):Math.ceil(r),a=Math.round((0<r?r:-1*r)%1*60),"GMT"+(0===r?"":(0<r?" +":" ")+((s=i)<0?(-10<s?"-0":"-")+-1*s:(s<10?"0":"")+s)+"."+(o=a,o+(o<10?"0":"")).substring(0,2)))),f()}),c.$watch("digitalFormat",function(e,t){e!=t&&(r=e)}),c.$watch("showDigital",function(e,t){e!=t&&(l.showDigital=e,c.digital=!!l.showDigital&&"Loading..")}),c.$watch("showAnalog",function(e,t){e!=t&&(l.showAnalog=e,c.analog=e)}),c.$watch("theme",function(e,t){e!=t&&(c.themeClass=e||(n.theme?n.theme:"light"))}),e.on("$destroy",function(){a.cancel(t),t=null})}};var a,o}])}(),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Clipboard=e()}}(function(){return function a(o,s,c){function l(n,e){if(!s[n]){if(!o[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=s[n]={exports:{}};o[n][0].call(i.exports,function(e){var t=o[n][1][e];return l(t||e)},i,i.exports,a,o,s,c)}return s[n].exports}for(var u="function"==typeof require&&require,e=0;e<c.length;e++)l(c[e]);return l}({1:[function(e,t,n){if(Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}t.exports=function(e,t){for(;e&&9!==e.nodeType;){if(e.matches(t))return e;e=e.parentNode}}},{}],2:[function(e,t,n){var o=e("./closest");t.exports=function(e,t,n,r,i){var a=function(t,n,e,r){return function(e){e.delegateTarget=o(e.target,n),e.delegateTarget&&r.call(t,e)}}.apply(this,arguments);return e.addEventListener(n,a,i),{destroy:function(){e.removeEventListener(n,a,i)}}}},{"./closest":1}],3:[function(e,t,n){n.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},n.nodeList=function(e){var t=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===t||"[object HTMLCollection]"===t)&&"length"in e&&(0===e.length||n.node(e[0]))},n.string=function(e){return"string"==typeof e||e instanceof String},n.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},{}],4:[function(e,t,n){var d=e("./is"),h=e("delegate");t.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!d.string(t))throw new TypeError("Second argument must be a String");if(!d.fn(n))throw new TypeError("Third argument must be a Function");if(d.node(e))return u=t,f=n,(l=e).addEventListener(u,f),{destroy:function(){l.removeEventListener(u,f)}};if(d.nodeList(e))return o=e,s=t,c=n,Array.prototype.forEach.call(o,function(e){e.addEventListener(s,c)}),{destroy:function(){Array.prototype.forEach.call(o,function(e){e.removeEventListener(s,c)})}};if(d.string(e))return r=e,i=t,a=n,h(document.body,r,i,a);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var r,i,a,o,s,c,l,u,f}},{"./is":3,delegate:2}],5:[function(e,t,n){t.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName)e.focus(),e.setSelectionRange(0,e.value.length),t=e.value;else{e.hasAttribute("contenteditable")&&e.focus();var n=window.getSelection(),r=document.createRange();r.selectNodeContents(e),n.removeAllRanges(),n.addRange(r),t=n.toString()}return t}},{}],6:[function(e,t,n){function r(){}r.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],i=[];if(r&&t)for(var a=0,o=r.length;a<o;a++)r[a].fn!==t&&r[a].fn._!==t&&i.push(r[a]);return i.length?n[e]=i:delete n[e],this}},t.exports=r},{}],7:[function(r,i,a){!function(e,t){if(void 0!==a)t(i,r("select"));else{var n={exports:{}};t(n,e.select),e.clipboardAction=n.exports}}(this,function(e,t){"use strict";var n,r=(n=t)&&n.__esModule?n:{default:n};var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var a=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),o=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.resolveOptions(e),this.initSelection()}return a(t,[{key:"resolveOptions",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.addEventListener("focus",window.scrollTo(0,n)),this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,r.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,r.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":i(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),t}();e.exports=o})},{select:5}],8:[function(r,i,a){!function(e,t){if(void 0!==a)t(i,r("./clipboard-action"),r("tiny-emitter"),r("good-listener"));else{var n={exports:{}};t(n,e.clipboardAction,e.tinyEmitter,e.goodListener),e.clipboard=n.exports}}(this,function(e,t,n,r){"use strict";var i=s(t),a=s(n),o=s(r);function s(e){return e&&e.__esModule?e:{default:e}}var c=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var l=function(e){function r(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.resolveOptions(t),n.listenClick(e),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,a.default),c(r,[{key:"resolveOptions",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,o.default)(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new i.default({action:this.action(t),target:this.target(t),text:this.text(t),trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return u("action",e)}},{key:"defaultTarget",value:function(e){var t=u("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return u("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}]),r}();function u(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}e.exports=l})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}),function(){"use strict";var e,r,t="ngclipboard";"object"==typeof module&&module.exports?(e=require("angular"),r=require("clipboard"),module.exports=t):(e=window.angular,r=window.Clipboard),e.module(t,[]).directive("ngclipboard",function(){return{restrict:"A",scope:{ngclipboardSuccess:"&",ngclipboardError:"&"},link:function(t,e){var n=new r(e[0]);n.on("success",function(e){t.$apply(function(){t.ngclipboardSuccess({e:e})})}),n.on("error",function(e){t.$apply(function(){t.ngclipboardError({e:e})})}),e.on("$destroy",function(){n.destroy()})}}})}(),function(o,T){"use strict";T.mock={},T.mock.$BrowserProvider=function(){this.$get=function(){return new T.mock.$Browser}},T.mock.$Browser=function(){var i=this;this.isMock=!0,i.$$url="http://server/",i.$$lastUrl=i.$$url,i.pollFns=[],i.$$completeOutstandingRequest=T.noop,i.$$incOutstandingRequestCount=T.noop,i.onUrlChange=function(e){return i.pollFns.push(function(){i.$$lastUrl===i.$$url&&i.$$state===i.$$lastState||(i.$$lastUrl=i.$$url,i.$$lastState=i.$$state,e(i.$$url,i.$$state))}),e},i.$$applicationDestroyed=T.noop,i.$$checkUrlChange=T.noop,i.deferredFns=[],i.deferredNextId=0,i.defer=function(e,t){return t=t||0,i.deferredFns.push({time:i.defer.now+t,fn:e,id:i.deferredNextId}),i.deferredFns.sort(function(e,t){return e.time-t.time}),i.deferredNextId++},i.defer.now=0,i.defer.cancel=function(n){var r;return T.forEach(i.deferredFns,function(e,t){e.id===n&&(r=t)}),!!T.isDefined(r)&&(i.deferredFns.splice(r,1),!0)},i.defer.flush=function(e){var t;if(T.isDefined(e))t=i.defer.now+e;else{if(!i.deferredFns.length)throw new Error("No deferred tasks to be flushed");t=i.deferredFns[i.deferredFns.length-1].time}for(;i.deferredFns.length&&i.deferredFns[0].time<=t;)i.defer.now=i.deferredFns[0].time,i.deferredFns.shift().fn();i.defer.now=t},i.$$baseHref="/",i.baseHref=function(){return this.$$baseHref}},T.mock.$Browser.prototype={poll:function(){T.forEach(this.pollFns,function(e){e()})},url:function(e,t,n){return T.isUndefined(n)&&(n=null),e?(this.$$url=e,this.$$state=T.copy(n),this):this.$$url},state:function(){return this.$$state},notifyWhenNoOutstandingRequests:function(e){e()}},T.mock.$ExceptionHandlerProvider=function(){var e;this.mode=function(t){switch(t){case"log":case"rethrow":var n=[];(e=function(e){if(1==arguments.length?n.push(e):n.push([].slice.call(arguments,0)),"rethrow"===t)throw e}).errors=n;break;default:throw new Error("Unknown mode '"+t+"', only 'log'/'rethrow' modes are allowed!")}},this.$get=function(){return e},this.mode("rethrow")},T.mock.$LogProvider=function(){var t=!0;function n(e,t,n){return e.concat(Array.prototype.slice.call(t,n))}this.debugEnabled=function(e){return T.isDefined(e)?(t=e,this):t},this.$get=function(){var e={log:function(){e.log.logs.push(n([],arguments,0))},warn:function(){e.warn.logs.push(n([],arguments,0))},info:function(){e.info.logs.push(n([],arguments,0))},error:function(){e.error.logs.push(n([],arguments,0))},debug:function(){t&&e.debug.logs.push(n([],arguments,0))},reset:function(){e.log.logs=[],e.info.logs=[],e.warn.logs=[],e.error.logs=[],e.debug.logs=[]},assertEmpty:function(){var n=[];if(T.forEach(["error","warn","info","log","debug"],function(t){T.forEach(e[t].logs,function(e){T.forEach(e,function(e){n.push("MOCK $log ("+t+"): "+String(e)+"\n"+(e.stack||""))})})}),n.length)throw n.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or an expected log message was not checked and removed:"),n.push(""),new Error(n.join("\n---------\n"))}};return e.reset(),e}},T.mock.$IntervalProvider=function(){this.$get=["$browser","$rootScope","$q","$$q",function(u,f,d,h){var p=[],m=0,g=0,e=function(e,t,r,n){var i=4<arguments.length,a=i?Array.prototype.slice.call(arguments,4):[],o=0,s=T.isDefined(n)&&!n,c=(s?h:d).defer(),l=c.promise;return r=T.isDefined(r)?r:0,l.then(null,null,i?function(){e.apply(null,a)}:e),l.$$intervalId=m,p.push({nextTime:g+t,delay:t,fn:function(){var n;c.notify(o++),0<r&&r<=o&&(c.resolve(o),T.forEach(p,function(e,t){e.id===l.$$intervalId&&(n=t)}),T.isDefined(n)&&p.splice(n,1)),s?u.defer.flush():f.$apply()},id:m,deferred:c}),p.sort(function(e,t){return e.nextTime-t.nextTime}),m++,l};return e.cancel=function(n){return!!n&&(T.forEach(p,function(e,t){e.id===n.$$intervalId&&(r=t)}),!!T.isDefined(r)&&(p[r].deferred.reject("canceled"),p.splice(r,1),!0));var r},e.flush=function(e){for(g+=e;p.length&&p[0].nextTime<=g;){var t=p[0];t.fn(),t.nextTime+=t.delay,p.sort(function(e,t){return e.nextTime-t.nextTime})}return e},e}]};var l,a=/^(-?\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;function s(e){return parseInt(e,10)}function c(e,t,n){var r="";for(e<0&&(r="-",e=-e),e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),r+e}function e(n,_,b,v){var y=[],w=[],C=[],A=T.bind(C,C.push),S=T.copy;function s(e,t,n,r){return T.isFunction(e)?e:function(){return T.isNumber(e)?[e,t,n,r]:[200,e,t,n]}}function o(r,i,a,o,s,c,e,t,n,l){var u=new x,f=w[0],d=!1;function h(e){return T.isString(e)||T.isFunction(e)||e instanceof RegExp?e:T.toJson(e)}function p(t){return!v&&c&&(c.then?c.then(e):_(e,c)),n;function n(){var e=t.response(r,i,a,s,t.params(i));u.$$respHeaders=e[2],o(S(e[0]),S(e[1]),u.getAllResponseHeaders(),S(e[3]||""))}function e(){for(var e=0,t=C.length;e<t;e++)if(C[e]===n){C.splice(e,1),o(-1,void 0,"");break}}}if(u.$$events=n,u.upload.$$events=l,f&&f.match(r,i)){if(!f.matchData(a))throw new Error("Expected "+f+" with different data\nEXPECTED: "+h(f.data)+"\nGOT:      "+a);if(!f.matchHeaders(s))throw new Error("Expected "+f+" with different headers\nEXPECTED: "+h(f.headers)+"\nGOT:      "+h(s));if(w.shift(),f.response)return void C.push(p(f));d=!0}for(var m,g=-1;m=y[++g];)if(m.match(r,i,a,s||{})){if(m.response)(v?v.defer:A)(p(m));else{if(!m.passThrough)throw new Error("No response defined !");b(r,i,a,o,s,c,e,t,n,l)}return}throw d?new Error("No response defined !"):new Error("Unexpected request: "+r+" "+i+"\n"+(f?"Expected "+f:"No more request expected"))}function r(e){var t={regexp:e},o=t.keys=[];return e&&T.isString(e)&&(e=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(e,t,n,r){var i="?"===r?r:null,a="*"===r?r:null;return o.push({name:n,optional:!!i}),t=t||"",(i?"":t)+"(?:"+(i?t:"")+(a?"(.+?)":"([^/]+)")+(i||"")+")"+(i||"")}).replace(/([\/$\*])/g,"\\$1"),t.regexp=new RegExp("^"+e,"i")),t}return o.when=function(e,t,n,r,i){var a=new u(e,t,n,r,i),o={respond:function(e,t,n,r){return a.passThrough=void 0,a.response=s(e,t,n,r),o}};return v&&(o.passThrough=function(){return a.response=void 0,a.passThrough=!0,o}),y.push(a),o},e("when"),o.whenRoute=function(e,t){var n=r(t);return o.when(e,n.regexp,void 0,void 0,n.keys)},o.expect=function(e,t,n,r,i){var a=new u(e,t,n,r,i),o={respond:function(e,t,n,r){return a.response=s(e,t,n,r),o}};return w.push(a),o},e("expect"),o.expectRoute=function(e,t){var n=r(t);return o.expect(e,n.regexp,void 0,void 0,n.keys)},o.flush=function(e,t){if(!1!==t&&n.$digest(),!C.length)throw new Error("No pending request to flush !");if(T.isDefined(e)&&null!==e)for(;e--;){if(!C.length)throw new Error("No more pending request to flush !");C.shift()()}else for(;C.length;)C.shift()();o.verifyNoOutstandingExpectation(t)},o.verifyNoOutstandingExpectation=function(e){if(!1!==e&&n.$digest(),w.length)throw new Error("Unsatisfied requests: "+w.join(", "))},o.verifyNoOutstandingRequest=function(){if(C.length)throw new Error("Unflushed requests: "+C.length)},o.resetExpectations=function(){w.length=0,C.length=0},o;function e(a){T.forEach(["GET","DELETE","JSONP","HEAD"],function(r){o[a+r]=function(e,t,n){return o[a](r,e,void 0,t,n)}}),T.forEach(["PUT","POST","PATCH"],function(i){o[a+i]=function(e,t,n,r){return o[a](i,e,t,n,r)}})}}function u(i,s,t,n,c){function r(e){return e.slice(e.indexOf("?")+1).split("&").sort()}this.data=t,this.headers=n,this.match=function(e,t,n,r){return i==e&&(!!this.matchUrl(t)&&(!(T.isDefined(n)&&!this.matchData(n))&&!(T.isDefined(r)&&!this.matchHeaders(r))))},this.matchUrl=function(e){return!s||(T.isFunction(s.test)?s.test(e):T.isFunction(s)?s(e):s==e||(t=e,s.slice(0,s.indexOf("?"))==t.slice(0,t.indexOf("?"))&&r(s).join()==r(t).join()));var t},this.matchHeaders=function(e){return!!T.isUndefined(n)||(T.isFunction(n)?n(e):T.equals(n,e))},this.matchData=function(e){return!!T.isUndefined(t)||(t&&T.isFunction(t.test)?t.test(e):t&&T.isFunction(t)?t(e):t&&!T.isString(t)?T.equals(T.fromJson(T.toJson(t)),T.fromJson(e)):t==e)},this.toString=function(){return i+" "+s},this.params=function(o){return T.extend((i={},e=-1<o.indexOf("?")?o.substring(o.indexOf("?")+1):"",T.forEach(e.split("&"),function(e){if(e&&(n=e.replace(/\+/g,"%20").split("="),r=a(n[0]),T.isDefined(r))){var t=!T.isDefined(n[1])||a(n[1]);hasOwnProperty.call(i,r)?T.isArray(i[r])?i[r].push(t):i[r]=[i[r],t]:i[r]=t}}),i),function(){var e={};if(!s||!T.isFunction(s.test)||!c||0===c.length)return e;var t=s.exec(o);if(!t)return e;for(var n=1,r=t.length;n<r;++n){var i=c[n-1],a=t[n];i&&a&&(e[i.name||i]=a)}return e}());var n,r,i,e;function a(e){try{return decodeURIComponent(e)}catch(e){}}}}function x(){(x.$$lastInstance=this).open=function(e,t,n){this.$$method=e,this.$$url=t,this.$$async=n,this.$$reqHeaders={},this.$$respHeaders={}},this.send=function(e){this.$$data=e},this.setRequestHeader=function(e,t){this.$$reqHeaders[e]=t},this.getResponseHeader=function(n){var r=this.$$respHeaders[n];return r||(n=T.lowercase(n),(r=this.$$respHeaders[n])||(r=void 0,T.forEach(this.$$respHeaders,function(e,t){r||T.lowercase(t)!=n||(r=e)})),r)},this.getAllResponseHeaders=function(){var n=[];return T.forEach(this.$$respHeaders,function(e,t){n.push(t+": "+e)}),n.join("\n")},this.abort=T.noop,this.$$events={},this.addEventListener=function(e,t){T.isUndefined(this.$$events[e])&&(this.$$events[e]=[]),this.$$events[e].push(t)},this.upload={$$events:{},addEventListener:this.addEventListener}}T.mock.TzDate=function(e,t){var n=new Date(0);if(T.isString(t)){var r=t;if(n.origDate=function(e){var t;if(t=e.match(a)){var n=new Date(0),r=0,i=0;return t[9]&&(r=s(t[9]+t[10]),i=s(t[9]+t[11])),n.setUTCFullYear(s(t[1]),s(t[2])-1,s(t[3])),n.setUTCHours(s(t[4]||0)-r,s(t[5]||0)-i,s(t[6]||0),s(t[7]||0)),n}return e}(t),t=n.origDate.getTime(),isNaN(t))throw{name:"Illegal Argument",message:"Arg '"+r+"' passed into TzDate constructor is not a valid date string"}}else n.origDate=new Date(t);var i=new Date(t).getTimezoneOffset();n.offsetDiff=60*i*1e3-1e3*e*60*60,n.date=new Date(t+n.offsetDiff),n.getTime=function(){return n.date.getTime()-n.offsetDiff},n.toLocaleDateString=function(){return n.date.toLocaleDateString()},n.getFullYear=function(){return n.date.getFullYear()},n.getMonth=function(){return n.date.getMonth()},n.getDate=function(){return n.date.getDate()},n.getHours=function(){return n.date.getHours()},n.getMinutes=function(){return n.date.getMinutes()},n.getSeconds=function(){return n.date.getSeconds()},n.getMilliseconds=function(){return n.date.getMilliseconds()},n.getTimezoneOffset=function(){return 60*e},n.getUTCFullYear=function(){return n.origDate.getUTCFullYear()},n.getUTCMonth=function(){return n.origDate.getUTCMonth()},n.getUTCDate=function(){return n.origDate.getUTCDate()},n.getUTCHours=function(){return n.origDate.getUTCHours()},n.getUTCMinutes=function(){return n.origDate.getUTCMinutes()},n.getUTCSeconds=function(){return n.origDate.getUTCSeconds()},n.getUTCMilliseconds=function(){return n.origDate.getUTCMilliseconds()},n.getDay=function(){return n.date.getDay()},n.toISOString&&(n.toISOString=function(){return c(n.origDate.getUTCFullYear(),4)+"-"+c(n.origDate.getUTCMonth()+1,2)+"-"+c(n.origDate.getUTCDate(),2)+"T"+c(n.origDate.getUTCHours(),2)+":"+c(n.origDate.getUTCMinutes(),2)+":"+c(n.origDate.getUTCSeconds(),2)+"."+c(n.origDate.getUTCMilliseconds(),3)+"Z"});return T.forEach(["getUTCDay","getYear","setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear","toDateString","toGMTString","toJSON","toLocaleFormat","toLocaleString","toLocaleTimeString","toSource","toString","toTimeString","toUTCString","valueOf"],function(e){n[e]=function(){throw new Error("Method '"+e+"' is not implemented in the TzDate mock")}}),n},T.mock.TzDate.prototype=Date.prototype,T.mock.animate=T.module("ngAnimateMock",["ng"]).config(["$provide",function(e){e.factory("$$forceReflow",function(){function e(){e.totalReflows++}return e.totalReflows=0,e}),e.factory("$$animateAsyncRun",function(){var t=[],e=function(){return function(e){t.push(e)}};return e.flush=function(){if(0===t.length)return!1;for(var e=0;e<t.length;e++)t[e]();return t=[],!0},e}),e.decorator("$$animateJs",["$delegate",function(t){var n=[],e=function(){var e=t.apply(t,arguments);return e&&n.push(e),e};return e.$closeAndFlush=function(){n.forEach(function(e){e.end()}),n=[]},e}]),e.decorator("$animateCss",["$delegate",function(r){var i=[],e=function(e,t){var n=r(e,t);return i.push(n),n};return e.$closeAndFlush=function(){i.forEach(function(e){e.end()}),i=[]},e}]),e.decorator("$animate",["$delegate","$timeout","$browser","$$rAF","$animateCss","$$animateJs","$$forceReflow","$$animateAsyncRun","$rootScope",function(t,e,n,r,i,a,o,s,c){var l={queue:[],cancel:t.cancel,on:t.on,off:t.off,pin:t.pin,get reflows(){return o.totalReflows},enabled:t.enabled,closeAndFlush:function(){this.flush(!0),i.$closeAndFlush(),a.$closeAndFlush(),this.flush()},flush:function(e){c.$digest();for(var t,n=!1;t=!1,r.queue.length&&(r.flush(),t=n=!0),s.flush()&&(t=n=!0),t;);if(!n&&!e)throw new Error("No pending animations ready to be closed or flushed");c.$digest()}};return T.forEach(["animate","enter","leave","move","addClass","removeClass","setClass"],function(e){l[e]=function(){return l.queue.push({event:e,element:arguments[0],options:arguments[arguments.length-1],args:arguments}),t[e].apply(t,arguments)}}),l}])}]),T.mock.dump=function(e){return function t(e){var n;n=T.isElement(e)?(e=T.element(e),n=T.element("<div></div>"),T.forEach(e,function(e){n.append(T.element(e).clone())}),n.html()):T.isArray(e)?(n=[],T.forEach(e,function(e){n.push(t(e))}),"[ "+n.join(", ")+" ]"):T.isObject(e)?T.isFunction(e.$eval)&&T.isFunction(e.$apply)?a(e):e instanceof Error?e.stack||e.name+": "+e.message:T.toJson(e,!0):String(e);return n}(e);function a(e,t){var n=[(t=t||"  ")+"Scope("+e.$id+"): {"];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&!r.match(/^(\$|this)/)&&n.push("  "+r+": "+T.toJson(e[r]));for(var i=e.$$childHead;i;)n.push(a(i,t+"  ")),i=i.$$nextSibling;return n.push("}"),n.join("\n"+t)}},T.mock.$HttpBackendProvider=function(){this.$get=["$rootScope","$timeout",e]},T.mock.$TimeoutDecorator=["$delegate","$browser",function(e,n){return e.flush=function(e){n.defer.flush(e)},e.verifyNoPendingTasks=function(){if(n.deferredFns.length)throw new Error("Deferred tasks to flush ("+n.deferredFns.length+"): "+(e=n.deferredFns,t=[],T.forEach(e,function(e){t.push("{id: "+e.id+", time: "+e.time+"}")}),t.join(", ")));var e,t},e}],T.mock.$RAFDecorator=["$delegate",function(e){var n=function(e){var t=n.queue.length;return n.queue.push(e),function(){n.queue.splice(t,1)}};return n.queue=[],n.supported=e.supported,n.flush=function(){if(0===n.queue.length)throw new Error("No rAF callbacks present");for(var e=n.queue.length,t=0;t<e;t++)n.queue[t]();n.queue=n.queue.slice(t)},n}],T.mock.$RootElementProvider=function(){this.$get=["$injector",function(e){return l=T.element("<div ng-app></div>").data("$injector",e)}]},T.mock.$ControllerDecorator=["$delegate",function(o){return function(e,t,n,r){if(n&&"object"==typeof n){var i=o(e,t,!0,r);T.extend(i.instance,n);var a=i();return a!==i.instance&&T.extend(a,n),a}return o(e,t,n,r)}}],T.mock.$ComponentControllerProvider=["$compileProvider",function(e){this.$get=["$controller","$injector","$rootScope",function(o,s,c){return function(e,t,n,r){var i=s.get(e+"Directive").filter(function(e){return e.controller&&e.controllerAs&&"E"===e.restrict});if(0===i.length)throw new Error("No component found");if(1<i.length)throw new Error("Too many components found");var a=i[0];return(t=t||{}).$scope=t.$scope||c.$new(!0),o(a.controller,t,n,r||a.controllerAs)}}]}],T.module("ngMock",["ng"]).provider({$browser:T.mock.$BrowserProvider,$exceptionHandler:T.mock.$ExceptionHandlerProvider,$log:T.mock.$LogProvider,$interval:T.mock.$IntervalProvider,$httpBackend:T.mock.$HttpBackendProvider,$rootElement:T.mock.$RootElementProvider,$componentController:T.mock.$ComponentControllerProvider}).config(["$provide",function(e){e.decorator("$timeout",T.mock.$TimeoutDecorator),e.decorator("$$rAF",T.mock.$RAFDecorator),e.decorator("$rootScope",T.mock.$RootScopeDecorator),e.decorator("$controller",T.mock.$ControllerDecorator)}]),T.module("ngMockE2E",["ng"]).config(["$provide",function(e){e.value("$httpBackend",T.injector(["ng"]).get("$httpBackend")),e.decorator("$httpBackend",T.mock.e2e.$httpBackendDecorator)}]),T.mock.e2e={},T.mock.e2e.$httpBackendDecorator=["$rootScope","$timeout","$delegate","$browser",e],T.mock.$RootScopeDecorator=["$delegate",function(e){var t=Object.getPrototypeOf(e);return t.$countChildScopes=function(){var e,t=0,n=[this.$$childHead];for(;n.length;)for(e=n.shift();e;)t+=1,n.push(e.$$childHead),e=e.$$nextSibling;return t},t.$countWatchers=function(){var e,t=this.$$watchers?this.$$watchers.length:0,n=[this.$$childHead];for(;n.length;)for(e=n.shift();e;)t+=e.$$watchers?e.$$watchers.length:0,n.push(e.$$childHead),e=e.$$nextSibling;return t},e}],function(e){if(o.jasmine||o.mocha){var s=null,n=new i,a=[],r=function(){return!!s};T.mock.$$annotate=T.injector.$$annotate,T.injector.$$annotate=function(e){return"function"!=typeof e||e.$inject||a.push(e),T.mock.$$annotate.apply(this,arguments)};var t=o.module=T.mock.module=function(){var e=Array.prototype.slice.call(arguments,0);return r()?t():t;function t(){if(s.$injector)throw new Error("Injector already created, can not register a module!");var t,n=s.$modules||(s.$modules=[]);T.forEach(e,function(e){t=T.isObject(e)&&!T.isArray(e)?["$provide",function(n){T.forEach(e,function(e,t){n.value(t,e)})}]:e,s.$providerInjector?s.$providerInjector.invoke(t):n.push(t)})}};t.$$beforeAllHook=o.before||o.beforeAll,t.$$afterAllHook=o.after||o.afterAll,t.$$currentSpec=function(e){if(0===arguments.length)return e;s=e},t.sharedInjector=function(){if(!t.$$beforeAllHook||!t.$$afterAllHook)throw Error("sharedInjector() cannot be used unless your test runner defines beforeAll/afterAll");var e=!1;t.$$beforeAllHook(function(){if(n.shared)throw n.sharedError=Error("sharedInjector() cannot be called inside a context that has already called sharedInjector()"),n.sharedError;e=!0,s=this,n.shared=!0}),t.$$afterAllHook(function(){e?(n=new i,t.$$cleanup()):n.sharedError=null})},t.$$beforeEach=function(){if(n.shared&&s&&s!=this){var t=s;s=this,T.forEach(["$injector","$modules","$providerInjector","$injectorStrict"],function(e){s[e]=t[e],t[e]=null})}else s=this,l=null,a=[]},t.$$afterEach=function(){n.cleanupAfterEach()&&t.$$cleanup()},t.$$cleanup=function(){var e=s.$injector;if(a.forEach(function(e){delete e.$inject}),T.forEach(s.$modules,function(e){e&&e.$$hashKey&&(e.$$hashKey=void 0)}),s.$injector=null,s.$modules=null,s.$providerInjector=null,s=null,e){var t=e.get("$rootElement"),n=t&&t[0],r=l?[l[0]]:[];!n||l&&n===l[0]||r.push(n),T.element.cleanData(r);var i=e.get("$rootScope");i&&i.$destroy&&i.$destroy()}T.forEach(T.element.fragments,function(e,t){delete T.element.fragments[t]}),x.$$lastInstance=null,T.forEach(T.callbacks,function(e,t){delete T.callbacks[t]}),T.callbacks.$$counter=0},(o.beforeEach||o.setup)(t.$$beforeEach),(o.afterEach||o.teardown)(t.$$afterEach);var c=function(e,t){this.message=e.message,this.name=e.name,e.line&&(this.line=e.line),e.sourceId&&(this.sourceId=e.sourceId),e.stack&&t&&(this.stack=e.stack+"\n"+t.stack),e.stackArray&&(this.stackArray=e.stackArray)};c.prototype=Error.prototype,o.inject=T.mock.inject=function(){var a=Array.prototype.slice.call(arguments,0),o=new Error("Declaration Location");if(!o.stack)try{throw o}catch(e){}return r()?e.call(s):e;function e(){var e=s.$modules||[],t=!!s.$injectorStrict;e.unshift(["$injector",function(e){s.$providerInjector=e}]),e.unshift("ngMock"),e.unshift("ng");var n=s.$injector;n||(t&&T.forEach(e,function(e){"function"==typeof e&&T.injector.$$annotate(e)}),n=s.$injector=T.injector(e,t),s.$injectorStrict=t);for(var r=0,i=a.length;r<i;r++){s.$injectorStrict&&n.annotate(a[r]);try{n.invoke(a[r]||T.noop,this)}catch(e){if(e.stack&&o)throw new c(e,o);throw e}finally{o=null}}}},T.mock.inject.strictDi=function(e){return e=!arguments.length||!!e,r()?t():t;function t(){if(e!==s.$injectorStrict){if(s.$injector)throw new Error("Injector already created, can not modify strict annotations");s.$injectorStrict=e}}}}function i(){this.shared=!1,this.sharedError=null,this.cleanupAfterEach=function(){return!this.shared||this.sharedError}}}()}(window,window.angular),angular.module("templates-angularcronjobs",["cronselection.html"]),angular.module("cronselection.html",[]).run(["$templateCache",function(e){e.put("cronselection.html",'<div class="cron-wrap">\n    <span>Every: </span>\n    <div class="cron-select-wrap">\n        <select class="cron-select" ng-model="myFrequency.base" ng-options="item.value as item.label for item in frequency"></select>\n    </div>\n    <div class="select-options">\n        <span ng-show="myFrequency.base == 4">on </span>\n        <div ng-show="myFrequency.base == 4" class="cron-select-wrap">\n            \x3c!-- If Multiple is Enabled --\x3e\n            <select class="cron-select day-value"\n                    ng-model="myFrequency.dayValues"\n                    ng-if="allowMultiple" multiple\n                    ng-options="value as (value | cronDayName: cronStyle) for value in dayValues">\n            </select>\n            \x3c!-- If Multiple is not Enabled --\x3e\n            <select class="cron-select day-value"\n                    ng-model="myFrequency.dayValues"\n                    ng-if="!allowMultiple"\n                    ng-options="value as (value | cronDayName: cronStyle) for value in dayValues">\n            </select>\n        </div>\n        <span ng-show="myFrequency.base >= 5">on the </span>\n        <div ng-show="myFrequency.base >= 5" class="cron-select-wrap">\n            \x3c!-- If Multiple is Enabled --\x3e\n            <select class="cron-select day-of-month-value"\n                    ng-model="myFrequency.dayOfMonthValues"\n                    ng-if="allowMultiple" multiple\n                    ng-options="value as (value | cronNumeral) for value in dayOfMonthValues">\n            </select>\n            \x3c!-- If Multiple is not Enabled --\x3e\n            <select class="cron-select day-of-month-value"\n                    ng-model="myFrequency.dayOfMonthValues"\n                    ng-if="!allowMultiple"\n                    ng-options="value as (value | cronNumeral) for value in dayOfMonthValues">\n            </select>\n        </div>\n        <span ng-show="myFrequency.base == 6">of </span>\n        \x3c!-- If Multiple is Enabled --\x3e\n        <div ng-show="myFrequency.base == 6" class="cron-select-wrap">\n            <select class="cron-select month-value"\n                    ng-model="myFrequency.monthValues"\n                    ng-if="allowMultiple" multiple\n                    ng-options="value as (value | cronMonthName) for value in monthValues">\n            </select>\n            \x3c!-- If Multiple is not Enabled --\x3e\n            <select class="cron-select month-value"\n                    ng-model="myFrequency.monthValues"\n                    ng-if="!allowMultiple"\n                    ng-options="value as (value | cronMonthName) for value in monthValues">\n            </select>\n        </div>\n        <span ng-show="myFrequency.base >= 2">at </span>\n        \x3c!-- If Multiple is Enabled --\x3e\n        <div ng-show="myFrequency.base >= 3" class="cron-select-wrap">\n            <select class="cron-select hour-value"\n                    ng-model="myFrequency.hourValues"\n                    ng-if="allowMultiple" multiple\n                    ng-options="value as value for value in hourValues">\n            </select>\n            \x3c!-- If Multiple is not Enabled --\x3e\n            <select class="cron-select hour-value"\n                    ng-model="myFrequency.hourValues"\n                    ng-if="!allowMultiple"\n                    ng-options="value as value for value in hourValues">\n            </select>\n        </div>\n        <span ng-show="myFrequency.base >= 3"> : </span>\n        \x3c!-- If Multiple is Enabled --\x3e\n        <div ng-show="myFrequency.base >= 2" class="cron-select-wrap">\n            <select class="cron-select minute-value"\n                    ng-model="myFrequency.minuteValues"\n                    ng-if="allowMultiple" multiple\n                    ng-options="value as value for value in minuteValues">\n            </select>\n            \x3c!-- If Multiple is not Enabled --\x3e\n            <select class="cron-select minute-value"\n                    ng-model="myFrequency.minuteValues"\n                    ng-if="!allowMultiple"\n                    ng-options="value as value for value in minuteValues">\n            </select>\n        </div>\n        <span ng-show="myFrequency.base == 2"> past the hour</span>\n    </div>\n</div>')}]),angular.module("angular-cron-jobs",["templates-angularcronjobs"]),angular.module("angular-cron-jobs").directive("cronSelection",["cronService","baseFrequency",function(u,f){return{restrict:"EA",replace:!0,transclude:!0,require:"ngModel",scope:{ngModel:"=",config:"=",myFrequency:"=?frequency"},templateUrl:function(e,t){return t.template||"cronselection.html"},link:function(r,e,t,i){var a=!1;if(r.baseFrequency=f,r.frequency=[{value:1,label:"Minute"},{value:2,label:"Hour"},{value:3,label:"Day"},{value:4,label:"Week"},{value:5,label:"Month"},{value:6,label:"Year"}],r.$watch("ngModel",function(e){angular.isDefined(e)&&e?(a=!0,r.myFrequency=u.fromCron(e,r.allowMultiple,r.cronStyle)):""===e&&(r.myFrequency=void 0)}),"object"==typeof r.config&&!r.config.length){if("object"==typeof r.config.options){var n=Object.keys(r.config.options);for(var o in n){var s=n[o].replace(/^allow/,""),c=n[o];if(!r.config.options[c])for(var l in r.frequency)r.frequency[l].label===s&&r.frequency.splice(l,1)}}angular.isDefined(r.config.allowMultiple)?r.allowMultiple=r.config.allowMultiple:r.allowMultiple=!1,angular.isDefined(r.config.quartz)&&r.config.quartz?r.cronStyle="quartz":r.cronStyle="default"}r.minuteValues=[0,5,10,15,20,25,30,35,40,45,50,55],r.hourValues=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],r.dayOfMonthValues=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],r.dayValues=[0,1,2,3,4,5,6],r.monthValues=[1,2,3,4,5,6,7,8,9,10,11,12],"quartz"===r.cronStyle&&(r.dayValues=[1,2,3,4,5,6,7]),r.$watch("myFrequency",function(e,t){if(void 0!==e){!e||!e.base||t&&e.base===t.base||a?e&&e.base&&t&&t.base&&(a=!1):function(e){e.base=parseInt(e.base),e.base>=f.hour&&(e.minuteValues=r.minuteValues[0]);e.base>=f.day&&(e.hourValues=r.hourValues[0]);e.base===f.week&&(e.dayValues=r.dayValues[0]);e.base>=f.month&&(e.dayOfMonthValues=r.dayOfMonthValues[0]);e.base===f.year&&(e.monthValues=r.monthValues[0])}(e);var n=u.setCron(e,r.cronStyle);i.$setViewValue(n)}},!0)}}}]).filter("cronNumeral",function(){return function(e){switch(e){case 1:return"1st";case 2:return"2nd";case 3:return"3rd";case 21:return"21st";case 22:return"22nd";case 23:return"23rd";case 31:return"31st";case null:return null;default:return e+"th"}}}).filter("cronMonthName",function(){return function(e){var t={1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"};return null!==e&&angular.isDefined(t[e])?t[e]:null}}).filter("cronDayName",function(){return function(e,t){var n;return n="quartz"===t?{1:"Sunday",2:"Monday",3:"Tuesday",4:"Wednesday",5:"Thursday",6:"Friday",7:"Saturday"}:{0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday"},null!==e&&angular.isDefined(n[e])?n[e]:null}}).directive("ngMultiple",function(){return{restrict:"A",scope:{ngMultiple:"="},link:function(e,t){e.$watch("ngMultiple",function(e){e?t.attr("multiple","multiple"):t.removeAttr("multiple")})}}}),angular.module("angular-cron-jobs").value("baseFrequency",{minute:1,hour:2,day:3,week:4,month:5,year:6}).factory("cronService",["baseFrequency",function(o){var e={setCron:function(e,t){return"quartz"===t?this.setQuartzCron(e):this.setDefaultCron(e)},setQuartzCron:function(e){var t=["0","*","*","*","*","?"];return e&&e.base&&e.base>=o.hour&&(t[1]=void 0!==e.minuteValues?e.minuteValues:"0"),e&&e.base&&e.base>=o.day&&(t[2]=void 0!==e.hourValues?e.hourValues:"*"),e&&e.base&&e.base===o.week&&(t[3]="?",t[5]=e.dayValues),e&&e.base&&e.base>=o.month&&(t[3]=void 0!==e.dayOfMonthValues?e.dayOfMonthValues:"?"),e&&e.base&&e.base===o.year&&(t[4]=void 0!==e.monthValues?e.monthValues:"*"),t.join(" ")},setDefaultCron:function(e){var t=["*","*","*","*","*"];return e&&e.base&&e.base>=o.hour&&(t[0]=void 0!==e.minuteValues?e.minuteValues:"*"),e&&e.base&&e.base>=o.day&&(t[1]=void 0!==e.hourValues?e.hourValues:"*"),e&&e.base&&e.base===o.week&&(t[4]=e.dayValues),e&&e.base&&e.base>=o.month&&(t[2]=void 0!==e.dayOfMonthValues?e.dayOfMonthValues:"*"),e&&e.base&&e.base===o.year&&(t[3]=void 0!==e.monthValues?e.monthValues:"*"),t.join(" ")},fromCron:function(e,t,n){return"quartz"===n?this.fromQuartzCron(e,t):this.fromDefaultCron(e,t)},fromDefaultCron:function(e,t){var n=e.replace(/\s+/g," ").split(" "),r={base:"1"},i=[];if("*"===n[0]&&"*"===n[1]&&"*"===n[2]&&"*"===n[3]&&"*"===n[4]?r.base=o.minute:"*"===n[1]&&"*"===n[2]&&"*"===n[3]&&"*"===n[4]?r.base=o.hour:"*"===n[2]&&"*"===n[3]&&"*"===n[4]?r.base=o.day:"*"===n[2]&&"*"===n[3]?r.base=o.week:"*"===n[3]&&"*"===n[4]?r.base=o.month:"*"===n[4]&&(r.base=o.year),"*"!==n[0])if(t){i=n[0].split(",");for(var a=0;a<i.length;a++)i[a]=+i[a];r.minuteValues=i}else r.minuteValues=parseInt(n[0]);if("*"!==n[1])if(t){i=n[1].split(",");for(a=0;a<i.length;a++)i[a]=+i[a];r.hourValues=i}else r.hourValues=parseInt(n[1]);if("*"!==n[2])if(t){i=n[2].split(",");for(a=0;a<i.length;a++)i[a]=+i[a];r.dayOfMonthValues=i}else r.dayOfMonthValues=parseInt(n[2]);if("*"!==n[3])if(t){i=n[3].split(",");for(a=0;a<i.length;a++)i[a]=+i[a];r.monthValues=i}else r.monthValues=parseInt(n[3]);if("*"!==n[4])if(t){i=n[4].split(",");for(a=0;a<i.length;a++)i[a]=+i[a];r.dayValues=i}else r.dayValues=parseInt(n[4]);return r},fromQuartzCron:function(e,t){var n=e.replace(/\s+/g," ").split(" "),r={base:"1"},i=[];if("*"===n[1]&&"*"===n[2]&&"*"===n[3]&&"*"===n[4]&&"?"===n[5]?r.base=1:"*"===n[2]&&"*"===n[3]&&"*"===n[4]&&"?"===n[5]?r.base=2:"*"===n[3]&&"*"===n[4]&&"?"===n[5]?r.base=3:"?"===n[3]?r.base=4:"*"===n[4]&&"?"===n[5]?r.base=5:"?"===n[5]&&(r.base=6),"*"!==n[1])if(t){i=n[1].split(",");for(var a=0;a<i.length;a++)i[a]=+i[a];r.minuteValues=i}else r.minuteValues=parseInt(n[1]);if("*"!==n[2])if(t){i=n[2].split(",");for(a=0;a<i.length;a++)i[a]=+i[a];r.hourValues=i}else r.hourValues=parseInt(n[2]);if("*"!==n[3]&&"?"!==n[3])if(t){i=n[3].split(",");for(a=0;a<i.length;a++)i[a]=+i[a];r.dayOfMonthValues=i}else r.dayOfMonthValues=parseInt(n[3]);if("*"!==n[4])if(t){i=n[4].split(",");for(a=0;a<i.length;a++)i[a]=+i[a];r.monthValues=i}else r.monthValues=parseInt(n[4]);if("*"!==n[5]&&"?"!==n[5])if(t){i=n[5].split(",");for(a=0;a<i.length;a++)i[a]=+i[a];r.dayValues=i}else r.dayValues=parseInt(n[5]);return r}};return e}]),function(){"use strict";angular.module("ngEmbed",["ngSanitize"]).filter("embed",["$sce",function(c){var l=[{text:":)",class:"smiley",code:"e60a"},{text:":D",class:"happy",code:"e608"},{text:":d",class:"happy",code:"e608"},{text:":(",class:"sad",code:"e60e"},{text:":/",class:"wondering",code:"e620"},{text:":P",class:"tongue",code:"e60c"},{text:":p",class:"tongue",code:"e60c"},{text:"3:)",class:"evil",code:"e618"},{text:"(^)",class:"thumbsup2",code:"e607"},{text:";)",class:"wink",code:"e610"},{text:":o",class:"shocked",code:"e61a"},{text:"-_-",class:"neutral",code:"e61e"},{text:"(y)",class:"thumbs-up",code:"e606"},{text:":*",class:"heart",code:"e604"},{text:"&lt;3",class:"heart",code:"e604"},{text:"<3",class:"heart",code:"e604"},{text:"&lt;/3",class:"heart-broken",code:"e605"},{text:"</3",class:"heart-broken",code:"e605"},{text:"^_^",class:"grin",code:"e612"},{text:"8-)",class:"cool",code:"e614"},{text:"8|",class:"cool",code:"e614"},{text:":S",class:"confused",code:"e61c"},{text:":s",class:"confused",code:"e61c"}],u=["bowtie","smile","laughing","blush","smiley","relaxed","smirk","heart_eyes","kissing_heart","kissing_closed_eyes","flushed","relieved","satisfied","grin","wink","stuck_out_tongue_winking_eye","stuck_out_tongue_closed_eyes","grinning","kissing","winky_face","kissing_smiling_eyes","stuck_out_tongue","sleeping","worried","frowning","anguished","open_mouth","grimacing","confused","hushed","expressionless","unamused","sweat_smile","sweat","wow","disappointed_relieved","weary","pensive","disappointed","confounded","fearful","cold_sweat","persevere","cry","sob","joy","astonished","scream","neckbeard","tired_face","angry","rage","triumph","sleepy","yum","mask","sunglasses","dizzy_face","imp","smiling_imp","neutral_face","no_mouth","innocent","alien","yellow_heart","blue_heart","purple_heart","heart","green_heart","broken_heart","heartbeat","heartpulse","two_hearts","revolving_hearts","cupid","sparkling_heart","sparkles","star","star2","dizzy","boom","collision","anger","exclamation","question","grey_exclamation","grey_question","zzz","dash","sweat_drops","notes","musical_note","fire","hankey","poop","shit","\\+1","thumbsup","-1","thumbsdown","ok_hand","punch","facepunch","fist","v","wave","hand","raised_hand","open_hands","point_up","point_down","point_left","point_right","raised_hands","pray","point_up_2","clap","muscle","metal","fu","walking","runner","running","couple","family","two_men_holding_hands","two_women_holding_hands","dancer","dancers","ok_woman","no_good","information_desk_person","raising_hand","bride_with_veil","person_with_pouting_face","person_frowning","bow","couplekiss","couple_with_heart","massage","haircut","nail_care","boy","girl","woman","man","baby","older_woman","older_man","person_with_blond_hair","man_with_gua_pi_mao","man_with_turban","construction_worker","cop","angel","princess","smiley_cat","smile_cat","heart_eyes_cat","kissing_cat","smirk_cat","scream_cat","crying_cat_face","joy_cat","pouting_cat","japanese_ogre","japanese_goblin","see_no_evil","hear_no_evil","speak_no_evil","guardsman","skull","feet","lips","kiss","droplet","ear","eyes","nose","tongue","love_letter","bust_in_silhouette","busts_in_silhouette","speech_balloon","thought_balloon","feelsgood","finnadie","goberserk","godmode","hurtrealbad","rage1","rage2","rage3","rage4","suspect","trollface","sunny","umbrella","cloud","snowflake","snowman","zap","cyclone","foggy","ocean","cat","dog","mouse","hamster","rabbit","wolf","frog","tiger","koala","bear","pig","pig_nose","cow","boar","monkey_face","monkey","horse","racehorse","camel","sheep","elephant","panda_face","snake","bird","baby_chick","hatched_chick","hatching_chick","chicken","penguin","turtle","bug","honeybee","ant","beetle","snail","octopus","tropical_fish","fish","whale","whale2","dolphin","cow2","ram","rat","water_buffalo","tiger2","rabbit2","dragon","goat","rooster","dog2","pig2","mouse2","ox","dragon_face","blowfish","crocodile","dromedary_camel","leopard","cat2","poodle","paw_prints","bouquet","cherry_blossom","tulip","four_leaf_clover","rose","sunflower","hibiscus","maple_leaf","leaves","fallen_leaf","herb","mushroom","cactus","palm_tree","evergreen_tree","deciduous_tree","chestnut","seedling","blossom","ear_of_rice","shell","globe_with_meridians","sun_with_face","full_moon_with_face","new_moon_with_face","new_moon","waxing_crescent_moon","first_quarter_moon","waxing_gibbous_moon","full_moon","waning_gibbous_moon","last_quarter_moon","waning_crescent_moon","last_quarter_moon_with_face","first_quarter_moon_with_face","moon","earth_africa","earth_americas","earth_asia","volcano","milky_way","partly_sunny","octocat","squirrel","bamboo","gift_heart","dolls","school_satchel","mortar_board","flags","fireworks","sparkler","wind_chime","rice_scene","jack_o_lantern","ghost","santa","christmas_tree","gift","bell","no_bell","tanabata_tree","tada","confetti_ball","balloon","crystal_ball","cd","dvd","floppy_disk","camera","video_camera","movie_camera","computer","tv","iphone","phone","telephone","telephone_receiver","pager","fax","minidisc","vhs","sound","speaker","mute","loudspeaker","mega","hourglass","hourglass_flowing_sand","alarm_clock","watch","radio","satellite","loop","mag","mag_right","unlock","lock","lock_with_ink_pen","closed_lock_with_key","key","bulb","flashlight","high_brightness","low_brightness","electric_plug","battery","calling","email","mailbox","postbox","bath","bathtub","shower","toilet","wrench","nut_and_bolt","hammer","seat","moneybag","yen","dollar","pound","euro","credit_card","money_with_wings","e-mail","inbox_tray","outbox_tray","envelope","incoming_envelope","postal_horn","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","door","smoking","bomb","gun","hocho","pill","syringe","page_facing_up","page_with_curl","bookmark_tabs","bar_chart","chart_with_upwards_trend","chart_with_downwards_trend","scroll","clipboard","calendar","date","card_index","file_folder","open_file_folder","scissors","pushpin","paperclip","black_nib","pencil2","straight_ruler","triangular_ruler","closed_book","green_book","blue_book","orange_book","notebook","notebook_with_decorative_cover","ledger","books","bookmark","name_badge","microscope","telescope","newspaper","football","basketball","soccer","baseball","tennis","8ball","rugby_football","bowling","golf","mountain_bicyclist","bicyclist","horse_racing","snowboarder","swimmer","surfer","ski","spades","hearts","clubs","diamonds","gem","ring","trophy","musical_score","musical_keyboard","violin","space_invader","video_game","black_joker","flower_playing_cards","game_die","dart","mahjong","clapper","memo","pencil","book","art","microphone","headphones","trumpet","saxophone","guitar","shoe","sandal","high_heel","lipstick","boot","shirt","tshirt","necktie","womans_clothes","dress","running_shirt_with_sash","jeans","kimono","bikini","ribbon","tophat","crown","womans_hat","mans_shoe","closed_umbrella","briefcase","handbag","pouch","purse","eyeglasses","fishing_pole_and_fish","coffee","tea","sake","baby_bottle","beer","beers","cocktail","tropical_drink","wine_glass","fork_and_knife","pizza","hamburger","fries","poultry_leg","meat_on_bone","spaghetti","curry","fried_shrimp","bento","sushi","fish_cake","rice_ball","rice_cracker","rice","ramen","stew","oden","dango","egg","bread","doughnut","custard","icecream","ice_cream","shaved_ice","birthday","cake","cookie","chocolate_bar","candy","lollipop","honey_pot","apple","green_apple","tangerine","lemon","cherries","grapes","watermelon","strawberry","peach","melon","banana","pear","pineapple","sweet_potato","eggplant","tomato","corn","house","house_with_garden","school","office","post_office","hospital","bank","convenience_store","love_hotel","hotel","wedding","church","department_store","european_post_office","city_sunrise","city_sunset","japanese_castle","european_castle","tent","factory","tokyo_tower","japan","mount_fuji","sunrise_over_mountains","sunrise","stars","themoreyouknow","tmyk","statue_of_liberty","bridge_at_night","carousel_horse","rainbow","ferris_wheel","fountain","roller_coaster","ship","speedboat","boat","sailboat","rowboat","anchor","rocket","airplane","helicopter","steam_locomotive","tram","mountain_railway","bike","aerial_tramway","suspension_railway","mountain_cableway","tractor","blue_car","oncoming_automobile","car","red_car","taxi","oncoming_taxi","articulated_lorry","bus","oncoming_bus","rotating_light","police_car","oncoming_police_car","fire_engine","ambulance","minibus","truck","train","station","train2","bullettrain_front","bullettrain_side","light_rail","monorail","railway_car","trolleybus","ticket","fuelpump","vertical_traffic_light","traffic_light","warning","construction","beginner","atm","slot_machine","busstop","barber","hotsprings","checkered_flag","crossed_flags","izakaya_lantern","moyai","circus_tent","performing_arts","round_pushpin","triangular_flag_on_post","jp","kr","cn","us","fr","es","it","ru","gb","uk","de","one","two","three","four","five","six","seven","eight","nine","keycap_ten","1234","zero","hash","symbols","arrow_backward","arrow_down","arrow_forward","arrow_left","capital_abcd","abcd","abc","arrow_lower_left","arrow_lower_right","arrow_right","arrow_up","arrow_upper_left","arrow_upper_right","arrow_double_down","arrow_double_up","arrow_down_small","arrow_heading_down","arrow_heading_up","leftwards_arrow_with_hook","arrow_right_hook","left_right_arrow","arrow_up_down","arrow_up_small","arrows_clockwise","arrows_counterclockwise","rewind","fast_forward","information_source","ok","twisted_rightwards_arrows","repeat","repeat_one","new","top","up","cool","free","ng","cinema","koko","signal_strength","u5272","u5408","u55b6","u6307","u6708","u6709","u6e80","u7121","u7533","u7a7a","u7981","sa","restroom","mens","womens","baby_symbol","no_smoking","parking","wheelchair","metro","baggage_claim","accept","wc","potable_water","put_litter_in_its_place","secret","congratulations","m","passport_control","left_luggage","customs","ideograph_advantage","cl","sos","id","no_entry_sign","underage","no_mobile_phones","do_not_litter","non-potable_water","no_bicycles","no_pedestrians","children_crossing","no_entry","eight_spoked_asterisk","eight_pointed_black_star","heart_decoration","vs","vibration_mode","mobile_phone_off","chart","currency_exchange","aries","taurus","gemini","cancer","leo","virgo","libra","scorpius","sagittarius","capricorn","aquarius","pisces","ophiuchus","six_pointed_star","negative_squared_cross_mark","a","b","ab","o2","diamond_shape_with_a_dot_inside","recycle","end","on","soon","clock1","clock130","clock10","clock1030","clock11","clock1130","clock12","clock1230","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","heavy_dollar_sign","copyright","registered","tm","x","heavy_exclamation_mark","bangbang","interrobang","o","heavy_multiplication_x","heavy_plus_sign","heavy_minus_sign","heavy_division_sign","white_flower","100","heavy_check_mark","ballot_box_with_check","radio_button","link","curly_loop","wavy_dash","part_alternation_mark","trident","black_square","white_square","white_check_mark","black_square_button","white_square_button","black_circle","white_circle","red_circle","large_blue_circle","large_blue_diamond","large_orange_diamond","small_blue_diamond","small_orange_diamond","small_red_triangle","small_red_triangle_down","shipit"];return function(e,t){var n={fontSmiley:!0,emoji:!0,link:!0,linkTarget:"_self"};if(function n(r){return angular.forEach(arguments,function(e){e!==r&&angular.forEach(e,function(e,t){r[t]&&r[t].constructor&&r[t].constructor===Object?n(r[t],e):r[t]=e})}),r}(n,t),null!=e){if("object"==typeof e)return e;var r,i,a,o,s={"&":"&amp;",">":"&gt;","<":"&lt;"};return angular.isNumber(e)||(e=e.toString()),e=e.replace(/[&<>]/g,function(e){return s[e]}),n.fontSmiley&&(r=e.split(" "),angular.forEach(l,function(e){for(var t=0;t<r.length;t++)r[t]===e.text&&(r[t]='<i class="ne-emoticon" title="'+e.text+'">&#x'+e.code+"</i>")}),e=r.join(" ")),n.emoji&&(i=e,a=new RegExp(":("+u.join("|")+"):","g"),e=i.replace(a,function(e,t){return"<i class='emoticon emoticon-"+t+"' title=':"+t+":'></i>"})),n.link&&(o=/^[a-z]+\:\/\//i,e=e.replace(/\b(?:(https?|ftp|file):\/\/|www\.)[-A-Z0-9+()&@$#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]/gi,function(e){var t=e;return o.test(e)||(t="http://"+e),"cordova"==n.linkTarget?'<a href="#" onclick="window.open(\''+t+"', '_system', 'location=yes')\" >"+e+"</a>":'<a href="'+t+'" target="'+n.linkTarget+'">'+e+"</a>"})),c.trustAsHtml(e)}}}]).directive("ngEmbed",["$filter","$sce","$http","$timeout","$templateCache",function(w,C,A,S,e){return e.put("",'<div ng-bind-html="neText"></div> <div class="ne-video" ng-if="video.host" class="fade"> <div class="ne-video-preview" ng-hide="nePlayVideo || !options.video.details"> <div class="ne-video-thumb" ng-click="nePlayVideo=!nePlayVideo"> <img ng-src="{{video.thumbnail}}" alt=""/> <i class="fa fa-play-circle-o"></i> </div> <div class="ne-video-detail"> <div class="ne-video-title"> <a ng-href="{{video.url}}">{{video.title}}</a> </div> <div class="ne-video-desc"> {{video.description}} </div> <div class="ne-video-stats"> <span><i class="fa fa-eye"></i> {{video.views}}</span> <span><i class="fa fa-heart"></i> {{video.likes}}</span> </div> </div> </div> <div class="ne-video-player" ng-if="nePlayVideo || !(options.video.details)"> <iframe ng-src="{{video.embedSrc}}" frameBorder="0" width="{{video.width}}" height="{{video.height}}" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> </div> </div> <div class="ne-video" ng-if="video.basic"> <div class="ne-video-player"> <div class="player"> <video ng-src="{{video.basic}}" controls></video> </div> </div> </div> <div ng-init="neImageLong=false" ng-class="{false:\'ne-image\', true:\'ne-image ne-image-long\'}[neImageLong]" ng-if="image.url"> <div class="ne-image-wrapper"> <img ng-src="{{image.url}}" ng-click="neImageLong=!neImageLong" alt=""/> </div> </div> <div class="ne-pdf" ng-if="pdf.url"> <div class="ne-pdf-preview" ng-hide="neShowPdf"> <div class="ne-pdf-icon"> <i class="fa fa-file-pdf-o"></i> </div> <div class="ne-pdf-detail" > <div class="ne-pdf-title"> <a href="">{{pdf.url}}</a> </div> <div class="ne-pdf-view"> <button><i class="fa fa-download"></i> <a ng-href="{{pdf.url}}" target="_blank">Download</a></button> <button ng-click="neShowPdf=!neShowPdf"><i class="fa fa-eye"></i> View PDF</button> </div> </div> </div> <div class="ne-pdf-viewer" ng-if="neShowPdf" ng-show="neShowPdf"> <iframe ng-src="{{pdf.url}}" frameBorder="0"></iframe> </div> </div> <div class="ne-audio" ng-if="audio.url"> <audio ng-src="{{audio.url}}" controls></audio> </div> <div ng-if="tweets" ng-repeat="tweet in tweets"> <div ng-bind-html="tweet"></div> </div> <div ng-if="videoServices" class="ne-video" ng-repeat="v in videoServices"> <div class="ne-video-player"> <div class="player"> <div ng-bind-html="v"></div> </div> </div> </div> <div ng-if="audioServices" class="ne-audio" ng-repeat="a in audioServices"> <div ng-bind-html="a"></div> </div> <div ng-if="codeServices" class="ne-embed" ng-repeat="c in codeServices"> <div ng-bind-html="c"></div> </div> <div ng-if="gist" class="ne-gist" ng-repeat="g in gist"> <ne-gist id="{{g}}"></ne-gist> </div>'),{restrict:"AE",scope:!0,templateUrl:function(e,t){return t.embedTemplateUrl||""},link:function(s,e,t){var n=s.$eval(t.embedData),r=s.$eval(t.embedOptions);s.video={},s.image={},s.pdf={},s.audio={},s.videoServices=[],s.audioServices=[],s.codeServices=[];var i={fontSmiley:!0,emoji:!0,link:!0,linkTarget:"_self",pdf:{embed:!0},image:{embed:!(s.gist=[])},audio:{embed:!0},code:{highlight:!0,lineNumbers:!1},basicVideo:!1,gdevAuth:null,video:{embed:!1,width:null,height:null,ytTheme:"dark",details:!1,thumbnailQuality:"medium"},tweetEmbed:!0,tweetOptions:{maxWidth:550,hideMedia:!1,hideThread:!1,align:"none",lang:"en"},twitchtvEmbed:!0,dailymotionEmbed:!0,tedEmbed:!0,dotsubEmbed:!0,liveleakEmbed:!0,soundCloudEmbed:!0,soundCloudOptions:{height:160,themeColor:"f50000",autoPlay:!1,hideRelated:!1,showComments:!0,showUser:!0,showReposts:!1,visual:!1,download:!1},spotifyEmbed:!0,codepenEmbed:!0,codepenHeight:300,jsfiddleEmbed:!0,jsfiddleHeight:300,jsbinEmbed:!0,jsbinHeight:300,plunkerEmbed:!0,githubgistEmbed:!0,ideoneEmbed:!0,ideoneHeight:300};!function n(r){return angular.forEach(arguments,function(e){e!==r&&angular.forEach(e,function(e,t){r[t]&&r[t].constructor&&r[t].constructor===Object?n(r[t],e):r[t]=e})}),r}(i,r),String.prototype.trunc=function(e,t){var n=this.length>e,r=n?this.substr(0,e-1):this;return r=t&&n?r.substr(0,r.lastIndexOf(" ")):r,n?r+"...":r},Array.prototype.getUnique=function(){for(var e={},t=[],n=0,r=this.length;n<r;++n)e.hasOwnProperty(this[n])||(t.push(this[n]),e[this[n]]=1);return t};var c={calcDimensions:function(e){var t={width:null,height:null};return t.width=e.video.width,t.height=e.video.height,e.video.height&&e.video.width||(e.video.height?t.width=e.video.height/390*640:e.video.width?t.height=t.width/640*390:(t.width=640,t.height=390)),t},embed:function(e,r){if(e.match(/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com(?:\/embed\/|\/v\/|\/watch\?v=|\/ytscreeningroom\?v=|\/feeds\/api\/videos\/|\/user\S*[^\w\-\s]|\S*[^\w\-\s]))([\w\-]{11})[?=&+%\w-]*/gi)){var i=this.calcDimensions(r);return s.video.id=RegExp.$1,r.video.details?A.get("https://www.googleapis.com/youtube/v3/videos?id="+RegExp.$1+"&key="+r.gdevAuth+"&part=snippet,statistics").success(function(e){var t=void 0===r.video.autoPlay||!0===r.video.autoPlay?"?autoplay=1":"?autoplay=0",n=e.items[0];s.video.host="youtube",s.video.title=n.snippet.title,s.video.thumbnail=n.snippet.thumbnails.medium.url,s.video.description=n.snippet.description.trunc(250,!0).replace(/\n/g," ").replace(/&#10;/g," "),s.video.rawDescription=n.snippet.description,s.video.views=n.statistics.viewCount,s.video.likes=n.statistics.likeCount,s.video.uploader=n.snippet.channelTitle,s.video.uploaderPage="https://www.youtube.com/channel/"+n.snippet.channelId,s.video.uploadDate=n.snippet.publishedAt,s.video.url=C.trustAsResourceUrl("https://www.youtube.com/watch?v="+n.id),s.video.embedSrc=C.trustAsResourceUrl("https://www.youtube.com/embed/"+s.video.id+t),s.video.width=i.width,s.video.height=i.height}):(s.video.width=i.width,s.video.height=i.height,s.video.host="youtube",s.video.embedSrc=C.trustAsResourceUrl("https://www.youtube.com/embed/"+RegExp.$1+"?autoplay=0")),e}if(e.match(/https?:\/\/(?:www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|)(\d+)(?:$|\/|\?)*/gi)){var n=this.calcDimensions(r);s.video.id=RegExp.$3,r.video.details?A.get("https://vimeo.com/api/v2/video/"+RegExp.$3+".json").success(function(e){var t=void 0===r.video.autoPlay||!0===r.video.autoPlay?"&autoplay=1":"&autoplay=0";s.video.host="vimeo",s.video.title=e[0].title,s.video.rawDescription=e[0].description.replace(/\n/g,"<br/>").replace(/&#10;/g,"<br/>"),s.video.description=e[0].description.replace(/((<|&lt;)br\s*\/*(>|&gt;)\r\n)/g," ").trunc(250,!0),s.video.thumbnail=e[0].thumbnail_medium,s.video.views=e[0].stats_number_of_plays,s.video.likes=e[0].stats_number_of_likes,s.video.uploader=e[0].user_name,s.video.uploaderPage=e[0].user_url,s.video.uploadDate=e[0].uploadDate,s.video.url=e[0].url,s.video.embedSrc=C.trustAsResourceUrl("//player.vimeo.com/video/"+e[0].id+"?title=0&byline=0&portrait=0"+t),s.video.width=n.width,s.video.height=n.height}):(s.video.width=n.width,s.video.height=n.height,s.video.host="vimeo",s.video.embedSrc=C.trustAsResourceUrl("//player.vimeo.com/video/"+RegExp.$3+"?title=0&byline=0&portrait=0&autoplay=0"))}return e},embedBasic:function(e){return e.match(/((?:https?):\/\/\S*\.(?:ogv|webm|mp4))/gi)&&(s.video.basic=C.trustAsResourceUrl(RegExp.$1)),e},twitchtvEmbed:function(e,t){var n=/www.twitch.tv\/[a-zA_Z0-9_]+/gi,r=e.match(n)?e.match(n).getUnique():null,i=c.calcDimensions(t);if(r)for(var a=0;a<r.length;){var o=C.trustAsHtml('<object bgcolor="#000000" data="//www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf" height="'+i.height+'" id="clip_embed_player_flash" type="application/x-shockwave-flash" width="'+i.width+'"><param name="movie" value="http://www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf" /><param name="allowScriptAccess" value="always" /><param name="allowNetworking" value="all" /><param name="allowFullScreen" value="true" /><param name="flashvars" value="channel='+r[a].split("/")[1]+'&auto_play=false" /></object>');s.videoServices.push(o),a++}return e},dailymotionEmbed:function(e,t){var n=/dailymotion.com\/video\/[a-zA-Z0-9-_]+/gi,r=e.match(n)?e.match(n).getUnique():null,i=c.calcDimensions(t);if(r)for(var a=0;a<r.length;){var o=C.trustAsHtml('<iframe src="http://www.dailymotion.com/embed/video/'+r[a].split("/")[2]+'" height="'+i.height+'" width="'+i.width+'"></iframe>');s.videoServices.push(o),a++}return e},tedEmbed:function(e,t){var n=/ted.com\/talks\/[a-zA-Z0-9_]+/gi,r=e.match(n)?e.match(n).getUnique():null,i=c.calcDimensions(t);if(r)for(var a=0;a<r.length;){var o=C.trustAsHtml('<iframe src="https://embed.ted.com/talks/'+r[a].split("/")[2]+'.html" height="'+i.height+'" width="'+i.width+'"></iframe>');s.videoServices.push(o),a++}return e},dotsubEmbed:function(e,t){var n=/dotsub.com\/view\/[a-zA-Z0-9-]+/gi,r=e.match(n)?e.match(n).getUnique():null,i=c.calcDimensions(t);if(r)for(var a=0;a<r.length;){var o=C.trustAsHtml('<iframe src="https://dotsub.com/media/'+r[a].split("/")[2]+'/embed/" width="'+i.width+'" height="'+i.height+'"></iframe>');s.videoServices.push(o),a++}return e},liveleakEmbed:function(e,t){var n=/liveleak.com\/view\?i=[a-zA-Z0-9_]+/gi,r=e.match(n)?e.match(n).getUnique():null,i=c.calcDimensions(t);if(r)for(var a=0;a<r.length;){var o=C.trustAsHtml('<iframe src="http://www.liveleak.com/e/'+r[a].split("=")[1]+'" height="'+i.height+'" width="'+i.width+'"></iframe></div>');s.videoServices.push(o),a++}return e}},a=function(e){return e.match(/((?:https?):\/\/\S*\.(?:wav|mp3|ogg))/gi)&&(s.audio.url=C.trustAsResourceUrl(RegExp.$1)),e},o=function(e,t){var n=/soundcloud.com\/[a-zA-Z0-9-_]+\/[a-zA-Z0-9-_]+/gi,r=e.match(n)?e.match(n).getUnique():null;if(r)for(var i=0;i<r.length;){var a=C.trustAsHtml('<iframe height="160" scrolling="no" src="https://w.soundcloud.com/player/?url=https://'+r[i]+"&auto_play="+t.soundCloudOptions.autoPlay+"&hide_related="+t.soundCloudOptions.hideRelated+"&show_comments="+t.soundCloudOptions.showComments+"&show_user="+t.soundCloudOptions.showUser+"&show_reposts="+t.soundCloudOptions.showReposts+"&visual="+t.soundCloudOptions.visual+"&download="+t.soundCloudOptions.download+"&color="+t.soundCloudOptions.themeColor+"&theme_color="+t.soundCloudOptions.themeColor+'"></iframe>');s.videoServices.push(a),i++}return e},l=function(e){var t=/spotify.com\/track\/[a-zA-Z0-9_]+/gi,n=e.match(t)?e.match(t).getUnique():null;if(n)for(var r=0;r<n.length;){var i=C.trustAsHtml('<iframe src="https://embed.spotify.com/?uri=spotify:track:'+n[r].split("/")[2]+'" height="80"></iframe>');s.audioServices.push(i),r++}return e},u=function(e){return e.match(/((?:https?):\/\/\S*\.(?:gif|jpg|jpeg|tiff|png|svg|webp))/gi)&&(s.image.url=RegExp.$1),e},f=function(e){return e=e.replace(/(`+)(\s|[a-z]+)\s*([\s\S]*?[^`])\s*\1(?!`)/gm,function(e,t,n,r){var i=r;i=(i=(i=i.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,"")).replace(/:\/\//g,"~P");var a=[];return n&&a.push(n),'<pre><code class="ne-code hljs '+n+'">'+hljs.highlightAuto(i,a).value+"</code></pre>"})},d=function(e){return e.match(/((?:https?):\/\/\S*\.(?:pdf|PDF))/gi)&&(s.pdf.url=C.trustAsResourceUrl(RegExp.$1)),e},h=function(e,t){if(!window.twttr)throw new ReferenceError("twttr is not defined. Load http://platform.twitter.com/widgets.js");var n=/https:\/\/twitter\.com\/\w+\/\w+\/\d+/gi,r=e.match(n)?e.match(n).getUnique():null;if(s.tweets=[],r)for(var i=0;i<r.length;){var a="https://api.twitter.com/1/statuses/oembed.json?omit_script=true&callback=JSON_CALLBACK&url="+r[i]+"&maxwidth="+t.tweetOptions.maxWidth+"&hide_media="+t.tweetOptions.hideMedia+"&hide_thread="+t.tweetOptions.hideThread+"&align="+t.tweetOptions.align+"&lang="+t.tweetOptions.lang;A.jsonp(a).success(function(e){s.tweets.push(e.html),s.tweets.length==r.length&&S(function(){twttr.widgets.load()},10)}),i++}return e},p=function(e,t){var n=/http:\/\/codepen.io\/([A-Za-z0-9_]+)\/pen\/([A-Za-z0-9_]+)/gi,r=e.match(n)?e.match(n).getUnique():null;if(r)for(var i=0;i<r.length;){var a=C.trustAsHtml('<iframe scrolling="no" height="'+t.codepenHeight+'" src="'+r[i].replace(/\/pen\//,"/embed/")+"/?height="+t.codepenHeight+'" frameborder="no" allowtransparency="true" allowfullscreen="true"></iframe>');s.codeServices.push(a),i++}return e},m=function(e,t){var n=/jsfiddle.net\/[a-zA-Z0-9_]+\/[a-zA-Z0-9_]+/gi,r=e.match(n)?e.match(n).getUnique():null;if(r)for(var i=0;i<r.length;){var a=C.trustAsHtml('<iframe height="'+t.jsfiddleHeight+'" src="http://'+r[i]+'/embedded"></iframe>');s.codeServices.push(a),i++}return e},g=function(e,t){var n=/jsbin.com\/[a-zA-Z0-9_]+\/[0-9_]+/gi,r=e.match(n)?e.match(n).getUnique():null;if(r)for(var i=0;i<r.length;){var a=C.trustAsHtml('<iframe height="'+t.jsbinHeight+'" class="jsbin-embed foo" src="http://'+r[i]+'/embed?html,js,output">Simple Animation Tests</iframe>');s.codeServices.push(a),i++}return e},_=function(e,t){var n=/plnkr.co\/edit\/[a-zA-Z0-9\?=]+/gi,r=e.match(n)?e.match(n).getUnique():null;if(r)for(var i=0;i<r.length;){var a=-1===r[i].indexOf("?")?r[i].split("/")[2]:r[i].split("/")[2].split("?")[0],o=C.trustAsHtml('<iframe class="ne-plunker" src="http://embed.plnkr.co/'+a+'" height="'+t.jsbinHeight+'"></iframe>');s.codeServices.push(o),i++}return e},b=function(e){var t=/gist.github.com\/[a-zA-Z0-9_-]+\/([a-zA-Z0-9]+)/g,n=e.match(t)?e.match(t).getUnique():null;if(n)for(var r=0;r<n.length;)s.gist.push(n[r].split("/")[2]),r++;return e},v=function(e,t){var n=/ideone.com\/[a-zA-Z0-9]{6}/gi,r=e.match(n)?e.match(n).getUnique():null;if(r)for(var i=0;i<r.length;){var a=C.trustAsHtml('<iframe src="http://ideone.com/embed/'+r[i].split("/")[1]+'" height="'+t.ideoneHeight+'"></iframe>');s.codeServices.push(a),i++}return e};if(i.code.highlight){if(!window.hljs)throw new ReferenceError("hlsj (Highlight JS is not defined.");n=f(n),S(function(){i.code.lineNumbers&&angular.element(".ne-code").each(function(){var e=1,t=$(this).text().split("\n").length,n=$("<ul/>").addClass("pre-numbering");for(angular.element(this).addClass("has-numbering").parent().append(n);e<=t;e++)n.append(angular.element("<li/>").text(e))})},0)}var y=w("embed")(n,i).$$unwrapTrustedValue();if(i.video.embed){if(!i.gdevAuth)throw"Youtube authentication key is required to get data from youtube.";y=c.embed(y,i)}y=i.basicVideo?c.embedBasic(y):y,y=i.audio.embed?a(y):y,y=i.image.embed?u(y):y,y=i.pdf.embed?d(y):y,y=i.tweetEmbed?h(y,i):y,y=i.twitchtvEmbed?c.twitchtvEmbed(y,i):y,y=i.dailymotionEmbed?c.dailymotionEmbed(y,i):y,y=i.tedEmbed?c.tedEmbed(y,i):y,y=i.dotsubEmbed?c.dotsubEmbed(y,i):y,y=i.liveleakEmbed?c.liveleakEmbed(y,i):y,y=i.soundCloudEmbed?o(y,i):y,y=i.spotifyEmbed?l(y):y,y=i.codepenEmbed?p(y,i):y,y=i.jsfiddleEmbed?m(y,i):y,y=i.jsbinEmbed?g(y,i):y,y=i.plunkerEmbed?_(y,i):y,y=i.githubgistEmbed?b(y,i):y,y=i.ideoneEmbed?v(y,i):y,s.neText=C.trustAsHtml(y)}}}]).directive("neGist",function(){return{restrict:"EA",replace:!0,template:"<div></div>",link:function(e,t,n){var r=n.id,i=document.createElement("iframe");i.setAttribute("width","100%"),i.setAttribute("frameborder","0"),i.id="gist-"+r,t[0].appendChild(i);var a='<html><head><base target="_parent"><style>table{font-size:12px;}</style></head><body onload="parent.document.getElementById(\''+i.id+'\').style.height=document.body.scrollHeight + \'px\'" style="margin:10px 0;"><script type="text/javascript">!function(){"use strict";window.retargetLinks=function(){ var gists=document.getElementsByClassName("gist");for(var i=0,links;i<gists.length;i++){links=gists[i].getElementsByTagName("a");for(var j=0;j<links.length;j++){ links[j].setAttribute("target","_blank");}}}}();<\/script><script type="text/javascript" src="https://gist.github.com/'+r+'.js" onload="retargetLinks()"><\/script></body></html>',o=i.document;i.contentDocument?o=i.contentDocument:i.contentWindow&&(o=i.contentWindow.document),o.open(),o.writeln(a),o.close()}}})}(),function(){"use strict";angular.module("material.components.expansionPanels",["material.core"])}(),function(){"use strict";angular.module("material.components.expansionPanels").run(["$templateCache",function(e){e.put("icons/ic_keyboard_arrow_right_black_24px.svg",'<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n    <path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/>\n    <path d="M0-.25h24v24H0z" fill="none"/>\n</svg>')}])}(),function(){"use strict";angular.module("material.components.expansionPanels").directive("mdExpansionPanel",function(){return{restrict:"E",require:["mdExpansionPanel","?^^mdExpansionPanelGroup"],scope:!0,compile:function(e,t){var n="Invalid HTML for md-expansion-panel: ";if(e.attr("tabindex",t.tabindex||"0"),null===e[0].querySelector("md-expansion-panel-collapsed"))throw Error(n+"Expected a child element of `md-epxansion-panel-collapsed`");if(null!==e[0].querySelector("md-expansion-panel-expanded"))return function(e,t,n,r){var i=r[0],a=r[1];i.epxansionPanelGroupCtrl=a||void 0,i.init()};throw Error(n+"Expected a child element of `md-epxansion-panel-expanded`")},controller:["$scope","$element","$attrs","$window","$$rAF","$mdConstant","$mdUtil","$mdComponentRegistry","$timeout","$q","$animate","$parse",function(n,r,e,i,t,a,o,s,c,l,u,f){var d,h,p,m,g,_,b,v,y,w,C,A=this,S=!1,T=!1,x=!1,k=!1,E=t.throttle(function(e){var t,n,r;r=!0===h.setHeight?h.$element[0].getBoundingClientRect():_.getBoundingClientRect();var i=w?w.getBoundingClientRect().top:0;t=Math.max(r.top,0),n=t+r.height,m&&!1===m.noSticky&&m.onScroll(t,n,i);p&&!1===p.noSticky&&p.onScroll(t,n,i)}),D=t.throttle(function(){var e=r[0].offsetWidth;m&&!1===m.noSticky&&m.onResize(e);p&&!1===p.noSticky&&p.onResize(e)});A.registerCollapsed=function(e){d=e},A.registerExpanded=function(e){h=e},A.registerHeader=function(e){p=e},A.registerFooter=function(e){m=e},void 0===e.mdComponentId?(e.$set("mdComponentId","_expansion_panel_id_"+o.nextUid()),P()):e.$observe("mdComponentId",function(){P()});A.$element=r,A.expand=$,A.collapse=O,A.remove=R,A.destroy=F,A.onRemove=N,A.init=function(){(S=!0)===T&&P()},void 0!==e.ngDisabled?n.$watch(e.ngDisabled,function(e){k=e,r.attr("tabindex",k?-1:0)}):void 0!==e.disabled&&(k=void 0!==e.disabled&&"false"!==e.disabled&&!1!==e.disabled,r.attr("tabindex",k?-1:0));function I(e){var t=a.KEY_CODE;switch(e.keyCode){case t.ENTER:$();break;case t.ESCAPE:O()}}function P(){!1!==S?("function"==typeof g&&(g(),g=void 0),A.componentId&&A.epxansionPanelGroupCtrl&&A.epxansionPanelGroupCtrl.removePanel(A.componentId),void 0===e.mdComponentId&&e.$set("mdComponentId","_expansion_panel_id_"+o.nextUid()),A.componentId=e.mdComponentId,g=s.register({expand:$,collapse:O,remove:R,onRemove:N,isOpen:M,addClickCatcher:B,removeClickCatcher:U,componentId:e.mdComponentId},e.mdComponentId),A.epxansionPanelGroupCtrl&&A.epxansionPanelGroupCtrl.addPanel(A.componentId,{expand:$,collapse:O,remove:R,onRemove:N,destroy:F,isOpen:M})):T=!0}function M(){return x}function $(e){if(!0!==x&&!0!==k){x=!0,e=e||{};var t=l.defer();return A.epxansionPanelGroupCtrl&&A.epxansionPanelGroupCtrl.expandPanel(A.componentId),r.removeClass("md-close"),r.addClass("md-open"),!1===e.animation?r.addClass("md-no-animation"):r.removeClass("md-no-animation"),function(){if(!(m&&!0!==m.noSticky||p&&!0!==p.noSticky))return;b=n.$watch(function(){return r[0].offsetTop},E,!0),v=n.$watch(function(){return r[0].offsetWidth},D,!0),"MD-CONTENT"===(_=o.getNearestContentElement(r)).nodeName?(w=function(e){var t=e.parentNode;for(;t&&t!==document;){if(j(t,"transform"))return t;t=t.parentNode}return}(_),angular.element(_).on("scroll",E)):w=void 0;!0===h.setHeight&&h.$element.on("scroll",E);angular.element(i).on("scroll",E).on("resize",E).on("resize",D)}(),d.hide(e),h.show(e),p&&p.show(e),m&&m.show(e),c(function(){t.resolve()},!1===e.animation?0:H),t.promise}}function O(e){if(!1!==x){x=!1,e=e||{};var t=l.defer();return r.addClass("md-close"),r.removeClass("md-open"),!1===e.animation?r.addClass("md-no-animation"):r.removeClass("md-no-animation"),G(),d.show(e),h.hide(e),p&&p.hide(e),m&&m.hide(e),c(function(){t.resolve()},!1===e.animation?0:H),t.promise}}function R(e){e=e||{};var t=l.defer();return A.epxansionPanelGroupCtrl&&A.epxansionPanelGroupCtrl.removePanel(A.componentId),"function"==typeof g&&(g(),g=void 0),!1===e.animation||!1===x?(n.$destroy(),r.remove(),t.resolve(),L()):(O(),c(function(){n.$destroy(),r.remove(),t.resolve(),L()},H)),t.promise}function N(e){y=e}function L(){"function"==typeof y&&(y(),y=void 0)}function F(){n.$destroy()}function G(){"function"==typeof b&&(b(),b=void 0),"function"==typeof v&&(v(),v=void 0),_&&"MD-CONTENT"===_.nodeName&&angular.element(_).off("scroll",E),!0===h.setHeight&&h.$element.off("scroll",E),angular.element(i).off("scroll",E).off("resize",E).off("resize",D)}function j(e,t){var n=!1;if(e){var r=i.getComputedStyle(e);n=void 0!==r[t]&&"none"!==r[t]}return n}function B(e){(C=o.createBackdrop(n))[0].tabIndex=-1,"function"==typeof e&&C.on("click",e),u.enter(C,r.parent(),null,{duration:0}),r.css("z-index",60)}function U(){C&&(C.remove(),C.off("click"),C=void 0,r.css("z-index",""))}r.on("focus",function(e){r.on("keydown",I)}).on("blur",function(e){r.off("keydown",I)}),n.$panel={collapse:O,expand:$,remove:R,isOpen:M},n.$on("$destroy",function(){U(),"function"==typeof g&&(g(),g=void 0),G()})}]}});var H=180}(),function(){"use strict";function e(n,r,i){var t={find:a,waitFor:function(e){return n.when(e).catch(i.error)}};return function(e){return void 0===e?t:a(e)};function a(e){var t=n.get(e);if(t)return t;i.error(r.supplant("ExpansionPanel '{0}' is not available! Did you use md-component-id='{0}'?",[e||""]))}}angular.module("material.components.expansionPanels").factory("$mdExpansionPanel",e),e.$inject=["$mdComponentRegistry","$mdUtil","$log"]}(),function(){"use strict";function e(i,a){return{restrict:"E",require:"^^mdExpansionPanel",link:function(e,n,t,r){r.registerCollapsed({show:function(e){n.css("display",""),n.css("width",n[0].parentNode.offsetWidth+"px");var t={addClass:"md-show",from:{opacity:0},to:{opacity:1}};!1===e.animation&&(t.duration=0);i(n,t).start().then(function(){r.$element.css("transition","none"),n.removeClass("md-absolute md-show"),n.css("width",""),r.$element.css("min-height",""),a(function(){r.$element.css("transition","")},0)})},hide:function(e){n.css("width",n[0].offsetWidth+"px"),r.$element.css("min-height",n[0].offsetHeight+"px");var t={addClass:"md-absolute md-hide",from:{opacity:1},to:{opacity:0}};!1===e.animation&&(t.duration=0);i(n,t).start().then(function(){n.removeClass("md-hide"),n.css("display","none")})}}),n.on("click",function(){r.expand()})}}}angular.module("material.components.expansionPanels").directive("mdExpansionPanelCollapsed",e),e.$inject=["$animateCss","$timeout"]}(),function(){"use strict";function e(a,o){return{restrict:"E",require:"^^mdExpansionPanel",link:function(e,r,t,n){var i=t.height||void 0;void 0!==i&&(i=i.replace("px","")+"px");n.registerExpanded({show:function(e){r.css("display",""),r.addClass("md-show md-overflow");var t={from:{"max-height":"48px",opacity:0},to:{"max-height":i||r[0].scrollHeight+"px",opacity:1}};!1===e.animation&&(t.duration=0);a(r,t).start().then(function(){void 0!==i?r.addClass("md-scroll-y"):(r.css("transition","none"),r.css("max-height","none"),o(function(){r.css("transition","")},0)),r.removeClass("md-overflow")})},hide:function(e){var t=i||r[0].scrollHeight+"px";r.addClass("md-hide md-overflow"),r.removeClass("md-show md-scroll-y");var n={from:{"max-height":t,opacity:1},to:{"max-height":"48px",opacity:0}};!1===e.animation&&(n.duration=0);a(r,n).start().then(function(){r.css("display","none"),r.removeClass("md-hide")})},setHeight:void 0!==i,$element:r})}}}angular.module("material.components.expansionPanels").directive("mdExpansionPanelExpanded",e),e.$inject=["$animateCss","$timeout"]}(),function(){"use strict";angular.module("material.components.expansionPanels").directive("mdExpansionPanelFooter",function(){return{restrict:"E",transclude:!0,template:'<div class="md-expansion-panel-footer-container" ng-transclude></div>',require:"^^mdExpansionPanel",link:function(e,a,t,o){var s=!1,n=void 0!==t.mdNoSticky,c=angular.element(a[0].querySelector(".md-expansion-panel-footer-container"));function l(){s=!1,c.css("width",""),c.css("top",""),a.css("height",""),a.removeClass("md-stick")}o.registerFooter({show:function(){},hide:function(){l()},onScroll:function(e,t,n){var r,i;a[0].getBoundingClientRect().bottom>t?(r=c[0].offsetHeight,(i=t-r-n)<a[0].parentNode.getBoundingClientRect().top&&(i=a[0].parentNode.getBoundingClientRect().top),c.css("width",o.$element[0].offsetWidth+"px"),a.css("height",r+"px"),c.css("top",i+"px"),a.addClass("md-stick"),s=!0):!0===s&&l()},onResize:function(e){if(!1===s)return;c.css("width",e+"px")},noSticky:n})}}})}(),function(){"use strict";angular.module("material.components.expansionPanels").directive("mdExpansionPanelGroup",function(){return{restrict:"E",controller:["$scope","$attrs","$element","$mdComponentRegistry",function(e,t,n,r){var i,a={},o={},s=[],c=void 0!==t.mdMultiple||void 0!==t.multiple,l=void 0!==t.mdAutoExpand||void 0!==t.autoExpand;function u(){var t=f();s.forEach(function(e){e(t)})}function f(){return Object.keys(o).length}function d(t){!1===c&&Object.keys(o).forEach(function(e){e!==t&&o[e].collapse()})}i=r.register({$element:n,register:function(e,t){if(void 0!==a[e])throw Error('$mdExpansionPanelGroup.register() The name "'+e+'" has already been registered');a[e]=t},getRegistered:function(e){if(void 0!==a[e])return a[e];throw Error('$mdExpansionPanelGroup.addPanel() Cannot find Panel with name of "'+e+'"')},getAll:function(){return Object.keys(o).map(function(e){return o[e]})},getOpen:function(){return Object.keys(o).map(function(e){return o[e]}).filter(function(e){return e.isOpen()})},remove:function(e,t){return o[e].remove(t)},removeAll:function(t){Object.keys(o).forEach(function(e){o[e].remove(t)})},collapseAll:function(e){var t=!0!==e;Object.keys(o).forEach(function(e){o[e].collapse({animation:t})})},onChange:function(e){return s.push(e),function(){s.splice(s.indexOf(e),1)}},count:f},t.mdComponentId),this.addPanel=function(e,t){o[e]=t,!0===l&&(t.expand(),d(e));u()},this.expandPanel=function(e){d(e)},this.removePanel=function(e){delete o[e],u()},e.$on("$destroy",function(){"function"==typeof i&&(i(),i=void 0),Object.keys(o).forEach(function(e){o[e].destroy()})})}]}})}(),function(){"use strict";function e(n,d,h,r,i,p,m,a,o){var t={find:s,waitFor:function(e){var t=a.defer();return n.when(e).then(function(e){t.resolve(c(e))}).catch(function(e){t.reject(),o.error(e)}),t.promise}};return function(e){return void 0===e?t:s(e)};function s(e){var t=n.get(e);if(t)return c(t);o.error(d.supplant("ExpansionPanelGroup '{0}' is not available! Did you use md-component-id='{0}'?",[e||""]))}function c(f){return{add:function e(s,c){c=c||{};if("string"==typeof s)return e(f.getRegistered(s),c);n(s);if(s.componentId&&f.isPanelActive(s.componentId))return a.reject('panel with componentId "'+s.componentId+'" is currently active');var l=a.defer();var u=i.$new();angular.extend(u,s.scope);t(s,function(e){var t=angular.element(e),n=s.componentId||t.attr("md-component-id")||"_panelComponentId_"+d.nextUid(),r=h().waitFor(n);t.attr("md-component-id",n);var i=p(t);if(s.controller){angular.extend(c,s.locals||{}),c.$scope=u,c.$panel=r;var a=m(s.controller,c,!0),o=a();t.data("$ngControllerController",o),t.children().data("$ngControllerController",o),s.controllerAs&&(u[s.controllerAs]=o)}f.$element.append(t),i(u),r.then(function(e){l.resolve(e)})});return l.promise},register:function(e,t){if("string"!=typeof e)throw Error("$mdExpansionPanelGroup.register() Expects name to be a string");n(t),f.register(e,t)},getAll:function(){return f.getAll()},getOpen:function(){return f.getOpen()},remove:function(e,t){return f.remove(e,t)},removeAll:function(e){f.removeAll(e)},collapseAll:function(e){f.collapseAll(e)},onChange:function(e){return f.onChange(e)},count:function(){return f.count()}};function n(e){if("object"!=typeof e||null===e)throw Error("$mdExapnsionPanelGroup.add()/.register() : Requires an options object to be passed in");if(!e.template&&!e.templateUrl)throw Error("$mdExapnsionPanelGroup.add()/.register() : Is missing required paramters to create. Required One of the following: template, templateUrl")}function t(e,t){void 0!==e.templateUrl?r(e.templateUrl).then(function(e){t(e)}):t(e.template)}}}angular.module("material.components.expansionPanels").factory("$mdExpansionPanelGroup",e),e.$inject=["$mdComponentRegistry","$mdUtil","$mdExpansionPanel","$templateRequest","$rootScope","$compile","$controller","$q","$log"]}(),function(){"use strict";function e(){return{restrict:"E",transclude:!0,template:'<div class="md-expansion-panel-header-container" ng-transclude></div>',require:"^^mdExpansionPanel",link:function(e,o,t,n){var s=!1,r=void 0!==t.mdNoSticky,c=angular.element(o[0].querySelector(".md-expansion-panel-header-container"));function l(){s=!1,c.css("width",""),o.css("height",""),o.css("top",""),o.removeClass("md-stick"),o.addClass("md-no-stick")}n.registerHeader({show:function(){},hide:function(){l()},noSticky:r,onScroll:function(e,t,n){var r,i,a=o[0].getBoundingClientRect();a.top<e?(r=e-n,(i=o[0].parentNode.getBoundingClientRect().bottom-e-a.height)<0&&(r+=i),c.css("width",o[0].offsetWidth+"px"),c.css("top",r+"px"),o.css("height",c[0].offsetHeight+"px"),o.removeClass("md-no-stick"),o.addClass("md-stick"),s=!0):!0===s&&l()},onResize:function(e){if(!1===s)return;c.css("width",e+"px")}})}}}angular.module("material.components.expansionPanels").directive("mdExpansionPanelHeader",e),e.$inject=[]}(),function(){"use strict";angular.module("material.components.expansionPanels").directive("mdExpansionPanelIcon",function(){return{restrict:"E",template:'<md-icon class="md-expansion-panel-icon" md-svg-icon="icons/ic_keyboard_arrow_right_black_24px.svg"></md-icon>',replace:!0}})}(),function(e,C){"use strict";var t=C.module("angular-sortable-view",[]);function _(e){if(!("clientX"in e||"clientY"in e)){var t=e.touches||e.originalEvent.touches;t&&t.length&&(e.clientX=t[0].clientX,e.clientY=t[0].clientY),e.preventDefault()}}t.directive("svRoot",[function(){function y(e){return r[e]}var w,r=Object.create(null);return{restrict:"A",controller:["$scope","$attrs","$interpolate","$parse",function(f,e,t,n){var d=t(e.svRoot)(f)||f.$id;r[d]||(r[d]=[]);var h,p,m,g,_,b=!1,c=n(e.svOnSort);e.svOnStart=e.$$element[0].attributes["sv-on-start"],e.svOnStart=e.svOnStart&&e.svOnStart.value,e.svOnStop=e.$$element[0].attributes["sv-on-stop"],e.svOnStop=e.svOnStop&&e.svOnStop.value;var v=n(e.svOnStart),l=n(e.svOnStop);if(this.sortingInProgress=function(){return w},e.svGrid){if(null===(b="true"===e.svGrid||"false"!==e.svGrid&&null))throw"Invalid value of sv-grid attribute"}else f.$watchCollection(function(){return y(d)},function(e){b=!1;var t=e.filter(function(e){return!e.container}).map(function(e){return{part:e.getPart().id,y:e.element[0].getBoundingClientRect().top}}),r=Object.create(null);t.forEach(function(e){r[e.part]?r[e.part].push(e.y):r[e.part]=[e.y]}),Object.keys(r).forEach(function(n){r[n].sort(),r[n].forEach(function(e,t){t<r[n].length-1&&0<e&&e===r[n][t+1]&&(b=!0)})})});this.$moveUpdate=function(s,c,e,t,n,r,i){var a=e[0].getBoundingClientRect();"element"===s.tolerance&&(c={x:~~(a.left+a.width/2),y:~~(a.top+a.height/2)}),w=!0,h=[],p||(n?(p=n.clone()).removeClass("ng-hide"):((p=t.clone()).addClass("sv-visibility-hidden"),p.addClass("sv-placeholder"),p.css({height:a.height+"px",width:a.width+"px"})),t.after(p),t.addClass("ng-hide"),g=t,s,v(f,{$helper:{element:m=e},$part:r.model(r.scope),$index:i,$item:r.model(r.scope)[i]}),f.$root&&f.$root.$$phase||f.$apply()),m[0].reposition({x:c.x+document.body.scrollLeft-c.offset.x*a.width,y:c.y+document.body.scrollTop-c.offset.y*a.height}),y(d).forEach(function(e,t){if(null==s.containment||A(e.element,s.containment)||A(e.element,s.containment+" *")){var n,r,i,a=e.element[0].getBoundingClientRect(),o={x:~~(a.left+a.width/2),y:~~(a.top+a.height/2)};e.container||!e.element[0].scrollHeight&&!e.element[0].scrollWidth||h.push({element:e.element,q:(o.x-c.x)*(o.x-c.x)+(o.y-c.y)*(o.y-c.y),view:e.getPart(),targetIndex:e.getIndex(),after:(n=o,r=c,i=b,i?n.x-r.x<0:n.y-r.y<0)}),e.container&&!e.element[0].querySelector("[sv-element]:not(.sv-placeholder):not(.sv-source)")&&h.push({element:e.element,q:(o.x-c.x)*(o.x-c.x)+(o.y-c.y)*(o.y-c.y),view:e.getPart(),targetIndex:0,container:!0})}});var o=p[0].getBoundingClientRect(),l=~~(o.left+o.width/2),u=~~(o.top+o.height/2);h.push({q:(l-c.x)*(l-c.x)+(u-c.y)*(u-c.y),element:p,placeholder:!0}),h.sort(function(e,t){return e.q-t.q}),h.forEach(function(e,t){var n,r,i;0!==t||e.placeholder||e.container?0===t&&e.container?(_=e).element.append(p):e.element.removeClass("sv-candidate"):((_=e).element.addClass("sv-candidate"),e.after?e.element.after(p):(n=e.element,r=p,0<(i=function(e){{if((e=e[0]).previousElementSibling)return C.element(e.previousElementSibling);for(var t=e.previousSibling;null!=t&&1!=t.nodeType;)t=t.previousSibling;return C.element(t)}}(n)).length?i.after(r):n.parent().prepend(r)))})},this.$drop=function(n,r,i){if(p)if(i.revert){var e=p[0].getBoundingClientRect(),t=m[0].getBoundingClientRect(),a=Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2)),o=+i.revert*a/200;o=Math.min(o,+i.revert),["-webkit-","-moz-","-ms-","-o-",""].forEach(function(e){void 0!==m[0].style[e+"transition"]&&(m[0].style[e+"transition"]="all "+o+"ms ease")}),setTimeout(s,o),m.css({top:e.top+document.body.scrollTop+"px",left:e.left+document.body.scrollLeft+"px"})}else s();function s(){if(w=!1,p.remove(),m.remove(),g.removeClass("ng-hide"),g=m=i=p=h=void 0,l(f,{$part:n.model(n.scope),$index:r,$item:n.model(n.scope)[r]}),_){_.element.removeClass("sv-candidate");var e=n.model(n.scope).splice(r,1),t=_.targetIndex;_.view===n&&_.targetIndex>r&&t--,_.after&&t++,_.view.model(_.view.scope).splice(t,0,e[0]),_.view===n&&r===t||c(f,{$partTo:_.view.model(_.view.scope),$partFrom:n.model(n.scope),$item:e[0],$indexTo:t,$indexFrom:r})}_=void 0,f.$root&&f.$root.$$phase||f.$apply()}},this.addToSortableElements=function(e){y(d).push(e)},this.removeFromSortableElements=function(e){var t=y(d),n=t.indexOf(e);-1<n&&(t.splice(n,1),0===t.length&&delete r[d])}}]}}]),t.directive("svPart",["$parse",function(o){return{restrict:"A",require:"^svRoot",controller:["$scope",function(n){(n.$ctrl=this).getPart=function(){return n.part},this.$drop=function(e,t){n.$sortableRoot.$drop(n.part,e,t)}}],scope:!0,link:function(e,t,n,r){if(!n.svPart)throw new Error("no model provided");var i=o(n.svPart);if(!i.assign)throw new Error("model not assignable");e.part={id:e.$id,element:t,model:i,scope:e},e.$sortableRoot=r;var a={element:t,getPart:e.$ctrl.getPart,container:!0};r.addToSortableElements(a),e.$on("$destroy",function(){r.removeFromSortableElements(a)})}}}]),t.directive("svElement",["$parse",function(g){return{restrict:"A",require:["^svPart","^svRoot"],controller:["$scope",function(e){e.$ctrl=this}],link:function(c,l,u,f){var e={element:l,getPart:f[0].getPart,getIndex:function(){return c.$index}};f[1].addToSortableElements(e),c.$on("$destroy",function(){f[1].removeFromSortableElements(e)});var d,h,t=l;t.on("mousedown touchstart",n),c.$watch("$ctrl.handle",function(e){e&&(t.off("mousedown touchstart",n),(t=e).on("mousedown touchstart",n))}),c.$watch("$ctrl.helper",function(e){e&&(d=e)}),c.$watch("$ctrl.placeholder",function(e){e&&(h=e)});C.element(document.body);var p,m=C.element(document.documentElement);function n(e){if(_(e),!f[1].sortingInProgress()&&(0==e.button||"mousedown"!==e.type)){p=!1;var n=g(u.svElement)(c);if((n=C.extend({},{tolerance:"pointer",revert:200,containment:"html"},n)).containment)var a=b.call(l,n.containment)[0].getBoundingClientRect();var o,t=l,r=l[0].getBoundingClientRect();d||(d=f[0].helper),h||(h=f[0].placeholder),d?((o=d.clone()).removeClass("ng-hide"),o.css({left:r.left+document.body.scrollLeft+"px",top:r.top+document.body.scrollTop+"px"}),t.addClass("sv-visibility-hidden")):(o=t.clone()).addClass("sv-helper").css({left:r.left+document.body.scrollLeft+"px",top:r.top+document.body.scrollTop+"px",width:r.width+"px"}),o[0].reposition=function(e){var t=e.x,n=e.y,r=o[0].getBoundingClientRect(),i=document.body;a&&(n<a.top+i.scrollTop&&(n=a.top+i.scrollTop),n+r.height>a.top+i.scrollTop+a.height&&(n=a.top+i.scrollTop+a.height-r.height),t<a.left+i.scrollLeft&&(t=a.left+i.scrollLeft),t+r.width>a.left+i.scrollLeft+a.width&&(t=a.left+i.scrollLeft+a.width-r.width)),this.style.left=t-i.scrollLeft+"px",this.style.top=n-i.scrollTop+"px"};var i={x:(e.clientX-r.left)/r.width,y:(e.clientY-r.top)/r.height};m.addClass("sv-sorting-in-progress"),m.on("mousemove touchmove",s).on("mouseup touchend touchcancel",function e(t){m.off("mousemove touchmove",s),m.off("mouseup touchend touchcancel",e),m.removeClass("sv-sorting-in-progress"),p&&f[0].$drop(c.$index,n),l.removeClass("sv-visibility-hidden")})}function s(e){_(e),p||(l.parent().prepend(o),p=!0),f[1].$moveUpdate(n,{x:e.clientX,y:e.clientY,offset:i},o,l,h,f[0].getPart(),c.$index)}}}}}]),t.directive("svHandle",function(){return{require:"?^svElement",link:function(e,t,n,r){r&&(r.handle=t.add(r.handle))}}}),t.directive("svHelper",function(){return{require:["?^svPart","?^svElement"],link:function(e,t,n,r){t.addClass("sv-helper").addClass("ng-hide"),r[1]?r[1].helper=t:r[0]&&(r[0].helper=t)}}}),t.directive("svPlaceholder",function(){return{require:["?^svPart","?^svElement"],link:function(e,t,n,r){t.addClass("sv-placeholder").addClass("ng-hide"),r[1]?r[1].placeholder=t:r[0]&&(r[0].placeholder=t)}}}),C.element(document.head).append(["<style>.sv-helper{position: fixed !important;z-index: 99999;margin: 0 !important;}.sv-candidate{}.sv-placeholder{}.sv-sorting-in-progress{-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}.sv-visibility-hidden{visibility: hidden !important;opacity: 0 !important;}</style>"].join(""));var n=document.documentElement,r=n.matches?"matches":n.matchesSelector?"matchesSelector":n.webkitMatches?"webkitMatches":n.webkitMatchesSelector?"webkitMatchesSelector":n.msMatches?"msMatches":n.msMatchesSelector?"msMatchesSelector":n.mozMatches?"mozMatches":n.mozMatchesSelector?"mozMatchesSelector":null;if(null==r)throw"This browser doesn't support the HTMLElement.matches method";function A(e,t){if(e instanceof C.element&&(e=e[0]),null!==r)return e[r](t)}var b=C.element.prototype.closest||function(e){for(var t=this[0].parentNode;t!==document.documentElement&&!t[r](e);)t=t.parentNode;return t[r](e)?C.element(t):C.element()};"function"!=typeof C.element.prototype.add&&(C.element.prototype.add=function(e){var t,n=C.element();for(e=C.element(e),t=0;t<this.length;t++)n.push(this[t]);for(t=0;t<e.length;t++)n.push(e[t]);return n})}(window,window.angular),function(f){var d=/^\s+/,h=/\s+$/,r=0,o=f.round,p=f.min,m=f.max,e=f.random;function u(e,t){if(t=t||{},(e=e||"")instanceof u)return e;if(!(this instanceof u))return new u(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,o=!1,s=!1;"string"==typeof e&&(e=function(e){e=e.replace(d,"").replace(h,"").toLowerCase();var t,n=!1;if(x[e])e=x[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=G.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=G.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=G.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=G.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=G.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=G.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=G.hex8.exec(e))return{r:P(t[1]),g:P(t[2]),b:P(t[3]),a:R(t[4]),format:n?"name":"hex8"};if(t=G.hex6.exec(e))return{r:P(t[1]),g:P(t[2]),b:P(t[3]),format:n?"name":"hex"};if(t=G.hex4.exec(e))return{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),a:R(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=G.hex3.exec(e))return{r:P(t[1]+""+t[1]),g:P(t[2]+""+t[2]),b:P(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(j(e.r)&&j(e.g)&&j(e.b)?(c=e.r,l=e.g,u=e.b,t={r:255*D(c,255),g:255*D(l,255),b:255*D(u,255)},o=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):j(e.h)&&j(e.s)&&j(e.v)?(r=$(e.s),i=$(e.v),t=function(e,t,n){e=6*D(e,360),t=D(t,100),n=D(n,100);var r=f.floor(e),i=e-r,a=n*(1-t),o=n*(1-i*t),s=n*(1-(1-i)*t),c=r%6;return{r:255*[n,o,a,a,s,n][c],g:255*[s,n,n,o,a,a][c],b:255*[a,a,s,n,n,o][c]}}(e.h,r,i),o=!0,s="hsv"):j(e.h)&&j(e.s)&&j(e.l)&&(r=$(e.s),a=$(e.l),t=function(e,t,n){var r,i,a;function o(e,t,n){return n<0&&(n+=1),1<n&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=D(e,360),t=D(t,100),n=D(n,100),0===t)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;r=o(c,s,e+1/3),i=o(c,s,e),a=o(c,s,e-1/3)}return{r:255*r,g:255*i,b:255*a}}(e.h,r,a),o=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a));var c,l,u;return n=E(n),{ok:o,format:e.format||s,r:p(255,m(t.r,0)),g:p(255,m(t.g,0)),b:p(255,m(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=o(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=o(this._r)),this._g<1&&(this._g=o(this._g)),this._b<1&&(this._b=o(this._b)),this._ok=n.ok,this._tc_id=r++}function i(e,t,n){e=D(e,255),t=D(t,255),n=D(n,255);var r,i,a=m(e,t,n),o=p(e,t,n),s=(a+o)/2;if(a==o)r=i=0;else{var c=a-o;switch(i=.5<s?c/(2-a-o):c/(a+o),a){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:i,l:s}}function a(e,t,n){e=D(e,255),t=D(t,255),n=D(n,255);var r,i,a=m(e,t,n),o=p(e,t,n),s=a,c=a-o;if(i=0===a?0:c/a,a==o)r=0;else{switch(a){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:i,v:s}}function t(e,t,n,r){var i=[M(o(e).toString(16)),M(o(t).toString(16)),M(o(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function s(e,t,n,r){return[M(O(r)),M(o(e).toString(16)),M(o(t).toString(16)),M(o(n).toString(16))].join("")}function n(e,t){t=0===t?0:t||10;var n=u(e).toHsl();return n.s-=t/100,n.s=I(n.s),u(n)}function c(e,t){t=0===t?0:t||10;var n=u(e).toHsl();return n.s+=t/100,n.s=I(n.s),u(n)}function l(e){return u(e).desaturate(100)}function g(e,t){t=0===t?0:t||10;var n=u(e).toHsl();return n.l+=t/100,n.l=I(n.l),u(n)}function _(e,t){t=0===t?0:t||10;var n=u(e).toRgb();return n.r=m(0,p(255,n.r-o(-t/100*255))),n.g=m(0,p(255,n.g-o(-t/100*255))),n.b=m(0,p(255,n.b-o(-t/100*255))),u(n)}function b(e,t){t=0===t?0:t||10;var n=u(e).toHsl();return n.l-=t/100,n.l=I(n.l),u(n)}function v(e,t){var n=u(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,u(n)}function y(e){var t=u(e).toHsl();return t.h=(t.h+180)%360,u(t)}function w(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+120)%360,s:t.s,l:t.l}),u({h:(n+240)%360,s:t.s,l:t.l})]}function C(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+90)%360,s:t.s,l:t.l}),u({h:(n+180)%360,s:t.s,l:t.l}),u({h:(n+270)%360,s:t.s,l:t.l})]}function A(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+72)%360,s:t.s,l:t.l}),u({h:(n+216)%360,s:t.s,l:t.l})]}function S(e,t,n){t=t||6,n=n||30;var r=u(e).toHsl(),i=360/n,a=[u(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(u(r));return a}function T(e,t){t=t||6;for(var n=u(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(u({h:r,s:i,v:a})),a=(a+s)%1;return o}u.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:f.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:f.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:f.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=E(e),this._roundA=o(100*this._a)/100,this},toHsv:function(){var e=a(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=a(this._r,this._g,this._b),t=o(360*e.h),n=o(100*e.s),r=o(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=i(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=i(this._r,this._g,this._b),t=o(360*e.h),n=o(100*e.s),r=o(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return t(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var a=[M(o(e).toString(16)),M(o(t).toString(16)),M(o(n).toString(16)),M(O(r))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:o(this._r),g:o(this._g),b:o(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+o(this._r)+", "+o(this._g)+", "+o(this._b)+")":"rgba("+o(this._r)+", "+o(this._g)+", "+o(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:o(100*D(this._r,255))+"%",g:o(100*D(this._g,255))+"%",b:o(100*D(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+o(100*D(this._r,255))+"%, "+o(100*D(this._g,255))+"%, "+o(100*D(this._b,255))+"%)":"rgba("+o(100*D(this._r,255))+"%, "+o(100*D(this._g,255))+"%, "+o(100*D(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(k[t(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+s(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=u(e);n="#"+s(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&0<=this._a;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return u(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(g,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(n,arguments)},saturate:function(){return this._applyModification(c,arguments)},greyscale:function(){return this._applyModification(l,arguments)},spin:function(){return this._applyModification(v,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(A,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},u.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:$(e[r]));e=n}return u(e,t)},u.equals=function(e,t){return!(!e||!t)&&u(e).toRgbString()==u(t).toRgbString()},u.random=function(){return u.fromRatio({r:e(),g:e(),b:e()})},u.mix=function(e,t,n){n=0===n?0:n||50;var r=u(e).toRgb(),i=u(t).toRgb(),a=n/100;return u({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})},u.readability=function(e,t){var n=u(e),r=u(t);return(f.max(n.getLuminance(),r.getLuminance())+.05)/(f.min(n.getLuminance(),r.getLuminance())+.05)},u.isReadable=function(e,t,n){var r,i,a=u.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=4.5<=a;break;case"AAlarge":i=3<=a;break;case"AAAsmall":i=7<=a}return i},u.mostReadable=function(e,t,n){var r,i,a,o,s=null,c=0;i=(n=n||{}).includeFallbackColors,a=n.level,o=n.size;for(var l=0;l<t.length;l++)c<(r=u.readability(e,t[l]))&&(c=r,s=u(t[l]));return u.isReadable(e,s,{level:a,size:o})||!i?s:(n.includeFallbackColors=!1,u.mostReadable(e,["#fff","#000"],n))};var x=u.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},k=u.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(x);function E(e){return e=parseFloat(e),(isNaN(e)||e<0||1<e)&&(e=1),e}function D(e,t){var n;"string"==typeof(n=e)&&-1!=n.indexOf(".")&&1===parseFloat(n)&&(e="100%");var r,i="string"==typeof(r=e)&&-1!=r.indexOf("%");return e=p(t,m(0,parseFloat(e))),i&&(e=parseInt(e*t,10)/100),f.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function I(e){return p(1,m(0,e))}function P(e){return parseInt(e,16)}function M(e){return 1==e.length?"0"+e:""+e}function $(e){return e<=1&&(e=100*e+"%"),e}function O(e){return f.round(255*parseFloat(e)).toString(16)}function R(e){return P(e)/255}var N,L,F,G=(L="[\\s|\\(]+("+(N="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+N+")[,|\\s]+("+N+")\\s*\\)?",F="[\\s|\\(]+("+N+")[,|\\s]+("+N+")[,|\\s]+("+N+")[,|\\s]+("+N+")\\s*\\)?",{CSS_UNIT:new RegExp(N),rgb:new RegExp("rgb"+L),rgba:new RegExp("rgba"+F),hsl:new RegExp("hsl"+L),hsla:new RegExp("hsla"+F),hsv:new RegExp("hsv"+L),hsva:new RegExp("hsva"+F),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function j(e){return!!G.CSS_UNIT.exec(e)}"undefined"!=typeof module&&module.exports?module.exports=u:"function"==typeof define&&define.amd?define(function(){return u}):window.tinycolor=u}(Math),function(e,t,f){!function(e,u,l){"use strict";var n={hue:{getColorByPoint:function(e,t){var n=this.getImageData(e,t);return this.setMarkerCenter(t),new f({r:n[0],g:n[1],b:n[2]}).toHsl().h},draw:function(){this.$element.css({height:this.height+"px"}),this.canvas.height=this.height,this.canvas.width=this.height;var e=this.context.createLinearGradient(90,0,90,this.height);e.addColorStop(.01,"rgba(255, 0, 0, 1.000)"),e.addColorStop(.167,"rgba(255, 0, 255, 1.000)"),e.addColorStop(.333,"rgba(0, 0, 255, 1.000)"),e.addColorStop(.5,"rgba(0, 255, 255, 1.000)"),e.addColorStop(.666,"rgba(0, 255, 0, 1.000)"),e.addColorStop(.828,"rgba(255, 255, 0, 1.000)"),e.addColorStop(.999,"rgba(255, 0, 0, 1.000)"),this.context.fillStyle=e,this.context.fillRect(0,0,this.canvas.width,this.height)}},alpha:{getColorByPoint:function(e,t){var n=this.getImageData(e,t);return this.setMarkerCenter(t),n[3]/255},draw:function(){this.$element.css({height:this.height+"px"}),this.canvas.height=this.height,this.canvas.width=this.height;var e=this.context.createLinearGradient(90,0,90,this.height);e.addColorStop(.01,"rgba("+this.currentColor.r+","+this.currentColor.g+","+this.currentColor.b+", 1.000)"),e.addColorStop(.99,"rgba("+this.currentColor.r+","+this.currentColor.g+","+this.currentColor.b+", 0.000)"),this.context.fillStyle=e,this.context.fillRect(-1,-1,this.canvas.width+2,this.height+2)},extra:function(){this.$scope.$on("mdColorPicker:spectrumColorChange",u.bind(this,function(e,t){this.currentColor=t.color,this.draw()}))}},spectrum:{getColorByPoint:function(e,t){var n=this.getImageData(e,t);return this.setMarkerCenter(e,t),{r:n[0],g:n[1],b:n[2]}},draw:function(){this.canvas.height=this.height,this.canvas.width=this.height,this.context.clearRect(0,0,this.canvas.width,this.canvas.height);var e=this.context.createLinearGradient(0,0,this.canvas.width,0);e.addColorStop(.01,"rgba(255, 255, 255, 1.000)"),e.addColorStop(.99,"rgba(255, 255, 255, 0.000)");var t=this.context.createLinearGradient(0,0,0,this.canvas.height);t.addColorStop(.01,"rgba(0, 0, 0, 0.000)"),t.addColorStop(.99,"rgba(0, 0, 0, 1.000)"),this.context.fillStyle="hsl( "+this.currentHue+", 100%, 50%)",this.context.fillRect(0,0,this.canvas.width,this.canvas.height),this.context.fillStyle=e,this.context.fillRect(-1,-1,this.canvas.width+2,this.canvas.height+2),this.context.fillStyle=t,this.context.fillRect(-1,-1,this.canvas.width+2,this.canvas.height+2)},extra:function(){this.$scope.$on("mdColorPicker:spectrumHueChange",u.bind(this,function(e,t){this.currentHue=t.hue,this.draw();var n=this.getMarkerCenter(),r=this.getColorByPoint(n.x,n.y);this.setColor(r)}))}}};function r(e,t){this.type=e,this.restrictX=t,this.offset={x:null,y:null},this.height=255,this.$scope=null,this.$element=null,this.get=u.bind(this,function(e,t,n){this.$scope=e,this.$element=t,this.canvas=this.$element.children()[0],this.marker=this.$element.children()[1],this.context=this.canvas.getContext("2d"),this.currentColor=this.$scope.color.toRgb(),this.currentHue=this.$scope.color.toHsv().h,this.$element.on("touchstart mousedown",u.bind(this,this.onMouseDown)),this.$scope.$on("mdColorPicker:colorSet",u.bind(this,this.onColorSet)),this.extra&&this.extra(),this.draw()})}r.prototype.$window=u.element(e),r.prototype.getColorByMouse=function(e){var t=e.touches&&e.touches[0],n=t&&t.pageX||e.pageX,r=t&&t.pageY||e.pageY,i=Math.round(n-this.offset.x),a=Math.round(r-this.offset.y);return this.getColorByPoint(i,a)},r.prototype.setMarkerCenter=function(e,t){var n,r,i,a,o=-1*this.marker.offsetWidth/2,s=-1*this.marker.offsetHeight/2;t===l?(i=e+s,a=Math.round(Math.max(Math.min(this.height-1+s,i),s)),r=0):(n=e+o,i=t+s,r=Math.floor(Math.max(Math.min(this.height+o,n),o)),a=Math.floor(Math.max(Math.min(this.height+s,i),s))),u.element(this.marker).css({left:r+"px"}),u.element(this.marker).css({top:a+"px"})},r.prototype.getMarkerCenter=function(){return{x:this.marker.offsetLeft+Math.floor(this.marker.offsetWidth/2),y:this.marker.offsetTop+Math.floor(this.marker.offsetHeight/2)}},r.prototype.getImageData=function(e,t){return e=Math.max(0,Math.min(e,this.canvas.width-1)),t=Math.max(0,Math.min(t,this.canvas.height-1)),this.context.getImageData(e,t,1,1).data},r.prototype.onMouseDown=function(e){e.preventDefault(),e.stopImmediatePropagation(),this.$scope.previewUnfocus(),this.$element.css({cursor:"none"}),this.offset.x=this.canvas.getBoundingClientRect().left,this.offset.y=this.canvas.getBoundingClientRect().top;var t=u.bind(this,function(e){switch(this.type){case"hue":var t=this.getColorByMouse(e);this.$scope.$broadcast("mdColorPicker:spectrumHueChange",{hue:t});break;case"alpha":var n=this.getColorByMouse(e);this.$scope.color.setAlpha(n),this.$scope.alpha=n,this.$scope.$apply();break;case"spectrum":var r=this.getColorByMouse(e);this.setColor(r)}});this.$window.on("touchmove mousemove",t),this.$window.one("touchend mouseup",u.bind(this,function(e){this.$window.off("touchmove mousemove",t),this.$element.css({cursor:"crosshair"})})),t(e)},r.prototype.setColor=function(e){this.$scope.color._r=e.r,this.$scope.color._g=e.g,this.$scope.color._b=e.b,this.$scope.$apply(),this.$scope.$broadcast("mdColorPicker:spectrumColorChange",{color:e})},r.prototype.onColorSet=function(e,t){switch(this.type){case"hue":var n=this.$scope.color.toHsv();this.setMarkerCenter(this.canvas.height-this.canvas.height*(n.h/360));break;case"alpha":this.currentColor=t.color.toRgb(),this.draw();var r=t.color.getAlpha(),i=this.canvas.height-this.canvas.height*r;this.setMarkerCenter(i);break;case"spectrum":n=t.color.toHsv();this.currentHue=n.h,this.draw();var a=this.canvas.width*n.s,o=this.canvas.height-this.canvas.height*n.v;this.setMarkerCenter(a,o)}},u.module("mdColorPicker",[]).run(["$templateCache",function(e){var t={clear:'<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>',gradient:'<path d="M11 9h2v2h-2zm-2 2h2v2H9zm4 0h2v2h-2zm2-2h2v2h-2zM7 9h2v2H7zm12-6H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 18H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm2-7h-2v2h2v2h-2v-2h-2v2h-2v-2h-2v2H9v-2H7v2H5v-2h2v-2H5V5h14v6z"/>',tune:'<path d="M13 21v-2h8v-2h-8v-2h-2v6h2zM3 17v2h6v-2H3z"/><path d="M21 13v-2H11v2h10zM7 9v2H3v2h4v2h2V9H7z"/><path d="M15 9h2V7h4V5h-4V3h-2v6zM3 5v2h10V5H3z"/>',view_module:'<path d="M4 11h5V5H4v6z"/><path d="M4 18h5v-6H4v6z"/><path d="M10 18h5v-6h-5v6z"/><path d="M16 18h5v-6h-5v6z"/><path d="M10 11h5V5h-5v6z"/><path d="M16 5v6h5V5h-5z"/>',view_headline:'<path d="M4 15h17v-2H4v2z"/><path d="M4 19h17v-2H4v2z"/><path d="M4 11h17V9H4v2z"/><path d="M4 5v2h17V5H4z"/>',history:'<path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9z"/><path d="M12 8v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/>',clear_all:'<path d="M5 13h14v-2H5v2zm-2 4h14v-2H3v2zM7 7v2h14V7H7z"/>'};for(var n in t)t.hasOwnProperty(n)&&e.put([n,"svg"].join("."),['<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">',t[n],"</svg>"].join(""))}]).factory("mdColorGradientCanvas",function(){return function(e){var t=new r(e,"spectrum"!=e);return{template:'<canvas width="100%" height="100%"></canvas><div class="md-color-picker-marker"></div>',link:(t=u.merge(t,n[e])).get,controller:function(){}}}}).factory("mdColorPickerHistory",["$injector",function(e){var n=[],r=[],i=!1;try{i=e.get("$cookies")}catch(e){}if(i)for(var t=i.getObject("mdColorPickerHistory")||[],a=0;a<t.length;a++)n.push(f(t[a])),r.push(t[a]);var o=40;return{length:function(){if(!arguments[0])return n.length;o=arguments[0]},add:function(e){for(var t=0;t<n.length;t++)n[t].toRgbString()===e.toRgbString()&&(n.splice(t,1),r.splice(t,1));n.unshift(e),r.unshift(e.toRgbString()),n.length>o&&(n.pop(),r.pop()),i&&i.putObject("mdColorPickerHistory",r)},get:function(){return n},reset:function(){n=[],r=[],i&&i.putObject("mdColorPickerHistory",r)}}}]).directive("mdColorPicker",["$timeout","mdColorPickerHistory",function(e,t){return{templateUrl:"mdColorPicker.tpl.html",require:"^ngModel",scope:{options:"=mdColorPicker",type:"@",label:"@?",icon:"@?",random:"@?",default:"@?",openOnInput:"=?",hasBackdrop:"=?",clickOutsideToClose:"=?",skipHide:"=?",preserveScope:"=?",mdColorClearButton:"=?",mdColorPreview:"=?",mdColorAlphaChannel:"=?",mdColorSpectrum:"=?",mdColorSliders:"=?",mdColorGenericPalette:"=?",mdColorMaterialPalette:"=?",mdColorHistory:"=?",mdColorHex:"=?",mdColorRgb:"=?",mdColorHsl:"=?",mdColorDefaultTab:"=?"},controller:["$scope","$element","$attrs","$mdDialog","$mdColorPicker",function(t,e,n,r,i){if(t.options!==l)for(var a in t.options){var o;if(t.options.hasOwnProperty(a))o=a,t.hasOwnProperty("mdColor"+a.slice(0,1).toUpperCase()+a.slice(1))&&(o="mdColor"+a.slice(0,1).toUpperCase()+a.slice(1)),!o||t[o]!==l&&""!==t[o]||(t[o]=t.options[a])}var s=e.controller("ngModel"),c=function(e){t.value=e||s.$viewValue||""};t.mdColorClearButton=t.mdColorClearButton===l||t.mdColorClearButton,t.mdColorPreview=t.mdColorPreview===l||t.mdColorPreview,t.mdColorAlphaChannel=t.mdColorAlphaChannel===l||t.mdColorAlphaChannel,t.mdColorSpectrum=t.mdColorSpectrum===l||t.mdColorSpectrum,t.mdColorSliders=t.mdColorSliders===l||t.mdColorSliders,t.mdColorGenericPalette=t.mdColorGenericPalette===l||t.mdColorGenericPalette,t.mdColorMaterialPalette=t.mdColorMaterialPalette===l||t.mdColorMaterialPalette,t.mdColorHistory=t.mdColorHistory===l||t.mdColorHistory,t.mdColorHex=t.mdColorHex===l||t.mdColorHex,t.mdColorRgb=t.mdColorRgb===l||t.mdColorRgb,t.mdColorHsl=t.mdColorHsl===l||t.mdColorHsl,c(),t.$watch(function(){return s.$modelValue},function(e){c(e)}),t.$watch("value",function(e,t){""!==e&&void 0!==e&&e&&e!==t&&s.$setViewValue(e)}),t.clearValue=function(){s.$setViewValue("")},t.showColorPicker=function(e){i.show({value:t.value,defaultValue:t.default,random:t.random,clickOutsideToClose:t.clickOutsideToClose,hasBackdrop:t.hasBackdrop,skipHide:t.skipHide,preserveScope:t.preserveScope,mdColorAlphaChannel:t.mdColorAlphaChannel,mdColorSpectrum:t.mdColorSpectrum,mdColorSliders:t.mdColorSliders,mdColorGenericPalette:t.mdColorGenericPalette,mdColorMaterialPalette:t.mdColorMaterialPalette,mdColorHistory:t.mdColorHistory,mdColorHex:t.mdColorHex,mdColorRgb:t.mdColorRgb,mdColorHsl:t.mdColorHsl,mdColorDefaultTab:t.mdColorDefaultTab,$event:e}).then(function(e){t.value=e})}}],compile:function(e,t){t.type=t.type!==l?t.type:0}}}]).directive("mdColorPickerContainer",["$compile","$timeout","$mdColorPalette","mdColorPickerHistory",function(e,o,s,c){return{templateUrl:"mdColorPickerContainer.tpl.html",scope:{value:"=?",default:"@",random:"@",ok:"=?",mdColorAlphaChannel:"=",mdColorSpectrum:"=",mdColorSliders:"=",mdColorGenericPalette:"=",mdColorMaterialPalette:"=",mdColorHistory:"=",mdColorHex:"=",mdColorRgb:"=",mdColorHsl:"=",mdColorDefaultTab:"="},controller:["$scope","$element","$attrs",function(a,e,t){var n=u.element(e[0].querySelector(".md-color-picker-container")),r=(u.element(n[0].querySelector(".md-color-picker-result")),u.element(e[0].querySelector(".md-color-picker-preview-input"))),i=["toHexString","toRgbString","toHslString"];a.default=a.default?a.default:a.random?f.random():"rgb(255,255,255)",0<=a.value.search("#")?a.type=0:0<=a.value.search("rgb")?a.type=1:0<=a.value.search("hsl")&&(a.type=2),a.color=new f(a.value||a.default),a.alpha=a.color.getAlpha(),a.history=c,a.materialFamily=[],a.whichPane=function(e){var t=0;if(e&&"string"==typeof e){for(var n="mdColor"+e.slice(0,1).toUpperCase()+e.slice(1),r=["mdColorSpectrum","mdColorSliders","mdColorGenericPalette","mdColorMaterialPalette","mdColorHistory"],i=0;i<r.length;i++)if(r[i]==n&&a[n]){t=i;break}}else e&&"number"==typeof e&&(t=e);return t}(a.mdColorDefaultTab),a.inputFocus=!1;Math.PI;a.palette=[["rgb(255, 204, 204)","rgb(255, 230, 204)","rgb(255, 255, 204)","rgb(204, 255, 204)","rgb(204, 255, 230)","rgb(204, 255, 255)","rgb(204, 230, 255)","rgb(204, 204, 255)","rgb(230, 204, 255)","rgb(255, 204, 255)"],["rgb(255, 153, 153)","rgb(255, 204, 153)","rgb(255, 255, 153)","rgb(153, 255, 153)","rgb(153, 255, 204)","rgb(153, 255, 255)","rgb(153, 204, 255)","rgb(153, 153, 255)","rgb(204, 153, 255)","rgb(255, 153, 255)"],["rgb(255, 102, 102)","rgb(255, 179, 102)","rgb(255, 255, 102)","rgb(102, 255, 102)","rgb(102, 255, 179)","rgb(102, 255, 255)","rgb(102, 179, 255)","rgb(102, 102, 255)","rgb(179, 102, 255)","rgb(255, 102, 255)"],["rgb(255, 51, 51)","rgb(255, 153, 51)","rgb(255, 255, 51)","rgb(51, 255, 51)","rgb(51, 255, 153)","rgb(51, 255, 255)","rgb(51, 153, 255)","rgb(51, 51, 255)","rgb(153, 51, 255)","rgb(255, 51, 255)"],["rgb(255, 0, 0)","rgb(255, 128, 0)","rgb(255, 255, 0)","rgb(0, 255, 0)","rgb(0, 255, 128)","rgb(0, 255, 255)","rgb(0, 128, 255)","rgb(0, 0, 255)","rgb(128, 0, 255)","rgb(255, 0, 255)"],["rgb(245, 0, 0)","rgb(245, 123, 0)","rgb(245, 245, 0)","rgb(0, 245, 0)","rgb(0, 245, 123)","rgb(0, 245, 245)","rgb(0, 123, 245)","rgb(0, 0, 245)","rgb(123, 0, 245)","rgb(245, 0, 245)"],["rgb(214, 0, 0)","rgb(214, 108, 0)","rgb(214, 214, 0)","rgb(0, 214, 0)","rgb(0, 214, 108)","rgb(0, 214, 214)","rgb(0, 108, 214)","rgb(0, 0, 214)","rgb(108, 0, 214)","rgb(214, 0, 214)"],["rgb(163, 0, 0)","rgb(163, 82, 0)","rgb(163, 163, 0)","rgb(0, 163, 0)","rgb(0, 163, 82)","rgb(0, 163, 163)","rgb(0, 82, 163)","rgb(0, 0, 163)","rgb(82, 0, 163)","rgb(163, 0, 163)"],["rgb(92, 0, 0)","rgb(92, 46, 0)","rgb(92, 92, 0)","rgb(0, 92, 0)","rgb(0, 92, 46)","rgb(0, 92, 92)","rgb(0, 46, 92)","rgb(0, 0, 92)","rgb(46, 0, 92)","rgb(92, 0, 92)"],["rgb(255, 255, 255)","rgb(205, 205, 205)","rgb(178, 178, 178)","rgb(153, 153, 153)","rgb(127, 127, 127)","rgb(102, 102, 102)","rgb(76, 76, 76)","rgb(51, 51, 51)","rgb(25, 25, 25)","rgb(0, 0, 0)"]],a.materialPalette=s,a.isDark=function(e){return u.isArray(e)?f({r:e[0],g:e[1],b:e[2]}).isDark():f(e).isDark()},a.previewFocus=function(){a.inputFocus=!0,o(function(){r[0].setSelectionRange(0,r[0].value.length)})},a.previewUnfocus=function(){a.inputFocus=!1,r[0].blur()},a.previewBlur=function(){a.inputFocus=!1,a.setValue()},a.previewKeyDown=function(e){13==e.keyCode&&a.ok&&a.ok()},a.setPaletteColor=function(e){o(function(){a.color=f(e.target.style.backgroundColor)})},a.setValue=function(){a.color&&a.color&&i[a.type]&&"rgba(0, 0, 0, 0)"!==a.color.toRgbString()&&(a.value=a.color[i[a.type]]())},a.changeValue=function(){a.color=f(a.value),a.$broadcast("mdColorPicker:colorSet",{color:a.color})},a.$watch("color._a",function(e){a.color.setAlpha(e)},!0),a.$watch("whichPane",function(e){a.$broadcast("mdColorPicker:colorSet",{color:a.color})}),a.$watch("type",function(){r.removeClass("switch"),o(function(){r.addClass("switch")})}),a.$watchGroup(["color.toRgbString()","type"],function(e){a.inputFocus||a.setValue()}),o(function(){a.$broadcast("mdColorPicker:colorSet",{color:a.color}),r.focus(),a.previewFocus()})}],link:function(l,e,t){e[0].getElementsByTagName("md-tab");o(function(){var r,i,a,o,s,c;r=u.element(e[0].querySelector(".md-color-picker-palette")),i=u.element(e[0].querySelector(".md-color-picker-material-palette")),a=u.element('<div class="flex-15 layout-fill layout-row layout-align-space-between" layout-align="space-between" layout="row" layout-fill"></div>'),o=u.element('<div class="flex-10"></div>'),s=u.element('<div class="md-color-picker-material-title"></div>'),c=u.element('<div class="md-color-picker-with-label"></div>'),u.forEach(l.palette,function(e,t){var n=a.clone();u.forEach(e,function(e){var t=o.clone();t.css({height:"25.5px",backgroundColor:e}),t.bind("click",l.setPaletteColor),n.append(t)}),r.append(n)}),u.forEach(l.materialPalette,function(e,t){var n=s.clone();n.html("<span>"+t.replace("-"," ")+"</span>"),n.css({height:"75px",backgroundColor:"rgb("+e[500].value[0]+","+e[500].value[1]+","+e[500].value[2]+")"}),l.isDark(e[500].value)&&n.addClass("dark"),i.append(n),u.forEach(e,function(e,t){var n=c.clone();n.css({height:"33px",backgroundColor:"rgb("+e.value[0]+","+e.value[1]+","+e.value[2]+")"}),l.isDark(e.value)&&n.addClass("dark"),n.html("<span>"+t+"</span>"),n.bind("click",l.setPaletteColor),i.append(n)})})})}}}]).directive("mdColorPickerHue",["mdColorGradientCanvas",function(e){return new e("hue")}]).directive("mdColorPickerAlpha",["mdColorGradientCanvas",function(e){return new e("alpha")}]).directive("mdColorPickerSpectrum",["mdColorGradientCanvas",function(e){return new e("spectrum")}]).factory("$mdColorPicker",["$q","$mdDialog","mdColorPickerHistory",function(e,n,t){var r;return{show:function(e){return e===l&&(e={}),e.hasBackdrop=e.hasBackdrop===l||e.hasBackdrop,e.clickOutsideToClose=e.clickOutsideToClose===l||e.clickOutsideToClose,e.defaultValue=e.defaultValue===l?"#FFFFFF":e.defaultValue,e.focusOnOpen=e.focusOnOpen!==l&&e.focusOnOpen,e.preserveScope=e.preserveScope===l||e.preserveScope,e.skipHide=e.skipHide===l||e.skipHide,e.mdColorAlphaChannel=e.mdColorAlphaChannel!==l&&e.mdColorAlphaChannel,e.mdColorSpectrum=e.mdColorSpectrum===l||e.mdColorSpectrum,e.mdColorSliders=e.mdColorSliders===l||e.mdColorSliders,e.mdColorGenericPalette=e.mdColorGenericPalette===l||e.mdColorGenericPalette,e.mdColorMaterialPalette=e.mdColorMaterialPalette===l||e.mdColorMaterialPalette,e.mdColorHistory=e.mdColorHistory===l||e.mdColorHistory,e.mdColorRgb=e.mdColorRgb===l||e.mdColorRgb,e.mdColorHsl=e.mdColorHsl===l||e.mdColorHsl,e.mdColorHex=e.mdColorHex===l||!e.mdColorRgb&&!e.mdColorHsl||e.mdColorHex,e.mdColorAlphaChannel=!(!e.mdColorRgb&&!e.mdColorHsl)&&e.mdColorAlphaChannel,(r=n.show({templateUrl:"mdColorPickerDialog.tpl.html",hasBackdrop:e.hasBackdrop,multiple:!0,clickOutsideToClose:e.clickOutsideToClose,controller:["$scope","options",function(e,t){e.close=function(){n.cancel()},e.ok=function(){n.hide(e.value)},e.hide=e.ok,e.value=t.value,e.default=t.defaultValue,e.random=t.random,e.mdColorAlphaChannel=t.mdColorAlphaChannel,e.mdColorSpectrum=t.mdColorSpectrum,e.mdColorSliders=t.mdColorSliders,e.mdColorGenericPalette=t.mdColorGenericPalette,e.mdColorMaterialPalette=t.mdColorMaterialPalette,e.mdColorHistory=t.mdColorHistory,e.mdColorHex=t.mdColorHex,e.mdColorRgb=t.mdColorRgb,e.mdColorHsl=t.mdColorHsl,e.mdColorDefaultTab=t.mdColorDefaultTab}],locals:{options:e},preserveScope:e.preserveScope,skipHide:e.skipHide,targetEvent:e.$event,focusOnOpen:e.focusOnOpen,autoWrap:!1,onShowing:function(){},onComplete:function(){}})).then(function(e){t.add(new f(e))},function(){}),r},hide:function(){return r.hide()},cancel:function(){return r.cancel()}}}])}(t,t.angular),e.module("mdColorPicker").run(["$templateCache",function(e){e.put("mdColorPicker.tpl.html",'<div class="md-color-picker-input-container" layout="row">\n\t<div class="md-color-picker-preview md-color-picker-checkered-bg" ng-click="showColorPicker($event)" ng-if="mdColorPreview">\n\t\t<div class="md-color-picker-result" ng-style="{background: value}"></div>\n\t</div>\n\t<md-input-container flex>\n\t\t<label><md-icon ng-if="icon">{{icon}}</md-icon>{{label}}</label>\n\t\t<input type="input" ng-model="value" class=\'md-color-picker-input\'  ng-mousedown="(openOnInput || !mdColorPreview) && showColorPicker($event)"/>\n\t</md-input-container>\n\t<md-button class="md-icon-button md-color-picker-clear" ng-if="mdColorClearButton && value" ng-click="clearValue();" aria-label="Clear Color">\n\t\t<md-icon md-svg-icon="clear.svg"></md-icon>\n\t</md-button>\n</div>\n'),e.put("mdColorPickerContainer.tpl.html",'<div class="md-color-picker-container in" layout="column">\n\t<div class="md-color-picker-arrow" ng-style="{\'border-bottom-color\': color.toRgbString() }"></div>\n\n\t<div class="md-color-picker-preview md-color-picker-checkered-bg" ng-class="{\'dark\': !color.isDark() || color.getAlpha() < .45}" flex="1" layout="column">\n\n\t\t<div class="md-color-picker-result" ng-style="{\'background\': color.toRgbString()}" flex="100" layout="column" layout-fill layout-align="center center" ng-click="focusPreviewInput( $event )">\n\t\t\t\x3c!--<span flex  layout="column" layout-align="center center">{{value}}</span>--\x3e\n\t\t\t<div flex  layout="row" layout-align="center center">\n\t\t\t\t<input class="md-color-picker-preview-input" type="text" ng-model="value" ng-focus="previewFocus($event);" ng-blur="previewBlur()" ng-change="changeValue()" ng-keypress="previewKeyDown($event)" layout-fill />\n\t\t\t</div>\n\t\t\t<div class="md-color-picker-tabs" style="width: 100%">\n\t\t\t\t<md-tabs md-selected="type" md-stretch-tabs="always" md-no-bar md-no-ink md-no-pagination="true" >\n\t\t\t\t\t<md-tab ng-if="mdColorHex" label="Hex" ng-disabled="color.getAlpha() !== 1" md-ink-ripple="#ffffff"></md-tab>\n\t\t\t\t\t<md-tab ng-if="mdColorRgb" label="RGB"></md-tab>\n\t\t\t\t\t<md-tab ng-if="mdColorHsl" label="HSL"></md-tab>\n\t\t\t\t\t\x3c!--<md-tab label="HSV"></md-tab>\n\t\t\t\t\t<md-tab label="VEC"></md-tab>--\x3e\n\t\t\t\t</md-tabs>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<div class="md-color-picker-tabs md-color-picker-colors">\n\t\t<md-tabs md-stretch-tabs="always" md-align-tabs="bottom"  md-selected="whichPane" md-no-pagination>\n\t\t\t<md-tab ng-if="mdColorSpectrum">\n\t\t\t\t<md-tab-label>\n\t\t\t\t\t<md-icon md-svg-icon="gradient.svg"></md-icon>\n\t\t\t\t</md-tab-label>\n\t\t\t\t<md-tab-body>\n\t\t\t\t\t<div layout="row" layout-align="space-between" style="height: 255px">\n\t\t\t\t\t\t<div md-color-picker-spectrum></div>\n\t\t\t\t\t\t<div md-color-picker-hue ng-class="{\'md-color-picker-wide\': !mdColorAlphaChannel}"></div>\n\t\t\t\t\t\t<div md-color-picker-alpha class="md-color-picker-checkered-bg" ng-if="mdColorAlphaChannel"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</md-tab-body>\n\t\t\t</md-tab>\n\t\t\t<md-tab ng-if="mdColorSliders">\n\t\t\t\t<md-tab-label>\n\t\t\t\t\t<md-icon md-svg-icon="tune.svg"></md-icon>\n\t\t\t\t</md-tab-label>\n\t\t\t\t<md-tab-body>\n\t\t\t\t\t<div layout="column" flex="100" layout-fill layout-align="space-between start center" class="md-color-picker-sliders">\n\t\t\t\t\t\t<div layout="row" layout-align="start center" layout-wrap flex layout-fill>\n\t\t\t\t\t\t\t<div flex="10" layout layout-align="center center">\n\t\t\t\t\t\t\t\t<span class="md-body-1">R</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<md-slider flex="65" min="0" max="255" ng-model="color._r" aria-label="red" class="red-slider"></md-slider>\n\t\t\t\t\t\t\t<span flex></span>\n\t\t\t\t\t\t\t<div flex="20" layout layout-align="center center">\n\t\t\t\t\t\t\t\t<input style="width: 100%;" min="0" max="255" type="number" ng-model="color._r" aria-label="red" aria-controls="red-slider">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div layout="row" layout-align="start center" layout-wrap flex layout-fill>\n\t\t\t\t\t\t\t<div flex="10" layout layout-align="center center">\n\t\t\t\t\t\t\t\t<span class="md-body-1">G</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<md-slider flex="65" min="0" max="255" ng-model="color._g" aria-label="green" class="green-slider"></md-slider>\n\t\t\t\t\t\t\t<span flex></span>\n\t\t\t\t\t\t\t<div flex="20" layout layout-align="center center">\n\t\t\t\t\t\t\t\t<input style="width: 100%;" min="0" max="255" type="number" ng-model="color._g" aria-label="green" aria-controls="green-slider">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div layout="row" layout-align="start center" layout-wrap flex layout-fill>\n\t\t\t\t\t\t\t<div flex="10" layout layout-align="center center">\n\t\t\t\t\t\t\t\t<span class="md-body-1">B</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<md-slider flex="65" min="0" max="255" ng-model="color._b" aria-label="blue" class="blue-slider"></md-slider>\n\t\t\t\t\t\t\t<span flex></span>\n\t\t\t\t\t\t\t<div flex="20" layout layout-align="center center" >\n\t\t\t\t\t\t\t\t<input style="width: 100%;" min="0" max="255" type="number" ng-model="color._b" aria-label="blue" aria-controls="blue-slider">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div layout="row" layout-align="start center" layout-wrap flex layout-fill ng-if="!mdColorAlphaChannel">\n\t\t\t\t\t\t\t<div flex="10" layout layout-align="center center">\n\t\t\t\t\t\t\t\t<span class="md-body-1">A</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<md-slider flex="65" min="0" max="1" step=".01" ng-model="color._a" aria-label="alpha" class="md-primary"></md-slider>\n\t\t\t\t\t\t\t<span flex></span>\n\t\t\t\t\t\t\t<div flex="20" layout layout-align="center center" >\n\t\t\t\t\t\t\t\t<input style="width: 100%;" min="0" max="1" step=".01" type="number" ng-model="color._a" aria-label="alpha" aria-controls="alpha-slider">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</md-tab-body>\n\t\t\t</md-tab>\n\t\t\t<md-tab ng-if="mdColorGenericPalette">\n\t\t\t\t<md-tab-label>\n\t\t\t\t\t<md-icon md-svg-icon="view_module.svg"></md-icon>\n\t\t\t\t</md-tab-label>\n\t\t\t\t<md-tab-body>\n\t\t\t\t\t<div layout="column" layout-align="space-between start center" flex class="md-color-picker-palette">\n\n\t\t\t\t\t</div>\n\t\t\t\t</md-tab-body>\n\t\t\t</md-tab>\n\t\t\t<md-tab  ng-if="mdColorMaterialPalette">\n\t\t\t\t<md-tab-label>\n\t\t\t\t\t<md-icon md-svg-icon="view_headline.svg"></md-icon>\n\t\t\t\t</md-tab-label>\n\t\t\t\t<md-tab-body>\n\t\t\t\t\t<div layout="column" layout-fill flex class="md-color-picker-material-palette">\n\n\t\t\t\t\t</div>\n\t\t\t\t</md-tab-body>\n\t\t\t</md-tab>\n\t\t\t<md-tab ng-if="mdColorHistory">\n\t\t\t\t<md-tab-label>\n\t\t\t\t\t<md-icon md-svg-icon="history.svg"></md-icon>\n\t\t\t\t</md-tab-label>\n\t\t\t\t<md-tab-body layout="row" layout-fill>\n\t\t\t\t\t<div layout="column" flex layout-align="space-between start" layout-wrap layout-fill class="md-color-picker-history">\n\t\t\t\t\t\t<div layout="row" flex="80" layout-align="space-between start start" layout-wrap  layout-fill>\n\t\t\t\t\t\t\t<div flex="10" ng-repeat="historyColor in history.get() track by $index">\n\t\t\t\t\t\t\t\t<div  ng-style="{\'background\': historyColor.toRgbString()}" ng-click="setPaletteColor($event)"></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\n\t\t\t\t\t\t<md-button flex-end ng-click="history.reset()" class="md-mini" aria-label="Clear History">\n\t\t\t\t\t\t\t<md-icon md-svg-icon="clear_all.svg"></md-icon>\n\t\t\t\t\t\t</md-button>\n\t\t\t\t\t</div>\n\t\t\t\t</md-tab-body>\n\t\t\t</md-tab>\n\t\t</md-tabs>\n\t</div>\n\n</div>\n'),e.put("mdColorPickerDialog.tpl.html",'<md-dialog class="md-color-picker-dialog">\n\t<div md-color-picker-container\n\t\tvalue="value"\n\t\tdefault="{{defaultValue}}"\n\t\trandom="{{random}}"\n\t\tok="ok"\n\t\tmd-color-alpha-channel="mdColorAlphaChannel"\n\t\tmd-color-spectrum="mdColorSpectrum"\n\t\tmd-color-sliders="mdColorSliders"\n\t\tmd-color-generic-palette="mdColorGenericPalette"\n\t\tmd-color-material-palette="mdColorMaterialPalette"\n\t\tmd-color-history="mdColorHistory"\n\t\tmd-color-hex="mdColorHex"\n\t\tmd-color-rgb="mdColorRgb"\n\t\tmd-color-hsl="mdColorHsl"\n\t\tmd-color-default-tab="mdColorDefaultTab"\n\t></div>\n\t<md-actions layout="row">\n\t\t<md-button class="md-mini" ng-click="close()" style="width: 50%;">Cancel</md-button>\n\t\t<md-button class="md-mini" ng-click="ok()" style="width: 50%;">Select</md-button>\n\t</md-actions>\n</md-dialog>\n')}])}(angular,window,tinycolor),function(e,t){"function"==typeof define&&define.amd?define(["angular"],t):t(angular)}(0,function(e){e.module("ckeditor",[]).directive("ckeditor",["$parse",function(o){return{restrict:"A",require:["ckeditor","ngModel"],controller:["$scope","$element","$attrs","$parse","$q",t],link:function(e,t,n,r){var i=r[0],a=r[1];i.ready().then(function(){["dataReady","change","blur","saveSnapshot"].forEach(function(e){i.onCKEvent(e,function(){a.$setViewValue(i.instance.getData()||"")})}),i.instance.setReadOnly(!!n.readonly),n.$observe("readonly",function(e){i.instance.setReadOnly(!!e)}),l(function(){o(n.ready)(e)})}),a.$render=function(){i.ready().then(function(){i.instance.setData(a.$viewValue||"",{noSnapshot:!0,callback:function(){i.instance.fire("updateSnapshot")}})})}}}}]);var l=window&&window.setImmediate?window.setImmediate:function(e){setTimeout(e,0)};function t(r,e,t,n,i){var a,o=n(t.ckeditor)(r)||{},s=e[0],c=i.defer();a=s.hasAttribute("contenteditable")&&"true"==s.getAttribute("contenteditable").toLowerCase()?this.instance=CKEDITOR.inline(s,o):this.instance=CKEDITOR.replace(s,o),this.onCKEvent=function(e,t){function n(){var e=arguments;r.$apply(function(){t.apply(null,e)})}return a.on(e,function(){var e=arguments;l(function(){n.apply(null,e)})}),function(){a.removeListener(e,n)}},this.onCKEvent("instanceReady",function(){c.resolve(!0)}),this.ready=function(){return c.promise},r.$on("$destroy",function(){c.promise.then(function(){a.destroy(!1)})})}}),function(d){d.emojioneList={":kiss_mm:":{uc_base:"1f468-2764-1f48b-1f468",uc_output:"1f468-200d-2764-fe0f-200d-1f48b-200d-1f468",uc_match:"1f468-2764-fe0f-1f48b-1f468",uc_greedy:"1f468-2764-1f48b-1f468",shortnames:[":couplekiss_mm:"],category:"people"},":kiss_woman_man:":{uc_base:"1f469-2764-1f48b-1f468",uc_output:"1f469-200d-2764-fe0f-200d-1f48b-200d-1f468",uc_match:"1f469-2764-fe0f-1f48b-1f468",uc_greedy:"1f469-2764-1f48b-1f468",shortnames:[],category:"people"},":kiss_ww:":{uc_base:"1f469-2764-1f48b-1f469",uc_output:"1f469-200d-2764-fe0f-200d-1f48b-200d-1f469",uc_match:"1f469-2764-fe0f-1f48b-1f469",uc_greedy:"1f469-2764-1f48b-1f469",shortnames:[":couplekiss_ww:"],category:"people"},":england:":{uc_base:"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",uc_output:"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",uc_match:"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",uc_greedy:"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",shortnames:[],category:"flags"},":scotland:":{uc_base:"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",uc_output:"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",uc_match:"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",uc_greedy:"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",shortnames:[],category:"flags"},":wales:":{uc_base:"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",uc_output:"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",uc_match:"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",uc_greedy:"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",shortnames:[],category:"flags"},":family_mmbb:":{uc_base:"1f468-1f468-1f466-1f466",uc_output:"1f468-200d-1f468-200d-1f466-200d-1f466",uc_match:"1f468-1f468-1f466-1f466",uc_greedy:"1f468-1f468-1f466-1f466",shortnames:[],category:"people"},":family_mmgb:":{uc_base:"1f468-1f468-1f467-1f466",uc_output:"1f468-200d-1f468-200d-1f467-200d-1f466",uc_match:"1f468-1f468-1f467-1f466",uc_greedy:"1f468-1f468-1f467-1f466",shortnames:[],category:"people"},":family_mmgg:":{uc_base:"1f468-1f468-1f467-1f467",uc_output:"1f468-200d-1f468-200d-1f467-200d-1f467",uc_match:"1f468-1f468-1f467-1f467",uc_greedy:"1f468-1f468-1f467-1f467",shortnames:[],category:"people"},":family_mwbb:":{uc_base:"1f468-1f469-1f466-1f466",uc_output:"1f468-200d-1f469-200d-1f466-200d-1f466",uc_match:"1f468-1f469-1f466-1f466",uc_greedy:"1f468-1f469-1f466-1f466",shortnames:[],category:"people"},":family_mwgb:":{uc_base:"1f468-1f469-1f467-1f466",uc_output:"1f468-200d-1f469-200d-1f467-200d-1f466",uc_match:"1f468-1f469-1f467-1f466",uc_greedy:"1f468-1f469-1f467-1f466",shortnames:[],category:"people"},":family_mwgg:":{uc_base:"1f468-1f469-1f467-1f467",uc_output:"1f468-200d-1f469-200d-1f467-200d-1f467",uc_match:"1f468-1f469-1f467-1f467",uc_greedy:"1f468-1f469-1f467-1f467",shortnames:[],category:"people"},":family_wwbb:":{uc_base:"1f469-1f469-1f466-1f466",uc_output:"1f469-200d-1f469-200d-1f466-200d-1f466",uc_match:"1f469-1f469-1f466-1f466",uc_greedy:"1f469-1f469-1f466-1f466",shortnames:[],category:"people"},":family_wwgb:":{uc_base:"1f469-1f469-1f467-1f466",uc_output:"1f469-200d-1f469-200d-1f467-200d-1f466",uc_match:"1f469-1f469-1f467-1f466",uc_greedy:"1f469-1f469-1f467-1f466",shortnames:[],category:"people"},":family_wwgg:":{uc_base:"1f469-1f469-1f467-1f467",uc_output:"1f469-200d-1f469-200d-1f467-200d-1f467",uc_match:"1f469-1f469-1f467-1f467",uc_greedy:"1f469-1f469-1f467-1f467",shortnames:[],category:"people"},":couple_mm:":{uc_base:"1f468-2764-1f468",uc_output:"1f468-200d-2764-fe0f-200d-1f468",uc_match:"1f468-2764-fe0f-1f468",uc_greedy:"1f468-2764-1f468",shortnames:[":couple_with_heart_mm:"],category:"people"},":couple_with_heart_woman_man:":{uc_base:"1f469-2764-1f468",uc_output:"1f469-200d-2764-fe0f-200d-1f468",uc_match:"1f469-2764-fe0f-1f468",uc_greedy:"1f469-2764-1f468",shortnames:[],category:"people"},":couple_ww:":{uc_base:"1f469-2764-1f469",uc_output:"1f469-200d-2764-fe0f-200d-1f469",uc_match:"1f469-2764-fe0f-1f469",uc_greedy:"1f469-2764-1f469",shortnames:[":couple_with_heart_ww:"],category:"people"},":family_man_boy_boy:":{uc_base:"1f468-1f466-1f466",uc_output:"1f468-200d-1f466-200d-1f466",uc_match:"1f468-1f466-1f466",uc_greedy:"1f468-1f466-1f466",shortnames:[],category:"people"},":family_man_girl_boy:":{uc_base:"1f468-1f467-1f466",uc_output:"1f468-200d-1f467-200d-1f466",uc_match:"1f468-1f467-1f466",uc_greedy:"1f468-1f467-1f466",shortnames:[],category:"people"},":family_man_girl_girl:":{uc_base:"1f468-1f467-1f467",uc_output:"1f468-200d-1f467-200d-1f467",uc_match:"1f468-1f467-1f467",uc_greedy:"1f468-1f467-1f467",shortnames:[],category:"people"},":family_man_woman_boy:":{uc_base:"1f468-1f469-1f466",uc_output:"1f468-200d-1f469-200d-1f466",uc_match:"1f468-1f469-1f466",uc_greedy:"1f468-1f469-1f466",shortnames:[],category:"people"},":family_mmb:":{uc_base:"1f468-1f468-1f466",uc_output:"1f468-200d-1f468-200d-1f466",uc_match:"1f468-1f468-1f466",uc_greedy:"1f468-1f468-1f466",shortnames:[],category:"people"},":family_mmg:":{uc_base:"1f468-1f468-1f467",uc_output:"1f468-200d-1f468-200d-1f467",uc_match:"1f468-1f468-1f467",uc_greedy:"1f468-1f468-1f467",shortnames:[],category:"people"},":family_mwg:":{uc_base:"1f468-1f469-1f467",uc_output:"1f468-200d-1f469-200d-1f467",uc_match:"1f468-1f469-1f467",uc_greedy:"1f468-1f469-1f467",shortnames:[],category:"people"},":family_woman_boy_boy:":{uc_base:"1f469-1f466-1f466",uc_output:"1f469-200d-1f466-200d-1f466",uc_match:"1f469-1f466-1f466",uc_greedy:"1f469-1f466-1f466",shortnames:[],category:"people"},":family_woman_girl_boy:":{uc_base:"1f469-1f467-1f466",uc_output:"1f469-200d-1f467-200d-1f466",uc_match:"1f469-1f467-1f466",uc_greedy:"1f469-1f467-1f466",shortnames:[],category:"people"},":family_woman_girl_girl:":{uc_base:"1f469-1f467-1f467",uc_output:"1f469-200d-1f467-200d-1f467",uc_match:"1f469-1f467-1f467",uc_greedy:"1f469-1f467-1f467",shortnames:[],category:"people"},":family_wwb:":{uc_base:"1f469-1f469-1f466",uc_output:"1f469-200d-1f469-200d-1f466",uc_match:"1f469-1f469-1f466",uc_greedy:"1f469-1f469-1f466",shortnames:[],category:"people"},":family_wwg:":{uc_base:"1f469-1f469-1f467",uc_output:"1f469-200d-1f469-200d-1f467",uc_match:"1f469-1f469-1f467",uc_greedy:"1f469-1f469-1f467",shortnames:[],category:"people"},":blond-haired_man_tone1:":{uc_base:"1f471-1f3fb-2642",uc_output:"1f471-1f3fb-200d-2642-fe0f",uc_match:"1f471-1f3fb-2642-fe0f",uc_greedy:"1f471-1f3fb-2642",shortnames:[":blond-haired_man_light_skin_tone:"],category:"people"},":blond-haired_man_tone2:":{uc_base:"1f471-1f3fc-2642",uc_output:"1f471-1f3fc-200d-2642-fe0f",uc_match:"1f471-1f3fc-2642-fe0f",uc_greedy:"1f471-1f3fc-2642",shortnames:[":blond-haired_man_medium_light_skin_tone:"],category:"people"},":blond-haired_man_tone3:":{uc_base:"1f471-1f3fd-2642",uc_output:"1f471-1f3fd-200d-2642-fe0f",uc_match:"1f471-1f3fd-2642-fe0f",uc_greedy:"1f471-1f3fd-2642",shortnames:[":blond-haired_man_medium_skin_tone:"],category:"people"},":blond-haired_man_tone4:":{uc_base:"1f471-1f3fe-2642",uc_output:"1f471-1f3fe-200d-2642-fe0f",uc_match:"1f471-1f3fe-2642-fe0f",uc_greedy:"1f471-1f3fe-2642",shortnames:[":blond-haired_man_medium_dark_skin_tone:"],category:"people"},":blond-haired_man_tone5:":{uc_base:"1f471-1f3ff-2642",uc_output:"1f471-1f3ff-200d-2642-fe0f",uc_match:"1f471-1f3ff-2642-fe0f",uc_greedy:"1f471-1f3ff-2642",shortnames:[":blond-haired_man_dark_skin_tone:"],category:"people"},":blond-haired_woman_tone1:":{uc_base:"1f471-1f3fb-2640",uc_output:"1f471-1f3fb-200d-2640-fe0f",uc_match:"1f471-1f3fb-2640-fe0f",uc_greedy:"1f471-1f3fb-2640",shortnames:[":blond-haired_woman_light_skin_tone:"],category:"people"},":blond-haired_woman_tone2:":{uc_base:"1f471-1f3fc-2640",uc_output:"1f471-1f3fc-200d-2640-fe0f",uc_match:"1f471-1f3fc-2640-fe0f",uc_greedy:"1f471-1f3fc-2640",shortnames:[":blond-haired_woman_medium_light_skin_tone:"],category:"people"},":blond-haired_woman_tone3:":{uc_base:"1f471-1f3fd-2640",uc_output:"1f471-1f3fd-200d-2640-fe0f",uc_match:"1f471-1f3fd-2640-fe0f",uc_greedy:"1f471-1f3fd-2640",shortnames:[":blond-haired_woman_medium_skin_tone:"],category:"people"},":blond-haired_woman_tone4:":{uc_base:"1f471-1f3fe-2640",uc_output:"1f471-1f3fe-200d-2640-fe0f",uc_match:"1f471-1f3fe-2640-fe0f",uc_greedy:"1f471-1f3fe-2640",shortnames:[":blond-haired_woman_medium_dark_skin_tone:"],category:"people"},":blond-haired_woman_tone5:":{uc_base:"1f471-1f3ff-2640",uc_output:"1f471-1f3ff-200d-2640-fe0f",uc_match:"1f471-1f3ff-2640-fe0f",uc_greedy:"1f471-1f3ff-2640",shortnames:[":blond-haired_woman_dark_skin_tone:"],category:"people"},":eye_in_speech_bubble:":{uc_base:"1f441-1f5e8",uc_output:"1f441-fe0f-200d-1f5e8-fe0f",uc_match:"1f441-fe0f-200d-1f5e8",uc_greedy:"1f441-1f5e8",shortnames:[],category:"symbols"},":man_biking_tone1:":{uc_base:"1f6b4-1f3fb-2642",uc_output:"1f6b4-1f3fb-200d-2642-fe0f",uc_match:"1f6b4-1f3fb-2642-fe0f",uc_greedy:"1f6b4-1f3fb-2642",shortnames:[":man_biking_light_skin_tone:"],category:"activity"},":man_biking_tone2:":{uc_base:"1f6b4-1f3fc-2642",uc_output:"1f6b4-1f3fc-200d-2642-fe0f",uc_match:"1f6b4-1f3fc-2642-fe0f",uc_greedy:"1f6b4-1f3fc-2642",shortnames:[":man_biking_medium_light_skin_tone:"],category:"activity"},":man_biking_tone3:":{uc_base:"1f6b4-1f3fd-2642",uc_output:"1f6b4-1f3fd-200d-2642-fe0f",uc_match:"1f6b4-1f3fd-2642-fe0f",uc_greedy:"1f6b4-1f3fd-2642",shortnames:[":man_biking_medium_skin_tone:"],category:"activity"},":man_biking_tone4:":{uc_base:"1f6b4-1f3fe-2642",uc_output:"1f6b4-1f3fe-200d-2642-fe0f",uc_match:"1f6b4-1f3fe-2642-fe0f",uc_greedy:"1f6b4-1f3fe-2642",shortnames:[":man_biking_medium_dark_skin_tone:"],category:"activity"},":man_biking_tone5:":{uc_base:"1f6b4-1f3ff-2642",uc_output:"1f6b4-1f3ff-200d-2642-fe0f",uc_match:"1f6b4-1f3ff-2642-fe0f",uc_greedy:"1f6b4-1f3ff-2642",shortnames:[":man_biking_dark_skin_tone:"],category:"activity"},":man_bowing_tone1:":{uc_base:"1f647-1f3fb-2642",uc_output:"1f647-1f3fb-200d-2642-fe0f",uc_match:"1f647-1f3fb-2642-fe0f",uc_greedy:"1f647-1f3fb-2642",shortnames:[":man_bowing_light_skin_tone:"],category:"people"},":man_bowing_tone2:":{uc_base:"1f647-1f3fc-2642",uc_output:"1f647-1f3fc-200d-2642-fe0f",uc_match:"1f647-1f3fc-2642-fe0f",uc_greedy:"1f647-1f3fc-2642",shortnames:[":man_bowing_medium_light_skin_tone:"],category:"people"},":man_bowing_tone3:":{uc_base:"1f647-1f3fd-2642",uc_output:"1f647-1f3fd-200d-2642-fe0f",uc_match:"1f647-1f3fd-2642-fe0f",uc_greedy:"1f647-1f3fd-2642",shortnames:[":man_bowing_medium_skin_tone:"],category:"people"},":man_bowing_tone4:":{uc_base:"1f647-1f3fe-2642",uc_output:"1f647-1f3fe-200d-2642-fe0f",uc_match:"1f647-1f3fe-2642-fe0f",uc_greedy:"1f647-1f3fe-2642",shortnames:[":man_bowing_medium_dark_skin_tone:"],category:"people"},":man_bowing_tone5:":{uc_base:"1f647-1f3ff-2642",uc_output:"1f647-1f3ff-200d-2642-fe0f",uc_match:"1f647-1f3ff-2642-fe0f",uc_greedy:"1f647-1f3ff-2642",shortnames:[":man_bowing_dark_skin_tone:"],category:"people"},":man_cartwheeling_tone1:":{uc_base:"1f938-1f3fb-2642",uc_output:"1f938-1f3fb-200d-2642-fe0f",uc_match:"1f938-1f3fb-2642-fe0f",uc_greedy:"1f938-1f3fb-2642",shortnames:[":man_cartwheeling_light_skin_tone:"],category:"activity"},":man_cartwheeling_tone2:":{uc_base:"1f938-1f3fc-2642",uc_output:"1f938-1f3fc-200d-2642-fe0f",uc_match:"1f938-1f3fc-2642-fe0f",uc_greedy:"1f938-1f3fc-2642",shortnames:[":man_cartwheeling_medium_light_skin_tone:"],category:"activity"},":man_cartwheeling_tone3:":{uc_base:"1f938-1f3fd-2642",uc_output:"1f938-1f3fd-200d-2642-fe0f",uc_match:"1f938-1f3fd-2642-fe0f",uc_greedy:"1f938-1f3fd-2642",shortnames:[":man_cartwheeling_medium_skin_tone:"],category:"activity"},":man_cartwheeling_tone4:":{uc_base:"1f938-1f3fe-2642",uc_output:"1f938-1f3fe-200d-2642-fe0f",uc_match:"1f938-1f3fe-2642-fe0f",uc_greedy:"1f938-1f3fe-2642",shortnames:[":man_cartwheeling_medium_dark_skin_tone:"],category:"activity"},":man_cartwheeling_tone5:":{uc_base:"1f938-1f3ff-2642",uc_output:"1f938-1f3ff-200d-2642-fe0f",uc_match:"1f938-1f3ff-2642-fe0f",uc_greedy:"1f938-1f3ff-2642",shortnames:[":man_cartwheeling_dark_skin_tone:"],category:"activity"},":man_climbing_tone1:":{uc_base:"1f9d7-1f3fb-2642",uc_output:"1f9d7-1f3fb-200d-2642-fe0f",uc_match:"1f9d7-1f3fb-2642-fe0f",uc_greedy:"1f9d7-1f3fb-2642",shortnames:[":man_climbing_light_skin_tone:"],category:"activity"},":man_climbing_tone2:":{uc_base:"1f9d7-1f3fc-2642",uc_output:"1f9d7-1f3fc-200d-2642-fe0f",uc_match:"1f9d7-1f3fc-2642-fe0f",uc_greedy:"1f9d7-1f3fc-2642",shortnames:[":man_climbing_medium_light_skin_tone:"],category:"activity"},":man_climbing_tone3:":{uc_base:"1f9d7-1f3fd-2642",uc_output:"1f9d7-1f3fd-200d-2642-fe0f",uc_match:"1f9d7-1f3fd-2642-fe0f",uc_greedy:"1f9d7-1f3fd-2642",shortnames:[":man_climbing_medium_skin_tone:"],category:"activity"},":man_climbing_tone4:":{uc_base:"1f9d7-1f3fe-2642",uc_output:"1f9d7-1f3fe-200d-2642-fe0f",uc_match:"1f9d7-1f3fe-2642-fe0f",uc_greedy:"1f9d7-1f3fe-2642",shortnames:[":man_climbing_medium_dark_skin_tone:"],category:"activity"},":man_climbing_tone5:":{uc_base:"1f9d7-1f3ff-2642",uc_output:"1f9d7-1f3ff-200d-2642-fe0f",uc_match:"1f9d7-1f3ff-2642-fe0f",uc_greedy:"1f9d7-1f3ff-2642",shortnames:[":man_climbing_dark_skin_tone:"],category:"activity"},":man_construction_worker_tone1:":{uc_base:"1f477-1f3fb-2642",uc_output:"1f477-1f3fb-200d-2642-fe0f",uc_match:"1f477-1f3fb-2642-fe0f",uc_greedy:"1f477-1f3fb-2642",shortnames:[":man_construction_worker_light_skin_tone:"],category:"people"},":man_construction_worker_tone2:":{uc_base:"1f477-1f3fc-2642",uc_output:"1f477-1f3fc-200d-2642-fe0f",uc_match:"1f477-1f3fc-2642-fe0f",uc_greedy:"1f477-1f3fc-2642",shortnames:[":man_construction_worker_medium_light_skin_tone:"],category:"people"},":man_construction_worker_tone3:":{uc_base:"1f477-1f3fd-2642",uc_output:"1f477-1f3fd-200d-2642-fe0f",uc_match:"1f477-1f3fd-2642-fe0f",uc_greedy:"1f477-1f3fd-2642",shortnames:[":man_construction_worker_medium_skin_tone:"],category:"people"},":man_construction_worker_tone4:":{uc_base:"1f477-1f3fe-2642",uc_output:"1f477-1f3fe-200d-2642-fe0f",uc_match:"1f477-1f3fe-2642-fe0f",uc_greedy:"1f477-1f3fe-2642",shortnames:[":man_construction_worker_medium_dark_skin_tone:"],category:"people"},":man_construction_worker_tone5:":{uc_base:"1f477-1f3ff-2642",uc_output:"1f477-1f3ff-200d-2642-fe0f",uc_match:"1f477-1f3ff-2642-fe0f",uc_greedy:"1f477-1f3ff-2642",shortnames:[":man_construction_worker_dark_skin_tone:"],category:"people"},":man_detective_tone1:":{uc_base:"1f575-1f3fb-2642",uc_output:"1f575-1f3fb-200d-2642-fe0f",uc_match:"1f575-fe0f-1f3fb-2642-fe0f",uc_greedy:"1f575-1f3fb-2642",shortnames:[":man_detective_light_skin_tone:"],category:"people"},":man_detective_tone2:":{uc_base:"1f575-1f3fc-2642",uc_output:"1f575-1f3fc-200d-2642-fe0f",uc_match:"1f575-fe0f-1f3fc-2642-fe0f",uc_greedy:"1f575-1f3fc-2642",shortnames:[":man_detective_medium_light_skin_tone:"],category:"people"},":man_detective_tone3:":{uc_base:"1f575-1f3fd-2642",uc_output:"1f575-1f3fd-200d-2642-fe0f",uc_match:"1f575-fe0f-1f3fd-2642-fe0f",uc_greedy:"1f575-1f3fd-2642",shortnames:[":man_detective_medium_skin_tone:"],category:"people"},":man_detective_tone4:":{uc_base:"1f575-1f3fe-2642",uc_output:"1f575-1f3fe-200d-2642-fe0f",uc_match:"1f575-fe0f-1f3fe-2642-fe0f",uc_greedy:"1f575-1f3fe-2642",shortnames:[":man_detective_medium_dark_skin_tone:"],category:"people"},":man_detective_tone5:":{uc_base:"1f575-1f3ff-2642",uc_output:"1f575-1f3ff-200d-2642-fe0f",uc_match:"1f575-fe0f-1f3ff-2642-fe0f",uc_greedy:"1f575-1f3ff-2642",shortnames:[":man_detective_dark_skin_tone:"],category:"people"},":man_elf_tone1:":{uc_base:"1f9dd-1f3fb-2642",uc_output:"1f9dd-1f3fb-200d-2642-fe0f",uc_match:"1f9dd-1f3fb-2642-fe0f",uc_greedy:"1f9dd-1f3fb-2642",shortnames:[":man_elf_light_skin_tone:"],category:"people"},":man_elf_tone2:":{uc_base:"1f9dd-1f3fc-2642",uc_output:"1f9dd-1f3fc-200d-2642-fe0f",uc_match:"1f9dd-1f3fc-2642-fe0f",uc_greedy:"1f9dd-1f3fc-2642",shortnames:[":man_elf_medium_light_skin_tone:"],category:"people"},":man_elf_tone3:":{uc_base:"1f9dd-1f3fd-2642",uc_output:"1f9dd-1f3fd-200d-2642-fe0f",uc_match:"1f9dd-1f3fd-2642-fe0f",uc_greedy:"1f9dd-1f3fd-2642",shortnames:[":man_elf_medium_skin_tone:"],category:"people"},":man_elf_tone4:":{uc_base:"1f9dd-1f3fe-2642",uc_output:"1f9dd-1f3fe-200d-2642-fe0f",uc_match:"1f9dd-1f3fe-2642-fe0f",uc_greedy:"1f9dd-1f3fe-2642",shortnames:[":man_elf_medium_dark_skin_tone:"],category:"people"},":man_elf_tone5:":{uc_base:"1f9dd-1f3ff-2642",uc_output:"1f9dd-1f3ff-200d-2642-fe0f",uc_match:"1f9dd-1f3ff-2642-fe0f",uc_greedy:"1f9dd-1f3ff-2642",shortnames:[":man_elf_dark_skin_tone:"],category:"people"},":man_facepalming_tone1:":{uc_base:"1f926-1f3fb-2642",uc_output:"1f926-1f3fb-200d-2642-fe0f",uc_match:"1f926-1f3fb-2642-fe0f",uc_greedy:"1f926-1f3fb-2642",shortnames:[":man_facepalming_light_skin_tone:"],category:"people"},":man_facepalming_tone2:":{uc_base:"1f926-1f3fc-2642",uc_output:"1f926-1f3fc-200d-2642-fe0f",uc_match:"1f926-1f3fc-2642-fe0f",uc_greedy:"1f926-1f3fc-2642",shortnames:[":man_facepalming_medium_light_skin_tone:"],category:"people"},":man_facepalming_tone3:":{uc_base:"1f926-1f3fd-2642",uc_output:"1f926-1f3fd-200d-2642-fe0f",uc_match:"1f926-1f3fd-2642-fe0f",uc_greedy:"1f926-1f3fd-2642",shortnames:[":man_facepalming_medium_skin_tone:"],category:"people"},":man_facepalming_tone4:":{uc_base:"1f926-1f3fe-2642",uc_output:"1f926-1f3fe-200d-2642-fe0f",uc_match:"1f926-1f3fe-2642-fe0f",uc_greedy:"1f926-1f3fe-2642",shortnames:[":man_facepalming_medium_dark_skin_tone:"],category:"people"},":man_facepalming_tone5:":{uc_base:"1f926-1f3ff-2642",uc_output:"1f926-1f3ff-200d-2642-fe0f",uc_match:"1f926-1f3ff-2642-fe0f",uc_greedy:"1f926-1f3ff-2642",shortnames:[":man_facepalming_dark_skin_tone:"],category:"people"},":man_fairy_tone1:":{uc_base:"1f9da-1f3fb-2642",uc_output:"1f9da-1f3fb-200d-2642-fe0f",uc_match:"1f9da-1f3fb-2642-fe0f",uc_greedy:"1f9da-1f3fb-2642",shortnames:[":man_fairy_light_skin_tone:"],category:"people"},":man_fairy_tone2:":{uc_base:"1f9da-1f3fc-2642",uc_output:"1f9da-1f3fc-200d-2642-fe0f",uc_match:"1f9da-1f3fc-2642-fe0f",uc_greedy:"1f9da-1f3fc-2642",shortnames:[":man_fairy_medium_light_skin_tone:"],category:"people"},":man_fairy_tone3:":{uc_base:"1f9da-1f3fd-2642",uc_output:"1f9da-1f3fd-200d-2642-fe0f",uc_match:"1f9da-1f3fd-2642-fe0f",uc_greedy:"1f9da-1f3fd-2642",shortnames:[":man_fairy_medium_skin_tone:"],category:"people"},":man_fairy_tone4:":{uc_base:"1f9da-1f3fe-2642",uc_output:"1f9da-1f3fe-200d-2642-fe0f",uc_match:"1f9da-1f3fe-2642-fe0f",uc_greedy:"1f9da-1f3fe-2642",shortnames:[":man_fairy_medium_dark_skin_tone:"],category:"people"},":man_fairy_tone5:":{uc_base:"1f9da-1f3ff-2642",uc_output:"1f9da-1f3ff-200d-2642-fe0f",uc_match:"1f9da-1f3ff-2642-fe0f",uc_greedy:"1f9da-1f3ff-2642",shortnames:[":man_fairy_dark_skin_tone:"],category:"people"},":man_frowning_tone1:":{uc_base:"1f64d-1f3fb-2642",uc_output:"1f64d-1f3fb-200d-2642-fe0f",uc_match:"1f64d-1f3fb-2642-fe0f",uc_greedy:"1f64d-1f3fb-2642",shortnames:[":man_frowning_light_skin_tone:"],category:"people"},":man_frowning_tone2:":{uc_base:"1f64d-1f3fc-2642",uc_output:"1f64d-1f3fc-200d-2642-fe0f",uc_match:"1f64d-1f3fc-2642-fe0f",uc_greedy:"1f64d-1f3fc-2642",shortnames:[":man_frowning_medium_light_skin_tone:"],category:"people"},":man_frowning_tone3:":{uc_base:"1f64d-1f3fd-2642",uc_output:"1f64d-1f3fd-200d-2642-fe0f",uc_match:"1f64d-1f3fd-2642-fe0f",uc_greedy:"1f64d-1f3fd-2642",shortnames:[":man_frowning_medium_skin_tone:"],category:"people"},":man_frowning_tone4:":{uc_base:"1f64d-1f3fe-2642",uc_output:"1f64d-1f3fe-200d-2642-fe0f",uc_match:"1f64d-1f3fe-2642-fe0f",uc_greedy:"1f64d-1f3fe-2642",shortnames:[":man_frowning_medium_dark_skin_tone:"],category:"people"},":man_frowning_tone5:":{uc_base:"1f64d-1f3ff-2642",uc_output:"1f64d-1f3ff-200d-2642-fe0f",uc_match:"1f64d-1f3ff-2642-fe0f",uc_greedy:"1f64d-1f3ff-2642",shortnames:[":man_frowning_dark_skin_tone:"],category:"people"},":man_gesturing_no_tone1:":{uc_base:"1f645-1f3fb-2642",uc_output:"1f645-1f3fb-200d-2642-fe0f",uc_match:"1f645-1f3fb-2642-fe0f",uc_greedy:"1f645-1f3fb-2642",shortnames:[":man_gesturing_no_light_skin_tone:"],category:"people"},":man_gesturing_no_tone2:":{uc_base:"1f645-1f3fc-2642",uc_output:"1f645-1f3fc-200d-2642-fe0f",uc_match:"1f645-1f3fc-2642-fe0f",uc_greedy:"1f645-1f3fc-2642",shortnames:[":man_gesturing_no_medium_light_skin_tone:"],category:"people"},":man_gesturing_no_tone3:":{uc_base:"1f645-1f3fd-2642",uc_output:"1f645-1f3fd-200d-2642-fe0f",uc_match:"1f645-1f3fd-2642-fe0f",uc_greedy:"1f645-1f3fd-2642",shortnames:[":man_gesturing_no_medium_skin_tone:"],category:"people"},":man_gesturing_no_tone4:":{uc_base:"1f645-1f3fe-2642",uc_output:"1f645-1f3fe-200d-2642-fe0f",uc_match:"1f645-1f3fe-2642-fe0f",uc_greedy:"1f645-1f3fe-2642",shortnames:[":man_gesturing_no_medium_dark_skin_tone:"],category:"people"},":man_gesturing_no_tone5:":{uc_base:"1f645-1f3ff-2642",uc_output:"1f645-1f3ff-200d-2642-fe0f",uc_match:"1f645-1f3ff-2642-fe0f",uc_greedy:"1f645-1f3ff-2642",shortnames:[":man_gesturing_no_dark_skin_tone:"],category:"people"},":man_gesturing_ok_tone1:":{uc_base:"1f646-1f3fb-2642",uc_output:"1f646-1f3fb-200d-2642-fe0f",uc_match:"1f646-1f3fb-2642-fe0f",uc_greedy:"1f646-1f3fb-2642",shortnames:[":man_gesturing_ok_light_skin_tone:"],category:"people"},":man_gesturing_ok_tone2:":{uc_base:"1f646-1f3fc-2642",uc_output:"1f646-1f3fc-200d-2642-fe0f",uc_match:"1f646-1f3fc-2642-fe0f",uc_greedy:"1f646-1f3fc-2642",shortnames:[":man_gesturing_ok_medium_light_skin_tone:"],category:"people"},":man_gesturing_ok_tone3:":{uc_base:"1f646-1f3fd-2642",uc_output:"1f646-1f3fd-200d-2642-fe0f",uc_match:"1f646-1f3fd-2642-fe0f",uc_greedy:"1f646-1f3fd-2642",shortnames:[":man_gesturing_ok_medium_skin_tone:"],category:"people"},":man_gesturing_ok_tone4:":{uc_base:"1f646-1f3fe-2642",uc_output:"1f646-1f3fe-200d-2642-fe0f",uc_match:"1f646-1f3fe-2642-fe0f",uc_greedy:"1f646-1f3fe-2642",shortnames:[":man_gesturing_ok_medium_dark_skin_tone:"],category:"people"},":man_gesturing_ok_tone5:":{uc_base:"1f646-1f3ff-2642",uc_output:"1f646-1f3ff-200d-2642-fe0f",uc_match:"1f646-1f3ff-2642-fe0f",uc_greedy:"1f646-1f3ff-2642",shortnames:[":man_gesturing_ok_dark_skin_tone:"],category:"people"},":man_getting_face_massage_tone1:":{uc_base:"1f486-1f3fb-2642",uc_output:"1f486-1f3fb-200d-2642-fe0f",uc_match:"1f486-1f3fb-2642-fe0f",uc_greedy:"1f486-1f3fb-2642",shortnames:[":man_getting_face_massage_light_skin_tone:"],category:"people"},":man_getting_face_massage_tone2:":{uc_base:"1f486-1f3fc-2642",uc_output:"1f486-1f3fc-200d-2642-fe0f",uc_match:"1f486-1f3fc-2642-fe0f",uc_greedy:"1f486-1f3fc-2642",shortnames:[":man_getting_face_massage_medium_light_skin_tone:"],category:"people"},":man_getting_face_massage_tone3:":{uc_base:"1f486-1f3fd-2642",uc_output:"1f486-1f3fd-200d-2642-fe0f",uc_match:"1f486-1f3fd-2642-fe0f",uc_greedy:"1f486-1f3fd-2642",shortnames:[":man_getting_face_massage_medium_skin_tone:"],category:"people"},":man_getting_face_massage_tone4:":{uc_base:"1f486-1f3fe-2642",uc_output:"1f486-1f3fe-200d-2642-fe0f",uc_match:"1f486-1f3fe-2642-fe0f",uc_greedy:"1f486-1f3fe-2642",shortnames:[":man_getting_face_massage_medium_dark_skin_tone:"],category:"people"},":man_getting_face_massage_tone5:":{uc_base:"1f486-1f3ff-2642",uc_output:"1f486-1f3ff-200d-2642-fe0f",uc_match:"1f486-1f3ff-2642-fe0f",uc_greedy:"1f486-1f3ff-2642",shortnames:[":man_getting_face_massage_dark_skin_tone:"],category:"people"},":man_getting_haircut_tone1:":{uc_base:"1f487-1f3fb-2642",uc_output:"1f487-1f3fb-200d-2642-fe0f",uc_match:"1f487-1f3fb-2642-fe0f",uc_greedy:"1f487-1f3fb-2642",shortnames:[":man_getting_haircut_light_skin_tone:"],category:"people"},":man_getting_haircut_tone2:":{uc_base:"1f487-1f3fc-2642",uc_output:"1f487-1f3fc-200d-2642-fe0f",uc_match:"1f487-1f3fc-2642-fe0f",uc_greedy:"1f487-1f3fc-2642",shortnames:[":man_getting_haircut_medium_light_skin_tone:"],category:"people"},":man_getting_haircut_tone3:":{uc_base:"1f487-1f3fd-2642",uc_output:"1f487-1f3fd-200d-2642-fe0f",uc_match:"1f487-1f3fd-2642-fe0f",uc_greedy:"1f487-1f3fd-2642",shortnames:[":man_getting_haircut_medium_skin_tone:"],category:"people"},":man_getting_haircut_tone4:":{uc_base:"1f487-1f3fe-2642",uc_output:"1f487-1f3fe-200d-2642-fe0f",uc_match:"1f487-1f3fe-2642-fe0f",uc_greedy:"1f487-1f3fe-2642",shortnames:[":man_getting_haircut_medium_dark_skin_tone:"],category:"people"},":man_getting_haircut_tone5:":{uc_base:"1f487-1f3ff-2642",uc_output:"1f487-1f3ff-200d-2642-fe0f",uc_match:"1f487-1f3ff-2642-fe0f",uc_greedy:"1f487-1f3ff-2642",shortnames:[":man_getting_haircut_dark_skin_tone:"],category:"people"},":man_golfing_tone1:":{uc_base:"1f3cc-1f3fb-2642",uc_output:"1f3cc-1f3fb-200d-2642-fe0f",uc_match:"1f3cc-fe0f-1f3fb-2642-fe0f",uc_greedy:"1f3cc-1f3fb-2642",shortnames:[":man_golfing_light_skin_tone:"],category:"activity"},":man_golfing_tone2:":{uc_base:"1f3cc-1f3fc-2642",uc_output:"1f3cc-1f3fc-200d-2642-fe0f",uc_match:"1f3cc-fe0f-1f3fc-2642-fe0f",uc_greedy:"1f3cc-1f3fc-2642",shortnames:[":man_golfing_medium_light_skin_tone:"],category:"activity"},":man_golfing_tone3:":{uc_base:"1f3cc-1f3fd-2642",uc_output:"1f3cc-1f3fd-200d-2642-fe0f",uc_match:"1f3cc-fe0f-1f3fd-2642-fe0f",uc_greedy:"1f3cc-1f3fd-2642",shortnames:[":man_golfing_medium_skin_tone:"],category:"activity"},":man_golfing_tone4:":{uc_base:"1f3cc-1f3fe-2642",uc_output:"1f3cc-1f3fe-200d-2642-fe0f",uc_match:"1f3cc-fe0f-1f3fe-2642-fe0f",uc_greedy:"1f3cc-1f3fe-2642",shortnames:[":man_golfing_medium_dark_skin_tone:"],category:"activity"},":man_golfing_tone5:":{uc_base:"1f3cc-1f3ff-2642",uc_output:"1f3cc-1f3ff-200d-2642-fe0f",uc_match:"1f3cc-fe0f-1f3ff-2642-fe0f",uc_greedy:"1f3cc-1f3ff-2642",shortnames:[":man_golfing_dark_skin_tone:"],category:"activity"},":man_guard_tone1:":{uc_base:"1f482-1f3fb-2642",uc_output:"1f482-1f3fb-200d-2642-fe0f",uc_match:"1f482-1f3fb-2642-fe0f",uc_greedy:"1f482-1f3fb-2642",shortnames:[":man_guard_light_skin_tone:"],category:"people"},":man_guard_tone2:":{uc_base:"1f482-1f3fc-2642",uc_output:"1f482-1f3fc-200d-2642-fe0f",uc_match:"1f482-1f3fc-2642-fe0f",uc_greedy:"1f482-1f3fc-2642",shortnames:[":man_guard_medium_light_skin_tone:"],category:"people"},":man_guard_tone3:":{uc_base:"1f482-1f3fd-2642",uc_output:"1f482-1f3fd-200d-2642-fe0f",uc_match:"1f482-1f3fd-2642-fe0f",uc_greedy:"1f482-1f3fd-2642",shortnames:[":man_guard_medium_skin_tone:"],category:"people"},":man_guard_tone4:":{uc_base:"1f482-1f3fe-2642",uc_output:"1f482-1f3fe-200d-2642-fe0f",uc_match:"1f482-1f3fe-2642-fe0f",uc_greedy:"1f482-1f3fe-2642",shortnames:[":man_guard_medium_dark_skin_tone:"],category:"people"},":man_guard_tone5:":{uc_base:"1f482-1f3ff-2642",uc_output:"1f482-1f3ff-200d-2642-fe0f",uc_match:"1f482-1f3ff-2642-fe0f",uc_greedy:"1f482-1f3ff-2642",shortnames:[":man_guard_dark_skin_tone:"],category:"people"},":man_health_worker_tone1:":{uc_base:"1f468-1f3fb-2695",uc_output:"1f468-1f3fb-200d-2695-fe0f",uc_match:"1f468-1f3fb-2695-fe0f",uc_greedy:"1f468-1f3fb-2695",shortnames:[":man_health_worker_light_skin_tone:"],category:"people"},":man_health_worker_tone2:":{uc_base:"1f468-1f3fc-2695",uc_output:"1f468-1f3fc-200d-2695-fe0f",uc_match:"1f468-1f3fc-2695-fe0f",uc_greedy:"1f468-1f3fc-2695",shortnames:[":man_health_worker_medium_light_skin_tone:"],category:"people"},":man_health_worker_tone3:":{uc_base:"1f468-1f3fd-2695",uc_output:"1f468-1f3fd-200d-2695-fe0f",uc_match:"1f468-1f3fd-2695-fe0f",uc_greedy:"1f468-1f3fd-2695",shortnames:[":man_health_worker_medium_skin_tone:"],category:"people"},":man_health_worker_tone4:":{uc_base:"1f468-1f3fe-2695",uc_output:"1f468-1f3fe-200d-2695-fe0f",uc_match:"1f468-1f3fe-2695-fe0f",uc_greedy:"1f468-1f3fe-2695",shortnames:[":man_health_worker_medium_dark_skin_tone:"],category:"people"},":man_health_worker_tone5:":{uc_base:"1f468-1f3ff-2695",uc_output:"1f468-1f3ff-200d-2695-fe0f",uc_match:"1f468-1f3ff-2695-fe0f",uc_greedy:"1f468-1f3ff-2695",shortnames:[":man_health_worker_dark_skin_tone:"],category:"people"},":man_in_lotus_position_tone1:":{uc_base:"1f9d8-1f3fb-2642",uc_output:"1f9d8-1f3fb-200d-2642-fe0f",uc_match:"1f9d8-1f3fb-2642-fe0f",uc_greedy:"1f9d8-1f3fb-2642",shortnames:[":man_in_lotus_position_light_skin_tone:"],category:"activity"},":man_in_lotus_position_tone2:":{uc_base:"1f9d8-1f3fc-2642",uc_output:"1f9d8-1f3fc-200d-2642-fe0f",uc_match:"1f9d8-1f3fc-2642-fe0f",uc_greedy:"1f9d8-1f3fc-2642",shortnames:[":man_in_lotus_position_medium_light_skin_tone:"],category:"activity"},":man_in_lotus_position_tone3:":{uc_base:"1f9d8-1f3fd-2642",uc_output:"1f9d8-1f3fd-200d-2642-fe0f",uc_match:"1f9d8-1f3fd-2642-fe0f",uc_greedy:"1f9d8-1f3fd-2642",shortnames:[":man_in_lotus_position_medium_skin_tone:"],category:"activity"},":man_in_lotus_position_tone4:":{uc_base:"1f9d8-1f3fe-2642",uc_output:"1f9d8-1f3fe-200d-2642-fe0f",uc_match:"1f9d8-1f3fe-2642-fe0f",uc_greedy:"1f9d8-1f3fe-2642",shortnames:[":man_in_lotus_position_medium_dark_skin_tone:"],category:"activity"},":man_in_lotus_position_tone5:":{uc_base:"1f9d8-1f3ff-2642",uc_output:"1f9d8-1f3ff-200d-2642-fe0f",uc_match:"1f9d8-1f3ff-2642-fe0f",uc_greedy:"1f9d8-1f3ff-2642",shortnames:[":man_in_lotus_position_dark_skin_tone:"],category:"activity"},":man_in_steamy_room_tone1:":{uc_base:"1f9d6-1f3fb-2642",uc_output:"1f9d6-1f3fb-200d-2642-fe0f",uc_match:"1f9d6-1f3fb-2642-fe0f",uc_greedy:"1f9d6-1f3fb-2642",shortnames:[":man_in_steamy_room_light_skin_tone:"],category:"people"},":man_in_steamy_room_tone2:":{uc_base:"1f9d6-1f3fc-2642",uc_output:"1f9d6-1f3fc-200d-2642-fe0f",uc_match:"1f9d6-1f3fc-2642-fe0f",uc_greedy:"1f9d6-1f3fc-2642",shortnames:[":man_in_steamy_room_medium_light_skin_tone:"],category:"people"},":man_in_steamy_room_tone3:":{uc_base:"1f9d6-1f3fd-2642",uc_output:"1f9d6-1f3fd-200d-2642-fe0f",uc_match:"1f9d6-1f3fd-2642-fe0f",uc_greedy:"1f9d6-1f3fd-2642",shortnames:[":man_in_steamy_room_medium_skin_tone:"],category:"people"},":man_in_steamy_room_tone4:":{uc_base:"1f9d6-1f3fe-2642",uc_output:"1f9d6-1f3fe-200d-2642-fe0f",uc_match:"1f9d6-1f3fe-2642-fe0f",uc_greedy:"1f9d6-1f3fe-2642",shortnames:[":man_in_steamy_room_medium_dark_skin_tone:"],category:"people"},":man_in_steamy_room_tone5:":{uc_base:"1f9d6-1f3ff-2642",uc_output:"1f9d6-1f3ff-200d-2642-fe0f",uc_match:"1f9d6-1f3ff-2642-fe0f",uc_greedy:"1f9d6-1f3ff-2642",shortnames:[":man_in_steamy_room_dark_skin_tone:"],category:"people"},":man_judge_tone1:":{uc_base:"1f468-1f3fb-2696",uc_output:"1f468-1f3fb-200d-2696-fe0f",uc_match:"1f468-1f3fb-2696-fe0f",uc_greedy:"1f468-1f3fb-2696",shortnames:[":man_judge_light_skin_tone:"],category:"people"},":man_judge_tone2:":{uc_base:"1f468-1f3fc-2696",uc_output:"1f468-1f3fc-200d-2696-fe0f",uc_match:"1f468-1f3fc-2696-fe0f",uc_greedy:"1f468-1f3fc-2696",shortnames:[":man_judge_medium_light_skin_tone:"],category:"people"},":man_judge_tone3:":{uc_base:"1f468-1f3fd-2696",uc_output:"1f468-1f3fd-200d-2696-fe0f",uc_match:"1f468-1f3fd-2696-fe0f",uc_greedy:"1f468-1f3fd-2696",shortnames:[":man_judge_medium_skin_tone:"],category:"people"},":man_judge_tone4:":{uc_base:"1f468-1f3fe-2696",uc_output:"1f468-1f3fe-200d-2696-fe0f",uc_match:"1f468-1f3fe-2696-fe0f",uc_greedy:"1f468-1f3fe-2696",shortnames:[":man_judge_medium_dark_skin_tone:"],category:"people"},":man_judge_tone5:":{uc_base:"1f468-1f3ff-2696",uc_output:"1f468-1f3ff-200d-2696-fe0f",uc_match:"1f468-1f3ff-2696-fe0f",uc_greedy:"1f468-1f3ff-2696",shortnames:[":man_judge_dark_skin_tone:"],category:"people"},":man_juggling_tone1:":{uc_base:"1f939-1f3fb-2642",uc_output:"1f939-1f3fb-200d-2642-fe0f",uc_match:"1f939-1f3fb-2642-fe0f",uc_greedy:"1f939-1f3fb-2642",shortnames:[":man_juggling_light_skin_tone:"],category:"activity"},":man_juggling_tone2:":{uc_base:"1f939-1f3fc-2642",uc_output:"1f939-1f3fc-200d-2642-fe0f",uc_match:"1f939-1f3fc-2642-fe0f",uc_greedy:"1f939-1f3fc-2642",shortnames:[":man_juggling_medium_light_skin_tone:"],category:"activity"},":man_juggling_tone3:":{uc_base:"1f939-1f3fd-2642",uc_output:"1f939-1f3fd-200d-2642-fe0f",uc_match:"1f939-1f3fd-2642-fe0f",uc_greedy:"1f939-1f3fd-2642",shortnames:[":man_juggling_medium_skin_tone:"],category:"activity"},":man_juggling_tone4:":{uc_base:"1f939-1f3fe-2642",uc_output:"1f939-1f3fe-200d-2642-fe0f",uc_match:"1f939-1f3fe-2642-fe0f",uc_greedy:"1f939-1f3fe-2642",shortnames:[":man_juggling_medium_dark_skin_tone:"],category:"activity"},":man_juggling_tone5:":{uc_base:"1f939-1f3ff-2642",uc_output:"1f939-1f3ff-200d-2642-fe0f",uc_match:"1f939-1f3ff-2642-fe0f",uc_greedy:"1f939-1f3ff-2642",shortnames:[":man_juggling_dark_skin_tone:"],category:"activity"},":man_lifting_weights_tone1:":{uc_base:"1f3cb-1f3fb-2642",uc_output:"1f3cb-1f3fb-200d-2642-fe0f",uc_match:"1f3cb-fe0f-1f3fb-2642-fe0f",uc_greedy:"1f3cb-1f3fb-2642",shortnames:[":man_lifting_weights_light_skin_tone:"],category:"activity"},":man_lifting_weights_tone2:":{uc_base:"1f3cb-1f3fc-2642",uc_output:"1f3cb-1f3fc-200d-2642-fe0f",uc_match:"1f3cb-fe0f-1f3fc-2642-fe0f",uc_greedy:"1f3cb-1f3fc-2642",shortnames:[":man_lifting_weights_medium_light_skin_tone:"],category:"activity"},":man_lifting_weights_tone3:":{uc_base:"1f3cb-1f3fd-2642",uc_output:"1f3cb-1f3fd-200d-2642-fe0f",uc_match:"1f3cb-fe0f-1f3fd-2642-fe0f",uc_greedy:"1f3cb-1f3fd-2642",shortnames:[":man_lifting_weights_medium_skin_tone:"],category:"activity"},":man_lifting_weights_tone4:":{uc_base:"1f3cb-1f3fe-2642",uc_output:"1f3cb-1f3fe-200d-2642-fe0f",uc_match:"1f3cb-fe0f-1f3fe-2642-fe0f",uc_greedy:"1f3cb-1f3fe-2642",shortnames:[":man_lifting_weights_medium_dark_skin_tone:"],category:"activity"},":man_lifting_weights_tone5:":{uc_base:"1f3cb-1f3ff-2642",uc_output:"1f3cb-1f3ff-200d-2642-fe0f",uc_match:"1f3cb-fe0f-1f3ff-2642-fe0f",uc_greedy:"1f3cb-1f3ff-2642",shortnames:[":man_lifting_weights_dark_skin_tone:"],category:"activity"},":man_mage_tone1:":{uc_base:"1f9d9-1f3fb-2642",uc_output:"1f9d9-1f3fb-200d-2642-fe0f",uc_match:"1f9d9-1f3fb-2642-fe0f",uc_greedy:"1f9d9-1f3fb-2642",shortnames:[":man_mage_light_skin_tone:"],category:"people"},":man_mage_tone2:":{uc_base:"1f9d9-1f3fc-2642",uc_output:"1f9d9-1f3fc-200d-2642-fe0f",uc_match:"1f9d9-1f3fc-2642-fe0f",uc_greedy:"1f9d9-1f3fc-2642",shortnames:[":man_mage_medium_light_skin_tone:"],category:"people"},":man_mage_tone3:":{uc_base:"1f9d9-1f3fd-2642",uc_output:"1f9d9-1f3fd-200d-2642-fe0f",uc_match:"1f9d9-1f3fd-2642-fe0f",uc_greedy:"1f9d9-1f3fd-2642",shortnames:[":man_mage_medium_skin_tone:"],category:"people"},":man_mage_tone4:":{uc_base:"1f9d9-1f3fe-2642",uc_output:"1f9d9-1f3fe-200d-2642-fe0f",uc_match:"1f9d9-1f3fe-2642-fe0f",uc_greedy:"1f9d9-1f3fe-2642",shortnames:[":man_mage_medium_dark_skin_tone:"],category:"people"},":man_mage_tone5:":{uc_base:"1f9d9-1f3ff-2642",uc_output:"1f9d9-1f3ff-200d-2642-fe0f",uc_match:"1f9d9-1f3ff-2642-fe0f",uc_greedy:"1f9d9-1f3ff-2642",shortnames:[":man_mage_dark_skin_tone:"],category:"people"},":man_mountain_biking_tone1:":{uc_base:"1f6b5-1f3fb-2642",uc_output:"1f6b5-1f3fb-200d-2642-fe0f",uc_match:"1f6b5-1f3fb-2642-fe0f",uc_greedy:"1f6b5-1f3fb-2642",shortnames:[":man_mountain_biking_light_skin_tone:"],category:"activity"},":man_mountain_biking_tone2:":{uc_base:"1f6b5-1f3fc-2642",uc_output:"1f6b5-1f3fc-200d-2642-fe0f",uc_match:"1f6b5-1f3fc-2642-fe0f",uc_greedy:"1f6b5-1f3fc-2642",shortnames:[":man_mountain_biking_medium_light_skin_tone:"],category:"activity"},":man_mountain_biking_tone3:":{uc_base:"1f6b5-1f3fd-2642",uc_output:"1f6b5-1f3fd-200d-2642-fe0f",uc_match:"1f6b5-1f3fd-2642-fe0f",uc_greedy:"1f6b5-1f3fd-2642",shortnames:[":man_mountain_biking_medium_skin_tone:"],category:"activity"},":man_mountain_biking_tone4:":{uc_base:"1f6b5-1f3fe-2642",uc_output:"1f6b5-1f3fe-200d-2642-fe0f",uc_match:"1f6b5-1f3fe-2642-fe0f",uc_greedy:"1f6b5-1f3fe-2642",shortnames:[":man_mountain_biking_medium_dark_skin_tone:"],category:"activity"},":man_mountain_biking_tone5:":{uc_base:"1f6b5-1f3ff-2642",uc_output:"1f6b5-1f3ff-200d-2642-fe0f",uc_match:"1f6b5-1f3ff-2642-fe0f",uc_greedy:"1f6b5-1f3ff-2642",shortnames:[":man_mountain_biking_dark_skin_tone:"],category:"activity"},":man_pilot_tone1:":{uc_base:"1f468-1f3fb-2708",uc_output:"1f468-1f3fb-200d-2708-fe0f",uc_match:"1f468-1f3fb-2708-fe0f",uc_greedy:"1f468-1f3fb-2708",shortnames:[":man_pilot_light_skin_tone:"],category:"people"},":man_pilot_tone2:":{uc_base:"1f468-1f3fc-2708",uc_output:"1f468-1f3fc-200d-2708-fe0f",uc_match:"1f468-1f3fc-2708-fe0f",uc_greedy:"1f468-1f3fc-2708",shortnames:[":man_pilot_medium_light_skin_tone:"],category:"people"},":man_pilot_tone3:":{uc_base:"1f468-1f3fd-2708",uc_output:"1f468-1f3fd-200d-2708-fe0f",uc_match:"1f468-1f3fd-2708-fe0f",uc_greedy:"1f468-1f3fd-2708",shortnames:[":man_pilot_medium_skin_tone:"],category:"people"},":man_pilot_tone4:":{uc_base:"1f468-1f3fe-2708",uc_output:"1f468-1f3fe-200d-2708-fe0f",uc_match:"1f468-1f3fe-2708-fe0f",uc_greedy:"1f468-1f3fe-2708",shortnames:[":man_pilot_medium_dark_skin_tone:"],category:"people"},":man_pilot_tone5:":{uc_base:"1f468-1f3ff-2708",uc_output:"1f468-1f3ff-200d-2708-fe0f",uc_match:"1f468-1f3ff-2708-fe0f",uc_greedy:"1f468-1f3ff-2708",shortnames:[":man_pilot_dark_skin_tone:"],category:"people"},":man_playing_handball_tone1:":{uc_base:"1f93e-1f3fb-2642",uc_output:"1f93e-1f3fb-200d-2642-fe0f",uc_match:"1f93e-1f3fb-2642-fe0f",uc_greedy:"1f93e-1f3fb-2642",shortnames:[":man_playing_handball_light_skin_tone:"],category:"activity"},":man_playing_handball_tone2:":{uc_base:"1f93e-1f3fc-2642",uc_output:"1f93e-1f3fc-200d-2642-fe0f",uc_match:"1f93e-1f3fc-2642-fe0f",uc_greedy:"1f93e-1f3fc-2642",shortnames:[":man_playing_handball_medium_light_skin_tone:"],category:"activity"},":man_playing_handball_tone3:":{uc_base:"1f93e-1f3fd-2642",uc_output:"1f93e-1f3fd-200d-2642-fe0f",uc_match:"1f93e-1f3fd-2642-fe0f",uc_greedy:"1f93e-1f3fd-2642",shortnames:[":man_playing_handball_medium_skin_tone:"],category:"activity"},":man_playing_handball_tone4:":{uc_base:"1f93e-1f3fe-2642",uc_output:"1f93e-1f3fe-200d-2642-fe0f",uc_match:"1f93e-1f3fe-2642-fe0f",uc_greedy:"1f93e-1f3fe-2642",shortnames:[":man_playing_handball_medium_dark_skin_tone:"],category:"activity"},":man_playing_handball_tone5:":{uc_base:"1f93e-1f3ff-2642",uc_output:"1f93e-1f3ff-200d-2642-fe0f",uc_match:"1f93e-1f3ff-2642-fe0f",uc_greedy:"1f93e-1f3ff-2642",shortnames:[":man_playing_handball_dark_skin_tone:"],category:"activity"},":man_playing_water_polo_tone1:":{uc_base:"1f93d-1f3fb-2642",uc_output:"1f93d-1f3fb-200d-2642-fe0f",uc_match:"1f93d-1f3fb-2642-fe0f",uc_greedy:"1f93d-1f3fb-2642",shortnames:[":man_playing_water_polo_light_skin_tone:"],category:"activity"},":man_playing_water_polo_tone2:":{uc_base:"1f93d-1f3fc-2642",uc_output:"1f93d-1f3fc-200d-2642-fe0f",uc_match:"1f93d-1f3fc-2642-fe0f",uc_greedy:"1f93d-1f3fc-2642",shortnames:[":man_playing_water_polo_medium_light_skin_tone:"],category:"activity"},":man_playing_water_polo_tone3:":{uc_base:"1f93d-1f3fd-2642",uc_output:"1f93d-1f3fd-200d-2642-fe0f",uc_match:"1f93d-1f3fd-2642-fe0f",uc_greedy:"1f93d-1f3fd-2642",shortnames:[":man_playing_water_polo_medium_skin_tone:"],category:"activity"},":man_playing_water_polo_tone4:":{uc_base:"1f93d-1f3fe-2642",uc_output:"1f93d-1f3fe-200d-2642-fe0f",uc_match:"1f93d-1f3fe-2642-fe0f",uc_greedy:"1f93d-1f3fe-2642",shortnames:[":man_playing_water_polo_medium_dark_skin_tone:"],category:"activity"},":man_playing_water_polo_tone5:":{uc_base:"1f93d-1f3ff-2642",uc_output:"1f93d-1f3ff-200d-2642-fe0f",uc_match:"1f93d-1f3ff-2642-fe0f",uc_greedy:"1f93d-1f3ff-2642",shortnames:[":man_playing_water_polo_dark_skin_tone:"],category:"activity"},":man_police_officer_tone1:":{uc_base:"1f46e-1f3fb-2642",uc_output:"1f46e-1f3fb-200d-2642-fe0f",uc_match:"1f46e-1f3fb-2642-fe0f",uc_greedy:"1f46e-1f3fb-2642",shortnames:[":man_police_officer_light_skin_tone:"],category:"people"},":man_police_officer_tone2:":{uc_base:"1f46e-1f3fc-2642",uc_output:"1f46e-1f3fc-200d-2642-fe0f",uc_match:"1f46e-1f3fc-2642-fe0f",uc_greedy:"1f46e-1f3fc-2642",shortnames:[":man_police_officer_medium_light_skin_tone:"],category:"people"},":man_police_officer_tone3:":{uc_base:"1f46e-1f3fd-2642",uc_output:"1f46e-1f3fd-200d-2642-fe0f",uc_match:"1f46e-1f3fd-2642-fe0f",uc_greedy:"1f46e-1f3fd-2642",shortnames:[":man_police_officer_medium_skin_tone:"],category:"people"},":man_police_officer_tone4:":{uc_base:"1f46e-1f3fe-2642",uc_output:"1f46e-1f3fe-200d-2642-fe0f",uc_match:"1f46e-1f3fe-2642-fe0f",uc_greedy:"1f46e-1f3fe-2642",shortnames:[":man_police_officer_medium_dark_skin_tone:"],category:"people"},":man_police_officer_tone5:":{uc_base:"1f46e-1f3ff-2642",uc_output:"1f46e-1f3ff-200d-2642-fe0f",uc_match:"1f46e-1f3ff-2642-fe0f",uc_greedy:"1f46e-1f3ff-2642",shortnames:[":man_police_officer_dark_skin_tone:"],category:"people"},":man_pouting_tone1:":{uc_base:"1f64e-1f3fb-2642",uc_output:"1f64e-1f3fb-200d-2642-fe0f",uc_match:"1f64e-1f3fb-2642-fe0f",uc_greedy:"1f64e-1f3fb-2642",shortnames:[":man_pouting_light_skin_tone:"],category:"people"},":man_pouting_tone2:":{uc_base:"1f64e-1f3fc-2642",uc_output:"1f64e-1f3fc-200d-2642-fe0f",uc_match:"1f64e-1f3fc-2642-fe0f",uc_greedy:"1f64e-1f3fc-2642",shortnames:[":man_pouting_medium_light_skin_tone:"],category:"people"},":man_pouting_tone3:":{uc_base:"1f64e-1f3fd-2642",uc_output:"1f64e-1f3fd-200d-2642-fe0f",uc_match:"1f64e-1f3fd-2642-fe0f",uc_greedy:"1f64e-1f3fd-2642",shortnames:[":man_pouting_medium_skin_tone:"],category:"people"},":man_pouting_tone4:":{uc_base:"1f64e-1f3fe-2642",uc_output:"1f64e-1f3fe-200d-2642-fe0f",uc_match:"1f64e-1f3fe-2642-fe0f",uc_greedy:"1f64e-1f3fe-2642",shortnames:[":man_pouting_medium_dark_skin_tone:"],category:"people"},":man_pouting_tone5:":{uc_base:"1f64e-1f3ff-2642",uc_output:"1f64e-1f3ff-200d-2642-fe0f",uc_match:"1f64e-1f3ff-2642-fe0f",uc_greedy:"1f64e-1f3ff-2642",shortnames:[":man_pouting_dark_skin_tone:"],category:"people"},":man_raising_hand_tone1:":{uc_base:"1f64b-1f3fb-2642",uc_output:"1f64b-1f3fb-200d-2642-fe0f",uc_match:"1f64b-1f3fb-2642-fe0f",uc_greedy:"1f64b-1f3fb-2642",shortnames:[":man_raising_hand_light_skin_tone:"],category:"people"},":man_raising_hand_tone2:":{uc_base:"1f64b-1f3fc-2642",uc_output:"1f64b-1f3fc-200d-2642-fe0f",uc_match:"1f64b-1f3fc-2642-fe0f",uc_greedy:"1f64b-1f3fc-2642",shortnames:[":man_raising_hand_medium_light_skin_tone:"],category:"people"},":man_raising_hand_tone3:":{uc_base:"1f64b-1f3fd-2642",uc_output:"1f64b-1f3fd-200d-2642-fe0f",uc_match:"1f64b-1f3fd-2642-fe0f",uc_greedy:"1f64b-1f3fd-2642",shortnames:[":man_raising_hand_medium_skin_tone:"],category:"people"},":man_raising_hand_tone4:":{uc_base:"1f64b-1f3fe-2642",uc_output:"1f64b-1f3fe-200d-2642-fe0f",uc_match:"1f64b-1f3fe-2642-fe0f",uc_greedy:"1f64b-1f3fe-2642",shortnames:[":man_raising_hand_medium_dark_skin_tone:"],category:"people"},":man_raising_hand_tone5:":{uc_base:"1f64b-1f3ff-2642",uc_output:"1f64b-1f3ff-200d-2642-fe0f",uc_match:"1f64b-1f3ff-2642-fe0f",uc_greedy:"1f64b-1f3ff-2642",shortnames:[":man_raising_hand_dark_skin_tone:"],category:"people"},":man_rowing_boat_tone1:":{uc_base:"1f6a3-1f3fb-2642",uc_output:"1f6a3-1f3fb-200d-2642-fe0f",uc_match:"1f6a3-1f3fb-2642-fe0f",uc_greedy:"1f6a3-1f3fb-2642",shortnames:[":man_rowing_boat_light_skin_tone:"],category:"activity"},":man_rowing_boat_tone2:":{uc_base:"1f6a3-1f3fc-2642",uc_output:"1f6a3-1f3fc-200d-2642-fe0f",uc_match:"1f6a3-1f3fc-2642-fe0f",uc_greedy:"1f6a3-1f3fc-2642",shortnames:[":man_rowing_boat_medium_light_skin_tone:"],category:"activity"},":man_rowing_boat_tone3:":{uc_base:"1f6a3-1f3fd-2642",uc_output:"1f6a3-1f3fd-200d-2642-fe0f",uc_match:"1f6a3-1f3fd-2642-fe0f",uc_greedy:"1f6a3-1f3fd-2642",shortnames:[":man_rowing_boat_medium_skin_tone:"],category:"activity"},":man_rowing_boat_tone4:":{uc_base:"1f6a3-1f3fe-2642",uc_output:"1f6a3-1f3fe-200d-2642-fe0f",uc_match:"1f6a3-1f3fe-2642-fe0f",uc_greedy:"1f6a3-1f3fe-2642",shortnames:[":man_rowing_boat_medium_dark_skin_tone:"],category:"activity"},":man_rowing_boat_tone5:":{uc_base:"1f6a3-1f3ff-2642",uc_output:"1f6a3-1f3ff-200d-2642-fe0f",uc_match:"1f6a3-1f3ff-2642-fe0f",uc_greedy:"1f6a3-1f3ff-2642",shortnames:[":man_rowing_boat_dark_skin_tone:"],category:"activity"},":man_running_tone1:":{uc_base:"1f3c3-1f3fb-2642",uc_output:"1f3c3-1f3fb-200d-2642-fe0f",uc_match:"1f3c3-1f3fb-2642-fe0f",uc_greedy:"1f3c3-1f3fb-2642",shortnames:[":man_running_light_skin_tone:"],category:"people"},":man_running_tone2:":{uc_base:"1f3c3-1f3fc-2642",uc_output:"1f3c3-1f3fc-200d-2642-fe0f",uc_match:"1f3c3-1f3fc-2642-fe0f",uc_greedy:"1f3c3-1f3fc-2642",shortnames:[":man_running_medium_light_skin_tone:"],category:"people"},":man_running_tone3:":{uc_base:"1f3c3-1f3fd-2642",uc_output:"1f3c3-1f3fd-200d-2642-fe0f",uc_match:"1f3c3-1f3fd-2642-fe0f",uc_greedy:"1f3c3-1f3fd-2642",shortnames:[":man_running_medium_skin_tone:"],category:"people"},":man_running_tone4:":{uc_base:"1f3c3-1f3fe-2642",uc_output:"1f3c3-1f3fe-200d-2642-fe0f",uc_match:"1f3c3-1f3fe-2642-fe0f",uc_greedy:"1f3c3-1f3fe-2642",shortnames:[":man_running_medium_dark_skin_tone:"],category:"people"},":man_running_tone5:":{uc_base:"1f3c3-1f3ff-2642",uc_output:"1f3c3-1f3ff-200d-2642-fe0f",uc_match:"1f3c3-1f3ff-2642-fe0f",uc_greedy:"1f3c3-1f3ff-2642",shortnames:[":man_running_dark_skin_tone:"],category:"people"},":man_shrugging_tone1:":{uc_base:"1f937-1f3fb-2642",uc_output:"1f937-1f3fb-200d-2642-fe0f",uc_match:"1f937-1f3fb-2642-fe0f",uc_greedy:"1f937-1f3fb-2642",shortnames:[":man_shrugging_light_skin_tone:"],category:"people"},":man_shrugging_tone2:":{uc_base:"1f937-1f3fc-2642",uc_output:"1f937-1f3fc-200d-2642-fe0f",uc_match:"1f937-1f3fc-2642-fe0f",uc_greedy:"1f937-1f3fc-2642",shortnames:[":man_shrugging_medium_light_skin_tone:"],category:"people"},":man_shrugging_tone3:":{uc_base:"1f937-1f3fd-2642",uc_output:"1f937-1f3fd-200d-2642-fe0f",uc_match:"1f937-1f3fd-2642-fe0f",uc_greedy:"1f937-1f3fd-2642",shortnames:[":man_shrugging_medium_skin_tone:"],category:"people"},":man_shrugging_tone4:":{uc_base:"1f937-1f3fe-2642",uc_output:"1f937-1f3fe-200d-2642-fe0f",uc_match:"1f937-1f3fe-2642-fe0f",uc_greedy:"1f937-1f3fe-2642",shortnames:[":man_shrugging_medium_dark_skin_tone:"],category:"people"},":man_shrugging_tone5:":{uc_base:"1f937-1f3ff-2642",uc_output:"1f937-1f3ff-200d-2642-fe0f",uc_match:"1f937-1f3ff-2642-fe0f",uc_greedy:"1f937-1f3ff-2642",shortnames:[":man_shrugging_dark_skin_tone:"],category:"people"},":man_superhero_tone1:":{uc_base:"1f9b8-1f3fb-2642",uc_output:"1f9b8-1f3fb-200d-2642-fe0f",uc_match:"1f9b8-1f3fb-2642-fe0f",uc_greedy:"1f9b8-1f3fb-2642",shortnames:[":man_superhero_light_skin_tone:"],category:"people"},":man_superhero_tone2:":{uc_base:"1f9b8-1f3fc-2642",uc_output:"1f9b8-1f3fc-200d-2642-fe0f",uc_match:"1f9b8-1f3fc-2642-fe0f",uc_greedy:"1f9b8-1f3fc-2642",shortnames:[":man_superhero_medium_light_skin_tone:"],category:"people"},":man_superhero_tone3:":{uc_base:"1f9b8-1f3fd-2642",uc_output:"1f9b8-1f3fd-200d-2642-fe0f",uc_match:"1f9b8-1f3fd-2642-fe0f",uc_greedy:"1f9b8-1f3fd-2642",shortnames:[":man_superhero_medium_skin_tone:"],category:"people"},":man_superhero_tone4:":{uc_base:"1f9b8-1f3fe-2642",uc_output:"1f9b8-1f3fe-200d-2642-fe0f",uc_match:"1f9b8-1f3fe-2642-fe0f",uc_greedy:"1f9b8-1f3fe-2642",shortnames:[":man_superhero_medium_dark_skin_tone:"],category:"people"},":man_superhero_tone5:":{uc_base:"1f9b8-1f3ff-2642",uc_output:"1f9b8-1f3ff-200d-2642-fe0f",uc_match:"1f9b8-1f3ff-2642-fe0f",uc_greedy:"1f9b8-1f3ff-2642",shortnames:[":man_superhero_dark_skin_tone:"],category:"people"},":man_supervillain_tone1:":{uc_base:"1f9b9-1f3fb-2642",uc_output:"1f9b9-1f3fb-200d-2642-fe0f",uc_match:"1f9b9-1f3fb-2642-fe0f",uc_greedy:"1f9b9-1f3fb-2642",shortnames:[":man_supervillain_light_skin_tone:"],category:"people"},":man_supervillain_tone2:":{uc_base:"1f9b9-1f3fc-2642",uc_output:"1f9b9-1f3fc-200d-2642-fe0f",uc_match:"1f9b9-1f3fc-2642-fe0f",uc_greedy:"1f9b9-1f3fc-2642",shortnames:[":man_supervillain_medium_light_skin_tone:"],category:"people"},":man_supervillain_tone3:":{uc_base:"1f9b9-1f3fd-2642",uc_output:"1f9b9-1f3fd-200d-2642-fe0f",uc_match:"1f9b9-1f3fd-2642-fe0f",uc_greedy:"1f9b9-1f3fd-2642",shortnames:[":man_supervillain_medium_skin_tone:"],category:"people"},":man_supervillain_tone4:":{uc_base:"1f9b9-1f3fe-2642",uc_output:"1f9b9-1f3fe-200d-2642-fe0f",uc_match:"1f9b9-1f3fe-2642-fe0f",uc_greedy:"1f9b9-1f3fe-2642",shortnames:[":man_supervillain_medium_dark_skin_tone:"],category:"people"},":man_supervillain_tone5:":{uc_base:"1f9b9-1f3ff-2642",uc_output:"1f9b9-1f3ff-200d-2642-fe0f",uc_match:"1f9b9-1f3ff-2642-fe0f",uc_greedy:"1f9b9-1f3ff-2642",shortnames:[":man_supervillain_dark_skin_tone:"],category:"people"},":man_surfing_tone1:":{uc_base:"1f3c4-1f3fb-2642",uc_output:"1f3c4-1f3fb-200d-2642-fe0f",uc_match:"1f3c4-1f3fb-2642-fe0f",uc_greedy:"1f3c4-1f3fb-2642",shortnames:[":man_surfing_light_skin_tone:"],category:"activity"},":man_surfing_tone2:":{uc_base:"1f3c4-1f3fc-2642",uc_output:"1f3c4-1f3fc-200d-2642-fe0f",uc_match:"1f3c4-1f3fc-2642-fe0f",uc_greedy:"1f3c4-1f3fc-2642",shortnames:[":man_surfing_medium_light_skin_tone:"],category:"activity"},":man_surfing_tone3:":{uc_base:"1f3c4-1f3fd-2642",uc_output:"1f3c4-1f3fd-200d-2642-fe0f",uc_match:"1f3c4-1f3fd-2642-fe0f",uc_greedy:"1f3c4-1f3fd-2642",shortnames:[":man_surfing_medium_skin_tone:"],category:"activity"},":man_surfing_tone4:":{uc_base:"1f3c4-1f3fe-2642",uc_output:"1f3c4-1f3fe-200d-2642-fe0f",uc_match:"1f3c4-1f3fe-2642-fe0f",uc_greedy:"1f3c4-1f3fe-2642",shortnames:[":man_surfing_medium_dark_skin_tone:"],category:"activity"},":man_surfing_tone5:":{uc_base:"1f3c4-1f3ff-2642",uc_output:"1f3c4-1f3ff-200d-2642-fe0f",uc_match:"1f3c4-1f3ff-2642-fe0f",uc_greedy:"1f3c4-1f3ff-2642",shortnames:[":man_surfing_dark_skin_tone:"],category:"activity"},":man_swimming_tone1:":{uc_base:"1f3ca-1f3fb-2642",uc_output:"1f3ca-1f3fb-200d-2642-fe0f",uc_match:"1f3ca-1f3fb-2642-fe0f",uc_greedy:"1f3ca-1f3fb-2642",shortnames:[":man_swimming_light_skin_tone:"],category:"activity"},":man_swimming_tone2:":{uc_base:"1f3ca-1f3fc-2642",uc_output:"1f3ca-1f3fc-200d-2642-fe0f",uc_match:"1f3ca-1f3fc-2642-fe0f",uc_greedy:"1f3ca-1f3fc-2642",shortnames:[":man_swimming_medium_light_skin_tone:"],category:"activity"},":man_swimming_tone3:":{uc_base:"1f3ca-1f3fd-2642",uc_output:"1f3ca-1f3fd-200d-2642-fe0f",uc_match:"1f3ca-1f3fd-2642-fe0f",uc_greedy:"1f3ca-1f3fd-2642",shortnames:[":man_swimming_medium_skin_tone:"],category:"activity"},":man_swimming_tone4:":{uc_base:"1f3ca-1f3fe-2642",uc_output:"1f3ca-1f3fe-200d-2642-fe0f",uc_match:"1f3ca-1f3fe-2642-fe0f",uc_greedy:"1f3ca-1f3fe-2642",shortnames:[":man_swimming_medium_dark_skin_tone:"],category:"activity"},":man_swimming_tone5:":{uc_base:"1f3ca-1f3ff-2642",uc_output:"1f3ca-1f3ff-200d-2642-fe0f",uc_match:"1f3ca-1f3ff-2642-fe0f",uc_greedy:"1f3ca-1f3ff-2642",shortnames:[":man_swimming_dark_skin_tone:"],category:"activity"},":man_tipping_hand_tone1:":{uc_base:"1f481-1f3fb-2642",uc_output:"1f481-1f3fb-200d-2642-fe0f",uc_match:"1f481-1f3fb-2642-fe0f",uc_greedy:"1f481-1f3fb-2642",shortnames:[":man_tipping_hand_light_skin_tone:"],category:"people"},":man_tipping_hand_tone2:":{uc_base:"1f481-1f3fc-2642",uc_output:"1f481-1f3fc-200d-2642-fe0f",uc_match:"1f481-1f3fc-2642-fe0f",uc_greedy:"1f481-1f3fc-2642",shortnames:[":man_tipping_hand_medium_light_skin_tone:"],category:"people"},":man_tipping_hand_tone3:":{uc_base:"1f481-1f3fd-2642",uc_output:"1f481-1f3fd-200d-2642-fe0f",uc_match:"1f481-1f3fd-2642-fe0f",uc_greedy:"1f481-1f3fd-2642",shortnames:[":man_tipping_hand_medium_skin_tone:"],category:"people"},":man_tipping_hand_tone4:":{uc_base:"1f481-1f3fe-2642",uc_output:"1f481-1f3fe-200d-2642-fe0f",uc_match:"1f481-1f3fe-2642-fe0f",uc_greedy:"1f481-1f3fe-2642",shortnames:[":man_tipping_hand_medium_dark_skin_tone:"],category:"people"},":man_tipping_hand_tone5:":{uc_base:"1f481-1f3ff-2642",uc_output:"1f481-1f3ff-200d-2642-fe0f",uc_match:"1f481-1f3ff-2642-fe0f",uc_greedy:"1f481-1f3ff-2642",shortnames:[":man_tipping_hand_dark_skin_tone:"],category:"people"},":man_vampire_tone1:":{uc_base:"1f9db-1f3fb-2642",uc_output:"1f9db-1f3fb-200d-2642-fe0f",uc_match:"1f9db-1f3fb-2642-fe0f",uc_greedy:"1f9db-1f3fb-2642",shortnames:[":man_vampire_light_skin_tone:"],category:"people"},":man_vampire_tone2:":{uc_base:"1f9db-1f3fc-2642",uc_output:"1f9db-1f3fc-200d-2642-fe0f",uc_match:"1f9db-1f3fc-2642-fe0f",uc_greedy:"1f9db-1f3fc-2642",shortnames:[":man_vampire_medium_light_skin_tone:"],category:"people"},":man_vampire_tone3:":{uc_base:"1f9db-1f3fd-2642",uc_output:"1f9db-1f3fd-200d-2642-fe0f",uc_match:"1f9db-1f3fd-2642-fe0f",uc_greedy:"1f9db-1f3fd-2642",shortnames:[":man_vampire_medium_skin_tone:"],category:"people"},":man_vampire_tone4:":{uc_base:"1f9db-1f3fe-2642",uc_output:"1f9db-1f3fe-200d-2642-fe0f",uc_match:"1f9db-1f3fe-2642-fe0f",uc_greedy:"1f9db-1f3fe-2642",shortnames:[":man_vampire_medium_dark_skin_tone:"],category:"people"},":man_vampire_tone5:":{uc_base:"1f9db-1f3ff-2642",uc_output:"1f9db-1f3ff-200d-2642-fe0f",uc_match:"1f9db-1f3ff-2642-fe0f",uc_greedy:"1f9db-1f3ff-2642",shortnames:[":man_vampire_dark_skin_tone:"],category:"people"},":man_walking_tone1:":{uc_base:"1f6b6-1f3fb-2642",uc_output:"1f6b6-1f3fb-200d-2642-fe0f",uc_match:"1f6b6-1f3fb-2642-fe0f",uc_greedy:"1f6b6-1f3fb-2642",shortnames:[":man_walking_light_skin_tone:"],category:"people"},":man_walking_tone2:":{uc_base:"1f6b6-1f3fc-2642",uc_output:"1f6b6-1f3fc-200d-2642-fe0f",uc_match:"1f6b6-1f3fc-2642-fe0f",uc_greedy:"1f6b6-1f3fc-2642",shortnames:[":man_walking_medium_light_skin_tone:"],category:"people"},":man_walking_tone3:":{uc_base:"1f6b6-1f3fd-2642",uc_output:"1f6b6-1f3fd-200d-2642-fe0f",uc_match:"1f6b6-1f3fd-2642-fe0f",uc_greedy:"1f6b6-1f3fd-2642",shortnames:[":man_walking_medium_skin_tone:"],category:"people"},":man_walking_tone4:":{uc_base:"1f6b6-1f3fe-2642",uc_output:"1f6b6-1f3fe-200d-2642-fe0f",uc_match:"1f6b6-1f3fe-2642-fe0f",uc_greedy:"1f6b6-1f3fe-2642",shortnames:[":man_walking_medium_dark_skin_tone:"],category:"people"},":man_walking_tone5:":{uc_base:"1f6b6-1f3ff-2642",uc_output:"1f6b6-1f3ff-200d-2642-fe0f",uc_match:"1f6b6-1f3ff-2642-fe0f",uc_greedy:"1f6b6-1f3ff-2642",shortnames:[":man_walking_dark_skin_tone:"],category:"people"},":man_wearing_turban_tone1:":{uc_base:"1f473-1f3fb-2642",uc_output:"1f473-1f3fb-200d-2642-fe0f",uc_match:"1f473-1f3fb-2642-fe0f",uc_greedy:"1f473-1f3fb-2642",shortnames:[":man_wearing_turban_light_skin_tone:"],category:"people"},":man_wearing_turban_tone2:":{uc_base:"1f473-1f3fc-2642",uc_output:"1f473-1f3fc-200d-2642-fe0f",uc_match:"1f473-1f3fc-2642-fe0f",uc_greedy:"1f473-1f3fc-2642",shortnames:[":man_wearing_turban_medium_light_skin_tone:"],category:"people"},":man_wearing_turban_tone3:":{uc_base:"1f473-1f3fd-2642",uc_output:"1f473-1f3fd-200d-2642-fe0f",uc_match:"1f473-1f3fd-2642-fe0f",uc_greedy:"1f473-1f3fd-2642",shortnames:[":man_wearing_turban_medium_skin_tone:"],category:"people"},":man_wearing_turban_tone4:":{uc_base:"1f473-1f3fe-2642",uc_output:"1f473-1f3fe-200d-2642-fe0f",uc_match:"1f473-1f3fe-2642-fe0f",uc_greedy:"1f473-1f3fe-2642",shortnames:[":man_wearing_turban_medium_dark_skin_tone:"],category:"people"},":man_wearing_turban_tone5:":{uc_base:"1f473-1f3ff-2642",uc_output:"1f473-1f3ff-200d-2642-fe0f",uc_match:"1f473-1f3ff-2642-fe0f",uc_greedy:"1f473-1f3ff-2642",shortnames:[":man_wearing_turban_dark_skin_tone:"],category:"people"},":mermaid_tone1:":{uc_base:"1f9dc-1f3fb-2640",uc_output:"1f9dc-1f3fb-200d-2640-fe0f",uc_match:"1f9dc-1f3fb-2640-fe0f",uc_greedy:"1f9dc-1f3fb-2640",shortnames:[":mermaid_light_skin_tone:"],category:"people"},":mermaid_tone2:":{uc_base:"1f9dc-1f3fc-2640",uc_output:"1f9dc-1f3fc-200d-2640-fe0f",uc_match:"1f9dc-1f3fc-2640-fe0f",uc_greedy:"1f9dc-1f3fc-2640",shortnames:[":mermaid_medium_light_skin_tone:"],category:"people"},":mermaid_tone3:":{uc_base:"1f9dc-1f3fd-2640",uc_output:"1f9dc-1f3fd-200d-2640-fe0f",uc_match:"1f9dc-1f3fd-2640-fe0f",uc_greedy:"1f9dc-1f3fd-2640",shortnames:[":mermaid_medium_skin_tone:"],category:"people"},":mermaid_tone4:":{uc_base:"1f9dc-1f3fe-2640",uc_output:"1f9dc-1f3fe-200d-2640-fe0f",uc_match:"1f9dc-1f3fe-2640-fe0f",uc_greedy:"1f9dc-1f3fe-2640",shortnames:[":mermaid_medium_dark_skin_tone:"],category:"people"},":mermaid_tone5:":{uc_base:"1f9dc-1f3ff-2640",uc_output:"1f9dc-1f3ff-200d-2640-fe0f",uc_match:"1f9dc-1f3ff-2640-fe0f",uc_greedy:"1f9dc-1f3ff-2640",shortnames:[":mermaid_dark_skin_tone:"],category:"people"},":merman_tone1:":{uc_base:"1f9dc-1f3fb-2642",uc_output:"1f9dc-1f3fb-200d-2642-fe0f",uc_match:"1f9dc-1f3fb-2642-fe0f",uc_greedy:"1f9dc-1f3fb-2642",shortnames:[":merman_light_skin_tone:"],category:"people"},":merman_tone2:":{uc_base:"1f9dc-1f3fc-2642",uc_output:"1f9dc-1f3fc-200d-2642-fe0f",uc_match:"1f9dc-1f3fc-2642-fe0f",uc_greedy:"1f9dc-1f3fc-2642",shortnames:[":merman_medium_light_skin_tone:"],category:"people"},":merman_tone3:":{uc_base:"1f9dc-1f3fd-2642",uc_output:"1f9dc-1f3fd-200d-2642-fe0f",uc_match:"1f9dc-1f3fd-2642-fe0f",uc_greedy:"1f9dc-1f3fd-2642",shortnames:[":merman_medium_skin_tone:"],category:"people"},":merman_tone4:":{uc_base:"1f9dc-1f3fe-2642",uc_output:"1f9dc-1f3fe-200d-2642-fe0f",uc_match:"1f9dc-1f3fe-2642-fe0f",uc_greedy:"1f9dc-1f3fe-2642",shortnames:[":merman_medium_dark_skin_tone:"],category:"people"},":merman_tone5:":{uc_base:"1f9dc-1f3ff-2642",uc_output:"1f9dc-1f3ff-200d-2642-fe0f",uc_match:"1f9dc-1f3ff-2642-fe0f",uc_greedy:"1f9dc-1f3ff-2642",shortnames:[":merman_dark_skin_tone:"],category:"people"},":woman_biking_tone1:":{uc_base:"1f6b4-1f3fb-2640",uc_output:"1f6b4-1f3fb-200d-2640-fe0f",uc_match:"1f6b4-1f3fb-2640-fe0f",uc_greedy:"1f6b4-1f3fb-2640",shortnames:[":woman_biking_light_skin_tone:"],category:"activity"},":woman_biking_tone2:":{uc_base:"1f6b4-1f3fc-2640",uc_output:"1f6b4-1f3fc-200d-2640-fe0f",uc_match:"1f6b4-1f3fc-2640-fe0f",uc_greedy:"1f6b4-1f3fc-2640",shortnames:[":woman_biking_medium_light_skin_tone:"],category:"activity"},":woman_biking_tone3:":{uc_base:"1f6b4-1f3fd-2640",uc_output:"1f6b4-1f3fd-200d-2640-fe0f",uc_match:"1f6b4-1f3fd-2640-fe0f",uc_greedy:"1f6b4-1f3fd-2640",shortnames:[":woman_biking_medium_skin_tone:"],category:"activity"},":woman_biking_tone4:":{uc_base:"1f6b4-1f3fe-2640",uc_output:"1f6b4-1f3fe-200d-2640-fe0f",uc_match:"1f6b4-1f3fe-2640-fe0f",uc_greedy:"1f6b4-1f3fe-2640",shortnames:[":woman_biking_medium_dark_skin_tone:"],category:"activity"},":woman_biking_tone5:":{uc_base:"1f6b4-1f3ff-2640",uc_output:"1f6b4-1f3ff-200d-2640-fe0f",uc_match:"1f6b4-1f3ff-2640-fe0f",uc_greedy:"1f6b4-1f3ff-2640",shortnames:[":woman_biking_dark_skin_tone:"],category:"activity"},":woman_bowing_tone1:":{uc_base:"1f647-1f3fb-2640",uc_output:"1f647-1f3fb-200d-2640-fe0f",uc_match:"1f647-1f3fb-2640-fe0f",uc_greedy:"1f647-1f3fb-2640",shortnames:[":woman_bowing_light_skin_tone:"],category:"people"},":woman_bowing_tone2:":{uc_base:"1f647-1f3fc-2640",uc_output:"1f647-1f3fc-200d-2640-fe0f",uc_match:"1f647-1f3fc-2640-fe0f",uc_greedy:"1f647-1f3fc-2640",shortnames:[":woman_bowing_medium_light_skin_tone:"],category:"people"},":woman_bowing_tone3:":{uc_base:"1f647-1f3fd-2640",uc_output:"1f647-1f3fd-200d-2640-fe0f",uc_match:"1f647-1f3fd-2640-fe0f",uc_greedy:"1f647-1f3fd-2640",shortnames:[":woman_bowing_medium_skin_tone:"],category:"people"},":woman_bowing_tone4:":{uc_base:"1f647-1f3fe-2640",uc_output:"1f647-1f3fe-200d-2640-fe0f",uc_match:"1f647-1f3fe-2640-fe0f",uc_greedy:"1f647-1f3fe-2640",shortnames:[":woman_bowing_medium_dark_skin_tone:"],category:"people"},":woman_bowing_tone5:":{uc_base:"1f647-1f3ff-2640",uc_output:"1f647-1f3ff-200d-2640-fe0f",uc_match:"1f647-1f3ff-2640-fe0f",uc_greedy:"1f647-1f3ff-2640",shortnames:[":woman_bowing_dark_skin_tone:"],category:"people"},":woman_cartwheeling_tone1:":{uc_base:"1f938-1f3fb-2640",uc_output:"1f938-1f3fb-200d-2640-fe0f",uc_match:"1f938-1f3fb-2640-fe0f",uc_greedy:"1f938-1f3fb-2640",shortnames:[":woman_cartwheeling_light_skin_tone:"],category:"activity"},":woman_cartwheeling_tone2:":{uc_base:"1f938-1f3fc-2640",uc_output:"1f938-1f3fc-200d-2640-fe0f",uc_match:"1f938-1f3fc-2640-fe0f",uc_greedy:"1f938-1f3fc-2640",shortnames:[":woman_cartwheeling_medium_light_skin_tone:"],category:"activity"},":woman_cartwheeling_tone3:":{uc_base:"1f938-1f3fd-2640",uc_output:"1f938-1f3fd-200d-2640-fe0f",uc_match:"1f938-1f3fd-2640-fe0f",uc_greedy:"1f938-1f3fd-2640",shortnames:[":woman_cartwheeling_medium_skin_tone:"],category:"activity"},":woman_cartwheeling_tone4:":{uc_base:"1f938-1f3fe-2640",uc_output:"1f938-1f3fe-200d-2640-fe0f",uc_match:"1f938-1f3fe-2640-fe0f",uc_greedy:"1f938-1f3fe-2640",shortnames:[":woman_cartwheeling_medium_dark_skin_tone:"],category:"activity"},":woman_cartwheeling_tone5:":{uc_base:"1f938-1f3ff-2640",uc_output:"1f938-1f3ff-200d-2640-fe0f",uc_match:"1f938-1f3ff-2640-fe0f",uc_greedy:"1f938-1f3ff-2640",shortnames:[":woman_cartwheeling_dark_skin_tone:"],category:"activity"},":woman_climbing_tone1:":{uc_base:"1f9d7-1f3fb-2640",uc_output:"1f9d7-1f3fb-200d-2640-fe0f",uc_match:"1f9d7-1f3fb-2640-fe0f",uc_greedy:"1f9d7-1f3fb-2640",shortnames:[":woman_climbing_light_skin_tone:"],category:"activity"},":woman_climbing_tone2:":{uc_base:"1f9d7-1f3fc-2640",uc_output:"1f9d7-1f3fc-200d-2640-fe0f",uc_match:"1f9d7-1f3fc-2640-fe0f",uc_greedy:"1f9d7-1f3fc-2640",shortnames:[":woman_climbing_medium_light_skin_tone:"],category:"activity"},":woman_climbing_tone3:":{uc_base:"1f9d7-1f3fd-2640",uc_output:"1f9d7-1f3fd-200d-2640-fe0f",uc_match:"1f9d7-1f3fd-2640-fe0f",uc_greedy:"1f9d7-1f3fd-2640",shortnames:[":woman_climbing_medium_skin_tone:"],category:"activity"},":woman_climbing_tone4:":{uc_base:"1f9d7-1f3fe-2640",uc_output:"1f9d7-1f3fe-200d-2640-fe0f",uc_match:"1f9d7-1f3fe-2640-fe0f",uc_greedy:"1f9d7-1f3fe-2640",shortnames:[":woman_climbing_medium_dark_skin_tone:"],category:"activity"},":woman_climbing_tone5:":{uc_base:"1f9d7-1f3ff-2640",uc_output:"1f9d7-1f3ff-200d-2640-fe0f",uc_match:"1f9d7-1f3ff-2640-fe0f",uc_greedy:"1f9d7-1f3ff-2640",shortnames:[":woman_climbing_dark_skin_tone:"],category:"activity"},":woman_construction_worker_tone1:":{uc_base:"1f477-1f3fb-2640",uc_output:"1f477-1f3fb-200d-2640-fe0f",uc_match:"1f477-1f3fb-2640-fe0f",uc_greedy:"1f477-1f3fb-2640",shortnames:[":woman_construction_worker_light_skin_tone:"],category:"people"},":woman_construction_worker_tone2:":{uc_base:"1f477-1f3fc-2640",uc_output:"1f477-1f3fc-200d-2640-fe0f",uc_match:"1f477-1f3fc-2640-fe0f",uc_greedy:"1f477-1f3fc-2640",shortnames:[":woman_construction_worker_medium_light_skin_tone:"],category:"people"},":woman_construction_worker_tone3:":{uc_base:"1f477-1f3fd-2640",uc_output:"1f477-1f3fd-200d-2640-fe0f",uc_match:"1f477-1f3fd-2640-fe0f",uc_greedy:"1f477-1f3fd-2640",shortnames:[":woman_construction_worker_medium_skin_tone:"],category:"people"},":woman_construction_worker_tone4:":{uc_base:"1f477-1f3fe-2640",uc_output:"1f477-1f3fe-200d-2640-fe0f",uc_match:"1f477-1f3fe-2640-fe0f",uc_greedy:"1f477-1f3fe-2640",shortnames:[":woman_construction_worker_medium_dark_skin_tone:"],category:"people"},":woman_construction_worker_tone5:":{uc_base:"1f477-1f3ff-2640",uc_output:"1f477-1f3ff-200d-2640-fe0f",uc_match:"1f477-1f3ff-2640-fe0f",uc_greedy:"1f477-1f3ff-2640",shortnames:[":woman_construction_worker_dark_skin_tone:"],category:"people"},":woman_detective_tone1:":{uc_base:"1f575-1f3fb-2640",uc_output:"1f575-1f3fb-200d-2640-fe0f",uc_match:"1f575-fe0f-1f3fb-2640-fe0f",uc_greedy:"1f575-1f3fb-2640",shortnames:[":woman_detective_light_skin_tone:"],category:"people"},":woman_detective_tone2:":{uc_base:"1f575-1f3fc-2640",uc_output:"1f575-1f3fc-200d-2640-fe0f",uc_match:"1f575-fe0f-1f3fc-2640-fe0f",uc_greedy:"1f575-1f3fc-2640",shortnames:[":woman_detective_medium_light_skin_tone:"],category:"people"},":woman_detective_tone3:":{uc_base:"1f575-1f3fd-2640",uc_output:"1f575-1f3fd-200d-2640-fe0f",uc_match:"1f575-fe0f-1f3fd-2640-fe0f",uc_greedy:"1f575-1f3fd-2640",shortnames:[":woman_detective_medium_skin_tone:"],category:"people"},":woman_detective_tone4:":{uc_base:"1f575-1f3fe-2640",uc_output:"1f575-1f3fe-200d-2640-fe0f",uc_match:"1f575-fe0f-1f3fe-2640-fe0f",uc_greedy:"1f575-1f3fe-2640",shortnames:[":woman_detective_medium_dark_skin_tone:"],category:"people"},":woman_detective_tone5:":{uc_base:"1f575-1f3ff-2640",uc_output:"1f575-1f3ff-200d-2640-fe0f",uc_match:"1f575-fe0f-1f3ff-2640-fe0f",uc_greedy:"1f575-1f3ff-2640",shortnames:[":woman_detective_dark_skin_tone:"],category:"people"},":woman_elf_tone1:":{uc_base:"1f9dd-1f3fb-2640",uc_output:"1f9dd-1f3fb-200d-2640-fe0f",uc_match:"1f9dd-1f3fb-2640-fe0f",uc_greedy:"1f9dd-1f3fb-2640",shortnames:[":woman_elf_light_skin_tone:"],category:"people"},":woman_elf_tone2:":{uc_base:"1f9dd-1f3fc-2640",uc_output:"1f9dd-1f3fc-200d-2640-fe0f",uc_match:"1f9dd-1f3fc-2640-fe0f",uc_greedy:"1f9dd-1f3fc-2640",shortnames:[":woman_elf_medium_light_skin_tone:"],category:"people"},":woman_elf_tone3:":{uc_base:"1f9dd-1f3fd-2640",uc_output:"1f9dd-1f3fd-200d-2640-fe0f",uc_match:"1f9dd-1f3fd-2640-fe0f",uc_greedy:"1f9dd-1f3fd-2640",shortnames:[":woman_elf_medium_skin_tone:"],category:"people"},":woman_elf_tone4:":{uc_base:"1f9dd-1f3fe-2640",uc_output:"1f9dd-1f3fe-200d-2640-fe0f",uc_match:"1f9dd-1f3fe-2640-fe0f",uc_greedy:"1f9dd-1f3fe-2640",shortnames:[":woman_elf_medium_dark_skin_tone:"],category:"people"},":woman_elf_tone5:":{uc_base:"1f9dd-1f3ff-2640",uc_output:"1f9dd-1f3ff-200d-2640-fe0f",uc_match:"1f9dd-1f3ff-2640-fe0f",uc_greedy:"1f9dd-1f3ff-2640",shortnames:[":woman_elf_dark_skin_tone:"],category:"people"},":woman_facepalming_tone1:":{uc_base:"1f926-1f3fb-2640",uc_output:"1f926-1f3fb-200d-2640-fe0f",uc_match:"1f926-1f3fb-2640-fe0f",uc_greedy:"1f926-1f3fb-2640",shortnames:[":woman_facepalming_light_skin_tone:"],category:"people"},":woman_facepalming_tone2:":{uc_base:"1f926-1f3fc-2640",uc_output:"1f926-1f3fc-200d-2640-fe0f",uc_match:"1f926-1f3fc-2640-fe0f",uc_greedy:"1f926-1f3fc-2640",shortnames:[":woman_facepalming_medium_light_skin_tone:"],category:"people"},":woman_facepalming_tone3:":{uc_base:"1f926-1f3fd-2640",uc_output:"1f926-1f3fd-200d-2640-fe0f",uc_match:"1f926-1f3fd-2640-fe0f",uc_greedy:"1f926-1f3fd-2640",shortnames:[":woman_facepalming_medium_skin_tone:"],category:"people"},":woman_facepalming_tone4:":{uc_base:"1f926-1f3fe-2640",uc_output:"1f926-1f3fe-200d-2640-fe0f",uc_match:"1f926-1f3fe-2640-fe0f",uc_greedy:"1f926-1f3fe-2640",shortnames:[":woman_facepalming_medium_dark_skin_tone:"],category:"people"},":woman_facepalming_tone5:":{uc_base:"1f926-1f3ff-2640",uc_output:"1f926-1f3ff-200d-2640-fe0f",uc_match:"1f926-1f3ff-2640-fe0f",uc_greedy:"1f926-1f3ff-2640",shortnames:[":woman_facepalming_dark_skin_tone:"],category:"people"},":woman_fairy_tone1:":{uc_base:"1f9da-1f3fb-2640",uc_output:"1f9da-1f3fb-200d-2640-fe0f",uc_match:"1f9da-1f3fb-2640-fe0f",uc_greedy:"1f9da-1f3fb-2640",shortnames:[":woman_fairy_light_skin_tone:"],category:"people"},":woman_fairy_tone2:":{uc_base:"1f9da-1f3fc-2640",uc_output:"1f9da-1f3fc-200d-2640-fe0f",uc_match:"1f9da-1f3fc-2640-fe0f",uc_greedy:"1f9da-1f3fc-2640",shortnames:[":woman_fairy_medium_light_skin_tone:"],category:"people"},":woman_fairy_tone3:":{uc_base:"1f9da-1f3fd-2640",uc_output:"1f9da-1f3fd-200d-2640-fe0f",uc_match:"1f9da-1f3fd-2640-fe0f",uc_greedy:"1f9da-1f3fd-2640",shortnames:[":woman_fairy_medium_skin_tone:"],category:"people"},":woman_fairy_tone4:":{uc_base:"1f9da-1f3fe-2640",uc_output:"1f9da-1f3fe-200d-2640-fe0f",uc_match:"1f9da-1f3fe-2640-fe0f",uc_greedy:"1f9da-1f3fe-2640",shortnames:[":woman_fairy_medium_dark_skin_tone:"],category:"people"},":woman_fairy_tone5:":{uc_base:"1f9da-1f3ff-2640",uc_output:"1f9da-1f3ff-200d-2640-fe0f",uc_match:"1f9da-1f3ff-2640-fe0f",uc_greedy:"1f9da-1f3ff-2640",shortnames:[":woman_fairy_dark_skin_tone:"],category:"people"},":woman_frowning_tone1:":{uc_base:"1f64d-1f3fb-2640",uc_output:"1f64d-1f3fb-200d-2640-fe0f",uc_match:"1f64d-1f3fb-2640-fe0f",uc_greedy:"1f64d-1f3fb-2640",shortnames:[":woman_frowning_light_skin_tone:"],category:"people"},":woman_frowning_tone2:":{uc_base:"1f64d-1f3fc-2640",uc_output:"1f64d-1f3fc-200d-2640-fe0f",uc_match:"1f64d-1f3fc-2640-fe0f",uc_greedy:"1f64d-1f3fc-2640",shortnames:[":woman_frowning_medium_light_skin_tone:"],category:"people"},":woman_frowning_tone3:":{uc_base:"1f64d-1f3fd-2640",uc_output:"1f64d-1f3fd-200d-2640-fe0f",uc_match:"1f64d-1f3fd-2640-fe0f",uc_greedy:"1f64d-1f3fd-2640",shortnames:[":woman_frowning_medium_skin_tone:"],category:"people"},":woman_frowning_tone4:":{uc_base:"1f64d-1f3fe-2640",uc_output:"1f64d-1f3fe-200d-2640-fe0f",uc_match:"1f64d-1f3fe-2640-fe0f",uc_greedy:"1f64d-1f3fe-2640",shortnames:[":woman_frowning_medium_dark_skin_tone:"],category:"people"},":woman_frowning_tone5:":{uc_base:"1f64d-1f3ff-2640",uc_output:"1f64d-1f3ff-200d-2640-fe0f",uc_match:"1f64d-1f3ff-2640-fe0f",uc_greedy:"1f64d-1f3ff-2640",shortnames:[":woman_frowning_dark_skin_tone:"],category:"people"},":woman_gesturing_no_tone1:":{uc_base:"1f645-1f3fb-2640",uc_output:"1f645-1f3fb-200d-2640-fe0f",uc_match:"1f645-1f3fb-2640-fe0f",uc_greedy:"1f645-1f3fb-2640",shortnames:[":woman_gesturing_no_light_skin_tone:"],category:"people"},":woman_gesturing_no_tone2:":{uc_base:"1f645-1f3fc-2640",uc_output:"1f645-1f3fc-200d-2640-fe0f",uc_match:"1f645-1f3fc-2640-fe0f",uc_greedy:"1f645-1f3fc-2640",shortnames:[":woman_gesturing_no_medium_light_skin_tone:"],category:"people"},":woman_gesturing_no_tone3:":{uc_base:"1f645-1f3fd-2640",uc_output:"1f645-1f3fd-200d-2640-fe0f",uc_match:"1f645-1f3fd-2640-fe0f",uc_greedy:"1f645-1f3fd-2640",shortnames:[":woman_gesturing_no_medium_skin_tone:"],category:"people"},":woman_gesturing_no_tone4:":{uc_base:"1f645-1f3fe-2640",uc_output:"1f645-1f3fe-200d-2640-fe0f",uc_match:"1f645-1f3fe-2640-fe0f",uc_greedy:"1f645-1f3fe-2640",shortnames:[":woman_gesturing_no_medium_dark_skin_tone:"],category:"people"},":woman_gesturing_no_tone5:":{uc_base:"1f645-1f3ff-2640",uc_output:"1f645-1f3ff-200d-2640-fe0f",uc_match:"1f645-1f3ff-2640-fe0f",uc_greedy:"1f645-1f3ff-2640",shortnames:[":woman_gesturing_no_dark_skin_tone:"],category:"people"},":woman_gesturing_ok_tone1:":{uc_base:"1f646-1f3fb-2640",uc_output:"1f646-1f3fb-200d-2640-fe0f",uc_match:"1f646-1f3fb-2640-fe0f",uc_greedy:"1f646-1f3fb-2640",shortnames:[":woman_gesturing_ok_light_skin_tone:"],category:"people"},":woman_gesturing_ok_tone2:":{uc_base:"1f646-1f3fc-2640",uc_output:"1f646-1f3fc-200d-2640-fe0f",uc_match:"1f646-1f3fc-2640-fe0f",uc_greedy:"1f646-1f3fc-2640",shortnames:[":woman_gesturing_ok_medium_light_skin_tone:"],category:"people"},":woman_gesturing_ok_tone3:":{uc_base:"1f646-1f3fd-2640",uc_output:"1f646-1f3fd-200d-2640-fe0f",uc_match:"1f646-1f3fd-2640-fe0f",uc_greedy:"1f646-1f3fd-2640",shortnames:[":woman_gesturing_ok_medium_skin_tone:"],category:"people"},":woman_gesturing_ok_tone4:":{uc_base:"1f646-1f3fe-2640",uc_output:"1f646-1f3fe-200d-2640-fe0f",uc_match:"1f646-1f3fe-2640-fe0f",uc_greedy:"1f646-1f3fe-2640",shortnames:[":woman_gesturing_ok_medium_dark_skin_tone:"],category:"people"},":woman_gesturing_ok_tone5:":{uc_base:"1f646-1f3ff-2640",uc_output:"1f646-1f3ff-200d-2640-fe0f",uc_match:"1f646-1f3ff-2640-fe0f",uc_greedy:"1f646-1f3ff-2640",shortnames:[":woman_gesturing_ok_dark_skin_tone:"],category:"people"},":woman_getting_face_massage_tone1:":{uc_base:"1f486-1f3fb-2640",uc_output:"1f486-1f3fb-200d-2640-fe0f",uc_match:"1f486-1f3fb-2640-fe0f",uc_greedy:"1f486-1f3fb-2640",shortnames:[":woman_getting_face_massage_light_skin_tone:"],category:"people"},":woman_getting_face_massage_tone2:":{uc_base:"1f486-1f3fc-2640",uc_output:"1f486-1f3fc-200d-2640-fe0f",uc_match:"1f486-1f3fc-2640-fe0f",uc_greedy:"1f486-1f3fc-2640",shortnames:[":woman_getting_face_massage_medium_light_skin_tone:"],category:"people"},":woman_getting_face_massage_tone3:":{uc_base:"1f486-1f3fd-2640",uc_output:"1f486-1f3fd-200d-2640-fe0f",uc_match:"1f486-1f3fd-2640-fe0f",uc_greedy:"1f486-1f3fd-2640",shortnames:[":woman_getting_face_massage_medium_skin_tone:"],category:"people"},":woman_getting_face_massage_tone4:":{uc_base:"1f486-1f3fe-2640",uc_output:"1f486-1f3fe-200d-2640-fe0f",uc_match:"1f486-1f3fe-2640-fe0f",uc_greedy:"1f486-1f3fe-2640",shortnames:[":woman_getting_face_massage_medium_dark_skin_tone:"],category:"people"},":woman_getting_face_massage_tone5:":{uc_base:"1f486-1f3ff-2640",uc_output:"1f486-1f3ff-200d-2640-fe0f",uc_match:"1f486-1f3ff-2640-fe0f",uc_greedy:"1f486-1f3ff-2640",shortnames:[":woman_getting_face_massage_dark_skin_tone:"],category:"people"},":woman_getting_haircut_tone1:":{uc_base:"1f487-1f3fb-2640",uc_output:"1f487-1f3fb-200d-2640-fe0f",uc_match:"1f487-1f3fb-2640-fe0f",uc_greedy:"1f487-1f3fb-2640",shortnames:[":woman_getting_haircut_light_skin_tone:"],category:"people"},":woman_getting_haircut_tone2:":{uc_base:"1f487-1f3fc-2640",uc_output:"1f487-1f3fc-200d-2640-fe0f",uc_match:"1f487-1f3fc-2640-fe0f",uc_greedy:"1f487-1f3fc-2640",shortnames:[":woman_getting_haircut_medium_light_skin_tone:"],category:"people"},":woman_getting_haircut_tone3:":{uc_base:"1f487-1f3fd-2640",uc_output:"1f487-1f3fd-200d-2640-fe0f",uc_match:"1f487-1f3fd-2640-fe0f",uc_greedy:"1f487-1f3fd-2640",shortnames:[":woman_getting_haircut_medium_skin_tone:"],category:"people"},":woman_getting_haircut_tone4:":{uc_base:"1f487-1f3fe-2640",uc_output:"1f487-1f3fe-200d-2640-fe0f",uc_match:"1f487-1f3fe-2640-fe0f",uc_greedy:"1f487-1f3fe-2640",shortnames:[":woman_getting_haircut_medium_dark_skin_tone:"],category:"people"},":woman_getting_haircut_tone5:":{uc_base:"1f487-1f3ff-2640",uc_output:"1f487-1f3ff-200d-2640-fe0f",uc_match:"1f487-1f3ff-2640-fe0f",uc_greedy:"1f487-1f3ff-2640",shortnames:[":woman_getting_haircut_dark_skin_tone:"],category:"people"},":woman_golfing_tone1:":{uc_base:"1f3cc-1f3fb-2640",uc_output:"1f3cc-1f3fb-200d-2640-fe0f",uc_match:"1f3cc-fe0f-1f3fb-2640-fe0f",uc_greedy:"1f3cc-1f3fb-2640",shortnames:[":woman_golfing_light_skin_tone:"],category:"activity"},":woman_golfing_tone2:":{uc_base:"1f3cc-1f3fc-2640",uc_output:"1f3cc-1f3fc-200d-2640-fe0f",uc_match:"1f3cc-fe0f-1f3fc-2640-fe0f",uc_greedy:"1f3cc-1f3fc-2640",shortnames:[":woman_golfing_medium_light_skin_tone:"],category:"activity"},":woman_golfing_tone3:":{uc_base:"1f3cc-1f3fd-2640",uc_output:"1f3cc-1f3fd-200d-2640-fe0f",uc_match:"1f3cc-fe0f-1f3fd-2640-fe0f",uc_greedy:"1f3cc-1f3fd-2640",shortnames:[":woman_golfing_medium_skin_tone:"],category:"activity"},":woman_golfing_tone4:":{uc_base:"1f3cc-1f3fe-2640",uc_output:"1f3cc-1f3fe-200d-2640-fe0f",uc_match:"1f3cc-fe0f-1f3fe-2640-fe0f",uc_greedy:"1f3cc-1f3fe-2640",shortnames:[":woman_golfing_medium_dark_skin_tone:"],category:"activity"},":woman_golfing_tone5:":{uc_base:"1f3cc-1f3ff-2640",uc_output:"1f3cc-1f3ff-200d-2640-fe0f",uc_match:"1f3cc-fe0f-1f3ff-2640-fe0f",uc_greedy:"1f3cc-1f3ff-2640",shortnames:[":woman_golfing_dark_skin_tone:"],category:"activity"},":woman_guard_tone1:":{uc_base:"1f482-1f3fb-2640",uc_output:"1f482-1f3fb-200d-2640-fe0f",uc_match:"1f482-1f3fb-2640-fe0f",uc_greedy:"1f482-1f3fb-2640",shortnames:[":woman_guard_light_skin_tone:"],category:"people"},":woman_guard_tone2:":{uc_base:"1f482-1f3fc-2640",uc_output:"1f482-1f3fc-200d-2640-fe0f",uc_match:"1f482-1f3fc-2640-fe0f",uc_greedy:"1f482-1f3fc-2640",shortnames:[":woman_guard_medium_light_skin_tone:"],category:"people"},":woman_guard_tone3:":{uc_base:"1f482-1f3fd-2640",uc_output:"1f482-1f3fd-200d-2640-fe0f",uc_match:"1f482-1f3fd-2640-fe0f",uc_greedy:"1f482-1f3fd-2640",shortnames:[":woman_guard_medium_skin_tone:"],category:"people"},":woman_guard_tone4:":{uc_base:"1f482-1f3fe-2640",uc_output:"1f482-1f3fe-200d-2640-fe0f",uc_match:"1f482-1f3fe-2640-fe0f",uc_greedy:"1f482-1f3fe-2640",shortnames:[":woman_guard_medium_dark_skin_tone:"],category:"people"},":woman_guard_tone5:":{uc_base:"1f482-1f3ff-2640",uc_output:"1f482-1f3ff-200d-2640-fe0f",uc_match:"1f482-1f3ff-2640-fe0f",uc_greedy:"1f482-1f3ff-2640",shortnames:[":woman_guard_dark_skin_tone:"],category:"people"},":woman_health_worker_tone1:":{uc_base:"1f469-1f3fb-2695",uc_output:"1f469-1f3fb-200d-2695-fe0f",uc_match:"1f469-1f3fb-2695-fe0f",uc_greedy:"1f469-1f3fb-2695",shortnames:[":woman_health_worker_light_skin_tone:"],category:"people"},":woman_health_worker_tone2:":{uc_base:"1f469-1f3fc-2695",uc_output:"1f469-1f3fc-200d-2695-fe0f",uc_match:"1f469-1f3fc-2695-fe0f",uc_greedy:"1f469-1f3fc-2695",shortnames:[":woman_health_worker_medium_light_skin_tone:"],category:"people"},":woman_health_worker_tone3:":{uc_base:"1f469-1f3fd-2695",uc_output:"1f469-1f3fd-200d-2695-fe0f",uc_match:"1f469-1f3fd-2695-fe0f",uc_greedy:"1f469-1f3fd-2695",shortnames:[":woman_health_worker_medium_skin_tone:"],category:"people"},":woman_health_worker_tone4:":{uc_base:"1f469-1f3fe-2695",uc_output:"1f469-1f3fe-200d-2695-fe0f",uc_match:"1f469-1f3fe-2695-fe0f",uc_greedy:"1f469-1f3fe-2695",shortnames:[":woman_health_worker_medium_dark_skin_tone:"],category:"people"},":woman_health_worker_tone5:":{uc_base:"1f469-1f3ff-2695",uc_output:"1f469-1f3ff-200d-2695-fe0f",uc_match:"1f469-1f3ff-2695-fe0f",uc_greedy:"1f469-1f3ff-2695",shortnames:[":woman_health_worker_dark_skin_tone:"],category:"people"},":woman_in_lotus_position_tone1:":{uc_base:"1f9d8-1f3fb-2640",uc_output:"1f9d8-1f3fb-200d-2640-fe0f",uc_match:"1f9d8-1f3fb-2640-fe0f",uc_greedy:"1f9d8-1f3fb-2640",shortnames:[":woman_in_lotus_position_light_skin_tone:"],category:"activity"},":woman_in_lotus_position_tone2:":{uc_base:"1f9d8-1f3fc-2640",uc_output:"1f9d8-1f3fc-200d-2640-fe0f",uc_match:"1f9d8-1f3fc-2640-fe0f",uc_greedy:"1f9d8-1f3fc-2640",shortnames:[":woman_in_lotus_position_medium_light_skin_tone:"],category:"activity"},":woman_in_lotus_position_tone3:":{uc_base:"1f9d8-1f3fd-2640",uc_output:"1f9d8-1f3fd-200d-2640-fe0f",uc_match:"1f9d8-1f3fd-2640-fe0f",uc_greedy:"1f9d8-1f3fd-2640",shortnames:[":woman_in_lotus_position_medium_skin_tone:"],category:"activity"},":woman_in_lotus_position_tone4:":{uc_base:"1f9d8-1f3fe-2640",uc_output:"1f9d8-1f3fe-200d-2640-fe0f",uc_match:"1f9d8-1f3fe-2640-fe0f",uc_greedy:"1f9d8-1f3fe-2640",shortnames:[":woman_in_lotus_position_medium_dark_skin_tone:"],category:"activity"},":woman_in_lotus_position_tone5:":{uc_base:"1f9d8-1f3ff-2640",uc_output:"1f9d8-1f3ff-200d-2640-fe0f",uc_match:"1f9d8-1f3ff-2640-fe0f",uc_greedy:"1f9d8-1f3ff-2640",shortnames:[":woman_in_lotus_position_dark_skin_tone:"],category:"activity"},":woman_in_steamy_room_tone1:":{uc_base:"1f9d6-1f3fb-2640",uc_output:"1f9d6-1f3fb-200d-2640-fe0f",uc_match:"1f9d6-1f3fb-2640-fe0f",uc_greedy:"1f9d6-1f3fb-2640",shortnames:[":woman_in_steamy_room_light_skin_tone:"],category:"people"},":woman_in_steamy_room_tone2:":{uc_base:"1f9d6-1f3fc-2640",uc_output:"1f9d6-1f3fc-200d-2640-fe0f",uc_match:"1f9d6-1f3fc-2640-fe0f",uc_greedy:"1f9d6-1f3fc-2640",shortnames:[":woman_in_steamy_room_medium_light_skin_tone:"],category:"people"},":woman_in_steamy_room_tone3:":{uc_base:"1f9d6-1f3fd-2640",uc_output:"1f9d6-1f3fd-200d-2640-fe0f",uc_match:"1f9d6-1f3fd-2640-fe0f",uc_greedy:"1f9d6-1f3fd-2640",shortnames:[":woman_in_steamy_room_medium_skin_tone:"],category:"people"},":woman_in_steamy_room_tone4:":{uc_base:"1f9d6-1f3fe-2640",uc_output:"1f9d6-1f3fe-200d-2640-fe0f",uc_match:"1f9d6-1f3fe-2640-fe0f",uc_greedy:"1f9d6-1f3fe-2640",shortnames:[":woman_in_steamy_room_medium_dark_skin_tone:"],category:"people"},":woman_in_steamy_room_tone5:":{uc_base:"1f9d6-1f3ff-2640",uc_output:"1f9d6-1f3ff-200d-2640-fe0f",uc_match:"1f9d6-1f3ff-2640-fe0f",uc_greedy:"1f9d6-1f3ff-2640",shortnames:[":woman_in_steamy_room_dark_skin_tone:"],category:"people"},":woman_judge_tone1:":{uc_base:"1f469-1f3fb-2696",uc_output:"1f469-1f3fb-200d-2696-fe0f",uc_match:"1f469-1f3fb-2696-fe0f",uc_greedy:"1f469-1f3fb-2696",shortnames:[":woman_judge_light_skin_tone:"],category:"people"},":woman_judge_tone2:":{uc_base:"1f469-1f3fc-2696",uc_output:"1f469-1f3fc-200d-2696-fe0f",uc_match:"1f469-1f3fc-2696-fe0f",uc_greedy:"1f469-1f3fc-2696",shortnames:[":woman_judge_medium_light_skin_tone:"],category:"people"},":woman_judge_tone3:":{uc_base:"1f469-1f3fd-2696",uc_output:"1f469-1f3fd-200d-2696-fe0f",uc_match:"1f469-1f3fd-2696-fe0f",uc_greedy:"1f469-1f3fd-2696",shortnames:[":woman_judge_medium_skin_tone:"],category:"people"},":woman_judge_tone4:":{uc_base:"1f469-1f3fe-2696",uc_output:"1f469-1f3fe-200d-2696-fe0f",uc_match:"1f469-1f3fe-2696-fe0f",uc_greedy:"1f469-1f3fe-2696",shortnames:[":woman_judge_medium_dark_skin_tone:"],category:"people"},":woman_judge_tone5:":{uc_base:"1f469-1f3ff-2696",uc_output:"1f469-1f3ff-200d-2696-fe0f",uc_match:"1f469-1f3ff-2696-fe0f",uc_greedy:"1f469-1f3ff-2696",shortnames:[":woman_judge_dark_skin_tone:"],category:"people"},":woman_juggling_tone1:":{uc_base:"1f939-1f3fb-2640",uc_output:"1f939-1f3fb-200d-2640-fe0f",uc_match:"1f939-1f3fb-2640-fe0f",uc_greedy:"1f939-1f3fb-2640",shortnames:[":woman_juggling_light_skin_tone:"],category:"activity"},":woman_juggling_tone2:":{uc_base:"1f939-1f3fc-2640",uc_output:"1f939-1f3fc-200d-2640-fe0f",uc_match:"1f939-1f3fc-2640-fe0f",uc_greedy:"1f939-1f3fc-2640",shortnames:[":woman_juggling_medium_light_skin_tone:"],category:"activity"},":woman_juggling_tone3:":{uc_base:"1f939-1f3fd-2640",uc_output:"1f939-1f3fd-200d-2640-fe0f",uc_match:"1f939-1f3fd-2640-fe0f",uc_greedy:"1f939-1f3fd-2640",shortnames:[":woman_juggling_medium_skin_tone:"],category:"activity"},":woman_juggling_tone4:":{uc_base:"1f939-1f3fe-2640",uc_output:"1f939-1f3fe-200d-2640-fe0f",uc_match:"1f939-1f3fe-2640-fe0f",uc_greedy:"1f939-1f3fe-2640",shortnames:[":woman_juggling_medium_dark_skin_tone:"],category:"activity"},":woman_juggling_tone5:":{uc_base:"1f939-1f3ff-2640",uc_output:"1f939-1f3ff-200d-2640-fe0f",uc_match:"1f939-1f3ff-2640-fe0f",uc_greedy:"1f939-1f3ff-2640",shortnames:[":woman_juggling_dark_skin_tone:"],category:"activity"},":woman_lifting_weights_tone1:":{uc_base:"1f3cb-1f3fb-2640",uc_output:"1f3cb-1f3fb-200d-2640-fe0f",uc_match:"1f3cb-fe0f-1f3fb-2640-fe0f",uc_greedy:"1f3cb-1f3fb-2640",shortnames:[":woman_lifting_weights_light_skin_tone:"],category:"activity"},":woman_lifting_weights_tone2:":{uc_base:"1f3cb-1f3fc-2640",uc_output:"1f3cb-1f3fc-200d-2640-fe0f",uc_match:"1f3cb-fe0f-1f3fc-2640-fe0f",uc_greedy:"1f3cb-1f3fc-2640",shortnames:[":woman_lifting_weights_medium_light_skin_tone:"],category:"activity"},":woman_lifting_weights_tone3:":{uc_base:"1f3cb-1f3fd-2640",uc_output:"1f3cb-1f3fd-200d-2640-fe0f",uc_match:"1f3cb-fe0f-1f3fd-2640-fe0f",uc_greedy:"1f3cb-1f3fd-2640",shortnames:[":woman_lifting_weights_medium_skin_tone:"],category:"activity"},":woman_lifting_weights_tone4:":{uc_base:"1f3cb-1f3fe-2640",uc_output:"1f3cb-1f3fe-200d-2640-fe0f",uc_match:"1f3cb-fe0f-1f3fe-2640-fe0f",uc_greedy:"1f3cb-1f3fe-2640",shortnames:[":woman_lifting_weights_medium_dark_skin_tone:"],category:"activity"},":woman_lifting_weights_tone5:":{uc_base:"1f3cb-1f3ff-2640",uc_output:"1f3cb-1f3ff-200d-2640-fe0f",uc_match:"1f3cb-fe0f-1f3ff-2640-fe0f",uc_greedy:"1f3cb-1f3ff-2640",shortnames:[":woman_lifting_weights_dark_skin_tone:"],category:"activity"},":woman_mage_tone1:":{uc_base:"1f9d9-1f3fb-2640",uc_output:"1f9d9-1f3fb-200d-2640-fe0f",uc_match:"1f9d9-1f3fb-2640-fe0f",uc_greedy:"1f9d9-1f3fb-2640",shortnames:[":woman_mage_light_skin_tone:"],category:"people"},":woman_mage_tone2:":{uc_base:"1f9d9-1f3fc-2640",uc_output:"1f9d9-1f3fc-200d-2640-fe0f",uc_match:"1f9d9-1f3fc-2640-fe0f",uc_greedy:"1f9d9-1f3fc-2640",shortnames:[":woman_mage_medium_light_skin_tone:"],category:"people"},":woman_mage_tone3:":{uc_base:"1f9d9-1f3fd-2640",uc_output:"1f9d9-1f3fd-200d-2640-fe0f",uc_match:"1f9d9-1f3fd-2640-fe0f",uc_greedy:"1f9d9-1f3fd-2640",shortnames:[":woman_mage_medium_skin_tone:"],category:"people"},":woman_mage_tone4:":{uc_base:"1f9d9-1f3fe-2640",uc_output:"1f9d9-1f3fe-200d-2640-fe0f",uc_match:"1f9d9-1f3fe-2640-fe0f",uc_greedy:"1f9d9-1f3fe-2640",shortnames:[":woman_mage_medium_dark_skin_tone:"],category:"people"},":woman_mage_tone5:":{uc_base:"1f9d9-1f3ff-2640",uc_output:"1f9d9-1f3ff-200d-2640-fe0f",uc_match:"1f9d9-1f3ff-2640-fe0f",uc_greedy:"1f9d9-1f3ff-2640",shortnames:[":woman_mage_dark_skin_tone:"],category:"people"},":woman_mountain_biking_tone1:":{uc_base:"1f6b5-1f3fb-2640",uc_output:"1f6b5-1f3fb-200d-2640-fe0f",uc_match:"1f6b5-1f3fb-2640-fe0f",uc_greedy:"1f6b5-1f3fb-2640",shortnames:[":woman_mountain_biking_light_skin_tone:"],category:"activity"},":woman_mountain_biking_tone2:":{uc_base:"1f6b5-1f3fc-2640",uc_output:"1f6b5-1f3fc-200d-2640-fe0f",uc_match:"1f6b5-1f3fc-2640-fe0f",uc_greedy:"1f6b5-1f3fc-2640",shortnames:[":woman_mountain_biking_medium_light_skin_tone:"],category:"activity"},":woman_mountain_biking_tone3:":{uc_base:"1f6b5-1f3fd-2640",uc_output:"1f6b5-1f3fd-200d-2640-fe0f",uc_match:"1f6b5-1f3fd-2640-fe0f",uc_greedy:"1f6b5-1f3fd-2640",shortnames:[":woman_mountain_biking_medium_skin_tone:"],category:"activity"},":woman_mountain_biking_tone4:":{uc_base:"1f6b5-1f3fe-2640",uc_output:"1f6b5-1f3fe-200d-2640-fe0f",uc_match:"1f6b5-1f3fe-2640-fe0f",uc_greedy:"1f6b5-1f3fe-2640",shortnames:[":woman_mountain_biking_medium_dark_skin_tone:"],category:"activity"},":woman_mountain_biking_tone5:":{uc_base:"1f6b5-1f3ff-2640",uc_output:"1f6b5-1f3ff-200d-2640-fe0f",uc_match:"1f6b5-1f3ff-2640-fe0f",uc_greedy:"1f6b5-1f3ff-2640",shortnames:[":woman_mountain_biking_dark_skin_tone:"],category:"activity"},":woman_pilot_tone1:":{uc_base:"1f469-1f3fb-2708",uc_output:"1f469-1f3fb-200d-2708-fe0f",uc_match:"1f469-1f3fb-2708-fe0f",uc_greedy:"1f469-1f3fb-2708",shortnames:[":woman_pilot_light_skin_tone:"],category:"people"},":woman_pilot_tone2:":{uc_base:"1f469-1f3fc-2708",uc_output:"1f469-1f3fc-200d-2708-fe0f",uc_match:"1f469-1f3fc-2708-fe0f",uc_greedy:"1f469-1f3fc-2708",shortnames:[":woman_pilot_medium_light_skin_tone:"],category:"people"},":woman_pilot_tone3:":{uc_base:"1f469-1f3fd-2708",uc_output:"1f469-1f3fd-200d-2708-fe0f",uc_match:"1f469-1f3fd-2708-fe0f",uc_greedy:"1f469-1f3fd-2708",shortnames:[":woman_pilot_medium_skin_tone:"],category:"people"},":woman_pilot_tone4:":{uc_base:"1f469-1f3fe-2708",uc_output:"1f469-1f3fe-200d-2708-fe0f",uc_match:"1f469-1f3fe-2708-fe0f",uc_greedy:"1f469-1f3fe-2708",shortnames:[":woman_pilot_medium_dark_skin_tone:"],category:"people"},":woman_pilot_tone5:":{uc_base:"1f469-1f3ff-2708",uc_output:"1f469-1f3ff-200d-2708-fe0f",uc_match:"1f469-1f3ff-2708-fe0f",uc_greedy:"1f469-1f3ff-2708",shortnames:[":woman_pilot_dark_skin_tone:"],category:"people"},":woman_playing_handball_tone1:":{uc_base:"1f93e-1f3fb-2640",uc_output:"1f93e-1f3fb-200d-2640-fe0f",uc_match:"1f93e-1f3fb-2640-fe0f",uc_greedy:"1f93e-1f3fb-2640",shortnames:[":woman_playing_handball_light_skin_tone:"],category:"activity"},":woman_playing_handball_tone2:":{uc_base:"1f93e-1f3fc-2640",uc_output:"1f93e-1f3fc-200d-2640-fe0f",uc_match:"1f93e-1f3fc-2640-fe0f",uc_greedy:"1f93e-1f3fc-2640",shortnames:[":woman_playing_handball_medium_light_skin_tone:"],category:"activity"},":woman_playing_handball_tone3:":{uc_base:"1f93e-1f3fd-2640",uc_output:"1f93e-1f3fd-200d-2640-fe0f",uc_match:"1f93e-1f3fd-2640-fe0f",uc_greedy:"1f93e-1f3fd-2640",shortnames:[":woman_playing_handball_medium_skin_tone:"],category:"activity"},":woman_playing_handball_tone4:":{uc_base:"1f93e-1f3fe-2640",uc_output:"1f93e-1f3fe-200d-2640-fe0f",uc_match:"1f93e-1f3fe-2640-fe0f",uc_greedy:"1f93e-1f3fe-2640",shortnames:[":woman_playing_handball_medium_dark_skin_tone:"],category:"activity"},":woman_playing_handball_tone5:":{uc_base:"1f93e-1f3ff-2640",uc_output:"1f93e-1f3ff-200d-2640-fe0f",uc_match:"1f93e-1f3ff-2640-fe0f",uc_greedy:"1f93e-1f3ff-2640",shortnames:[":woman_playing_handball_dark_skin_tone:"],category:"activity"},":woman_playing_water_polo_tone1:":{uc_base:"1f93d-1f3fb-2640",uc_output:"1f93d-1f3fb-200d-2640-fe0f",uc_match:"1f93d-1f3fb-2640-fe0f",uc_greedy:"1f93d-1f3fb-2640",shortnames:[":woman_playing_water_polo_light_skin_tone:"],category:"activity"},":woman_playing_water_polo_tone2:":{uc_base:"1f93d-1f3fc-2640",uc_output:"1f93d-1f3fc-200d-2640-fe0f",uc_match:"1f93d-1f3fc-2640-fe0f",uc_greedy:"1f93d-1f3fc-2640",shortnames:[":woman_playing_water_polo_medium_light_skin_tone:"],category:"activity"},":woman_playing_water_polo_tone3:":{uc_base:"1f93d-1f3fd-2640",uc_output:"1f93d-1f3fd-200d-2640-fe0f",uc_match:"1f93d-1f3fd-2640-fe0f",uc_greedy:"1f93d-1f3fd-2640",shortnames:[":woman_playing_water_polo_medium_skin_tone:"],category:"activity"},":woman_playing_water_polo_tone4:":{uc_base:"1f93d-1f3fe-2640",uc_output:"1f93d-1f3fe-200d-2640-fe0f",uc_match:"1f93d-1f3fe-2640-fe0f",uc_greedy:"1f93d-1f3fe-2640",shortnames:[":woman_playing_water_polo_medium_dark_skin_tone:"],category:"activity"},":woman_playing_water_polo_tone5:":{uc_base:"1f93d-1f3ff-2640",uc_output:"1f93d-1f3ff-200d-2640-fe0f",uc_match:"1f93d-1f3ff-2640-fe0f",uc_greedy:"1f93d-1f3ff-2640",shortnames:[":woman_playing_water_polo_dark_skin_tone:"],category:"activity"},":woman_police_officer_tone1:":{uc_base:"1f46e-1f3fb-2640",uc_output:"1f46e-1f3fb-200d-2640-fe0f",uc_match:"1f46e-1f3fb-2640-fe0f",uc_greedy:"1f46e-1f3fb-2640",shortnames:[":woman_police_officer_light_skin_tone:"],category:"people"},":woman_police_officer_tone2:":{uc_base:"1f46e-1f3fc-2640",uc_output:"1f46e-1f3fc-200d-2640-fe0f",uc_match:"1f46e-1f3fc-2640-fe0f",uc_greedy:"1f46e-1f3fc-2640",shortnames:[":woman_police_officer_medium_light_skin_tone:"],category:"people"},":woman_police_officer_tone3:":{uc_base:"1f46e-1f3fd-2640",uc_output:"1f46e-1f3fd-200d-2640-fe0f",uc_match:"1f46e-1f3fd-2640-fe0f",uc_greedy:"1f46e-1f3fd-2640",shortnames:[":woman_police_officer_medium_skin_tone:"],category:"people"},":woman_police_officer_tone4:":{uc_base:"1f46e-1f3fe-2640",uc_output:"1f46e-1f3fe-200d-2640-fe0f",uc_match:"1f46e-1f3fe-2640-fe0f",uc_greedy:"1f46e-1f3fe-2640",shortnames:[":woman_police_officer_medium_dark_skin_tone:"],category:"people"},":woman_police_officer_tone5:":{uc_base:"1f46e-1f3ff-2640",uc_output:"1f46e-1f3ff-200d-2640-fe0f",uc_match:"1f46e-1f3ff-2640-fe0f",uc_greedy:"1f46e-1f3ff-2640",shortnames:[":woman_police_officer_dark_skin_tone:"],category:"people"},":woman_pouting_tone1:":{uc_base:"1f64e-1f3fb-2640",uc_output:"1f64e-1f3fb-200d-2640-fe0f",uc_match:"1f64e-1f3fb-2640-fe0f",uc_greedy:"1f64e-1f3fb-2640",shortnames:[":woman_pouting_light_skin_tone:"],category:"people"},":woman_pouting_tone2:":{uc_base:"1f64e-1f3fc-2640",uc_output:"1f64e-1f3fc-200d-2640-fe0f",uc_match:"1f64e-1f3fc-2640-fe0f",uc_greedy:"1f64e-1f3fc-2640",shortnames:[":woman_pouting_medium_light_skin_tone:"],category:"people"},":woman_pouting_tone3:":{uc_base:"1f64e-1f3fd-2640",uc_output:"1f64e-1f3fd-200d-2640-fe0f",uc_match:"1f64e-1f3fd-2640-fe0f",uc_greedy:"1f64e-1f3fd-2640",shortnames:[":woman_pouting_medium_skin_tone:"],category:"people"},":woman_pouting_tone4:":{uc_base:"1f64e-1f3fe-2640",uc_output:"1f64e-1f3fe-200d-2640-fe0f",uc_match:"1f64e-1f3fe-2640-fe0f",uc_greedy:"1f64e-1f3fe-2640",shortnames:[":woman_pouting_medium_dark_skin_tone:"],category:"people"},":woman_pouting_tone5:":{uc_base:"1f64e-1f3ff-2640",uc_output:"1f64e-1f3ff-200d-2640-fe0f",uc_match:"1f64e-1f3ff-2640-fe0f",uc_greedy:"1f64e-1f3ff-2640",shortnames:[":woman_pouting_dark_skin_tone:"],category:"people"},":woman_raising_hand_tone1:":{uc_base:"1f64b-1f3fb-2640",uc_output:"1f64b-1f3fb-200d-2640-fe0f",uc_match:"1f64b-1f3fb-2640-fe0f",uc_greedy:"1f64b-1f3fb-2640",shortnames:[":woman_raising_hand_light_skin_tone:"],category:"people"},":woman_raising_hand_tone2:":{uc_base:"1f64b-1f3fc-2640",uc_output:"1f64b-1f3fc-200d-2640-fe0f",uc_match:"1f64b-1f3fc-2640-fe0f",uc_greedy:"1f64b-1f3fc-2640",shortnames:[":woman_raising_hand_medium_light_skin_tone:"],category:"people"},":woman_raising_hand_tone3:":{uc_base:"1f64b-1f3fd-2640",uc_output:"1f64b-1f3fd-200d-2640-fe0f",uc_match:"1f64b-1f3fd-2640-fe0f",uc_greedy:"1f64b-1f3fd-2640",shortnames:[":woman_raising_hand_medium_skin_tone:"],category:"people"},":woman_raising_hand_tone4:":{uc_base:"1f64b-1f3fe-2640",uc_output:"1f64b-1f3fe-200d-2640-fe0f",uc_match:"1f64b-1f3fe-2640-fe0f",uc_greedy:"1f64b-1f3fe-2640",shortnames:[":woman_raising_hand_medium_dark_skin_tone:"],category:"people"},":woman_raising_hand_tone5:":{uc_base:"1f64b-1f3ff-2640",uc_output:"1f64b-1f3ff-200d-2640-fe0f",uc_match:"1f64b-1f3ff-2640-fe0f",uc_greedy:"1f64b-1f3ff-2640",shortnames:[":woman_raising_hand_dark_skin_tone:"],category:"people"},":woman_rowing_boat_tone1:":{uc_base:"1f6a3-1f3fb-2640",uc_output:"1f6a3-1f3fb-200d-2640-fe0f",uc_match:"1f6a3-1f3fb-2640-fe0f",uc_greedy:"1f6a3-1f3fb-2640",shortnames:[":woman_rowing_boat_light_skin_tone:"],category:"activity"},":woman_rowing_boat_tone2:":{uc_base:"1f6a3-1f3fc-2640",uc_output:"1f6a3-1f3fc-200d-2640-fe0f",uc_match:"1f6a3-1f3fc-2640-fe0f",uc_greedy:"1f6a3-1f3fc-2640",shortnames:[":woman_rowing_boat_medium_light_skin_tone:"],category:"activity"},":woman_rowing_boat_tone3:":{uc_base:"1f6a3-1f3fd-2640",uc_output:"1f6a3-1f3fd-200d-2640-fe0f",uc_match:"1f6a3-1f3fd-2640-fe0f",uc_greedy:"1f6a3-1f3fd-2640",shortnames:[":woman_rowing_boat_medium_skin_tone:"],category:"activity"},":woman_rowing_boat_tone4:":{uc_base:"1f6a3-1f3fe-2640",uc_output:"1f6a3-1f3fe-200d-2640-fe0f",uc_match:"1f6a3-1f3fe-2640-fe0f",uc_greedy:"1f6a3-1f3fe-2640",shortnames:[":woman_rowing_boat_medium_dark_skin_tone:"],category:"activity"},":woman_rowing_boat_tone5:":{uc_base:"1f6a3-1f3ff-2640",uc_output:"1f6a3-1f3ff-200d-2640-fe0f",uc_match:"1f6a3-1f3ff-2640-fe0f",uc_greedy:"1f6a3-1f3ff-2640",shortnames:[":woman_rowing_boat_dark_skin_tone:"],category:"activity"},":woman_running_tone1:":{uc_base:"1f3c3-1f3fb-2640",uc_output:"1f3c3-1f3fb-200d-2640-fe0f",uc_match:"1f3c3-1f3fb-2640-fe0f",uc_greedy:"1f3c3-1f3fb-2640",shortnames:[":woman_running_light_skin_tone:"],category:"people"},":woman_running_tone2:":{uc_base:"1f3c3-1f3fc-2640",uc_output:"1f3c3-1f3fc-200d-2640-fe0f",uc_match:"1f3c3-1f3fc-2640-fe0f",uc_greedy:"1f3c3-1f3fc-2640",shortnames:[":woman_running_medium_light_skin_tone:"],category:"people"},":woman_running_tone3:":{uc_base:"1f3c3-1f3fd-2640",uc_output:"1f3c3-1f3fd-200d-2640-fe0f",uc_match:"1f3c3-1f3fd-2640-fe0f",uc_greedy:"1f3c3-1f3fd-2640",shortnames:[":woman_running_medium_skin_tone:"],category:"people"},":woman_running_tone4:":{uc_base:"1f3c3-1f3fe-2640",uc_output:"1f3c3-1f3fe-200d-2640-fe0f",uc_match:"1f3c3-1f3fe-2640-fe0f",uc_greedy:"1f3c3-1f3fe-2640",shortnames:[":woman_running_medium_dark_skin_tone:"],category:"people"},":woman_running_tone5:":{uc_base:"1f3c3-1f3ff-2640",uc_output:"1f3c3-1f3ff-200d-2640-fe0f",uc_match:"1f3c3-1f3ff-2640-fe0f",uc_greedy:"1f3c3-1f3ff-2640",shortnames:[":woman_running_dark_skin_tone:"],category:"people"},":woman_shrugging_tone1:":{uc_base:"1f937-1f3fb-2640",uc_output:"1f937-1f3fb-200d-2640-fe0f",uc_match:"1f937-1f3fb-2640-fe0f",uc_greedy:"1f937-1f3fb-2640",shortnames:[":woman_shrugging_light_skin_tone:"],category:"people"},":woman_shrugging_tone2:":{uc_base:"1f937-1f3fc-2640",uc_output:"1f937-1f3fc-200d-2640-fe0f",uc_match:"1f937-1f3fc-2640-fe0f",uc_greedy:"1f937-1f3fc-2640",shortnames:[":woman_shrugging_medium_light_skin_tone:"],category:"people"},":woman_shrugging_tone3:":{uc_base:"1f937-1f3fd-2640",uc_output:"1f937-1f3fd-200d-2640-fe0f",uc_match:"1f937-1f3fd-2640-fe0f",uc_greedy:"1f937-1f3fd-2640",shortnames:[":woman_shrugging_medium_skin_tone:"],category:"people"},":woman_shrugging_tone4:":{uc_base:"1f937-1f3fe-2640",uc_output:"1f937-1f3fe-200d-2640-fe0f",uc_match:"1f937-1f3fe-2640-fe0f",uc_greedy:"1f937-1f3fe-2640",shortnames:[":woman_shrugging_medium_dark_skin_tone:"],category:"people"},":woman_shrugging_tone5:":{uc_base:"1f937-1f3ff-2640",uc_output:"1f937-1f3ff-200d-2640-fe0f",uc_match:"1f937-1f3ff-2640-fe0f",uc_greedy:"1f937-1f3ff-2640",shortnames:[":woman_shrugging_dark_skin_tone:"],category:"people"},":woman_superhero_tone1:":{uc_base:"1f9b8-1f3fb-2640",uc_output:"1f9b8-1f3fb-200d-2640-fe0f",uc_match:"1f9b8-1f3fb-2640-fe0f",uc_greedy:"1f9b8-1f3fb-2640",shortnames:[":woman_superhero_light_skin_tone:"],category:"people"},":woman_superhero_tone2:":{uc_base:"1f9b8-1f3fc-2640",uc_output:"1f9b8-1f3fc-200d-2640-fe0f",uc_match:"1f9b8-1f3fc-2640-fe0f",uc_greedy:"1f9b8-1f3fc-2640",shortnames:[":woman_superhero_medium_light_skin_tone:"],category:"people"},":woman_superhero_tone3:":{uc_base:"1f9b8-1f3fd-2640",uc_output:"1f9b8-1f3fd-200d-2640-fe0f",uc_match:"1f9b8-1f3fd-2640-fe0f",uc_greedy:"1f9b8-1f3fd-2640",shortnames:[":woman_superhero_medium_skin_tone:"],category:"people"},":woman_superhero_tone4:":{uc_base:"1f9b8-1f3fe-2640",uc_output:"1f9b8-1f3fe-200d-2640-fe0f",uc_match:"1f9b8-1f3fe-2640-fe0f",uc_greedy:"1f9b8-1f3fe-2640",shortnames:[":woman_superhero_medium_dark_skin_tone:"],category:"people"},":woman_superhero_tone5:":{uc_base:"1f9b8-1f3ff-2640",uc_output:"1f9b8-1f3ff-200d-2640-fe0f",uc_match:"1f9b8-1f3ff-2640-fe0f",uc_greedy:"1f9b8-1f3ff-2640",shortnames:[":woman_superhero_dark_skin_tone:"],category:"people"},":woman_supervillain_tone1:":{uc_base:"1f9b9-1f3fb-2640",uc_output:"1f9b9-1f3fb-200d-2640-fe0f",uc_match:"1f9b9-1f3fb-2640-fe0f",uc_greedy:"1f9b9-1f3fb-2640",shortnames:[":woman_supervillain_light_skin_tone:"],category:"people"},":woman_supervillain_tone2:":{uc_base:"1f9b9-1f3fc-2640",uc_output:"1f9b9-1f3fc-200d-2640-fe0f",uc_match:"1f9b9-1f3fc-2640-fe0f",uc_greedy:"1f9b9-1f3fc-2640",shortnames:[":woman_supervillain_medium_light_skin_tone:"],category:"people"},":woman_supervillain_tone3:":{uc_base:"1f9b9-1f3fd-2640",uc_output:"1f9b9-1f3fd-200d-2640-fe0f",uc_match:"1f9b9-1f3fd-2640-fe0f",uc_greedy:"1f9b9-1f3fd-2640",shortnames:[":woman_supervillain_medium_skin_tone:"],category:"people"},":woman_supervillain_tone4:":{uc_base:"1f9b9-1f3fe-2640",uc_output:"1f9b9-1f3fe-200d-2640-fe0f",uc_match:"1f9b9-1f3fe-2640-fe0f",uc_greedy:"1f9b9-1f3fe-2640",shortnames:[":woman_supervillain_medium_dark_skin_tone:"],category:"people"},":woman_supervillain_tone5:":{uc_base:"1f9b9-1f3ff-2640",uc_output:"1f9b9-1f3ff-200d-2640-fe0f",uc_match:"1f9b9-1f3ff-2640-fe0f",uc_greedy:"1f9b9-1f3ff-2640",shortnames:[":woman_supervillain_dark_skin_tone:"],category:"people"},":woman_surfing_tone1:":{uc_base:"1f3c4-1f3fb-2640",uc_output:"1f3c4-1f3fb-200d-2640-fe0f",uc_match:"1f3c4-1f3fb-2640-fe0f",uc_greedy:"1f3c4-1f3fb-2640",shortnames:[":woman_surfing_light_skin_tone:"],category:"activity"},":woman_surfing_tone2:":{uc_base:"1f3c4-1f3fc-2640",uc_output:"1f3c4-1f3fc-200d-2640-fe0f",uc_match:"1f3c4-1f3fc-2640-fe0f",uc_greedy:"1f3c4-1f3fc-2640",shortnames:[":woman_surfing_medium_light_skin_tone:"],category:"activity"},":woman_surfing_tone3:":{uc_base:"1f3c4-1f3fd-2640",uc_output:"1f3c4-1f3fd-200d-2640-fe0f",uc_match:"1f3c4-1f3fd-2640-fe0f",uc_greedy:"1f3c4-1f3fd-2640",shortnames:[":woman_surfing_medium_skin_tone:"],category:"activity"},":woman_surfing_tone4:":{uc_base:"1f3c4-1f3fe-2640",uc_output:"1f3c4-1f3fe-200d-2640-fe0f",uc_match:"1f3c4-1f3fe-2640-fe0f",uc_greedy:"1f3c4-1f3fe-2640",shortnames:[":woman_surfing_medium_dark_skin_tone:"],category:"activity"},":woman_surfing_tone5:":{uc_base:"1f3c4-1f3ff-2640",uc_output:"1f3c4-1f3ff-200d-2640-fe0f",uc_match:"1f3c4-1f3ff-2640-fe0f",uc_greedy:"1f3c4-1f3ff-2640",shortnames:[":woman_surfing_dark_skin_tone:"],category:"activity"},":woman_swimming_tone1:":{uc_base:"1f3ca-1f3fb-2640",uc_output:"1f3ca-1f3fb-200d-2640-fe0f",uc_match:"1f3ca-1f3fb-2640-fe0f",uc_greedy:"1f3ca-1f3fb-2640",shortnames:[":woman_swimming_light_skin_tone:"],category:"activity"},":woman_swimming_tone2:":{uc_base:"1f3ca-1f3fc-2640",uc_output:"1f3ca-1f3fc-200d-2640-fe0f",uc_match:"1f3ca-1f3fc-2640-fe0f",uc_greedy:"1f3ca-1f3fc-2640",shortnames:[":woman_swimming_medium_light_skin_tone:"],category:"activity"},":woman_swimming_tone3:":{uc_base:"1f3ca-1f3fd-2640",uc_output:"1f3ca-1f3fd-200d-2640-fe0f",uc_match:"1f3ca-1f3fd-2640-fe0f",uc_greedy:"1f3ca-1f3fd-2640",shortnames:[":woman_swimming_medium_skin_tone:"],category:"activity"},":woman_swimming_tone4:":{uc_base:"1f3ca-1f3fe-2640",uc_output:"1f3ca-1f3fe-200d-2640-fe0f",uc_match:"1f3ca-1f3fe-2640-fe0f",uc_greedy:"1f3ca-1f3fe-2640",shortnames:[":woman_swimming_medium_dark_skin_tone:"],category:"activity"},":woman_swimming_tone5:":{uc_base:"1f3ca-1f3ff-2640",uc_output:"1f3ca-1f3ff-200d-2640-fe0f",uc_match:"1f3ca-1f3ff-2640-fe0f",uc_greedy:"1f3ca-1f3ff-2640",shortnames:[":woman_swimming_dark_skin_tone:"],category:"activity"},":woman_tipping_hand_tone1:":{uc_base:"1f481-1f3fb-2640",uc_output:"1f481-1f3fb-200d-2640-fe0f",uc_match:"1f481-1f3fb-2640-fe0f",uc_greedy:"1f481-1f3fb-2640",shortnames:[":woman_tipping_hand_light_skin_tone:"],category:"people"},":woman_tipping_hand_tone2:":{uc_base:"1f481-1f3fc-2640",uc_output:"1f481-1f3fc-200d-2640-fe0f",uc_match:"1f481-1f3fc-2640-fe0f",uc_greedy:"1f481-1f3fc-2640",shortnames:[":woman_tipping_hand_medium_light_skin_tone:"],category:"people"},":woman_tipping_hand_tone3:":{uc_base:"1f481-1f3fd-2640",uc_output:"1f481-1f3fd-200d-2640-fe0f",uc_match:"1f481-1f3fd-2640-fe0f",uc_greedy:"1f481-1f3fd-2640",shortnames:[":woman_tipping_hand_medium_skin_tone:"],category:"people"},":woman_tipping_hand_tone4:":{uc_base:"1f481-1f3fe-2640",uc_output:"1f481-1f3fe-200d-2640-fe0f",uc_match:"1f481-1f3fe-2640-fe0f",uc_greedy:"1f481-1f3fe-2640",shortnames:[":woman_tipping_hand_medium_dark_skin_tone:"],category:"people"},":woman_tipping_hand_tone5:":{uc_base:"1f481-1f3ff-2640",uc_output:"1f481-1f3ff-200d-2640-fe0f",uc_match:"1f481-1f3ff-2640-fe0f",uc_greedy:"1f481-1f3ff-2640",shortnames:[":woman_tipping_hand_dark_skin_tone:"],category:"people"},":woman_vampire_tone1:":{uc_base:"1f9db-1f3fb-2640",uc_output:"1f9db-1f3fb-200d-2640-fe0f",uc_match:"1f9db-1f3fb-2640-fe0f",uc_greedy:"1f9db-1f3fb-2640",shortnames:[":woman_vampire_light_skin_tone:"],category:"people"},":woman_vampire_tone2:":{uc_base:"1f9db-1f3fc-2640",uc_output:"1f9db-1f3fc-200d-2640-fe0f",uc_match:"1f9db-1f3fc-2640-fe0f",uc_greedy:"1f9db-1f3fc-2640",shortnames:[":woman_vampire_medium_light_skin_tone:"],category:"people"},":woman_vampire_tone3:":{uc_base:"1f9db-1f3fd-2640",uc_output:"1f9db-1f3fd-200d-2640-fe0f",uc_match:"1f9db-1f3fd-2640-fe0f",uc_greedy:"1f9db-1f3fd-2640",shortnames:[":woman_vampire_medium_skin_tone:"],category:"people"},":woman_vampire_tone4:":{uc_base:"1f9db-1f3fe-2640",uc_output:"1f9db-1f3fe-200d-2640-fe0f",uc_match:"1f9db-1f3fe-2640-fe0f",uc_greedy:"1f9db-1f3fe-2640",shortnames:[":woman_vampire_medium_dark_skin_tone:"],category:"people"},":woman_vampire_tone5:":{uc_base:"1f9db-1f3ff-2640",uc_output:"1f9db-1f3ff-200d-2640-fe0f",uc_match:"1f9db-1f3ff-2640-fe0f",uc_greedy:"1f9db-1f3ff-2640",shortnames:[":woman_vampire_dark_skin_tone:"],category:"people"},":woman_walking_tone1:":{uc_base:"1f6b6-1f3fb-2640",uc_output:"1f6b6-1f3fb-200d-2640-fe0f",uc_match:"1f6b6-1f3fb-2640-fe0f",uc_greedy:"1f6b6-1f3fb-2640",shortnames:[":woman_walking_light_skin_tone:"],category:"people"},":woman_walking_tone2:":{uc_base:"1f6b6-1f3fc-2640",uc_output:"1f6b6-1f3fc-200d-2640-fe0f",uc_match:"1f6b6-1f3fc-2640-fe0f",uc_greedy:"1f6b6-1f3fc-2640",shortnames:[":woman_walking_medium_light_skin_tone:"],category:"people"},":woman_walking_tone3:":{uc_base:"1f6b6-1f3fd-2640",uc_output:"1f6b6-1f3fd-200d-2640-fe0f",uc_match:"1f6b6-1f3fd-2640-fe0f",uc_greedy:"1f6b6-1f3fd-2640",shortnames:[":woman_walking_medium_skin_tone:"],category:"people"},":woman_walking_tone4:":{uc_base:"1f6b6-1f3fe-2640",uc_output:"1f6b6-1f3fe-200d-2640-fe0f",uc_match:"1f6b6-1f3fe-2640-fe0f",uc_greedy:"1f6b6-1f3fe-2640",shortnames:[":woman_walking_medium_dark_skin_tone:"],category:"people"},":woman_walking_tone5:":{uc_base:"1f6b6-1f3ff-2640",uc_output:"1f6b6-1f3ff-200d-2640-fe0f",uc_match:"1f6b6-1f3ff-2640-fe0f",uc_greedy:"1f6b6-1f3ff-2640",shortnames:[":woman_walking_dark_skin_tone:"],category:"people"},":woman_wearing_turban_tone1:":{uc_base:"1f473-1f3fb-2640",uc_output:"1f473-1f3fb-200d-2640-fe0f",uc_match:"1f473-1f3fb-2640-fe0f",uc_greedy:"1f473-1f3fb-2640",shortnames:[":woman_wearing_turban_light_skin_tone:"],category:"people"},":woman_wearing_turban_tone2:":{uc_base:"1f473-1f3fc-2640",uc_output:"1f473-1f3fc-200d-2640-fe0f",uc_match:"1f473-1f3fc-2640-fe0f",uc_greedy:"1f473-1f3fc-2640",shortnames:[":woman_wearing_turban_medium_light_skin_tone:"],category:"people"},":woman_wearing_turban_tone3:":{uc_base:"1f473-1f3fd-2640",uc_output:"1f473-1f3fd-200d-2640-fe0f",uc_match:"1f473-1f3fd-2640-fe0f",uc_greedy:"1f473-1f3fd-2640",shortnames:[":woman_wearing_turban_medium_skin_tone:"],category:"people"},":woman_wearing_turban_tone4:":{uc_base:"1f473-1f3fe-2640",uc_output:"1f473-1f3fe-200d-2640-fe0f",uc_match:"1f473-1f3fe-2640-fe0f",uc_greedy:"1f473-1f3fe-2640",shortnames:[":woman_wearing_turban_medium_dark_skin_tone:"],category:"people"},":woman_wearing_turban_tone5:":{uc_base:"1f473-1f3ff-2640",uc_output:"1f473-1f3ff-200d-2640-fe0f",uc_match:"1f473-1f3ff-2640-fe0f",uc_greedy:"1f473-1f3ff-2640",shortnames:[":woman_wearing_turban_dark_skin_tone:"],category:"people"},":man_bouncing_ball_tone1:":{uc_base:"26f9-1f3fb-2642",uc_output:"26f9-1f3fb-200d-2642-fe0f",uc_match:"26f9-fe0f-1f3fb-2642-fe0f",uc_greedy:"26f9-1f3fb-2642",shortnames:[":man_bouncing_ball_light_skin_tone:"],category:"activity"},":man_bouncing_ball_tone2:":{uc_base:"26f9-1f3fc-2642",uc_output:"26f9-1f3fc-200d-2642-fe0f",uc_match:"26f9-fe0f-1f3fc-2642-fe0f",uc_greedy:"26f9-1f3fc-2642",shortnames:[":man_bouncing_ball_medium_light_skin_tone:"],category:"activity"},":man_bouncing_ball_tone3:":{uc_base:"26f9-1f3fd-2642",uc_output:"26f9-1f3fd-200d-2642-fe0f",uc_match:"26f9-fe0f-1f3fd-2642-fe0f",uc_greedy:"26f9-1f3fd-2642",shortnames:[":man_bouncing_ball_medium_skin_tone:"],category:"activity"},":man_bouncing_ball_tone4:":{uc_base:"26f9-1f3fe-2642",uc_output:"26f9-1f3fe-200d-2642-fe0f",uc_match:"26f9-fe0f-1f3fe-2642-fe0f",uc_greedy:"26f9-1f3fe-2642",shortnames:[":man_bouncing_ball_medium_dark_skin_tone:"],category:"activity"},":man_bouncing_ball_tone5:":{uc_base:"26f9-1f3ff-2642",uc_output:"26f9-1f3ff-200d-2642-fe0f",uc_match:"26f9-fe0f-1f3ff-2642-fe0f",uc_greedy:"26f9-1f3ff-2642",shortnames:[":man_bouncing_ball_dark_skin_tone:"],category:"activity"},":man_detective:":{uc_base:"1f575-2642",uc_output:"1f575-fe0f-200d-2642-fe0f",uc_match:"1f575-fe0f-200d-2642",uc_greedy:"1f575-2642",shortnames:[],category:"people"},":man_golfing:":{uc_base:"1f3cc-2642",uc_output:"1f3cc-fe0f-200d-2642-fe0f",uc_match:"1f3cc-fe0f-200d-2642",uc_greedy:"1f3cc-2642",shortnames:[],category:"activity"},":man_lifting_weights:":{uc_base:"1f3cb-2642",uc_output:"1f3cb-fe0f-200d-2642-fe0f",uc_match:"1f3cb-fe0f-200d-2642",uc_greedy:"1f3cb-2642",shortnames:[],category:"activity"},":woman_bouncing_ball_tone1:":{uc_base:"26f9-1f3fb-2640",uc_output:"26f9-1f3fb-200d-2640-fe0f",uc_match:"26f9-fe0f-1f3fb-2640-fe0f",uc_greedy:"26f9-1f3fb-2640",shortnames:[":woman_bouncing_ball_light_skin_tone:"],category:"activity"},":woman_bouncing_ball_tone2:":{uc_base:"26f9-1f3fc-2640",uc_output:"26f9-1f3fc-200d-2640-fe0f",uc_match:"26f9-fe0f-1f3fc-2640-fe0f",uc_greedy:"26f9-1f3fc-2640",shortnames:[":woman_bouncing_ball_medium_light_skin_tone:"],category:"activity"},":woman_bouncing_ball_tone3:":{uc_base:"26f9-1f3fd-2640",uc_output:"26f9-1f3fd-200d-2640-fe0f",uc_match:"26f9-fe0f-1f3fd-2640-fe0f",uc_greedy:"26f9-1f3fd-2640",shortnames:[":woman_bouncing_ball_medium_skin_tone:"],category:"activity"},":woman_bouncing_ball_tone4:":{uc_base:"26f9-1f3fe-2640",uc_output:"26f9-1f3fe-200d-2640-fe0f",uc_match:"26f9-fe0f-1f3fe-2640-fe0f",uc_greedy:"26f9-1f3fe-2640",shortnames:[":woman_bouncing_ball_medium_dark_skin_tone:"],category:"activity"},":woman_bouncing_ball_tone5:":{uc_base:"26f9-1f3ff-2640",uc_output:"26f9-1f3ff-200d-2640-fe0f",uc_match:"26f9-fe0f-1f3ff-2640-fe0f",uc_greedy:"26f9-1f3ff-2640",shortnames:[":woman_bouncing_ball_dark_skin_tone:"],category:"activity"},":woman_detective:":{uc_base:"1f575-2640",uc_output:"1f575-fe0f-200d-2640-fe0f",uc_match:"1f575-fe0f-200d-2640",uc_greedy:"1f575-2640",shortnames:[],category:"people"},":woman_golfing:":{uc_base:"1f3cc-2640",uc_output:"1f3cc-fe0f-200d-2640-fe0f",uc_match:"1f3cc-fe0f-200d-2640",uc_greedy:"1f3cc-2640",shortnames:[],category:"activity"},":woman_lifting_weights:":{uc_base:"1f3cb-2640",uc_output:"1f3cb-fe0f-200d-2640-fe0f",uc_match:"1f3cb-fe0f-200d-2640",uc_greedy:"1f3cb-2640",shortnames:[],category:"activity"},":man_bouncing_ball:":{uc_base:"26f9-2642",uc_output:"26f9-fe0f-200d-2642-fe0f",uc_match:"26f9-fe0f-200d-2642",uc_greedy:"26f9-2642",shortnames:[],category:"activity"},":woman_bouncing_ball:":{uc_base:"26f9-2640",uc_output:"26f9-fe0f-200d-2640-fe0f",uc_match:"26f9-fe0f-200d-2640",uc_greedy:"26f9-2640",shortnames:[],category:"activity"},":man_artist_tone1:":{uc_base:"1f468-1f3fb-1f3a8",uc_output:"1f468-1f3fb-200d-1f3a8",uc_match:"1f468-1f3fb-1f3a8",uc_greedy:"1f468-1f3fb-1f3a8",shortnames:[":man_artist_light_skin_tone:"],category:"people"},":man_artist_tone2:":{uc_base:"1f468-1f3fc-1f3a8",uc_output:"1f468-1f3fc-200d-1f3a8",uc_match:"1f468-1f3fc-1f3a8",uc_greedy:"1f468-1f3fc-1f3a8",shortnames:[":man_artist_medium_light_skin_tone:"],category:"people"},":man_artist_tone3:":{uc_base:"1f468-1f3fd-1f3a8",uc_output:"1f468-1f3fd-200d-1f3a8",uc_match:"1f468-1f3fd-1f3a8",uc_greedy:"1f468-1f3fd-1f3a8",shortnames:[":man_artist_medium_skin_tone:"],category:"people"},":man_artist_tone4:":{uc_base:"1f468-1f3fe-1f3a8",uc_output:"1f468-1f3fe-200d-1f3a8",uc_match:"1f468-1f3fe-1f3a8",uc_greedy:"1f468-1f3fe-1f3a8",shortnames:[":man_artist_medium_dark_skin_tone:"],category:"people"},":man_artist_tone5:":{uc_base:"1f468-1f3ff-1f3a8",uc_output:"1f468-1f3ff-200d-1f3a8",uc_match:"1f468-1f3ff-1f3a8",uc_greedy:"1f468-1f3ff-1f3a8",shortnames:[":man_artist_dark_skin_tone:"],category:"people"},":man_astronaut_tone1:":{uc_base:"1f468-1f3fb-1f680",uc_output:"1f468-1f3fb-200d-1f680",uc_match:"1f468-1f3fb-1f680",uc_greedy:"1f468-1f3fb-1f680",shortnames:[":man_astronaut_light_skin_tone:"],category:"people"},":man_astronaut_tone2:":{uc_base:"1f468-1f3fc-1f680",uc_output:"1f468-1f3fc-200d-1f680",uc_match:"1f468-1f3fc-1f680",uc_greedy:"1f468-1f3fc-1f680",shortnames:[":man_astronaut_medium_light_skin_tone:"],category:"people"},":man_astronaut_tone3:":{uc_base:"1f468-1f3fd-1f680",uc_output:"1f468-1f3fd-200d-1f680",uc_match:"1f468-1f3fd-1f680",uc_greedy:"1f468-1f3fd-1f680",shortnames:[":man_astronaut_medium_skin_tone:"],category:"people"},":man_astronaut_tone4:":{uc_base:"1f468-1f3fe-1f680",uc_output:"1f468-1f3fe-200d-1f680",uc_match:"1f468-1f3fe-1f680",uc_greedy:"1f468-1f3fe-1f680",shortnames:[":man_astronaut_medium_dark_skin_tone:"],category:"people"},":man_astronaut_tone5:":{uc_base:"1f468-1f3ff-1f680",uc_output:"1f468-1f3ff-200d-1f680",uc_match:"1f468-1f3ff-1f680",uc_greedy:"1f468-1f3ff-1f680",shortnames:[":man_astronaut_dark_skin_tone:"],category:"people"},":man_bald_tone1:":{uc_base:"1f468-1f3fb-1f9b2",uc_output:"1f468-1f3fb-200d-1f9b2",uc_match:"1f468-1f3fb-1f9b2",uc_greedy:"1f468-1f3fb-1f9b2",shortnames:[":man_bald_light_skin_tone:"],category:"people"},":man_bald_tone2:":{uc_base:"1f468-1f3fc-1f9b2",uc_output:"1f468-1f3fc-200d-1f9b2",uc_match:"1f468-1f3fc-1f9b2",uc_greedy:"1f468-1f3fc-1f9b2",shortnames:[":man_bald_medium_light_skin_tone:"],category:"people"},":man_bald_tone3:":{uc_base:"1f468-1f3fd-1f9b2",uc_output:"1f468-1f3fd-200d-1f9b2",uc_match:"1f468-1f3fd-1f9b2",uc_greedy:"1f468-1f3fd-1f9b2",shortnames:[":man_bald_medium_skin_tone:"],category:"people"},":man_bald_tone4:":{uc_base:"1f468-1f3fe-1f9b2",uc_output:"1f468-1f3fe-200d-1f9b2",uc_match:"1f468-1f3fe-1f9b2",uc_greedy:"1f468-1f3fe-1f9b2",shortnames:[":man_bald_medium_dark_skin_tone:"],category:"people"},":man_bald_tone5:":{uc_base:"1f468-1f3ff-1f9b2",uc_output:"1f468-1f3ff-200d-1f9b2",uc_match:"1f468-1f3ff-1f9b2",uc_greedy:"1f468-1f3ff-1f9b2",shortnames:[":man_bald_dark_skin_tone:"],category:"people"},":man_cook_tone1:":{uc_base:"1f468-1f3fb-1f373",uc_output:"1f468-1f3fb-200d-1f373",uc_match:"1f468-1f3fb-1f373",uc_greedy:"1f468-1f3fb-1f373",shortnames:[":man_cook_light_skin_tone:"],category:"people"},":man_cook_tone2:":{uc_base:"1f468-1f3fc-1f373",uc_output:"1f468-1f3fc-200d-1f373",uc_match:"1f468-1f3fc-1f373",uc_greedy:"1f468-1f3fc-1f373",shortnames:[":man_cook_medium_light_skin_tone:"],category:"people"},":man_cook_tone3:":{uc_base:"1f468-1f3fd-1f373",uc_output:"1f468-1f3fd-200d-1f373",uc_match:"1f468-1f3fd-1f373",uc_greedy:"1f468-1f3fd-1f373",shortnames:[":man_cook_medium_skin_tone:"],category:"people"},":man_cook_tone4:":{uc_base:"1f468-1f3fe-1f373",uc_output:"1f468-1f3fe-200d-1f373",uc_match:"1f468-1f3fe-1f373",uc_greedy:"1f468-1f3fe-1f373",shortnames:[":man_cook_medium_dark_skin_tone:"],category:"people"},":man_cook_tone5:":{uc_base:"1f468-1f3ff-1f373",uc_output:"1f468-1f3ff-200d-1f373",uc_match:"1f468-1f3ff-1f373",uc_greedy:"1f468-1f3ff-1f373",shortnames:[":man_cook_dark_skin_tone:"],category:"people"},":man_curly_haired_tone1:":{uc_base:"1f468-1f3fb-1f9b1",uc_output:"1f468-1f3fb-200d-1f9b1",uc_match:"1f468-1f3fb-1f9b1",uc_greedy:"1f468-1f3fb-1f9b1",shortnames:[":man_curly_haired_light_skin_tone:"],category:"people"},":man_curly_haired_tone2:":{uc_base:"1f468-1f3fc-1f9b1",uc_output:"1f468-1f3fc-200d-1f9b1",uc_match:"1f468-1f3fc-1f9b1",uc_greedy:"1f468-1f3fc-1f9b1",shortnames:[":man_curly_haired_medium_light_skin_tone:"],category:"people"},":man_curly_haired_tone3:":{uc_base:"1f468-1f3fd-1f9b1",uc_output:"1f468-1f3fd-200d-1f9b1",uc_match:"1f468-1f3fd-1f9b1",uc_greedy:"1f468-1f3fd-1f9b1",shortnames:[":man_curly_haired_medium_skin_tone:"],category:"people"},":man_curly_haired_tone4:":{uc_base:"1f468-1f3fe-1f9b1",uc_output:"1f468-1f3fe-200d-1f9b1",uc_match:"1f468-1f3fe-1f9b1",uc_greedy:"1f468-1f3fe-1f9b1",shortnames:[":man_curly_haired_medium_dark_skin_tone:"],category:"people"},":man_curly_haired_tone5:":{uc_base:"1f468-1f3ff-1f9b1",uc_output:"1f468-1f3ff-200d-1f9b1",uc_match:"1f468-1f3ff-1f9b1",uc_greedy:"1f468-1f3ff-1f9b1",shortnames:[":man_curly_haired_dark_skin_tone:"],category:"people"},":man_factory_worker_tone1:":{uc_base:"1f468-1f3fb-1f3ed",uc_output:"1f468-1f3fb-200d-1f3ed",uc_match:"1f468-1f3fb-1f3ed",uc_greedy:"1f468-1f3fb-1f3ed",shortnames:[":man_factory_worker_light_skin_tone:"],category:"people"},":man_factory_worker_tone2:":{uc_base:"1f468-1f3fc-1f3ed",uc_output:"1f468-1f3fc-200d-1f3ed",uc_match:"1f468-1f3fc-1f3ed",uc_greedy:"1f468-1f3fc-1f3ed",shortnames:[":man_factory_worker_medium_light_skin_tone:"],category:"people"},":man_factory_worker_tone3:":{uc_base:"1f468-1f3fd-1f3ed",uc_output:"1f468-1f3fd-200d-1f3ed",uc_match:"1f468-1f3fd-1f3ed",uc_greedy:"1f468-1f3fd-1f3ed",shortnames:[":man_factory_worker_medium_skin_tone:"],category:"people"},":man_factory_worker_tone4:":{uc_base:"1f468-1f3fe-1f3ed",uc_output:"1f468-1f3fe-200d-1f3ed",uc_match:"1f468-1f3fe-1f3ed",uc_greedy:"1f468-1f3fe-1f3ed",shortnames:[":man_factory_worker_medium_dark_skin_tone:"],category:"people"},":man_factory_worker_tone5:":{uc_base:"1f468-1f3ff-1f3ed",uc_output:"1f468-1f3ff-200d-1f3ed",uc_match:"1f468-1f3ff-1f3ed",uc_greedy:"1f468-1f3ff-1f3ed",shortnames:[":man_factory_worker_dark_skin_tone:"],category:"people"},":man_farmer_tone1:":{uc_base:"1f468-1f3fb-1f33e",uc_output:"1f468-1f3fb-200d-1f33e",uc_match:"1f468-1f3fb-1f33e",uc_greedy:"1f468-1f3fb-1f33e",shortnames:[":man_farmer_light_skin_tone:"],category:"people"},":man_farmer_tone2:":{uc_base:"1f468-1f3fc-1f33e",uc_output:"1f468-1f3fc-200d-1f33e",uc_match:"1f468-1f3fc-1f33e",uc_greedy:"1f468-1f3fc-1f33e",shortnames:[":man_farmer_medium_light_skin_tone:"],category:"people"},":man_farmer_tone3:":{uc_base:"1f468-1f3fd-1f33e",uc_output:"1f468-1f3fd-200d-1f33e",uc_match:"1f468-1f3fd-1f33e",uc_greedy:"1f468-1f3fd-1f33e",shortnames:[":man_farmer_medium_skin_tone:"],category:"people"},":man_farmer_tone4:":{uc_base:"1f468-1f3fe-1f33e",uc_output:"1f468-1f3fe-200d-1f33e",uc_match:"1f468-1f3fe-1f33e",uc_greedy:"1f468-1f3fe-1f33e",shortnames:[":man_farmer_medium_dark_skin_tone:"],category:"people"},":man_farmer_tone5:":{uc_base:"1f468-1f3ff-1f33e",uc_output:"1f468-1f3ff-200d-1f33e",uc_match:"1f468-1f3ff-1f33e",uc_greedy:"1f468-1f3ff-1f33e",shortnames:[":man_farmer_dark_skin_tone:"],category:"people"},":man_firefighter_tone1:":{uc_base:"1f468-1f3fb-1f692",uc_output:"1f468-1f3fb-200d-1f692",uc_match:"1f468-1f3fb-1f692",uc_greedy:"1f468-1f3fb-1f692",shortnames:[":man_firefighter_light_skin_tone:"],category:"people"},":man_firefighter_tone2:":{uc_base:"1f468-1f3fc-1f692",uc_output:"1f468-1f3fc-200d-1f692",uc_match:"1f468-1f3fc-1f692",uc_greedy:"1f468-1f3fc-1f692",shortnames:[":man_firefighter_medium_light_skin_tone:"],category:"people"},":man_firefighter_tone3:":{uc_base:"1f468-1f3fd-1f692",uc_output:"1f468-1f3fd-200d-1f692",uc_match:"1f468-1f3fd-1f692",uc_greedy:"1f468-1f3fd-1f692",shortnames:[":man_firefighter_medium_skin_tone:"],category:"people"},":man_firefighter_tone4:":{uc_base:"1f468-1f3fe-1f692",uc_output:"1f468-1f3fe-200d-1f692",uc_match:"1f468-1f3fe-1f692",uc_greedy:"1f468-1f3fe-1f692",shortnames:[":man_firefighter_medium_dark_skin_tone:"],category:"people"},":man_firefighter_tone5:":{uc_base:"1f468-1f3ff-1f692",uc_output:"1f468-1f3ff-200d-1f692",uc_match:"1f468-1f3ff-1f692",uc_greedy:"1f468-1f3ff-1f692",shortnames:[":man_firefighter_dark_skin_tone:"],category:"people"},":man_mechanic_tone1:":{uc_base:"1f468-1f3fb-1f527",uc_output:"1f468-1f3fb-200d-1f527",uc_match:"1f468-1f3fb-1f527",uc_greedy:"1f468-1f3fb-1f527",shortnames:[":man_mechanic_light_skin_tone:"],category:"people"},":man_mechanic_tone2:":{uc_base:"1f468-1f3fc-1f527",uc_output:"1f468-1f3fc-200d-1f527",uc_match:"1f468-1f3fc-1f527",uc_greedy:"1f468-1f3fc-1f527",shortnames:[":man_mechanic_medium_light_skin_tone:"],category:"people"},":man_mechanic_tone3:":{uc_base:"1f468-1f3fd-1f527",uc_output:"1f468-1f3fd-200d-1f527",uc_match:"1f468-1f3fd-1f527",uc_greedy:"1f468-1f3fd-1f527",shortnames:[":man_mechanic_medium_skin_tone:"],category:"people"},":man_mechanic_tone4:":{uc_base:"1f468-1f3fe-1f527",uc_output:"1f468-1f3fe-200d-1f527",uc_match:"1f468-1f3fe-1f527",uc_greedy:"1f468-1f3fe-1f527",shortnames:[":man_mechanic_medium_dark_skin_tone:"],category:"people"},":man_mechanic_tone5:":{uc_base:"1f468-1f3ff-1f527",uc_output:"1f468-1f3ff-200d-1f527",uc_match:"1f468-1f3ff-1f527",uc_greedy:"1f468-1f3ff-1f527",shortnames:[":man_mechanic_dark_skin_tone:"],category:"people"},":man_office_worker_tone1:":{uc_base:"1f468-1f3fb-1f4bc",uc_output:"1f468-1f3fb-200d-1f4bc",uc_match:"1f468-1f3fb-1f4bc",uc_greedy:"1f468-1f3fb-1f4bc",shortnames:[":man_office_worker_light_skin_tone:"],category:"people"},":man_office_worker_tone2:":{uc_base:"1f468-1f3fc-1f4bc",uc_output:"1f468-1f3fc-200d-1f4bc",uc_match:"1f468-1f3fc-1f4bc",uc_greedy:"1f468-1f3fc-1f4bc",shortnames:[":man_office_worker_medium_light_skin_tone:"],category:"people"},":man_office_worker_tone3:":{uc_base:"1f468-1f3fd-1f4bc",uc_output:"1f468-1f3fd-200d-1f4bc",uc_match:"1f468-1f3fd-1f4bc",uc_greedy:"1f468-1f3fd-1f4bc",shortnames:[":man_office_worker_medium_skin_tone:"],category:"people"},":man_office_worker_tone4:":{uc_base:"1f468-1f3fe-1f4bc",uc_output:"1f468-1f3fe-200d-1f4bc",uc_match:"1f468-1f3fe-1f4bc",uc_greedy:"1f468-1f3fe-1f4bc",shortnames:[":man_office_worker_medium_dark_skin_tone:"],category:"people"},":man_office_worker_tone5:":{uc_base:"1f468-1f3ff-1f4bc",uc_output:"1f468-1f3ff-200d-1f4bc",uc_match:"1f468-1f3ff-1f4bc",uc_greedy:"1f468-1f3ff-1f4bc",shortnames:[":man_office_worker_dark_skin_tone:"],category:"people"},":man_red_haired_tone1:":{uc_base:"1f468-1f3fb-1f9b0",uc_output:"1f468-1f3fb-200d-1f9b0",uc_match:"1f468-1f3fb-1f9b0",uc_greedy:"1f468-1f3fb-1f9b0",shortnames:[":man_red_haired_light_skin_tone:"],category:"people"},":man_red_haired_tone2:":{uc_base:"1f468-1f3fc-1f9b0",uc_output:"1f468-1f3fc-200d-1f9b0",uc_match:"1f468-1f3fc-1f9b0",uc_greedy:"1f468-1f3fc-1f9b0",shortnames:[":man_red_haired_medium_light_skin_tone:"],category:"people"},":man_red_haired_tone3:":{uc_base:"1f468-1f3fd-1f9b0",uc_output:"1f468-1f3fd-200d-1f9b0",uc_match:"1f468-1f3fd-1f9b0",uc_greedy:"1f468-1f3fd-1f9b0",shortnames:[":man_red_haired_medium_skin_tone:"],category:"people"},":man_red_haired_tone4:":{uc_base:"1f468-1f3fe-1f9b0",uc_output:"1f468-1f3fe-200d-1f9b0",uc_match:"1f468-1f3fe-1f9b0",uc_greedy:"1f468-1f3fe-1f9b0",shortnames:[":man_red_haired_medium_dark_skin_tone:"],category:"people"},":man_red_haired_tone5:":{uc_base:"1f468-1f3ff-1f9b0",uc_output:"1f468-1f3ff-200d-1f9b0",uc_match:"1f468-1f3ff-1f9b0",uc_greedy:"1f468-1f3ff-1f9b0",shortnames:[":man_red_haired_dark_skin_tone:"],category:"people"},":man_scientist_tone1:":{uc_base:"1f468-1f3fb-1f52c",uc_output:"1f468-1f3fb-200d-1f52c",uc_match:"1f468-1f3fb-1f52c",uc_greedy:"1f468-1f3fb-1f52c",shortnames:[":man_scientist_light_skin_tone:"],category:"people"},":man_scientist_tone2:":{uc_base:"1f468-1f3fc-1f52c",uc_output:"1f468-1f3fc-200d-1f52c",uc_match:"1f468-1f3fc-1f52c",uc_greedy:"1f468-1f3fc-1f52c",shortnames:[":man_scientist_medium_light_skin_tone:"],category:"people"},":man_scientist_tone3:":{uc_base:"1f468-1f3fd-1f52c",uc_output:"1f468-1f3fd-200d-1f52c",uc_match:"1f468-1f3fd-1f52c",uc_greedy:"1f468-1f3fd-1f52c",shortnames:[":man_scientist_medium_skin_tone:"],category:"people"},":man_scientist_tone4:":{uc_base:"1f468-1f3fe-1f52c",uc_output:"1f468-1f3fe-200d-1f52c",uc_match:"1f468-1f3fe-1f52c",uc_greedy:"1f468-1f3fe-1f52c",shortnames:[":man_scientist_medium_dark_skin_tone:"],category:"people"},":man_scientist_tone5:":{uc_base:"1f468-1f3ff-1f52c",uc_output:"1f468-1f3ff-200d-1f52c",uc_match:"1f468-1f3ff-1f52c",uc_greedy:"1f468-1f3ff-1f52c",shortnames:[":man_scientist_dark_skin_tone:"],category:"people"},":man_singer_tone1:":{uc_base:"1f468-1f3fb-1f3a4",uc_output:"1f468-1f3fb-200d-1f3a4",uc_match:"1f468-1f3fb-1f3a4",uc_greedy:"1f468-1f3fb-1f3a4",shortnames:[":man_singer_light_skin_tone:"],category:"people"},":man_singer_tone2:":{uc_base:"1f468-1f3fc-1f3a4",uc_output:"1f468-1f3fc-200d-1f3a4",uc_match:"1f468-1f3fc-1f3a4",uc_greedy:"1f468-1f3fc-1f3a4",shortnames:[":man_singer_medium_light_skin_tone:"],category:"people"},":man_singer_tone3:":{uc_base:"1f468-1f3fd-1f3a4",uc_output:"1f468-1f3fd-200d-1f3a4",uc_match:"1f468-1f3fd-1f3a4",uc_greedy:"1f468-1f3fd-1f3a4",shortnames:[":man_singer_medium_skin_tone:"],category:"people"},":man_singer_tone4:":{uc_base:"1f468-1f3fe-1f3a4",uc_output:"1f468-1f3fe-200d-1f3a4",uc_match:"1f468-1f3fe-1f3a4",uc_greedy:"1f468-1f3fe-1f3a4",shortnames:[":man_singer_medium_dark_skin_tone:"],category:"people"},":man_singer_tone5:":{uc_base:"1f468-1f3ff-1f3a4",uc_output:"1f468-1f3ff-200d-1f3a4",uc_match:"1f468-1f3ff-1f3a4",uc_greedy:"1f468-1f3ff-1f3a4",shortnames:[":man_singer_dark_skin_tone:"],category:"people"},":man_student_tone1:":{uc_base:"1f468-1f3fb-1f393",uc_output:"1f468-1f3fb-200d-1f393",uc_match:"1f468-1f3fb-1f393",uc_greedy:"1f468-1f3fb-1f393",shortnames:[":man_student_light_skin_tone:"],category:"people"},":man_student_tone2:":{uc_base:"1f468-1f3fc-1f393",uc_output:"1f468-1f3fc-200d-1f393",uc_match:"1f468-1f3fc-1f393",uc_greedy:"1f468-1f3fc-1f393",shortnames:[":man_student_medium_light_skin_tone:"],category:"people"},":man_student_tone3:":{uc_base:"1f468-1f3fd-1f393",uc_output:"1f468-1f3fd-200d-1f393",uc_match:"1f468-1f3fd-1f393",uc_greedy:"1f468-1f3fd-1f393",shortnames:[":man_student_medium_skin_tone:"],category:"people"},":man_student_tone4:":{uc_base:"1f468-1f3fe-1f393",uc_output:"1f468-1f3fe-200d-1f393",uc_match:"1f468-1f3fe-1f393",uc_greedy:"1f468-1f3fe-1f393",shortnames:[":man_student_medium_dark_skin_tone:"],category:"people"},":man_student_tone5:":{uc_base:"1f468-1f3ff-1f393",uc_output:"1f468-1f3ff-200d-1f393",uc_match:"1f468-1f3ff-1f393",uc_greedy:"1f468-1f3ff-1f393",shortnames:[":man_student_dark_skin_tone:"],category:"people"},":man_teacher_tone1:":{uc_base:"1f468-1f3fb-1f3eb",uc_output:"1f468-1f3fb-200d-1f3eb",uc_match:"1f468-1f3fb-1f3eb",uc_greedy:"1f468-1f3fb-1f3eb",shortnames:[":man_teacher_light_skin_tone:"],category:"people"},":man_teacher_tone2:":{uc_base:"1f468-1f3fc-1f3eb",uc_output:"1f468-1f3fc-200d-1f3eb",uc_match:"1f468-1f3fc-1f3eb",uc_greedy:"1f468-1f3fc-1f3eb",shortnames:[":man_teacher_medium_light_skin_tone:"],category:"people"},":man_teacher_tone3:":{uc_base:"1f468-1f3fd-1f3eb",uc_output:"1f468-1f3fd-200d-1f3eb",uc_match:"1f468-1f3fd-1f3eb",uc_greedy:"1f468-1f3fd-1f3eb",shortnames:[":man_teacher_medium_skin_tone:"],category:"people"},":man_teacher_tone4:":{uc_base:"1f468-1f3fe-1f3eb",uc_output:"1f468-1f3fe-200d-1f3eb",uc_match:"1f468-1f3fe-1f3eb",uc_greedy:"1f468-1f3fe-1f3eb",shortnames:[":man_teacher_medium_dark_skin_tone:"],category:"people"},":man_teacher_tone5:":{uc_base:"1f468-1f3ff-1f3eb",uc_output:"1f468-1f3ff-200d-1f3eb",uc_match:"1f468-1f3ff-1f3eb",uc_greedy:"1f468-1f3ff-1f3eb",shortnames:[":man_teacher_dark_skin_tone:"],category:"people"},":man_technologist_tone1:":{uc_base:"1f468-1f3fb-1f4bb",uc_output:"1f468-1f3fb-200d-1f4bb",uc_match:"1f468-1f3fb-1f4bb",uc_greedy:"1f468-1f3fb-1f4bb",shortnames:[":man_technologist_light_skin_tone:"],category:"people"},":man_technologist_tone2:":{uc_base:"1f468-1f3fc-1f4bb",uc_output:"1f468-1f3fc-200d-1f4bb",uc_match:"1f468-1f3fc-1f4bb",uc_greedy:"1f468-1f3fc-1f4bb",shortnames:[":man_technologist_medium_light_skin_tone:"],category:"people"},":man_technologist_tone3:":{uc_base:"1f468-1f3fd-1f4bb",uc_output:"1f468-1f3fd-200d-1f4bb",uc_match:"1f468-1f3fd-1f4bb",uc_greedy:"1f468-1f3fd-1f4bb",shortnames:[":man_technologist_medium_skin_tone:"],category:"people"},":man_technologist_tone4:":{uc_base:"1f468-1f3fe-1f4bb",uc_output:"1f468-1f3fe-200d-1f4bb",uc_match:"1f468-1f3fe-1f4bb",uc_greedy:"1f468-1f3fe-1f4bb",shortnames:[":man_technologist_medium_dark_skin_tone:"],category:"people"},":man_technologist_tone5:":{uc_base:"1f468-1f3ff-1f4bb",uc_output:"1f468-1f3ff-200d-1f4bb",uc_match:"1f468-1f3ff-1f4bb",uc_greedy:"1f468-1f3ff-1f4bb",shortnames:[":man_technologist_dark_skin_tone:"],category:"people"},":man_white_haired_tone1:":{uc_base:"1f468-1f3fb-1f9b3",uc_output:"1f468-1f3fb-200d-1f9b3",uc_match:"1f468-1f3fb-1f9b3",uc_greedy:"1f468-1f3fb-1f9b3",shortnames:[":man_white_haired_light_skin_tone:"],category:"people"},":man_white_haired_tone2:":{uc_base:"1f468-1f3fc-1f9b3",uc_output:"1f468-1f3fc-200d-1f9b3",uc_match:"1f468-1f3fc-1f9b3",uc_greedy:"1f468-1f3fc-1f9b3",shortnames:[":man_white_haired_medium_light_skin_tone:"],category:"people"},":man_white_haired_tone3:":{uc_base:"1f468-1f3fd-1f9b3",uc_output:"1f468-1f3fd-200d-1f9b3",uc_match:"1f468-1f3fd-1f9b3",uc_greedy:"1f468-1f3fd-1f9b3",shortnames:[":man_white_haired_medium_skin_tone:"],category:"people"},":man_white_haired_tone4:":{uc_base:"1f468-1f3fe-1f9b3",uc_output:"1f468-1f3fe-200d-1f9b3",uc_match:"1f468-1f3fe-1f9b3",uc_greedy:"1f468-1f3fe-1f9b3",shortnames:[":man_white_haired_medium_dark_skin_tone:"],category:"people"},":man_white_haired_tone5:":{uc_base:"1f468-1f3ff-1f9b3",uc_output:"1f468-1f3ff-200d-1f9b3",uc_match:"1f468-1f3ff-1f9b3",uc_greedy:"1f468-1f3ff-1f9b3",shortnames:[":man_white_haired_dark_skin_tone:"],category:"people"},":woman_artist_tone1:":{uc_base:"1f469-1f3fb-1f3a8",uc_output:"1f469-1f3fb-200d-1f3a8",uc_match:"1f469-1f3fb-1f3a8",uc_greedy:"1f469-1f3fb-1f3a8",shortnames:[":woman_artist_light_skin_tone:"],category:"people"},":woman_artist_tone2:":{uc_base:"1f469-1f3fc-1f3a8",uc_output:"1f469-1f3fc-200d-1f3a8",uc_match:"1f469-1f3fc-1f3a8",uc_greedy:"1f469-1f3fc-1f3a8",shortnames:[":woman_artist_medium_light_skin_tone:"],category:"people"},":woman_artist_tone3:":{uc_base:"1f469-1f3fd-1f3a8",uc_output:"1f469-1f3fd-200d-1f3a8",uc_match:"1f469-1f3fd-1f3a8",uc_greedy:"1f469-1f3fd-1f3a8",shortnames:[":woman_artist_medium_skin_tone:"],category:"people"},":woman_artist_tone4:":{uc_base:"1f469-1f3fe-1f3a8",uc_output:"1f469-1f3fe-200d-1f3a8",uc_match:"1f469-1f3fe-1f3a8",uc_greedy:"1f469-1f3fe-1f3a8",shortnames:[":woman_artist_medium_dark_skin_tone:"],category:"people"},":woman_artist_tone5:":{uc_base:"1f469-1f3ff-1f3a8",uc_output:"1f469-1f3ff-200d-1f3a8",uc_match:"1f469-1f3ff-1f3a8",uc_greedy:"1f469-1f3ff-1f3a8",shortnames:[":woman_artist_dark_skin_tone:"],category:"people"},":woman_astronaut_tone1:":{uc_base:"1f469-1f3fb-1f680",uc_output:"1f469-1f3fb-200d-1f680",uc_match:"1f469-1f3fb-1f680",uc_greedy:"1f469-1f3fb-1f680",shortnames:[":woman_astronaut_light_skin_tone:"],category:"people"},":woman_astronaut_tone2:":{uc_base:"1f469-1f3fc-1f680",uc_output:"1f469-1f3fc-200d-1f680",uc_match:"1f469-1f3fc-1f680",uc_greedy:"1f469-1f3fc-1f680",shortnames:[":woman_astronaut_medium_light_skin_tone:"],category:"people"},":woman_astronaut_tone3:":{uc_base:"1f469-1f3fd-1f680",uc_output:"1f469-1f3fd-200d-1f680",uc_match:"1f469-1f3fd-1f680",uc_greedy:"1f469-1f3fd-1f680",shortnames:[":woman_astronaut_medium_skin_tone:"],category:"people"},":woman_astronaut_tone4:":{uc_base:"1f469-1f3fe-1f680",uc_output:"1f469-1f3fe-200d-1f680",uc_match:"1f469-1f3fe-1f680",uc_greedy:"1f469-1f3fe-1f680",shortnames:[":woman_astronaut_medium_dark_skin_tone:"],category:"people"},":woman_astronaut_tone5:":{uc_base:"1f469-1f3ff-1f680",uc_output:"1f469-1f3ff-200d-1f680",uc_match:"1f469-1f3ff-1f680",uc_greedy:"1f469-1f3ff-1f680",shortnames:[":woman_astronaut_dark_skin_tone:"],category:"people"},":woman_bald_tone1:":{uc_base:"1f469-1f3fb-1f9b2",uc_output:"1f469-1f3fb-200d-1f9b2",uc_match:"1f469-1f3fb-1f9b2",uc_greedy:"1f469-1f3fb-1f9b2",shortnames:[":woman_bald_light_skin_tone:"],category:"people"},":woman_bald_tone2:":{uc_base:"1f469-1f3fc-1f9b2",uc_output:"1f469-1f3fc-200d-1f9b2",uc_match:"1f469-1f3fc-1f9b2",uc_greedy:"1f469-1f3fc-1f9b2",shortnames:[":woman_bald_medium_light_skin_tone:"],category:"people"},":woman_bald_tone3:":{uc_base:"1f469-1f3fd-1f9b2",uc_output:"1f469-1f3fd-200d-1f9b2",uc_match:"1f469-1f3fd-1f9b2",uc_greedy:"1f469-1f3fd-1f9b2",shortnames:[":woman_bald_medium_skin_tone:"],category:"people"},":woman_bald_tone4:":{uc_base:"1f469-1f3fe-1f9b2",uc_output:"1f469-1f3fe-200d-1f9b2",uc_match:"1f469-1f3fe-1f9b2",uc_greedy:"1f469-1f3fe-1f9b2",shortnames:[":woman_bald_medium_dark_skin_tone:"],category:"people"},":woman_bald_tone5:":{uc_base:"1f469-1f3ff-1f9b2",uc_output:"1f469-1f3ff-200d-1f9b2",uc_match:"1f469-1f3ff-1f9b2",uc_greedy:"1f469-1f3ff-1f9b2",shortnames:[":woman_bald_dark_skin_tone:"],category:"people"},":woman_cook_tone1:":{uc_base:"1f469-1f3fb-1f373",uc_output:"1f469-1f3fb-200d-1f373",uc_match:"1f469-1f3fb-1f373",uc_greedy:"1f469-1f3fb-1f373",shortnames:[":woman_cook_light_skin_tone:"],category:"people"},":woman_cook_tone2:":{uc_base:"1f469-1f3fc-1f373",uc_output:"1f469-1f3fc-200d-1f373",uc_match:"1f469-1f3fc-1f373",uc_greedy:"1f469-1f3fc-1f373",shortnames:[":woman_cook_medium_light_skin_tone:"],category:"people"},":woman_cook_tone3:":{uc_base:"1f469-1f3fd-1f373",uc_output:"1f469-1f3fd-200d-1f373",uc_match:"1f469-1f3fd-1f373",uc_greedy:"1f469-1f3fd-1f373",shortnames:[":woman_cook_medium_skin_tone:"],category:"people"},":woman_cook_tone4:":{uc_base:"1f469-1f3fe-1f373",uc_output:"1f469-1f3fe-200d-1f373",uc_match:"1f469-1f3fe-1f373",uc_greedy:"1f469-1f3fe-1f373",shortnames:[":woman_cook_medium_dark_skin_tone:"],category:"people"},":woman_cook_tone5:":{uc_base:"1f469-1f3ff-1f373",uc_output:"1f469-1f3ff-200d-1f373",uc_match:"1f469-1f3ff-1f373",uc_greedy:"1f469-1f3ff-1f373",shortnames:[":woman_cook_dark_skin_tone:"],category:"people"},":woman_curly_haired_tone1:":{uc_base:"1f469-1f3fb-1f9b1",uc_output:"1f469-1f3fb-200d-1f9b1",uc_match:"1f469-1f3fb-1f9b1",uc_greedy:"1f469-1f3fb-1f9b1",shortnames:[":woman_curly_haired_light_skin_tone:"],category:"people"},":woman_curly_haired_tone2:":{uc_base:"1f469-1f3fc-1f9b1",uc_output:"1f469-1f3fc-200d-1f9b1",uc_match:"1f469-1f3fc-1f9b1",uc_greedy:"1f469-1f3fc-1f9b1",shortnames:[":woman_curly_haired_medium_light_skin_tone:"],category:"people"},":woman_curly_haired_tone3:":{uc_base:"1f469-1f3fd-1f9b1",uc_output:"1f469-1f3fd-200d-1f9b1",uc_match:"1f469-1f3fd-1f9b1",uc_greedy:"1f469-1f3fd-1f9b1",shortnames:[":woman_curly_haired_medium_skin_tone:"],category:"people"},":woman_curly_haired_tone4:":{uc_base:"1f469-1f3fe-1f9b1",uc_output:"1f469-1f3fe-200d-1f9b1",uc_match:"1f469-1f3fe-1f9b1",uc_greedy:"1f469-1f3fe-1f9b1",shortnames:[":woman_curly_haired_medium_dark_skin_tone:"],category:"people"},":woman_curly_haired_tone5:":{uc_base:"1f469-1f3ff-1f9b1",uc_output:"1f469-1f3ff-200d-1f9b1",uc_match:"1f469-1f3ff-1f9b1",uc_greedy:"1f469-1f3ff-1f9b1",shortnames:[":woman_curly_haired_dark_skin_tone:"],category:"people"},":woman_factory_worker_tone1:":{uc_base:"1f469-1f3fb-1f3ed",uc_output:"1f469-1f3fb-200d-1f3ed",uc_match:"1f469-1f3fb-1f3ed",uc_greedy:"1f469-1f3fb-1f3ed",shortnames:[":woman_factory_worker_light_skin_tone:"],category:"people"},":woman_factory_worker_tone2:":{uc_base:"1f469-1f3fc-1f3ed",uc_output:"1f469-1f3fc-200d-1f3ed",uc_match:"1f469-1f3fc-1f3ed",uc_greedy:"1f469-1f3fc-1f3ed",shortnames:[":woman_factory_worker_medium_light_skin_tone:"],category:"people"},":woman_factory_worker_tone3:":{uc_base:"1f469-1f3fd-1f3ed",uc_output:"1f469-1f3fd-200d-1f3ed",uc_match:"1f469-1f3fd-1f3ed",uc_greedy:"1f469-1f3fd-1f3ed",shortnames:[":woman_factory_worker_medium_skin_tone:"],category:"people"},":woman_factory_worker_tone4:":{uc_base:"1f469-1f3fe-1f3ed",uc_output:"1f469-1f3fe-200d-1f3ed",uc_match:"1f469-1f3fe-1f3ed",uc_greedy:"1f469-1f3fe-1f3ed",shortnames:[":woman_factory_worker_medium_dark_skin_tone:"],category:"people"},":woman_factory_worker_tone5:":{uc_base:"1f469-1f3ff-1f3ed",uc_output:"1f469-1f3ff-200d-1f3ed",uc_match:"1f469-1f3ff-1f3ed",uc_greedy:"1f469-1f3ff-1f3ed",shortnames:[":woman_factory_worker_dark_skin_tone:"],category:"people"},":woman_farmer_tone1:":{uc_base:"1f469-1f3fb-1f33e",uc_output:"1f469-1f3fb-200d-1f33e",uc_match:"1f469-1f3fb-1f33e",uc_greedy:"1f469-1f3fb-1f33e",shortnames:[":woman_farmer_light_skin_tone:"],category:"people"},":woman_farmer_tone2:":{uc_base:"1f469-1f3fc-1f33e",uc_output:"1f469-1f3fc-200d-1f33e",uc_match:"1f469-1f3fc-1f33e",uc_greedy:"1f469-1f3fc-1f33e",shortnames:[":woman_farmer_medium_light_skin_tone:"],category:"people"},":woman_farmer_tone3:":{uc_base:"1f469-1f3fd-1f33e",uc_output:"1f469-1f3fd-200d-1f33e",uc_match:"1f469-1f3fd-1f33e",uc_greedy:"1f469-1f3fd-1f33e",shortnames:[":woman_farmer_medium_skin_tone:"],category:"people"},":woman_farmer_tone4:":{uc_base:"1f469-1f3fe-1f33e",uc_output:"1f469-1f3fe-200d-1f33e",uc_match:"1f469-1f3fe-1f33e",uc_greedy:"1f469-1f3fe-1f33e",shortnames:[":woman_farmer_medium_dark_skin_tone:"],category:"people"},":woman_farmer_tone5:":{uc_base:"1f469-1f3ff-1f33e",uc_output:"1f469-1f3ff-200d-1f33e",uc_match:"1f469-1f3ff-1f33e",uc_greedy:"1f469-1f3ff-1f33e",shortnames:[":woman_farmer_dark_skin_tone:"],category:"people"},":woman_firefighter_tone1:":{uc_base:"1f469-1f3fb-1f692",uc_output:"1f469-1f3fb-200d-1f692",uc_match:"1f469-1f3fb-1f692",uc_greedy:"1f469-1f3fb-1f692",shortnames:[":woman_firefighter_light_skin_tone:"],category:"people"},":woman_firefighter_tone2:":{uc_base:"1f469-1f3fc-1f692",uc_output:"1f469-1f3fc-200d-1f692",uc_match:"1f469-1f3fc-1f692",uc_greedy:"1f469-1f3fc-1f692",shortnames:[":woman_firefighter_medium_light_skin_tone:"],category:"people"},":woman_firefighter_tone3:":{uc_base:"1f469-1f3fd-1f692",uc_output:"1f469-1f3fd-200d-1f692",uc_match:"1f469-1f3fd-1f692",uc_greedy:"1f469-1f3fd-1f692",shortnames:[":woman_firefighter_medium_skin_tone:"],category:"people"},":woman_firefighter_tone4:":{uc_base:"1f469-1f3fe-1f692",uc_output:"1f469-1f3fe-200d-1f692",uc_match:"1f469-1f3fe-1f692",uc_greedy:"1f469-1f3fe-1f692",shortnames:[":woman_firefighter_medium_dark_skin_tone:"],category:"people"},":woman_firefighter_tone5:":{uc_base:"1f469-1f3ff-1f692",uc_output:"1f469-1f3ff-200d-1f692",uc_match:"1f469-1f3ff-1f692",uc_greedy:"1f469-1f3ff-1f692",shortnames:[":woman_firefighter_dark_skin_tone:"],category:"people"},":woman_mechanic_tone1:":{uc_base:"1f469-1f3fb-1f527",uc_output:"1f469-1f3fb-200d-1f527",uc_match:"1f469-1f3fb-1f527",uc_greedy:"1f469-1f3fb-1f527",shortnames:[":woman_mechanic_light_skin_tone:"],category:"people"},":woman_mechanic_tone2:":{uc_base:"1f469-1f3fc-1f527",uc_output:"1f469-1f3fc-200d-1f527",uc_match:"1f469-1f3fc-1f527",uc_greedy:"1f469-1f3fc-1f527",shortnames:[":woman_mechanic_medium_light_skin_tone:"],category:"people"},":woman_mechanic_tone3:":{uc_base:"1f469-1f3fd-1f527",uc_output:"1f469-1f3fd-200d-1f527",uc_match:"1f469-1f3fd-1f527",uc_greedy:"1f469-1f3fd-1f527",shortnames:[":woman_mechanic_medium_skin_tone:"],category:"people"},":woman_mechanic_tone4:":{uc_base:"1f469-1f3fe-1f527",uc_output:"1f469-1f3fe-200d-1f527",uc_match:"1f469-1f3fe-1f527",uc_greedy:"1f469-1f3fe-1f527",shortnames:[":woman_mechanic_medium_dark_skin_tone:"],category:"people"},":woman_mechanic_tone5:":{uc_base:"1f469-1f3ff-1f527",uc_output:"1f469-1f3ff-200d-1f527",uc_match:"1f469-1f3ff-1f527",uc_greedy:"1f469-1f3ff-1f527",shortnames:[":woman_mechanic_dark_skin_tone:"],category:"people"},":woman_office_worker_tone1:":{uc_base:"1f469-1f3fb-1f4bc",uc_output:"1f469-1f3fb-200d-1f4bc",uc_match:"1f469-1f3fb-1f4bc",uc_greedy:"1f469-1f3fb-1f4bc",shortnames:[":woman_office_worker_light_skin_tone:"],category:"people"},":woman_office_worker_tone2:":{uc_base:"1f469-1f3fc-1f4bc",uc_output:"1f469-1f3fc-200d-1f4bc",uc_match:"1f469-1f3fc-1f4bc",uc_greedy:"1f469-1f3fc-1f4bc",shortnames:[":woman_office_worker_medium_light_skin_tone:"],category:"people"},":woman_office_worker_tone3:":{uc_base:"1f469-1f3fd-1f4bc",uc_output:"1f469-1f3fd-200d-1f4bc",uc_match:"1f469-1f3fd-1f4bc",uc_greedy:"1f469-1f3fd-1f4bc",shortnames:[":woman_office_worker_medium_skin_tone:"],category:"people"},":woman_office_worker_tone4:":{uc_base:"1f469-1f3fe-1f4bc",uc_output:"1f469-1f3fe-200d-1f4bc",uc_match:"1f469-1f3fe-1f4bc",uc_greedy:"1f469-1f3fe-1f4bc",shortnames:[":woman_office_worker_medium_dark_skin_tone:"],category:"people"},":woman_office_worker_tone5:":{uc_base:"1f469-1f3ff-1f4bc",uc_output:"1f469-1f3ff-200d-1f4bc",uc_match:"1f469-1f3ff-1f4bc",uc_greedy:"1f469-1f3ff-1f4bc",shortnames:[":woman_office_worker_dark_skin_tone:"],category:"people"},":woman_red_haired_tone1:":{uc_base:"1f469-1f3fb-1f9b0",uc_output:"1f469-1f3fb-200d-1f9b0",uc_match:"1f469-1f3fb-1f9b0",uc_greedy:"1f469-1f3fb-1f9b0",shortnames:[":woman_red_haired_light_skin_tone:"],category:"people"},":woman_red_haired_tone2:":{uc_base:"1f469-1f3fc-1f9b0",uc_output:"1f469-1f3fc-200d-1f9b0",uc_match:"1f469-1f3fc-1f9b0",uc_greedy:"1f469-1f3fc-1f9b0",shortnames:[":woman_red_haired_medium_light_skin_tone:"],category:"people"},":woman_red_haired_tone3:":{uc_base:"1f469-1f3fd-1f9b0",uc_output:"1f469-1f3fd-200d-1f9b0",uc_match:"1f469-1f3fd-1f9b0",uc_greedy:"1f469-1f3fd-1f9b0",shortnames:[":woman_red_haired_medium_skin_tone:"],category:"people"},":woman_red_haired_tone4:":{uc_base:"1f469-1f3fe-1f9b0",uc_output:"1f469-1f3fe-200d-1f9b0",uc_match:"1f469-1f3fe-1f9b0",uc_greedy:"1f469-1f3fe-1f9b0",shortnames:[":woman_red_haired_medium_dark_skin_tone:"],category:"people"},":woman_red_haired_tone5:":{uc_base:"1f469-1f3ff-1f9b0",uc_output:"1f469-1f3ff-200d-1f9b0",uc_match:"1f469-1f3ff-1f9b0",uc_greedy:"1f469-1f3ff-1f9b0",shortnames:[":woman_red_haired_dark_skin_tone:"],category:"people"},":woman_scientist_tone1:":{uc_base:"1f469-1f3fb-1f52c",uc_output:"1f469-1f3fb-200d-1f52c",uc_match:"1f469-1f3fb-1f52c",uc_greedy:"1f469-1f3fb-1f52c",shortnames:[":woman_scientist_light_skin_tone:"],category:"people"},":woman_scientist_tone2:":{uc_base:"1f469-1f3fc-1f52c",uc_output:"1f469-1f3fc-200d-1f52c",uc_match:"1f469-1f3fc-1f52c",uc_greedy:"1f469-1f3fc-1f52c",shortnames:[":woman_scientist_medium_light_skin_tone:"],category:"people"},":woman_scientist_tone3:":{uc_base:"1f469-1f3fd-1f52c",uc_output:"1f469-1f3fd-200d-1f52c",uc_match:"1f469-1f3fd-1f52c",uc_greedy:"1f469-1f3fd-1f52c",shortnames:[":woman_scientist_medium_skin_tone:"],category:"people"},":woman_scientist_tone4:":{uc_base:"1f469-1f3fe-1f52c",uc_output:"1f469-1f3fe-200d-1f52c",uc_match:"1f469-1f3fe-1f52c",uc_greedy:"1f469-1f3fe-1f52c",shortnames:[":woman_scientist_medium_dark_skin_tone:"],category:"people"},":woman_scientist_tone5:":{uc_base:"1f469-1f3ff-1f52c",uc_output:"1f469-1f3ff-200d-1f52c",uc_match:"1f469-1f3ff-1f52c",uc_greedy:"1f469-1f3ff-1f52c",shortnames:[":woman_scientist_dark_skin_tone:"],category:"people"},":woman_singer_tone1:":{uc_base:"1f469-1f3fb-1f3a4",uc_output:"1f469-1f3fb-200d-1f3a4",uc_match:"1f469-1f3fb-1f3a4",uc_greedy:"1f469-1f3fb-1f3a4",shortnames:[":woman_singer_light_skin_tone:"],category:"people"},":woman_singer_tone2:":{uc_base:"1f469-1f3fc-1f3a4",uc_output:"1f469-1f3fc-200d-1f3a4",uc_match:"1f469-1f3fc-1f3a4",uc_greedy:"1f469-1f3fc-1f3a4",shortnames:[":woman_singer_medium_light_skin_tone:"],category:"people"},":woman_singer_tone3:":{uc_base:"1f469-1f3fd-1f3a4",uc_output:"1f469-1f3fd-200d-1f3a4",uc_match:"1f469-1f3fd-1f3a4",uc_greedy:"1f469-1f3fd-1f3a4",shortnames:[":woman_singer_medium_skin_tone:"],category:"people"},":woman_singer_tone4:":{uc_base:"1f469-1f3fe-1f3a4",uc_output:"1f469-1f3fe-200d-1f3a4",uc_match:"1f469-1f3fe-1f3a4",uc_greedy:"1f469-1f3fe-1f3a4",shortnames:[":woman_singer_medium_dark_skin_tone:"],category:"people"},":woman_singer_tone5:":{uc_base:"1f469-1f3ff-1f3a4",uc_output:"1f469-1f3ff-200d-1f3a4",uc_match:"1f469-1f3ff-1f3a4",uc_greedy:"1f469-1f3ff-1f3a4",shortnames:[":woman_singer_dark_skin_tone:"],category:"people"},":woman_student_tone1:":{uc_base:"1f469-1f3fb-1f393",uc_output:"1f469-1f3fb-200d-1f393",uc_match:"1f469-1f3fb-1f393",uc_greedy:"1f469-1f3fb-1f393",shortnames:[":woman_student_light_skin_tone:"],category:"people"},":woman_student_tone2:":{uc_base:"1f469-1f3fc-1f393",uc_output:"1f469-1f3fc-200d-1f393",uc_match:"1f469-1f3fc-1f393",uc_greedy:"1f469-1f3fc-1f393",shortnames:[":woman_student_medium_light_skin_tone:"],category:"people"},":woman_student_tone3:":{uc_base:"1f469-1f3fd-1f393",uc_output:"1f469-1f3fd-200d-1f393",uc_match:"1f469-1f3fd-1f393",uc_greedy:"1f469-1f3fd-1f393",shortnames:[":woman_student_medium_skin_tone:"],category:"people"},":woman_student_tone4:":{uc_base:"1f469-1f3fe-1f393",uc_output:"1f469-1f3fe-200d-1f393",uc_match:"1f469-1f3fe-1f393",uc_greedy:"1f469-1f3fe-1f393",shortnames:[":woman_student_medium_dark_skin_tone:"],category:"people"},":woman_student_tone5:":{uc_base:"1f469-1f3ff-1f393",uc_output:"1f469-1f3ff-200d-1f393",uc_match:"1f469-1f3ff-1f393",uc_greedy:"1f469-1f3ff-1f393",shortnames:[":woman_student_dark_skin_tone:"],category:"people"},":woman_teacher_tone1:":{uc_base:"1f469-1f3fb-1f3eb",uc_output:"1f469-1f3fb-200d-1f3eb",uc_match:"1f469-1f3fb-1f3eb",uc_greedy:"1f469-1f3fb-1f3eb",shortnames:[":woman_teacher_light_skin_tone:"],category:"people"},":woman_teacher_tone2:":{uc_base:"1f469-1f3fc-1f3eb",uc_output:"1f469-1f3fc-200d-1f3eb",uc_match:"1f469-1f3fc-1f3eb",uc_greedy:"1f469-1f3fc-1f3eb",shortnames:[":woman_teacher_medium_light_skin_tone:"],category:"people"},":woman_teacher_tone3:":{uc_base:"1f469-1f3fd-1f3eb",uc_output:"1f469-1f3fd-200d-1f3eb",uc_match:"1f469-1f3fd-1f3eb",uc_greedy:"1f469-1f3fd-1f3eb",shortnames:[":woman_teacher_medium_skin_tone:"],category:"people"},":woman_teacher_tone4:":{uc_base:"1f469-1f3fe-1f3eb",uc_output:"1f469-1f3fe-200d-1f3eb",uc_match:"1f469-1f3fe-1f3eb",uc_greedy:"1f469-1f3fe-1f3eb",shortnames:[":woman_teacher_medium_dark_skin_tone:"],category:"people"},":woman_teacher_tone5:":{uc_base:"1f469-1f3ff-1f3eb",uc_output:"1f469-1f3ff-200d-1f3eb",uc_match:"1f469-1f3ff-1f3eb",uc_greedy:"1f469-1f3ff-1f3eb",shortnames:[":woman_teacher_dark_skin_tone:"],category:"people"},":woman_technologist_tone1:":{uc_base:"1f469-1f3fb-1f4bb",uc_output:"1f469-1f3fb-200d-1f4bb",uc_match:"1f469-1f3fb-1f4bb",uc_greedy:"1f469-1f3fb-1f4bb",shortnames:[":woman_technologist_light_skin_tone:"],category:"people"},":woman_technologist_tone2:":{uc_base:"1f469-1f3fc-1f4bb",uc_output:"1f469-1f3fc-200d-1f4bb",uc_match:"1f469-1f3fc-1f4bb",uc_greedy:"1f469-1f3fc-1f4bb",shortnames:[":woman_technologist_medium_light_skin_tone:"],category:"people"},":woman_technologist_tone3:":{uc_base:"1f469-1f3fd-1f4bb",uc_output:"1f469-1f3fd-200d-1f4bb",uc_match:"1f469-1f3fd-1f4bb",uc_greedy:"1f469-1f3fd-1f4bb",shortnames:[":woman_technologist_medium_skin_tone:"],category:"people"},":woman_technologist_tone4:":{uc_base:"1f469-1f3fe-1f4bb",uc_output:"1f469-1f3fe-200d-1f4bb",uc_match:"1f469-1f3fe-1f4bb",uc_greedy:"1f469-1f3fe-1f4bb",shortnames:[":woman_technologist_medium_dark_skin_tone:"],category:"people"},":woman_technologist_tone5:":{uc_base:"1f469-1f3ff-1f4bb",uc_output:"1f469-1f3ff-200d-1f4bb",uc_match:"1f469-1f3ff-1f4bb",uc_greedy:"1f469-1f3ff-1f4bb",shortnames:[":woman_technologist_dark_skin_tone:"],category:"people"},":woman_white_haired_tone1:":{uc_base:"1f469-1f3fb-1f9b3",uc_output:"1f469-1f3fb-200d-1f9b3",uc_match:"1f469-1f3fb-1f9b3",uc_greedy:"1f469-1f3fb-1f9b3",shortnames:[":woman_white_haired_light_skin_tone:"],category:"people"},":woman_white_haired_tone2:":{uc_base:"1f469-1f3fc-1f9b3",uc_output:"1f469-1f3fc-200d-1f9b3",uc_match:"1f469-1f3fc-1f9b3",uc_greedy:"1f469-1f3fc-1f9b3",shortnames:[":woman_white_haired_medium_light_skin_tone:"],category:"people"},":woman_white_haired_tone3:":{uc_base:"1f469-1f3fd-1f9b3",uc_output:"1f469-1f3fd-200d-1f9b3",uc_match:"1f469-1f3fd-1f9b3",uc_greedy:"1f469-1f3fd-1f9b3",shortnames:[":woman_white_haired_medium_skin_tone:"],category:"people"},":woman_white_haired_tone4:":{uc_base:"1f469-1f3fe-1f9b3",uc_output:"1f469-1f3fe-200d-1f9b3",uc_match:"1f469-1f3fe-1f9b3",uc_greedy:"1f469-1f3fe-1f9b3",shortnames:[":woman_white_haired_medium_dark_skin_tone:"],category:"people"},":woman_white_haired_tone5:":{uc_base:"1f469-1f3ff-1f9b3",uc_output:"1f469-1f3ff-200d-1f9b3",uc_match:"1f469-1f3ff-1f9b3",uc_greedy:"1f469-1f3ff-1f9b3",shortnames:[":woman_white_haired_dark_skin_tone:"],category:"people"},":rainbow_flag:":{uc_base:"1f3f3-1f308",uc_output:"1f3f3-fe0f-200d-1f308",uc_match:"1f3f3-fe0f-1f308",uc_greedy:"1f3f3-1f308",shortnames:[":gay_pride_flag:"],category:"flags"},":blond-haired_man:":{uc_base:"1f471-2642",uc_output:"1f471-200d-2642-fe0f",uc_match:"1f471-2642-fe0f",uc_greedy:"1f471-2642",shortnames:[],category:"people"},":blond-haired_woman:":{uc_base:"1f471-2640",uc_output:"1f471-200d-2640-fe0f",uc_match:"1f471-2640-fe0f",uc_greedy:"1f471-2640",shortnames:[],category:"people"},":man_biking:":{uc_base:"1f6b4-2642",uc_output:"1f6b4-200d-2642-fe0f",uc_match:"1f6b4-2642-fe0f",uc_greedy:"1f6b4-2642",shortnames:[],category:"activity"},":man_bowing:":{uc_base:"1f647-2642",uc_output:"1f647-200d-2642-fe0f",uc_match:"1f647-2642-fe0f",uc_greedy:"1f647-2642",shortnames:[],category:"people"},":man_cartwheeling:":{uc_base:"1f938-2642",uc_output:"1f938-200d-2642-fe0f",uc_match:"1f938-2642-fe0f",uc_greedy:"1f938-2642",shortnames:[],category:"activity"},":man_climbing:":{uc_base:"1f9d7-2642",uc_output:"1f9d7-200d-2642-fe0f",uc_match:"1f9d7-2642-fe0f",uc_greedy:"1f9d7-2642",shortnames:[],category:"activity"},":man_construction_worker:":{uc_base:"1f477-2642",uc_output:"1f477-200d-2642-fe0f",uc_match:"1f477-2642-fe0f",uc_greedy:"1f477-2642",shortnames:[],category:"people"},":man_elf:":{uc_base:"1f9dd-2642",uc_output:"1f9dd-200d-2642-fe0f",uc_match:"1f9dd-2642-fe0f",uc_greedy:"1f9dd-2642",shortnames:[],category:"people"},":man_facepalming:":{uc_base:"1f926-2642",uc_output:"1f926-200d-2642-fe0f",uc_match:"1f926-2642-fe0f",uc_greedy:"1f926-2642",shortnames:[],category:"people"},":man_fairy:":{uc_base:"1f9da-2642",uc_output:"1f9da-200d-2642-fe0f",uc_match:"1f9da-2642-fe0f",uc_greedy:"1f9da-2642",shortnames:[],category:"people"},":man_frowning:":{uc_base:"1f64d-2642",uc_output:"1f64d-200d-2642-fe0f",uc_match:"1f64d-2642-fe0f",uc_greedy:"1f64d-2642",shortnames:[],category:"people"},":man_genie:":{uc_base:"1f9de-2642",uc_output:"1f9de-200d-2642-fe0f",uc_match:"1f9de-2642-fe0f",uc_greedy:"1f9de-2642",shortnames:[],category:"people"},":man_gesturing_no:":{uc_base:"1f645-2642",uc_output:"1f645-200d-2642-fe0f",uc_match:"1f645-2642-fe0f",uc_greedy:"1f645-2642",shortnames:[],category:"people"},":man_gesturing_ok:":{uc_base:"1f646-2642",uc_output:"1f646-200d-2642-fe0f",uc_match:"1f646-2642-fe0f",uc_greedy:"1f646-2642",shortnames:[],category:"people"},":man_getting_face_massage:":{uc_base:"1f486-2642",uc_output:"1f486-200d-2642-fe0f",uc_match:"1f486-2642-fe0f",uc_greedy:"1f486-2642",shortnames:[],category:"people"},":man_getting_haircut:":{uc_base:"1f487-2642",uc_output:"1f487-200d-2642-fe0f",uc_match:"1f487-2642-fe0f",uc_greedy:"1f487-2642",shortnames:[],category:"people"},":man_guard:":{uc_base:"1f482-2642",uc_output:"1f482-200d-2642-fe0f",uc_match:"1f482-2642-fe0f",uc_greedy:"1f482-2642",shortnames:[],category:"people"},":man_health_worker:":{uc_base:"1f468-2695",uc_output:"1f468-200d-2695-fe0f",uc_match:"1f468-2695-fe0f",uc_greedy:"1f468-2695",shortnames:[],category:"people"},":man_in_lotus_position:":{uc_base:"1f9d8-2642",uc_output:"1f9d8-200d-2642-fe0f",uc_match:"1f9d8-2642-fe0f",uc_greedy:"1f9d8-2642",shortnames:[],category:"activity"},":man_in_steamy_room:":{uc_base:"1f9d6-2642",uc_output:"1f9d6-200d-2642-fe0f",uc_match:"1f9d6-2642-fe0f",uc_greedy:"1f9d6-2642",shortnames:[],category:"people"},":man_judge:":{uc_base:"1f468-2696",uc_output:"1f468-200d-2696-fe0f",uc_match:"1f468-2696-fe0f",uc_greedy:"1f468-2696",shortnames:[],category:"people"},":man_juggling:":{uc_base:"1f939-2642",uc_output:"1f939-200d-2642-fe0f",uc_match:"1f939-2642-fe0f",uc_greedy:"1f939-2642",shortnames:[],category:"activity"},":man_mage:":{uc_base:"1f9d9-2642",uc_output:"1f9d9-200d-2642-fe0f",uc_match:"1f9d9-2642-fe0f",uc_greedy:"1f9d9-2642",shortnames:[],category:"people"},":man_mountain_biking:":{uc_base:"1f6b5-2642",uc_output:"1f6b5-200d-2642-fe0f",uc_match:"1f6b5-2642-fe0f",uc_greedy:"1f6b5-2642",shortnames:[],category:"activity"},":man_pilot:":{uc_base:"1f468-2708",uc_output:"1f468-200d-2708-fe0f",uc_match:"1f468-2708-fe0f",uc_greedy:"1f468-2708",shortnames:[],category:"people"},":man_playing_handball:":{uc_base:"1f93e-2642",uc_output:"1f93e-200d-2642-fe0f",uc_match:"1f93e-2642-fe0f",uc_greedy:"1f93e-2642",shortnames:[],category:"activity"},":man_playing_water_polo:":{uc_base:"1f93d-2642",uc_output:"1f93d-200d-2642-fe0f",uc_match:"1f93d-2642-fe0f",uc_greedy:"1f93d-2642",shortnames:[],category:"activity"},":man_police_officer:":{uc_base:"1f46e-2642",uc_output:"1f46e-200d-2642-fe0f",uc_match:"1f46e-2642-fe0f",uc_greedy:"1f46e-2642",shortnames:[],category:"people"},":man_pouting:":{uc_base:"1f64e-2642",uc_output:"1f64e-200d-2642-fe0f",uc_match:"1f64e-2642-fe0f",uc_greedy:"1f64e-2642",shortnames:[],category:"people"},":man_raising_hand:":{uc_base:"1f64b-2642",uc_output:"1f64b-200d-2642-fe0f",uc_match:"1f64b-2642-fe0f",uc_greedy:"1f64b-2642",shortnames:[],category:"people"},":man_rowing_boat:":{uc_base:"1f6a3-2642",uc_output:"1f6a3-200d-2642-fe0f",uc_match:"1f6a3-2642-fe0f",uc_greedy:"1f6a3-2642",shortnames:[],category:"activity"},":man_running:":{uc_base:"1f3c3-2642",uc_output:"1f3c3-200d-2642-fe0f",uc_match:"1f3c3-2642-fe0f",uc_greedy:"1f3c3-2642",shortnames:[],category:"people"},":man_shrugging:":{uc_base:"1f937-2642",uc_output:"1f937-200d-2642-fe0f",uc_match:"1f937-2642-fe0f",uc_greedy:"1f937-2642",shortnames:[],category:"people"},":man_superhero:":{uc_base:"1f9b8-2642",uc_output:"1f9b8-200d-2642-fe0f",uc_match:"1f9b8-2642-fe0f",uc_greedy:"1f9b8-2642",shortnames:[],category:"people"},":man_supervillain:":{uc_base:"1f9b9-2642",uc_output:"1f9b9-200d-2642-fe0f",uc_match:"1f9b9-2642-fe0f",uc_greedy:"1f9b9-2642",shortnames:[],category:"people"},":man_surfing:":{uc_base:"1f3c4-2642",uc_output:"1f3c4-200d-2642-fe0f",uc_match:"1f3c4-2642-fe0f",uc_greedy:"1f3c4-2642",shortnames:[],category:"activity"},":man_swimming:":{uc_base:"1f3ca-2642",uc_output:"1f3ca-200d-2642-fe0f",uc_match:"1f3ca-2642-fe0f",uc_greedy:"1f3ca-2642",shortnames:[],category:"activity"},":man_tipping_hand:":{uc_base:"1f481-2642",uc_output:"1f481-200d-2642-fe0f",uc_match:"1f481-2642-fe0f",uc_greedy:"1f481-2642",shortnames:[],category:"people"},":man_vampire:":{uc_base:"1f9db-2642",uc_output:"1f9db-200d-2642-fe0f",uc_match:"1f9db-2642-fe0f",uc_greedy:"1f9db-2642",shortnames:[],category:"people"},":man_walking:":{uc_base:"1f6b6-2642",uc_output:"1f6b6-200d-2642-fe0f",uc_match:"1f6b6-2642-fe0f",uc_greedy:"1f6b6-2642",shortnames:[],category:"people"},":man_wearing_turban:":{uc_base:"1f473-2642",uc_output:"1f473-200d-2642-fe0f",uc_match:"1f473-2642-fe0f",uc_greedy:"1f473-2642",shortnames:[],category:"people"},":man_zombie:":{uc_base:"1f9df-2642",uc_output:"1f9df-200d-2642-fe0f",uc_match:"1f9df-2642-fe0f",uc_greedy:"1f9df-2642",shortnames:[],category:"people"},":men_with_bunny_ears_partying:":{uc_base:"1f46f-2642",uc_output:"1f46f-200d-2642-fe0f",uc_match:"1f46f-2642-fe0f",uc_greedy:"1f46f-2642",shortnames:[],category:"people"},":men_wrestling:":{uc_base:"1f93c-2642",uc_output:"1f93c-200d-2642-fe0f",uc_match:"1f93c-2642-fe0f",uc_greedy:"1f93c-2642",shortnames:[],category:"activity"},":mermaid:":{uc_base:"1f9dc-2640",uc_output:"1f9dc-200d-2640-fe0f",uc_match:"1f9dc-2640-fe0f",uc_greedy:"1f9dc-2640",shortnames:[],category:"people"},":merman:":{uc_base:"1f9dc-2642",uc_output:"1f9dc-200d-2642-fe0f",uc_match:"1f9dc-2642-fe0f",uc_greedy:"1f9dc-2642",shortnames:[],category:"people"},":pirate_flag:":{uc_base:"1f3f4-2620",uc_output:"1f3f4-200d-2620-fe0f",uc_match:"1f3f4-2620-fe0f",uc_greedy:"1f3f4-2620",shortnames:[],category:"flags"},":woman_biking:":{uc_base:"1f6b4-2640",uc_output:"1f6b4-200d-2640-fe0f",uc_match:"1f6b4-2640-fe0f",uc_greedy:"1f6b4-2640",shortnames:[],category:"activity"},":woman_bowing:":{uc_base:"1f647-2640",uc_output:"1f647-200d-2640-fe0f",uc_match:"1f647-2640-fe0f",uc_greedy:"1f647-2640",shortnames:[],category:"people"},":woman_cartwheeling:":{uc_base:"1f938-2640",uc_output:"1f938-200d-2640-fe0f",uc_match:"1f938-2640-fe0f",uc_greedy:"1f938-2640",shortnames:[],category:"activity"},":woman_climbing:":{uc_base:"1f9d7-2640",uc_output:"1f9d7-200d-2640-fe0f",uc_match:"1f9d7-2640-fe0f",uc_greedy:"1f9d7-2640",shortnames:[],category:"activity"},":woman_construction_worker:":{uc_base:"1f477-2640",uc_output:"1f477-200d-2640-fe0f",uc_match:"1f477-2640-fe0f",uc_greedy:"1f477-2640",shortnames:[],category:"people"},":woman_elf:":{uc_base:"1f9dd-2640",uc_output:"1f9dd-200d-2640-fe0f",uc_match:"1f9dd-2640-fe0f",uc_greedy:"1f9dd-2640",shortnames:[],category:"people"},":woman_facepalming:":{uc_base:"1f926-2640",uc_output:"1f926-200d-2640-fe0f",uc_match:"1f926-2640-fe0f",uc_greedy:"1f926-2640",shortnames:[],category:"people"},":woman_fairy:":{uc_base:"1f9da-2640",uc_output:"1f9da-200d-2640-fe0f",uc_match:"1f9da-2640-fe0f",uc_greedy:"1f9da-2640",shortnames:[],category:"people"},":woman_frowning:":{uc_base:"1f64d-2640",uc_output:"1f64d-200d-2640-fe0f",uc_match:"1f64d-2640-fe0f",uc_greedy:"1f64d-2640",shortnames:[],category:"people"},":woman_genie:":{uc_base:"1f9de-2640",uc_output:"1f9de-200d-2640-fe0f",uc_match:"1f9de-2640-fe0f",uc_greedy:"1f9de-2640",shortnames:[],category:"people"},":woman_gesturing_no:":{uc_base:"1f645-2640",uc_output:"1f645-200d-2640-fe0f",uc_match:"1f645-2640-fe0f",uc_greedy:"1f645-2640",shortnames:[],category:"people"},":woman_gesturing_ok:":{uc_base:"1f646-2640",uc_output:"1f646-200d-2640-fe0f",uc_match:"1f646-2640-fe0f",uc_greedy:"1f646-2640",shortnames:[],category:"people"},":woman_getting_face_massage:":{uc_base:"1f486-2640",uc_output:"1f486-200d-2640-fe0f",uc_match:"1f486-2640-fe0f",uc_greedy:"1f486-2640",shortnames:[],category:"people"},":woman_getting_haircut:":{uc_base:"1f487-2640",uc_output:"1f487-200d-2640-fe0f",uc_match:"1f487-2640-fe0f",uc_greedy:"1f487-2640",shortnames:[],category:"people"},":woman_guard:":{uc_base:"1f482-2640",uc_output:"1f482-200d-2640-fe0f",uc_match:"1f482-2640-fe0f",uc_greedy:"1f482-2640",shortnames:[],category:"people"},":woman_health_worker:":{uc_base:"1f469-2695",uc_output:"1f469-200d-2695-fe0f",uc_match:"1f469-2695-fe0f",uc_greedy:"1f469-2695",shortnames:[],category:"people"},":woman_in_lotus_position:":{uc_base:"1f9d8-2640",uc_output:"1f9d8-200d-2640-fe0f",uc_match:"1f9d8-2640-fe0f",uc_greedy:"1f9d8-2640",shortnames:[],category:"activity"},":woman_in_steamy_room:":{uc_base:"1f9d6-2640",uc_output:"1f9d6-200d-2640-fe0f",uc_match:"1f9d6-2640-fe0f",uc_greedy:"1f9d6-2640",shortnames:[],category:"people"},":woman_judge:":{uc_base:"1f469-2696",uc_output:"1f469-200d-2696-fe0f",uc_match:"1f469-2696-fe0f",uc_greedy:"1f469-2696",shortnames:[],category:"people"},":woman_juggling:":{uc_base:"1f939-2640",uc_output:"1f939-200d-2640-fe0f",uc_match:"1f939-2640-fe0f",uc_greedy:"1f939-2640",shortnames:[],category:"activity"},":woman_mage:":{uc_base:"1f9d9-2640",uc_output:"1f9d9-200d-2640-fe0f",uc_match:"1f9d9-2640-fe0f",uc_greedy:"1f9d9-2640",shortnames:[],category:"people"},":woman_mountain_biking:":{uc_base:"1f6b5-2640",uc_output:"1f6b5-200d-2640-fe0f",uc_match:"1f6b5-2640-fe0f",uc_greedy:"1f6b5-2640",shortnames:[],category:"activity"},":woman_pilot:":{uc_base:"1f469-2708",uc_output:"1f469-200d-2708-fe0f",uc_match:"1f469-2708-fe0f",uc_greedy:"1f469-2708",shortnames:[],category:"people"},":woman_playing_handball:":{uc_base:"1f93e-2640",uc_output:"1f93e-200d-2640-fe0f",uc_match:"1f93e-2640-fe0f",uc_greedy:"1f93e-2640",shortnames:[],category:"activity"},":woman_playing_water_polo:":{uc_base:"1f93d-2640",uc_output:"1f93d-200d-2640-fe0f",uc_match:"1f93d-2640-fe0f",uc_greedy:"1f93d-2640",shortnames:[],category:"activity"},":woman_police_officer:":{uc_base:"1f46e-2640",uc_output:"1f46e-200d-2640-fe0f",uc_match:"1f46e-2640-fe0f",uc_greedy:"1f46e-2640",shortnames:[],category:"people"},":woman_pouting:":{uc_base:"1f64e-2640",uc_output:"1f64e-200d-2640-fe0f",uc_match:"1f64e-2640-fe0f",uc_greedy:"1f64e-2640",shortnames:[],category:"people"},":woman_raising_hand:":{uc_base:"1f64b-2640",uc_output:"1f64b-200d-2640-fe0f",uc_match:"1f64b-2640-fe0f",uc_greedy:"1f64b-2640",shortnames:[],category:"people"},":woman_rowing_boat:":{uc_base:"1f6a3-2640",uc_output:"1f6a3-200d-2640-fe0f",uc_match:"1f6a3-2640-fe0f",uc_greedy:"1f6a3-2640",shortnames:[],category:"activity"},":woman_running:":{uc_base:"1f3c3-2640",uc_output:"1f3c3-200d-2640-fe0f",uc_match:"1f3c3-2640-fe0f",uc_greedy:"1f3c3-2640",shortnames:[],category:"people"},":woman_shrugging:":{uc_base:"1f937-2640",uc_output:"1f937-200d-2640-fe0f",uc_match:"1f937-2640-fe0f",uc_greedy:"1f937-2640",shortnames:[],category:"people"},":woman_superhero:":{uc_base:"1f9b8-2640",uc_output:"1f9b8-200d-2640-fe0f",uc_match:"1f9b8-2640-fe0f",uc_greedy:"1f9b8-2640",shortnames:[],category:"people"},":woman_supervillain:":{uc_base:"1f9b9-2640",uc_output:"1f9b9-200d-2640-fe0f",uc_match:"1f9b9-2640-fe0f",uc_greedy:"1f9b9-2640",shortnames:[],category:"people"},":woman_surfing:":{uc_base:"1f3c4-2640",uc_output:"1f3c4-200d-2640-fe0f",uc_match:"1f3c4-2640-fe0f",uc_greedy:"1f3c4-2640",shortnames:[],category:"activity"},":woman_swimming:":{uc_base:"1f3ca-2640",uc_output:"1f3ca-200d-2640-fe0f",uc_match:"1f3ca-2640-fe0f",uc_greedy:"1f3ca-2640",shortnames:[],category:"activity"},":woman_tipping_hand:":{uc_base:"1f481-2640",uc_output:"1f481-200d-2640-fe0f",uc_match:"1f481-2640-fe0f",uc_greedy:"1f481-2640",shortnames:[],category:"people"},":woman_vampire:":{uc_base:"1f9db-2640",uc_output:"1f9db-200d-2640-fe0f",uc_match:"1f9db-2640-fe0f",uc_greedy:"1f9db-2640",shortnames:[],category:"people"},":woman_walking:":{uc_base:"1f6b6-2640",uc_output:"1f6b6-200d-2640-fe0f",uc_match:"1f6b6-2640-fe0f",uc_greedy:"1f6b6-2640",shortnames:[],category:"people"},":woman_wearing_turban:":{uc_base:"1f473-2640",uc_output:"1f473-200d-2640-fe0f",uc_match:"1f473-2640-fe0f",uc_greedy:"1f473-2640",shortnames:[],category:"people"},":woman_zombie:":{uc_base:"1f9df-2640",uc_output:"1f9df-200d-2640-fe0f",uc_match:"1f9df-2640-fe0f",uc_greedy:"1f9df-2640",shortnames:[],category:"people"},":women_with_bunny_ears_partying:":{uc_base:"1f46f-2640",uc_output:"1f46f-200d-2640-fe0f",uc_match:"1f46f-2640-fe0f",uc_greedy:"1f46f-2640",shortnames:[],category:"people"},":women_wrestling:":{uc_base:"1f93c-2640",uc_output:"1f93c-200d-2640-fe0f",uc_match:"1f93c-2640-fe0f",uc_greedy:"1f93c-2640",shortnames:[],category:"activity"},":family_man_boy:":{uc_base:"1f468-1f466",uc_output:"1f468-200d-1f466",uc_match:"1f468-1f466",uc_greedy:"1f468-1f466",shortnames:[],category:"people"},":family_man_girl:":{uc_base:"1f468-1f467",uc_output:"1f468-200d-1f467",uc_match:"1f468-1f467",uc_greedy:"1f468-1f467",shortnames:[],category:"people"},":family_woman_boy:":{uc_base:"1f469-1f466",uc_output:"1f469-200d-1f466",uc_match:"1f469-1f466",uc_greedy:"1f469-1f466",shortnames:[],category:"people"},":family_woman_girl:":{uc_base:"1f469-1f467",uc_output:"1f469-200d-1f467",uc_match:"1f469-1f467",uc_greedy:"1f469-1f467",shortnames:[],category:"people"},":man_artist:":{uc_base:"1f468-1f3a8",uc_output:"1f468-200d-1f3a8",uc_match:"1f468-1f3a8",uc_greedy:"1f468-1f3a8",shortnames:[],category:"people"},":man_astronaut:":{uc_base:"1f468-1f680",uc_output:"1f468-200d-1f680",uc_match:"1f468-1f680",uc_greedy:"1f468-1f680",shortnames:[],category:"people"},":man_bald:":{uc_base:"1f468-1f9b2",uc_output:"1f468-200d-1f9b2",uc_match:"1f468-1f9b2",uc_greedy:"1f468-1f9b2",shortnames:[],category:"people"},":man_cook:":{uc_base:"1f468-1f373",uc_output:"1f468-200d-1f373",uc_match:"1f468-1f373",uc_greedy:"1f468-1f373",shortnames:[],category:"people"},":man_curly_haired:":{uc_base:"1f468-1f9b1",uc_output:"1f468-200d-1f9b1",uc_match:"1f468-1f9b1",uc_greedy:"1f468-1f9b1",shortnames:[],category:"people"},":man_factory_worker:":{uc_base:"1f468-1f3ed",uc_output:"1f468-200d-1f3ed",uc_match:"1f468-1f3ed",uc_greedy:"1f468-1f3ed",shortnames:[],category:"people"},":man_farmer:":{uc_base:"1f468-1f33e",uc_output:"1f468-200d-1f33e",uc_match:"1f468-1f33e",uc_greedy:"1f468-1f33e",shortnames:[],category:"people"},":man_firefighter:":{uc_base:"1f468-1f692",uc_output:"1f468-200d-1f692",uc_match:"1f468-1f692",uc_greedy:"1f468-1f692",shortnames:[],category:"people"},":man_mechanic:":{uc_base:"1f468-1f527",uc_output:"1f468-200d-1f527",uc_match:"1f468-1f527",uc_greedy:"1f468-1f527",shortnames:[],category:"people"},":man_office_worker:":{uc_base:"1f468-1f4bc",uc_output:"1f468-200d-1f4bc",uc_match:"1f468-1f4bc",uc_greedy:"1f468-1f4bc",shortnames:[],category:"people"},":man_red_haired:":{uc_base:"1f468-1f9b0",uc_output:"1f468-200d-1f9b0",uc_match:"1f468-1f9b0",uc_greedy:"1f468-1f9b0",shortnames:[],category:"people"},":man_scientist:":{uc_base:"1f468-1f52c",uc_output:"1f468-200d-1f52c",uc_match:"1f468-1f52c",uc_greedy:"1f468-1f52c",shortnames:[],category:"people"},":man_singer:":{uc_base:"1f468-1f3a4",uc_output:"1f468-200d-1f3a4",uc_match:"1f468-1f3a4",uc_greedy:"1f468-1f3a4",shortnames:[],category:"people"},":man_student:":{uc_base:"1f468-1f393",uc_output:"1f468-200d-1f393",uc_match:"1f468-1f393",uc_greedy:"1f468-1f393",shortnames:[],category:"people"},":man_teacher:":{uc_base:"1f468-1f3eb",uc_output:"1f468-200d-1f3eb",uc_match:"1f468-1f3eb",uc_greedy:"1f468-1f3eb",shortnames:[],category:"people"},":man_technologist:":{uc_base:"1f468-1f4bb",uc_output:"1f468-200d-1f4bb",uc_match:"1f468-1f4bb",uc_greedy:"1f468-1f4bb",shortnames:[],category:"people"},":man_white_haired:":{uc_base:"1f468-1f9b3",uc_output:"1f468-200d-1f9b3",uc_match:"1f468-1f9b3",uc_greedy:"1f468-1f9b3",shortnames:[],category:"people"},":woman_artist:":{uc_base:"1f469-1f3a8",uc_output:"1f469-200d-1f3a8",uc_match:"1f469-1f3a8",uc_greedy:"1f469-1f3a8",shortnames:[],category:"people"},":woman_astronaut:":{uc_base:"1f469-1f680",uc_output:"1f469-200d-1f680",uc_match:"1f469-1f680",uc_greedy:"1f469-1f680",shortnames:[],category:"people"},":woman_bald:":{uc_base:"1f469-1f9b2",uc_output:"1f469-200d-1f9b2",uc_match:"1f469-1f9b2",uc_greedy:"1f469-1f9b2",shortnames:[],category:"people"},":woman_cook:":{uc_base:"1f469-1f373",uc_output:"1f469-200d-1f373",uc_match:"1f469-1f373",uc_greedy:"1f469-1f373",shortnames:[],category:"people"},":woman_curly_haired:":{uc_base:"1f469-1f9b1",uc_output:"1f469-200d-1f9b1",uc_match:"1f469-1f9b1",uc_greedy:"1f469-1f9b1",shortnames:[],category:"people"},":woman_factory_worker:":{uc_base:"1f469-1f3ed",uc_output:"1f469-200d-1f3ed",uc_match:"1f469-1f3ed",uc_greedy:"1f469-1f3ed",shortnames:[],category:"people"},":woman_farmer:":{uc_base:"1f469-1f33e",uc_output:"1f469-200d-1f33e",uc_match:"1f469-1f33e",uc_greedy:"1f469-1f33e",shortnames:[],category:"people"},":woman_firefighter:":{uc_base:"1f469-1f692",uc_output:"1f469-200d-1f692",uc_match:"1f469-1f692",uc_greedy:"1f469-1f692",shortnames:[],category:"people"},":woman_mechanic:":{uc_base:"1f469-1f527",uc_output:"1f469-200d-1f527",uc_match:"1f469-1f527",uc_greedy:"1f469-1f527",shortnames:[],category:"people"},":woman_office_worker:":{uc_base:"1f469-1f4bc",uc_output:"1f469-200d-1f4bc",uc_match:"1f469-1f4bc",uc_greedy:"1f469-1f4bc",shortnames:[],category:"people"},":woman_red_haired:":{uc_base:"1f469-1f9b0",uc_output:"1f469-200d-1f9b0",uc_match:"1f469-1f9b0",uc_greedy:"1f469-1f9b0",shortnames:[],category:"people"},":woman_scientist:":{uc_base:"1f469-1f52c",uc_output:"1f469-200d-1f52c",uc_match:"1f469-1f52c",uc_greedy:"1f469-1f52c",shortnames:[],category:"people"},":woman_singer:":{uc_base:"1f469-1f3a4",uc_output:"1f469-200d-1f3a4",uc_match:"1f469-1f3a4",uc_greedy:"1f469-1f3a4",shortnames:[],category:"people"},":woman_student:":{uc_base:"1f469-1f393",uc_output:"1f469-200d-1f393",uc_match:"1f469-1f393",uc_greedy:"1f469-1f393",shortnames:[],category:"people"},":woman_teacher:":{uc_base:"1f469-1f3eb",uc_output:"1f469-200d-1f3eb",uc_match:"1f469-1f3eb",uc_greedy:"1f469-1f3eb",shortnames:[],category:"people"},":woman_technologist:":{uc_base:"1f469-1f4bb",uc_output:"1f469-200d-1f4bb",uc_match:"1f469-1f4bb",uc_greedy:"1f469-1f4bb",shortnames:[],category:"people"},":woman_white_haired:":{uc_base:"1f469-1f9b3",uc_output:"1f469-200d-1f9b3",uc_match:"1f469-1f9b3",uc_greedy:"1f469-1f9b3",shortnames:[],category:"people"},":asterisk:":{uc_base:"002a-20e3",uc_output:"002a-fe0f-20e3",uc_match:"002a-20e3",uc_greedy:"002a-20e3",shortnames:[":keycap_asterisk:"],category:"symbols"},":eight:":{uc_base:"0038-20e3",uc_output:"0038-fe0f-20e3",uc_match:"0038-20e3",uc_greedy:"0038-20e3",shortnames:[],category:"symbols"},":five:":{uc_base:"0035-20e3",uc_output:"0035-fe0f-20e3",uc_match:"0035-20e3",uc_greedy:"0035-20e3",shortnames:[],category:"symbols"},":four:":{uc_base:"0034-20e3",uc_output:"0034-fe0f-20e3",uc_match:"0034-20e3",uc_greedy:"0034-20e3",shortnames:[],category:"symbols"},":hash:":{uc_base:"0023-20e3",uc_output:"0023-fe0f-20e3",uc_match:"0023-20e3",uc_greedy:"0023-20e3",shortnames:[],category:"symbols"},":nine:":{uc_base:"0039-20e3",uc_output:"0039-fe0f-20e3",uc_match:"0039-20e3",uc_greedy:"0039-20e3",shortnames:[],category:"symbols"},":one:":{uc_base:"0031-20e3",uc_output:"0031-fe0f-20e3",uc_match:"0031-20e3",uc_greedy:"0031-20e3",shortnames:[],category:"symbols"},":seven:":{uc_base:"0037-20e3",uc_output:"0037-fe0f-20e3",uc_match:"0037-20e3",uc_greedy:"0037-20e3",shortnames:[],category:"symbols"},":six:":{uc_base:"0036-20e3",uc_output:"0036-fe0f-20e3",uc_match:"0036-20e3",uc_greedy:"0036-20e3",shortnames:[],category:"symbols"},":three:":{uc_base:"0033-20e3",uc_output:"0033-fe0f-20e3",uc_match:"0033-20e3",uc_greedy:"0033-20e3",shortnames:[],category:"symbols"},":two:":{uc_base:"0032-20e3",uc_output:"0032-fe0f-20e3",uc_match:"0032-20e3",uc_greedy:"0032-20e3",shortnames:[],category:"symbols"},":zero:":{uc_base:"0030-20e3",uc_output:"0030-fe0f-20e3",uc_match:"0030-20e3",uc_greedy:"0030-20e3",shortnames:[],category:"symbols"},":adult_tone1:":{uc_base:"1f9d1-1f3fb",uc_output:"1f9d1-1f3fb",uc_match:"1f9d1-1f3fb",uc_greedy:"1f9d1-1f3fb",shortnames:[":adult_light_skin_tone:"],category:"people"},":adult_tone2:":{uc_base:"1f9d1-1f3fc",uc_output:"1f9d1-1f3fc",uc_match:"1f9d1-1f3fc",uc_greedy:"1f9d1-1f3fc",shortnames:[":adult_medium_light_skin_tone:"],category:"people"},":adult_tone3:":{uc_base:"1f9d1-1f3fd",uc_output:"1f9d1-1f3fd",uc_match:"1f9d1-1f3fd",uc_greedy:"1f9d1-1f3fd",shortnames:[":adult_medium_skin_tone:"],category:"people"},":adult_tone4:":{uc_base:"1f9d1-1f3fe",uc_output:"1f9d1-1f3fe",uc_match:"1f9d1-1f3fe",uc_greedy:"1f9d1-1f3fe",shortnames:[":adult_medium_dark_skin_tone:"],category:"people"},":adult_tone5:":{uc_base:"1f9d1-1f3ff",uc_output:"1f9d1-1f3ff",uc_match:"1f9d1-1f3ff",uc_greedy:"1f9d1-1f3ff",shortnames:[":adult_dark_skin_tone:"],category:"people"},":angel_tone1:":{uc_base:"1f47c-1f3fb",uc_output:"1f47c-1f3fb",uc_match:"1f47c-1f3fb",uc_greedy:"1f47c-1f3fb",shortnames:[],category:"people"},":angel_tone2:":{uc_base:"1f47c-1f3fc",uc_output:"1f47c-1f3fc",uc_match:"1f47c-1f3fc",uc_greedy:"1f47c-1f3fc",shortnames:[],category:"people"},":angel_tone3:":{uc_base:"1f47c-1f3fd",uc_output:"1f47c-1f3fd",uc_match:"1f47c-1f3fd",uc_greedy:"1f47c-1f3fd",shortnames:[],category:"people"},":angel_tone4:":{uc_base:"1f47c-1f3fe",uc_output:"1f47c-1f3fe",uc_match:"1f47c-1f3fe",uc_greedy:"1f47c-1f3fe",shortnames:[],category:"people"},":angel_tone5:":{uc_base:"1f47c-1f3ff",uc_output:"1f47c-1f3ff",uc_match:"1f47c-1f3ff",uc_greedy:"1f47c-1f3ff",shortnames:[],category:"people"},":baby_tone1:":{uc_base:"1f476-1f3fb",uc_output:"1f476-1f3fb",uc_match:"1f476-1f3fb",uc_greedy:"1f476-1f3fb",shortnames:[],category:"people"},":baby_tone2:":{uc_base:"1f476-1f3fc",uc_output:"1f476-1f3fc",uc_match:"1f476-1f3fc",uc_greedy:"1f476-1f3fc",shortnames:[],category:"people"},":baby_tone3:":{uc_base:"1f476-1f3fd",uc_output:"1f476-1f3fd",uc_match:"1f476-1f3fd",uc_greedy:"1f476-1f3fd",shortnames:[],category:"people"},":baby_tone4:":{uc_base:"1f476-1f3fe",uc_output:"1f476-1f3fe",uc_match:"1f476-1f3fe",uc_greedy:"1f476-1f3fe",shortnames:[],category:"people"},":baby_tone5:":{uc_base:"1f476-1f3ff",uc_output:"1f476-1f3ff",uc_match:"1f476-1f3ff",uc_greedy:"1f476-1f3ff",shortnames:[],category:"people"},":bath_tone1:":{uc_base:"1f6c0-1f3fb",uc_output:"1f6c0-1f3fb",uc_match:"1f6c0-1f3fb",uc_greedy:"1f6c0-1f3fb",shortnames:[],category:"objects"},":bath_tone2:":{uc_base:"1f6c0-1f3fc",uc_output:"1f6c0-1f3fc",uc_match:"1f6c0-1f3fc",uc_greedy:"1f6c0-1f3fc",shortnames:[],category:"objects"},":bath_tone3:":{uc_base:"1f6c0-1f3fd",uc_output:"1f6c0-1f3fd",uc_match:"1f6c0-1f3fd",uc_greedy:"1f6c0-1f3fd",shortnames:[],category:"objects"},":bath_tone4:":{uc_base:"1f6c0-1f3fe",uc_output:"1f6c0-1f3fe",uc_match:"1f6c0-1f3fe",uc_greedy:"1f6c0-1f3fe",shortnames:[],category:"objects"},":bath_tone5:":{uc_base:"1f6c0-1f3ff",uc_output:"1f6c0-1f3ff",uc_match:"1f6c0-1f3ff",uc_greedy:"1f6c0-1f3ff",shortnames:[],category:"objects"},":bearded_person_tone1:":{uc_base:"1f9d4-1f3fb",uc_output:"1f9d4-1f3fb",uc_match:"1f9d4-1f3fb",uc_greedy:"1f9d4-1f3fb",shortnames:[":bearded_person_light_skin_tone:"],category:"people"},":bearded_person_tone2:":{uc_base:"1f9d4-1f3fc",uc_output:"1f9d4-1f3fc",uc_match:"1f9d4-1f3fc",uc_greedy:"1f9d4-1f3fc",shortnames:[":bearded_person_medium_light_skin_tone:"],category:"people"},":bearded_person_tone3:":{uc_base:"1f9d4-1f3fd",uc_output:"1f9d4-1f3fd",uc_match:"1f9d4-1f3fd",uc_greedy:"1f9d4-1f3fd",shortnames:[":bearded_person_medium_skin_tone:"],category:"people"},":bearded_person_tone4:":{uc_base:"1f9d4-1f3fe",uc_output:"1f9d4-1f3fe",uc_match:"1f9d4-1f3fe",uc_greedy:"1f9d4-1f3fe",shortnames:[":bearded_person_medium_dark_skin_tone:"],category:"people"},":bearded_person_tone5:":{uc_base:"1f9d4-1f3ff",uc_output:"1f9d4-1f3ff",uc_match:"1f9d4-1f3ff",uc_greedy:"1f9d4-1f3ff",shortnames:[":bearded_person_dark_skin_tone:"],category:"people"},":blond_haired_person_tone1:":{uc_base:"1f471-1f3fb",uc_output:"1f471-1f3fb",uc_match:"1f471-1f3fb",uc_greedy:"1f471-1f3fb",shortnames:[":person_with_blond_hair_tone1:"],category:"people"},":blond_haired_person_tone2:":{uc_base:"1f471-1f3fc",uc_output:"1f471-1f3fc",uc_match:"1f471-1f3fc",uc_greedy:"1f471-1f3fc",shortnames:[":person_with_blond_hair_tone2:"],category:"people"},":blond_haired_person_tone3:":{uc_base:"1f471-1f3fd",uc_output:"1f471-1f3fd",uc_match:"1f471-1f3fd",uc_greedy:"1f471-1f3fd",shortnames:[":person_with_blond_hair_tone3:"],category:"people"},":blond_haired_person_tone4:":{uc_base:"1f471-1f3fe",uc_output:"1f471-1f3fe",uc_match:"1f471-1f3fe",uc_greedy:"1f471-1f3fe",shortnames:[":person_with_blond_hair_tone4:"],category:"people"},":blond_haired_person_tone5:":{uc_base:"1f471-1f3ff",uc_output:"1f471-1f3ff",uc_match:"1f471-1f3ff",uc_greedy:"1f471-1f3ff",shortnames:[":person_with_blond_hair_tone5:"],category:"people"},":boy_tone1:":{uc_base:"1f466-1f3fb",uc_output:"1f466-1f3fb",uc_match:"1f466-1f3fb",uc_greedy:"1f466-1f3fb",shortnames:[],category:"people"},":boy_tone2:":{uc_base:"1f466-1f3fc",uc_output:"1f466-1f3fc",uc_match:"1f466-1f3fc",uc_greedy:"1f466-1f3fc",shortnames:[],category:"people"},":boy_tone3:":{uc_base:"1f466-1f3fd",uc_output:"1f466-1f3fd",uc_match:"1f466-1f3fd",uc_greedy:"1f466-1f3fd",shortnames:[],category:"people"},":boy_tone4:":{uc_base:"1f466-1f3fe",uc_output:"1f466-1f3fe",uc_match:"1f466-1f3fe",uc_greedy:"1f466-1f3fe",shortnames:[],category:"people"},":boy_tone5:":{uc_base:"1f466-1f3ff",uc_output:"1f466-1f3ff",uc_match:"1f466-1f3ff",uc_greedy:"1f466-1f3ff",shortnames:[],category:"people"},":breast_feeding_tone1:":{uc_base:"1f931-1f3fb",uc_output:"1f931-1f3fb",uc_match:"1f931-1f3fb",uc_greedy:"1f931-1f3fb",shortnames:[":breast_feeding_light_skin_tone:"],category:"people"},":breast_feeding_tone2:":{uc_base:"1f931-1f3fc",uc_output:"1f931-1f3fc",uc_match:"1f931-1f3fc",uc_greedy:"1f931-1f3fc",shortnames:[":breast_feeding_medium_light_skin_tone:"],category:"people"},":breast_feeding_tone3:":{uc_base:"1f931-1f3fd",uc_output:"1f931-1f3fd",uc_match:"1f931-1f3fd",uc_greedy:"1f931-1f3fd",shortnames:[":breast_feeding_medium_skin_tone:"],category:"people"},":breast_feeding_tone4:":{uc_base:"1f931-1f3fe",uc_output:"1f931-1f3fe",uc_match:"1f931-1f3fe",uc_greedy:"1f931-1f3fe",shortnames:[":breast_feeding_medium_dark_skin_tone:"],category:"people"},":breast_feeding_tone5:":{uc_base:"1f931-1f3ff",uc_output:"1f931-1f3ff",uc_match:"1f931-1f3ff",uc_greedy:"1f931-1f3ff",shortnames:[":breast_feeding_dark_skin_tone:"],category:"people"},":bride_with_veil_tone1:":{uc_base:"1f470-1f3fb",uc_output:"1f470-1f3fb",uc_match:"1f470-1f3fb",uc_greedy:"1f470-1f3fb",shortnames:[],category:"people"},":bride_with_veil_tone2:":{uc_base:"1f470-1f3fc",uc_output:"1f470-1f3fc",uc_match:"1f470-1f3fc",uc_greedy:"1f470-1f3fc",shortnames:[],category:"people"},":bride_with_veil_tone3:":{uc_base:"1f470-1f3fd",uc_output:"1f470-1f3fd",uc_match:"1f470-1f3fd",uc_greedy:"1f470-1f3fd",shortnames:[],category:"people"},":bride_with_veil_tone4:":{uc_base:"1f470-1f3fe",uc_output:"1f470-1f3fe",uc_match:"1f470-1f3fe",uc_greedy:"1f470-1f3fe",shortnames:[],category:"people"},":bride_with_veil_tone5:":{uc_base:"1f470-1f3ff",uc_output:"1f470-1f3ff",uc_match:"1f470-1f3ff",uc_greedy:"1f470-1f3ff",shortnames:[],category:"people"},":call_me_tone1:":{uc_base:"1f919-1f3fb",uc_output:"1f919-1f3fb",uc_match:"1f919-1f3fb",uc_greedy:"1f919-1f3fb",shortnames:[":call_me_hand_tone1:"],category:"people"},":call_me_tone2:":{uc_base:"1f919-1f3fc",uc_output:"1f919-1f3fc",uc_match:"1f919-1f3fc",uc_greedy:"1f919-1f3fc",shortnames:[":call_me_hand_tone2:"],category:"people"},":call_me_tone3:":{uc_base:"1f919-1f3fd",uc_output:"1f919-1f3fd",uc_match:"1f919-1f3fd",uc_greedy:"1f919-1f3fd",shortnames:[":call_me_hand_tone3:"],category:"people"},":call_me_tone4:":{uc_base:"1f919-1f3fe",uc_output:"1f919-1f3fe",uc_match:"1f919-1f3fe",uc_greedy:"1f919-1f3fe",shortnames:[":call_me_hand_tone4:"],category:"people"},":call_me_tone5:":{uc_base:"1f919-1f3ff",uc_output:"1f919-1f3ff",uc_match:"1f919-1f3ff",uc_greedy:"1f919-1f3ff",shortnames:[":call_me_hand_tone5:"],category:"people"},":child_tone1:":{uc_base:"1f9d2-1f3fb",uc_output:"1f9d2-1f3fb",uc_match:"1f9d2-1f3fb",uc_greedy:"1f9d2-1f3fb",shortnames:[":child_light_skin_tone:"],category:"people"},":child_tone2:":{uc_base:"1f9d2-1f3fc",uc_output:"1f9d2-1f3fc",uc_match:"1f9d2-1f3fc",uc_greedy:"1f9d2-1f3fc",shortnames:[":child_medium_light_skin_tone:"],category:"people"},":child_tone3:":{uc_base:"1f9d2-1f3fd",uc_output:"1f9d2-1f3fd",uc_match:"1f9d2-1f3fd",uc_greedy:"1f9d2-1f3fd",shortnames:[":child_medium_skin_tone:"],category:"people"},":child_tone4:":{uc_base:"1f9d2-1f3fe",uc_output:"1f9d2-1f3fe",uc_match:"1f9d2-1f3fe",uc_greedy:"1f9d2-1f3fe",shortnames:[":child_medium_dark_skin_tone:"],category:"people"},":child_tone5:":{uc_base:"1f9d2-1f3ff",uc_output:"1f9d2-1f3ff",uc_match:"1f9d2-1f3ff",uc_greedy:"1f9d2-1f3ff",shortnames:[":child_dark_skin_tone:"],category:"people"},":clap_tone1:":{uc_base:"1f44f-1f3fb",uc_output:"1f44f-1f3fb",uc_match:"1f44f-1f3fb",uc_greedy:"1f44f-1f3fb",shortnames:[],category:"people"},":clap_tone2:":{uc_base:"1f44f-1f3fc",uc_output:"1f44f-1f3fc",uc_match:"1f44f-1f3fc",uc_greedy:"1f44f-1f3fc",shortnames:[],category:"people"},":clap_tone3:":{uc_base:"1f44f-1f3fd",uc_output:"1f44f-1f3fd",uc_match:"1f44f-1f3fd",uc_greedy:"1f44f-1f3fd",shortnames:[],category:"people"},":clap_tone4:":{uc_base:"1f44f-1f3fe",uc_output:"1f44f-1f3fe",uc_match:"1f44f-1f3fe",uc_greedy:"1f44f-1f3fe",shortnames:[],category:"people"},":clap_tone5:":{uc_base:"1f44f-1f3ff",uc_output:"1f44f-1f3ff",uc_match:"1f44f-1f3ff",uc_greedy:"1f44f-1f3ff",shortnames:[],category:"people"},":construction_worker_tone1:":{uc_base:"1f477-1f3fb",uc_output:"1f477-1f3fb",uc_match:"1f477-1f3fb",uc_greedy:"1f477-1f3fb",shortnames:[],category:"people"},":construction_worker_tone2:":{uc_base:"1f477-1f3fc",uc_output:"1f477-1f3fc",uc_match:"1f477-1f3fc",uc_greedy:"1f477-1f3fc",shortnames:[],category:"people"},":construction_worker_tone3:":{uc_base:"1f477-1f3fd",uc_output:"1f477-1f3fd",uc_match:"1f477-1f3fd",uc_greedy:"1f477-1f3fd",shortnames:[],category:"people"},":construction_worker_tone4:":{uc_base:"1f477-1f3fe",uc_output:"1f477-1f3fe",uc_match:"1f477-1f3fe",uc_greedy:"1f477-1f3fe",shortnames:[],category:"people"},":construction_worker_tone5:":{uc_base:"1f477-1f3ff",uc_output:"1f477-1f3ff",uc_match:"1f477-1f3ff",uc_greedy:"1f477-1f3ff",shortnames:[],category:"people"},":dancer_tone1:":{uc_base:"1f483-1f3fb",uc_output:"1f483-1f3fb",uc_match:"1f483-1f3fb",uc_greedy:"1f483-1f3fb",shortnames:[],category:"people"},":dancer_tone2:":{uc_base:"1f483-1f3fc",uc_output:"1f483-1f3fc",uc_match:"1f483-1f3fc",uc_greedy:"1f483-1f3fc",shortnames:[],category:"people"},":dancer_tone3:":{uc_base:"1f483-1f3fd",uc_output:"1f483-1f3fd",uc_match:"1f483-1f3fd",uc_greedy:"1f483-1f3fd",shortnames:[],category:"people"},":dancer_tone4:":{uc_base:"1f483-1f3fe",uc_output:"1f483-1f3fe",uc_match:"1f483-1f3fe",uc_greedy:"1f483-1f3fe",shortnames:[],category:"people"},":dancer_tone5:":{uc_base:"1f483-1f3ff",uc_output:"1f483-1f3ff",uc_match:"1f483-1f3ff",uc_greedy:"1f483-1f3ff",shortnames:[],category:"people"},":detective_tone1:":{uc_base:"1f575-1f3fb",uc_output:"1f575-1f3fb",uc_match:"1f575-fe0f-1f3fb",uc_greedy:"1f575-fe0f-1f3fb",shortnames:[":spy_tone1:",":sleuth_or_spy_tone1:"],category:"people"},":detective_tone2:":{uc_base:"1f575-1f3fc",uc_output:"1f575-1f3fc",uc_match:"1f575-fe0f-1f3fc",uc_greedy:"1f575-fe0f-1f3fc",shortnames:[":spy_tone2:",":sleuth_or_spy_tone2:"],category:"people"},":detective_tone3:":{uc_base:"1f575-1f3fd",uc_output:"1f575-1f3fd",uc_match:"1f575-fe0f-1f3fd",uc_greedy:"1f575-fe0f-1f3fd",shortnames:[":spy_tone3:",":sleuth_or_spy_tone3:"],category:"people"},":detective_tone4:":{uc_base:"1f575-1f3fe",uc_output:"1f575-1f3fe",uc_match:"1f575-fe0f-1f3fe",uc_greedy:"1f575-fe0f-1f3fe",shortnames:[":spy_tone4:",":sleuth_or_spy_tone4:"],category:"people"},":detective_tone5:":{uc_base:"1f575-1f3ff",uc_output:"1f575-1f3ff",uc_match:"1f575-fe0f-1f3ff",uc_greedy:"1f575-fe0f-1f3ff",shortnames:[":spy_tone5:",":sleuth_or_spy_tone5:"],category:"people"},":ear_tone1:":{uc_base:"1f442-1f3fb",uc_output:"1f442-1f3fb",uc_match:"1f442-1f3fb",uc_greedy:"1f442-1f3fb",shortnames:[],category:"people"},":ear_tone2:":{uc_base:"1f442-1f3fc",uc_output:"1f442-1f3fc",uc_match:"1f442-1f3fc",uc_greedy:"1f442-1f3fc",shortnames:[],category:"people"},":ear_tone3:":{uc_base:"1f442-1f3fd",uc_output:"1f442-1f3fd",uc_match:"1f442-1f3fd",uc_greedy:"1f442-1f3fd",shortnames:[],category:"people"},":ear_tone4:":{uc_base:"1f442-1f3fe",uc_output:"1f442-1f3fe",uc_match:"1f442-1f3fe",uc_greedy:"1f442-1f3fe",shortnames:[],category:"people"},":ear_tone5:":{uc_base:"1f442-1f3ff",uc_output:"1f442-1f3ff",uc_match:"1f442-1f3ff",uc_greedy:"1f442-1f3ff",shortnames:[],category:"people"},":elf_tone1:":{uc_base:"1f9dd-1f3fb",uc_output:"1f9dd-1f3fb",uc_match:"1f9dd-1f3fb",uc_greedy:"1f9dd-1f3fb",shortnames:[":elf_light_skin_tone:"],category:"people"},":elf_tone2:":{uc_base:"1f9dd-1f3fc",uc_output:"1f9dd-1f3fc",uc_match:"1f9dd-1f3fc",uc_greedy:"1f9dd-1f3fc",shortnames:[":elf_medium_light_skin_tone:"],category:"people"},":elf_tone3:":{uc_base:"1f9dd-1f3fd",uc_output:"1f9dd-1f3fd",uc_match:"1f9dd-1f3fd",uc_greedy:"1f9dd-1f3fd",shortnames:[":elf_medium_skin_tone:"],category:"people"},":elf_tone4:":{uc_base:"1f9dd-1f3fe",uc_output:"1f9dd-1f3fe",uc_match:"1f9dd-1f3fe",uc_greedy:"1f9dd-1f3fe",shortnames:[":elf_medium_dark_skin_tone:"],category:"people"},":elf_tone5:":{uc_base:"1f9dd-1f3ff",uc_output:"1f9dd-1f3ff",uc_match:"1f9dd-1f3ff",uc_greedy:"1f9dd-1f3ff",shortnames:[":elf_dark_skin_tone:"],category:"people"},":fairy_tone1:":{uc_base:"1f9da-1f3fb",uc_output:"1f9da-1f3fb",uc_match:"1f9da-1f3fb",uc_greedy:"1f9da-1f3fb",shortnames:[":fairy_light_skin_tone:"],category:"people"},":fairy_tone2:":{uc_base:"1f9da-1f3fc",uc_output:"1f9da-1f3fc",uc_match:"1f9da-1f3fc",uc_greedy:"1f9da-1f3fc",shortnames:[":fairy_medium_light_skin_tone:"],category:"people"},":fairy_tone3:":{uc_base:"1f9da-1f3fd",uc_output:"1f9da-1f3fd",uc_match:"1f9da-1f3fd",uc_greedy:"1f9da-1f3fd",shortnames:[":fairy_medium_skin_tone:"],category:"people"},":fairy_tone4:":{uc_base:"1f9da-1f3fe",uc_output:"1f9da-1f3fe",uc_match:"1f9da-1f3fe",uc_greedy:"1f9da-1f3fe",shortnames:[":fairy_medium_dark_skin_tone:"],category:"people"},":fairy_tone5:":{uc_base:"1f9da-1f3ff",uc_output:"1f9da-1f3ff",uc_match:"1f9da-1f3ff",uc_greedy:"1f9da-1f3ff",shortnames:[":fairy_dark_skin_tone:"],category:"people"},":fingers_crossed_tone1:":{uc_base:"1f91e-1f3fb",uc_output:"1f91e-1f3fb",uc_match:"1f91e-1f3fb",uc_greedy:"1f91e-1f3fb",shortnames:[":hand_with_index_and_middle_fingers_crossed_tone1:"],category:"people"},":fingers_crossed_tone2:":{uc_base:"1f91e-1f3fc",uc_output:"1f91e-1f3fc",uc_match:"1f91e-1f3fc",uc_greedy:"1f91e-1f3fc",shortnames:[":hand_with_index_and_middle_fingers_crossed_tone2:"],category:"people"},":fingers_crossed_tone3:":{uc_base:"1f91e-1f3fd",uc_output:"1f91e-1f3fd",uc_match:"1f91e-1f3fd",uc_greedy:"1f91e-1f3fd",shortnames:[":hand_with_index_and_middle_fingers_crossed_tone3:"],category:"people"},":fingers_crossed_tone4:":{uc_base:"1f91e-1f3fe",uc_output:"1f91e-1f3fe",uc_match:"1f91e-1f3fe",uc_greedy:"1f91e-1f3fe",shortnames:[":hand_with_index_and_middle_fingers_crossed_tone4:"],category:"people"},":fingers_crossed_tone5:":{uc_base:"1f91e-1f3ff",uc_output:"1f91e-1f3ff",uc_match:"1f91e-1f3ff",uc_greedy:"1f91e-1f3ff",shortnames:[":hand_with_index_and_middle_fingers_crossed_tone5:"],category:"people"},":flag_ac:":{uc_base:"1f1e6-1f1e8",uc_output:"1f1e6-1f1e8",uc_match:"1f1e6-1f1e8",uc_greedy:"1f1e6-1f1e8",shortnames:[":ac:"],category:"flags"},":flag_ad:":{uc_base:"1f1e6-1f1e9",uc_output:"1f1e6-1f1e9",uc_match:"1f1e6-1f1e9",uc_greedy:"1f1e6-1f1e9",shortnames:[":ad:"],category:"flags"},":flag_ae:":{uc_base:"1f1e6-1f1ea",uc_output:"1f1e6-1f1ea",uc_match:"1f1e6-1f1ea",uc_greedy:"1f1e6-1f1ea",shortnames:[":ae:"],category:"flags"},":flag_af:":{uc_base:"1f1e6-1f1eb",uc_output:"1f1e6-1f1eb",uc_match:"1f1e6-1f1eb",uc_greedy:"1f1e6-1f1eb",shortnames:[":af:"],category:"flags"},":flag_ag:":{uc_base:"1f1e6-1f1ec",uc_output:"1f1e6-1f1ec",uc_match:"1f1e6-1f1ec",uc_greedy:"1f1e6-1f1ec",shortnames:[":ag:"],category:"flags"},":flag_ai:":{uc_base:"1f1e6-1f1ee",uc_output:"1f1e6-1f1ee",uc_match:"1f1e6-1f1ee",uc_greedy:"1f1e6-1f1ee",shortnames:[":ai:"],category:"flags"},":flag_al:":{uc_base:"1f1e6-1f1f1",uc_output:"1f1e6-1f1f1",uc_match:"1f1e6-1f1f1",uc_greedy:"1f1e6-1f1f1",shortnames:[":al:"],category:"flags"},":flag_am:":{uc_base:"1f1e6-1f1f2",uc_output:"1f1e6-1f1f2",uc_match:"1f1e6-1f1f2",uc_greedy:"1f1e6-1f1f2",shortnames:[":am:"],category:"flags"},":flag_ao:":{uc_base:"1f1e6-1f1f4",uc_output:"1f1e6-1f1f4",uc_match:"1f1e6-1f1f4",uc_greedy:"1f1e6-1f1f4",shortnames:[":ao:"],category:"flags"},":flag_aq:":{uc_base:"1f1e6-1f1f6",uc_output:"1f1e6-1f1f6",uc_match:"1f1e6-1f1f6",uc_greedy:"1f1e6-1f1f6",shortnames:[":aq:"],category:"flags"},":flag_ar:":{uc_base:"1f1e6-1f1f7",uc_output:"1f1e6-1f1f7",uc_match:"1f1e6-1f1f7",uc_greedy:"1f1e6-1f1f7",shortnames:[":ar:"],category:"flags"},":flag_as:":{uc_base:"1f1e6-1f1f8",uc_output:"1f1e6-1f1f8",uc_match:"1f1e6-1f1f8",uc_greedy:"1f1e6-1f1f8",shortnames:[":as:"],category:"flags"},":flag_at:":{uc_base:"1f1e6-1f1f9",uc_output:"1f1e6-1f1f9",uc_match:"1f1e6-1f1f9",uc_greedy:"1f1e6-1f1f9",shortnames:[":at:"],category:"flags"},":flag_au:":{uc_base:"1f1e6-1f1fa",uc_output:"1f1e6-1f1fa",uc_match:"1f1e6-1f1fa",uc_greedy:"1f1e6-1f1fa",shortnames:[":au:"],category:"flags"},":flag_aw:":{uc_base:"1f1e6-1f1fc",uc_output:"1f1e6-1f1fc",uc_match:"1f1e6-1f1fc",uc_greedy:"1f1e6-1f1fc",shortnames:[":aw:"],category:"flags"},":flag_ax:":{uc_base:"1f1e6-1f1fd",uc_output:"1f1e6-1f1fd",uc_match:"1f1e6-1f1fd",uc_greedy:"1f1e6-1f1fd",shortnames:[":ax:"],category:"flags"},":flag_az:":{uc_base:"1f1e6-1f1ff",uc_output:"1f1e6-1f1ff",uc_match:"1f1e6-1f1ff",uc_greedy:"1f1e6-1f1ff",shortnames:[":az:"],category:"flags"},":flag_ba:":{uc_base:"1f1e7-1f1e6",uc_output:"1f1e7-1f1e6",uc_match:"1f1e7-1f1e6",uc_greedy:"1f1e7-1f1e6",shortnames:[":ba:"],category:"flags"},":flag_bb:":{uc_base:"1f1e7-1f1e7",uc_output:"1f1e7-1f1e7",uc_match:"1f1e7-1f1e7",uc_greedy:"1f1e7-1f1e7",shortnames:[":bb:"],category:"flags"},":flag_bd:":{uc_base:"1f1e7-1f1e9",uc_output:"1f1e7-1f1e9",uc_match:"1f1e7-1f1e9",uc_greedy:"1f1e7-1f1e9",shortnames:[":bd:"],category:"flags"},":flag_be:":{uc_base:"1f1e7-1f1ea",uc_output:"1f1e7-1f1ea",uc_match:"1f1e7-1f1ea",uc_greedy:"1f1e7-1f1ea",shortnames:[":be:"],category:"flags"},":flag_bf:":{uc_base:"1f1e7-1f1eb",uc_output:"1f1e7-1f1eb",uc_match:"1f1e7-1f1eb",uc_greedy:"1f1e7-1f1eb",shortnames:[":bf:"],category:"flags"},":flag_bg:":{uc_base:"1f1e7-1f1ec",uc_output:"1f1e7-1f1ec",uc_match:"1f1e7-1f1ec",uc_greedy:"1f1e7-1f1ec",shortnames:[":bg:"],category:"flags"},":flag_bh:":{uc_base:"1f1e7-1f1ed",uc_output:"1f1e7-1f1ed",uc_match:"1f1e7-1f1ed",uc_greedy:"1f1e7-1f1ed",shortnames:[":bh:"],category:"flags"},":flag_bi:":{uc_base:"1f1e7-1f1ee",uc_output:"1f1e7-1f1ee",uc_match:"1f1e7-1f1ee",uc_greedy:"1f1e7-1f1ee",shortnames:[":bi:"],category:"flags"},":flag_bj:":{uc_base:"1f1e7-1f1ef",uc_output:"1f1e7-1f1ef",uc_match:"1f1e7-1f1ef",uc_greedy:"1f1e7-1f1ef",shortnames:[":bj:"],category:"flags"},":flag_bl:":{uc_base:"1f1e7-1f1f1",uc_output:"1f1e7-1f1f1",uc_match:"1f1e7-1f1f1",uc_greedy:"1f1e7-1f1f1",shortnames:[":bl:"],category:"flags"},":flag_bm:":{uc_base:"1f1e7-1f1f2",uc_output:"1f1e7-1f1f2",uc_match:"1f1e7-1f1f2",uc_greedy:"1f1e7-1f1f2",shortnames:[":bm:"],category:"flags"},":flag_bn:":{uc_base:"1f1e7-1f1f3",uc_output:"1f1e7-1f1f3",uc_match:"1f1e7-1f1f3",uc_greedy:"1f1e7-1f1f3",shortnames:[":bn:"],category:"flags"},":flag_bo:":{uc_base:"1f1e7-1f1f4",uc_output:"1f1e7-1f1f4",uc_match:"1f1e7-1f1f4",uc_greedy:"1f1e7-1f1f4",shortnames:[":bo:"],category:"flags"},":flag_bq:":{uc_base:"1f1e7-1f1f6",uc_output:"1f1e7-1f1f6",uc_match:"1f1e7-1f1f6",uc_greedy:"1f1e7-1f1f6",shortnames:[":bq:"],category:"flags"},":flag_br:":{uc_base:"1f1e7-1f1f7",uc_output:"1f1e7-1f1f7",uc_match:"1f1e7-1f1f7",uc_greedy:"1f1e7-1f1f7",shortnames:[":br:"],category:"flags"},":flag_bs:":{uc_base:"1f1e7-1f1f8",uc_output:"1f1e7-1f1f8",uc_match:"1f1e7-1f1f8",uc_greedy:"1f1e7-1f1f8",shortnames:[":bs:"],category:"flags"},":flag_bt:":{uc_base:"1f1e7-1f1f9",uc_output:"1f1e7-1f1f9",uc_match:"1f1e7-1f1f9",uc_greedy:"1f1e7-1f1f9",shortnames:[":bt:"],category:"flags"},":flag_bv:":{uc_base:"1f1e7-1f1fb",uc_output:"1f1e7-1f1fb",uc_match:"1f1e7-1f1fb",uc_greedy:"1f1e7-1f1fb",shortnames:[":bv:"],category:"flags"},":flag_bw:":{uc_base:"1f1e7-1f1fc",uc_output:"1f1e7-1f1fc",uc_match:"1f1e7-1f1fc",uc_greedy:"1f1e7-1f1fc",shortnames:[":bw:"],category:"flags"},":flag_by:":{uc_base:"1f1e7-1f1fe",uc_output:"1f1e7-1f1fe",uc_match:"1f1e7-1f1fe",uc_greedy:"1f1e7-1f1fe",shortnames:[":by:"],category:"flags"},":flag_bz:":{uc_base:"1f1e7-1f1ff",uc_output:"1f1e7-1f1ff",uc_match:"1f1e7-1f1ff",uc_greedy:"1f1e7-1f1ff",shortnames:[":bz:"],category:"flags"},":flag_ca:":{uc_base:"1f1e8-1f1e6",uc_output:"1f1e8-1f1e6",uc_match:"1f1e8-1f1e6",uc_greedy:"1f1e8-1f1e6",shortnames:[":ca:"],category:"flags"},":flag_cc:":{uc_base:"1f1e8-1f1e8",uc_output:"1f1e8-1f1e8",uc_match:"1f1e8-1f1e8",uc_greedy:"1f1e8-1f1e8",shortnames:[":cc:"],category:"flags"},":flag_cd:":{uc_base:"1f1e8-1f1e9",uc_output:"1f1e8-1f1e9",uc_match:"1f1e8-1f1e9",uc_greedy:"1f1e8-1f1e9",shortnames:[":congo:"],category:"flags"},":flag_cf:":{uc_base:"1f1e8-1f1eb",uc_output:"1f1e8-1f1eb",uc_match:"1f1e8-1f1eb",uc_greedy:"1f1e8-1f1eb",shortnames:[":cf:"],category:"flags"},":flag_cg:":{uc_base:"1f1e8-1f1ec",uc_output:"1f1e8-1f1ec",uc_match:"1f1e8-1f1ec",uc_greedy:"1f1e8-1f1ec",shortnames:[":cg:"],category:"flags"},":flag_ch:":{uc_base:"1f1e8-1f1ed",uc_output:"1f1e8-1f1ed",uc_match:"1f1e8-1f1ed",uc_greedy:"1f1e8-1f1ed",shortnames:[":ch:"],category:"flags"},":flag_ci:":{uc_base:"1f1e8-1f1ee",uc_output:"1f1e8-1f1ee",uc_match:"1f1e8-1f1ee",uc_greedy:"1f1e8-1f1ee",shortnames:[":ci:"],category:"flags"},":flag_ck:":{uc_base:"1f1e8-1f1f0",uc_output:"1f1e8-1f1f0",uc_match:"1f1e8-1f1f0",uc_greedy:"1f1e8-1f1f0",shortnames:[":ck:"],category:"flags"},":flag_cl:":{uc_base:"1f1e8-1f1f1",uc_output:"1f1e8-1f1f1",uc_match:"1f1e8-1f1f1",uc_greedy:"1f1e8-1f1f1",shortnames:[":chile:"],category:"flags"},":flag_cm:":{uc_base:"1f1e8-1f1f2",uc_output:"1f1e8-1f1f2",uc_match:"1f1e8-1f1f2",uc_greedy:"1f1e8-1f1f2",shortnames:[":cm:"],category:"flags"},":flag_cn:":{uc_base:"1f1e8-1f1f3",uc_output:"1f1e8-1f1f3",uc_match:"1f1e8-1f1f3",uc_greedy:"1f1e8-1f1f3",shortnames:[":cn:"],category:"flags"},":flag_co:":{uc_base:"1f1e8-1f1f4",uc_output:"1f1e8-1f1f4",uc_match:"1f1e8-1f1f4",uc_greedy:"1f1e8-1f1f4",shortnames:[":co:"],category:"flags"},":flag_cp:":{uc_base:"1f1e8-1f1f5",uc_output:"1f1e8-1f1f5",uc_match:"1f1e8-1f1f5",uc_greedy:"1f1e8-1f1f5",shortnames:[":cp:"],category:"flags"},":flag_cr:":{uc_base:"1f1e8-1f1f7",uc_output:"1f1e8-1f1f7",uc_match:"1f1e8-1f1f7",uc_greedy:"1f1e8-1f1f7",shortnames:[":cr:"],category:"flags"},":flag_cu:":{uc_base:"1f1e8-1f1fa",uc_output:"1f1e8-1f1fa",uc_match:"1f1e8-1f1fa",uc_greedy:"1f1e8-1f1fa",shortnames:[":cu:"],category:"flags"},":flag_cv:":{uc_base:"1f1e8-1f1fb",uc_output:"1f1e8-1f1fb",uc_match:"1f1e8-1f1fb",uc_greedy:"1f1e8-1f1fb",shortnames:[":cv:"],category:"flags"},":flag_cw:":{uc_base:"1f1e8-1f1fc",uc_output:"1f1e8-1f1fc",uc_match:"1f1e8-1f1fc",uc_greedy:"1f1e8-1f1fc",shortnames:[":cw:"],category:"flags"},":flag_cx:":{uc_base:"1f1e8-1f1fd",uc_output:"1f1e8-1f1fd",uc_match:"1f1e8-1f1fd",uc_greedy:"1f1e8-1f1fd",shortnames:[":cx:"],category:"flags"},":flag_cy:":{uc_base:"1f1e8-1f1fe",uc_output:"1f1e8-1f1fe",uc_match:"1f1e8-1f1fe",uc_greedy:"1f1e8-1f1fe",shortnames:[":cy:"],category:"flags"},":flag_cz:":{uc_base:"1f1e8-1f1ff",uc_output:"1f1e8-1f1ff",uc_match:"1f1e8-1f1ff",uc_greedy:"1f1e8-1f1ff",shortnames:[":cz:"],category:"flags"},":flag_de:":{uc_base:"1f1e9-1f1ea",uc_output:"1f1e9-1f1ea",uc_match:"1f1e9-1f1ea",uc_greedy:"1f1e9-1f1ea",shortnames:[":de:"],category:"flags"},":flag_dg:":{uc_base:"1f1e9-1f1ec",uc_output:"1f1e9-1f1ec",uc_match:"1f1e9-1f1ec",uc_greedy:"1f1e9-1f1ec",shortnames:[":dg:"],category:"flags"},":flag_dj:":{uc_base:"1f1e9-1f1ef",uc_output:"1f1e9-1f1ef",uc_match:"1f1e9-1f1ef",uc_greedy:"1f1e9-1f1ef",shortnames:[":dj:"],category:"flags"},":flag_dk:":{uc_base:"1f1e9-1f1f0",uc_output:"1f1e9-1f1f0",uc_match:"1f1e9-1f1f0",uc_greedy:"1f1e9-1f1f0",shortnames:[":dk:"],category:"flags"},":flag_dm:":{uc_base:"1f1e9-1f1f2",uc_output:"1f1e9-1f1f2",uc_match:"1f1e9-1f1f2",uc_greedy:"1f1e9-1f1f2",shortnames:[":dm:"],category:"flags"},":flag_do:":{uc_base:"1f1e9-1f1f4",uc_output:"1f1e9-1f1f4",uc_match:"1f1e9-1f1f4",uc_greedy:"1f1e9-1f1f4",shortnames:[":do:"],category:"flags"},":flag_dz:":{uc_base:"1f1e9-1f1ff",uc_output:"1f1e9-1f1ff",uc_match:"1f1e9-1f1ff",uc_greedy:"1f1e9-1f1ff",shortnames:[":dz:"],category:"flags"},":flag_ea:":{uc_base:"1f1ea-1f1e6",uc_output:"1f1ea-1f1e6",uc_match:"1f1ea-1f1e6",uc_greedy:"1f1ea-1f1e6",shortnames:[":ea:"],category:"flags"},":flag_ec:":{uc_base:"1f1ea-1f1e8",uc_output:"1f1ea-1f1e8",uc_match:"1f1ea-1f1e8",uc_greedy:"1f1ea-1f1e8",shortnames:[":ec:"],category:"flags"},":flag_ee:":{uc_base:"1f1ea-1f1ea",uc_output:"1f1ea-1f1ea",uc_match:"1f1ea-1f1ea",uc_greedy:"1f1ea-1f1ea",shortnames:[":ee:"],category:"flags"},":flag_eg:":{uc_base:"1f1ea-1f1ec",uc_output:"1f1ea-1f1ec",uc_match:"1f1ea-1f1ec",uc_greedy:"1f1ea-1f1ec",shortnames:[":eg:"],category:"flags"},":flag_eh:":{uc_base:"1f1ea-1f1ed",uc_output:"1f1ea-1f1ed",uc_match:"1f1ea-1f1ed",uc_greedy:"1f1ea-1f1ed",shortnames:[":eh:"],category:"flags"},":flag_er:":{uc_base:"1f1ea-1f1f7",uc_output:"1f1ea-1f1f7",uc_match:"1f1ea-1f1f7",uc_greedy:"1f1ea-1f1f7",shortnames:[":er:"],category:"flags"},":flag_es:":{uc_base:"1f1ea-1f1f8",uc_output:"1f1ea-1f1f8",uc_match:"1f1ea-1f1f8",uc_greedy:"1f1ea-1f1f8",shortnames:[":es:"],category:"flags"},":flag_et:":{uc_base:"1f1ea-1f1f9",uc_output:"1f1ea-1f1f9",uc_match:"1f1ea-1f1f9",uc_greedy:"1f1ea-1f1f9",shortnames:[":et:"],category:"flags"},":flag_eu:":{uc_base:"1f1ea-1f1fa",uc_output:"1f1ea-1f1fa",uc_match:"1f1ea-1f1fa",uc_greedy:"1f1ea-1f1fa",shortnames:[":eu:"],category:"flags"},":flag_fi:":{uc_base:"1f1eb-1f1ee",uc_output:"1f1eb-1f1ee",uc_match:"1f1eb-1f1ee",uc_greedy:"1f1eb-1f1ee",shortnames:[":fi:"],category:"flags"},":flag_fj:":{uc_base:"1f1eb-1f1ef",uc_output:"1f1eb-1f1ef",uc_match:"1f1eb-1f1ef",uc_greedy:"1f1eb-1f1ef",shortnames:[":fj:"],category:"flags"},":flag_fk:":{uc_base:"1f1eb-1f1f0",uc_output:"1f1eb-1f1f0",uc_match:"1f1eb-1f1f0",uc_greedy:"1f1eb-1f1f0",shortnames:[":fk:"],category:"flags"},":flag_fm:":{uc_base:"1f1eb-1f1f2",uc_output:"1f1eb-1f1f2",uc_match:"1f1eb-1f1f2",uc_greedy:"1f1eb-1f1f2",shortnames:[":fm:"],category:"flags"},":flag_fo:":{uc_base:"1f1eb-1f1f4",uc_output:"1f1eb-1f1f4",uc_match:"1f1eb-1f1f4",uc_greedy:"1f1eb-1f1f4",shortnames:[":fo:"],category:"flags"},":flag_fr:":{uc_base:"1f1eb-1f1f7",uc_output:"1f1eb-1f1f7",uc_match:"1f1eb-1f1f7",uc_greedy:"1f1eb-1f1f7",shortnames:[":fr:"],category:"flags"},":flag_ga:":{uc_base:"1f1ec-1f1e6",uc_output:"1f1ec-1f1e6",uc_match:"1f1ec-1f1e6",uc_greedy:"1f1ec-1f1e6",shortnames:[":ga:"],category:"flags"},":flag_gb:":{uc_base:"1f1ec-1f1e7",uc_output:"1f1ec-1f1e7",uc_match:"1f1ec-1f1e7",uc_greedy:"1f1ec-1f1e7",shortnames:[":gb:"],category:"flags"},":flag_gd:":{uc_base:"1f1ec-1f1e9",uc_output:"1f1ec-1f1e9",uc_match:"1f1ec-1f1e9",uc_greedy:"1f1ec-1f1e9",shortnames:[":gd:"],category:"flags"},":flag_ge:":{uc_base:"1f1ec-1f1ea",uc_output:"1f1ec-1f1ea",uc_match:"1f1ec-1f1ea",uc_greedy:"1f1ec-1f1ea",shortnames:[":ge:"],category:"flags"},":flag_gf:":{uc_base:"1f1ec-1f1eb",uc_output:"1f1ec-1f1eb",uc_match:"1f1ec-1f1eb",uc_greedy:"1f1ec-1f1eb",shortnames:[":gf:"],category:"flags"},":flag_gg:":{uc_base:"1f1ec-1f1ec",uc_output:"1f1ec-1f1ec",uc_match:"1f1ec-1f1ec",uc_greedy:"1f1ec-1f1ec",shortnames:[":gg:"],category:"flags"},":flag_gh:":{uc_base:"1f1ec-1f1ed",uc_output:"1f1ec-1f1ed",uc_match:"1f1ec-1f1ed",uc_greedy:"1f1ec-1f1ed",shortnames:[":gh:"],category:"flags"},":flag_gi:":{uc_base:"1f1ec-1f1ee",uc_output:"1f1ec-1f1ee",uc_match:"1f1ec-1f1ee",uc_greedy:"1f1ec-1f1ee",shortnames:[":gi:"],category:"flags"},":flag_gl:":{uc_base:"1f1ec-1f1f1",uc_output:"1f1ec-1f1f1",uc_match:"1f1ec-1f1f1",uc_greedy:"1f1ec-1f1f1",shortnames:[":gl:"],category:"flags"},":flag_gm:":{uc_base:"1f1ec-1f1f2",uc_output:"1f1ec-1f1f2",uc_match:"1f1ec-1f1f2",uc_greedy:"1f1ec-1f1f2",shortnames:[":gm:"],category:"flags"},":flag_gn:":{uc_base:"1f1ec-1f1f3",uc_output:"1f1ec-1f1f3",uc_match:"1f1ec-1f1f3",uc_greedy:"1f1ec-1f1f3",shortnames:[":gn:"],category:"flags"},":flag_gp:":{uc_base:"1f1ec-1f1f5",uc_output:"1f1ec-1f1f5",uc_match:"1f1ec-1f1f5",uc_greedy:"1f1ec-1f1f5",shortnames:[":gp:"],category:"flags"},":flag_gq:":{uc_base:"1f1ec-1f1f6",uc_output:"1f1ec-1f1f6",uc_match:"1f1ec-1f1f6",uc_greedy:"1f1ec-1f1f6",shortnames:[":gq:"],category:"flags"},":flag_gr:":{uc_base:"1f1ec-1f1f7",uc_output:"1f1ec-1f1f7",uc_match:"1f1ec-1f1f7",uc_greedy:"1f1ec-1f1f7",shortnames:[":gr:"],category:"flags"},":flag_gs:":{uc_base:"1f1ec-1f1f8",uc_output:"1f1ec-1f1f8",uc_match:"1f1ec-1f1f8",uc_greedy:"1f1ec-1f1f8",shortnames:[":gs:"],category:"flags"},":flag_gt:":{uc_base:"1f1ec-1f1f9",uc_output:"1f1ec-1f1f9",uc_match:"1f1ec-1f1f9",uc_greedy:"1f1ec-1f1f9",shortnames:[":gt:"],category:"flags"},":flag_gu:":{uc_base:"1f1ec-1f1fa",uc_output:"1f1ec-1f1fa",uc_match:"1f1ec-1f1fa",uc_greedy:"1f1ec-1f1fa",shortnames:[":gu:"],category:"flags"},":flag_gw:":{uc_base:"1f1ec-1f1fc",uc_output:"1f1ec-1f1fc",uc_match:"1f1ec-1f1fc",uc_greedy:"1f1ec-1f1fc",shortnames:[":gw:"],category:"flags"},":flag_gy:":{uc_base:"1f1ec-1f1fe",uc_output:"1f1ec-1f1fe",uc_match:"1f1ec-1f1fe",uc_greedy:"1f1ec-1f1fe",shortnames:[":gy:"],category:"flags"},":flag_hk:":{uc_base:"1f1ed-1f1f0",uc_output:"1f1ed-1f1f0",uc_match:"1f1ed-1f1f0",uc_greedy:"1f1ed-1f1f0",shortnames:[":hk:"],category:"flags"},":flag_hm:":{uc_base:"1f1ed-1f1f2",uc_output:"1f1ed-1f1f2",uc_match:"1f1ed-1f1f2",uc_greedy:"1f1ed-1f1f2",shortnames:[":hm:"],category:"flags"},":flag_hn:":{uc_base:"1f1ed-1f1f3",uc_output:"1f1ed-1f1f3",uc_match:"1f1ed-1f1f3",uc_greedy:"1f1ed-1f1f3",shortnames:[":hn:"],category:"flags"},":flag_hr:":{uc_base:"1f1ed-1f1f7",uc_output:"1f1ed-1f1f7",uc_match:"1f1ed-1f1f7",uc_greedy:"1f1ed-1f1f7",shortnames:[":hr:"],category:"flags"},":flag_ht:":{uc_base:"1f1ed-1f1f9",uc_output:"1f1ed-1f1f9",uc_match:"1f1ed-1f1f9",uc_greedy:"1f1ed-1f1f9",shortnames:[":ht:"],category:"flags"},":flag_hu:":{uc_base:"1f1ed-1f1fa",uc_output:"1f1ed-1f1fa",uc_match:"1f1ed-1f1fa",uc_greedy:"1f1ed-1f1fa",shortnames:[":hu:"],category:"flags"},":flag_ic:":{uc_base:"1f1ee-1f1e8",uc_output:"1f1ee-1f1e8",uc_match:"1f1ee-1f1e8",uc_greedy:"1f1ee-1f1e8",shortnames:[":ic:"],category:"flags"},":flag_id:":{uc_base:"1f1ee-1f1e9",uc_output:"1f1ee-1f1e9",uc_match:"1f1ee-1f1e9",uc_greedy:"1f1ee-1f1e9",shortnames:[":indonesia:"],category:"flags"},":flag_ie:":{uc_base:"1f1ee-1f1ea",uc_output:"1f1ee-1f1ea",uc_match:"1f1ee-1f1ea",uc_greedy:"1f1ee-1f1ea",shortnames:[":ie:"],category:"flags"},":flag_il:":{uc_base:"1f1ee-1f1f1",uc_output:"1f1ee-1f1f1",uc_match:"1f1ee-1f1f1",uc_greedy:"1f1ee-1f1f1",shortnames:[":il:"],category:"flags"},":flag_im:":{uc_base:"1f1ee-1f1f2",uc_output:"1f1ee-1f1f2",uc_match:"1f1ee-1f1f2",uc_greedy:"1f1ee-1f1f2",shortnames:[":im:"],category:"flags"},":flag_in:":{uc_base:"1f1ee-1f1f3",uc_output:"1f1ee-1f1f3",uc_match:"1f1ee-1f1f3",uc_greedy:"1f1ee-1f1f3",shortnames:[":in:"],category:"flags"},":flag_io:":{uc_base:"1f1ee-1f1f4",uc_output:"1f1ee-1f1f4",uc_match:"1f1ee-1f1f4",uc_greedy:"1f1ee-1f1f4",shortnames:[":io:"],category:"flags"},":flag_iq:":{uc_base:"1f1ee-1f1f6",uc_output:"1f1ee-1f1f6",uc_match:"1f1ee-1f1f6",uc_greedy:"1f1ee-1f1f6",shortnames:[":iq:"],category:"flags"},":flag_ir:":{uc_base:"1f1ee-1f1f7",uc_output:"1f1ee-1f1f7",uc_match:"1f1ee-1f1f7",uc_greedy:"1f1ee-1f1f7",shortnames:[":ir:"],category:"flags"},":flag_is:":{uc_base:"1f1ee-1f1f8",uc_output:"1f1ee-1f1f8",uc_match:"1f1ee-1f1f8",uc_greedy:"1f1ee-1f1f8",shortnames:[":is:"],category:"flags"},":flag_it:":{uc_base:"1f1ee-1f1f9",uc_output:"1f1ee-1f1f9",uc_match:"1f1ee-1f1f9",uc_greedy:"1f1ee-1f1f9",shortnames:[":it:"],category:"flags"},":flag_je:":{uc_base:"1f1ef-1f1ea",uc_output:"1f1ef-1f1ea",uc_match:"1f1ef-1f1ea",uc_greedy:"1f1ef-1f1ea",shortnames:[":je:"],category:"flags"},":flag_jm:":{uc_base:"1f1ef-1f1f2",uc_output:"1f1ef-1f1f2",uc_match:"1f1ef-1f1f2",uc_greedy:"1f1ef-1f1f2",shortnames:[":jm:"],category:"flags"},":flag_jo:":{uc_base:"1f1ef-1f1f4",uc_output:"1f1ef-1f1f4",uc_match:"1f1ef-1f1f4",uc_greedy:"1f1ef-1f1f4",shortnames:[":jo:"],category:"flags"},":flag_jp:":{uc_base:"1f1ef-1f1f5",uc_output:"1f1ef-1f1f5",uc_match:"1f1ef-1f1f5",uc_greedy:"1f1ef-1f1f5",shortnames:[":jp:"],category:"flags"},":flag_ke:":{uc_base:"1f1f0-1f1ea",uc_output:"1f1f0-1f1ea",uc_match:"1f1f0-1f1ea",uc_greedy:"1f1f0-1f1ea",shortnames:[":ke:"],category:"flags"},":flag_kg:":{uc_base:"1f1f0-1f1ec",uc_output:"1f1f0-1f1ec",uc_match:"1f1f0-1f1ec",uc_greedy:"1f1f0-1f1ec",shortnames:[":kg:"],category:"flags"},":flag_kh:":{uc_base:"1f1f0-1f1ed",uc_output:"1f1f0-1f1ed",uc_match:"1f1f0-1f1ed",uc_greedy:"1f1f0-1f1ed",shortnames:[":kh:"],category:"flags"},":flag_ki:":{uc_base:"1f1f0-1f1ee",uc_output:"1f1f0-1f1ee",uc_match:"1f1f0-1f1ee",uc_greedy:"1f1f0-1f1ee",shortnames:[":ki:"],category:"flags"},":flag_km:":{uc_base:"1f1f0-1f1f2",uc_output:"1f1f0-1f1f2",uc_match:"1f1f0-1f1f2",uc_greedy:"1f1f0-1f1f2",shortnames:[":km:"],category:"flags"},":flag_kn:":{uc_base:"1f1f0-1f1f3",uc_output:"1f1f0-1f1f3",uc_match:"1f1f0-1f1f3",uc_greedy:"1f1f0-1f1f3",shortnames:[":kn:"],category:"flags"},":flag_kp:":{uc_base:"1f1f0-1f1f5",uc_output:"1f1f0-1f1f5",uc_match:"1f1f0-1f1f5",uc_greedy:"1f1f0-1f1f5",shortnames:[":kp:"],category:"flags"},":flag_kr:":{uc_base:"1f1f0-1f1f7",uc_output:"1f1f0-1f1f7",uc_match:"1f1f0-1f1f7",uc_greedy:"1f1f0-1f1f7",shortnames:[":kr:"],category:"flags"},":flag_kw:":{uc_base:"1f1f0-1f1fc",uc_output:"1f1f0-1f1fc",uc_match:"1f1f0-1f1fc",uc_greedy:"1f1f0-1f1fc",shortnames:[":kw:"],category:"flags"},":flag_ky:":{uc_base:"1f1f0-1f1fe",uc_output:"1f1f0-1f1fe",uc_match:"1f1f0-1f1fe",uc_greedy:"1f1f0-1f1fe",shortnames:[":ky:"],category:"flags"},":flag_kz:":{uc_base:"1f1f0-1f1ff",uc_output:"1f1f0-1f1ff",uc_match:"1f1f0-1f1ff",uc_greedy:"1f1f0-1f1ff",shortnames:[":kz:"],category:"flags"},":flag_la:":{uc_base:"1f1f1-1f1e6",uc_output:"1f1f1-1f1e6",uc_match:"1f1f1-1f1e6",uc_greedy:"1f1f1-1f1e6",shortnames:[":la:"],category:"flags"},":flag_lb:":{uc_base:"1f1f1-1f1e7",uc_output:"1f1f1-1f1e7",uc_match:"1f1f1-1f1e7",uc_greedy:"1f1f1-1f1e7",shortnames:[":lb:"],category:"flags"},":flag_lc:":{uc_base:"1f1f1-1f1e8",uc_output:"1f1f1-1f1e8",uc_match:"1f1f1-1f1e8",uc_greedy:"1f1f1-1f1e8",shortnames:[":lc:"],category:"flags"},":flag_li:":{uc_base:"1f1f1-1f1ee",uc_output:"1f1f1-1f1ee",uc_match:"1f1f1-1f1ee",uc_greedy:"1f1f1-1f1ee",shortnames:[":li:"],category:"flags"},":flag_lk:":{uc_base:"1f1f1-1f1f0",uc_output:"1f1f1-1f1f0",uc_match:"1f1f1-1f1f0",uc_greedy:"1f1f1-1f1f0",shortnames:[":lk:"],category:"flags"},":flag_lr:":{uc_base:"1f1f1-1f1f7",uc_output:"1f1f1-1f1f7",uc_match:"1f1f1-1f1f7",uc_greedy:"1f1f1-1f1f7",shortnames:[":lr:"],category:"flags"},":flag_ls:":{uc_base:"1f1f1-1f1f8",uc_output:"1f1f1-1f1f8",uc_match:"1f1f1-1f1f8",uc_greedy:"1f1f1-1f1f8",shortnames:[":ls:"],category:"flags"},":flag_lt:":{uc_base:"1f1f1-1f1f9",uc_output:"1f1f1-1f1f9",uc_match:"1f1f1-1f1f9",uc_greedy:"1f1f1-1f1f9",shortnames:[":lt:"],category:"flags"},":flag_lu:":{uc_base:"1f1f1-1f1fa",uc_output:"1f1f1-1f1fa",uc_match:"1f1f1-1f1fa",uc_greedy:"1f1f1-1f1fa",shortnames:[":lu:"],category:"flags"},":flag_lv:":{uc_base:"1f1f1-1f1fb",uc_output:"1f1f1-1f1fb",uc_match:"1f1f1-1f1fb",uc_greedy:"1f1f1-1f1fb",shortnames:[":lv:"],category:"flags"},":flag_ly:":{uc_base:"1f1f1-1f1fe",uc_output:"1f1f1-1f1fe",uc_match:"1f1f1-1f1fe",uc_greedy:"1f1f1-1f1fe",shortnames:[":ly:"],category:"flags"},":flag_ma:":{uc_base:"1f1f2-1f1e6",uc_output:"1f1f2-1f1e6",uc_match:"1f1f2-1f1e6",uc_greedy:"1f1f2-1f1e6",shortnames:[":ma:"],category:"flags"},":flag_mc:":{uc_base:"1f1f2-1f1e8",uc_output:"1f1f2-1f1e8",uc_match:"1f1f2-1f1e8",uc_greedy:"1f1f2-1f1e8",shortnames:[":mc:"],category:"flags"},":flag_md:":{uc_base:"1f1f2-1f1e9",uc_output:"1f1f2-1f1e9",uc_match:"1f1f2-1f1e9",uc_greedy:"1f1f2-1f1e9",shortnames:[":md:"],category:"flags"},":flag_me:":{uc_base:"1f1f2-1f1ea",uc_output:"1f1f2-1f1ea",uc_match:"1f1f2-1f1ea",uc_greedy:"1f1f2-1f1ea",shortnames:[":me:"],category:"flags"},":flag_mf:":{uc_base:"1f1f2-1f1eb",uc_output:"1f1f2-1f1eb",uc_match:"1f1f2-1f1eb",uc_greedy:"1f1f2-1f1eb",shortnames:[":mf:"],category:"flags"},":flag_mg:":{uc_base:"1f1f2-1f1ec",uc_output:"1f1f2-1f1ec",uc_match:"1f1f2-1f1ec",uc_greedy:"1f1f2-1f1ec",shortnames:[":mg:"],category:"flags"},":flag_mh:":{uc_base:"1f1f2-1f1ed",uc_output:"1f1f2-1f1ed",uc_match:"1f1f2-1f1ed",uc_greedy:"1f1f2-1f1ed",shortnames:[":mh:"],category:"flags"},":flag_mk:":{uc_base:"1f1f2-1f1f0",uc_output:"1f1f2-1f1f0",uc_match:"1f1f2-1f1f0",uc_greedy:"1f1f2-1f1f0",shortnames:[":mk:"],category:"flags"},":flag_ml:":{uc_base:"1f1f2-1f1f1",uc_output:"1f1f2-1f1f1",uc_match:"1f1f2-1f1f1",uc_greedy:"1f1f2-1f1f1",shortnames:[":ml:"],category:"flags"},":flag_mm:":{uc_base:"1f1f2-1f1f2",uc_output:"1f1f2-1f1f2",uc_match:"1f1f2-1f1f2",uc_greedy:"1f1f2-1f1f2",shortnames:[":mm:"],category:"flags"},":flag_mn:":{uc_base:"1f1f2-1f1f3",uc_output:"1f1f2-1f1f3",uc_match:"1f1f2-1f1f3",uc_greedy:"1f1f2-1f1f3",shortnames:[":mn:"],category:"flags"},":flag_mo:":{uc_base:"1f1f2-1f1f4",uc_output:"1f1f2-1f1f4",uc_match:"1f1f2-1f1f4",uc_greedy:"1f1f2-1f1f4",shortnames:[":mo:"],category:"flags"},":flag_mp:":{uc_base:"1f1f2-1f1f5",uc_output:"1f1f2-1f1f5",uc_match:"1f1f2-1f1f5",uc_greedy:"1f1f2-1f1f5",shortnames:[":mp:"],category:"flags"},":flag_mq:":{uc_base:"1f1f2-1f1f6",uc_output:"1f1f2-1f1f6",uc_match:"1f1f2-1f1f6",uc_greedy:"1f1f2-1f1f6",shortnames:[":mq:"],category:"flags"},":flag_mr:":{uc_base:"1f1f2-1f1f7",uc_output:"1f1f2-1f1f7",uc_match:"1f1f2-1f1f7",uc_greedy:"1f1f2-1f1f7",shortnames:[":mr:"],category:"flags"},":flag_ms:":{uc_base:"1f1f2-1f1f8",uc_output:"1f1f2-1f1f8",uc_match:"1f1f2-1f1f8",uc_greedy:"1f1f2-1f1f8",shortnames:[":ms:"],category:"flags"},":flag_mt:":{uc_base:"1f1f2-1f1f9",uc_output:"1f1f2-1f1f9",uc_match:"1f1f2-1f1f9",uc_greedy:"1f1f2-1f1f9",shortnames:[":mt:"],category:"flags"},":flag_mu:":{uc_base:"1f1f2-1f1fa",uc_output:"1f1f2-1f1fa",uc_match:"1f1f2-1f1fa",uc_greedy:"1f1f2-1f1fa",shortnames:[":mu:"],category:"flags"},":flag_mv:":{uc_base:"1f1f2-1f1fb",uc_output:"1f1f2-1f1fb",uc_match:"1f1f2-1f1fb",uc_greedy:"1f1f2-1f1fb",shortnames:[":mv:"],category:"flags"},":flag_mw:":{uc_base:"1f1f2-1f1fc",uc_output:"1f1f2-1f1fc",uc_match:"1f1f2-1f1fc",uc_greedy:"1f1f2-1f1fc",shortnames:[":mw:"],category:"flags"},":flag_mx:":{uc_base:"1f1f2-1f1fd",uc_output:"1f1f2-1f1fd",uc_match:"1f1f2-1f1fd",uc_greedy:"1f1f2-1f1fd",shortnames:[":mx:"],category:"flags"},":flag_my:":{uc_base:"1f1f2-1f1fe",uc_output:"1f1f2-1f1fe",uc_match:"1f1f2-1f1fe",uc_greedy:"1f1f2-1f1fe",shortnames:[":my:"],category:"flags"},":flag_mz:":{uc_base:"1f1f2-1f1ff",uc_output:"1f1f2-1f1ff",uc_match:"1f1f2-1f1ff",uc_greedy:"1f1f2-1f1ff",shortnames:[":mz:"],category:"flags"},":flag_na:":{uc_base:"1f1f3-1f1e6",uc_output:"1f1f3-1f1e6",uc_match:"1f1f3-1f1e6",uc_greedy:"1f1f3-1f1e6",shortnames:[":na:"],category:"flags"},":flag_nc:":{uc_base:"1f1f3-1f1e8",uc_output:"1f1f3-1f1e8",uc_match:"1f1f3-1f1e8",uc_greedy:"1f1f3-1f1e8",shortnames:[":nc:"],category:"flags"},":flag_ne:":{uc_base:"1f1f3-1f1ea",uc_output:"1f1f3-1f1ea",uc_match:"1f1f3-1f1ea",uc_greedy:"1f1f3-1f1ea",shortnames:[":ne:"],category:"flags"},":flag_nf:":{uc_base:"1f1f3-1f1eb",uc_output:"1f1f3-1f1eb",uc_match:"1f1f3-1f1eb",uc_greedy:"1f1f3-1f1eb",shortnames:[":nf:"],category:"flags"},":flag_ng:":{uc_base:"1f1f3-1f1ec",uc_output:"1f1f3-1f1ec",uc_match:"1f1f3-1f1ec",uc_greedy:"1f1f3-1f1ec",shortnames:[":nigeria:"],category:"flags"},":flag_ni:":{uc_base:"1f1f3-1f1ee",uc_output:"1f1f3-1f1ee",uc_match:"1f1f3-1f1ee",uc_greedy:"1f1f3-1f1ee",shortnames:[":ni:"],category:"flags"},":flag_nl:":{uc_base:"1f1f3-1f1f1",uc_output:"1f1f3-1f1f1",uc_match:"1f1f3-1f1f1",uc_greedy:"1f1f3-1f1f1",shortnames:[":nl:"],category:"flags"},":flag_no:":{uc_base:"1f1f3-1f1f4",uc_output:"1f1f3-1f1f4",uc_match:"1f1f3-1f1f4",uc_greedy:"1f1f3-1f1f4",shortnames:[":no:"],category:"flags"},":flag_np:":{uc_base:"1f1f3-1f1f5",uc_output:"1f1f3-1f1f5",uc_match:"1f1f3-1f1f5",uc_greedy:"1f1f3-1f1f5",shortnames:[":np:"],category:"flags"},":flag_nr:":{uc_base:"1f1f3-1f1f7",uc_output:"1f1f3-1f1f7",uc_match:"1f1f3-1f1f7",uc_greedy:"1f1f3-1f1f7",shortnames:[":nr:"],category:"flags"},":flag_nu:":{uc_base:"1f1f3-1f1fa",uc_output:"1f1f3-1f1fa",uc_match:"1f1f3-1f1fa",uc_greedy:"1f1f3-1f1fa",shortnames:[":nu:"],category:"flags"},":flag_nz:":{uc_base:"1f1f3-1f1ff",uc_output:"1f1f3-1f1ff",uc_match:"1f1f3-1f1ff",uc_greedy:"1f1f3-1f1ff",shortnames:[":nz:"],category:"flags"},":flag_om:":{uc_base:"1f1f4-1f1f2",uc_output:"1f1f4-1f1f2",uc_match:"1f1f4-1f1f2",uc_greedy:"1f1f4-1f1f2",shortnames:[":om:"],category:"flags"},":flag_pa:":{uc_base:"1f1f5-1f1e6",uc_output:"1f1f5-1f1e6",uc_match:"1f1f5-1f1e6",uc_greedy:"1f1f5-1f1e6",shortnames:[":pa:"],category:"flags"},":flag_pe:":{uc_base:"1f1f5-1f1ea",uc_output:"1f1f5-1f1ea",uc_match:"1f1f5-1f1ea",uc_greedy:"1f1f5-1f1ea",shortnames:[":pe:"],category:"flags"},":flag_pf:":{uc_base:"1f1f5-1f1eb",uc_output:"1f1f5-1f1eb",uc_match:"1f1f5-1f1eb",uc_greedy:"1f1f5-1f1eb",shortnames:[":pf:"],category:"flags"},":flag_pg:":{uc_base:"1f1f5-1f1ec",uc_output:"1f1f5-1f1ec",uc_match:"1f1f5-1f1ec",uc_greedy:"1f1f5-1f1ec",shortnames:[":pg:"],category:"flags"},":flag_ph:":{uc_base:"1f1f5-1f1ed",uc_output:"1f1f5-1f1ed",uc_match:"1f1f5-1f1ed",uc_greedy:"1f1f5-1f1ed",shortnames:[":ph:"],category:"flags"},":flag_pk:":{uc_base:"1f1f5-1f1f0",uc_output:"1f1f5-1f1f0",uc_match:"1f1f5-1f1f0",uc_greedy:"1f1f5-1f1f0",shortnames:[":pk:"],category:"flags"},":flag_pl:":{uc_base:"1f1f5-1f1f1",uc_output:"1f1f5-1f1f1",uc_match:"1f1f5-1f1f1",uc_greedy:"1f1f5-1f1f1",shortnames:[":pl:"],category:"flags"},":flag_pm:":{uc_base:"1f1f5-1f1f2",uc_output:"1f1f5-1f1f2",uc_match:"1f1f5-1f1f2",uc_greedy:"1f1f5-1f1f2",shortnames:[":pm:"],category:"flags"},":flag_pn:":{uc_base:"1f1f5-1f1f3",uc_output:"1f1f5-1f1f3",uc_match:"1f1f5-1f1f3",uc_greedy:"1f1f5-1f1f3",shortnames:[":pn:"],category:"flags"},":flag_pr:":{uc_base:"1f1f5-1f1f7",uc_output:"1f1f5-1f1f7",uc_match:"1f1f5-1f1f7",uc_greedy:"1f1f5-1f1f7",shortnames:[":pr:"],category:"flags"},":flag_ps:":{uc_base:"1f1f5-1f1f8",uc_output:"1f1f5-1f1f8",uc_match:"1f1f5-1f1f8",uc_greedy:"1f1f5-1f1f8",shortnames:[":ps:"],category:"flags"},":flag_pt:":{uc_base:"1f1f5-1f1f9",uc_output:"1f1f5-1f1f9",uc_match:"1f1f5-1f1f9",uc_greedy:"1f1f5-1f1f9",shortnames:[":pt:"],category:"flags"},":flag_pw:":{uc_base:"1f1f5-1f1fc",uc_output:"1f1f5-1f1fc",uc_match:"1f1f5-1f1fc",uc_greedy:"1f1f5-1f1fc",shortnames:[":pw:"],category:"flags"},":flag_py:":{uc_base:"1f1f5-1f1fe",uc_output:"1f1f5-1f1fe",uc_match:"1f1f5-1f1fe",uc_greedy:"1f1f5-1f1fe",shortnames:[":py:"],category:"flags"},":flag_qa:":{uc_base:"1f1f6-1f1e6",uc_output:"1f1f6-1f1e6",uc_match:"1f1f6-1f1e6",uc_greedy:"1f1f6-1f1e6",shortnames:[":qa:"],category:"flags"},":flag_re:":{uc_base:"1f1f7-1f1ea",uc_output:"1f1f7-1f1ea",uc_match:"1f1f7-1f1ea",uc_greedy:"1f1f7-1f1ea",shortnames:[":re:"],category:"flags"},":flag_ro:":{uc_base:"1f1f7-1f1f4",uc_output:"1f1f7-1f1f4",uc_match:"1f1f7-1f1f4",uc_greedy:"1f1f7-1f1f4",shortnames:[":ro:"],category:"flags"},":flag_rs:":{uc_base:"1f1f7-1f1f8",uc_output:"1f1f7-1f1f8",uc_match:"1f1f7-1f1f8",uc_greedy:"1f1f7-1f1f8",shortnames:[":rs:"],category:"flags"},":flag_ru:":{uc_base:"1f1f7-1f1fa",uc_output:"1f1f7-1f1fa",uc_match:"1f1f7-1f1fa",uc_greedy:"1f1f7-1f1fa",shortnames:[":ru:"],category:"flags"},":flag_rw:":{uc_base:"1f1f7-1f1fc",uc_output:"1f1f7-1f1fc",uc_match:"1f1f7-1f1fc",uc_greedy:"1f1f7-1f1fc",shortnames:[":rw:"],category:"flags"},":flag_sa:":{uc_base:"1f1f8-1f1e6",uc_output:"1f1f8-1f1e6",uc_match:"1f1f8-1f1e6",uc_greedy:"1f1f8-1f1e6",shortnames:[":saudiarabia:",":saudi:"],category:"flags"},":flag_sb:":{uc_base:"1f1f8-1f1e7",uc_output:"1f1f8-1f1e7",uc_match:"1f1f8-1f1e7",uc_greedy:"1f1f8-1f1e7",shortnames:[":sb:"],category:"flags"},":flag_sc:":{uc_base:"1f1f8-1f1e8",uc_output:"1f1f8-1f1e8",uc_match:"1f1f8-1f1e8",uc_greedy:"1f1f8-1f1e8",shortnames:[":sc:"],category:"flags"},":flag_sd:":{uc_base:"1f1f8-1f1e9",uc_output:"1f1f8-1f1e9",uc_match:"1f1f8-1f1e9",uc_greedy:"1f1f8-1f1e9",shortnames:[":sd:"],category:"flags"},":flag_se:":{uc_base:"1f1f8-1f1ea",uc_output:"1f1f8-1f1ea",uc_match:"1f1f8-1f1ea",uc_greedy:"1f1f8-1f1ea",shortnames:[":se:"],category:"flags"},":flag_sg:":{uc_base:"1f1f8-1f1ec",uc_output:"1f1f8-1f1ec",uc_match:"1f1f8-1f1ec",uc_greedy:"1f1f8-1f1ec",shortnames:[":sg:"],category:"flags"},":flag_sh:":{uc_base:"1f1f8-1f1ed",uc_output:"1f1f8-1f1ed",uc_match:"1f1f8-1f1ed",uc_greedy:"1f1f8-1f1ed",shortnames:[":sh:"],category:"flags"},":flag_si:":{uc_base:"1f1f8-1f1ee",uc_output:"1f1f8-1f1ee",uc_match:"1f1f8-1f1ee",uc_greedy:"1f1f8-1f1ee",shortnames:[":si:"],category:"flags"},":flag_sj:":{uc_base:"1f1f8-1f1ef",uc_output:"1f1f8-1f1ef",uc_match:"1f1f8-1f1ef",uc_greedy:"1f1f8-1f1ef",shortnames:[":sj:"],category:"flags"},":flag_sk:":{uc_base:"1f1f8-1f1f0",uc_output:"1f1f8-1f1f0",uc_match:"1f1f8-1f1f0",uc_greedy:"1f1f8-1f1f0",shortnames:[":sk:"],category:"flags"},":flag_sl:":{uc_base:"1f1f8-1f1f1",uc_output:"1f1f8-1f1f1",uc_match:"1f1f8-1f1f1",uc_greedy:"1f1f8-1f1f1",shortnames:[":sl:"],category:"flags"},":flag_sm:":{uc_base:"1f1f8-1f1f2",uc_output:"1f1f8-1f1f2",uc_match:"1f1f8-1f1f2",uc_greedy:"1f1f8-1f1f2",shortnames:[":sm:"],category:"flags"},":flag_sn:":{uc_base:"1f1f8-1f1f3",uc_output:"1f1f8-1f1f3",uc_match:"1f1f8-1f1f3",uc_greedy:"1f1f8-1f1f3",shortnames:[":sn:"],category:"flags"},":flag_so:":{uc_base:"1f1f8-1f1f4",uc_output:"1f1f8-1f1f4",uc_match:"1f1f8-1f1f4",uc_greedy:"1f1f8-1f1f4",shortnames:[":so:"],category:"flags"},":flag_sr:":{uc_base:"1f1f8-1f1f7",uc_output:"1f1f8-1f1f7",uc_match:"1f1f8-1f1f7",uc_greedy:"1f1f8-1f1f7",shortnames:[":sr:"],category:"flags"},":flag_ss:":{uc_base:"1f1f8-1f1f8",uc_output:"1f1f8-1f1f8",uc_match:"1f1f8-1f1f8",uc_greedy:"1f1f8-1f1f8",shortnames:[":ss:"],category:"flags"},":flag_st:":{uc_base:"1f1f8-1f1f9",uc_output:"1f1f8-1f1f9",uc_match:"1f1f8-1f1f9",uc_greedy:"1f1f8-1f1f9",shortnames:[":st:"],category:"flags"},":flag_sv:":{uc_base:"1f1f8-1f1fb",uc_output:"1f1f8-1f1fb",uc_match:"1f1f8-1f1fb",uc_greedy:"1f1f8-1f1fb",shortnames:[":sv:"],category:"flags"},":flag_sx:":{uc_base:"1f1f8-1f1fd",uc_output:"1f1f8-1f1fd",uc_match:"1f1f8-1f1fd",uc_greedy:"1f1f8-1f1fd",shortnames:[":sx:"],category:"flags"},":flag_sy:":{uc_base:"1f1f8-1f1fe",uc_output:"1f1f8-1f1fe",uc_match:"1f1f8-1f1fe",uc_greedy:"1f1f8-1f1fe",shortnames:[":sy:"],category:"flags"},":flag_sz:":{uc_base:"1f1f8-1f1ff",uc_output:"1f1f8-1f1ff",uc_match:"1f1f8-1f1ff",uc_greedy:"1f1f8-1f1ff",shortnames:[":sz:"],category:"flags"},":flag_ta:":{uc_base:"1f1f9-1f1e6",uc_output:"1f1f9-1f1e6",uc_match:"1f1f9-1f1e6",uc_greedy:"1f1f9-1f1e6",shortnames:[":ta:"],category:"flags"},":flag_tc:":{uc_base:"1f1f9-1f1e8",uc_output:"1f1f9-1f1e8",uc_match:"1f1f9-1f1e8",uc_greedy:"1f1f9-1f1e8",shortnames:[":tc:"],category:"flags"},":flag_td:":{uc_base:"1f1f9-1f1e9",uc_output:"1f1f9-1f1e9",uc_match:"1f1f9-1f1e9",uc_greedy:"1f1f9-1f1e9",shortnames:[":td:"],category:"flags"},":flag_tf:":{uc_base:"1f1f9-1f1eb",uc_output:"1f1f9-1f1eb",uc_match:"1f1f9-1f1eb",uc_greedy:"1f1f9-1f1eb",shortnames:[":tf:"],category:"flags"},":flag_tg:":{uc_base:"1f1f9-1f1ec",uc_output:"1f1f9-1f1ec",uc_match:"1f1f9-1f1ec",uc_greedy:"1f1f9-1f1ec",shortnames:[":tg:"],category:"flags"},":flag_th:":{uc_base:"1f1f9-1f1ed",uc_output:"1f1f9-1f1ed",uc_match:"1f1f9-1f1ed",uc_greedy:"1f1f9-1f1ed",shortnames:[":th:"],category:"flags"},":flag_tj:":{uc_base:"1f1f9-1f1ef",uc_output:"1f1f9-1f1ef",uc_match:"1f1f9-1f1ef",uc_greedy:"1f1f9-1f1ef",shortnames:[":tj:"],category:"flags"},":flag_tk:":{uc_base:"1f1f9-1f1f0",uc_output:"1f1f9-1f1f0",uc_match:"1f1f9-1f1f0",uc_greedy:"1f1f9-1f1f0",shortnames:[":tk:"],category:"flags"},":flag_tl:":{uc_base:"1f1f9-1f1f1",uc_output:"1f1f9-1f1f1",uc_match:"1f1f9-1f1f1",uc_greedy:"1f1f9-1f1f1",shortnames:[":tl:"],category:"flags"},":flag_tm:":{uc_base:"1f1f9-1f1f2",uc_output:"1f1f9-1f1f2",uc_match:"1f1f9-1f1f2",uc_greedy:"1f1f9-1f1f2",shortnames:[":turkmenistan:"],category:"flags"},":flag_tn:":{uc_base:"1f1f9-1f1f3",uc_output:"1f1f9-1f1f3",uc_match:"1f1f9-1f1f3",uc_greedy:"1f1f9-1f1f3",shortnames:[":tn:"],category:"flags"},":flag_to:":{uc_base:"1f1f9-1f1f4",uc_output:"1f1f9-1f1f4",uc_match:"1f1f9-1f1f4",uc_greedy:"1f1f9-1f1f4",shortnames:[":to:"],category:"flags"},":flag_tr:":{uc_base:"1f1f9-1f1f7",uc_output:"1f1f9-1f1f7",uc_match:"1f1f9-1f1f7",uc_greedy:"1f1f9-1f1f7",shortnames:[":tr:"],category:"flags"},":flag_tt:":{uc_base:"1f1f9-1f1f9",uc_output:"1f1f9-1f1f9",uc_match:"1f1f9-1f1f9",uc_greedy:"1f1f9-1f1f9",shortnames:[":tt:"],category:"flags"},":flag_tv:":{uc_base:"1f1f9-1f1fb",uc_output:"1f1f9-1f1fb",uc_match:"1f1f9-1f1fb",uc_greedy:"1f1f9-1f1fb",shortnames:[":tuvalu:"],category:"flags"},":flag_tw:":{uc_base:"1f1f9-1f1fc",uc_output:"1f1f9-1f1fc",uc_match:"1f1f9-1f1fc",uc_greedy:"1f1f9-1f1fc",shortnames:[":tw:"],category:"flags"},":flag_tz:":{uc_base:"1f1f9-1f1ff",uc_output:"1f1f9-1f1ff",uc_match:"1f1f9-1f1ff",uc_greedy:"1f1f9-1f1ff",shortnames:[":tz:"],category:"flags"},":flag_ua:":{uc_base:"1f1fa-1f1e6",uc_output:"1f1fa-1f1e6",uc_match:"1f1fa-1f1e6",uc_greedy:"1f1fa-1f1e6",shortnames:[":ua:"],category:"flags"},":flag_ug:":{uc_base:"1f1fa-1f1ec",uc_output:"1f1fa-1f1ec",uc_match:"1f1fa-1f1ec",uc_greedy:"1f1fa-1f1ec",shortnames:[":ug:"],category:"flags"},":flag_um:":{uc_base:"1f1fa-1f1f2",uc_output:"1f1fa-1f1f2",uc_match:"1f1fa-1f1f2",uc_greedy:"1f1fa-1f1f2",shortnames:[":um:"],category:"flags"},":flag_us:":{uc_base:"1f1fa-1f1f8",uc_output:"1f1fa-1f1f8",uc_match:"1f1fa-1f1f8",uc_greedy:"1f1fa-1f1f8",shortnames:[":us:"],category:"flags"},":flag_uy:":{uc_base:"1f1fa-1f1fe",uc_output:"1f1fa-1f1fe",uc_match:"1f1fa-1f1fe",uc_greedy:"1f1fa-1f1fe",shortnames:[":uy:"],category:"flags"},":flag_uz:":{uc_base:"1f1fa-1f1ff",uc_output:"1f1fa-1f1ff",uc_match:"1f1fa-1f1ff",uc_greedy:"1f1fa-1f1ff",shortnames:[":uz:"],category:"flags"},":flag_va:":{uc_base:"1f1fb-1f1e6",uc_output:"1f1fb-1f1e6",uc_match:"1f1fb-1f1e6",uc_greedy:"1f1fb-1f1e6",shortnames:[":va:"],category:"flags"},":flag_vc:":{uc_base:"1f1fb-1f1e8",uc_output:"1f1fb-1f1e8",uc_match:"1f1fb-1f1e8",uc_greedy:"1f1fb-1f1e8",shortnames:[":vc:"],category:"flags"},":flag_ve:":{uc_base:"1f1fb-1f1ea",uc_output:"1f1fb-1f1ea",uc_match:"1f1fb-1f1ea",uc_greedy:"1f1fb-1f1ea",shortnames:[":ve:"],category:"flags"},":flag_vg:":{uc_base:"1f1fb-1f1ec",uc_output:"1f1fb-1f1ec",uc_match:"1f1fb-1f1ec",uc_greedy:"1f1fb-1f1ec",shortnames:[":vg:"],category:"flags"},":flag_vi:":{uc_base:"1f1fb-1f1ee",uc_output:"1f1fb-1f1ee",uc_match:"1f1fb-1f1ee",uc_greedy:"1f1fb-1f1ee",shortnames:[":vi:"],category:"flags"},":flag_vn:":{uc_base:"1f1fb-1f1f3",uc_output:"1f1fb-1f1f3",uc_match:"1f1fb-1f1f3",uc_greedy:"1f1fb-1f1f3",shortnames:[":vn:"],category:"flags"},":flag_vu:":{uc_base:"1f1fb-1f1fa",uc_output:"1f1fb-1f1fa",uc_match:"1f1fb-1f1fa",uc_greedy:"1f1fb-1f1fa",shortnames:[":vu:"],category:"flags"},":flag_wf:":{uc_base:"1f1fc-1f1eb",uc_output:"1f1fc-1f1eb",uc_match:"1f1fc-1f1eb",uc_greedy:"1f1fc-1f1eb",shortnames:[":wf:"],category:"flags"},":flag_ws:":{uc_base:"1f1fc-1f1f8",uc_output:"1f1fc-1f1f8",uc_match:"1f1fc-1f1f8",uc_greedy:"1f1fc-1f1f8",shortnames:[":ws:"],category:"flags"},":flag_xk:":{uc_base:"1f1fd-1f1f0",uc_output:"1f1fd-1f1f0",uc_match:"1f1fd-1f1f0",uc_greedy:"1f1fd-1f1f0",shortnames:[":xk:"],category:"flags"},":flag_ye:":{uc_base:"1f1fe-1f1ea",uc_output:"1f1fe-1f1ea",uc_match:"1f1fe-1f1ea",uc_greedy:"1f1fe-1f1ea",shortnames:[":ye:"],category:"flags"},":flag_yt:":{uc_base:"1f1fe-1f1f9",uc_output:"1f1fe-1f1f9",uc_match:"1f1fe-1f1f9",uc_greedy:"1f1fe-1f1f9",shortnames:[":yt:"],category:"flags"},":flag_za:":{uc_base:"1f1ff-1f1e6",uc_output:"1f1ff-1f1e6",uc_match:"1f1ff-1f1e6",uc_greedy:"1f1ff-1f1e6",shortnames:[":za:"],category:"flags"},":flag_zm:":{uc_base:"1f1ff-1f1f2",uc_output:"1f1ff-1f1f2",uc_match:"1f1ff-1f1f2",uc_greedy:"1f1ff-1f1f2",shortnames:[":zm:"],category:"flags"},":flag_zw:":{uc_base:"1f1ff-1f1fc",uc_output:"1f1ff-1f1fc",uc_match:"1f1ff-1f1fc",uc_greedy:"1f1ff-1f1fc",shortnames:[":zw:"],category:"flags"},":foot_tone1:":{uc_base:"1f9b6-1f3fb",uc_output:"1f9b6-1f3fb",uc_match:"1f9b6-1f3fb",uc_greedy:"1f9b6-1f3fb",shortnames:[":foot_light_skin_tone:"],category:"people"},":foot_tone2:":{uc_base:"1f9b6-1f3fc",uc_output:"1f9b6-1f3fc",uc_match:"1f9b6-1f3fc",uc_greedy:"1f9b6-1f3fc",shortnames:[":foot_medium_light_skin_tone:"],category:"people"},":foot_tone3:":{uc_base:"1f9b6-1f3fd",uc_output:"1f9b6-1f3fd",uc_match:"1f9b6-1f3fd",uc_greedy:"1f9b6-1f3fd",shortnames:[":foot_medium_skin_tone:"],category:"people"},":foot_tone4:":{uc_base:"1f9b6-1f3fe",uc_output:"1f9b6-1f3fe",uc_match:"1f9b6-1f3fe",uc_greedy:"1f9b6-1f3fe",shortnames:[":foot_medium_dark_skin_tone:"],category:"people"},":foot_tone5:":{uc_base:"1f9b6-1f3ff",uc_output:"1f9b6-1f3ff",uc_match:"1f9b6-1f3ff",uc_greedy:"1f9b6-1f3ff",shortnames:[":foot_dark_skin_tone:"],category:"people"},":girl_tone1:":{uc_base:"1f467-1f3fb",uc_output:"1f467-1f3fb",uc_match:"1f467-1f3fb",uc_greedy:"1f467-1f3fb",shortnames:[],category:"people"},":girl_tone2:":{uc_base:"1f467-1f3fc",uc_output:"1f467-1f3fc",uc_match:"1f467-1f3fc",uc_greedy:"1f467-1f3fc",shortnames:[],category:"people"},":girl_tone3:":{uc_base:"1f467-1f3fd",uc_output:"1f467-1f3fd",uc_match:"1f467-1f3fd",uc_greedy:"1f467-1f3fd",shortnames:[],category:"people"},":girl_tone4:":{uc_base:"1f467-1f3fe",uc_output:"1f467-1f3fe",uc_match:"1f467-1f3fe",uc_greedy:"1f467-1f3fe",shortnames:[],category:"people"},":girl_tone5:":{uc_base:"1f467-1f3ff",uc_output:"1f467-1f3ff",uc_match:"1f467-1f3ff",uc_greedy:"1f467-1f3ff",shortnames:[],category:"people"},":guard_tone1:":{uc_base:"1f482-1f3fb",uc_output:"1f482-1f3fb",uc_match:"1f482-1f3fb",uc_greedy:"1f482-1f3fb",shortnames:[":guardsman_tone1:"],category:"people"},":guard_tone2:":{uc_base:"1f482-1f3fc",uc_output:"1f482-1f3fc",uc_match:"1f482-1f3fc",uc_greedy:"1f482-1f3fc",shortnames:[":guardsman_tone2:"],category:"people"},":guard_tone3:":{uc_base:"1f482-1f3fd",uc_output:"1f482-1f3fd",uc_match:"1f482-1f3fd",uc_greedy:"1f482-1f3fd",shortnames:[":guardsman_tone3:"],category:"people"},":guard_tone4:":{uc_base:"1f482-1f3fe",uc_output:"1f482-1f3fe",uc_match:"1f482-1f3fe",uc_greedy:"1f482-1f3fe",shortnames:[":guardsman_tone4:"],category:"people"},":guard_tone5:":{uc_base:"1f482-1f3ff",uc_output:"1f482-1f3ff",uc_match:"1f482-1f3ff",uc_greedy:"1f482-1f3ff",shortnames:[":guardsman_tone5:"],category:"people"},":hand_splayed_tone1:":{uc_base:"1f590-1f3fb",uc_output:"1f590-1f3fb",uc_match:"1f590-fe0f-1f3fb",uc_greedy:"1f590-fe0f-1f3fb",shortnames:[":raised_hand_with_fingers_splayed_tone1:"],category:"people"},":hand_splayed_tone2:":{uc_base:"1f590-1f3fc",uc_output:"1f590-1f3fc",uc_match:"1f590-fe0f-1f3fc",uc_greedy:"1f590-fe0f-1f3fc",shortnames:[":raised_hand_with_fingers_splayed_tone2:"],category:"people"},":hand_splayed_tone3:":{uc_base:"1f590-1f3fd",uc_output:"1f590-1f3fd",uc_match:"1f590-fe0f-1f3fd",uc_greedy:"1f590-fe0f-1f3fd",shortnames:[":raised_hand_with_fingers_splayed_tone3:"],category:"people"},":hand_splayed_tone4:":{uc_base:"1f590-1f3fe",uc_output:"1f590-1f3fe",uc_match:"1f590-fe0f-1f3fe",uc_greedy:"1f590-fe0f-1f3fe",shortnames:[":raised_hand_with_fingers_splayed_tone4:"],category:"people"},":hand_splayed_tone5:":{uc_base:"1f590-1f3ff",uc_output:"1f590-1f3ff",uc_match:"1f590-fe0f-1f3ff",uc_greedy:"1f590-fe0f-1f3ff",shortnames:[":raised_hand_with_fingers_splayed_tone5:"],category:"people"},":horse_racing_tone1:":{uc_base:"1f3c7-1f3fb",uc_output:"1f3c7-1f3fb",uc_match:"1f3c7-1f3fb",uc_greedy:"1f3c7-1f3fb",shortnames:[],category:"activity"},":horse_racing_tone2:":{uc_base:"1f3c7-1f3fc",uc_output:"1f3c7-1f3fc",uc_match:"1f3c7-1f3fc",uc_greedy:"1f3c7-1f3fc",shortnames:[],category:"activity"},":horse_racing_tone3:":{uc_base:"1f3c7-1f3fd",uc_output:"1f3c7-1f3fd",uc_match:"1f3c7-1f3fd",uc_greedy:"1f3c7-1f3fd",shortnames:[],category:"activity"},":horse_racing_tone4:":{uc_base:"1f3c7-1f3fe",uc_output:"1f3c7-1f3fe",uc_match:"1f3c7-1f3fe",uc_greedy:"1f3c7-1f3fe",shortnames:[],category:"activity"},":horse_racing_tone5:":{uc_base:"1f3c7-1f3ff",uc_output:"1f3c7-1f3ff",uc_match:"1f3c7-1f3ff",uc_greedy:"1f3c7-1f3ff",shortnames:[],category:"activity"},":left_facing_fist_tone1:":{uc_base:"1f91b-1f3fb",uc_output:"1f91b-1f3fb",uc_match:"1f91b-1f3fb",uc_greedy:"1f91b-1f3fb",shortnames:[":left_fist_tone1:"],category:"people"},":left_facing_fist_tone2:":{uc_base:"1f91b-1f3fc",uc_output:"1f91b-1f3fc",uc_match:"1f91b-1f3fc",uc_greedy:"1f91b-1f3fc",shortnames:[":left_fist_tone2:"],category:"people"},":left_facing_fist_tone3:":{uc_base:"1f91b-1f3fd",uc_output:"1f91b-1f3fd",uc_match:"1f91b-1f3fd",uc_greedy:"1f91b-1f3fd",shortnames:[":left_fist_tone3:"],category:"people"},":left_facing_fist_tone4:":{uc_base:"1f91b-1f3fe",uc_output:"1f91b-1f3fe",uc_match:"1f91b-1f3fe",uc_greedy:"1f91b-1f3fe",shortnames:[":left_fist_tone4:"],category:"people"},":left_facing_fist_tone5:":{uc_base:"1f91b-1f3ff",uc_output:"1f91b-1f3ff",uc_match:"1f91b-1f3ff",uc_greedy:"1f91b-1f3ff",shortnames:[":left_fist_tone5:"],category:"people"},":leg_tone1:":{uc_base:"1f9b5-1f3fb",uc_output:"1f9b5-1f3fb",uc_match:"1f9b5-1f3fb",uc_greedy:"1f9b5-1f3fb",shortnames:[":leg_light_skin_tone:"],category:"people"},":leg_tone2:":{uc_base:"1f9b5-1f3fc",uc_output:"1f9b5-1f3fc",uc_match:"1f9b5-1f3fc",uc_greedy:"1f9b5-1f3fc",shortnames:[":leg_medium_light_skin_tone:"],category:"people"},":leg_tone3:":{uc_base:"1f9b5-1f3fd",uc_output:"1f9b5-1f3fd",uc_match:"1f9b5-1f3fd",uc_greedy:"1f9b5-1f3fd",shortnames:[":leg_medium_skin_tone:"],category:"people"},":leg_tone4:":{uc_base:"1f9b5-1f3fe",uc_output:"1f9b5-1f3fe",uc_match:"1f9b5-1f3fe",uc_greedy:"1f9b5-1f3fe",shortnames:[":leg_medium_dark_skin_tone:"],category:"people"},":leg_tone5:":{uc_base:"1f9b5-1f3ff",uc_output:"1f9b5-1f3ff",uc_match:"1f9b5-1f3ff",uc_greedy:"1f9b5-1f3ff",shortnames:[":leg_dark_skin_tone:"],category:"people"},":levitate_tone1:":{uc_base:"1f574-1f3fb",uc_output:"1f574-1f3fb",uc_match:"1f574-fe0f-1f3fb",uc_greedy:"1f574-fe0f-1f3fb",shortnames:[":man_in_business_suit_levitating_tone1:",":man_in_business_suit_levitating_light_skin_tone:"],category:"people"},":levitate_tone2:":{uc_base:"1f574-1f3fc",uc_output:"1f574-1f3fc",uc_match:"1f574-fe0f-1f3fc",uc_greedy:"1f574-fe0f-1f3fc",shortnames:[":man_in_business_suit_levitating_tone2:",":man_in_business_suit_levitating_medium_light_skin_tone:"],category:"people"},":levitate_tone3:":{uc_base:"1f574-1f3fd",uc_output:"1f574-1f3fd",uc_match:"1f574-fe0f-1f3fd",uc_greedy:"1f574-fe0f-1f3fd",shortnames:[":man_in_business_suit_levitating_tone3:",":man_in_business_suit_levitating_medium_skin_tone:"],category:"people"},":levitate_tone4:":{uc_base:"1f574-1f3fe",uc_output:"1f574-1f3fe",uc_match:"1f574-fe0f-1f3fe",uc_greedy:"1f574-fe0f-1f3fe",shortnames:[":man_in_business_suit_levitating_tone4:",":man_in_business_suit_levitating_medium_dark_skin_tone:"],category:"people"},":levitate_tone5:":{uc_base:"1f574-1f3ff",uc_output:"1f574-1f3ff",uc_match:"1f574-fe0f-1f3ff",uc_greedy:"1f574-fe0f-1f3ff",shortnames:[":man_in_business_suit_levitating_tone5:",":man_in_business_suit_levitating_dark_skin_tone:"],category:"people"},":love_you_gesture_tone1:":{uc_base:"1f91f-1f3fb",uc_output:"1f91f-1f3fb",uc_match:"1f91f-1f3fb",uc_greedy:"1f91f-1f3fb",shortnames:[":love_you_gesture_light_skin_tone:"],category:"people"},":love_you_gesture_tone2:":{uc_base:"1f91f-1f3fc",uc_output:"1f91f-1f3fc",uc_match:"1f91f-1f3fc",uc_greedy:"1f91f-1f3fc",shortnames:[":love_you_gesture_medium_light_skin_tone:"],category:"people"},":love_you_gesture_tone3:":{uc_base:"1f91f-1f3fd",uc_output:"1f91f-1f3fd",uc_match:"1f91f-1f3fd",uc_greedy:"1f91f-1f3fd",shortnames:[":love_you_gesture_medium_skin_tone:"],category:"people"},":love_you_gesture_tone4:":{uc_base:"1f91f-1f3fe",uc_output:"1f91f-1f3fe",uc_match:"1f91f-1f3fe",uc_greedy:"1f91f-1f3fe",shortnames:[":love_you_gesture_medium_dark_skin_tone:"],category:"people"},":love_you_gesture_tone5:":{uc_base:"1f91f-1f3ff",uc_output:"1f91f-1f3ff",uc_match:"1f91f-1f3ff",uc_greedy:"1f91f-1f3ff",shortnames:[":love_you_gesture_dark_skin_tone:"],category:"people"},":mage_tone1:":{uc_base:"1f9d9-1f3fb",uc_output:"1f9d9-1f3fb",uc_match:"1f9d9-1f3fb",uc_greedy:"1f9d9-1f3fb",shortnames:[":mage_light_skin_tone:"],category:"people"},":mage_tone2:":{uc_base:"1f9d9-1f3fc",uc_output:"1f9d9-1f3fc",uc_match:"1f9d9-1f3fc",uc_greedy:"1f9d9-1f3fc",shortnames:[":mage_medium_light_skin_tone:"],category:"people"},":mage_tone3:":{uc_base:"1f9d9-1f3fd",uc_output:"1f9d9-1f3fd",uc_match:"1f9d9-1f3fd",uc_greedy:"1f9d9-1f3fd",shortnames:[":mage_medium_skin_tone:"],category:"people"},":mage_tone4:":{uc_base:"1f9d9-1f3fe",uc_output:"1f9d9-1f3fe",uc_match:"1f9d9-1f3fe",uc_greedy:"1f9d9-1f3fe",shortnames:[":mage_medium_dark_skin_tone:"],category:"people"},":mage_tone5:":{uc_base:"1f9d9-1f3ff",uc_output:"1f9d9-1f3ff",uc_match:"1f9d9-1f3ff",uc_greedy:"1f9d9-1f3ff",shortnames:[":mage_dark_skin_tone:"],category:"people"},":man_dancing_tone1:":{uc_base:"1f57a-1f3fb",uc_output:"1f57a-1f3fb",uc_match:"1f57a-1f3fb",uc_greedy:"1f57a-1f3fb",shortnames:[":male_dancer_tone1:"],category:"people"},":man_dancing_tone2:":{uc_base:"1f57a-1f3fc",uc_output:"1f57a-1f3fc",uc_match:"1f57a-1f3fc",uc_greedy:"1f57a-1f3fc",shortnames:[":male_dancer_tone2:"],category:"people"},":man_dancing_tone3:":{uc_base:"1f57a-1f3fd",uc_output:"1f57a-1f3fd",uc_match:"1f57a-1f3fd",uc_greedy:"1f57a-1f3fd",shortnames:[":male_dancer_tone3:"],category:"people"},":man_dancing_tone4:":{uc_base:"1f57a-1f3fe",uc_output:"1f57a-1f3fe",uc_match:"1f57a-1f3fe",uc_greedy:"1f57a-1f3fe",shortnames:[":male_dancer_tone4:"],category:"people"},":man_dancing_tone5:":{uc_base:"1f57a-1f3ff",uc_output:"1f57a-1f3ff",uc_match:"1f57a-1f3ff",uc_greedy:"1f57a-1f3ff",shortnames:[":male_dancer_tone5:"],category:"people"},":man_in_tuxedo_tone1:":{uc_base:"1f935-1f3fb",uc_output:"1f935-1f3fb",uc_match:"1f935-1f3fb",uc_greedy:"1f935-1f3fb",shortnames:[":tuxedo_tone1:"],category:"people"},":man_in_tuxedo_tone2:":{uc_base:"1f935-1f3fc",uc_output:"1f935-1f3fc",uc_match:"1f935-1f3fc",uc_greedy:"1f935-1f3fc",shortnames:[":tuxedo_tone2:"],category:"people"},":man_in_tuxedo_tone3:":{uc_base:"1f935-1f3fd",uc_output:"1f935-1f3fd",uc_match:"1f935-1f3fd",uc_greedy:"1f935-1f3fd",shortnames:[":tuxedo_tone3:"],category:"people"},":man_in_tuxedo_tone4:":{uc_base:"1f935-1f3fe",uc_output:"1f935-1f3fe",uc_match:"1f935-1f3fe",uc_greedy:"1f935-1f3fe",shortnames:[":tuxedo_tone4:"],category:"people"},":man_in_tuxedo_tone5:":{uc_base:"1f935-1f3ff",uc_output:"1f935-1f3ff",uc_match:"1f935-1f3ff",uc_greedy:"1f935-1f3ff",shortnames:[":tuxedo_tone5:"],category:"people"},":man_tone1:":{uc_base:"1f468-1f3fb",uc_output:"1f468-1f3fb",uc_match:"1f468-1f3fb",uc_greedy:"1f468-1f3fb",shortnames:[],category:"people"},":man_tone2:":{uc_base:"1f468-1f3fc",uc_output:"1f468-1f3fc",uc_match:"1f468-1f3fc",uc_greedy:"1f468-1f3fc",shortnames:[],category:"people"},":man_tone3:":{uc_base:"1f468-1f3fd",uc_output:"1f468-1f3fd",uc_match:"1f468-1f3fd",uc_greedy:"1f468-1f3fd",shortnames:[],category:"people"},":man_tone4:":{uc_base:"1f468-1f3fe",uc_output:"1f468-1f3fe",uc_match:"1f468-1f3fe",uc_greedy:"1f468-1f3fe",shortnames:[],category:"people"},":man_tone5:":{uc_base:"1f468-1f3ff",uc_output:"1f468-1f3ff",uc_match:"1f468-1f3ff",uc_greedy:"1f468-1f3ff",shortnames:[],category:"people"},":man_with_chinese_cap_tone1:":{uc_base:"1f472-1f3fb",uc_output:"1f472-1f3fb",uc_match:"1f472-1f3fb",uc_greedy:"1f472-1f3fb",shortnames:[":man_with_gua_pi_mao_tone1:"],category:"people"},":man_with_chinese_cap_tone2:":{uc_base:"1f472-1f3fc",uc_output:"1f472-1f3fc",uc_match:"1f472-1f3fc",uc_greedy:"1f472-1f3fc",shortnames:[":man_with_gua_pi_mao_tone2:"],category:"people"},":man_with_chinese_cap_tone3:":{uc_base:"1f472-1f3fd",uc_output:"1f472-1f3fd",uc_match:"1f472-1f3fd",uc_greedy:"1f472-1f3fd",shortnames:[":man_with_gua_pi_mao_tone3:"],category:"people"},":man_with_chinese_cap_tone4:":{uc_base:"1f472-1f3fe",uc_output:"1f472-1f3fe",uc_match:"1f472-1f3fe",uc_greedy:"1f472-1f3fe",shortnames:[":man_with_gua_pi_mao_tone4:"],category:"people"},":man_with_chinese_cap_tone5:":{uc_base:"1f472-1f3ff",uc_output:"1f472-1f3ff",uc_match:"1f472-1f3ff",uc_greedy:"1f472-1f3ff",shortnames:[":man_with_gua_pi_mao_tone5:"],category:"people"},":merperson_tone1:":{uc_base:"1f9dc-1f3fb",uc_output:"1f9dc-1f3fb",uc_match:"1f9dc-1f3fb",uc_greedy:"1f9dc-1f3fb",shortnames:[":merperson_light_skin_tone:"],category:"people"},":merperson_tone2:":{uc_base:"1f9dc-1f3fc",uc_output:"1f9dc-1f3fc",uc_match:"1f9dc-1f3fc",uc_greedy:"1f9dc-1f3fc",shortnames:[":merperson_medium_light_skin_tone:"],category:"people"},":merperson_tone3:":{uc_base:"1f9dc-1f3fd",uc_output:"1f9dc-1f3fd",uc_match:"1f9dc-1f3fd",uc_greedy:"1f9dc-1f3fd",shortnames:[":merperson_medium_skin_tone:"],category:"people"},":merperson_tone4:":{uc_base:"1f9dc-1f3fe",uc_output:"1f9dc-1f3fe",uc_match:"1f9dc-1f3fe",uc_greedy:"1f9dc-1f3fe",shortnames:[":merperson_medium_dark_skin_tone:"],category:"people"},":merperson_tone5:":{uc_base:"1f9dc-1f3ff",uc_output:"1f9dc-1f3ff",uc_match:"1f9dc-1f3ff",uc_greedy:"1f9dc-1f3ff",shortnames:[":merperson_dark_skin_tone:"],category:"people"},":metal_tone1:":{uc_base:"1f918-1f3fb",uc_output:"1f918-1f3fb",uc_match:"1f918-1f3fb",uc_greedy:"1f918-1f3fb",shortnames:[":sign_of_the_horns_tone1:"],category:"people"},":metal_tone2:":{uc_base:"1f918-1f3fc",uc_output:"1f918-1f3fc",uc_match:"1f918-1f3fc",uc_greedy:"1f918-1f3fc",shortnames:[":sign_of_the_horns_tone2:"],category:"people"},":metal_tone3:":{uc_base:"1f918-1f3fd",uc_output:"1f918-1f3fd",uc_match:"1f918-1f3fd",uc_greedy:"1f918-1f3fd",shortnames:[":sign_of_the_horns_tone3:"],category:"people"},":metal_tone4:":{uc_base:"1f918-1f3fe",uc_output:"1f918-1f3fe",uc_match:"1f918-1f3fe",uc_greedy:"1f918-1f3fe",shortnames:[":sign_of_the_horns_tone4:"],category:"people"},":metal_tone5:":{uc_base:"1f918-1f3ff",uc_output:"1f918-1f3ff",uc_match:"1f918-1f3ff",uc_greedy:"1f918-1f3ff",shortnames:[":sign_of_the_horns_tone5:"],category:"people"},":middle_finger_tone1:":{uc_base:"1f595-1f3fb",uc_output:"1f595-1f3fb",uc_match:"1f595-1f3fb",uc_greedy:"1f595-1f3fb",shortnames:[":reversed_hand_with_middle_finger_extended_tone1:"],category:"people"},":middle_finger_tone2:":{uc_base:"1f595-1f3fc",uc_output:"1f595-1f3fc",uc_match:"1f595-1f3fc",uc_greedy:"1f595-1f3fc",shortnames:[":reversed_hand_with_middle_finger_extended_tone2:"],category:"people"},":middle_finger_tone3:":{uc_base:"1f595-1f3fd",uc_output:"1f595-1f3fd",uc_match:"1f595-1f3fd",uc_greedy:"1f595-1f3fd",shortnames:[":reversed_hand_with_middle_finger_extended_tone3:"],category:"people"},":middle_finger_tone4:":{uc_base:"1f595-1f3fe",uc_output:"1f595-1f3fe",uc_match:"1f595-1f3fe",uc_greedy:"1f595-1f3fe",shortnames:[":reversed_hand_with_middle_finger_extended_tone4:"],category:"people"},":middle_finger_tone5:":{uc_base:"1f595-1f3ff",uc_output:"1f595-1f3ff",uc_match:"1f595-1f3ff",uc_greedy:"1f595-1f3ff",shortnames:[":reversed_hand_with_middle_finger_extended_tone5:"],category:"people"},":mrs_claus_tone1:":{uc_base:"1f936-1f3fb",uc_output:"1f936-1f3fb",uc_match:"1f936-1f3fb",uc_greedy:"1f936-1f3fb",shortnames:[":mother_christmas_tone1:"],category:"people"},":mrs_claus_tone2:":{uc_base:"1f936-1f3fc",uc_output:"1f936-1f3fc",uc_match:"1f936-1f3fc",uc_greedy:"1f936-1f3fc",shortnames:[":mother_christmas_tone2:"],category:"people"},":mrs_claus_tone3:":{uc_base:"1f936-1f3fd",uc_output:"1f936-1f3fd",uc_match:"1f936-1f3fd",uc_greedy:"1f936-1f3fd",shortnames:[":mother_christmas_tone3:"],category:"people"},":mrs_claus_tone4:":{uc_base:"1f936-1f3fe",uc_output:"1f936-1f3fe",uc_match:"1f936-1f3fe",uc_greedy:"1f936-1f3fe",shortnames:[":mother_christmas_tone4:"],category:"people"},":mrs_claus_tone5:":{uc_base:"1f936-1f3ff",uc_output:"1f936-1f3ff",uc_match:"1f936-1f3ff",uc_greedy:"1f936-1f3ff",shortnames:[":mother_christmas_tone5:"],category:"people"},":muscle_tone1:":{uc_base:"1f4aa-1f3fb",uc_output:"1f4aa-1f3fb",uc_match:"1f4aa-1f3fb",uc_greedy:"1f4aa-1f3fb",shortnames:[],category:"people"},":muscle_tone2:":{uc_base:"1f4aa-1f3fc",uc_output:"1f4aa-1f3fc",uc_match:"1f4aa-1f3fc",uc_greedy:"1f4aa-1f3fc",shortnames:[],category:"people"},":muscle_tone3:":{uc_base:"1f4aa-1f3fd",uc_output:"1f4aa-1f3fd",uc_match:"1f4aa-1f3fd",uc_greedy:"1f4aa-1f3fd",shortnames:[],category:"people"},":muscle_tone4:":{uc_base:"1f4aa-1f3fe",uc_output:"1f4aa-1f3fe",uc_match:"1f4aa-1f3fe",uc_greedy:"1f4aa-1f3fe",shortnames:[],category:"people"},":muscle_tone5:":{uc_base:"1f4aa-1f3ff",uc_output:"1f4aa-1f3ff",uc_match:"1f4aa-1f3ff",uc_greedy:"1f4aa-1f3ff",shortnames:[],category:"people"},":nail_care_tone1:":{uc_base:"1f485-1f3fb",uc_output:"1f485-1f3fb",uc_match:"1f485-1f3fb",uc_greedy:"1f485-1f3fb",shortnames:[],category:"people"},":nail_care_tone2:":{uc_base:"1f485-1f3fc",uc_output:"1f485-1f3fc",uc_match:"1f485-1f3fc",uc_greedy:"1f485-1f3fc",shortnames:[],category:"people"},":nail_care_tone3:":{uc_base:"1f485-1f3fd",uc_output:"1f485-1f3fd",uc_match:"1f485-1f3fd",uc_greedy:"1f485-1f3fd",shortnames:[],category:"people"},":nail_care_tone4:":{uc_base:"1f485-1f3fe",uc_output:"1f485-1f3fe",uc_match:"1f485-1f3fe",uc_greedy:"1f485-1f3fe",shortnames:[],category:"people"},":nail_care_tone5:":{uc_base:"1f485-1f3ff",uc_output:"1f485-1f3ff",uc_match:"1f485-1f3ff",uc_greedy:"1f485-1f3ff",shortnames:[],category:"people"},":nose_tone1:":{uc_base:"1f443-1f3fb",uc_output:"1f443-1f3fb",uc_match:"1f443-1f3fb",uc_greedy:"1f443-1f3fb",shortnames:[],category:"people"},":nose_tone2:":{uc_base:"1f443-1f3fc",uc_output:"1f443-1f3fc",uc_match:"1f443-1f3fc",uc_greedy:"1f443-1f3fc",shortnames:[],category:"people"},":nose_tone3:":{uc_base:"1f443-1f3fd",uc_output:"1f443-1f3fd",uc_match:"1f443-1f3fd",uc_greedy:"1f443-1f3fd",shortnames:[],category:"people"},":nose_tone4:":{uc_base:"1f443-1f3fe",uc_output:"1f443-1f3fe",uc_match:"1f443-1f3fe",uc_greedy:"1f443-1f3fe",shortnames:[],category:"people"},":nose_tone5:":{uc_base:"1f443-1f3ff",uc_output:"1f443-1f3ff",uc_match:"1f443-1f3ff",uc_greedy:"1f443-1f3ff",shortnames:[],category:"people"},":ok_hand_tone1:":{uc_base:"1f44c-1f3fb",uc_output:"1f44c-1f3fb",uc_match:"1f44c-1f3fb",uc_greedy:"1f44c-1f3fb",shortnames:[],category:"people"},":ok_hand_tone2:":{uc_base:"1f44c-1f3fc",uc_output:"1f44c-1f3fc",uc_match:"1f44c-1f3fc",uc_greedy:"1f44c-1f3fc",shortnames:[],category:"people"},":ok_hand_tone3:":{uc_base:"1f44c-1f3fd",uc_output:"1f44c-1f3fd",uc_match:"1f44c-1f3fd",uc_greedy:"1f44c-1f3fd",shortnames:[],category:"people"},":ok_hand_tone4:":{uc_base:"1f44c-1f3fe",uc_output:"1f44c-1f3fe",uc_match:"1f44c-1f3fe",uc_greedy:"1f44c-1f3fe",shortnames:[],category:"people"},":ok_hand_tone5:":{uc_base:"1f44c-1f3ff",uc_output:"1f44c-1f3ff",uc_match:"1f44c-1f3ff",uc_greedy:"1f44c-1f3ff",shortnames:[],category:"people"},":older_adult_tone1:":{uc_base:"1f9d3-1f3fb",uc_output:"1f9d3-1f3fb",uc_match:"1f9d3-1f3fb",uc_greedy:"1f9d3-1f3fb",shortnames:[":older_adult_light_skin_tone:"],category:"people"},":older_adult_tone2:":{uc_base:"1f9d3-1f3fc",uc_output:"1f9d3-1f3fc",uc_match:"1f9d3-1f3fc",uc_greedy:"1f9d3-1f3fc",shortnames:[":older_adult_medium_light_skin_tone:"],category:"people"},":older_adult_tone3:":{uc_base:"1f9d3-1f3fd",uc_output:"1f9d3-1f3fd",uc_match:"1f9d3-1f3fd",uc_greedy:"1f9d3-1f3fd",shortnames:[":older_adult_medium_skin_tone:"],category:"people"},":older_adult_tone4:":{uc_base:"1f9d3-1f3fe",uc_output:"1f9d3-1f3fe",uc_match:"1f9d3-1f3fe",uc_greedy:"1f9d3-1f3fe",shortnames:[":older_adult_medium_dark_skin_tone:"],category:"people"},":older_adult_tone5:":{uc_base:"1f9d3-1f3ff",uc_output:"1f9d3-1f3ff",uc_match:"1f9d3-1f3ff",uc_greedy:"1f9d3-1f3ff",shortnames:[":older_adult_dark_skin_tone:"],category:"people"},":older_man_tone1:":{uc_base:"1f474-1f3fb",uc_output:"1f474-1f3fb",uc_match:"1f474-1f3fb",uc_greedy:"1f474-1f3fb",shortnames:[],category:"people"},":older_man_tone2:":{uc_base:"1f474-1f3fc",uc_output:"1f474-1f3fc",uc_match:"1f474-1f3fc",uc_greedy:"1f474-1f3fc",shortnames:[],category:"people"},":older_man_tone3:":{uc_base:"1f474-1f3fd",uc_output:"1f474-1f3fd",uc_match:"1f474-1f3fd",uc_greedy:"1f474-1f3fd",shortnames:[],category:"people"},":older_man_tone4:":{uc_base:"1f474-1f3fe",uc_output:"1f474-1f3fe",uc_match:"1f474-1f3fe",uc_greedy:"1f474-1f3fe",shortnames:[],category:"people"},":older_man_tone5:":{uc_base:"1f474-1f3ff",uc_output:"1f474-1f3ff",uc_match:"1f474-1f3ff",uc_greedy:"1f474-1f3ff",shortnames:[],category:"people"},":older_woman_tone1:":{uc_base:"1f475-1f3fb",uc_output:"1f475-1f3fb",uc_match:"1f475-1f3fb",uc_greedy:"1f475-1f3fb",shortnames:[":grandma_tone1:"],category:"people"},":older_woman_tone2:":{uc_base:"1f475-1f3fc",uc_output:"1f475-1f3fc",uc_match:"1f475-1f3fc",uc_greedy:"1f475-1f3fc",shortnames:[":grandma_tone2:"],category:"people"},":older_woman_tone3:":{uc_base:"1f475-1f3fd",uc_output:"1f475-1f3fd",uc_match:"1f475-1f3fd",uc_greedy:"1f475-1f3fd",shortnames:[":grandma_tone3:"],category:"people"},":older_woman_tone4:":{uc_base:"1f475-1f3fe",uc_output:"1f475-1f3fe",uc_match:"1f475-1f3fe",uc_greedy:"1f475-1f3fe",shortnames:[":grandma_tone4:"],category:"people"},":older_woman_tone5:":{uc_base:"1f475-1f3ff",uc_output:"1f475-1f3ff",uc_match:"1f475-1f3ff",uc_greedy:"1f475-1f3ff",shortnames:[":grandma_tone5:"],category:"people"},":open_hands_tone1:":{uc_base:"1f450-1f3fb",uc_output:"1f450-1f3fb",uc_match:"1f450-1f3fb",uc_greedy:"1f450-1f3fb",shortnames:[],category:"people"},":open_hands_tone2:":{uc_base:"1f450-1f3fc",uc_output:"1f450-1f3fc",uc_match:"1f450-1f3fc",uc_greedy:"1f450-1f3fc",shortnames:[],category:"people"},":open_hands_tone3:":{uc_base:"1f450-1f3fd",uc_output:"1f450-1f3fd",uc_match:"1f450-1f3fd",uc_greedy:"1f450-1f3fd",shortnames:[],category:"people"},":open_hands_tone4:":{uc_base:"1f450-1f3fe",uc_output:"1f450-1f3fe",uc_match:"1f450-1f3fe",uc_greedy:"1f450-1f3fe",shortnames:[],category:"people"},":open_hands_tone5:":{uc_base:"1f450-1f3ff",uc_output:"1f450-1f3ff",uc_match:"1f450-1f3ff",uc_greedy:"1f450-1f3ff",shortnames:[],category:"people"},":palms_up_together_tone1:":{uc_base:"1f932-1f3fb",uc_output:"1f932-1f3fb",uc_match:"1f932-1f3fb",uc_greedy:"1f932-1f3fb",shortnames:[":palms_up_together_light_skin_tone:"],category:"people"},":palms_up_together_tone2:":{uc_base:"1f932-1f3fc",uc_output:"1f932-1f3fc",uc_match:"1f932-1f3fc",uc_greedy:"1f932-1f3fc",shortnames:[":palms_up_together_medium_light_skin_tone:"],category:"people"},":palms_up_together_tone3:":{uc_base:"1f932-1f3fd",uc_output:"1f932-1f3fd",uc_match:"1f932-1f3fd",uc_greedy:"1f932-1f3fd",shortnames:[":palms_up_together_medium_skin_tone:"],category:"people"},":palms_up_together_tone4:":{uc_base:"1f932-1f3fe",uc_output:"1f932-1f3fe",uc_match:"1f932-1f3fe",uc_greedy:"1f932-1f3fe",shortnames:[":palms_up_together_medium_dark_skin_tone:"],category:"people"},":palms_up_together_tone5:":{uc_base:"1f932-1f3ff",uc_output:"1f932-1f3ff",uc_match:"1f932-1f3ff",uc_greedy:"1f932-1f3ff",shortnames:[":palms_up_together_dark_skin_tone:"],category:"people"},":person_biking_tone1:":{uc_base:"1f6b4-1f3fb",uc_output:"1f6b4-1f3fb",uc_match:"1f6b4-1f3fb",uc_greedy:"1f6b4-1f3fb",shortnames:[":bicyclist_tone1:"],category:"activity"},":person_biking_tone2:":{uc_base:"1f6b4-1f3fc",uc_output:"1f6b4-1f3fc",uc_match:"1f6b4-1f3fc",uc_greedy:"1f6b4-1f3fc",shortnames:[":bicyclist_tone2:"],category:"activity"},":person_biking_tone3:":{uc_base:"1f6b4-1f3fd",uc_output:"1f6b4-1f3fd",uc_match:"1f6b4-1f3fd",uc_greedy:"1f6b4-1f3fd",shortnames:[":bicyclist_tone3:"],category:"activity"},":person_biking_tone4:":{uc_base:"1f6b4-1f3fe",uc_output:"1f6b4-1f3fe",uc_match:"1f6b4-1f3fe",uc_greedy:"1f6b4-1f3fe",shortnames:[":bicyclist_tone4:"],category:"activity"},":person_biking_tone5:":{uc_base:"1f6b4-1f3ff",uc_output:"1f6b4-1f3ff",uc_match:"1f6b4-1f3ff",uc_greedy:"1f6b4-1f3ff",shortnames:[":bicyclist_tone5:"],category:"activity"},":person_bowing_tone1:":{uc_base:"1f647-1f3fb",uc_output:"1f647-1f3fb",uc_match:"1f647-1f3fb",uc_greedy:"1f647-1f3fb",shortnames:[":bow_tone1:"],category:"people"},":person_bowing_tone2:":{uc_base:"1f647-1f3fc",uc_output:"1f647-1f3fc",uc_match:"1f647-1f3fc",uc_greedy:"1f647-1f3fc",shortnames:[":bow_tone2:"],category:"people"},":person_bowing_tone3:":{uc_base:"1f647-1f3fd",uc_output:"1f647-1f3fd",uc_match:"1f647-1f3fd",uc_greedy:"1f647-1f3fd",shortnames:[":bow_tone3:"],category:"people"},":person_bowing_tone4:":{uc_base:"1f647-1f3fe",uc_output:"1f647-1f3fe",uc_match:"1f647-1f3fe",uc_greedy:"1f647-1f3fe",shortnames:[":bow_tone4:"],category:"people"},":person_bowing_tone5:":{uc_base:"1f647-1f3ff",uc_output:"1f647-1f3ff",uc_match:"1f647-1f3ff",uc_greedy:"1f647-1f3ff",shortnames:[":bow_tone5:"],category:"people"},":person_climbing_tone1:":{uc_base:"1f9d7-1f3fb",uc_output:"1f9d7-1f3fb",uc_match:"1f9d7-1f3fb",uc_greedy:"1f9d7-1f3fb",shortnames:[":person_climbing_light_skin_tone:"],category:"activity"},":person_climbing_tone2:":{uc_base:"1f9d7-1f3fc",uc_output:"1f9d7-1f3fc",uc_match:"1f9d7-1f3fc",uc_greedy:"1f9d7-1f3fc",shortnames:[":person_climbing_medium_light_skin_tone:"],category:"activity"},":person_climbing_tone3:":{uc_base:"1f9d7-1f3fd",uc_output:"1f9d7-1f3fd",uc_match:"1f9d7-1f3fd",uc_greedy:"1f9d7-1f3fd",shortnames:[":person_climbing_medium_skin_tone:"],category:"activity"},":person_climbing_tone4:":{uc_base:"1f9d7-1f3fe",uc_output:"1f9d7-1f3fe",uc_match:"1f9d7-1f3fe",uc_greedy:"1f9d7-1f3fe",shortnames:[":person_climbing_medium_dark_skin_tone:"],category:"activity"},":person_climbing_tone5:":{uc_base:"1f9d7-1f3ff",uc_output:"1f9d7-1f3ff",uc_match:"1f9d7-1f3ff",uc_greedy:"1f9d7-1f3ff",shortnames:[":person_climbing_dark_skin_tone:"],category:"activity"},":person_doing_cartwheel_tone1:":{uc_base:"1f938-1f3fb",uc_output:"1f938-1f3fb",uc_match:"1f938-1f3fb",uc_greedy:"1f938-1f3fb",shortnames:[":cartwheel_tone1:"],category:"activity"},":person_doing_cartwheel_tone2:":{uc_base:"1f938-1f3fc",uc_output:"1f938-1f3fc",uc_match:"1f938-1f3fc",uc_greedy:"1f938-1f3fc",shortnames:[":cartwheel_tone2:"],category:"activity"},":person_doing_cartwheel_tone3:":{uc_base:"1f938-1f3fd",uc_output:"1f938-1f3fd",uc_match:"1f938-1f3fd",uc_greedy:"1f938-1f3fd",shortnames:[":cartwheel_tone3:"],category:"activity"},":person_doing_cartwheel_tone4:":{uc_base:"1f938-1f3fe",uc_output:"1f938-1f3fe",uc_match:"1f938-1f3fe",uc_greedy:"1f938-1f3fe",shortnames:[":cartwheel_tone4:"],category:"activity"},":person_doing_cartwheel_tone5:":{uc_base:"1f938-1f3ff",uc_output:"1f938-1f3ff",uc_match:"1f938-1f3ff",uc_greedy:"1f938-1f3ff",shortnames:[":cartwheel_tone5:"],category:"activity"},":person_facepalming_tone1:":{uc_base:"1f926-1f3fb",uc_output:"1f926-1f3fb",uc_match:"1f926-1f3fb",uc_greedy:"1f926-1f3fb",shortnames:[":face_palm_tone1:",":facepalm_tone1:"],category:"people"},":person_facepalming_tone2:":{uc_base:"1f926-1f3fc",uc_output:"1f926-1f3fc",uc_match:"1f926-1f3fc",uc_greedy:"1f926-1f3fc",shortnames:[":face_palm_tone2:",":facepalm_tone2:"],category:"people"},":person_facepalming_tone3:":{uc_base:"1f926-1f3fd",uc_output:"1f926-1f3fd",uc_match:"1f926-1f3fd",uc_greedy:"1f926-1f3fd",shortnames:[":face_palm_tone3:",":facepalm_tone3:"],category:"people"},":person_facepalming_tone4:":{uc_base:"1f926-1f3fe",uc_output:"1f926-1f3fe",uc_match:"1f926-1f3fe",uc_greedy:"1f926-1f3fe",shortnames:[":face_palm_tone4:",":facepalm_tone4:"],category:"people"},":person_facepalming_tone5:":{uc_base:"1f926-1f3ff",uc_output:"1f926-1f3ff",uc_match:"1f926-1f3ff",uc_greedy:"1f926-1f3ff",shortnames:[":face_palm_tone5:",":facepalm_tone5:"],category:"people"},":person_frowning_tone1:":{uc_base:"1f64d-1f3fb",uc_output:"1f64d-1f3fb",uc_match:"1f64d-1f3fb",uc_greedy:"1f64d-1f3fb",shortnames:[],category:"people"},":person_frowning_tone2:":{uc_base:"1f64d-1f3fc",uc_output:"1f64d-1f3fc",uc_match:"1f64d-1f3fc",uc_greedy:"1f64d-1f3fc",shortnames:[],category:"people"},":person_frowning_tone3:":{uc_base:"1f64d-1f3fd",uc_output:"1f64d-1f3fd",uc_match:"1f64d-1f3fd",uc_greedy:"1f64d-1f3fd",shortnames:[],category:"people"},":person_frowning_tone4:":{uc_base:"1f64d-1f3fe",uc_output:"1f64d-1f3fe",uc_match:"1f64d-1f3fe",uc_greedy:"1f64d-1f3fe",shortnames:[],category:"people"},":person_frowning_tone5:":{uc_base:"1f64d-1f3ff",uc_output:"1f64d-1f3ff",uc_match:"1f64d-1f3ff",uc_greedy:"1f64d-1f3ff",shortnames:[],category:"people"},":person_gesturing_no_tone1:":{uc_base:"1f645-1f3fb",uc_output:"1f645-1f3fb",uc_match:"1f645-1f3fb",uc_greedy:"1f645-1f3fb",shortnames:[":no_good_tone1:"],category:"people"},":person_gesturing_no_tone2:":{uc_base:"1f645-1f3fc",uc_output:"1f645-1f3fc",uc_match:"1f645-1f3fc",uc_greedy:"1f645-1f3fc",shortnames:[":no_good_tone2:"],category:"people"},":person_gesturing_no_tone3:":{uc_base:"1f645-1f3fd",uc_output:"1f645-1f3fd",uc_match:"1f645-1f3fd",uc_greedy:"1f645-1f3fd",shortnames:[":no_good_tone3:"],category:"people"},":person_gesturing_no_tone4:":{uc_base:"1f645-1f3fe",uc_output:"1f645-1f3fe",uc_match:"1f645-1f3fe",uc_greedy:"1f645-1f3fe",shortnames:[":no_good_tone4:"],category:"people"},":person_gesturing_no_tone5:":{uc_base:"1f645-1f3ff",uc_output:"1f645-1f3ff",uc_match:"1f645-1f3ff",uc_greedy:"1f645-1f3ff",shortnames:[":no_good_tone5:"],category:"people"},":person_gesturing_ok_tone1:":{uc_base:"1f646-1f3fb",uc_output:"1f646-1f3fb",uc_match:"1f646-1f3fb",uc_greedy:"1f646-1f3fb",shortnames:[":ok_woman_tone1:"],category:"people"},":person_gesturing_ok_tone2:":{uc_base:"1f646-1f3fc",uc_output:"1f646-1f3fc",uc_match:"1f646-1f3fc",uc_greedy:"1f646-1f3fc",shortnames:[":ok_woman_tone2:"],category:"people"},":person_gesturing_ok_tone3:":{uc_base:"1f646-1f3fd",uc_output:"1f646-1f3fd",uc_match:"1f646-1f3fd",uc_greedy:"1f646-1f3fd",shortnames:[":ok_woman_tone3:"],category:"people"},":person_gesturing_ok_tone4:":{uc_base:"1f646-1f3fe",uc_output:"1f646-1f3fe",uc_match:"1f646-1f3fe",uc_greedy:"1f646-1f3fe",shortnames:[":ok_woman_tone4:"],category:"people"},":person_gesturing_ok_tone5:":{uc_base:"1f646-1f3ff",uc_output:"1f646-1f3ff",uc_match:"1f646-1f3ff",uc_greedy:"1f646-1f3ff",shortnames:[":ok_woman_tone5:"],category:"people"},":person_getting_haircut_tone1:":{uc_base:"1f487-1f3fb",uc_output:"1f487-1f3fb",uc_match:"1f487-1f3fb",uc_greedy:"1f487-1f3fb",shortnames:[":haircut_tone1:"],category:"people"},":person_getting_haircut_tone2:":{uc_base:"1f487-1f3fc",uc_output:"1f487-1f3fc",uc_match:"1f487-1f3fc",uc_greedy:"1f487-1f3fc",shortnames:[":haircut_tone2:"],category:"people"},":person_getting_haircut_tone3:":{uc_base:"1f487-1f3fd",uc_output:"1f487-1f3fd",uc_match:"1f487-1f3fd",uc_greedy:"1f487-1f3fd",shortnames:[":haircut_tone3:"],category:"people"},":person_getting_haircut_tone4:":{uc_base:"1f487-1f3fe",uc_output:"1f487-1f3fe",uc_match:"1f487-1f3fe",uc_greedy:"1f487-1f3fe",shortnames:[":haircut_tone4:"],category:"people"},":person_getting_haircut_tone5:":{uc_base:"1f487-1f3ff",uc_output:"1f487-1f3ff",uc_match:"1f487-1f3ff",uc_greedy:"1f487-1f3ff",shortnames:[":haircut_tone5:"],category:"people"},":person_getting_massage_tone1:":{uc_base:"1f486-1f3fb",uc_output:"1f486-1f3fb",uc_match:"1f486-1f3fb",uc_greedy:"1f486-1f3fb",shortnames:[":massage_tone1:"],category:"people"},":person_getting_massage_tone2:":{uc_base:"1f486-1f3fc",uc_output:"1f486-1f3fc",uc_match:"1f486-1f3fc",uc_greedy:"1f486-1f3fc",shortnames:[":massage_tone2:"],category:"people"},":person_getting_massage_tone3:":{uc_base:"1f486-1f3fd",uc_output:"1f486-1f3fd",uc_match:"1f486-1f3fd",uc_greedy:"1f486-1f3fd",shortnames:[":massage_tone3:"],category:"people"},":person_getting_massage_tone4:":{uc_base:"1f486-1f3fe",uc_output:"1f486-1f3fe",uc_match:"1f486-1f3fe",uc_greedy:"1f486-1f3fe",shortnames:[":massage_tone4:"],category:"people"},":person_getting_massage_tone5:":{uc_base:"1f486-1f3ff",uc_output:"1f486-1f3ff",uc_match:"1f486-1f3ff",uc_greedy:"1f486-1f3ff",shortnames:[":massage_tone5:"],category:"people"},":person_golfing_tone1:":{uc_base:"1f3cc-1f3fb",uc_output:"1f3cc-1f3fb",uc_match:"1f3cc-fe0f-1f3fb",uc_greedy:"1f3cc-fe0f-1f3fb",shortnames:[":person_golfing_light_skin_tone:"],category:"activity"},":person_golfing_tone2:":{uc_base:"1f3cc-1f3fc",uc_output:"1f3cc-1f3fc",uc_match:"1f3cc-fe0f-1f3fc",uc_greedy:"1f3cc-fe0f-1f3fc",shortnames:[":person_golfing_medium_light_skin_tone:"],category:"activity"},":person_golfing_tone3:":{uc_base:"1f3cc-1f3fd",uc_output:"1f3cc-1f3fd",uc_match:"1f3cc-fe0f-1f3fd",uc_greedy:"1f3cc-fe0f-1f3fd",shortnames:[":person_golfing_medium_skin_tone:"],category:"activity"},":person_golfing_tone4:":{uc_base:"1f3cc-1f3fe",uc_output:"1f3cc-1f3fe",uc_match:"1f3cc-fe0f-1f3fe",uc_greedy:"1f3cc-fe0f-1f3fe",shortnames:[":person_golfing_medium_dark_skin_tone:"],category:"activity"},":person_golfing_tone5:":{uc_base:"1f3cc-1f3ff",uc_output:"1f3cc-1f3ff",uc_match:"1f3cc-fe0f-1f3ff",uc_greedy:"1f3cc-fe0f-1f3ff",shortnames:[":person_golfing_dark_skin_tone:"],category:"activity"},":person_in_bed_tone1:":{uc_base:"1f6cc-1f3fb",uc_output:"1f6cc-1f3fb",uc_match:"1f6cc-1f3fb",uc_greedy:"1f6cc-1f3fb",shortnames:[":person_in_bed_light_skin_tone:"],category:"objects"},":person_in_bed_tone2:":{uc_base:"1f6cc-1f3fc",uc_output:"1f6cc-1f3fc",uc_match:"1f6cc-1f3fc",uc_greedy:"1f6cc-1f3fc",shortnames:[":person_in_bed_medium_light_skin_tone:"],category:"objects"},":person_in_bed_tone3:":{uc_base:"1f6cc-1f3fd",uc_output:"1f6cc-1f3fd",uc_match:"1f6cc-1f3fd",uc_greedy:"1f6cc-1f3fd",shortnames:[":person_in_bed_medium_skin_tone:"],category:"objects"},":person_in_bed_tone4:":{uc_base:"1f6cc-1f3fe",uc_output:"1f6cc-1f3fe",uc_match:"1f6cc-1f3fe",uc_greedy:"1f6cc-1f3fe",shortnames:[":person_in_bed_medium_dark_skin_tone:"],category:"objects"},":person_in_bed_tone5:":{uc_base:"1f6cc-1f3ff",uc_output:"1f6cc-1f3ff",uc_match:"1f6cc-1f3ff",uc_greedy:"1f6cc-1f3ff",shortnames:[":person_in_bed_dark_skin_tone:"],category:"objects"},":person_in_lotus_position_tone1:":{uc_base:"1f9d8-1f3fb",uc_output:"1f9d8-1f3fb",uc_match:"1f9d8-1f3fb",uc_greedy:"1f9d8-1f3fb",shortnames:[":person_in_lotus_position_light_skin_tone:"],category:"activity"},":person_in_lotus_position_tone2:":{uc_base:"1f9d8-1f3fc",uc_output:"1f9d8-1f3fc",uc_match:"1f9d8-1f3fc",uc_greedy:"1f9d8-1f3fc",shortnames:[":person_in_lotus_position_medium_light_skin_tone:"],category:"activity"},":person_in_lotus_position_tone3:":{uc_base:"1f9d8-1f3fd",uc_output:"1f9d8-1f3fd",uc_match:"1f9d8-1f3fd",uc_greedy:"1f9d8-1f3fd",shortnames:[":person_in_lotus_position_medium_skin_tone:"],category:"activity"},":person_in_lotus_position_tone4:":{uc_base:"1f9d8-1f3fe",uc_output:"1f9d8-1f3fe",uc_match:"1f9d8-1f3fe",uc_greedy:"1f9d8-1f3fe",shortnames:[":person_in_lotus_position_medium_dark_skin_tone:"],category:"activity"},":person_in_lotus_position_tone5:":{uc_base:"1f9d8-1f3ff",uc_output:"1f9d8-1f3ff",uc_match:"1f9d8-1f3ff",uc_greedy:"1f9d8-1f3ff",shortnames:[":person_in_lotus_position_dark_skin_tone:"],category:"activity"},":person_in_steamy_room_tone1:":{uc_base:"1f9d6-1f3fb",uc_output:"1f9d6-1f3fb",uc_match:"1f9d6-1f3fb",uc_greedy:"1f9d6-1f3fb",shortnames:[":person_in_steamy_room_light_skin_tone:"],category:"people"},":person_in_steamy_room_tone2:":{uc_base:"1f9d6-1f3fc",uc_output:"1f9d6-1f3fc",uc_match:"1f9d6-1f3fc",uc_greedy:"1f9d6-1f3fc",shortnames:[":person_in_steamy_room_medium_light_skin_tone:"],category:"people"},":person_in_steamy_room_tone3:":{uc_base:"1f9d6-1f3fd",uc_output:"1f9d6-1f3fd",uc_match:"1f9d6-1f3fd",uc_greedy:"1f9d6-1f3fd",shortnames:[":person_in_steamy_room_medium_skin_tone:"],category:"people"},":person_in_steamy_room_tone4:":{uc_base:"1f9d6-1f3fe",uc_output:"1f9d6-1f3fe",uc_match:"1f9d6-1f3fe",uc_greedy:"1f9d6-1f3fe",shortnames:[":person_in_steamy_room_medium_dark_skin_tone:"],category:"people"},":person_in_steamy_room_tone5:":{uc_base:"1f9d6-1f3ff",uc_output:"1f9d6-1f3ff",uc_match:"1f9d6-1f3ff",uc_greedy:"1f9d6-1f3ff",shortnames:[":person_in_steamy_room_dark_skin_tone:"],category:"people"},":person_juggling_tone1:":{uc_base:"1f939-1f3fb",uc_output:"1f939-1f3fb",uc_match:"1f939-1f3fb",uc_greedy:"1f939-1f3fb",shortnames:[":juggling_tone1:",":juggler_tone1:"],category:"activity"},":person_juggling_tone2:":{uc_base:"1f939-1f3fc",uc_output:"1f939-1f3fc",uc_match:"1f939-1f3fc",uc_greedy:"1f939-1f3fc",shortnames:[":juggling_tone2:",":juggler_tone2:"],category:"activity"},":person_juggling_tone3:":{uc_base:"1f939-1f3fd",uc_output:"1f939-1f3fd",uc_match:"1f939-1f3fd",uc_greedy:"1f939-1f3fd",shortnames:[":juggling_tone3:",":juggler_tone3:"],category:"activity"},":person_juggling_tone4:":{uc_base:"1f939-1f3fe",uc_output:"1f939-1f3fe",uc_match:"1f939-1f3fe",uc_greedy:"1f939-1f3fe",shortnames:[":juggling_tone4:",":juggler_tone4:"],category:"activity"},":person_juggling_tone5:":{uc_base:"1f939-1f3ff",uc_output:"1f939-1f3ff",uc_match:"1f939-1f3ff",uc_greedy:"1f939-1f3ff",shortnames:[":juggling_tone5:",":juggler_tone5:"],category:"activity"},":person_lifting_weights_tone1:":{uc_base:"1f3cb-1f3fb",uc_output:"1f3cb-1f3fb",uc_match:"1f3cb-fe0f-1f3fb",uc_greedy:"1f3cb-fe0f-1f3fb",shortnames:[":lifter_tone1:",":weight_lifter_tone1:"],category:"activity"},":person_lifting_weights_tone2:":{uc_base:"1f3cb-1f3fc",uc_output:"1f3cb-1f3fc",uc_match:"1f3cb-fe0f-1f3fc",uc_greedy:"1f3cb-fe0f-1f3fc",shortnames:[":lifter_tone2:",":weight_lifter_tone2:"],category:"activity"},":person_lifting_weights_tone3:":{uc_base:"1f3cb-1f3fd",uc_output:"1f3cb-1f3fd",uc_match:"1f3cb-fe0f-1f3fd",uc_greedy:"1f3cb-fe0f-1f3fd",shortnames:[":lifter_tone3:",":weight_lifter_tone3:"],category:"activity"},":person_lifting_weights_tone4:":{uc_base:"1f3cb-1f3fe",uc_output:"1f3cb-1f3fe",uc_match:"1f3cb-fe0f-1f3fe",uc_greedy:"1f3cb-fe0f-1f3fe",shortnames:[":lifter_tone4:",":weight_lifter_tone4:"],category:"activity"},":person_lifting_weights_tone5:":{uc_base:"1f3cb-1f3ff",uc_output:"1f3cb-1f3ff",uc_match:"1f3cb-fe0f-1f3ff",uc_greedy:"1f3cb-fe0f-1f3ff",shortnames:[":lifter_tone5:",":weight_lifter_tone5:"],category:"activity"},":person_mountain_biking_tone1:":{uc_base:"1f6b5-1f3fb",uc_output:"1f6b5-1f3fb",uc_match:"1f6b5-1f3fb",uc_greedy:"1f6b5-1f3fb",shortnames:[":mountain_bicyclist_tone1:"],category:"activity"},":person_mountain_biking_tone2:":{uc_base:"1f6b5-1f3fc",uc_output:"1f6b5-1f3fc",uc_match:"1f6b5-1f3fc",uc_greedy:"1f6b5-1f3fc",shortnames:[":mountain_bicyclist_tone2:"],category:"activity"},":person_mountain_biking_tone3:":{uc_base:"1f6b5-1f3fd",uc_output:"1f6b5-1f3fd",uc_match:"1f6b5-1f3fd",uc_greedy:"1f6b5-1f3fd",shortnames:[":mountain_bicyclist_tone3:"],category:"activity"},":person_mountain_biking_tone4:":{uc_base:"1f6b5-1f3fe",uc_output:"1f6b5-1f3fe",uc_match:"1f6b5-1f3fe",uc_greedy:"1f6b5-1f3fe",shortnames:[":mountain_bicyclist_tone4:"],category:"activity"},":person_mountain_biking_tone5:":{uc_base:"1f6b5-1f3ff",uc_output:"1f6b5-1f3ff",uc_match:"1f6b5-1f3ff",uc_greedy:"1f6b5-1f3ff",shortnames:[":mountain_bicyclist_tone5:"],category:"activity"},":person_playing_handball_tone1:":{uc_base:"1f93e-1f3fb",uc_output:"1f93e-1f3fb",uc_match:"1f93e-1f3fb",uc_greedy:"1f93e-1f3fb",shortnames:[":handball_tone1:"],category:"activity"},":person_playing_handball_tone2:":{uc_base:"1f93e-1f3fc",uc_output:"1f93e-1f3fc",uc_match:"1f93e-1f3fc",uc_greedy:"1f93e-1f3fc",shortnames:[":handball_tone2:"],category:"activity"},":person_playing_handball_tone3:":{uc_base:"1f93e-1f3fd",uc_output:"1f93e-1f3fd",uc_match:"1f93e-1f3fd",uc_greedy:"1f93e-1f3fd",shortnames:[":handball_tone3:"],category:"activity"},":person_playing_handball_tone4:":{uc_base:"1f93e-1f3fe",uc_output:"1f93e-1f3fe",uc_match:"1f93e-1f3fe",uc_greedy:"1f93e-1f3fe",shortnames:[":handball_tone4:"],category:"activity"},":person_playing_handball_tone5:":{uc_base:"1f93e-1f3ff",uc_output:"1f93e-1f3ff",uc_match:"1f93e-1f3ff",uc_greedy:"1f93e-1f3ff",shortnames:[":handball_tone5:"],category:"activity"},":person_playing_water_polo_tone1:":{uc_base:"1f93d-1f3fb",uc_output:"1f93d-1f3fb",uc_match:"1f93d-1f3fb",uc_greedy:"1f93d-1f3fb",shortnames:[":water_polo_tone1:"],category:"activity"},":person_playing_water_polo_tone2:":{uc_base:"1f93d-1f3fc",uc_output:"1f93d-1f3fc",uc_match:"1f93d-1f3fc",uc_greedy:"1f93d-1f3fc",shortnames:[":water_polo_tone2:"],category:"activity"},":person_playing_water_polo_tone3:":{uc_base:"1f93d-1f3fd",uc_output:"1f93d-1f3fd",uc_match:"1f93d-1f3fd",uc_greedy:"1f93d-1f3fd",shortnames:[":water_polo_tone3:"],category:"activity"},":person_playing_water_polo_tone4:":{uc_base:"1f93d-1f3fe",uc_output:"1f93d-1f3fe",uc_match:"1f93d-1f3fe",uc_greedy:"1f93d-1f3fe",shortnames:[":water_polo_tone4:"],category:"activity"},":person_playing_water_polo_tone5:":{uc_base:"1f93d-1f3ff",uc_output:"1f93d-1f3ff",uc_match:"1f93d-1f3ff",uc_greedy:"1f93d-1f3ff",shortnames:[":water_polo_tone5:"],category:"activity"},":person_pouting_tone1:":{uc_base:"1f64e-1f3fb",uc_output:"1f64e-1f3fb",uc_match:"1f64e-1f3fb",uc_greedy:"1f64e-1f3fb",shortnames:[":person_with_pouting_face_tone1:"],category:"people"},":person_pouting_tone2:":{uc_base:"1f64e-1f3fc",uc_output:"1f64e-1f3fc",uc_match:"1f64e-1f3fc",uc_greedy:"1f64e-1f3fc",shortnames:[":person_with_pouting_face_tone2:"],category:"people"},":person_pouting_tone3:":{uc_base:"1f64e-1f3fd",uc_output:"1f64e-1f3fd",uc_match:"1f64e-1f3fd",uc_greedy:"1f64e-1f3fd",shortnames:[":person_with_pouting_face_tone3:"],category:"people"},":person_pouting_tone4:":{uc_base:"1f64e-1f3fe",uc_output:"1f64e-1f3fe",uc_match:"1f64e-1f3fe",uc_greedy:"1f64e-1f3fe",shortnames:[":person_with_pouting_face_tone4:"],category:"people"},":person_pouting_tone5:":{uc_base:"1f64e-1f3ff",uc_output:"1f64e-1f3ff",uc_match:"1f64e-1f3ff",uc_greedy:"1f64e-1f3ff",shortnames:[":person_with_pouting_face_tone5:"],category:"people"},":person_raising_hand_tone1:":{uc_base:"1f64b-1f3fb",uc_output:"1f64b-1f3fb",uc_match:"1f64b-1f3fb",uc_greedy:"1f64b-1f3fb",shortnames:[":raising_hand_tone1:"],category:"people"},":person_raising_hand_tone2:":{uc_base:"1f64b-1f3fc",uc_output:"1f64b-1f3fc",uc_match:"1f64b-1f3fc",uc_greedy:"1f64b-1f3fc",shortnames:[":raising_hand_tone2:"],category:"people"},":person_raising_hand_tone3:":{uc_base:"1f64b-1f3fd",uc_output:"1f64b-1f3fd",uc_match:"1f64b-1f3fd",uc_greedy:"1f64b-1f3fd",shortnames:[":raising_hand_tone3:"],category:"people"},":person_raising_hand_tone4:":{uc_base:"1f64b-1f3fe",uc_output:"1f64b-1f3fe",uc_match:"1f64b-1f3fe",uc_greedy:"1f64b-1f3fe",shortnames:[":raising_hand_tone4:"],category:"people"},":person_raising_hand_tone5:":{uc_base:"1f64b-1f3ff",uc_output:"1f64b-1f3ff",uc_match:"1f64b-1f3ff",uc_greedy:"1f64b-1f3ff",shortnames:[":raising_hand_tone5:"],category:"people"},":person_rowing_boat_tone1:":{uc_base:"1f6a3-1f3fb",uc_output:"1f6a3-1f3fb",uc_match:"1f6a3-1f3fb",uc_greedy:"1f6a3-1f3fb",shortnames:[":rowboat_tone1:"],category:"activity"},":person_rowing_boat_tone2:":{uc_base:"1f6a3-1f3fc",uc_output:"1f6a3-1f3fc",uc_match:"1f6a3-1f3fc",uc_greedy:"1f6a3-1f3fc",shortnames:[":rowboat_tone2:"],category:"activity"},":person_rowing_boat_tone3:":{uc_base:"1f6a3-1f3fd",uc_output:"1f6a3-1f3fd",uc_match:"1f6a3-1f3fd",uc_greedy:"1f6a3-1f3fd",shortnames:[":rowboat_tone3:"],category:"activity"},":person_rowing_boat_tone4:":{uc_base:"1f6a3-1f3fe",uc_output:"1f6a3-1f3fe",uc_match:"1f6a3-1f3fe",uc_greedy:"1f6a3-1f3fe",shortnames:[":rowboat_tone4:"],category:"activity"},":person_rowing_boat_tone5:":{uc_base:"1f6a3-1f3ff",uc_output:"1f6a3-1f3ff",uc_match:"1f6a3-1f3ff",uc_greedy:"1f6a3-1f3ff",shortnames:[":rowboat_tone5:"],category:"activity"},":person_running_tone1:":{uc_base:"1f3c3-1f3fb",uc_output:"1f3c3-1f3fb",uc_match:"1f3c3-1f3fb",uc_greedy:"1f3c3-1f3fb",shortnames:[":runner_tone1:"],category:"people"},":person_running_tone2:":{uc_base:"1f3c3-1f3fc",uc_output:"1f3c3-1f3fc",uc_match:"1f3c3-1f3fc",uc_greedy:"1f3c3-1f3fc",shortnames:[":runner_tone2:"],category:"people"},":person_running_tone3:":{uc_base:"1f3c3-1f3fd",uc_output:"1f3c3-1f3fd",uc_match:"1f3c3-1f3fd",uc_greedy:"1f3c3-1f3fd",shortnames:[":runner_tone3:"],category:"people"},":person_running_tone4:":{uc_base:"1f3c3-1f3fe",uc_output:"1f3c3-1f3fe",uc_match:"1f3c3-1f3fe",uc_greedy:"1f3c3-1f3fe",shortnames:[":runner_tone4:"],category:"people"},":person_running_tone5:":{uc_base:"1f3c3-1f3ff",uc_output:"1f3c3-1f3ff",uc_match:"1f3c3-1f3ff",uc_greedy:"1f3c3-1f3ff",shortnames:[":runner_tone5:"],category:"people"},":person_shrugging_tone1:":{uc_base:"1f937-1f3fb",uc_output:"1f937-1f3fb",uc_match:"1f937-1f3fb",uc_greedy:"1f937-1f3fb",shortnames:[":shrug_tone1:"],category:"people"},":person_shrugging_tone2:":{uc_base:"1f937-1f3fc",uc_output:"1f937-1f3fc",uc_match:"1f937-1f3fc",uc_greedy:"1f937-1f3fc",shortnames:[":shrug_tone2:"],category:"people"},":person_shrugging_tone3:":{uc_base:"1f937-1f3fd",uc_output:"1f937-1f3fd",uc_match:"1f937-1f3fd",uc_greedy:"1f937-1f3fd",shortnames:[":shrug_tone3:"],category:"people"},":person_shrugging_tone4:":{uc_base:"1f937-1f3fe",uc_output:"1f937-1f3fe",uc_match:"1f937-1f3fe",uc_greedy:"1f937-1f3fe",shortnames:[":shrug_tone4:"],category:"people"},":person_shrugging_tone5:":{uc_base:"1f937-1f3ff",uc_output:"1f937-1f3ff",uc_match:"1f937-1f3ff",uc_greedy:"1f937-1f3ff",shortnames:[":shrug_tone5:"],category:"people"},":person_surfing_tone1:":{uc_base:"1f3c4-1f3fb",uc_output:"1f3c4-1f3fb",uc_match:"1f3c4-1f3fb",uc_greedy:"1f3c4-1f3fb",shortnames:[":surfer_tone1:"],category:"activity"},":person_surfing_tone2:":{uc_base:"1f3c4-1f3fc",uc_output:"1f3c4-1f3fc",uc_match:"1f3c4-1f3fc",uc_greedy:"1f3c4-1f3fc",shortnames:[":surfer_tone2:"],category:"activity"},":person_surfing_tone3:":{uc_base:"1f3c4-1f3fd",uc_output:"1f3c4-1f3fd",uc_match:"1f3c4-1f3fd",uc_greedy:"1f3c4-1f3fd",shortnames:[":surfer_tone3:"],category:"activity"},":person_surfing_tone4:":{uc_base:"1f3c4-1f3fe",uc_output:"1f3c4-1f3fe",uc_match:"1f3c4-1f3fe",uc_greedy:"1f3c4-1f3fe",shortnames:[":surfer_tone4:"],category:"activity"},":person_surfing_tone5:":{uc_base:"1f3c4-1f3ff",uc_output:"1f3c4-1f3ff",uc_match:"1f3c4-1f3ff",uc_greedy:"1f3c4-1f3ff",shortnames:[":surfer_tone5:"],category:"activity"},":person_swimming_tone1:":{uc_base:"1f3ca-1f3fb",uc_output:"1f3ca-1f3fb",uc_match:"1f3ca-1f3fb",uc_greedy:"1f3ca-1f3fb",shortnames:[":swimmer_tone1:"],category:"activity"},":person_swimming_tone2:":{uc_base:"1f3ca-1f3fc",uc_output:"1f3ca-1f3fc",uc_match:"1f3ca-1f3fc",uc_greedy:"1f3ca-1f3fc",shortnames:[":swimmer_tone2:"],category:"activity"},":person_swimming_tone3:":{uc_base:"1f3ca-1f3fd",uc_output:"1f3ca-1f3fd",uc_match:"1f3ca-1f3fd",uc_greedy:"1f3ca-1f3fd",shortnames:[":swimmer_tone3:"],category:"activity"},":person_swimming_tone4:":{uc_base:"1f3ca-1f3fe",uc_output:"1f3ca-1f3fe",uc_match:"1f3ca-1f3fe",uc_greedy:"1f3ca-1f3fe",shortnames:[":swimmer_tone4:"],category:"activity"},":person_swimming_tone5:":{uc_base:"1f3ca-1f3ff",uc_output:"1f3ca-1f3ff",uc_match:"1f3ca-1f3ff",uc_greedy:"1f3ca-1f3ff",shortnames:[":swimmer_tone5:"],category:"activity"},":person_tipping_hand_tone1:":{uc_base:"1f481-1f3fb",uc_output:"1f481-1f3fb",uc_match:"1f481-1f3fb",uc_greedy:"1f481-1f3fb",shortnames:[":information_desk_person_tone1:"],category:"people"},":person_tipping_hand_tone2:":{uc_base:"1f481-1f3fc",uc_output:"1f481-1f3fc",uc_match:"1f481-1f3fc",uc_greedy:"1f481-1f3fc",shortnames:[":information_desk_person_tone2:"],category:"people"},":person_tipping_hand_tone3:":{uc_base:"1f481-1f3fd",uc_output:"1f481-1f3fd",uc_match:"1f481-1f3fd",uc_greedy:"1f481-1f3fd",shortnames:[":information_desk_person_tone3:"],category:"people"},":person_tipping_hand_tone4:":{uc_base:"1f481-1f3fe",uc_output:"1f481-1f3fe",uc_match:"1f481-1f3fe",uc_greedy:"1f481-1f3fe",shortnames:[":information_desk_person_tone4:"],category:"people"},":person_tipping_hand_tone5:":{uc_base:"1f481-1f3ff",uc_output:"1f481-1f3ff",uc_match:"1f481-1f3ff",uc_greedy:"1f481-1f3ff",shortnames:[":information_desk_person_tone5:"],category:"people"},":person_walking_tone1:":{uc_base:"1f6b6-1f3fb",uc_output:"1f6b6-1f3fb",uc_match:"1f6b6-1f3fb",uc_greedy:"1f6b6-1f3fb",shortnames:[":walking_tone1:"],category:"people"},":person_walking_tone2:":{uc_base:"1f6b6-1f3fc",uc_output:"1f6b6-1f3fc",uc_match:"1f6b6-1f3fc",uc_greedy:"1f6b6-1f3fc",shortnames:[":walking_tone2:"],category:"people"},":person_walking_tone3:":{uc_base:"1f6b6-1f3fd",uc_output:"1f6b6-1f3fd",uc_match:"1f6b6-1f3fd",uc_greedy:"1f6b6-1f3fd",shortnames:[":walking_tone3:"],category:"people"},":person_walking_tone4:":{uc_base:"1f6b6-1f3fe",uc_output:"1f6b6-1f3fe",uc_match:"1f6b6-1f3fe",uc_greedy:"1f6b6-1f3fe",shortnames:[":walking_tone4:"],category:"people"},":person_walking_tone5:":{uc_base:"1f6b6-1f3ff",uc_output:"1f6b6-1f3ff",uc_match:"1f6b6-1f3ff",uc_greedy:"1f6b6-1f3ff",shortnames:[":walking_tone5:"],category:"people"},":person_wearing_turban_tone1:":{uc_base:"1f473-1f3fb",uc_output:"1f473-1f3fb",uc_match:"1f473-1f3fb",uc_greedy:"1f473-1f3fb",shortnames:[":man_with_turban_tone1:"],category:"people"},":person_wearing_turban_tone2:":{uc_base:"1f473-1f3fc",uc_output:"1f473-1f3fc",uc_match:"1f473-1f3fc",uc_greedy:"1f473-1f3fc",shortnames:[":man_with_turban_tone2:"],category:"people"},":person_wearing_turban_tone3:":{uc_base:"1f473-1f3fd",uc_output:"1f473-1f3fd",uc_match:"1f473-1f3fd",uc_greedy:"1f473-1f3fd",shortnames:[":man_with_turban_tone3:"],category:"people"},":person_wearing_turban_tone4:":{uc_base:"1f473-1f3fe",uc_output:"1f473-1f3fe",uc_match:"1f473-1f3fe",uc_greedy:"1f473-1f3fe",shortnames:[":man_with_turban_tone4:"],category:"people"},":person_wearing_turban_tone5:":{uc_base:"1f473-1f3ff",uc_output:"1f473-1f3ff",uc_match:"1f473-1f3ff",uc_greedy:"1f473-1f3ff",shortnames:[":man_with_turban_tone5:"],category:"people"},":point_down_tone1:":{uc_base:"1f447-1f3fb",uc_output:"1f447-1f3fb",uc_match:"1f447-1f3fb",uc_greedy:"1f447-1f3fb",shortnames:[],category:"people"},":point_down_tone2:":{uc_base:"1f447-1f3fc",uc_output:"1f447-1f3fc",uc_match:"1f447-1f3fc",uc_greedy:"1f447-1f3fc",shortnames:[],category:"people"},":point_down_tone3:":{uc_base:"1f447-1f3fd",uc_output:"1f447-1f3fd",uc_match:"1f447-1f3fd",uc_greedy:"1f447-1f3fd",shortnames:[],category:"people"},":point_down_tone4:":{uc_base:"1f447-1f3fe",uc_output:"1f447-1f3fe",uc_match:"1f447-1f3fe",uc_greedy:"1f447-1f3fe",shortnames:[],category:"people"},":point_down_tone5:":{uc_base:"1f447-1f3ff",uc_output:"1f447-1f3ff",uc_match:"1f447-1f3ff",uc_greedy:"1f447-1f3ff",shortnames:[],category:"people"},":point_left_tone1:":{uc_base:"1f448-1f3fb",uc_output:"1f448-1f3fb",uc_match:"1f448-1f3fb",uc_greedy:"1f448-1f3fb",shortnames:[],category:"people"},":point_left_tone2:":{uc_base:"1f448-1f3fc",uc_output:"1f448-1f3fc",uc_match:"1f448-1f3fc",uc_greedy:"1f448-1f3fc",shortnames:[],category:"people"},":point_left_tone3:":{uc_base:"1f448-1f3fd",uc_output:"1f448-1f3fd",uc_match:"1f448-1f3fd",uc_greedy:"1f448-1f3fd",shortnames:[],category:"people"},":point_left_tone4:":{uc_base:"1f448-1f3fe",uc_output:"1f448-1f3fe",uc_match:"1f448-1f3fe",uc_greedy:"1f448-1f3fe",shortnames:[],category:"people"},":point_left_tone5:":{uc_base:"1f448-1f3ff",uc_output:"1f448-1f3ff",uc_match:"1f448-1f3ff",uc_greedy:"1f448-1f3ff",shortnames:[],category:"people"},":point_right_tone1:":{uc_base:"1f449-1f3fb",uc_output:"1f449-1f3fb",uc_match:"1f449-1f3fb",uc_greedy:"1f449-1f3fb",shortnames:[],category:"people"},":point_right_tone2:":{uc_base:"1f449-1f3fc",uc_output:"1f449-1f3fc",uc_match:"1f449-1f3fc",uc_greedy:"1f449-1f3fc",shortnames:[],category:"people"},":point_right_tone3:":{uc_base:"1f449-1f3fd",uc_output:"1f449-1f3fd",uc_match:"1f449-1f3fd",uc_greedy:"1f449-1f3fd",shortnames:[],category:"people"},":point_right_tone4:":{uc_base:"1f449-1f3fe",uc_output:"1f449-1f3fe",uc_match:"1f449-1f3fe",uc_greedy:"1f449-1f3fe",shortnames:[],category:"people"},":point_right_tone5:":{uc_base:"1f449-1f3ff",uc_output:"1f449-1f3ff",uc_match:"1f449-1f3ff",uc_greedy:"1f449-1f3ff",shortnames:[],category:"people"},":point_up_2_tone1:":{uc_base:"1f446-1f3fb",uc_output:"1f446-1f3fb",uc_match:"1f446-1f3fb",uc_greedy:"1f446-1f3fb",shortnames:[],category:"people"},":point_up_2_tone2:":{uc_base:"1f446-1f3fc",uc_output:"1f446-1f3fc",uc_match:"1f446-1f3fc",uc_greedy:"1f446-1f3fc",shortnames:[],category:"people"},":point_up_2_tone3:":{uc_base:"1f446-1f3fd",uc_output:"1f446-1f3fd",uc_match:"1f446-1f3fd",uc_greedy:"1f446-1f3fd",shortnames:[],category:"people"},":point_up_2_tone4:":{uc_base:"1f446-1f3fe",uc_output:"1f446-1f3fe",uc_match:"1f446-1f3fe",uc_greedy:"1f446-1f3fe",shortnames:[],category:"people"},":point_up_2_tone5:":{uc_base:"1f446-1f3ff",uc_output:"1f446-1f3ff",uc_match:"1f446-1f3ff",uc_greedy:"1f446-1f3ff",shortnames:[],category:"people"},":police_officer_tone1:":{uc_base:"1f46e-1f3fb",uc_output:"1f46e-1f3fb",uc_match:"1f46e-1f3fb",uc_greedy:"1f46e-1f3fb",shortnames:[":cop_tone1:"],category:"people"},":police_officer_tone2:":{uc_base:"1f46e-1f3fc",uc_output:"1f46e-1f3fc",uc_match:"1f46e-1f3fc",uc_greedy:"1f46e-1f3fc",shortnames:[":cop_tone2:"],category:"people"},":police_officer_tone3:":{uc_base:"1f46e-1f3fd",uc_output:"1f46e-1f3fd",uc_match:"1f46e-1f3fd",uc_greedy:"1f46e-1f3fd",shortnames:[":cop_tone3:"],category:"people"},":police_officer_tone4:":{uc_base:"1f46e-1f3fe",uc_output:"1f46e-1f3fe",uc_match:"1f46e-1f3fe",uc_greedy:"1f46e-1f3fe",shortnames:[":cop_tone4:"],category:"people"},":police_officer_tone5:":{uc_base:"1f46e-1f3ff",uc_output:"1f46e-1f3ff",uc_match:"1f46e-1f3ff",uc_greedy:"1f46e-1f3ff",shortnames:[":cop_tone5:"],category:"people"},":pray_tone1:":{uc_base:"1f64f-1f3fb",uc_output:"1f64f-1f3fb",uc_match:"1f64f-1f3fb",uc_greedy:"1f64f-1f3fb",shortnames:[],category:"people"},":pray_tone2:":{uc_base:"1f64f-1f3fc",uc_output:"1f64f-1f3fc",uc_match:"1f64f-1f3fc",uc_greedy:"1f64f-1f3fc",shortnames:[],category:"people"},":pray_tone3:":{uc_base:"1f64f-1f3fd",uc_output:"1f64f-1f3fd",uc_match:"1f64f-1f3fd",uc_greedy:"1f64f-1f3fd",shortnames:[],category:"people"},":pray_tone4:":{uc_base:"1f64f-1f3fe",uc_output:"1f64f-1f3fe",uc_match:"1f64f-1f3fe",uc_greedy:"1f64f-1f3fe",shortnames:[],category:"people"},":pray_tone5:":{uc_base:"1f64f-1f3ff",uc_output:"1f64f-1f3ff",uc_match:"1f64f-1f3ff",uc_greedy:"1f64f-1f3ff",shortnames:[],category:"people"},":pregnant_woman_tone1:":{uc_base:"1f930-1f3fb",uc_output:"1f930-1f3fb",uc_match:"1f930-1f3fb",uc_greedy:"1f930-1f3fb",shortnames:[":expecting_woman_tone1:"],category:"people"},":pregnant_woman_tone2:":{uc_base:"1f930-1f3fc",uc_output:"1f930-1f3fc",uc_match:"1f930-1f3fc",uc_greedy:"1f930-1f3fc",shortnames:[":expecting_woman_tone2:"],category:"people"},":pregnant_woman_tone3:":{uc_base:"1f930-1f3fd",uc_output:"1f930-1f3fd",uc_match:"1f930-1f3fd",uc_greedy:"1f930-1f3fd",shortnames:[":expecting_woman_tone3:"],category:"people"},":pregnant_woman_tone4:":{uc_base:"1f930-1f3fe",uc_output:"1f930-1f3fe",uc_match:"1f930-1f3fe",uc_greedy:"1f930-1f3fe",shortnames:[":expecting_woman_tone4:"],category:"people"},":pregnant_woman_tone5:":{uc_base:"1f930-1f3ff",uc_output:"1f930-1f3ff",uc_match:"1f930-1f3ff",uc_greedy:"1f930-1f3ff",shortnames:[":expecting_woman_tone5:"],category:"people"},":prince_tone1:":{uc_base:"1f934-1f3fb",uc_output:"1f934-1f3fb",uc_match:"1f934-1f3fb",uc_greedy:"1f934-1f3fb",shortnames:[],category:"people"},":prince_tone2:":{uc_base:"1f934-1f3fc",uc_output:"1f934-1f3fc",uc_match:"1f934-1f3fc",uc_greedy:"1f934-1f3fc",shortnames:[],category:"people"},":prince_tone3:":{uc_base:"1f934-1f3fd",uc_output:"1f934-1f3fd",uc_match:"1f934-1f3fd",uc_greedy:"1f934-1f3fd",shortnames:[],category:"people"},":prince_tone4:":{uc_base:"1f934-1f3fe",uc_output:"1f934-1f3fe",uc_match:"1f934-1f3fe",uc_greedy:"1f934-1f3fe",shortnames:[],category:"people"},":prince_tone5:":{uc_base:"1f934-1f3ff",uc_output:"1f934-1f3ff",uc_match:"1f934-1f3ff",uc_greedy:"1f934-1f3ff",shortnames:[],category:"people"},":princess_tone1:":{uc_base:"1f478-1f3fb",uc_output:"1f478-1f3fb",uc_match:"1f478-1f3fb",uc_greedy:"1f478-1f3fb",shortnames:[],category:"people"},":princess_tone2:":{uc_base:"1f478-1f3fc",uc_output:"1f478-1f3fc",uc_match:"1f478-1f3fc",uc_greedy:"1f478-1f3fc",shortnames:[],category:"people"},":princess_tone3:":{uc_base:"1f478-1f3fd",uc_output:"1f478-1f3fd",uc_match:"1f478-1f3fd",uc_greedy:"1f478-1f3fd",shortnames:[],category:"people"},":princess_tone4:":{uc_base:"1f478-1f3fe",uc_output:"1f478-1f3fe",uc_match:"1f478-1f3fe",uc_greedy:"1f478-1f3fe",shortnames:[],category:"people"},":princess_tone5:":{uc_base:"1f478-1f3ff",uc_output:"1f478-1f3ff",uc_match:"1f478-1f3ff",uc_greedy:"1f478-1f3ff",shortnames:[],category:"people"},":punch_tone1:":{uc_base:"1f44a-1f3fb",uc_output:"1f44a-1f3fb",uc_match:"1f44a-1f3fb",uc_greedy:"1f44a-1f3fb",shortnames:[],category:"people"},":punch_tone2:":{uc_base:"1f44a-1f3fc",uc_output:"1f44a-1f3fc",uc_match:"1f44a-1f3fc",uc_greedy:"1f44a-1f3fc",shortnames:[],category:"people"},":punch_tone3:":{uc_base:"1f44a-1f3fd",uc_output:"1f44a-1f3fd",uc_match:"1f44a-1f3fd",uc_greedy:"1f44a-1f3fd",shortnames:[],category:"people"},":punch_tone4:":{uc_base:"1f44a-1f3fe",uc_output:"1f44a-1f3fe",uc_match:"1f44a-1f3fe",uc_greedy:"1f44a-1f3fe",shortnames:[],category:"people"},":punch_tone5:":{uc_base:"1f44a-1f3ff",uc_output:"1f44a-1f3ff",uc_match:"1f44a-1f3ff",uc_greedy:"1f44a-1f3ff",shortnames:[],category:"people"},":raised_back_of_hand_tone1:":{uc_base:"1f91a-1f3fb",uc_output:"1f91a-1f3fb",uc_match:"1f91a-1f3fb",uc_greedy:"1f91a-1f3fb",shortnames:[":back_of_hand_tone1:"],category:"people"},":raised_back_of_hand_tone2:":{uc_base:"1f91a-1f3fc",uc_output:"1f91a-1f3fc",uc_match:"1f91a-1f3fc",uc_greedy:"1f91a-1f3fc",shortnames:[":back_of_hand_tone2:"],category:"people"},":raised_back_of_hand_tone3:":{uc_base:"1f91a-1f3fd",uc_output:"1f91a-1f3fd",uc_match:"1f91a-1f3fd",uc_greedy:"1f91a-1f3fd",shortnames:[":back_of_hand_tone3:"],category:"people"},":raised_back_of_hand_tone4:":{uc_base:"1f91a-1f3fe",uc_output:"1f91a-1f3fe",uc_match:"1f91a-1f3fe",uc_greedy:"1f91a-1f3fe",shortnames:[":back_of_hand_tone4:"],category:"people"},":raised_back_of_hand_tone5:":{uc_base:"1f91a-1f3ff",uc_output:"1f91a-1f3ff",uc_match:"1f91a-1f3ff",uc_greedy:"1f91a-1f3ff",shortnames:[":back_of_hand_tone5:"],category:"people"},":raised_hands_tone1:":{uc_base:"1f64c-1f3fb",uc_output:"1f64c-1f3fb",uc_match:"1f64c-1f3fb",uc_greedy:"1f64c-1f3fb",shortnames:[],category:"people"},":raised_hands_tone2:":{uc_base:"1f64c-1f3fc",uc_output:"1f64c-1f3fc",uc_match:"1f64c-1f3fc",uc_greedy:"1f64c-1f3fc",shortnames:[],category:"people"},":raised_hands_tone3:":{uc_base:"1f64c-1f3fd",uc_output:"1f64c-1f3fd",uc_match:"1f64c-1f3fd",uc_greedy:"1f64c-1f3fd",shortnames:[],category:"people"},":raised_hands_tone4:":{uc_base:"1f64c-1f3fe",uc_output:"1f64c-1f3fe",uc_match:"1f64c-1f3fe",uc_greedy:"1f64c-1f3fe",shortnames:[],category:"people"},":raised_hands_tone5:":{uc_base:"1f64c-1f3ff",uc_output:"1f64c-1f3ff",uc_match:"1f64c-1f3ff",uc_greedy:"1f64c-1f3ff",shortnames:[],category:"people"},":right_facing_fist_tone1:":{uc_base:"1f91c-1f3fb",uc_output:"1f91c-1f3fb",uc_match:"1f91c-1f3fb",uc_greedy:"1f91c-1f3fb",shortnames:[":right_fist_tone1:"],category:"people"},":right_facing_fist_tone2:":{uc_base:"1f91c-1f3fc",uc_output:"1f91c-1f3fc",uc_match:"1f91c-1f3fc",uc_greedy:"1f91c-1f3fc",shortnames:[":right_fist_tone2:"],category:"people"},":right_facing_fist_tone3:":{uc_base:"1f91c-1f3fd",uc_output:"1f91c-1f3fd",uc_match:"1f91c-1f3fd",uc_greedy:"1f91c-1f3fd",shortnames:[":right_fist_tone3:"],category:"people"},":right_facing_fist_tone4:":{uc_base:"1f91c-1f3fe",uc_output:"1f91c-1f3fe",uc_match:"1f91c-1f3fe",uc_greedy:"1f91c-1f3fe",shortnames:[":right_fist_tone4:"],category:"people"},":right_facing_fist_tone5:":{uc_base:"1f91c-1f3ff",uc_output:"1f91c-1f3ff",uc_match:"1f91c-1f3ff",uc_greedy:"1f91c-1f3ff",shortnames:[":right_fist_tone5:"],category:"people"},":santa_tone1:":{uc_base:"1f385-1f3fb",uc_output:"1f385-1f3fb",uc_match:"1f385-1f3fb",uc_greedy:"1f385-1f3fb",shortnames:[],category:"people"},":santa_tone2:":{uc_base:"1f385-1f3fc",uc_output:"1f385-1f3fc",uc_match:"1f385-1f3fc",uc_greedy:"1f385-1f3fc",shortnames:[],category:"people"},":santa_tone3:":{uc_base:"1f385-1f3fd",uc_output:"1f385-1f3fd",uc_match:"1f385-1f3fd",uc_greedy:"1f385-1f3fd",shortnames:[],category:"people"},":santa_tone4:":{uc_base:"1f385-1f3fe",uc_output:"1f385-1f3fe",uc_match:"1f385-1f3fe",uc_greedy:"1f385-1f3fe",shortnames:[],category:"people"},":santa_tone5:":{uc_base:"1f385-1f3ff",uc_output:"1f385-1f3ff",uc_match:"1f385-1f3ff",uc_greedy:"1f385-1f3ff",shortnames:[],category:"people"},":selfie_tone1:":{uc_base:"1f933-1f3fb",uc_output:"1f933-1f3fb",uc_match:"1f933-1f3fb",uc_greedy:"1f933-1f3fb",shortnames:[],category:"people"},":selfie_tone2:":{uc_base:"1f933-1f3fc",uc_output:"1f933-1f3fc",uc_match:"1f933-1f3fc",uc_greedy:"1f933-1f3fc",shortnames:[],category:"people"},":selfie_tone3:":{uc_base:"1f933-1f3fd",uc_output:"1f933-1f3fd",uc_match:"1f933-1f3fd",uc_greedy:"1f933-1f3fd",shortnames:[],category:"people"},":selfie_tone4:":{uc_base:"1f933-1f3fe",uc_output:"1f933-1f3fe",uc_match:"1f933-1f3fe",uc_greedy:"1f933-1f3fe",shortnames:[],category:"people"},":selfie_tone5:":{uc_base:"1f933-1f3ff",uc_output:"1f933-1f3ff",uc_match:"1f933-1f3ff",uc_greedy:"1f933-1f3ff",shortnames:[],category:"people"},":snowboarder_tone1:":{uc_base:"1f3c2-1f3fb",uc_output:"1f3c2-1f3fb",uc_match:"1f3c2-1f3fb",uc_greedy:"1f3c2-1f3fb",shortnames:[":snowboarder_light_skin_tone:"],category:"activity"},":snowboarder_tone2:":{uc_base:"1f3c2-1f3fc",uc_output:"1f3c2-1f3fc",uc_match:"1f3c2-1f3fc",uc_greedy:"1f3c2-1f3fc",shortnames:[":snowboarder_medium_light_skin_tone:"],category:"activity"},":snowboarder_tone3:":{uc_base:"1f3c2-1f3fd",uc_output:"1f3c2-1f3fd",uc_match:"1f3c2-1f3fd",uc_greedy:"1f3c2-1f3fd",shortnames:[":snowboarder_medium_skin_tone:"],category:"activity"},":snowboarder_tone4:":{uc_base:"1f3c2-1f3fe",uc_output:"1f3c2-1f3fe",uc_match:"1f3c2-1f3fe",uc_greedy:"1f3c2-1f3fe",shortnames:[":snowboarder_medium_dark_skin_tone:"],category:"activity"},":snowboarder_tone5:":{uc_base:"1f3c2-1f3ff",uc_output:"1f3c2-1f3ff",uc_match:"1f3c2-1f3ff",uc_greedy:"1f3c2-1f3ff",shortnames:[":snowboarder_dark_skin_tone:"],category:"activity"},":superhero_tone1:":{uc_base:"1f9b8-1f3fb",uc_output:"1f9b8-1f3fb",uc_match:"1f9b8-1f3fb",uc_greedy:"1f9b8-1f3fb",shortnames:[":superhero_light_skin_tone:"],category:"people"},":superhero_tone2:":{uc_base:"1f9b8-1f3fc",uc_output:"1f9b8-1f3fc",uc_match:"1f9b8-1f3fc",uc_greedy:"1f9b8-1f3fc",shortnames:[":superhero_medium_light_skin_tone:"],category:"people"},":superhero_tone3:":{uc_base:"1f9b8-1f3fd",uc_output:"1f9b8-1f3fd",uc_match:"1f9b8-1f3fd",uc_greedy:"1f9b8-1f3fd",shortnames:[":superhero_medium_skin_tone:"],category:"people"},":superhero_tone4:":{uc_base:"1f9b8-1f3fe",uc_output:"1f9b8-1f3fe",uc_match:"1f9b8-1f3fe",uc_greedy:"1f9b8-1f3fe",shortnames:[":superhero_medium_dark_skin_tone:"],category:"people"},":superhero_tone5:":{uc_base:"1f9b8-1f3ff",uc_output:"1f9b8-1f3ff",uc_match:"1f9b8-1f3ff",uc_greedy:"1f9b8-1f3ff",shortnames:[":superhero_dark_skin_tone:"],category:"people"},":supervillain_tone1:":{uc_base:"1f9b9-1f3fb",uc_output:"1f9b9-1f3fb",uc_match:"1f9b9-1f3fb",uc_greedy:"1f9b9-1f3fb",shortnames:[":supervillain_light_skin_tone:"],category:"people"},":supervillain_tone2:":{uc_base:"1f9b9-1f3fc",uc_output:"1f9b9-1f3fc",uc_match:"1f9b9-1f3fc",uc_greedy:"1f9b9-1f3fc",shortnames:[":supervillain_medium_light_skin_tone:"],category:"people"},":supervillain_tone3:":{uc_base:"1f9b9-1f3fd",uc_output:"1f9b9-1f3fd",uc_match:"1f9b9-1f3fd",uc_greedy:"1f9b9-1f3fd",shortnames:[":supervillain_medium_skin_tone:"],category:"people"},":supervillain_tone4:":{uc_base:"1f9b9-1f3fe",uc_output:"1f9b9-1f3fe",uc_match:"1f9b9-1f3fe",uc_greedy:"1f9b9-1f3fe",shortnames:[":supervillain_medium_dark_skin_tone:"],category:"people"},":supervillain_tone5:":{uc_base:"1f9b9-1f3ff",uc_output:"1f9b9-1f3ff",uc_match:"1f9b9-1f3ff",uc_greedy:"1f9b9-1f3ff",shortnames:[":supervillain_dark_skin_tone:"],category:"people"},":thumbsdown_tone1:":{uc_base:"1f44e-1f3fb",uc_output:"1f44e-1f3fb",uc_match:"1f44e-1f3fb",uc_greedy:"1f44e-1f3fb",shortnames:[":-1_tone1:",":thumbdown_tone1:"],category:"people"},":thumbsdown_tone2:":{uc_base:"1f44e-1f3fc",uc_output:"1f44e-1f3fc",uc_match:"1f44e-1f3fc",uc_greedy:"1f44e-1f3fc",shortnames:[":-1_tone2:",":thumbdown_tone2:"],category:"people"},":thumbsdown_tone3:":{uc_base:"1f44e-1f3fd",uc_output:"1f44e-1f3fd",uc_match:"1f44e-1f3fd",uc_greedy:"1f44e-1f3fd",shortnames:[":-1_tone3:",":thumbdown_tone3:"],category:"people"},":thumbsdown_tone4:":{uc_base:"1f44e-1f3fe",uc_output:"1f44e-1f3fe",uc_match:"1f44e-1f3fe",uc_greedy:"1f44e-1f3fe",shortnames:[":-1_tone4:",":thumbdown_tone4:"],category:"people"},":thumbsdown_tone5:":{uc_base:"1f44e-1f3ff",uc_output:"1f44e-1f3ff",uc_match:"1f44e-1f3ff",uc_greedy:"1f44e-1f3ff",shortnames:[":-1_tone5:",":thumbdown_tone5:"],category:"people"},":thumbsup_tone1:":{uc_base:"1f44d-1f3fb",uc_output:"1f44d-1f3fb",uc_match:"1f44d-1f3fb",uc_greedy:"1f44d-1f3fb",shortnames:[":+1_tone1:",":thumbup_tone1:"],category:"people"},":thumbsup_tone2:":{uc_base:"1f44d-1f3fc",uc_output:"1f44d-1f3fc",uc_match:"1f44d-1f3fc",uc_greedy:"1f44d-1f3fc",shortnames:[":+1_tone2:",":thumbup_tone2:"],category:"people"},":thumbsup_tone3:":{uc_base:"1f44d-1f3fd",uc_output:"1f44d-1f3fd",uc_match:"1f44d-1f3fd",uc_greedy:"1f44d-1f3fd",shortnames:[":+1_tone3:",":thumbup_tone3:"],category:"people"},":thumbsup_tone4:":{uc_base:"1f44d-1f3fe",uc_output:"1f44d-1f3fe",uc_match:"1f44d-1f3fe",uc_greedy:"1f44d-1f3fe",shortnames:[":+1_tone4:",":thumbup_tone4:"],category:"people"},":thumbsup_tone5:":{uc_base:"1f44d-1f3ff",uc_output:"1f44d-1f3ff",uc_match:"1f44d-1f3ff",uc_greedy:"1f44d-1f3ff",shortnames:[":+1_tone5:",":thumbup_tone5:"],category:"people"},":united_nations:":{uc_base:"1f1fa-1f1f3",uc_output:"1f1fa-1f1f3",uc_match:"1f1fa-1f1f3",uc_greedy:"1f1fa-1f1f3",shortnames:[],category:"flags"},":vampire_tone1:":{uc_base:"1f9db-1f3fb",uc_output:"1f9db-1f3fb",uc_match:"1f9db-1f3fb",uc_greedy:"1f9db-1f3fb",shortnames:[":vampire_light_skin_tone:"],category:"people"},":vampire_tone2:":{uc_base:"1f9db-1f3fc",uc_output:"1f9db-1f3fc",uc_match:"1f9db-1f3fc",uc_greedy:"1f9db-1f3fc",shortnames:[":vampire_medium_light_skin_tone:"],category:"people"},":vampire_tone3:":{uc_base:"1f9db-1f3fd",uc_output:"1f9db-1f3fd",uc_match:"1f9db-1f3fd",uc_greedy:"1f9db-1f3fd",shortnames:[":vampire_medium_skin_tone:"],category:"people"},":vampire_tone4:":{uc_base:"1f9db-1f3fe",uc_output:"1f9db-1f3fe",uc_match:"1f9db-1f3fe",uc_greedy:"1f9db-1f3fe",shortnames:[":vampire_medium_dark_skin_tone:"],category:"people"},":vampire_tone5:":{uc_base:"1f9db-1f3ff",uc_output:"1f9db-1f3ff",uc_match:"1f9db-1f3ff",uc_greedy:"1f9db-1f3ff",shortnames:[":vampire_dark_skin_tone:"],category:"people"},":vulcan_tone1:":{uc_base:"1f596-1f3fb",uc_output:"1f596-1f3fb",uc_match:"1f596-1f3fb",uc_greedy:"1f596-1f3fb",shortnames:[":raised_hand_with_part_between_middle_and_ring_fingers_tone1:"],category:"people"},":vulcan_tone2:":{uc_base:"1f596-1f3fc",uc_output:"1f596-1f3fc",uc_match:"1f596-1f3fc",uc_greedy:"1f596-1f3fc",shortnames:[":raised_hand_with_part_between_middle_and_ring_fingers_tone2:"],category:"people"},":vulcan_tone3:":{uc_base:"1f596-1f3fd",uc_output:"1f596-1f3fd",uc_match:"1f596-1f3fd",uc_greedy:"1f596-1f3fd",shortnames:[":raised_hand_with_part_between_middle_and_ring_fingers_tone3:"],category:"people"},":vulcan_tone4:":{uc_base:"1f596-1f3fe",uc_output:"1f596-1f3fe",uc_match:"1f596-1f3fe",uc_greedy:"1f596-1f3fe",shortnames:[":raised_hand_with_part_between_middle_and_ring_fingers_tone4:"],category:"people"},":vulcan_tone5:":{uc_base:"1f596-1f3ff",uc_output:"1f596-1f3ff",uc_match:"1f596-1f3ff",uc_greedy:"1f596-1f3ff",shortnames:[":raised_hand_with_part_between_middle_and_ring_fingers_tone5:"],category:"people"},":wave_tone1:":{uc_base:"1f44b-1f3fb",uc_output:"1f44b-1f3fb",uc_match:"1f44b-1f3fb",uc_greedy:"1f44b-1f3fb",shortnames:[],category:"people"},":wave_tone2:":{uc_base:"1f44b-1f3fc",uc_output:"1f44b-1f3fc",uc_match:"1f44b-1f3fc",uc_greedy:"1f44b-1f3fc",shortnames:[],category:"people"},":wave_tone3:":{uc_base:"1f44b-1f3fd",uc_output:"1f44b-1f3fd",uc_match:"1f44b-1f3fd",uc_greedy:"1f44b-1f3fd",shortnames:[],category:"people"},":wave_tone4:":{uc_base:"1f44b-1f3fe",uc_output:"1f44b-1f3fe",uc_match:"1f44b-1f3fe",uc_greedy:"1f44b-1f3fe",shortnames:[],category:"people"},":wave_tone5:":{uc_base:"1f44b-1f3ff",uc_output:"1f44b-1f3ff",uc_match:"1f44b-1f3ff",uc_greedy:"1f44b-1f3ff",shortnames:[],category:"people"},":woman_tone1:":{uc_base:"1f469-1f3fb",uc_output:"1f469-1f3fb",uc_match:"1f469-1f3fb",uc_greedy:"1f469-1f3fb",shortnames:[],category:"people"},":woman_tone2:":{uc_base:"1f469-1f3fc",uc_output:"1f469-1f3fc",uc_match:"1f469-1f3fc",uc_greedy:"1f469-1f3fc",shortnames:[],category:"people"},":woman_tone3:":{uc_base:"1f469-1f3fd",uc_output:"1f469-1f3fd",uc_match:"1f469-1f3fd",uc_greedy:"1f469-1f3fd",shortnames:[],category:"people"},":woman_tone4:":{uc_base:"1f469-1f3fe",uc_output:"1f469-1f3fe",uc_match:"1f469-1f3fe",uc_greedy:"1f469-1f3fe",shortnames:[],category:"people"},":woman_tone5:":{uc_base:"1f469-1f3ff",uc_output:"1f469-1f3ff",uc_match:"1f469-1f3ff",uc_greedy:"1f469-1f3ff",shortnames:[],category:"people"},":woman_with_headscarf_tone1:":{uc_base:"1f9d5-1f3fb",uc_output:"1f9d5-1f3fb",uc_match:"1f9d5-1f3fb",uc_greedy:"1f9d5-1f3fb",shortnames:[":woman_with_headscarf_light_skin_tone:"],category:"people"},":woman_with_headscarf_tone2:":{uc_base:"1f9d5-1f3fc",uc_output:"1f9d5-1f3fc",uc_match:"1f9d5-1f3fc",uc_greedy:"1f9d5-1f3fc",shortnames:[":woman_with_headscarf_medium_light_skin_tone:"],category:"people"},":woman_with_headscarf_tone3:":{uc_base:"1f9d5-1f3fd",uc_output:"1f9d5-1f3fd",uc_match:"1f9d5-1f3fd",uc_greedy:"1f9d5-1f3fd",shortnames:[":woman_with_headscarf_medium_skin_tone:"],category:"people"},":woman_with_headscarf_tone4:":{uc_base:"1f9d5-1f3fe",uc_output:"1f9d5-1f3fe",uc_match:"1f9d5-1f3fe",uc_greedy:"1f9d5-1f3fe",shortnames:[":woman_with_headscarf_medium_dark_skin_tone:"],category:"people"},":woman_with_headscarf_tone5:":{uc_base:"1f9d5-1f3ff",uc_output:"1f9d5-1f3ff",uc_match:"1f9d5-1f3ff",uc_greedy:"1f9d5-1f3ff",shortnames:[":woman_with_headscarf_dark_skin_tone:"],category:"people"},":fist_tone1:":{uc_base:"270a-1f3fb",uc_output:"270a-1f3fb",uc_match:"270a-1f3fb",uc_greedy:"270a-1f3fb",shortnames:[],category:"people"},":fist_tone2:":{uc_base:"270a-1f3fc",uc_output:"270a-1f3fc",uc_match:"270a-1f3fc",uc_greedy:"270a-1f3fc",shortnames:[],category:"people"},":fist_tone3:":{uc_base:"270a-1f3fd",uc_output:"270a-1f3fd",uc_match:"270a-1f3fd",uc_greedy:"270a-1f3fd",shortnames:[],category:"people"},":fist_tone4:":{uc_base:"270a-1f3fe",uc_output:"270a-1f3fe",uc_match:"270a-1f3fe",uc_greedy:"270a-1f3fe",shortnames:[],category:"people"},":fist_tone5:":{uc_base:"270a-1f3ff",uc_output:"270a-1f3ff",uc_match:"270a-1f3ff",uc_greedy:"270a-1f3ff",shortnames:[],category:"people"},":person_bouncing_ball_tone1:":{uc_base:"26f9-1f3fb",uc_output:"26f9-1f3fb",uc_match:"26f9-fe0f-1f3fb",uc_greedy:"26f9-fe0f-1f3fb",shortnames:[":basketball_player_tone1:",":person_with_ball_tone1:"],category:"activity"},":person_bouncing_ball_tone2:":{uc_base:"26f9-1f3fc",uc_output:"26f9-1f3fc",uc_match:"26f9-fe0f-1f3fc",uc_greedy:"26f9-fe0f-1f3fc",shortnames:[":basketball_player_tone2:",":person_with_ball_tone2:"],category:"activity"},":person_bouncing_ball_tone3:":{uc_base:"26f9-1f3fd",uc_output:"26f9-1f3fd",uc_match:"26f9-fe0f-1f3fd",uc_greedy:"26f9-fe0f-1f3fd",shortnames:[":basketball_player_tone3:",":person_with_ball_tone3:"],category:"activity"},":person_bouncing_ball_tone4:":{uc_base:"26f9-1f3fe",uc_output:"26f9-1f3fe",uc_match:"26f9-fe0f-1f3fe",uc_greedy:"26f9-fe0f-1f3fe",shortnames:[":basketball_player_tone4:",":person_with_ball_tone4:"],category:"activity"},":person_bouncing_ball_tone5:":{uc_base:"26f9-1f3ff",uc_output:"26f9-1f3ff",uc_match:"26f9-fe0f-1f3ff",uc_greedy:"26f9-fe0f-1f3ff",shortnames:[":basketball_player_tone5:",":person_with_ball_tone5:"],category:"activity"},":point_up_tone1:":{uc_base:"261d-1f3fb",uc_output:"261d-1f3fb",uc_match:"261d-fe0f-1f3fb",uc_greedy:"261d-fe0f-1f3fb",shortnames:[],category:"people"},":point_up_tone2:":{uc_base:"261d-1f3fc",uc_output:"261d-1f3fc",uc_match:"261d-fe0f-1f3fc",uc_greedy:"261d-fe0f-1f3fc",shortnames:[],category:"people"},":point_up_tone3:":{uc_base:"261d-1f3fd",uc_output:"261d-1f3fd",uc_match:"261d-fe0f-1f3fd",uc_greedy:"261d-fe0f-1f3fd",shortnames:[],category:"people"},":point_up_tone4:":{uc_base:"261d-1f3fe",uc_output:"261d-1f3fe",uc_match:"261d-fe0f-1f3fe",uc_greedy:"261d-fe0f-1f3fe",shortnames:[],category:"people"},":point_up_tone5:":{uc_base:"261d-1f3ff",uc_output:"261d-1f3ff",uc_match:"261d-fe0f-1f3ff",uc_greedy:"261d-fe0f-1f3ff",shortnames:[],category:"people"},":raised_hand_tone1:":{uc_base:"270b-1f3fb",uc_output:"270b-1f3fb",uc_match:"270b-1f3fb",uc_greedy:"270b-1f3fb",shortnames:[],category:"people"},":raised_hand_tone2:":{uc_base:"270b-1f3fc",uc_output:"270b-1f3fc",uc_match:"270b-1f3fc",uc_greedy:"270b-1f3fc",shortnames:[],category:"people"},":raised_hand_tone3:":{uc_base:"270b-1f3fd",uc_output:"270b-1f3fd",uc_match:"270b-1f3fd",uc_greedy:"270b-1f3fd",shortnames:[],category:"people"},":raised_hand_tone4:":{uc_base:"270b-1f3fe",uc_output:"270b-1f3fe",uc_match:"270b-1f3fe",uc_greedy:"270b-1f3fe",shortnames:[],category:"people"},":raised_hand_tone5:":{uc_base:"270b-1f3ff",uc_output:"270b-1f3ff",uc_match:"270b-1f3ff",uc_greedy:"270b-1f3ff",shortnames:[],category:"people"},":v_tone1:":{uc_base:"270c-1f3fb",uc_output:"270c-1f3fb",uc_match:"270c-fe0f-1f3fb",uc_greedy:"270c-fe0f-1f3fb",shortnames:[],category:"people"},":v_tone2:":{uc_base:"270c-1f3fc",uc_output:"270c-1f3fc",uc_match:"270c-fe0f-1f3fc",uc_greedy:"270c-fe0f-1f3fc",shortnames:[],category:"people"},":v_tone3:":{uc_base:"270c-1f3fd",uc_output:"270c-1f3fd",uc_match:"270c-fe0f-1f3fd",uc_greedy:"270c-fe0f-1f3fd",shortnames:[],category:"people"},":v_tone4:":{uc_base:"270c-1f3fe",uc_output:"270c-1f3fe",uc_match:"270c-fe0f-1f3fe",uc_greedy:"270c-fe0f-1f3fe",shortnames:[],category:"people"},":v_tone5:":{uc_base:"270c-1f3ff",uc_output:"270c-1f3ff",uc_match:"270c-fe0f-1f3ff",uc_greedy:"270c-fe0f-1f3ff",shortnames:[],category:"people"},":writing_hand_tone1:":{uc_base:"270d-1f3fb",uc_output:"270d-1f3fb",uc_match:"270d-fe0f-1f3fb",uc_greedy:"270d-fe0f-1f3fb",shortnames:[],category:"people"},":writing_hand_tone2:":{uc_base:"270d-1f3fc",uc_output:"270d-1f3fc",uc_match:"270d-fe0f-1f3fc",uc_greedy:"270d-fe0f-1f3fc",shortnames:[],category:"people"},":writing_hand_tone3:":{uc_base:"270d-1f3fd",uc_output:"270d-1f3fd",uc_match:"270d-fe0f-1f3fd",uc_greedy:"270d-fe0f-1f3fd",shortnames:[],category:"people"},":writing_hand_tone4:":{uc_base:"270d-1f3fe",uc_output:"270d-1f3fe",uc_match:"270d-fe0f-1f3fe",uc_greedy:"270d-fe0f-1f3fe",shortnames:[],category:"people"},":writing_hand_tone5:":{uc_base:"270d-1f3ff",uc_output:"270d-1f3ff",uc_match:"270d-fe0f-1f3ff",uc_greedy:"270d-fe0f-1f3ff",shortnames:[],category:"people"},":chess_pawn:":{uc_base:"265f",uc_output:"265f-fe0f",uc_match:"265f",uc_greedy:"265f",shortnames:[],category:"objects"},":infinity:":{uc_base:"267e",uc_output:"267e-fe0f",uc_match:"267e",uc_greedy:"267e",shortnames:[],category:"symbols"},":100:":{uc_base:"1f4af",uc_output:"1f4af",uc_match:"1f4af",uc_greedy:"1f4af",shortnames:[],category:"symbols"},":1234:":{uc_base:"1f522",uc_output:"1f522",uc_match:"1f522",uc_greedy:"1f522",shortnames:[],category:"symbols"},":8ball:":{uc_base:"1f3b1",uc_output:"1f3b1",uc_match:"1f3b1",uc_greedy:"1f3b1",shortnames:[],category:"activity"},":a:":{uc_base:"1f170",uc_output:"1f170",uc_match:"1f170-fe0f",uc_greedy:"1f170-fe0f",shortnames:[],category:"symbols"},":ab:":{uc_base:"1f18e",uc_output:"1f18e",uc_match:"1f18e",uc_greedy:"1f18e",shortnames:[],category:"symbols"},":abacus:":{uc_base:"1f9ee",uc_output:"1f9ee",uc_match:"1f9ee",uc_greedy:"1f9ee",shortnames:[],category:"objects"},":abc:":{uc_base:"1f524",uc_output:"1f524",uc_match:"1f524",uc_greedy:"1f524",shortnames:[],category:"symbols"},":abcd:":{uc_base:"1f521",uc_output:"1f521",uc_match:"1f521",uc_greedy:"1f521",shortnames:[],category:"symbols"},":accept:":{uc_base:"1f251",uc_output:"1f251",uc_match:"1f251",uc_greedy:"1f251",shortnames:[],category:"symbols"},":adult:":{uc_base:"1f9d1",uc_output:"1f9d1",uc_match:"1f9d1",uc_greedy:"1f9d1",shortnames:[],category:"people"},":aerial_tramway:":{uc_base:"1f6a1",uc_output:"1f6a1",uc_match:"1f6a1",uc_greedy:"1f6a1",shortnames:[],category:"travel"},":airplane_arriving:":{uc_base:"1f6ec",uc_output:"1f6ec",uc_match:"1f6ec",uc_greedy:"1f6ec",shortnames:[],category:"travel"},":airplane_departure:":{uc_base:"1f6eb",uc_output:"1f6eb",uc_match:"1f6eb",uc_greedy:"1f6eb",shortnames:[],category:"travel"},":airplane_small:":{uc_base:"1f6e9",uc_output:"1f6e9",uc_match:"1f6e9-fe0f",uc_greedy:"1f6e9-fe0f",shortnames:[":small_airplane:"],category:"travel"},":alien:":{uc_base:"1f47d",uc_output:"1f47d",uc_match:"1f47d-fe0f",uc_greedy:"1f47d-fe0f",shortnames:[],category:"people"},":ambulance:":{uc_base:"1f691",uc_output:"1f691",uc_match:"1f691-fe0f",uc_greedy:"1f691-fe0f",shortnames:[],category:"travel"},":amphora:":{uc_base:"1f3fa",uc_output:"1f3fa",uc_match:"1f3fa",uc_greedy:"1f3fa",shortnames:[],category:"objects"},":angel:":{uc_base:"1f47c",uc_output:"1f47c",uc_match:"1f47c",uc_greedy:"1f47c",shortnames:[],category:"people"},":anger:":{uc_base:"1f4a2",uc_output:"1f4a2",uc_match:"1f4a2",uc_greedy:"1f4a2",shortnames:[],category:"symbols"},":anger_right:":{uc_base:"1f5ef",uc_output:"1f5ef",uc_match:"1f5ef-fe0f",uc_greedy:"1f5ef-fe0f",shortnames:[":right_anger_bubble:"],category:"symbols"},":angry:":{uc_base:"1f620",uc_output:"1f620",uc_match:"1f620",uc_greedy:"1f620",shortnames:[],category:"people"},":anguished:":{uc_base:"1f627",uc_output:"1f627",uc_match:"1f627",uc_greedy:"1f627",shortnames:[],category:"people"},":ant:":{uc_base:"1f41c",uc_output:"1f41c",uc_match:"1f41c",uc_greedy:"1f41c",shortnames:[],category:"nature"},":apple:":{uc_base:"1f34e",uc_output:"1f34e",uc_match:"1f34e",uc_greedy:"1f34e",shortnames:[],category:"food"},":arrow_down_small:":{uc_base:"1f53d",uc_output:"1f53d",uc_match:"1f53d",uc_greedy:"1f53d",shortnames:[],category:"symbols"},":arrow_up_small:":{uc_base:"1f53c",uc_output:"1f53c",uc_match:"1f53c",uc_greedy:"1f53c",shortnames:[],category:"symbols"},":arrows_clockwise:":{uc_base:"1f503",uc_output:"1f503",uc_match:"1f503",uc_greedy:"1f503",shortnames:[],category:"symbols"},":arrows_counterclockwise:":{uc_base:"1f504",uc_output:"1f504",uc_match:"1f504",uc_greedy:"1f504",shortnames:[],category:"symbols"},":art:":{uc_base:"1f3a8",uc_output:"1f3a8",uc_match:"1f3a8",uc_greedy:"1f3a8",shortnames:[],category:"activity"},":articulated_lorry:":{uc_base:"1f69b",uc_output:"1f69b",uc_match:"1f69b",uc_greedy:"1f69b",shortnames:[],category:"travel"},":astonished:":{uc_base:"1f632",uc_output:"1f632",uc_match:"1f632",uc_greedy:"1f632",shortnames:[],category:"people"},":athletic_shoe:":{uc_base:"1f45f",uc_output:"1f45f",uc_match:"1f45f",uc_greedy:"1f45f",shortnames:[],category:"people"},":atm:":{uc_base:"1f3e7",uc_output:"1f3e7",uc_match:"1f3e7",uc_greedy:"1f3e7",shortnames:[],category:"symbols"},":avocado:":{uc_base:"1f951",uc_output:"1f951",uc_match:"1f951",uc_greedy:"1f951",shortnames:[],category:"food"},":b:":{uc_base:"1f171",uc_output:"1f171",uc_match:"1f171-fe0f",uc_greedy:"1f171-fe0f",shortnames:[],category:"symbols"},":baby:":{uc_base:"1f476",uc_output:"1f476",uc_match:"1f476",uc_greedy:"1f476",shortnames:[],category:"people"},":baby_bottle:":{uc_base:"1f37c",uc_output:"1f37c",uc_match:"1f37c",uc_greedy:"1f37c",shortnames:[],category:"food"},":baby_chick:":{uc_base:"1f424",uc_output:"1f424",uc_match:"1f424",uc_greedy:"1f424",shortnames:[],category:"nature"},":baby_symbol:":{uc_base:"1f6bc",uc_output:"1f6bc",uc_match:"1f6bc-fe0f",uc_greedy:"1f6bc-fe0f",shortnames:[],category:"symbols"},":back:":{uc_base:"1f519",uc_output:"1f519",uc_match:"1f519",uc_greedy:"1f519",shortnames:[],category:"symbols"},":bacon:":{uc_base:"1f953",uc_output:"1f953",uc_match:"1f953",uc_greedy:"1f953",shortnames:[],category:"food"},":badger:":{uc_base:"1f9a1",uc_output:"1f9a1",uc_match:"1f9a1",uc_greedy:"1f9a1",shortnames:[],category:"nature"},":badminton:":{uc_base:"1f3f8",uc_output:"1f3f8",uc_match:"1f3f8",uc_greedy:"1f3f8",shortnames:[],category:"activity"},":bagel:":{uc_base:"1f96f",uc_output:"1f96f",uc_match:"1f96f",uc_greedy:"1f96f",shortnames:[],category:"food"},":baggage_claim:":{uc_base:"1f6c4",uc_output:"1f6c4",uc_match:"1f6c4",uc_greedy:"1f6c4",shortnames:[],category:"symbols"},":bald:":{uc_base:"1f9b2",uc_output:"1f9b2",uc_match:"1f9b2",uc_greedy:"1f9b2",shortnames:[],category:"people"},":balloon:":{uc_base:"1f388",uc_output:"1f388",uc_match:"1f388",uc_greedy:"1f388",shortnames:[],category:"objects"},":ballot_box:":{uc_base:"1f5f3",uc_output:"1f5f3",uc_match:"1f5f3-fe0f",uc_greedy:"1f5f3-fe0f",shortnames:[":ballot_box_with_ballot:"],category:"objects"},":bamboo:":{uc_base:"1f38d",uc_output:"1f38d",uc_match:"1f38d",uc_greedy:"1f38d",shortnames:[],category:"nature"},":banana:":{uc_base:"1f34c",uc_output:"1f34c",uc_match:"1f34c",uc_greedy:"1f34c",shortnames:[],category:"food"},":bank:":{uc_base:"1f3e6",uc_output:"1f3e6",uc_match:"1f3e6",uc_greedy:"1f3e6",shortnames:[],category:"travel"},":bar_chart:":{uc_base:"1f4ca",uc_output:"1f4ca",uc_match:"1f4ca",uc_greedy:"1f4ca",shortnames:[],category:"objects"},":barber:":{uc_base:"1f488",uc_output:"1f488",uc_match:"1f488",uc_greedy:"1f488",shortnames:[],category:"objects"},":basket:":{uc_base:"1f9fa",uc_output:"1f9fa",uc_match:"1f9fa",uc_greedy:"1f9fa",shortnames:[],category:"objects"},":basketball:":{uc_base:"1f3c0",uc_output:"1f3c0",uc_match:"1f3c0",uc_greedy:"1f3c0",shortnames:[],category:"activity"},":bat:":{uc_base:"1f987",uc_output:"1f987",uc_match:"1f987",uc_greedy:"1f987",shortnames:[],category:"nature"},":bath:":{uc_base:"1f6c0",uc_output:"1f6c0",uc_match:"1f6c0",uc_greedy:"1f6c0",shortnames:[],category:"objects"},":bathtub:":{uc_base:"1f6c1",uc_output:"1f6c1",uc_match:"1f6c1",uc_greedy:"1f6c1",shortnames:[],category:"objects"},":battery:":{uc_base:"1f50b",uc_output:"1f50b",uc_match:"1f50b",uc_greedy:"1f50b",shortnames:[],category:"objects"},":beach:":{uc_base:"1f3d6",uc_output:"1f3d6",uc_match:"1f3d6-fe0f",uc_greedy:"1f3d6-fe0f",shortnames:[":beach_with_umbrella:"],category:"travel"},":bear:":{uc_base:"1f43b",uc_output:"1f43b",uc_match:"1f43b",uc_greedy:"1f43b",shortnames:[],category:"nature"},":bearded_person:":{uc_base:"1f9d4",uc_output:"1f9d4",uc_match:"1f9d4",uc_greedy:"1f9d4",shortnames:[],category:"people"},":bed:":{uc_base:"1f6cf",uc_output:"1f6cf",uc_match:"1f6cf-fe0f",uc_greedy:"1f6cf-fe0f",shortnames:[],category:"objects"},":bee:":{uc_base:"1f41d",uc_output:"1f41d",uc_match:"1f41d",uc_greedy:"1f41d",shortnames:[],category:"nature"},":beer:":{uc_base:"1f37a",uc_output:"1f37a",uc_match:"1f37a",uc_greedy:"1f37a",shortnames:[],category:"food"},":beers:":{uc_base:"1f37b",uc_output:"1f37b",uc_match:"1f37b",uc_greedy:"1f37b",shortnames:[],category:"food"},":beetle:":{uc_base:"1f41e",uc_output:"1f41e",uc_match:"1f41e",uc_greedy:"1f41e",shortnames:[],category:"nature"},":beginner:":{uc_base:"1f530",uc_output:"1f530",uc_match:"1f530",uc_greedy:"1f530",shortnames:[],category:"symbols"},":bell:":{uc_base:"1f514",uc_output:"1f514",uc_match:"1f514",uc_greedy:"1f514",shortnames:[],category:"symbols"},":bellhop:":{uc_base:"1f6ce",uc_output:"1f6ce",uc_match:"1f6ce-fe0f",uc_greedy:"1f6ce-fe0f",shortnames:[":bellhop_bell:"],category:"objects"},":bento:":{uc_base:"1f371",uc_output:"1f371",uc_match:"1f371",uc_greedy:"1f371",shortnames:[],category:"food"},":bike:":{uc_base:"1f6b2",uc_output:"1f6b2",uc_match:"1f6b2-fe0f",uc_greedy:"1f6b2-fe0f",shortnames:[],category:"travel"},":bikini:":{uc_base:"1f459",uc_output:"1f459",uc_match:"1f459",uc_greedy:"1f459",shortnames:[],category:"people"},":billed_cap:":{uc_base:"1f9e2",uc_output:"1f9e2",uc_match:"1f9e2",uc_greedy:"1f9e2",shortnames:[],category:"people"},":bird:":{uc_base:"1f426",uc_output:"1f426",uc_match:"1f426-fe0f",uc_greedy:"1f426-fe0f",shortnames:[],category:"nature"},":birthday:":{uc_base:"1f382",uc_output:"1f382",uc_match:"1f382",uc_greedy:"1f382",shortnames:[],category:"food"},":black_heart:":{uc_base:"1f5a4",uc_output:"1f5a4",uc_match:"1f5a4",uc_greedy:"1f5a4",shortnames:[],category:"symbols"},":black_joker:":{uc_base:"1f0cf",uc_output:"1f0cf",uc_match:"1f0cf",uc_greedy:"1f0cf",shortnames:[],category:"symbols"},":black_square_button:":{uc_base:"1f532",uc_output:"1f532",uc_match:"1f532",uc_greedy:"1f532",shortnames:[],category:"symbols"},":blond_haired_person:":{uc_base:"1f471",uc_output:"1f471",uc_match:"1f471",uc_greedy:"1f471",shortnames:[":person_with_blond_hair:"],category:"people"},":blossom:":{uc_base:"1f33c",uc_output:"1f33c",uc_match:"1f33c",uc_greedy:"1f33c",shortnames:[],category:"nature"},":blowfish:":{uc_base:"1f421",uc_output:"1f421",uc_match:"1f421",uc_greedy:"1f421",shortnames:[],category:"nature"},":blue_book:":{uc_base:"1f4d8",uc_output:"1f4d8",uc_match:"1f4d8",uc_greedy:"1f4d8",shortnames:[],category:"objects"},":blue_car:":{uc_base:"1f699",uc_output:"1f699",uc_match:"1f699",uc_greedy:"1f699",shortnames:[],category:"travel"},":blue_circle:":{uc_base:"1f535",uc_output:"1f535",uc_match:"1f535",uc_greedy:"1f535",shortnames:[],category:"symbols"},":blue_heart:":{uc_base:"1f499",uc_output:"1f499",uc_match:"1f499",uc_greedy:"1f499",shortnames:[],category:"symbols"},":blush:":{uc_base:"1f60a",uc_output:"1f60a",uc_match:"1f60a",uc_greedy:"1f60a",shortnames:[],category:"people"},":boar:":{uc_base:"1f417",uc_output:"1f417",uc_match:"1f417",uc_greedy:"1f417",shortnames:[],category:"nature"},":bomb:":{uc_base:"1f4a3",uc_output:"1f4a3",uc_match:"1f4a3-fe0f",uc_greedy:"1f4a3-fe0f",shortnames:[],category:"objects"},":bone:":{uc_base:"1f9b4",uc_output:"1f9b4",uc_match:"1f9b4",uc_greedy:"1f9b4",shortnames:[],category:"people"},":book:":{uc_base:"1f4d6",uc_output:"1f4d6",uc_match:"1f4d6",uc_greedy:"1f4d6",shortnames:[],category:"objects"},":bookmark:":{uc_base:"1f516",uc_output:"1f516",uc_match:"1f516",uc_greedy:"1f516",shortnames:[],category:"objects"},":bookmark_tabs:":{uc_base:"1f4d1",uc_output:"1f4d1",uc_match:"1f4d1",uc_greedy:"1f4d1",shortnames:[],category:"objects"},":books:":{uc_base:"1f4da",uc_output:"1f4da",uc_match:"1f4da-fe0f",uc_greedy:"1f4da-fe0f",shortnames:[],category:"objects"},":boom:":{uc_base:"1f4a5",uc_output:"1f4a5",uc_match:"1f4a5",uc_greedy:"1f4a5",shortnames:[],category:"nature"},":boot:":{uc_base:"1f462",uc_output:"1f462",uc_match:"1f462",uc_greedy:"1f462",shortnames:[],category:"people"},":bouquet:":{uc_base:"1f490",uc_output:"1f490",uc_match:"1f490",uc_greedy:"1f490",shortnames:[],category:"nature"},":bow_and_arrow:":{uc_base:"1f3f9",uc_output:"1f3f9",uc_match:"1f3f9",uc_greedy:"1f3f9",shortnames:[":archery:"],category:"activity"},":bowl_with_spoon:":{uc_base:"1f963",uc_output:"1f963",uc_match:"1f963",uc_greedy:"1f963",shortnames:[],category:"food"},":bowling:":{uc_base:"1f3b3",uc_output:"1f3b3",uc_match:"1f3b3",uc_greedy:"1f3b3",shortnames:[],category:"activity"},":boxing_glove:":{uc_base:"1f94a",uc_output:"1f94a",uc_match:"1f94a",uc_greedy:"1f94a",shortnames:[":boxing_gloves:"],category:"activity"},":boy:":{uc_base:"1f466",uc_output:"1f466",uc_match:"1f466",uc_greedy:"1f466",shortnames:[],category:"people"},":brain:":{uc_base:"1f9e0",uc_output:"1f9e0",uc_match:"1f9e0",uc_greedy:"1f9e0",shortnames:[],category:"people"},":bread:":{uc_base:"1f35e",uc_output:"1f35e",uc_match:"1f35e",uc_greedy:"1f35e",shortnames:[],category:"food"},":breast_feeding:":{uc_base:"1f931",uc_output:"1f931",uc_match:"1f931",uc_greedy:"1f931",shortnames:[],category:"people"},":bricks:":{uc_base:"1f9f1",uc_output:"1f9f1",uc_match:"1f9f1",uc_greedy:"1f9f1",shortnames:[],category:"objects"},":bride_with_veil:":{uc_base:"1f470",uc_output:"1f470",uc_match:"1f470",uc_greedy:"1f470",shortnames:[],category:"people"},":bridge_at_night:":{uc_base:"1f309",uc_output:"1f309",uc_match:"1f309",uc_greedy:"1f309",shortnames:[],category:"travel"},":briefcase:":{uc_base:"1f4bc",uc_output:"1f4bc",uc_match:"1f4bc",uc_greedy:"1f4bc",shortnames:[],category:"people"},":broccoli:":{uc_base:"1f966",uc_output:"1f966",uc_match:"1f966",uc_greedy:"1f966",shortnames:[],category:"food"},":broken_heart:":{uc_base:"1f494",uc_output:"1f494",uc_match:"1f494",uc_greedy:"1f494",shortnames:[],category:"symbols"},":broom:":{uc_base:"1f9f9",uc_output:"1f9f9",uc_match:"1f9f9",uc_greedy:"1f9f9",shortnames:[],category:"objects"},":bug:":{uc_base:"1f41b",uc_output:"1f41b",uc_match:"1f41b",uc_greedy:"1f41b",shortnames:[],category:"nature"},":bulb:":{uc_base:"1f4a1",uc_output:"1f4a1",uc_match:"1f4a1",uc_greedy:"1f4a1",shortnames:[],category:"objects"},":bullettrain_front:":{uc_base:"1f685",uc_output:"1f685",uc_match:"1f685",uc_greedy:"1f685",shortnames:[],category:"travel"},":bullettrain_side:":{uc_base:"1f684",uc_output:"1f684",uc_match:"1f684",uc_greedy:"1f684",shortnames:[],category:"travel"},":burrito:":{uc_base:"1f32f",uc_output:"1f32f",uc_match:"1f32f",uc_greedy:"1f32f",shortnames:[],category:"food"},":bus:":{uc_base:"1f68c",uc_output:"1f68c",uc_match:"1f68c",uc_greedy:"1f68c",shortnames:[],category:"travel"},":busstop:":{uc_base:"1f68f",uc_output:"1f68f",uc_match:"1f68f",uc_greedy:"1f68f",shortnames:[],category:"travel"},":bust_in_silhouette:":{uc_base:"1f464",uc_output:"1f464",uc_match:"1f464",uc_greedy:"1f464",shortnames:[],category:"people"},":busts_in_silhouette:":{uc_base:"1f465",uc_output:"1f465",uc_match:"1f465",uc_greedy:"1f465",shortnames:[],category:"people"},":butterfly:":{uc_base:"1f98b",uc_output:"1f98b",uc_match:"1f98b",uc_greedy:"1f98b",shortnames:[],category:"nature"},":cactus:":{uc_base:"1f335",uc_output:"1f335",uc_match:"1f335",uc_greedy:"1f335",shortnames:[],category:"nature"},":cake:":{uc_base:"1f370",uc_output:"1f370",uc_match:"1f370",uc_greedy:"1f370",shortnames:[],category:"food"},":calendar:":{uc_base:"1f4c6",uc_output:"1f4c6",uc_match:"1f4c6",uc_greedy:"1f4c6",shortnames:[],category:"objects"},":calendar_spiral:":{uc_base:"1f5d3",uc_output:"1f5d3",uc_match:"1f5d3-fe0f",uc_greedy:"1f5d3-fe0f",shortnames:[":spiral_calendar_pad:"],category:"objects"},":call_me:":{uc_base:"1f919",uc_output:"1f919",uc_match:"1f919",uc_greedy:"1f919",shortnames:[":call_me_hand:"],category:"people"},":calling:":{uc_base:"1f4f2",uc_output:"1f4f2",uc_match:"1f4f2",uc_greedy:"1f4f2",shortnames:[],category:"objects"},":camel:":{uc_base:"1f42b",uc_output:"1f42b",uc_match:"1f42b",uc_greedy:"1f42b",shortnames:[],category:"nature"},":camera:":{uc_base:"1f4f7",uc_output:"1f4f7",uc_match:"1f4f7-fe0f",uc_greedy:"1f4f7-fe0f",shortnames:[],category:"objects"},":camera_with_flash:":{uc_base:"1f4f8",uc_output:"1f4f8",uc_match:"1f4f8",uc_greedy:"1f4f8",shortnames:[],category:"objects"},":camping:":{uc_base:"1f3d5",uc_output:"1f3d5",uc_match:"1f3d5-fe0f",uc_greedy:"1f3d5-fe0f",shortnames:[],category:"travel"},":candle:":{uc_base:"1f56f",uc_output:"1f56f",uc_match:"1f56f-fe0f",uc_greedy:"1f56f-fe0f",shortnames:[],category:"objects"},":candy:":{uc_base:"1f36c",uc_output:"1f36c",uc_match:"1f36c",uc_greedy:"1f36c",shortnames:[],category:"food"},":canned_food:":{uc_base:"1f96b",uc_output:"1f96b",uc_match:"1f96b",uc_greedy:"1f96b",shortnames:[],category:"food"},":canoe:":{uc_base:"1f6f6",uc_output:"1f6f6",uc_match:"1f6f6",uc_greedy:"1f6f6",shortnames:[":kayak:"],category:"travel"},":capital_abcd:":{uc_base:"1f520",uc_output:"1f520",uc_match:"1f520",uc_greedy:"1f520",shortnames:[],category:"symbols"},":card_box:":{uc_base:"1f5c3",uc_output:"1f5c3",uc_match:"1f5c3-fe0f",uc_greedy:"1f5c3-fe0f",shortnames:[":card_file_box:"],category:"objects"},":card_index:":{uc_base:"1f4c7",uc_output:"1f4c7",uc_match:"1f4c7",uc_greedy:"1f4c7",shortnames:[],category:"objects"},":carousel_horse:":{uc_base:"1f3a0",uc_output:"1f3a0",uc_match:"1f3a0",uc_greedy:"1f3a0",shortnames:[],category:"travel"},":carrot:":{uc_base:"1f955",uc_output:"1f955",uc_match:"1f955",uc_greedy:"1f955",shortnames:[],category:"food"},":cat2:":{uc_base:"1f408",uc_output:"1f408",uc_match:"1f408-fe0f",uc_greedy:"1f408-fe0f",shortnames:[],category:"nature"},":cat:":{uc_base:"1f431",uc_output:"1f431",uc_match:"1f431",uc_greedy:"1f431",shortnames:[],category:"nature"},":cd:":{uc_base:"1f4bf",uc_output:"1f4bf",uc_match:"1f4bf-fe0f",uc_greedy:"1f4bf-fe0f",shortnames:[],category:"objects"},":champagne:":{uc_base:"1f37e",uc_output:"1f37e",uc_match:"1f37e",uc_greedy:"1f37e",shortnames:[":bottle_with_popping_cork:"],category:"food"},":champagne_glass:":{uc_base:"1f942",uc_output:"1f942",uc_match:"1f942",uc_greedy:"1f942",shortnames:[":clinking_glass:"],category:"food"},":chart:":{uc_base:"1f4b9",uc_output:"1f4b9",uc_match:"1f4b9",uc_greedy:"1f4b9",shortnames:[],category:"symbols"},":chart_with_downwards_trend:":{uc_base:"1f4c9",uc_output:"1f4c9",uc_match:"1f4c9",uc_greedy:"1f4c9",shortnames:[],category:"objects"},":chart_with_upwards_trend:":{uc_base:"1f4c8",uc_output:"1f4c8",uc_match:"1f4c8",uc_greedy:"1f4c8",shortnames:[],category:"objects"},":checkered_flag:":{uc_base:"1f3c1",uc_output:"1f3c1",uc_match:"1f3c1",uc_greedy:"1f3c1",shortnames:[],category:"flags"},":cheese:":{uc_base:"1f9c0",uc_output:"1f9c0",uc_match:"1f9c0",uc_greedy:"1f9c0",shortnames:[":cheese_wedge:"],category:"food"},":cherries:":{uc_base:"1f352",uc_output:"1f352",uc_match:"1f352",uc_greedy:"1f352",shortnames:[],category:"food"},":cherry_blossom:":{uc_base:"1f338",uc_output:"1f338",uc_match:"1f338",uc_greedy:"1f338",shortnames:[],category:"nature"},":chestnut:":{uc_base:"1f330",uc_output:"1f330",uc_match:"1f330",uc_greedy:"1f330",shortnames:[],category:"food"},":chicken:":{uc_base:"1f414",uc_output:"1f414",uc_match:"1f414",uc_greedy:"1f414",shortnames:[],category:"nature"},":child:":{uc_base:"1f9d2",uc_output:"1f9d2",uc_match:"1f9d2",uc_greedy:"1f9d2",shortnames:[],category:"people"},":children_crossing:":{uc_base:"1f6b8",uc_output:"1f6b8",uc_match:"1f6b8",uc_greedy:"1f6b8",shortnames:[],category:"symbols"},":chipmunk:":{uc_base:"1f43f",uc_output:"1f43f",uc_match:"1f43f-fe0f",uc_greedy:"1f43f-fe0f",shortnames:[],category:"nature"},":chocolate_bar:":{uc_base:"1f36b",uc_output:"1f36b",uc_match:"1f36b",uc_greedy:"1f36b",shortnames:[],category:"food"},":chopsticks:":{uc_base:"1f962",uc_output:"1f962",uc_match:"1f962",uc_greedy:"1f962",shortnames:[],category:"food"},":christmas_tree:":{uc_base:"1f384",uc_output:"1f384",uc_match:"1f384",uc_greedy:"1f384",shortnames:[],category:"nature"},":cinema:":{uc_base:"1f3a6",uc_output:"1f3a6",uc_match:"1f3a6",uc_greedy:"1f3a6",shortnames:[],category:"symbols"},":circus_tent:":{uc_base:"1f3aa",uc_output:"1f3aa",uc_match:"1f3aa",uc_greedy:"1f3aa",shortnames:[],category:"activity"},":city_dusk:":{uc_base:"1f306",uc_output:"1f306",uc_match:"1f306",uc_greedy:"1f306",shortnames:[],category:"travel"},":city_sunset:":{uc_base:"1f307",uc_output:"1f307",uc_match:"1f307",uc_greedy:"1f307",shortnames:[":city_sunrise:"],category:"travel"},":cityscape:":{uc_base:"1f3d9",uc_output:"1f3d9",uc_match:"1f3d9-fe0f",uc_greedy:"1f3d9-fe0f",shortnames:[],category:"travel"},":cl:":{uc_base:"1f191",uc_output:"1f191",uc_match:"1f191",uc_greedy:"1f191",shortnames:[],category:"symbols"},":clap:":{uc_base:"1f44f",uc_output:"1f44f",uc_match:"1f44f",uc_greedy:"1f44f",shortnames:[],category:"people"},":clapper:":{uc_base:"1f3ac",uc_output:"1f3ac",uc_match:"1f3ac-fe0f",uc_greedy:"1f3ac-fe0f",shortnames:[],category:"activity"},":classical_building:":{uc_base:"1f3db",uc_output:"1f3db",uc_match:"1f3db-fe0f",uc_greedy:"1f3db-fe0f",shortnames:[],category:"travel"},":clipboard:":{uc_base:"1f4cb",uc_output:"1f4cb",uc_match:"1f4cb-fe0f",uc_greedy:"1f4cb-fe0f",shortnames:[],category:"objects"},":clock1030:":{uc_base:"1f565",uc_output:"1f565",uc_match:"1f565-fe0f",uc_greedy:"1f565-fe0f",shortnames:[],category:"symbols"},":clock10:":{uc_base:"1f559",uc_output:"1f559",uc_match:"1f559-fe0f",uc_greedy:"1f559-fe0f",shortnames:[],category:"symbols"},":clock1130:":{uc_base:"1f566",uc_output:"1f566",uc_match:"1f566-fe0f",uc_greedy:"1f566-fe0f",shortnames:[],category:"symbols"},":clock11:":{uc_base:"1f55a",uc_output:"1f55a",uc_match:"1f55a-fe0f",uc_greedy:"1f55a-fe0f",shortnames:[],category:"symbols"},":clock1230:":{uc_base:"1f567",uc_output:"1f567",uc_match:"1f567-fe0f",uc_greedy:"1f567-fe0f",shortnames:[],category:"symbols"},":clock12:":{uc_base:"1f55b",uc_output:"1f55b",uc_match:"1f55b-fe0f",uc_greedy:"1f55b-fe0f",shortnames:[],category:"symbols"},":clock130:":{uc_base:"1f55c",uc_output:"1f55c",uc_match:"1f55c-fe0f",uc_greedy:"1f55c-fe0f",shortnames:[],category:"symbols"},":clock1:":{uc_base:"1f550",uc_output:"1f550",uc_match:"1f550-fe0f",uc_greedy:"1f550-fe0f",shortnames:[],category:"symbols"},":clock230:":{uc_base:"1f55d",uc_output:"1f55d",uc_match:"1f55d-fe0f",uc_greedy:"1f55d-fe0f",shortnames:[],category:"symbols"},":clock2:":{uc_base:"1f551",uc_output:"1f551",uc_match:"1f551-fe0f",uc_greedy:"1f551-fe0f",shortnames:[],category:"symbols"},":clock330:":{uc_base:"1f55e",uc_output:"1f55e",uc_match:"1f55e-fe0f",uc_greedy:"1f55e-fe0f",shortnames:[],category:"symbols"},":clock3:":{uc_base:"1f552",uc_output:"1f552",uc_match:"1f552-fe0f",uc_greedy:"1f552-fe0f",shortnames:[],category:"symbols"},":clock430:":{uc_base:"1f55f",uc_output:"1f55f",uc_match:"1f55f-fe0f",uc_greedy:"1f55f-fe0f",shortnames:[],category:"symbols"},":clock4:":{uc_base:"1f553",uc_output:"1f553",uc_match:"1f553-fe0f",uc_greedy:"1f553-fe0f",shortnames:[],category:"symbols"},":clock530:":{uc_base:"1f560",uc_output:"1f560",uc_match:"1f560-fe0f",uc_greedy:"1f560-fe0f",shortnames:[],category:"symbols"},":clock5:":{uc_base:"1f554",uc_output:"1f554",uc_match:"1f554-fe0f",uc_greedy:"1f554-fe0f",shortnames:[],category:"symbols"},":clock630:":{uc_base:"1f561",uc_output:"1f561",uc_match:"1f561-fe0f",uc_greedy:"1f561-fe0f",shortnames:[],category:"symbols"},":clock6:":{uc_base:"1f555",uc_output:"1f555",uc_match:"1f555-fe0f",uc_greedy:"1f555-fe0f",shortnames:[],category:"symbols"},":clock730:":{uc_base:"1f562",uc_output:"1f562",uc_match:"1f562-fe0f",uc_greedy:"1f562-fe0f",shortnames:[],category:"symbols"},":clock7:":{uc_base:"1f556",uc_output:"1f556",uc_match:"1f556-fe0f",uc_greedy:"1f556-fe0f",shortnames:[],category:"symbols"},":clock830:":{uc_base:"1f563",uc_output:"1f563",uc_match:"1f563-fe0f",uc_greedy:"1f563-fe0f",shortnames:[],category:"symbols"},":clock8:":{uc_base:"1f557",uc_output:"1f557",uc_match:"1f557-fe0f",uc_greedy:"1f557-fe0f",shortnames:[],category:"symbols"},":clock930:":{uc_base:"1f564",uc_output:"1f564",uc_match:"1f564-fe0f",uc_greedy:"1f564-fe0f",shortnames:[],category:"symbols"},":clock9:":{uc_base:"1f558",uc_output:"1f558",uc_match:"1f558-fe0f",uc_greedy:"1f558-fe0f",shortnames:[],category:"symbols"},":clock:":{uc_base:"1f570",uc_output:"1f570",uc_match:"1f570-fe0f",uc_greedy:"1f570-fe0f",shortnames:[":mantlepiece_clock:"],category:"objects"},":closed_book:":{uc_base:"1f4d5",uc_output:"1f4d5",uc_match:"1f4d5",uc_greedy:"1f4d5",shortnames:[],category:"objects"},":closed_lock_with_key:":{uc_base:"1f510",uc_output:"1f510",uc_match:"1f510",uc_greedy:"1f510",shortnames:[],category:"objects"},":closed_umbrella:":{uc_base:"1f302",uc_output:"1f302",uc_match:"1f302",uc_greedy:"1f302",shortnames:[],category:"people"},":cloud_lightning:":{uc_base:"1f329",uc_output:"1f329",uc_match:"1f329-fe0f",uc_greedy:"1f329-fe0f",shortnames:[":cloud_with_lightning:"],category:"nature"},":cloud_rain:":{uc_base:"1f327",uc_output:"1f327",uc_match:"1f327-fe0f",uc_greedy:"1f327-fe0f",shortnames:[":cloud_with_rain:"],category:"nature"},":cloud_snow:":{uc_base:"1f328",uc_output:"1f328",uc_match:"1f328-fe0f",uc_greedy:"1f328-fe0f",shortnames:[":cloud_with_snow:"],category:"nature"},":cloud_tornado:":{uc_base:"1f32a",uc_output:"1f32a",uc_match:"1f32a-fe0f",uc_greedy:"1f32a-fe0f",shortnames:[":cloud_with_tornado:"],category:"nature"},":clown:":{uc_base:"1f921",uc_output:"1f921",uc_match:"1f921",uc_greedy:"1f921",shortnames:[":clown_face:"],category:"people"},":coat:":{uc_base:"1f9e5",uc_output:"1f9e5",uc_match:"1f9e5",uc_greedy:"1f9e5",shortnames:[],category:"people"},":cocktail:":{uc_base:"1f378",uc_output:"1f378",uc_match:"1f378-fe0f",uc_greedy:"1f378-fe0f",shortnames:[],category:"food"},":coconut:":{uc_base:"1f965",uc_output:"1f965",uc_match:"1f965",uc_greedy:"1f965",shortnames:[],category:"food"},":cold_face:":{uc_base:"1f976",uc_output:"1f976",uc_match:"1f976",uc_greedy:"1f976",shortnames:[],category:"people"},":cold_sweat:":{uc_base:"1f630",uc_output:"1f630",uc_match:"1f630",uc_greedy:"1f630",shortnames:[],category:"people"},":compass:":{uc_base:"1f9ed",uc_output:"1f9ed",uc_match:"1f9ed",uc_greedy:"1f9ed",shortnames:[],category:"objects"},":compression:":{uc_base:"1f5dc",uc_output:"1f5dc",uc_match:"1f5dc-fe0f",uc_greedy:"1f5dc-fe0f",shortnames:[],category:"objects"},":computer:":{uc_base:"1f4bb",uc_output:"1f4bb",uc_match:"1f4bb-fe0f",uc_greedy:"1f4bb-fe0f",shortnames:[],category:"objects"},":confetti_ball:":{uc_base:"1f38a",uc_output:"1f38a",uc_match:"1f38a",uc_greedy:"1f38a",shortnames:[],category:"objects"},":confounded:":{uc_base:"1f616",uc_output:"1f616",uc_match:"1f616",uc_greedy:"1f616",shortnames:[],category:"people"},":confused:":{uc_base:"1f615",uc_output:"1f615",uc_match:"1f615",uc_greedy:"1f615",shortnames:[],category:"people"},":construction:":{uc_base:"1f6a7",uc_output:"1f6a7",uc_match:"1f6a7",uc_greedy:"1f6a7",shortnames:[],category:"travel"},":construction_site:":{uc_base:"1f3d7",uc_output:"1f3d7",uc_match:"1f3d7-fe0f",uc_greedy:"1f3d7-fe0f",shortnames:[":building_construction:"],category:"travel"},":construction_worker:":{uc_base:"1f477",uc_output:"1f477",uc_match:"1f477",uc_greedy:"1f477",shortnames:[],category:"people"},":control_knobs:":{uc_base:"1f39b",uc_output:"1f39b",uc_match:"1f39b-fe0f",uc_greedy:"1f39b-fe0f",shortnames:[],category:"objects"},":convenience_store:":{uc_base:"1f3ea",uc_output:"1f3ea",uc_match:"1f3ea",uc_greedy:"1f3ea",shortnames:[],category:"travel"},":cookie:":{uc_base:"1f36a",uc_output:"1f36a",uc_match:"1f36a",uc_greedy:"1f36a",shortnames:[],category:"food"},":cooking:":{uc_base:"1f373",uc_output:"1f373",uc_match:"1f373",uc_greedy:"1f373",shortnames:[],category:"food"},":cool:":{uc_base:"1f192",uc_output:"1f192",uc_match:"1f192",uc_greedy:"1f192",shortnames:[],category:"symbols"},":corn:":{uc_base:"1f33d",uc_output:"1f33d",uc_match:"1f33d",uc_greedy:"1f33d",shortnames:[],category:"food"},":couch:":{uc_base:"1f6cb",uc_output:"1f6cb",uc_match:"1f6cb-fe0f",uc_greedy:"1f6cb-fe0f",shortnames:[":couch_and_lamp:"],category:"objects"},":couple:":{uc_base:"1f46b",uc_output:"1f46b",uc_match:"1f46b",uc_greedy:"1f46b",shortnames:[],category:"people"},":couple_with_heart:":{uc_base:"1f491",uc_output:"1f491",uc_match:"1f491",uc_greedy:"1f491",shortnames:[],category:"people"},":couplekiss:":{uc_base:"1f48f",uc_output:"1f48f",uc_match:"1f48f",uc_greedy:"1f48f",shortnames:[],category:"people"},":cow2:":{uc_base:"1f404",uc_output:"1f404",uc_match:"1f404",uc_greedy:"1f404",shortnames:[],category:"nature"},":cow:":{uc_base:"1f42e",uc_output:"1f42e",uc_match:"1f42e",uc_greedy:"1f42e",shortnames:[],category:"nature"},":cowboy:":{uc_base:"1f920",uc_output:"1f920",uc_match:"1f920",uc_greedy:"1f920",shortnames:[":face_with_cowboy_hat:"],category:"people"},":crab:":{uc_base:"1f980",uc_output:"1f980",uc_match:"1f980",uc_greedy:"1f980",shortnames:[],category:"nature"},":crayon:":{uc_base:"1f58d",uc_output:"1f58d",uc_match:"1f58d-fe0f",uc_greedy:"1f58d-fe0f",shortnames:[":lower_left_crayon:"],category:"objects"},":credit_card:":{uc_base:"1f4b3",uc_output:"1f4b3",uc_match:"1f4b3-fe0f",uc_greedy:"1f4b3-fe0f",shortnames:[],category:"objects"},":crescent_moon:":{uc_base:"1f319",uc_output:"1f319",uc_match:"1f319",uc_greedy:"1f319",shortnames:[],category:"nature"},":cricket:":{uc_base:"1f997",uc_output:"1f997",uc_match:"1f997",uc_greedy:"1f997",shortnames:[],category:"nature"},":cricket_game:":{uc_base:"1f3cf",uc_output:"1f3cf",uc_match:"1f3cf",uc_greedy:"1f3cf",shortnames:[":cricket_bat_ball:"],category:"activity"},":crocodile:":{uc_base:"1f40a",uc_output:"1f40a",uc_match:"1f40a",uc_greedy:"1f40a",shortnames:[],category:"nature"},":croissant:":{uc_base:"1f950",uc_output:"1f950",uc_match:"1f950",uc_greedy:"1f950",shortnames:[],category:"food"},":crossed_flags:":{uc_base:"1f38c",uc_output:"1f38c",uc_match:"1f38c",uc_greedy:"1f38c",shortnames:[],category:"flags"},":crown:":{uc_base:"1f451",uc_output:"1f451",uc_match:"1f451",uc_greedy:"1f451",shortnames:[],category:"people"},":cruise_ship:":{uc_base:"1f6f3",uc_output:"1f6f3",uc_match:"1f6f3-fe0f",uc_greedy:"1f6f3-fe0f",shortnames:[":passenger_ship:"],category:"travel"},":cry:":{uc_base:"1f622",uc_output:"1f622",uc_match:"1f622",uc_greedy:"1f622",shortnames:[],category:"people"},":crying_cat_face:":{uc_base:"1f63f",uc_output:"1f63f",uc_match:"1f63f",uc_greedy:"1f63f",shortnames:[],category:"people"},":crystal_ball:":{uc_base:"1f52e",uc_output:"1f52e",uc_match:"1f52e",uc_greedy:"1f52e",shortnames:[],category:"objects"},":cucumber:":{uc_base:"1f952",uc_output:"1f952",uc_match:"1f952",uc_greedy:"1f952",shortnames:[],category:"food"},":cup_with_straw:":{uc_base:"1f964",uc_output:"1f964",uc_match:"1f964",uc_greedy:"1f964",shortnames:[],category:"food"},":cupcake:":{uc_base:"1f9c1",uc_output:"1f9c1",uc_match:"1f9c1",uc_greedy:"1f9c1",shortnames:[],category:"food"},":cupid:":{uc_base:"1f498",uc_output:"1f498",uc_match:"1f498",uc_greedy:"1f498",shortnames:[],category:"symbols"},":curling_stone:":{uc_base:"1f94c",uc_output:"1f94c",uc_match:"1f94c",uc_greedy:"1f94c",shortnames:[],category:"activity"},":curly_haired:":{uc_base:"1f9b1",uc_output:"1f9b1",uc_match:"1f9b1",uc_greedy:"1f9b1",shortnames:[],category:"people"},":currency_exchange:":{uc_base:"1f4b1",uc_output:"1f4b1",uc_match:"1f4b1",uc_greedy:"1f4b1",shortnames:[],category:"symbols"},":curry:":{uc_base:"1f35b",uc_output:"1f35b",uc_match:"1f35b",uc_greedy:"1f35b",shortnames:[],category:"food"},":custard:":{uc_base:"1f36e",uc_output:"1f36e",uc_match:"1f36e",uc_greedy:"1f36e",shortnames:[":pudding:",":flan:"],category:"food"},":customs:":{uc_base:"1f6c3",uc_output:"1f6c3",uc_match:"1f6c3",uc_greedy:"1f6c3",shortnames:[],category:"symbols"},":cut_of_meat:":{uc_base:"1f969",uc_output:"1f969",uc_match:"1f969",uc_greedy:"1f969",shortnames:[],category:"food"},":cyclone:":{uc_base:"1f300",uc_output:"1f300",uc_match:"1f300",uc_greedy:"1f300",shortnames:[],category:"symbols"},":dagger:":{uc_base:"1f5e1",uc_output:"1f5e1",uc_match:"1f5e1-fe0f",uc_greedy:"1f5e1-fe0f",shortnames:[":dagger_knife:"],category:"objects"},":dancer:":{uc_base:"1f483",uc_output:"1f483",uc_match:"1f483",uc_greedy:"1f483",shortnames:[],category:"people"},":dango:":{uc_base:"1f361",uc_output:"1f361",uc_match:"1f361",uc_greedy:"1f361",shortnames:[],category:"food"},":dark_sunglasses:":{uc_base:"1f576",uc_output:"1f576",uc_match:"1f576-fe0f",uc_greedy:"1f576-fe0f",shortnames:[],category:"people"},":dart:":{uc_base:"1f3af",uc_output:"1f3af",uc_match:"1f3af",uc_greedy:"1f3af",shortnames:[],category:"activity"},":dash:":{uc_base:"1f4a8",uc_output:"1f4a8",uc_match:"1f4a8",uc_greedy:"1f4a8",shortnames:[],category:"nature"},":date:":{uc_base:"1f4c5",uc_output:"1f4c5",uc_match:"1f4c5",uc_greedy:"1f4c5",shortnames:[],category:"objects"},":deciduous_tree:":{uc_base:"1f333",uc_output:"1f333",uc_match:"1f333",uc_greedy:"1f333",shortnames:[],category:"nature"},":deer:":{uc_base:"1f98c",uc_output:"1f98c",uc_match:"1f98c",uc_greedy:"1f98c",shortnames:[],category:"nature"},":department_store:":{uc_base:"1f3ec",uc_output:"1f3ec",uc_match:"1f3ec",uc_greedy:"1f3ec",shortnames:[],category:"travel"},":desert:":{uc_base:"1f3dc",uc_output:"1f3dc",uc_match:"1f3dc-fe0f",uc_greedy:"1f3dc-fe0f",shortnames:[],category:"travel"},":desktop:":{uc_base:"1f5a5",uc_output:"1f5a5",uc_match:"1f5a5-fe0f",uc_greedy:"1f5a5-fe0f",shortnames:[":desktop_computer:"],category:"objects"},":detective:":{uc_base:"1f575",uc_output:"1f575",uc_match:"1f575-fe0f",uc_greedy:"1f575-fe0f",shortnames:[":spy:",":sleuth_or_spy:"],category:"people"},":diamond_shape_with_a_dot_inside:":{uc_base:"1f4a0",uc_output:"1f4a0",uc_match:"1f4a0",uc_greedy:"1f4a0",shortnames:[],category:"symbols"},":disappointed:":{uc_base:"1f61e",uc_output:"1f61e",uc_match:"1f61e",uc_greedy:"1f61e",shortnames:[],category:"people"},":disappointed_relieved:":{uc_base:"1f625",uc_output:"1f625",uc_match:"1f625",uc_greedy:"1f625",shortnames:[],category:"people"},":dividers:":{uc_base:"1f5c2",uc_output:"1f5c2",uc_match:"1f5c2-fe0f",uc_greedy:"1f5c2-fe0f",shortnames:[":card_index_dividers:"],category:"objects"},":dizzy:":{uc_base:"1f4ab",uc_output:"1f4ab",uc_match:"1f4ab",uc_greedy:"1f4ab",shortnames:[],category:"nature"},":dizzy_face:":{uc_base:"1f635",uc_output:"1f635",uc_match:"1f635",uc_greedy:"1f635",shortnames:[],category:"people"},":dna:":{uc_base:"1f9ec",uc_output:"1f9ec",uc_match:"1f9ec",uc_greedy:"1f9ec",shortnames:[],category:"objects"},":do_not_litter:":{uc_base:"1f6af",uc_output:"1f6af",uc_match:"1f6af",uc_greedy:"1f6af",shortnames:[],category:"symbols"},":dog2:":{uc_base:"1f415",uc_output:"1f415",uc_match:"1f415-fe0f",uc_greedy:"1f415-fe0f",shortnames:[],category:"nature"},":dog:":{uc_base:"1f436",uc_output:"1f436",uc_match:"1f436",uc_greedy:"1f436",shortnames:[],category:"nature"},":dollar:":{uc_base:"1f4b5",uc_output:"1f4b5",uc_match:"1f4b5",uc_greedy:"1f4b5",shortnames:[],category:"objects"},":dolls:":{uc_base:"1f38e",uc_output:"1f38e",uc_match:"1f38e",uc_greedy:"1f38e",shortnames:[],category:"objects"},":dolphin:":{uc_base:"1f42c",uc_output:"1f42c",uc_match:"1f42c",uc_greedy:"1f42c",shortnames:[],category:"nature"},":door:":{uc_base:"1f6aa",uc_output:"1f6aa",uc_match:"1f6aa",uc_greedy:"1f6aa",shortnames:[],category:"objects"},":doughnut:":{uc_base:"1f369",uc_output:"1f369",uc_match:"1f369",uc_greedy:"1f369",shortnames:[],category:"food"},":dove:":{uc_base:"1f54a",uc_output:"1f54a",uc_match:"1f54a-fe0f",uc_greedy:"1f54a-fe0f",shortnames:[":dove_of_peace:"],category:"nature"},":dragon:":{uc_base:"1f409",uc_output:"1f409",uc_match:"1f409",uc_greedy:"1f409",shortnames:[],category:"nature"},":dragon_face:":{uc_base:"1f432",uc_output:"1f432",uc_match:"1f432",uc_greedy:"1f432",shortnames:[],category:"nature"},":dress:":{uc_base:"1f457",uc_output:"1f457",uc_match:"1f457",uc_greedy:"1f457",shortnames:[],category:"people"},":dromedary_camel:":{uc_base:"1f42a",uc_output:"1f42a",uc_match:"1f42a",uc_greedy:"1f42a",shortnames:[],category:"nature"},":drooling_face:":{uc_base:"1f924",uc_output:"1f924",uc_match:"1f924",uc_greedy:"1f924",shortnames:[":drool:"],category:"people"},":droplet:":{uc_base:"1f4a7",uc_output:"1f4a7",uc_match:"1f4a7",uc_greedy:"1f4a7",shortnames:[],category:"nature"},":drum:":{uc_base:"1f941",uc_output:"1f941",uc_match:"1f941",uc_greedy:"1f941",shortnames:[":drum_with_drumsticks:"],category:"activity"},":duck:":{uc_base:"1f986",uc_output:"1f986",uc_match:"1f986",uc_greedy:"1f986",shortnames:[],category:"nature"},":dumpling:":{uc_base:"1f95f",uc_output:"1f95f",uc_match:"1f95f",uc_greedy:"1f95f",shortnames:[],category:"food"},":dvd:":{uc_base:"1f4c0",uc_output:"1f4c0",uc_match:"1f4c0",uc_greedy:"1f4c0",shortnames:[],category:"objects"},":e-mail:":{uc_base:"1f4e7",uc_output:"1f4e7",uc_match:"1f4e7",uc_greedy:"1f4e7",shortnames:[":email:"],category:"objects"},":eagle:":{uc_base:"1f985",uc_output:"1f985",uc_match:"1f985",uc_greedy:"1f985",shortnames:[],category:"nature"},":ear:":{uc_base:"1f442",uc_output:"1f442",uc_match:"1f442-fe0f",uc_greedy:"1f442-fe0f",shortnames:[],category:"people"},":ear_of_rice:":{uc_base:"1f33e",uc_output:"1f33e",uc_match:"1f33e",uc_greedy:"1f33e",shortnames:[],category:"nature"},":earth_africa:":{uc_base:"1f30d",uc_output:"1f30d",uc_match:"1f30d-fe0f",uc_greedy:"1f30d-fe0f",shortnames:[],category:"nature"},":earth_americas:":{uc_base:"1f30e",uc_output:"1f30e",uc_match:"1f30e-fe0f",uc_greedy:"1f30e-fe0f",shortnames:[],category:"nature"},":earth_asia:":{uc_base:"1f30f",uc_output:"1f30f",uc_match:"1f30f-fe0f",uc_greedy:"1f30f-fe0f",shortnames:[],category:"nature"},":egg:":{uc_base:"1f95a",uc_output:"1f95a",uc_match:"1f95a",uc_greedy:"1f95a",shortnames:[],category:"food"},":eggplant:":{uc_base:"1f346",uc_output:"1f346",uc_match:"1f346",uc_greedy:"1f346",shortnames:[],category:"food"},":electric_plug:":{uc_base:"1f50c",uc_output:"1f50c",uc_match:"1f50c",uc_greedy:"1f50c",shortnames:[],category:"objects"},":elephant:":{uc_base:"1f418",uc_output:"1f418",uc_match:"1f418",uc_greedy:"1f418",shortnames:[],category:"nature"},":elf:":{uc_base:"1f9dd",uc_output:"1f9dd",uc_match:"1f9dd",uc_greedy:"1f9dd",shortnames:[],category:"people"},":end:":{uc_base:"1f51a",uc_output:"1f51a",uc_match:"1f51a",uc_greedy:"1f51a",shortnames:[],category:"symbols"},":envelope_with_arrow:":{uc_base:"1f4e9",uc_output:"1f4e9",uc_match:"1f4e9",uc_greedy:"1f4e9",shortnames:[],category:"objects"},":euro:":{uc_base:"1f4b6",uc_output:"1f4b6",uc_match:"1f4b6",uc_greedy:"1f4b6",shortnames:[],category:"objects"},":european_castle:":{uc_base:"1f3f0",uc_output:"1f3f0",uc_match:"1f3f0",uc_greedy:"1f3f0",shortnames:[],category:"travel"},":european_post_office:":{uc_base:"1f3e4",uc_output:"1f3e4",uc_match:"1f3e4",uc_greedy:"1f3e4",shortnames:[],category:"travel"},":evergreen_tree:":{uc_base:"1f332",uc_output:"1f332",uc_match:"1f332",uc_greedy:"1f332",shortnames:[],category:"nature"},":exploding_head:":{uc_base:"1f92f",uc_output:"1f92f",uc_match:"1f92f",uc_greedy:"1f92f",shortnames:[],category:"people"},":expressionless:":{uc_base:"1f611",uc_output:"1f611",uc_match:"1f611",uc_greedy:"1f611",shortnames:[],category:"people"},":eye:":{uc_base:"1f441",uc_output:"1f441",uc_match:"1f441-fe0f",uc_greedy:"1f441-fe0f",shortnames:[],category:"people"},":eyeglasses:":{uc_base:"1f453",uc_output:"1f453",uc_match:"1f453-fe0f",uc_greedy:"1f453-fe0f",shortnames:[],category:"people"},":eyes:":{uc_base:"1f440",uc_output:"1f440",uc_match:"1f440",uc_greedy:"1f440",shortnames:[],category:"people"},":face_vomiting:":{uc_base:"1f92e",uc_output:"1f92e",uc_match:"1f92e",uc_greedy:"1f92e",shortnames:[],category:"people"},":face_with_hand_over_mouth:":{uc_base:"1f92d",uc_output:"1f92d",uc_match:"1f92d",uc_greedy:"1f92d",shortnames:[],category:"people"},":face_with_monocle:":{uc_base:"1f9d0",uc_output:"1f9d0",uc_match:"1f9d0",uc_greedy:"1f9d0",shortnames:[],category:"people"},":face_with_raised_eyebrow:":{uc_base:"1f928",uc_output:"1f928",uc_match:"1f928",uc_greedy:"1f928",shortnames:[],category:"people"},":face_with_symbols_over_mouth:":{uc_base:"1f92c",uc_output:"1f92c",uc_match:"1f92c",uc_greedy:"1f92c",shortnames:[],category:"people"},":factory:":{uc_base:"1f3ed",uc_output:"1f3ed",uc_match:"1f3ed-fe0f",uc_greedy:"1f3ed-fe0f",shortnames:[],category:"travel"},":fairy:":{uc_base:"1f9da",uc_output:"1f9da",uc_match:"1f9da",uc_greedy:"1f9da",shortnames:[],category:"people"},":fallen_leaf:":{uc_base:"1f342",uc_output:"1f342",uc_match:"1f342",uc_greedy:"1f342",shortnames:[],category:"nature"},":family:":{uc_base:"1f46a",uc_output:"1f46a",uc_match:"1f46a-fe0f",uc_greedy:"1f46a-fe0f",shortnames:[],category:"people"},":fax:":{uc_base:"1f4e0",uc_output:"1f4e0",uc_match:"1f4e0",uc_greedy:"1f4e0",shortnames:[],category:"objects"},":fearful:":{uc_base:"1f628",uc_output:"1f628",uc_match:"1f628",uc_greedy:"1f628",shortnames:[],category:"people"},":feet:":{uc_base:"1f43e",uc_output:"1f43e",uc_match:"1f43e",uc_greedy:"1f43e",shortnames:[":paw_prints:"],category:"nature"},":ferris_wheel:":{uc_base:"1f3a1",uc_output:"1f3a1",uc_match:"1f3a1",uc_greedy:"1f3a1",shortnames:[],category:"travel"},":field_hockey:":{uc_base:"1f3d1",uc_output:"1f3d1",uc_match:"1f3d1",uc_greedy:"1f3d1",shortnames:[],category:"activity"},":file_cabinet:":{uc_base:"1f5c4",uc_output:"1f5c4",uc_match:"1f5c4-fe0f",uc_greedy:"1f5c4-fe0f",shortnames:[],category:"objects"},":file_folder:":{uc_base:"1f4c1",uc_output:"1f4c1",uc_match:"1f4c1",uc_greedy:"1f4c1",shortnames:[],category:"objects"},":film_frames:":{uc_base:"1f39e",uc_output:"1f39e",uc_match:"1f39e-fe0f",uc_greedy:"1f39e-fe0f",shortnames:[],category:"objects"},":fingers_crossed:":{uc_base:"1f91e",uc_output:"1f91e",uc_match:"1f91e",uc_greedy:"1f91e",shortnames:[":hand_with_index_and_middle_finger_crossed:"],category:"people"},":fire:":{uc_base:"1f525",uc_output:"1f525",uc_match:"1f525",uc_greedy:"1f525",shortnames:[":flame:"],category:"nature"},":fire_engine:":{uc_base:"1f692",uc_output:"1f692",uc_match:"1f692",uc_greedy:"1f692",shortnames:[],category:"travel"},":fire_extinguisher:":{uc_base:"1f9ef",uc_output:"1f9ef",uc_match:"1f9ef",uc_greedy:"1f9ef",shortnames:[],category:"objects"},":firecracker:":{uc_base:"1f9e8",uc_output:"1f9e8",uc_match:"1f9e8",uc_greedy:"1f9e8",shortnames:[],category:"travel"},":fireworks:":{uc_base:"1f386",uc_output:"1f386",uc_match:"1f386",uc_greedy:"1f386",shortnames:[],category:"travel"},":first_place:":{uc_base:"1f947",uc_output:"1f947",uc_match:"1f947",uc_greedy:"1f947",shortnames:[":first_place_medal:"],category:"activity"},":first_quarter_moon:":{uc_base:"1f313",uc_output:"1f313",uc_match:"1f313",uc_greedy:"1f313",shortnames:[],category:"nature"},":first_quarter_moon_with_face:":{uc_base:"1f31b",uc_output:"1f31b",uc_match:"1f31b",uc_greedy:"1f31b",shortnames:[],category:"nature"},":fish:":{uc_base:"1f41f",uc_output:"1f41f",uc_match:"1f41f-fe0f",uc_greedy:"1f41f-fe0f",shortnames:[],category:"nature"},":fish_cake:":{uc_base:"1f365",uc_output:"1f365",uc_match:"1f365",uc_greedy:"1f365",shortnames:[],category:"food"},":fishing_pole_and_fish:":{uc_base:"1f3a3",uc_output:"1f3a3",uc_match:"1f3a3",uc_greedy:"1f3a3",shortnames:[],category:"activity"},":flag_black:":{uc_base:"1f3f4",uc_output:"1f3f4",uc_match:"1f3f4",uc_greedy:"1f3f4",shortnames:[":waving_black_flag:"],category:"flags"},":flag_white:":{uc_base:"1f3f3",uc_output:"1f3f3",uc_match:"1f3f3-fe0f",uc_greedy:"1f3f3-fe0f",shortnames:[":waving_white_flag:"],category:"flags"},":flags:":{uc_base:"1f38f",uc_output:"1f38f",uc_match:"1f38f",uc_greedy:"1f38f",shortnames:[],category:"objects"},":flashlight:":{uc_base:"1f526",uc_output:"1f526",uc_match:"1f526",uc_greedy:"1f526",shortnames:[],category:"objects"},":floppy_disk:":{uc_base:"1f4be",uc_output:"1f4be",uc_match:"1f4be",uc_greedy:"1f4be",shortnames:[],category:"objects"},":flower_playing_cards:":{uc_base:"1f3b4",uc_output:"1f3b4",uc_match:"1f3b4",uc_greedy:"1f3b4",shortnames:[],category:"symbols"},":flushed:":{uc_base:"1f633",uc_output:"1f633",uc_match:"1f633",uc_greedy:"1f633",shortnames:[],category:"people"},":flying_disc:":{uc_base:"1f94f",uc_output:"1f94f",uc_match:"1f94f",uc_greedy:"1f94f",shortnames:[],category:"activity"},":flying_saucer:":{uc_base:"1f6f8",uc_output:"1f6f8",uc_match:"1f6f8",uc_greedy:"1f6f8",shortnames:[],category:"travel"},":fog:":{uc_base:"1f32b",uc_output:"1f32b",uc_match:"1f32b-fe0f",uc_greedy:"1f32b-fe0f",shortnames:[],category:"nature"},":foggy:":{uc_base:"1f301",uc_output:"1f301",uc_match:"1f301",uc_greedy:"1f301",shortnames:[],category:"travel"},":foot:":{uc_base:"1f9b6",uc_output:"1f9b6",uc_match:"1f9b6",uc_greedy:"1f9b6",shortnames:[],category:"people"},":football:":{uc_base:"1f3c8",uc_output:"1f3c8",uc_match:"1f3c8",uc_greedy:"1f3c8",shortnames:[],category:"activity"},":footprints:":{uc_base:"1f463",uc_output:"1f463",uc_match:"1f463",uc_greedy:"1f463",shortnames:[],category:"people"},":fork_and_knife:":{uc_base:"1f374",uc_output:"1f374",uc_match:"1f374",uc_greedy:"1f374",shortnames:[],category:"food"},":fork_knife_plate:":{uc_base:"1f37d",uc_output:"1f37d",uc_match:"1f37d-fe0f",uc_greedy:"1f37d-fe0f",shortnames:[":fork_and_knife_with_plate:"],category:"food"},":fortune_cookie:":{uc_base:"1f960",uc_output:"1f960",uc_match:"1f960",uc_greedy:"1f960",shortnames:[],category:"food"},":four_leaf_clover:":{uc_base:"1f340",uc_output:"1f340",uc_match:"1f340",uc_greedy:"1f340",shortnames:[],category:"nature"},":fox:":{uc_base:"1f98a",uc_output:"1f98a",uc_match:"1f98a",uc_greedy:"1f98a",shortnames:[":fox_face:"],category:"nature"},":frame_photo:":{uc_base:"1f5bc",uc_output:"1f5bc",uc_match:"1f5bc-fe0f",uc_greedy:"1f5bc-fe0f",shortnames:[":frame_with_picture:"],category:"objects"},":free:":{uc_base:"1f193",uc_output:"1f193",uc_match:"1f193",uc_greedy:"1f193",shortnames:[],category:"symbols"},":french_bread:":{uc_base:"1f956",uc_output:"1f956",uc_match:"1f956",uc_greedy:"1f956",shortnames:[":baguette_bread:"],category:"food"},":fried_shrimp:":{uc_base:"1f364",uc_output:"1f364",uc_match:"1f364",uc_greedy:"1f364",shortnames:[],category:"food"},":fries:":{uc_base:"1f35f",uc_output:"1f35f",uc_match:"1f35f",uc_greedy:"1f35f",shortnames:[],category:"food"},":frog:":{uc_base:"1f438",uc_output:"1f438",uc_match:"1f438",uc_greedy:"1f438",shortnames:[],category:"nature"},":frowning:":{uc_base:"1f626",uc_output:"1f626",uc_match:"1f626",uc_greedy:"1f626",shortnames:[],category:"people"},":full_moon:":{uc_base:"1f315",uc_output:"1f315",uc_match:"1f315-fe0f",uc_greedy:"1f315-fe0f",shortnames:[],category:"nature"},":full_moon_with_face:":{uc_base:"1f31d",uc_output:"1f31d",uc_match:"1f31d",uc_greedy:"1f31d",shortnames:[],category:"nature"},":game_die:":{uc_base:"1f3b2",uc_output:"1f3b2",uc_match:"1f3b2",uc_greedy:"1f3b2",shortnames:[],category:"activity"},":gem:":{uc_base:"1f48e",uc_output:"1f48e",uc_match:"1f48e",uc_greedy:"1f48e",shortnames:[],category:"objects"},":genie:":{uc_base:"1f9de",uc_output:"1f9de",uc_match:"1f9de",uc_greedy:"1f9de",shortnames:[],category:"people"},":ghost:":{uc_base:"1f47b",uc_output:"1f47b",uc_match:"1f47b",uc_greedy:"1f47b",shortnames:[],category:"people"},":gift:":{uc_base:"1f381",uc_output:"1f381",uc_match:"1f381",uc_greedy:"1f381",shortnames:[],category:"objects"},":gift_heart:":{uc_base:"1f49d",uc_output:"1f49d",uc_match:"1f49d",uc_greedy:"1f49d",shortnames:[],category:"symbols"},":giraffe:":{uc_base:"1f992",uc_output:"1f992",uc_match:"1f992",uc_greedy:"1f992",shortnames:[],category:"nature"},":girl:":{uc_base:"1f467",uc_output:"1f467",uc_match:"1f467",uc_greedy:"1f467",shortnames:[],category:"people"},":globe_with_meridians:":{uc_base:"1f310",uc_output:"1f310",uc_match:"1f310",uc_greedy:"1f310",shortnames:[],category:"symbols"},":gloves:":{uc_base:"1f9e4",uc_output:"1f9e4",uc_match:"1f9e4",uc_greedy:"1f9e4",shortnames:[],category:"people"},":goal:":{uc_base:"1f945",uc_output:"1f945",uc_match:"1f945",uc_greedy:"1f945",shortnames:[":goal_net:"],category:"activity"},":goat:":{uc_base:"1f410",uc_output:"1f410",uc_match:"1f410",uc_greedy:"1f410",shortnames:[],category:"nature"},":goggles:":{uc_base:"1f97d",uc_output:"1f97d",uc_match:"1f97d",uc_greedy:"1f97d",shortnames:[],category:"people"},":gorilla:":{uc_base:"1f98d",uc_output:"1f98d",uc_match:"1f98d",uc_greedy:"1f98d",shortnames:[],category:"nature"},":grapes:":{uc_base:"1f347",uc_output:"1f347",uc_match:"1f347",uc_greedy:"1f347",shortnames:[],category:"food"},":green_apple:":{uc_base:"1f34f",uc_output:"1f34f",uc_match:"1f34f",uc_greedy:"1f34f",shortnames:[],category:"food"},":green_book:":{uc_base:"1f4d7",uc_output:"1f4d7",uc_match:"1f4d7",uc_greedy:"1f4d7",shortnames:[],category:"objects"},":green_heart:":{uc_base:"1f49a",uc_output:"1f49a",uc_match:"1f49a",uc_greedy:"1f49a",shortnames:[],category:"symbols"},":grimacing:":{uc_base:"1f62c",uc_output:"1f62c",uc_match:"1f62c",uc_greedy:"1f62c",shortnames:[],category:"people"},":grin:":{uc_base:"1f601",uc_output:"1f601",uc_match:"1f601",uc_greedy:"1f601",shortnames:[],category:"people"},":grinning:":{uc_base:"1f600",uc_output:"1f600",uc_match:"1f600",uc_greedy:"1f600",shortnames:[],category:"people"},":guard:":{uc_base:"1f482",uc_output:"1f482",uc_match:"1f482",uc_greedy:"1f482",shortnames:[":guardsman:"],category:"people"},":guitar:":{uc_base:"1f3b8",uc_output:"1f3b8",uc_match:"1f3b8",uc_greedy:"1f3b8",shortnames:[],category:"activity"},":gun:":{uc_base:"1f52b",uc_output:"1f52b",uc_match:"1f52b",uc_greedy:"1f52b",shortnames:[],category:"objects"},":hamburger:":{uc_base:"1f354",uc_output:"1f354",uc_match:"1f354",uc_greedy:"1f354",shortnames:[],category:"food"},":hammer:":{uc_base:"1f528",uc_output:"1f528",uc_match:"1f528",uc_greedy:"1f528",shortnames:[],category:"objects"},":hamster:":{uc_base:"1f439",uc_output:"1f439",uc_match:"1f439",uc_greedy:"1f439",shortnames:[],category:"nature"},":hand_splayed:":{uc_base:"1f590",uc_output:"1f590",uc_match:"1f590-fe0f",uc_greedy:"1f590-fe0f",shortnames:[":raised_hand_with_fingers_splayed:"],category:"people"},":handbag:":{uc_base:"1f45c",uc_output:"1f45c",uc_match:"1f45c",uc_greedy:"1f45c",shortnames:[],category:"people"},":handshake:":{uc_base:"1f91d",uc_output:"1f91d",uc_match:"1f91d",uc_greedy:"1f91d",shortnames:[":shaking_hands:"],category:"people"},":hatched_chick:":{uc_base:"1f425",uc_output:"1f425",uc_match:"1f425",uc_greedy:"1f425",shortnames:[],category:"nature"},":hatching_chick:":{uc_base:"1f423",uc_output:"1f423",uc_match:"1f423",uc_greedy:"1f423",shortnames:[],category:"nature"},":head_bandage:":{uc_base:"1f915",uc_output:"1f915",uc_match:"1f915",uc_greedy:"1f915",shortnames:[":face_with_head_bandage:"],category:"people"},":headphones:":{uc_base:"1f3a7",uc_output:"1f3a7",uc_match:"1f3a7-fe0f",uc_greedy:"1f3a7-fe0f",shortnames:[],category:"activity"},":hear_no_evil:":{uc_base:"1f649",uc_output:"1f649",uc_match:"1f649",uc_greedy:"1f649",shortnames:[],category:"nature"},":heart_decoration:":{uc_base:"1f49f",uc_output:"1f49f",uc_match:"1f49f",uc_greedy:"1f49f",shortnames:[],category:"symbols"},":heart_eyes:":{uc_base:"1f60d",uc_output:"1f60d",uc_match:"1f60d",uc_greedy:"1f60d",shortnames:[],category:"people"},":heart_eyes_cat:":{uc_base:"1f63b",uc_output:"1f63b",uc_match:"1f63b",uc_greedy:"1f63b",shortnames:[],category:"people"},":heartbeat:":{uc_base:"1f493",uc_output:"1f493",uc_match:"1f493",uc_greedy:"1f493",shortnames:[],category:"symbols"},":heartpulse:":{uc_base:"1f497",uc_output:"1f497",uc_match:"1f497",uc_greedy:"1f497",shortnames:[],category:"symbols"},":heavy_dollar_sign:":{uc_base:"1f4b2",uc_output:"1f4b2",uc_match:"1f4b2",uc_greedy:"1f4b2",shortnames:[],category:"symbols"},":hedgehog:":{uc_base:"1f994",uc_output:"1f994",uc_match:"1f994",uc_greedy:"1f994",shortnames:[],category:"nature"},":helicopter:":{uc_base:"1f681",uc_output:"1f681",uc_match:"1f681",uc_greedy:"1f681",shortnames:[],category:"travel"},":herb:":{uc_base:"1f33f",uc_output:"1f33f",uc_match:"1f33f",uc_greedy:"1f33f",shortnames:[],category:"nature"},":hibiscus:":{uc_base:"1f33a",uc_output:"1f33a",uc_match:"1f33a",uc_greedy:"1f33a",shortnames:[],category:"nature"},":high_brightness:":{uc_base:"1f506",uc_output:"1f506",uc_match:"1f506",uc_greedy:"1f506",shortnames:[],category:"symbols"},":high_heel:":{uc_base:"1f460",uc_output:"1f460",uc_match:"1f460",uc_greedy:"1f460",shortnames:[],category:"people"},":hiking_boot:":{uc_base:"1f97e",uc_output:"1f97e",uc_match:"1f97e",uc_greedy:"1f97e",shortnames:[],category:"people"},":hippopotamus:":{uc_base:"1f99b",uc_output:"1f99b",uc_match:"1f99b",uc_greedy:"1f99b",shortnames:[],category:"nature"},":hockey:":{uc_base:"1f3d2",uc_output:"1f3d2",uc_match:"1f3d2",uc_greedy:"1f3d2",shortnames:[],category:"activity"},":hole:":{uc_base:"1f573",uc_output:"1f573",uc_match:"1f573-fe0f",uc_greedy:"1f573-fe0f",shortnames:[],category:"objects"},":homes:":{uc_base:"1f3d8",uc_output:"1f3d8",uc_match:"1f3d8-fe0f",uc_greedy:"1f3d8-fe0f",shortnames:[":house_buildings:"],category:"travel"},":honey_pot:":{uc_base:"1f36f",uc_output:"1f36f",uc_match:"1f36f",uc_greedy:"1f36f",shortnames:[],category:"food"},":horse:":{uc_base:"1f434",uc_output:"1f434",uc_match:"1f434",uc_greedy:"1f434",shortnames:[],category:"nature"},":horse_racing:":{uc_base:"1f3c7",uc_output:"1f3c7",uc_match:"1f3c7",uc_greedy:"1f3c7",shortnames:[],category:"activity"},":hospital:":{uc_base:"1f3e5",uc_output:"1f3e5",uc_match:"1f3e5",uc_greedy:"1f3e5",shortnames:[],category:"travel"},":hot_face:":{uc_base:"1f975",uc_output:"1f975",uc_match:"1f975",uc_greedy:"1f975",shortnames:[],category:"people"},":hot_pepper:":{uc_base:"1f336",uc_output:"1f336",uc_match:"1f336-fe0f",uc_greedy:"1f336-fe0f",shortnames:[],category:"food"},":hotdog:":{uc_base:"1f32d",uc_output:"1f32d",uc_match:"1f32d",uc_greedy:"1f32d",shortnames:[":hot_dog:"],category:"food"},":hotel:":{uc_base:"1f3e8",uc_output:"1f3e8",uc_match:"1f3e8",uc_greedy:"1f3e8",shortnames:[],category:"travel"},":house:":{uc_base:"1f3e0",uc_output:"1f3e0",uc_match:"1f3e0-fe0f",uc_greedy:"1f3e0-fe0f",shortnames:[],category:"travel"},":house_abandoned:":{uc_base:"1f3da",uc_output:"1f3da",uc_match:"1f3da-fe0f",uc_greedy:"1f3da-fe0f",shortnames:[":derelict_house_building:"],category:"travel"},":house_with_garden:":{uc_base:"1f3e1",uc_output:"1f3e1",uc_match:"1f3e1",uc_greedy:"1f3e1",shortnames:[],category:"travel"},":hugging:":{uc_base:"1f917",uc_output:"1f917",uc_match:"1f917",uc_greedy:"1f917",shortnames:[":hugging_face:"],category:"people"},":hushed:":{uc_base:"1f62f",uc_output:"1f62f",uc_match:"1f62f",uc_greedy:"1f62f",shortnames:[],category:"people"},":ice_cream:":{uc_base:"1f368",uc_output:"1f368",uc_match:"1f368",uc_greedy:"1f368",shortnames:[],category:"food"},":icecream:":{uc_base:"1f366",uc_output:"1f366",uc_match:"1f366",uc_greedy:"1f366",shortnames:[],category:"food"},":id:":{uc_base:"1f194",uc_output:"1f194",uc_match:"1f194",uc_greedy:"1f194",shortnames:[],category:"symbols"},":ideograph_advantage:":{uc_base:"1f250",uc_output:"1f250",uc_match:"1f250",uc_greedy:"1f250",shortnames:[],category:"symbols"},":imp:":{uc_base:"1f47f",uc_output:"1f47f",uc_match:"1f47f",uc_greedy:"1f47f",shortnames:[],category:"people"},":inbox_tray:":{uc_base:"1f4e5",uc_output:"1f4e5",uc_match:"1f4e5-fe0f",uc_greedy:"1f4e5-fe0f",shortnames:[],category:"objects"},":incoming_envelope:":{uc_base:"1f4e8",uc_output:"1f4e8",uc_match:"1f4e8",uc_greedy:"1f4e8",shortnames:[],category:"objects"},":innocent:":{uc_base:"1f607",uc_output:"1f607",uc_match:"1f607",uc_greedy:"1f607",shortnames:[],category:"people"},":iphone:":{uc_base:"1f4f1",uc_output:"1f4f1",uc_match:"1f4f1",uc_greedy:"1f4f1",shortnames:[],category:"objects"},":island:":{uc_base:"1f3dd",uc_output:"1f3dd",uc_match:"1f3dd-fe0f",uc_greedy:"1f3dd-fe0f",shortnames:[":desert_island:"],category:"travel"},":izakaya_lantern:":{uc_base:"1f3ee",uc_output:"1f3ee",uc_match:"1f3ee",uc_greedy:"1f3ee",shortnames:[],category:"objects"},":jack_o_lantern:":{uc_base:"1f383",uc_output:"1f383",uc_match:"1f383",uc_greedy:"1f383",shortnames:[],category:"people"},":japan:":{uc_base:"1f5fe",uc_output:"1f5fe",uc_match:"1f5fe",uc_greedy:"1f5fe",shortnames:[],category:"travel"},":japanese_castle:":{uc_base:"1f3ef",uc_output:"1f3ef",uc_match:"1f3ef",uc_greedy:"1f3ef",shortnames:[],category:"travel"},":japanese_goblin:":{uc_base:"1f47a",uc_output:"1f47a",uc_match:"1f47a",uc_greedy:"1f47a",shortnames:[],category:"people"},":japanese_ogre:":{uc_base:"1f479",uc_output:"1f479",uc_match:"1f479",uc_greedy:"1f479",shortnames:[],category:"people"},":jeans:":{uc_base:"1f456",uc_output:"1f456",uc_match:"1f456",uc_greedy:"1f456",shortnames:[],category:"people"},":jigsaw:":{uc_base:"1f9e9",uc_output:"1f9e9",uc_match:"1f9e9",uc_greedy:"1f9e9",shortnames:[],category:"objects"},":joy:":{uc_base:"1f602",uc_output:"1f602",uc_match:"1f602",uc_greedy:"1f602",shortnames:[],category:"people"},":joy_cat:":{uc_base:"1f639",uc_output:"1f639",uc_match:"1f639",uc_greedy:"1f639",shortnames:[],category:"people"},":joystick:":{uc_base:"1f579",uc_output:"1f579",uc_match:"1f579-fe0f",uc_greedy:"1f579-fe0f",shortnames:[],category:"objects"},":kaaba:":{uc_base:"1f54b",uc_output:"1f54b",uc_match:"1f54b",uc_greedy:"1f54b",shortnames:[],category:"travel"},":kangaroo:":{uc_base:"1f998",uc_output:"1f998",uc_match:"1f998",uc_greedy:"1f998",shortnames:[],category:"nature"},":key2:":{uc_base:"1f5dd",uc_output:"1f5dd",uc_match:"1f5dd-fe0f",uc_greedy:"1f5dd",shortnames:[":old_key:"],category:"objects"},":key:":{uc_base:"1f511",uc_output:"1f511",uc_match:"1f511",uc_greedy:"1f511",shortnames:[],category:"objects"},":keycap_ten:":{uc_base:"1f51f",uc_output:"1f51f",uc_match:"1f51f",uc_greedy:"1f51f",shortnames:[],category:"symbols"},":kimono:":{uc_base:"1f458",uc_output:"1f458",uc_match:"1f458",uc_greedy:"1f458",shortnames:[],category:"people"},":kiss:":{uc_base:"1f48b",uc_output:"1f48b",uc_match:"1f48b",uc_greedy:"1f48b",shortnames:[],category:"people"},":kissing:":{uc_base:"1f617",uc_output:"1f617",uc_match:"1f617",uc_greedy:"1f617",shortnames:[],category:"people"},":kissing_cat:":{uc_base:"1f63d",uc_output:"1f63d",uc_match:"1f63d",uc_greedy:"1f63d",shortnames:[],category:"people"},":kissing_closed_eyes:":{uc_base:"1f61a",uc_output:"1f61a",uc_match:"1f61a",uc_greedy:"1f61a",shortnames:[],category:"people"},":kissing_heart:":{uc_base:"1f618",uc_output:"1f618",uc_match:"1f618",uc_greedy:"1f618",shortnames:[],category:"people"},":kissing_smiling_eyes:":{uc_base:"1f619",uc_output:"1f619",uc_match:"1f619",uc_greedy:"1f619",shortnames:[],category:"people"},":kiwi:":{uc_base:"1f95d",uc_output:"1f95d",uc_match:"1f95d",uc_greedy:"1f95d",shortnames:[":kiwifruit:"],category:"food"},":knife:":{uc_base:"1f52a",uc_output:"1f52a",uc_match:"1f52a",uc_greedy:"1f52a",shortnames:[],category:"objects"},":koala:":{uc_base:"1f428",uc_output:"1f428",uc_match:"1f428",uc_greedy:"1f428",shortnames:[],category:"nature"},":koko:":{uc_base:"1f201",uc_output:"1f201",uc_match:"1f201",uc_greedy:"1f201",shortnames:[],category:"symbols"},":lab_coat:":{uc_base:"1f97c",uc_output:"1f97c",uc_match:"1f97c",uc_greedy:"1f97c",shortnames:[],category:"people"},":label:":{uc_base:"1f3f7",uc_output:"1f3f7",uc_match:"1f3f7-fe0f",uc_greedy:"1f3f7-fe0f",shortnames:[],category:"objects"},":lacrosse:":{uc_base:"1f94d",uc_output:"1f94d",uc_match:"1f94d",uc_greedy:"1f94d",shortnames:[],category:"activity"},":large_blue_diamond:":{uc_base:"1f537",uc_output:"1f537",uc_match:"1f537",uc_greedy:"1f537",shortnames:[],category:"symbols"},":large_orange_diamond:":{uc_base:"1f536",uc_output:"1f536",uc_match:"1f536",uc_greedy:"1f536",shortnames:[],category:"symbols"},":last_quarter_moon:":{uc_base:"1f317",uc_output:"1f317",uc_match:"1f317",uc_greedy:"1f317",shortnames:[],category:"nature"},":last_quarter_moon_with_face:":{uc_base:"1f31c",uc_output:"1f31c",uc_match:"1f31c-fe0f",uc_greedy:"1f31c-fe0f",shortnames:[],category:"nature"},":laughing:":{uc_base:"1f606",uc_output:"1f606",uc_match:"1f606",uc_greedy:"1f606",shortnames:[":satisfied:"],category:"people"},":leafy_green:":{uc_base:"1f96c",uc_output:"1f96c",uc_match:"1f96c",uc_greedy:"1f96c",shortnames:[],category:"food"},":leaves:":{uc_base:"1f343",uc_output:"1f343",uc_match:"1f343",uc_greedy:"1f343",shortnames:[],category:"nature"},":ledger:":{uc_base:"1f4d2",uc_output:"1f4d2",uc_match:"1f4d2",uc_greedy:"1f4d2",shortnames:[],category:"objects"},":left_facing_fist:":{uc_base:"1f91b",uc_output:"1f91b",uc_match:"1f91b",uc_greedy:"1f91b",shortnames:[":left_fist:"],category:"people"},":left_luggage:":{uc_base:"1f6c5",uc_output:"1f6c5",uc_match:"1f6c5",uc_greedy:"1f6c5",shortnames:[],category:"symbols"},":leg:":{uc_base:"1f9b5",uc_output:"1f9b5",uc_match:"1f9b5",uc_greedy:"1f9b5",shortnames:[],category:"people"},":lemon:":{uc_base:"1f34b",uc_output:"1f34b",uc_match:"1f34b",uc_greedy:"1f34b",shortnames:[],category:"food"},":leopard:":{uc_base:"1f406",uc_output:"1f406",uc_match:"1f406",uc_greedy:"1f406",shortnames:[],category:"nature"},":level_slider:":{uc_base:"1f39a",uc_output:"1f39a",uc_match:"1f39a-fe0f",uc_greedy:"1f39a-fe0f",shortnames:[],category:"objects"},":levitate:":{uc_base:"1f574",uc_output:"1f574",uc_match:"1f574-fe0f",uc_greedy:"1f574-fe0f",shortnames:[":man_in_business_suit_levitating:"],category:"people"},":light_rail:":{uc_base:"1f688",uc_output:"1f688",uc_match:"1f688",uc_greedy:"1f688",shortnames:[],category:"travel"},":link:":{uc_base:"1f517",uc_output:"1f517",uc_match:"1f517",uc_greedy:"1f517",shortnames:[],category:"objects"},":lion_face:":{uc_base:"1f981",uc_output:"1f981",uc_match:"1f981",uc_greedy:"1f981",shortnames:[":lion:"],category:"nature"},":lips:":{uc_base:"1f444",uc_output:"1f444",uc_match:"1f444",uc_greedy:"1f444",shortnames:[],category:"people"},":lipstick:":{uc_base:"1f484",uc_output:"1f484",uc_match:"1f484",uc_greedy:"1f484",shortnames:[],category:"people"},":lizard:":{uc_base:"1f98e",uc_output:"1f98e",uc_match:"1f98e",uc_greedy:"1f98e",shortnames:[],category:"nature"},":llama:":{uc_base:"1f999",uc_output:"1f999",uc_match:"1f999",uc_greedy:"1f999",shortnames:[],category:"nature"},":lobster:":{uc_base:"1f99e",uc_output:"1f99e",uc_match:"1f99e",uc_greedy:"1f99e",shortnames:[],category:"nature"},":lock:":{uc_base:"1f512",uc_output:"1f512",uc_match:"1f512-fe0f",uc_greedy:"1f512-fe0f",shortnames:[],category:"objects"},":lock_with_ink_pen:":{uc_base:"1f50f",uc_output:"1f50f",uc_match:"1f50f",uc_greedy:"1f50f",shortnames:[],category:"objects"},":lollipop:":{uc_base:"1f36d",uc_output:"1f36d",uc_match:"1f36d",uc_greedy:"1f36d",shortnames:[],category:"food"},":loud_sound:":{uc_base:"1f50a",uc_output:"1f50a",uc_match:"1f50a",uc_greedy:"1f50a",shortnames:[],category:"symbols"},":loudspeaker:":{uc_base:"1f4e2",uc_output:"1f4e2",uc_match:"1f4e2",uc_greedy:"1f4e2",shortnames:[],category:"symbols"},":love_hotel:":{uc_base:"1f3e9",uc_output:"1f3e9",uc_match:"1f3e9",uc_greedy:"1f3e9",shortnames:[],category:"travel"},":love_letter:":{uc_base:"1f48c",uc_output:"1f48c",uc_match:"1f48c",uc_greedy:"1f48c",shortnames:[],category:"objects"},":love_you_gesture:":{uc_base:"1f91f",uc_output:"1f91f",uc_match:"1f91f",uc_greedy:"1f91f",shortnames:[],category:"people"},":low_brightness:":{uc_base:"1f505",uc_output:"1f505",uc_match:"1f505",uc_greedy:"1f505",shortnames:[],category:"symbols"},":luggage:":{uc_base:"1f9f3",uc_output:"1f9f3",uc_match:"1f9f3",uc_greedy:"1f9f3",shortnames:[],category:"travel"},":lying_face:":{uc_base:"1f925",uc_output:"1f925",uc_match:"1f925",uc_greedy:"1f925",shortnames:[":liar:"],category:"people"},":mag:":{uc_base:"1f50d",uc_output:"1f50d",uc_match:"1f50d-fe0f",uc_greedy:"1f50d-fe0f",shortnames:[],category:"objects"},":mag_right:":{uc_base:"1f50e",uc_output:"1f50e",uc_match:"1f50e",uc_greedy:"1f50e",shortnames:[],category:"objects"},":mage:":{uc_base:"1f9d9",uc_output:"1f9d9",uc_match:"1f9d9",uc_greedy:"1f9d9",shortnames:[],category:"people"},":magnet:":{uc_base:"1f9f2",uc_output:"1f9f2",uc_match:"1f9f2",uc_greedy:"1f9f2",shortnames:[],category:"objects"},":mahjong:":{uc_base:"1f004",uc_output:"1f004",uc_match:"1f004-fe0f",uc_greedy:"1f004-fe0f",shortnames:[],category:"symbols"},":mailbox:":{uc_base:"1f4eb",uc_output:"1f4eb",uc_match:"1f4eb-fe0f",uc_greedy:"1f4eb-fe0f",shortnames:[],category:"objects"},":mailbox_closed:":{uc_base:"1f4ea",uc_output:"1f4ea",uc_match:"1f4ea-fe0f",uc_greedy:"1f4ea-fe0f",shortnames:[],category:"objects"},":mailbox_with_mail:":{uc_base:"1f4ec",uc_output:"1f4ec",uc_match:"1f4ec-fe0f",uc_greedy:"1f4ec-fe0f",shortnames:[],category:"objects"},":mailbox_with_no_mail:":{uc_base:"1f4ed",uc_output:"1f4ed",uc_match:"1f4ed-fe0f",uc_greedy:"1f4ed-fe0f",shortnames:[],category:"objects"},":man:":{uc_base:"1f468",uc_output:"1f468",uc_match:"1f468",uc_greedy:"1f468",shortnames:[],category:"people"},":man_dancing:":{uc_base:"1f57a",uc_output:"1f57a",uc_match:"1f57a",uc_greedy:"1f57a",shortnames:[":male_dancer:"],category:"people"},":man_in_tuxedo:":{uc_base:"1f935",uc_output:"1f935",uc_match:"1f935",uc_greedy:"1f935",shortnames:[],category:"people"},":man_with_chinese_cap:":{uc_base:"1f472",uc_output:"1f472",uc_match:"1f472",uc_greedy:"1f472",shortnames:[":man_with_gua_pi_mao:"],category:"people"},":mango:":{uc_base:"1f96d",uc_output:"1f96d",uc_match:"1f96d",uc_greedy:"1f96d",shortnames:[],category:"food"},":mans_shoe:":{uc_base:"1f45e",uc_output:"1f45e",uc_match:"1f45e",uc_greedy:"1f45e",shortnames:[],category:"people"},":map:":{uc_base:"1f5fa",uc_output:"1f5fa",uc_match:"1f5fa-fe0f",uc_greedy:"1f5fa-fe0f",shortnames:[":world_map:"],category:"travel"},":maple_leaf:":{uc_base:"1f341",uc_output:"1f341",uc_match:"1f341",uc_greedy:"1f341",shortnames:[],category:"nature"},":martial_arts_uniform:":{uc_base:"1f94b",uc_output:"1f94b",uc_match:"1f94b",uc_greedy:"1f94b",shortnames:[":karate_uniform:"],category:"activity"},":mask:":{uc_base:"1f637",uc_output:"1f637",uc_match:"1f637",uc_greedy:"1f637",shortnames:[],category:"people"},":meat_on_bone:":{uc_base:"1f356",uc_output:"1f356",uc_match:"1f356",uc_greedy:"1f356",shortnames:[],category:"food"},":medal:":{uc_base:"1f3c5",uc_output:"1f3c5",uc_match:"1f3c5",uc_greedy:"1f3c5",shortnames:[":sports_medal:"],category:"activity"},":mega:":{uc_base:"1f4e3",uc_output:"1f4e3",uc_match:"1f4e3",uc_greedy:"1f4e3",shortnames:[],category:"symbols"},":melon:":{uc_base:"1f348",uc_output:"1f348",uc_match:"1f348",uc_greedy:"1f348",shortnames:[],category:"food"},":menorah:":{uc_base:"1f54e",uc_output:"1f54e",uc_match:"1f54e",uc_greedy:"1f54e",shortnames:[],category:"symbols"},":mens:":{uc_base:"1f6b9",uc_output:"1f6b9",uc_match:"1f6b9-fe0f",uc_greedy:"1f6b9-fe0f",shortnames:[],category:"symbols"},":merperson:":{uc_base:"1f9dc",uc_output:"1f9dc",uc_match:"1f9dc",uc_greedy:"1f9dc",shortnames:[],category:"people"},":metal:":{uc_base:"1f918",uc_output:"1f918",uc_match:"1f918",uc_greedy:"1f918",shortnames:[":sign_of_the_horns:"],category:"people"},":metro:":{uc_base:"1f687",uc_output:"1f687",uc_match:"1f687-fe0f",uc_greedy:"1f687-fe0f",shortnames:[],category:"travel"},":microbe:":{uc_base:"1f9a0",uc_output:"1f9a0",uc_match:"1f9a0",uc_greedy:"1f9a0",shortnames:[],category:"nature"},":microphone2:":{uc_base:"1f399",uc_output:"1f399",uc_match:"1f399-fe0f",uc_greedy:"1f399-fe0f",shortnames:[":studio_microphone:"],category:"objects"},":microphone:":{uc_base:"1f3a4",uc_output:"1f3a4",uc_match:"1f3a4",uc_greedy:"1f3a4",shortnames:[],category:"activity"},":microscope:":{uc_base:"1f52c",uc_output:"1f52c",uc_match:"1f52c",uc_greedy:"1f52c",shortnames:[],category:"objects"},":middle_finger:":{uc_base:"1f595",uc_output:"1f595",uc_match:"1f595",uc_greedy:"1f595",shortnames:[":reversed_hand_with_middle_finger_extended:"],category:"people"},":military_medal:":{uc_base:"1f396",uc_output:"1f396",uc_match:"1f396-fe0f",uc_greedy:"1f396-fe0f",shortnames:[],category:"activity"},":milk:":{uc_base:"1f95b",uc_output:"1f95b",uc_match:"1f95b",uc_greedy:"1f95b",shortnames:[":glass_of_milk:"],category:"food"},":milky_way:":{uc_base:"1f30c",uc_output:"1f30c",uc_match:"1f30c",uc_greedy:"1f30c",shortnames:[],category:"travel"},":minibus:":{uc_base:"1f690",uc_output:"1f690",uc_match:"1f690",uc_greedy:"1f690",shortnames:[],category:"travel"},":minidisc:":{uc_base:"1f4bd",uc_output:"1f4bd",uc_match:"1f4bd",uc_greedy:"1f4bd",shortnames:[],category:"objects"},":mobile_phone_off:":{uc_base:"1f4f4",uc_output:"1f4f4",uc_match:"1f4f4",uc_greedy:"1f4f4",shortnames:[],category:"symbols"},":money_mouth:":{uc_base:"1f911",uc_output:"1f911",uc_match:"1f911",uc_greedy:"1f911",shortnames:[":money_mouth_face:"],category:"people"},":money_with_wings:":{uc_base:"1f4b8",uc_output:"1f4b8",uc_match:"1f4b8",uc_greedy:"1f4b8",shortnames:[],category:"objects"},":moneybag:":{uc_base:"1f4b0",uc_output:"1f4b0",uc_match:"1f4b0-fe0f",uc_greedy:"1f4b0-fe0f",shortnames:[],category:"objects"},":monkey:":{uc_base:"1f412",uc_output:"1f412",uc_match:"1f412",uc_greedy:"1f412",shortnames:[],category:"nature"},":monkey_face:":{uc_base:"1f435",uc_output:"1f435",uc_match:"1f435",uc_greedy:"1f435",shortnames:[],category:"nature"},":monorail:":{uc_base:"1f69d",uc_output:"1f69d",uc_match:"1f69d",uc_greedy:"1f69d",shortnames:[],category:"travel"},":moon_cake:":{uc_base:"1f96e",uc_output:"1f96e",uc_match:"1f96e",uc_greedy:"1f96e",shortnames:[],category:"food"},":mortar_board:":{uc_base:"1f393",uc_output:"1f393",uc_match:"1f393-fe0f",uc_greedy:"1f393-fe0f",shortnames:[],category:"people"},":mosque:":{uc_base:"1f54c",uc_output:"1f54c",uc_match:"1f54c",uc_greedy:"1f54c",shortnames:[],category:"travel"},":mosquito:":{uc_base:"1f99f",uc_output:"1f99f",uc_match:"1f99f",uc_greedy:"1f99f",shortnames:[],category:"nature"},":motor_scooter:":{uc_base:"1f6f5",uc_output:"1f6f5",uc_match:"1f6f5",uc_greedy:"1f6f5",shortnames:[":motorbike:"],category:"travel"},":motorboat:":{uc_base:"1f6e5",uc_output:"1f6e5",uc_match:"1f6e5-fe0f",uc_greedy:"1f6e5-fe0f",shortnames:[],category:"travel"},":motorcycle:":{uc_base:"1f3cd",uc_output:"1f3cd",uc_match:"1f3cd-fe0f",uc_greedy:"1f3cd-fe0f",shortnames:[":racing_motorcycle:"],category:"travel"},":motorway:":{uc_base:"1f6e3",uc_output:"1f6e3",uc_match:"1f6e3-fe0f",uc_greedy:"1f6e3-fe0f",shortnames:[],category:"travel"},":mount_fuji:":{uc_base:"1f5fb",uc_output:"1f5fb",uc_match:"1f5fb",uc_greedy:"1f5fb",shortnames:[],category:"travel"},":mountain_cableway:":{uc_base:"1f6a0",uc_output:"1f6a0",uc_match:"1f6a0",uc_greedy:"1f6a0",shortnames:[],category:"travel"},":mountain_railway:":{uc_base:"1f69e",uc_output:"1f69e",uc_match:"1f69e",uc_greedy:"1f69e",shortnames:[],category:"travel"},":mountain_snow:":{uc_base:"1f3d4",uc_output:"1f3d4",uc_match:"1f3d4-fe0f",uc_greedy:"1f3d4-fe0f",shortnames:[":snow_capped_mountain:"],category:"travel"},":mouse2:":{uc_base:"1f401",uc_output:"1f401",uc_match:"1f401",uc_greedy:"1f401",shortnames:[],category:"nature"},":mouse:":{uc_base:"1f42d",uc_output:"1f42d",uc_match:"1f42d",uc_greedy:"1f42d",shortnames:[],category:"nature"},":mouse_three_button:":{uc_base:"1f5b1",uc_output:"1f5b1",uc_match:"1f5b1-fe0f",uc_greedy:"1f5b1-fe0f",shortnames:[":three_button_mouse:"],category:"objects"},":movie_camera:":{uc_base:"1f3a5",uc_output:"1f3a5",uc_match:"1f3a5",uc_greedy:"1f3a5",shortnames:[],category:"objects"},":moyai:":{uc_base:"1f5ff",uc_output:"1f5ff",uc_match:"1f5ff",uc_greedy:"1f5ff",shortnames:[],category:"travel"},":mrs_claus:":{uc_base:"1f936",uc_output:"1f936",uc_match:"1f936",uc_greedy:"1f936",shortnames:[":mother_christmas:"],category:"people"},":muscle:":{uc_base:"1f4aa",uc_output:"1f4aa",uc_match:"1f4aa",uc_greedy:"1f4aa",shortnames:[],category:"people"},":mushroom:":{uc_base:"1f344",uc_output:"1f344",uc_match:"1f344",uc_greedy:"1f344",shortnames:[],category:"nature"},":musical_keyboard:":{uc_base:"1f3b9",uc_output:"1f3b9",uc_match:"1f3b9",uc_greedy:"1f3b9",shortnames:[],category:"activity"},":musical_note:":{uc_base:"1f3b5",uc_output:"1f3b5",uc_match:"1f3b5",uc_greedy:"1f3b5",shortnames:[],category:"symbols"},":musical_score:":{uc_base:"1f3bc",uc_output:"1f3bc",uc_match:"1f3bc",uc_greedy:"1f3bc",shortnames:[],category:"activity"},":mute:":{uc_base:"1f507",uc_output:"1f507",uc_match:"1f507",uc_greedy:"1f507",shortnames:[],category:"symbols"},":nail_care:":{uc_base:"1f485",uc_output:"1f485",uc_match:"1f485",uc_greedy:"1f485",shortnames:[],category:"people"},":name_badge:":{uc_base:"1f4db",uc_output:"1f4db",uc_match:"1f4db",uc_greedy:"1f4db",shortnames:[],category:"symbols"},":nauseated_face:":{uc_base:"1f922",uc_output:"1f922",uc_match:"1f922",uc_greedy:"1f922",shortnames:[":sick:"],category:"people"},":nazar_amulet:":{uc_base:"1f9ff",uc_output:"1f9ff",uc_match:"1f9ff",uc_greedy:"1f9ff",shortnames:[],category:"objects"},":necktie:":{uc_base:"1f454",uc_output:"1f454",uc_match:"1f454",uc_greedy:"1f454",shortnames:[],category:"people"},":nerd:":{uc_base:"1f913",uc_output:"1f913",uc_match:"1f913",uc_greedy:"1f913",shortnames:[":nerd_face:"],category:"people"},":neutral_face:":{uc_base:"1f610",uc_output:"1f610",uc_match:"1f610-fe0f",uc_greedy:"1f610-fe0f",shortnames:[],category:"people"},":new:":{uc_base:"1f195",uc_output:"1f195",uc_match:"1f195",uc_greedy:"1f195",shortnames:[],category:"symbols"},":new_moon:":{uc_base:"1f311",uc_output:"1f311",uc_match:"1f311",uc_greedy:"1f311",shortnames:[],category:"nature"},":new_moon_with_face:":{uc_base:"1f31a",uc_output:"1f31a",uc_match:"1f31a",uc_greedy:"1f31a",shortnames:[],category:"nature"},":newspaper2:":{uc_base:"1f5de",uc_output:"1f5de",uc_match:"1f5de-fe0f",uc_greedy:"1f5de-fe0f",shortnames:[":rolled_up_newspaper:"],category:"objects"},":newspaper:":{uc_base:"1f4f0",uc_output:"1f4f0",uc_match:"1f4f0",uc_greedy:"1f4f0",shortnames:[],category:"objects"},":ng:":{uc_base:"1f196",uc_output:"1f196",uc_match:"1f196",uc_greedy:"1f196",shortnames:[],category:"symbols"},":night_with_stars:":{uc_base:"1f303",uc_output:"1f303",uc_match:"1f303",uc_greedy:"1f303",shortnames:[],category:"travel"},":no_bell:":{uc_base:"1f515",uc_output:"1f515",uc_match:"1f515",uc_greedy:"1f515",shortnames:[],category:"symbols"},":no_bicycles:":{uc_base:"1f6b3",uc_output:"1f6b3",uc_match:"1f6b3",uc_greedy:"1f6b3",shortnames:[],category:"symbols"},":no_entry_sign:":{uc_base:"1f6ab",uc_output:"1f6ab",uc_match:"1f6ab",uc_greedy:"1f6ab",shortnames:[],category:"symbols"},":no_mobile_phones:":{uc_base:"1f4f5",uc_output:"1f4f5",uc_match:"1f4f5",uc_greedy:"1f4f5",shortnames:[],category:"symbols"},":no_mouth:":{uc_base:"1f636",uc_output:"1f636",uc_match:"1f636",uc_greedy:"1f636",shortnames:[],category:"people"},":no_pedestrians:":{uc_base:"1f6b7",uc_output:"1f6b7",uc_match:"1f6b7",uc_greedy:"1f6b7",shortnames:[],category:"symbols"},":no_smoking:":{uc_base:"1f6ad",uc_output:"1f6ad",uc_match:"1f6ad-fe0f",uc_greedy:"1f6ad-fe0f",shortnames:[],category:"symbols"},":non-potable_water:":{uc_base:"1f6b1",uc_output:"1f6b1",uc_match:"1f6b1",uc_greedy:"1f6b1",shortnames:[],category:"symbols"},":nose:":{uc_base:"1f443",uc_output:"1f443",uc_match:"1f443",uc_greedy:"1f443",shortnames:[],category:"people"},":notebook:":{uc_base:"1f4d3",uc_output:"1f4d3",uc_match:"1f4d3",uc_greedy:"1f4d3",shortnames:[],category:"objects"},":notebook_with_decorative_cover:":{uc_base:"1f4d4",uc_output:"1f4d4",uc_match:"1f4d4",uc_greedy:"1f4d4",shortnames:[],category:"objects"},":notepad_spiral:":{uc_base:"1f5d2",uc_output:"1f5d2",uc_match:"1f5d2-fe0f",uc_greedy:"1f5d2-fe0f",shortnames:[":spiral_note_pad:"],category:"objects"},":notes:":{uc_base:"1f3b6",uc_output:"1f3b6",uc_match:"1f3b6",uc_greedy:"1f3b6",shortnames:[],category:"symbols"},":nut_and_bolt:":{uc_base:"1f529",uc_output:"1f529",uc_match:"1f529",uc_greedy:"1f529",shortnames:[],category:"objects"},":o2:":{uc_base:"1f17e",uc_output:"1f17e",uc_match:"1f17e-fe0f",uc_greedy:"1f17e-fe0f",shortnames:[],category:"symbols"},":ocean:":{uc_base:"1f30a",uc_output:"1f30a",uc_match:"1f30a",uc_greedy:"1f30a",shortnames:[],category:"nature"},":octagonal_sign:":{uc_base:"1f6d1",uc_output:"1f6d1",uc_match:"1f6d1",uc_greedy:"1f6d1",shortnames:[":stop_sign:"],category:"symbols"},":octopus:":{uc_base:"1f419",uc_output:"1f419",uc_match:"1f419",uc_greedy:"1f419",shortnames:[],category:"nature"},":oden:":{uc_base:"1f362",uc_output:"1f362",uc_match:"1f362",uc_greedy:"1f362",shortnames:[],category:"food"},":office:":{uc_base:"1f3e2",uc_output:"1f3e2",uc_match:"1f3e2",uc_greedy:"1f3e2",shortnames:[],category:"travel"},":oil:":{uc_base:"1f6e2",uc_output:"1f6e2",uc_match:"1f6e2-fe0f",uc_greedy:"1f6e2-fe0f",shortnames:[":oil_drum:"],category:"objects"},":ok:":{uc_base:"1f197",uc_output:"1f197",uc_match:"1f197",uc_greedy:"1f197",shortnames:[],category:"symbols"},":ok_hand:":{uc_base:"1f44c",uc_output:"1f44c",uc_match:"1f44c",uc_greedy:"1f44c",shortnames:[],category:"people"},":older_adult:":{uc_base:"1f9d3",uc_output:"1f9d3",uc_match:"1f9d3",uc_greedy:"1f9d3",shortnames:[],category:"people"},":older_man:":{uc_base:"1f474",uc_output:"1f474",uc_match:"1f474",uc_greedy:"1f474",shortnames:[],category:"people"},":older_woman:":{uc_base:"1f475",uc_output:"1f475",uc_match:"1f475",uc_greedy:"1f475",shortnames:[":grandma:"],category:"people"},":om_symbol:":{uc_base:"1f549",uc_output:"1f549",uc_match:"1f549-fe0f",uc_greedy:"1f549",shortnames:[],category:"symbols"},":on:":{uc_base:"1f51b",uc_output:"1f51b",uc_match:"1f51b",uc_greedy:"1f51b",shortnames:[],category:"symbols"},":oncoming_automobile:":{uc_base:"1f698",uc_output:"1f698",uc_match:"1f698-fe0f",uc_greedy:"1f698-fe0f",shortnames:[],category:"travel"},":oncoming_bus:":{uc_base:"1f68d",uc_output:"1f68d",uc_match:"1f68d-fe0f",uc_greedy:"1f68d-fe0f",shortnames:[],category:"travel"},":oncoming_police_car:":{uc_base:"1f694",uc_output:"1f694",uc_match:"1f694-fe0f",uc_greedy:"1f694-fe0f",shortnames:[],category:"travel"},":oncoming_taxi:":{uc_base:"1f696",uc_output:"1f696",uc_match:"1f696",uc_greedy:"1f696",shortnames:[],category:"travel"},":open_file_folder:":{uc_base:"1f4c2",uc_output:"1f4c2",uc_match:"1f4c2",uc_greedy:"1f4c2",shortnames:[],category:"objects"},":open_hands:":{uc_base:"1f450",uc_output:"1f450",uc_match:"1f450",uc_greedy:"1f450",shortnames:[],category:"people"},":open_mouth:":{uc_base:"1f62e",uc_output:"1f62e",uc_match:"1f62e",uc_greedy:"1f62e",shortnames:[],category:"people"},":orange_book:":{uc_base:"1f4d9",uc_output:"1f4d9",uc_match:"1f4d9",uc_greedy:"1f4d9",shortnames:[],category:"objects"},":orange_heart:":{uc_base:"1f9e1",uc_output:"1f9e1",uc_match:"1f9e1",uc_greedy:"1f9e1",shortnames:[],category:"symbols"},":outbox_tray:":{uc_base:"1f4e4",uc_output:"1f4e4",uc_match:"1f4e4-fe0f",uc_greedy:"1f4e4-fe0f",shortnames:[],category:"objects"},":owl:":{uc_base:"1f989",uc_output:"1f989",uc_match:"1f989",uc_greedy:"1f989",shortnames:[],category:"nature"},":ox:":{uc_base:"1f402",uc_output:"1f402",uc_match:"1f402",uc_greedy:"1f402",shortnames:[],category:"nature"},":package:":{uc_base:"1f4e6",uc_output:"1f4e6",uc_match:"1f4e6-fe0f",uc_greedy:"1f4e6-fe0f",shortnames:[],category:"objects"},":page_facing_up:":{uc_base:"1f4c4",uc_output:"1f4c4",uc_match:"1f4c4",uc_greedy:"1f4c4",shortnames:[],category:"objects"},":page_with_curl:":{uc_base:"1f4c3",uc_output:"1f4c3",uc_match:"1f4c3",uc_greedy:"1f4c3",shortnames:[],category:"objects"},":pager:":{uc_base:"1f4df",uc_output:"1f4df",uc_match:"1f4df-fe0f",uc_greedy:"1f4df-fe0f",shortnames:[],category:"objects"},":paintbrush:":{uc_base:"1f58c",uc_output:"1f58c",uc_match:"1f58c-fe0f",uc_greedy:"1f58c-fe0f",shortnames:[":lower_left_paintbrush:"],category:"objects"},":palm_tree:":{uc_base:"1f334",uc_output:"1f334",uc_match:"1f334",uc_greedy:"1f334",shortnames:[],category:"nature"},":palms_up_together:":{uc_base:"1f932",uc_output:"1f932",uc_match:"1f932",uc_greedy:"1f932",shortnames:[],category:"people"},":pancakes:":{uc_base:"1f95e",uc_output:"1f95e",uc_match:"1f95e",uc_greedy:"1f95e",shortnames:[],category:"food"},":panda_face:":{uc_base:"1f43c",uc_output:"1f43c",uc_match:"1f43c",uc_greedy:"1f43c",shortnames:[],category:"nature"},":paperclip:":{uc_base:"1f4ce",uc_output:"1f4ce",uc_match:"1f4ce",uc_greedy:"1f4ce",shortnames:[],category:"objects"},":paperclips:":{uc_base:"1f587",uc_output:"1f587",uc_match:"1f587-fe0f",uc_greedy:"1f587-fe0f",shortnames:[":linked_paperclips:"],category:"objects"},":park:":{uc_base:"1f3de",uc_output:"1f3de",uc_match:"1f3de-fe0f",uc_greedy:"1f3de-fe0f",shortnames:[":national_park:"],category:"travel"},":parking:":{uc_base:"1f17f",uc_output:"1f17f",uc_match:"1f17f-fe0f",uc_greedy:"1f17f-fe0f",shortnames:[],category:"symbols"},":parrot:":{uc_base:"1f99c",uc_output:"1f99c",uc_match:"1f99c",uc_greedy:"1f99c",shortnames:[],category:"nature"},":partying_face:":{uc_base:"1f973",uc_output:"1f973",uc_match:"1f973",uc_greedy:"1f973",shortnames:[],category:"people"},":passport_control:":{uc_base:"1f6c2",uc_output:"1f6c2",uc_match:"1f6c2",uc_greedy:"1f6c2",shortnames:[],category:"symbols"},":peach:":{uc_base:"1f351",uc_output:"1f351",uc_match:"1f351",uc_greedy:"1f351",shortnames:[],category:"food"},":peacock:":{uc_base:"1f99a",uc_output:"1f99a",uc_match:"1f99a",uc_greedy:"1f99a",shortnames:[],category:"nature"},":peanuts:":{uc_base:"1f95c",uc_output:"1f95c",uc_match:"1f95c",uc_greedy:"1f95c",shortnames:[":shelled_peanut:"],category:"food"},":pear:":{uc_base:"1f350",uc_output:"1f350",uc_match:"1f350",uc_greedy:"1f350",shortnames:[],category:"food"},":pen_ballpoint:":{uc_base:"1f58a",uc_output:"1f58a",uc_match:"1f58a-fe0f",uc_greedy:"1f58a-fe0f",shortnames:[":lower_left_ballpoint_pen:"],category:"objects"},":pen_fountain:":{uc_base:"1f58b",uc_output:"1f58b",uc_match:"1f58b-fe0f",uc_greedy:"1f58b-fe0f",shortnames:[":lower_left_fountain_pen:"],category:"objects"},":pencil:":{uc_base:"1f4dd",uc_output:"1f4dd",uc_match:"1f4dd",uc_greedy:"1f4dd",shortnames:[":memo:"],category:"objects"},":penguin:":{uc_base:"1f427",uc_output:"1f427",uc_match:"1f427",uc_greedy:"1f427",shortnames:[],category:"nature"},":pensive:":{uc_base:"1f614",uc_output:"1f614",uc_match:"1f614",uc_greedy:"1f614",shortnames:[],category:"people"},":people_with_bunny_ears_partying:":{uc_base:"1f46f",uc_output:"1f46f",uc_match:"1f46f",uc_greedy:"1f46f",shortnames:[":dancers:"],category:"people"},":people_wrestling:":{uc_base:"1f93c",uc_output:"1f93c",uc_match:"1f93c",uc_greedy:"1f93c",shortnames:[":wrestlers:",":wrestling:"],category:"activity"},":performing_arts:":{uc_base:"1f3ad",uc_output:"1f3ad",uc_match:"1f3ad-fe0f",uc_greedy:"1f3ad-fe0f",shortnames:[],category:"activity"},":persevere:":{uc_base:"1f623",uc_output:"1f623",uc_match:"1f623",uc_greedy:"1f623",shortnames:[],category:"people"},":person_biking:":{uc_base:"1f6b4",uc_output:"1f6b4",uc_match:"1f6b4",uc_greedy:"1f6b4",shortnames:[":bicyclist:"],category:"activity"},":person_bowing:":{uc_base:"1f647",uc_output:"1f647",uc_match:"1f647",uc_greedy:"1f647",shortnames:[":bow:"],category:"people"},":person_climbing:":{uc_base:"1f9d7",uc_output:"1f9d7",uc_match:"1f9d7",uc_greedy:"1f9d7",shortnames:[],category:"activity"},":person_doing_cartwheel:":{uc_base:"1f938",uc_output:"1f938",uc_match:"1f938",uc_greedy:"1f938",shortnames:[":cartwheel:"],category:"activity"},":person_facepalming:":{uc_base:"1f926",uc_output:"1f926",uc_match:"1f926",uc_greedy:"1f926",shortnames:[":face_palm:",":facepalm:"],category:"people"},":person_fencing:":{uc_base:"1f93a",uc_output:"1f93a",uc_match:"1f93a",uc_greedy:"1f93a",shortnames:[":fencer:",":fencing:"],category:"activity"},":person_frowning:":{uc_base:"1f64d",uc_output:"1f64d",uc_match:"1f64d",uc_greedy:"1f64d",shortnames:[],category:"people"},":person_gesturing_no:":{uc_base:"1f645",uc_output:"1f645",uc_match:"1f645",uc_greedy:"1f645",shortnames:[":no_good:"],category:"people"},":person_gesturing_ok:":{uc_base:"1f646",uc_output:"1f646",uc_match:"1f646",uc_greedy:"1f646",shortnames:[":ok_woman:"],category:"people"},":person_getting_haircut:":{uc_base:"1f487",uc_output:"1f487",uc_match:"1f487",uc_greedy:"1f487",shortnames:[":haircut:"],category:"people"},":person_getting_massage:":{uc_base:"1f486",uc_output:"1f486",uc_match:"1f486",uc_greedy:"1f486",shortnames:[":massage:"],category:"people"},":person_golfing:":{uc_base:"1f3cc",uc_output:"1f3cc",uc_match:"1f3cc-fe0f",uc_greedy:"1f3cc-fe0f",shortnames:[":golfer:"],category:"activity"},":person_in_lotus_position:":{uc_base:"1f9d8",uc_output:"1f9d8",uc_match:"1f9d8",uc_greedy:"1f9d8",shortnames:[],category:"activity"},":person_in_steamy_room:":{uc_base:"1f9d6",uc_output:"1f9d6",uc_match:"1f9d6",uc_greedy:"1f9d6",shortnames:[],category:"people"},":person_juggling:":{uc_base:"1f939",uc_output:"1f939",uc_match:"1f939",uc_greedy:"1f939",shortnames:[":juggling:",":juggler:"],category:"activity"},":person_lifting_weights:":{uc_base:"1f3cb",uc_output:"1f3cb",uc_match:"1f3cb-fe0f",uc_greedy:"1f3cb-fe0f",shortnames:[":lifter:",":weight_lifter:"],category:"activity"},":person_mountain_biking:":{uc_base:"1f6b5",uc_output:"1f6b5",uc_match:"1f6b5",uc_greedy:"1f6b5",shortnames:[":mountain_bicyclist:"],category:"activity"},":person_playing_handball:":{uc_base:"1f93e",uc_output:"1f93e",uc_match:"1f93e",uc_greedy:"1f93e",shortnames:[":handball:"],category:"activity"},":person_playing_water_polo:":{uc_base:"1f93d",uc_output:"1f93d",uc_match:"1f93d",uc_greedy:"1f93d",shortnames:[":water_polo:"],category:"activity"},":person_pouting:":{uc_base:"1f64e",uc_output:"1f64e",uc_match:"1f64e",uc_greedy:"1f64e",shortnames:[":person_with_pouting_face:"],category:"people"},":person_raising_hand:":{uc_base:"1f64b",uc_output:"1f64b",uc_match:"1f64b",uc_greedy:"1f64b",shortnames:[":raising_hand:"],category:"people"},":person_rowing_boat:":{uc_base:"1f6a3",uc_output:"1f6a3",uc_match:"1f6a3",uc_greedy:"1f6a3",shortnames:[":rowboat:"],category:"activity"},":person_running:":{uc_base:"1f3c3",uc_output:"1f3c3",uc_match:"1f3c3",uc_greedy:"1f3c3",shortnames:[":runner:"],category:"people"},":person_shrugging:":{uc_base:"1f937",uc_output:"1f937",uc_match:"1f937",uc_greedy:"1f937",shortnames:[":shrug:"],category:"people"},":person_surfing:":{uc_base:"1f3c4",uc_output:"1f3c4",uc_match:"1f3c4-fe0f",uc_greedy:"1f3c4-fe0f",shortnames:[":surfer:"],category:"activity"},":person_swimming:":{uc_base:"1f3ca",uc_output:"1f3ca",uc_match:"1f3ca-fe0f",uc_greedy:"1f3ca-fe0f",shortnames:[":swimmer:"],category:"activity"},":person_tipping_hand:":{uc_base:"1f481",uc_output:"1f481",uc_match:"1f481",uc_greedy:"1f481",shortnames:[":information_desk_person:"],category:"people"},":person_walking:":{uc_base:"1f6b6",uc_output:"1f6b6",uc_match:"1f6b6",uc_greedy:"1f6b6",shortnames:[":walking:"],category:"people"},":person_wearing_turban:":{uc_base:"1f473",uc_output:"1f473",uc_match:"1f473",uc_greedy:"1f473",shortnames:[":man_with_turban:"],category:"people"},":petri_dish:":{uc_base:"1f9eb",uc_output:"1f9eb",uc_match:"1f9eb",uc_greedy:"1f9eb",shortnames:[],category:"objects"},":pie:":{uc_base:"1f967",uc_output:"1f967",uc_match:"1f967",uc_greedy:"1f967",shortnames:[],category:"food"},":pig2:":{uc_base:"1f416",uc_output:"1f416",uc_match:"1f416",uc_greedy:"1f416",shortnames:[],category:"nature"},":pig:":{uc_base:"1f437",uc_output:"1f437",uc_match:"1f437",uc_greedy:"1f437",shortnames:[],category:"nature"},":pig_nose:":{uc_base:"1f43d",uc_output:"1f43d",uc_match:"1f43d",uc_greedy:"1f43d",shortnames:[],category:"nature"},":pill:":{uc_base:"1f48a",uc_output:"1f48a",uc_match:"1f48a",uc_greedy:"1f48a",shortnames:[],category:"objects"},":pineapple:":{uc_base:"1f34d",uc_output:"1f34d",uc_match:"1f34d",uc_greedy:"1f34d",shortnames:[],category:"food"},":ping_pong:":{uc_base:"1f3d3",uc_output:"1f3d3",uc_match:"1f3d3",uc_greedy:"1f3d3",shortnames:[":table_tennis:"],category:"activity"},":pizza:":{uc_base:"1f355",uc_output:"1f355",uc_match:"1f355",uc_greedy:"1f355",shortnames:[],category:"food"},":place_of_worship:":{uc_base:"1f6d0",uc_output:"1f6d0",uc_match:"1f6d0",uc_greedy:"1f6d0",shortnames:[":worship_symbol:"],category:"symbols"},":pleading_face:":{uc_base:"1f97a",uc_output:"1f97a",uc_match:"1f97a",uc_greedy:"1f97a",shortnames:[],category:"people"},":point_down:":{uc_base:"1f447",uc_output:"1f447",uc_match:"1f447-fe0f",uc_greedy:"1f447-fe0f",shortnames:[],category:"people"},":point_left:":{uc_base:"1f448",uc_output:"1f448",uc_match:"1f448-fe0f",uc_greedy:"1f448-fe0f",shortnames:[],category:"people"},":point_right:":{uc_base:"1f449",uc_output:"1f449",uc_match:"1f449-fe0f",uc_greedy:"1f449-fe0f",shortnames:[],category:"people"},":point_up_2:":{uc_base:"1f446",uc_output:"1f446",uc_match:"1f446-fe0f",uc_greedy:"1f446-fe0f",shortnames:[],category:"people"},":police_car:":{uc_base:"1f693",uc_output:"1f693",uc_match:"1f693",uc_greedy:"1f693",shortnames:[],category:"travel"},":police_officer:":{uc_base:"1f46e",uc_output:"1f46e",uc_match:"1f46e",uc_greedy:"1f46e",shortnames:[":cop:"],category:"people"},":poodle:":{uc_base:"1f429",uc_output:"1f429",uc_match:"1f429",uc_greedy:"1f429",shortnames:[],category:"nature"},":poop:":{uc_base:"1f4a9",uc_output:"1f4a9",uc_match:"1f4a9",uc_greedy:"1f4a9",shortnames:[":shit:",":hankey:",":poo:"],category:"people"},":popcorn:":{uc_base:"1f37f",uc_output:"1f37f",uc_match:"1f37f",uc_greedy:"1f37f",shortnames:[],category:"food"},":post_office:":{uc_base:"1f3e3",uc_output:"1f3e3",uc_match:"1f3e3",uc_greedy:"1f3e3",shortnames:[],category:"travel"},":postal_horn:":{uc_base:"1f4ef",uc_output:"1f4ef",uc_match:"1f4ef",uc_greedy:"1f4ef",shortnames:[],category:"objects"},":postbox:":{uc_base:"1f4ee",uc_output:"1f4ee",uc_match:"1f4ee",uc_greedy:"1f4ee",shortnames:[],category:"objects"},":potable_water:":{uc_base:"1f6b0",uc_output:"1f6b0",uc_match:"1f6b0",uc_greedy:"1f6b0",shortnames:[],category:"objects"},":potato:":{uc_base:"1f954",uc_output:"1f954",uc_match:"1f954",uc_greedy:"1f954",shortnames:[],category:"food"},":pouch:":{uc_base:"1f45d",uc_output:"1f45d",uc_match:"1f45d",uc_greedy:"1f45d",shortnames:[],category:"people"},":poultry_leg:":{uc_base:"1f357",uc_output:"1f357",uc_match:"1f357",uc_greedy:"1f357",shortnames:[],category:"food"},":pound:":{uc_base:"1f4b7",uc_output:"1f4b7",uc_match:"1f4b7",uc_greedy:"1f4b7",shortnames:[],category:"objects"},":pouting_cat:":{uc_base:"1f63e",uc_output:"1f63e",uc_match:"1f63e",uc_greedy:"1f63e",shortnames:[],category:"people"},":pray:":{uc_base:"1f64f",uc_output:"1f64f",uc_match:"1f64f",uc_greedy:"1f64f",shortnames:[],category:"people"},":prayer_beads:":{uc_base:"1f4ff",uc_output:"1f4ff",uc_match:"1f4ff",uc_greedy:"1f4ff",shortnames:[],category:"objects"},":pregnant_woman:":{uc_base:"1f930",uc_output:"1f930",uc_match:"1f930",uc_greedy:"1f930",shortnames:[":expecting_woman:"],category:"people"},":pretzel:":{uc_base:"1f968",uc_output:"1f968",uc_match:"1f968",uc_greedy:"1f968",shortnames:[],category:"food"},":prince:":{uc_base:"1f934",uc_output:"1f934",uc_match:"1f934",uc_greedy:"1f934",shortnames:[],category:"people"},":princess:":{uc_base:"1f478",uc_output:"1f478",uc_match:"1f478",uc_greedy:"1f478",shortnames:[],category:"people"},":printer:":{uc_base:"1f5a8",uc_output:"1f5a8",uc_match:"1f5a8-fe0f",uc_greedy:"1f5a8-fe0f",shortnames:[],category:"objects"},":projector:":{uc_base:"1f4fd",uc_output:"1f4fd",uc_match:"1f4fd-fe0f",uc_greedy:"1f4fd-fe0f",shortnames:[":film_projector:"],category:"objects"},":punch:":{uc_base:"1f44a",uc_output:"1f44a",uc_match:"1f44a",uc_greedy:"1f44a",shortnames:[],category:"people"},":purple_heart:":{uc_base:"1f49c",uc_output:"1f49c",uc_match:"1f49c",uc_greedy:"1f49c",shortnames:[],category:"symbols"},":purse:":{uc_base:"1f45b",uc_output:"1f45b",uc_match:"1f45b",uc_greedy:"1f45b",shortnames:[],category:"people"},":pushpin:":{uc_base:"1f4cc",uc_output:"1f4cc",uc_match:"1f4cc",uc_greedy:"1f4cc",shortnames:[],category:"objects"},":put_litter_in_its_place:":{uc_base:"1f6ae",uc_output:"1f6ae",uc_match:"1f6ae",uc_greedy:"1f6ae",shortnames:[],category:"symbols"},":rabbit2:":{uc_base:"1f407",uc_output:"1f407",uc_match:"1f407",uc_greedy:"1f407",shortnames:[],category:"nature"},":rabbit:":{uc_base:"1f430",uc_output:"1f430",uc_match:"1f430",uc_greedy:"1f430",shortnames:[],category:"nature"},":raccoon:":{uc_base:"1f99d",uc_output:"1f99d",uc_match:"1f99d",uc_greedy:"1f99d",shortnames:[],category:"nature"},":race_car:":{uc_base:"1f3ce",uc_output:"1f3ce",uc_match:"1f3ce-fe0f",uc_greedy:"1f3ce-fe0f",shortnames:[":racing_car:"],category:"travel"},":racehorse:":{uc_base:"1f40e",uc_output:"1f40e",uc_match:"1f40e",uc_greedy:"1f40e",shortnames:[],category:"nature"},":radio:":{uc_base:"1f4fb",uc_output:"1f4fb",uc_match:"1f4fb-fe0f",uc_greedy:"1f4fb-fe0f",shortnames:[],category:"objects"},":radio_button:":{uc_base:"1f518",uc_output:"1f518",uc_match:"1f518",uc_greedy:"1f518",shortnames:[],category:"symbols"},":rage:":{uc_base:"1f621",uc_output:"1f621",uc_match:"1f621",uc_greedy:"1f621",shortnames:[],category:"people"},":railway_car:":{uc_base:"1f683",uc_output:"1f683",uc_match:"1f683",uc_greedy:"1f683",shortnames:[],category:"travel"},":railway_track:":{uc_base:"1f6e4",uc_output:"1f6e4",uc_match:"1f6e4-fe0f",uc_greedy:"1f6e4-fe0f",shortnames:[":railroad_track:"],category:"travel"},":rainbow:":{uc_base:"1f308",uc_output:"1f308",uc_match:"1f308",uc_greedy:"1f308",shortnames:[],category:"nature"},":raised_back_of_hand:":{uc_base:"1f91a",uc_output:"1f91a",uc_match:"1f91a",uc_greedy:"1f91a",shortnames:[":back_of_hand:"],category:"people"},":raised_hands:":{uc_base:"1f64c",uc_output:"1f64c",uc_match:"1f64c",uc_greedy:"1f64c",shortnames:[],category:"people"},":ram:":{uc_base:"1f40f",uc_output:"1f40f",uc_match:"1f40f",uc_greedy:"1f40f",shortnames:[],category:"nature"},":ramen:":{uc_base:"1f35c",uc_output:"1f35c",uc_match:"1f35c",uc_greedy:"1f35c",shortnames:[],category:"food"},":rat:":{uc_base:"1f400",uc_output:"1f400",uc_match:"1f400",uc_greedy:"1f400",shortnames:[],category:"nature"},":receipt:":{uc_base:"1f9fe",uc_output:"1f9fe",uc_match:"1f9fe",uc_greedy:"1f9fe",shortnames:[],category:"objects"},":red_car:":{uc_base:"1f697",uc_output:"1f697",uc_match:"1f697",uc_greedy:"1f697",shortnames:[],category:"travel"},":red_circle:":{uc_base:"1f534",uc_output:"1f534",uc_match:"1f534",uc_greedy:"1f534",shortnames:[],category:"symbols"},":red_envelope:":{uc_base:"1f9e7",uc_output:"1f9e7",uc_match:"1f9e7",uc_greedy:"1f9e7",shortnames:[],category:"objects"},":red_haired:":{uc_base:"1f9b0",uc_output:"1f9b0",uc_match:"1f9b0",uc_greedy:"1f9b0",shortnames:[],category:"people"},":regional_indicator_a:":{uc_base:"1f1e6",uc_output:"1f1e6",uc_match:"1f1e6",uc_greedy:"1f1e6",shortnames:[],category:"regional"},":regional_indicator_b:":{uc_base:"1f1e7",uc_output:"1f1e7",uc_match:"1f1e7",uc_greedy:"1f1e7",shortnames:[],category:"regional"},":regional_indicator_c:":{uc_base:"1f1e8",uc_output:"1f1e8",uc_match:"1f1e8",uc_greedy:"1f1e8",shortnames:[],category:"regional"},":regional_indicator_d:":{uc_base:"1f1e9",uc_output:"1f1e9",uc_match:"1f1e9",uc_greedy:"1f1e9",shortnames:[],category:"regional"},":regional_indicator_e:":{uc_base:"1f1ea",uc_output:"1f1ea",uc_match:"1f1ea",uc_greedy:"1f1ea",shortnames:[],category:"regional"},":regional_indicator_f:":{uc_base:"1f1eb",uc_output:"1f1eb",uc_match:"1f1eb",uc_greedy:"1f1eb",shortnames:[],category:"regional"},":regional_indicator_g:":{uc_base:"1f1ec",uc_output:"1f1ec",uc_match:"1f1ec",uc_greedy:"1f1ec",shortnames:[],category:"regional"},":regional_indicator_h:":{uc_base:"1f1ed",uc_output:"1f1ed",uc_match:"1f1ed",uc_greedy:"1f1ed",shortnames:[],category:"regional"},":regional_indicator_i:":{uc_base:"1f1ee",uc_output:"1f1ee",uc_match:"1f1ee",uc_greedy:"1f1ee",shortnames:[],category:"regional"},":regional_indicator_j:":{uc_base:"1f1ef",uc_output:"1f1ef",uc_match:"1f1ef",uc_greedy:"1f1ef",shortnames:[],category:"regional"},":regional_indicator_k:":{uc_base:"1f1f0",uc_output:"1f1f0",uc_match:"1f1f0",uc_greedy:"1f1f0",shortnames:[],category:"regional"},":regional_indicator_l:":{uc_base:"1f1f1",uc_output:"1f1f1",uc_match:"1f1f1",uc_greedy:"1f1f1",shortnames:[],category:"regional"},":regional_indicator_m:":{uc_base:"1f1f2",uc_output:"1f1f2",uc_match:"1f1f2",uc_greedy:"1f1f2",shortnames:[],category:"regional"},":regional_indicator_n:":{uc_base:"1f1f3",uc_output:"1f1f3",uc_match:"1f1f3",uc_greedy:"1f1f3",shortnames:[],category:"regional"},":regional_indicator_o:":{uc_base:"1f1f4",uc_output:"1f1f4",uc_match:"1f1f4",uc_greedy:"1f1f4",shortnames:[],category:"regional"},":regional_indicator_p:":{uc_base:"1f1f5",uc_output:"1f1f5",uc_match:"1f1f5",uc_greedy:"1f1f5",shortnames:[],category:"regional"},":regional_indicator_q:":{uc_base:"1f1f6",uc_output:"1f1f6",uc_match:"1f1f6",uc_greedy:"1f1f6",shortnames:[],category:"regional"},":regional_indicator_r:":{uc_base:"1f1f7",uc_output:"1f1f7",uc_match:"1f1f7",uc_greedy:"1f1f7",shortnames:[],category:"regional"},":regional_indicator_s:":{uc_base:"1f1f8",uc_output:"1f1f8",uc_match:"1f1f8",uc_greedy:"1f1f8",shortnames:[],category:"regional"},":regional_indicator_t:":{uc_base:"1f1f9",uc_output:"1f1f9",uc_match:"1f1f9",uc_greedy:"1f1f9",shortnames:[],category:"regional"},":regional_indicator_u:":{uc_base:"1f1fa",uc_output:"1f1fa",uc_match:"1f1fa",uc_greedy:"1f1fa",shortnames:[],category:"regional"},":regional_indicator_v:":{uc_base:"1f1fb",uc_output:"1f1fb",uc_match:"1f1fb",uc_greedy:"1f1fb",shortnames:[],category:"regional"},":regional_indicator_w:":{uc_base:"1f1fc",uc_output:"1f1fc",uc_match:"1f1fc",uc_greedy:"1f1fc",shortnames:[],category:"regional"},":regional_indicator_x:":{uc_base:"1f1fd",uc_output:"1f1fd",uc_match:"1f1fd",uc_greedy:"1f1fd",shortnames:[],category:"regional"},":regional_indicator_y:":{uc_base:"1f1fe",uc_output:"1f1fe",uc_match:"1f1fe",uc_greedy:"1f1fe",shortnames:[],category:"regional"},":regional_indicator_z:":{uc_base:"1f1ff",uc_output:"1f1ff",uc_match:"1f1ff",uc_greedy:"1f1ff",shortnames:[],category:"regional"},":relieved:":{uc_base:"1f60c",uc_output:"1f60c",uc_match:"1f60c",uc_greedy:"1f60c",shortnames:[],category:"people"},":reminder_ribbon:":{uc_base:"1f397",uc_output:"1f397",uc_match:"1f397-fe0f",uc_greedy:"1f397-fe0f",shortnames:[],category:"activity"},":repeat:":{uc_base:"1f501",uc_output:"1f501",uc_match:"1f501",uc_greedy:"1f501",shortnames:[],category:"symbols"},":repeat_one:":{uc_base:"1f502",uc_output:"1f502",uc_match:"1f502",uc_greedy:"1f502",shortnames:[],category:"symbols"},":restroom:":{uc_base:"1f6bb",uc_output:"1f6bb",uc_match:"1f6bb",uc_greedy:"1f6bb",shortnames:[],category:"symbols"},":revolving_hearts:":{uc_base:"1f49e",uc_output:"1f49e",uc_match:"1f49e",uc_greedy:"1f49e",shortnames:[],category:"symbols"},":rhino:":{uc_base:"1f98f",uc_output:"1f98f",uc_match:"1f98f",uc_greedy:"1f98f",shortnames:[":rhinoceros:"],category:"nature"},":ribbon:":{uc_base:"1f380",uc_output:"1f380",uc_match:"1f380",uc_greedy:"1f380",shortnames:[],category:"objects"},":rice:":{uc_base:"1f35a",uc_output:"1f35a",uc_match:"1f35a",uc_greedy:"1f35a",shortnames:[],category:"food"},":rice_ball:":{uc_base:"1f359",uc_output:"1f359",uc_match:"1f359",uc_greedy:"1f359",shortnames:[],category:"food"},":rice_cracker:":{uc_base:"1f358",uc_output:"1f358",uc_match:"1f358",uc_greedy:"1f358",shortnames:[],category:"food"},":rice_scene:":{uc_base:"1f391",uc_output:"1f391",uc_match:"1f391",uc_greedy:"1f391",shortnames:[],category:"travel"},":right_facing_fist:":{uc_base:"1f91c",uc_output:"1f91c",uc_match:"1f91c",uc_greedy:"1f91c",shortnames:[":right_fist:"],category:"people"},":ring:":{uc_base:"1f48d",uc_output:"1f48d",uc_match:"1f48d",uc_greedy:"1f48d",shortnames:[],category:"people"},":robot:":{uc_base:"1f916",uc_output:"1f916",uc_match:"1f916",uc_greedy:"1f916",shortnames:[":robot_face:"],category:"people"},":rocket:":{uc_base:"1f680",uc_output:"1f680",uc_match:"1f680",uc_greedy:"1f680",shortnames:[],category:"travel"},":rofl:":{uc_base:"1f923",uc_output:"1f923",uc_match:"1f923",uc_greedy:"1f923",shortnames:[":rolling_on_the_floor_laughing:"],category:"people"},":roll_of_paper:":{uc_base:"1f9fb",uc_output:"1f9fb",uc_match:"1f9fb",uc_greedy:"1f9fb",shortnames:[],category:"objects"},":roller_coaster:":{uc_base:"1f3a2",uc_output:"1f3a2",uc_match:"1f3a2",uc_greedy:"1f3a2",shortnames:[],category:"travel"},":rolling_eyes:":{uc_base:"1f644",uc_output:"1f644",uc_match:"1f644",uc_greedy:"1f644",shortnames:[":face_with_rolling_eyes:"],category:"people"},":rooster:":{uc_base:"1f413",uc_output:"1f413",uc_match:"1f413",uc_greedy:"1f413",shortnames:[],category:"nature"},":rose:":{uc_base:"1f339",uc_output:"1f339",uc_match:"1f339",uc_greedy:"1f339",shortnames:[],category:"nature"},":rosette:":{uc_base:"1f3f5",uc_output:"1f3f5",uc_match:"1f3f5-fe0f",uc_greedy:"1f3f5-fe0f",shortnames:[],category:"activity"},":rotating_light:":{uc_base:"1f6a8",uc_output:"1f6a8",uc_match:"1f6a8",uc_greedy:"1f6a8",shortnames:[],category:"travel"},":round_pushpin:":{uc_base:"1f4cd",uc_output:"1f4cd",uc_match:"1f4cd",uc_greedy:"1f4cd",shortnames:[],category:"objects"},":rugby_football:":{uc_base:"1f3c9",uc_output:"1f3c9",uc_match:"1f3c9",uc_greedy:"1f3c9",shortnames:[],category:"activity"},":running_shirt_with_sash:":{uc_base:"1f3bd",uc_output:"1f3bd",uc_match:"1f3bd",uc_greedy:"1f3bd",shortnames:[],category:"activity"},":sa:":{uc_base:"1f202",uc_output:"1f202",uc_match:"1f202-fe0f",uc_greedy:"1f202-fe0f",shortnames:[],category:"symbols"},":safety_pin:":{uc_base:"1f9f7",uc_output:"1f9f7",uc_match:"1f9f7",uc_greedy:"1f9f7",shortnames:[],category:"objects"},":sake:":{uc_base:"1f376",uc_output:"1f376",uc_match:"1f376",uc_greedy:"1f376",shortnames:[],category:"food"},":salad:":{uc_base:"1f957",uc_output:"1f957",uc_match:"1f957",uc_greedy:"1f957",shortnames:[":green_salad:"],category:"food"},":salt:":{uc_base:"1f9c2",uc_output:"1f9c2",uc_match:"1f9c2",uc_greedy:"1f9c2",shortnames:[],category:"food"},":sandal:":{uc_base:"1f461",uc_output:"1f461",uc_match:"1f461",uc_greedy:"1f461",shortnames:[],category:"people"},":sandwich:":{uc_base:"1f96a",uc_output:"1f96a",uc_match:"1f96a",uc_greedy:"1f96a",shortnames:[],category:"food"},":santa:":{uc_base:"1f385",uc_output:"1f385",uc_match:"1f385",uc_greedy:"1f385",shortnames:[],category:"people"},":satellite:":{uc_base:"1f4e1",uc_output:"1f4e1",uc_match:"1f4e1",uc_greedy:"1f4e1",shortnames:[],category:"objects"},":satellite_orbital:":{uc_base:"1f6f0",uc_output:"1f6f0",uc_match:"1f6f0-fe0f",uc_greedy:"1f6f0-fe0f",shortnames:[],category:"travel"},":sauropod:":{uc_base:"1f995",uc_output:"1f995",uc_match:"1f995",uc_greedy:"1f995",shortnames:[],category:"nature"},":saxophone:":{uc_base:"1f3b7",uc_output:"1f3b7",uc_match:"1f3b7",uc_greedy:"1f3b7",shortnames:[],category:"activity"},":scarf:":{uc_base:"1f9e3",uc_output:"1f9e3",uc_match:"1f9e3",uc_greedy:"1f9e3",shortnames:[],category:"people"},":school:":{uc_base:"1f3eb",uc_output:"1f3eb",uc_match:"1f3eb",uc_greedy:"1f3eb",shortnames:[],category:"travel"},":school_satchel:":{uc_base:"1f392",uc_output:"1f392",uc_match:"1f392",uc_greedy:"1f392",shortnames:[],category:"people"},":scooter:":{uc_base:"1f6f4",uc_output:"1f6f4",uc_match:"1f6f4",uc_greedy:"1f6f4",shortnames:[],category:"travel"},":scorpion:":{uc_base:"1f982",uc_output:"1f982",uc_match:"1f982",uc_greedy:"1f982",shortnames:[],category:"nature"},":scream:":{uc_base:"1f631",uc_output:"1f631",uc_match:"1f631",uc_greedy:"1f631",shortnames:[],category:"people"},":scream_cat:":{uc_base:"1f640",uc_output:"1f640",uc_match:"1f640",uc_greedy:"1f640",shortnames:[],category:"people"},":scroll:":{uc_base:"1f4dc",uc_output:"1f4dc",uc_match:"1f4dc",uc_greedy:"1f4dc",shortnames:[],category:"objects"},":seat:":{uc_base:"1f4ba",uc_output:"1f4ba",uc_match:"1f4ba",uc_greedy:"1f4ba",shortnames:[],category:"travel"},":second_place:":{uc_base:"1f948",uc_output:"1f948",uc_match:"1f948",uc_greedy:"1f948",shortnames:[":second_place_medal:"],category:"activity"},":see_no_evil:":{uc_base:"1f648",uc_output:"1f648",uc_match:"1f648",uc_greedy:"1f648",shortnames:[],category:"nature"},":seedling:":{uc_base:"1f331",uc_output:"1f331",uc_match:"1f331",uc_greedy:"1f331",shortnames:[],category:"nature"},":selfie:":{uc_base:"1f933",uc_output:"1f933",uc_match:"1f933",uc_greedy:"1f933",shortnames:[],category:"people"},":shallow_pan_of_food:":{uc_base:"1f958",uc_output:"1f958",uc_match:"1f958",uc_greedy:"1f958",shortnames:[":paella:"],category:"food"},":shark:":{uc_base:"1f988",uc_output:"1f988",uc_match:"1f988",uc_greedy:"1f988",shortnames:[],category:"nature"},":shaved_ice:":{uc_base:"1f367",uc_output:"1f367",uc_match:"1f367",uc_greedy:"1f367",shortnames:[],category:"food"},":sheep:":{uc_base:"1f411",uc_output:"1f411",uc_match:"1f411",uc_greedy:"1f411",shortnames:[],category:"nature"},":shell:":{uc_base:"1f41a",uc_output:"1f41a",uc_match:"1f41a",uc_greedy:"1f41a",shortnames:[],category:"nature"},":shield:":{uc_base:"1f6e1",uc_output:"1f6e1",uc_match:"1f6e1-fe0f",uc_greedy:"1f6e1-fe0f",shortnames:[],category:"objects"},":ship:":{uc_base:"1f6a2",uc_output:"1f6a2",uc_match:"1f6a2",uc_greedy:"1f6a2",shortnames:[],category:"travel"},":shirt:":{uc_base:"1f455",uc_output:"1f455",uc_match:"1f455",uc_greedy:"1f455",shortnames:[],category:"people"},":shopping_bags:":{uc_base:"1f6cd",uc_output:"1f6cd",uc_match:"1f6cd-fe0f",uc_greedy:"1f6cd-fe0f",shortnames:[],category:"objects"},":shopping_cart:":{uc_base:"1f6d2",uc_output:"1f6d2",uc_match:"1f6d2",uc_greedy:"1f6d2",shortnames:[":shopping_trolley:"],category:"objects"},":shower:":{uc_base:"1f6bf",uc_output:"1f6bf",uc_match:"1f6bf",uc_greedy:"1f6bf",shortnames:[],category:"objects"},":shrimp:":{uc_base:"1f990",uc_output:"1f990",uc_match:"1f990",uc_greedy:"1f990",shortnames:[],category:"nature"},":shushing_face:":{uc_base:"1f92b",uc_output:"1f92b",uc_match:"1f92b",uc_greedy:"1f92b",shortnames:[],category:"people"},":signal_strength:":{uc_base:"1f4f6",uc_output:"1f4f6",uc_match:"1f4f6",uc_greedy:"1f4f6",shortnames:[],category:"symbols"},":six_pointed_star:":{uc_base:"1f52f",uc_output:"1f52f",uc_match:"1f52f",uc_greedy:"1f52f",shortnames:[],category:"symbols"},":skateboard:":{uc_base:"1f6f9",uc_output:"1f6f9",uc_match:"1f6f9",uc_greedy:"1f6f9",shortnames:[],category:"activity"},":ski:":{uc_base:"1f3bf",uc_output:"1f3bf",uc_match:"1f3bf",uc_greedy:"1f3bf",shortnames:[],category:"activity"},":skull:":{uc_base:"1f480",uc_output:"1f480",uc_match:"1f480",uc_greedy:"1f480",shortnames:[":skeleton:"],category:"people"},":sled:":{uc_base:"1f6f7",uc_output:"1f6f7",uc_match:"1f6f7",uc_greedy:"1f6f7",shortnames:[],category:"activity"},":sleeping:":{uc_base:"1f634",uc_output:"1f634",uc_match:"1f634",uc_greedy:"1f634",shortnames:[],category:"people"},":sleeping_accommodation:":{uc_base:"1f6cc",uc_output:"1f6cc",uc_match:"1f6cc",uc_greedy:"1f6cc",shortnames:[],category:"objects"},":sleepy:":{uc_base:"1f62a",uc_output:"1f62a",uc_match:"1f62a",uc_greedy:"1f62a",shortnames:[],category:"people"},":slight_frown:":{uc_base:"1f641",uc_output:"1f641",uc_match:"1f641",uc_greedy:"1f641",shortnames:[":slightly_frowning_face:"],category:"people"},":slight_smile:":{uc_base:"1f642",uc_output:"1f642",uc_match:"1f642",uc_greedy:"1f642",shortnames:[":slightly_smiling_face:"],category:"people"},":slot_machine:":{uc_base:"1f3b0",uc_output:"1f3b0",uc_match:"1f3b0",uc_greedy:"1f3b0",shortnames:[],category:"activity"},":small_blue_diamond:":{uc_base:"1f539",uc_output:"1f539",uc_match:"1f539",uc_greedy:"1f539",shortnames:[],category:"symbols"},":small_orange_diamond:":{uc_base:"1f538",uc_output:"1f538",uc_match:"1f538",uc_greedy:"1f538",shortnames:[],category:"symbols"},":small_red_triangle:":{uc_base:"1f53a",uc_output:"1f53a",uc_match:"1f53a",uc_greedy:"1f53a",shortnames:[],category:"symbols"},":small_red_triangle_down:":{uc_base:"1f53b",uc_output:"1f53b",uc_match:"1f53b",uc_greedy:"1f53b",shortnames:[],category:"symbols"},":smile:":{uc_base:"1f604",uc_output:"1f604",uc_match:"1f604",uc_greedy:"1f604",shortnames:[],category:"people"},":smile_cat:":{uc_base:"1f638",uc_output:"1f638",uc_match:"1f638",uc_greedy:"1f638",shortnames:[],category:"people"},":smiley:":{uc_base:"1f603",uc_output:"1f603",uc_match:"1f603",uc_greedy:"1f603",shortnames:[],category:"people"},":smiley_cat:":{uc_base:"1f63a",uc_output:"1f63a",uc_match:"1f63a",uc_greedy:"1f63a",shortnames:[],category:"people"},":smiling_face_with_3_hearts:":{uc_base:"1f970",uc_output:"1f970",uc_match:"1f970",uc_greedy:"1f970",shortnames:[],category:"people"},":smiling_imp:":{uc_base:"1f608",uc_output:"1f608",uc_match:"1f608",uc_greedy:"1f608",shortnames:[],category:"people"},":smirk:":{uc_base:"1f60f",uc_output:"1f60f",uc_match:"1f60f",uc_greedy:"1f60f",shortnames:[],category:"people"},":smirk_cat:":{uc_base:"1f63c",uc_output:"1f63c",uc_match:"1f63c",uc_greedy:"1f63c",shortnames:[],category:"people"},":smoking:":{uc_base:"1f6ac",uc_output:"1f6ac",uc_match:"1f6ac",uc_greedy:"1f6ac",shortnames:[],category:"objects"},":snail:":{uc_base:"1f40c",uc_output:"1f40c",uc_match:"1f40c",uc_greedy:"1f40c",shortnames:[],category:"nature"},":snake:":{uc_base:"1f40d",uc_output:"1f40d",uc_match:"1f40d",uc_greedy:"1f40d",shortnames:[],category:"nature"},":sneezing_face:":{uc_base:"1f927",uc_output:"1f927",uc_match:"1f927",uc_greedy:"1f927",shortnames:[":sneeze:"],category:"people"},":snowboarder:":{uc_base:"1f3c2",uc_output:"1f3c2",uc_match:"1f3c2-fe0f",uc_greedy:"1f3c2-fe0f",shortnames:[],category:"activity"},":soap:":{uc_base:"1f9fc",uc_output:"1f9fc",uc_match:"1f9fc",uc_greedy:"1f9fc",shortnames:[],category:"objects"},":sob:":{uc_base:"1f62d",uc_output:"1f62d",uc_match:"1f62d",uc_greedy:"1f62d",shortnames:[],category:"people"},":socks:":{uc_base:"1f9e6",uc_output:"1f9e6",uc_match:"1f9e6",uc_greedy:"1f9e6",shortnames:[],category:"people"},":softball:":{uc_base:"1f94e",uc_output:"1f94e",uc_match:"1f94e",uc_greedy:"1f94e",shortnames:[],category:"activity"},":soon:":{uc_base:"1f51c",uc_output:"1f51c",uc_match:"1f51c",uc_greedy:"1f51c",shortnames:[],category:"symbols"},":sos:":{uc_base:"1f198",uc_output:"1f198",uc_match:"1f198",uc_greedy:"1f198",shortnames:[],category:"symbols"},":sound:":{uc_base:"1f509",uc_output:"1f509",uc_match:"1f509",uc_greedy:"1f509",shortnames:[],category:"symbols"},":space_invader:":{uc_base:"1f47e",uc_output:"1f47e",uc_match:"1f47e",uc_greedy:"1f47e",shortnames:[],category:"people"},":spaghetti:":{uc_base:"1f35d",uc_output:"1f35d",uc_match:"1f35d",uc_greedy:"1f35d",shortnames:[],category:"food"},":sparkler:":{uc_base:"1f387",uc_output:"1f387",uc_match:"1f387",uc_greedy:"1f387",shortnames:[],category:"travel"},":sparkling_heart:":{uc_base:"1f496",uc_output:"1f496",uc_match:"1f496",uc_greedy:"1f496",shortnames:[],category:"symbols"},":speak_no_evil:":{uc_base:"1f64a",uc_output:"1f64a",uc_match:"1f64a",uc_greedy:"1f64a",shortnames:[],category:"nature"},":speaker:":{uc_base:"1f508",uc_output:"1f508",uc_match:"1f508-fe0f",uc_greedy:"1f508-fe0f",shortnames:[],category:"symbols"},":speaking_head:":{uc_base:"1f5e3",uc_output:"1f5e3",uc_match:"1f5e3-fe0f",uc_greedy:"1f5e3-fe0f",shortnames:[":speaking_head_in_silhouette:"],category:"people"},":speech_balloon:":{uc_base:"1f4ac",uc_output:"1f4ac",uc_match:"1f4ac",uc_greedy:"1f4ac",shortnames:[],category:"symbols"},":speech_left:":{uc_base:"1f5e8",uc_output:"1f5e8",uc_match:"1f5e8-fe0f",uc_greedy:"1f5e8-fe0f",shortnames:[":left_speech_bubble:"],category:"symbols"},":speedboat:":{uc_base:"1f6a4",uc_output:"1f6a4",uc_match:"1f6a4",uc_greedy:"1f6a4",shortnames:[],category:"travel"},":spider:":{uc_base:"1f577",uc_output:"1f577",uc_match:"1f577-fe0f",uc_greedy:"1f577-fe0f",shortnames:[],category:"nature"},":spider_web:":{uc_base:"1f578",uc_output:"1f578",uc_match:"1f578-fe0f",uc_greedy:"1f578-fe0f",shortnames:[],category:"nature"},":sponge:":{uc_base:"1f9fd",uc_output:"1f9fd",uc_match:"1f9fd",uc_greedy:"1f9fd",shortnames:[],category:"objects"},":spoon:":{uc_base:"1f944",uc_output:"1f944",uc_match:"1f944",uc_greedy:"1f944",shortnames:[],category:"food"},":squeeze_bottle:":{uc_base:"1f9f4",uc_output:"1f9f4",uc_match:"1f9f4",uc_greedy:"1f9f4",shortnames:[],category:"objects"},":squid:":{uc_base:"1f991",uc_output:"1f991",uc_match:"1f991",uc_greedy:"1f991",shortnames:[],category:"nature"},":stadium:":{uc_base:"1f3df",uc_output:"1f3df",uc_match:"1f3df-fe0f",uc_greedy:"1f3df-fe0f",shortnames:[],category:"travel"},":star2:":{uc_base:"1f31f",uc_output:"1f31f",uc_match:"1f31f",uc_greedy:"1f31f",shortnames:[],category:"nature"},":star_struck:":{uc_base:"1f929",uc_output:"1f929",uc_match:"1f929",uc_greedy:"1f929",shortnames:[],category:"people"},":stars:":{uc_base:"1f320",uc_output:"1f320",uc_match:"1f320",uc_greedy:"1f320",shortnames:[],category:"travel"},":station:":{uc_base:"1f689",uc_output:"1f689",uc_match:"1f689",uc_greedy:"1f689",shortnames:[],category:"travel"},":statue_of_liberty:":{uc_base:"1f5fd",uc_output:"1f5fd",uc_match:"1f5fd",uc_greedy:"1f5fd",shortnames:[],category:"travel"},":steam_locomotive:":{uc_base:"1f682",uc_output:"1f682",uc_match:"1f682",uc_greedy:"1f682",shortnames:[],category:"travel"},":stew:":{uc_base:"1f372",uc_output:"1f372",uc_match:"1f372",uc_greedy:"1f372",shortnames:[],category:"food"},":straight_ruler:":{uc_base:"1f4cf",uc_output:"1f4cf",uc_match:"1f4cf",uc_greedy:"1f4cf",shortnames:[],category:"objects"},":strawberry:":{uc_base:"1f353",uc_output:"1f353",uc_match:"1f353",uc_greedy:"1f353",shortnames:[],category:"food"},":stuck_out_tongue:":{uc_base:"1f61b",uc_output:"1f61b",uc_match:"1f61b",uc_greedy:"1f61b",shortnames:[],category:"people"},":stuck_out_tongue_closed_eyes:":{uc_base:"1f61d",uc_output:"1f61d",uc_match:"1f61d",uc_greedy:"1f61d",shortnames:[],category:"people"},":stuck_out_tongue_winking_eye:":{uc_base:"1f61c",uc_output:"1f61c",uc_match:"1f61c",uc_greedy:"1f61c",shortnames:[],category:"people"},":stuffed_flatbread:":{uc_base:"1f959",uc_output:"1f959",uc_match:"1f959",uc_greedy:"1f959",shortnames:[":stuffed_pita:"],category:"food"},":sun_with_face:":{uc_base:"1f31e",uc_output:"1f31e",uc_match:"1f31e",uc_greedy:"1f31e",shortnames:[],category:"nature"},":sunflower:":{uc_base:"1f33b",uc_output:"1f33b",uc_match:"1f33b",uc_greedy:"1f33b",shortnames:[],category:"nature"},":sunglasses:":{uc_base:"1f60e",uc_output:"1f60e",uc_match:"1f60e",uc_greedy:"1f60e",shortnames:[],category:"people"},":sunrise:":{uc_base:"1f305",uc_output:"1f305",uc_match:"1f305",uc_greedy:"1f305",shortnames:[],category:"travel"},":sunrise_over_mountains:":{uc_base:"1f304",uc_output:"1f304",uc_match:"1f304",uc_greedy:"1f304",shortnames:[],category:"travel"},":superhero:":{uc_base:"1f9b8",uc_output:"1f9b8",uc_match:"1f9b8",uc_greedy:"1f9b8",shortnames:[],category:"people"},":supervillain:":{uc_base:"1f9b9",uc_output:"1f9b9",uc_match:"1f9b9",uc_greedy:"1f9b9",shortnames:[],category:"people"},":sushi:":{uc_base:"1f363",uc_output:"1f363",uc_match:"1f363",uc_greedy:"1f363",shortnames:[],category:"food"},":suspension_railway:":{uc_base:"1f69f",uc_output:"1f69f",uc_match:"1f69f",uc_greedy:"1f69f",shortnames:[],category:"travel"},":swan:":{uc_base:"1f9a2",uc_output:"1f9a2",uc_match:"1f9a2",uc_greedy:"1f9a2",shortnames:[],category:"nature"},":sweat:":{uc_base:"1f613",uc_output:"1f613",uc_match:"1f613",uc_greedy:"1f613",shortnames:[],category:"people"},":sweat_drops:":{uc_base:"1f4a6",uc_output:"1f4a6",uc_match:"1f4a6",uc_greedy:"1f4a6",shortnames:[],category:"nature"},":sweat_smile:":{uc_base:"1f605",uc_output:"1f605",uc_match:"1f605",uc_greedy:"1f605",shortnames:[],category:"people"},":sweet_potato:":{uc_base:"1f360",uc_output:"1f360",uc_match:"1f360",uc_greedy:"1f360",shortnames:[],category:"food"},":symbols:":{uc_base:"1f523",uc_output:"1f523",uc_match:"1f523",uc_greedy:"1f523",shortnames:[],category:"symbols"},":synagogue:":{uc_base:"1f54d",uc_output:"1f54d",uc_match:"1f54d",uc_greedy:"1f54d",shortnames:[],category:"travel"},":syringe:":{uc_base:"1f489",uc_output:"1f489",uc_match:"1f489",uc_greedy:"1f489",shortnames:[],category:"objects"},":t_rex:":{uc_base:"1f996",uc_output:"1f996",uc_match:"1f996",uc_greedy:"1f996",shortnames:[],category:"nature"},":taco:":{uc_base:"1f32e",uc_output:"1f32e",uc_match:"1f32e",uc_greedy:"1f32e",shortnames:[],category:"food"},":tada:":{uc_base:"1f389",uc_output:"1f389",uc_match:"1f389",uc_greedy:"1f389",shortnames:[],category:"objects"},":takeout_box:":{uc_base:"1f961",uc_output:"1f961",uc_match:"1f961",uc_greedy:"1f961",shortnames:[],category:"food"},":tanabata_tree:":{uc_base:"1f38b",uc_output:"1f38b",uc_match:"1f38b",uc_greedy:"1f38b",shortnames:[],category:"nature"},":tangerine:":{uc_base:"1f34a",uc_output:"1f34a",uc_match:"1f34a",uc_greedy:"1f34a",shortnames:[],category:"food"},":taxi:":{uc_base:"1f695",uc_output:"1f695",uc_match:"1f695",uc_greedy:"1f695",shortnames:[],category:"travel"},":tea:":{uc_base:"1f375",uc_output:"1f375",uc_match:"1f375",uc_greedy:"1f375",shortnames:[],category:"food"},":teddy_bear:":{uc_base:"1f9f8",uc_output:"1f9f8",uc_match:"1f9f8",uc_greedy:"1f9f8",shortnames:[],category:"objects"},":telephone_receiver:":{uc_base:"1f4de",uc_output:"1f4de",uc_match:"1f4de",uc_greedy:"1f4de",shortnames:[],category:"objects"},":telescope:":{uc_base:"1f52d",uc_output:"1f52d",uc_match:"1f52d",uc_greedy:"1f52d",shortnames:[],category:"objects"},":tennis:":{uc_base:"1f3be",uc_output:"1f3be",uc_match:"1f3be",uc_greedy:"1f3be",shortnames:[],category:"activity"},":test_tube:":{uc_base:"1f9ea",uc_output:"1f9ea",uc_match:"1f9ea",uc_greedy:"1f9ea",shortnames:[],category:"objects"},":thermometer:":{uc_base:"1f321",uc_output:"1f321",uc_match:"1f321-fe0f",uc_greedy:"1f321-fe0f",shortnames:[],category:"objects"},":thermometer_face:":{uc_base:"1f912",uc_output:"1f912",uc_match:"1f912",uc_greedy:"1f912",shortnames:[":face_with_thermometer:"],category:"people"},":thinking:":{uc_base:"1f914",uc_output:"1f914",uc_match:"1f914",uc_greedy:"1f914",shortnames:[":thinking_face:"],category:"people"},":third_place:":{uc_base:"1f949",uc_output:"1f949",uc_match:"1f949",uc_greedy:"1f949",shortnames:[":third_place_medal:"],category:"activity"},":thought_balloon:":{uc_base:"1f4ad",uc_output:"1f4ad",uc_match:"1f4ad",uc_greedy:"1f4ad",shortnames:[],category:"symbols"},":thread:":{uc_base:"1f9f5",uc_output:"1f9f5",uc_match:"1f9f5",uc_greedy:"1f9f5",shortnames:[],category:"objects"},":thumbsdown:":{uc_base:"1f44e",uc_output:"1f44e",uc_match:"1f44e-fe0f",uc_greedy:"1f44e-fe0f",shortnames:[":-1:",":thumbdown:"],category:"people"},":thumbsup:":{uc_base:"1f44d",uc_output:"1f44d",uc_match:"1f44d-fe0f",uc_greedy:"1f44d-fe0f",shortnames:[":+1:",":thumbup:"],category:"people"},":ticket:":{uc_base:"1f3ab",uc_output:"1f3ab",uc_match:"1f3ab",uc_greedy:"1f3ab",shortnames:[],category:"activity"},":tickets:":{uc_base:"1f39f",uc_output:"1f39f",uc_match:"1f39f-fe0f",uc_greedy:"1f39f-fe0f",shortnames:[":admission_tickets:"],category:"activity"},":tiger2:":{uc_base:"1f405",uc_output:"1f405",uc_match:"1f405",uc_greedy:"1f405",shortnames:[],category:"nature"},":tiger:":{uc_base:"1f42f",uc_output:"1f42f",uc_match:"1f42f",uc_greedy:"1f42f",shortnames:[],category:"nature"},":tired_face:":{uc_base:"1f62b",uc_output:"1f62b",uc_match:"1f62b",uc_greedy:"1f62b",shortnames:[],category:"people"},":toilet:":{uc_base:"1f6bd",uc_output:"1f6bd",uc_match:"1f6bd",uc_greedy:"1f6bd",shortnames:[],category:"objects"},":tokyo_tower:":{uc_base:"1f5fc",uc_output:"1f5fc",uc_match:"1f5fc",uc_greedy:"1f5fc",shortnames:[],category:"travel"},":tomato:":{uc_base:"1f345",uc_output:"1f345",uc_match:"1f345",uc_greedy:"1f345",shortnames:[],category:"food"},":tone1:":{uc_base:"1f3fb",uc_output:"1f3fb",uc_match:"1f3fb",uc_greedy:"1f3fb",shortnames:[],category:"modifier"},":tone2:":{uc_base:"1f3fc",uc_output:"1f3fc",uc_match:"1f3fc",uc_greedy:"1f3fc",shortnames:[],category:"modifier"},":tone3:":{uc_base:"1f3fd",uc_output:"1f3fd",uc_match:"1f3fd",uc_greedy:"1f3fd",shortnames:[],category:"modifier"},":tone4:":{uc_base:"1f3fe",uc_output:"1f3fe",uc_match:"1f3fe",uc_greedy:"1f3fe",shortnames:[],category:"modifier"},":tone5:":{uc_base:"1f3ff",uc_output:"1f3ff",uc_match:"1f3ff",uc_greedy:"1f3ff",shortnames:[],category:"modifier"},":tongue:":{uc_base:"1f445",uc_output:"1f445",uc_match:"1f445",uc_greedy:"1f445",shortnames:[],category:"people"},":toolbox:":{uc_base:"1f9f0",uc_output:"1f9f0",uc_match:"1f9f0",uc_greedy:"1f9f0",shortnames:[],category:"objects"},":tools:":{uc_base:"1f6e0",uc_output:"1f6e0",uc_match:"1f6e0-fe0f",uc_greedy:"1f6e0-fe0f",shortnames:[":hammer_and_wrench:"],category:"objects"},":tooth:":{uc_base:"1f9b7",uc_output:"1f9b7",uc_match:"1f9b7",uc_greedy:"1f9b7",shortnames:[],category:"people"},":top:":{uc_base:"1f51d",uc_output:"1f51d",uc_match:"1f51d",uc_greedy:"1f51d",shortnames:[],category:"symbols"},":tophat:":{uc_base:"1f3a9",uc_output:"1f3a9",uc_match:"1f3a9",uc_greedy:"1f3a9",shortnames:[],category:"people"},":trackball:":{uc_base:"1f5b2",uc_output:"1f5b2",uc_match:"1f5b2-fe0f",uc_greedy:"1f5b2-fe0f",shortnames:[],category:"objects"},":tractor:":{uc_base:"1f69c",uc_output:"1f69c",uc_match:"1f69c",uc_greedy:"1f69c",shortnames:[],category:"travel"},":traffic_light:":{uc_base:"1f6a5",uc_output:"1f6a5",uc_match:"1f6a5",uc_greedy:"1f6a5",shortnames:[],category:"travel"},":train2:":{uc_base:"1f686",uc_output:"1f686",uc_match:"1f686",uc_greedy:"1f686",shortnames:[],category:"travel"},":train:":{uc_base:"1f68b",uc_output:"1f68b",uc_match:"1f68b",uc_greedy:"1f68b",shortnames:[],category:"travel"},":tram:":{uc_base:"1f68a",uc_output:"1f68a",uc_match:"1f68a",uc_greedy:"1f68a",shortnames:[],category:"travel"},":triangular_flag_on_post:":{uc_base:"1f6a9",uc_output:"1f6a9",uc_match:"1f6a9",uc_greedy:"1f6a9",shortnames:[],category:"flags"},":triangular_ruler:":{uc_base:"1f4d0",uc_output:"1f4d0",uc_match:"1f4d0",uc_greedy:"1f4d0",shortnames:[],category:"objects"},":trident:":{uc_base:"1f531",uc_output:"1f531",uc_match:"1f531",uc_greedy:"1f531",shortnames:[],category:"symbols"},":triumph:":{uc_base:"1f624",uc_output:"1f624",uc_match:"1f624",uc_greedy:"1f624",shortnames:[],category:"people"},":trolleybus:":{uc_base:"1f68e",uc_output:"1f68e",uc_match:"1f68e",uc_greedy:"1f68e",shortnames:[],category:"travel"},":trophy:":{uc_base:"1f3c6",uc_output:"1f3c6",uc_match:"1f3c6-fe0f",uc_greedy:"1f3c6-fe0f",shortnames:[],category:"activity"},":tropical_drink:":{uc_base:"1f379",uc_output:"1f379",uc_match:"1f379",uc_greedy:"1f379",shortnames:[],category:"food"},":tropical_fish:":{uc_base:"1f420",uc_output:"1f420",uc_match:"1f420",uc_greedy:"1f420",shortnames:[],category:"nature"},":truck:":{uc_base:"1f69a",uc_output:"1f69a",uc_match:"1f69a",uc_greedy:"1f69a",shortnames:[],category:"travel"},":trumpet:":{uc_base:"1f3ba",uc_output:"1f3ba",uc_match:"1f3ba",uc_greedy:"1f3ba",shortnames:[],category:"activity"},":tulip:":{uc_base:"1f337",uc_output:"1f337",uc_match:"1f337",uc_greedy:"1f337",shortnames:[],category:"nature"},":tumbler_glass:":{uc_base:"1f943",uc_output:"1f943",uc_match:"1f943",uc_greedy:"1f943",shortnames:[":whisky:"],category:"food"},":turkey:":{uc_base:"1f983",uc_output:"1f983",uc_match:"1f983",uc_greedy:"1f983",shortnames:[],category:"nature"},":turtle:":{uc_base:"1f422",uc_output:"1f422",uc_match:"1f422",uc_greedy:"1f422",shortnames:[],category:"nature"},":tv:":{uc_base:"1f4fa",uc_output:"1f4fa",uc_match:"1f4fa-fe0f",uc_greedy:"1f4fa-fe0f",shortnames:[],category:"objects"},":twisted_rightwards_arrows:":{uc_base:"1f500",uc_output:"1f500",uc_match:"1f500",uc_greedy:"1f500",shortnames:[],category:"symbols"},":two_hearts:":{uc_base:"1f495",uc_output:"1f495",uc_match:"1f495",uc_greedy:"1f495",shortnames:[],category:"symbols"},":two_men_holding_hands:":{uc_base:"1f46c",uc_output:"1f46c",uc_match:"1f46c",uc_greedy:"1f46c",shortnames:[],category:"people"},":two_women_holding_hands:":{uc_base:"1f46d",uc_output:"1f46d",uc_match:"1f46d",uc_greedy:"1f46d",shortnames:[],category:"people"},":u5272:":{uc_base:"1f239",uc_output:"1f239",uc_match:"1f239",uc_greedy:"1f239",shortnames:[],category:"symbols"},":u5408:":{uc_base:"1f234",uc_output:"1f234",uc_match:"1f234",uc_greedy:"1f234",shortnames:[],category:"symbols"},":u55b6:":{uc_base:"1f23a",uc_output:"1f23a",uc_match:"1f23a",uc_greedy:"1f23a",shortnames:[],category:"symbols"},":u6307:":{uc_base:"1f22f",uc_output:"1f22f",uc_match:"1f22f-fe0f",uc_greedy:"1f22f-fe0f",shortnames:[],category:"symbols"},":u6708:":{uc_base:"1f237",uc_output:"1f237",uc_match:"1f237-fe0f",uc_greedy:"1f237-fe0f",shortnames:[],category:"symbols"},":u6709:":{uc_base:"1f236",uc_output:"1f236",uc_match:"1f236",uc_greedy:"1f236",shortnames:[],category:"symbols"},":u6e80:":{uc_base:"1f235",uc_output:"1f235",uc_match:"1f235",uc_greedy:"1f235",shortnames:[],category:"symbols"},":u7121:":{uc_base:"1f21a",uc_output:"1f21a",uc_match:"1f21a-fe0f",uc_greedy:"1f21a-fe0f",shortnames:[],category:"symbols"},":u7533:":{uc_base:"1f238",uc_output:"1f238",uc_match:"1f238",uc_greedy:"1f238",shortnames:[],category:"symbols"},":u7981:":{uc_base:"1f232",uc_output:"1f232",uc_match:"1f232",uc_greedy:"1f232",shortnames:[],category:"symbols"},":u7a7a:":{uc_base:"1f233",uc_output:"1f233",uc_match:"1f233",uc_greedy:"1f233",shortnames:[],category:"symbols"},":unamused:":{uc_base:"1f612",uc_output:"1f612",uc_match:"1f612",uc_greedy:"1f612",shortnames:[],category:"people"},":underage:":{uc_base:"1f51e",uc_output:"1f51e",uc_match:"1f51e",uc_greedy:"1f51e",shortnames:[],category:"symbols"},":unicorn:":{uc_base:"1f984",uc_output:"1f984",uc_match:"1f984",uc_greedy:"1f984",shortnames:[":unicorn_face:"],category:"nature"},":unlock:":{uc_base:"1f513",uc_output:"1f513",uc_match:"1f513-fe0f",uc_greedy:"1f513-fe0f",shortnames:[],category:"objects"},":up:":{uc_base:"1f199",uc_output:"1f199",uc_match:"1f199",uc_greedy:"1f199",shortnames:[],category:"symbols"},":upside_down:":{uc_base:"1f643",uc_output:"1f643",uc_match:"1f643",uc_greedy:"1f643",shortnames:[":upside_down_face:"],category:"people"},":vampire:":{uc_base:"1f9db",uc_output:"1f9db",uc_match:"1f9db",uc_greedy:"1f9db",shortnames:[],category:"people"},":vertical_traffic_light:":{uc_base:"1f6a6",uc_output:"1f6a6",uc_match:"1f6a6",uc_greedy:"1f6a6",shortnames:[],category:"travel"},":vhs:":{uc_base:"1f4fc",uc_output:"1f4fc",uc_match:"1f4fc",uc_greedy:"1f4fc",shortnames:[],category:"objects"},":vibration_mode:":{uc_base:"1f4f3",uc_output:"1f4f3",uc_match:"1f4f3",uc_greedy:"1f4f3",shortnames:[],category:"symbols"},":video_camera:":{uc_base:"1f4f9",uc_output:"1f4f9",uc_match:"1f4f9-fe0f",uc_greedy:"1f4f9-fe0f",shortnames:[],category:"objects"},":video_game:":{uc_base:"1f3ae",uc_output:"1f3ae",uc_match:"1f3ae-fe0f",uc_greedy:"1f3ae-fe0f",shortnames:[],category:"activity"},":violin:":{uc_base:"1f3bb",uc_output:"1f3bb",uc_match:"1f3bb",uc_greedy:"1f3bb",shortnames:[],category:"activity"},":volcano:":{uc_base:"1f30b",uc_output:"1f30b",uc_match:"1f30b",uc_greedy:"1f30b",shortnames:[],category:"travel"},":volleyball:":{uc_base:"1f3d0",uc_output:"1f3d0",uc_match:"1f3d0",uc_greedy:"1f3d0",shortnames:[],category:"activity"},":vs:":{uc_base:"1f19a",uc_output:"1f19a",uc_match:"1f19a",uc_greedy:"1f19a",shortnames:[],category:"symbols"},":vulcan:":{uc_base:"1f596",uc_output:"1f596",uc_match:"1f596",uc_greedy:"1f596",shortnames:[":raised_hand_with_part_between_middle_and_ring_fingers:"],category:"people"},":waning_crescent_moon:":{uc_base:"1f318",uc_output:"1f318",uc_match:"1f318",uc_greedy:"1f318",shortnames:[],category:"nature"},":waning_gibbous_moon:":{uc_base:"1f316",uc_output:"1f316",uc_match:"1f316",uc_greedy:"1f316",shortnames:[],category:"nature"},":wastebasket:":{uc_base:"1f5d1",uc_output:"1f5d1",uc_match:"1f5d1-fe0f",uc_greedy:"1f5d1-fe0f",shortnames:[],category:"objects"},":water_buffalo:":{uc_base:"1f403",uc_output:"1f403",uc_match:"1f403",uc_greedy:"1f403",shortnames:[],category:"nature"},":watermelon:":{uc_base:"1f349",uc_output:"1f349",uc_match:"1f349",uc_greedy:"1f349",shortnames:[],category:"food"},":wave:":{uc_base:"1f44b",uc_output:"1f44b",uc_match:"1f44b",uc_greedy:"1f44b",shortnames:[],category:"people"},":waxing_crescent_moon:":{uc_base:"1f312",uc_output:"1f312",uc_match:"1f312",uc_greedy:"1f312",shortnames:[],category:"nature"},":waxing_gibbous_moon:":{uc_base:"1f314",uc_output:"1f314",uc_match:"1f314",uc_greedy:"1f314",shortnames:[],category:"nature"},":wc:":{uc_base:"1f6be",uc_output:"1f6be",uc_match:"1f6be",uc_greedy:"1f6be",shortnames:[],category:"symbols"},":weary:":{uc_base:"1f629",uc_output:"1f629",uc_match:"1f629",uc_greedy:"1f629",shortnames:[],category:"people"},":wedding:":{uc_base:"1f492",uc_output:"1f492",uc_match:"1f492",uc_greedy:"1f492",shortnames:[],category:"travel"},":whale2:":{uc_base:"1f40b",uc_output:"1f40b",uc_match:"1f40b",uc_greedy:"1f40b",shortnames:[],category:"nature"},":whale:":{uc_base:"1f433",uc_output:"1f433",uc_match:"1f433",uc_greedy:"1f433",shortnames:[],category:"nature"},":white_flower:":{uc_base:"1f4ae",uc_output:"1f4ae",uc_match:"1f4ae",uc_greedy:"1f4ae",shortnames:[],category:"symbols"},":white_haired:":{uc_base:"1f9b3",uc_output:"1f9b3",uc_match:"1f9b3",uc_greedy:"1f9b3",shortnames:[],category:"people"},":white_square_button:":{uc_base:"1f533",uc_output:"1f533",uc_match:"1f533",uc_greedy:"1f533",shortnames:[],category:"symbols"},":white_sun_cloud:":{uc_base:"1f325",uc_output:"1f325",uc_match:"1f325-fe0f",uc_greedy:"1f325-fe0f",shortnames:[":white_sun_behind_cloud:"],category:"nature"},":white_sun_rain_cloud:":{uc_base:"1f326",uc_output:"1f326",uc_match:"1f326-fe0f",uc_greedy:"1f326-fe0f",shortnames:[":white_sun_behind_cloud_with_rain:"],category:"nature"},":white_sun_small_cloud:":{uc_base:"1f324",uc_output:"1f324",uc_match:"1f324-fe0f",uc_greedy:"1f324-fe0f",shortnames:[":white_sun_with_small_cloud:"],category:"nature"},":wilted_rose:":{uc_base:"1f940",uc_output:"1f940",uc_match:"1f940",uc_greedy:"1f940",shortnames:[":wilted_flower:"],category:"nature"},":wind_blowing_face:":{uc_base:"1f32c",uc_output:"1f32c",uc_match:"1f32c-fe0f",uc_greedy:"1f32c-fe0f",shortnames:[],category:"nature"},":wind_chime:":{uc_base:"1f390",uc_output:"1f390",uc_match:"1f390",uc_greedy:"1f390",shortnames:[],category:"objects"},":wine_glass:":{uc_base:"1f377",uc_output:"1f377",uc_match:"1f377",uc_greedy:"1f377",shortnames:[],category:"food"},":wink:":{uc_base:"1f609",uc_output:"1f609",uc_match:"1f609",uc_greedy:"1f609",shortnames:[],category:"people"},":wolf:":{uc_base:"1f43a",uc_output:"1f43a",uc_match:"1f43a",uc_greedy:"1f43a",shortnames:[],category:"nature"},":woman:":{uc_base:"1f469",uc_output:"1f469",uc_match:"1f469",uc_greedy:"1f469",shortnames:[],category:"people"},":woman_with_headscarf:":{uc_base:"1f9d5",uc_output:"1f9d5",uc_match:"1f9d5",uc_greedy:"1f9d5",shortnames:[],category:"people"},":womans_clothes:":{uc_base:"1f45a",uc_output:"1f45a",uc_match:"1f45a",uc_greedy:"1f45a",shortnames:[],category:"people"},":womans_flat_shoe:":{uc_base:"1f97f",uc_output:"1f97f",uc_match:"1f97f",uc_greedy:"1f97f",shortnames:[],category:"people"},":womans_hat:":{uc_base:"1f452",uc_output:"1f452",uc_match:"1f452",uc_greedy:"1f452",shortnames:[],category:"people"},":womens:":{uc_base:"1f6ba",uc_output:"1f6ba",uc_match:"1f6ba-fe0f",uc_greedy:"1f6ba-fe0f",shortnames:[],category:"symbols"},":woozy_face:":{uc_base:"1f974",uc_output:"1f974",uc_match:"1f974",uc_greedy:"1f974",shortnames:[],category:"people"},":worried:":{uc_base:"1f61f",uc_output:"1f61f",uc_match:"1f61f",uc_greedy:"1f61f",shortnames:[],category:"people"},":wrench:":{uc_base:"1f527",uc_output:"1f527",uc_match:"1f527",uc_greedy:"1f527",shortnames:[],category:"objects"},":yarn:":{uc_base:"1f9f6",uc_output:"1f9f6",uc_match:"1f9f6",uc_greedy:"1f9f6",shortnames:[],category:"objects"},":yellow_heart:":{uc_base:"1f49b",uc_output:"1f49b",uc_match:"1f49b",uc_greedy:"1f49b",shortnames:[],category:"symbols"},":yen:":{uc_base:"1f4b4",uc_output:"1f4b4",uc_match:"1f4b4",uc_greedy:"1f4b4",shortnames:[],category:"objects"},":yum:":{uc_base:"1f60b",uc_output:"1f60b",uc_match:"1f60b",uc_greedy:"1f60b",shortnames:[],category:"people"},":zany_face:":{uc_base:"1f92a",uc_output:"1f92a",uc_match:"1f92a",uc_greedy:"1f92a",shortnames:[],category:"people"},":zebra:":{uc_base:"1f993",uc_output:"1f993",uc_match:"1f993",uc_greedy:"1f993",shortnames:[],category:"nature"},":zipper_mouth:":{uc_base:"1f910",uc_output:"1f910",uc_match:"1f910",uc_greedy:"1f910",shortnames:[":zipper_mouth_face:"],category:"people"},":zombie:":{uc_base:"1f9df",uc_output:"1f9df",uc_match:"1f9df",uc_greedy:"1f9df",shortnames:[],category:"people"},":zzz:":{uc_base:"1f4a4",uc_output:"1f4a4",uc_match:"1f4a4",uc_greedy:"1f4a4",shortnames:[],category:"symbols"},":airplane:":{uc_base:"2708",uc_output:"2708",uc_match:"2708-fe0f",uc_greedy:"2708-fe0f",shortnames:[],category:"travel"},":alarm_clock:":{uc_base:"23f0",uc_output:"23f0",uc_match:"23f0",uc_greedy:"23f0",shortnames:[],category:"objects"},":alembic:":{uc_base:"2697",uc_output:"2697",uc_match:"2697-fe0f",uc_greedy:"2697-fe0f",shortnames:[],category:"objects"},":anchor:":{uc_base:"2693",uc_output:"2693",uc_match:"2693-fe0f",uc_greedy:"2693-fe0f",shortnames:[],category:"travel"},":aquarius:":{uc_base:"2652",uc_output:"2652",uc_match:"2652-fe0f",uc_greedy:"2652-fe0f",shortnames:[],category:"symbols"},":aries:":{uc_base:"2648",uc_output:"2648",uc_match:"2648-fe0f",uc_greedy:"2648-fe0f",shortnames:[],category:"symbols"},":arrow_backward:":{uc_base:"25c0",uc_output:"25c0",uc_match:"25c0-fe0f",uc_greedy:"25c0",shortnames:[],category:"symbols"},":arrow_double_down:":{uc_base:"23ec",uc_output:"23ec",uc_match:"23ec",uc_greedy:"23ec",shortnames:[],category:"symbols"},":arrow_double_up:":{uc_base:"23eb",uc_output:"23eb",uc_match:"23eb",uc_greedy:"23eb",shortnames:[],category:"symbols"},":arrow_down:":{uc_base:"2b07",uc_output:"2b07",uc_match:"2b07-fe0f",uc_greedy:"2b07",shortnames:[],category:"symbols"},":arrow_forward:":{uc_base:"25b6",uc_output:"25b6",uc_match:"25b6-fe0f",uc_greedy:"25b6",shortnames:[],category:"symbols"},":arrow_heading_down:":{uc_base:"2935",uc_output:"2935",uc_match:"2935-fe0f",uc_greedy:"2935",shortnames:[],category:"symbols"},":arrow_heading_up:":{uc_base:"2934",uc_output:"2934",uc_match:"2934-fe0f",uc_greedy:"2934",shortnames:[],category:"symbols"},":arrow_left:":{uc_base:"2b05",uc_output:"2b05",uc_match:"2b05-fe0f",uc_greedy:"2b05",shortnames:[],category:"symbols"},":arrow_lower_left:":{uc_base:"2199",uc_output:"2199",uc_match:"2199-fe0f",uc_greedy:"2199",shortnames:[],category:"symbols"},":arrow_lower_right:":{uc_base:"2198",uc_output:"2198",uc_match:"2198-fe0f",uc_greedy:"2198",shortnames:[],category:"symbols"},":arrow_right:":{uc_base:"27a1",uc_output:"27a1",uc_match:"27a1-fe0f",uc_greedy:"27a1",shortnames:[],category:"symbols"},":arrow_right_hook:":{uc_base:"21aa",uc_output:"21aa",uc_match:"21aa-fe0f",uc_greedy:"21aa",shortnames:[],category:"symbols"},":arrow_up:":{uc_base:"2b06",uc_output:"2b06",uc_match:"2b06-fe0f",uc_greedy:"2b06",shortnames:[],category:"symbols"},":arrow_up_down:":{uc_base:"2195",uc_output:"2195",uc_match:"2195-fe0f",uc_greedy:"2195",shortnames:[],category:"symbols"},":arrow_upper_left:":{uc_base:"2196",uc_output:"2196",uc_match:"2196-fe0f",uc_greedy:"2196",shortnames:[],category:"symbols"},":arrow_upper_right:":{uc_base:"2197",uc_output:"2197",uc_match:"2197-fe0f",uc_greedy:"2197",shortnames:[],category:"symbols"},":atom:":{uc_base:"269b",uc_output:"269b",uc_match:"269b-fe0f",uc_greedy:"269b",shortnames:[":atom_symbol:"],category:"symbols"},":ballot_box_with_check:":{uc_base:"2611",uc_output:"2611",uc_match:"2611-fe0f",uc_greedy:"2611",shortnames:[],category:"symbols"},":bangbang:":{uc_base:"203c",uc_output:"203c",uc_match:"203c-fe0f",uc_greedy:"203c",shortnames:[],category:"symbols"},":baseball:":{uc_base:"26be",uc_output:"26be",uc_match:"26be-fe0f",uc_greedy:"26be-fe0f",shortnames:[],category:"activity"},":beach_umbrella:":{uc_base:"26f1",uc_output:"26f1",uc_match:"26f1-fe0f",uc_greedy:"26f1-fe0f",shortnames:[":umbrella_on_ground:"],category:"travel"},":biohazard:":{uc_base:"2623",uc_output:"2623",uc_match:"2623-fe0f",uc_greedy:"2623",shortnames:[":biohazard_sign:"],category:"symbols"},":black_circle:":{uc_base:"26ab",uc_output:"26ab",uc_match:"26ab-fe0f",uc_greedy:"26ab-fe0f",shortnames:[],category:"symbols"},":black_large_square:":{uc_base:"2b1b",uc_output:"2b1b",uc_match:"2b1b-fe0f",uc_greedy:"2b1b-fe0f",shortnames:[],category:"symbols"},":black_medium_small_square:":{uc_base:"25fe",uc_output:"25fe",uc_match:"25fe-fe0f",uc_greedy:"25fe-fe0f",shortnames:[],category:"symbols"},":black_medium_square:":{uc_base:"25fc",uc_output:"25fc",uc_match:"25fc-fe0f",uc_greedy:"25fc",shortnames:[],category:"symbols"},":black_nib:":{uc_base:"2712",uc_output:"2712",uc_match:"2712-fe0f",uc_greedy:"2712-fe0f",shortnames:[],category:"objects"},":black_small_square:":{uc_base:"25aa",uc_output:"25aa",uc_match:"25aa-fe0f",uc_greedy:"25aa",shortnames:[],category:"symbols"},":cancer:":{uc_base:"264b",uc_output:"264b",uc_match:"264b-fe0f",uc_greedy:"264b-fe0f",shortnames:[],category:"symbols"},":capricorn:":{uc_base:"2651",uc_output:"2651",uc_match:"2651-fe0f",uc_greedy:"2651-fe0f",shortnames:[],category:"symbols"},":chains:":{uc_base:"26d3",uc_output:"26d3",uc_match:"26d3-fe0f",uc_greedy:"26d3-fe0f",shortnames:[],category:"objects"},":church:":{uc_base:"26ea",uc_output:"26ea",uc_match:"26ea-fe0f",uc_greedy:"26ea-fe0f",shortnames:[],category:"travel"},":cloud:":{uc_base:"2601",uc_output:"2601",uc_match:"2601-fe0f",uc_greedy:"2601-fe0f",shortnames:[],category:"nature"},":clubs:":{uc_base:"2663",uc_output:"2663",uc_match:"2663-fe0f",uc_greedy:"2663-fe0f",shortnames:[],category:"symbols"},":coffee:":{uc_base:"2615",uc_output:"2615",uc_match:"2615-fe0f",uc_greedy:"2615-fe0f",shortnames:[],category:"food"},":coffin:":{uc_base:"26b0",uc_output:"26b0",uc_match:"26b0-fe0f",uc_greedy:"26b0-fe0f",shortnames:[],category:"objects"},":comet:":{uc_base:"2604",uc_output:"2604",uc_match:"2604-fe0f",uc_greedy:"2604-fe0f",shortnames:[],category:"nature"},":congratulations:":{uc_base:"3297",uc_output:"3297",uc_match:"3297-fe0f",uc_greedy:"3297-fe0f",shortnames:[],category:"symbols"},":cross:":{uc_base:"271d",uc_output:"271d",uc_match:"271d-fe0f",uc_greedy:"271d",shortnames:[":latin_cross:"],category:"symbols"},":crossed_swords:":{uc_base:"2694",uc_output:"2694",uc_match:"2694-fe0f",uc_greedy:"2694-fe0f",shortnames:[],category:"objects"},":curly_loop:":{uc_base:"27b0",uc_output:"27b0",uc_match:"27b0",uc_greedy:"27b0",shortnames:[],category:"symbols"},":diamonds:":{uc_base:"2666",uc_output:"2666",uc_match:"2666-fe0f",uc_greedy:"2666-fe0f",shortnames:[],category:"symbols"},":eight_pointed_black_star:":{uc_base:"2734",uc_output:"2734",uc_match:"2734-fe0f",uc_greedy:"2734-fe0f",shortnames:[],category:"symbols"},":eight_spoked_asterisk:":{uc_base:"2733",uc_output:"2733",uc_match:"2733-fe0f",uc_greedy:"2733-fe0f",shortnames:[],category:"symbols"},":eject:":{uc_base:"23cf",uc_output:"23cf",uc_match:"23cf-fe0f",uc_greedy:"23cf",shortnames:[":eject_symbol:"],category:"symbols"},":envelope:":{uc_base:"2709",uc_output:"2709",uc_match:"2709-fe0f",uc_greedy:"2709-fe0f",shortnames:[],category:"objects"},":exclamation:":{uc_base:"2757",uc_output:"2757",uc_match:"2757-fe0f",uc_greedy:"2757-fe0f",shortnames:[],category:"symbols"},":fast_forward:":{uc_base:"23e9",uc_output:"23e9",uc_match:"23e9-fe0f",uc_greedy:"23e9-fe0f",shortnames:[],category:"symbols"},":female_sign:":{uc_base:"2640",uc_output:"2640",uc_match:"2640-fe0f",uc_greedy:"2640",shortnames:[],category:"symbols"},":ferry:":{uc_base:"26f4",uc_output:"26f4",uc_match:"26f4-fe0f",uc_greedy:"26f4-fe0f",shortnames:[],category:"travel"},":fist:":{uc_base:"270a",uc_output:"270a",uc_match:"270a",uc_greedy:"270a",shortnames:[],category:"people"},":fleur-de-lis:":{uc_base:"269c",uc_output:"269c",uc_match:"269c-fe0f",uc_greedy:"269c-fe0f",shortnames:[],category:"symbols"},":fountain:":{uc_base:"26f2",uc_output:"26f2",uc_match:"26f2-fe0f",uc_greedy:"26f2-fe0f",shortnames:[],category:"travel"},":frowning2:":{uc_base:"2639",uc_output:"2639",uc_match:"2639-fe0f",uc_greedy:"2639-fe0f",shortnames:[":white_frowning_face:"],category:"people"},":fuelpump:":{uc_base:"26fd",uc_output:"26fd",uc_match:"26fd-fe0f",uc_greedy:"26fd-fe0f",shortnames:[],category:"travel"},":gear:":{uc_base:"2699",uc_output:"2699",uc_match:"2699-fe0f",uc_greedy:"2699-fe0f",shortnames:[],category:"objects"},":gemini:":{uc_base:"264a",uc_output:"264a",uc_match:"264a-fe0f",uc_greedy:"264a-fe0f",shortnames:[],category:"symbols"},":golf:":{uc_base:"26f3",uc_output:"26f3",uc_match:"26f3-fe0f",uc_greedy:"26f3-fe0f",shortnames:[],category:"activity"},":grey_exclamation:":{uc_base:"2755",uc_output:"2755",uc_match:"2755",uc_greedy:"2755",shortnames:[],category:"symbols"},":grey_question:":{uc_base:"2754",uc_output:"2754",uc_match:"2754",uc_greedy:"2754",shortnames:[],category:"symbols"},":hammer_pick:":{uc_base:"2692",uc_output:"2692",uc_match:"2692-fe0f",uc_greedy:"2692-fe0f",shortnames:[":hammer_and_pick:"],category:"objects"},":heart:":{uc_base:"2764",uc_output:"2764",uc_match:"2764-fe0f",uc_greedy:"2764-fe0f",shortnames:[],category:"symbols"},":heart_exclamation:":{uc_base:"2763",uc_output:"2763",uc_match:"2763-fe0f",uc_greedy:"2763-fe0f",shortnames:[":heavy_heart_exclamation_mark_ornament:"],category:"symbols"},":hearts:":{uc_base:"2665",uc_output:"2665",uc_match:"2665-fe0f",uc_greedy:"2665-fe0f",shortnames:[],category:"symbols"},":heavy_check_mark:":{uc_base:"2714",uc_output:"2714",uc_match:"2714-fe0f",uc_greedy:"2714",shortnames:[],category:"symbols"},":heavy_division_sign:":{uc_base:"2797",uc_output:"2797",uc_match:"2797",uc_greedy:"2797",shortnames:[],category:"symbols"},":heavy_minus_sign:":{uc_base:"2796",uc_output:"2796",uc_match:"2796",uc_greedy:"2796",shortnames:[],category:"symbols"},":heavy_multiplication_x:":{uc_base:"2716",uc_output:"2716",uc_match:"2716-fe0f",uc_greedy:"2716",shortnames:[],category:"symbols"},":heavy_plus_sign:":{uc_base:"2795",uc_output:"2795",uc_match:"2795",uc_greedy:"2795",shortnames:[],category:"symbols"},":helmet_with_cross:":{uc_base:"26d1",uc_output:"26d1",uc_match:"26d1-fe0f",uc_greedy:"26d1-fe0f",shortnames:[":helmet_with_white_cross:"],category:"people"},":hotsprings:":{uc_base:"2668",uc_output:"2668",uc_match:"2668-fe0f",uc_greedy:"2668-fe0f",shortnames:[],category:"symbols"},":hourglass:":{uc_base:"231b",uc_output:"231b",uc_match:"231b-fe0f",uc_greedy:"231b-fe0f",shortnames:[],category:"objects"},":hourglass_flowing_sand:":{uc_base:"23f3",uc_output:"23f3",uc_match:"23f3-fe0f",uc_greedy:"23f3-fe0f",shortnames:[],category:"objects"},":ice_skate:":{uc_base:"26f8",uc_output:"26f8",uc_match:"26f8-fe0f",uc_greedy:"26f8-fe0f",shortnames:[],category:"activity"},":information_source:":{uc_base:"2139",uc_output:"2139",uc_match:"2139-fe0f",uc_greedy:"2139",shortnames:[],category:"symbols"},":interrobang:":{uc_base:"2049",uc_output:"2049",uc_match:"2049-fe0f",uc_greedy:"2049",shortnames:[],category:"symbols"},":keyboard:":{uc_base:"2328",uc_output:"2328",uc_match:"2328-fe0f",uc_greedy:"2328-fe0f",shortnames:[],category:"objects"},":left_right_arrow:":{uc_base:"2194",uc_output:"2194",uc_match:"2194-fe0f",uc_greedy:"2194",shortnames:[],category:"symbols"},":leftwards_arrow_with_hook:":{uc_base:"21a9",uc_output:"21a9",uc_match:"21a9-fe0f",uc_greedy:"21a9",shortnames:[],category:"symbols"},":leo:":{uc_base:"264c",uc_output:"264c",uc_match:"264c-fe0f",uc_greedy:"264c-fe0f",shortnames:[],category:"symbols"},":libra:":{uc_base:"264e",uc_output:"264e",uc_match:"264e-fe0f",uc_greedy:"264e-fe0f",shortnames:[],category:"symbols"},":loop:":{uc_base:"27bf",uc_output:"27bf",uc_match:"27bf",uc_greedy:"27bf",shortnames:[],category:"symbols"},":m:":{uc_base:"24c2",uc_output:"24c2",uc_match:"24c2-fe0f",uc_greedy:"24c2-fe0f",shortnames:[],category:"symbols"},":male_sign:":{uc_base:"2642",uc_output:"2642",uc_match:"2642-fe0f",uc_greedy:"2642",shortnames:[],category:"symbols"},":medical_symbol:":{uc_base:"2695",uc_output:"2695",uc_match:"2695-fe0f",uc_greedy:"2695",shortnames:[],category:"symbols"},":mountain:":{uc_base:"26f0",uc_output:"26f0",uc_match:"26f0-fe0f",uc_greedy:"26f0-fe0f",shortnames:[],category:"travel"},":negative_squared_cross_mark:":{uc_base:"274e",uc_output:"274e",uc_match:"274e",uc_greedy:"274e",shortnames:[],category:"symbols"},":no_entry:":{uc_base:"26d4",uc_output:"26d4",uc_match:"26d4-fe0f",uc_greedy:"26d4-fe0f",shortnames:[],category:"symbols"},":o:":{uc_base:"2b55",uc_output:"2b55",uc_match:"2b55-fe0f",uc_greedy:"2b55-fe0f",shortnames:[],category:"symbols"},":ophiuchus:":{uc_base:"26ce",uc_output:"26ce",uc_match:"26ce",uc_greedy:"26ce",shortnames:[],category:"symbols"},":orthodox_cross:":{uc_base:"2626",uc_output:"2626",uc_match:"2626-fe0f",uc_greedy:"2626",shortnames:[],category:"symbols"},":part_alternation_mark:":{uc_base:"303d",uc_output:"303d",uc_match:"303d-fe0f",uc_greedy:"303d-fe0f",shortnames:[],category:"symbols"},":partly_sunny:":{uc_base:"26c5",uc_output:"26c5",uc_match:"26c5-fe0f",uc_greedy:"26c5-fe0f",shortnames:[],category:"nature"},":pause_button:":{uc_base:"23f8",uc_output:"23f8",uc_match:"23f8-fe0f",uc_greedy:"23f8",shortnames:[":double_vertical_bar:"],category:"symbols"},":peace:":{uc_base:"262e",uc_output:"262e",uc_match:"262e-fe0f",uc_greedy:"262e",shortnames:[":peace_symbol:"],category:"symbols"},":pencil2:":{uc_base:"270f",uc_output:"270f",uc_match:"270f-fe0f",uc_greedy:"270f-fe0f",shortnames:[],category:"objects"},":person_bouncing_ball:":{uc_base:"26f9",uc_output:"26f9",uc_match:"26f9-fe0f",uc_greedy:"26f9-fe0f",shortnames:[":basketball_player:",":person_with_ball:"],category:"activity"},":pick:":{uc_base:"26cf",uc_output:"26cf",uc_match:"26cf-fe0f",uc_greedy:"26cf-fe0f",shortnames:[],category:"objects"},":pisces:":{uc_base:"2653",uc_output:"2653",uc_match:"2653-fe0f",uc_greedy:"2653-fe0f",shortnames:[],category:"symbols"},":play_pause:":{uc_base:"23ef",uc_output:"23ef",uc_match:"23ef-fe0f",uc_greedy:"23ef",shortnames:[],category:"symbols"},":point_up:":{uc_base:"261d",uc_output:"261d",uc_match:"261d-fe0f",uc_greedy:"261d-fe0f",shortnames:[],category:"people"},":question:":{uc_base:"2753",uc_output:"2753",uc_match:"2753-fe0f",uc_greedy:"2753-fe0f",shortnames:[],category:"symbols"},":radioactive:":{uc_base:"2622",uc_output:"2622",uc_match:"2622-fe0f",uc_greedy:"2622",shortnames:[":radioactive_sign:"],category:"symbols"},":raised_hand:":{uc_base:"270b",uc_output:"270b",uc_match:"270b",uc_greedy:"270b",shortnames:[],category:"people"},":record_button:":{uc_base:"23fa",uc_output:"23fa",uc_match:"23fa-fe0f",uc_greedy:"23fa",shortnames:[],category:"symbols"},":recycle:":{uc_base:"267b",uc_output:"267b",uc_match:"267b-fe0f",uc_greedy:"267b-fe0f",shortnames:[],category:"symbols"},":relaxed:":{uc_base:"263a",uc_output:"263a",uc_match:"263a-fe0f",uc_greedy:"263a-fe0f",shortnames:[],category:"people"},":rewind:":{uc_base:"23ea",uc_output:"23ea",uc_match:"23ea-fe0f",uc_greedy:"23ea-fe0f",shortnames:[],category:"symbols"},":sagittarius:":{uc_base:"2650",uc_output:"2650",uc_match:"2650-fe0f",uc_greedy:"2650-fe0f",shortnames:[],category:"symbols"},":sailboat:":{uc_base:"26f5",uc_output:"26f5",uc_match:"26f5-fe0f",uc_greedy:"26f5-fe0f",shortnames:[],category:"travel"},":scales:":{uc_base:"2696",uc_output:"2696",uc_match:"2696-fe0f",uc_greedy:"2696-fe0f",shortnames:[],category:"objects"},":scissors:":{uc_base:"2702",uc_output:"2702",uc_match:"2702-fe0f",uc_greedy:"2702-fe0f",shortnames:[],category:"objects"},":scorpius:":{uc_base:"264f",uc_output:"264f",uc_match:"264f-fe0f",uc_greedy:"264f-fe0f",shortnames:[],category:"symbols"},":secret:":{uc_base:"3299",uc_output:"3299",uc_match:"3299-fe0f",uc_greedy:"3299-fe0f",shortnames:[],category:"symbols"},":shamrock:":{uc_base:"2618",uc_output:"2618",uc_match:"2618-fe0f",uc_greedy:"2618-fe0f",shortnames:[],category:"nature"},":shinto_shrine:":{uc_base:"26e9",uc_output:"26e9",uc_match:"26e9-fe0f",uc_greedy:"26e9-fe0f",shortnames:[],category:"travel"},":skier:":{uc_base:"26f7",uc_output:"26f7",uc_match:"26f7-fe0f",uc_greedy:"26f7-fe0f",shortnames:[],category:"activity"},":skull_crossbones:":{uc_base:"2620",uc_output:"2620",uc_match:"2620-fe0f",uc_greedy:"2620-fe0f",shortnames:[":skull_and_crossbones:"],category:"people"},":snowflake:":{uc_base:"2744",uc_output:"2744",uc_match:"2744-fe0f",uc_greedy:"2744-fe0f",shortnames:[],category:"nature"},":snowman2:":{uc_base:"2603",uc_output:"2603",uc_match:"2603-fe0f",uc_greedy:"2603-fe0f",shortnames:[],category:"nature"},":snowman:":{uc_base:"26c4",uc_output:"26c4",uc_match:"26c4-fe0f",uc_greedy:"26c4-fe0f",shortnames:[],category:"nature"},":soccer:":{uc_base:"26bd",uc_output:"26bd",uc_match:"26bd-fe0f",uc_greedy:"26bd-fe0f",shortnames:[],category:"activity"},":spades:":{uc_base:"2660",uc_output:"2660",uc_match:"2660-fe0f",uc_greedy:"2660-fe0f",shortnames:[],category:"symbols"},":sparkle:":{uc_base:"2747",uc_output:"2747",uc_match:"2747-fe0f",uc_greedy:"2747-fe0f",shortnames:[],category:"symbols"},":sparkles:":{uc_base:"2728",uc_output:"2728",uc_match:"2728",uc_greedy:"2728",shortnames:[],category:"nature"},":star:":{uc_base:"2b50",uc_output:"2b50",uc_match:"2b50-fe0f",uc_greedy:"2b50-fe0f",shortnames:[],category:"nature"},":star_and_crescent:":{uc_base:"262a",uc_output:"262a",uc_match:"262a-fe0f",uc_greedy:"262a",shortnames:[],category:"symbols"},":star_of_david:":{uc_base:"2721",uc_output:"2721",uc_match:"2721-fe0f",uc_greedy:"2721",shortnames:[],category:"symbols"},":stop_button:":{uc_base:"23f9",uc_output:"23f9",uc_match:"23f9-fe0f",uc_greedy:"23f9",shortnames:[],category:"symbols"},":stopwatch:":{uc_base:"23f1",uc_output:"23f1",uc_match:"23f1-fe0f",uc_greedy:"23f1-fe0f",shortnames:[],category:"objects"},":sunny:":{uc_base:"2600",uc_output:"2600",uc_match:"2600-fe0f",uc_greedy:"2600-fe0f",shortnames:[],category:"nature"},":taurus:":{uc_base:"2649",uc_output:"2649",uc_match:"2649-fe0f",uc_greedy:"2649-fe0f",shortnames:[],category:"symbols"},":telephone:":{uc_base:"260e",uc_output:"260e",uc_match:"260e-fe0f",uc_greedy:"260e-fe0f",shortnames:[],category:"objects"},":tent:":{uc_base:"26fa",uc_output:"26fa",uc_match:"26fa-fe0f",uc_greedy:"26fa-fe0f",shortnames:[],category:"travel"},":thunder_cloud_rain:":{uc_base:"26c8",uc_output:"26c8",uc_match:"26c8-fe0f",uc_greedy:"26c8-fe0f",shortnames:[":thunder_cloud_and_rain:"],category:"nature"},":timer:":{uc_base:"23f2",uc_output:"23f2",uc_match:"23f2-fe0f",uc_greedy:"23f2-fe0f",shortnames:[":timer_clock:"],category:"objects"},":track_next:":{uc_base:"23ed",uc_output:"23ed",uc_match:"23ed-fe0f",uc_greedy:"23ed",shortnames:[":next_track:"],category:"symbols"},":track_previous:":{uc_base:"23ee",uc_output:"23ee",uc_match:"23ee-fe0f",uc_greedy:"23ee",shortnames:[":previous_track:"],category:"symbols"},":umbrella2:":{uc_base:"2602",uc_output:"2602",uc_match:"2602-fe0f",uc_greedy:"2602-fe0f",shortnames:[],category:"nature"},":umbrella:":{uc_base:"2614",uc_output:"2614",uc_match:"2614-fe0f",uc_greedy:"2614-fe0f",shortnames:[],category:"nature"},":urn:":{uc_base:"26b1",uc_output:"26b1",uc_match:"26b1-fe0f",uc_greedy:"26b1-fe0f",shortnames:[":funeral_urn:"],category:"objects"},":v:":{uc_base:"270c",uc_output:"270c",uc_match:"270c-fe0f",uc_greedy:"270c-fe0f",shortnames:[],category:"people"},":virgo:":{uc_base:"264d",uc_output:"264d",uc_match:"264d-fe0f",uc_greedy:"264d-fe0f",shortnames:[],category:"symbols"},":warning:":{uc_base:"26a0",uc_output:"26a0",uc_match:"26a0-fe0f",uc_greedy:"26a0",shortnames:[],category:"symbols"},":watch:":{uc_base:"231a",uc_output:"231a",uc_match:"231a-fe0f",uc_greedy:"231a-fe0f",shortnames:[],category:"objects"},":wavy_dash:":{uc_base:"3030",uc_output:"3030",uc_match:"3030-fe0f",uc_greedy:"3030",shortnames:[],category:"symbols"},":wheel_of_dharma:":{uc_base:"2638",uc_output:"2638",uc_match:"2638-fe0f",uc_greedy:"2638",shortnames:[],category:"symbols"},":wheelchair:":{uc_base:"267f",uc_output:"267f",uc_match:"267f-fe0f",uc_greedy:"267f-fe0f",shortnames:[],category:"symbols"},":white_check_mark:":{uc_base:"2705",uc_output:"2705",uc_match:"2705",uc_greedy:"2705",shortnames:[],category:"symbols"},":white_circle:":{uc_base:"26aa",uc_output:"26aa",uc_match:"26aa-fe0f",uc_greedy:"26aa-fe0f",shortnames:[],category:"symbols"},":white_large_square:":{uc_base:"2b1c",uc_output:"2b1c",uc_match:"2b1c-fe0f",uc_greedy:"2b1c-fe0f",shortnames:[],category:"symbols"},":white_medium_small_square:":{uc_base:"25fd",uc_output:"25fd",uc_match:"25fd-fe0f",uc_greedy:"25fd-fe0f",shortnames:[],category:"symbols"},":white_medium_square:":{uc_base:"25fb",uc_output:"25fb",uc_match:"25fb-fe0f",uc_greedy:"25fb",shortnames:[],category:"symbols"},":white_small_square:":{uc_base:"25ab",uc_output:"25ab",uc_match:"25ab-fe0f",uc_greedy:"25ab",shortnames:[],category:"symbols"},":writing_hand:":{uc_base:"270d",uc_output:"270d",uc_match:"270d-fe0f",uc_greedy:"270d-fe0f",shortnames:[],category:"people"},":x:":{uc_base:"274c",uc_output:"274c",uc_match:"274c",uc_greedy:"274c",shortnames:[],category:"symbols"},":yin_yang:":{uc_base:"262f",uc_output:"262f",uc_match:"262f-fe0f",uc_greedy:"262f",shortnames:[],category:"symbols"},":zap:":{uc_base:"26a1",uc_output:"26a1",uc_match:"26a1-fe0f",uc_greedy:"26a1-fe0f",shortnames:[],category:"nature"}};var t,e=[];for(t in d.emojioneList)if(d.emojioneList.hasOwnProperty(t)&&""!==t){e.push(t.replace(/[+]/g,"\\$&"));for(var n=0;n<d.emojioneList[t].shortnames.length;n++)e.push(d.emojioneList[t].shortnames[n].replace(/[+]/g,"\\$&"))}d.shortnames=e.join("|"),d.jsEscapeMap={"👩\200d❤️\200d💋\200d👩":"1f469-2764-1f48b-1f469","👨\200d❤️\200d💋\200d👨":"1f468-2764-1f48b-1f468","👩\200d❤️\200d💋\200d👨":"1f469-2764-1f48b-1f468","🏴\e0067\e0062\e0065\e006e\e0067\e007f":"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f","🏴\e0067\e0062\e0073\e0063\e0074\e007f":"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f","🏴\e0067\e0062\e0077\e006c\e0073\e007f":"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f","👨\200d👨\200d👦\200d👦":"1f468-1f468-1f466-1f466","👨\200d👨\200d👧\200d👦":"1f468-1f468-1f467-1f466","👨\200d👨\200d👧\200d👧":"1f468-1f468-1f467-1f467","👨\200d👩\200d👦\200d👦":"1f468-1f469-1f466-1f466","👨\200d👩\200d👧\200d👦":"1f468-1f469-1f467-1f466","👨\200d👩\200d👧\200d👧":"1f468-1f469-1f467-1f467","👩\200d👩\200d👦\200d👦":"1f469-1f469-1f466-1f466","👩\200d👩\200d👧\200d👦":"1f469-1f469-1f467-1f466","👩\200d👩\200d👧\200d👧":"1f469-1f469-1f467-1f467","👨\200d\200d💋\200d👨":"1f468-2764-1f48b-1f468","👩\200d\200d💋\200d👨":"1f469-2764-1f48b-1f468","👩\200d\200d💋\200d👩":"1f469-2764-1f48b-1f469","👩\200d❤️\200d👩":"1f469-2764-1f469","👨\200d❤️\200d👨":"1f468-2764-1f468","👩\200d❤️\200d👨":"1f469-2764-1f468","🕵️🏻\200d♀️":"1f575-1f3fb-2640","🕵️🏻\200d♂️":"1f575-1f3fb-2642","🕵️🏼\200d♀️":"1f575-1f3fc-2640","🕵️🏼\200d♂️":"1f575-1f3fc-2642","🕵️🏽\200d♀️":"1f575-1f3fd-2640","🕵️🏽\200d♂️":"1f575-1f3fd-2642","🕵️🏾\200d♀️":"1f575-1f3fe-2640","🕵️🏾\200d♂️":"1f575-1f3fe-2642","🕵️🏿\200d♀️":"1f575-1f3ff-2640","🕵️🏿\200d♂️":"1f575-1f3ff-2642","🏋️🏻\200d♀️":"1f3cb-1f3fb-2640","🏋️🏻\200d♂️":"1f3cb-1f3fb-2642","🏋️🏼\200d♀️":"1f3cb-1f3fc-2640","🏋️🏼\200d♂️":"1f3cb-1f3fc-2642","🏋️🏽\200d♀️":"1f3cb-1f3fd-2640","🏋️🏽\200d♂️":"1f3cb-1f3fd-2642","🏋️🏾\200d♀️":"1f3cb-1f3fe-2640","🏋️🏾\200d♂️":"1f3cb-1f3fe-2642","🏋️🏿\200d♀️":"1f3cb-1f3ff-2640","🏋️🏿\200d♂️":"1f3cb-1f3ff-2642","🏌️🏻\200d♀️":"1f3cc-1f3fb-2640","🏌️🏻\200d♂️":"1f3cc-1f3fb-2642","🏌️🏼\200d♀️":"1f3cc-1f3fc-2640","🏌️🏼\200d♂️":"1f3cc-1f3fc-2642","🏌️🏽\200d♀️":"1f3cc-1f3fd-2640","🏌️🏽\200d♂️":"1f3cc-1f3fd-2642","🏌️🏾\200d♀️":"1f3cc-1f3fe-2640","🏌️🏾\200d♂️":"1f3cc-1f3fe-2642","🏌️🏿\200d♀️":"1f3cc-1f3ff-2640","🏌️🏿\200d♂️":"1f3cc-1f3ff-2642","⛹️🏻\200d♀️":"26f9-1f3fb-2640","⛹️🏻\200d♂️":"26f9-1f3fb-2642","⛹️🏼\200d♀️":"26f9-1f3fc-2640","⛹️🏼\200d♂️":"26f9-1f3fc-2642","⛹️🏽\200d♀️":"26f9-1f3fd-2640","⛹️🏽\200d♂️":"26f9-1f3fd-2642","⛹️🏾\200d♀️":"26f9-1f3fe-2640","⛹️🏾\200d♂️":"26f9-1f3fe-2642","⛹️🏿\200d♀️":"26f9-1f3ff-2640","⛹️🏿\200d♂️":"26f9-1f3ff-2642","👨\200d👨\200d👦":"1f468-1f468-1f466","👨\200d👨\200d👧":"1f468-1f468-1f467","👨\200d👩\200d👧":"1f468-1f469-1f467","👩\200d👩\200d👦":"1f469-1f469-1f466","👩\200d👩\200d👧":"1f469-1f469-1f467","👨\200d👦\200d👦":"1f468-1f466-1f466","👨\200d👧\200d👦":"1f468-1f467-1f466","👩\200d👦\200d👦":"1f469-1f466-1f466","👩\200d👧\200d👦":"1f469-1f467-1f466","👩\200d👧\200d👧":"1f469-1f467-1f467","👨❤️💋👨":"1f468-2764-1f48b-1f468","👨\200d👧\200d👧":"1f468-1f467-1f467","👨\200d👩\200d👦":"1f468-1f469-1f466","👩❤️💋👨":"1f469-2764-1f48b-1f468","👩❤️💋👩":"1f469-2764-1f48b-1f469","👨\200d\200d👨":"1f468-2764-1f468","👩\200d\200d👨":"1f469-2764-1f468","👩\200d\200d👩":"1f469-2764-1f469","👨🏻\200d⚕️":"1f468-1f3fb-2695","👨🏻\200d⚖️":"1f468-1f3fb-2696","👨🏻\200d✈️":"1f468-1f3fb-2708","👨🏼\200d⚕️":"1f468-1f3fc-2695","👨🏼\200d⚖️":"1f468-1f3fc-2696","👨🏼\200d✈️":"1f468-1f3fc-2708","👨🏽\200d⚕️":"1f468-1f3fd-2695","👨🏽\200d⚖️":"1f468-1f3fd-2696","👨🏽\200d✈️":"1f468-1f3fd-2708","👨🏾\200d⚕️":"1f468-1f3fe-2695","👨🏾\200d⚖️":"1f468-1f3fe-2696","👨🏾\200d✈️":"1f468-1f3fe-2708","👨🏿\200d⚕️":"1f468-1f3ff-2695","👨🏿\200d⚖️":"1f468-1f3ff-2696","👨🏿\200d✈️":"1f468-1f3ff-2708","👩🏻\200d⚕️":"1f469-1f3fb-2695","👩🏻\200d⚖️":"1f469-1f3fb-2696","👩🏻\200d✈️":"1f469-1f3fb-2708","👩🏼\200d⚕️":"1f469-1f3fc-2695","👩🏼\200d⚖️":"1f469-1f3fc-2696","👩🏼\200d✈️":"1f469-1f3fc-2708","👩🏽\200d⚕️":"1f469-1f3fd-2695","👩🏽\200d⚖️":"1f469-1f3fd-2696","👩🏽\200d✈️":"1f469-1f3fd-2708","👩🏾\200d⚕️":"1f469-1f3fe-2695","👩🏾\200d⚖️":"1f469-1f3fe-2696","👩🏾\200d✈️":"1f469-1f3fe-2708","👩🏿\200d⚕️":"1f469-1f3ff-2695","👩🏿\200d⚖️":"1f469-1f3ff-2696","👩🏿\200d✈️":"1f469-1f3ff-2708","👮🏻\200d♀️":"1f46e-1f3fb-2640","👮🏻\200d♂️":"1f46e-1f3fb-2642","👮🏼\200d♀️":"1f46e-1f3fc-2640","👮🏼\200d♂️":"1f46e-1f3fc-2642","👮🏽\200d♀️":"1f46e-1f3fd-2640","👮🏽\200d♂️":"1f46e-1f3fd-2642","👮🏾\200d♀️":"1f46e-1f3fe-2640","👮🏾\200d♂️":"1f46e-1f3fe-2642","👮🏿\200d♀️":"1f46e-1f3ff-2640","👮🏿\200d♂️":"1f46e-1f3ff-2642","👱🏻\200d♀️":"1f471-1f3fb-2640","👱🏻\200d♂️":"1f471-1f3fb-2642","👱🏼\200d♀️":"1f471-1f3fc-2640","👱🏼\200d♂️":"1f471-1f3fc-2642","👱🏽\200d♀️":"1f471-1f3fd-2640","👱🏽\200d♂️":"1f471-1f3fd-2642","👱🏾\200d♀️":"1f471-1f3fe-2640","👱🏾\200d♂️":"1f471-1f3fe-2642","👱🏿\200d♀️":"1f471-1f3ff-2640","👱🏿\200d♂️":"1f471-1f3ff-2642","👳🏻\200d♀️":"1f473-1f3fb-2640","👳🏻\200d♂️":"1f473-1f3fb-2642","👳🏼\200d♀️":"1f473-1f3fc-2640","👳🏼\200d♂️":"1f473-1f3fc-2642","👳🏽\200d♀️":"1f473-1f3fd-2640","👳🏽\200d♂️":"1f473-1f3fd-2642","👳🏾\200d♀️":"1f473-1f3fe-2640","👳🏾\200d♂️":"1f473-1f3fe-2642","👳🏿\200d♀️":"1f473-1f3ff-2640","👳🏿\200d♂️":"1f473-1f3ff-2642","👷🏻\200d♀️":"1f477-1f3fb-2640","👷🏻\200d♂️":"1f477-1f3fb-2642","👷🏼\200d♀️":"1f477-1f3fc-2640","👷🏼\200d♂️":"1f477-1f3fc-2642","👷🏽\200d♀️":"1f477-1f3fd-2640","👷🏽\200d♂️":"1f477-1f3fd-2642","👷🏾\200d♀️":"1f477-1f3fe-2640","👷🏾\200d♂️":"1f477-1f3fe-2642","👷🏿\200d♀️":"1f477-1f3ff-2640","👷🏿\200d♂️":"1f477-1f3ff-2642","💂🏻\200d♀️":"1f482-1f3fb-2640","💂🏻\200d♂️":"1f482-1f3fb-2642","💂🏼\200d♀️":"1f482-1f3fc-2640","💂🏼\200d♂️":"1f482-1f3fc-2642","💂🏽\200d♀️":"1f482-1f3fd-2640","💂🏽\200d♂️":"1f482-1f3fd-2642","💂🏾\200d♀️":"1f482-1f3fe-2640","💂🏾\200d♂️":"1f482-1f3fe-2642","💂🏿\200d♀️":"1f482-1f3ff-2640","💂🏿\200d♂️":"1f482-1f3ff-2642","🕵️🏻♀️":"1f575-1f3fb-2640","🕵️🏻♂️":"1f575-1f3fb-2642","🕵️🏼♀️":"1f575-1f3fc-2640","🕵️🏼♂️":"1f575-1f3fc-2642","🕵️🏽♀️":"1f575-1f3fd-2640","🕵️🏽♂️":"1f575-1f3fd-2642","🕵️🏾♀️":"1f575-1f3fe-2640","🕵️🏾♂️":"1f575-1f3fe-2642","🕵️🏿♀️":"1f575-1f3ff-2640","🕵️🏿♂️":"1f575-1f3ff-2642","🏃🏻\200d♀️":"1f3c3-1f3fb-2640","🏃🏻\200d♂️":"1f3c3-1f3fb-2642","🏃🏼\200d♀️":"1f3c3-1f3fc-2640","🏃🏼\200d♂️":"1f3c3-1f3fc-2642","🏃🏽\200d♀️":"1f3c3-1f3fd-2640","🏃🏽\200d♂️":"1f3c3-1f3fd-2642","🏃🏾\200d♀️":"1f3c3-1f3fe-2640","🏃🏾\200d♂️":"1f3c3-1f3fe-2642","🏃🏿\200d♀️":"1f3c3-1f3ff-2640","🏃🏿\200d♂️":"1f3c3-1f3ff-2642","🏄🏻\200d♀️":"1f3c4-1f3fb-2640","🏄🏻\200d♂️":"1f3c4-1f3fb-2642","🏄🏼\200d♀️":"1f3c4-1f3fc-2640","🏄🏼\200d♂️":"1f3c4-1f3fc-2642","🏄🏽\200d♀️":"1f3c4-1f3fd-2640","🏄🏽\200d♂️":"1f3c4-1f3fd-2642","🏄🏾\200d♀️":"1f3c4-1f3fe-2640","🏄🏾\200d♂️":"1f3c4-1f3fe-2642","🏄🏿\200d♀️":"1f3c4-1f3ff-2640","🏄🏿\200d♂️":"1f3c4-1f3ff-2642","🏊🏻\200d♀️":"1f3ca-1f3fb-2640","🏊🏻\200d♂️":"1f3ca-1f3fb-2642","🏊🏼\200d♀️":"1f3ca-1f3fc-2640","🏊🏼\200d♂️":"1f3ca-1f3fc-2642","🏊🏽\200d♀️":"1f3ca-1f3fd-2640","🏊🏽\200d♂️":"1f3ca-1f3fd-2642","🏊🏾\200d♀️":"1f3ca-1f3fe-2640","🏊🏾\200d♂️":"1f3ca-1f3fe-2642","🏊🏿\200d♀️":"1f3ca-1f3ff-2640","🏊🏿\200d♂️":"1f3ca-1f3ff-2642","🏋️🏻♀️":"1f3cb-1f3fb-2640","🏋️🏻♂️":"1f3cb-1f3fb-2642","🏋️🏼♀️":"1f3cb-1f3fc-2640","🏋️🏼♂️":"1f3cb-1f3fc-2642","🏋️🏽♀️":"1f3cb-1f3fd-2640","🏋️🏽♂️":"1f3cb-1f3fd-2642","🏋️🏾♀️":"1f3cb-1f3fe-2640","🏋️🏾♂️":"1f3cb-1f3fe-2642","🏋️🏿♀️":"1f3cb-1f3ff-2640","🏋️🏿♂️":"1f3cb-1f3ff-2642","🏌️🏻♀️":"1f3cc-1f3fb-2640","🏌️🏻♂️":"1f3cc-1f3fb-2642","🏌️🏼♀️":"1f3cc-1f3fc-2640","🏌️🏼♂️":"1f3cc-1f3fc-2642","🏌️🏽♀️":"1f3cc-1f3fd-2640","🏌️🏽♂️":"1f3cc-1f3fd-2642","🏌️🏾♀️":"1f3cc-1f3fe-2640","🏌️🏾♂️":"1f3cc-1f3fe-2642","🏌️🏿♀️":"1f3cc-1f3ff-2640","🏌️🏿♂️":"1f3cc-1f3ff-2642","💆🏻\200d♀️":"1f486-1f3fb-2640","💆🏻\200d♂️":"1f486-1f3fb-2642","💆🏼\200d♀️":"1f486-1f3fc-2640","💆🏼\200d♂️":"1f486-1f3fc-2642","💆🏽\200d♀️":"1f486-1f3fd-2640","💆🏽\200d♂️":"1f486-1f3fd-2642","💆🏾\200d♀️":"1f486-1f3fe-2640","💆🏾\200d♂️":"1f486-1f3fe-2642","💆🏿\200d♀️":"1f486-1f3ff-2640","💆🏿\200d♂️":"1f486-1f3ff-2642","💇🏻\200d♀️":"1f487-1f3fb-2640","💇🏻\200d♂️":"1f487-1f3fb-2642","💇🏼\200d♀️":"1f487-1f3fc-2640","💇🏼\200d♂️":"1f487-1f3fc-2642","💇🏽\200d♀️":"1f487-1f3fd-2640","💇🏽\200d♂️":"1f487-1f3fd-2642","💇🏾\200d♀️":"1f487-1f3fe-2640","💇🏾\200d♂️":"1f487-1f3fe-2642","💇🏿\200d♀️":"1f487-1f3ff-2640","💇🏿\200d♂️":"1f487-1f3ff-2642","🚣🏻\200d♀️":"1f6a3-1f3fb-2640","🚣🏻\200d♂️":"1f6a3-1f3fb-2642","🚣🏼\200d♀️":"1f6a3-1f3fc-2640","🚣🏼\200d♂️":"1f6a3-1f3fc-2642","🚣🏽\200d♀️":"1f6a3-1f3fd-2640","🚣🏽\200d♂️":"1f6a3-1f3fd-2642","🚣🏾\200d♀️":"1f6a3-1f3fe-2640","🚣🏾\200d♂️":"1f6a3-1f3fe-2642","🚣🏿\200d♀️":"1f6a3-1f3ff-2640","🚣🏿\200d♂️":"1f6a3-1f3ff-2642","🚴🏻\200d♀️":"1f6b4-1f3fb-2640","🚴🏻\200d♂️":"1f6b4-1f3fb-2642","🚴🏼\200d♀️":"1f6b4-1f3fc-2640","🚴🏼\200d♂️":"1f6b4-1f3fc-2642","🚴🏽\200d♀️":"1f6b4-1f3fd-2640","🚴🏽\200d♂️":"1f6b4-1f3fd-2642","🚴🏾\200d♀️":"1f6b4-1f3fe-2640","🚴🏾\200d♂️":"1f6b4-1f3fe-2642","🚴🏿\200d♀️":"1f6b4-1f3ff-2640","🚴🏿\200d♂️":"1f6b4-1f3ff-2642","🚵🏻\200d♀️":"1f6b5-1f3fb-2640","🚵🏻\200d♂️":"1f6b5-1f3fb-2642","🚵🏼\200d♀️":"1f6b5-1f3fc-2640","🚵🏼\200d♂️":"1f6b5-1f3fc-2642","🚵🏽\200d♀️":"1f6b5-1f3fd-2640","🚵🏽\200d♂️":"1f6b5-1f3fd-2642","🚵🏾\200d♀️":"1f6b5-1f3fe-2640","🚵🏾\200d♂️":"1f6b5-1f3fe-2642","🚵🏿\200d♀️":"1f6b5-1f3ff-2640","🚵🏿\200d♂️":"1f6b5-1f3ff-2642","🚶🏻\200d♀️":"1f6b6-1f3fb-2640","🚶🏻\200d♂️":"1f6b6-1f3fb-2642","🚶🏼\200d♀️":"1f6b6-1f3fc-2640","🚶🏼\200d♂️":"1f6b6-1f3fc-2642","🚶🏽\200d♀️":"1f6b6-1f3fd-2640","🚶🏽\200d♂️":"1f6b6-1f3fd-2642","🚶🏾\200d♀️":"1f6b6-1f3fe-2640","🚶🏾\200d♂️":"1f6b6-1f3fe-2642","🚶🏿\200d♀️":"1f6b6-1f3ff-2640","🚶🏿\200d♂️":"1f6b6-1f3ff-2642","🤸🏻\200d♀️":"1f938-1f3fb-2640","🤸🏻\200d♂️":"1f938-1f3fb-2642","🤸🏼\200d♀️":"1f938-1f3fc-2640","🤸🏼\200d♂️":"1f938-1f3fc-2642","🤸🏽\200d♀️":"1f938-1f3fd-2640","🤸🏽\200d♂️":"1f938-1f3fd-2642","🤸🏾\200d♀️":"1f938-1f3fe-2640","🤸🏾\200d♂️":"1f938-1f3fe-2642","🤸🏿\200d♀️":"1f938-1f3ff-2640","🤸🏿\200d♂️":"1f938-1f3ff-2642","🤹🏻\200d♀️":"1f939-1f3fb-2640","🤹🏻\200d♂️":"1f939-1f3fb-2642","🤹🏼\200d♀️":"1f939-1f3fc-2640","🤹🏼\200d♂️":"1f939-1f3fc-2642","🤹🏽\200d♀️":"1f939-1f3fd-2640","🤹🏽\200d♂️":"1f939-1f3fd-2642","🤹🏾\200d♀️":"1f939-1f3fe-2640","🤹🏾\200d♂️":"1f939-1f3fe-2642","🤹🏿\200d♀️":"1f939-1f3ff-2640","🤹🏿\200d♂️":"1f939-1f3ff-2642","🤽🏻\200d♀️":"1f93d-1f3fb-2640","🤽🏻\200d♂️":"1f93d-1f3fb-2642","🤽🏼\200d♀️":"1f93d-1f3fc-2640","🤽🏼\200d♂️":"1f93d-1f3fc-2642","🤽🏽\200d♀️":"1f93d-1f3fd-2640","🤽🏽\200d♂️":"1f93d-1f3fd-2642","🤽🏾\200d♀️":"1f93d-1f3fe-2640","🤽🏾\200d♂️":"1f93d-1f3fe-2642","🤽🏿\200d♀️":"1f93d-1f3ff-2640","🤽🏿\200d♂️":"1f93d-1f3ff-2642","🤾🏻\200d♀️":"1f93e-1f3fb-2640","🤾🏻\200d♂️":"1f93e-1f3fb-2642","🤾🏼\200d♀️":"1f93e-1f3fc-2640","🤾🏼\200d♂️":"1f93e-1f3fc-2642","🤾🏽\200d♀️":"1f93e-1f3fd-2640","🤾🏽\200d♂️":"1f93e-1f3fd-2642","🤾🏾\200d♀️":"1f93e-1f3fe-2640","🤾🏾\200d♂️":"1f93e-1f3fe-2642","🤾🏿\200d♀️":"1f93e-1f3ff-2640","🤾🏿\200d♂️":"1f93e-1f3ff-2642","💁🏻\200d♀️":"1f481-1f3fb-2640","💁🏻\200d♂️":"1f481-1f3fb-2642","💁🏼\200d♀️":"1f481-1f3fc-2640","💁🏼\200d♂️":"1f481-1f3fc-2642","💁🏽\200d♀️":"1f481-1f3fd-2640","💁🏽\200d♂️":"1f481-1f3fd-2642","💁🏾\200d♀️":"1f481-1f3fe-2640","💁🏾\200d♂️":"1f481-1f3fe-2642","💁🏿\200d♀️":"1f481-1f3ff-2640","💁🏿\200d♂️":"1f481-1f3ff-2642","🙅🏻\200d♀️":"1f645-1f3fb-2640","🙅🏻\200d♂️":"1f645-1f3fb-2642","🙅🏼\200d♀️":"1f645-1f3fc-2640","🙅🏼\200d♂️":"1f645-1f3fc-2642","🙅🏽\200d♀️":"1f645-1f3fd-2640","🙅🏽\200d♂️":"1f645-1f3fd-2642","🙅🏾\200d♀️":"1f645-1f3fe-2640","🙅🏾\200d♂️":"1f645-1f3fe-2642","🙅🏿\200d♀️":"1f645-1f3ff-2640","🙅🏿\200d♂️":"1f645-1f3ff-2642","🙆🏻\200d♀️":"1f646-1f3fb-2640","🙆🏻\200d♂️":"1f646-1f3fb-2642","🙆🏼\200d♀️":"1f646-1f3fc-2640","🙆🏼\200d♂️":"1f646-1f3fc-2642","🙆🏽\200d♀️":"1f646-1f3fd-2640","🙆🏽\200d♂️":"1f646-1f3fd-2642","🙆🏾\200d♀️":"1f646-1f3fe-2640","🙆🏾\200d♂️":"1f646-1f3fe-2642","🙆🏿\200d♀️":"1f646-1f3ff-2640","🙆🏿\200d♂️":"1f646-1f3ff-2642","🙇🏻\200d♀️":"1f647-1f3fb-2640","🙇🏻\200d♂️":"1f647-1f3fb-2642","🙇🏼\200d♀️":"1f647-1f3fc-2640","🙇🏼\200d♂️":"1f647-1f3fc-2642","🙇🏽\200d♀️":"1f647-1f3fd-2640","🙇🏽\200d♂️":"1f647-1f3fd-2642","🙇🏾\200d♀️":"1f647-1f3fe-2640","🙇🏾\200d♂️":"1f647-1f3fe-2642","🙇🏿\200d♀️":"1f647-1f3ff-2640","🙇🏿\200d♂️":"1f647-1f3ff-2642","🙋🏻\200d♀️":"1f64b-1f3fb-2640","🙋🏻\200d♂️":"1f64b-1f3fb-2642","🙋🏼\200d♀️":"1f64b-1f3fc-2640","🙋🏼\200d♂️":"1f64b-1f3fc-2642","🙋🏽\200d♀️":"1f64b-1f3fd-2640","🙋🏽\200d♂️":"1f64b-1f3fd-2642","🙋🏾\200d♀️":"1f64b-1f3fe-2640","🙋🏾\200d♂️":"1f64b-1f3fe-2642","🙋🏿\200d♀️":"1f64b-1f3ff-2640","🙋🏿\200d♂️":"1f64b-1f3ff-2642","🙍🏻\200d♀️":"1f64d-1f3fb-2640","🙍🏻\200d♂️":"1f64d-1f3fb-2642","🙍🏼\200d♀️":"1f64d-1f3fc-2640","🙍🏼\200d♂️":"1f64d-1f3fc-2642","🙍🏽\200d♀️":"1f64d-1f3fd-2640","🙍🏽\200d♂️":"1f64d-1f3fd-2642","🙍🏾\200d♀️":"1f64d-1f3fe-2640","🙍🏾\200d♂️":"1f64d-1f3fe-2642","🙍🏿\200d♀️":"1f64d-1f3ff-2640","🙍🏿\200d♂️":"1f64d-1f3ff-2642","🙎🏻\200d♀️":"1f64e-1f3fb-2640","🙎🏻\200d♂️":"1f64e-1f3fb-2642","🙎🏼\200d♀️":"1f64e-1f3fc-2640","🙎🏼\200d♂️":"1f64e-1f3fc-2642","🙎🏽\200d♀️":"1f64e-1f3fd-2640","🙎🏽\200d♂️":"1f64e-1f3fd-2642","🙎🏾\200d♀️":"1f64e-1f3fe-2640","🙎🏾\200d♂️":"1f64e-1f3fe-2642","🙎🏿\200d♀️":"1f64e-1f3ff-2640","🙎🏿\200d♂️":"1f64e-1f3ff-2642","🤦🏻\200d♀️":"1f926-1f3fb-2640","🤦🏻\200d♂️":"1f926-1f3fb-2642","🤦🏼\200d♀️":"1f926-1f3fc-2640","🤦🏼\200d♂️":"1f926-1f3fc-2642","🤦🏽\200d♀️":"1f926-1f3fd-2640","🤦🏽\200d♂️":"1f926-1f3fd-2642","🤦🏾\200d♀️":"1f926-1f3fe-2640","🤦🏾\200d♂️":"1f926-1f3fe-2642","🤦🏿\200d♀️":"1f926-1f3ff-2640","🤦🏿\200d♂️":"1f926-1f3ff-2642","🤷🏻\200d♀️":"1f937-1f3fb-2640","🤷🏻\200d♂️":"1f937-1f3fb-2642","🤷🏼\200d♀️":"1f937-1f3fc-2640","🤷🏼\200d♂️":"1f937-1f3fc-2642","🤷🏽\200d♀️":"1f937-1f3fd-2640","🤷🏽\200d♂️":"1f937-1f3fd-2642","🤷🏾\200d♀️":"1f937-1f3fe-2640","🤷🏾\200d♂️":"1f937-1f3fe-2642","🤷🏿\200d♀️":"1f937-1f3ff-2640","🤷🏿\200d♂️":"1f937-1f3ff-2642","👁️\200d🗨️":"1f441-1f5e8","🕵🏻\200d♀️":"1f575-1f3fb-2640","🕵🏻\200d♂️":"1f575-1f3fb-2642","🕵🏼\200d♀️":"1f575-1f3fc-2640","🕵🏼\200d♂️":"1f575-1f3fc-2642","🕵🏽\200d♀️":"1f575-1f3fd-2640","🕵🏽\200d♂️":"1f575-1f3fd-2642","🕵🏾\200d♀️":"1f575-1f3fe-2640","🕵🏾\200d♂️":"1f575-1f3fe-2642","🕵🏿\200d♀️":"1f575-1f3ff-2640","🕵🏿\200d♂️":"1f575-1f3ff-2642","🏋🏻\200d♀️":"1f3cb-1f3fb-2640","🏋🏻\200d♂️":"1f3cb-1f3fb-2642","🏋🏼\200d♀️":"1f3cb-1f3fc-2640","🏋🏼\200d♂️":"1f3cb-1f3fc-2642","🏋🏽\200d♀️":"1f3cb-1f3fd-2640","🏋🏽\200d♂️":"1f3cb-1f3fd-2642","🏋🏾\200d♀️":"1f3cb-1f3fe-2640","🏋🏾\200d♂️":"1f3cb-1f3fe-2642","🏋🏿\200d♀️":"1f3cb-1f3ff-2640","🏋🏿\200d♂️":"1f3cb-1f3ff-2642","🏌🏻\200d♀️":"1f3cc-1f3fb-2640","🏌🏻\200d♂️":"1f3cc-1f3fb-2642","🏌🏼\200d♀️":"1f3cc-1f3fc-2640","🏌🏼\200d♂️":"1f3cc-1f3fc-2642","🏌🏽\200d♀️":"1f3cc-1f3fd-2640","🏌🏽\200d♂️":"1f3cc-1f3fd-2642","🏌🏾\200d♀️":"1f3cc-1f3fe-2640","🏌🏾\200d♂️":"1f3cc-1f3fe-2642","🏌🏿\200d♀️":"1f3cc-1f3ff-2640","🏌🏿\200d♂️":"1f3cc-1f3ff-2642","🧙🏻\200d♀️":"1f9d9-1f3fb-2640","🧙🏻\200d♂️":"1f9d9-1f3fb-2642","🧙🏼\200d♀️":"1f9d9-1f3fc-2640","🧙🏼\200d♂️":"1f9d9-1f3fc-2642","🧙🏽\200d♀️":"1f9d9-1f3fd-2640","🧙🏽\200d♂️":"1f9d9-1f3fd-2642","🧙🏾\200d♀️":"1f9d9-1f3fe-2640","🧙🏾\200d♂️":"1f9d9-1f3fe-2642","🧙🏿\200d♀️":"1f9d9-1f3ff-2640","🧙🏿\200d♂️":"1f9d9-1f3ff-2642","🧚🏻\200d♀️":"1f9da-1f3fb-2640","🧚🏻\200d♂️":"1f9da-1f3fb-2642","🧚🏼\200d♀️":"1f9da-1f3fc-2640","🧚🏼\200d♂️":"1f9da-1f3fc-2642","🧚🏽\200d♀️":"1f9da-1f3fd-2640","🧚🏽\200d♂️":"1f9da-1f3fd-2642","🧚🏾\200d♀️":"1f9da-1f3fe-2640","🧚🏾\200d♂️":"1f9da-1f3fe-2642","🧚🏿\200d♀️":"1f9da-1f3ff-2640","🧚🏿\200d♂️":"1f9da-1f3ff-2642","🧛🏻\200d♀️":"1f9db-1f3fb-2640","🧛🏻\200d♂️":"1f9db-1f3fb-2642","🧛🏼\200d♀️":"1f9db-1f3fc-2640","🧛🏼\200d♂️":"1f9db-1f3fc-2642","🧛🏽\200d♀️":"1f9db-1f3fd-2640","🧛🏽\200d♂️":"1f9db-1f3fd-2642","🧛🏾\200d♀️":"1f9db-1f3fe-2640","🧛🏾\200d♂️":"1f9db-1f3fe-2642","🧛🏿\200d♀️":"1f9db-1f3ff-2640","🧛🏿\200d♂️":"1f9db-1f3ff-2642","🧜🏻\200d♀️":"1f9dc-1f3fb-2640","🧜🏻\200d♂️":"1f9dc-1f3fb-2642","🧜🏼\200d♀️":"1f9dc-1f3fc-2640","🧜🏼\200d♂️":"1f9dc-1f3fc-2642","🧜🏽\200d♀️":"1f9dc-1f3fd-2640","🧜🏽\200d♂️":"1f9dc-1f3fd-2642","🧜🏾\200d♀️":"1f9dc-1f3fe-2640","🧜🏾\200d♂️":"1f9dc-1f3fe-2642","🧜🏿\200d♀️":"1f9dc-1f3ff-2640","🧜🏿\200d♂️":"1f9dc-1f3ff-2642","🧝🏻\200d♀️":"1f9dd-1f3fb-2640","🧝🏻\200d♂️":"1f9dd-1f3fb-2642","🧝🏼\200d♀️":"1f9dd-1f3fc-2640","🧝🏼\200d♂️":"1f9dd-1f3fc-2642","🧝🏽\200d♀️":"1f9dd-1f3fd-2640","🧝🏽\200d♂️":"1f9dd-1f3fd-2642","🧝🏾\200d♀️":"1f9dd-1f3fe-2640","🧝🏾\200d♂️":"1f9dd-1f3fe-2642","🧝🏿\200d♀️":"1f9dd-1f3ff-2640","🧝🏿\200d♂️":"1f9dd-1f3ff-2642","🧖🏻\200d♀️":"1f9d6-1f3fb-2640","🧖🏻\200d♂️":"1f9d6-1f3fb-2642","🧖🏼\200d♀️":"1f9d6-1f3fc-2640","🧖🏼\200d♂️":"1f9d6-1f3fc-2642","🧖🏽\200d♀️":"1f9d6-1f3fd-2640","🧖🏽\200d♂️":"1f9d6-1f3fd-2642","🧖🏾\200d♀️":"1f9d6-1f3fe-2640","🧖🏾\200d♂️":"1f9d6-1f3fe-2642","🧖🏿\200d♀️":"1f9d6-1f3ff-2640","🧖🏿\200d♂️":"1f9d6-1f3ff-2642","🧗🏻\200d♀️":"1f9d7-1f3fb-2640","🧗🏻\200d♂️":"1f9d7-1f3fb-2642","🧗🏼\200d♀️":"1f9d7-1f3fc-2640","🧗🏼\200d♂️":"1f9d7-1f3fc-2642","🧗🏽\200d♀️":"1f9d7-1f3fd-2640","🧗🏽\200d♂️":"1f9d7-1f3fd-2642","🧗🏾\200d♀️":"1f9d7-1f3fe-2640","🧗🏾\200d♂️":"1f9d7-1f3fe-2642","🧗🏿\200d♀️":"1f9d7-1f3ff-2640","🧗🏿\200d♂️":"1f9d7-1f3ff-2642","🧘🏻\200d♀️":"1f9d8-1f3fb-2640","🧘🏻\200d♂️":"1f9d8-1f3fb-2642","🧘🏼\200d♀️":"1f9d8-1f3fc-2640","🧘🏼\200d♂️":"1f9d8-1f3fc-2642","🧘🏽\200d♀️":"1f9d8-1f3fd-2640","🧘🏽\200d♂️":"1f9d8-1f3fd-2642","🧘🏾\200d♀️":"1f9d8-1f3fe-2640","🧘🏾\200d♂️":"1f9d8-1f3fe-2642","🧘🏿\200d♀️":"1f9d8-1f3ff-2640","🧘🏿\200d♂️":"1f9d8-1f3ff-2642","🦸🏻\200d♀️":"1f9b8-1f3fb-2640","🦸🏻\200d♂️":"1f9b8-1f3fb-2642","🦸🏼\200d♀️":"1f9b8-1f3fc-2640","🦸🏼\200d♂️":"1f9b8-1f3fc-2642","🦸🏽\200d♀️":"1f9b8-1f3fd-2640","🦸🏽\200d♂️":"1f9b8-1f3fd-2642","🦸🏾\200d♀️":"1f9b8-1f3fe-2640","🦸🏾\200d♂️":"1f9b8-1f3fe-2642","🦸🏿\200d♀️":"1f9b8-1f3ff-2640","🦸🏿\200d♂️":"1f9b8-1f3ff-2642","🦹🏻\200d♀️":"1f9b9-1f3fb-2640","🦹🏻\200d♂️":"1f9b9-1f3fb-2642","🦹🏼\200d♀️":"1f9b9-1f3fc-2640","🦹🏼\200d♂️":"1f9b9-1f3fc-2642","🦹🏽\200d♀️":"1f9b9-1f3fd-2640","🦹🏽\200d♂️":"1f9b9-1f3fd-2642","🦹🏾\200d♀️":"1f9b9-1f3fe-2640","🦹🏾\200d♂️":"1f9b9-1f3fe-2642","🦹🏿\200d♀️":"1f9b9-1f3ff-2640","🦹🏿\200d♂️":"1f9b9-1f3ff-2642","🕵️\200d♀️":"1f575-2640","🕵️\200d♂️":"1f575-2642","⛹️🏻♀️":"26f9-1f3fb-2640","⛹️🏻♂️":"26f9-1f3fb-2642","⛹️🏼♀️":"26f9-1f3fc-2640","⛹️🏼♂️":"26f9-1f3fc-2642","⛹️🏽♀️":"26f9-1f3fd-2640","⛹️🏽♂️":"26f9-1f3fd-2642","⛹️🏾♀️":"26f9-1f3fe-2640","⛹️🏾♂️":"26f9-1f3fe-2642","⛹️🏿♀️":"26f9-1f3ff-2640","⛹️🏿♂️":"26f9-1f3ff-2642","🏋️\200d♀️":"1f3cb-2640","🏋️\200d♂️":"1f3cb-2642","🏌️\200d♀️":"1f3cc-2640","🏌️\200d♂️":"1f3cc-2642","⛹🏻\200d♀️":"26f9-1f3fb-2640","⛹🏻\200d♂️":"26f9-1f3fb-2642","⛹🏼\200d♀️":"26f9-1f3fc-2640","⛹🏼\200d♂️":"26f9-1f3fc-2642","⛹🏽\200d♀️":"26f9-1f3fd-2640","⛹🏽\200d♂️":"26f9-1f3fd-2642","⛹🏾\200d♀️":"26f9-1f3fe-2640","⛹🏾\200d♂️":"26f9-1f3fe-2642","⛹🏿\200d♀️":"26f9-1f3ff-2640","⛹🏿\200d♂️":"26f9-1f3ff-2642","⛹️\200d♀️":"26f9-2640","⛹️\200d♂️":"26f9-2642","👨👨👦👦":"1f468-1f468-1f466-1f466","👨👨👧👦":"1f468-1f468-1f467-1f466","👨👨👧👧":"1f468-1f468-1f467-1f467","👨👩👦👦":"1f468-1f469-1f466-1f466","👨👩👧👦":"1f468-1f469-1f467-1f466","👨👩👧👧":"1f468-1f469-1f467-1f467","👩👩👦👦":"1f469-1f469-1f466-1f466","👩👩👧👦":"1f469-1f469-1f467-1f466","👩👩👧👧":"1f469-1f469-1f467-1f467","👨🏿\200d💻":"1f468-1f3ff-1f4bb","👨🏾\200d💻":"1f468-1f3fe-1f4bb","👨🏽\200d💻":"1f468-1f3fd-1f4bb","👨🏼\200d💻":"1f468-1f3fc-1f4bb","👨🏻\200d💻":"1f468-1f3fb-1f4bb","👩🏿\200d💻":"1f469-1f3ff-1f4bb","👩🏾\200d💻":"1f469-1f3fe-1f4bb","👩🏽\200d💻":"1f469-1f3fd-1f4bb","👩🏼\200d💻":"1f469-1f3fc-1f4bb","👩🏻\200d💻":"1f469-1f3fb-1f4bb","👨🏿\200d🏫":"1f468-1f3ff-1f3eb","👨🏾\200d🏫":"1f468-1f3fe-1f3eb","👨🏽\200d🏫":"1f468-1f3fd-1f3eb","👨🏼\200d🏫":"1f468-1f3fc-1f3eb","👨🏻\200d🏫":"1f468-1f3fb-1f3eb","👩🏿\200d🏫":"1f469-1f3ff-1f3eb","👩🏾\200d🏫":"1f469-1f3fe-1f3eb","👩🏽\200d🏫":"1f469-1f3fd-1f3eb","👩🏼\200d🏫":"1f469-1f3fc-1f3eb","👩🏻\200d🏫":"1f469-1f3fb-1f3eb","👨🏿\200d🎓":"1f468-1f3ff-1f393","👨🏾\200d🎓":"1f468-1f3fe-1f393","👨🏽\200d🎓":"1f468-1f3fd-1f393","👨🏼\200d🎓":"1f468-1f3fc-1f393","👨🏻\200d🎓":"1f468-1f3fb-1f393","👩🏿\200d🎓":"1f469-1f3ff-1f393","👩🏾\200d🎓":"1f469-1f3fe-1f393","👩🏽\200d🎓":"1f469-1f3fd-1f393","👩🏼\200d🎓":"1f469-1f3fc-1f393","👩🏻\200d🎓":"1f469-1f3fb-1f393","👨🏿\200d🎤":"1f468-1f3ff-1f3a4","👨🏾\200d🎤":"1f468-1f3fe-1f3a4","👨🏽\200d🎤":"1f468-1f3fd-1f3a4","👨🏼\200d🎤":"1f468-1f3fc-1f3a4","👨🏻\200d🎤":"1f468-1f3fb-1f3a4","👩🏿\200d🎤":"1f469-1f3ff-1f3a4","👩🏾\200d🎤":"1f469-1f3fe-1f3a4","👩🏽\200d🎤":"1f469-1f3fd-1f3a4","👩🏼\200d🎤":"1f469-1f3fc-1f3a4","👩🏻\200d🎤":"1f469-1f3fb-1f3a4","👨🏿\200d🔬":"1f468-1f3ff-1f52c","👨🏾\200d🔬":"1f468-1f3fe-1f52c","👨🏽\200d🔬":"1f468-1f3fd-1f52c","👨🏼\200d🔬":"1f468-1f3fc-1f52c","👨🏻\200d🔬":"1f468-1f3fb-1f52c","👩🏿\200d🔬":"1f469-1f3ff-1f52c","👩🏾\200d🔬":"1f469-1f3fe-1f52c","👩🏽\200d🔬":"1f469-1f3fd-1f52c","👩🏼\200d🔬":"1f469-1f3fc-1f52c","👩🏻\200d🔬":"1f469-1f3fb-1f52c","👨🏿\200d💼":"1f468-1f3ff-1f4bc","👨🏾\200d💼":"1f468-1f3fe-1f4bc","👨🏽\200d💼":"1f468-1f3fd-1f4bc","👨🏼\200d💼":"1f468-1f3fc-1f4bc","👨🏻\200d💼":"1f468-1f3fb-1f4bc","👩🏿\200d💼":"1f469-1f3ff-1f4bc","👩🏾\200d💼":"1f469-1f3fe-1f4bc","👩🏽\200d💼":"1f469-1f3fd-1f4bc","👩🏼\200d💼":"1f469-1f3fc-1f4bc","👩🏻\200d💼":"1f469-1f3fb-1f4bc","👨🏿\200d🔧":"1f468-1f3ff-1f527","👨🏾\200d🔧":"1f468-1f3fe-1f527","👨🏽\200d🔧":"1f468-1f3fd-1f527","👨🏼\200d🔧":"1f468-1f3fc-1f527","👨🏻\200d🔧":"1f468-1f3fb-1f527","👩🏿\200d🔧":"1f469-1f3ff-1f527","👩🏾\200d🔧":"1f469-1f3fe-1f527","👩🏽\200d🔧":"1f469-1f3fd-1f527","👩🏼\200d🔧":"1f469-1f3fc-1f527","👩🏻\200d🔧":"1f469-1f3fb-1f527","👨🏿\200d🏭":"1f468-1f3ff-1f3ed","👨🏾\200d🏭":"1f468-1f3fe-1f3ed","👨🏽\200d🏭":"1f468-1f3fd-1f3ed","👨🏼\200d🏭":"1f468-1f3fc-1f3ed","👨🏻\200d🏭":"1f468-1f3fb-1f3ed","👩🏿\200d🏭":"1f469-1f3ff-1f3ed","👩🏾\200d🏭":"1f469-1f3fe-1f3ed","👩🏽\200d🏭":"1f469-1f3fd-1f3ed","👩🏼\200d🏭":"1f469-1f3fc-1f3ed","👩🏻\200d🏭":"1f469-1f3fb-1f3ed","👨🏿\200d🍳":"1f468-1f3ff-1f373","👨🏾\200d🍳":"1f468-1f3fe-1f373","👨🏽\200d🍳":"1f468-1f3fd-1f373","👨🏼\200d🍳":"1f468-1f3fc-1f373","👨🏻\200d🍳":"1f468-1f3fb-1f373","👩🏿\200d🍳":"1f469-1f3ff-1f373","👩🏾\200d🍳":"1f469-1f3fe-1f373","👩🏽\200d🍳":"1f469-1f3fd-1f373","👩🏼\200d🍳":"1f469-1f3fc-1f373","👩🏻\200d🍳":"1f469-1f3fb-1f373","👨🏿\200d🌾":"1f468-1f3ff-1f33e","👨🏾\200d🌾":"1f468-1f3fe-1f33e","👨🏽\200d🌾":"1f468-1f3fd-1f33e","👨🏼\200d🌾":"1f468-1f3fc-1f33e","👨🏻\200d🌾":"1f468-1f3fb-1f33e","👩🏿\200d🌾":"1f469-1f3ff-1f33e","👩🏾\200d🌾":"1f469-1f3fe-1f33e","👩🏽\200d🌾":"1f469-1f3fd-1f33e","👩🏼\200d🌾":"1f469-1f3fc-1f33e","👩🏻\200d🌾":"1f469-1f3fb-1f33e","👨🏻\200d🎨":"1f468-1f3fb-1f3a8","👨🏼\200d🎨":"1f468-1f3fc-1f3a8","👨🏽\200d🎨":"1f468-1f3fd-1f3a8","👨🏾\200d🎨":"1f468-1f3fe-1f3a8","👨🏿\200d🎨":"1f468-1f3ff-1f3a8","👩🏻\200d🎨":"1f469-1f3fb-1f3a8","👩🏼\200d🎨":"1f469-1f3fc-1f3a8","👩🏽\200d🎨":"1f469-1f3fd-1f3a8","👩🏾\200d🎨":"1f469-1f3fe-1f3a8","👩🏿\200d🎨":"1f469-1f3ff-1f3a8","👨🏻\200d🚀":"1f468-1f3fb-1f680","👨🏼\200d🚀":"1f468-1f3fc-1f680","👨🏽\200d🚀":"1f468-1f3fd-1f680","👨🏾\200d🚀":"1f468-1f3fe-1f680","👨🏿\200d🚀":"1f468-1f3ff-1f680","👩🏻\200d🚀":"1f469-1f3fb-1f680","👩🏼\200d🚀":"1f469-1f3fc-1f680","👩🏽\200d🚀":"1f469-1f3fd-1f680","👩🏾\200d🚀":"1f469-1f3fe-1f680","👩🏿\200d🚀":"1f469-1f3ff-1f680","👨🏻\200d🚒":"1f468-1f3fb-1f692","👨🏼\200d🚒":"1f468-1f3fc-1f692","👨🏽\200d🚒":"1f468-1f3fd-1f692","👨🏾\200d🚒":"1f468-1f3fe-1f692","👨🏿\200d🚒":"1f468-1f3ff-1f692","👩🏻\200d🚒":"1f469-1f3fb-1f692","👩🏼\200d🚒":"1f469-1f3fc-1f692","👩🏽\200d🚒":"1f469-1f3fd-1f692","👩🏾\200d🚒":"1f469-1f3fe-1f692","👩🏿\200d🚒":"1f469-1f3ff-1f692","👨🏻\200d🦰":"1f468-1f3fb-1f9b0","👨🏻\200d🦱":"1f468-1f3fb-1f9b1","👨🏻\200d🦲":"1f468-1f3fb-1f9b2","👨🏻\200d🦳":"1f468-1f3fb-1f9b3","👨🏼\200d🦰":"1f468-1f3fc-1f9b0","👨🏼\200d🦱":"1f468-1f3fc-1f9b1","👨🏼\200d🦲":"1f468-1f3fc-1f9b2","👨🏼\200d🦳":"1f468-1f3fc-1f9b3","👨🏽\200d🦰":"1f468-1f3fd-1f9b0","👨🏽\200d🦱":"1f468-1f3fd-1f9b1","👨🏽\200d🦲":"1f468-1f3fd-1f9b2","👨🏽\200d🦳":"1f468-1f3fd-1f9b3","👨🏾\200d🦰":"1f468-1f3fe-1f9b0","👨🏾\200d🦱":"1f468-1f3fe-1f9b1","👨🏾\200d🦲":"1f468-1f3fe-1f9b2","👨🏾\200d🦳":"1f468-1f3fe-1f9b3","👨🏿\200d🦰":"1f468-1f3ff-1f9b0","👨🏿\200d🦱":"1f468-1f3ff-1f9b1","👨🏿\200d🦲":"1f468-1f3ff-1f9b2","👨🏿\200d🦳":"1f468-1f3ff-1f9b3","👩🏻\200d🦰":"1f469-1f3fb-1f9b0","👩🏻\200d🦱":"1f469-1f3fb-1f9b1","👩🏻\200d🦲":"1f469-1f3fb-1f9b2","👩🏻\200d🦳":"1f469-1f3fb-1f9b3","👩🏼\200d🦰":"1f469-1f3fc-1f9b0","👩🏼\200d🦱":"1f469-1f3fc-1f9b1","👩🏼\200d🦲":"1f469-1f3fc-1f9b2","👩🏼\200d🦳":"1f469-1f3fc-1f9b3","👩🏽\200d🦰":"1f469-1f3fd-1f9b0","👩🏽\200d🦱":"1f469-1f3fd-1f9b1","👩🏽\200d🦲":"1f469-1f3fd-1f9b2","👩🏽\200d🦳":"1f469-1f3fd-1f9b3","👩🏾\200d🦰":"1f469-1f3fe-1f9b0","👩🏾\200d🦱":"1f469-1f3fe-1f9b1","👩🏾\200d🦲":"1f469-1f3fe-1f9b2","👩🏾\200d🦳":"1f469-1f3fe-1f9b3","👩🏿\200d🦰":"1f469-1f3ff-1f9b0","👩🏿\200d🦱":"1f469-1f3ff-1f9b1","👩🏿\200d🦲":"1f469-1f3ff-1f9b2","👩🏿\200d🦳":"1f469-1f3ff-1f9b3","🏳️\200d🌈":"1f3f3-1f308","🏌🏻\200d♂":"1f3cc-1f3fb-2642","🏌🏼\200d♂":"1f3cc-1f3fc-2642","🏌🏽\200d♂":"1f3cc-1f3fd-2642","🏌🏾\200d♂":"1f3cc-1f3fe-2642","🏌🏿\200d♂":"1f3cc-1f3ff-2642","🏌🏻\200d♀":"1f3cc-1f3fb-2640","🏌🏼\200d♀":"1f3cc-1f3fc-2640","🏌🏽\200d♀":"1f3cc-1f3fd-2640","🏌🏾\200d♀":"1f3cc-1f3fe-2640","🏌🏿\200d♀":"1f3cc-1f3ff-2640","🤹🏿\200d♂":"1f939-1f3ff-2642","🤹🏾\200d♂":"1f939-1f3fe-2642","🤹🏽\200d♂":"1f939-1f3fd-2642","🤹🏼\200d♂":"1f939-1f3fc-2642","🤹🏻\200d♂":"1f939-1f3fb-2642","🤹🏿\200d♀":"1f939-1f3ff-2640","🤹🏾\200d♀":"1f939-1f3fe-2640","🤹🏽\200d♀":"1f939-1f3fd-2640","🤹🏼\200d♀":"1f939-1f3fc-2640","🤹🏻\200d♀":"1f939-1f3fb-2640","🤾🏿\200d♂":"1f93e-1f3ff-2642","🤾🏾\200d♂":"1f93e-1f3fe-2642","🤾🏽\200d♂":"1f93e-1f3fd-2642","🤾🏼\200d♂":"1f93e-1f3fc-2642","🤾🏻\200d♂":"1f93e-1f3fb-2642","🤾🏿\200d♀":"1f93e-1f3ff-2640","🤾🏾\200d♀":"1f93e-1f3fe-2640","🤾🏽\200d♀":"1f93e-1f3fd-2640","🤾🏼\200d♀":"1f93e-1f3fc-2640","🤾🏻\200d♀":"1f93e-1f3fb-2640","🤽🏿\200d♂":"1f93d-1f3ff-2642","🤽🏾\200d♂":"1f93d-1f3fe-2642","🤽🏽\200d♂":"1f93d-1f3fd-2642","🤽🏼\200d♂":"1f93d-1f3fc-2642","🤽🏻\200d♂":"1f93d-1f3fb-2642","🤽🏿\200d♀":"1f93d-1f3ff-2640","🤽🏾\200d♀":"1f93d-1f3fe-2640","🤽🏽\200d♀":"1f93d-1f3fd-2640","🤽🏼\200d♀":"1f93d-1f3fc-2640","🤽🏻\200d♀":"1f93d-1f3fb-2640","🤸🏿\200d♂":"1f938-1f3ff-2642","🤸🏾\200d♂":"1f938-1f3fe-2642","🤸🏽\200d♂":"1f938-1f3fd-2642","🤸🏼\200d♂":"1f938-1f3fc-2642","🤸🏻\200d♂":"1f938-1f3fb-2642","🤸🏿\200d♀":"1f938-1f3ff-2640","🤸🏾\200d♀":"1f938-1f3fe-2640","🤸🏽\200d♀":"1f938-1f3fd-2640","🤸🏼\200d♀":"1f938-1f3fc-2640","🤸🏻\200d♀":"1f938-1f3fb-2640","🚶🏿\200d♂":"1f6b6-1f3ff-2642","🚶🏾\200d♂":"1f6b6-1f3fe-2642","🚶🏽\200d♂":"1f6b6-1f3fd-2642","🚶🏼\200d♂":"1f6b6-1f3fc-2642","🚶🏻\200d♂":"1f6b6-1f3fb-2642","🚶🏿\200d♀":"1f6b6-1f3ff-2640","🚶🏾\200d♀":"1f6b6-1f3fe-2640","🚶🏽\200d♀":"1f6b6-1f3fd-2640","🚶🏼\200d♀":"1f6b6-1f3fc-2640","🚶🏻\200d♀":"1f6b6-1f3fb-2640","🚵🏿\200d♂":"1f6b5-1f3ff-2642","🚵🏾\200d♂":"1f6b5-1f3fe-2642","🚵🏽\200d♂":"1f6b5-1f3fd-2642","🚵🏼\200d♂":"1f6b5-1f3fc-2642","🚵🏻\200d♂":"1f6b5-1f3fb-2642","🚵🏿\200d♀":"1f6b5-1f3ff-2640","🚵🏾\200d♀":"1f6b5-1f3fe-2640","🚵🏽\200d♀":"1f6b5-1f3fd-2640","🚵🏼\200d♀":"1f6b5-1f3fc-2640","🚵🏻\200d♀":"1f6b5-1f3fb-2640","🚴🏿\200d♂":"1f6b4-1f3ff-2642","🚴🏾\200d♂":"1f6b4-1f3fe-2642","🚴🏽\200d♂":"1f6b4-1f3fd-2642","🚴🏼\200d♂":"1f6b4-1f3fc-2642","🚴🏻\200d♂":"1f6b4-1f3fb-2642","🚴🏿\200d♀":"1f6b4-1f3ff-2640","🚴🏾\200d♀":"1f6b4-1f3fe-2640","🚴🏽\200d♀":"1f6b4-1f3fd-2640","🚴🏼\200d♀":"1f6b4-1f3fc-2640","🚴🏻\200d♀":"1f6b4-1f3fb-2640","🚣🏿\200d♂":"1f6a3-1f3ff-2642","🚣🏾\200d♂":"1f6a3-1f3fe-2642","🚣🏽\200d♂":"1f6a3-1f3fd-2642","🚣🏼\200d♂":"1f6a3-1f3fc-2642","🚣🏻\200d♂":"1f6a3-1f3fb-2642","🚣🏿\200d♀":"1f6a3-1f3ff-2640","🚣🏾\200d♀":"1f6a3-1f3fe-2640","🚣🏽\200d♀":"1f6a3-1f3fd-2640","🚣🏼\200d♀":"1f6a3-1f3fc-2640","🚣🏻\200d♀":"1f6a3-1f3fb-2640","🏋🏿\200d♂":"1f3cb-1f3ff-2642","🏋🏾\200d♂":"1f3cb-1f3fe-2642","🏋🏽\200d♂":"1f3cb-1f3fd-2642","🏋🏼\200d♂":"1f3cb-1f3fc-2642","🏋🏻\200d♂":"1f3cb-1f3fb-2642","🏋🏿\200d♀":"1f3cb-1f3ff-2640","🏋🏾\200d♀":"1f3cb-1f3fe-2640","🏋🏽\200d♀":"1f3cb-1f3fd-2640","🏋🏼\200d♀":"1f3cb-1f3fc-2640","🏋🏻\200d♀":"1f3cb-1f3fb-2640","🏊🏿\200d♂":"1f3ca-1f3ff-2642","🏊🏾\200d♂":"1f3ca-1f3fe-2642","🏊🏽\200d♂":"1f3ca-1f3fd-2642","🏊🏼\200d♂":"1f3ca-1f3fc-2642","🏊🏻\200d♂":"1f3ca-1f3fb-2642","🏊🏿\200d♀":"1f3ca-1f3ff-2640","🏊🏾\200d♀":"1f3ca-1f3fe-2640","🏊🏽\200d♀":"1f3ca-1f3fd-2640","🏊🏼\200d♀":"1f3ca-1f3fc-2640","🏊🏻\200d♀":"1f3ca-1f3fb-2640","🏄🏿\200d♂":"1f3c4-1f3ff-2642","🏄🏾\200d♂":"1f3c4-1f3fe-2642","🏄🏽\200d♂":"1f3c4-1f3fd-2642","🏄🏼\200d♂":"1f3c4-1f3fc-2642","🏄🏻\200d♂":"1f3c4-1f3fb-2642","🏄🏿\200d♀":"1f3c4-1f3ff-2640","🏄🏾\200d♀":"1f3c4-1f3fe-2640","🏄🏽\200d♀":"1f3c4-1f3fd-2640","🏄🏼\200d♀":"1f3c4-1f3fc-2640","🏄🏻\200d♀":"1f3c4-1f3fb-2640","🏃🏿\200d♂":"1f3c3-1f3ff-2642","🏃🏾\200d♂":"1f3c3-1f3fe-2642","🏃🏽\200d♂":"1f3c3-1f3fd-2642","🏃🏼\200d♂":"1f3c3-1f3fc-2642","🏃🏻\200d♂":"1f3c3-1f3fb-2642","🏃🏿\200d♀":"1f3c3-1f3ff-2640","🏃🏾\200d♀":"1f3c3-1f3fe-2640","🏃🏽\200d♀":"1f3c3-1f3fd-2640","🏃🏼\200d♀":"1f3c3-1f3fc-2640","🏃🏻\200d♀":"1f3c3-1f3fb-2640","🤷🏿\200d♂":"1f937-1f3ff-2642","🤷🏾\200d♂":"1f937-1f3fe-2642","🤷🏽\200d♂":"1f937-1f3fd-2642","🤷🏼\200d♂":"1f937-1f3fc-2642","🤷🏻\200d♂":"1f937-1f3fb-2642","🤷🏿\200d♀":"1f937-1f3ff-2640","🤷🏾\200d♀":"1f937-1f3fe-2640","🤷🏽\200d♀":"1f937-1f3fd-2640","🤷🏼\200d♀":"1f937-1f3fc-2640","🤷🏻\200d♀":"1f937-1f3fb-2640","🤦🏿\200d♂":"1f926-1f3ff-2642","🤦🏾\200d♂":"1f926-1f3fe-2642","🤦🏽\200d♂":"1f926-1f3fd-2642","🤦🏼\200d♂":"1f926-1f3fc-2642","🤦🏻\200d♂":"1f926-1f3fb-2642","🤦🏿\200d♀":"1f926-1f3ff-2640","🤦🏾\200d♀":"1f926-1f3fe-2640","🤦🏽\200d♀":"1f926-1f3fd-2640","🤦🏼\200d♀":"1f926-1f3fc-2640","🤦🏻\200d♀":"1f926-1f3fb-2640","🙎🏿\200d♂":"1f64e-1f3ff-2642","🙎🏾\200d♂":"1f64e-1f3fe-2642","🙎🏽\200d♂":"1f64e-1f3fd-2642","🙎🏼\200d♂":"1f64e-1f3fc-2642","🙎🏻\200d♂":"1f64e-1f3fb-2642","🙎🏿\200d♀":"1f64e-1f3ff-2640","🙎🏾\200d♀":"1f64e-1f3fe-2640","🙎🏽\200d♀":"1f64e-1f3fd-2640","🙎🏼\200d♀":"1f64e-1f3fc-2640","🙎🏻\200d♀":"1f64e-1f3fb-2640","🙍🏿\200d♂":"1f64d-1f3ff-2642","🙍🏾\200d♂":"1f64d-1f3fe-2642","🙍🏽\200d♂":"1f64d-1f3fd-2642","🙍🏼\200d♂":"1f64d-1f3fc-2642","🙍🏻\200d♂":"1f64d-1f3fb-2642","🙍🏿\200d♀":"1f64d-1f3ff-2640","🙍🏾\200d♀":"1f64d-1f3fe-2640","🙍🏽\200d♀":"1f64d-1f3fd-2640","🙍🏼\200d♀":"1f64d-1f3fc-2640","🙍🏻\200d♀":"1f64d-1f3fb-2640","🙋🏿\200d♂":"1f64b-1f3ff-2642","🙋🏾\200d♂":"1f64b-1f3fe-2642","🙋🏽\200d♂":"1f64b-1f3fd-2642","🙋🏼\200d♂":"1f64b-1f3fc-2642","🙋🏻\200d♂":"1f64b-1f3fb-2642","🙋🏿\200d♀":"1f64b-1f3ff-2640","🙋🏾\200d♀":"1f64b-1f3fe-2640","🙋🏽\200d♀":"1f64b-1f3fd-2640","🙋🏼\200d♀":"1f64b-1f3fc-2640","🙋🏻\200d♀":"1f64b-1f3fb-2640","🙇🏿\200d♂":"1f647-1f3ff-2642","🙇🏾\200d♂":"1f647-1f3fe-2642","🙇🏽\200d♂":"1f647-1f3fd-2642","🙇🏼\200d♂":"1f647-1f3fc-2642","🙇🏻\200d♂":"1f647-1f3fb-2642","🙇🏿\200d♀":"1f647-1f3ff-2640","🙇🏾\200d♀":"1f647-1f3fe-2640","🙇🏽\200d♀":"1f647-1f3fd-2640","🙇🏼\200d♀":"1f647-1f3fc-2640","🙇🏻\200d♀":"1f647-1f3fb-2640","🙆🏿\200d♂":"1f646-1f3ff-2642","🙆🏾\200d♂":"1f646-1f3fe-2642","🙆🏽\200d♂":"1f646-1f3fd-2642","🙆🏼\200d♂":"1f646-1f3fc-2642","🙆🏻\200d♂":"1f646-1f3fb-2642","🙆🏿\200d♀":"1f646-1f3ff-2640","🙆🏾\200d♀":"1f646-1f3fe-2640","🙆🏽\200d♀":"1f646-1f3fd-2640","🙆🏼\200d♀":"1f646-1f3fc-2640","🙆🏻\200d♀":"1f646-1f3fb-2640","🙅🏿\200d♂":"1f645-1f3ff-2642","🙅🏾\200d♂":"1f645-1f3fe-2642","🙅🏽\200d♂":"1f645-1f3fd-2642","🙅🏼\200d♂":"1f645-1f3fc-2642","🙅🏻\200d♂":"1f645-1f3fb-2642","🙅🏿\200d♀":"1f645-1f3ff-2640","🙅🏾\200d♀":"1f645-1f3fe-2640","🙅🏽\200d♀":"1f645-1f3fd-2640","🙅🏼\200d♀":"1f645-1f3fc-2640","🙅🏻\200d♀":"1f645-1f3fb-2640","💇🏿\200d♂":"1f487-1f3ff-2642","💇🏾\200d♂":"1f487-1f3fe-2642","💇🏽\200d♂":"1f487-1f3fd-2642","💇🏼\200d♂":"1f487-1f3fc-2642","💇🏻\200d♂":"1f487-1f3fb-2642","💇🏿\200d♀":"1f487-1f3ff-2640","💇🏾\200d♀":"1f487-1f3fe-2640","💇🏽\200d♀":"1f487-1f3fd-2640","💇🏼\200d♀":"1f487-1f3fc-2640","💇🏻\200d♀":"1f487-1f3fb-2640","💆🏿\200d♂":"1f486-1f3ff-2642","💆🏾\200d♂":"1f486-1f3fe-2642","💆🏽\200d♂":"1f486-1f3fd-2642","💆🏼\200d♂":"1f486-1f3fc-2642","💆🏻\200d♂":"1f486-1f3fb-2642","💆🏿\200d♀":"1f486-1f3ff-2640","💆🏾\200d♀":"1f486-1f3fe-2640","💆🏽\200d♀":"1f486-1f3fd-2640","💆🏼\200d♀":"1f486-1f3fc-2640","💆🏻\200d♀":"1f486-1f3fb-2640","💁🏿\200d♂":"1f481-1f3ff-2642","💁🏾\200d♂":"1f481-1f3fe-2642","💁🏽\200d♂":"1f481-1f3fd-2642","💁🏼\200d♂":"1f481-1f3fc-2642","💁🏻\200d♂":"1f481-1f3fb-2642","💁🏿\200d♀":"1f481-1f3ff-2640","💁🏾\200d♀":"1f481-1f3fe-2640","💁🏽\200d♀":"1f481-1f3fd-2640","💁🏼\200d♀":"1f481-1f3fc-2640","💁🏻\200d♀":"1f481-1f3fb-2640","👱🏿\200d♂":"1f471-1f3ff-2642","👱🏾\200d♂":"1f471-1f3fe-2642","👱🏽\200d♂":"1f471-1f3fd-2642","👱🏼\200d♂":"1f471-1f3fc-2642","👱🏻\200d♂":"1f471-1f3fb-2642","👱🏿\200d♀":"1f471-1f3ff-2640","👱🏾\200d♀":"1f471-1f3fe-2640","👱🏽\200d♀":"1f471-1f3fd-2640","👱🏼\200d♀":"1f471-1f3fc-2640","👱🏻\200d♀":"1f471-1f3fb-2640","👳🏿\200d♂":"1f473-1f3ff-2642","👳🏾\200d♂":"1f473-1f3fe-2642","👳🏽\200d♂":"1f473-1f3fd-2642","👳🏼\200d♂":"1f473-1f3fc-2642","👳🏻\200d♂":"1f473-1f3fb-2642","👳🏿\200d♀":"1f473-1f3ff-2640","👳🏾\200d♀":"1f473-1f3fe-2640","👳🏽\200d♀":"1f473-1f3fd-2640","👳🏼\200d♀":"1f473-1f3fc-2640","👳🏻\200d♀":"1f473-1f3fb-2640","💂🏿\200d♂":"1f482-1f3ff-2642","💂🏾\200d♂":"1f482-1f3fe-2642","💂🏽\200d♂":"1f482-1f3fd-2642","💂🏼\200d♂":"1f482-1f3fc-2642","💂🏻\200d♂":"1f482-1f3fb-2642","💂🏿\200d♀":"1f482-1f3ff-2640","💂🏾\200d♀":"1f482-1f3fe-2640","💂🏽\200d♀":"1f482-1f3fd-2640","💂🏼\200d♀":"1f482-1f3fc-2640","💂🏻\200d♀":"1f482-1f3fb-2640","🕵🏿\200d♂":"1f575-1f3ff-2642","🕵🏾\200d♂":"1f575-1f3fe-2642","🕵🏽\200d♂":"1f575-1f3fd-2642","🕵🏼\200d♂":"1f575-1f3fc-2642","🕵🏻\200d♂":"1f575-1f3fb-2642","🕵🏿\200d♀":"1f575-1f3ff-2640","🕵🏾\200d♀":"1f575-1f3fe-2640","🕵🏽\200d♀":"1f575-1f3fd-2640","🕵🏼\200d♀":"1f575-1f3fc-2640","🕵🏻\200d♀":"1f575-1f3fb-2640","👷🏿\200d♂":"1f477-1f3ff-2642","👷🏾\200d♂":"1f477-1f3fe-2642","👷🏽\200d♂":"1f477-1f3fd-2642","👷🏼\200d♂":"1f477-1f3fc-2642","👷🏻\200d♂":"1f477-1f3fb-2642","👷🏿\200d♀":"1f477-1f3ff-2640","👷🏾\200d♀":"1f477-1f3fe-2640","👷🏽\200d♀":"1f477-1f3fd-2640","👷🏼\200d♀":"1f477-1f3fc-2640","👷🏻\200d♀":"1f477-1f3fb-2640","👮🏿\200d♂":"1f46e-1f3ff-2642","👮🏾\200d♂":"1f46e-1f3fe-2642","👮🏽\200d♂":"1f46e-1f3fd-2642","👮🏼\200d♂":"1f46e-1f3fc-2642","👮🏻\200d♂":"1f46e-1f3fb-2642","👮🏿\200d♀":"1f46e-1f3ff-2640","👮🏾\200d♀":"1f46e-1f3fe-2640","👮🏽\200d♀":"1f46e-1f3fd-2640","👮🏼\200d♀":"1f46e-1f3fc-2640","👮🏻\200d♀":"1f46e-1f3fb-2640","👨🏿\200d⚕":"1f468-1f3ff-2695","👨🏾\200d⚕":"1f468-1f3fe-2695","👨🏽\200d⚕":"1f468-1f3fd-2695","👨🏼\200d⚕":"1f468-1f3fc-2695","👨🏻\200d⚕":"1f468-1f3fb-2695","👩🏿\200d⚕":"1f469-1f3ff-2695","👩🏾\200d⚕":"1f469-1f3fe-2695","👩🏽\200d⚕":"1f469-1f3fd-2695","👩🏼\200d⚕":"1f469-1f3fc-2695","👩🏻\200d⚕":"1f469-1f3fb-2695","👨🏻\200d⚖":"1f468-1f3fb-2696","👨🏼\200d⚖":"1f468-1f3fc-2696","👨🏽\200d⚖":"1f468-1f3fd-2696","👨🏾\200d⚖":"1f468-1f3fe-2696","👨🏿\200d⚖":"1f468-1f3ff-2696","👩🏻\200d⚖":"1f469-1f3fb-2696","👩🏼\200d⚖":"1f469-1f3fc-2696","👩🏽\200d⚖":"1f469-1f3fd-2696","👩🏾\200d⚖":"1f469-1f3fe-2696","👩🏿\200d⚖":"1f469-1f3ff-2696","👨🏻\200d✈":"1f468-1f3fb-2708","👨🏼\200d✈":"1f468-1f3fc-2708","👨🏽\200d✈":"1f468-1f3fd-2708","👨🏾\200d✈":"1f468-1f3fe-2708","👨🏿\200d✈":"1f468-1f3ff-2708","👩🏻\200d✈":"1f469-1f3fb-2708","👩🏼\200d✈":"1f469-1f3fc-2708","👩🏽\200d✈":"1f469-1f3fd-2708","👩🏾\200d✈":"1f469-1f3fe-2708","👩🏿\200d✈":"1f469-1f3ff-2708","👨❤️👨":"1f468-2764-1f468","👩❤️👨":"1f469-2764-1f468","👩❤️👩":"1f469-2764-1f469","👨🏻⚕️":"1f468-1f3fb-2695","👨🏻⚖️":"1f468-1f3fb-2696","👨🏻✈️":"1f468-1f3fb-2708","👨🏼⚕️":"1f468-1f3fc-2695","👨🏼⚖️":"1f468-1f3fc-2696","👨🏼✈️":"1f468-1f3fc-2708","👨🏽⚕️":"1f468-1f3fd-2695","👨🏽⚖️":"1f468-1f3fd-2696","👨🏽✈️":"1f468-1f3fd-2708","👨🏾⚕️":"1f468-1f3fe-2695","👨🏾⚖️":"1f468-1f3fe-2696","👨🏾✈️":"1f468-1f3fe-2708","👨🏿⚕️":"1f468-1f3ff-2695","👨🏿⚖️":"1f468-1f3ff-2696","👨🏿✈️":"1f468-1f3ff-2708","👩🏻⚕️":"1f469-1f3fb-2695","👩🏻⚖️":"1f469-1f3fb-2696","👩🏻✈️":"1f469-1f3fb-2708","👩🏼⚕️":"1f469-1f3fc-2695","👩🏼⚖️":"1f469-1f3fc-2696","👩🏼✈️":"1f469-1f3fc-2708","👩🏽⚕️":"1f469-1f3fd-2695","👩🏽⚖️":"1f469-1f3fd-2696","👩🏽✈️":"1f469-1f3fd-2708","👩🏾⚕️":"1f469-1f3fe-2695","👩🏾⚖️":"1f469-1f3fe-2696","👩🏾✈️":"1f469-1f3fe-2708","👩🏿⚕️":"1f469-1f3ff-2695","👩🏿⚖️":"1f469-1f3ff-2696","👩🏿✈️":"1f469-1f3ff-2708","👮🏻♀️":"1f46e-1f3fb-2640","👮🏻♂️":"1f46e-1f3fb-2642","👮🏼♀️":"1f46e-1f3fc-2640","👮🏼♂️":"1f46e-1f3fc-2642","👮🏽♀️":"1f46e-1f3fd-2640","👮🏽♂️":"1f46e-1f3fd-2642","👮🏾♀️":"1f46e-1f3fe-2640","👮🏾♂️":"1f46e-1f3fe-2642","👮🏿♀️":"1f46e-1f3ff-2640","👮🏿♂️":"1f46e-1f3ff-2642","👱🏻♀️":"1f471-1f3fb-2640","👱🏻♂️":"1f471-1f3fb-2642","👱🏼♀️":"1f471-1f3fc-2640","👱🏼♂️":"1f471-1f3fc-2642","👱🏽♀️":"1f471-1f3fd-2640","👱🏽♂️":"1f471-1f3fd-2642","👱🏾♀️":"1f471-1f3fe-2640","👱🏾♂️":"1f471-1f3fe-2642","👱🏿♀️":"1f471-1f3ff-2640","👱🏿♂️":"1f471-1f3ff-2642","👳🏻♀️":"1f473-1f3fb-2640","👳🏻♂️":"1f473-1f3fb-2642","👳🏼♀️":"1f473-1f3fc-2640","👳🏼♂️":"1f473-1f3fc-2642","👳🏽♀️":"1f473-1f3fd-2640","👳🏽♂️":"1f473-1f3fd-2642","👳🏾♀️":"1f473-1f3fe-2640","👳🏾♂️":"1f473-1f3fe-2642","👳🏿♀️":"1f473-1f3ff-2640","👳🏿♂️":"1f473-1f3ff-2642","👷🏻♀️":"1f477-1f3fb-2640","👷🏻♂️":"1f477-1f3fb-2642","👷🏼♀️":"1f477-1f3fc-2640","👷🏼♂️":"1f477-1f3fc-2642","👷🏽♀️":"1f477-1f3fd-2640","👷🏽♂️":"1f477-1f3fd-2642","👷🏾♀️":"1f477-1f3fe-2640","👷🏾♂️":"1f477-1f3fe-2642","👷🏿♀️":"1f477-1f3ff-2640","👷🏿♂️":"1f477-1f3ff-2642","💂🏻♀️":"1f482-1f3fb-2640","💂🏻♂️":"1f482-1f3fb-2642","💂🏼♀️":"1f482-1f3fc-2640","💂🏼♂️":"1f482-1f3fc-2642","💂🏽♀️":"1f482-1f3fd-2640","💂🏽♂️":"1f482-1f3fd-2642","💂🏾♀️":"1f482-1f3fe-2640","💂🏾♂️":"1f482-1f3fe-2642","💂🏿♀️":"1f482-1f3ff-2640","💂🏿♂️":"1f482-1f3ff-2642","🏃🏻♀️":"1f3c3-1f3fb-2640","🏃🏻♂️":"1f3c3-1f3fb-2642","🏃🏼♀️":"1f3c3-1f3fc-2640","🏃🏼♂️":"1f3c3-1f3fc-2642","🏃🏽♀️":"1f3c3-1f3fd-2640","🏃🏽♂️":"1f3c3-1f3fd-2642","🏃🏾♀️":"1f3c3-1f3fe-2640","🏃🏾♂️":"1f3c3-1f3fe-2642","🏃🏿♀️":"1f3c3-1f3ff-2640","🏃🏿♂️":"1f3c3-1f3ff-2642","🏄🏻♀️":"1f3c4-1f3fb-2640","🏄🏻♂️":"1f3c4-1f3fb-2642","🏄🏼♀️":"1f3c4-1f3fc-2640","🏄🏼♂️":"1f3c4-1f3fc-2642","🏄🏽♀️":"1f3c4-1f3fd-2640","🏄🏽♂️":"1f3c4-1f3fd-2642","🏄🏾♀️":"1f3c4-1f3fe-2640","🏄🏾♂️":"1f3c4-1f3fe-2642","🏄🏿♀️":"1f3c4-1f3ff-2640","🏄🏿♂️":"1f3c4-1f3ff-2642","🏊🏻♀️":"1f3ca-1f3fb-2640","🏊🏻♂️":"1f3ca-1f3fb-2642","🏊🏼♀️":"1f3ca-1f3fc-2640","🏊🏼♂️":"1f3ca-1f3fc-2642","🏊🏽♀️":"1f3ca-1f3fd-2640","🏊🏽♂️":"1f3ca-1f3fd-2642","🏊🏾♀️":"1f3ca-1f3fe-2640","🏊🏾♂️":"1f3ca-1f3fe-2642","🏊🏿♀️":"1f3ca-1f3ff-2640","🏊🏿♂️":"1f3ca-1f3ff-2642","💆🏻♀️":"1f486-1f3fb-2640","💆🏻♂️":"1f486-1f3fb-2642","💆🏼♀️":"1f486-1f3fc-2640","💆🏼♂️":"1f486-1f3fc-2642","💆🏽♀️":"1f486-1f3fd-2640","💆🏽♂️":"1f486-1f3fd-2642","💆🏾♀️":"1f486-1f3fe-2640","💆🏾♂️":"1f486-1f3fe-2642","💆🏿♀️":"1f486-1f3ff-2640","💆🏿♂️":"1f486-1f3ff-2642","💇🏻♀️":"1f487-1f3fb-2640","💇🏻♂️":"1f487-1f3fb-2642","💇🏼♀️":"1f487-1f3fc-2640","💇🏼♂️":"1f487-1f3fc-2642","💇🏽♀️":"1f487-1f3fd-2640","💇🏽♂️":"1f487-1f3fd-2642","💇🏾♀️":"1f487-1f3fe-2640","💇🏾♂️":"1f487-1f3fe-2642","💇🏿♀️":"1f487-1f3ff-2640","💇🏿♂️":"1f487-1f3ff-2642","🚣🏻♀️":"1f6a3-1f3fb-2640","🚣🏻♂️":"1f6a3-1f3fb-2642","🚣🏼♀️":"1f6a3-1f3fc-2640","🚣🏼♂️":"1f6a3-1f3fc-2642","🚣🏽♀️":"1f6a3-1f3fd-2640","🚣🏽♂️":"1f6a3-1f3fd-2642","🚣🏾♀️":"1f6a3-1f3fe-2640","🚣🏾♂️":"1f6a3-1f3fe-2642","🚣🏿♀️":"1f6a3-1f3ff-2640","🚣🏿♂️":"1f6a3-1f3ff-2642","🚴🏻♀️":"1f6b4-1f3fb-2640","🚴🏻♂️":"1f6b4-1f3fb-2642","🚴🏼♀️":"1f6b4-1f3fc-2640","🚴🏼♂️":"1f6b4-1f3fc-2642","🚴🏽♀️":"1f6b4-1f3fd-2640","🚴🏽♂️":"1f6b4-1f3fd-2642","🚴🏾♀️":"1f6b4-1f3fe-2640","🚴🏾♂️":"1f6b4-1f3fe-2642","🚴🏿♀️":"1f6b4-1f3ff-2640","🚴🏿♂️":"1f6b4-1f3ff-2642","🚵🏻♀️":"1f6b5-1f3fb-2640","🚵🏻♂️":"1f6b5-1f3fb-2642","🚵🏼♀️":"1f6b5-1f3fc-2640","🚵🏼♂️":"1f6b5-1f3fc-2642","🚵🏽♀️":"1f6b5-1f3fd-2640","🚵🏽♂️":"1f6b5-1f3fd-2642","🚵🏾♀️":"1f6b5-1f3fe-2640","🚵🏾♂️":"1f6b5-1f3fe-2642","🚵🏿♀️":"1f6b5-1f3ff-2640","🚵🏿♂️":"1f6b5-1f3ff-2642","🚶🏻♀️":"1f6b6-1f3fb-2640","🚶🏻♂️":"1f6b6-1f3fb-2642","🚶🏼♀️":"1f6b6-1f3fc-2640","🚶🏼♂️":"1f6b6-1f3fc-2642","🚶🏽♀️":"1f6b6-1f3fd-2640","🚶🏽♂️":"1f6b6-1f3fd-2642","🚶🏾♀️":"1f6b6-1f3fe-2640","🚶🏾♂️":"1f6b6-1f3fe-2642","🚶🏿♀️":"1f6b6-1f3ff-2640","🚶🏿♂️":"1f6b6-1f3ff-2642","🤸🏻♀️":"1f938-1f3fb-2640","🤸🏻♂️":"1f938-1f3fb-2642","🤸🏼♀️":"1f938-1f3fc-2640","🤸🏼♂️":"1f938-1f3fc-2642","🤸🏽♀️":"1f938-1f3fd-2640","🤸🏽♂️":"1f938-1f3fd-2642","🤸🏾♀️":"1f938-1f3fe-2640","🤸🏾♂️":"1f938-1f3fe-2642","🤸🏿♀️":"1f938-1f3ff-2640","🤸🏿♂️":"1f938-1f3ff-2642","🤹🏻♀️":"1f939-1f3fb-2640","🤹🏻♂️":"1f939-1f3fb-2642","🤹🏼♀️":"1f939-1f3fc-2640","🤹🏼♂️":"1f939-1f3fc-2642","🤹🏽♀️":"1f939-1f3fd-2640","🤹🏽♂️":"1f939-1f3fd-2642","🤹🏾♀️":"1f939-1f3fe-2640","🤹🏾♂️":"1f939-1f3fe-2642","🤹🏿♀️":"1f939-1f3ff-2640","🤹🏿♂️":"1f939-1f3ff-2642","🤽🏻♀️":"1f93d-1f3fb-2640","🤽🏻♂️":"1f93d-1f3fb-2642","🤽🏼♀️":"1f93d-1f3fc-2640","🤽🏼♂️":"1f93d-1f3fc-2642","🤽🏽♀️":"1f93d-1f3fd-2640","🤽🏽♂️":"1f93d-1f3fd-2642","🤽🏾♀️":"1f93d-1f3fe-2640","🤽🏾♂️":"1f93d-1f3fe-2642","🤽🏿♀️":"1f93d-1f3ff-2640","🤽🏿♂️":"1f93d-1f3ff-2642","🤾🏻♀️":"1f93e-1f3fb-2640","🤾🏻♂️":"1f93e-1f3fb-2642","🤾🏼♀️":"1f93e-1f3fc-2640","🤾🏼♂️":"1f93e-1f3fc-2642","🤾🏽♀️":"1f93e-1f3fd-2640","🤾🏽♂️":"1f93e-1f3fd-2642","🤾🏾♀️":"1f93e-1f3fe-2640","🤾🏾♂️":"1f93e-1f3fe-2642","🤾🏿♀️":"1f93e-1f3ff-2640","🤾🏿♂️":"1f93e-1f3ff-2642","💁🏻♀️":"1f481-1f3fb-2640","💁🏻♂️":"1f481-1f3fb-2642","💁🏼♀️":"1f481-1f3fc-2640","💁🏼♂️":"1f481-1f3fc-2642","💁🏽♀️":"1f481-1f3fd-2640","💁🏽♂️":"1f481-1f3fd-2642","💁🏾♀️":"1f481-1f3fe-2640","💁🏾♂️":"1f481-1f3fe-2642","💁🏿♀️":"1f481-1f3ff-2640","💁🏿♂️":"1f481-1f3ff-2642","🙅🏻♀️":"1f645-1f3fb-2640","🙅🏻♂️":"1f645-1f3fb-2642","🙅🏼♀️":"1f645-1f3fc-2640","🙅🏼♂️":"1f645-1f3fc-2642","🙅🏽♀️":"1f645-1f3fd-2640","🙅🏽♂️":"1f645-1f3fd-2642","🙅🏾♀️":"1f645-1f3fe-2640","🙅🏾♂️":"1f645-1f3fe-2642","🙅🏿♀️":"1f645-1f3ff-2640","🙅🏿♂️":"1f645-1f3ff-2642","🙆🏻♀️":"1f646-1f3fb-2640","🙆🏻♂️":"1f646-1f3fb-2642","🙆🏼♀️":"1f646-1f3fc-2640","🙆🏼♂️":"1f646-1f3fc-2642","🙆🏽♀️":"1f646-1f3fd-2640","🙆🏽♂️":"1f646-1f3fd-2642","🙆🏾♀️":"1f646-1f3fe-2640","🙆🏾♂️":"1f646-1f3fe-2642","🙆🏿♀️":"1f646-1f3ff-2640","🙆🏿♂️":"1f646-1f3ff-2642","🙇🏻♀️":"1f647-1f3fb-2640","🙇🏻♂️":"1f647-1f3fb-2642","🙇🏼♀️":"1f647-1f3fc-2640","🙇🏼♂️":"1f647-1f3fc-2642","🙇🏽♀️":"1f647-1f3fd-2640","🙇🏽♂️":"1f647-1f3fd-2642","🙇🏾♀️":"1f647-1f3fe-2640","🙇🏾♂️":"1f647-1f3fe-2642","🙇🏿♀️":"1f647-1f3ff-2640","🙇🏿♂️":"1f647-1f3ff-2642","🙋🏻♀️":"1f64b-1f3fb-2640","🙋🏻♂️":"1f64b-1f3fb-2642","🙋🏼♀️":"1f64b-1f3fc-2640","🙋🏼♂️":"1f64b-1f3fc-2642","🙋🏽♀️":"1f64b-1f3fd-2640","🙋🏽♂️":"1f64b-1f3fd-2642","🙋🏾♀️":"1f64b-1f3fe-2640","🙋🏾♂️":"1f64b-1f3fe-2642","🙋🏿♀️":"1f64b-1f3ff-2640","🙋🏿♂️":"1f64b-1f3ff-2642","🙍🏻♀️":"1f64d-1f3fb-2640","🙍🏻♂️":"1f64d-1f3fb-2642","🙍🏼♀️":"1f64d-1f3fc-2640","🙍🏼♂️":"1f64d-1f3fc-2642","🙍🏽♀️":"1f64d-1f3fd-2640","🙍🏽♂️":"1f64d-1f3fd-2642","🙍🏾♀️":"1f64d-1f3fe-2640","🙍🏾♂️":"1f64d-1f3fe-2642","🙍🏿♀️":"1f64d-1f3ff-2640","🙍🏿♂️":"1f64d-1f3ff-2642","🙎🏻♀️":"1f64e-1f3fb-2640","🙎🏻♂️":"1f64e-1f3fb-2642","🙎🏼♀️":"1f64e-1f3fc-2640","🙎🏼♂️":"1f64e-1f3fc-2642","🙎🏽♀️":"1f64e-1f3fd-2640","🙎🏽♂️":"1f64e-1f3fd-2642","🙎🏾♀️":"1f64e-1f3fe-2640","🙎🏾♂️":"1f64e-1f3fe-2642","🙎🏿♀️":"1f64e-1f3ff-2640","🙎🏿♂️":"1f64e-1f3ff-2642","🤦🏻♀️":"1f926-1f3fb-2640","🤦🏻♂️":"1f926-1f3fb-2642","🤦🏼♀️":"1f926-1f3fc-2640","🤦🏼♂️":"1f926-1f3fc-2642","🤦🏽♀️":"1f926-1f3fd-2640","🤦🏽♂️":"1f926-1f3fd-2642","🤦🏾♀️":"1f926-1f3fe-2640","🤦🏾♂️":"1f926-1f3fe-2642","🤦🏿♀️":"1f926-1f3ff-2640","🤦🏿♂️":"1f926-1f3ff-2642","🤷🏻♀️":"1f937-1f3fb-2640","🤷🏻♂️":"1f937-1f3fb-2642","🤷🏼♀️":"1f937-1f3fc-2640","🤷🏼♂️":"1f937-1f3fc-2642","🤷🏽♀️":"1f937-1f3fd-2640","🤷🏽♂️":"1f937-1f3fd-2642","🤷🏾♀️":"1f937-1f3fe-2640","🤷🏾♂️":"1f937-1f3fe-2642","🤷🏿♀️":"1f937-1f3ff-2640","🤷🏿♂️":"1f937-1f3ff-2642","👁️🗨️":"1f441-1f5e8","🧙🏻\200d♀":"1f9d9-1f3fb-2640","🧙🏻♀️":"1f9d9-1f3fb-2640","🧙🏻\200d♂":"1f9d9-1f3fb-2642","🧙🏻♂️":"1f9d9-1f3fb-2642","🧙🏼\200d♀":"1f9d9-1f3fc-2640","🧙🏼♀️":"1f9d9-1f3fc-2640","🧙🏼\200d♂":"1f9d9-1f3fc-2642","🧙🏼♂️":"1f9d9-1f3fc-2642","🧙🏽\200d♀":"1f9d9-1f3fd-2640","🧙🏽♀️":"1f9d9-1f3fd-2640","🧙🏽\200d♂":"1f9d9-1f3fd-2642","🧙🏽♂️":"1f9d9-1f3fd-2642","🧙🏾\200d♀":"1f9d9-1f3fe-2640","🧙🏾♀️":"1f9d9-1f3fe-2640","🧙🏾\200d♂":"1f9d9-1f3fe-2642","🧙🏾♂️":"1f9d9-1f3fe-2642","🧙🏿\200d♀":"1f9d9-1f3ff-2640","🧙🏿♀️":"1f9d9-1f3ff-2640","🧙🏿\200d♂":"1f9d9-1f3ff-2642","🧙🏿♂️":"1f9d9-1f3ff-2642","🧚🏻\200d♀":"1f9da-1f3fb-2640","🧚🏻♀️":"1f9da-1f3fb-2640","🧚🏻\200d♂":"1f9da-1f3fb-2642","🧚🏻♂️":"1f9da-1f3fb-2642","🧚🏼\200d♀":"1f9da-1f3fc-2640","🧚🏼♀️":"1f9da-1f3fc-2640","🧚🏼\200d♂":"1f9da-1f3fc-2642","🧚🏼♂️":"1f9da-1f3fc-2642","🧚🏽\200d♀":"1f9da-1f3fd-2640","🧚🏽♀️":"1f9da-1f3fd-2640","🧚🏽\200d♂":"1f9da-1f3fd-2642","🧚🏽♂️":"1f9da-1f3fd-2642","🧚🏾\200d♀":"1f9da-1f3fe-2640","🧚🏾♀️":"1f9da-1f3fe-2640","🧚🏾\200d♂":"1f9da-1f3fe-2642","🧚🏾♂️":"1f9da-1f3fe-2642","🧚🏿\200d♀":"1f9da-1f3ff-2640","🧚🏿♀️":"1f9da-1f3ff-2640","🧚🏿\200d♂":"1f9da-1f3ff-2642","🧚🏿♂️":"1f9da-1f3ff-2642","🧛🏻\200d♀":"1f9db-1f3fb-2640","🧛🏻♀️":"1f9db-1f3fb-2640","🧛🏻\200d♂":"1f9db-1f3fb-2642","🧛🏻♂️":"1f9db-1f3fb-2642","🧛🏼\200d♀":"1f9db-1f3fc-2640","🧛🏼♀️":"1f9db-1f3fc-2640","🧛🏼\200d♂":"1f9db-1f3fc-2642","🧛🏼♂️":"1f9db-1f3fc-2642","🧛🏽\200d♀":"1f9db-1f3fd-2640","🧛🏽♀️":"1f9db-1f3fd-2640","🧛🏽\200d♂":"1f9db-1f3fd-2642","🧛🏽♂️":"1f9db-1f3fd-2642","🧛🏾\200d♀":"1f9db-1f3fe-2640","🧛🏾♀️":"1f9db-1f3fe-2640","🧛🏾\200d♂":"1f9db-1f3fe-2642","🧛🏾♂️":"1f9db-1f3fe-2642","🧛🏿\200d♀":"1f9db-1f3ff-2640","🧛🏿♀️":"1f9db-1f3ff-2640","🧛🏿\200d♂":"1f9db-1f3ff-2642","🧛🏿♂️":"1f9db-1f3ff-2642","🧜🏻\200d♀":"1f9dc-1f3fb-2640","🧜🏻♀️":"1f9dc-1f3fb-2640","🧜🏻\200d♂":"1f9dc-1f3fb-2642","🧜🏻♂️":"1f9dc-1f3fb-2642","🧜🏼\200d♀":"1f9dc-1f3fc-2640","🧜🏼♀️":"1f9dc-1f3fc-2640","🧜🏼\200d♂":"1f9dc-1f3fc-2642","🧜🏼♂️":"1f9dc-1f3fc-2642","🧜🏽\200d♀":"1f9dc-1f3fd-2640","🧜🏽♀️":"1f9dc-1f3fd-2640","🧜🏽\200d♂":"1f9dc-1f3fd-2642","🧜🏽♂️":"1f9dc-1f3fd-2642","🧜🏾\200d♀":"1f9dc-1f3fe-2640","🧜🏾♀️":"1f9dc-1f3fe-2640","🧜🏾\200d♂":"1f9dc-1f3fe-2642","🧜🏾♂️":"1f9dc-1f3fe-2642","🧜🏿\200d♀":"1f9dc-1f3ff-2640","🧜🏿♀️":"1f9dc-1f3ff-2640","🧜🏿\200d♂":"1f9dc-1f3ff-2642","🧜🏿♂️":"1f9dc-1f3ff-2642","🧝🏻\200d♀":"1f9dd-1f3fb-2640","🧝🏻♀️":"1f9dd-1f3fb-2640","🧝🏻\200d♂":"1f9dd-1f3fb-2642","🧝🏻♂️":"1f9dd-1f3fb-2642","🧝🏼\200d♀":"1f9dd-1f3fc-2640","🧝🏼♀️":"1f9dd-1f3fc-2640","🧝🏼\200d♂":"1f9dd-1f3fc-2642","🧝🏼♂️":"1f9dd-1f3fc-2642","🧝🏽\200d♀":"1f9dd-1f3fd-2640","🧝🏽♀️":"1f9dd-1f3fd-2640","🧝🏽\200d♂":"1f9dd-1f3fd-2642","🧝🏽♂️":"1f9dd-1f3fd-2642","🧝🏾\200d♀":"1f9dd-1f3fe-2640","🧝🏾♀️":"1f9dd-1f3fe-2640","🧝🏾\200d♂":"1f9dd-1f3fe-2642","🧝🏾♂️":"1f9dd-1f3fe-2642","🧝🏿\200d♀":"1f9dd-1f3ff-2640","🧝🏿♀️":"1f9dd-1f3ff-2640","🧝🏿\200d♂":"1f9dd-1f3ff-2642","🧝🏿♂️":"1f9dd-1f3ff-2642","🧖🏻\200d♀":"1f9d6-1f3fb-2640","🧖🏻♀️":"1f9d6-1f3fb-2640","🧖🏻\200d♂":"1f9d6-1f3fb-2642","🧖🏻♂️":"1f9d6-1f3fb-2642","🧖🏼\200d♀":"1f9d6-1f3fc-2640","🧖🏼♀️":"1f9d6-1f3fc-2640","🧖🏼\200d♂":"1f9d6-1f3fc-2642","🧖🏼♂️":"1f9d6-1f3fc-2642","🧖🏽\200d♀":"1f9d6-1f3fd-2640","🧖🏽♀️":"1f9d6-1f3fd-2640","🧖🏽\200d♂":"1f9d6-1f3fd-2642","🧖🏽♂️":"1f9d6-1f3fd-2642","🧖🏾\200d♀":"1f9d6-1f3fe-2640","🧖🏾♀️":"1f9d6-1f3fe-2640","🧖🏾\200d♂":"1f9d6-1f3fe-2642","🧖🏾♂️":"1f9d6-1f3fe-2642","🧖🏿\200d♀":"1f9d6-1f3ff-2640","🧖🏿♀️":"1f9d6-1f3ff-2640","🧖🏿\200d♂":"1f9d6-1f3ff-2642","🧖🏿♂️":"1f9d6-1f3ff-2642","🧗🏻\200d♀":"1f9d7-1f3fb-2640","🧗🏻♀️":"1f9d7-1f3fb-2640","🧗🏻\200d♂":"1f9d7-1f3fb-2642","🧗🏻♂️":"1f9d7-1f3fb-2642","🧗🏼\200d♀":"1f9d7-1f3fc-2640","🧗🏼♀️":"1f9d7-1f3fc-2640","🧗🏼\200d♂":"1f9d7-1f3fc-2642","🧗🏼♂️":"1f9d7-1f3fc-2642","🧗🏽\200d♀":"1f9d7-1f3fd-2640","🧗🏽♀️":"1f9d7-1f3fd-2640","🧗🏽\200d♂":"1f9d7-1f3fd-2642","🧗🏽♂️":"1f9d7-1f3fd-2642","🧗🏾\200d♀":"1f9d7-1f3fe-2640","🧗🏾♀️":"1f9d7-1f3fe-2640","🧗🏾\200d♂":"1f9d7-1f3fe-2642","🧗🏾♂️":"1f9d7-1f3fe-2642","🧗🏿\200d♀":"1f9d7-1f3ff-2640","🧗🏿♀️":"1f9d7-1f3ff-2640","🧗🏿\200d♂":"1f9d7-1f3ff-2642","🧗🏿♂️":"1f9d7-1f3ff-2642","🧘🏻\200d♀":"1f9d8-1f3fb-2640","🧘🏻♀️":"1f9d8-1f3fb-2640","🧘🏻\200d♂":"1f9d8-1f3fb-2642","🧘🏻♂️":"1f9d8-1f3fb-2642","🧘🏼\200d♀":"1f9d8-1f3fc-2640","🧘🏼♀️":"1f9d8-1f3fc-2640","🧘🏼\200d♂":"1f9d8-1f3fc-2642","🧘🏼♂️":"1f9d8-1f3fc-2642","🧘🏽\200d♀":"1f9d8-1f3fd-2640","🧘🏽♀️":"1f9d8-1f3fd-2640","🧘🏽\200d♂":"1f9d8-1f3fd-2642","🧘🏽♂️":"1f9d8-1f3fd-2642","🧘🏾\200d♀":"1f9d8-1f3fe-2640","🧘🏾♀️":"1f9d8-1f3fe-2640","🧘🏾\200d♂":"1f9d8-1f3fe-2642","🧘🏾♂️":"1f9d8-1f3fe-2642","🧘🏿\200d♀":"1f9d8-1f3ff-2640","🧘🏿♀️":"1f9d8-1f3ff-2640","🧘🏿\200d♂":"1f9d8-1f3ff-2642","🧘🏿♂️":"1f9d8-1f3ff-2642","👁\200d🗨️":"1f441-1f5e8","👁️\200d🗨":"1f441-1f5e8","🦸🏻\200d♀":"1f9b8-1f3fb-2640","🦸🏻♀️":"1f9b8-1f3fb-2640","🦸🏻\200d♂":"1f9b8-1f3fb-2642","🦸🏻♂️":"1f9b8-1f3fb-2642","🦸🏼\200d♀":"1f9b8-1f3fc-2640","🦸🏼♀️":"1f9b8-1f3fc-2640","🦸🏼\200d♂":"1f9b8-1f3fc-2642","🦸🏼♂️":"1f9b8-1f3fc-2642","🦸🏽\200d♀":"1f9b8-1f3fd-2640","🦸🏽♀️":"1f9b8-1f3fd-2640","🦸🏽\200d♂":"1f9b8-1f3fd-2642","🦸🏽♂️":"1f9b8-1f3fd-2642","🦸🏾\200d♀":"1f9b8-1f3fe-2640","🦸🏾♀️":"1f9b8-1f3fe-2640","🦸🏾\200d♂":"1f9b8-1f3fe-2642","🦸🏾♂️":"1f9b8-1f3fe-2642","🦸🏿\200d♀":"1f9b8-1f3ff-2640","🦸🏿♀️":"1f9b8-1f3ff-2640","🦸🏿\200d♂":"1f9b8-1f3ff-2642","🦸🏿♂️":"1f9b8-1f3ff-2642","🦹🏻\200d♀":"1f9b9-1f3fb-2640","🦹🏻♀️":"1f9b9-1f3fb-2640","🦹🏻\200d♂":"1f9b9-1f3fb-2642","🦹🏻♂️":"1f9b9-1f3fb-2642","🦹🏼\200d♀":"1f9b9-1f3fc-2640","🦹🏼♀️":"1f9b9-1f3fc-2640","🦹🏼\200d♂":"1f9b9-1f3fc-2642","🦹🏼♂️":"1f9b9-1f3fc-2642","🦹🏽\200d♀":"1f9b9-1f3fd-2640","🦹🏽♀️":"1f9b9-1f3fd-2640","🦹🏽\200d♂":"1f9b9-1f3fd-2642","🦹🏽♂️":"1f9b9-1f3fd-2642","🦹🏾\200d♀":"1f9b9-1f3fe-2640","🦹🏾♀️":"1f9b9-1f3fe-2640","🦹🏾\200d♂":"1f9b9-1f3fe-2642","🦹🏾♂️":"1f9b9-1f3fe-2642","🦹🏿\200d♀":"1f9b9-1f3ff-2640","🦹🏿♀️":"1f9b9-1f3ff-2640","🦹🏿\200d♂":"1f9b9-1f3ff-2642","🦹🏿♂️":"1f9b9-1f3ff-2642","⛹🏿\200d♂":"26f9-1f3ff-2642","⛹🏾\200d♂":"26f9-1f3fe-2642","⛹🏽\200d♂":"26f9-1f3fd-2642","⛹🏼\200d♂":"26f9-1f3fc-2642","⛹🏻\200d♂":"26f9-1f3fb-2642","⛹🏿\200d♀":"26f9-1f3ff-2640","⛹🏾\200d♀":"26f9-1f3fe-2640","⛹🏽\200d♀":"26f9-1f3fd-2640","⛹🏼\200d♀":"26f9-1f3fc-2640","⛹🏻\200d♀":"26f9-1f3fb-2640","👨\200d⚕️":"1f468-2695","👨\200d⚖️":"1f468-2696","👨\200d✈️":"1f468-2708","👩\200d⚕️":"1f469-2695","👩\200d⚖️":"1f469-2696","👩\200d✈️":"1f469-2708","👮\200d♀️":"1f46e-2640","👮\200d♂️":"1f46e-2642","👱\200d♀️":"1f471-2640","👱\200d♂️":"1f471-2642","👳\200d♀️":"1f473-2640","👳\200d♂️":"1f473-2642","👷\200d♀️":"1f477-2640","👷\200d♂️":"1f477-2642","💂\200d♀️":"1f482-2640","💂\200d♂️":"1f482-2642","🕵️♀️":"1f575-2640","🕵️♂️":"1f575-2642","🏃\200d♀️":"1f3c3-2640","🏃\200d♂️":"1f3c3-2642","🏄\200d♀️":"1f3c4-2640","🏄\200d♂️":"1f3c4-2642","🏊\200d♀️":"1f3ca-2640","🏊\200d♂️":"1f3ca-2642","🏋️♀️":"1f3cb-2640","🏋️♂️":"1f3cb-2642","🏌️♀️":"1f3cc-2640","🏌️♂️":"1f3cc-2642","👯\200d♀️":"1f46f-2640","👯\200d♂️":"1f46f-2642","💆\200d♀️":"1f486-2640","💆\200d♂️":"1f486-2642","💇\200d♀️":"1f487-2640","💇\200d♂️":"1f487-2642","🚣\200d♀️":"1f6a3-2640","🚣\200d♂️":"1f6a3-2642","🚴\200d♀️":"1f6b4-2640","🚴\200d♂️":"1f6b4-2642","🚵\200d♀️":"1f6b5-2640","🚵\200d♂️":"1f6b5-2642","🚶\200d♀️":"1f6b6-2640","🚶\200d♂️":"1f6b6-2642","🤸\200d♀️":"1f938-2640","🤸\200d♂️":"1f938-2642","🤹\200d♀️":"1f939-2640","🤹\200d♂️":"1f939-2642","🤼\200d♀️":"1f93c-2640","🤼\200d♂️":"1f93c-2642","🤽\200d♀️":"1f93d-2640","🤽\200d♂️":"1f93d-2642","🤾\200d♀️":"1f93e-2640","🤾\200d♂️":"1f93e-2642","💁\200d♀️":"1f481-2640","💁\200d♂️":"1f481-2642","🙅\200d♀️":"1f645-2640","🙅\200d♂️":"1f645-2642","🙆\200d♀️":"1f646-2640","🙆\200d♂️":"1f646-2642","🙇\200d♀️":"1f647-2640","🙇\200d♂️":"1f647-2642","🙋\200d♀️":"1f64b-2640","🙋\200d♂️":"1f64b-2642","🙍\200d♀️":"1f64d-2640","🙍\200d♂️":"1f64d-2642","🙎\200d♀️":"1f64e-2640","🙎\200d♂️":"1f64e-2642","🤦\200d♀️":"1f926-2640","🤦\200d♂️":"1f926-2642","🤷\200d♀️":"1f937-2640","🤷\200d♂️":"1f937-2642","🧙\200d♀️":"1f9d9-2640","🧙\200d♂️":"1f9d9-2642","🧚\200d♀️":"1f9da-2640","🧚\200d♂️":"1f9da-2642","🧛\200d♀️":"1f9db-2640","🧛\200d♂️":"1f9db-2642","🧜\200d♀️":"1f9dc-2640","🧜\200d♂️":"1f9dc-2642","🧝\200d♀️":"1f9dd-2640","🧝\200d♂️":"1f9dd-2642","🧞\200d♀️":"1f9de-2640","🧞\200d♂️":"1f9de-2642","🧟\200d♀️":"1f9df-2640","🧟\200d♂️":"1f9df-2642","🧖\200d♀️":"1f9d6-2640","🧖\200d♂️":"1f9d6-2642","🧗\200d♀️":"1f9d7-2640","🧗\200d♂️":"1f9d7-2642","🧘\200d♀️":"1f9d8-2640","🧘\200d♂️":"1f9d8-2642","🕵\200d♀️":"1f575-2640","🕵️\200d♀":"1f575-2640","🕵\200d♂️":"1f575-2642","🕵️\200d♂":"1f575-2642","🏋\200d♀️":"1f3cb-2640","🏋️\200d♀":"1f3cb-2640","🏋\200d♂️":"1f3cb-2642","🏋️\200d♂":"1f3cb-2642","🏌\200d♀️":"1f3cc-2640","🏌️\200d♀":"1f3cc-2640","🏌\200d♂️":"1f3cc-2642","🏌️\200d♂":"1f3cc-2642","🦸\200d♀️":"1f9b8-2640","🦸\200d♂️":"1f9b8-2642","🦹\200d♀️":"1f9b9-2640","🦹\200d♂️":"1f9b9-2642","🏴\200d☠️":"1f3f4-2620","⛹️♀️":"26f9-2640","⛹️♂️":"26f9-2642","⛹\200d♀️":"26f9-2640","⛹️\200d♀":"26f9-2640","⛹\200d♂️":"26f9-2642","⛹️\200d♂":"26f9-2642","👨👨👦":"1f468-1f468-1f466","👨👨👧":"1f468-1f468-1f467","👨👩👧":"1f468-1f469-1f467","👩👩👦":"1f469-1f469-1f466","👩👩👧":"1f469-1f469-1f467","👨👦👦":"1f468-1f466-1f466","👨👧👦":"1f468-1f467-1f466","👩👦👦":"1f469-1f466-1f466","👩👧👦":"1f469-1f467-1f466","👩👧👧":"1f469-1f467-1f467","👨🏻🎨":"1f468-1f3fb-1f3a8","👨🏼🎨":"1f468-1f3fc-1f3a8","👨🏽🎨":"1f468-1f3fd-1f3a8","👨🏾🎨":"1f468-1f3fe-1f3a8","👨🏿🎨":"1f468-1f3ff-1f3a8","👩🏻🎨":"1f469-1f3fb-1f3a8","👩🏼🎨":"1f469-1f3fc-1f3a8","👩🏽🎨":"1f469-1f3fd-1f3a8","👩🏾🎨":"1f469-1f3fe-1f3a8","👩🏿🎨":"1f469-1f3ff-1f3a8","👨🏻🚀":"1f468-1f3fb-1f680","👨🏼🚀":"1f468-1f3fc-1f680","👨🏽🚀":"1f468-1f3fd-1f680","👨🏾🚀":"1f468-1f3fe-1f680","👨🏿🚀":"1f468-1f3ff-1f680","👩🏻🚀":"1f469-1f3fb-1f680","👩🏼🚀":"1f469-1f3fc-1f680","👩🏽🚀":"1f469-1f3fd-1f680","👩🏾🚀":"1f469-1f3fe-1f680","👩🏿🚀":"1f469-1f3ff-1f680","👨🏻🚒":"1f468-1f3fb-1f692","👨🏼🚒":"1f468-1f3fc-1f692","👨🏽🚒":"1f468-1f3fd-1f692","👨🏾🚒":"1f468-1f3fe-1f692","👨🏿🚒":"1f468-1f3ff-1f692","👩🏻🚒":"1f469-1f3fb-1f692","👩🏼🚒":"1f469-1f3fc-1f692","👩🏽🚒":"1f469-1f3fd-1f692","👩🏾🚒":"1f469-1f3fe-1f692","👩🏿🚒":"1f469-1f3ff-1f692","👨👩👦":"1f468-1f469-1f466","👨👧👧":"1f468-1f467-1f467","👨🏻🌾":"1f468-1f3fb-1f33e","👨🏻🍳":"1f468-1f3fb-1f373","👨🏻🎓":"1f468-1f3fb-1f393","👨🏻🎤":"1f468-1f3fb-1f3a4","👨🏻🏫":"1f468-1f3fb-1f3eb","👨🏻🏭":"1f468-1f3fb-1f3ed","👨🏻💻":"1f468-1f3fb-1f4bb","👨🏻💼":"1f468-1f3fb-1f4bc","👨🏻🔧":"1f468-1f3fb-1f527","👨🏻🔬":"1f468-1f3fb-1f52c","👨🏼🌾":"1f468-1f3fc-1f33e","👨🏼🍳":"1f468-1f3fc-1f373","👨🏼🎓":"1f468-1f3fc-1f393","👨🏼🎤":"1f468-1f3fc-1f3a4","👨🏼🏫":"1f468-1f3fc-1f3eb","👨🏼🏭":"1f468-1f3fc-1f3ed","👨🏼💻":"1f468-1f3fc-1f4bb","👨🏼💼":"1f468-1f3fc-1f4bc","👨🏼🔧":"1f468-1f3fc-1f527","👨🏼🔬":"1f468-1f3fc-1f52c","👨🏽🌾":"1f468-1f3fd-1f33e","👨🏽🍳":"1f468-1f3fd-1f373","👨🏽🎓":"1f468-1f3fd-1f393","👨🏽🎤":"1f468-1f3fd-1f3a4","👨🏽🏫":"1f468-1f3fd-1f3eb","👨🏽🏭":"1f468-1f3fd-1f3ed","👨🏽💻":"1f468-1f3fd-1f4bb","👨🏽💼":"1f468-1f3fd-1f4bc","👨🏽🔧":"1f468-1f3fd-1f527","👨🏽🔬":"1f468-1f3fd-1f52c","👨🏾🌾":"1f468-1f3fe-1f33e","👨🏾🍳":"1f468-1f3fe-1f373","👨🏾🎓":"1f468-1f3fe-1f393","👨🏾🎤":"1f468-1f3fe-1f3a4","👨🏾🏫":"1f468-1f3fe-1f3eb","👨🏾🏭":"1f468-1f3fe-1f3ed","👨🏾💻":"1f468-1f3fe-1f4bb","👨🏾💼":"1f468-1f3fe-1f4bc","👨🏾🔧":"1f468-1f3fe-1f527","👨🏾🔬":"1f468-1f3fe-1f52c","👨🏿🌾":"1f468-1f3ff-1f33e","👨🏿🍳":"1f468-1f3ff-1f373","👨🏿🎓":"1f468-1f3ff-1f393","👨🏿🎤":"1f468-1f3ff-1f3a4","👨🏿🏫":"1f468-1f3ff-1f3eb","👨🏿🏭":"1f468-1f3ff-1f3ed","👨🏿💻":"1f468-1f3ff-1f4bb","👨🏿💼":"1f468-1f3ff-1f4bc","👨🏿🔧":"1f468-1f3ff-1f527","👨🏿🔬":"1f468-1f3ff-1f52c","👩🏻🌾":"1f469-1f3fb-1f33e","👩🏻🍳":"1f469-1f3fb-1f373","👩🏻🎓":"1f469-1f3fb-1f393","👩🏻🎤":"1f469-1f3fb-1f3a4","👩🏻🏫":"1f469-1f3fb-1f3eb","👩🏻🏭":"1f469-1f3fb-1f3ed","👩🏻💻":"1f469-1f3fb-1f4bb","👩🏻💼":"1f469-1f3fb-1f4bc","👩🏻🔧":"1f469-1f3fb-1f527","👩🏻🔬":"1f469-1f3fb-1f52c","👩🏼🌾":"1f469-1f3fc-1f33e","👩🏼🍳":"1f469-1f3fc-1f373","👩🏼🎓":"1f469-1f3fc-1f393","👩🏼🎤":"1f469-1f3fc-1f3a4","👩🏼🏫":"1f469-1f3fc-1f3eb","👩🏼🏭":"1f469-1f3fc-1f3ed","👩🏼💻":"1f469-1f3fc-1f4bb","👩🏼💼":"1f469-1f3fc-1f4bc","👩🏼🔧":"1f469-1f3fc-1f527","👩🏼🔬":"1f469-1f3fc-1f52c","👩🏽🌾":"1f469-1f3fd-1f33e","👩🏽🍳":"1f469-1f3fd-1f373","👩🏽🎓":"1f469-1f3fd-1f393","👩🏽🎤":"1f469-1f3fd-1f3a4","👩🏽🏫":"1f469-1f3fd-1f3eb","👩🏽🏭":"1f469-1f3fd-1f3ed","👩🏽💻":"1f469-1f3fd-1f4bb","👩🏽💼":"1f469-1f3fd-1f4bc","👩🏽🔧":"1f469-1f3fd-1f527","👩🏽🔬":"1f469-1f3fd-1f52c","👩🏾🌾":"1f469-1f3fe-1f33e","👩🏾🍳":"1f469-1f3fe-1f373","👩🏾🎓":"1f469-1f3fe-1f393","👩🏾🎤":"1f469-1f3fe-1f3a4","👩🏾🏫":"1f469-1f3fe-1f3eb","👩🏾🏭":"1f469-1f3fe-1f3ed","👩🏾💻":"1f469-1f3fe-1f4bb","👩🏾💼":"1f469-1f3fe-1f4bc","👩🏾🔧":"1f469-1f3fe-1f527","👩🏾🔬":"1f469-1f3fe-1f52c","👩🏿🌾":"1f469-1f3ff-1f33e","👩🏿🍳":"1f469-1f3ff-1f373","👩🏿🎓":"1f469-1f3ff-1f393","👩🏿🎤":"1f469-1f3ff-1f3a4","👩🏿🏫":"1f469-1f3ff-1f3eb","👩🏿🏭":"1f469-1f3ff-1f3ed","👩🏿💻":"1f469-1f3ff-1f4bb","👩🏿💼":"1f469-1f3ff-1f4bc","👩🏿🔧":"1f469-1f3ff-1f527","👩🏿🔬":"1f469-1f3ff-1f52c","👨🏻🦰":"1f468-1f3fb-1f9b0","👨🏻🦱":"1f468-1f3fb-1f9b1","👨🏻🦲":"1f468-1f3fb-1f9b2","👨🏻🦳":"1f468-1f3fb-1f9b3","👨🏼🦰":"1f468-1f3fc-1f9b0","👨🏼🦱":"1f468-1f3fc-1f9b1","👨🏼🦲":"1f468-1f3fc-1f9b2","👨🏼🦳":"1f468-1f3fc-1f9b3","👨🏽🦰":"1f468-1f3fd-1f9b0","👨🏽🦱":"1f468-1f3fd-1f9b1","👨🏽🦲":"1f468-1f3fd-1f9b2","👨🏽🦳":"1f468-1f3fd-1f9b3","👨🏾🦰":"1f468-1f3fe-1f9b0","👨🏾🦱":"1f468-1f3fe-1f9b1","👨🏾🦲":"1f468-1f3fe-1f9b2","👨🏾🦳":"1f468-1f3fe-1f9b3","👨🏿🦰":"1f468-1f3ff-1f9b0","👨🏿🦱":"1f468-1f3ff-1f9b1","👨🏿🦲":"1f468-1f3ff-1f9b2","👨🏿🦳":"1f468-1f3ff-1f9b3","👩🏻🦰":"1f469-1f3fb-1f9b0","👩🏻🦱":"1f469-1f3fb-1f9b1","👩🏻🦲":"1f469-1f3fb-1f9b2","👩🏻🦳":"1f469-1f3fb-1f9b3","👩🏼🦰":"1f469-1f3fc-1f9b0","👩🏼🦱":"1f469-1f3fc-1f9b1","👩🏼🦲":"1f469-1f3fc-1f9b2","👩🏼🦳":"1f469-1f3fc-1f9b3","👩🏽🦰":"1f469-1f3fd-1f9b0","👩🏽🦱":"1f469-1f3fd-1f9b1","👩🏽🦲":"1f469-1f3fd-1f9b2","👩🏽🦳":"1f469-1f3fd-1f9b3","👩🏾🦰":"1f469-1f3fe-1f9b0","👩🏾🦱":"1f469-1f3fe-1f9b1","👩🏾🦲":"1f469-1f3fe-1f9b2","👩🏾🦳":"1f469-1f3fe-1f9b3","👩🏿🦰":"1f469-1f3ff-1f9b0","👩🏿🦱":"1f469-1f3ff-1f9b1","👩🏿🦲":"1f469-1f3ff-1f9b2","👩🏿🦳":"1f469-1f3ff-1f9b3","👁\200d🗨":"1f441-1f5e8","👨\200d💻":"1f468-1f4bb","👩\200d💻":"1f469-1f4bb","👨\200d🏫":"1f468-1f3eb","👩\200d🏫":"1f469-1f3eb","👨\200d🎓":"1f468-1f393","👩\200d🎓":"1f469-1f393","👨\200d🎤":"1f468-1f3a4","👩\200d🎤":"1f469-1f3a4","👨\200d🔬":"1f468-1f52c","👩\200d🔬":"1f469-1f52c","👨\200d💼":"1f468-1f4bc","👩\200d💼":"1f469-1f4bc","👨\200d🔧":"1f468-1f527","👩\200d🔧":"1f469-1f527","👨\200d🏭":"1f468-1f3ed","👩\200d🏭":"1f469-1f3ed","👨\200d🍳":"1f468-1f373","👩\200d🍳":"1f469-1f373","👨\200d🌾":"1f468-1f33e","👩\200d🌾":"1f469-1f33e","👨\200d👦":"1f468-1f466","👨\200d👧":"1f468-1f467","👩\200d👦":"1f469-1f466","👩\200d👧":"1f469-1f467","👨\200d🎨":"1f468-1f3a8","👩\200d🎨":"1f469-1f3a8","👨\200d🚀":"1f468-1f680","👩\200d🚀":"1f469-1f680","👨\200d🚒":"1f468-1f692","👩\200d🚒":"1f469-1f692","🏋️🏻":"1f3cb-1f3fb","🏋️🏼":"1f3cb-1f3fc","🏋️🏽":"1f3cb-1f3fd","🏋️🏾":"1f3cb-1f3fe","🏋️🏿":"1f3cb-1f3ff","🏌️🏻":"1f3cc-1f3fb","🏌️🏼":"1f3cc-1f3fc","🏌️🏽":"1f3cc-1f3fd","🏌️🏾":"1f3cc-1f3fe","🏌️🏿":"1f3cc-1f3ff","🕴️🏻":"1f574-1f3fb","🕴️🏼":"1f574-1f3fc","🕴️🏽":"1f574-1f3fd","🕴️🏾":"1f574-1f3fe","🕴️🏿":"1f574-1f3ff","🕵️🏻":"1f575-1f3fb","🕵️🏼":"1f575-1f3fc","🕵️🏽":"1f575-1f3fd","🕵️🏾":"1f575-1f3fe","🕵️🏿":"1f575-1f3ff","🖐️🏻":"1f590-1f3fb","🖐️🏼":"1f590-1f3fc","🖐️🏽":"1f590-1f3fd","🖐️🏾":"1f590-1f3fe","🖐️🏿":"1f590-1f3ff","🏳\200d🌈":"1f3f3-1f308","🏳️🌈":"1f3f3-1f308","👨\200d🦰":"1f468-1f9b0","👨\200d🦱":"1f468-1f9b1","👨\200d🦲":"1f468-1f9b2","👨\200d🦳":"1f468-1f9b3","👩\200d🦰":"1f469-1f9b0","👩\200d🦱":"1f469-1f9b1","👩\200d🦲":"1f469-1f9b2","👩\200d🦳":"1f469-1f9b3","👯\200d♂":"1f46f-2642","👯\200d♀":"1f46f-2640","🤼\200d♂":"1f93c-2642","🤼\200d♀":"1f93c-2640","🤹\200d♂":"1f939-2642","🤹\200d♀":"1f939-2640","🤾\200d♂":"1f93e-2642","🤾\200d♀":"1f93e-2640","🤽\200d♂":"1f93d-2642","🤽\200d♀":"1f93d-2640","🤸\200d♂":"1f938-2642","🤸\200d♀":"1f938-2640","🚶\200d♂":"1f6b6-2642","🚶\200d♀":"1f6b6-2640","🚵\200d♂":"1f6b5-2642","🚵\200d♀":"1f6b5-2640","🚴\200d♂":"1f6b4-2642","🚴\200d♀":"1f6b4-2640","🚣\200d♂":"1f6a3-2642","🚣\200d♀":"1f6a3-2640","🏊\200d♂":"1f3ca-2642","🏊\200d♀":"1f3ca-2640","🏄\200d♂":"1f3c4-2642","🏄\200d♀":"1f3c4-2640","🏃\200d♂":"1f3c3-2642","🏃\200d♀":"1f3c3-2640","🤷\200d♂":"1f937-2642","🤷\200d♀":"1f937-2640","🤦\200d♂":"1f926-2642","🤦\200d♀":"1f926-2640","🙎\200d♂":"1f64e-2642","🙎\200d♀":"1f64e-2640","🙍\200d♂":"1f64d-2642","🙍\200d♀":"1f64d-2640","🙋\200d♂":"1f64b-2642","🙋\200d♀":"1f64b-2640","🙇\200d♂":"1f647-2642","🙇\200d♀":"1f647-2640","🙆\200d♂":"1f646-2642","🙆\200d♀":"1f646-2640","🙅\200d♂":"1f645-2642","🙅\200d♀":"1f645-2640","💇\200d♂":"1f487-2642","💇\200d♀":"1f487-2640","💆\200d♂":"1f486-2642","💆\200d♀":"1f486-2640","💁\200d♂":"1f481-2642","💁\200d♀":"1f481-2640","👱\200d♂":"1f471-2642","👱\200d♀":"1f471-2640","👳\200d♂":"1f473-2642","👳\200d♀":"1f473-2640","💂\200d♂":"1f482-2642","💂\200d♀":"1f482-2640","👷\200d♂":"1f477-2642","👷\200d♀":"1f477-2640","👮\200d♂":"1f46e-2642","👮\200d♀":"1f46e-2640","👨\200d⚕":"1f468-2695","👩\200d⚕":"1f469-2695","👨\200d⚖":"1f468-2696","👩\200d⚖":"1f469-2696","👨\200d✈":"1f468-2708","👩\200d✈":"1f469-2708","☝️🏻":"261d-1f3fb","☝️🏼":"261d-1f3fc","☝️🏽":"261d-1f3fd","☝️🏾":"261d-1f3fe","☝️🏿":"261d-1f3ff","⛹️🏻":"26f9-1f3fb","⛹️🏼":"26f9-1f3fc","⛹️🏽":"26f9-1f3fd","⛹️🏾":"26f9-1f3fe","⛹️🏿":"26f9-1f3ff","✌️🏻":"270c-1f3fb","✌️🏼":"270c-1f3fc","✌️🏽":"270c-1f3fd","✌️🏾":"270c-1f3fe","✌️🏿":"270c-1f3ff","✍️🏻":"270d-1f3fb","✍️🏼":"270d-1f3fc","✍️🏽":"270d-1f3fd","✍️🏾":"270d-1f3fe","✍️🏿":"270d-1f3ff","👨⚕️":"1f468-2695","👨⚖️":"1f468-2696","👨✈️":"1f468-2708","👩⚕️":"1f469-2695","👩⚖️":"1f469-2696","👩✈️":"1f469-2708","👮♀️":"1f46e-2640","👮♂️":"1f46e-2642","👱♀️":"1f471-2640","👱♂️":"1f471-2642","👳♀️":"1f473-2640","👳♂️":"1f473-2642","👷♀️":"1f477-2640","👷♂️":"1f477-2642","💂♀️":"1f482-2640","💂♂️":"1f482-2642","🕵\200d♀":"1f575-2640","🕵\200d♂":"1f575-2642","🏃♀️":"1f3c3-2640","🏃♂️":"1f3c3-2642","🏄♀️":"1f3c4-2640","🏄♂️":"1f3c4-2642","🏊♀️":"1f3ca-2640","🏊♂️":"1f3ca-2642","🏋\200d♀":"1f3cb-2640","🏋\200d♂":"1f3cb-2642","🏌\200d♀":"1f3cc-2640","🏌\200d♂":"1f3cc-2642","👯♀️":"1f46f-2640","👯♂️":"1f46f-2642","💆♀️":"1f486-2640","💆♂️":"1f486-2642","💇♀️":"1f487-2640","💇♂️":"1f487-2642","🚣♀️":"1f6a3-2640","🚣♂️":"1f6a3-2642","🚴♀️":"1f6b4-2640","🚴♂️":"1f6b4-2642","🚵♀️":"1f6b5-2640","🚵♂️":"1f6b5-2642","🚶♀️":"1f6b6-2640","🚶♂️":"1f6b6-2642","🤸♀️":"1f938-2640","🤸♂️":"1f938-2642","🤹♀️":"1f939-2640","🤹♂️":"1f939-2642","🤼♀️":"1f93c-2640","🤼♂️":"1f93c-2642","🤽♀️":"1f93d-2640","🤽♂️":"1f93d-2642","🤾♀️":"1f93e-2640","🤾♂️":"1f93e-2642","💁♀️":"1f481-2640","💁♂️":"1f481-2642","🙅♀️":"1f645-2640","🙅♂️":"1f645-2642","🙆♀️":"1f646-2640","🙆♂️":"1f646-2642","🙇♀️":"1f647-2640","🙇♂️":"1f647-2642","🙋♀️":"1f64b-2640","🙋♂️":"1f64b-2642","🙍♀️":"1f64d-2640","🙍♂️":"1f64d-2642","🙎♀️":"1f64e-2640","🙎♂️":"1f64e-2642","🤦♀️":"1f926-2640","🤦♂️":"1f926-2642","🤷♀️":"1f937-2640","🤷♂️":"1f937-2642","🧙\200d♀":"1f9d9-2640","🧙♀️":"1f9d9-2640","🧙\200d♂":"1f9d9-2642","🧙♂️":"1f9d9-2642","🧚\200d♀":"1f9da-2640","🧚♀️":"1f9da-2640","🧚\200d♂":"1f9da-2642","🧚♂️":"1f9da-2642","🧛\200d♀":"1f9db-2640","🧛♀️":"1f9db-2640","🧛\200d♂":"1f9db-2642","🧛♂️":"1f9db-2642","🧜\200d♀":"1f9dc-2640","🧜♀️":"1f9dc-2640","🧜\200d♂":"1f9dc-2642","🧜♂️":"1f9dc-2642","🧝\200d♀":"1f9dd-2640","🧝♀️":"1f9dd-2640","🧝\200d♂":"1f9dd-2642","🧝♂️":"1f9dd-2642","🧞\200d♀":"1f9de-2640","🧞♀️":"1f9de-2640","🧞\200d♂":"1f9de-2642","🧞♂️":"1f9de-2642","🧟\200d♀":"1f9df-2640","🧟♀️":"1f9df-2640","🧟\200d♂":"1f9df-2642","🧟♂️":"1f9df-2642","🧖\200d♀":"1f9d6-2640","🧖♀️":"1f9d6-2640","🧖\200d♂":"1f9d6-2642","🧖♂️":"1f9d6-2642","🧗\200d♀":"1f9d7-2640","🧗♀️":"1f9d7-2640","🧗\200d♂":"1f9d7-2642","🧗♂️":"1f9d7-2642","🧘\200d♀":"1f9d8-2640","🧘♀️":"1f9d8-2640","🧘\200d♂":"1f9d8-2642","🧘♂️":"1f9d8-2642","🦸\200d♀":"1f9b8-2640","🦸♀️":"1f9b8-2640","🦸\200d♂":"1f9b8-2642","🦸♂️":"1f9b8-2642","🦹\200d♀":"1f9b9-2640","🦹♀️":"1f9b9-2640","🦹\200d♂":"1f9b9-2642","🦹♂️":"1f9b9-2642","🏴\200d☠":"1f3f4-2620","🏴☠️":"1f3f4-2620","#️⃣":"0023-20e3","0️⃣":"0030-20e3","1️⃣":"0031-20e3","2️⃣":"0032-20e3","3️⃣":"0033-20e3","4️⃣":"0034-20e3","5️⃣":"0035-20e3","6️⃣":"0036-20e3","7️⃣":"0037-20e3","8️⃣":"0038-20e3","9️⃣":"0039-20e3","*️⃣":"002a-20e3","⛹\200d♀":"26f9-2640","⛹\200d♂":"26f9-2642","🇨🇳":"1f1e8-1f1f3","🇩🇪":"1f1e9-1f1ea","🇪🇸":"1f1ea-1f1f8","🇫🇷":"1f1eb-1f1f7","🇬🇧":"1f1ec-1f1e7","🇮🇹":"1f1ee-1f1f9","🇯🇵":"1f1ef-1f1f5","🇰🇷":"1f1f0-1f1f7","🇺🇸":"1f1fa-1f1f8","🇷🇺":"1f1f7-1f1fa","🤴🏻":"1f934-1f3fb","🤴🏼":"1f934-1f3fc","🤴🏽":"1f934-1f3fd","🤴🏾":"1f934-1f3fe","🤴🏿":"1f934-1f3ff","🤶🏻":"1f936-1f3fb","🤶🏼":"1f936-1f3fc","🤶🏽":"1f936-1f3fd","🤶🏾":"1f936-1f3fe","🤶🏿":"1f936-1f3ff","🤵🏻":"1f935-1f3fb","🤵🏼":"1f935-1f3fc","🤵🏽":"1f935-1f3fd","🤵🏾":"1f935-1f3fe","🤵🏿":"1f935-1f3ff","🤷🏻":"1f937-1f3fb","🤷🏼":"1f937-1f3fc","🤷🏽":"1f937-1f3fd","🤷🏾":"1f937-1f3fe","🤷🏿":"1f937-1f3ff","🤦🏻":"1f926-1f3fb","🤦🏼":"1f926-1f3fc","🤦🏽":"1f926-1f3fd","🤦🏾":"1f926-1f3fe","🤦🏿":"1f926-1f3ff","🤰🏻":"1f930-1f3fb","🤰🏼":"1f930-1f3fc","🤰🏽":"1f930-1f3fd","🤰🏾":"1f930-1f3fe","🤰🏿":"1f930-1f3ff","🕺🏻":"1f57a-1f3fb","🕺🏼":"1f57a-1f3fc","🕺🏽":"1f57a-1f3fd","🕺🏾":"1f57a-1f3fe","🕺🏿":"1f57a-1f3ff","🤳🏻":"1f933-1f3fb","🤳🏼":"1f933-1f3fc","🤳🏽":"1f933-1f3fd","🤳🏾":"1f933-1f3fe","🤳🏿":"1f933-1f3ff","🤞🏻":"1f91e-1f3fb","🤞🏼":"1f91e-1f3fc","🤞🏽":"1f91e-1f3fd","🤞🏾":"1f91e-1f3fe","🤞🏿":"1f91e-1f3ff","🤙🏻":"1f919-1f3fb","🤙🏼":"1f919-1f3fc","🤙🏽":"1f919-1f3fd","🇦🇫":"1f1e6-1f1eb","🇦🇱":"1f1e6-1f1f1","🇩🇿":"1f1e9-1f1ff","🇦🇩":"1f1e6-1f1e9","🇦🇴":"1f1e6-1f1f4","🇦🇬":"1f1e6-1f1ec","🇦🇷":"1f1e6-1f1f7","🇦🇲":"1f1e6-1f1f2","🇦🇺":"1f1e6-1f1fa","🇦🇹":"1f1e6-1f1f9","🇦🇿":"1f1e6-1f1ff","🇧🇸":"1f1e7-1f1f8","🇧🇭":"1f1e7-1f1ed","🇧🇩":"1f1e7-1f1e9","🇧🇧":"1f1e7-1f1e7","🇧🇾":"1f1e7-1f1fe","🇧🇪":"1f1e7-1f1ea","🇧🇿":"1f1e7-1f1ff","🇧🇯":"1f1e7-1f1ef","🇧🇹":"1f1e7-1f1f9","🇧🇴":"1f1e7-1f1f4","🇧🇦":"1f1e7-1f1e6","🇧🇼":"1f1e7-1f1fc","🇧🇷":"1f1e7-1f1f7","🇧🇳":"1f1e7-1f1f3","🇧🇬":"1f1e7-1f1ec","🇧🇫":"1f1e7-1f1eb","🇧🇮":"1f1e7-1f1ee","🇰🇭":"1f1f0-1f1ed","🇨🇲":"1f1e8-1f1f2","🇨🇦":"1f1e8-1f1e6","🇨🇻":"1f1e8-1f1fb","🤙🏾":"1f919-1f3fe","🇨🇫":"1f1e8-1f1eb","🇹🇩":"1f1f9-1f1e9","🇨🇱":"1f1e8-1f1f1","🇨🇴":"1f1e8-1f1f4","🇰🇲":"1f1f0-1f1f2","🇨🇷":"1f1e8-1f1f7","🇨🇮":"1f1e8-1f1ee","🇭🇷":"1f1ed-1f1f7","🇨🇺":"1f1e8-1f1fa","🇨🇾":"1f1e8-1f1fe","🇨🇿":"1f1e8-1f1ff","🤙🏿":"1f919-1f3ff","🇨🇩":"1f1e8-1f1e9","🤛🏻":"1f91b-1f3fb","🇩🇰":"1f1e9-1f1f0","🇩🇯":"1f1e9-1f1ef","🇩🇲":"1f1e9-1f1f2","🇩🇴":"1f1e9-1f1f4","🇹🇱":"1f1f9-1f1f1","🇪🇨":"1f1ea-1f1e8","🇪🇬":"1f1ea-1f1ec","🇸🇻":"1f1f8-1f1fb","🇬🇶":"1f1ec-1f1f6","🇪🇷":"1f1ea-1f1f7","🇪🇪":"1f1ea-1f1ea","🇪🇹":"1f1ea-1f1f9","🤛🏼":"1f91b-1f3fc","🇫🇯":"1f1eb-1f1ef","🇫🇮":"1f1eb-1f1ee","🇬🇦":"1f1ec-1f1e6","🇬🇲":"1f1ec-1f1f2","🇬🇪":"1f1ec-1f1ea","🇬🇭":"1f1ec-1f1ed","🇬🇷":"1f1ec-1f1f7","🇬🇩":"1f1ec-1f1e9","🇬🇹":"1f1ec-1f1f9","🇬🇳":"1f1ec-1f1f3","🇬🇼":"1f1ec-1f1fc","🇬🇾":"1f1ec-1f1fe","🇭🇹":"1f1ed-1f1f9","🇭🇳":"1f1ed-1f1f3","🇭🇺":"1f1ed-1f1fa","🇮🇸":"1f1ee-1f1f8","🇮🇳":"1f1ee-1f1f3","🇮🇩":"1f1ee-1f1e9","🇮🇷":"1f1ee-1f1f7","🇮🇶":"1f1ee-1f1f6","🇮🇪":"1f1ee-1f1ea","🇮🇱":"1f1ee-1f1f1","🇯🇲":"1f1ef-1f1f2","🇯🇴":"1f1ef-1f1f4","🇰🇿":"1f1f0-1f1ff","🇰🇪":"1f1f0-1f1ea","🇰🇮":"1f1f0-1f1ee","🇽🇰":"1f1fd-1f1f0","🇰🇼":"1f1f0-1f1fc","🇰🇬":"1f1f0-1f1ec","🤛🏽":"1f91b-1f3fd","🇱🇦":"1f1f1-1f1e6","🇱🇻":"1f1f1-1f1fb","🇱🇧":"1f1f1-1f1e7","🇱🇸":"1f1f1-1f1f8","🇱🇷":"1f1f1-1f1f7","🇱🇾":"1f1f1-1f1fe","🇱🇮":"1f1f1-1f1ee","🇱🇹":"1f1f1-1f1f9","🇱🇺":"1f1f1-1f1fa","🇲🇰":"1f1f2-1f1f0","🇲🇬":"1f1f2-1f1ec","🇲🇼":"1f1f2-1f1fc","🇲🇾":"1f1f2-1f1fe","🇲🇻":"1f1f2-1f1fb","🇲🇱":"1f1f2-1f1f1","🇲🇹":"1f1f2-1f1f9","🇲🇭":"1f1f2-1f1ed","🇲🇷":"1f1f2-1f1f7","🇲🇺":"1f1f2-1f1fa","🇲🇽":"1f1f2-1f1fd","🇫🇲":"1f1eb-1f1f2","🇲🇩":"1f1f2-1f1e9","🇲🇨":"1f1f2-1f1e8","🇲🇳":"1f1f2-1f1f3","🇲🇪":"1f1f2-1f1ea","🇲🇦":"1f1f2-1f1e6","🇲🇿":"1f1f2-1f1ff","🇲🇲":"1f1f2-1f1f2","🇳🇦":"1f1f3-1f1e6","🇳🇷":"1f1f3-1f1f7","🇳🇵":"1f1f3-1f1f5","🇳🇱":"1f1f3-1f1f1","🇳🇿":"1f1f3-1f1ff","🇳🇮":"1f1f3-1f1ee","🇳🇪":"1f1f3-1f1ea","🇳🇬":"1f1f3-1f1ec","🇰🇵":"1f1f0-1f1f5","🇳🇴":"1f1f3-1f1f4","🇴🇲":"1f1f4-1f1f2","🇵🇰":"1f1f5-1f1f0","🇵🇼":"1f1f5-1f1fc","🇵🇦":"1f1f5-1f1e6","🇵🇬":"1f1f5-1f1ec","🤛🏾":"1f91b-1f3fe","🇵🇾":"1f1f5-1f1fe","🇵🇪":"1f1f5-1f1ea","🇵🇭":"1f1f5-1f1ed","🇵🇱":"1f1f5-1f1f1","🇵🇹":"1f1f5-1f1f9","🇶🇦":"1f1f6-1f1e6","🇹🇼":"1f1f9-1f1fc","🇨🇬":"1f1e8-1f1ec","🇷🇴":"1f1f7-1f1f4","🇷🇼":"1f1f7-1f1fc","🇰🇳":"1f1f0-1f1f3","🇱🇨":"1f1f1-1f1e8","🇻🇨":"1f1fb-1f1e8","🇼🇸":"1f1fc-1f1f8","🇸🇲":"1f1f8-1f1f2","🇸🇹":"1f1f8-1f1f9","🇸🇦":"1f1f8-1f1e6","🤛🏿":"1f91b-1f3ff","🇸🇳":"1f1f8-1f1f3","🇷🇸":"1f1f7-1f1f8","🇸🇨":"1f1f8-1f1e8","🇸🇱":"1f1f8-1f1f1","🇸🇬":"1f1f8-1f1ec","🇸🇰":"1f1f8-1f1f0","🇸🇮":"1f1f8-1f1ee","🇸🇧":"1f1f8-1f1e7","🇸🇴":"1f1f8-1f1f4","🇿🇦":"1f1ff-1f1e6","🇱🇰":"1f1f1-1f1f0","🇸🇩":"1f1f8-1f1e9","🇸🇷":"1f1f8-1f1f7","🇸🇿":"1f1f8-1f1ff","🇸🇪":"1f1f8-1f1ea","🇨🇭":"1f1e8-1f1ed","🇸🇾":"1f1f8-1f1fe","🇹🇯":"1f1f9-1f1ef","🇹🇿":"1f1f9-1f1ff","🇹🇭":"1f1f9-1f1ed","🇹🇬":"1f1f9-1f1ec","🇹🇴":"1f1f9-1f1f4","🇹🇹":"1f1f9-1f1f9","🇹🇳":"1f1f9-1f1f3","🇹🇷":"1f1f9-1f1f7","🇹🇲":"1f1f9-1f1f2","🇹🇻":"1f1f9-1f1fb","🇺🇬":"1f1fa-1f1ec","🇺🇦":"1f1fa-1f1e6","🇦🇪":"1f1e6-1f1ea","🇺🇾":"1f1fa-1f1fe","🇺🇿":"1f1fa-1f1ff","🇻🇺":"1f1fb-1f1fa","🇻🇦":"1f1fb-1f1e6","🇻🇪":"1f1fb-1f1ea","🇻🇳":"1f1fb-1f1f3","🇪🇭":"1f1ea-1f1ed","🤜🏻":"1f91c-1f3fb","🇾🇪":"1f1fe-1f1ea","🇿🇲":"1f1ff-1f1f2","🇿🇼":"1f1ff-1f1fc","🇵🇷":"1f1f5-1f1f7","🇰🇾":"1f1f0-1f1fe","🇧🇲":"1f1e7-1f1f2","🇵🇫":"1f1f5-1f1eb","🇵🇸":"1f1f5-1f1f8","🇳🇨":"1f1f3-1f1e8","🤜🏼":"1f91c-1f3fc","🇸🇭":"1f1f8-1f1ed","🇦🇼":"1f1e6-1f1fc","🇻🇮":"1f1fb-1f1ee","🇭🇰":"1f1ed-1f1f0","🇦🇨":"1f1e6-1f1e8","🇲🇸":"1f1f2-1f1f8","🇬🇺":"1f1ec-1f1fa","🇬🇱":"1f1ec-1f1f1","🇳🇺":"1f1f3-1f1fa","🇼🇫":"1f1fc-1f1eb","🇲🇴":"1f1f2-1f1f4","🤜🏽":"1f91c-1f3fd","🇫🇴":"1f1eb-1f1f4","🇫🇰":"1f1eb-1f1f0","🇯🇪":"1f1ef-1f1ea","🇦🇮":"1f1e6-1f1ee","🇬🇮":"1f1ec-1f1ee","🤜🏾":"1f91c-1f3fe","🤜🏿":"1f91c-1f3ff","🤚🏻":"1f91a-1f3fb","🤚🏼":"1f91a-1f3fc","🤚🏽":"1f91a-1f3fd","🤚🏾":"1f91a-1f3fe","👶🏻":"1f476-1f3fb","👶🏼":"1f476-1f3fc","👶🏽":"1f476-1f3fd","👶🏾":"1f476-1f3fe","👶🏿":"1f476-1f3ff","👦🏻":"1f466-1f3fb","👦🏼":"1f466-1f3fc","👦🏽":"1f466-1f3fd","👦🏾":"1f466-1f3fe","👦🏿":"1f466-1f3ff","👧🏻":"1f467-1f3fb","👧🏼":"1f467-1f3fc","👧🏽":"1f467-1f3fd","👧🏾":"1f467-1f3fe","👧🏿":"1f467-1f3ff","👨🏻":"1f468-1f3fb","👨🏼":"1f468-1f3fc","👨🏽":"1f468-1f3fd","👨🏾":"1f468-1f3fe","👨🏿":"1f468-1f3ff","👩🏻":"1f469-1f3fb","👩🏼":"1f469-1f3fc","👩🏽":"1f469-1f3fd","👩🏾":"1f469-1f3fe","👩🏿":"1f469-1f3ff","👰🏻":"1f470-1f3fb","👰🏼":"1f470-1f3fc","🤚🏿":"1f91a-1f3ff","👰🏽":"1f470-1f3fd","👰🏾":"1f470-1f3fe","👰🏿":"1f470-1f3ff","👱🏻":"1f471-1f3fb","👱🏼":"1f471-1f3fc","👱🏽":"1f471-1f3fd","👱🏾":"1f471-1f3fe","👱🏿":"1f471-1f3ff","👲🏻":"1f472-1f3fb","👲🏼":"1f472-1f3fc","👲🏽":"1f472-1f3fd","👲🏾":"1f472-1f3fe","👲🏿":"1f472-1f3ff","👳🏻":"1f473-1f3fb","👳🏼":"1f473-1f3fc","👳🏽":"1f473-1f3fd","👳🏾":"1f473-1f3fe","👳🏿":"1f473-1f3ff","👴🏻":"1f474-1f3fb","👴🏼":"1f474-1f3fc","👴🏽":"1f474-1f3fd","👴🏾":"1f474-1f3fe","👴🏿":"1f474-1f3ff","👵🏻":"1f475-1f3fb","👵🏼":"1f475-1f3fc","👵🏽":"1f475-1f3fd","👵🏾":"1f475-1f3fe","👵🏿":"1f475-1f3ff","👮🏻":"1f46e-1f3fb","👮🏼":"1f46e-1f3fc","👮🏽":"1f46e-1f3fd","👮🏾":"1f46e-1f3fe","👮🏿":"1f46e-1f3ff","👷🏻":"1f477-1f3fb","👷🏼":"1f477-1f3fc","👷🏽":"1f477-1f3fd","👷🏾":"1f477-1f3fe","👷🏿":"1f477-1f3ff","👸🏻":"1f478-1f3fb","👸🏼":"1f478-1f3fc","👸🏽":"1f478-1f3fd","👸🏾":"1f478-1f3fe","🤸🏻":"1f938-1f3fb","👸🏿":"1f478-1f3ff","💂🏻":"1f482-1f3fb","💂🏼":"1f482-1f3fc","🤸🏼":"1f938-1f3fc","💂🏽":"1f482-1f3fd","💂🏾":"1f482-1f3fe","💂🏿":"1f482-1f3ff","🤸🏽":"1f938-1f3fd","👼🏻":"1f47c-1f3fb","👼🏼":"1f47c-1f3fc","👼🏽":"1f47c-1f3fd","👼🏾":"1f47c-1f3fe","👼🏿":"1f47c-1f3ff","🙇🏻":"1f647-1f3fb","🙇🏼":"1f647-1f3fc","🙇🏽":"1f647-1f3fd","🙇🏾":"1f647-1f3fe","🙇🏿":"1f647-1f3ff","💁🏻":"1f481-1f3fb","💁🏼":"1f481-1f3fc","💁🏽":"1f481-1f3fd","🤸🏾":"1f938-1f3fe","💁🏾":"1f481-1f3fe","💁🏿":"1f481-1f3ff","🙅🏻":"1f645-1f3fb","🤸🏿":"1f938-1f3ff","🙅🏼":"1f645-1f3fc","🙅🏽":"1f645-1f3fd","🙅🏾":"1f645-1f3fe","🙅🏿":"1f645-1f3ff","🙆🏻":"1f646-1f3fb","🙆🏼":"1f646-1f3fc","🙆🏽":"1f646-1f3fd","🙆🏾":"1f646-1f3fe","🙆🏿":"1f646-1f3ff","🙋🏻":"1f64b-1f3fb","🙋🏼":"1f64b-1f3fc","🙋🏽":"1f64b-1f3fd","🙋🏾":"1f64b-1f3fe","🙋🏿":"1f64b-1f3ff","🙎🏻":"1f64e-1f3fb","🙎🏼":"1f64e-1f3fc","🙎🏽":"1f64e-1f3fd","🙎🏾":"1f64e-1f3fe","🙎🏿":"1f64e-1f3ff","🙍🏻":"1f64d-1f3fb","🙍🏼":"1f64d-1f3fc","🙍🏽":"1f64d-1f3fd","🙍🏾":"1f64d-1f3fe","🙍🏿":"1f64d-1f3ff","💆🏻":"1f486-1f3fb","💆🏼":"1f486-1f3fc","💆🏽":"1f486-1f3fd","💆🏾":"1f486-1f3fe","💆🏿":"1f486-1f3ff","💇🏻":"1f487-1f3fb","💇🏼":"1f487-1f3fc","💇🏽":"1f487-1f3fd","💇🏾":"1f487-1f3fe","💇🏿":"1f487-1f3ff","🙌🏻":"1f64c-1f3fb","🙌🏼":"1f64c-1f3fc","🙌🏽":"1f64c-1f3fd","🙌🏾":"1f64c-1f3fe","🙌🏿":"1f64c-1f3ff","👏🏻":"1f44f-1f3fb","👏🏼":"1f44f-1f3fc","👏🏽":"1f44f-1f3fd","🤽🏻":"1f93d-1f3fb","👏🏾":"1f44f-1f3fe","👏🏿":"1f44f-1f3ff","🤽🏼":"1f93d-1f3fc","👂🏻":"1f442-1f3fb","👂🏼":"1f442-1f3fc","👂🏽":"1f442-1f3fd","👂🏾":"1f442-1f3fe","👂🏿":"1f442-1f3ff","👃🏻":"1f443-1f3fb","👃🏼":"1f443-1f3fc","👃🏽":"1f443-1f3fd","👃🏾":"1f443-1f3fe","👃🏿":"1f443-1f3ff","💅🏻":"1f485-1f3fb","💅🏼":"1f485-1f3fc","💅🏽":"1f485-1f3fd","💅🏾":"1f485-1f3fe","💅🏿":"1f485-1f3ff","👋🏻":"1f44b-1f3fb","👋🏼":"1f44b-1f3fc","👋🏽":"1f44b-1f3fd","👋🏾":"1f44b-1f3fe","👋🏿":"1f44b-1f3ff","👍🏻":"1f44d-1f3fb","👍🏼":"1f44d-1f3fc","👍🏽":"1f44d-1f3fd","👍🏾":"1f44d-1f3fe","👍🏿":"1f44d-1f3ff","👎🏻":"1f44e-1f3fb","👎🏼":"1f44e-1f3fc","👎🏽":"1f44e-1f3fd","👎🏾":"1f44e-1f3fe","👎🏿":"1f44e-1f3ff","👆🏻":"1f446-1f3fb","👆🏼":"1f446-1f3fc","👆🏽":"1f446-1f3fd","👆🏾":"1f446-1f3fe","👆🏿":"1f446-1f3ff","👇🏻":"1f447-1f3fb","👇🏼":"1f447-1f3fc","👇🏽":"1f447-1f3fd","👇🏾":"1f447-1f3fe","👇🏿":"1f447-1f3ff","👈🏻":"1f448-1f3fb","👈🏼":"1f448-1f3fc","👈🏽":"1f448-1f3fd","👈🏾":"1f448-1f3fe","👈🏿":"1f448-1f3ff","👉🏻":"1f449-1f3fb","👉🏼":"1f449-1f3fc","👉🏽":"1f449-1f3fd","👉🏾":"1f449-1f3fe","👉🏿":"1f449-1f3ff","👌🏻":"1f44c-1f3fb","👌🏼":"1f44c-1f3fc","🤽🏽":"1f93d-1f3fd","👌🏽":"1f44c-1f3fd","👌🏾":"1f44c-1f3fe","🤽🏾":"1f93d-1f3fe","👌🏿":"1f44c-1f3ff","👊🏻":"1f44a-1f3fb","👊🏼":"1f44a-1f3fc","👊🏽":"1f44a-1f3fd","👊🏾":"1f44a-1f3fe","👊🏿":"1f44a-1f3ff","💪🏻":"1f4aa-1f3fb","💪🏼":"1f4aa-1f3fc","💪🏽":"1f4aa-1f3fd","💪🏾":"1f4aa-1f3fe","💪🏿":"1f4aa-1f3ff","👐🏻":"1f450-1f3fb","👐🏼":"1f450-1f3fc","👐🏽":"1f450-1f3fd","👐🏾":"1f450-1f3fe","👐🏿":"1f450-1f3ff","🙏🏻":"1f64f-1f3fb","🤽🏿":"1f93d-1f3ff","🙏🏼":"1f64f-1f3fc","🙏🏽":"1f64f-1f3fd","🤾🏻":"1f93e-1f3fb","🙏🏾":"1f64f-1f3fe","🙏🏿":"1f64f-1f3ff","🤾🏼":"1f93e-1f3fc","🏃🏻":"1f3c3-1f3fb","🏃🏼":"1f3c3-1f3fc","🏃🏽":"1f3c3-1f3fd","🏃🏾":"1f3c3-1f3fe","🤾🏽":"1f93e-1f3fd","🏃🏿":"1f3c3-1f3ff","🚶🏻":"1f6b6-1f3fb","🚶🏼":"1f6b6-1f3fc","🚶🏽":"1f6b6-1f3fd","🚶🏾":"1f6b6-1f3fe","🚶🏿":"1f6b6-1f3ff","💃🏻":"1f483-1f3fb","🤾🏾":"1f93e-1f3fe","💃🏼":"1f483-1f3fc","💃🏽":"1f483-1f3fd","🤾🏿":"1f93e-1f3ff","💃🏾":"1f483-1f3fe","💃🏿":"1f483-1f3ff","🤹🏻":"1f939-1f3fb","🚣🏻":"1f6a3-1f3fb","🚣🏼":"1f6a3-1f3fc","🚣🏽":"1f6a3-1f3fd","🚣🏾":"1f6a3-1f3fe","🚣🏿":"1f6a3-1f3ff","🏊🏻":"1f3ca-1f3fb","🏊🏼":"1f3ca-1f3fc","🤹🏼":"1f939-1f3fc","🏊🏽":"1f3ca-1f3fd","🏊🏾":"1f3ca-1f3fe","🏊🏿":"1f3ca-1f3ff","🤹🏽":"1f939-1f3fd","🏄🏻":"1f3c4-1f3fb","🏄🏼":"1f3c4-1f3fc","🏄🏽":"1f3c4-1f3fd","🏄🏾":"1f3c4-1f3fe","🏄🏿":"1f3c4-1f3ff","🛀🏻":"1f6c0-1f3fb","🛀🏼":"1f6c0-1f3fc","🤹🏾":"1f939-1f3fe","🛀🏽":"1f6c0-1f3fd","🛀🏾":"1f6c0-1f3fe","🛀🏿":"1f6c0-1f3ff","🤹🏿":"1f939-1f3ff","🚴🏻":"1f6b4-1f3fb","🚴🏼":"1f6b4-1f3fc","🚴🏽":"1f6b4-1f3fd","🚴🏾":"1f6b4-1f3fe","🚴🏿":"1f6b4-1f3ff","🚵🏻":"1f6b5-1f3fb","🚵🏼":"1f6b5-1f3fc","🚵🏽":"1f6b5-1f3fd","🚵🏾":"1f6b5-1f3fe","🚵🏿":"1f6b5-1f3ff","🏇🏻":"1f3c7-1f3fb","🏇🏼":"1f3c7-1f3fc","🏇🏽":"1f3c7-1f3fd","🏇🏾":"1f3c7-1f3fe","🏇🏿":"1f3c7-1f3ff","🖐🏻":"1f590-1f3fb","🖐🏼":"1f590-1f3fc","🖐🏽":"1f590-1f3fd","🖐🏾":"1f590-1f3fe","🖐🏿":"1f590-1f3ff","🖕🏻":"1f595-1f3fb","🖕🏼":"1f595-1f3fc","🖕🏽":"1f595-1f3fd","🖕🏾":"1f595-1f3fe","🖕🏿":"1f595-1f3ff","🖖🏻":"1f596-1f3fb","🖖🏼":"1f596-1f3fc","🖖🏽":"1f596-1f3fd","🖖🏾":"1f596-1f3fe","🖖🏿":"1f596-1f3ff","🎅🏻":"1f385-1f3fb","🎅🏼":"1f385-1f3fc","🎅🏽":"1f385-1f3fd","🎅🏾":"1f385-1f3fe","🎅🏿":"1f385-1f3ff","🤘🏻":"1f918-1f3fb","🤘🏼":"1f918-1f3fc","🤘🏽":"1f918-1f3fd","🤘🏾":"1f918-1f3fe","🤘🏿":"1f918-1f3ff","🏋🏻":"1f3cb-1f3fb","🏋🏼":"1f3cb-1f3fc","🏋🏽":"1f3cb-1f3fd","🏋🏾":"1f3cb-1f3fe","🏋🏿":"1f3cb-1f3ff","🇦🇽":"1f1e6-1f1fd","🇹🇦":"1f1f9-1f1e6","🇮🇴":"1f1ee-1f1f4","🇧🇶":"1f1e7-1f1f6","🇨🇽":"1f1e8-1f1fd","🇨🇨":"1f1e8-1f1e8","🇬🇬":"1f1ec-1f1ec","🇮🇲":"1f1ee-1f1f2","🇾🇹":"1f1fe-1f1f9","🇳🇫":"1f1f3-1f1eb","🇵🇳":"1f1f5-1f1f3","🇧🇱":"1f1e7-1f1f1","🇵🇲":"1f1f5-1f1f2","🇬🇸":"1f1ec-1f1f8","🇹🇰":"1f1f9-1f1f0","🇧🇻":"1f1e7-1f1fb","🇭🇲":"1f1ed-1f1f2","🇸🇯":"1f1f8-1f1ef","🇺🇲":"1f1fa-1f1f2","🇮🇨":"1f1ee-1f1e8","🇪🇦":"1f1ea-1f1e6","🇨🇵":"1f1e8-1f1f5","🇩🇬":"1f1e9-1f1ec","🇦🇸":"1f1e6-1f1f8","🇦🇶":"1f1e6-1f1f6","🇻🇬":"1f1fb-1f1ec","🇨🇰":"1f1e8-1f1f0","🇨🇼":"1f1e8-1f1fc","🇪🇺":"1f1ea-1f1fa","🇬🇫":"1f1ec-1f1eb","🇹🇫":"1f1f9-1f1eb","🇬🇵":"1f1ec-1f1f5","🇲🇶":"1f1f2-1f1f6","🇲🇵":"1f1f2-1f1f5","🇷🇪":"1f1f7-1f1ea","🇸🇽":"1f1f8-1f1fd","🇸🇸":"1f1f8-1f1f8","🇹🇨":"1f1f9-1f1e8","🇲🇫":"1f1f2-1f1eb","🕵🏻":"1f575-1f3fb","🕵🏼":"1f575-1f3fc","🕵🏽":"1f575-1f3fd","🕵🏾":"1f575-1f3fe","🕵🏿":"1f575-1f3ff","🏂🏻":"1f3c2-1f3fb","👨💻":"1f468-1f4bb","👩💻":"1f469-1f4bb","👨🏫":"1f468-1f3eb","👩🏫":"1f469-1f3eb","👨🎓":"1f468-1f393","👩🎓":"1f469-1f393","👨🎤":"1f468-1f3a4","👩🎤":"1f469-1f3a4","👨🔬":"1f468-1f52c","👩🔬":"1f469-1f52c","👨💼":"1f468-1f4bc","👩💼":"1f469-1f4bc","👨🔧":"1f468-1f527","👩🔧":"1f469-1f527","👨🏭":"1f468-1f3ed","👩🏭":"1f469-1f3ed","👨🍳":"1f468-1f373","👩🍳":"1f469-1f373","👨🌾":"1f468-1f33e","👩🌾":"1f469-1f33e","🕴🏻":"1f574-1f3fb","🕴🏼":"1f574-1f3fc","🕴🏽":"1f574-1f3fd","🕴🏾":"1f574-1f3fe","🕴🏿":"1f574-1f3ff","🛌🏻":"1f6cc-1f3fb","🛌🏼":"1f6cc-1f3fc","🛌🏽":"1f6cc-1f3fd","🛌🏾":"1f6cc-1f3fe","🛌🏿":"1f6cc-1f3ff","👨👦":"1f468-1f466","👨👧":"1f468-1f467","👩👦":"1f469-1f466","👩👧":"1f469-1f467","👨🎨":"1f468-1f3a8","👩🎨":"1f469-1f3a8","👨🚀":"1f468-1f680","👩🚀":"1f469-1f680","👨🚒":"1f468-1f692","👩🚒":"1f469-1f692","🇺🇳":"1f1fa-1f1f3","🏂🏼":"1f3c2-1f3fc","🏂🏽":"1f3c2-1f3fd","🏂🏾":"1f3c2-1f3fe","🏂🏿":"1f3c2-1f3ff","🏌🏻":"1f3cc-1f3fb","🏌🏼":"1f3cc-1f3fc","🏌🏽":"1f3cc-1f3fd","🏌🏾":"1f3cc-1f3fe","🏌🏿":"1f3cc-1f3ff","🤟🏻":"1f91f-1f3fb","🤟🏼":"1f91f-1f3fc","🤟🏽":"1f91f-1f3fd","🤟🏾":"1f91f-1f3fe","🤟🏿":"1f91f-1f3ff","🤱🏻":"1f931-1f3fb","🤱🏼":"1f931-1f3fc","🤱🏽":"1f931-1f3fd","🤱🏾":"1f931-1f3fe","🤱🏿":"1f931-1f3ff","🤲🏻":"1f932-1f3fb","🤲🏼":"1f932-1f3fc","🤲🏽":"1f932-1f3fd","🤲🏾":"1f932-1f3fe","🤲🏿":"1f932-1f3ff","🧑🏻":"1f9d1-1f3fb","🧑🏼":"1f9d1-1f3fc","🧑🏽":"1f9d1-1f3fd","🧑🏾":"1f9d1-1f3fe","🧑🏿":"1f9d1-1f3ff","🧒🏻":"1f9d2-1f3fb","🧒🏼":"1f9d2-1f3fc","🧒🏽":"1f9d2-1f3fd","🧒🏾":"1f9d2-1f3fe","🧒🏿":"1f9d2-1f3ff","🧓🏻":"1f9d3-1f3fb","🧓🏼":"1f9d3-1f3fc","🧓🏽":"1f9d3-1f3fd","🧓🏾":"1f9d3-1f3fe","🧓🏿":"1f9d3-1f3ff","🧔🏻":"1f9d4-1f3fb","🧔🏼":"1f9d4-1f3fc","🧔🏽":"1f9d4-1f3fd","🧔🏾":"1f9d4-1f3fe","🧔🏿":"1f9d4-1f3ff","🧕🏻":"1f9d5-1f3fb","🧕🏼":"1f9d5-1f3fc","🧕🏽":"1f9d5-1f3fd","🧕🏾":"1f9d5-1f3fe","🧕🏿":"1f9d5-1f3ff","🧖🏻":"1f9d6-1f3fb","🧖🏼":"1f9d6-1f3fc","🧖🏽":"1f9d6-1f3fd","🧖🏾":"1f9d6-1f3fe","🧖🏿":"1f9d6-1f3ff","🧗🏻":"1f9d7-1f3fb","🧗🏼":"1f9d7-1f3fc","🧗🏽":"1f9d7-1f3fd","🧗🏾":"1f9d7-1f3fe","🧗🏿":"1f9d7-1f3ff","🧘🏻":"1f9d8-1f3fb","🧘🏼":"1f9d8-1f3fc","🧘🏽":"1f9d8-1f3fd","🧘🏾":"1f9d8-1f3fe","🧘🏿":"1f9d8-1f3ff","🧙🏻":"1f9d9-1f3fb","🧙🏼":"1f9d9-1f3fc","🧙🏽":"1f9d9-1f3fd","🧙🏾":"1f9d9-1f3fe","🧙🏿":"1f9d9-1f3ff","🧚🏻":"1f9da-1f3fb","🧚🏼":"1f9da-1f3fc","🧚🏽":"1f9da-1f3fd","🧚🏾":"1f9da-1f3fe","🧚🏿":"1f9da-1f3ff","🧛🏻":"1f9db-1f3fb","🧛🏼":"1f9db-1f3fc","🧛🏽":"1f9db-1f3fd","🧛🏾":"1f9db-1f3fe","🧛🏿":"1f9db-1f3ff","🧜🏻":"1f9dc-1f3fb","🧜🏼":"1f9dc-1f3fc","🧜🏽":"1f9dc-1f3fd","🧜🏾":"1f9dc-1f3fe","🧜🏿":"1f9dc-1f3ff","🧝🏻":"1f9dd-1f3fb","🧝🏼":"1f9dd-1f3fc","🧝🏽":"1f9dd-1f3fd","🧝🏾":"1f9dd-1f3fe","🧝🏿":"1f9dd-1f3ff","🦵🏻":"1f9b5-1f3fb","🦵🏼":"1f9b5-1f3fc","🦵🏽":"1f9b5-1f3fd","🦵🏾":"1f9b5-1f3fe","🦵🏿":"1f9b5-1f3ff","🦶🏻":"1f9b6-1f3fb","🦶🏼":"1f9b6-1f3fc","🦶🏽":"1f9b6-1f3fd","🦶🏾":"1f9b6-1f3fe","🦶🏿":"1f9b6-1f3ff","🦸🏻":"1f9b8-1f3fb","🦸🏼":"1f9b8-1f3fc","🦸🏽":"1f9b8-1f3fd","🦸🏾":"1f9b8-1f3fe","🦸🏿":"1f9b8-1f3ff","🦹🏻":"1f9b9-1f3fb","🦹🏼":"1f9b9-1f3fc","🦹🏽":"1f9b9-1f3fd","🦹🏾":"1f9b9-1f3fe","🦹🏿":"1f9b9-1f3ff","👨🦰":"1f468-1f9b0","👨🦱":"1f468-1f9b1","👨🦲":"1f468-1f9b2","👨🦳":"1f468-1f9b3","👩🦰":"1f469-1f9b0","👩🦱":"1f469-1f9b1","👩🦲":"1f469-1f9b2","👩🦳":"1f469-1f9b3","🅿️":"1f17f","🈂️":"1f202","🈷️":"1f237","🎞️":"1f39e","🎟️":"1f39f","🏋️":"1f3cb","🏌️":"1f3cc","🏍️":"1f3cd","🏎️":"1f3ce","🎖️":"1f396","🎗️":"1f397","🌶️":"1f336","🌧️":"1f327","🌨️":"1f328","🌩️":"1f329","🌪️":"1f32a","🌫️":"1f32b","🌬️":"1f32c","🐿️":"1f43f","🕷️":"1f577","🕸️":"1f578","🌡️":"1f321","🎙️":"1f399","🎚️":"1f39a","🎛️":"1f39b","🏳️":"1f3f3","🏵️":"1f3f5","🏷️":"1f3f7","📽️":"1f4fd","🕉️":"1f549","🕊️":"1f54a","🕯️":"1f56f","🕰️":"1f570","🕳️":"1f573","🕶️":"1f576","🕹️":"1f579","🖇️":"1f587","🖊️":"1f58a","🖋️":"1f58b","🖌️":"1f58c","🖍️":"1f58d","🖥️":"1f5a5","🖨️":"1f5a8","🖲️":"1f5b2","🖼️":"1f5bc","🗂️":"1f5c2","🗃️":"1f5c3","🗄️":"1f5c4","🗑️":"1f5d1","🗒️":"1f5d2","🗓️":"1f5d3","🗜️":"1f5dc","🗝️":"1f5dd","🗞️":"1f5de","🗡️":"1f5e1","🗣️":"1f5e3","🗨️":"1f5e8","🗯️":"1f5ef","🗳️":"1f5f3","🗺️":"1f5fa","🛠️":"1f6e0","🛡️":"1f6e1","🛢️":"1f6e2","🛰️":"1f6f0","🍽️":"1f37d","👁️":"1f441","🕴️":"1f574","🕵️":"1f575","🖐️":"1f590","🏔️":"1f3d4","🏕️":"1f3d5","🏖️":"1f3d6","🏗️":"1f3d7","🏘️":"1f3d8","🏙️":"1f3d9","🏚️":"1f3da","🏛️":"1f3db","🏜️":"1f3dc","🏝️":"1f3dd","🏞️":"1f3de","🏟️":"1f3df","🛋️":"1f6cb","🛍️":"1f6cd","🛎️":"1f6ce","🛏️":"1f6cf","🛣️":"1f6e3","🛤️":"1f6e4","🛥️":"1f6e5","🛩️":"1f6e9","🛳️":"1f6f3","☝🏻":"261d-1f3fb","☝🏼":"261d-1f3fc","☝🏽":"261d-1f3fd","☝🏾":"261d-1f3fe","☝🏿":"261d-1f3ff","✌🏻":"270c-1f3fb","✌🏼":"270c-1f3fc","✌🏽":"270c-1f3fd","✌🏾":"270c-1f3fe","✌🏿":"270c-1f3ff","✊🏻":"270a-1f3fb","✊🏼":"270a-1f3fc","✊🏽":"270a-1f3fd","✊🏾":"270a-1f3fe","✊🏿":"270a-1f3ff","✋🏻":"270b-1f3fb","✋🏼":"270b-1f3fc","✋🏽":"270b-1f3fd","✋🏾":"270b-1f3fe","✋🏿":"270b-1f3ff","✍🏻":"270d-1f3fb","✍🏼":"270d-1f3fc","✍🏽":"270d-1f3fd","✍🏾":"270d-1f3fe","✍🏿":"270d-1f3ff","🌤️":"1f324","🌥️":"1f325","🌦️":"1f326","🖱️":"1f5b1","⛹🏻":"26f9-1f3fb","⛹🏼":"26f9-1f3fc","⛹🏽":"26f9-1f3fd","⛹🏾":"26f9-1f3fe","⛹🏿":"26f9-1f3ff","🅰️":"1f170","🅱️":"1f171","🅾️":"1f17e","🀄️":"1f004","🈚️":"1f21a","🈯️":"1f22f","🌍️":"1f30d","🌎️":"1f30e","🌏️":"1f30f","🌕️":"1f315","🌜️":"1f31c","🍸️":"1f378","🎓️":"1f393","🎧️":"1f3a7","🎬️":"1f3ac","🎭️":"1f3ad","🎮️":"1f3ae","🏂️":"1f3c2","🏄️":"1f3c4","🏆️":"1f3c6","🏊️":"1f3ca","🏠️":"1f3e0","🏭️":"1f3ed","🐈️":"1f408","🐕️":"1f415","🐟️":"1f41f","🐦️":"1f426","👂️":"1f442","👆️":"1f446","👇️":"1f447","👈️":"1f448","👉️":"1f449","👍️":"1f44d","👎️":"1f44e","👓️":"1f453","👪️":"1f46a","👽️":"1f47d","💣️":"1f4a3","💰️":"1f4b0","💳️":"1f4b3","💻️":"1f4bb","💿️":"1f4bf","📋️":"1f4cb","📚️":"1f4da","📟️":"1f4df","📤️":"1f4e4","📥️":"1f4e5","📦️":"1f4e6","📪️":"1f4ea","📫️":"1f4eb","📬️":"1f4ec","📭️":"1f4ed","📷️":"1f4f7","📹️":"1f4f9","📺️":"1f4fa","📻️":"1f4fb","🔈️":"1f508","🔍️":"1f50d","🔒️":"1f512","🔓️":"1f513","🕐️":"1f550","🕑️":"1f551","🕒️":"1f552","🕓️":"1f553","🕔️":"1f554","🕕️":"1f555","🕖️":"1f556","🕗️":"1f557","🕘️":"1f558","🕙️":"1f559","🕚️":"1f55a","🕛️":"1f55b","🕜️":"1f55c","🕝️":"1f55d","🕞️":"1f55e","🕟️":"1f55f","🕠️":"1f560","🕡️":"1f561","🕢️":"1f562","🕣️":"1f563","🕤️":"1f564","🕥️":"1f565","🕦️":"1f566","🕧️":"1f567","😐️":"1f610","🚇️":"1f687","🚍️":"1f68d","🚑️":"1f691","🚔️":"1f694","🚘️":"1f698","🚭️":"1f6ad","🚲️":"1f6b2","🚹️":"1f6b9","🚺️":"1f6ba","🚼️":"1f6bc","#⃣":"0023-20e3","0⃣":"0030-20e3","1⃣":"0031-20e3","2⃣":"0032-20e3","3⃣":"0033-20e3","4⃣":"0034-20e3","5⃣":"0035-20e3","6⃣":"0036-20e3","7⃣":"0037-20e3","8⃣":"0038-20e3","9⃣":"0039-20e3","‼️":"203c","⁉️":"2049","ℹ️":"2139","↔️":"2194","↕️":"2195","↖️":"2196","↗️":"2197","↘️":"2198","↙️":"2199","↩️":"21a9","↪️":"21aa","Ⓜ️":"24c2","▪️":"25aa","▫️":"25ab","▶️":"25b6","◀️":"25c0","◻️":"25fb","◼️":"25fc","☀️":"2600","☁️":"2601","☎️":"260e","☑️":"2611","☝️":"261d","☺️":"263a","♠️":"2660","♣️":"2663","♥️":"2665","♦️":"2666","♨️":"2668","♻️":"267b","⚠️":"26a0","✂️":"2702","✈️":"2708","✉️":"2709","✌️":"270c","✏️":"270f","✒️":"2712","✔️":"2714","✖️":"2716","✳️":"2733","✴️":"2734","❄️":"2744","❇️":"2747","❤️":"2764","➡️":"27a1","⤴️":"2934","⤵️":"2935","⬅️":"2b05","⬆️":"2b06","⬇️":"2b07","〰️":"3030","〽️":"303d","㊗️":"3297","㊙️":"3299","✝️":"271d","⌨️":"2328","✍️":"270d","*⃣":"002a-20e3","⏏️":"23cf","⏭️":"23ed","⏮️":"23ee","⏯️":"23ef","⏱️":"23f1","⏲️":"23f2","⏸️":"23f8","⏹️":"23f9","⏺️":"23fa","☂️":"2602","☃️":"2603","☄️":"2604","☘️":"2618","☠️":"2620","☢️":"2622","☣️":"2623","☦️":"2626","☪️":"262a","☮️":"262e","☯️":"262f","☸️":"2638","☹️":"2639","⚒️":"2692","⚔️":"2694","⚖️":"2696","⚗️":"2697","⚙️":"2699","⚛️":"269b","⚜️":"269c","⚰️":"26b0","⚱️":"26b1","⛈️":"26c8","⛏️":"26cf","⛑️":"26d1","⛓️":"26d3","⛩️":"26e9","⛰️":"26f0","⛱️":"26f1","⛴️":"26f4","⛷️":"26f7","⛸️":"26f8","⛹️":"26f9","✡️":"2721","❣️":"2763","♀️":"2640","♂️":"2642","⚕️":"2695","♟️":"265f","♾️":"267e","⌚️":"231a","⌛️":"231b","⏩️":"23e9","⏪️":"23ea","⏳️":"23f3","◽️":"25fd","◾️":"25fe","☔️":"2614","☕️":"2615","♈️":"2648","♉️":"2649","♊️":"264a","♋️":"264b","♌️":"264c","♍️":"264d","♎️":"264e","♏️":"264f","♐️":"2650","♑️":"2651","♒️":"2652","♓️":"2653","♿️":"267f","⚓️":"2693","⚡️":"26a1","⚪️":"26aa","⚫️":"26ab","⚽️":"26bd","⚾️":"26be","⛄️":"26c4","⛅️":"26c5","⛔️":"26d4","⛪️":"26ea","⛲️":"26f2","⛳️":"26f3","⛵️":"26f5","⛺️":"26fa","⛽️":"26fd","❓️":"2753","❗️":"2757","⬛️":"2b1b","⬜️":"2b1c","⭐️":"2b50","⭕️":"2b55","🥉":"1f949","🥈":"1f948","🥇":"1f947","🤺":"1f93a","🥅":"1f945","🤾":"1f93e","🇿":"1f1ff","🤽":"1f93d","🥋":"1f94b","🥊":"1f94a","🤼":"1f93c","🤹":"1f939","🤸":"1f938","🛶":"1f6f6","🛵":"1f6f5","🛴":"1f6f4","🛒":"1f6d2","🀄":"1f004","🃏":"1f0cf","🅰":"1f170","🅱":"1f171","🅾":"1f17e","🅿":"1f17f","🛑":"1f6d1","🆎":"1f18e","🆑":"1f191","🇾":"1f1fe","🆒":"1f192","🆓":"1f193","🆔":"1f194","🆕":"1f195","🆖":"1f196","🆗":"1f197","🆘":"1f198","🥄":"1f944","🆙":"1f199","🆚":"1f19a","🥂":"1f942","🥃":"1f943","🈁":"1f201","🈂":"1f202","🈚":"1f21a","🈯":"1f22f","🥙":"1f959","🈲":"1f232","🈳":"1f233","🈴":"1f234","🈵":"1f235","🈶":"1f236","🥘":"1f958","🈷":"1f237","🈸":"1f238","🈹":"1f239","🥗":"1f957","🈺":"1f23a","🉐":"1f250","🉑":"1f251","🌀":"1f300","🥖":"1f956","🌁":"1f301","🌂":"1f302","🌃":"1f303","🌄":"1f304","🌅":"1f305","🌆":"1f306","🥕":"1f955","🌇":"1f307","🌈":"1f308","🥔":"1f954","🌉":"1f309","🌊":"1f30a","🌋":"1f30b","🌌":"1f30c","🌏":"1f30f","🌑":"1f311","🥓":"1f953","🌓":"1f313","🌔":"1f314","🌕":"1f315","🌙":"1f319","🌛":"1f31b","🌟":"1f31f","🥒":"1f952","🌠":"1f320","🌰":"1f330","🥑":"1f951","🌱":"1f331","🌴":"1f334","🌵":"1f335","🌷":"1f337","🌸":"1f338","🌹":"1f339","🌺":"1f33a","🌻":"1f33b","🌼":"1f33c","🌽":"1f33d","🥐":"1f950","🌾":"1f33e","🌿":"1f33f","🍀":"1f340","🍁":"1f341","🍂":"1f342","🍃":"1f343","🍄":"1f344","🍅":"1f345","🍆":"1f346","🍇":"1f347","🍈":"1f348","🍉":"1f349","🍊":"1f34a","🥀":"1f940","🍌":"1f34c","🍍":"1f34d","🍎":"1f34e","🍏":"1f34f","🍑":"1f351","🍒":"1f352","🍓":"1f353","🦏":"1f98f","🍔":"1f354","🍕":"1f355","🍖":"1f356","🦎":"1f98e","🍗":"1f357","🍘":"1f358","🍙":"1f359","🦍":"1f98d","🍚":"1f35a","🍛":"1f35b","🦌":"1f98c","🍜":"1f35c","🍝":"1f35d","🍞":"1f35e","🍟":"1f35f","🦋":"1f98b","🍠":"1f360","🍡":"1f361","🦊":"1f98a","🍢":"1f362","🍣":"1f363","🦉":"1f989","🍤":"1f364","🍥":"1f365","🦈":"1f988","🍦":"1f366","🦇":"1f987","🍧":"1f367","🇽":"1f1fd","🍨":"1f368","🦆":"1f986","🍩":"1f369","🦅":"1f985","🍪":"1f36a","🖤":"1f5a4","🍫":"1f36b","🍬":"1f36c","🍭":"1f36d","🍮":"1f36e","🍯":"1f36f","🤞":"1f91e","🍰":"1f370","🍱":"1f371","🍲":"1f372","🤝":"1f91d","🍳":"1f373","🍴":"1f374","🍵":"1f375","🍶":"1f376","🍷":"1f377","🍸":"1f378","🍹":"1f379","🍺":"1f37a","🍻":"1f37b","🎀":"1f380","🎁":"1f381","🎂":"1f382","🎃":"1f383","🤛":"1f91b","🤜":"1f91c","🎄":"1f384","🎅":"1f385","🎆":"1f386","🤚":"1f91a","🎇":"1f387","🎈":"1f388","🎉":"1f389","🎊":"1f38a","🎋":"1f38b","🎌":"1f38c","🤙":"1f919","🎍":"1f38d","🕺":"1f57a","🎎":"1f38e","🤳":"1f933","🎏":"1f38f","🤰":"1f930","🎐":"1f390","🤦":"1f926","🤷":"1f937","🎑":"1f391","🎒":"1f392","🎓":"1f393","🎠":"1f3a0","🎡":"1f3a1","🎢":"1f3a2","🎣":"1f3a3","🎤":"1f3a4","🎥":"1f3a5","🎦":"1f3a6","🎧":"1f3a7","🤶":"1f936","🎨":"1f3a8","🤵":"1f935","🎩":"1f3a9","🎪":"1f3aa","🤴":"1f934","🎫":"1f3ab","🎬":"1f3ac","🎭":"1f3ad","🤧":"1f927","🎮":"1f3ae","🎯":"1f3af","🎰":"1f3b0","🎱":"1f3b1","🎲":"1f3b2","🎳":"1f3b3","🎴":"1f3b4","🤥":"1f925","🎵":"1f3b5","🎶":"1f3b6","🎷":"1f3b7","🤤":"1f924","🎸":"1f3b8","🎹":"1f3b9","🎺":"1f3ba","🤣":"1f923","🎻":"1f3bb","🎼":"1f3bc","🎽":"1f3bd","🤢":"1f922","🎾":"1f3be","🎿":"1f3bf","🏀":"1f3c0","🏁":"1f3c1","🤡":"1f921","🏂":"1f3c2","🏃":"1f3c3","🏄":"1f3c4","🏆":"1f3c6","🏈":"1f3c8","🏊":"1f3ca","🏠":"1f3e0","🏡":"1f3e1","🏢":"1f3e2","🏣":"1f3e3","🏥":"1f3e5","🏦":"1f3e6","🏧":"1f3e7","🏨":"1f3e8","🏩":"1f3e9","🏪":"1f3ea","🏫":"1f3eb","🏬":"1f3ec","🤠":"1f920","🏭":"1f3ed","🏮":"1f3ee","🏯":"1f3ef","🏰":"1f3f0","🐌":"1f40c","🐍":"1f40d","🐎":"1f40e","🐑":"1f411","🐒":"1f412","🐔":"1f414","🐗":"1f417","🐘":"1f418","🐙":"1f419","🐚":"1f41a","🐛":"1f41b","🐜":"1f41c","🐝":"1f41d","🐞":"1f41e","🐟":"1f41f","🐠":"1f420","🐡":"1f421","🐢":"1f422","🐣":"1f423","🐤":"1f424","🐥":"1f425","🐦":"1f426","🐧":"1f427","🐨":"1f428","🐩":"1f429","🐫":"1f42b","🐬":"1f42c","🐭":"1f42d","🐮":"1f42e","🐯":"1f42f","🐰":"1f430","🐱":"1f431","🐲":"1f432","🐳":"1f433","🐴":"1f434","🐵":"1f435","🐶":"1f436","🐷":"1f437","🐸":"1f438","🐹":"1f439","🐺":"1f43a","🐻":"1f43b","🐼":"1f43c","🐽":"1f43d","🐾":"1f43e","👀":"1f440","👂":"1f442","👃":"1f443","👄":"1f444","👅":"1f445","👆":"1f446","👇":"1f447","👈":"1f448","👉":"1f449","👊":"1f44a","👋":"1f44b","👌":"1f44c","👍":"1f44d","👎":"1f44e","👏":"1f44f","👐":"1f450","👑":"1f451","👒":"1f452","👓":"1f453","👔":"1f454","👕":"1f455","👖":"1f456","👗":"1f457","👘":"1f458","👙":"1f459","👚":"1f45a","👛":"1f45b","👜":"1f45c","👝":"1f45d","👞":"1f45e","👟":"1f45f","👠":"1f460","👡":"1f461","👢":"1f462","👣":"1f463","👤":"1f464","👦":"1f466","👧":"1f467","👨":"1f468","👩":"1f469","👪":"1f46a","👫":"1f46b","👮":"1f46e","👯":"1f46f","👰":"1f470","👱":"1f471","👲":"1f472","👳":"1f473","👴":"1f474","👵":"1f475","👶":"1f476","👷":"1f477","👸":"1f478","👹":"1f479","👺":"1f47a","👻":"1f47b","👼":"1f47c","👽":"1f47d","👾":"1f47e","👿":"1f47f","💀":"1f480","📇":"1f4c7","💁":"1f481","💂":"1f482","💃":"1f483","💄":"1f484","💅":"1f485","📒":"1f4d2","💆":"1f486","📓":"1f4d3","💇":"1f487","📔":"1f4d4","💈":"1f488","📕":"1f4d5","💉":"1f489","📖":"1f4d6","💊":"1f48a","📗":"1f4d7","💋":"1f48b","📘":"1f4d8","💌":"1f48c","📙":"1f4d9","💍":"1f48d","📚":"1f4da","💎":"1f48e","📛":"1f4db","💏":"1f48f","📜":"1f4dc","💐":"1f490","📝":"1f4dd","💑":"1f491","📞":"1f4de","💒":"1f492","📟":"1f4df","📠":"1f4e0","💓":"1f493","📡":"1f4e1","📢":"1f4e2","💔":"1f494","📣":"1f4e3","📤":"1f4e4","💕":"1f495","📥":"1f4e5","📦":"1f4e6","💖":"1f496","📧":"1f4e7","📨":"1f4e8","💗":"1f497","📩":"1f4e9","📪":"1f4ea","💘":"1f498","📫":"1f4eb","📮":"1f4ee","💙":"1f499","📰":"1f4f0","📱":"1f4f1","💚":"1f49a","📲":"1f4f2","📳":"1f4f3","💛":"1f49b","📴":"1f4f4","📶":"1f4f6","💜":"1f49c","📷":"1f4f7","📹":"1f4f9","💝":"1f49d","📺":"1f4fa","📻":"1f4fb","💞":"1f49e","📼":"1f4fc","🔃":"1f503","💟":"1f49f","🔊":"1f50a","🔋":"1f50b","💠":"1f4a0","🔌":"1f50c","🔍":"1f50d","💡":"1f4a1","🔎":"1f50e","🔏":"1f50f","💢":"1f4a2","🔐":"1f510","🔑":"1f511","💣":"1f4a3","🔒":"1f512","🔓":"1f513","💤":"1f4a4","🔔":"1f514","🔖":"1f516","💥":"1f4a5","🔗":"1f517","🔘":"1f518","💦":"1f4a6","🔙":"1f519","🔚":"1f51a","💧":"1f4a7","🔛":"1f51b","🔜":"1f51c","💨":"1f4a8","🔝":"1f51d","🔞":"1f51e","💩":"1f4a9","🔟":"1f51f","💪":"1f4aa","🔠":"1f520","🔡":"1f521","💫":"1f4ab","🔢":"1f522","🔣":"1f523","💬":"1f4ac","🔤":"1f524","🔥":"1f525","💮":"1f4ae","🔦":"1f526","🔧":"1f527","💯":"1f4af","🔨":"1f528","🔩":"1f529","💰":"1f4b0","🔪":"1f52a","🔫":"1f52b","💱":"1f4b1","🔮":"1f52e","💲":"1f4b2","🔯":"1f52f","💳":"1f4b3","🔰":"1f530","🔱":"1f531","💴":"1f4b4","🔲":"1f532","🔳":"1f533","💵":"1f4b5","🔴":"1f534","🔵":"1f535","💸":"1f4b8","🔶":"1f536","🔷":"1f537","💹":"1f4b9","🔸":"1f538","🔹":"1f539","💺":"1f4ba","🔺":"1f53a","🔻":"1f53b","💻":"1f4bb","🔼":"1f53c","💼":"1f4bc","🔽":"1f53d","🕐":"1f550","💽":"1f4bd","🕑":"1f551","💾":"1f4be","🕒":"1f552","💿":"1f4bf","🕓":"1f553","📀":"1f4c0","🕔":"1f554","🕕":"1f555","📁":"1f4c1","🕖":"1f556","🕗":"1f557","📂":"1f4c2","🕘":"1f558","🕙":"1f559","📃":"1f4c3","🕚":"1f55a","🕛":"1f55b","📄":"1f4c4","🗻":"1f5fb","🗼":"1f5fc","📅":"1f4c5","🗽":"1f5fd","🗾":"1f5fe","📆":"1f4c6","🗿":"1f5ff","😁":"1f601","😂":"1f602","😃":"1f603","📈":"1f4c8","😄":"1f604","😅":"1f605","📉":"1f4c9","😆":"1f606","😉":"1f609","📊":"1f4ca","😊":"1f60a","😋":"1f60b","📋":"1f4cb","😌":"1f60c","😍":"1f60d","📌":"1f4cc","😏":"1f60f","😒":"1f612","📍":"1f4cd","😓":"1f613","😔":"1f614","📎":"1f4ce","😖":"1f616","😘":"1f618","📏":"1f4cf","😚":"1f61a","😜":"1f61c","📐":"1f4d0","😝":"1f61d","😞":"1f61e","📑":"1f4d1","😠":"1f620","😡":"1f621","😢":"1f622","😣":"1f623","😤":"1f624","😥":"1f625","😨":"1f628","😩":"1f629","😪":"1f62a","😫":"1f62b","😭":"1f62d","😰":"1f630","😱":"1f631","😲":"1f632","😳":"1f633","😵":"1f635","😷":"1f637","😸":"1f638","😹":"1f639","😺":"1f63a","😻":"1f63b","😼":"1f63c","😽":"1f63d","😾":"1f63e","😿":"1f63f","🙀":"1f640","🙅":"1f645","🙆":"1f646","🙇":"1f647","🙈":"1f648","🙉":"1f649","🙊":"1f64a","🙋":"1f64b","🙌":"1f64c","🙍":"1f64d","🙎":"1f64e","🙏":"1f64f","🚀":"1f680","🚃":"1f683","🚄":"1f684","🚅":"1f685","🚇":"1f687","🚉":"1f689","🚌":"1f68c","🚏":"1f68f","🚑":"1f691","🚒":"1f692","🚓":"1f693","🚕":"1f695","🚗":"1f697","🚙":"1f699","🚚":"1f69a","🚢":"1f6a2","🚤":"1f6a4","🚥":"1f6a5","🚧":"1f6a7","🚨":"1f6a8","🚩":"1f6a9","🚪":"1f6aa","🚫":"1f6ab","🚬":"1f6ac","🚭":"1f6ad","🚲":"1f6b2","🚶":"1f6b6","🚹":"1f6b9","🚺":"1f6ba","🚻":"1f6bb","🚼":"1f6bc","🚽":"1f6bd","🚾":"1f6be","🛀":"1f6c0","🤘":"1f918","😀":"1f600","😇":"1f607","😈":"1f608","😎":"1f60e","😐":"1f610","😑":"1f611","😕":"1f615","😗":"1f617","😙":"1f619","😛":"1f61b","😟":"1f61f","😦":"1f626","😧":"1f627","😬":"1f62c","😮":"1f62e","😯":"1f62f","😴":"1f634","😶":"1f636","🚁":"1f681","🚂":"1f682","🚆":"1f686","🚈":"1f688","🚊":"1f68a","🚍":"1f68d","🚎":"1f68e","🚐":"1f690","🚔":"1f694","🚖":"1f696","🚘":"1f698","🚛":"1f69b","🚜":"1f69c","🚝":"1f69d","🚞":"1f69e","🚟":"1f69f","🚠":"1f6a0","🚡":"1f6a1","🚣":"1f6a3","🚦":"1f6a6","🚮":"1f6ae","🚯":"1f6af","🚰":"1f6b0","🚱":"1f6b1","🚳":"1f6b3","🚴":"1f6b4","🚵":"1f6b5","🚷":"1f6b7","🚸":"1f6b8","🚿":"1f6bf","🛁":"1f6c1","🛂":"1f6c2","🛃":"1f6c3","🛄":"1f6c4","🛅":"1f6c5","🌍":"1f30d","🌎":"1f30e","🌐":"1f310","🌒":"1f312","🌖":"1f316","🌗":"1f317","🌘":"1f318","🌚":"1f31a","🌜":"1f31c","🌝":"1f31d","🌞":"1f31e","🌲":"1f332","🌳":"1f333","🍋":"1f34b","🍐":"1f350","🍼":"1f37c","🏇":"1f3c7","🏉":"1f3c9","🏤":"1f3e4","🐀":"1f400","🐁":"1f401","🐂":"1f402","🐃":"1f403","🐄":"1f404","🐅":"1f405","🐆":"1f406","🐇":"1f407","🐈":"1f408","🐉":"1f409","🐊":"1f40a","🐋":"1f40b","🐏":"1f40f","🐐":"1f410","🐓":"1f413","🐕":"1f415","🐖":"1f416","🐪":"1f42a","👥":"1f465","👬":"1f46c","👭":"1f46d","💭":"1f4ad","💶":"1f4b6","💷":"1f4b7","📬":"1f4ec","📭":"1f4ed","📯":"1f4ef","📵":"1f4f5","🔀":"1f500","🔁":"1f501","🔂":"1f502","🔄":"1f504","🔅":"1f505","🔆":"1f506","🔇":"1f507","🔉":"1f509","🔕":"1f515","🔬":"1f52c","🔭":"1f52d","🕜":"1f55c","🕝":"1f55d","🕞":"1f55e","🕟":"1f55f","🕠":"1f560","🕡":"1f561","🕢":"1f562","🕣":"1f563","🕤":"1f564","🕥":"1f565","🕦":"1f566","🕧":"1f567","🔈":"1f508","🚋":"1f68b","🎞":"1f39e","🎟":"1f39f","🏅":"1f3c5","🏋":"1f3cb","🏌":"1f3cc","🏍":"1f3cd","🏎":"1f3ce","🎖":"1f396","🎗":"1f397","🌶":"1f336","🌧":"1f327","🌨":"1f328","🌩":"1f329","🌪":"1f32a","🌫":"1f32b","🌬":"1f32c","🐿":"1f43f","🕷":"1f577","🕸":"1f578","🌡":"1f321","🎙":"1f399","🎚":"1f39a","🎛":"1f39b","🏳":"1f3f3","🏴":"1f3f4","🏵":"1f3f5","🏷":"1f3f7","📸":"1f4f8","📽":"1f4fd","🕊":"1f54a","🕯":"1f56f","🕰":"1f570","🕳":"1f573","🕶":"1f576","🕹":"1f579","🖇":"1f587","🖊":"1f58a","🖋":"1f58b","🖌":"1f58c","🖍":"1f58d","🖥":"1f5a5","🖨":"1f5a8","🖲":"1f5b2","🖼":"1f5bc","🗂":"1f5c2","🗃":"1f5c3","🗄":"1f5c4","🗑":"1f5d1","🗒":"1f5d2","🗓":"1f5d3","🗜":"1f5dc","🗞":"1f5de","🗡":"1f5e1","🗣":"1f5e3","🗨":"1f5e8","🗯":"1f5ef","🗳":"1f5f3","🗺":"1f5fa","🛌":"1f6cc","🛠":"1f6e0","🛡":"1f6e1","🛢":"1f6e2","🛰":"1f6f0","🍽":"1f37d","👁":"1f441","🕴":"1f574","🕵":"1f575","🖐":"1f590","🖕":"1f595","🖖":"1f596","🙁":"1f641","🙂":"1f642","🏔":"1f3d4","🏕":"1f3d5","🏖":"1f3d6","🏗":"1f3d7","🏘":"1f3d8","🏙":"1f3d9","🏚":"1f3da","🏛":"1f3db","🏜":"1f3dc","🏝":"1f3dd","🏞":"1f3de","🏟":"1f3df","🛋":"1f6cb","🛍":"1f6cd","🛎":"1f6ce","🛏":"1f6cf","🛣":"1f6e3","🛤":"1f6e4","🛥":"1f6e5","🛩":"1f6e9","🛫":"1f6eb","🛬":"1f6ec","🛳":"1f6f3","🏻":"1f3fb","🏼":"1f3fc","🏽":"1f3fd","🏾":"1f3fe","🏿":"1f3ff","🌤":"1f324","🌥":"1f325","🌦":"1f326","🖱":"1f5b1","🙃":"1f643","🤑":"1f911","🤓":"1f913","🤗":"1f917","🙄":"1f644","🤔":"1f914","🤐":"1f910","🤒":"1f912","🤕":"1f915","🤖":"1f916","🦁":"1f981","🦄":"1f984","🦂":"1f982","🦀":"1f980","🦃":"1f983","🧀":"1f9c0","🌭":"1f32d","🌮":"1f32e","🌯":"1f32f","🍿":"1f37f","🍾":"1f37e","🏹":"1f3f9","🏺":"1f3fa","🛐":"1f6d0","🕋":"1f54b","🕌":"1f54c","🕍":"1f54d","🕎":"1f54e","📿":"1f4ff","🏏":"1f3cf","🏐":"1f3d0","🏑":"1f3d1","🏒":"1f3d2","🏓":"1f3d3","🏸":"1f3f8","🥁":"1f941","🦐":"1f990","🦑":"1f991","🥚":"1f95a","🥛":"1f95b","🥜":"1f95c","🥝":"1f95d","🥞":"1f95e","🇼":"1f1fc","🇻":"1f1fb","🇺":"1f1fa","🇹":"1f1f9","🇸":"1f1f8","🇷":"1f1f7","🇶":"1f1f6","🇵":"1f1f5","🇴":"1f1f4","🇳":"1f1f3","🇲":"1f1f2","🇱":"1f1f1","🇰":"1f1f0","🇯":"1f1ef","🇮":"1f1ee","🇭":"1f1ed","🇬":"1f1ec","🇫":"1f1eb","🇪":"1f1ea","🇩":"1f1e9","🇨":"1f1e8","🇧":"1f1e7","🇦":"1f1e6","🛷":"1f6f7","🛸":"1f6f8","🤟":"1f91f","🤨":"1f928","🤩":"1f929","🤪":"1f92a","🤫":"1f92b","🤬":"1f92c","🤭":"1f92d","🤮":"1f92e","🤯":"1f92f","🤱":"1f931","🤲":"1f932","🥌":"1f94c","🥟":"1f95f","🥠":"1f960","🥡":"1f961","🥢":"1f962","🥣":"1f963","🥤":"1f964","🥥":"1f965","🥦":"1f966","🥧":"1f967","🥨":"1f968","🥩":"1f969","🥪":"1f96a","🥫":"1f96b","🦒":"1f992","🦓":"1f993","🦔":"1f994","🦕":"1f995","🦖":"1f996","🦗":"1f997","🧐":"1f9d0","🧑":"1f9d1","🧒":"1f9d2","🧓":"1f9d3","🧔":"1f9d4","🧕":"1f9d5","🧖":"1f9d6","🧗":"1f9d7","🧘":"1f9d8","🧙":"1f9d9","🧚":"1f9da","🧛":"1f9db","🧜":"1f9dc","🧝":"1f9dd","🧞":"1f9de","🧟":"1f9df","🧠":"1f9e0","🧡":"1f9e1","🧢":"1f9e2","🧣":"1f9e3","🧤":"1f9e4","🧥":"1f9e5","🧦":"1f9e6","🛹":"1f6f9","🥍":"1f94d","🥎":"1f94e","🥏":"1f94f","🥬":"1f96c","🥭":"1f96d","🥮":"1f96e","🥯":"1f96f","🥰":"1f970","🥳":"1f973","🥴":"1f974","🥵":"1f975","🥶":"1f976","🥺":"1f97a","🥼":"1f97c","🥽":"1f97d","🥾":"1f97e","🥿":"1f97f","🦘":"1f998","🦙":"1f999","🦚":"1f99a","🦛":"1f99b","🦜":"1f99c","🦝":"1f99d","🦞":"1f99e","🦟":"1f99f","🦠":"1f9a0","🦡":"1f9a1","🦢":"1f9a2","🦰":"1f9b0","🦱":"1f9b1","🦲":"1f9b2","🦳":"1f9b3","🦴":"1f9b4","🦵":"1f9b5","🦶":"1f9b6","🦷":"1f9b7","🦸":"1f9b8","🦹":"1f9b9","🧁":"1f9c1","🧂":"1f9c2","🧧":"1f9e7","🧨":"1f9e8","🧩":"1f9e9","🧪":"1f9ea","🧫":"1f9eb","🧬":"1f9ec","🧭":"1f9ed","🧮":"1f9ee","🧯":"1f9ef","🧰":"1f9f0","🧱":"1f9f1","🧲":"1f9f2","🧳":"1f9f3","🧴":"1f9f4","🧵":"1f9f5","🧶":"1f9f6","🧷":"1f9f7","🧸":"1f9f8","🧹":"1f9f9","🧺":"1f9fa","🧻":"1f9fb","🧼":"1f9fc","🧽":"1f9fd","🧾":"1f9fe","🧿":"1f9ff","⌚":"231a","⌛":"231b","⏩":"23e9","⏪":"23ea","⏫":"23eb","⏬":"23ec","⏰":"23f0","⏳":"23f3","Ⓜ":"24c2","◽":"25fd","◾":"25fe","☀":"2600","☁":"2601","☎":"260e","☔":"2614","☕":"2615","☝":"261d","☺":"263a","♈":"2648","♉":"2649","♊":"264a","♋":"264b","♌":"264c","♍":"264d","♎":"264e","♏":"264f","♐":"2650","♑":"2651","♒":"2652","♓":"2653","♠":"2660","♣":"2663","♥":"2665","♦":"2666","♨":"2668","♻":"267b","♿":"267f","⚓":"2693","⚡":"26a1","⚪":"26aa","⚫":"26ab","⚽":"26bd","⚾":"26be","⛄":"26c4","⛅":"26c5","⛎":"26ce","⛔":"26d4","⛪":"26ea","⛲":"26f2","⛳":"26f3","⛵":"26f5","⛺":"26fa","⛽":"26fd","✂":"2702","✅":"2705","✈":"2708","✉":"2709","✊":"270a","✋":"270b","✌":"270c","✏":"270f","✒":"2712","✨":"2728","✳":"2733","✴":"2734","❄":"2744","❇":"2747","❌":"274c","❎":"274e","❓":"2753","❔":"2754","❕":"2755","❗":"2757","❤":"2764","➕":"2795","➖":"2796","➗":"2797","➰":"27b0","⬛":"2b1b","⬜":"2b1c","⭐":"2b50","⭕":"2b55","〽":"303d","㊗":"3297","㊙":"3299","➿":"27bf","⌨":"2328","✍":"270d","⏱":"23f1","⏲":"23f2","☂":"2602","☃":"2603","☄":"2604","☘":"2618","☠":"2620","☹":"2639","⚒":"2692","⚔":"2694","⚖":"2696","⚗":"2697","⚙":"2699","⚜":"269c","⚰":"26b0","⚱":"26b1","⛈":"26c8","⛏":"26cf","⛑":"26d1","⛓":"26d3","⛩":"26e9","⛰":"26f0","⛱":"26f1","⛴":"26f4","⛷":"26f7","⛸":"26f8","⛹":"26f9","❣":"2763","♟":"265f","♾":"267e"},d.jsEscapeMapGreedy={"👩❤💋👩":"1f469-2764-1f48b-1f469","👨❤💋👨":"1f468-2764-1f48b-1f468","👩❤💋👨":"1f469-2764-1f48b-1f468","👩❤👩":"1f469-2764-1f469","👨❤👨":"1f468-2764-1f468","🏌🏻♂":"1f3cc-1f3fb-2642","🏌🏼♂":"1f3cc-1f3fc-2642","🏌🏽♂":"1f3cc-1f3fd-2642","🏌🏾♂":"1f3cc-1f3fe-2642","🏌🏿♂":"1f3cc-1f3ff-2642","🏌🏻♀":"1f3cc-1f3fb-2640","🏌🏼♀":"1f3cc-1f3fc-2640","🏌🏽♀":"1f3cc-1f3fd-2640","🏌🏾♀":"1f3cc-1f3fe-2640","🏌🏿♀":"1f3cc-1f3ff-2640","👨🏻⚖":"1f468-1f3fb-2696","👨🏼⚖":"1f468-1f3fc-2696","👨🏽⚖":"1f468-1f3fd-2696","👨🏾⚖":"1f468-1f3fe-2696","👨🏿⚖":"1f468-1f3ff-2696","👩🏻⚖":"1f469-1f3fb-2696","👩🏼⚖":"1f469-1f3fc-2696","👩🏽⚖":"1f469-1f3fd-2696","👩🏾⚖":"1f469-1f3fe-2696","👩🏿⚖":"1f469-1f3ff-2696","👨🏻✈":"1f468-1f3fb-2708","👨🏼✈":"1f468-1f3fc-2708","👨🏽✈":"1f468-1f3fd-2708","👨🏾✈":"1f468-1f3fe-2708","👨🏿✈":"1f468-1f3ff-2708","👩🏻✈":"1f469-1f3fb-2708","👩🏼✈":"1f469-1f3fc-2708","👩🏽✈":"1f469-1f3fd-2708","👩🏾✈":"1f469-1f3fe-2708","👩🏿✈":"1f469-1f3ff-2708","👩❤👨":"1f469-2764-1f468","👨🏻⚕":"1f468-1f3fb-2695","👨🏼⚕":"1f468-1f3fc-2695","👨🏽⚕":"1f468-1f3fd-2695","👨🏾⚕":"1f468-1f3fe-2695","👨🏿⚕":"1f468-1f3ff-2695","👩🏻⚕":"1f469-1f3fb-2695","👩🏼⚕":"1f469-1f3fc-2695","👩🏽⚕":"1f469-1f3fd-2695","👩🏾⚕":"1f469-1f3fe-2695","👩🏿⚕":"1f469-1f3ff-2695","👮🏻♀":"1f46e-1f3fb-2640","👮🏻♂":"1f46e-1f3fb-2642","👮🏼♀":"1f46e-1f3fc-2640","👮🏼♂":"1f46e-1f3fc-2642","👮🏽♀":"1f46e-1f3fd-2640","👮🏽♂":"1f46e-1f3fd-2642","👮🏾♀":"1f46e-1f3fe-2640","👮🏾♂":"1f46e-1f3fe-2642","👮🏿♀":"1f46e-1f3ff-2640","👮🏿♂":"1f46e-1f3ff-2642","👱🏻♀":"1f471-1f3fb-2640","👱🏻♂":"1f471-1f3fb-2642","👱🏼♀":"1f471-1f3fc-2640","👱🏼♂":"1f471-1f3fc-2642","👱🏽♀":"1f471-1f3fd-2640","👱🏽♂":"1f471-1f3fd-2642","👱🏾♀":"1f471-1f3fe-2640","👱🏾♂":"1f471-1f3fe-2642","👱🏿♀":"1f471-1f3ff-2640","👱🏿♂":"1f471-1f3ff-2642","👳🏻♀":"1f473-1f3fb-2640","👳🏻♂":"1f473-1f3fb-2642","👳🏼♀":"1f473-1f3fc-2640","👳🏼♂":"1f473-1f3fc-2642","👳🏽♀":"1f473-1f3fd-2640","👳🏽♂":"1f473-1f3fd-2642","👳🏾♀":"1f473-1f3fe-2640","👳🏾♂":"1f473-1f3fe-2642","👳🏿♀":"1f473-1f3ff-2640","👳🏿♂":"1f473-1f3ff-2642","👷🏻♀":"1f477-1f3fb-2640","👷🏻♂":"1f477-1f3fb-2642","👷🏼♀":"1f477-1f3fc-2640","👷🏼♂":"1f477-1f3fc-2642","👷🏽♀":"1f477-1f3fd-2640","👷🏽♂":"1f477-1f3fd-2642","👷🏾♀":"1f477-1f3fe-2640","👷🏾♂":"1f477-1f3fe-2642","👷🏿♀":"1f477-1f3ff-2640","👷🏿♂":"1f477-1f3ff-2642","💂🏻♀":"1f482-1f3fb-2640","💂🏻♂":"1f482-1f3fb-2642","💂🏼♀":"1f482-1f3fc-2640","💂🏼♂":"1f482-1f3fc-2642","💂🏽♀":"1f482-1f3fd-2640","💂🏽♂":"1f482-1f3fd-2642","💂🏾♀":"1f482-1f3fe-2640","💂🏾♂":"1f482-1f3fe-2642","💂🏿♀":"1f482-1f3ff-2640","💂🏿♂":"1f482-1f3ff-2642","🕵🏻♀":"1f575-1f3fb-2640","🕵🏻♂":"1f575-1f3fb-2642","🕵🏼♀":"1f575-1f3fc-2640","🕵🏼♂":"1f575-1f3fc-2642","🕵🏽♀":"1f575-1f3fd-2640","🕵🏽♂":"1f575-1f3fd-2642","🕵🏾♀":"1f575-1f3fe-2640","🕵🏾♂":"1f575-1f3fe-2642","🕵🏿♀":"1f575-1f3ff-2640","🕵🏿♂":"1f575-1f3ff-2642","🏃🏻♀":"1f3c3-1f3fb-2640","🏃🏻♂":"1f3c3-1f3fb-2642","🏃🏼♀":"1f3c3-1f3fc-2640","🏃🏼♂":"1f3c3-1f3fc-2642","🏃🏽♀":"1f3c3-1f3fd-2640","🏃🏽♂":"1f3c3-1f3fd-2642","🏃🏾♀":"1f3c3-1f3fe-2640","🏃🏾♂":"1f3c3-1f3fe-2642","🏃🏿♀":"1f3c3-1f3ff-2640","🏃🏿♂":"1f3c3-1f3ff-2642","🏄🏻♀":"1f3c4-1f3fb-2640","🏄🏻♂":"1f3c4-1f3fb-2642","🏄🏼♀":"1f3c4-1f3fc-2640","🏄🏼♂":"1f3c4-1f3fc-2642","🏄🏽♀":"1f3c4-1f3fd-2640","🏄🏽♂":"1f3c4-1f3fd-2642","🏄🏾♀":"1f3c4-1f3fe-2640","🏄🏾♂":"1f3c4-1f3fe-2642","🏄🏿♀":"1f3c4-1f3ff-2640","🏄🏿♂":"1f3c4-1f3ff-2642","🏊🏻♀":"1f3ca-1f3fb-2640","🏊🏻♂":"1f3ca-1f3fb-2642","🏊🏼♀":"1f3ca-1f3fc-2640","🏊🏼♂":"1f3ca-1f3fc-2642","🏊🏽♀":"1f3ca-1f3fd-2640","🏊🏽♂":"1f3ca-1f3fd-2642","🏊🏾♀":"1f3ca-1f3fe-2640","🏊🏾♂":"1f3ca-1f3fe-2642","🏊🏿♀":"1f3ca-1f3ff-2640","🏊🏿♂":"1f3ca-1f3ff-2642","🏋🏻♀":"1f3cb-1f3fb-2640","🏋🏻♂":"1f3cb-1f3fb-2642","🏋🏼♀":"1f3cb-1f3fc-2640","🏋🏼♂":"1f3cb-1f3fc-2642","🏋🏽♀":"1f3cb-1f3fd-2640","🏋🏽♂":"1f3cb-1f3fd-2642","🏋🏾♀":"1f3cb-1f3fe-2640","🏋🏾♂":"1f3cb-1f3fe-2642","🏋🏿♀":"1f3cb-1f3ff-2640","🏋🏿♂":"1f3cb-1f3ff-2642","💆🏻♀":"1f486-1f3fb-2640","💆🏻♂":"1f486-1f3fb-2642","💆🏼♀":"1f486-1f3fc-2640","💆🏼♂":"1f486-1f3fc-2642","💆🏽♀":"1f486-1f3fd-2640","💆🏽♂":"1f486-1f3fd-2642","💆🏾♀":"1f486-1f3fe-2640","💆🏾♂":"1f486-1f3fe-2642","💆🏿♀":"1f486-1f3ff-2640","💆🏿♂":"1f486-1f3ff-2642","💇🏻♀":"1f487-1f3fb-2640","💇🏻♂":"1f487-1f3fb-2642","💇🏼♀":"1f487-1f3fc-2640","💇🏼♂":"1f487-1f3fc-2642","💇🏽♀":"1f487-1f3fd-2640","💇🏽♂":"1f487-1f3fd-2642","💇🏾♀":"1f487-1f3fe-2640","💇🏾♂":"1f487-1f3fe-2642","💇🏿♀":"1f487-1f3ff-2640","💇🏿♂":"1f487-1f3ff-2642","🚣🏻♀":"1f6a3-1f3fb-2640","🚣🏻♂":"1f6a3-1f3fb-2642","🚣🏼♀":"1f6a3-1f3fc-2640","🚣🏼♂":"1f6a3-1f3fc-2642","🚣🏽♀":"1f6a3-1f3fd-2640","🚣🏽♂":"1f6a3-1f3fd-2642","🚣🏾♀":"1f6a3-1f3fe-2640","🚣🏾♂":"1f6a3-1f3fe-2642","🚣🏿♀":"1f6a3-1f3ff-2640","🚣🏿♂":"1f6a3-1f3ff-2642","🚴🏻♀":"1f6b4-1f3fb-2640","🚴🏻♂":"1f6b4-1f3fb-2642","🚴🏼♀":"1f6b4-1f3fc-2640","🚴🏼♂":"1f6b4-1f3fc-2642","🚴🏽♀":"1f6b4-1f3fd-2640","🚴🏽♂":"1f6b4-1f3fd-2642","🚴🏾♀":"1f6b4-1f3fe-2640","🚴🏾♂":"1f6b4-1f3fe-2642","🚴🏿♀":"1f6b4-1f3ff-2640","🚴🏿♂":"1f6b4-1f3ff-2642","🚵🏻♀":"1f6b5-1f3fb-2640","🚵🏻♂":"1f6b5-1f3fb-2642","🚵🏼♀":"1f6b5-1f3fc-2640","🚵🏼♂":"1f6b5-1f3fc-2642","🚵🏽♀":"1f6b5-1f3fd-2640","🚵🏽♂":"1f6b5-1f3fd-2642","🚵🏾♀":"1f6b5-1f3fe-2640","🚵🏾♂":"1f6b5-1f3fe-2642","🚵🏿♀":"1f6b5-1f3ff-2640","🚵🏿♂":"1f6b5-1f3ff-2642","🚶🏻♀":"1f6b6-1f3fb-2640","🚶🏻♂":"1f6b6-1f3fb-2642","🚶🏼♀":"1f6b6-1f3fc-2640","🚶🏼♂":"1f6b6-1f3fc-2642","🚶🏽♀":"1f6b6-1f3fd-2640","🚶🏽♂":"1f6b6-1f3fd-2642","🚶🏾♀":"1f6b6-1f3fe-2640","🚶🏾♂":"1f6b6-1f3fe-2642","🚶🏿♀":"1f6b6-1f3ff-2640","🚶🏿♂":"1f6b6-1f3ff-2642","🤸🏻♀":"1f938-1f3fb-2640","🤸🏻♂":"1f938-1f3fb-2642","🤸🏼♀":"1f938-1f3fc-2640","🤸🏼♂":"1f938-1f3fc-2642","🤸🏽♀":"1f938-1f3fd-2640","🤸🏽♂":"1f938-1f3fd-2642","🤸🏾♀":"1f938-1f3fe-2640","🤸🏾♂":"1f938-1f3fe-2642","🤸🏿♀":"1f938-1f3ff-2640","🤸🏿♂":"1f938-1f3ff-2642","🤹🏻♀":"1f939-1f3fb-2640","🤹🏻♂":"1f939-1f3fb-2642","🤹🏼♀":"1f939-1f3fc-2640","🤹🏼♂":"1f939-1f3fc-2642","🤹🏽♀":"1f939-1f3fd-2640","🤹🏽♂":"1f939-1f3fd-2642","🤹🏾♀":"1f939-1f3fe-2640","🤹🏾♂":"1f939-1f3fe-2642","🤹🏿♀":"1f939-1f3ff-2640","🤹🏿♂":"1f939-1f3ff-2642","🤽🏻♀":"1f93d-1f3fb-2640","🤽🏻♂":"1f93d-1f3fb-2642","🤽🏼♀":"1f93d-1f3fc-2640","🤽🏼♂":"1f93d-1f3fc-2642","🤽🏽♀":"1f93d-1f3fd-2640","🤽🏽♂":"1f93d-1f3fd-2642","🤽🏾♀":"1f93d-1f3fe-2640","🤽🏾♂":"1f93d-1f3fe-2642","🤽🏿♀":"1f93d-1f3ff-2640","🤽🏿♂":"1f93d-1f3ff-2642","🤾🏻♀":"1f93e-1f3fb-2640","🤾🏻♂":"1f93e-1f3fb-2642","🤾🏼♀":"1f93e-1f3fc-2640","🤾🏼♂":"1f93e-1f3fc-2642","🤾🏽♀":"1f93e-1f3fd-2640","🤾🏽♂":"1f93e-1f3fd-2642","🤾🏾♀":"1f93e-1f3fe-2640","🤾🏾♂":"1f93e-1f3fe-2642","🤾🏿♀":"1f93e-1f3ff-2640","🤾🏿♂":"1f93e-1f3ff-2642","💁🏻♀":"1f481-1f3fb-2640","💁🏻♂":"1f481-1f3fb-2642","💁🏼♀":"1f481-1f3fc-2640","💁🏼♂":"1f481-1f3fc-2642","💁🏽♀":"1f481-1f3fd-2640","💁🏽♂":"1f481-1f3fd-2642","💁🏾♀":"1f481-1f3fe-2640","💁🏾♂":"1f481-1f3fe-2642","💁🏿♀":"1f481-1f3ff-2640","💁🏿♂":"1f481-1f3ff-2642","🙅🏻♀":"1f645-1f3fb-2640","🙅🏻♂":"1f645-1f3fb-2642","🙅🏼♀":"1f645-1f3fc-2640","🙅🏼♂":"1f645-1f3fc-2642","🙅🏽♀":"1f645-1f3fd-2640","🙅🏽♂":"1f645-1f3fd-2642","🙅🏾♀":"1f645-1f3fe-2640","🙅🏾♂":"1f645-1f3fe-2642","🙅🏿♀":"1f645-1f3ff-2640","🙅🏿♂":"1f645-1f3ff-2642","🙆🏻♀":"1f646-1f3fb-2640","🙆🏻♂":"1f646-1f3fb-2642","🙆🏼♀":"1f646-1f3fc-2640","🙆🏼♂":"1f646-1f3fc-2642","🙆🏽♀":"1f646-1f3fd-2640","🙆🏽♂":"1f646-1f3fd-2642","🙆🏾♀":"1f646-1f3fe-2640","🙆🏾♂":"1f646-1f3fe-2642","🙆🏿♀":"1f646-1f3ff-2640","🙆🏿♂":"1f646-1f3ff-2642","🙇🏻♀":"1f647-1f3fb-2640","🙇🏻♂":"1f647-1f3fb-2642","🙇🏼♀":"1f647-1f3fc-2640","🙇🏼♂":"1f647-1f3fc-2642","🙇🏽♀":"1f647-1f3fd-2640","🙇🏽♂":"1f647-1f3fd-2642","🙇🏾♀":"1f647-1f3fe-2640","🙇🏾♂":"1f647-1f3fe-2642","🙇🏿♀":"1f647-1f3ff-2640","🙇🏿♂":"1f647-1f3ff-2642","🙋🏻♀":"1f64b-1f3fb-2640","🙋🏻♂":"1f64b-1f3fb-2642","🙋🏼♀":"1f64b-1f3fc-2640","🙋🏼♂":"1f64b-1f3fc-2642","🙋🏽♀":"1f64b-1f3fd-2640","🙋🏽♂":"1f64b-1f3fd-2642","🙋🏾♀":"1f64b-1f3fe-2640","🙋🏾♂":"1f64b-1f3fe-2642","🙋🏿♀":"1f64b-1f3ff-2640","🙋🏿♂":"1f64b-1f3ff-2642","🙍🏻♀":"1f64d-1f3fb-2640","🙍🏻♂":"1f64d-1f3fb-2642","🙍🏼♀":"1f64d-1f3fc-2640","🙍🏼♂":"1f64d-1f3fc-2642","🙍🏽♀":"1f64d-1f3fd-2640","🙍🏽♂":"1f64d-1f3fd-2642","🙍🏾♀":"1f64d-1f3fe-2640","🙍🏾♂":"1f64d-1f3fe-2642","🙍🏿♀":"1f64d-1f3ff-2640","🙍🏿♂":"1f64d-1f3ff-2642","🙎🏻♀":"1f64e-1f3fb-2640","🙎🏻♂":"1f64e-1f3fb-2642","🙎🏼♀":"1f64e-1f3fc-2640","🙎🏼♂":"1f64e-1f3fc-2642","🙎🏽♀":"1f64e-1f3fd-2640","🙎🏽♂":"1f64e-1f3fd-2642","🙎🏾♀":"1f64e-1f3fe-2640","🙎🏾♂":"1f64e-1f3fe-2642","🙎🏿♀":"1f64e-1f3ff-2640","🙎🏿♂":"1f64e-1f3ff-2642","🤦🏻♀":"1f926-1f3fb-2640","🤦🏻♂":"1f926-1f3fb-2642","🤦🏼♀":"1f926-1f3fc-2640","🤦🏼♂":"1f926-1f3fc-2642","🤦🏽♀":"1f926-1f3fd-2640","🤦🏽♂":"1f926-1f3fd-2642","🤦🏾♀":"1f926-1f3fe-2640","🤦🏾♂":"1f926-1f3fe-2642","🤦🏿♀":"1f926-1f3ff-2640","🤦🏿♂":"1f926-1f3ff-2642","🤷🏻♀":"1f937-1f3fb-2640","🤷🏻♂":"1f937-1f3fb-2642","🤷🏼♀":"1f937-1f3fc-2640","🤷🏼♂":"1f937-1f3fc-2642","🤷🏽♀":"1f937-1f3fd-2640","🤷🏽♂":"1f937-1f3fd-2642","🤷🏾♀":"1f937-1f3fe-2640","🤷🏾♂":"1f937-1f3fe-2642","🤷🏿♀":"1f937-1f3ff-2640","🤷🏿♂":"1f937-1f3ff-2642","🧙🏻♀":"1f9d9-1f3fb-2640","🧙🏻♂":"1f9d9-1f3fb-2642","🧙🏼♀":"1f9d9-1f3fc-2640","🧙🏼♂":"1f9d9-1f3fc-2642","🧙🏽♀":"1f9d9-1f3fd-2640","🧙🏽♂":"1f9d9-1f3fd-2642","🧙🏾♀":"1f9d9-1f3fe-2640","🧙🏾♂":"1f9d9-1f3fe-2642","🧙🏿♀":"1f9d9-1f3ff-2640","🧙🏿♂":"1f9d9-1f3ff-2642","🧚🏻♀":"1f9da-1f3fb-2640","🧚🏻♂":"1f9da-1f3fb-2642","🧚🏼♀":"1f9da-1f3fc-2640","🧚🏼♂":"1f9da-1f3fc-2642","🧚🏽♀":"1f9da-1f3fd-2640","🧚🏽♂":"1f9da-1f3fd-2642","🧚🏾♀":"1f9da-1f3fe-2640","🧚🏾♂":"1f9da-1f3fe-2642","🧚🏿♀":"1f9da-1f3ff-2640","🧚🏿♂":"1f9da-1f3ff-2642","🧛🏻♀":"1f9db-1f3fb-2640","🧛🏻♂":"1f9db-1f3fb-2642","🧛🏼♀":"1f9db-1f3fc-2640","🧛🏼♂":"1f9db-1f3fc-2642","🧛🏽♀":"1f9db-1f3fd-2640","🧛🏽♂":"1f9db-1f3fd-2642","🧛🏾♀":"1f9db-1f3fe-2640","🧛🏾♂":"1f9db-1f3fe-2642","🧛🏿♀":"1f9db-1f3ff-2640","🧛🏿♂":"1f9db-1f3ff-2642","🧜🏻♀":"1f9dc-1f3fb-2640","🧜🏻♂":"1f9dc-1f3fb-2642","🧜🏼♀":"1f9dc-1f3fc-2640","🧜🏼♂":"1f9dc-1f3fc-2642","🧜🏽♀":"1f9dc-1f3fd-2640","🧜🏽♂":"1f9dc-1f3fd-2642","🧜🏾♀":"1f9dc-1f3fe-2640","🧜🏾♂":"1f9dc-1f3fe-2642","🧜🏿♀":"1f9dc-1f3ff-2640","🧜🏿♂":"1f9dc-1f3ff-2642","🧝🏻♀":"1f9dd-1f3fb-2640","🧝🏻♂":"1f9dd-1f3fb-2642","🧝🏼♀":"1f9dd-1f3fc-2640","🧝🏼♂":"1f9dd-1f3fc-2642","🧝🏽♀":"1f9dd-1f3fd-2640","🧝🏽♂":"1f9dd-1f3fd-2642","🧝🏾♀":"1f9dd-1f3fe-2640","🧝🏾♂":"1f9dd-1f3fe-2642","🧝🏿♀":"1f9dd-1f3ff-2640","🧝🏿♂":"1f9dd-1f3ff-2642","🧖🏻♀":"1f9d6-1f3fb-2640","🧖🏻♂":"1f9d6-1f3fb-2642","🧖🏼♀":"1f9d6-1f3fc-2640","🧖🏼♂":"1f9d6-1f3fc-2642","🧖🏽♀":"1f9d6-1f3fd-2640","🧖🏽♂":"1f9d6-1f3fd-2642","🧖🏾♀":"1f9d6-1f3fe-2640","🧖🏾♂":"1f9d6-1f3fe-2642","🧖🏿♀":"1f9d6-1f3ff-2640","🧖🏿♂":"1f9d6-1f3ff-2642","🧗🏻♀":"1f9d7-1f3fb-2640","🧗🏻♂":"1f9d7-1f3fb-2642","🧗🏼♀":"1f9d7-1f3fc-2640","🧗🏼♂":"1f9d7-1f3fc-2642","🧗🏽♀":"1f9d7-1f3fd-2640","🧗🏽♂":"1f9d7-1f3fd-2642","🧗🏾♀":"1f9d7-1f3fe-2640","🧗🏾♂":"1f9d7-1f3fe-2642","🧗🏿♀":"1f9d7-1f3ff-2640","🧗🏿♂":"1f9d7-1f3ff-2642","🧘🏻♀":"1f9d8-1f3fb-2640","🧘🏻♂":"1f9d8-1f3fb-2642","🧘🏼♀":"1f9d8-1f3fc-2640","🧘🏼♂":"1f9d8-1f3fc-2642","🧘🏽♀":"1f9d8-1f3fd-2640","🧘🏽♂":"1f9d8-1f3fd-2642","🧘🏾♀":"1f9d8-1f3fe-2640","🧘🏾♂":"1f9d8-1f3fe-2642","🧘🏿♀":"1f9d8-1f3ff-2640","🧘🏿♂":"1f9d8-1f3ff-2642","🦸🏻♀":"1f9b8-1f3fb-2640","🦸🏻♂":"1f9b8-1f3fb-2642","🦸🏼♀":"1f9b8-1f3fc-2640","🦸🏼♂":"1f9b8-1f3fc-2642","🦸🏽♀":"1f9b8-1f3fd-2640","🦸🏽♂":"1f9b8-1f3fd-2642","🦸🏾♀":"1f9b8-1f3fe-2640","🦸🏾♂":"1f9b8-1f3fe-2642","🦸🏿♀":"1f9b8-1f3ff-2640","🦸🏿♂":"1f9b8-1f3ff-2642","🦹🏻♀":"1f9b9-1f3fb-2640","🦹🏻♂":"1f9b9-1f3fb-2642","🦹🏼♀":"1f9b9-1f3fc-2640","🦹🏼♂":"1f9b9-1f3fc-2642","🦹🏽♀":"1f9b9-1f3fd-2640","🦹🏽♂":"1f9b9-1f3fd-2642","🦹🏾♀":"1f9b9-1f3fe-2640","🦹🏾♂":"1f9b9-1f3fe-2642","🦹🏿♀":"1f9b9-1f3ff-2640","🦹🏿♂":"1f9b9-1f3ff-2642","⛹🏻♀":"26f9-1f3fb-2640","⛹🏻♂":"26f9-1f3fb-2642","⛹🏼♀":"26f9-1f3fc-2640","⛹🏼♂":"26f9-1f3fc-2642","⛹🏽♀":"26f9-1f3fd-2640","⛹🏽♂":"26f9-1f3fd-2642","⛹🏾♀":"26f9-1f3fe-2640","⛹🏾♂":"26f9-1f3fe-2642","⛹🏿♀":"26f9-1f3ff-2640","⛹🏿♂":"26f9-1f3ff-2642","🏳🌈":"1f3f3-1f308","👁🗨":"1f441-1f5e8","👯♂":"1f46f-2642","👯♀":"1f46f-2640","🏌♂":"1f3cc-2642","🏌♀":"1f3cc-2640","🤼♂":"1f93c-2642","🤼♀":"1f93c-2640","🤹♂":"1f939-2642","🤹♀":"1f939-2640","🤾♂":"1f93e-2642","🤾♀":"1f93e-2640","🤽♂":"1f93d-2642","🤽♀":"1f93d-2640","🤸♂":"1f938-2642","🤸♀":"1f938-2640","🚶♂":"1f6b6-2642","🚶♀":"1f6b6-2640","🚵♂":"1f6b5-2642","🚵♀":"1f6b5-2640","🚴♂":"1f6b4-2642","🚴♀":"1f6b4-2640","🚣♂":"1f6a3-2642","🚣♀":"1f6a3-2640","🏋♂":"1f3cb-2642","🏋♀":"1f3cb-2640","🏊♂":"1f3ca-2642","🏊♀":"1f3ca-2640","🏄♂":"1f3c4-2642","🏄♀":"1f3c4-2640","🏃♂":"1f3c3-2642","🏃♀":"1f3c3-2640","🤷♂":"1f937-2642","🤷♀":"1f937-2640","🤦♂":"1f926-2642","🤦♀":"1f926-2640","🙎♂":"1f64e-2642","🙎♀":"1f64e-2640","🙍♂":"1f64d-2642","🙍♀":"1f64d-2640","🙋♂":"1f64b-2642","🙋♀":"1f64b-2640","🙇♂":"1f647-2642","🙇♀":"1f647-2640","🙆♂":"1f646-2642","🙆♀":"1f646-2640","🙅♂":"1f645-2642","🙅♀":"1f645-2640","💇♂":"1f487-2642","💇♀":"1f487-2640","💆♂":"1f486-2642","💆♀":"1f486-2640","💁♂":"1f481-2642","💁♀":"1f481-2640","👱♂":"1f471-2642","👱♀":"1f471-2640","👳♂":"1f473-2642","👳♀":"1f473-2640","💂♂":"1f482-2642","💂♀":"1f482-2640","🕵♂":"1f575-2642","🕵♀":"1f575-2640","👷♂":"1f477-2642","👷♀":"1f477-2640","👮♂":"1f46e-2642","👮♀":"1f46e-2640","👨⚕":"1f468-2695","👩⚕":"1f469-2695","👨⚖":"1f468-2696","👩⚖":"1f469-2696","👨✈":"1f468-2708","👩✈":"1f469-2708","🧙♀":"1f9d9-2640","🧙♂":"1f9d9-2642","🧚♀":"1f9da-2640","🧚♂":"1f9da-2642","🧛♀":"1f9db-2640","🧛♂":"1f9db-2642","🧜♀":"1f9dc-2640","🧜♂":"1f9dc-2642","🧝♀":"1f9dd-2640","🧝♂":"1f9dd-2642","🧞♀":"1f9de-2640","🧞♂":"1f9de-2642","🧟♀":"1f9df-2640","🧟♂":"1f9df-2642","🧖♀":"1f9d6-2640","🧖♂":"1f9d6-2642","🧗♀":"1f9d7-2640","🧗♂":"1f9d7-2642","🧘♀":"1f9d8-2640","🧘♂":"1f9d8-2642","🦸♀":"1f9b8-2640","🦸♂":"1f9b8-2642","🦹♀":"1f9b9-2640","🦹♂":"1f9b9-2642","🏴☠":"1f3f4-2620","⛹♂":"26f9-2642","⛹♀":"26f9-2640","🕉":"1f549","🗝":"1f5dd","‼":"203c","⁉":"2049","ℹ":"2139","↔":"2194","↕":"2195","↖":"2196","↗":"2197","↘":"2198","↙":"2199","↩":"21a9","↪":"21aa","▪":"25aa","▫":"25ab","▶":"25b6","◀":"25c0","◻":"25fb","◼":"25fc","☑":"2611","⚠":"26a0","✔":"2714","✖":"2716","➡":"27a1","⤴":"2934","⤵":"2935","⬅":"2b05","⬆":"2b06","⬇":"2b07","〰":"3030","✝":"271d","⏏":"23cf","⏭":"23ed","⏮":"23ee","⏯":"23ef","⏸":"23f8","⏹":"23f9","⏺":"23fa","☢":"2622","☣":"2623","☦":"2626","☪":"262a","☮":"262e","☯":"262f","☸":"2638","⚛":"269b","✡":"2721","♀":"2640","♂":"2642","⚕":"2695"},d.asciiList={"*\\0/*":"1f646","*\\O/*":"1f646","-___-":"1f611",":'-)":"1f602","':-)":"1f605","':-D":"1f605",">:-)":"1f606","':-(":"1f613",">:-(":"1f620",":'-(":"1f622","O:-)":"1f607","0:-3":"1f607","0:-)":"1f607","0;^)":"1f607","O;-)":"1f607","0;-)":"1f607","O:-3":"1f607","-__-":"1f611",":-Þ":"1f61b","</3":"1f494",":')":"1f602",":-D":"1f603","':)":"1f605","'=)":"1f605","':D":"1f605","'=D":"1f605",">:)":"1f606",">;)":"1f606",">=)":"1f606",";-)":"1f609","*-)":"1f609",";-]":"1f609",";^)":"1f609","':(":"1f613","'=(":"1f613",":-*":"1f618",":^*":"1f618",">:P":"1f61c","X-P":"1f61c",">:[":"1f61e",":-(":"1f61e",":-[":"1f61e",">:(":"1f620",":'(":"1f622",";-(":"1f622",">.<":"1f623","#-)":"1f635","%-)":"1f635","X-)":"1f635","\\0/":"1f646","\\O/":"1f646","0:3":"1f607","0:)":"1f607","O:)":"1f607","O=)":"1f607","O:3":"1f607","B-)":"1f60e","8-)":"1f60e","B-D":"1f60e","8-D":"1f60e","-_-":"1f611",">:\\":"1f615",">:/":"1f615",":-/":"1f615",":-.":"1f615",":-P":"1f61b",":Þ":"1f61b",":-b":"1f61b",":-O":"1f62e",O_O:"1f62e",">:O":"1f62e",":-X":"1f636",":-#":"1f636",":-)":"1f642","(y)":"1f44d","<3":"2764",":D":"1f603","=D":"1f603",";)":"1f609","*)":"1f609",";]":"1f609",";D":"1f609",":*":"1f618","=*":"1f618",":(":"1f61e",":[":"1f61e","=(":"1f61e",":@":"1f620",";(":"1f622","D:":"1f628",":$":"1f633","=$":"1f633","#)":"1f635","%)":"1f635","X)":"1f635","B)":"1f60e","8)":"1f60e",":/":"1f615",":\\":"1f615","=/":"1f615","=\\":"1f615",":L":"1f615","=L":"1f615",":P":"1f61b","=P":"1f61b",":b":"1f61b",":O":"1f62e",":X":"1f636",":#":"1f636","=X":"1f636","=#":"1f636",":)":"1f642","=]":"1f642","=)":"1f642",":]":"1f642"},d.asciiRegexp="(\\*\\\\0\\/\\*|\\*\\\\O\\/\\*|\\-___\\-|\\:'\\-\\)|'\\:\\-\\)|'\\:\\-D|\\>\\:\\-\\)|>\\:\\-\\)|'\\:\\-\\(|\\>\\:\\-\\(|>\\:\\-\\(|\\:'\\-\\(|O\\:\\-\\)|0\\:\\-3|0\\:\\-\\)|0;\\^\\)|O;\\-\\)|0;\\-\\)|O\\:\\-3|\\-__\\-|\\:\\-Þ|\\:\\-Þ|\\<\\/3|<\\/3|\\:'\\)|\\:\\-D|'\\:\\)|'\\=\\)|'\\:D|'\\=D|\\>\\:\\)|>\\:\\)|\\>;\\)|>;\\)|\\>\\=\\)|>\\=\\)|;\\-\\)|\\*\\-\\)|;\\-\\]|;\\^\\)|'\\:\\(|'\\=\\(|\\:\\-\\*|\\:\\^\\*|\\>\\:P|>\\:P|X\\-P|\\>\\:\\[|>\\:\\[|\\:\\-\\(|\\:\\-\\[|\\>\\:\\(|>\\:\\(|\\:'\\(|;\\-\\(|\\>\\.\\<|>\\.<|#\\-\\)|%\\-\\)|X\\-\\)|\\\\0\\/|\\\\O\\/|0\\:3|0\\:\\)|O\\:\\)|O\\=\\)|O\\:3|B\\-\\)|8\\-\\)|B\\-D|8\\-D|\\-_\\-|\\>\\:\\\\|>\\:\\\\|\\>\\:\\/|>\\:\\/|\\:\\-\\/|\\:\\-\\.|\\:\\-P|\\:Þ|\\:Þ|\\:\\-b|\\:\\-O|O_O|\\>\\:O|>\\:O|\\:\\-X|\\:\\-#|\\:\\-\\)|\\(y\\)|\\<3|<3|\\:D|\\=D|;\\)|\\*\\)|;\\]|;D|\\:\\*|\\=\\*|\\:\\(|\\:\\[|\\=\\(|\\:@|;\\(|D\\:|\\:\\$|\\=\\$|#\\)|%\\)|X\\)|B\\)|8\\)|\\:\\/|\\:\\\\|\\=\\/|\\=\\\\|\\:L|\\=L|\\:P|\\=P|\\:b|\\:O|\\:X|\\:#|\\=X|\\=#|\\:\\)|\\=\\]|\\=\\)|\\:\\])",d.emojiVersion="4.5",d.emojiSize="32",d.greedyMatch=!1,d.blacklistChars="",d.imagePathPNG="https://cdn.jsdelivr.net/emojione/assets/"+d.emojiVersion+"/png/",d.defaultPathPNG=d.imagePathPNG,d.fileExtension=".png",d.imageTitleTag=!0,d.sprites=!1,d.unicodeAlt=!0,d.ascii=!1,d.riskyMatchAscii=!1,d.regShortNames=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|("+d.shortnames+")","gi"),d.regAscii=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|((\\s|^)"+d.asciiRegexp+"(?=\\s|$|[!,.?]))","gi"),d.regAsciiRisky=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|(()"+d.asciiRegexp+"())","gi"),d.regUnicode=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|(?:🏳)️?\200d?(?:🌈)|(?:👁)️?\200d?(?:🗨)️?|[#-9]️?⃣|(?:(?:🏴)(?:\udb40[\udc60-\udcff]){1,6})|(?:\ud83c[\udde0-\uddff]){2}|(?:(?:\ud83d[\udc68\udc69]))️?(?:\ud83c[\udffa-\udfff])?\200d?(?:[⚕⚖✈]|\ud83c[\udf3e-\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92])|(?:\ud83d[\udc68\udc69]|\ud83e[\uddd0-\udddf])(?:\ud83c[\udffa-\udfff])?\200d?[♀♂⚕⚖✈]?️?|(?:(?:❤|\ud83d[\udc66-\udc69\udc8b])[\200d️]{0,2}){1,3}(?:❤|\ud83d[\udc66-\udc69\udc8b])|(?:(?:❤|\ud83d[\udc66-\udc69\udc8b])️?){2,4}|(?:\ud83d[\udc68\udc69\udc6e\udc71-\udc87\udd75\ude45-\ude4e]|\ud83e[\udd26\udd37]|\ud83c[\udfc3-\udfcc]|\ud83e[\udd38-\udd3e]|\ud83d[\udea3-\udeb6]|⛹|👯)️?(?:\ud83c[\udffb-\udfff])?\200d?[♀♂]?️?|(?:[☝⛹✊-✍]|\ud83c[\udf85-\udfcc]|\ud83d[\udc42-\udcaa\udd74-\udd96\ude45-\ude4f\udea3-\udecc]|\ud83e[\udd18-\udd3e])️?(?:\ud83c[\udffb-\udfff])|(?:[↔-↙↩-↪]️?|[#*]|[〰〽]️?|(?:\ud83c[\udd70-\udd71]|🆎|\ud83c[\udd91-\udd9a])️?|Ⓜ️?|[㊗㊙]️?|(?:\ud83c[\ude01-\ude02]|🈚|🈯|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51])️?|[‼⁉]️?|[▪-▫▶◀◻-◾]️?|[©®]️?|[™ℹ]️?|🀄️?|[⬅-⬇⬛-⬜⭐⭕]️?|[⌚-⌛⌨⏏⏩-⏳⏸-⏺]️?|🃏|[⤴⤵]️?)|[✀-➿]️?|[\ud800-\udbff][\udc00-\udfff]️?|[☀-⛿]️?|[0-9]️","g"),d.toImage=function(e){return e=d.toShort(e),e=d.shortnameToImage(e),e=d.wipeVS16(e)},d.unicodeToImage=function(e){return e},d.wipeVS16=function(e){var t=d.vs16Regex();return d.replaceAllVS16(e,t)},d.unifyUnicode=function(e){return e=d.toShort(e),e=d.shortnameToUnicode(e)},d.shortnameToAscii=function(e){var t,n=d.objectFlip(d.asciiList);return e=e.replace(d.regShortNames,function(e){return void 0!==e&&""!==e&&e in d.emojioneList?(t=d.emojioneList[e].uc_output,void 0!==n[t]?n[t]:e):e})},d.shortnameToUnicode=function(e){var i;if(e=e.replace(d.regShortNames,function(e){return void 0!==e&&""!==e&&e in d.emojioneList?(i=d.emojioneList[e].uc_output.toUpperCase(),d.emojioneList[e].uc_base,d.convert(i)):e}),d.ascii){var t=d.riskyMatchAscii?d.regAsciiRisky:d.regAscii;e=e.replace(t,function(e,t,n,r){return void 0!==r&&""!==r&&d.unescapeHTML(r)in d.asciiList?(r=d.unescapeHTML(r),i=d.asciiList[r].toUpperCase(),n+d.convert(i)):e})}return e},d.shortnameToImage=function(e){var i,a,n,o,s,c,l,u,f=d.mapUnicodeToShort();if(e=e.replace(d.regShortNames,function(e){if(void 0===e||""===e||-1===d.shortnames.indexOf(e))return e;if(!d.emojioneList[e])for(var t in d.emojioneList)if(d.emojioneList.hasOwnProperty(t)&&""!==t&&-1!==d.emojioneList[t].shortnames.indexOf(e)){e=t;break}return a=d.emojioneList[e].uc_output,n=d.emojioneList[e].uc_base,s=0<=n.indexOf("-1f3f")?"diversity":d.emojioneList[e].category,c=d.imageTitleTag?'title="'+e+'"':"",l="32"==d.spriteSize||"64"==d.spriteSize?d.spriteSize:"32",u=d.defaultPathPNG!==d.imagePathPNG?d.imagePathPNG:d.defaultPathPNG+d.emojiSize+"/",o=d.unicodeAlt?d.convert(a.toUpperCase()):e,d.sprites?'<span class="emojione emojione-'+l+"-"+s+" _"+n+'" '+c+">"+o+"</span>":'<img class="emojione" alt="'+o+'" '+c+' src="'+u+n+d.fileExtension+'"/>'}),d.ascii){var t=d.riskyMatchAscii?d.regAsciiRisky:d.regAscii;e=e.replace(t,function(e,t,n,r){return void 0!==r&&""!==r&&d.unescapeHTML(r)in d.asciiList?(r=d.unescapeHTML(r),a=d.asciiList[r],i=f[a],s=0<=a.indexOf("-1f3f")?"diversity":d.emojioneList[i].category,c=d.imageTitleTag?'title="'+d.escapeHTML(r)+'"':"",l="32"==d.spriteSize||"64"==d.spriteSize?d.spriteSize:"32",u=d.defaultPathPNG!==d.imagePathPNG?d.imagePathPNG:d.defaultPathPNG+d.emojiSize+"/",o=d.unicodeAlt?d.convert(a.toUpperCase()):d.escapeHTML(r),d.sprites?n+'<span class="emojione emojione-'+l+"-"+s+" _"+a+'"  '+c+">"+o+"</span>":n+'<img class="emojione" alt="'+o+'" '+c+' src="'+u+a+d.fileExtension+'"/>'):e})}return e},d.toShort=function(e){var t=d.unicodeCharRegex();return e=d.replaceAll(e,t)},d.convert=function(e){if(-1<e.indexOf("-")){for(var t=[],n=e.split("-"),r=0;r<n.length;r++){var i=parseInt(n[r],16);if(65536<=i&&i<=1114111){var a=Math.floor((i-65536)/1024)+55296,o=(i-65536)%1024+56320;i=String.fromCharCode(a)+String.fromCharCode(o)}else i=String.fromCharCode(i);t.push(i)}return t.join("")}if(65536<=(n=parseInt(e,16))&&n<=1114111){a=Math.floor((n-65536)/1024)+55296,o=(n-65536)%1024+56320;return String.fromCharCode(a)+String.fromCharCode(o)}return String.fromCharCode(n)},d.escapeHTML=function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return e.replace(/[&<>"']/g,function(e){return t[e]})},d.unescapeHTML=function(e){var t={"&amp;":"&","&#38;":"&","&#x26;":"&","&lt;":"<","&#60;":"<","&#x3C;":"<","&gt;":">","&#62;":">","&#x3E;":">","&quot;":'"',"&#34;":'"',"&#x22;":'"',"&apos;":"'","&#39;":"'","&#x27;":"'"};return e.replace(/&(?:amp|#38|#x26|lt|#60|#x3C|gt|#62|#x3E|apos|#39|#x27|quot|#34|#x22);/gi,function(e){return t[e]})},d.shortnameConversionMap=function(){var e,t=[];for(e in d.emojioneList)d.emojioneList.hasOwnProperty(e)&&""!==e&&(t[d.convert(d.emojioneList[e].uc_output)]=e);return t},d.unicodeCharRegex=function(){var e=[];for(t in d.emojioneList)d.emojioneList.hasOwnProperty(t)&&""!==t&&e.push(d.convert(d.emojioneList[t].uc_output));return e.join("|")},d.vs16Regex=function(){return d.convert("fe0f")},d.mapEmojioneList=function(e){for(var t in d.emojioneList){if(d.emojioneList.hasOwnProperty(t))e(d.emojioneList[t].uc_base,t)}},d.mapUnicodeToShort=function(){return d.memMapShortToUnicode||(d.memMapShortToUnicode={},d.mapEmojioneList(function(e,t){d.memMapShortToUnicode[e]=t})),d.memMapShortToUnicode},d.memorizeReplacement=function(){if(!d.unicodeReplacementRegEx||!d.memMapShortToUnicodeCharacters){var r=[];d.memMapShortToUnicodeCharacters={},d.mapEmojioneList(function(e,t){var n=d.convert(e);d.memMapShortToUnicodeCharacters[n]=t,r.push(n)}),d.unicodeReplacementRegEx=r.join("|")}},d.mapUnicodeCharactersToShort=function(){return d.memorizeReplacement(),d.memMapShortToUnicodeCharacters},d.objectFlip=function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n},d.escapeRegExp=function(e){return e.replace(/[-[\]{}()*+?.,;:&\\^$#\s]/g,"\\$&")},d.replaceAll=function(e,t){var n=d.escapeRegExp(t),r=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|("+n+")","gi");return e.replace(r,function(e,t){return void 0===t||""===t?e:d.shortnameConversionMap()[t]})},d.replaceAllVS16=function(e,t){var n=d.escapeRegExp(t),r=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|("+n+")","gi");return e.replace(r,function(e,t){return void 0===t||""===t?e:""})}}(this.emojione=this.emojione||{}),"object"==typeof module&&(module.exports=this.emojione),function(e){if("function"==typeof define&&define.amd)define(["jquery"],e);else if("object"==typeof module&&module.exports){var t=require("jquery");module.exports=e(t)}else e(jQuery)}(function(e){if(void 0===e)throw new Error("jQuery.textcomplete requires jQuery");var t,u,f,d;return function(a){"use strict";var o=1;a.fn.textcomplete=function(t,n){var i=Array.prototype.slice.call(arguments);return this.each(function(){var e=a(this),r=e.data("textComplete");if(r||(n||(n={}),n._oid=o++,r=new a.fn.textcomplete.Completer(this,n),e.data("textComplete",r)),"string"==typeof t){if(!r)return;i.shift(),r[t].apply(r,i),"destroy"===t&&e.removeData("textComplete")}else a.each(t,function(n){a.each(["header","footer","placement","maxCount"],function(e){var t;n[e]&&(r.option[e]=n[e],t=e+"as a strategy param is deprecated. Use option.",console.warn&&console.warn(t),delete n[e])})}),r.register(a.fn.textcomplete.Strategy.parse(t,{el:this,$el:e}))})}}(e),function(r){"use strict";var i,a,o,s=0;function c(e,t){if(this.$el=r(e),this.id="textcomplete"+s++,this.strategies=[],this.views=[],this.option=r.extend({},c._getDefaults(),t),!(this.$el.is("input[type=text]")||this.$el.is("input[type=search]")||this.$el.is("textarea")||e.isContentEditable||"true"==e.contentEditable))throw new Error("textcomplete must be called on a Textarea or a ContentEditable.");if(e===document.activeElement)this.initialize();else{var n=this;this.$el.one("focus."+this.id,function(){n.initialize()})}}c._getDefaults=function(){return c.DEFAULTS||(c.DEFAULTS={appendTo:r("body"),zIndex:"100"}),c.DEFAULTS},r.extend(c.prototype,{id:null,option:null,strategies:null,adapter:null,dropdown:null,$el:null,initialize:function(){var e,t,n=this.$el.get(0);this.dropdown=new r.fn.textcomplete.Dropdown(n,this,this.option),e=this.option.adapter?this.option.adapter:(t=this.$el.is("textarea")||this.$el.is("input[type=text]")||this.$el.is("input[type=search]")?"number"==typeof n.selectionEnd?"Textarea":"IETextarea":"ContentEditable",r.fn.textcomplete[t]),this.adapter=new e(n,this,this.option)},destroy:function(){this.$el.off("."+this.id),this.adapter&&this.adapter.destroy(),this.dropdown&&this.dropdown.destroy(),this.$el=this.adapter=this.dropdown=null},deactivate:function(){this.dropdown&&this.dropdown.deactivate()},trigger:function(e,t){this.dropdown||this.initialize(),null!=e||(e=this.adapter.getTextFromHeadToCaret());var n=this._extractSearchQuery(e);if(n.length){var r=n[1];if(t&&this._term===r&&""!==r)return;this._term=r,this._search.apply(this,n)}else this._term=null,this.dropdown.deactivate()},fire:function(e){var t=Array.prototype.slice.call(arguments,1);return this.$el.trigger(e,t),this},register:function(e){Array.prototype.push.apply(this.strategies,e)},select:function(e,t,n){this._term=null,this.adapter.select(e,t,n),this.fire("change").fire("textComplete:select",e,t),this.adapter.focus()},_clearAtNext:!0,_term:null,_extractSearchQuery:function(e){for(var t=0;t<this.strategies.length;t++){var n=this.strategies[t],r=n.context(e);if(r||""===r){var i=(s=n.match,"[object Function]"===Object.prototype.toString.call(s)?n.match(e):n.match);o=r,"[object String]"===Object.prototype.toString.call(o)&&(e=r);var a=e.match(i);if(a)return[n,a[n.index],a]}}var o,s;return[]},_search:(i=function(n,r,i,e){var a=this;r.search(i,function(e,t){a.dropdown.shown||a.dropdown.activate(),a._clearAtNext&&(a.dropdown.clear(),a._clearAtNext=!1),a.dropdown.setPosition(a.adapter.getCaretPosition()),a.dropdown.render(a._zip(e,r,i)),t||(n(),a._clearAtNext=!0)},e)},function(){var e=Array.prototype.slice.call(arguments);if(a)o=e;else{a=!0;var n=this;e.unshift(function e(){if(o){var t=o;o=void 0,t.unshift(e),i.apply(n,t)}else a=!1}),i.apply(this,e)}}),_zip:function(e,t,n){return r.map(e,function(e){return{value:e,strategy:t,term:n}})}}),r.fn.textcomplete.Completer=c}(e),function(i){"use strict";var a=i(window),o=function(e,t){var n,r,i=t.strategy.idProperty;for(n=0;n<e.length;n++)if((r=e[n]).strategy===t.strategy)if(i){if(r.value[i]===t.value[i])return!0}else if(r.value===t.value)return!0;return!1},s={};i(document).on("click",function(e){var n=e.originalEvent&&e.originalEvent.keepTextCompleteDropdown;i.each(s,function(e,t){e!==n&&t.deactivate()})});var n={SKIP_DEFAULT:0,KEY_UP:1,KEY_DOWN:2,KEY_ENTER:3,KEY_PAGEUP:4,KEY_PAGEDOWN:5,KEY_ESCAPE:6};function c(e,t,n){this.$el=c.createElement(n),this.completer=t,this.id=t.id+"dropdown",this._data=[],this.$inputEl=i(e),(this.option=n).listPosition&&(this.setPosition=n.listPosition),n.height&&this.$el.height(n.height);var r=this;i.each(["maxCount","placement","footer","header","noResultsMessage","className"],function(e,t){null!=n[t]&&(r[t]=n[t])}),this._bindEvents(e),s[this.id]=this}i.extend(c,{createElement:function(e){var t=e.appendTo;return t instanceof i||(t=i(t)),i("<ul></ul>").addClass("dropdown-menu textcomplete-dropdown").attr("id","textcomplete-dropdown-"+e._oid).css({display:"none",left:0,position:"absolute",zIndex:e.zIndex}).appendTo(t)}}),i.extend(c.prototype,{$el:null,$inputEl:null,completer:null,footer:null,header:null,id:null,maxCount:10,placement:"",shown:!1,data:[],className:"",destroy:function(){this.deactivate(),this.$el.off("."+this.id),this.$inputEl.off("."+this.id),this.clear(),this.$el.remove(),this.$el=this.$inputEl=this.completer=null,delete s[this.id]},render:function(e){var t=this._buildContents(e),n=i.map(this.data,function(e){return e.value});if(this.data.length){var r=e[0].strategy;r.id?this.$el.attr("data-strategy",r.id):this.$el.removeAttr("data-strategy"),this._renderHeader(n),this._renderFooter(n),t&&(this._renderContents(t),this._fitToBottom(),this._fitToRight(),this._activateIndexedItem()),this._setScroll()}else this.noResultsMessage?this._renderNoResultsMessage(n):this.shown&&this.deactivate()},setPosition:function(e){var t="absolute";return this.$inputEl.add(this.$inputEl.parents()).each(function(){return"absolute"!==i(this).css("position")&&("fixed"===i(this).css("position")?(e.top-=a.scrollTop(),e.left-=a.scrollLeft(),!(t="fixed")):void 0)}),this.$el.css(this._applyPlacement(e)),this.$el.css({position:t}),this},clear:function(){this.$el.html(""),this.data=[],this._index=0,this._$header=this._$footer=this._$noResultsMessage=null},activate:function(){return this.shown||(this.clear(),this.$el.show(),this.className&&this.$el.addClass(this.className),this.completer.fire("textComplete:show"),this.shown=!0),this},deactivate:function(){return this.shown&&(this.$el.hide(),this.className&&this.$el.removeClass(this.className),this.completer.fire("textComplete:hide"),this.shown=!1),this},isUp:function(e){return 38===e.keyCode||e.ctrlKey&&80===e.keyCode},isDown:function(e){return 40===e.keyCode||e.ctrlKey&&78===e.keyCode},isEnter:function(e){return!(e.ctrlKey||e.altKey||e.metaKey||e.shiftKey)&&(13===e.keyCode||9===e.keyCode||!0===this.option.completeOnSpace&&32===e.keyCode)},isPageup:function(e){return 33===e.keyCode},isPagedown:function(e){return 34===e.keyCode},isEscape:function(e){return 27===e.keyCode},_data:null,_index:null,_$header:null,_$noResultsMessage:null,_$footer:null,_bindEvents:function(){this.$el.on("mousedown."+this.id,".textcomplete-item",i.proxy(this._onClick,this)),this.$el.on("touchstart."+this.id,".textcomplete-item",i.proxy(this._onClick,this)),this.$el.on("mouseover."+this.id,".textcomplete-item",i.proxy(this._onMouseover,this)),this.$inputEl.on("keydown."+this.id,i.proxy(this._onKeydown,this))},_onClick:function(e){var t=i(e.target);e.preventDefault(),e.originalEvent.keepTextCompleteDropdown=this.id,t.hasClass("textcomplete-item")||(t=t.closest(".textcomplete-item"));var n=this.data[parseInt(t.data("index"),10)];this.completer.select(n.value,n.strategy,e);var r=this;setTimeout(function(){r.deactivate(),"touchstart"===e.type&&r.$inputEl.focus()},0)},_onMouseover:function(e){var t=i(e.target);e.preventDefault(),t.hasClass("textcomplete-item")||(t=t.closest(".textcomplete-item")),this._index=parseInt(t.data("index"),10),this._activateIndexedItem()},_onKeydown:function(e){var t;if(this.shown)switch(i.isFunction(this.option.onKeydown)&&(t=this.option.onKeydown(e,n)),null==t&&(t=this._defaultKeydown(e)),t){case n.KEY_UP:e.preventDefault(),this._up();break;case n.KEY_DOWN:e.preventDefault(),this._down();break;case n.KEY_ENTER:e.preventDefault(),this._enter(e);break;case n.KEY_PAGEUP:e.preventDefault(),this._pageup();break;case n.KEY_PAGEDOWN:e.preventDefault(),this._pagedown();break;case n.KEY_ESCAPE:e.preventDefault(),this.deactivate()}},_defaultKeydown:function(e){return this.isUp(e)?n.KEY_UP:this.isDown(e)?n.KEY_DOWN:this.isEnter(e)?n.KEY_ENTER:this.isPageup(e)?n.KEY_PAGEUP:this.isPagedown(e)?n.KEY_PAGEDOWN:this.isEscape(e)?n.KEY_ESCAPE:void 0},_up:function(){0===this._index?this._index=this.data.length-1:this._index-=1,this._activateIndexedItem(),this._setScroll()},_down:function(){this._index===this.data.length-1?this._index=0:this._index+=1,this._activateIndexedItem(),this._setScroll()},_enter:function(e){var t=this.data[parseInt(this._getActiveElement().data("index"),10)];this.completer.select(t.value,t.strategy,e),this.deactivate()},_pageup:function(){var t=0,n=this._getActiveElement().position().top-this.$el.innerHeight();this.$el.children().each(function(e){if(i(this).position().top+i(this).outerHeight()>n)return t=e,!1}),this._index=t,this._activateIndexedItem(),this._setScroll()},_pagedown:function(){var t=this.data.length-1,n=this._getActiveElement().position().top+this.$el.innerHeight();this.$el.children().each(function(e){if(i(this).position().top>n)return t=e,!1}),this._index=t,this._activateIndexedItem(),this._setScroll()},_activateIndexedItem:function(){this.$el.find(".textcomplete-item.active").removeClass("active"),this._getActiveElement().addClass("active")},_getActiveElement:function(){return this.$el.children(".textcomplete-item:nth("+this._index+")")},_setScroll:function(){var e=this._getActiveElement(),t=e.position().top,n=e.outerHeight(),r=this.$el.innerHeight(),i=this.$el.scrollTop();0===this._index||this._index==this.data.length-1||t<0?this.$el.scrollTop(t+i):r<t+n&&this.$el.scrollTop(t+n+i-r)},_buildContents:function(e){var t,n,r,i="";for(n=0;n<e.length&&this.data.length!==this.maxCount;n++)t=e[n],o(this.data,t)||(r=this.data.length,this.data.push(t),i+='<li class="textcomplete-item" data-index="'+r+'"><a>',i+=t.strategy.template(t.value,t.term),i+="</a></li>");return i},_renderHeader:function(e){if(this.header){this._$header||(this._$header=i('<li class="textcomplete-header"></li>').prependTo(this.$el));var t=i.isFunction(this.header)?this.header(e):this.header;this._$header.html(t)}},_renderFooter:function(e){if(this.footer){this._$footer||(this._$footer=i('<li class="textcomplete-footer"></li>').appendTo(this.$el));var t=i.isFunction(this.footer)?this.footer(e):this.footer;this._$footer.html(t)}},_renderNoResultsMessage:function(e){if(this.noResultsMessage){this._$noResultsMessage||(this._$noResultsMessage=i('<li class="textcomplete-no-results-message"></li>').appendTo(this.$el));var t=i.isFunction(this.noResultsMessage)?this.noResultsMessage(e):this.noResultsMessage;this._$noResultsMessage.html(t)}},_renderContents:function(e){this._$footer?this._$footer.before(e):this.$el.append(e)},_fitToBottom:function(){var e=a.scrollTop()+a.height(),t=this.$el.height();this.$el.position().top+t>e&&this.$el.offset({top:e-t})},_fitToRight:function(){for(var e,t=this.$el.offset().left,n=this.$el.width(),r=a.width()-30;r<t+n&&(this.$el.offset({left:t-30}),!(t<=(e=this.$el.offset().left)));)t=e},_applyPlacement:function(e){return-1!==this.placement.indexOf("top")?e={top:"auto",bottom:this.$el.parent().height()-e.top+e.lineHeight,left:e.left}:(e.bottom="auto",delete e.lineHeight),-1!==this.placement.indexOf("absleft")?e.left=0:-1!==this.placement.indexOf("absright")&&(e.right=0,e.left="auto"),e}}),i.fn.textcomplete.Dropdown=c,i.extend(i.fn.textcomplete,n)}(e),function(t){"use strict";function r(e){var r,i;t.extend(this,e),this.cache&&(this.search=(r=this.search,i={},function(t,n){i[t]?n(i[t]):r.call(this,t,function(e){i[t]=(i[t]||[]).concat(e),n.apply(null,arguments)})}))}r.parse=function(e,n){return t.map(e,function(e){var t=new r(e);return t.el=n.el,t.$el=n.$el,t})},t.extend(r.prototype,{match:null,replace:null,search:null,id:null,cache:!1,context:function(){return!0},index:2,template:function(e){return e},idProperty:null}),t.fn.textcomplete.Strategy=r}(e),function(f){"use strict";var d=Date.now||function(){return(new Date).getTime()};function e(){}f.extend(e.prototype,{id:null,completer:null,el:null,$el:null,option:null,initialize:function(e,t,n){var r,i,a,o,s,c,l,u;this.el=e,this.$el=f(e),this.id=t.id+this.constructor.name,this.completer=t,this.option=n,this.option.debounce&&(this._onKeyup=(r=this._onKeyup,i=this.option.debounce,u=function(){var e=d()-c;e<i?a=setTimeout(u,i-e):(a=null,l=r.apply(s,o),s=o=null)},function(){return s=this,o=arguments,c=d(),a||(a=setTimeout(u,i)),l})),this._bindEvents()},destroy:function(){this.$el.off("."+this.id),this.$el=this.el=this.completer=null},select:function(){throw new Error("Not implemented")},getCaretPosition:function(){var e=this._getCaretRelativePosition(),t=this.$el.offset(),n=this.option.appendTo;if(n){n instanceof f||(n=f(n));var r=n.offsetParent().offset();t.top-=r.top,t.left-=r.left}return e.top+=t.top,e.left+=t.left,e},focus:function(){this.$el.focus()},_bindEvents:function(){this.$el.on("keyup."+this.id,f.proxy(this._onKeyup,this))},_onKeyup:function(e){this._skipSearch(e)||this.completer.trigger(this.getTextFromHeadToCaret(),!0)},_skipSearch:function(e){switch(e.keyCode){case 9:case 13:case 40:case 38:return!0}if(e.ctrlKey)switch(e.keyCode){case 78:case 80:return!0}}}),f.fn.textcomplete.Adapter=e}(e),function(o){"use strict";function e(e,t,n){this.initialize(e,t,n)}o.extend(e.prototype,o.fn.textcomplete.Adapter.prototype,{select:function(e,t,n){var r=this.getTextFromHeadToCaret(),i=this.el.value.substring(this.el.selectionEnd),a=t.replace(e,n);void 0!==a&&(o.isArray(a)&&(i=a[1]+i,a=a[0]),r=r.replace(t.match,a),this.$el.val(r+i),this.el.selectionStart=this.el.selectionEnd=r.length)},getTextFromHeadToCaret:function(){return this.el.value.substring(0,this.el.selectionEnd)},_getCaretRelativePosition:function(){var e=o.fn.textcomplete.getCaretCoordinates(this.el,this.el.selectionStart);return{top:e.top+this._calculateLineHeight()-this.$el.scrollTop(),left:e.left-this.$el.scrollLeft()}},_calculateLineHeight:function(){var e=parseInt(this.$el.css("line-height"),10);if(isNaN(e)){var t=this.el.parentNode,n=document.createElement(this.el.nodeName),r=this.el.style;n.setAttribute("style","margin:0px;padding:0px;font-family:"+r.fontFamily+";font-size:"+r.fontSize),n.innerHTML="test",t.appendChild(n),e=n.clientHeight,t.removeChild(n)}return e}}),o.fn.textcomplete.Textarea=e}(e),function(s){"use strict";function e(e,t,n){this.initialize(e,t,n),s("<span>吶</span>").css({position:"absolute",top:-9999,left:-9999}).insertBefore(e)}s.extend(e.prototype,s.fn.textcomplete.Textarea.prototype,{select:function(e,t,n){var r=this.getTextFromHeadToCaret(),i=this.el.value.substring(r.length),a=t.replace(e,n);if(void 0!==a){s.isArray(a)&&(i=a[1]+i,a=a[0]),r=r.replace(t.match,a),this.$el.val(r+i),this.el.focus();var o=this.el.createTextRange();o.collapse(!0),o.moveEnd("character",r.length),o.moveStart("character",r.length),o.select()}},getTextFromHeadToCaret:function(){this.el.focus();var e=document.selection.createRange();e.moveStart("character",-this.el.value.length);var t=e.text.split("吶");return 1===t.length?t[0]:t[1]}}),s.fn.textcomplete.IETextarea=e}(e),function(p){"use strict";function e(e,t,n){this.initialize(e,t,n)}p.extend(e.prototype,p.fn.textcomplete.Adapter.prototype,{select:function(e,t,n){var r=this.getTextFromHeadToCaret(),i=window.getSelection(),a=i.getRangeAt(0),o=a.cloneRange();o.selectNodeContents(a.startContainer);var s=o.toString().substring(a.startOffset),c=t.replace(e,n);if(void 0!==c){p.isArray(c)&&(s=c[1]+s,c=c[0]),r=r.replace(t.match,c),a.selectNodeContents(a.startContainer),a.deleteContents();var l=document.createElement("div");l.innerHTML=r;var u=document.createElement("div");u.innerHTML=s;for(var f,d,h=document.createDocumentFragment();f=l.firstChild;)d=h.appendChild(f);for(;f=u.firstChild;)h.appendChild(f);a.insertNode(h),a.setStartAfter(d),a.collapse(!0),i.removeAllRanges(),i.addRange(a)}},_getCaretRelativePosition:function(){var e=window.getSelection().getRangeAt(0).cloneRange(),t=document.createElement("span");e.insertNode(t),e.selectNodeContents(t),e.deleteContents();var n=p(t),r=n.offset();return r.left-=this.$el.offset().left,r.top+=n.height()-this.$el.offset().top,r.lineHeight=n.height(),n.remove(),r},getTextFromHeadToCaret:function(){var e=window.getSelection().getRangeAt(0),t=e.cloneRange();return t.selectNodeContents(e.startContainer),t.toString().substring(0,e.startOffset)}}),p.fn.textcomplete.ContentEditable=e}(e),t=e,u=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],f="undefined"!=typeof window,d=f&&null!=window.mozInnerScreenX,t.fn.textcomplete.getCaretCoordinates=function(e,t,n){if(!f)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var r=n&&n.debug||!1;if(r){var i=document.querySelector("#input-textarea-caret-position-mirror-div");i&&i.parentNode.removeChild(i)}var a=document.createElement("div");a.id="input-textarea-caret-position-mirror-div",document.body.appendChild(a);var o=a.style,s=window.getComputedStyle?getComputedStyle(e):e.currentStyle;o.whiteSpace="pre-wrap","INPUT"!==e.nodeName&&(o.wordWrap="break-word"),o.position="absolute",r||(o.visibility="hidden"),u.forEach(function(e){o[e]=s[e]}),d?e.scrollHeight>parseInt(s.height)&&(o.overflowY="scroll"):o.overflow="hidden",a.textContent=e.value.substring(0,t),"INPUT"===e.nodeName&&(a.textContent=a.textContent.replace(/\s/g," "));var c=document.createElement("span");c.textContent=e.value.substring(t)||".",a.appendChild(c);var l={top:c.offsetTop+parseInt(s.borderTopWidth),left:c.offsetLeft+parseInt(s.borderLeftWidth)};return r?c.style.backgroundColor="#aaa":document.body.removeChild(a),l},e}),window="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},document=window.document||{},function(e,t){"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e(t.jQuery)}(function(C){"use strict";var r=0,o={},s={},A=window.emojione,i=[];function a(e){A?e():i.push(e)}var S,T,c,x="data:image/gif;base64,R0lGODlhAQABAJH/AP///wAAAMDAwAAAACH5BAEAAAIALAAAAAABAAEAAAICVAEAOw==",l=[].slice,k="emojionearea",E=0,D="&#8203;";function I(n,e,r){var i=!0,t=1;if(e){e=e.toLowerCase();do{var a=1==t?"@"+e:e;o[n.id][a]&&o[n.id][a].length&&C.each(o[n.id][a],function(e,t){return i=!1!==t.apply(n,r||[])})}while(i&&t--)}return i}function P(n,r,i,a){a=a||function(e,t){return C(t.currentTarget)},C.each(i,function(e,t){e=C.isArray(i)?t:e,(s[n.id][t]||(s[n.id][t]=[])).push([r,e,a])})}function u(e,t,n){var r,i=A.imageType;r="svg"==i?A.imagePathSVG:A.imagePathPNG;var a="";n&&(a=n.substr(1,n.length-2).replace(/_/g," ").replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}));var o="";return t.uc_base&&4<E?(o=t.uc_base,t=t.uc_output.toUpperCase()):o=t,e.replace("{name}",n||"").replace("{friendlyName}",a).replace("{img}",r+(E<2?o.toUpperCase():o)+"."+i).replace("{uni}",t).replace("{alt}",A.convert(t))}function M(e,n,r){return e.replace(/:?\+?[\w_\-]+:?/g,function(e){e=":"+e.replace(/:$/,"").replace(/^:/,"")+":";var t=A.emojioneList[e];return t?4<E?u(n,t,e):(3<E&&(t=t.unicode),u(n,t[t.length-1],e)):r?"":e})}function $(e){var t,n;if(window.getSelection){if((t=window.getSelection()).getRangeAt&&t.rangeCount){(n=t.getRangeAt(0)).deleteContents();var r=document.createElement("div");r.innerHTML=e;for(var i,a,o=document.createDocumentFragment();i=r.firstChild;)a=o.appendChild(i);n.insertNode(o),a&&((n=n.cloneRange()).setStartAfter(a),n.collapse(!0),t.removeAllRanges(),t.addRange(n))}}else document.selection&&"Control"!=document.selection.type&&document.selection.createRange().pasteHTML(e)}function f(){return window.emojioneVersion||"3.1.2"}function O(e){return"object"==typeof e}function d(e){var t;return e.cacheBustParam?(t=e.cacheBustParam,O(e.jsEscapeMap)?"?v=1.2.4"===t?"2.0.0":"?v=2.0.1"===t?"2.1.0":"?v=2.1.1"===t?"2.1.1":"?v=2.1.2"===t?"2.1.2":"?v=2.1.3"===t?"2.1.3":"?v=2.1.4"===t?"2.1.4":"2.2.7":"1.5.2"):e.emojiVersion}function h(e){switch(e){case"1.5.2":return 0;case"2.0.0":return 1;case"2.1.0":case"2.1.1":return 2;case"2.1.2":return 3;case"2.1.3":case"2.1.4":case"2.2.7":return 4;case"3.0.1":case"3.0.2":case"3.0.3":case"3.0":return 5;case"3.1.0":case"3.1.1":case"3.1.2":case"3.1":default:return 6}}function n(){if(C.fn.emojioneArea&&C.fn.emojioneArea.defaults)return C.fn.emojioneArea.defaults;var e={attributes:{dir:"ltr",spellcheck:!1,autocomplete:"off",autocorrect:"off",autocapitalize:"off"},search:!0,placeholder:null,emojiPlaceholder:":smiley:",searchPlaceholder:"SEARCH",container:null,hideSource:!0,shortnames:!0,sprite:!0,pickerPosition:"top",filtersPosition:"top",searchPosition:"top",hidePickerOnBlur:!0,buttonTitle:"Use the TAB key to insert emoji faster",tones:!0,tonesStyle:"bullet",inline:null,saveEmojisAs:"unicode",shortcuts:!0,autocomplete:!0,autocompleteTones:!1,standalone:!1,useInternalCDN:!0,imageType:"png",recentEmojis:!0,textcomplete:{maxCount:15,placement:null}},t=h(A?d(A):f());return e.filters=4<t?{tones:{title:"Diversity",emoji:"open_hands raised_hands palms_up_together clap pray thumbsup thumbsdown punch fist left_facing_fist right_facing_fist fingers_crossed v metal love_you_gesture ok_hand point_left point_right point_up_2 point_down point_up raised_hand raised_back_of_hand hand_splayed vulcan wave call_me muscle middle_finger writing_hand selfie nail_care ear nose baby boy girl man woman blond-haired_woman blond-haired_man older_man older_woman man_with_chinese_cap woman_wearing_turban man_wearing_turban woman_police_officer man_police_officer woman_construction_worker man_construction_worker woman_guard man_guard woman_detective man_detective woman_health_worker man_health_worker woman_farmer man_farmer woman_cook man_cook woman_student man_student woman_singer man_singer woman_teacher man_teacher woman_factory_worker man_factory_worker woman_technologist man_technologist woman_office_worker man_office_worker woman_mechanic man_mechanic woman_scientist man_scientist woman_artist man_artist woman_firefighter man_firefighter woman_pilot man_pilot woman_astronaut man_astronaut woman_judge man_judge mrs_claus santa princess prince bride_with_veil man_in_tuxedo angel pregnant_woman breast_feeding woman_bowing man_bowing man_tipping_hand woman_tipping_hand man_gesturing_no woman_gesturing_no man_gesturing_ok woman_gesturing_ok man_raising_hand woman_raising_hand woman_facepalming man_facepalming woman_shrugging man_shrugging man_pouting woman_pouting man_frowning woman_frowning man_getting_haircut woman_getting_haircut man_getting_face_massage woman_getting_face_massage man_in_business_suit_levitating dancer man_dancing woman_walking man_walking woman_running man_running adult child older_adult bearded_person woman_with_headscarf woman_mage man_mage woman_fairy man_fairy woman_vampire man_vampire mermaid merman woman_elf man_elf snowboarder woman_lifting_weights man_lifting_weights woman_cartwheeling man_cartwheeling woman_bouncing_ball man_bouncing_ball woman_playing_handball man_playing_handball woman_golfing man_golfing woman_surfing man_surfing woman_swimming man_swimming woman_playing_water_polo man_playing_water_polo woman_rowing_boat man_rowing_boat horse_racing woman_biking man_biking woman_mountain_biking man_mountain_biking woman_juggling man_juggling woman_in_steamy_room man_in_steamy_room woman_climbing man_climbing woman_in_lotus_position man_in_lotus_position bath person_in_bed"},recent:{icon:"clock3",title:"Recent",emoji:""},smileys_people:{icon:"yum",title:"Smileys & People",emoji:"grinning smiley smile grin laughing sweat_smile joy rofl relaxed blush innocent slight_smile upside_down wink relieved crazy_face star_struck heart_eyes kissing_heart kissing kissing_smiling_eyes kissing_closed_eyes yum stuck_out_tongue_winking_eye stuck_out_tongue_closed_eyes stuck_out_tongue money_mouth hugging nerd sunglasses cowboy smirk unamused disappointed pensive worried face_with_raised_eyebrow face_with_monocle confused slight_frown frowning2 persevere confounded tired_face weary triumph angry rage face_with_symbols_over_mouth no_mouth neutral_face expressionless hushed frowning anguished open_mouth astonished dizzy_face exploding_head flushed scream fearful cold_sweat cry disappointed_relieved drooling_face sob sweat sleepy sleeping rolling_eyes thinking shushing_face face_with_hand_over_mouth lying_face grimacing zipper_mouth face_vomiting nauseated_face sneezing_face mask thermometer_face head_bandage smiling_imp imp japanese_ogre japanese_goblin poop ghost skull skull_crossbones alien space_invader robot jack_o_lantern clown smiley_cat smile_cat joy_cat heart_eyes_cat smirk_cat kissing_cat scream_cat crying_cat_face pouting_cat open_hands raised_hands palms_up_together clap pray handshake thumbsup thumbsdown punch fist left_facing_fist right_facing_fist fingers_crossed v metal love_you_gesture ok_hand point_left point_right point_up_2 point_down point_up raised_hand raised_back_of_hand hand_splayed vulcan wave call_me muscle middle_finger writing_hand selfie nail_care ring lipstick kiss lips tongue ear nose footprints eye eyes speaking_head bust_in_silhouette busts_in_silhouette baby boy girl man woman blond-haired_woman blond_haired_man older_man older_woman man_with_chinese_cap woman_wearing_turban man_wearing_turban woman_police_officer police_officer woman_construction_worker construction_worker woman_guard guard woman_detective detective woman_health_worker man_health_worker woman_farmer man_farmer woman_cook man_cook woman_student man_student woman_singer man_singer woman_teacher man_teacher woman_factory_worker man_factory_worker woman_technologist man_technologist woman_office_worker man_office_worker woman_mechanic man_mechanic woman_scientist man_scientist woman_artist man_artist woman_firefighter man_firefighter woman_pilot man_pilot woman_astronaut man_astronaut woman_judge man_judge mrs_claus santa princess prince bride_with_veil man_in_tuxedo angel pregnant_woman breast_feeding woman_bowing man_bowing woman_tipping_hand man_tipping_hand woman_gesturing_no man_gesturing_no woman_gesturing_ok man_gesturing_ok woman_raising_hand man_raising_hand woman_facepalming man_facepalming woman_shrugging man_shrugging woman_pouting man_pouting woman_frowning man_frowning woman_getting_haircut man_getting_haircut woman_getting_face_massage man_getting_face_massage man_in_business_suit_levitating dancer man_dancing women_with_bunny_ears_partying men_with_bunny_ears_partying woman_walking man_walking woman_running man_running couple two_women_holding_hands two_men_holding_hands couple_with_heart couple_ww couple_mm couplekiss kiss_ww kiss_mm family family_mwg family_mwgb family_mwbb family_mwgg family_wwb family_wwg family_wwgb family_wwbb family_wwgg family_mmb family_mmg family_mmgb family_mmbb family_mmgg family_woman_boy family_woman_girl family_woman_girl_boy family_woman_boy_boy family_woman_girl_girl family_man_boy family_man_girl family_man_girl_boy family_man_boy_boy family_man_girl_girl bearded_person woman_with_headscarf woman_mage man_mage woman_fairy man_fairy woman_vampire man_vampire mermaid merman woman_elf man_elf woman_genie man_genie woman_zombie man_zombie womans_clothes shirt jeans necktie dress bikini kimono high_heel sandal boot mans_shoe athletic_shoe womans_hat tophat mortar_board crown helmet_with_cross school_satchel pouch purse handbag briefcase eyeglasses dark_sunglasses closed_umbrella umbrella2 brain billed_cap scarf gloves coat socks "},animals_nature:{icon:"hamster",title:"Animals & Nature",emoji:"dog cat mouse hamster rabbit fox bear panda_face koala tiger lion_face cow pig pig_nose frog monkey_face see_no_evil hear_no_evil speak_no_evil monkey chicken penguin bird baby_chick hatching_chick hatched_chick duck eagle owl bat wolf boar horse unicorn bee bug butterfly snail shell beetle ant spider spider_web turtle snake lizard scorpion crab squid octopus shrimp tropical_fish fish blowfish dolphin shark whale whale2 crocodile leopard tiger2 water_buffalo ox cow2 deer dromedary_camel camel elephant rhino gorilla racehorse pig2 goat ram sheep dog2 poodle cat2 rooster turkey dove rabbit2 mouse2 rat chipmunk dragon giraffe zebra hedgehog sauropod t_rex cricket dragon_face feet cactus christmas_tree evergreen_tree deciduous_tree palm_tree seedling herb shamrock four_leaf_clover bamboo tanabata_tree leaves fallen_leaf maple_leaf mushroom ear_of_rice bouquet tulip rose wilted_rose sunflower blossom cherry_blossom hibiscus earth_americas earth_africa earth_asia full_moon waning_gibbous_moon last_quarter_moon waning_crescent_moon new_moon waxing_crescent_moon first_quarter_moon waxing_gibbous_moon new_moon_with_face full_moon_with_face sun_with_face first_quarter_moon_with_face last_quarter_moon_with_face crescent_moon dizzy star star2 sparkles zap fire boom comet sunny white_sun_small_cloud partly_sunny white_sun_cloud white_sun_rain_cloud rainbow cloud cloud_rain thunder_cloud_rain cloud_lightning cloud_snow snowman2 snowman snowflake wind_blowing_face dash cloud_tornado fog ocean droplet sweat_drops umbrella "},food_drink:{icon:"pizza",title:"Food & Drink",emoji:"green_apple apple pear tangerine lemon banana watermelon grapes strawberry melon cherries peach pineapple kiwi avocado tomato eggplant cucumber carrot corn hot_pepper potato sweet_potato chestnut peanuts honey_pot croissant bread french_bread cheese egg cooking bacon pancakes fried_shrimp poultry_leg meat_on_bone pizza hotdog hamburger fries stuffed_flatbread taco burrito salad shallow_pan_of_food spaghetti ramen stew fish_cake sushi bento curry rice_ball rice rice_cracker oden dango shaved_ice ice_cream icecream cake birthday custard lollipop candy chocolate_bar popcorn doughnut cookie milk baby_bottle coffee tea sake beer beers champagne_glass wine_glass tumbler_glass cocktail tropical_drink champagne spoon fork_and_knife fork_knife_plate dumpling fortune_cookie takeout_box chopsticks bowl_with_spoon cup_with_straw coconut broccoli pie pretzel cut_of_meat sandwich canned_food"},activity:{icon:"basketball",title:"Activity",emoji:"soccer basketball football baseball tennis volleyball rugby_football 8ball ping_pong badminton goal hockey field_hockey cricket_game golf bow_and_arrow fishing_pole_and_fish boxing_glove martial_arts_uniform ice_skate ski skier snowboarder woman_lifting_weights man_lifting_weights person_fencing women_wrestling men_wrestling woman_cartwheeling man_cartwheeling woman_bouncing_ball man_bouncing_ball woman_playing_handball man_playing_handball woman_golfing man_golfing woman_surfing man_surfing woman_swimming man_swimming woman_playing_water_polo man_playing_water_polo woman_rowing_boat man_rowing_boat horse_racing woman_biking man_biking woman_mountain_biking man_mountain_biking woman_in_steamy_room man_in_steamy_room woman_climbing man_climbing woman_in_lotus_position man_in_lotus_position running_shirt_with_sash medal military_medal first_place second_place third_place trophy rosette reminder_ribbon ticket tickets circus_tent woman_juggling man_juggling performing_arts art clapper microphone headphones musical_score musical_keyboard drum saxophone trumpet guitar violin game_die dart bowling video_game slot_machine sled curling_stone "},travel_places:{icon:"rocket",title:"Travel & Places",emoji:"red_car taxi blue_car bus trolleybus race_car police_car ambulance fire_engine minibus truck articulated_lorry tractor scooter bike motor_scooter motorcycle rotating_light oncoming_police_car oncoming_bus oncoming_automobile oncoming_taxi aerial_tramway mountain_cableway suspension_railway railway_car train mountain_railway monorail bullettrain_side bullettrain_front light_rail steam_locomotive train2 metro tram station helicopter airplane_small airplane airplane_departure airplane_arriving rocket satellite_orbital seat canoe sailboat motorboat speedboat cruise_ship ferry ship anchor construction fuelpump busstop vertical_traffic_light traffic_light map moyai statue_of_liberty fountain tokyo_tower european_castle japanese_castle stadium ferris_wheel roller_coaster carousel_horse beach_umbrella beach island mountain mountain_snow mount_fuji volcano desert camping tent railway_track motorway construction_site factory house house_with_garden homes house_abandoned office department_store post_office european_post_office hospital bank hotel convenience_store school love_hotel wedding classical_building church mosque synagogue kaaba shinto_shrine japan rice_scene park sunrise sunrise_over_mountains stars sparkler fireworks city_sunset city_dusk cityscape night_with_stars milky_way bridge_at_night foggy flying_saucer"},objects:{icon:"bulb",title:"Objects",emoji:"watch iphone calling computer keyboard desktop printer mouse_three_button trackball joystick compression minidisc floppy_disk cd dvd vhs camera camera_with_flash video_camera movie_camera projector film_frames telephone_receiver telephone pager fax tv radio microphone2 level_slider control_knobs stopwatch timer alarm_clock clock hourglass hourglass_flowing_sand satellite battery electric_plug bulb flashlight candle wastebasket oil money_with_wings dollar yen euro pound moneybag credit_card gem scales wrench hammer hammer_pick tools pick nut_and_bolt gear chains gun bomb knife dagger crossed_swords shield smoking coffin urn amphora crystal_ball prayer_beads barber alembic telescope microscope hole pill syringe thermometer toilet potable_water shower bathtub bath bellhop key key2 door couch bed sleeping_accommodation frame_photo shopping_bags shopping_cart gift balloon flags ribbon confetti_ball tada dolls izakaya_lantern wind_chime envelope envelope_with_arrow incoming_envelope e-mail love_letter inbox_tray outbox_tray package label mailbox_closed mailbox mailbox_with_mail mailbox_with_no_mail postbox postal_horn scroll page_with_curl page_facing_up bookmark_tabs bar_chart chart_with_upwards_trend chart_with_downwards_trend notepad_spiral calendar_spiral calendar date card_index card_box ballot_box file_cabinet clipboard file_folder open_file_folder dividers newspaper2 newspaper notebook notebook_with_decorative_cover ledger closed_book green_book blue_book orange_book books book bookmark link paperclip paperclips triangular_ruler straight_ruler pushpin round_pushpin scissors pen_ballpoint pen_fountain black_nib paintbrush crayon pencil pencil2 mag mag_right lock_with_ink_pen closed_lock_with_key lock unlock"},symbols:{icon:"heartpulse",title:"Symbols",emoji:"heart orange_heart yellow_heart green_heart blue_heart purple_heart black_heart broken_heart heart_exclamation two_hearts revolving_hearts heartbeat heartpulse sparkling_heart cupid gift_heart heart_decoration peace cross star_and_crescent om_symbol wheel_of_dharma star_of_david six_pointed_star menorah yin_yang orthodox_cross place_of_worship ophiuchus aries taurus gemini cancer leo virgo libra scorpius sagittarius capricorn aquarius pisces id atom accept radioactive biohazard mobile_phone_off vibration_mode u6709 u7121 u7533 u55b6 u6708 eight_pointed_black_star vs white_flower ideograph_advantage secret congratulations u5408 u6e80 u5272 u7981 a b ab cl o2 sos x o octagonal_sign no_entry name_badge no_entry_sign 100 anger hotsprings no_pedestrians do_not_litter no_bicycles non-potable_water underage no_mobile_phones no_smoking exclamation grey_exclamation question grey_question bangbang interrobang low_brightness high_brightness part_alternation_mark warning children_crossing trident fleur-de-lis beginner recycle white_check_mark u6307 chart sparkle eight_spoked_asterisk negative_squared_cross_mark globe_with_meridians diamond_shape_with_a_dot_inside m cyclone zzz atm wc wheelchair parking u7a7a sa passport_control customs baggage_claim left_luggage mens womens baby_symbol restroom put_litter_in_its_place cinema signal_strength koko symbols information_source abc abcd capital_abcd ng ok up cool new free zero one two three four five six seven eight nine keycap_ten 1234 hash asterisk arrow_forward pause_button play_pause stop_button record_button eject track_next track_previous fast_forward rewind arrow_double_up arrow_double_down arrow_backward arrow_up_small arrow_down_small arrow_right arrow_left arrow_up arrow_down arrow_upper_right arrow_lower_right arrow_lower_left arrow_upper_left arrow_up_down left_right_arrow arrow_right_hook leftwards_arrow_with_hook arrow_heading_up arrow_heading_down twisted_rightwards_arrows repeat repeat_one arrows_counterclockwise arrows_clockwise musical_note notes heavy_plus_sign heavy_minus_sign heavy_division_sign heavy_multiplication_x heavy_dollar_sign currency_exchange tm copyright registered wavy_dash curly_loop loop end back on top soon heavy_check_mark ballot_box_with_check radio_button white_circle black_circle red_circle blue_circle small_red_triangle small_red_triangle_down small_orange_diamond small_blue_diamond large_orange_diamond large_blue_diamond white_square_button black_square_button black_small_square white_small_square black_medium_small_square white_medium_small_square black_medium_square white_medium_square black_large_square white_large_square speaker mute sound loud_sound bell no_bell mega loudspeaker speech_left eye_in_speech_bubble speech_balloon thought_balloon anger_right spades clubs hearts diamonds black_joker flower_playing_cards mahjong clock1 clock2 clock3 clock4 clock5 clock6 clock7 clock8 clock9 clock10 clock11 clock12 clock130 clock230 clock330 clock430 clock530 clock630 clock730 clock830 clock930 clock1030 clock1130 clock1230"},flags:{icon:"flag_gb",title:"Flags",emoji:"flag_white flag_black checkered_flag triangular_flag_on_post rainbow_flag flag_af flag_ax flag_al flag_dz flag_as flag_ad flag_ao flag_ai flag_aq flag_ag flag_ar flag_am flag_aw flag_au flag_at flag_az flag_bs flag_bh flag_bd flag_bb flag_by flag_be flag_bz flag_bj flag_bm flag_bt flag_bo flag_ba flag_bw flag_br flag_io flag_vg flag_bn flag_bg flag_bf flag_bi flag_kh flag_cm flag_ca flag_ic flag_cv flag_bq flag_ky flag_cf flag_td flag_cl flag_cn flag_cx flag_cc flag_co flag_km flag_cg flag_cd flag_ck flag_cr flag_ci flag_hr flag_cu flag_cw flag_cy flag_cz flag_dk flag_dj flag_dm flag_do flag_ec flag_eg flag_sv flag_gq flag_er flag_ee flag_et flag_eu flag_fk flag_fo flag_fj flag_fi flag_fr flag_gf flag_pf flag_tf flag_ga flag_gm flag_ge flag_de flag_gh flag_gi flag_gr flag_gl flag_gd flag_gp flag_gu flag_gt flag_gg flag_gn flag_gw flag_gy flag_ht flag_hn flag_hk flag_hu flag_is flag_in flag_id flag_ir flag_iq flag_ie flag_im flag_il flag_it flag_jm flag_jp crossed_flags flag_je flag_jo flag_kz flag_ke flag_ki flag_xk flag_kw flag_kg flag_la flag_lv flag_lb flag_ls flag_lr flag_ly flag_li flag_lt flag_lu flag_mo flag_mk flag_mg flag_mw flag_my flag_mv flag_ml flag_mt flag_mh flag_mq flag_mr flag_mu flag_yt flag_mx flag_fm flag_md flag_mc flag_mn flag_me flag_ms flag_ma flag_mz flag_mm flag_na flag_nr flag_np flag_nl flag_nc flag_nz flag_ni flag_ne flag_ng flag_nu flag_nf flag_kp flag_mp flag_no flag_om flag_pk flag_pw flag_ps flag_pa flag_pg flag_py flag_pe flag_ph flag_pn flag_pl flag_pt flag_pr flag_qa flag_re flag_ro flag_ru flag_rw flag_ws flag_sm flag_st flag_sa flag_sn flag_rs flag_sc flag_sl flag_sg flag_sx flag_sk flag_si flag_gs flag_sb flag_so flag_za flag_kr flag_ss flag_es flag_lk flag_bl flag_sh flag_kn flag_lc flag_pm flag_vc flag_sd flag_sr flag_sz flag_se flag_ch flag_sy flag_tw flag_tj flag_tz flag_th flag_tl flag_tg flag_tk flag_to flag_tt flag_tn flag_tr flag_tm flag_tc flag_tv flag_vi flag_ug flag_ua flag_ae flag_gb flag_us flag_uy flag_uz flag_vu flag_va flag_ve flag_vn flag_wf flag_eh flag_ye flag_zm flag_zw flag_ac flag_ta flag_bv flag_hm flag_sj flag_um flag_ea flag_cp flag_dg flag_mf united_nations england scotland wales"}}:{tones:{title:"Diversity",emoji:"santa runner surfer swimmer lifter ear nose point_up_2 point_down point_left point_right punch wave ok_hand thumbsup thumbsdown clap open_hands boy girl man woman cop bride_with_veil person_with_blond_hair man_with_gua_pi_mao man_with_turban older_man grandma baby construction_worker princess angel information_desk_person guardsman dancer nail_care massage haircut muscle spy hand_splayed middle_finger vulcan no_good ok_woman bow raising_hand raised_hands person_frowning person_with_pouting_face pray rowboat bicyclist mountain_bicyclist walking bath metal point_up basketball_player fist raised_hand v writing_hand"},recent:{icon:"clock3",title:"Recent",emoji:""},smileys_people:{icon:"yum",title:"Smileys & People",emoji:"grinning grimacing grin joy smiley smile sweat_smile laughing innocent wink blush slight_smile upside_down relaxed yum relieved heart_eyes kissing_heart kissing kissing_smiling_eyes kissing_closed_eyes stuck_out_tongue_winking_eye stuck_out_tongue_closed_eyes stuck_out_tongue money_mouth nerd sunglasses hugging smirk no_mouth neutral_face expressionless unamused rolling_eyes thinking flushed disappointed worried angry rage pensive confused slight_frown frowning2 persevere confounded tired_face weary triumph open_mouth scream fearful cold_sweat hushed frowning anguished cry disappointed_relieved sleepy sweat sob dizzy_face astonished zipper_mouth mask thermometer_face head_bandage sleeping zzz poop smiling_imp imp japanese_ogre japanese_goblin skull ghost alien robot smiley_cat smile_cat joy_cat heart_eyes_cat smirk_cat kissing_cat scream_cat crying_cat_face pouting_cat raised_hands clap wave thumbsup thumbsdown punch fist v ok_hand raised_hand open_hands muscle pray point_up point_up_2 point_down point_left point_right middle_finger hand_splayed metal vulcan writing_hand nail_care lips tongue ear nose eye eyes bust_in_silhouette busts_in_silhouette speaking_head baby boy girl man woman person_with_blond_hair older_man older_woman man_with_gua_pi_mao man_with_turban cop construction_worker guardsman spy santa angel princess bride_with_veil walking runner dancer dancers couple two_men_holding_hands two_women_holding_hands bow information_desk_person no_good ok_woman raising_hand person_with_pouting_face person_frowning haircut massage couple_with_heart couple_ww couple_mm couplekiss kiss_ww kiss_mm family family_mwg family_mwgb family_mwbb family_mwgg family_wwb family_wwg family_wwgb family_wwbb family_wwgg family_mmb family_mmg family_mmgb family_mmbb family_mmgg womans_clothes shirt jeans necktie dress bikini kimono lipstick kiss footprints high_heel sandal boot mans_shoe athletic_shoe womans_hat tophat helmet_with_cross mortar_board crown school_satchel pouch purse handbag briefcase eyeglasses dark_sunglasses ring closed_umbrella"},animals_nature:{icon:"hamster",title:"Animals & Nature",emoji:"dog cat mouse hamster rabbit bear panda_face koala tiger lion_face cow pig pig_nose frog octopus monkey_face see_no_evil hear_no_evil speak_no_evil monkey chicken penguin bird baby_chick hatching_chick hatched_chick wolf boar horse unicorn bee bug snail beetle ant spider scorpion crab snake turtle tropical_fish fish blowfish dolphin whale whale2 crocodile leopard tiger2 water_buffalo ox cow2 dromedary_camel camel elephant goat ram sheep racehorse pig2 rat mouse2 rooster turkey dove dog2 poodle cat2 rabbit2 chipmunk feet dragon dragon_face cactus christmas_tree evergreen_tree deciduous_tree palm_tree seedling herb shamrock four_leaf_clover bamboo tanabata_tree leaves fallen_leaf maple_leaf ear_of_rice hibiscus sunflower rose tulip blossom cherry_blossom bouquet mushroom chestnut jack_o_lantern shell spider_web earth_americas earth_africa earth_asia full_moon waning_gibbous_moon last_quarter_moon waning_crescent_moon new_moon waxing_crescent_moon first_quarter_moon waxing_gibbous_moon new_moon_with_face full_moon_with_face first_quarter_moon_with_face last_quarter_moon_with_face sun_with_face crescent_moon star star2 dizzy sparkles comet sunny white_sun_small_cloud partly_sunny white_sun_cloud white_sun_rain_cloud cloud cloud_rain thunder_cloud_rain cloud_lightning zap fire boom snowflake cloud_snow snowman2 snowman wind_blowing_face dash cloud_tornado fog umbrella2 umbrella droplet sweat_drops ocean"},food_drink:{icon:"pizza",title:"Food & Drink",emoji:"green_apple apple pear tangerine lemon banana watermelon grapes strawberry melon cherries peach pineapple tomato eggplant hot_pepper corn sweet_potato honey_pot bread cheese poultry_leg meat_on_bone fried_shrimp egg hamburger fries hotdog pizza spaghetti taco burrito ramen stew fish_cake sushi bento curry rice_ball rice rice_cracker oden dango shaved_ice ice_cream icecream cake birthday custard candy lollipop chocolate_bar popcorn doughnut cookie beer beers wine_glass cocktail tropical_drink champagne sake tea coffee baby_bottle fork_and_knife fork_knife_plate"},activity:{icon:"basketball",title:"Activity",emoji:"soccer basketball football baseball tennis volleyball rugby_football 8ball golf golfer ping_pong badminton hockey field_hockey cricket ski skier snowboarder ice_skate bow_and_arrow fishing_pole_and_fish rowboat swimmer surfer bath basketball_player lifter bicyclist mountain_bicyclist horse_racing levitate trophy running_shirt_with_sash medal military_medal reminder_ribbon rosette ticket tickets performing_arts art circus_tent microphone headphones musical_score musical_keyboard saxophone trumpet guitar violin clapper video_game space_invader dart game_die slot_machine bowling"},travel_places:{icon:"rocket",title:"Travel & Places",emoji:"red_car taxi blue_car bus trolleybus race_car police_car ambulance fire_engine minibus truck articulated_lorry tractor motorcycle bike rotating_light oncoming_police_car oncoming_bus oncoming_automobile oncoming_taxi aerial_tramway mountain_cableway suspension_railway railway_car train monorail bullettrain_side bullettrain_front light_rail mountain_railway steam_locomotive train2 metro tram station helicopter airplane_small airplane airplane_departure airplane_arriving sailboat motorboat speedboat ferry cruise_ship rocket satellite_orbital seat anchor construction fuelpump busstop vertical_traffic_light traffic_light checkered_flag ship ferris_wheel roller_coaster carousel_horse construction_site foggy tokyo_tower factory fountain rice_scene mountain mountain_snow mount_fuji volcano japan camping tent park motorway railway_track sunrise sunrise_over_mountains desert beach island city_sunset city_dusk cityscape night_with_stars bridge_at_night milky_way stars sparkler fireworks rainbow homes european_castle japanese_castle stadium statue_of_liberty house house_with_garden house_abandoned office department_store post_office european_post_office hospital bank hotel convenience_store school love_hotel wedding classical_building church mosque synagogue kaaba shinto_shrine"},objects:{icon:"bulb",title:"Objects",emoji:"watch iphone calling computer keyboard desktop printer mouse_three_button trackball joystick compression minidisc floppy_disk cd dvd vhs camera camera_with_flash video_camera movie_camera projector film_frames telephone_receiver telephone pager fax tv radio microphone2 level_slider control_knobs stopwatch timer alarm_clock clock hourglass_flowing_sand hourglass satellite battery electric_plug bulb flashlight candle wastebasket oil money_with_wings dollar yen euro pound moneybag credit_card gem scales wrench hammer hammer_pick tools pick nut_and_bolt gear chains gun bomb knife dagger crossed_swords shield smoking skull_crossbones coffin urn amphora crystal_ball prayer_beads barber alembic telescope microscope hole pill syringe thermometer label bookmark toilet shower bathtub key key2 couch sleeping_accommodation bed door bellhop frame_photo map beach_umbrella moyai shopping_bags balloon flags ribbon gift confetti_ball tada dolls wind_chime crossed_flags izakaya_lantern envelope envelope_with_arrow incoming_envelope e-mail love_letter postbox mailbox_closed mailbox mailbox_with_mail mailbox_with_no_mail package postal_horn inbox_tray outbox_tray scroll page_with_curl bookmark_tabs bar_chart chart_with_upwards_trend chart_with_downwards_trend page_facing_up date calendar calendar_spiral card_index card_box ballot_box file_cabinet clipboard notepad_spiral file_folder open_file_folder dividers newspaper2 newspaper notebook closed_book green_book blue_book orange_book notebook_with_decorative_cover ledger books book link paperclip paperclips scissors triangular_ruler straight_ruler pushpin round_pushpin triangular_flag_on_post flag_white flag_black closed_lock_with_key lock unlock lock_with_ink_pen pen_ballpoint pen_fountain black_nib pencil pencil2 crayon paintbrush mag mag_right"},symbols:{icon:"heartpulse",title:"Symbols",emoji:"heart yellow_heart green_heart blue_heart purple_heart broken_heart heart_exclamation two_hearts revolving_hearts heartbeat heartpulse sparkling_heart cupid gift_heart heart_decoration peace cross star_and_crescent om_symbol wheel_of_dharma star_of_david six_pointed_star menorah yin_yang orthodox_cross place_of_worship ophiuchus aries taurus gemini cancer leo virgo libra scorpius sagittarius capricorn aquarius pisces id atom u7a7a u5272 radioactive biohazard mobile_phone_off vibration_mode u6709 u7121 u7533 u55b6 u6708 eight_pointed_black_star vs accept white_flower ideograph_advantage secret congratulations u5408 u6e80 u7981 a b ab cl o2 sos no_entry name_badge no_entry_sign x o anger hotsprings no_pedestrians do_not_litter no_bicycles non-potable_water underage no_mobile_phones exclamation grey_exclamation question grey_question bangbang interrobang 100 low_brightness high_brightness trident fleur-de-lis part_alternation_mark warning children_crossing beginner recycle u6307 chart sparkle eight_spoked_asterisk negative_squared_cross_mark white_check_mark diamond_shape_with_a_dot_inside cyclone loop globe_with_meridians m atm sa passport_control customs baggage_claim left_luggage wheelchair no_smoking wc parking potable_water mens womens baby_symbol restroom put_litter_in_its_place cinema signal_strength koko ng ok up cool new free zero one two three four five six seven eight nine ten 1234 arrow_forward pause_button play_pause stop_button record_button track_next track_previous fast_forward rewind twisted_rightwards_arrows repeat repeat_one arrow_backward arrow_up_small arrow_down_small arrow_double_up arrow_double_down arrow_right arrow_left arrow_up arrow_down arrow_upper_right arrow_lower_right arrow_lower_left arrow_upper_left arrow_up_down left_right_arrow arrows_counterclockwise arrow_right_hook leftwards_arrow_with_hook arrow_heading_up arrow_heading_down hash asterisk information_source abc abcd capital_abcd symbols musical_note notes wavy_dash curly_loop heavy_check_mark arrows_clockwise heavy_plus_sign heavy_minus_sign heavy_division_sign heavy_multiplication_x heavy_dollar_sign currency_exchange copyright registered tm end back on top soon ballot_box_with_check radio_button white_circle black_circle red_circle large_blue_circle small_orange_diamond small_blue_diamond large_orange_diamond large_blue_diamond small_red_triangle black_small_square white_small_square black_large_square white_large_square small_red_triangle_down black_medium_square white_medium_square black_medium_small_square white_medium_small_square black_square_button white_square_button speaker sound loud_sound mute mega loudspeaker bell no_bell black_joker mahjong spades clubs hearts diamonds flower_playing_cards thought_balloon anger_right speech_balloon clock1 clock2 clock3 clock4 clock5 clock6 clock7 clock8 clock9 clock10 clock11 clock12 clock130 clock230 clock330 clock430 clock530 clock630 clock730 clock830 clock930 clock1030 clock1130 clock1230 eye_in_speech_bubble"},flags:{icon:"flag_gb",title:"Flags",emoji:"ac af al dz ad ao ai ag ar am aw au at az bs bh bd bb by be bz bj bm bt bo ba bw br bn bg bf bi cv kh cm ca ky cf td flag_cl cn co km cg flag_cd cr hr cu cy cz dk dj dm do ec eg sv gq er ee et fk fo fj fi fr pf ga gm ge de gh gi gr gl gd gu gt gn gw gy ht hn hk hu is in flag_id ir iq ie il it ci jm jp je jo kz ke ki xk kw kg la lv lb ls lr ly li lt lu mo mk mg mw my mv ml mt mh mr mu mx fm md mc mn me ms ma mz mm na nr np nl nc nz ni ne flag_ng nu kp no om pk pw ps pa pg py pe ph pl pt pr qa ro ru rw sh kn lc vc ws sm st flag_sa sn rs sc sl sg sk si sb so za kr es lk sd sr sz se ch sy tw tj tz th tl tg to tt tn tr flag_tm flag_tm ug ua ae gb us vi uy uz vu va ve vn wf eh ye zm zw re ax ta io bq cx cc gg im yt nf pn bl pm gs tk bv hm sj um ic ea cp dg as aq vg ck cw eu gf tf gp mq mp sx ss tc "}},e}function R(e){var t=n();if(e&&e.filters){var r=t.filters;C.each(e.filters,function(n,e){return!O(e)||C.isEmptyObject(e)?void delete r[n]:void C.each(e,function(e,t){r[n][e]=t})}),e.filters=r}return C.extend({},t,e)}function p(e,n){return e.replace(c,function(e){var t=A[0===E?"jsecapeMap":"jsEscapeMap"];return void 0!==e&&e in t?u(n,t[e]):e})}function N(e,t){return e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/`/g,"&#x60;").replace(/(?:\r\n|\r|\n)/g,"\n").replace(/(\n+)/g,"<div>$1</div>").replace(/\n/g,"<br/>").replace(/<br\/><\/div>/g,"</div>"),t.shortnames&&(e=A.shortnameToUnicode(e)),p(e,t.emojiTemplate).replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/  /g,"&nbsp;&nbsp;")}function L(e,t){switch(e=e.replace(/&#10;/g,"\n").replace(/&#09;/g,"\t").replace(/<img[^>]*alt="([^"]+)"[^>]*>/gi,"$1").replace(/\n|\r/g,"").replace(/<br[^>]*>/gi,"\n").replace(/(?:<(?:div|p|ol|ul|li|pre|code|object)[^>]*>)+/gi,"<div>").replace(/(?:<\/(?:div|p|ol|ul|li|pre|code|object)>)+/gi,"</div>").replace(/\n<div><\/div>/gi,"\n").replace(/<div><\/div>\n/gi,"\n").replace(/(?:<div>)+<\/div>/gi,"\n").replace(/([^\n])<\/div><div>/gi,"$1\n").replace(/(?:<\/div>)+/gi,"</div>").replace(/([^\n])<\/div>([^\n])/gi,"$1\n$2").replace(/<\/div>/gi,"").replace(/([^\n])<div>/gi,"$1\n").replace(/\n<div>/gi,"\n").replace(/<div>\n/gi,"\n\n").replace(/<(?:[^>]+)?>/g,"").replace(new RegExp(D,"g"),"").replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&#x60;/g,"`").replace(/&#60;/g,"<").replace(/&#62;/g,">").replace(/&amp;/g,"&"),t.saveEmojisAs){case"image":e=p(e,t.emojiTemplate);break;case"shortname":e=A.toShort(e)}return e}function F(){var e=this.editor[0].offsetWidth-this.editor[0].clientWidth,t=parseInt(this.button.css("marginRight"));t!==e&&(this.button.css({marginRight:e}),this.floatingPicker&&this.picker.css({right:parseInt(this.picker.css("right"))-t+e}))}function G(){if(!this.sprite&&this.lasyEmoji[0]&&this.lasyEmoji.eq(0).is(".lazy-emoji")){var n=this.picker.offset().top,r=n+this.picker.height()+20;this.lasyEmoji.each(function(){var e=C(this),t=e.offset().top;if(n<t&&t<r&&e.attr("src",e.data("src")).removeClass("lazy-emoji"),r<t)return!1}),this.lasyEmoji=this.lasyEmoji.filter(".lazy-emoji")}}function j(e,t){return(t?"":".")+k+(e?"-"+e:"")}function B(e){var n=C("<div/>",O(e)?e:{class:j(e,!0)});return C.each(l.call(arguments).slice(1),function(e,t){C.isFunction(t)&&(t=t.call(n)),t&&C(t).appendTo(n)}),n}function U(){return localStorage.getItem("recent_emojis")||""}function H(e,t){var n=U();if(!e.recent||e.recent!==n||t){if(n.length){var r,i,a=e.scrollArea.is(".skinnable");a||(r=e.scrollArea.scrollTop(),t&&e.recentCategory.show(),i=e.recentCategory.is(":visible")?e.recentCategory.height():0);var o=M(n,e.emojiBtnTemplate,!0).split("|").join("");if(e.recentCategory.children(".emojibtn").remove(),C(o).insertAfter(e.recentCategory.children(".emojionearea-category-title")),e.recentCategory.children(".emojibtn").on("click",function(){e.trigger("emojibtn.click",C(this))}),e.recentFilter.show(),!a){e.recentCategory.show();var s=e.recentCategory.height();i!==s&&e.scrollArea.scrollTop(r+s-i)}}else e.recentFilter.hasClass("active")&&e.recentFilter.removeClass("active").next().addClass("active"),e.recentCategory.hide(),e.recentFilter.hide();e.recent=n}}function m(c,t,a){c.options=a=R(a),c.sprite=a.sprite&&E<3,c.inline=null===a.inline?t.is("INPUT"):a.inline,c.shortnames=a.shortnames,c.saveEmojisAs=a.saveEmojisAs,c.standalone=a.standalone,c.emojiTemplate='<img alt="{alt}" class="emojione'+(c.sprite?'-{uni}" src="'+x+'"/>':'emoji" src="{img}"/>'),c.emojiTemplateAlt=c.sprite?'<i class="emojione-{uni}"/>':'<img class="emojioneemoji" src="{img}"/>',c.emojiBtnTemplate='<i class="emojibtn" role="button" data-name="{name}" title="{friendlyName}">'+c.emojiTemplateAlt+"</i>",c.recentEmojis=a.recentEmojis&&function(){try{return localStorage.setItem("test","test"),localStorage.removeItem("test"),!0}catch(e){return!1}}();var e=a.pickerPosition;c.floatingPicker="top"===e||"bottom"===e,((c.source=t).is(":disabled")||t.is(".disabled"))&&c.disable();var o,n,s,l,u,r,f,d,h,p,i=t.is("TEXTAREA")||t.is("INPUT")?"val":"text",m=B("tones",a.tones?function(){this.addClass(j("tones-"+a.tonesStyle,!0));for(var e=0;e<=5;e++)this.append(C("<i/>",{class:"btn-tone btn-tone-"+e+(e?"":" active"),"data-skin":e,role:"button"}))}:null),g=B({class:k+(c.standalone?" "+k+"-standalone ":" ")+(t.attr("class")||""),role:"application"},o=c.editor=B("editor").attr({contenteditable:!c.standalone,placeholder:a.placeholder||t.data("placeholder")||t.attr("placeholder")||"",tabindex:0}),n=c.button=B("button",B("button-open"),B("button-close")).attr("title",a.buttonTitle),s=c.picker=B("picker",B("wrapper",l=B("filters"),a.search?r=B("search-panel",B("search",a.search?function(){c.search=C("<input/>",{placeholder:a.searchPlaceholder||"",type:"text",class:"search"}),this.append(c.search)}:null),m):null,p=B("scroll-area",a.tones&&!a.search?B("tones-panel",m):null,f=B("emojis-list")))).addClass(j("picker-position-"+a.pickerPosition,!0)).addClass(j("filters-position-"+a.filtersPosition,!0)).addClass(j("search-position-"+a.searchPosition,!0)).addClass("hidden"));a.search&&r.addClass(j("with-search",!0)),c.searchSel=null,o.data(t.data()),C.each(a.attributes,function(e,t){o.attr(e,t)});var _=B("category-block").attr({"data-tone":0}).prependTo(f);if(C.each(a.filters,function(e,t){var n=0;if("recent"!==e||c.recentEmojis){if("tones"!==e)C("<i/>",{class:j("filter",!0)+" "+j("filter-"+e,!0),"data-filter":e,title:t.title}).wrapInner(M(t.icon,c.emojiTemplateAlt)).appendTo(l);else{if(!a.tones)return;n=5}do{var r,i=t.emoji.replace(/[\s,;]+/g,"|");r=0===n?B("category").attr({name:e,"data-tone":n}).appendTo(_):B("category-block").attr({name:e,"data-tone":n}).appendTo(f),0<n&&(r.hide(),i=i.split("|").join("_tone"+n+"|")+"_tone"+n),"recent"===e&&(i=U()),i=M(i,c.sprite?'<i class="emojibtn" role="button" data-name="{name}" title="{friendlyName}"><i class="emojione-{uni}"></i></i>':'<i class="emojibtn" role="button" data-name="{name}" title="{friendlyName}"><img class="emojioneemoji lazy-emoji" data-src="{img}"/></i>',!0).split("|").join(""),r.html(i),C('<div class="emojionearea-category-title"/>').text(t.title).prependTo(r)}while(0<--n)}}),a.filters=null,c.sprite||(c.lasyEmoji=f.find(".lazy-emoji")),(u=l.find(j("filter"))).eq(0).addClass("active"),h=f.find(j("category-block")),d=f.find(j("category")),c.recentFilter=u.filter('[data-filter="recent"]'),c.recentCategory=d.filter("[name=recent]"),c.scrollArea=p,a.container?C(a.container).wrapInner(g):g.insertAfter(t),a.hideSource&&t.hide(),c.setText(t[i]()),t[i](c.getText()),F.apply(c),c.standalone&&!c.getText().length){var b=C(t).data("emoji-placeholder")||a.emojiPlaceholder;c.setText(b),o.addClass("has-placeholder")}P(c,f.find(".emojibtn"),{click:"emojibtn.click"}),P(c,window,{resize:"!resize"}),P(c,m.children(),{click:"tone.click"}),P(c,[s,n],{mousedown:"!mousedown"},o),P(c,n,{click:"button.click"}),P(c,o,{paste:"!paste"},o),P(c,o,["focus","blur"],function(){return!c.stayFocused&&o}),P(c,s,{mousedown:"picker.mousedown",mouseup:"picker.mouseup",click:"picker.click",keyup:"picker.keyup",keydown:"picker.keydown",keypress:"picker.keypress"}),P(c,o,["mousedown","mouseup","click","keyup","keydown","keypress"]),P(c,s.find(".emojionearea-filter"),{click:"filter.click"}),P(c,t,{change:"source.change"}),a.search&&P(c,c.search,{keyup:"search.keypress",focus:"search.focus",blur:"search.blur"});var v=!1;if(p.on("scroll",function(){if(!v&&(G.call(c),p.is(":not(.skinnable)"))){var n=d.eq(0),r=p.offset().top;d.each(function(e,t){return!(10<=C(t).offset().top-r)&&void(n=C(t))});var e=u.filter('[data-filter="'+n.attr("name")+'"]');e[0]&&!e.is(".active")&&(u.removeClass("active"),e.addClass("active"))}}),c.on("@filter.click",function(e){var t=e.is(".active");if(p.is(".skinnable")){if(t)return;m.children().eq(0).click()}v=!0,t||(u.filter(".active").removeClass("active"),e.addClass("active"));var n=d.filter('[name="'+e.data("filter")+'"]').offset().top,r=p.scrollTop(),i=p.offset().top;p.stop().animate({scrollTop:n+r-i-2},200,"swing",function(){G.call(c),v=!1})}).on("@picker.show",function(){c.recentEmojis&&H(c),G.call(c)}).on("@tone.click",function(e){m.children().removeClass("active");var t=e.addClass("active").data("skin");t?(p.addClass("skinnable"),h.hide().filter("[data-tone="+t+"]").show(),u.removeClass("active")):(p.removeClass("skinnable"),h.hide().filter("[data-tone=0]").show(),u.eq(0).click()),G.call(c),a.search&&c.trigger("search.keypress")}).on("@button.click",function(e){e.is(".active")?c.hidePicker():(c.showPicker(),c.searchSel=null)}).on("@!paste",function(o,e){var t=function(e){var t="caret-"+(new Date).getTime(),n=N(e,c);$(n),$('<i id="'+t+'"></i>'),o.scrollTop(s);var r=C("#"+t),i=r.offset().top-o.offset().top,a=o.height();(a<=s+i||i<s)&&o.scrollTop(s+i-2*a/3),r.remove(),c.stayFocused=!1,F.apply(c),I(c,"paste",[o,e,n])};if(e.originalEvent.clipboardData){var n=e.originalEvent.clipboardData.getData("text/plain");return t(n),e.preventDefault?e.preventDefault():e.stop(),e.returnValue=!1,e.stopPropagation(),!1}c.stayFocused=!0,$("<span>"+D+"</span>");var r=S(o[0]),s=o.scrollTop(),i=C("<div/>",{contenteditable:!0}).css({position:"fixed",left:"-999px",width:"1px",height:"1px",top:"20px",overflow:"hidden"}).appendTo(C("BODY")).focus();window.setTimeout(function(){o.focus(),T(o[0],r);var e=L(i.html().replace(/\r\n|\n|\r/g,"<br>"),c);i.remove(),t(e)},200)}).on("@emojibtn.click",function(e){var t,n,r,i;o.removeClass("has-placeholder"),null!==c.searchSel&&(o.focus(),T(o[0],c.searchSel),c.searchSel=null),c.standalone?(o.html(M(e.data("name"),c.emojiTemplate)),c.trigger("blur")):(S(o[0]),$(M(e.data("name"),c.emojiTemplate))),c.recentEmojis&&(t=c,n=e.data("name"),r=U().split("|"),-1!==(i=r.indexOf(n))&&r.splice(i,1),r.unshift(n),9<r.length&&r.pop(),localStorage.setItem("recent_emojis",r.join("|")),H(t)),c.trigger("search.keypress")}).on("@!resize @keyup @emojibtn.click",F).on("@!mousedown",function(e,t){return C(t.target).hasClass("search")?(c.stayFocused=!0,null===c.searchSel&&(c.searchSel=S(e[0]))):(g.is(".focused")||e.trigger("focus"),t.preventDefault()),!1}).on("@change",function(){var e=c.editor.html().replace(/<\/?(?:div|span|p)[^>]*>/gi,"");e.length&&!/^<br[^>]*>$/i.test(e)||c.editor.html(c.content=""),t[i](c.getText())}).on("@source.change",function(){c.setText(t[i]()),I("change")}).on("@focus",function(){g.addClass("focused")}).on("@blur",function(){g.removeClass("focused"),a.hidePickerOnBlur&&c.hidePicker();var e=c.editor.html();c.content!==e?(c.content=e,I(c,"change",[c.editor]),t.trigger("blur").trigger("change")):t.trigger("blur"),a.search&&(c.search.val(""),c.trigger("search.keypress",!0))}),a.search&&c.on("@search.focus",function(){c.stayFocused=!0,c.search.addClass("focused")}).on("@search.keypress",function(e){var r=s.find(".emojionearea-filter"),n=a.tones?m.find("i.active").data("skin"):0,i=c.search.val().replace(/ /g,"_").replace(/"/g,'\\"');i&&i.length?(c.recentFilter.hasClass("active")&&c.recentFilter.removeClass("active").next().addClass("active"),c.recentCategory.hide(),c.recentFilter.hide(),h.each(function(){var e=function(e,t){var n=e.find('.emojibtn[data-name*="'+i+'"]');0===n.length?(e.data("tone")===t&&e.hide(),r.filter('[data-filter="'+e.attr("name")+'"]').hide()):(e.find('.emojibtn:not([data-name*="'+i+'"])').hide(),n.show(),e.data("tone")===t&&e.show(),r.filter('[data-filter="'+e.attr("name")+'"]').show())},t=C(this);0===t.data("tone")?d.filter(':not([name="recent"])').each(function(){e(C(this),0)}):e(t,n)}),v?G.call(c):p.trigger("scroll")):(H(c,!0),h.filter('[data-tone="'+m.find("i.active").data("skin")+'"]:not([name="recent"])').show(),C(".emojibtn",h).show(),r.show(),G.call(c))}).on("@search.blur",function(){c.stayFocused=!1,c.search.removeClass("focused"),c.trigger("blur")}),a.shortcuts&&c.on("@keydown",function(e,t){t.ctrlKey||(9==t.which?(t.preventDefault(),n.click()):27==t.which&&(t.preventDefault(),n.is(".active")&&c.hidePicker()))}),O(a.events)&&!C.isEmptyObject(a.events)&&C.each(a.events,function(e,t){c.on(e.replace(/_/g,"."),t)}),a.autocomplete){var y=function(){var e={maxCount:a.textcomplete.maxCount,placement:a.textcomplete.placement};a.shortcuts&&(e.onKeydown=function(e,t){if(!e.ctrlKey&&13==e.which)return t.KEY_ENTER});var n=C.map(A.emojioneList,function(e,t){return a.autocompleteTones?t:/_tone[12345]/.test(t)?null:t});n.sort(),o.textcomplete([{id:k,match:/\B(:[\-+\w]*)$/,search:function(t,e){e(C.map(n,function(e){return 0===e.indexOf(t)?e:null}))},template:function(e){return M(e,c.emojiTemplate)+" "+e.replace(/:/g,"")},replace:function(e){return M(e,c.emojiTemplate)},cache:!0,index:1}],e),a.textcomplete.placement&&"static"==C(o.data("textComplete").option.appendTo).css("position")&&C(o.data("textComplete").option.appendTo).css("position","relative")},w=function(){if(c.disabled){var e=function(){c.off("enabled",e),y()};c.on("enabled",e)}else y()};C.fn.textcomplete?w():C.ajax({url:"https://cdn.rawgit.com/yuku-t/jquery-textcomplete/v1.3.4/dist/jquery.textcomplete.js",dataType:"script",cache:!0,success:w})}c.inline&&(g.addClass(j("inline",!0)),c.on("@keydown",function(e,t){13==t.which&&t.preventDefault()})),/firefox/i.test(navigator.userAgent)&&document.execCommand("enableObjectResizing",!1,!1),c.isReady=!0,c.trigger("onLoad",o),c.trigger("ready",o)}window.getSelection&&document.createRange?(S=function(e){var t=window.getSelection&&window.getSelection();if(t&&0<t.rangeCount)return t.getRangeAt(0)},T=function(e,t){var n=document.createRange();n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset),(t=window.getSelection()).removeAllRanges(),t.addRange(n)}):document.selection&&document.body.createTextRange&&(S=function(e){return document.selection.createRange()},T=function(e,t){var n=document.body.createTextRange();n.moveToElementText(e),n.setStart(t.startContanier,t.startOffset),n.setEnd(t.endContainer,t.endOffset),n.select()});var g={defaultBase:"https://cdnjs.cloudflare.com/ajax/libs/emojione/",defaultBase3:"https://cdn.jsdelivr.net/",base:null,isLoading:!1};function _(t){var n=f();if(t=R(t),!g.isLoading)if(!A||h(d(A))<2){var e;g.isLoading=!0,e=5<h(n)?g.defaultBase3+"npm/emojione@"+n:4<h(n)?g.defaultBase3+"emojione/"+n:g.defaultBase+"/"+n,C.ajax({url:e+"/lib/js/emojione.min.js",dataType:"script",cache:!0,success:function(){var e;for(A=window.emojione,n=d(A),e=4<(E=h(n))?(g.base=g.defaultBase3+"emojione/assets/"+n,g.base+"/sprites/emojione-sprite-"+A.emojiSize+".css"):(g.base=g.defaultBase+n+"/assets",g.base+"/sprites/emojione.sprites.css"),t.sprite&&(document.createStyleSheet?document.createStyleSheet(e):C("<link/>",{rel:"stylesheet",href:e}).appendTo("head"));i.length;)i.shift().call();g.isLoading=!1}})}else n=d(A),E=h(n),g.base=4<E?g.defaultBase3+"emojione/assets/"+n:g.defaultBase+n+"/assets";a(function(){var e="";t.useInternalCDN&&(4<E&&(e=A.emojiSize+"/"),A.imagePathPNG=g.base+"/png/"+e,A.imagePathSVG=g.base+"/svg/"+e,A.imagePathSVGSprites=g.base+"/sprites/emojione.sprites.svg",A.imageType=t.imageType),4<h(n)?(c=A.regUnicode,A.imageType=t.imageType||"png"):c=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|("+A.unicodeRegexp+")","gi")})}var t=function(e,t){var n=this;_(t),o[n.id=++r]={},s[n.id]={},a(function(){m(n,e,t)})};t.prototype.on=function(e,n){if(e&&C.isFunction(n)){var r=this;C.each(e.toLowerCase().split(" "),function(e,t){(function(r,i){i=i.replace(/^@/,"");var e=r.id;s[e][i]&&(C.each(s[e][i],function(e,n){C.each(C.isArray(n[0])?n[0]:[n[0]],function(e,t){C(t).on(n[1],function(){var e=l.call(arguments),t=C.isFunction(n[2])?n[2].apply(r,[i].concat(e)):n[2];t&&I(r,i,[t].concat(e))})})}),s[e][i]=null)})(r,t),(o[r.id][t]||(o[r.id][t]=[])).push(n)})}return this},t.prototype.off=function(e,r){if(e){var i=this.id;C.each(e.toLowerCase().replace(/_/g,".").split(" "),function(e,n){o[i][n]&&!/^@/.test(n)&&(r?C.each(o[i][n],function(e,t){t===r&&(o[i][n]=o[i][n].splice(e,1))}):o[i][n]=[])})}return this},t.prototype.trigger=function(){var e=l.call(arguments),t=[this].concat(e.slice(0,1));return t.push(e.slice(1)),I.apply(this,t)},t.prototype.setFocus=function(){var e=this;return a(function(){e.editor.focus()}),e},t.prototype.setText=function(e){var t=this;return a(function(){t.editor.html(N(e,t)),t.content=t.editor.html(),I(t,"change",[t.editor]),F.apply(t)}),t},t.prototype.getText=function(){return L(this.editor.html(),this)},t.prototype.showPicker=function(){var e=this;return e._sh_timer&&window.clearTimeout(e._sh_timer),e.picker.removeClass("hidden"),e._sh_timer=window.setTimeout(function(){e.button.addClass("active")},50),I(e,"picker.show",[e.picker]),e},t.prototype.hidePicker=function(){var e=this;return e._sh_timer&&window.clearTimeout(e._sh_timer),e.button.removeClass("active"),e._sh_timer=window.setTimeout(function(){e.picker.addClass("hidden")},500),I(e,"picker.hide",[e.picker]),e},t.prototype.enable=function(){var t=this,e=function(){t.disabled=!1,t.editor.prop("contenteditable",!0),t.button.show();var e=t[t.standalone?"button":"editor"];e.parent().removeClass("emojionearea-disable"),I(t,"enabled",[e])};return t.isReady?e():t.on("ready",e),t},t.prototype.disable=function(){var t=this;t.disabled=!0;var e=function(){t.editor.prop("contenteditable",!1),t.hidePicker(),t.button.hide();var e=t[t.standalone?"button":"editor"];e.parent().addClass("emojionearea-disable"),I(t,"disabled",[e])};return t.isReady?e():t.on("ready",e),t},C.fn.emojioneArea=function(e){return this.each(function(){return this.emojioneArea||C.data(this,"emojioneArea",this.emojioneArea=new t(C(this),e)),this.emojioneArea})},C.fn.emojioneArea.defaults=n(),C.fn.emojioneAreaText=function(e){e=R(e);var t=this,n={shortnames:!e||void 0===e.shortnames||e.shortnames,emojiTemplate:'<img alt="{alt}" class="emojione'+(e&&e.sprite&&E<3?'-{uni}" src="'+x:'emoji" src="{img}')+'"/>'};return _(e),a(function(){t.each(function(){var e=C(this);return e.hasClass("emojionearea-text")||e.addClass("emojionearea-text").html(N(e.is("TEXTAREA")||e.is("INPUT")?e.val():e.text(),n)),e})}),this}},window),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JsSIP=e()}}(function(){return function a(o,s,c){function l(n,e){if(!s[n]){if(!o[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=s[n]={exports:{}};o[n][0].call(i.exports,function(e){var t=o[n][1][e];return l(t||e)},i,i.exports,a,o,s,c)}return s[n].exports}for(var u="function"==typeof require&&require,e=0;e<c.length;e++)l(c[e]);return l}({1:[function(e,t,n){"use strict";var c=e("./Utils"),r=e("./Constants"),i=e("./Grammar"),a=e("./URI"),l=e("./Socket"),u=e("./Exceptions");n.settings={authorization_user:null,password:null,realm:null,ha1:null,display_name:null,uri:null,contact_uri:null,instance_id:null,use_preloaded_route:!1,session_timers:!0,session_timers_refresh_method:r.UPDATE,no_answer_timeout:60,register:!0,register_expires:600,registrar_server:null,sockets:null,connection_recovery_max_interval:null,connection_recovery_min_interval:null,via_host:c.createRandomToken(12)+".invalid"};var f={mandatory:{sockets:function(e){var t=[];if(l.isSocket(e))t.push({socket:e});else{if(!Array.isArray(e)||!e.length)return;var n=!0,r=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;Object.prototype.hasOwnProperty.call(s,"socket")&&l.isSocket(s.socket)?t.push(s):l.isSocket(s)&&t.push({socket:s})}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}}return t},uri:function(e){/^sip:/i.test(e)||(e=r.SIP+":"+e);var t=a.parse(e);return t&&t.user?t:void 0}},optional:{authorization_user:function(e){return-1===i.parse('"'+e+'"',"quoted_string")?void 0:e},user_agent:function(e){if("string"==typeof e)return e},connection_recovery_max_interval:function(e){if(c.isDecimal(e)){var t=Number(e);if(0<t)return t}},connection_recovery_min_interval:function(e){if(c.isDecimal(e)){var t=Number(e);if(0<t)return t}},contact_uri:function(e){if("string"==typeof e){var t=i.parse(e,"SIP_URI");if(-1!==t)return t}},display_name:function(e){return-1===i.parse('"'+e+'"',"display_name")?void 0:e},instance_id:function(e){return/^uuid:/i.test(e)&&(e=e.substr(5)),-1===i.parse(e,"uuid")?void 0:e},no_answer_timeout:function(e){if(c.isDecimal(e)){var t=Number(e);if(0<t)return t}},session_timers:function(e){if("boolean"==typeof e)return e},session_timers_refresh_method:function(e){if("string"==typeof e&&((e=e.toUpperCase())===r.INVITE||e===r.UPDATE))return e},password:function(e){return String(e)},realm:function(e){return String(e)},ha1:function(e){return String(e)},register:function(e){if("boolean"==typeof e)return e},register_expires:function(e){if(c.isDecimal(e)){var t=Number(e);if(0<t)return t}},registrar_server:function(e){/^sip:/i.test(e)||(e=r.SIP+":"+e);var t=a.parse(e);return t?t.user?void 0:t:void 0},use_preloaded_route:function(e){if("boolean"==typeof e)return e}}};n.load=function(e,t){for(var n in f.mandatory){if(!t.hasOwnProperty(n))throw new u.ConfigurationError(n);var r=t[n],i=f.mandatory[n](r);if(void 0===i)throw new u.ConfigurationError(n,r);e[n]=i}for(var a in f.optional)if(t.hasOwnProperty(a)){var o=t[a];if(c.isEmpty(o))continue;var s=f.optional[a](o);if(void 0===s)throw new u.ConfigurationError(a,o);e[a]=s}}},{"./Constants":2,"./Exceptions":6,"./Grammar":7,"./Socket":20,"./URI":25,"./Utils":26}],2:[function(e,t,n){"use strict";var r=e("../package.json");t.exports={USER_AGENT:r.title+" "+r.version,SIP:"sip",SIPS:"sips",causes:{CONNECTION_ERROR:"Connection Error",REQUEST_TIMEOUT:"Request Timeout",SIP_FAILURE_CODE:"SIP Failure Code",INTERNAL_ERROR:"Internal Error",BUSY:"Busy",REJECTED:"Rejected",REDIRECTED:"Redirected",UNAVAILABLE:"Unavailable",NOT_FOUND:"Not Found",ADDRESS_INCOMPLETE:"Address Incomplete",INCOMPATIBLE_SDP:"Incompatible SDP",MISSING_SDP:"Missing SDP",AUTHENTICATION_ERROR:"Authentication Error",BYE:"Terminated",WEBRTC_ERROR:"WebRTC Error",CANCELED:"Canceled",NO_ANSWER:"No Answer",EXPIRES:"Expires",NO_ACK:"No ACK",DIALOG_ERROR:"Dialog Error",USER_DENIED_MEDIA_ACCESS:"User Denied Media Access",BAD_MEDIA_DESCRIPTION:"Bad Media Description",RTP_TIMEOUT:"RTP Timeout"},SIP_ERROR_CAUSES:{REDIRECTED:[300,301,302,305,380],BUSY:[486,600],REJECTED:[403,603],NOT_FOUND:[404,604],UNAVAILABLE:[480,410,408,430],ADDRESS_INCOMPLETE:[484,424],INCOMPATIBLE_SDP:[488,606],AUTHENTICATION_ERROR:[401,407]},ACK:"ACK",BYE:"BYE",CANCEL:"CANCEL",INFO:"INFO",INVITE:"INVITE",MESSAGE:"MESSAGE",NOTIFY:"NOTIFY",OPTIONS:"OPTIONS",REGISTER:"REGISTER",REFER:"REFER",UPDATE:"UPDATE",SUBSCRIBE:"SUBSCRIBE",REASON_PHRASE:{100:"Trying",180:"Ringing",181:"Call Is Being Forwarded",182:"Queued",183:"Session Progress",199:"Early Dialog Terminated",200:"OK",202:"Accepted",204:"No Notification",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",305:"Use Proxy",380:"Alternative Service",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",410:"Gone",412:"Conditional Request Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Unsupported URI Scheme",417:"Unknown Resource-Priority",420:"Bad Extension",421:"Extension Required",422:"Session Interval Too Small",423:"Interval Too Brief",424:"Bad Location Information",428:"Use Identity Header",429:"Provide Referrer Identity",430:"Flow Failed",433:"Anonymity Disallowed",436:"Bad Identity-Info",437:"Unsupported Certificate",438:"Invalid Identity Header",439:"First Hop Lacks Outbound Support",440:"Max-Breadth Exceeded",469:"Bad Info Package",470:"Consent Needed",478:"Unresolvable Destination",480:"Temporarily Unavailable",481:"Call/Transaction Does Not Exist",482:"Loop Detected",483:"Too Many Hops",484:"Address Incomplete",485:"Ambiguous",486:"Busy Here",487:"Request Terminated",488:"Not Acceptable Here",489:"Bad Event",491:"Request Pending",493:"Undecipherable",494:"Security Agreement Required",500:"JsSIP Internal Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Server Time-out",505:"Version Not Supported",513:"Message Too Large",580:"Precondition Failure",600:"Busy Everywhere",603:"Decline",604:"Does Not Exist Anywhere",606:"Not Acceptable"},ALLOWED_METHODS:"INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO",ACCEPTED_BODY_TYPES:"application/sdp, application/dtmf-relay",MAX_FORWARDS:69,SESSION_EXPIRES:90,MIN_SESSION_EXPIRES:60}},{"../package.json":51}],3:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var o=e("./SIPMessage"),i=e("./Constants"),s=e("./Transactions"),c=e("./Dialog/RequestSender"),l=e("./Utils"),u=e("debug")("JsSIP:Dialog"),f={STATUS_EARLY:1,STATUS_CONFIRMED:2};t.exports=function(){function a(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:f.STATUS_CONFIRMED;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),this._owner=e,this._ua=e._ua,this._uac_pending_reply=!1,this._uas_pending_reply=!1,!t.hasHeader("contact"))return{error:"unable to create a Dialog without Contact header field"};t instanceof o.IncomingResponse&&(r=t.status_code<200?f.STATUS_EARLY:f.STATUS_CONFIRMED);var i=t.parseHeader("contact");"UAS"===n?(this._id={call_id:t.call_id,local_tag:t.to_tag,remote_tag:t.from_tag,toString:function(){return this.call_id+this.local_tag+this.remote_tag}},this._state=r,this._remote_seqnum=t.cseq,this._local_uri=t.parseHeader("to").uri,this._remote_uri=t.parseHeader("from").uri,this._remote_target=i.uri,this._route_set=t.getHeaders("record-route"),this._ack_seqnum=this._remote_seqnum):"UAC"===n&&(this._id={call_id:t.call_id,local_tag:t.from_tag,remote_tag:t.to_tag,toString:function(){return this.call_id+this.local_tag+this.remote_tag}},this._state=r,this._local_seqnum=t.cseq,this._local_uri=t.parseHeader("from").uri,this._remote_uri=t.parseHeader("to").uri,this._remote_target=i.uri,this._route_set=t.getHeaders("record-route").reverse(),this._ack_seqnum=null),this._ua.newDialog(this),u("new "+n+" dialog created with status "+(this._state===f.STATUS_EARLY?"EARLY":"CONFIRMED"))}return r(a,null,[{key:"C",get:function(){return f}}]),r(a,[{key:"update",value:function(e,t){this._state=f.STATUS_CONFIRMED,u("dialog "+this._id.toString()+"  changed to CONFIRMED state"),"UAC"===t&&(this._route_set=e.getHeaders("record-route").reverse())}},{key:"terminate",value:function(){u("dialog "+this._id.toString()+" deleted"),this._ua.destroyDialog(this)}},{key:"sendRequest",value:function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=l.cloneArray(n.extraHeaders),i=n.eventHandlers||{},a=n.body||null,o=this._createRequest(e,r,a);return i.onAuthenticated=function(){t._local_seqnum+=1},new c(this,o,i).send(),o}},{key:"receiveRequest",value:function(e){this._checkInDialogRequest(e)&&(e.method===i.ACK&&null!==this._ack_seqnum?this._ack_seqnum=null:e.method===i.INVITE&&(this._ack_seqnum=e.cseq),this._owner.receiveRequest(e))}},{key:"_createRequest",value:function(e,t,n){t=l.cloneArray(t),this._local_seqnum||(this._local_seqnum=Math.floor(1e4*Math.random()));var r=e===i.CANCEL||e===i.ACK?this._local_seqnum:this._local_seqnum+=1;return new o.OutgoingRequest(e,this._remote_target,this._ua,{cseq:r,call_id:this._id.call_id,from_uri:this._local_uri,from_tag:this._id.local_tag,to_uri:this._remote_uri,to_tag:this._id.remote_tag,route_set:this._route_set},t,n)}},{key:"_checkInDialogRequest",value:function(t){var n=this;if(this._remote_seqnum)if(t.cseq<this._remote_seqnum){if(t.method!==i.ACK)return t.reply(500),!1;if(null===this._ack_seqnum||t.cseq!==this._ack_seqnum)return!1}else t.cseq>this._remote_seqnum&&(this._remote_seqnum=t.cseq);else this._remote_seqnum=t.cseq;if(t.method===i.INVITE||t.method===i.UPDATE&&t.body){if(!0===this._uac_pending_reply)t.reply(491);else{if(!0===this._uas_pending_reply){var e=1+(10*Math.random()|0);return t.reply(500,null,["Retry-After:"+e]),!1}this._uas_pending_reply=!0;t.server_transaction.on("stateChanged",function e(){t.server_transaction.state!==s.C.STATUS_ACCEPTED&&t.server_transaction.state!==s.C.STATUS_COMPLETED&&t.server_transaction.state!==s.C.STATUS_TERMINATED||(t.server_transaction.removeListener("stateChanged",e),n._uas_pending_reply=!1)})}t.hasHeader("contact")&&t.server_transaction.on("stateChanged",function(){t.server_transaction.state===s.C.STATUS_ACCEPTED&&(n._remote_target=t.parseHeader("contact").uri)})}else t.method===i.NOTIFY&&t.hasHeader("contact")&&t.server_transaction.on("stateChanged",function(){t.server_transaction.state===s.C.STATUS_COMPLETED&&(n._remote_target=t.parseHeader("contact").uri)});return!0}},{key:"id",get:function(){return this._id}},{key:"local_seqnum",get:function(){return this._local_seqnum},set:function(e){this._local_seqnum=e}},{key:"owner",get:function(){return this._owner}},{key:"uac_pending_reply",get:function(){return this._uac_pending_reply},set:function(e){this._uac_pending_reply=e}},{key:"uas_pending_reply",get:function(){return this._uas_pending_reply}}]),a}()},{"./Constants":2,"./Dialog/RequestSender":4,"./SIPMessage":19,"./Transactions":22,"./Utils":26,debug:29}],4:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var a=e("../Constants"),o=e("../Transactions"),s=e("../RTCSession"),c=e("../RequestSender"),l={onRequestTimeout:function(){},onTransportError:function(){},onSuccessResponse:function(){},onErrorResponse:function(){},onAuthenticated:function(){},onDialogError:function(){}};t.exports=function(){function i(e,t,n){for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this._dialog=e,this._ua=e._ua,this._request=t,this._eventHandlers=n,this._reattempt=!1,this._reattemptTimer=null,l)Object.prototype.hasOwnProperty.call(l,r)&&(this._eventHandlers[r]||(this._eventHandlers[r]=l[r]))}return r(i,[{key:"send",value:function(){var t=this,n=new c(this._ua,this._request,{onRequestTimeout:function(){t._eventHandlers.onRequestTimeout()},onTransportError:function(){t._eventHandlers.onTransportError()},onAuthenticated:function(e){t._eventHandlers.onAuthenticated(e)},onReceiveResponse:function(e){t._receiveResponse(e)}});if(n.send(),(this._request.method===a.INVITE||this._request.method===a.UPDATE&&this._request.body)&&n.clientTransaction.state!==o.C.STATUS_TERMINATED){this._dialog.uac_pending_reply=!0;n.clientTransaction.on("stateChanged",function e(){n.clientTransaction.state!==o.C.STATUS_ACCEPTED&&n.clientTransaction.state!==o.C.STATUS_COMPLETED&&n.clientTransaction.state!==o.C.STATUS_TERMINATED||(n.clientTransaction.removeListener("stateChanged",e),t._dialog.uac_pending_reply=!1)})}}},{key:"_receiveResponse",value:function(e){var t=this;408===e.status_code||481===e.status_code?this._eventHandlers.onDialogError(e):e.method===a.INVITE&&491===e.status_code?this._reattempt?200<=e.status_code&&e.status_code<300?this._eventHandlers.onSuccessResponse(e):300<=e.status_code&&this._eventHandlers.onErrorResponse(e):(this._request.cseq.value=this._dialog.local_seqnum+=1,this._reattemptTimer=setTimeout(function(){t._dialog.owner.status!==s.C.STATUS_TERMINATED&&(t._reattempt=!0,t._request_sender.send())},1e3)):200<=e.status_code&&e.status_code<300?this._eventHandlers.onSuccessResponse(e):300<=e.status_code&&this._eventHandlers.onErrorResponse(e)}},{key:"request",get:function(){return this._request}}]),i}()},{"../Constants":2,"../RTCSession":12,"../RequestSender":18,"../Transactions":22}],5:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var c=e("./Utils"),l=e("debug")("JsSIP:DigestAuthentication"),u=e("debug")("JsSIP:ERROR:DigestAuthentication");u.log=console.warn.bind(console),t.exports=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this._credentials=e,this._cnonce=null,this._nc=0,this._ncHex="00000000",this._algorithm=null,this._realm=null,this._nonce=null,this._opaque=null,this._stale=null,this._qop=null,this._method=null,this._uri=null,this._ha1=null,this._response=null}return r(t,[{key:"get",value:function(e){switch(e){case"realm":return this._realm;case"ha1":return this._ha1;default:return void u('get() | cannot get "%s" parameter',e)}}},{key:"authenticate",value:function(e,t){var n=e.method,r=e.ruri,i=e.body,a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(this._algorithm=t.algorithm,this._realm=t.realm,this._nonce=t.nonce,this._opaque=t.opaque,this._stale=t.stale,this._algorithm){if("MD5"!==this._algorithm)return u('authenticate() | challenge with Digest algorithm different than "MD5", authentication aborted'),!1}else this._algorithm="MD5";if(!this._nonce)return u("authenticate() | challenge without Digest nonce, authentication aborted"),!1;if(!this._realm)return u("authenticate() | challenge without Digest realm, authentication aborted"),!1;if(!this._credentials.password){if(!this._credentials.ha1)return u("authenticate() | no plain SIP password nor ha1 provided, authentication aborted"),!1;if(this._credentials.realm!==this._realm)return u('authenticate() | no plain SIP password, and stored `realm` does not match the given `realm`, cannot authenticate [stored:"%s", given:"%s"]',this._credentials.realm,this._realm),!1}if(t.qop)if(-1<t.qop.indexOf("auth-int"))this._qop="auth-int";else{if(!(-1<t.qop.indexOf("auth")))return u('authenticate() | challenge without Digest qop different than "auth" or "auth-int", authentication aborted'),!1;this._qop="auth"}else this._qop=null;this._method=n,this._uri=r,this._cnonce=a||c.createRandomToken(12),this._nc+=1;var o=Number(this._nc).toString(16);this._ncHex="00000000".substr(0,8-o.length)+o,4294967296===this._nc&&(this._nc=1,this._ncHex="00000001"),this._credentials.password?this._ha1=c.calculateMD5(this._credentials.username+":"+this._realm+":"+this._credentials.password):this._ha1=this._credentials.ha1;var s=void 0;return"auth"===this._qop?(s=c.calculateMD5(this._method+":"+this._uri),this._response=c.calculateMD5(this._ha1+":"+this._nonce+":"+this._ncHex+":"+this._cnonce+":auth:"+s)):"auth-int"===this._qop?(s=c.calculateMD5(this._method+":"+this._uri+":"+c.calculateMD5(i||"")),this._response=c.calculateMD5(this._ha1+":"+this._nonce+":"+this._ncHex+":"+this._cnonce+":auth-int:"+s)):null===this._qop&&(s=c.calculateMD5(this._method+":"+this._uri),this._response=c.calculateMD5(this._ha1+":"+this._nonce+":"+s)),l("authenticate() | response generated"),!0}},{key:"toString",value:function(){var e=[];if(!this._response)throw new Error("response field does not exist, cannot generate Authorization header");return e.push("algorithm="+this._algorithm),e.push('username="'+this._credentials.username+'"'),e.push('realm="'+this._realm+'"'),e.push('nonce="'+this._nonce+'"'),e.push('uri="'+this._uri+'"'),e.push('response="'+this._response+'"'),this._opaque&&e.push('opaque="'+this._opaque+'"'),this._qop&&(e.push("qop="+this._qop),e.push('cnonce="'+this._cnonce+'"'),e.push("nc="+this._ncHex)),"Digest "+e.join(", ")}}]),t}()},{"./Utils":26,debug:29}],6:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var r=function(e){function r(e,t){i(this,r);var n=a(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.code=1,n.name="CONFIGURATION_ERROR",n.parameter=e,n.value=t,n.message=n.value?"Invalid value "+JSON.stringify(n.value)+' for parameter "'+n.parameter+'"':"Missing parameter: "+n.parameter,n}return o(r,Error),r}(),s=function(e){function n(e){i(this,n);var t=a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.code=2,t.name="INVALID_STATE_ERROR",t.status=e,t.message="Invalid status: "+e,t}return o(n,Error),n}(),c=function(e){function n(e){i(this,n);var t=a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.code=3,t.name="NOT_SUPPORTED_ERROR",t.message=e,t}return o(n,Error),n}(),l=function(e){function n(e){i(this,n);var t=a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.code=4,t.name="NOT_READY_ERROR",t.message=e,t}return o(n,Error),n}();t.exports={ConfigurationError:r,InvalidStateError:s,NotSupportedError:c,NotReadyError:l}},{}],7:[function(Hn,e,t){"use strict";e.exports=function(){function Un(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var e={parse:function(_,c){var e={CRLF:o,DIGIT:l,ALPHA:s,HEXDIG:u,WSP:f,OCTET:n,DQUOTE:d,SP:h,HTAB:p,alphanum:i,reserved:m,unreserved:g,mark:r,escaped:w,LWS:C,SWS:A,HCOLON:S,TEXT_UTF8_TRIM:T,TEXT_UTF8char:x,UTF8_NONASCII:k,UTF8_CONT:E,LHEX:function(){var e;null===(e=l())&&(/^[a-f]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[a-f]")));return e},token:D,token_nodot:I,separators:function(){var e;40===_.charCodeAt(b)?(e="(",b++):(e=null,0===v&&y('"("'));null===e&&(41===_.charCodeAt(b)?(e=")",b++):(e=null,0===v&&y('")"')),null===e&&(60===_.charCodeAt(b)?(e="<",b++):(e=null,0===v&&y('"<"')),null===e&&(62===_.charCodeAt(b)?(e=">",b++):(e=null,0===v&&y('">"')),null===e&&(64===_.charCodeAt(b)?(e="@",b++):(e=null,0===v&&y('"@"')),null===e&&(44===_.charCodeAt(b)?(e=",",b++):(e=null,0===v&&y('","')),null===e&&(59===_.charCodeAt(b)?(e=";",b++):(e=null,0===v&&y('";"')),null===e&&(58===_.charCodeAt(b)?(e=":",b++):(e=null,0===v&&y('":"')),null===e&&(92===_.charCodeAt(b)?(e="\\",b++):(e=null,0===v&&y('"\\\\"')),null===e&&null===(e=d())&&(47===_.charCodeAt(b)?(e="/",b++):(e=null,0===v&&y('"/"')),null===e&&(91===_.charCodeAt(b)?(e="[",b++):(e=null,0===v&&y('"["')),null===e&&(93===_.charCodeAt(b)?(e="]",b++):(e=null,0===v&&y('"]"')),null===e&&(63===_.charCodeAt(b)?(e="?",b++):(e=null,0===v&&y('"?"')),null===e&&(61===_.charCodeAt(b)?(e="=",b++):(e=null,0===v&&y('"="')),null===e&&(123===_.charCodeAt(b)?(e="{",b++):(e=null,0===v&&y('"{"')),null===e&&(125===_.charCodeAt(b)?(e="}",b++):(e=null,0===v&&y('"}"')),null===e&&null===(e=h())&&(e=p()))))))))))))))));return e},word:P,STAR:M,SLASH:$,EQUAL:O,LPAREN:R,RPAREN:N,RAQUOT:L,LAQUOT:F,COMMA:G,SEMI:j,COLON:B,LDQUOT:U,RDQUOT:H,comment:function e(){var t,n,r;var i;i=b;t=R();if(null!==t){for(n=[],null===(r=W())&&null===(r=Y())&&(r=e());null!==r;)n.push(r),null===(r=W())&&null===(r=Y())&&(r=e());null!==n&&null!==(r=N())?t=[t,n,r]:(t=null,b=i)}else t=null,b=i;return t},ctext:W,quoted_string:q,quoted_string_clean:z,qdtext:V,quoted_pair:Y,SIP_URI_noparams:K,SIP_URI:Q,uri_scheme:X,uri_scheme_sips:Z,uri_scheme_sip:J,userinfo:ee,user:te,user_unreserved:ne,password:re,hostport:ie,host:ae,hostname:oe,domainlabel:se,toplabel:ce,IPv6reference:le,IPv6address:ue,h16:fe,ls32:de,IPv4address:he,dec_octet:pe,port:me,uri_parameters:ge,uri_parameter:_e,transport_param:be,user_param:ve,method_param:ye,ttl_param:we,maddr_param:Ce,lr_param:Ae,other_param:Se,pname:Te,pvalue:xe,paramchar:ke,param_unreserved:Ee,headers:De,header:Ie,hname:Pe,hvalue:Me,hnv_unreserved:$e,Request_Response:function(){var e;null===(e=lt())&&(e=Oe());return e},Request_Line:Oe,Request_URI:Re,absoluteURI:Ne,hier_part:Le,net_path:Fe,abs_path:Ge,opaque_part:je,uric:Be,uric_no_slash:Ue,path_segments:He,segment:We,param:qe,pchar:ze,scheme:Ve,authority:Ye,srvr:Ke,reg_name:Qe,query:Xe,SIP_Version:Ze,INVITEm:Je,ACKm:et,OPTIONSm:tt,BYEm:nt,CANCELm:rt,REGISTERm:it,SUBSCRIBEm:at,NOTIFYm:ot,REFERm:st,Method:ct,Status_Line:lt,Status_Code:ut,extension_code:ft,Reason_Phrase:dt,Allow_Events:function(){var e,t,n,r,i,a;if(i=b,null!==(e=Nt())){for(t=[],a=b,null!==(n=G())&&null!==(r=Nt())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=G())&&null!==(r=Nt())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},Call_ID:function(){var e,t,n,r,i,a;i=r=b,null!==(e=P())?(a=b,64===_.charCodeAt(b)?(t="@",b++):(t=null,0===v&&y('"@"')),null!==t&&null!==(n=P())?t=[t,n]:(t=null,b=a),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=i)):(e=null,b=i);null!==e&&(o=r,e=void(Fn=_.substring(b,o)));var o;null===e&&(b=r);return e},Contact:function(){var e,t,n,r,i,a,o;if(i=b,null===(e=M()))if(a=b,null!==(e=ht())){for(t=[],o=b,null!==(n=G())&&null!==(r=ht())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=G())&&null!==(r=ht())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;null!==e&&(e=function(e){var t,n;for(n=Fn.multi_header.length,t=0;t<n;t++)if(null===Fn.multi_header[t].parsed){Fn=null;break}Fn=null!==Fn?Fn.multi_header:-1}());null===e&&(b=i);return e},contact_param:ht,name_addr:pt,display_name:mt,contact_params:gt,c_p_q:_t,c_p_expires:bt,delta_seconds:vt,qvalue:yt,generic_param:wt,gen_value:Ct,Content_Disposition:function(){var e,t,n,r,i,a;if(i=b,null!==(e=At())){for(t=[],a=b,null!==(n=j())&&null!==(r=St())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=j())&&null!==(r=St())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},disp_type:At,disp_param:St,handling_param:Tt,Content_Encoding:function(){var e,t,n,r,i,a;if(i=b,null!==(e=D())){for(t=[],a=b,null!==(n=G())&&null!==(r=D())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=G())&&null!==(r=D())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},Content_Length:function(){var e,t,n;if(n=b,null!==(t=l()))for(e=[];null!==t;)e.push(t),t=l();else e=null;null!==e&&(e=void(Fn=parseInt(e.join(""))));null===e&&(b=n);return e},Content_Type:function(){var e,t;t=b,null!==(e=xt())&&(n=t,e=void(Fn=_.substring(b,n)));var n;null===e&&(b=t);return e},media_type:xt,m_type:kt,discrete_type:Et,composite_type:Dt,extension_token:It,x_token:Pt,m_subtype:Mt,m_parameter:$t,m_value:Ot,CSeq:function(){var e,t,n,r;r=b,null!==(e=Rt())&&null!==(t=C())&&null!==(n=ct())?e=[e,t,n]:(e=null,b=r);return e},CSeq_value:Rt,Expires:function(){var e,t;t=b,null!==(e=vt())&&(e=void(Fn=e));null===e&&(b=t);return e},Event:function(){var e,t,n,r,i,a,o;if(a=i=b,null!==(e=Nt())){for(t=[],o=b,null!==(n=j())&&null!==(r=wt())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=j())&&null!==(r=wt())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;null!==e&&(s=e[0],e=void(Fn.event=s.join("").toLowerCase()));var s;null===e&&(b=i);return e},event_type:Nt,From:function(){var e,t,n,r,i,a,o;a=i=b,null===(e=K())&&(e=pt());if(null!==e){for(t=[],o=b,null!==(n=j())&&null!==(r=Lt())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=j())&&null!==(r=Lt())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;null!==e&&(e=function(e){var t=Fn.tag;try{Fn=new Ln(Fn.uri,Fn.display_name,Fn.params),t&&Fn.setParam("tag",t)}catch(e){Fn=-1}}());null===e&&(b=i);return e},from_param:Lt,tag_param:Ft,Max_Forwards:function(){var e,t,n;if(n=b,null!==(t=l()))for(e=[];null!==t;)e.push(t),t=l();else e=null;null!==e&&(e=void(Fn=parseInt(e.join(""))));null===e&&(b=n);return e},Min_Expires:function(){var e,t;t=b,null!==(e=vt())&&(e=void(Fn=e));null===e&&(b=t);return e},Name_Addr_Header:function(){var e,t,n,r,i,a,o,s,c,l;c=s=b,e=[],t=mt();for(;null!==t;)e.push(t),t=mt();if(null!==e)if(null!==(t=F()))if(null!==(n=Q()))if(null!==(r=L())){for(i=[],l=b,null!==(a=j())&&null!==(o=wt())?a=[a,o]:(a=null,b=l);null!==a;)i.push(a),l=b,null!==(a=j())&&null!==(o=wt())?a=[a,o]:(a=null,b=l);null!==i?e=[e,t,n,r,i]:(e=null,b=c)}else e=null,b=c;else e=null,b=c;else e=null,b=c;else e=null,b=c;null!==e&&(e=function(e){try{Fn=new Ln(Fn.uri,Fn.display_name,Fn.params)}catch(e){Fn=-1}}());null===e&&(b=s);return e},Proxy_Authenticate:function(){return Gt()},challenge:Gt,other_challenge:jt,auth_param:Bt,digest_cln:Ut,realm:Ht,realm_value:Wt,domain:qt,URI:zt,nonce:Vt,nonce_value:Yt,opaque:Kt,stale:Qt,algorithm:Xt,qop_options:Zt,qop_value:Jt,Proxy_Require:function(){var e,t,n,r,i,a;if(i=b,null!==(e=D())){for(t=[],a=b,null!==(n=G())&&null!==(r=D())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=G())&&null!==(r=D())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},Record_Route:function(){var e,t,n,r,i,a,o;if(a=i=b,null!==(e=en())){for(t=[],o=b,null!==(n=G())&&null!==(r=en())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=G())&&null!==(r=en())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;null!==e&&(e=function(e){var t,n;for(n=Fn.multi_header.length,t=0;t<n;t++)if(null===Fn.multi_header[t].parsed){Fn=null;break}Fn=null!==Fn?Fn.multi_header:-1}());null===e&&(b=i);return e},rec_route:en,Reason:function(){var e,t,n,r,i,a,o;a=i=b,"sip"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"SIP"'));null===e&&(e=D());if(null!==e){for(t=[],o=b,null!==(n=j())&&null!==(r=tn())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=j())&&null!==(r=tn())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;null!==e&&(e=function(e,t){if(Fn.protocol=t.toLowerCase(),Fn.params||(Fn.params={}),Fn.params.text&&'"'===Fn.params.text[0]){var n=Fn.params.text;Fn.text=n.substring(1,n.length-1),delete Fn.params.text}}(0,e[0]));null===e&&(b=i);return e},reason_param:tn,reason_cause:nn,Require:function(){var e,t,n,r,i,a;if(i=b,null!==(e=D())){for(t=[],a=b,null!==(n=G())&&null!==(r=D())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=G())&&null!==(r=D())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},Route:function(){var e,t,n,r,i,a;if(i=b,null!==(e=rn())){for(t=[],a=b,null!==(n=G())&&null!==(r=rn())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=G())&&null!==(r=rn())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},route_param:rn,Subscription_State:function(){var e,t,n,r,i,a;if(i=b,null!==(e=an())){for(t=[],a=b,null!==(n=j())&&null!==(r=on())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=j())&&null!==(r=on())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},substate_value:an,subexp_params:on,event_reason_value:sn,Subject:function(){var e;return e=null!==(e=T())?e:""},Supported:function(){var e,t,n,r,i,a;if(i=b,null!==(e=D())){for(t=[],a=b,null!==(n=G())&&null!==(r=D())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=G())&&null!==(r=D())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e=null!==e?e:""},To:function(){var e,t,n,r,i,a,o;a=i=b,null===(e=K())&&(e=pt());if(null!==e){for(t=[],o=b,null!==(n=j())&&null!==(r=cn())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=j())&&null!==(r=cn())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;null!==e&&(e=function(e){var t=Fn.tag;try{Fn=new Ln(Fn.uri,Fn.display_name,Fn.params),t&&Fn.setParam("tag",t)}catch(e){Fn=-1}}());null===e&&(b=i);return e},to_param:cn,Via:function(){var e,t,n,r,i,a;if(i=b,null!==(e=ln())){for(t=[],a=b,null!==(n=G())&&null!==(r=ln())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=G())&&null!==(r=ln())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},via_param:ln,via_params:un,via_ttl:fn,via_maddr:dn,via_received:hn,via_branch:pn,response_port:mn,sent_protocol:gn,protocol_name:_n,transport:bn,sent_by:vn,via_host:yn,via_port:wn,ttl:Cn,WWW_Authenticate:function(){return Gt()},Session_Expires:function(){var e,t,n,r,i,a;if(i=b,null!==(e=An())){for(t=[],a=b,null!==(n=j())&&null!==(r=Sn())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=j())&&null!==(r=Sn())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},s_e_expires:An,s_e_params:Sn,s_e_refresher:Tn,extension_header:function(){var e,t,n,r;r=b,null!==(e=D())&&null!==(t=S())&&null!==(n=xn())?e=[e,t,n]:(e=null,b=r);return e},header_value:xn,message_body:function(){var e,t;e=[],t=n();for(;null!==t;)e.push(t),t=n();return e},uuid_URI:function(){var e,t,n;n=b,"uuid:"===_.substr(b,5)?(e="uuid:",b+=5):(e=null,0===v&&y('"uuid:"'));null!==e&&null!==(t=kn())?e=[e,t]:(e=null,b=n);return e},uuid:kn,hex4:En,hex8:Dn,hex12:In,Refer_To:function(){var e,t,n,r,i,a,o;a=i=b,null===(e=K())&&(e=pt());if(null!==e){for(t=[],o=b,null!==(n=j())&&null!==(r=wt())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=j())&&null!==(r=wt())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;null!==e&&(e=function(e){try{Fn=new Ln(Fn.uri,Fn.display_name,Fn.params)}catch(e){Fn=-1}}());null===e&&(b=i);return e},Replaces:function(){var e,t,n,r,i,a;if(i=b,null!==(e=Pn())){for(t=[],a=b,null!==(n=j())&&null!==(r=Mn())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=j())&&null!==(r=Mn())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},call_id:Pn,replaces_param:Mn,to_tag:$n,from_tag:On,early_flag:Rn};if(void 0!==c){if(void 0===e[c])throw new Error("Invalid rule name: "+Un(c)+".")}else c="CRLF";var b=0,v=0,a=0,t=[];function y(e){b<a||(a<b&&(a=b,t=[]),t.push(e))}function o(){var e;return"\r\n"===_.substr(b,2)?(e="\r\n",b+=2):(e=null,0===v&&y('"\\r\\n"')),e}function l(){var e;return/^[0-9]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[0-9]")),e}function s(){var e;return/^[a-zA-Z]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[a-zA-Z]")),e}function u(){var e;return/^[0-9a-fA-F]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[0-9a-fA-F]")),e}function f(){var e;return null===(e=h())&&(e=p()),e}function n(){var e;return/^[\0-\xFF]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[\\0-\\xFF]")),e}function d(){var e;return/^["]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y('["]')),e}function h(){var e;return 32===_.charCodeAt(b)?(e=" ",b++):(e=null,0===v&&y('" "')),e}function p(){var e;return 9===_.charCodeAt(b)?(e="\t",b++):(e=null,0===v&&y('"\\t"')),e}function i(){var e;return/^[a-zA-Z0-9]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[a-zA-Z0-9]")),e}function m(){var e;return 59===_.charCodeAt(b)?(e=";",b++):(e=null,0===v&&y('";"')),null===e&&(47===_.charCodeAt(b)?(e="/",b++):(e=null,0===v&&y('"/"')),null===e&&(63===_.charCodeAt(b)?(e="?",b++):(e=null,0===v&&y('"?"')),null===e&&(58===_.charCodeAt(b)?(e=":",b++):(e=null,0===v&&y('":"')),null===e&&(64===_.charCodeAt(b)?(e="@",b++):(e=null,0===v&&y('"@"')),null===e&&(38===_.charCodeAt(b)?(e="&",b++):(e=null,0===v&&y('"&"')),null===e&&(61===_.charCodeAt(b)?(e="=",b++):(e=null,0===v&&y('"="')),null===e&&(43===_.charCodeAt(b)?(e="+",b++):(e=null,0===v&&y('"+"')),null===e&&(36===_.charCodeAt(b)?(e="$",b++):(e=null,0===v&&y('"$"')),null===e&&(44===_.charCodeAt(b)?(e=",",b++):(e=null,0===v&&y('","'))))))))))),e}function g(){var e;return null===(e=i())&&(e=r()),e}function r(){var e;return 45===_.charCodeAt(b)?(e="-",b++):(e=null,0===v&&y('"-"')),null===e&&(95===_.charCodeAt(b)?(e="_",b++):(e=null,0===v&&y('"_"')),null===e&&(46===_.charCodeAt(b)?(e=".",b++):(e=null,0===v&&y('"."')),null===e&&(33===_.charCodeAt(b)?(e="!",b++):(e=null,0===v&&y('"!"')),null===e&&(126===_.charCodeAt(b)?(e="~",b++):(e=null,0===v&&y('"~"')),null===e&&(42===_.charCodeAt(b)?(e="*",b++):(e=null,0===v&&y('"*"')),null===e&&(39===_.charCodeAt(b)?(e="'",b++):(e=null,0===v&&y('"\'"')),null===e&&(40===_.charCodeAt(b)?(e="(",b++):(e=null,0===v&&y('"("')),null===e&&(41===_.charCodeAt(b)?(e=")",b++):(e=null,0===v&&y('")"')))))))))),e}function w(){var e,t,n,r,i;return i=r=b,37===_.charCodeAt(b)?(e="%",b++):(e=null,0===v&&y('"%"')),null!==e&&null!==(t=u())&&null!==(n=u())?e=[e,t,n]:(e=null,b=i),null!==e&&(e=e.join("")),null===e&&(b=r),e}function C(){var e,t,n,r,i,a;for(a=i=r=b,e=[],t=f();null!==t;)e.push(t),t=f();if(null!==e&&null!==(t=o())?e=[e,t]:(e=null,b=a),null!==(e=null!==e?e:"")){if(null!==(n=f()))for(t=[];null!==n;)t.push(n),n=f();else t=null;null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return null!==e&&(e=" "),null===e&&(b=r),e}function A(){var e;return e=null!==(e=C())?e:""}function S(){var e,t,n,r,i;for(i=r=b,e=[],null===(t=h())&&(t=p());null!==t;)e.push(t),null===(t=h())&&(t=p());return null!==e?(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e=":"),null===e&&(b=r),e}function T(){var e,t,n,r,i,a,o,s;if(a=i=b,null!==(t=x()))for(e=[];null!==t;)e.push(t),t=x();else e=null;if(null!==e){for(t=[],o=b,n=[],r=C();null!==r;)n.push(r),r=C();for(null!==n&&null!==(r=x())?n=[n,r]:(n=null,b=o);null!==n;){for(t.push(n),o=b,n=[],r=C();null!==r;)n.push(r),r=C();null!==n&&null!==(r=x())?n=[n,r]:(n=null,b=o)}null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;return null!==e&&(s=i,e=_.substring(b,s)),null===e&&(b=i),e}function x(){var e;return/^[!-~]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[!-~]")),null===e&&(e=k()),e}function k(){var e;return/^[\x80-\uFFFF]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[\\x80-\\uFFFF]")),e}function E(){var e;return/^[\x80-\xBF]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[\\x80-\\xBF]")),e}function D(){var e,t,n,r;if(n=b,null===(t=i())&&(45===_.charCodeAt(b)?(t="-",b++):(t=null,0===v&&y('"-"')),null===t&&(46===_.charCodeAt(b)?(t=".",b++):(t=null,0===v&&y('"."')),null===t&&(33===_.charCodeAt(b)?(t="!",b++):(t=null,0===v&&y('"!"')),null===t&&(37===_.charCodeAt(b)?(t="%",b++):(t=null,0===v&&y('"%"')),null===t&&(42===_.charCodeAt(b)?(t="*",b++):(t=null,0===v&&y('"*"')),null===t&&(95===_.charCodeAt(b)?(t="_",b++):(t=null,0===v&&y('"_"')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')),null===t&&(96===_.charCodeAt(b)?(t="`",b++):(t=null,0===v&&y('"`"')),null===t&&(39===_.charCodeAt(b)?(t="'",b++):(t=null,0===v&&y('"\'"')),null===t&&(126===_.charCodeAt(b)?(t="~",b++):(t=null,0===v&&y('"~"')))))))))))),null!==t)for(e=[];null!==t;)e.push(t),null===(t=i())&&(45===_.charCodeAt(b)?(t="-",b++):(t=null,0===v&&y('"-"')),null===t&&(46===_.charCodeAt(b)?(t=".",b++):(t=null,0===v&&y('"."')),null===t&&(33===_.charCodeAt(b)?(t="!",b++):(t=null,0===v&&y('"!"')),null===t&&(37===_.charCodeAt(b)?(t="%",b++):(t=null,0===v&&y('"%"')),null===t&&(42===_.charCodeAt(b)?(t="*",b++):(t=null,0===v&&y('"*"')),null===t&&(95===_.charCodeAt(b)?(t="_",b++):(t=null,0===v&&y('"_"')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')),null===t&&(96===_.charCodeAt(b)?(t="`",b++):(t=null,0===v&&y('"`"')),null===t&&(39===_.charCodeAt(b)?(t="'",b++):(t=null,0===v&&y('"\'"')),null===t&&(126===_.charCodeAt(b)?(t="~",b++):(t=null,0===v&&y('"~"'))))))))))));else e=null;return null!==e&&(r=n,e=_.substring(b,r)),null===e&&(b=n),e}function I(){var e,t,n,r;if(n=b,null===(t=i())&&(45===_.charCodeAt(b)?(t="-",b++):(t=null,0===v&&y('"-"')),null===t&&(33===_.charCodeAt(b)?(t="!",b++):(t=null,0===v&&y('"!"')),null===t&&(37===_.charCodeAt(b)?(t="%",b++):(t=null,0===v&&y('"%"')),null===t&&(42===_.charCodeAt(b)?(t="*",b++):(t=null,0===v&&y('"*"')),null===t&&(95===_.charCodeAt(b)?(t="_",b++):(t=null,0===v&&y('"_"')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')),null===t&&(96===_.charCodeAt(b)?(t="`",b++):(t=null,0===v&&y('"`"')),null===t&&(39===_.charCodeAt(b)?(t="'",b++):(t=null,0===v&&y('"\'"')),null===t&&(126===_.charCodeAt(b)?(t="~",b++):(t=null,0===v&&y('"~"'))))))))))),null!==t)for(e=[];null!==t;)e.push(t),null===(t=i())&&(45===_.charCodeAt(b)?(t="-",b++):(t=null,0===v&&y('"-"')),null===t&&(33===_.charCodeAt(b)?(t="!",b++):(t=null,0===v&&y('"!"')),null===t&&(37===_.charCodeAt(b)?(t="%",b++):(t=null,0===v&&y('"%"')),null===t&&(42===_.charCodeAt(b)?(t="*",b++):(t=null,0===v&&y('"*"')),null===t&&(95===_.charCodeAt(b)?(t="_",b++):(t=null,0===v&&y('"_"')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')),null===t&&(96===_.charCodeAt(b)?(t="`",b++):(t=null,0===v&&y('"`"')),null===t&&(39===_.charCodeAt(b)?(t="'",b++):(t=null,0===v&&y('"\'"')),null===t&&(126===_.charCodeAt(b)?(t="~",b++):(t=null,0===v&&y('"~"')))))))))));else e=null;return null!==e&&(r=n,e=_.substring(b,r)),null===e&&(b=n),e}function P(){var e,t,n,r;if(n=b,null===(t=i())&&(45===_.charCodeAt(b)?(t="-",b++):(t=null,0===v&&y('"-"')),null===t&&(46===_.charCodeAt(b)?(t=".",b++):(t=null,0===v&&y('"."')),null===t&&(33===_.charCodeAt(b)?(t="!",b++):(t=null,0===v&&y('"!"')),null===t&&(37===_.charCodeAt(b)?(t="%",b++):(t=null,0===v&&y('"%"')),null===t&&(42===_.charCodeAt(b)?(t="*",b++):(t=null,0===v&&y('"*"')),null===t&&(95===_.charCodeAt(b)?(t="_",b++):(t=null,0===v&&y('"_"')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')),null===t&&(96===_.charCodeAt(b)?(t="`",b++):(t=null,0===v&&y('"`"')),null===t&&(39===_.charCodeAt(b)?(t="'",b++):(t=null,0===v&&y('"\'"')),null===t&&(126===_.charCodeAt(b)?(t="~",b++):(t=null,0===v&&y('"~"')),null===t&&(40===_.charCodeAt(b)?(t="(",b++):(t=null,0===v&&y('"("')),null===t&&(41===_.charCodeAt(b)?(t=")",b++):(t=null,0===v&&y('")"')),null===t&&(60===_.charCodeAt(b)?(t="<",b++):(t=null,0===v&&y('"<"')),null===t&&(62===_.charCodeAt(b)?(t=">",b++):(t=null,0===v&&y('">"')),null===t&&(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null===t&&(92===_.charCodeAt(b)?(t="\\",b++):(t=null,0===v&&y('"\\\\"')),null===t&&null===(t=d())&&(47===_.charCodeAt(b)?(t="/",b++):(t=null,0===v&&y('"/"')),null===t&&(91===_.charCodeAt(b)?(t="[",b++):(t=null,0===v&&y('"["')),null===t&&(93===_.charCodeAt(b)?(t="]",b++):(t=null,0===v&&y('"]"')),null===t&&(63===_.charCodeAt(b)?(t="?",b++):(t=null,0===v&&y('"?"')),null===t&&(123===_.charCodeAt(b)?(t="{",b++):(t=null,0===v&&y('"{"')),null===t&&(125===_.charCodeAt(b)?(t="}",b++):(t=null,0===v&&y('"}"')))))))))))))))))))))))),null!==t)for(e=[];null!==t;)e.push(t),null===(t=i())&&(45===_.charCodeAt(b)?(t="-",b++):(t=null,0===v&&y('"-"')),null===t&&(46===_.charCodeAt(b)?(t=".",b++):(t=null,0===v&&y('"."')),null===t&&(33===_.charCodeAt(b)?(t="!",b++):(t=null,0===v&&y('"!"')),null===t&&(37===_.charCodeAt(b)?(t="%",b++):(t=null,0===v&&y('"%"')),null===t&&(42===_.charCodeAt(b)?(t="*",b++):(t=null,0===v&&y('"*"')),null===t&&(95===_.charCodeAt(b)?(t="_",b++):(t=null,0===v&&y('"_"')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')),null===t&&(96===_.charCodeAt(b)?(t="`",b++):(t=null,0===v&&y('"`"')),null===t&&(39===_.charCodeAt(b)?(t="'",b++):(t=null,0===v&&y('"\'"')),null===t&&(126===_.charCodeAt(b)?(t="~",b++):(t=null,0===v&&y('"~"')),null===t&&(40===_.charCodeAt(b)?(t="(",b++):(t=null,0===v&&y('"("')),null===t&&(41===_.charCodeAt(b)?(t=")",b++):(t=null,0===v&&y('")"')),null===t&&(60===_.charCodeAt(b)?(t="<",b++):(t=null,0===v&&y('"<"')),null===t&&(62===_.charCodeAt(b)?(t=">",b++):(t=null,0===v&&y('">"')),null===t&&(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null===t&&(92===_.charCodeAt(b)?(t="\\",b++):(t=null,0===v&&y('"\\\\"')),null===t&&null===(t=d())&&(47===_.charCodeAt(b)?(t="/",b++):(t=null,0===v&&y('"/"')),null===t&&(91===_.charCodeAt(b)?(t="[",b++):(t=null,0===v&&y('"["')),null===t&&(93===_.charCodeAt(b)?(t="]",b++):(t=null,0===v&&y('"]"')),null===t&&(63===_.charCodeAt(b)?(t="?",b++):(t=null,0===v&&y('"?"')),null===t&&(123===_.charCodeAt(b)?(t="{",b++):(t=null,0===v&&y('"{"')),null===t&&(125===_.charCodeAt(b)?(t="}",b++):(t=null,0===v&&y('"}"'))))))))))))))))))))))));else e=null;return null!==e&&(r=n,e=_.substring(b,r)),null===e&&(b=n),e}function M(){var e,t,n,r,i;return i=r=b,null!==(e=A())?(42===_.charCodeAt(b)?(t="*",b++):(t=null,0===v&&y('"*"')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e="*"),null===e&&(b=r),e}function $(){var e,t,n,r,i;return i=r=b,null!==(e=A())?(47===_.charCodeAt(b)?(t="/",b++):(t=null,0===v&&y('"/"')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e="/"),null===e&&(b=r),e}function O(){var e,t,n,r,i;return i=r=b,null!==(e=A())?(61===_.charCodeAt(b)?(t="=",b++):(t=null,0===v&&y('"="')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e="="),null===e&&(b=r),e}function R(){var e,t,n,r,i;return i=r=b,null!==(e=A())?(40===_.charCodeAt(b)?(t="(",b++):(t=null,0===v&&y('"("')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e="("),null===e&&(b=r),e}function N(){var e,t,n,r,i;return i=r=b,null!==(e=A())?(41===_.charCodeAt(b)?(t=")",b++):(t=null,0===v&&y('")"')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e=")"),null===e&&(b=r),e}function L(){var e,t,n,r;return r=n=b,62===_.charCodeAt(b)?(e=">",b++):(e=null,0===v&&y('">"')),null!==e&&null!==(t=A())?e=[e,t]:(e=null,b=r),null!==e&&(e=">"),null===e&&(b=n),e}function F(){var e,t,n,r;return r=n=b,null!==(e=A())?(60===_.charCodeAt(b)?(t="<",b++):(t=null,0===v&&y('"<"')),null!==t?e=[e,t]:(e=null,b=r)):(e=null,b=r),null!==e&&(e="<"),null===e&&(b=n),e}function G(){var e,t,n,r,i;return i=r=b,null!==(e=A())?(44===_.charCodeAt(b)?(t=",",b++):(t=null,0===v&&y('","')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e=","),null===e&&(b=r),e}function j(){var e,t,n,r,i;return i=r=b,null!==(e=A())?(59===_.charCodeAt(b)?(t=";",b++):(t=null,0===v&&y('";"')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e=";"),null===e&&(b=r),e}function B(){var e,t,n,r,i;return i=r=b,null!==(e=A())?(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e=":"),null===e&&(b=r),e}function U(){var e,t,n,r;return r=n=b,null!==(e=A())&&null!==(t=d())?e=[e,t]:(e=null,b=r),null!==e&&(e='"'),null===e&&(b=n),e}function H(){var e,t,n,r;return r=n=b,null!==(e=d())&&null!==(t=A())?e=[e,t]:(e=null,b=r),null!==e&&(e='"'),null===e&&(b=n),e}function W(){var e;return/^[!-']/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[!-']")),null===e&&(/^[*-[]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[*-[]")),null===e&&(/^[\]-~]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[\\]-~]")),null===e&&null===(e=k())&&(e=C()))),e}function q(){var e,t,n,r,i,a,o;if(a=i=b,null!==(e=A()))if(null!==(t=d())){for(n=[],null===(r=V())&&(r=Y());null!==r;)n.push(r),null===(r=V())&&(r=Y());null!==n&&null!==(r=d())?e=[e,t,n,r]:(e=null,b=a)}else e=null,b=a;else e=null,b=a;return null!==e&&(o=i,e=_.substring(b,o)),null===e&&(b=i),e}function z(){var e,t,n,r,i,a,o;if(a=i=b,null!==(e=A()))if(null!==(t=d())){for(n=[],null===(r=V())&&(r=Y());null!==r;)n.push(r),null===(r=V())&&(r=Y());null!==n&&null!==(r=d())?e=[e,t,n,r]:(e=null,b=a)}else e=null,b=a;else e=null,b=a;return null!==e&&(o=i,e=_.substring(b-1,o+1)),null===e&&(b=i),e}function V(){var e;return null===(e=C())&&(33===_.charCodeAt(b)?(e="!",b++):(e=null,0===v&&y('"!"')),null===e&&(/^[#-[]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[#-[]")),null===e&&(/^[\]-~]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[\\]-~]")),null===e&&(e=k())))),e}function Y(){var e,t,n;return n=b,92===_.charCodeAt(b)?(e="\\",b++):(e=null,0===v&&y('"\\\\"')),null!==e?(/^[\0-\t]/.test(_.charAt(b))?(t=_.charAt(b),b++):(t=null,0===v&&y("[\\0-\\t]")),null===t&&(/^[\x0B-\f]/.test(_.charAt(b))?(t=_.charAt(b),b++):(t=null,0===v&&y("[\\x0B-\\f]")),null===t&&(/^[\x0E-\7f]/.test(_.charAt(b))?(t=_.charAt(b),b++):(t=null,0===v&&y("[\\x0E-\7f]")))),null!==t?e=[e,t]:(e=null,b=n)):(e=null,b=n),e}function K(){var e,t,n,r,i,a;return a=i=b,null!==(e=X())?(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=null!==(n=ee())?n:"")&&null!==(r=ie())?e=[e,t,n,r]:(e=null,b=a)):(e=null,b=a),null!==e&&(e=function(e){try{Fn.uri=new Nn(Fn.scheme,Fn.user,Fn.host,Fn.port),delete Fn.scheme,delete Fn.user,delete Fn.host,delete Fn.host_type,delete Fn.port}catch(e){Fn=-1}}()),null===e&&(b=i),e}function Q(){var e,t,n,r,i,a,o,s;return s=o=b,null!==(e=X())?(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=null!==(n=ee())?n:"")&&null!==(r=ie())&&null!==(i=ge())&&null!==(a=null!==(a=De())?a:"")?e=[e,t,n,r,i,a]:(e=null,b=s)):(e=null,b=s),null!==e&&(e=function(e){try{Fn.uri=new Nn(Fn.scheme,Fn.user,Fn.host,Fn.port,Fn.uri_params,Fn.uri_headers),delete Fn.scheme,delete Fn.user,delete Fn.host,delete Fn.host_type,delete Fn.port,delete Fn.uri_params,"SIP_URI"===c&&(Fn=Fn.uri)}catch(e){Fn=-1}}()),null===e&&(b=o),e}function X(){var e;return null===(e=Z())&&(e=J()),e}function Z(){var e,t,n;return t=b,"sips"===_.substr(b,4).toLowerCase()?(e=_.substr(b,4),b+=4):(e=null,0===v&&y('"sips"')),null!==e&&(n=e,e=void(Fn.scheme=n.toLowerCase())),null===e&&(b=t),e}function J(){var e,t,n;return t=b,"sip"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"sip"')),null!==e&&(n=e,e=void(Fn.scheme=n.toLowerCase())),null===e&&(b=t),e}function ee(){var e,t,n,r,i,a,o;return i=r=b,null!==(e=te())?(a=b,58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=re())?t=[t,n]:(t=null,b=a),null!==(t=null!==t?t:"")?(64===_.charCodeAt(b)?(n="@",b++):(n=null,0===v&&y('"@"')),null!==n?e=[e,t,n]:(e=null,b=i)):(e=null,b=i)):(e=null,b=i),null!==e&&(o=r,e=void(Fn.user=decodeURIComponent(_.substring(b-1,o)))),null===e&&(b=r),e}function te(){var e,t;if(null===(t=g())&&null===(t=w())&&(t=ne()),null!==t)for(e=[];null!==t;)e.push(t),null===(t=g())&&null===(t=w())&&(t=ne());else e=null;return e}function ne(){var e;return 38===_.charCodeAt(b)?(e="&",b++):(e=null,0===v&&y('"&"')),null===e&&(61===_.charCodeAt(b)?(e="=",b++):(e=null,0===v&&y('"="')),null===e&&(43===_.charCodeAt(b)?(e="+",b++):(e=null,0===v&&y('"+"')),null===e&&(36===_.charCodeAt(b)?(e="$",b++):(e=null,0===v&&y('"$"')),null===e&&(44===_.charCodeAt(b)?(e=",",b++):(e=null,0===v&&y('","')),null===e&&(59===_.charCodeAt(b)?(e=";",b++):(e=null,0===v&&y('";"')),null===e&&(63===_.charCodeAt(b)?(e="?",b++):(e=null,0===v&&y('"?"')),null===e&&(47===_.charCodeAt(b)?(e="/",b++):(e=null,0===v&&y('"/"'))))))))),e}function re(){var e,t,n,r;for(n=b,e=[],null===(t=g())&&null===(t=w())&&(38===_.charCodeAt(b)?(t="&",b++):(t=null,0===v&&y('"&"')),null===t&&(61===_.charCodeAt(b)?(t="=",b++):(t=null,0===v&&y('"="')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')),null===t&&(36===_.charCodeAt(b)?(t="$",b++):(t=null,0===v&&y('"$"')),null===t&&(44===_.charCodeAt(b)?(t=",",b++):(t=null,0===v&&y('","')))))));null!==t;)e.push(t),null===(t=g())&&null===(t=w())&&(38===_.charCodeAt(b)?(t="&",b++):(t=null,0===v&&y('"&"')),null===t&&(61===_.charCodeAt(b)?(t="=",b++):(t=null,0===v&&y('"="')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')),null===t&&(36===_.charCodeAt(b)?(t="$",b++):(t=null,0===v&&y('"$"')),null===t&&(44===_.charCodeAt(b)?(t=",",b++):(t=null,0===v&&y('","')))))));return null!==e&&(r=n,e=void(Fn.password=_.substring(b,r))),null===e&&(b=n),e}function ie(){var e,t,n,r,i;return r=b,null!==(e=ae())?(i=b,58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=me())?t=[t,n]:(t=null,b=i),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=r)):(e=null,b=r),e}function ae(){var e,t,n;return t=b,null===(e=oe())&&null===(e=he())&&(e=le()),null!==e&&(n=t,Fn.host=_.substring(b,n).toLowerCase(),e=Fn.host),null===e&&(b=t),e}function oe(){var e,t,n,r,i,a,o;for(e=[],a=i=r=b,null!==(t=se())?(46===_.charCodeAt(b)?(n=".",b++):(n=null,0===v&&y('"."')),null!==n?t=[t,n]:(t=null,b=a)):(t=null,b=a);null!==t;)e.push(t),a=b,null!==(t=se())?(46===_.charCodeAt(b)?(n=".",b++):(n=null,0===v&&y('"."')),null!==n?t=[t,n]:(t=null,b=a)):(t=null,b=a);return null!==e&&null!==(t=ce())?(46===_.charCodeAt(b)?(n=".",b++):(n=null,0===v&&y('"."')),null!==(n=null!==n?n:"")?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(o=r,Fn.host_type="domain",e=_.substring(b,o)),null===e&&(b=r),e}function se(){var e,t,n,r;if(r=b,null!==(e=i())){for(t=[],null===(n=i())&&(45===_.charCodeAt(b)?(n="-",b++):(n=null,0===v&&y('"-"')),null===n&&(95===_.charCodeAt(b)?(n="_",b++):(n=null,0===v&&y('"_"'))));null!==n;)t.push(n),null===(n=i())&&(45===_.charCodeAt(b)?(n="-",b++):(n=null,0===v&&y('"-"')),null===n&&(95===_.charCodeAt(b)?(n="_",b++):(n=null,0===v&&y('"_"'))));null!==t?e=[e,t]:(e=null,b=r)}else e=null,b=r;return e}function ce(){var e,t,n,r;if(r=b,null!==(e=s())){for(t=[],null===(n=i())&&(45===_.charCodeAt(b)?(n="-",b++):(n=null,0===v&&y('"-"')),null===n&&(95===_.charCodeAt(b)?(n="_",b++):(n=null,0===v&&y('"_"'))));null!==n;)t.push(n),null===(n=i())&&(45===_.charCodeAt(b)?(n="-",b++):(n=null,0===v&&y('"-"')),null===n&&(95===_.charCodeAt(b)?(n="_",b++):(n=null,0===v&&y('"_"'))));null!==t?e=[e,t]:(e=null,b=r)}else e=null,b=r;return e}function le(){var e,t,n,r,i,a;return i=r=b,91===_.charCodeAt(b)?(e="[",b++):(e=null,0===v&&y('"["')),null!==e&&null!==(t=ue())?(93===_.charCodeAt(b)?(n="]",b++):(n=null,0===v&&y('"]"')),null!==n?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(a=r,Fn.host_type="IPv6",e=_.substring(b,a)),null===e&&(b=r),e}function ue(){var e,t,n,r,i,a,o,s,c,l,u,f,d,h,p,m,g;return p=h=b,null!==(e=fe())?(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=fe())?(58===_.charCodeAt(b)?(r=":",b++):(r=null,0===v&&y('":"')),null!==r&&null!==(i=fe())?(58===_.charCodeAt(b)?(a=":",b++):(a=null,0===v&&y('":"')),null!==a&&null!==(o=fe())?(58===_.charCodeAt(b)?(s=":",b++):(s=null,0===v&&y('":"')),null!==s&&null!==(c=fe())?(58===_.charCodeAt(b)?(l=":",b++):(l=null,0===v&&y('":"')),null!==l&&null!==(u=fe())?(58===_.charCodeAt(b)?(f=":",b++):(f=null,0===v&&y('":"')),null!==f&&null!==(d=de())?e=[e,t,n,r,i,a,o,s,c,l,u,f,d]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,"::"===_.substr(b,2)?(e="::",b+=2):(e=null,0===v&&y('"::"')),null!==e&&null!==(t=fe())?(58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?(58===_.charCodeAt(b)?(i=":",b++):(i=null,0===v&&y('":"')),null!==i&&null!==(a=fe())?(58===_.charCodeAt(b)?(o=":",b++):(o=null,0===v&&y('":"')),null!==o&&null!==(s=fe())?(58===_.charCodeAt(b)?(c=":",b++):(c=null,0===v&&y('":"')),null!==c&&null!==(l=fe())?(58===_.charCodeAt(b)?(u=":",b++):(u=null,0===v&&y('":"')),null!==u&&null!==(f=de())?e=[e,t,n,r,i,a,o,s,c,l,u,f]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,"::"===_.substr(b,2)?(e="::",b+=2):(e=null,0===v&&y('"::"')),null!==e&&null!==(t=fe())?(58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?(58===_.charCodeAt(b)?(i=":",b++):(i=null,0===v&&y('":"')),null!==i&&null!==(a=fe())?(58===_.charCodeAt(b)?(o=":",b++):(o=null,0===v&&y('":"')),null!==o&&null!==(s=fe())?(58===_.charCodeAt(b)?(c=":",b++):(c=null,0===v&&y('":"')),null!==c&&null!==(l=de())?e=[e,t,n,r,i,a,o,s,c,l]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,"::"===_.substr(b,2)?(e="::",b+=2):(e=null,0===v&&y('"::"')),null!==e&&null!==(t=fe())?(58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?(58===_.charCodeAt(b)?(i=":",b++):(i=null,0===v&&y('":"')),null!==i&&null!==(a=fe())?(58===_.charCodeAt(b)?(o=":",b++):(o=null,0===v&&y('":"')),null!==o&&null!==(s=de())?e=[e,t,n,r,i,a,o,s]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,"::"===_.substr(b,2)?(e="::",b+=2):(e=null,0===v&&y('"::"')),null!==e&&null!==(t=fe())?(58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?(58===_.charCodeAt(b)?(i=":",b++):(i=null,0===v&&y('":"')),null!==i&&null!==(a=de())?e=[e,t,n,r,i,a]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,"::"===_.substr(b,2)?(e="::",b+=2):(e=null,0===v&&y('"::"')),null!==e&&null!==(t=fe())?(58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=de())?e=[e,t,n,r]:(e=null,b=p)):(e=null,b=p),null===e&&(p=b,"::"===_.substr(b,2)?(e="::",b+=2):(e=null,0===v&&y('"::"')),null!==e&&null!==(t=de())?e=[e,t]:(e=null,b=p),null===e&&(p=b,"::"===_.substr(b,2)?(e="::",b+=2):(e=null,0===v&&y('"::"')),null!==e&&null!==(t=fe())?e=[e,t]:(e=null,b=p),null===e&&(p=b,null!==(e=fe())?("::"===_.substr(b,2)?(t="::",b+=2):(t=null,0===v&&y('"::"')),null!==t&&null!==(n=fe())?(58===_.charCodeAt(b)?(r=":",b++):(r=null,0===v&&y('":"')),null!==r&&null!==(i=fe())?(58===_.charCodeAt(b)?(a=":",b++):(a=null,0===v&&y('":"')),null!==a&&null!==(o=fe())?(58===_.charCodeAt(b)?(s=":",b++):(s=null,0===v&&y('":"')),null!==s&&null!==(c=fe())?(58===_.charCodeAt(b)?(l=":",b++):(l=null,0===v&&y('":"')),null!==l&&null!==(u=de())?e=[e,t,n,r,i,a,o,s,c,l,u]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,null!==(e=fe())?(m=b,58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=fe())?t=[t,n]:(t=null,b=m),null!==(t=null!==t?t:"")?("::"===_.substr(b,2)?(n="::",b+=2):(n=null,0===v&&y('"::"')),null!==n&&null!==(r=fe())?(58===_.charCodeAt(b)?(i=":",b++):(i=null,0===v&&y('":"')),null!==i&&null!==(a=fe())?(58===_.charCodeAt(b)?(o=":",b++):(o=null,0===v&&y('":"')),null!==o&&null!==(s=fe())?(58===_.charCodeAt(b)?(c=":",b++):(c=null,0===v&&y('":"')),null!==c&&null!==(l=de())?e=[e,t,n,r,i,a,o,s,c,l]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,null!==(e=fe())?(m=b,58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=fe())?t=[t,n]:(t=null,b=m),null!==(t=null!==t?t:"")?(m=b,58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?n=[n,r]:(n=null,b=m),null!==(n=null!==n?n:"")?("::"===_.substr(b,2)?(r="::",b+=2):(r=null,0===v&&y('"::"')),null!==r&&null!==(i=fe())?(58===_.charCodeAt(b)?(a=":",b++):(a=null,0===v&&y('":"')),null!==a&&null!==(o=fe())?(58===_.charCodeAt(b)?(s=":",b++):(s=null,0===v&&y('":"')),null!==s&&null!==(c=de())?e=[e,t,n,r,i,a,o,s,c]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,null!==(e=fe())?(m=b,58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=fe())?t=[t,n]:(t=null,b=m),null!==(t=null!==t?t:"")?(m=b,58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?n=[n,r]:(n=null,b=m),null!==(n=null!==n?n:"")?(m=b,58===_.charCodeAt(b)?(r=":",b++):(r=null,0===v&&y('":"')),null!==r&&null!==(i=fe())?r=[r,i]:(r=null,b=m),null!==(r=null!==r?r:"")?("::"===_.substr(b,2)?(i="::",b+=2):(i=null,0===v&&y('"::"')),null!==i&&null!==(a=fe())?(58===_.charCodeAt(b)?(o=":",b++):(o=null,0===v&&y('":"')),null!==o&&null!==(s=de())?e=[e,t,n,r,i,a,o,s]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,null!==(e=fe())?(m=b,58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=fe())?t=[t,n]:(t=null,b=m),null!==(t=null!==t?t:"")?(m=b,58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?n=[n,r]:(n=null,b=m),null!==(n=null!==n?n:"")?(m=b,58===_.charCodeAt(b)?(r=":",b++):(r=null,0===v&&y('":"')),null!==r&&null!==(i=fe())?r=[r,i]:(r=null,b=m),null!==(r=null!==r?r:"")?(m=b,58===_.charCodeAt(b)?(i=":",b++):(i=null,0===v&&y('":"')),null!==i&&null!==(a=fe())?i=[i,a]:(i=null,b=m),null!==(i=null!==i?i:"")?("::"===_.substr(b,2)?(a="::",b+=2):(a=null,0===v&&y('"::"')),null!==a&&null!==(o=de())?e=[e,t,n,r,i,a,o]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,null!==(e=fe())?(m=b,58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=fe())?t=[t,n]:(t=null,b=m),null!==(t=null!==t?t:"")?(m=b,58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?n=[n,r]:(n=null,b=m),null!==(n=null!==n?n:"")?(m=b,58===_.charCodeAt(b)?(r=":",b++):(r=null,0===v&&y('":"')),null!==r&&null!==(i=fe())?r=[r,i]:(r=null,b=m),null!==(r=null!==r?r:"")?(m=b,58===_.charCodeAt(b)?(i=":",b++):(i=null,0===v&&y('":"')),null!==i&&null!==(a=fe())?i=[i,a]:(i=null,b=m),null!==(i=null!==i?i:"")?(m=b,58===_.charCodeAt(b)?(a=":",b++):(a=null,0===v&&y('":"')),null!==a&&null!==(o=fe())?a=[a,o]:(a=null,b=m),null!==(a=null!==a?a:"")?("::"===_.substr(b,2)?(o="::",b+=2):(o=null,0===v&&y('"::"')),null!==o&&null!==(s=fe())?e=[e,t,n,r,i,a,o,s]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,null!==(e=fe())?(m=b,58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=fe())?t=[t,n]:(t=null,b=m),null!==(t=null!==t?t:"")?(m=b,58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?n=[n,r]:(n=null,b=m),null!==(n=null!==n?n:"")?(m=b,58===_.charCodeAt(b)?(r=":",b++):(r=null,0===v&&y('":"')),null!==r&&null!==(i=fe())?r=[r,i]:(r=null,b=m),null!==(r=null!==r?r:"")?(m=b,58===_.charCodeAt(b)?(i=":",b++):(i=null,0===v&&y('":"')),null!==i&&null!==(a=fe())?i=[i,a]:(i=null,b=m),null!==(i=null!==i?i:"")?(m=b,58===_.charCodeAt(b)?(a=":",b++):(a=null,0===v&&y('":"')),null!==a&&null!==(o=fe())?a=[a,o]:(a=null,b=m),null!==(a=null!==a?a:"")?(m=b,58===_.charCodeAt(b)?(o=":",b++):(o=null,0===v&&y('":"')),null!==o&&null!==(s=fe())?o=[o,s]:(o=null,b=m),null!==(o=null!==o?o:"")?("::"===_.substr(b,2)?(s="::",b+=2):(s=null,0===v&&y('"::"')),null!==s?e=[e,t,n,r,i,a,o,s]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p))))))))))))))),null!==e&&(g=h,Fn.host_type="IPv6",e=_.substring(b,g)),null===e&&(b=h),e}function fe(){var e,t,n,r,i;return i=b,null!==(e=u())&&null!==(t=null!==(t=u())?t:"")&&null!==(n=null!==(n=u())?n:"")&&null!==(r=null!==(r=u())?r:"")?e=[e,t,n,r]:(e=null,b=i),e}function de(){var e,t,n,r;return r=b,null!==(e=fe())?(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=fe())?e=[e,t,n]:(e=null,b=r)):(e=null,b=r),null===e&&(e=he()),e}function he(){var e,t,n,r,i,a,o,s,c,l;return c=s=b,null!==(e=pe())?(46===_.charCodeAt(b)?(t=".",b++):(t=null,0===v&&y('"."')),null!==t&&null!==(n=pe())?(46===_.charCodeAt(b)?(r=".",b++):(r=null,0===v&&y('"."')),null!==r&&null!==(i=pe())?(46===_.charCodeAt(b)?(a=".",b++):(a=null,0===v&&y('"."')),null!==a&&null!==(o=pe())?e=[e,t,n,r,i,a,o]:(e=null,b=c)):(e=null,b=c)):(e=null,b=c)):(e=null,b=c),null!==e&&(l=s,Fn.host_type="IPv4",e=_.substring(b,l)),null===e&&(b=s),e}function pe(){var e,t,n,r;return r=b,"25"===_.substr(b,2)?(e="25",b+=2):(e=null,0===v&&y('"25"')),null!==e?(/^[0-5]/.test(_.charAt(b))?(t=_.charAt(b),b++):(t=null,0===v&&y("[0-5]")),null!==t?e=[e,t]:(e=null,b=r)):(e=null,b=r),null===e&&(r=b,50===_.charCodeAt(b)?(e="2",b++):(e=null,0===v&&y('"2"')),null!==e?(/^[0-4]/.test(_.charAt(b))?(t=_.charAt(b),b++):(t=null,0===v&&y("[0-4]")),null!==t&&null!==(n=l())?e=[e,t,n]:(e=null,b=r)):(e=null,b=r),null===e&&(r=b,49===_.charCodeAt(b)?(e="1",b++):(e=null,0===v&&y('"1"')),null!==e&&null!==(t=l())&&null!==(n=l())?e=[e,t,n]:(e=null,b=r),null===e&&(r=b,/^[1-9]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[1-9]")),null!==e&&null!==(t=l())?e=[e,t]:(e=null,b=r),null===e&&(e=l())))),e}function me(){var e,t,n,r,i,a,o,s;return o=a=b,null!==(e=null!==(e=l())?e:"")&&null!==(t=null!==(t=l())?t:"")&&null!==(n=null!==(n=l())?n:"")&&null!==(r=null!==(r=l())?r:"")&&null!==(i=null!==(i=l())?i:"")?e=[e,t,n,r,i]:(e=null,b=o),null!==e&&(s=e,s=parseInt(s.join("")),e=Fn.port=s),null===e&&(b=a),e}function ge(){var e,t,n,r;for(e=[],r=b,59===_.charCodeAt(b)?(t=";",b++):(t=null,0===v&&y('";"')),null!==t&&null!==(n=_e())?t=[t,n]:(t=null,b=r);null!==t;)e.push(t),r=b,59===_.charCodeAt(b)?(t=";",b++):(t=null,0===v&&y('";"')),null!==t&&null!==(n=_e())?t=[t,n]:(t=null,b=r);return e}function _e(){var e;return null===(e=be())&&null===(e=ve())&&null===(e=ye())&&null===(e=we())&&null===(e=Ce())&&null===(e=Ae())&&(e=Se()),e}function be(){var e,t,n,r,i;return r=n=b,"transport="===_.substr(b,10).toLowerCase()?(e=_.substr(b,10),b+=10):(e=null,0===v&&y('"transport="')),null!==e?("udp"===_.substr(b,3).toLowerCase()?(t=_.substr(b,3),b+=3):(t=null,0===v&&y('"udp"')),null===t&&("tcp"===_.substr(b,3).toLowerCase()?(t=_.substr(b,3),b+=3):(t=null,0===v&&y('"tcp"')),null===t&&("sctp"===_.substr(b,4).toLowerCase()?(t=_.substr(b,4),b+=4):(t=null,0===v&&y('"sctp"')),null===t&&("tls"===_.substr(b,3).toLowerCase()?(t=_.substr(b,3),b+=3):(t=null,0===v&&y('"tls"')),null===t&&(t=D())))),null!==t?e=[e,t]:(e=null,b=r)):(e=null,b=r),null!==e&&(i=e[1],Fn.uri_params||(Fn.uri_params={}),e=void(Fn.uri_params.transport=i.toLowerCase())),null===e&&(b=n),e}function ve(){var e,t,n,r,i;return r=n=b,"user="===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"user="')),null!==e?("phone"===_.substr(b,5).toLowerCase()?(t=_.substr(b,5),b+=5):(t=null,0===v&&y('"phone"')),null===t&&("ip"===_.substr(b,2).toLowerCase()?(t=_.substr(b,2),b+=2):(t=null,0===v&&y('"ip"')),null===t&&(t=D())),null!==t?e=[e,t]:(e=null,b=r)):(e=null,b=r),null!==e&&(i=e[1],Fn.uri_params||(Fn.uri_params={}),e=void(Fn.uri_params.user=i.toLowerCase())),null===e&&(b=n),e}function ye(){var e,t,n,r,i;return r=n=b,"method="===_.substr(b,7).toLowerCase()?(e=_.substr(b,7),b+=7):(e=null,0===v&&y('"method="')),null!==e&&null!==(t=ct())?e=[e,t]:(e=null,b=r),null!==e&&(i=e[1],Fn.uri_params||(Fn.uri_params={}),e=void(Fn.uri_params.method=i)),null===e&&(b=n),e}function we(){var e,t,n,r,i;return r=n=b,"ttl="===_.substr(b,4).toLowerCase()?(e=_.substr(b,4),b+=4):(e=null,0===v&&y('"ttl="')),null!==e&&null!==(t=Cn())?e=[e,t]:(e=null,b=r),null!==e&&(i=e[1],Fn.params||(Fn.params={}),e=void(Fn.params.ttl=i)),null===e&&(b=n),e}function Ce(){var e,t,n,r,i;return r=n=b,"maddr="===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"maddr="')),null!==e&&null!==(t=ae())?e=[e,t]:(e=null,b=r),null!==e&&(i=e[1],Fn.uri_params||(Fn.uri_params={}),e=void(Fn.uri_params.maddr=i)),null===e&&(b=n),e}function Ae(){var e,t,n,r,i,a;return i=r=b,"lr"===_.substr(b,2).toLowerCase()?(e=_.substr(b,2),b+=2):(e=null,0===v&&y('"lr"')),null!==e?(a=b,61===_.charCodeAt(b)?(t="=",b++):(t=null,0===v&&y('"="')),null!==t&&null!==(n=D())?t=[t,n]:(t=null,b=a),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=i)):(e=null,b=i),null!==e&&(Fn.uri_params||(Fn.uri_params={}),e=void(Fn.uri_params.lr=void 0)),null===e&&(b=r),e}function Se(){var e,t,n,r,i,a,o,s;return i=r=b,null!==(e=Te())?(a=b,61===_.charCodeAt(b)?(t="=",b++):(t=null,0===v&&y('"="')),null!==t&&null!==(n=xe())?t=[t,n]:(t=null,b=a),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=i)):(e=null,b=i),null!==e&&(o=e[0],s=e[1],Fn.uri_params||(Fn.uri_params={}),s=void 0===s?void 0:s[1],e=void(Fn.uri_params[o.toLowerCase()]=s)),null===e&&(b=r),e}function Te(){var e,t,n;if(n=b,null!==(t=ke()))for(e=[];null!==t;)e.push(t),t=ke();else e=null;return null!==e&&(e=e.join("")),null===e&&(b=n),e}function xe(){var e,t,n;if(n=b,null!==(t=ke()))for(e=[];null!==t;)e.push(t),t=ke();else e=null;return null!==e&&(e=e.join("")),null===e&&(b=n),e}function ke(){var e;return null===(e=Ee())&&null===(e=g())&&(e=w()),e}function Ee(){var e;return 91===_.charCodeAt(b)?(e="[",b++):(e=null,0===v&&y('"["')),null===e&&(93===_.charCodeAt(b)?(e="]",b++):(e=null,0===v&&y('"]"')),null===e&&(47===_.charCodeAt(b)?(e="/",b++):(e=null,0===v&&y('"/"')),null===e&&(58===_.charCodeAt(b)?(e=":",b++):(e=null,0===v&&y('":"')),null===e&&(38===_.charCodeAt(b)?(e="&",b++):(e=null,0===v&&y('"&"')),null===e&&(43===_.charCodeAt(b)?(e="+",b++):(e=null,0===v&&y('"+"')),null===e&&(36===_.charCodeAt(b)?(e="$",b++):(e=null,0===v&&y('"$"')))))))),e}function De(){var e,t,n,r,i,a,o;if(a=b,63===_.charCodeAt(b)?(e="?",b++):(e=null,0===v&&y('"?"')),null!==e)if(null!==(t=Ie())){for(n=[],o=b,38===_.charCodeAt(b)?(r="&",b++):(r=null,0===v&&y('"&"')),null!==r&&null!==(i=Ie())?r=[r,i]:(r=null,b=o);null!==r;)n.push(r),o=b,38===_.charCodeAt(b)?(r="&",b++):(r=null,0===v&&y('"&"')),null!==r&&null!==(i=Ie())?r=[r,i]:(r=null,b=o);null!==n?e=[e,t,n]:(e=null,b=a)}else e=null,b=a;else e=null,b=a;return e}function Ie(){var e,t,n,r,i,a,o;return i=r=b,null!==(e=Pe())?(61===_.charCodeAt(b)?(t="=",b++):(t=null,0===v&&y('"="')),null!==t&&null!==(n=Me())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(a=e[0],o=e[2],a=a.join("").toLowerCase(),o=o.join(""),Fn.uri_headers||(Fn.uri_headers={}),e=void(Fn.uri_headers[a]?Fn.uri_headers[a].push(o):Fn.uri_headers[a]=[o])),null===e&&(b=r),e}function Pe(){var e,t;if(null===(t=$e())&&null===(t=g())&&(t=w()),null!==t)for(e=[];null!==t;)e.push(t),null===(t=$e())&&null===(t=g())&&(t=w());else e=null;return e}function Me(){var e,t;for(e=[],null===(t=$e())&&null===(t=g())&&(t=w());null!==t;)e.push(t),null===(t=$e())&&null===(t=g())&&(t=w());return e}function $e(){var e;return 91===_.charCodeAt(b)?(e="[",b++):(e=null,0===v&&y('"["')),null===e&&(93===_.charCodeAt(b)?(e="]",b++):(e=null,0===v&&y('"]"')),null===e&&(47===_.charCodeAt(b)?(e="/",b++):(e=null,0===v&&y('"/"')),null===e&&(63===_.charCodeAt(b)?(e="?",b++):(e=null,0===v&&y('"?"')),null===e&&(58===_.charCodeAt(b)?(e=":",b++):(e=null,0===v&&y('":"')),null===e&&(43===_.charCodeAt(b)?(e="+",b++):(e=null,0===v&&y('"+"')),null===e&&(36===_.charCodeAt(b)?(e="$",b++):(e=null,0===v&&y('"$"')))))))),e}function Oe(){var e,t,n,r,i,a;return a=b,null!==(e=ct())&&null!==(t=h())&&null!==(n=Re())&&null!==(r=h())&&null!==(i=Ze())?e=[e,t,n,r,i]:(e=null,b=a),e}function Re(){var e;return null===(e=Q())&&(e=Ne()),e}function Ne(){var e,t,n,r;return r=b,null!==(e=Ve())?(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t?(null===(n=Le())&&(n=je()),null!==n?e=[e,t,n]:(e=null,b=r)):(e=null,b=r)):(e=null,b=r),e}function Le(){var e,t,n,r,i;return r=b,null===(e=Fe())&&(e=Ge()),null!==e?(i=b,63===_.charCodeAt(b)?(t="?",b++):(t=null,0===v&&y('"?"')),null!==t&&null!==(n=Xe())?t=[t,n]:(t=null,b=i),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=r)):(e=null,b=r),e}function Fe(){var e,t,n,r;return r=b,"//"===_.substr(b,2)?(e="//",b+=2):(e=null,0===v&&y('"//"')),null!==e&&null!==(t=Ye())&&null!==(n=null!==(n=Ge())?n:"")?e=[e,t,n]:(e=null,b=r),e}function Ge(){var e,t,n;return n=b,47===_.charCodeAt(b)?(e="/",b++):(e=null,0===v&&y('"/"')),null!==e&&null!==(t=He())?e=[e,t]:(e=null,b=n),e}function je(){var e,t,n,r;if(r=b,null!==(e=Ue())){for(t=[],n=Be();null!==n;)t.push(n),n=Be();null!==t?e=[e,t]:(e=null,b=r)}else e=null,b=r;return e}function Be(){var e;return null===(e=m())&&null===(e=g())&&(e=w()),e}function Ue(){var e;return null===(e=g())&&null===(e=w())&&(59===_.charCodeAt(b)?(e=";",b++):(e=null,0===v&&y('";"')),null===e&&(63===_.charCodeAt(b)?(e="?",b++):(e=null,0===v&&y('"?"')),null===e&&(58===_.charCodeAt(b)?(e=":",b++):(e=null,0===v&&y('":"')),null===e&&(64===_.charCodeAt(b)?(e="@",b++):(e=null,0===v&&y('"@"')),null===e&&(38===_.charCodeAt(b)?(e="&",b++):(e=null,0===v&&y('"&"')),null===e&&(61===_.charCodeAt(b)?(e="=",b++):(e=null,0===v&&y('"="')),null===e&&(43===_.charCodeAt(b)?(e="+",b++):(e=null,0===v&&y('"+"')),null===e&&(36===_.charCodeAt(b)?(e="$",b++):(e=null,0===v&&y('"$"')),null===e&&(44===_.charCodeAt(b)?(e=",",b++):(e=null,0===v&&y('","'))))))))))),e}function He(){var e,t,n,r,i,a;if(i=b,null!==(e=We())){for(t=[],a=b,47===_.charCodeAt(b)?(n="/",b++):(n=null,0===v&&y('"/"')),null!==n&&null!==(r=We())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,47===_.charCodeAt(b)?(n="/",b++):(n=null,0===v&&y('"/"')),null!==n&&null!==(r=We())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e}function We(){var e,t,n,r,i,a;for(i=b,e=[],t=ze();null!==t;)e.push(t),t=ze();if(null!==e){for(t=[],a=b,59===_.charCodeAt(b)?(n=";",b++):(n=null,0===v&&y('";"')),null!==n&&null!==(r=qe())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,59===_.charCodeAt(b)?(n=";",b++):(n=null,0===v&&y('";"')),null!==n&&null!==(r=qe())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e}function qe(){var e,t;for(e=[],t=ze();null!==t;)e.push(t),t=ze();return e}function ze(){var e;return null===(e=g())&&null===(e=w())&&(58===_.charCodeAt(b)?(e=":",b++):(e=null,0===v&&y('":"')),null===e&&(64===_.charCodeAt(b)?(e="@",b++):(e=null,0===v&&y('"@"')),null===e&&(38===_.charCodeAt(b)?(e="&",b++):(e=null,0===v&&y('"&"')),null===e&&(61===_.charCodeAt(b)?(e="=",b++):(e=null,0===v&&y('"="')),null===e&&(43===_.charCodeAt(b)?(e="+",b++):(e=null,0===v&&y('"+"')),null===e&&(36===_.charCodeAt(b)?(e="$",b++):(e=null,0===v&&y('"$"')),null===e&&(44===_.charCodeAt(b)?(e=",",b++):(e=null,0===v&&y('","'))))))))),e}function Ve(){var e,t,n,r,i,a;if(i=r=b,null!==(e=s())){for(t=[],null===(n=s())&&null===(n=l())&&(43===_.charCodeAt(b)?(n="+",b++):(n=null,0===v&&y('"+"')),null===n&&(45===_.charCodeAt(b)?(n="-",b++):(n=null,0===v&&y('"-"')),null===n&&(46===_.charCodeAt(b)?(n=".",b++):(n=null,0===v&&y('"."')))));null!==n;)t.push(n),null===(n=s())&&null===(n=l())&&(43===_.charCodeAt(b)?(n="+",b++):(n=null,0===v&&y('"+"')),null===n&&(45===_.charCodeAt(b)?(n="-",b++):(n=null,0===v&&y('"-"')),null===n&&(46===_.charCodeAt(b)?(n=".",b++):(n=null,0===v&&y('"."')))));null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return null!==e&&(a=r,e=void(Fn.scheme=_.substring(b,a))),null===e&&(b=r),e}function Ye(){var e;return null===(e=Ke())&&(e=Qe()),e}function Ke(){var e,t,n,r;return r=n=b,null!==(e=ee())?(64===_.charCodeAt(b)?(t="@",b++):(t=null,0===v&&y('"@"')),null!==t?e=[e,t]:(e=null,b=r)):(e=null,b=r),null!==(e=null!==e?e:"")&&null!==(t=ie())?e=[e,t]:(e=null,b=n),e=null!==e?e:""}function Qe(){var e,t;if(null===(t=g())&&null===(t=w())&&(36===_.charCodeAt(b)?(t="$",b++):(t=null,0===v&&y('"$"')),null===t&&(44===_.charCodeAt(b)?(t=",",b++):(t=null,0===v&&y('","')),null===t&&(59===_.charCodeAt(b)?(t=";",b++):(t=null,0===v&&y('";"')),null===t&&(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null===t&&(64===_.charCodeAt(b)?(t="@",b++):(t=null,0===v&&y('"@"')),null===t&&(38===_.charCodeAt(b)?(t="&",b++):(t=null,0===v&&y('"&"')),null===t&&(61===_.charCodeAt(b)?(t="=",b++):(t=null,0===v&&y('"="')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')))))))))),null!==t)for(e=[];null!==t;)e.push(t),null===(t=g())&&null===(t=w())&&(36===_.charCodeAt(b)?(t="$",b++):(t=null,0===v&&y('"$"')),null===t&&(44===_.charCodeAt(b)?(t=",",b++):(t=null,0===v&&y('","')),null===t&&(59===_.charCodeAt(b)?(t=";",b++):(t=null,0===v&&y('";"')),null===t&&(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null===t&&(64===_.charCodeAt(b)?(t="@",b++):(t=null,0===v&&y('"@"')),null===t&&(38===_.charCodeAt(b)?(t="&",b++):(t=null,0===v&&y('"&"')),null===t&&(61===_.charCodeAt(b)?(t="=",b++):(t=null,0===v&&y('"="')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"'))))))))));else e=null;return e}function Xe(){var e,t;for(e=[],t=Be();null!==t;)e.push(t),t=Be();return e}function Ze(){var e,t,n,r,i,a,o,s,c;if(s=o=b,"sip"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"SIP"')),null!==e)if(47===_.charCodeAt(b)?(t="/",b++):(t=null,0===v&&y('"/"')),null!==t){if(null!==(r=l()))for(n=[];null!==r;)n.push(r),r=l();else n=null;if(null!==n)if(46===_.charCodeAt(b)?(r=".",b++):(r=null,0===v&&y('"."')),null!==r){if(null!==(a=l()))for(i=[];null!==a;)i.push(a),a=l();else i=null;null!==i?e=[e,t,n,r,i]:(e=null,b=s)}else e=null,b=s;else e=null,b=s}else e=null,b=s;else e=null,b=s;return null!==e&&(c=o,e=void(Fn.sip_version=_.substring(b,c))),null===e&&(b=o),e}function Je(){var e;return"INVITE"===_.substr(b,6)?(e="INVITE",b+=6):(e=null,0===v&&y('"INVITE"')),e}function et(){var e;return"ACK"===_.substr(b,3)?(e="ACK",b+=3):(e=null,0===v&&y('"ACK"')),e}function tt(){var e;return"OPTIONS"===_.substr(b,7)?(e="OPTIONS",b+=7):(e=null,0===v&&y('"OPTIONS"')),e}function nt(){var e;return"BYE"===_.substr(b,3)?(e="BYE",b+=3):(e=null,0===v&&y('"BYE"')),e}function rt(){var e;return"CANCEL"===_.substr(b,6)?(e="CANCEL",b+=6):(e=null,0===v&&y('"CANCEL"')),e}function it(){var e;return"REGISTER"===_.substr(b,8)?(e="REGISTER",b+=8):(e=null,0===v&&y('"REGISTER"')),e}function at(){var e;return"SUBSCRIBE"===_.substr(b,9)?(e="SUBSCRIBE",b+=9):(e=null,0===v&&y('"SUBSCRIBE"')),e}function ot(){var e;return"NOTIFY"===_.substr(b,6)?(e="NOTIFY",b+=6):(e=null,0===v&&y('"NOTIFY"')),e}function st(){var e;return"REFER"===_.substr(b,5)?(e="REFER",b+=5):(e=null,0===v&&y('"REFER"')),e}function ct(){var e,t,n;return t=b,null===(e=Je())&&null===(e=et())&&null===(e=tt())&&null===(e=nt())&&null===(e=rt())&&null===(e=it())&&null===(e=at())&&null===(e=ot())&&null===(e=st())&&(e=D()),null!==e&&(n=t,Fn.method=_.substring(b,n),e=Fn.method),null===e&&(b=t),e}function lt(){var e,t,n,r,i,a;return a=b,null!==(e=Ze())&&null!==(t=h())&&null!==(n=ut())&&null!==(r=h())&&null!==(i=dt())?e=[e,t,n,r,i]:(e=null,b=a),e}function ut(){var e,t,n;return t=b,null!==(e=ft())&&(n=e,e=void(Fn.status_code=parseInt(n.join("")))),null===e&&(b=t),e}function ft(){var e,t,n,r;return r=b,null!==(e=l())&&null!==(t=l())&&null!==(n=l())?e=[e,t,n]:(e=null,b=r),e}function dt(){var e,t,n,r;for(n=b,e=[],null===(t=m())&&null===(t=g())&&null===(t=w())&&null===(t=k())&&null===(t=E())&&null===(t=h())&&(t=p());null!==t;)e.push(t),null===(t=m())&&null===(t=g())&&null===(t=w())&&null===(t=k())&&null===(t=E())&&null===(t=h())&&(t=p());return null!==e&&(r=n,e=void(Fn.reason_phrase=_.substring(b,r))),null===e&&(b=n),e}function ht(){var e,t,n,r,i,a,o;if(a=i=b,null===(e=K())&&(e=pt()),null!==e){for(t=[],o=b,null!==(n=j())&&null!==(r=gt())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=j())&&null!==(r=gt())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;return null!==e&&(e=function(e){var t;Fn.multi_header||(Fn.multi_header=[]);try{t=new Ln(Fn.uri,Fn.display_name,Fn.params),delete Fn.uri,delete Fn.display_name,delete Fn.params}catch(e){t=null}Fn.multi_header.push({possition:b,offset:e,parsed:t})}(i)),null===e&&(b=i),e}function pt(){var e,t,n,r,i;return i=b,null!==(e=null!==(e=mt())?e:"")&&null!==(t=F())&&null!==(n=Q())&&null!==(r=L())?e=[e,t,n,r]:(e=null,b=i),e}function mt(){var e,t,n,r,i,a,o,s,c;if(a=i=b,null!==(e=D())){for(t=[],o=b,null!==(n=C())&&null!==(r=D())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=C())&&null!==(r=D())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;return null===e&&(e=q()),null!==e&&(s=i,c=e,'"'===(c=_.substring(b,s).trim())[0]&&(c=c.substring(1,c.length-1)),e=void(Fn.display_name=c)),null===e&&(b=i),e}function gt(){var e;return null===(e=_t())&&null===(e=bt())&&(e=wt()),e}function _t(){var e,t,n,r,i,a;return i=r=b,"q"===_.substr(b,1).toLowerCase()?(e=_.substr(b,1),b++):(e=null,0===v&&y('"q"')),null!==e&&null!==(t=O())&&null!==(n=yt())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],Fn.params||(Fn.params={}),e=void(Fn.params.q=a)),null===e&&(b=r),e}function bt(){var e,t,n,r,i,a;return i=r=b,"expires"===_.substr(b,7).toLowerCase()?(e=_.substr(b,7),b+=7):(e=null,0===v&&y('"expires"')),null!==e&&null!==(t=O())&&null!==(n=vt())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],Fn.params||(Fn.params={}),e=void(Fn.params.expires=a)),null===e&&(b=r),e}function vt(){var e,t,n;if(n=b,null!==(t=l()))for(e=[];null!==t;)e.push(t),t=l();else e=null;return null!==e&&(e=parseInt(e.join(""))),null===e&&(b=n),e}function yt(){var e,t,n,r,i,a,o,s,c;return o=a=b,48===_.charCodeAt(b)?(e="0",b++):(e=null,0===v&&y('"0"')),null!==e?(s=b,46===_.charCodeAt(b)?(t=".",b++):(t=null,0===v&&y('"."')),null!==t&&null!==(n=null!==(n=l())?n:"")&&null!==(r=null!==(r=l())?r:"")&&null!==(i=null!==(i=l())?i:"")?t=[t,n,r,i]:(t=null,b=s),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=o)):(e=null,b=o),null!==e&&(c=a,e=parseFloat(_.substring(b,c))),null===e&&(b=a),e}function wt(){var e,t,n,r,i,a,o,s;return i=r=b,null!==(e=D())?(a=b,null!==(t=O())&&null!==(n=Ct())?t=[t,n]:(t=null,b=a),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=i)):(e=null,b=i),null!==e&&(o=e[0],s=e[1],Fn.params||(Fn.params={}),s=void 0===s?void 0:s[1],e=void(Fn.params[o.toLowerCase()]=s)),null===e&&(b=r),e}function Ct(){var e;return null===(e=D())&&null===(e=ae())&&(e=q()),e}function At(){var e;return"render"===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"render"')),null===e&&("session"===_.substr(b,7).toLowerCase()?(e=_.substr(b,7),b+=7):(e=null,0===v&&y('"session"')),null===e&&("icon"===_.substr(b,4).toLowerCase()?(e=_.substr(b,4),b+=4):(e=null,0===v&&y('"icon"')),null===e&&("alert"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"alert"')),null===e&&(e=D())))),e}function St(){var e;return null===(e=Tt())&&(e=wt()),e}function Tt(){var e,t,n,r;return r=b,"handling"===_.substr(b,8).toLowerCase()?(e=_.substr(b,8),b+=8):(e=null,0===v&&y('"handling"')),null!==e&&null!==(t=O())?("optional"===_.substr(b,8).toLowerCase()?(n=_.substr(b,8),b+=8):(n=null,0===v&&y('"optional"')),null===n&&("required"===_.substr(b,8).toLowerCase()?(n=_.substr(b,8),b+=8):(n=null,0===v&&y('"required"')),null===n&&(n=D())),null!==n?e=[e,t,n]:(e=null,b=r)):(e=null,b=r),e}function xt(){var e,t,n,r,i,a,o,s;if(o=b,null!==(e=kt()))if(null!==(t=$()))if(null!==(n=Mt())){for(r=[],s=b,null!==(i=j())&&null!==(a=$t())?i=[i,a]:(i=null,b=s);null!==i;)r.push(i),s=b,null!==(i=j())&&null!==(a=$t())?i=[i,a]:(i=null,b=s);null!==r?e=[e,t,n,r]:(e=null,b=o)}else e=null,b=o;else e=null,b=o;else e=null,b=o;return e}function kt(){var e;return null===(e=Et())&&(e=Dt()),e}function Et(){var e;return"text"===_.substr(b,4).toLowerCase()?(e=_.substr(b,4),b+=4):(e=null,0===v&&y('"text"')),null===e&&("image"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"image"')),null===e&&("audio"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"audio"')),null===e&&("video"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"video"')),null===e&&("application"===_.substr(b,11).toLowerCase()?(e=_.substr(b,11),b+=11):(e=null,0===v&&y('"application"')),null===e&&(e=It()))))),e}function Dt(){var e;return"message"===_.substr(b,7).toLowerCase()?(e=_.substr(b,7),b+=7):(e=null,0===v&&y('"message"')),null===e&&("multipart"===_.substr(b,9).toLowerCase()?(e=_.substr(b,9),b+=9):(e=null,0===v&&y('"multipart"')),null===e&&(e=It())),e}function It(){var e;return null===(e=D())&&(e=Pt()),e}function Pt(){var e,t,n;return n=b,"x-"===_.substr(b,2).toLowerCase()?(e=_.substr(b,2),b+=2):(e=null,0===v&&y('"x-"')),null!==e&&null!==(t=D())?e=[e,t]:(e=null,b=n),e}function Mt(){var e;return null===(e=It())&&(e=D()),e}function $t(){var e,t,n,r;return r=b,null!==(e=D())&&null!==(t=O())&&null!==(n=Ot())?e=[e,t,n]:(e=null,b=r),e}function Ot(){var e;return null===(e=D())&&(e=q()),e}function Rt(){var e,t,n,r;if(n=b,null!==(t=l()))for(e=[];null!==t;)e.push(t),t=l();else e=null;return null!==e&&(r=e,e=void(Fn.value=parseInt(r.join("")))),null===e&&(b=n),e}function Nt(){var e,t,n,r,i,a;if(i=b,null!==(e=I())){for(t=[],a=b,46===_.charCodeAt(b)?(n=".",b++):(n=null,0===v&&y('"."')),null!==n&&null!==(r=I())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,46===_.charCodeAt(b)?(n=".",b++):(n=null,0===v&&y('"."')),null!==n&&null!==(r=I())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e}function Lt(){var e;return null===(e=Ft())&&(e=wt()),e}function Ft(){var e,t,n,r,i,a;return i=r=b,"tag"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"tag"')),null!==e&&null!==(t=O())&&null!==(n=D())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.tag=a)),null===e&&(b=r),e}function Gt(){var e,t,n,r,i,a,o,s;if(o=b,"digest"===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"Digest"')),null!==e)if(null!==(t=C()))if(null!==(n=Ut())){for(r=[],s=b,null!==(i=G())&&null!==(a=Ut())?i=[i,a]:(i=null,b=s);null!==i;)r.push(i),s=b,null!==(i=G())&&null!==(a=Ut())?i=[i,a]:(i=null,b=s);null!==r?e=[e,t,n,r]:(e=null,b=o)}else e=null,b=o;else e=null,b=o;else e=null,b=o;return null===e&&(e=jt()),e}function jt(){var e,t,n,r,i,a,o,s;if(o=b,null!==(e=D()))if(null!==(t=C()))if(null!==(n=Bt())){for(r=[],s=b,null!==(i=G())&&null!==(a=Bt())?i=[i,a]:(i=null,b=s);null!==i;)r.push(i),s=b,null!==(i=G())&&null!==(a=Bt())?i=[i,a]:(i=null,b=s);null!==r?e=[e,t,n,r]:(e=null,b=o)}else e=null,b=o;else e=null,b=o;else e=null,b=o;return e}function Bt(){var e,t,n,r;return r=b,null!==(e=D())&&null!==(t=O())?(null===(n=D())&&(n=q()),null!==n?e=[e,t,n]:(e=null,b=r)):(e=null,b=r),e}function Ut(){var e;return null===(e=Ht())&&null===(e=qt())&&null===(e=Vt())&&null===(e=Kt())&&null===(e=Qt())&&null===(e=Xt())&&null===(e=Zt())&&(e=Bt()),e}function Ht(){var e,t,n,r;return r=b,"realm"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"realm"')),null!==e&&null!==(t=O())&&null!==(n=Wt())?e=[e,t,n]:(e=null,b=r),e}function Wt(){var e,t,n;return t=b,null!==(e=z())&&(n=e,e=void(Fn.realm=n)),null===e&&(b=t),e}function qt(){var e,t,n,r,i,a,o,s,c;if(s=b,"domain"===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"domain"')),null!==e)if(null!==(t=O()))if(null!==(n=U()))if(null!==(r=zt())){if(i=[],c=b,null!==(o=h()))for(a=[];null!==o;)a.push(o),o=h();else a=null;for(null!==a&&null!==(o=zt())?a=[a,o]:(a=null,b=c);null!==a;){if(i.push(a),c=b,null!==(o=h()))for(a=[];null!==o;)a.push(o),o=h();else a=null;null!==a&&null!==(o=zt())?a=[a,o]:(a=null,b=c)}null!==i&&null!==(a=H())?e=[e,t,n,r,i,a]:(e=null,b=s)}else e=null,b=s;else e=null,b=s;else e=null,b=s;else e=null,b=s;return e}function zt(){var e;return null===(e=Ne())&&(e=Ge()),e}function Vt(){var e,t,n,r;return r=b,"nonce"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"nonce"')),null!==e&&null!==(t=O())&&null!==(n=Yt())?e=[e,t,n]:(e=null,b=r),e}function Yt(){var e,t,n;return t=b,null!==(e=z())&&(n=e,e=void(Fn.nonce=n)),null===e&&(b=t),e}function Kt(){var e,t,n,r,i,a;return i=r=b,"opaque"===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"opaque"')),null!==e&&null!==(t=O())&&null!==(n=z())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.opaque=a)),null===e&&(b=r),e}function Qt(){var e,t,n,r,i;return r=b,"stale"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"stale"')),null!==e&&null!==(t=O())?(i=b,"true"===_.substr(b,4).toLowerCase()?(n=_.substr(b,4),b+=4):(n=null,0===v&&y('"true"')),null!==n&&(n=void(Fn.stale=!0)),null===n&&(b=i),null===n&&(i=b,"false"===_.substr(b,5).toLowerCase()?(n=_.substr(b,5),b+=5):(n=null,0===v&&y('"false"')),null!==n&&(n=void(Fn.stale=!1)),null===n&&(b=i)),null!==n?e=[e,t,n]:(e=null,b=r)):(e=null,b=r),e}function Xt(){var e,t,n,r,i,a;return i=r=b,"algorithm"===_.substr(b,9).toLowerCase()?(e=_.substr(b,9),b+=9):(e=null,0===v&&y('"algorithm"')),null!==e&&null!==(t=O())?("md5"===_.substr(b,3).toLowerCase()?(n=_.substr(b,3),b+=3):(n=null,0===v&&y('"MD5"')),null===n&&("md5-sess"===_.substr(b,8).toLowerCase()?(n=_.substr(b,8),b+=8):(n=null,0===v&&y('"MD5-sess"')),null===n&&(n=D())),null!==n?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.algorithm=a.toUpperCase())),null===e&&(b=r),e}function Zt(){var e,t,n,r,i,a,o,s,c,l;if(s=b,"qop"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"qop"')),null!==e)if(null!==(t=O()))if(null!==(n=U())){if(c=b,null!==(r=Jt())){for(i=[],l=b,44===_.charCodeAt(b)?(a=",",b++):(a=null,0===v&&y('","')),null!==a&&null!==(o=Jt())?a=[a,o]:(a=null,b=l);null!==a;)i.push(a),l=b,44===_.charCodeAt(b)?(a=",",b++):(a=null,0===v&&y('","')),null!==a&&null!==(o=Jt())?a=[a,o]:(a=null,b=l);null!==i?r=[r,i]:(r=null,b=c)}else r=null,b=c;null!==r&&null!==(i=H())?e=[e,t,n,r,i]:(e=null,b=s)}else e=null,b=s;else e=null,b=s;else e=null,b=s;return e}function Jt(){var e,t,n;return t=b,"auth-int"===_.substr(b,8).toLowerCase()?(e=_.substr(b,8),b+=8):(e=null,0===v&&y('"auth-int"')),null===e&&("auth"===_.substr(b,4).toLowerCase()?(e=_.substr(b,4),b+=4):(e=null,0===v&&y('"auth"')),null===e&&(e=D())),null!==e&&(n=e,Fn.qop||(Fn.qop=[]),e=void Fn.qop.push(n.toLowerCase())),null===e&&(b=t),e}function en(){var e,t,n,r,i,a,o;if(a=i=b,null!==(e=pt())){for(t=[],o=b,null!==(n=j())&&null!==(r=wt())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=j())&&null!==(r=wt())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;return null!==e&&(e=function(e){var t;Fn.multi_header||(Fn.multi_header=[]);try{t=new Ln(Fn.uri,Fn.display_name,Fn.params),delete Fn.uri,delete Fn.display_name,delete Fn.params}catch(e){t=null}Fn.multi_header.push({possition:b,offset:e,parsed:t})}(i)),null===e&&(b=i),e}function tn(){var e;return null===(e=nn())&&(e=wt()),e}function nn(){var e,t,n,r,i,a,o;if(a=i=b,"cause"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"cause"')),null!==e)if(null!==(t=O())){if(null!==(r=l()))for(n=[];null!==r;)n.push(r),r=l();else n=null;null!==n?e=[e,t,n]:(e=null,b=a)}else e=null,b=a;else e=null,b=a;return null!==e&&(o=e[2],e=void(Fn.cause=parseInt(o.join("")))),null===e&&(b=i),e}function rn(){var e,t,n,r,i,a;if(i=b,null!==(e=pt())){for(t=[],a=b,null!==(n=j())&&null!==(r=wt())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=j())&&null!==(r=wt())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e}function an(){var e,t,n;return t=b,"active"===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"active"')),null===e&&("pending"===_.substr(b,7).toLowerCase()?(e=_.substr(b,7),b+=7):(e=null,0===v&&y('"pending"')),null===e&&("terminated"===_.substr(b,10).toLowerCase()?(e=_.substr(b,10),b+=10):(e=null,0===v&&y('"terminated"')),null===e&&(e=D()))),null!==e&&(n=t,e=void(Fn.state=_.substring(b,n))),null===e&&(b=t),e}function on(){var e,t,n,r,i,a,o,s;return i=r=b,"reason"===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"reason"')),null!==e&&null!==(t=O())&&null!==(n=sn())?e=[e,t,n]:(e=null,b=i),null!==e&&(e=void(void 0!==(a=e[2])&&(Fn.reason=a))),null===e&&(b=r),null===e&&(i=r=b,"expires"===_.substr(b,7).toLowerCase()?(e=_.substr(b,7),b+=7):(e=null,0===v&&y('"expires"')),null!==e&&null!==(t=O())&&null!==(n=vt())?e=[e,t,n]:(e=null,b=i),null!==e&&(e=void(void 0!==(s=e[2])&&(Fn.expires=s))),null===e&&(b=r),null===e&&(i=r=b,"retry_after"===_.substr(b,11).toLowerCase()?(e=_.substr(b,11),b+=11):(e=null,0===v&&y('"retry_after"')),null!==e&&null!==(t=O())&&null!==(n=vt())?e=[e,t,n]:(e=null,b=i),null!==e&&(e=void(void 0!==(o=e[2])&&(Fn.retry_after=o))),null===e&&(b=r),null===e&&(e=wt()))),e}function sn(){var e;return"deactivated"===_.substr(b,11).toLowerCase()?(e=_.substr(b,11),b+=11):(e=null,0===v&&y('"deactivated"')),null===e&&("probation"===_.substr(b,9).toLowerCase()?(e=_.substr(b,9),b+=9):(e=null,0===v&&y('"probation"')),null===e&&("rejected"===_.substr(b,8).toLowerCase()?(e=_.substr(b,8),b+=8):(e=null,0===v&&y('"rejected"')),null===e&&("timeout"===_.substr(b,7).toLowerCase()?(e=_.substr(b,7),b+=7):(e=null,0===v&&y('"timeout"')),null===e&&("giveup"===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"giveup"')),null===e&&("noresource"===_.substr(b,10).toLowerCase()?(e=_.substr(b,10),b+=10):(e=null,0===v&&y('"noresource"')),null===e&&("invariant"===_.substr(b,9).toLowerCase()?(e=_.substr(b,9),b+=9):(e=null,0===v&&y('"invariant"')),null===e&&(e=D()))))))),e}function cn(){var e;return null===(e=Ft())&&(e=wt()),e}function ln(){var e,t,n,r,i,a,o,s;if(o=b,null!==(e=gn()))if(null!==(t=C()))if(null!==(n=vn())){for(r=[],s=b,null!==(i=j())&&null!==(a=un())?i=[i,a]:(i=null,b=s);null!==i;)r.push(i),s=b,null!==(i=j())&&null!==(a=un())?i=[i,a]:(i=null,b=s);null!==r?e=[e,t,n,r]:(e=null,b=o)}else e=null,b=o;else e=null,b=o;else e=null,b=o;return e}function un(){var e;return null===(e=fn())&&null===(e=dn())&&null===(e=hn())&&null===(e=pn())&&null===(e=mn())&&(e=wt()),e}function fn(){var e,t,n,r,i,a;return i=r=b,"ttl"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"ttl"')),null!==e&&null!==(t=O())&&null!==(n=Cn())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.ttl=a)),null===e&&(b=r),e}function dn(){var e,t,n,r,i,a;return i=r=b,"maddr"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"maddr"')),null!==e&&null!==(t=O())&&null!==(n=ae())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.maddr=a)),null===e&&(b=r),e}function hn(){var e,t,n,r,i,a;return i=r=b,"received"===_.substr(b,8).toLowerCase()?(e=_.substr(b,8),b+=8):(e=null,0===v&&y('"received"')),null!==e&&null!==(t=O())?(null===(n=he())&&(n=ue()),null!==n?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.received=a)),null===e&&(b=r),e}function pn(){var e,t,n,r,i,a;return i=r=b,"branch"===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"branch"')),null!==e&&null!==(t=O())&&null!==(n=D())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.branch=a)),null===e&&(b=r),e}function mn(){var e,t,n,r,i,a,o;if(a=i=b,"rport"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"rport"')),null!==e){if(o=b,null!==(t=O())){for(n=[],r=l();null!==r;)n.push(r),r=l();null!==n?t=[t,n]:(t=null,b=o)}else t=null,b=o;null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=a)}else e=null,b=a;return null!==e&&(e=void("undefined"!=typeof response_port&&(Fn.rport=response_port.join("")))),null===e&&(b=i),e}function gn(){var e,t,n,r,i,a;return a=b,null!==(e=_n())&&null!==(t=$())&&null!==(n=D())&&null!==(r=$())&&null!==(i=bn())?e=[e,t,n,r,i]:(e=null,b=a),e}function _n(){var e,t,n;return t=b,"sip"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"SIP"')),null===e&&(e=D()),null!==e&&(n=e,e=void(Fn.protocol=n)),null===e&&(b=t),e}function bn(){var e,t,n;return t=b,"udp"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"UDP"')),null===e&&("tcp"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"TCP"')),null===e&&("tls"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"TLS"')),null===e&&("sctp"===_.substr(b,4).toLowerCase()?(e=_.substr(b,4),b+=4):(e=null,0===v&&y('"SCTP"')),null===e&&(e=D())))),null!==e&&(n=e,e=void(Fn.transport=n)),null===e&&(b=t),e}function vn(){var e,t,n,r,i;return r=b,null!==(e=yn())?(i=b,null!==(t=B())&&null!==(n=wn())?t=[t,n]:(t=null,b=i),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=r)):(e=null,b=r),e}function yn(){var e,t,n;return t=b,null===(e=he())&&null===(e=le())&&(e=oe()),null!==e&&(n=t,e=void(Fn.host=_.substring(b,n))),null===e&&(b=t),e}function wn(){var e,t,n,r,i,a,o,s;return o=a=b,null!==(e=null!==(e=l())?e:"")&&null!==(t=null!==(t=l())?t:"")&&null!==(n=null!==(n=l())?n:"")&&null!==(r=null!==(r=l())?r:"")&&null!==(i=null!==(i=l())?i:"")?e=[e,t,n,r,i]:(e=null,b=o),null!==e&&(s=e,e=void(Fn.port=parseInt(s.join("")))),null===e&&(b=a),e}function Cn(){var e,t,n,r,i;return i=r=b,null!==(e=l())&&null!==(t=null!==(t=l())?t:"")&&null!==(n=null!==(n=l())?n:"")?e=[e,t,n]:(e=null,b=i),null!==e&&(e=parseInt(e.join(""))),null===e&&(b=r),e}function An(){var e,t,n;return t=b,null!==(e=vt())&&(n=e,e=void(Fn.expires=n)),null===e&&(b=t),e}function Sn(){var e;return null===(e=Tn())&&(e=wt()),e}function Tn(){var e,t,n,r,i,a;return i=r=b,"refresher"===_.substr(b,9).toLowerCase()?(e=_.substr(b,9),b+=9):(e=null,0===v&&y('"refresher"')),null!==e&&null!==(t=O())?("uac"===_.substr(b,3).toLowerCase()?(n=_.substr(b,3),b+=3):(n=null,0===v&&y('"uac"')),null===n&&("uas"===_.substr(b,3).toLowerCase()?(n=_.substr(b,3),b+=3):(n=null,0===v&&y('"uas"'))),null!==n?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.refresher=a.toLowerCase())),null===e&&(b=r),e}function xn(){var e,t;for(e=[],null===(t=x())&&null===(t=E())&&(t=C());null!==t;)e.push(t),null===(t=x())&&null===(t=E())&&(t=C());return e}function kn(){var e,t,n,r,i,a,o,s,c,l,u,f;return u=l=b,null!==(e=Dn())?(45===_.charCodeAt(b)?(t="-",b++):(t=null,0===v&&y('"-"')),null!==t&&null!==(n=En())?(45===_.charCodeAt(b)?(r="-",b++):(r=null,0===v&&y('"-"')),null!==r&&null!==(i=En())?(45===_.charCodeAt(b)?(a="-",b++):(a=null,0===v&&y('"-"')),null!==a&&null!==(o=En())?(45===_.charCodeAt(b)?(s="-",b++):(s=null,0===v&&y('"-"')),null!==s&&null!==(c=In())?e=[e,t,n,r,i,a,o,s,c]:(e=null,b=u)):(e=null,b=u)):(e=null,b=u)):(e=null,b=u)):(e=null,b=u),null!==e&&(f=l,e[0],e=void(Fn=_.substring(b+5,f))),null===e&&(b=l),e}function En(){var e,t,n,r,i;return i=b,null!==(e=u())&&null!==(t=u())&&null!==(n=u())&&null!==(r=u())?e=[e,t,n,r]:(e=null,b=i),e}function Dn(){var e,t,n;return n=b,null!==(e=En())&&null!==(t=En())?e=[e,t]:(e=null,b=n),e}function In(){var e,t,n,r;return r=b,null!==(e=En())&&null!==(t=En())&&null!==(n=En())?e=[e,t,n]:(e=null,b=r),e}function Pn(){var e,t,n,r,i,a,o;return i=r=b,null!==(e=P())?(a=b,64===_.charCodeAt(b)?(t="@",b++):(t=null,0===v&&y('"@"')),null!==t&&null!==(n=P())?t=[t,n]:(t=null,b=a),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=i)):(e=null,b=i),null!==e&&(o=r,e=void(Fn.call_id=_.substring(b,o))),null===e&&(b=r),e}function Mn(){var e;return null===(e=$n())&&null===(e=On())&&null===(e=Rn())&&(e=wt()),e}function $n(){var e,t,n,r,i,a;return i=r=b,"to-tag"===_.substr(b,6)?(e="to-tag",b+=6):(e=null,0===v&&y('"to-tag"')),null!==e&&null!==(t=O())&&null!==(n=D())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.to_tag=a)),null===e&&(b=r),e}function On(){var e,t,n,r,i,a;return i=r=b,"from-tag"===_.substr(b,8)?(e="from-tag",b+=8):(e=null,0===v&&y('"from-tag"')),null!==e&&null!==(t=O())&&null!==(n=D())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.from_tag=a)),null===e&&(b=r),e}function Rn(){var e,t;return t=b,"early-only"===_.substr(b,10)?(e="early-only",b+=10):(e=null,0===v&&y('"early-only"')),null!==e&&(e=void(Fn.early_only=!0)),null===e&&(b=t),e}var Nn=Hn("./URI"),Ln=Hn("./NameAddrHeader"),Fn={};if(null!==e[c]()&&b===_.length)return Fn;var Gn=Math.max(b,a),jn=Gn<_.length?_.charAt(Gn):null,Bn=function(){for(var e=1,t=1,n=!1,r=0;r<Math.max(b,a);r++){var i=_.charAt(r);n="\n"===i?(n||e++,!(t=1)):"\r"===i||"\u2028"===i||"\u2029"===i?(e++,t=1,!0):(t++,!1)}return{line:e,column:t}}();return new this.SyntaxError(function(e){e.sort();for(var t=null,n=[],r=0;r<e.length;r++)e[r]!==t&&(n.push(e[r]),t=e[r]);return n}(t),jn,Gn,Bn.line,Bn.column),-1},toSource:function(){return this._source},SyntaxError:function(e,t,n,r,i){this.name="SyntaxError",this.expected=e,this.found=t,this.message=function(e,t){var n;switch(e.length){case 0:n="end of input";break;case 1:n=e[0];break;default:n=e.slice(0,e.length-1).join(", ")+" or "+e[e.length-1]}return"Expected "+n+" but "+(t?Un(t):"end of input")+" found."}(e,t),this.offset=n,this.line=r,this.column=i}};return e.SyntaxError.prototype=Error.prototype,e}()},{"./NameAddrHeader":10,"./URI":25}],8:[function(e,t,n){"use strict";var r=e("webrtc-adapter"),i=e("../package.json"),a=e("./Constants"),o=e("./Exceptions"),s=e("./Utils"),c=e("./UA"),l=e("./URI"),u=e("./NameAddrHeader"),f=e("./Grammar"),d=e("./WebSocketInterface");e("debug")("JsSIP")("version %s",i.version),t.exports={C:a,Exceptions:o,Utils:s,UA:c,URI:l,NameAddrHeader:u,WebSocketInterface:d,Grammar:f,debug:e("debug"),adapter:r,get name(){return i.title},get version(){return i.version}}},{"../package.json":51,"./Constants":2,"./Exceptions":6,"./Grammar":7,"./NameAddrHeader":10,"./UA":24,"./URI":25,"./Utils":26,"./WebSocketInterface":27,debug:29,"webrtc-adapter":40}],9:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var i=e("events").EventEmitter,u=e("./Constants"),f=e("./SIPMessage"),d=e("./Utils"),h=e("./RequestSender"),a=e("./Exceptions"),o=e("debug")("JsSIP:Message");t.exports=function(e){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t._ua=e,t._request=null,t._closed=!1,t._direction=null,t._local_identity=null,t._remote_identity=null,t._is_replied=!1,t._data={},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,i),r(n,[{key:"send",value:function(e,t){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},i=e;if(void 0===e||void 0===t)throw new TypeError("Not enough arguments");if(!(e=this._ua.normalizeTarget(e)))throw new TypeError("Invalid target: "+i);var a=d.cloneArray(r.extraHeaders),o=r.eventHandlers||{},s=r.contentType||"text/plain";for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&this.on(c,o[c]);a.push("Content-Type: "+s),this._request=new f.OutgoingRequest(u.MESSAGE,e,this._ua,null,a),t&&(this._request.body=t);var l=new h(this._ua,this._request,{onRequestTimeout:function(){n._onRequestTimeout()},onTransportError:function(){n._onTransportError()},onReceiveResponse:function(e){n._receiveResponse(e)}});this._newMessage("local",this._request),l.send()}},{key:"init_incoming",value:function(e){this._request=e,this._newMessage("remote",e),this._is_replied||(this._is_replied=!0,e.reply(200)),this._close()}},{key:"accept",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=d.cloneArray(e.extraHeaders),n=e.body;if("incoming"!==this._direction)throw new a.NotSupportedError('"accept" not supported for outgoing Message');if(this._is_replied)throw new Error("incoming Message already replied");this._is_replied=!0,this._request.reply(200,null,t,n)}},{key:"reject",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.status_code||480,n=e.reason_phrase,r=d.cloneArray(e.extraHeaders),i=e.body;if("incoming"!==this._direction)throw new a.NotSupportedError('"reject" not supported for outgoing Message');if(this._is_replied)throw new Error("incoming Message already replied");if(t<300||700<=t)throw new TypeError("Invalid status_code: "+t);this._is_replied=!0,this._request.reply(t,n,r,i)}},{key:"_receiveResponse",value:function(e){if(!this._closed)switch(!0){case/^1[0-9]{2}$/.test(e.status_code):break;case/^2[0-9]{2}$/.test(e.status_code):this._succeeded("remote",e);break;default:var t=d.sipErrorCause(e.status_code);this._failed("remote",e,t)}}},{key:"_onRequestTimeout",value:function(){this._closed||this._failed("system",null,u.causes.REQUEST_TIMEOUT)}},{key:"_onTransportError",value:function(){this._closed||this._failed("system",null,u.causes.CONNECTION_ERROR)}},{key:"_close",value:function(){this._closed=!0,this._ua.destroyMessage(this)}},{key:"_newMessage",value:function(e,t){"remote"===e?(this._direction="incoming",this._local_identity=t.to,this._remote_identity=t.from):"local"===e&&(this._direction="outgoing",this._local_identity=t.from,this._remote_identity=t.to),this._ua.newMessage(this,{originator:e,message:this,request:t})}},{key:"_failed",value:function(e,t,n){o("MESSAGE failed"),this._close(),o('emit "failed"'),this.emit("failed",{originator:e,response:t||null,cause:n})}},{key:"_succeeded",value:function(e,t){o("MESSAGE succeeded"),this._close(),o('emit "succeeded"'),this.emit("succeeded",{originator:e,response:t})}},{key:"direction",get:function(){return this._direction}},{key:"local_identity",get:function(){return this._local_identity}},{key:"remote_identity",get:function(){return this._remote_identity}}]),n}()},{"./Constants":2,"./Exceptions":6,"./RequestSender":18,"./SIPMessage":19,"./Utils":26,debug:29,events:31}],10:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var a=e("./URI"),o=e("./Grammar");t.exports=function(){function i(e,t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),!(e&&e instanceof a))throw new TypeError('missing or invalid "uri" parameter');for(var r in this._uri=e,this._parameters={},this._display_name=t,n)Object.prototype.hasOwnProperty.call(n,r)&&this.setParam(r,n[r])}return r(i,null,[{key:"parse",value:function(e){return-1!==(e=o.parse(e,"Name_Addr_Header"))?e:void 0}}]),r(i,[{key:"setParam",value:function(e,t){e&&(this._parameters[e.toLowerCase()]=null==t?null:t.toString())}},{key:"getParam",value:function(e){if(e)return this._parameters[e.toLowerCase()]}},{key:"hasParam",value:function(e){if(e)return!!this._parameters.hasOwnProperty(e.toLowerCase())}},{key:"deleteParam",value:function(e){if(e=e.toLowerCase(),this._parameters.hasOwnProperty(e)){var t=this._parameters[e];return delete this._parameters[e],t}}},{key:"clearParams",value:function(){this._parameters={}}},{key:"clone",value:function(){return new i(this._uri.clone(),this._display_name,JSON.parse(JSON.stringify(this._parameters)))}},{key:"toString",value:function(){var e=this._display_name||0===this._display_name?'"'+this._display_name+'" ':"";for(var t in e+="<"+this._uri.toString()+">",this._parameters)Object.prototype.hasOwnProperty.call(this._parameters,t)&&(e+=";"+t,null!==this._parameters[t]&&(e+="="+this._parameters[t]));return e}},{key:"uri",get:function(){return this._uri}},{key:"display_name",get:function(){return this._display_name},set:function(e){this._display_name=0===e?"0":e}}]),i}()},{"./Grammar":7,"./URI":25}],11:[function(e,t,n){"use strict";var y=e("./Grammar"),w=e("./SIPMessage"),l=e("debug")("JsSIP:ERROR:Parser");function u(e,t){var n=t,r=0,i=0;if(e.substring(n,n+2).match(/(^\r\n)/))return-2;for(;0===r;){if(-1===(i=e.indexOf("\r\n",n)))return i;!e.substring(i+2,i+4).match(/(^\r\n)/)&&e.charAt(i+2).match(/(^\s+)/)?n=i+2:r=i}return r}function f(e,t,n,r){var i=void 0,a=t.indexOf(":",n),o=t.substring(n,a).trim(),s=t.substring(a+1,r).trim();switch(o.toLowerCase()){case"via":case"v":e.addHeader("via",s),1===e.getHeaders("via").length?(i=e.parseHeader("Via"))&&(e.via=i,e.via_branch=i.branch):i=0;break;case"from":case"f":e.setHeader("from",s),(i=e.parseHeader("from"))&&(e.from=i,e.from_tag=i.getParam("tag"));break;case"to":case"t":e.setHeader("to",s),(i=e.parseHeader("to"))&&(e.to=i,e.to_tag=i.getParam("tag"));break;case"record-route":if(-1===(i=y.parse(s,"Record_Route")))i=void 0;else{var c=!0,l=!1,u=void 0;try{for(var f,d=i[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){var h=f.value;e.addHeader("record-route",s.substring(h.possition,h.offset)),e.headers["Record-Route"][e.getHeaders("record-route").length-1].parsed=h.parsed}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}}break;case"call-id":case"i":e.setHeader("call-id",s),(i=e.parseHeader("call-id"))&&(e.call_id=s);break;case"contact":case"m":if(-1===(i=y.parse(s,"Contact")))i=void 0;else{var p=!0,m=!1,g=void 0;try{for(var _,b=i[Symbol.iterator]();!(p=(_=b.next()).done);p=!0){var v=_.value;e.addHeader("contact",s.substring(v.possition,v.offset)),e.headers.Contact[e.getHeaders("contact").length-1].parsed=v.parsed}}catch(e){m=!0,g=e}finally{try{!p&&b.return&&b.return()}finally{if(m)throw g}}}break;case"content-length":case"l":e.setHeader("content-length",s),i=e.parseHeader("content-length");break;case"content-type":case"c":e.setHeader("content-type",s),i=e.parseHeader("content-type");break;case"cseq":e.setHeader("cseq",s),(i=e.parseHeader("cseq"))&&(e.cseq=i.value),e instanceof w.IncomingResponse&&(e.method=i.method);break;case"max-forwards":e.setHeader("max-forwards",s),i=e.parseHeader("max-forwards");break;case"www-authenticate":e.setHeader("www-authenticate",s),i=e.parseHeader("www-authenticate");break;case"proxy-authenticate":e.setHeader("proxy-authenticate",s),i=e.parseHeader("proxy-authenticate");break;case"session-expires":case"x":e.setHeader("session-expires",s),(i=e.parseHeader("session-expires"))&&(e.session_expires=i.expires,e.session_expires_refresher=i.refresher);break;case"refer-to":case"r":e.setHeader("refer-to",s),(i=e.parseHeader("refer-to"))&&(e.refer_to=i);break;case"replaces":e.setHeader("replaces",s),(i=e.parseHeader("replaces"))&&(e.replaces=i);break;case"event":case"o":e.setHeader("event",s),(i=e.parseHeader("event"))&&(e.event=i);break;default:e.addHeader(o,s),i=0}return void 0!==i||{error:'error parsing header "'+o+'"'}}l.log=console.warn.bind(console),n.parseMessage=function(e,t){var n=void 0,r=void 0,i=e.indexOf("\r\n");if(-1!==i){var a=e.substring(0,i),o=y.parse(a,"Request_Response");if(-1!==o){o.status_code?((n=new w.IncomingResponse).status_code=o.status_code,n.reason_phrase=o.reason_phrase):((n=new w.IncomingRequest(t)).method=o.method,n.ruri=o.uri),n.data=e;for(var s=i+2;;){if(-2===(i=u(e,s))){r=s+2;break}if(-1===i)return void l("parseMessage() | malformed message");if(!0!==(o=f(n,e,s,i)))return void l("parseMessage() |",o.error);s=i+2}if(n.hasHeader("content-length")){var c=n.getHeader("content-length");n.body=e.substr(r,c)}else n.body=e.substring(r);return n}l('parseMessage() | error parsing first line of SIP message: "'+a+'"')}else l("parseMessage() | no CRLF found, not a SIP message")}},{"./Grammar":7,"./SIPMessage":19,debug:29}],12:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var a=e("events").EventEmitter,v=e("sdp-transform"),$=e("./Constants"),O=e("./Exceptions"),l=e("./Transactions"),R=e("./Utils"),s=e("./Timers"),p=e("./SIPMessage"),c=e("./Dialog"),u=e("./RequestSender"),f=e("./RTCSession/DTMF"),d=e("./RTCSession/Info"),h=e("./RTCSession/ReferNotifier"),m=e("./RTCSession/ReferSubscriber"),N=e("debug")("JsSIP:RTCSession"),L=e("debug")("JsSIP:ERROR:RTCSession");L.log=console.warn.bind(console);var F={STATUS_NULL:0,STATUS_INVITE_SENT:1,STATUS_1XX_RECEIVED:2,STATUS_INVITE_RECEIVED:3,STATUS_WAITING_FOR_ANSWER:4,STATUS_ANSWERED:5,STATUS_WAITING_FOR_ACK:6,STATUS_CANCELED:7,STATUS_TERMINATED:8,STATUS_CONFIRMED:9},y=["audio","video"];t.exports=function(e){function o(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),N("new");var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return t._id=null,t._ua=e,t._status=F.STATUS_NULL,t._dialog=null,t._earlyDialogs={},t._contact=null,t._from_tag=null,t._to_tag=null,t._connection=null,t._connectionPromiseQueue=Promise.resolve(),t._request=null,t._is_canceled=!1,t._cancel_reason="",t._is_confirmed=!1,t._late_sdp=!1,t._rtcOfferConstraints=null,t._rtcAnswerConstraints=null,t._localMediaStream=null,t._localMediaStreamLocallyGenerated=!1,t._rtcReady=!0,t._timers={ackTimer:null,expiresTimer:null,invite2xxTimer:null,userNoAnswerTimer:null},t._direction=null,t._local_identity=null,t._remote_identity=null,t._start_time=null,t._end_time=null,t._tones=null,t._audioMuted=!1,t._videoMuted=!1,t._localHold=!1,t._remoteHold=!1,t._sessionTimers={enabled:t._ua.configuration.session_timers,refreshMethod:t._ua.configuration.session_timers_refresh_method,defaultExpires:$.SESSION_EXPIRES,currentExpires:null,running:!1,refresher:!1,timer:null},t._referSubscribers={},t._data={},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,a),i(o,null,[{key:"C",get:function(){return F}}]),i(o,[{key:"isInProgress",value:function(){switch(this._status){case F.STATUS_NULL:case F.STATUS_INVITE_SENT:case F.STATUS_1XX_RECEIVED:case F.STATUS_INVITE_RECEIVED:case F.STATUS_WAITING_FOR_ANSWER:return!0;default:return!1}}},{key:"isEstablished",value:function(){switch(this._status){case F.STATUS_ANSWERED:case F.STATUS_WAITING_FOR_ACK:case F.STATUS_CONFIRMED:return!0;default:return!1}}},{key:"isEnded",value:function(){switch(this._status){case F.STATUS_CANCELED:case F.STATUS_TERMINATED:return!0;default:return!1}}},{key:"isMuted",value:function(){return{audio:this._audioMuted,video:this._videoMuted}}},{key:"isOnHold",value:function(){return{local:this._localHold,remote:this._remoteHold}}},{key:"connect",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];N("connect()");var r=e,i=t.eventHandlers||{},a=R.cloneArray(t.extraHeaders),o=t.mediaConstraints||{audio:!0,video:!0},s=t.mediaStream||null,c=t.pcConfig||{iceServers:[]},l=t.rtcConstraints||null,u=t.rtcOfferConstraints||null;if(this._rtcOfferConstraints=u,this._rtcAnswerConstraints=t.rtcAnswerConstraints||null,this._data=t.data||this._data,void 0===e)throw new TypeError("Not enough arguments");if(this._status!==F.STATUS_NULL)throw new O.InvalidStateError(this._status);if(!window.RTCPeerConnection)throw new O.NotSupportedError("WebRTC not supported");if(!(e=this._ua.normalizeTarget(e)))throw new TypeError("Invalid target: "+r);for(var f in this._sessionTimers.enabled&&R.isDecimal(t.sessionTimersExpires)&&(t.sessionTimersExpires>=$.MIN_SESSION_EXPIRES?this._sessionTimers.defaultExpires=t.sessionTimersExpires:this._sessionTimers.defaultExpires=$.SESSION_EXPIRES),i)Object.prototype.hasOwnProperty.call(i,f)&&this.on(f,i[f]);this._from_tag=R.newTag();var d=t.anonymous||!1,h={from_tag:this._from_tag};this._contact=this._ua.contact.toString({anonymous:d,outbound:!0}),d&&(h.from_display_name="Anonymous",h.from_uri="sip:anonymous@anonymous.invalid",a.push("P-Preferred-Identity: "+this._ua.configuration.uri.toString()),a.push("Privacy: id")),a.push("Contact: "+this._contact),a.push("Content-Type: application/sdp"),this._sessionTimers.enabled&&a.push("Session-Expires: "+this._sessionTimers.defaultExpires),this._request=new p.InitialOutgoingInviteRequest(e,this._ua,h,a),this._id=this._request.call_id+this._from_tag,this._createRTCConnection(c,l),this._direction="outgoing",this._local_identity=this._request.from,this._remote_identity=this._request.to,n&&n(this),this._newRTCSession("local",this._request),this._sendInitialRequest(o,u,s)}},{key:"init_incoming",value:function(e,t){var n=this;N("init_incoming()");var r=void 0,i=e.getHeader("Content-Type");e.body&&"application/sdp"!==i?e.reply(415):(this._status=F.STATUS_INVITE_RECEIVED,this._from_tag=e.from_tag,this._id=e.call_id+this._from_tag,this._request=e,this._contact=this._ua.contact.toString(),e.hasHeader("expires")&&(r=1e3*e.getHeader("expires")),e.to_tag=R.newTag(),this._createDialog(e,"UAS",!0)?(e.body?this._late_sdp=!1:this._late_sdp=!0,this._status=F.STATUS_WAITING_FOR_ANSWER,this._timers.userNoAnswerTimer=setTimeout(function(){e.reply(408),n._failed("local",null,$.causes.NO_ANSWER)},this._ua.configuration.no_answer_timeout),r&&(this._timers.expiresTimer=setTimeout(function(){n._status===F.STATUS_WAITING_FOR_ANSWER&&(e.reply(487),n._failed("system",null,$.causes.EXPIRES))},r)),this._direction="incoming",this._local_identity=e.to,this._remote_identity=e.from,t&&t(this),this._newRTCSession("remote",e),this._status!==F.STATUS_TERMINATED&&(e.reply(180,null,["Contact: "+this._contact]),this._progress("local",null))):e.reply(500,"Missing Contact header field"))}},{key:"answer",value:function(){var n=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};N("answer()");var r=this._request,t=R.cloneArray(e.extraHeaders),i=e.mediaConstraints||{},a=e.mediaStream||null,o=e.pcConfig||{iceServers:[]},s=e.rtcConstraints||null,c=e.rtcAnswerConstraints||null,l=void 0,u=!1,f=!1,d=!1,h=!1;if(this._rtcAnswerConstraints=c,this._rtcOfferConstraints=e.rtcOfferConstraints||null,this._data=e.data||this._data,"incoming"!==this._direction)throw new O.NotSupportedError('"answer" not supported for outgoing RTCSession');if(this._status!==F.STATUS_WAITING_FOR_ANSWER)throw new O.InvalidStateError(this._status);if(this._sessionTimers.enabled&&R.isDecimal(e.sessionTimersExpires)&&(e.sessionTimersExpires>=$.MIN_SESSION_EXPIRES?this._sessionTimers.defaultExpires=e.sessionTimersExpires:this._sessionTimers.defaultExpires=$.SESSION_EXPIRES),this._status=F.STATUS_ANSWERED,this._createDialog(r,"UAS")){clearTimeout(this._timers.userNoAnswerTimer),t.unshift("Contact: "+this._contact);var p=r.parseSDP();Array.isArray(p.media)||(p.media=[p.media]);var m=!0,g=!1,_=void 0;try{for(var b,v=p.media[Symbol.iterator]();!(m=(b=v.next()).done);m=!0){var y=b.value;"audio"===y.type&&(u=!0,y.direction&&"sendrecv"!==y.direction||(d=!0)),"video"===y.type&&(f=!0,y.direction&&"sendrecv"!==y.direction||(h=!0))}}catch(e){g=!0,_=e}finally{try{!m&&v.return&&v.return()}finally{if(g)throw _}}if(a&&!1===i.audio){l=a.getAudioTracks();var w=!0,C=!1,A=void 0;try{for(var S,T=l[Symbol.iterator]();!(w=(S=T.next()).done);w=!0){var x=S.value;a.removeTrack(x)}}catch(e){C=!0,A=e}finally{try{!w&&T.return&&T.return()}finally{if(C)throw A}}}if(a&&!1===i.video){l=a.getVideoTracks();var k=!0,E=!1,D=void 0;try{for(var I,P=l[Symbol.iterator]();!(k=(I=P.next()).done);k=!0){var M=I.value;a.removeTrack(M)}}catch(e){E=!0,D=e}finally{try{!k&&P.return&&P.return()}finally{if(E)throw D}}}a||void 0!==i.audio||(i.audio=d),a||void 0!==i.video||(i.video=h),a||u||(i.audio=!1),a||f||(i.video=!1),this._createRTCConnection(o,s),Promise.resolve().then(function(){return a||(i.audio||i.video?(n._localMediaStreamLocallyGenerated=!0,navigator.mediaDevices.getUserMedia(i).catch(function(e){if(n._status===F.STATUS_TERMINATED)throw new Error("terminated");throw r.reply(480),n._failed("local",null,$.causes.USER_DENIED_MEDIA_ACCESS),L('emit "getusermediafailed" [error:%o]',e),n.emit("getusermediafailed",e),new Error("getUserMedia() failed")})):void 0)}).then(function(e){if(n._status===F.STATUS_TERMINATED)throw new Error("terminated");(n._localMediaStream=e)&&n._connection.addStream(e)}).then(function(){if(!n._late_sdp){var e={originator:"remote",type:"offer",sdp:r.body};N('emit "sdp"'),n.emit("sdp",e);var t=new RTCSessionDescription({type:"offer",sdp:e.sdp});return n._connectionPromiseQueue=n._connectionPromiseQueue.then(function(){return n._connection.setRemoteDescription(t)}).catch(function(e){throw r.reply(488),n._failed("system",null,$.causes.WEBRTC_ERROR),L('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),n.emit("peerconnection:setremotedescriptionfailed",e),new Error("peerconnection.setRemoteDescription() failed")}),n._connectionPromiseQueue}}).then(function(){if(n._status===F.STATUS_TERMINATED)throw new Error("terminated");return n._connecting(r),n._late_sdp?n._createLocalDescription("offer",n._rtcOfferConstraints).catch(function(){throw r.reply(500),new Error("_createLocalDescription() failed")}):n._createLocalDescription("answer",c).catch(function(){throw r.reply(500),new Error("_createLocalDescription() failed")})}).then(function(e){if(n._status===F.STATUS_TERMINATED)throw new Error("terminated");n._handleSessionTimersInIncomingRequest(r,t),r.reply(200,null,t,e,function(){n._status=F.STATUS_WAITING_FOR_ACK,n._setInvite2xxTimer(r,e),n._setACKTimer(),n._accepted("local")},function(){n._failed("system",null,$.causes.CONNECTION_ERROR)})}).catch(function(e){n._status!==F.STATUS_TERMINATED&&L(e)})}else r.reply(500,"Error creating dialog")}},{key:"terminate",value:function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};N("terminate()");var n=e.cause||$.causes.BYE,r=R.cloneArray(e.extraHeaders),i=e.body,a=void 0,o=e.status_code,s=e.reason_phrase;if(this._status===F.STATUS_TERMINATED)throw new O.InvalidStateError(this._status);switch(this._status){case F.STATUS_NULL:case F.STATUS_INVITE_SENT:case F.STATUS_1XX_RECEIVED:if(N("canceling session"),o&&(o<200||700<=o))throw new TypeError("Invalid status_code: "+o);o&&(a="SIP ;cause="+o+' ;text="'+(s=s||$.REASON_PHRASE[o]||"")+'"'),this._status===F.STATUS_NULL||this._status===F.STATUS_INVITE_SENT?(this._is_canceled=!0,this._cancel_reason=a):this._status===F.STATUS_1XX_RECEIVED&&this._request.cancel(a),this._status=F.STATUS_CANCELED,this._failed("local",null,$.causes.CANCELED);break;case F.STATUS_WAITING_FOR_ANSWER:case F.STATUS_ANSWERED:if(N("rejecting session"),(o=o||480)<300||700<=o)throw new TypeError("Invalid status_code: "+o);this._request.reply(o,s,r,i),this._failed("local",null,$.causes.REJECTED);break;case F.STATUS_WAITING_FOR_ACK:case F.STATUS_CONFIRMED:if(N("terminating session"),s=e.reason_phrase||$.REASON_PHRASE[o]||"",o&&(o<200||700<=o))throw new TypeError("Invalid status_code: "+o);if(o&&r.push("Reason: SIP ;cause="+o+'; text="'+s+'"'),this._status===F.STATUS_WAITING_FOR_ACK&&"incoming"===this._direction&&this._request.server_transaction.state!==l.C.STATUS_TERMINATED){var c=this._dialog;this.receiveRequest=function(e){e.method===$.ACK&&(t.sendRequest($.BYE,{extraHeaders:r,body:i}),c.terminate())},this._request.server_transaction.on("stateChanged",function(){t._request.server_transaction.state===l.C.STATUS_TERMINATED&&(t.sendRequest($.BYE,{extraHeaders:r,body:i}),c.terminate())}),this._ended("local",null,n),this._dialog=c,this._ua.newDialog(c)}else this.sendRequest($.BYE,{extraHeaders:r,body:i}),this._ended("local",null,n)}}},{key:"sendDTMF",value:function(e){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};N("sendDTMF() | tones: %s",e);var o=0,s=a.duration||null,c=a.interToneGap||null;if(void 0===e)throw new TypeError("Not enough arguments");if(this._status!==F.STATUS_CONFIRMED&&this._status!==F.STATUS_WAITING_FOR_ACK)throw new O.InvalidStateError(this._status);if("number"==typeof e&&(e=e.toString()),!e||"string"!=typeof e||!e.match(/^[0-9A-DR#*,]+$/i))throw new TypeError("Invalid tones: "+e);if(s&&!R.isDecimal(s))throw new TypeError("Invalid tone duration: "+s);if(s=s?s<f.C.MIN_DURATION?(N('"duration" value is lower than the minimum allowed, setting it to '+f.C.MIN_DURATION+" milliseconds"),f.C.MIN_DURATION):s>f.C.MAX_DURATION?(N('"duration" value is greater than the maximum allowed, setting it to '+f.C.MAX_DURATION+" milliseconds"),f.C.MAX_DURATION):Math.abs(s):f.C.DEFAULT_DURATION,a.duration=s,c&&!R.isDecimal(c))throw new TypeError("Invalid interToneGap: "+c);c=c?c<f.C.MIN_INTER_TONE_GAP?(N('"interToneGap" value is lower than the minimum allowed, setting it to '+f.C.MIN_INTER_TONE_GAP+" milliseconds"),f.C.MIN_INTER_TONE_GAP):Math.abs(c):f.C.DEFAULT_INTER_TONE_GAP,this._tones?this._tones+=e:(this._tones=e,function e(){var t=this;var n=void 0;if(this._status===F.STATUS_TERMINATED||!this._tones||o>=this._tones.length)return void(this._tones=null);var r=this._tones[o];o+=1;if(","===r)n=2e3;else{var i=new f(this);a.eventHandlers={onFailed:function(){t._tones=null}},i.send(r,a),n=s+c}setTimeout(e.bind(this),n)}.call(this))}},{key:"sendInfo",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(N("sendInfo()"),this._status!==F.STATUS_CONFIRMED&&this._status!==F.STATUS_WAITING_FOR_ACK)throw new O.InvalidStateError(this._status);new d(this).send(e,t,n)}},{key:"mute",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{audio:!0,video:!1};N("mute()");var t=!1,n=!1;!1===this._audioMuted&&e.audio&&(t=!0,this._audioMuted=!0,this._toogleMuteAudio(!0)),!1===this._videoMuted&&e.video&&(n=!0,this._videoMuted=!0,this._toogleMuteVideo(!0)),!0!==t&&!0!==n||this._onmute({audio:t,video:n})}},{key:"unmute",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{audio:!0,video:!0};N("unmute()");var t=!1,n=!1;!0===this._audioMuted&&e.audio&&(t=!0,(this._audioMuted=!1)===this._localHold&&this._toogleMuteAudio(!1)),!0===this._videoMuted&&e.video&&(n=!0,(this._videoMuted=!1)===this._localHold&&this._toogleMuteVideo(!1)),!0!==t&&!0!==n||this._onunmute({audio:t,video:n})}},{key:"hold",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1];if(N("hold()"),this._status!==F.STATUS_WAITING_FOR_ACK&&this._status!==F.STATUS_CONFIRMED)return!1;if(!0===this._localHold)return!1;if(!this._isReadyToReOffer())return!1;this._localHold=!0,this._onhold("local");var r={succeeded:function(){n&&n()},failed:function(){e.terminate({cause:$.causes.WEBRTC_ERROR,status_code:500,reason_phrase:"Hold Failed"})}};return t.useUpdate?this._sendUpdate({sdpOffer:!0,eventHandlers:r,extraHeaders:t.extraHeaders}):this._sendReinvite({eventHandlers:r,extraHeaders:t.extraHeaders}),!0}},{key:"unhold",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1];if(N("unhold()"),this._status!==F.STATUS_WAITING_FOR_ACK&&this._status!==F.STATUS_CONFIRMED)return!1;if(!1===this._localHold)return!1;if(!this._isReadyToReOffer())return!1;this._localHold=!1,this._onunhold("local");var r={succeeded:function(){n&&n()},failed:function(){e.terminate({cause:$.causes.WEBRTC_ERROR,status_code:500,reason_phrase:"Unhold Failed"})}};return t.useUpdate?this._sendUpdate({sdpOffer:!0,eventHandlers:r,extraHeaders:t.extraHeaders}):this._sendReinvite({eventHandlers:r,extraHeaders:t.extraHeaders}),!0}},{key:"renegotiate",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1];N("renegotiate()");var r=t.rtcOfferConstraints||null;if(this._status!==F.STATUS_WAITING_FOR_ACK&&this._status!==F.STATUS_CONFIRMED)return!1;if(!this._isReadyToReOffer())return!1;var i={succeeded:function(){n&&n()},failed:function(){e.terminate({cause:$.causes.WEBRTC_ERROR,status_code:500,reason_phrase:"Media Renegotiation Failed"})}};return this._setLocalMediaStatus(),t.useUpdate?this._sendUpdate({sdpOffer:!0,eventHandlers:i,rtcOfferConstraints:r,extraHeaders:t.extraHeaders}):this._sendReinvite({eventHandlers:i,rtcOfferConstraints:r,extraHeaders:t.extraHeaders}),!0}},{key:"refer",value:function(e,t){var n=this;N("refer()");var r=e;if(this._status!==F.STATUS_WAITING_FOR_ACK&&this._status!==F.STATUS_CONFIRMED)return!1;if(!(e=this._ua.normalizeTarget(e)))throw new TypeError("Invalid target: "+r);var i=new m(this);i.sendRefer(e,t);var a=i.id;return(this._referSubscribers[a]=i).on("requestFailed",function(){delete n._referSubscribers[a]}),i.on("accepted",function(){delete n._referSubscribers[a]}),i.on("failed",function(){delete n._referSubscribers[a]}),i}},{key:"sendRequest",value:function(e,t){return N("sendRequest()"),this._dialog.sendRequest(e,t)}},{key:"receiveRequest",value:function(e){var t=this;if(N("receiveRequest()"),e.method===$.CANCEL)this._status!==F.STATUS_WAITING_FOR_ANSWER&&this._status!==F.STATUS_ANSWERED||(this._status=F.STATUS_CANCELED,this._request.reply(487),this._failed("remote",e,$.causes.CANCELED));else switch(e.method){case $.ACK:if(this._status!==F.STATUS_WAITING_FOR_ACK)return;if(this._status=F.STATUS_CONFIRMED,clearTimeout(this._timers.ackTimer),clearTimeout(this._timers.invite2xxTimer),this._late_sdp){if(!e.body){this.terminate({cause:$.causes.MISSING_SDP,status_code:400});break}var n={originator:"remote",type:"answer",sdp:e.body};N('emit "sdp"'),this.emit("sdp",n);var r=new RTCSessionDescription({type:"answer",sdp:n.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._connection.setRemoteDescription(r)}).then(function(){t._is_confirmed||t._confirmed("remote",e)}).catch(function(e){t.terminate({cause:$.causes.BAD_MEDIA_DESCRIPTION,status_code:488}),L('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),t.emit("peerconnection:setremotedescriptionfailed",e)})}else this._is_confirmed||this._confirmed("remote",e);break;case $.BYE:this._status===F.STATUS_CONFIRMED?(e.reply(200),this._ended("remote",e,$.causes.BYE)):this._status===F.STATUS_INVITE_RECEIVED?(e.reply(200),this._request.reply(487,"BYE Received"),this._ended("remote",e,$.causes.BYE)):e.reply(403,"Wrong Status");break;case $.INVITE:this._status===F.STATUS_CONFIRMED?e.hasHeader("replaces")?this._receiveReplaces(e):this._receiveReinvite(e):e.reply(403,"Wrong Status");break;case $.INFO:if(this._status===F.STATUS_1XX_RECEIVED||this._status===F.STATUS_WAITING_FOR_ANSWER||this._status===F.STATUS_ANSWERED||this._status===F.STATUS_WAITING_FOR_ACK||this._status===F.STATUS_CONFIRMED){var i=e.getHeader("content-type");i&&i.match(/^application\/dtmf-relay/i)?new f(this).init_incoming(e):void 0!==i?new d(this).init_incoming(e):e.reply(415)}else e.reply(403,"Wrong Status");break;case $.UPDATE:this._status===F.STATUS_CONFIRMED?this._receiveUpdate(e):e.reply(403,"Wrong Status");break;case $.REFER:this._status===F.STATUS_CONFIRMED?this._receiveRefer(e):e.reply(403,"Wrong Status");break;case $.NOTIFY:this._status===F.STATUS_CONFIRMED?this._receiveNotify(e):e.reply(403,"Wrong Status");break;default:e.reply(501)}}},{key:"onTransportError",value:function(){L("onTransportError()"),this._status!==F.STATUS_TERMINATED&&this.terminate({status_code:500,reason_phrase:$.causes.CONNECTION_ERROR,cause:$.causes.CONNECTION_ERROR})}},{key:"onRequestTimeout",value:function(){L("onRequestTimeout()"),this._status!==F.STATUS_TERMINATED&&this.terminate({status_code:408,reason_phrase:$.causes.REQUEST_TIMEOUT,cause:$.causes.REQUEST_TIMEOUT})}},{key:"onDialogError",value:function(){L("onDialogError()"),this._status!==F.STATUS_TERMINATED&&this.terminate({status_code:500,reason_phrase:$.causes.DIALOG_ERROR,cause:$.causes.DIALOG_ERROR})}},{key:"newDTMF",value:function(e){N("newDTMF()"),this.emit("newDTMF",e)}},{key:"newInfo",value:function(e){N("newInfo()"),this.emit("newInfo",e)}},{key:"_isReadyToReOffer",value:function(){return this._rtcReady?this._dialog?!0!==this._dialog.uac_pending_reply&&!0!==this._dialog.uas_pending_reply||(N("_isReadyToReOffer() | there is another INVITE/UPDATE transaction in progress"),!1):(N("_isReadyToReOffer() | session not established yet"),!1):(N("_isReadyToReOffer() | internal WebRTC status not ready"),!1)}},{key:"_close",value:function(){if(N("close()"),this._status!==F.STATUS_TERMINATED){if(this._status=F.STATUS_TERMINATED,this._connection)try{this._connection.close()}catch(e){L("close() | error closing the RTCPeerConnection: %o",e)}for(var e in this._localMediaStream&&this._localMediaStreamLocallyGenerated&&(N("close() | closing local MediaStream"),R.closeMediaStream(this._localMediaStream)),this._timers)Object.prototype.hasOwnProperty.call(this._timers,e)&&clearTimeout(this._timers[e]);for(var t in clearTimeout(this._sessionTimers.timer),this._dialog&&(this._dialog.terminate(),delete this._dialog),this._earlyDialogs)Object.prototype.hasOwnProperty.call(this._earlyDialogs,t)&&(this._earlyDialogs[t].terminate(),delete this._earlyDialogs[t]);for(var n in this._referSubscribers)Object.prototype.hasOwnProperty.call(this._referSubscribers,n)&&delete this._referSubscribers[n];this._ua.destroyRTCSession(this)}}},{key:"_setInvite2xxTimer",value:function(t,n){var r=s.T1;this._timers.invite2xxTimer=setTimeout(function e(){this._status===F.STATUS_WAITING_FOR_ACK&&(t.reply(200,null,["Contact: "+this._contact],n),r<s.T2&&(r*=2)>s.T2&&(r=s.T2),this._timers.invite2xxTimer=setTimeout(e.bind(this),r))}.bind(this),r)}},{key:"_setACKTimer",value:function(){var e=this;this._timers.ackTimer=setTimeout(function(){e._status===F.STATUS_WAITING_FOR_ACK&&(N("no ACK received, terminating the session"),clearTimeout(e._timers.invite2xxTimer),e.sendRequest($.BYE),e._ended("remote",null,$.causes.NO_ACK))},s.TIMER_H)}},{key:"_createRTCConnection",value:function(e,t){var n=this;this._connection=new RTCPeerConnection(e,t),this._connection.addEventListener("iceconnectionstatechange",function(){"failed"===n._connection.iceConnectionState&&n.terminate({cause:$.causes.RTP_TIMEOUT,status_code:408,reason_phrase:$.causes.RTP_TIMEOUT})}),N('emit "peerconnection"'),this.emit("peerconnection",{peerconnection:this._connection})}},{key:"_createLocalDescription",value:function(a,e){var o=this;if(N("createLocalDescription()"),"offer"!==a&&"answer"!==a)throw new Error('createLocalDescription() | invalid type "'+a+'"');var s=this._connection;return this._rtcReady=!1,Promise.resolve().then(function(){return"offer"===a?s.createOffer(e).catch(function(e){return L('emit "peerconnection:createofferfailed" [error:%o]',e),o.emit("peerconnection:createofferfailed",e),Promise.reject(e)}):s.createAnswer(e).catch(function(e){return L('emit "peerconnection:createanswerfailed" [error:%o]',e),o.emit("peerconnection:createanswerfailed",e),Promise.reject(e)})}).then(function(e){return s.setLocalDescription(e).catch(function(e){return o._rtcReady=!0,L('emit "peerconnection:setlocaldescriptionfailed" [error:%o]',e),o.emit("peerconnection:setlocaldescriptionfailed",e),Promise.reject(e)})}).then(function(){if("complete"!==s.iceGatheringState)return new Promise(function(t){var n=!1,r=void 0,i=function(){s.removeEventListener("icecandidate",r),n=!0,o._rtcReady=!0;var e={originator:"local",type:a,sdp:s.localDescription.sdp};N('emit "sdp"'),o.emit("sdp",e),t(e.sdp)};s.addEventListener("icecandidate",r=function(e){var t=e.candidate;t?o.emit("icecandidate",{candidate:t,ready:i}):n||i()})});o._rtcReady=!0;var e={originator:"local",type:a,sdp:s.localDescription.sdp};return N('emit "sdp"'),o.emit("sdp",e),Promise.resolve(e.sdp)})}},{key:"_createDialog",value:function(e,t,n){var r="UAS"===t?e.to_tag:e.from_tag,i="UAS"===t?e.from_tag:e.to_tag,a=e.call_id+r+i,o=this._earlyDialogs[a];if(n)return!!o||((o=new c(this,e,t,c.C.STATUS_EARLY)).error?(N(o.error),this._failed("remote",e,$.causes.INTERNAL_ERROR),!1):(this._earlyDialogs[a]=o,!0));if(this._from_tag=e.from_tag,this._to_tag=e.to_tag,o)return o.update(e,t),this._dialog=o,delete this._earlyDialogs[a],!0;var s=new c(this,e,t);return s.error?(N(s.error),this._failed("remote",e,$.causes.INTERNAL_ERROR),!1):(this._dialog=s,!0)}},{key:"_receiveReinvite",value:function(i){var t=this;N("receiveReinvite()");var e=i.getHeader("Content-Type"),r={request:i,callback:void 0,reject:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};a=!0;var t=e.status_code||403,n=e.reason_phrase||"",r=R.cloneArray(e.extraHeaders);if(this._status!==F.STATUS_CONFIRMED)return!1;if(t<300||700<=t)throw new TypeError("Invalid status_code: "+t);i.reply(t,n,r)}.bind(this)},a=!1;if(this.emit("reinvite",r),!a){if(this._late_sdp=!1,!i.body)return this._late_sdp=!0,void(this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._createLocalDescription("offer",t._rtcOfferConstraints)}).then(function(e){n.call(t,e)}).catch(function(){i.reply(500)}));if("application/sdp"!==e)return N("invalid Content-Type"),void i.reply(415);this._processInDialogSdpOffer(i).then(function(e){t._status!==F.STATUS_TERMINATED&&n.call(t,e)}).catch(function(e){L(e)})}function n(e){var t=this,n=["Contact: "+this._contact];this._handleSessionTimersInIncomingRequest(i,n),this._late_sdp&&(e=this._mangleOffer(e)),i.reply(200,null,n,e,function(){t._status=F.STATUS_WAITING_FOR_ACK,t._setInvite2xxTimer(i,e),t._setACKTimer()}),"function"==typeof r.callback&&r.callback()}}},{key:"_receiveUpdate",value:function(i){var t=this;N("receiveUpdate()");var e=i.getHeader("Content-Type"),n={request:i,callback:void 0,reject:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};a=!0;var t=e.status_code||403,n=e.reason_phrase||"",r=R.cloneArray(e.extraHeaders);if(this._status!==F.STATUS_CONFIRMED)return!1;if(t<300||700<=t)throw new TypeError("Invalid status_code: "+t);i.reply(t,n,r)}.bind(this)},a=!1;if(this.emit("update",n),!a)if(i.body){if("application/sdp"!==e)return N("invalid Content-Type"),void i.reply(415);this._processInDialogSdpOffer(i).then(function(e){t._status!==F.STATUS_TERMINATED&&r.call(t,e)}).catch(function(e){L(e)})}else r.call(this,null);function r(e){var t=["Contact: "+this._contact];this._handleSessionTimersInIncomingRequest(i,t),i.reply(200,null,t,e),"function"==typeof n.callback&&n.callback()}}},{key:"_processInDialogSdpOffer",value:function(t){var n=this;N("_processInDialogSdpOffer()");var e=t.parseSDP(),r=!1,i=!0,a=!1,o=void 0;try{for(var s,c=e.media[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var l=s.value;if(-1!==y.indexOf(l.type)){var u=l.direction||e.direction||"sendrecv";if("sendonly"!==u&&"inactive"!==u){r=!1;break}r=!0}}}catch(e){a=!0,o=e}finally{try{!i&&c.return&&c.return()}finally{if(a)throw o}}var f={originator:"remote",type:"offer",sdp:t.body};N('emit "sdp"'),this.emit("sdp",f);var d=new RTCSessionDescription({type:"offer",sdp:f.sdp});return this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){if(n._status===F.STATUS_TERMINATED)throw new Error("terminated");return n._connection.setRemoteDescription(d).catch(function(e){throw t.reply(488),L('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),n.emit("peerconnection:setremotedescriptionfailed",e),new Error("peerconnection.setRemoteDescription() failed")})}).then(function(){if(n._status===F.STATUS_TERMINATED)throw new Error("terminated");!0===n._remoteHold&&!1===r?(n._remoteHold=!1,n._onunhold("remote")):!1===n._remoteHold&&!0===r&&(n._remoteHold=!0,n._onhold("remote"))}).then(function(){if(n._status===F.STATUS_TERMINATED)throw new Error("terminated");return n._createLocalDescription("answer",n._rtcAnswerConstraints).catch(function(){throw t.reply(500),new Error("_createLocalDescription() failed")})}),this._connectionPromiseQueue}},{key:"_receiveRefer",value:function(i){var n=this;if(N("receiveRefer()"),void 0===r(i.refer_to))return N("no Refer-To header field present in REFER"),void i.reply(400);if(i.refer_to.uri.scheme!==$.SIP)return N("Refer-To header field points to a non-SIP URI scheme"),void i.reply(416);i.reply(202);var a=new h(this,i.cseq);N('emit "refer"'),this.emit("refer",{request:i,accept:function(e,t){(function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(e="function"==typeof e?e:null,this._status!==F.STATUS_WAITING_FOR_ACK&&this._status!==F.STATUS_CONFIRMED)return!1;var n=new o(this._ua);if(n.on("progress",function(e){var t=e.response;a.notify(t.status_code,t.reason_phrase)}),n.on("accepted",function(e){var t=e.response;a.notify(t.status_code,t.reason_phrase)}),n.on("failed",function(e){var t=e.message,n=e.cause;t?a.notify(t.status_code,t.reason_phrase):a.notify(487,n)}),i.refer_to.uri.hasHeader("replaces")){var r=decodeURIComponent(i.refer_to.uri.getHeader("replaces"));t.extraHeaders=R.cloneArray(t.extraHeaders),t.extraHeaders.push("Replaces: "+r)}n.connect(i.refer_to.uri.toAor(),t,e)}).call(n,e,t)},reject:function(){(function(){a.notify(603)}).call(n)}})}},{key:"_receiveNotify",value:function(e){switch(N("receiveNotify()"),void 0===r(e.event)&&e.reply(400),e.event.event){case"refer":var t=void 0,n=void 0;if(e.event.params&&e.event.params.id)t=e.event.params.id,n=this._referSubscribers[t];else{if(1!==Object.keys(this._referSubscribers).length)return void e.reply(400,"Missing event id parameter");n=this._referSubscribers[Object.keys(this._referSubscribers)[0]]}if(!n)return void e.reply(481,"Subscription does not exist");n.receiveNotify(e),e.reply(200);break;default:e.reply(489)}}},{key:"_receiveReplaces",value:function(r){var t=this;N("receiveReplaces()"),this.emit("replaces",{request:r,accept:function(e){(function(e){var t=this;if(this._status!==F.STATUS_WAITING_FOR_ACK&&this._status!==F.STATUS_CONFIRMED)return!1;var n=new o(this._ua);n.on("confirmed",function(){t.terminate()}),n.init_incoming(r,e)}).call(t,e)},reject:function(){(function(){N("Replaced INVITE rejected by the user"),r.reply(486)}).call(t)}})}},{key:"_sendInitialRequest",value:function(e,t,n){var r=this,i=new u(this._ua,this._request,{onRequestTimeout:function(){r.onRequestTimeout()},onTransportError:function(){r.onTransportError()},onAuthenticated:function(e){r._request=e},onReceiveResponse:function(e){r._receiveInviteResponse(e)}});Promise.resolve().then(function(){return n||(e.audio||e.video?(r._localMediaStreamLocallyGenerated=!0,navigator.mediaDevices.getUserMedia(e).catch(function(e){if(r._status===F.STATUS_TERMINATED)throw new Error("terminated");throw r._failed("local",null,$.causes.USER_DENIED_MEDIA_ACCESS),L('emit "getusermediafailed" [error:%o]',e),r.emit("getusermediafailed"),e})):void 0)}).then(function(e){if(r._status===F.STATUS_TERMINATED)throw new Error("terminated");return(r._localMediaStream=e)&&r._connection.addStream(e),r._connecting(r._request),r._createLocalDescription("offer",t).catch(function(e){throw r._failed("local",null,$.causes.WEBRTC_ERROR),e})}).then(function(e){if(r._is_canceled||r._status===F.STATUS_TERMINATED)throw new Error("terminated");r._request.body=e,r._status=F.STATUS_INVITE_SENT,N('emit "sending" [request:%o]',r._request),r.emit("sending",{request:r._request}),i.send()}).catch(function(e){r._status!==F.STATUS_TERMINATED&&L(e)})}},{key:"_receiveInviteResponse",value:function(t){var n=this;if(N("receiveInviteResponse()"),this._dialog&&200<=t.status_code&&t.status_code<=299){if(this._dialog.id.call_id===t.call_id&&this._dialog.id.local_tag===t.from_tag&&this._dialog.id.remote_tag===t.to_tag)return void this.sendRequest($.ACK);var e=new c(this,t,"UAC");return void 0!==e.error?void N(e.error):(this.sendRequest($.ACK),void this.sendRequest($.BYE))}if(this._is_canceled)100<=t.status_code&&t.status_code<200?this._request.cancel(this._cancel_reason):200<=t.status_code&&t.status_code<299&&this._acceptAndTerminate(t);else if(this._status===F.STATUS_INVITE_SENT||this._status===F.STATUS_1XX_RECEIVED)switch(!0){case/^100$/.test(t.status_code):this._status=F.STATUS_1XX_RECEIVED;break;case/^1[0-9]{2}$/.test(t.status_code):if(!t.to_tag){N("1xx response received without to tag");break}if(t.hasHeader("contact")&&!this._createDialog(t,"UAC",!0))break;if(this._status=F.STATUS_1XX_RECEIVED,this._progress("remote",t),!t.body)break;var r={originator:"remote",type:"answer",sdp:t.body};N('emit "sdp"'),this.emit("sdp",r);var i=new RTCSessionDescription({type:"answer",sdp:r.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return n._connection.setRemoteDescription(i)}).catch(function(e){L('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),n.emit("peerconnection:setremotedescriptionfailed",e)});break;case/^2[0-9]{2}$/.test(t.status_code):if(this._status=F.STATUS_CONFIRMED,!t.body){this._acceptAndTerminate(t,400,$.causes.MISSING_SDP),this._failed("remote",t,$.causes.BAD_MEDIA_DESCRIPTION);break}if(!this._createDialog(t,"UAC"))break;var a={originator:"remote",type:"answer",sdp:t.body};N('emit "sdp"'),this.emit("sdp",a);var o=new RTCSessionDescription({type:"answer",sdp:a.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){if("stable"===n._connection.signalingState)return n._connection.createOffer().then(function(e){return n._connection.setLocalDescription(e)}).catch(function(e){n._acceptAndTerminate(t,500,e.toString()),n._failed("local",t,$.causes.WEBRTC_ERROR)})}).then(function(){n._connection.setRemoteDescription(o).then(function(){n._handleSessionTimersInIncomingResponse(t),n._accepted("remote",t),n.sendRequest($.ACK),n._confirmed("local",null)}).catch(function(e){n._acceptAndTerminate(t,488,"Not Acceptable Here"),n._failed("remote",t,$.causes.BAD_MEDIA_DESCRIPTION),L('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),n.emit("peerconnection:setremotedescriptionfailed",e)})});break;default:var s=R.sipErrorCause(t.status_code);this._failed("remote",t,s)}}},{key:"_sendReinvite",value:function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};N("sendReinvite()");var n=R.cloneArray(e.extraHeaders),i=e.eventHandlers||{},r=e.rtcOfferConstraints||this._rtcOfferConstraints||null,a=!1;function o(e){i.failed&&i.failed(e)}n.push("Contact: "+this._contact),n.push("Content-Type: application/sdp"),this._sessionTimers.running&&n.push("Session-Expires: "+this._sessionTimers.currentExpires+";refresher="+(this._sessionTimers.refresher?"uac":"uas")),this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._createLocalDescription("offer",r)}).then(function(e){e=t._mangleOffer(e),t.sendRequest($.INVITE,{extraHeaders:n,body:e,eventHandlers:{onSuccessResponse:function(e){(function(e){var t=this;if(this._status===F.STATUS_TERMINATED)return;if(this.sendRequest($.ACK),a)return;{if(this._handleSessionTimersInIncomingResponse(e),!e.body)return void o.call(this);if("application/sdp"!==e.getHeader("Content-Type"))return void o.call(this)}var n={originator:"remote",type:"answer",sdp:e.body};N('emit "sdp"'),this.emit("sdp",n);var r=new RTCSessionDescription({type:"answer",sdp:n.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._connection.setRemoteDescription(r)}).then(function(){i.succeeded&&i.succeeded(e)}).catch(function(e){o.call(t),L('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),t.emit("peerconnection:setremotedescriptionfailed",e)})}).call(t,e),a=!0},onErrorResponse:function(e){o.call(t,e)},onTransportError:function(){t.onTransportError()},onRequestTimeout:function(){t.onRequestTimeout()},onDialogError:function(){t.onDialogError()}}})}).catch(function(){o()})}},{key:"_sendUpdate",value:function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};N("sendUpdate()");var n=R.cloneArray(e.extraHeaders),i=e.eventHandlers||{},r=e.rtcOfferConstraints||this._rtcOfferConstraints||null,a=e.sdpOffer||!1,o=!1;function s(e){var t=this;if(this._status!==F.STATUS_TERMINATED&&!o)if(this._handleSessionTimersInIncomingResponse(e),a){if(!e.body)return void c.call(this);if("application/sdp"!==e.getHeader("Content-Type"))return void c.call(this);var n={originator:"remote",type:"answer",sdp:e.body};N('emit "sdp"'),this.emit("sdp",n);var r=new RTCSessionDescription({type:"answer",sdp:n.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._connection.setRemoteDescription(r)}).then(function(){i.succeeded&&i.succeeded(e)}).catch(function(e){c.call(t),L('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),t.emit("peerconnection:setremotedescriptionfailed",e)})}else i.succeeded&&i.succeeded(e)}function c(e){i.failed&&i.failed(e)}n.push("Contact: "+this._contact),this._sessionTimers.running&&n.push("Session-Expires: "+this._sessionTimers.currentExpires+";refresher="+(this._sessionTimers.refresher?"uac":"uas")),a?(n.push("Content-Type: application/sdp"),this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._createLocalDescription("offer",r)}).then(function(e){e=t._mangleOffer(e),t.sendRequest($.UPDATE,{extraHeaders:n,body:e,eventHandlers:{onSuccessResponse:function(e){s.call(t,e),o=!0},onErrorResponse:function(e){c.call(t,e)},onTransportError:function(){t.onTransportError()},onRequestTimeout:function(){t.onRequestTimeout()},onDialogError:function(){t.onDialogError()}}})}).catch(function(){c.call(t)})):this.sendRequest($.UPDATE,{extraHeaders:n,eventHandlers:{onSuccessResponse:function(e){s.call(t,e)},onErrorResponse:function(e){c.call(t,e)},onTransportError:function(){t.onTransportError()},onRequestTimeout:function(){t.onRequestTimeout()},onDialogError:function(){t.onDialogError()}}})}},{key:"_acceptAndTerminate",value:function(e,t,n){N("acceptAndTerminate()");var r=[];t&&(n=n||$.REASON_PHRASE[t]||"",r.push("Reason: SIP ;cause="+t+'; text="'+n+'"')),(this._dialog||this._createDialog(e,"UAC"))&&(this.sendRequest($.ACK),this.sendRequest($.BYE,{extraHeaders:r})),this._status=F.STATUS_TERMINATED}},{key:"_mangleOffer",value:function(e){if(!this._localHold&&!this._remoteHold)return e;if(e=v.parse(e),this._localHold&&!this._remoteHold){N("mangleOffer() | me on hold, mangling offer");var t=!0,n=!1,r=void 0;try{for(var i,a=e.media[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var o=i.value;-1!==y.indexOf(o.type)&&(o.direction?"sendrecv"===o.direction?o.direction="sendonly":"recvonly"===o.direction&&(o.direction="inactive"):o.direction="sendonly")}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}}else if(this._localHold&&this._remoteHold){N("mangleOffer() | both on hold, mangling offer");var s=!0,c=!1,l=void 0;try{for(var u,f=e.media[Symbol.iterator]();!(s=(u=f.next()).done);s=!0){var d=u.value;-1!==y.indexOf(d.type)&&(d.direction="inactive")}}catch(e){c=!0,l=e}finally{try{!s&&f.return&&f.return()}finally{if(c)throw l}}}else if(this._remoteHold){N("mangleOffer() | remote on hold, mangling offer");var h=!0,p=!1,m=void 0;try{for(var g,_=e.media[Symbol.iterator]();!(h=(g=_.next()).done);h=!0){var b=g.value;-1!==y.indexOf(b.type)&&(b.direction?"sendrecv"===b.direction?b.direction="recvonly":"recvonly"===b.direction&&(b.direction="inactive"):b.direction="recvonly")}}catch(e){p=!0,m=e}finally{try{!h&&_.return&&_.return()}finally{if(p)throw m}}}return v.write(e)}},{key:"_setLocalMediaStatus",value:function(){var e=!0,t=!0;(this._localHold||this._remoteHold)&&(t=e=!1),this._audioMuted&&(e=!1),this._videoMuted&&(t=!1),this._toogleMuteAudio(!e),this._toogleMuteVideo(!t)}},{key:"_handleSessionTimersInIncomingRequest",value:function(e,t){if(this._sessionTimers.enabled){var n=void 0;n=e.session_expires&&e.session_expires>=$.MIN_SESSION_EXPIRES?(this._sessionTimers.currentExpires=e.session_expires,e.session_expires_refresher||"uas"):(this._sessionTimers.currentExpires=this._sessionTimers.defaultExpires,"uas"),t.push("Session-Expires: "+this._sessionTimers.currentExpires+";refresher="+n),this._sessionTimers.refresher="uas"===n,this._runSessionTimer()}}},{key:"_handleSessionTimersInIncomingResponse",value:function(e){if(this._sessionTimers.enabled){var t=void 0;t=e.session_expires&&e.session_expires>=$.MIN_SESSION_EXPIRES?(this._sessionTimers.currentExpires=e.session_expires,e.session_expires_refresher||"uac"):(this._sessionTimers.currentExpires=this._sessionTimers.defaultExpires,"uac"),this._sessionTimers.refresher="uac"===t,this._runSessionTimer()}}},{key:"_runSessionTimer",value:function(){var e=this,t=this._sessionTimers.currentExpires;this._sessionTimers.running=!0,clearTimeout(this._sessionTimers.timer),this._sessionTimers.refresher?this._sessionTimers.timer=setTimeout(function(){e._status!==F.STATUS_TERMINATED&&(N("runSessionTimer() | sending session refresh request"),e._sessionTimers.refreshMethod===$.UPDATE?e._sendUpdate():e._sendReinvite())},500*t):this._sessionTimers.timer=setTimeout(function(){e._status!==F.STATUS_TERMINATED&&(L("runSessionTimer() | timer expired, terminating the session"),e.terminate({cause:$.causes.REQUEST_TIMEOUT,status_code:408,reason_phrase:"Session Timer Expired"}))},1100*t)}},{key:"_toogleMuteAudio",value:function(e){var t=this._connection.getLocalStreams(),n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value.getAudioTracks(),c=!0,l=!1,u=void 0;try{for(var f,d=s[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){f.value.enabled=!e}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}}},{key:"_toogleMuteVideo",value:function(e){var t=this._connection.getLocalStreams(),n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value.getVideoTracks(),c=!0,l=!1,u=void 0;try{for(var f,d=s[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){f.value.enabled=!e}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}}},{key:"_newRTCSession",value:function(e,t){N("newRTCSession()"),this._ua.newRTCSession(this,{originator:e,session:this,request:t})}},{key:"_connecting",value:function(e){N("session connecting"),N('emit "connecting"'),this.emit("connecting",{request:e})}},{key:"_progress",value:function(e,t){N("session progress"),N('emit "progress"'),this.emit("progress",{originator:e,response:t||null})}},{key:"_accepted",value:function(e,t){N("session accepted"),this._start_time=new Date,N('emit "accepted"'),this.emit("accepted",{originator:e,response:t||null})}},{key:"_confirmed",value:function(e,t){N("session confirmed"),this._is_confirmed=!0,N('emit "confirmed"'),this.emit("confirmed",{originator:e,ack:t||null})}},{key:"_ended",value:function(e,t,n){N("session ended"),this._end_time=new Date,this._close(),N('emit "ended"'),this.emit("ended",{originator:e,message:t||null,cause:n})}},{key:"_failed",value:function(e,t,n){N("session failed"),this._close(),N('emit "failed"'),this.emit("failed",{originator:e,message:t||null,cause:n})}},{key:"_onhold",value:function(e){N("session onhold"),this._setLocalMediaStatus(),N('emit "hold"'),this.emit("hold",{originator:e})}},{key:"_onunhold",value:function(e){N("session onunhold"),this._setLocalMediaStatus(),N('emit "unhold"'),this.emit("unhold",{originator:e})}},{key:"_onmute",value:function(e){var t=e.audio,n=e.video;N("session onmute"),this._setLocalMediaStatus(),N('emit "muted"'),this.emit("muted",{audio:t,video:n})}},{key:"_onunmute",value:function(e){var t=e.audio,n=e.video;N("session onunmute"),this._setLocalMediaStatus(),N('emit "unmuted"'),this.emit("unmuted",{audio:t,video:n})}},{key:"C",get:function(){return F}},{key:"causes",get:function(){return $.causes}},{key:"id",get:function(){return this._id}},{key:"connection",get:function(){return this._connection}},{key:"contact",get:function(){return this._contact}},{key:"direction",get:function(){return this._direction}},{key:"local_identity",get:function(){return this._local_identity}},{key:"remote_identity",get:function(){return this._remote_identity}},{key:"start_time",get:function(){return this._start_time}},{key:"end_time",get:function(){return this._end_time}},{key:"data",get:function(){return this._data},set:function(e){this._data=e}},{key:"status",get:function(){return this._status}}]),o}()},{"./Constants":2,"./Dialog":3,"./Exceptions":6,"./RTCSession/DTMF":13,"./RTCSession/Info":14,"./RTCSession/ReferNotifier":15,"./RTCSession/ReferSubscriber":16,"./RequestSender":18,"./SIPMessage":19,"./Timers":21,"./Transactions":22,"./Utils":26,debug:29,events:31,"sdp-transform":36}],13:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var i=e("events").EventEmitter,a=e("../Constants"),o=e("../Exceptions"),s=e("../Utils"),c=e("debug")("JsSIP:RTCSession:DTMF");e("debug")("JsSIP:ERROR:RTCSession:DTMF").log=console.warn.bind(console);var l={MIN_DURATION:70,MAX_DURATION:6e3,DEFAULT_DURATION:100,MIN_INTER_TONE_GAP:50,DEFAULT_INTER_TONE_GAP:500};t.exports=function(e){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t._session=e,t._direction=null,t._tone=null,t._duration=null,t._request=null,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,i),r(n,[{key:"send",value:function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(void 0===e)throw new TypeError("Not enough arguments");if(this._direction="outgoing",this._session.status!==this._session.C.STATUS_CONFIRMED&&this._session.status!==this._session.C.STATUS_WAITING_FOR_ACK)throw new o.InvalidStateError(this._session.status);var r=s.cloneArray(n.extraHeaders);if(this.eventHandlers=n.eventHandlers||{},"string"==typeof e)e=e.toUpperCase();else{if("number"!=typeof e)throw new TypeError("Invalid tone: "+e);e=e.toString()}if(!e.match(/^[0-9A-DR#*]$/))throw new TypeError("Invalid tone: "+e);this._tone=e,this._duration=n.duration,r.push("Content-Type: application/dtmf-relay");var i="Signal="+this._tone+"\r\n";i+="Duration="+this._duration,this._session.newDTMF({originator:"local",dtmf:this,request:this._request}),this._session.sendRequest(a.INFO,{extraHeaders:r,eventHandlers:{onSuccessResponse:function(e){t.emit("succeeded",{originator:"remote",response:e})},onErrorResponse:function(e){t.eventHandlers.onFailed&&t.eventHandlers.onFailed(),t.emit("failed",{originator:"remote",response:e})},onRequestTimeout:function(){t._session.onRequestTimeout()},onTransportError:function(){t._session.onTransportError()},onDialogError:function(){t._session.onDialogError()}},body:i})}},{key:"init_incoming",value:function(e){var t=/^(Signal\s*?=\s*?)([0-9A-D#*]{1})(\s)?.*/,n=/^(Duration\s?=\s?)([0-9]{1,4})(\s)?.*/;if(this._direction="incoming",(this._request=e).reply(200),e.body){var r=e.body.split("\n");1<=r.length&&t.test(r[0])&&(this._tone=r[0].replace(t,"$2")),2<=r.length&&n.test(r[1])&&(this._duration=parseInt(r[1].replace(n,"$2"),10))}this._duration||(this._duration=l.DEFAULT_DURATION),this._tone?this._session.newDTMF({originator:"remote",dtmf:this,request:e}):c("invalid INFO DTMF received, discarded")}},{key:"tone",get:function(){return this._tone}},{key:"duration",get:function(){return this._duration}}]),n}(),t.exports.C=l},{"../Constants":2,"../Exceptions":6,"../Utils":26,debug:29,events:31}],14:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var i=e("events").EventEmitter;e("debug")("JsSIP:ERROR:RTCSession:Info").log=console.warn.bind(console);var a=e("../Constants"),o=e("../Exceptions"),s=e("../Utils");t.exports=function(e){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t._session=e,t._direction=null,t._contentType=null,t._body=null,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,i),r(n,[{key:"send",value:function(e,t){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(this._direction="outgoing",void 0===e)throw new TypeError("Not enough arguments");if(this._session.status!==this._session.C.STATUS_CONFIRMED&&this._session.status!==this._session.C.STATUS_WAITING_FOR_ACK)throw new o.InvalidStateError(this._session.status);this._contentType=e,this._body=t;var i=s.cloneArray(r.extraHeaders);i.push("Content-Type: "+e),this._session.newInfo({originator:"local",info:this,request:this.request}),this._session.sendRequest(a.INFO,{extraHeaders:i,eventHandlers:{onSuccessResponse:function(e){n.emit("succeeded",{originator:"remote",response:e})},onErrorResponse:function(e){n.emit("failed",{originator:"remote",response:e})},onTransportError:function(){n._session.onTransportError()},onRequestTimeout:function(){n._session.onRequestTimeout()},onDialogError:function(){n._session.onDialogError()}},body:t})}},{key:"init_incoming",value:function(e){this._direction="incoming",(this.request=e).reply(200),this._contentType=e.getHeader("content-type"),this._body=e.body,this._session.newInfo({originator:"remote",info:this,request:e})}},{key:"contentType",get:function(){return this._contentType}},{key:"body",get:function(){return this._body}}]),n}()},{"../Constants":2,"../Exceptions":6,"../Utils":26,debug:29,events:31}],15:[function(e,t,n){"use strict";var i=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var a=e("../Constants"),o=e("debug")("JsSIP:RTCSession:ReferNotifier"),s="refer",c="message/sipfrag;version=2.0",l=300;t.exports=function(){function r(e,t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),this._session=e,this._id=t,this._expires=n||l,this._active=!0,this.notify(100)}return i(r,[{key:"notify",value:function(e,t){if(o("notify()"),!1!==this._active){t=t||a.REASON_PHRASE[e]||"";var n=void 0;n=200<=e?"terminated;reason=noresource":"active;expires="+this._expires,this._session.sendRequest(a.NOTIFY,{extraHeaders:["Event: "+s+";id="+this._id,"Subscription-State: "+n,"Content-Type: "+c],body:"SIP/2.0 "+e+" "+t,eventHandlers:{onErrorResponse:function(){this._active=!1}}})}}}]),r}()},{"../Constants":2,debug:29}],16:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var i=e("events").EventEmitter,l=e("../Constants"),a=e("../Grammar"),u=e("../Utils"),f=e("debug")("JsSIP:RTCSession:ReferSubscriber");t.exports=function(e){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t._id=null,t._session=e,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,i),r(n,[{key:"sendRefer",value:function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};f("sendRefer()");var r=u.cloneArray(n.extraHeaders),i=n.eventHandlers||{};for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&this.on(a,i[a]);var o=null;n.replaces&&(o=n.replaces._request.call_id,o+=";to-tag="+n.replaces._to_tag,o+=";from-tag="+n.replaces._from_tag,o=encodeURIComponent(o));var s="Refer-To: <"+e+(o?"?Replaces="+o:"")+">";r.push(s),r.push("Contact: "+this._session.contact);var c=this._session.sendRequest(l.REFER,{extraHeaders:r,eventHandlers:{onSuccessResponse:function(e){t._requestSucceeded(e)},onErrorResponse:function(e){t._requestFailed(e,l.causes.REJECTED)},onTransportError:function(){t._requestFailed(null,l.causes.CONNECTION_ERROR)},onRequestTimeout:function(){t._requestFailed(null,l.causes.REQUEST_TIMEOUT)},onDialogError:function(){t._requestFailed(null,l.causes.DIALOG_ERROR)}}});this._id=c.cseq}},{key:"receiveNotify",value:function(e){if(f("receiveNotify()"),e.body){var t=a.parse(e.body.trim(),"Status_Line");if(-1!==t)switch(!0){case/^100$/.test(t.status_code):this.emit("trying",{request:e,status_line:t});break;case/^1[0-9]{2}$/.test(t.status_code):this.emit("progress",{request:e,status_line:t});break;case/^2[0-9]{2}$/.test(t.status_code):this.emit("accepted",{request:e,status_line:t});break;default:this.emit("failed",{request:e,status_line:t})}else f('receiveNotify() | error parsing NOTIFY body: "'+e.body+'"')}}},{key:"_requestSucceeded",value:function(e){f("REFER succeeded"),f('emit "requestSucceeded"'),this.emit("requestSucceeded",{response:e})}},{key:"_requestFailed",value:function(e,t){f("REFER failed"),f('emit "requestFailed"'),this.emit("requestFailed",{response:e||null,cause:t})}},{key:"id",get:function(){return this._id}}]),n}()},{"../Constants":2,"../Grammar":7,"../Utils":26,debug:29,events:31}],17:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var o=e("./Utils"),s=e("./Constants"),i=e("./SIPMessage"),c=e("./RequestSender"),l=e("debug")("JsSIP:Registrator");t.exports=function(){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);this._ua=e,this._transport=t,this._registrar=e.configuration.registrar_server,this._expires=e.configuration.register_expires,this._call_id=o.createRandomToken(22),this._cseq=0,this._to_uri=e.configuration.uri,this._registrationTimer=null,this._registering=!1,this._registered=!1,this._contact=this._ua.contact.toString(),this._contact+=";+sip.ice",this._extraHeaders=[],this._extraContactParams="",this._contact+=";reg-id=1",this._contact+=';+sip.instance="<urn:uuid:'+this._ua.configuration.instance_id+'>"'}return r(n,[{key:"setExtraHeaders",value:function(e){Array.isArray(e)||(e=[]),this._extraHeaders=e.slice()}},{key:"setExtraContactParams",value:function(e){for(var t in e instanceof Object||(e={}),this._extraContactParams="",e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];this._extraContactParams+=";"+t,n&&(this._extraContactParams+="="+n)}}},{key:"register",value:function(){var a=this;if(this._registering)l("Register request in progress...");else{var e=this._extraHeaders.slice();e.push("Contact: "+this._contact+";expires="+this._expires+this._extraContactParams),e.push("Expires: "+this._expires);var t=new i.OutgoingRequest(s.REGISTER,this._registrar,this._ua,{to_uri:this._to_uri,call_id:this._call_id,cseq:this._cseq+=1},e),n=new c(this._ua,t,{onRequestTimeout:function(){a._registrationFailure(null,s.causes.REQUEST_TIMEOUT)},onTransportError:function(){a._registrationFailure(null,s.causes.CONNECTION_ERROR)},onAuthenticated:function(){a._cseq+=1},onReceiveResponse:function(e){var t=void 0,n=void 0,r=e.getHeaders("contact").length;if(e.cseq===a._cseq)switch(null!==a._registrationTimer&&(clearTimeout(a._registrationTimer),a._registrationTimer=null),!0){case/^1[0-9]{2}$/.test(e.status_code):break;case/^2[0-9]{2}$/.test(e.status_code):if(a._registering=!1,!r){l("no Contact header in response to REGISTER, response ignored");break}for(;r--;){if((t=e.parseHeader("contact",r)).uri.user===a._ua.contact.uri.user){n=t.getParam("expires");break}t=null}if(!t){l("no Contact header pointing to us, response ignored");break}!n&&e.hasHeader("expires")&&(n=e.getHeader("expires")),n||(n=a._expires),(n=Number(n))<10&&(n=10),a._registrationTimer=setTimeout(function(){a._registrationTimer=null,0===a._ua.listeners("registrationExpiring").length?a.register():a._ua.emit("registrationExpiring")},1e3*n-5e3),t.hasParam("temp-gruu")&&(a._ua.contact.temp_gruu=t.getParam("temp-gruu").replace(/"/g,"")),t.hasParam("pub-gruu")&&(a._ua.contact.pub_gruu=t.getParam("pub-gruu").replace(/"/g,"")),a._registered||(a._registered=!0,a._ua.registered({response:e}));break;case/^423$/.test(e.status_code):e.hasHeader("min-expires")?(a._expires=Number(e.getHeader("min-expires")),a._expires<10&&(a._expires=10),a.register()):(l("423 response received for REGISTER without Min-Expires"),a._registrationFailure(e,s.causes.SIP_FAILURE_CODE));break;default:var i=o.sipErrorCause(e.status_code);a._registrationFailure(e,i)}}});this._registering=!0,n.send()}}},{key:"unregister",value:function(){var n=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(this._registered){this._registered=!1,null!==this._registrationTimer&&(clearTimeout(this._registrationTimer),this._registrationTimer=null);var t=this._extraHeaders.slice();e.all?t.push("Contact: *"+this._extraContactParams):t.push("Contact: "+this._contact+";expires=0"+this._extraContactParams),t.push("Expires: 0");var r=new i.OutgoingRequest(s.REGISTER,this._registrar,this._ua,{to_uri:this._to_uri,call_id:this._call_id,cseq:this._cseq+=1},t);new c(this._ua,r,{onRequestTimeout:function(){n._unregistered(null,s.causes.REQUEST_TIMEOUT)},onTransportError:function(){n._unregistered(null,s.causes.CONNECTION_ERROR)},onAuthenticated:function(){n._cseq+=1},onReceiveResponse:function(e){switch(!0){case/^1[0-9]{2}$/.test(e.status_code):break;case/^2[0-9]{2}$/.test(e.status_code):n._unregistered(e);break;default:var t=o.sipErrorCause(e.status_code);n._unregistered(e,t)}}}).send()}else l("already unregistered")}},{key:"close",value:function(){this._registered&&this.unregister()}},{key:"onTransportClosed",value:function(){this._registering=!1,null!==this._registrationTimer&&(clearTimeout(this._registrationTimer),this._registrationTimer=null),this._registered&&(this._registered=!1,this._ua.unregistered({}))}},{key:"_registrationFailure",value:function(e,t){this._registering=!1,this._ua.registrationFailed({response:e||null,cause:t}),this._registered&&(this._registered=!1,this._ua.unregistered({response:e||null,cause:t}))}},{key:"_unregistered",value:function(e,t){this._registering=!1,this._registered=!1,this._ua.unregistered({response:e||null,cause:t||null})}},{key:"registered",get:function(){return this._registered}}]),n}()},{"./Constants":2,"./RequestSender":18,"./SIPMessage":19,"./Utils":26,debug:29}],18:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var a=e("./Constants"),o=e("./DigestAuthentication"),s=e("./Transactions"),c=e("debug")("JsSIP:RequestSender"),l={onRequestTimeout:function(){},onTransportError:function(){},onReceiveResponse:function(){},onAuthenticated:function(){}};t.exports=function(){function i(e,t,n){for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this._ua=e,this._eventHandlers=n,this._method=t.method,this._request=t,this._auth=null,this._challenged=!1,this._staled=!1,l)Object.prototype.hasOwnProperty.call(l,r)&&(this._eventHandlers[r]||(this._eventHandlers[r]=l[r]));e.status!==e.C.STATUS_USER_CLOSED||this._method===a.BYE&&this._method===a.ACK||this._eventHandlers.onTransportError()}return r(i,[{key:"send",value:function(){var t=this,e={onRequestTimeout:function(){t._eventHandlers.onRequestTimeout()},onTransportError:function(){t._eventHandlers.onTransportError()},onReceiveResponse:function(e){t._receiveResponse(e)}};switch(this._method){case"INVITE":this.clientTransaction=new s.InviteClientTransaction(this._ua,this._ua.transport,this._request,e);break;case"ACK":this.clientTransaction=new s.AckClientTransaction(this._ua,this._ua.transport,this._request,e);break;default:this.clientTransaction=new s.NonInviteClientTransaction(this._ua,this._ua.transport,this._request,e)}this.clientTransaction.send()}},{key:"_receiveResponse",value:function(e){var t=void 0,n=void 0,r=e.status_code;if(401!==r&&407!==r||null===this._ua.configuration.password&&null===this._ua.configuration.ha1)this._eventHandlers.onReceiveResponse(e);else{if(n=401===e.status_code?(t=e.parseHeader("www-authenticate"),"authorization"):(t=e.parseHeader("proxy-authenticate"),"proxy-authorization"),!t)return c(e.status_code+" with wrong or missing challenge, cannot authenticate"),void this._eventHandlers.onReceiveResponse(e);if(!this._challenged||!this._staled&&!0===t.stale){if(this._auth||(this._auth=new o({username:this._ua.configuration.authorization_user,password:this._ua.configuration.password,realm:this._ua.configuration.realm,ha1:this._ua.configuration.ha1})),!this._auth.authenticate(this._request,t))return void this._eventHandlers.onReceiveResponse(e);this._challenged=!0,this._ua.set("realm",this._auth.get("realm")),this._ua.set("ha1",this._auth.get("ha1")),t.stale&&(this._staled=!0),this._request=this._request.clone(),this._request.cseq+=1,this._request.setHeader("cseq",this._request.cseq+" "+this._method),this._request.setHeader(n,this._auth.toString()),this._eventHandlers.onAuthenticated(this._request),this.send()}else this._eventHandlers.onReceiveResponse(e)}}}]),i}()},{"./Constants":2,"./DigestAuthentication":5,"./Transactions":22,debug:29}],19:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=e("sdp-transform"),x=e("./Constants"),k=e("./Utils"),d=e("./NameAddrHeader"),o=e("./Grammar"),c=e("debug")("JsSIP:SIPMessage"),l=function(){function u(e,t,n,r,i,a){if(f(this,u),!e||!t||!n)return null;r=r||{},this.ua=n,this.headers={},this.method=e,this.ruri=t,this.body=a,this.extraHeaders=k.cloneArray(i),r.route_set?this.setHeader("route",r.route_set):n.configuration.use_preloaded_route&&this.setHeader("route","<"+n.transport.sip_uri+";lr>"),this.setHeader("via",""),this.setHeader("max-forwards",x.MAX_FORWARDS);var o=r.to_display_name||0===r.to_display_name?'"'+r.to_display_name+'" ':"";o+="<"+(r.to_uri||t)+">",o+=r.to_tag?";tag="+r.to_tag:"",this.to=d.parse(o),this.setHeader("to",o);var s=void 0;s=r.from_display_name||0===r.from_display_name?'"'+r.from_display_name+'" ':n.configuration.display_name?'"'+n.configuration.display_name+'" ':"",s+="<"+(r.from_uri||n.configuration.uri)+">;tag=",s+=r.from_tag||k.newTag(),this.from=d.parse(s),this.setHeader("from",s);var c=r.call_id||n.configuration.jssip_id+k.createRandomToken(15);this.call_id=c,this.setHeader("call-id",c);var l=r.cseq||Math.floor(1e4*Math.random());this.cseq=l,this.setHeader("cseq",l+" "+e)}return r(u,[{key:"setHeader",value:function(e,t){for(var n=new RegExp("^\\s*"+e+"\\s*:","i"),r=0;r<this.extraHeaders.length;r++)n.test(this.extraHeaders[r])&&this.extraHeaders.splice(r,1);this.headers[k.headerize(e)]=Array.isArray(t)?t:[t]}},{key:"getHeader",value:function(e){var t=this.headers[k.headerize(e)];if(t){if(t[0])return t[0]}else{var n=new RegExp("^\\s*"+e+"\\s*:","i"),r=!0,i=!1,a=void 0;try{for(var o,s=this.extraHeaders[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;if(n.test(c))return c.substring(c.indexOf(":")+1).trim()}}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}}}},{key:"getHeaders",value:function(e){var t=this.headers[k.headerize(e)],n=[];if(t){var r=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;n.push(c)}}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}var l=new RegExp("^\\s*"+e+"\\s*:","i"),u=!0,f=!1,d=void 0;try{for(var h,p=this.extraHeaders[Symbol.iterator]();!(u=(h=p.next()).done);u=!0){var m=h.value;l.test(m)&&n.push(m.substring(m.indexOf(":")+1).trim())}}catch(e){f=!0,d=e}finally{try{!u&&p.return&&p.return()}finally{if(f)throw d}}return n}},{key:"hasHeader",value:function(e){if(this.headers[k.headerize(e)])return!0;var t=new RegExp("^\\s*"+e+"\\s*:","i"),n=!0,r=!1,i=void 0;try{for(var a,o=this.extraHeaders[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;if(t.test(s))return!0}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}return!1}},{key:"parseSDP",value:function(e){return!e&&this.sdp||(this.sdp=a.parse(this.body||"")),this.sdp}},{key:"toString",value:function(){var e=this.method+" "+this.ruri+" SIP/2.0\r\n";for(var t in this.headers)if(Object.prototype.hasOwnProperty.call(this.headers,t)){var n=!0,r=!1,i=void 0;try{for(var a,o=this.headers[t][Symbol.iterator]();!(n=(a=o.next()).done);n=!0){e+=t+": "+a.value+"\r\n"}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}}var s=!0,c=!1,l=void 0;try{for(var u,f=this.extraHeaders[Symbol.iterator]();!(s=(u=f.next()).done);s=!0){e+=u.value.trim()+"\r\n"}}catch(e){c=!0,l=e}finally{try{!s&&f.return&&f.return()}finally{if(c)throw l}}var d=[];switch(this.method){case x.REGISTER:d.push("path","gruu");break;case x.INVITE:this.ua.configuration.session_timers&&d.push("timer"),(this.ua.contact.pub_gruu||this.ua.contact.temp_gruu)&&d.push("gruu"),d.push("ice","replaces");break;case x.UPDATE:this.ua.configuration.session_timers&&d.push("timer"),d.push("ice")}d.push("outbound");var h=this.ua.configuration.user_agent||x.USER_AGENT;(e+="Allow: "+x.ALLOWED_METHODS+"\r\n",e+="Supported: "+d+"\r\n",e+="User-Agent: "+h+"\r\n",this.body)?(e+="Content-Length: "+k.str_utf8_length(this.body)+"\r\n\r\n",e+=this.body):e+="Content-Length: 0\r\n\r\n";return e}},{key:"clone",value:function(){var t=new u(this.method,this.ruri,this.ua);return Object.keys(this.headers).forEach(function(e){t.headers[e]=this.headers[e].slice()},this),t.body=this.body,t.extraHeaders=k.cloneArray(this.extraHeaders),t.to=this.to,t.from=this.from,t.call_id=this.call_id,t.cseq=this.cseq,t}}]),u}(),u=function(e){function o(e,t,n,r,i){f(this,o);var a=s(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,x.INVITE,e,t,n,r,i));return a.transaction=null,a}return i(o,l),r(o,[{key:"cancel",value:function(e){this.transaction.cancel(e)}},{key:"clone",value:function(){var t=new o(this.ruri,this.ua);return Object.keys(this.headers).forEach(function(e){t.headers[e]=this.headers[e].slice()},this),t.body=this.body,t.extraHeaders=k.cloneArray(this.extraHeaders),t.to=this.to,t.from=this.from,t.call_id=this.call_id,t.cseq=this.cseq,t.transaction=this.transaction,t}}]),o}(),h=function(){function e(){f(this,e),this.data=null,this.headers=null,this.method=null,this.via=null,this.via_branch=null,this.call_id=null,this.cseq=null,this.from=null,this.from_tag=null,this.to=null,this.to_tag=null,this.body=null,this.sdp=null}return r(e,[{key:"addHeader",value:function(e,t){var n={raw:t};e=k.headerize(e),this.headers[e]?this.headers[e].push(n):this.headers[e]=[n]}},{key:"getHeader",value:function(e){var t=this.headers[k.headerize(e)];if(t)return t[0]?t[0].raw:void 0}},{key:"getHeaders",value:function(e){var t=this.headers[k.headerize(e)],n=[];if(!t)return[];var r=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;n.push(c.raw)}}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}},{key:"hasHeader",value:function(e){return!!this.headers[k.headerize(e)]}},{key:"parseHeader",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;if(e=k.headerize(e),this.headers[e]){if(!(t>=this.headers[e].length)){var n=this.headers[e][t],r=n.raw;if(n.parsed)return n.parsed;var i=o.parse(r,e.replace(/-/g,"_"));return-1===i?(this.headers[e].splice(t,1),void c('error parsing "'+e+'" header field with value "'+r+'"')):n.parsed=i}c('not so many "'+e+'" headers present')}else c('header "'+e+'" not present')}},{key:"s",value:function(e,t){return this.parseHeader(e,t)}},{key:"setHeader",value:function(e,t){var n={raw:t};this.headers[k.headerize(e)]=[n]}},{key:"parseSDP",value:function(e){return!e&&this.sdp||(this.sdp=a.parse(this.body||"")),this.sdp}},{key:"toString",value:function(){return this.data}}]),e}(),p=function(e){function n(e){f(this,n);var t=s(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.ua=e,t.headers={},t.ruri=null,t.transport=null,t.server_transaction=null,t}return i(n,h),r(n,[{key:"reply",value:function(e,t,n,r,i,a){var o=[],s=this.getHeader("To");if(t=t||null,!(e=e||null)||e<100||699<e)throw new TypeError("Invalid status_code: "+e);if(t&&"string"!=typeof t&&!(t instanceof String))throw new TypeError("Invalid reason_phrase: "+t);t=t||x.REASON_PHRASE[e]||"",n=k.cloneArray(n);var c="SIP/2.0 "+e+" "+t+"\r\n";if(this.method===x.INVITE&&100<e&&e<=200){var l=this.getHeaders("record-route"),u=!0,f=!1,d=void 0;try{for(var h,p=l[Symbol.iterator]();!(u=(h=p.next()).done);u=!0){c+="Record-Route: "+h.value+"\r\n"}}catch(e){f=!0,d=e}finally{try{!u&&p.return&&p.return()}finally{if(f)throw d}}}var m=this.getHeaders("via"),g=!0,_=!1,b=void 0;try{for(var v,y=m[Symbol.iterator]();!(g=(v=y.next()).done);g=!0){c+="Via: "+v.value+"\r\n"}}catch(e){_=!0,b=e}finally{try{!g&&y.return&&y.return()}finally{if(_)throw b}}!this.to_tag&&100<e?s+=";tag="+k.newTag():this.to_tag&&!this.s("to").hasParam("tag")&&(s+=";tag="+this.to_tag),c+="To: "+s+"\r\n",c+="From: "+this.getHeader("From")+"\r\n",c+="Call-ID: "+this.call_id+"\r\n",c+="CSeq: "+this.cseq+" "+this.method+"\r\n";var w=!0,C=!1,A=void 0;try{for(var S,T=n[Symbol.iterator]();!(w=(S=T.next()).done);w=!0){c+=S.value.trim()+"\r\n"}}catch(e){C=!0,A=e}finally{try{!w&&T.return&&T.return()}finally{if(C)throw A}}switch(this.method){case x.INVITE:this.ua.configuration.session_timers&&o.push("timer"),(this.ua.contact.pub_gruu||this.ua.contact.temp_gruu)&&o.push("gruu"),o.push("ice","replaces");break;case x.UPDATE:this.ua.configuration.session_timers&&o.push("timer"),r&&o.push("ice"),o.push("replaces")}(o.push("outbound"),this.method===x.OPTIONS?(c+="Allow: "+x.ALLOWED_METHODS+"\r\n",c+="Accept: "+x.ACCEPTED_BODY_TYPES+"\r\n"):405===e?c+="Allow: "+x.ALLOWED_METHODS+"\r\n":415===e&&(c+="Accept: "+x.ACCEPTED_BODY_TYPES+"\r\n"),c+="Supported: "+o+"\r\n",r)?(c+="Content-Type: application/sdp\r\n",c+="Content-Length: "+k.str_utf8_length(r)+"\r\n\r\n",c+=r):c+="Content-Length: 0\r\n\r\n";this.server_transaction.receiveResponse(e,c,i,a)}},{key:"reply_sl",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,n=this.getHeaders("via");if(!e||e<100||699<e)throw new TypeError("Invalid status_code: "+e);if(t&&"string"!=typeof t&&!(t instanceof String))throw new TypeError("Invalid reason_phrase: "+t);var r="SIP/2.0 "+e+" "+(t=t||x.REASON_PHRASE[e]||"")+"\r\n",i=!0,a=!1,o=void 0;try{for(var s,c=n[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){r+="Via: "+s.value+"\r\n"}}catch(e){a=!0,o=e}finally{try{!i&&c.return&&c.return()}finally{if(a)throw o}}var l=this.getHeader("To");!this.to_tag&&100<e?l+=";tag="+k.newTag():this.to_tag&&!this.s("to").hasParam("tag")&&(l+=";tag="+this.to_tag),r+="To: "+l+"\r\n",r+="From: "+this.getHeader("From")+"\r\n",r+="Call-ID: "+this.call_id+"\r\n",r+="CSeq: "+this.cseq+" "+this.method+"\r\n",r+="Content-Length: 0\r\n\r\n",this.transport.send(r)}}]),n}(),m=function(e){function t(){f(this,t);var e=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.headers={},e.status_code=null,e.reason_phrase=null,e}return i(t,h),t}();t.exports={OutgoingRequest:l,InitialOutgoingInviteRequest:u,IncomingRequest:p,IncomingResponse:m}},{"./Constants":2,"./Grammar":7,"./NameAddrHeader":10,"./Utils":26,debug:29,"sdp-transform":36}],20:[function(e,t,n){"use strict";var r=e("./Utils"),i=e("./Grammar"),a=e("debug")("JsSIP:ERROR:Socket");a.log=console.warn.bind(console),n.isSocket=function(t){if(Array.isArray(t))return!1;if(void 0===t)return a("undefined JsSIP.Socket instance"),!1;try{if(!r.isString(t.url))throw a("missing or invalid JsSIP.Socket url property"),new Error;if(!r.isString(t.via_transport))throw a("missing or invalid JsSIP.Socket via_transport property"),new Error;if(-1===i.parse(t.sip_uri,"SIP_URI"))throw a("missing or invalid JsSIP.Socket sip_uri property"),new Error}catch(e){return!1}try{["connect","disconnect","send"].forEach(function(e){if(!r.isFunction(t[e]))throw a("missing or invalid JsSIP.Socket method: "+e),new Error})}catch(e){return!1}return!0}},{"./Grammar":7,"./Utils":26,debug:29}],21:[function(e,t,n){"use strict";t.exports={T1:500,T2:4e3,T4:5e3,TIMER_B:32e3,TIMER_D:0,TIMER_F:32e3,TIMER_H:32e3,TIMER_I:0,TIMER_J:0,TIMER_K:0,TIMER_L:32e3,TIMER_M:32e3,PROVISIONAL_RESPONSE_INTERVAL:6e4}},{}],22:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=e("events").EventEmitter,i=e("./Constants"),u=e("./SIPMessage"),f=e("./Timers"),d=e("debug")("JsSIP:NonInviteClientTransaction"),h=e("debug")("JsSIP:InviteClientTransaction"),p=e("debug")("JsSIP:AckClientTransaction"),o=e("debug")("JsSIP:NonInviteServerTransaction"),m=e("debug")("JsSIP:InviteServerTransaction"),g={STATUS_TRYING:1,STATUS_PROCEEDING:2,STATUS_CALLING:3,STATUS_ACCEPTED:4,STATUS_COMPLETED:5,STATUS_TERMINATED:6,STATUS_CONFIRMED:7,NON_INVITE_CLIENT:"nict",NON_INVITE_SERVER:"nist",INVITE_CLIENT:"ict",INVITE_SERVER:"ist"},_=function(e){function o(e,t,n,r){s(this,o);var i=c(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));i.type=g.NON_INVITE_CLIENT,i.id="z9hG4bK"+Math.floor(1e7*Math.random()),i.ua=e,i.transport=t,i.request=n,i.eventHandlers=r;var a="SIP/2.0/"+t.via_transport;return a+=" "+e.configuration.via_host+";branch="+i.id,i.request.setHeader("via",a),i.ua.newTransaction(i),i}return a(o,l),r(o,[{key:"stateChanged",value:function(e){this.state=e,this.emit("stateChanged")}},{key:"send",value:function(){var e=this;this.stateChanged(g.STATUS_TRYING),this.F=setTimeout(function(){e.timer_F()},f.TIMER_F),this.transport.send(this.request)||this.onTransportError()}},{key:"onTransportError",value:function(){d("transport error occurred, deleting transaction "+this.id),clearTimeout(this.F),clearTimeout(this.K),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this),this.eventHandlers.onTransportError()}},{key:"timer_F",value:function(){d("Timer F expired for transaction "+this.id),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this),this.eventHandlers.onRequestTimeout()}},{key:"timer_K",value:function(){this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"receiveResponse",value:function(e){var t=this,n=e.status_code;if(n<200)switch(this.state){case g.STATUS_TRYING:case g.STATUS_PROCEEDING:this.stateChanged(g.STATUS_PROCEEDING),this.eventHandlers.onReceiveResponse(e)}else switch(this.state){case g.STATUS_TRYING:case g.STATUS_PROCEEDING:this.stateChanged(g.STATUS_COMPLETED),clearTimeout(this.F),408===n?this.eventHandlers.onRequestTimeout():this.eventHandlers.onReceiveResponse(e),this.K=setTimeout(function(){t.timer_K()},f.TIMER_K)}}},{key:"C",get:function(){return g}}]),o}(),b=function(e){function o(e,t,n,r){s(this,o);var i=c(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));i.type=g.INVITE_CLIENT,i.id="z9hG4bK"+Math.floor(1e7*Math.random()),i.ua=e,i.transport=t,i.request=n,i.eventHandlers=r,n.transaction=i;var a="SIP/2.0/"+t.via_transport;return a+=" "+e.configuration.via_host+";branch="+i.id,i.request.setHeader("via",a),i.ua.newTransaction(i),i}return a(o,l),r(o,[{key:"stateChanged",value:function(e){this.state=e,this.emit("stateChanged")}},{key:"send",value:function(){var e=this;this.stateChanged(g.STATUS_CALLING),this.B=setTimeout(function(){e.timer_B()},f.TIMER_B),this.transport.send(this.request)||this.onTransportError()}},{key:"onTransportError",value:function(){clearTimeout(this.B),clearTimeout(this.D),clearTimeout(this.M),this.state!==g.STATUS_ACCEPTED&&(h("transport error occurred, deleting transaction "+this.id),this.eventHandlers.onTransportError()),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"timer_M",value:function(){h("Timer M expired for transaction "+this.id),this.state===g.STATUS_ACCEPTED&&(clearTimeout(this.B),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this))}},{key:"timer_B",value:function(){h("Timer B expired for transaction "+this.id),this.state===g.STATUS_CALLING&&(this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this),this.eventHandlers.onRequestTimeout())}},{key:"timer_D",value:function(){h("Timer D expired for transaction "+this.id),clearTimeout(this.B),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"sendACK",value:function(e){var t=this,n=new u.OutgoingRequest(i.ACK,this.request.ruri,this.ua,{route_set:this.request.getHeader("route"),call_id:this.request.getHeader("call-id"),cseq:this.request.cseq});n.setHeader("from",this.request.getHeader("from")),n.setHeader("via",this.request.getHeader("via")),n.setHeader("to",e.getHeader("to")),this.D=setTimeout(function(){t.timer_D()},f.TIMER_D),this.transport.send(n)}},{key:"cancel",value:function(e){if(this.state===g.STATUS_PROCEEDING){var t=new u.OutgoingRequest(i.CANCEL,this.request.ruri,this.ua,{route_set:this.request.getHeader("route"),call_id:this.request.getHeader("call-id"),cseq:this.request.cseq});t.setHeader("from",this.request.getHeader("from")),t.setHeader("via",this.request.getHeader("via")),t.setHeader("to",this.request.getHeader("to")),e&&t.setHeader("reason",e),this.transport.send(t)}}},{key:"receiveResponse",value:function(e){var t=this,n=e.status_code;if(100<=n&&n<=199)switch(this.state){case g.STATUS_CALLING:this.stateChanged(g.STATUS_PROCEEDING),this.eventHandlers.onReceiveResponse(e);break;case g.STATUS_PROCEEDING:this.eventHandlers.onReceiveResponse(e)}else if(200<=n&&n<=299)switch(this.state){case g.STATUS_CALLING:case g.STATUS_PROCEEDING:this.stateChanged(g.STATUS_ACCEPTED),this.M=setTimeout(function(){t.timer_M()},f.TIMER_M),this.eventHandlers.onReceiveResponse(e);break;case g.STATUS_ACCEPTED:this.eventHandlers.onReceiveResponse(e)}else if(300<=n&&n<=699)switch(this.state){case g.STATUS_CALLING:case g.STATUS_PROCEEDING:this.stateChanged(g.STATUS_COMPLETED),this.sendACK(e),this.eventHandlers.onReceiveResponse(e);break;case g.STATUS_COMPLETED:this.sendACK(e)}}},{key:"C",get:function(){return g}}]),o}(),v=function(e){function o(e,t,n,r){s(this,o);var i=c(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));i.id="z9hG4bK"+Math.floor(1e7*Math.random()),i.transport=t,i.request=n,i.eventHandlers=r;var a="SIP/2.0/"+t.via_transport;return a+=" "+e.configuration.via_host+";branch="+i.id,i.request.setHeader("via",a),i}return a(o,l),r(o,[{key:"send",value:function(){this.transport.send(this.request)||this.onTransportError()}},{key:"onTransportError",value:function(){p("transport error occurred for transaction "+this.id),this.eventHandlers.onTransportError()}},{key:"C",get:function(){return g}}]),o}(),y=function(e){function i(e,t,n){s(this,i);var r=c(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return r.type=g.NON_INVITE_SERVER,r.id=n.via_branch,r.ua=e,r.transport=t,r.request=n,r.last_response="",(n.server_transaction=r).state=g.STATUS_TRYING,e.newTransaction(r),r}return a(i,l),r(i,[{key:"stateChanged",value:function(e){this.state=e,this.emit("stateChanged")}},{key:"timer_J",value:function(){o("Timer J expired for transaction "+this.id),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"onTransportError",value:function(){this.transportError||(this.transportError=!0,o("transport error occurred, deleting transaction "+this.id),clearTimeout(this.J),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this))}},{key:"receiveResponse",value:function(e,t,n,r){var i=this;if(100===e)switch(this.state){case g.STATUS_TRYING:this.stateChanged(g.STATUS_PROCEEDING),this.transport.send(t)||this.onTransportError();break;case g.STATUS_PROCEEDING:this.last_response=t,this.transport.send(t)?n&&n():(this.onTransportError(),r&&r())}else if(200<=e&&e<=699)switch(this.state){case g.STATUS_TRYING:case g.STATUS_PROCEEDING:this.stateChanged(g.STATUS_COMPLETED),this.last_response=t,this.J=setTimeout(function(){i.timer_J()},f.TIMER_J),this.transport.send(t)?n&&n():(this.onTransportError(),r&&r())}}},{key:"C",get:function(){return g}}]),i}(),w=function(e){function i(e,t,n){s(this,i);var r=c(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return r.type=g.INVITE_SERVER,r.id=n.via_branch,r.ua=e,r.transport=t,r.request=n,r.last_response="",(n.server_transaction=r).state=g.STATUS_PROCEEDING,e.newTransaction(r),r.resendProvisionalTimer=null,n.reply(100),r}return a(i,l),r(i,[{key:"stateChanged",value:function(e){this.state=e,this.emit("stateChanged")}},{key:"timer_H",value:function(){m("Timer H expired for transaction "+this.id),this.state===g.STATUS_COMPLETED&&m("ACK not received, dialog will be terminated"),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"timer_I",value:function(){this.stateChanged(g.STATUS_TERMINATED)}},{key:"timer_L",value:function(){m("Timer L expired for transaction "+this.id),this.state===g.STATUS_ACCEPTED&&(this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this))}},{key:"onTransportError",value:function(){this.transportError||(this.transportError=!0,m("transport error occurred, deleting transaction "+this.id),null!==this.resendProvisionalTimer&&(clearInterval(this.resendProvisionalTimer),this.resendProvisionalTimer=null),clearTimeout(this.L),clearTimeout(this.H),clearTimeout(this.I),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this))}},{key:"resend_provisional",value:function(){this.transport.send(this.last_response)||this.onTransportError()}},{key:"receiveResponse",value:function(e,t,n,r){var i=this;if(100<=e&&e<=199)switch(this.state){case g.STATUS_PROCEEDING:this.transport.send(t)||this.onTransportError(),this.last_response=t}if(100<e&&e<=199&&this.state===g.STATUS_PROCEEDING)null===this.resendProvisionalTimer&&(this.resendProvisionalTimer=setInterval(function(){i.resend_provisional()},f.PROVISIONAL_RESPONSE_INTERVAL));else if(200<=e&&e<=299)switch(this.state){case g.STATUS_PROCEEDING:this.stateChanged(g.STATUS_ACCEPTED),this.last_response=t,this.L=setTimeout(function(){i.timer_L()},f.TIMER_L),null!==this.resendProvisionalTimer&&(clearInterval(this.resendProvisionalTimer),this.resendProvisionalTimer=null);case g.STATUS_ACCEPTED:this.transport.send(t)?n&&n():(this.onTransportError(),r&&r())}else if(300<=e&&e<=699)switch(this.state){case g.STATUS_PROCEEDING:null!==this.resendProvisionalTimer&&(clearInterval(this.resendProvisionalTimer),this.resendProvisionalTimer=null),this.transport.send(t)?(this.stateChanged(g.STATUS_COMPLETED),this.H=setTimeout(function(){i.timer_H()},f.TIMER_H),n&&n()):(this.onTransportError(),r&&r())}}},{key:"C",get:function(){return g}}]),i}();t.exports={C:g,NonInviteClientTransaction:_,InviteClientTransaction:b,AckClientTransaction:v,NonInviteServerTransaction:y,InviteServerTransaction:w,checkTransaction:function(e,t){var n=e._transactions,r=void 0;switch(t.method){case i.INVITE:if(r=n.ist[t.via_branch]){switch(r.state){case g.STATUS_PROCEEDING:r.transport.send(r.last_response)}return!0}break;case i.ACK:if(!(r=n.ist[t.via_branch]))return!1;if(r.state===g.STATUS_ACCEPTED)return!1;if(r.state===g.STATUS_COMPLETED)return r.state=g.STATUS_CONFIRMED,r.I=setTimeout(function(){r.timer_I()},f.TIMER_I),!0;break;case i.CANCEL:return(r=n.ist[t.via_branch])?(t.reply_sl(200),r.state!==g.STATUS_PROCEEDING):(t.reply_sl(481),!0);default:if(r=n.nist[t.via_branch]){switch(r.state){case g.STATUS_TRYING:break;case g.STATUS_PROCEEDING:case g.STATUS_COMPLETED:r.transport.send(r.last_response)}return!0}}}}},{"./Constants":2,"./SIPMessage":19,"./Timers":21,debug:29,events:31}],23:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var i=e("./Socket"),a=e("debug")("JsSIP:Transport"),o=e("debug")("JsSIP:ERROR:Transport");o.log=console.warn.bind(console);var s={STATUS_CONNECTED:0,STATUS_CONNECTING:1,STATUS_DISCONNECTED:2,SOCKET_STATUS_READY:0,SOCKET_STATUS_ERROR:1,recovery_options:{min_interval:2,max_interval:30}};t.exports=function(){function n(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:s.recovery_options;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),a("new()"),this.status=s.STATUS_DISCONNECTED,this.socket=null,this.sockets=[],this.recovery_options=t,this.recover_attempts=0,this.recovery_timer=null,this.close_requested=!1,void 0===e)throw new TypeError("Invalid argument. undefined 'sockets' argument");e instanceof Array||(e=[e]),e.forEach(function(e){if(!i.isSocket(e.socket))throw new TypeError("Invalid argument. invalid 'JsSIP.Socket' instance");if(e.weight&&!Number(e.weight))throw new TypeError("Invalid argument. 'weight' attribute is not a number");this.sockets.push({socket:e.socket,weight:e.weight||0,status:s.SOCKET_STATUS_READY})},this),this._getSocket()}return r(n,[{key:"connect",value:function(){a("connect()"),this.isConnected()?a("Transport is already connected"):this.isConnecting()?a("Transport is connecting"):(this.close_requested=!1,this.status=s.STATUS_CONNECTING,this.onconnecting({socket:this.socket,attempts:this.recover_attempts}),this.close_requested||(this.socket.onconnect=this._onConnect.bind(this),this.socket.ondisconnect=this._onDisconnect.bind(this),this.socket.ondata=this._onData.bind(this),this.socket.connect()))}},{key:"disconnect",value:function(){a("close()"),this.close_requested=!0,this.recover_attempts=0,this.status=s.STATUS_DISCONNECTED,null!==this.recovery_timer&&(clearTimeout(this.recovery_timer),this.recovery_timer=null),this.socket.onconnect=function(){},this.socket.ondisconnect=function(){},this.socket.ondata=function(){},this.socket.disconnect(),this.ondisconnect({socket:this.socket,error:!1})}},{key:"send",value:function(e){if(a("send()"),!this.isConnected())return o("unable to send message, transport is not connected"),!1;var t=e.toString();return a("sending message:\n\n"+t+"\n"),this.socket.send(t)}},{key:"isConnected",value:function(){return this.status===s.STATUS_CONNECTED}},{key:"isConnecting",value:function(){return this.status===s.STATUS_CONNECTING}},{key:"_reconnect",value:function(){var e=this;this.recover_attempts+=1;var t=Math.floor(Math.random()*Math.pow(2,this.recover_attempts)+1);t<this.recovery_options.min_interval?t=this.recovery_options.min_interval:t>this.recovery_options.max_interval&&(t=this.recovery_options.max_interval),a("reconnection attempt: "+this.recover_attempts+". next connection attempt in "+t+" seconds"),this.recovery_timer=setTimeout(function(){e.close_requested||e.isConnected()||e.isConnecting()||(e._getSocket(),e.connect())},1e3*t)}},{key:"_getSocket",value:function(){var t=[];if(this.sockets.forEach(function(e){e.status!==s.SOCKET_STATUS_ERROR&&(0===t.length?t.push(e):e.weight>t[0].weight?t=[e]:e.weight===t[0].weight&&t.push(e))}),0===t.length)return this.sockets.forEach(function(e){e.status=s.SOCKET_STATUS_READY}),void this._getSocket();var e=Math.floor(Math.random()*t.length);this.socket=t[e].socket}},{key:"_onConnect",value:function(){this.recover_attempts=0,this.status=s.STATUS_CONNECTED,null!==this.recovery_timer&&(clearTimeout(this.recovery_timer),this.recovery_timer=null),this.onconnect({socket:this})}},{key:"_onDisconnect",value:function(e,t,n){this.status=s.STATUS_DISCONNECTED,this.ondisconnect({socket:this.socket,error:e,code:t,reason:n}),this.close_requested||(this.sockets.forEach(function(e){this.socket===e.socket&&(e.status=s.SOCKET_STATUS_ERROR)},this),this._reconnect(e))}},{key:"_onData",value:function(e){if("\r\n"!==e){if("string"!=typeof e){try{e=String.fromCharCode.apply(null,new Uint8Array(e))}catch(e){return void a("received binary message failed to be converted into string, message discarded")}a("received binary message:\n\n"+e+"\n")}else a("received text message:\n\n"+e+"\n");this.ondata({transport:this,message:e})}else a("received message with CRLF Keep Alive response")}},{key:"via_transport",get:function(){return this.socket.via_transport}},{key:"url",get:function(){return this.socket.url}},{key:"sip_uri",get:function(){return this.socket.sip_uri}}]),n}()},{"./Socket":20,debug:29}],24:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var i=e("events").EventEmitter,o=e("./Constants"),a=e("./Registrator"),s=e("./RTCSession"),c=e("./Message"),l=e("./Transactions"),u=e("./Transport"),f=e("./Utils"),d=e("./Exceptions"),h=e("./URI"),p=e("./Grammar"),m=e("./Parser"),g=e("./SIPMessage"),_=e("./sanityCheck"),b=e("./Config"),v=e("debug")("JsSIP:UA"),y=e("debug")("JsSIP:ERROR:UA");y.log=console.warn.bind(console);var w={STATUS_INIT:0,STATUS_READY:1,STATUS_USER_CLOSED:2,STATUS_NOT_READY:3,CONFIGURATION_ERROR:1,NETWORK_ERROR:2};t.exports=function(e){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),v("new() [configuration:%o]",e);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));if(t._cache={credentials:{}},t._configuration=Object.assign({},b.settings),t._dynConfiguration={},t._dialogs={},t._applicants={},t._sessions={},t._transport=null,t._contact=null,t._status=w.STATUS_INIT,t._error=null,t._transactions={nist:{},nict:{},ist:{},ict:{}},t._data={},t._closeTimer=null,void 0===e)throw new TypeError("Not enough arguments");try{t._loadConfig(e)}catch(e){throw t._status=w.STATUS_NOT_READY,t._error=w.CONFIGURATION_ERROR,e}return t._registrator=new a(t),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,i),r(n,null,[{key:"C",get:function(){return w}}]),r(n,[{key:"start",value:function(){v("start()"),this._status===w.STATUS_INIT?this._transport.connect():this._status===w.STATUS_USER_CLOSED?(v("restarting UA"),null!==this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null,this._transport.disconnect()),this._status=w.STATUS_INIT,this._transport.connect()):this._status===w.STATUS_READY?v("UA is in READY status, not restarted"):v("ERROR: connection is down, Auto-Recovery system is trying to reconnect"),this._dynConfiguration.register=this._configuration.register}},{key:"register",value:function(){v("register()"),this._dynConfiguration.register=!0,this._registrator.register()}},{key:"unregister",value:function(e){v("unregister()"),this._dynConfiguration.register=!1,this._registrator.unregister(e)}},{key:"registrator",value:function(){return this._registrator}},{key:"isRegistered",value:function(){return this._registrator.registered}},{key:"isConnected",value:function(){return this._transport.isConnected()}},{key:"call",value:function(e,t){v("call()");var n=new s(this);return n.connect(e,t),n}},{key:"sendMessage",value:function(e,t,n){v("sendMessage()");var r=new c(this);return r.send(e,t,n),r}},{key:"terminateSessions",value:function(e){for(var t in v("terminateSessions()"),this._sessions)this._sessions[t].isEnded()||this._sessions[t].terminate(e)}},{key:"stop",value:function(){var e=this;if(v("stop()"),this._dynConfiguration={},this._status!==w.STATUS_USER_CLOSED){this._registrator.close();var t=Object.keys(this._sessions).length;for(var n in this._sessions)if(Object.prototype.hasOwnProperty.call(this._sessions,n)){v("closing session "+n);try{this._sessions[n].terminate()}catch(e){}}for(var r in this._applicants)if(Object.prototype.hasOwnProperty.call(this._applicants,r))try{this._applicants[r].close()}catch(e){}this._status=w.STATUS_USER_CLOSED,0===Object.keys(this._transactions.nict).length+Object.keys(this._transactions.nist).length+Object.keys(this._transactions.ict).length+Object.keys(this._transactions.ist).length&&0===t?this._transport.disconnect():this._closeTimer=setTimeout(function(){e._closeTimer=null,e._transport.disconnect()},2e3)}else v("UA already closed")}},{key:"normalizeTarget",value:function(e){return f.normalizeTarget(e,this._configuration.hostport_params)}},{key:"get",value:function(e){switch(e){case"realm":return this._configuration.realm;case"ha1":return this._configuration.ha1;default:return void y('get() | cannot get "%s" parameter in runtime',e)}}},{key:"set",value:function(e,t){switch(e){case"password":this._configuration.password=String(t);break;case"realm":this._configuration.realm=String(t);break;case"ha1":this._configuration.ha1=String(t),this._configuration.password=null;break;case"display_name":if(-1===p.parse('"'+t+'"',"display_name"))return y('set() | wrong "display_name"'),!1;this._configuration.display_name=t;break;default:return y('set() | cannot set "%s" parameter in runtime',e),!1}return!0}},{key:"newTransaction",value:function(e){this._transactions[e.type][e.id]=e,this.emit("newTransaction",{transaction:e})}},{key:"destroyTransaction",value:function(e){delete this._transactions[e.type][e.id],this.emit("transactionDestroyed",{transaction:e})}},{key:"newDialog",value:function(e){this._dialogs[e.id]=e}},{key:"destroyDialog",value:function(e){delete this._dialogs[e.id]}},{key:"newMessage",value:function(e,t){this._applicants[e]=e,this.emit("newMessage",t)}},{key:"destroyMessage",value:function(e){delete this._applicants[e]}},{key:"newRTCSession",value:function(e,t){this._sessions[e.id]=e,this.emit("newRTCSession",t)}},{key:"destroyRTCSession",value:function(e){delete this._sessions[e.id]}},{key:"registered",value:function(e){this.emit("registered",e)}},{key:"unregistered",value:function(e){this.emit("unregistered",e)}},{key:"registrationFailed",value:function(e){this.emit("registrationFailed",e)}},{key:"receiveRequest",value:function(e){var t=e.method;if(e.ruri.user!==this._configuration.uri.user&&e.ruri.user!==this._contact.uri.user)return v("Request-URI does not point to us"),void(e.method!==o.ACK&&e.reply_sl(404));if(e.ruri.scheme!==o.SIPS){if(!l.checkTransaction(this,e)){if(t===o.INVITE?new l.InviteServerTransaction(this,this._transport,e):t!==o.ACK&&t!==o.CANCEL&&new l.NonInviteServerTransaction(this,this._transport,e),t===o.OPTIONS)e.reply(200);else if(t===o.MESSAGE){if(0===this.listeners("newMessage").length)return void e.reply(405);new c(this).init_incoming(e)}else if(t===o.INVITE&&!e.to_tag&&0===this.listeners("newRTCSession").length)return void e.reply(405);var n=void 0,r=void 0;if(e.to_tag)(n=this._findDialog(e.call_id,e.from_tag,e.to_tag))?n.receiveRequest(e):t===o.NOTIFY?(r=this._findSession(e))?r.receiveRequest(e):(v("received NOTIFY request for a non existent subscription"),e.reply(481,"Subscription does not exist")):t!==o.ACK&&e.reply(481);else switch(t){case o.INVITE:if(window.RTCPeerConnection)if(e.hasHeader("replaces")){var i=e.replaces;(n=this._findDialog(i.call_id,i.from_tag,i.to_tag))?(r=n.owner).isEnded()?e.reply(603):r.receiveRequest(e):e.reply(481)}else(r=new s(this)).init_incoming(e);else y("INVITE received but WebRTC is not supported"),e.reply(488);break;case o.BYE:e.reply(481);break;case o.CANCEL:(r=this._findSession(e))?r.receiveRequest(e):v("received CANCEL request for a non existent session");break;case o.ACK:break;default:e.reply(405)}}}else e.reply_sl(416)}},{key:"_findSession",value:function(e){var t=e.call_id,n=e.from_tag,r=e.to_tag,i=t+n,a=this._sessions[i],o=t+r,s=this._sessions[o];return a||(s||null)}},{key:"_findDialog",value:function(e,t,n){var r=e+t+n,i=this._dialogs[r];return i||(r=e+n+t,(i=this._dialogs[r])||null)}},{key:"_loadConfig",value:function(e){try{b.load(this._configuration,e)}catch(e){throw e}0===this._configuration.display_name&&(this._configuration.display_name="0"),this._configuration.instance_id||(this._configuration.instance_id=f.newUUID()),this._configuration.jssip_id=f.createRandomToken(5);var t=this._configuration.uri.clone();t.user=null,this._configuration.hostport_params=t.toString().replace(/^sip:/i,"");try{this._transport=new u(this._configuration.sockets,{max_interval:this._configuration.connection_recovery_max_interval,min_interval:this._configuration.connection_recovery_min_interval}),this._transport.onconnecting=function(e){this.emit("connecting",e)}.bind(this),this._transport.onconnect=function(e){if(this._status===w.STATUS_USER_CLOSED)return;this._status=w.STATUS_READY,this._error=null,this.emit("connected",e),this._dynConfiguration.register&&this._registrator.register()}.bind(this),this._transport.ondisconnect=function(e){var t=!0,n=!1,r=void 0;try{for(var i,a=["nict","ict","nist","ist"][Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var o=i.value;for(var s in this._transactions[o])Object.prototype.hasOwnProperty.call(this._transactions[o],s)&&this._transactions[o][s].onTransportError()}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}this.emit("disconnected",e),this._registrator.onTransportClosed(),this._status!==w.STATUS_USER_CLOSED&&(this._status=w.STATUS_NOT_READY,this._error=w.NETWORK_ERROR)}.bind(this),this._transport.ondata=function(e){var t=e.transport,n=e.message;if(!(n=m.parseMessage(n,this)))return;if(this._status===w.STATUS_USER_CLOSED&&n instanceof g.IncomingRequest)return;if(!_(n,this,t))return;if(n instanceof g.IncomingRequest)n.transport=t,this.receiveRequest(n);else if(n instanceof g.IncomingResponse){var r=void 0;switch(n.method){case o.INVITE:(r=this._transactions.ict[n.via_branch])&&r.receiveResponse(n);break;case o.ACK:break;default:(r=this._transactions.nict[n.via_branch])&&r.receiveResponse(n)}}}.bind(this)}catch(e){throw y(e),new d.ConfigurationError("sockets",this._configuration.sockets)}if(delete this._configuration.sockets,this._configuration.authorization_user||(this._configuration.authorization_user=this._configuration.uri.user),!this._configuration.registrar_server){var n=this._configuration.uri.clone();n.user=null,n.clearParams(),n.clearHeaders(),this._configuration.registrar_server=n}this._configuration.no_answer_timeout*=1e3,this._configuration.contact_uri?this._configuration.via_host=this._configuration.contact_uri.host:this._configuration.contact_uri=new h("sip",f.createRandomToken(8),this._configuration.via_host,null,{transport:"ws"}),this._contact={pub_gruu:null,temp_gruu:null,uri:this._configuration.contact_uri,toString:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.anonymous||null,n=e.outbound||null,r="<";return r+=t?this.temp_gruu||"sip:anonymous@anonymous.invalid;transport=ws":this.pub_gruu||this.uri.toString(),!n||(t?this.temp_gruu:this.pub_gruu)||(r+=";ob"),r+=">"}};var r=["password","realm","ha1","display_name","register"];for(var i in this._configuration)Object.prototype.hasOwnProperty.call(this._configuration,i)&&(-1!==r.indexOf(i)?Object.defineProperty(this._configuration,i,{writable:!0,configurable:!1}):Object.defineProperty(this._configuration,i,{writable:!1,configurable:!1}));for(var a in v("configuration parameters after validation:"),this._configuration)if(Object.prototype.hasOwnProperty.call(b.settings,a))switch(a){case"uri":case"registrar_server":v("- "+a+": "+this._configuration[a]);break;case"password":case"ha1":v("- "+a+": NOT SHOWN");break;default:v("- "+a+": "+JSON.stringify(this._configuration[a]))}}},{key:"C",get:function(){return w}},{key:"status",get:function(){return this._status}},{key:"contact",get:function(){return this._contact}},{key:"configuration",get:function(){return this._configuration}},{key:"transport",get:function(){return this._transport}}]),n}()},{"./Config":1,"./Constants":2,"./Exceptions":6,"./Grammar":7,"./Message":9,"./Parser":11,"./RTCSession":12,"./Registrator":17,"./SIPMessage":19,"./Transactions":22,"./Transport":23,"./URI":25,"./Utils":26,"./sanityCheck":28,debug:29,events:31}],25:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var l=e("./Constants"),u=e("./Utils"),i=e("./Grammar");t.exports=function(){function c(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),!n)throw new TypeError('missing or invalid "host" parameter');for(var o in this._parameters={},this._headers={},this._scheme=e||l.SIP,this._user=t,this._host=n,this._port=r,i)Object.prototype.hasOwnProperty.call(i,o)&&this.setParam(o,i[o]);for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&this.setHeader(s,a[s])}return r(c,null,[{key:"parse",value:function(e){return-1!==(e=i.parse(e,"SIP_URI"))?e:void 0}}]),r(c,[{key:"setParam",value:function(e,t){e&&(this._parameters[e.toLowerCase()]=null==t?null:t.toString())}},{key:"getParam",value:function(e){if(e)return this._parameters[e.toLowerCase()]}},{key:"hasParam",value:function(e){if(e)return!!this._parameters.hasOwnProperty(e.toLowerCase())}},{key:"deleteParam",value:function(e){if(e=e.toLowerCase(),this._parameters.hasOwnProperty(e)){var t=this._parameters[e];return delete this._parameters[e],t}}},{key:"clearParams",value:function(){this._parameters={}}},{key:"setHeader",value:function(e,t){this._headers[u.headerize(e)]=Array.isArray(t)?t:[t]}},{key:"getHeader",value:function(e){if(e)return this._headers[u.headerize(e)]}},{key:"hasHeader",value:function(e){if(e)return!!this._headers.hasOwnProperty(u.headerize(e))}},{key:"deleteHeader",value:function(e){if(e=u.headerize(e),this._headers.hasOwnProperty(e)){var t=this._headers[e];return delete this._headers[e],t}}},{key:"clearHeaders",value:function(){this._headers={}}},{key:"clone",value:function(){return new c(this._scheme,this._user,this._host,this._port,JSON.parse(JSON.stringify(this._parameters)),JSON.parse(JSON.stringify(this._headers)))}},{key:"toString",value:function(){var e=[],t=this._scheme+":";for(var n in this._user&&(t+=u.escapeUser(this._user)+"@"),t+=this._host,(this._port||0===this._port)&&(t+=":"+this._port),this._parameters)Object.prototype.hasOwnProperty.call(this._parameters,n)&&(t+=";"+n,null!==this._parameters[n]&&(t+="="+this._parameters[n]));for(var r in this._headers)if(Object.prototype.hasOwnProperty.call(this._headers,r)){var i=!0,a=!1,o=void 0;try{for(var s,c=this._headers[r][Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var l=s.value;e.push(r+"="+l)}}catch(e){a=!0,o=e}finally{try{!i&&c.return&&c.return()}finally{if(a)throw o}}}return 0<e.length&&(t+="?"+e.join("&")),t}},{key:"toAor",value:function(e){var t=this._scheme+":";return this._user&&(t+=u.escapeUser(this._user)+"@"),t+=this._host,e&&(this._port||0===this._port)&&(t+=":"+this._port),t}},{key:"scheme",get:function(){return this._scheme},set:function(e){this._scheme=e.toLowerCase()}},{key:"user",get:function(){return this._user},set:function(e){this._user=e}},{key:"host",get:function(){return this._host},set:function(e){this._host=e.toLowerCase()}},{key:"port",get:function(){return this._port},set:function(e){this._port=0===e?e:parseInt(e,10)||null}}]),c}()},{"./Constants":2,"./Grammar":7,"./Utils":26}],26:[function(e,t,n){"use strict";var _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("./Constants"),s=e("./URI"),r=e("./Grammar");n.str_utf8_length=function(e){return unescape(encodeURIComponent(e)).length};var u=n.isFunction=function(e){return void 0!==e&&"[object Function]"===Object.prototype.toString.call(e)};n.isString=function(e){return void 0!==e&&"[object String]"===Object.prototype.toString.call(e)},n.isDecimal=function(e){return!isNaN(e)&&parseFloat(e)===parseInt(e,10)},n.isEmpty=function(e){return null===e||""===e||void 0===e||Array.isArray(e)&&0===e.length||"number"==typeof e&&isNaN(e)},n.hasMethods=function(e){for(var t=arguments.length,n=Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=!0,a=!1,o=void 0;try{for(var s,c=n[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var l=s.value;if(u(e[l]))return!1}}catch(e){a=!0,o=e}finally{try{!i&&c.return&&c.return()}finally{if(a)throw o}}return!0};var i=n.createRandomToken=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:32,n=void 0,r="";for(n=0;n<e;n++)r+=(Math.random()*t|0).toString(t);return r};n.newTag=function(){return i(10)},n.newUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},n.hostType=function(e){if(e)return-1!==(e=r.parse(e,"host"))?e.host_type:void 0};var c=n.escapeUser=function(e){return encodeURIComponent(decodeURIComponent(e)).replace(/%3A/gi,":").replace(/%2B/gi,"+").replace(/%3F/gi,"?").replace(/%2F/gi,"/")};n.normalizeTarget=function(e,t){if(e){if(e instanceof s)return e;if("string"!=typeof e)return;var n=e.split("@"),r=void 0,i=void 0;switch(n.length){case 1:if(!t)return;r=e,i=t;break;case 2:r=n[0],i=n[1];break;default:r=n.slice(0,n.length-1).join("@"),i=n[n.length-1]}r=r.replace(/^(sips?|tel):/i,""),/^[-.()]*\+?[0-9\-.()]+$/.test(r)&&(r=r.replace(/[-.()]/g,"")),e=o.SIP+":"+c(r)+"@"+i;var a;return(a=s.parse(e))?a:void 0}},n.headerize=function(e){var t={"Call-Id":"Call-ID",Cseq:"CSeq","Www-Authenticate":"WWW-Authenticate"},n=e.toLowerCase().replace(/_/g,"-").split("-"),r="",i=n.length,a=void 0;for(a=0;a<i;a++)0!==a&&(r+="-"),r+=n[a].charAt(0).toUpperCase()+n[a].substring(1);return t[r]&&(r=t[r]),r},n.sipErrorCause=function(e){for(var t in o.SIP_ERROR_CAUSES)if(-1!==o.SIP_ERROR_CAUSES[t].indexOf(e))return o.causes[t];return o.causes.SIP_FAILURE_CODE},n.getRandomTestNetIP=function(){return"192.0.2."+(e=1,t=254,Math.floor(Math.random()*(t-e+1)+e));var e,t},n.calculateMD5=function(e){function c(e,t){return e<<t|e>>>32-t}function l(e,t){var n=2147483648&e,r=2147483648&t,i=1073741824&e,a=1073741824&t,o=(1073741823&e)+(1073741823&t);return i&a?2147483648^o^n^r:i|a?1073741824&o?3221225472^o^n^r:1073741824^o^n^r:o^n^r}function t(e,t,n,r,i,a,o){var s;return l(c(e=l(e,l(l((s=t)&n|~s&r,i),o)),a),t)}function n(e,t,n,r,i,a,o){var s;return l(c(e=l(e,l(l(t&(s=r)|n&~s,i),o)),a),t)}function r(e,t,n,r,i,a,o){return l(c(e=l(e,l(l(t^n^r,i),o)),a),t)}function i(e,t,n,r,i,a,o){return l(c(e=l(e,l(l(n^(t|~r),i),o)),a),t)}function a(e){var t="",n="",r=void 0;for(r=0;r<=3;r++)t+=(n="0"+(e>>>8*r&255).toString(16)).substr(n.length-2,2);return t}var o,s=void 0,u=void 0,f=void 0,d=void 0,h=void 0,p=void 0,m=void 0,g=void 0,_=void 0;for(o=function(e){for(var t=void 0,n=e.length,r=n+8,i=16*((r-r%64)/64+1),a=new Array(i-1),o=0,s=0;s<n;)o=s%4*8,a[t=(s-s%4)/4]=a[t]|e.charCodeAt(s)<<o,s++;return o=s%4*8,a[t=(s-s%4)/4]=a[t]|128<<o,a[i-2]=n<<3,a[i-1]=n>>>29,a}(e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):(127<r&&r<2048?t+=String.fromCharCode(r>>6|192):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128)),t+=String.fromCharCode(63&r|128))}return t}(e)),p=1732584193,m=4023233417,g=2562383102,_=271733878,s=0;s<o.length;s+=16)m=i(m=i(m=i(m=i(m=r(m=r(m=r(m=r(m=n(m=n(m=n(m=n(m=t(m=t(m=t(m=t(f=m,g=t(d=g,_=t(h=_,p=t(u=p,m,g,_,o[s+0],7,3614090360),m,g,o[s+1],12,3905402710),p,m,o[s+2],17,606105819),_,p,o[s+3],22,3250441966),g=t(g,_=t(_,p=t(p,m,g,_,o[s+4],7,4118548399),m,g,o[s+5],12,1200080426),p,m,o[s+6],17,2821735955),_,p,o[s+7],22,4249261313),g=t(g,_=t(_,p=t(p,m,g,_,o[s+8],7,1770035416),m,g,o[s+9],12,2336552879),p,m,o[s+10],17,4294925233),_,p,o[s+11],22,2304563134),g=t(g,_=t(_,p=t(p,m,g,_,o[s+12],7,1804603682),m,g,o[s+13],12,4254626195),p,m,o[s+14],17,2792965006),_,p,o[s+15],22,1236535329),g=n(g,_=n(_,p=n(p,m,g,_,o[s+1],5,4129170786),m,g,o[s+6],9,3225465664),p,m,o[s+11],14,643717713),_,p,o[s+0],20,3921069994),g=n(g,_=n(_,p=n(p,m,g,_,o[s+5],5,3593408605),m,g,o[s+10],9,38016083),p,m,o[s+15],14,3634488961),_,p,o[s+4],20,3889429448),g=n(g,_=n(_,p=n(p,m,g,_,o[s+9],5,568446438),m,g,o[s+14],9,3275163606),p,m,o[s+3],14,4107603335),_,p,o[s+8],20,1163531501),g=n(g,_=n(_,p=n(p,m,g,_,o[s+13],5,2850285829),m,g,o[s+2],9,4243563512),p,m,o[s+7],14,1735328473),_,p,o[s+12],20,2368359562),g=r(g,_=r(_,p=r(p,m,g,_,o[s+5],4,4294588738),m,g,o[s+8],11,2272392833),p,m,o[s+11],16,1839030562),_,p,o[s+14],23,4259657740),g=r(g,_=r(_,p=r(p,m,g,_,o[s+1],4,2763975236),m,g,o[s+4],11,1272893353),p,m,o[s+7],16,4139469664),_,p,o[s+10],23,3200236656),g=r(g,_=r(_,p=r(p,m,g,_,o[s+13],4,681279174),m,g,o[s+0],11,3936430074),p,m,o[s+3],16,3572445317),_,p,o[s+6],23,76029189),g=r(g,_=r(_,p=r(p,m,g,_,o[s+9],4,3654602809),m,g,o[s+12],11,3873151461),p,m,o[s+15],16,530742520),_,p,o[s+2],23,3299628645),g=i(g,_=i(_,p=i(p,m,g,_,o[s+0],6,4096336452),m,g,o[s+7],10,1126891415),p,m,o[s+14],15,2878612391),_,p,o[s+5],21,4237533241),g=i(g,_=i(_,p=i(p,m,g,_,o[s+12],6,1700485571),m,g,o[s+3],10,2399980690),p,m,o[s+10],15,4293915773),_,p,o[s+1],21,2240044497),g=i(g,_=i(_,p=i(p,m,g,_,o[s+8],6,1873313359),m,g,o[s+15],10,4264355552),p,m,o[s+6],15,2734768916),_,p,o[s+13],21,1309151649),g=i(g,_=i(_,p=i(p,m,g,_,o[s+4],6,4149444226),m,g,o[s+11],10,3174756917),p,m,o[s+2],15,718787259),_,p,o[s+9],21,3951481745),p=l(p,u),m=l(m,f),g=l(g,d),_=l(_,h);return(a(p)+a(m)+a(g)+a(_)).toLowerCase()},n.closeMediaStream=function(t){if(t)try{var e=void 0;if(t.getTracks){e=t.getTracks();var n=!0,r=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){a.value.stop()}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}}else{e=t.getAudioTracks();var s=!0,c=!1,l=void 0;try{for(var u,f=e[Symbol.iterator]();!(s=(u=f.next()).done);s=!0){u.value.stop()}}catch(e){c=!0,l=e}finally{try{!s&&f.return&&f.return()}finally{if(c)throw l}}e=t.getVideoTracks();var d=!0,h=!1,p=void 0;try{for(var m,g=e[Symbol.iterator]();!(d=(m=g.next()).done);d=!0){m.value.stop()}}catch(e){h=!0,p=e}finally{try{!d&&g.return&&g.return()}finally{if(h)throw p}}}}catch(e){"function"!=typeof t.stop&&"object"!==_(t.stop)||t.stop()}},n.cloneArray=function(e){return e&&e.slice()||[]}},{"./Constants":2,"./Grammar":7,"./URI":25}],27:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var i=e("./Grammar"),a=e("debug")("JsSIP:WebSocketInterface"),o=e("debug")("JsSIP:ERROR:WebSocketInterface");o.log=console.warn.bind(console),t.exports=function(){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),a('new() [url:"%s"]',e),this._url=e,this._sip_uri=null,this._via_transport=null,this._ws=null;var t=i.parse(e,"absoluteURI");if(-1===t)throw o("invalid WebSocket URI: "+e),new TypeError("Invalid argument: "+e);if("wss"!==t.scheme&&"ws"!==t.scheme)throw o("invalid WebSocket URI scheme: "+t.scheme),new TypeError("Invalid argument: "+e);this._sip_uri="sip:"+t.host+(t.port?":"+t.port:"")+";transport=ws",this._via_transport=t.scheme.toUpperCase()}return r(n,[{key:"connect",value:function(){if(a("connect()"),this.isConnected())a("WebSocket "+this._url+" is already connected");else if(this.isConnecting())a("WebSocket "+this._url+" is connecting");else{this._ws&&this.disconnect(),a("connecting to WebSocket "+this._url);try{this._ws=new WebSocket(this._url,"sip"),this._ws.binaryType="arraybuffer",this._ws.onopen=this._onOpen.bind(this),this._ws.onclose=this._onClose.bind(this),this._ws.onmessage=this._onMessage.bind(this),this._ws.onerror=this._onError.bind(this)}catch(e){this._onError(e)}}}},{key:"disconnect",value:function(){a("disconnect()"),this._ws&&(this._ws.onopen=function(){},this._ws.onclose=function(){},this._ws.onmessage=function(){},this._ws.onerror=function(){},this._ws.close(),this._ws=null)}},{key:"send",value:function(e){return a("send()"),this.isConnected()?(this._ws.send(e),!0):(o("unable to send message, WebSocket is not open"),!1)}},{key:"isConnected",value:function(){return this._ws&&this._ws.readyState===this._ws.OPEN}},{key:"isConnecting",value:function(){return this._ws&&this._ws.readyState===this._ws.CONNECTING}},{key:"_onOpen",value:function(){a("WebSocket "+this._url+" connected"),this.onconnect()}},{key:"_onClose",value:function(e){var t=e.wasClean,n=e.code,r=e.reason;a("WebSocket "+this._url+" closed"),!1===t&&a("WebSocket abrupt disconnection");var i={socket:this,error:!t,code:n,reason:r};this.ondisconnect(i)}},{key:"_onMessage",value:function(e){var t=e.data;a("received WebSocket message"),this.ondata(t)}},{key:"_onError",value:function(e){o("WebSocket "+this._url+" error: "+e)}},{key:"via_transport",get:function(){return this._via_transport},set:function(e){this._via_transport=e.toUpperCase()}},{key:"sip_uri",get:function(){return this._sip_uri}},{key:"url",get:function(){return this._url}}]),n}()},{"./Grammar":7,debug:29}],28:[function(e,t,n){"use strict";var l=e("./Constants"),b=e("./SIPMessage"),u=e("./Utils"),o=e("debug")("JsSIP:sanityCheck"),v=[function(){var e=!0,t=!1,n=void 0;try{for(var r,i=["from","to","call_id","cseq","via"][Symbol.iterator]();!(e=(r=i.next()).done);e=!0){var a=r.value;if(!C.hasHeader(a))return o("missing mandatory header field : "+a+", dropping the response"),!1}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}}],y=[function(){if("sip"!==C.s("to").uri.scheme)return s(416),!1},function(){if(!C.to_tag&&C.call_id.substr(0,5)===A.configuration.jssip_id)return s(482),!1},function(){var e=u.str_utf8_length(C.body),t=C.getHeader("content-length");if(e<t)return s(400),!1},function(){var e=C.from_tag,t=C.call_id,n=C.cseq,r=void 0;if(C.to_tag)return;if(C.method===l.INVITE){if(A._transactions.ist[C.via_branch])return!1;for(var i in A._transactions.ist)if(Object.prototype.hasOwnProperty.call(A._transactions.ist,i)&&(r=A._transactions.ist[i]).request.from_tag===e&&r.request.call_id===t&&r.request.cseq===n)return s(482),!1}else{if(A._transactions.nist[C.via_branch])return!1;for(var a in A._transactions.nist)if(Object.prototype.hasOwnProperty.call(A._transactions.nist,a)&&(r=A._transactions.nist[a]).request.from_tag===e&&r.request.call_id===t&&r.request.cseq===n)return s(482),!1}}],w=[function(){if(1<C.getHeaders("via").length)return o("more than one Via header field present in the response, dropping the response"),!1},function(){var e=u.str_utf8_length(C.body),t=C.getHeader("content-length");if(e<t)return o("message body length is lower than the value in Content-Length header field, dropping the response"),!1}],C=void 0,A=void 0,S=void 0;function s(e){var t=C.getHeaders("via"),n=void 0,r="SIP/2.0 "+e+" "+l.REASON_PHRASE[e]+"\r\n",i=!0,a=!1,o=void 0;try{for(var s,c=t[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){r+="Via: "+s.value+"\r\n"}}catch(e){a=!0,o=e}finally{try{!i&&c.return&&c.return()}finally{if(a)throw o}}n=C.getHeader("To"),C.to_tag||(n+=";tag="+u.newTag()),r+="To: "+n+"\r\n",r+="From: "+C.getHeader("From")+"\r\n",r+="Call-ID: "+C.call_id+"\r\n",r+="CSeq: "+C.cseq+" "+C.method+"\r\n",r+="\r\n",S.send(r)}t.exports=function(e,t,n){C=e,A=t,S=n;var r=!0,i=!1,a=void 0;try{for(var o,s=v[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){if(!1===(0,o.value)())return!1}}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}if(C instanceof b.IncomingRequest){var c=!0,l=!1,u=void 0;try{for(var f,d=y[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){if(!1===(0,f.value)())return!1}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}}else if(C instanceof b.IncomingResponse){var h=!0,p=!1,m=void 0;try{for(var g,_=w[Symbol.iterator]();!(h=(g=_.next()).done);h=!0){if(!1===(0,g.value)())return!1}}catch(e){p=!0,m=e}finally{try{!h&&_.return&&_.return()}finally{if(p)throw m}}}return!0}},{"./Constants":2,"./SIPMessage":19,"./Utils":26,debug:29}],29:[function(n,r,a){(function(t){function e(){var e;try{e=a.storage.debug}catch(e){}return!e&&void 0!==t&&"env"in t&&(e=t.env.DEBUG),e}(a=r.exports=n("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},a.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+a.humanize(this.diff),!t)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))}),e.splice(i,0,n)},a.save=function(e){try{null==e?a.storage.removeItem("debug"):a.storage.debug=e}catch(e){}},a.load=e,a.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},a.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],a.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},a.enable(e())}).call(this,n("_process"))},{"./debug":30,_process:33}],30:[function(e,t,c){function n(e){var r;function s(){if(s.enabled){var i=s,e=+new Date,t=e-(r||e);i.diff=t,i.prev=r,i.curr=e,r=e;for(var a=new Array(arguments.length),n=0;n<a.length;n++)a[n]=arguments[n];a[0]=c.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var o=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(e,t){if("%%"===e)return e;o++;var n=c.formatters[t];if("function"==typeof n){var r=a[o];e=n.call(i,r),a.splice(o,1),o--}return e}),c.formatArgs.call(i,a),(s.log||c.log||console.log.bind(console)).apply(i,a)}}return s.namespace=e,s.enabled=c.enabled(e),s.useColors=c.useColors(),s.color=function(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t),n|=0;return c.colors[Math.abs(n)%c.colors.length]}(e),s.destroy=i,"function"==typeof c.init&&c.init(s),c.instances.push(s),s}function i(){var e=c.instances.indexOf(this);return-1!==e&&(c.instances.splice(e,1),!0)}(c=t.exports=n.debug=n.default=n).coerce=function(e){return e instanceof Error?e.stack||e.message:e},c.disable=function(){c.enable("")},c.enable=function(e){var t;c.save(e),c.names=[],c.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?c.skips.push(new RegExp("^"+e.substr(1)+"$")):c.names.push(new RegExp("^"+e+"$")));for(t=0;t<c.instances.length;t++){var i=c.instances[t];i.enabled=c.enabled(i.namespace)}},c.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=c.skips.length;t<n;t++)if(c.skips[t].test(e))return!1;for(t=0,n=c.names.length;t<n;t++)if(c.names[t].test(e))return!0;return!1},c.humanize=e("ms"),c.instances=[],c.names=[],c.skips=[],c.formatters={}},{ms:32}],31:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function c(e){return"function"==typeof e}function l(e){return"object"==typeof e&&null!==e}function u(e){return void 0===e}((t.exports=r).EventEmitter=r).prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,i,a,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||l(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var s=new Error('Uncaught, unspecified "error" event. ('+t+")");throw s.context=t,s}if(u(n=this._events[e]))return!1;if(c(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),n.apply(this,i)}else if(l(n))for(i=Array.prototype.slice.call(arguments,1),r=(o=n.slice()).length,a=0;a<r;a++)o[a].apply(this,i);return!0},r.prototype.on=r.prototype.addListener=function(e,t){var n;if(!c(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,c(t.listener)?t.listener:t),this._events[e]?l(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,l(this._events[e])&&!this._events[e].warned&&(n=u(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&0<n&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.once=function(e,t){if(!c(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,i,a;if(!c(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||c(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(l(n)){for(a=i;0<a--;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(c(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?c(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(c(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],32:[function(e,t,n){function i(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}t.exports=function(e,t){t=t||{};var n,r=typeof e;if("string"===r&&0<e.length)return function(e){if(100<(e=String(e)).length)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"days":case"day":case"d":return 864e5*n;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*n;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*n;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}(e);if("number"===r&&!1===isNaN(e))return t.long?i(n=e,864e5,"day")||i(n,36e5,"hour")||i(n,6e4,"minute")||i(n,1e3,"second")||n+" ms":function(e){if(864e5<=e)return Math.round(e/864e5)+"d";if(36e5<=e)return Math.round(e/36e5)+"h";if(6e4<=e)return Math.round(e/6e4)+"m";if(1e3<=e)return Math.round(e/1e3)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],33:[function(e,t,n){var r,i,a=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function c(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var l,u=[],f=!1,d=-1;function h(){f&&l&&(f=!1,l.length?u=l.concat(u):d=-1,u.length&&p())}function p(){if(!f){var e=c(h);f=!0;for(var t=u.length;t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,f=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new m(e,t)),1!==u.length||f||c(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=g,a.addListener=g,a.once=g,a.off=g,a.removeListener=g,a.removeAllListeners=g,a.emit=g,a.prependListener=g,a.prependOnceListener=g,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],34:[function(e,t,n){"use strict";var N=e("sdp");function c(e,t,n,r,i){var a=N.writeRtpDescription(e.kind,t);if(a+=N.writeIceParameters(e.iceGatherer.getLocalParameters()),a+=N.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":i||"active"),a+="a=mid:"+e.mid+"\r\n",e.rtpSender&&e.rtpReceiver?a+="a=sendrecv\r\n":e.rtpSender?a+="a=sendonly\r\n":e.rtpReceiver?a+="a=recvonly\r\n":a+="a=inactive\r\n",e.rtpSender){var o="msid:"+(r?r.id:"-")+" "+e.rtpSender.track.id+"\r\n";a+="a="+o,a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+o,e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+o,a+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+N.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+N.localCName+"\r\n"),a}function p(l,u){var f={codecs:[],headerExtensions:[],fecMechanisms:[]},d=function(e,t){e=parseInt(e,10);for(var n=0;n<t.length;n++)if(t[n].payloadType===e||t[n].preferredPayloadType===e)return t[n]};return l.codecs.forEach(function(n){for(var e=0;e<u.codecs.length;e++){var t=u.codecs[e];if(n.name.toLowerCase()===t.name.toLowerCase()&&n.clockRate===t.clockRate){if("rtx"===n.name.toLowerCase()&&n.parameters&&t.parameters.apt&&(r=n,i=t,a=l.codecs,o=u.codecs,c=s=void 0,s=d(r.parameters.apt,a),c=d(i.parameters.apt,o),!s||!c||s.name.toLowerCase()!==c.name.toLowerCase()))continue;(t=JSON.parse(JSON.stringify(t))).numChannels=Math.min(n.numChannels,t.numChannels),f.codecs.push(t),t.rtcpFeedback=t.rtcpFeedback.filter(function(e){for(var t=0;t<n.rtcpFeedback.length;t++)if(n.rtcpFeedback[t].type===e.type&&n.rtcpFeedback[t].parameter===e.parameter)return!0;return!1});break}}var r,i,a,o,s,c}),l.headerExtensions.forEach(function(e){for(var t=0;t<u.headerExtensions.length;t++){var n=u.headerExtensions[t];if(e.uri===n.uri){f.headerExtensions.push(n);break}}}),f}function a(e,t,n){return-1!=={offer:{setLocalDescription:["stable","have-local-offer"],setRemoteDescription:["stable","have-remote-offer"]},answer:{setLocalDescription:["have-remote-offer","have-local-pranswer"],setRemoteDescription:["have-local-offer","have-remote-pranswer"]}}[t][e].indexOf(n)}function L(e,t){var n=e.getRemoteCandidates().find(function(e){return t.foundation===e.foundation&&t.ip===e.ip&&t.port===e.port&&t.priority===e.priority&&t.protocol===e.protocol&&t.type===e.type});return n||e.addRemoteCandidate(t),!n}function m(e,t){var n=new Error(t);return n.name=e,n}t.exports=function($,O){function R(e,t){t.addTrack(e),t.dispatchEvent(new $.MediaStreamTrackEvent("addtrack",{track:e}))}function i(e,t,n,r){var i=new Event("track");i.track=t,i.receiver=n,i.transceiver={receiver:n},i.streams=r,$.setTimeout(function(){e._dispatchEvent("track",i)})}var r=function(e){var t,r,i,n=this,a=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){n[e]=a[e].bind(a)}),this.canTrickleIceCandidates=null,this.needNegotiation=!1,this.localStreams=[],this.remoteStreams=[],this.localDescription=null,this.remoteDescription=null,this.signalingState="stable",this.iceConnectionState="new",this.iceGatheringState="new",e=JSON.parse(JSON.stringify(e||{})),this.usingBundle="max-bundle"===e.bundlePolicy,"negotiate"===e.rtcpMuxPolicy)throw m("NotSupportedError","rtcpMuxPolicy 'negotiate' is not supported");switch(e.rtcpMuxPolicy||(e.rtcpMuxPolicy="require"),e.iceTransportPolicy){case"all":case"relay":break;default:e.iceTransportPolicy="all"}switch(e.bundlePolicy){case"balanced":case"max-compat":case"max-bundle":break;default:e.bundlePolicy="balanced"}if(e.iceServers=(t=e.iceServers||[],r=O,i=!1,(t=JSON.parse(JSON.stringify(t))).filter(function(e){if(e&&(e.urls||e.url)){var t=e.urls||e.url;e.url&&!e.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var n="string"==typeof t;return n&&(t=[t]),t=t.filter(function(e){return 0!==e.indexOf("turn:")||-1===e.indexOf("transport=udp")||-1!==e.indexOf("turn:[")||i?0===e.indexOf("stun:")&&14393<=r&&-1===e.indexOf("?transport=udp"):i=!0}),delete e.url,e.urls=n?t[0]:t,!!t.length}})),this._iceGatherers=[],e.iceCandidatePoolSize)for(var o=e.iceCandidatePoolSize;0<o;o--)this._iceGatherers.push(new $.RTCIceGatherer({iceServers:e.iceServers,gatherPolicy:e.iceTransportPolicy}));else e.iceCandidatePoolSize=0;this._config=e,this.transceivers=[],this._sdpSessionId=N.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};r.prototype.onicecandidate=null,r.prototype.onaddstream=null,r.prototype.ontrack=null,r.prototype.onremovestream=null,r.prototype.onsignalingstatechange=null,r.prototype.oniceconnectionstatechange=null,r.prototype.onicegatheringstatechange=null,r.prototype.onnegotiationneeded=null,r.prototype.ondatachannel=null,r.prototype._dispatchEvent=function(e,t){this._isClosed||(this.dispatchEvent(t),"function"==typeof this["on"+e]&&this["on"+e](t))},r.prototype._emitGatheringStateChange=function(){var e=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",e)},r.prototype.getConfiguration=function(){return this._config},r.prototype.getLocalStreams=function(){return this.localStreams},r.prototype.getRemoteStreams=function(){return this.remoteStreams},r.prototype._createTransceiver=function(e){var t=0<this.transceivers.length,n={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:e,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&t)n.iceTransport=this.transceivers[0].iceTransport,n.dtlsTransport=this.transceivers[0].dtlsTransport;else{var r=this._createIceAndDtlsTransports();n.iceTransport=r.iceTransport,n.dtlsTransport=r.dtlsTransport}return this.transceivers.push(n),n},r.prototype.addTrack=function(t,e){if(this._isClosed)throw m("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");var n;if(this.transceivers.find(function(e){return e.track===t}))throw m("InvalidAccessError","Track already exists.");for(var r=0;r<this.transceivers.length;r++)this.transceivers[r].track||this.transceivers[r].kind!==t.kind||(n=this.transceivers[r]);return n||(n=this._createTransceiver(t.kind)),this._maybeFireNegotiationNeeded(),-1===this.localStreams.indexOf(e)&&this.localStreams.push(e),n.track=t,n.stream=e,n.rtpSender=new $.RTCRtpSender(t,n.dtlsTransport),n.rtpSender},r.prototype.addStream=function(t){var n=this;if(15025<=O)t.getTracks().forEach(function(e){n.addTrack(e,t)});else{var r=t.clone();t.getTracks().forEach(function(e,t){var n=r.getTracks()[t];e.addEventListener("enabled",function(e){n.enabled=e.enabled})}),r.getTracks().forEach(function(e){n.addTrack(e,r)})}},r.prototype.removeTrack=function(t){if(this._isClosed)throw m("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(t instanceof $.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var e=this.transceivers.find(function(e){return e.rtpSender===t});if(!e)throw m("InvalidAccessError","Sender was not created by this connection.");var n=e.stream;e.rtpSender.stop(),e.rtpSender=null,e.track=null,e.stream=null,-1===this.transceivers.map(function(e){return e.stream}).indexOf(n)&&-1<this.localStreams.indexOf(n)&&this.localStreams.splice(this.localStreams.indexOf(n),1),this._maybeFireNegotiationNeeded()},r.prototype.removeStream=function(e){var n=this;e.getTracks().forEach(function(t){var e=n.getSenders().find(function(e){return e.track===t});e&&n.removeTrack(e)})},r.prototype.getSenders=function(){return this.transceivers.filter(function(e){return!!e.rtpSender}).map(function(e){return e.rtpSender})},r.prototype.getReceivers=function(){return this.transceivers.filter(function(e){return!!e.rtpReceiver}).map(function(e){return e.rtpReceiver})},r.prototype._createIceGatherer=function(n,e){var r=this;if(e&&0<n)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var i=new $.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(i,"state",{value:"new",writable:!0}),this.transceivers[n].bufferedCandidateEvents=[],this.transceivers[n].bufferCandidates=function(e){var t=!e.candidate||0===Object.keys(e.candidate).length;i.state=t?"completed":"gathering",null!==r.transceivers[n].bufferedCandidateEvents&&r.transceivers[n].bufferedCandidateEvents.push(e)},i.addEventListener("localcandidate",this.transceivers[n].bufferCandidates),i},r.prototype._gather=function(s,c){var l=this,u=this.transceivers[c].iceGatherer;if(!u.onlocalcandidate){var e=this.transceivers[c].bufferedCandidateEvents;this.transceivers[c].bufferedCandidateEvents=null,u.removeEventListener("localcandidate",this.transceivers[c].bufferCandidates),u.onlocalcandidate=function(e){if(!(l.usingBundle&&0<c)){var t=new Event("icecandidate");t.candidate={sdpMid:s,sdpMLineIndex:c};var n=e.candidate,r=!n||0===Object.keys(n).length;if(r)"new"!==u.state&&"gathering"!==u.state||(u.state="completed");else{"new"===u.state&&(u.state="gathering"),n.component=1;var i=N.writeCandidate(n);t.candidate=Object.assign(t.candidate,N.parseCandidate(i)),t.candidate.candidate=i}var a=N.splitSections(l.localDescription.sdp);a[t.candidate.sdpMLineIndex+1]+=r?"a=end-of-candidates\r\n":"a="+t.candidate.candidate+"\r\n",l.localDescription.sdp=a.join("");var o=l.transceivers.every(function(e){return e.iceGatherer&&"completed"===e.iceGatherer.state});"gathering"!==l.iceGatheringState&&(l.iceGatheringState="gathering",l._emitGatheringStateChange()),r||l._dispatchEvent("icecandidate",t),o&&(l._dispatchEvent("icecandidate",new Event("icecandidate")),l.iceGatheringState="complete",l._emitGatheringStateChange())}},$.setTimeout(function(){e.forEach(function(e){u.onlocalcandidate(e)})},0)}},r.prototype._createIceAndDtlsTransports=function(){var e=this,t=new $.RTCIceTransport(null);t.onicestatechange=function(){e._updateConnectionState()};var n=new $.RTCDtlsTransport(t);return n.ondtlsstatechange=function(){e._updateConnectionState()},n.onerror=function(){Object.defineProperty(n,"state",{value:"failed",writable:!0}),e._updateConnectionState()},{iceTransport:t,dtlsTransport:n}},r.prototype._disposeIceAndDtlsTransports=function(e){var t=this.transceivers[e].iceGatherer;t&&(delete t.onlocalcandidate,delete this.transceivers[e].iceGatherer);var n=this.transceivers[e].iceTransport;n&&(delete n.onicestatechange,delete this.transceivers[e].iceTransport);var r=this.transceivers[e].dtlsTransport;r&&(delete r.ondtlsstatechange,delete r.onerror,delete this.transceivers[e].dtlsTransport)},r.prototype._transceive=function(e,t,n){var r=p(e.localCapabilities,e.remoteCapabilities);t&&e.rtpSender&&(r.encodings=e.sendEncodingParameters,r.rtcp={cname:N.localCName,compound:e.rtcpParameters.compound},e.recvEncodingParameters.length&&(r.rtcp.ssrc=e.recvEncodingParameters[0].ssrc),e.rtpSender.send(r)),n&&e.rtpReceiver&&0<r.codecs.length&&("video"===e.kind&&e.recvEncodingParameters&&O<15019&&e.recvEncodingParameters.forEach(function(e){delete e.rtx}),e.recvEncodingParameters.length&&(r.encodings=e.recvEncodingParameters),r.rtcp={compound:e.rtcpParameters.compound},e.rtcpParameters.cname&&(r.rtcp.cname=e.rtcpParameters.cname),e.sendEncodingParameters.length&&(r.rtcp.ssrc=e.sendEncodingParameters[0].ssrc),e.rtpReceiver.receive(r))},r.prototype.setLocalDescription=function(e){var t,f,d=this;if(-1===["offer","answer"].indexOf(e.type))return Promise.reject(m("TypeError",'Unsupported type "'+e.type+'"'));if(!a("setLocalDescription",e.type,d.signalingState)||d._isClosed)return Promise.reject(m("InvalidStateError","Can not set local "+e.type+" in state "+d.signalingState));if("offer"===e.type)t=N.splitSections(e.sdp),f=t.shift(),t.forEach(function(e,t){var n=N.parseRtpParameters(e);d.transceivers[t].localCapabilities=n}),d.transceivers.forEach(function(e,t){d._gather(e.mid,t)});else if("answer"===e.type){t=N.splitSections(d.remoteDescription.sdp),f=t.shift();var h=0<N.matchPrefix(f,"a=ice-lite").length;t.forEach(function(e,t){var n=d.transceivers[t],r=n.iceGatherer,i=n.iceTransport,a=n.dtlsTransport,o=n.localCapabilities,s=n.remoteCapabilities;if(!(N.isRejected(e)&&0===N.matchPrefix(e,"a=bundle-only").length)&&!n.isDatachannel){var c=N.getIceParameters(e,f),l=N.getDtlsParameters(e,f);h&&(l.role="server"),d.usingBundle&&0!==t||(d._gather(n.mid,t),"new"===i.state&&i.start(r,c,h?"controlling":"controlled"),"new"===a.state&&a.start(l));var u=p(o,s);d._transceive(n,0<u.codecs.length,!1)}})}return d.localDescription={type:e.type,sdp:e.sdp},"offer"===e.type?d._updateSignalingState("have-local-offer"):d._updateSignalingState("stable"),Promise.resolve()},r.prototype.setRemoteDescription=function(x){var k=this;if(-1===["offer","answer"].indexOf(x.type))return Promise.reject(m("TypeError",'Unsupported type "'+x.type+'"'));if(!a("setRemoteDescription",x.type,k.signalingState)||k._isClosed)return Promise.reject(m("InvalidStateError","Can not set remote "+x.type+" in state "+k.signalingState));var E={};k.remoteStreams.forEach(function(e){E[e.id]=e});var D=[],e=N.splitSections(x.sdp),I=e.shift(),P=0<N.matchPrefix(I,"a=ice-lite").length,M=0<N.matchPrefix(I,"a=group:BUNDLE ").length;k.usingBundle=M;var t=N.matchPrefix(I,"a=ice-options:")[0];return k.canTrickleIceCandidates=!!t&&0<=t.substr(14).split(" ").indexOf("trickle"),e.forEach(function(e,t){var n=N.splitLines(e),r=N.getKind(e),i=N.isRejected(e)&&0===N.matchPrefix(e,"a=bundle-only").length,a=n[0].substr(2).split(" ")[2],o=N.getDirection(e,I),s=N.parseMsid(e),c=N.getMid(e)||N.generateIdentifier();if("application"!==r||"DTLS/SCTP"!==a){var l,u,f,d,h,p,m,g,_,b,v,y=N.parseRtpParameters(e);i||(b=N.getIceParameters(e,I),(v=N.getDtlsParameters(e,I)).role="client"),m=N.parseRtpEncodingParameters(e);var w=N.parseRtcpParameters(e),C=0<N.matchPrefix(e,"a=end-of-candidates",I).length,A=N.matchPrefix(e,"a=candidate:").map(function(e){return N.parseCandidate(e)}).filter(function(e){return 1===e.component});if(("offer"===x.type||"answer"===x.type)&&!i&&M&&0<t&&k.transceivers[t]&&(k._disposeIceAndDtlsTransports(t),k.transceivers[t].iceGatherer=k.transceivers[0].iceGatherer,k.transceivers[t].iceTransport=k.transceivers[0].iceTransport,k.transceivers[t].dtlsTransport=k.transceivers[0].dtlsTransport,k.transceivers[t].rtpSender&&k.transceivers[t].rtpSender.setTransport(k.transceivers[0].dtlsTransport),k.transceivers[t].rtpReceiver&&k.transceivers[t].rtpReceiver.setTransport(k.transceivers[0].dtlsTransport)),"offer"!==x.type||i)"answer"!==x.type||i||(u=(l=k.transceivers[t]).iceGatherer,f=l.iceTransport,d=l.dtlsTransport,h=l.rtpReceiver,p=l.sendEncodingParameters,g=l.localCapabilities,k.transceivers[t].recvEncodingParameters=m,k.transceivers[t].remoteCapabilities=y,k.transceivers[t].rtcpParameters=w,A.length&&"new"===f.state&&(!P&&!C||M&&0!==t?A.forEach(function(e){L(l.iceTransport,e)}):f.setRemoteCandidates(A)),M&&0!==t||("new"===f.state&&f.start(u,b,"controlling"),"new"===d.state&&d.start(v)),k._transceive(l,"sendrecv"===o||"recvonly"===o,"sendrecv"===o||"sendonly"===o),!h||"sendrecv"!==o&&"sendonly"!==o?delete l.rtpReceiver:(_=h.track,s?(E[s.stream]||(E[s.stream]=new $.MediaStream),R(_,E[s.stream]),D.push([_,h,E[s.stream]])):(E.default||(E.default=new $.MediaStream),R(_,E.default),D.push([_,h,E.default]))));else{(l=k.transceivers[t]||k._createTransceiver(r)).mid=c,l.iceGatherer||(l.iceGatherer=k._createIceGatherer(t,M)),A.length&&"new"===l.iceTransport.state&&(!C||M&&0!==t?A.forEach(function(e){L(l.iceTransport,e)}):l.iceTransport.setRemoteCandidates(A)),g=$.RTCRtpReceiver.getCapabilities(r),O<15019&&(g.codecs=g.codecs.filter(function(e){return"rtx"!==e.name})),p=l.sendEncodingParameters||[{ssrc:1001*(2*t+2)}];var S,T=!1;if("sendrecv"===o||"sendonly"===o){if(T=!l.rtpReceiver,h=l.rtpReceiver||new $.RTCRtpReceiver(l.dtlsTransport,r),T)_=h.track,s&&"-"===s.stream||(S=s?(E[s.stream]||(E[s.stream]=new $.MediaStream,Object.defineProperty(E[s.stream],"id",{get:function(){return s.stream}})),Object.defineProperty(_,"id",{get:function(){return s.track}}),E[s.stream]):(E.default||(E.default=new $.MediaStream),E.default)),S&&(R(_,S),l.associatedRemoteMediaStreams.push(S)),D.push([_,h,S])}else l.rtpReceiver&&l.rtpReceiver.track&&(l.associatedRemoteMediaStreams.forEach(function(e){var t,n,r=e.getTracks().find(function(e){return e.id===l.rtpReceiver.track.id});r&&(t=r,(n=e).removeTrack(t),n.dispatchEvent(new $.MediaStreamTrackEvent("removetrack",{track:t})))}),l.associatedRemoteMediaStreams=[]);l.localCapabilities=g,l.remoteCapabilities=y,l.rtpReceiver=h,l.rtcpParameters=w,l.sendEncodingParameters=p,l.recvEncodingParameters=m,k._transceive(k.transceivers[t],!1,T)}}else k.transceivers[t]={mid:c,isDatachannel:!0}}),void 0===k._dtlsRole&&(k._dtlsRole="offer"===x.type?"active":"passive"),k.remoteDescription={type:x.type,sdp:x.sdp},"offer"===x.type?k._updateSignalingState("have-remote-offer"):k._updateSignalingState("stable"),Object.keys(E).forEach(function(e){var r=E[e];if(r.getTracks().length){if(-1===k.remoteStreams.indexOf(r)){k.remoteStreams.push(r);var t=new Event("addstream");t.stream=r,$.setTimeout(function(){k._dispatchEvent("addstream",t)})}D.forEach(function(e){var t=e[0],n=e[1];r.id===e[2].id&&i(k,t,n,[r])})}}),D.forEach(function(e){e[2]||i(k,e[0],e[1],[])}),$.setTimeout(function(){k&&k.transceivers&&k.transceivers.forEach(function(e){e.iceTransport&&"new"===e.iceTransport.state&&0<e.iceTransport.getRemoteCandidates().length&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),e.iceTransport.addRemoteCandidate({}))})},4e3),Promise.resolve()},r.prototype.close=function(){this.transceivers.forEach(function(e){e.iceTransport&&e.iceTransport.stop(),e.dtlsTransport&&e.dtlsTransport.stop(),e.rtpSender&&e.rtpSender.stop(),e.rtpReceiver&&e.rtpReceiver.stop()}),this._isClosed=!0,this._updateSignalingState("closed")},r.prototype._updateSignalingState=function(e){this.signalingState=e;var t=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",t)},r.prototype._maybeFireNegotiationNeeded=function(){var t=this;"stable"===this.signalingState&&!0!==this.needNegotiation&&(this.needNegotiation=!0,$.setTimeout(function(){if(t.needNegotiation){t.needNegotiation=!1;var e=new Event("negotiationneeded");t._dispatchEvent("negotiationneeded",e)}},0))},r.prototype._updateConnectionState=function(){var e,t={new:0,closed:0,connecting:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(e){t[e.iceTransport.state]++,t[e.dtlsTransport.state]++}),t.connected+=t.completed,e="new",0<t.failed?e="failed":0<t.connecting||0<t.checking?e="connecting":0<t.disconnected?e="disconnected":0<t.new?e="new":(0<t.connected||0<t.completed)&&(e="connected"),e!==this.iceConnectionState){this.iceConnectionState=e;var n=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",n)}},r.prototype.createOffer=function(){var s=this;if(s._isClosed)return Promise.reject(m("InvalidStateError","Can not call createOffer after close"));var t=s.transceivers.filter(function(e){return"audio"===e.kind}).length,n=s.transceivers.filter(function(e){return"video"===e.kind}).length,e=arguments[0];if(e){if(e.mandatory||e.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==e.offerToReceiveAudio&&(t=!0===e.offerToReceiveAudio?1:!1===e.offerToReceiveAudio?0:e.offerToReceiveAudio),void 0!==e.offerToReceiveVideo&&(n=!0===e.offerToReceiveVideo?1:!1===e.offerToReceiveVideo?0:e.offerToReceiveVideo)}for(s.transceivers.forEach(function(e){"audio"===e.kind?--t<0&&(e.wantReceive=!1):"video"===e.kind&&--n<0&&(e.wantReceive=!1)});0<t||0<n;)0<t&&(s._createTransceiver("audio"),t--),0<n&&(s._createTransceiver("video"),n--);var r=N.writeSessionBoilerplate(s._sdpSessionId,s._sdpSessionVersion++);s.transceivers.forEach(function(e,t){var n=e.track,r=e.kind,i=e.mid||N.generateIdentifier();e.mid=i,e.iceGatherer||(e.iceGatherer=s._createIceGatherer(t,s.usingBundle));var a=$.RTCRtpSender.getCapabilities(r);O<15019&&(a.codecs=a.codecs.filter(function(e){return"rtx"!==e.name})),a.codecs.forEach(function(e){"H264"===e.name&&void 0===e.parameters["level-asymmetry-allowed"]&&(e.parameters["level-asymmetry-allowed"]="1")});var o=e.sendEncodingParameters||[{ssrc:1001*(2*t+1)}];n&&15019<=O&&"video"===r&&!o[0].rtx&&(o[0].rtx={ssrc:o[0].ssrc+1}),e.wantReceive&&(e.rtpReceiver=new $.RTCRtpReceiver(e.dtlsTransport,r)),e.localCapabilities=a,e.sendEncodingParameters=o}),"max-compat"!==s._config.bundlePolicy&&(r+="a=group:BUNDLE "+s.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n"),r+="a=ice-options:trickle\r\n",s.transceivers.forEach(function(e,t){r+=c(e,e.localCapabilities,"offer",e.stream,s._dtlsRole),r+="a=rtcp-rsize\r\n",!e.iceGatherer||"new"===s.iceGatheringState||0!==t&&s.usingBundle||(e.iceGatherer.getLocalCandidates().forEach(function(e){e.component=1,r+="a="+N.writeCandidate(e)+"\r\n"}),"completed"===e.iceGatherer.state&&(r+="a=end-of-candidates\r\n"))});var i=new $.RTCSessionDescription({type:"offer",sdp:r});return Promise.resolve(i)},r.prototype.createAnswer=function(){var i=this;if(i._isClosed)return Promise.reject(m("InvalidStateError","Can not call createAnswer after close"));var a=N.writeSessionBoilerplate(i._sdpSessionId,i._sdpSessionVersion++);i.usingBundle&&(a+="a=group:BUNDLE "+i.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n");var o=N.splitSections(i.remoteDescription.sdp).length-1;i.transceivers.forEach(function(e,t){if(!(o<t+1))if(e.isDatachannel)a+="m=application 0 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\na=mid:"+e.mid+"\r\n";else{var n;if(e.stream)"audio"===e.kind?n=e.stream.getAudioTracks()[0]:"video"===e.kind&&(n=e.stream.getVideoTracks()[0]),n&&15019<=O&&"video"===e.kind&&!e.sendEncodingParameters[0].rtx&&(e.sendEncodingParameters[0].rtx={ssrc:e.sendEncodingParameters[0].ssrc+1});var r=p(e.localCapabilities,e.remoteCapabilities);!r.codecs.filter(function(e){return"rtx"===e.name.toLowerCase()}).length&&e.sendEncodingParameters[0].rtx&&delete e.sendEncodingParameters[0].rtx,a+=c(e,r,"answer",e.stream,i._dtlsRole),e.rtcpParameters&&e.rtcpParameters.reducedSize&&(a+="a=rtcp-rsize\r\n")}});var e=new $.RTCSessionDescription({type:"answer",sdp:a});return Promise.resolve(e)},r.prototype.addIceCandidate=function(c){var l,u=this;return c&&void 0===c.sdpMLineIndex&&!c.sdpMid?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise(function(e,t){if(!u.remoteDescription)return t(m("InvalidStateError","Can not add ICE candidate without a remote description"));if(c&&""!==c.candidate){var n=c.sdpMLineIndex;if(c.sdpMid)for(var r=0;r<u.transceivers.length;r++)if(u.transceivers[r].mid===c.sdpMid){n=r;break}var i=u.transceivers[n];if(!i)return t(m("OperationError","Can not add ICE candidate"));if(i.isDatachannel)return e();var a=0<Object.keys(c.candidate).length?N.parseCandidate(c.candidate):{};if("tcp"===a.protocol&&(0===a.port||9===a.port))return e();if(a.component&&1!==a.component)return e();if((0===n||0<n&&i.iceTransport!==u.transceivers[0].iceTransport)&&!L(i.iceTransport,a))return t(m("OperationError","Can not add ICE candidate"));var o=c.candidate.trim();0===o.indexOf("a=")&&(o=o.substr(2)),(l=N.splitSections(u.remoteDescription.sdp))[n+1]+="a="+(a.type?o:"end-of-candidates")+"\r\n",u.remoteDescription.sdp=l.join("")}else for(var s=0;s<u.transceivers.length&&(u.transceivers[s].isDatachannel||(u.transceivers[s].iceTransport.addRemoteCandidate({}),(l=N.splitSections(u.remoteDescription.sdp))[s+1]+="a=end-of-candidates\r\n",u.remoteDescription.sdp=l.join(""),!u.usingBundle));s++);e()})},r.prototype.getStats=function(){var n=[];this.transceivers.forEach(function(t){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(e){t[e]&&n.push(t[e].getStats())})});return new Promise(function(t){var r=new Map;Promise.all(n).then(function(e){e.forEach(function(n){Object.keys(n).forEach(function(e){var t;n[e].type={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[(t=n[e]).type]||t.type,r.set(e,n[e])})}),t(r)})})};var e=["createOffer","createAnswer"];return e.forEach(function(e){var n=r.prototype[e];r.prototype[e]=function(){var t=arguments;return"function"==typeof t[0]||"function"==typeof t[1]?n.apply(this,[arguments[2]]).then(function(e){"function"==typeof t[0]&&t[0].apply(null,[e])},function(e){"function"==typeof t[1]&&t[1].apply(null,[e])}):n.apply(this,arguments)}}),(e=["setLocalDescription","setRemoteDescription","addIceCandidate"]).forEach(function(e){var n=r.prototype[e];r.prototype[e]=function(){var t=arguments;return"function"==typeof t[1]||"function"==typeof t[2]?n.apply(this,arguments).then(function(){"function"==typeof t[1]&&t[1].apply(null)},function(e){"function"==typeof t[2]&&t[2].apply(null,[e])}):n.apply(this,arguments)}}),["getStats"].forEach(function(e){var t=r.prototype[e];r.prototype[e]=function(){var e=arguments;return"function"==typeof e[1]?t.apply(this,arguments).then(function(){"function"==typeof e[1]&&e[1].apply(null)}):t.apply(this,arguments)}}),r}},{sdp:39}],35:[function(e,t,n){var r=t.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w\/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-\.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return null!=e.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%d trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return null!=e.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))? (\S*)(?: (\S*))?/,names:["value","direction","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+" %s"+(e.config?" %s":"")}},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_\/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return null!=e.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{push:"invalid",names:["value"]}]};Object.keys(r).forEach(function(e){r[e].forEach(function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")})})},{}],36:[function(e,t,n){var r=e("./parser"),i=e("./writer");n.write=i,n.parse=r.parse,n.parseFmtpConfig=r.parseFmtpConfig,n.parseParams=r.parseParams,n.parsePayloads=r.parsePayloads,n.parseRemoteCandidates=r.parseRemoteCandidates,n.parseImageAttributes=r.parseImageAttributes,n.parseSimulcastStreamList=r.parseSimulcastStreamList},{"./parser":37,"./writer":38}],37:[function(e,t,n){var a=function(e){return String(Number(e))===e?Number(e):e},s=function(e,t,n){var r=e.name&&e.names;e.push&&!t[e.push]?t[e.push]=[]:r&&!t[e.name]&&(t[e.name]={});var i=e.push?{}:r?t[e.name]:t;!function(e,t,n,r){if(r&&!n)t[r]=a(e[1]);else for(var i=0;i<n.length;i+=1)null!=e[i+1]&&(t[n[i]]=a(e[i+1]))}(n.match(e.reg),i,e.names,e.name),e.push&&t[e.push].push(i)},c=e("./grammar"),r=RegExp.prototype.test.bind(/^([a-z])=(.*)/);n.parse=function(e){var t={},a=[],o=t;return e.split(/(\r\n|\r|\n)/).filter(r).forEach(function(e){var t=e[0],n=e.slice(2);"m"===t&&(a.push({rtp:[],fmtp:[]}),o=a[a.length-1]);for(var r=0;r<(c[t]||[]).length;r+=1){var i=c[t][r];if(i.reg.test(n))return s(i,o,n)}}),t.media=a,t};var i=function(e,t){var n=t.split(/=(.+)/,2);return 2===n.length&&(e[n[0]]=a(n[1])),e};n.parseParams=function(e){return e.split(/\;\s?/).reduce(i,{})},n.parseFmtpConfig=n.parseParams,n.parsePayloads=function(e){return e.split(" ").map(Number)},n.parseRemoteCandidates=function(e){for(var t=[],n=e.split(" ").map(a),r=0;r<n.length;r+=3)t.push({component:n[r],ip:n[r+1],port:n[r+2]});return t},n.parseImageAttributes=function(e){return e.split(" ").map(function(e){return e.substring(1,e.length-1).split(",").reduce(i,{})})},n.parseSimulcastStreamList=function(e){return e.split(";").map(function(e){return e.split(",").map(function(e){var t,n=!1;return"~"!==e[0]?t=a(e):(t=a(e.substring(1,e.length)),n=!0),{scid:t,paused:n}})})}},{"./grammar":35}],38:[function(e,t,n){var a=e("./grammar"),o=/%[sdv%]/g,s=function(e,t,n){var r=[e+"="+(t.format instanceof Function?t.format(t.push?n:n[t.name]):t.format)];if(t.names)for(var i=0;i<t.names.length;i+=1){var a=t.names[i];t.name?r.push(n[t.name][a]):r.push(n[t.names[i]])}else r.push(n[t.name]);return function(e){var n=1,r=arguments,i=r.length;return e.replace(o,function(e){if(i<=n)return e;var t=r[n];switch(n+=1,e){case"%%":return"%";case"%s":return String(t);case"%d":return Number(t);case"%v":return""}})}.apply(null,r)},c=["v","o","s","i","u","e","p","c","b","t","r","z","a"],l=["i","c","b","a"];t.exports=function(e,t){t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),e.media.forEach(function(e){null==e.payloads&&(e.payloads="")});var n=t.outerOrder||c,r=t.innerOrder||l,i=[];return n.forEach(function(n){a[n].forEach(function(t){t.name in e&&null!=e[t.name]?i.push(s(n,t,e)):t.push in e&&null!=e[t.push]&&e[t.push].forEach(function(e){i.push(s(n,t,e))})})}),e.media.forEach(function(e){i.push(s("m",a.m[0],e)),r.forEach(function(n){a[n].forEach(function(t){t.name in e&&null!=e[t.name]?i.push(s(n,t,e)):t.push in e&&null!=e[t.push]&&e[t.push].forEach(function(e){i.push(s(n,t,e))})})})}),i.join("\r\n")+"\r\n"}},{"./grammar":35}],39:[function(e,t,n){"use strict";var u={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}};u.localCName=u.generateIdentifier(),u.splitLines=function(e){return e.trim().split("\n").map(function(e){return e.trim()})},u.splitSections=function(e){return e.split("\nm=").map(function(e,t){return(0<t?"m="+e:e).trim()+"\r\n"})},u.matchPrefix=function(e,t){return u.splitLines(e).filter(function(e){return 0===e.indexOf(t)})},u.parseCandidate=function(e){for(var t,n={foundation:(t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" "))[0],component:parseInt(t[1],10),protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],port:parseInt(t[5],10),type:t[7]},r=8;r<t.length;r+=2)switch(t[r]){case"raddr":n.relatedAddress=t[r+1];break;case"rport":n.relatedPort=parseInt(t[r+1],10);break;case"tcptype":n.tcpType=t[r+1];break;case"ufrag":n.ufrag=t[r+1],n.usernameFragment=t[r+1];break;default:n[t[r]]=t[r+1]}return n},u.writeCandidate=function(e){var t=[];t.push(e.foundation),t.push(e.component),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.ip),t.push(e.port);var n=e.type;return t.push("typ"),t.push(n),"host"!==n&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),e.ufrag&&(t.push("ufrag"),t.push(e.ufrag)),"candidate:"+t.join(" ")},u.parseIceOptions=function(e){return e.substr(14).split(" ")},u.parseRtpMap=function(e){var t=e.substr(9).split(" "),n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.numChannels=3===t.length?parseInt(t[2],10):1,n},u.writeRtpMap=function(e){var t=e.payloadType;return void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType),"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==e.numChannels?"/"+e.numChannels:"")+"\r\n"},u.parseExtmap=function(e){var t=e.substr(9).split(" ");return{id:parseInt(t[0],10),direction:0<t[0].indexOf("/")?t[0].split("/")[1]:"sendrecv",uri:t[1]}},u.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+"\r\n"},u.parseFmtp=function(e){for(var t,n={},r=e.substr(e.indexOf(" ")+1).split(";"),i=0;i<r.length;i++)n[(t=r[i].trim().split("="))[0].trim()]=t[1];return n},u.writeFmtp=function(t){var e="",n=t.payloadType;if(void 0!==t.preferredPayloadType&&(n=t.preferredPayloadType),t.parameters&&Object.keys(t.parameters).length){var r=[];Object.keys(t.parameters).forEach(function(e){r.push(e+"="+t.parameters[e])}),e+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return e},u.parseRtcpFb=function(e){var t=e.substr(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},u.writeRtcpFb=function(e){var t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(function(e){t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),t},u.parseSsrcMedia=function(e){var t=e.indexOf(" "),n={ssrc:parseInt(e.substr(7,t-7),10)},r=e.indexOf(":",t);return-1<r?(n.attribute=e.substr(t+1,r-t-1),n.value=e.substr(r+1)):n.attribute=e.substr(t+1),n},u.getMid=function(e){var t=u.matchPrefix(e,"a=mid:")[0];if(t)return t.substr(6)},u.parseFingerprint=function(e){var t=e.substr(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1]}},u.getDtlsParameters=function(e,t){return{role:"auto",fingerprints:u.matchPrefix(e+t,"a=fingerprint:").map(u.parseFingerprint)}},u.writeDtlsParameters=function(e,t){var n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(function(e){n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},u.getIceParameters=function(e,t){var n=u.splitLines(e);return{usernameFragment:(n=n.concat(u.splitLines(t))).filter(function(e){return 0===e.indexOf("a=ice-ufrag:")})[0].substr(12),password:n.filter(function(e){return 0===e.indexOf("a=ice-pwd:")})[0].substr(10)}},u.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},u.parseRtpParameters=function(e){for(var t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=u.splitLines(e)[0].split(" "),r=3;r<n.length;r++){var i=n[r],a=u.matchPrefix(e,"a=rtpmap:"+i+" ")[0];if(a){var o=u.parseRtpMap(a),s=u.matchPrefix(e,"a=fmtp:"+i+" ");switch(o.parameters=s.length?u.parseFmtp(s[0]):{},o.rtcpFeedback=u.matchPrefix(e,"a=rtcp-fb:"+i+" ").map(u.parseRtcpFb),t.codecs.push(o),o.name.toUpperCase()){case"RED":case"ULPFEC":t.fecMechanisms.push(o.name.toUpperCase())}}}return u.matchPrefix(e,"a=extmap:").forEach(function(e){t.headerExtensions.push(u.parseExtmap(e))}),t},u.writeRtpDescription=function(e,t){var n="";n+="m="+e+" ",n+=0<t.codecs.length?"9":"0",n+=" UDP/TLS/RTP/SAVPF ",n+=t.codecs.map(function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType}).join(" ")+"\r\n",n+="c=IN IP4 0.0.0.0\r\n",n+="a=rtcp:9 IN IP4 0.0.0.0\r\n",t.codecs.forEach(function(e){n+=u.writeRtpMap(e),n+=u.writeFmtp(e),n+=u.writeRtcpFb(e)});var r=0;return t.codecs.forEach(function(e){e.maxptime>r&&(r=e.maxptime)}),0<r&&(n+="a=maxptime:"+r+"\r\n"),n+="a=rtcp-mux\r\n",t.headerExtensions.forEach(function(e){n+=u.writeExtmap(e)}),n},u.parseRtpEncodingParameters=function(e){var n,r=[],t=u.parseRtpParameters(e),i=-1!==t.fecMechanisms.indexOf("RED"),a=-1!==t.fecMechanisms.indexOf("ULPFEC"),o=u.matchPrefix(e,"a=ssrc:").map(function(e){return u.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute}),s=0<o.length&&o[0].ssrc,c=u.matchPrefix(e,"a=ssrc-group:FID").map(function(e){var t=e.split(" ");return t.shift(),t.map(function(e){return parseInt(e,10)})});0<c.length&&1<c[0].length&&c[0][0]===s&&(n=c[0][1]),t.codecs.forEach(function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var t={ssrc:s,codecPayloadType:parseInt(e.parameters.apt,10),rtx:{ssrc:n}};r.push(t),i&&((t=JSON.parse(JSON.stringify(t))).fec={ssrc:n,mechanism:a?"red+ulpfec":"red"},r.push(t))}}),0===r.length&&s&&r.push({ssrc:s});var l=u.matchPrefix(e,"b=");return l.length&&(l=0===l[0].indexOf("b=TIAS:")?parseInt(l[0].substr(7),10):0===l[0].indexOf("b=AS:")?1e3*parseInt(l[0].substr(5),10)*.95-16e3:void 0,r.forEach(function(e){e.maxBitrate=l})),r},u.parseRtcpParameters=function(e){var t={},n=u.matchPrefix(e,"a=ssrc:").map(function(e){return u.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];n&&(t.cname=n.value,t.ssrc=n.ssrc);var r=u.matchPrefix(e,"a=rtcp-rsize");t.reducedSize=0<r.length,t.compound=0===r.length;var i=u.matchPrefix(e,"a=rtcp-mux");return t.mux=0<i.length,t},u.parseMsid=function(e){var t,n=u.matchPrefix(e,"a=msid:");if(1===n.length)return{stream:(t=n[0].substr(7).split(" "))[0],track:t[1]};var r=u.matchPrefix(e,"a=ssrc:").map(function(e){return u.parseSsrcMedia(e)}).filter(function(e){return"msid"===e.attribute});return 0<r.length?{stream:(t=r[0].value.split(" "))[0],track:t[1]}:void 0},u.generateSessionId=function(){return Math.random().toString().substr(2,21)},u.writeSessionBoilerplate=function(e,t){var n=void 0!==t?t:2;return"v=0\r\no=thisisadapterortc "+(e||u.generateSessionId())+" "+n+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},u.writeMediaSection=function(e,t,n,r){var i=u.writeRtpDescription(e.kind,t);if(i+=u.writeIceParameters(e.iceGatherer.getLocalParameters()),i+=u.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":"active"),i+="a=mid:"+e.mid+"\r\n",e.direction?i+="a="+e.direction+"\r\n":e.rtpSender&&e.rtpReceiver?i+="a=sendrecv\r\n":e.rtpSender?i+="a=sendonly\r\n":e.rtpReceiver?i+="a=recvonly\r\n":i+="a=inactive\r\n",e.rtpSender){var a="msid:"+r.id+" "+e.rtpSender.track.id+"\r\n";i+="a="+a,i+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+a,e.sendEncodingParameters[0].rtx&&(i+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+a,i+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return i+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+u.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(i+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+u.localCName+"\r\n"),i},u.getDirection=function(e,t){for(var n=u.splitLines(e),r=0;r<n.length;r++)switch(n[r]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return n[r].substr(2)}return t?u.getDirection(t):"sendrecv"},u.getKind=function(e){return u.splitLines(e)[0].split(" ")[0].substr(2)},u.isRejected=function(e){return"0"===e.split(" ",2)[1]},u.parseMLine=function(e){var t=u.splitLines(e)[0].split(" ");return{kind:t[0].substr(2),port:parseInt(t[1],10),protocol:t[2],fmt:t.slice(3).join(" ")}},"object"==typeof t&&(t.exports=u)},{}],40:[function(n,r,e){(function(e){"use strict";var t=n("./adapter_factory.js");r.exports=t({window:e.window})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./adapter_factory.js":41}],41:[function(h,e,t){"use strict";var p=h("./utils");e.exports=function(e,t){var n=e&&e.window,r={shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0};for(var i in t)hasOwnProperty.call(t,i)&&(r[i]=t[i]);var a=p.log,o=p.detectBrowser(n),s={browserDetails:o,extractVersion:p.extractVersion,disableLog:p.disableLog,disableWarnings:p.disableWarnings},c=h("./chrome/chrome_shim")||null,l=h("./edge/edge_shim")||null,u=h("./firefox/firefox_shim")||null,f=h("./safari/safari_shim")||null,d=h("./common_shim")||null;switch(o.browser){case"chrome":if(!c||!c.shimPeerConnection||!r.shimChrome)return a("Chrome shim is not included in this adapter release."),s;a("adapter.js shimming chrome."),s.browserShim=c,d.shimCreateObjectURL(n),c.shimGetUserMedia(n),c.shimMediaStream(n),c.shimSourceObject(n),c.shimPeerConnection(n),c.shimOnTrack(n),c.shimAddTrackRemoveTrack(n),c.shimGetSendersWithDtmf(n),d.shimRTCIceCandidate(n);break;case"firefox":if(!u||!u.shimPeerConnection||!r.shimFirefox)return a("Firefox shim is not included in this adapter release."),s;a("adapter.js shimming firefox."),s.browserShim=u,d.shimCreateObjectURL(n),u.shimGetUserMedia(n),u.shimSourceObject(n),u.shimPeerConnection(n),u.shimOnTrack(n),u.shimRemoveStream(n),d.shimRTCIceCandidate(n);break;case"edge":if(!l||!l.shimPeerConnection||!r.shimEdge)return a("MS edge shim is not included in this adapter release."),s;a("adapter.js shimming edge."),s.browserShim=l,d.shimCreateObjectURL(n),l.shimGetUserMedia(n),l.shimPeerConnection(n),l.shimReplaceTrack(n);break;case"safari":if(!f||!r.shimSafari)return a("Safari shim is not included in this adapter release."),s;a("adapter.js shimming safari."),s.browserShim=f,d.shimCreateObjectURL(n),f.shimRTCIceServerUrls(n),f.shimCallbacksAPI(n),f.shimLocalStreamsAPI(n),f.shimRemoteStreamsAPI(n),f.shimTrackEventTransceiver(n),f.shimGetUserMedia(n),f.shimCreateOfferLegacy(n),d.shimRTCIceCandidate(n);break;default:a("Unsupported browser!")}return s}},{"./chrome/chrome_shim":42,"./common_shim":44,"./edge/edge_shim":45,"./firefox/firefox_shim":47,"./safari/safari_shim":49,"./utils":50}],42:[function(e,t,n){"use strict";var c=e("../utils.js"),r=c.log;t.exports={shimGetUserMedia:e("./getusermedia"),shimMediaStream:function(e){e.MediaStream=e.MediaStream||e.webkitMediaStream},shimOnTrack:function(a){if("object"==typeof a&&a.RTCPeerConnection&&!("ontrack"in a.RTCPeerConnection.prototype)){Object.defineProperty(a.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)}});var e=a.RTCPeerConnection.prototype.setRemoteDescription;a.RTCPeerConnection.prototype.setRemoteDescription=function(){var i=this;return i._ontrackpoly||(i._ontrackpoly=function(r){r.stream.addEventListener("addtrack",function(t){var e;e=a.RTCPeerConnection.prototype.getReceivers?i.getReceivers().find(function(e){return e.track&&e.track.id===t.track.id}):{track:t.track};var n=new Event("track");n.track=t.track,n.receiver=e,n.transceiver={receiver:e},n.streams=[r.stream],i.dispatchEvent(n)}),r.stream.getTracks().forEach(function(t){var e;e=a.RTCPeerConnection.prototype.getReceivers?i.getReceivers().find(function(e){return e.track&&e.track.id===t.id}):{track:t};var n=new Event("track");n.track=t,n.receiver=e,n.transceiver={receiver:e},n.streams=[r.stream],i.dispatchEvent(n)})},i.addEventListener("addstream",i._ontrackpoly)),e.apply(i,arguments)}}},shimGetSendersWithDtmf:function(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){var r=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var i=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,t){var n=i.apply(this,arguments);return n||(n=r(this,e),this._senders.push(n)),n};var n=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){n.apply(this,arguments);var t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}var a=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var t=this;t._senders=t._senders||[],a.apply(t,[e]),e.getTracks().forEach(function(e){t._senders.push(r(t,e))})};var t=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var n=this;n._senders=n._senders||[],t.apply(n,[e]),e.getTracks().forEach(function(t){var e=n._senders.find(function(e){return e.track===t});e&&n._senders.splice(n._senders.indexOf(e),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){var o=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){var t=this,e=o.apply(t,[]);return e.forEach(function(e){e._pc=t}),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}},shimSourceObject:function(e){var n=e&&e.URL;"object"==typeof e&&(!e.HTMLMediaElement||"srcObject"in e.HTMLMediaElement.prototype||Object.defineProperty(e.HTMLMediaElement.prototype,"srcObject",{get:function(){return this._srcObject},set:function(e){var t=this;this._srcObject=e,this.src&&n.revokeObjectURL(this.src),e?(this.src=n.createObjectURL(e),e.addEventListener("addtrack",function(){t.src&&n.revokeObjectURL(t.src),t.src=n.createObjectURL(e)}),e.addEventListener("removetrack",function(){t.src&&n.revokeObjectURL(t.src),t.src=n.createObjectURL(e)})):this.src=""}}))},shimAddTrackRemoveTrackWithNative:function(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){var t=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(function(e){return t._shimmedLocalStreams[e][0]})};var r=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,t){if(!t)return r.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var n=r.apply(this,arguments);return this._shimmedLocalStreams[t.id]?-1===this._shimmedLocalStreams[t.id].indexOf(n)&&this._shimmedLocalStreams[t.id].push(n):this._shimmedLocalStreams[t.id]=[t,n],n};var i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var n=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(function(t){if(n.getSenders().find(function(e){return e.track===t}))throw new DOMException("Track already exists.","InvalidAccessError")});var t=n.getSenders();i.apply(this,arguments);var r=n.getSenders().filter(function(e){return-1===t.indexOf(e)});this._shimmedLocalStreams[e.id]=[e].concat(r)};var t=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],t.apply(this,arguments)};var a=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(n){var r=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},n&&Object.keys(this._shimmedLocalStreams).forEach(function(e){var t=r._shimmedLocalStreams[e].indexOf(n);-1!==t&&r._shimmedLocalStreams[e].splice(t,1),1===r._shimmedLocalStreams[e].length&&delete r._shimmedLocalStreams[e]}),a.apply(this,arguments)}},shimAddTrackRemoveTrack:function(o){var e=c.detectBrowser(o);if(o.RTCPeerConnection.prototype.addTrack&&65<=e.version)return this.shimAddTrackRemoveTrackWithNative(o);var n=o.RTCPeerConnection.prototype.getLocalStreams;o.RTCPeerConnection.prototype.getLocalStreams=function(){var t=this,e=n.apply(this);return t._reverseStreams=t._reverseStreams||{},e.map(function(e){return t._reverseStreams[e.id]})};var r=o.RTCPeerConnection.prototype.addStream;o.RTCPeerConnection.prototype.addStream=function(e){var n=this;if(n._streams=n._streams||{},n._reverseStreams=n._reverseStreams||{},e.getTracks().forEach(function(t){if(n.getSenders().find(function(e){return e.track===t}))throw new DOMException("Track already exists.","InvalidAccessError")}),!n._reverseStreams[e.id]){var t=new o.MediaStream(e.getTracks());n._streams[e.id]=t,n._reverseStreams[t.id]=e,e=t}r.apply(n,[e])};var i=o.RTCPeerConnection.prototype.removeStream;function a(r,e){var i=e.sdp;return Object.keys(r._reverseStreams||[]).forEach(function(e){var t=r._reverseStreams[e],n=r._streams[t.id];i=i.replace(new RegExp(n.id,"g"),t.id)}),new RTCSessionDescription({type:e.type,sdp:i})}o.RTCPeerConnection.prototype.removeStream=function(e){var t=this;t._streams=t._streams||{},t._reverseStreams=t._reverseStreams||{},i.apply(t,[t._streams[e.id]||e]),delete t._reverseStreams[t._streams[e.id]?t._streams[e.id].id:e.id],delete t._streams[e.id]},o.RTCPeerConnection.prototype.addTrack=function(t,e){var n=this;if("closed"===n.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find(function(e){return e===t}))throw new DOMException("The adapter.js addTrack polyfill only supports a single  stream which is associated with the specified track.","NotSupportedError");if(n.getSenders().find(function(e){return e.track===t}))throw new DOMException("Track already exists.","InvalidAccessError");n._streams=n._streams||{},n._reverseStreams=n._reverseStreams||{};var i=n._streams[e.id];if(i)i.addTrack(t),Promise.resolve().then(function(){n.dispatchEvent(new Event("negotiationneeded"))});else{var a=new o.MediaStream([t]);n._streams[e.id]=a,n._reverseStreams[a.id]=e,n.addStream(a)}return n.getSenders().find(function(e){return e.track===t})},["createOffer","createAnswer"].forEach(function(e){var t=o.RTCPeerConnection.prototype[e];o.RTCPeerConnection.prototype[e]=function(){var n=this,r=arguments;return arguments.length&&"function"==typeof arguments[0]?t.apply(n,[function(e){var t=a(n,e);r[0].apply(null,[t])},function(e){r[1]&&r[1].apply(null,e)},arguments[2]]):t.apply(n,arguments).then(function(e){return a(n,e)})}});var t=o.RTCPeerConnection.prototype.setLocalDescription;o.RTCPeerConnection.prototype.setLocalDescription=function(){var r,e,i;return arguments.length&&arguments[0].type&&(arguments[0]=(r=this,e=arguments[0],i=e.sdp,Object.keys(r._reverseStreams||[]).forEach(function(e){var t=r._reverseStreams[e],n=r._streams[t.id];i=i.replace(new RegExp(t.id,"g"),n.id)}),new RTCSessionDescription({type:e.type,sdp:i}))),t.apply(this,arguments)};var s=Object.getOwnPropertyDescriptor(o.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(o.RTCPeerConnection.prototype,"localDescription",{get:function(){var e=s.get.apply(this);return""===e.type?e:a(this,e)}}),o.RTCPeerConnection.prototype.removeTrack=function(t){var n,r=this;if("closed"===r.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!t._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(t._pc===r))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");r._streams=r._streams||{},Object.keys(r._streams).forEach(function(e){r._streams[e].getTracks().find(function(e){return t.track===e})&&(n=r._streams[e])}),n&&(1===n.getTracks().length?r.removeStream(r._reverseStreams[n.id]):n.removeTrack(t.track),r.dispatchEvent(new Event("negotiationneeded")))}},shimPeerConnection:function(n){var e=c.detectBrowser(n);if(n.RTCPeerConnection){var a=n.RTCPeerConnection;n.RTCPeerConnection=function(e,t){if(e&&e.iceServers){for(var n=[],r=0;r<e.iceServers.length;r++){var i=e.iceServers[r];!i.hasOwnProperty("urls")&&i.hasOwnProperty("url")?(c.deprecated("RTCIceServer.url","RTCIceServer.urls"),(i=JSON.parse(JSON.stringify(i))).urls=i.url,n.push(i)):n.push(e.iceServers[r])}e.iceServers=n}return new a(e,t)},n.RTCPeerConnection.prototype=a.prototype,Object.defineProperty(n.RTCPeerConnection,"generateCertificate",{get:function(){return a.generateCertificate}})}else n.RTCPeerConnection=function(e,t){return r("PeerConnection"),e&&e.iceTransportPolicy&&(e.iceTransports=e.iceTransportPolicy),new n.webkitRTCPeerConnection(e,t)},n.RTCPeerConnection.prototype=n.webkitRTCPeerConnection.prototype,n.webkitRTCPeerConnection.generateCertificate&&Object.defineProperty(n.RTCPeerConnection,"generateCertificate",{get:function(){return n.webkitRTCPeerConnection.generateCertificate}});var s=n.RTCPeerConnection.prototype.getStats;n.RTCPeerConnection.prototype.getStats=function(e,t,n){var r=this,i=arguments;if(0<arguments.length&&"function"==typeof e)return s.apply(this,arguments);if(0===s.length&&(0===arguments.length||"function"!=typeof e))return s.apply(this,[]);var a=function(e){var r={};return e.result().forEach(function(t){var n={id:t.id,timestamp:t.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[t.type]||t.type};t.names().forEach(function(e){n[e]=t.stat(e)}),r[n.id]=n}),r},o=function(t){return new Map(Object.keys(t).map(function(e){return[e,t[e]]}))};if(2<=arguments.length){return s.apply(this,[function(e){i[1](o(a(e)))},e])}return new Promise(function(t,e){s.apply(r,[function(e){t(o(a(e)))},e])}).then(t,n)},e.version<51&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var i=n.RTCPeerConnection.prototype[e];n.RTCPeerConnection.prototype[e]=function(){var n=arguments,r=this,e=new Promise(function(e,t){i.apply(r,[n[0],e,t])});return n.length<2?e:e.then(function(){n[1].apply(null,[])},function(e){3<=n.length&&n[2].apply(null,[e])})}}),e.version<52&&["createOffer","createAnswer"].forEach(function(e){var i=n.RTCPeerConnection.prototype[e];n.RTCPeerConnection.prototype[e]=function(){var n=this;if(arguments.length<1||1===arguments.length&&"object"==typeof arguments[0]){var r=1===arguments.length?arguments[0]:void 0;return new Promise(function(e,t){i.apply(n,[e,t,r])})}return i.apply(this,arguments)}}),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var t=n.RTCPeerConnection.prototype[e];n.RTCPeerConnection.prototype[e]=function(){return arguments[0]=new("addIceCandidate"===e?n.RTCIceCandidate:n.RTCSessionDescription)(arguments[0]),t.apply(this,arguments)}});var t=n.RTCPeerConnection.prototype.addIceCandidate;n.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?t.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}}},{"../utils.js":50,"./getusermedia":43}],43:[function(e,t,n){"use strict";var a=e("../utils.js"),l=a.log;t.exports=function(e){var o=a.detectBrowser(e),s=e&&e.navigator,c=function(i){if("object"!=typeof i||i.mandatory||i.optional)return i;var a={};return Object.keys(i).forEach(function(t){if("require"!==t&&"advanced"!==t&&"mediaSource"!==t){var n="object"==typeof i[t]?i[t]:{ideal:i[t]};void 0!==n.exact&&"number"==typeof n.exact&&(n.min=n.max=n.exact);var r=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==n.ideal){a.optional=a.optional||[];var e={};"number"==typeof n.ideal?(e[r("min",t)]=n.ideal,a.optional.push(e),(e={})[r("max",t)]=n.ideal):e[r("",t)]=n.ideal,a.optional.push(e)}void 0!==n.exact&&"number"!=typeof n.exact?(a.mandatory=a.mandatory||{},a.mandatory[r("",t)]=n.exact):["min","max"].forEach(function(e){void 0!==n[e]&&(a.mandatory=a.mandatory||{},a.mandatory[r(e,t)]=n[e])})}}),i.advanced&&(a.optional=(a.optional||[]).concat(i.advanced)),a},r=function(n,r){if(61<=o.version)return r(n);if((n=JSON.parse(JSON.stringify(n)))&&"object"==typeof n.audio){var e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};e((n=JSON.parse(JSON.stringify(n))).audio,"autoGainControl","googAutoGainControl"),e(n.audio,"noiseSuppression","googNoiseSuppression"),n.audio=c(n.audio)}if(n&&"object"==typeof n.video){var i=n.video.facingMode;i=i&&("object"==typeof i?i:{ideal:i});var a,t=o.version<66;if(i&&("user"===i.exact||"environment"===i.exact||"user"===i.ideal||"environment"===i.ideal)&&(!s.mediaDevices.getSupportedConstraints||!s.mediaDevices.getSupportedConstraints().facingMode||t))if(delete n.video.facingMode,"environment"===i.exact||"environment"===i.ideal?a=["back","rear"]:"user"!==i.exact&&"user"!==i.ideal||(a=["front"]),a)return s.mediaDevices.enumerateDevices().then(function(e){var t=(e=e.filter(function(e){return"videoinput"===e.kind})).find(function(t){return a.some(function(e){return-1!==t.label.toLowerCase().indexOf(e)})});return!t&&e.length&&-1!==a.indexOf("back")&&(t=e[e.length-1]),t&&(n.video.deviceId=i.exact?{exact:t.deviceId}:{ideal:t.deviceId}),n.video=c(n.video),l("chrome: "+JSON.stringify(n)),r(n)});n.video=c(n.video)}return l("chrome: "+JSON.stringify(n)),r(n)},i=function(e){return{name:{PermissionDeniedError:"NotAllowedError",InvalidStateError:"NotReadableError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotReadableError",MediaDeviceKillSwitchOn:"NotReadableError"}[e.name]||e.name,message:e.message,constraint:e.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}};s.getUserMedia=function(e,t,n){r(e,function(e){s.webkitGetUserMedia(e,t,function(e){n&&n(i(e))})})};var t=function(n){return new Promise(function(e,t){s.getUserMedia(n,e,t)})};if(s.mediaDevices||(s.mediaDevices={getUserMedia:t,enumerateDevices:function(){return new Promise(function(t){var n={audio:"audioinput",video:"videoinput"};return e.MediaStreamTrack.getSources(function(e){t(e.map(function(e){return{label:e.label,kind:n[e.kind],deviceId:e.id,groupId:""}}))})})},getSupportedConstraints:function(){return{deviceId:!0,echoCancellation:!0,facingMode:!0,frameRate:!0,height:!0,width:!0}}}),s.mediaDevices.getUserMedia){var n=s.mediaDevices.getUserMedia.bind(s.mediaDevices);s.mediaDevices.getUserMedia=function(e){return r(e,function(t){return n(t).then(function(e){if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(function(e){e.stop()}),new DOMException("","NotFoundError");return e},function(e){return Promise.reject(i(e))})})}}else s.mediaDevices.getUserMedia=function(e){return t(e)};void 0===s.mediaDevices.addEventListener&&(s.mediaDevices.addEventListener=function(){l("Dummy mediaDevices.addEventListener called.")}),void 0===s.mediaDevices.removeEventListener&&(s.mediaDevices.removeEventListener=function(){l("Dummy mediaDevices.removeEventListener called.")})}},{"../utils.js":50}],44:[function(e,t,n){"use strict";var a=e("sdp"),c=e("./utils");t.exports={shimRTCIceCandidate:function(t){if(!(t.RTCIceCandidate&&"foundation"in t.RTCIceCandidate.prototype)){var i=t.RTCIceCandidate;t.RTCIceCandidate=function(e){"object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substr(2));var t=new i(e),n=a.parseCandidate(e.candidate),r=Object.assign(t,n);return r.toJSON=function(){return{candidate:r.candidate,sdpMid:r.sdpMid,sdpMLineIndex:r.sdpMLineIndex,usernameFragment:r.usernameFragment}},r},function(e,r,i){if(e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype,a=t.addEventListener;t.addEventListener=function(e,t){if(e!==r)return a.apply(this,arguments);var n=function(e){t(i(e))};return this._eventMap=this._eventMap||{},this._eventMap[t]=n,a.apply(this,[e,n])};var o=t.removeEventListener;t.removeEventListener=function(e,t){if(e!==r||!this._eventMap||!this._eventMap[t])return o.apply(this,arguments);var n=this._eventMap[t];return delete this._eventMap[t],o.apply(this,[e,n])},Object.defineProperty(t,"on"+r,{get:function(){return this["_on"+r]},set:function(e){this["_on"+r]&&(this.removeEventListener(r,this["_on"+r]),delete this["_on"+r]),e&&this.addEventListener(r,this["_on"+r]=e)}})}}(t,"icecandidate",function(e){return e.candidate&&Object.defineProperty(e,"candidate",{value:new t.RTCIceCandidate(e.candidate),writable:"false"}),e})}},shimCreateObjectURL:function(e){var t=e&&e.URL;if("object"==typeof e&&e.HTMLMediaElement&&"srcObject"in e.HTMLMediaElement.prototype&&t.createObjectURL&&t.revokeObjectURL){var n=t.createObjectURL.bind(t),r=t.revokeObjectURL.bind(t),i=new Map,a=0;t.createObjectURL=function(e){if("getTracks"in e){var t="polyblob:"+ ++a;return i.set(t,e),c.deprecated("URL.createObjectURL(stream)","elem.srcObject = stream"),t}return n(e)},t.revokeObjectURL=function(e){r(e),i.delete(e)};var o=Object.getOwnPropertyDescriptor(e.HTMLMediaElement.prototype,"src");Object.defineProperty(e.HTMLMediaElement.prototype,"src",{get:function(){return o.get.apply(this)},set:function(e){return this.srcObject=i.get(e)||null,o.set.apply(this,[e])}});var s=e.HTMLMediaElement.prototype.setAttribute;e.HTMLMediaElement.prototype.setAttribute=function(){return 2===arguments.length&&"src"===(""+arguments[0]).toLowerCase()&&(this.srcObject=i.get(arguments[1])||null),s.apply(this,arguments)}}}}},{"./utils":50,sdp:39}],45:[function(e,t,n){"use strict";var r=e("../utils"),i=e("rtcpeerconnection-shim");t.exports={shimGetUserMedia:e("./getusermedia"),shimPeerConnection:function(e){var t=r.detectBrowser(e);if(e.RTCIceGatherer&&(e.RTCIceCandidate||(e.RTCIceCandidate=function(e){return e}),e.RTCSessionDescription||(e.RTCSessionDescription=function(e){return e}),t.version<15025)){var n=Object.getOwnPropertyDescriptor(e.MediaStreamTrack.prototype,"enabled");Object.defineProperty(e.MediaStreamTrack.prototype,"enabled",{set:function(e){n.set.call(this,e);var t=new Event("enabled");t.enabled=e,this.dispatchEvent(t)}})}!e.RTCRtpSender||"dtmf"in e.RTCRtpSender.prototype||Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=new e.RTCDtmfSender(this):"video"===this.track.kind&&(this._dtmf=null)),this._dtmf}}),e.RTCPeerConnection=i(e,t.version)},shimReplaceTrack:function(e){!e.RTCRtpSender||"replaceTrack"in e.RTCRtpSender.prototype||(e.RTCRtpSender.prototype.replaceTrack=e.RTCRtpSender.prototype.setTrack)}}},{"../utils":50,"./getusermedia":46,"rtcpeerconnection-shim":34}],46:[function(e,t,n){"use strict";t.exports=function(e){var t=e&&e.navigator,n=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(e){return n(e).catch(function(e){return Promise.reject({name:{PermissionDeniedError:"NotAllowedError"}[(t=e).name]||t.name,message:t.message,constraint:t.constraint,toString:function(){return this.name}});var t})}}},{}],47:[function(e,t,n){"use strict";var r=e("../utils");t.exports={shimGetUserMedia:e("./getusermedia"),shimOnTrack:function(e){"object"!=typeof e||!e.RTCPeerConnection||"ontrack"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=e),this.addEventListener("addstream",this._ontrackpoly=function(n){n.stream.getTracks().forEach(function(e){var t=new Event("track");t.track=e,t.receiver={track:e},t.transceiver={receiver:t.receiver},t.streams=[n.stream],this.dispatchEvent(t)}.bind(this))}.bind(this))}}),"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},shimSourceObject:function(e){"object"==typeof e&&(!e.HTMLMediaElement||"srcObject"in e.HTMLMediaElement.prototype||Object.defineProperty(e.HTMLMediaElement.prototype,"srcObject",{get:function(){return this.mozSrcObject},set:function(e){this.mozSrcObject=e}}))},shimPeerConnection:function(s){var c=r.detectBrowser(s);if("object"==typeof s&&(s.RTCPeerConnection||s.mozRTCPeerConnection)){s.RTCPeerConnection||(s.RTCPeerConnection=function(e,t){if(c.version<38&&e&&e.iceServers){for(var n=[],r=0;r<e.iceServers.length;r++){var i=e.iceServers[r];if(i.hasOwnProperty("urls"))for(var a=0;a<i.urls.length;a++){var o={url:i.urls[a]};0===i.urls[a].indexOf("turn")&&(o.username=i.username,o.credential=i.credential),n.push(o)}else n.push(e.iceServers[r])}e.iceServers=n}return new s.mozRTCPeerConnection(e,t)},s.RTCPeerConnection.prototype=s.mozRTCPeerConnection.prototype,s.mozRTCPeerConnection.generateCertificate&&Object.defineProperty(s.RTCPeerConnection,"generateCertificate",{get:function(){return s.mozRTCPeerConnection.generateCertificate}}),s.RTCSessionDescription=s.mozRTCSessionDescription,s.RTCIceCandidate=s.mozRTCIceCandidate),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var t=s.RTCPeerConnection.prototype[e];s.RTCPeerConnection.prototype[e]=function(){return arguments[0]=new("addIceCandidate"===e?s.RTCIceCandidate:s.RTCSessionDescription)(arguments[0]),t.apply(this,arguments)}});var e=s.RTCPeerConnection.prototype.addIceCandidate;s.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?e.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())};var a={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},n=s.RTCPeerConnection.prototype.getStats;s.RTCPeerConnection.prototype.getStats=function(e,i,t){return n.apply(this,[e||null]).then(function(n){var t,r;if(c.version<48&&(t=n,r=new Map,Object.keys(t).forEach(function(e){r.set(e,t[e]),r[e]=t[e]}),n=r),c.version<53&&!i)try{n.forEach(function(e){e.type=a[e.type]||e.type})}catch(e){if("TypeError"!==e.name)throw e;n.forEach(function(e,t){n.set(t,Object.assign({},e,{type:a[e.type]||e.type}))})}return n}).then(i,t)}}},shimRemoveStream:function(e){!e.RTCPeerConnection||"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(t){var n=this;r.deprecated("removeStream","removeTrack"),this.getSenders().forEach(function(e){e.track&&-1!==t.getTracks().indexOf(e.track)&&n.removeTrack(e)})})}}},{"../utils":50,"./getusermedia":48}],48:[function(e,t,n){"use strict";var d=e("../utils"),h=d.log;t.exports=function(e){var i=d.detectBrowser(e),a=e&&e.navigator,t=e&&e.MediaStreamTrack,o=function(e){return{name:{InternalError:"NotReadableError",NotSupportedError:"TypeError",PermissionDeniedError:"NotAllowedError",SecurityError:"NotAllowedError"}[e.name]||e.name,message:{"The operation is insecure.":"The request is not allowed by the user agent or the platform in the current context."}[e.message]||e.message,constraint:e.constraint,toString:function(){return this.name+(this.message&&": ")+this.message}}},r=function(e,t,n){var r=function(r){if("object"!=typeof r||r.require)return r;var i=[];return Object.keys(r).forEach(function(e){if("require"!==e&&"advanced"!==e&&"mediaSource"!==e){var t=r[e]="object"==typeof r[e]?r[e]:{ideal:r[e]};if(void 0===t.min&&void 0===t.max&&void 0===t.exact||i.push(e),void 0!==t.exact&&("number"==typeof t.exact?t.min=t.max=t.exact:r[e]=t.exact,delete t.exact),void 0!==t.ideal){r.advanced=r.advanced||[];var n={};"number"==typeof t.ideal?n[e]={min:t.ideal,max:t.ideal}:n[e]=t.ideal,r.advanced.push(n),delete t.ideal,Object.keys(t).length||delete r[e]}}}),i.length&&(r.require=i),r};return e=JSON.parse(JSON.stringify(e)),i.version<38&&(h("spec: "+JSON.stringify(e)),e.audio&&(e.audio=r(e.audio)),e.video&&(e.video=r(e.video)),h("ff37: "+JSON.stringify(e))),a.mozGetUserMedia(e,t,function(e){n(o(e))})};if(a.mediaDevices||(a.mediaDevices={getUserMedia:function(n){return new Promise(function(e,t){r(n,e,t)})},addEventListener:function(){},removeEventListener:function(){}}),a.mediaDevices.enumerateDevices=a.mediaDevices.enumerateDevices||function(){return new Promise(function(e){e([{kind:"audioinput",deviceId:"default",label:"",groupId:""},{kind:"videoinput",deviceId:"default",label:"",groupId:""}])})},i.version<41){var n=a.mediaDevices.enumerateDevices.bind(a.mediaDevices);a.mediaDevices.enumerateDevices=function(){return n().then(void 0,function(e){if("NotFoundError"===e.name)return[];throw e})}}if(i.version<49){var s=a.mediaDevices.getUserMedia.bind(a.mediaDevices);a.mediaDevices.getUserMedia=function(t){return s(t).then(function(e){if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(function(e){e.stop()}),new DOMException("The object can not be found here.","NotFoundError");return e},function(e){return Promise.reject(o(e))})}}if(!(55<i.version&&"autoGainControl"in a.mediaDevices.getSupportedConstraints())){var c=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},l=a.mediaDevices.getUserMedia.bind(a.mediaDevices);if(a.mediaDevices.getUserMedia=function(e){return"object"==typeof e&&"object"==typeof e.audio&&(e=JSON.parse(JSON.stringify(e)),c(e.audio,"autoGainControl","mozAutoGainControl"),c(e.audio,"noiseSuppression","mozNoiseSuppression")),l(e)},t&&t.prototype.getSettings){var u=t.prototype.getSettings;t.prototype.getSettings=function(){var e=u.apply(this,arguments);return c(e,"mozAutoGainControl","autoGainControl"),c(e,"mozNoiseSuppression","noiseSuppression"),e}}if(t&&t.prototype.applyConstraints){var f=t.prototype.applyConstraints;t.prototype.applyConstraints=function(e){return"audio"===this.kind&&"object"==typeof e&&(e=JSON.parse(JSON.stringify(e)),c(e,"autoGainControl","mozAutoGainControl"),c(e,"noiseSuppression","mozNoiseSuppression")),f.apply(this,[e])}}}a.getUserMedia=function(e,t,n){if(i.version<44)return r(e,t,n);d.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),a.mediaDevices.getUserMedia(e).then(t,n)}}},{"../utils":50}],49:[function(e,t,n){"use strict";var o=e("../utils");t.exports={shimLocalStreamsAPI:function(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),"getStreamById"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getStreamById=function(t){var n=null;return this._localStreams&&this._localStreams.forEach(function(e){e.id===t&&(n=e)}),this._remoteStreams&&this._remoteStreams.forEach(function(e){e.id===t&&(n=e)}),n}),!("addStream"in e.RTCPeerConnection.prototype)){var r=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(t){this._localStreams||(this._localStreams=[]),-1===this._localStreams.indexOf(t)&&this._localStreams.push(t);var n=this;t.getTracks().forEach(function(e){r.call(n,e,t)})},e.RTCPeerConnection.prototype.addTrack=function(e,t){return t&&(this._localStreams?-1===this._localStreams.indexOf(t)&&this._localStreams.push(t):this._localStreams=[t]),r.call(this,e,t)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);var t=this._localStreams.indexOf(e);if(-1!==t){this._localStreams.splice(t,1);var n=this,r=e.getTracks();this.getSenders().forEach(function(e){-1!==r.indexOf(e.track)&&n.removeTrack(e)})}})}},shimRemoteStreamsAPI:function(e){"object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),"onaddstream"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=function(e){var t=e.streams[0];if(this._remoteStreams||(this._remoteStreams=[]),!(0<=this._remoteStreams.indexOf(t))){this._remoteStreams.push(t);var n=new Event("addstream");n.stream=e.streams[0],this.dispatchEvent(n)}}.bind(this))}}))},shimCallbacksAPI:function(e){if("object"==typeof e&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype,i=t.createOffer,a=t.createAnswer,o=t.setLocalDescription,s=t.setRemoteDescription,c=t.addIceCandidate;t.createOffer=function(e,t){var n=2<=arguments.length?arguments[2]:e,r=i.apply(this,[n]);return t?(r.then(e,t),Promise.resolve()):r},t.createAnswer=function(e,t){var n=2<=arguments.length?arguments[2]:e,r=a.apply(this,[n]);return t?(r.then(e,t),Promise.resolve()):r};var n=function(e,t,n){var r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=n,n=function(e,t,n){var r=s.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=n,n=function(e,t,n){var r=c.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=n}},shimGetUserMedia:function(e){var r=e&&e.navigator;r.getUserMedia||(r.webkitGetUserMedia?r.getUserMedia=r.webkitGetUserMedia.bind(r):r.mediaDevices&&r.mediaDevices.getUserMedia&&(r.getUserMedia=function(e,t,n){r.mediaDevices.getUserMedia(e).then(t,n)}.bind(r)))},shimRTCIceServerUrls:function(e){var a=e.RTCPeerConnection;e.RTCPeerConnection=function(e,t){if(e&&e.iceServers){for(var n=[],r=0;r<e.iceServers.length;r++){var i=e.iceServers[r];!i.hasOwnProperty("urls")&&i.hasOwnProperty("url")?(o.deprecated("RTCIceServer.url","RTCIceServer.urls"),(i=JSON.parse(JSON.stringify(i))).urls=i.url,delete i.url,n.push(i)):n.push(e.iceServers[r])}e.iceServers=n}return new a(e,t)},e.RTCPeerConnection.prototype=a.prototype,"generateCertificate"in e.RTCPeerConnection&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return a.generateCertificate}})},shimTrackEventTransceiver:function(e){"object"==typeof e&&e.RTCPeerConnection&&"receiver"in e.RTCTrackEvent.prototype&&!e.RTCTransceiver&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},shimCreateOfferLegacy:function(e){var r=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){var t=this.getTransceivers().find(function(e){return e.sender.track&&"audio"===e.sender.track.kind});!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection("sendonly"):"recvonly"===t.direction&&t.setDirection("inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio");var n=this.getTransceivers().find(function(e){return e.sender.track&&"video"===e.sender.track.kind});!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection("sendonly"):"recvonly"===n.direction&&n.setDirection("inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video")}return r.apply(this,arguments)}}}},{"../utils":50}],50:[function(e,t,n){"use strict";var r=!0,i=!0;function a(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}t.exports={extractVersion:a,disableLog:function(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(r=e)?"adapter.js logging disabled":"adapter.js logging enabled"},disableWarnings:function(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(i=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))},log:function(){if("object"==typeof window){if(r)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}},deprecated:function(e,t){i&&console.warn(e+" is deprecated, please use "+t+" instead.")},detectBrowser:function(e){var t=e&&e.navigator,n={browser:null,version:null};if(void 0===e||!e.navigator)return n.browser="Not a browser.",n;if(t.mozGetUserMedia)n.browser="firefox",n.version=a(t.userAgent,/Firefox\/(\d+)\./,1);else if(t.webkitGetUserMedia)if(e.webkitRTCPeerConnection)n.browser="chrome",n.version=a(t.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else{if(!t.userAgent.match(/Version\/(\d+).(\d+)/))return n.browser="Unsupported webkit-based browser with GUM support but no WebRTC support.",n;n.browser="safari",n.version=a(t.userAgent,/AppleWebKit\/(\d+)\./,1)}else if(t.mediaDevices&&t.userAgent.match(/Edge\/(\d+).(\d+)$/))n.browser="edge",n.version=a(t.userAgent,/Edge\/(\d+).(\d+)$/,2);else{if(!t.mediaDevices||!t.userAgent.match(/AppleWebKit\/(\d+)\./))return n.browser="Not a supported browser.",n;n.browser="safari",n.version=a(t.userAgent,/AppleWebKit\/(\d+)\./,1)}return n}}},{}],51:[function(e,t,n){t.exports={name:"jssip",title:"JsSIP",description:"the Javascript SIP library",version:"3.2.11",homepage:"http://jssip.net",author:"José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)",contributors:["Iñaki Baz Castillo <ibc@aliax.net> (https://github.com/ibc)","Saúl Ibarra Corretgé <saghul@gmail.com> (https://github.com/saghul)"],main:"lib-es5/JsSIP.js",keywords:["sip","websocket","webrtc","node","browser","library"],license:"MIT",repository:{type:"git",url:"https://github.com/versatica/JsSIP.git"},bugs:{url:"https://github.com/versatica/JsSIP/issues"},dependencies:{debug:"^3.1.0",events:"^2.0.0","sdp-transform":"^2.4.1","webrtc-adapter":"^6.1.5"},devDependencies:{"ansi-colors":"^1.1.0","babel-core":"^6.26.0","babel-preset-env":"^1.6.1",browserify:"^16.2.0",eslint:"^4.19.1","fancy-log":"^1.3.2",gulp:"^4.0.0","gulp-babel":"^7.0.1","gulp-eslint":"^4.0.2","gulp-expect-file":"0.0.7","gulp-header":"^2.0.5","gulp-nodeunit-runner":"^0.2.2","gulp-plumber":"^1.2.0","gulp-rename":"^1.2.2","gulp-uglify":"^3.0.0",pegjs:"^0.7.0","vinyl-buffer":"^1.0.1","vinyl-source-stream":"^2.0.0"},scripts:{test:"gulp test",prepublishOnly:"gulp babel"}}},{}]},{},[8])(8)}),function(e,t){function n(i){return{scope:{selectedTemplate:"=",selectedTemplateName:"=",dateStart:"=?",dateEnd:"=?",firstDayOfWeek:"=?",showTemplate:"=?",mdOnSelect:"&",localizationMap:"=?",customTemplates:"=?",disableTemplates:"@",maxRange:"=?",onePanel:"=?",isDisabledDate:"&?",format:"=?"},template:'<div class="md-date-range-picker md-whiteframe-1dp" ng-class="{\'md-date-range-picker__one-panel\':onePanel}"><div layout="column"><div layout="row" layout-margin><div class="md-date-range-picker__calendar-wrapper"><div class="md-date-range-picker__month-year" layout="row" layout-align="center center"><div flex layout="column" layout-align="center center"><span aria-label="Previous Month" class="md-button md-icon-button" event-key="prev"><md-icon md-svg-src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4="></md-icon></span></div><md-select md-container-class="md-date-range-picker__select" md-on-close="updateActiveDate()" ng-model="activeMonth" placeholder="{{::getLocalizationVal(\'Month\')}}" class="md-no-underline"><md-option ng-value="::month.id" ng-repeat="month in months" ng-bind="::month.name"></md-option></md-select><md-select md-container-class="md-date-range-picker__select" md-on-close="updateActiveDate()" ng-model="activeYear" placeholder="{{::getLocalizationVal(\'Year\')}}" class="md-no-underline"><md-option ng-value="::year.id" ng-repeat="year in years" ng-bind="::year.name"></md-option></md-select><div flex layout="column" layout-align="center center" class="hide-gt-sm show-sm show-xs"><span aria-label="Next Month" class="md-icon-button md-button" event-key="next"><md-icon style="transform: rotate(-180deg)" md-svg-src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4="></md-icon></span></div><div flex ng-if="onePanel" layout="column" layout-align="center center" class="hide-sm hide-xs show-gt-sm"><span aria-label="Next Month" class="md-icon-button md-button" event-key="next"><md-icon style="transform: rotate(-180deg)" md-svg-src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4="></md-icon></span></div><div flex ng-if="!onePanel" layout="column" layout-align="center center" class="hide-sm hide-xs show-gt-sm"><span aria-label="Next Month" ng-disabled="true" aria-hidden="true" class="md-icon-button md-button"><md-icon></md-icon></span></div></div><div class="md-date-range-picker__week" style="font-size: 0"><span class="md-date-range-picker__calendar__grid" ng-repeat="day in days">{{::day.name}}</span></div><div class="md-date-range-picker__calendar"><span ng-repeat="date in dates" class="md-date-range-picker__calendar__grid" ng-class="{\'md-date-range-picker__calendar__selected\':inSelectedDateRange(date),\'md-date-range-picker__calendar__start\':isSelectedStartDate(date),\'md-date-range-picker__calendar__end\':isSelectedEndDate(date),\'md-date-range-picker__calendar__not-in-active-month\': !inCurrentMonth(date),\'md-date-range-picker__calendar__today\' : isToday(date),\'md-date-range-picker__calendar__disabled\': !isInMaxRange(date) || isDisabledDate({$date:date})}" event-key="date1" event-param="{{$index}}"><span event-key="date1" event-param="{{$index}}" class="md-date-range-picker__calendar__selection" ng-bind="{{::date.getDate()}}"></span></span></div></div><div ng-show="!onePanel" class="md-date-range-picker__calendar-wrapper hide-sm hide-xs show-gt-sm"><div class="md-date-range-picker__month-year" layout="row" layout-align="center center"><div flex layout="column" layout-align="center center" style="visibility: hidden"><span aria-label="Previous Month" class="md-button md-icon-button" event-key="prev"><md-icon md-svg-src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4="></md-icon></span></div><md-select md-container-class="md-date-range-picker__select" md-on-close="updateActiveDate(true)" ng-model="activeMonth2" placeholder="{{::getLocalizationVal(\'Month\')}}" class="md-no-underline"><md-option ng-value="::month.id" ng-repeat="month in months" ng-bind="::month.name"></md-option></md-select><md-select md-container-class="md-date-range-picker__select" md-on-close="updateActiveDate(true)" ng-model="activeYear2" placeholder="{{::getLocalizationVal(\'Year\')}}" class="md-no-underline"><md-option ng-value="::year.id" ng-repeat="year in years" ng-bind="::year.name"></md-option></md-select><div flex layout="column" layout-align="center center"><span aria-label="Next Month" class="md-icon-button md-button" event-key="next"><md-icon style="transform: rotate(-180deg)" md-svg-src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4="></md-icon></span></div></div><div class="md-date-range-picker__week" style="font-size: 0" ng-if="!onePanel"><span class="md-date-range-picker__calendar__grid" ng-repeat="day in days">{{::day.name}}</span></div><div class="md-date-range-picker__calendar"><span ng-repeat="date in dates2" class="md-date-range-picker__calendar__grid" ng-class="{\'md-date-range-picker__calendar__selected\':inSelectedDateRange(date), \'md-date-range-picker__calendar__start\':isSelectedStartDate(date), \'md-date-range-picker__calendar__end\':isSelectedEndDate(date), \'md-date-range-picker__calendar__not-in-active-month\': !inCurrentMonth(date, true), \'md-date-range-picker__calendar__today\' : isToday(date),\'md-date-range-picker__calendar__disabled\': !isInMaxRange(date) || isDisabledDate({$date:date}) }" event-key="date2" event-param="{{$index}}"><span event-key="date2" event-param="{{$index}}" class="md-date-range-picker__calendar__selection" ng-bind="{{::date.getDate()}}"></span></span></div></div></div><div class="md-date-range-picker__templates" ng-if="showTemplate"><div ng-if="!onePanel && !maxRange" class="hide-xs hide-sm show-gt-sm" layout="row" layout-align="center center" layout-wrap><div ng-repeat="(tmpltKey,tmpltName) in selectionTemplate" class="md-button" aria-label="{{::tmpltName}}" ng-class="selectedTemplate === tmpltKey ? \'md-primary md-raised\' : \'\'" event-key="{{tmpltKey}}" ng-bind="::tmpltName" flex="20"></div><div ng-repeat="tmplt in customTemplates" class="md-button" aria-label="{{::tmplt.name}}" ng-class="selectedTemplate === tmplt.name ? \'md-primary md-raised\' : \'\'" ng-click="selectCustomRange(tmplt.name,tmplt)" event-key="Custom Template" ng-bind="::tmplt.name" flex="20"></div></div><div ng-if="!maxRange" ng-class="{\'hide-gt-sm\':!onePanel}" layout="column" layout-padding><md-input-container><label>{{::getLocalizationVal(\'Date Range Template\')}}</label><md-select md-container-class="md-date-range-picker__select" class="md-block" placeholder="{{::getLocalizationVal(\'Custom Date Range\')}}" ng-model="selectedTemplate"><md-option value=""></md-option><md-option ng-repeat="(tmpltKey,tmpltName) in selectionTemplate track by tmpltKey" aria-label="{{::tmpltName}}" ng-click="actionByKey(tmpltKey,null)" ng-bind="::tmpltName" value="{{tmpltKey}}"></md-option><md-option ng-repeat="tmplt in customTemplates" aria-label="{{::tmplt.name}}" ng-click="selectCustomRange(tmplt.name,tmplt)" ng-bind="::tmplt.name" value="{{::tmplt.name}}"></md-option></md-select></md-input-container></div></div></div></div>',controller:"mdDateRangePickerCtrl",link:function(r,e,t,n){r.actionByKey=function(e,t,n){switch(e){case"prev":r.handleClickPrevMonth(n),r.runIfNotInDigest();break;case"next":r.handleClickNextMonth(n),r.runIfNotInDigest();break;case"date1":r.handleClickDate(n,r.dates[t])?r.runIfNotInDigest(r.triggerChange):r.runIfNotInDigest();break;case"date2":r.handleClickDate(n,r.dates2[t])?r.runIfNotInDigest(r.triggerChange):r.runIfNotInDigest();break;case"TD":r.handleClickSelectToday(),r.runIfNotInDigest(r.triggerChange);break;case"YD":r.handleClickSelectYesterday(),r.runIfNotInDigest(r.triggerChange);break;case"TW":r.handleClickSelectThisWeek(),r.runIfNotInDigest(r.triggerChange);break;case"LW":r.handleClickSelectLastWeek(),r.runIfNotInDigest(r.triggerChange);break;case"TM":r.handleClickSelectThisMonth(),r.runIfNotInDigest(r.triggerChange);break;case"LM":r.handleClickSelectLastMonth(),r.runIfNotInDigest(r.triggerChange);break;case"TY":r.handleClickSelectThisYear(),r.runIfNotInDigest(r.triggerChange);break;case"LY":r.handleClickSelectLastYear(),r.runIfNotInDigest(r.triggerChange);break;case"Custom Template":r.runIfNotInDigest(r.triggerChange)}},r.runIfNotInDigest=function(e){null==r.$root||r.$root.$$phase||(r.$apply(),e&&"function"==typeof e&&e())},e.on("click",function(e){var t=e.target.getAttribute("event-key"),n=e.target.getAttribute("event-param");r.actionByKey(t,n,e)}),r.triggerChange=function(e){var t=i.getSelectedDate(r.dateStart,r.dateEnd,r.isDisabledDate,r.maxRange);r.mdOnSelect&&r.mdOnSelect({$dates:t})}}}}function r(c,l){var u={TD:f("Today"),YD:f("Yesterday"),TW:f("This Week"),LW:f("Last Week"),TM:f("This Month"),LM:f("Last Month"),TY:f("This Year"),LY:f("Last Year")},e=1;function f(e){return null!=c.localizationMap&&null!=c.localizationMap[e]?c.localizationMap[e]:e}function d(){return-1!==[void 0,null,"",NaN].indexOf(c.firstDayOfWeek)||-1===[0,1,2,3,4,5,6].indexOf(c.firstDayOfWeek)?e:c.firstDayOfWeek}function n(e){var t,n,r=[],i=(new Date(e.getFullYear(),e.getMonth(),1),new Date(e.getFullYear(),e.getMonth()+1,0)),a=d();for(t=1;t<=i.getDate();t++)r.push(new Date(e.getFullYear(),e.getMonth(),t));for(n=r[0].getDay(),t=0;n!==a;)r.unshift(new Date(e.getFullYear(),e.getMonth(),t)),n=n<=0?6:n-1,t--;for(n=(r[r.length-1].getDay()+1)%7,t=1;n!==a;)r.push(new Date(e.getFullYear(),e.getMonth()+1,t)),n=(n+1)%7,t++;return r}function a(e,t){if(e&&t){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate());return new Date(t.getFullYear(),t.getMonth(),t.getDate())-n}}SELECTION_TEMPLATES_CUSTOM={},c.isMenuContainer=!1,c.days=[],c.label="Date range picker",c.dates=[],c.dates2=[],c.numberOfMonthToDisplay=2,c.today=new Date,c.dateStart&&c.dateStart.setHours(0,0,0,0),c.dateEnd&&c.dateEnd.setHours(23,59,59,999),c.firstDayOfMonth=c.dateStart?new Date(c.dateStart.getFullYear(),c.dateStart.getMonth(),1):Date(c.today.getFullYear(),c.today.getMonth(),1),c.lastDayOfMonth=c.dateStart?new Date(c.dateStart.getFullYear(),c.dateStart.getMonth()+1,0):Date(c.today.getFullYear(),c.today.getMonth()+1,0),c.activeDate=c.dateStart||c.today,c.activeDate2=new Date(c.activeDate.getFullYear(),c.activeDate.getMonth()+1,1),c.activeMonth=c.activeDate.getMonth(),c.activeYear=c.activeDate.getFullYear(),c.activeMonth2=c.activeDate2.getMonth(),c.activeYear2=c.activeDate2.getFullYear(),c.months=[],c.years=[],c.inCurrentMonth=function(e,t){return t?e.getMonth()===c.activeMonth2&&e.getFullYear()===c.activeYear2:e.getMonth()===c.activeMonth&&e.getFullYear()===c.activeYear},c.isToday=function(e){return 0===a(e,new Date)},c.handleClickDate=function(e,t){var n=!1,r=!1;if(0===a(c.dateStart,c.dateEnd)){if(0===a(c.dateStart,t))n=r=!0;else if(!c.isDisabledDate||!c.isDisabledDate({$date:t})){var i=a(c.dateStart,t);0<i?(c.maxRange&&Math.abs(Math.ceil(i/864e5))+1<=c.maxRange||!c.maxRange)&&(c.dateEnd=t,n=r=!0):(c.maxRange&&Math.abs(Math.ceil(i/864e5))+1<=c.maxRange||!c.maxRange)&&(c.dateStart=t,n=r=!0)}}else c.isDisabledDate&&c.isDisabledDate({$date:t})||(c.dateStart=t,c.dateEnd=t,n=!0);n&&(c.selectedTemplate=!1,c.selectedTemplateName=c.selectedDateText());return r},c.inSelectedDateRange=function(e){return!(!c.dateStart||!c.dateEnd)&&(0<=a(c.dateStart,e)&&0<=a(e,c.dateEnd))},c.isSelectedStartDate=function(e){return 0===a(c.dateStart,e)},c.isSelectedEndDate=function(e){return 0===a(c.dateEnd,e)},c.updateActiveDate=function(e){var t=new Date(c.activeYear,c.activeMonth,1),n=new Date(c.activeYear2,c.activeMonth2,1);e?(t=new Date(c.activeYear2,c.activeMonth2-1,1),c.activeYear=t.getFullYear(),c.activeMonth=t.getMonth()):(n=new Date(c.activeYear,c.activeMonth+1,1),c.activeYear2=n.getFullYear(),c.activeMonth2=n.getMonth());c.focusToDate(t)},c.selectedDateText=function(){return c.format&&"function"==typeof c.format?c.format(c.dateStart,c.dateEnd,c.selectedTemplate,c.selectedTemplateName):c.dateStart&&c.dateEnd?c.selectedTemplate?null!=SELECTION_TEMPLATES_CUSTOM&&null!=SELECTION_TEMPLATES_CUSTOM[c.selectedTemplate]?SELECTION_TEMPLATES_CUSTOM[c.selectedTemplate].name:u[c.selectedTemplate]:0===a(c.dateStart,c.dateEnd)?l("date")(c.dateStart,"dd MMM yyyy"):l("date")(c.dateStart,"dd"+(c.dateStart.getMonth()!==c.dateEnd.getMonth()||c.dateStart.getFullYear()!==c.dateEnd.getFullYear()?" MMM":"")+(c.dateStart.getFullYear()!==c.dateEnd.getFullYear()?" yyyy":""))+" - "+l("date")(c.dateEnd,"dd MMM yyyy"):""},c.focusToDate=function(e){var t=new Date(e.getFullYear(),e.getMonth()+1,1);c.activeDate=e,c.activeMonth=e.getMonth(),c.activeYear=e.getFullYear(),c.activeDate2=t,c.activeMonth2=t.getMonth(),c.activeYear2=t.getFullYear(),c.dates=n(e),c.dates2=n(t)},c.handleClickNextMonth=function(e){var t=new Date(c.activeDate.getFullYear(),c.activeDate.getMonth()+1,1);c.focusToDate(t)},c.handleClickPrevMonth=function(e){var t=new Date(c.activeDate.getFullYear(),c.activeDate.getMonth()-1,1);c.focusToDate(t)},c.handleClickSelectToday=function(){var e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate());c.dateStart=t,c.dateEnd=t,c.selectedTemplate="TD",c.selectedTemplateName=c.selectedDateText()},c.handleClickSelectYesterday=function(){var e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate()-1);c.dateStart=t,c.dateEnd=t,c.selectedTemplate="YD",c.selectedTemplateName=c.selectedDateText()},c.handleClickSelectThisWeek=function(){var e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n=new Date(t.getFullYear(),t.getMonth(),t.getDate()-(t.getDay()-d())),r=new Date(t.getFullYear(),t.getMonth(),t.getDate()+(6-t.getDay()+d()));c.dateStart=n,c.dateEnd=r,c.selectedTemplate="TW",c.selectedTemplateName=c.selectedDateText()},c.handleClickSelectLastWeek=function(){var e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate()-7),n=new Date(t.getFullYear(),t.getMonth(),t.getDate()-(t.getDay()-d())),r=new Date(t.getFullYear(),t.getMonth(),t.getDate()+(6-t.getDay()+d()));c.dateStart=n,c.dateEnd=r,c.selectedTemplate="LW",c.selectedTemplateName=c.selectedDateText()},c.handleClickSelectThisMonth=function(){var e=new Date,t=new Date(e.getFullYear(),e.getMonth(),1),n=new Date(e.getFullYear(),e.getMonth()+1,0);c.dateStart=t,c.dateEnd=n,c.selectedTemplate="TM",c.selectedTemplateName=c.selectedDateText()},c.handleClickSelectLastMonth=function(){var e=new Date,t=new Date(e.getFullYear(),e.getMonth(),0),n=new Date(t.getFullYear(),t.getMonth(),1),r=new Date(t.getFullYear(),t.getMonth()+1,0);c.dateStart=n,c.dateEnd=r,c.selectedTemplate="LM",c.selectedTemplateName=c.selectedDateText()},c.handleClickSelectThisYear=function(){var e=new Date,t=new Date(e.getFullYear(),0,1),n=new Date(e.getFullYear(),11,31);c.dateStart=t,c.dateEnd=n,c.selectedTemplate="TY",c.selectedTemplateName=c.selectedDateText()},c.handleClickSelectLastYear=function(){var e=new Date,t=new Date(e.getFullYear()-1,0,1),n=new Date(e.getFullYear()-1,11,31);c.dateStart=t,c.dateEnd=n,c.selectedTemplate="LY",c.selectedTemplateName=c.selectedDateText()},c.getLocalizationVal=f,c.selectCustomRange=function(e,t){c.dateStart=t.dateStart,c.dateEnd=t.dateEnd,c.selectedTemplate=e,c.selectedTemplateName=c.selectedDateText()},c.isInMaxRange=function(e){if(!c.dateStart)return!0;if(0!==a(c.dateStart,c.dateEnd))return!0;var t=a(c.dateStart,e);return c.maxRange&&Math.abs(Math.ceil(t/864e5))+1<=c.maxRange||!c.maxRange},c.selectionTemplate={},function(){var e,t=0;if(null!=c.customTemplates)for(var n=0;n<c.customTemplates.length;n++)e=c.customTemplates[n],SELECTION_TEMPLATES_CUSTOM[e.name]=e;if(c.selectedTemplate){switch(c.selectedTemplate){case"TD":c.handleClickSelectToday();break;case"YD":c.handleClickSelectYesterday();break;case"TW":c.handleClickSelectThisWeek();break;case"LW":c.handleClickSelectLastWeek();break;case"TM":c.handleClickSelectThisMonth();break;case"LM":c.handleClickSelectLastMonth();break;case"TY":c.handleClickSelectThisYear();break;case"LY":c.handleClickSelectLastYear();break;default:SELECTION_TEMPLATES_CUSTOM&&SELECTION_TEMPLATES_CUSTOM[c.selectedTemplate]&&SELECTION_TEMPLATES_CUSTOM[c.selectedTemplate].dateStart&&SELECTION_TEMPLATES_CUSTOM[c.selectedTemplate].dateEnd&&(c.dateStart=SELECTION_TEMPLATES_CUSTOM[c.selectedTemplate].dateStart,c.dateEnd=SELECTION_TEMPLATES_CUSTOM[c.selectedTemplate].dateEnd),c.selectedTemplateName=c.selectedDateText()}c.updateActiveDate()}else c.selectedTemplate="",c.selectedTemplateName=c.selectedDateText(),c.updateActiveDate();c.$watch("selectedTemplate",function(e,t){e===t||!c.dateStart||c.inCurrentMonth(c.dateStart)||c.inCurrentMonth(c.dateStart,!0)||c.focusToDate(c.dateStart)}),c.$watch("dateStart",function(e,t){e===t||!c.dateStart||c.inCurrentMonth(c.dateStart)||c.inCurrentMonth(c.dateStart,!0)||c.focusToDate(c.dateStart)});var r=new Date(2017,0,1);for(c.days=[],t=0;t<7;t++)r.setDate(t+1+d()),c.days.push({id:t,name:f(l("date")(r,"EEE"))});var i=null;for(c.months=[],t=0;t<12;t++)i=new Date(2017,t,1),c.months.push({id:t,name:f(l("date")(i,"MMMM"))});var a=c.activeYear,o=0;for(c.years=[],o=a-10;o<a+10;o++)c.years.push({id:o,name:f(o)});for(var s in u)u.hasOwnProperty(s)&&(null!=c.disableTemplates&&""!=c.disableTemplates?c.disableTemplates.indexOf(s)<0&&(c.selectionTemplate[s]=u[s]):c.selectionTemplate[s]=u[s])}()}function i(r){this.show=function(e){return r.show({locals:{mdDateRangePickerServiceModel:t.copy(e.model),mdDateRangePickerServiceConfig:t.copy(e)},controller:["$scope","mdDateRangePickerServiceModel","mdDateRangePickerServiceConfig",function(t,e,n){t.model=e||{},t.config=n||{},t.model.selectedTemplateName=t.model.selectedTemplateName||"",t.ok=function(){t.model.dateStart&&t.model.dateStart.setHours(0,0,0,0),t.model.dateEnd&&t.model.dateEnd.setHours(23,59,59,999),r.hide(t.model)},t.cancel=function(){r.cancel()},t.clear=function(){t.model.selectedTemplateName="",t.model.selectedTemplate=null,t.model.dateStart=null,t.model.dateEnd=null},t.handleOnSelect=function(e){"function"==typeof t.config.mdOnSelect&&t.config.mdOnSelect(e),t.config.autoConfirm&&t.ok()},t.getLocalizationVal=function(e){return t.model&&null!=t.model.localizationMap&&null!=t.model.localizationMap[e]?t.model.localizationMap[e]:e},t.model.customTemplates&&console.warn("model.customTemplates will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({customTemplates}) instead"),t.model.localizationMap&&console.warn("model.localizationMap will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({localizationMap}) instead"),t.model.firstDayOfWeek&&console.warn("model.firstDayOfWeek will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({firstDayOfWeek}) instead"),t.model.showTemplate&&console.warn("model.showTemplate will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({showTemplate}) instead"),t.model.maxRange&&console.warn("model.maxRange will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({maxRange}) instead"),t.model.onePanel&&console.warn("model.onePanel will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({onePanel}) instead"),t.model.isDisabledDate&&console.warn("model.isDisabledDate({ $date: $date }) will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({isDisabledDate:($date)=>{}}) instead")}],template:['<md-dialog aria-label="Date Range Picker">','<md-toolbar class="md-primary" layout="row" layout-align="start center">','<md-button aria-label="Date Range Picker" class="md-icon-button" aria-hidden="true" ng-disabled="true">','<md-icon md-svg-icon="data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjRkZGRkZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik05IDExSDd2Mmgydi0yem00IDBoLTJ2Mmgydi0yem00IDBoLTJ2Mmgydi0yem0yLTdoLTFWMmgtMnYySDhWMkg2djJINWMtMS4xMSAwLTEuOTkuOS0xLjk5IDJMMyAyMGMwIDEuMS44OSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMlY2YzAtMS4xLS45LTItMi0yem0wIDE2SDVWOWgxNHYxMXoiLz4KICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4KPC9zdmc+"></md-icon>',"</md-button>",'<span md-truncate class="md-toolbar-tools">{{model.selectedTemplateName}}</span>',"</md-toolbar>","<md-dialog-content>","<md-date-range-picker ",'date-start="model.dateStart" ','date-end="model.dateEnd" ','show-template="config.showTemplate || model.showTemplate" ','selected-template="model.selectedTemplate" ','selected-template-name="model.selectedTemplateName" ','first-day-of-week="config.firstDayOfWeek || model.firstDayOfWeek" ','localization-map="config.localizationMap || model.localizationMap" ','custom-templates="config.customTemplates || model.customTemplates" ','format="config.format" ','disable-templates="{{model.disableTemplates}}" ','md-on-select="handleOnSelect($dates)" ','is-disabled-date="config.isDisabledDate ? config.isDisabledDate($date) : model.isDisabledDate({ $date: $date })" ','max-range="config.maxRange || model.maxRange" ','one-panel="config.onePanel || model.onePanel" ',">","</md-date-range-picker>","</md-dialog-content>",'<md-dialog-actions layout="row" layout-align="end center">','<md-button ng-click="cancel()">{{getLocalizationVal("Cancel")}}</md-button>','<md-button ng-if="!config.autoConfirm" class="md-raised" ng-click="clear()">{{getLocalizationVal("Clear")}}</md-button>','<md-button ng-if="!config.autoConfirm" class="md-raised md-primary" ng-click="ok()">{{getLocalizationVal("Ok")}}</md-button>',"</md-dialog-actions>","</md-dialog>"].join(""),parent:t.element(document.body),multiple:e.multiple,targetEvent:e.targetEvent||document.body,clickOutsideToClose:!0,fullscreen:e.model.fullscreen})},this.getSelectedDate=function(e,t,n,r){var i=[],a=t.getTime(),o=e,s=0,c=e.getFullYear(),l=e.getMonth(),u=e.getDate();for(;o.getTime()<=a&&(n&&!n({$date:o})&&i.push(o),s++,o=new Date(c,l,u+s),!((r||1e4)<s)););return i}}t.module("ngMaterialDateRangePicker",["ngMaterial"]).directive("mdDateRangePicker",n).directive("mdDateRange",function(){return{scope:{ngModel:"=ngModel",autoConfirm:"=autoConfirm",ngDisabled:"=ngDisabled",showTemplate:"=",placeholder:"@",isDisabledDate:"&",localizationMap:"=?",customTemplates:"=?",disableTemplates:"@",mdOnSelect:"&",onePanel:"=?",format:"=?",maxRange:"=?",firstDayOfWeek:"=?"},template:['<md-menu ng-disabled="ngDisabled">','<span class="md-select-value" ng-click="!ngDisabled && (($mdMenu && $mdMenu.open) ? $mdMenu.open($event) : $mdOpenMenu($event))">',"  <span>{{ngModel.selectedTemplateName || placeholder}}</span>",'  <span class="md-select-icon" aria-hidden="true"></span>',"</span>",'<md-menu-content class="md-custom-menu-content" style="max-height: none!important; height: auto!important; padding: 0!important;">','    <span style="text-align: left; padding: 12px 20px 0 20px" disabled>{{ngModel.selectedTemplateName || placeholder}}</span>','    <md-date-range-picker first-day-of-week="firstDayOfWeek" ','     md-on-select="autoConfirm && ok($dates)" ','     date-start="ngModel.dateStart" ','     date-end="ngModel.dateEnd" ','     selected-template="ngModel.selectedTemplate" ','     show-template="showTemplate" ','     localization-map="localizationMap" ','     custom-templates="customTemplates" ','     disable-templates="{{disableTemplates}}" ','     is-disabled-date="isDisabledDate({ $date: $date })" ','     max-range="maxRange" ','     one-panel="onePanel" ','     format="format" ','     selected-template-name="ngModel.selectedTemplateName"></md-date-range-picker>','<p ng-if="!autoConfirm" layout="row" layout-align="end center">','<md-button ng-if="ngModel.showClear" class="md-raised" ng-click="clear()">{{getLocalizationVal("Clear")}}</md-button>','<md-button class="md-raised md-primary" ng-click="ok()">{{getLocalizationVal("Ok")}}</md-button>',"</p>","</md-menu-content>","</md-menu>"].join(""),controller:["$scope","$mdMenu",function(t,n){t.ok=function(e){t.mdOnSelect({$dates:e}),n.hide()},t.clear=function(){t.ngModel.selectedTemplateName="",t.ngModel.selectedTemplate=null,t.ngModel.dateStart=null,t.ngModel.dateEnd=null},t.getLocalizationVal=function(e){return t.ngModel&&null!=t.ngModel.localizationMap&&null!=t.ngModel.localizationMap[e]?t.ngModel.localizationMap[e]:e}}]}}).controller("mdDateRangePickerCtrl",r).service("$mdDateRangePicker",i),n.$inject=["$mdDateRangePicker"],r.$inject=["$scope","$filter"],i.$inject=["$mdDialog"]}(window,angular),function(){var e,t="Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45";if(b="object"==typeof process&&"object"==typeof process.versions&&process.versions.node&&!process.browser){var n=process.versions.node.toString().replace("v","");t="Nodejs/"+n+" (NodeOS) AppleWebKit/"+n+" (KHTML, like Gecko) Nodejs/"+n+" Nodejs/"+n}e="undefined"!=typeof global?global:window,"undefined"==typeof window&&("undefined"==typeof window&&"undefined"!=typeof global&&(global.navigator={userAgent:t,getUserMedia:function(){}},e.window=global),"undefined"==typeof location&&(e.location={protocol:"file:",href:"",hash:""}),"undefined"==typeof screen&&(e.screen={width:0,height:0}));var s=window.navigator;void 0!==s?(void 0!==s.webkitGetUserMedia&&(s.getUserMedia=s.webkitGetUserMedia),void 0!==s.mozGetUserMedia&&(s.getUserMedia=s.mozGetUserMedia)):s={getUserMedia:function(){},userAgent:t};var r=!!/Android|webOS|iPhone|iPad|iPod|BB10|BlackBerry|IEMobile|Opera Mini|Mobile|mobile/i.test(s.userAgent||""),c=!(-1===s.userAgent.indexOf("Edge")||!s.msSaveOrOpenBlob&&!s.msSaveBlob),l=!!window.opera||0<=s.userAgent.indexOf(" OPR/"),u=-1<s.userAgent.toLowerCase().indexOf("firefox")&&"netscape"in window&&/ rv:/.test(s.userAgent),f=/^((?!chrome|android).)*safari/i.test(s.userAgent),d=!!window.chrome&&!l,h="undefined"!=typeof document&&!!document.documentMode&&!c;function i(e,t){var n=0,r=!1,i=window.setInterval(function(){e()&&(window.clearInterval(i),t(r)),50<n++&&(window.clearInterval(i),t(r=!0))},10)}var a={Android:function(){return s.userAgent.match(/Android/i)},BlackBerry:function(){return s.userAgent.match(/BlackBerry|BB10/i)},iOS:function(){return s.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return s.userAgent.match(/Opera Mini/i)},Windows:function(){return s.userAgent.match(/IEMobile/i)},any:function(){return a.Android()||a.BlackBerry()||a.iOS()||a.Opera()||a.Windows()},getOsName:function(){var e="Unknown OS";return a.Android()&&(e="Android"),a.BlackBerry()&&(e="BlackBerry"),a.iOS()&&(e="iOS"),a.Opera()&&(e="Opera Mini"),a.Windows()&&(e="Windows"),e}};var o="Unknown OS",p="Unknown OS Version";var m,g,_=function(){for(var e,t=s.appVersion,n=s.userAgent,r="-",i=[{s:"Chrome OS",r:/CrOS/},{s:"Windows 10",r:/(Windows 10.0|Windows NT 10.0)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Windows Vista",r:/Windows NT 6.0/},{s:"Windows Server 2003",r:/Windows NT 5.2/},{s:"Windows XP",r:/(Windows NT 5.1|Windows XP)/},{s:"Windows 2000",r:/(Windows NT 5.0|Windows 2000)/},{s:"Windows ME",r:/(Win 9x 4.90|Windows ME)/},{s:"Windows 98",r:/(Windows 98|Win98)/},{s:"Windows 95",r:/(Windows 95|Win95|Windows_95)/},{s:"Windows NT 4.0",r:/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/},{s:"Windows CE",r:/Windows CE/},{s:"Windows 3.11",r:/Win16/},{s:"Android",r:/Android/},{s:"Open BSD",r:/OpenBSD/},{s:"Sun OS",r:/SunOS/},{s:"Linux",r:/(Linux|X11)/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS X",r:/Mac OS X/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/},{s:"QNX",r:/QNX/},{s:"UNIX",r:/UNIX/},{s:"BeOS",r:/BeOS/},{s:"OS/2",r:/OS\/2/},{s:"Search Bot",r:/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/}],a=0;e=i[a];a++)if(e.r.test(n)){r=e.s;break}var o="-";switch(/Windows/.test(r)&&(/Windows (.*)/.test(r)&&(o=/Windows (.*)/.exec(r)[1]),r="Windows"),r){case"Mac OS X":/Mac OS X (10[\.\_\d]+)/.test(n)&&(o=/Mac OS X (10[\.\_\d]+)/.exec(n)[1]);break;case"Android":/Android ([\.\_\d]+)/.test(n)&&(o=/Android ([\.\_\d]+)/.exec(n)[1]);break;case"iOS":/OS (\d+)_(\d+)_?(\d+)?/.test(n)&&(o=(o=/OS (\d+)_(\d+)_?(\d+)?/.exec(t))[1]+"."+o[2]+"."+(0|o[3]))}return{osName:r,osVersion:o}}();_&&_.osName&&"-"!=_.osName?(o=_.osName,p=_.osVersion):a.any()&&"Android"==(o=a.getOsName())&&(p=!!(g=(m=(m||s.userAgent).toLowerCase()).match(/android\s([0-9\.]*)/))&&g[1]);var b="object"==typeof process&&"object"==typeof process.versions&&process.versions.node;"Unknown OS"===o&&b&&(o="Nodejs",p=process.versions.node.toString().replace("v",""));var v=!1,y=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach(function(e){"undefined"!=typeof document&&"function"==typeof document.createElement&&(!v&&e in document.createElement("canvas")&&(v=!0),!y&&e in document.createElement("video")&&(y=!0))});var w=/^(192\.168\.|169\.254\.|10\.|172\.(1[6-9]|2\d|3[01]))/,C=/([0-9]{1,3}(\.[0-9]{1,3}){3})/,A=/[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7}/;var S=[],T=[],x=[],k=[];s.mediaDevices&&s.mediaDevices.enumerateDevices&&(s.enumerateDevices=function(e){var t=s.mediaDevices.enumerateDevices();t&&t.then?s.mediaDevices.enumerateDevices().then(e).catch(function(){e([])}):e([])});var E=!1;"undefined"!=typeof MediaStreamTrack&&"getSources"in MediaStreamTrack?E=!0:s.mediaDevices&&s.mediaDevices.enumerateDevices&&(E=!0);var D=!1,I=!1,P=!1,M=!1,$=!1;function O(t){if(E)if(!s.enumerateDevices&&window.MediaStreamTrack&&window.MediaStreamTrack.getSources&&(s.enumerateDevices=window.MediaStreamTrack.getSources.bind(window.MediaStreamTrack)),!s.enumerateDevices&&s.enumerateDevices&&(s.enumerateDevices=s.enumerateDevices.bind(s)),s.enumerateDevices){S=[],T=[],x=[],$=M=P=I=D=!(k=[]);var r={};s.enumerateDevices(function(e){S=[],T=[],x=[],k=[],e.forEach(function(e){var t={};for(var n in e)try{"function"!=typeof e[n]&&(t[n]=e[n])}catch(e){}r[t.deviceId+t.label+t.kind]||("audio"===t.kind&&(t.kind="audioinput"),"video"===t.kind&&(t.kind="videoinput"),t.deviceId||(t.deviceId=t.id),t.id||(t.id=t.deviceId),t.label?("videoinput"!==t.kind||$||($=!0),"audioinput"!==t.kind||M||(M=!0)):(t.isCustomLabel=!0,"videoinput"===t.kind?t.label="Camera "+(k.length+1):"audioinput"===t.kind?t.label="Microphone "+(T.length+1):"audiooutput"===t.kind?t.label="Speaker "+(x.length+1):t.label="Please invoke getUserMedia once.",void 0!==R&&R.browser.isChrome&&46<=R.browser.version&&!/^(https:|chrome-extension:)$/g.test(location.protocol||"")&&"undefined"!=typeof document&&"string"==typeof document.domain&&document.domain.search&&-1===document.domain.search(/localhost|127.0./g)&&(t.label="HTTPs is required to get label of this "+t.kind+" device.")),"audioinput"===t.kind&&(D=!0,-1===T.indexOf(t)&&T.push(t)),"audiooutput"===t.kind&&(I=!0,-1===x.indexOf(t)&&x.push(t)),"videoinput"===t.kind&&(P=!0,-1===k.indexOf(t)&&k.push(t)),S.push(t),r[t.deviceId+t.label+t.kind]=t)}),void 0!==R&&(R.MediaDevices=S,R.hasMicrophone=D,R.hasSpeakers=I,R.hasWebcam=P,R.isWebsiteHasWebcamPermissions=$,R.isWebsiteHasMicrophonePermissions=M,R.audioInputDevices=T,R.audioOutputDevices=x,R.videoInputDevices=k),t&&t()})}else t&&t();else t&&t()}var R=window.DetectRTC||{};R.browser=function(){s.appVersion;var e,t,n,r=s.userAgent,i=s.appName,a=""+parseFloat(s.appVersion),o=parseInt(s.appVersion,10);if(l){i="Opera";try{o=(a=s.userAgent.split("OPR/")[1].split(" ")[0]).split(".")[0]}catch(e){a="0.0.0.0",o=0}}else h?(a=0<(t=r.indexOf("rv:"))?r.substring(t+3):(t=r.indexOf("MSIE"),r.substring(t+5)),i="IE"):d?(t=r.indexOf("Chrome"),i="Chrome",a=r.substring(t+7)):f?-1!==r.indexOf("CriOS")?(t=r.indexOf("CriOS"),i="Chrome",a=r.substring(t+6)):-1!==r.indexOf("FxiOS")?(t=r.indexOf("FxiOS"),i="Firefox",a=r.substring(t+6)):(t=r.indexOf("Safari"),i="Safari",a=r.substring(t+7),-1!==(t=r.indexOf("Version"))&&(a=r.substring(t+8)),-1!==s.userAgent.indexOf("Version/")&&(a=s.userAgent.split("Version/")[1].split(" ")[0])):u?(t=r.indexOf("Firefox"),i="Firefox",a=r.substring(t+8)):(e=r.lastIndexOf(" ")+1)<(t=r.lastIndexOf("/"))&&(i=r.substring(e,t),a=r.substring(t+1),i.toLowerCase()===i.toUpperCase()&&(i=s.appName));return c&&(i="Edge",a=s.userAgent.split("Edge/")[1]),-1!==(n=a.search(/[; \)]/))&&(a=a.substring(0,n)),o=parseInt(""+a,10),isNaN(o)&&(a=""+parseFloat(s.appVersion),o=parseInt(s.appVersion,10)),{fullVersion:a,version:o,name:i,isPrivateBrowsing:!1}}(),function(t){var n;try{if(window.webkitRequestFileSystem)window.webkitRequestFileSystem(window.TEMPORARY,1,function(){n=!1},function(e){n=!0});else if(window.indexedDB&&/Firefox/.test(window.navigator.userAgent)){var r;try{(r=window.indexedDB.open("test")).onerror=function(){return!0}}catch(e){n=!0}void 0===n&&i(function(){return"done"===r.readyState},function(e){e||(n=!r.result)})}else if(function(e){var t=e.toLowerCase();if(0===t.indexOf("msie")&&0===t.indexOf("trident"))return!1;var n=/(?:msie|rv:)\s?([\d\.]+)/.exec(t);return!!(n&&10<=parseInt(n[1],10))}(window.navigator.userAgent)){n=!1;try{window.indexedDB||(n=!0)}catch(e){n=!0}}else if(window.localStorage&&/Safari/.test(window.navigator.userAgent)){try{window.localStorage.setItem("test",1)}catch(e){n=!0}void 0===n&&(n=!1,window.localStorage.removeItem("test"))}}catch(e){n=!1}i(function(){return void 0!==n},function(e){t(n)})}(function(e){R.browser.isPrivateBrowsing=!!e}),R.browser["is"+R.browser.name]=!0,R.osName=o,R.osVersion=p;"object"==typeof process&&"object"==typeof process.versions&&process.versions["node-webkit"];var N=!1;["RTCPeerConnection","webkitRTCPeerConnection","mozRTCPeerConnection","RTCIceGatherer"].forEach(function(e){N||e in window&&(N=!0)}),R.isWebRTCSupported=N,R.isORTCSupported="undefined"!=typeof RTCIceGatherer;var L=!1;(R.browser.isChrome&&35<=R.browser.version?L=!0:R.browser.isFirefox&&34<=R.browser.version?L=!0:R.browser.isEdge&&17<=R.browser.version?L=!0:"Android"===R.osName&&R.browser.isChrome&&(L=!0),(s.getDisplayMedia||s.mediaDevices&&s.mediaDevices.getDisplayMedia)&&(L=!0),/^(https:|chrome-extension:)$/g.test(location.protocol||""))||("undefined"!=typeof document&&"string"==typeof document.domain&&document.domain.search&&-1===document.domain.search(/localhost|127.0./g)&&(R.browser.isChrome||R.browser.isEdge||R.browser.isOpera)?L=!1:R.browser.isFirefox&&(L=!1));R.isScreenCapturingSupported=L;var F={isSupported:!1,isCreateMediaStreamSourceSupported:!1};["AudioContext","webkitAudioContext","mozAudioContext","msAudioContext"].forEach(function(e){F.isSupported||e in window&&(F.isSupported=!0,window[e]&&"createMediaStreamSource"in window[e].prototype&&(F.isCreateMediaStreamSourceSupported=!0))}),R.isAudioContextSupported=F.isSupported,R.isCreateMediaStreamSourceSupported=F.isCreateMediaStreamSourceSupported;var G=!1;R.browser.isChrome&&31<R.browser.version&&(G=!0),R.isRtpDataChannelsSupported=G;var j=!1;R.browser.isFirefox&&28<R.browser.version?j=!0:R.browser.isChrome&&25<R.browser.version?j=!0:R.browser.isOpera&&11<=R.browser.version&&(j=!0),R.isSctpDataChannelsSupported=j,R.isMobileDevice=r;var B=!1;s.getUserMedia?B=!0:s.mediaDevices&&s.mediaDevices.getUserMedia&&(B=!0),R.browser.isChrome&&46<=R.browser.version&&!/^(https:|chrome-extension:)$/g.test(location.protocol||"")&&"undefined"!=typeof document&&"string"==typeof document.domain&&document.domain.search&&-1===document.domain.search(/localhost|127.0./g)&&(B="Requires HTTPs"),"Nodejs"===R.osName&&(B=!1),R.isGetUserMediaSupported=B;var U,H,W,q="";screen.width&&(q+=(screen.width?screen.width:"")+" x "+(screen.height?screen.height:""));R.displayResolution=q,R.displayAspectRatio=(U=screen.width,H=screen.height,W=function e(t,n){return 0==n?t:e(n,t%n)}(U,H),U/W/(H/W)).toFixed(2),R.isCanvasSupportsStreamCapturing=v,R.isVideoSupportsStreamCapturing=y,"Chrome"==R.browser.name&&53<=R.browser.version&&(R.isCanvasSupportsStreamCapturing||(R.isCanvasSupportsStreamCapturing="Requires chrome flag: enable-experimental-web-platform-features"),R.isVideoSupportsStreamCapturing||(R.isVideoSupportsStreamCapturing="Requires chrome flag: enable-experimental-web-platform-features")),R.DetectLocalIPAddress=function(t,e){if(R.isWebRTCSupported){var n=!0,r=!0;!function(i,e){if("undefined"!=typeof document&&"function"==typeof document.getElementById){var a={},t=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection;if(!t){var n=document.getElementById("iframe");if(!n)return;var r=n.contentWindow;t=r.RTCPeerConnection||r.mozRTCPeerConnection||r.webkitRTCPeerConnection}if(t){var o=null;"Chrome"===R.browser&&R.browser.version<58&&(o={optional:[{RtpDataChannels:!0}]});var s=new t({iceServers:[{urls:"stun:stun.l.google.com:19302"}]},o);if(e&&(s.addStream?s.addStream(e):s.addTrack&&e.getTracks()[0]&&s.addTrack(e.getTracks()[0],e)),s.onicecandidate=function(e){e.candidate&&e.candidate.candidate?c(e.candidate.candidate):c()},!e)try{s.createDataChannel("sctp",{})}catch(e){}R.isPromisesSupported?s.createOffer().then(function(e){s.setLocalDescription(e).then(l)}):s.createOffer(function(e){s.setLocalDescription(e,l,function(){})},function(){})}}function c(e){if(e){var t=C.exec(e);if(t){var n=t[1],r=e.match(w);void 0===a[n]&&i(n,r,!0),a[n]=!0}}else i()}function l(){var e=s.localDescription.sdp.split("\n");e.forEach(function(e){e&&0===e.indexOf("a=candidate:")&&c(e)})}}(function(e){e?e.match(w)?t("Local: "+e,n=!1,r):e.match(A)?t("Public: "+e,n,r=!1):t("Public: "+e,n,r):t()},e)}},R.isWebSocketsSupported="WebSocket"in window&&2===window.WebSocket.CLOSING,R.isWebSocketsBlocked=!R.isWebSocketsSupported,"Nodejs"===R.osName&&(R.isWebSocketsSupported=!0,R.isWebSocketsBlocked=!1),R.checkWebSocketsSupport=function(t){t=t||function(){};try{var e,n=new WebSocket("wss://echo.websocket.org:443/");n.onopen=function(){R.isWebSocketsBlocked=!1,e=(new Date).getTime(),n.send("ping")},n.onmessage=function(){R.WebsocketLatency=(new Date).getTime()-e+"ms",t(),n.close(),n=null},n.onerror=function(){R.isWebSocketsBlocked=!0,t()}}catch(e){R.isWebSocketsBlocked=!0,t()}},R.load=function(e){O(e=e||function(){})},R.MediaDevices=void 0!==S?S:[],R.hasMicrophone=D,R.hasSpeakers=I,R.hasWebcam=P,R.isWebsiteHasWebcamPermissions=$,R.isWebsiteHasMicrophonePermissions=M,R.audioInputDevices=T,R.audioOutputDevices=x,R.videoInputDevices=k;var z=!1;"undefined"!=typeof document&&"function"==typeof document.createElement&&"setSinkId"in document.createElement("video")&&(z=!0),R.isSetSinkIdSupported=z;var V=!1;R.browser.isFirefox&&"undefined"!=typeof mozRTCPeerConnection?"getSenders"in mozRTCPeerConnection.prototype&&(V=!0):R.browser.isChrome&&"undefined"!=typeof webkitRTCPeerConnection&&"getSenders"in webkitRTCPeerConnection.prototype&&(V=!0),R.isRTPSenderReplaceTracksSupported=V;var Y=!1;R.browser.isFirefox&&38<R.browser.version&&(Y=!0),R.isRemoteStreamProcessingSupported=Y;var K=!1;"undefined"!=typeof MediaStreamTrack&&"applyConstraints"in MediaStreamTrack.prototype&&(K=!0),R.isApplyConstraintsSupported=K;var Q=!1;R.browser.isFirefox&&43<=R.browser.version&&(Q=!0),R.isMultiMonitorScreenCapturingSupported=Q,R.isPromisesSupported=!!("Promise"in window),R.version="1.4.0",void 0===R&&(window.DetectRTC={});var X=window.MediaStream;void 0===X&&"undefined"!=typeof webkitMediaStream&&(X=webkitMediaStream),R.MediaStream=void 0!==X&&"function"==typeof X&&Object.keys(X.prototype),"undefined"!=typeof MediaStreamTrack?R.MediaStreamTrack=Object.keys(MediaStreamTrack.prototype):R.MediaStreamTrack=!1;var Z=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection;R.RTCPeerConnection=void 0!==Z&&Object.keys(Z.prototype),window.DetectRTC=R,"undefined"!=typeof module&&(module.exports=R),"function"==typeof define&&define.amd&&define("DetectRTC",[],function(){return R})}(),function(e,t){"use strict";"undefined"!=typeof module&&module.exports?module.exports=t(require("angular")):"function"==typeof define&&define.amd?define(["angular"],t):t(e.angular)}(window,function(e){"use strict";e.module("angucomplete-alt",[]).directive("angucompleteAlt",["$q","$parse","$http","$sce","$timeout","$templateCache","$interpolate",function(U,e,H,W,q,t,i){var n="/angucomplete-alt/index.html";function a(c,e,t,n){var r,a,i,o,l,s,u=e.find("input"),f=3,d=null,h="autocomplete-required",p=null,m=null,g=!1,_=e[0].querySelector(".angucomplete-dropdown"),b=!1,v=null;function y(e,t){e&&("object"==typeof e?(c.searchStr=S(e),A({originalObject:e})):"string"==typeof e&&0<e.length?c.searchStr=e:console&&console.error&&console.error("Tried to set "+(t?"initial":"")+" value of angucomplete to",e,"which is an invalid value"),k(!0))}function w(e){v=null,c.hideResults(e),document.body.removeEventListener("click",w)}function C(e){return e.which?e.which:e.keyCode}function A(e){"function"==typeof c.selectedObject?c.selectedObject(e,c.selectedObjectData):c.selectedObject=e,k(!!e)}function S(t){return c.titleField.split(",").map(function(e){return T(t,e)}).join(" ")}function T(e,t){var n,r;if(t){n=t.split("."),r=e;for(var i=0;i<n.length;i++)r=r[n[i]]}else r=e;return r}function x(e,t){var n,r,i;if(i=new RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),e)return e.match&&e.replace||(e=e.toString()),n=(r=e.match(i))?e.replace(i,'<span class="'+c.matchClass+'">'+r[0]+"</span>"):e,W.trustAsHtml(n)}function k(e){c.notEmpty=e,p=c.searchStr,c.fieldRequired&&n&&c.inputName&&n[c.inputName].$setValidity(h,e)}function E(e){!c.overrideSuggestions||c.selectedObject&&c.selectedObject.originalObject===c.searchStr||(e&&e.preventDefault(),q.cancel(d),O(),A({originalObject:c.searchStr}),c.clearSelected&&(c.searchStr=null),L())}function D(){return e[0].querySelectorAll(".angucomplete-row")[c.currentIndex]}function I(e){_.scrollTop=_.scrollTop+e}function P(){if(!c.disableAutocomplete){var e=c.results[c.currentIndex];c.matchClass?u.val(S(e.originalObject)):u.val(e.title)}}function M(i){return function(e,t,n,r){t||n||r||!e.data||(e=e.data),c.searching=!1,j(T(a(e),c.remoteUrlDataField),i)}}function $(e,t,n,r){c.searching=g,t||n||r||(t=e.status),0!==t&&-1!==t&&(c.remoteUrlErrorCallback?c.remoteUrlErrorCallback(e,t,n,r):console&&console.error&&console.error("http error"))}function O(){m&&m.resolve()}function R(e){var t={},n=c.remoteUrl+encodeURIComponent(e);c.remoteUrlRequestFormatter&&(t={params:c.remoteUrlRequestFormatter(e)},n=c.remoteUrl),c.remoteUrlRequestWithCredentials&&(t.withCredentials=!0),O(),m=U.defer(),t.timeout=m.promise,g=!0,H.get(n,t).then(M(e)).catch($).finally(function(){g=!1})}function N(e){O(),m=U.defer(),c.remoteApiHandler(e,m.promise).then(M(e)).catch($)}function L(){c.showDropdown=!1,c.results=[],_&&(_.scrollTop=0)}function F(){c.showDropdown=o,c.currentIndex=c.focusFirst?0:-1,c.results=[]}function G(t){!t||t.length<f||(c.localData?c.$apply(function(){var e;e=void 0!==c.localSearch()?c.localSearch()(t,c.localData):function(e){var t,n,r,i,a=c.searchFields.split(","),o=[];for(void 0!==c.parseInput()&&(e=c.parseInput()(e)),t=0;t<c.localData.length;t++){for(n=!1,r=0;r<a.length;r++)i=T(c.localData[t],a[r])||"",n=n||0<=i.toString().toLowerCase().indexOf(e.toString().toLowerCase());n&&(o[o.length]=c.localData[t])}return o}(t),c.searching=!1,j(e,t)}):c.remoteApiHandler?N(t):R(t))}function j(e,t){var n,r,i,a,o,s;if(e&&0<e.length)for(c.results=[],n=0;n<e.length;n++)c.titleField&&""!==c.titleField&&(a=o=S(e[n])),r="",c.descriptionField&&(r=s=T(e[n],c.descriptionField)),i="",c.imageField&&(i=T(e[n],c.imageField)),c.matchClass&&(o=x(a,t),s=x(r,t)),c.results[c.results.length]={title:o,description:s,image:i,originalObject:e[n]};else c.results=[];c.autoMatch&&1===c.results.length&&function(e,t,n){if(!n)return!1;for(var r in t)if(t[r].toLowerCase()===n.toLowerCase())return c.selectResult(e),!0;return!1}(c.results[0],{title:a,desc:r||""},c.searchStr)?c.showDropdown=!1:0!==c.results.length||l?c.showDropdown=!0:c.showDropdown=!1}function B(){c.localData?(c.searching=!1,j(c.localData,"")):c.remoteApiHandler?(c.searching=!0,N("")):(c.searching=!0,R(""))}e.on("mousedown",function(e){e.target.id?(v=e.target.id)===c.id+"_dropdown"&&document.body.addEventListener("click",w):v=e.target.className}),c.currentIndex=c.focusFirst?0:null,c.searching=!1,i=c.$watch("initialValue",function(e){e&&(i(),y(e,!0))}),c.$watch("fieldRequired",function(e,t){e!==t&&(e?p&&-1!==c.currentIndex?k(!0):k(!1):n[c.inputName].$setValidity(h,!0))}),c.$on("angucomplete-alt:clearInput",function(e,t){t&&t!==c.id||(c.searchStr=null,A(),k(!1),L())}),c.$on("angucomplete-alt:changeInput",function(e,t,n){t&&t===c.id&&y(n)}),c.onFocusHandler=function(){c.focusIn&&c.focusIn(),0!==f||c.searchStr&&0!==c.searchStr.length||(c.currentIndex=c.focusFirst?0:c.currentIndex,c.showDropdown=!0,B())},c.hideResults=function(){v&&(v===c.id+"_dropdown"||0<=v.indexOf("angucomplete"))?v=null:(r=q(function(){L(),c.$apply(function(){c.searchStr&&0<c.searchStr.length&&u.val(c.searchStr)})},200),O(),c.focusOut&&c.focusOut(),c.overrideSuggestions&&c.searchStr&&0<c.searchStr.length&&-1===c.currentIndex&&E())},c.resetHideResults=function(){r&&q.cancel(r)},c.hoverRow=function(e){c.currentIndex=e},c.selectResult=function(e){c.matchClass&&(e.title=S(e.originalObject),e.description=T(e.originalObject,c.descriptionField)),c.clearSelected?c.searchStr=null:c.searchStr=e.title,A(e),L()},c.inputChangeHandler=function(e){return e.length<f?(O(),L()):0===e.length&&0===f&&B(),c.inputChanged&&(e=c.inputChanged(e)),e},c.fieldRequiredClass&&""!==c.fieldRequiredClass&&(h=c.fieldRequiredClass),c.minlength&&""!==c.minlength&&(f=parseInt(c.minlength,10)),c.pause||(c.pause=500),c.clearSelected||(c.clearSelected=!1),c.overrideSuggestions||(c.overrideSuggestions=!1),c.fieldRequired&&n&&(c.initialValue?k(!0):k(!1)),c.inputType=t.type?t.type:"text",c.textSearching=t.textSearching?t.textSearching:"Searching...",c.textNoResults=t.textNoResults?t.textNoResults:"No results found",o="false"!==c.textSearching,l="false"!==c.textNoResults,c.maxlength=t.maxlength?t.maxlength:524288,u.on("keydown",function(e){var t,n,r=C(e),i=null,a=null;13===r&&c.results?(0<=c.currentIndex&&c.currentIndex<c.results.length?(e.preventDefault(),c.selectResult(c.results[c.currentIndex])):(E(e),L()),c.$apply()):40===r&&c.results?(e.preventDefault(),c.currentIndex+1<c.results.length&&c.showDropdown&&(c.$apply(function(){c.currentIndex++,P()}),b&&(i=D(),_.getBoundingClientRect().top+parseInt(getComputedStyle(_).maxHeight,10)<i.getBoundingClientRect().bottom&&I((t=i,n=getComputedStyle(t),t.offsetHeight+parseInt(n.marginTop,10)+parseInt(n.marginBottom,10)))))):38===r&&c.results?(e.preventDefault(),1<=c.currentIndex?(c.$apply(function(){c.currentIndex--,P()}),b&&(a=D().getBoundingClientRect().top-(_.getBoundingClientRect().top+parseInt(getComputedStyle(_).paddingTop,10)))<0&&I(a-1)):0===c.currentIndex&&c.$apply(function(){c.currentIndex=-1,u.val(c.searchStr)})):9===r?c.results&&0<c.results.length&&c.showDropdown?-1===c.currentIndex&&c.overrideSuggestions?E():(-1===c.currentIndex&&(c.currentIndex=0),c.selectResult(c.results[c.currentIndex]),c.$digest()):c.searchStr&&0<c.searchStr.length&&E():27===r&&e.preventDefault()}),u.on("keyup compositionend",function(e){var t=C(e);if(37!==t&&39!==t)if(38===t||13===t)e.preventDefault();else if(40===t)e.preventDefault(),!c.showDropdown&&c.searchStr&&c.searchStr.length>=f&&(F(),c.searching=!0,G(c.searchStr));else if(27===t)L(),c.$apply(function(){u.val(c.searchStr)});else{if(0===f&&!c.searchStr)return;c.searchStr&&""!==c.searchStr?c.searchStr.length>=f&&(F(),d&&q.cancel(d),c.searching=!0,d=q(function(){G(c.searchStr)},c.pause)):c.showDropdown=!1,p&&p!==c.searchStr&&!c.clearSelected&&c.$apply(function(){A()})}}),s="remoteUrlResponseFormatter",a=function(e){return c[s]?c[s](e):e},q(function(){var e=getComputedStyle(_);b=e.maxHeight&&"auto"===e.overflowY})}return t.put(n,'<div class="angucomplete-holder" ng-class="{\'angucomplete-dropdown-visible\': showDropdown}">  <input id="{{id}}_value" name="{{inputName}}" tabindex="{{fieldTabindex}}" ng-class="{\'angucomplete-input-not-empty\': notEmpty}" ng-model="searchStr" ng-disabled="disableInput" type="{{inputType}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" ng-focus="onFocusHandler()" class="{{inputClass}}" ng-focus="resetHideResults()" ng-blur="hideResults($event)" autocapitalize="off" autocorrect="off" autocomplete="off" ng-change="inputChangeHandler(searchStr)"/>  <div id="{{id}}_dropdown" class="angucomplete-dropdown" ng-show="showDropdown">    <div class="angucomplete-searching" ng-show="searching" ng-bind="textSearching"></div>    <div class="angucomplete-searching" ng-show="!searching && (!results || results.length == 0)" ng-bind="textNoResults"></div>    <div class="angucomplete-row" ng-repeat="result in results" ng-click="selectResult(result)" ng-mouseenter="hoverRow($index)" ng-class="{\'angucomplete-selected-row\': $index == currentIndex}">      <div ng-if="imageField" class="angucomplete-image-holder">        <img ng-if="result.image && result.image != \'\'" ng-src="{{result.image}}" class="angucomplete-image"/>        <div ng-if="!result.image && result.image != \'\'" class="angucomplete-image-default"></div>      </div>      <div class="angucomplete-title" ng-if="matchClass" ng-bind-html="result.title"></div>      <div class="angucomplete-title" ng-if="!matchClass">{{ result.title }}</div>      <div ng-if="matchClass && result.description && result.description != \'\'" class="angucomplete-description" ng-bind-html="result.description"></div>      <div ng-if="!matchClass && result.description && result.description != \'\'" class="angucomplete-description">{{result.description}}</div>    </div>  </div></div>'),{restrict:"EA",require:"^?form",scope:{selectedObject:"=",selectedObjectData:"=",disableInput:"=",initialValue:"=",localData:"=",localSearch:"&",remoteUrlRequestFormatter:"=",remoteUrlRequestWithCredentials:"@",remoteUrlResponseFormatter:"=",remoteUrlErrorCallback:"=",remoteApiHandler:"=",id:"@",type:"@",placeholder:"@",textSearching:"@",textNoResults:"@",remoteUrl:"@",remoteUrlDataField:"@",titleField:"@",descriptionField:"@",imageField:"@",inputClass:"@",pause:"@",searchFields:"@",minlength:"@",matchClass:"@",clearSelected:"@",overrideSuggestions:"@",fieldRequired:"=",fieldRequiredClass:"@",inputChanged:"=",autoMatch:"@",focusOut:"&",focusIn:"&",fieldTabindex:"@",inputName:"@",focusFirst:"@",parseInput:"&",disableAutocomplete:"="},templateUrl:function(e,t){return t.templateUrl||n},compile:function(e){var t=i.startSymbol(),n=i.endSymbol();if("{{"!==t||"}}"!==n){var r=e.html().replace(/\{\{/g,t).replace(/\}\}/g,n);e.html(r)}return a}}}])}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(function(){try{return require("moment")}catch(e){}}()):"function"==typeof define&&define.amd?define(["require"],function(e){return t(function(){try{return e("moment")}catch(e){}}())}):(e=e||self).Chart=t(e.moment)}(this,function(r){"use strict";r=r&&r.hasOwnProperty("default")?r.default:r;var e,u={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},l=(function(e){var l={};for(var t in u)u.hasOwnProperty(t)&&(l[u[t]]=t);var o=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var n in o)if(o.hasOwnProperty(n)){if(!("channels"in o[n]))throw new Error("missing channels property: "+n);if(!("labels"in o[n]))throw new Error("missing channel labels property: "+n);if(o[n].labels.length!==o[n].channels)throw new Error("channel and label counts mismatch: "+n);var r=o[n].channels,i=o[n].labels;delete o[n].channels,delete o[n].labels,Object.defineProperty(o[n],"channels",{value:r}),Object.defineProperty(o[n],"labels",{value:i})}o.rgb.hsl=function(e){var t,n,r=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(r,i,a),s=Math.max(r,i,a),c=s-o;return s===o?t=0:r===s?t=(i-a)/c:i===s?t=2+(a-r)/c:a===s&&(t=4+(r-i)/c),(t=Math.min(60*t,360))<0&&(t+=360),n=(o+s)/2,[t,100*(s===o?0:n<=.5?c/(s+o):c/(2-s-o)),100*n]},o.rgb.hsv=function(e){var t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),f=function(e){return(l-e)/6/u+.5};return 0===u?i=a=0:(a=u/l,t=f(o),n=f(s),r=f(c),o===l?i=r-n:s===l?i=1/3+t-r:c===l&&(i=2/3+n-t),i<0?i+=1:1<i&&(i-=1)),[360*i,100*a,100*l]},o.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[o.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,r))),100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},o.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-i)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]},o.rgb.keyword=function(e){var t=l[e];if(t)return t;var n,r,i,a=1/0;for(var o in u)if(u.hasOwnProperty(o)){var s=u[o],c=(r=e,i=s,Math.pow(r[0]-i[0],2)+Math.pow(r[1]-i[1],2)+Math.pow(r[2]-i[2],2));c<a&&(a=c,n=o)}return n},o.keyword.rgb=function(e){return u[e]},o.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=.04045<t?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=.04045<n?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=.04045<r?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},o.rgb.lab=function(e){var t=o.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return r/=100,i/=108.883,n=.008856<(n/=95.047)?Math.pow(n,1/3):7.787*n+16/116,[116*(r=.008856<r?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(i=.008856<i?Math.pow(i,1/3):7.787*i+16/116))]},o.hsl.rgb=function(e){var t,n,r,i,a,o=e[0]/360,s=e[1]/100,c=e[2]/100;if(0===s)return[a=255*c,a,a];t=2*c-(n=c<.5?c*(1+s):c+s-c*s),i=[0,0,0];for(var l=0;l<3;l++)(r=o+1/3*-(l-1))<0&&r++,1<r&&r--,a=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,i[l]=255*a;return i},o.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,i*=a<=1?a:2-a,[t,100*(0===r?2*i/(a+i):2*n/(r+n)),100*((r+n)/2)]},o.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},o.hsv.hsl=function(e){var t,n,r,i=e[0],a=e[1]/100,o=e[2]/100,s=Math.max(o,.01);return r=(2-a)*o,n=a*s,[i,100*(n=(n/=(t=(2-a)*s)<=1?t:2-t)||0),100*(r/=2)]},o.hwb.rgb=function(e){var t,n,r,i,a,o,s,c=e[0]/360,l=e[1]/100,u=e[2]/100,f=l+u;switch(1<f&&(l/=f,u/=f),r=6*c-(t=Math.floor(6*c)),0!=(1&t)&&(r=1-r),i=l+r*((n=1-u)-l),t){default:case 6:case 0:a=n,o=i,s=l;break;case 1:a=i,o=n,s=l;break;case 2:a=l,o=n,s=i;break;case 3:a=l,o=i,s=n;break;case 4:a=i,o=l,s=n;break;case 5:a=n,o=l,s=i}return[255*a,255*o,255*s]},o.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},o.xyz.rgb=function(e){var t,n,r,i=e[0]/100,a=e[1]/100,o=e[2]/100;return n=-.9689*i+1.8758*a+.0415*o,r=.0557*i+-.204*a+1.057*o,t=.0031308<(t=3.2406*i+-1.5372*a+-.4986*o)?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=.0031308<n?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=.0031308<r?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},o.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=.008856<(t/=95.047)?Math.pow(t,1/3):7.787*t+16/116,[116*(n=.008856<n?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=.008856<r?Math.pow(r,1/3):7.787*r+16/116))]},o.lab.xyz=function(e){var t,n,r,i=e[0];t=e[1]/500+(n=(i+16)/116),r=n-e[2]/200;var a=Math.pow(n,3),o=Math.pow(t,3),s=Math.pow(r,3);return n=.008856<a?a:(n-16/116)/7.787,t=.008856<o?o:(t-16/116)/7.787,r=.008856<s?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},o.lab.lch=function(e){var t,n=e[0],r=e[1],i=e[2];return(t=360*Math.atan2(i,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+i*i),t]},o.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},o.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],i=1 in arguments?arguments[1]:o.rgb.hsv(e)[2];if(0===(i=Math.round(i/50)))return 30;var a=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===i&&(a+=60),a},o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])},o.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:248<t?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},o.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return 50<e&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(50<e));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},o.ansi256.rgb=function(e){if(232<=e){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},o.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},o.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map(function(e){return e+e}).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},o.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255,a=Math.max(Math.max(n,r),i),o=Math.min(Math.min(n,r),i),s=a-o;return t=s<=0?0:a===n?(r-i)/s%6:a===r?2+(i-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?o/(1-s):0)]},o.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,i=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},o.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},o.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var i,a=[0,0,0],o=t%1*6,s=o%1,c=1-s;switch(Math.floor(o)){case 0:a[0]=1,a[1]=s,a[2]=0;break;case 1:a[0]=c,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=s;break;case 3:a[0]=0,a[1]=c,a[2]=1;break;case 4:a[0]=s,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=c}return i=(1-n)*r,[255*(n*a[0]+i),255*(n*a[1]+i),255*(n*a[2]+i)]},o.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return 0<n&&(r=t/n),[e[0],100*r,100*n]},o.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return 0<n&&n<.5?r=t/(2*n):.5<=n&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},o.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},o.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},o.gray.hsl=o.gray.hsv=function(e){return[0,0,e[0]]},o.gray.hwb=function(e){return[0,100,e[0]]},o.gray.cmyk=function(e){return[0,0,0,e[0]]},o.gray.lab=function(e){return[e[0],0,0]},o.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},o.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}(e={exports:{}},e.exports),e.exports);l.rgb,l.hsl,l.hsv,l.hwb,l.cmyk,l.xyz,l.lab,l.lch,l.hex,l.keyword,l.ansi16,l.ansi256,l.hcg,l.apple,l.gray;function c(e){var t=function(){for(var e={},t=Object.keys(l),n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;)for(var r=n.pop(),i=Object.keys(l[r]),a=i.length,o=0;o<a;o++){var s=i[o],c=t[s];-1===c.distance&&(c.distance=t[r].distance+1,c.parent=r,n.unshift(s))}return t}function a(t,n){return function(e){return n(t(e))}}function f(e,t){for(var n=[t[e].parent,e],r=l[t[e].parent][e],i=t[e].parent;t[i].parent;)n.unshift(t[i].parent),r=a(l[t[i].parent][i],r),i=t[i].parent;return r.conversion=n,r}var d={};Object.keys(l).forEach(function(o){d[o]={},Object.defineProperty(d[o],"channels",{value:l[o].channels}),Object.defineProperty(d[o],"labels",{value:l[o].labels});var s=function(e){for(var t=c(e),n={},r=Object.keys(t),i=r.length,a=0;a<i;a++){var o=r[a];null!==t[o].parent&&(n[o]=f(o,t))}return n}(o);Object.keys(s).forEach(function(e){var i,t,n,r,a=s[e];d[o][e]=(t=function(e){if(null==e)return e;1<arguments.length&&(e=Array.prototype.slice.call(arguments));var t=i(e);if("object"==typeof t)for(var n=t.length,r=0;r<n;r++)t[r]=Math.round(t[r]);return t},"conversion"in(i=a)&&(t.conversion=i.conversion),t),d[o][e].raw=(r=function(e){return null==e?e:(1<arguments.length&&(e=Array.prototype.slice.call(arguments)),n(e))},"conversion"in(n=a)&&(r.conversion=n.conversion),r)})});var h=d,o={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n={getRgba:i,getHsla:s,getRgb:function(e){var t=i(e);return t&&t.slice(0,3)},getHsl:function(e){var t=s(e);return t&&t.slice(0,3)},getHwb:p,getAlpha:function(e){var t=i(e);{if(t)return t[3];if(t=s(e))return t[3];if(t=p(e))return t[3]}},hexString:function(e,t){var t=void 0!==t&&3===e.length?t:e[3];return"#"+v(e[0])+v(e[1])+v(e[2])+(0<=t&&t<1?v(Math.round(255*t)):"")},rgbString:function(e,t){if(t<1||e[3]&&e[3]<1)return m(e,t);return"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:m,percentString:function(e,t){if(t<1||e[3]&&e[3]<1)return g(e,t);var n=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return"rgb("+n+"%, "+r+"%, "+i+"%)"},percentaString:g,hslString:function(e,t){if(t<1||e[3]&&e[3]<1)return _(e,t);return"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:_,hwbString:function(e,t){void 0===t&&(t=void 0!==e[3]?e[3]:1);return"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function(e){return t[e.slice(0,3)]}};function i(e){if(e){var t=[0,0,0],n=1,r=e.match(/^#([a-fA-F0-9]{3,4})$/i),i="";if(r){i=(r=r[1])[3];for(var a=0;a<t.length;a++)t[a]=parseInt(r[a]+r[a],16);i&&(n=Math.round(parseInt(i+i,16)/255*100)/100)}else if(r=e.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){i=r[2],r=r[1];for(a=0;a<t.length;a++)t[a]=parseInt(r.slice(2*a,2*a+2),16);i&&(n=Math.round(parseInt(i,16)/255*100)/100)}else if(r=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(a=0;a<t.length;a++)t[a]=parseInt(r[a+1]);n=parseFloat(r[4])}else if(r=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(a=0;a<t.length;a++)t[a]=Math.round(2.55*parseFloat(r[a+1]));n=parseFloat(r[4])}else if(r=e.match(/(\w+)/)){if("transparent"==r[1])return[0,0,0,0];if(!(t=o[r[1]]))return}for(a=0;a<t.length;a++)t[a]=b(t[a],0,255);return n=n||0==n?b(n,0,1):1,t[3]=n,t}}function s(e){if(e){var t=e.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[b(parseInt(t[1]),0,360),b(parseFloat(t[2]),0,100),b(parseFloat(t[3]),0,100),b(isNaN(n)?1:n,0,1)]}}}function p(e){if(e){var t=e.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[b(parseInt(t[1]),0,360),b(parseFloat(t[2]),0,100),b(parseFloat(t[3]),0,100),b(isNaN(n)?1:n,0,1)]}}}function m(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function g(e,t){return"rgba("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%, "+(t||e[3]||1)+")"}function _(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function b(e,t,n){return Math.min(Math.max(t,e),n)}function v(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}var t={};for(var y in o)t[o[y]]=y;var w=function(e){return e instanceof w?e:this instanceof w?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof e?(t=n.getRgba(e))?this.setValues("rgb",t):(t=n.getHsla(e))?this.setValues("hsl",t):(t=n.getHwb(e))&&this.setValues("hwb",t):"object"==typeof e&&(void 0!==(t=e).r||void 0!==t.red?this.setValues("rgb",t):void 0!==t.l||void 0!==t.lightness?this.setValues("hsl",t):void 0!==t.v||void 0!==t.value?this.setValues("hsv",t):void 0!==t.w||void 0!==t.whiteness?this.setValues("hwb",t):void 0===t.c&&void 0===t.cyan||this.setValues("cmyk",t)))):new w(e);var t};w.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var e=this.values;return 1!==e.alpha?e.hwb.concat([e.alpha]):e.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values;return e.rgb.concat([e.alpha])},hslaArray:function(){var e=this.values;return e.hsl.concat([e.alpha])},alpha:function(e){return void 0===e?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return e&&(e=(e%=360)<0?360+e:e),this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return n.hexString(this.values.rgb)},rgbString:function(){return n.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return n.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return n.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return n.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return n.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return n.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return n.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var e=this.values.rgb;return e[0]<<16|e[1]<<8|e[2]},luminosity:function(){for(var e=this.values.rgb,t=[],n=0;n<e.length;n++){var r=e[n]/255;t[n]=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return n<t?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return 7.1<=t?"AAA":4.5<=t?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,n=(t[0]+e)%360;return t[0]=n<0?360+n:n,this.setValues("hsl",t),this},mix:function(e,t){var n=e,r=void 0===t?.5:t,i=2*r-1,a=this.alpha()-n.alpha(),o=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*r+n.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var e,t,n=new w,r=this.values,i=n.values;for(var a in r)r.hasOwnProperty(a)&&(e=r[a],"[object Array]"===(t={}.toString.call(e))?i[a]=e.slice(0):"[object Number]"===t?i[a]=e:console.error("unexpected color value:",e));return n}},w.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},w.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},w.prototype.getValues=function(e){for(var t=this.values,n={},r=0;r<e.length;r++)n[e.charAt(r)]=t[e][r];return 1!==t.alpha&&(n.a=t.alpha),n},w.prototype.setValues=function(e,t){var n,r,i=this.values,a=this.spaces,o=this.maxes,s=1;if(this.valid=!0,"alpha"===e)s=t;else if(t.length)i[e]=t.slice(0,e.length),s=t[e.length];else if(void 0!==t[e.charAt(0)]){for(n=0;n<e.length;n++)i[e][n]=t[e.charAt(n)];s=t.a}else if(void 0!==t[a[e][0]]){var c=a[e];for(n=0;n<e.length;n++)i[e][n]=t[c[n]];s=t.alpha}if(i.alpha=Math.max(0,Math.min(1,void 0===s?i.alpha:s)),"alpha"===e)return!1;for(n=0;n<e.length;n++)r=Math.max(0,Math.min(o[e][n],i[e][n])),i[e][n]=Math.round(r);for(var l in a)l!==e&&(i[l]=h[e][l](i[e]));return!0},w.prototype.setSpace=function(e,t){var n=t[0];return void 0===n?this.getValues(e):("number"==typeof n&&(n=Array.prototype.slice.call(t)),this.setValues(e,n),this)},w.prototype.setChannel=function(e,t,n){var r=this.values[e];return void 0===n?r[t]:(n===r[t]||(r[t]=n,this.setValues(e,r)),this)},"undefined"!=typeof window&&(window.Color=w);var C=w;function A(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}var S,T={noop:function(){},uid:(S=0,function(){return S++}),isNullOrUndef:function(e){return null==e},isArray:function(e){if(Array.isArray&&Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return"[object"===t.substr(0,7)&&"Array]"===t.substr(-6)},isObject:function(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)},isFinite:function(e){return("number"==typeof e||e instanceof Number)&&isFinite(e)},valueOrDefault:function(e,t){return void 0===e?t:e},valueAtIndexOrDefault:function(e,t,n){return T.valueOrDefault(T.isArray(e)?e[t]:e,n)},callback:function(e,t,n){if(e&&"function"==typeof e.call)return e.apply(n,t)},each:function(e,t,n,r){var i,a,o;if(T.isArray(e))if(a=e.length,r)for(i=a-1;0<=i;i--)t.call(n,e[i],i);else for(i=0;i<a;i++)t.call(n,e[i],i);else if(T.isObject(e))for(a=(o=Object.keys(e)).length,i=0;i<a;i++)t.call(n,e[o[i]],o[i])},arrayEquals:function(e,t){var n,r,i,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],a=t[n],i instanceof Array&&a instanceof Array){if(!T.arrayEquals(i,a))return!1}else if(i!==a)return!1;return!0},clone:function(e){if(T.isArray(e))return e.map(T.clone);if(T.isObject(e)){for(var t=Object.create(e),n=Object.keys(e),r=n.length,i=0;i<r;++i)t[n[i]]=T.clone(e[n[i]]);return t}return e},_merger:function(e,t,n,r){if(A(e)){var i=t[e],a=n[e];T.isObject(i)&&T.isObject(a)?T.merge(i,a,r):t[e]=T.clone(a)}},_mergerIf:function(e,t,n){if(A(e)){var r=t[e],i=n[e];T.isObject(r)&&T.isObject(i)?T.mergeIf(r,i):t.hasOwnProperty(e)||(t[e]=T.clone(i))}},merge:function(e,t,n){var r,i,a,o,s,c=T.isArray(t)?t:[t],l=c.length;if(!T.isObject(e))return e;for(r=(n=n||{}).merger||T._merger,i=0;i<l;++i)if(t=c[i],T.isObject(t))for(s=0,o=(a=Object.keys(t)).length;s<o;++s)r(a[s],e,t,n);return e},mergeIf:function(e,t){return T.merge(e,t,{merger:T._mergerIf})},extend:Object.assign||function(e){return T.merge(e,[].slice.call(arguments,1),{merger:function(e,t,n){t[e]=n[e]}})},inherits:function(e){var t=this,n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},r=function(){this.constructor=n};return r.prototype=t.prototype,n.prototype=new r,n.extend=T.inherits,e&&T.extend(n.prototype,e),n.__super__=t.prototype,n},_deprecated:function(e,t,n,r){void 0!==t&&console.warn(e+': "'+n+'" is deprecated. Please use "'+r+'" instead')}},x=T;T.callCallback=T.callback,T.indexOf=function(e,t,n){return Array.prototype.indexOf.call(e,t,n)},T.getValueOrDefault=T.valueOrDefault,T.getValueAtIndexOrDefault=T.valueAtIndexOrDefault;var k={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return(e-=1)*e*e+1},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-((e-=1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return(e-=1)*e*e*e*e+1},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return 1-Math.cos(e*(Math.PI/2))},easeOutSine:function(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInExpo:function(e){return 0===e?0:Math.pow(2,10*(e-1))},easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)},easeInOutExpo:function(e){return 0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},easeInCirc:function(e){return 1<=e?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),t=r<1?(r=1,n/4):n/(2*Math.PI)*Math.asin(1/r),-r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n))},easeOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),t=r<1?(r=1,n/4):n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},easeInOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:2==(e/=.5)?1:(n||(n=.45),t=r<1?(r=1,n/4):n/(2*Math.PI)*Math.asin(1/r),e<1?r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},easeInBack:function(e){return e*e*(2.70158*e-1.70158)},easeOutBack:function(e){return(e-=1)*e*(2.70158*e+1.70158)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-k.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*k.easeInBounce(2*e):.5*k.easeOutBounce(2*e-1)+.5}},E={effects:k};x.easingEffects=k;var D=Math.PI,I=D/180,P=2*D,M=D/2,$=D/4,O=2*D/3,R={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,n,r,i,a){if(a){var o=Math.min(a,i/2,r/2),s=t+o,c=n+o,l=t+r-o,u=n+i-o;e.moveTo(t,c),s<l&&c<u?(e.arc(s,c,o,-D,-M),e.arc(l,c,o,-M,0),e.arc(l,u,o,0,M),e.arc(s,u,o,M,D)):s<l?(e.moveTo(s,n),e.arc(l,c,o,-M,M),e.arc(s,c,o,M,D+M)):c<u?(e.arc(s,c,o,-D,0),e.arc(s,u,o,0,D)):e.arc(s,c,o,-D,D),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,r,i)},drawPoint:function(e,t,n,r,i,a){var o,s,c,l,u,f=(a||0)*I;if(t&&"object"==typeof t&&("[object HTMLImageElement]"===(o=t.toString())||"[object HTMLCanvasElement]"===o))return e.save(),e.translate(r,i),e.rotate(f),e.drawImage(t,-t.width/2,-t.height/2,t.width,t.height),void e.restore();if(!(isNaN(n)||n<=0)){switch(e.beginPath(),t){default:e.arc(r,i,n,0,P),e.closePath();break;case"triangle":e.moveTo(r+Math.sin(f)*n,i-Math.cos(f)*n),f+=O,e.lineTo(r+Math.sin(f)*n,i-Math.cos(f)*n),f+=O,e.lineTo(r+Math.sin(f)*n,i-Math.cos(f)*n),e.closePath();break;case"rectRounded":l=n-(u=.516*n),s=Math.cos(f+$)*l,c=Math.sin(f+$)*l,e.arc(r-s,i-c,u,f-D,f-M),e.arc(r+c,i-s,u,f-M,f),e.arc(r+s,i+c,u,f,f+M),e.arc(r-c,i+s,u,f+M,f+D),e.closePath();break;case"rect":if(!a){l=Math.SQRT1_2*n,e.rect(r-l,i-l,2*l,2*l);break}f+=$;case"rectRot":s=Math.cos(f)*n,c=Math.sin(f)*n,e.moveTo(r-s,i-c),e.lineTo(r+c,i-s),e.lineTo(r+s,i+c),e.lineTo(r-c,i+s),e.closePath();break;case"crossRot":f+=$;case"cross":s=Math.cos(f)*n,c=Math.sin(f)*n,e.moveTo(r-s,i-c),e.lineTo(r+s,i+c),e.moveTo(r+c,i-s),e.lineTo(r-c,i+s);break;case"star":s=Math.cos(f)*n,c=Math.sin(f)*n,e.moveTo(r-s,i-c),e.lineTo(r+s,i+c),e.moveTo(r+c,i-s),e.lineTo(r-c,i+s),f+=$,s=Math.cos(f)*n,c=Math.sin(f)*n,e.moveTo(r-s,i-c),e.lineTo(r+s,i+c),e.moveTo(r+c,i-s),e.lineTo(r-c,i+s);break;case"line":s=Math.cos(f)*n,c=Math.sin(f)*n,e.moveTo(r-s,i-c),e.lineTo(r+s,i+c);break;case"dash":e.moveTo(r,i),e.lineTo(r+Math.cos(f)*n,i+Math.sin(f)*n)}e.fill(),e.stroke()}},_isPointInArea:function(e,t){return e.x>t.left-1e-6&&e.x<t.right+1e-6&&e.y>t.top-1e-6&&e.y<t.bottom+1e-6},clipArea:function(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()},unclipArea:function(e){e.restore()},lineTo:function(e,t,n,r){var i=n.steppedLine;if(i){if("middle"===i){var a=(t.x+n.x)/2;e.lineTo(a,r?n.y:t.y),e.lineTo(a,r?t.y:n.y)}else"after"===i&&!r||"after"!==i&&r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}else n.tension?e.bezierCurveTo(r?t.controlPointPreviousX:t.controlPointNextX,r?t.controlPointPreviousY:t.controlPointNextY,r?n.controlPointNextX:n.controlPointPreviousX,r?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):e.lineTo(n.x,n.y)}},N=R;x.clear=R.clear,x.drawRoundedRectangle=function(e){e.beginPath(),R.roundedRect.apply(R,arguments)};var L={_set:function(e,t){return x.merge(this[e]||(this[e]={}),t)}};L._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var F=L,G=x.valueOrDefault;var j={toLineHeight:function(e,t){var n=(""+e).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*t;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100}return t*e},toPadding:function(e){var t,n,r,i;return x.isObject(e)?(t=+e.top||0,n=+e.right||0,r=+e.bottom||0,i=+e.left||0):t=n=r=i=+e||0,{top:t,right:n,bottom:r,left:i,height:t+r,width:i+n}},_parseFont:function(e){var t,n=F.global,r=G(e.fontSize,n.defaultFontSize),i={family:G(e.fontFamily,n.defaultFontFamily),lineHeight:x.options.toLineHeight(G(e.lineHeight,n.defaultLineHeight),r),size:r,style:G(e.fontStyle,n.defaultFontStyle),weight:null,string:""};return i.string=!(t=i)||x.isNullOrUndef(t.size)||x.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family,i},resolve:function(e,t,n,r){var i,a,o,s=!0;for(i=0,a=e.length;i<a;++i)if(void 0!==(o=e[i])&&(void 0!==t&&"function"==typeof o&&(o=o(t),s=!1),void 0!==n&&x.isArray(o)&&(o=o[n],s=!1),void 0!==o))return r&&!s&&(r.cacheable=!1),o}},B={_factorize:function(e){var t,n=[],r=Math.sqrt(e);for(t=1;t<r;t++)e%t==0&&(n.push(t),n.push(e/t));return r===(0|r)&&n.push(r),n.sort(function(e,t){return e-t}).pop(),n},log10:Math.log10||function(e){var t=Math.log(e)*Math.LOG10E,n=Math.round(t);return e===Math.pow(10,n)?n:t}},U=B;x.log10=B.log10;var H=x,W=E,q=N,z=j,V=U,Y={getRtlAdapter:function(e,t,n){return e?(r=t,i=n,{x:function(e){return r+r+i-e},setWidth:function(e){i=e},textAlign:function(e){return"center"===e?e:"right"===e?"left":"right"},xPlus:function(e,t){return e-t},leftForLtr:function(e,t){return e-t}}):{x:function(e){return e},setWidth:function(e){},textAlign:function(e){return e},xPlus:function(e,t){return e+t},leftForLtr:function(e,t){return e}};var r,i},overrideTextDirection:function(e,t){var n,r;"ltr"!==t&&"rtl"!==t||(r=[(n=e.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)},restoreTextDirection:function(e){var t=e.prevTextDirection;void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}};H.easing=W,H.canvas=q,H.options=z,H.math=V,H.rtl=Y;var K=function(e){H.extend(this,e),this.initialize.apply(this,arguments)};H.extend(K.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){return this._view||(this._view=H.extend({},this._model)),this._start={},this},transition:function(e){var t=this._model,n=this._start,r=this._view;return t&&1!==e?(r||(r=this._view={}),n||(n=this._start={}),function(e,t,n,r){var i,a,o,s,c,l,u,f,d,h=Object.keys(n);for(i=0,a=h.length;i<a;++i)if(l=n[o=h[i]],t.hasOwnProperty(o)||(t[o]=l),(s=t[o])!==l&&"_"!==o[0]){if(e.hasOwnProperty(o)||(e[o]=s),(u=typeof l)==typeof(c=e[o]))if("string"===u){if((f=C(c)).valid&&(d=C(l)).valid){t[o]=d.mix(f,r).rgbString();continue}}else if(H.isFinite(c)&&H.isFinite(l)){t[o]=c+(l-c)*r;continue}t[o]=l}}(n,r,t,e)):(this._view=H.extend({},t),this._start=null),this},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return H.isNumber(this._model.x)&&H.isNumber(this._model.y)}}),K.extend=H.inherits;var Q=K,X=Q.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),Z=X;Object.defineProperty(X.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(X.prototype,"chartInstance",{get:function(){return this.chart},set:function(e){this.chart=e}}),F._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:H.noop,onComplete:H.noop}});var J={animations:[],request:null,addAnimation:function(e,t,n,r){var i,a,o=this.animations;for(t.chart=e,t.startTime=Date.now(),t.duration=n,r||(e.animating=!0),i=0,a=o.length;i<a;++i)if(o[i].chart===e)return void(o[i]=t);o.push(t),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=H.findIndex(this.animations,function(e){return e.chart===t});-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var e=this;null===e.request&&(e.request=H.requestAnimFrame.call(window,function(){e.request=null,e.startDigest()}))},startDigest:function(){this.advance(),0<this.animations.length&&this.requestAnimationFrame()},advance:function(){for(var e,t,n,r,i=this.animations,a=0;a<i.length;)t=(e=i[a]).chart,n=e.numSteps,r=Math.floor((Date.now()-e.startTime)/e.duration*n)+1,e.currentStep=Math.min(r,n),H.callback(e.render,[t,e],t),H.callback(e.onAnimationProgress,[e],t),e.currentStep>=n?(H.callback(e.onAnimationComplete,[e],t),t.animating=!1,i.splice(a,1)):++a}},ee=H.options.resolve,te=["push","pop","shift","splice","unshift"];function ne(t,e){var n=t._chartjs;if(n){var r=n.listeners,i=r.indexOf(e);-1!==i&&r.splice(i,1),0<r.length||(te.forEach(function(e){delete t[e]}),delete t._chartjs)}}var re=function(e,t){this.initialize(e,t)};H.extend(re.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){this.chart=e,this.index=t,this.linkScales(),this.addElements(),this._type=this.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this.getMeta(),t=this.chart,n=t.scales,r=this.getDataset(),i=t.options.scales;null!==e.xAxisID&&e.xAxisID in n&&!r.xAxisID||(e.xAxisID=r.xAxisID||i.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in n&&!r.yAxisID||(e.yAxisID=r.yAxisID||i.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&ne(this._data,this)},createMetaDataset:function(){var e=this.datasetElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(e){var t=this.dataElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index,_index:e})},addElements:function(){var e,t,n=this.getMeta(),r=this.getDataset().data||[],i=n.data;for(e=0,t=r.length;e<t;++e)i[e]=i[e]||this.createMetaData(e);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(e){var t=this.createMetaData(e);this.getMeta().data.splice(e,0,t),this.updateElement(t,e,!0)},buildOrUpdateElements:function(){var i,e,t=this.getDataset(),n=t.data||(t.data=[]);this._data!==n&&(this._data&&ne(this._data,this),n&&Object.isExtensible(n)&&(e=this,(i=n)._chartjs?i._chartjs.listeners.push(e):(Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),te.forEach(function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),r=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value:function(){var t=Array.prototype.slice.call(arguments),e=r.apply(this,t);return H.each(i._chartjs.listeners,function(e){"function"==typeof e[n]&&e[n].apply(e,t)}),e}})}))),this._data=n),this.resyncElements()},_configure:function(){this._config=H.merge(Object.create(null),[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(e,t,n){"_meta"!==e&&"data"!==e&&H._merger(e,t,n)}})},_update:function(e){this._configure(),this._cachedDataOpts=null,this.update(e)},update:H.noop,transition:function(e){for(var t=this.getMeta(),n=t.data||[],r=n.length,i=0;i<r;++i)n[i].transition(e);t.dataset&&t.dataset.transition(e)},draw:function(){var e=this.getMeta(),t=e.data||[],n=t.length,r=0;for(e.dataset&&e.dataset.draw();r<n;++r)t[r].draw()},getStyle:function(e){var t,n=this.getMeta(),r=n.dataset;return this._configure(),!1!==(t=r&&void 0===e?this._resolveDatasetElementOptions(r||{}):(e=e||0,this._resolveDataElementOptions(n.data[e]||{},e))).fill&&null!==t.fill||(t.backgroundColor=t.borderColor),t},_resolveDatasetElementOptions:function(e,t){var n,r,i,a,o=this.chart,s=this._config,c=e.custom||{},l=o.options.elements[this.datasetElementType.prototype._type]||{},u=this._datasetElementOptions,f={},d={chart:o,dataset:this.getDataset(),datasetIndex:this.index,hover:t};for(n=0,r=u.length;n<r;++n)i=u[n],a=t?"hover"+i.charAt(0).toUpperCase()+i.slice(1):i,f[i]=ee([c[a],s[a],l[a]],d);return f},_resolveDataElementOptions:function(e,t){var n=e&&e.custom,r=this._cachedDataOpts;if(r&&!n)return r;var i,a,o,s,c=this.chart,l=this._config,u=c.options.elements[this.dataElementType.prototype._type]||{},f=this._dataElementOptions,d={},h={chart:c,dataIndex:t,dataset:this.getDataset(),datasetIndex:this.index},p={cacheable:!n};if(n=n||{},H.isArray(f))for(a=0,o=f.length;a<o;++a)d[s=f[a]]=ee([n[s],l[s],u[s]],h,t,p);else for(a=0,o=(i=Object.keys(f)).length;a<o;++a)d[s=i[a]]=ee([n[s],l[f[s]],l[s],u[s]],h,t,p);return p.cacheable&&(this._cachedDataOpts=Object.freeze(d)),d},removeHoverStyle:function(e){H.merge(e._model,e.$previousStyle||{}),delete e.$previousStyle},setHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],n=e._index,r=e.custom||{},i=e._model,a=H.getHoverColor;e.$previousStyle={backgroundColor:i.backgroundColor,borderColor:i.borderColor,borderWidth:i.borderWidth},i.backgroundColor=ee([r.hoverBackgroundColor,t.hoverBackgroundColor,a(i.backgroundColor)],void 0,n),i.borderColor=ee([r.hoverBorderColor,t.hoverBorderColor,a(i.borderColor)],void 0,n),i.borderWidth=ee([r.hoverBorderWidth,t.hoverBorderWidth,i.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var e=this.getMeta().dataset;e&&this.removeHoverStyle(e)},_setDatasetHoverStyle:function(){var e,t,n,r,i,a,o=this.getMeta().dataset,s={};if(o){for(a=o._model,i=this._resolveDatasetElementOptions(o,!0),e=0,t=(r=Object.keys(i)).length;e<t;++e)s[n=r[e]]=a[n],a[n]=i[n];o.$previousStyle=s}},resyncElements:function(){var e=this.getMeta(),t=this.getDataset().data,n=e.data.length,r=t.length;r<n?e.data.splice(r,n-r):n<r&&this.insertElements(n,r-n)},insertElements:function(e,t){for(var n=0;n<t;++n)this.addElementAndReset(e+n)},onDataPush:function(){var e=arguments.length;this.insertElements(this.getDataset().data.length-e,e)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(e,t){this.getMeta().data.splice(e,t),this.insertElements(e,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),re.extend=H.inherits;var ie=re,ae=2*Math.PI;function oe(e,t){var n=t.startAngle,r=t.endAngle,i=t.pixelMargin,a=i/t.outerRadius,o=t.x,s=t.y;e.beginPath(),e.arc(o,s,t.outerRadius,n-a,r+a),t.innerRadius>i?(a=i/t.innerRadius,e.arc(o,s,t.innerRadius-i,r+a,n-a,!0)):e.arc(o,s,i,r+Math.PI/2,n-Math.PI/2),e.closePath(),e.clip()}function se(e,t,n){var r="inner"===t.borderAlign;r?(e.lineWidth=2*t.borderWidth,e.lineJoin="round"):(e.lineWidth=t.borderWidth,e.lineJoin="bevel"),n.fullCircles&&function(e,t,n,r){var i,a=n.endAngle;for(r&&(n.endAngle=n.startAngle+ae,oe(e,n),n.endAngle=a,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=ae,n.fullCircles--)),e.beginPath(),e.arc(n.x,n.y,n.innerRadius,n.startAngle+ae,n.startAngle,!0),i=0;i<n.fullCircles;++i)e.stroke();for(e.beginPath(),e.arc(n.x,n.y,t.outerRadius,n.startAngle,n.startAngle+ae),i=0;i<n.fullCircles;++i)e.stroke()}(e,t,n,r),r&&oe(e,n),e.beginPath(),e.arc(n.x,n.y,t.outerRadius,n.startAngle,n.endAngle),e.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),e.closePath(),e.stroke()}F._set("global",{elements:{arc:{backgroundColor:F.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var ce=Q.extend({_type:"arc",inLabelRange:function(e){var t=this._view;return!!t&&Math.pow(e-t.x,2)<Math.pow(t.radius+t.hoverRadius,2)},inRange:function(e,t){var n=this._view;if(n){for(var r=H.getAngleFromPoint(n,{x:e,y:t}),i=r.angle,a=r.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=ae;for(;s<i;)i-=ae;for(;i<o;)i+=ae;var c=o<=i&&i<=s,l=a>=n.innerRadius&&a<=n.outerRadius;return c&&l}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,n=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,n=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},draw:function(){var e,t=this._chart.ctx,n=this._view,r="inner"===n.borderAlign?.33:0,i={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-r,0),pixelMargin:r,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/ae)};if(t.save(),t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,i.fullCircles){for(i.endAngle=i.startAngle+ae,t.beginPath(),t.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),t.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),t.closePath(),e=0;e<i.fullCircles;++e)t.fill();i.endAngle=i.startAngle+n.circumference%ae}t.beginPath(),t.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),t.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),t.closePath(),t.fill(),n.borderWidth&&se(t,n,i),t.restore()}}),le=H.valueOrDefault,ue=F.global.defaultColor;F._set("global",{elements:{line:{tension:.4,backgroundColor:ue,borderWidth:3,borderColor:ue,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var fe=Q.extend({_type:"line",draw:function(){var e,t,n,r=this._view,i=this._chart.ctx,a=r.spanGaps,o=this._children.slice(),s=F.global,c=s.elements.line,l=-1,u=this._loop;if(o.length){if(this._loop){for(e=0;e<o.length;++e)if(t=H.previousItem(o,e),!o[e]._view.skip&&t._view.skip){o=o.slice(e).concat(o.slice(0,e)),u=a;break}u&&o.push(o[0])}for(i.save(),i.lineCap=r.borderCapStyle||c.borderCapStyle,i.setLineDash&&i.setLineDash(r.borderDash||c.borderDash),i.lineDashOffset=le(r.borderDashOffset,c.borderDashOffset),i.lineJoin=r.borderJoinStyle||c.borderJoinStyle,i.lineWidth=le(r.borderWidth,c.borderWidth),i.strokeStyle=r.borderColor||s.defaultColor,i.beginPath(),(n=o[0]._view).skip||(i.moveTo(n.x,n.y),l=0),e=1;e<o.length;++e)n=o[e]._view,t=-1===l?H.previousItem(o,e):o[l],n.skip||(l!==e-1&&!a||-1===l?i.moveTo(n.x,n.y):H.canvas.lineTo(i,t._view,n),l=e);u&&i.closePath(),i.stroke(),i.restore()}}}),de=H.valueOrDefault,he=F.global.defaultColor;function pe(e){var t=this._view;return!!t&&Math.abs(e-t.x)<t.radius+t.hitRadius}F._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:he,borderColor:he,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var me=Q.extend({_type:"point",inRange:function(e,t){var n=this._view;return!!n&&Math.pow(e-n.x,2)+Math.pow(t-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:pe,inXRange:pe,inYRange:function(e){var t=this._view;return!!t&&Math.abs(e-t.y)<t.radius+t.hitRadius},getCenterPoint:function(){var e=this._view;return{x:e.x,y:e.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y,padding:e.radius+e.borderWidth}},draw:function(e){var t=this._view,n=this._chart.ctx,r=t.pointStyle,i=t.rotation,a=t.radius,o=t.x,s=t.y,c=F.global,l=c.defaultColor;t.skip||(void 0===e||H.canvas._isPointInArea(t,e))&&(n.strokeStyle=t.borderColor||l,n.lineWidth=de(t.borderWidth,c.elements.point.borderWidth),n.fillStyle=t.backgroundColor||l,H.canvas.drawPoint(n,r,a,o,s,i))}}),ge=F.global.defaultColor;function _e(e){return e&&void 0!==e.width}function be(e){var t,n,r,i,a;return i=_e(e)?(a=e.width/2,t=e.x-a,n=e.x+a,r=Math.min(e.y,e.base),Math.max(e.y,e.base)):(a=e.height/2,t=Math.min(e.x,e.base),n=Math.max(e.x,e.base),r=e.y-a,e.y+a),{left:t,top:r,right:n,bottom:i}}function ve(e,t,n){return e===t?n:e===n?t:e}function ye(e,t,n){var r,i,a,o,s,c,l,u=e.borderWidth,f=(i=(r=e).borderSkipped,a={},i&&(r.horizontal?r.base>r.x&&(i=ve(i,"left","right")):r.base<r.y&&(i=ve(i,"bottom","top")),a[i]=!0),a);return H.isObject(u)?(o=+u.top||0,s=+u.right||0,c=+u.bottom||0,l=+u.left||0):o=s=c=l=+u||0,{t:f.top||o<0?0:n<o?n:o,r:f.right||s<0?0:t<s?t:s,b:f.bottom||c<0?0:n<c?n:c,l:f.left||l<0?0:t<l?t:l}}function we(e,t,n){var r=null===t,i=null===n,a=!(!e||r&&i)&&be(e);return a&&(r||t>=a.left&&t<=a.right)&&(i||n>=a.top&&n<=a.bottom)}F._set("global",{elements:{rectangle:{backgroundColor:ge,borderColor:ge,borderSkipped:"bottom",borderWidth:0}}});var Ce=Q.extend({_type:"rectangle",draw:function(){var e,t,n,r,i,a=this._chart.ctx,o=this._view,s=(t=be(e=o),n=t.right-t.left,r=t.bottom-t.top,i=ye(e,n/2,r/2),{outer:{x:t.left,y:t.top,w:n,h:r},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b}}),c=s.outer,l=s.inner;a.fillStyle=o.backgroundColor,a.fillRect(c.x,c.y,c.w,c.h),c.w===l.w&&c.h===l.h||(a.save(),a.beginPath(),a.rect(c.x,c.y,c.w,c.h),a.clip(),a.fillStyle=o.borderColor,a.rect(l.x,l.y,l.w,l.h),a.fill("evenodd"),a.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return we(this._view,e,t)},inLabelRange:function(e,t){var n=this._view;return _e(n)?we(n,e,null):we(n,null,t)},inXRange:function(e){return we(this._view,e,null)},inYRange:function(e){return we(this._view,null,e)},getCenterPoint:function(){var e,t,n=this._view;return t=_e(n)?(e=n.x,(n.y+n.base)/2):(e=(n.x+n.base)/2,n.y),{x:e,y:t}},getArea:function(){var e=this._view;return _e(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),Ae={},Se=ce,Te=fe,xe=me,ke=Ce;Ae.Arc=Se,Ae.Line=Te,Ae.Point=xe,Ae.Rectangle=ke;var Ee=H._deprecated,De=H.valueOrDefault;function Ie(e,t,n){var r,i,a=n.barThickness,o=t.stackCount,s=t.pixels[e],c=H.isNullOrUndef(a)?function(e,t){var n,r,i,a,o=e._length;for(i=1,a=t.length;i<a;++i)o=Math.min(o,Math.abs(t[i]-t[i-1]));for(i=0,a=e.getTicks().length;i<a;++i)r=e.getPixelForTick(i),o=0<i?Math.min(o,Math.abs(r-n)):o,n=r;return o}(t.scale,t.pixels):-1;return i=H.isNullOrUndef(a)?(r=c*n.categoryPercentage,n.barPercentage):(r=a*o,1),{chunk:r/o,ratio:i,start:s-r/2}}F._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),F._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Pe=ie.extend({dataElementType:Ae.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var e,t;ie.prototype.initialize.apply(this,arguments),(e=this.getMeta()).stack=this.getDataset().stack,e.bar=!0,t=this._getIndexScale().options,Ee("bar chart",t.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Ee("bar chart",t.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Ee("bar chart",t.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Ee("bar chart",this._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Ee("bar chart",t.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(e){var t,n,r=this.getMeta().data;for(this._ruler=this.getRuler(),t=0,n=r.length;t<n;++t)this.updateElement(r[t],t,e)},updateElement:function(e,t,n){var r=this.getMeta(),i=this.getDataset(),a=this._resolveDataElementOptions(e,t);e._xScale=this.getScaleForId(r.xAxisID),e._yScale=this.getScaleForId(r.yAxisID),e._datasetIndex=this.index,e._index=t,e._model={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderSkipped:a.borderSkipped,borderWidth:a.borderWidth,datasetLabel:i.label,label:this.chart.data.labels[t]},H.isArray(i.data[t])&&(e._model.borderSkipped=null),this._updateElementGeometry(e,t,n,a),e.pivot()},_updateElementGeometry:function(e,t,n,r){var i=e._model,a=this._getValueScale(),o=a.getBasePixel(),s=a.isHorizontal(),c=this._ruler||this.getRuler(),l=this.calculateBarValuePixels(this.index,t,r),u=this.calculateBarIndexPixels(this.index,t,c,r);i.horizontal=s,i.base=n?o:l.base,i.x=s?n?o:l.head:u.center,i.y=s?u.center:n?o:l.head,i.height=s?u.size:void 0,i.width=s?void 0:u.size},_getStacks:function(e){var t,n,r=this._getIndexScale(),i=r._getMatchingVisibleMetas(this._type),a=r.options.stacked,o=i.length,s=[];for(t=0;t<o&&(n=i[t],(!1===a||-1===s.indexOf(n.stack)||void 0===a&&void 0===n.stack)&&s.push(n.stack),n.index!==e);++t);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(e,t){var n=this._getStacks(e),r=void 0!==t?n.indexOf(t):-1;return-1===r?n.length-1:r},getRuler:function(){var e,t,n=this._getIndexScale(),r=[];for(e=0,t=this.getMeta().data.length;e<t;++e)r.push(n.getPixelForValue(null,e,this.index));return{pixels:r,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(e,t,n){var r,i,a,o,s,c,l,u=this.chart,f=this._getValueScale(),d=f.isHorizontal(),h=u.data.datasets,p=f._getMatchingVisibleMetas(this._type),m=f._parseValue(h[e].data[t]),g=n.minBarLength,_=f.options.stacked,b=this.getMeta().stack,v=void 0===m.start?0:0<=m.max&&0<=m.min?m.min:m.max,y=void 0===m.start?m.end:0<=m.max&&0<=m.min?m.max-m.min:m.min-m.max,w=p.length;if(_||void 0===_&&void 0!==b)for(r=0;r<w&&(i=p[r]).index!==e;++r)i.stack===b&&(a=void 0===(l=f._parseValue(h[i.index].data[t])).start?l.end:0<=l.min&&0<=l.max?l.max:l.min,(m.min<0&&a<0||0<=m.max&&0<a)&&(v+=a));return o=f.getPixelForValue(v),c=(s=f.getPixelForValue(v+y))-o,void 0!==g&&Math.abs(c)<g&&(c=g,s=0<=y&&!d||y<0&&d?o-g:o+g),{size:c,base:o,head:s,center:s+c/2}},calculateBarIndexPixels:function(e,t,n,r){var i,a,o,s,c,l,u,f,d,h="flex"===r.barThickness?(i=t,o=r,c=(a=n).pixels,l=c[i],u=0<i?c[i-1]:null,f=i<c.length-1?c[i+1]:null,d=o.categoryPercentage,null===u&&(u=l-(null===f?a.end-a.start:f-l)),null===f&&(f=l+l-u),s=l-(l-Math.min(u,f))/2*d,{chunk:Math.abs(f-u)/2*d/a.stackCount,ratio:o.barPercentage,start:s}):Ie(t,n,r),p=this.getStackIndex(e,this.getMeta().stack),m=h.start+h.chunk*p+h.chunk/2,g=Math.min(De(r.maxBarThickness,1/0),h.chunk*h.ratio);return{base:m-g/2,head:m+g/2,center:m,size:g}},draw:function(){var e=this.chart,t=this._getValueScale(),n=this.getMeta().data,r=this.getDataset(),i=n.length,a=0;for(H.canvas.clipArea(e.ctx,e.chartArea);a<i;++a){var o=t._parseValue(r.data[a]);isNaN(o.min)||isNaN(o.max)||n[a].draw()}H.canvas.unclipArea(e.ctx)},_resolveDataElementOptions:function(){var e=H.extend({},ie.prototype._resolveDataElementOptions.apply(this,arguments)),t=this._getIndexScale().options,n=this._getValueScale().options;return e.barPercentage=De(t.barPercentage,e.barPercentage),e.barThickness=De(t.barThickness,e.barThickness),e.categoryPercentage=De(t.categoryPercentage,e.categoryPercentage),e.maxBarThickness=De(t.maxBarThickness,e.maxBarThickness),e.minBarLength=De(n.minBarLength,e.minBarLength),e}}),Me=H.valueOrDefault,$e=H.options.resolve;F._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.datasets[e.datasetIndex].label||"",r=t.datasets[e.datasetIndex].data[e.index];return n+": ("+e.xLabel+", "+e.yLabel+", "+r.r+")"}}}});var Oe=ie.extend({dataElementType:Ae.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(n){var r=this,e=r.getMeta().data;H.each(e,function(e,t){r.updateElement(e,t,n)})},updateElement:function(e,t,n){var r=this.getMeta(),i=e.custom||{},a=this.getScaleForId(r.xAxisID),o=this.getScaleForId(r.yAxisID),s=this._resolveDataElementOptions(e,t),c=this.getDataset().data[t],l=this.index,u=n?a.getPixelForDecimal(.5):a.getPixelForValue("object"==typeof c?c:NaN,t,l),f=n?o.getBasePixel():o.getPixelForValue(c,t,l);e._xScale=a,e._yScale=o,e._options=s,e._datasetIndex=l,e._index=t,e._model={backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderWidth:s.borderWidth,hitRadius:s.hitRadius,pointStyle:s.pointStyle,rotation:s.rotation,radius:n?0:s.radius,skip:i.skip||isNaN(u)||isNaN(f),x:u,y:f},e.pivot()},setHoverStyle:function(e){var t=e._model,n=e._options,r=H.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Me(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Me(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Me(n.hoverBorderWidth,n.borderWidth),t.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(e,t){var n=this.chart,r=this.getDataset(),i=e.custom||{},a=r.data[t]||{},o=ie.prototype._resolveDataElementOptions.apply(this,arguments),s={chart:n,dataIndex:t,dataset:r,datasetIndex:this.index};return this._cachedDataOpts===o&&(o=H.extend({},o)),o.radius=$e([i.radius,a.r,this._config.radius,n.options.elements.point.radius],s,t),o}}),Re=H.valueOrDefault,Ne=Math.PI,Le=2*Ne,Fe=Ne/2;F._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(e){var t,n,r,i=document.createElement("ul"),a=e.data,o=a.datasets,s=a.labels;if(i.setAttribute("class",e.id+"-legend"),o.length)for(n=o[t=0].data.length;t<n;++t)(r=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[t],s[t]&&r.appendChild(document.createTextNode(s[t]));return i.outerHTML},legend:{labels:{generateLabels:function(i){var a=i.data;return a.labels.length&&a.datasets.length?a.labels.map(function(e,t){var n=i.getDatasetMeta(0),r=n.controller.getStyle(t);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(a.datasets[0].data[t])||n.data[t].hidden,index:t}}):[]}},onClick:function(e,t){var n,r,i,a=t.index,o=this.chart;for(n=0,r=(o.data.datasets||[]).length;n<r;++n)(i=o.getDatasetMeta(n)).data[a]&&(i.data[a].hidden=!i.data[a].hidden);o.update()}},cutoutPercentage:50,rotation:-Fe,circumference:Le,tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.labels[e.index],r=": "+t.datasets[e.datasetIndex].data[e.index];return H.isArray(n)?(n=n.slice())[0]+=r:n+=r,n}}}});var Ge=ie.extend({dataElementType:Ae.Arc,linkScales:H.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&++t;return t},update:function(e){var t,n,r,i,a=this,o=a.chart,s=o.chartArea,c=o.options,l=1,u=1,f=0,d=0,h=a.getMeta(),p=h.data,m=c.cutoutPercentage/100||0,g=c.circumference,_=a._getRingWeight(a.index);if(g<Le){var b=c.rotation%Le,v=(b+=Ne<=b?-Le:b<-Ne?Le:0)+g,y=Math.cos(b),w=Math.sin(b),C=Math.cos(v),A=Math.sin(v),S=b<=0&&0<=v||Le<=v,T=b<=Fe&&Fe<=v||Le+Fe<=v,x=b<=-Fe&&-Fe<=v||Ne+Fe<=v,k=b===-Ne||Ne<=v?-1:Math.min(y,y*m,C,C*m),E=x?-1:Math.min(w,w*m,A,A*m),D=S?1:Math.max(y,y*m,C,C*m),I=T?1:Math.max(w,w*m,A,A*m);l=(D-k)/2,u=(I-E)/2,f=-(D+k)/2,d=-(I+E)/2}for(r=0,i=p.length;r<i;++r)p[r]._options=a._resolveDataElementOptions(p[r],r);for(o.borderWidth=a.getMaxBorderWidth(),t=(s.right-s.left-o.borderWidth)/l,n=(s.bottom-s.top-o.borderWidth)/u,o.outerRadius=Math.max(Math.min(t,n)/2,0),o.innerRadius=Math.max(o.outerRadius*m,0),o.radiusLength=(o.outerRadius-o.innerRadius)/(a._getVisibleDatasetWeightTotal()||1),o.offsetX=f*o.outerRadius,o.offsetY=d*o.outerRadius,h.total=a.calculateTotal(),a.outerRadius=o.outerRadius-o.radiusLength*a._getRingWeightOffset(a.index),a.innerRadius=Math.max(a.outerRadius-o.radiusLength*_,0),r=0,i=p.length;r<i;++r)a.updateElement(p[r],r,e)},updateElement:function(e,t,n){var r=this.chart,i=r.chartArea,a=r.options,o=a.animation,s=(i.left+i.right)/2,c=(i.top+i.bottom)/2,l=a.rotation,u=a.rotation,f=this.getDataset(),d=n&&o.animateRotate?0:e.hidden?0:this.calculateCircumference(f.data[t])*(a.circumference/Le),h=n&&o.animateScale?0:this.innerRadius,p=n&&o.animateScale?0:this.outerRadius,m=e._options||{};H.extend(e,{_datasetIndex:this.index,_index:t,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:s+r.offsetX,y:c+r.offsetY,startAngle:l,endAngle:u,circumference:d,outerRadius:p,innerRadius:h,label:H.valueAtIndexOrDefault(f.label,t,r.data.labels[t])}});var g=e._model;n&&o.animateRotate||(g.startAngle=0===t?a.rotation:this.getMeta().data[t-1]._model.endAngle,g.endAngle=g.startAngle+g.circumference),e.pivot()},calculateTotal:function(){var n,r=this.getDataset(),e=this.getMeta(),i=0;return H.each(e.data,function(e,t){n=r.data[t],isNaN(n)||e.hidden||(i+=Math.abs(n))}),i},calculateCircumference:function(e){var t=this.getMeta().total;return 0<t&&!isNaN(e)?Le*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t,n,r,i,a,o,s,c,l=0,u=this.chart;if(!e)for(t=0,n=u.data.datasets.length;t<n;++t)if(u.isDatasetVisible(t)){e=(r=u.getDatasetMeta(t)).data,t!==this.index&&(a=r.controller);break}if(!e)return 0;for(t=0,n=e.length;t<n;++t)i=e[t],"inner"!==(o=a?(a._configure(),a._resolveDataElementOptions(i,t)):i._options).borderAlign&&(l=(l=l<(s=o.borderWidth)?s:l)<(c=o.hoverBorderWidth)?c:l);return l},setHoverStyle:function(e){var t=e._model,n=e._options,r=H.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=Re(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Re(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Re(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t},_getRingWeight:function(e){return Math.max(Re(this.chart.data.datasets[e].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});F._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),F._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var je=Pe.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Be=H.valueOrDefault,Ue=H.options.resolve,He=H.canvas._isPointInArea;function We(e,t){var n=e&&e.options.ticks||{},r=n.reverse,i=void 0===n.min?t:0,a=void 0===n.max?t:0;return{start:r?a:i,end:r?i:a}}F._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var qe=ie.extend({datasetElementType:Ae.Line,dataElementType:Ae.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(e){var t,n,r=this,i=r.getMeta(),a=i.dataset,o=i.data||[],s=r.chart.options,c=r._config,l=r._showLine=Be(c.showLine,s.showLines);for(r._xScale=r.getScaleForId(i.xAxisID),r._yScale=r.getScaleForId(i.yAxisID),l&&(void 0!==c.tension&&void 0===c.lineTension&&(c.lineTension=c.tension),a._scale=r._yScale,a._datasetIndex=r.index,a._children=o,a._model=r._resolveDatasetElementOptions(a),a.pivot()),t=0,n=o.length;t<n;++t)r.updateElement(o[t],t,e);for(l&&0!==a._model.tension&&r.updateBezierControlPoints(),t=0,n=o.length;t<n;++t)o[t].pivot()},updateElement:function(e,t,n){var r,i,a=this.getMeta(),o=e.custom||{},s=this.getDataset(),c=this.index,l=s.data[t],u=this._xScale,f=this._yScale,d=a.dataset._model,h=this._resolveDataElementOptions(e,t);r=u.getPixelForValue("object"==typeof l?l:NaN,t,c),i=n?f.getBasePixel():this.calculatePointY(l,t,c),e._xScale=u,e._yScale=f,e._options=h,e._datasetIndex=c,e._index=t,e._model={x:r,y:i,skip:o.skip||isNaN(r)||isNaN(i),radius:h.radius,pointStyle:h.pointStyle,rotation:h.rotation,backgroundColor:h.backgroundColor,borderColor:h.borderColor,borderWidth:h.borderWidth,tension:Be(o.tension,d?d.tension:0),steppedLine:!!d&&d.steppedLine,hitRadius:h.hitRadius}},_resolveDatasetElementOptions:function(e){var t,n,r,i,a,o,s,c,l,u,f,d=this._config,h=e.custom||{},p=this.chart.options,m=p.elements.line,g=ie.prototype._resolveDatasetElementOptions.apply(this,arguments);return g.spanGaps=Be(d.spanGaps,p.spanGaps),g.tension=Be(d.lineTension,m.tension),g.steppedLine=Ue([h.steppedLine,d.steppedLine,m.stepped]),g.clip=(t=Be(d.clip,(o=this._xScale,s=this._yScale,c=g.borderWidth,u=We(o,l=c/2),{top:(f=We(s,l)).end,right:u.end,bottom:f.start,left:u.start})),H.isObject(t)?(n=t.top,r=t.right,i=t.bottom,a=t.left):n=r=i=a=t,{top:n,right:r,bottom:i,left:a}),g},calculatePointY:function(e,t,n){var r,i,a,o,s,c,l,u=this.chart,f=this._yScale,d=0,h=0;if(f.options.stacked){for(s=+f.getRightValue(e),l=(c=u._getSortedVisibleDatasetMetas()).length,r=0;r<l&&(a=c[r]).index!==n;++r)i=u.data.datasets[a.index],"line"===a.type&&a.yAxisID===f.id&&((o=+f.getRightValue(i.data[t]))<0?h+=o||0:d+=o||0);return s<0?f.getPixelForValue(h+s):f.getPixelForValue(d+s)}return f.getPixelForValue(e)},updateBezierControlPoints:function(){var e,t,n,r,i=this.chart,a=this.getMeta(),o=a.dataset._model,s=i.chartArea,c=a.data||[];function l(e,t,n){return Math.max(Math.min(e,n),t)}if(o.spanGaps&&(c=c.filter(function(e){return!e._model.skip})),"monotone"===o.cubicInterpolationMode)H.splineCurveMonotone(c);else for(e=0,t=c.length;e<t;++e)n=c[e]._model,r=H.splineCurve(H.previousItem(c,e)._model,n,H.nextItem(c,e)._model,o.tension),n.controlPointPreviousX=r.previous.x,n.controlPointPreviousY=r.previous.y,n.controlPointNextX=r.next.x,n.controlPointNextY=r.next.y;if(i.options.elements.line.capBezierPoints)for(e=0,t=c.length;e<t;++e)n=c[e]._model,He(n,s)&&(0<e&&He(c[e-1]._model,s)&&(n.controlPointPreviousX=l(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=l(n.controlPointPreviousY,s.top,s.bottom)),e<c.length-1&&He(c[e+1]._model,s)&&(n.controlPointNextX=l(n.controlPointNextX,s.left,s.right),n.controlPointNextY=l(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var e,t=this.chart,n=this.getMeta(),r=n.data||[],i=t.chartArea,a=t.canvas,o=0,s=r.length;for(this._showLine&&(e=n.dataset._model.clip,H.canvas.clipArea(t.ctx,{left:!1===e.left?0:i.left-e.left,right:!1===e.right?a.width:i.right+e.right,top:!1===e.top?0:i.top-e.top,bottom:!1===e.bottom?a.height:i.bottom+e.bottom}),n.dataset.draw(),H.canvas.unclipArea(t.ctx));o<s;++o)r[o].draw(i)},setHoverStyle:function(e){var t=e._model,n=e._options,r=H.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Be(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Be(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Be(n.hoverBorderWidth,n.borderWidth),t.radius=Be(n.hoverRadius,n.radius)}}),ze=H.options.resolve;F._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(e){var t,n,r,i=document.createElement("ul"),a=e.data,o=a.datasets,s=a.labels;if(i.setAttribute("class",e.id+"-legend"),o.length)for(n=o[t=0].data.length;t<n;++t)(r=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[t],s[t]&&r.appendChild(document.createTextNode(s[t]));return i.outerHTML},legend:{labels:{generateLabels:function(i){var a=i.data;return a.labels.length&&a.datasets.length?a.labels.map(function(e,t){var n=i.getDatasetMeta(0),r=n.controller.getStyle(t);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(a.datasets[0].data[t])||n.data[t].hidden,index:t}}):[]}},onClick:function(e,t){var n,r,i,a=t.index,o=this.chart;for(n=0,r=(o.data.datasets||[]).length;n<r;++n)(i=o.getDatasetMeta(n)).data[a].hidden=!i.data[a].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(e,t){return t.labels[e.index]+": "+e.yLabel}}}});var Ve=ie.extend({dataElementType:Ae.Arc,linkScales:H.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var t,n,r,i=this,a=i.getDataset(),o=i.getMeta(),s=i.chart.options.startAngle||0,c=i._starts=[],l=i._angles=[],u=o.data;for(i._updateRadius(),o.count=i.countVisibleElements(),t=0,n=a.data.length;t<n;t++)c[t]=s,r=i._computeAngle(t),s+=l[t]=r;for(t=0,n=u.length;t<n;++t)u[t]._options=i._resolveDataElementOptions(u[t],t),i.updateElement(u[t],t,e)},_updateRadius:function(){var e=this.chart,t=e.chartArea,n=e.options,r=Math.min(t.right-t.left,t.bottom-t.top);e.outerRadius=Math.max(r/2,0),e.innerRadius=Math.max(n.cutoutPercentage?e.outerRadius/100*n.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),this.outerRadius=e.outerRadius-e.radiusLength*this.index,this.innerRadius=this.outerRadius-e.radiusLength},updateElement:function(e,t,n){var r=this.chart,i=this.getDataset(),a=r.options,o=a.animation,s=r.scale,c=r.data.labels,l=s.xCenter,u=s.yCenter,f=a.startAngle,d=e.hidden?0:s.getDistanceFromCenterForValue(i.data[t]),h=this._starts[t],p=h+(e.hidden?0:this._angles[t]),m=o.animateScale?0:s.getDistanceFromCenterForValue(i.data[t]),g=e._options||{};H.extend(e,{_datasetIndex:this.index,_index:t,_scale:s,_model:{backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,borderAlign:g.borderAlign,x:l,y:u,innerRadius:0,outerRadius:n?m:d,startAngle:n&&o.animateRotate?f:h,endAngle:n&&o.animateRotate?f:p,label:H.valueAtIndexOrDefault(c,t,c[t])}}),e.pivot()},countVisibleElements:function(){var n=this.getDataset(),e=this.getMeta(),r=0;return H.each(e.data,function(e,t){isNaN(n.data[t])||e.hidden||r++}),r},setHoverStyle:function(e){var t=e._model,n=e._options,r=H.getHoverColor,i=H.valueOrDefault;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=i(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=i(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=i(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(e){var t=this.getMeta().count,n=this.getDataset(),r=this.getMeta();if(isNaN(n.data[e])||r.data[e].hidden)return 0;var i={chart:this.chart,dataIndex:e,dataset:n,datasetIndex:this.index};return ze([this.chart.options.elements.arc.angle,2*Math.PI/t],i,e)}});F._set("pie",H.clone(F.doughnut)),F._set("pie",{cutoutPercentage:0});var Ye=Ge,Ke=H.valueOrDefault;F._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Qe=ie.extend({datasetElementType:Ae.Line,dataElementType:Ae.Point,linkScales:H.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var t,n,r=this.getMeta(),i=r.dataset,a=r.data||[],o=this.chart.scale,s=this._config;for(void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),i._scale=o,i._datasetIndex=this.index,i._children=a,i._loop=!0,i._model=this._resolveDatasetElementOptions(i),i.pivot(),t=0,n=a.length;t<n;++t)this.updateElement(a[t],t,e);for(this.updateBezierControlPoints(),t=0,n=a.length;t<n;++t)a[t].pivot()},updateElement:function(e,t,n){var r=e.custom||{},i=this.getDataset(),a=this.chart.scale,o=a.getPointPositionForValue(t,i.data[t]),s=this._resolveDataElementOptions(e,t),c=this.getMeta().dataset._model,l=n?a.xCenter:o.x,u=n?a.yCenter:o.y;e._scale=a,e._options=s,e._datasetIndex=this.index,e._index=t,e._model={x:l,y:u,skip:r.skip||isNaN(l)||isNaN(u),radius:s.radius,pointStyle:s.pointStyle,rotation:s.rotation,backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderWidth:s.borderWidth,tension:Ke(r.tension,c?c.tension:0),hitRadius:s.hitRadius}},_resolveDatasetElementOptions:function(){var e=this._config,t=this.chart.options,n=ie.prototype._resolveDatasetElementOptions.apply(this,arguments);return n.spanGaps=Ke(e.spanGaps,t.spanGaps),n.tension=Ke(e.lineTension,t.elements.line.tension),n},updateBezierControlPoints:function(){var e,t,n,r,i=this.getMeta(),a=this.chart.chartArea,o=i.data||[];function s(e,t,n){return Math.max(Math.min(e,n),t)}for(i.dataset._model.spanGaps&&(o=o.filter(function(e){return!e._model.skip})),e=0,t=o.length;e<t;++e)n=o[e]._model,r=H.splineCurve(H.previousItem(o,e,!0)._model,n,H.nextItem(o,e,!0)._model,n.tension),n.controlPointPreviousX=s(r.previous.x,a.left,a.right),n.controlPointPreviousY=s(r.previous.y,a.top,a.bottom),n.controlPointNextX=s(r.next.x,a.left,a.right),n.controlPointNextY=s(r.next.y,a.top,a.bottom)},setHoverStyle:function(e){var t=e._model,n=e._options,r=H.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Ke(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Ke(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Ke(n.hoverBorderWidth,n.borderWidth),t.radius=Ke(n.hoverRadius,n.radius)}});F._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(e){return"("+e.xLabel+", "+e.yLabel+")"}}}}),F._set("global",{datasets:{scatter:{showLine:!1}}});var Xe={bar:Pe,bubble:Oe,doughnut:Ge,horizontalBar:je,line:qe,polarArea:Ve,pie:Ye,radar:Qe,scatter:qe};function Ze(e,t){return e.native?{x:e.x,y:e.y}:H.getRelativePosition(e,t)}function Je(e,t){var n,r,i,a,o,s,c=e._getSortedVisibleDatasetMetas();for(r=0,a=c.length;r<a;++r)for(i=0,o=(n=c[r].data).length;i<o;++i)(s=n[i])._view.skip||t(s)}function et(e,t){var n=[];return Je(e,function(e){e.inRange(t.x,t.y)&&n.push(e)}),n}function tt(e,r,i,a){var o=Number.POSITIVE_INFINITY,s=[];return Je(e,function(e){if(!i||e.inRange(r.x,r.y)){var t=e.getCenterPoint(),n=a(r,t);n<o?(s=[e],o=n):n===o&&s.push(e)}}),s}function nt(e){var i=-1!==e.indexOf("x"),a=-1!==e.indexOf("y");return function(e,t){var n=i?Math.abs(e.x-t.x):0,r=a?Math.abs(e.y-t.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2))}}function rt(e,t,n){var r=Ze(t,e);n.axis=n.axis||"x";var i=nt(n.axis),a=n.intersect?et(e,r):tt(e,r,!1,i),o=[];return a.length?(e._getSortedVisibleDatasetMetas().forEach(function(e){var t=e.data[a[0]._index];t&&!t._view.skip&&o.push(t)}),o):[]}var it={modes:{single:function(e,t){var n=Ze(t,e),r=[];return Je(e,function(e){if(e.inRange(n.x,n.y))return r.push(e),r}),r.slice(0,1)},label:rt,index:rt,dataset:function(e,t,n){var r=Ze(t,e);n.axis=n.axis||"xy";var i=nt(n.axis),a=n.intersect?et(e,r):tt(e,r,!1,i);return 0<a.length&&(a=e.getDatasetMeta(a[0]._datasetIndex).data),a},"x-axis":function(e,t){return rt(e,t,{intersect:!1})},point:function(e,t){return et(e,Ze(t,e))},nearest:function(e,t,n){var r=Ze(t,e);n.axis=n.axis||"xy";var i=nt(n.axis);return tt(e,r,n.intersect,i)},x:function(e,t,n){var r=Ze(t,e),i=[],a=!1;return Je(e,function(e){e.inXRange(r.x)&&i.push(e),e.inRange(r.x,r.y)&&(a=!0)}),n.intersect&&!a&&(i=[]),i},y:function(e,t,n){var r=Ze(t,e),i=[],a=!1;return Je(e,function(e){e.inYRange(r.y)&&i.push(e),e.inRange(r.x,r.y)&&(a=!0)}),n.intersect&&!a&&(i=[]),i}}},at=H.extend;function ot(e,t){return H.where(e,function(e){return e.pos===t})}function st(e,i){return e.sort(function(e,t){var n=i?t:e,r=i?e:t;return n.weight===r.weight?n.index-r.index:n.weight-r.weight})}function ct(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function lt(e,t,n){var r,i,a=n.box,o=e.maxPadding;if(n.size&&(e[n.pos]-=n.size),n.size=n.horizontal?a.height:a.width,e[n.pos]+=n.size,a.getPadding){var s=a.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(r=t.outerWidth-ct(o,e,"left","right"),i=t.outerHeight-ct(o,e,"top","bottom"),r!==e.w||i!==e.h){e.w=r,e.h=i;var c=n.horizontal?[r,e.w]:[i,e.h];return!(c[0]===c[1]||isNaN(c[0])&&isNaN(c[1]))}}function ut(e,n){var r=n.maxPadding;function t(e){var t={left:0,top:0,right:0,bottom:0};return e.forEach(function(e){t[e]=Math.max(n[e],r[e])}),t}return t(e?["left","right"]:["top","bottom"])}function ft(e,t,n){var r,i,a,o,s,c,l=[];for(r=0,i=e.length;r<i;++r)(o=(a=e[r]).box).update(a.width||t.w,a.height||t.h,ut(a.horizontal,t)),lt(t,n,a)&&(c=!0,l.length&&(s=!0)),o.fullWidth||l.push(a);return s&&ft(l,t,n)||c}function dt(e,t,n){var r,i,a,o,s=n.padding,c=t.x,l=t.y;for(r=0,i=e.length;r<i;++r)o=(a=e[r]).box,a.horizontal?(o.left=o.fullWidth?s.left:t.left,o.right=o.fullWidth?n.outerWidth-s.right:t.left+t.w,o.top=l,o.bottom=l+o.height,o.width=o.right-o.left,l=o.bottom):(o.left=c,o.right=c+o.width,o.top=t.top,o.bottom=t.top+t.h,o.height=o.bottom-o.top,c=o.right);t.x=c,t.y=l}F._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var ht,pt={defaults:{},addBox:function(e,t){e.boxes||(e.boxes=[]),t.fullWidth=t.fullWidth||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw:function(){t.draw.apply(t,arguments)}}]},e.boxes.push(t)},removeBox:function(e,t){var n=e.boxes?e.boxes.indexOf(t):-1;-1!==n&&e.boxes.splice(n,1)},configure:function(e,t,n){for(var r,i=["fullWidth","position","weight"],a=i.length,o=0;o<a;++o)r=i[o],n.hasOwnProperty(r)&&(t[r]=n[r])},update:function(n,e,t){if(n){var r,i,a,o,s,c,l=n.options.layout||{},u=H.options.toPadding(l.padding),f=e-u.width,d=t-u.height,h=(r=n.boxes,i=function(e){var t,n,r,i=[];for(t=0,n=(e||[]).length;t<n;++t)r=e[t],i.push({index:t,box:r,pos:r.position,horizontal:r.isHorizontal(),weight:r.weight});return i}(r),a=st(ot(i,"left"),!0),o=st(ot(i,"right")),s=st(ot(i,"top"),!0),c=st(ot(i,"bottom")),{leftAndTop:a.concat(s),rightAndBottom:o.concat(c),chartArea:ot(i,"chartArea"),vertical:a.concat(o),horizontal:s.concat(c)}),p=h.vertical,m=h.horizontal,g=Object.freeze({outerWidth:e,outerHeight:t,padding:u,availableWidth:f,vBoxMaxWidth:f/2/p.length,hBoxMaxHeight:d/2}),_=at({maxPadding:at({},u),w:f,h:d,x:u.left,y:u.top},u);!function(e,t){var n,r,i;for(n=0,r=e.length;n<r;++n)(i=e[n]).width=i.horizontal?i.box.fullWidth&&t.availableWidth:t.vBoxMaxWidth,i.height=i.horizontal&&t.hBoxMaxHeight}(p.concat(m),g),ft(p,_,g),ft(m,_,g)&&ft(p,_,g),function(n){var r=n.maxPadding;function e(e){var t=Math.max(r[e]-n[e],0);return n[e]+=t,t}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}(_),dt(h.leftAndTop,_,g),_.x+=_.w,_.y+=_.h,dt(h.rightAndBottom,_,g),n.chartArea={left:_.left,top:_.top,right:_.left+_.w,bottom:_.top+_.h},H.each(h.chartArea,function(e){var t=e.box;at(t,n.chartArea),t.update(_.w,_.h)})}}},mt=(ht=Object.freeze({__proto__:null,default:"/*\n * DOM element rendering detection\n * https://davidwalsh.name/detect-node-insertion\n */\n@keyframes chartjs-render-animation {\n\tfrom { opacity: 0.99; }\n\tto { opacity: 1; }\n}\n\n.chartjs-render-monitor {\n\tanimation: chartjs-render-animation 0.001s;\n}\n\n/*\n * DOM element resizing detection\n * https://github.com/marcj/css-element-queries\n */\n.chartjs-size-monitor,\n.chartjs-size-monitor-expand,\n.chartjs-size-monitor-shrink {\n\tposition: absolute;\n\tdirection: ltr;\n\tleft: 0;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\toverflow: hidden;\n\tpointer-events: none;\n\tvisibility: hidden;\n\tz-index: -1;\n}\n\n.chartjs-size-monitor-expand > div {\n\tposition: absolute;\n\twidth: 1000000px;\n\theight: 1000000px;\n\tleft: 0;\n\ttop: 0;\n}\n\n.chartjs-size-monitor-shrink > div {\n\tposition: absolute;\n\twidth: 200%;\n\theight: 200%;\n\tleft: 0;\n\ttop: 0;\n}\n"}))&&ht.default||ht,gt="$chartjs",_t="chartjs-",bt=_t+"size-monitor",vt=_t+"render-monitor",yt=_t+"render-animation",wt=["animationstart","webkitAnimationStart"],Ct={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function At(e,t){var n=H.getStyle(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?Number(r[1]):void 0}var St=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch(e){}return e}()&&{passive:!0};function Tt(e,t,n){e.addEventListener(t,n,St)}function xt(e,t,n){e.removeEventListener(t,n,St)}function kt(e,t,n,r,i){return{type:e,chart:t,native:i||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}function Et(e){var t=document.createElement("div");return t.className=e||"",t}function Dt(n,r,i){var e,t,a,o,s,c,l,u,f=n[gt]||(n[gt]={}),d=f.resizer=function(e){var t=Et(bt),n=Et(bt+"-expand"),r=Et(bt+"-shrink");n.appendChild(Et()),r.appendChild(Et()),t.appendChild(n),t.appendChild(r),t._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var i=function(){t._reset(),e()};return Tt(n,"scroll",i.bind(n,"expand")),Tt(r,"scroll",i.bind(r,"shrink")),t}((a=!(e=function(){if(f.resizer){var e=i.options.maintainAspectRatio&&n.parentNode,t=e?e.clientWidth:0;r(kt("resize",i)),e&&e.clientWidth<t&&i.canvas&&r(kt("resize",i))}}),o=[],function(){o=Array.prototype.slice.call(arguments),t=t||this,a||(a=!0,H.requestAnimFrame.call(window,function(){a=!1,e.apply(t,o)}))}));c=function(){if(f.resizer){var e=n.parentNode;e&&e!==d.parentNode&&e.insertBefore(d,e.firstChild),d._reset()}},l=(s=n)[gt]||(s[gt]={}),u=l.renderProxy=function(e){e.animationName===yt&&c()},H.each(wt,function(e){Tt(s,e,u)}),l.reflow=!!s.offsetParent,s.classList.add(vt)}function It(e){var t,n,r,i=e[gt]||{},a=i.resizer;delete i.resizer,n=(t=e)[gt]||{},(r=n.renderProxy)&&(H.each(wt,function(e){xt(t,e,r)}),delete n.renderProxy),t.classList.remove(vt),a&&a.parentNode&&a.parentNode.removeChild(a)}var Pt={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(e){if(!this.disableCSSInjection){var t=e.getRootNode?e.getRootNode():document;!function(e,t){var n=e[gt]||(e[gt]={});if(!n.containsStyles){n.containsStyles=!0,t="/* Chart.js */\n"+t;var r=document.createElement("style");r.setAttribute("type","text/css"),r.appendChild(document.createTextNode(t)),e.appendChild(r)}}(t.host?t:document.head,mt)}},acquireContext:function(e,t){"string"==typeof e?e=document.getElementById(e):e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas);var n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(this._ensureLoaded(e),function(e,t){var n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[gt]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var a=At(e,"width");void 0!==a&&(e.width=a)}if(null===r||""===r)if(""===e.style.height)e.height=e.width/(t.options.aspectRatio||2);else{var o=At(e,"height");void 0!==a&&(e.height=o)}}(e,t),n):null},releaseContext:function(e){var n=e.canvas;if(n[gt]){var r=n[gt].initial;["height","width"].forEach(function(e){var t=r[e];H.isNullOrUndef(t)?n.removeAttribute(e):n.setAttribute(e,t)}),H.each(r.style||{},function(e,t){n.style[t]=e}),n.width=n.width,delete n[gt]}},addEventListener:function(a,e,o){var t=a.canvas;if("resize"!==e){var n=o[gt]||(o[gt]={});Tt(t,e,(n.proxies||(n.proxies={}))[a.id+"_"+e]=function(e){var t,n,r,i;o((n=a,r=Ct[(t=e).type]||t.type,i=H.getRelativePosition(t,n),kt(r,n,i.x,i.y,t)))})}else Dt(t,o,a)},removeEventListener:function(e,t,n){var r=e.canvas;if("resize"!==t){var i=((n[gt]||{}).proxies||{})[e.id+"_"+t];i&&xt(r,t,i)}else It(r)}};H.addEvent=Tt,H.removeEvent=xt;var Mt=Pt._enabled?Pt:{acquireContext:function(e){return e&&e.canvas&&(e=e.canvas),e&&e.getContext("2d")||null}},$t=H.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Mt);F._set("global",{plugins:{}});var Ot={_plugins:[],_cacheId:0,register:function(e){var t=this._plugins;[].concat(e).forEach(function(e){-1===t.indexOf(e)&&t.push(e)}),this._cacheId++},unregister:function(e){var n=this._plugins;[].concat(e).forEach(function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(e,t,n){var r,i,a,o,s,c=this.descriptors(e),l=c.length;for(r=0;r<l;++r)if("function"==typeof(s=(a=(i=c[r]).plugin)[t])&&((o=[e].concat(n||[])).push(i.options),!1===s.apply(a,o)))return!1;return!0},descriptors:function(e){var t=e.$plugins||(e.$plugins={});if(t.id===this._cacheId)return t.descriptors;var r=[],i=[],n=e&&e.config||{},a=n.options&&n.options.plugins||{};return this._plugins.concat(n.plugins||[]).forEach(function(e){if(-1===r.indexOf(e)){var t=e.id,n=a[t];!1!==n&&(!0===n&&(n=H.clone(F.global.plugins[t])),r.push(e),i.push({plugin:e,options:n||{}}))}}),t.descriptors=i,t.id=this._cacheId,i},_invalidate:function(e){delete e.$plugins}},Rt={constructors:{},defaults:{},registerScaleType:function(e,t,n){this.constructors[e]=t,this.defaults[e]=H.clone(n)},getScaleConstructor:function(e){return this.constructors.hasOwnProperty(e)?this.constructors[e]:void 0},getScaleDefaults:function(e){return this.defaults.hasOwnProperty(e)?H.merge(Object.create(null),[F.scale,this.defaults[e]]):{}},updateScaleDefaults:function(e,t){this.defaults.hasOwnProperty(e)&&(this.defaults[e]=H.extend(this.defaults[e],t))},addScalesToLayout:function(t){H.each(t.scales,function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,pt.addBox(t,e)})}},Nt=H.valueOrDefault,Lt=H.rtl.getRtlAdapter;F._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:H.noop,title:function(e,t){var n="",r=t.labels,i=r?r.length:0;if(0<e.length){var a=e[0];a.label?n=a.label:a.xLabel?n=a.xLabel:0<i&&a.index<i&&(n=r[a.index])}return n},afterTitle:H.noop,beforeBody:H.noop,beforeLabel:H.noop,label:function(e,t){var n=t.datasets[e.datasetIndex].label||"";return n&&(n+=": "),H.isNullOrUndef(e.value)?n+=e.yLabel:n+=e.value,n},labelColor:function(e,t){var n=t.getDatasetMeta(e.datasetIndex).data[e.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:H.noop,afterBody:H.noop,beforeFooter:H.noop,footer:H.noop,afterFooter:H.noop}}});var Ft={average:function(e){if(!e.length)return!1;var t,n,r=0,i=0,a=0;for(t=0,n=e.length;t<n;++t){var o=e[t];if(o&&o.hasValue()){var s=o.tooltipPosition();r+=s.x,i+=s.y,++a}}return{x:r/a,y:i/a}},nearest:function(e,t){var n,r,i,a=t.x,o=t.y,s=Number.POSITIVE_INFINITY;for(n=0,r=e.length;n<r;++n){var c=e[n];if(c&&c.hasValue()){var l=c.getCenterPoint(),u=H.distanceBetweenPoints(t,l);u<s&&(s=u,i=c)}}if(i){var f=i.tooltipPosition();a=f.x,o=f.y}return{x:a,y:o}}};function Gt(e,t){return t&&(H.isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function jt(e){return("string"==typeof e||e instanceof String)&&-1<e.indexOf("\n")?e.split("\n"):e}function Bt(e){var t=F.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:Nt(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:Nt(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:Nt(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:Nt(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:Nt(e.titleFontStyle,t.defaultFontStyle),titleFontSize:Nt(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:Nt(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:Nt(e.footerFontStyle,t.defaultFontStyle),footerFontSize:Nt(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function Ut(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function Ht(e){return Gt([],jt(e))}var Wt=Q.extend({initialize:function(){this._model=Bt(this._options),this._lastActive=[]},getTitle:function(){var e=this._options.callbacks,t=e.beforeTitle.apply(this,arguments),n=e.title.apply(this,arguments),r=e.afterTitle.apply(this,arguments),i=[];return i=Gt(i=Gt(i=Gt(i,jt(t)),jt(n)),jt(r))},getBeforeBody:function(){return Ht(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,n){var r=this,i=r._options.callbacks,a=[];return H.each(e,function(e){var t={before:[],lines:[],after:[]};Gt(t.before,jt(i.beforeLabel.call(r,e,n))),Gt(t.lines,i.label.call(r,e,n)),Gt(t.after,jt(i.afterLabel.call(r,e,n))),a.push(t)}),a},getAfterBody:function(){return Ht(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this._options.callbacks,t=e.beforeFooter.apply(this,arguments),n=e.footer.apply(this,arguments),r=e.afterFooter.apply(this,arguments),i=[];return i=Gt(i=Gt(i=Gt(i,jt(t)),jt(n)),jt(r))},update:function(e){var t,n,r,i,a,o,s,c,l,u,f,d,h,p,m,g,_,b,v,y,w,C,A,S=this,T=S._options,x=S._model,k=S._model=Bt(T),E=S._active,D=S._data,I={xAlign:x.xAlign,yAlign:x.yAlign},P={x:x.x,y:x.y},M={width:x.width,height:x.height},$={x:x.caretX,y:x.caretY};if(E.length){k.opacity=1;var O=[],R=[];$=Ft[T.position].call(S,E,S._eventPosition);var N=[];for(t=0,n=E.length;t<n;++t)N.push((g=E[t],A=C=w=b=_=void 0,_=g._xScale,b=g._yScale||g._scale,v=g._index,y=g._datasetIndex,w=g._chart.getDatasetMeta(y).controller,C=w._getIndexScale(),A=w._getValueScale(),{xLabel:_?_.getLabelForIndex(v,y):"",yLabel:b?b.getLabelForIndex(v,y):"",label:C?""+C.getLabelForIndex(v,y):"",value:A?""+A.getLabelForIndex(v,y):"",index:v,datasetIndex:y,x:g._model.x,y:g._model.y}));T.filter&&(N=N.filter(function(e){return T.filter(e,D)})),T.itemSort&&(N=N.sort(function(e,t){return T.itemSort(e,t,D)})),H.each(N,function(e){O.push(T.callbacks.labelColor.call(S,e,S._chart)),R.push(T.callbacks.labelTextColor.call(S,e,S._chart))}),k.title=S.getTitle(N,D),k.beforeBody=S.getBeforeBody(N,D),k.body=S.getBody(N,D),k.afterBody=S.getAfterBody(N,D),k.footer=S.getFooter(N,D),k.x=$.x,k.y=$.y,k.caretPadding=T.caretPadding,k.labelColors=O,k.labelTextColors=R,k.dataPoints=N,I=function(e,t){var n,r,i,a,o,s=e._model,c=e._chart,l=e._chart.chartArea,u="center",f="center";s.y<t.height?f="top":s.y>c.height-t.height&&(f="bottom");var d=(l.left+l.right)/2,h=(l.top+l.bottom)/2;r="center"===f?(n=function(e){return e<=d},function(e){return d<e}):(n=function(e){return e<=t.width/2},function(e){return e>=c.width-t.width/2}),i=function(e){return e+t.width+s.caretSize+s.caretPadding>c.width},a=function(e){return e-t.width-s.caretSize-s.caretPadding<0},o=function(e){return e<=h?"top":"bottom"},n(s.x)?(u="left",i(s.x)&&(u="center",f=o(s.y))):r(s.x)&&(u="right",a(s.x)&&(u="center",f=o(s.y)));var p=e._options;return{xAlign:p.xAlign?p.xAlign:u,yAlign:p.yAlign?p.yAlign:f}}(this,M=function(e,t){var n=e._chart.ctx,r=2*t.yPadding,i=0,a=t.body,o=a.reduce(function(e,t){return e+t.before.length+t.lines.length+t.after.length},0);o+=t.beforeBody.length+t.afterBody.length;var s=t.title.length,c=t.footer.length,l=t.titleFontSize,u=t.bodyFontSize,f=t.footerFontSize;r+=s*l,r+=s?(s-1)*t.titleSpacing:0,r+=s?t.titleMarginBottom:0,r+=o*u,r+=o?(o-1)*t.bodySpacing:0,r+=c?t.footerMarginTop:0,r+=c*f,r+=c?(c-1)*t.footerSpacing:0;var d=0,h=function(e){i=Math.max(i,n.measureText(e).width+d)};return n.font=H.fontString(l,t._titleFontStyle,t._titleFontFamily),H.each(t.title,h),n.font=H.fontString(u,t._bodyFontStyle,t._bodyFontFamily),H.each(t.beforeBody.concat(t.afterBody),h),d=t.displayColors?u+2:0,H.each(a,function(e){H.each(e.before,h),H.each(e.lines,h),H.each(e.after,h)}),d=0,n.font=H.fontString(f,t._footerFontStyle,t._footerFontFamily),H.each(t.footer,h),{width:i+=2*t.xPadding,height:r}}(this,k)),r=k,i=M,a=I,o=S._chart,s=r.x,c=r.y,l=r.caretSize,u=r.caretPadding,f=r.cornerRadius,d=a.xAlign,h=a.yAlign,p=l+u,m=f+u,"right"===d?s-=i.width:"center"===d&&((s-=i.width/2)+i.width>o.width&&(s=o.width-i.width),s<0&&(s=0)),"top"===h?c+=p:c-="bottom"===h?i.height+p:i.height/2,"center"===h?"left"===d?s+=p:"right"===d&&(s-=p):"left"===d?s-=m:"right"===d&&(s+=m),P={x:s,y:c}}else k.opacity=0;return k.xAlign=I.xAlign,k.yAlign=I.yAlign,k.x=P.x,k.y=P.y,k.width=M.width,k.height=M.height,k.caretX=$.x,k.caretY=$.y,S._model=k,e&&T.custom&&T.custom.call(S,k),S},drawCaret:function(e,t){var n=this._chart.ctx,r=this._view,i=this.getCaretPosition(e,t,r);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)},getCaretPosition:function(e,t,n){var r,i,a,o,s,c,l=n.caretSize,u=n.cornerRadius,f=n.xAlign,d=n.yAlign,h=e.x,p=e.y,m=t.width,g=t.height;if("center"===d)s=p+g/2,c="left"===f?(i=(r=h)-l,a=r,o=s+l,s-l):(i=(r=h+m)+l,a=r,o=s-l,s+l);else if(a=(r="left"===f?(i=h+u+l)-l:"right"===f?(i=h+m-u-l)-l:(i=n.caretX)-l,i+l),"top"===d)s=(o=p)-l,c=o;else{s=(o=p+g)+l,c=o;var _=a;a=r,r=_}return{x1:r,x2:i,x3:a,y1:o,y2:s,y3:c}},drawTitle:function(e,t,n){var r,i,a,o=t.title,s=o.length;if(s){var c=Lt(t.rtl,t.x,t.width);for(e.x=Ut(t,t._titleAlign),n.textAlign=c.textAlign(t._titleAlign),n.textBaseline="middle",r=t.titleFontSize,i=t.titleSpacing,n.fillStyle=t.titleFontColor,n.font=H.fontString(r,t._titleFontStyle,t._titleFontFamily),a=0;a<s;++a)n.fillText(o[a],c.x(e.x),e.y+r/2),e.y+=r+i,a+1===s&&(e.y+=t.titleMarginBottom-i)}},drawBody:function(t,e,n){var r,i,a,o,s,c,l,u,f=e.bodyFontSize,d=e.bodySpacing,h=e._bodyAlign,p=e.body,m=e.displayColors,g=0,_=m?Ut(e,"left"):0,b=Lt(e.rtl,e.x,e.width),v=function(e){n.fillText(e,b.x(t.x+g),t.y+f/2),t.y+=f+d},y=b.textAlign(h);for(n.textAlign=h,n.textBaseline="middle",n.font=H.fontString(f,e._bodyFontStyle,e._bodyFontFamily),t.x=Ut(e,y),n.fillStyle=e.bodyFontColor,H.each(e.beforeBody,v),g=m&&"right"!==y?"center"===h?f/2+1:f+2:0,s=0,l=p.length;s<l;++s){for(r=p[s],i=e.labelTextColors[s],a=e.labelColors[s],n.fillStyle=i,H.each(r.before,v),c=0,u=(o=r.lines).length;c<u;++c){if(m){var w=b.x(_);n.fillStyle=e.legendColorBackground,n.fillRect(b.leftForLtr(w,f),t.y,f,f),n.lineWidth=1,n.strokeStyle=a.borderColor,n.strokeRect(b.leftForLtr(w,f),t.y,f,f),n.fillStyle=a.backgroundColor,n.fillRect(b.leftForLtr(b.xPlus(w,1),f-2),t.y+1,f-2,f-2),n.fillStyle=i}v(o[c])}H.each(r.after,v)}g=0,H.each(e.afterBody,v),t.y-=d},drawFooter:function(e,t,n){var r,i,a=t.footer,o=a.length;if(o){var s=Lt(t.rtl,t.x,t.width);for(e.x=Ut(t,t._footerAlign),e.y+=t.footerMarginTop,n.textAlign=s.textAlign(t._footerAlign),n.textBaseline="middle",r=t.footerFontSize,n.fillStyle=t.footerFontColor,n.font=H.fontString(r,t._footerFontStyle,t._footerFontFamily),i=0;i<o;++i)n.fillText(a[i],s.x(e.x),e.y+r/2),e.y+=r+t.footerSpacing}},drawBackground:function(e,t,n,r){n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor,n.lineWidth=t.borderWidth;var i=t.xAlign,a=t.yAlign,o=e.x,s=e.y,c=r.width,l=r.height,u=t.cornerRadius;n.beginPath(),n.moveTo(o+u,s),"top"===a&&this.drawCaret(e,r),n.lineTo(o+c-u,s),n.quadraticCurveTo(o+c,s,o+c,s+u),"center"===a&&"right"===i&&this.drawCaret(e,r),n.lineTo(o+c,s+l-u),n.quadraticCurveTo(o+c,s+l,o+c-u,s+l),"bottom"===a&&this.drawCaret(e,r),n.lineTo(o+u,s+l),n.quadraticCurveTo(o,s+l,o,s+l-u),"center"===a&&"left"===i&&this.drawCaret(e,r),n.lineTo(o,s+u),n.quadraticCurveTo(o,s,o+u,s),n.closePath(),n.fill(),0<t.borderWidth&&n.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var n={width:t.width,height:t.height},r={x:t.x,y:t.y},i=Math.abs(t.opacity<.001)?0:t.opacity,a=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;this._options.enabled&&a&&(e.save(),e.globalAlpha=i,this.drawBackground(r,t,e,n),r.y+=t.yPadding,H.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),H.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var t,n=this,r=n._options;return n._lastActive=n._lastActive||[],"mouseout"===e.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(e,r.mode,r),r.reverse&&n._active.reverse()),(t=!H.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(r.enabled||r.custom)&&(n._eventPosition={x:e.x,y:e.y},n.update(!0),n.pivot())),t}}),qt=Ft,zt=Wt;zt.positioners=qt;var Vt=H.valueOrDefault;function Yt(){return H.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,r){if("xAxes"===e||"yAxes"===e){var i,a,o,s=n[e].length;for(t[e]||(t[e]=[]),i=0;i<s;++i)o=n[e][i],a=Vt(o.type,"xAxes"===e?"category":"linear"),i>=t[e].length&&t[e].push({}),!t[e][i].type||o.type&&o.type!==t[e][i].type?H.merge(t[e][i],[Rt.getScaleDefaults(a),o]):H.merge(t[e][i],o)}else H._merger(e,t,n,r)}})}function Kt(){return H.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,r){var i=t[e]||Object.create(null),a=n[e];"scales"===e?t[e]=Yt(i,a):"scale"===e?t[e]=H.merge(i,[Rt.getScaleDefaults(a.type),a]):H._merger(e,t,n,r)}})}function Qt(e,t,n){for(var r,i=function(e){return e.id===r};r=t+n++,0<=H.findIndex(e,i););return r}function Xt(e){return"top"===e||"bottom"===e}function Zt(n,r){return function(e,t){return e[n]===t[n]?e[r]-t[r]:e[n]-t[n]}}F._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Jt=function(e,t){return this.construct(e,t),this};H.extend(Jt.prototype,{construct:function(e,t){var n,r,i=this;(r=(n=(n=t)||Object.create(null)).data=n.data||{}).datasets=r.datasets||[],r.labels=r.labels||[],n.options=Kt(F.global,F[n.type],n.options||{}),t=n;var a=$t.acquireContext(e,t),o=a&&a.canvas,s=o&&o.height,c=o&&o.width;i.id=H.uid(),i.ctx=a,i.canvas=o,i.config=t,i.width=c,i.height=s,i.aspectRatio=s?c/s:null,i.options=t.options,i._bufferedRender=!1,i._layers=[],(i.chart=i).controller=i,Jt.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(e){i.config.data=e}}),a&&o?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){return Ot.notify(this,"beforeInit"),H.retinaScale(this,this.options.devicePixelRatio),this.bindEvents(),this.options.responsive&&this.resize(!0),this.initToolTip(),Ot.notify(this,"afterInit"),this},clear:function(){return H.canvas.clear(this),this},stop:function(){return J.cancelAnimation(this),this},resize:function(e){var t=this,n=t.options,r=t.canvas,i=n.maintainAspectRatio&&t.aspectRatio||null,a=Math.max(0,Math.floor(H.getMaximumWidth(r))),o=Math.max(0,Math.floor(i?a/i:H.getMaximumHeight(r)));if((t.width!==a||t.height!==o)&&(r.width=t.width=a,r.height=t.height=o,r.style.width=a+"px",r.style.height=o+"px",H.retinaScale(t,n.devicePixelRatio),!e)){var s={width:a,height:o};Ot.notify(t,"resize",[s]),n.onResize&&n.onResize(t,s),t.stop(),t.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,n=e.scales||{},t=e.scale;H.each(n.xAxes,function(e,t){e.id||(e.id=Qt(n.xAxes,"x-axis-",t))}),H.each(n.yAxes,function(e,t){e.id||(e.id=Qt(n.yAxes,"y-axis-",t))}),t&&(t.id=t.id||"scale")},buildOrUpdateScales:function(){var o=this,e=o.options,s=o.scales||{},t=[],c=Object.keys(s).reduce(function(e,t){return e[t]=!1,e},{});e.scales&&(t=t.concat((e.scales.xAxes||[]).map(function(e){return{options:e,dtype:"category",dposition:"bottom"}}),(e.scales.yAxes||[]).map(function(e){return{options:e,dtype:"linear",dposition:"left"}}))),e.scale&&t.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),H.each(t,function(e){var t=e.options,n=t.id,r=Vt(t.type,e.dtype);Xt(t.position)!==Xt(e.dposition)&&(t.position=e.dposition),c[n]=!0;var i=null;if(n in s&&s[n].type===r)(i=s[n]).options=t,i.ctx=o.ctx,i.chart=o;else{var a=Rt.getScaleConstructor(r);if(!a)return;i=new a({id:n,type:r,options:t,ctx:o.ctx,chart:o}),s[i.id]=i}i.mergeTicksOptions(),e.isDefault&&(o.scale=i)}),H.each(c,function(e,t){e||delete s[t]}),o.scales=s,Rt.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e,t,n=[],r=this.data.datasets;for(e=0,t=r.length;e<t;e++){var i=r[e],a=this.getDatasetMeta(e),o=i.type||this.config.type;if(a.type&&a.type!==o&&(this.destroyDatasetMeta(e),a=this.getDatasetMeta(e)),a.type=o,a.order=i.order||0,a.index=e,a.controller)a.controller.updateIndex(e),a.controller.linkScales();else{var s=Xe[a.type];if(void 0===s)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new s(this,e),n.push(a.controller)}}return n},resetElements:function(){var n=this;H.each(n.data.datasets,function(e,t){n.getDatasetMeta(t).controller.reset()},n)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var t,n,r,i,a=this;if(e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]}),i=(r=a).options,H.each(r.scales,function(e){pt.removeBox(r,e)}),i=Kt(F.global,F[r.config.type],i),r.options=r.config.options=i,r.ensureScalesHaveIDs(),r.buildOrUpdateScales(),r.tooltip._options=i.tooltips,r.tooltip.initialize(),Ot._invalidate(a),!1!==Ot.notify(a,"beforeUpdate")){a.tooltip._data=a.data;var o=a.buildOrUpdateControllers();for(t=0,n=a.data.datasets.length;t<n;t++)a.getDatasetMeta(t).controller.buildOrUpdateElements();a.updateLayout(),a.options.animation&&a.options.animation.duration&&H.each(o,function(e){e.reset()}),a.updateDatasets(),a.tooltip.initialize(),a.lastActive=[],Ot.notify(a,"afterUpdate"),a._layers.sort(Zt("z","_idx")),a._bufferedRender?a._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:a.render(e)}},updateLayout:function(){var t=this;!1!==Ot.notify(t,"beforeLayout")&&(pt.update(this,this.width,this.height),t._layers=[],H.each(t.boxes,function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())},t),t._layers.forEach(function(e,t){e._idx=t}),Ot.notify(t,"afterScaleUpdate"),Ot.notify(t,"afterLayout"))},updateDatasets:function(){if(!1!==Ot.notify(this,"beforeDatasetsUpdate")){for(var e=0,t=this.data.datasets.length;e<t;++e)this.updateDataset(e);Ot.notify(this,"afterDatasetsUpdate")}},updateDataset:function(e){var t=this.getDatasetMeta(e),n={meta:t,index:e};!1!==Ot.notify(this,"beforeDatasetUpdate",[n])&&(t.controller._update(),Ot.notify(this,"afterDatasetUpdate",[n]))},render:function(e){var t=this;e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]});var n=t.options.animation,r=Vt(e.duration,n&&n.duration),i=e.lazy;if(!1!==Ot.notify(t,"beforeRender")){var a=function(e){Ot.notify(t,"afterRender"),H.callback(n&&n.onComplete,[e],t)};if(n&&r){var o=new Z({numSteps:r/16.66,easing:e.easing||n.easing,render:function(e,t){var n=H.easing.effects[t.easing],r=t.currentStep,i=r/t.numSteps;e.draw(n(i),i,r)},onAnimationProgress:n.onProgress,onAnimationComplete:a});J.addAnimation(t,o,r,i)}else t.draw(),a(new Z({numSteps:0,chart:t}));return t}},draw:function(e){var t,n,r=this;if(r.clear(),H.isNullOrUndef(e)&&(e=1),r.transition(e),!(r.width<=0||r.height<=0)&&!1!==Ot.notify(r,"beforeDraw",[e])){for(n=r._layers,t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(r.chartArea);for(r.drawDatasets(e);t<n.length;++t)n[t].draw(r.chartArea);r._drawTooltip(e),Ot.notify(r,"afterDraw",[e])}},transition:function(e){for(var t=0,n=(this.data.datasets||[]).length;t<n;++t)this.isDatasetVisible(t)&&this.getDatasetMeta(t).controller.transition(e);this.tooltip.transition(e)},_getSortedDatasetMetas:function(e){var t,n,r=[];for(t=0,n=(this.data.datasets||[]).length;t<n;++t)e&&!this.isDatasetVisible(t)||r.push(this.getDatasetMeta(t));return r.sort(Zt("order","index")),r},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(e){var t,n;if(!1!==Ot.notify(this,"beforeDatasetsDraw",[e])){for(n=(t=this._getSortedVisibleDatasetMetas()).length-1;0<=n;--n)this.drawDataset(t[n],e);Ot.notify(this,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var n={meta:e,index:e.index,easingValue:t};!1!==Ot.notify(this,"beforeDatasetDraw",[n])&&(e.controller.draw(t),Ot.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(e){var t=this.tooltip,n={tooltip:t,easingValue:e};!1!==Ot.notify(this,"beforeTooltipDraw",[n])&&(t.draw(),Ot.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(e){return it.modes.single(this,e)},getElementsAtEvent:function(e){return it.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return it.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,n){var r=it.modes[t];return"function"==typeof r?r(this,e,n):[]},getDatasetAtEvent:function(e){return it.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this.data.datasets[e];t._meta||(t._meta={});var n=t._meta[this.id];return n||(n=t._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t.order||0,index:e}),n},getVisibleDatasetCount:function(){for(var e=0,t=0,n=this.data.datasets.length;t<n;++t)this.isDatasetVisible(t)&&e++;return e},isDatasetVisible:function(e){var t=this.getDatasetMeta(e);return"boolean"==typeof t.hidden?!t.hidden:!this.data.datasets[e].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(e){var t=this.id,n=this.data.datasets[e],r=n._meta&&n._meta[t];r&&(r.controller.destroy(),delete n._meta[t])},destroy:function(){var e,t,n=this,r=n.canvas;for(n.stop(),e=0,t=n.data.datasets.length;e<t;++e)n.destroyDatasetMeta(e);r&&(n.unbindEvents(),H.canvas.clear(n),$t.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Ot.notify(n,"destroy"),delete Jt.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){this.tooltip=new zt({_chart:this,_chartInstance:this,_data:this.data,_options:this.options.tooltips},this)},bindEvents:function(){var t=this,n=t._listeners={},r=function(){t.eventHandler.apply(t,arguments)};H.each(t.options.events,function(e){$t.addEventListener(t,e,r),n[e]=r}),t.options.responsive&&(r=function(){t.resize()},$t.addEventListener(t,"resize",r),n.resize=r)},unbindEvents:function(){var n=this,e=n._listeners;e&&(delete n._listeners,H.each(e,function(e,t){$t.removeEventListener(n,t,e)}))},updateHoverStyle:function(e,t,n){var r,i,a,o=n?"set":"remove";for(i=0,a=e.length;i<a;++i)(r=e[i])&&this.getDatasetMeta(r._datasetIndex).controller[o+"HoverStyle"](r);"dataset"===t&&this.getDatasetMeta(e[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()},eventHandler:function(e){var t=this,n=t.tooltip;if(!1!==Ot.notify(t,"beforeEvent",[e])){t._bufferedRender=!0,t._bufferedRequest=null;var r=t.handleEvent(e);n&&(r=n._start?n.handleEvent(e):r|n.handleEvent(e)),Ot.notify(t,"afterEvent",[e]);var i=t._bufferedRequest;return i?t.render(i):r&&!t.animating&&(t.stop(),t.render({duration:t.options.hover.animationDuration,lazy:!0})),t._bufferedRender=!1,t._bufferedRequest=null,t}},handleEvent:function(e){var t,n=this,r=n.options||{},i=r.hover;return n.lastActive=n.lastActive||[],"mouseout"===e.type?n.active=[]:n.active=n.getElementsAtEventForMode(e,i.mode,i),H.callback(r.onHover||r.hover.onHover,[e.native,n.active],n),"mouseup"!==e.type&&"click"!==e.type||r.onClick&&r.onClick.call(n,e.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,i.mode,!1),n.active.length&&i.mode&&n.updateHoverStyle(n.active,i.mode,!0),t=!H.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,t}}),Jt.instances={};var en=Jt;(Jt.Controller=Jt).types={},H.configMerge=Kt,H.scaleMerge=Yt;function tn(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function nn(e){this.options=e||{}}H.extend(nn.prototype,{formats:tn,parse:tn,format:tn,add:tn,diff:tn,startOf:tn,endOf:tn,_create:function(e){return e}}),nn.override=function(e){H.extend(nn.prototype,e)};var rn={_date:nn},an={formatters:{values:function(e){return H.isArray(e)?e:""+e},linear:function(e,t,n){var r=3<n.length?n[2]-n[1]:n[1]-n[0];1<Math.abs(r)&&e!==Math.floor(e)&&(r=e-Math.floor(e));var i=H.log10(Math.abs(r)),a="";if(0!==e)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=H.log10(Math.abs(e)),s=Math.floor(o)-Math.floor(i);s=Math.max(Math.min(s,20),0),a=e.toExponential(s)}else{var c=-1*Math.floor(i);c=Math.max(Math.min(c,20),0),a=e.toFixed(c)}else a="0";return a},logarithmic:function(e,t,n){var r=e/Math.pow(10,Math.floor(H.log10(e)));return 0===e?"0":1===r||2===r||5===r||0===t||t===n.length-1?e.toExponential():""}}},on=H.isArray,sn=H.isNullOrUndef,cn=H.valueOrDefault,ln=H.valueAtIndexOrDefault;function un(e,t,n){var r,i=e.getTicks().length,a=Math.min(t,i-1),o=e.getPixelForTick(a),s=e._startPixel,c=e._endPixel;if(!(n&&(r=1===i?Math.max(o-s,c-o):0===t?(e.getPixelForTick(1)-o)/2:(o-e.getPixelForTick(a-1))/2,(o+=a<t?r:-r)<s-1e-6||c+1e-6<o)))return o}function fn(e,t,n,r){var i,a,o,s,c,l,u,f,d,h,p,m,g,_,b,v=n.length,y=[],w=[],C=[],A=0,S=0;for(i=0;i<v;++i){if(s=n[i].label,c=n[i].major?t.major:t.minor,e.font=l=c.string,u=r[l]=r[l]||{data:{},gc:[]},f=c.lineHeight,d=h=0,sn(s)||on(s)){if(on(s))for(a=0,o=s.length;a<o;++a)p=s[a],sn(p)||on(p)||(d=H.measureText(e,u.data,u.gc,d,p),h+=f)}else d=H.measureText(e,u.data,u.gc,d,s),h=f;y.push(d),w.push(h),C.push(f/2),A=Math.max(d,A),S=Math.max(h,S)}function T(e){return{width:y[e]||0,height:w[e]||0,offset:C[e]||0}}return _=r,b=v,H.each(_,function(e){var t,n=e.gc,r=n.length/2;if(b<r){for(t=0;t<r;++t)delete e.data[n[t]];n.splice(0,r)}}),m=y.indexOf(A),g=w.indexOf(S),{first:T(0),last:T(v-1),widest:T(m),highest:T(g)}}function dn(e){return e.drawTicks?e.tickMarkLength:0}function hn(e){var t,n;return e.display?(t=H.options._parseFont(e),n=H.options.toPadding(e.padding),t.lineHeight+n.height):0}function pn(e,t){return H.extend(H.options._parseFont({fontFamily:cn(t.fontFamily,e.fontFamily),fontSize:cn(t.fontSize,e.fontSize),fontStyle:cn(t.fontStyle,e.fontStyle),lineHeight:cn(t.lineHeight,e.lineHeight)}),{color:H.options.resolve([t.fontColor,e.fontColor,F.global.defaultFontColor])})}function mn(e){var t=pn(e,e.minor);return{minor:t,major:e.major.enabled?pn(e,e.major):t}}function gn(e){var t,n,r,i=[];for(n=0,r=e.length;n<r;++n)void 0!==(t=e[n])._index&&i.push(t);return i}function _n(e,t,n,r){var i,a,o,s,c=cn(n,0),l=Math.min(cn(r,e.length),e.length),u=0;for(t=Math.ceil(t),r&&(t=(i=r-n)/Math.floor(i/t)),s=c;s<0;)u++,s=Math.round(c+u*t);for(a=Math.max(c,0);a<l;a++)o=e[a],a===s?(o._index=a,u++,s=Math.round(c+u*t)):delete o.label}F._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:an.formatters.values,minor:{},major:{}}});var bn=Q.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){H.callback(this.options.beforeUpdate,[this])},update:function(e,t,n){var r,i,a,o,s,c=this,l=c.options.ticks,u=l.sampleSize;if(c.beforeUpdate(),c.maxWidth=e,c.maxHeight=t,c.margins=H.extend({left:0,right:0,top:0,bottom:0},n),c._ticks=null,c.ticks=null,c._labelSizes=null,c._maxLabelLines=0,c.longestLabelWidth=0,c.longestTextCache=c.longestTextCache||{},c._gridLineItems=null,c._labelItems=null,c.beforeSetDimensions(),c.setDimensions(),c.afterSetDimensions(),c.beforeDataLimits(),c.determineDataLimits(),c.afterDataLimits(),c.beforeBuildTicks(),o=c.buildTicks()||[],(!(o=c.afterBuildTicks(o)||o)||!o.length)&&c.ticks)for(o=[],r=0,i=c.ticks.length;r<i;++r)o.push({value:c.ticks[r],major:!1});return s=u<(c._ticks=o).length,a=c._convertTicksToLabels(s?function(e,t){for(var n=[],r=e.length/t,i=0,a=e.length;i<a;i+=r)n.push(e[Math.floor(i)]);return n}(o,u):o),c._configure(),c.beforeCalculateTickRotation(),c.calculateTickRotation(),c.afterCalculateTickRotation(),c.beforeFit(),c.fit(),c.afterFit(),c._ticksToDraw=l.display&&(l.autoSkip||"auto"===l.source)?c._autoSkip(o):o,s&&(a=c._convertTicksToLabels(c._ticksToDraw)),c.ticks=a,c.afterUpdate(),c.minSize},_configure:function(){var e,t,n=this,r=n.options.ticks.reverse;n.isHorizontal()?(e=n.left,t=n.right):(e=n.top,t=n.bottom,r=!r),n._startPixel=e,n._endPixel=t,n._reversePixels=r,n._length=t-e},afterUpdate:function(){H.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){H.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0},afterSetDimensions:function(){H.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){H.callback(this.options.beforeDataLimits,[this])},determineDataLimits:H.noop,afterDataLimits:function(){H.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){H.callback(this.options.beforeBuildTicks,[this])},buildTicks:H.noop,afterBuildTicks:function(e){return on(e)&&e.length?H.callback(this.options.afterBuildTicks,[this,e]):(this.ticks=H.callback(this.options.afterBuildTicks,[this,this.ticks])||this.ticks,e)},beforeTickToLabelConversion:function(){H.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var e=this.options.ticks;this.ticks=this.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){H.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){H.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var e,t,n,r,i,a,o,s=this,c=s.options,l=c.ticks,u=s.getTicks().length,f=l.minRotation||0,d=l.maxRotation,h=f;!s._isVisible()||!l.display||d<=f||u<=1||!s.isHorizontal()?s.labelRotation=f:(t=(e=s._getLabelSizes()).widest.width,n=e.highest.height-e.highest.offset,r=Math.min(s.maxWidth,s.chart.width-t),(i=c.offset?s.maxWidth/u:r/(u-1))<t+6&&(i=r/(u-(c.offset?.5:1)),a=s.maxHeight-dn(c.gridLines)-l.padding-hn(c.scaleLabel),o=Math.sqrt(t*t+n*n),h=H.toDegrees(Math.min(Math.asin(Math.min((e.highest.height+6)/i,1)),Math.asin(Math.min(a/o,1))-Math.asin(n/o))),h=Math.max(f,Math.min(d,h))),s.labelRotation=h)},afterCalculateTickRotation:function(){H.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){H.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},n=e.chart,r=e.options,i=r.ticks,a=r.scaleLabel,o=r.gridLines,s=e._isVisible(),c="bottom"===r.position,l=e.isHorizontal();if(l?t.width=e.maxWidth:s&&(t.width=dn(o)+hn(a)),l?s&&(t.height=dn(o)+hn(a)):t.height=e.maxHeight,i.display&&s){var u=mn(i),f=e._getLabelSizes(),d=f.first,h=f.last,p=f.widest,m=f.highest,g=.4*u.minor.lineHeight,_=i.padding;if(l){var b=0!==e.labelRotation,v=H.toRadians(e.labelRotation),y=Math.cos(v),w=Math.sin(v),C=w*p.width+y*(m.height-(b?m.offset:0))+(b?0:g);t.height=Math.min(e.maxHeight,t.height+C+_);var A,S,T=e.getPixelForTick(0)-e.left,x=e.right-e.getPixelForTick(e.getTicks().length-1);S=b?(A=c?y*d.width+w*d.offset:w*(d.height-d.offset),c?w*(h.height-h.offset):y*h.width+w*h.offset):(A=d.width/2,h.width/2),e.paddingLeft=Math.max((A-T)*e.width/(e.width-T),0)+3,e.paddingRight=Math.max((S-x)*e.width/(e.width-x),0)+3}else{var k=i.mirror?0:p.width+_+g;t.width=Math.min(e.maxWidth,t.width+k),e.paddingTop=d.height/2,e.paddingBottom=h.height/2}}e.handleMargins(),l?(e.width=e._length=n.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=n.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){H.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(sn(e))return NaN;if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},_convertTicksToLabels:function(e){var t,n,r;for(this.ticks=e.map(function(e){return e.value}),this.beforeTickToLabelConversion(),t=this.convertTicksToLabels(e)||this.ticks,this.afterTickToLabelConversion(),n=0,r=e.length;n<r;++n)e[n].label=t[n];return t},_getLabelSizes:function(){var e=this._labelSizes;return e||(this._labelSizes=e=fn(this.ctx,mn(this.options.ticks),this.getTicks(),this.longestTextCache),this.longestLabelWidth=e.widest.width),e},_parseValue:function(e){var t,n,r,i;return i=on(e)?(t=+this.getRightValue(e[0]),n=+this.getRightValue(e[1]),r=Math.min(t,n),Math.max(t,n)):(t=void 0,r=n=e=+this.getRightValue(e)),{min:r,max:i,start:t,end:n}},_getScaleLabel:function(e){var t=this._parseValue(e);return void 0!==t.start?"["+t.start+", "+t.end+"]":+this.getRightValue(e)},getLabelForIndex:H.noop,getPixelForValue:H.noop,getValueForPixel:H.noop,getPixelForTick:function(e){var t=this.options.offset,n=this._ticks.length,r=1/Math.max(n-(t?0:1),1);return e<0||n-1<e?null:this.getPixelForDecimal(e*r+(t?r/2:0))},getPixelForDecimal:function(e){return this._reversePixels&&(e=1-e),this._startPixel+e*this._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this.min,t=this.max;return this.beginAtZero?0:e<0&&t<0?t:0<e&&0<t?e:0},_autoSkip:function(e){var t,n,r,i,a=this.options.ticks,o=this._length,s=a.maxTicksLimit||o/this._tickSize()+1,c=a.major.enabled?function(e){var t,n,r=[];for(t=0,n=e.length;t<n;t++)e[t].major&&r.push(t);return r}(e):[],l=c.length,u=c[0],f=c[l-1];if(s<l)return function(e,t,n){var r,i,a=0,o=t[0];for(n=Math.ceil(n),r=0;r<e.length;r++)i=e[r],r===o?(i._index=r,o=t[++a*n]):delete i.label}(e,c,l/s),gn(e);if(r=function(e,t,n,r){var i,a,o,s,c=function(e){var t,n,r=e.length;if(r<2)return!1;for(n=e[0],t=1;t<r;++t)if(e[t]-e[t-1]!==n)return!1;return n}(e),l=(t.length-1)/r;if(!c)return Math.max(l,1);for(o=0,s=(i=H.math._factorize(c)).length-1;o<s;o++)if(l<(a=i[o]))return a;return Math.max(l,1)}(c,e,0,s),0<l){for(t=0,n=l-1;t<n;t++)_n(e,r,c[t],c[t+1]);return i=1<l?(f-u)/(l-1):null,_n(e,r,H.isNullOrUndef(i)?0:u-i,u),_n(e,r,f,H.isNullOrUndef(i)?e.length:f+i),gn(e)}return _n(e,r),gn(e)},_tickSize:function(){var e=this.options.ticks,t=H.toRadians(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),i=this._getLabelSizes(),a=e.autoSkipPadding||0,o=i?i.widest.width+a:0,s=i?i.highest.height+a:0;return this.isHorizontal()?o*r<s*n?o/n:s/r:s*r<o*n?s/n:o/r},_isVisible:function(){var e,t,n,r=this.chart,i=this.options.display;if("auto"!==i)return!!i;for(e=0,t=r.data.datasets.length;e<t;++e)if(r.isDatasetVisible(e)&&((n=r.getDatasetMeta(e)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(e){var t,n,r,i,a,o,s,c,l,u,f,d,h,p,m,g,_,b=this,v=b.chart,y=b.options,w=y.gridLines,C=y.position,A=w.offsetGridLines,S=b.isHorizontal(),T=b._ticksToDraw,x=T.length+(A?1:0),k=dn(w),E=[],D=w.drawBorder?ln(w.lineWidth,0,0):0,I=D/2,P=H._alignPixel,M=function(e){return P(v,e,D)};for("top"===C?(t=M(b.bottom),s=b.bottom-k,l=t-I,f=M(e.top)+I,h=e.bottom):"bottom"===C?(t=M(b.top),f=e.top,h=M(e.bottom)-I,s=t+I,l=b.top+k):"left"===C?(t=M(b.right),o=b.right-k,c=t-I,u=M(e.left)+I,d=e.right):(t=M(b.left),u=e.left,d=M(e.right)-I,o=t+I,c=b.left+k),n=0;n<x;++n)r=T[n]||{},sn(r.label)&&n<T.length||(_=n===b.zeroLineIndex&&y.offset===A?(p=w.zeroLineWidth,m=w.zeroLineColor,g=w.zeroLineBorderDash||[],w.zeroLineBorderDashOffset||0):(p=ln(w.lineWidth,n,1),m=ln(w.color,n,"rgba(0,0,0,0.1)"),g=w.borderDash||[],w.borderDashOffset||0),void 0!==(i=un(b,r._index||n,A))&&(a=P(v,i,p),S?o=c=u=d=a:s=l=f=h=a,E.push({tx1:o,ty1:s,tx2:c,ty2:l,x1:u,y1:f,x2:d,y2:h,width:p,color:m,borderDash:g,borderDashOffset:_})));return E.ticksLength=x,E.borderValue=t,E},_computeLabelItems:function(){var e,t,n,r,i,a,o,s,c,l,u,f,d=this.options,h=d.ticks,p=d.position,m=h.mirror,g=this.isHorizontal(),_=this._ticksToDraw,b=mn(h),v=h.padding,y=dn(d.gridLines),w=-H.toRadians(this.labelRotation),C=[];for(o="top"===p?(a=this.bottom-y-v,w?"left":"center"):"bottom"===p?(a=this.top+y+v,w?"right":"center"):"left"===p?(i=this.right-(m?0:y)-v,m?"left":"right"):(i=this.left+(m?0:y)+v,m?"right":"left"),e=0,t=_.length;e<t;++e)r=(n=_[e]).label,sn(r)||(s=this.getPixelForTick(n._index||e)+h.labelOffset,l=(c=n.major?b.major:b.minor).lineHeight,u=on(r)?r.length:1,f=g?(i=s,"top"===p?((w?1:.5)-u)*l:(w?0:.5)*l):(a=s,(1-u)*l/2),C.push({x:i,y:a,rotation:w,label:r,font:c,textOffset:f,textAlign:o}));return C},_drawGrid:function(e){var t=this,n=t.options.gridLines;if(n.display){var r,i,a,o,s,c=t.ctx,l=t.chart,u=H._alignPixel,f=n.drawBorder?ln(n.lineWidth,0,0):0,d=t._gridLineItems||(t._gridLineItems=t._computeGridLineItems(e));for(a=0,o=d.length;a<o;++a)r=(s=d[a]).width,i=s.color,r&&i&&(c.save(),c.lineWidth=r,c.strokeStyle=i,c.setLineDash&&(c.setLineDash(s.borderDash),c.lineDashOffset=s.borderDashOffset),c.beginPath(),n.drawTicks&&(c.moveTo(s.tx1,s.ty1),c.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(c.moveTo(s.x1,s.y1),c.lineTo(s.x2,s.y2)),c.stroke(),c.restore());if(f){var h,p,m,g,_=f,b=ln(n.lineWidth,d.ticksLength-1,1),v=d.borderValue;t.isHorizontal()?(h=u(l,t.left,_)-_/2,p=u(l,t.right,b)+b/2,m=g=v):(m=u(l,t.top,_)-_/2,g=u(l,t.bottom,b)+b/2,h=p=v),c.lineWidth=f,c.strokeStyle=ln(n.color,0),c.beginPath(),c.moveTo(h,m),c.lineTo(p,g),c.stroke()}}},_drawLabels:function(){if(this.options.ticks.display){var e,t,n,r,i,a,o,s,c=this.ctx,l=this._labelItems||(this._labelItems=this._computeLabelItems());for(e=0,n=l.length;e<n;++e){if(a=(i=l[e]).font,c.save(),c.translate(i.x,i.y),c.rotate(i.rotation),c.font=a.string,c.fillStyle=a.color,c.textBaseline="middle",c.textAlign=i.textAlign,o=i.label,s=i.textOffset,on(o))for(t=0,r=o.length;t<r;++t)c.fillText(""+o[t],0,s),s+=a.lineHeight;else c.fillText(o,0,s);c.restore()}}},_drawTitle:function(){var e=this,t=e.ctx,n=e.options,r=n.scaleLabel;if(r.display){var i,a,o=cn(r.fontColor,F.global.defaultFontColor),s=H.options._parseFont(r),c=H.options.toPadding(r.padding),l=s.lineHeight/2,u=n.position,f=0;if(e.isHorizontal())i=e.left+e.width/2,a="bottom"===u?e.bottom-l-c.bottom:e.top+l+c.top;else{var d="left"===u;i=d?e.left+l+c.top:e.right-l-c.top,a=e.top+e.height/2,f=d?-.5*Math.PI:.5*Math.PI}t.save(),t.translate(i,a),t.rotate(f),t.textAlign="center",t.textBaseline="middle",t.fillStyle=o,t.font=s.string,t.fillText(r.labelString,0,0),t.restore()}},draw:function(e){this._isVisible()&&(this._drawGrid(e),this._drawTitle(),this._drawLabels())},_layers:function(){var e=this,t=e.options,n=t.ticks&&t.ticks.z||0,r=t.gridLines&&t.gridLines.z||0;return e._isVisible()&&n!==r&&e.draw===e._draw?[{z:r,draw:function(){e._drawGrid.apply(e,arguments),e._drawTitle.apply(e,arguments)}},{z:n,draw:function(){e._drawLabels.apply(e,arguments)}}]:[{z:n,draw:function(){e.draw.apply(e,arguments)}}]},_getMatchingVisibleMetas:function(t){var n=this,r=n.isHorizontal();return n.chart._getSortedVisibleDatasetMetas().filter(function(e){return(!t||e.type===t)&&(r?e.xAxisID===n.id:e.yAxisID===n.id)})}});bn.prototype._draw=bn.prototype.draw;var vn=bn,yn=H.isNullOrUndef,wn=vn.extend({determineDataLimits:function(){var e,t=this._getLabels(),n=this.options.ticks,r=n.min,i=n.max,a=0,o=t.length-1;void 0!==r&&0<=(e=t.indexOf(r))&&(a=e),void 0!==i&&0<=(e=t.indexOf(i))&&(o=e),this.minIndex=a,this.maxIndex=o,this.min=t[a],this.max=t[o]},buildTicks:function(){var e=this._getLabels(),t=this.minIndex,n=this.maxIndex;this.ticks=0===t&&n===e.length-1?e:e.slice(t,n+1)},getLabelForIndex:function(e,t){var n=this.chart;return n.getDatasetMeta(t).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[t].data[e]):this._getLabels()[e]},_configure:function(){var e=this.options.offset,t=this.ticks;vn.prototype._configure.call(this),this.isHorizontal()||(this._reversePixels=!this._reversePixels),t&&(this._startValue=this.minIndex-(e?.5:0),this._valueRange=Math.max(t.length-(e?0:1),1))},getPixelForValue:function(e,t,n){var r,i,a;return yn(t)||yn(n)||(e=this.chart.data.datasets[n].data[t]),yn(e)||(r=this.isHorizontal()?e.x:e.y),(void 0!==r||void 0!==e&&isNaN(t))&&(i=this._getLabels(),e=H.valueOrDefault(r,e),t=-1!==(a=i.indexOf(e))?a:t,isNaN(t)&&(t=e)),this.getPixelForDecimal((t-this._startValue)/this._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange);return Math.min(Math.max(t,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),Cn={position:"bottom"};wn._defaults=Cn;var An=H.noop,Sn=H.isNullOrUndef;var Tn=vn.extend({getRightValue:function(e){return"string"==typeof e?+e:vn.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;if(t.beginAtZero){var n=H.sign(e.min),r=H.sign(e.max);n<0&&r<0?e.max=0:0<n&&0<r&&(e.min=0)}var i=void 0!==t.min||void 0!==t.suggestedMin,a=void 0!==t.max||void 0!==t.suggestedMax;void 0!==t.min?e.min=t.min:void 0!==t.suggestedMin&&(null===e.min?e.min=t.suggestedMin:e.min=Math.min(e.min,t.suggestedMin)),void 0!==t.max?e.max=t.max:void 0!==t.suggestedMax&&(null===e.max?e.max=t.suggestedMax:e.max=Math.max(e.max,t.suggestedMax)),i!==a&&e.min>=e.max&&(i?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:function(){var e,t=this.options.ticks,n=t.stepSize,r=t.maxTicksLimit;return n?e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(e=this._computeTickLimit(),r=r||11),r&&(e=Math.min(r,e)),e},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:An,buildTicks:function(){var e=this,t=e.options.ticks,n=e.getTickLimit(),r={maxTicks:n=Math.max(2,n),min:t.min,max:t.max,precision:t.precision,stepSize:H.valueOrDefault(t.fixedStepSize,t.stepSize)},i=e.ticks=function(e,t){var n,r,i,a,o=[],s=e.stepSize,c=s||1,l=e.maxTicks-1,u=e.min,f=e.max,d=e.precision,h=t.min,p=t.max,m=H.niceNum((p-h)/l/c)*c;if(m<1e-14&&Sn(u)&&Sn(f))return[h,p];l<(a=Math.ceil(p/m)-Math.floor(h/m))&&(m=H.niceNum(a*m/l/c)*c),s||Sn(d)?n=Math.pow(10,H._decimalPlaces(m)):(n=Math.pow(10,d),m=Math.ceil(m*n)/n),r=Math.floor(h/m)*m,i=Math.ceil(p/m)*m,s&&(!Sn(u)&&H.almostWhole(u/m,m/1e3)&&(r=u),!Sn(f)&&H.almostWhole(f/m,m/1e3)&&(i=f)),a=(i-r)/m,a=H.almostEquals(a,Math.round(a),m/1e3)?Math.round(a):Math.ceil(a),r=Math.round(r*n)/n,i=Math.round(i*n)/n,o.push(Sn(u)?r:u);for(var g=1;g<a;++g)o.push(Math.round((r+g*m)*n)/n);return o.push(Sn(f)?i:f),o}(r,e);e.handleDirectionalChanges(),e.max=H.max(i),e.min=H.min(i),t.reverse?(i.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){this.ticksAsNumbers=this.ticks.slice(),this.zeroLineIndex=this.ticks.indexOf(0),vn.prototype.convertTicksToLabels.call(this)},_configure:function(){var e,t=this.getTicks(),n=this.min,r=this.max;vn.prototype._configure.call(this),this.options.offset&&t.length&&(n-=e=(r-n)/Math.max(t.length-1,1)/2,r+=e),this._startValue=n,this._endValue=r,this._valueRange=r-n}}),xn={position:"left",ticks:{callback:an.formatters.linear}};function kn(e,t,n,r){var i,a,o,s,c,l,u=e.options,f=u.stacked,d=(i=t,a=f,s=[(o=n).type,void 0===a&&void 0===o.stack?o.index:"",o.stack].join("."),void 0===i[s]&&(i[s]={pos:[],neg:[]}),i[s]),h=d.pos,p=d.neg,m=r.length;for(c=0;c<m;++c)l=e._parseValue(r[c]),isNaN(l.min)||isNaN(l.max)||n.data[c].hidden||(h[c]=h[c]||0,p[c]=p[c]||0,u.relativePoints?h[c]=100:l.min<0||l.max<0?p[c]+=l.min:h[c]+=l.max)}function En(e,t,n){var r,i,a=n.length;for(r=0;r<a;++r)i=e._parseValue(n[r]),isNaN(i.min)||isNaN(i.max)||t.data[r].hidden||(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}var Dn=Tn.extend({determineDataLimits:function(){var e,t,n,r,i=this,a=i.options,o=i.chart.data.datasets,s=i._getMatchingVisibleMetas(),c=a.stacked,l={},u=s.length;if(i.min=Number.POSITIVE_INFINITY,i.max=Number.NEGATIVE_INFINITY,void 0===c)for(e=0;!c&&e<u;++e)c=void 0!==(t=s[e]).stack;for(e=0;e<u;++e)n=o[(t=s[e]).index].data,c?kn(i,l,t,n):En(i,t,n);H.each(l,function(e){r=e.pos.concat(e.neg),i.min=Math.min(i.min,H.min(r)),i.max=Math.max(i.max,H.max(r))}),i.min=H.isFinite(i.min)&&!isNaN(i.min)?i.min:0,i.max=H.isFinite(i.max)&&!isNaN(i.max)?i.max:1,i.handleTickRangeOptions()},_computeTickLimit:function(){var e;return this.isHorizontal()?Math.ceil(this.width/40):(e=H.options._parseFont(this.options.ticks),Math.ceil(this.height/e.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForValue:function(e){return this.getPixelForDecimal((+this.getRightValue(e)-this._startValue)/this._valueRange)},getValueForPixel:function(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange},getPixelForTick:function(e){var t=this.ticksAsNumbers;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])}}),In=xn;Dn._defaults=In;var Pn=H.valueOrDefault,Mn=H.math.log10;var $n={position:"left",ticks:{callback:an.formatters.logarithmic}};function On(e,t){return H.isFinite(e)&&0<=e?e:t}var Rn=vn.extend({determineDataLimits:function(){var e,t,n,r,i,a,o=this,s=o.options,c=o.chart,l=c.data.datasets,u=o.isHorizontal();function f(e){return u?e.xAxisID===o.id:e.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var d=s.stacked;if(void 0===d)for(e=0;e<l.length;e++)if(t=c.getDatasetMeta(e),c.isDatasetVisible(e)&&f(t)&&void 0!==t.stack){d=!0;break}if(s.stacked||d){var h={};for(e=0;e<l.length;e++){var p=[(t=c.getDatasetMeta(e)).type,void 0===s.stacked&&void 0===t.stack?e:"",t.stack].join(".");if(c.isDatasetVisible(e)&&f(t))for(void 0===h[p]&&(h[p]=[]),i=0,a=(r=l[e].data).length;i<a;i++){var m=h[p];n=o._parseValue(r[i]),isNaN(n.min)||isNaN(n.max)||t.data[i].hidden||n.min<0||n.max<0||(m[i]=m[i]||0,m[i]+=n.max)}}H.each(h,function(e){if(0<e.length){var t=H.min(e),n=H.max(e);o.min=Math.min(o.min,t),o.max=Math.max(o.max,n)}})}else for(e=0;e<l.length;e++)if(t=c.getDatasetMeta(e),c.isDatasetVisible(e)&&f(t))for(i=0,a=(r=l[e].data).length;i<a;i++)n=o._parseValue(r[i]),isNaN(n.min)||isNaN(n.max)||t.data[i].hidden||n.min<0||n.max<0||(o.min=Math.min(n.min,o.min),o.max=Math.max(n.max,o.max),0!==n.min&&(o.minNotZero=Math.min(n.min,o.minNotZero)));o.min=H.isFinite(o.min)?o.min:null,o.max=H.isFinite(o.max)?o.max:null,o.minNotZero=H.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;e.min=On(t.min,e.min),e.max=On(t.max,e.max),e.min===e.max&&(0!==e.min&&null!==e.min?(e.min=Math.pow(10,Math.floor(Mn(e.min))-1),e.max=Math.pow(10,Math.floor(Mn(e.max))+1)):(e.min=1,e.max=10)),null===e.min&&(e.min=Math.pow(10,Math.floor(Mn(e.max))-1)),null===e.max&&(e.max=0!==e.min?Math.pow(10,Math.floor(Mn(e.min))+1):10),null===e.minNotZero&&(0<e.min?e.minNotZero=e.min:e.max<1?e.minNotZero=Math.pow(10,Math.floor(Mn(e.max))):e.minNotZero=1)},buildTicks:function(){var e=this,t=e.options.ticks,n=!e.isHorizontal(),r={min:On(t.min),max:On(t.max)},i=e.ticks=function(e,t){var n,r,i=[],a=Pn(e.min,Math.pow(10,Math.floor(Mn(t.min)))),o=Math.floor(Mn(t.max)),s=Math.ceil(t.max/Math.pow(10,o));0===a?(n=Math.floor(Mn(t.minNotZero)),r=Math.floor(t.minNotZero/Math.pow(10,n)),i.push(a),a=r*Math.pow(10,n)):(n=Math.floor(Mn(a)),r=Math.floor(a/Math.pow(10,n)));for(var c=n<0?Math.pow(10,Math.abs(n)):1;i.push(a),10==++r&&(r=1,c=0<=++n?1:c),a=Math.round(r*Math.pow(10,n)*c)/c,n<o||n===o&&r<s;);var l=Pn(e.max,a);return i.push(l),i}(r,e);e.max=H.max(i),e.min=H.min(i),t.reverse?(n=!n,e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),n&&i.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),vn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForTick:function(e){var t=this.tickValues;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(Mn(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,n=0;vn.prototype._configure.call(e),0===t&&(t=e._getFirstTickValue(e.minNotZero),n=Pn(e.options.ticks.fontSize,F.global.defaultFontSize)/e._length),e._startValue=Mn(t),e._valueOffset=n,e._valueRange=(Mn(e.max)-Mn(t))/(1-n)},getPixelForValue:function(e){var t=0;return(e=+this.getRightValue(e))>this.min&&0<e&&(t=(Mn(e)-this._startValue)/this._valueRange+this._valueOffset),this.getPixelForDecimal(t)},getValueForPixel:function(e){var t=this.getDecimalForPixel(e);return 0===t&&0===this.min?0:Math.pow(10,this._startValue+(t-this._valueOffset)*this._valueRange)}}),Nn=$n;Rn._defaults=Nn;var Ln=H.valueOrDefault,Fn=H.valueAtIndexOrDefault,Gn=H.options.resolve,jn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:an.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function Bn(e){var t=e.ticks;return t.display&&e.display?Ln(t.fontSize,F.global.defaultFontSize)+2*t.backdropPaddingY:0}function Un(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||i<e?{start:t-n,end:t}:{start:t,end:t+n}}function Hn(e,t,n,r){var i,a,o=n.y+r/2;if(H.isArray(t))for(i=0,a=t.length;i<a;++i)e.fillText(t[i],n.x,o),o+=r;else e.fillText(t,n.x,o)}function Wn(e){return H.isNumber(e)?e:0}var qn=Tn.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=Bn(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var i=this,n=i.chart,a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;H.each(n.data.datasets,function(e,t){if(n.isDatasetVisible(t)){var r=n.getDatasetMeta(t);H.each(e.data,function(e,t){var n=+i.getRightValue(e);isNaN(n)||r.data[t].hidden||(a=Math.min(n,a),o=Math.max(n,o))})}}),i.min=a===Number.POSITIVE_INFINITY?0:a,i.max=o===Number.NEGATIVE_INFINITY?0:o,i.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Bn(this.options))},convertTicksToLabels:function(){var t=this;Tn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(function(){var e=H.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""})},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this.options;e.display&&e.pointLabels.display?function(e){var t,n,r,i=H.options._parseFont(e.options.pointLabels),a={l:0,r:e.width,t:0,b:e.height-e.paddingTop},o={};e.ctx.font=i.string,e._pointLabelSizes=[];var s,c,l,u=e.chart.data.labels.length;for(t=0;t<u;t++){r=e.getPointPosition(t,e.drawingArea+5),s=e.ctx,c=i.lineHeight,l=e.pointLabels[t],n=H.isArray(l)?{w:H.longestText(s,s.font,l),h:l.length*c}:{w:s.measureText(l).width,h:c},e._pointLabelSizes[t]=n;var f=e.getIndexAngle(t),d=H.toDegrees(f)%360,h=Un(d,r.x,n.w,0,180),p=Un(d,r.y,n.h,90,270);h.start<a.l&&(a.l=h.start,o.l=f),h.end>a.r&&(a.r=h.end,o.r=f),p.start<a.t&&(a.t=p.start,o.t=f),p.end>a.b&&(a.b=p.end,o.b=f)}e.setReductions(e.drawingArea,a,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(e,t,n){var r=t.l/Math.sin(n.l),i=Math.max(t.r-this.width,0)/Math.sin(n.r),a=-t.t/Math.cos(n.t),o=-Math.max(t.b-(this.height-this.paddingTop),0)/Math.cos(n.b);r=Wn(r),i=Wn(i),a=Wn(a),o=Wn(o),this.drawingArea=Math.min(Math.floor(e-(r+i)/2),Math.floor(e-(a+o)/2)),this.setCenterPoint(r,i,a,o)},setCenterPoint:function(e,t,n,r){var i=this,a=i.width-t-i.drawingArea,o=e+i.drawingArea,s=n+i.drawingArea,c=i.height-i.paddingTop-r-i.drawingArea;i.xCenter=Math.floor((o+a)/2+i.left),i.yCenter=Math.floor((s+c)/2+i.top+i.paddingTop)},getIndexAngle:function(e){var t=this.chart,n=(e*(360/t.data.labels.length)+((t.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){if(H.isNullOrUndef(e))return NaN;var t=this.drawingArea/(this.max-this.min);return this.options.ticks.reverse?(this.max-e)*t:(e-this.min)*t},getPointPosition:function(e,t){var n=this.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(n)*t+this.xCenter,y:Math.sin(n)*t+this.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(e){var t=this.min,n=this.max;return this.getPointPositionForValue(e||0,this.beginAtZero?0:t<0&&n<0?n:0<t&&0<n?t:0)},_drawGrid:function(){var e,n,t,r=this,i=r.ctx,a=r.options,o=a.gridLines,s=a.angleLines,c=Ln(s.lineWidth,o.lineWidth),l=Ln(s.color,o.color);if(a.pointLabels.display&&function(e){var t,n,r,i,a=e.ctx,o=e.options,s=o.pointLabels,c=Bn(o),l=e.getDistanceFromCenterForValue(o.ticks.reverse?e.min:e.max),u=H.options._parseFont(s);a.save(),a.font=u.string,a.textBaseline="middle";for(var f=e.chart.data.labels.length-1;0<=f;f--){var d=0===f?c/2:0,h=e.getPointPosition(f,l+d+5),p=Fn(s.fontColor,f,F.global.defaultFontColor);a.fillStyle=p;var m=e.getIndexAngle(f),g=H.toDegrees(m);a.textAlign=0===(i=g)||180===i?"center":i<180?"left":"right",t=g,n=e._pointLabelSizes[f],r=h,90===t||270===t?r.y-=n.h/2:(270<t||t<90)&&(r.y-=n.h),Hn(a,e.pointLabels[f],h,u.lineHeight)}a.restore()}(r),o.display&&H.each(r.ticks,function(e,t){0!==t&&(n=r.getDistanceFromCenterForValue(r.ticksAsNumbers[t]),function(e,t,n,r){var i,a=e.ctx,o=t.circular,s=e.chart.data.labels.length,c=Fn(t.color,r-1),l=Fn(t.lineWidth,r-1);if((o||s)&&c&&l){if(a.save(),a.strokeStyle=c,a.lineWidth=l,a.setLineDash&&(a.setLineDash(t.borderDash||[]),a.lineDashOffset=t.borderDashOffset||0),a.beginPath(),o)a.arc(e.xCenter,e.yCenter,n,0,2*Math.PI);else{i=e.getPointPosition(0,n),a.moveTo(i.x,i.y);for(var u=1;u<s;u++)i=e.getPointPosition(u,n),a.lineTo(i.x,i.y)}a.closePath(),a.stroke(),a.restore()}}(r,o,n,t))}),s.display&&c&&l){for(i.save(),i.lineWidth=c,i.strokeStyle=l,i.setLineDash&&(i.setLineDash(Gn([s.borderDash,o.borderDash,[]])),i.lineDashOffset=Gn([s.borderDashOffset,o.borderDashOffset,0])),e=r.chart.data.labels.length-1;0<=e;e--)n=r.getDistanceFromCenterForValue(a.ticks.reverse?r.min:r.max),t=r.getPointPosition(e,n),i.beginPath(),i.moveTo(r.xCenter,r.yCenter),i.lineTo(t.x,t.y),i.stroke();i.restore()}},_drawLabels:function(){var n=this,r=n.ctx,i=n.options.ticks;if(i.display){var a,o,e=n.getIndexAngle(0),s=H.options._parseFont(i),c=Ln(i.fontColor,F.global.defaultFontColor);r.save(),r.font=s.string,r.translate(n.xCenter,n.yCenter),r.rotate(e),r.textAlign="center",r.textBaseline="middle",H.each(n.ticks,function(e,t){(0!==t||i.reverse)&&(a=n.getDistanceFromCenterForValue(n.ticksAsNumbers[t]),i.showLabelBackdrop&&(o=r.measureText(e).width,r.fillStyle=i.backdropColor,r.fillRect(-o/2-i.backdropPaddingX,-a-s.size/2-i.backdropPaddingY,o+2*i.backdropPaddingX,s.size+2*i.backdropPaddingY)),r.fillStyle=c,r.fillText(e,0,-a))}),r.restore()}},_drawTitle:H.noop}),zn=jn;qn._defaults=zn;var Vn=H._deprecated,Yn=H.options.resolve,Kn=H.valueOrDefault,Qn=Number.MIN_SAFE_INTEGER||-9007199254740991,Xn=Number.MAX_SAFE_INTEGER||9007199254740991,Zn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Jn=Object.keys(Zn);function er(e,t){return e-t}function tr(e){return H.valueOrDefault(e.time.min,e.ticks.min)}function nr(e){return H.valueOrDefault(e.time.max,e.ticks.max)}function rr(e,t,n,r){var i=function(e,t,n){for(var r,i,a,o=0,s=e.length-1;0<=o&&o<=s;){if(i=e[(r=o+s>>1)-1]||null,a=e[r],!i)return{lo:null,hi:a};if(a[t]<n)o=r+1;else{if(!(i[t]>n))return{lo:i,hi:a};s=r-1}}return{lo:a,hi:null}}(e,t,n),a=i.lo?i.hi?i.lo:e[e.length-2]:e[0],o=i.lo?i.hi?i.hi:e[e.length-1]:e[1],s=o[t]-a[t],c=s?(n-a[t])/s:0,l=(o[r]-a[r])*c;return a[r]+l}function ir(e,t){var n=e._adapter,r=e.options.time,i=r.parser,a=i||r.format,o=t;return"function"==typeof i&&(o=i(o)),H.isFinite(o)||(o="string"==typeof a?n.parse(o,a):n.parse(o)),null!==o?+o:(i||"function"!=typeof a||(o=a(t),H.isFinite(o)||(o=n.parse(o))),o)}function ar(e,t){if(H.isNullOrUndef(t))return null;var n=e.options.time,r=ir(e,e.getRightValue(t));return null===r||n.round&&(r=+e._adapter.startOf(r,n.round)),r}function or(e,t,n,r){var i,a,o,s=Jn.length;for(i=Jn.indexOf(e);i<s-1;++i)if(o=(a=Zn[Jn[i]]).steps?a.steps:Xn,a.common&&Math.ceil((n-t)/(o*a.size))<=r)return Jn[i];return Jn[s-1]}function sr(e,t,n){var r,i,a=[],o={},s=t.length;for(r=0;r<s;++r)o[i=t[r]]=r,a.push({value:i,major:!1});return 0!==s&&n?function(e,t,n,r){var i,a,o=e._adapter,s=+o.startOf(t[0].value,r),c=t[t.length-1].value;for(i=s;i<=c;i=+o.add(i,1,r))0<=(a=n[i])&&(t[a].major=!0);return t}(e,a,o,n):a}var cr=vn.extend({initialize:function(){this.mergeTicksOptions(),vn.prototype.initialize.call(this)},update:function(){var e=this.options,t=e.time||(e.time={}),n=this._adapter=new rn._date(e.adapters.date);return Vn("time scale",t.format,"time.format","time.parser"),Vn("time scale",t.min,"time.min","ticks.min"),Vn("time scale",t.max,"time.max","ticks.max"),H.mergeIf(t.displayFormats,n.formats()),vn.prototype.update.apply(this,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),vn.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var e,t,n,r,i,a,o,s=this,c=s.chart,l=s._adapter,u=s.options,f=u.time.unit||"day",d=Xn,h=Qn,p=[],m=[],g=[],_=s._getLabels();for(e=0,n=_.length;e<n;++e)g.push(ar(s,_[e]));for(e=0,n=(c.data.datasets||[]).length;e<n;++e)if(c.isDatasetVisible(e))if(i=c.data.datasets[e].data,H.isObject(i[0]))for(m[e]=[],t=0,r=i.length;t<r;++t)a=ar(s,i[t]),p.push(a),m[e][t]=a;else m[e]=g.slice(0),o||(p=p.concat(g),o=!0);else m[e]=[];g.length&&(d=Math.min(d,g[0]),h=Math.max(h,g[g.length-1])),p.length&&(p=1<n?function(e){var t,n,r,i={},a=[];for(t=0,n=e.length;t<n;++t)i[r=e[t]]||(i[r]=!0,a.push(r));return a}(p).sort(er):p.sort(er),d=Math.min(d,p[0]),h=Math.max(h,p[p.length-1])),d=ar(s,tr(u))||d,h=ar(s,nr(u))||h,d=d===Xn?+l.startOf(Date.now(),f):d,h=h===Qn?+l.endOf(Date.now(),f)+1:h,s.min=Math.min(d,h),s.max=Math.max(d+1,h),s._table=[],s._timestamps={data:p,datasets:m,labels:g}},buildTicks:function(){var e,t,n,r,i,a,o,s,c,l=this,u=l.min,f=l.max,d=l.options,h=d.ticks,p=d.time,m=l._timestamps,g=[],_=l.getLabelCapacity(u),b=h.source,v=d.distribution;for(m="data"===b||"auto"===b&&"series"===v?m.data:"labels"===b?m.labels:function(e,t,n,r){var i,a=e._adapter,o=e.options,s=o.time,c=s.unit||or(s.minUnit,t,n,r),l=Yn([s.stepSize,s.unitStepSize,1]),u="week"===c&&s.isoWeekday,f=t,d=[];if(u&&(f=+a.startOf(f,"isoWeek",u)),f=+a.startOf(f,u?"day":c),a.diff(n,t,c)>1e5*l)throw t+" and "+n+" are too far apart with stepSize of "+l+" "+c;for(i=f;i<n;i=+a.add(i,l,c))d.push(i);return i!==n&&"ticks"!==o.bounds||d.push(i),d}(l,u,f,_),"ticks"===d.bounds&&m.length&&(u=m[0],f=m[m.length-1]),u=ar(l,tr(d))||u,f=ar(l,nr(d))||f,e=0,t=m.length;e<t;++e)u<=(n=m[e])&&n<=f&&g.push(n);return l.min=u,l.max=f,l._unit=p.unit||(h.autoSkip?or(p.minUnit,l.min,l.max,_):function(e,t,n,r,i){var a,o;for(a=Jn.length-1;a>=Jn.indexOf(n);a--)if(o=Jn[a],Zn[o].common&&e._adapter.diff(i,r,o)>=t-1)return o;return Jn[n?Jn.indexOf(n):0]}(l,g.length,p.minUnit,l.min,l.max)),l._majorUnit=h.major.enabled&&"year"!==l._unit?function(e){for(var t=Jn.indexOf(e)+1,n=Jn.length;t<n;++t)if(Zn[Jn[t]].common)return Jn[t]}(l._unit):void 0,l._table=function(e,t,n,r){if("linear"===r||!e.length)return[{time:t,pos:0},{time:n,pos:1}];var i,a,o,s,c,l=[],u=[t];for(i=0,a=e.length;i<a;++i)t<(s=e[i])&&s<n&&u.push(s);for(u.push(n),i=0,a=u.length;i<a;++i)c=u[i+1],o=u[i-1],s=u[i],void 0!==o&&void 0!==c&&Math.round((c+o)/2)===s||l.push({time:s,pos:i/(a-1)});return l}(l._timestamps.data,u,f,v),l._offsets=(r=l._table,i=g,c=s=0,d.offset&&i.length&&(a=rr(r,"time",i[0],"pos"),s=1===i.length?1-a:(rr(r,"time",i[1],"pos")-a)/2,o=rr(r,"time",i[i.length-1],"pos"),c=1===i.length?o:(o-rr(r,"time",i[i.length-2],"pos"))/2),{start:s,end:c,factor:1/(s+1+c)}),h.reverse&&g.reverse(),sr(l,g,l._majorUnit)},getLabelForIndex:function(e,t){var n=this._adapter,r=this.chart.data,i=this.options.time,a=r.labels&&e<r.labels.length?r.labels[e]:"",o=r.datasets[t].data[e];return H.isObject(o)&&(a=this.getRightValue(o)),i.tooltipFormat?n.format(ir(this,a),i.tooltipFormat):"string"==typeof a?a:n.format(ir(this,a),i.displayFormats.datetime)},tickFormatFunction:function(e,t,n,r){var i=this._adapter,a=this.options,o=a.time.displayFormats,s=o[this._unit],c=this._majorUnit,l=o[c],u=n[t],f=a.ticks,d=c&&l&&u&&u.major,h=i.format(e,r||(d?l:s)),p=d?f.major:f.minor,m=Yn([p.callback,p.userCallback,f.callback,f.userCallback]);return m?m(h,t,n):h},convertTicksToLabels:function(e){var t,n,r=[];for(t=0,n=e.length;t<n;++t)r.push(this.tickFormatFunction(e[t].value,t,e));return r},getPixelForOffset:function(e){var t=this._offsets,n=rr(this._table,"time",e,"pos");return this.getPixelForDecimal((t.start+n)*t.factor)},getPixelForValue:function(e,t,n){var r=null;if(void 0!==t&&void 0!==n&&(r=this._timestamps.datasets[n][t]),null===r&&(r=ar(this,e)),null!==r)return this.getPixelForOffset(r)},getPixelForTick:function(e){var t=this.getTicks();return 0<=e&&e<t.length?this.getPixelForOffset(t[e].value):null},getValueForPixel:function(e){var t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end,r=rr(this._table,"pos",n,"time");return this._adapter._create(r)},_getLabelSize:function(e){var t=this.options.ticks,n=this.ctx.measureText(e).width,r=H.toRadians(this.isHorizontal()?t.maxRotation:t.minRotation),i=Math.cos(r),a=Math.sin(r),o=Kn(t.fontSize,F.global.defaultFontSize);return{w:n*i+o*a,h:n*a+o*i}},getLabelWidth:function(e){return this._getLabelSize(e).w},getLabelCapacity:function(e){var t=this.options.time,n=t.displayFormats,r=n[t.unit]||n.millisecond,i=this.tickFormatFunction(e,0,sr(this,[e],this._majorUnit),r),a=this._getLabelSize(i),o=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h);return this.options.offset&&o--,0<o?o:1}}),lr={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};cr._defaults=lr;var ur={category:wn,linear:Dn,logarithmic:Rn,radialLinear:qn,time:cr},fr={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};rn._date.override("function"==typeof r?{_id:"moment",formats:function(){return fr},parse:function(e,t){return"string"==typeof e&&"string"==typeof t?e=r(e,t):e instanceof r||(e=r(e)),e.isValid()?e.valueOf():null},format:function(e,t){return r(e).format(t)},add:function(e,t,n){return r(e).add(t,n).valueOf()},diff:function(e,t,n){return r(e).diff(r(t),n)},startOf:function(e,t,n){return e=r(e),"isoWeek"===t?e.isoWeekday(n).valueOf():e.startOf(t).valueOf()},endOf:function(e,t){return r(e).endOf(t).valueOf()},_create:function(e){return r(e)}}:{}),F._set("global",{plugins:{filler:{propagate:!0}}});var dr={dataset:function(e){var t=e.fill,n=e.chart,r=n.getDatasetMeta(t),i=r&&n.isDatasetVisible(t)&&r.dataset._children||[],a=i.length||0;return a?function(e,t){return t<a&&i[t]._view||null}:null},boundary:function(e){var n=e.boundary,t=n?n.x:null,r=n?n.y:null;return H.isArray(n)?function(e,t){return n[t]}:function(e){return{x:null===t?e.x:t,y:null===r?e.y:r}}}};function hr(e,t,n){var r,i=e._model||{},a=i.fill;if(void 0===a&&(a=!!i.backgroundColor),!1===a||null===a)return!1;if(!0===a)return"origin";if(r=parseFloat(a,10),isFinite(r)&&Math.floor(r)===r)return"-"!==a[0]&&"+"!==a[0]||(r=t+r),!(r===t||r<0||n<=r)&&r;switch(a){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return a;default:return!1}}function pr(e){return(e.el._scale||{}).getPointPositionForValue?function(e){var t,n,r,i,a,o=e.el._scale,s=o.options,c=o.chart.data.labels.length,l=e.fill,u=[];if(!c)return null;for(t=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,r=o.getPointPositionForValue(0,t),i=0;i<c;++i)a="start"===l||"end"===l?o.getPointPositionForValue(i,"start"===l?t:n):o.getBasePosition(i),s.gridLines.circular&&(a.cx=r.x,a.cy=r.y,a.angle=o.getIndexAngle(i)-Math.PI/2),u.push(a);return u}(e):function(e){var t,n=e.el._model||{},r=e.el._scale||{},i=e.fill,a=null;if(isFinite(i))return null;if("start"===i?a=void 0===n.scaleBottom?r.bottom:n.scaleBottom:"end"===i?a=void 0===n.scaleTop?r.top:n.scaleTop:void 0!==n.scaleZero?a=n.scaleZero:r.getBasePixel&&(a=r.getBasePixel()),null!=a){if(void 0!==a.x&&void 0!==a.y)return a;if(H.isFinite(a))return{x:(t=r.isHorizontal())?a:null,y:t?null:a}}return null}(e)}function mr(e,t,n){var r,i=e[t].fill,a=[t];if(!n)return i;for(;!1!==i&&-1===a.indexOf(i);){if(!isFinite(i))return i;if(!(r=e[i]))return!1;if(r.visible)return i;a.push(i),i=r.fill}return!1}function gr(e){return e&&!e.skip}function _r(e,t,n,r,i){var a,o,s,c;if(r&&i){for(e.moveTo(t[0].x,t[0].y),a=1;a<r;++a)H.canvas.lineTo(e,t[a-1],t[a]);if(void 0===n[0].angle)for(e.lineTo(n[i-1].x,n[i-1].y),a=i-1;0<a;--a)H.canvas.lineTo(e,n[a],n[a-1],!0);else for(o=n[0].cx,s=n[0].cy,c=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),a=i-1;0<a;--a)e.arc(o,s,c,n[a].angle,n[a-1].angle,!0)}}function br(e,t,n,r,i,a){var o,s,c,l,u,f,d,h,p=t.length,m=r.spanGaps,g=[],_=[],b=0,v=0;for(e.beginPath(),o=0,s=p;o<s;++o)u=n(l=t[c=o%p]._view,c,r),f=gr(l),d=gr(u),a&&void 0===h&&f&&(s=p+(h=o+1)),f&&d?(b=g.push(l),v=_.push(u)):b&&v&&(m?(f&&g.push(l),d&&_.push(u)):(_r(e,g,_,b,v),b=v=0,g=[],_=[]));_r(e,g,_,b,v),e.closePath(),e.fillStyle=i,e.fill()}var vr={id:"filler",afterDatasetsUpdate:function(e,t){var n,r,i,a,o,s,c,l=(e.data.datasets||[]).length,u=t.propagate,f=[];for(r=0;r<l;++r)a=null,(i=(n=e.getDatasetMeta(r)).dataset)&&i._model&&i instanceof Ae.Line&&(a={visible:e.isDatasetVisible(r),fill:hr(i,r,l),chart:e,el:i}),n.$filler=a,f.push(a);for(r=0;r<l;++r)(a=f[r])&&(a.fill=mr(f,r,u),a.boundary=pr(a),a.mapper=(c=void 0,s=(o=a).fill,!(c="dataset")===s?null:(isFinite(s)||(c="boundary"),dr[c](o))))},beforeDatasetsDraw:function(e){var t,n,r,i,a,o,s,c=e._getSortedVisibleDatasetMetas(),l=e.ctx;for(n=c.length-1;0<=n;--n)(t=c[n].$filler)&&t.visible&&(i=(r=t.el)._view,a=r._children||[],o=t.mapper,s=i.backgroundColor||F.global.defaultColor,o&&s&&a.length&&(H.canvas.clipArea(l,e.chartArea),br(l,a,o,i,s,r._loop),H.canvas.unclipArea(l)))}},yr=H.rtl.getRtlAdapter,wr=H.noop,Cr=H.valueOrDefault;function Ar(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}F._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var n=t.datasetIndex,r=this.chart,i=r.getDatasetMeta(n);i.hidden=null===i.hidden?!r.data.datasets[n].hidden:null,r.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(n){var r=n.data.datasets,e=n.options.legend||{},i=e.labels&&e.labels.usePointStyle;return n._getSortedDatasetMetas().map(function(e){var t=e.controller.getStyle(i?0:void 0);return{text:r[e.index].label,fillStyle:t.backgroundColor,hidden:!n.isDatasetVisible(e.index),lineCap:t.borderCapStyle,lineDash:t.borderDash,lineDashOffset:t.borderDashOffset,lineJoin:t.borderJoinStyle,lineWidth:t.borderWidth,strokeStyle:t.borderColor,pointStyle:t.pointStyle,rotation:t.rotation,datasetIndex:e.index}},this)}}},legendCallback:function(e){var t,n,r,i=document.createElement("ul"),a=e.data.datasets;for(i.setAttribute("class",e.id+"-legend"),t=0,n=a.length;t<n;t++)(r=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[t].backgroundColor,a[t].label&&r.appendChild(document.createTextNode(a[t].label));return i.outerHTML}});var Sr=Q.extend({initialize:function(e){H.extend(this,e),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:wr,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:wr,beforeSetDimensions:wr,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:wr,beforeBuildLabels:wr,buildLabels:function(){var t=this,n=t.options.labels||{},e=H.callback(n.generateLabels,[t.chart],t)||[];n.filter&&(e=e.filter(function(e){return n.filter(e,t.chart.data)})),t.options.reverse&&e.reverse(),t.legendItems=e},afterBuildLabels:wr,beforeFit:wr,fit:function(){var e=this,t=e.options,r=t.labels,n=t.display,i=e.ctx,a=H.options._parseFont(r),o=a.size,s=e.legendHitBoxes=[],c=e.minSize,l=e.isHorizontal();if(l?(c.width=e.maxWidth,c.height=n?10:0):(c.width=n?10:0,c.height=e.maxHeight),n){if(i.font=a.string,l){var u=e.lineWidths=[0],f=0;i.textAlign="left",i.textBaseline="middle",H.each(e.legendItems,function(e,t){var n=Ar(r,o)+o/2+i.measureText(e.text).width;(0===t||u[u.length-1]+n+2*r.padding>c.width)&&(f+=o+r.padding,u[u.length-(0<t?0:1)]=0),s[t]={left:0,top:0,width:n,height:o},u[u.length-1]+=n+r.padding}),c.height+=f}else{var d=r.padding,h=e.columnWidths=[],p=e.columnHeights=[],m=r.padding,g=0,_=0;H.each(e.legendItems,function(e,t){var n=Ar(r,o)+o/2+i.measureText(e.text).width;0<t&&_+o+2*d>c.height&&(m+=g+r.padding,h.push(g),p.push(_),_=g=0),g=Math.max(g,n),_+=o+d,s[t]={left:0,top:0,width:n,height:o}}),m+=g,h.push(g),p.push(_),c.width+=m}e.width=c.width,e.height=c.height}else e.width=c.width=e.height=c.height=0},afterFit:wr,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var p=this,n=p.options,m=n.labels,e=F.global,g=e.defaultColor,_=e.elements.line,b=p.height,v=p.columnHeights,y=p.width,w=p.lineWidths;if(n.display){var C,A=yr(n.rtl,p.left,p.minSize.width),S=p.ctx,t=Cr(m.fontColor,e.defaultFontColor),r=H.options._parseFont(m),T=r.size;S.textAlign=A.textAlign("left"),S.textBaseline="middle",S.lineWidth=.5,S.strokeStyle=t,S.fillStyle=t,S.font=r.string;var x=Ar(m,T),k=p.legendHitBoxes,E=function(e,t){switch(n.align){case"start":return m.padding;case"end":return e-t;default:return(e-t+m.padding)/2}},D=p.isHorizontal();C=D?{x:p.left+E(y,w[0]),y:p.top+m.padding,line:0}:{x:p.left+m.padding,y:p.top+E(b,v[0]),line:0},H.rtl.overrideTextDirection(p.ctx,n.textDirection);var I=T+m.padding;H.each(p.legendItems,function(e,t){var n=S.measureText(e.text).width,r=x+T/2+n,i=C.x,a=C.y;A.setWidth(p.minSize.width),D?0<t&&i+r+m.padding>p.left+p.minSize.width&&(a=C.y+=I,C.line++,i=C.x=p.left+E(y,w[C.line])):0<t&&a+I>p.top+p.minSize.height&&(i=C.x=i+p.columnWidths[C.line]+m.padding,C.line++,a=C.y=p.top+E(b,v[C.line]));var o,s,c,l,u,f,d,h=A.x(i);!function(e,t,n){if(!(isNaN(x)||x<=0)){S.save();var r=Cr(n.lineWidth,_.borderWidth);if(S.fillStyle=Cr(n.fillStyle,g),S.lineCap=Cr(n.lineCap,_.borderCapStyle),S.lineDashOffset=Cr(n.lineDashOffset,_.borderDashOffset),S.lineJoin=Cr(n.lineJoin,_.borderJoinStyle),S.lineWidth=r,S.strokeStyle=Cr(n.strokeStyle,g),S.setLineDash&&S.setLineDash(Cr(n.lineDash,_.borderDash)),m&&m.usePointStyle){var i=x*Math.SQRT2/2,a=A.xPlus(e,x/2),o=t+T/2;H.canvas.drawPoint(S,n.pointStyle,i,a,o,n.rotation)}else S.fillRect(A.leftForLtr(e,x),t,x,T),0!==r&&S.strokeRect(A.leftForLtr(e,x),t,x,T);S.restore()}}(h,a,e),k[t].left=A.leftForLtr(h,k[t].width),k[t].top=a,o=h,s=a,c=e,l=n,u=T/2,f=A.xPlus(o,x+u),d=s+u,S.fillText(c.text,f,d),c.hidden&&(S.beginPath(),S.lineWidth=2,S.moveTo(f,d),S.lineTo(A.xPlus(f,l),d),S.stroke()),D?C.x+=r+m.padding:C.y+=I}),H.rtl.restoreTextDirection(p.ctx,n.textDirection)}},_getLegendItemAt:function(e,t){var n,r,i;if(e>=this.left&&e<=this.right&&t>=this.top&&t<=this.bottom)for(i=this.legendHitBoxes,n=0;n<i.length;++n)if(e>=(r=i[n]).left&&e<=r.left+r.width&&t>=r.top&&t<=r.top+r.height)return this.legendItems[n];return null},handleEvent:function(e){var t,n=this.options,r="mouseup"===e.type?"click":e.type;if("mousemove"===r){if(!n.onHover&&!n.onLeave)return}else{if("click"!==r)return;if(!n.onClick)return}t=this._getLegendItemAt(e.x,e.y),"click"===r?t&&n.onClick&&n.onClick.call(this,e.native,t):(n.onLeave&&t!==this._hoveredItem&&(this._hoveredItem&&n.onLeave.call(this,e.native,this._hoveredItem),this._hoveredItem=t),n.onHover&&t&&n.onHover.call(this,e.native,t))}});function Tr(e,t){var n=new Sr({ctx:e.ctx,options:t,chart:e});pt.configure(e,n,t),pt.addBox(e,n),e.legend=n}var xr={id:"legend",_element:Sr,beforeInit:function(e){var t=e.options.legend;t&&Tr(e,t)},beforeUpdate:function(e){var t=e.options.legend,n=e.legend;t?(H.mergeIf(t,F.global.legend),n?(pt.configure(e,n,t),n.options=t):Tr(e,t)):n&&(pt.removeBox(e,n),delete e.legend)},afterEvent:function(e,t){var n=e.legend;n&&n.handleEvent(t)}},kr=H.noop;F._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Er=Q.extend({initialize:function(e){H.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:kr,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:kr,beforeSetDimensions:kr,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:kr,beforeBuildLabels:kr,buildLabels:kr,afterBuildLabels:kr,beforeFit:kr,fit:function(){var e,t=this.options,n=this.minSize={},r=this.isHorizontal();t.display?(e=(H.isArray(t.text)?t.text.length:1)*H.options._parseFont(t).lineHeight+2*t.padding,this.width=n.width=r?this.maxWidth:e,this.height=n.height=r?e:this.maxHeight):this.width=n.width=this.height=n.height=0},afterFit:kr,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this.ctx,t=this.options;if(t.display){var n,r,i,a=H.options._parseFont(t),o=a.lineHeight,s=o/2+t.padding,c=0,l=this.top,u=this.left,f=this.bottom,d=this.right;e.fillStyle=H.valueOrDefault(t.fontColor,F.global.defaultFontColor),e.font=a.string,this.isHorizontal()?(r=u+(d-u)/2,i=l+s,n=d-u):(r="left"===t.position?u+s:d-s,i=l+(f-l)/2,n=f-l,c=Math.PI*("left"===t.position?-.5:.5)),e.save(),e.translate(r,i),e.rotate(c),e.textAlign="center",e.textBaseline="middle";var h=t.text;if(H.isArray(h))for(var p=0,m=0;m<h.length;++m)e.fillText(h[m],0,p,n),p+=o;else e.fillText(h,0,0,n);e.restore()}}});function Dr(e,t){var n=new Er({ctx:e.ctx,options:t,chart:e});pt.configure(e,n,t),pt.addBox(e,n),e.titleBlock=n}var Ir={},Pr=vr,Mr=xr,$r={id:"title",_element:Er,beforeInit:function(e){var t=e.options.title;t&&Dr(e,t)},beforeUpdate:function(e){var t=e.options.title,n=e.titleBlock;t?(H.mergeIf(t,F.global.title),n?(pt.configure(e,n,t),n.options=t):Dr(e,t)):n&&(pt.removeBox(e,n),delete e.titleBlock)}};for(var Or in Ir.filler=Pr,Ir.legend=Mr,Ir.title=$r,en.helpers=H,function(){function u(e,t,n){var r;return"string"==typeof e?(r=parseInt(e,10),-1!==e.indexOf("%")&&(r=r/100*t.parentNode[n])):r=e,r}function f(e){return null!=e&&"none"!==e}function t(e,t,n){var r=document.defaultView,i=H._getParentNode(e),a=r.getComputedStyle(e)[t],o=r.getComputedStyle(i)[t],s=f(a),c=f(o),l=Number.POSITIVE_INFINITY;return s||c?Math.min(s?u(a,e,n):l,c?u(o,i,n):l):"none"}H.where=function(e,t){if(H.isArray(e)&&Array.prototype.filter)return e.filter(t);var n=[];return H.each(e,function(e){t(e)&&n.push(e)}),n},H.findIndex=Array.prototype.findIndex?function(e,t,n){return e.findIndex(t,n)}:function(e,t,n){n=void 0===n?e:n;for(var r=0,i=e.length;r<i;++r)if(t.call(n,e[r],r,e))return r;return-1},H.findNextWhere=function(e,t,n){H.isNullOrUndef(n)&&(n=-1);for(var r=n+1;r<e.length;r++){var i=e[r];if(t(i))return i}},H.findPreviousWhere=function(e,t,n){H.isNullOrUndef(n)&&(n=e.length);for(var r=n-1;0<=r;r--){var i=e[r];if(t(i))return i}},H.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},H.almostEquals=function(e,t,n){return Math.abs(e-t)<n},H.almostWhole=function(e,t){var n=Math.round(e);return n-t<=e&&e<=n+t},H.max=function(e){return e.reduce(function(e,t){return isNaN(t)?e:Math.max(e,t)},Number.NEGATIVE_INFINITY)},H.min=function(e){return e.reduce(function(e,t){return isNaN(t)?e:Math.min(e,t)},Number.POSITIVE_INFINITY)},H.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0==(e=+e)||isNaN(e)?e:0<e?1:-1},H.toRadians=function(e){return e*(Math.PI/180)},H.toDegrees=function(e){return e*(180/Math.PI)},H._decimalPlaces=function(e){if(H.isFinite(e)){for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n}},H.getAngleFromPoint=function(e,t){var n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n);return a<-.5*Math.PI&&(a+=2*Math.PI),{angle:a,distance:i}},H.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},H.aliasPixel=function(e){return e%2==0?0:.5},H._alignPixel=function(e,t,n){var r=e.currentDevicePixelRatio,i=n/2;return Math.round((t-i)*r)/r+i},H.splineCurve=function(e,t,n,r){var i=e.skip?t:e,a=t,o=n.skip?t:n,s=Math.sqrt(Math.pow(a.x-i.x,2)+Math.pow(a.y-i.y,2)),c=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),l=s/(s+c),u=c/(s+c),f=r*(l=isNaN(l)?0:l),d=r*(u=isNaN(u)?0:u);return{previous:{x:a.x-f*(o.x-i.x),y:a.y-f*(o.y-i.y)},next:{x:a.x+d*(o.x-i.x),y:a.y+d*(o.y-i.y)}}},H.EPSILON=Number.EPSILON||1e-14,H.splineCurveMonotone=function(e){var t,n,r,i,a,o,s,c,l,u=(e||[]).map(function(e){return{model:e._model,deltaK:0,mK:0}}),f=u.length;for(t=0;t<f;++t)if(!(r=u[t]).model.skip){if(n=0<t?u[t-1]:null,(i=t<f-1?u[t+1]:null)&&!i.model.skip){var d=i.model.x-r.model.x;r.deltaK=0!==d?(i.model.y-r.model.y)/d:0}!n||n.model.skip?r.mK=r.deltaK:!i||i.model.skip?r.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(r.deltaK)?r.mK=0:r.mK=(n.deltaK+r.deltaK)/2}for(t=0;t<f-1;++t)r=u[t],i=u[t+1],r.model.skip||i.model.skip||(H.almostEquals(r.deltaK,0,this.EPSILON)?r.mK=i.mK=0:(a=r.mK/r.deltaK,o=i.mK/r.deltaK,(c=Math.pow(a,2)+Math.pow(o,2))<=9||(s=3/Math.sqrt(c),r.mK=a*s*r.deltaK,i.mK=o*s*r.deltaK)));for(t=0;t<f;++t)(r=u[t]).model.skip||(n=0<t?u[t-1]:null,i=t<f-1?u[t+1]:null,n&&!n.model.skip&&(l=(r.model.x-n.model.x)/3,r.model.controlPointPreviousX=r.model.x-l,r.model.controlPointPreviousY=r.model.y-l*r.mK),i&&!i.model.skip&&(l=(i.model.x-r.model.x)/3,r.model.controlPointNextX=r.model.x+l,r.model.controlPointNextY=r.model.y+l*r.mK))},H.nextItem=function(e,t,n){return n?t>=e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},H.previousItem=function(e,t,n){return n?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},H.niceNum=function(e,t){var n=Math.floor(H.log10(e)),r=e/Math.pow(10,n);return(t?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10)*Math.pow(10,n)},H.requestAnimFrame="undefined"==typeof window?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},H.getRelativePosition=function(e,t){var n,r,i=e.originalEvent||e,a=e.target||e.srcElement,o=a.getBoundingClientRect(),s=i.touches;r=s&&0<s.length?(n=s[0].clientX,s[0].clientY):(n=i.clientX,i.clientY);var c=parseFloat(H.getStyle(a,"padding-left")),l=parseFloat(H.getStyle(a,"padding-top")),u=parseFloat(H.getStyle(a,"padding-right")),f=parseFloat(H.getStyle(a,"padding-bottom")),d=o.right-o.left-c-u,h=o.bottom-o.top-l-f;return{x:n=Math.round((n-o.left-c)/d*a.width/t.currentDevicePixelRatio),y:r=Math.round((r-o.top-l)/h*a.height/t.currentDevicePixelRatio)}},H.getConstraintWidth=function(e){return t(e,"max-width","clientWidth")},H.getConstraintHeight=function(e){return t(e,"max-height","clientHeight")},H._calculatePadding=function(e,t,n){return-1<(t=H.getStyle(e,t)).indexOf("%")?n*parseInt(t,10)/100:parseInt(t,10)},H._getParentNode=function(e){var t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t},H.getMaximumWidth=function(e){var t=H._getParentNode(e);if(!t)return e.clientWidth;var n=t.clientWidth,r=n-H._calculatePadding(t,"padding-left",n)-H._calculatePadding(t,"padding-right",n),i=H.getConstraintWidth(e);return isNaN(i)?r:Math.min(r,i)},H.getMaximumHeight=function(e){var t=H._getParentNode(e);if(!t)return e.clientHeight;var n=t.clientHeight,r=n-H._calculatePadding(t,"padding-top",n)-H._calculatePadding(t,"padding-bottom",n),i=H.getConstraintHeight(e);return isNaN(i)?r:Math.min(r,i)},H.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},H.retinaScale=function(e,t){var n=e.currentDevicePixelRatio=t||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var r=e.canvas,i=e.height,a=e.width;r.height=i*n,r.width=a*n,e.ctx.scale(n,n),r.style.height||r.style.width||(r.style.height=i+"px",r.style.width=a+"px")}},H.fontString=function(e,t,n){return t+" "+e+"px "+n},H.longestText=function(e,t,n,r){var i=(r=r||{}).data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},a=r.garbageCollect=[],r.font=t),e.font=t;var o,s,c,l,u,f=0,d=n.length;for(o=0;o<d;o++)if(null!=(l=n[o])&&!0!==H.isArray(l))f=H.measureText(e,i,a,f,l);else if(H.isArray(l))for(s=0,c=l.length;s<c;s++)null==(u=l[s])||H.isArray(u)||(f=H.measureText(e,i,a,f,u));var h=a.length/2;if(h>n.length){for(o=0;o<h;o++)delete i[a[o]];a.splice(0,h)}return f},H.measureText=function(e,t,n,r,i){var a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),r<a&&(r=a),r},H.numberOfLabelLines=function(e){var t=1;return H.each(e,function(e){H.isArray(e)&&e.length>t&&(t=e.length)}),t},H.color=C?function(e){return e instanceof CanvasGradient&&(e=F.global.defaultColor),C(e)}:function(e){return console.error("Color.js not found!"),e},H.getHoverColor=function(e){return e instanceof CanvasPattern||e instanceof CanvasGradient?e:H.color(e).saturate(.5).darken(.1).rgbString()}}(),en._adapters=rn,en.Animation=Z,en.animationService=J,en.controllers=Xe,en.DatasetController=ie,en.defaults=F,en.Element=Q,en.elements=Ae,en.Interaction=it,en.layouts=pt,en.platform=$t,en.plugins=Ot,en.Scale=vn,en.scaleService=Rt,en.Ticks=an,en.Tooltip=zt,en.helpers.each(ur,function(e,t){en.scaleService.registerScaleType(t,e,e._defaults)}),Ir)Ir.hasOwnProperty(Or)&&en.plugins.register(Ir[Or]);en.platform.initialize();var Rr=en;return"undefined"!=typeof window&&(window.Chart=en),(en.Chart=en).Legend=Ir.legend._element,en.Title=Ir.title._element,en.pluginService=en.plugins,en.PluginBase=en.Element.extend({}),en.canvasHelpers=en.helpers.canvas,en.layoutService=en.layouts,en.LinearScaleBase=Tn,en.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(n){en[n]=function(e,t){return new en(e,en.helpers.merge(t||{},{type:n.charAt(0).toLowerCase()+n.slice(1)}))}}),Rr}),function(e){"use strict";if("object"==typeof exports)module.exports=e("undefined"!=typeof angular?angular:require("angular"),"undefined"!=typeof Chart?Chart:require("chart.js"));else if("function"==typeof define&&define.amd)define(["angular","chart"],e);else{if("undefined"==typeof angular)throw new Error("AngularJS framework needs to be included, see https://angularjs.org/");if("undefined"==typeof Chart)throw new Error("Chart.js library needs to be included, see http://jtblin.github.io/angular-chart.js/");e(angular,Chart)}}(function(M,$){"use strict";$.defaults.global.multiTooltipTemplate="<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>",$.defaults.global.tooltips.mode="label",$.defaults.global.elements.line.borderWidth=2,$.defaults.global.elements.rectangle.borderWidth=2,$.defaults.global.legend.display=!1,$.defaults.global.colors=["#97BBCD","#DCDCDC","#F7464A","#46BFBD","#FDB45C","#949FB1","#4D5360"];var c="object"==typeof window.G_vmlCanvasManager&&null!==window.G_vmlCanvasManager&&"function"==typeof window.G_vmlCanvasManager.initElement;return c&&($.defaults.global.animation=!1),M.module("chart.js",[]).provider("ChartJs",function(){var n={responsive:!0},r={Chart:$,getOptions:function(e){var t=e&&n[e]||{};return M.extend({},n,t)}};this.setOptions=function(e,t){t?n[e]=M.merge(n[e]||{},t):(t=e,n=M.merge(n,t)),M.merge(r.Chart.defaults,n)},this.$get=function(){return r}}).factory("ChartJsFactory",["ChartJs","$timeout",function(T,x){return function(a){return{restrict:"CA",scope:{chartGetColor:"=?",chartType:"=",chartData:"=?",chartLabels:"=?",chartOptions:"=?",chartSeries:"=?",chartColors:"=?",chartClick:"=?",chartHover:"=?",chartDatasetOverride:"=?"},link:function(r,i){function e(e,t){if(!s(e)&&!M.equals(e,t)){var n=a||r.chartType;n&&k(n,r,i)}}c&&window.G_vmlCanvasManager.initElement(i[0]),r.$watch("chartData",function(e,t){if(!e||!e.length||Array.isArray(e[0])&&!e[0].length)return void P(r);var n=a||r.chartType;if(!n)return;if(r.chart&&function(e,n){if(e&&n&&e.length&&n.length)return Array.isArray(e[0])?e.length===n.length&&e.every(function(e,t){return e.length===n[t].length}):0<n.reduce(o,0)&&e.length===n.length;return!1}(e,t))return function(n,e){Array.isArray(e.chartData[0])?e.chart.data.datasets.forEach(function(e,t){e.data=n[t]}):e.chart.data.datasets[0].data=n;e.chart.update(),e.$emit("chart-update",e.chart)}(e,r);k(n,r,i)},!0),r.$watch("chartSeries",e,!0),r.$watch("chartLabels",e,!0),r.$watch("chartOptions",e,!0),r.$watch("chartColors",e,!0),r.$watch("chartDatasetOverride",e,!0),r.$watch("chartType",function(e,t){if(s(e))return;if(M.equals(e,t))return;k(e,r,i)},!1),r.$on("$destroy",function(){P(r)}),r.$on("$resize",function(){r.chart&&r.chart.resize()})}}};function k(e,t,n){var r,i,a=(r=e,i=t,M.extend({},T.getOptions(r),i.chartOptions));if((o=t).chartData&&o.chartData.length&&function(e,t,n,r){if(r.responsive&&0===n[0].clientHeight)return x(function(){k(e,t,n)},50,!1),!1;return!0}(e,t,n,a)){var o,s,c=n[0],l=c.getContext("2d");t.chartGetColor="function"==typeof(s=t).chartGetColor?s.chartGetColor:I;var u,f,d,h,p,m,g,_,b,v,y,w,C,A,S=(g=function(e,t){var n=M.copy(t.chartColors||T.getOptions(e).chartColors||$.defaults.global.colors),r=n.length<t.chartData.length;for(;n.length<t.chartData.length;)n.push(t.chartGetColor());r&&(t.chartColors=n);return n.map(D)}(e,m=t),Array.isArray(m.chartData[0])?(_=m.chartLabels,b=m.chartData,v=m.chartSeries||[],y=g,w=m.chartDatasetOverride,{labels:_,datasets:b.map(function(e,t){var n=M.extend({},y[t],{label:v[t],data:e});return w&&w.length>=t&&M.merge(n,w[t]),n})}):(u=m.chartLabels,f=m.chartData,d=g,h=m.chartDatasetOverride,p={labels:u,datasets:[{data:f,backgroundColor:d.map(function(e){return e.pointBackgroundColor}),hoverBackgroundColor:d.map(function(e){return e.backgroundColor})}]},h&&M.merge(p.datasets[0],h),p));P(t),t.chart=new T.Chart(l,{type:e,data:S,options:a}),t.$emit("chart-create",t.chart),A=t,(C=c).onclick=A.chartClick?E(A,"chartClick",!1):M.noop,C.onmousemove=A.chartHover?E(A,"chartHover",!0):M.noop}}function o(e,t){return e+t}function E(a,o,s){var c={point:void 0,points:void 0};return function(e){var t=a.chart.getElementAtEvent||a.chart.getPointAtEvent,n=a.chart.getElementsAtEvent||a.chart.getPointsAtEvent;if(n){var r=n.call(a.chart,e),i=t?t.call(a.chart,e)[0]:void 0;!1!==s&&(M.equals(c.points,r)||M.equals(c.point,i))||(c.point=i,c.points=r,a[o](r,e,i))}}}function D(e){return"string"==typeof e&&"r"===e[0]?r(function(e){var t=e.match(/^rgba?\(([\d,.]+)\)$/);if(!t)throw new Error("Cannot parse rgb value");return(e=t[1].split(",")).map(Number)}(e)):"string"==typeof e&&"#"===e[0]?r((t=e.substr(1),[(n=parseInt(t,16))>>16&255,n>>8&255,255&n])):"object"==typeof e&&null!==e?e:I();var t,n}function I(){var e=[t(0,255),t(0,255),t(0,255)];return r(e)}function r(e){var t=e[3]||1;return{backgroundColor:n(e=e.slice(0,3),.2),pointBackgroundColor:n(e,t),pointHoverBackgroundColor:n(e,.8),borderColor:n(e,t),pointBorderColor:"#fff",pointHoverBorderColor:n(e,t)}}function t(e,t){return Math.floor(Math.random()*(t-e+1))+e}function n(e,t){return c?"rgb("+e.join(",")+")":"rgba("+e.concat(t).join(",")+")"}function s(e){return!e||Array.isArray(e)&&!e.length||"object"==typeof e&&!Object.keys(e).length}function P(e){e.chart&&(e.chart.destroy(),e.$emit("chart-destroy",e.chart))}}]).directive("chartBase",["ChartJsFactory",function(e){return new e}]).directive("chartLine",["ChartJsFactory",function(e){return new e("line")}]).directive("chartBar",["ChartJsFactory",function(e){return new e("bar")}]).directive("chartHorizontalBar",["ChartJsFactory",function(e){return new e("horizontalBar")}]).directive("chartRadar",["ChartJsFactory",function(e){return new e("radar")}]).directive("chartDoughnut",["ChartJsFactory",function(e){return new e("doughnut")}]).directive("chartPie",["ChartJsFactory",function(e){return new e("pie")}]).directive("chartPolarArea",["ChartJsFactory",function(e){return new e("polarArea")}]).directive("chartBubble",["ChartJsFactory",function(e){return new e("bubble")}]).name}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(e){"use strict";var t=jQuery.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||3<t[0])throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(),function(r){"use strict";r.fn.emulateTransitionEnd=function(e){var t=!1,n=this;r(this).one("bsTransitionEnd",function(){t=!0});return setTimeout(function(){t||r(n).trigger(r.support.transition.end)},e),this},r(function(){r.support.transition=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}(),r.support.transition&&(r.event.special.bsTransitionEnd={bindType:r.support.transition.end,delegateType:r.support.transition.end,handle:function(e){if(r(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(a){"use strict";var t='[data-dismiss="alert"]',o=function(e){a(e).on("click",t,this.close)};o.VERSION="3.4.1",o.TRANSITION_DURATION=150,o.prototype.close=function(e){var t=a(this),n=t.attr("data-target");n||(n=(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]*$)/,"")),n="#"===n?[]:n;var r=a(document).find(n);function i(){r.detach().trigger("closed.bs.alert").remove()}e&&e.preventDefault(),r.length||(r=t.closest(".alert")),r.trigger(e=a.Event("close.bs.alert")),e.isDefaultPrevented()||(r.removeClass("in"),a.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",i).emulateTransitionEnd(o.TRANSITION_DURATION):i())};var e=a.fn.alert;a.fn.alert=function(n){return this.each(function(){var e=a(this),t=e.data("bs.alert");t||e.data("bs.alert",t=new o(this)),"string"==typeof n&&t[n].call(e)})},a.fn.alert.Constructor=o,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",t,o.prototype.close)}(jQuery),function(a){"use strict";var i=function(e,t){this.$element=a(e),this.options=a.extend({},i.DEFAULTS,t),this.isLoading=!1};function n(r){return this.each(function(){var e=a(this),t=e.data("bs.button"),n="object"==typeof r&&r;t||e.data("bs.button",t=new i(this,n)),"toggle"==r?t.toggle():r&&t.setState(r)})}i.VERSION="3.4.1",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text",null==i.resetText&&n.data("resetText",n[r]()),setTimeout(a.proxy(function(){n[r](null==i[e]?this.options[e]:i[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(t).attr(t,t).prop(t,!0)):this.isLoading&&(this.isLoading=!1,n.removeClass(t).removeAttr(t).prop(t,!1))},this),0)},i.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var e=a.fn.button;a.fn.button=n,a.fn.button.Constructor=i,a.fn.button.noConflict=function(){return a.fn.button=e,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(e){var t=a(e.target).closest(".btn");n.call(t,"toggle"),a(e.target).is('input[type="radio"], input[type="checkbox"]')||(e.preventDefault(),t.is("input,button")?t.trigger("focus"):t.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){a(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),function(f){"use strict";var d=function(e,t){this.$element=f(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=t,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",f.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",f.proxy(this.pause,this)).on("mouseleave.bs.carousel",f.proxy(this.cycle,this))};function s(i){return this.each(function(){var e=f(this),t=e.data("bs.carousel"),n=f.extend({},d.DEFAULTS,e.data(),"object"==typeof i&&i),r="string"==typeof i?i:n.slide;t||e.data("bs.carousel",t=new d(this,n)),"number"==typeof i?t.to(i):r?t[r]():n.interval&&t.pause().cycle()})}d.VERSION="3.4.1",d.TRANSITION_DURATION=600,d.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},d.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},d.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(f.proxy(this.next,this),this.options.interval)),this},d.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},d.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t);if(("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap)return t;var r=(n+("prev"==e?-1:1))%this.$items.length;return this.$items.eq(r)},d.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){t.to(e)}):n==e?this.pause().cycle():this.slide(n<e?"next":"prev",this.$items.eq(e))},d.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&f.support.transition&&(this.$element.trigger(f.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},d.prototype.next=function(){if(!this.sliding)return this.slide("next")},d.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},d.prototype.slide=function(e,t){var n=this.$element.find(".item.active"),r=t||this.getItemForDirection(e,n),i=this.interval,a="next"==e?"left":"right",o=this;if(r.hasClass("active"))return this.sliding=!1;var s=r[0],c=f.Event("slide.bs.carousel",{relatedTarget:s,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,i&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=f(this.$indicators.children()[this.getItemIndex(r)]);l&&l.addClass("active")}var u=f.Event("slid.bs.carousel",{relatedTarget:s,direction:a});return f.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),"object"==typeof r&&r.length&&r[0].offsetWidth,n.addClass(a),r.addClass(a),n.one("bsTransitionEnd",function(){r.removeClass([e,a].join(" ")).addClass("active"),n.removeClass(["active",a].join(" ")),o.sliding=!1,setTimeout(function(){o.$element.trigger(u)},0)}).emulateTransitionEnd(d.TRANSITION_DURATION)):(n.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(u)),i&&this.cycle(),this}};var e=f.fn.carousel;f.fn.carousel=s,f.fn.carousel.Constructor=d,f.fn.carousel.noConflict=function(){return f.fn.carousel=e,this};var t=function(e){var t=f(this),n=t.attr("href");n&&(n=n.replace(/.*(?=#[^\s]+$)/,""));var r=t.attr("data-target")||n,i=f(document).find(r);if(i.hasClass("carousel")){var a=f.extend({},i.data(),t.data()),o=t.attr("data-slide-to");o&&(a.interval=!1),s.call(i,a),o&&i.data("bs.carousel").to(o),e.preventDefault()}};f(document).on("click.bs.carousel.data-api","[data-slide]",t).on("click.bs.carousel.data-api","[data-slide-to]",t),f(window).on("load",function(){f('[data-ride="carousel"]').each(function(){var e=f(this);s.call(e,e.data())})})}(jQuery),function(o){"use strict";var s=function(e,t){this.$element=o(e),this.options=o.extend({},s.DEFAULTS,t),this.$trigger=o('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function i(e){var t,n=e.attr("data-target")||(t=e.attr("href"))&&t.replace(/.*(?=#[^\s]+$)/,"");return o(document).find(n)}function c(r){return this.each(function(){var e=o(this),t=e.data("bs.collapse"),n=o.extend({},s.DEFAULTS,e.data(),"object"==typeof r&&r);!t&&n.toggle&&/show|hide/.test(r)&&(n.toggle=!1),t||e.data("bs.collapse",t=new s(this,n)),"string"==typeof r&&t[r]()})}s.VERSION="3.4.1",s.TRANSITION_DURATION=350,s.DEFAULTS={toggle:!0},s.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},s.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,t=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(t&&t.length&&(e=t.data("bs.collapse"))&&e.transitioning)){var n=o.Event("show.bs.collapse");if(this.$element.trigger(n),!n.isDefaultPrevented()){t&&t.length&&(c.call(t,"hide"),e||t.data("bs.collapse",null));var r=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[r](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var i=function(){this.$element.removeClass("collapsing").addClass("collapse in")[r](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!o.support.transition)return i.call(this);var a=o.camelCase(["scroll",r].join("-"));this.$element.one("bsTransitionEnd",o.proxy(i,this)).emulateTransitionEnd(s.TRANSITION_DURATION)[r](this.$element[0][a])}}}},s.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=o.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var t=this.dimension();this.$element[t](this.$element[t]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!o.support.transition)return n.call(this);this.$element[t](0).one("bsTransitionEnd",o.proxy(n,this)).emulateTransitionEnd(s.TRANSITION_DURATION)}}},s.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},s.prototype.getParent=function(){return o(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(o.proxy(function(e,t){var n=o(t);this.addAriaAndCollapsedClass(i(n),n)},this)).end()},s.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var e=o.fn.collapse;o.fn.collapse=c,o.fn.collapse.Constructor=s,o.fn.collapse.noConflict=function(){return o.fn.collapse=e,this},o(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(e){var t=o(this);t.attr("data-target")||e.preventDefault();var n=i(t),r=n.data("bs.collapse")?"toggle":t.data();c.call(n,r)})}(jQuery),function(o){"use strict";var s='[data-toggle="dropdown"]',r=function(e){o(e).on("click.bs.dropdown",this.toggle)};function c(e){var t=e.attr("data-target");t||(t=(t=e.attr("href"))&&/#[A-Za-z]/.test(t)&&t.replace(/.*(?=#[^\s]*$)/,""));var n="#"!==t?o(document).find(t):null;return n&&n.length?n:e.parent()}function a(r){r&&3===r.which||(o(".dropdown-backdrop").remove(),o(s).each(function(){var e=o(this),t=c(e),n={relatedTarget:this};t.hasClass("open")&&(r&&"click"==r.type&&/input|textarea/i.test(r.target.tagName)&&o.contains(t[0],r.target)||(t.trigger(r=o.Event("hide.bs.dropdown",n)),r.isDefaultPrevented()||(e.attr("aria-expanded","false"),t.removeClass("open").trigger(o.Event("hidden.bs.dropdown",n)))))}))}r.VERSION="3.4.1",r.prototype.toggle=function(e){var t=o(this);if(!t.is(".disabled, :disabled")){var n=c(t),r=n.hasClass("open");if(a(),!r){"ontouchstart"in document.documentElement&&!n.closest(".navbar-nav").length&&o(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(o(this)).on("click",a);var i={relatedTarget:this};if(n.trigger(e=o.Event("show.bs.dropdown",i)),e.isDefaultPrevented())return;t.trigger("focus").attr("aria-expanded","true"),n.toggleClass("open").trigger(o.Event("shown.bs.dropdown",i))}return!1}},r.prototype.keydown=function(e){if(/(38|40|27|32)/.test(e.which)&&!/input|textarea/i.test(e.target.tagName)){var t=o(this);if(e.preventDefault(),e.stopPropagation(),!t.is(".disabled, :disabled")){var n=c(t),r=n.hasClass("open");if(!r&&27!=e.which||r&&27==e.which)return 27==e.which&&n.find(s).trigger("focus"),t.trigger("click");var i=n.find(".dropdown-menu li:not(.disabled):visible a");if(i.length){var a=i.index(e.target);38==e.which&&0<a&&a--,40==e.which&&a<i.length-1&&a++,~a||(a=0),i.eq(a).trigger("focus")}}}};var e=o.fn.dropdown;o.fn.dropdown=function(n){return this.each(function(){var e=o(this),t=e.data("bs.dropdown");t||e.data("bs.dropdown",t=new r(this)),"string"==typeof n&&t[n].call(e)})},o.fn.dropdown.Constructor=r,o.fn.dropdown.noConflict=function(){return o.fn.dropdown=e,this},o(document).on("click.bs.dropdown.data-api",a).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",s,r.prototype.toggle).on("keydown.bs.dropdown.data-api",s,r.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",r.prototype.keydown)}(jQuery),function(o){"use strict";var a=function(e,t){this.options=t,this.$body=o(document.body),this.$element=o(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,o.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};function s(r,i){return this.each(function(){var e=o(this),t=e.data("bs.modal"),n=o.extend({},a.DEFAULTS,e.data(),"object"==typeof r&&r);t||e.data("bs.modal",t=new a(this,n)),"string"==typeof r?t[r](i):n.show&&t.show(i)})}a.VERSION="3.4.1",a.TRANSITION_DURATION=300,a.BACKDROP_TRANSITION_DURATION=150,a.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},a.prototype.toggle=function(e){return this.isShown?this.hide():this.show(e)},a.prototype.show=function(n){var r=this,e=o.Event("show.bs.modal",{relatedTarget:n});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',o.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){r.$element.one("mouseup.dismiss.bs.modal",function(e){o(e.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=o.support.transition&&r.$element.hasClass("fade");r.$element.parent().length||r.$element.appendTo(r.$body),r.$element.show().scrollTop(0),r.adjustDialog(),e&&r.$element[0].offsetWidth,r.$element.addClass("in"),r.enforceFocus();var t=o.Event("shown.bs.modal",{relatedTarget:n});e?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(t)}).emulateTransitionEnd(a.TRANSITION_DURATION):r.$element.trigger("focus").trigger(t)}))},a.prototype.hide=function(e){e&&e.preventDefault(),e=o.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),o(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),o.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",o.proxy(this.hideModal,this)).emulateTransitionEnd(a.TRANSITION_DURATION):this.hideModal())},a.prototype.enforceFocus=function(){o(document).off("focusin.bs.modal").on("focusin.bs.modal",o.proxy(function(e){document===e.target||this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger("focus")},this))},a.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",o.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},a.prototype.resize=function(){this.isShown?o(window).on("resize.bs.modal",o.proxy(this.handleUpdate,this)):o(window).off("resize.bs.modal")},a.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.$body.removeClass("modal-open"),e.resetAdjustments(),e.resetScrollbar(),e.$element.trigger("hidden.bs.modal")})},a.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},a.prototype.backdrop=function(e){var t=this,n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=o.support.transition&&n;if(this.$backdrop=o(document.createElement("div")).addClass("modal-backdrop "+n).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",o.proxy(function(e){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;r?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(a.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var i=function(){t.removeBackdrop(),e&&e()};o.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(a.BACKDROP_TRANSITION_DURATION):i()}else e&&e()},a.prototype.handleUpdate=function(){this.adjustDialog()},a.prototype.adjustDialog=function(){var e=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},a.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},a.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth<e,this.scrollbarWidth=this.measureScrollbar()},a.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var i=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",e+i),o(this.fixedContent).each(function(e,t){var n=t.style.paddingRight,r=o(t).css("padding-right");o(t).data("padding-right",n).css("padding-right",parseFloat(r)+i+"px")}))},a.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),o(this.fixedContent).each(function(e,t){var n=o(t).data("padding-right");o(t).removeData("padding-right"),t.style.paddingRight=n||""})},a.prototype.measureScrollbar=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",this.$body.append(e);var t=e.offsetWidth-e.clientWidth;return this.$body[0].removeChild(e),t};var e=o.fn.modal;o.fn.modal=s,o.fn.modal.Constructor=a,o.fn.modal.noConflict=function(){return o.fn.modal=e,this},o(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(e){var t=o(this),n=t.attr("href"),r=t.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,""),i=o(document).find(r),a=i.data("bs.modal")?"toggle":o.extend({remote:!/#/.test(n)&&n},i.data(),t.data());t.is("a")&&e.preventDefault(),i.one("show.bs.modal",function(e){e.isDefaultPrevented()||i.one("hidden.bs.modal",function(){t.is(":visible")&&t.trigger("focus")})}),s.call(i,a,this)})}(jQuery),function(m){"use strict";var r=["sanitize","whiteList","sanitizeFn"],o=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],e={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},s=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,c=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function p(e,t){var n=e.nodeName.toLowerCase();if(-1!==m.inArray(n,t))return-1===m.inArray(n,o)||Boolean(e.nodeValue.match(s)||e.nodeValue.match(c));for(var r=m(t).filter(function(e,t){return t instanceof RegExp}),i=0,a=r.length;i<a;i++)if(n.match(r[i]))return!0;return!1}function i(e,t,n){if(0===e.length)return e;if(n&&"function"==typeof n)return n(e);if(!document.implementation||!document.implementation.createHTMLDocument)return e;var r=document.implementation.createHTMLDocument("sanitization");r.body.innerHTML=e;for(var i=m.map(t,function(e,t){return t}),a=m(r.body).find("*"),o=0,s=a.length;o<s;o++){var c=a[o],l=c.nodeName.toLowerCase();if(-1!==m.inArray(l,i))for(var u=m.map(c.attributes,function(e){return e}),f=[].concat(t["*"]||[],t[l]||[]),d=0,h=u.length;d<h;d++)p(u[d],f)||c.removeAttribute(u[d].nodeName);else c.parentNode.removeChild(c)}return r.body.innerHTML}var g=function(e,t){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",e,t)};g.VERSION="3.4.1",g.TRANSITION_DURATION=150,g.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:e},g.prototype.init=function(e,t,n){if(this.enabled=!0,this.type=e,this.$element=m(t),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&m(document).find(m.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),i=r.length;i--;){var a=r[i];if("click"==a)this.$element.on("click."+this.type,this.options.selector,m.proxy(this.toggle,this));else if("manual"!=a){var o="hover"==a?"mouseenter":"focusin",s="hover"==a?"mouseleave":"focusout";this.$element.on(o+"."+this.type,this.options.selector,m.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,m.proxy(this.leave,this))}}this.options.selector?this._options=m.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},g.prototype.getDefaults=function(){return g.DEFAULTS},g.prototype.getOptions=function(e){var t=this.$element.data();for(var n in t)t.hasOwnProperty(n)&&-1!==m.inArray(n,r)&&delete t[n];return(e=m.extend({},this.getDefaults(),t,e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e.sanitize&&(e.template=i(e.template,e.whiteList,e.sanitizeFn)),e},g.prototype.getDelegateOptions=function(){var n={},r=this.getDefaults();return this._options&&m.each(this._options,function(e,t){r[e]!=t&&(n[e]=t)}),n},g.prototype.enter=function(e){var t=e instanceof this.constructor?e:m(e.currentTarget).data("bs."+this.type);if(t||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),m(e.currentTarget).data("bs."+this.type,t)),e instanceof m.Event&&(t.inState["focusin"==e.type?"focus":"hover"]=!0),t.tip().hasClass("in")||"in"==t.hoverState)t.hoverState="in";else{if(clearTimeout(t.timeout),t.hoverState="in",!t.options.delay||!t.options.delay.show)return t.show();t.timeout=setTimeout(function(){"in"==t.hoverState&&t.show()},t.options.delay.show)}},g.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},g.prototype.leave=function(e){var t=e instanceof this.constructor?e:m(e.currentTarget).data("bs."+this.type);if(t||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),m(e.currentTarget).data("bs."+this.type,t)),e instanceof m.Event&&(t.inState["focusout"==e.type?"focus":"hover"]=!1),!t.isInStateTrue()){if(clearTimeout(t.timeout),t.hoverState="out",!t.options.delay||!t.options.delay.hide)return t.hide();t.timeout=setTimeout(function(){"out"==t.hoverState&&t.hide()},t.options.delay.hide)}},g.prototype.show=function(){var e=m.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var t=m.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!t)return;var n=this,r=this.tip(),i=this.getUID(this.type);this.setContent(),r.attr("id",i),this.$element.attr("aria-describedby",i),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,o=/\s?auto?\s?/i,s=o.test(a);s&&(a=a.replace(o,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(m(document).find(this.options.container)):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),l=r[0].offsetWidth,u=r[0].offsetHeight;if(s){var f=a,d=this.getPosition(this.$viewport);a="bottom"==a&&c.bottom+u>d.bottom?"top":"top"==a&&c.top-u<d.top?"bottom":"right"==a&&c.right+l>d.width?"left":"left"==a&&c.left-l<d.left?"right":a,r.removeClass(f).addClass(a)}var h=this.getCalculatedOffset(a,c,l,u);this.applyPlacement(h,a);var p=function(){var e=n.hoverState;n.$element.trigger("shown.bs."+n.type),n.hoverState=null,"out"==e&&n.leave(n)};m.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",p).emulateTransitionEnd(g.TRANSITION_DURATION):p()}},g.prototype.applyPlacement=function(e,t){var n=this.tip(),r=n[0].offsetWidth,i=n[0].offsetHeight,a=parseInt(n.css("margin-top"),10),o=parseInt(n.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(o)&&(o=0),e.top+=a,e.left+=o,m.offset.setOffset(n[0],m.extend({using:function(e){n.css({top:Math.round(e.top),left:Math.round(e.left)})}},e),0),n.addClass("in");var s=n[0].offsetWidth,c=n[0].offsetHeight;"top"==t&&c!=i&&(e.top=e.top+i-c);var l=this.getViewportAdjustedDelta(t,e,s,c);l.left?e.left+=l.left:e.top+=l.top;var u=/top|bottom/.test(t),f=u?2*l.left-r+s:2*l.top-i+c,d=u?"offsetWidth":"offsetHeight";n.offset(e),this.replaceArrow(f,n[0][d],u)},g.prototype.replaceArrow=function(e,t,n){this.arrow().css(n?"left":"top",50*(1-e/t)+"%").css(n?"top":"left","")},g.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();this.options.html?(this.options.sanitize&&(t=i(t,this.options.whiteList,this.options.sanitizeFn)),e.find(".tooltip-inner").html(t)):e.find(".tooltip-inner").text(t),e.removeClass("fade in top bottom left right")},g.prototype.hide=function(e){var t=this,n=m(this.$tip),r=m.Event("hide.bs."+this.type);function i(){"in"!=t.hoverState&&n.detach(),t.$element&&t.$element.removeAttr("aria-describedby").trigger("hidden.bs."+t.type),e&&e()}if(this.$element.trigger(r),!r.isDefaultPrevented())return n.removeClass("in"),m.support.transition&&n.hasClass("fade")?n.one("bsTransitionEnd",i).emulateTransitionEnd(g.TRANSITION_DURATION):i(),this.hoverState=null,this},g.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},g.prototype.hasContent=function(){return this.getTitle()},g.prototype.getPosition=function(e){var t=(e=e||this.$element)[0],n="BODY"==t.tagName,r=t.getBoundingClientRect();null==r.width&&(r=m.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var i=window.SVGElement&&t instanceof window.SVGElement,a=n?{top:0,left:0}:i?null:e.offset(),o={scroll:n?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},s=n?{width:m(window).width(),height:m(window).height()}:null;return m.extend({},r,o,s,a)},g.prototype.getCalculatedOffset=function(e,t,n,r){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-r,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},g.prototype.getViewportAdjustedDelta=function(e,t,n,r){var i={top:0,left:0};if(!this.$viewport)return i;var a=this.options.viewport&&this.options.viewport.padding||0,o=this.getPosition(this.$viewport);if(/right|left/.test(e)){var s=t.top-a-o.scroll,c=t.top+a-o.scroll+r;s<o.top?i.top=o.top-s:c>o.top+o.height&&(i.top=o.top+o.height-c)}else{var l=t.left-a,u=t.left+a+n;l<o.left?i.left=o.left-l:u>o.right&&(i.left=o.left+o.width-u)}return i},g.prototype.getTitle=function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},g.prototype.getUID=function(e){for(;e+=~~(1e6*Math.random()),document.getElementById(e););return e},g.prototype.tip=function(){if(!this.$tip&&(this.$tip=m(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},g.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},g.prototype.enable=function(){this.enabled=!0},g.prototype.disable=function(){this.enabled=!1},g.prototype.toggleEnabled=function(){this.enabled=!this.enabled},g.prototype.toggle=function(e){var t=this;e&&((t=m(e.currentTarget).data("bs."+this.type))||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),m(e.currentTarget).data("bs."+this.type,t))),e?(t.inState.click=!t.inState.click,t.isInStateTrue()?t.enter(t):t.leave(t)):t.tip().hasClass("in")?t.leave(t):t.enter(t)},g.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide(function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null})},g.prototype.sanitizeHtml=function(e){return i(e,this.options.whiteList,this.options.sanitizeFn)};var t=m.fn.tooltip;m.fn.tooltip=function(r){return this.each(function(){var e=m(this),t=e.data("bs.tooltip"),n="object"==typeof r&&r;!t&&/destroy|hide/.test(r)||(t||e.data("bs.tooltip",t=new g(this,n)),"string"==typeof r&&t[r]())})},m.fn.tooltip.Constructor=g,m.fn.tooltip.noConflict=function(){return m.fn.tooltip=t,this}}(jQuery),function(i){"use strict";var a=function(e,t){this.init("popover",e,t)};if(!i.fn.tooltip)throw new Error("Popover requires tooltip.js");a.VERSION="3.4.1",a.DEFAULTS=i.extend({},i.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),((a.prototype=i.extend({},i.fn.tooltip.Constructor.prototype)).constructor=a).prototype.getDefaults=function(){return a.DEFAULTS},a.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();if(this.options.html){var r=typeof n;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===r&&(n=this.sanitizeHtml(n))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===r?"html":"append"](n)}else e.find(".popover-title").text(t),e.find(".popover-content").children().detach().end().text(n);e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},a.prototype.hasContent=function(){return this.getTitle()||this.getContent()},a.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},a.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var e=i.fn.popover;i.fn.popover=function(r){return this.each(function(){var e=i(this),t=e.data("bs.popover"),n="object"==typeof r&&r;!t&&/destroy|hide/.test(r)||(t||e.data("bs.popover",t=new a(this,n)),"string"==typeof r&&t[r]())})},i.fn.popover.Constructor=a,i.fn.popover.noConflict=function(){return i.fn.popover=e,this}}(jQuery),function(a){"use strict";function i(e,t){this.$body=a(document.body),this.$scrollElement=a(e).is(document.body)?a(window):a(e),this.options=a.extend({},i.DEFAULTS,t),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function t(r){return this.each(function(){var e=a(this),t=e.data("bs.scrollspy"),n="object"==typeof r&&r;t||e.data("bs.scrollspy",t=new i(this,n)),"string"==typeof r&&t[r]()})}i.VERSION="3.4.1",i.DEFAULTS={offset:10},i.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},i.prototype.refresh=function(){var e=this,r="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(r="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=a(this),t=e.data("target")||e.attr("href"),n=/^#./.test(t)&&a(t);return n&&n.length&&n.is(":visible")&&[[n[r]().top+i,t]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},i.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),r=this.options.offset+n-this.$scrollElement.height(),i=this.offsets,a=this.targets,o=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),r<=t)return o!=(e=a[a.length-1])&&this.activate(e);if(o&&t<i[0])return this.activeTarget=null,this.clear();for(e=i.length;e--;)o!=a[e]&&t>=i[e]&&(void 0===i[e+1]||t<i[e+1])&&this.activate(a[e])},i.prototype.activate=function(e){this.activeTarget=e,this.clear();var t=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',n=a(t).parents("li").addClass("active");n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate.bs.scrollspy")},i.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var e=a.fn.scrollspy;a.fn.scrollspy=t,a.fn.scrollspy.Constructor=i,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=e,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var e=a(this);t.call(e,e.data())})})}(jQuery),function(s){"use strict";var o=function(e){this.element=s(e)};function t(n){return this.each(function(){var e=s(this),t=e.data("bs.tab");t||e.data("bs.tab",t=new o(this)),"string"==typeof n&&t[n]()})}o.VERSION="3.4.1",o.TRANSITION_DURATION=150,o.prototype.show=function(){var e=this.element,t=e.closest("ul:not(.dropdown-menu)"),n=e.data("target");if(n||(n=(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var r=t.find(".active:last a"),i=s.Event("hide.bs.tab",{relatedTarget:e[0]}),a=s.Event("show.bs.tab",{relatedTarget:r[0]});if(r.trigger(i),e.trigger(a),!a.isDefaultPrevented()&&!i.isDefaultPrevented()){var o=s(document).find(n);this.activate(e.closest("li"),t),this.activate(o,o.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:r[0]})})}}},o.prototype.activate=function(e,t,n){var r=t.find("> .active"),i=n&&s.support.transition&&(r.length&&r.hasClass("fade")||!!t.find("> .fade").length);function a(){r.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),i?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}r.length&&i?r.one("bsTransitionEnd",a).emulateTransitionEnd(o.TRANSITION_DURATION):a(),r.removeClass("in")};var e=s.fn.tab;s.fn.tab=t,s.fn.tab.Constructor=o,s.fn.tab.noConflict=function(){return s.fn.tab=e,this};var n=function(e){e.preventDefault(),t.call(s(this),"show")};s(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery),function(c){"use strict";var l=function(e,t){this.options=c.extend({},l.DEFAULTS,t);var n=this.options.target===l.DEFAULTS.target?c(this.options.target):c(document).find(this.options.target);this.$target=n.on("scroll.bs.affix.data-api",c.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",c.proxy(this.checkPositionWithEventLoop,this)),this.$element=c(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(r){return this.each(function(){var e=c(this),t=e.data("bs.affix"),n="object"==typeof r&&r;t||e.data("bs.affix",t=new l(this,n)),"string"==typeof r&&t[r]()})}l.VERSION="3.4.1",l.RESET="affix affix-top affix-bottom",l.DEFAULTS={offset:0,target:window},l.prototype.getState=function(e,t,n,r){var i=this.$target.scrollTop(),a=this.$element.offset(),o=this.$target.height();if(null!=n&&"top"==this.affixed)return i<n&&"top";if("bottom"==this.affixed)return null!=n?!(i+this.unpin<=a.top)&&"bottom":!(i+o<=e-r)&&"bottom";var s=null==this.affixed,c=s?i:a.top;return null!=n&&i<=n?"top":null!=r&&e-r<=c+(s?o:t)&&"bottom"},l.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(l.RESET).addClass("affix");var e=this.$target.scrollTop(),t=this.$element.offset();return this.pinnedOffset=t.top-e},l.prototype.checkPositionWithEventLoop=function(){setTimeout(c.proxy(this.checkPosition,this),1)},l.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),t=this.options.offset,n=t.top,r=t.bottom,i=Math.max(c(document).height(),c(document.body).height());"object"!=typeof t&&(r=n=t),"function"==typeof n&&(n=t.top(this.$element)),"function"==typeof r&&(r=t.bottom(this.$element));var a=this.getState(i,e,n,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var o="affix"+(a?"-"+a:""),s=c.Event(o+".bs.affix");if(this.$element.trigger(s),s.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(l.RESET).addClass(o).trigger(o.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:i-e-r})}};var e=c.fn.affix;c.fn.affix=n,c.fn.affix.Constructor=l,c.fn.affix.noConflict=function(){return c.fn.affix=e,this},c(window).on("load",function(){c('[data-spy="affix"]').each(function(){var e=c(this),t=e.data();t.offset=t.offset||{},null!=t.offsetBottom&&(t.offset.bottom=t.offsetBottom),null!=t.offsetTop&&(t.offset.top=t.offsetTop),n.call(e,t)})})}(jQuery),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="monospaced.elastic"),angular.module("monospaced.elastic",[]).constant("msdElasticConfig",{append:""}).directive("msdElastic",["$timeout","$window","msdElasticConfig",function(T,x,k){"use strict";return{require:"ngModel",restrict:"A, C",link:function(a,e,t,n){var o=e[0],s=e;if("TEXTAREA"===o.nodeName&&x.getComputedStyle){s.css({overflow:"hidden","overflow-y":"hidden","word-wrap":"break-word"});var r=o.value;o.value="",o.value=r;var c,l,u=t.msdElastic?t.msdElastic.replace(/\\n/g,"\n"):k.append,i=angular.element(x),f="position: absolute; top: -999px; right: auto; bottom: auto;left: 0; overflow: hidden; -webkit-box-sizing: content-box;-moz-box-sizing: content-box; box-sizing: content-box;min-height: 0 !important; height: 0 !important; padding: 0;word-wrap: break-word; border: 0;",d=angular.element('<textarea aria-hidden="true" tabindex="-1" style="'+f+'"/>').data("elastic",!0),h=d[0],p=getComputedStyle(o),m=p.getPropertyValue("resize"),g="border-box"===p.getPropertyValue("box-sizing")||"border-box"===p.getPropertyValue("-moz-box-sizing")||"border-box"===p.getPropertyValue("-webkit-box-sizing")?{width:parseInt(p.getPropertyValue("border-right-width"),10)+parseInt(p.getPropertyValue("padding-right"),10)+parseInt(p.getPropertyValue("padding-left"),10)+parseInt(p.getPropertyValue("border-left-width"),10),height:parseInt(p.getPropertyValue("border-top-width"),10)+parseInt(p.getPropertyValue("padding-top"),10)+parseInt(p.getPropertyValue("padding-bottom"),10)+parseInt(p.getPropertyValue("border-bottom-width"),10)}:{width:0,height:0},_=parseInt(p.getPropertyValue("min-height"),10),b=parseInt(p.getPropertyValue("height"),10),v=Math.max(_,b)-g.height,y=parseInt(p.getPropertyValue("max-height"),10),w=["font-family","font-size","font-weight","font-style","letter-spacing","line-height","text-transform","word-spacing","text-indent"];s.data("elastic")||(y=y&&0<y?y:9e4,h.parentNode!==document.body&&angular.element(document.body).append(h),s.css({resize:"none"===m||"vertical"===m?"none":"horizontal"}).data("elastic",!0),o.oninput="onpropertychange"in o&&"oninput"in o?o.onkeyup=A:A,i.bind("resize",S),a.$watch(function(){return n.$modelValue},function(e){S()}),a.$on("elastic:adjust",function(){C(),S()}),T(A,0,!1),a.$on("$destroy",function(){d.remove(),i.unbind("resize",S)}))}function C(){var t=f;p=getComputedStyle(c=o),angular.forEach(w,function(e){t+=e+":"+p.getPropertyValue(e)+";"}),h.setAttribute("style",t)}function A(){var e,t,n,r,i;c!==o&&C(),l||(l=!0,h.value=o.value+u,h.style.overflowY=o.style.overflowY,e=""===o.style.height?"auto":parseInt(o.style.height,10),"px"===(t=getComputedStyle(o).getPropertyValue("width")).substr(t.length-2,2)&&(r=parseInt(t,10)-g.width,h.style.width=r+"px"),n=h.scrollHeight,y<n?(n=y,i="scroll"):n<v&&(n=v),n+=g.height,o.style.overflowY=i||"hidden",e!==n&&(a.$emit("elastic:resize",s,e,n),o.style.height=n+"px"),T(function(){l=!1},1,!1))}function S(){l=!1,A()}}}}]),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(h,p,m,e){var g=e.has("$animateCss")?e.get("$animateCss"):null;return{link:function(t,n,e){var r=m(e.expanding),i=m(e.expanded),a=m(e.collapsing),o=m(e.collapsed),s=!1,c={},l={};function u(e){return s?{width:e.scrollWidth+"px"}:{height:e.scrollHeight+"px"}}function f(){n.removeClass("collapsing").addClass("collapse").css(c),i(t)}function d(){n.css(l),n.removeClass("collapsing").addClass("collapse"),o(t)}!function(){l=(s=!!("horizontal"in e))?(c={width:""},{width:"0"}):(c={height:""},{height:"0"});t.$eval(e.uibCollapse)||n.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css(c)}(),t.$watch(e.uibCollapse,function(e){e?function(){if(!n.hasClass("collapse")&&!n.hasClass("in"))return d();p.resolve(a(t)).then(function(){n.css(u(n[0])).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),g?g(n,{removeClass:"in",to:l}).start().finally(d):h.removeClass(n,"in",{to:l}).then(d)},angular.noop)}():n.hasClass("collapse")&&n.hasClass("in")||p.resolve(r(t)).then(function(){n.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),g?g(n,{addClass:"in",easing:"ease",css:{overflow:"hidden"},to:u(n[0])}).start().finally(f):h.addClass(n,"in",{css:{overflow:"hidden"},to:u(n[0])}).then(f)},angular.noop)})}}}]),angular.module("ui.bootstrap.tabindex",[]).directive("uibTabindexToggle",function(){return{restrict:"A",link:function(e,t,n){n.$observe("disabled",function(e){n.$set("tabindex",e?-1:null)})}}}),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse","ui.bootstrap.tabindex"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(e,n,r){this.groups=[],this.closeOthers=function(t){(angular.isDefined(n.closeOthers)?e.$eval(n.closeOthers):r.closeOthers)&&angular.forEach(this.groups,function(e){e!==t&&(e.isOpen=!1)})},this.addGroup=function(t){var n=this;this.groups.push(t),t.$on("$destroy",function(e){n.removeGroup(t)})},this.removeGroup=function(e){var t=this.groups.indexOf(e);-1!==t&&this.groups.splice(t,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,restrict:"A",templateUrl:function(e,t){return t.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",panelClass:"@?",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(e){this.heading=e}},link:function(t,n,e,r){n.addClass("panel"),r.addGroup(t),t.openClass=e.openClass||"panel-open",t.panelClass=e.panelClass||"panel-default",t.$watch("isOpen",function(e){n.toggleClass(t.openClass,!!e),e&&r.closeOthers(t)}),t.toggleOpen=function(e){t.isDisabled||e&&32!==e.which||(t.isOpen=!t.isOpen)};var i="accordiongroup-"+t.$id+"-"+Math.floor(1e4*Math.random());t.headingId=i+"-tab",t.panelId=i+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(e,t,n,r,i){r.setHeading(i(e,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(e,n,t,r){e.$watch(function(){return r[t.uibAccordionTransclude]},function(e){if(e){var t=angular.element(n[0].querySelector("uib-accordion-header,data-uib-accordion-header,x-uib-accordion-header,uib\\:accordion-header,[uib-accordion-header],[data-uib-accordion-header],[x-uib-accordion-header]"));t.html(""),t.append(e)}})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$element","$attrs","$interpolate","$timeout",function(e,t,n,r,i){e.closeable=!!n.close,t.addClass("alert"),n.$set("role","alert"),e.closeable&&t.addClass("alert-dismissible");var a=angular.isDefined(n.dismissOnTimeout)?r(n.dismissOnTimeout)(e.$parent):null;a&&i(function(){e.close()},parseInt(a,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",restrict:"A",templateUrl:function(e,t){return t.templateUrl||"uib/template/alert/alert.html"},transclude:!0,scope:{close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(e){this.activeClass=e.activeClass||"active",this.toggleEvent=e.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(s){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(t,n,r,e){var i=e[0],a=e[1],o=s(r.uibUncheckable);n.find("input").css({display:"none"}),a.$render=function(){n.toggleClass(i.activeClass,angular.equals(a.$modelValue,t.$eval(r.uibBtnRadio)))},n.on(i.toggleEvent,function(){if(!r.disabled){var e=n.hasClass(i.activeClass);e&&!angular.isDefined(r.uncheckable)||t.$apply(function(){a.$setViewValue(e?null:t.$eval(r.uibBtnRadio)),a.$render()})}}),r.uibUncheckable&&t.$watch(o,function(e){r.$set("uncheckable",e?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(n,e,t,r){var i=r[0],a=r[1];function o(){return s(t.btnCheckboxTrue,!0)}function s(e,t){return angular.isDefined(e)?n.$eval(e):t}e.find("input").css({display:"none"}),a.$render=function(){e.toggleClass(i.activeClass,angular.equals(a.$modelValue,o()))},e.on(i.toggleEvent,function(){t.disabled||n.$apply(function(){a.$setViewValue(e.hasClass(i.activeClass)?s(t.btnCheckboxFalse,!1):o()),a.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(i,a,t,e,o){var n,r,s=this,c=s.slides=i.slides=[],l="uib-slideDirection",u=i.active,f=!1;function d(e){for(var t=0;t<c.length;t++)c[t].slide.active=t===e}function h(e){for(var t=0;t<c.length;t++)if(c[t].slide===e)return t}function p(){n&&(t.cancel(n),n=null)}function m(){p();var e=+i.interval;!isNaN(e)&&0<e&&(n=t(g,e))}function g(){var e=+i.interval;r&&!isNaN(e)&&0<e&&c.length?i.next():i.pause()}a.addClass("carousel"),s.addSlide=function(e,t){c.push({slide:e,element:t}),c.sort(function(e,t){return+e.slide.index-+t.slide.index}),(e.index===i.active||1===c.length&&!angular.isNumber(i.active))&&(i.$currentTransition&&(i.$currentTransition=null),u=e.index,i.active=e.index,d(u),s.select(c[h(e)]),1===c.length&&i.play())},s.getCurrentIndex=function(){for(var e=0;e<c.length;e++)if(c[e].slide.index===u)return e},s.next=i.next=function(){var e=(s.getCurrentIndex()+1)%c.length;if(0!==e||!i.noWrap())return s.select(c[e],"next");i.pause()},s.prev=i.prev=function(){var e=s.getCurrentIndex()-1<0?c.length-1:s.getCurrentIndex()-1;if(!i.noWrap()||e!==c.length-1)return s.select(c[e],"prev");i.pause()},s.removeSlide=function(e){var t=h(e);c.splice(t,1),0<c.length&&u===t?t>=c.length?(u=c.length-1,d(i.active=u),s.select(c[c.length-1])):(u=t,d(i.active=u),s.select(c[t])):t<u&&(u--,i.active=u),0===c.length&&(u=null,i.active=null)},s.select=i.select=function(e,t){var n=h(e.slide);void 0===t&&(t=n>s.getCurrentIndex()?"next":"prev"),e.slide.index===u||i.$currentTransition||function(e,t,n){if(f)return;if(angular.extend(e,{direction:n}),angular.extend(c[u].slide||{},{direction:n}),o.enabled(a)&&!i.$currentTransition&&c[t].element&&1<s.slides.length){c[t].element.data(l,e.direction);var r=s.getCurrentIndex();angular.isNumber(r)&&c[r].element&&c[r].element.data(l,e.direction),i.$currentTransition=!0,o.on("addClass",c[t].element,function(e,t){"close"===t&&(i.$currentTransition=null,o.off("addClass",e))})}i.active=e.index,u=e.index,d(t),m()}(e.slide,n,t)},i.indexOfSlide=function(e){return+e.slide.index},i.isActive=function(e){return i.active===e.slide.index},i.isPrevDisabled=function(){return 0===i.active&&i.noWrap()},i.isNextDisabled=function(){return i.active===c.length-1&&i.noWrap()},i.pause=function(){i.noPause||(r=!1,p())},i.play=function(){r||(r=!0,m())},a.on("mouseenter",i.pause),a.on("mouseleave",i.play),i.$on("$destroy",function(){f=!0,p()}),i.$watch("noTransition",function(e){o.enabled(a,!e)}),i.$watch("interval",m),i.$watchCollection("slides",function(e){e.length||(i.$currentTransition=null)}),i.$watch("active",function(e){if(angular.isNumber(e)&&u!==e){for(var t=0;t<c.length;t++)if(c[t].slide.index===e){e=t;break}c[e]&&(d(e),s.select(c[e]),u=e)}})}]).directive("uibCarousel",function(){return{transclude:!0,controller:"UibCarouselController",controllerAs:"carousel",restrict:"A",templateUrl:function(e,t){return t.templateUrl||"uib/template/carousel/carousel.html"},scope:{active:"=",interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",["$animate",function(i){return{require:"^uibCarousel",restrict:"A",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/carousel/slide.html"},scope:{actual:"=?",index:"=?"},link:function(e,t,n,r){t.addClass("item"),r.addSlide(e,t),e.$on("$destroy",function(){r.removeSlide(e)}),e.$watch("active",function(e){i[e?"addClass":"removeClass"](t,"active")})}}}]).animation(".item",["$animateCss",function(o){var s="uib-slideDirection";function c(e,t,n){e.removeClass(t),n&&n()}return{beforeAddClass:function(e,t,n){if("active"===t){var r=e.data(s),i="next"===r?"left":"right",a=c.bind(this,e,i+" "+r,n);return e.addClass(r),o(e,{addClass:i}).start().done(a),function(){!0}}n()},beforeRemoveClass:function(e,t,n){if("active"===t){var r="next"===e.data(s)?"left":"right",i=c.bind(this,e,r,n);return o(e,{addClass:r}).start().done(i),function(){!0}}n()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter","filterFilter",function(m,g,n,_,t){var b,v,y=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;function r(e){return t(v,{key:e},!0)[0]}function a(e,t,n){return function(){return e.substr(t+1,n-t-1)}}function o(e,t){for(var n=e.substr(t),r=0;r<v.length;r++)if(new RegExp("^"+v[r].key).test(n)){var i=v[r];return{endIdx:t+i.key.length,parser:i.formatter}}return{endIdx:t+1,parser:function(){return n.charAt(0)}}}function s(e){return parseInt(e,10)}function i(e,t){e=e.replace(/:/g,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function c(e,t){return(e=new Date(e.getTime())).setMinutes(e.getMinutes()+t),e}function l(e,t,n){n=n?-1:1;var r=e.getTimezoneOffset();return c(e,n*(i(t,r)-r))}this.init=function(){b=g.id,this.parsers={},this.formatters={},v=[{key:"yyyy",regex:"\\d{4}",apply:function(e){this.year=+e},formatter:function(e){var t=new Date;return t.setFullYear(Math.abs(e.getFullYear())),n(t,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(e){e=+e,this.year=e<69?e+2e3:e+1900},formatter:function(e){var t=new Date;return t.setFullYear(Math.abs(e.getFullYear())),n(t,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(e){this.year=+e},formatter:function(e){var t=new Date;return t.setFullYear(Math.abs(e.getFullYear())),n(t,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(e){this.month=e-1},formatter:function(e){var t=e.getMonth();return/^[0-9]$/.test(t)?n(e,"MM"):n(e,"M")}},{key:"MMMM",regex:g.DATETIME_FORMATS.MONTH.join("|"),apply:function(e){this.month=g.DATETIME_FORMATS.MONTH.indexOf(e)},formatter:function(e){return n(e,"MMMM")}},{key:"MMM",regex:g.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(e){this.month=g.DATETIME_FORMATS.SHORTMONTH.indexOf(e)},formatter:function(e){return n(e,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(e){this.month=e-1},formatter:function(e){return n(e,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(e){this.month=e-1},formatter:function(e){return n(e,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e},formatter:function(e){var t=e.getDate();return/^[1-9]$/.test(t)?n(e,"dd"):n(e,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e},formatter:function(e){return n(e,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e},formatter:function(e){return n(e,"d")}},{key:"EEEE",regex:g.DATETIME_FORMATS.DAY.join("|"),formatter:function(e){return n(e,"EEEE")}},{key:"EEE",regex:g.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(e){return n(e,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(e){this.hours=+e},formatter:function(e){return n(e,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(e){this.hours=+e},formatter:function(e){return n(e,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(e){this.hours=+e},formatter:function(e){return n(e,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(e){this.hours=+e},formatter:function(e){return n(e,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(e){this.minutes=+e},formatter:function(e){return n(e,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(e){this.minutes=+e},formatter:function(e){return n(e,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(e){this.milliseconds=+e},formatter:function(e){return n(e,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(e){this.seconds=+e},formatter:function(e){return n(e,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(e){this.seconds=+e},formatter:function(e){return n(e,"s")}},{key:"a",regex:g.DATETIME_FORMATS.AMPMS.join("|"),apply:function(e){12===this.hours&&(this.hours=0),"PM"===e&&(this.hours+=12)},formatter:function(e){return n(e,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(e){var t=e.match(/([+-])(\d{2})(\d{2})/),n=t[1],r=t[2],i=t[3];this.hours+=s(n+r),this.minutes+=s(n+i)},formatter:function(e){return n(e,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(e){return n(e,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(e){return n(e,"w")}},{key:"GGGG",regex:g.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(e){return n(e,"GGGG")}},{key:"GGG",regex:g.DATETIME_FORMATS.ERAS.join("|"),formatter:function(e){return n(e,"GGG")}},{key:"GG",regex:g.DATETIME_FORMATS.ERAS.join("|"),formatter:function(e){return n(e,"GG")}},{key:"G",regex:g.DATETIME_FORMATS.ERAS.join("|"),formatter:function(e){return n(e,"G")}}],1<=angular.version.major&&4<angular.version.minor&&v.push({key:"LLLL",regex:g.DATETIME_FORMATS.STANDALONEMONTH.join("|"),apply:function(e){this.month=g.DATETIME_FORMATS.STANDALONEMONTH.indexOf(e)},formatter:function(e){return n(e,"LLLL")}})},this.init(),this.getParser=function(e){var t=r(e);return t&&t.apply||null},this.overrideParser=function(e,t){var n=r(e);n&&angular.isFunction(t)&&(this.parsers={},n.apply=t)}.bind(this),this.filter=function(n,e){return angular.isDate(n)&&!isNaN(n)&&e?(e=g.DATETIME_FORMATS[e]||e,g.id!==b&&this.init(),this.formatters[e]||(this.formatters[e]=function(e){for(var t,n,r=[],i=0;i<e.length;)if(angular.isNumber(n)){if("'"===e.charAt(i))(i+1>=e.length||"'"!==e.charAt(i+1))&&(r.push(a(e,n,i)),n=null);else if(i===e.length)for(;n<e.length;)t=o(e,n),r.push(t),n=t.endIdx;i++}else"'"!==e.charAt(i)?(t=o(e,i),r.push(t.parser),i=t.endIdx):(n=i,i++);return r}(e)),this.formatters[e].reduce(function(e,t){return e+t(n)},"")):""},this.parse=function(e,t,n){if(!angular.isString(e)||!t)return e;t=(t=g.DATETIME_FORMATS[t]||t).replace(y,"\\$&"),g.id!==b&&this.init(),this.parsers[t]||(this.parsers[t]=function(i){var a=[],o=i.split(""),e=i.indexOf("'");if(-1<e){var t=!1;i=i.split("");for(var n=e;n<i.length;n++)t?("'"===i[n]&&(n+1<i.length&&"'"===i[n+1]?(i[n+1]="$",o[n+1]=""):(o[n]="",t=!1)),i[n]="$"):"'"===i[n]&&(i[n]="$",t=!(o[n]=""));i=i.join("")}return angular.forEach(v,function(e){var t=i.indexOf(e.key);if(-1<t){i=i.split(""),o[t]="("+e.regex+")",i[t]="$";for(var n=t+1,r=t+e.key.length;n<r;n++)o[n]="",i[n]="$";i=i.join(""),a.push({index:t,key:e.key,apply:e.apply,matcher:e.regex})}}),{regex:new RegExp("^"+o.join("")+"$"),map:_(a,"index")}}(t));var r=this.parsers[t],i=r.regex,a=r.map,o=e.match(i),s=!1;if(o&&o.length){var c,l;c=angular.isDate(n)&&!isNaN(n.getTime())?{year:n.getFullYear(),month:n.getMonth(),date:n.getDate(),hours:n.getHours(),minutes:n.getMinutes(),seconds:n.getSeconds(),milliseconds:n.getMilliseconds()}:(n&&m.warn("dateparser:","baseDate is not a valid date"),{year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var u=1,f=o.length;u<f;u++){var d=a[u-1];"Z"===d.matcher&&(s=!0),d.apply&&d.apply.call(c,o[u])}var h=s?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,p=s?Date.prototype.setUTCHours:Date.prototype.setHours;return function(e,t,n){if(n<1)return!1;if(1===t&&28<n)return 29===n&&(e%4==0&&e%100!=0||e%400==0);return 3!==t&&5!==t&&8!==t&&10!==t||n<31}(c.year,c.month,c.date)&&(!angular.isDate(n)||isNaN(n.getTime())||s?(l=new Date(0),h.call(l,c.year,c.month,c.date),p.call(l,c.hours||0,c.minutes||0,c.seconds||0,c.milliseconds||0)):(l=new Date(n),h.call(l,c.year,c.month,c.date),p.call(l,c.hours,c.minutes,c.seconds,c.milliseconds))),l}},this.toTimezone=function(e,t){return e&&t?l(e,t):e},this.fromTimezone=function(e,t){return e&&t?l(e,t,!0):e},this.timezoneToOffset=i,this.addDateMinutes=c,this.convertTimezoneToLocal=l}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(u){var o=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,f=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(e,t){var i=[],s=[],c={},n=t.uibIsClass.match(o),l=n[2],r=n[1].split(",");return function(n,e,t){i.push(n),s.push({scope:n,element:e}),r.forEach(function(e,t){!function(e,t){var n=e.match(f),i=t.$eval(n[1]),r=n[2],a=c[e];if(!a){var o=function(n){var r=null;s.some(function(e){var t=e.scope.$eval(l);if(t===n)return r=e,!0}),a.lastActivated!==r&&(a.lastActivated&&u.removeClass(a.lastActivated.element,i),r&&u.addClass(r.element,i),a.lastActivated=r)};c[e]=a={lastActivated:null,scope:t,watchFn:o,compareWithExp:r,watcher:t.$watch(r,o)}}a.watchFn(t.$eval(r))}(e,n)}),n.$on("$destroy",a)};function a(e){var t=e.targetScope,n=i.indexOf(t);if(i.splice(n,1),s.splice(n,1),i.length){var r=i[0];angular.forEach(c,function(e){e.scope===t&&(e.watcher=r.$watch(e.compareWithExp,e.watchFn),e.scope=r)})}else c={}}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass"]).value("$datepickerSuppressError",!1).value("$datepickerLiteralWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",monthColumns:3,ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$element","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","uibDateParser",function(o,e,t,n,r,i,a,s,c,l,u,f){var d=this,h={$setViewValue:angular.noop},p={},m=[];e.addClass("uib-datepicker"),t.$set("role","application"),o.datepickerOptions||(o.datepickerOptions={}),this.modes=["day","month","year"],["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","maxDate","maxMode","minDate","minMode","monthColumns","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(t){switch(t){case"customClass":case"dateDisabled":o[t]=o.datepickerOptions[t]||angular.noop;break;case"datepickerMode":o.datepickerMode=angular.isDefined(o.datepickerOptions.datepickerMode)?o.datepickerOptions.datepickerMode:c.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":d[t]=angular.isDefined(o.datepickerOptions[t])?r(o.datepickerOptions[t])(o.$parent):c[t];break;case"monthColumns":case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":d[t]=angular.isDefined(o.datepickerOptions[t])?o.datepickerOptions[t]:c[t];break;case"startingDay":angular.isDefined(o.datepickerOptions.startingDay)?d.startingDay=o.datepickerOptions.startingDay:angular.isNumber(c.startingDay)?d.startingDay=c.startingDay:d.startingDay=(i.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":o.$watch("datepickerOptions."+t,function(e){e?angular.isDate(e)?d[t]=f.fromTimezone(new Date(e),p.getOption("timezone")):(l&&a.warn("Literal date support has been deprecated, please switch to date object usage"),d[t]=new Date(s(e,"medium"))):d[t]=c[t]?f.fromTimezone(new Date(c[t]),p.getOption("timezone")):null,d.refreshView()});break;case"maxMode":case"minMode":o.datepickerOptions[t]?o.$watch(function(){return o.datepickerOptions[t]},function(e){d[t]=o[t]=angular.isDefined(e)?e:o.datepickerOptions[t],("minMode"===t&&d.modes.indexOf(o.datepickerOptions.datepickerMode)<d.modes.indexOf(d[t])||"maxMode"===t&&d.modes.indexOf(o.datepickerOptions.datepickerMode)>d.modes.indexOf(d[t]))&&(o.datepickerMode=d[t],o.datepickerOptions.datepickerMode=d[t])}):d[t]=o[t]=c[t]||null}}),o.uniqueId="datepicker-"+o.$id+"-"+Math.floor(1e4*Math.random()),o.disabled=angular.isDefined(t.disabled)||!1,angular.isDefined(t.ngDisabled)&&m.push(o.$parent.$watch(t.ngDisabled,function(e){o.disabled=e,d.refreshView()})),o.isActive=function(e){return 0===d.compare(e.date,d.activeDate)&&(o.activeDateId=e.uid,!0)},this.init=function(e){p=function(e){var t;if(angular.version.minor<6)(t=e.$options||o.datepickerOptions.ngModelOptions||c.ngModelOptions||{}).getOption=function(e){return t[e]};else{var n=e.$options.getOption("timezone")||(o.datepickerOptions.ngModelOptions?o.datepickerOptions.ngModelOptions.timezone:null)||(c.ngModelOptions?c.ngModelOptions.timezone:null);t=e.$options.createChild(c.ngModelOptions).createChild(o.datepickerOptions.ngModelOptions).createChild(e.$options).createChild({timezone:n})}return t}(h=e),o.datepickerOptions.initDate?(d.activeDate=f.fromTimezone(o.datepickerOptions.initDate,p.getOption("timezone"))||new Date,o.$watch("datepickerOptions.initDate",function(e){e&&(h.$isEmpty(h.$modelValue)||h.$invalid)&&(d.activeDate=f.fromTimezone(e,p.getOption("timezone")),d.refreshView())})):d.activeDate=new Date;var t=h.$modelValue?new Date(h.$modelValue):new Date;this.activeDate=isNaN(t)?f.fromTimezone(new Date,p.getOption("timezone")):f.fromTimezone(t,p.getOption("timezone")),h.$render=function(){d.render()}},this.render=function(){if(h.$viewValue){var e=new Date(h.$viewValue);!isNaN(e)?this.activeDate=f.fromTimezone(e,p.getOption("timezone")):u||a.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){o.selectedDt=null,this._refreshView(),o.activeDt&&(o.activeDateId=o.activeDt.uid);var e=h.$viewValue?new Date(h.$viewValue):null;e=f.fromTimezone(e,p.getOption("timezone")),h.$setValidity("dateDisabled",!e||this.element&&!this.isDisabled(e))}},this.createDateObject=function(e,t){var n=h.$viewValue?new Date(h.$viewValue):null;n=f.fromTimezone(n,p.getOption("timezone"));var r=new Date;r=f.fromTimezone(r,p.getOption("timezone"));var i=this.compare(e,r),a={date:e,label:f.filter(e,t),selected:n&&0===this.compare(e,n),disabled:this.isDisabled(e),past:i<0,current:0===i,future:0<i,customClass:this.customClass(e)||null};return n&&0===this.compare(e,n)&&(o.selectedDt=a),d.activeDate&&0===this.compare(a.date,d.activeDate)&&(o.activeDt=a),a},this.isDisabled=function(e){return o.disabled||this.minDate&&this.compare(e,this.minDate)<0||this.maxDate&&0<this.compare(e,this.maxDate)||o.dateDisabled&&o.dateDisabled({date:e,mode:o.datepickerMode})},this.customClass=function(e){return o.customClass({date:e,mode:o.datepickerMode})},this.split=function(e,t){for(var n=[];0<e.length;)n.push(e.splice(0,t));return n},o.select=function(e){if(o.datepickerMode===d.minMode){var t=h.$viewValue?f.fromTimezone(new Date(h.$viewValue),p.getOption("timezone")):new Date(0,0,0,0,0,0,0);t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t=f.toTimezone(t,p.getOption("timezone")),h.$setViewValue(t),h.$render()}else d.activeDate=e,g(d.modes[d.modes.indexOf(o.datepickerMode)-1]),o.$emit("uib:datepicker.mode");o.$broadcast("uib:datepicker.focus")},o.move=function(e){var t=d.activeDate.getFullYear()+e*(d.step.years||0),n=d.activeDate.getMonth()+e*(d.step.months||0);d.activeDate.setFullYear(t,n,1),d.refreshView()},o.toggleMode=function(e){e=e||1,o.datepickerMode===d.maxMode&&1===e||o.datepickerMode===d.minMode&&-1===e||(g(d.modes[d.modes.indexOf(o.datepickerMode)+e]),o.$emit("uib:datepicker.mode"))},o.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};function g(e){o.datepickerMode=e,o.datepickerOptions.datepickerMode=e}o.$on("uib:datepicker.focus",function(){d.element[0].focus()}),o.keydown=function(e){var t=o.keys[e.which];if(t&&!e.shiftKey&&!e.altKey&&!o.disabled)if(e.preventDefault(),d.shortcutPropagation||e.stopPropagation(),"enter"===t||"space"===t){if(d.isDisabled(d.activeDate))return;o.select(d.activeDate)}else!e.ctrlKey||"up"!==t&&"down"!==t?(d.handleKeyDown(t,e),d.refreshView()):o.toggleMode("up"===t?1:-1)},e.on("keydown",function(e){o.$apply(function(){o.keydown(e)})}),o.$on("$destroy",function(){for(;m.length;)m.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(d,e,h){var n=[31,28,31,30,31,30,31,31,30,31,30,31];function i(e,t){return 1!==t||e%4!=0||e%100==0&&e%400!=0?n[t]:29}function p(e){var t=new Date(e);t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t)/864e5)/7)+1}this.step={months:1},this.element=e,this.init=function(e){angular.extend(e,this),d.showWeeks=e.showWeeks,e.refreshView()},this.getDates=function(e,t){for(var n,r=new Array(t),i=new Date(e),a=0;a<t;)n=new Date(i),r[a++]=n,i.setDate(i.getDate()+1);return r},this._refreshView=function(){var e=this.activeDate.getFullYear(),t=this.activeDate.getMonth(),n=new Date(this.activeDate);n.setFullYear(e,t,1);var r=this.startingDay-n.getDay(),i=0<r?7-r:-r,a=new Date(n);0<i&&a.setDate(1-i);for(var o=this.getDates(a,42),s=0;s<42;s++)o[s]=angular.extend(this.createDateObject(o[s],this.formatDay),{secondary:o[s].getMonth()!==t,uid:d.uniqueId+"-"+s});d.labels=new Array(7);for(var c=0;c<7;c++)d.labels[c]={abbr:h(o[c].date,this.formatDayHeader),full:h(o[c].date,"EEEE")};if(d.title=h(this.activeDate,this.formatDayTitle),d.rows=this.split(o,7),d.showWeeks){d.weekNumbers=[];for(var l=(11-this.startingDay)%7,u=d.rows.length,f=0;f<u;f++)d.weekNumbers.push(p(d.rows[f][l].date))}},this.compare=function(e,t){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),r=new Date(t.getFullYear(),t.getMonth(),t.getDate());return n.setFullYear(e.getFullYear()),r.setFullYear(t.getFullYear()),n-r},this.handleKeyDown=function(e,t){var n=this.activeDate.getDate();if("left"===e)n-=1;else if("up"===e)n-=7;else if("right"===e)n+=1;else if("down"===e)n+=7;else if("pageup"===e||"pagedown"===e){var r=this.activeDate.getMonth()+("pageup"===e?-1:1);this.activeDate.setMonth(r,1),n=Math.min(i(this.activeDate.getFullYear(),this.activeDate.getMonth()),n)}else"home"===e?n=1:"end"===e&&(n=i(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(n)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(i,e,a){this.step={years:1},this.element=e,this.init=function(e){angular.extend(e,this),e.refreshView()},this._refreshView=function(){for(var e,t=new Array(12),n=this.activeDate.getFullYear(),r=0;r<12;r++)(e=new Date(this.activeDate)).setFullYear(n,r,1),t[r]=angular.extend(this.createDateObject(e,this.formatMonth),{uid:i.uniqueId+"-"+r});i.title=a(this.activeDate,this.formatMonthTitle),i.rows=this.split(t,this.monthColumns),i.yearHeaderColspan=3<this.monthColumns?this.monthColumns-2:1},this.compare=function(e,t){var n=new Date(e.getFullYear(),e.getMonth()),r=new Date(t.getFullYear(),t.getMonth());return n.setFullYear(e.getFullYear()),r.setFullYear(t.getFullYear()),n-r},this.handleKeyDown=function(e,t){var n=this.activeDate.getMonth();if("left"===e)n-=1;else if("up"===e)n-=this.monthColumns;else if("right"===e)n+=1;else if("down"===e)n+=this.monthColumns;else if("pageup"===e||"pagedown"===e){var r=this.activeDate.getFullYear()+("pageup"===e?-1:1);this.activeDate.setFullYear(r)}else"home"===e?n=0:"end"===e&&(n=11);this.activeDate.setMonth(n)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(i,e,t){var a,o;function s(e){return parseInt((e-1)/o,10)*o+1}this.element=e,this.yearpickerInit=function(){a=this.yearColumns,o=this.yearRows*a,this.step={years:o}},this._refreshView=function(){for(var e,t=new Array(o),n=0,r=s(this.activeDate.getFullYear());n<o;n++)(e=new Date(this.activeDate)).setFullYear(r+n,0,1),t[n]=angular.extend(this.createDateObject(e,this.formatYear),{uid:i.uniqueId+"-"+n});i.title=[t[0].label,t[o-1].label].join(" - "),i.rows=this.split(t,a),i.columns=a},this.compare=function(e,t){return e.getFullYear()-t.getFullYear()},this.handleKeyDown=function(e,t){var n=this.activeDate.getFullYear();"left"===e?n-=1:"up"===e?n-=a:"right"===e?n+=1:"down"===e?n+=a:"pageup"===e||"pagedown"===e?n+=("pageup"===e?-1:1)*o:"home"===e?n=s(this.activeDate.getFullYear()):"end"===e&&(n=s(this.activeDate.getFullYear())+o-1),this.activeDate.setFullYear(n)}}]).directive("uibDatepicker",function(){return{templateUrl:function(e,t){return t.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerOptions:"=?"},require:["uibDatepicker","^ngModel"],restrict:"A",controller:"UibDatepickerController",controllerAs:"datepicker",link:function(e,t,n,r){var i=r[0],a=r[1];i.init(a)}}}).directive("uibDaypicker",function(){return{templateUrl:function(e,t){return t.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],restrict:"A",controller:"UibDaypickerController",link:function(e,t,n,r){var i=r[0];r[1].init(i)}}}).directive("uibMonthpicker",function(){return{templateUrl:function(e,t){return t.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],restrict:"A",controller:"UibMonthpickerController",link:function(e,t,n,r){var i=r[0];r[1].init(i)}}}).directive("uibYearpicker",function(){return{templateUrl:function(e,t){return t.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],restrict:"A",controller:"UibYearpickerController",link:function(e,t,n,r){var i=r[0];angular.extend(i,r[1]),i.yearpickerInit(),i.refreshView()}}}),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(l,p){var r,i,u={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},m={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},o=/(HTML|BODY)/;return{getRawNode:function(e){return e.nodeName?e:e[0]||e},parseStyle:function(e){return e=parseFloat(e),isFinite(e)?e:0},offsetParent:function(e){var t,n=(e=this.getRawNode(e)).offsetParent||l[0].documentElement;for(;n&&n!==l[0].documentElement&&(t=n,"static"===(p.getComputedStyle(t).position||"static"));)n=n.offsetParent;return n||l[0].documentElement},scrollbarWidth:function(e){if(e){if(angular.isUndefined(i)){var t=l.find("body");t.addClass("uib-position-body-scrollbar-measure"),i=p.innerWidth-t[0].clientWidth,i=isFinite(i)?i:0,t.removeClass("uib-position-body-scrollbar-measure")}return i}if(angular.isUndefined(r)){var n=angular.element('<div class="uib-position-scrollbar-measure"></div>');l.find("body").append(n),r=n[0].offsetWidth-n[0].clientWidth,r=isFinite(r)?r:0,n.remove()}return r},scrollbarPadding:function(e){e=this.getRawNode(e);var t=p.getComputedStyle(e),n=this.parseStyle(t.paddingRight),r=this.parseStyle(t.paddingBottom),i=this.scrollParent(e,!1,!0),a=this.scrollbarWidth(o.test(i.tagName));return{scrollbarWidth:a,widthOverflow:i.scrollWidth>i.clientWidth,right:n+a,originalRight:n,heightOverflow:i.scrollHeight>i.clientHeight,bottom:r+a,originalBottom:r}},isScrollable:function(e,t){e=this.getRawNode(e);var n=t?u.hidden:u.normal,r=p.getComputedStyle(e);return n.test(r.overflow+r.overflowY+r.overflowX)},scrollParent:function(e,t,n){e=this.getRawNode(e);var r=t?u.hidden:u.normal,i=l[0].documentElement,a=p.getComputedStyle(e);if(n&&r.test(a.overflow+a.overflowY+a.overflowX))return e;var o="absolute"===a.position,s=e.parentElement||i;if(s===i||"fixed"===a.position)return i;for(;s.parentElement&&s!==i;){var c=p.getComputedStyle(s);if(o&&"static"!==c.position&&(o=!1),!o&&r.test(c.overflow+c.overflowY+c.overflowX))break;s=s.parentElement}return s},position:function(e,t){e=this.getRawNode(e);var n=this.offset(e);if(t){var r=p.getComputedStyle(e);n.top-=this.parseStyle(r.marginTop),n.left-=this.parseStyle(r.marginLeft)}var i=this.offsetParent(e),a={top:0,left:0};return i!==l[0].documentElement&&((a=this.offset(i)).top+=i.clientTop-i.scrollTop,a.left+=i.clientLeft-i.scrollLeft),{width:Math.round(angular.isNumber(n.width)?n.width:e.offsetWidth),height:Math.round(angular.isNumber(n.height)?n.height:e.offsetHeight),top:Math.round(n.top-a.top),left:Math.round(n.left-a.left)}},offset:function(e){var t=(e=this.getRawNode(e)).getBoundingClientRect();return{width:Math.round(angular.isNumber(t.width)?t.width:e.offsetWidth),height:Math.round(angular.isNumber(t.height)?t.height:e.offsetHeight),top:Math.round(t.top+(p.pageYOffset||l[0].documentElement.scrollTop)),left:Math.round(t.left+(p.pageXOffset||l[0].documentElement.scrollLeft))}},viewportOffset:function(e,t,n){n=!1!==n;var r=(e=this.getRawNode(e)).getBoundingClientRect(),i={top:0,left:0,bottom:0,right:0},a=t?l[0].documentElement:this.scrollParent(e),o=a.getBoundingClientRect();if(i.top=o.top+a.clientTop,i.left=o.left+a.clientLeft,a===l[0].documentElement&&(i.top+=p.pageYOffset,i.left+=p.pageXOffset),i.bottom=i.top+a.clientHeight,i.right=i.left+a.clientWidth,n){var s=p.getComputedStyle(a);i.top+=this.parseStyle(s.paddingTop),i.bottom-=this.parseStyle(s.paddingBottom),i.left+=this.parseStyle(s.paddingLeft),i.right-=this.parseStyle(s.paddingRight)}return{top:Math.round(r.top-i.top),bottom:Math.round(i.bottom-r.bottom),left:Math.round(r.left-i.left),right:Math.round(i.right-r.right)}},parsePlacement:function(e){var t=m.auto.test(e);return t&&(e=e.replace(m.auto,"")),(e=e.split("-"))[0]=e[0]||"top",m.primary.test(e[0])||(e[0]="top"),e[1]=e[1]||"center",m.secondary.test(e[1])||(e[1]="center"),e[2]=!!t,e},positionElements:function(e,t,n,r){e=this.getRawNode(e),t=this.getRawNode(t);var i=angular.isDefined(t.offsetWidth)?t.offsetWidth:t.prop("offsetWidth"),a=angular.isDefined(t.offsetHeight)?t.offsetHeight:t.prop("offsetHeight");n=this.parsePlacement(n);var o=r?this.offset(e):this.position(e),s={top:0,left:0,placement:""};if(n[2]){var c=this.viewportOffset(e,r),l=p.getComputedStyle(t),u=i+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),f=a+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)));if(n[0]="top"===n[0]&&f>c.top&&f<=c.bottom?"bottom":"bottom"===n[0]&&f>c.bottom&&f<=c.top?"top":"left"===n[0]&&u>c.left&&u<=c.right?"right":"right"===n[0]&&u>c.right&&u<=c.left?"left":n[0],n[1]="top"===n[1]&&f-o.height>c.bottom&&f-o.height<=c.top?"bottom":"bottom"===n[1]&&f-o.height>c.top&&f-o.height<=c.bottom?"top":"left"===n[1]&&u-o.width>c.right&&u-o.width<=c.left?"right":"right"===n[1]&&u-o.width>c.left&&u-o.width<=c.right?"left":n[1],"center"===n[1])if(m.vertical.test(n[0])){var d=o.width/2-i/2;c.left+d<0&&u-o.width<=c.right?n[1]="left":c.right+d<0&&u-o.width<=c.left&&(n[1]="right")}else{var h=o.height/2-f/2;c.top+h<0&&f-o.height<=c.bottom?n[1]="top":c.bottom+h<0&&f-o.height<=c.top&&(n[1]="bottom")}}switch(n[0]){case"top":s.top=o.top-a;break;case"bottom":s.top=o.top+o.height;break;case"left":s.left=o.left-i;break;case"right":s.left=o.left+o.width}switch(n[1]){case"top":s.top=o.top;break;case"bottom":s.top=o.top+o.height-a;break;case"left":s.left=o.left;break;case"right":s.left=o.left+o.width-i;break;case"center":m.vertical.test(n[0])?s.left=o.left+o.width/2-i/2:s.top=o.top+o.height/2-a/2}return s.top=Math.round(s.top),s.left=Math.round(s.left),s.placement="center"===n[1]?n[0]:n[0]+"-"+n[1],s},adjustTop:function(e,t,n,r){if(-1!==e.indexOf("top")&&n!==r)return{top:t.top-r+"px"}},positionArrow:function(e,t){var n=(e=this.getRawNode(e)).querySelector(".tooltip-inner, .popover-inner");if(n){var r=angular.element(n).hasClass("tooltip-inner"),i=r?e.querySelector(".tooltip-arrow"):e.querySelector(".arrow");if(i){var a={top:"",bottom:"",left:"",right:""};if("center"!==(t=this.parsePlacement(t))[1]){var o="border-"+t[0]+"-width",s=p.getComputedStyle(i)[o],c="border-";m.vertical.test(t[0])?c+=t[0]+"-"+t[1]:c+=t[1]+"-"+t[0],c+="-radius";var l=p.getComputedStyle(r?n:e)[c];switch(t[0]){case"top":a.bottom=r?"0":"-"+s;break;case"bottom":a.top=r?"0":"-"+s;break;case"left":a.right=r?"0":"-"+s;break;case"right":a.left=r?"0":"-"+s}a[t[1]]=l,angular.element(i).css(a)}else angular.element(i).css(a)}}}}}]),angular.module("ui.bootstrap.datepickerPopup",["ui.bootstrap.datepicker","ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepickerPopup/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","$datepickerPopupLiteralWarning",function(i,a,r,t,n,e,o,s,c,l,u,f,d,h,p,m){var g,_,b,v,y,w,C,A,S,T,x,k,E,D=!1,I=[];function P(e){var t=f.parse(e,g,i.date);if(isNaN(t))for(var n=0;n<E.length;n++)if(t=f.parse(e,E[n],i.date),!isNaN(t))return t;return t}function M(e){if(angular.isNumber(e)&&(e=new Date(e)),!e)return null;if(angular.isDate(e)&&!isNaN(e))return e;if(angular.isString(e)){var t=P(e);if(!isNaN(t))return f.toTimezone(t,x.getOption("timezone"))}return x.getOption("allowInvalid")?e:void 0}function $(e,t){var n=e||t;return!r.ngRequired&&!n||(angular.isNumber(n)&&(n=new Date(n)),!n||(!(!angular.isDate(n)||isNaN(n))||!!angular.isString(n)&&!isNaN(P(n))))}function O(e){if(i.isOpen||!i.disabled){var t=k[0],n=a[0].contains(e.target),r=void 0!==t.contains&&t.contains(e.target);!i.isOpen||n||r||i.$apply(function(){i.isOpen=!1})}}function R(e){27===e.which&&i.isOpen?(e.preventDefault(),e.stopPropagation(),i.$apply(function(){i.isOpen=!1}),a[0].focus()):40!==e.which||i.isOpen||(e.preventDefault(),e.stopPropagation(),i.$apply(function(){i.isOpen=!0}))}function N(){if(i.isOpen){var e=angular.element(k[0].querySelector(".uib-datepicker-popup")),t=r.popupPlacement?r.popupPlacement:d.placement,n=l.positionElements(a,e,t,b);e.css({top:n.top+"px",left:n.left+"px"}),e.hasClass("uib-position-measure")&&e.removeClass("uib-position-measure")}}this.init=function(e){if(x=function(e){var t;angular.version.minor<6?(t=angular.isObject(e.$options)?e.$options:{timezone:null}).getOption=function(e){return t[e]}:t=e.$options;return t}(T=e),_=angular.isDefined(r.closeOnDateSelection)?i.$parent.$eval(r.closeOnDateSelection):d.closeOnDateSelection,b=angular.isDefined(r.datepickerAppendToBody)?i.$parent.$eval(r.datepickerAppendToBody):d.appendToBody,v=angular.isDefined(r.onOpenFocus)?i.$parent.$eval(r.onOpenFocus):d.onOpenFocus,y=angular.isDefined(r.datepickerPopupTemplateUrl)?r.datepickerPopupTemplateUrl:d.datepickerPopupTemplateUrl,w=angular.isDefined(r.datepickerTemplateUrl)?r.datepickerTemplateUrl:d.datepickerTemplateUrl,E=angular.isDefined(r.altInputFormats)?i.$parent.$eval(r.altInputFormats):d.altInputFormats,i.showButtonBar=angular.isDefined(r.showButtonBar)?i.$parent.$eval(r.showButtonBar):d.showButtonBar,d.html5Types[r.type]?(g=d.html5Types[r.type],D=!0):(g=r.uibDatepickerPopup||d.datepickerPopup,r.$observe("uibDatepickerPopup",function(e,t){var n=e||d.datepickerPopup;if(n!==g&&(g=n,T.$modelValue=null,!g))throw new Error("uibDatepickerPopup must have a date format specified.")})),!g)throw new Error("uibDatepickerPopup must have a date format specified.");if(D&&r.uibDatepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");(C=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>")).attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":y}),(A=angular.element(C.children()[0])).attr("template-url",w),i.datepickerOptions||(i.datepickerOptions={}),D&&"month"===r.type&&(i.datepickerOptions.datepickerMode="month",i.datepickerOptions.minMode="month"),A.attr("datepicker-options","datepickerOptions"),D?T.$formatters.push(function(e){return i.date=f.fromTimezone(e,x.getOption("timezone")),e}):(T.$$parserName="date",T.$validators.date=$,T.$parsers.unshift(M),T.$formatters.push(function(e){return T.$isEmpty(e)?i.date=e:(angular.isNumber(e)&&(e=new Date(e)),i.date=f.fromTimezone(e,x.getOption("timezone")),f.filter(i.date,g))})),T.$viewChangeListeners.push(function(){i.date=P(T.$viewValue)}),a.on("keydown",R),k=t(C)(i),C.remove(),b?s.find("body").append(k):a.after(k),i.$on("$destroy",function(){for(!0===i.isOpen&&(c.$$phase||i.$apply(function(){i.isOpen=!1})),k.remove(),a.off("keydown",R),s.off("click",O),S&&S.off("scroll",N),angular.element(o).off("resize",N);I.length;)I.shift()()})},i.getText=function(e){return i[e+"Text"]||d[e+"Text"]},i.isDisabled=function(e){"today"===e&&(e=f.fromTimezone(new Date,x.getOption("timezone")));var t={};return angular.forEach(["minDate","maxDate"],function(e){i.datepickerOptions[e]?angular.isDate(i.datepickerOptions[e])?t[e]=new Date(i.datepickerOptions[e]):(m&&n.warn("Literal date support has been deprecated, please switch to date object usage"),t[e]=new Date(u(i.datepickerOptions[e],"medium"))):t[e]=null}),i.datepickerOptions&&t.minDate&&i.compare(e,t.minDate)<0||t.maxDate&&0<i.compare(e,t.maxDate)},i.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate())-new Date(t.getFullYear(),t.getMonth(),t.getDate())},i.dateSelection=function(e){i.date=e;var t=i.date?f.filter(i.date,g):null;a.val(t),T.$setViewValue(t),_&&(i.isOpen=!1,a[0].focus())},i.keydown=function(e){27===e.which&&(e.stopPropagation(),i.isOpen=!1,a[0].focus())},i.select=function(e,t){if(t.stopPropagation(),"today"===e){var n=new Date;angular.isDate(i.date)?(e=new Date(i.date)).setFullYear(n.getFullYear(),n.getMonth(),n.getDate()):(e=f.fromTimezone(n,x.getOption("timezone"))).setHours(0,0,0,0)}i.dateSelection(e)},i.close=function(e){e.stopPropagation(),i.isOpen=!1,a[0].focus()},i.disabled=angular.isDefined(r.disabled)||!1,r.ngDisabled&&I.push(i.$parent.$watch(e(r.ngDisabled),function(e){i.disabled=e})),i.$watch("isOpen",function(e){e?i.disabled?i.isOpen=!1:h(function(){N(),v&&i.$broadcast("uib:datepicker.focus"),s.on("click",O);var e=r.popupPlacement?r.popupPlacement:d.placement;b||l.parsePlacement(e)[2]?(S=S||angular.element(l.scrollParent(a)))&&S.on("scroll",N):S=null,angular.element(o).on("resize",N)},0,!1):(s.off("click",O),S&&S.off("scroll",N),angular.element(o).off("resize",N))}),i.$on("uib:datepicker.mode",function(){h(N,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(e,t,n,r){var i=r[0];r[1].init(i)}}}).directive("uibDatepickerPopupWrap",function(){return{restrict:"A",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(n,r){var i;return function(){var e=this,t=Array.prototype.slice.call(arguments);i&&a.cancel(i),i=a(function(){n.apply(e,t)},r)}}}]),angular.module("ui.bootstrap.multiMap",[]).factory("$$multiMap",function(){return{createNew:function(){var i={};return{entries:function(){return Object.keys(i).map(function(e){return{key:e,value:i[e]}})},get:function(e){return i[e]},hasKey:function(e){return!!i[e]},keys:function(){return Object.keys(i)},put:function(e,t){i[e]||(i[e]=[]),i[e].push(t)},remove:function(e,t){var n=i[e];if(n){var r=n.indexOf(t);-1!==r&&n.splice(r,1),n.length||delete i[e]}}}}}}),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.multiMap","ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope","$$multiMap",function(a,r,e){var o=null,s=e.createNew();this.isOnlyOpen=function(n,e){var t=s.get(e);if(t&&t.reduce(function(e,t){return t.scope===n?t:e},{}))return 1===t.length;return!1},this.open=function(e,t,n){if(o||a.on("click",c),o&&o!==e&&(o.isOpen=!1),o=e,n){var r=s.get(n);if(r)-1===r.map(function(e){return e.scope}).indexOf(e)&&s.put(n,{scope:e});else s.put(n,{scope:e})}},this.close=function(n,e,t){if(o===n&&(a.off("click",c),a.off("keydown",this.keybindFilter),o=null),t){var r=s.get(t);if(r){var i=r.reduce(function(e,t){return t.scope===n?t:e},{});i&&s.remove(t,i)}}};var c=function(e){if(o&&o.isOpen&&!(e&&"disabled"===o.getAutoClose()||e&&3===e.which)){var t=o.getToggleElement();if(!(e&&t&&t[0].contains(e.target))){var n=o.getDropdownElement();e&&"outsideClick"===o.getAutoClose()&&n&&n[0].contains(e.target)||(o.focusToggleElement(),o.isOpen=!1,r.$$phase||o.$apply())}}};this.keybindFilter=function(e){if(o){var t=o.getDropdownElement(),n=o.getToggleElement(),r=t&&t[0].contains(e.target),i=n&&n[0].contains(e.target);27===e.which?(e.stopPropagation(),o.focusToggleElement(),c()):o.isKeynavEnabled()&&-1!==[38,40].indexOf(e.which)&&o.isOpen&&(r||i)&&(e.preventDefault(),e.stopPropagation(),o.focusDropdownEntry(e.which))}}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(g,_,b,v,e,y,w,C,A,S,T){var x,t,k=this,E=g.$new(),D=e.appendToOpenClass,I=e.openClass,P=angular.noop,M=b.onToggle?v(b.onToggle):angular.noop,n=!1,$=A.find("body");function O(){_.append(k.dropdownMenu)}_.addClass("dropdown"),this.init=function(){b.isOpen&&(t=v(b.isOpen),P=t.assign,g.$watch(t,function(e){E.isOpen=!!e})),n=angular.isDefined(b.keyboardNav)},this.toggle=function(e){return E.isOpen=arguments.length?!!e:!E.isOpen,angular.isFunction(P)&&P(E,E.isOpen),E.isOpen},this.isOpen=function(){return E.isOpen},E.getToggleElement=function(){return k.toggleElement},E.getAutoClose=function(){return b.autoClose||"always"},E.getElement=function(){return _},E.isKeynavEnabled=function(){return n},E.focusDropdownEntry=function(e){var t=k.dropdownMenu?angular.element(k.dropdownMenu).find("a"):_.find("ul").eq(0).find("a");switch(e){case 40:angular.isNumber(k.selectedOption)?k.selectedOption=k.selectedOption===t.length-1?k.selectedOption:k.selectedOption+1:k.selectedOption=0;break;case 38:angular.isNumber(k.selectedOption)?k.selectedOption=0===k.selectedOption?0:k.selectedOption-1:k.selectedOption=t.length-1}t[k.selectedOption].focus()},E.getDropdownElement=function(){return k.dropdownMenu},E.focusToggleElement=function(){k.toggleElement&&k.toggleElement[0].focus()},E.$watch("isOpen",function(e,t){var n=null,r=!1;if(angular.isDefined(b.dropdownAppendTo)){var i=v(b.dropdownAppendTo)(E);i&&(n=angular.element(i))}angular.isDefined(b.dropdownAppendToBody)&&(!1!==v(b.dropdownAppendToBody)(E)&&(r=!0));if(r&&!n&&(n=$),n&&k.dropdownMenu&&(e?(n.append(k.dropdownMenu),_.on("$destroy",O)):(_.off("$destroy",O),O())),n&&k.dropdownMenu){var a,o,s,c=C.positionElements(_,k.dropdownMenu,"bottom-left",!0),l=0;if(a={top:c.top+"px",display:e?"block":"none"},(o=k.dropdownMenu.hasClass("dropdown-menu-right"))?(a.left="auto",(s=C.scrollbarPadding(n)).heightOverflow&&s.scrollbarWidth&&(l=s.scrollbarWidth),a.right=window.innerWidth-l-(c.left+_.prop("offsetWidth"))+"px"):(a.left=c.left+"px",a.right="auto"),!r){var u=C.offset(n);a.top=c.top-u.top+"px",o?a.right=window.innerWidth-(c.left-u.left+_.prop("offsetWidth"))+"px":a.left=c.left-u.left+"px"}k.dropdownMenu.css(a)}var f=n||_,d=n?D:I,h=f.hasClass(d),p=y.isOnlyOpen(g,n);h===!e&&w[n?p?"removeClass":"addClass":e?"addClass":"removeClass"](f,d).then(function(){angular.isDefined(e)&&e!==t&&M(g,{open:!!e})});if(e)k.dropdownMenuTemplateUrl?T(k.dropdownMenuTemplateUrl).then(function(e){x=E.$new(),S(e.trim())(x,function(e){var t=e;k.dropdownMenu.replaceWith(t),k.dropdownMenu=t,A.on("keydown",y.keybindFilter)})}):A.on("keydown",y.keybindFilter),E.focusToggleElement(),y.open(E,_,n);else{if(y.close(E,_,n),k.dropdownMenuTemplateUrl){x&&x.$destroy();var m=angular.element('<ul class="dropdown-menu"></ul>');k.dropdownMenu.replaceWith(m),k.dropdownMenu=m}k.selectedOption=null}angular.isFunction(P)&&P(g,e)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(e,t,n,r){r.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(e,t,n,r){if(r&&!angular.isDefined(n.dropdownNested)){t.addClass("dropdown-menu");var i=n.templateUrl;i&&(r.dropdownMenuTemplateUrl=i),r.dropdownMenu||(r.dropdownMenu=t)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(t,n,r,i){if(i){n.addClass("dropdown-toggle"),i.toggleElement=n;var e=function(e){e.preventDefault(),n.hasClass("disabled")||r.disabled||t.$apply(function(){i.toggle()})};n.on("click",e),n.attr({"aria-haspopup":!0,"aria-expanded":!1}),t.$watch(i.isOpen,function(e){n.attr("aria-expanded",!!e)}),t.$on("$destroy",function(){n.off("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var r=[];return{add:function(e,t){r.push({key:e,value:t})},get:function(e){for(var t=0;t<r.length;t++)if(e===r[t].key)return r[t]},keys:function(){for(var e=[],t=0;t<r.length;t++)e.push(r[t].key);return e},top:function(){return r[r.length-1]},remove:function(e){for(var t=-1,n=0;n<r.length;n++)if(e===r[n].key){t=n;break}return r.splice(t,1)[0]},removeTop:function(){return r.pop()},length:function(){return r.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.multiMap","ui.bootstrap.stackedMap","ui.bootstrap.position"]).provider("$uibResolve",function(){var e=this;this.resolver=null,this.setResolver=function(e){this.resolver=e},this.$get=["$injector","$q",function(a,o){var s=e.resolver?a.get(e.resolver):null;return{resolve:function(e,t,n,r){if(s)return s.resolve(e,t,n,r);var i=[];return angular.forEach(e,function(e){angular.isFunction(e)||angular.isArray(e)?i.push(o.resolve(a.invoke(e))):angular.isString(e)?i.push(o.resolve(a.get(e))):i.push(o.resolve(e))}),o.all(i).then(function(n){var r={},i=0;return angular.forEach(e,function(e,t){r[t]=n[i++]}),r})}}}]}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function(o,e,t){return{restrict:"A",compile:function(e,t){return e.addClass(t.backdropClass),n}};function n(r,i,a){a.modalInClass&&(o.addClass(i,a.modalInClass),r.$on(t.NOW_CLOSING_EVENT,function(e,t){var n=t();r.modalOptions.animation?o.removeClass(i,a.modalInClass).then(n):n()}))}}]).directive("uibModalWindow",["$uibModalStack","$q","$animateCss","$document",function(n,a,o,s){return{scope:{index:"@"},restrict:"A",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/modal/window.html"},link:function(t,r,i){r.addClass(i.windowTopClass||""),t.size=i.size,t.close=function(e){var t=n.getTop();t&&t.value.backdrop&&"static"!==t.value.backdrop&&e.target===e.currentTarget&&(e.preventDefault(),e.stopPropagation(),n.dismiss(t.key,"backdrop click"))},r.on("click",t.close),t.$isRendered=!0;var e=a.defer();t.$$postDigest(function(){e.resolve()}),e.promise.then(function(){var e=null;i.modalInClass&&(e=o(r,{addClass:i.modalInClass}).start(),t.$on(n.NOW_CLOSING_EVENT,function(e,t){var n=t();o(r,{removeClass:i.modalInClass}).start().then(n)})),a.when(e).then(function(){var e=n.getTop();if(e&&n.modalRendered(e.key),!s[0].activeElement||!r[0].contains(s[0].activeElement)){var t=r[0].querySelector("[autofocus]");t?t.focus():r[0].focus()}})})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(e,t){t.modalAnimation&&e.addClass(t.uibModalAnimationClass)}}}).directive("uibModalTransclude",["$animate",function(a){return{link:function(e,t,n,r,i){i(e.$parent,function(e){t.empty(),a.enter(e,t)})}}}]).factory("$uibModalStack",["$animate","$animateCss","$document","$compile","$rootScope","$q","$$multiMap","$$stackedMap","$uibPosition",function(c,e,l,u,f,o,t,n,d){var h,p,m,g="modal-open",_=n.createNew(),b=t.createNew(),s={NOW_CLOSING_EVENT:"modal.stack.now-closing"},v=0,y=null,w="data-bootstrap-modal-aria-hidden-count",C=/[A-Z]/g;function A(){for(var e=-1,t=_.keys(),n=0;n<t.length;n++)_.get(t[n]).value.backdrop&&(e=n);return-1<e&&e<v&&(e=v),e}function r(n,e){var r=_.get(n).value,i=r.appendTo;_.remove(n),(y=_.top())&&(v=parseInt(y.value.modalDomEl.attr("index"),10)),a(r.modalDomEl,r.modalScope,function(){var e=r.openedClass||g;b.remove(e,n);var t=b.hasKey(e);i.toggleClass(e,t),!t&&m&&m.heightOverflow&&m.scrollbarWidth&&(m.originalRight?i.css({paddingRight:m.originalRight+"px"}):i.css({paddingRight:""}),m=null),S(!0)},r.closedDeferred),function(){if(h&&-1===A()){a(h,p,function(){null}),p=h=void 0}}(),e&&e.focus?e.focus():i.focus&&i.focus()}function S(e){var t;0<_.length()&&(t=_.top().value).modalDomEl.toggleClass(t.windowTopClass||"",e)}function a(t,n,r,i){var e,a=null;return n.$broadcast(s.NOW_CLOSING_EVENT,function(){return e||(e=o.defer(),a=e.promise),function(){e.resolve()}}),o.when(a).then(function e(){if(e.done)return;e.done=!0;c.leave(t).then(function(){r&&r(),t.remove(),i&&i.resolve()});n.$destroy()})}function i(e){if(e.isDefaultPrevented())return e;var t=_.top();if(t)switch(e.which){case 27:t.value.keyboard&&(e.preventDefault(),f.$apply(function(){s.dismiss(t.key,"escape key press")}));break;case 9:var n=s.loadFocusElementList(t),r=!1;e.shiftKey?(s.isFocusInFirstItem(e,n)||s.isModalFocused(e,t))&&(r=s.focusLastFocusableElement(n)):s.isFocusInLastItem(e,n)&&(r=s.focusFirstFocusableElement(n)),r&&(e.preventDefault(),e.stopPropagation())}}function T(e,t,n){return!e.value.modalScope.$broadcast("modal.closing",t,n).defaultPrevented}function x(){Array.prototype.forEach.call(document.querySelectorAll("["+w+"]"),function(e){var t=parseInt(e.getAttribute(w),10)-1;e.setAttribute(w,t),t||(e.removeAttribute(w),e.removeAttribute("aria-hidden"))})}return f.$watch(A,function(e){p&&(p.index=e)}),l.on("keydown",i),f.$on("$destroy",function(){l.off("keydown",i)}),s.open=function(e,t){var n=l[0].activeElement,r=t.openedClass||g;S(!1),y=_.top(),_.add(e,{deferred:t.deferred,renderDeferred:t.renderDeferred,closedDeferred:t.closedDeferred,modalScope:t.scope,backdrop:t.backdrop,keyboard:t.keyboard,openedClass:t.openedClass,windowTopClass:t.windowTopClass,animation:t.animation,appendTo:t.appendTo}),b.put(r,e);var i,a=t.appendTo,o=A();0<=o&&!h&&((p=f.$new(!0)).modalOptions=t,p.index=o,(h=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>')).attr({class:"modal-backdrop","ng-style":"{'z-index': 1040 + (index && 1 || 0) + index*10}","uib-modal-animation-class":"fade","modal-in-class":"in"}),t.backdropClass&&h.addClass(t.backdropClass),t.animation&&h.attr("modal-animation","true"),u(h)(p),c.enter(h,a),d.isScrollable(a)&&(m=d.scrollbarPadding(a)).heightOverflow&&m.scrollbarWidth&&a.css({paddingRight:m.right+"px"})),t.component?(i=document.createElement(t.component.name.replace(C,function(e,t){return(t?"-":"")+e.toLowerCase()})),(i=angular.element(i)).attr({resolve:"$resolve","modal-instance":"$uibModalInstance",close:"$close($value)",dismiss:"$dismiss($value)"})):i=t.content,v=y?parseInt(y.value.modalDomEl.attr("index"),10)+1:0;var s=angular.element('<div uib-modal-window="modal-window"></div>');s.attr({class:"modal","template-url":t.windowTemplateUrl,"window-top-class":t.windowTopClass,role:"dialog","aria-labelledby":t.ariaLabelledBy,"aria-describedby":t.ariaDescribedBy,size:t.size,index:v,animate:"animate","ng-style":"{'z-index': 1050 + $$topModalIndex*10, display: 'block'}",tabindex:-1,"uib-modal-animation-class":"fade","modal-in-class":"in"}).append(i),t.windowClass&&s.addClass(t.windowClass),t.animation&&s.attr("modal-animation","true"),a.addClass(r),t.scope&&(t.scope.$$topModalIndex=v),c.enter(u(s)(t.scope),a),_.top().value.modalDomEl=s,_.top().value.modalOpener=n,function e(t){if(!t||"BODY"===t[0].tagName)return;n(t).forEach(function(e){var t="true"===e.getAttribute("aria-hidden"),n=parseInt(e.getAttribute(w),10);n||(n=t?1:0),e.setAttribute(w,n+1),e.setAttribute("aria-hidden","true")});return e(t.parent());function n(t){var e=t.parent()?t.parent().children():[];return Array.prototype.filter.call(e,function(e){return e!==t[0]})}}(s)},s.close=function(e,t){var n=_.get(e);return x(),n&&T(n,t,!0)?(n.value.modalScope.$$uibDestructionScheduled=!0,n.value.deferred.resolve(t),r(e,n.value.modalOpener),!0):!n},s.dismiss=function(e,t){var n=_.get(e);return x(),n&&T(n,t,!1)?(n.value.modalScope.$$uibDestructionScheduled=!0,n.value.deferred.reject(t),r(e,n.value.modalOpener),!0):!n},s.dismissAll=function(e){for(var t=this.getTop();t&&this.dismiss(t.key,e);)t=this.getTop()},s.getTop=function(){return _.top()},s.modalRendered=function(e){var t=_.get(e);t&&t.value.renderDeferred.resolve()},s.focusFirstFocusableElement=function(e){return 0<e.length&&(e[0].focus(),!0)},s.focusLastFocusableElement=function(e){return 0<e.length&&(e[e.length-1].focus(),!0)},s.isModalFocused=function(e,t){if(e&&t){var n=t.value.modalDomEl;if(n&&n.length)return(e.target||e.srcElement)===n[0]}return!1},s.isFocusInFirstItem=function(e,t){return 0<t.length&&(e.target||e.srcElement)===t[0]},s.isFocusInLastItem=function(e,t){return 0<t.length&&(e.target||e.srcElement)===t[t.length-1]},s.loadFocusElementList=function(e){if(e){var t=e.value.modalDomEl;if(t&&t.length){var n=t[0].querySelectorAll("a[href], area[href], input:not([disabled]):not([tabindex='-1']), button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']), textarea:not([disabled]):not([tabindex='-1']), iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]");return n?Array.prototype.filter.call(n,function(e){return!!((t=e).offsetWidth||t.offsetHeight||t.getClientRects().length);var t}):n}}},s}]).provider("$uibModal",function(){var b={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(m,i,a,o,g,s,_){var e={};var c=null;return e.getPromiseChain=function(){return c},e.open=function(l){var e,t,n,u=i.defer(),f=i.defer(),d=i.defer(),h=i.defer(),p={result:u.promise,opened:f.promise,closed:d.promise,rendered:h.promise,close:function(e){return _.close(p,e)},dismiss:function(e){return _.dismiss(p,e)}};if((l=angular.extend({},b.options,l)).resolve=l.resolve||{},l.appendTo=l.appendTo||a.find("body").eq(0),!l.appendTo.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");if(!l.component&&!l.template&&!l.templateUrl)throw new Error("One of component or template or templateUrl options is required.");function r(){return e}return e=l.component?i.when(s.resolve(l.resolve,{},null,null)):i.all([(t=l,t.template?i.when(t.template):o(angular.isFunction(t.templateUrl)?t.templateUrl():t.templateUrl)),s.resolve(l.resolve,{},null,null)]),n=c=i.all([c]).then(r,r).then(function(a){var e=l.scope||m,o=e.$new();o.$close=p.close,o.$dismiss=p.dismiss,o.$on("$destroy",function(){o.$$uibDestructionScheduled||o.$dismiss("$uibUnscheduledDestruction")});var t,n,r={scope:o,deferred:u,renderDeferred:h,closedDeferred:d,animation:l.animation,backdrop:l.backdrop,keyboard:l.keyboard,backdropClass:l.backdropClass,windowTopClass:l.windowTopClass,windowClass:l.windowClass,windowTemplateUrl:l.windowTemplateUrl,ariaLabelledBy:l.ariaLabelledBy,ariaDescribedBy:l.ariaDescribedBy,size:l.size,openedClass:l.openedClass,appendTo:l.appendTo},i={},s={};function c(n,e,t,r){n.$scope=o,n.$scope.$resolve={},t?n.$scope.$uibModalInstance=p:n.$uibModalInstance=p;var i=e?a[1]:a;angular.forEach(i,function(e,t){r&&(n[t]=e),n.$scope.$resolve[t]=e})}l.component?(c(i,!1,!0,!1),i.name=l.component,r.component=i):l.controller&&(c(s,!0,!1,!0),n=g(l.controller,s,!0,l.controllerAs),l.controllerAs&&l.bindToController&&((t=n.instance).$close=o.$close,t.$dismiss=o.$dismiss,angular.extend(t,{$resolve:s.$scope.$resolve},e)),t=n(),angular.isFunction(t.$onInit)&&t.$onInit()),l.component||(r.content=a[0]),_.open(p,r),f.resolve(!0)},function(e){f.reject(e),u.reject(e)}).finally(function(){c===n&&(c=null)}),p},e}]};return b}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(e){return{create:function(n,r,i){n.setNumPages=i.numPages?e(i.numPages).assign:angular.noop,n.ngModelCtrl={$setViewValue:angular.noop},n._watchers=[],n.init=function(e,t){n.ngModelCtrl=e,n.config=t,e.$render=function(){n.render()},i.itemsPerPage?n._watchers.push(r.$parent.$watch(i.itemsPerPage,function(e){n.itemsPerPage=parseInt(e,10),r.totalPages=n.calculateTotalPages(),n.updatePage()})):n.itemsPerPage=t.itemsPerPage,r.$watch("totalItems",function(e,t){(angular.isDefined(e)||e!==t)&&(r.totalPages=n.calculateTotalPages(),n.updatePage())})},n.calculateTotalPages=function(){var e=n.itemsPerPage<1?1:Math.ceil(r.totalItems/n.itemsPerPage);return Math.max(e||0,1)},n.render=function(){r.page=parseInt(n.ngModelCtrl.$viewValue,10)||1},r.selectPage=function(e,t){t&&t.preventDefault(),(!r.ngDisabled||!t)&&r.page!==e&&0<e&&e<=r.totalPages&&(t&&t.target&&t.target.blur(),n.ngModelCtrl.$setViewValue(e),n.ngModelCtrl.$render())},r.getText=function(e){return r[e+"Text"]||n.config[e+"Text"]},r.noPrevious=function(){return 1===r.page},r.noNext=function(){return r.page===r.totalPages},n.updatePage=function(){n.setNumPages(r.$parent,r.totalPages),r.page>r.totalPages?r.selectPage(r.totalPages):n.ngModelCtrl.$render()},r.$on("$destroy",function(){for(;n._watchers.length;)n._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(e,t,n,r){e.align=angular.isDefined(t.align)?e.$parent.$eval(t.align):r.align,n.create(this,e,t)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(o){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],restrict:"A",controller:"UibPagerController",controllerAs:"pager",templateUrl:function(e,t){return t.templateUrl||"uib/template/pager/pager.html"},link:function(e,t,n,r){t.addClass("pager");var i=r[0],a=r[1];a&&i.init(a,o)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(t,n,e,r,i){var a=this,p=angular.isDefined(n.maxSize)?t.$parent.$eval(n.maxSize):i.maxSize,m=angular.isDefined(n.rotate)?t.$parent.$eval(n.rotate):i.rotate,g=angular.isDefined(n.forceEllipses)?t.$parent.$eval(n.forceEllipses):i.forceEllipses,_=angular.isDefined(n.boundaryLinkNumbers)?t.$parent.$eval(n.boundaryLinkNumbers):i.boundaryLinkNumbers,b=angular.isDefined(n.pageLabel)?function(e){return t.$parent.$eval(n.pageLabel,{$page:e})}:angular.identity;function v(e,t,n){return{number:e,text:t,active:n}}t.boundaryLinks=angular.isDefined(n.boundaryLinks)?t.$parent.$eval(n.boundaryLinks):i.boundaryLinks,t.directionLinks=angular.isDefined(n.directionLinks)?t.$parent.$eval(n.directionLinks):i.directionLinks,n.$set("role","menu"),r.create(this,t,n),n.maxSize&&a._watchers.push(t.$parent.$watch(e(n.maxSize),function(e){p=parseInt(e,10),a.render()}));var o=this.render;this.render=function(){o(),0<t.page&&t.page<=t.totalPages&&(t.pages=function(e,t){var n=[],r=1,i=t,a=angular.isDefined(p)&&p<t;a&&(m?t<(i=(r=Math.max(e-Math.floor(p/2),1))+p-1)&&(r=(i=t)-p+1):(r=(Math.ceil(e/p)-1)*p+1,i=Math.min(r+p-1,t)));for(var o=r;o<=i;o++){var s=v(o,b(o),o===e);n.push(s)}if(a&&0<p&&(!m||g||_)){if(1<r){if(!_||3<r){var c=v(r-1,"...",!1);n.unshift(c)}if(_){if(3===r){var l=v(2,"2",!1);n.unshift(l)}var u=v(1,"1",!1);n.unshift(u)}}if(i<t){if(!_||i<t-2){var f=v(i+1,"...",!1);n.push(f)}if(_){if(i===t-2){var d=v(t-1,t-1,!1);n.push(d)}var h=v(t,t,!1);n.push(h)}}}return n}(t.page,t.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(e,o){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],restrict:"A",controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(e,t){return t.templateUrl||"uib/template/pagination/pagination.html"},link:function(e,t,n,r){t.addClass("pagination");var i=r[0],a=r[1];a&&i.init(a,o)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){var s={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},l={};this.options=function(e){angular.extend(l,e)},this.setTriggers=function(e){angular.extend(c,e)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,a,W,q,z,o,t,V,n){var Y=n.createNew();function r(e){if(27===e.which){var t=Y.top();t&&(t.value.close(),t=null)}}return q.on("keyup",r),t.$on("$destroy",function(){q.off("keyup",r)}),function(j,B,r,U){function H(e){var t=(e||U.trigger||r).split(" "),n=t.map(function(e){return c[e]||e});return{show:t,hide:n}}U=angular.extend({},s,l,U);var e=j.replace(/[A-Z]/g,function(e,t){return(t?"-":"")+e.toLowerCase()}),t=o.startSymbol(),n=o.endSymbol(),i="<div "+e+'-popup uib-title="'+t+"title"+n+'" '+(U.useContentExp?'content-exp="contentExp()" ':'content="'+t+"content"+n+'" ')+'origin-scope="origScope" class="uib-position-measure '+B+'" tooltip-animation-class="fade"uib-tooltip-classes ng-class="{ in: isOpen }" ></div>';return{compile:function(e,t){var G=a(i);return function(r,a,i,e){var o,t,n,s,c,l,u,f,d=!!angular.isDefined(U.appendToBody)&&U.appendToBody,h=H(void 0),p=angular.isDefined(i[B+"Enable"]),m=r.$new(!0),g=!1,_=!!angular.isDefined(i[B+"IsOpen"])&&V(i[B+"IsOpen"]),b=!!U.useContentExp&&V(i[j]),v=[],y=function(){o&&o.html()&&(l||(l=W(function(){var e=z.positionElements(a,o,m.placement,d),n=angular.isDefined(o.offsetHeight)?o.offsetHeight:o.prop("offsetHeight"),r=d?z.offset(a):z.position(a);o.css({top:e.top+"px",left:e.left+"px"});var i=e.placement.split("-");o.hasClass(i[0])||(o.removeClass(f.split("-")[0]),o.addClass(i[0])),o.hasClass(U.placementClassPrefix+e.placement)||(o.removeClass(U.placementClassPrefix+f),o.addClass(U.placementClassPrefix+e.placement)),u=W(function(){var e=angular.isDefined(o.offsetHeight)?o.offsetHeight:o.prop("offsetHeight"),t=z.adjustTop(i,r,n,e);t&&o.css(t),u=null},0,!1),o.hasClass("uib-position-measure")?(z.positionArrow(o,e.placement),o.removeClass("uib-position-measure")):f!==e.placement&&z.positionArrow(o,e.placement),f=e.placement,l=null},0,!1)))};function w(){m.isOpen?A():C()}function C(){p&&!r.$eval(i[B+"Enable"])||(k(),function(){m.title=i[B+"Title"],m.content=b?b(r):i[j];m.popupClass=i[B+"Class"],m.placement=angular.isDefined(i[B+"Placement"])?i[B+"Placement"]:U.placement;var e=z.parsePlacement(m.placement);f=e[1]?e[0]+"-"+e[1]:e[0];var t=parseInt(i[B+"PopupDelay"],10),n=parseInt(i[B+"PopupCloseDelay"],10);m.popupDelay=isNaN(t)?U.popupDelay:t,m.popupCloseDelay=isNaN(n)?U.popupCloseDelay:n}(),m.popupDelay?s||(s=W(S,m.popupDelay,!1)):S())}function A(){T(),m.popupCloseDelay?c||(c=W(x,m.popupCloseDelay,!1)):x()}function S(){if(T(),k(),!m.content)return angular.noop;!function(){if(o)return;t=m.$new(),o=G(t,function(e){d?q.find("body").append(e):a.after(e)}),Y.add(m,{close:x}),function(){v.length=0,b?(v.push(r.$watch(b,function(e){!(m.content=e)&&m.isOpen&&x()})),v.push(t.$watch(function(){g||(g=!0,t.$$postDigest(function(){g=!1,m&&m.isOpen&&y()}))}))):v.push(i.$observe(j,function(e){!(m.content=e)&&m.isOpen?x():y()}));v.push(i.$observe(B+"Title",function(e){m.title=e,m.isOpen&&y()})),v.push(i.$observe(B+"Placement",function(e){m.placement=e||U.placement,m.isOpen&&y()}))}()}(),m.$evalAsync(function(){D(m.isOpen=!0),y()})}function T(){s&&(W.cancel(s),s=null),l&&(W.cancel(l),l=null)}function x(){m&&m.$evalAsync(function(){m&&(D(m.isOpen=!1),m.animation?n||(n=W(E,150,!1)):E())})}function k(){c&&(W.cancel(c),c=null),n&&(W.cancel(n),n=null)}function E(){T(),k(),v.length&&(angular.forEach(v,function(e){e()}),v.length=0),o&&(o.remove(),o=null,u&&W.cancel(u)),Y.remove(m),t&&(t.$destroy(),t=null)}function D(e){_&&angular.isFunction(_.assign)&&_.assign(r,e)}function I(e){m&&m.isOpen&&o&&(a[0].contains(e.target)||o[0].contains(e.target)||A())}function P(e){27===e.which&&A()}m.origScope=r,m.isOpen=!1,m.contentExp=function(){return m.content},i.$observe("disabled",function(e){e&&T(),e&&m.isOpen&&x()}),_&&r.$watch(_,function(e){m&&!e===m.isOpen&&w()});var M,$,O,R=function(){h.show.forEach(function(e){"outsideClick"===e?a.off("click",w):(a.off(e,C),a.off(e,w)),a.off("keypress",P)}),h.hide.forEach(function(e){"outsideClick"===e?q.off("click",I):a.off(e,A)})};M=[],$=[],O=r.$eval(i[B+"Trigger"]),R(),"none"!==(h=angular.isObject(O)?(Object.keys(O).forEach(function(e){M.push(e),$.push(O[e])}),{show:M,hide:$}):H(O)).show&&h.show.forEach(function(e,t){"outsideClick"===e?(a.on("click",w),q.on("click",I)):e===h.hide[t]?a.on(e,w):e&&(a.on(e,C),a.on(h.hide[t],A)),a.on("keypress",P)});var N,L=r.$eval(i[B+"Animation"]);m.animation=angular.isDefined(L)?!!L:U.animation;var F=B+"AppendToBody";N=F in i&&void 0===i[F]||r.$eval(i[F]),d=angular.isDefined(N)?N:d,r.$on("$destroy",function(){R(),E(),m=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(f,r,d,h){return{link:function(e,a,t){var o,n,s,c=e.$eval(t.tooltipTemplateTranscludeScope),l=0,u=function(){n&&(n.remove(),n=null),o&&(o.$destroy(),o=null),s&&(f.leave(s).then(function(){n=null}),n=s,s=null)};e.$watch(r.parseAsResourceUrl(t.uibTooltipTemplateTransclude),function(r){var i=++l;r?(h(r,!0).then(function(e){if(i===l){var t=c.$new(),n=d(e)(t,function(e){u(),f.enter(e,a)});s=n,(o=t).$emit("$includeContentLoaded",r)}},function(){i===l&&(u(),e.$emit("$includeContentError",r))}),e.$emit("$includeContentRequested",r)):u()}),e.$on("$destroy",u)}}}]).directive("uibTooltipClasses",["$uibPosition",function(i){return{restrict:"A",link:function(e,t,n){if(e.placement){var r=i.parsePlacement(e.placement);t.addClass(r[0])}e.popupClass&&t.addClass(e.popupClass),e.animation&&t.addClass(n.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{restrict:"A",scope:{content:"@"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(e){return e("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{restrict:"A",scope:{contentExp:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(e){return e("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(e){return e("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{restrict:"A",scope:{uibTitle:"@",contentExp:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(e){return e("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&",uibTitle:"@"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(e){return e("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{restrict:"A",scope:{uibTitle:"@",content:"@"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(e){return e("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(e,t,n){var r=this,i=angular.isDefined(t.animate)?e.$parent.$eval(t.animate):n.animate;function a(){return angular.isDefined(e.maxParam)?e.maxParam:n.max}this.bars=[],e.max=a(),this.addBar=function(t,e,n){i||e.css({transition:"none"}),this.bars.push(t),t.max=a(),t.title=n&&angular.isDefined(n.title)?n.title:"progressbar",t.$watch("value",function(e){t.recalculatePercentage()}),t.recalculatePercentage=function(){var e=r.bars.reduce(function(e,t){return t.percent=+(100*t.value/t.max).toFixed(2),e+t.percent},0);100<e&&(t.percent-=e-100)},t.$on("$destroy",function(){e=null,r.removeBar(t)})},this.removeBar=function(e){this.bars.splice(this.bars.indexOf(e),1),this.bars.forEach(function(e){e.recalculatePercentage()})},e.$watch("maxParam",function(e){r.bars.forEach(function(e){e.max=a(),e.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(e,t,n,r){r.addBar(e,t,n)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(e,t,n,r){r.addBar(e,angular.element(t.children()[0]),{title:n.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,enableReset:!0,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(r,i,a){var o={$setViewValue:angular.noop},n=this;this.init=function(e){(o=e).$render=this.render,o.$formatters.push(function(e){return angular.isNumber(e)&&e<<0!==e&&(e=Math.round(e)),e}),this.stateOn=angular.isDefined(i.stateOn)?r.$parent.$eval(i.stateOn):a.stateOn,this.stateOff=angular.isDefined(i.stateOff)?r.$parent.$eval(i.stateOff):a.stateOff,this.enableReset=angular.isDefined(i.enableReset)?r.$parent.$eval(i.enableReset):a.enableReset;var t=angular.isDefined(i.titles)?r.$parent.$eval(i.titles):a.titles;this.titles=angular.isArray(t)&&0<t.length?t:a.titles;var n=angular.isDefined(i.ratingStates)?r.$parent.$eval(i.ratingStates):new Array(angular.isDefined(i.max)?r.$parent.$eval(i.max):a.max);r.range=this.buildTemplateObjects(n)},this.buildTemplateObjects=function(e){for(var t=0,n=e.length;t<n;t++)e[t]=angular.extend({index:t},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(t)},e[t]);return e},this.getTitle=function(e){return e>=this.titles.length?e+1:this.titles[e]},r.rate=function(e){if(!r.readonly&&0<=e&&e<=r.range.length){var t=n.enableReset&&o.$viewValue===e?0:e;o.$setViewValue(t),o.$render()}},r.enter=function(e){r.readonly||(r.value=e),r.onHover({value:e})},r.reset=function(){r.value=o.$viewValue,r.onLeave()},r.onKeydown=function(e){/(37|38|39|40)/.test(e.which)&&(e.preventDefault(),e.stopPropagation(),r.rate(r.value+(38===e.which||39===e.which?1:-1)))},this.render=function(){r.value=o.$viewValue,r.title=n.getTitle(r.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],restrict:"A",scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",link:function(e,t,n,r){var i=r[0],a=r[1];i.init(a)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(e){var a,o,s=this;function c(e){for(var t=0;t<s.tabs.length;t++)if(s.tabs[t].index===e)return t}s.tabs=[],s.select=function(e,t){if(!o){var n=c(a),r=s.tabs[n];if(r){if(r.tab.onDeselect({$event:t,$selectedIndex:e}),t&&t.isDefaultPrevented())return;r.tab.active=!1}var i=s.tabs[e];i?(i.tab.onSelect({$event:t}),i.tab.active=!0,s.active=i.index,a=i.index):!i&&angular.isDefined(a)&&(s.active=null,a=null)}},s.addTab=function(e){if(s.tabs.push({tab:e,index:e.index}),s.tabs.sort(function(e,t){return e.index>t.index?1:e.index<t.index?-1:0}),e.index===s.active||!angular.isDefined(s.active)&&1===s.tabs.length){var t=c(e.index);s.select(t)}},s.removeTab=function(e){for(var t,n=0;n<s.tabs.length;n++)if(s.tabs[n].tab===e){t=n;break}if(s.tabs[t].index===s.active){var r=t===s.tabs.length-1?t-1:t+1%s.tabs.length;s.select(r)}s.tabs.splice(t,1)},e.$watch("tabset.active",function(e){angular.isDefined(e)&&e!==a&&s.select(c(e))}),e.$on("$destroy",function(){o=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{},bindToController:{active:"=?",type:"@"},controller:"UibTabsetController",controllerAs:"tabset",templateUrl:function(e,t){return t.templateUrl||"uib/template/tabs/tabset.html"},link:function(e,t,n){e.vertical=!!angular.isDefined(n.vertical)&&e.$parent.$eval(n.vertical),e.justified=!!angular.isDefined(n.justified)&&e.$parent.$eval(n.justified)}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/tabs/tab.html"},transclude:!0,scope:{heading:"@",index:"=?",classes:"@?",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(r,e,t,i,n){r.disabled=!1,t.disable&&r.$parent.$watch(a(t.disable),function(e){r.disabled=!!e}),angular.isUndefined(t.index)&&(i.tabs&&i.tabs.length?r.index=Math.max.apply(null,i.tabs.map(function(e){return e.index}))+1:r.index=0),angular.isUndefined(t.classes)&&(r.classes=""),r.select=function(e){if(!r.disabled){for(var t,n=0;n<i.tabs.length;n++)if(i.tabs[n].tab===r){t=n;break}i.select(t,e)}},i.addTab(r),r.$on("$destroy",function(){i.removeTab(r)}),r.$transcludeFn=n}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(e,t){e.$watch("headingElement",function(e){e&&(t.html(""),t.append(e))})}}}).directive("uibTabContentTransclude",function(){return{restrict:"A",require:"^uibTabset",link:function(e,n,t){var r=e.$eval(t.uibTabContentTransclude).tab;r.$transcludeFn(r.$parent,function(e){angular.forEach(e,function(e){var t;(t=e).tagName&&(t.hasAttribute("uib-tab-heading")||t.hasAttribute("data-uib-tab-heading")||t.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===t.tagName.toLowerCase()||"data-uib-tab-heading"===t.tagName.toLowerCase()||"x-uib-tab-heading"===t.tagName.toLowerCase()||"uib:tab-heading"===t.tagName.toLowerCase())?r.headingElement=e:n.append(e)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,e,o,t,n,r,s){var c,l,u,i=new Date,f=[],d={$setViewValue:angular.noop},h=angular.isDefined(o.meridians)?a.$parent.$eval(o.meridians):s.meridians||r.DATETIME_FORMATS.AMPMS,p=!angular.isDefined(o.padHours)||a.$parent.$eval(o.padHours);a.tabindex=angular.isDefined(o.tabindex)?o.tabindex:0,e.removeAttr("tabindex"),this.init=function(e,t){(d=e).$render=this.render,d.$formatters.unshift(function(e){return e?new Date(e):null});var n=t.eq(0),r=t.eq(1),i=t.eq(2);c=n.controller("ngModel"),l=r.controller("ngModel"),u=i.controller("ngModel"),(angular.isDefined(o.mousewheel)?a.$parent.$eval(o.mousewheel):s.mousewheel)&&this.setupMousewheelEvents(n,r,i),(angular.isDefined(o.arrowkeys)?a.$parent.$eval(o.arrowkeys):s.arrowkeys)&&this.setupArrowkeyEvents(n,r,i),a.readonlyInput=angular.isDefined(o.readonlyInput)?a.$parent.$eval(o.readonlyInput):s.readonlyInput,this.setupInputEvents(n,r,i)};var m=s.hourStep;o.hourStep&&f.push(a.$parent.$watch(t(o.hourStep),function(e){m=+e}));var g,_,b=s.minuteStep;o.minuteStep&&f.push(a.$parent.$watch(t(o.minuteStep),function(e){b=+e})),f.push(a.$parent.$watch(t(o.min),function(e){var t=new Date(e);g=isNaN(t)?void 0:t})),f.push(a.$parent.$watch(t(o.max),function(e){var t=new Date(e);_=isNaN(t)?void 0:t}));var v=!1;o.ngDisabled&&f.push(a.$parent.$watch(t(o.ngDisabled),function(e){v=e})),a.noIncrementHours=function(){var e=E(i,60*m);return v||_<e||e<i&&e<g},a.noDecrementHours=function(){var e=E(i,60*-m);return v||e<g||i<e&&_<e},a.noIncrementMinutes=function(){var e=E(i,b);return v||_<e||e<i&&e<g},a.noDecrementMinutes=function(){var e=E(i,-b);return v||e<g||i<e&&_<e},a.noIncrementSeconds=function(){var e=D(i,y);return v||_<e||e<i&&e<g},a.noDecrementSeconds=function(){var e=D(i,-y);return v||e<g||i<e&&_<e},a.noToggleMeridian=function(){return i.getHours()<12?v||E(i,720)>_:v||E(i,-720)<g};var y=s.secondStep;function w(){var e=+a.hours;if((a.showMeridian?0<e&&e<13:0<=e&&e<24)&&""!==a.hours)return a.showMeridian&&(12===e&&(e=0),a.meridian===h[1]&&(e+=12)),e}function C(){var e=+a.minutes;if(0<=e&&e<60&&""!==a.minutes)return e}function A(e,t){return null===e?"":angular.isDefined(e)&&e.toString().length<2&&!t?"0"+e:e.toString()}function S(e){T(),d.$setViewValue(new Date(i)),x(e)}function T(){c&&c.$setValidity("hours",!0),l&&l.$setValidity("minutes",!0),u&&u.$setValidity("seconds",!0),d.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function x(e){if(d.$modelValue){var t=i.getHours(),n=i.getMinutes(),r=i.getSeconds();a.showMeridian&&(t=0===t||12===t?12:t%12),a.hours="h"===e?t:A(t,!p),"m"!==e&&(a.minutes=A(n)),a.meridian=i.getHours()<12?h[0]:h[1],"s"!==e&&(a.seconds=A(r)),a.meridian=i.getHours()<12?h[0]:h[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=h[0]}function k(e){i=D(i,e),S()}function E(e,t){return D(e,60*t)}function D(e,t){var n=new Date(e.getTime()+1e3*t),r=new Date(e);return r.setHours(n.getHours(),n.getMinutes(),n.getSeconds()),r}function I(){return(null===a.hours||""===a.hours)&&(null===a.minutes||""===a.minutes)&&(!a.showSeconds||a.showSeconds&&(null===a.seconds||""===a.seconds))}o.secondStep&&f.push(a.$parent.$watch(t(o.secondStep),function(e){y=+e})),a.showSeconds=s.showSeconds,o.showSeconds&&f.push(a.$parent.$watch(t(o.showSeconds),function(e){a.showSeconds=!!e})),a.showMeridian=s.showMeridian,o.showMeridian&&f.push(a.$parent.$watch(t(o.showMeridian),function(e){if(a.showMeridian=!!e,d.$error.time){var t=w(),n=C();angular.isDefined(t)&&angular.isDefined(n)&&(i.setHours(t),S())}else x()})),this.setupMousewheelEvents=function(e,t,n){var r=function(e){e.originalEvent&&(e=e.originalEvent);var t=e.wheelDelta?e.wheelDelta:-e.deltaY;return e.detail||0<t};e.on("mousewheel wheel",function(e){v||a.$apply(r(e)?a.incrementHours():a.decrementHours()),e.preventDefault()}),t.on("mousewheel wheel",function(e){v||a.$apply(r(e)?a.incrementMinutes():a.decrementMinutes()),e.preventDefault()}),n.on("mousewheel wheel",function(e){v||a.$apply(r(e)?a.incrementSeconds():a.decrementSeconds()),e.preventDefault()})},this.setupArrowkeyEvents=function(e,t,n){e.on("keydown",function(e){v||(38===e.which?(e.preventDefault(),a.incrementHours(),a.$apply()):40===e.which&&(e.preventDefault(),a.decrementHours(),a.$apply()))}),t.on("keydown",function(e){v||(38===e.which?(e.preventDefault(),a.incrementMinutes(),a.$apply()):40===e.which&&(e.preventDefault(),a.decrementMinutes(),a.$apply()))}),n.on("keydown",function(e){v||(38===e.which?(e.preventDefault(),a.incrementSeconds(),a.$apply()):40===e.which&&(e.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(e,t,n){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var r=function(e,t,n){d.$setViewValue(null),d.$setValidity("time",!1),angular.isDefined(e)&&(a.invalidHours=e,c&&c.$setValidity("hours",!1)),angular.isDefined(t)&&(a.invalidMinutes=t,l&&l.$setValidity("minutes",!1)),angular.isDefined(n)&&(a.invalidSeconds=n,u&&u.$setValidity("seconds",!1))};a.updateHours=function(){var e=w(),t=C();d.$setDirty(),angular.isDefined(e)&&angular.isDefined(t)?(i.setHours(e),i.setMinutes(t),i<g||_<i?r(!0):S("h")):r(!0)},e.on("blur",function(e){d.$setTouched(),I()?T():null===a.hours||""===a.hours?r(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=A(a.hours,!p)})}),a.updateMinutes=function(){var e=C(),t=w();d.$setDirty(),angular.isDefined(e)&&angular.isDefined(t)?(i.setHours(t),i.setMinutes(e),i<g||_<i?r(void 0,!0):S("m")):r(void 0,!0)},t.on("blur",function(e){d.$setTouched(),I()?T():null===a.minutes?r(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=A(a.minutes)})}),a.updateSeconds=function(){var e,t=0<=(e=+a.seconds)&&e<60?e:void 0;d.$setDirty(),angular.isDefined(t)?(i.setSeconds(t),S("s")):r(void 0,void 0,!0)},n.on("blur",function(e){I()?T():!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=A(a.seconds)})})},this.render=function(){var e=d.$viewValue;isNaN(e)?(d.$setValidity("time",!1),n.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(e&&(i=e),i<g||_<i?(d.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):T(),x())},a.showSpinners=angular.isDefined(o.showSpinners)?a.$parent.$eval(o.showSpinners):s.showSpinners,a.incrementHours=function(){a.noIncrementHours()||k(60*m*60)},a.decrementHours=function(){a.noDecrementHours()||k(60*-m*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||k(60*b)},a.decrementMinutes=function(){a.noDecrementMinutes()||k(60*-b)},a.incrementSeconds=function(){a.noIncrementSeconds()||k(y)},a.decrementSeconds=function(){a.noDecrementSeconds()||k(-y)},a.toggleMeridian=function(){var e=C(),t=w();a.noToggleMeridian()||(angular.isDefined(e)&&angular.isDefined(t)?k(720*(i.getHours()<12?60:-60)):a.meridian=a.meridian===h[0]?h[1]:h[0])},a.blur=function(){d.$setTouched()},a.$on("$destroy",function(){for(;f.length;)f.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(n){return{require:["uibTimepicker","?^ngModel"],restrict:"A",controller:"UibTimepickerController",controllerAs:"timepicker",scope:{},templateUrl:function(e,t){return t.templateUrl||n.templateUrl},link:function(e,t,n,r){var i=r[0],a=r[1];a&&i.init(a,t.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(n){var r=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(e){var t=e.match(r);if(!t)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+e+'".');return{itemName:t[3],source:n(t[4]),viewMapper:n(t[2]||t[1]),modelMapper:n(t[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(l,u,s,e,t,n,c,r,i,a,f,o,d){var h,p,m=[9,13,27,38,40],g=l.$eval(s.typeaheadMinLength);g||0===g||(g=1),l.$watch(s.typeaheadMinLength,function(e){g=e||0===e?e:1});var _=l.$eval(s.typeaheadWaitMs)||0,b=!1!==l.$eval(s.typeaheadEditable);l.$watch(s.typeaheadEditable,function(e){b=!1!==e});var v,y,w=t(s.typeaheadLoading).assign||angular.noop,C=s.typeaheadShouldSelect?t(s.typeaheadShouldSelect):function(e,t){var n=t.$event;return 13===n.which||9===n.which},A=t(s.typeaheadOnSelect),S=!!angular.isDefined(s.typeaheadSelectOnBlur)&&l.$eval(s.typeaheadSelectOnBlur),T=t(s.typeaheadNoResults).assign||angular.noop,x=s.typeaheadInputFormatter?t(s.typeaheadInputFormatter):void 0,k=!!s.typeaheadAppendToBody&&l.$eval(s.typeaheadAppendToBody),E=s.typeaheadAppendTo?l.$eval(s.typeaheadAppendTo):null,D=!1!==l.$eval(s.typeaheadFocusFirst),I=!!s.typeaheadSelectOnExact&&l.$eval(s.typeaheadSelectOnExact),P=t(s.typeaheadIsOpen).assign||angular.noop,M=l.$eval(s.typeaheadShowHint)||!1,$=t(s.ngModel),O=t(s.ngModel+"($$$p)"),R=d.parse(s.uibTypeahead),N=l.$new(),L=l.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",L);var F,G,j="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());u.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":j}),M&&((F=angular.element("<div></div>")).css("position","relative"),u.after(F),(G=u.clone()).attr("placeholder",""),G.attr("tabindex","-1"),G.val(""),G.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),u.css({position:"relative","vertical-align":"top","background-color":"transparent"}),G.attr("id")&&G.removeAttr("id"),F.append(G),G.after(u));var B=angular.element("<div uib-typeahead-popup></div>");B.attr({id:j,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(s.typeaheadTemplateUrl)&&B.attr("template-url",s.typeaheadTemplateUrl),angular.isDefined(s.typeaheadPopupTemplateUrl)&&B.attr("popup-template-url",s.typeaheadPopupTemplateUrl);var U=function(){N.matches=[],N.activeIdx=-1,u.attr("aria-expanded",!1),M&&G.val("")},H=function(e){return j+"-option-"+e};N.$watch("activeIdx",function(e){e<0?u.removeAttr("aria-activedescendant"):u.attr("aria-activedescendant",H(e))});var W=function(o,s){var c={$viewValue:o};w(l,!0),T(l,!1),n.when(R.source(l,c)).then(function(e){var t,n,r=o===h.$viewValue;if(r&&v)if(e&&0<e.length){N.activeIdx=D?0:-1,T(l,!1);for(var i=N.matches.length=0;i<e.length;i++)c[R.itemName]=e[i],N.matches.push({id:H(i),label:R.viewMapper(N,c),model:e[i]});if(N.query=o,Y(),u.attr("aria-expanded",!0),I&&1===N.matches.length&&(t=o,n=0,N.matches.length>n&&t&&t.toUpperCase()===N.matches[n].label.toUpperCase())&&(angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?f(function(){N.select(0,s)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate.default):N.select(0,s)),M){var a=N.matches[0].label;angular.isString(o)&&0<o.length&&a.slice(0,o.length).toUpperCase()===o.toUpperCase()?G.val(o+a.slice(o.length)):G.val("")}}else U(),T(l,!0);r&&w(l,!1)},function(){U(),w(l,!1),T(l,!0)})};k&&(angular.element(i).on("resize",V),r.find("body").on("scroll",V));var q,z=f(function(){N.matches.length&&Y(),N.moveInProgress=!1},200);function V(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),z()}function Y(){N.position=k?o.offset(u):o.position(u),N.position.top+=u.prop("offsetHeight")}N.moveInProgress=!1,N.query=void 0;var K=function(){q&&c.cancel(q)};U(),N.assignIsOpen=function(e){P(l,e)},N.select=function(e,t){var n,r,i,a,o={};y=!0,o[R.itemName]=r=N.matches[e].model,n=R.modelMapper(l,o),i=l,a=n,angular.isFunction($(l))&&p.getOption("getterSetter")?O(i,{$$$p:a}):$.assign(i,a),h.$setValidity("editable",!0),h.$setValidity("parse",!0),A(l,{$item:r,$model:n,$label:R.viewMapper(l,o),$event:t}),U(),!1!==N.$eval(s.typeaheadFocusOnSelect)&&c(function(){u[0].focus()},0,!1)},u.on("keydown",function(e){if(0!==N.matches.length&&-1!==m.indexOf(e.which)){var t,n=C(l,{$event:e});if(-1===N.activeIdx&&n||9===e.which&&e.shiftKey)return U(),void N.$digest();switch(e.preventDefault(),e.which){case 27:e.stopPropagation(),U(),l.$digest();break;case 38:N.activeIdx=(0<N.activeIdx?N.activeIdx:N.matches.length)-1,N.$digest(),(t=B[0].querySelectorAll(".uib-typeahead-match")[N.activeIdx]).parentNode.scrollTop=t.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),(t=B[0].querySelectorAll(".uib-typeahead-match")[N.activeIdx]).parentNode.scrollTop=t.offsetTop;break;default:n&&N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?f(function(){N.select(N.activeIdx,e)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate.default):N.select(N.activeIdx,e)})}}}),u.on("focus",function(e){v=!0,0!==g||h.$viewValue||c(function(){W(h.$viewValue,e)},0)}),u.on("blur",function(e){S&&N.matches.length&&-1!==N.activeIdx&&!y&&(y=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?f(function(){N.select(N.activeIdx,e)},N.debounceUpdate.blur):N.select(N.activeIdx,e)})),!b&&h.$error.editable&&(h.$setViewValue(),N.$apply(function(){h.$setValidity("editable",!0),h.$setValidity("parse",!0)}),u.val("")),y=v=!1});var Q=function(e){u[0]!==e.target&&3!==e.which&&0!==N.matches.length&&(U(),a.$$phase||l.$digest())};r.on("click",Q),l.$on("$destroy",function(){r.off("click",Q),(k||E)&&X.remove(),k&&(angular.element(i).off("resize",V),r.find("body").off("scroll",V)),B.remove(),M&&F.remove()});var X=e(B)(N);k?r.find("body").append(X):E?angular.element(E).eq(0).append(X):u.after(X),this.init=function(e){p=function(e){var t;angular.version.minor<6?(t=e.$options||{}).getOption=function(e){return t[e]}:t=e.$options;return t}(h=e),N.debounceUpdate=t(p.getOption("debounce"))(l),h.$parsers.unshift(function(e){var t;return v=!0,0===g||e&&e.length>=g?0<_?(K(),t=e,q=c(function(){W(t)},_)):W(e):(w(l,!1),K(),U()),b?e:e?void h.$setValidity("editable",!1):(h.$setValidity("editable",!0),null)}),h.$formatters.push(function(e){var t,n={};return b||h.$setValidity("editable",!0),x?(n.$model=e,x(l,n)):(n[R.itemName]=e,t=R.viewMapper(l,n),n[R.itemName]=void 0,t!==R.viewMapper(l,n)?t:e)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","uibTypeahead"],link:function(e,t,n,r){r[1].init(r[0])}}}).directive("uibTypeaheadPopup",["$$debounce",function(i){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(e,t){return t.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(r,e,t){r.templateUrl=t.templateUrl,r.isOpen=function(){var e=0<r.matches.length;return r.assignIsOpen({isOpen:e}),e},r.isActive=function(e){return r.active===e},r.selectActive=function(e){r.active=e},r.selectMatch=function(e,t){var n=r.debounce();angular.isNumber(n)||angular.isObject(n)?i(function(){r.select({activeIdx:e,evt:t})},angular.isNumber(n)?n:n.default):r.select({activeIdx:e,evt:t})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(i,a,o){return{scope:{index:"=",match:"=",query:"="},link:function(n,r,e){var t=o(e.templateUrl)(n.$parent)||"uib/template/typeahead/typeahead-match.html";i(t).then(function(e){var t=angular.element(e.trim());r.replaceWith(t),a(t)(n)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(n,e,r){var i;return i=e.has("$sanitize"),function(e,t){return!i&&/<.*>/g.test(e)&&r.warn("Unsafe use of typeahead please use ngSanitize"),e=t?(""+e).replace(new RegExp(t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"gi"),"<strong>$&</strong>"):e,i||(e=n.trustAsHtml(e)),e}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(e){e.put("uib/template/accordion/accordion-group.html",'<div role="tab" id="{{::headingId}}" aria-selected="{{isOpen}}" class="panel-heading" ng-keypress="toggleOpen($event)">\n  <h4 class="panel-title">\n    <a role="button" data-toggle="collapse" href aria-expanded="{{isOpen}}" aria-controls="{{::panelId}}" tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading" ng-disabled="isDisabled" uib-tabindex-toggle><span uib-accordion-header ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n  </h4>\n</div>\n<div id="{{::panelId}}" aria-labelledby="{{::headingId}}" aria-hidden="{{!isOpen}}" role="tabpanel" class="panel-collapse collapse" uib-collapse="!isOpen">\n  <div class="panel-body" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(e){e.put("uib/template/accordion/accordion.html",'<div role="tablist" class="panel-group" ng-transclude></div>')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(e){e.put("uib/template/alert/alert.html",'<button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">\n  <span aria-hidden="true">&times;</span>\n  <span class="sr-only">Close</span>\n</button>\n<div ng-transclude></div>\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(e){e.put("uib/template/carousel/carousel.html",'<div class="carousel-inner" ng-transclude></div>\n<a role="button" href class="left carousel-control" ng-click="prev()" ng-class="{ disabled: isPrevDisabled() }" ng-show="slides.length > 1">\n  <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n  <span class="sr-only">previous</span>\n</a>\n<a role="button" href class="right carousel-control" ng-click="next()" ng-class="{ disabled: isNextDisabled() }" ng-show="slides.length > 1">\n  <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n  <span class="sr-only">next</span>\n</a>\n<ol class="carousel-indicators" ng-show="slides.length > 1">\n  <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">\n    <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n  </li>\n</ol>\n')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(e){e.put("uib/template/carousel/slide.html",'<div class="text-center" ng-transclude></div>\n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepicker/datepicker.html",'<div ng-switch="datepickerMode">\n  <div uib-daypicker ng-switch-when="day" tabindex="0" class="uib-daypicker"></div>\n  <div uib-monthpicker ng-switch-when="month" tabindex="0" class="uib-monthpicker"></div>\n  <div uib-yearpicker ng-switch-when="year" tabindex="0" class="uib-yearpicker"></div>\n</div>\n')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepicker/day.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n      <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></button></th>\n    </tr>\n    <tr>\n      <th ng-if="showWeeks" class="text-center"></th>\n      <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr class="uib-weeks" ng-repeat="row in rows track by $index" role="row">\n      <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n      <td ng-repeat="dt in row" class="uib-day text-center" role="gridcell"\n        id="{{::dt.uid}}"\n        ng-class="::dt.customClass">\n        <button type="button" class="btn btn-default btn-sm"\n          uib-is-class="\n            \'btn-info\' for selectedDt,\n            \'active\' for activeDt\n            on dt"\n          ng-click="select(dt.date)"\n          ng-disabled="::dt.disabled"\n          tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepicker/month.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n      <th colspan="{{::yearHeaderColspan}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></i></button></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr class="uib-months" ng-repeat="row in rows track by $index" role="row">\n      <td ng-repeat="dt in row" class="uib-month text-center" role="gridcell"\n        id="{{::dt.uid}}"\n        ng-class="::dt.customClass">\n        <button type="button" class="btn btn-default"\n          uib-is-class="\n            \'btn-info\' for selectedDt,\n            \'active\' for activeDt\n            on dt"\n          ng-click="select(dt.date)"\n          ng-disabled="::dt.disabled"\n          tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepicker/year.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n      <th colspan="{{::columns - 2}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></button></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr class="uib-years" ng-repeat="row in rows track by $index" role="row">\n      <td ng-repeat="dt in row" class="uib-year text-center" role="gridcell"\n        id="{{::dt.uid}}"\n        ng-class="::dt.customClass">\n        <button type="button" class="btn btn-default"\n          uib-is-class="\n            \'btn-info\' for selectedDt,\n            \'active\' for activeDt\n            on dt"\n          ng-click="select(dt.date)"\n          ng-disabled="::dt.disabled"\n          tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("uib/template/datepickerPopup/popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepickerPopup/popup.html",'<ul role="presentation" class="uib-datepicker-popup dropdown-menu uib-position-measure" dropdown-nested ng-if="isOpen" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n  <li ng-transclude></li>\n  <li ng-if="showButtonBar" class="uib-button-bar">\n    <span class="btn-group pull-left">\n      <button type="button" class="btn btn-sm btn-info uib-datepicker-current" ng-click="select(\'today\', $event)" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n      <button type="button" class="btn btn-sm btn-danger uib-clear" ng-click="select(null, $event)">{{ getText(\'clear\') }}</button>\n    </span>\n    <button type="button" class="btn btn-sm btn-success pull-right uib-close" ng-click="close($event)">{{ getText(\'close\') }}</button>\n  </li>\n</ul>\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(e){e.put("uib/template/modal/window.html","<div class=\"modal-dialog {{size ? 'modal-' + size : ''}}\"><div class=\"modal-content\" uib-modal-transclude></div></div>\n")}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(e){e.put("uib/template/pager/pager.html",'<li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'previous\')}}</a></li>\n<li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'next\')}}</a></li>\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(e){e.put("uib/template/pagination/pagination.html",'<li role="menuitem" ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'first\')}}</a></li>\n<li role="menuitem" ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'previous\')}}</a></li>\n<li role="menuitem" ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)" ng-disabled="ngDisabled&&!page.active" uib-tabindex-toggle>{{page.text}}</a></li>\n<li role="menuitem" ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'next\')}}</a></li>\n<li role="menuitem" ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'last\')}}</a></li>\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/tooltip/tooltip-html-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/tooltip/tooltip-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner" ng-bind="content"></div>\n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/tooltip/tooltip-template-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner"\n  uib-tooltip-template-transclude="contentExp()"\n  tooltip-template-transclude-scope="originScope()"></div>\n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(e){e.put("uib/template/popover/popover-html.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n    <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n    <div class="popover-content" ng-bind-html="contentExp()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(e){e.put("uib/template/popover/popover-template.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n    <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n    <div class="popover-content"\n      uib-tooltip-template-transclude="contentExp()"\n      tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(e){e.put("uib/template/popover/popover.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n    <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n    <div class="popover-content" ng-bind="content"></div>\n</div>\n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(e){e.put("uib/template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(e){e.put("uib/template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(e){e.put("uib/template/progressbar/progressbar.html",'<div class="progress">\n  <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(e){e.put("uib/template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}" aria-valuetext="{{title}}">\n    <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n    <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}"></i>\n</span>\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(e){e.put("uib/template/tabs/tab.html",'<li ng-class="[{active: active, disabled: disabled}, classes]" class="uib-tab nav-item">\n  <a href ng-click="select($event)" class="nav-link" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(e){e.put("uib/template/tabs/tabset.html",'<div>\n  <ul class="nav nav-{{tabset.type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n  <div class="tab-content">\n    <div class="tab-pane"\n         ng-repeat="tab in tabset.tabs"\n         ng-class="{active: tabset.active === tab.index}"\n         uib-tab-content-transclude="tab">\n    </div>\n  </div>\n</div>\n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(e){e.put("uib/template/timepicker/timepicker.html",'<table class="uib-timepicker">\n  <tbody>\n    <tr class="text-center" ng-show="::showSpinners">\n      <td class="uib-increment hours"><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n      <td>&nbsp;</td>\n      <td class="uib-increment minutes"><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n      <td ng-show="showSeconds">&nbsp;</td>\n      <td ng-show="showSeconds" class="uib-increment seconds"><a ng-click="incrementSeconds()" ng-class="{disabled: noIncrementSeconds()}" class="btn btn-link" ng-disabled="noIncrementSeconds()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n      <td ng-show="showMeridian"></td>\n    </tr>\n    <tr>\n      <td class="form-group uib-time hours" ng-class="{\'has-error\': invalidHours}">\n        <input type="text" placeholder="HH" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementHours()" ng-blur="blur()">\n      </td>\n      <td class="uib-separator">:</td>\n      <td class="form-group uib-time minutes" ng-class="{\'has-error\': invalidMinutes}">\n        <input type="text" placeholder="MM" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementMinutes()" ng-blur="blur()">\n      </td>\n      <td ng-show="showSeconds" class="uib-separator">:</td>\n      <td class="form-group uib-time seconds" ng-class="{\'has-error\': invalidSeconds}" ng-show="showSeconds">\n        <input type="text" placeholder="SS" ng-model="seconds" ng-change="updateSeconds()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementSeconds()" ng-blur="blur()">\n      </td>\n      <td ng-show="showMeridian" class="uib-time am-pm"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n    </tr>\n    <tr class="text-center" ng-show="::showSpinners">\n      <td class="uib-decrement hours"><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n      <td>&nbsp;</td>\n      <td class="uib-decrement minutes"><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n      <td ng-show="showSeconds">&nbsp;</td>\n      <td ng-show="showSeconds" class="uib-decrement seconds"><a ng-click="decrementSeconds()" ng-class="{disabled: noDecrementSeconds()}" class="btn btn-link" ng-disabled="noDecrementSeconds()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n      <td ng-show="showMeridian"></td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(e){e.put("uib/template/typeahead/typeahead-match.html",'<a href\n   tabindex="-1"\n   ng-bind-html="match.label | uibTypeaheadHighlight:query"\n   ng-attr-title="{{match.label}}"></a>\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" role="listbox" aria-hidden="{{!isOpen()}}">\n    <li class="uib-typeahead-match" ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index, $event)" role="option" id="{{::match.id}}">\n        <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n    </li>\n</ul>\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}</style>'),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow,[uib-popover-html-popup].popover.top-left > .arrow,[uib-popover-html-popup].popover.top-right > .arrow,[uib-popover-html-popup].popover.bottom-left > .arrow,[uib-popover-html-popup].popover.bottom-right > .arrow,[uib-popover-html-popup].popover.left-top > .arrow,[uib-popover-html-popup].popover.left-bottom > .arrow,[uib-popover-html-popup].popover.right-top > .arrow,[uib-popover-html-popup].popover.right-bottom > .arrow,[uib-popover-template-popup].popover.top-left > .arrow,[uib-popover-template-popup].popover.top-right > .arrow,[uib-popover-template-popup].popover.bottom-left > .arrow,[uib-popover-template-popup].popover.bottom-right > .arrow,[uib-popover-template-popup].popover.left-top > .arrow,[uib-popover-template-popup].popover.left-bottom > .arrow,[uib-popover-template-popup].popover.right-top > .arrow,[uib-popover-template-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-html-popup].popover,[uib-popover-template-popup].popover{display:block !important;}</style>'),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-time input{width:50px;}</style>'),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'),angular.$$uibTypeaheadCss=!0}),angular.module("mwFormUtils",["mwFormUtils.responseUtils"]),angular.module("mwFormUtils.responseUtils",[]).factory("mwFormResponseUtils",function(){var f={},n=["text","textarea","number","date","time","email","range","url","star"];return f.$getObjectByIdMap=function(e,n){var r={};return e&&e.forEach(function(e){var t=e;n&&(t=n(e)),r[e.id]=t}),r},f.$getOfferedAnswerByIdMap=function(e){return f.$getObjectByIdMap(e.offeredAnswers,function(e){return{id:e.id,value:e.value}})},f.$extractResponseForQuestionWithOfferedAnswers=function(e,t){var n=f.$getOfferedAnswerByIdMap(e),r={};return t.selectedAnswers?(r.selectedAnswers=[],t.selectedAnswers.forEach(function(e){r.selectedAnswers.push(n[e])})):t.selectedAnswer&&(r.selectedAnswer=n[t.selectedAnswer]),t.other&&(r.other=t.other),r},f.$extractResponseForPriorityQuestion=function(e,t){var n=[];if(!t.priorityList)return n;var r=f.$getObjectByIdMap(e.priorityList);return t.priorityList.forEach(function(e){var t=r[e.id];n.push({id:t.id,value:t.value,priority:e.priority})}),n},f.$extractResponseForDivisionQuestion=function(e,r){var i=[],a=f.$getObjectByIdMap(e.divisionList);return Object.getOwnPropertyNames(r).forEach(function(e){var t=r[e],n=a[e];n&&i.push({id:n.id,label:n.value,value:t})}),i},f.$extractResponseForGridQuestion=function(i,a){if(!i.grid||!i.grid.rows)return o;if("radio"==i.grid.cellInputType)return f.$extractResponseForRadioGridQuestion(i,a);var o=[];return i.grid.rows.forEach(function(r){i.grid.cols.forEach(function(e){var t={row:{id:r.id,label:r.label},col:{id:e.id,label:e.label},value:null};if(a.hasOwnProperty(r.id)&&a[r.id].hasOwnProperty(e.id)){var n=a[r.id][e.id];"date"==i.grid.cellInputType&&n instanceof Date?t.value=n.toLocaleDateString():"time"==i.grid.cellInputType&&n instanceof Date?t.value=n.toLocaleTimeString():t.value=n}o.push(t)})}),o},f.$extractResponseForRadioGridQuestion=function(e,i){var a=[],o=f.$getObjectByIdMap(e.grid.cols);return e.grid.rows.forEach(function(e){var t=i[e.id],n=null;t&&(n=o[t]);var r={row:{id:e.id,label:e.label},col:null};n&&(r.col={id:n.id,label:n.label}),a.push(r)}),a},f.extractResponse=function(e,t){return-1!==n.indexOf(e.type)?t.answer:"radio"==e.type||"checkbox"==e.type||"select"==e.type?f.$extractResponseForQuestionWithOfferedAnswers(e,t):"grid"==e.type?f.$extractResponseForGridQuestion(e,t):"priority"==e.type?f.$extractResponseForPriorityQuestion(e,t):"division"==e.type?f.$extractResponseForDivisionQuestion(e,t):null},f.mergeFormWithResponse=function(e,r){var t={};return angular.copy(e,t),t.pages.forEach(function(e){e.elements.forEach(function(e){var t=e.question;if(t){var n=r[t.id];n&&(t.response=f.extractResponse(t,n))}})}),t},f.getQuestionList=function(e,n){var r=[];return e.pages.forEach(function(e){e.elements.forEach(function(e){if(e.question){var t=e.question;n&&(t={},angular.copy(e.question,t)),r.push(t)}})}),r},f.getQuestionWithResponseList=function(e,n){var r=[];return f.getQuestionList(e,!0).forEach(function(e){var t=n[e.id];e.response=t?f.extractResponse(e,t):null,r.push(e)}),r},f.$$getHeader=function(e,t,n,r,i){var a="";return i&&((e||0===e)&&(a+=e+"."),null!=n&&(Array.isArray(n)||(n=[n]),n.forEach(function(e){a+=e+"."})),a.length&&(a+=" ")),a+=t,null==r||(Array.isArray(r)||(r=[r]),r.forEach(function(e){a+=" ["+e+"]"})),a},f.getResponseSheetHeaders=function(e,o){var t=["grid","priority","division"],s=[],c=0;return f.getQuestionList(e).forEach(function(i){c++;var a=1;if(-1===t.indexOf(i.type))s.push(f.$$getHeader(c,i.text,null,null,o));else if("grid"==i.type){if(!i.grid)return;"radio"==i.grid.cellInputType?i.grid.rows.forEach(function(e){s.push(f.$$getHeader(c,i.text,a,e.label,o)),a++}):i.grid.rows.forEach(function(n,r){i.grid.cols.forEach(function(e,t){s.push(f.$$getHeader(c,i.text,[r+1,t+1],[n.label,e.label],o)),a++})})}else if("priority"==i.type){if(!i.priorityList)return;i.priorityList.forEach(function(e){s.push(f.$$getHeader(c,i.text,a,e.value,o)),a++})}else if("division"==i.type){if(!i.divisionList)return;i.divisionList.forEach(function(e){s.push(f.$$getHeader(c,i.text,a,e.value,o)),a++})}}),s},f.getResponseSheetRow=function(e,t){var n=[];if(!t)return n;for(var r=f.getQuestionWithResponseList(e,t),i=["radio","checkbox","select","grid","priority","division"],a=0;a<r.length;a++){var o=r[a],s=o.response;if(-1!==i.indexOf(o.type)){if("radio"==o.type||"select"==o.type){if(!s){n.push("");continue}var c="";s.selectedAnswer&&(c=s.selectedAnswer.value),s.other&&(c&&(c+="; "),c+=s.other),n.push(c)}else if("checkbox"==o.type){if(!s||!s.selectedAnswers){n.push("");continue}c="";s.selectedAnswers.forEach(function(e){c&&(c+="; "),c+=e.value}),s.other&&(c&&(c+="; "),c+=s.other),n.push(c)}else if("grid"==o.type){if(!o.grid)continue;if(!s){"radio"==o.grid.cellInputType?o.grid.rows.forEach(function(){n.push("")}):o.grid.rows.forEach(function(){o.grid.cols.forEach(function(){n.push("")})});continue}"radio"==o.grid.cellInputType?s.forEach(function(e){n.push(e.col?e.col.label:"")}):s.forEach(function(e){n.push(e.value)})}else if("priority"==o.type){if(!o.priorityList)continue;var l=f.$getObjectByIdMap(s);o.priorityList.forEach(function(e){var t=l[e.id];t?n.push(t.priority):n.push("")})}else if("division"==o.type){if(!o.divisionList)continue;var u=f.$getObjectByIdMap(s);o.divisionList.forEach(function(e){var t=u[e.id];t?n.push(t.value):n.push("")})}}else n.push(s||"")}return n},f.getResponseSheetRows=function(t,e){return e.map(function(e){return f.getResponseSheetRow(t,e)})},f.getResponseSheet=function(t,e,n){var r=[],i=f.getResponseSheetHeaders(t,n);return r.push(i),e&&(e instanceof Array?e.forEach(function(e){r.push(f.getResponseSheetRow(t,e))}):r.push(f.getResponseSheetRow(t,e))),r},f}),angular.module("mwFormBuilder",["ngSanitize","ng-sortable","pascalprecht.translate"]).config(["$translateProvider",function(e){e.useStaticFilesLoader({prefix:"bower_components/insight-surveys/dist/i18n/",suffix:"/angular-surveys.json"}),e.useSanitizeValueStrategy("sanitize"),e.preferredLanguage("en")}]).filter("ngtranslate",["$parse","$translate",function(a,o){"use strict";var e=function(e,t,n,r){if(!angular.isObject(t)){var i=this||{__SCOPE_IS_NOT_AVAILABLE:"More info at https://github.com/angular/angular.js/commit/8863b9d04c722b278fa93c5d66ad1e578ad6eb1f"};t=a(t)(i)}return o.instant(e,t,n,r)};return o.statefulFilter()&&(e.$stateful=!0),e}]),angular.module("mwFormBuilder").service("mwFormUuid",function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}this.get=function(){return e()+e()+e()+e()+e()+e()+e()+e()}}).factory("mwFormClone",["mwFormUuid",function(i){var a={},o=[];return a.resetIds=function(e,t){if(t&&(o=[]),!(0<=o.indexOf(e))&&(o.push(e),!e!==Object(e))){if(Array.isArray(e))return void e.forEach(a.resetIds);for(var n in e)e.hasOwnProperty(n)&&a.resetIds(e[n]);if(e.hasOwnProperty("id")){var r=i.get();e.id,e.id=r}}},a.cloneElement=function(e){var t={};return angular.copy(e,t),a.resetIds(t,!0),t},a.clonePage=function(e){var t={};angular.copy(e,t),t.id=i.get();var n=[];if(Array.isArray(e.elements))for(var r=0;r<e.elements.length;r++)n.push(a.cloneElement(e.elements[r]));return t.elements=n,t},a.cloneForm=function(e){var t={};angular.copy(e,t);var n=[];if(Array.isArray(e.pages))for(var r=0;r<e.pages.length;r++)n.push(a.clonePage(e.pages[r]));return t.pages=n,t},a}]),angular.module("mwFormBuilder").directive("mwQuestionPriorityListBuilder",function(){return{replace:!0,restrict:"AE",require:"^mwFormQuestionBuilder",scope:{question:"=",readOnly:"=?",options:"=?"},templateUrl:"mw-question-priority-list-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["mwFormUuid",function(n){var r=this;r.isNewItem={},this.$onInit=function(){r.question.priorityList||(r.question.priorityList=[],r.addNewItem()),r.question.priorityList.sort(function(e,t){return e.orderNo-t.orderNo}),r.itemsSortableConfig={disabled:r.readOnly,ghostClass:"beingDragged",handle:".drag-handle",onEnd:function(e,t){!function(e){if(e)for(var t=0;t<e.length;t++)e[t].orderNo=t+1}(r.question.priorityList)}}},r.addNewItem=function(e){var t={id:n.get(),orderNo:r.question.priorityList.length+1,value:null};e||(r.isNewItem[t.id]=!0),r.question.priorityList.push(t)},r.removeItem=function(e){var t=r.question.priorityList.indexOf(e);-1!=t&&r.question.priorityList.splice(t,1)},r.keyPressedOnInput=function(e,t){delete r.isNewItem[t.id],13===e.which&&(e.preventDefault(),r.addNewItem())},1===angular.version.major&&angular.version.minor<5&&this.$onInit()}],link:function(e,t,n,r){e.ctrl}}}),angular.module("mwFormBuilder").directive("mwQuestionOfferedAnswerListBuilder",function(){return{replace:!0,restrict:"AE",require:"^mwFormQuestionBuilder",scope:{question:"=",formObject:"=",readOnly:"=?",options:"=?",disableOtherAnswer:"=?"},templateUrl:"mw-question-offered-answer-list-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["FormQuestionBuilderId","mwFormUuid",function(e,n){var r=this;this.$onInit=function(){r.config={radio:{},checkbox:{}},r.isNewAnswer={},r.question.offeredAnswers&&r.question.offeredAnswers.sort(function(e,t){return e.orderNo-t.orderNo}),r.offeredAnswersSortableConfig={disabled:r.readOnly,ghostClass:"beingDragged",handle:".drag-handle",onEnd:function(e,t){!function(){if(r.question.offeredAnswers)for(var e=0;e<r.question.offeredAnswers.length;e++)r.question.offeredAnswers[e].orderNo=e+1}()}}},r.addNewOfferedAnswer=function(){var e=r.possiblePageFlow[0],t={id:n.get(),orderNo:r.question.offeredAnswers.length+1,value:null,pageFlow:e};r.isNewAnswer[t.id]=!0,r.question.offeredAnswers.push(t)},r.removeOfferedAnswer=function(e){var t=r.question.offeredAnswers.indexOf(e);-1!=t&&r.question.offeredAnswers.splice(t,1)},r.addCustomAnswer=function(){r.question.otherAnswer=!0},r.removeCustomAnswer=function(){r.question.otherAnswer=!1},r.keyPressedOnInput=function(e,t){delete r.isNewAnswer[t.id],13===e.which&&(e.preventDefault(),r.addNewOfferedAnswer())},1===angular.version.major&&angular.version.minor<5&&this.$onInit()}],link:function(e,t,n,r){e.ctrl.possiblePageFlow=r.possiblePageFlow}}}),angular.module("mwFormBuilder").directive("mwQuestionGridBuilder",function(){return{replace:!0,restrict:"AE",require:"^mwFormQuestionBuilder",scope:{question:"=",formObject:"=",readOnly:"=?",options:"=?"},templateUrl:"mw-question-grid-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["mwFormUuid","MW_GRID_CELL_INPUT_TYPES",function(n,e){function r(e){if(e)for(var t=0;t<e.length;t++){e[t].orderNo=t+1}}function t(e){e.sort(function(e,t){return e.orderNo-t.orderNo})}var i=this;this.$onInit=function(){i.cellInputTypes=e,i.isNewInput={},i.question.grid||(i.question.grid={rows:[],cols:[]},i.addNewRow(),i.addNewCol(!0)),i.question.grid.cellInputType||(i.question.grid.cellInputType=i.cellInputTypes[0]),t(i.question.grid.rows),t(i.question.grid.cols),i.rowsSortableConfig={disabled:i.readOnly,ghostClass:"beingDragged",handle:".drag-handle",onEnd:function(e,t){r(i.question.grid.rows)}},i.colsSortableConfig={disabled:i.readOnly,ghostClass:"beingDragged",handle:".drag-handle",onEnd:function(e,t){r(i.question.grid.cols)}}},i.addNewRow=function(e){var t={id:n.get(),orderNo:i.question.grid.rows.length+1,label:null};e||(i.isNewInput[t.id]=!0),i.question.grid.rows.push(t)},i.addNewCol=function(e){var t={id:n.get(),orderNo:i.question.grid.cols.length+1,label:null};e||(i.isNewInput[t.id]=!0),i.question.grid.cols.push(t)},i.removeRow=function(e){var t=i.question.grid.rows.indexOf(e);-1!=t&&i.question.grid.rows.splice(t,1)},i.removeCol=function(e){var t=i.question.grid.cols.indexOf(e);-1!=t&&i.question.grid.cols.splice(t,1)},i.keyPressedOnInput=function(e,t,n){delete i.isNewInput[t.id],13===e.which&&(e.preventDefault(),"row"==n?i.addNewRow():i.addNewCol())},1===angular.version.major&&angular.version.minor<5&&this.$onInit()}],link:function(e,t,n,r){e.ctrl}}}),angular.module("mwFormBuilder").directive("mwQuestionDivisionBuilder",function(){return{replace:!0,restrict:"AE",require:"^mwFormQuestionBuilder",scope:{question:"=",readOnly:"=?",options:"=?"},templateUrl:"mw-question-division-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["mwFormUuid",function(n){var r=this;r.$onInit=function(){r.isNewItem={},r.question.divisionList||(r.question.divisionList=[],r.addNewItem()),r.question.divisionList.sort(function(e,t){return e.orderNo-t.orderNo}),r.itemsSortableConfig={disabled:r.readOnly,ghostClass:"beingDragged",handle:".drag-handle",onEnd:function(e,t){!function(e){if(e)for(var t=0;t<e.length;t++)e[t].orderNo=t+1}(r.question.divisionList)}}},r.addNewItem=function(e){var t={id:n.get(),orderNo:r.question.divisionList.length+1,value:null};e||(r.isNewItem[t.id]=!0),r.question.divisionList.push(t)},r.removeItem=function(e){var t=r.question.divisionList.indexOf(e);-1!=t&&r.question.divisionList.splice(t,1)},r.keyPressedOnInput=function(e,t){delete r.isNewItem[t.id],13===e.which&&(e.preventDefault(),r.addNewItem())},1===angular.version.major&&angular.version.minor<5&&r.$onInit()}],link:function(e,t,n,r){e.ctrl}}}),angular.module("mwFormBuilder").directive("mwLabel",function(){return{replace:!0,restrict:"AE",scope:{labelKey:"@?",labelText:"@?",labelFor:"@",labelClass:"@",labelTranslateValues:"="},templateUrl:"mw-label.html",controllerAs:"ctrl",bindToController:!0,controller:["mwFormUuid",function(e){}],link:function(e,t,n){}}}),angular.module("mwFormBuilder").factory("FormQuestionBuilderId",function(){var e=0;return{next:function(){return++e}}}).directive("mwFormQuestionBuilder",function(){return{replace:!0,restrict:"AE",require:"^mwFormPageElementBuilder",scope:{question:"=",formObject:"=",onReady:"&",isPreview:"=?",readOnly:"=?"},templateUrl:"mw-form-question-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["$timeout","FormQuestionBuilderId","mwFormBuilderOptions",function(e,t,n){function r(){i.question.offeredAnswers&&i.question.offeredAnswers.forEach(function(e){i.question.pageFlowModifier?e.pageFlow=i.possiblePageFlow[0]:delete e.pageFlow})}var i=this;i.$onInit=function(){i.id=t.next(),i.questionTypes=n.questionTypes,i.formSubmitted=!1,i.question.offeredAnswers&&i.question.offeredAnswers.sort(function(e,t){return e.orderNo-t.orderNo}),i.offeredAnswersSortableConfig={disabled:i.readOnly,ghostClass:"beingDragged",handle:".drag-handle",onEnd:function(e,t){!function(){if(i.question.offeredAnswers)for(var e=0;e<i.question.offeredAnswers.length;e++)i.question.offeredAnswers[e].orderNo=e+1}()}}},i.save=function(){i.formSubmitted=!0,i.form.$valid&&i.onReady()};var a=["radio","checkbox","select"];i.questionTypeChanged=function(){-1!==a.indexOf(i.question.type)&&(i.question.offeredAnswers||(i.question.offeredAnswers=[])),"radio"!=i.question.type&&(r(),e(function(){i.question.pageFlowModifier=!1})),-1===a.indexOf(i.question.type)&&delete i.question.offeredAnswers,"grid"!=i.question.type?delete i.question.grid:i.question.required=!1,"priority"!=i.question.type&&delete i.question.priorityList},i.pageFlowModifierChanged=function(){r()},1===angular.version.major&&angular.version.minor<5&&i.$onInit()}],link:function(e,t,n,r){var i=e.ctrl;i.possiblePageFlow=r.possiblePageFlow,i.options=r.options}}}),angular.module("mwFormBuilder").factory("FormParagraphBuilderId",function(){var e=0;return{next:function(){return++e}}}).directive("mwFormParagraphBuilder",function(){return{replace:!0,restrict:"AE",require:"^mwFormPageElementBuilder",scope:{paragraph:"=",formObject:"=",onReady:"&",isPreview:"=?",readOnly:"=?"},templateUrl:"mw-form-paragraph-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["$timeout","FormParagraphBuilderId",function(e,t){var n=this;n.$onInit=function(){n.id=t.next(),n.formSubmitted=!1},n.save=function(){n.formSubmitted=!0,n.form.$valid&&n.onReady()},1===angular.version.major&&angular.version.minor<5&&n.$onInit()}],link:function(e,t,n,r){e.ctrl}}}),angular.module("mwFormBuilder").directive("mwFormPageElementBuilder",function(){return{replace:!0,restrict:"AE",require:"^mwFormPageBuilder",scope:{pageElement:"=",formObject:"=",isActive:"=",isFirst:"=",isLast:"=",onReady:"&",readOnly:"=?"},templateUrl:"mw-form-page-element-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["mwFormUuid",function(e){var n=this;n.$onInit=function(){"question"==n.pageElement.type?n.pageElement.question||(n.pageElement.question={id:e.get(),text:null,type:null,required:!0}):"image"==n.pageElement.type?n.pageElement.image||(n.pageElement.image={id:e.get(),align:"left"}):"paragraph"==n.pageElement.type&&(n.pageElement.paragraph||(n.pageElement.paragraph={id:e.get(),html:""}))},n.callback=function(e,t){e.preventDefault(),e.stopPropagation(),t.callback&&"function"==typeof t.callback&&t.callback(n.pageElement)},n.filter=function(e){return!(!e.showInOpen&&n.isActive)&&!(!e.showInPreview&&!n.isActive)&&(!e.filter||"function"!=typeof e.filter||e.filter(n.pageElement))},1===angular.version.major&&angular.version.minor<5&&n.$onInit()}],link:function(e,t,n,r){var i=e.ctrl;i.possiblePageFlow=r.possiblePageFlow,i.hoverIn=function(){i.isHovered=!0},i.hoverOut=function(){i.isHovered=!1},i.editElement=function(){r.selectElement(i.pageElement)},i.cloneElement=function(e){e.preventDefault(),e.stopPropagation(),r.cloneElement(i.pageElement)},i.removeElement=function(){r.removeElement(i.pageElement)},i.moveDown=function(){r.moveDownElement(i.pageElement),e.$emit("mwForm.questionUpdate")},i.moveUp=function(){r.moveUpElement(i.pageElement),e.$emit("mwForm.questionUpdate")},i.options=r.options,i.onImageSelection=r.onImageSelection}}}),angular.module("mwFormBuilder").directive("mwFormPageBuilder",["$rootScope",function(t){return{replace:!0,restrict:"AE",require:"^mwFormBuilder",scope:{formPage:"=",formObject:"=",isFirst:"=",isLast:"=",readOnly:"=?"},templateUrl:"mw-form-page-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["$scope","$timeout","mwFormUuid","mwFormClone","mwFormBuilderOptions",function(n,e,i,a,o){function r(){for(var e=0;e<c.formPage.elements.length;e++)c.formPage.elements[e].orderNo=e+1}function s(e,t,n){var r=e[t];e.splice(t,1),e.splice(n,0,r)}var c=this;c.$onInit=function(){c.hoverEdit=!1,c.formPage.namedPage=!!c.formPage.name,c.isFolded=!1,c.formPage.elements.sort(function(e,t){return e.orderNo-t.orderNo}),c.sortableConfig={disabled:c.readOnly,ghostClass:"beingDragged",group:"survey",handle:".inactive",chosenClass:".page-element-list",onEnd:function(e,t){r(),n.$emit("mwForm.questionUpdate")}},c.activeElement=null},c.unfold=function(){c.isFolded=!1},c.fold=function(){c.isFolded=!0},c.pageNameChanged=function(){t.$broadcast("mwForm.pageEvents.pageNameChanged",{page:c.formPage})},c.addElement=function(e){e||(e=o.elementTypes[0]);var t,n,r=(t=e,n=c.formPage.elements.length+1,{id:i.get(),orderNo:n,type:t});c.activeElement=r,c.formPage.elements.push(r)},c.cloneElement=function(e,t){var n=c.formPage.elements.indexOf(e),r=a.cloneElement(e);t&&(c.activeElement=r),c.formPage.elements.splice(n,0,r)},c.removeElement=function(e){var t=c.formPage.elements.indexOf(e);c.formPage.elements.splice(t,1)},c.moveDownElement=function(e){var t=c.formPage.elements.indexOf(e),n=t+1;n<c.formPage.elements.length&&s(c.formPage.elements,t,n),r()},c.moveUpElement=function(e){var t=c.formPage.elements.indexOf(e),n=t-1;0<=n&&s(c.formPage.elements,t,n),r()},c.isElementTypeEnabled=function(e){return-1!==o.elementTypes.indexOf(e)},c.addQuestion=function(){c.addElement("question")},c.addImage=function(){c.addElement("image")},c.addParagraph=function(){c.addElement("paragraph")},c.isElementActive=function(e){return c.activeElement==e},c.selectElement=function(e){c.activeElement=e},c.onElementReady=function(){e(function(){c.activeElement=null})},c.hoverIn=function(){c.hoverEdit=!0},c.hoverOut=function(){c.hoverEdit=!1},c.updateElementsOrderNo=r,1===angular.version.major&&angular.version.minor<5&&c.$onInit()}],link:function(n,e,t,r){var i=n.ctrl;i.possiblePageFlow=r.possiblePageFlow,i.moveDown=function(){r.moveDownPage(i.formPage)},i.moveUp=function(){r.moveUpPage(i.formPage)},i.removePage=function(){r.removePage(i.formPage)},i.addPage=function(){r.addPageAfter(i.formPage)},n.$watch("ctrl.formPage.elements.length",function(e,t){e!=t&&(i.updateElementsOrderNo(),n.$emit("mwForm.questionUpdate"))}),i.options=r.options,i.onImageSelection=r.onImageSelection}}}]),angular.module("mwFormBuilder").factory("FormImageBuilderId",function(){var e=0;return{next:function(){return++e}}}).directive("mwFormImageBuilder",function(){return{replace:!0,restrict:"AE",require:"^mwFormPageElementBuilder",scope:{image:"=",formObject:"=",onReady:"&",isPreview:"=?",readOnly:"=?",onImageSelection:"&"},templateUrl:"mw-form-image-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["$timeout","FormImageBuilderId","mwFormUuid",function(e,t,n){var r=this;r.id=t.next(),r.formSubmitted=!1,r.save=function(){r.formSubmitted=!0,r.form.$valid&&r.onReady()},r.selectImageButtonClicked=function(){r.onImageSelection().then(function(e){r.image.src=e}).catch(function(){})},r.setAlign=function(e){r.image.align=e}}],link:function(e,t,n,r){e.ctrl}}}),angular.module("mwFormBuilder").directive("mwFormConfirmationPageBuilder",function(){return{replace:!0,restrict:"AE",scope:{formObject:"=",readOnly:"=?",defaultMessage:"=?"},templateUrl:"mw-form-confirmation-page-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["$timeout",function(e){var t=this;t.hoverEdit=!1,t.hoverIn=function(){t.hoverEdit=!0},t.hoverOut=function(){t.hoverEdit=!1}}],link:function(e,t,n){}}}),angular.module("mwFormBuilder").directive("mwFormBuilder",["$rootScope",function(l){return{replace:!0,restrict:"AE",scope:{formData:"=",readOnly:"=?",options:"=?",formStatus:"=?",onImageSelection:"&",api:"=?"},templateUrl:"mw-form-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["$scope","mwFormUuid","MW_QUESTION_TYPES","mwFormBuilderOptions",function(e,n,t,r){function i(e){var t=null;return c.possiblePageFlow&&(t=c.possiblePageFlow[0]),{id:n.get(),number:e,name:null,description:null,pageFlow:t,elements:[]}}function a(){var t=1;void 0!==c.formData.pages&&c.formData.pages.forEach(function(e){void 0!==e.elements&&e.elements.forEach(function(e){"question"==e.type&&void 0!==e.question&&(e.question.number=t++)})})}function o(){for(var e=0;e<c.formData.pages.length;e++)c.formData.pages[e].number=e+1;c.updatePageFlow()}function s(e,t,n){var r=e[t];e.splice(t,1),e.splice(n,0,r)}var c=this;c.$onInit=function(){c.currentPage=0,c.formData.pages&&c.formData.pages.length||(c.formData.pages=[],c.formData.pages.push(i(1))),c.options=r.$init(c.options),c.api&&(c.api.reset=function(){for(var e in c.formData)c.formData.hasOwnProperty(e)&&"pages"!=e&&delete c.formData[e];c.formData.pages.length=0,c.formData.pages.push(i(1))}),setTimeout(function(){a()},0),e.$watch("ctrl.formData",function(e,t){a()})},c.numberOfPages=function(){return Math.ceil(c.formData.pages.length/c.options.pageSize)},c.lastPage=function(){c.currentPage=Math.ceil(c.formData.pages.length/c.options.pageSize-1)},c.addPage=function(){c.formData.pages.push(i(c.formData.pages.length+1)),c.lastPage(),l.$broadcast("mwForm.pageEvents.pageAdded")},c.onChangePageSize=function(){c.currentPage>Math.ceil(c.formData.pages.length/c.options.pageSize-1)&&(c.currentPage=Math.ceil(c.formData.pages.length/c.options.pageSize-1))},e.$on("mwForm.questionUpdate",function(){setTimeout(function(){a()},0)}),c.addPageAfter=function(e){var t=c.formData.pages.indexOf(e)+1,n=i(e.number+1);t<c.formData.pages.length?c.formData.pages.splice(t,0,n):c.formData.pages.push(n),o(),a(),l.$broadcast("mwForm.pageEvents.pageAdded")},c.moveDownPage=function(e){var t=c.formData.pages.indexOf(e),n=t+1;n<c.formData.pages.length&&s(c.formData.pages,t,n),o(),a(),l.$broadcast("mwForm.pageEvents.pageMoved")},c.moveUpPage=function(e){var t=c.formData.pages.indexOf(e),n=t-1;0<=n&&s(c.formData.pages,t,n),o(),a(),l.$broadcast("mwForm.pageEvents.pageMoved")},c.removePage=function(e){var t=c.formData.pages.indexOf(e);c.formData.pages.splice(t,1),o(),a(),l.$broadcast("mwForm.pageEvents.pageRemoved"),c.onChangePageSize()},1===angular.version.major&&angular.version.minor<5&&c.$onInit()}],link:function(e,t,n){var r=e.ctrl;r.formStatus&&(r.formStatus.form=r.form),r.possiblePageFlow=[];var i={nextPage:!0,label:"mwForm.pageFlow.goToNextPage"};r.possiblePageFlow.push(i),r.isSamePageFlow=function(e,t){return e.page&&t.page&&e.page.id==t.page.id||e.formSubmit&&t.formSubmit||e.nextPage&&t.nextPage},r.updatePageFlow=function(){r.possiblePageFlow.length=1,r.formData.pages.forEach(function(e){r.possiblePageFlow.push({page:{id:e.id,number:e.number},label:"mwForm.pageFlow.goToPage"})}),r.possiblePageFlow.push({formSubmit:!0,label:"mwForm.pageFlow.submitForm"}),r.formData.pages.forEach(function(e){r.possiblePageFlow.forEach(function(n){e.pageFlow?r.isSamePageFlow(n,e.pageFlow)&&(e.pageFlow=n):e.pageFlow=i,e.elements.forEach(function(e){var t=e.question;t&&t.pageFlowModifier&&t.offeredAnswers.forEach(function(e){e.pageFlow&&r.isSamePageFlow(n,e.pageFlow)&&(e.pageFlow=n)})})})})},e.$watch("ctrl.formData.pages.length",function(e,t){r.updatePageFlow()}),e.$watch("ctrl.currentPage",function(e,t){l.$broadcast("mwForm.pageEvents.pageCurrentChanged",{index:r.currentPage})}),e.$on("mwForm.pageEvents.changePage",function(e,t){void 0!==t.page&&t.page<r.numberOfPages()&&(r.currentPage=t.page)}),e.$on("mwForm.pageEvents.addPage",function(e,t){r.addPage()})}}}]),angular.module("mwFormBuilder").filter("mwStartFrom",function(){return function(e,t){return t=+t,e.slice(t)}}),angular.module("mwFormBuilder").constant("MW_QUESTION_TYPES",["text","textarea","radio","checkbox","select","grid","priority","division","number","date","time","email","range","url","star"]).constant("MW_ELEMENT_TYPES",["question","image","paragraph"]).constant("MW_GRID_CELL_INPUT_TYPES",["radio","checkbox","text","number","date","time"]).factory("mwFormBuilderOptions",["MW_ELEMENT_TYPES","MW_QUESTION_TYPES",function(e,t){function n(e,t){return e?e.map(function(e){return angular.extend({},t,e)}):[]}var r={title:null,icon:null,text:null,callback:null,filter:null,showInOpen:!1,showInPreview:!0,cssClass:""},i={key:null,label:null,selects:[],required:!0},a={elementTypes:e,questionTypes:t,elementButtons:[],pagesSize:[10,25,50,100],pageSize:10,customQuestionSelects:[],customElements:[]},o={$init:function(e){return angular.extend(o,a,e),o.customQuestionSelects=n(o.customQuestionSelects,i),o.elementButtons=n(o.elementButtons,r),o}};return o}]),angular.module("mwFormBuilder").directive("wdFocusMe",["$timeout","$parse",function(i,a){return{link:function(e,t,n){var r=a(n.wdFocusMe);e.$watch(r,function(e){!0===e&&i(function(){t[0].focus()})}),t.bind("blur",function(){i(function(){e.$apply(r.assign(e,!1))})})}}}]).factory("focus",["$timeout","$window",function(e,n){return function(t){e(function(){var e=n.document.getElementById(t);e&&e.focus()})}}]),angular.module("mwFormBuilder").directive("mwConfirmClick",["$window",function(i){return{restrict:"A",link:function(t,e,n){var r=n.wdConfirmClick||"Are you sure?";e.bind("click",function(e){i.confirm(r)&&t.$apply(n.confirmedAction)})}}}]),angular.module("mwFormBuilder").run(["$templateCache",function(e){e.put("mw-form-builder.html",'<div class=mw-form-builder><form name=ctrl.form role=form novalidate><div class=mw-title-page><md-input-container class=md-block><mw-label label-for=formName label-key=mwForm.form.name></mw-label><input type=text class=form-control name=formName id=formName ng-model=ctrl.formData.name ng-readonly=ctrl.readOnly required></md-input-container><md-input-container class=md-block><mw-label label-for=formDescription label-key=mwForm.form.description></mw-label><textarea msd-elastic class=form-control name=formDescription ng-model=ctrl.formData.description id=formDescription ng-readonly=ctrl.readOnly>\n            </textarea></md-input-container></div><div class=form-page-list><mw-form-page-builder ng-repeat="page in ctrl.formData.pages| mwStartFrom:ctrl.currentPage * ctrl.options.pageSize | limitTo:ctrl.options.pageSize" form-page=page form-object=ctrl.formData is-first=$first is-last=$last read-only=ctrl.readOnly></mw-form-page-builder></div><div layout=row layout-align="center center"><div flex-gt-xs=75><div layout=row layout-align="center center"><div flex-gt-xs=50><md-button class="md-icon-button md-raised" ng-disabled="ctrl.currentPage === 0" ng-click="ctrl.currentPage = 0"><i class="fa fa-angle-double-left fa-lg"></i></md-button><md-button class="md-icon-button md-raised" ng-disabled="ctrl.currentPage === 0" ng-click="ctrl.currentPage = ctrl.currentPage - 1"><i class="fa fa-angle-left fa-lg"></i></md-button>{{ctrl.currentPage + 1}}/{{ctrl.numberOfPages()}}<md-button class="md-icon-button md-raised" ng-disabled="ctrl.currentPage >= ctrl.formData.pages.length / ctrl.options.pageSize - 1" ng-click="ctrl.currentPage = ctrl.currentPage + 1"><i class="fa fa-angle-right fa-lg"></i></md-button><md-button class="md-icon-button md-raised" ng-disabled="ctrl.currentPage >= ctrl.formData.pages.length / ctrl.options.pageSize - 1" ng-click=ctrl.lastPage()><i class="fa fa-angle-double-right fa-lg"></i></md-button></div><div flex-gt-xs=18><md-input-container><md-select ng-change=ctrl.onChangePageSize() class=form-control ng-model=ctrl.options.pageSize><md-option ng-repeat="item in ctrl.options.pagesSize" value={{item}}>{{item}}</md-option></md-select></md-input-container></div></div></div><div flex><div layout=row layout-align=end><md-button type=button class="md-raised md-primary" ng-click=ctrl.addPage() ng-if=!ctrl.readOnly><i class="fa fa-plus"></i> <span translate=mwForm.buttons.addPage></span></md-button></div></div></div><mw-form-confirmation-page-builder form-object=ctrl.formData read-only=ctrl.readOnly></mw-form-confirmation-page-builder></form></div>'),e.put("mw-form-confirmation-page-builder.html",'<div class="mw-form-page-builder mw-confirmation-page"><div><div class=mw-page-tab-container><div class=mw-form-page-tab><span class=mw-page-tab-text role=heading translate=mwForm.confirmationPage.title>Strona potwierdzenia</span></div><div class=mw-page-tab-triangle></div></div><div ng-form=ctrl.form role=form novalidate class=form-page-builder-body><div class=form-group><md-input-container class=md-block><mw-label label-for=customConfirmationMessage label-key=mwForm.confirmationPage.customMessage></mw-label><textarea id=customConfirmationMessage msd-elastic class=form-control name=confirmationMessage ng-model=ctrl.formObject.confirmationMessage ng-disabled=ctrl.readOnly></textarea></md-input-container></div></div></div></div>'),e.put("mw-form-image-builder.html",'<div class=mw-form-image-builder-wrapper><div class=mw-form-image-builder ng-class="{\'ng-submitted\':ctrl.formSubmitted}"><div class=image-editor ng-form=ctrl.form ng-if=!ctrl.isPreview><button ng-if=!ctrl.image.src ng-click=ctrl.selectImageButtonClicked() type=button class="btn btn-default" translate=mwForm.image.selectImageButton>Select image</button><div class="image-edition row" ng-if=ctrl.image.src><div class=col-md-12 ng-class="\'align-\'+ctrl.image.align"><img ng-src={{ctrl.image.src}}></div><div class="col-md-12 image-align-control"><div class=btn-group role=group aria-label="Image align"><button type=button class="btn btn-default" ng-class="{\'selected\': ctrl.image.align==\'left\'}" ng-click="ctrl.setAlign(\'left\')"><i class="fa fa-align-left"></i></button> <button type=button class="btn btn-default" ng-class="{\'selected\': ctrl.image.align==\'center\'}" ng-click="ctrl.setAlign(\'center\')"><i class="fa fa-align-center"></i></button> <button type=button class="btn btn-default" ng-class="{\'selected\': ctrl.image.align==\'right\'}" ng-click="ctrl.setAlign(\'right\')"><i class="fa fa-align-right"></i></button></div></div><md-input-container class=md-block><mw-label label-for=image-caption-{{ctrl.id}} label-key=mwForm.image.caption>Image caption</mw-label><input type=text class=form-control name=text ng-attr-id=image-caption-{{ctrl.id}} ng-model=ctrl.image.caption ng-readonly=ctrl.readOnly></md-input-container></div><div ng-if=ctrl.image.src><br><br><md-button class="md-primary md-raised" type=button role=button ng-click=ctrl.save() translate=mwForm.buttons.questionReady>Ready</md-button></div></div><div class=mw-preview ng-if=ctrl.isPreview><figure ng-class="\'align-\'+ctrl.image.align"><img ng-src={{ctrl.image.src}} ng-attr-alt=ctrl.image.caption><figcaption ng-if=ctrl.image.caption>{{ctrl.image.caption}}</figcaption></figure></div></div></div>'),e.put("mw-form-page-builder.html",'<div class=mw-form-page-builder ng-class="{\'page-folded\': ctrl.isFolded}"><div ng-mouseover=ctrl.hoverIn() ng-mouseleave=ctrl.hoverOut()><div class=mw-page-tab-container><div class=mw-form-page-tab><span class=mw-page-tab-text role=heading translate=mwForm.page.tab.heading translate-values="{page: ctrl.formPage.number, allPages:ctrl.formObject.pages.length}">Strona 1 z 3</span> <span class=mw-page-tab-checkbox><label><input type=checkbox ng-model=ctrl.formPage.namedPage ng-disabled=ctrl.readOnly><span class=mw-page-tab-checkbox-text translate=mwForm.page.pageWithNameCheckbox>named</span></label></span></div><div class=mw-page-tab-triangle></div><div class=mw-page-tab-actions ng-switch=ctrl.readOnly><button type=button class=fold-button ng-click=ctrl.fold() ng-attr-title="{{\'mwForm.buttons.fold\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.fold>Fold</span></md-tooltip><i class="fa fa-compress"></i></button> <button type=button class=unfold-button ng-click=ctrl.unfold() ng-attr-title="{{\'mwForm.buttons.unfold\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.unfold>Unfold</span></md-tooltip><i class="fa fa-expand"></i></button> <button type=button class=move-down-button ng-click=ctrl.moveDown() ng-if=!ctrl.isLast ng-switch-when=false ng-attr-title="{{\'mwForm.buttons.moveDown\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.moveDown>Move down</span></md-tooltip><i class="fa fa-chevron-down"></i></button> <button type=button class=move-up-button ng-click=ctrl.moveUp() ng-if=!ctrl.isFirst ng-switch-when=false ng-attr-title="{{\'mwForm.buttons.moveUp\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.moveUp>move Up</span></md-tooltip><i class="fa fa-chevron-up"></i></button> <button type=button class=remove-button mw-confirm-click confirmed-action=ctrl.removePage() ng-switch-when=false ng-attr-title="{{\'mwForm.buttons.removePage\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.removePage>remove Page</span></md-tooltip><i class="fa fa-trash"></i></button></div></div><div ng-form=ctrl.form role=form novalidate class=form-page-builder-body><md-input-container class=md-block ng-if=ctrl.formPage.namedPage><label ng-attr-for=page-name-{{ctrl.formPage.number}} translate=mwForm.page.name>Nazwa strony</label> <input type=text class=form-control name=pageName ng-attr-id=page-name-{{ctrl.formPage.number}} ng-model=ctrl.formPage.name ng-blur=ctrl.pageNameChanged() ng-readonly=ctrl.readOnly></md-input-container><div class=page-element-list ng-sortable=ctrl.sortableConfig ng-model=ctrl.formPage.elements><div class="empty-page-element-list-label form-group" ng-if="!ctrl.formPage.elements || (ctrl.formPage.elements && ctrl.formPage.elements.length === 0)"><span translate=mwForm.page.elements.empty>Brak elementów</span></div><mw-form-page-element-builder ng-repeat="element in ctrl.formPage.elements" page-element=element form-object=ctrl.formObject is-active=ctrl.isElementActive(element) on-ready=ctrl.onElementReady() ng-click=ctrl.selectElement(element) is-first=$first is-last=$last read-only=ctrl.readOnly></mw-form-page-element-builder></div><md-menu ng-if=!ctrl.readOnly><md-button class=md-raised aria-label="{{\'mwForm.buttons.addElement\'|ngtranslate}}" ng-click=$mdOpenMenu($event) translate=mwForm.buttons.addElement>Add element</md-button><md-menu-content width=4><md-menu-item ng-if="ctrl.isElementTypeEnabled(\'question\')"><md-button type=button ng-click=ctrl.addQuestion()><span translate=mwForm.elements.question>Pytanie</span><i class="fa fa-question-circle fa-lg fa-fw" style="margin-left: 10px;"></i></md-button></md-menu-item><md-menu-item ng-if="ctrl.isElementTypeEnabled(\'image\')"><md-button type=button ng-click=ctrl.addImage()><span translate=mwForm.elements.image>Obraz</span><i class="fa fa-picture-o fa-lg fa-fw" style="margin-left: 10px;"></i></md-button></md-menu-item><md-menu-item ng-if="ctrl.isElementTypeEnabled(\'paragraph\')"><md-button type=button ng-click=ctrl.addParagraph()><span translate=mwForm.elements.paragraph>Obraz</span><i class="fa fa-paragraph fa-lg fa-fw" style="margin-left: 10px;"></i></md-button></md-menu-item></md-menu-content></md-menu></div><table cellspacing=0 class=mw-page-bottom-tab-container ng-if=!ctrl.isLast><tr><td class=mw-page-bottom-tab-triangle></td><td class=mw-form-page-bottom-tab><div class="page-flow-select form-inline"><label translate=mwForm.pageFlow.afterPage translate-values={page:ctrl.formPage.number} ng-attr-for=page-flow-select-{{ctrl.formPage.number}}>Po stronie 1</label><select ng-attr-id=page-flow-select-{{ctrl.formPage.number}} ng-options="pageFlow.label|ngtranslate:pageFlow for pageFlow in ctrl.possiblePageFlow" ng-model=ctrl.formPage.pageFlow class=form-control ng-disabled=ctrl.readOnly></select></div></td><td class=mw-page-bottom-tab-actions><button type=button role=button class=btn ng-click=ctrl.addPage() ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.addPage\' | ngtranslate}}"><md-tooltip md-direction=top>{{\'mwForm.buttons.addPage\' | ngtranslate}}</md-tooltip><i class="fa fa-plus"></i></button></td></tr></table></div></div>'),e.put("mw-form-page-element-builder.html",'<div class=mw-form-page-element-builder-wrapper><div class=mw-form-page-element-builder ng-class="{\'active\': ctrl.isActive, \'inactive draggable\': !ctrl.isActive}"><div class=mw-page-element-actions-tab ng-switch=ctrl.isActive&&!ctrl.readOnly><span class=mw-additional-buttons><button type=button ng-click=ctrl.callback($event,button) ng-attr-title="{{button.title | ngtranslate}}" ng-class=button.cssClass class=edit-button aria-label="{{button.title | ngtranslate}}" aria-hidden=false ng-if="ctrl.filter(button) && !ctrl.readOnly" ng-repeat="button in ctrl.options.elementButtons"><md-tooltip md-direction=top><span>{{button.title | ngtranslate}}</span></md-tooltip><i class={{button.icon}}></i> {{button.text}}</button></span> <span ng-switch-when=true><button type=button class=move-down-button ng-click=ctrl.moveDown() ng-if=!ctrl.isLast ng-attr-title="{{\'mwForm.buttons.moveDown\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.moveDown>moveDown</span></md-tooltip><i class="fa fa-chevron-down"></i></button> <button type=button class=move-up-button ng-click=ctrl.moveUp() ng-if=!ctrl.isFirst ng-attr-title="{{\'mwForm.buttons.moveUp\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.moveUp>moveUp</span></md-tooltip><i class="fa fa-chevron-up"></i></button> <button type=button class=remove-button mw-confirm-click confirmed-action=ctrl.removeElement() ng-attr-title="{{\'mwForm.buttons.remove\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.remove>remove</span></md-tooltip><i class="fa fa-trash"></i></button></span> <span ng-switch-when=false><button type=button aria-label="{{\'mwForm.buttons.clone\' | ngtranslate}}" aria-hidden=false class=edit-button ng-click=ctrl.cloneElement($event) ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.clone\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.clone>clone</span></md-tooltip><i class="fa fa-clone"></i></button> <button type=button aria-label="{{\'mwForm.buttons.edit\' | ngtranslate}}" aria-hidden=false class=edit-button ng-click=ctrl.editElement() ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.edit\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.edit>edit</span></md-tooltip><i class="fa fa-pencil"></i></button> <button type=button aria-label="{{\'mwForm.buttons.view\' | ngtranslate}}" aria-hidden=false class=edit-button ng-click=ctrl.editElement() ng-if=ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.view\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.view>view</span></md-tooltip><i class="fa fa-eye"></i></button></span></div><div ng-switch=ctrl.pageElement.type><mw-form-question-builder ng-switch-when=question question=ctrl.pageElement.question form-object=ctrl.formObject on-ready=ctrl.onReady() is-preview=!ctrl.isActive read-only=ctrl.readOnly></mw-form-question-builder><mw-form-image-builder ng-switch-when=image image=ctrl.pageElement.image form-object=ctrl.formObject on-ready=ctrl.onReady() is-preview=!ctrl.isActive read-only=ctrl.readOnly on-image-selection=ctrl.onImageSelection()></mw-form-image-builder><mw-form-paragraph-builder ng-switch-when=paragraph paragraph=ctrl.pageElement.paragraph form-object=ctrl.formObject on-ready=ctrl.onReady() is-preview=!ctrl.isActive read-only=ctrl.readOnly></mw-form-paragraph-builder></div></div></div>'),e.put("mw-form-paragraph-builder.html",'<div class=mw-form-paragraph-builder-wrapper><div class=mw-form-paragraph-builder ng-class="{\'ng-submitted\':ctrl.formSubmitted}"><div class=paragraph-editor ng-form=ctrl.form ng-if=!ctrl.isPreview><md-input-container class=md-block><mw-label label-for=paragraph-textarea-{{ctrl.id}} label-key=mwForm.paragraph.placeholder></mw-label><textarea msd-elastic class="form-control mw-form-paragraph-textarea" ng-model=ctrl.paragraph.html required ng-attr-id=paragraph-textarea-{{ctrl.id}} ng-readonly=ctrl.readOnly></textarea></md-input-container><div layout=row><br><md-button class="md-primary md-raised" type=button role=button ng-click=ctrl.save() translate=mwForm.buttons.questionReady>Ready</md-button></div></div><div class=mw-preview ng-if=ctrl.isPreview><p ng-bind-html=ctrl.paragraph.html></p></div></div></div>'),e.put("mw-form-question-builder.html",'<div class=mw-form-question-builder-wrapper><div class=mw-form-question-builder ng-class="{\'ng-submitted\':ctrl.formSubmitted}"><div ng-form=ctrl.form ng-if=!ctrl.isPreview><div class=form-horizontal><md-input-container class=md-block><mw-label label-for=question-text-{{ctrl.id}} label-key=mwForm.question.text></mw-label><input type=text name=text ng-attr-id=question-text-{{ctrl.id}} ng-model=ctrl.question.text ng-readonly=ctrl.readOnly required></md-input-container><div class=mw-question-type layout=row layout-align="start center"><md-input-container flex-gt-md=30><mw-label label-for=question-type-{{ctrl.id}} label-class="col-sm-2 control-label" label-key=mwForm.question.type></mw-label><md-select ng-attr-id=question-type-{{ctrl.id}} ng-model=ctrl.question.type ng-change=ctrl.questionTypeChanged() ng-disabled=ctrl.readOnly required><md-option ng-repeat="type in ctrl.questionTypes" ng-value=type>{{\'mwForm.question.types.\'+type+\'.name\'|ngtranslate}}</md-option></md-select></md-input-container><div flex flex-offset-gt-md=5><md-checkbox ng-if="ctrl.question.type==\'radio\' || ctrl.question.type==\'select\'" ng-model=ctrl.question.pageFlowModifier ng-change=ctrl.pageFlowModifierChanged() ng-readonly=ctrl.readOnly aria-label="Go to page"><span translate=mwForm.pageFlow.afterQuestionAnswer>Przejdź do strony w oparciu o odpowiedź</span></md-checkbox></div></div><div class="form-group mw-question-type" ng-repeat="select in ctrl.options.customQuestionSelects"><mw-label label-for=question-{{select.key}}-{{ctrl.id}} label-class="col-sm-2 control-label" label-key={{select.label}}></mw-label><div class="col-sm-10 form-inline"><select ng-attr-id=question-{{opt.key}}-{{ctrl.id}} ng-options="opt.label for opt in select.options track by opt.key" ng-model=ctrl.question[select.key] class=form-control ng-disabled=ctrl.readOnly ng-required=select.required></select></div></div></div><div ng-if=ctrl.question.type><div class=mw-form-question-answers-builder ng-switch=ctrl.question.type><div ng-if="ctrl.question.type==\'text\'"><md-input-container class=md-block><input class=form-control type=text disabled value="{{\'mwForm.question.preview.text\'|ngtranslate}}"></md-input-container></div><div ng-switch-when=textarea><md-input-container class=md-block><textarea class=form-control maxlength=150 rows=5 disabled>{{\'mwForm.question.preview.textarea\'|ngtranslate}}</textarea></md-input-container></div><div ng-switch-when=radio><mw-question-offered-answer-list-builder question=ctrl.question form-object=ctrl.formObject read-only=ctrl.readOnly></mw-question-offered-answer-list-builder></div><div ng-switch-when=select><mw-question-offered-answer-list-builder question=ctrl.question form-object=ctrl.formObject read-only=ctrl.readOnly disable-other-answer=true></mw-question-offered-answer-list-builder></div><div ng-switch-when=checkbox><mw-question-offered-answer-list-builder question=ctrl.question form-object=ctrl.formObject read-only=ctrl.readOnly></mw-question-offered-answer-list-builder></div><div ng-switch-when=priority><mw-question-priority-list-builder question=ctrl.question read-only=ctrl.readOnly></mw-question-priority-list-builder></div><div ng-switch-when=number class=form-inline><div class="range-config form-inline"><md-input-container><mw-label label-for=question-number-range-min-{{ctrl.id}} label-key=mwForm.question.number.min></mw-label><input ng-attr-id=question-number-range-min-{{ctrl.id}} class=form-control type=number ng-model=ctrl.question.min max={{ctrl.question.max}} ng-readonly=ctrl.readOnly></md-input-container><md-input-container><mw-label label-for=question-number-range-max-{{ctrl.id}} label-key=mwForm.question.number.max></mw-label><input ng-attr-id=question-number-range-max-{{ctrl.id}} class=form-control type=number min={{ctrl.question.min}} ng-model=ctrl.question.max ng-readonly=ctrl.readOnly></md-input-container></div><br><md-input-container><input class=form-control type=number disabled></md-input-container></div><div ng-switch-when=date class=form-inline><md-input-container><input class=form-control type=date disabled></md-input-container></div><div ng-switch-when=datetime class=form-inline><md-input-container><input class=form-control type=datetime disabled></md-input-container></div><div ng-switch-when=time class=form-inline><md-input-container><input class=form-control type=time disabled></md-input-container></div><div ng-switch-when=email class=form-inline><md-input-container><input class=form-control type=email disabled></md-input-container></div><div ng-switch-when=range><div class="range-config form-inline"><md-input-container><mw-label label-for=question-range-from-{{ctrl.id}} label-key=mwForm.question.range.from></mw-label><input ng-attr-id=question-range-from-{{ctrl.id}} type=number ng-model=ctrl.question.min max={{ctrl.question.max}} ng-readonly=ctrl.readOnly></md-input-container><md-input-container><mw-label label-for=question-range-to-{{ctrl.id}} label-key=mwForm.question.range.to></mw-label><input ng-attr-id=question-range-to-{{ctrl.id}} type=number min={{ctrl.question.min}} ng-model=ctrl.question.max ng-readonly=ctrl.readOnly></md-input-container></div><br><div class=mw-range><md-slider min=ctrl.question.min max=ctrl.question.max type=range disabled></md-slider></div></div><div ng-switch-when=url class=form-inline><input class=form-control type=url disabled></div><div ng-switch-when=star class=form-inline><div class="range-config form-inline"><span translate=mwForm.question.star.no>Number of stars</span> <input class=form-control type=number ng-model=ctrl.question.noStars min=3 max=10 step=1 required ng-readonly=ctrl.readOnly ng-init="ctrl.question.noStars = ctrl.question.noStars || 5"></div></div></div><div class=col-sm-12 ng-if="ctrl.question.type==\'grid\'"><mw-question-grid-builder question=ctrl.question read-only=ctrl.readOnly></mw-question-grid-builder></div><div class=col-sm-12 ng-if="ctrl.question.type==\'division\'"><mw-question-division-builder question=ctrl.question read-only=ctrl.readOnly></mw-question-division-builder></div></div><br><br><div layout=row layout-align="start center"><div flex=20><md-button class="md-primary md-raised" type=button role=button ng-click=ctrl.save() translate=mwForm.buttons.questionReady>Ready</md-button></div><div flex><md-checkbox ng-model=ctrl.question.required ng-disabled=ctrl.readOnly flex><span translate=mwForm.question.required>Required</span></md-checkbox></div></div></div><div class=mw-preview ng-if=ctrl.isPreview><div class=mw-question-text>{{ctrl.question.text}} <span ng-if=ctrl.question.required>*</span></div><div class=question-answers ng-switch=ctrl.question.type><div ng-switch-when=text><md-input-container class=md-block><input class=form-control type=text disabled value="{{\'mwForm.question.preview.text\'|ngtranslate}}"></md-input-container></div><div ng-switch-when=number class=form-inline><md-input-container><input class=form-control type=number disabled></md-input-container></div><div ng-switch-when=date class=form-inline><md-input-container><input class=form-control type=date disabled></md-input-container></div><div ng-switch-when=datetime class=form-inline><md-input-container><input class=form-control type=datetime disabled></md-input-container></div><div ng-switch-when=time class=form-inline><md-input-container><input class=form-control type=time disabled></md-input-container></div><div ng-switch-when=email class=form-inline><md-input-container><input class=form-control type=email disabled></md-input-container></div><div ng-switch-when=range class=mw-range><md-slider min=ctrl.question.min max=ctrl.question.max type=range disabled></md-slider></div><div ng-switch-when=url class=form-inline><md-input-container class=md-block><input class=form-control type=url disabled></md-input-container></div><div ng-switch-when=textarea><md-input-container class=md-block><textarea class=form-control type=text disabled>{{\'mwForm.question.preview.textarea\'|ngtranslate}}</textarea></md-input-container></div><div ng-switch-when=radio><md-radio-group disabled><md-radio-button ng-repeat="answer in ctrl.question.offeredAnswers" aria-label="{{ answer.value }}">{{answer.value}}</md-radio-button><div layout=row layout-align="start center" class=mw-question-other-answer ng-if=ctrl.question.otherAnswer><div><md-radio-button disabled><span translate=mwForm.question.preview.otherAnswer>Inna</span>:</md-radio-button></div><div><md-input-container><input type=text class=form-control disabled></md-input-container></div></div></md-radio-group></div><div ng-switch-when=checkbox><div ng-repeat="answer in ctrl.question.offeredAnswers"><md-checkbox disabled>{{answer.value}}</md-checkbox></div><div layout=row layout-align="start center" class=mw-question-other-answer ng-if=ctrl.question.otherAnswer><div><md-checkbox disabled><span translate=mwForm.question.preview.otherAnswer>Inna</span>:</md-checkbox></div><div><md-input-container><input type=text class=form-control disabled></md-input-container></div></div></div><div ng-switch-when=select><md-input-container><md-select ng-disabled=true ng-model=ctrl.selectAnswerMock><md-option ng-repeat="answer in ctrl.question.offeredAnswers" ng-value=answer.id>{{answer.value}}</md-option></md-select></md-input-container></div><div ng-switch-when=grid><div class=table-responsive><table class="mw-data-table mw-no-border" border=0 cellpadding=5 cellspacing=0><thead><tr><td></td><td ng-repeat="col in ctrl.question.grid.cols"><label>{{col.label}}</label></td></tr></thead><tbody><tr ng-repeat="row in ctrl.question.grid.rows"><td>{{row.label}}</td><td ng-repeat="col in ctrl.question.grid.cols" ng-switch=ctrl.question.grid.cellInputType><md-radio-group ng-switch-when=radio><md-radio-button></md-radio-button></md-radio-group><div ng-switch-when=checkbox><md-checkbox></md-checkbox></div><md-input-container ng-switch-default><input ng-attr-type={{ctrl.question.grid.cellInputType}} disabled ng-class="\'form-control\'"></md-input-container></td></tr></tbody></table></div></div><div class=mw-priority-list ng-switch-when=priority><table><thead><tr><th translate=mwForm.question.priority.sorted>Sorted</th><th translate=mwForm.question.priority.available>Available</th></tr></thead><tbody><tr><td class=mw-ordered-items></td><td class=mw-available-items><div class=mw-item ng-repeat="item in ctrl.question.priorityList">{{::item.value}}</div></td></tr></tbody></table></div><div ng-switch-when=division class=mw-division-list><div class=form-inline style="margin-bottom: 5px" ng-repeat="item in ctrl.question.divisionList"><div class=form-group><label>{{item.value}}</label><md-input-container md-no-float><input type=number class=form-control style="width: 80px"></md-input-container><span>{{ctrl.question.unit}}</span></div></div><div class=form-inline style="margin-bottom: 5px"><div class=form-group><label translate=mwForm.question.division.assignedSumLabel>Przydzielono</label><md-input-container md-no-float><input type=number class="form-control strict-validation" style="width: 80px" readonly value=0></md-input-container><span>{{ctrl.question.unit}} <span translate=mwForm.question.division.fromRequiredLabel>z wymaganych</span> <strong>{{ctrl.question.quantity}}</strong> {{ctrl.question.unit}}</span></div></div></div><div ng-switch-when=star class=stars><span ng-repeat="n in [].constructor(ctrl.question.noStars) track by $index"><i class="fa fa-star star"></i></span></div></div></div></div></div>'),e.put("mw-label.html","<label ng-attr-for={{::ctrl.labelFor}} ng-attr-class={{::ctrl.labelClass}}>{{ctrl.labelKey|ngtranslate:ctrl.labelTranslateValues}}</label>"),e.put("mw-question-division-builder.html",'<div class=mw-question-division-builder><div><div><md-input-container><mw-label label-for=division-quantity-{{ctrl.question.id}} label-class="col-sm-2 control-label" label-key=mwForm.question.division.quantity></mw-label><div class="col-sm-10 col-md-8 form-inline"><input ng-attr-id=division-quantity-{{ctrl.question.id}} type=number ng-model=ctrl.question.quantity required class=form-control min=1 ng-readonly=ctrl.readOnly></div></md-input-container><md-input-container><mw-label label-for=division-unit-{{ctrl.question.id}} label-class="col-sm-2 control-label" label-key=mwForm.question.division.unit></mw-label><div class="col-sm-10 col-md-8 form-inline"><input ng-attr-id=division-unit-{{ctrl.question.id}} type=text ng-model=ctrl.question.unit required class=form-control ng-readonly=ctrl.readOnly></div></md-input-container></div></div><div><div class=question-division-list ng-sortable=ctrl.itemsSortableConfig ng-model=ctrl.question.divisionList role=list><div class=mw-question-division-list-item ng-repeat="item in ctrl.question.divisionList" role=listitem><div class=drag-handle ng-if=!ctrl.readOnly><i class="fa fa-arrows-v fa-lg handle-inner"></i></div><md-input-container><input wd-focus-me=ctrl.isNewItem[item.id] type=text ng-model=item.value ng-keypress=ctrl.keyPressedOnInput($event,item) required class="form-control item-value" ng-readonly=ctrl.readOnly></md-input-container><md-button role=button class="md-raised md-icon-button remove-item-button" ng-click=ctrl.removeItem(item) ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.remove\' | ngtranslate}}"><md-tooltip md-direction=top>{{\'mwForm.buttons.remove\' | ngtranslate}}</md-tooltip><i class="fa fa-times"></i></md-button></div></div><div class="mw-question-division-list-item add-new-item-widget"><div class=drag-handle></div><md-input-container><span ng-click=ctrl.addNewItem() role=button ng-if=!ctrl.readOnly><input type=text required class=form-control value="{{\'mwForm.question.priority.clickToAddItem\'|ngtranslate}}"></span></md-input-container></div></div></div>'),e.put("mw-question-grid-builder.html",'<div class=mw-question-grid-builder><div class=mw-grid-rows-builder><div><div style="margin-top: 20px;" layout=row layout-align="start center"><md-input-container flex-gt-md=30><mw-label label-for=mw-grid-cell-input-type-{{ctrl.question.id}} label-class="col-sm-2 control-label" label-key=mwForm.question.grid.cellInputType></mw-label><md-select ng-attr-id=mw-grid-cell-input-type-{{ctrl.question.id}} ng-model=ctrl.question.grid.cellInputType ng-disabled=ctrl.readOnly required><md-option ng-repeat="opt in ctrl.cellInputTypes" ng-value=opt>{{\'mwForm.question.grid.cellInputTypes.\'+opt|ngtranslate}}</md-option></md-select></md-input-container></div></div><div class=mw-grid-row-list ng-sortable=ctrl.rowsSortableConfig ng-model=ctrl.question.grid.rows role=list><div class="mw-grid-item form-group" ng-repeat="row in ctrl.question.grid.rows" role=listitem layout=row layout-align="start center"><div flex-gt-xs=20><mw-label label-for=mw-grid-row-{{row.id}}-label label-class=col-sm-2 label-key=mwForm.question.grid.rowLabel label-translate-values="{row: row.orderNo}"></mw-label></div><div flex><div class=drag-handle><i class="fa fa-arrows-v fa-lg handle-inner"></i></div><md-input-container><input ng-attr-id=mw-grid-row-{{row.id}}-label wd-focus-me=ctrl.isNewInput[row.id] type=text ng-model=row.label ng-keypress="ctrl.keyPressedOnInput($event,row, \'row\')" required class="form-control mw-item-label-value" ng-readonly=ctrl.readOnly></md-input-container><md-button role=button class="md-raised md-icon-button remove-item-button" ng-click=ctrl.removeRow(row) ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.remove\' | ngtranslate}}"><md-tooltip md-direction=top>{{\'mwForm.buttons.remove\' | ngtranslate}}</md-tooltip><i class="fa fa-times"></i></md-button></div></div></div><div class="mw-grid-item form-group add-new-item-widget" ng-if=!ctrl.readOnly layout=row layout-align="start center"><div flex-gt-xs=20><label translate=mwForm.question.grid.rowLabel translate-values="{row: ctrl.question.grid.rows.length+1}">Etykieta wiersza {{ctrl.question.grid.rows.length+1}}</label></div><div flex><div class=drag-handle></div><span ng-click=ctrl.addNewRow() role=button><md-input-container><input type=text required class=form-control value="{{\'mwForm.question.grid.clickToAddRow\'|ngtranslate}}"></md-input-container></span></div></div></div><div class=row><div class="mw-grid-separator col-sm-9 col-sm-offset-1"></div></div><div class="form-horizontal mw-grid-cols-builder"><div class=mw-grid-col-list ng-sortable=ctrl.colsSortableConfig ng-model=ctrl.question.grid.cols role=list><div class="mw-grid-item form-group" ng-repeat="col in ctrl.question.grid.cols" role=listitem layout=row layout-align="start center"><div flex-gt-xs=20><mw-label label-for=mw-grid-col-{{col.id}}-label label-class="col-sm-2 control-label" label-key=mwForm.question.grid.columnLabel label-translate-values="{col: col.orderNo}"></mw-label></div><div flex><div class=drag-handle><i class="fa fa-arrows-v fa-lg handle-inner"></i></div><md-input-container><input ng-attr-id=mw-grid-col-{{col.id}}-label wd-focus-me=ctrl.isNewInput[col.id] type=text ng-model=col.label ng-keypress="ctrl.keyPressedOnInput($event,col, \'col\')" required class="form-control mw-item-label-value" ng-readonly=ctrl.readOnly></md-input-container><md-button role=button class="md-raised md-icon-button remove-item-button" ng-click=ctrl.removeCol(col) ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.remove\' | ngtranslate}}"><md-tooltip md-direction=top>{{\'mwForm.buttons.remove\' | ngtranslate}}</md-tooltip><i class="fa fa-times"></i></md-button></div></div></div><div class="mw-grid-item form-group add-new-item-widget" ng-if=!ctrl.readOnly layout=row layout-align="start center"><div flex-gt-xs=20><label class="col-sm-2 control-label" translate=mwForm.question.grid.columnLabel translate-values="{col: ctrl.question.grid.cols.length+1}">Etykieta kolumny {{ctrl.question.grid.cols.length+1}}</label></div><div flex><div class=drag-handle></div><span ng-click=ctrl.addNewCol() role=button><md-input-container><input type=text required class=form-control value="{{\'mwForm.question.grid.clickToAddColumn\'|ngtranslate}}"></md-input-container></span></div></div></div></div>'),e.put("mw-question-offered-answer-list-builder.html",'<div class=question-offered-answer-list-builder><div class=question-offered-answer-list ng-sortable=ctrl.offeredAnswersSortableConfig ng-model=ctrl.question.offeredAnswers role=list><div class=mw-question-offered-answer ng-repeat="answer in ctrl.question.offeredAnswers" role=listitem><div class=drag-handle ng-if=!ctrl.readOnly><i class="fa fa-arrows-v fa-lg handle-inner"></i></div><div class=option-type-indicator><i ng-if="ctrl.question.type==\'radio\'" class="fa fa-circle-thin fa-fw"></i> <i ng-if="ctrl.question.type==\'checkbox\'" class="fa fa-square-o fa-fw"></i></div><md-input-container><input wd-focus-me=ctrl.isNewAnswer[answer.id] type=text ng-model=answer.value ng-keypress=ctrl.keyPressedOnInput($event,answer) required class="form-control offered-answer-value" ng-readonly=ctrl.readOnly></md-input-container><md-button role=button class="md-raised md-icon-button remove-item-button" ng-click=ctrl.removeOfferedAnswer(answer) ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.remove\' | ngtranslate}}"><md-tooltip md-direction=top>{{\'mwForm.buttons.remove\' | ngtranslate}}</md-tooltip><i class="fa fa-times"></i></md-button><span ng-if=ctrl.question.pageFlowModifier class=form-inline><md-input-container><md-select ng-model=answer.pageFlow ng-disabled=ctrl.readOnly><md-option ng-value=pageFlow ng-repeat="pageFlow in ctrl.possiblePageFlow">{{ pageFlow.label|ngtranslate:pageFlow }}</md-option></md-select></md-input-container></span></div></div><div class="mw-question-offered-answer add-new-answer-widget" ng-if=!ctrl.readOnly><div class=drag-handle></div><div class=option-type-indicator><i ng-if="ctrl.question.type==\'radio\'" class="fa fa-circle-thin fa-fw"></i> <i ng-if="ctrl.question.type==\'checkbox\'" class="fa fa-square-o fa-fw"></i></div><span ng-click=ctrl.addNewOfferedAnswer() role=button><md-input-container><input type=text class="form-control offered-answer-value" value="{{\'mwForm.question.buttons.addOption\'|ngtranslate}}"></md-input-container></span> <span class=add-custom-answer ng-if="!ctrl.disableOtherAnswer && !ctrl.question.otherAnswer"><span translate=mwForm.question.orLabel>or</span><md-button role=button ng-click=ctrl.addCustomAnswer() translate=mwForm.question.buttons.addOther>Dodaj "Inne"</md-button></span></div><div class="mw-question-offered-answer custom-answer" ng-if=ctrl.question.otherAnswer><div class=drag-handle ng-if=!ctrl.readOnly></div><div class=option-type-indicator><i ng-if="ctrl.question.type==\'radio\'" class="fa fa-circle-thin fa-fw"></i> <i ng-if="ctrl.question.type==\'checkbox\'" class="fa fa-square-o fa-fw"></i></div><label translate=mwForm.question.otherLabel>Inna:</label><md-input-container><input type=text value="{{\'mwForm.question.userAnswer\'|ngtranslate}}" class="form-control offered-answer-value" readonly></md-input-container><md-button type=button role=button class="md-raised md-icon-button remove-item-button" ng-click=ctrl.removeCustomAnswer() ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.remove\' | ngtranslate}}"><md-tooltip md-direction=top>{{\'mwForm.buttons.remove\' | ngtranslate}}</md-tooltip><i class="fa fa-times"></i></md-button></div></div>'),e.put("mw-question-priority-list-builder.html",'<div class=mw-question-priority-list-builder><div class=question-priority-list ng-sortable=ctrl.itemsSortableConfig ng-model=ctrl.question.priorityList role=list><div class=mw-question-priority-list-item ng-repeat="item in ctrl.question.priorityList" role=listitem><div class=drag-handle ng-if=!ctrl.readOnly><i class="fa fa-arrows-v fa-lg handle-inner"></i></div><md-input-container><input wd-focus-me=ctrl.isNewItem[item.id] type=text ng-model=item.value ng-keypress=ctrl.keyPressedOnInput($event,item) required class="form-control item-value" ng-readonly=ctrl.readOnly></md-input-container><md-button role=button class="md-raised md-icon-button remove-item-button" ng-click=ctrl.removeItem(item) ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.remove\' | ngtranslate}}"><md-tooltip md-direction=top>{{\'mwForm.buttons.remove\' | ngtranslate}}</md-tooltip><i class="fa fa-times"></i></md-button></div></div><div class="mw-question-priority-list-item add-new-item-widget"><div class=drag-handle></div><span ng-click=ctrl.addNewItem() role=button><md-input-container><input type=text required class=form-control value="{{\'mwForm.question.priority.clickToAddItem\'|ngtranslate}}"></md-input-container></span></div></div>')}]),angular.module("mwFormViewer",["ngSanitize","ui.bootstrap","ng-sortable","pascalprecht.translate"]).config(["$translateProvider",function(e){e.useStaticFilesLoader({prefix:"bower_components/insight-surveys/dist/i18n/",suffix:"/angular-surveys.json"}),e.useSanitizeValueStrategy("sanitize"),e.preferredLanguage("en")}]).filter("ngtranslate",["$parse","$translate",function(a,o){"use strict";var e=function(e,t,n,r){if(!angular.isObject(t)){var i=this||{__SCOPE_IS_NOT_AVAILABLE:"More info at https://github.com/angular/angular.js/commit/8863b9d04c722b278fa93c5d66ad1e578ad6eb1f"};t=a(t)(i)}return o.instant(e,t,n,r)};return o.statefulFilter()&&(e.$stateful=!0),e}]),angular.module("mwFormViewer").directive("mwPriorityList",function(){return{replace:!0,restrict:"AE",require:"^mwFormQuestion",scope:{question:"=",questionResponse:"=",readOnly:"=?",options:"=?"},templateUrl:"mw-priority-list.html",controllerAs:"ctrl",bindToController:!0,controller:function(){function n(e){if(e)for(var t=0;t<e.length;t++){e[t].priority=t+1}}var r=this;this.$onInit=function(){r.questionResponse.priorityList||(r.questionResponse.priorityList=[]),r.idToItem={},r.questionResponse.priorityList.sort(function(e,t){return e.priority-t.priority}),r.availableItems=[],r.question.priorityList.forEach(function(t){r.idToItem[t.id]=t,r.questionResponse.priorityList.some(function(e){return t.id==e.id})||r.availableItems.push({priority:null,id:t.id})}),r.allItemsOrdered=0==r.availableItems.length||null;var e={disabled:r.readOnly,ghostClass:"beingDragged"};r.orderedConfig=angular.extend({},e,{group:{name:"A",pull:!1,put:["B"]},onEnd:function(e,t){n(r.questionResponse.priorityList)}}),r.availableConfig=angular.extend({},e,{sort:!1,group:{name:"B",pull:["A"],put:!1},onEnd:function(e,t){n(r.questionResponse.priorityList),r.allItemsOrdered=0==r.availableItems.length||null}})},1===angular.version.major&&angular.version.minor<5&&this.$onInit()},link:function(e,t,n,r){e.ctrl.print=r.print}}}),angular.module("mwFormViewer").directive("mwFormViewer",["$rootScope",function(a){return{replace:!0,restrict:"AE",scope:{formData:"=",responseData:"=",templateData:"=?",readOnly:"=?",options:"=?",formStatus:"=?",onSubmit:"&",api:"=?"},templateUrl:"mw-form-viewer.html",controllerAs:"ctrl",bindToController:!0,controller:["$scope","$timeout","$interpolate",function(e,t,n){function r(){var t=1;void 0!==i.formData.pages&&i.formData.pages.forEach(function(e){void 0!==e.elements&&e.elements.forEach(function(e){"question"==e.type&&void 0!==e.question&&(e.question.number=t++)})})}var i=this;i.$onInit=function(){i.defaultOptions={nestedForm:!1,autoStart:!1,disableSubmit:!1},i.options=angular.extend({},i.defaultOptions,i.options),i.submitStatus="NOT_SUBMITTED",i.formSubmitted=!1,i.formData.pages.sort(function(e,t){return e.number-t.number}),i.pageIdToPage={},i.formData.pages.forEach(function(e){i.pageIdToPage[e.id]=e}),i.buttons={prevPage:{visible:!1,disabled:!1},nextPage:{visible:!1,disabled:!1},submitForm:{visible:!1,disabled:!1}},i.resetPages(),i.api&&(i.api.reset=function(){for(var e in i.responseData)i.responseData.hasOwnProperty(e)&&delete i.responseData[e];i.buttons.submitForm.visible=!1,i.buttons.prevPage.visible=!1,i.buttons.nextPage.visible=!1,i.currentPage=null,t(i.resetPages,0)}),setTimeout(function(){r()},0),e.$watch("ctrl.formData",function(e,t){r()})},i.submitForm=function(){i.formSubmitted=!0,i.submitStatus="IN_PROGRESS",i.setCurrentPage(null),i.onSubmit().then(function(){i.submitStatus="SUCCESS"}).catch(function(){i.submitStatus="ERROR"})},i.setCurrentPage=function(e){return(i.currentPage=e)?(i.setDefaultNextPage(),void i.initResponsesForCurrentPage()):(i.buttons.submitForm.visible=!1,i.buttons.prevPage.visible=!1,void(i.buttons.nextPage.visible=!1))},i.setDefaultNextPage=function(){var e=i.formData.pages.indexOf(i.currentPage);if(i.currentPage.isFirst=0==e,i.currentPage.isLast=e==i.formData.pages.length-1,i.buttons.submitForm.visible=i.currentPage.isLast,i.buttons.prevPage.visible=!i.currentPage.isFirst,i.buttons.nextPage.visible=!i.currentPage.isLast,i.currentPage.isLast?i.nextPage=null:i.nextPage=i.formData.pages[e+1],i.currentPage.pageFlow){var t=!1;i.currentPage.pageFlow.formSubmit?t=!(i.nextPage=null):i.currentPage.pageFlow.page?(i.nextPage=i.pageIdToPage[i.currentPage.pageFlow.page.id],i.buttons.nextPage.visible=!0):i.currentPage.isLast&&(t=!(i.nextPage=null)),i.buttons.submitForm.visible=t,i.buttons.nextPage.visible=!t}},i.initResponsesForCurrentPage=function(){i.currentPage.elements.forEach(function(e){var t=e.question;t&&!i.responseData[t.id]&&(i.responseData[t.id]={})})},i.beginResponse=function(){0<i.formData.pages.length&&(i.setCurrentPage(i.formData.pages[0]),a.$broadcast("mwForm.pageEvents.pageCurrentChanged",{currentPage:i.currentPage}))},i.resetPages=function(){i.prevPages=[],i.currentPage=null,i.nextPage=null,i.formSubmitted=!1,i.options.autoStart&&i.beginResponse()},i.goToPrevPage=function(){var e=i.prevPages.pop();i.setCurrentPage(e),i.updateNextPageBasedOnAllAnswers(),a.$broadcast("mwForm.pageEvents.pageCurrentChanged",{currentPage:i.currentPage})},i.goToNextPage=function(){i.prevPages.push(i.currentPage),i.updateNextPageBasedOnAllAnswers(),i.setCurrentPage(i.nextPage),a.$broadcast("mwForm.pageEvents.pageCurrentChanged",{currentPage:i.currentPage})},i.updateNextPageBasedOnAllAnswers=function(){i.currentPage.elements.forEach(function(e){i.updateNextPageBasedOnPageElementAnswers(e)}),i.buttons.submitForm.visible=!i.nextPage,i.buttons.nextPage.visible=!!i.nextPage},i.updateNextPageBasedOnPageElementAnswers=function(e){var t=e.question;t&&t.pageFlowModifier&&t.offeredAnswers.forEach(function(e){e.pageFlow&&i.responseData[t.id].selectedAnswer==e.id&&(e.pageFlow.formSubmit?i.nextPage=null:e.pageFlow.page&&(i.nextPage=i.pageIdToPage[e.pageFlow.page.id]))})},i.onResponseChanged=function(e){i.setDefaultNextPage(),i.updateNextPageBasedOnAllAnswers()},i.print=function(e){return e&&i.templateData?n(e)(i.templateData):e},1===angular.version.major&&angular.version.minor<5&&i.$onInit()}],link:function(e,t,n){var i=e.ctrl;i.formStatus&&(i.formStatus.form=i.form),e.$on("mwForm.pageEvents.changePage",function(e,t){if(void 0!==t.page&&t.page<i.formData.pages.length){i.resetPages();for(var n=0;n<t.page;n++)i.prevPages.push(i.formData.pages[n]);var r=i.formData.pages[t.page];i.setCurrentPage(r),a.$broadcast("mwForm.pageEvents.pageCurrentChanged",{currentPage:r}),i.updateNextPageBasedOnAllAnswers()}})}}}]),angular.module("mwFormViewer").factory("FormQuestionId",function(){var e=0;return{next:function(){return++e}}}).directive("mwFormQuestion",function(){return{replace:!0,restrict:"AE",require:"^mwFormViewer",scope:{question:"=",questionResponse:"=",readOnly:"=?",options:"=?",onResponseChanged:"&?"},templateUrl:"mw-form-question.html",controllerAs:"ctrl",bindToController:!0,controller:["$timeout","FormQuestionId",function(e,t){var n=this;this.$onInit=function(){n.id=t.next(),"radio"==n.question.type?(n.questionResponse.selectedAnswer||(n.questionResponse.selectedAnswer=null),n.questionResponse.other&&(n.isOtherAnswer=!0)):"checkbox"==n.question.type?(n.questionResponse.selectedAnswers&&n.questionResponse.selectedAnswers.length?n.selectedAnswer=!0:n.questionResponse.selectedAnswers=[],n.questionResponse.other&&(n.isOtherAnswer=!0)):"grid"==n.question.type?n.question.grid.cellInputType||(n.question.grid.cellInputType="radio"):"division"==n.question.type?(n.computeDivisionSum=function(){n.divisionSum=0,n.question.divisionList.forEach(function(e){0==n.questionResponse[e.id]||n.questionResponse[e.id]?n.divisionSum+=n.questionResponse[e.id]:(n.questionResponse[e.id]=null,n.divisionSum+=0)})},n.computeDivisionSum()):"date"!=n.question.type&&"datetime"!=n.question.type&&"time"!=n.question.type||n.questionResponse.answer&&(n.questionResponse.answer=new Date(n.questionResponse.answer)),n.isAnswerSelected=!1,n.initialized=!0},n.selectedAnswerChanged=function(){delete n.questionResponse.other,n.isOtherAnswer=!1,n.answerChanged()},n.otherAnswerRadioChanged=function(){n.isOtherAnswer&&(n.questionResponse.selectedAnswer=null),n.answerChanged()},n.otherAnswerCheckboxChanged=function(){n.isOtherAnswer||delete n.questionResponse.other,n.selectedAnswer=!(!n.questionResponse.selectedAnswers.length&&!n.isOtherAnswer)||null,n.answerChanged()},n.toggleSelectedAnswer=function(e){-1===n.questionResponse.selectedAnswers.indexOf(e.id)?n.questionResponse.selectedAnswers.push(e.id):n.questionResponse.selectedAnswers.splice(n.questionResponse.selectedAnswers.indexOf(e.id),1),n.selectedAnswer=!(!n.questionResponse.selectedAnswers.length&&!n.isOtherAnswer)||null,n.answerChanged()},n.answerChanged=function(){n.onResponseChanged&&n.onResponseChanged()},1===angular.version.major&&angular.version.minor<5&&this.$onInit()}],link:function(e,t,n,r){e.ctrl.print=r.print}}}),angular.module("mwFormViewer").directive("mwFormConfirmationPage",function(){return{replace:!0,restrict:"AE",require:"^mwFormViewer",scope:{submitStatus:"=",confirmationMessage:"=",readOnly:"=?"},templateUrl:"mw-form-confirmation-page.html",controllerAs:"ctrl",bindToController:!0,controller:function(){},link:function(e,t,n,r){e.ctrl.print=r.print}}}),angular.module("mwFormViewer").run(["$templateCache",function(e){e.put("mw-form-confirmation-page.html","<div class=mw-form-confirmation-page><div class=mw-confirmation-message ng-if=\"ctrl.submitStatus=='SUCCESS'\"><span ng-if=ctrl.confirmationMessage>{{::ctrl.print(ctrl.confirmationMessage)}}</span> <span ng-if=!ctrl.confirmationMessage translate=mwForm.confirmationPage.defaultMessage>Twoja odpowiedź została zapisana</span></div><div class=mw-error-message ng-if=\"ctrl.submitStatus=='ERROR'\"><span translate=mwForm.confirmationPage.errorMessage>Bład. Twoja odpowiedź nie została zapisana.</span></div><div class=mw-pending-message ng-if=\"ctrl.submitStatus=='IN_PROGRESS'\"><span translate=mwForm.confirmationPage.pendingMessage>Zapisywanie odpowiedzi w trakcie.</span></div></div>"),e.put("mw-form-question.html",'<div class=mw-form-question><div class=mw-question-text>{{::ctrl.print(ctrl.question.text)}} <span ng-if=ctrl.question.required>*</span></div><div class=mw-question-answers ng-switch=ctrl.question.type><div ng-switch-when=text><md-input-container class=md-block md-no-float><input class=form-control type=text ng-model=ctrl.questionResponse.answer placeholder="{{\'mwForm.question.preview.text\'|ngtranslate}}" ng-required=ctrl.question.required ng-readonly=ctrl.readOnly></md-input-container></div><div ng-switch-when=textarea><md-input-container class=md-block md-no-float><textarea msd-elastic class=form-control ng-model=ctrl.questionResponse.answer placeholder="{{\'mwForm.question.preview.textarea\'|ngtranslate}}" ng-required=ctrl.question.required ng-readonly=ctrl.readOnly></textarea></md-input-container></div><div ng-switch-when=radio><md-radio-group ng-model=ctrl.questionResponse.selectedAnswer ng-required="ctrl.question.required &&!ctrl.isOtherAnswer" ng-disabled=ctrl.readOnly ng-change=ctrl.selectedAnswerChanged()><md-radio-button ng-repeat="answer in ctrl.question.offeredAnswers" aria-label="{{ answer.value }}" ng-value=answer.id name=answer-for-question-{{ctrl.question.id}} ng-readonly=ctrl.readOnly>{{::ctrl.print(answer.value)}}</md-radio-button></md-radio-group><md-radio-group ng-model=ctrl.isOtherAnswer ng-change=ctrl.otherAnswerRadioChanged() ng-disabled=ctrl.readOnly ng-readonly=ctrl.readOnly><div layout=row layout-align="start center" class=mw-question-other-answer ng-if=ctrl.question.otherAnswer><div><md-radio-button ng-model=ctrl.isOtherAnswer ng-value=true name=other-answer-for-question-{{ctrl.question.id}} ng-disabled=ctrl.readOnly ng-readonly=ctrl.readOnly><span translate=mwForm.question.preview.otherAnswer>Inna</span>:</md-radio-button></div><div><md-input-container><input type=text name=other-answer-for-question-{{ctrl.question.id}} ng-model=ctrl.questionResponse.other class=form-control ng-disabled="!ctrl.isOtherAnswer || ctrl.readOnly" ng-required=ctrl.isOtherAnswer></md-input-container></div></div></md-radio-group></div><div ng-switch-when=checkbox><div class=checkbox ng-repeat="answer in ::ctrl.question.offeredAnswers" ng-disabled=ctrl.readOnly ng-readonly=ctrl.readOnly><md-checkbox name=answer-for-question-{{ctrl.question.id}} ng-checked="ctrl.questionResponse.selectedAnswers.indexOf(answer.id) != -1" ng-click=ctrl.toggleSelectedAnswer(answer) ng-disabled=ctrl.readOnly ng-readonly=ctrl.readOnly>{{::ctrl.print(answer.value)}}</md-checkbox></div><div layout=row layout-align="start center" class=mw-question-other-answer ng-if=ctrl.question.otherAnswer><md-checkbox name=answer-for-question-{{ctrl.question.id}} ng-model=ctrl.isOtherAnswer ng-change=ctrl.otherAnswerCheckboxChanged() ng-readonly=ctrl.readOnly ng-disabled=ctrl.readOnly><span translate=mwForm.question.preview.otherAnswer>Inna</span>:</md-checkbox><div><md-input-container><input type=text ng-model=ctrl.questionResponse.other name=other-answer-for-question-{{ctrl.question.id}} class=form-control ng-disabled="!ctrl.isOtherAnswer || ctrl.readOnly" ng-required=ctrl.isOtherAnswer></md-input-container></div></div><input type=hidden ng-model=ctrl.selectedAnswer ng-required="ctrl.question.required &&!ctrl.isOtherAnswer"></div><div ng-switch-when=select><md-input-container><md-select ng-disabled=ctrl.readOnly ng-required=ctrl.question.required ng-model=ctrl.questionResponse.selectedAnswer><md-option ng-repeat="answer in ctrl.question.offeredAnswers" ng-value=answer.id>{{::ctrl.print(answer.value)}}</md-option></md-select></md-input-container></div><div ng-switch-when=grid><div><table class="mw-data-table mw-no-border" border=0 cellpadding=5 cellspacing=0><thead><tr><td></td><td ng-repeat="col in ::ctrl.question.grid.cols"><label>{{::ctrl.print(col.label)}}</label></td></tr></thead><tbody><tr ng-repeat="row in ::ctrl.question.grid.rows"><td>{{::ctrl.print(row.label)}}</td><td ng-repeat="col in ctrl.question.grid.cols" ng-switch=ctrl.question.grid.cellInputType><md-radio-group ng-switch-when=radio ng-model=ctrl.questionResponse[row.id] ng-required=ctrl.question.required ng-disabled=ctrl.readOnly><md-radio-button ng-value=col.id name=answer-for-question-{{row.id}} ng-disabled=ctrl.readOnly></md-radio-button></md-radio-group><div ng-switch-when=checkbox><md-checkbox ng-model=ctrl.questionResponse[row.id][col.id] name=answer-for-question-{{row.id}}-{{col.id}} ng-required=ctrl.question.required ng-disabled=ctrl.readOnly></md-checkbox></div><md-input-container ng-switch-default><input ng-attr-type={{ctrl.question.grid.cellInputType}} ng-model=ctrl.questionResponse[row.id][col.id] name=answer-for-question-{{row.id}}-{{col.id}} ng-required=ctrl.question.required ng-disabled=ctrl.readOnly></md-input-container></td></tr></tbody></table></div></div><div ng-switch-when=division class=mw-division-list ng-form=ctrl.divisionForm><div class=form-inline style="margin-bottom: 5px" ng-repeat="item in ctrl.question.divisionList"><div class=form-group><label>{{::ctrl.print(item.value)}}</label><md-input-container md-no-float><input type=number class=form-control ng-model=ctrl.questionResponse[item.id] min=0 max={{ctrl.question.quantity}} required style="width: 80px" ng-change=ctrl.computeDivisionSum() ng-readonly=ctrl.readOnly></md-input-container><span>{{::ctrl.print(ctrl.question.unit)}}</span></div></div><div class=form-inline style="margin-bottom: 5px"><div class=form-group><label translate=mwForm.question.division.assignedSumLabel>Przydzielono</label><md-input-container md-no-float><input type=number class="form-control strict-validation" ng-model=ctrl.divisionSum min={{ctrl.question.quantity}} max={{ctrl.question.quantity}} style="width: 80px" readonly></md-input-container><span>{{ctrl.question.unit}} <span translate=mwForm.question.division.fromRequiredLabel>z wymaganych</span> <strong>{{ctrl.question.quantity}}</strong> {{ctrl.question.unit}} <i ng-show=ctrl.divisionForm.$valid class="fa fa-check" style=color:#008000;></i></span></div></div></div><mw-priority-list ng-switch-when=priority question-response=ctrl.questionResponse question=ctrl.question read-only=ctrl.readOnly></mw-priority-list><div ng-switch-when=number class=form-inline><md-input-container><input class=form-control min={{ctrl.question.min}} max={{ctrl.question.max}} type=number ng-model=ctrl.questionResponse.answer ng-required=ctrl.question.required ng-readonly=ctrl.readOnly></md-input-container></div><div ng-switch-when=date class=form-inline><md-input-container><input class=form-control type=date ng-model=ctrl.questionResponse.answer ng-required=ctrl.question.required ng-readonly=ctrl.readOnly></md-input-container></div><div ng-switch-when=datetime class=form-inline><md-input-container><input class=form-control type=datetime ng-model=ctrl.questionResponse.answer ng-required=ctrl.question.required ng-readonly=ctrl.readOnly></md-input-container></div><div ng-switch-when=time class=form-inline><md-input-container><input class=form-control type=time ng-model=ctrl.questionResponse.answer ng-required=ctrl.question.required ng-readonly=ctrl.readOnly></md-input-container></div><div ng-switch-when=email class=form-inline><md-input-container><input class=form-control type=email ng-model=ctrl.questionResponse.answer ng-required=ctrl.question.required ng-readonly=ctrl.readOnly></md-input-container></div><div ng-switch-when=range class=mw-range><md-slider min={{ctrl.question.min}} max={{ctrl.question.max}} type=range ng-model=ctrl.questionResponse.answer ng-required=ctrl.question.required ng-disabled=ctrl.readOnly></md-slider><strong class=mw-range-value-label>{{ctrl.questionResponse.answer}}</strong></div><div ng-switch-when=url class=form-inline><md-input-container><input class=form-control type=url ng-model=ctrl.questionResponse.answer ng-required=ctrl.question.required ng-readonly=ctrl.readOnly></md-input-container></div><div ng-switch-when=star class=stars><input ng-repeat-start="n in [].constructor(ctrl.question.noStars) track by $index" type=radio id="{{\'star\' + (ctrl.question.noStars - $index)}}" ng-model=ctrl.questionResponse.answer ng-value="{{ctrl.question.noStars - $index}}" ng-required=ctrl.question.required> <label for="{{\'star\' + (ctrl.question.noStars - $index)}}" ng-show=!ctrl.readOnly class=star><i class="fa fa-star"></i></label> <span ng-show=ctrl.readOnly class=star><i class="fa fa-star"></i></span> <span ng-repeat-end class=stars-end></span></div></div></div>'),e.put("mw-form-viewer-content.html",'<div class=mw-form-viewer-content><h1 class=form-title>{{ctrl.formData.name}}</h1><div class=mw-title-page ng-if="!ctrl.currentPage && !ctrl.formSubmitted"><div class=mw-form-description>{{ctrl.formData.description}}</div><md-button type=button class="md-raised begin-response-button" ng-click=ctrl.beginResponse() translate=mwForm.buttons.begin>Rozpocznij</md-button></div><div class=mw-form-page ng-if=ctrl.currentPage><h2 class=mw-page-title ng-if="ctrl.currentPage.namedPage && ctrl.currentPage.name">{{ctrl.currentPage.name}}</h2><div class=mw-form-page-element-list><div class=mw-page-element ng-repeat="pageElement in ctrl.currentPage.elements" ng-switch=pageElement.type><mw-form-question ng-switch-when=question question=pageElement.question question-response=ctrl.responseData[pageElement.question.id] read-only=ctrl.readOnly on-response-changed=ctrl.onResponseChanged(pageElement)></mw-form-question><div class=image-element ng-switch-when=image><figure ng-class="\'align-\'+pageElement.image.align"><img ng-src={{pageElement.image.src}} ng-attr-alt=pageElement.image.caption><figcaption ng-if=pageElement.image.caption>{{pageElement.image.caption}}</figcaption></figure></div><div ng-switch-when=paragraph><p ng-bind-html=::ctrl.print(pageElement.paragraph.html)></p></div></div></div></div><mw-form-confirmation-page ng-if=ctrl.formSubmitted confirmation-message=ctrl.formData.confirmationMessage submit-status=ctrl.submitStatus></mw-form-confirmation-page><div class=mw-form-action-list><md-button type=button ng-if=ctrl.buttons.prevPage.visible class="md-raised prev-page-button" ng-click=ctrl.goToPrevPage()><i class="fa fa-chevron-left"></i> <span translate=mwForm.buttons.back>Wstecz</span></md-button><md-button type=button ng-disabled=ctrl.form.$invalid ng-if=ctrl.buttons.nextPage.visible class="md-raised next-page-button" ng-click=ctrl.goToNextPage()><span translate=mwForm.buttons.next>Dalej</span> <i class="fa fa-chevron-right"></i></md-button><md-button type=submit ng-disabled="ctrl.options.disableSubmit || ctrl.form.$invalid" ng-if="ctrl.buttons.submitForm.visible && !ctrl.readOnly" class="md-raised next-page-button" ng-click=ctrl.submitForm()><span translate=mwForm.buttons.submit>Submit</span></md-button></div></div>'),e.put("mw-form-viewer.html","<div class=mw-form-viewer><form ng-if=!ctrl.options.nestedForm name=ctrl.form role=form novalidate ng-include=\"'mw-form-viewer-content.html'\"></form><div ng-if=ctrl.options.nestedForm ng-form=ctrl.form ng-include=\"'mw-form-viewer-content.html'\"></div></div>"),e.put("mw-priority-list.html",'<div class=mw-priority-list><table><thead><tr><th translate=mwForm.question.priority.sorted>Sorted</th><th translate=mwForm.question.priority.available>Available</th></tr></thead><tbody><tr><td class=mw-ordered-items ng-sortable=ctrl.orderedConfig ng-model=ctrl.questionResponse.priorityList><div class=mw-item ng-repeat="item in ctrl.questionResponse.priorityList"><strong>{{$index+1}}.</strong> {{::ctrl.print(ctrl.idToItem[item.id].value)}}</div></td><td class=mw-available-items ng-sortable=ctrl.availableConfig ng-model=ctrl.availableItems><div class=mw-item ng-repeat="item in ctrl.availableItems">{{::ctrl.print(ctrl.idToItem[item.id].value)}}</div></td></tr></tbody></table><input type=hidden ng-model=ctrl.allItemsOrdered ng-required=ctrl.question.required></div>')}]),function(e,t){"object"==typeof exports&&exports&&"string"!=typeof exports.nodeName?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):(e.Mustache={},t(e.Mustache))}(this,function(w){var t=Object.prototype.toString,C=Array.isArray||function(e){return"[object Array]"===t.call(e)};function l(e){return"function"==typeof e}function A(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function s(e,t){return null!=e&&"object"==typeof e&&t in e}var r=RegExp.prototype.test;var i=/\S/;function S(e){return t=i,n=e,!r.call(t,n);var t,n}var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};var T=/\s*/,x=/\s+/,k=/\s*=/,E=/\s*\}/,D=/#|\^|\/|>|\{|&|=|!/;function I(e){this.string=e,this.tail=e,this.pos=0}function a(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function e(){this.cache={}}I.prototype.eos=function(){return""===this.tail},I.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},I.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},a.prototype.push=function(e){return new a(e,this)},a.prototype.lookup=function(e){var t,n=this.cache;if(n.hasOwnProperty(e))t=n[e];else{for(var r,i,a=this,o=!1;a;){if(0<e.indexOf("."))for(t=a.view,r=e.split("."),i=0;null!=t&&i<r.length;)i===r.length-1&&(o=s(t,r[i])),t=t[r[i++]];else t=a.view[e],o=s(a.view,e);if(o)break;a=a.parent}n[e]=t}return l(t)&&(t=t.call(this.view)),t},e.prototype.clearCache=function(){this.cache={}},e.prototype.parse=function(e,t){var n=this.cache,r=n[e];return null==r&&(r=n[e]=function(e,t){if(!e)return[];var n,r,i,a=[],o=[],s=[],c=!1,l=!1;function u(){if(c&&!l)for(;s.length;)delete o[s.pop()];else s=[];l=c=!1}function f(e){if("string"==typeof e&&(e=e.split(x,2)),!C(e)||2!==e.length)throw new Error("Invalid tags: "+e);n=new RegExp(A(e[0])+"\\s*"),r=new RegExp("\\s*"+A(e[1])),i=new RegExp("\\s*"+A("}"+e[1]))}f(t||w.tags);for(var d,h,p,m,g,_,b=new I(e);!b.eos();){if(d=b.pos,p=b.scanUntil(n))for(var v=0,y=p.length;v<y;++v)S(m=p.charAt(v))?s.push(o.length):l=!0,o.push(["text",m,d,d+1]),d+=1,"\n"===m&&u();if(!b.scan(n))break;if(c=!0,h=b.scan(D)||"name",b.scan(T),"="===h?(p=b.scanUntil(k),b.scan(k),b.scanUntil(r)):"{"===h?(p=b.scanUntil(i),b.scan(E),b.scanUntil(r),h="&"):p=b.scanUntil(r),!b.scan(r))throw new Error("Unclosed tag at "+b.pos);if(g=[h,p,d,b.pos],o.push(g),"#"===h||"^"===h)a.push(g);else if("/"===h){if(!(_=a.pop()))throw new Error('Unopened section "'+p+'" at '+d);if(_[1]!==p)throw new Error('Unclosed section "'+_[1]+'" at '+d)}else"name"===h||"{"===h||"&"===h?l=!0:"="===h&&f(p)}if(_=a.pop())throw new Error('Unclosed section "'+_[1]+'" at '+b.pos);return function(e){for(var t,n=[],r=n,i=[],a=0,o=e.length;a<o;++a)switch((t=e[a])[0]){case"#":case"^":r.push(t),i.push(t),r=t[4]=[];break;case"/":i.pop()[5]=t[2],r=0<i.length?i[i.length-1][4]:n;break;default:r.push(t)}return n}(function(e){for(var t,n,r=[],i=0,a=e.length;i<a;++i)(t=e[i])&&("text"===t[0]&&n&&"text"===n[0]?(n[1]+=t[1],n[3]=t[3]):(r.push(t),n=t));return r}(o))}(e,t)),r},e.prototype.render=function(e,t,n){var r=this.parse(e),i=t instanceof a?t:new a(t);return this.renderTokens(r,i,n,e)},e.prototype.renderTokens=function(e,t,n,r){for(var i,a,o,s="",c=0,l=e.length;c<l;++c)o=void 0,"#"===(a=(i=e[c])[0])?o=this.renderSection(i,t,n,r):"^"===a?o=this.renderInverted(i,t,n,r):">"===a?o=this.renderPartial(i,t,n,r):"&"===a?o=this.unescapedValue(i,t):"name"===a?o=this.escapedValue(i,t):"text"===a&&(o=this.rawValue(i)),void 0!==o&&(s+=o);return s},e.prototype.renderSection=function(e,t,n,r){var i=this,a="",o=t.lookup(e[1]);if(o){if(C(o))for(var s=0,c=o.length;s<c;++s)a+=this.renderTokens(e[4],t.push(o[s]),n,r);else if("object"==typeof o||"string"==typeof o||"number"==typeof o)a+=this.renderTokens(e[4],t.push(o),n,r);else if(l(o)){if("string"!=typeof r)throw new Error("Cannot use higher-order sections without the original template");null!=(o=o.call(t.view,r.slice(e[3],e[5]),function(e){return i.render(e,t,n)}))&&(a+=o)}else a+=this.renderTokens(e[4],t,n,r);return a}},e.prototype.renderInverted=function(e,t,n,r){var i=t.lookup(e[1]);if(!i||C(i)&&0===i.length)return this.renderTokens(e[4],t,n,r)},e.prototype.renderPartial=function(e,t,n){if(n){var r=l(n)?n(e[1]):n[e[1]];return null!=r?this.renderTokens(this.parse(r),t,n,r):void 0}},e.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return n},e.prototype.escapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return w.escape(n)},e.prototype.rawValue=function(e){return e[1]},w.name="mustache.js",w.version="2.3.2",w.tags=["{{","}}"];var o=new e;return w.clearCache=function(){return o.clearCache()},w.parse=function(e,t){return o.parse(e,t)},w.render=function(e,t,n){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+(C(r=e)?"array":typeof r)+'" was given as the first argument for mustache#render(template, view, partials)');var r;return o.render(e,t,n)},w.to_html=function(e,t,n,r){var i=w.render(e,t,n);if(!l(r))return i;r(i)},w.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,function(e){return n[e]})},w.Scanner=I,w.Context=a,w.Writer=e,w}),function(e,t){if("function"==typeof define&&define.amd)define(["moment"],t);else if("object"==typeof exports)try{module.exports=t(require("moment"))}catch(e){module.exports=t}e&&(e.momentDurationFormatSetup=e.moment?t(e.moment):t)}(this,function(ee){var te=!1,S=!1,ne=!1,T=!1,re="escape years months weeks days hours minutes seconds milliseconds general".split(" "),ie=[{type:"seconds",targets:[{type:"minutes",value:60},{type:"hours",value:3600},{type:"days",value:86400},{type:"weeks",value:604800},{type:"months",value:2678400},{type:"years",value:31536e3}]},{type:"minutes",targets:[{type:"hours",value:60},{type:"days",value:1440},{type:"weeks",value:10080},{type:"months",value:44640},{type:"years",value:525600}]},{type:"hours",targets:[{type:"days",value:24},{type:"weeks",value:168},{type:"months",value:744},{type:"years",value:8760}]},{type:"days",targets:[{type:"weeks",value:7},{type:"months",value:31},{type:"years",value:365}]},{type:"months",targets:[{type:"years",value:12}]}];function ae(e,t){return!(t.length>e.length)&&-1!==e.indexOf(t)}function x(e){for(var t="";e;)t+="0",e-=1;return t}function k(e,t){var n=e+"+"+he(ye(t).sort(),function(e){return e+":"+t[e]}).join(",");return k.cache[n]||(k.cache[n]=Intl.NumberFormat(e,t)),k.cache[n]}function oe(e,t,n){var r,i,a,o=t.useToLocaleString,s=t.useGrouping,c=s&&t.grouping.slice(),l=t.maximumSignificantDigits,u=t.minimumIntegerDigits||1,f=t.fractionDigits||0,d=t.groupingSeparator,h=t.decimalSeparator;if(o&&n){var p={minimumIntegerDigits:u,useGrouping:s};if(f&&(p.maximumFractionDigits=f,p.minimumFractionDigits=f),l&&0<e&&(p.maximumSignificantDigits=l),ne){var m;if(!T)(m=ve({},t)).useGrouping=!1,m.decimalSeparator=".",e=parseFloat(oe(e,m),10);return k(n,p).format(e)}return S||((m=ve({},t)).useGrouping=!1,m.decimalSeparator=".",e=parseFloat(oe(e,m),10)),e.toLocaleString(n,p)}var g=(l?e.toPrecision(l+1):e.toFixed(f+1)).split("e");a=g[1]||"",i=(g=g[0].split("."))[1]||"";var _=(r=g[0]||"").length,b=i.length,v=_+b,y=r+i;(l&&v===l+1||!l&&b===f+1)&&((y=function(e){for(var t=e.split("").reverse(),n=0,r=!0;r&&n<t.length;)n?"9"===t[n]?t[n]="0":(t[n]=(parseInt(t[n],10)+1).toString(),r=!1):(parseInt(t[n],10)<5&&(r=!1),t[n]="0"),n+=1;return r&&t.push("1"),t.reverse().join("")}(y)).length===v+1&&(_+=1),b&&(y=y.slice(0,-1)),r=y.slice(0,_),i=y.slice(_)),l&&(i=i.replace(/0*$/,""));var w=parseInt(a,10);0<w?i=i.length<=w?(r+=i+=x(w-i.length),""):(r+=i.slice(0,w),i.slice(w)):w<0&&(i=x(Math.abs(w)-r.length)+r+i,r="0"),l||((i=i.slice(0,f)).length<f&&(i+=x(f-i.length)),r.length<u&&(r=x(u-r.length)+r));var C,A="";if(s)for(g=r;g.length;)c.length&&(C=c.shift()),A&&(A=d+A),A=g.slice(-C)+A,g=g.slice(0,-C);else A=r;return i&&(A=A+h+i),A}function se(e,t){return e.label.length>t.label.length?-1:e.label.length<t.label.length?1:0}k.cache={};var ce={durationLabelsStandard:{S:"millisecond",SS:"milliseconds",s:"second",ss:"seconds",m:"minute",mm:"minutes",h:"hour",hh:"hours",d:"day",dd:"days",w:"week",ww:"weeks",M:"month",MM:"months",y:"year",yy:"years"},durationLabelsShort:{S:"msec",SS:"msecs",s:"sec",ss:"secs",m:"min",mm:"mins",h:"hr",hh:"hrs",d:"dy",dd:"dys",w:"wk",ww:"wks",M:"mo",MM:"mos",y:"yr",yy:"yrs"},durationTimeTemplates:{HMS:"h:mm:ss",HM:"h:mm",MS:"m:ss"},durationLabelTypes:[{type:"standard",string:"__"},{type:"short",string:"_"}],durationPluralKey:function(e,t,n){return 1===t&&null===n?e:e+e}};function le(e){return"[object Array]"===Object.prototype.toString.call(e)}function ue(e){return"[object Object]"===Object.prototype.toString.call(e)}function fe(e,t){var n,r=0,i=e&&e.length||0;for("function"!=typeof t&&(n=t,t=function(e){return e===n});r<i;){if(t(e[r]))return e[r];r+=1}}function de(e,t){var n=0,r=e.length;if(e&&r)for(;n<r;){if(!1===t(e[n],n))return;n+=1}}function he(e,t){var n=0,r=e.length,i=[];if(!e||!r)return i;for(;n<r;)i[n]=t(e[n],n),n+=1;return i}function pe(e,t){return he(e,function(e){return e[t]})}function me(e){var t=[];return de(e,function(e){e&&t.push(e)}),t}function ge(e){var t=[];return de(e,function(e){fe(t,e)||t.push(e)}),t}function _e(e,n){var r=[];return de(e,function(t){de(n,function(e){t===e&&r.push(t)})}),ge(r)}function be(n,r){var i=[];return de(n,function(e,t){if(!r(e))return i=n.slice(t),!1}),i}function ve(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function ye(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function we(e,t){var n=0,r=e.length;if(!e||!r)return!1;for(;n<r;){if(!0===t(e[n],n))return!0;n+=1}return!1}function e(e){return"3.6"===e(3.55,"en",{useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:1})}function t(e){var t=!0;return!!(t=(t=(t=t&&"1"===e(1,"en",{minimumIntegerDigits:1}))&&"01"===e(1,"en",{minimumIntegerDigits:2}))&&"001"===e(1,"en",{minimumIntegerDigits:3}))&&(!!(t=(t=(t=(t=t&&"100"===e(99.99,"en",{maximumFractionDigits:0,minimumFractionDigits:0}))&&"100.0"===e(99.99,"en",{maximumFractionDigits:1,minimumFractionDigits:1}))&&"99.99"===e(99.99,"en",{maximumFractionDigits:2,minimumFractionDigits:2}))&&"99.990"===e(99.99,"en",{maximumFractionDigits:3,minimumFractionDigits:3}))&&(!!(t=(t=(t=(t=(t=t&&"100"===e(99.99,"en",{maximumSignificantDigits:1}))&&"100"===e(99.99,"en",{maximumSignificantDigits:2}))&&"100"===e(99.99,"en",{maximumSignificantDigits:3}))&&"99.99"===e(99.99,"en",{maximumSignificantDigits:4}))&&"99.99"===e(99.99,"en",{maximumSignificantDigits:5}))&&!!(t=(t=t&&"1,000"===e(1e3,"en",{useGrouping:!0}))&&"1000"===e(1e3,"en",{useGrouping:!1}))))}function n(){var n,e=[].slice.call(arguments),r={};if(de(e,function(e,t){if(!t){if(!le(e))throw"Expected array as the first argument to durationsFormat.";n=e}"string"!=typeof e&&"function"!=typeof e?"number"!=typeof e?ue(e)&&ve(r,e):r.precision=e:r.template=e}),!n||!n.length)return[];r.returnMomentTypes=!0;var t,i=he(n,function(e){return e.format(r)}),a=_e(re,ge(pe((t=[],de(i,function(e){t=t.concat(e)}),t),"type"))),o=r.largest;return o&&(a=a.slice(0,o)),r.returnMomentTypes=!1,r.outputTypes=a,he(n,function(e){return e.format(r)})}function r(){var e=[].slice.call(arguments),c=ve({},this.format.defaults),t=this.asMilliseconds(),n=this.asMonths();"function"==typeof this.isValid&&!1===this.isValid()&&(n=t=0);var r=t<0,l=ee.duration(Math.abs(t),"milliseconds"),u=ee.duration(Math.abs(n),"months");de(e,function(e){"string"!=typeof e&&"function"!=typeof e?"number"!=typeof e?ue(e)&&ve(c,e):c.precision=e:c.template=e});var f={years:"y",months:"M",weeks:"w",days:"d",hours:"h",minutes:"m",seconds:"s",milliseconds:"S"},i={escape:/\[(.+?)\]/,years:/\*?[Yy]+/,months:/\*?M+/,weeks:/\*?[Ww]+/,days:/\*?[Dd]+/,hours:/\*?[Hh]+/,minutes:/\*?m+/,seconds:/\*?s+/,milliseconds:/\*?S+/,general:/.+?/};c.types=re;var a=function(t){return fe(re,function(e){return i[e].test(t)})},o=new RegExp(he(re,function(e){return i[e].source}).join("|"),"g");c.duration=this;var s="function"==typeof c.template?c.template.apply(c):c.template,d=c.outputTypes,h=c.returnMomentTypes,p=c.largest,m=[];d||(le(c.stopTrim)&&(c.stopTrim=c.stopTrim.join("")),c.stopTrim&&de(c.stopTrim.match(o),function(e){var t=a(e);"escape"!==t&&"general"!==t&&m.push(t)}));var g=ee.localeData();g||(g={}),de(ye(ce),function(e){"function"!=typeof ce[e]?g["_"+e]||(g["_"+e]=ce[e]):g[e]||(g[e]=ce[e])}),de(ye(g._durationTimeTemplates),function(e){s=s.replace("_"+e+"_",g._durationTimeTemplates[e])});var _=c.userLocale||ee.locale(),b=c.useLeftUnits,v=c.usePlural,y=c.precision,w=c.forceLength,C=c.useGrouping,A=c.trunc,S=c.useSignificantDigits&&0<y,T=S?c.precision:0,x=T,k=c.minValue,E=!1,D=c.maxValue,I=!1,P=c.useToLocaleString,M=c.groupingSeparator,$=c.decimalSeparator,O=c.grouping;P=P&&(te||ne);var R=c.trim;le(R)&&(R=R.join(" ")),null===R&&(p||D||S)&&(R="all"),null!==R&&!0!==R&&"left"!==R&&"right"!==R||(R="large"),!1===R&&(R="");var N=function(e){return e.test(R)},L=/both/,F=/^all|[^sm]all/,G=0<p||we([/large/,L,F],N),j=we([/small/,L,F],N),B=we([/mid/,F],N),U=we([/final/,F],N),H=he(s.match(o),function(e,t){var n=a(e);return"*"===e.slice(0,1)&&(e=e.slice(1),"escape"!==n&&"general"!==n&&m.push(n)),{index:t,length:e.length,text:"",token:"escape"===n?e.replace(i.escape,"$1"):e,type:"escape"===n||"general"===n?null:n}}),W={index:0,length:0,token:"",text:"",type:null},q=[];b&&H.reverse(),de(H,function(e){if(e.type)return(W.type||W.text)&&q.push(W),void(W=e);b?W.text=e.token+W.text:W.text+=e.token}),(W.type||W.text)&&q.push(W),b&&q.reverse();var z=_e(re,ge(me(pe(q,"type"))));if(!z.length)return pe(q,"text").join("");z=he(z,function(t,e){var n,r=e+1===z.length,i=!e;n="years"===t||"months"===t?u.as(t):l.as(t);var a=Math.floor(n),o=n-a,s=fe(q,function(e){return t===e.type});return i&&D&&D<n&&(I=!0),r&&k&&Math.abs(c.duration.as(t))<k&&(E=!0),i&&null===w&&1<s.length&&(w=!0),l.subtract(a,t),u.subtract(a,t),{rawValue:n,wholeValue:a,decimalValue:r?o:0,isSmallest:r,isLargest:i,type:t,tokenLength:s.length}});var V,Y=A?Math.floor:Math.round,K=function(e,t){var n=Math.pow(10,t);return Y(e*n)/n},Q=!1,X=!1,Z=function(e,t){var n={useGrouping:C,groupingSeparator:M,decimalSeparator:$,grouping:O,useToLocaleString:P};return S&&(T<=0?(e.rawValue=0,e.wholeValue=0,e.decimalValue=0):(n.maximumSignificantDigits=T,e.significantDigits=T)),I&&!X&&(e.isLargest?e.wholeValue=D:e.wholeValue=0,e.decimalValue=0),E&&!X&&(e.isSmallest?e.wholeValue=k:e.wholeValue=0,e.decimalValue=0),e.isSmallest||e.significantDigits&&e.significantDigits-e.wholeValue.toString().length<=0?y<0?e.value=K(e.wholeValue,y):0===y?e.value=Y(e.wholeValue+e.decimalValue):S?(e.value=A?K(e.rawValue,T-e.wholeValue.toString().length):e.rawValue,e.wholeValue&&(T-=e.wholeValue.toString().length)):(n.fractionDigits=y,e.value=A?e.wholeValue+K(e.decimalValue,y):e.wholeValue+e.decimalValue):S&&e.wholeValue?(e.value=Math.round(K(e.wholeValue,e.significantDigits-e.wholeValue.toString().length)),T-=e.wholeValue.toString().length):e.value=e.wholeValue,1<e.tokenLength&&(w||Q)&&(n.minimumIntegerDigits=e.tokenLength,X&&n.maximumSignificantDigits<e.tokenLength&&delete n.maximumSignificantDigits),!Q&&(0<e.value||""===R||fe(m,e.type)||fe(d,e.type))&&(Q=!0),e.formattedValue=oe(e.value,n,_),n.useGrouping=!1,n.decimalSeparator=".",e.formattedValueEn=oe(e.value,n,"en"),2===e.tokenLength&&"milliseconds"===e.type&&(e.formattedValueMS=oe(e.value,{minimumIntegerDigits:3,useGrouping:!1},"en").slice(0,2)),e};if(1<(z=me(z=he(z,Z))).length){var J=function(t){return fe(z,function(e){return e.type===t})};de(ie,function(e){var n=J(e.type);n&&de(e.targets,function(e){var t=J(e.type);t&&parseInt(n.formattedValueEn,10)===e.value&&(n.rawValue=0,n.wholeValue=0,n.decimalValue=0,t.rawValue+=1,t.wholeValue+=1,t.decimalValue=0,t.formattedValueEn=t.wholeValue.toString(),X=!0)})})}return X&&(Q=!1,T=x,z=me(z=he(z,Z))),!d||I&&!c.trim?(G&&(z=be(z,function(e){return!e.isSmallest&&!e.wholeValue&&!fe(m,e.type)})),p&&z.length&&(z=z.slice(0,p)),j&&1<z.length&&(V=function(e){return!e.wholeValue&&!fe(m,e.type)&&!e.isLargest},z=be(z.slice().reverse(),V).reverse()),B&&(z=me(z=he(z,function(e,t){return 0<t&&t<z.length-1&&!e.wholeValue?null:e}))),!U||1!==z.length||z[0].wholeValue||!A&&z[0].isSmallest&&z[0].rawValue<k||(z=[])):z=me(z=he(z,function(t){return fe(d,function(e){return t.type===e})?t:null})),h?z:(de(q,function(n){var e=f[n.type],t=fe(z,function(e){return e.type===n.type});if(e&&t){var r=t.formattedValueEn.split(".");r[0]=parseInt(r[0],10),r[1]?r[1]=parseFloat("0."+r[1],10):r[1]=null;var i,a,o,s=g.durationPluralKey(e,r[0],r[1]),c=(i=e,o=[],de(ye(a=g),function(t){if("_durationLabels"===t.slice(0,15)){var n=t.slice(15).toLowerCase();de(ye(a[t]),function(e){e.slice(0,1)===i&&o.push({type:n,key:e,label:a[t][e]})})}}),o),l=!1,u={};de(g._durationLabelTypes,function(t){var e=fe(c,function(e){return e.type===t.type&&e.key===s});e&&(u[e.type]=e.label,ae(n.text,t.string)&&(n.text=n.text.replace(t.string,e.label),l=!0))}),v&&!l&&(c.sort(se),de(c,function(e){return u[e.type]===e.label?!ae(n.text,e.label)&&void 0:ae(n.text,e.label)?(n.text=n.text.replace(e.label,u[e.type]),!1):void 0}))}}),(q=he(q,function(t){if(!t.type)return t.text;var e=fe(z,function(e){return e.type===t.type});if(!e)return"";var n="";return b&&(n+=t.text),(r&&I||!r&&E)&&(n+="< ",E=I=!1),(r&&E||!r&&I)&&(n+="> ",E=I=!1),r&&(0<e.value||""===R||fe(m,e.type)||fe(d,e.type))&&(n+="-",r=!1),"milliseconds"===t.type&&e.formattedValueMS?n+=e.formattedValueMS:n+=e.formattedValue,b||(n+=t.text),n})).join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function i(){var t=this.duration,e=function(e){return t._data[e]},n=fe(this.types,e),r=function(e,t){for(var n=e.length;n-=1;)if(t(e[n]))return e[n]}(this.types,e);switch(n){case"milliseconds":return"S __";case"seconds":case"minutes":return"*_MS_";case"hours":return"_HMS_";case"days":if(n===r)return"d __";case"weeks":return n===r?"w __":(null===this.trim&&(this.trim="both"),"w __, d __, h __");case"months":if(n===r)return"M __";case"years":return n===r?"y __":(null===this.trim&&(this.trim="both"),"y __, M __, d __");default:return null===this.trim&&(this.trim="both"),"y __, d __, h __, m __, s __"}}function a(e){if(!e)throw"Moment Duration Format init cannot find moment instance.";e.duration.format=n,e.duration.fn.format=r,e.duration.fn.format.defaults={trim:null,stopTrim:null,largest:null,maxValue:null,minValue:null,precision:0,trunc:!1,forceLength:null,userLocale:null,usePlural:!0,useLeftUnits:!1,useGrouping:!0,useSignificantDigits:!1,template:i,useToLocaleString:!0,groupingSeparator:",",decimalSeparator:".",grouping:[3]},e.updateLocale("en",ce)}var o=function(e,t,n){return e.toLocaleString(t,n)};te=function(){try{(0).toLocaleString("i")}catch(e){return"RangeError"===e.name}return!1}()&&t(o),S=te&&e(o);var s=function(e,t,n){if("undefined"!=typeof window&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(t,n).format(e)};return ne=t(s),T=ne&&e(s),a(ee),a}),function(t,o,e){"use strict";if(t&&o){var a=t.navigator.msPointerEnabled;r.prototype={on:function(e,t){e=e.toLowerCase(),this.events.hasOwnProperty(e)||(this.events[e]=[]),this.events[e].push(t)},off:function(e,t){var n,r,i;void 0!==e?(e=e.toLowerCase(),void 0!==t?this.events.hasOwnProperty(e)&&(n=this.events[e],r=t,-1<(i=n.indexOf(r))&&n.splice(i,1)):delete this.events[e]):this.events={}},fire:function(e,t){t=Array.prototype.slice.call(arguments),e=e.toLowerCase();var n=!1;return this.events.hasOwnProperty(e)&&d(this.events[e],function(e){n=!1===e.apply(this,t.slice(1))||n},this),"catchall"!=e&&(t.unshift("catchAll"),n=!1===this.fire.apply(this,t)||n),!n},webkitReadDataTransfer:function(e){var t=this,r=e.dataTransfer.items.length,n=[];function i(e,t){e.relativePath=t.substring(1),n.push(e),o()}function a(e){throw o(),e}function o(){0==--r&&t.addFiles(n,e)}d(e.dataTransfer.items,function(e){var t=e.webkitGetAsEntry();t?t.isFile?i(e.getAsFile(),t.fullPath):function n(t){t.readEntries(function(e){e.length?(r+=e.length,d(e,function(e){if(e.isFile){var t=e.fullPath;e.file(function(e){i(e,t)},a)}else e.isDirectory&&n(e.createReader())}),n(t)):o()},a)}(t.createReader()):o()})},generateUniqueIdentifier:function(e){var t=this.opts.generateUniqueIdentifier;if("function"==typeof t)return t(e);var n=e.relativePath||e.webkitRelativePath||e.fileName||e.name;return e.size+"-"+n.replace(/[^0-9a-zA-Z_-]/gim,"")},uploadNextChunk:function(e){var t=!1;if(this.opts.prioritizeFirstAndLastChunk&&(d(this.files,function(e){return!e.paused&&e.chunks.length&&"pending"===e.chunks[0].status()?(e.chunks[0].send(),!(t=!0)):!e.paused&&1<e.chunks.length&&"pending"===e.chunks[e.chunks.length-1].status()?(e.chunks[e.chunks.length-1].send(),!(t=!0)):void 0}),t))return t;if(d(this.files,function(e){if(e.paused||d(e.chunks,function(e){if("pending"===e.status())return e.send(),!(t=!0)}),t)return!1}),t)return!0;var n=!1;return d(this.files,function(e){if(!e.isComplete())return!(n=!0)}),n||e||u(function(){this.fire("complete")},this),!1},assignBrowse:function(e,r,i,a){e instanceof Element&&(e=[e]),d(e,function(e){var n;"INPUT"===e.tagName&&"file"===e.type?n=e:((n=o.createElement("input")).setAttribute("type","file"),f(n.style,{visibility:"hidden",position:"absolute",width:"1px",height:"1px"}),e.appendChild(n),e.addEventListener("click",function(){n.click()},!1)),this.opts.singleFile||i||n.setAttribute("multiple","multiple"),r&&n.setAttribute("webkitdirectory","webkitdirectory"),d(a,function(e,t){n.setAttribute(t,e)});var t=this;n.addEventListener("change",function(e){e.target.value&&(t.addFiles(e.target.files,e),e.target.value="")},!1)},this)},assignDrop:function(e){void 0===e.length&&(e=[e]),d(e,function(e){e.addEventListener("dragover",this.preventEvent,!1),e.addEventListener("dragenter",this.preventEvent,!1),e.addEventListener("drop",this.onDrop,!1)},this)},unAssignDrop:function(e){void 0===e.length&&(e=[e]),d(e,function(e){e.removeEventListener("dragover",this.preventEvent),e.removeEventListener("dragenter",this.preventEvent),e.removeEventListener("drop",this.onDrop)},this)},isUploading:function(){var t=!1;return d(this.files,function(e){if(e.isUploading())return!(t=!0)}),t},_shouldUploadNext:function(){var t=0,n=!0,r=this.opts.simultaneousUploads;return d(this.files,function(e){d(e.chunks,function(e){if("uploading"===e.status()&&r<=++t)return n=!1})}),n&&t},upload:function(){var e=this._shouldUploadNext();if(!1!==e){this.fire("uploadStart");for(var t=!1,n=1;n<=this.opts.simultaneousUploads-e;n++)t=this.uploadNextChunk(!0)||t;t||u(function(){this.fire("complete")},this)}},resume:function(){d(this.files,function(e){e.isComplete()||e.resume()})},pause:function(){d(this.files,function(e){e.pause()})},cancel:function(){for(var e=this.files.length-1;0<=e;e--)this.files[e].cancel()},progress:function(){var t=0,n=0;return d(this.files,function(e){t+=e.progress()*e.size,n+=e.size}),0<n?t/n:0},addFile:function(e,t){this.addFiles([e],t)},addFiles:function(e,r){var i=[];d(e,function(e){if((!a||a&&0<e.size)&&(e.size%4096!=0||"."!==e.name&&"."!==e.fileName)){var t=this.generateUniqueIdentifier(e);if(this.opts.allowDuplicateUploads||!this.getFromUniqueIdentifier(t)){var n=new s(this,e,t);this.fire("fileAdded",n,r)&&i.push(n)}}},this),this.fire("filesAdded",i,r)&&(d(i,function(e){this.opts.singleFile&&0<this.files.length&&this.removeFile(this.files[0]),this.files.push(e)},this),this.fire("filesSubmitted",i,r))},removeFile:function(e){for(var t=this.files.length-1;0<=t;t--)this.files[t]===e&&(this.files.splice(t,1),e.abort(),this.fire("fileRemoved",e))},getFromUniqueIdentifier:function(t){var n=!1;return d(this.files,function(e){e.uniqueIdentifier===t&&(n=e)}),n},getSize:function(){var t=0;return d(this.files,function(e){t+=e.size}),t},sizeUploaded:function(){var t=0;return d(this.files,function(e){t+=e.sizeUploaded()}),t},timeRemaining:function(){var t=0,n=0;return d(this.files,function(e){e.paused||e.error||(t+=e.size-e.sizeUploaded(),n+=e.averageSpeed)}),t&&!n?Number.POSITIVE_INFINITY:t||n?Math.floor(t/n):0}},s.prototype={measureSpeed:function(){var e=Date.now()-this._lastProgressCallback;if(e){var t=this.flowObj.opts.speedSmoothingFactor,n=this.sizeUploaded();this.currentSpeed=Math.max((n-this._prevUploadedSize)/e*1e3,0),this.averageSpeed=t*this.currentSpeed+(1-t)*this.averageSpeed,this._prevUploadedSize=n}},chunkEvent:function(e,t,n){switch(t){case"progress":if(Date.now()-this._lastProgressCallback<this.flowObj.opts.progressCallbacksInterval)break;this.measureSpeed(),this.flowObj.fire("fileProgress",this,e),this.flowObj.fire("progress"),this._lastProgressCallback=Date.now();break;case"error":this.error=!0,this.abort(!0),this.flowObj.fire("fileError",this,n,e),this.flowObj.fire("error",n,this,e);break;case"success":if(this.error)return;this.measureSpeed(),this.flowObj.fire("fileProgress",this,e),this.flowObj.fire("progress"),this._lastProgressCallback=Date.now(),this.isComplete()&&(this.currentSpeed=0,this.averageSpeed=0,this.flowObj.fire("fileSuccess",this,n,e));break;case"retry":this.flowObj.fire("fileRetry",this,e)}},pause:function(){this.paused=!0,this.abort()},resume:function(){this.paused=!1,this.flowObj.upload()},abort:function(e){this.currentSpeed=0,this.averageSpeed=0;var t=this.chunks;e&&(this.chunks=[]),d(t,function(e){"uploading"===e.status()&&(e.abort(),this.flowObj.uploadNextChunk())},this)},cancel:function(){this.flowObj.removeFile(this)},retry:function(){this.bootstrap(),this.flowObj.upload()},bootstrap:function(){"function"==typeof this.flowObj.opts.initFileFn&&this.flowObj.opts.initFileFn(this),this.abort(!0),this.error=!1,this._prevProgress=0;var e=this.flowObj.opts.forceChunkSize?Math.ceil:Math.floor;this.chunkSize=l(this.flowObj.opts.chunkSize,this);for(var t=Math.max(e(this.size/this.chunkSize),1),n=0;n<t;n++)this.chunks.push(new c(this.flowObj,this,n))},progress:function(){if(this.error)return 1;if(1===this.chunks.length)return this._prevProgress=Math.max(this._prevProgress,this.chunks[0].progress()),this._prevProgress;var t=0;d(this.chunks,function(e){t+=e.progress()*(e.endByte-e.startByte)});var e=t/this.size;return this._prevProgress=Math.max(this._prevProgress,.9999<e?1:e),this._prevProgress},isUploading:function(){var t=!1;return d(this.chunks,function(e){if("uploading"===e.status())return!(t=!0)}),t},isComplete:function(){var n=!1;return d(this.chunks,function(e){var t=e.status();if("pending"===t||"uploading"===t||"reading"===t||1===e.preprocessState||1===e.readState)return!(n=!0)}),!n},sizeUploaded:function(){var t=0;return d(this.chunks,function(e){t+=e.sizeUploaded()}),t},timeRemaining:function(){if(this.paused||this.error)return 0;var e=this.size-this.sizeUploaded();return e&&!this.averageSpeed?Number.POSITIVE_INFINITY:e||this.averageSpeed?Math.floor(e/this.averageSpeed):0},getType:function(){return this.file.type&&this.file.type.split("/")[1]},getExtension:function(){return this.name.substr(2+(~-this.name.lastIndexOf(".")>>>0)).toLowerCase()}},c.prototype={getParams:function(){return{flowChunkNumber:this.offset+1,flowChunkSize:this.chunkSize,flowCurrentChunkSize:this.endByte-this.startByte,flowTotalSize:this.fileObj.size,flowIdentifier:this.fileObj.uniqueIdentifier,flowFilename:this.fileObj.name,flowRelativePath:this.fileObj.relativePath,flowTotalChunks:this.fileObj.chunks.length}},getTarget:function(e,t){return 0==t.length?e:(e.indexOf("?")<0?e+="?":e+="&",e+t.join("&"))},test:function(){this.xhr=new XMLHttpRequest,this.xhr.addEventListener("load",this.testHandler,!1),this.xhr.addEventListener("error",this.testHandler,!1);var e=l(this.flowObj.opts.testMethod,this.fileObj,this),t=this.prepareXhrRequest(e,!0);this.xhr.send(t)},preprocessFinished:function(){this.endByte=this.computeEndByte(),this.preprocessState=2,this.send()},readFinished:function(e){this.readState=2,this.bytes=e,this.send()},send:function(){var e=this.flowObj.opts.preprocess,t=this.flowObj.opts.readFileFn;if("function"==typeof e)switch(this.preprocessState){case 0:return this.preprocessState=1,void e(this);case 1:return}switch(this.readState){case 0:return this.readState=1,void t(this.fileObj,this.startByte,this.endByte,this.fileObj.file.type,this);case 1:return}if(!this.flowObj.opts.testChunks||this.tested){this.loaded=0,this.total=0,this.pendingRetry=!1,this.xhr=new XMLHttpRequest,this.xhr.upload.addEventListener("progress",this.progressHandler,!1),this.xhr.addEventListener("load",this.doneHandler,!1),this.xhr.addEventListener("error",this.doneHandler,!1);var n=l(this.flowObj.opts.uploadMethod,this.fileObj,this),r=this.prepareXhrRequest(n,!1,this.flowObj.opts.method,this.bytes),i=this.flowObj.opts.changeRawDataBeforeSend;"function"==typeof i&&(r=i(this,r)),this.xhr.send(r)}else this.test()},abort:function(){var e=this.xhr;this.xhr=null,e&&e.abort()},status:function(e){return 1===this.readState?"reading":this.pendingRetry||1===this.preprocessState?"uploading":this.xhr?this.xhr.readyState<4?"uploading":-1<this.flowObj.opts.successStatuses.indexOf(this.xhr.status)?"success":-1<this.flowObj.opts.permanentErrors.indexOf(this.xhr.status)||!e&&this.retries>=this.flowObj.opts.maxChunkRetries?"error":(this.abort(),"pending"):"pending"},message:function(){return this.xhr?this.xhr.responseText:""},progress:function(){if(this.pendingRetry)return 0;var e=this.status();return"success"===e||"error"===e?1:"pending"===e?0:0<this.total?this.loaded/this.total:0},sizeUploaded:function(){var e=this.endByte-this.startByte;return"success"!==this.status()&&(e=this.progress()*e),e},prepareXhrRequest:function(e,t,n,r){var i=l(this.flowObj.opts.query,this.fileObj,this,t);i=f(i||{},this.getParams());var a=l(this.flowObj.opts.target,this.fileObj,this,t),o=null;if("GET"===e||"octet"===n){var s=[];d(i,function(e,t){s.push([encodeURIComponent(t),encodeURIComponent(e)].join("="))}),a=this.getTarget(a,s),o=r||null}else o=new FormData,d(i,function(e,t){o.append(t,e)}),void 0!==r&&o.append(this.flowObj.opts.fileParameterName,r,this.filename||this.fileObj.file.name);return this.xhr.open(e,a,!0),this.xhr.withCredentials=this.flowObj.opts.withCredentials,d(l(this.flowObj.opts.headers,this.fileObj,this,t),function(e,t){this.xhr.setRequestHeader(t,e)},this),o}},r.evalOpts=l,r.extend=f,r.each=d,r.FlowFile=s,r.FlowChunk=c,r.version="2.14.1","object"==typeof module&&module&&"object"==typeof module.exports?module.exports=r:(t.Flow=r,"function"==typeof define&&define.amd&&define("flow",[],function(){return r}))}else console.warn("Flowjs needs window and document objects to work");function r(e){if(this.support=!("undefined"==typeof File||"undefined"==typeof Blob||"undefined"==typeof FileList||!Blob.prototype.slice&&!Blob.prototype.webkitSlice&&!Blob.prototype.mozSlice),this.support){this.supportDirectory=/Chrome/.test(t.navigator.userAgent)||/Firefox/.test(t.navigator.userAgent)||/Edge/.test(t.navigator.userAgent),this.files=[],this.defaults={chunkSize:1048576,forceChunkSize:!1,simultaneousUploads:3,singleFile:!1,fileParameterName:"file",progressCallbacksInterval:500,speedSmoothingFactor:.1,query:{},headers:{},withCredentials:!1,preprocess:null,changeRawDataBeforeSend:null,method:"multipart",testMethod:"GET",uploadMethod:"POST",prioritizeFirstAndLastChunk:!1,allowDuplicateUploads:!1,target:"/",testChunks:!0,generateUniqueIdentifier:null,maxChunkRetries:0,chunkRetryInterval:null,permanentErrors:[404,413,415,500,501],successStatuses:[200,201,202],onDropStopPropagation:!1,initFileFn:null,readFileFn:i},this.opts={},this.events={};var n=this;this.onDrop=function(e){n.opts.onDropStopPropagation&&e.stopPropagation(),e.preventDefault();var t=e.dataTransfer;t.items&&t.items[0]&&t.items[0].webkitGetAsEntry?n.webkitReadDataTransfer(e):n.addFiles(t.files,e)},this.preventEvent=function(e){e.preventDefault()},this.opts=r.extend({},this.defaults,e||{})}}function s(e,t,n){this.flowObj=e,this.bytes=null,this.file=t,this.name=t.fileName||t.name,this.size=t.size,this.relativePath=t.relativePath||t.webkitRelativePath||this.name,this.uniqueIdentifier=void 0===n?e.generateUniqueIdentifier(t):n,this.chunkSize=0,this.chunks=[],this.paused=!1,this.error=!1,this.averageSpeed=0,this.currentSpeed=0,this._lastProgressCallback=Date.now(),this._prevUploadedSize=0,this._prevProgress=0,this.bootstrap()}function i(e,t,n,r,i){var a="slice";e.file.slice?a="slice":e.file.mozSlice?a="mozSlice":e.file.webkitSlice&&(a="webkitSlice"),i.readFinished(e.file[a](t,n,r))}function c(e,t,n){this.flowObj=e,this.fileObj=t,this.offset=n,this.tested=!1,this.retries=0,this.pendingRetry=!1,this.preprocessState=0,this.readState=0,this.loaded=0,this.total=0,this.chunkSize=this.fileObj.chunkSize,this.startByte=this.offset*this.chunkSize,this.filename=null,this.computeEndByte=function(){var e=Math.min(this.fileObj.size,(this.offset+1)*this.chunkSize);return this.fileObj.size-e<this.chunkSize&&!this.flowObj.opts.forceChunkSize&&(e=this.fileObj.size),e},this.endByte=this.computeEndByte(),this.xhr=null;var r=this;this.event=function(e,t){(t=Array.prototype.slice.call(arguments)).unshift(r),r.fileObj.chunkEvent.apply(r.fileObj,t)},this.progressHandler=function(e){e.lengthComputable&&(r.loaded=e.loaded,r.total=e.total),r.event("progress",e)},this.testHandler=function(e){var t=r.status(!0);"error"===t?(r.event(t,r.message()),r.flowObj.uploadNextChunk()):"success"===t?(r.tested=!0,r.event(t,r.message()),r.flowObj.uploadNextChunk()):r.fileObj.paused||(r.tested=!0,r.send())},this.doneHandler=function(e){var t=r.status();if("success"===t||"error"===t)delete this.data,r.event(t,r.message()),r.flowObj.uploadNextChunk();else if(!r.fileObj.paused){r.event("retry",r.message()),r.pendingRetry=!0,r.abort(),r.retries++;var n=r.flowObj.opts.chunkRetryInterval;null!==n?setTimeout(function(){r.send()},n):r.send()}}}function l(e,t){return"function"==typeof e&&(t=Array.prototype.slice.call(arguments),e=e.apply(null,t.slice(1))),e}function u(e,t){setTimeout(e.bind(t),0)}function f(n,e){return d(arguments,function(e){e!==n&&d(e,function(e,t){n[t]=e})}),n}function d(e,t,n){var r;if(e)if(void 0!==e.length){for(r=0;r<e.length;r++)if(!1===t.call(n,e[r],r))return}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r))return}}("undefined"!=typeof window&&window,"undefined"!=typeof document&&document),angular.module("flow.provider",[]).provider("flowFactory",function(){"use strict";this.defaults={},this.factory=function(e){return new Flow(e)},this.events=[],this.on=function(e,t){this.events.push([e,t])},this.$get=function(){var n=this.factory,r=this.defaults,i=this.events;return{create:function(e){var t=n(angular.extend({},r,e));return angular.forEach(i,function(e){t.on(e[0],e[1])}),t}}}}),angular.module("flow.init",["flow.provider"]).controller("flowCtrl",["$scope","$attrs","$parse","flowFactory",function(r,e,t,n){var i=angular.extend({},r.$eval(e.flowInit)),a=r.$eval(e.flowObject)||n.create(i),o=function(e){var t=Array.prototype.slice.call(arguments);t.shift();var n=r.$broadcast.apply(r,["flow::"+e,a].concat(t));if({progress:1,filesSubmitted:1,fileSuccess:1,fileError:1,complete:1}[e]&&r.$applyAsync(),n.defaultPrevented)return!1};a.on("catchAll",o),r.$on("$destroy",function(){a.off("catchAll",o)}),r.$flow=a,e.hasOwnProperty("flowName")&&(t(e.flowName).assign(r,a),r.$on("$destroy",function(){t(e.flowName).assign(r)}))}]).directive("flowInit",[function(){return{scope:!0,controller:"flowCtrl"}}]),angular.module("flow.btn",["flow.init"]).directive("flowBtn",[function(){return{restrict:"EA",scope:!1,require:"^flowInit",link:function(e,t,n){var r=n.hasOwnProperty("flowDirectory"),i=n.hasOwnProperty("flowSingleFile"),a=n.hasOwnProperty("flowAttrs")&&e.$eval(n.flowAttrs);e.$flow.assignBrowse(t,r,i,a)}}}]),angular.module("flow.dragEvents",["flow.init"]).directive("flowPreventDrop",function(){return{scope:!1,link:function(e,t,n){t.bind("drop dragover",function(e){e.preventDefault()})}}}).directive("flowDragEnter",["$timeout",function(c){return{scope:!1,link:function(i,e,a){var o,s=!1;e.bind("dragover",function(e){var t,n,r;(n=!1,r=(t=e).dataTransfer||t.originalEvent.dataTransfer,angular.forEach(r&&r.types,function(e){"Files"===e&&(n=!0)}),n)&&(s||(i.$apply(a.flowDragEnter),s=!0),c.cancel(o),e.preventDefault())}),e.bind("dragleave drop",function(e){c.cancel(o),o=c(function(){i.$eval(a.flowDragLeave),o=null,s=!1},100)})}}}]),angular.module("flow.drop",["flow.init"]).directive("flowDrop",function(){return{scope:!1,require:"^flowInit",link:function(t,n,e){function r(){t.$flow.assignDrop(n)}e.flowDropEnabled?t.$watch(e.flowDropEnabled,function(e){e?r():t.$flow.unAssignDrop(n)}):r()}}}),function(s){"use strict";var n=s.module("flow.events",["flow.init"]);s.forEach({fileSuccess:["$file","$message"],fileProgress:["$file"],fileAdded:["$file","$event"],filesAdded:["$files","$event"],filesSubmitted:["$files","$event"],fileRetry:["$file"],fileRemoved:["$file"],fileError:["$file","$message"],uploadStart:[],complete:[],progress:[],error:["$message","$file"]},function(a,e){var t,o="flow"+((t=e).charAt(0).toUpperCase()+t.slice(1));"flowUploadStart"==o&&(o="flowUploadStarted"),n.directive(o,[function(){return{require:"^flowInit",controller:["$scope","$attrs",function(t,i){t.$on("flow::"+e,function(){var n=Array.prototype.slice.call(arguments),e=n.shift();if(t.$flow===n.shift()){var r={};s.forEach(a,function(e,t){r[e]=n[t]}),!1===t.$eval(i[o],r)&&e.preventDefault()}})}]}}])})}(angular),angular.module("flow.img",["flow.init"]).directive("flowImg",[function(){return{scope:!1,require:"^flowInit",link:function(n,e,r){var t=r.flowImg;n.$watch(t,function(e){if(e){var t=new FileReader;t.readAsDataURL(e.file),t.onload=function(e){n.$apply(function(){r.$set("src",e.target.result)})}}})}}}]),angular.module("flow.transfers",["flow.init"]).directive("flowTransfers",[function(){return{scope:!0,require:"^flowInit",link:function(e){e.transfers=e.$flow.files}}}]),angular.module("flow",["flow.provider","flow.init","flow.events","flow.btn","flow.drop","flow.transfers","flow.img","flow.dragEvents"]),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("$logger",[],t):"object"==typeof exports?exports.$logger=t():e.$logger=t()}(this,function(){return function(n){var r={};function i(e){if(r[e])return r[e].exports;var t=r[e]={exports:{},id:e,loaded:!1};return n[e].call(t.exports,t,t.exports,i),t.loaded=!0,t.exports}return i.m=n,i.c=r,i.p="",i(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})});var i=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}}(r);t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})});var i=n(11);Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})});var a=n(13);Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})});var o=n(9);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})});var s=n(10);Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})})},function(e,_,t){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.track=_.flush=_.tracking=_.buffer=void 0,_.getTransport=function(){return A},_.setTransport=function(e){A=e},_.print=c,_.immediateFlush=n,_.log=i,_.prefix=function(n){return{debug:function(e,t){return i("debug",n+"_"+e,t)},info:function(e,t){return i("info",n+"_"+e,t)},warn:function(e,t){return i("warn",n+"_"+e,t)},error:function(e,t){return i("error",n+"_"+e,t)},track:function(e){return o(e)},flush:function(){return r()}}},_.debug=function(e,t){return i("debug",e,t)},_.info=function(e,t){return i("info",e,t)},_.warn=function(e,t){return i("warn",e,t)},_.error=function(e,t){return i("error",e,t)};var b=t(3),v=t(9),y=t(10),w=_.buffer=[],C=_.tracking=[],A=function(e,t,n){return(0,b.ajax)("post",y.config.uri,e,t,n)};var a=!1;function c(e,t,n){if("undefined"!=typeof window&&window.console&&window.console.log){if(!a)return setTimeout(function(){return c(e,t,n)},1);var r=y.config.logLevel;if(window.LOG_LEVEL&&(r=window.LOG_LEVEL),!(y.logLevels.indexOf(e)>y.logLevels.indexOf(r))){n=n||{};var i=[t];(0,b.isIE)()&&(n=JSON.stringify(n)),i.push(n),(n.error||n.warning)&&i.push("\n\n",n.error||n.warning);try{window.console[e]&&window.console[e].apply?window.console[e].apply(window.console,i):window.console.log&&window.console.log.apply&&window.console.log.apply(window.console,i)}catch(e){}}}}function n(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).fireAndForget,t=void 0!==e&&e;if("undefined"!=typeof window&&y.config.uri){var n=w.length,r=C.length;if(n||r){var i={},a=v.metaBuilders,o=Array.isArray(a),s=0;for(a=o?a:a[Symbol.iterator]();;){var c;if(o){if(s>=a.length)break;c=a[s++]}else{if((s=a.next()).done)break;c=s.value}var l=c;try{(0,b.extend)(i,l(i),!1)}catch(e){console.error("Error in custom meta builder:",e.stack||e.toString())}}var u={},f=v.headerBuilders,d=Array.isArray(f),h=0;for(f=d?f:f[Symbol.iterator]();;){var p;if(d){if(h>=f.length)break;p=f[h++]}else{if((h=f.next()).done)break;p=h.value}var m=p;try{(0,b.extend)(u,m(u),!1)}catch(e){console.error("Error in custom header builder:",e.stack||e.toString())}}var g=A(u,{events:w,meta:i,tracking:C},{fireAndForget:t});return _.buffer=w=[],_.tracking=C=[],g}}}setTimeout(function(){a=!0},1);var r=(0,b.promiseDebounce)(n,y.config.debounceInterval);function l(e,t,n){w.push({level:e,event:t,payload:n}),-1<y.config.autoLog.indexOf(e)&&r()}function i(e,t,n){if("undefined"!=typeof window){y.config.prefix&&(t=y.config.prefix+"_"+t),"string"==typeof(n=n||{})?n={message:n}:n instanceof Error&&(n={error:n.stack||n.toString()});try{JSON.stringify(n)}catch(e){return}n.timestamp=Date.now();var r=v.payloadBuilders,i=Array.isArray(r),a=0;for(r=i?r:r[Symbol.iterator]();;){var o;if(i){if(a>=r.length)break;o=r[a++]}else{if((a=r.next()).done)break;o=a.value}var s=o;try{(0,b.extend)(n,s(n),!1)}catch(e){console.error("Error in custom payload builder:",e.stack||e.toString())}}y.config.silent||c(e,t,n),w.length===y.config.sizeLimit?l("info","logger_max_buffer_length"):w.length<y.config.sizeLimit&&l(e,t,n)}}function o(e){if("undefined"!=typeof window&&e){try{JSON.stringify(e)}catch(e){return}var t=v.trackingBuilders,n=Array.isArray(t),r=0;for(t=n?t:t[Symbol.iterator]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}var a=i;try{(0,b.extend)(e,a(e),!1)}catch(e){console.error("Error in custom tracking builder:",e.stack||e.toString())}}c("debug","tracking",e),C.push(e)}}_.flush=r,_.track=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extend=function(e,t){var n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];for(var r in e=e||{},t=t||{})t.hasOwnProperty(r)&&(!n&&e.hasOwnProperty(r)||(e[r]=t[r]));return e},t.isSameProtocol=u,t.isSameDomain=f,t.ajax=function(i,a){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},e=(4<arguments.length&&void 0!==arguments[4]?arguments[4]:{}).fireAndForget,c=void 0!==e&&e;return new l.ZalgoPromise(function(e){var t=window.XMLHttpRequest||window.ActiveXObject;if(window.XDomainRequest&&!f(a)){if(!u(a))return e();t=window.XDomainRequest}var n=new t("MSXML2.XMLHTTP.3.0");if(n.open(i.toUpperCase(),a,!0),"function"==typeof n.setRequestHeader)for(var r in n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.setRequestHeader("Content-type","application/json"),o)o.hasOwnProperty(r)&&n.setRequestHeader(r,o[r]);c?e():n.onreadystatechange=function(){3<n.readyState&&e()},n.send(JSON.stringify(s).replace(/&/g,"%26"))})},t.promiseDebounce=function(r,e){var i={};return function(){var n=arguments;return i.timeout&&(clearTimeout(i.timeout),delete i.timeout),i.timeout=setTimeout(function(){var e=i.resolver,t=i.rejector;return delete i.promise,delete i.resolver,delete i.rejector,delete i.timeout,l.ZalgoPromise.resolve().then(function(){return r.apply(null,n)}).then(e,t)},e),i.promise=i.promise||new l.ZalgoPromise(function(e,t){i.resolver=e,i.rejector=t}),i.promise}},t.onWindowReady=function(){return new l.ZalgoPromise(function(e){"undefined"!=typeof document&&"complete"===document.readyState&&e(),window.addEventListener("load",e)})},t.safeInterval=function(t,n){var r=void 0;return function e(){r=setTimeout(function(){t(),e()},n)}(),{cancel:function(){clearTimeout(r)}}},t.uniqueID=function(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(Math.random()*e.length))})},t.isIE=function(){return Boolean(window.document.documentMode)};var l=n(4);function u(e){return window.location.protocol===e.split("/")[0]}function f(e){var t=e.match(/https?:\/\/[^/]+/);return!t||t[0]===window.location.protocol+"//"+window.location.host}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5);Object.defineProperty(t,"ZalgoPromise",{enumerable:!0,get:function(){return r.ZalgoPromise}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZalgoPromise=void 0;var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),f=n(6),i=n(7),d=n(8);var a=function(){function u(e){var t=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],e){var n=void 0,r=void 0,i=!1,a=!1,o=!1;(0,d.startActive)();try{e(function(e){o?t.resolve(e):(i=!0,n=e)},function(e){o?t.reject(e):(a=!0,r=e)})}catch(e){return(0,d.endActive)(),void this.reject(e)}(0,d.endActive)(),o=!0,i?this.resolve(n):a&&this.reject(r)}}return r(u,[{key:"resolve",value:function(e){if(this.resolved||this.rejected)return this;if((0,f.isPromise)(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this}},{key:"reject",value:function(e){var t=this;if(this.resolved||this.rejected)return this;if((0,f.isPromise)(e))throw new Error("Can not reject promise with another promise");if(!e){var n=e&&"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e);e=new Error("Expected reject to be called with Error, got "+n)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout(function(){t.errorHandled||(0,i.dispatchPossiblyUnhandledError)(e,t)},1),this.dispatch(),this}},{key:"asyncReject",value:function(e){return this.errorHandled=!0,this.reject(e),this}},{key:"dispatch",value:function(){var o=this,e=this.dispatching,s=this.resolved,c=this.rejected,l=this.handlers;if(!e&&(s||c)){this.dispatching=!0,(0,d.startActive)();for(var t=function(e){var t=l[e],n=t.onSuccess,r=t.onError,i=t.promise,a=void 0;if(s)try{a=n?n(o.value):o.value}catch(e){return i.reject(e),"continue"}else if(c){if(!r)return i.reject(o.error),"continue";try{a=r(o.error)}catch(e){return i.reject(e),"continue"}}a instanceof u&&(a.resolved||a.rejected)?(a.resolved?i.resolve(a.value):i.reject(a.error),a.errorHandled=!0):(0,f.isPromise)(a)?a instanceof u&&(a.resolved||a.rejected)?a.resolved?i.resolve(a.value):i.reject(a.error):a.then(function(e){i.resolve(e)},function(e){i.reject(e)}):i.resolve(a)},n=0;n<l.length;n++)t(n);l.length=0,this.dispatching=!1,(0,d.endActive)()}}},{key:"then",value:function(e,t){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.then expected a function for success handler");if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for error handler");var n=new u;return this.handlers.push({promise:n,onSuccess:e,onError:t}),this.errorHandled=!0,this.dispatch(),n}},{key:"catch",value:function(e){return this.then(void 0,e)}},{key:"finally",value:function(t){if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.finally expected a function");return this.then(function(e){return u.try(t).then(function(){return e})},function(e){return u.try(t).then(function(){throw e})})}},{key:"timeout",value:function(e,t){var n=this;if(this.resolved||this.rejected)return this;var r=setTimeout(function(){n.resolved||n.rejected||n.reject(t||new Error("Promise timed out after "+e+"ms"))},e);return this.then(function(e){return clearTimeout(r),e})}},{key:"toPromise",value:function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)}}],[{key:"resolve",value:function(n){return n instanceof u?n:(0,f.isPromise)(n)?new u(function(e,t){return n.then(e,t)}):(new u).resolve(n)}},{key:"reject",value:function(e){return(new u).reject(e)}},{key:"asyncReject",value:function(e){return(new u).asyncReject(e)}},{key:"all",value:function(n){var r=new u,i=n.length,a=[];if(!i)return r.resolve(a),r;for(var e=function(t){var e=n[t];if(e instanceof u){if(e.resolved)return a[t]=e.value,i-=1,"continue"}else if(!(0,f.isPromise)(e))return a[t]=e,i-=1,"continue";u.resolve(e).then(function(e){a[t]=e,0===(i-=1)&&r.resolve(a)},function(e){r.reject(e)})},t=0;t<n.length;t++)e(t);return 0===i&&r.resolve(a),r}},{key:"hash",value:function(e){var n={};return u.all(Object.keys(e).map(function(t){return u.resolve(e[t]).then(function(e){n[t]=e})})).then(function(){return n})}},{key:"map",value:function(e,t){return u.all(e.map(t))}},{key:"onPossiblyUnhandledException",value:function(e){return(0,i.onPossiblyUnhandledException)(e)}},{key:"try",value:function(e,t,n){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.try expected a function");var r=void 0;(0,d.startActive)();try{r=e.apply(t,n||[])}catch(e){return(0,d.endActive)(),u.reject(e)}return(0,d.endActive)(),u.resolve(r)}},{key:"delay",value:function(t){return new u(function(e){setTimeout(e,t)})}},{key:"isPromise",value:function(e){return!!(e&&e instanceof u)||(0,f.isPromise)(e)}},{key:"flush",value:function(){return(0,d.awaitActive)(u)}}]),u}();t.ZalgoPromise=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=function(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&window.constructor&&e instanceof window.constructor)return!1;var t={}.toString;if(t){var n=t.call(e);if("[object Window]"===n||"[object global]"===n||"[object DOMWindow]"===n)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dispatchPossiblyUnhandledError=function(e,t){if(-1!==r.indexOf(e))return;r.push(e),setTimeout(function(){throw e},1);for(var n=0;n<i.length;n++)i[n](e,t)},t.onPossiblyUnhandledException=function(e){return i.push(e),{cancel:function(){i.splice(i.indexOf(e),1)}}};var r=[],i=[]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startActive=function(){n+=1},t.endActive=function(){n-=1,i()},t.awaitActive=function(e){var t=r=r||new e;return i(),t};var n=0,r=void 0;function i(){if(!n&&r){var e=r;r=null,e.resolve()}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPayloadBuilder=function(e){n.push(e)},t.addMetaBuilder=function(e){r.push(e)},t.addTrackingBuilder=function(e){i.push(e)},t.addHeaderBuilder=function(e){a.push(e)};var n=t.payloadBuilders=[],r=t.metaBuilders=[],i=t.trackingBuilders=[],a=t.headerBuilders=[]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.config={uri:"",prefix:"",initial_state_name:"init",flushInterval:6e5,debounceInterval:10,sizeLimit:300,silent:!1,heartbeat:!0,heartbeatConsoleLog:!0,heartbeatInterval:5e3,heartbeatTooBusy:!1,heartbeatTooBusyThreshold:1e4,logLevel:"warn",autoLog:["warn","error"],logUnload:!0,logPerformance:!0},t.logLevels=["error","warn","info","debug"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e){if((0,i.extend)(r.config,e||{}),s)return;s=!0,r.config.logPerformance&&(0,a.initPerformance)();r.config.heartbeat&&(0,a.initHeartBeat)();r.config.logUnload&&(window.addEventListener("beforeunload",function(){(0,o.info)("window_beforeunload"),(0,o.immediateFlush)({fireAndForget:!0})}),window.addEventListener("unload",function(){(0,o.info)("window_unload"),(0,o.immediateFlush)({fireAndForget:!0})}));r.config.flushInterval&&setInterval(o.flush,r.config.flushInterval);window.beaverLogQueue&&(window.beaverLogQueue.forEach(function(e){(0,o.log)(e.level,e.event,e)}),delete window.beaverLogQueue)};var r=n(10),i=n(3),a=n(12),o=n(2),s=!1},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reqTimer=t.clientTimer=void 0,t.now=c,t.reqStartElapsed=u,t.initHeartBeat=function(){var r=l(),i=0;(0,s.safeInterval)(function(){if(!(a.config.heartbeatMaxThreshold&&i>a.config.heartbeatMaxThreshold)){i+=1;var e=r.elapsed(),t=e-a.config.heartbeatInterval,n={count:i,elapsed:e};a.config.heartbeatTooBusy&&(n.lag=t)>=a.config.heartbeatTooBusyThreshold&&(0,o.info)("toobusy",n,{noConsole:!a.config.heartbeatConsoleLog}),(0,o.info)("heartbeat",n,{noConsole:!a.config.heartbeatConsoleLog})}},a.config.heartbeatInterval)},t.initPerformance=function(){if(!i)return(0,o.info)("no_performance_data");(0,r.addPayloadBuilder)(function(){var e={};return e.client_elapsed=f.elapsed(),i&&(e.req_elapsed=d.elapsed()),e}),(0,s.onWindowReady)().then(function(){var n={};["connectEnd","connectStart","domComplete","domContentLoadedEventEnd","domContentLoadedEventStart","domInteractive","domLoading","domainLookupEnd","domainLookupStart","fetchStart","loadEventEnd","loadEventStart","navigationStart","redirectEnd","redirectStart","requestStart","responseEnd","responseStart","secureConnectionStart","unloadEventEnd","unloadEventStart"].forEach(function(e){n[e]=parseInt(window.performance.timing[e],10)||0});var r=n.connectEnd-n.navigationStart;n.connectEnd&&Object.keys(n).forEach(function(e){var t=n[e];t&&(0,o.info)("timing_"+e,{client_elapsed:parseInt(t-n.connectEnd-(f.startTime-r),10),req_elapsed:parseInt(t-n.connectEnd,10)})}),(0,o.info)("timing",n),(0,o.info)("memory",window.performance.memory),(0,o.info)("navigation",window.performance.navigation),window.performance.getEntries&&window.performance.getEntries().forEach(function(e){-1<["link","script","img","css"].indexOf(e.initiatorType)&&(0,o.info)(e.initiatorType,e)})})};var a=n(10),o=n(2),r=n(9),s=n(3),i=window&&window.performance&&performance.now&&performance.timing&&performance.timing.connectEnd&&performance.timing.navigationStart&&1e3<Math.abs(performance.now()-Date.now())&&0<performance.now()-(performance.timing.connectEnd-performance.timing.navigationStart);function c(){return i?performance.now():Date.now()}function l(e){return{startTime:e=void 0!==e?e:c(),elapsed:function(){return parseInt(c()-e,10)},reset:function(){e=c()}}}function u(){if(i){var e=window.performance.timing;return parseInt(e.connectEnd-e.navigationStart,10)}}var f=t.clientTimer=l(),d=t.reqTimer=l(u())},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startTransition=d,t.endTransition=h,t.transition=function(e){d(),h(e)};var i=n(12),a=n(2),r=n(9),o=n(3),s=n(10),c=(0,o.uniqueID)(),l=(0,o.uniqueID)(),u=s.config.initial_state_name,f=void 0;function d(){f=(0,i.now)()}function h(e){f=f||(0,i.reqStartElapsed)();var t=(0,i.now)(),n=void 0;void 0!==f&&(n=parseInt(t-f,0));var r="transition_"+u+"_to_"+e;(0,a.info)(r,{duration:n}),(0,a.track)({transition:r,transition_time:n}),(0,a.immediateFlush)(),f=t,u=e,l=(0,o.uniqueID)()}(0,r.addPayloadBuilder)(function(){return{windowID:c,pageID:l}}),(0,r.addMetaBuilder)(function(){return{state:"ui_"+u}})}])});
\ No newline at end of file
+if(function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(A,e){var t=[],S=A.document,u=t.slice,m=t.concat,s=t.push,i=t.indexOf,n={},r=n.toString,p=n.hasOwnProperty,g={},a="2.2.4",T=function(e,t){return new T.fn.init(e,t)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,c=/^-ms-/,l=/-([\da-z])/gi,f=function(e,t){return t.toUpperCase()};function d(e){var t=!!e&&"length"in e&&e.length,n=T.type(e);return"function"!==n&&!T.isWindow(e)&&("array"===n||0===t||"number"==typeof t&&0<t&&t-1 in e)}T.fn=T.prototype={jquery:a,constructor:T,selector:"",length:0,toArray:function(){return u.call(this)},get:function(e){return null!=e?e<0?this[e+this.length]:this[e]:u.call(this)},pushStack:function(e){var t=T.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return T.each(this,e)},map:function(n){return this.pushStack(T.map(this,function(e,t){return n.call(e,t,e)}))},slice:function(){return this.pushStack(u.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(e<0?t:0);return this.pushStack(0<=n&&n<t?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:s,sort:t.sort,splice:t.splice},T.extend=T.fn.extend=function(){var e,t,n,r,i,a,o=arguments[0]||{},s=1,c=arguments.length,l=!1;for("boolean"==typeof o&&(l=o,o=arguments[s]||{},s++),"object"==typeof o||T.isFunction(o)||(o={}),s===c&&(o=this,s--);s<c;s++)if(null!=(e=arguments[s]))for(t in e)n=o[t],o!==(r=e[t])&&(l&&r&&(T.isPlainObject(r)||(i=T.isArray(r)))?(a=i?(i=!1,n&&T.isArray(n)?n:[]):n&&T.isPlainObject(n)?n:{},o[t]=T.extend(l,a,r)):void 0!==r&&(o[t]=r));return o},T.extend({expando:"jQuery"+(a+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===T.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=e&&e.toString();return!T.isArray(e)&&0<=t-parseFloat(t)+1},isPlainObject:function(e){var t;if("object"!==T.type(e)||e.nodeType||T.isWindow(e))return!1;if(e.constructor&&!p.call(e,"constructor")&&!p.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||p.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[r.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;(e=T.trim(e))&&(1===e.indexOf("use strict")?((t=S.createElement("script")).text=e,S.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(c,"ms-").replace(l,f)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var n,r=0;if(d(e))for(n=e.length;r<n&&!1!==t.call(e[r],r,e[r]);r++);else for(r in e)if(!1===t.call(e[r],r,e[r]))break;return e},trim:function(e){return null==e?"":(e+"").replace(o,"")},makeArray:function(e,t){var n=t||[];return null!=e&&(d(Object(e))?T.merge(n,"string"==typeof e?[e]:e):s.call(n,e)),n},inArray:function(e,t,n){return null==t?-1:i.call(t,e,n)},merge:function(e,t){for(var n=+t.length,r=0,i=e.length;r<n;r++)e[i++]=t[r];return e.length=i,e},grep:function(e,t,n){for(var r=[],i=0,a=e.length,o=!n;i<a;i++)!t(e[i],i)!==o&&r.push(e[i]);return r},map:function(e,t,n){var r,i,a=0,o=[];if(d(e))for(r=e.length;a<r;a++)null!=(i=t(e[a],a,n))&&o.push(i);else for(a in e)null!=(i=t(e[a],a,n))&&o.push(i);return m.apply([],o)},guid:1,proxy:function(e,t){var n,r,i;if("string"==typeof t&&(n=e[t],t=e,e=n),T.isFunction(e))return r=u.call(arguments,2),(i=function(){return e.apply(t||this,r.concat(u.call(arguments)))}).guid=e.guid=e.guid||T.guid++,i},now:Date.now,support:g}),"function"==typeof Symbol&&(T.fn[Symbol.iterator]=t[Symbol.iterator]),T.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){n["[object "+t+"]"]=t.toLowerCase()});var h=function(n){var e,p,y,a,i,m,f,g,w,c,l,C,A,o,S,_,s,u,b,T="sizzle"+1*new Date,v=n.document,x=0,r=0,d=ie(),h=ie(),k=ie(),E=function(e,t){return e===t&&(l=!0),0},D={}.hasOwnProperty,t=[],I=t.pop,P=t.push,M=t.push,$=t.slice,O=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},R="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",N="[\\x20\\t\\r\\n\\f]",L="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",F="\\["+N+"*("+L+")(?:"+N+"*([*^$|!~]?=)"+N+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+L+"))|)"+N+"*\\]",G=":("+L+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+F+")*)|.*)\\)|)",j=new RegExp(N+"+","g"),B=new RegExp("^"+N+"+|((?:^|[^\\\\])(?:\\\\.)*)"+N+"+$","g"),U=new RegExp("^"+N+"*,"+N+"*"),H=new RegExp("^"+N+"*([>+~]|"+N+")"+N+"*"),W=new RegExp("="+N+"*([^\\]'\"]*?)"+N+"*\\]","g"),q=new RegExp(G),z=new RegExp("^"+L+"$"),V={ID:new RegExp("^#("+L+")"),CLASS:new RegExp("^\\.("+L+")"),TAG:new RegExp("^("+L+"|[*])"),ATTR:new RegExp("^"+F),PSEUDO:new RegExp("^"+G),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+N+"*(even|odd|(([+-]|)(\\d*)n|)"+N+"*(?:([+-]|)"+N+"*(\\d+)|))"+N+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+N+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+N+"*((?:-\\d)?\\d*)"+N+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,K=/^h\d$/i,Q=/^[^{]+\{\s*\[native \w/,X=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Z=/[+~]/,J=/'|\\/g,ee=new RegExp("\\\\([\\da-f]{1,6}"+N+"?|("+N+")|.)","ig"),te=function(e,t,n){var r="0x"+t-65536;return r!=r||n?t:r<0?String.fromCharCode(r+65536):String.fromCharCode(r>>10|55296,1023&r|56320)},ne=function(){C()};try{M.apply(t=$.call(v.childNodes),v.childNodes),t[v.childNodes.length].nodeType}catch(e){M={apply:t.length?function(e,t){P.apply(e,$.call(t))}:function(e,t){for(var n=e.length,r=0;e[n++]=t[r++];);e.length=n-1}}}function re(e,t,n,r){var i,a,o,s,c,l,u,f,d=t&&t.ownerDocument,h=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==h&&9!==h&&11!==h)return n;if(!r&&((t?t.ownerDocument||t:v)!==A&&C(t),t=t||A,S)){if(11!==h&&(l=X.exec(e)))if(i=l[1]){if(9===h){if(!(o=t.getElementById(i)))return n;if(o.id===i)return n.push(o),n}else if(d&&(o=d.getElementById(i))&&b(t,o)&&o.id===i)return n.push(o),n}else{if(l[2])return M.apply(n,t.getElementsByTagName(e)),n;if((i=l[3])&&p.getElementsByClassName&&t.getElementsByClassName)return M.apply(n,t.getElementsByClassName(i)),n}if(p.qsa&&!k[e+" "]&&(!_||!_.test(e))){if(1!==h)d=t,f=e;else if("object"!==t.nodeName.toLowerCase()){for((s=t.getAttribute("id"))?s=s.replace(J,"\\$&"):t.setAttribute("id",s=T),a=(u=m(e)).length,c=z.test(s)?"#"+s:"[id='"+s+"']";a--;)u[a]=c+" "+pe(u[a]);f=u.join(","),d=Z.test(e)&&de(t.parentNode)||t}if(f)try{return M.apply(n,d.querySelectorAll(f)),n}catch(e){}finally{s===T&&t.removeAttribute("id")}}}return g(e.replace(B,"$1"),t,n,r)}function ie(){var r=[];return function e(t,n){return r.push(t+" ")>y.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function ae(e){return e[T]=!0,e}function oe(e){var t=A.createElement("div");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function se(e,t){for(var n=e.split("|"),r=n.length;r--;)y.attrHandle[n[r]]=t}function ce(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||1<<31)-(~e.sourceIndex||1<<31);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function le(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function ue(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function fe(o){return ae(function(a){return a=+a,ae(function(e,t){for(var n,r=o([],e.length,a),i=r.length;i--;)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function de(e){return e&&void 0!==e.getElementsByTagName&&e}for(e in p=re.support={},i=re.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return!!t&&"HTML"!==t.nodeName},C=re.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:v;return r!==A&&9===r.nodeType&&r.documentElement&&(o=(A=r).documentElement,S=!i(A),(n=A.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ne,!1):n.attachEvent&&n.attachEvent("onunload",ne)),p.attributes=oe(function(e){return e.className="i",!e.getAttribute("className")}),p.getElementsByTagName=oe(function(e){return e.appendChild(A.createComment("")),!e.getElementsByTagName("*").length}),p.getElementsByClassName=Q.test(A.getElementsByClassName),p.getById=oe(function(e){return o.appendChild(e).id=T,!A.getElementsByName||!A.getElementsByName(T).length}),p.getById?(y.find.ID=function(e,t){if(void 0!==t.getElementById&&S){var n=t.getElementById(e);return n?[n]:[]}},y.filter.ID=function(e){var t=e.replace(ee,te);return function(e){return e.getAttribute("id")===t}}):(delete y.find.ID,y.filter.ID=function(e){var n=e.replace(ee,te);return function(e){var t=void 0!==e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}}),y.find.TAG=p.getElementsByTagName?function(e,t){return void 0!==t.getElementsByTagName?t.getElementsByTagName(e):p.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,a=t.getElementsByTagName(e);if("*"!==e)return a;for(;n=a[i++];)1===n.nodeType&&r.push(n);return r},y.find.CLASS=p.getElementsByClassName&&function(e,t){if(void 0!==t.getElementsByClassName&&S)return t.getElementsByClassName(e)},s=[],_=[],(p.qsa=Q.test(A.querySelectorAll))&&(oe(function(e){o.appendChild(e).innerHTML="<a id='"+T+"'></a><select id='"+T+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&_.push("[*^$]="+N+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||_.push("\\["+N+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+T+"-]").length||_.push("~="),e.querySelectorAll(":checked").length||_.push(":checked"),e.querySelectorAll("a#"+T+"+*").length||_.push(".#.+[+~]")}),oe(function(e){var t=A.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&_.push("name"+N+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||_.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),_.push(",.*:")})),(p.matchesSelector=Q.test(u=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector))&&oe(function(e){p.disconnectedMatch=u.call(e,"div"),u.call(e,"[s!='']:x"),s.push("!=",G)}),_=_.length&&new RegExp(_.join("|")),s=s.length&&new RegExp(s.join("|")),t=Q.test(o.compareDocumentPosition),b=t||Q.test(o.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},E=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!p.sortDetached&&t.compareDocumentPosition(e)===n?e===A||e.ownerDocument===v&&b(v,e)?-1:t===A||t.ownerDocument===v&&b(v,t)?1:c?O(c,e)-O(c,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,a=t.parentNode,o=[e],s=[t];if(!i||!a)return e===A?-1:t===A?1:i?-1:a?1:c?O(c,e)-O(c,t):0;if(i===a)return ce(e,t);for(n=e;n=n.parentNode;)o.unshift(n);for(n=t;n=n.parentNode;)s.unshift(n);for(;o[r]===s[r];)r++;return r?ce(o[r],s[r]):o[r]===v?-1:s[r]===v?1:0}),A},re.matches=function(e,t){return re(e,null,null,t)},re.matchesSelector=function(e,t){if((e.ownerDocument||e)!==A&&C(e),t=t.replace(W,"='$1']"),p.matchesSelector&&S&&!k[t+" "]&&(!s||!s.test(t))&&(!_||!_.test(t)))try{var n=u.call(e,t);if(n||p.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){}return 0<re(t,A,null,[e]).length},re.contains=function(e,t){return(e.ownerDocument||e)!==A&&C(e),b(e,t)},re.attr=function(e,t){(e.ownerDocument||e)!==A&&C(e);var n=y.attrHandle[t.toLowerCase()],r=n&&D.call(y.attrHandle,t.toLowerCase())?n(e,t,!S):void 0;return void 0!==r?r:p.attributes||!S?e.getAttribute(t):(r=e.getAttributeNode(t))&&r.specified?r.value:null},re.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},re.uniqueSort=function(e){var t,n=[],r=0,i=0;if(l=!p.detectDuplicates,c=!p.sortStable&&e.slice(0),e.sort(E),l){for(;t=e[i++];)t===e[i]&&(r=n.push(i));for(;r--;)e.splice(n[r],1)}return c=null,e},a=re.getText=function(e){var t,n="",r=0,i=e.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=a(e)}else if(3===i||4===i)return e.nodeValue}else for(;t=e[r++];)n+=a(t);return n},(y=re.selectors={cacheLength:50,createPseudo:ae,match:V,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(ee,te),e[3]=(e[3]||e[4]||e[5]||"").replace(ee,te),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||re.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&re.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return V.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&q.test(n)&&(t=m(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(ee,te).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=d[e+" "];return t||(t=new RegExp("(^|"+N+")"+e+"("+N+"|$)"))&&d(e,function(e){return t.test("string"==typeof e.className&&e.className||void 0!==e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=re.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1<t.indexOf(i):"$="===r?i&&t.slice(-i.length)===i:"~="===r?-1<(" "+t.replace(j," ")+" ").indexOf(i):"|="===r&&(t===i||t.slice(0,i.length+1)===i+"-"))}},CHILD:function(p,e,t,m,g){var _="nth"!==p.slice(0,3),b="last"!==p.slice(-4),v="of-type"===e;return 1===m&&0===g?function(e){return!!e.parentNode}:function(e,t,n){var r,i,a,o,s,c,l=_!==b?"nextSibling":"previousSibling",u=e.parentNode,f=v&&e.nodeName.toLowerCase(),d=!n&&!v,h=!1;if(u){if(_){for(;l;){for(o=e;o=o[l];)if(v?o.nodeName.toLowerCase()===f:1===o.nodeType)return!1;c=l="only"===p&&!c&&"nextSibling"}return!0}if(c=[b?u.firstChild:u.lastChild],b&&d){for(h=(s=(r=(i=(a=(o=u)[T]||(o[T]={}))[o.uniqueID]||(a[o.uniqueID]={}))[p]||[])[0]===x&&r[1])&&r[2],o=s&&u.childNodes[s];o=++s&&o&&o[l]||(h=s=0)||c.pop();)if(1===o.nodeType&&++h&&o===e){i[p]=[x,s,h];break}}else if(d&&(h=s=(r=(i=(a=(o=e)[T]||(o[T]={}))[o.uniqueID]||(a[o.uniqueID]={}))[p]||[])[0]===x&&r[1]),!1===h)for(;(o=++s&&o&&o[l]||(h=s=0)||c.pop())&&((v?o.nodeName.toLowerCase()!==f:1!==o.nodeType)||!++h||(d&&((i=(a=o[T]||(o[T]={}))[o.uniqueID]||(a[o.uniqueID]={}))[p]=[x,h]),o!==e)););return(h-=g)===m||h%m==0&&0<=h/m}}},PSEUDO:function(e,a){var t,o=y.pseudos[e]||y.setFilters[e.toLowerCase()]||re.error("unsupported pseudo: "+e);return o[T]?o(a):1<o.length?(t=[e,e,"",a],y.setFilters.hasOwnProperty(e.toLowerCase())?ae(function(e,t){for(var n,r=o(e,a),i=r.length;i--;)e[n=O(e,r[i])]=!(t[n]=r[i])}):function(e){return o(e,0,t)}):o}},pseudos:{not:ae(function(e){var r=[],i=[],s=f(e.replace(B,"$1"));return s[T]?ae(function(e,t,n,r){for(var i,a=s(e,null,r,[]),o=e.length;o--;)(i=a[o])&&(e[o]=!(t[o]=i))}):function(e,t,n){return r[0]=e,s(r,null,n,i),r[0]=null,!i.pop()}}),has:ae(function(t){return function(e){return 0<re(t,e).length}}),contains:ae(function(t){return t=t.replace(ee,te),function(e){return-1<(e.textContent||e.innerText||a(e)).indexOf(t)}}),lang:ae(function(n){return z.test(n||"")||re.error("unsupported lang: "+n),n=n.replace(ee,te).toLowerCase(),function(e){var t;do{if(t=S?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(t=t.toLowerCase())===n||0===t.indexOf(n+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var t=n.location&&n.location.hash;return t&&t.slice(1)===e.id},root:function(e){return e===o},focus:function(e){return e===A.activeElement&&(!A.hasFocus||A.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return!1===e.disabled},disabled:function(e){return!0===e.disabled},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,!0===e.selected},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!y.pseudos.empty(e)},header:function(e){return K.test(e.nodeName)},input:function(e){return Y.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:fe(function(){return[0]}),last:fe(function(e,t){return[t-1]}),eq:fe(function(e,t,n){return[n<0?n+t:n]}),even:fe(function(e,t){for(var n=0;n<t;n+=2)e.push(n);return e}),odd:fe(function(e,t){for(var n=1;n<t;n+=2)e.push(n);return e}),lt:fe(function(e,t,n){for(var r=n<0?n+t:n;0<=--r;)e.push(r);return e}),gt:fe(function(e,t,n){for(var r=n<0?n+t:n;++r<t;)e.push(r);return e})}}).pseudos.nth=y.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})y.pseudos[e]=le(e);for(e in{submit:!0,reset:!0})y.pseudos[e]=ue(e);function he(){}function pe(e){for(var t=0,n=e.length,r="";t<n;t++)r+=e[t].value;return r}function me(s,e,t){var c=e.dir,l=t&&"parentNode"===c,u=r++;return e.first?function(e,t,n){for(;e=e[c];)if(1===e.nodeType||l)return s(e,t,n)}:function(e,t,n){var r,i,a,o=[x,u];if(n){for(;e=e[c];)if((1===e.nodeType||l)&&s(e,t,n))return!0}else for(;e=e[c];)if(1===e.nodeType||l){if((r=(i=(a=e[T]||(e[T]={}))[e.uniqueID]||(a[e.uniqueID]={}))[c])&&r[0]===x&&r[1]===u)return o[2]=r[2];if((i[c]=o)[2]=s(e,t,n))return!0}}}function ge(i){return 1<i.length?function(e,t,n){for(var r=i.length;r--;)if(!i[r](e,t,n))return!1;return!0}:i[0]}function _e(e,t,n,r,i){for(var a,o=[],s=0,c=e.length,l=null!=t;s<c;s++)(a=e[s])&&(n&&!n(a,r,i)||(o.push(a),l&&t.push(s)));return o}function be(h,p,m,g,_,e){return g&&!g[T]&&(g=be(g)),_&&!_[T]&&(_=be(_,e)),ae(function(e,t,n,r){var i,a,o,s=[],c=[],l=t.length,u=e||function(e,t,n){for(var r=0,i=t.length;r<i;r++)re(e,t[r],n);return n}(p||"*",n.nodeType?[n]:n,[]),f=!h||!e&&p?u:_e(u,s,h,n,r),d=m?_||(e?h:l||g)?[]:t:f;if(m&&m(f,d,n,r),g)for(i=_e(d,c),g(i,[],n,r),a=i.length;a--;)(o=i[a])&&(d[c[a]]=!(f[c[a]]=o));if(e){if(_||h){if(_){for(i=[],a=d.length;a--;)(o=d[a])&&i.push(f[a]=o);_(null,d=[],i,r)}for(a=d.length;a--;)(o=d[a])&&-1<(i=_?O(e,o):s[a])&&(e[i]=!(t[i]=o))}}else d=_e(d===t?d.splice(l,d.length):d),_?_(null,t,d,r):M.apply(t,d)})}function ve(e){for(var i,t,n,r=e.length,a=y.relative[e[0].type],o=a||y.relative[" "],s=a?1:0,c=me(function(e){return e===i},o,!0),l=me(function(e){return-1<O(i,e)},o,!0),u=[function(e,t,n){var r=!a&&(n||t!==w)||((i=t).nodeType?c(e,t,n):l(e,t,n));return i=null,r}];s<r;s++)if(t=y.relative[e[s].type])u=[me(ge(u),t)];else{if((t=y.filter[e[s].type].apply(null,e[s].matches))[T]){for(n=++s;n<r&&!y.relative[e[n].type];n++);return be(1<s&&ge(u),1<s&&pe(e.slice(0,s-1).concat({value:" "===e[s-2].type?"*":""})).replace(B,"$1"),t,s<n&&ve(e.slice(s,n)),n<r&&ve(e=e.slice(n)),n<r&&pe(e))}u.push(t)}return ge(u)}return he.prototype=y.filters=y.pseudos,y.setFilters=new he,m=re.tokenize=function(e,t){var n,r,i,a,o,s,c,l=h[e+" "];if(l)return t?0:l.slice(0);for(o=e,s=[],c=y.preFilter;o;){for(a in n&&!(r=U.exec(o))||(r&&(o=o.slice(r[0].length)||o),s.push(i=[])),n=!1,(r=H.exec(o))&&(n=r.shift(),i.push({value:n,type:r[0].replace(B," ")}),o=o.slice(n.length)),y.filter)!(r=V[a].exec(o))||c[a]&&!(r=c[a](r))||(n=r.shift(),i.push({value:n,type:a,matches:r}),o=o.slice(n.length));if(!n)break}return t?o.length:o?re.error(e):h(e,s).slice(0)},f=re.compile=function(e,t){var n,g,_,b,v,r,i=[],a=[],o=k[e+" "];if(!o){for(t||(t=m(e)),n=t.length;n--;)(o=ve(t[n]))[T]?i.push(o):a.push(o);(o=k(e,(g=a,b=0<(_=i).length,v=0<g.length,r=function(e,t,n,r,i){var a,o,s,c=0,l="0",u=e&&[],f=[],d=w,h=e||v&&y.find.TAG("*",i),p=x+=null==d?1:Math.random()||.1,m=h.length;for(i&&(w=t===A||t||i);l!==m&&null!=(a=h[l]);l++){if(v&&a){for(o=0,t||a.ownerDocument===A||(C(a),n=!S);s=g[o++];)if(s(a,t||A,n)){r.push(a);break}i&&(x=p)}b&&((a=!s&&a)&&c--,e&&u.push(a))}if(c+=l,b&&l!==c){for(o=0;s=_[o++];)s(u,f,t,n);if(e){if(0<c)for(;l--;)u[l]||f[l]||(f[l]=I.call(r));f=_e(f)}M.apply(r,f),i&&!e&&0<f.length&&1<c+_.length&&re.uniqueSort(r)}return i&&(x=p,w=d),u},b?ae(r):r))).selector=e}return o},g=re.select=function(e,t,n,r){var i,a,o,s,c,l="function"==typeof e&&e,u=!r&&m(e=l.selector||e);if(n=n||[],1===u.length){if(2<(a=u[0]=u[0].slice(0)).length&&"ID"===(o=a[0]).type&&p.getById&&9===t.nodeType&&S&&y.relative[a[1].type]){if(!(t=(y.find.ID(o.matches[0].replace(ee,te),t)||[])[0]))return n;l&&(t=t.parentNode),e=e.slice(a.shift().value.length)}for(i=V.needsContext.test(e)?0:a.length;i--&&(o=a[i],!y.relative[s=o.type]);)if((c=y.find[s])&&(r=c(o.matches[0].replace(ee,te),Z.test(a[0].type)&&de(t.parentNode)||t))){if(a.splice(i,1),!(e=r.length&&pe(a)))return M.apply(n,r),n;break}}return(l||f(e,u))(r,t,!S,n,!t||Z.test(e)&&de(t.parentNode)||t),n},p.sortStable=T.split("").sort(E).join("")===T,p.detectDuplicates=!!l,C(),p.sortDetached=oe(function(e){return 1&e.compareDocumentPosition(A.createElement("div"))}),oe(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||se("type|href|height|width",function(e,t,n){if(!n)return e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),p.attributes&&oe(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||se("value",function(e,t,n){if(!n&&"input"===e.nodeName.toLowerCase())return e.defaultValue}),oe(function(e){return null==e.getAttribute("disabled")})||se(R,function(e,t,n){var r;if(!n)return!0===e[t]?t.toLowerCase():(r=e.getAttributeNode(t))&&r.specified?r.value:null}),re}(A);T.find=h,T.expr=h.selectors,T.expr[":"]=T.expr.pseudos,T.uniqueSort=T.unique=h.uniqueSort,T.text=h.getText,T.isXMLDoc=h.isXML,T.contains=h.contains;var _=function(e,t,n){for(var r=[],i=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(i&&T(e).is(n))break;r.push(e)}return r},b=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},v=T.expr.match.needsContext,y=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,w=/^.[^:#\[\.,]*$/;function C(e,n,r){if(T.isFunction(n))return T.grep(e,function(e,t){return!!n.call(e,t,e)!==r});if(n.nodeType)return T.grep(e,function(e){return e===n!==r});if("string"==typeof n){if(w.test(n))return T.filter(n,e,r);n=T.filter(n,e)}return T.grep(e,function(e){return-1<i.call(n,e)!==r})}T.filter=function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?T.find.matchesSelector(r,e)?[r]:[]:T.find.matches(e,T.grep(t,function(e){return 1===e.nodeType}))},T.fn.extend({find:function(e){var t,n=this.length,r=[],i=this;if("string"!=typeof e)return this.pushStack(T(e).filter(function(){for(t=0;t<n;t++)if(T.contains(i[t],this))return!0}));for(t=0;t<n;t++)T.find(e,i[t],r);return(r=this.pushStack(1<n?T.unique(r):r)).selector=this.selector?this.selector+" "+e:e,r},filter:function(e){return this.pushStack(C(this,e||[],!1))},not:function(e){return this.pushStack(C(this,e||[],!0))},is:function(e){return!!C(this,"string"==typeof e&&v.test(e)?T(e):e||[],!1).length}});var x,k=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/;(T.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||x,"string"!=typeof e)return e.nodeType?(this.context=this[0]=e,this.length=1,this):T.isFunction(e)?void 0!==n.ready?n.ready(e):e(T):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),T.makeArray(e,this));if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:k.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof T?t[0]:t,T.merge(this,T.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),y.test(r[1])&&T.isPlainObject(t))for(r in t)T.isFunction(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=S.getElementById(r[2]))&&i.parentNode&&(this.length=1,this[0]=i),this.context=S,this.selector=e,this}).prototype=T.fn,x=T(S);var E=/^(?:parents|prev(?:Until|All))/,D={children:!0,contents:!0,next:!0,prev:!0};function I(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}T.fn.extend({has:function(e){var t=T(e,this),n=t.length;return this.filter(function(){for(var e=0;e<n;e++)if(T.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,r=0,i=this.length,a=[],o=v.test(e)||"string"!=typeof e?T(e,t||this.context):0;r<i;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(o?-1<o.index(n):1===n.nodeType&&T.find.matchesSelector(n,e))){a.push(n);break}return this.pushStack(1<a.length?T.uniqueSort(a):a)},index:function(e){return e?"string"==typeof e?i.call(T(e),this[0]):i.call(this,e.jquery?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(T.uniqueSort(T.merge(this.get(),T(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),T.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return _(e,"parentNode")},parentsUntil:function(e,t,n){return _(e,"parentNode",n)},next:function(e){return I(e,"nextSibling")},prev:function(e){return I(e,"previousSibling")},nextAll:function(e){return _(e,"nextSibling")},prevAll:function(e){return _(e,"previousSibling")},nextUntil:function(e,t,n){return _(e,"nextSibling",n)},prevUntil:function(e,t,n){return _(e,"previousSibling",n)},siblings:function(e){return b((e.parentNode||{}).firstChild,e)},children:function(e){return b(e.firstChild)},contents:function(e){return e.contentDocument||T.merge([],e.childNodes)}},function(r,i){T.fn[r]=function(e,t){var n=T.map(this,i,e);return"Until"!==r.slice(-5)&&(t=e),t&&"string"==typeof t&&(n=T.filter(t,n)),1<this.length&&(D[r]||T.uniqueSort(n),E.test(r)&&n.reverse()),this.pushStack(n)}});var P,M=/\S+/g;function $(){S.removeEventListener("DOMContentLoaded",$),A.removeEventListener("load",$),T.ready()}T.Callbacks=function(r){var e,n;r="string"==typeof r?(e=r,n={},T.each(e.match(M)||[],function(e,t){n[t]=!0}),n):T.extend({},r);var i,t,a,o,s=[],c=[],l=-1,u=function(){for(o=r.once,a=i=!0;c.length;l=-1)for(t=c.shift();++l<s.length;)!1===s[l].apply(t[0],t[1])&&r.stopOnFalse&&(l=s.length,t=!1);r.memory||(t=!1),i=!1,o&&(s=t?[]:"")},f={add:function(){return s&&(t&&!i&&(l=s.length-1,c.push(t)),function n(e){T.each(e,function(e,t){T.isFunction(t)?r.unique&&f.has(t)||s.push(t):t&&t.length&&"string"!==T.type(t)&&n(t)})}(arguments),t&&!i&&u()),this},remove:function(){return T.each(arguments,function(e,t){for(var n;-1<(n=T.inArray(t,s,n));)s.splice(n,1),n<=l&&l--}),this},has:function(e){return e?-1<T.inArray(e,s):0<s.length},empty:function(){return s&&(s=[]),this},disable:function(){return o=c=[],s=t="",this},disabled:function(){return!s},lock:function(){return o=c=[],t||(s=t=""),this},locked:function(){return!!o},fireWith:function(e,t){return o||(t=[e,(t=t||[]).slice?t.slice():t],c.push(t),i||u()),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!a}};return f},T.extend({Deferred:function(e){var a=[["resolve","done",T.Callbacks("once memory"),"resolved"],["reject","fail",T.Callbacks("once memory"),"rejected"],["notify","progress",T.Callbacks("memory")]],i="pending",o={state:function(){return i},always:function(){return s.done(arguments).fail(arguments),this},then:function(){var i=arguments;return T.Deferred(function(r){T.each(a,function(e,t){var n=T.isFunction(i[e])&&i[e];s[t[1]](function(){var e=n&&n.apply(this,arguments);e&&T.isFunction(e.promise)?e.promise().progress(r.notify).done(r.resolve).fail(r.reject):r[t[0]+"With"](this===o?r.promise():this,n?[e]:arguments)})}),i=null}).promise()},promise:function(e){return null!=e?T.extend(e,o):o}},s={};return o.pipe=o.then,T.each(a,function(e,t){var n=t[2],r=t[3];o[t[1]]=n.add,r&&n.add(function(){i=r},a[1^e][2].disable,a[2][2].lock),s[t[0]]=function(){return s[t[0]+"With"](this===s?o:this,arguments),this},s[t[0]+"With"]=n.fireWith}),o.promise(s),e&&e.call(s,s),s},when:function(e){var i,t,n,r=0,a=u.call(arguments),o=a.length,s=1!==o||e&&T.isFunction(e.promise)?o:0,c=1===s?e:T.Deferred(),l=function(t,n,r){return function(e){n[t]=this,r[t]=1<arguments.length?u.call(arguments):e,r===i?c.notifyWith(n,r):--s||c.resolveWith(n,r)}};if(1<o)for(i=new Array(o),t=new Array(o),n=new Array(o);r<o;r++)a[r]&&T.isFunction(a[r].promise)?a[r].promise().progress(l(r,t,i)).done(l(r,n,a)).fail(c.reject):--s;return s||c.resolveWith(n,a),c.promise()}}),T.fn.ready=function(e){return T.ready.promise().done(e),this},T.extend({isReady:!1,readyWait:1,holdReady:function(e){e?T.readyWait++:T.ready(!0)},ready:function(e){(!0===e?--T.readyWait:T.isReady)||(T.isReady=!0)!==e&&0<--T.readyWait||(P.resolveWith(S,[T]),T.fn.triggerHandler&&(T(S).triggerHandler("ready"),T(S).off("ready")))}}),T.ready.promise=function(e){return P||(P=T.Deferred(),"complete"===S.readyState||"loading"!==S.readyState&&!S.documentElement.doScroll?A.setTimeout(T.ready):(S.addEventListener("DOMContentLoaded",$),A.addEventListener("load",$))),P.promise(e)},T.ready.promise();var O=function(e,t,n,r,i,a,o){var s=0,c=e.length,l=null==n;if("object"===T.type(n))for(s in i=!0,n)O(e,t,s,n[s],!0,a,o);else if(void 0!==r&&(i=!0,T.isFunction(r)||(o=!0),l&&(t=o?(t.call(e,r),null):(l=t,function(e,t,n){return l.call(T(e),n)})),t))for(;s<c;s++)t(e[s],n,o?r:r.call(e[s],s,t(e[s],n)));return i?e:l?t.call(e):c?t(e[0],n):a},R=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};function N(){this.expando=T.expando+N.uid++}N.uid=1,N.prototype={register:function(e,t){var n=t||{};return e.nodeType?e[this.expando]=n:Object.defineProperty(e,this.expando,{value:n,writable:!0,configurable:!0}),e[this.expando]},cache:function(e){if(!R(e))return{};var t=e[this.expando];return t||(t={},R(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var r,i=this.cache(e);if("string"==typeof t)i[t]=n;else for(r in t)i[r]=t[r];return i},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][t]},access:function(e,t,n){var r;return void 0===t||t&&"string"==typeof t&&void 0===n?void 0!==(r=this.get(e,t))?r:this.get(e,T.camelCase(t)):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,r,i,a=e[this.expando];if(void 0!==a){if(void 0===t)this.register(e);else{n=(r=T.isArray(t)?t.concat(t.map(T.camelCase)):(i=T.camelCase(t),t in a?[t,i]:(r=i)in a?[r]:r.match(M)||[])).length;for(;n--;)delete a[r[n]]}(void 0===t||T.isEmptyObject(a))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!T.isEmptyObject(t)}};var L=new N,F=new N,G=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,j=/[A-Z]/g;function B(e,t,n){var r;if(void 0===n&&1===e.nodeType)if(r="data-"+t.replace(j,"-$&").toLowerCase(),"string"==typeof(n=e.getAttribute(r))){try{n="true"===n||"false"!==n&&("null"===n?null:+n+""===n?+n:G.test(n)?T.parseJSON(n):n)}catch(e){}F.set(e,t,n)}else n=void 0;return n}T.extend({hasData:function(e){return F.hasData(e)||L.hasData(e)},data:function(e,t,n){return F.access(e,t,n)},removeData:function(e,t){F.remove(e,t)},_data:function(e,t,n){return L.access(e,t,n)},_removeData:function(e,t){L.remove(e,t)}}),T.fn.extend({data:function(r,e){var t,n,i,a=this[0],o=a&&a.attributes;if(void 0!==r)return"object"==typeof r?this.each(function(){F.set(this,r)}):O(this,function(t){var e,n;if(a&&void 0===t)return void 0!==(e=F.get(a,r)||F.get(a,r.replace(j,"-$&").toLowerCase()))?e:(n=T.camelCase(r),void 0!==(e=F.get(a,n))?e:void 0!==(e=B(a,n,void 0))?e:void 0);n=T.camelCase(r),this.each(function(){var e=F.get(this,n);F.set(this,n,t),-1<r.indexOf("-")&&void 0!==e&&F.set(this,r,t)})},null,e,1<arguments.length,null,!0);if(this.length&&(i=F.get(a),1===a.nodeType&&!L.get(a,"hasDataAttrs"))){for(t=o.length;t--;)o[t]&&0===(n=o[t].name).indexOf("data-")&&(n=T.camelCase(n.slice(5)),B(a,n,i[n]));L.set(a,"hasDataAttrs",!0)}return i},removeData:function(e){return this.each(function(){F.remove(this,e)})}}),T.extend({queue:function(e,t,n){var r;if(e)return t=(t||"fx")+"queue",r=L.get(e,t),n&&(!r||T.isArray(n)?r=L.access(e,t,T.makeArray(n)):r.push(n)),r||[]},dequeue:function(e,t){t=t||"fx";var n=T.queue(e,t),r=n.length,i=n.shift(),a=T._queueHooks(e,t);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete a.stop,i.call(e,function(){T.dequeue(e,t)},a)),!r&&a&&a.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return L.get(e,n)||L.access(e,n,{empty:T.Callbacks("once memory").add(function(){L.remove(e,[t+"queue",n])})})}}),T.fn.extend({queue:function(t,n){var e=2;return"string"!=typeof t&&(n=t,t="fx",e--),arguments.length<e?T.queue(this[0],t):void 0===n?this:this.each(function(){var e=T.queue(this,t,n);T._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&T.dequeue(this,t)})},dequeue:function(e){return this.each(function(){T.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,r=1,i=T.Deferred(),a=this,o=this.length,s=function(){--r||i.resolveWith(a,[a])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";o--;)(n=L.get(a[o],e+"queueHooks"))&&n.empty&&(r++,n.empty.add(s));return s(),i.promise(t)}});var U=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,H=new RegExp("^(?:([+-])=|)("+U+")([a-z%]*)$","i"),W=["Top","Right","Bottom","Left"],q=function(e,t){return e=t||e,"none"===T.css(e,"display")||!T.contains(e.ownerDocument,e)};function z(e,t,n,r){var i,a=1,o=20,s=r?function(){return r.cur()}:function(){return T.css(e,t,"")},c=s(),l=n&&n[3]||(T.cssNumber[t]?"":"px"),u=(T.cssNumber[t]||"px"!==l&&+c)&&H.exec(T.css(e,t));if(u&&u[3]!==l)for(l=l||u[3],n=n||[],u=+c||1;u/=a=a||".5",T.style(e,t,u+l),a!==(a=s()/c)&&1!==a&&--o;);return n&&(u=+u||+c||0,i=n[1]?u+(n[1]+1)*n[2]:+n[2],r&&(r.unit=l,r.start=u,r.end=i)),i}var V=/^(?:checkbox|radio)$/i,Y=/<([\w:-]+)/,K=/^$|\/(?:java|ecma)script/i,Q={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function X(e,t){var n=void 0!==e.getElementsByTagName?e.getElementsByTagName(t||"*"):void 0!==e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&T.nodeName(e,t)?T.merge([e],n):n}function Z(e,t){for(var n=0,r=e.length;n<r;n++)L.set(e[n],"globalEval",!t||L.get(t[n],"globalEval"))}Q.optgroup=Q.option,Q.tbody=Q.tfoot=Q.colgroup=Q.caption=Q.thead,Q.th=Q.td;var J,ee,te=/<|&#?\w+;/;function ne(e,t,n,r,i){for(var a,o,s,c,l,u,f=t.createDocumentFragment(),d=[],h=0,p=e.length;h<p;h++)if((a=e[h])||0===a)if("object"===T.type(a))T.merge(d,a.nodeType?[a]:a);else if(te.test(a)){for(o=o||f.appendChild(t.createElement("div")),s=(Y.exec(a)||["",""])[1].toLowerCase(),c=Q[s]||Q._default,o.innerHTML=c[1]+T.htmlPrefilter(a)+c[2],u=c[0];u--;)o=o.lastChild;T.merge(d,o.childNodes),(o=f.firstChild).textContent=""}else d.push(t.createTextNode(a));for(f.textContent="",h=0;a=d[h++];)if(r&&-1<T.inArray(a,r))i&&i.push(a);else if(l=T.contains(a.ownerDocument,a),o=X(f.appendChild(a),"script"),l&&Z(o),n)for(u=0;a=o[u++];)K.test(a.type||"")&&n.push(a);return f}J=S.createDocumentFragment().appendChild(S.createElement("div")),(ee=S.createElement("input")).setAttribute("type","radio"),ee.setAttribute("checked","checked"),ee.setAttribute("name","t"),J.appendChild(ee),g.checkClone=J.cloneNode(!0).cloneNode(!0).lastChild.checked,J.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!J.cloneNode(!0).lastChild.defaultValue;var re=/^key/,ie=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,ae=/^([^.]*)(?:\.(.+)|)/;function oe(){return!0}function se(){return!1}function ce(){try{return S.activeElement}catch(e){}}function le(e,t,n,r,i,a){var o,s;if("object"==typeof t){for(s in"string"!=typeof n&&(r=r||n,n=void 0),t)le(e,s,n,r,t[s],a);return e}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=se;else if(!i)return e;return 1===a&&(o=i,(i=function(e){return T().off(e),o.apply(this,arguments)}).guid=o.guid||(o.guid=T.guid++)),e.each(function(){T.event.add(this,t,i,r,n)})}T.event={global:{},add:function(t,e,n,r,i){var a,o,s,c,l,u,f,d,h,p,m,g=L.get(t);if(g)for(n.handler&&(n=(a=n).handler,i=a.selector),n.guid||(n.guid=T.guid++),(c=g.events)||(c=g.events={}),(o=g.handle)||(o=g.handle=function(e){return void 0!==T&&T.event.triggered!==e.type?T.event.dispatch.apply(t,arguments):void 0}),l=(e=(e||"").match(M)||[""]).length;l--;)h=m=(s=ae.exec(e[l])||[])[1],p=(s[2]||"").split(".").sort(),h&&(f=T.event.special[h]||{},h=(i?f.delegateType:f.bindType)||h,f=T.event.special[h]||{},u=T.extend({type:h,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&T.expr.match.needsContext.test(i),namespace:p.join(".")},a),(d=c[h])||((d=c[h]=[]).delegateCount=0,f.setup&&!1!==f.setup.call(t,r,p,o)||t.addEventListener&&t.addEventListener(h,o)),f.add&&(f.add.call(t,u),u.handler.guid||(u.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,u):d.push(u),T.event.global[h]=!0)},remove:function(e,t,n,r,i){var a,o,s,c,l,u,f,d,h,p,m,g=L.hasData(e)&&L.get(e);if(g&&(c=g.events)){for(l=(t=(t||"").match(M)||[""]).length;l--;)if(h=m=(s=ae.exec(t[l])||[])[1],p=(s[2]||"").split(".").sort(),h){for(f=T.event.special[h]||{},d=c[h=(r?f.delegateType:f.bindType)||h]||[],s=s[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=a=d.length;a--;)u=d[a],!i&&m!==u.origType||n&&n.guid!==u.guid||s&&!s.test(u.namespace)||r&&r!==u.selector&&("**"!==r||!u.selector)||(d.splice(a,1),u.selector&&d.delegateCount--,f.remove&&f.remove.call(e,u));o&&!d.length&&(f.teardown&&!1!==f.teardown.call(e,p,g.handle)||T.removeEvent(e,h,g.handle),delete c[h])}else for(h in c)T.event.remove(e,h+t[l],n,r,!0);T.isEmptyObject(c)&&L.remove(e,"handle events")}},dispatch:function(e){e=T.event.fix(e);var t,n,r,i,a,o,s=u.call(arguments),c=(L.get(this,"events")||{})[e.type]||[],l=T.event.special[e.type]||{};if((s[0]=e).delegateTarget=this,!l.preDispatch||!1!==l.preDispatch.call(this,e)){for(o=T.event.handlers.call(this,e,c),t=0;(i=o[t++])&&!e.isPropagationStopped();)for(e.currentTarget=i.elem,n=0;(a=i.handlers[n++])&&!e.isImmediatePropagationStopped();)e.rnamespace&&!e.rnamespace.test(a.namespace)||(e.handleObj=a,e.data=a.data,void 0!==(r=((T.event.special[a.origType]||{}).handle||a.handler).apply(i.elem,s))&&!1===(e.result=r)&&(e.preventDefault(),e.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,r,i,a,o=[],s=t.delegateCount,c=e.target;if(s&&c.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&(!0!==c.disabled||"click"!==e.type)){for(r=[],n=0;n<s;n++)void 0===r[i=(a=t[n]).selector+" "]&&(r[i]=a.needsContext?-1<T(i,this).index(c):T.find(i,this,null,[c]).length),r[i]&&r.push(a);r.length&&o.push({elem:c,handlers:r})}return s<t.length&&o.push({elem:this,handlers:t.slice(s)}),o},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,r,i,a=t.button;return null==e.pageX&&null!=t.clientX&&(r=(n=e.target.ownerDocument||S).documentElement,i=n.body,e.pageX=t.clientX+(r&&r.scrollLeft||i&&i.scrollLeft||0)-(r&&r.clientLeft||i&&i.clientLeft||0),e.pageY=t.clientY+(r&&r.scrollTop||i&&i.scrollTop||0)-(r&&r.clientTop||i&&i.clientTop||0)),e.which||void 0===a||(e.which=1&a?1:2&a?3:4&a?2:0),e}},fix:function(e){if(e[T.expando])return e;var t,n,r,i=e.type,a=e,o=this.fixHooks[i];for(o||(this.fixHooks[i]=o=ie.test(i)?this.mouseHooks:re.test(i)?this.keyHooks:{}),r=o.props?this.props.concat(o.props):this.props,e=new T.Event(a),t=r.length;t--;)e[n=r[t]]=a[n];return e.target||(e.target=S),3===e.target.nodeType&&(e.target=e.target.parentNode),o.filter?o.filter(e,a):e},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==ce()&&this.focus)return this.focus(),!1},delegateType:"focusin"},blur:{trigger:function(){if(this===ce()&&this.blur)return this.blur(),!1},delegateType:"focusout"},click:{trigger:function(){if("checkbox"===this.type&&this.click&&T.nodeName(this,"input"))return this.click(),!1},_default:function(e){return T.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},T.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},T.Event=function(e,t){if(!(this instanceof T.Event))return new T.Event(e,t);e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&!1===e.returnValue?oe:se):this.type=e,t&&T.extend(this,t),this.timeStamp=e&&e.timeStamp||T.now(),this[T.expando]=!0},T.Event.prototype={constructor:T.Event,isDefaultPrevented:se,isPropagationStopped:se,isImmediatePropagationStopped:se,isSimulated:!1,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=oe,e&&!this.isSimulated&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=oe,e&&!this.isSimulated&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=oe,e&&!this.isSimulated&&e.stopImmediatePropagation(),this.stopPropagation()}},T.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,i){T.event.special[e]={delegateType:i,bindType:i,handle:function(e){var t,n=e.relatedTarget,r=e.handleObj;return n&&(n===this||T.contains(this,n))||(e.type=r.origType,t=r.handler.apply(this,arguments),e.type=i),t}}}),T.fn.extend({on:function(e,t,n,r){return le(this,e,t,n,r)},one:function(e,t,n,r){return le(this,e,t,n,r,1)},off:function(e,t,n){var r,i;if(e&&e.preventDefault&&e.handleObj)return r=e.handleObj,T(e.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"!=typeof e)return!1!==t&&"function"!=typeof t||(n=t,t=void 0),!1===n&&(n=se),this.each(function(){T.event.remove(this,e,n,t)});for(i in e)this.off(i,t,e[i]);return this}});var ue=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,fe=/<script|<style|<link/i,de=/checked\s*(?:[^=]|=\s*.checked.)/i,he=/^true\/(.*)/,pe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;function me(e,t){return T.nodeName(e,"table")&&T.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function ge(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function _e(e){var t=he.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function be(e,t){var n,r,i,a,o,s,c,l;if(1===t.nodeType){if(L.hasData(e)&&(a=L.access(e),o=L.set(t,a),l=a.events))for(i in delete o.handle,o.events={},l)for(n=0,r=l[i].length;n<r;n++)T.event.add(t,i,l[i][n]);F.hasData(e)&&(s=F.access(e),c=T.extend({},s),F.set(t,c))}}function ve(n,r,i,a){r=m.apply([],r);var e,t,o,s,c,l,u=0,f=n.length,d=f-1,h=r[0],p=T.isFunction(h);if(p||1<f&&"string"==typeof h&&!g.checkClone&&de.test(h))return n.each(function(e){var t=n.eq(e);p&&(r[0]=h.call(this,e,t.html())),ve(t,r,i,a)});if(f&&(t=(e=ne(r,n[0].ownerDocument,!1,n,a)).firstChild,1===e.childNodes.length&&(e=t),t||a)){for(s=(o=T.map(X(e,"script"),ge)).length;u<f;u++)c=e,u!==d&&(c=T.clone(c,!0,!0),s&&T.merge(o,X(c,"script"))),i.call(n[u],c,u);if(s)for(l=o[o.length-1].ownerDocument,T.map(o,_e),u=0;u<s;u++)c=o[u],K.test(c.type||"")&&!L.access(c,"globalEval")&&T.contains(l,c)&&(c.src?T._evalUrl&&T._evalUrl(c.src):T.globalEval(c.textContent.replace(pe,"")))}return n}function ye(e,t,n){for(var r,i=t?T.filter(t,e):e,a=0;null!=(r=i[a]);a++)n||1!==r.nodeType||T.cleanData(X(r)),r.parentNode&&(n&&T.contains(r.ownerDocument,r)&&Z(X(r,"script")),r.parentNode.removeChild(r));return e}T.extend({htmlPrefilter:function(e){return e.replace(ue,"<$1></$2>")},clone:function(e,t,n){var r,i,a,o,s,c,l,u=e.cloneNode(!0),f=T.contains(e.ownerDocument,e);if(!(g.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||T.isXMLDoc(e)))for(o=X(u),r=0,i=(a=X(e)).length;r<i;r++)s=a[r],c=o[r],void 0,"input"===(l=c.nodeName.toLowerCase())&&V.test(s.type)?c.checked=s.checked:"input"!==l&&"textarea"!==l||(c.defaultValue=s.defaultValue);if(t)if(n)for(a=a||X(e),o=o||X(u),r=0,i=a.length;r<i;r++)be(a[r],o[r]);else be(e,u);return 0<(o=X(u,"script")).length&&Z(o,!f&&X(e,"script")),u},cleanData:function(e){for(var t,n,r,i=T.event.special,a=0;void 0!==(n=e[a]);a++)if(R(n)){if(t=n[L.expando]){if(t.events)for(r in t.events)i[r]?T.event.remove(n,r):T.removeEvent(n,r,t.handle);n[L.expando]=void 0}n[F.expando]&&(n[F.expando]=void 0)}}}),T.fn.extend({domManip:ve,detach:function(e){return ye(this,e,!0)},remove:function(e){return ye(this,e)},text:function(e){return O(this,function(e){return void 0===e?T.text(this):this.empty().each(function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=e)})},null,e,arguments.length)},append:function(){return ve(this,arguments,function(e){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||me(this,e).appendChild(e)})},prepend:function(){return ve(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=me(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return ve(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return ve(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(T.cleanData(X(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null!=e&&e,t=null==t?e:t,this.map(function(){return T.clone(this,e,t)})},html:function(e){return O(this,function(e){var t=this[0]||{},n=0,r=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!fe.test(e)&&!Q[(Y.exec(e)||["",""])[1].toLowerCase()]){e=T.htmlPrefilter(e);try{for(;n<r;n++)1===(t=this[n]||{}).nodeType&&(T.cleanData(X(t,!1)),t.innerHTML=e);t=0}catch(e){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var n=[];return ve(this,arguments,function(e){var t=this.parentNode;T.inArray(this,n)<0&&(T.cleanData(X(this)),t&&t.replaceChild(e,this))},n)}}),T.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,o){T.fn[e]=function(e){for(var t,n=[],r=T(e),i=r.length-1,a=0;a<=i;a++)t=a===i?this:this.clone(!0),T(r[a])[o](t),s.apply(n,t.get());return this.pushStack(n)}});var we,Ce={HTML:"block",BODY:"block"};function Ae(e,t){var n=T(t.createElement(e)).appendTo(t.body),r=T.css(n[0],"display");return n.detach(),r}function Se(e){var t=S,n=Ce[e];return n||("none"!==(n=Ae(e,t))&&n||((t=(we=(we||T("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement))[0].contentDocument).write(),t.close(),n=Ae(e,t),we.detach()),Ce[e]=n),n}var Te=/^margin/,xe=new RegExp("^("+U+")(?!px)[a-z%]+$","i"),ke=function(e){var t=e.ownerDocument.defaultView;return t&&t.opener||(t=A),t.getComputedStyle(e)},Ee=function(e,t,n,r){var i,a,o={};for(a in t)o[a]=e.style[a],e.style[a]=t[a];for(a in i=n.apply(e,r||[]),t)e.style[a]=o[a];return i},De=S.documentElement;function Ie(e,t,n){var r,i,a,o,s=e.style;return""!==(o=(n=n||ke(e))?n.getPropertyValue(t)||n[t]:void 0)&&void 0!==o||T.contains(e.ownerDocument,e)||(o=T.style(e,t)),n&&!g.pixelMarginRight()&&xe.test(o)&&Te.test(t)&&(r=s.width,i=s.minWidth,a=s.maxWidth,s.minWidth=s.maxWidth=s.width=o,o=n.width,s.width=r,s.minWidth=i,s.maxWidth=a),void 0!==o?o+"":o}function Pe(e,t){return{get:function(){if(!e())return(this.get=t).apply(this,arguments);delete this.get}}}!function(){var t,n,r,i,a=S.createElement("div"),o=S.createElement("div");function e(){o.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",o.innerHTML="",De.appendChild(a);var e=A.getComputedStyle(o);t="1%"!==e.top,i="2px"===e.marginLeft,n="4px"===e.width,o.style.marginRight="50%",r="4px"===e.marginRight,De.removeChild(a)}o.style&&(o.style.backgroundClip="content-box",o.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===o.style.backgroundClip,a.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",a.appendChild(o),T.extend(g,{pixelPosition:function(){return e(),t},boxSizingReliable:function(){return null==n&&e(),n},pixelMarginRight:function(){return null==n&&e(),r},reliableMarginLeft:function(){return null==n&&e(),i},reliableMarginRight:function(){var e,t=o.appendChild(S.createElement("div"));return t.style.cssText=o.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",t.style.marginRight=t.style.width="0",o.style.width="1px",De.appendChild(a),e=!parseFloat(A.getComputedStyle(t).marginRight),De.removeChild(a),o.removeChild(t),e}}))}();var Me=/^(none|table(?!-c[ea]).+)/,$e={position:"absolute",visibility:"hidden",display:"block"},Oe={letterSpacing:"0",fontWeight:"400"},Re=["Webkit","O","Moz","ms"],Ne=S.createElement("div").style;function Le(e){if(e in Ne)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=Re.length;n--;)if((e=Re[n]+t)in Ne)return e}function Fe(e,t,n){var r=H.exec(t);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):t}function Ge(e,t,n,r,i){for(var a=n===(r?"border":"content")?4:"width"===t?1:0,o=0;a<4;a+=2)"margin"===n&&(o+=T.css(e,n+W[a],!0,i)),r?("content"===n&&(o-=T.css(e,"padding"+W[a],!0,i)),"margin"!==n&&(o-=T.css(e,"border"+W[a]+"Width",!0,i))):(o+=T.css(e,"padding"+W[a],!0,i),"padding"!==n&&(o+=T.css(e,"border"+W[a]+"Width",!0,i)));return o}function je(e,t,n){var r=!0,i="width"===t?e.offsetWidth:e.offsetHeight,a=ke(e),o="border-box"===T.css(e,"boxSizing",!1,a);if(i<=0||null==i){if(((i=Ie(e,t,a))<0||null==i)&&(i=e.style[t]),xe.test(i))return i;r=o&&(g.boxSizingReliable()||i===e.style[t]),i=parseFloat(i)||0}return i+Ge(e,t,n||(o?"border":"content"),r,a)+"px"}function Be(e,t){for(var n,r,i,a=[],o=0,s=e.length;o<s;o++)(r=e[o]).style&&(a[o]=L.get(r,"olddisplay"),n=r.style.display,t?(a[o]||"none"!==n||(r.style.display=""),""===r.style.display&&q(r)&&(a[o]=L.access(r,"olddisplay",Se(r.nodeName)))):(i=q(r),"none"===n&&i||L.set(r,"olddisplay",i?n:T.css(r,"display"))));for(o=0;o<s;o++)(r=e[o]).style&&(t&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=t?a[o]||"":"none"));return e}function Ue(e,t,n,r,i){return new Ue.prototype.init(e,t,n,r,i)}T.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=Ie(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{float:"cssFloat"},style:function(e,t,n,r){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var i,a,o,s=T.camelCase(t),c=e.style;if(t=T.cssProps[s]||(T.cssProps[s]=Le(s)||s),o=T.cssHooks[t]||T.cssHooks[s],void 0===n)return o&&"get"in o&&void 0!==(i=o.get(e,!1,r))?i:c[t];"string"===(a=typeof n)&&(i=H.exec(n))&&i[1]&&(n=z(e,t,i),a="number"),null!=n&&n==n&&("number"===a&&(n+=i&&i[3]||(T.cssNumber[s]?"":"px")),g.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),o&&"set"in o&&void 0===(n=o.set(e,n,r))||(c[t]=n))}},css:function(e,t,n,r){var i,a,o,s=T.camelCase(t);return t=T.cssProps[s]||(T.cssProps[s]=Le(s)||s),(o=T.cssHooks[t]||T.cssHooks[s])&&"get"in o&&(i=o.get(e,!0,n)),void 0===i&&(i=Ie(e,t,r)),"normal"===i&&t in Oe&&(i=Oe[t]),""===n||n?(a=parseFloat(i),!0===n||isFinite(a)?a||0:i):i}}),T.each(["height","width"],function(e,o){T.cssHooks[o]={get:function(e,t,n){if(t)return Me.test(T.css(e,"display"))&&0===e.offsetWidth?Ee(e,$e,function(){return je(e,o,n)}):je(e,o,n)},set:function(e,t,n){var r,i=n&&ke(e),a=n&&Ge(e,o,n,"border-box"===T.css(e,"boxSizing",!1,i),i);return a&&(r=H.exec(t))&&"px"!==(r[3]||"px")&&(e.style[o]=t,t=T.css(e,o)),Fe(0,t,a)}}}),T.cssHooks.marginLeft=Pe(g.reliableMarginLeft,function(e,t){if(t)return(parseFloat(Ie(e,"marginLeft"))||e.getBoundingClientRect().left-Ee(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px"}),T.cssHooks.marginRight=Pe(g.reliableMarginRight,function(e,t){if(t)return Ee(e,{display:"inline-block"},Ie,[e,"marginRight"])}),T.each({margin:"",padding:"",border:"Width"},function(i,a){T.cssHooks[i+a]={expand:function(e){for(var t=0,n={},r="string"==typeof e?e.split(" "):[e];t<4;t++)n[i+W[t]+a]=r[t]||r[t-2]||r[0];return n}},Te.test(i)||(T.cssHooks[i+a].set=Fe)}),T.fn.extend({css:function(e,t){return O(this,function(e,t,n){var r,i,a={},o=0;if(T.isArray(t)){for(r=ke(e),i=t.length;o<i;o++)a[t[o]]=T.css(e,t[o],!1,r);return a}return void 0!==n?T.style(e,t,n):T.css(e,t)},e,t,1<arguments.length)},show:function(){return Be(this,!0)},hide:function(){return Be(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){q(this)?T(this).show():T(this).hide()})}}),((T.Tween=Ue).prototype={constructor:Ue,init:function(e,t,n,r,i,a){this.elem=e,this.prop=n,this.easing=i||T.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=a||(T.cssNumber[n]?"":"px")},cur:function(){var e=Ue.propHooks[this.prop];return e&&e.get?e.get(this):Ue.propHooks._default.get(this)},run:function(e){var t,n=Ue.propHooks[this.prop];return this.options.duration?this.pos=t=T.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):Ue.propHooks._default.set(this),this}}).init.prototype=Ue.prototype,(Ue.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=T.css(e.elem,e.prop,""))&&"auto"!==t?t:0},set:function(e){T.fx.step[e.prop]?T.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[T.cssProps[e.prop]]&&!T.cssHooks[e.prop]?e.elem[e.prop]=e.now:T.style(e.elem,e.prop,e.now+e.unit)}}}).scrollTop=Ue.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},T.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},T.fx=Ue.prototype.init,T.fx.step={};var He,We,qe,ze,Ve,Ye=/^(?:toggle|show|hide)$/,Ke=/queueHooks$/;function Qe(){return A.setTimeout(function(){He=void 0}),He=T.now()}function Xe(e,t){var n,r=0,i={height:e};for(t=t?1:0;r<4;r+=2-t)i["margin"+(n=W[r])]=i["padding"+n]=e;return t&&(i.opacity=i.width=e),i}function Ze(e,t,n){for(var r,i=(Je.tweeners[t]||[]).concat(Je.tweeners["*"]),a=0,o=i.length;a<o;a++)if(r=i[a].call(n,t,e))return r}function Je(a,e,t){var n,o,r=0,i=Je.prefilters.length,s=T.Deferred().always(function(){delete c.elem}),c=function(){if(o)return!1;for(var e=He||Qe(),t=Math.max(0,l.startTime+l.duration-e),n=1-(t/l.duration||0),r=0,i=l.tweens.length;r<i;r++)l.tweens[r].run(n);return s.notifyWith(a,[l,n,t]),n<1&&i?t:(s.resolveWith(a,[l]),!1)},l=s.promise({elem:a,props:T.extend({},e),opts:T.extend(!0,{specialEasing:{},easing:T.easing._default},t),originalProperties:e,originalOptions:t,startTime:He||Qe(),duration:t.duration,tweens:[],createTween:function(e,t){var n=T.Tween(a,l.opts,e,t,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(n),n},stop:function(e){var t=0,n=e?l.tweens.length:0;if(o)return this;for(o=!0;t<n;t++)l.tweens[t].run(1);return e?(s.notifyWith(a,[l,1,0]),s.resolveWith(a,[l,e])):s.rejectWith(a,[l,e]),this}}),u=l.props;for(!function(e,t){var n,r,i,a,o;for(n in e)if(i=t[r=T.camelCase(n)],a=e[n],T.isArray(a)&&(i=a[1],a=e[n]=a[0]),n!==r&&(e[r]=a,delete e[n]),(o=T.cssHooks[r])&&"expand"in o)for(n in a=o.expand(a),delete e[r],a)n in e||(e[n]=a[n],t[n]=i);else t[r]=i}(u,l.opts.specialEasing);r<i;r++)if(n=Je.prefilters[r].call(l,a,u,l.opts))return T.isFunction(n.stop)&&(T._queueHooks(l.elem,l.opts.queue).stop=T.proxy(n.stop,n)),n;return T.map(u,Ze,l),T.isFunction(l.opts.start)&&l.opts.start.call(a,l),T.fx.timer(T.extend(c,{elem:a,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}T.Animation=T.extend(Je,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return z(n.elem,e,H.exec(t),n),n}]},tweener:function(e,t){for(var n,r=0,i=(e=T.isFunction(e)?(t=e,["*"]):e.match(M)).length;r<i;r++)n=e[r],Je.tweeners[n]=Je.tweeners[n]||[],Je.tweeners[n].unshift(t)},prefilters:[function(t,e,n){var r,i,a,o,s,c,l,u=this,f={},d=t.style,h=t.nodeType&&q(t),p=L.get(t,"fxshow");for(r in n.queue||(null==(s=T._queueHooks(t,"fx")).unqueued&&(s.unqueued=0,c=s.empty.fire,s.empty.fire=function(){s.unqueued||c()}),s.unqueued++,u.always(function(){u.always(function(){s.unqueued--,T.queue(t,"fx").length||s.empty.fire()})})),1===t.nodeType&&("height"in e||"width"in e)&&(n.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===("none"===(l=T.css(t,"display"))?L.get(t,"olddisplay")||Se(t.nodeName):l)&&"none"===T.css(t,"float")&&(d.display="inline-block")),n.overflow&&(d.overflow="hidden",u.always(function(){d.overflow=n.overflow[0],d.overflowX=n.overflow[1],d.overflowY=n.overflow[2]})),e)if(i=e[r],Ye.exec(i)){if(delete e[r],a=a||"toggle"===i,i===(h?"hide":"show")){if("show"!==i||!p||void 0===p[r])continue;h=!0}f[r]=p&&p[r]||T.style(t,r)}else l=void 0;if(T.isEmptyObject(f))"inline"===("none"===l?Se(t.nodeName):l)&&(d.display=l);else for(r in p?"hidden"in p&&(h=p.hidden):p=L.access(t,"fxshow",{}),a&&(p.hidden=!h),h?T(t).show():u.done(function(){T(t).hide()}),u.done(function(){var e;for(e in L.remove(t,"fxshow"),f)T.style(t,e,f[e])}),f)o=Ze(h?p[r]:0,r,u),r in p||(p[r]=o.start,h&&(o.end=o.start,o.start="width"===r||"height"===r?1:0))}],prefilter:function(e,t){t?Je.prefilters.unshift(e):Je.prefilters.push(e)}}),T.speed=function(e,t,n){var r=e&&"object"==typeof e?T.extend({},e):{complete:n||!n&&t||T.isFunction(e)&&e,duration:e,easing:n&&t||t&&!T.isFunction(t)&&t};return r.duration=T.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in T.fx.speeds?T.fx.speeds[r.duration]:T.fx.speeds._default,null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){T.isFunction(r.old)&&r.old.call(this),r.queue&&T.dequeue(this,r.queue)},r},T.fn.extend({fadeTo:function(e,t,n,r){return this.filter(q).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(t,e,n,r){var i=T.isEmptyObject(t),a=T.speed(e,n,r),o=function(){var e=Je(this,T.extend({},t),a);(i||L.get(this,"finish"))&&e.stop(!0)};return o.finish=o,i||!1===a.queue?this.each(o):this.queue(a.queue,o)},stop:function(i,e,a){var o=function(e){var t=e.stop;delete e.stop,t(a)};return"string"!=typeof i&&(a=e,e=i,i=void 0),e&&!1!==i&&this.queue(i||"fx",[]),this.each(function(){var e=!0,t=null!=i&&i+"queueHooks",n=T.timers,r=L.get(this);if(t)r[t]&&r[t].stop&&o(r[t]);else for(t in r)r[t]&&r[t].stop&&Ke.test(t)&&o(r[t]);for(t=n.length;t--;)n[t].elem!==this||null!=i&&n[t].queue!==i||(n[t].anim.stop(a),e=!1,n.splice(t,1));!e&&a||T.dequeue(this,i)})},finish:function(o){return!1!==o&&(o=o||"fx"),this.each(function(){var e,t=L.get(this),n=t[o+"queue"],r=t[o+"queueHooks"],i=T.timers,a=n?n.length:0;for(t.finish=!0,T.queue(this,o,[]),r&&r.stop&&r.stop.call(this,!0),e=i.length;e--;)i[e].elem===this&&i[e].queue===o&&(i[e].anim.stop(!0),i.splice(e,1));for(e=0;e<a;e++)n[e]&&n[e].finish&&n[e].finish.call(this);delete t.finish})}}),T.each(["toggle","show","hide"],function(e,r){var i=T.fn[r];T.fn[r]=function(e,t,n){return null==e||"boolean"==typeof e?i.apply(this,arguments):this.animate(Xe(r,!0),e,t,n)}}),T.each({slideDown:Xe("show"),slideUp:Xe("hide"),slideToggle:Xe("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,r){T.fn[e]=function(e,t,n){return this.animate(r,e,t,n)}}),T.timers=[],T.fx.tick=function(){var e,t=0,n=T.timers;for(He=T.now();t<n.length;t++)(e=n[t])()||n[t]!==e||n.splice(t--,1);n.length||T.fx.stop(),He=void 0},T.fx.timer=function(e){T.timers.push(e),e()?T.fx.start():T.timers.pop()},T.fx.interval=13,T.fx.start=function(){We||(We=A.setInterval(T.fx.tick,T.fx.interval))},T.fx.stop=function(){A.clearInterval(We),We=null},T.fx.speeds={slow:600,fast:200,_default:400},T.fn.delay=function(r,e){return r=T.fx&&T.fx.speeds[r]||r,e=e||"fx",this.queue(e,function(e,t){var n=A.setTimeout(e,r);t.stop=function(){A.clearTimeout(n)}})},qe=S.createElement("input"),ze=S.createElement("select"),Ve=ze.appendChild(S.createElement("option")),qe.type="checkbox",g.checkOn=""!==qe.value,g.optSelected=Ve.selected,ze.disabled=!0,g.optDisabled=!Ve.disabled,(qe=S.createElement("input")).value="t",qe.type="radio",g.radioValue="t"===qe.value;var et,tt=T.expr.attrHandle;T.fn.extend({attr:function(e,t){return O(this,T.attr,e,t,1<arguments.length)},removeAttr:function(e){return this.each(function(){T.removeAttr(this,e)})}}),T.extend({attr:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return void 0===e.getAttribute?T.prop(e,t,n):(1===a&&T.isXMLDoc(e)||(t=t.toLowerCase(),i=T.attrHooks[t]||(T.expr.match.bool.test(t)?et:void 0)),void 0!==n?null===n?void T.removeAttr(e,t):i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:(e.setAttribute(t,n+""),n):i&&"get"in i&&null!==(r=i.get(e,t))?r:null==(r=T.find.attr(e,t))?void 0:r)},attrHooks:{type:{set:function(e,t){if(!g.radioValue&&"radio"===t&&T.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,r,i=0,a=t&&t.match(M);if(a&&1===e.nodeType)for(;n=a[i++];)r=T.propFix[n]||n,T.expr.match.bool.test(n)&&(e[r]=!1),e.removeAttribute(n)}}),et={set:function(e,t,n){return!1===t?T.removeAttr(e,n):e.setAttribute(n,n),n}},T.each(T.expr.match.bool.source.match(/\w+/g),function(e,t){var a=tt[t]||T.find.attr;tt[t]=function(e,t,n){var r,i;return n||(i=tt[t],tt[t]=r,r=null!=a(e,t,n)?t.toLowerCase():null,tt[t]=i),r}});var nt=/^(?:input|select|textarea|button)$/i,rt=/^(?:a|area)$/i;T.fn.extend({prop:function(e,t){return O(this,T.prop,e,t,1<arguments.length)},removeProp:function(e){return this.each(function(){delete this[T.propFix[e]||e]})}}),T.extend({prop:function(e,t,n){var r,i,a=e.nodeType;if(3!==a&&8!==a&&2!==a)return 1===a&&T.isXMLDoc(e)||(t=T.propFix[t]||t,i=T.propHooks[t]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(e,n,t))?r:e[t]=n:i&&"get"in i&&null!==(r=i.get(e,t))?r:e[t]},propHooks:{tabIndex:{get:function(e){var t=T.find.attr(e,"tabindex");return t?parseInt(t,10):nt.test(e.nodeName)||rt.test(e.nodeName)&&e.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(T.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),T.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){T.propFix[this.toLowerCase()]=this});var it=/[\t\r\n\f]/g;function at(e){return e.getAttribute&&e.getAttribute("class")||""}T.fn.extend({addClass:function(t){var e,n,r,i,a,o,s,c=0;if(T.isFunction(t))return this.each(function(e){T(this).addClass(t.call(this,e,at(this)))});if("string"==typeof t&&t)for(e=t.match(M)||[];n=this[c++];)if(i=at(n),r=1===n.nodeType&&(" "+i+" ").replace(it," ")){for(o=0;a=e[o++];)r.indexOf(" "+a+" ")<0&&(r+=a+" ");i!==(s=T.trim(r))&&n.setAttribute("class",s)}return this},removeClass:function(t){var e,n,r,i,a,o,s,c=0;if(T.isFunction(t))return this.each(function(e){T(this).removeClass(t.call(this,e,at(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof t&&t)for(e=t.match(M)||[];n=this[c++];)if(i=at(n),r=1===n.nodeType&&(" "+i+" ").replace(it," ")){for(o=0;a=e[o++];)for(;-1<r.indexOf(" "+a+" ");)r=r.replace(" "+a+" "," ");i!==(s=T.trim(r))&&n.setAttribute("class",s)}return this},toggleClass:function(i,t){var a=typeof i;return"boolean"==typeof t&&"string"===a?t?this.addClass(i):this.removeClass(i):T.isFunction(i)?this.each(function(e){T(this).toggleClass(i.call(this,e,at(this),t),t)}):this.each(function(){var e,t,n,r;if("string"===a)for(t=0,n=T(this),r=i.match(M)||[];e=r[t++];)n.hasClass(e)?n.removeClass(e):n.addClass(e);else void 0!==i&&"boolean"!==a||((e=at(this))&&L.set(this,"__className__",e),this.setAttribute&&this.setAttribute("class",e||!1===i?"":L.get(this,"__className__")||""))})},hasClass:function(e){var t,n,r=0;for(t=" "+e+" ";n=this[r++];)if(1===n.nodeType&&-1<(" "+at(n)+" ").replace(it," ").indexOf(t))return!0;return!1}});var ot=/\r/g,st=/[\x20\t\r\n\f]+/g;T.fn.extend({val:function(n){var r,e,i,t=this[0];return arguments.length?(i=T.isFunction(n),this.each(function(e){var t;1===this.nodeType&&(null==(t=i?n.call(this,e,T(this).val()):n)?t="":"number"==typeof t?t+="":T.isArray(t)&&(t=T.map(t,function(e){return null==e?"":e+""})),(r=T.valHooks[this.type]||T.valHooks[this.nodeName.toLowerCase()])&&"set"in r&&void 0!==r.set(this,t,"value")||(this.value=t))})):t?(r=T.valHooks[t.type]||T.valHooks[t.nodeName.toLowerCase()])&&"get"in r&&void 0!==(e=r.get(t,"value"))?e:"string"==typeof(e=t.value)?e.replace(ot,""):null==e?"":e:void 0}}),T.extend({valHooks:{option:{get:function(e){var t=T.find.attr(e,"value");return null!=t?t:T.trim(T.text(e)).replace(st," ")}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,a="select-one"===e.type||i<0,o=a?null:[],s=a?i+1:r.length,c=i<0?s:a?i:0;c<s;c++)if(((n=r[c]).selected||c===i)&&(g.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!T.nodeName(n.parentNode,"optgroup"))){if(t=T(n).val(),a)return t;o.push(t)}return o},set:function(e,t){for(var n,r,i=e.options,a=T.makeArray(t),o=i.length;o--;)((r=i[o]).selected=-1<T.inArray(T.valHooks.option.get(r),a))&&(n=!0);return n||(e.selectedIndex=-1),a}}}}),T.each(["radio","checkbox"],function(){T.valHooks[this]={set:function(e,t){if(T.isArray(t))return e.checked=-1<T.inArray(T(e).val(),t)}},g.checkOn||(T.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var ct=/^(?:focusinfocus|focusoutblur)$/;T.extend(T.event,{trigger:function(e,t,n,r){var i,a,o,s,c,l,u,f=[n||S],d=p.call(e,"type")?e.type:e,h=p.call(e,"namespace")?e.namespace.split("."):[];if(a=o=n=n||S,3!==n.nodeType&&8!==n.nodeType&&!ct.test(d+T.event.triggered)&&(-1<d.indexOf(".")&&(d=(h=d.split(".")).shift(),h.sort()),c=d.indexOf(":")<0&&"on"+d,(e=e[T.expando]?e:new T.Event(d,"object"==typeof e&&e)).isTrigger=r?2:3,e.namespace=h.join("."),e.rnamespace=e.namespace?new RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,e.result=void 0,e.target||(e.target=n),t=null==t?[e]:T.makeArray(t,[e]),u=T.event.special[d]||{},r||!u.trigger||!1!==u.trigger.apply(n,t))){if(!r&&!u.noBubble&&!T.isWindow(n)){for(s=u.delegateType||d,ct.test(s+d)||(a=a.parentNode);a;a=a.parentNode)f.push(a),o=a;o===(n.ownerDocument||S)&&f.push(o.defaultView||o.parentWindow||A)}for(i=0;(a=f[i++])&&!e.isPropagationStopped();)e.type=1<i?s:u.bindType||d,(l=(L.get(a,"events")||{})[e.type]&&L.get(a,"handle"))&&l.apply(a,t),(l=c&&a[c])&&l.apply&&R(a)&&(e.result=l.apply(a,t),!1===e.result&&e.preventDefault());return e.type=d,r||e.isDefaultPrevented()||u._default&&!1!==u._default.apply(f.pop(),t)||!R(n)||c&&T.isFunction(n[d])&&!T.isWindow(n)&&((o=n[c])&&(n[c]=null),n[T.event.triggered=d](),T.event.triggered=void 0,o&&(n[c]=o)),e.result}},simulate:function(e,t,n){var r=T.extend(new T.Event,n,{type:e,isSimulated:!0});T.event.trigger(r,null,t)}}),T.fn.extend({trigger:function(e,t){return this.each(function(){T.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];if(n)return T.event.trigger(e,t,n,!0)}}),T.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,n){T.fn[n]=function(e,t){return 0<arguments.length?this.on(n,null,e,t):this.trigger(n)}}),T.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),g.focusin="onfocusin"in A,g.focusin||T.each({focus:"focusin",blur:"focusout"},function(n,r){var i=function(e){T.event.simulate(r,e.target,T.event.fix(e))};T.event.special[r]={setup:function(){var e=this.ownerDocument||this,t=L.access(e,r);t||e.addEventListener(n,i,!0),L.access(e,r,(t||0)+1)},teardown:function(){var e=this.ownerDocument||this,t=L.access(e,r)-1;t?L.access(e,r,t):(e.removeEventListener(n,i,!0),L.remove(e,r))}}});var lt=A.location,ut=T.now(),ft=/\?/;T.parseJSON=function(e){return JSON.parse(e+"")},T.parseXML=function(e){var t;if(!e||"string"!=typeof e)return null;try{t=(new A.DOMParser).parseFromString(e,"text/xml")}catch(e){t=void 0}return t&&!t.getElementsByTagName("parsererror").length||T.error("Invalid XML: "+e),t};var dt=/#.*$/,ht=/([?&])_=[^&]*/,pt=/^(.*?):[ \t]*([^\r\n]*)$/gm,mt=/^(?:GET|HEAD)$/,gt=/^\/\//,_t={},bt={},vt="*/".concat("*"),yt=S.createElement("a");function wt(a){return function(e,t){"string"!=typeof e&&(t=e,e="*");var n,r=0,i=e.toLowerCase().match(M)||[];if(T.isFunction(t))for(;n=i[r++];)"+"===n[0]?(n=n.slice(1)||"*",(a[n]=a[n]||[]).unshift(t)):(a[n]=a[n]||[]).push(t)}}function Ct(t,i,a,o){var s={},c=t===bt;function l(e){var r;return s[e]=!0,T.each(t[e]||[],function(e,t){var n=t(i,a,o);return"string"!=typeof n||c||s[n]?c?!(r=n):void 0:(i.dataTypes.unshift(n),l(n),!1)}),r}return l(i.dataTypes[0])||!s["*"]&&l("*")}function At(e,t){var n,r,i=T.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((i[n]?e:r||(r={}))[n]=t[n]);return r&&T.extend(!0,e,r),e}yt.href=lt.href,T.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:lt.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(lt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":vt,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":T.parseJSON,"text xml":T.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?At(At(e,T.ajaxSettings),t):At(T.ajaxSettings,e)},ajaxPrefilter:wt(_t),ajaxTransport:wt(bt),ajax:function(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var u,f,d,n,h,r,p,i,m=T.ajaxSetup({},t),g=m.context||m,_=m.context&&(g.nodeType||g.jquery)?T(g):T.event,b=T.Deferred(),v=T.Callbacks("once memory"),y=m.statusCode||{},a={},o={},w=0,s="canceled",C={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!n)for(n={};t=pt.exec(d);)n[t[1].toLowerCase()]=t[2];t=n[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?d:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=o[n]=o[n]||e,a[e]=t),this},overrideMimeType:function(e){return w||(m.mimeType=e),this},statusCode:function(e){var t;if(e)if(w<2)for(t in e)y[t]=[y[t],e[t]];else C.always(e[C.status]);return this},abort:function(e){var t=e||s;return u&&u.abort(t),c(0,t),this}};if(b.promise(C).complete=v.add,C.success=C.done,C.error=C.fail,m.url=((e||m.url||lt.href)+"").replace(dt,"").replace(gt,lt.protocol+"//"),m.type=t.method||t.type||m.method||m.type,m.dataTypes=T.trim(m.dataType||"*").toLowerCase().match(M)||[""],null==m.crossDomain){r=S.createElement("a");try{r.href=m.url,r.href=r.href,m.crossDomain=yt.protocol+"//"+yt.host!=r.protocol+"//"+r.host}catch(e){m.crossDomain=!0}}if(m.data&&m.processData&&"string"!=typeof m.data&&(m.data=T.param(m.data,m.traditional)),Ct(_t,m,t,C),2===w)return C;for(i in(p=T.event&&m.global)&&0==T.active++&&T.event.trigger("ajaxStart"),m.type=m.type.toUpperCase(),m.hasContent=!mt.test(m.type),f=m.url,m.hasContent||(m.data&&(f=m.url+=(ft.test(f)?"&":"?")+m.data,delete m.data),!1===m.cache&&(m.url=ht.test(f)?f.replace(ht,"$1_="+ut++):f+(ft.test(f)?"&":"?")+"_="+ut++)),m.ifModified&&(T.lastModified[f]&&C.setRequestHeader("If-Modified-Since",T.lastModified[f]),T.etag[f]&&C.setRequestHeader("If-None-Match",T.etag[f])),(m.data&&m.hasContent&&!1!==m.contentType||t.contentType)&&C.setRequestHeader("Content-Type",m.contentType),C.setRequestHeader("Accept",m.dataTypes[0]&&m.accepts[m.dataTypes[0]]?m.accepts[m.dataTypes[0]]+("*"!==m.dataTypes[0]?", "+vt+"; q=0.01":""):m.accepts["*"]),m.headers)C.setRequestHeader(i,m.headers[i]);if(m.beforeSend&&(!1===m.beforeSend.call(g,C,m)||2===w))return C.abort();for(i in s="abort",{success:1,error:1,complete:1})C[i](m[i]);if(u=Ct(bt,m,t,C)){if(C.readyState=1,p&&_.trigger("ajaxSend",[C,m]),2===w)return C;m.async&&0<m.timeout&&(h=A.setTimeout(function(){C.abort("timeout")},m.timeout));try{w=1,u.send(a,c)}catch(e){if(!(w<2))throw e;c(-1,e)}}else c(-1,"No Transport");function c(e,t,n,r){var i,a,o,s,c,l=t;2!==w&&(w=2,h&&A.clearTimeout(h),u=void 0,d=r||"",C.readyState=0<e?4:0,i=200<=e&&e<300||304===e,n&&(s=function(e,t,n){for(var r,i,a,o,s=e.contents,c=e.dataTypes;"*"===c[0];)c.shift(),void 0===r&&(r=e.mimeType||t.getResponseHeader("Content-Type"));if(r)for(i in s)if(s[i]&&s[i].test(r)){c.unshift(i);break}if(c[0]in n)a=c[0];else{for(i in n){if(!c[0]||e.converters[i+" "+c[0]]){a=i;break}o||(o=i)}a=a||o}if(a)return a!==c[0]&&c.unshift(a),n[a]}(m,C,n)),s=function(e,t,n,r){var i,a,o,s,c,l={},u=e.dataTypes.slice();if(u[1])for(o in e.converters)l[o.toLowerCase()]=e.converters[o];for(a=u.shift();a;)if(e.responseFields[a]&&(n[e.responseFields[a]]=t),!c&&r&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),c=a,a=u.shift())if("*"===a)a=c;else if("*"!==c&&c!==a){if(!(o=l[c+" "+a]||l["* "+a]))for(i in l)if((s=i.split(" "))[1]===a&&(o=l[c+" "+s[0]]||l["* "+s[0]])){!0===o?o=l[i]:!0!==l[i]&&(a=s[0],u.unshift(s[1]));break}if(!0!==o)if(o&&e.throws)t=o(t);else try{t=o(t)}catch(e){return{state:"parsererror",error:o?e:"No conversion from "+c+" to "+a}}}return{state:"success",data:t}}(m,s,C,i),i?(m.ifModified&&((c=C.getResponseHeader("Last-Modified"))&&(T.lastModified[f]=c),(c=C.getResponseHeader("etag"))&&(T.etag[f]=c)),204===e||"HEAD"===m.type?l="nocontent":304===e?l="notmodified":(l=s.state,a=s.data,i=!(o=s.error))):(o=l,!e&&l||(l="error",e<0&&(e=0))),C.status=e,C.statusText=(t||l)+"",i?b.resolveWith(g,[a,l,C]):b.rejectWith(g,[C,l,o]),C.statusCode(y),y=void 0,p&&_.trigger(i?"ajaxSuccess":"ajaxError",[C,m,i?a:o]),v.fireWith(g,[C,l]),p&&(_.trigger("ajaxComplete",[C,m]),--T.active||T.event.trigger("ajaxStop")))}return C},getJSON:function(e,t,n){return T.get(e,t,n,"json")},getScript:function(e,t){return T.get(e,void 0,t,"script")}}),T.each(["get","post"],function(e,i){T[i]=function(e,t,n,r){return T.isFunction(t)&&(r=r||n,n=t,t=void 0),T.ajax(T.extend({url:e,type:i,dataType:r,data:t,success:n},T.isPlainObject(e)&&e))}}),T._evalUrl=function(e){return T.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,throws:!0})},T.fn.extend({wrapAll:function(t){var e;return T.isFunction(t)?this.each(function(e){T(this).wrapAll(t.call(this,e))}):(this[0]&&(e=T(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(n){return T.isFunction(n)?this.each(function(e){T(this).wrapInner(n.call(this,e))}):this.each(function(){var e=T(this),t=e.contents();t.length?t.wrapAll(n):e.append(n)})},wrap:function(t){var n=T.isFunction(t);return this.each(function(e){T(this).wrapAll(n?t.call(this,e):t)})},unwrap:function(){return this.parent().each(function(){T.nodeName(this,"body")||T(this).replaceWith(this.childNodes)}).end()}}),T.expr.filters.hidden=function(e){return!T.expr.filters.visible(e)},T.expr.filters.visible=function(e){return 0<e.offsetWidth||0<e.offsetHeight||0<e.getClientRects().length};var St=/%20/g,Tt=/\[\]$/,xt=/\r?\n/g,kt=/^(?:submit|button|image|reset|file)$/i,Et=/^(?:input|select|textarea|keygen)/i;function Dt(n,e,r,i){var t;if(T.isArray(e))T.each(e,function(e,t){r||Tt.test(n)?i(n,t):Dt(n+"["+("object"==typeof t&&null!=t?e:"")+"]",t,r,i)});else if(r||"object"!==T.type(e))i(n,e);else for(t in e)Dt(n+"["+t+"]",e[t],r,i)}T.param=function(e,t){var n,r=[],i=function(e,t){t=T.isFunction(t)?t():null==t?"":t,r[r.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=T.ajaxSettings&&T.ajaxSettings.traditional),T.isArray(e)||e.jquery&&!T.isPlainObject(e))T.each(e,function(){i(this.name,this.value)});else for(n in e)Dt(n,e[n],t,i);return r.join("&").replace(St,"+")},T.fn.extend({serialize:function(){return T.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=T.prop(this,"elements");return e?T.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!T(this).is(":disabled")&&Et.test(this.nodeName)&&!kt.test(e)&&(this.checked||!V.test(e))}).map(function(e,t){var n=T(this).val();return null==n?null:T.isArray(n)?T.map(n,function(e){return{name:t.name,value:e.replace(xt,"\r\n")}}):{name:t.name,value:n.replace(xt,"\r\n")}}).get()}}),T.ajaxSettings.xhr=function(){try{return new A.XMLHttpRequest}catch(e){}};var It={0:200,1223:204},Pt=T.ajaxSettings.xhr();g.cors=!!Pt&&"withCredentials"in Pt,g.ajax=Pt=!!Pt,T.ajaxTransport(function(i){var a,o;if(g.cors||Pt&&!i.crossDomain)return{send:function(e,t){var n,r=i.xhr();if(r.open(i.type,i.url,i.async,i.username,i.password),i.xhrFields)for(n in i.xhrFields)r[n]=i.xhrFields[n];for(n in i.mimeType&&r.overrideMimeType&&r.overrideMimeType(i.mimeType),i.crossDomain||e["X-Requested-With"]||(e["X-Requested-With"]="XMLHttpRequest"),e)r.setRequestHeader(n,e[n]);a=function(e){return function(){a&&(a=o=r.onload=r.onerror=r.onabort=r.onreadystatechange=null,"abort"===e?r.abort():"error"===e?"number"!=typeof r.status?t(0,"error"):t(r.status,r.statusText):t(It[r.status]||r.status,r.statusText,"text"!==(r.responseType||"text")||"string"!=typeof r.responseText?{binary:r.response}:{text:r.responseText},r.getAllResponseHeaders()))}},r.onload=a(),o=r.onerror=a("error"),void 0!==r.onabort?r.onabort=o:r.onreadystatechange=function(){4===r.readyState&&A.setTimeout(function(){a&&o()})},a=a("abort");try{r.send(i.hasContent&&i.data||null)}catch(e){if(a)throw e}},abort:function(){a&&a()}}}),T.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return T.globalEval(e),e}}}),T.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),T.ajaxTransport("script",function(n){var r,i;if(n.crossDomain)return{send:function(e,t){r=T("<script>").prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),S.head.appendChild(r[0])},abort:function(){i&&i()}}});var Mt=[],$t=/(=)\?(?=&|$)|\?\?/;T.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Mt.pop()||T.expando+"_"+ut++;return this[e]=!0,e}}),T.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,a,o=!1!==e.jsonp&&($t.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&$t.test(e.data)&&"data");if(o||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=T.isFunction(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,o?e[o]=e[o].replace($t,"$1"+r):!1!==e.jsonp&&(e.url+=(ft.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return a||T.error(r+" was not called"),a[0]},e.dataTypes[0]="json",i=A[r],A[r]=function(){a=arguments},n.always(function(){void 0===i?T(A).removeProp(r):A[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Mt.push(r)),a&&T.isFunction(i)&&i(a[0]),a=i=void 0}),"script"}),T.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||S;var r=y.exec(e),i=!n&&[];return r?[t.createElement(r[1])]:(r=ne([e],t,i),i&&i.length&&T(i).remove(),T.merge([],r.childNodes))};var Ot=T.fn.load;function Rt(e){return T.isWindow(e)?e:9===e.nodeType&&e.defaultView}T.fn.load=function(e,t,n){if("string"!=typeof e&&Ot)return Ot.apply(this,arguments);var r,i,a,o=this,s=e.indexOf(" ");return-1<s&&(r=T.trim(e.slice(s)),e=e.slice(0,s)),T.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(i="POST"),0<o.length&&T.ajax({url:e,type:i||"GET",dataType:"html",data:t}).done(function(e){a=arguments,o.html(r?T("<div>").append(T.parseHTML(e)).find(r):e)}).always(n&&function(e,t){o.each(function(){n.apply(this,a||[e.responseText,t,e])})}),this},T.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){T.fn[t]=function(e){return this.on(t,e)}}),T.expr.filters.animated=function(t){return T.grep(T.timers,function(e){return t===e.elem}).length},T.offset={setOffset:function(e,t,n){var r,i,a,o,s,c,l=T.css(e,"position"),u=T(e),f={};"static"===l&&(e.style.position="relative"),s=u.offset(),a=T.css(e,"top"),c=T.css(e,"left"),i=("absolute"===l||"fixed"===l)&&-1<(a+c).indexOf("auto")?(o=(r=u.position()).top,r.left):(o=parseFloat(a)||0,parseFloat(c)||0),T.isFunction(t)&&(t=t.call(e,n,T.extend({},s))),null!=t.top&&(f.top=t.top-s.top+o),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):u.css(f)}},T.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){T.offset.setOffset(this,t,e)});var e,n,r=this[0],i={top:0,left:0},a=r&&r.ownerDocument;return a?(e=a.documentElement,T.contains(e,r)?(i=r.getBoundingClientRect(),n=Rt(a),{top:i.top+n.pageYOffset-e.clientTop,left:i.left+n.pageXOffset-e.clientLeft}):i):void 0},position:function(){if(this[0]){var e,t,n=this[0],r={top:0,left:0};return"fixed"===T.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),T.nodeName(e[0],"html")||(r=e.offset()),r.top+=T.css(e[0],"borderTopWidth",!0),r.left+=T.css(e[0],"borderLeftWidth",!0)),{top:t.top-r.top-T.css(n,"marginTop",!0),left:t.left-r.left-T.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===T.css(e,"position");)e=e.offsetParent;return e||De})}}),T.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var a="pageYOffset"===i;T.fn[t]=function(e){return O(this,function(e,t,n){var r=Rt(e);if(void 0===n)return r?r[i]:e[t];r?r.scrollTo(a?r.pageXOffset:n,a?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),T.each(["top","left"],function(e,n){T.cssHooks[n]=Pe(g.pixelPosition,function(e,t){if(t)return t=Ie(e,n),xe.test(t)?T(e).position()[n]+"px":t})}),T.each({Height:"height",Width:"width"},function(a,o){T.each({padding:"inner"+a,content:o,"":"outer"+a},function(r,e){T.fn[e]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return O(this,function(e,t,n){var r;return T.isWindow(e)?e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?T.css(e,t,i):T.style(e,t,n,i)},o,n?e:void 0,n,null)}})}),T.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},size:function(){return this.length}}),T.fn.andSelf=T.fn.addBack,"function"==typeof define&&define.amd&&define("jquery",[],function(){return T});var Nt=A.jQuery,Lt=A.$;return T.noConflict=function(e){return A.$===T&&(A.$=Lt),e&&A.jQuery===T&&(A.jQuery=Nt),T},e||(A.jQuery=A.$=T),T}),function(j){"use strict";function w(a,o){return o=o||Error,function(){var e,t,n=arguments,r=n[0],i="["+(a?a+":":"")+r+"] ";for(i+=n[1].replace(/\{\d+\}/g,function(e){var t=+e.slice(1,-1)+2;return t<n.length?Be(n[t]):e}),i+="\nhttp://errors.angularjs.org/1.5.10/"+(a?a+"/":"")+r,t=2,e="?";t<n.length;t++,e="&")i+=e+"p"+(t-2)+"="+encodeURIComponent(Be(n[t]));return new o(i)}}var a=/^\/(.+)\/([a-z]*)$/,f="validity",B=Object.prototype.hasOwnProperty,S=function(e){return ve(e)?e.toLowerCase():e},u=function(e){return ve(e)?e.toUpperCase():e};"i"!=="I".toLowerCase()&&(S=function(e){return ve(e)?e.replace(/[A-Z]/g,function(e){return String.fromCharCode(32|e.charCodeAt(0))}):e},u=function(e){return ve(e)?e.replace(/[a-z]/g,function(e){return String.fromCharCode(-33&e.charCodeAt(0))}):e});var U,ue,o,g,s=[].slice,r=[].splice,e=[].push,H=Object.prototype.toString,c=Object.getPrototypeOf,l=w("ng"),v=j.angular||(j.angular={}),t=0;function O(e){if(null==e||D(e))return!1;if(ye(e)||ve(e)||ue&&e instanceof ue)return!0;var t="length"in Object(e)&&e.length;return C(t)&&(0<=t&&(t-1 in e||e instanceof Array)||"function"==typeof e.item)}function fe(e,t,n){var r,i;if(e)if(we(e))for(r in e)"prototype"===r||"length"===r||"name"===r||e.hasOwnProperty&&!e.hasOwnProperty(r)||t.call(n,e[r],r,e);else if(ye(e)||O(e)){var a="object"!=typeof e;for(r=0,i=e.length;r<i;r++)(a||r in e)&&t.call(n,e[r],r,e)}else if(e.forEach&&e.forEach!==fe)e.forEach(t,n,e);else if(y(e))for(r in e)t.call(n,e[r],r,e);else if("function"==typeof e.hasOwnProperty)for(r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r,e);else for(r in e)B.call(e,r)&&t.call(n,e[r],r,e);return e}function d(e,t,n){for(var r=Object.keys(e).sort(),i=0;i<r.length;i++)t.call(n,e[r[i]],r[i]);return r}function _(n){return function(e,t){n(t,e)}}function k(){return++t}function h(e,t){t?e.$$hashKey=t:delete e.$$hashKey}function p(e,t,n){for(var r=e.$$hashKey,i=0,a=t.length;i<a;++i){var o=t[i];if(be(o)||we(o))for(var s=Object.keys(o),c=0,l=s.length;c<l;c++){var u=s[c],f=o[u];n&&be(f)?A(f)?e[u]=new Date(f.valueOf()):T(f)?e[u]=new RegExp(f):f.nodeName?e[u]=f.cloneNode(!0):$(f)?e[u]=f.clone():(be(e[u])||(e[u]=ye(f)?[]:{}),p(e[u],[f],!0)):e[u]=f}}return h(e,r),e}function de(e){return p(e,s.call(arguments,1),!1)}function n(e){return p(e,s.call(arguments,1),!0)}function m(e){return parseInt(e,10)}U=j.document.documentMode;var E=Number.isNaN||function(e){return e!=e};function he(e,t){return de(Object.create(e),t)}function pe(){}function me(e){return e}function x(e){return function(){return e}}function b(e){return we(e.toString)&&e.toString!==H}function ge(e){return void 0===e}function _e(e){return void 0!==e}function be(e){return null!==e&&"object"==typeof e}function y(e){return null!==e&&"object"==typeof e&&!c(e)}function ve(e){return"string"==typeof e}function C(e){return"number"==typeof e}function A(e){return"[object Date]"===H.call(e)}pe.$inject=[],me.$inject=[];var ye=Array.isArray;function we(e){return"function"==typeof e}function T(e){return"[object RegExp]"===H.call(e)}function D(e){return e&&e.window===e}function Ce(e){return e&&e.$evalAsync&&e.$watch}function Ae(e){return"boolean"==typeof e}function I(e){return e&&we(e.then)}var P=/^\[object (?:Uint8|Uint8Clamped|Uint16|Uint32|Int8|Int16|Int32|Float32|Float64)Array]$/;var Se=function(e){return ve(e)?e.trim():e},M=function(e){return e.replace(/([-()[\]{}+?*.$^|,:#<!\\])/g,"\\$1").replace(/\x08/g,"\\x08")};function $(e){return!(!e||!(e.nodeName||e.prop&&e.attr&&e.find))}function Te(e){return S(e.nodeName||e[0]&&e[0].nodeName)}function xe(e,t){var n=e.indexOf(t);return 0<=n&&e.splice(n,1),n}function R(e,n){var t,r,i=[],a=[];if(n){if((r=n)&&C(r.length)&&P.test(H.call(r))||(t=n,"[object ArrayBuffer]"===H.call(t)))throw l("cpta","Can't copy! TypedArray destination cannot be mutated.");if(e===n)throw l("cpi","Can't copy! Source and destination are identical.");return ye(n)?n.length=0:fe(n,function(e,t){"$$hashKey"!==t&&delete n[t]}),i.push(e),a.push(n),o(e,n)}return s(e);function o(e,t){var n,r=t.$$hashKey;if(ye(e))for(var i=0,a=e.length;i<a;i++)t.push(s(e[i]));else if(y(e))for(n in e)t[n]=s(e[n]);else if(e&&"function"==typeof e.hasOwnProperty)for(n in e)e.hasOwnProperty(n)&&(t[n]=s(e[n]));else for(n in e)B.call(e,n)&&(t[n]=s(e[n]));return h(t,r),t}function s(e){if(!be(e))return e;var t=i.indexOf(e);if(-1!==t)return a[t];if(D(e)||Ce(e))throw l("cpws","Can't copy! Making copies of Window or Scope instances is not supported.");var n=!1,r=function(e){switch(H.call(e)){case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Float32Array]":case"[object Float64Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return new e.constructor(s(e.buffer),e.byteOffset,e.length);case"[object ArrayBuffer]":if(e.slice)return e.slice(0);var t=new ArrayBuffer(e.byteLength);return new Uint8Array(t).set(new Uint8Array(e)),t;case"[object Boolean]":case"[object Number]":case"[object String]":case"[object Date]":return new e.constructor(e.valueOf());case"[object RegExp]":var n=new RegExp(e.source,e.toString().match(/[^/]*$/)[0]);return n.lastIndex=e.lastIndex,n;case"[object Blob]":return new e.constructor([e],{type:e.type})}if(we(e.cloneNode))return e.cloneNode(!0)}(e);return void 0===r&&(r=ye(e)?[]:Object.create(c(e)),n=!0),i.push(e),a.push(r),n?o(e,r):r}}function ke(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!=e&&t!=t)return!0;var n,r,i,a=typeof e;if(a===typeof t&&"object"===a){if(!ye(e)){if(A(e))return!!A(t)&&ke(e.getTime(),t.getTime());if(T(e))return!!T(t)&&e.toString()===t.toString();if(Ce(e)||Ce(t)||D(e)||D(t)||ye(t)||A(t)||T(t))return!1;for(r in i=Oe(),e)if("$"!==r.charAt(0)&&!we(e[r])){if(!ke(e[r],t[r]))return!1;i[r]=!0}for(r in t)if(!(r in i)&&"$"!==r.charAt(0)&&_e(t[r])&&!we(t[r]))return!1;return!0}if(!ye(t))return!1;if((n=e.length)===t.length){for(r=0;r<n;r++)if(!ke(e[r],t[r]))return!1;return!0}}return!1}var N=function(){if(!_e(N.rules)){var e=j.document.querySelector("[ng-csp]")||j.document.querySelector("[data-ng-csp]");if(e){var t=e.getAttribute("ng-csp")||e.getAttribute("data-ng-csp");N.rules={noUnsafeEval:!t||-1!==t.indexOf("no-unsafe-eval"),noInlineStyle:!t||-1!==t.indexOf("no-inline-style")}}else N.rules={noUnsafeEval:function(){try{return new Function(""),!1}catch(e){return!0}}(),noInlineStyle:!1}}return N.rules},L=function(){if(_e(L.name_))return L.name_;var e,t,n,r,i=J.length;for(t=0;t<i;++t)if(n=J[t],e=j.document.querySelector("["+n.replace(":","\\:")+"jq]")){r=e.getAttribute(n+"jq");break}return L.name_=r};function F(e,t,n){return e.concat(s.call(t,n))}function Ee(e,t){return s.call(e,t||0)}function De(e,t){var n=2<arguments.length?Ee(arguments,2):[];return!we(t)||t instanceof RegExp?t:n.length?function(){return arguments.length?t.apply(e,F(n,arguments,0)):t.apply(e,n)}:function(){return arguments.length?t.apply(e,arguments):t.call(e)}}function i(e,t){var n=t;return"string"==typeof e&&"$"===e.charAt(0)&&"$"===e.charAt(1)?n=void 0:D(t)?n="$WINDOW":t&&j.document===t?n="$DOCUMENT":Ce(t)&&(n="$SCOPE"),n}function G(e,t){if(!ge(e))return C(t)||(t=t?2:null),JSON.stringify(e,i,t)}function W(e){return ve(e)?JSON.parse(e):e}var q=/:/g;function z(e,t){e=e.replace(q,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return E(n)?t:n}function V(e,t,n){n=n?-1:1;var r,i,a=e.getTimezoneOffset(),o=z(t,a);return r=e,i=n*(o-a),(r=new Date(r.getTime())).setMinutes(r.getMinutes()+i),r}function Ie(e){e=ue(e).clone();try{e.empty()}catch(e){}var t=ue("<div>").append(e).html();try{return e[0].nodeType===Ne?S(t):t.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(e,t){return"<"+S(t)})}catch(e){return S(t)}}function Y(e){try{return decodeURIComponent(e)}catch(e){}}function K(e){var i={};return fe((e||"").split("&"),function(e){var t,n,r;e&&(n=e=e.replace(/\+/g,"%20"),-1!==(t=e.indexOf("="))&&(n=e.substring(0,t),r=e.substring(t+1)),_e(n=Y(n))&&(r=!_e(r)||Y(r),B.call(i,n)?ye(i[n])?i[n].push(r):i[n]=[i[n],r]:i[n]=r))}),i}function Q(e){var n=[];return fe(e,function(e,t){ye(e)?fe(e,function(e){n.push(Z(t,!0)+(!0===e?"":"="+Z(e,!0)))}):n.push(Z(t,!0)+(!0===e?"":"="+Z(e,!0)))}),n.length?n.join("&"):""}function X(e){return Z(e,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function Z(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,t?"%20":"+")}var J=["ng-","data-ng-","ng:","x-ng-"];var ee=function(e){if(!e.currentScript)return!0;var t=e.currentScript.getAttribute("src"),n=e.createElement("a");if(n.href=t,e.location.origin===n.origin)return!0;switch(n.protocol){case"http:":case"https:":case"ftp:":case"blob:":case"file:":case"data:":return!0;default:return!1}}(j.document);function te(r,e){var i,a,t={};if(fe(J,function(e){var t=e+"app";!i&&r.hasAttribute&&r.hasAttribute(t)&&(a=(i=r).getAttribute(t))}),fe(J,function(e){var t,n=e+"app";!i&&(t=r.querySelector("["+n.replace(":","\\:")+"]"))&&(a=(i=t).getAttribute(n))}),i){if(!ee)return void j.console.error("Angular: disabling automatic bootstrap. <script> protocol indicates an extension, document.location.href does not match.");t.strictDi=null!==function(e,t){var n,r,i=J.length;for(r=0;r<i;++r)if(n=J[r]+t,ve(n=e.getAttribute(n)))return n;return null}(i,"strict-di"),e(i,a?[a]:[],t)}}function ne(n,r,i){be(i)||(i={});i=de({strictDi:!1},i);var t=function(){if((n=ue(n)).injector()){var e=n[0]===j.document?"document":Ie(n);throw l("btstrpd","App already bootstrapped with this element '{0}'",e.replace(/</,"&lt;").replace(/>/,"&gt;"))}(r=r||[]).unshift(["$provide",function(e){e.value("$rootElement",n)}]),i.debugInfoEnabled&&r.push(["$compileProvider",function(e){e.debugInfoEnabled(!0)}]),r.unshift("ng");var t=Ut(r,i.strictDi);return t.invoke(["$rootScope","$rootElement","$compile","$injector",function(e,t,n,r){e.$apply(function(){t.data("$injector",r),n(t)(e)})}]),t},e=/^NG_ENABLE_DEBUG_INFO!/,a=/^NG_DEFER_BOOTSTRAP!/;if(j&&e.test(j.name)&&(i.debugInfoEnabled=!0,j.name=j.name.replace(e,"")),j&&!a.test(j.name))return t();j.name=j.name.replace(a,""),v.resumeBootstrap=function(e){return fe(e,function(e){r.push(e)}),t()},we(v.resumeDeferredBootstrap)&&v.resumeDeferredBootstrap()}function re(){j.name="NG_ENABLE_DEBUG_INFO!"+j.name,j.location.reload()}function ie(e){var t=v.element(e).injector();if(!t)throw l("test","no injector found for element argument to getTestability");return t.get("$$testability")}var ae=/[A-Z]/g;function Pe(e,n){return n=n||"_",e.replace(ae,function(e,t){return(t?n:"")+e.toLowerCase()})}var oe=!1;function Me(e,t,n){if(!e)throw l("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function se(e,t,n){return n&&ye(e)&&(e=e[e.length-1]),Me(we(e),t,"not a function, got "+(e&&"object"==typeof e?e.constructor.name||"Object":typeof e)),e}function ce(e,t){if("hasOwnProperty"===e)throw l("badname","hasOwnProperty is not a valid {0} name",t)}function le(e,t,n){if(!t)return e;for(var r,i=t.split("."),a=e,o=i.length,s=0;s<o;s++)r=i[s],e&&(e=(a=e)[r]);return!n&&we(e)?De(a,e):e}function $e(e){for(var t,n=e[0],r=e[e.length-1],i=1;n!==r&&(n=n.nextSibling);i++)(t||e[i]!==n)&&(t||(t=ue(s.call(e,0,i))),t.push(n));return t||e}function Oe(){return Object.create(null)}var Re=1,Ne=3,Le=8,Fe=9,Ge=11;function je(e,t){if(ye(e)){t=t||[];for(var n=0,r=e.length;n<r;n++)t[n]=e[n]}else if(be(e))for(var i in t=t||{},e)"$"===i.charAt(0)&&"$"===i.charAt(1)||(t[i]=e[i]);return t||e}function Be(e){return"function"==typeof e?e.toString().replace(/ \{[\s\S]*$/,""):ge(e)?"undefined":"string"!=typeof e?(t=e,n=[],JSON.stringify(t,function(e,t){if(be(t=i(e,t))){if(0<=n.indexOf(t))return"...";n.push(t)}return t})):e;var t,n}var Ue={full:"1.5.10",major:1,minor:5,dot:10,codeName:"asynchronous-synchronization"};ct.expando="ng339";var He=ct.cache={},We=1,qe=function(e,t,n){e.addEventListener(t,n,!1)},ze=function(e,t,n){e.removeEventListener(t,n,!1)};ct._data=function(e){return this.cache[e[this.expando]]||{}};var Ve=/([:\-_]+(.))/g,Ye=/^moz([A-Z])/,Ke={mouseleave:"mouseout",mouseenter:"mouseover"},Qe=w("jqLite");function Xe(e){return e.replace(Ve,function(e,t,n,r){return r?n.toUpperCase():n}).replace(Ye,"Moz$1")}var Ze=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,Je=/<|&#?\w+;/,et=/<([\w:-]+)/,tt=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,nt={option:[1,'<select multiple="multiple">',"</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function rt(e){return!Je.test(e)}function it(e){var t=e.nodeType;return t===Re||!t||t===Fe}function at(e,t){var n,r,i,a,o=t.createDocumentFragment(),s=[];if(rt(e))s.push(t.createTextNode(e));else{for(n=o.appendChild(t.createElement("div")),r=(et.exec(e)||["",""])[1].toLowerCase(),i=nt[r]||nt._default,n.innerHTML=i[1]+e.replace(tt,"<$1></$2>")+i[2],a=i[0];a--;)n=n.lastChild;s=F(s,n.childNodes),(n=o.firstChild).textContent=""}return o.textContent="",o.innerHTML="",fe(s,function(e){o.appendChild(e)}),o}function ot(e,t){var n=e.parentNode;n&&n.replaceChild(t,e),t.appendChild(e)}nt.optgroup=nt.option,nt.tbody=nt.tfoot=nt.colgroup=nt.caption=nt.thead,nt.th=nt.td;var st=j.Node.prototype.contains||function(e){return!!(16&this.compareDocumentPosition(e))};function ct(e){if(e instanceof ct)return e;var t,n,r,i;if(ve(e)&&(e=Se(e),t=!0),!(this instanceof ct)){if(t&&"<"!==e.charAt(0))throw Qe("nosel","Looking up elements via selectors is not supported by jqLite! See: http://docs.angularjs.org/api/angular.element");return new ct(e)}bt(this,t?(n=e,r=r||j.document,(i=Ze.exec(n))?[r.createElement(i[1])]:(i=at(n,r))?i.childNodes:[]):e)}function lt(e){return e.cloneNode(!0)}function ut(e,t){if(t||dt(e),e.querySelectorAll)for(var n=e.querySelectorAll("*"),r=0,i=n.length;r<i;r++)dt(n[r])}function ft(n,e,r,t){if(_e(t))throw Qe("offargs","jqLite#off() does not support the `selector` argument");var i=ht(n),a=i&&i.events,o=i&&i.handle;if(o)if(e){var s=function(e){var t=a[e];_e(r)&&xe(t||[],r),_e(r)&&t&&0<t.length||(ze(n,e,o),delete a[e])};fe(e.split(" "),function(e){s(e),Ke[e]&&s(Ke[e])})}else for(e in a)"$destroy"!==e&&ze(n,e,o),delete a[e]}function dt(e,t){var n=e.ng339,r=n&&He[n];if(r){if(t)return void delete r.data[t];r.handle&&(r.events.$destroy&&r.handle({},"$destroy"),ft(e)),delete He[n],e.ng339=void 0}}function ht(e,t){var n=e.ng339,r=n&&He[n];return t&&!r&&(e.ng339=n=++We,r=He[n]={events:{},data:{},handle:void 0}),r}function pt(e,t,n){if(it(e)){var r=_e(n),i=!r&&t&&!be(t),a=!t,o=ht(e,!i),s=o&&o.data;if(r)s[t]=n;else{if(a)return s;if(i)return s&&s[t];de(s,t)}}}function mt(e,t){return!!e.getAttribute&&-1<(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").indexOf(" "+t+" ")}function gt(t,e){e&&t.setAttribute&&fe(e.split(" "),function(e){t.setAttribute("class",Se((" "+(t.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ").replace(" "+Se(e)+" "," ")))})}function _t(e,t){if(t&&e.setAttribute){var n=(" "+(e.getAttribute("class")||"")+" ").replace(/[\n\t]/g," ");fe(t.split(" "),function(e){e=Se(e),-1===n.indexOf(" "+e+" ")&&(n+=e+" ")}),e.setAttribute("class",Se(n))}}function bt(e,t){if(t)if(t.nodeType)e[e.length++]=t;else{var n=t.length;if("number"==typeof n&&t.window!==t){if(n)for(var r=0;r<n;r++)e[e.length++]=t[r]}else e[e.length++]=t}}function vt(e,t){return yt(e,"$"+(t||"ngController")+"Controller")}function yt(e,t,n){e.nodeType===Fe&&(e=e.documentElement);for(var r=ye(t)?t:[t];e;){for(var i=0,a=r.length;i<a;i++)if(_e(n=ue.data(e,r[i])))return n;e=e.parentNode||e.nodeType===Ge&&e.host}}function wt(e){for(ut(e,!0);e.firstChild;)e.removeChild(e.firstChild)}function Ct(e,t){t||ut(e);var n=e.parentNode;n&&n.removeChild(e)}var At=ct.prototype={ready:function(e){var t=!1;function n(){t||(t=!0,e())}"complete"===j.document.readyState?j.setTimeout(n):(this.on("DOMContentLoaded",n),ct(j).on("load",n))},toString:function(){var t=[];return fe(this,function(e){t.push(""+e)}),"["+t.join(", ")+"]"},eq:function(e){return ue(0<=e?this[e]:this[this.length+e])},length:0,push:e,sort:[].sort,splice:[].splice},St={};fe("multiple,selected,checked,disabled,readOnly,required,open".split(","),function(e){St[S(e)]=e});var Tt={};fe("input,select,option,textarea,button,form,details".split(","),function(e){Tt[e]=!0});var xt={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern"};function kt(e,t){var n=St[t.toLowerCase()];return n&&Tt[Te(e)]&&n}function Et(e,t,n){n.call(e,t)}function Dt(e,t,n){var r=t.relatedTarget;r&&(r===e||st.call(e,r))||n.call(e,t)}function It(){this.$get=function(){return de(ct,{hasClass:function(e,t){return e.attr&&(e=e[0]),mt(e,t)},addClass:function(e,t){return e.attr&&(e=e[0]),_t(e,t)},removeClass:function(e,t){return e.attr&&(e=e[0]),gt(e,t)}})}}function Pt(e,t){var n=e&&e.$$hashKey;if(n)return"function"==typeof n&&(n=e.$$hashKey()),n;var r=typeof e;return n="function"===r||"object"===r&&null!==e?e.$$hashKey=r+":"+(t||k)():r+":"+e}function Mt(e,t){if(t){var n=0;this.nextUid=function(){return++n}}fe(e,this.put,this)}fe({data:pt,removeData:dt,hasData:function(e){for(var t in He[e.ng339])return!0;return!1},cleanData:function(e){for(var t=0,n=e.length;t<n;t++)dt(e[t])}},function(e,t){ct[t]=e}),fe({data:pt,inheritedData:yt,scope:function(e){return ue.data(e,"$scope")||yt(e.parentNode||e,["$isolateScope","$scope"])},isolateScope:function(e){return ue.data(e,"$isolateScope")||ue.data(e,"$isolateScopeNoTemplate")},controller:vt,injector:function(e){return yt(e,"$injector")},removeAttr:function(e,t){e.removeAttribute(t)},hasClass:mt,css:function(e,t,n){if(t=Xe(t),!_e(n))return e.style[t];e.style[t]=n},attr:function(e,t,n){var r=e.nodeType;if(r!==Ne&&2!==r&&r!==Le){var i=S(t);if(St[i]){if(!_e(n))return e[t]||(e.attributes.getNamedItem(t)||pe).specified?i:void 0;n?(e[t]=!0,e.setAttribute(t,i)):(e[t]=!1,e.removeAttribute(i))}else if(_e(n))e.setAttribute(t,n);else if(e.getAttribute){var a=e.getAttribute(t,2);return null===a?void 0:a}}},prop:function(e,t,n){if(!_e(n))return e[t];e[t]=n},text:function(){return e.$dv="",e;function e(e,t){if(ge(t)){var n=e.nodeType;return n===Re||n===Ne?e.textContent:""}e.textContent=t}}(),val:function(e,t){if(ge(t)){if(e.multiple&&"select"===Te(e)){var n=[];return fe(e.options,function(e){e.selected&&n.push(e.value||e.text)}),0===n.length?null:n}return e.value}e.value=t},html:function(e,t){if(ge(t))return e.innerHTML;ut(e,!0),e.innerHTML=t},empty:wt},function(l,e){ct.prototype[e]=function(e,t){var n,r,i=this.length;if(l!==wt&&ge(2===l.length&&l!==mt&&l!==vt?e:t)){if(be(e)){for(n=0;n<i;n++)if(l===pt)l(this[n],e);else for(r in e)l(this[n],r,e[r]);return this}for(var a=l.$dv,o=ge(a)?Math.min(i,1):i,s=0;s<o;s++){var c=l(this[s],e,t);a=a?a+c:c}return a}for(n=0;n<i;n++)l(this[n],e,t);return this}}),fe({removeData:dt,on:function(i,e,a,t){if(_e(t))throw Qe("onargs","jqLite#on() does not support the `selector` or `eventData` parameters");if(it(i)){var s,c,n,r=ht(i,!0),o=r.events,l=r.handle;l||(l=r.handle=(c=o,(n=function(e,t){e.isDefaultPrevented=function(){return e.defaultPrevented};var n=c[t||e.type],r=n?n.length:0;if(r){if(ge(e.immediatePropagationStopped)){var i=e.stopImmediatePropagation;e.stopImmediatePropagation=function(){e.immediatePropagationStopped=!0,e.stopPropagation&&e.stopPropagation(),i&&i.call(e)}}e.isImmediatePropagationStopped=function(){return!0===e.immediatePropagationStopped};var a=n.specialHandlerWrapper||Et;1<r&&(n=je(n));for(var o=0;o<r;o++)e.isImmediatePropagationStopped()||a(s,e,n[o])}}).elem=s=i,n));for(var u=0<=e.indexOf(" ")?e.split(" "):[e],f=u.length,d=function(e,t,n){var r=o[e];r||((r=o[e]=[]).specialHandlerWrapper=t,"$destroy"===e||n||qe(i,e,l)),r.push(a)};f--;)e=u[f],Ke[e]?(d(Ke[e],Dt),d(e,void 0,!0)):d(e)}},off:ft,one:function(t,n,r){(t=ue(t)).on(n,function e(){t.off(n,r),t.off(n,e)}),t.on(n,r)},replaceWith:function(t,e){var n,r=t.parentNode;ut(t),fe(new ct(e),function(e){n?r.insertBefore(e,n.nextSibling):r.replaceChild(e,t),n=e})},children:function(e){var t=[];return fe(e.childNodes,function(e){e.nodeType===Re&&t.push(e)}),t},contents:function(e){return e.contentDocument||e.childNodes||[]},append:function(e,t){var n=e.nodeType;if(n===Re||n===Ge)for(var r=0,i=(t=new ct(t)).length;r<i;r++){var a=t[r];e.appendChild(a)}},prepend:function(t,e){if(t.nodeType===Re){var n=t.firstChild;fe(new ct(e),function(e){t.insertBefore(e,n)})}},wrap:function(e,t){ot(e,ue(t).eq(0).clone()[0])},remove:Ct,detach:function(e){Ct(e,!0)},after:function(e,t){var n=e,r=e.parentNode;if(r)for(var i=0,a=(t=new ct(t)).length;i<a;i++){var o=t[i];r.insertBefore(o,n.nextSibling),n=o}},addClass:_t,removeClass:gt,toggleClass:function(n,e,r){e&&fe(e.split(" "),function(e){var t=r;ge(t)&&(t=!mt(n,e)),(t?_t:gt)(n,e)})},parent:function(e){var t=e.parentNode;return t&&t.nodeType!==Ge?t:null},next:function(e){return e.nextElementSibling},find:function(e,t){return e.getElementsByTagName?e.getElementsByTagName(t):[]},clone:lt,triggerHandler:function(t,e,n){var r,i,a,o=e.type||e,s=ht(t),c=s&&s.events,l=c&&c[o];l&&(r={preventDefault:function(){this.defaultPrevented=!0},isDefaultPrevented:function(){return!0===this.defaultPrevented},stopImmediatePropagation:function(){this.immediatePropagationStopped=!0},isImmediatePropagationStopped:function(){return!0===this.immediatePropagationStopped},stopPropagation:pe,type:o,target:t},e.type&&(r=de(r,e)),i=je(l),a=n?[r].concat(n):[r],fe(i,function(e){r.isImmediatePropagationStopped()||e.apply(t,a)}))}},function(o,e){ct.prototype[e]=function(e,t,n){for(var r,i=0,a=this.length;i<a;i++)ge(r)?_e(r=o(this[i],e,t,n))&&(r=ue(r)):bt(r,o(this[i],e,t,n));return _e(r)?r:this}}),ct.prototype.bind=ct.prototype.on,ct.prototype.unbind=ct.prototype.off,Mt.prototype={put:function(e,t){this[Pt(e,this.nextUid)]=t},get:function(e){return this[Pt(e,this.nextUid)]},remove:function(e){var t=this[e=Pt(e,this.nextUid)];return delete this[e],t}};var $t=[function(){this.$get=[function(){return Mt}]}],Ot=/^([^(]+?)=>/,Rt=/^[^(]*\(\s*([^)]*)\)/m,Nt=/,/,Lt=/^\s*(_?)(\S+?)\1\s*$/,Ft=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,Gt=w("$injector");function jt(e){return Function.prototype.toString.call(e)+" "}function Bt(e){var t=jt(e).replace(Ft,"");return t.match(Ot)||t.match(Rt)}function Ut(e,l){l=!0===l;var i={},a="Provider",s=[],o=new Mt([],!0),u={$provide:{provider:d(h),factory:d(p),service:d(function(e,t){return p(e,["$injector",function(e){return e.instantiate(t)}])}),value:d(function(e,t){return p(e,x(t),!1)}),constant:d(function(e,t){ce(e,"constant"),u[e]=t,n[e]=t}),decorator:function(e,t){var n=c.get(e+a),r=n.$get;n.$get=function(){var e=f.invoke(r,n);return f.invoke(t,null,{$delegate:e})}}}},c=u.$injector=m(u,function(e,t){throw v.isString(t)&&s.push(t),Gt("unpr","Unknown provider: {0}",s.join(" <- "))}),n={},t=m(n,function(e,t){var n=c.get(e+a,t);return f.invoke(n.$get,n,void 0,e)}),f=t;u["$injector"+a]={$get:x(t)};var r=function n(e){Me(ge(e)||ye(e),"modulesToLoad","not an array");var r,i=[];fe(e,function(t){if(!o.get(t)){o.put(t,!0);try{ve(t)?(r=g(t),i=i.concat(n(r.requires)).concat(r._runBlocks),e(r._invokeQueue),e(r._configBlocks)):we(t)?i.push(c.invoke(t)):ye(t)?i.push(c.invoke(t)):se(t,"module")}catch(e){throw ye(t)&&(t=t[t.length-1]),e.message&&e.stack&&-1===e.stack.indexOf(e.message)&&(e=e.message+"\n"+e.stack),Gt("modulerr","Failed to instantiate module {0} due to:\n{1}",t,e.stack||e.message||e)}}function e(e){var t,n;for(t=0,n=e.length;t<n;t++){var r=e[t],i=c.get(r[0]);i[r[1]].apply(i,r[2])}}});return i}(e);return(f=t.get("$injector")).strictDi=l,fe(r,function(e){e&&f.invoke(e)}),f;function d(n){return function(e,t){if(!be(e))return n(e,t);fe(e,_(n))}}function h(e,t){if(ce(e,"service"),(we(t)||ye(t))&&(t=c.instantiate(t)),!t.$get)throw Gt("pget","Provider '{0}' must define $get factory method.",e);return u[e+a]=t}function p(e,t,n){return h(e,{$get:!1!==n?(r=e,i=t,function(){var e=f.invoke(i,this);if(ge(e))throw Gt("undef","Provider '{0}' must return a value from $get factory method.",r);return e}):t});var r,i}function m(n,r){function c(t,e){if(n.hasOwnProperty(t)){if(n[t]===i)throw Gt("cdep","Circular dependency found: {0}",t+" <- "+s.join(" <- "));return n[t]}try{return s.unshift(t),n[t]=i,n[t]=r(t,e),n[t]}catch(e){throw n[t]===i&&delete n[t],e}finally{s.shift()}}function o(e,t,n){for(var r=[],i=Ut.$$annotate(e,l,n),a=0,o=i.length;a<o;a++){var s=i[a];if("string"!=typeof s)throw Gt("itkn","Incorrect injection token! Expected service name as string, got {0}",s);r.push(t&&t.hasOwnProperty(s)?t[s]:c(s,n))}return r}return{invoke:function(e,t,n,r){"string"==typeof n&&(r=n,n=null);var i,a=o(e,n,r);return ye(e)&&(e=e[e.length-1]),i=e,U<=11||"function"!=typeof i||!/^(?:class\b|constructor\()/.test(jt(i))?e.apply(t,a):(a.unshift(null),new(Function.prototype.bind.apply(e,a)))},instantiate:function(e,t,n){var r=ye(e)?e[e.length-1]:e,i=o(e,t,n);return i.unshift(null),new(Function.prototype.bind.apply(r,i))},get:c,annotate:Ut.$$annotate,has:function(e){return u.hasOwnProperty(e+a)||n.hasOwnProperty(e)}}}}function Ht(){var e=!0;this.disableAutoScrolling=function(){e=!1},this.$get=["$window","$location","$rootScope",function(r,i,a){var o=r.document;function s(e){if(e){e.scrollIntoView();var t=function(){var e=c.yOffset;if(we(e))e=e();else if($(e)){var t=e[0];e="fixed"!==r.getComputedStyle(t).position?0:t.getBoundingClientRect().bottom}else C(e)||(e=0);return e}();if(t){var n=e.getBoundingClientRect().top;r.scrollBy(0,n-t)}}else r.scrollTo(0,0)}function c(e){var t,n,r;(e=ve(e)?e:C(e)?e.toString():i.hash())?(t=o.getElementById(e))?s(t):(n=o.getElementsByName(e),r=null,Array.prototype.some.call(n,function(e){if("a"===Te(e))return r=e,!0}),(t=r)?s(t):"top"===e&&s(null)):s(null)}return e&&a.$watch(function(){return i.hash()},function(e,t){var n,r;e===t&&""===e||(n=function(){a.$evalAsync(c)},"complete"===(r=r||j).document.readyState?r.setTimeout(n):ue(r).on("load",n))}),c}]}Ut.$$annotate=function(e,t,n){var r,i,a;if("function"==typeof e){if(!(r=e.$inject)){if(r=[],e.length){if(t)throw ve(n)&&n||(n=e.name||((a=Bt(e))?"function("+(a[1]||"").replace(/[\s\r\n]+/," ")+")":"fn")),Gt("strictdi","{0} is not using explicit annotation and cannot be invoked in strict mode",n);fe(Bt(e)[1].split(Nt),function(e){e.replace(Lt,function(e,t,n){r.push(n)})})}e.$inject=r}}else ye(e)?(se(e[i=e.length-1],"fn"),r=e.slice(0,i)):se(e,"fn",!0);return r};var Wt=w("$animate"),qt=1,zt="ng-animate";function Vt(e,t){return e||t?e?t?(ye(e)&&(e=e.join(" ")),ye(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function Yt(e){return be(e)?e:{}}var Kt=function(){this.$get=pe},Qt=function(){var m=new Mt,g=[];this.$get=["$$AnimateRunner","$rootScope",function(f,d){return{enabled:pe,on:pe,off:pe,pin:pe,push:function(e,t,n,r){var i,a,o,s,c,l;r&&r(),(n=n||{}).from&&e.css(n.from),n.to&&e.css(n.to),(n.addClass||n.removeClass)&&(i=e,a=n.addClass,o=n.removeClass,s=m.get(i)||{},c=h(s,a,!0),l=h(s,o,!1),(c||l)&&(m.put(i,s),g.push(i),1===g.length&&d.$$postDigest(p)));var u=new f;return u.complete(),u}};function h(t,e,n){var r=!1;return e&&fe(e=ve(e)?e.split(" "):ye(e)?e:[],function(e){e&&(r=!0,t[e]=n)}),r}function p(){fe(g,function(e){var t=m.get(e);if(t){var n=function(e){ve(e)&&(e=e.split(" "));var t=Oe();return fe(e,function(e){e.length&&(t[e]=!0)}),t}(e.attr("class")),r="",i="";fe(t,function(e,t){e!==!!n[t]&&(e?r+=(r.length?" ":"")+t:i+=(i.length?" ":"")+t)}),fe(e,function(e){r&&_t(e,r),i&&gt(e,i)}),m.remove(e)}}),g.length=0}}]},Xt=["$provide",function(r){var i=this;this.$$registeredAnimations=Object.create(null),this.register=function(e,t){if(e&&"."!==e.charAt(0))throw Wt("notcsel","Expecting class selector starting with '.' got '{0}'.",e);var n=e+"-animation";i.$$registeredAnimations[e.substr(1)]=n,r.factory(n,t)},this.classNameFilter=function(e){if(1===arguments.length&&(this.$$classNameFilter=e instanceof RegExp?e:null,this.$$classNameFilter&&new RegExp("(\\s+|\\/)"+zt+"(\\s+|\\/)").test(this.$$classNameFilter.toString())))throw Wt("nongcls",'$animateProvider.classNameFilter(regex) prohibits accepting a regex value which matches/contains the "{0}" CSS class.',zt);return this.$$classNameFilter},this.$get=["$$animateQueue",function(a){function i(e,t,n){if(n){var r=function(e){for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType===qt)return n}}(n);!r||r.parentNode||r.previousElementSibling||(n=null)}n?n.after(e):t.prepend(e)}return{on:a.on,off:a.off,pin:a.pin,enabled:a.enabled,cancel:function(e){e.end&&e.end()},enter:function(e,t,n,r){return t=t&&ue(t),n=n&&ue(n),i(e,t=t||n.parent(),n),a.push(e,"enter",Yt(r))},move:function(e,t,n,r){return t=t&&ue(t),n=n&&ue(n),i(e,t=t||n.parent(),n),a.push(e,"move",Yt(r))},leave:function(e,t){return a.push(e,"leave",Yt(t),function(){e.remove()})},addClass:function(e,t,n){return(n=Yt(n)).addClass=Vt(n.addclass,t),a.push(e,"addClass",n)},removeClass:function(e,t,n){return(n=Yt(n)).removeClass=Vt(n.removeClass,t),a.push(e,"removeClass",n)},setClass:function(e,t,n,r){return(r=Yt(r)).addClass=Vt(r.addClass,t),r.removeClass=Vt(r.removeClass,n),a.push(e,"setClass",r)},animate:function(e,t,n,r,i){return(i=Yt(i)).from=i.from?de(i.from,t):t,i.to=i.to?de(i.to,n):n,r=r||"ng-inline-animate",i.tempClasses=Vt(i.tempClasses,r),a.push(e,"animate",i)}}}]}],Zt=function(){this.$get=["$$rAF",function(t){var n=[];function r(e){n.push(e),1<n.length||t(function(){for(var e=0;e<n.length;e++)n[e]();n=[]})}return function(){var t=!1;return r(function(){t=!0}),function(e){t?e():r(e)}}}]},Jt=function(){this.$get=["$q","$sniffer","$$animateAsyncRun","$document","$timeout",function(t,e,r,i,a){function n(e){this.setHost(e);var n=r();this._doneCallbacks=[],this._tick=function(e){var t=i[0];t&&t.hidden?a(e,0,!1):n(e)},this._state=0}return n.chain=function(e,n){var r=0;!function t(){if(r===e.length)return void n(!0);e[r](function(e){!1!==e?(r++,t()):n(!1)})}()},n.all=function(t,n){var r=0,i=!0;function a(e){i=i&&e,++r===t.length&&n(i)}fe(t,function(e){e.done(a)})},n.prototype={setHost:function(e){this.host=e||{}},done:function(e){2===this._state?e():this._doneCallbacks.push(e)},progress:pe,getPromise:function(){if(!this.promise){var e=this;this.promise=t(function(t,n){e.done(function(e){!1===e?n():t()})})}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},catch:function(e){return this.getPromise().catch(e)},finally:function(e){return this.getPromise().finally(e)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(e){var t=this;0===t._state&&(t._state=1,t._tick(function(){t._resolve(e)}))},_resolve:function(t){2!==this._state&&(fe(this._doneCallbacks,function(e){e(t)}),this._doneCallbacks.length=0,this._state=2)}},n}]},en=function(){this.$get=["$$rAF","$q","$$AnimateRunner",function(o,e,s){return function(e,t){var n=t||{};n.$$prepared||(n=R(n)),n.cleanupStyles&&(n.from=n.to=null),n.from&&(e.css(n.from),n.from=null);var r,i=new s;return{start:a,end:a};function a(){return o(function(){!function(){n.addClass&&(e.addClass(n.addClass),n.addClass=null);n.removeClass&&(e.removeClass(n.removeClass),n.removeClass=null);n.to&&(e.css(n.to),n.to=null)}(),r||i.complete(),r=!0}),i}}}]};function tn(s,e,t,c){var l=this,u=s.location,f=s.history,r=s.setTimeout,n=s.clearTimeout,i={};l.isMock=!1;var a=0,o=[];function d(e){try{e.apply(null,Ee(arguments,1))}finally{if(0===--a)for(;o.length;)try{o.pop()()}catch(e){t.error(e)}}}l.$$completeOutstandingRequest=d,l.$$incOutstandingRequestCount=function(){a++},l.notifyWhenNoOutstandingRequests=function(e){0===a?e():o.push(e)};var h,p,m=u.href,g=e.find("base"),_=null,b=c.history?function(){try{return f.state}catch(e){}}:pe;A(),p=h,l.url=function(e,t,n){if(ge(n)&&(n=null),u!==s.location&&(u=s.location),f!==s.history&&(f=s.history),e){var r=p===n;if(m===e&&(!c.history||r))return l;var i=m&&Xn(m)===Xn(e);return m=e,p=n,!c.history||i&&r?(i||(_=e),t?u.replace(e):i?u.hash=-1===(o=(a=e).indexOf("#"))?"":a.substr(o):u.href=e,u.href!==e&&(_=e)):(f[t?"replaceState":"pushState"](n,"",e),A(),p=h),_&&(_=e),l}return _||u.href.replace(/%27/g,"'");var a,o},l.state=function(){return h};var v=[],y=!1;function w(){_=null,A(),S()}var C=null;function A(){ke(h=ge(h=b())?null:h,C)&&(h=C),C=h}function S(){m===l.url()&&p===h||(m=l.url(),p=h,fe(v,function(e){e(l.url(),h)}))}l.onUrlChange=function(e){return y||(c.history&&ue(s).on("popstate",w),ue(s).on("hashchange",w),y=!0),v.push(e),e},l.$$applicationDestroyed=function(){ue(s).off("hashchange popstate",w)},l.$$checkUrlChange=S,l.baseHref=function(){var e=g.attr("href");return e?e.replace(/^(https?:)?\/\/[^/]*/,""):""},l.defer=function(e,t){var n;return a++,n=r(function(){delete i[n],d(e)},t||0),i[n]=!0,n},l.defer.cancel=function(e){return!!i[e]&&(delete i[e],n(e),d(pe),!0)}}function nn(){this.$get=["$window","$log","$sniffer","$document",function(e,t,n,r){return new tn(e,r,t,n)}]}function rn(){this.$get=function(){var f={};function e(e,t){if(e in f)throw w("$cacheFactory")("iid","CacheId '{0}' is already taken!",e);var n=0,r=de({},t,{id:e}),i=Oe(),a=t&&t.capacity||Number.MAX_VALUE,o=Oe(),s=null,c=null;return f[e]={put:function(e,t){if(!ge(t)){if(a<Number.MAX_VALUE)l(o[e]||(o[e]={key:e}));return e in i||n++,i[e]=t,a<n&&this.remove(c.key),t}},get:function(e){if(a<Number.MAX_VALUE){var t=o[e];if(!t)return;l(t)}return i[e]},remove:function(e){if(a<Number.MAX_VALUE){var t=o[e];if(!t)return;t===s&&(s=t.p),t===c&&(c=t.n),u(t.n,t.p),delete o[e]}e in i&&(delete i[e],n--)},removeAll:function(){i=Oe(),n=0,o=Oe(),s=c=null},destroy:function(){o=r=i=null,delete f[e]},info:function(){return de({},r,{size:n})}};function l(e){e!==s&&(c?c===e&&(c=e.n):c=e,u(e.n,e.p),u(e,s),(s=e).n=null)}function u(e,t){e!==t&&(e&&(e.p=t),t&&(t.n=e))}}return e.info=function(){var n={};return fe(f,function(e,t){n[t]=e.info()}),n},e.get=function(e){return f[e]},e}}function an(){this.$get=["$cacheFactory",function(e){return e("templates")}]}var on=w("$compile");var sn=new function(){};function cn(n,t){var p={},m="Directive",F=/^\s*directive:\s*([\w-]+)\s+(.*)$/,G=/(([\w-]+)(?::([^;]+))?;?)/,u=function(e){var t,n={},r=e.split(",");for(t=0;t<r.length;t++)n[r[t]]=!0;return n}("ngSrc,ngSrcset,src,srcset"),d=/^(?:(\^\^?)?(\?)?(\^\^?)?)?/,f=/^(on[a-z]+|formaction)$/,s=Oe();function r(e,r,i){var a=/^\s*([@&<]|=(\*?))(\??)\s*(\w*)\s*$/,o=Oe();return fe(e,function(e,t){if(e in s)o[t]=s[e];else{var n=e.match(a);if(!n)throw on("iscp","Invalid {3} for directive '{0}'. Definition: {... {1}: '{2}' ...}",r,t,e,i?"controller bindings definition":"isolate scope definition");o[t]={mode:n[1][0],collection:"*"===n[2],optional:"?"===n[3],attrName:n[4]||t},n[4]&&(s[e]=o[t])}}),o}function g(e,t){var n={isolateScope:null,bindToController:null};if(be(e.scope)&&(!0===e.bindToController?(n.bindToController=r(e.scope,t,!0),n.isolateScope={}):n.isolateScope=r(e.scope,t,!1)),be(e.bindToController)&&(n.bindToController=r(e.bindToController,t,!0)),n.bindToController&&!e.controller)throw on("noctrl","Cannot bind to controller without directive '{0}'s controller.",t);return n}this.directive=function e(c,t){return Me(c,"name"),ce(c,"directive"),ve(c)?(!function(e){var t=e.charAt(0);if(!t||t!==S(t))throw on("baddir","Directive/Component name '{0}' is invalid. The first character must be a lowercase letter",e);if(e!==e.trim())throw on("baddir","Directive/Component name '{0}' is invalid. The name should not contain leading or trailing whitespaces",e)}(c),Me(t,"directiveFactory"),p.hasOwnProperty(c)||(p[c]=[],n.factory(c+m,["$injector","$exceptionHandler",function(a,o){var s=[];return fe(p[c],function(e,t){try{var n=a.invoke(e);we(n)?n={compile:x(n)}:!n.compile&&n.link&&(n.compile=x(n.link)),n.priority=n.priority||0,n.index=t,n.name=n.name||c,n.require=(i=(r=n).require||r.controller&&r.name,!ye(i)&&be(i)&&fe(i,function(e,t){var n=e.match(d);e.substring(n[0].length)||(i[t]=n[0]+t)}),i),n.restrict=function(e,t){if(e&&(!ve(e)||!/[EACM]/.test(e)))throw on("badrestrict","Restrict property '{0}' of directive '{1}' is invalid",e,t);return e||"EA"}(n.restrict,c),n.$$moduleName=e.$$moduleName,s.push(n)}catch(e){o(e)}var r,i}),s}])),p[c].push(t)):fe(c,_(e)),this},this.component=function(e,i){var a=i.controller||function(){};function n(r){function e(n){return we(n)||ye(n)?function(e,t){return r.invoke(n,this,{$element:e,$attrs:t})}:n}var t=i.template||i.templateUrl?i.template:"",n={controller:a,controllerAs:function(e,t){if(t&&ve(t))return t;if(ve(e)){var n=mn.exec(e);if(n)return n[3]}}(i.controller)||i.controllerAs||"$ctrl",template:e(t),templateUrl:e(i.templateUrl),transclude:i.transclude,scope:{},bindToController:i.bindings||{},restrict:"E",require:i.require};return fe(i,function(e,t){"$"===t.charAt(0)&&(n[t]=e)}),n}return fe(i,function(e,t){"$"===t.charAt(0)&&(n[t]=e,we(a)&&(a[t]=e))}),n.$inject=["$injector"],this.directive(e,n)},this.aHrefSanitizationWhitelist=function(e){return _e(e)?(t.aHrefSanitizationWhitelist(e),this):t.aHrefSanitizationWhitelist()},this.imgSrcSanitizationWhitelist=function(e){return _e(e)?(t.imgSrcSanitizationWhitelist(e),this):t.imgSrcSanitizationWhitelist()};var l=!0;this.debugInfoEnabled=function(e){return _e(e)?(l=e,this):l};var le=!0;this.preAssignBindingsEnabled=function(e){return _e(e)?(le=e,this):le};var w=10;this.onChangesTtl=function(e){return arguments.length?(w=e,this):w};var C=!0;this.commentDirectivesEnabled=function(e){return arguments.length?(C=e,this):C};var A=!0;this.cssClassDirectivesEnabled=function(e){return arguments.length?(A=e,this):A},this.$get=["$injector","$interpolate","$exceptionHandler","$templateRequest","$parse","$controller","$rootScope","$sce","$animate","$$sanitizeUri",function(h,T,W,e,v,q,a,i,o,_){var s,b=/^\w/,y=j.document.createElement("div"),x=C,k=A,t=w;function c(){try{if(!--t)throw s=void 0,on("infchng","{0} $onChanges() iterations reached. Aborting!\n",w);a.$apply(function(){for(var t=[],e=0,n=s.length;e<n;++e)try{s[e]()}catch(e){t.push(e)}if(s=void 0,t.length)throw t})}finally{t++}}function z(e,t){if(t){var n,r,i,a=Object.keys(t);for(n=0,r=a.length;n<r;n++)this[i=a[n]]=t[i]}else this.$attr={};this.$$element=e}function E(e,t){try{e.addClass(t)}catch(e){}}z.prototype={$normalize:fn,$addClass:function(e){e&&0<e.length&&o.addClass(this.$$element,e)},$removeClass:function(e){e&&0<e.length&&o.removeClass(this.$$element,e)},$updateClass:function(e,t){var n=dn(e,t);n&&n.length&&o.addClass(this.$$element,n);var r=dn(t,e);r&&r.length&&o.removeClass(this.$$element,r)},$set:function(e,t,n,r){var i,a=kt(this.$$element[0],e),o=xt[e],s=e;if(a?(this.$$element.prop(e,t),r=a):o&&(this[o]=t,s=o),this[e]=t,r?this.$attr[e]=r:(r=this.$attr[e])||(this.$attr[e]=r=Pe(e,"-")),"a"===(i=Te(this.$$element))&&("href"===e||"xlinkHref"===e)||"img"===i&&"src"===e)this[e]=t=_(t,"src"===e);else if("img"===i&&"srcset"===e&&_e(t)){for(var c="",l=Se(t),u=/\s/.test(l)?/(\s+\d+x\s*,|\s+\d+w\s*,|\s+,|,\s+)/:/(,)/,f=l.split(u),d=Math.floor(f.length/2),h=0;h<d;h++){var p=2*h;c+=_(Se(f[p]),!0),c+=" "+Se(f[p+1])}var m=Se(f[2*h]).split(/\s/);c+=_(Se(m[0]),!0),2===m.length&&(c+=" "+Se(m[1])),this[e]=t=c}!1!==n&&(null===t||ge(t)?this.$$element.removeAttr(r):b.test(r)?this.$$element.attr(r,t):function(e,t,n){y.innerHTML="<span "+t+">";var r=y.firstChild.attributes,i=r[0];r.removeNamedItem(i.name),i.value=n,e.attributes.setNamedItem(i)}(this.$$element[0],r,t));var g=this.$$observers;g&&fe(g[s],function(e){try{e(t)}catch(e){W(e)}})},$observe:function(e,t){var n=this,r=n.$$observers||(n.$$observers=Oe()),i=r[e]||(r[e]=[]);return i.push(t),a.$evalAsync(function(){i.$$inter||!n.hasOwnProperty(e)||ge(n[e])||t(n[e])}),function(){xe(i,t)}}};var n=T.startSymbol(),r=T.endSymbol(),V="{{"===n&&"}}"===r?me:function(e){return e.replace(/\{\{/g,n).replace(/}}/g,r)},D=/^ngAttr[A-Z]/,I=/^(.+)Start$/;return Y.$$addBindingInfo=l?function(e,t){var n=e.data("$binding")||[];ye(t)?n=n.concat(t):n.push(t),e.data("$binding",n)}:pe,Y.$$addBindingClass=l?function(e){E(e,"ng-binding")}:pe,Y.$$addScopeInfo=l?function(e,t,n,r){var i=n?r?"$isolateScopeNoTemplate":"$isolateScope":"$scope";e.data(i,t)}:pe,Y.$$addScopeClass=l?function(e,t){E(e,t?"ng-isolate-scope":"ng-scope")}:pe,Y.$$createComment=function(e,t){var n="";return l&&(n=" "+(e||"")+": ",t&&(n+=t+" ")),j.document.createComment(n)},Y;function Y(u,e,t,n,f){u instanceof ue||(u=ue(u));for(var r=/\S+/,i=0,a=u.length;i<a;i++){var o=u[i];o.nodeType===Ne&&o.nodeValue.match(r)&&ot(o,u[i]=j.document.createElement("span"))}var d=P(u,e,u,t,n,f);Y.$$addScopeClass(u);var h=null;return function(e,t,n){Me(e,"scope"),f&&f.needsNewScope&&(e=e.$parent.$new());var r,i,a,o=(n=n||{}).parentBoundTranscludeFn,s=n.transcludeControllers,c=n.futureParentElement;if(o&&o.$$boundTransclude&&(o=o.$$boundTransclude),h||(i=(r=c)&&r[0],h=i&&"foreignobject"!==Te(i)&&H.call(i).match(/SVG/)?"svg":"html"),a="html"!==h?ue(ie(h,ue("<div>").append(u).html())):t?At.clone.call(u):u,s)for(var l in s)a.data("$"+l+"Controller",s[l].instance);return Y.$$addScopeInfo(a,e),t&&t(a,e),d&&d(e,a,a,o),a}}function P(e,p,t,n,r,i){for(var a,o,s,c,l,u,m,g=[],f=0;f<e.length;f++)a=new z,(s=(o=K(e[f],[],a,0===f?n:void 0,r)).length?$(o,e[f],a,p,t,null,[],[],i):null)&&s.scope&&Y.$$addScopeClass(a.$$element),l=s&&s.terminal||!(c=e[f].childNodes)||!c.length?null:P(c,s?(s.transcludeOnThisElement||!s.templateOnThisElement)&&s.transclude:p),(s||l)&&(g.push(f,s,l),u=!0,m=m||s),i=null;return u?function(e,t,n,r){var i,a,o,s,c,l,u,f,d;if(m){var h=t.length;for(d=new Array(h),c=0;c<g.length;c+=3)u=g[c],d[u]=t[u]}else d=t;for(c=0,l=g.length;c<l;)o=d[g[c++]],i=g[c++],a=g[c++],i?(i.scope?(s=e.$new(),Y.$$addScopeInfo(ue(o),s)):s=e,f=i.transcludeOnThisElement?M(e,i.transclude,r):!i.templateOnThisElement&&r?r:!r&&p?M(e,p):null,i(a,s,o,n,f)):a&&a(e,o.childNodes,void 0,r)}:null}function M(a,o,s){function e(e,t,n,r,i){return e||((e=a.$new(!1,i)).$$transcluded=!0),o(e,t,{parentBoundTranscludeFn:s,transcludeControllers:n,futureParentElement:r})}var t=e.$$slots=Oe();for(var n in o.$$slots)o.$$slots[n]?t[n]=M(a,o.$$slots[n],s):t[n]=null;return e}function K(e,t,n,r,i){var a,o,s,c,l,u,f=e.nodeType,d=n.$attr;switch(f){case Re:O(t,fn(o=Te(e)),"E",r,i);for(var h,p,m,g,_,b,v=e.attributes,y=0,w=v&&v.length;y<w;y++){var C=!1,A=!1;p=(h=v[y]).name,_=Se(h.value),g=fn(p),(b=D.test(g))&&(p=p.replace(un,"").substr(8).replace(/_(.)/g,function(e,t){return t.toUpperCase()}));var S=g.match(I);S&&R(S[1])&&(A=(C=p).substr(0,p.length-5)+"end",p=p.substr(0,p.length-6)),d[m=fn(p.toLowerCase())]=p,!b&&n.hasOwnProperty(m)||(n[m]=_,kt(e,m)&&(n[m]=!0)),L(e,t,_,m,b),O(t,m,"A",r,i,C,A)}if("input"===o&&"hidden"===e.getAttribute("type")&&e.setAttribute("autocomplete","off"),!k)break;if(be(s=e.className)&&(s=s.animVal),ve(s)&&""!==s)for(;a=G.exec(s);)O(t,m=fn(a[2]),"C",r,i)&&(n[m]=Se(a[3])),s=s.substr(a.index+a[0].length);break;case Ne:if(11===U)for(;e.parentNode&&e.nextSibling&&e.nextSibling.nodeType===Ne;)e.nodeValue=e.nodeValue+e.nextSibling.nodeValue,e.parentNode.removeChild(e.nextSibling);c=t,l=e.nodeValue,(u=T(l,!0))&&c.push({priority:0,compile:function(e){var t=e.parent(),r=!!t.length;return r&&Y.$$addBindingClass(t),function(e,t){var n=t.parent();r||Y.$$addBindingClass(n),Y.$$addBindingInfo(n,u.expressions),e.$watch(u,function(e){t[0].nodeValue=e})}}});break;case Le:if(!x)break;!function(e,t,n,r,i){try{var a=F.exec(e.nodeValue);if(a){var o=fn(a[1]);O(t,o,"M",r,i)&&(n[o]=Se(a[2]))}}catch(e){}}(e,t,n,r,i)}return t.sort(N),t}function Q(e,t,n){var r=[],i=0;if(t&&e.hasAttribute&&e.hasAttribute(t))do{if(!e)throw on("uterdir","Unterminated attribute, found '{0}' but no matching '{1}' found.",t,n);e.nodeType===Re&&(e.hasAttribute(t)&&i++,e.hasAttribute(n)&&i--),r.push(e),e=e.nextSibling}while(0<i);else r.push(e);return ue(r)}function X(a,o,s){return function(e,t,n,r,i){return t=Q(t[0],o,s),a(e,t,n,r,i)}}function Z(e,t,n,r,i,a){var o;return e?Y(t,n,r,i,a):function(){return o||(o=Y(t,n,r,i,a),t=n=a=null),o.apply(this,arguments)}}function $(e,w,C,t,n,r,A,S,i){i=i||{};for(var a,o,s,c,l,u=-Number.MAX_VALUE,T=i.newScopeDirective,x=i.controllerDirectives,k=i.newIsolateScopeDirective,E=i.templateDirective,f=i.nonTlbTranscludeDirective,d=!1,h=!1,D=i.hasElementTranscludeDirective,p=C.$$element=ue(w),m=r,g=t,_=!1,b=!1,v=0,y=e.length;v<y;v++){var I=(a=e[v]).$$start,P=a.$$end;if(I&&(p=Q(w,I,P)),s=void 0,u>a.priority)break;if((l=a.scope)&&(a.templateUrl||(be(l)?(re("new/isolated scope",k||T,a,p),k=a):re("new/isolated scope",k,a,p)),T=T||a),o=a.name,!_&&(a.replace&&(a.templateUrl||a.template)||a.transclude&&!a.$$tlb)){for(var M,$=v+1;M=e[$++];)if(M.transclude&&!M.$$tlb||M.replace&&(M.templateUrl||M.template)){b=!0;break}_=!0}if(!a.templateUrl&&a.controller&&(x=x||Oe(),re("'"+o+"' controller",x[o],a,p),x[o]=a),l=a.transclude)if(d=!0,a.$$tlb||(re("transclusion",f,a,p),f=a),"element"===l)D=!0,u=a.priority,s=p,p=C.$$element=ue(Y.$$createComment(o,C[o])),w=p[0],ae(n,Ee(s),w),s[0].$$parentNode=s[0].parentNode,g=Z(b,s,t,u,m&&m.name,{nonTlbTranscludeDirective:f});else{var O=Oe();if(s=ue(lt(w)).contents(),be(l)){s=[];var R=Oe(),N=Oe();for(var L in fe(l,function(e,t){var n="?"===e.charAt(0);e=n?e.substring(1):e,R[e]=t,O[t]=null,N[t]=n}),fe(p.contents(),function(e){var t=R[fn(Te(e))];t?(N[t]=!0,O[t]=O[t]||[],O[t].push(e)):s.push(e)}),fe(N,function(e,t){if(!e)throw on("reqslot","Required transclusion slot `{0}` was not filled.",t)}),O)O[L]&&(O[L]=Z(b,O[L],t))}p.empty(),(g=Z(b,s,t,void 0,void 0,{needsNewScope:a.$$isolateScope||a.$$newScope})).$$slots=O}if(a.template)if(h=!0,re("template",E,a,p),l=we((E=a).template)?a.template(p,C):a.template,l=V(l),a.replace){if(m=a,s=rt(l)?[]:hn(ie(a.templateNamespace,Se(l))),w=s[0],1!==s.length||w.nodeType!==Re)throw on("tplrt","Template for directive '{0}' must have exactly one root element. {1}",o,"");ae(n,p,w);var F={$attr:{}},G=K(w,[],F),j=e.splice(v+1,e.length-(v+1));(k||T)&&ee(G,k,T),e=e.concat(G).concat(j),te(C,F),y=e.length}else p.html(l);if(a.templateUrl)h=!0,re("template",E,a,p),(E=a).replace&&(m=a),H=ne(e.splice(v,e.length-v),p,C,n,d&&g,A,S,{controllerDirectives:x,newScopeDirective:T!==a&&T,newIsolateScopeDirective:k,templateDirective:E,nonTlbTranscludeDirective:f}),y=e.length;else if(a.compile)try{c=a.compile(p,C,g);var B=a.$$originalDirective||a;we(c)?U(null,De(B,c),I,P):c&&U(De(B,c.pre),De(B,c.post),I,P)}catch(e){W(e,Ie(p))}a.terminal&&(H.terminal=!0,u=Math.max(u,a.priority))}return H.scope=T&&!0===T.scope,H.transcludeOnThisElement=d,H.templateOnThisElement=h,H.transclude=g,i.hasElementTranscludeDirective=D,H;function U(e,t,n,r){e&&(n&&(e=X(e,n,r)),e.require=a.require,e.directiveName=o,(k===a||a.$$isolateScope)&&(e=oe(e,{isolateScope:!0})),A.push(e)),t&&(n&&(t=X(t,n,r)),t.require=a.require,t.directiveName=o,(k===a||a.$$isolateScope)&&(t=oe(t,{isolateScope:!0})),S.push(t))}function H(e,t,n,r,o){var i,a,s,c,l,u,f,d,h,p;for(var m in w===n?d=(h=C).$$element:h=new z(d=ue(n),C),l=t,k?c=t.$new(!0):T&&(l=t.$parent),o&&((f=function(e,t,n,r){var i;Ce(e)||(r=n,n=t,t=e,e=void 0);D&&(i=u);n||(n=D?d.parent():d);{if(!r)return o(e,t,i,n,y);var a=o.$$slots[r];if(a)return a(e,t,i,n,y);if(ge(a))throw on("noslot",'No parent directive that requires a transclusion with slot name "{0}". Element: {1}',r,Ie(d))}}).$$boundTransclude=o,f.isSlotFilled=function(e){return!!o.$$slots[e]}),x&&(u=function(e,t,n,r,i,a,o){var s=Oe();for(var c in r){var l=r[c],u={$scope:l===o||l.$$isolateScope?i:a,$element:e,$attrs:t,$transclude:n},f=l.controller;"@"===f&&(f=t[l.name]);var d=q(f,u,!0,l.controllerAs);s[l.name]=d,e.data("$"+l.name+"Controller",d.instance)}return s}(d,h,f,x,c,t,k)),k&&(Y.$$addScopeInfo(d,c,!0,!(E&&(E===k||E===k.$$originalDirective))),Y.$$addScopeClass(d,!0),c.$$isolateBindings=k.$$isolateBindings,(p=ce(t,h,c,c.$$isolateBindings,k)).removeWatches&&c.$on("$destroy",p.removeWatches)),u){var g=x[m],_=u[m],b=g.$$bindings.bindToController;if(le){_.bindingInfo=b?ce(l,h,_.instance,b,g):{};var v=_();v!==_.instance&&(_.instance=v,d.data("$"+g.name+"Controller",v),_.bindingInfo.removeWatches&&_.bindingInfo.removeWatches(),_.bindingInfo=ce(l,h,_.instance,b,g))}else _.instance=_(),d.data("$"+g.name+"Controller",_.instance),_.bindingInfo=ce(l,h,_.instance,b,g)}for(fe(x,function(e,t){var n=e.require;e.bindToController&&!ye(n)&&be(n)&&de(u[t].instance,J(t,n,d,u))}),fe(u,function(e){var t=e.instance;if(we(t.$onChanges))try{t.$onChanges(e.bindingInfo.initialChanges)}catch(e){W(e)}if(we(t.$onInit))try{t.$onInit()}catch(e){W(e)}we(t.$doCheck)&&(l.$watch(function(){t.$doCheck()}),t.$doCheck()),we(t.$onDestroy)&&l.$on("$destroy",function(){t.$onDestroy()})}),i=0,a=A.length;i<a;i++)se(s=A[i],s.isolateScope?c:t,d,h,s.require&&J(s.directiveName,s.require,d,u),f);var y=t;for(k&&(k.template||null===k.templateUrl)&&(y=c),e&&e(y,n.childNodes,void 0,o),i=S.length-1;0<=i;i--)se(s=S[i],s.isolateScope?c:t,d,h,s.require&&J(s.directiveName,s.require,d,u),f);fe(u,function(e){var t=e.instance;we(t.$postLink)&&t.$postLink()})}}function J(n,e,r,i){var a;if(ve(e)){var t=e.match(d),o=e.substring(t[0].length),s=t[1]||t[3],c="?"===t[2];if("^^"===s?r=r.parent():a=(a=i&&i[o])&&a.instance,!a){var l="$"+o+"Controller";a=s?r.inheritedData(l):r.data(l)}if(!a&&!c)throw on("ctreq","Controller '{0}', required by directive '{1}', can't be found!",o,n)}else if(ye(e)){a=[];for(var u=0,f=e.length;u<f;u++)a[u]=J(n,e[u],r,i)}else be(e)&&(a={},fe(e,function(e,t){a[t]=J(n,e,r,i)}));return a||null}function ee(e,t,n){for(var r=0,i=e.length;r<i;r++)e[r]=he(e[r],{$$isolateScope:t,$$newScope:n})}function O(e,t,n,r,i,a,o){if(t===i)return null;var s=null;if(p.hasOwnProperty(t))for(var c,l=h.get(t+m),u=0,f=l.length;u<f;u++)if(c=l[u],(ge(r)||r>c.priority)&&-1!==c.restrict.indexOf(n)){if(a&&(c=he(c,{$$start:a,$$end:o})),!c.$$bindings){var d=c.$$bindings=g(c,c.name);be(d.isolateScope)&&(c.$$isolateBindings=d.isolateScope)}e.push(c),s=c}return s}function R(e){if(p.hasOwnProperty(e))for(var t=h.get(e+m),n=0,r=t.length;n<r;n++)if(t[n].multiElement)return!0;return!1}function te(n,r){var i=r.$attr,a=n.$attr;fe(n,function(e,t){"$"!==t.charAt(0)&&(r[t]&&r[t]!==e&&(e+=("style"===t?";":" ")+r[t]),n.$set(t,e,!0,i[t]))}),fe(r,function(e,t){n.hasOwnProperty(t)||"$"===t.charAt(0)||(n[t]=e,"class"!==t&&"style"!==t&&(a[t]=i[t]))})}function ne(d,h,p,m,g,_,b,v){var y,w,C=[],A=h[0],S=d.shift(),T=he(S,{templateUrl:null,transclude:null,replace:null,$$originalDirective:S}),x=we(S.templateUrl)?S.templateUrl(h,p):S.templateUrl,k=S.templateNamespace;return h.empty(),e(x).then(function(e){var n,t,r,i;if(e=V(e),S.replace){if(r=rt(e)?[]:hn(ie(k,Se(e))),n=r[0],1!==r.length||n.nodeType!==Re)throw on("tplrt","Template for directive '{0}' must have exactly one root element. {1}",S.name,x);t={$attr:{}},ae(m,h,n);var a=K(n,[],t);be(S.scope)&&ee(a,!0),d=a.concat(d),te(p,t)}else n=A,h.html(e);for(d.unshift(T),y=$(d,n,p,g,h,S,_,b,v),fe(m,function(e,t){e===n&&(m[t]=h[0])}),w=P(h[0].childNodes,g);C.length;){var o=C.shift(),s=C.shift(),c=C.shift(),l=C.shift(),u=h[0];if(!o.$$destroyed){if(s!==A){var f=s.className;v.hasElementTranscludeDirective&&S.replace||(u=lt(n)),ae(c,ue(s),u),E(ue(u),f)}i=y.transcludeOnThisElement?M(o,y.transclude,l):l,y(w,o,u,m,i)}}C=null}),function(e,t,n,r,i){var a=i;t.$$destroyed||(C?C.push(t,n,r,a):(y.transcludeOnThisElement&&(a=M(t,y.transclude,i)),y(w,t,n,r,a)))}}function N(e,t){var n=t.priority-e.priority;return 0!==n?n:e.name!==t.name?e.name<t.name?-1:1:e.index-t.index}function re(e,t,n,r){function i(e){return e?" (module: "+e+")":""}if(t)throw on("multidir","Multiple directives [{0}{1}, {2}{3}] asking for {4} on: {5}",t.name,i(t.$$moduleName),n.name,i(n.$$moduleName),e,Ie(r))}function ie(e,t){switch(e=S(e||"html")){case"svg":case"math":var n=j.document.createElement("div");return n.innerHTML="<"+e+">"+t+"</"+e+">",n.childNodes[0].childNodes;default:return t}}function L(e,t,a,o,n){var s=function(e,t){if("srcdoc"===t)return i.HTML;var n=Te(e);if("src"===t||"ngSrc"===t){if(-1===["img","video","audio","source","track"].indexOf(n))return i.RESOURCE_URL}else if("xlinkHref"===t||"form"===n&&"action"===t)return i.RESOURCE_URL}(e,o),r=!n,c=u[o]||n,l=T(a,r,s,c);if(l){if("multiple"===o&&"select"===Te(e))throw on("selmulti","Binding to the 'multiple' attribute is not supported. Element: {0}",Ie(e));t.push({priority:100,compile:function(){return{pre:function(e,t,n){var r=n.$$observers||(n.$$observers=Oe());if(f.test(o))throw on("nodomevents","Interpolations for HTML DOM event attributes are disallowed.  Please use the ng- versions (such as ng-click instead of onclick) instead.");var i=n[o];i!==a&&(l=i&&T(i,!0,s,c),a=i),l&&(n[o]=l(e),(r[o]||(r[o]=[])).$$inter=!0,(n.$$observers&&n.$$observers[o].$$scope||e).$watch(l,function(e,t){"class"===o&&e!==t?n.$updateClass(e,t):n.$set(o,e)}))}}}})}}function ae(e,t,n){var r,i,a=t[0],o=t.length,s=a.parentNode;if(e)for(r=0,i=e.length;r<i;r++)if(e[r]===a){e[r++]=n;for(var c=r,l=c+o-1,u=e.length;c<u;c++,l++)l<u?e[c]=e[l]:delete e[c];e.length-=o-1,e.context===a&&(e.context=n);break}s&&s.replaceChild(n,a);var f=j.document.createDocumentFragment();for(r=0;r<o;r++)f.appendChild(t[r]);for(ue.hasData(a)&&(ue.data(n,ue.data(a)),ue(a).off("$destroy")),ue.cleanData(f.querySelectorAll("*")),r=1;r<o;r++)delete t[r];t[0]=n,t.length=1}function oe(e,t){return de(function(){return e.apply(null,arguments)},e,t)}function se(e,t,n,r,i,a){try{e(t,n,r,i,a)}catch(e){W(e,Ie(n))}}function ce(d,h,p,e,m){var r,g=[],_={};function b(e,t,n){!we(p.$onChanges)||t===n||t!=t&&n!=n||(s||(d.$$postDigest(c),s=[]),r||(r={},s.push(i)),r[e]&&(n=r[e].previousValue),r[e]=new ln(n,t))}function i(){p.$onChanges(r),r=void 0}return fe(e,function(e,n){var t,r,i,a,o,s=e.attrName,c=e.optional;switch(e.mode){case"@":c||B.call(h,s)||(p[n]=h[s]=void 0),o=h.$observe(s,function(e){if(ve(e)||Ae(e)){var t=p[n];b(n,e,t),p[n]=e}}),h.$$observers[s].$$scope=d,ve(t=h[s])?p[n]=T(t)(d):Ae(t)&&(p[n]=t),_[n]=new ln(sn,p[n]),g.push(o);break;case"=":if(!B.call(h,s)){if(c)break;h[s]=void 0}if(c&&!h[s])break;r=v(h[s]),a=r.literal?ke:function(e,t){return e===t||e!=e&&t!=t},i=r.assign||function(){throw t=p[n]=r(d),on("nonassign","Expression '{0}' in attribute '{1}' used with directive '{2}' is non-assignable!",h[s],s,m.name)},t=p[n]=r(d);var l=function(e){return a(e,p[n])||(a(e,t)?i(d,e=p[n]):p[n]=e),t=e};l.$stateful=!0,o=e.collection?d.$watchCollection(h[s],l):d.$watch(v(h[s],l),null,r.literal),g.push(o);break;case"<":if(!B.call(h,s)){if(c)break;h[s]=void 0}if(c&&!h[s])break;var u=(r=v(h[s])).literal,f=p[n]=r(d);_[n]=new ln(sn,p[n]),o=d.$watch(r,function(e,t){if(t===e){if(t===f||u&&ke(t,f))return;t=f}b(n,e,t),p[n]=e},u),g.push(o);break;case"&":if((r=h.hasOwnProperty(s)?v(h[s]):pe)===pe&&c)break;p[n]=function(e){return r(d,e)}}}),{initialChanges:_,removeWatches:g.length&&function(){for(var e=0,t=g.length;e<t;++e)g[e]()}}}}]}function ln(e,t){this.previousValue=e,this.currentValue=t}cn.$inject=["$provide","$$sanitizeUriProvider"],ln.prototype.isFirstChange=function(){return this.previousValue===sn};var un=/^((?:x|data)[:\-_])/i;function fn(e){return Xe(e.replace(un,""))}function dn(e,t){var n="",r=e.split(/\s+/),i=t.split(/\s+/);e:for(var a=0;a<r.length;a++){for(var o=r[a],s=0;s<i.length;s++)if(o===i[s])continue e;n+=(0<n.length?" ":"")+o}return n}function hn(e){var t=(e=ue(e)).length;if(t<=1)return e;for(;t--;){var n=e[t];(n.nodeType===Le||n.nodeType===Ne&&""===n.nodeValue.trim())&&r.call(e,t,1)}return e}var pn=w("$controller"),mn=/^(\S+)(\s+as\s+([\w$]+))?$/;function gn(){var d={},h=!1;this.has=function(e){return d.hasOwnProperty(e)},this.register=function(e,t){ce(e,"controller"),be(e)?de(d,e):d[e]=t},this.allowGlobals=function(){h=!0},this.$get=["$injector","$window",function(l,u){return function(t,n,e,r){var i,a,o,s;if(e=!0===e,r&&ve(r)&&(s=r),ve(t)){if(!(a=t.match(mn)))throw pn("ctrlfmt","Badly formed controller string '{0}'. Must match `__name__ as __id__` or `__name__`.",t);if(o=a[1],s=s||a[3],!(t=d.hasOwnProperty(o)?d[o]:le(n.$scope,o,!0)||(h?le(u,o,!0):void 0)))throw pn("ctrlreg","The controller with the name '{0}' is not registered.",o);se(t,o,!0)}if(e){var c=(ye(t)?t[t.length-1]:t).prototype;return i=Object.create(c||null),s&&f(n,s,i,o||t.name),de(function(){var e=l.invoke(t,i,n,o);return e!==i&&(be(e)||we(e))&&(i=e,s&&f(n,s,i,o||t.name)),i},{instance:i,identifier:s})}return i=l.instantiate(t,n,o),s&&f(n,s,i,o||t.name),i};function f(e,t,n,r){if(!e||!be(e.$scope))throw w("$controller")("noscp","Cannot export controller '{0}' as '{1}'! No $scope object provided via `locals`.",r,t);e.$scope[t]=n}}]}function _n(){this.$get=["$window",function(e){return ue(e.document)}]}function bn(){this.$get=["$log",function(n){return function(e,t){n.error.apply(n,arguments)}}]}var vn=function(){this.$get=["$document",function(t){return function(e){return e?!e.nodeType&&e instanceof ue&&(e=e[0]):e=t[0].body,e.offsetWidth+1}}]},yn="application/json",wn={"Content-Type":yn+";charset=utf-8"},Cn=/^\[|^\{(?!\{)/,An={"[":/]$/,"{":/}$/},Sn=/^\)]\}',?\n/,Tn=w("$http"),xn=function(e){return function(){throw Tn("legacy","The method `{0}` on the promise returned from `$http` has been disabled.",e)}};function kn(e){return be(e)?A(e)?e.toISOString():G(e):e}function En(){this.$get=function(){return function(e){if(!e)return"";var n=[];return d(e,function(e,t){null===e||ge(e)||(ye(e)?fe(e,function(e){n.push(Z(t)+"="+Z(kn(e)))}):n.push(Z(t)+"="+Z(kn(e))))}),n.join("&")}}}function Dn(){this.$get=function(){return function(e){if(!e)return"";var t=[];return function n(e,r,i){if(null===e||ge(e))return;ye(e)?fe(e,function(e,t){n(e,r+"["+(be(e)?t:"")+"]")}):be(e)&&!A(e)?d(e,function(e,t){n(e,r+(i?"":"[")+t+(i?"":"]"))}):t.push(Z(r)+"="+Z(kn(e)))}(e,"",!0),t.join("&")}}}function In(e,t){if(ve(e)){var n=e.replace(Sn,"").trim();if(n){var r=t("Content-Type");(r&&0===r.indexOf(yn)||(a=(i=n).match(Cn))&&An[a[0]].test(i))&&(e=W(n))}}var i,a;return e}function Pn(e){var t,n=Oe();function r(e,t){e&&(n[e]=n[e]?n[e]+", "+t:t)}return ve(e)?fe(e.split("\n"),function(e){t=e.indexOf(":"),r(S(Se(e.substr(0,t))),Se(e.substr(t+1)))}):be(e)&&fe(e,function(e,t){r(S(t),Se(e))}),n}function Mn(n){var r;return function(e){if(r||(r=Pn(n)),e){var t=r[S(e)];return void 0===t&&(t=null),t}return r}}function $n(t,n,r,e){return we(e)?e(t,n,r):(fe(e,function(e){t=e(t,n,r)}),t)}function On(e){return 200<=e&&e<300}function Rn(){var v=this.defaults={transformResponse:[In],transformRequest:[function(e){return be(e)&&(r=e,"[object File]"!==H.call(r))&&(n=e,"[object Blob]"!==H.call(n))&&(t=e,"[object FormData]"!==H.call(t))?G(e):e;var t,n,r}],headers:{common:{Accept:"application/json, text/plain, */*"},post:je(wn),put:je(wn),patch:je(wn)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer"},y=!1;this.useApplyAsync=function(e){return _e(e)?(y=!!e,this):y};var l=!0;this.useLegacyPromiseExtensions=function(e){return _e(e)?(l=!!e,this):l};var t=this.interceptors=[];this.$get=["$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector",function(h,p,e,m,g,s){var _=e("$http");v.paramSerializer=ve(v.paramSerializer)?s.get(v.paramSerializer):v.paramSerializer;var c=[];function b(e){if(!be(e))throw w("$http")("badreq","Http request configuration must be an object.  Received: {0}",e);if(!ve(e.url))throw w("$http")("badreq","Http request configuration url must be a string.  Received: {0}",e.url);var n=de({method:"get",transformRequest:v.transformRequest,transformResponse:v.transformResponse,paramSerializer:v.paramSerializer},e);n.headers=function(e){var t,n,r,i=v.headers,a=de({},e.headers);i=de({},i.common,i[S(e.method)]);e:for(t in i){for(r in n=S(t),a)if(S(r)===n)continue e;a[t]=i[t]}return o=a,s=je(e),l={},fe(o,function(e,t){we(e)?null!=(c=e(s))&&(l[t]=c):l[t]=e}),l;var o,s,c,l}(e),n.method=u(n.method),n.paramSerializer=ve(n.paramSerializer)?s.get(n.paramSerializer):n.paramSerializer;var t=[],r=[],i=g.when(n);return fe(c,function(e){(e.request||e.requestError)&&t.unshift(e.request,e.requestError),(e.response||e.responseError)&&r.push(e.response,e.responseError)}),i=a(i=(i=a(i,t)).then(function(e){var n=e.headers,t=$n(e.data,Mn(n),void 0,e.transformRequest);ge(t)&&fe(n,function(e,t){"content-type"===S(t)&&delete n[t]});ge(e.withCredentials)&&!ge(v.withCredentials)&&(e.withCredentials=v.withCredentials);return function(i,e){var a,t,o=g.defer(),n=o.promise,r=i.headers,s=function(e,t){0<t.length&&(e+=(-1===e.indexOf("?")?"?":"&")+t);return e}(i.url,i.paramSerializer(i.params));b.pendingRequests.push(i),n.then(d,d),!i.cache&&!v.cache||!1===i.cache||"GET"!==i.method&&"JSONP"!==i.method||(a=be(i.cache)?i.cache:be(v.cache)?v.cache:_);a&&(_e(t=a.get(s))?I(t)?t.then(f,f):ye(t)?u(t[1],t[0],je(t[2]),t[3]):u(t,200,{},"OK"):a.put(s,n));if(ge(t)){var c=di(i.url)?p()[i.xsrfCookieName||v.xsrfCookieName]:void 0;c&&(r[i.xsrfHeaderName||v.xsrfHeaderName]=c),h(i.method,s,e,function(e,t,n,r){a&&(On(e)?a.put(s,[e,t,Pn(n),r]):a.remove(s));function i(){u(t,e,n,r)}y?m.$applyAsync(i):(i(),m.$$phase||m.$apply())},r,i.timeout,i.withCredentials,i.responseType,l(i.eventHandlers),l(i.uploadEventHandlers))}return n;function l(e){if(e){var t={};return fe(e,function(n,e){t[e]=function(e){function t(){n(e)}y?m.$applyAsync(t):m.$$phase?t():m.$apply(t)}}),t}}function u(e,t,n,r){(On(t=-1<=t?t:0)?o.resolve:o.reject)({data:e,status:t,headers:Mn(n),config:i,statusText:r})}function f(e){u(e.data,e.status,je(e.headers()),e.statusText)}function d(){var e=b.pendingRequests.indexOf(i);-1!==e&&b.pendingRequests.splice(e,1)}}(e,t).then(o,o)}),r),l?(i.success=function(t){return se(t,"fn"),i.then(function(e){t(e.data,e.status,e.headers,n)}),i},i.error=function(t){return se(t,"fn"),i.then(null,function(e){t(e.data,e.status,e.headers,n)}),i}):(i.success=xn("success"),i.error=xn("error")),i;function a(e,t){for(var n=0,r=t.length;n<r;){var i=t[n++],a=t[n++];e=e.then(i,a)}return t.length=0,e}function o(e){var t=de({},e);return t.data=$n(e.data,e.headers,e.status,n.transformResponse),On(e.status)?t:g.reject(t)}}return fe(t,function(e){c.unshift(ve(e)?s.get(e):s.invoke(e))}),b.pendingRequests=[],function(e){fe(arguments,function(n){b[n]=function(e,t){return b(de({},t||{},{method:n,url:e}))}})}("get","delete","head","jsonp"),function(e){fe(arguments,function(r){b[r]=function(e,t,n){return b(de({},n||{},{method:r,url:e,data:t}))}})}("post","put","patch"),b.defaults=v,b}]}function Nn(){this.$get=function(){return function(){return new j.XMLHttpRequest}}}function Ln(){this.$get=["$browser","$jsonpCallbacks","$document","$xhrFactory",function(e,t,n,r){return b=r,v=(_=e).defer,y=t,w=n[0],function(e,r,t,i,n,a,o,s,c,l){if(_.$$incOutstandingRequestCount(),r=r||_.url(),"jsonp"===S(e))var u=y.createCallback(r),f=function(e,r,i){e=e.replace("JSON_CALLBACK",r);var a=w.createElement("script"),o=null;return a.type="text/javascript",a.src=e,a.async=!0,o=function(e){ze(a,"load",o),ze(a,"error",o),w.body.removeChild(a),a=null;var t=-1,n="unknown";e&&("load"!==e.type||y.wasCalled(r)||(e={type:"error"}),n=e.type,t="error"===e.type?404:200),i&&i(t,n)},qe(a,"load",o),qe(a,"error",o),w.body.appendChild(a),o}(r,u,function(e,t){var n=200===e&&y.getResponse(u);g(i,e,n,"",t),y.removeCallback(u)});else{var d=b(e,r);d.open(e,r,!0),fe(n,function(e,t){_e(e)&&d.setRequestHeader(t,e)}),d.onload=function(){var e=d.statusText||"",t="response"in d?d.response:d.responseText,n=1223===d.status?204:d.status;0===n&&(n=t?200:"file"===fi(r).protocol?404:0),g(i,n,t,d.getAllResponseHeaders(),e)};var h=function(){g(i,-1,null,null,"")};if(d.onerror=h,d.onabort=h,d.ontimeout=h,fe(c,function(e,t){d.addEventListener(t,e)}),fe(l,function(e,t){d.upload.addEventListener(t,e)}),o&&(d.withCredentials=!0),s)try{d.responseType=s}catch(e){if("json"!==s)throw e}d.send(ge(t)?null:t)}if(0<a)var p=v(m,a);else I(a)&&a.then(m);function m(){f&&f(),d&&d.abort()}function g(e,t,n,r,i){_e(p)&&v.cancel(p),f=d=null,e(t,n,r,i),_.$$completeOutstandingRequest(pe)}};var _,b,v,y,w}]}var Fn=v.$interpolateMinErr=w("$interpolate");function Gn(){var S="{{",T="}}";this.startSymbol=function(e){return e?(S=e,this):S},this.endSymbol=function(e){return e?(T=e,this):T},this.$get=["$parse","$exceptionHandler","$sce",function(_,b,v){var y=S.length,w=T.length,t=new RegExp(S.replace(/./g,e),"g"),n=new RegExp(T.replace(/./g,e),"g");function e(e){return"\\\\\\"+e}function C(e){return e.replace(t,S).replace(n,T)}function A(e,t,n,r){var i=e.$watch(function(e){return i(),r(e)},t,n);return i}function r(i,e,t,r){if(!i.length||-1===i.indexOf(S)){var n;if(!e)(n=x(C(i))).exp=i,n.expressions=[],n.$$watchDelegate=A;return n}r=!!r;for(var a,o,s,c=0,l=[],u=[],f=i.length,d=[],h=[];c<f;){if(-1===(a=i.indexOf(S,c))||-1===(o=i.indexOf(T,a+y))){c!==f&&d.push(C(i.substring(c)));break}c!==a&&d.push(C(i.substring(c,a))),s=i.substring(a+y,o),l.push(s),u.push(_(s,g)),c=o+w,h.push(d.length),d.push("")}if(t&&1<d.length&&Fn.throwNoconcat(i),!e||l.length){var p=function(e){for(var t=0,n=l.length;t<n;t++){if(r&&ge(e[t]))return;d[h[t]]=e[t]}return d.join("")},m=function(e){return t?v.getTrusted(t,e):v.valueOf(e)};return de(function(e){var t=0,n=l.length,r=new Array(n);try{for(;t<n;t++)r[t]=u[t](e);return p(r)}catch(e){b(Fn.interr(i,e))}},{exp:i,expressions:l,$$watchDelegate:function(r,i){var a;return r.$watchGroup(u,function(e,t){var n=p(e);we(i)&&i.call(this,n,e!==t?a:n,r),a=n})}})}function g(e){try{return e=m(e),r&&!_e(e)?e:function(e){if(null==e)return"";switch(typeof e){case"string":break;case"number":e=""+e;break;default:e=G(e)}return e}(e)}catch(e){b(Fn.interr(i,e))}}}return r.startSymbol=function(){return S},r.endSymbol=function(){return T},r}]}function jn(){this.$get=["$rootScope","$window","$q","$$q","$browser",function(h,p,m,g,_){var b={};function e(e,t,n,r){var i=4<arguments.length,a=i?Ee(arguments,4):[],o=p.setInterval,s=p.clearInterval,c=0,l=_e(r)&&!r,u=(l?g:m).defer(),f=u.promise;return n=_e(n)?n:0,f.$$intervalId=o(function(){l?_.defer(d):h.$evalAsync(d),u.notify(c++),0<n&&n<=c&&(u.resolve(c),s(f.$$intervalId),delete b[f.$$intervalId]),l||h.$apply()},t),b[f.$$intervalId]=u,f;function d(){i?e.apply(null,a):e(c)}}return e.cancel=function(e){return!!(e&&e.$$intervalId in b)&&(b[e.$$intervalId].reject("canceled"),p.clearInterval(e.$$intervalId),delete b[e.$$intervalId],!0)},e}]}Fn.throwNoconcat=function(e){throw Fn("noconcat","Error while interpolating: {0}\nStrict Contextual Escaping disallows interpolations that concatenate multiple expressions when a trusted value is required.  See http://docs.angularjs.org/api/ng.$sce",e)},Fn.interr=function(e,t){return Fn("interr","Can't interpolate: {0}\n{1}",e,t.toString())};var Bn=function(){this.$get=["$window",function(e){var a=e.angular.callbacks,o={};return{createCallback:function(e){var t,n="_"+(a.$$counter++).toString(36),r="angular.callbacks."+n,i=((t=function(e){t.data=e,t.called=!0}).id=n,t);return o[r]=a[n]=i,r},wasCalled:function(e){return o[e].called},getResponse:function(e){return o[e].data},removeCallback:function(e){var t=o[e];delete a[t.id],delete o[e]}}}]},Un=/^([^?#]*)(\?([^#]*))?(#(.*))?$/,Hn={http:80,https:443,ftp:21},Wn=w("$location");function qn(e){for(var t=e.split("/"),n=t.length;n--;)t[n]=X(t[n]);return t.join("/")}function zn(e,t){var n=fi(e);t.$$protocol=n.protocol,t.$$host=n.hostname,t.$$port=m(n.port)||Hn[n.protocol]||null}var Vn=/^\s*[\\/]{2,}/;function Yn(e,t){if(Vn.test(e))throw Wn("badpath",'Invalid url "{0}".',e);var n="/"!==e.charAt(0);n&&(e="/"+e);var r=fi(e);t.$$path=decodeURIComponent(n&&"/"===r.pathname.charAt(0)?r.pathname.substring(1):r.pathname),t.$$search=K(r.search),t.$$hash=decodeURIComponent(r.hash),t.$$path&&"/"!==t.$$path.charAt(0)&&(t.$$path="/"+t.$$path)}function Kn(e,t){return e.slice(0,t.length)===t}function Qn(e,t){if(Kn(t,e))return t.substr(e.length)}function Xn(e){var t=e.indexOf("#");return-1===t?e:e.substr(0,t)}function Zn(e){return e.replace(/(#.+)|#$/,"$1")}function Jn(a,o,s){this.$$html5=!0,s=s||"",zn(a,this),this.$$parse=function(e){var t=Qn(o,e);if(!ve(t))throw Wn("ipthprfx",'Invalid url "{0}", missing path prefix "{1}".',e,o);Yn(t,this),this.$$path||(this.$$path="/"),this.$$compose()},this.$$compose=function(){var e=Q(this.$$search),t=this.$$hash?"#"+X(this.$$hash):"";this.$$url=qn(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=o+this.$$url.substr(1)},this.$$parseLinkUrl=function(e,t){return t&&"#"===t[0]?(this.hash(t.slice(1)),!0):(_e(n=Qn(a,e))?(r=n,i=s&&_e(n=Qn(s,n))?o+(Qn("/",n)||n):a+r):_e(n=Qn(o,e))?i=o+n:o===e+"/"&&(i=o),i&&this.$$parse(i),!!i);var n,r,i}}function er(r,i,a){zn(r,this),this.$$parse=function(e){var t,n=Qn(r,e)||Qn(i,e);ge(n)||"#"!==n.charAt(0)?this.$$html5?t=n:(t="",ge(n)&&(r=e,this.replace())):ge(t=Qn(a,n))&&(t=n),Yn(t,this),this.$$path=function(e,t,n){var r,i=/^\/[A-Z]:(\/.*)/;Kn(t,n)&&(t=t.replace(n,""));if(i.exec(t))return e;return(r=i.exec(e))?r[1]:e}(this.$$path,t,r),this.$$compose()},this.$$compose=function(){var e=Q(this.$$search),t=this.$$hash?"#"+X(this.$$hash):"";this.$$url=qn(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=r+(this.$$url?a+this.$$url:"")},this.$$parseLinkUrl=function(e,t){return Xn(r)===Xn(e)&&(this.$$parse(e),!0)}}function tr(i,a,o){this.$$html5=!0,er.apply(this,arguments),this.$$parseLinkUrl=function(e,t){return t&&"#"===t[0]?(this.hash(t.slice(1)),!0):(i===Xn(e)?n=e:(r=Qn(a,e))?n=i+o+r:a===e+"/"&&(n=a),n&&this.$$parse(n),!!n);var n,r},this.$$compose=function(){var e=Q(this.$$search),t=this.$$hash?"#"+X(this.$$hash):"";this.$$url=qn(this.$$path)+(e?"?"+e:"")+t,this.$$absUrl=i+o+this.$$url}}var nr={$$absUrl:"",$$html5:!1,$$replace:!1,absUrl:rr("$$absUrl"),url:function(e){if(ge(e))return this.$$url;var t=Un.exec(e);return(t[1]||""===e)&&this.path(decodeURIComponent(t[1])),(t[2]||t[1]||""===e)&&this.search(t[3]||""),this.hash(t[5]||""),this},protocol:rr("$$protocol"),host:rr("$$host"),port:rr("$$port"),path:ir("$$path",function(e){return"/"===(e=null!==e?e.toString():"").charAt(0)?e:"/"+e}),search:function(n,e){switch(arguments.length){case 0:return this.$$search;case 1:if(ve(n)||C(n))n=n.toString(),this.$$search=K(n);else{if(!be(n))throw Wn("isrcharg","The first argument of the `$location#search()` call must be a string or an object.");fe(n=R(n,{}),function(e,t){null==e&&delete n[t]}),this.$$search=n}break;default:ge(e)||null===e?delete this.$$search[n]:this.$$search[n]=e}return this.$$compose(),this},hash:ir("$$hash",function(e){return null!==e?e.toString():""}),replace:function(){return this.$$replace=!0,this}};function rr(e){return function(){return this[e]}}function ir(t,n){return function(e){return ge(e)?this[t]:(this[t]=n(e),this.$$compose(),this)}}function ar(){var _="",b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(e){return _e(e)?(_=e,this):_},this.html5Mode=function(e){return Ae(e)?(b.enabled=e,this):be(e)?(Ae(e.enabled)&&(b.enabled=e.enabled),Ae(e.requireBase)&&(b.requireBase=e.requireBase),(Ae(e.rewriteLinks)||ve(e.rewriteLinks))&&(b.rewriteLinks=e.rewriteLinks),this):b},this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(o,s,t,a,c){var l,e,n,r,i=s.baseHref(),u=s.url();if(b.enabled){if(!i&&b.requireBase)throw Wn("nobase","$location in HTML5 mode requires a <base> tag to be present!");n=(r=u).substring(0,r.indexOf("/",r.indexOf("//")+2))+(i||"/"),e=t.history?Jn:tr}else n=Xn(u),e=er;var f,d=(f=n).substr(0,Xn(f).lastIndexOf("/")+1);(l=new e(n,d,"#"+_)).$$parseLinkUrl(u,u),l.$$state=s.state();var h=/^\s*(javascript|mailto):/i;function p(e,t,n){var r=l.url(),i=l.$$state;try{s.url(e,t,n),l.$$state=s.state()}catch(e){throw l.url(r),l.$$state=i,e}}a.on("click",function(e){var t=b.rewriteLinks;if(t&&!e.ctrlKey&&!e.metaKey&&!e.shiftKey&&2!==e.which&&2!==e.button){for(var n=ue(e.target);"a"!==Te(n[0]);)if(n[0]===a[0]||!(n=n.parent())[0])return;if(!ve(t)||!ge(n.attr(t))){var r=n.prop("href"),i=n.attr("href")||n.attr("xlink:href");be(r)&&"[object SVGAnimatedString]"===r.toString()&&(r=fi(r.animVal).href),h.test(r)||!r||n.attr("target")||e.isDefaultPrevented()||l.$$parseLinkUrl(r,i)&&(e.preventDefault(),l.absUrl()!==s.url()&&(o.$apply(),c.angular["ff-684208-preventDefault"]=!0))}}}),Zn(l.absUrl())!==Zn(u)&&s.url(l.absUrl(),!0);var m=!0;return s.onUrlChange(function(r,i){ge(Qn(d,r))?c.location.href=r:(o.$evalAsync(function(){var e,t=l.absUrl(),n=l.$$state;r=Zn(r),l.$$parse(r),l.$$state=i,e=o.$broadcast("$locationChangeStart",r,t,i,n).defaultPrevented,l.absUrl()===r&&(e?(l.$$parse(t),p(t,!1,l.$$state=n)):(m=!1,g(t,n)))}),o.$$phase||o.$digest())}),o.$watch(function(){var n=Zn(s.url()),e=Zn(l.absUrl()),r=s.state(),i=l.$$replace,a=n!==e||l.$$html5&&t.history&&r!==l.$$state;(m||a)&&(m=!1,o.$evalAsync(function(){var e=l.absUrl(),t=o.$broadcast("$locationChangeStart",e,n,l.$$state,r).defaultPrevented;l.absUrl()===e&&(t?(l.$$parse(n),l.$$state=r):(a&&p(e,i,r===l.$$state?null:l.$$state),g(n,r)))})),l.$$replace=!1}),l;function g(e,t){o.$broadcast("$locationChangeSuccess",l.absUrl(),e,l.$$state,t)}}]}function or(){var n=!0,r=this;this.debugEnabled=function(e){return _e(e)?(n=e,this):n},this.$get=["$window",function(i){return{log:t("log"),info:t("info"),warn:t("warn"),error:t("error"),debug:(e=t("debug"),function(){n&&e.apply(r,arguments)})};var e;function t(e){var t=i.console||{},r=t[e]||t.log||pe,n=!1;try{n=!!r.apply}catch(e){}return n?function(){var n=[];return fe(arguments,function(e){var t;n.push(((t=e)instanceof Error&&(t.stack?t=t.message&&-1===t.stack.indexOf(t.message)?"Error: "+t.message+"\n"+t.stack:t.stack:t.sourceURL&&(t=t.message+"\n"+t.sourceURL+":"+t.line)),t))}),r.apply(t,n)}:function(e,t){r(e,null==t?"":t)}}}]}fe([tr,er,Jn],function(t){t.prototype=Object.create(nr),t.prototype.state=function(e){if(!arguments.length)return this.$$state;if(t!==Jn||!this.$$html5)throw Wn("nostate","History API state support is available only in HTML5 mode and only in browsers supporting HTML5 History API");return this.$$state=ge(e)?null:e,this}});var sr=w("$parse"),cr=[].constructor,lr=(!1).constructor,ur=Function.constructor,fr=(0).constructor,dr={}.constructor,hr="".constructor,pr=cr.prototype,mr=lr.prototype,gr=ur.prototype,_r=fr.prototype,br=dr.prototype,vr=hr.prototype,yr=gr.call,wr=gr.apply,Cr=gr.bind,Ar=br.valueOf;function Sr(e,t){if("__defineGetter__"===e||"__defineSetter__"===e||"__lookupGetter__"===e||"__lookupSetter__"===e||"__proto__"===e)throw sr("isecfld","Attempting to access a disallowed field in Angular expressions! Expression: {0}",t);return e}function Tr(e){return e+""}function xr(e,t){if(e){if(e.constructor===e)throw sr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e.window===e)throw sr("isecwindow","Referencing the Window in Angular expressions is disallowed! Expression: {0}",t);if(e.children&&(e.nodeName||e.prop&&e.attr&&e.find))throw sr("isecdom","Referencing DOM nodes in Angular expressions is disallowed! Expression: {0}",t);if(e===Object)throw sr("isecobj","Referencing Object in Angular expressions is disallowed! Expression: {0}",t)}return e}function kr(e,t){if(e){if(e.constructor===e)throw sr("isecfn","Referencing Function in Angular expressions is disallowed! Expression: {0}",t);if(e===yr||e===wr||e===Cr)throw sr("isecff","Referencing call, apply or bind in Angular expressions is disallowed! Expression: {0}",t)}}function Er(e,t){if(e&&(e===cr||e===lr||e===ur||e===fr||e===dr||e===hr||e===pr||e===mr||e===gr||e===_r||e===br||e===vr))throw sr("isecaf","Assigning to a constructor or its prototype is disallowed! Expression: {0}",t)}var Dr=Oe();fe("+ - * / % === !== == != < > <= >= && || ! = |".split(" "),function(e){Dr[e]=!0});var Ir={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Pr=function(e){this.options=e};Pr.prototype={constructor:Pr,lex:function(e){for(this.text=e,this.index=0,this.tokens=[];this.index<this.text.length;){var t=this.text.charAt(this.index);if('"'===t||"'"===t)this.readString(t);else if(this.isNumber(t)||"."===t&&this.isNumber(this.peek()))this.readNumber();else if(this.isIdentifierStart(this.peekMultichar()))this.readIdent();else if(this.is(t,"(){}[].,;:?"))this.tokens.push({index:this.index,text:t}),this.index++;else if(this.isWhitespace(t))this.index++;else{var n=t+this.peek(),r=n+this.peek(2),i=Dr[t],a=Dr[n],o=Dr[r];if(i||a||o){var s=o?r:a?n:t;this.tokens.push({index:this.index,text:s,operator:!0}),this.index+=s.length}else this.throwError("Unexpected next character ",this.index,this.index+1)}}return this.tokens},is:function(e,t){return-1!==t.indexOf(e)},peek:function(e){var t=e||1;return this.index+t<this.text.length&&this.text.charAt(this.index+t)},isNumber:function(e){return"0"<=e&&e<="9"&&"string"==typeof e},isWhitespace:function(e){return" "===e||"\r"===e||"\t"===e||"\n"===e||"\v"===e||" "===e},isIdentifierStart:function(e){return this.options.isIdentifierStart?this.options.isIdentifierStart(e,this.codePointAt(e)):this.isValidIdentifierStart(e)},isValidIdentifierStart:function(e){return"a"<=e&&e<="z"||"A"<=e&&e<="Z"||"_"===e||"$"===e},isIdentifierContinue:function(e){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(e,this.codePointAt(e)):this.isValidIdentifierContinue(e)},isValidIdentifierContinue:function(e,t){return this.isValidIdentifierStart(e,t)||this.isNumber(e)},codePointAt:function(e){return 1===e.length?e.charCodeAt(0):(e.charCodeAt(0)<<10)+e.charCodeAt(1)-56613888},peekMultichar:function(){var e=this.text.charAt(this.index),t=this.peek();if(!t)return e;var n=e.charCodeAt(0),r=t.charCodeAt(0);return 55296<=n&&n<=56319&&56320<=r&&r<=57343?e+t:e},isExpOperator:function(e){return"-"===e||"+"===e||this.isNumber(e)},throwError:function(e,t,n){n=n||this.index;var r=_e(t)?"s "+t+"-"+this.index+" ["+this.text.substring(t,n)+"]":" "+n;throw sr("lexerr","Lexer Error: {0} at column{1} in expression [{2}].",e,r,this.text)},readNumber:function(){for(var e="",t=this.index;this.index<this.text.length;){var n=S(this.text.charAt(this.index));if("."===n||this.isNumber(n))e+=n;else{var r=this.peek();if("e"===n&&this.isExpOperator(r))e+=n;else if(this.isExpOperator(n)&&r&&this.isNumber(r)&&"e"===e.charAt(e.length-1))e+=n;else{if(!this.isExpOperator(n)||r&&this.isNumber(r)||"e"!==e.charAt(e.length-1))break;this.throwError("Invalid exponent")}}this.index++}this.tokens.push({index:t,text:e,constant:!0,value:Number(e)})},readIdent:function(){var e=this.index;for(this.index+=this.peekMultichar().length;this.index<this.text.length;){var t=this.peekMultichar();if(!this.isIdentifierContinue(t))break;this.index+=t.length}this.tokens.push({index:e,text:this.text.slice(e,this.index),identifier:!0})},readString:function(e){var t=this.index;this.index++;for(var n="",r=e,i=!1;this.index<this.text.length;){var a=this.text.charAt(this.index);if(r+=a,i){if("u"===a){var o=this.text.substring(this.index+1,this.index+5);o.match(/[\da-f]{4}/i)||this.throwError("Invalid unicode escape [\\u"+o+"]"),this.index+=4,n+=String.fromCharCode(parseInt(o,16))}else{n+=Ir[a]||a}i=!1}else if("\\"===a)i=!0;else{if(a===e)return this.index++,void this.tokens.push({index:t,text:r,constant:!0,value:n});n+=a}this.index++}this.throwError("Unterminated quote",t)}};var Mr=function(e,t){this.lexer=e,this.options=t};function $r(e,t){return void 0!==e?e:t}function Or(e,t){return void 0===e?t:void 0===t?e:e+t}function Rr(e,t){var n,r,i,a,o;switch(e.type){case Mr.Program:n=!0,fe(e.body,function(e){Rr(e.expression,t),n=n&&e.expression.constant}),e.constant=n;break;case Mr.Literal:e.constant=!0,e.toWatch=[];break;case Mr.UnaryExpression:Rr(e.argument,t),e.constant=e.argument.constant,e.toWatch=e.argument.toWatch;break;case Mr.BinaryExpression:Rr(e.left,t),Rr(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.left.toWatch.concat(e.right.toWatch);break;case Mr.LogicalExpression:Rr(e.left,t),Rr(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=e.constant?[]:[e];break;case Mr.ConditionalExpression:Rr(e.test,t),Rr(e.alternate,t),Rr(e.consequent,t),e.constant=e.test.constant&&e.alternate.constant&&e.consequent.constant,e.toWatch=e.constant?[]:[e];break;case Mr.Identifier:e.constant=!1,e.toWatch=[e];break;case Mr.MemberExpression:Rr(e.object,t),e.computed&&Rr(e.property,t),e.constant=e.object.constant&&(!e.computed||e.property.constant),e.toWatch=[e];break;case Mr.CallExpression:i=!!e.filter&&(a=t,o=e.callee.name,!a(o).$stateful),n=i,r=[],fe(e.arguments,function(e){Rr(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=i?r:[e];break;case Mr.AssignmentExpression:Rr(e.left,t),Rr(e.right,t),e.constant=e.left.constant&&e.right.constant,e.toWatch=[e];break;case Mr.ArrayExpression:n=!0,r=[],fe(e.elements,function(e){Rr(e,t),n=n&&e.constant,e.constant||r.push.apply(r,e.toWatch)}),e.constant=n,e.toWatch=r;break;case Mr.ObjectExpression:n=!0,r=[],fe(e.properties,function(e){Rr(e.value,t),n=n&&e.value.constant&&!e.computed,e.value.constant||r.push.apply(r,e.value.toWatch)}),e.constant=n,e.toWatch=r;break;case Mr.ThisExpression:case Mr.LocalsExpression:e.constant=!1,e.toWatch=[]}}function Nr(e){if(1===e.length){var t=e[0].expression,n=t.toWatch;return 1!==n.length?n:n[0]!==t?n:void 0}}function Lr(e){return e.type===Mr.Identifier||e.type===Mr.MemberExpression}function Fr(e){if(1===e.body.length&&Lr(e.body[0].expression))return{type:Mr.AssignmentExpression,left:e.body[0].expression,right:{type:Mr.NGValueParameter},operator:"="}}function Gr(e){return 0===e.body.length||1===e.body.length&&(e.body[0].expression.type===Mr.Literal||e.body[0].expression.type===Mr.ArrayExpression||e.body[0].expression.type===Mr.ObjectExpression)}function jr(e){return e.constant}function Br(e,t){this.astBuilder=e,this.$filter=t}function Ur(e,t){this.astBuilder=e,this.$filter=t}Mr.Program="Program",Mr.ExpressionStatement="ExpressionStatement",Mr.AssignmentExpression="AssignmentExpression",Mr.ConditionalExpression="ConditionalExpression",Mr.LogicalExpression="LogicalExpression",Mr.BinaryExpression="BinaryExpression",Mr.UnaryExpression="UnaryExpression",Mr.CallExpression="CallExpression",Mr.MemberExpression="MemberExpression",Mr.Identifier="Identifier",Mr.Literal="Literal",Mr.ArrayExpression="ArrayExpression",Mr.Property="Property",Mr.ObjectExpression="ObjectExpression",Mr.ThisExpression="ThisExpression",Mr.LocalsExpression="LocalsExpression",Mr.NGValueParameter="NGValueParameter",Mr.prototype={ast:function(e){this.text=e,this.tokens=this.lexer.lex(e);var t=this.program();return 0!==this.tokens.length&&this.throwError("is an unexpected token",this.tokens[0]),t},program:function(){for(var e=[];;)if(0<this.tokens.length&&!this.peek("}",")",";","]")&&e.push(this.expressionStatement()),!this.expect(";"))return{type:Mr.Program,body:e}},expressionStatement:function(){return{type:Mr.ExpressionStatement,expression:this.filterChain()}},filterChain:function(){for(var e=this.expression();this.expect("|");)e=this.filter(e);return e},expression:function(){return this.assignment()},assignment:function(){var e=this.ternary();if(this.expect("=")){if(!Lr(e))throw sr("lval","Trying to assign a value to a non l-value");e={type:Mr.AssignmentExpression,left:e,right:this.assignment(),operator:"="}}return e},ternary:function(){var e,t,n=this.logicalOR();return this.expect("?")&&(e=this.expression(),this.consume(":"))?(t=this.expression(),{type:Mr.ConditionalExpression,test:n,alternate:e,consequent:t}):n},logicalOR:function(){for(var e=this.logicalAND();this.expect("||");)e={type:Mr.LogicalExpression,operator:"||",left:e,right:this.logicalAND()};return e},logicalAND:function(){for(var e=this.equality();this.expect("&&");)e={type:Mr.LogicalExpression,operator:"&&",left:e,right:this.equality()};return e},equality:function(){for(var e,t=this.relational();e=this.expect("==","!=","===","!==");)t={type:Mr.BinaryExpression,operator:e.text,left:t,right:this.relational()};return t},relational:function(){for(var e,t=this.additive();e=this.expect("<",">","<=",">=");)t={type:Mr.BinaryExpression,operator:e.text,left:t,right:this.additive()};return t},additive:function(){for(var e,t=this.multiplicative();e=this.expect("+","-");)t={type:Mr.BinaryExpression,operator:e.text,left:t,right:this.multiplicative()};return t},multiplicative:function(){for(var e,t=this.unary();e=this.expect("*","/","%");)t={type:Mr.BinaryExpression,operator:e.text,left:t,right:this.unary()};return t},unary:function(){var e;return(e=this.expect("+","-","!"))?{type:Mr.UnaryExpression,operator:e.text,prefix:!0,argument:this.unary()}:this.primary()},primary:function(){var e,t;for(this.expect("(")?(e=this.filterChain(),this.consume(")")):this.expect("[")?e=this.arrayDeclaration():this.expect("{")?e=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?e=R(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?e={type:Mr.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?e=this.identifier():this.peek().constant?e=this.constant():this.throwError("not a primary expression",this.peek());t=this.expect("(","[",".");)"("===t.text?(e={type:Mr.CallExpression,callee:e,arguments:this.parseArguments()},this.consume(")")):"["===t.text?(e={type:Mr.MemberExpression,object:e,property:this.expression(),computed:!0},this.consume("]")):"."===t.text?e={type:Mr.MemberExpression,object:e,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return e},filter:function(e){for(var t=[e],n={type:Mr.CallExpression,callee:this.identifier(),arguments:t,filter:!0};this.expect(":");)t.push(this.expression());return n},parseArguments:function(){var e=[];if(")"!==this.peekToken().text)for(;e.push(this.filterChain()),this.expect(","););return e},identifier:function(){var e=this.consume();return e.identifier||this.throwError("is not a valid identifier",e),{type:Mr.Identifier,name:e.text}},constant:function(){return{type:Mr.Literal,value:this.consume().value}},arrayDeclaration:function(){var e=[];if("]"!==this.peekToken().text)do{if(this.peek("]"))break;e.push(this.expression())}while(this.expect(","));return this.consume("]"),{type:Mr.ArrayExpression,elements:e}},object:function(){var e,t=[];if("}"!==this.peekToken().text)do{if(this.peek("}"))break;e={type:Mr.Property,kind:"init"},this.peek().constant?(e.key=this.constant(),e.computed=!1,this.consume(":"),e.value=this.expression()):this.peek().identifier?(e.key=this.identifier(),e.computed=!1,this.peek(":")?(this.consume(":"),e.value=this.expression()):e.value=e.key):this.peek("[")?(this.consume("["),e.key=this.expression(),this.consume("]"),e.computed=!0,this.consume(":"),e.value=this.expression()):this.throwError("invalid key",this.peek()),t.push(e)}while(this.expect(","));return this.consume("}"),{type:Mr.ObjectExpression,properties:t}},throwError:function(e,t){throw sr("syntax","Syntax Error: Token '{0}' {1} at column {2} of the expression [{3}] starting at [{4}].",t.text,e,t.index+1,this.text,this.text.substring(t.index))},consume:function(e){if(0===this.tokens.length)throw sr("ueoe","Unexpected end of expression: {0}",this.text);var t=this.expect(e);return t||this.throwError("is unexpected, expecting ["+e+"]",this.peek()),t},peekToken:function(){if(0===this.tokens.length)throw sr("ueoe","Unexpected end of expression: {0}",this.text);return this.tokens[0]},peek:function(e,t,n,r){return this.peekAhead(0,e,t,n,r)},peekAhead:function(e,t,n,r,i){if(this.tokens.length>e){var a=this.tokens[e],o=a.text;if(o===t||o===n||o===r||o===i||!t&&!n&&!r&&!i)return a}return!1},expect:function(e,t,n,r){var i=this.peek(e,t,n,r);return!!i&&(this.tokens.shift(),i)},selfReferential:{this:{type:Mr.ThisExpression},$locals:{type:Mr.LocalsExpression}}},Br.prototype={compile:function(e,t){var i=this,n=this.astBuilder.ast(e);this.state={nextId:0,filters:{},expensiveChecks:t,fn:{vars:[],body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]},Rr(n,i.$filter);var r,a="";if(this.stage="assign",r=Fr(n)){this.state.computing="assign";var o=this.nextId();this.recurse(r,o),this.return_(o),a="fn.assign="+this.generateFunction("assign","s,v,l")}var s=Nr(n.body);i.stage="inputs",fe(s,function(e,t){var n="fn"+t;i.state[n]={vars:[],body:[],own:{}},i.state.computing=n;var r=i.nextId();i.recurse(e,r),i.return_(r),i.state.inputs.push(n),e.watchId=t}),this.state.computing="fn",this.stage="main",this.recurse(n);var c='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+a+this.watchFns()+"return fn;",l=new Function("$filter","ensureSafeMemberName","ensureSafeObject","ensureSafeFunction","getStringValue","ensureSafeAssignContext","ifDefined","plus","text",c)(this.$filter,Sr,xr,kr,Tr,Er,$r,Or,e);return this.state=this.stage=void 0,l.literal=Gr(n),l.constant=jr(n),l},USE:"use",STRICT:"strict",watchFns:function(){var t=[],e=this.state.inputs,n=this;return fe(e,function(e){t.push("var "+e+"="+n.generateFunction(e,"s"))}),e.length&&t.push("fn.inputs=["+e.join(",")+"];"),t.join("")},generateFunction:function(e,t){return"function("+t+"){"+this.varsPrefix(e)+this.body(e)+"};"},filterPrefix:function(){var n=[],r=this;return fe(this.state.filters,function(e,t){n.push(e+"=$filter("+r.escape(t)+")")}),n.length?"var "+n.join(",")+";":""},varsPrefix:function(e){return this.state[e].vars.length?"var "+this.state[e].vars.join(",")+";":""},body:function(e){return this.state[e].body.join("")},recurse:function(n,t,e,r,i,a){var o,s,c,l,u,f=this;if(r=r||pe,!a&&_e(n.watchId))return t=t||this.nextId(),void this.if_("i",this.lazyAssign(t,this.computedMember("i",n.watchId)),this.lazyRecurse(n,t,e,r,i,!0));switch(n.type){case Mr.Program:fe(n.body,function(e,t){f.recurse(e.expression,void 0,void 0,function(e){s=e}),t!==n.body.length-1?f.current().body.push(s,";"):f.return_(s)});break;case Mr.Literal:l=this.escape(n.value),this.assign(t,l),r(l);break;case Mr.UnaryExpression:this.recurse(n.argument,void 0,void 0,function(e){s=e}),l=n.operator+"("+this.ifDefined(s,0)+")",this.assign(t,l),r(l);break;case Mr.BinaryExpression:this.recurse(n.left,void 0,void 0,function(e){o=e}),this.recurse(n.right,void 0,void 0,function(e){s=e}),l="+"===n.operator?this.plus(o,s):"-"===n.operator?this.ifDefined(o,0)+n.operator+this.ifDefined(s,0):"("+o+")"+n.operator+"("+s+")",this.assign(t,l),r(l);break;case Mr.LogicalExpression:t=t||this.nextId(),f.recurse(n.left,t),f.if_("&&"===n.operator?t:f.not(t),f.lazyRecurse(n.right,t)),r(t);break;case Mr.ConditionalExpression:t=t||this.nextId(),f.recurse(n.test,t),f.if_(t,f.lazyRecurse(n.alternate,t),f.lazyRecurse(n.consequent,t)),r(t);break;case Mr.Identifier:t=t||this.nextId(),e&&(e.context="inputs"===f.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",n.name)+"?l:s"),e.computed=!1,e.name=n.name),Sr(n.name),f.if_("inputs"===f.stage||f.not(f.getHasOwnProperty("l",n.name)),function(){f.if_("inputs"===f.stage||"s",function(){i&&1!==i&&f.if_(f.not(f.nonComputedMember("s",n.name)),f.lazyAssign(f.nonComputedMember("s",n.name),"{}")),f.assign(t,f.nonComputedMember("s",n.name))})},t&&f.lazyAssign(t,f.nonComputedMember("l",n.name))),(f.state.expensiveChecks||Wr(n.name))&&f.addEnsureSafeObject(t),r(t);break;case Mr.MemberExpression:o=e&&(e.context=this.nextId())||this.nextId(),t=t||this.nextId(),f.recurse(n.object,o,void 0,function(){f.if_(f.notNull(o),function(){i&&1!==i&&f.addEnsureSafeAssignContext(o),n.computed?(s=f.nextId(),f.recurse(n.property,s),f.getStringValue(s),f.addEnsureSafeMemberName(s),i&&1!==i&&f.if_(f.not(f.computedMember(o,s)),f.lazyAssign(f.computedMember(o,s),"{}")),l=f.ensureSafeObject(f.computedMember(o,s)),f.assign(t,l),e&&(e.computed=!0,e.name=s)):(Sr(n.property.name),i&&1!==i&&f.if_(f.not(f.nonComputedMember(o,n.property.name)),f.lazyAssign(f.nonComputedMember(o,n.property.name),"{}")),l=f.nonComputedMember(o,n.property.name),(f.state.expensiveChecks||Wr(n.property.name))&&(l=f.ensureSafeObject(l)),f.assign(t,l),e&&(e.computed=!1,e.name=n.property.name))},function(){f.assign(t,"undefined")}),r(t)},!!i);break;case Mr.CallExpression:t=t||this.nextId(),n.filter?(s=f.filter(n.callee.name),c=[],fe(n.arguments,function(e){var t=f.nextId();f.recurse(e,t),c.push(t)}),l=s+"("+c.join(",")+")",f.assign(t,l),r(t)):(s=f.nextId(),o={},c=[],f.recurse(n.callee,s,o,function(){f.if_(f.notNull(s),function(){f.addEnsureSafeFunction(s),fe(n.arguments,function(e){f.recurse(e,f.nextId(),void 0,function(e){c.push(f.ensureSafeObject(e))})}),l=o.name?(f.state.expensiveChecks||f.addEnsureSafeObject(o.context),f.member(o.context,o.name,o.computed)+"("+c.join(",")+")"):s+"("+c.join(",")+")",l=f.ensureSafeObject(l),f.assign(t,l)},function(){f.assign(t,"undefined")}),r(t)}));break;case Mr.AssignmentExpression:s=this.nextId(),o={},this.recurse(n.left,void 0,o,function(){f.if_(f.notNull(o.context),function(){f.recurse(n.right,s),f.addEnsureSafeObject(f.member(o.context,o.name,o.computed)),f.addEnsureSafeAssignContext(o.context),l=f.member(o.context,o.name,o.computed)+n.operator+s,f.assign(t,l),r(t||l)})},1);break;case Mr.ArrayExpression:c=[],fe(n.elements,function(e){f.recurse(e,f.nextId(),void 0,function(e){c.push(e)})}),l="["+c.join(",")+"]",this.assign(t,l),r(l);break;case Mr.ObjectExpression:u=!(c=[]),fe(n.properties,function(e){e.computed&&(u=!0)}),u?(t=t||this.nextId(),this.assign(t,"{}"),fe(n.properties,function(e){e.computed?(o=f.nextId(),f.recurse(e.key,o)):o=e.key.type===Mr.Identifier?e.key.name:""+e.key.value,s=f.nextId(),f.recurse(e.value,s),f.assign(f.member(t,o,e.computed),s)})):(fe(n.properties,function(t){f.recurse(t.value,n.constant?void 0:f.nextId(),void 0,function(e){c.push(f.escape(t.key.type===Mr.Identifier?t.key.name:""+t.key.value)+":"+e)})}),l="{"+c.join(",")+"}",this.assign(t,l)),r(t||l);break;case Mr.ThisExpression:this.assign(t,"s"),r("s");break;case Mr.LocalsExpression:this.assign(t,"l"),r("l");break;case Mr.NGValueParameter:this.assign(t,"v"),r("v")}},getHasOwnProperty:function(e,t){var n=e+"."+t,r=this.current().own;return r.hasOwnProperty(n)||(r[n]=this.nextId(!1,e+"&&("+this.escape(t)+" in "+e+")")),r[n]},assign:function(e,t){if(e)return this.current().body.push(e,"=",t,";"),e},filter:function(e){return this.state.filters.hasOwnProperty(e)||(this.state.filters[e]=this.nextId(!0)),this.state.filters[e]},ifDefined:function(e,t){return"ifDefined("+e+","+this.escape(t)+")"},plus:function(e,t){return"plus("+e+","+t+")"},return_:function(e){this.current().body.push("return ",e,";")},if_:function(e,t,n){if(!0===e)t();else{var r=this.current().body;r.push("if(",e,"){"),t(),r.push("}"),n&&(r.push("else{"),n(),r.push("}"))}},not:function(e){return"!("+e+")"},notNull:function(e){return e+"!=null"},nonComputedMember:function(e,t){return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(t)?e+"."+t:e+'["'+t.replace(/[^$_a-zA-Z0-9]/g,this.stringEscapeFn)+'"]'},computedMember:function(e,t){return e+"["+t+"]"},member:function(e,t,n){return n?this.computedMember(e,t):this.nonComputedMember(e,t)},addEnsureSafeObject:function(e){this.current().body.push(this.ensureSafeObject(e),";")},addEnsureSafeMemberName:function(e){this.current().body.push(this.ensureSafeMemberName(e),";")},addEnsureSafeFunction:function(e){this.current().body.push(this.ensureSafeFunction(e),";")},addEnsureSafeAssignContext:function(e){this.current().body.push(this.ensureSafeAssignContext(e),";")},ensureSafeObject:function(e){return"ensureSafeObject("+e+",text)"},ensureSafeMemberName:function(e){return"ensureSafeMemberName("+e+",text)"},ensureSafeFunction:function(e){return"ensureSafeFunction("+e+",text)"},getStringValue:function(e){this.assign(e,"getStringValue("+e+")")},ensureSafeAssignContext:function(e){return"ensureSafeAssignContext("+e+",text)"},lazyRecurse:function(e,t,n,r,i,a){var o=this;return function(){o.recurse(e,t,n,r,i,a)}},lazyAssign:function(e,t){var n=this;return function(){n.assign(e,t)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(e){return"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)},escape:function(e){if(ve(e))return"'"+e.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(C(e))return e.toString();if(!0===e)return"true";if(!1===e)return"false";if(null===e)return"null";if(void 0===e)return"undefined";throw sr("esc","IMPOSSIBLE")},nextId:function(e,t){var n="v"+this.state.nextId++;return e||this.current().vars.push(n+(t?"="+t:"")),n},current:function(){return this.state[this.state.computing]}},Ur.prototype={compile:function(e,t){var n,r,i=this,a=this.astBuilder.ast(e);this.expression=e,this.expensiveChecks=t,Rr(a,i.$filter),(n=Fr(a))&&(r=this.recurse(n));var o,s=Nr(a.body);s&&(o=[],fe(s,function(e,t){var n=i.recurse(e);e.input=n,o.push(n),e.watchId=t}));var c=[];fe(a.body,function(e){c.push(i.recurse(e.expression))});var l=0===a.body.length?pe:1===a.body.length?c[0]:function(t,n){var r;return fe(c,function(e){r=e(t,n)}),r};return r&&(l.assign=function(e,t,n){return r(e,n,t)}),o&&(l.inputs=o),l.literal=Gr(a),l.constant=jr(a),l},recurse:function(e,c,t){var o,l,u,f=this;if(e.input)return this.inputs(e.input,e.watchId);switch(e.type){case Mr.Literal:return this.value(e.value,c);case Mr.UnaryExpression:return l=this.recurse(e.argument),this["unary"+e.operator](l,c);case Mr.BinaryExpression:case Mr.LogicalExpression:return o=this.recurse(e.left),l=this.recurse(e.right),this["binary"+e.operator](o,l,c);case Mr.ConditionalExpression:return this["ternary?:"](this.recurse(e.test),this.recurse(e.alternate),this.recurse(e.consequent),c);case Mr.Identifier:return Sr(e.name,f.expression),f.identifier(e.name,f.expensiveChecks||Wr(e.name),c,t,f.expression);case Mr.MemberExpression:return o=this.recurse(e.object,!1,!!t),e.computed||(Sr(e.property.name,f.expression),l=e.property.name),e.computed&&(l=this.recurse(e.property)),e.computed?this.computedMember(o,l,c,t,f.expression):this.nonComputedMember(o,l,f.expensiveChecks,c,t,f.expression);case Mr.CallExpression:return u=[],fe(e.arguments,function(e){u.push(f.recurse(e))}),e.filter&&(l=this.$filter(e.callee.name)),e.filter||(l=this.recurse(e.callee,!0)),e.filter?function(e,t,n,r){for(var i=[],a=0;a<u.length;++a)i.push(u[a](e,t,n,r));var o=l.apply(void 0,i,r);return c?{context:void 0,name:void 0,value:o}:o}:function(e,t,n,r){var i,a=l(e,t,n,r);if(null!=a.value){xr(a.context,f.expression),kr(a.value,f.expression);for(var o=[],s=0;s<u.length;++s)o.push(xr(u[s](e,t,n,r),f.expression));i=xr(a.value.apply(a.context,o),f.expression)}return c?{value:i}:i};case Mr.AssignmentExpression:return o=this.recurse(e.left,!0,1),l=this.recurse(e.right),function(e,t,n,r){var i=o(e,t,n,r),a=l(e,t,n,r);return xr(i.value,f.expression),Er(i.context),i.context[i.name]=a,c?{value:a}:a};case Mr.ArrayExpression:return u=[],fe(e.elements,function(e){u.push(f.recurse(e))}),function(e,t,n,r){for(var i=[],a=0;a<u.length;++a)i.push(u[a](e,t,n,r));return c?{value:i}:i};case Mr.ObjectExpression:return u=[],fe(e.properties,function(e){e.computed?u.push({key:f.recurse(e.key),computed:!0,value:f.recurse(e.value)}):u.push({key:e.key.type===Mr.Identifier?e.key.name:""+e.key.value,computed:!1,value:f.recurse(e.value)})}),function(e,t,n,r){for(var i={},a=0;a<u.length;++a)u[a].computed?i[u[a].key(e,t,n,r)]=u[a].value(e,t,n,r):i[u[a].key]=u[a].value(e,t,n,r);return c?{value:i}:i};case Mr.ThisExpression:return function(e){return c?{value:e}:e};case Mr.LocalsExpression:return function(e,t){return c?{value:t}:t};case Mr.NGValueParameter:return function(e,t,n){return c?{value:n}:n}}},"unary+":function(a,o){return function(e,t,n,r){var i=a(e,t,n,r);return i=_e(i)?+i:0,o?{value:i}:i}},"unary-":function(a,o){return function(e,t,n,r){var i=a(e,t,n,r);return i=_e(i)?-i:0,o?{value:i}:i}},"unary!":function(a,o){return function(e,t,n,r){var i=!a(e,t,n,r);return o?{value:i}:i}},"binary+":function(a,o,s){return function(e,t,n,r){var i=Or(a(e,t,n,r),o(e,t,n,r));return s?{value:i}:i}},"binary-":function(s,c,l){return function(e,t,n,r){var i=s(e,t,n,r),a=c(e,t,n,r),o=(_e(i)?i:0)-(_e(a)?a:0);return l?{value:o}:o}},"binary*":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)*o(e,t,n,r);return s?{value:i}:i}},"binary/":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)/o(e,t,n,r);return s?{value:i}:i}},"binary%":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)%o(e,t,n,r);return s?{value:i}:i}},"binary===":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)===o(e,t,n,r);return s?{value:i}:i}},"binary!==":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)!==o(e,t,n,r);return s?{value:i}:i}},"binary==":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)==o(e,t,n,r);return s?{value:i}:i}},"binary!=":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)!=o(e,t,n,r);return s?{value:i}:i}},"binary<":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)<o(e,t,n,r);return s?{value:i}:i}},"binary>":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)>o(e,t,n,r);return s?{value:i}:i}},"binary<=":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)<=o(e,t,n,r);return s?{value:i}:i}},"binary>=":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)>=o(e,t,n,r);return s?{value:i}:i}},"binary&&":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)&&o(e,t,n,r);return s?{value:i}:i}},"binary||":function(a,o,s){return function(e,t,n,r){var i=a(e,t,n,r)||o(e,t,n,r);return s?{value:i}:i}},"ternary?:":function(a,o,s,c){return function(e,t,n,r){var i=a(e,t,n,r)?o(e,t,n,r):s(e,t,n,r);return c?{value:i}:i}},value:function(e,t){return function(){return t?{context:void 0,name:void 0,value:e}:e}},identifier:function(o,s,c,l,u){return function(e,t,n,r){var i=t&&o in t?t:e;l&&1!==l&&i&&!i[o]&&(i[o]={});var a=i?i[o]:void 0;return s&&xr(a,u),c?{context:i,name:o,value:a}:a}},computedMember:function(s,c,l,u,f){return function(e,t,n,r){var i,a,o=s(e,t,n,r);return null!=o&&(Sr(i=Tr(i=c(e,t,n,r)),f),u&&1!==u&&(Er(o),o&&!o[i]&&(o[i]={})),xr(a=o[i],f)),l?{context:o,name:i,value:a}:a}},nonComputedMember:function(o,s,c,l,u,f){return function(e,t,n,r){var i=o(e,t,n,r);u&&1!==u&&(Er(i),i&&!i[s]&&(i[s]={}));var a=null!=i?i[s]:void 0;return(c||Wr(s))&&xr(a,f),l?{context:i,name:s,value:a}:a}},inputs:function(i,a){return function(e,t,n,r){return r?r[a]:i(e,t,n)}}};var Hr=function(e,t,n){this.lexer=e,this.$filter=t,this.options=n,this.ast=new Mr(e,n),this.astCompiler=n.csp?new Ur(this.ast,t):new Br(this.ast,t)};function Wr(e){return"constructor"===e}function qr(e){return we(e.valueOf)?e.valueOf():Ar.call(e)}function zr(){var n,r,v=Oe(),y=Oe(),i={true:!0,false:!1,null:null,undefined:void 0};this.addLiteral=function(e,t){i[e]=t},this.setIdentifierFns=function(e,t){return n=e,r=t,this},this.$get=["$filter",function(l){var e=N().noUnsafeEval,u={csp:e,expensiveChecks:!1,literals:R(i),isIdentifierStart:we(n)&&n,isIdentifierContinue:we(r)&&r},f={csp:e,expensiveChecks:!0,literals:R(i),isIdentifierStart:we(n)&&n,isIdentifierContinue:we(r)&&r},d=!1;return t.$$runningExpensiveChecks=function(){return d},t;function t(e,t,n){var r,i,a;switch(n=n||d,typeof e){case"string":e=e.trim();var o=n?y:v;if(!(r=o[a=e])){":"===e.charAt(0)&&":"===e.charAt(1)&&(i=!0,e=e.substring(2));var s=n?f:u,c=new Pr(s);(r=new Hr(c,l,s).parse(e)).constant?r.$$watchDelegate=_:i?r.$$watchDelegate=r.literal?g:m:r.inputs&&(r.$$watchDelegate=p),n&&(r=function e(a){if(!a)return a;n.$$watchDelegate=a.$$watchDelegate;n.assign=e(a.assign);n.constant=a.constant;n.literal=a.literal;for(var t=0;a.inputs&&t<a.inputs.length;++t)a.inputs[t]=e(a.inputs[t]);n.inputs=a.inputs;return n;function n(e,t,n,r){var i=d;d=!0;try{return a(e,t,n,r)}finally{d=i}}}(r)),o[a]=r}return b(r,t);case"function":return b(e,t);default:return b(pe,t)}}function h(e,t){return null==e||null==t?e===t:("object"!=typeof e||"object"!=typeof(e=qr(e)))&&(e===t||e!=e&&t!=t)}function p(e,t,n,a,r){var o,s=a.inputs;if(1===s.length){var i=h;return s=s[0],e.$watch(function(e){var t=s(e);return h(t,i)||(o=a(e,void 0,void 0,[t]),i=t&&qr(t)),o},t,n,r)}for(var c=[],l=[],u=0,f=s.length;u<f;u++)c[u]=h,l[u]=null;return e.$watch(function(e){for(var t=!1,n=0,r=s.length;n<r;n++){var i=s[n](e);(t||(t=!h(i,c[n])))&&(l[n]=i,c[n]=i&&qr(i))}return t&&(o=a(e,void 0,void 0,l)),o},t,n,r)}function m(e,r,t,n){var i,a;return i=e.$watch(function(e){return n(e)},function(e,t,n){a=e,we(r)&&r.apply(this,arguments),_e(e)&&n.$$postDigest(function(){_e(a)&&i()})},t)}function g(e,r,t,n){var i,a;return i=e.$watch(function(e){return n(e)},function(e,t,n){a=e,we(r)&&r.call(this,e,t,n),o(e)&&n.$$postDigest(function(){o(a)&&i()})},t);function o(e){var t=!0;return fe(e,function(e){_e(e)||(t=!1)}),t}}function _(e,t,n,r){var i=e.$watch(function(e){return i(),r(e)},t,n);return i}function b(o,s){if(!s)return o;var e=o.$$watchDelegate,a=!1,t=e!==g&&e!==m?function(e,t,n,r){var i=a&&r?r[0]:o(e,t,n,r);return s(i,e,t)}:function(e,t,n,r){var i=o(e,t,n,r),a=s(i,e,t);return _e(i)?a:i};return o.$$watchDelegate&&o.$$watchDelegate!==p?t.$$watchDelegate=o.$$watchDelegate:s.$stateful||(t.$$watchDelegate=p,a=!o.inputs,t.inputs=o.inputs?o.inputs:[o]),t}}]}function Vr(){this.$get=["$rootScope","$exceptionHandler",function(t,e){return Kr(function(e){t.$evalAsync(e)},e)}]}function Yr(){this.$get=["$browser","$exceptionHandler",function(t,e){return Kr(function(e){t.defer(e)},e)}]}function Kr(t,o){var n=w("$q",TypeError);function r(){var e=new c;return e.resolve=a(e,e.resolve),e.reject=a(e,e.reject),e.notify=a(e,e.notify),e}function e(){this.$$state={status:0}}function a(t,n){return function(e){n.call(t,e)}}function s(e){!e.processScheduled&&e.pending&&(e.processScheduled=!0,t(function(){!function(e){var t,n,r;r=e.pending,e.processScheduled=!1,e.pending=void 0;for(var i=0,a=r.length;i<a;++i){n=r[i][0],t=r[i][e.status];try{we(t)?n.resolve(t(e.value)):1===e.status?n.resolve(e.value):n.reject(e.value)}catch(e){n.reject(e),o(e)}}}(e)}))}function c(){this.promise=new e}function i(e){var t=new c;return t.reject(e),t.promise}function l(e,t,n){var r=null;try{we(n)&&(r=n())}catch(e){return i(e)}return I(r)?r.then(function(){return t(e)},i):t(e)}function u(e,t,n,r){var i=new c;return i.resolve(e),i.promise.then(t,n,r)}de(e.prototype,{then:function(e,t,n){if(ge(e)&&ge(t)&&ge(n))return this;var r=new c;return this.$$state.pending=this.$$state.pending||[],this.$$state.pending.push([r,e,t,n]),0<this.$$state.status&&s(this.$$state),r.promise},catch:function(e){return this.then(null,e)},finally:function(t,e){return this.then(function(e){return l(e,f,t)},function(e){return l(e,i,t)},e)}}),de(c.prototype,{resolve:function(e){this.promise.$$state.status||(e===this.promise?this.$$reject(n("qcycle","Expected promise to be resolved with value other than itself '{0}'",e)):this.$$resolve(e))},$$resolve:function(e){var t,n=this,r=!1;try{(be(e)||we(e))&&(t=e&&e.then),we(t)?(this.promise.$$state.status=-1,t.call(e,function(e){if(r)return;r=!0,n.$$resolve(e)},i,a(this,this.notify))):(this.promise.$$state.value=e,this.promise.$$state.status=1,s(this.promise.$$state))}catch(e){i(e),o(e)}function i(e){r||(r=!0,n.$$reject(e))}},reject:function(e){this.promise.$$state.status||this.$$reject(e)},$$reject:function(e){this.promise.$$state.value=e,this.promise.$$state.status=2,s(this.promise.$$state)},notify:function(i){var a=this.promise.$$state.pending;this.promise.$$state.status<=0&&a&&a.length&&t(function(){for(var e,t,n=0,r=a.length;n<r;n++){t=a[n][0],e=a[n][3];try{t.notify(we(e)?e(i):i)}catch(e){o(e)}}})}});var f=u;function d(e){if(!we(e))throw n("norslvr","Expected resolverFn, got '{0}'",e);var t=new c;return e(function(e){t.resolve(e)},function(e){t.reject(e)}),t.promise}return d.prototype=e.prototype,d.defer=r,d.reject=i,d.when=u,d.resolve=f,d.all=function(e){var n=new c,r=0,i=ye(e)?[]:{};return fe(e,function(e,t){r++,u(e).then(function(e){i[t]=e,--r||n.resolve(i)},function(e){n.reject(e)})}),0===r&&n.resolve(i),n.promise},d.race=function(e){var t=r();return fe(e,function(e){u(e).then(t.resolve,t.reject)}),t.promise},d}function Qr(){this.$get=["$window","$timeout",function(e,n){var r=e.requestAnimationFrame||e.webkitRequestAnimationFrame,i=e.cancelAnimationFrame||e.webkitCancelAnimationFrame||e.webkitCancelRequestAnimationFrame,t=!!r,a=t?function(e){var t=r(e);return function(){i(t)}}:function(e){var t=n(e,16.66,!1);return function(){n.cancel(t)}};return a.supported=t,a}]}function Xr(){var A=10,S=w("$rootScope"),T=null,x=null;this.digestTtl=function(e){return arguments.length&&(A=e),A},this.$get=["$exceptionHandler","$parse","$browser",function(d,p,h){function r(e){e.currentScope.$$destroyed=!0}function i(){this.$id=k(),this.$$phase=this.$parent=this.$$watchers=this.$$nextSibling=this.$$prevSibling=this.$$childHead=this.$$childTail=null,(this.$root=this).$$destroyed=!1,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$$isolateBindings=null}i.prototype={constructor:i,$new:function(e,t){var n;return t=t||this,e?(n=new i).$root=this.$root:(this.$$ChildScope||(this.$$ChildScope=function(e){function t(){this.$$watchers=this.$$nextSibling=this.$$childHead=this.$$childTail=null,this.$$listeners={},this.$$listenerCount={},this.$$watchersCount=0,this.$id=k(),this.$$ChildScope=null}return t.prototype=e,t}(this)),n=new this.$$ChildScope),n.$parent=t,n.$$prevSibling=t.$$childTail,t.$$childHead?(t.$$childTail.$$nextSibling=n,t.$$childTail=n):t.$$childHead=t.$$childTail=n,(e||t!==this)&&n.$on("$destroy",r),n},$watch:function(e,t,n,r){var i=p(e);if(i.$$watchDelegate)return i.$$watchDelegate(this,t,n,i,e);var a=this,o=a.$$watchers,s={fn:t,last:w,get:i,exp:r||e,eq:!!n};return T=null,we(t)||(s.fn=pe),o||((o=a.$$watchers=[]).$$digestWatchIndex=-1),o.unshift(s),o.$$digestWatchIndex++,c(this,1),function(){var e=xe(o,s);0<=e&&(c(a,-1),e<o.$$digestWatchIndex&&o.$$digestWatchIndex--),T=null}},$watchGroup:function(e,r){var i=new Array(e.length),a=new Array(e.length),o=[],s=this,c=!1,t=!0;if(!e.length){var n=!0;return s.$evalAsync(function(){n&&r(a,a,s)}),function(){n=!1}}if(1===e.length)return this.$watch(e[0],function(e,t,n){a[0]=e,i[0]=t,r(a,e===t?a:i,n)});function l(){c=!1,t?(t=!1,r(a,a,s)):r(a,i,s)}return fe(e,function(e,n){var t=s.$watch(e,function(e,t){a[n]=e,i[n]=t,c||(c=!0,s.$evalAsync(l))});o.push(t)}),function(){for(;o.length;)o.shift()()}},$watchCollection:function(e,n){h.$stateful=!0;var o,s,r,i=this,a=1<n.length,c=0,t=p(e,h),l=[],u={},f=!0,d=0;function h(e){var t,n,r,i;if(!ge(o=e)){if(be(o))if(O(o)){s!==l&&(d=(s=l).length=0,c++),t=o.length,d!==t&&(c++,s.length=d=t);for(var a=0;a<t;a++)i=s[a],r=o[a],i!=i&&r!=r||i===r||(c++,s[a]=r)}else{for(n in s!==u&&(s=u={},d=0,c++),t=0,o)B.call(o,n)&&(t++,r=o[n],i=s[n],n in s?i!=i&&r!=r||i===r||(c++,s[n]=r):(d++,s[n]=r,c++));if(t<d)for(n in c++,s)B.call(o,n)||(d--,delete s[n])}else s!==o&&(s=o,c++);return c}}return this.$watch(t,function(){if(f?(f=!1,n(o,o,i)):n(o,r,i),a)if(be(o))if(O(o)){r=new Array(o.length);for(var e=0;e<o.length;e++)r[e]=o[e]}else for(var t in r={},o)B.call(o,t)&&(r[t]=o[t]);else r=o})},$digest:function(){var e,t,n,r,i,a,o,s,c,l=A,u=[];v("$digest"),h.$$checkUrlChange(),this===m&&null!==x&&(h.defer.cancel(x),C()),T=null;do{i=!1,o=this;for(var f=0;f<g.length;f++){try{(c=g[f]).scope.$eval(c.expression,c.locals)}catch(e){d(e)}T=null}g.length=0;e:do{if(r=o.$$watchers)for(r.$$digestWatchIndex=r.length;r.$$digestWatchIndex--;)try{if(e=r[r.$$digestWatchIndex])if((t=(0,e.get)(o))===(n=e.last)||(e.eq?ke(t,n):E(t)&&E(n))){if(e===T){i=!1;break e}}else i=!0,(T=e).last=e.eq?R(t,null):t,(0,e.fn)(t,n===w?t:n,o),l<5&&(u[s=4-l]||(u[s]=[]),u[s].push({msg:we(e.exp)?"fn: "+(e.exp.name||e.exp.toString()):e.exp,newVal:t,oldVal:n}))}catch(e){d(e)}if(!(a=o.$$watchersCount&&o.$$childHead||o!==this&&o.$$nextSibling))for(;o!==this&&!(a=o.$$nextSibling);)o=o.$parent}while(o=a);if((i||g.length)&&!l--)throw y(),S("infdig","{0} $digest() iterations reached. Aborting!\nWatchers fired in the last 5 iterations: {1}",A,u)}while(i||g.length);for(y();b<_.length;)try{_[b++]()}catch(e){d(e)}_.length=b=0},$destroy:function(){if(!this.$$destroyed){var e=this.$parent;for(var t in this.$broadcast("$destroy"),this.$$destroyed=!0,this===m&&h.$$applicationDestroyed(),c(this,-this.$$watchersCount),this.$$listenerCount)a(this,this.$$listenerCount[t],t);e&&e.$$childHead===this&&(e.$$childHead=this.$$nextSibling),e&&e.$$childTail===this&&(e.$$childTail=this.$$prevSibling),this.$$prevSibling&&(this.$$prevSibling.$$nextSibling=this.$$nextSibling),this.$$nextSibling&&(this.$$nextSibling.$$prevSibling=this.$$prevSibling),this.$destroy=this.$digest=this.$apply=this.$evalAsync=this.$applyAsync=pe,this.$on=this.$watch=this.$watchGroup=function(){return pe},this.$$listeners={},this.$$nextSibling=null,function e(t){9===U&&(t.$$childHead&&e(t.$$childHead),t.$$nextSibling&&e(t.$$nextSibling)),t.$parent=t.$$nextSibling=t.$$prevSibling=t.$$childHead=t.$$childTail=t.$root=t.$$watchers=null}(this)}},$eval:function(e,t){return p(e)(this,t)},$evalAsync:function(e,t){m.$$phase||g.length||h.defer(function(){g.length&&m.$digest()}),g.push({scope:this,expression:p(e),locals:t})},$$postDigest:function(e){_.push(e)},$apply:function(e){try{v("$apply");try{return this.$eval(e)}finally{y()}}catch(e){d(e)}finally{try{m.$digest()}catch(e){throw d(e),e}}},$applyAsync:function(e){var t=this;e&&n.push(function(){t.$eval(e)}),e=p(e),null===x&&(x=h.defer(function(){m.$apply(C)}))},$on:function(t,n){var r=this.$$listeners[t];r||(this.$$listeners[t]=r=[]),r.push(n);for(var e=this;e.$$listenerCount[t]||(e.$$listenerCount[t]=0),e.$$listenerCount[t]++,e=e.$parent;);var i=this;return function(){var e=r.indexOf(n);-1!==e&&(r[e]=null,a(i,1,t))}},$emit:function(e,t){var n,r,i,a=[],o=this,s=!1,c={name:e,targetScope:o,stopPropagation:function(){s=!0},preventDefault:function(){c.defaultPrevented=!0},defaultPrevented:!1},l=F([c],arguments,1);do{for(n=o.$$listeners[e]||a,c.currentScope=o,r=0,i=n.length;r<i;r++)if(n[r])try{n[r].apply(null,l)}catch(e){d(e)}else n.splice(r,1),r--,i--;if(s)return c.currentScope=null,c;o=o.$parent}while(o);return c.currentScope=null,c},$broadcast:function(e,t){var n=this,r=this,i={name:e,targetScope:this,preventDefault:function(){i.defaultPrevented=!0},defaultPrevented:!1};if(!this.$$listenerCount[e])return i;for(var a,o,s,c=F([i],arguments,1);n=r;){for(o=0,s=(a=(i.currentScope=n).$$listeners[e]||[]).length;o<s;o++)if(a[o])try{a[o].apply(null,c)}catch(e){d(e)}else a.splice(o,1),o--,s--;if(!(r=n.$$listenerCount[e]&&n.$$childHead||n!==this&&n.$$nextSibling))for(;n!==this&&!(r=n.$$nextSibling);)n=n.$parent}return i.currentScope=null,i}};var m=new i,g=m.$$asyncQueue=[],_=m.$$postDigestQueue=[],n=m.$$applyAsyncQueue=[],b=0;return m;function v(e){if(m.$$phase)throw S("inprog","{0} already in progress",m.$$phase);m.$$phase=e}function y(){m.$$phase=null}function c(e,t){for(;e.$$watchersCount+=t,e=e.$parent;);}function a(e,t,n){for(;e.$$listenerCount[n]-=t,0===e.$$listenerCount[n]&&delete e.$$listenerCount[n],e=e.$parent;);}function w(){}function C(){for(;n.length;)try{n.shift()()}catch(e){d(e)}x=null}}]}function Zr(){var i=/^\s*(https?|ftp|mailto|tel|file):/,a=/^\s*((https?|ftp|file|blob):|data:image\/)/;this.aHrefSanitizationWhitelist=function(e){return _e(e)?(i=e,this):i},this.imgSrcSanitizationWhitelist=function(e){return _e(e)?(a=e,this):a},this.$get=function(){return function(e,t){var n,r=t?a:i;return""===(n=fi(e).href)||n.match(r)?e:"unsafe:"+n}}}Hr.prototype={constructor:Hr,parse:function(e){return this.astCompiler.compile(e,this.options.expensiveChecks)}};var Jr=w("$sce"),ei={HTML:"html",CSS:"css",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"};function ti(e){var t=[];return _e(e)&&fe(e,function(e){t.push(function(e){if("self"===e)return e;if(ve(e)){if(-1<e.indexOf("***"))throw Jr("iwcard","Illegal sequence *** in string matcher.  String: {0}",e);return e=M(e).replace(/\\\*\\\*/g,".*").replace(/\\\*/g,"[^:/.?&;]*"),new RegExp("^"+e+"$")}if(T(e))return new RegExp("^"+e.source+"$");throw Jr("imatcher",'Matchers may only be "self", string patterns or RegExp objects')}(e))}),t}function ni(){this.SCE_CONTEXTS=ei;var o=["self"],s=[];this.resourceUrlWhitelist=function(e){return arguments.length&&(o=ti(e)),o},this.resourceUrlBlacklist=function(e){return arguments.length&&(s=ti(e)),s},this.$get=["$injector",function(e){var r=function(e){throw Jr("unsafe","Attempting to use an unsafe value in a safe context.")};function a(e,t){return"self"===e?di(t):!!e.exec(t.href)}function t(e){var t=function(e){this.$$unwrapTrustedValue=function(){return e}};return e&&(t.prototype=new e),t.prototype.valueOf=function(){return this.$$unwrapTrustedValue()},t.prototype.toString=function(){return this.$$unwrapTrustedValue().toString()},t}e.has("$sanitize")&&(r=e.get("$sanitize"));var n=t(),i={};return i[ei.HTML]=t(n),i[ei.CSS]=t(n),i[ei.URL]=t(n),i[ei.JS]=t(n),i[ei.RESOURCE_URL]=t(i[ei.URL]),{trustAs:function(e,t){var n=i.hasOwnProperty(e)?i[e]:null;if(!n)throw Jr("icontext","Attempted to trust a value in invalid context. Context: {0}; Value: {1}",e,t);if(null===t||ge(t)||""===t)return t;if("string"!=typeof t)throw Jr("itype","Attempted to trust a non-string value in a content requiring a string: Context: {0}",e);return new n(t)},getTrusted:function(e,t){if(null===t||ge(t)||""===t)return t;var n=i.hasOwnProperty(e)?i[e]:null;if(n&&t instanceof n)return t.$$unwrapTrustedValue();if(e===ei.RESOURCE_URL){if(function(e){var t,n,r=fi(e.toString()),i=!1;for(t=0,n=o.length;t<n;t++)if(a(o[t],r)){i=!0;break}if(i)for(t=0,n=s.length;t<n;t++)if(a(s[t],r)){i=!1;break}return i}(t))return t;throw Jr("insecurl","Blocked loading resource from url not allowed by $sceDelegate policy.  URL: {0}",t.toString())}if(e===ei.HTML)return r(t);throw Jr("unsafe","Attempting to use an unsafe value in a safe context.")},valueOf:function(e){return e instanceof n?e.$$unwrapTrustedValue():e}}}]}function ri(){var t=!0;this.enabled=function(e){return arguments.length&&(t=!!e),t},this.$get=["$parse","$sceDelegate",function(r,e){if(t&&U<8)throw Jr("iequirks","Strict Contextual Escaping does not support Internet Explorer version < 11 in quirks mode.  You can fix this by adding the text <!doctype html> to the top of your HTML document.  See http://docs.angularjs.org/api/ng.$sce for more information.");var i=je(ei);i.isEnabled=function(){return t},i.trustAs=e.trustAs,i.getTrusted=e.getTrusted,i.valueOf=e.valueOf,t||(i.trustAs=i.getTrusted=function(e,t){return t},i.valueOf=me),i.parseAs=function(t,e){var n=r(e);return n.literal&&n.constant?n:r(e,function(e){return i.getTrusted(t,e)})};var a=i.parseAs,o=i.getTrusted,s=i.trustAs;return fe(ei,function(t,e){var n=S(e);i[Xe("parse_as_"+n)]=function(e){return a(t,e)},i[Xe("get_trusted_"+n)]=function(e){return o(t,e)},i[Xe("trust_as_"+n)]=function(e){return s(t,e)}}),i}]}function ii(){this.$get=["$window","$document",function(e,t){var n,r,i={},a=!(e.chrome&&(e.chrome.app&&e.chrome.app.runtime||!e.chrome.app&&e.chrome.runtime&&e.chrome.runtime.id))&&e.history&&e.history.pushState,o=m((/android (\d+)/.exec(S((e.navigator||{}).userAgent))||[])[1]),s=/Boxee/i.test((e.navigator||{}).userAgent),c=t[0]||{},l=/^(Moz|webkit|ms)(?=[A-Z])/,u=c.body&&c.body.style,f=!1,d=!1;if(u){for(var h in u)if(r=l.exec(h)){n=(n=r[0])[0].toUpperCase()+n.substr(1);break}n||(n="WebkitOpacity"in u&&"webkit"),f=!!("transition"in u||n+"Transition"in u),d=!!("animation"in u||n+"Animation"in u),!o||f&&d||(f=ve(u.webkitTransition),d=ve(u.webkitAnimation))}return{history:!(!a||o<4||s),hasEvent:function(e){if("input"===e&&U<=11)return!1;if(ge(i[e])){var t=c.createElement("div");i[e]="on"+e in t}return i[e]},csp:N(),vendorPrefix:n,transitions:f,animations:d,android:o}}]}var ai=w("$compile");function oi(){var c;this.httpOptions=function(e){return e?(c=e,this):c},this.$get=["$templateCache","$http","$q","$sce",function(r,i,a,o){function s(t,n){s.totalPendingRequests++,ve(t)&&!ge(r.get(t))||(t=o.getTrustedResourceUrl(t));var e=i.defaults&&i.defaults.transformResponse;return ye(e)?e=e.filter(function(e){return e!==In}):e===In&&(e=null),i.get(t,de({cache:r,transformResponse:e},c)).finally(function(){s.totalPendingRequests--}).then(function(e){return r.put(t,e.data),e.data},function(e){if(n)return a.reject(e);throw ai("tpload","Failed to load template: {0} (HTTP status: {1} {2})",t,e.status,e.statusText)})}return s.totalPendingRequests=0,s}]}function si(){this.$get=["$rootScope","$browser","$location",function(t,n,r){var e={findBindings:function(e,n,r){var t=e.getElementsByClassName("ng-binding"),i=[];return fe(t,function(t){var e=v.element(t).data("$binding");e&&fe(e,function(e){r?new RegExp("(^|\\s)"+M(n)+"(\\s|\\||$)").test(e)&&i.push(t):-1!==e.indexOf(n)&&i.push(t)})}),i},findModels:function(e,t,n){for(var r=["ng-","data-ng-","ng\\:"],i=0;i<r.length;++i){var a="["+r[i]+"model"+(n?"=":"*=")+'"'+t+'"]',o=e.querySelectorAll(a);if(o.length)return o}},getLocation:function(){return r.url()},setLocation:function(e){e!==r.url()&&(r.url(e),t.$digest())},whenStable:function(e){n.notifyWhenNoOutstandingRequests(e)}};return e}]}function ci(){this.$get=["$rootScope","$browser","$q","$$q","$exceptionHandler",function(c,l,u,f,d){var h={};function e(e,t,n){we(e)||(n=t,t=e,e=pe);var r,i=Ee(arguments,3),a=_e(n)&&!n,o=(a?f:u).defer(),s=o.promise;return r=l.defer(function(){try{o.resolve(e.apply(null,i))}catch(e){o.reject(e),d(e)}finally{delete h[s.$$timeoutId]}a||c.$apply()},t),s.$$timeoutId=r,h[r]=o,s}return e.cancel=function(e){return!!(e&&e.$$timeoutId in h)&&(h[e.$$timeoutId].reject("canceled"),delete h[e.$$timeoutId],l.defer.cancel(e.$$timeoutId))},e}]}var li=j.document.createElement("a"),ui=fi(j.location.href);function fi(e){var t=e;return U&&(li.setAttribute("href",t),t=li.href),li.setAttribute("href",t),{href:li.href,protocol:li.protocol?li.protocol.replace(/:$/,""):"",host:li.host,search:li.search?li.search.replace(/^\?/,""):"",hash:li.hash?li.hash.replace(/^#/,""):"",hostname:li.hostname,port:li.port,pathname:"/"===li.pathname.charAt(0)?li.pathname:"/"+li.pathname}}function di(e){var t=ve(e)?fi(e):e;return t.protocol===ui.protocol&&t.host===ui.host}function hi(){this.$get=x(j)}function pi(e){var o=e[0]||{},s={},c="";function l(t){try{return decodeURIComponent(t)}catch(e){return t}}return function(){var e,t,n,r,i,a=o.cookie||"";if(a!==c)for(e=(c=a).split("; "),s={},n=0;n<e.length;n++)0<(r=(t=e[n]).indexOf("="))&&(i=l(t.substring(0,r)),ge(s[i])&&(s[i]=l(t.substring(r+1))));return s}}function mi(){this.$get=pi}function gi(r){var i="Filter";function a(e,t){if(be(e)){var n={};return fe(e,function(e,t){n[t]=a(t,e)}),n}return r.factory(e+i,t)}this.register=a,this.$get=["$injector",function(t){return function(e){return t.get(e+i)}}],a("currency",Ai),a("date",Ri),a("filter",_i),a("json",Ni),a("limitTo",Gi),a("lowercase",Li),a("number",Si),a("orderBy",Bi),a("uppercase",Fi)}function _i(){return function(e,t,n,r){if(!O(e)){if(null==e)return e;throw w("filter")("notarray","Expected array but received: {0}",e)}var i,a;switch(r=r||"$",vi(t)){case"function":i=t;break;case"boolean":case"null":case"number":case"string":a=!0;case"object":i=function(t,n,r,i){var a=be(t)&&r in t;!0===n?n=ke:we(n)||(n=function(e,t){return!ge(e)&&(null===e||null===t?e===t:!(be(t)||be(e)&&!b(e))&&(e=S(""+e),t=S(""+t),-1!==e.indexOf(t)))});return function(e){return a&&!be(e)?bi(e,t[r],n,r,!1):bi(e,t,n,r,i)}}(t,n,r,a);break;default:return e}return Array.prototype.filter.call(e,i)}}function bi(e,t,n,r,i,a){var o=vi(e),s=vi(t);if("string"===s&&"!"===t.charAt(0))return!bi(e,t.substring(1),n,r,i);if(ye(e))return e.some(function(e){return bi(e,t,n,r,i)});switch(o){case"object":var c;if(i){for(c in e)if("$"!==c.charAt(0)&&bi(e[c],t,n,r,!0))return!0;return!a&&bi(e,t,n,r,!1)}if("object"!==s)return n(e,t);for(c in t){var l=t[c];if(!we(l)&&!ge(l)){var u=c===r;if(!bi(u?e:e[c],l,n,r,u,u))return!1}}return!0;case"function":return!1;default:return n(e,t)}}function vi(e){return null===e?"null":typeof e}pi.$inject=["$document"],gi.$inject=["$provide"];var yi=22,wi=".",Ci="0";function Ai(e){var r=e.NUMBER_FORMATS;return function(e,t,n){return ge(t)&&(t=r.CURRENCY_SYM),ge(n)&&(n=r.PATTERNS[1].maxFrac),null==e?e:Ti(e,r.PATTERNS[1],r.GROUP_SEP,r.DECIMAL_SEP,n).replace(/\u00A4/g,t)}}function Si(e){var n=e.NUMBER_FORMATS;return function(e,t){return null==e?e:Ti(e,n.PATTERNS[0],n.GROUP_SEP,n.DECIMAL_SEP,t)}}function Ti(e,t,n,r,i){if(!ve(e)&&!C(e)||isNaN(e))return"";var a,o=!isFinite(e),s=!1,c=Math.abs(e)+"",l="";if(o)l="∞";else{(function(e,t,n,r){var i=e.d,a=i.length-e.i,o=(t=ge(t)?Math.min(Math.max(n,a),r):+t)+e.i,s=i[o];if(0<o){i.splice(Math.max(e.i,o));for(var c=o;c<i.length;c++)i[c]=0}else{a=Math.max(0,a),e.i=1,i.length=Math.max(1,o=t+1),i[0]=0;for(var l=1;l<o;l++)i[l]=0}if(5<=s)if(o-1<0){for(var u=0;o<u;u--)i.unshift(0),e.i++;i.unshift(1),e.i++}else i[o-1]++;for(;a<Math.max(0,t);a++)i.push(0);var f=i.reduceRight(function(e,t,n,r){return t+=e,r[n]=t%10,Math.floor(t/10)},0);f&&(i.unshift(f),e.i++)})(a=function(e){var t,n,r,i,a,o=0;for(-1<(n=e.indexOf(wi))&&(e=e.replace(wi,"")),0<(r=e.search(/e/i))?(n<0&&(n=r),n+=+e.slice(r+1),e=e.substring(0,r)):n<0&&(n=e.length),r=0;e.charAt(r)===Ci;r++);if(r===(a=e.length))t=[0],n=1;else{for(a--;e.charAt(a)===Ci;)a--;for(n-=r,t=[],i=0;r<=a;r++,i++)t[i]=+e.charAt(r)}return yi<n&&(t=t.splice(0,yi-1),o=n-1,n=1),{d:t,e:o,i:n}}(c),i,t.minFrac,t.maxFrac);var u=a.d,f=a.i,d=a.e,h=[];for(s=u.reduce(function(e,t){return e&&!t},!0);f<0;)u.unshift(0),f++;0<f?h=u.splice(f,u.length):(h=u,u=[0]);var p=[];for(u.length>=t.lgSize&&p.unshift(u.splice(-t.lgSize,u.length).join(""));u.length>t.gSize;)p.unshift(u.splice(-t.gSize,u.length).join(""));u.length&&p.unshift(u.join("")),l=p.join(n),h.length&&(l+=r+h.join("")),d&&(l+="e+"+d)}return e<0&&!s?t.negPre+l+t.negSuf:t.posPre+l+t.posSuf}function xi(e,t,n,r){var i="";for((e<0||r&&e<=0)&&(r?e=1-e:(e=-e,i="-")),e=""+e;e.length<t;)e=Ci+e;return n&&(e=e.substr(e.length-t)),i+e}function ki(n,r,i,a,o){return i=i||0,function(e){var t=e["get"+n]();return(0<i||-i<t)&&(t+=i),0===t&&-12===i&&(t=12),xi(t,r,a,o)}}function Ei(r,i,a){return function(e,t){var n=e["get"+r]();return t[u((a?"STANDALONE":"")+(i?"SHORT":"")+r)][n]}}function Di(e){var t=new Date(e,0,1).getDay();return new Date(e,0,(t<=4?5:12)-t)}function Ii(i){return function(e){var t,n=Di(e.getFullYear()),r=+(t=e,new Date(t.getFullYear(),t.getMonth(),t.getDate()+(4-t.getDay())))-+n;return xi(1+Math.round(r/6048e5),i)}}function Pi(e,t){return e.getFullYear()<=0?t.ERAS[0]:t.ERAS[1]}Ai.$inject=["$locale"];var Mi={yyyy:ki("FullYear",4,0,!(Si.$inject=["$locale"]),!0),yy:ki("FullYear",2,0,!0,!0),y:ki("FullYear",1,0,!1,!0),MMMM:Ei("Month"),MMM:Ei("Month",!0),MM:ki("Month",2,1),M:ki("Month",1,1),LLLL:Ei("Month",!1,!0),dd:ki("Date",2),d:ki("Date",1),HH:ki("Hours",2),H:ki("Hours",1),hh:ki("Hours",2,-12),h:ki("Hours",1,-12),mm:ki("Minutes",2),m:ki("Minutes",1),ss:ki("Seconds",2),s:ki("Seconds",1),sss:ki("Milliseconds",3),EEEE:Ei("Day"),EEE:Ei("Day",!0),a:function(e,t){return e.getHours()<12?t.AMPMS[0]:t.AMPMS[1]},Z:function(e,t,n){var r=-1*n,i=0<=r?"+":"";return i+=xi(Math[0<r?"floor":"ceil"](r/60),2)+xi(Math.abs(r%60),2)},ww:Ii(2),w:Ii(1),G:Pi,GG:Pi,GGG:Pi,GGGG:function(e,t){return e.getFullYear()<=0?t.ERANAMES[0]:t.ERANAMES[1]}},$i=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))(.*)/,Oi=/^-?\d+$/;function Ri(c){var f=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(t,e,n){var r,i,a="",o=[];if(e=e||"mediumDate",e=c.DATETIME_FORMATS[e]||e,ve(t)&&(t=Oi.test(t)?m(t):function(e){var t;if(t=e.match(f)){var n=new Date(0),r=0,i=0,a=t[8]?n.setUTCFullYear:n.setFullYear,o=t[8]?n.setUTCHours:n.setHours;t[9]&&(r=m(t[9]+t[10]),i=m(t[9]+t[11])),a.call(n,m(t[1]),m(t[2])-1,m(t[3]));var s=m(t[4]||0)-r,c=m(t[5]||0)-i,l=m(t[6]||0),u=Math.round(1e3*parseFloat("0."+(t[7]||0)));return o.call(n,s,c,l,u),n}return e}(t)),C(t)&&(t=new Date(t)),!A(t)||!isFinite(t.getTime()))return t;for(;e;)e=(i=$i.exec(e))?(o=F(o,i,1)).pop():(o.push(e),null);var s=t.getTimezoneOffset();return n&&(s=z(n,s),t=V(t,n,!0)),fe(o,function(e){r=Mi[e],a+=r?r(t,c.DATETIME_FORMATS,s):"''"===e?"'":e.replace(/(^'|'$)/g,"").replace(/''/g,"'")}),a}}function Ni(){return function(e,t){return ge(t)&&(t=2),G(e,t)}}Ri.$inject=["$locale"];var Li=x(S),Fi=x(u);function Gi(){return function(e,t,n){return t=Math.abs(Number(t))===1/0?Number(t):m(t),E(t)?e:(C(e)&&(e=e.toString()),O(e)?(n=(n=!n||isNaN(n)?0:m(n))<0?Math.max(0,e.length+n):n,0<=t?ji(e,n,n+t):0===n?ji(e,t,e.length):ji(e,Math.max(0,n+t),n)):e)}}function ji(e,t,n){return ve(e)?e.slice(t,n):s.call(e,t,n)}function Bi(c){return function(e,t,n,r){if(null==e)return e;if(!O(e))throw w("orderBy")("notarray","Expected array but received: {0}",e);ye(t)||(t=[t]),0===t.length&&(t=["+"]);var a=t.map(function(e){var t=1,n=me;if(we(e))n=e;else if(ve(e)&&("+"!==e.charAt(0)&&"-"!==e.charAt(0)||(t="-"===e.charAt(0)?-1:1,e=e.substring(1)),""!==e&&(n=c(e)).constant)){var r=n();n=function(e){return e[r]}}return{get:n,descending:t}}),o=n?-1:1,s=we(r)?r:u,i=Array.prototype.map.call(e,function(t,n){return{value:t,tieBreaker:{value:n,type:"number",index:n},predicateValues:a.map(function(e){return function(e,t){var n=typeof e;null===e?(n="string",e="null"):"object"===n&&(e=function(e){if(we(e.valueOf)&&l(e=e.valueOf()))return e;if(b(e)&&l(e=e.toString()))return e;return e}(e));return{value:e,type:n,index:t}}(e.get(t),n)})}});return i.sort(function(e,t){for(var n=0,r=a.length;n<r;n++){var i=s(e.predicateValues[n],t.predicateValues[n]);if(i)return i*a[n].descending*o}return s(e.tieBreaker,t.tieBreaker)*o}),e=i.map(function(e){return e.value})};function l(e){switch(typeof e){case"number":case"boolean":case"string":return!0;default:return!1}}function u(e,t){var n=0,r=e.type,i=t.type;if(r===i){var a=e.value,o=t.value;"string"===r?(a=a.toLowerCase(),o=o.toLowerCase()):"object"===r&&(be(a)&&(a=e.index),be(o)&&(o=t.index)),a!==o&&(n=a<o?-1:1)}else n=r<i?-1:1;return n}}function Ui(e){return we(e)&&(e={link:e}),e.restrict=e.restrict||"AC",x(e)}Bi.$inject=["$parse"];var Hi=x({restrict:"E",compile:function(e,t){if(!t.href&&!t.xlinkHref)return function(e,t){if("a"===t[0].nodeName.toLowerCase()){var n="[object SVGAnimatedString]"===H.call(t.prop("href"))?"xlink:href":"href";t.on("click",function(e){t.attr(n)||e.preventDefault()})}}}}),Wi={};fe(St,function(e,r){if("multiple"!==e){var i=fn("ng-"+r),t=a;"checked"===e&&(t=function(e,t,n){n.ngModel!==n[i]&&a(e,0,n)}),Wi[i]=function(){return{restrict:"A",priority:100,link:t}}}function a(e,t,n){e.$watch(n[i],function(e){n.$set(r,!!e)})}}),fe(xt,function(e,i){Wi[i]=function(){return{priority:100,link:function(e,t,n){if("ngPattern"===i&&"/"===n.ngPattern.charAt(0)){var r=n.ngPattern.match(a);if(r)return void n.$set("ngPattern",new RegExp(r[1],r[2]))}e.$watch(n[i],function(e){n.$set(i,e)})}}}}),fe(["src","srcset","href"],function(a){var o=fn("ng-"+a);Wi[o]=function(){return{priority:99,link:function(e,t,n){var r=a,i=a;"href"===a&&"[object SVGAnimatedString]"===H.call(t.prop("href"))&&(i="xlinkHref",n.$attr[i]="xlink:href",r=null),n.$observe(o,function(e){e?(n.$set(i,e),U&&r&&t.prop(r,n[i])):"href"===a&&n.$set(i,null)})}}}});var qi={$addControl:pe,$$renameControl:function(e,t){e.$name=t},$removeControl:pe,$setValidity:pe,$setDirty:pe,$setPristine:pe,$setSubmitted:pe},zi="ng-submitted";function Vi(e,t,n,r,i){var a=this,o=[];a.$error={},a.$$success={},a.$pending=void 0,a.$name=i(t.name||t.ngForm||"")(n),a.$dirty=!1,a.$pristine=!0,a.$valid=!0,a.$invalid=!1,a.$submitted=!1,a.$$parentForm=qi,a.$rollbackViewValue=function(){fe(o,function(e){e.$rollbackViewValue()})},a.$commitViewValue=function(){fe(o,function(e){e.$commitViewValue()})},a.$addControl=function(e){ce(e.$name,"input"),o.push(e),e.$name&&(a[e.$name]=e),e.$$parentForm=a},a.$$renameControl=function(e,t){var n=e.$name;a[n]===e&&delete a[n],(a[t]=e).$name=t},a.$removeControl=function(n){n.$name&&a[n.$name]===n&&delete a[n.$name],fe(a.$pending,function(e,t){a.$setValidity(t,null,n)}),fe(a.$error,function(e,t){a.$setValidity(t,null,n)}),fe(a.$$success,function(e,t){a.$setValidity(t,null,n)}),xe(o,n),n.$$parentForm=qi},Ja({ctrl:this,$element:e,set:function(e,t,n){var r=e[t];r?-1===r.indexOf(n)&&r.push(n):e[t]=[n]},unset:function(e,t,n){var r=e[t];r&&(xe(r,n),0===r.length&&delete e[t])},$animate:r}),a.$setDirty=function(){r.removeClass(e,Ba),r.addClass(e,Ua),a.$dirty=!0,a.$pristine=!1,a.$$parentForm.$setDirty()},a.$setPristine=function(){r.setClass(e,Ba,Ua+" "+zi),a.$dirty=!1,a.$pristine=!0,a.$submitted=!1,fe(o,function(e){e.$setPristine()})},a.$setUntouched=function(){fe(o,function(e){e.$setUntouched()})},a.$setSubmitted=function(){r.addClass(e,zi),a.$submitted=!0,a.$$parentForm.$setSubmitted()}}Vi.$inject=["$element","$attrs","$scope","$animate","$interpolate"];var Yi=function(n){return["$timeout","$parse",function(c,t){return{name:"form",restrict:n?"EAC":"E",require:["form","^^?form"],controller:Vi,compile:function(e,t){e.addClass(Ba).addClass(Ga);var s=t.name?"name":!(!n||!t.ngForm)&&"ngForm";return{pre:function(t,e,n,r){var i=r[0];if(!("action"in n)){var a=function(e){t.$apply(function(){i.$commitViewValue(),i.$setSubmitted()}),e.preventDefault()};qe(e[0],"submit",a),e.on("$destroy",function(){c(function(){ze(e[0],"submit",a)},0,!1)})}(r[1]||i.$$parentForm).$addControl(i);var o=s?l(i.$name):pe;s&&(o(t,i),n.$observe(s,function(e){i.$name!==e&&(o(t,void 0),i.$$parentForm.$$renameControl(i,e),(o=l(i.$name))(t,i))})),e.on("$destroy",function(){i.$$parentForm.$removeControl(i),o(t,void 0),de(i,qi)})}}}};function l(e){return""===e?t('this[""]').assign:t(e).assign||pe}}]},Ki=Yi(),Qi=Yi(!0),Xi=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,Zi=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,Ji=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/,ea=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,ta=/^(\d{4,})-(\d{2})-(\d{2})$/,na=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ra=/^(\d{4,})-W(\d\d)$/,ia=/^(\d{4,})-(\d\d)$/,aa=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,oa="keydown wheel mousedown",sa=Oe();fe("date,datetime-local,month,time,week".split(","),function(e){sa[e]=!0});var ca={text:function(e,t,n,r,i,a){ua(e,t,n,r,i,a),la(r)},date:da("date",ta,fa(ta,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":da("datetimelocal",na,fa(na,["yyyy","MM","dd","HH","mm","ss","sss"]),"yyyy-MM-ddTHH:mm:ss.sss"),time:da("time",aa,fa(aa,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:da("week",ra,function(e,t){if(A(e))return e;if(ve(e)){ra.lastIndex=0;var n=ra.exec(e);if(n){var r=+n[1],i=+n[2],a=0,o=0,s=0,c=0,l=Di(r),u=7*(i-1);return t&&(a=t.getHours(),o=t.getMinutes(),s=t.getSeconds(),c=t.getMilliseconds()),new Date(r,0,l.getDate()+u,a,o,s,c)}}return NaN},"yyyy-Www"),month:da("month",ia,fa(ia,["yyyy","MM"]),"yyyy-MM"),number:function(e,t,n,r,i,a){var o,s;ha(e,t,n,r),ua(e,t,n,r,i,a),pa(r),(_e(n.min)||n.ngMin)&&(r.$validators.min=function(e){return r.$isEmpty(e)||ge(o)||o<=e},n.$observe("min",function(e){o=ma(e),r.$validate()}));(_e(n.max)||n.ngMax)&&(r.$validators.max=function(e){return r.$isEmpty(e)||ge(s)||e<=s},n.$observe("max",function(e){s=ma(e),r.$validate()}))},url:function(e,t,n,r,i,a){ua(e,t,n,r,i,a),la(r),r.$$parserName="url",r.$validators.url=function(e,t){var n=e||t;return r.$isEmpty(n)||Zi.test(n)}},email:function(e,t,n,r,i,a){ua(e,t,n,r,i,a),la(r),r.$$parserName="email",r.$validators.email=function(e,t){var n=e||t;return r.$isEmpty(n)||Ji.test(n)}},radio:function(e,t,n,r){ge(n.name)&&t.attr("name",k());t.on("click",function(e){t[0].checked&&r.$setViewValue(n.value,e&&e.type)}),r.$render=function(){var e=n.value;t[0].checked=e==r.$viewValue},n.$observe("value",r.$render)},range:function(e,n,r,i,t,a){ha(e,n,r,i),pa(i),ua(e,n,r,i,t,a);var o=i.$$hasNativeValidators&&"range"===n[0].type,s=o?0:void 0,c=o?100:void 0,l=o?1:void 0,u=n[0].validity,f=_e(r.min),d=_e(r.max),h=_e(r.step),p=i.$render;i.$render=o&&_e(u.rangeUnderflow)&&_e(u.rangeOverflow)?function(){p(),i.$setViewValue(n.val())}:p,f&&(i.$validators.min=o?function(){return!0}:function(e,t){return i.$isEmpty(t)||ge(s)||s<=t},m("min",function(e){if(s=ma(e),E(i.$modelValue))return;if(o){var t=n.val();t<s&&(t=s,n.val(t)),i.$setViewValue(t)}else i.$validate()}));d&&(i.$validators.max=o?function(){return!0}:function(e,t){return i.$isEmpty(t)||ge(c)||t<=c},m("max",function(e){if(c=ma(e),E(i.$modelValue))return;if(o){var t=n.val();c<t&&(n.val(c),t=c<s?s:c),i.$setViewValue(t)}else i.$validate()}));h&&(i.$validators.step=o?function(){return!u.stepMismatch}:function(e,t){return i.$isEmpty(t)||ge(l)||function(e,t,n){var r=Number(e);if(!ga(r)||!ga(t)||!ga(n)){var i=Math.max(_a(r),_a(t),_a(n)),a=Math.pow(10,i);r*=a,t*=a,n*=a}return(r-t)%n==0}(t,s||0,l)},m("step",function(e){if(l=ma(e),E(i.$modelValue))return;o&&i.$viewValue!==n.val()?i.$setViewValue(n.val()):i.$validate()}));function m(e,t){n.attr(e,r[e]),r.$observe(e,t)}},checkbox:function(e,t,n,r,i,a,o,s){var c=ba(s,e,"ngTrueValue",n.ngTrueValue,!0),l=ba(s,e,"ngFalseValue",n.ngFalseValue,!1);t.on("click",function(e){r.$setViewValue(t[0].checked,e&&e.type)}),r.$render=function(){t[0].checked=r.$viewValue},r.$isEmpty=function(e){return!1===e},r.$formatters.push(function(e){return ke(e,c)}),r.$parsers.push(function(e){return e?c:l})},hidden:pe,button:pe,submit:pe,reset:pe,file:pe};function la(t){t.$formatters.push(function(e){return t.$isEmpty(e)?e:e.toString()})}function ua(e,r,i,a,t,o){var s,c=S(r[0].type);if(!t.android){var l=!1;r.on("compositionstart",function(){l=!0}),r.on("compositionend",function(){l=!1,u()})}var u=function(e){if(s&&(o.defer.cancel(s),s=null),!l){var t=r.val(),n=e&&e.type;"password"===c||i.ngTrim&&"false"===i.ngTrim||(t=Se(t)),(a.$viewValue!==t||""===t&&a.$$hasNativeValidators)&&a.$setViewValue(t,n)}};if(t.hasEvent("input"))r.on("input",u);else{var n=function(e,t,n){s||(s=o.defer(function(){s=null,t&&t.value===n||u(e)}))};r.on("keydown",function(e){var t=e.keyCode;91===t||15<t&&t<19||37<=t&&t<=40||n(e,this,this.value)}),t.hasEvent("paste")&&r.on("paste cut",n)}r.on("change",u),sa[c]&&a.$$hasNativeValidators&&c===i.type&&r.on(oa,function(e){if(!s){var t=this[f],n=t.badInput,r=t.typeMismatch;s=o.defer(function(){s=null,t.badInput===n&&t.typeMismatch===r||u(e)})}}),a.$render=function(){var e=a.$isEmpty(a.$viewValue)?"":a.$viewValue;r.val()!==e&&r.val(e)}}function fa(i,a){return function(e,t){var n,r;if(A(e))return e;if(ve(e)){if('"'===e.charAt(0)&&'"'===e.charAt(e.length-1)&&(e=e.substring(1,e.length-1)),Xi.test(e))return new Date(e);if(i.lastIndex=0,n=i.exec(e))return n.shift(),r=t?{yyyy:t.getFullYear(),MM:t.getMonth()+1,dd:t.getDate(),HH:t.getHours(),mm:t.getMinutes(),ss:t.getSeconds(),sss:t.getMilliseconds()/1e3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},fe(n,function(e,t){t<a.length&&(r[a[t]]=+e)}),new Date(r.yyyy,r.MM-1,r.dd,r.HH,r.mm,r.ss||0,1e3*r.sss||0)}return NaN}}function da(h,p,m,g){return function(e,t,n,r,i,a,o){ha(e,t,n,r),ua(0,t,n,r,i,a);var s,c,l,u=r&&r.$options&&r.$options.timezone;(r.$$parserName=h,r.$parsers.push(function(e){if(r.$isEmpty(e))return null;if(p.test(e)){var t=m(e,s);return u&&(t=V(t,u)),t}}),r.$formatters.push(function(e){if(e&&!A(e))throw Ya("datefmt","Expected `{0}` to be a date",e);return f(e)?((s=e)&&u&&(s=V(s,u,!0)),o("date")(e,g,u)):(s=null,"")}),_e(n.min)||n.ngMin)&&(r.$validators.min=function(e){return!f(e)||ge(c)||m(e)>=c},n.$observe("min",function(e){c=d(e),r.$validate()}));(_e(n.max)||n.ngMax)&&(r.$validators.max=function(e){return!f(e)||ge(l)||m(e)<=l},n.$observe("max",function(e){l=d(e),r.$validate()}));function f(e){return e&&!(e.getTime&&e.getTime()!=e.getTime())}function d(e){return _e(e)&&!A(e)?m(e)||void 0:e}}}function ha(e,n,t,r){var i=n[0];(r.$$hasNativeValidators=be(i.validity))&&r.$parsers.push(function(e){var t=n.prop(f)||{};return t.badInput||t.typeMismatch?void 0:e})}function pa(t){t.$$parserName="number",t.$parsers.push(function(e){return t.$isEmpty(e)?null:ea.test(e)?parseFloat(e):void 0}),t.$formatters.push(function(e){if(!t.$isEmpty(e)){if(!C(e))throw Ya("numfmt","Expected `{0}` to be a number",e);e=e.toString()}return e})}function ma(e){return _e(e)&&!C(e)&&(e=parseFloat(e)),E(e)?void 0:e}function ga(e){return(0|e)===e}function _a(e){var t=e.toString(),n=t.indexOf(".");if(-1!==n)return t.length-n-1;if(-1<e&&e<1){var r=/e-(\d+)$/.exec(t);if(r)return Number(r[1])}return 0}function ba(e,t,n,r,i){var a;if(_e(r)){if(!(a=e(r)).constant)throw Ya("constexpr","Expected constant expression for `{0}`, but saw `{1}`.",n,r);return a(t)}return i}var va=["$browser","$sniffer","$filter","$parse",function(a,o,s,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,t,n,r){if(r[0]){var i=S(n.type);"range"!==i||n.hasOwnProperty("ngInputRange")||(i="text"),(ca[i]||ca.text)(e,t,n,r[0],o,a,s,c)}}}}}],ya=/^(true|false|\d+)$/,wa=function(){return{restrict:"A",priority:100,compile:function(e,t){return ya.test(t.ngValue)?function(e,t,n){n.$set("value",e.$eval(n.ngValue))}:function(e,t,n){e.$watch(n.ngValue,function(e){n.$set("value",e)})}}}},Ca=["$compile",function(r){return{restrict:"AC",compile:function(e){return r.$$addBindingClass(e),function(e,t,n){r.$$addBindingInfo(t,n.ngBind),t=t[0],e.$watch(n.ngBind,function(e){t.textContent=ge(e)?"":e})}}}}],Aa=["$interpolate","$compile",function(i,a){return{compile:function(e){return a.$$addBindingClass(e),function(e,t,n){var r=i(t.attr(n.$attr.ngBindTemplate));a.$$addBindingInfo(t,r.expressions),t=t[0],n.$observe("ngBindTemplate",function(e){t.textContent=ge(e)?"":e})}}}}],Sa=["$sce","$parse","$compile",function(a,n,o){return{restrict:"A",compile:function(e,t){var r=n(t.ngBindHtml),i=n(t.ngBindHtml,function(e){return a.valueOf(e)});return o.$$addBindingClass(e),function(t,n,e){o.$$addBindingInfo(n,e.ngBindHtml),t.$watch(i,function(){var e=r(t);n.html(a.getTrustedHtml(e)||"")})}}}}],Ta=x({restrict:"A",require:"ngModel",link:function(e,t,n,r){r.$viewChangeListeners.push(function(){e.$eval(n.ngChange)})}});function xa(n,m){return n="ngClass"+n,["$animate",function(d){return{restrict:"AC",link:function(s,c,a){var l;function u(e){var t=f(e,1);a.$addClass(t)}function f(e,t){var n=c.data("$classCounts")||Oe(),r=[];return fe(e,function(e){(0<t||n[e])&&(n[e]=(n[e]||0)+t,n[e]===+(0<t)&&r.push(e))}),c.data("$classCounts",n),r.join(" ")}function t(e){if(!0===m||(1&s.$index)===m){var t=p(e||[]);if(l){if(!ke(e,l)){var n=p(l);a=h(i=t,r=n),o=h(r,i),a=f(a,1),o=f(o,-1),a&&a.length&&d.addClass(c,a),o&&o.length&&d.removeClass(c,o)}}else u(t)}var r,i,a,o;l=ye(e)?e.map(function(e){return je(e)}):je(e)}a.$observe("class",function(e){t(s.$eval(a[n]))}),"ngClass"!==n&&s.$watch("$index",function(e,t){var n,r=1&e;if(r!==(1&t)){var i=p(l);r===m?u(i):(n=f(i,-1),a.$removeClass(n))}}),s.$watch(a[n],t,!0)}};function h(e,t){var n=[];e:for(var r=0;r<e.length;r++){for(var i=e[r],a=0;a<t.length;a++)if(i===t[a])continue e;n.push(i)}return n}function p(e){var n=[];return ye(e)?(fe(e,function(e){n=n.concat(p(e))}),n):ve(e)?e.split(" "):be(e)?(fe(e,function(e,t){e&&(n=n.concat(t.split(" ")))}),n):e}}]}var ka=xa("",!0),Ea=xa("Odd",0),Da=xa("Even",1),Ia=Ui({compile:function(e,t){t.$set("ngCloak",void 0),e.removeClass("ng-cloak")}}),Pa=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],Ma={},$a={blur:!0,focus:!0};fe("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var o=fn("ng-"+a);Ma[o]=["$parse","$rootScope",function(n,i){return{restrict:"A",compile:function(e,t){var r=n(t[o],null,!0);return function(n,e){e.on(a,function(e){var t=function(){r(n,{$event:e})};$a[a]&&i.$$phase?n.$evalAsync(t):n.$apply(t)})}}}}]});var Oa=["$animate","$compile",function(c,l){return{multiElement:!0,transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(e,n,r,t,i){var a,o,s;e.$watch(r.ngIf,function(e){e?o||i(function(e,t){o=t,e[e.length++]=l.$$createComment("end ngIf",r.ngIf),a={clone:e},c.enter(e,n.parent(),n)}):(s&&(s.remove(),s=null),o&&(o.$destroy(),o=null),a&&(s=$e(a.clone),c.leave(s).done(function(e){!1!==e&&(s=null)}),a=null))})}}}],Ra=["$templateRequest","$anchorScroll","$animate",function(g,_,b){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element",controller:v.noop,compile:function(e,t){var n=t.ngInclude||t.src,p=t.onload||"",m=t.autoscroll;return function(o,s,e,c,l){var u,t,f,d=0,h=function(){t&&(t.remove(),t=null),u&&(u.$destroy(),u=null),f&&(b.leave(f).done(function(e){!1!==e&&(t=null)}),t=f,f=null)};o.$watch(n,function(r){var i=function(e){!1===e||!_e(m)||m&&!o.$eval(m)||_()},a=++d;r?(g(r,!0).then(function(e){if(!o.$$destroyed&&a===d){var t=o.$new();c.template=e;var n=l(t,function(e){h(),b.enter(e,null,s).done(i)});f=n,(u=t).$emit("$includeContentLoaded",r),o.$eval(p)}},function(){o.$$destroyed||a===d&&(h(),o.$emit("$includeContentError",r))}),o.$emit("$includeContentRequested",r)):(h(),c.template=null)})}}}}],Na=["$compile",function(i){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(e,t,n,r){if(H.call(t[0]).match(/SVG/))return t.empty(),void i(at(r.template,j.document).childNodes)(e,function(e){t.append(e)},{futureParentElement:t});t.html(r.template),i(t.contents())(e)}}}],La=Ui({priority:450,compile:function(){return{pre:function(e,t,n){e.$eval(n.ngInit)}}}}),Fa=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(e,t,n,r){var i=t.attr(n.$attr.ngList)||", ",a="false"!==n.ngTrim,o=a?Se(i):i;r.$parsers.push(function(e){if(!ge(e)){var t=[];return e&&fe(e.split(o),function(e){e&&t.push(a?Se(e):e)}),t}}),r.$formatters.push(function(e){if(ye(e))return e.join(i)}),r.$isEmpty=function(e){return!e||!e.length}}}},Ga="ng-valid",ja="ng-invalid",Ba="ng-pristine",Ua="ng-dirty",Ha="ng-untouched",Wa="ng-touched",qa="ng-pending",za="ng-empty",Va="ng-not-empty",Ya=w("ngModel"),Ka=["$scope","$exceptionHandler","$attrs","$element","$parse","$animate","$timeout","$rootScope","$q","$interpolate",function(a,t,i,o,s,n,c,l,u,e){this.$viewValue=Number.NaN,this.$modelValue=Number.NaN,this.$$rawModelValue=void 0,this.$validators={},this.$asyncValidators={},this.$parsers=[],this.$formatters=[],this.$viewChangeListeners=[],this.$untouched=!0,this.$touched=!1,this.$pristine=!0,this.$dirty=!1,this.$valid=!0,this.$invalid=!1,this.$error={},this.$$success={},this.$pending=void 0,this.$name=e(i.name||"",!1)(a),this.$$parentForm=qi;var f,d=s(i.ngModel),h=d.assign,p=d,m=h,g=null,_=this;this.$$setOptions=function(e){if((_.$options=e)&&e.getterSetter){var n=s(i.ngModel+"()"),r=s(i.ngModel+"($$$p)");p=function(e){var t=d(e);return we(t)&&(t=n(e)),t},m=function(e,t){we(d(e))?r(e,{$$$p:t}):h(e,t)}}else if(!d.assign)throw Ya("nonassign","Expression '{0}' is non-assignable. Element: {1}",i.ngModel,Ie(o))},this.$render=pe,this.$isEmpty=function(e){return ge(e)||""===e||null===e||e!=e},this.$$updateEmptyClasses=function(e){_.$isEmpty(e)?(n.removeClass(o,Va),n.addClass(o,za)):(n.removeClass(o,za),n.addClass(o,Va))};var b=0;Ja({ctrl:this,$element:o,set:function(e,t){e[t]=!0},unset:function(e,t){delete e[t]},$animate:n}),this.$setPristine=function(){_.$dirty=!1,_.$pristine=!0,n.removeClass(o,Ua),n.addClass(o,Ba)},this.$setDirty=function(){_.$dirty=!0,_.$pristine=!1,n.removeClass(o,Ba),n.addClass(o,Ua),_.$$parentForm.$setDirty()},this.$setUntouched=function(){_.$touched=!1,_.$untouched=!0,n.setClass(o,Ha,Wa)},this.$setTouched=function(){_.$touched=!0,_.$untouched=!1,n.setClass(o,Wa,Ha)},this.$rollbackViewValue=function(){c.cancel(g),_.$viewValue=_.$$lastCommittedViewValue,_.$render()},this.$validate=function(){if(!E(_.$modelValue)){var e=_.$$lastCommittedViewValue,t=_.$$rawModelValue,n=_.$valid,r=_.$modelValue,i=_.$options&&_.$options.allowInvalid;_.$$runValidators(t,e,function(e){i||n===e||(_.$modelValue=e?t:void 0,_.$modelValue!==r&&_.$$writeModelToScope())})}},this.$$runValidators=function(r,i,t){var a,o,s,n=++b;(function(){var e=_.$$parserName||"parse";{if(!ge(f))return f||(fe(_.$validators,function(e,t){c(t,null)}),fe(_.$asyncValidators,function(e,t){c(t,null)})),c(e,f),f;c(e,null)}return!0})()?(a=!0,fe(_.$validators,function(e,t){var n=e(r,i);a=a&&n,c(t,n)}),a||(fe(_.$asyncValidators,function(e,t){c(t,null)}),0)?(o=[],s=!0,fe(_.$asyncValidators,function(e,t){var n=e(r,i);if(!I(n))throw Ya("nopromise","Expected asynchronous validator to return a promise but got '{0}' instead.",n);c(t,void 0),o.push(n.then(function(){c(t,!0)},function(){c(t,s=!1)}))}),o.length?u.all(o).then(function(){e(s)},pe):e(!0)):e(!1)):e(!1);function c(e,t){n===b&&_.$setValidity(e,t)}function e(e){n===b&&t(e)}},this.$commitViewValue=function(){var e=_.$viewValue;c.cancel(g),(_.$$lastCommittedViewValue!==e||""===e&&_.$$hasNativeValidators)&&(_.$$updateEmptyClasses(e),_.$$lastCommittedViewValue=e,_.$pristine&&this.$setDirty(),this.$$parseAndValidate())},this.$$parseAndValidate=function(){var t=_.$$lastCommittedViewValue;if(f=!ge(t)||void 0)for(var e=0;e<_.$parsers.length;e++)if(ge(t=_.$parsers[e](t))){f=!1;break}E(_.$modelValue)&&(_.$modelValue=p(a));var n=_.$modelValue,r=_.$options&&_.$options.allowInvalid;function i(){_.$modelValue!==n&&_.$$writeModelToScope()}_.$$rawModelValue=t,r&&(_.$modelValue=t,i()),_.$$runValidators(t,_.$$lastCommittedViewValue,function(e){r||(_.$modelValue=e?t:void 0,i())})},this.$$writeModelToScope=function(){m(a,_.$modelValue),fe(_.$viewChangeListeners,function(e){try{e()}catch(e){t(e)}})},this.$setViewValue=function(e,t){_.$viewValue=e,_.$options&&!_.$options.updateOnDefault||_.$$debounceViewValueCommit(t)},this.$$debounceViewValueCommit=function(e){var t,n=0,r=_.$options;r&&_e(r.debounce)&&(C(t=r.debounce)?n=t:C(t[e])?n=t[e]:C(t.default)&&(n=t.default)),c.cancel(g),n?g=c(function(){_.$commitViewValue()},n):l.$$phase?_.$commitViewValue():a.$apply(function(){_.$commitViewValue()})},a.$watch(function(){var e=p(a);if(e!==_.$modelValue&&(_.$modelValue==_.$modelValue||e==e)){_.$modelValue=_.$$rawModelValue=e,f=void 0;for(var t=_.$formatters,n=t.length,r=e;n--;)r=t[n](r);_.$viewValue!==r&&(_.$$updateEmptyClasses(r),_.$viewValue=_.$$lastCommittedViewValue=r,_.$render(),_.$$runValidators(_.$modelValue,_.$viewValue,pe))}return e})}],Qa=["$rootScope",function(a){return{restrict:"A",require:["ngModel","^?form","^?ngModelOptions"],controller:Ka,priority:1,compile:function(e){return e.addClass(Ba).addClass(Ha).addClass(Ga),{pre:function(e,t,n,r){var i=r[0],a=r[1]||i.$$parentForm;i.$$setOptions(r[2]&&r[2].$options),a.$addControl(i),n.$observe("name",function(e){i.$name!==e&&i.$$parentForm.$$renameControl(i,e)}),e.$on("$destroy",function(){i.$$parentForm.$removeControl(i)})},post:function(e,t,n,r){var i=r[0];i.$options&&i.$options.updateOn&&t.on(i.$options.updateOn,function(e){i.$$debounceViewValueCommit(e&&e.type)}),t.on("blur",function(){i.$touched||(a.$$phase?e.$evalAsync(i.$setTouched):e.$apply(i.$setTouched))})}}}}}],Xa=/(\s+|^)default(\s+|$)/,Za=function(){return{restrict:"A",controller:["$scope","$attrs",function(e,t){var n=this;this.$options=R(e.$eval(t.ngModelOptions)),_e(this.$options.updateOn)?(this.$options.updateOnDefault=!1,this.$options.updateOn=Se(this.$options.updateOn.replace(Xa,function(){return n.$options.updateOnDefault=!0," "}))):this.$options.updateOnDefault=!0}]}};function Ja(e){var i=e.ctrl,n=e.$element,r={},a=e.set,o=e.unset,s=e.$animate;function c(e,t){t&&!r[e]?(s.addClass(n,e),r[e]=!0):!t&&r[e]&&(s.removeClass(n,e),r[e]=!1)}function l(e,t){e=e?"-"+Pe(e,"-"):"",c(Ga+e,!0===t),c(ja+e,!1===t)}r[ja]=!(r[Ga]=n.hasClass(Ga)),i.$setValidity=function(e,t,n){ge(t)?function(e,t,n){i[e]||(i[e]={});a(i[e],t,n)}("$pending",e,n):function(e,t,n){i[e]&&o(i[e],t,n);eo(i[e])&&(i[e]=void 0)}("$pending",e,n);Ae(t)?t?(o(i.$error,e,n),a(i.$$success,e,n)):(a(i.$error,e,n),o(i.$$success,e,n)):(o(i.$error,e,n),o(i.$$success,e,n));i.$pending?(c(qa,!0),i.$valid=i.$invalid=void 0,l("",null)):(c(qa,!1),i.$valid=eo(i.$error),i.$invalid=!i.$valid,l("",i.$valid));var r;r=i.$pending&&i.$pending[e]?void 0:!i.$error[e]&&(!!i.$$success[e]||null);l(e,r),i.$$parentForm.$setValidity(e,r,i)}}function eo(e){if(e)for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}var to=Ui({terminal:!0,priority:1e3}),no=w("ngOptions"),ro=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+group\s+by\s+([\s\S]+?))?(?:\s+disable\s+when\s+([\s\S]+?))?\s+for\s+(?:([$\w][$\w]*)|(?:\(\s*([$\w][$\w]*)\s*,\s*([$\w][$\w]*)\s*\)))\s+in\s+([\s\S]+?)(?:\s+track\s+by\s+([\s\S]+?))?$/,io=["$compile","$document","$parse",function(w,C,S){var A=j.document.createElement("option"),T=j.document.createElement("optgroup");return{restrict:"A",terminal:!0,require:["select","ngModel"],link:{pre:function(e,t,n,r){r[0].registerOption=pe},post:function(e,a,t,n){for(var o,s=n[0],c=n[1],l=t.multiple,r=0,i=a.children(),u=i.length;r<u;r++)if(""===i[r].value){o=i.eq(r);break}var f,d=!!o,h=!1,p=ue(A.cloneNode(!1));p.val("?");var m=function(e,t,d){var f=e.match(ro);if(!f)throw no("iexp","Expected expression in form of '_select_ (as _label_)? for (_key_,)?_value_ in _collection_' but got '{0}'. Element: {1}",e,Ie(t));var n=f[5]||f[7],r=f[6],i=/ as /.test(f[0])&&f[1],h=f[9],a=S(f[2]?f[1]:n),p=i&&S(i)||a,o=h&&S(h),m=h?function(e,t){return o(d,t)}:function(e){return Pt(e)},g=function(e,t){return m(e,w(e,t))},_=S(f[2]||f[1]),b=S(f[3]||""),v=S(f[4]||""),y=S(f[8]),s={},w=r?function(e,t){return s[r]=t,s[n]=e,s}:function(e){return s[n]=e,s};function C(e,t,n,r,i){this.selectValue=e,this.viewValue=t,this.label=n,this.group=r,this.disabled=i}function A(e){var t;if(!r&&O(e))t=e;else for(var n in t=[],e)e.hasOwnProperty(n)&&"$"!==n.charAt(0)&&t.push(n);return t}return{trackBy:h,getTrackByValue:g,getWatchables:S(y,function(e){for(var t=[],n=A(e=e||[]),r=n.length,i=0;i<r;i++){var a=e===n?i:n[i],o=e[a],s=w(o,a),c=m(o,s);if(t.push(c),f[2]||f[1]){var l=_(d,s);t.push(l)}if(f[4]){var u=v(d,s);t.push(u)}}return t}),getOptions:function(){for(var e=[],t={},n=y(d)||[],r=A(n),i=r.length,a=0;a<i;a++){var o=n===r?a:r[a],s=n[o],c=w(s,o),l=p(d,c),u=m(l,c),f=new C(u,l,_(d,c),b(d,c),v(d,c));e.push(f),t[u]=f}return{items:e,selectValueMap:t,getOptionFromViewValue:function(e){return t[g(e)]},getViewValueFromOption:function(e){return h?R(e.viewValue):e.viewValue}}}}}(t.ngOptions,a,e),g=C[0].createDocumentFragment(),_=function(){d?h&&o.removeAttr("selected"):o.remove()},b=function(){p.remove()};function v(e,t){var n,r,i=A.cloneNode(!1);t.appendChild(i),r=i,((n=e).element=r).disabled=n.disabled,n.label!==r.label&&(r.label=n.label,r.textContent=n.label),r.value=n.selectValue}function y(){var e=f&&s.readValue();if(f)for(var t=f.items.length-1;0<=t;t--){var n=f.items[t];_e(n.group)?Ct(n.element.parentNode):Ct(n.element)}f=m.getOptions();var r={};if(d&&a.prepend(o),f.items.forEach(function(e){var t;_e(e.group)?((t=r[e.group])||(t=T.cloneNode(!1),g.appendChild(t),t.label=null===e.group?"null":e.group,r[e.group]=t),v(e,t)):v(e,g)}),a[0].appendChild(g),c.$render(),!c.$isEmpty(e)){var i=s.readValue();(m.trackBy||l?ke(e,i):e===i)||(c.$setViewValue(i),c.$render())}}l?(c.$isEmpty=function(e){return!e||0===e.length},s.writeValue=function(e){f.items.forEach(function(e){e.element.selected=!1}),e&&e.forEach(function(e){var t=f.getOptionFromViewValue(e);t&&(t.element.selected=!0)})},s.readValue=function(){var e=a.val()||[],n=[];return fe(e,function(e){var t=f.selectValueMap[e];t&&!t.disabled&&n.push(f.getViewValueFromOption(t))}),n},m.trackBy&&e.$watchCollection(function(){if(ye(c.$viewValue))return c.$viewValue.map(function(e){return m.getTrackByValue(e)})},function(){c.$render()})):(s.writeValue=function(e){var t=f.selectValueMap[a.val()],n=f.getOptionFromViewValue(e);t&&t.element.removeAttribute("selected"),n?(a[0].value!==n.selectValue&&(b(),_(),a[0].value=n.selectValue,n.element.selected=!0),n.element.setAttribute("selected","selected")):null===e||d?(b(),d||a.prepend(o),a.val(""),h&&(o.prop("selected",!0),o.attr("selected",!0))):(_(),a.prepend(p),a.val("?"),p.prop("selected",!0),p.attr("selected",!0))},s.readValue=function(){var e=f.selectValueMap[a.val()];return e&&!e.disabled?(_(),b(),f.getViewValueFromOption(e)):null},m.trackBy&&e.$watch(function(){return m.getTrackByValue(c.$viewValue)},function(){c.$render()})),d?(o.remove(),w(o)(e),o[0].nodeType===Le?(h=!1,s.registerOption=function(e,t){""===t.val()&&(h=!0,(o=t).removeClass("ng-scope"),c.$render(),t.on("$destroy",function(){o=void 0,h=!1}))}):(o.removeClass("ng-scope"),h=!0)):o=ue(A.cloneNode(!1)),a.empty(),y(),e.$watchCollection(m.getWatchables,y)}}}}],ao=["$locale","$interpolate","$log",function(p,m,g){var _=/{}/g,b=/^when(Minus)?(.+)$/;return{link:function(i,a,o){var s,e=o.count,c=o.$attr.when&&a.attr(o.$attr.when),l=o.offset||0,u=i.$eval(c)||{},f={},t=m.startSymbol(),n=m.endSymbol(),r=t+e+"-"+l+n,d=v.noop;function h(e){a.text(e||"")}fe(o,function(e,t){var n=b.exec(t);if(n){var r=(n[1]?"-":"")+S(n[2]);u[r]=a.attr(o.$attr[t])}}),fe(u,function(e,t){f[t]=m(e.replace(_,r))}),i.$watch(e,function(e){var t=parseFloat(e),n=E(t);if(n||t in u||(t=p.pluralCat(t-l)),!(t===s||n&&E(s))){d();var r=f[t];ge(r)?(null!=e&&g.debug("ngPluralize: no rule defined for '"+t+"' in "+c),d=pe,h()):d=i.$watch(r,h),s=t}})}}}],oo=["$parse","$animate","$compile",function(c,I,l){var P="$$NG_REMOVED",M=w("ngRepeat"),$=function(e,t,n,r,i,a,o){e[n]=r,i&&(e[i]=a),e.$index=t,e.$first=0===t,e.$last=t===o-1,e.$middle=!(e.$first||e.$last),e.$odd=!(e.$even=0==(1&t))};return{restrict:"A",multiElement:!0,transclude:"element",priority:1e3,terminal:!0,$$tlb:!0,compile:function(e,t){var C=t.ngRepeat,A=l.$$createComment("end ngRepeat",C),n=C.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)(?:\s+as\s+([\s\S]+?))?(?:\s+track\s+by\s+([\s\S]+?))?\s*$/);if(!n)throw M("iexp","Expected expression in form of '_item_ in _collection_[ track by _id_]' but got '{0}'.",C);var r=n[1],i=n[2],S=n[3],a=n[4];if(!(n=r.match(/^(?:(\s*[$\w]+)|\(\s*([$\w]+)\s*,\s*([$\w]+)\s*\))$/)))throw M("iidexp","'_item_' in '_item_ in _collection_' should be an identifier or '(_key_, _value_)' expression, but got '{0}'.",r);var o,T,x,k,E=n[3]||n[1],D=n[2];if(S&&(!/^[$a-zA-Z_][$a-zA-Z0-9_]*$/.test(S)||/^(null|undefined|this|\$index|\$first|\$middle|\$last|\$even|\$odd|\$parent|\$root|\$id)$/.test(S)))throw M("badident","alias '{0}' is invalid --- must be a valid JS identifier which is not a reserved name.",S);var s={$id:Pt};return a?o=c(a):(x=function(e,t){return Pt(t)},k=function(e){return e}),function(b,v,e,t,y){o&&(T=function(e,t,n){return D&&(s[D]=e),s[E]=t,s.$index=n,o(b,s)});var w=Oe();b.$watchCollection(i,function(e){var r,t,n,i,a,o,s,c,l,u,f,d,h,p=v[0],m=Oe();if(S&&(b[S]=e),O(e))l=e,c=T||x;else for(var g in c=T||k,l=[],e)B.call(e,g)&&"$"!==g.charAt(0)&&l.push(g);for(i=l.length,f=new Array(i),r=0;r<i;r++)if(a=e===l?r:l[r],o=e[a],s=c(a,o,r),w[s])u=w[s],delete w[s],m[s]=u,f[r]=u;else{if(m[s])throw fe(f,function(e){e&&e.scope&&(w[e.id]=e)}),M("dupes","Duplicates in a repeater are not allowed. Use 'track by' expression to specify unique keys. Repeater: {0}, Duplicate key: {1}, Duplicate value: {2}",C,s,o);f[r]={id:s,scope:void 0,clone:void 0},m[s]=!0}for(var _ in w){if(d=$e((u=w[_]).clone),I.leave(d),d[0].parentNode)for(r=0,t=d.length;r<t;r++)d[r][P]=!0;u.scope.$destroy()}for(r=0;r<i;r++)if(a=e===l?r:l[r],o=e[a],(u=f[r]).scope){for(n=p;(n=n.nextSibling)&&n[P];);u.clone[0]!==n&&I.move($e(u.clone),null,p),p=(h=u).clone[h.clone.length-1],$(u.scope,r,E,o,D,a,i)}else y(function(e,t){u.scope=t;var n=A.cloneNode(!1);e[e.length++]=n,I.enter(e,null,p),p=n,u.clone=e,m[u.id]=u,$(u.scope,r,E,o,D,a,i)});w=m})}}}}],so="ng-hide",co="ng-hide-animate",lo=["$animate",function(r){return{restrict:"A",multiElement:!0,link:function(e,t,n){e.$watch(n.ngShow,function(e){r[e?"removeClass":"addClass"](t,so,{tempClasses:co})})}}}],uo=["$animate",function(r){return{restrict:"A",multiElement:!0,link:function(e,t,n){e.$watch(n.ngHide,function(e){r[e?"addClass":"removeClass"](t,so,{tempClasses:co})})}}}],fo=Ui(function(e,n,t){e.$watch(t.ngStyle,function(e,t){t&&e!==t&&fe(t,function(e,t){n.css(t,"")}),e&&n.css(e)},!0)}),ho=["$animate","$compile",function(u,f){return{require:"ngSwitch",controller:["$scope",function(){this.cases={}}],link:function(e,t,n,i){var r=n.ngSwitch||n.on,a=[],o=[],s=[],c=[],l=function(t,n){return function(e){!1!==e&&t.splice(n,1)}};e.$watch(r,function(e){for(var t,n;s.length;)u.cancel(s.pop());for(t=0,n=c.length;t<n;++t){var r=$e(o[t].clone);c[t].$destroy(),(s[t]=u.leave(r)).done(l(s,t))}o.length=0,c.length=0,(a=i.cases["!"+e]||i.cases["?"])&&fe(a,function(i){i.transclude(function(e,t){c.push(t);var n=i.element;e[e.length++]=f.$$createComment("end ngSwitchWhen");var r={clone:e};o.push(r),u.enter(e,n.parent(),n)})})})}}}],po=Ui({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){fe(n.ngSwitchWhen.split(n.ngSwitchWhenSeparator).sort().filter(function(e,t,n){return n[t-1]!==e}),function(e){r.cases["!"+e]=r.cases["!"+e]||[],r.cases["!"+e].push({transclude:i,element:t})})}}),mo=Ui({transclude:"element",priority:1200,require:"^ngSwitch",multiElement:!0,link:function(e,t,n,r,i){r.cases["?"]=r.cases["?"]||[],r.cases["?"].push({transclude:i,element:t})}}),go=w("ngTransclude"),_o=["$compile",function(t){return{restrict:"EAC",terminal:!0,compile:function(e){var s=t(e.contents());return e.empty(),function(e,n,t,r,i){if(!i)throw go("orphan","Illegal use of ngTransclude directive in the template! No parent directive that requires a transclusion found. Element: {0}",Ie(n));t.ngTransclude===t.$attr.ngTransclude&&(t.ngTransclude="");var a=t.ngTransclude||t.ngTranscludeSlot;function o(){s(e,function(e){n.append(e)})}i(function(e,t){e.length?n.append(e):(o(),t.$destroy())},null,a),a&&!i.isSlotFilled(a)&&o()}}}}],bo=["$templateCache",function(i){return{restrict:"E",terminal:!0,compile:function(e,t){if("text/ng-template"===t.type){var n=t.id,r=e[0].text;i.put(n,r)}}}}],vo={$setViewValue:pe,$render:pe};var yo=["$element","$scope",function(n,e){var o=this,i=new Mt;o.ngModelCtrl=vo,o.unknownOption=ue(j.document.createElement("option")),o.renderUnknownOption=function(e){var t="? "+Pt(e)+" ?";o.unknownOption.val(t),n.prepend(o.unknownOption),n.val(t)},e.$on("$destroy",function(){o.renderUnknownOption=pe}),o.removeUnknownOption=function(){o.unknownOption.parent()&&o.unknownOption.remove()},o.readValue=function(){return o.removeUnknownOption(),n.val()},o.writeValue=function(e){o.hasOption(e)?(o.removeUnknownOption(),n.val(e),""===e&&o.emptyOption.prop("selected",!0)):null==e&&o.emptyOption?(o.removeUnknownOption(),n.val("")):o.renderUnknownOption(e)},o.addOption=function(e,t){if(t[0].nodeType!==Le){ce(e,'"option value"'),""===e&&(o.emptyOption=t);var n,r=i.get(e)||0;i.put(e,r+1),o.ngModelCtrl.$render(),(n=t)[0].hasAttribute("selected")&&(n[0].selected=!0)}},o.removeOption=function(e){var t=i.get(e);t&&(1===t?(i.remove(e),""===e&&(o.emptyOption=void 0)):i.put(e,t-1))},o.hasOption=function(e){return!!i.get(e)},o.registerOption=function(e,n,r,t,i){var a;t?r.$observe("value",function(e){_e(a)&&o.removeOption(a),a=e,o.addOption(e,n)}):i?e.$watch(i,function(e,t){r.$set("value",e),t!==e&&o.removeOption(t),o.addOption(e,n)}):o.addOption(r.value,n);n.on("$destroy",function(){o.removeOption(r.value),o.ngModelCtrl.$render()})}}],wo=function(){return{restrict:"E",require:["select","?ngModel"],controller:yo,priority:1,link:{pre:function(e,n,t,r){var i=r[1];if(!i)return;var a=r[0];if(a.ngModelCtrl=i,n.on("change",function(){e.$apply(function(){i.$setViewValue(a.readValue())})}),t.multiple){a.readValue=function(){var t=[];return fe(n.find("option"),function(e){e.selected&&t.push(e.value)}),t},a.writeValue=function(e){var t=new Mt(e);fe(n.find("option"),function(e){e.selected=_e(t.get(e.value))})};var o,s=NaN;e.$watch(function(){s!==i.$viewValue||ke(o,i.$viewValue)||(o=je(i.$viewValue),i.$render()),s=i.$viewValue}),i.$isEmpty=function(e){return!e||0===e.length}}},post:function(e,t,n,r){var i=r[1];if(!i)return;var a=r[0];i.$render=function(){a.writeValue(i.$viewValue)}}}}},Co=["$interpolate",function(n){return{restrict:"E",priority:100,compile:function(e,t){var o,s;return _e(t.ngValue)?o=!0:_e(t.value)?o=n(t.value,!0):(s=n(e.text(),!0))||t.$set("value",e.text()),function(e,t,n){var r="$selectController",i=t.parent(),a=i.data(r)||i.parent().data(r);a&&a.registerOption(e,t,n,o,s)}}}}],Ao=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){r&&(n.required=!0,r.$validators.required=function(e,t){return!n.required||!r.$isEmpty(t)},n.$observe("required",function(){r.$validate()}))}}},So=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i,a=n.ngPattern||n.pattern;n.$observe("pattern",function(e){if(ve(e)&&0<e.length&&(e=new RegExp("^"+e+"$")),e&&!e.test)throw w("ngPattern")("noregexp","Expected {0} to be a RegExp but was {1}. Element: {2}",a,e,Ie(t));i=e||void 0,r.$validate()}),r.$validators.pattern=function(e,t){return r.$isEmpty(t)||ge(i)||i.test(t)}}}}},To=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=-1;n.$observe("maxlength",function(e){var t=m(e);i=E(t)?-1:t,r.$validate()}),r.$validators.maxlength=function(e,t){return i<0||r.$isEmpty(t)||t.length<=i}}}}},xo=function(){return{restrict:"A",require:"?ngModel",link:function(e,t,n,r){if(r){var i=0;n.$observe("minlength",function(e){i=m(e)||0,r.$validate()}),r.$validators.minlength=function(e,t){return r.$isEmpty(t)||t.length>=i}}}}};j.angular.bootstrap?j.console&&console.log("WARNING: Tried to load angular more than once."):(!function(){var i;if(!oe){var e=L();(o=ge(e)?j.jQuery:e?j[e]:void 0)&&o.fn.on?(de((ue=o).fn,{scope:At.scope,isolateScope:At.isolateScope,controller:At.controller,injector:At.injector,inheritedData:At.inheritedData}),i=o.cleanData,o.cleanData=function(e){for(var t,n,r=0;null!=(n=e[r]);r++)(t=o._data(n,"events"))&&t.$destroy&&o(n).triggerHandler("$destroy");i(e)}):ue=ct,v.element=ue,oe=!0}}(),de(v,{bootstrap:ne,copy:R,extend:de,merge:n,equals:ke,element:ue,forEach:fe,injector:Ut,noop:pe,bind:De,toJson:G,fromJson:W,identity:me,isUndefined:ge,isDefined:_e,isString:ve,isFunction:we,isObject:be,isNumber:C,isElement:$,isArray:ye,version:Ue,isDate:A,lowercase:S,uppercase:u,callbacks:{$$counter:0},getTestability:ie,$$minErr:w,$$csp:N,reloadWithDebugInfo:re}),(g=function(e){var u=w("$injector"),n=w("ng");function t(e,t,n){return e[t]||(e[t]=n())}var r=t(e,"angular",Object);return r.$$minErr=r.$$minErr||w,t(r,"module",function(){var e={};return function(s,c,l){return function(e,t){if("hasOwnProperty"===e)throw n("badname","hasOwnProperty is not a valid {0} name",t)}(s,"module"),c&&e.hasOwnProperty(s)&&(e[s]=null),t(e,s,function(){if(!c)throw u("nomod","Module '{0}' is not available! You either misspelled the module name or forgot to load it. If registering a module ensure that you specify the dependencies as the second argument.",s);var i=[],e=[],t=[],n=r("$injector","invoke","push",e),a={_invokeQueue:i,_configBlocks:e,_runBlocks:t,requires:c,name:s,provider:o("$provide","provider"),factory:o("$provide","factory"),service:o("$provide","service"),value:r("$provide","value"),constant:r("$provide","constant","unshift"),decorator:o("$provide","decorator"),animation:o("$animateProvider","register"),filter:o("$filterProvider","register"),controller:o("$controllerProvider","register"),directive:o("$compileProvider","directive"),component:o("$compileProvider","component"),config:n,run:function(e){return t.push(e),this}};return l&&n(l),a;function r(e,t,n,r){return r||(r=i),function(){return r[n||"push"]([e,t,arguments]),a}}function o(n,r){return function(e,t){return t&&we(t)&&(t.$$moduleName=s),i.push([n,r,arguments]),a}}})}})}(j))("ng",["ngLocale"],["$provide",function(e){e.provider({$$sanitizeUri:Zr}),e.provider("$compile",cn).directive({a:Hi,input:va,textarea:va,form:Ki,script:bo,select:wo,option:Co,ngBind:Ca,ngBindHtml:Sa,ngBindTemplate:Aa,ngClass:ka,ngClassEven:Da,ngClassOdd:Ea,ngCloak:Ia,ngController:Pa,ngForm:Qi,ngHide:uo,ngIf:Oa,ngInclude:Ra,ngInit:La,ngNonBindable:to,ngPluralize:ao,ngRepeat:oo,ngShow:lo,ngStyle:fo,ngSwitch:ho,ngSwitchWhen:po,ngSwitchDefault:mo,ngOptions:io,ngTransclude:_o,ngModel:Qa,ngList:Fa,ngChange:Ta,pattern:So,ngPattern:So,required:Ao,ngRequired:Ao,minlength:xo,ngMinlength:xo,maxlength:To,ngMaxlength:To,ngValue:wa,ngModelOptions:Za}).directive({ngInclude:Na}).directive(Wi).directive(Ma),e.provider({$anchorScroll:Ht,$animate:Xt,$animateCss:en,$$animateJs:Kt,$$animateQueue:Qt,$$AnimateRunner:Jt,$$animateAsyncRun:Zt,$browser:nn,$cacheFactory:rn,$controller:gn,$document:_n,$exceptionHandler:bn,$filter:gi,$$forceReflow:vn,$interpolate:Gn,$interval:jn,$http:Rn,$httpParamSerializer:En,$httpParamSerializerJQLike:Dn,$httpBackend:Ln,$xhrFactory:Nn,$jsonpCallbacks:Bn,$location:ar,$log:or,$parse:zr,$rootScope:Xr,$q:Vr,$$q:Yr,$sce:ri,$sceDelegate:ni,$sniffer:ii,$templateCache:an,$templateRequest:oi,$$testability:si,$timeout:ci,$window:hi,$$rAF:Qr,$$jqLite:It,$$HashMap:$t,$$cookieReader:mi})}]),v.module("ngLocale",[],["$provide",function(e){var i="one",a="other";e.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],SHORTDAY:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],SHORTMONTH:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],STANDALONEMONTH:["January","February","March","April","May","June","July","August","September","October","November","December"],WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a",short:"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-¤",negSuf:"",posPre:"¤",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(e,t){var n=0|e,r=function(e,t){var n,r,i=t;void 0===i&&(i=Math.min((n=e,-1==(r=(n+="").indexOf("."))?0:n.length-r-1),3));var a=Math.pow(10,i);return{v:i,f:(e*a|0)%a}}(e,t);return 1==n&&0==r.v?i:a}})}]),ue(j.document).ready(function(){te(j.document,ne)}))}(window),!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend('<style type="text/css">@charset "UTF-8";[ng\\:cloak],[ng-cloak],[data-ng-cloak],[x-ng-cloak],.ng-cloak,.x-ng-cloak,.ng-hide:not(.ng-hide-animate){display:none !important;}ng\\:form{display:block;}.ng-animate-shim{visibility:hidden;}.ng-anchor{position:absolute;}</style>'),function(l,e){"use strict";var oe,se,ce,le,Y=1,ue="-add",fe="-remove",de="ng-",A="ng-animate",K="$$ngAnimateChildren";se=void 0===l.ontransitionend&&void 0!==l.onwebkittransitionend?("-webkit-",oe="WebkitTransition","webkitTransitionEnd transitionend"):(oe="transition","transitionend"),le=void 0===l.onanimationend&&void 0!==l.onwebkitanimationend?("-webkit-",ce="WebkitAnimation","webkitAnimationEnd animationend"):(ce="animation","animationend");var i="Duration",he="TimingFunction",a="PlayState",n=ce+"Delay",pe=ce+i,r=oe+"Delay",t=oe+i,o=e.$$minErr("ng");function u(e,t,n){if(!e)throw o("areq","Argument '{0}' is {1}",t||"?",n||"required");return e}function S(e,t){return e||t?e?t?($e(e)&&(e=e.join(" ")),$e(t)&&(t=t.join(" ")),e+" "+t):e:t:""}function me(e,n,r){var i="";return e=$e(e)?e:e&&te(e)&&e.length?e.split(/\s+/):[],Me(e,function(e,t){e&&0<e.length&&(i+=0<t?" ":"",i+=r?n+e:e+n)}),i}function Q(e){if(!e[0])return e;for(var t=0;t<e.length;t++){var n=e[t];if(n.nodeType==Y)return n}}function T(c){return function(e,t){var n,r,i,a,o,s;t.addClass&&(n=c,r=e,i=t.addClass,Me(r,function(e){n.addClass(e,i)}),t.addClass=null),t.removeClass&&(a=c,o=e,s=t.removeClass,Me(o,function(e){a.removeClass(e,s)}),t.removeClass=null)}}function ge(e){if(!(e=e||{}).$$prepared){var t=e.domOperation||Oe;e.domOperation=function(){e.$$domOperationFired=!0,t(),t=Oe},e.$$prepared=!0}return e}function _e(e,t){be(e,t),ve(e,t)}function be(e,t){t.from&&(e.css(t.from),t.from=null)}function ve(e,t){t.to&&(e.css(t.to),t.to=null)}function X(e,t,n){var r=t.options||{},i=n.options||{},a=(r.addClass||"")+" "+(i.addClass||""),o=(r.removeClass||"")+" "+(i.removeClass||""),s=function(i,e,t){var n={};i=r(i),e=r(e),Me(e,function(e,t){n[t]=1}),t=r(t),Me(t,function(e,t){n[t]=1===n[t]?null:-1});var a={addClass:"",removeClass:""};function r(e){te(e)&&(e=e.split(" "));var t={};return Me(e,function(e){e.length&&(t[e]=!0)}),t}return Me(n,function(e,t){var n,r;1===e?(n="addClass",r=!i[t]||i[t+fe]):-1===e&&(n="removeClass",r=i[t]||i[t+ue]),r&&(a[n].length&&(a[n]+=" "),a[n]+=t)}),a}(e.attr("class"),a,o);i.preparationClasses&&(r.preparationClasses=Z(i.preparationClasses,r.preparationClasses),delete i.preparationClasses);var c=r.domOperation!==Oe?r.domOperation:null;return d(r,i),c&&(r.domOperation=c),s.addClass?r.addClass=s.addClass:r.addClass=null,s.removeClass?r.removeClass=s.removeClass:r.removeClass=null,t.addClass=r.addClass,t.removeClass=r.removeClass,r}function ye(e){return e instanceof re?e[0]:e}function we(e,t){var n=t?"-"+t+"s":"";return Ae(e,[r,n]),[r,n]}function Ce(e,t){var n=t?"paused":"",r=ce+a;return Ae(e,[r,n]),[r,n]}function Ae(e,t){var n=t[0],r=t[1];e.style[n]=r}function Z(e,t){return e?t?e+" "+t:e:t}var s=["$interpolate",function(a){return{link:function(e,t,n){var r=n.ngAnimateChildren;function i(e){e="on"===e||"true"===e,t.data(K,e)}te(r)&&0===r.length?t.data(K,!0):(i(a(r)(e)),n.$observe("ngAnimateChildren",i))}}}],Se="$$animateCss",f={transitionDuration:t,transitionDelay:r,transitionProperty:oe+"Property",animationDuration:pe,animationDelay:n,animationIterationCount:ce+"IterationCount"},Te={transitionDuration:t,transitionDelay:r,animationDuration:pe,animationDelay:n};function xe(e,t){return[t?n:r,e+"s"]}function ke(e,t,n){var o=Object.create(null),s=e.getComputedStyle(t)||{};return Me(n,function(e,t){var n,r,i=s[e];if(i){var a=i.charAt(0);("-"===a||"+"===a||0<=a)&&(n=0,r=i.split(/\s*,\s*/),Me(r,function(e){"s"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e=parseFloat(e)||0,n=n?Math.max(e,n):e}),i=n),0===i&&(i=null),o[t]=i}}),o}function Ee(e){return 0===e||null!=e}function De(e,t){var n=oe,r=e+"s";return t?n+=i:r+=" linear all",[n,r]}function c(){var n=Object.create(null);return{flush:function(){n=Object.create(null)},count:function(e){var t=n[e];return t?t.total:0},get:function(e){var t=n[e];return t&&t.value},put:function(e,t){n[e]?n[e].total++:n[e]={total:1,value:t}}}}function Ie(t,n,e){Me(e,function(e){t[e]=J(t[e])?t[e]:n.style.getPropertyValue(e)})}var Pe,d,Me,$e,J,h,w,ee,te,ne,re,Oe,p=["$animateProvider",function(e){var ie=c(),ae=c();this.$get=["$window","$$jqLite","$$AnimateRunner","$timeout","$$forceReflow","$sniffer","$$rAFScheduler","$$animateQueue",function(Y,K,Q,X,n,Z,t,J){var ee=T(K),i=0;function te(e,t){var n="$$ngAnimateParentKey",r=e.parentNode;return(r[n]||(r[n]=++i))+"-"+e.getAttribute("class")+"-"+t}var r=[];function ne(e){r.push(e),t.waitUntilQuiet(function(){ie.flush(),ae.flush();for(var e=n(),t=0;t<r.length;t++)r[t](e);r.length=0})}function re(e,t,n){var r,i,a,o,s=(r=e,i=n,a=f,(o=ie.get(i))||"infinite"===(o=ke(Y,r,a)).animationIterationCount&&(o.animationIterationCount=1),ie.put(i,o),o),c=s.animationDelay,l=s.transitionDelay;return s.maxDelay=c&&l?Math.max(c,l):c||l,s.maxDuration=Math.max(s.animationDuration*s.animationIterationCount,s.transitionDuration),s}return function(l,e){var u=e||{};u.$$prepared||(u=ge(Pe(u)));var f={},d=ye(l);if(!d||!d.parentNode||!J.enabled())return q();var t,n,h,a,o,r,i,p,m,g,_,b,v=[],s=l.attr("class"),c=(n={},(t=u)&&(t.to||t.from)&&(n.to=t.to,n.from=t.from),n),y=[];if(0===u.duration||!Z.animations&&!Z.transitions)return q();var w=u.event&&$e(u.event)?u.event.join(" "):u.event,C="",A="";w&&u.structural?C=me(w,de,!0):w&&(C=w),u.addClass&&(A+=me(u.addClass,ue)),u.removeClass&&(A.length&&(A+=" "),A+=me(u.removeClass,fe)),u.applyClassesEarly&&A.length&&ee(l,u);var S,T,x,k=[C,A].join(" ").trim(),E=s+" "+k,D=me(k,"-active"),I=c.to&&0<Object.keys(c.to).length;if(!(0<(u.keyframeStyle||"").length)&&!I&&!k)return q();if(0<u.stagger){var P=parseFloat(u.stagger);T={transitionDelay:P,animationDelay:P,transitionDuration:0,animationDuration:0}}else S=te(d,E),T=function(e,t,n,r){var i;if(0<ie.count(n)&&!(i=ae.get(n))){var a=me(t,"-stagger");K.addClass(e,a),(i=ke(Y,e,r)).animationDuration=Math.max(i.animationDuration,0),i.transitionDuration=Math.max(i.transitionDuration,0),K.removeClass(e,a),ae.put(n,i)}return i||{}}(d,k,S,Te);if(u.$$skipPreparationClasses||K.addClass(l,k),u.transitionStyle){var M=[oe,u.transitionStyle];Ae(d,M),v.push(M)}if(0<=u.duration){x=0<d.style[oe].length;var $=De(u.duration,x);Ae(d,$),v.push($)}if(u.keyframeStyle){var O=[ce,u.keyframeStyle];Ae(d,O),v.push(O)}var R=T?0<=u.staggerIndex?u.staggerIndex:ie.count(S):0,N=0===R;N&&!u.skipBlocking&&we(d,9999);var L=re(d,0,S),F=L.maxDelay;p=Math.max(F,0),g=L.maxDuration;var G,j={};if(j.hasTransitions=0<L.transitionDuration,j.hasAnimations=0<L.animationDuration,j.hasTransitionAll=j.hasTransitions&&"all"==L.transitionProperty,j.applyTransitionDuration=I&&(j.hasTransitions&&!j.hasTransitionAll||j.hasAnimations&&!j.hasTransitions),j.applyAnimationDuration=u.duration&&j.hasAnimations,j.applyTransitionDelay=Ee(u.delay)&&(j.applyTransitionDuration||j.hasTransitions),j.applyAnimationDelay=Ee(u.delay)&&j.hasAnimations,j.recalculateTimingStyles=0<A.length,(j.applyTransitionDuration||j.applyAnimationDuration)&&(g=u.duration?parseFloat(u.duration):g,j.applyTransitionDuration&&(j.hasTransitions=!0,L.transitionDuration=g,x=0<d.style[oe+"Property"].length,v.push(De(g,x))),j.applyAnimationDuration&&(j.hasAnimations=!0,L.animationDuration=g,v.push([pe,g+"s"]))),0===g&&!j.recalculateTimingStyles)return q();null!=u.delay&&("boolean"!=typeof u.delay&&(G=parseFloat(u.delay),p=Math.max(G,0)),j.applyTransitionDelay&&v.push(xe(G)),j.applyAnimationDelay&&v.push(xe(G,!0)));return null==u.duration&&0<L.transitionDuration&&(j.recalculateTimingStyles=j.recalculateTimingStyles||N),m=1e3*p,_=1e3*g,u.skipBlocking||(j.blockTransition=0<L.transitionDuration,j.blockKeyframeAnimation=0<L.animationDuration&&0<T.animationDelay&&0===T.animationDuration),u.from&&(u.cleanupStyles&&Ie(f,d,Object.keys(u.from)),be(l,u)),j.blockTransition||j.blockKeyframeAnimation?W(g):u.skipBlocking||we(d,!1),{$$willAnimate:!0,end:B,start:function(){if(!h)return r=new Q(i={end:B,cancel:U,resume:null,pause:null}),ne(V),r}};function B(){H()}function U(){H(!0)}function H(e){if(!(h||o&&a)){a=!(h=!0),u.$$skipPreparationClasses||K.removeClass(l,k),K.removeClass(l,D),Ce(d,!1),we(d,!1),Me(v,function(e){d.style[e[0]]=""}),ee(l,u),_e(l,u),Object.keys(f).length&&Me(f,function(e,t){e?d.style.setProperty(t,e):d.style.removeProperty(t)}),u.onDone&&u.onDone(),y&&y.length&&l.off(y.join(" "),z);var t=l.data(Se);t&&(X.cancel(t[0].timer),l.removeData(Se)),r&&r.complete(!e)}}function W(e){j.blockTransition&&we(d,e),j.blockKeyframeAnimation&&Ce(d,!!e)}function q(){return r=new Q({end:B,cancel:U}),ne(Oe),H(),{$$willAnimate:!1,start:function(){return r},end:B}}function z(e){e.stopPropagation();var t=e.originalEvent||e,n=t.$manualTimeStamp||Date.now(),r=parseFloat(t.elapsedTime.toFixed(3));Math.max(n-b,0)>=m&&g<=r&&(o=!0,H())}function V(){if(!h)if(d.parentNode){var e=function(e){if(o)a&&e&&(a=!1,H());else if(a=!e,L.animationDuration){var t=Ce(d,a);a?v.push(t):(r=t,i=(n=v).indexOf(r),0<=r&&n.splice(i,1))}var n,r,i},t=0<R&&(L.transitionDuration&&0===T.transitionDuration||L.animationDuration&&0===T.animationDuration)&&Math.max(T.animationDelay,T.transitionDelay);t?X(n,Math.floor(t*R*1e3),!1):n(),i.resume=function(){e(!0)},i.pause=function(){e(!1)}}else H();function n(){if(!h){if(W(!1),Me(v,function(e){var t=e[0],n=e[1];d.style[t]=n}),ee(l,u),K.addClass(l,D),j.recalculateTimingStyles){if(E=d.className+" "+k,S=te(d,E),L=re(d,0,S),F=L.maxDelay,p=Math.max(F,0),0===(g=L.maxDuration))return void H();j.hasTransitions=0<L.transitionDuration,j.hasAnimations=0<L.animationDuration}if(j.applyAnimationDelay&&(F="boolean"!=typeof u.delay&&Ee(u.delay)?parseFloat(u.delay):F,p=Math.max(F,0),L.animationDelay=F,G=xe(F,!0),v.push(G),d.style[G[0]]=G[1]),m=1e3*p,_=1e3*g,u.easing){var e,t=u.easing;j.hasTransitions&&(e=oe+he,v.push([e,t]),d.style[e]=t),j.hasAnimations&&(e=ce+he,v.push([e,t]),d.style[e]=t)}L.transitionDuration&&y.push(se),L.animationDuration&&y.push(le),b=Date.now();var n=m+1.5*_,r=b+n,i=l.data(Se)||[],a=!0;if(i.length){var o=i[0];(a=r>o.expectedEndTime)?X.cancel(o.timer):i.push(H)}if(a){var s=X(c,n,!1);i[0]={timer:s,expectedEndTime:r},i.push(H),l.data(Se,i)}y.length&&l.on(y.join(" "),z),u.to&&(u.cleanupStyles&&Ie(f,d,Object.keys(u.to)),ve(l,u))}}function c(){var e=l.data(Se);if(e){for(var t=1;t<e.length;t++)e[t]();l.removeData(Se)}}}}}]}],m=["$$animationProvider",function(e){e.drivers.push("$$animateCssDriver");var v="ng-animate-shim",y="ng-anchor-out";this.$get=["$animateCss","$rootScope","$$AnimateRunner","$rootElement","$sniffer","$$jqLite","$document",function(h,e,p,t,n,r,i){if(!n.animations&&!n.transitions)return Oe;var a,m=i[0].body,o=ye(t),g=re((a=o).parentNode&&11===a.parentNode.nodeType||m.contains(o)?o:m);T(r);return function(e){return e.from&&e.to?function(e,t,n,r){var i=s(e),a=s(t),o=[];if(Me(r,function(e){var t=function(e,t,i){var a=re(ye(t).cloneNode(!0)),o=_(u(a));t.addClass(v),i.addClass(v),a.addClass("ng-anchor"),g.append(a);var r,n,s=(n=h(a,{addClass:y,delay:!0,from:l(t)})).$$willAnimate?n:null;if(!s&&!(r=f()))return d();var c=s||r;return{start:function(){var e,t=c.start();return t.done(function(){if(t=null,!r&&(r=f()))return(t=r.start()).done(function(){t=null,d(),e.complete()}),t;d(),e.complete()}),e=new p({end:n,cancel:n});function n(){t&&t.end()}}};function l(e){var n={},r=ye(e).getBoundingClientRect();return Me(["width","height","top","left"],function(e){var t=r[e];switch(e){case"top":t+=m.scrollTop;break;case"left":t+=m.scrollLeft}n[e]=Math.floor(t)+"px"}),n}function u(e){return e.attr("class")||""}function f(){var e=_(u(i)),t=b(e,o),n=b(o,e),r=h(a,{to:l(i),addClass:"ng-anchor-in "+t,removeClass:y+" "+n,delay:!0});return r.$$willAnimate?r:null}function d(){a.remove(),t.removeClass(v),i.removeClass(v)}}(0,e.out,e.in);t&&o.push(t)}),!i&&!a&&0===o.length)return;return{start:function(){var t=[];i&&t.push(i.start()),a&&t.push(a.start()),Me(o,function(e){t.push(e.start())});var n=new p({end:e,cancel:e});return p.all(t,function(e){n.complete(e)}),n;function e(){Me(t,function(e){e.end()})}}}}(e.from,e.to,e.classes,e.anchors):s(e)};function _(e){return e.replace(/\bng-\S+\b/g,"")}function b(e,t){return te(e)&&(e=e.split(" ")),te(t)&&(t=t.split(" ")),e.filter(function(e){return-1===t.indexOf(e)}).join(" ")}function s(e){var t=e.element,n=e.options||{};e.structural&&(n.event=e.event,n.structural=!0,n.applyClassesEarly=!0,"leave"===e.event&&(n.onDone=n.domOperation)),n.preparationClasses&&(n.event=Z(n.event,n.preparationClasses));var r=h(t,n);return r.$$willAnimate?r:null}}]}],g=["$animateProvider",function(y){this.$get=["$injector","$$AnimateRunner","$$jqLite",function(_,b,e){var v=T(e);return function(e,t,n,r){var i=!1;3===arguments.length&&ee(n)&&(r=n,n=null),r=ge(r),n||(n=e.attr("class")||"",r.addClass&&(n+=" "+r.addClass),r.removeClass&&(n+=" "+r.removeClass));var a,o,s,c,l,u=r.addClass,f=r.removeClass,d=function(e){e=$e(e)?e:e.split(" ");for(var t=[],n={},r=0;r<e.length;r++){var i=e[r],a=y.$$registeredAnimations[i];a&&!n[i]&&(t.push(_.get(a)),n[i]=!0)}return t}(n);d.length&&(s="leave"==t?(c="leave","afterLeave"):(c="before"+t.charAt(0).toUpperCase()+t.substr(1),t),"enter"!==t&&"move"!==t&&(a=g(e,t,r,d,c)),o=g(e,t,r,d,s));if(a||o)return{$$willAnimate:!0,end:function(){return l?l.end():(p(),(l=new b).complete(!0)),l},start:function(){if(l)return l;var t;l=new b;var e=[];return a&&e.push(function(e){t=a(e)}),e.length?e.push(function(e){h(),e(!0)}):h(),o&&e.push(function(e){t=o(e)}),l.setHost({end:function(){r()},cancel:function(){r(!0)}}),b.chain(e,n),l;function n(e){p(),l.complete(e)}function r(e){i||((t||Oe)(e),n(e))}}};function h(){r.domOperation(),v(e,r)}function p(){i=!0,h(),_e(e,r)}function m(o,s,c,e,t){var n=[];return Me(e,function(e){var a=e[t];a&&n.push(function(){var t,n,r=!1,i=function(e){r||(r=!0,(n||Oe)(e),t.complete(!e))};return t=new b({end:function(){i()},cancel:function(){i(!0)}}),n=function(e,t,n,r,i){var a;switch(n){case"animate":a=[t,r.from,r.to,i];break;case"setClass":a=[t,u,f,i];break;case"addClass":a=[t,u,i];break;case"removeClass":a=[t,f,i];break;default:a=[t,i]}a.push(r);var o=e.apply(e,a);if(o)if(w(o.start)&&(o=o.start()),o instanceof b)o.done(i);else if(w(o))return o;return Oe}(a,o,s,c,function(e){i(!1===e)}),t})}),n}function g(e,t,n,r,i){var a,o,s=m(e,t,n,r,i);0===s.length&&("beforeSetClass"===i?(a=m(e,"removeClass",n,r,"beforeRemoveClass"),o=m(e,"addClass",n,r,"beforeAddClass")):"setClass"===i&&(a=m(e,"removeClass",n,r,"removeClass"),o=m(e,"addClass",n,r,"addClass")),a&&(s=s.concat(a)),o&&(s=s.concat(o)));if(0!==s.length)return function(e){var n=[];return s.length&&Me(s,function(e){n.push(e())}),n.length?b.all(n,e):e(),function(t){Me(n,function(e){t?e.cancel():e.end()})}}}}}]}],_=["$$animationProvider",function(e){e.drivers.push("$$animateJsDriver"),this.$get=["$$animateJs","$$AnimateRunner",function(a,o){return function(e){if(e.from&&e.to){var r=t(e.from),i=t(e.to);if(!r&&!i)return;return{start:function(){var e=[];r&&e.push(r.start()),i&&e.push(i.start()),o.all(e,function(e){t.complete(e)});var t=new o({end:n(),cancel:n()});return t;function n(){return function(){Me(e,function(e){e.end()})}}}}}return t(e)};function t(e){var t=e.element,n=e.event,r=e.options,i=e.classes;return a(t,n,i,r)}}]}],ie="data-ng-animate",ae="$ngAnimatePin",b=["$animateProvider",function(c){var r=" ",i=this.rules={skip:[],cancel:[],join:[]};function s(e,t){if(e&&t){var n=function(e){if(!e)return null;var t=e.split(r),n=Object.create(null);return Me(t,function(e){n[e]=!0}),n}(t);return e.split(r).some(function(e){return n[e]})}}function z(e,t,n,r){return i[e].some(function(e){return e(t,n,r)})}function V(e,t){var n=0<(e.addClass||"").length,r=0<(e.removeClass||"").length;return t?n&&r:n||r}i.join.push(function(e,t,n){return!t.structural&&V(t)}),i.skip.push(function(e,t,n){return!t.structural&&!V(t)}),i.skip.push(function(e,t,n){return"leave"==n.event&&t.structural}),i.skip.push(function(e,t,n){return n.structural&&2===n.state&&!t.structural}),i.cancel.push(function(e,t,n){return n.structural&&t.structural}),i.cancel.push(function(e,t,n){return 2===n.state&&t.structural}),i.cancel.push(function(e,t,n){if(n.structural)return!1;var r=t.addClass,i=t.removeClass,a=n.addClass,o=n.removeClass;return!(ne(r)&&ne(i)||ne(a)&&ne(o))&&(s(r,o)||s(i,a))}),this.$get=["$$rAF","$rootScope","$rootElement","$document","$$HashMap","$$animation","$$AnimateRunner","$templateRequest","$$jqLite","$$forceReflow",function(E,D,I,P,e,M,$,t,n,r){var O=new e,R=new e,N=null;var i=D.$watch(function(){return 0===t.totalPendingRequests},function(e){e&&(i(),D.$$postDigest(function(){D.$$postDigest(function(){null===N&&(N=!0)})}))}),L=Object.create(null),a=c.classNameFilter(),F=a?function(e){return a.test(e)}:function(){return!0},G=T(n);function j(e,t){return X(e,t,{})}var B=l.Node.prototype.contains||function(e){return this===e||!!(16&this.compareDocumentPosition(e))};function o(e,t,n){var r=Q(t);return e.filter(function(e){return!(e.node===r&&(!n||e.callback===n))})}function U(e,t){"close"!==e||t[0].parentNode||s.off(t)}var s={on:function(e,t,n){var r=Q(t);L[e]=L[e]||[],L[e].push({node:r,callback:n}),re(t).on("$destroy",function(){O.get(r)||s.off(e,t,n)})},off:function(e,t,n){if(1!==arguments.length||te(e)){var r=L[e];r&&(L[e]=1===arguments.length?null:o(r,t,n))}else for(var i in t=e,L)L[i]=o(L[i],t)},pin:function(e,t){u(h(e),"element","not an element"),u(h(t),"parentElement","not an element"),e.data(ae,t)},push:function(e,t,n,r){return(n=n||{}).domOperation=r,function(u,i,e){var a,f,o=Pe(e);(u=function(e){if(e instanceof re)switch(e.length){case 0:return e;case 1:if(e[0].nodeType===Y)return e;break;default:return re(Q(e))}if(e.nodeType===Y)return re(e)}(u))&&(a=ye(u),f=u.parent());o=ge(o);var s=new $,t=(n=!1,function(e){n?e():D.$$postDigest(function(){n=!0,e()})});var n;$e(o.addClass)&&(o.addClass=o.addClass.join(" "));o.addClass&&!te(o.addClass)&&(o.addClass=null);$e(o.removeClass)&&(o.removeClass=o.removeClass.join(" "));o.removeClass&&!te(o.removeClass)&&(o.removeClass=null);o.from&&!ee(o.from)&&(o.from=null);o.to&&!ee(o.to)&&(o.to=null);if(!a)return k(),s;var r=[a.className,o.addClass,o.removeClass].join(" ");if(!F(r))return k(),s;var c=0<=["enter","move","leave"].indexOf(i),l=P[0].hidden,d=!N||l||R.get(a),h=!d&&O.get(a)||{},p=!!h.state;d||p&&1==h.state||(d=!function(e,t,n){var r,i=re(P[0].body),a=W(e,i)||"HTML"===e[0].nodeName,o=W(e,I),s=!1,c=R.get(ye(e)),l=re.data(e[0],ae);l&&(t=l);t=ye(t);for(;t&&(o||(o=W(t,I)),t.nodeType===Y);){var u=O.get(t)||{};if(!s){var f=R.get(t);if(!0===f&&!1!==c){c=!0;break}!1===f&&(c=!1),s=u.structural}if(ne(r)||!0===r){var d=re.data(t,K);J(d)&&(r=d)}if(s&&!1===r)break;if(a||(a=W(t,i)),a&&o)break;t=o||!(l=re.data(t,ae))?t.parentNode:ye(l)}return(!s||r)&&!0!==c&&o&&a}(u,f));if(d)return l&&x(s,i,"start"),k(),l&&x(s,i,"close"),s;c&&(m=ye(u).querySelectorAll("["+ie+"]"),Me(m,function(e){var t=parseInt(e.getAttribute(ie)),n=O.get(e);if(n)switch(t){case 2:n.runner.end();case 1:O.remove(e)}}));var m;var g={structural:c,element:u,event:i,addClass:o.addClass,removeClass:o.removeClass,close:k,options:o,runner:s};if(p){var _=z("skip",u,g,h);if(_)return 2===h.state?(k(),s):(X(u,h,g),h.runner);var b=z("cancel",u,g,h);if(b)if(2===h.state)h.runner.end();else{if(!h.structural)return X(u,h,g),h.runner;h.close()}else{var v=z("join",u,g,h);if(v){if(2!==h.state)return y=u,C=o,A="",(w=c?i:null)&&(A=me(w,de,!0)),C.addClass&&(A=Z(A,me(C.addClass,ue))),C.removeClass&&(A=Z(A,me(C.removeClass,fe))),A.length&&(C.preparationClasses=A,y.addClass(A)),i=g.event=h.event,o=X(u,h,g),h.runner;j(u,g)}}}else j(u,g);var y,w,C,A;var S=g.structural;S||(S="animate"===g.event&&0<Object.keys(g.options.to||{}).length||V(g));if(!S)return k(),H(u),s;var T=(h.counter||0)+1;return g.counter=T,q(u,1,g),D.$$postDigest(function(){var e=O.get(a),t=!e;e=e||{};var n=0<(u.parent()||[]).length&&("animate"===e.event||e.structural||V(e));if(t||e.counter!==T||!n)return t&&(G(u,o),_e(u,o)),(t||c&&e.event!==i)&&(o.domOperation(),s.end()),void(n||H(u));i=!e.structural&&V(e,!0)?"setClass":e.event,q(u,2);var r=M(u,i,e.options);s.setHost(r),x(s,i,"start",{}),r.done(function(e){k(!e);var t=O.get(a);t&&t.counter===T&&H(ye(u)),x(s,i,"close",{})})}),s;function x(e,s,c,l){t(function(){var e,t,n,r,i,a,o=(e=f,t=s,n=ye(u),r=ye(e),i=[],(a=L[t])&&Me(a,function(e){B.call(e.node,n)?i.push(e.callback):"leave"===t&&B.call(e.node,r)&&i.push(e.callback)}),i);o.length?E(function(){Me(o,function(e){e(u,c,l)}),U(c,u)}):U(c,u)}),e.progress(s,c,l)}function k(e){var t,n;t=u,(n=o).preparationClasses&&(t.removeClass(n.preparationClasses),n.preparationClasses=null),n.activeClasses&&(t.removeClass(n.activeClasses),n.activeClasses=null),G(u,o),_e(u,o),o.domOperation(),s.complete(!e)}}(e,t,n)},enabled:function(e,t){var n=arguments.length;if(0===n)t=!!N;else if(h(e)){var r=ye(e);1===n?t=!R.get(r):R.put(r,!t)}else t=N=!!e;return t}};return s;function H(e){var t=ye(e);t.removeAttribute(ie),O.remove(t)}function W(e,t){return ye(e)===ye(t)}function q(e,t,n){(n=n||{}).state=t;var r=ye(e);r.setAttribute(ie,t);var i=O.get(r),a=i?d(i,n):n;O.put(r,a)}}]}],v=["$animateProvider",function(e){var v="ng-animate-ref",y=this.drivers=[],w="$$animationRunner";function C(e){return e.data(w)}this.$get=["$$jqLite","$rootScope","$injector","$$AnimateRunner","$$HashMap","$$rAFScheduler",function(f,d,h,p,m,g){var _=[],b=T(f);return function(t,n,r){r=ge(r);var e,i=0<=["enter","move","leave"].indexOf(n),a=new p({end:function(){u()},cancel:function(){u(!0)}});if(!y.length)return u(),a;e=a,t.data(w,e);var o,s=S(t.attr("class"),S(r.addClass,r.removeClass)),c=r.tempClasses;return c&&(s+=" "+c,r.tempClasses=null),i&&(o="ng-"+n+"-prepare",f.addClass(t,o)),_.push({element:t,classes:s,event:n,structural:i,options:r,beforeStart:function(){t.addClass(A),c&&f.addClass(t,c);o&&(f.removeClass(t,o),o=null)},close:u}),t.on("$destroy",l),1<_.length||d.$$postDigest(function(){var t=[];Me(_,function(e){C(e.element)?t.push(e):e.close()}),_.length=0;var e=function(u){var f=[],d={};Me(u,function(e,n){var t,r,i,a=e.element,o=ye(a),s=e.event,c=0<=["enter","move"].indexOf(s),l=e.structural?(r=(t=o).hasAttribute(v)?[t]:t.querySelectorAll("[ng-animate-ref]"),i=[],Me(r,function(e){var t=e.getAttribute(v);t&&t.length&&i.push(e)}),i):[];if(l.length){var u=c?"to":"from";Me(l,function(e){var t=e.getAttribute(v);d[t]=d[t]||{},d[t][u]={animationID:n,element:re(e)}})}else f.push(e)});var h={},p={};return Me(d,function(e,t){var n=e.from,r=e.to;if(n&&r){var i=u[n.animationID],a=u[r.animationID],o=n.animationID.toString();if(!p[o]){var s=p[o]={structural:!0,beforeStart:function(){i.beforeStart(),a.beforeStart()},close:function(){i.close(),a.close()},classes:function(e,t){e=e.split(" "),t=t.split(" ");for(var n=[],r=0;r<e.length;r++){var i=e[r];if("ng-"!==i.substring(0,3))for(var a=0;a<t.length;a++)if(i===t[a]){n.push(i);break}}return n.join(" ")}(i.classes,a.classes),from:i,to:a,anchors:[]};s.classes.length?f.push(s):(f.push(i),f.push(a))}p[o].anchors.push({out:n.element,in:r.element})}else{var c=n?n.animationID:r.animationID,l=c.toString();h[l]||(h[l]=!0,f.push(u[c]))}}),f}(t),n=[];Me(e,function(i){n.push({domNode:ye(i.from?i.from.element:i.element),fn:function(){i.beforeStart();var e,t=i.close;if(C(i.anchors?i.from.element||i.to.element:i.element)){var n=function(e){for(var t=y.length-1;0<=t;t--){var n=y[t],r=h.get(n),i=r(e);if(i)return i}}(i);n&&(e=n.start)}if(e){var r=e();r.done(function(e){t(!e)}),function(e,n){e.from&&e.to?(t(e.from.element),t(e.to.element)):t(e.element);function t(e){var t=C(e);t&&t.setHost(n)}}(i,r)}else t()}})}),g(function(e){var t,i={children:[]},a=new m;for(t=0;t<e.length;t++){var n=e[t];a.put(n.domNode,e[t]={domNode:n.domNode,fn:n.fn,children:[]})}for(t=0;t<e.length;t++)o(e[t]);return function(e){var t,n=[],r=[];for(t=0;t<e.children.length;t++)r.push(e.children[t]);var i=r.length,a=0,o=[];for(t=0;t<r.length;t++){var s=r[t];i<=0&&(i=a,a=0,n.push(o),o=[]),o.push(s.fn),s.children.forEach(function(e){a++,r.push(e)}),i--}return o.length&&n.push(o),n}(i);function o(e){if(e.processed)return e;e.processed=!0;var t,n=e.domNode,r=n.parentNode;for(a.put(n,e);r;){if(t=a.get(r)){t.processed||(t=o(t));break}r=r.parentNode}return(t||i).children.push(e),e}}(n))}),a;function l(){var e=C(t);!e||"leave"===n&&r.$$domOperationFired||e.end()}function u(e){t.off("$destroy",l),t.removeData(w),b(t,r),_e(t,r),r.domOperation(),c&&f.removeClass(t,c),t.removeClass(A),a.complete(!e)}}}]}];e.module("ngAnimate",[],function(){Oe=e.noop,Pe=e.copy,d=e.extend,re=e.element,Me=e.forEach,$e=e.isArray,te=e.isString,ee=e.isObject,ne=e.isUndefined,J=e.isDefined,w=e.isFunction,h=e.isElement}).directive("ngAnimateSwap",["$animate","$rootScope",function(s,e){return{restrict:"A",transclude:"element",terminal:!0,priority:600,link:function(t,n,e,r,i){var a,o;t.$watchCollection(e.ngAnimateSwap||e.for,function(e){a&&s.leave(a),o&&(o.$destroy(),o=null),(e||0===e)&&(o=t.$new(),i(o,function(e){a=e,s.enter(e,null,n)}))})}}}]).directive("ngAnimateChildren",s).factory("$$rAFScheduler",["$$rAF",function(n){var r,i;function e(e){r=r.concat(e),a()}return r=e.queue=[],e.waitUntilQuiet=function(e){i&&i(),i=n(function(){i=null,e(),a()})},e;function a(){if(r.length){for(var e=r.shift(),t=0;t<e.length;t++)e[t]();i||n(function(){i||a()})}}}]).provider("$$animateQueue",b).provider("$$animation",v).provider("$animateCss",p).provider("$$animateCssDriver",m).provider("$$animateJs",g).provider("$$animateJsDriver",_)}(window,window.angular),function(e,t){"use strict";var n=t.module("ngAria",["ng"]).provider("$aria",function(){var c={ariaHidden:!0,ariaChecked:!0,ariaReadonly:!0,ariaDisabled:!0,ariaRequired:!0,ariaInvalid:!0,ariaValue:!0,tabindex:!0,bindKeypress:!0,bindRoleForClick:!0};function e(i,a,o,s){return function(e,t,n){var r=n.$normalize(a);!c[r]||l(t,o)||n[r]||e.$watch(n[i],function(e){e=s?!e:!!e,t.attr(a,e)})}}this.config=function(e){c=t.extend(c,e)},this.$get=function(){return{config:function(e){return c[e]},$$watchExpr:e}}}),a=["BUTTON","A","INPUT","TEXTAREA","SELECT","DETAILS","SUMMARY"],l=function(e,t){if(-1!==t.indexOf(e[0].nodeName))return!0};n.directive("ngShow",["$aria",function(e){return e.$$watchExpr("ngShow","aria-hidden",[],!0)}]).directive("ngHide",["$aria",function(e){return e.$$watchExpr("ngHide","aria-hidden",[],!1)}]).directive("ngValue",["$aria",function(e){return e.$$watchExpr("ngValue","aria-checked",a,!1)}]).directive("ngChecked",["$aria",function(e){return e.$$watchExpr("ngChecked","aria-checked",a,!1)}]).directive("ngReadonly",["$aria",function(e){return e.$$watchExpr("ngReadonly","aria-readonly",a,!1)}]).directive("ngRequired",["$aria",function(e){return e.$$watchExpr("ngRequired","aria-required",a,!1)}]).directive("ngModel",["$aria",function(u){function f(e,t,n,r){return u.config(t)&&!n.attr(e)&&(r||!l(n,a))}function d(e,t){return!t.attr("role")&&t.attr("type")===e&&"INPUT"!==t[0].nodeName}return{restrict:"A",require:"ngModel",priority:200,compile:function(e,t){var n,r,i,l=(r=(n=t).type,i=n.role,"checkbox"===(r||i)||"menuitemcheckbox"===i?"checkbox":"radio"===(r||i)||"menuitemradio"===i?"radio":"range"===r||"progressbar"===i||"slider"===i?"range":"");return{pre:function(e,t,n,r){"checkbox"===l&&(r.$isEmpty=function(e){return!1===e})},post:function(e,n,r,i){var t=f("tabindex","tabindex",n,!1);function a(){return i.$modelValue}switch(l){case"radio":case"checkbox":d(l,n)&&n.attr("role",l),f("aria-checked","ariaChecked",n,!1)&&e.$watch(a,"radio"===l?function(e){var t=r.value==i.$viewValue;n.attr("aria-checked",t)}:function(){n.attr("aria-checked",!i.$isEmpty(i.$viewValue))}),t&&n.attr("tabindex",0);break;case"range":if(d(l,n)&&n.attr("role","slider"),u.config("ariaValue")){var o=!n.attr("aria-valuemin")&&(r.hasOwnProperty("min")||r.hasOwnProperty("ngMin")),s=!n.attr("aria-valuemax")&&(r.hasOwnProperty("max")||r.hasOwnProperty("ngMax")),c=!n.attr("aria-valuenow");o&&r.$observe("min",function(e){n.attr("aria-valuemin",e)}),s&&r.$observe("max",function(e){n.attr("aria-valuemax",e)}),c&&e.$watch(a,function(e){n.attr("aria-valuenow",e)})}t&&n.attr("tabindex",0)}!r.hasOwnProperty("ngRequired")&&i.$validators.required&&f("aria-required","ariaRequired",n,!1)&&r.$observe("required",function(){n.attr("aria-required",!!r.required)}),f("aria-invalid","ariaInvalid",n,!0)&&e.$watch(function(){return i.$invalid},function(e){n.attr("aria-invalid",!!e)})}}}}}]).directive("ngDisabled",["$aria",function(e){return e.$$watchExpr("ngDisabled","aria-disabled",a,!1)}]).directive("ngMessages",function(){return{restrict:"A",require:"?ngMessages",link:function(e,t,n,r){t.attr("aria-live")||t.attr("aria-live","assertive")}}}).directive("ngClick",["$aria","$parse",function(i,n){return{restrict:"A",compile:function(e,t){var r=n(t.ngClick,null,!0);return function(n,e,t){l(e,a)||(i.config("bindRoleForClick")&&!e.attr("role")&&e.attr("role","button"),i.config("tabindex")&&!e.attr("tabindex")&&e.attr("tabindex",0),i.config("bindKeypress")&&!t.ngKeypress&&e.on("keypress",function(e){var t=e.which||e.keyCode;32!==t&&13!==t||n.$apply(function(){r(n,{$event:e})})}))}}}}]).directive("ngDblclick",["$aria",function(r){return function(e,t,n){!r.config("tabindex")||t.attr("tabindex")||l(t,a)||t.attr("tabindex",0)}}])}(window,window.angular),function(e,l){"use strict";function t(e,s,t){var c=t.baseHref(),r=e[0];return function(e,t,n){r.cookie=function(e,t,n){var r,i;i=(n=n||{}).expires,r=l.isDefined(n.path)?n.path:c,l.isUndefined(t)&&(i="Thu, 01 Jan 1970 00:00:00 GMT",t=""),l.isString(i)&&(i=new Date(i));var a=encodeURIComponent(e)+"="+encodeURIComponent(t);a+=r?";path="+r:"",a+=n.domain?";domain="+n.domain:"",a+=i?";expires="+i.toUTCString():"";var o=(a+=n.secure?";secure":"").length+1;return 4096<o&&s.warn("Cookie '"+e+"' possibly not set or overflowed because it was too large ("+o+" > 4096 bytes)!"),a}(e,t,n)}}l.module("ngCookies",["ng"]).provider("$cookies",[function(){var t=this.defaults={};function i(e){return e?l.extend({},t,e):t}this.$get=["$$cookieReader","$$cookieWriter",function(t,r){return{get:function(e){return t()[e]},getObject:function(e){var t=this.get(e);return t?l.fromJson(t):t},getAll:function(){return t()},put:function(e,t,n){r(e,t,i(n))},putObject:function(e,t,n){this.put(e,l.toJson(t),n)},remove:function(e,t){r(e,void 0,i(t))}}}]}]),l.module("ngCookies").factory("$cookieStore",["$cookies",function(n){return{get:function(e){return n.getObject(e)},put:function(e,t){n.putObject(e,t)},remove:function(e){n.remove(e)}}}]),t.$inject=["$document","$log","$browser"],l.module("ngCookies").provider("$$cookieWriter",function(){this.$get=t})}(window,window.angular),function(n){"use strict";"function"==typeof define&&define.amd?define(["jquery"],function(e){return n(e,window,document)}):"object"==typeof exports?module.exports=function(e,t){return e||(e=window),t||(t="undefined"!=typeof window?require("jquery"):require("jquery")(e)),n(t,e,e.document)}:n(jQuery,window,document)}(function(U,E,y,H){"use strict";var p,b,t,e,k=function(A){this.$=function(e,t){return this.api(!0).$(e,t)},this._=function(e,t){return this.api(!0).rows(e,t).data()},this.api=function(e){return new b(e?at(this[p.iApiIndex]):this)},this.fnAddData=function(e,t){var n=this.api(!0),r=U.isArray(e)&&(U.isArray(e[0])||U.isPlainObject(e[0]))?n.rows.add(e):n.row.add(e);return(t===H||t)&&n.draw(),r.flatten().toArray()},this.fnAdjustColumnSizing=function(e){var t=this.api(!0).columns.adjust(),n=t.settings()[0],r=n.oScroll;e===H||e?t.draw(!1):""===r.sX&&""===r.sY||Be(n)},this.fnClearTable=function(e){var t=this.api(!0).clear();(e===H||e)&&t.draw()},this.fnClose=function(e){this.api(!0).row(e).child.hide()},this.fnDeleteRow=function(e,t,n){var r=this.api(!0),i=r.rows(e),a=i.settings()[0],o=a.aoData[i[0][0]];return i.remove(),t&&t.call(this,a,o),(n===H||n)&&r.draw(),o},this.fnDestroy=function(e){this.api(!0).destroy(e)},this.fnDraw=function(e){this.api(!0).draw(e)},this.fnFilter=function(e,t,n,r,i,a){var o=this.api(!0);null===t||t===H?o.search(e,n,r,a):o.column(t).search(e,n,r,a),o.draw()},this.fnGetData=function(e,t){var n=this.api(!0);if(e===H)return n.data().toArray();var r=e.nodeName?e.nodeName.toLowerCase():"";return t!==H||"td"==r||"th"==r?n.cell(e,t).data():n.row(e).data()||null},this.fnGetNodes=function(e){var t=this.api(!0);return e!==H?t.row(e).node():t.rows().nodes().flatten().toArray()},this.fnGetPosition=function(e){var t=this.api(!0),n=e.nodeName.toUpperCase();if("TR"==n)return t.row(e).index();if("TD"!=n&&"TH"!=n)return null;var r=t.cell(e).index();return[r.row,r.columnVisible,r.column]},this.fnIsOpen=function(e){return this.api(!0).row(e).child.isShown()},this.fnOpen=function(e,t,n){return this.api(!0).row(e).child(t,n).show().child()[0]},this.fnPageChange=function(e,t){var n=this.api(!0).page(e);(t===H||t)&&n.draw(!1)},this.fnSetColumnVis=function(e,t,n){var r=this.api(!0).column(e).visible(t);(n===H||n)&&r.columns.adjust().draw()},this.fnSettings=function(){return at(this[p.iApiIndex])},this.fnSort=function(e){this.api(!0).order(e).draw()},this.fnSortListener=function(e,t,n){this.api(!0).order.listener(e,t,n)},this.fnUpdate=function(e,t,n,r,i){var a=this.api(!0);return n===H||null===n?a.row(t).data(e):a.cell(t,n).data(e),(i===H||i)&&a.columns.adjust(),(r===H||r)&&a.draw(),0},this.fnVersionCheck=p.fnVersionCheck;var S=this,T=A===H,x=this.length;for(var e in T&&(A={}),this.oApi=this.internal=p.internal,k.ext.internal)e&&(this[e]=Rt(e));return this.each(function(){var a,o=1<x?ct({},A,!0):A,s=0,e=this.getAttribute("id"),c=!1,t=k.defaults,l=U(this);if("table"==this.nodeName.toLowerCase()){P(t),M(t.column),D(t,t,!0),D(t.column,t.column,!0),D(t,U.extend(o,l.data()),!0);var n=k.settings;for(s=0,a=n.length;s<a;s++){var r=n[s];if(r.nTable==this||r.nTHead&&r.nTHead.parentNode==this||r.nTFoot&&r.nTFoot.parentNode==this){var i=o.bRetrieve!==H?o.bRetrieve:t.bRetrieve,u=o.bDestroy!==H?o.bDestroy:t.bDestroy;if(T||i)return r.oInstance;if(u){r.oInstance.fnDestroy();break}return void ot(r,0,"Cannot reinitialise DataTable",3)}if(r.sTableId==this.id){n.splice(s,1);break}}null!==e&&""!==e||(e="DataTables_Table_"+k.ext._unique++,this.id=e);var f=U.extend(!0,{},k.models.oSettings,{sDestroyWidth:l[0].style.width,sInstance:e,sTableId:e});f.nTable=this,f.oApi=S.internal,f.oInit=o,n.push(f),f.oInstance=1===S.length?S:l.dataTable(),P(o),I(o.oLanguage),o.aLengthMenu&&!o.iDisplayLength&&(o.iDisplayLength=U.isArray(o.aLengthMenu[0])?o.aLengthMenu[0][0]:o.aLengthMenu[0]),o=ct(U.extend(!0,{},t),o),st(f.oFeatures,o,["bPaginate","bLengthChange","bFilter","bSort","bSortMulti","bInfo","bProcessing","bAutoWidth","bSortClasses","bServerSide","bDeferRender"]),st(f,o,["asStripeClasses","ajax","fnServerData","fnFormatNumber","sServerMethod","aaSorting","aaSortingFixed","aLengthMenu","sPaginationType","sAjaxSource","sAjaxDataProp","iStateDuration","sDom","bSortCellsTop","iTabIndex","fnStateLoadCallback","fnStateSaveCallback","renderer","searchDelay","rowId",["iCookieDuration","iStateDuration"],["oSearch","oPreviousSearch"],["aoSearchCols","aoPreSearchCols"],["iDisplayLength","_iDisplayLength"]]),st(f.oScroll,o,[["sScrollX","sX"],["sScrollXInner","sXInner"],["sScrollY","sY"],["bScrollCollapse","bCollapse"]]),st(f.oLanguage,o,"fnInfoCallback"),ut(f,"aoDrawCallback",o.fnDrawCallback,"user"),ut(f,"aoServerParams",o.fnServerParams,"user"),ut(f,"aoStateSaveParams",o.fnStateSaveParams,"user"),ut(f,"aoStateLoadParams",o.fnStateLoadParams,"user"),ut(f,"aoStateLoaded",o.fnStateLoaded,"user"),ut(f,"aoRowCallback",o.fnRowCallback,"user"),ut(f,"aoRowCreatedCallback",o.fnCreatedRow,"user"),ut(f,"aoHeaderCallback",o.fnHeaderCallback,"user"),ut(f,"aoFooterCallback",o.fnFooterCallback,"user"),ut(f,"aoInitComplete",o.fnInitComplete,"user"),ut(f,"aoPreDrawCallback",o.fnPreDrawCallback,"user"),f.rowIdFn=Q(o.rowId),$(f);var d=f.oClasses;if(U.extend(d,k.ext.classes,o.oClasses),l.addClass(d.sTable),f.iInitDisplayStart===H&&(f.iInitDisplayStart=o.iDisplayStart,f._iDisplayStart=o.iDisplayStart),null!==o.iDeferLoading){f.bDeferLoading=!0;var h=U.isArray(o.iDeferLoading);f._iRecordsDisplay=h?o.iDeferLoading[0]:o.iDeferLoading,f._iRecordsTotal=h?o.iDeferLoading[1]:o.iDeferLoading}var p=f.oLanguage;U.extend(!0,p,o.oLanguage),p.sUrl&&(U.ajax({dataType:"json",url:p.sUrl,success:function(e){I(e),D(t.oLanguage,e),U.extend(!0,p,e),Me(f)},error:function(){Me(f)}}),c=!0),null===o.asStripeClasses&&(f.asStripeClasses=[d.sStripeOdd,d.sStripeEven]);var m=f.asStripeClasses,g=l.children("tbody").find("tr").eq(0);-1!==U.inArray(!0,U.map(m,function(e,t){return g.hasClass(e)}))&&(U("tbody tr",this).removeClass(m.join(" ")),f.asDestroyStripes=m.slice());var _,b=[],v=this.getElementsByTagName("thead");if(0!==v.length&&(ue(f.aoHeader,v[0]),b=fe(f)),null===o.aoColumns)for(_=[],s=0,a=b.length;s<a;s++)_.push(null);else _=o.aoColumns;for(s=0,a=_.length;s<a;s++)O(f,b?b[s]:null);if(F(f,o.aoColumnDefs,_,function(e,t){R(f,e,t)}),g.length){var y=function(e,t){return null!==e.getAttribute("data-"+t)?t:null};U(g[0]).children("th, td").each(function(e,t){var n=f.aoColumns[e];if(n.mData===e){var r=y(t,"sort")||y(t,"order"),i=y(t,"filter")||y(t,"search");null===r&&null===i||(n.mData={_:e+".display",sort:null!==r?e+".@data-"+r:H,type:null!==r?e+".@data-"+r:H,filter:null!==i?e+".@data-"+i:H},R(f,e))}})}var w=f.oFeatures,C=function(){if(o.aaSorting===H){var e=f.aaSorting;for(s=0,a=e.length;s<a;s++)e[s][1]=f.aoColumns[s].asSorting[0]}tt(f),w.bSort&&ut(f,"aoDrawCallback",function(){if(f.bSorted){var e=Qe(f),n={};U.each(e,function(e,t){n[t.src]=t.dir}),ft(f,null,"order",[f,e,n]),Ze(f)}}),ut(f,"aoDrawCallback",function(){(f.bSorted||"ssp"===pt(f)||w.bDeferRender)&&tt(f)},"sc");var t=l.children("caption").each(function(){this._captionSide=U(this).css("caption-side")}),n=l.children("thead");0===n.length&&(n=U("<thead/>").appendTo(l)),f.nTHead=n[0];var r=l.children("tbody");0===r.length&&(r=U("<tbody/>").appendTo(l)),f.nTBody=r[0];var i=l.children("tfoot");if(0===i.length&&0<t.length&&(""!==f.oScroll.sX||""!==f.oScroll.sY)&&(i=U("<tfoot/>").appendTo(l)),0===i.length||0===i.children().length?l.addClass(d.sNoFooter):0<i.length&&(f.nTFoot=i[0],ue(f.aoFooter,f.nTFoot)),o.aaData)for(s=0;s<o.aaData.length;s++)G(f,o.aaData[s]);else(f.bDeferLoading||"dom"==pt(f))&&j(f,U(f.nTBody).children("tr"));f.aiDisplay=f.aiDisplayMaster.slice(),!(f.bInitialised=!0)===c&&Me(f)};o.bStateSave?(w.bStateSave=!0,ut(f,"aoDrawCallback",rt,"state_save"),it(f,o,C)):C()}else ot(null,0,"Non-table node initialisation ("+this.nodeName+")",2)}),S=null,this},n={},r=/[\r\n\u2028]/g,i=/<.*?>/g,a=/^\d{2,4}[\.\/\-]\d{1,2}[\.\/\-]\d{1,2}([T ]{1}\d{1,2}[:\.]\d{2}([\.:]\d{2})?)?$/,o=new RegExp("(\\"+["/",".","*","+","?","|","(",")","[","]","{","}","\\","$","^","-"].join("|\\")+")","g"),s=/[',$£€¥%\u2009\u202F\u20BD\u20a9\u20BArfkɃΞ]/gi,c=function(e){return!e||!0===e||"-"===e},h=function(e){var t=parseInt(e,10);return!isNaN(t)&&isFinite(e)?t:null},l=function(e,t){return n[t]||(n[t]=new RegExp(Ae(t),"g")),"string"==typeof e&&"."!==t?e.replace(/\./g,"").replace(n[t],"."):e},u=function(e,t,n){var r="string"==typeof e;return!!c(e)||(t&&r&&(e=l(e,t)),n&&r&&(e=e.replace(s,"")),!isNaN(parseFloat(e))&&isFinite(e))},f=function(e,t,n){return!!c(e)||((c(r=e)||"string"==typeof r)&&!!u(d(e),t,n)||null);var r},W=function(e,t,n){var r=[],i=0,a=e.length;if(n!==H)for(;i<a;i++)e[i]&&e[i][t]&&r.push(e[i][t][n]);else for(;i<a;i++)e[i]&&r.push(e[i][t]);return r},v=function(e,t,n,r){var i=[],a=0,o=t.length;if(r!==H)for(;a<o;a++)e[t[a]][n]&&i.push(e[t[a]][n][r]);else for(;a<o;a++)i.push(e[t[a]][n]);return i},m=function(e,t){var n,r=[];t===H?(t=0,n=e):(n=t,t=e);for(var i=t;i<n;i++)r.push(i);return r},w=function(e){for(var t=[],n=0,r=e.length;n<r;n++)e[n]&&t.push(e[n]);return t},d=function(e){return e.replace(i,"")},g=function(e){if(function(e){if(e.length<2)return!0;for(var t=e.slice().sort(),n=t[0],r=1,i=t.length;r<i;r++){if(t[r]===n)return!1;n=t[r]}return!0}(e))return e.slice();var t,n,r,i=[],a=e.length,o=0;e:for(n=0;n<a;n++){for(t=e[n],r=0;r<o;r++)if(i[r]===t)continue e;i.push(t),o++}return i};function _(n){var r,i,a={};U.each(n,function(e,t){(r=e.match(/^([^A-Z]+?)([A-Z])/))&&-1!=="a aa ai ao as b fn i m o s ".indexOf(r[1]+" ")&&(i=e.replace(r[0],r[2].toLowerCase()),a[i]=e,"o"===r[1]&&_(n[e]))}),n._hungarianMap=a}function D(n,r,i){var a;n._hungarianMap||_(n),U.each(r,function(e,t){(a=n._hungarianMap[e])===H||!i&&r[a]!==H||("o"===a.charAt(0)?(r[a]||(r[a]={}),U.extend(!0,r[a],r[e]),D(n[a],r[a],i)):r[a]=r[e])})}function I(e){var t=k.defaults.oLanguage,n=t.sDecimal;if(n&&$t(n),e){var r=e.sZeroRecords;!e.sEmptyTable&&r&&"No data available in table"===t.sEmptyTable&&st(e,e,"sZeroRecords","sEmptyTable"),!e.sLoadingRecords&&r&&"Loading..."===t.sLoadingRecords&&st(e,e,"sZeroRecords","sLoadingRecords"),e.sInfoThousands&&(e.sThousands=e.sInfoThousands);var i=e.sDecimal;i&&n!==i&&$t(i)}}k.util={throttle:function(r,e){var i,a,o=e!==H?e:200;return function(){var e=this,t=+new Date,n=arguments;i&&t<i+o?(clearTimeout(a),a=setTimeout(function(){i=H,r.apply(e,n)},o)):(i=t,r.apply(e,n))}},escapeRegex:function(e){return e.replace(o,"\\$1")}};var C=function(e,t,n){e[t]!==H&&(e[n]=e[t])};function P(e){C(e,"ordering","bSort"),C(e,"orderMulti","bSortMulti"),C(e,"orderClasses","bSortClasses"),C(e,"orderCellsTop","bSortCellsTop"),C(e,"order","aaSorting"),C(e,"orderFixed","aaSortingFixed"),C(e,"paging","bPaginate"),C(e,"pagingType","sPaginationType"),C(e,"pageLength","iDisplayLength"),C(e,"searching","bFilter"),"boolean"==typeof e.sScrollX&&(e.sScrollX=e.sScrollX?"100%":""),"boolean"==typeof e.scrollX&&(e.scrollX=e.scrollX?"100%":"");var t=e.aoSearchCols;if(t)for(var n=0,r=t.length;n<r;n++)t[n]&&D(k.models.oSearch,t[n])}function M(e){C(e,"orderable","bSortable"),C(e,"orderData","aDataSort"),C(e,"orderSequence","asSorting"),C(e,"orderDataType","sortDataType");var t=e.aDataSort;"number"!=typeof t||U.isArray(t)||(e.aDataSort=[t])}function $(e){if(!k.__browser){var t={};k.__browser=t;var n=U("<div/>").css({position:"fixed",top:0,left:-1*U(E).scrollLeft(),height:1,width:1,overflow:"hidden"}).append(U("<div/>").css({position:"absolute",top:1,left:1,width:100,overflow:"scroll"}).append(U("<div/>").css({width:"100%",height:10}))).appendTo("body"),r=n.children(),i=r.children();t.barWidth=r[0].offsetWidth-r[0].clientWidth,t.bScrollOversize=100===i[0].offsetWidth&&100!==r[0].clientWidth,t.bScrollbarLeft=1!==Math.round(i.offset().left),t.bBounding=!!n[0].getBoundingClientRect().width,n.remove()}U.extend(e.oBrowser,k.__browser),e.oScroll.iBarWidth=k.__browser.barWidth}function A(e,t,n,r,i,a){var o,s=r,c=!1;for(n!==H&&(o=n,c=!0);s!==i;)e.hasOwnProperty(s)&&(o=c?t(o,e[s],s,e):e[s],c=!0,s+=a);return o}function O(e,t){var n=k.defaults.column,r=e.aoColumns.length,i=U.extend({},k.models.oColumn,n,{nTh:t||y.createElement("th"),sTitle:n.sTitle?n.sTitle:t?t.innerHTML:"",aDataSort:n.aDataSort?n.aDataSort:[r],mData:n.mData?n.mData:r,idx:r});e.aoColumns.push(i);var a=e.aoPreSearchCols;a[r]=U.extend({},k.models.oSearch,a[r]),R(e,r,U(t).data())}function R(e,t,n){var r=e.aoColumns[t],i=e.oClasses,a=U(r.nTh);if(!r.sWidthOrig){r.sWidthOrig=a.attr("width")||null;var o=(a.attr("style")||"").match(/width:\s*(\d+[pxem%]+)/);o&&(r.sWidthOrig=o[1])}n!==H&&null!==n&&(M(n),D(k.defaults.column,n,!0),n.mDataProp===H||n.mData||(n.mData=n.mDataProp),n.sType&&(r._sManualType=n.sType),n.className&&!n.sClass&&(n.sClass=n.className),n.sClass&&a.addClass(n.sClass),U.extend(r,n),st(r,n,"sWidth","sWidthOrig"),n.iDataSort!==H&&(r.aDataSort=[n.iDataSort]),st(r,n,"aDataSort"));var s=r.mData,c=Q(s),l=r.mRender?Q(r.mRender):null,u=function(e){return"string"==typeof e&&-1!==e.indexOf("@")};r._bAttrSrc=U.isPlainObject(s)&&(u(s.sort)||u(s.type)||u(s.filter)),r._setter=null,r.fnGetData=function(e,t,n){var r=c(e,t,H,n);return l&&t?l(r,t,e,n):r},r.fnSetData=function(e,t,n){return X(s)(e,t,n)},"number"!=typeof s&&(e._rowReadObject=!0),e.oFeatures.bSort||(r.bSortable=!1,a.addClass(i.sSortableNone));var f=-1!==U.inArray("asc",r.asSorting),d=-1!==U.inArray("desc",r.asSorting);r.bSortable&&(f||d)?f&&!d?(r.sSortingClass=i.sSortableAsc,r.sSortingClassJUI=i.sSortJUIAscAllowed):!f&&d?(r.sSortingClass=i.sSortableDesc,r.sSortingClassJUI=i.sSortJUIDescAllowed):(r.sSortingClass=i.sSortable,r.sSortingClassJUI=i.sSortJUI):(r.sSortingClass=i.sSortableNone,r.sSortingClassJUI="")}function q(e){if(!1!==e.oFeatures.bAutoWidth){var t=e.aoColumns;We(e);for(var n=0,r=t.length;n<r;n++)t[n].nTh.style.width=t[n].sWidth}var i=e.oScroll;""===i.sY&&""===i.sX||Be(e),ft(e,null,"column-sizing",[e])}function z(e,t){var n=L(e,"bVisible");return"number"==typeof n[t]?n[t]:null}function S(e,t){var n=L(e,"bVisible"),r=U.inArray(t,n);return-1!==r?r:null}function N(e){var n=0;return U.each(e.aoColumns,function(e,t){t.bVisible&&"none"!==U(t.nTh).css("display")&&n++}),n}function L(e,n){var r=[];return U.map(e.aoColumns,function(e,t){e[n]&&r.push(t)}),r}function T(e){var t,n,r,i,a,o,s,c,l,u=e.aoColumns,f=e.aoData,d=k.ext.type.detect;for(t=0,n=u.length;t<n;t++)if(l=[],!(s=u[t]).sType&&s._sManualType)s.sType=s._sManualType;else if(!s.sType){for(r=0,i=d.length;r<i;r++){for(a=0,o=f.length;a<o&&(l[a]===H&&(l[a]=x(e,a,t,"type")),(c=d[r](l[a],e))||r===d.length-1)&&"html"!==c;a++);if(c){s.sType=c;break}}s.sType||(s.sType="string")}}function F(e,t,n,r){var i,a,o,s,c,l,u,f=e.aoColumns;if(t)for(i=t.length-1;0<=i;i--){var d=(u=t[i]).targets!==H?u.targets:u.aTargets;for(U.isArray(d)||(d=[d]),o=0,s=d.length;o<s;o++)if("number"==typeof d[o]&&0<=d[o]){for(;f.length<=d[o];)O(e);r(d[o],u)}else if("number"==typeof d[o]&&d[o]<0)r(f.length+d[o],u);else if("string"==typeof d[o])for(c=0,l=f.length;c<l;c++)("_all"==d[o]||U(f[c].nTh).hasClass(d[o]))&&r(c,u)}if(n)for(i=0,a=n.length;i<a;i++)r(i,n[i])}function G(e,t,n,r){var i=e.aoData.length,a=U.extend(!0,{},k.models.oRow,{src:n?"dom":"data",idx:i});a._aData=t,e.aoData.push(a);for(var o=e.aoColumns,s=0,c=o.length;s<c;s++)o[s].sType=null;e.aiDisplayMaster.push(i);var l=e.rowIdFn(t);return l!==H&&(e.aIds[l]=a),!n&&e.oFeatures.bDeferRender||re(e,i,n,r),i}function j(n,e){var r;return e instanceof U||(e=U(e)),e.map(function(e,t){return r=ne(n,t),G(n,r.data,t,r.cells)})}function x(e,t,n,r){var i=e.iDraw,a=e.aoColumns[n],o=e.aoData[t]._aData,s=a.sDefaultContent,c=a.fnGetData(o,r,{settings:e,row:t,col:n});if(c===H)return e.iDrawError!=i&&null===s&&(ot(e,0,"Requested unknown parameter "+("function"==typeof a.mData?"{function}":"'"+a.mData+"'")+" for row "+t+", column "+n,4),e.iDrawError=i),s;if(c!==o&&null!==c||null===s||r===H){if("function"==typeof c)return c.call(o)}else c=s;return null===c&&"display"==r?"":c}function B(e,t,n,r){var i=e.aoColumns[n],a=e.aoData[t]._aData;i.fnSetData(a,r,{settings:e,row:t,col:n})}var V=/\[.*?\]$/,Y=/\(\)$/;function K(e){return U.map(e.match(/(\\.|[^\.])+/g)||[""],function(e){return e.replace(/\\\./g,".")})}function Q(i){if(U.isPlainObject(i)){var a={};return U.each(i,function(e,t){t&&(a[e]=Q(t))}),function(e,t,n,r){var i=a[t]||a._;return i!==H?i(e,t,n,r):e}}if(null===i)return function(e){return e};if("function"==typeof i)return function(e,t,n,r){return i(e,t,n,r)};if("string"!=typeof i||-1===i.indexOf(".")&&-1===i.indexOf("[")&&-1===i.indexOf("("))return function(e,t){return e[i]};var h=function(e,t,n){var r,i,a,o;if(""!==n)for(var s=K(n),c=0,l=s.length;c<l;c++){if(r=s[c].match(V),i=s[c].match(Y),r){if(s[c]=s[c].replace(V,""),""!==s[c]&&(e=e[s[c]]),a=[],s.splice(0,c+1),o=s.join("."),U.isArray(e))for(var u=0,f=e.length;u<f;u++)a.push(h(e[u],t,o));var d=r[0].substring(1,r[0].length-1);e=""===d?a:a.join(d);break}if(i)s[c]=s[c].replace(Y,""),e=e[s[c]]();else{if(null===e||e[s[c]]===H)return H;e=e[s[c]]}}return e};return function(e,t){return h(e,t,i)}}function X(r){if(U.isPlainObject(r))return X(r._);if(null===r)return function(){};if("function"==typeof r)return function(e,t,n){r(e,"set",t,n)};if("string"!=typeof r||-1===r.indexOf(".")&&-1===r.indexOf("[")&&-1===r.indexOf("("))return function(e,t){e[r]=t};var p=function(e,t,n){for(var r,i,a,o,s,c=K(n),l=c[c.length-1],u=0,f=c.length-1;u<f;u++){if(i=c[u].match(V),a=c[u].match(Y),i){if(c[u]=c[u].replace(V,""),e[c[u]]=[],(r=c.slice()).splice(0,u+1),s=r.join("."),U.isArray(t))for(var d=0,h=t.length;d<h;d++)p(o={},t[d],s),e[c[u]].push(o);else e[c[u]]=t;return}a&&(c[u]=c[u].replace(Y,""),e=e[c[u]](t)),null!==e[c[u]]&&e[c[u]]!==H||(e[c[u]]={}),e=e[c[u]]}l.match(Y)?e=e[l.replace(Y,"")](t):e[l.replace(V,"")]=t};return function(e,t){return p(e,t,r)}}function Z(e){return W(e.aoData,"_aData")}function J(e){e.aoData.length=0,e.aiDisplayMaster.length=0,e.aiDisplay.length=0,e.aIds={}}function ee(e,t,n){for(var r=-1,i=0,a=e.length;i<a;i++)e[i]==t?r=i:e[i]>t&&e[i]--;-1!=r&&n===H&&e.splice(r,1)}function te(n,r,e,t){var i,a,o=n.aoData[r],s=function(e,t){for(;e.childNodes.length;)e.removeChild(e.firstChild);e.innerHTML=x(n,r,t,"display")};if("dom"!==e&&(e&&"auto"!==e||"dom"!==o.src)){var c=o.anCells;if(c)if(t!==H)s(c[t],t);else for(i=0,a=c.length;i<a;i++)s(c[i],i)}else o._aData=ne(n,o,t,t===H?H:o._aData).data;o._aSortData=null,o._aFilterData=null;var l=n.aoColumns;if(t!==H)l[t].sType=null;else{for(i=0,a=l.length;i<a;i++)l[i].sType=null;ie(n,o)}}function ne(e,t,n,i){var r,a,o,s=[],c=t.firstChild,l=0,u=e.aoColumns,f=e._rowReadObject;i=i!==H?i:f?{}:[];var d=function(e,t){if("string"==typeof e){var n=e.indexOf("@");if(-1!==n){var r=e.substring(n+1);X(e)(i,t.getAttribute(r))}}},h=function(e){n!==H&&n!==l||(a=u[l],o=U.trim(e.innerHTML),a&&a._bAttrSrc?(X(a.mData._)(i,o),d(a.mData.sort,e),d(a.mData.type,e),d(a.mData.filter,e)):f?(a._setter||(a._setter=X(a.mData)),a._setter(i,o)):i[l]=o);l++};if(c)for(;c;)"TD"!=(r=c.nodeName.toUpperCase())&&"TH"!=r||(h(c),s.push(c)),c=c.nextSibling;else for(var p=0,m=(s=t.anCells).length;p<m;p++)h(s[p]);var g=t.firstChild?t:t.nTr;if(g){var _=g.getAttribute("id");_&&X(e.rowId)(i,_)}return{data:i,cells:s}}function re(e,t,n,r){var i,a,o,s,c,l,u=e.aoData[t],f=u._aData,d=[];if(null===u.nTr){for(i=n||y.createElement("tr"),u.nTr=i,u.anCells=d,i._DT_RowIndex=t,ie(e,u),s=0,c=e.aoColumns.length;s<c;s++)o=e.aoColumns[s],(a=(l=!n)?y.createElement(o.sCellType):r[s])._DT_CellIndex={row:t,column:s},d.push(a),!l&&(n&&!o.mRender&&o.mData===s||U.isPlainObject(o.mData)&&o.mData._===s+".display")||(a.innerHTML=x(e,t,s,"display")),o.sClass&&(a.className+=" "+o.sClass),o.bVisible&&!n?i.appendChild(a):!o.bVisible&&n&&a.parentNode.removeChild(a),o.fnCreatedCell&&o.fnCreatedCell.call(e.oInstance,a,x(e,t,s),f,t,s);ft(e,"aoRowCreatedCallback",null,[i,f,t,d])}u.nTr.setAttribute("role","row")}function ie(e,t){var n=t.nTr,r=t._aData;if(n){var i=e.rowIdFn(r);if(i&&(n.id=i),r.DT_RowClass){var a=r.DT_RowClass.split(" ");t.__rowc=t.__rowc?g(t.__rowc.concat(a)):a,U(n).removeClass(t.__rowc.join(" ")).addClass(r.DT_RowClass)}r.DT_RowAttr&&U(n).attr(r.DT_RowAttr),r.DT_RowData&&U(n).data(r.DT_RowData)}}function ae(e){var t,n,r,i,a,o=e.nTHead,s=e.nTFoot,c=0===U("th, td",o).length,l=e.oClasses,u=e.aoColumns;for(c&&(i=U("<tr/>").appendTo(o)),t=0,n=u.length;t<n;t++)a=u[t],r=U(a.nTh).addClass(a.sClass),c&&r.appendTo(i),e.oFeatures.bSort&&(r.addClass(a.sSortingClass),!1!==a.bSortable&&(r.attr("tabindex",e.iTabIndex).attr("aria-controls",e.sTableId),et(e,a.nTh,t))),a.sTitle!=r[0].innerHTML&&r.html(a.sTitle),ht(e,"header")(e,r,a,l);if(c&&ue(e.aoHeader,o),U(o).find(">tr").attr("role","row"),U(o).find(">tr>th, >tr>td").addClass(l.sHeaderTH),U(s).find(">tr>th, >tr>td").addClass(l.sFooterTH),null!==s){var f=e.aoFooter[0];for(t=0,n=f.length;t<n;t++)(a=u[t]).nTf=f[t].cell,a.sClass&&U(a.nTf).addClass(a.sClass)}}function oe(e,t,n){var r,i,a,o,s,c,l,u,f,d=[],h=[],p=e.aoColumns.length;if(t){for(n===H&&(n=!1),r=0,i=t.length;r<i;r++){for(d[r]=t[r].slice(),d[r].nTr=t[r].nTr,a=p-1;0<=a;a--)e.aoColumns[a].bVisible||n||d[r].splice(a,1);h.push([])}for(r=0,i=d.length;r<i;r++){if(l=d[r].nTr)for(;c=l.firstChild;)l.removeChild(c);for(a=0,o=d[r].length;a<o;a++)if(f=u=1,h[r][a]===H){for(l.appendChild(d[r][a].cell),h[r][a]=1;d[r+u]!==H&&d[r][a].cell==d[r+u][a].cell;)h[r+u][a]=1,u++;for(;d[r][a+f]!==H&&d[r][a].cell==d[r][a+f].cell;){for(s=0;s<u;s++)h[r+s][a+f]=1;f++}U(d[r][a].cell).attr("rowspan",u).attr("colspan",f)}}}}function se(e){var t=ft(e,"aoPreDrawCallback","preDraw",[e]);if(-1===U.inArray(!1,t)){var n=[],r=0,i=e.asStripeClasses,a=i.length,o=(e.aoOpenRows.length,e.oLanguage),s=e.iInitDisplayStart,c="ssp"==pt(e),l=e.aiDisplay;e.bDrawing=!0,s!==H&&-1!==s&&(e._iDisplayStart=c?s:s>=e.fnRecordsDisplay()?0:s,e.iInitDisplayStart=-1);var u=e._iDisplayStart,f=e.fnDisplayEnd();if(e.bDeferLoading)e.bDeferLoading=!1,e.iDraw++,Ge(e,!1);else if(c){if(!e.bDestroying&&!he(e))return}else e.iDraw++;if(0!==l.length)for(var d=c?0:u,h=c?e.aoData.length:f,p=d;p<h;p++){var m=l[p],g=e.aoData[m];null===g.nTr&&re(e,m);var _=g.nTr;if(0!==a){var b=i[r%a];g._sRowStripe!=b&&(U(_).removeClass(g._sRowStripe).addClass(b),g._sRowStripe=b)}ft(e,"aoRowCallback",null,[_,g._aData,r,p,m]),n.push(_),r++}else{var v=o.sZeroRecords;1==e.iDraw&&"ajax"==pt(e)?v=o.sLoadingRecords:o.sEmptyTable&&0===e.fnRecordsTotal()&&(v=o.sEmptyTable),n[0]=U("<tr/>",{class:a?i[0]:""}).append(U("<td />",{valign:"top",colSpan:N(e),class:e.oClasses.sRowEmpty}).html(v))[0]}ft(e,"aoHeaderCallback","header",[U(e.nTHead).children("tr")[0],Z(e),u,f,l]),ft(e,"aoFooterCallback","footer",[U(e.nTFoot).children("tr")[0],Z(e),u,f,l]);var y=U(e.nTBody);y.children().detach(),y.append(U(n)),ft(e,"aoDrawCallback","draw",[e]),e.bSorted=!1,e.bFiltered=!1,e.bDrawing=!1}else Ge(e,!1)}function ce(e,t){var n=e.oFeatures,r=n.bSort,i=n.bFilter;r&&Xe(e),i?be(e,e.oPreviousSearch):e.aiDisplay=e.aiDisplayMaster.slice(),!0!==t&&(e._iDisplayStart=0),e._drawHold=t,se(e),e._drawHold=!1}function le(e){var t=e.oClasses,n=U(e.nTable),r=U("<div/>").insertBefore(n),i=e.oFeatures,a=U("<div/>",{id:e.sTableId+"_wrapper",class:t.sWrapper+(e.nTFoot?"":" "+t.sNoFooter)});e.nHolding=r[0],e.nTableWrapper=a[0],e.nTableReinsertBefore=e.nTable.nextSibling;for(var o,s,c,l,u,f,d=e.sDom.split(""),h=0;h<d.length;h++){if(o=null,"<"==(s=d[h])){if(c=U("<div/>")[0],"'"==(l=d[h+1])||'"'==l){for(u="",f=2;d[h+f]!=l;)u+=d[h+f],f++;if("H"==u?u=t.sJUIHeader:"F"==u&&(u=t.sJUIFooter),-1!=u.indexOf(".")){var p=u.split(".");c.id=p[0].substr(1,p[0].length-1),c.className=p[1]}else"#"==u.charAt(0)?c.id=u.substr(1,u.length-1):c.className=u;h+=f}a.append(c),a=U(c)}else if(">"==s)a=a.parent();else if("l"==s&&i.bPaginate&&i.bLengthChange)o=Re(e);else if("f"==s&&i.bFilter)o=_e(e);else if("r"==s&&i.bProcessing)o=Fe(e);else if("t"==s)o=je(e);else if("i"==s&&i.bInfo)o=De(e);else if("p"==s&&i.bPaginate)o=Ne(e);else if(0!==k.ext.feature.length)for(var m=k.ext.feature,g=0,_=m.length;g<_;g++)if(s==m[g].cFeature){o=m[g].fnInit(e);break}if(o){var b=e.aanFeatures;b[s]||(b[s]=[]),b[s].push(o),a.append(o)}}r.replaceWith(a),e.nHolding=null}function ue(e,t){var n,r,i,a,o,s,c,l,u,f,d=U(t).children("tr"),h=function(e,t,n){for(var r=e[t];r[n];)n++;return n};for(e.splice(0,e.length),i=0,s=d.length;i<s;i++)e.push([]);for(i=0,s=d.length;i<s;i++)for(0,r=(n=d[i]).firstChild;r;){if("TD"==r.nodeName.toUpperCase()||"TH"==r.nodeName.toUpperCase())for(l=(l=1*r.getAttribute("colspan"))&&0!==l&&1!==l?l:1,u=(u=1*r.getAttribute("rowspan"))&&0!==u&&1!==u?u:1,c=h(e,i,0),f=1===l,o=0;o<l;o++)for(a=0;a<u;a++)e[i+a][c+o]={cell:r,unique:f},e[i+a].nTr=n;r=r.nextSibling}}function fe(e,t,n){var r=[];n||(n=e.aoHeader,t&&ue(n=[],t));for(var i=0,a=n.length;i<a;i++)for(var o=0,s=n[i].length;o<s;o++)!n[i][o].unique||r[o]&&e.bSortCellsTop||(r[o]=n[i][o].cell);return r}function de(i,e,t){if(ft(i,"aoServerParams","serverParams",[e]),e&&U.isArray(e)){var a={},o=/(.*?)\[\]$/;U.each(e,function(e,t){var n=t.name.match(o);if(n){var r=n[0];a[r]||(a[r]=[]),a[r].push(t.value)}else a[t.name]=t.value}),e=a}var n,r=i.ajax,s=i.oInstance,c=function(e){ft(i,null,"xhr",[i,e,i.jqXHR]),t(e)};if(U.isPlainObject(r)&&r.data){var l="function"==typeof(n=r.data)?n(e,i):n;e="function"==typeof n&&l?l:U.extend(!0,e,l),delete r.data}var u={data:e,success:function(e){var t=e.error||e.sError;t&&ot(i,0,t),i.json=e,c(e)},dataType:"json",cache:!1,type:i.sServerMethod,error:function(e,t,n){var r=ft(i,null,"xhr",[i,null,i.jqXHR]);-1===U.inArray(!0,r)&&("parsererror"==t?ot(i,0,"Invalid JSON response",1):4===e.readyState&&ot(i,0,"Ajax error",7)),Ge(i,!1)}};i.oAjaxData=e,ft(i,null,"preXhr",[i,e]),i.fnServerData?i.fnServerData.call(s,i.sAjaxSource,U.map(e,function(e,t){return{name:t,value:e}}),c,i):i.sAjaxSource||"string"==typeof r?i.jqXHR=U.ajax(U.extend(u,{url:r||i.sAjaxSource})):"function"==typeof r?i.jqXHR=r.call(s,e,c,i):(i.jqXHR=U.ajax(U.extend(u,r)),r.data=n)}function he(t){return!t.bAjaxDataGet||(t.iDraw++,Ge(t,!0),de(t,pe(t),function(e){me(t,e)}),!1)}function pe(e){var t,n,r,i,a=e.aoColumns,o=a.length,s=e.oFeatures,c=e.oPreviousSearch,l=e.aoPreSearchCols,u=[],f=Qe(e),d=e._iDisplayStart,h=!1!==s.bPaginate?e._iDisplayLength:-1,p=function(e,t){u.push({name:e,value:t})};p("sEcho",e.iDraw),p("iColumns",o),p("sColumns",W(a,"sName").join(",")),p("iDisplayStart",d),p("iDisplayLength",h);var m={draw:e.iDraw,columns:[],order:[],start:d,length:h,search:{value:c.sSearch,regex:c.bRegex}};for(t=0;t<o;t++)r=a[t],i=l[t],n="function"==typeof r.mData?"function":r.mData,m.columns.push({data:n,name:r.sName,searchable:r.bSearchable,orderable:r.bSortable,search:{value:i.sSearch,regex:i.bRegex}}),p("mDataProp_"+t,n),s.bFilter&&(p("sSearch_"+t,i.sSearch),p("bRegex_"+t,i.bRegex),p("bSearchable_"+t,r.bSearchable)),s.bSort&&p("bSortable_"+t,r.bSortable);s.bFilter&&(p("sSearch",c.sSearch),p("bRegex",c.bRegex)),s.bSort&&(U.each(f,function(e,t){m.order.push({column:t.col,dir:t.dir}),p("iSortCol_"+e,t.col),p("sSortDir_"+e,t.dir)}),p("iSortingCols",f.length));var g=k.ext.legacy.ajax;return null===g?e.sAjaxSource?u:m:g?u:m}function me(e,n){var t=function(e,t){return n[e]!==H?n[e]:n[t]},r=ge(e,n),i=t("sEcho","draw"),a=t("iTotalRecords","recordsTotal"),o=t("iTotalDisplayRecords","recordsFiltered");if(i!==H){if(1*i<e.iDraw)return;e.iDraw=1*i}J(e),e._iRecordsTotal=parseInt(a,10),e._iRecordsDisplay=parseInt(o,10);for(var s=0,c=r.length;s<c;s++)G(e,r[s]);e.aiDisplay=e.aiDisplayMaster.slice(),e.bAjaxDataGet=!1,se(e),e._bInitComplete||$e(e,n),e.bAjaxDataGet=!0,Ge(e,!1)}function ge(e,t){var n=U.isPlainObject(e.ajax)&&e.ajax.dataSrc!==H?e.ajax.dataSrc:e.sAjaxDataProp;return"data"===n?t.aaData||t[n]:""!==n?Q(n)(t):t}function _e(n){var e=n.oClasses,t=n.sTableId,r=n.oLanguage,i=n.oPreviousSearch,a=n.aanFeatures,o='<input type="search" class="'+e.sFilterInput+'"/>',s=r.sSearch;s=s.match(/_INPUT_/)?s.replace("_INPUT_",o):s+o;var c=U("<div/>",{id:a.f?null:t+"_filter",class:e.sFilter}).append(U("<label/>").append(s)),l=function(){a.f;var e=this.value?this.value:"";e!=i.sSearch&&(be(n,{sSearch:e,bRegex:i.bRegex,bSmart:i.bSmart,bCaseInsensitive:i.bCaseInsensitive}),n._iDisplayStart=0,se(n))},u=null!==n.searchDelay?n.searchDelay:"ssp"===pt(n)?400:0,f=U("input",c).val(i.sSearch).attr("placeholder",r.sSearchPlaceholder).on("keyup.DT search.DT input.DT paste.DT cut.DT",u?qe(l,u):l).on("mouseup",function(e){setTimeout(function(){l.call(f[0])},10)}).on("keypress.DT",function(e){if(13==e.keyCode)return!1}).attr("aria-controls",t);return U(n.nTable).on("search.dt.DT",function(e,t){if(n===t)try{f[0]!==y.activeElement&&f.val(i.sSearch)}catch(e){}}),c[0]}function be(e,t,n){var r=e.oPreviousSearch,i=e.aoPreSearchCols,a=function(e){r.sSearch=e.sSearch,r.bRegex=e.bRegex,r.bSmart=e.bSmart,r.bCaseInsensitive=e.bCaseInsensitive},o=function(e){return e.bEscapeRegex!==H?!e.bEscapeRegex:e.bRegex};if(T(e),"ssp"!=pt(e)){we(e,t.sSearch,n,o(t),t.bSmart,t.bCaseInsensitive),a(t);for(var s=0;s<i.length;s++)ye(e,i[s].sSearch,s,o(i[s]),i[s].bSmart,i[s].bCaseInsensitive);ve(e)}else a(t);e.bFiltered=!0,ft(e,null,"search",[e])}function ve(e){for(var t,n,r=k.ext.search,i=e.aiDisplay,a=0,o=r.length;a<o;a++){for(var s=[],c=0,l=i.length;c<l;c++)n=i[c],t=e.aoData[n],r[a](e,t._aFilterData,n,t._aData,c)&&s.push(n);i.length=0,U.merge(i,s)}}function ye(e,t,n,r,i,a){if(""!==t){for(var o,s=[],c=e.aiDisplay,l=Ce(t,r,i,a),u=0;u<c.length;u++)o=e.aoData[c[u]]._aFilterData[n],l.test(o)&&s.push(c[u]);e.aiDisplay=s}}function we(e,t,n,r,i,a){var o,s,c,l=Ce(t,r,i,a),u=e.oPreviousSearch.sSearch,f=e.aiDisplayMaster,d=[];if(0!==k.ext.search.length&&(n=!0),s=xe(e),t.length<=0)e.aiDisplay=f.slice();else{for((s||n||r||u.length>t.length||0!==t.indexOf(u)||e.bSorted)&&(e.aiDisplay=f.slice()),o=e.aiDisplay,c=0;c<o.length;c++)l.test(e.aoData[o[c]]._sFilterRow)&&d.push(o[c]);e.aiDisplay=d}}function Ce(e,t,n,r){(e=t?e:Ae(e),n)&&(e="^(?=.*?"+U.map(e.match(/"[^"]+"|[^ ]+/g)||[""],function(e){if('"'===e.charAt(0)){var t=e.match(/^"(.*)"$/);e=t?t[1]:e}return e.replace('"',"")}).join(")(?=.*?")+").*$");return new RegExp(e,r?"i":"")}var Ae=k.util.escapeRegex,Se=U("<div>")[0],Te=Se.textContent!==H;function xe(e){var t,n,r,i,a,o,s,c,l=e.aoColumns,u=k.ext.type.search,f=!1;for(n=0,i=e.aoData.length;n<i;n++)if(!(c=e.aoData[n])._aFilterData){for(o=[],r=0,a=l.length;r<a;r++)(t=l[r]).bSearchable?(s=x(e,n,r,"filter"),u[t.sType]&&(s=u[t.sType](s)),null===s&&(s=""),"string"!=typeof s&&s.toString&&(s=s.toString())):s="",s.indexOf&&-1!==s.indexOf("&")&&(Se.innerHTML=s,s=Te?Se.textContent:Se.innerText),s.replace&&(s=s.replace(/[\r\n\u2028]/g,"")),o.push(s);c._aFilterData=o,c._sFilterRow=o.join("  "),f=!0}return f}function ke(e){return{search:e.sSearch,smart:e.bSmart,regex:e.bRegex,caseInsensitive:e.bCaseInsensitive}}function Ee(e){return{sSearch:e.search,bSmart:e.smart,bRegex:e.regex,bCaseInsensitive:e.caseInsensitive}}function De(e){var t=e.sTableId,n=e.aanFeatures.i,r=U("<div/>",{class:e.oClasses.sInfo,id:n?null:t+"_info"});return n||(e.aoDrawCallback.push({fn:Ie,sName:"information"}),r.attr("role","status").attr("aria-live","polite"),U(e.nTable).attr("aria-describedby",t+"_info")),r[0]}function Ie(e){var t=e.aanFeatures.i;if(0!==t.length){var n=e.oLanguage,r=e._iDisplayStart+1,i=e.fnDisplayEnd(),a=e.fnRecordsTotal(),o=e.fnRecordsDisplay(),s=o?n.sInfo:n.sInfoEmpty;o!==a&&(s+=" "+n.sInfoFiltered),s=Pe(e,s+=n.sInfoPostFix);var c=n.fnInfoCallback;null!==c&&(s=c.call(e.oInstance,e,r,i,a,o,s)),U(t).html(s)}}function Pe(e,t){var n=e.fnFormatNumber,r=e._iDisplayStart+1,i=e._iDisplayLength,a=e.fnRecordsDisplay(),o=-1===i;return t.replace(/_START_/g,n.call(e,r)).replace(/_END_/g,n.call(e,e.fnDisplayEnd())).replace(/_MAX_/g,n.call(e,e.fnRecordsTotal())).replace(/_TOTAL_/g,n.call(e,a)).replace(/_PAGE_/g,n.call(e,o?1:Math.ceil(r/i))).replace(/_PAGES_/g,n.call(e,o?1:Math.ceil(a/i)))}function Me(n){var r,e,t,i=n.iInitDisplayStart,a=n.aoColumns,o=n.oFeatures,s=n.bDeferLoading;if(n.bInitialised){for(le(n),ae(n),oe(n,n.aoHeader),oe(n,n.aoFooter),Ge(n,!0),o.bAutoWidth&&We(n),r=0,e=a.length;r<e;r++)(t=a[r]).sWidth&&(t.nTh.style.width=Ke(t.sWidth));ft(n,null,"preInit",[n]),ce(n);var c=pt(n);("ssp"!=c||s)&&("ajax"==c?de(n,[],function(e){var t=ge(n,e);for(r=0;r<t.length;r++)G(n,t[r]);n.iInitDisplayStart=i,ce(n),Ge(n,!1),$e(n,e)}):(Ge(n,!1),$e(n)))}else setTimeout(function(){Me(n)},200)}function $e(e,t){e._bInitComplete=!0,(t||e.oInit.aaData)&&q(e),ft(e,null,"plugin-init",[e,t]),ft(e,"aoInitComplete","init",[e,t])}function Oe(e,t){var n=parseInt(t,10);e._iDisplayLength=n,dt(e),ft(e,null,"length",[e,n])}function Re(r){for(var e=r.oClasses,t=r.sTableId,n=r.aLengthMenu,i=U.isArray(n[0]),a=i?n[0]:n,o=i?n[1]:n,s=U("<select/>",{name:t+"_length","aria-controls":t,class:e.sLengthSelect}),c=0,l=a.length;c<l;c++)s[0][c]=new Option("number"==typeof o[c]?r.fnFormatNumber(o[c]):o[c],a[c]);var u=U("<div><label/></div>").addClass(e.sLength);return r.aanFeatures.l||(u[0].id=t+"_length"),u.children().append(r.oLanguage.sLengthMenu.replace("_MENU_",s[0].outerHTML)),U("select",u).val(r._iDisplayLength).on("change.DT",function(e){Oe(r,U(this).val()),se(r)}),U(r.nTable).on("length.dt.DT",function(e,t,n){r===t&&U("select",u).val(n)}),u[0]}function Ne(e){var t=e.sPaginationType,u=k.ext.pager[t],f="function"==typeof u,d=function(e){se(e)},n=U("<div/>").addClass(e.oClasses.sPaging+t)[0],h=e.aanFeatures;return f||u.fnInit(e,n,d),h.p||(n.id=e.sTableId+"_paginate",e.aoDrawCallback.push({fn:function(e){if(f){var t,n,r=e._iDisplayStart,i=e._iDisplayLength,a=e.fnRecordsDisplay(),o=-1===i,s=o?0:Math.ceil(r/i),c=o?1:Math.ceil(a/i),l=u(s,c);for(t=0,n=h.p.length;t<n;t++)ht(e,"pageButton")(e,h.p[t],t,l,s,c)}else u.fnUpdate(e,d)},sName:"pagination"})),n}function Le(e,t,n){var r=e._iDisplayStart,i=e._iDisplayLength,a=e.fnRecordsDisplay();0===a||-1===i?r=0:"number"==typeof t?a<(r=t*i)&&(r=0):"first"==t?r=0:"previous"==t?(r=0<=i?r-i:0)<0&&(r=0):"next"==t?r+i<a&&(r+=i):"last"==t?r=Math.floor((a-1)/i)*i:ot(e,0,"Unknown paging action: "+t,5);var o=e._iDisplayStart!==r;return e._iDisplayStart=r,o&&(ft(e,null,"page",[e]),n&&se(e)),o}function Fe(e){return U("<div/>",{id:e.aanFeatures.r?null:e.sTableId+"_processing",class:e.oClasses.sProcessing}).html(e.oLanguage.sProcessing).insertBefore(e.nTable)[0]}function Ge(e,t){e.oFeatures.bProcessing&&U(e.aanFeatures.r).css("display",t?"block":"none"),ft(e,null,"processing",[e,t])}function je(e){var t=U(e.nTable);t.attr("role","grid");var n=e.oScroll;if(""===n.sX&&""===n.sY)return e.nTable;var r=n.sX,i=n.sY,a=e.oClasses,o=t.children("caption"),s=o.length?o[0]._captionSide:null,c=U(t[0].cloneNode(!1)),l=U(t[0].cloneNode(!1)),u=t.children("tfoot"),f="<div/>",d=function(e){return e?Ke(e):null};u.length||(u=null);var h=U(f,{class:a.sScrollWrapper}).append(U(f,{class:a.sScrollHead}).css({overflow:"hidden",position:"relative",border:0,width:r?d(r):"100%"}).append(U(f,{class:a.sScrollHeadInner}).css({"box-sizing":"content-box",width:n.sXInner||"100%"}).append(c.removeAttr("id").css("margin-left",0).append("top"===s?o:null).append(t.children("thead"))))).append(U(f,{class:a.sScrollBody}).css({position:"relative",overflow:"auto",width:d(r)}).append(t));u&&h.append(U(f,{class:a.sScrollFoot}).css({overflow:"hidden",border:0,width:r?d(r):"100%"}).append(U(f,{class:a.sScrollFootInner}).append(l.removeAttr("id").css("margin-left",0).append("bottom"===s?o:null).append(t.children("tfoot")))));var p=h.children(),m=p[0],g=p[1],_=u?p[2]:null;return r&&U(g).on("scroll.DT",function(e){var t=this.scrollLeft;m.scrollLeft=t,u&&(_.scrollLeft=t)}),U(g).css("max-height",i),n.bCollapse||U(g).css("height",i),e.nScrollHead=m,e.nScrollBody=g,e.nScrollFoot=_,e.aoDrawCallback.push({fn:Be,sName:"scrolling"}),h[0]}function Be(n){var e,t,r,i,a,o,s,c,l,u=n.oScroll,f=u.sX,d=u.sXInner,h=u.sY,p=u.iBarWidth,m=U(n.nScrollHead),g=m[0].style,_=m.children("div"),b=_[0].style,v=_.children("table"),y=n.nScrollBody,w=U(y),C=y.style,A=U(n.nScrollFoot).children("div"),S=A.children("table"),T=U(n.nTHead),x=U(n.nTable),k=x[0],E=k.style,D=n.nTFoot?U(n.nTFoot):null,I=n.oBrowser,P=I.bScrollOversize,M=W(n.aoColumns,"nTh"),$=[],O=[],R=[],N=[],L=function(e){var t=e.style;t.paddingTop="0",t.paddingBottom="0",t.borderTopWidth="0",t.borderBottomWidth="0",t.height=0},F=y.scrollHeight>y.clientHeight;if(n.scrollBarVis!==F&&n.scrollBarVis!==H)return n.scrollBarVis=F,void q(n);n.scrollBarVis=F,x.children("thead, tfoot").remove(),D&&(o=D.clone().prependTo(x),t=D.find("tr"),i=o.find("tr")),a=T.clone().prependTo(x),e=T.find("tr"),r=a.find("tr"),a.find("th, td").removeAttr("tabindex"),f||(C.width="100%",m[0].style.width="100%"),U.each(fe(n,a),function(e,t){s=z(n,e),t.style.width=n.aoColumns[s].sWidth}),D&&Ue(function(e){e.style.width=""},i),l=x.outerWidth(),""===f?(E.width="100%",P&&(x.find("tbody").height()>y.offsetHeight||"scroll"==w.css("overflow-y"))&&(E.width=Ke(x.outerWidth()-p)),l=x.outerWidth()):""!==d&&(E.width=Ke(d),l=x.outerWidth()),Ue(L,r),Ue(function(e){R.push(e.innerHTML),$.push(Ke(U(e).css("width")))},r),Ue(function(e,t){-1!==U.inArray(e,M)&&(e.style.width=$[t])},e),U(r).height(0),D&&(Ue(L,i),Ue(function(e){N.push(e.innerHTML),O.push(Ke(U(e).css("width")))},i),Ue(function(e,t){e.style.width=O[t]},t),U(i).height(0)),Ue(function(e,t){e.innerHTML='<div class="dataTables_sizing">'+R[t]+"</div>",e.childNodes[0].style.height="0",e.childNodes[0].style.overflow="hidden",e.style.width=$[t]},r),D&&Ue(function(e,t){e.innerHTML='<div class="dataTables_sizing">'+N[t]+"</div>",e.childNodes[0].style.height="0",e.childNodes[0].style.overflow="hidden",e.style.width=O[t]},i),x.outerWidth()<l?(c=y.scrollHeight>y.offsetHeight||"scroll"==w.css("overflow-y")?l+p:l,P&&(y.scrollHeight>y.offsetHeight||"scroll"==w.css("overflow-y"))&&(E.width=Ke(c-p)),""!==f&&""===d||ot(n,1,"Possible column misalignment",6)):c="100%",C.width=Ke(c),g.width=Ke(c),D&&(n.nScrollFoot.style.width=Ke(c)),h||P&&(C.height=Ke(k.offsetHeight+p));var G=x.outerWidth();v[0].style.width=Ke(G),b.width=Ke(G);var j=x.height()>y.clientHeight||"scroll"==w.css("overflow-y"),B="padding"+(I.bScrollbarLeft?"Left":"Right");b[B]=j?p+"px":"0px",D&&(S[0].style.width=Ke(G),A[0].style.width=Ke(G),A[0].style[B]=j?p+"px":"0px"),x.children("colgroup").insertBefore(x.children("thead")),w.trigger("scroll"),!n.bSorted&&!n.bFiltered||n._drawHold||(y.scrollTop=0)}function Ue(e,t,n){for(var r,i,a=0,o=0,s=t.length;o<s;){for(r=t[o].firstChild,i=n?n[o].firstChild:null;r;)1===r.nodeType&&(n?e(r,i,a):e(r,a),a++),r=r.nextSibling,i=n?i.nextSibling:null;o++}}var He=/<.*?>/g;function We(e){var t,n,r,i=e.nTable,a=e.aoColumns,o=e.oScroll,s=o.sY,c=o.sX,l=o.sXInner,u=a.length,f=L(e,"bVisible"),d=U("th",e.nTHead),h=i.getAttribute("width"),p=i.parentNode,m=!1,g=e.oBrowser,_=g.bScrollOversize,b=i.style.width;for(b&&-1!==b.indexOf("%")&&(h=b),t=0;t<f.length;t++)null!==(n=a[f[t]]).sWidth&&(n.sWidth=ze(n.sWidthOrig,p),m=!0);if(_||!m&&!c&&!s&&u==N(e)&&u==d.length)for(t=0;t<u;t++){var v=z(e,t);null!==v&&(a[v].sWidth=Ke(d.eq(t).width()))}else{var y=U(i).clone().css("visibility","hidden").removeAttr("id");y.find("tbody tr").remove();var w=U("<tr/>").appendTo(y.find("tbody"));for(y.find("thead, tfoot").remove(),y.append(U(e.nTHead).clone()).append(U(e.nTFoot).clone()),y.find("tfoot th, tfoot td").css("width",""),d=fe(e,y.find("thead")[0]),t=0;t<f.length;t++)n=a[f[t]],d[t].style.width=null!==n.sWidthOrig&&""!==n.sWidthOrig?Ke(n.sWidthOrig):"",n.sWidthOrig&&c&&U(d[t]).append(U("<div/>").css({width:n.sWidthOrig,margin:0,padding:0,border:0,height:1}));if(e.aoData.length)for(t=0;t<f.length;t++)n=a[r=f[t]],U(Ve(e,r)).clone(!1).append(n.sContentPadding).appendTo(w);U("[name]",y).removeAttr("name");var C=U("<div/>").css(c||s?{position:"absolute",top:0,left:0,height:1,right:0,overflow:"hidden"}:{}).append(y).appendTo(p);c&&l?y.width(l):c?(y.css("width","auto"),y.removeAttr("width"),y.width()<p.clientWidth&&h&&y.width(p.clientWidth)):s?y.width(p.clientWidth):h&&y.width(h);var A=0;for(t=0;t<f.length;t++){var S=U(d[t]),T=S.outerWidth()-S.width(),x=g.bBounding?Math.ceil(d[t].getBoundingClientRect().width):S.outerWidth();A+=x,a[f[t]].sWidth=Ke(x-T)}i.style.width=Ke(A),C.remove()}if(h&&(i.style.width=Ke(h)),(h||c)&&!e._reszEvt){var k=function(){U(E).on("resize.DT-"+e.sInstance,qe(function(){q(e)}))};_?setTimeout(k,1e3):k(),e._reszEvt=!0}}var qe=k.util.throttle;function ze(e,t){if(!e)return 0;var n=U("<div/>").css("width",Ke(e)).appendTo(t||y.body),r=n[0].offsetWidth;return n.remove(),r}function Ve(e,t){var n=Ye(e,t);if(n<0)return null;var r=e.aoData[n];return r.nTr?r.anCells[t]:U("<td/>").html(x(e,n,t,"display"))[0]}function Ye(e,t){for(var n,r=-1,i=-1,a=0,o=e.aoData.length;a<o;a++)(n=(n=(n=x(e,a,t,"display")+"").replace(He,"")).replace(/&nbsp;/g," ")).length>r&&(r=n.length,i=a);return i}function Ke(e){return null===e?"0px":"number"==typeof e?e<0?"0px":e+"px":e.match(/\d$/)?e+"px":e}function Qe(e){var t,n,r,i,a,o,s,c=[],l=e.aoColumns,u=e.aaSortingFixed,f=U.isPlainObject(u),d=[],h=function(e){e.length&&!U.isArray(e[0])?d.push(e):U.merge(d,e)};for(U.isArray(u)&&h(u),f&&u.pre&&h(u.pre),h(e.aaSorting),f&&u.post&&h(u.post),t=0;t<d.length;t++)for(n=0,r=(i=l[s=d[t][0]].aDataSort).length;n<r;n++)o=l[a=i[n]].sType||"string",d[t]._idx===H&&(d[t]._idx=U.inArray(d[t][1],l[a].asSorting)),c.push({src:s,col:a,dir:d[t][1],index:d[t]._idx,type:o,formatter:k.ext.type.order[o+"-pre"]});return c}function Xe(e){var t,n,r,i,u,f=[],d=k.ext.type.order,h=e.aoData,a=(e.aoColumns,0),o=e.aiDisplayMaster;for(T(e),t=0,n=(u=Qe(e)).length;t<n;t++)(i=u[t]).formatter&&a++,nt(e,i.col);if("ssp"!=pt(e)&&0!==u.length){for(t=0,r=o.length;t<r;t++)f[o[t]]=t;a===u.length?o.sort(function(e,t){var n,r,i,a,o,s=u.length,c=h[e]._aSortData,l=h[t]._aSortData;for(i=0;i<s;i++)if(0!==(a=(n=c[(o=u[i]).col])<(r=l[o.col])?-1:r<n?1:0))return"asc"===o.dir?a:-a;return(n=f[e])<(r=f[t])?-1:r<n?1:0}):o.sort(function(e,t){var n,r,i,a,o,s=u.length,c=h[e]._aSortData,l=h[t]._aSortData;for(i=0;i<s;i++)if(n=c[(o=u[i]).col],r=l[o.col],0!==(a=(d[o.type+"-"+o.dir]||d["string-"+o.dir])(n,r)))return a;return(n=f[e])<(r=f[t])?-1:r<n?1:0})}e.bSorted=!0}function Ze(e){for(var t,n=e.aoColumns,r=Qe(e),i=e.oLanguage.oAria,a=0,o=n.length;a<o;a++){var s=n[a],c=s.asSorting,l=s.sTitle.replace(/<.*?>/g,""),u=s.nTh;u.removeAttribute("aria-sort"),t=s.bSortable?l+("asc"===(0<r.length&&r[0].col==a?(u.setAttribute("aria-sort","asc"==r[0].dir?"ascending":"descending"),c[r[0].index+1]||c[0]):c[0])?i.sSortAscending:i.sSortDescending):l,u.setAttribute("aria-label",t)}}function Je(e,t,n,r){var i,a=e.aoColumns[t],o=e.aaSorting,s=a.asSorting,c=function(e,t){var n=e._idx;return n===H&&(n=U.inArray(e[1],s)),n+1<s.length?n+1:t?null:0};if("number"==typeof o[0]&&(o=e.aaSorting=[o]),n&&e.oFeatures.bSortMulti){var l=U.inArray(t,W(o,"0"));-1!==l?(null===(i=c(o[l],!0))&&1===o.length&&(i=0),null===i?o.splice(l,1):(o[l][1]=s[i],o[l]._idx=i)):(o.push([t,s[0],0]),o[o.length-1]._idx=0)}else o.length&&o[0][0]==t?(i=c(o[0]),o.length=1,o[0][1]=s[i],o[0]._idx=i):(o.length=0,o.push([t,s[0]]),o[0]._idx=0);ce(e),"function"==typeof r&&r(e)}function et(t,e,n,r){var i=t.aoColumns[n];lt(e,{},function(e){!1!==i.bSortable&&(t.oFeatures.bProcessing?(Ge(t,!0),setTimeout(function(){Je(t,n,e.shiftKey,r),"ssp"!==pt(t)&&Ge(t,!1)},0)):Je(t,n,e.shiftKey,r))})}function tt(e){var t,n,r,i=e.aLastSort,a=e.oClasses.sSortColumn,o=Qe(e),s=e.oFeatures;if(s.bSort&&s.bSortClasses){for(t=0,n=i.length;t<n;t++)r=i[t].src,U(W(e.aoData,"anCells",r)).removeClass(a+(t<2?t+1:3));for(t=0,n=o.length;t<n;t++)r=o[t].src,U(W(e.aoData,"anCells",r)).addClass(a+(t<2?t+1:3))}e.aLastSort=o}function nt(e,t){var n,r,i,a=e.aoColumns[t],o=k.ext.order[a.sSortDataType];o&&(n=o.call(e.oInstance,e,t,S(e,t)));for(var s=k.ext.type.order[a.sType+"-pre"],c=0,l=e.aoData.length;c<l;c++)(r=e.aoData[c])._aSortData||(r._aSortData=[]),r._aSortData[t]&&!o||(i=o?n[c]:x(e,c,t,"sort"),r._aSortData[t]=s?s(i):i)}function rt(n){if(n.oFeatures.bStateSave&&!n.bDestroying){var e={time:+new Date,start:n._iDisplayStart,length:n._iDisplayLength,order:U.extend(!0,[],n.aaSorting),search:ke(n.oPreviousSearch),columns:U.map(n.aoColumns,function(e,t){return{visible:e.bVisible,search:ke(n.aoPreSearchCols[t])}})};ft(n,"aoStateSaveParams","stateSaveParams",[n,e]),n.oSavedState=e,n.fnStateSaveCallback.call(n.oInstance,n,e)}}function it(i,e,a){var o,s,c=i.aoColumns,t=function(e){if(e&&e.time){var t=ft(i,"aoStateLoadParams","stateLoadParams",[i,e]);if(-1===U.inArray(!1,t)){var n=i.iStateDuration;if(0<n&&e.time<+new Date-1e3*n)a();else if(e.columns&&c.length!==e.columns.length)a();else{if(i.oLoadedState=U.extend(!0,{},e),e.start!==H&&(i._iDisplayStart=e.start,i.iInitDisplayStart=e.start),e.length!==H&&(i._iDisplayLength=e.length),e.order!==H&&(i.aaSorting=[],U.each(e.order,function(e,t){i.aaSorting.push(t[0]>=c.length?[0,t[1]]:t)})),e.search!==H&&U.extend(i.oPreviousSearch,Ee(e.search)),e.columns)for(o=0,s=e.columns.length;o<s;o++){var r=e.columns[o];r.visible!==H&&(c[o].bVisible=r.visible),r.search!==H&&U.extend(i.aoPreSearchCols[o],Ee(r.search))}ft(i,"aoStateLoaded","stateLoaded",[i,e]),a()}}else a()}else a()};if(i.oFeatures.bStateSave){var n=i.fnStateLoadCallback.call(i.oInstance,i,t);n!==H&&t(n)}else a()}function at(e){var t=k.settings,n=U.inArray(e,W(t,"nTable"));return-1!==n?t[n]:null}function ot(e,t,n,r){if(n="DataTables warning: "+(e?"table id="+e.sTableId+" - ":"")+n,r&&(n+=". For more information about this error, please see http://datatables.net/tn/"+r),t)E.console&&console.log&&console.log(n);else{var i=k.ext,a=i.sErrMode||i.errMode;if(e&&ft(e,null,"error",[e,r,n]),"alert"==a)alert(n);else{if("throw"==a)throw new Error(n);"function"==typeof a&&a(e,r,n)}}}function st(n,r,e,t){U.isArray(e)?U.each(e,function(e,t){U.isArray(t)?st(n,r,t[0],t[1]):st(n,r,t)}):(t===H&&(t=e),r[e]!==H&&(n[t]=r[e]))}function ct(e,t,n){var r;for(var i in t)t.hasOwnProperty(i)&&(r=t[i],U.isPlainObject(r)?(U.isPlainObject(e[i])||(e[i]={}),U.extend(!0,e[i],r)):n&&"data"!==i&&"aaData"!==i&&U.isArray(r)?e[i]=r.slice():e[i]=r);return e}function lt(t,e,n){U(t).on("click.DT",e,function(e){U(t).trigger("blur"),n(e)}).on("keypress.DT",e,function(e){13===e.which&&(e.preventDefault(),n(e))}).on("selectstart.DT",function(){return!1})}function ut(e,t,n,r){n&&e[t].push({fn:n,sName:r})}function ft(n,e,t,r){var i=[];if(e&&(i=U.map(n[e].slice().reverse(),function(e,t){return e.fn.apply(n.oInstance,r)})),null!==t){var a=U.Event(t+".dt");U(n.nTable).trigger(a,r),i.push(a.result)}return i}function dt(e){var t=e._iDisplayStart,n=e.fnDisplayEnd(),r=e._iDisplayLength;n<=t&&(t=n-r),t-=t%r,(-1===r||t<0)&&(t=0),e._iDisplayStart=t}function ht(e,t){var n=e.renderer,r=k.ext.renderer[t];return U.isPlainObject(n)&&n[t]?r[n[t]]||r._:"string"==typeof n&&r[n]||r._}function pt(e){return e.oFeatures.bServerSide?"ssp":e.ajax||e.sAjaxSource?"ajax":"dom"}var mt=[],gt=Array.prototype;b=function(e,t){if(!(this instanceof b))return new b(e,t);var s=[],n=function(e){var t,n,r,i,a,o=(t=e,i=k.settings,a=U.map(i,function(e,t){return e.nTable}),t?t.nTable&&t.oApi?[t]:t.nodeName&&"table"===t.nodeName.toLowerCase()?-1!==(n=U.inArray(t,a))?[i[n]]:null:t&&"function"==typeof t.settings?t.settings().toArray():("string"==typeof t?r=U(t):t instanceof U&&(r=t),r?r.map(function(e){return-1!==(n=U.inArray(this,a))?i[n]:null}).toArray():void 0):[]);o&&s.push.apply(s,o)};if(U.isArray(e))for(var r=0,i=e.length;r<i;r++)n(e[r]);else n(e);this.context=g(s),t&&U.merge(this,t),this.selector={rows:null,cols:null,opts:null},b.extend(this,this,mt)},k.Api=b,U.extend(b.prototype,{any:function(){return 0!==this.count()},concat:gt.concat,context:[],count:function(){return this.flatten().length},each:function(e){for(var t=0,n=this.length;t<n;t++)e.call(this,this[t],t,this);return this},eq:function(e){var t=this.context;return t.length>e?new b(t[e],this[e]):null},filter:function(e){var t=[];if(gt.filter)t=gt.filter.call(this,e,this);else for(var n=0,r=this.length;n<r;n++)e.call(this,this[n],n,this)&&t.push(this[n]);return new b(this.context,t)},flatten:function(){var e=[];return new b(this.context,e.concat.apply(e,this.toArray()))},join:gt.join,indexOf:gt.indexOf||function(e,t){for(var n=t||0,r=this.length;n<r;n++)if(this[n]===e)return n;return-1},iterator:function(e,t,n,r){var i,a,o,s,c,l,u,f,d=[],h=this.context,p=this.selector;for("string"==typeof e&&(r=n,n=t,t=e,e=!1),a=0,o=h.length;a<o;a++){var m=new b(h[a]);if("table"===t)(i=n.call(m,h[a],a))!==H&&d.push(i);else if("columns"===t||"rows"===t)(i=n.call(m,h[a],this[a],a))!==H&&d.push(i);else if("column"===t||"column-rows"===t||"row"===t||"cell"===t)for(u=this[a],"column-rows"===t&&(l=Ct(h[a],p.opts)),s=0,c=u.length;s<c;s++)f=u[s],(i="cell"===t?n.call(m,h[a],f.row,f.column,a,s):n.call(m,h[a],f,a,s,l))!==H&&d.push(i)}if(d.length||r){var g=new b(h,e?d.concat.apply([],d):d),_=g.selector;return _.rows=p.rows,_.cols=p.cols,_.opts=p.opts,g}return this},lastIndexOf:gt.lastIndexOf||function(e,t){return this.indexOf.apply(this.toArray.reverse(),arguments)},length:0,map:function(e){var t=[];if(gt.map)t=gt.map.call(this,e,this);else for(var n=0,r=this.length;n<r;n++)t.push(e.call(this,this[n],n));return new b(this.context,t)},pluck:function(t){return this.map(function(e){return e[t]})},pop:gt.pop,push:gt.push,reduce:gt.reduce||function(e,t){return A(this,e,t,0,this.length,1)},reduceRight:gt.reduceRight||function(e,t){return A(this,e,t,this.length-1,-1,-1)},reverse:gt.reverse,selector:null,shift:gt.shift,slice:function(){return new b(this.context,this)},sort:gt.sort,splice:gt.splice,toArray:function(){return gt.slice.call(this)},to$:function(){return U(this)},toJQuery:function(){return U(this)},unique:function(){return new b(this.context,g(this))},unshift:gt.unshift}),b.extend=function(e,t,n){if(n.length&&t&&(t instanceof b||t.__dt_wrapper)){var r,i,a,o=function(t,n,r){return function(){var e=n.apply(t,arguments);return b.extend(e,e,r.methodExt),e}};for(r=0,i=n.length;r<i;r++)t[(a=n[r]).name]="function"===a.type?o(e,a.val,a):"object"===a.type?{}:a.val,t[a.name].__dt_wrapper=!0,b.extend(e,t[a.name],a.propExt)}},b.register=t=function(e,t){if(U.isArray(e))for(var n=0,r=e.length;n<r;n++)b.register(e[n],t);else{var i,a,o,s,c=e.split("."),l=mt,u=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n].name===t)return e[n];return null};for(i=0,a=c.length;i<a;i++){var f=u(l,o=(s=-1!==c[i].indexOf("()"))?c[i].replace("()",""):c[i]);f||(f={name:o,val:{},methodExt:[],propExt:[],type:"object"},l.push(f)),i===a-1?(f.val=t,f.type="function"==typeof t?"function":U.isPlainObject(t)?"object":"other"):l=s?f.methodExt:f.propExt}}},b.registerPlural=e=function(e,t,n){b.register(e,n),b.register(t,function(){var e=n.apply(this,arguments);return e===this?this:e instanceof b?e.length?U.isArray(e[0])?new b(e.context,e[0]):e[0]:H:e})};var _t=function(e,n){if(U.isArray(e))return U.map(e,function(e){return _t(e,n)});if("number"==typeof e)return[n[e]];var r=U.map(n,function(e,t){return e.nTable});return U(r).filter(e).map(function(e){var t=U.inArray(this,r);return n[t]}).toArray()};t("tables()",function(e){return e!==H&&null!==e?new b(_t(e,this.context)):this}),t("table()",function(e){var t=this.tables(e),n=t.context;return n.length?new b(n[0]):t}),e("tables().nodes()","table().node()",function(){return this.iterator("table",function(e){return e.nTable},1)}),e("tables().body()","table().body()",function(){return this.iterator("table",function(e){return e.nTBody},1)}),e("tables().header()","table().header()",function(){return this.iterator("table",function(e){return e.nTHead},1)}),e("tables().footer()","table().footer()",function(){return this.iterator("table",function(e){return e.nTFoot},1)}),e("tables().containers()","table().container()",function(){return this.iterator("table",function(e){return e.nTableWrapper},1)}),t("draw()",function(t){return this.iterator("table",function(e){"page"===t?se(e):("string"==typeof t&&(t="full-hold"!==t),ce(e,!1===t))})}),t("page()",function(t){return t===H?this.page.info().page:this.iterator("table",function(e){Le(e,t)})}),t("page.info()",function(e){if(0===this.context.length)return H;var t=this.context[0],n=t._iDisplayStart,r=t.oFeatures.bPaginate?t._iDisplayLength:-1,i=t.fnRecordsDisplay(),a=-1===r;return{page:a?0:Math.floor(n/r),pages:a?1:Math.ceil(i/r),start:n,end:t.fnDisplayEnd(),length:r,recordsTotal:t.fnRecordsTotal(),recordsDisplay:i,serverSide:"ssp"===pt(t)}}),t("page.len()",function(t){return t===H?0!==this.context.length?this.context[0]._iDisplayLength:H:this.iterator("table",function(e){Oe(e,t)})});var bt=function(i,a,e){if(e){var t=new b(i);t.one("draw",function(){e(t.ajax.json())})}if("ssp"==pt(i))ce(i,a);else{Ge(i,!0);var n=i.jqXHR;n&&4!==n.readyState&&n.abort(),de(i,[],function(e){J(i);for(var t=ge(i,e),n=0,r=t.length;n<r;n++)G(i,t[n]);ce(i,a),Ge(i,!1)})}};t("ajax.json()",function(){var e=this.context;if(0<e.length)return e[0].json}),t("ajax.params()",function(){var e=this.context;if(0<e.length)return e[0].oAjaxData}),t("ajax.reload()",function(t,n){return this.iterator("table",function(e){bt(e,!1===n,t)})}),t("ajax.url()",function(t){var e=this.context;return t===H?0===e.length?H:(e=e[0]).ajax?U.isPlainObject(e.ajax)?e.ajax.url:e.ajax:e.sAjaxSource:this.iterator("table",function(e){U.isPlainObject(e.ajax)?e.ajax.url=t:e.ajax=t})}),t("ajax.url().load()",function(t,n){return this.iterator("table",function(e){bt(e,!1===n,t)})});var vt=function(e,t,n,r,i){var a,o,s,c,l,u,f=[],d=typeof t;for(t&&"string"!==d&&"function"!==d&&t.length!==H||(t=[t]),s=0,c=t.length;s<c;s++)for(l=0,u=(o=t[s]&&t[s].split&&!t[s].match(/[\[\(:]/)?t[s].split(","):[t[s]]).length;l<u;l++)(a=n("string"==typeof o[l]?U.trim(o[l]):o[l]))&&a.length&&(f=f.concat(a));var h=p.selector[e];if(h.length)for(s=0,c=h.length;s<c;s++)f=h[s](r,i,f);return g(f)},yt=function(e){return e||(e={}),e.filter&&e.search===H&&(e.search=e.filter),U.extend({search:"none",order:"current",page:"all"},e)},wt=function(e){for(var t=0,n=e.length;t<n;t++)if(0<e[t].length)return e[0]=e[t],e[0].length=1,e.length=1,e.context=[e.context[t]],e;return e.length=0,e},Ct=function(e,t){var n,r=[],i=e.aiDisplay,a=e.aiDisplayMaster,o=t.search,s=t.order,c=t.page;if("ssp"==pt(e))return"removed"===o?[]:m(0,a.length);if("current"==c)for(u=e._iDisplayStart,f=e.fnDisplayEnd();u<f;u++)r.push(i[u]);else if("current"==s||"applied"==s){if("none"==o)r=a.slice();else if("applied"==o)r=i.slice();else if("removed"==o){for(var l={},u=0,f=i.length;u<f;u++)l[i[u]]=null;r=U.map(a,function(e){return l.hasOwnProperty(e)?null:e})}}else if("index"==s||"original"==s)for(u=0,f=e.aoData.length;u<f;u++)"none"==o?r.push(u):(-1===(n=U.inArray(u,i))&&"removed"==o||0<=n&&"applied"==o)&&r.push(u);return r};t("rows()",function(t,n){t===H?t="":U.isPlainObject(t)&&(n=t,t=""),n=yt(n);var e=this.iterator("table",function(e){return vt("row",t,function(n){var e=h(n),r=c.aoData;if(null!==e&&!l)return[e];if(u||(u=Ct(c,l)),null!==e&&-1!==U.inArray(e,u))return[e];if(null===n||n===H||""===n)return u;if("function"==typeof n)return U.map(u,function(e){var t=r[e];return n(e,t._aData,t.nTr)?e:null});if(n.nodeName){var t=n._DT_RowIndex,i=n._DT_CellIndex;if(t!==H)return r[t]&&r[t].nTr===n?[t]:[];if(i)return r[i.row]&&r[i.row].nTr===n.parentNode?[i.row]:[];var a=U(n).closest("*[data-dt-row]");return a.length?[a.data("dt-row")]:[]}if("string"==typeof n&&"#"===n.charAt(0)){var o=c.aIds[n.replace(/^#/,"")];if(o!==H)return[o.idx]}var s=w(v(c.aoData,u,"nTr"));return U(s).filter(n).map(function(){return this._DT_RowIndex}).toArray()},c=e,l=n);var c,l,u},1);return e.selector.rows=t,e.selector.opts=n,e}),t("rows().nodes()",function(){return this.iterator("row",function(e,t){return e.aoData[t].nTr||H},1)}),t("rows().data()",function(){return this.iterator(!0,"rows",function(e,t){return v(e.aoData,t,"_aData")},1)}),e("rows().cache()","row().cache()",function(r){return this.iterator("row",function(e,t){var n=e.aoData[t];return"search"===r?n._aFilterData:n._aSortData},1)}),e("rows().invalidate()","row().invalidate()",function(n){return this.iterator("row",function(e,t){te(e,t,n)})}),e("rows().indexes()","row().index()",function(){return this.iterator("row",function(e,t){return t},1)}),e("rows().ids()","row().id()",function(e){for(var t=[],n=this.context,r=0,i=n.length;r<i;r++)for(var a=0,o=this[r].length;a<o;a++){var s=n[r].rowIdFn(n[r].aoData[this[r][a]]._aData);t.push((!0===e?"#":"")+s)}return new b(n,t)}),e("rows().remove()","row().remove()",function(){var d=this;return this.iterator("row",function(e,t,n){var r,i,a,o,s,c,l=e.aoData,u=l[t];for(l.splice(t,1),r=0,i=l.length;r<i;r++)if(c=(s=l[r]).anCells,null!==s.nTr&&(s.nTr._DT_RowIndex=r),null!==c)for(a=0,o=c.length;a<o;a++)c[a]._DT_CellIndex.row=r;ee(e.aiDisplayMaster,t),ee(e.aiDisplay,t),ee(d[n],t,!1),0<e._iRecordsDisplay&&e._iRecordsDisplay--,dt(e);var f=e.rowIdFn(u._aData);f!==H&&delete e.aIds[f]}),this.iterator("table",function(e){for(var t=0,n=e.aoData.length;t<n;t++)e.aoData[t].idx=t}),this}),t("rows.add()",function(a){var e=this.iterator("table",function(e){var t,n,r,i=[];for(n=0,r=a.length;n<r;n++)(t=a[n]).nodeName&&"TR"===t.nodeName.toUpperCase()?i.push(j(e,t)[0]):i.push(G(e,t));return i},1),t=this.rows(-1);return t.pop(),U.merge(t,e),t}),t("row()",function(e,t){return wt(this.rows(e,t))}),t("row().data()",function(e){var t=this.context;if(e===H)return t.length&&this.length?t[0].aoData[this[0]]._aData:H;var n=t[0].aoData[this[0]];return n._aData=e,U.isArray(e)&&n.nTr&&n.nTr.id&&X(t[0].rowId)(e,n.nTr.id),te(t[0],this[0],"data"),this}),t("row().node()",function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]].nTr||null}),t("row.add()",function(t){t instanceof U&&t.length&&(t=t[0]);var e=this.iterator("table",function(e){return t.nodeName&&"TR"===t.nodeName.toUpperCase()?j(e,t)[0]:G(e,t)});return this.row(e[0])});var At=function(e,t){var n=e.context;if(n.length){var r=n[0].aoData[t!==H?t:e[0]];r&&r._details&&(r._details.remove(),r._detailsShow=H,r._details=H)}},St=function(e,t){var n=e.context;if(n.length&&e.length){var r=n[0].aoData[e[0]];r._details&&((r._detailsShow=t)?r._details.insertAfter(r.nTr):r._details.detach(),Tt(n[0]))}},Tt=function(c){var i=new b(c),e=".dt.DT_details",t="draw"+e,n="column-visibility"+e,r="destroy"+e,l=c.aoData;i.off(t+" "+n+" "+r),0<W(l,"_details").length&&(i.on(t,function(e,t){c===t&&i.rows({page:"current"}).eq(0).each(function(e){var t=l[e];t._detailsShow&&t._details.insertAfter(t.nTr)})}),i.on(n,function(e,t,n,r){if(c===t)for(var i,a=N(t),o=0,s=l.length;o<s;o++)(i=l[o])._details&&i._details.children("td[colspan]").attr("colspan",a)}),i.on(r,function(e,t){if(c===t)for(var n=0,r=l.length;n<r;n++)l[n]._details&&At(i,n)}))},xt="row().child",kt=xt+"()";t(kt,function(e,t){var a,n,o,s,r=this.context;return e===H?r.length&&this.length?r[0].aoData[this[0]]._details:H:(!0===e?this.child.show():!1===e?At(this):r.length&&this.length&&(a=r[0],n=r[0].aoData[this[0]],o=[],(s=function(e,t){if(U.isArray(e)||e instanceof U)for(var n=0,r=e.length;n<r;n++)s(e[n],t);else if(e.nodeName&&"tr"===e.nodeName.toLowerCase())o.push(e);else{var i=U("<tr><td/></tr>").addClass(t);U("td",i).addClass(t).html(e)[0].colSpan=N(a),o.push(i[0])}})(e,t),n._details&&n._details.detach(),n._details=U(o),n._detailsShow&&n._details.insertAfter(n.nTr)),this)}),t([xt+".show()",kt+".show()"],function(e){return St(this,!0),this}),t([xt+".hide()",kt+".hide()"],function(){return St(this,!1),this}),t([xt+".remove()",kt+".remove()"],function(){return At(this),this}),t(xt+".isShown()",function(){var e=this.context;return e.length&&this.length&&e[0].aoData[this[0]]._detailsShow||!1});var Et=/^([^:]+):(name|visIdx|visible)$/,Dt=function(e,t,n,r,i){for(var a=[],o=0,s=i.length;o<s;o++)a.push(x(e,i[o],t));return a};t("columns()",function(n,r){n===H?n="":U.isPlainObject(n)&&(r=n,n=""),r=yt(r);var e=this.iterator("table",function(e){return t=n,l=r,u=(c=e).aoColumns,f=W(u,"sName"),d=W(u,"nTh"),vt("column",t,function(n){var e=h(n);if(""===n)return m(u.length);if(null!==e)return[0<=e?e:u.length+e];if("function"==typeof n){var r=Ct(c,l);return U.map(u,function(e,t){return n(t,Dt(c,t,0,0,r),d[t])?t:null})}var i="string"==typeof n?n.match(Et):"";if(i)switch(i[2]){case"visIdx":case"visible":var t=parseInt(i[1],10);if(t<0){var a=U.map(u,function(e,t){return e.bVisible?t:null});return[a[a.length+t]]}return[z(c,t)];case"name":return U.map(f,function(e,t){return e===i[1]?t:null});default:return[]}if(n.nodeName&&n._DT_CellIndex)return[n._DT_CellIndex.column];var o=U(d).filter(n).map(function(){return U.inArray(this,d)}).toArray();if(o.length||!n.nodeName)return o;var s=U(n).closest("*[data-dt-column]");return s.length?[s.data("dt-column")]:[]},c,l);var c,t,l,u,f,d},1);return e.selector.cols=n,e.selector.opts=r,e}),e("columns().header()","column().header()",function(e,t){return this.iterator("column",function(e,t){return e.aoColumns[t].nTh},1)}),e("columns().footer()","column().footer()",function(e,t){return this.iterator("column",function(e,t){return e.aoColumns[t].nTf},1)}),e("columns().data()","column().data()",function(){return this.iterator("column-rows",Dt,1)}),e("columns().dataSrc()","column().dataSrc()",function(){return this.iterator("column",function(e,t){return e.aoColumns[t].mData},1)}),e("columns().cache()","column().cache()",function(a){return this.iterator("column-rows",function(e,t,n,r,i){return v(e.aoData,i,"search"===a?"_aFilterData":"_aSortData",t)},1)}),e("columns().nodes()","column().nodes()",function(){return this.iterator("column-rows",function(e,t,n,r,i){return v(e.aoData,i,"anCells",t)},1)}),e("columns().visible()","column().visible()",function(n,r){var t=this,e=this.iterator("column",function(e,t){if(n===H)return e.aoColumns[t].bVisible;!function(e,t,n){var r,i,a,o,s=e.aoColumns,c=s[t],l=e.aoData;if(n===H)return c.bVisible;if(c.bVisible!==n){if(n){var u=U.inArray(!0,W(s,"bVisible"),t+1);for(i=0,a=l.length;i<a;i++)o=l[i].nTr,r=l[i].anCells,o&&o.insertBefore(r[t],r[u]||null)}else U(W(e.aoData,"anCells",t)).detach();c.bVisible=n}}(e,t,n)});return n!==H&&this.iterator("table",function(e){oe(e,e.aoHeader),oe(e,e.aoFooter),e.aiDisplay.length||U(e.nTBody).find("td[colspan]").attr("colspan",N(e)),rt(e),t.iterator("column",function(e,t){ft(e,null,"column-visibility",[e,t,n,r])}),(r===H||r)&&t.columns.adjust()}),e}),e("columns().indexes()","column().index()",function(n){return this.iterator("column",function(e,t){return"visible"===n?S(e,t):t},1)}),t("columns.adjust()",function(){return this.iterator("table",function(e){q(e)},1)}),t("column.index()",function(e,t){if(0!==this.context.length){var n=this.context[0];if("fromVisible"===e||"toData"===e)return z(n,t);if("fromData"===e||"toVisible"===e)return S(n,t)}}),t("column()",function(e,t){return wt(this.columns(e,t))});t("cells()",function(g,e,_){if(U.isPlainObject(g)&&(g.row===H?(_=g,g=null):(_=e,e=null)),U.isPlainObject(e)&&(_=e,e=null),null===e||e===H)return this.iterator("table",function(e){return r=e,t=g,n=yt(_),f=r.aoData,d=Ct(r,n),h=w(v(f,d,"anCells")),p=U([].concat.apply([],h)),m=r.aoColumns.length,vt("cell",t,function(e){var t="function"==typeof e;if(null===e||e===H||t){for(a=[],o=0,s=d.length;o<s;o++)for(i=d[o],c=0;c<m;c++)l={row:i,column:c},t?(u=f[i],e(l,x(r,i,c),u.anCells?u.anCells[c]:null)&&a.push(l)):a.push(l);return a}if(U.isPlainObject(e))return e.column!==H&&e.row!==H&&-1!==U.inArray(e.row,d)?[e]:[];var n=p.filter(e).map(function(e,t){return{row:t._DT_CellIndex.row,column:t._DT_CellIndex.column}}).toArray();return n.length||!e.nodeName?n:(u=U(e).closest("*[data-dt-row]")).length?[{row:u.data("dt-row"),column:u.data("dt-column")}]:[]},r,n);var r,t,n,i,a,o,s,c,l,u,f,d,h,p,m});var r,i,a,o,t=_?{page:_.page,order:_.order,search:_.search}:{},s=this.columns(e,t),c=this.rows(g,t),n=this.iterator("table",function(e,t){var n=[];for(r=0,i=c[t].length;r<i;r++)for(a=0,o=s[t].length;a<o;a++)n.push({row:c[t][r],column:s[t][a]});return n},1),l=_&&_.selected?this.cells(n,_):n;return U.extend(l.selector,{cols:e,rows:g,opts:_}),l}),e("cells().nodes()","cell().node()",function(){return this.iterator("cell",function(e,t,n){var r=e.aoData[t];return r&&r.anCells?r.anCells[n]:H},1)}),t("cells().data()",function(){return this.iterator("cell",function(e,t,n){return x(e,t,n)},1)}),e("cells().cache()","cell().cache()",function(r){return r="search"===r?"_aFilterData":"_aSortData",this.iterator("cell",function(e,t,n){return e.aoData[t][r][n]},1)}),e("cells().render()","cell().render()",function(r){return this.iterator("cell",function(e,t,n){return x(e,t,n,r)},1)}),e("cells().indexes()","cell().index()",function(){return this.iterator("cell",function(e,t,n){return{row:t,column:n,columnVisible:S(e,n)}},1)}),e("cells().invalidate()","cell().invalidate()",function(r){return this.iterator("cell",function(e,t,n){te(e,t,r,n)})}),t("cell()",function(e,t,n){return wt(this.cells(e,t,n))}),t("cell().data()",function(e){var t=this.context,n=this[0];return e===H?t.length&&n.length?x(t[0],n[0].row,n[0].column):H:(B(t[0],n[0].row,n[0].column,e),te(t[0],n[0].row,"data",n[0].column),this)}),t("order()",function(t,e){var n=this.context;return t===H?0!==n.length?n[0].aaSorting:H:("number"==typeof t?t=[[t,e]]:t.length&&!U.isArray(t[0])&&(t=Array.prototype.slice.call(arguments)),this.iterator("table",function(e){e.aaSorting=t.slice()}))}),t("order.listener()",function(t,n,r){return this.iterator("table",function(e){et(e,t,n,r)})}),t("order.fixed()",function(t){if(t)return this.iterator("table",function(e){e.aaSortingFixed=U.extend(!0,{},t)});var e=this.context,n=e.length?e[0].aaSortingFixed:H;return U.isArray(n)?{pre:n}:n}),t(["columns().order()","column().order()"],function(r){var i=this;return this.iterator("table",function(e,t){var n=[];U.each(i[t],function(e,t){n.push([t,r])}),e.aaSorting=n})}),t("search()",function(t,n,r,i){var e=this.context;return t===H?0!==e.length?e[0].oPreviousSearch.sSearch:H:this.iterator("table",function(e){e.oFeatures.bFilter&&be(e,U.extend({},e.oPreviousSearch,{sSearch:t+"",bRegex:null!==n&&n,bSmart:null===r||r,bCaseInsensitive:null===i||i}),1)})}),e("columns().search()","column().search()",function(r,i,a,o){return this.iterator("column",function(e,t){var n=e.aoPreSearchCols;if(r===H)return n[t].sSearch;e.oFeatures.bFilter&&(U.extend(n[t],{sSearch:r+"",bRegex:null!==i&&i,bSmart:null===a||a,bCaseInsensitive:null===o||o}),be(e,e.oPreviousSearch,1))})}),t("state()",function(){return this.context.length?this.context[0].oSavedState:null}),t("state.clear()",function(){return this.iterator("table",function(e){e.fnStateSaveCallback.call(e.oInstance,e,{})})}),t("state.loaded()",function(){return this.context.length?this.context[0].oLoadedState:null}),t("state.save()",function(){return this.iterator("table",function(e){rt(e)})}),k.versionCheck=k.fnVersionCheck=function(e){for(var t,n,r=k.version.split("."),i=e.split("."),a=0,o=i.length;a<o;a++)if((t=parseInt(r[a],10)||0)!==(n=parseInt(i[a],10)||0))return n<t;return!0},k.isDataTable=k.fnIsDataTable=function(e){var i=U(e).get(0),a=!1;return e instanceof k.Api||(U.each(k.settings,function(e,t){var n=t.nScrollHead?U("table",t.nScrollHead)[0]:null,r=t.nScrollFoot?U("table",t.nScrollFoot)[0]:null;t.nTable!==i&&n!==i&&r!==i||(a=!0)}),a)},k.tables=k.fnTables=function(t){var e=!1;U.isPlainObject(t)&&(e=t.api,t=t.visible);var n=U.map(k.settings,function(e){if(!t||t&&U(e.nTable).is(":visible"))return e.nTable});return e?new b(n):n},k.camelToHungarian=D,t("$()",function(e,t){var n=this.rows(t).nodes(),r=U(n);return U([].concat(r.filter(e).toArray(),r.find(e).toArray()))}),U.each(["on","one","off"],function(e,n){t(n+"()",function(){var e=Array.prototype.slice.call(arguments);e[0]=U.map(e[0].split(/\s/),function(e){return e.match(/\.dt\b/)?e:e+".dt"}).join(" ");var t=U(this.tables().nodes());return t[n].apply(t,e),this})}),t("clear()",function(){return this.iterator("table",function(e){J(e)})}),t("settings()",function(){return new b(this.context,this.context)}),t("init()",function(){var e=this.context;return e.length?e[0].oInit:null}),t("data()",function(){return this.iterator("table",function(e){return W(e.aoData,"_aData")}).flatten()}),t("destroy()",function(p){return p=p||!1,this.iterator("table",function(t){var n,e=t.nTableWrapper.parentNode,r=t.oClasses,i=t.nTable,a=t.nTBody,o=t.nTHead,s=t.nTFoot,c=U(i),l=U(a),u=U(t.nTableWrapper),f=U.map(t.aoData,function(e){return e.nTr});t.bDestroying=!0,ft(t,"aoDestroyCallback","destroy",[t]),p||new b(t).columns().visible(!0),u.off(".DT").find(":not(tbody *)").off(".DT"),U(E).off(".DT-"+t.sInstance),i!=o.parentNode&&(c.children("thead").detach(),c.append(o)),s&&i!=s.parentNode&&(c.children("tfoot").detach(),c.append(s)),t.aaSorting=[],t.aaSortingFixed=[],tt(t),U(f).removeClass(t.asStripeClasses.join(" ")),U("th, td",o).removeClass(r.sSortable+" "+r.sSortableAsc+" "+r.sSortableDesc+" "+r.sSortableNone),l.children().detach(),l.append(f);var d=p?"remove":"detach";c[d](),u[d](),!p&&e&&(e.insertBefore(i,t.nTableReinsertBefore),c.css("width",t.sDestroyWidth).removeClass(r.sTable),(n=t.asDestroyStripes.length)&&l.children().each(function(e){U(this).addClass(t.asDestroyStripes[e%n])}));var h=U.inArray(t,k.settings);-1!==h&&k.settings.splice(h,1)})}),U.each(["column","row","cell"],function(e,c){t(c+"s().every()",function(a){var o=this.selector.opts,s=this;return this.iterator(c,function(e,t,n,r,i){a.call(s[c](t,"cell"===c?n:o,"cell"===c?o:H),t,n,r,i)})})}),t("i18n()",function(e,t,n){var r=this.context[0],i=Q(e)(r.oLanguage);return i===H&&(i=t),n!==H&&U.isPlainObject(i)&&(i=i[n]!==H?i[n]:i._),i.replace("%d",n)}),k.version="1.10.21",k.settings=[],k.models={},k.models.oSearch={bCaseInsensitive:!0,sSearch:"",bRegex:!1,bSmart:!0},k.models.oRow={nTr:null,anCells:null,_aData:[],_aSortData:null,_aFilterData:null,_sFilterRow:null,_sRowStripe:"",src:null,idx:-1},k.models.oColumn={idx:null,aDataSort:null,asSorting:null,bSearchable:null,bSortable:null,bVisible:null,_sManualType:null,_bAttrSrc:!1,fnCreatedCell:null,fnGetData:null,fnSetData:null,mData:null,mRender:null,nTh:null,nTf:null,sClass:null,sContentPadding:null,sDefaultContent:null,sName:null,sSortDataType:"std",sSortingClass:null,sSortingClassJUI:null,sTitle:null,sType:null,sWidth:null,sWidthOrig:null},k.defaults={aaData:null,aaSorting:[[0,"asc"]],aaSortingFixed:[],ajax:null,aLengthMenu:[10,25,50,100],aoColumns:null,aoColumnDefs:null,aoSearchCols:[],asStripeClasses:null,bAutoWidth:!0,bDeferRender:!1,bDestroy:!1,bFilter:!0,bInfo:!0,bLengthChange:!0,bPaginate:!0,bProcessing:!1,bRetrieve:!1,bScrollCollapse:!1,bServerSide:!1,bSort:!0,bSortMulti:!0,bSortCellsTop:!1,bSortClasses:!0,bStateSave:!1,fnCreatedRow:null,fnDrawCallback:null,fnFooterCallback:null,fnFormatNumber:function(e){return e.toString().replace(/\B(?=(\d{3})+(?!\d))/g,this.oLanguage.sThousands)},fnHeaderCallback:null,fnInfoCallback:null,fnInitComplete:null,fnPreDrawCallback:null,fnRowCallback:null,fnServerData:null,fnServerParams:null,fnStateLoadCallback:function(e){try{return JSON.parse((-1===e.iStateDuration?sessionStorage:localStorage).getItem("DataTables_"+e.sInstance+"_"+location.pathname))}catch(e){return{}}},fnStateLoadParams:null,fnStateLoaded:null,fnStateSaveCallback:function(e,t){try{(-1===e.iStateDuration?sessionStorage:localStorage).setItem("DataTables_"+e.sInstance+"_"+location.pathname,JSON.stringify(t))}catch(e){}},fnStateSaveParams:null,iStateDuration:7200,iDeferLoading:null,iDisplayLength:10,iDisplayStart:0,iTabIndex:0,oClasses:{},oLanguage:{oAria:{sSortAscending:": activate to sort column ascending",sSortDescending:": activate to sort column descending"},oPaginate:{sFirst:"First",sLast:"Last",sNext:"Next",sPrevious:"Previous"},sEmptyTable:"No data available in table",sInfo:"Showing _START_ to _END_ of _TOTAL_ entries",sInfoEmpty:"Showing 0 to 0 of 0 entries",sInfoFiltered:"(filtered from _MAX_ total entries)",sInfoPostFix:"",sDecimal:"",sThousands:",",sLengthMenu:"Show _MENU_ entries",sLoadingRecords:"Loading...",sProcessing:"Processing...",sSearch:"Search:",sSearchPlaceholder:"",sUrl:"",sZeroRecords:"No matching records found"},oSearch:U.extend({},k.models.oSearch),sAjaxDataProp:"data",sAjaxSource:null,sDom:"lfrtip",searchDelay:null,sPaginationType:"simple_numbers",sScrollX:"",sScrollXInner:"",sScrollY:"",sServerMethod:"GET",renderer:null,rowId:"DT_RowId"},_(k.defaults),k.defaults.column={aDataSort:null,iDataSort:-1,asSorting:["asc","desc"],bSearchable:!0,bSortable:!0,bVisible:!0,fnCreatedCell:null,mData:null,mRender:null,sCellType:"td",sClass:"",sContentPadding:"",sDefaultContent:null,sName:"",sSortDataType:"std",sTitle:null,sType:null,sWidth:null},_(k.defaults.column),k.models.oSettings={oFeatures:{bAutoWidth:null,bDeferRender:null,bFilter:null,bInfo:null,bLengthChange:null,bPaginate:null,bProcessing:null,bServerSide:null,bSort:null,bSortMulti:null,bSortClasses:null,bStateSave:null},oScroll:{bCollapse:null,iBarWidth:0,sX:null,sXInner:null,sY:null},oLanguage:{fnInfoCallback:null},oBrowser:{bScrollOversize:!1,bScrollbarLeft:!1,bBounding:!1,barWidth:0},ajax:null,aanFeatures:[],aoData:[],aiDisplay:[],aiDisplayMaster:[],aIds:{},aoColumns:[],aoHeader:[],aoFooter:[],oPreviousSearch:{},aoPreSearchCols:[],aaSorting:null,aaSortingFixed:[],asStripeClasses:null,asDestroyStripes:[],sDestroyWidth:0,aoRowCallback:[],aoHeaderCallback:[],aoFooterCallback:[],aoDrawCallback:[],aoRowCreatedCallback:[],aoPreDrawCallback:[],aoInitComplete:[],aoStateSaveParams:[],aoStateLoadParams:[],aoStateLoaded:[],sTableId:"",nTable:null,nTHead:null,nTFoot:null,nTBody:null,nTableWrapper:null,bDeferLoading:!1,bInitialised:!1,aoOpenRows:[],sDom:null,searchDelay:null,sPaginationType:"two_button",iStateDuration:0,aoStateSave:[],aoStateLoad:[],oSavedState:null,oLoadedState:null,sAjaxSource:null,sAjaxDataProp:null,bAjaxDataGet:!0,jqXHR:null,json:H,oAjaxData:H,fnServerData:null,aoServerParams:[],sServerMethod:null,fnFormatNumber:null,aLengthMenu:null,iDraw:0,bDrawing:!1,iDrawError:-1,_iDisplayLength:10,_iDisplayStart:0,_iRecordsTotal:0,_iRecordsDisplay:0,oClasses:{},bFiltered:!1,bSorted:!1,bSortCellsTop:null,oInit:null,aoDestroyCallback:[],fnRecordsTotal:function(){return"ssp"==pt(this)?1*this._iRecordsTotal:this.aiDisplayMaster.length},fnRecordsDisplay:function(){return"ssp"==pt(this)?1*this._iRecordsDisplay:this.aiDisplay.length},fnDisplayEnd:function(){var e=this._iDisplayLength,t=this._iDisplayStart,n=t+e,r=this.aiDisplay.length,i=this.oFeatures,a=i.bPaginate;return i.bServerSide?!1===a||-1===e?t+r:Math.min(t+e,this._iRecordsDisplay):!a||r<n||-1===e?r:n},oInstance:null,sInstance:null,iTabIndex:0,nScrollHead:null,nScrollFoot:null,aLastSort:[],oPlugins:{},rowIdFn:null,rowId:null},k.ext=p={buttons:{},classes:{},builder:"-source-",errMode:"alert",feature:[],search:[],selector:{cell:[],column:[],row:[]},internal:{},legacy:{ajax:null},pager:{},renderer:{pageButton:{},header:{}},order:{},type:{detect:[],search:{},order:{}},_unique:0,fnVersionCheck:k.fnVersionCheck,iApiIndex:0,oJUIClasses:{},sVersion:k.version},U.extend(p,{afnFiltering:p.search,aTypes:p.type.detect,ofnSearch:p.type.search,oSort:p.type.order,afnSortData:p.order,aoFeatures:p.feature,oApi:p.internal,oStdClasses:p.classes,oPagination:p.pager}),U.extend(k.ext.classes,{sTable:"dataTable",sNoFooter:"no-footer",sPageButton:"paginate_button",sPageButtonActive:"current",sPageButtonDisabled:"disabled",sStripeOdd:"odd",sStripeEven:"even",sRowEmpty:"dataTables_empty",sWrapper:"dataTables_wrapper",sFilter:"dataTables_filter",sInfo:"dataTables_info",sPaging:"dataTables_paginate paging_",sLength:"dataTables_length",sProcessing:"dataTables_processing",sSortAsc:"sorting_asc",sSortDesc:"sorting_desc",sSortable:"sorting",sSortableAsc:"sorting_asc_disabled",sSortableDesc:"sorting_desc_disabled",sSortableNone:"sorting_disabled",sSortColumn:"sorting_",sFilterInput:"",sLengthSelect:"",sScrollWrapper:"dataTables_scroll",sScrollHead:"dataTables_scrollHead",sScrollHeadInner:"dataTables_scrollHeadInner",sScrollBody:"dataTables_scrollBody",sScrollFoot:"dataTables_scrollFoot",sScrollFootInner:"dataTables_scrollFootInner",sHeaderTH:"",sFooterTH:"",sSortJUIAsc:"",sSortJUIDesc:"",sSortJUI:"",sSortJUIAscAllowed:"",sSortJUIDescAllowed:"",sSortJUIWrapper:"",sSortIcon:"",sJUIHeader:"",sJUIFooter:""});var It=k.ext.pager;function Pt(e,t){var n=[],r=It.numbers_length,i=Math.floor(r/2);return t<=r?n=m(0,t):e<=i?((n=m(0,r-2)).push("ellipsis"),n.push(t-1)):(t-1-i<=e?(n=m(t-(r-2),t)).splice(0,0,"ellipsis"):((n=m(e-i+2,e+i-1)).push("ellipsis"),n.push(t-1),n.splice(0,0,"ellipsis")),n.splice(0,0,0)),n.DT_el="span",n}U.extend(It,{simple:function(e,t){return["previous","next"]},full:function(e,t){return["first","previous","next","last"]},numbers:function(e,t){return[Pt(e,t)]},simple_numbers:function(e,t){return["previous",Pt(e,t),"next"]},full_numbers:function(e,t){return["first","previous",Pt(e,t),"next","last"]},first_last_numbers:function(e,t){return["first",Pt(e,t),"last"]},_numbers:Pt,numbers_length:7}),U.extend(!0,k.ext.renderer,{pageButton:{_:function(l,e,u,t,f,d){var h,p,n,m=l.oClasses,g=l.oLanguage.oPaginate,_=l.oLanguage.oAria.paginate||{},b=0,v=function(e,t){var n,r,i,a,o=m.sPageButtonDisabled,s=function(e){Le(l,e.data.action,!0)};for(n=0,r=t.length;n<r;n++)if(i=t[n],U.isArray(i)){var c=U("<"+(i.DT_el||"div")+"/>").appendTo(e);v(c,i)}else{switch(h=null,p=i,a=l.iTabIndex,i){case"ellipsis":e.append('<span class="ellipsis">&#x2026;</span>');break;case"first":h=g.sFirst,0===f&&(a=-1,p+=" "+o);break;case"previous":h=g.sPrevious,0===f&&(a=-1,p+=" "+o);break;case"next":h=g.sNext,0!==d&&f!==d-1||(a=-1,p+=" "+o);break;case"last":h=g.sLast,f===d-1&&(a=-1,p+=" "+o);break;default:h=i+1,p=f===i?m.sPageButtonActive:""}null!==h&&(lt(U("<a>",{class:m.sPageButton+" "+p,"aria-controls":l.sTableId,"aria-label":_[i],"data-dt-idx":b,tabindex:a,id:0===u&&"string"==typeof i?l.sTableId+"_"+i:null}).html(h).appendTo(e),{action:i},s),b++)}};try{n=U(e).find(y.activeElement).data("dt-idx")}catch(e){}v(U(e).empty(),t),n!==H&&U(e).find("[data-dt-idx="+n+"]").trigger("focus")}}}),U.extend(k.ext.type.detect,[function(e,t){var n=t.oLanguage.sDecimal;return u(e,n)?"num"+n:null},function(e,t){if(e&&!(e instanceof Date)&&!a.test(e))return null;var n=Date.parse(e);return null!==n&&!isNaN(n)||c(e)?"date":null},function(e,t){var n=t.oLanguage.sDecimal;return u(e,n,!0)?"num-fmt"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return f(e,n)?"html-num"+n:null},function(e,t){var n=t.oLanguage.sDecimal;return f(e,n,!0)?"html-num-fmt"+n:null},function(e,t){return c(e)||"string"==typeof e&&-1!==e.indexOf("<")?"html":null}]),U.extend(k.ext.type.search,{html:function(e){return c(e)?e:"string"==typeof e?e.replace(r," ").replace(i,""):""},string:function(e){return c(e)?e:"string"==typeof e?e.replace(r," "):e}});var Mt=function(e,t,n,r){return 0===e||e&&"-"!==e?(t&&(e=l(e,t)),e.replace&&(n&&(e=e.replace(n,"")),r&&(e=e.replace(r,""))),1*e):-1/0};function $t(n){U.each({num:function(e){return Mt(e,n)},"num-fmt":function(e){return Mt(e,n,s)},"html-num":function(e){return Mt(e,n,i)},"html-num-fmt":function(e){return Mt(e,n,i,s)}},function(e,t){p.type.order[e+n+"-pre"]=t,e.match(/^html\-/)&&(p.type.search[e+n]=p.type.search.html)})}U.extend(p.type.order,{"date-pre":function(e){var t=Date.parse(e);return isNaN(t)?-1/0:t},"html-pre":function(e){return c(e)?"":e.replace?e.replace(/<.*?>/g,"").toLowerCase():e+""},"string-pre":function(e){return c(e)?"":"string"==typeof e?e.toLowerCase():e.toString?e.toString():""},"string-asc":function(e,t){return e<t?-1:t<e?1:0},"string-desc":function(e,t){return e<t?1:t<e?-1:0}}),$t(""),U.extend(!0,k.ext.renderer,{header:{_:function(a,o,s,c){U(a.nTable).on("order.dt.DT",function(e,t,n,r){if(a===t){var i=s.idx;o.removeClass(s.sSortingClass+" "+c.sSortAsc+" "+c.sSortDesc).addClass("asc"==r[i]?c.sSortAsc:"desc"==r[i]?c.sSortDesc:s.sSortingClass)}})},jqueryui:function(a,o,s,c){U("<div/>").addClass(c.sSortJUIWrapper).append(o.contents()).append(U("<span/>").addClass(c.sSortIcon+" "+s.sSortingClassJUI)).appendTo(o),U(a.nTable).on("order.dt.DT",function(e,t,n,r){if(a===t){var i=s.idx;o.removeClass(c.sSortAsc+" "+c.sSortDesc).addClass("asc"==r[i]?c.sSortAsc:"desc"==r[i]?c.sSortDesc:s.sSortingClass),o.find("span."+c.sSortIcon).removeClass(c.sSortJUIAsc+" "+c.sSortJUIDesc+" "+c.sSortJUI+" "+c.sSortJUIAscAllowed+" "+c.sSortJUIDescAllowed).addClass("asc"==r[i]?c.sSortJUIAsc:"desc"==r[i]?c.sSortJUIDesc:s.sSortingClassJUI)}})}}});var Ot=function(e){return"string"==typeof e?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;"):e};function Rt(t){return function(){var e=[at(this[k.ext.iApiIndex])].concat(Array.prototype.slice.call(arguments));return k.ext.internal[t].apply(this,e)}}return k.render={number:function(a,o,s,c,l){return{display:function(e){if("number"!=typeof e&&"string"!=typeof e)return e;var t=e<0?"-":"",n=parseFloat(e);if(isNaN(n))return Ot(e);n=n.toFixed(s),e=Math.abs(n);var r=parseInt(e,10),i=s?o+(e-r).toFixed(s).substring(2):"";return t+(c||"")+r.toString().replace(/\B(?=(\d{3})+(?!\d))/g,a)+i+(l||"")}}},text:function(){return{display:Ot,filter:Ot}}},U.extend(k.ext.internal,{_fnExternApiFunc:Rt,_fnBuildAjax:de,_fnAjaxUpdate:he,_fnAjaxParameters:pe,_fnAjaxUpdateDraw:me,_fnAjaxDataSrc:ge,_fnAddColumn:O,_fnColumnOptions:R,_fnAdjustColumnSizing:q,_fnVisibleToColumnIndex:z,_fnColumnIndexToVisible:S,_fnVisbleColumns:N,_fnGetColumns:L,_fnColumnTypes:T,_fnApplyColumnDefs:F,_fnHungarianMap:_,_fnCamelToHungarian:D,_fnLanguageCompat:I,_fnBrowserDetect:$,_fnAddData:G,_fnAddTr:j,_fnNodeToDataIndex:function(e,t){return t._DT_RowIndex!==H?t._DT_RowIndex:null},_fnNodeToColumnIndex:function(e,t,n){return U.inArray(n,e.aoData[t].anCells)},_fnGetCellData:x,_fnSetCellData:B,_fnSplitObjNotation:K,_fnGetObjectDataFn:Q,_fnSetObjectDataFn:X,_fnGetDataMaster:Z,_fnClearTable:J,_fnDeleteIndex:ee,_fnInvalidate:te,_fnGetRowElements:ne,_fnCreateTr:re,_fnBuildHead:ae,_fnDrawHead:oe,_fnDraw:se,_fnReDraw:ce,_fnAddOptionsHtml:le,_fnDetectHeader:ue,_fnGetUniqueThs:fe,_fnFeatureHtmlFilter:_e,_fnFilterComplete:be,_fnFilterCustom:ve,_fnFilterColumn:ye,_fnFilter:we,_fnFilterCreateSearch:Ce,_fnEscapeRegex:Ae,_fnFilterData:xe,_fnFeatureHtmlInfo:De,_fnUpdateInfo:Ie,_fnInfoMacros:Pe,_fnInitialise:Me,_fnInitComplete:$e,_fnLengthChange:Oe,_fnFeatureHtmlLength:Re,_fnFeatureHtmlPaginate:Ne,_fnPageChange:Le,_fnFeatureHtmlProcessing:Fe,_fnProcessingDisplay:Ge,_fnFeatureHtmlTable:je,_fnScrollDraw:Be,_fnApplyToChildren:Ue,_fnCalculateColumnWidths:We,_fnThrottle:qe,_fnConvertToWidth:ze,_fnGetWidestNode:Ve,_fnGetMaxLenString:Ye,_fnStringToCss:Ke,_fnSortFlatten:Qe,_fnSort:Xe,_fnSortAria:Ze,_fnSortListener:Je,_fnSortAttachListener:et,_fnSortingClasses:tt,_fnSortData:nt,_fnSaveState:rt,_fnLoadState:it,_fnSettingsFromNode:at,_fnLog:ot,_fnMap:st,_fnBindAction:lt,_fnCallbackReg:ut,_fnCallbackFire:ft,_fnLengthOverflow:dt,_fnRenderer:ht,_fnDataSource:pt,_fnRowAttributes:ie,_fnExtend:ct,_fnCalculateEnd:function(){}}),((U.fn.dataTable=k).$=U).fn.dataTableSettings=k.settings,U.fn.dataTableExt=k.ext,U.fn.DataTable=function(e){return U(this).dataTable(e).api()},U.each(k,function(e,t){U.fn.DataTable[e]=t}),U.fn.dataTable}),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables"),function(p,e,m,_){"use strict";function t(s,c,l,u,f){return e.$inject=["tElm"],t.$inject=["$scope"],{restrict:"A",scope:{dtOptions:"=",dtColumns:"=",dtColumnDefs:"=",datatable:"@",dtInstance:"="},compile:e,controller:t};function e(e){var o=e[0].innerHTML;return function(t,n,e,r){function i(e,t){e!==t&&r.render(n,r.buildOptionsPromise(),o)}var a=e.dtDisableDeepWatchers?"$watchCollection":"$watch";_.forEach(["dtColumns","dtColumnDefs","dtOptions"],function(e){t[a].call(t,e,i,!0)}),u.showLoading(n,t),r.render(n,r.buildOptionsPromise(),o)}}function t(i){var a;function o(e){_.isFunction(i.dtInstance)?i.dtInstance(e):_.isDefined(i.dtInstance)&&(i.dtInstance=e)}this.buildOptionsPromise=function(){var t=s.defer();return s.all([s.when(i.dtOptions),s.when(i.dtColumns),s.when(i.dtColumnDefs)]).then(function(e){var t,n=e[0],r=e[1],i=e[2];if(f.deleteProperty(n,"$promise"),f.deleteProperty(r,"$promise"),f.deleteProperty(i,"$promise"),_.isDefined(n)&&(t={},_.extend(t,n),_.isArray(r)&&(t.aoColumns=r),_.isArray(i)&&(t.aoColumnDefs=i),t.language&&t.language.url)){var a=s.defer();c.get(t.language.url).success(function(e){a.resolve(e)}),t.language=a.promise}return f.resolveObjectPromises(t,["data","aaData","fnPromise"])}).then(function(e){t.resolve(e)}),t.promise},this.render=function(n,e,r){e.then(function(e){u.preRender(e);var t=i.datatable&&"ng"===i.datatable;a&&a._renderer?a._renderer.withOptions(e).render(n,i,r).then(function(e){o(a=e)}):l.fromOptions(e,t).render(n,i,r).then(function(e){o(a=e)})})}}}function n(n){return{newColumnDef:function(e){if(_.isUndefined(e))throw new Error('The parameter "targets" must be defined! See https://datatables.net/reference/option/columnDefs.targets');var t=Object.create(n.DTColumn);return _.isArray(e)?t.aTargets=e:t.aTargets=[e],t}}}function r(t,n,r){return{compileHtml:function(e){return t(_.element('<div class="'+r+'">'+n.loadingTemplate+"</div>"))(e)},isLoading:function(e){return e.hasClass(r)}}}function i(r){var i=[],n={showLoading:function(e,t){var n=_.element(r.compileHtml(t));e.after(n),e.hide(),n.show()},hideLoading:function(e){e.show();var t=e.next();r.isLoading(t)&&t.remove()},renderDataTable:function(e,t){var n="#"+e.attr("id");m.fn.dataTable.isDataTable(n)&&_.isObject(t)&&(t.destroy=!0);var r=e.DataTable(t),i=e.dataTable(),a={id:e.attr("id"),DataTable:r,dataTable:i};return o(t,a),a},hideLoadingAndRenderDataTable:function(e,t){return n.hideLoading(e),n.renderDataTable(e,t)},registerPlugin:function(e){i.push(e)},postRender:o,preRender:function(t){_.forEach(i,function(e){_.isFunction(e.preRender)&&e.preRender(t)})}};return n;function o(t,n){_.forEach(i,function(e){_.isFunction(e.postRender)&&e.postRender(t,n)})}}function a(c,n,l,u){return{create:function(e){var i,a,o,s=Object.create(n);function t(e,t){a=e,o=t;var n=u.newDTInstance(s),r=l.hideLoadingAndRenderDataTable(e,s.options);return i=r.DataTable,u.copyDTProperties(r,n),c.when(n)}return s.name="DTDefaultRenderer",s.options=e,s.render=t,s.reloadData=function(){},s.changeData=function(){},s.rerender=function(){i.destroy(),l.showLoading(a,o),t(a,o)},s}}}function o(n,m,r,g,i,_,b){return{create:function(e){var c,l,u,f,t,d,h=Object.create(i);return h.name="DTNGRenderer",h.options=e,h.render=function(e,t,n){c=n,u=e,f=t.$parent,d=b.newDTInstance(h);var r=m.defer(),i=e.find("tbody").html(),a=i.match(/^\s*.+?\s+in\s+(\S*)\s*/m);if(!a)throw new Error('Expected expression in form of "_item_ in _collection_[ track by _id_]" but got "{0}".',i);var o=a[1],s=!1;return f.$watchCollection(o,function(){l&&s&&p(),g(function(){s=!0,_.preRender(h.options);var e=_.hideLoadingAndRenderDataTable(u,h.options);l=e.DataTable,b.copyDTProperties(e,d),r.resolve(d)},0,!1)},!0),r.promise},h.reloadData=function(){n.warn("The Angular Renderer does not support reloading data. You need to do it directly on your model")},h.changeData=function(){n.warn("The Angular Renderer does not support changing the data. You need to change your model directly.")},h.rerender=function(){p(),_.showLoading(u,f),_.preRender(e),g(function(){var e=_.hideLoadingAndRenderDataTable(u,h.options);l=e.DataTable,b.copyDTProperties(e,d)},0,!1)},h;function p(){t&&t.$destroy(),l.ngDestroy(),u.html(c),t=f.$new(),r(u.contents())(t)}}}}function s(p,m,l,n,g,u){return{create:function(e){var i,f,r,a,d=null,h=Object.create(n);return h.name="DTPromiseRenderer",h.options=e,h.render=t,h.reloadData=function(t,n){var r=i&&i.page()?i.page():0;_.isFunction(h.options.fnPromise)?o(h.options.fnPromise,c).then(function(e){_.isFunction(t)&&t(e.DataTable.data()),!1===n&&e.DataTable.page(r).draw(!1)}):l.warn("In order to use the reloadData functionality with a Promise renderer, you need to provide a function that returns a promise.")},h.changeData=function(e){h.options.fnPromise=e,r.dtOptions.fnPromise=e,o(h.options.fnPromise,c)},h.rerender=function(){i.destroy(),g.showLoading(f,r),g.preRender(e),t(f,r)},h;function t(e,t){var n=p.defer();return a=u.newDTInstance(h),f=e,r=t,o(h.options.fnPromise,g.renderDataTable).then(function(e){i=e.DataTable,u.copyDTProperties(e,a),n.resolve(a)}),n.promise}function o(e,t){var n=p.defer();if(_.isUndefined(e))throw new Error("You must provide a promise or a function that returns a promise!");return d?d.then(function(){n.resolve(s(e,t))}):n.resolve(s(e,t)),n.promise}function s(e,l){var u=p.defer();return(d=_.isFunction(e)?e():e).then(function(e){var t,n,r,i,a,o=e;if(h.options.sAjaxDataProp)for(var s=h.options.sAjaxDataProp.split(".");s.length;){var c=s.shift();c in o&&(o=o[c])}d=null,u.resolve((t=h.options,n=f,r=o,i=l,a=p.defer(),delete r.$promise,t.aaData=r,m(function(){g.hideLoading(n),t.bDestroy=!0,a.resolve(i(n,t))},0,!1),a.promise))}),u.promise}function c(e,t){return i.clear(),i.rows.add(t.aaData).draw(t.redraw),{id:a.id,DataTable:a.DataTable,dataTable:a.dataTable}}}}}function c(c,l,n,u,f,d){return{create:function(e){var i,a,o,s=Object.create(n);return s.name="DTAjaxRenderer",s.options=e,s.render=t,s.reloadData=function(e,t){i&&i.ajax.reload(e,t)},s.changeData=function(e){s.options.ajax=e,o.dtOptions.ajax=e},s.rerender=function(){u.preRender(e),t(a,o)},s;function t(e,t){a=e,o=t;var n=c.defer(),r=d.newDTInstance(s);return _.isUndefined(s.options.sAjaxDataProp)&&(s.options.sAjaxDataProp=f.sAjaxDataProp),_.isUndefined(s.options.aoColumns)&&(s.options.aoColumns=f.aoColumns),function(e,t){var n=c.defer();e.bDestroy=!0,i&&(i.destroy(),u.showLoading(a,o),t.empty());u.hideLoading(t),r=e,_.isDefined(r)&&_.isDefined(r.dom)&&0<=r.dom.indexOf("S")?l(function(){n.resolve(u.renderDataTable(t,e))},0,!1):n.resolve(u.renderDataTable(t,e));var r;return n.promise}(s.options,e).then(function(e){i=e.DataTable,d.copyDTProperties(e,r),n.resolve(r)}),n.promise}}}}function l(n,r,i,a){return{fromOptions:function(e,t){if(t){if(e&&e.serverSide)throw new Error("You cannot use server side processing along with the Angular renderer!");return r.create(e)}if(_.isDefined(e)){if(_.isDefined(e.fnPromise)&&null!==e.fnPromise){if(e.serverSide)throw new Error("You cannot use server side processing along with the Promise renderer!");return i.create(e)}return _.isDefined(e.ajax)&&null!==e.ajax||_.isDefined(e.ajax)&&null!==e.ajax?a.create(e):n.create(e)}return n.create()}}}function u(s){return{overrideProperties:function e(t,n){var r=_.copy(t);(_.isUndefined(r)||null===r)&&(r={});if(_.isUndefined(n)||null===n)return r;if(_.isObject(n))for(var i in n)n.hasOwnProperty(i)&&(r[i]=e(r[i],n[i]));else r=_.copy(n);return r},deleteProperty:function(e,t){_.isObject(e)&&delete e[t]},resolveObjectPromises:i,resolveArrayPromises:c};function i(e,t){var r=s.defer(),n=[],i={},a=t||[];if(!_.isObject(e)||_.isArray(e))r.resolve(e);else{for(var o in i=_.extend(i,e))i.hasOwnProperty(o)&&-1===m.inArray(o,a)&&(_.isArray(i[o])?n.push(c(i[o])):n.push(s.when(i[o])));s.all(n).then(function(e){var t=0;for(var n in i)i.hasOwnProperty(n)&&-1===m.inArray(n,a)&&(i[n]=e[t++]);r.resolve(i)})}return r.promise}function c(e){var t=s.defer(),n=[],r=[];return _.isArray(e)?(_.forEach(e,function(e){_.isObject(e)?n.push(i(e)):n.push(s.when(e))}),s.all(n).then(function(e){_.forEach(e,function(e){r.push(e)}),t.resolve(r)})):t.resolve(e),t.promise}}_.module("datatables.directive",["datatables.instances","datatables.renderer","datatables.options","datatables.util"]).directive("datatable",t),t.$inject=["$q","$http","DTRendererFactory","DTRendererService","DTPropertyUtil"],_.module("datatables.factory",[]).factory("DTOptionsBuilder",function(){var n={withOption:function(e,t){return _.isString(e)&&(this[e]=t),this},withSource:function(e){return this.ajax=e,this},withDataProp:function(e){return this.sAjaxDataProp=e,this},withFnServerData:function(e){if(!_.isFunction(e))throw new Error("The parameter must be a function");return this.fnServerData=e,this},withPaginationType:function(e){if(!_.isString(e))throw new Error("The pagination type must be provided");return this.sPaginationType=e,this},withLanguage:function(e){return this.language=e,this},withLanguageSource:function(e){return this.withLanguage({url:e})},withDisplayLength:function(e){return this.iDisplayLength=e,this},withFnPromise:function(e){return this.fnPromise=e,this},withDOM:function(e){return this.dom=e,this}};return{newOptions:function(){return Object.create(n)},fromSource:function(e){var t=Object.create(n);return t.ajax=e,t},fromFnPromise:function(e){var t=Object.create(n);return t.fnPromise=e,t}}}).factory("DTColumnBuilder",function(){var r={withOption:function(e,t){return _.isString(e)&&(this[e]=t),this},withTitle:function(e){return this.sTitle=e,this},withClass:function(e){return this.sClass=e,this},notVisible:function(){return this.bVisible=!1,this},notSortable:function(){return this.bSortable=!1,this},renderWith:function(e){return this.mRender=e,this}};return{newColumn:function(e,t){if(_.isUndefined(e))throw new Error('The parameter "mData" is not defined!');var n=Object.create(r);return n.mData=e,_.isDefined(t)&&(n.sTitle=t),n},DTColumn:r}}).factory("DTColumnDefBuilder",n).factory("DTLoadingTemplate",r),n.$inject=["DTColumnBuilder"],r.$inject=["$compile","DTDefaultOptions","DT_LOADING_CLASS"],_.module("datatables.instances",["datatables.util"]).factory("DTInstanceFactory",function(){var n={reloadData:function(e,t){this._renderer.reloadData(e,t)},changeData:function(e){this._renderer.changeData(e)},rerender:function(){this._renderer.rerender()}};return{newDTInstance:function(e){var t=Object.create(n);return t._renderer=e,t},copyDTProperties:function(e,t){t.id=e.id,t.DataTable=e.DataTable,t.dataTable=e.dataTable}}}),_.module("datatables",["datatables.directive","datatables.factory"]).run(function(){m.fn.DataTable.Api&&m.fn.DataTable.Api.register("ngDestroy()",function(h){return h=h||!1,this.iterator("table",function(t){var n,e=t.nTableWrapper.parentNode,r=t.oClasses,i=t.nTable,a=t.nTBody,o=t.nTHead,s=t.nTFoot,c=m(i),l=m(a),u=m(t.nTableWrapper),f=m.map(t.aoData,function(e){return e.nTr});t.bDestroying=!0,m.fn.DataTable.ext.internal._fnCallbackFire(t,"aoDestroyCallback","destroy",[t]),h||new m.fn.DataTable.Api(t).columns().visible(!0),u.unbind(".DT").find(":not(tbody *)").unbind(".DT"),m(p).unbind(".DT-"+t.sInstance),i!==o.parentNode&&(c.children("thead").detach(),c.append(o)),s&&i!==s.parentNode&&(c.children("tfoot").detach(),c.append(s)),c.detach(),u.detach(),t.aaSorting=[],t.aaSortingFixed=[],m.fn.DataTable.ext.internal._fnSortingClasses(t),m(f).removeClass(t.asStripeClasses.join(" ")),m("th, td",o).removeClass(r.sSortable+" "+r.sSortableAsc+" "+r.sSortableDesc+" "+r.sSortableNone),t.bJUI&&(m("th span."+r.sSortIcon+", td span."+r.sSortIcon,o).detach(),m("th, td",o).each(function(){var e=m("div."+r.sSortJUIWrapper,this);m(this).append(e.contents()),e.detach()})),!h&&e&&(e.contains(t.nTableReinsertBefore)?e.insertBefore(i,t.nTableReinsertBefore):e.appendChild(i)),c.css("width",t.sDestroyWidth).removeClass(r.sTable),(n=t.asDestroyStripes.length)&&l.children().each(function(e){m(this).addClass(t.asDestroyStripes[e%n])});var d=m.inArray(t,m.fn.DataTable.settings);-1!==d&&m.fn.DataTable.settings.splice(d,1)})})}),_.module("datatables.options",[]).constant("DT_DEFAULT_OPTIONS",{sAjaxDataProp:"",aoColumns:[]}).constant("DT_LOADING_CLASS","dt-loading").service("DTDefaultOptions",function(){var t={loadingTemplate:"<h3>Loading...</h3>",bootstrapOptions:{},setLoadingTemplate:function(e){return t.loadingTemplate=e,t},setLanguageSource:function(e){return m.ajax({dataType:"json",url:e,success:function(e){m.extend(!0,m.fn.DataTable.defaults,{language:e})}}),t},setLanguage:function(e){return m.extend(!0,m.fn.DataTable.defaults,{language:e}),t},setDisplayLength:function(e){return m.extend(m.fn.DataTable.defaults,{displayLength:e}),t},setBootstrapOptions:function(e){return t.bootstrapOptions=e,t},setDOM:function(e){return m.extend(m.fn.DataTable.defaults,{dom:e}),t}};return t}),_.module("datatables.renderer",["datatables.instances","datatables.factory","datatables.options","datatables.instances"]).factory("DTRendererService",i).factory("DTRenderer",function(){return{withOptions:function(e){return this.options=e,this}}}).factory("DTDefaultRenderer",a).factory("DTNGRenderer",o).factory("DTPromiseRenderer",s).factory("DTAjaxRenderer",c).factory("DTRendererFactory",l),i.$inject=["DTLoadingTemplate"],a.$inject=["$q","DTRenderer","DTRendererService","DTInstanceFactory"],o.$inject=["$log","$q","$compile","$timeout","DTRenderer","DTRendererService","DTInstanceFactory"],s.$inject=["$q","$timeout","$log","DTRenderer","DTRendererService","DTInstanceFactory"],c.$inject=["$q","$timeout","DTRenderer","DTRendererService","DT_DEFAULT_OPTIONS","DTInstanceFactory"],l.$inject=["DTDefaultRenderer","DTNGRenderer","DTPromiseRenderer","DTAjaxRenderer"],_.module("datatables.util",[]).factory("DTPropertyUtil",u),u.$inject=["$q"]}(window,document,jQuery,angular),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.bootstrap"),function(e,y,w,d){"use strict";function t(r,i){var a=!1;return{integrate:function(e,t){if(!a){var n=r.overrideProperties(i.getOptions().ColVis,t?t.ColVis:null);w.fn.DataTable.ColVis&&e(function(){w(".ColVis_MasterButton").attr("class","ColVis_MasterButton "+n.classes.masterButton),w(".ColVis_Button").removeClass("ColVis_Button")}),a=!0}},deIntegrate:function(){a&&w.fn.DataTable.ColVis&&(a=!1)}}}function n(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withBootstrap=function(){n.hasBootstrap=!0,d.isObject(n.oClasses)?n.oClasses.sPageButtonActive="active":n.oClasses={sPageButtonActive:"active"};return n},n.withBootstrapOptions=function(e){return n.bootstrap=e,n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}function r(e,t){var n={preRender:function(e){e&&e.hasBootstrap?t.integrate(e):t.deIntegrate()}};e.registerPlugin(n)}function i(r,i,o,s){var c=!1,l=[],u={};return{integrate:function(e){n=e.bootstrap,c||(u.oStdClasses=d.copy(w.fn.dataTableExt.oStdClasses),u.fnPagingInfo=w.fn.dataTableExt.oApi.fnPagingInfo,u.renderer=d.copy(w.fn.DataTable.ext.renderer),w.fn.DataTable.TableTools&&(u.TableTools={classes:d.copy(w.fn.DataTable.TableTools.classes),oTags:d.copy(w.fn.DataTable.TableTools.DEFAULTS.oTags)}),w.extend(w.fn.dataTableExt.oStdClasses,{sWrapper:"dataTables_wrapper form-inline",sFilterInput:"form-control input-sm",sLengthSelect:"form-control input-sm",sFilter:"dataTables_filter",sLength:"dataTables_length"}),w.fn.dataTableExt.oApi.fnPagingInfo=function(e){return{iStart:e._iDisplayStart,iEnd:e.fnDisplayEnd(),iLength:e._iDisplayLength,iTotal:e.fnRecordsTotal(),iFilteredTotal:e.fnRecordsDisplay(),iPage:-1===e._iDisplayLength?0:Math.ceil(e._iDisplayStart/e._iDisplayLength),iTotalPages:-1===e._iDisplayLength?0:Math.ceil(e.fnRecordsDisplay()/e._iDisplayLength)}},a=n,w.extend(!0,w.fn.DataTable.ext.renderer,{pageButton:{_:function(l,e,u,t,f,d){var h,p,m=l.oClasses,g=l.language?l.language.oPaginate:l.oLanguage.oPaginate,_=0,n=s.overrideProperties(o.getOptions().pagination,a?a.pagination:null),b=w("<ul></ul>",{class:n.classes.ul}),v=function(e,t){var n,r,i,a,o=function(e){e.preventDefault(),w.fn.DataTable.ext.internal._fnPageChange(l,e.data.action,!0)};for(n=0,r=t.length;n<r;n++)if(a=t[n],w.isArray(a)){a.DT_el="li";var s=w("<"+(a.DT_el||"div")+"/>").appendTo(b);v(s,a)}else{p=h="";var c=w("<li></li>");switch(a){case"ellipsis":b.append('<li class="disabled"><a href="#" onClick="event.preventDefault()">&hellip;</a></li>');break;case"first":h=g.sFirst,p=a,f<=0&&c.addClass(m.sPageButtonDisabled);break;case"previous":h=g.sPrevious,p=a,f<=0&&c.addClass(m.sPageButtonDisabled);break;case"next":h=g.sNext,p=a,d-1<=f&&c.addClass(m.sPageButtonDisabled);break;case"last":h=g.sLast,p=a,d-1<=f&&c.addClass(m.sPageButtonDisabled);break;default:h=a+1,p="",f===a&&c.addClass(m.sPageButtonActive)}h&&(c.appendTo(b),i=w("<a>",{href:"#",class:p,"aria-controls":l.sTableId,"data-dt-idx":_,tabindex:l.iTabIndex,id:0===u&&"string"==typeof a?l.sTableId+"_"+a:null}).html(h).appendTo(c),w.fn.DataTable.ext.internal._fnBindAction(i,{action:a},o),_++)}};try{var r=w(y.activeElement).data("dt-idx"),i=w(e).empty();b.appendTo(i),v(i,t),null!==r&&w(e).find("[data-dt-idx="+r+"]").focus()}catch(e){}}}}),f(function(){w("div.dataTables_filter").find("input").addClass("form-control"),w("div.dataTables_length").find("select").addClass("form-control")}),c=!0),r.integrate(e.bootstrap),i.integrate(f,e.bootstrap),e.dom=(t=e,t.dom&&t.dom!==w.fn.dataTable.defaults.sDom?t.dom:o.getOptions().dom),d.isUndefined(e.fnDrawCallback)&&(e.fnDrawCallback=function(){for(var e=0;e<l.length;e++)l[e]()});var t;var n,a},deIntegrate:function(){c&&(w.extend(w.fn.dataTableExt.oStdClasses,u.oStdClasses),w.fn.dataTableExt.oApi.fnPagingInfo=u.fnPagingInfo,w.extend(!0,w.fn.DataTable.ext.renderer,u.renderer),r.deIntegrate(),i.deIntegrate(),c=!1)}};function f(e){d.isFunction(e)&&l.push(e)}}function a(e,t,n){return{getOptions:function(){return t.overrideProperties(n,e.bootstrapOptions)}}}function o(n,r){var i=!1,a={};return{integrate:function(e){if(!i){if(w.fn.DataTable.TableTools&&(a.TableTools={classes:d.copy(w.fn.DataTable.TableTools.classes),oTags:d.copy(w.fn.DataTable.TableTools.DEFAULTS.oTags)}),w.fn.DataTable.TableTools){var t=n.overrideProperties(r.getOptions().TableTools,e?e.TableTools:null);w.extend(!0,w.fn.DataTable.TableTools.classes,t.classes),w.extend(!0,w.fn.DataTable.TableTools.DEFAULTS.oTags,t.DEFAULTS.oTags)}i=!0}},deIntegrate:function(){i&&w.fn.DataTable.TableTools&&a.TableTools&&(w.extend(!0,w.fn.DataTable.TableTools.classes,a.TableTools.classes),w.extend(!0,w.fn.DataTable.TableTools.DEFAULTS.oTags,a.TableTools.oTags),i=!1)}}}d.module("datatables.bootstrap.colvis",["datatables.bootstrap.options","datatables.util"]).service("DTBootstrapColVis",t),t.$inject=["DTPropertyUtil","DTBootstrapDefaultOptions"],d.module("datatables.bootstrap",["datatables.bootstrap.options","datatables.bootstrap.tabletools","datatables.bootstrap.colvis"]).config(n).run(r).service("DTBootstrap",i),n.$inject=["$provide"],r.$inject=["DTRendererService","DTBootstrap"],i.$inject=["DTBootstrapTableTools","DTBootstrapColVis","DTBootstrapDefaultOptions","DTPropertyUtil"],d.module("datatables.bootstrap.options",["datatables.options","datatables.util"]).constant("DT_BOOTSTRAP_DEFAULT_OPTIONS",{TableTools:{classes:{container:"DTTT btn-group",buttons:{normal:"btn btn-default",disabled:"disabled"},collection:{container:"DTTT_dropdown dropdown-menu",buttons:{normal:"",disabled:"disabled"}},print:{info:"DTTT_print_info modal"},select:{row:"active"}},DEFAULTS:{oTags:{collection:{container:"ul",button:"li",liner:"a"}}}},ColVis:{classes:{masterButton:"btn btn-default"}},pagination:{classes:{ul:"pagination"}},dom:"<'row'<'col-xs-6'l><'col-xs-6'f>r>t<'row'<'col-xs-6'i><'col-xs-6'p>>"}).factory("DTBootstrapDefaultOptions",a),a.$inject=["DTDefaultOptions","DTPropertyUtil","DT_BOOTSTRAP_DEFAULT_OPTIONS"],d.module("datatables.bootstrap.tabletools",["datatables.bootstrap.options","datatables.util"]).service("DTBootstrapTableTools",o),o.$inject=["DTPropertyUtil","DTBootstrapDefaultOptions"]}(window,document,jQuery,angular),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.colreorder"),function(e,t,a,o){"use strict";function n(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withColReorder=function(){n.dom=n.dom?n.dom:a.fn.dataTable.defaults.sDom,-1===n.dom.indexOf("R")&&(n.dom="R"+n.dom);return n.hasColReorder=!0,n},n.withColReorderOption=function(e,t){o.isString(e)&&(n.oColReorder=n.oColReorder&&null!==n.oColReorder?n.oColReorder:{},n.oColReorder[e]=t);return n},n.withColReorderOrder=function(e){o.isArray(e)&&n.withColReorderOption("aiOrder",e);return n},n.withColReorderCallback=function(e){{if(!o.isFunction(e))throw new Error("The reorder callback must be a function");n.withColReorderOption("fnReorderCallback",e)}return n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}o.module("datatables.colreorder",["datatables"]).config(n),n.$inject=["$provide"]}(window,document,jQuery,angular),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.columnfilter"),function(e,t,n,r){"use strict";function i(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withColumnFilter=function(e){n.hasColumnFilter=!0,e&&(n.columnFilterOptions=e);return n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}function a(e){var t={postRender:function(e,t){e&&e.hasColumnFilter&&t.dataTable.columnFilter(e.columnFilterOptions)}};e.registerPlugin(t)}angular.module("datatables.columnfilter",["datatables"]).config(i).run(a),i.$inject=["$provide"],a.$inject=["DTRendererService"]}(window,document,jQuery),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.light-columnfilter"),function(e,t,n,r){"use strict";function i(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withLightColumnFilter=function(e){n.hasLightColumnFilter=!0,e&&(n.lightColumnFilterOptions=e);return n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}function a(e){var t={postRender:function(e,t){e&&e.hasLightColumnFilter&&new n.fn.dataTable.ColumnFilter(t.DataTable,e.lightColumnFilterOptions)}};e.registerPlugin(t)}angular.module("datatables.light-columnfilter",["datatables"]).config(i).run(a),i.$inject=["$provide"],a.$inject=["DTRendererService"]}(window,document,jQuery),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.colvis"),function(e,t,a,o){"use strict";function n(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withColVis=function(){console.warn("The colvis extension has been retired. Please use the button extension instead: https://datatables.net/extensions/buttons/");n.dom=n.dom?n.dom:a.fn.dataTable.defaults.sDom,-1===n.dom.indexOf("C")&&(n.dom="C"+n.dom);return n.hasColVis=!0,n},n.withColVisOption=function(e,t){o.isString(e)&&(n.oColVis=n.oColVis&&null!==n.oColVis?n.oColVis:{},n.oColVis[e]=t);return n},n.withColVisStateChange=function(e){{if(!o.isFunction(e))throw new Error("The state change must be a function");n.withColVisOption("fnStateChange",e)}return n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}o.module("datatables.colvis",["datatables"]).config(n),n.$inject=["$provide"]}(window,document,jQuery,angular),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.fixedcolumns"),function(e,t,n,r){"use strict";function i(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withFixedColumns=function(e){n.fixedColumns=!0,e&&(n.fixedColumns=e);return n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}angular.module("datatables.fixedcolumns",["datatables"]).config(i),i.$inject=["$provide"]}(window,document,jQuery),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.fixedheader"),function(e,t,n,r){"use strict";function i(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withFixedHeader=function(e){n.hasFixedHeader=!0,e&&(n.fixedHeaderOptions=e);return n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}function a(e){var t={postRender:function(e,t){e&&e.hasFixedHeader&&new n.fn.dataTable.FixedHeader(t.DataTable,e.fixedHeaderOptions)}};e.registerPlugin(t)}angular.module("datatables.fixedheader",["datatables"]).config(i).run(a),i.$inject=["$provide"],a.$inject=["DTRendererService"]}(window,document,jQuery),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.scroller"),function(e,t,a,n){"use strict";function r(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withScroller=function(){n.dom=n.dom?n.dom:a.fn.dataTable.defaults.sDom,-1===n.dom.indexOf("S")&&(n.dom=n.dom+"S");return n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}angular.module("datatables.scroller",["datatables"]).config(r),r.$inject=["$provide"]}(window,document,jQuery),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.tabletools"),function(e,t,a,o){"use strict";function n(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withTableTools=function(e){console.warn("The tabletools extension has been retired. Please use the select and buttons extensions instead: https://datatables.net/extensions/select/ and https://datatables.net/extensions/buttons/");n.dom=n.dom?n.dom:a.fn.dataTable.defaults.sDom,-1===n.dom.indexOf("T")&&(n.dom="T"+n.dom);n.hasTableTools=!0,o.isString(e)&&n.withTableToolsOption("sSwfPath",e);return n},n.withTableToolsOption=function(e,t){o.isString(e)&&(n.oTableTools=n.oTableTools&&null!==n.oTableTools?n.oTableTools:{},n.oTableTools[e]=t);return n},n.withTableToolsButtons=function(e){o.isArray(e)&&n.withTableToolsOption("aButtons",e);return n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}o.module("datatables.tabletools",["datatables"]).config(n),n.$inject=["$provide"]}(window,document,jQuery,angular),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.buttons"),function(e,t,a,o){"use strict";function n(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withButtons=function(e){n.dom=n.dom?n.dom:a.fn.dataTable.defaults.sDom,-1===n.dom.indexOf("B")&&(n.dom="B"+n.dom);if(o.isUndefined(e))throw new Error("You must define the options for the button extension. See https://datatables.net/reference/option/buttons#Examples for some example");return n.buttons=e,n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}function r(e){var t={preRender:function(e){e&&o.isArray(e.buttons)&&(e.buttonsTmp=e.buttons.slice())},postRender:function(e){e&&o.isDefined(e.buttonsTmp)&&(e.buttons=e.buttonsTmp,delete e.buttonsTmp)}};e.registerPlugin(t)}o.module("datatables.buttons",["datatables"]).config(n).run(r),n.$inject=["$provide"],r.$inject=["DTRendererService"]}(window,document,jQuery,angular),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="datatables.select"),function(e,t,n,a){"use strict";function r(e){function t(e){var t=e.newOptions,n=e.fromSource,r=e.fromFnPromise;return e.newOptions=function(){return i(t)},e.fromSource=function(e){return i(n,e)},e.fromFnPromise=function(e){return i(r,e)},e;function i(e,t){var n=e(t);return n.withSelect=function(e){if(a.isUndefined(e))throw new Error("You must define the options for the select extension. See https://datatables.net/reference/option/#select");return n.select=e,n},n}}e.decorator("DTOptionsBuilder",t),t.$inject=["$delegate"]}a.module("datatables.select",["datatables"]).config(r),r.$inject=["$provide"]}(window,document,jQuery,angular),function(v){"use strict";function y(e){e.dataTransfer&&"none"===e.dataTransfer.dropEffect&&("copy"===e.dataTransfer.effectAllowed||"move"===e.dataTransfer.effectAllowed?e.dataTransfer.dropEffect=e.dataTransfer.effectAllowed:"copyMove"!==e.dataTransfer.effectAllowed&&"copymove"!==e.dataTransfer.effectAllowed||(e.dataTransfer.dropEffect=e.ctrlKey?"copy":"move"))}if("ondrag"in document.createElement("a")){window.jQuery&&-1===window.jQuery.event.props.indexOf("dataTransfer")&&window.jQuery.event.props.push("dataTransfer");var e=v.module("ang-drag-drop",[]);e.directive("uiDraggable",["$parse","$rootScope","$dragImage",function(g,_,b){return function(c,l,u){var f,d,h=!1,p=u.draggingClass||"on-dragging";function m(e){setTimeout(function(){l.unbind("$destroy",m)},0);var t=u.dragChannel||"defaultchannel";if(_.$broadcast("ANGULAR_DRAG_END",e,t),y(e),e.dataTransfer&&"none"!==e.dataTransfer.dropEffect)if(u.onDropSuccess){var n=g(u.onDropSuccess);c.$evalAsync(function(){n(c,{$event:e})})}else if(u.onDropFailure){var r=g(u.onDropFailure);c.$evalAsync(function(){r(c,{$event:e})})}l.removeClass(p)}function t(r){if(!h||d.classList.contains(f)){var e=u.dragChannel||"defaultchannel",t="";u.drag&&(t=c.$eval(u.drag));var n=u.dragImage||null;l.addClass(p),l.bind("$destroy",m);var i=!(document.uniqueID||window.opera);if(n&&i){var a=g(u.dragImage);c.$apply(function(){var e=a(c,{$event:r});if(e&&(v.isString(e)&&(e=b.generate(e)),e.image)){var t=e.xOffset||0,n=e.yOffset||0;r.dataTransfer.setDragImage(e.image,t,n)}})}var o={data:t,channel:e},s=v.toJson(o);r.dataTransfer.setData("text",s),r.dataTransfer.effectAllowed="copyMove",_.$broadcast("ANGULAR_DRAG_START",r,e,o)}else r.preventDefault()}l.attr("draggable",!1),c.$watch(u.uiDraggable,function(e){e?(l.attr("draggable",e),l.bind("dragend",m),l.bind("dragstart",t)):(l.removeAttr("draggable"),l.unbind("dragend",m),l.unbind("dragstart",t))}),v.isString(u.dragHandleClass)&&(h=!0,f=u.dragHandleClass.trim()||"drag-handle",l.bind("mousedown",function(e){d=e.target}))}}]),e.directive("uiOnDrop",["$parse","$rootScope",function(b,o){return function(s,c,l){var r=0,u=l.dropChannel||"defaultchannel",f="",d=l.dragEnterClass||"on-drag-enter",n=l.dragHoverClass||"on-drag-hover",i=b(l.onDragEnter),a=b(l.onDragLeave);function h(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation();var t=b(l.uiOnDragOver);return s.$evalAsync(function(){t(s,{$event:e,$channel:u})}),!1}function p(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),0===--r&&(s.$evalAsync(function(){a(s,{$event:e,$channel:u})}),c.addClass(d),c.removeClass(n));var t=b(l.uiOnDragLeave);s.$evalAsync(function(){t(s,{$event:e,$channel:u})})}function m(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),0===r&&(s.$evalAsync(function(){i(s,{$event:e,$channel:u})}),c.removeClass(d),c.addClass(n)),r++;var t=b(l.uiOnDragEnter);s.$evalAsync(function(){t(s,{$event:e,$channel:u})}),o.$broadcast("ANGULAR_HOVER",f)}function g(e){e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation();var t=e.dataTransfer.getData("text");t=v.fromJson(t),y(e);var n=b(l.uiOnDrop);s.$evalAsync(function(){n(s,{$data:t.data,$event:e,$channel:t.channel})}),c.removeClass(d),r=0}function _(e){return e.preventDefault&&e.preventDefault(),e.stopPropagation&&e.stopPropagation(),!(e.dataTransfer.dropEffect="none")}var e=o.$on("ANGULAR_DRAG_START",function(e,t,n,r){var i,a,o=!0;(i=f=n,"*"===(a=u)||new RegExp("(\\s|[,])+("+i+")(\\s|[,])+","i").test(","+a+",")||(o=!1),o&&l.dropValidate)&&(o=b(l.dropValidate)(s,{$drop:{scope:s,element:c},$event:t,$data:r.data,$channel:r.channel}));o?(c.bind("dragover",h),c.bind("dragenter",m),c.bind("dragleave",p),c.bind("drop",g),c.addClass(d)):(c.bind("dragover",_),c.bind("dragenter",_),c.bind("dragleave",_),c.bind("drop",_),c.removeClass(d))}),t=o.$on("ANGULAR_DRAG_END",function(){c.unbind("dragover",h),c.unbind("dragenter",m),c.unbind("dragleave",p),c.unbind("drop",g),c.removeClass(n),c.removeClass(d),c.unbind("dragover",_),c.unbind("dragenter",_),c.unbind("dragleave",_),c.unbind("drop",_)});s.$on("$destroy",function(){e(),t()}),l.$observe("dropChannel",function(e){e&&(u=e)})}}]),e.constant("$dragImageConfig",{height:20,width:200,padding:10,font:"bold 11px Arial",fontColor:"#eee8d5",backgroundColor:"#93a1a1",xOffset:0,yOffset:0}),e.service("$dragImage",["$dragImageConfig",function(s){this.generate=function(e,t){var n=v.extend({},s,t||{}),r=document.createElement("canvas");r.height=n.height,r.width=n.width;var i=r.getContext("2d");i.fillStyle=n.backgroundColor,i.fillRect(0,0,n.width,n.height),i.font=n.font,i.fillStyle=n.fontColor;var a=function(e,t,n){var r=e.measureText(t).width;if(r<n.width)return t;for(;r+n.padding>n.width;)t=t.substring(0,t.length-1),r=e.measureText(t+"…").width;return t+"…"}(i,e,n);i.fillText(a,4,n.padding+4);var o=new Image;return o.src=r.toDataURL(),{image:o,xOffset:n.xOffset,yOffset:n.yOffset}}}])}else v.module("ang-drag-drop",[])}(angular),function(e,t){"use strict";var v,h,c,l;function n(){return["$animate",function(d){return{restrict:"AE",transclude:"element",priority:1,terminal:!0,require:"^^ngMessages",link:function(e,r,t,i,n){var a,o,s,c=r[0],l=t.ngMessage||t.when,u=t.ngMessageExp||t.whenExp,f=function(e){a=e?h(e)?e:e.split(/[\s,]+/):null,i.reRender()};u?(f(e.$eval(u)),e.$watchCollection(u,f)):f(l),i.register(c,s={test:function(e){return function(e,t){if(e)return h(e)?0<=e.indexOf(t):e.hasOwnProperty(t)}(a,e)},attach:function(){o||n(function(e,t){d.enter(e,null,r);var n=(o=e).$$attachId=i.getAttachId();o.on("$destroy",function(){o&&o.$$attachId===n&&(i.deregister(c),s.detach()),t.$destroy()})})},detach:function(){if(o){var e=o;o=null,d.leave(e)}}})}}}]}t.module("ngMessages",[],function(){v=t.forEach,h=t.isArray,c=t.isString,l=t.element}).directive("ngMessages",["$animate",function(m){var g="ng-inactive";return{require:"ngMessages",restrict:"AE",controller:["$element","$scope","$attrs",function(l,u,f){var d=this,r=0,e=0;this.getAttachId=function(){return e++};var h,p,o=this.messages={};function s(e,t){for(var n=t,r=[];n&&n!==e;){var i=n.$$ngMessageNode;if(i&&i.length)return o[i];n.childNodes.length&&-1===r.indexOf(n)?(r.push(n),n=n.childNodes[n.childNodes.length-1]):n.previousSibling?n=n.previousSibling:(n=n.parentNode,r.push(n))}}this.render=function(e){h=!1,p=e=e||{};for(var t=_(u,f.ngMessagesMultiple)||_(u,f.multiple),n=[],r={},i=d.head,a=!1,o=0;null!=i;){o++;var s=i.message,c=!1;a||v(e,function(e,t){if(!c&&b(e)&&s.test(t)){if(r[t])return;r[t]=!0,c=!0,s.attach()}}),c?a=!t:n.push(s),i=i.next}v(n,function(e){e.detach()}),n.length!==o?m.setClass(l,"ng-active",g):m.setClass(l,g,"ng-active")},u.$watchCollection(f.ngMessages||f.for,d.render),l.on("$destroy",function(){v(o,function(e){e.message.detach()})}),this.reRender=function(){h||(h=!0,u.$evalAsync(function(){h&&p&&d.render(p)}))},this.register=function(e,t){var n=r.toString();o[n]={message:t},function(e,t,n){var r=o[n];if(d.head){var i=s(e,t);i?(r.next=i.next,i.next=r):(r.next=d.head,d.head=r)}else d.head=r}(l[0],e,n),e.$$ngMessageNode=n,r++,d.reRender()},this.deregister=function(e){var t,n,r,i,a=e.$$ngMessageNode;delete e.$$ngMessageNode,t=l[0],n=e,r=o[a],(i=s(t,n))?i.next=r.next:d.head=r.next,delete o[a],d.reRender()}}]};function _(e,t){return c(t)&&0===t.length||b(e.$eval(t))}function b(e){return c(e)?e.length:!!e}}]).directive("ngMessagesInclude",["$templateRequest","$document","$compile",function(i,a,o){return{restrict:"AE",require:"^^ngMessages",link:function(t,n,e){var r=e.ngMessagesInclude||e.src;i(r).then(function(e){t.$$destroyed||(c(e)&&!e.trim()?s(n,r):o(e)(t,function(e){n.after(e),s(n,r)}))})}};function s(e,t){var n=o.$$createComment?o.$$createComment("ngMessagesInclude",t):a[0].createComment(" ngMessagesInclude: "+t+" "),r=l(n);e.after(r),e.remove()}}]).directive("ngMessage",n()).directive("ngMessageExp",n())}(window,window.angular),function(G,ie,ae){"use strict";ie.module("ngMaterial",["ng","ngAnimate","ngAria","material.core","material.core.gestures","material.core.layout","material.core.meta","material.core.theming.palette","material.core.theming","material.core.animate","material.components.autocomplete","material.components.backdrop","material.components.bottomSheet","material.components.button","material.components.card","material.components.chips","material.components.checkbox","material.components.colors","material.components.content","material.components.datepicker","material.components.dialog","material.components.divider","material.components.fabActions","material.components.fabShared","material.components.fabSpeedDial","material.components.fabToolbar","material.components.gridList","material.components.icon","material.components.input","material.components.list","material.components.menu","material.components.menuBar","material.components.navBar","material.components.panel","material.components.progressCircular","material.components.progressLinear","material.components.radioButton","material.components.select","material.components.showHide","material.components.sidenav","material.components.slider","material.components.sticky","material.components.subheader","material.components.swipe","material.components.switch","material.components.tabs","material.components.toast","material.components.toolbar","material.components.tooltip","material.components.virtualRepeat","material.components.whiteframe"]),function(){function e(e,t){if(t.has("$swipe")){e.warn("You are using the ngTouch module. \nAngular Material already has mobile click, tap, and swipe support... \nngTouch is not supported with Angular Material!")}}function t(e,t){e.decorator("$$rAF",["$delegate",n]),t.theme("default").primaryPalette("indigo").accentPalette("pink").warnPalette("deep-orange").backgroundPalette("grey")}function n(a){return a.throttle=function(e){var t,n,r,i;return function(){t=arguments,i=this,r=e,n||(n=!0,a(function(){r.apply(i,Array.prototype.slice.call(t)),n=!1}))}},a}e.$inject=["$log","$injector"],t.$inject=["$provide","$mdThemingProvider"],n.$inject=["$delegate"],ie.module("material.core",["ngAnimate","material.core.animate","material.core.layout","material.core.gestures","material.core.theming"]).config(t).run(e)}(),function(){function e(){return{restrict:"A",link:t}}function t(e,t,n){var r=n.mdAutoFocus||n.mdAutofocus||n.mdSidenavFocus;e.$watch(r,function(e){t.toggleClass("md-autofocus",e)})}ie.module("material.core").directive("mdAutofocus",e).directive("mdAutoFocus",e).directive("mdSidenavFocus",e)}(),ie.module("material.core").factory("$mdColorUtil",function(){return{rgbaToHex:function(e){return((e=e.match(/^rgba?[\s+]?\([\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?,[\s+]?(\d+)[\s+]?/i))&&4===e.length?"#"+("0"+parseInt(e[1],10).toString(16)).slice(-2)+("0"+parseInt(e[2],10).toString(16)).slice(-2)+("0"+parseInt(e[3],10).toString(16)).slice(-2):"").toUpperCase()},hexToRgba:function(e){var t="#"===e[0]?e.substr(1):e,n=t.length/3,r=t.substr(0,n),i=t.substr(n,n),a=t.substr(2*n);return 1===n&&(r+=r,i+=i,a+=a),"rgba("+parseInt(r,16)+","+parseInt(i,16)+","+parseInt(a,16)+",0.1)"},rgbToRgba:function(e){return e.replace(")",", 0.1)").replace("(","a(")},rgbaToRgb:function(e){return e?e.replace("rgba","rgb").replace(/,[^\),]+\)/,")"):"rgb(0,0,0)"}}}),function(){function e(e,t,n){var r=e.vendorPrefix,i=/webkit/i.test(r),a=/([:\-_]+(.))/g,o=document.createElement("div");function s(e){var t=(r+"-"+e).replace(a,function(e,t,n,r){return r?n.toUpperCase():n}),n=t.charAt(0).toLowerCase()+t.substring(1);return c(e)?e:c(t)?t:c(n)?n:e}function c(e){return ie.isDefined(o.style[e])}var l={isInputKey:function(e){return 31<=e.keyCode&&e.keyCode<=90},isNumPadKey:function(e){return 3===e.location&&97<=e.keyCode&&e.keyCode<=105},isNavigationKey:function(e){var t=l.KEY_CODE;return-1!=[t.SPACE,t.ENTER,t.UP_ARROW,t.DOWN_ARROW].indexOf(e.keyCode)},KEY_CODE:{COMMA:188,SEMICOLON:186,ENTER:13,ESCAPE:27,SPACE:32,PAGE_UP:33,PAGE_DOWN:34,END:35,HOME:36,LEFT_ARROW:37,UP_ARROW:38,RIGHT_ARROW:39,DOWN_ARROW:40,TAB:9,BACKSPACE:8,DELETE:46},CSS:{TRANSITIONEND:"transitionend"+(i?" webkitTransitionEnd":""),ANIMATIONEND:"animationend"+(i?" webkitAnimationEnd":""),TRANSFORM:s("transform"),TRANSFORM_ORIGIN:s("transformOrigin"),TRANSITION:s("transition"),TRANSITION_DURATION:s("transitionDuration"),ANIMATION_PLAY_STATE:s("animationPlayState"),ANIMATION_DURATION:s("animationDuration"),ANIMATION_NAME:s("animationName"),ANIMATION_TIMING:s("animationTimingFunction"),ANIMATION_DIRECTION:s("animationDirection")},MEDIA:{xs:"(max-width: 599px)","gt-xs":"(min-width: 600px)",sm:"(min-width: 600px) and (max-width: 959px)","gt-sm":"(min-width: 960px)",md:"(min-width: 960px) and (max-width: 1279px)","gt-md":"(min-width: 1280px)",lg:"(min-width: 1280px) and (max-width: 1919px)","gt-lg":"(min-width: 1920px)",xl:"(min-width: 1920px)",landscape:"(orientation: landscape)",portrait:"(orientation: portrait)",print:"print"},MEDIA_PRIORITY:["xl","gt-lg","lg","gt-md","md","gt-sm","sm","gt-xs","xs","landscape","portrait","print"]};return l}e.$inject=["$sniffer","$window","$document"],ie.module("material.core").factory("$mdConstant",e)}(),function(){function t(e,s){var c=function(){return!0};e&&!ie.isArray(e)&&(e=Array.prototype.slice.call(e)),s=!!s;var l=e||[];return{items:function(){return[].concat(l)},count:function(){return l.length},inRange:u,contains:t,indexOf:f,itemAt:function(e){return u(e)?l[e]:null},findBy:function(t,n){return l.filter(function(e){return e[t]===n})},add:function(e,t){if(!e)return-1;ie.isNumber(t)||(t=l.length);return l.splice(t,0,e),f(e)},remove:function(e){t(e)&&l.splice(f(e),1)},first:d,last:h,next:ie.bind(null,n,!1),previous:ie.bind(null,n,!0),hasPrevious:function(e){return!!e&&u(f(e)-1)},hasNext:function(e){return!!e&&u(f(e)+1)}};function u(e){return l.length&&-1<e&&e<l.length}function f(e){return l.indexOf(e)}function t(e){return e&&-1<f(e)}function d(){return l.length?l[0]:null}function h(){return l.length?l[l.length-1]:null}function n(e,t,n,r){n=n||c;for(var i=f(t);;){if(!u(i))return null;var a=i+(e?-1:1),o=null;if(u(a)?o=l[a]:s&&(a=f(o=e?h():d())),null===o||a===r)return null;if(n(o))return o;ie.isUndefined(r)&&(r=a),i=a}}}ie.module("material.core").config(["$provide",function(e){e.decorator("$mdUtil",["$delegate",function(e){return e.iterator=t,e}])}])}(),function(){function e(o,t,i){var a={},s={},c={},n={};return e.getResponsiveAttribute=function(e,t){for(var n=0;n<o.MEDIA_PRIORITY.length;n++){var r=o.MEDIA_PRIORITY[n];if(s[a[r]].matches){var i=u(e,t+"-"+r);if(e[i])return e[i]}}return e[u(e,t)]},e.getQuery=function(e){return s[e]},e.watchResponsiveAttributes=function(e,r,i){var a=[];return e.forEach(function(e){var t=u(r,e);for(var n in ie.isDefined(r[t])&&a.push(r.$observe(t,ie.bind(void 0,i,null))),o.MEDIA)t=u(r,e+"-"+n),ie.isDefined(r[t])&&a.push(r.$observe(t,ie.bind(void 0,i,n)))}),function(){a.forEach(function(e){e()})}},e;function e(e){var t,n=a[e];ie.isUndefined(n)&&(n=a[e]=(t=e,o.MEDIA[t]||("("!==t.charAt(0)?"("+t+")":t)));var r=c[n];return ie.isUndefined(r)&&(r=function(e){var t=s[e];t||(t=s[e]=i.matchMedia(e));return t.addListener(l),c[t.media]=!!t.matches}(n)),r}function l(e){t.$evalAsync(function(){c[e.media]=!!e.matches})}function u(e,t){return n[t]||(n[t]=e.$normalize(t))}}e.$inject=["$mdConstant","$rootScope","$window"],ie.module("material.core").factory("$mdMedia",e)}(),function(){function t(e,t){var r=["data","x"];return e?t?n(e):i(e):{buildList:i,buildSelector:n,hasAttribute:function(e,t){if(!(e=a(e)))return!1;for(var n=i(t),r=0;r<n.length;r++)if(e.hasAttribute(n[r]))return!0;return!1},removeAttribute:function(t,e){if(!(t=a(t)))return;i(e).forEach(function(e){t.removeAttribute(e)})}};function i(n){return(n=ie.isArray(n)?n:[n]).forEach(function(t){r.forEach(function(e){n.push(e+"-"+t)})}),n}function n(e){return i(e=ie.isArray(e)?e:[e]).map(function(e){return"["+e+"]"}).join(",")}function a(e){if((e=e[0]||e).nodeType)return e}}ie.module("material.core").config(["$provide",function(e){e.decorator("$mdUtil",["$delegate",function(e){return e.prefixer=t,e}])}])}(),function(){e.$inject=["$document","$timeout","$compile","$rootScope","$$mdAnimate","$interpolate","$log","$rootElement","$window","$$rAF"];var _=0;function e(s,c,n,o,e,t,a,r,l,u){var i=t.startSymbol(),f=t.endSymbol(),d="{{"===i&&"}}"===f,h=function(e,t,n){var r=!1;if(e&&e.length){var i=l.getComputedStyle(e[0]);r=ie.isDefined(i[t])&&(!n||i[t]==n)}return r};function p(e){return e?-1<String(e).indexOf("px")||-1<String(e).indexOf("%")?e:e+"px":"0"}var m={dom:{},now:G.performance?ie.bind(G.performance,G.performance.now):Date.now||function(){return(new Date).getTime()},bidi:function(e,t,n,r){var i=!("rtl"==s[0].dir||"rtl"==s[0].body.dir);if(0==arguments.length)return i?"ltr":"rtl";var a=ie.element(e);i&&ie.isDefined(n)?a.css(t,p(n)):!i&&ie.isDefined(r)&&a.css(t,p(r))},bidiProperty:function(e,t,n,r){var i=!("rtl"==s[0].dir||"rtl"==s[0].body.dir),a=ie.element(e);i&&ie.isDefined(t)?(a.css(t,p(r)),a.css(n,"")):!i&&ie.isDefined(n)&&(a.css(n,p(r)),a.css(t,""))},clientRect:function(e,t,n){var r=g(e);t=g(t||r.offsetParent||document.body);var i=r.getBoundingClientRect(),a=n?t.getBoundingClientRect():{left:0,top:0,width:0,height:0};return{left:i.left-a.left,top:i.top-a.top,width:i.width,height:i.height}},offsetRect:function(e,t){return m.clientRect(e,t,!0)},nodesToArray:function(e){e=e||[];for(var t=[],n=0;n<e.length;++n)t.push(e.item(n));return t},scrollTop:function(e){var t=(e=ie.element(e||s[0].body))[0]==s[0].body?s[0].body:ae;return(t?t.scrollTop+t.parentElement.scrollTop:0)||Math.abs(e[0].getBoundingClientRect().top)},findFocusTarget:function(e,t){var n,r=this.prefixer("md-autofocus",!0);return(n=i(e,t||r))||t==r||(n=i(e,this.prefixer("md-auto-focus",!0)))||(n=i(e,r)),n;function i(e,t){var n,r=e[0].querySelectorAll(t);return r&&r.length&&r.length&&ie.forEach(r,function(e){(e=ie.element(e)).hasClass("md-autofocus")&&(n=e)}),n}},disableScrollAround:function(e,t,r){if(m.disableScrollAround._count=m.disableScrollAround._count||0,++m.disableScrollAround._count,m.disableScrollAround._enableScrolling)return m.disableScrollAround._enableScrolling;var a=s[0].body,n=function(){var e=a.parentNode,t=e.style.cssText||"",n=a.style.cssText||"",r=m.scrollTop(a),i=a.clientWidth;a.scrollHeight>a.clientHeight+1&&(o(a,{position:"fixed",width:"100%",top:-r+"px"}),e.style.overflowY="scroll");a.clientWidth<i&&o(a,{overflow:"hidden"});return function(){a.style.cssText=n,e.style.cssText=t,a.scrollTop=r,e.scrollTop=r}}(),i=function(e){var t;e=ie.element(e||a),r&&r.disableScrollMask?t=e:(e=e[0],t=ie.element('<div class="md-scroll-mask">  <div class="md-scroll-mask-bar"></div></div>'),e.appendChild(t[0]));return t.on("wheel",n),t.on("touchmove",n),function(){t.off("wheel"),t.off("touchmove"),t[0].parentNode.removeChild(t[0]),delete m.disableScrollAround._enableScrolling};function n(e){e.preventDefault()}}(t);return m.disableScrollAround._enableScrolling=function(){--m.disableScrollAround._count||(n(),i(),delete m.disableScrollAround._enableScrolling)};function o(e,t){for(var n in t)e.style[n]=t[n]}},enableScrolling:function(){var e=this.disableScrollAround._enableScrolling;e&&e()},floatingScrollbars:function(){if(this.floatingScrollbars.cached===ae){var e=ie.element("<div><div></div></div>").css({width:"100%","z-index":-1,position:"absolute",height:"35px","overflow-y":"scroll"});e.children().css("height","60px"),s[0].body.appendChild(e[0]),this.floatingScrollbars.cached=e[0].offsetWidth==e[0].childNodes[0].offsetWidth,e.remove()}return this.floatingScrollbars.cached},forceFocus:function(e){var n=e[0]||e;document.addEventListener("click",function e(t){t.target===n&&t.$focus&&(n.focus(),t.stopImmediatePropagation(),t.preventDefault(),n.removeEventListener("click",e))},!0);var t=document.createEvent("MouseEvents");t.initMouseEvent("click",!1,!0,G,{},0,0,0,0,!1,!1,!1,!1,0,null),t.$material=!0,t.$focus=!0,n.dispatchEvent(t)},createBackdrop:function(e,t){return n(m.supplant('<md-backdrop class="{0}">',[t]))(e)},supplant:function(e,a,t){return t=t||/\{([^\{\}]*)\}/g,e.replace(t,function(t,e){var n=e.split("."),r=a;try{for(var i in n)n.hasOwnProperty(i)&&(r=r[n[i]])}catch(e){r=t}return"string"==typeof r||"number"==typeof r?r:t})},fakeNgModel:function(){return{$fake:!0,$setTouched:ie.noop,$setViewValue:function(e){this.$viewValue=e,this.$render(e),this.$viewChangeListeners.forEach(function(e){e()})},$isEmpty:function(e){return 0===(""+e).length},$parsers:[],$formatters:[],$viewChangeListeners:[],$render:ie.noop}},debounce:function(n,r,i,a){var o;return function(){var e=i,t=Array.prototype.slice.call(arguments);c.cancel(o),o=c(function(){o=ae,n.apply(e,t)},r||10,a)}},throttle:function(n,r){var i;return function(){var e=arguments,t=m.now();(!i||r<t-i)&&(n.apply(this,e),i=t)}},time:function(e){var t=m.now();return e(),m.now()-t},valueOnUse:function(e,t,n){var r=null,i=Array.prototype.slice.call(arguments),a=3<i.length?i.slice(3):[];Object.defineProperty(e,t,{get:function(){return null===r&&(r=n.apply(e,a)),r}})},nextUid:function(){return""+_++},disconnectScope:function(e){if(e&&e.$root!==e&&!e.$$destroyed){var t=e.$parent;e.$$disconnected=!0,t.$$childHead===e&&(t.$$childHead=e.$$nextSibling),t.$$childTail===e&&(t.$$childTail=e.$$prevSibling),e.$$prevSibling&&(e.$$prevSibling.$$nextSibling=e.$$nextSibling),e.$$nextSibling&&(e.$$nextSibling.$$prevSibling=e.$$prevSibling),e.$$nextSibling=e.$$prevSibling=null}},reconnectScope:function(e){if(e&&e.$root!==e&&e.$$disconnected){var t=e,n=t.$parent;t.$$disconnected=!1,t.$$prevSibling=n.$$childTail,n.$$childHead?(n.$$childTail.$$nextSibling=t,n.$$childTail=t):n.$$childHead=n.$$childTail=t}},getClosest:function(e,t,n){if(ie.isString(t)){var r=t.toUpperCase();t=function(e){return e.nodeName===r}}if(e instanceof ie.element&&(e=e[0]),n&&(e=e.parentNode),!e)return null;do{if(t(e))return e}while(e=e.parentNode);return null},elementContains:function(t,n){return(G.Node&&G.Node.prototype&&Node.prototype.contains?ie.bind(t,t.contains):ie.bind(t,function(e){return t===n||!!(16&this.compareDocumentPosition(e))}))(n)},extractElementByName:function(e,r,t,n){var i=s(e);return!i&&n&&a.warn(m.supplant("Unable to find node '{0}' in element '{1}'.",[r,e[0].outerHTML])),ie.element(i||e);function s(e){return function(e){if(e)for(var t=0,n=e.length;t<n;t++)if(e[t].nodeName.toLowerCase()===r)return e[t];return null}(e)||(t?function(e){var t;if(e)for(var n=0,r=e.length;n<r;n++){var i=e[n];if(!t)for(var a=0,o=i.childNodes.length;a<o;a++)t=t||s([i.childNodes[a]])}return t}(e):null)}},initOptionalProperties:function(r,i,a){a=a||{},ie.forEach(r.$$isolateBindings,function(e,t){if(e.optional&&ie.isUndefined(r[t])){var n=ie.isDefined(i[e.attrName]);r[t]=ie.isDefined(a[t])?a[t]:n}})},nextTick:function(e,t,n){var r=m.nextTick,i=r.timeout,a=r.queue||[];return a.push({scope:n,callback:e}),null==t&&(t=!0),r.digest=r.digest||t,r.queue=a,i||(r.timeout=c(function(){var e=r.queue,t=r.digest;r.queue=[],r.timeout=null,r.digest=!1,e.forEach(function(e){e.scope&&e.scope.$$destroyed||e.callback()}),t&&o.$digest()},0,!1))},processTemplate:function(e){return d?e:e&&ie.isString(e)?e.replace(/\{\{/g,i).replace(/}}/g,f):e},getParentWithPointerEvents:function(e){for(var t=e.parent();h(t,"pointer-events","none");)t=t.parent();return t},getNearestContentElement:function(e){for(var t=e.parent()[0];t&&t!==r[0]&&t!==document.body&&"MD-CONTENT"!==t.nodeName.toUpperCase();)t=t.parentNode;return t},checkStickySupport:function(){var e,t=ie.element("<div>");s[0].body.appendChild(t[0]);for(var n=["sticky","-webkit-sticky"],r=0;r<n.length;++r)if(t.css({position:n[r],top:0,"z-index":2}),t.css("position")==n[r]){e=n[r];break}return t.remove(),e},parseAttributeBoolean:function(e,t){return""===e||!!e&&(!1===t||"false"!==e&&"0"!==e)},hasComputedStyle:h,isParentFormSubmitted:function(e){var t=m.getClosest(e,"form"),n=t?ie.element(t).controller("form"):null;return!!n&&n.$submitted},animateScrollTo:function(r,i){var a=r.scrollTop,o=i-a,s=a<i,c=m.now();u(function e(){var t=(1e3,n=m.now()-c,function(e,t,n,r){if(r<e)return t+n;var i=(e/=r)*e;return t+n*(i*e*-2+3*i)}(n,a,o,1e3));var n;r.scrollTop=t;(s?t<i:i<t)&&u(e)})}};return m.dom.animator=e(m),m;function g(e){return e[0]||e}}ie.module("material.core").factory("$mdUtil",e),ie.element.prototype.focus=ie.element.prototype.focus||function(){return this.length&&this[0].focus(),this},ie.element.prototype.blur=ie.element.prototype.blur||function(){return this.length&&this[0].blur(),this}}(),function(){function a(r,i,c,a){var o=this.showWarnings;return{expect:s,expectAsync:l,expectWithText:function(e,t){var n=u(e)||"";-1<n.indexOf(a.startSymbol())?l(e,t,function(){return u(e)}):s(e,t,n)},expectWithoutText:function(e,t){var n=u(e);-1<n.indexOf(a.startSymbol())||n||s(e,t,n)}};function s(e,t,n){var r=ie.element(e)[0]||e;!r||r.hasAttribute(t)&&0!==r.getAttribute(t).length||function(e,t){var n=e.hasChildNodes(),r=!1;if(n)for(var i=e.childNodes,a=0;a<i.length;a++){var o=i[a];1===o.nodeType&&o.hasAttribute(t)&&(void 0,"none"!==((s=o).currentStyle?s.currentStyle:c.getComputedStyle(s)).display&&(r=!0))}var s;return r}(r,t)||((n=ie.isString(n)?n.trim():"").length?e.attr(t,n):o&&i.warn('ARIA: Attribute "',t,'", required for accessibility, is missing on node:',r))}function l(e,t,n){r(function(){s(e,t,n())})}function u(t){t=t[0]||t;for(var e,n=document.createTreeWalker(t,NodeFilter.SHOW_TEXT,null,!1),r="";e=n.nextNode();)i(e)||(r+=e.textContent);return r.trim()||"";function i(e){for(;e.parentNode&&(e=e.parentNode)!==t;)if(e.getAttribute&&"true"===e.getAttribute("aria-hidden"))return!0}}}a.$inject=["$$rAF","$log","$window","$interpolate"],ie.module("material.core").provider("$mdAria",function(){var i=this;return i.showWarnings=!0,{disableWarnings:function(){i.showWarnings=!1},$get:["$$rAF","$log","$window","$interpolate",function(e,t,n,r){return a.apply(i,arguments)}]}})}(),function(){function e(a,o,f,d,h){this.compile=function(t){var e=t.templateUrl,n=t.template||"",s=t.controller,c=t.controllerAs,r=ie.extend({},t.resolve||{}),i=ie.extend({},t.locals||{}),l=t.transformTemplate||ie.identity,u=t.bindToController;return ie.forEach(r,function(e,t){ie.isString(e)?r[t]=f.get(e):r[t]=f.invoke(e)}),ie.extend(r,i),r.$template=e?o(e).then(function(e){return e}):a.when(n),a.all(r).then(function(r){var i,e=l(r.$template,t),a=t.element||ie.element("<div>").html(e.trim()).contents(),o=d(a);return i={locals:r,element:a,link:function(e){if(r.$scope=e,s){var t=h(s,r,!0,c);u&&ie.extend(t.instance,r);var n=t();a.data("$ngControllerController",n),a.children().data("$ngControllerController",n),i.controller=n}return o(e)}}})}}e.$inject=["$q","$templateRequest","$injector","$compile","$controller"],ie.module("material.core").service("$mdCompiler",e)}(),function(){i.$inject=["$$MdGestureHandler","$$rAF","$timeout"];var a,r,u={},f=!(n.$inject=["$mdGesture","$$MdGestureHandler"]),o=null,s=!1;function e(){}function i(r,e,n){var t=navigator.userAgent||navigator.vendor||G.opera,i=t.match(/ipad|iphone|ipod/i),a=t.match(/android/i),o=function(){for(var e=document.createElement("div"),t=["","webkit","Moz","MS","ms","o"],n=0;n<t.length;n++){var r=t[n],i=r?r+"TouchAction":"touchAction";if(ie.isDefined(e.style[i]))return i}}(),s=void 0!==G.jQuery&&ie.element===G.jQuery,c={handler:function(e,t){var n=new r(e);return ie.extend(n,t),u[e]=n,c},register:function(e,t,n){var r=u[t.replace(/^\$md./,"")];if(r)return r.registerElement(e,n);throw new Error("Failed to register element with handler "+t+". Available handlers: "+Object.keys(u).join(", "))},isIos:i,isAndroid:a,isHijackingClicks:(i||a)&&!s&&!f};if(c.isHijackingClicks){c.handler("click",{options:{maxDistance:6},onEnd:l("click")}),c.handler("focus",{options:{maxDistance:6},onEnd:function(e,t){var n;t.distance<this.state.options.maxDistance&&"-1"!=(n=e.target).getAttribute("tabindex")&&!n.hasAttribute("DISABLED")&&(n.hasAttribute("tabindex")||n.hasAttribute("href")||n.isContentEditable||-1!=["INPUT","SELECT","BUTTON","TEXTAREA","VIDEO","AUDIO"].indexOf(n.nodeName))&&(this.dispatchEvent(e,"focus",t),e.target.focus())}}),c.handler("mouseup",{options:{maxDistance:6},onEnd:l("mouseup")}),c.handler("mousedown",{onStart:function(e){this.dispatchEvent(e,"mousedown")}})}function l(n){return function(e,t){t.distance<this.state.options.maxDistance&&this.dispatchEvent(e,n,t)}}return c.handler("press",{onStart:function(e,t){this.dispatchEvent(e,"$md.pressdown")},onEnd:function(e,t){this.dispatchEvent(e,"$md.pressup")}}).handler("hold",{options:{maxDistance:6,delay:500},onCancel:function(){n.cancel(this.state.timeout)},onStart:function(e,t){if(!this.state.registeredParent)return this.cancel();this.state.pos={x:t.x,y:t.y},this.state.timeout=n(ie.bind(this,function(){this.dispatchEvent(e,"$md.hold"),this.cancel()}),this.state.options.delay,!1)},onMove:function(e,t){o||"touchmove"!==e.type||e.preventDefault();var n=this.state.pos.x-t.x,r=this.state.pos.y-t.y;Math.sqrt(n*n+r*r)>this.options.maxDistance&&this.cancel()},onEnd:function(){this.onCancel()}}).handler("drag",{options:{minDistance:6,horizontal:!0,cancelMultiplier:1.5},onSetup:function(e,t){o&&(this.oldTouchAction=e[0].style[o],e[0].style[o]=!1===t.horizontal?"pan-y":"pan-x")},onCleanup:function(e){this.oldTouchAction&&(e[0].style[o]=this.oldTouchAction)},onStart:function(e){this.state.registeredParent||this.cancel()},onMove:function(e,t){var n,r;o||"touchmove"!==e.type||e.preventDefault(),this.state.dragPointer?this.dispatchDragMove(e):(r=this.state.options.horizontal?(n=Math.abs(t.distanceX)>this.state.options.minDistance,Math.abs(t.distanceY)>this.state.options.minDistance*this.state.options.cancelMultiplier):(n=Math.abs(t.distanceY)>this.state.options.minDistance,Math.abs(t.distanceX)>this.state.options.minDistance*this.state.options.cancelMultiplier),n?(this.state.dragPointer=d(e),h(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragstart",this.state.dragPointer)):r&&this.cancel())},dispatchDragMove:e.throttle(function(e){this.state.isRunning&&(h(e,this.state.dragPointer),this.dispatchEvent(e,"$md.drag",this.state.dragPointer))}),onEnd:function(e,t){this.state.dragPointer&&(h(e,this.state.dragPointer),this.dispatchEvent(e,"$md.dragend",this.state.dragPointer))}}).handler("swipe",{options:{minVelocity:.65,minDistance:10},onEnd:function(e,t){var n;Math.abs(t.velocityX)>this.state.options.minVelocity&&Math.abs(t.distanceX)>this.state.options.minDistance?(n="left"==t.directionX?"$md.swipeleft":"$md.swiperight",this.dispatchEvent(e,n)):Math.abs(t.velocityY)>this.state.options.minVelocity&&Math.abs(t.distanceY)>this.state.options.minDistance&&(n="up"==t.directionY?"$md.swipeup":"$md.swipedown",this.dispatchEvent(e,n))}})}function t(e){this.name=e,this.state={}}function n(e,i){function t(e){!e.clientX&&!e.clientY||e.$material||e.isIonicTap||l(e)||(e.preventDefault(),e.stopPropagation())}document.contains||(document.contains=function(e){return document.body.contains(e)}),!s&&e.isHijackingClicks&&(document.addEventListener("click",function(e){0===e.clientX&&0===e.clientY||e.$material||e.isIonicTap||l(e)?(o=null,"label"==e.target.tagName.toLowerCase()&&(o={x:e.x,y:e.y})):(e.preventDefault(),e.stopPropagation(),o=null)},!0),document.addEventListener("mouseup",t,!0),document.addEventListener("mousedown",t,!0),document.addEventListener("focus",t,!0),s=!0);function n(e,t){var n;for(var r in u)(n=u[r])instanceof i&&("start"===e&&n.cancel(),n[e](t,a))}ie.element(document).on("mousedown touchstart pointerdown",function(e){if(a)return;var t=+Date.now();if(r&&!c(e,r)&&t-r.endTime<1500)return;a=d(e),n("start",e)}).on("mousemove touchmove pointermove",function(e){if(!a||!c(e,a))return;h(e,a),n("move",e)}).on("mouseup mouseleave touchend touchcancel pointerup pointercancel",function(e){if(!a||!c(e,a))return;h(e,a),a.endTime=+Date.now(),n("end",e),r=a,a=null}).on("$$mdGestureReset",function(){r=a=null})}function d(e){var t=p(e),n={startTime:+Date.now(),target:e.target,type:e.type.charAt(0)};return n.startX=n.x=t.pageX,n.startY=n.y=t.pageY,n}function c(e,t){return e&&t&&e.type.charAt(0)===t.type}function l(e){return o&&o.x==e.x&&o.y==e.y}function h(e,t){var n=p(e),r=t.x=n.pageX,i=t.y=n.pageY;t.distanceX=r-t.startX,t.distanceY=i-t.startY,t.distance=Math.sqrt(t.distanceX*t.distanceX+t.distanceY*t.distanceY),t.directionX=0<t.distanceX?"right":t.distanceX<0?"left":"",t.directionY=0<t.distanceY?"down":t.distanceY<0?"up":"",t.duration=+Date.now()-t.startTime,t.velocityX=t.distanceX/t.duration,t.velocityY=t.distanceY/t.duration}function p(e){return(e=e.originalEvent||e).touches&&e.touches[0]||e.changedTouches&&e.changedTouches[0]||e}ie.module("material.core.gestures",[]).provider("$mdGesture",e).factory("$$MdGestureHandler",function(){var e=void 0!==G.jQuery&&ie.element===G.jQuery;return t.prototype={options:{},dispatchEvent:e?function(e,t,n){n=n||a;var r=new ie.element.Event(t);r.$material=!0,r.pointer=n,r.srcEvent=e,ie.extend(r,{clientX:n.x,clientY:n.y,screenX:n.x,screenY:n.y,pageX:n.x,pageY:n.y,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey}),ie.element(n.target).trigger(r)}:function(e,t,n){var r;n=n||a,"click"===t||"mouseup"==t||"mousedown"==t?(r=document.createEvent("MouseEvents")).initMouseEvent(t,!0,!0,G,e.detail,n.x,n.y,n.x,n.y,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget||null):(r=document.createEvent("CustomEvent")).initCustomEvent(t,!0,!0,{}),r.$material=!0,r.pointer=n,r.srcEvent=e,n.target.dispatchEvent(r)},onSetup:ie.noop,onCleanup:ie.noop,onStart:ie.noop,onMove:ie.noop,onEnd:ie.noop,onCancel:ie.noop,start:function(e,t){if(!this.state.isRunning){var n=this.getNearestParent(e.target),r=n&&n.$mdGesture[this.name]||{};this.state={isRunning:!0,options:ie.extend({},this.options,r),registeredParent:n},this.onStart(e,t)}},move:function(e,t){this.state.isRunning&&this.onMove(e,t)},end:function(e,t){this.state.isRunning&&(this.onEnd(e,t),this.state.isRunning=!1)},cancel:function(e,t){this.onCancel(e,t),this.state={}},getNearestParent:function(e){for(var t=e;t;){if((t.$mdGesture||{})[this.name])return t;t=t.parentNode}return null},registerElement:function(e,t){var n=this;return e[0].$mdGesture=e[0].$mdGesture||{},e[0].$mdGesture[this.name]=t||{},e.on("$destroy",r),n.onSetup(e,t||{}),r;function r(){delete e[0].$mdGesture[n.name],e.off("$destroy",r),n.onCleanup(e,t||{})}}},t}).run(n),e.prototype={skipClickHijack:function(){return f=!0},$get:["$$MdGestureHandler","$$rAF","$timeout",function(e,t,n){return new i(e,t,n)}]}}(),ie.module("material.core").provider("$$interimElement",function(){return t.$inject=["$document","$q","$$q","$rootScope","$timeout","$rootElement","$animate","$mdUtil","$mdCompiler","$mdTheming","$injector"],e.$get=t,e;function e(i){e.$inject=["$$interimElement","$injector"];var n=["onHide","onShow","onRemove"],a={},l={presets:{}},r={setDefaults:function(e){return l.optionsFactory=e.options,l.methods=(e.methods||[]).concat(n),r},addPreset:function(e,t){if((t=t||{}).methods=t.methods||[],t.options=t.options||function(){return{}},/^cancel|hide|show$/.test(e))throw new Error("Preset '"+e+"' in "+i+" is reserved!");if(-1<t.methods.indexOf("_options"))throw new Error("Method '_options' in "+i+" is reserved!");return l.presets[e]={methods:t.methods.concat(n),optionsFactory:t.options,argOption:t.argOption},r},addMethod:function(e,t){return a[e]=t,r},$get:e};return r.addPreset("build",{methods:["controller","controllerAs","resolve","template","templateUrl","themable","transformTemplate","parent"]}),r;function e(e,r){var o,t,n=e(),s={hide:n.hide,cancel:n.cancel,show:function(e){return(e=e||{})._options&&(e=e._options),n.show(ie.extend({},t,e))},destroy:function(e){return n.destroy(e)}};return o=l.methods||[],t=c(l.optionsFactory,{}),ie.forEach(a,function(e,t){s[t]=e}),ie.forEach(l.presets,function(t,n){var r=c(t.optionsFactory,{}),e=(t.methods||[]).concat(o);function i(e){this._options=ie.extend({},r,e)}if(ie.extend(r,{$type:n}),ie.forEach(e,function(t){i.prototype[t]=function(e){return this._options[t]=e,this}}),t.argOption){var a="show"+n.charAt(0).toUpperCase()+n.slice(1);s[a]=function(e){var t=s[n](e);return s.show(t)}}s[n]=function(e){return arguments.length&&t.argOption&&!ie.isObject(e)&&!ie.isArray(e)?(new i)[t.argOption](e):new i(e)}}),s;function c(e,t){var n={};return n[i]=s,r.invoke(e||function(){return t},{},n)}}}function t(d,h,s,t,p,m,r,i,g,_,e){return function(){var f,a=[];return f={show:function(e){var t=new n((e=e||{})||{});return(!e.skipHide&&a.length?f.cancel():h.when(!0)).finally(function(){a.push(t),t.show().catch(function(e){return e})}),t.deferred.promise},hide:function(t,n){if(!a.length)return h.when(t);if((n=n||{}).closeAll){var e=h.all(a.reverse().map(i));return a=[],e}if(n.closeTo!==ae)return h.all(a.splice(n.closeTo).map(i));var r=a.pop();return i(r);function i(e){return e.remove(t,!1,n||{}).catch(function(e){return e}),e.deferred.promise}},cancel:function(e,t){var n=a.pop();return n?(n.remove(e,!0,t||{}).catch(function(e){return e}),n.deferred.promise.catch(ie.noop)):h.when(e)},destroy:function(e){var t=e?null:a.shift(),n=ie.element(e).length?ie.element(e)[0].parentNode:null;if(n){var r=a.filter(function(e){var t=e.options.element[0];return t===n});0<r.length&&(t=r[0],a.splice(a.indexOf(t),1))}return t?t.remove(!1,!1,{$destroy:!0}):h.when(!1)},$injector_:e};function n(c){var a,l,e,u=h.when(!0);return(e=(e=c)||{}).template&&(e.template=i.processTemplate(e.template)),c=ie.extend({preserveScope:!1,cancelAutoHide:ie.noop,scope:e.scope||t.$new(e.isolateScope),onShow:function(e,t,n){return r.enter(t,n.parent)},onRemove:function(e,t){return t&&r.leave(t)||h.when()}},e),a={options:c,deferred:h.defer(),show:function(){return h(function(n,t){var r;function s(e){a.deferred.reject(e),t(e)}c.onCompiling&&c.onCompiling(c),(r=c,(r.skipCompile?null:g.compile(r))||h(function(e){e({locals:{},link:function(){return r.element}})})).then(function(e){var r,i,a,t,o;l=function(e,t){ie.extend(e.locals,t);var n,r,i,a,o=e.link(t.scope);return t.element=o,t.parent=(n=o,a=(r=t).parent,((a=ie.isFunction(a)?a(r.scope,n,r):ie.isString(a)?ie.element(d[0].querySelector(a)):ie.element(a))||{}).length?a:(m[0]&&m[0].querySelector&&(i=m[0].querySelector(":not(svg) > body")),i||(i=m[0]),"#comment"==i.nodeName&&(i=d[0].body),ie.element(i))),t.themable&&_(o),o}(e,c),u=(r=l,i=c,a=e.controller,t=i.onShowing||ie.noop,o=i.onComplete||ie.noop,t(i.scope,r,i,a),h(function(n,t){try{h.when(i.onShow(i.scope,r,i,a)).then(function(){var e,t;o(i.scope,r,i),t=ie.noop,c.hideDelay&&(e=p(f.hide,c.hideDelay),t=function(){p.cancel(e)}),c.cancelAutoHide=function(){t(),c.cancelAutoHide=ae},n(r)},t)}catch(e){t(e.message)}})).then(n,s)},s)})},remove:function(e,t,n){return l?((c=ie.extend(c||{},n||{})).cancelAutoHide&&c.cancelAutoHide(),c.element.triggerHandler("$mdInterimElementRemove"),!0===c.$destroy?o(c.element,c).then(function(){t&&i(e)||r(e)}):(h.when(u).finally(function(){o(c.element,c).then(function(){t&&i(e)||r(e)},i)}),a.deferred.promise)):h.when(!1);function r(e){a.deferred.resolve(e)}function i(e){a.deferred.reject(e)}}};function o(r,i){var a=i.onRemoving||ie.noop;return s(function(e,t){try{var n=s.when(i.onRemove(i.scope,r,i)||!0);a(r,n),1==i.$destroy?e(r):n.then(function(){!i.preserveScope&&i.scope&&i.scope.$destroy(),e(r)},t)}catch(e){t(e)}})}}}}}),function(){var l,s,u,c=/(-gt)?-(sm|md|lg|print)/g,f=/\s+/g,d=["grow","initial","auto","none","noshrink","nogrow"],h=["row","column"],p=["","start","center","end","stretch","space-around","space-between"],m=["","start","center","end","stretch"],g={enabled:!0,breakpoints:[]};function _(){var e=!!document.querySelector("[md-layouts-disabled]");g.enabled=!e}function b(){return g.enabled=!1,{restrict:"A",priority:"900"}}function v(r){return["$mdUtil","$interpolate","$log",function(e,t,n){return l=e,s=t,u=n,{restrict:"A",compile:function(e,t){var n;return g.enabled&&(C(r,T(r,t,""),A(0,r,t)),i(0,e),n=i),n||ie.noop}}}];function i(e,t){t.addClass(r)}}function y(t){var n=t.split("-");return["$log",function(e){return e.warn(t+"has been deprecated. Please use a `"+n[0]+"-gt-<xxx>` variant."),ie.noop}]}function w(e,t,n,r){var i,a=n[0].nodeName.toLowerCase();switch(e.replace(c,"")){case"flex":"md-button"!=a&&"fieldset"!=a||(i="<"+a+" "+e+"></"+a+">",r.warn(l.supplant("Markup '{0}' may not work as expected in IE Browsers. Consult '{1}' for details.",[i,"https://github.com/philipwalton/flexbugs#9-some-html-elements-cant-be-flex-containers"])))}}function C(e,t,n){var r,i,a,o=t;if(!S(t)){switch(e.replace(c,"")){case"layout":x(t,h)||(t=h[0]);break;case"flex":x(t,d)||isNaN(t)&&(t="");break;case"flex-offset":case"flex-order":t&&!isNaN(+t)||(t="0");break;case"layout-align":var s=(a={main:"start",cross:"stretch"},0!==(r=(r=t)||"").indexOf("-")&&0!==r.indexOf(" ")||(r="none"+r),(i=r.toLowerCase().trim().replace(f,"-").split("-")).length&&"space"===i[0]&&(i=[i[0]+"-"+i[1],i[2]]),0<i.length&&(a.main=i[0]||a.main),1<i.length&&(a.cross=i[1]||a.cross),p.indexOf(a.main)<0&&(a.main="start"),m.indexOf(a.cross)<0&&(a.cross="stretch"),a);t=l.supplant("{main}-{cross}",s);break;case"layout-padding":case"layout-margin":case"layout-fill":case"layout-wrap":case"layout-nowrap":case"layout-nowrap":t=""}t!=o&&(n||ie.noop)(t)}return t}function A(e,t,n){return function(e){S(e)||(n[n.$normalize(t)]=e)}}function S(e){return-1<(e||"").indexOf(s.startSymbol())}function T(e,t,n){var r=t.$normalize(e);return t[r]?t[r].replace(f,"-"):n||null}function x(t,e,n){t=n&&t?t.replace(f,n):t;var r=!1;return t&&e.forEach(function(e){e=n?e.replace(f,n):e,r=r||e===t}),r}!function(r){var i,t=/^((?:x|data)[\:\-_])/i,n=/([\:\-\_]+(.))/g,e=["layout","flex","flex-order","flex-offset","layout-align"],a=["show","hide","layout-padding","layout-margin"];function o(e){return e.replace(t,"").replace(n,function(e,t,n,r){return r?n.toUpperCase():n})}ie.forEach(["","xs","gt-xs","sm","gt-sm","md","gt-md","lg","gt-lg","xl","print"],function(n){ie.forEach(e,function(e){var t=n?e+"-"+n:e;r.directive(o(t),function(c){return["$mdUtil","$interpolate","$log",function(e,t,n){return l=e,s=t,u=n,{restrict:"A",compile:function(e,t){var n;return g.enabled&&(w(c,0,e,u),C(c,T(c,t,""),A(0,c,t)),n=r),n||ie.noop}}}];function r(e,t,n){var r,i,a,o=(r=t,i=c,function(e){var t=C(i,e||"");ie.isDefined(t)&&(a&&r.removeClass(a),a=t?i+"-"+t.replace(f,"-"):i,r.addClass(a))}),s=n.$observe(n.$normalize(c),o);o(T(c,n,"")),e.$on("$destroy",function(){s()})}}(t))}),ie.forEach(a,function(e){var t=n?e+"-"+n:e;r.directive(o(t),v(t))})}),r.provider("$$mdLayout",function(){return{$get:ie.noop,validateAttributeValue:C,validateAttributeUsage:w,disableLayouts:function(e){g.enabled=!0!==e}}}).directive("mdLayoutCss",b).directive("ngCloak",(i="ng-cloak",["$timeout",function(n){return{restrict:"A",priority:-10,compile:function(e){return g.enabled?(e.addClass(i),function(e,t){n(function(){t.removeClass(i)},10,!1)}):ie.noop}}}])).directive("layoutWrap",v("layout-wrap")).directive("layoutNowrap",v("layout-nowrap")).directive("layoutNoWrap",v("layout-no-wrap")).directive("layoutFill",v("layout-fill")).directive("layoutLtMd",y("layout-lt-md")).directive("layoutLtLg",y("layout-lt-lg")).directive("flexLtMd",y("flex-lt-md")).directive("flexLtLg",y("flex-lt-lg")).directive("layoutAlignLtMd",y("layout-align-lt-md")).directive("layoutAlignLtLg",y("layout-align-lt-lg")).directive("flexOrderLtMd",y("flex-order-lt-md")).directive("flexOrderLtLg",y("flex-order-lt-lg")).directive("offsetLtMd",y("flex-offset-lt-md")).directive("offsetLtLg",y("flex-offset-lt-lg")).directive("hideLtMd",y("hide-lt-md")).directive("hideLtLg",y("hide-lt-lg")).directive("showLtMd",y("show-lt-md")).directive("showLtLg",y("show-lt-lg")).config(_)}(ie.module("material.core.layout",["ng"]))}(),ie.module("material.core.meta",[]).provider("$$mdMeta",function(){var r=ie.element(document.head),i={};function a(e){if(i[e])return!0;var t=document.getElementsByName(e)[0];return!!t&&(i[e]=ie.element(t),!0)}var e={setMeta:function(e,t){if(a(e),i[e])i[e].attr("content",t);else{var n=ie.element('<meta name="'+e+'" content="'+t+'"/>');r.append(n),i[e]=n}return function(){i[e].attr("content",""),i[e].remove(),delete i[e]}},getMeta:function(e){if(!a(e))throw Error("$$mdMeta: could not find a meta tag with the name '"+e+"'");return i[e].attr("content")}};return ie.extend({},e,{$get:function(){return e}})}),function(){function e(n,r){var i,a=[],o={};return i={notFoundError:function(e,t){n.error((t||"")+"No instance found for handle",e)},getInstances:function(){return a},get:function(e){if(!s(e))return null;var t,n,r;for(t=0,n=a.length;t<n;t++)if((r=a[t]).$$mdHandle===e)return r;return null},register:function(t,e){return e?(t.$$mdHandle=e,a.push(t),(n=o[e])&&(n.forEach(function(e){e.resolve(t)}),delete o[e]),function(){var e=a.indexOf(t);-1!==e&&a.splice(e,1)}):ie.noop;var n},when:function(e){if(s(e)){var t=r.defer(),n=i.get(e);return n?t.resolve(n):(o[e]===ae&&(o[e]=[]),o[e].push(t)),t.promise}return r.reject("Invalid `md-component-id` value.")}};function s(e){return e&&""!==e}}e.$inject=["$log","$q"],ie.module("material.core").factory("$mdComponentRegistry",e)}(),function(){function e(i){return{attach:function(e,t,n){var r;return n=ie.extend((r=t).hasClass("md-icon-button")?{isMenuItem:r.hasClass("md-menu-item"),fitRipple:!0,center:!0}:{isMenuItem:r.hasClass("md-menu-item"),dimBackground:!0},n),i.attach(e,t,n)}}}e.$inject=["$mdInkRipple"],ie.module("material.core").factory("$mdButtonInkRipple",e)}(),function(){function e(r){return{attach:function(e,t,n){return r.attach(e,t,ie.extend({center:!0,dimBackground:!1,fitRipple:!0},n))}}}e.$inject=["$mdInkRipple"],ie.module("material.core").factory("$mdCheckboxInkRipple",e)}(),function(){function e(r){return{attach:function(e,t,n){return r.attach(e,t,ie.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},n))}}}e.$inject=["$mdInkRipple"],ie.module("material.core").factory("$mdListInkRipple",e)}(),function(){a.$inject=["$scope","$element","rippleOptions","$window","$timeout","$mdUtil","$mdColorUtil"],e.$inject=["$mdButtonInkRipple","$mdCheckboxInkRipple"],ie.module("material.core").provider("$mdInkRipple",function(){var i=!1;return{disableInkRipple:function(){i=!0},$get:["$injector",function(r){return{attach:function(e,t,n){return i||t.controller("mdNoInk")?ie.noop:r.instantiate(a,{$scope:e,$element:t,rippleOptions:n})}}}]}}).directive("mdInkRipple",e).directive("mdNoInk",n).directive("mdNoBar",n).directive("mdNoStretch",n);function e(r,i){return{controller:ie.noop,link:function(e,t,n){n.hasOwnProperty("mdInkRippleCheckbox")?i.attach(e,t):r.attach(e,t)}}}function a(e,t,n,r,i,a,o){this.$window=r,this.$timeout=i,this.$mdUtil=a,this.$mdColorUtil=o,this.$scope=e,this.$element=t,this.options=n,this.mousedown=!1,this.ripples=[],this.timeout=null,this.lastRipple=null,a.valueOnUse(this,"container",this.createContainer),this.$element.addClass("md-ink-ripple"),(t.controller("mdInkRipple")||{}).createRipple=ie.bind(this,this.createRipple),(t.controller("mdInkRipple")||{}).setColor=ie.bind(this,this.color),this.bindEvents()}function t(e,t){(e.mousedown||e.lastRipple)&&(e.mousedown=!1,e.$mdUtil.nextTick(ie.bind(e,t),!1))}function n(){return{controller:ie.noop}}a.prototype.color=function(e){var t,n,r=this;return ie.isDefined(e)&&(r._color=r._parseColor(e)),r._color||r._parseColor(r.inkRipple())||r._parseColor((t=r.options&&r.options.colorElement?r.options.colorElement:[],(n=t.length?t[0]:r.$element[0])?r.$window.getComputedStyle(n).color:"rgb(0,0,0)"))},a.prototype.calculateColor=function(){return this.color()},a.prototype._parseColor=function(e,t){t=t||1;var n=this.$mdColorUtil;if(e)return 0===e.indexOf("rgba")?e.replace(/\d?\.?\d*\s*\)\s*$/,(.1*t).toString()+")"):0===e.indexOf("rgb")?n.rgbToRgba(e):0===e.indexOf("#")?n.hexToRgba(e):void 0},a.prototype.bindEvents=function(){this.$element.on("mousedown",ie.bind(this,this.handleMousedown)),this.$element.on("mouseup touchend",ie.bind(this,this.handleMouseup)),this.$element.on("mouseleave",ie.bind(this,this.handleMouseup)),this.$element.on("touchmove",ie.bind(this,this.handleTouchmove))},a.prototype.handleMousedown=function(e){if(!this.mousedown)if(e.hasOwnProperty("originalEvent")&&(e=e.originalEvent),this.mousedown=!0,this.options.center)this.createRipple(this.container.prop("clientWidth")/2,this.container.prop("clientWidth")/2);else if(e.srcElement!==this.$element[0]){var t=this.$element[0].getBoundingClientRect(),n=e.clientX-t.left,r=e.clientY-t.top;this.createRipple(n,r)}else this.createRipple(e.offsetX,e.offsetY)},a.prototype.handleMouseup=function(){t(this,this.clearRipples)},a.prototype.handleTouchmove=function(){t(this,this.deleteRipples)},a.prototype.deleteRipples=function(){for(var e=0;e<this.ripples.length;e++)this.ripples[e].remove()},a.prototype.clearRipples=function(){for(var e=0;e<this.ripples.length;e++)this.fadeInComplete(this.ripples[e])},a.prototype.createContainer=function(){var e=ie.element('<div class="md-ripple-container"></div>');return this.$element.append(e),e},a.prototype.clearTimeout=function(){this.timeout&&(this.$timeout.cancel(this.timeout),this.timeout=null)},a.prototype.isRippleAllowed=function(){var e=this.$element[0];do{if(!e.tagName||"BODY"===e.tagName)break;if(e&&ie.isFunction(e.hasAttribute)){if(e.hasAttribute("disabled"))return!1;if("false"===this.inkRipple()||"0"===this.inkRipple())return!1}}while(e=e.parentNode);return!0},a.prototype.inkRipple=function(){return this.$element.attr("md-ink-ripple")},a.prototype.createRipple=function(e,t){if(this.isRippleAllowed()){var n,r,i,a=this,o=a.$mdColorUtil,s=ie.element('<div class="md-ripple"></div>'),c=this.$element.prop("clientWidth"),l=this.$element.prop("clientHeight"),u=2*Math.max(Math.abs(c-e),e),f=2*Math.max(Math.abs(l-t),t),d=(n=this.options.fitRipple,r=u,i=f,n?Math.max(r,i):Math.sqrt(Math.pow(r,2)+Math.pow(i,2))),h=this.calculateColor();s.css({left:e+"px",top:t+"px",background:"black",width:d+"px",height:d+"px",backgroundColor:o.rgbaToRgb(h),borderColor:o.rgbaToRgb(h)}),this.lastRipple=s,this.clearTimeout(),this.timeout=this.$timeout(function(){a.clearTimeout(),a.mousedown||a.fadeInComplete(s)},157.5,!1),this.options.dimBackground&&this.container.css({backgroundColor:h}),this.container.append(s),this.ripples.push(s),s.addClass("md-ripple-placed"),this.$mdUtil.nextTick(function(){s.addClass("md-ripple-scaled md-ripple-active"),a.$timeout(function(){a.clearRipples()},450,!1)},!1)}},a.prototype.fadeInComplete=function(e){this.lastRipple===e&&(this.timeout||this.mousedown)||this.removeRipple(e)},a.prototype.removeRipple=function(e){var t=this;this.ripples.indexOf(e)<0||(this.ripples.splice(this.ripples.indexOf(e),1),e.removeClass("md-ripple-active"),e.addClass("md-ripple-remove"),0===this.ripples.length&&this.container.css({backgroundColor:""}),this.$timeout(function(){t.fadeOutComplete(e)},450,!1))},a.prototype.fadeOutComplete=function(e){e.remove(),this.lastRipple=null}}(),function(){function e(r){return{attach:function(e,t,n){return r.attach(e,t,ie.extend({center:!1,dimBackground:!0,outline:!1,rippleSize:"full"},n))}}}e.$inject=["$mdInkRipple"],ie.module("material.core").factory("$mdTabInkRipple",e)}(),ie.module("material.core.theming.palette",[]).constant("$mdColorPalette",{red:{50:"#ffebee",100:"#ffcdd2",200:"#ef9a9a",300:"#e57373",400:"#ef5350",500:"#f44336",600:"#e53935",700:"#d32f2f",800:"#c62828",900:"#b71c1c",A100:"#ff8a80",A200:"#ff5252",A400:"#ff1744",A700:"#d50000",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 A100",contrastStrongLightColors:"400 500 600 700 A200 A400 A700"},pink:{50:"#fce4ec",100:"#f8bbd0",200:"#f48fb1",300:"#f06292",400:"#ec407a",500:"#e91e63",600:"#d81b60",700:"#c2185b",800:"#ad1457",900:"#880e4f",A100:"#ff80ab",A200:"#ff4081",A400:"#f50057",A700:"#c51162",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"500 600 A200 A400 A700"},purple:{50:"#f3e5f5",100:"#e1bee7",200:"#ce93d8",300:"#ba68c8",400:"#ab47bc",500:"#9c27b0",600:"#8e24aa",700:"#7b1fa2",800:"#6a1b9a",900:"#4a148c",A100:"#ea80fc",A200:"#e040fb",A400:"#d500f9",A700:"#aa00ff",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200 A400 A700"},"deep-purple":{50:"#ede7f6",100:"#d1c4e9",200:"#b39ddb",300:"#9575cd",400:"#7e57c2",500:"#673ab7",600:"#5e35b1",700:"#512da8",800:"#4527a0",900:"#311b92",A100:"#b388ff",A200:"#7c4dff",A400:"#651fff",A700:"#6200ea",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200"},indigo:{50:"#e8eaf6",100:"#c5cae9",200:"#9fa8da",300:"#7986cb",400:"#5c6bc0",500:"#3f51b5",600:"#3949ab",700:"#303f9f",800:"#283593",900:"#1a237e",A100:"#8c9eff",A200:"#536dfe",A400:"#3d5afe",A700:"#304ffe",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100",contrastStrongLightColors:"300 400 A200 A400"},blue:{50:"#e3f2fd",100:"#bbdefb",200:"#90caf9",300:"#64b5f6",400:"#42a5f5",500:"#2196f3",600:"#1e88e5",700:"#1976d2",800:"#1565c0",900:"#0d47a1",A100:"#82b1ff",A200:"#448aff",A400:"#2979ff",A700:"#2962ff",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100",contrastStrongLightColors:"500 600 700 A200 A400 A700"},"light-blue":{50:"#e1f5fe",100:"#b3e5fc",200:"#81d4fa",300:"#4fc3f7",400:"#29b6f6",500:"#03a9f4",600:"#039be5",700:"#0288d1",800:"#0277bd",900:"#01579b",A100:"#80d8ff",A200:"#40c4ff",A400:"#00b0ff",A700:"#0091ea",contrastDefaultColor:"dark",contrastLightColors:"600 700 800 900 A700",contrastStrongLightColors:"600 700 800 A700"},cyan:{50:"#e0f7fa",100:"#b2ebf2",200:"#80deea",300:"#4dd0e1",400:"#26c6da",500:"#00bcd4",600:"#00acc1",700:"#0097a7",800:"#00838f",900:"#006064",A100:"#84ffff",A200:"#18ffff",A400:"#00e5ff",A700:"#00b8d4",contrastDefaultColor:"dark",contrastLightColors:"700 800 900",contrastStrongLightColors:"700 800 900"},teal:{50:"#e0f2f1",100:"#b2dfdb",200:"#80cbc4",300:"#4db6ac",400:"#26a69a",500:"#009688",600:"#00897b",700:"#00796b",800:"#00695c",900:"#004d40",A100:"#a7ffeb",A200:"#64ffda",A400:"#1de9b6",A700:"#00bfa5",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700"},green:{50:"#e8f5e9",100:"#c8e6c9",200:"#a5d6a7",300:"#81c784",400:"#66bb6a",500:"#4caf50",600:"#43a047",700:"#388e3c",800:"#2e7d32",900:"#1b5e20",A100:"#b9f6ca",A200:"#69f0ae",A400:"#00e676",A700:"#00c853",contrastDefaultColor:"dark",contrastLightColors:"500 600 700 800 900",contrastStrongLightColors:"500 600 700"},"light-green":{50:"#f1f8e9",100:"#dcedc8",200:"#c5e1a5",300:"#aed581",400:"#9ccc65",500:"#8bc34a",600:"#7cb342",700:"#689f38",800:"#558b2f",900:"#33691e",A100:"#ccff90",A200:"#b2ff59",A400:"#76ff03",A700:"#64dd17",contrastDefaultColor:"dark",contrastLightColors:"700 800 900",contrastStrongLightColors:"700 800 900"},lime:{50:"#f9fbe7",100:"#f0f4c3",200:"#e6ee9c",300:"#dce775",400:"#d4e157",500:"#cddc39",600:"#c0ca33",700:"#afb42b",800:"#9e9d24",900:"#827717",A100:"#f4ff81",A200:"#eeff41",A400:"#c6ff00",A700:"#aeea00",contrastDefaultColor:"dark",contrastLightColors:"900",contrastStrongLightColors:"900"},yellow:{50:"#fffde7",100:"#fff9c4",200:"#fff59d",300:"#fff176",400:"#ffee58",500:"#ffeb3b",600:"#fdd835",700:"#fbc02d",800:"#f9a825",900:"#f57f17",A100:"#ffff8d",A200:"#ffff00",A400:"#ffea00",A700:"#ffd600",contrastDefaultColor:"dark"},amber:{50:"#fff8e1",100:"#ffecb3",200:"#ffe082",300:"#ffd54f",400:"#ffca28",500:"#ffc107",600:"#ffb300",700:"#ffa000",800:"#ff8f00",900:"#ff6f00",A100:"#ffe57f",A200:"#ffd740",A400:"#ffc400",A700:"#ffab00",contrastDefaultColor:"dark"},orange:{50:"#fff3e0",100:"#ffe0b2",200:"#ffcc80",300:"#ffb74d",400:"#ffa726",500:"#ff9800",600:"#fb8c00",700:"#f57c00",800:"#ef6c00",900:"#e65100",A100:"#ffd180",A200:"#ffab40",A400:"#ff9100",A700:"#ff6d00",contrastDefaultColor:"dark",contrastLightColors:"800 900",contrastStrongLightColors:"800 900"},"deep-orange":{50:"#fbe9e7",100:"#ffccbc",200:"#ffab91",300:"#ff8a65",400:"#ff7043",500:"#ff5722",600:"#f4511e",700:"#e64a19",800:"#d84315",900:"#bf360c",A100:"#ff9e80",A200:"#ff6e40",A400:"#ff3d00",A700:"#dd2c00",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 400 A100 A200",contrastStrongLightColors:"500 600 700 800 900 A400 A700"},brown:{50:"#efebe9",100:"#d7ccc8",200:"#bcaaa4",300:"#a1887f",400:"#8d6e63",500:"#795548",600:"#6d4c41",700:"#5d4037",800:"#4e342e",900:"#3e2723",A100:"#d7ccc8",A200:"#bcaaa4",A400:"#8d6e63",A700:"#5d4037",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 A100 A200",contrastStrongLightColors:"300 400"},grey:{50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#ffffff",A200:"#000000",A400:"#303030",A700:"#616161",contrastDefaultColor:"dark",contrastLightColors:"600 700 800 900 A200 A400 A700"},"blue-grey":{50:"#eceff1",100:"#cfd8dc",200:"#b0bec5",300:"#90a4ae",400:"#78909c",500:"#607d8b",600:"#546e7a",700:"#455a64",800:"#37474f",900:"#263238",A100:"#cfd8dc",A200:"#b0bec5",A400:"#78909c",A700:"#455a64",contrastDefaultColor:"light",contrastDarkColors:"50 100 200 300 A100 A200",contrastStrongLightColors:"400 500 700"}}),function(p){function e(e){var t=!!document.querySelector("[md-themes-disabled]");e.disableTheming(t)}e.$inject=["$mdThemingProvider"],n.$inject=["$mdTheming","$interpolate","$log"],r.$inject=["$mdTheming"],t.$inject=["$mdColorPalette","$$mdMetaProvider"],i.$inject=["$injector","$mdTheming"],p.module("material.core.theming",["material.core.theming.palette","material.core.meta"]).directive("mdTheme",n).directive("mdThemable",r).directive("mdThemesDisabled",function(){return C.disableTheming=!0,{restrict:"A",priority:"900"}}).provider("$mdTheming",t).config(e).run(i);var m,c={},s={name:"dark",1:"rgba(0,0,0,0.87)",2:"rgba(0,0,0,0.54)",3:"rgba(0,0,0,0.38)",4:"rgba(0,0,0,0.12)"},l={name:"light",1:"rgba(255,255,255,1.0)",2:"rgba(255,255,255,0.7)",3:"rgba(255,255,255,0.5)",4:"rgba(255,255,255,0.12)"},u="1px 1px 0px rgba(0,0,0,0.4), -1px -1px 0px rgba(0,0,0,0.4)",g="",f=x("rgba(0,0,0,0.87)"),d=x("rgba(255,255,255,0.87)"),h=x("rgb(255,255,255)"),_=["primary","accent","warn","background"],b="primary",v={accent:{default:"A200","hue-1":"A100","hue-2":"A400","hue-3":"A700"},background:{default:"50","hue-1":"A100","hue-2":"100","hue-3":"300"}},y={background:{default:"A400","hue-1":"800","hue-2":"900","hue-3":"A200"}};_.forEach(function(e){var t={default:"500","hue-1":"300","hue-2":"800","hue-3":"A100"};v[e]||(v[e]=t),y[e]||(y[e]=t)});var w=["50","100","200","300","400","500","600","700","800","900","A100","A200","A400","A700"],C={disableTheming:!1,generateOnDemand:!1,registeredStyles:[],nonce:null};function t(e,c){a.$inject=["$rootScope","$log"];var n,f={},d=!(m={}),h="default";p.extend(m,e);var t=function(e){var t,n,r,i=(e=p.isObject(e)?e:{}).theme||"default",a=e.hue||"800",o=m[e.palette]||m[f[i].colors[e.palette||"primary"].name],s=p.isObject(o[a])?o[a].hex:o[a];return t=s,n=c.setMeta("theme-color",t),r=c.setMeta("msapplication-navbutton-color",t),function(){n(),r()}};return n={definePalette:function(e,t){return t=t||{},m[e]=r(e,t),n},extendPalette:function(e,t){return r(e,p.extend({},m[e]||{},t))},theme:function(e,t){if(f[e])return f[e];var n="string"==typeof(t=t||"default")?f[t]:t,r=new i(e);return n&&p.forEach(n.colors,function(e,t){r.colors[t]={name:e.name,hues:p.extend({},e.hues)}}),f[e]=r},configuration:function(){return p.extend({},C,{defaultTheme:h,alwaysWatchTheme:d,registeredStyles:[].concat(C.registeredStyles)})},disableTheming:function(e){C.disableTheming=p.isUndefined(e)||!!e},registerStyles:function(e){C.registeredStyles.push(e)},setNonce:function(e){C.nonce=e},generateThemesOnDemand:function(e){C.generateOnDemand=e},setDefaultTheme:function(e){h=e},alwaysWatchTheme:function(e){d=e},enableBrowserColor:t,$get:a,_LIGHT_DEFAULT_HUES:v,_DARK_DEFAULT_HUES:y,_PALETTES:m,_THEMES:f,_parseRules:A,_rgba:k};function r(e,t){var n=w.filter(function(e){return!t[e]});if(n.length)throw new Error("Missing colors %1 in palette %2!".replace("%1",n.join(", ")).replace("%2",e));return t}function i(e){var o=this;function t(e){if((e=0===arguments.length||!!e)!==o.isDark){o.isDark=e,o.foregroundPalette=o.isDark?l:s,o.foregroundShadow=o.isDark?u:g;var t=o.isDark?y:v,a=o.isDark?v:y;return p.forEach(t,function(e,t){var n=o.colors[t],r=a[t];if(n)for(var i in n.hues)n.hues[i]===r[i]&&(n.hues[i]=e[i])}),o}}o.name=e,o.colors={},(o.dark=t)(!1),_.forEach(function(r){var i=(o.isDark?y:v)[r];o[r+"Palette"]=function(t,e){var n=o.colors[r]={name:t,hues:p.extend({},i,e)};return Object.keys(n.hues).forEach(function(e){if(!i[e])throw new Error("Invalid hue name '%1' in theme %2's %3 color %4. Available hue names: %4".replace("%1",e).replace("%2",o.name).replace("%3",t).replace("%4",Object.keys(i).join(", ")))}),Object.keys(n.hues).map(function(e){return n.hues[e]}).forEach(function(e){if(-1==w.indexOf(e))throw new Error("Invalid hue value '%1' in theme %2's %3 color %4. Available hue values: %5".replace("%1",e).replace("%2",o.name).replace("%3",r).replace("%4",t).replace("%5",w.join(", ")))}),o},o[r+"Color"]=function(){var e=Array.prototype.slice.call(arguments);return console.warn("$mdThemingProviderTheme."+r+"Color() has been deprecated. Use $mdThemingProviderTheme."+r+"Palette() instead."),o[r+"Palette"].apply(o,e)}})}function a(c,l){var n=function(e,t){t===ae&&(t=e,e=ae),e===ae&&(e=c),n.inherit(t,t)};return n.THEMES=p.extend({},f),n.PALETTES=p.extend({},m),n.inherit=function(n,e){var t,r=e.controller("mdTheme"),i=n.attr("md-theme-watch"),a=(d||p.isDefined(i))&&"false"!=i;function o(){return(r=e.controller("mdTheme")||n.data("$mdThemeController"))&&r.$mdTheme||("default"==h?"":h)}function s(e){if(e){u(e)||l.warn("Attempted to use unregistered theme '"+e+"'. Register it with $mdThemingProvider.theme().");var t=n.data("$mdThemeName");t&&n.removeClass("md-"+t+"-theme"),n.addClass("md-"+e+"-theme"),n.data("$mdThemeName",e),r&&n.data("$mdThemeController",r)}}s(o()),(d&&(!(t=e.controller("mdTheme"))||(n.on("$destroy",t.registerChanges(function(){s(o())})),0))||!d&&a)&&n.on("$destroy",c.$watch(o,s))},n.registered=u,n.defaultTheme=function(){return h},n.generateTheme=function(e){T(f[e],e,C.nonce)},n.setBrowserColor=t,n;function u(e){return e===ae||""===e||n.THEMES[e]!==ae}}}function n(a,o,s){return{priority:100,link:{pre:function(e,t,n){var r=[],i={registerChanges:function(t,e){return e&&(t=p.bind(e,t)),r.push(t),function(){var e=r.indexOf(t);-1<e&&r.splice(e,1)}},$setTheme:function(e){a.registered(e)||s.warn("attempted to use unregistered theme '"+e+"'"),i.$mdTheme=e,r.forEach(function(e){e()})}};t.data("$mdThemeController",i),i.$setTheme(o(n.mdTheme)(e)),n.$observe("mdTheme",i.$setTheme)}}}}function r(e){return e}function A(o,e,n){!function(e,t){if(!m[(e.colors[t]||{}).name])throw new Error("You supplied an invalid color palette for theme %1's %2 palette. Available palettes: %3".replace("%1",e.name).replace("%2",t).replace("%3",Object.keys(m).join(", ")))}(o,e),n=n.replace(/THEME_NAME/g,o.name);var r=[],t=o.colors[e],i=new RegExp("\\.md-"+o.name+"-theme","g"),s=new RegExp("('|\")?{{\\s*("+e+")-(color|contrast)-?(\\d\\.?\\d*)?\\s*}}(\"|')?","g"),c=m[t.name];return n=n.replace(/'?"?\{\{\s*([a-zA-Z]+)-(A?\d+|hue\-[0-3]|shadow|default)-?(\d\.?\d*)?(contrast)?\s*\}\}'?"?/g,function(e,t,n,r,i){return"foreground"===t?"shadow"==n?o.foregroundShadow:o.foregroundPalette[n]||o.foregroundPalette[1]:(0!==n.indexOf("hue")&&"default"!==n||(n=o.colors[t].hues[n]),k((m[o.colors[t].name][n]||"")[i?"contrast":"value"],r))}),p.forEach(t.hues,function(a,e){var t=n.replace(s,function(e,t,n,r,i){return k(c[a]["color"===r?"value":"contrast"],i)});"default"!==e&&(t=t.replace(i,".md-"+o.name+"-theme.md-"+e)),"default"==o.name&&(t=t.replace(/((?:(?:(?: |>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)+) )?)((?:(?:\w|\.|-)+)?)\.md-default-theme((?: |>|\.|\w|-|:|\(|\)|\[|\]|"|'|=)*)/g,function(e,t,n,r){return e+", "+t+n+r})),r.push(t)}),r}var S={};function i(e,t){var n=document.head,r=n?n.firstElementChild:null,i=!C.disableTheming&&e.has("$MD_THEME_CSS")?e.get("$MD_THEME_CSS"):"";if(i+=C.registeredStyles.join(""),r&&0!==i.length){p.forEach(m,function(r,e){var i=r.contrastDefaultColor,a=r.contrastLightColors||[],o=r.contrastStrongLightColors||[],s=r.contrastDarkColors||[];"string"==typeof a&&(a=a.split(" ")),"string"==typeof o&&(o=o.split(" ")),"string"==typeof s&&(s=s.split(" ")),delete r.contrastDefaultColor,delete r.contrastLightColors,delete r.contrastStrongLightColors,delete r.contrastDarkColors,p.forEach(r,function(e,t){if(!p.isObject(e)){var n=x(e);if(!n)throw new Error("Color %1, in palette %2's hue %3, is invalid. Hex or rgb(a) color expected.".replace("%1",e).replace("%2",r.name).replace("%3",t));r[t]={hex:r[t],value:n,contrast:"light"===i?-1<s.indexOf(t)?f:-1<o.indexOf(t)?h:d:-1<a.indexOf(t)?-1<o.indexOf(t)?h:d:f}}})});var a=i.split(/\}(?!(\}|'|"|;))/).filter(function(e){return e&&e.trim().length}).map(function(e){return e.trim()+"}"}),o=new RegExp("md-("+_.join("|")+")","g");_.forEach(function(e){S[e]=""}),a.forEach(function(e){e.match(o);for(var t,n=0;t=_[n];n++)if(-1<e.indexOf(".md-"+t))return S[t]+=e;for(n=0;t=_[n];n++)if(-1<e.indexOf(t))return S[t]+=e;return S[b]+=e}),C.generateOnDemand||p.forEach(t.THEMES,function(e){c[e.name]||"default"!==t.defaultTheme()&&"default"===e.name||T(e,e.name,C.nonce)})}}function T(i,e,a){var o=document.head,s=o?o.firstElementChild:null;c[e]||(_.forEach(function(e){for(var t=A(i,e,S[e]);t.length;){var n=t.shift();if(n){var r=document.createElement("style");r.setAttribute("md-theme-style",""),a&&r.setAttribute("nonce",a),r.appendChild(document.createTextNode(n)),o.insertBefore(r,s)}}}),c[i.name]=!0)}function x(e){if(p.isArray(e)&&3==e.length)return e;if(/^rgb/.test(e))return e.replace(/(^\s*rgba?\(|\)\s*$)/g,"").split(",").map(function(e,t){return 3==t?parseFloat(e,10):parseInt(e,10)});if("#"==e.charAt(0)&&(e=e.substring(1)),/^([a-fA-F0-9]{3}){1,2}$/g.test(e)){var t=e.length/3,n=e.substr(0,t),r=e.substr(t,t),i=e.substr(2*t);return 1===t&&(n+=n,r+=r,i+=i),[parseInt(n,16),parseInt(r,16),parseInt(i,16)]}}function k(e,t){return e?(4==e.length&&(e=p.copy(e),t?e.pop():t=e.pop()),t&&("number"==typeof t||"string"==typeof t&&t.length)?"rgba("+e.join(",")+","+t+")":"rgb("+e.join(",")+")"):"rgb('0,0,0')"}}(G.angular),ie.module("material.core").factory("$$mdAnimate",["$q","$timeout","$mdConstant","$animateCss",function(n,i,o,s){return function(e){return r=e,t=n,c=i,l=o,a=s,u={translate3d:function(t,n,e,r){return a(t,{from:n,to:e,addClass:r.transitionInClass,removeClass:r.transitionOutClass}).start().then(function(){return i});function i(e){return a(t,{to:e||n,addClass:r.transitionOutClass,removeClass:r.transitionInClass}).start()}},waitTransitionEnd:function(a,o){var s=3e3;return t(function(t,e){var n;("0s"==(n=(n=(o=o||{}).cachedTransitionStyles)||G.getComputedStyle(a[0])).transitionDuration||!n.transition&&!n.transitionProperty)&&(s=0);var r=c(i,o.timeout||s);function i(e){e&&e.target!==a[0]||(e&&c.cancel(r),a.off(l.CSS.TRANSITIONEND,i),t())}a.on(l.CSS.TRANSITIONEND,i)})},calculateTransformValues:function(e,t){var n,r,i=t.element,a=t.bounds;if(i||a){var o=i?u.clientRect(i)||(n=e?e.parent():null,(r=n?n.parent():null)?u.clientRect(r):null):u.copyRect(a),s=u.copyRect(e[0].getBoundingClientRect()),c=u.centerPointFor(s),l=u.centerPointFor(o);return{centerX:l.x-c.x,centerY:l.y-c.y,scaleX:Math.round(100*Math.min(.5,o.width/s.width))/100,scaleY:Math.round(100*Math.min(.5,o.height/s.height))/100}}return{centerX:0,centerY:0,scaleX:.5,scaleY:.5}},calculateZoomToOrigin:function(e,t){var n=ie.bind(null,r.supplant,"translate3d( {centerX}px, {centerY}px, 0 ) scale( {scaleX}, {scaleY} )");return n(u.calculateTransformValues(e,t))},calculateSlideToOrigin:function(e,t){var n=ie.bind(null,r.supplant,"translate3d( {centerX}px, {centerY}px, 0 )");return n(u.calculateTransformValues(e,t))},toCss:function(e){var r={};return ie.forEach(e,function(e,t){if(!ie.isUndefined(e))if(0<="left top right bottom width height x y min-width min-height max-width max-height".indexOf(t))r[t]=e+"px";else switch(t){case"transition":n(t,l.CSS.TRANSITION,e);break;case"transform":n(t,l.CSS.TRANSFORM,e);break;case"transformOrigin":n(t,l.CSS.TRANSFORM_ORIGIN,e);break;case"font-size":r["font-size"]=e}}),r;function n(e,t,n){ie.forEach(t.split(" "),function(e){r[e]=n})}},toTransformCss:function(t,e,n){var r={};return ie.forEach(l.CSS.TRANSFORM.split(" "),function(e){r[e]=t}),e&&(n=n||"all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1) !important",r.transition=n),r},copyRect:function(t,n){return t?(n=n||{},ie.forEach("left top right bottom width height".split(" "),function(e){n[e]=Math.round(t[e])}),n.width=n.width||n.right-n.left,n.height=n.height||n.bottom-n.top,n):null},clientRect:function(e){var t,n=ie.element(e)[0].getBoundingClientRect();return(t=n)&&0<t.width&&0<t.height?u.copyRect(n):null},centerPointFor:function(e){return e?{x:Math.round(e.left+e.width/2),y:Math.round(e.top+e.height/2)}:{x:0,y:0}}};var r,t,c,l,a,u}}]),4<=ie.version.minor?ie.module("material.core.animate",[]):function(){var T=ie.forEach,x=ie.isDefined(document.documentElement.style.WebkitAppearance),k=x?"-webkit-":"",E=(x?"webkitTransitionEnd ":"")+"transitionend",D=(x?"webkitAnimationEnd ":"")+"animationend",e=["$q","$$rAFMutex",function(t,n){function e(e){this.setHost(e),this._doneCallbacks=[],this._runInAnimationFrame=n(),this._state=0}return e.prototype={setHost:function(e){this.host=e||{}},done:function(e){2===this._state?e():this._doneCallbacks.push(e)},progress:ie.noop,getPromise:function(){if(!this.promise){var e=this;this.promise=t(function(t,n){e.done(function(e){!1===e?n():t()})})}return this.promise},then:function(e,t){return this.getPromise().then(e,t)},catch:function(e){return this.getPromise().catch(e)},finally:function(e){return this.getPromise().finally(e)},pause:function(){this.host.pause&&this.host.pause()},resume:function(){this.host.resume&&this.host.resume()},end:function(){this.host.end&&this.host.end(),this._resolve(!0)},cancel:function(){this.host.cancel&&this.host.cancel(),this._resolve(!1)},complete:function(e){var t=this;0===t._state&&(t._state=1,t._runInAnimationFrame(function(){t._resolve(e)}))},_resolve:function(t){2!==this._state&&(T(this._doneCallbacks,function(e){e(t)}),this._doneCallbacks.length=0,this._state=2)}},e.all=function(t,n){var r=0,i=!0;function a(e){i=i&&e,++r===t.length&&n(i)}T(t,function(e){e.done(a)})},e}];function I(e){return e.replace(/-[a-z]/g,function(e){return e.charAt(1).toUpperCase()})}ie.module("material.core.animate",[]).factory("$$forceReflow",["$document",function(e){return function(){return e[0].body.clientWidth+1}}]).factory("$$AnimateRunner",e).factory("$$rAFMutex",["$$rAF",function(n){return function(){var t=!1;return n(function(){t=!0}),function(e){t?e():n(e)}}}]).factory("$animateCss",["$window","$$rAF","$$AnimateRunner","$$forceReflow","$$jqLite","$timeout","$animate",function(p,a,o,m,n,g,s){function _(e,t){t.addClass&&(n.addClass(e,t.addClass),t.addClass=null),t.removeClass&&(n.removeClass(e,t.removeClass),t.removeClass=null)}function b(e){var t=0,n=(e||"").split(/\s*,\s*/);return T(n,function(e){"s"==e.charAt(e.length-1)&&(e=e.substring(0,e.length-1)),e=parseFloat(e)||0,t=t?Math.max(e,t):e}),t}var v,y=[];function w(e,t){t.from&&(e.css(t.from),t.from=null)}function C(e,t){t.to&&(e.css(t.to),t.to=null)}function A(e){for(var t=0;t<e.length;t++)if(1===e[t].nodeType)return e[t]}function S(e,t){var n=A(e),r=I(k+"transition-delay");n.style[r]=t?"-9999s":""}return function(r,c){var l=[],u=A(r),e=u&&s.enabled(),t=!1,n=!1;e&&(c.transitionStyle&&l.push([k+"transition",c.transitionStyle]),c.keyframeStyle&&l.push([k+"animation",c.keyframeStyle]),c.delay&&l.push([k+"transition-delay",c.delay+"s"]),c.duration&&l.push([k+"transition-duration",c.duration+"s"]),t=c.keyframeStyle||c.to&&(0<c.duration||c.transitionStyle),n=!!c.addClass||!!c.removeClass,S(r,!0));var f=e&&(t||n);w(r,c);var d,h,i=!1;return{close:p.close,start:function(){var e,n=new o;return e=function(){if(S(r,!1),!f)return s();T(l,function(e){var t=e[0],n=e[1];u.style[I(t)]=n}),_(r,c);var e=function(e){var t=A(e),n=p.getComputedStyle(t),r=b(n[l("transitionDuration")]),i=b(n[l("animationDuration")]),a=b(n[l("transitionDelay")]),o=b(n[l("animationDelay")]);i*=parseInt(n[l("animationIterationCount")],10)||1;var s=Math.max(i,r),c=Math.max(o,a);return{duration:s,delay:c,animationDuration:i,transitionDuration:r,animationDelay:o,transitionDelay:a};function l(e){return x?"Webkit"+e.charAt(0).toUpperCase()+e.substr(1):e}}(r);if(0===e.duration)return s();var t=[];c.easing&&(e.transitionDuration&&t.push([k+"transition-timing-function",c.easing]),e.animationDuration&&t.push([k+"animation-timing-function",c.easing])),c.delay&&e.animationDelay&&t.push([k+"animation-delay",c.delay+"s"]),c.duration&&e.animationDuration&&t.push([k+"animation-duration",c.duration+"s"]),T(t,function(e){var t=e[0],n=e[1];u.style[I(t)]=n,l.push(e)});var i=1e3*e.delay,a=e.duration,n=1e3*a,o=Date.now();d=[],e.transitionDuration&&d.push(E),e.animationDuration&&d.push(D),d=d.join(" "),h=function(e){e.stopPropagation();var t=e.originalEvent||e,n=t.timeStamp||Date.now(),r=parseFloat(t.elapsedTime.toFixed(3));Math.max(n-o,0)>=i&&a<=r&&s()},r.on(d,h),C(r,c),g(s,i+1.5*n,!1)},v&&v(),y.push(e),v=a(function(){v=null;for(var e=m(),t=0;t<y.length;t++)y[t](e);y.length=0}),n;function s(){var e,t;if(!i)return i=!0,d&&h&&r.off(d,h),_(r,c),w(e=r,t=c),C(e,t),T(l,function(e){u.style[I(e[0])]=""}),n.complete(!0),n}}}}}])}(),ie.module("material.components.autocomplete",["material.core","material.components.icon","material.components.virtualRepeat"]),ie.module("material.components.backdrop",["material.core"]).directive("mdBackdrop",["$mdTheming","$mdUtil","$animate","$rootElement","$window","$log","$$rAF","$document",function(s,c,t,n,l,u,f,d){return{restrict:"E",link:function(r,i,e){var a;function o(){var e=parseInt(a.height,10)+Math.abs(parseInt(a.top,10));i.css("height",e+"px")}t.pin&&t.pin(i,n),f(function(){if("fixed"===(a=l.getComputedStyle(d[0].body)).position){var e=c.debounce(function(){a=l.getComputedStyle(d[0].body),o()},60,null,!1);o(),ie.element(l).on("resize",e),r.$on("$destroy",function(){ie.element(l).off("resize",e)})}var t=i.parent();if(t.length){"BODY"===t[0].nodeName&&i.css("position","fixed");var n=l.getComputedStyle(t[0]);"static"===n.position&&u.warn("<md-backdrop> may not work properly in a scrolled, static-positioned parent container."),s.inherit(i,t)}})}}}]),function(){function e(n){return{restrict:"E",link:function(e,t){t.addClass("_md"),e.$on("$destroy",function(){n.destroy()})}}}function t(e){t.$inject=["$animate","$mdConstant","$mdUtil","$mdTheming","$mdBottomSheet","$rootElement","$mdGesture","$log"];var m=.5,g=80;return e("$mdBottomSheet").setDefaults({methods:["disableParentScroll","escapeToClose","clickOutsideToClose"],options:t});function t(a,o,s,c,l,u,f,d){var h;return{themable:!0,onShow:function(e,t,n,r){if((t=s.extractElementByName(t,"md-bottom-sheet")).attr("tabindex","-1"),t.hasClass("ng-cloak")){d.warn("$mdBottomSheet: using `<md-bottom-sheet ng-cloak >` will affect the bottom-sheet opening animations.",t[0])}n.disableBackdrop||((h=s.createBackdrop(e,"md-bottom-sheet-backdrop md-opaque"))[0].tabIndex=-1,n.clickOutsideToClose&&h.on("click",function(){s.nextTick(l.cancel,!0)}),c.inherit(h,n.parent),a.enter(h,n.parent,null));var i=new p(t,n.parent);n.bottomSheet=i,c.inherit(i.element,n.parent),n.disableParentScroll&&(n.restoreScroll=s.disableScrollAround(i.element,n.parent));return a.enter(i.element,n.parent,h).then(function(){var e=s.findFocusTarget(t)||ie.element(t[0].querySelector("button")||t[0].querySelector("a")||t[0].querySelector(s.prefixer("ng-click",!0)))||h;n.escapeToClose&&(n.rootElementKeyupCallback=function(e){e.keyCode===o.KEY_CODE.ESCAPE&&s.nextTick(l.cancel,!0)},u.on("keyup",n.rootElementKeyupCallback),e&&e.focus())})},onRemove:function(e,t,n){var r=n.bottomSheet;n.disableBackdrop||a.leave(h);return a.leave(r.element).then(function(){n.disableParentScroll&&(n.restoreScroll(),delete n.restoreScroll),r.cleanup()})},disableBackdrop:!1,escapeToClose:!0,clickOutsideToClose:!0,disableParentScroll:!0};function p(r,e){var t=f.register(e,"drag",{horizontal:!1});return e.on("$md.dragstart",n).on("$md.drag",i).on("$md.dragend",a),{element:r,cleanup:function(){t(),e.off("$md.dragstart",n),e.off("$md.drag",i),e.off("$md.dragend",a)}};function n(e){r.css(o.CSS.TRANSITION_DURATION,"0ms")}function i(e){var t=e.pointer.distanceY;t<5&&(t=Math.max(-g,t/2)),r.css(o.CSS.TRANSFORM,"translate3d(0,"+(g+t)+"px,0)")}function a(e){if(0<e.pointer.distanceY&&(20<e.pointer.distanceY||Math.abs(e.pointer.velocityY)>m)){var t=r.prop("offsetHeight")-e.pointer.distanceY,n=Math.min(t/e.pointer.velocityY*.75,500);r.css(o.CSS.TRANSITION_DURATION,n+"ms"),s.nextTick(l.cancel,!0)}else r.css(o.CSS.TRANSITION_DURATION,""),r.css(o.CSS.TRANSFORM,"")}}}}e.$inject=["$mdBottomSheet"],t.$inject=["$$interimElementProvider"],ie.module("material.components.bottomSheet",["material.core","material.components.backdrop"]).directive("mdBottomSheet",e).provider("$mdBottomSheet",t)}(),function(){function e(n){return{restrict:"E",link:function(e,t){n(t)}}}function t(r,i,a,o){return{restrict:"EA",replace:!0,transclude:!0,template:function(e,t){{if(s(t))return'<a class="md-button" ng-transclude></a>';var n=void 0===t.type?"button":t.type;return'<button class="md-button" type="'+n+'" ng-transclude></button>'}},link:function(e,t,n){i(t),r.attach(e,t),a.expectWithoutText(t,"aria-label"),s(n)&&ie.isDefined(n.ngDisabled)&&e.$watch(n.ngDisabled,function(e){t.attr("tabindex",e?-1:0)});t.on("click",function(e){!0===n.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}),t.hasClass("md-no-focus")||(e.mouseActive=!1,t.on("mousedown",function(){e.mouseActive=!0,o(function(){e.mouseActive=!1},100)}).on("focus",function(){!1===e.mouseActive&&t.addClass("md-focused")}).on("blur",function(e){t.removeClass("md-focused")}))}};function s(e){return ie.isDefined(e.href)||ie.isDefined(e.ngHref)||ie.isDefined(e.ngLink)||ie.isDefined(e.uiSref)}}t.$inject=["$mdButtonInkRipple","$mdTheming","$mdAria","$timeout"],e.$inject=["$mdTheming"],ie.module("material.components.button",["material.core"]).directive("mdButton",t).directive("a",e)}(),function(){function e(r){return{restrict:"E",link:function(e,t,n){t.addClass("_md"),r(t)}}}e.$inject=["$mdTheming"],ie.module("material.components.card",["material.core"]).directive("mdCard",e)}(),ie.module("material.components.chips",["material.core","material.components.autocomplete"]),function(){function e(u,f,d,h,p,m){return u=u[0],{restrict:"E",transclude:!0,require:"?ngModel",priority:210,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-icon"></div></div><div ng-transclude class="md-label"></div>',compile:function(e,t){return t.$set("tabindex",t.tabindex||"0"),t.$set("type","checkbox"),t.$set("role",t.type),{pre:function(e,t){t.on("click",function(e){this.hasAttribute("disabled")&&e.stopImmediatePropagation()})},post:function(e,n,r,i){var t,a,o,s;function c(t){n[0].hasAttribute("disabled")||e.skipToggle||e.$apply(function(){var e=r.ngChecked?r.checked:!i.$viewValue;i.$setViewValue(e,t&&t.type),i.$render()})}function l(e){(t=!1!==e)&&n.attr("aria-checked","mixed"),n.toggleClass("md-indeterminate",t)}i=i||p.fakeNgModel(),h(n),n.children().on("focus",function(){n.focus()}),p.parseAttributeBoolean(r.mdIndeterminate)&&(l(),e.$watch(r.mdIndeterminate,l)),r.ngChecked&&e.$watch(e.$eval.bind(e,r.ngChecked),function(e){i.$setViewValue(e),i.$render()}),a="ngDisabled",o="tabindex",s={true:"-1",false:r.tabindex},r[a]&&e.$watch(r[a],function(e){s[e]&&n.attr(o,s[e])}),f.expectWithText(n,"aria-label"),u.link.pre(e,{on:ie.noop,0:{}},r,[i]),e.mouseActive=!1,n.on("click",c).on("keypress",function(e){var t=e.which||e.keyCode;t!==d.KEY_CODE.SPACE&&t!==d.KEY_CODE.ENTER||(e.preventDefault(),n.addClass("md-focused"),c(e))}).on("mousedown",function(){e.mouseActive=!0,m(function(){e.mouseActive=!1},100)}).on("focus",function(){!1===e.mouseActive&&n.addClass("md-focused")}).on("blur",function(){n.removeClass("md-focused")}),i.$render=function(){n.toggleClass("md-checked",!!i.$viewValue&&!t)}}}}}}e.$inject=["inputDirective","$mdAria","$mdConstant","$mdTheming","$mdUtil","$timeout"],ie.module("material.components.checkbox",["material.core"]).directive("mdCheckbox",e)}(),function(){t.$inject=["$mdColors","$mdUtil","$log","$parse"],e.$inject=["$mdTheming","$mdUtil","$log"];var o=/^{((\s|,)*?["'a-zA-Z-]+?\s*?:\s*?('|")[a-zA-Z0-9-.]*('|"))+\s*}$/,l=null;function e(a,o,r){return l=l||Object.keys(a.PALETTES),{applyThemeColors:function(e,t){try{t&&e.css((i={},a=(n=t).hasOwnProperty("color"),ie.forEach(n,function(e,t){var n=c(e),r=-1<t.indexOf("background");i[t]=s(n),r&&!a&&(i.color=s(n,!0))}),i))}catch(e){r.error(e.message)}var n,i,a},getThemeColor:function(e){return s(c(e))},hasTheme:function(e){return ie.isDefined(a.THEMES[e.split("-")[0]])}};function s(e,t){t=t||!1;var n=a.PALETTES[e.palette][e.hue];return n=t?n.contrast:n.value,o.supplant("rgba({0}, {1}, {2}, {3})",[n[0],n[1],n[2],n[3]||e.opacity])}function c(e){var t=e.split("-"),n=ie.isDefined(a.THEMES[t[0]])?t.splice(0,1)[0]:a.defaultTheme();return{theme:n,palette:function(e,t){var n=1<e.length&&-1!==l.indexOf(e[1]),r=e[0].replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();if(n&&(r=e[0]+"-"+e.splice(1,1)),-1===l.indexOf(r)){var i=a.THEMES[t].colors[r];if(!i)throw new Error(o.supplant("mdColors: couldn't find '{palette}' in the palettes.",{palette:r}));r=i.name}return r}(t,n),hue:function(e,t){var n=a.THEMES[t].colors;if("hue"!==e[1])return e[1]||n[e[0]in n?e[0]:"primary"].hues.default;var r=parseInt(e.splice(2,1)[0],10);if(r<1||3<r)throw new Error(o.supplant("mdColors: 'hue-{hueNumber}' is not a valid hue, can be only 'hue-1', 'hue-2' and 'hue-3'",{hueNumber:r}));if(e[1]="hue-"+r,e[0]in n)return n[e[0]].hues[e[1]];throw new Error(o.supplant("mdColors: 'hue-x' can only be used with [{availableThemes}], but was used with '{usedTheme}'",{availableThemes:Object.keys(n).join(", "),usedTheme:e[0]}))}(t,n),opacity:t[2]||1}}}function t(u,a,f,d){return{restrict:"A",require:["^?mdTheme"],compile:function(e,i){var l=function(){var e=i.mdColors,t=-1<e.indexOf("::"),n=!!t||o.test(i.mdColors);i.mdColors=e.replace("::","");var r=ie.isDefined(i.mdColorsWatch);return!t&&!n&&(!r||a.parseAttributeBoolean(i.mdColorsWatch))}();return function(e,n,t,r){var i=r[0],a={},o=function(n){"string"!=typeof n&&(n=""),t.mdColors||(t.mdColors="{}");var r=d(t.mdColors)(e);return i&&Object.keys(r).forEach(function(e){var t=r[e];u.hasTheme(t)||(r[e]=(n||i.$mdTheme)+"-"+t)}),s(r),r},s=function(e){if(!ie.equals(e,a)){var t=Object.keys(a);a.background&&!t.color&&t.push("color"),t.forEach(function(e){n.css(e,"")})}a=e},c=ie.noop;i&&(c=i.registerChanges(function(e){u.applyThemeColors(n,o(e))})),e.$on("$destroy",function(){c()});try{l?e.$watch(o,ie.bind(this,u.applyThemeColors,n),!0):u.applyThemeColors(n,o())}catch(e){f.error(e.message)}}}}}ie.module("material.components.colors",["material.core"]).directive("mdColors",t).service("$mdColors",e)}(),function(){function e(r){return{restrict:"E",controller:["$scope","$element",function(e,t){this.$scope=e,this.$element=t}],link:function(e,t){var n;t.addClass("_md"),r(t),e.$broadcast("$mdContentLoaded",t),n=t[0],ie.element(n).on("$md.pressdown",function(e){"t"===e.pointer.type&&(e.$materialScrollFixed||(e.$materialScrollFixed=!0,0===n.scrollTop?n.scrollTop=1:n.scrollHeight===n.scrollTop+n.offsetHeight&&(n.scrollTop-=1)))})}}}e.$inject=["$mdTheming"],ie.module("material.components.content",["material.core"]).directive("mdContent",e)}(),ie.module("material.components.datepicker",["material.core","material.components.icon","material.components.virtualRepeat"]),function(){function e(e,t,a){return{restrict:"E",link:function(r,i){i.addClass("_md"),t(i),e(function(){var e,t=i[0].querySelector("md-dialog-content");function n(){i.toggleClass("md-content-overflow",t.scrollHeight>t.clientHeight)}t&&(e=t.getElementsByTagName("img"),n(),ie.element(e).on("load",n)),r.$on("$destroy",function(){a.destroy(i)})})}}}function t(e){var v,y;return t.$inject=["$mdDialog","$mdConstant"],n.$inject=["$mdDialog","$mdAria","$mdUtil","$mdConstant","$animate","$document","$window","$rootElement","$log","$injector","$mdTheming"],e("$mdDialog").setDefaults({methods:["disableParentScroll","hasBackdrop","clickOutsideToClose","escapeToClose","targetEvent","closeTo","openFrom","parent","fullscreen","contentElement"],options:n}).addPreset("alert",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","theme","css"],options:t}).addPreset("confirm",{methods:["title","htmlContent","textContent","content","ariaLabel","ok","cancel","theme","css"],options:t}).addPreset("prompt",{methods:["title","htmlContent","textContent","initialValue","content","placeholder","ariaLabel","ok","cancel","theme","css"],options:t});function t(t,n){return{template:['<md-dialog md-theme="{{ dialog.theme }}" aria-label="{{ dialog.ariaLabel }}" ng-class="dialog.css">','  <md-dialog-content class="md-dialog-content" role="document" tabIndex="-1">','    <h2 class="md-title">{{ dialog.title }}</h2>','    <div ng-if="::dialog.mdHtmlContent" class="md-dialog-content-body" ','        ng-bind-html="::dialog.mdHtmlContent"></div>','    <div ng-if="::!dialog.mdHtmlContent" class="md-dialog-content-body">',"      <p>{{::dialog.mdTextContent}}</p>","    </div>",'    <md-input-container md-no-float ng-if="::dialog.$type == \'prompt\'" class="md-prompt-input-container">','      <input ng-keypress="dialog.keypress($event)" md-autofocus ng-model="dialog.result"              placeholder="{{::dialog.placeholder}}">',"    </md-input-container>","  </md-dialog-content>","  <md-dialog-actions>",'    <md-button ng-if="dialog.$type === \'confirm\' || dialog.$type === \'prompt\'"               ng-click="dialog.abort()" class="md-primary md-cancel-button">',"      {{ dialog.cancel }}","    </md-button>",'    <md-button ng-click="dialog.hide()" class="md-primary md-confirm-button" md-autofocus="dialog.$type===\'alert\'">',"      {{ dialog.ok }}","    </md-button>","  </md-dialog-actions>","</md-dialog>"].join("").replace(/\s\s+/g,""),controller:function(){var e="prompt"==this.$type;e&&this.initialValue&&(this.result=this.initialValue),this.hide=function(){t.hide(!e||this.result)},this.abort=function(){t.cancel()},this.keypress=function(e){e.keyCode===n.KEY_CODE.ENTER&&t.hide(this.result)}},controllerAs:"dialog",bindToController:!0}}function n(d,c,h,p,l,u,m,f,g,i,n){return{hasBackdrop:!0,isolateScope:!0,onCompiling:function(e){(function(e){if(!e.theme&&(e.theme=n.defaultTheme(),e.targetEvent&&e.targetEvent.target)){var t=ie.element(e.targetEvent.target);e.theme=(t.controller("mdTheme")||{}).$mdTheme||e.theme}})(e),e.contentElement&&(e.restoreContentElement=function(e){var t=e.contentElement,n=null;n=ie.isString(t)?(t=document.querySelector(t),r(t)):(t=t[0]||t,document.contains(t)?r(t):function(){t.parentNode.removeChild(t)});return e.element=ie.element(t),e.skipCompile=!0,n;function r(e){var t=e.parentNode,n=e.nextElementSibling;return function(){n?t.insertBefore(e,n):t.appendChild(e)}}}(e))},onShow:function(e,n,t,r){ie.element(u[0].body).addClass("md-dialog-is-showing");var i=n.find("md-dialog");if(i.hasClass("ng-cloak")){g.warn("$mdDialog: using `<md-dialog ng-cloak >` will affect the dialog opening animations.",n[0])}return function(e){function t(e,t){var n=ie.element(e||{});if(n&&n.length){var r=ie.isFunction(n[0].getBoundingClientRect);return ie.extend(t||{},{element:r?n:ae,bounds:r?n[0].getBoundingClientRect():ie.extend({},{top:0,left:0,height:0,width:0},n[0]),focus:ie.bind(n,n.focus)})}}function n(e,t){return ie.isString(e)&&(e=u[0].querySelector(e)),ie.element(e||t)}e.origin=ie.extend({element:null,bounds:null,focus:ie.noop},e.origin||{}),e.parent=n(e.parent,f),e.closeTo=t(n(e.closeTo)),e.openFrom=t(n(e.openFrom)),e.targetEvent&&(e.origin=t(e.targetEvent.target,e.origin))}(t),function(e,t){var n="alert"===t.$type?"alertdialog":"dialog",r=e.find("md-dialog-content"),i=e.attr("id"),a="dialogContent_"+(i||h.nextUid());e.attr({role:n,tabIndex:"-1"}),0===r.length&&(r=e,i&&(a=i)),r.attr("id",a),e.attr("aria-describedby",a),t.ariaLabel?c.expect(e,"aria-label",t.ariaLabel):c.expectAsync(e,"aria-label",function(){var e=r.text().split(/\s+/);return 3<e.length&&(e=e.slice(0,3).concat("...")),e.join(" ")}),(v=document.createElement("div")).classList.add("md-dialog-focus-trap"),v.tabIndex=0,y=v.cloneNode(!1);var o=function(){e.focus()};v.addEventListener("focus",o),y.addEventListener("focus",o),e[0].parentNode.insertBefore(v,e[0]),e.after(y)}(i,t),a=e,o=n,s=t,s.disableParentScroll&&(s.restoreScroll=h.disableScrollAround(o,s.parent)),s.hasBackdrop&&(s.backdrop=h.createBackdrop(a,"md-dialog-backdrop md-opaque"),l.enter(s.backdrop,s.parent)),s.hideBackdrop=function(e){s.backdrop&&(e?s.backdrop.remove():l.leave(s.backdrop)),s.disableParentScroll&&(s.restoreScroll(),delete s.restoreScroll),s.hideBackdrop=null},function(e,t){var n=ie.element(m),r=h.debounce(function(){_(e,t)},60),i=[],a=function(){var e="alert"==t.$type?d.hide:d.cancel;h.nextTick(e,!0)};if(t.escapeToClose){var o=t.parent,s=function(e){e.keyCode===p.KEY_CODE.ESCAPE&&(e.stopPropagation(),e.preventDefault(),a())};e.on("keydown",s),o.on("keydown",s),i.push(function(){e.off("keydown",s),o.off("keydown",s)})}if(n.on("resize",r),i.push(function(){n.off("resize",r)}),t.clickOutsideToClose){var c,l=e,u=function(e){c=e.target},f=function(e){c===l[0]&&e.target===l[0]&&(e.stopPropagation(),e.preventDefault(),a())};l.on("mousedown",u),l.on("mouseup",f),i.push(function(){l.off("mousedown",u),l.off("mouseup",f)})}t.deactivateListeners=function(){i.forEach(function(e){e()}),t.deactivateListeners=null}}(n,t),function(e,t){t.parent.append(e),t.reverseContainerStretch=_(e,t);var n=e.find("md-dialog"),r=h.dom.animator,i=r.calculateZoomToOrigin,a={transitionInClass:"md-transition-in",transitionOutClass:"md-transition-out"},o=r.toTransformCss(i(n,t.openFrom||t.origin)),s=r.toTransformCss("");return n.toggleClass("md-dialog-fullscreen",!!t.fullscreen),r.translate3d(n,o,s,a).then(function(e){return t.reverseAnimate=function(){return delete t.reverseAnimate,t.closeTo?(a={transitionInClass:"md-transition-out",transitionOutClass:"md-transition-in"},o=s,s=r.toTransformCss(i(n,t.closeTo)),r.translate3d(n,o,s,a)):e(s=r.toTransformCss(i(n,t.origin)))},t.clearAnimate=function(){return delete t.clearAnimate,n.removeClass([a.transitionOutClass,a.transitionInClass].join(" ")),r.translate3d(n,s,r.toTransformCss(""),{})},!0})}(n,t).then(function(){!function(e,t){var r=!0;function i(e){for(;e.parentNode;){if(e===document.body)return;for(var t=e.parentNode.children,n=0;n<t.length;n++)e===t[n]||b(t[n],["SCRIPT","STYLE"])||t[n].setAttribute("aria-hidden",r);i(e=e.parentNode)}}i(e[0]),t.unlockScreenReader=function(){r=!1,i(e[0]),t.unlockScreenReader=null}}(n,t),n[0].querySelector(".md-actions")&&g.warn("Using a class of md-actions is deprecated, please use <md-dialog-actions>."),function(){if(t.focusOnOpen){var e=h.findFocusTarget(n)||function(){var e=n[0].querySelector(".dialog-close");if(!e){var t=n[0].querySelectorAll(".md-actions button, md-dialog-actions button");e=t[t.length-1]}return e}()||i;e.focus()}}()});var a,o,s},onShowing:function(e,t,n,r){if(r){if(r.mdHtmlContent=r.htmlContent||n.htmlContent||"",r.mdTextContent=r.textContent||n.textContent||r.content||n.content||"",r.mdHtmlContent&&!i.has("$sanitize"))throw Error("The ngSanitize module must be loaded in order to use htmlContent.");if(r.mdHtmlContent&&r.mdTextContent)throw Error("md-dialog cannot have both `htmlContent` and `textContent`")}},onRemove:function(e,t,n){n.deactivateListeners(),n.unlockScreenReader(),n.hideBackdrop(n.$destroy),v&&v.parentNode&&v.parentNode.removeChild(v);y&&y.parentNode&&y.parentNode.removeChild(y);return n.$destroy?i():(r=n,r.reverseAnimate().then(function(){r.contentElement&&r.clearAnimate()})).then(i);var r;function i(){ie.element(u[0].body).removeClass("md-dialog-is-showing"),n.contentElement?(n.reverseContainerStretch(),n.restoreContentElement()):t.remove(),n.$destroy||n.origin.focus()}},clickOutsideToClose:!1,escapeToClose:!0,targetEvent:null,contentElement:null,closeTo:null,openFrom:null,focusOnOpen:!0,disableParentScroll:!0,autoWrap:!0,fullscreen:!1,transformTemplate:function(e,t){return'<div class="md-dialog-container" tabindex="-1">'+(n=e,t.autoWrap&&!/<\/md-dialog>/g.test(n)?"<md-dialog>"+(n||"")+"</md-dialog>":n||"")+"</div>";var n}};function _(e,t){var n="fixed"==m.getComputedStyle(u[0].body).position,r=t.backdrop?m.getComputedStyle(t.backdrop[0]):null,i=r?Math.min(u[0].body.clientHeight,Math.ceil(Math.abs(parseInt(r.height,10)))):0,a={top:e.css("top"),height:e.css("height")};return e.css({top:(n?h.scrollTop(t.parent):0)+"px",height:i?i+"px":"100%"}),function(){e.css(a)}}function b(e,t){if(-1!==t.indexOf(e.nodeName))return!0}}}e.$inject=["$$rAF","$mdTheming","$mdDialog"],t.$inject=["$$interimElementProvider"],ie.module("material.components.dialog",["material.core","material.components.backdrop"]).directive("mdDialog",e).provider("$mdDialog",t)}(),function(){function e(e){return{restrict:"E",link:e}}e.$inject=["$mdTheming"],ie.module("material.components.divider",["material.core"]).directive("mdDivider",e)}(),function(){function e(r){return{restrict:"E",require:["^?mdFabSpeedDial","^?mdFabToolbar"],compile:function(e,t){var n=e.children();r.prefixer().hasAttribute(n,"ng-repeat")?n.addClass("md-fab-action-item"):n.wrap('<div class="md-fab-action-item">')}}}e.$inject=["$mdUtil"],ie.module("material.components.fabActions",["material.core"]).directive("mdFabActions",e)}(),function(){function e(e,r,i,a,o,s){var t,c,l,u=this;u.open=function(){e.$evalAsync("vm.isOpen = true")},u.close=function(){e.$evalAsync("vm.isOpen = false"),r.find("md-fab-trigger")[0].focus()},u.toggle=function(){e.$evalAsync("vm.isOpen = !vm.isOpen")},u.direction=u.direction||"down",u.isOpen=u.isOpen||!1,h(),r.addClass("md-animations-waiting"),t=["click","focusin","focusout"],ie.forEach(t,function(e){r.on(e,d)}),e.$on("$destroy",function(){ie.forEach(t,function(e){r.off(e,d)}),p()}),e.$watch("vm.direction",function(e,t){i.removeClass(r,"md-"+t),i.addClass(r,"md-"+e),h()}),e.$watch("vm.isOpen",function(e){h(),c&&l||(c=r.find("md-fab-trigger"),l=y()),e?(r.on("keydown",g),a.nextTick(function(){ie.element(document).on("click touchend",m)})):p();var t=e?"md-is-open":"",n=e?"":"md-is-open";c.attr("aria-haspopup",!0),c.attr("aria-expanded",e),l.attr("aria-hidden",!e),i.setClass(r,t,n)});var f,n=0;function d(e){var t,n,r;"click"==e.type&&(n=(t=e).target,a.getClosest(n,"md-fab-trigger")&&u.toggle(),r=t.target,a.getClosest(r,"md-fab-actions")&&u.close()),"focusout"!=e.type||f||(f=s(function(){u.close()},100,!1)),"focusin"==e.type&&f&&(s.cancel(f),f=null)}function h(){u.currentActionIndex=-1}function p(){r.off("keydown",g),ie.element(document).off("click touchend",m)}function m(e){if(e.target){var t=a.getClosest(e.target,"md-fab-trigger"),n=a.getClosest(e.target,"md-fab-actions");t||n||u.close()}}function g(e){switch(e.which){case o.KEY_CODE.ESCAPE:return u.close(),e.preventDefault(),!1;case o.KEY_CODE.LEFT_ARROW:return i=e,"left"===u.direction?b(i):_(i),!1;case o.KEY_CODE.UP_ARROW:return r=e,"down"===u.direction?_(r):b(r),!1;case o.KEY_CODE.RIGHT_ARROW:return n=e,"left"===u.direction?_(n):b(n),!1;case o.KEY_CODE.DOWN_ARROW:return t=e,"up"===u.direction?_(t):b(t),!1}var t,n,r,i}function _(e){v(e,-1)}function b(e){v(e,1)}function v(e,t){var n,r=(n=y()[0].querySelectorAll(".md-fab-action-item"),ie.forEach(n,function(e){ie.element(ie.element(e).children()[0]).attr("tabindex",-1)}),n);u.currentActionIndex=u.currentActionIndex+t,u.currentActionIndex=Math.min(r.length-1,u.currentActionIndex),u.currentActionIndex=Math.max(0,u.currentActionIndex);var i=ie.element(r[u.currentActionIndex]).children()[0];ie.element(i).attr("tabindex",0),i.focus(),e.preventDefault(),e.stopImmediatePropagation()}function y(){return r.find("md-fab-actions")}!function e(){0<r[0].scrollHeight?i.addClass(r,"_md-animations-ready").then(function(){r.removeClass("md-animations-waiting")}):n<10&&(s(e,100),n+=1)}()}e.$inject=["$scope","$element","$animate","$mdUtil","$mdConstant","$timeout"],ie.module("material.components.fabShared",["material.core"]).controller("MdFabController",e)}(),function(){e.$inject=["$timeout"],t.$inject=["$timeout"];var n=300;function e(t){function r(e){t(e,n,!1)}function i(e){if(!e.hasClass("md-animations-waiting")||e.hasClass("_md-animations-ready")){var t=e[0],c=e.controller("mdFabSpeedDial"),r=t.querySelectorAll(".md-fab-action-item"),l=t.querySelector("md-fab-trigger"),n=t.querySelector("._md-css-variables"),i=parseInt(G.getComputedStyle(n).zIndex);ie.forEach(r,function(e,t){var n=e.style;n.transform=n.webkitTransform="",n.transitionDelay="",n.opacity=1,n.zIndex=r.length-t+i}),l.style.zIndex=i+r.length+1,c.isOpen||ie.forEach(r,function(e,t){var n,r,i=e.style,a=(l.clientHeight-e.clientHeight)/2,o=(l.clientWidth-e.clientWidth)/2;switch(c.direction){case"up":n=e.scrollHeight*(t+1)+a,r="Y";break;case"down":n=-(e.scrollHeight*(t+1)+a),r="Y";break;case"left":n=e.scrollWidth*(t+1)+o,r="X";break;case"right":n=-(e.scrollWidth*(t+1)+o),r="X"}var s="translate"+r+"("+n+"px)";i.transform=i.webkitTransform=s})}}return{addClass:function(e,t,n){e.hasClass("md-fling")?(i(e),r(n)):n()},removeClass:function(e,t,n){i(e),r(n)}}}function t(t){function r(e){t(e,n,!1)}function i(e){var t=e[0],i=e.controller("mdFabSpeedDial"),a=t.querySelectorAll(".md-fab-action-item"),n=t.querySelector("._md-css-variables"),o=parseInt(G.getComputedStyle(n).zIndex);ie.forEach(a,function(e,t){var n=e.style,r=65*t;n.opacity=i.isOpen?1:0,n.transform=n.webkitTransform=i.isOpen?"scale(1)":"scale(0)",n.transitionDelay=(i.isOpen?r:a.length-r)+"ms",n.zIndex=a.length-t+o})}return{addClass:function(e,t,n){i(e),r(n)},removeClass:function(e,t,n){i(e),r(n)}}}ie.module("material.components.fabSpeedDial",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabSpeedDial",function(){return{restrict:"E",scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:function(e,t){t.prepend('<div class="_md-css-variables"></div>')}}}).animation(".md-fling",e).animation(".md-scale",t).service("mdFabSpeedDialFlingAnimation",e).service("mdFabSpeedDialScaleAnimation",t)}(),function(){function e(){function r(e,t,n){if(t){var r=e[0],i=e.controller("mdFabToolbar"),a=r.querySelector(".md-fab-toolbar-background"),o=r.querySelector("md-fab-trigger button"),s=r.querySelector("md-toolbar"),c=r.querySelector("md-fab-trigger button md-icon"),l=e.find("md-fab-actions").children();if(o&&a){var u=G.getComputedStyle(o).getPropertyValue("background-color"),f=r.offsetWidth,d=(r.offsetHeight,f/o.offsetWidth*2);a.style.backgroundColor=u,a.style.borderRadius=f+"px",i.isOpen?(s.style.pointerEvents="inherit",a.style.width=o.offsetWidth+"px",a.style.height=o.offsetHeight+"px",a.style.transform="scale("+d+")",a.style.transitionDelay="0ms",c&&(c.style.transitionDelay=".3s"),ie.forEach(l,function(e,t){e.style.transitionDelay=25*(l.length-t)+"ms"})):(s.style.pointerEvents="none",a.style.transform="scale(1)",a.style.top="0",e.hasClass("md-right")&&(a.style.left="0",a.style.right=null),e.hasClass("md-left")&&(a.style.right="0",a.style.left=null),a.style.transitionDelay="200ms",c&&(c.style.transitionDelay="0ms"),ie.forEach(l,function(e,t){e.style.transitionDelay=200+25*t+"ms"}))}}}return{addClass:function(e,t,n){r(e,t),n()},removeClass:function(e,t,n){r(e,t),n()}}}ie.module("material.components.fabToolbar",["material.core","material.components.fabShared","material.components.fabActions"]).directive("mdFabToolbar",function(){return{restrict:"E",transclude:!0,template:'<div class="md-fab-toolbar-wrapper">  <div class="md-fab-toolbar-content" ng-transclude></div></div>',scope:{direction:"@?mdDirection",isOpen:"=?mdOpen"},bindToController:!0,controller:"MdFabController",controllerAs:"vm",link:function(e,t,n){t.addClass("md-fab-toolbar"),t.find("md-fab-trigger").find("button").prepend('<div class="md-fab-toolbar-background"></div>')}}}).animation(".md-fab-toolbar",e).service("mdFabToolbarAnimation",e)}(),function(){function e(h,_,b,v){return{restrict:"E",controller:t,scope:{mdOnLayout:"&"},link:function(a,o,s,t){o.addClass("_md"),o.attr("role","list"),t.layoutDelegate=function(e){var r=[].filter.call(o.children(),function(e){return"MD-GRID-TILE"==e.tagName&&!e.$$mdDestroyed}),i={tileSpans:(t=r,[].map.call(t,function(e){var t=ie.element(e).controller("mdGridTile");return{row:parseInt(v.getResponsiveAttribute(t.$attrs,"md-rowspan"),10)||1,col:parseInt(v.getResponsiveAttribute(t.$attrs,"md-colspan"),10)||1}})),colCount:function(){var e=parseInt(v.getResponsiveAttribute(s,"md-cols"),10);if(isNaN(e))throw"md-grid-list: md-cols attribute was not found, or contained a non-numeric value";return e}(),rowMode:f(),rowHeight:function(){var e=v.getResponsiveAttribute(s,"md-row-height");if(!e)throw"md-grid-list: md-row-height attribute was not found";switch(f()){case"fixed":return d(e);case"ratio":var t=e.split(":");return parseFloat(t[0])/parseFloat(t[1]);case"fit":return 0}}(),gutter:d(v.getResponsiveAttribute(s,"md-gutter")||1)};var t;if(!e&&ie.equals(i,c))return;var n=b(i.colCount,i.tileSpans,r).map(function(e,n){return{grid:{element:o,style:function(e,t,n,r,i){var a={};switch(r){case"fixed":a.height=g({unit:i,span:t,gutter:n}),a.paddingBottom="";break;case"ratio":var o=1===e?0:(e-1)/e,s=1/e*100,c=s*(1/i),l=p({share:c,gutterShare:o,gutter:n});a.height="",a.paddingBottom=g({unit:l,span:t,gutter:n})}return a}(i.colCount,n,i.gutter,i.rowMode,i.rowHeight)},tiles:e.map(function(e,t){return{element:ie.element(r[t]),style:function(e,t,n,r,i,a,o){var s=1/n*100,c=(n-1)/n,l=p({share:s,gutterShare:c,gutter:i}),u={left:m({unit:l,offset:e.col,gutter:i}),width:g({unit:l,span:t.col,gutter:i}),paddingTop:"",marginTop:"",top:"",height:""};switch(a){case"fixed":u.top=m({unit:o,offset:e.row,gutter:i}),u.height=g({unit:o,span:t.row,gutter:i});break;case"ratio":var f=s/o,d=p({share:f,gutterShare:c,gutter:i});u.paddingTop=g({unit:d,span:t.row,gutter:i}),u.marginTop=m({unit:d,offset:e.row,gutter:i});break;case"fit":var h=(r-1)/r,f=1/r*100,d=p({share:f,gutterShare:h,gutter:i});u.top=m({unit:d,offset:e.row,gutter:i}),u.height=g({unit:d,span:t.row,gutter:i})}return u}(e.position,e.spans,i.colCount,n,i.gutter,i.rowMode,i.rowHeight)}})}}).reflow().performance();a.mdOnLayout({$event:{performance:n}}),c=i};var c,n=ie.bind(t,t.invalidateLayout),r=function(){for(var e in _.MEDIA)v(e),v.getQuery(_.MEDIA[e]).addListener(n);return v.watchResponsiveAttributes(["md-cols","md-row-height","md-gutter"],s,i)}();function i(e){null==e?t.invalidateLayout():v(e)&&t.invalidateLayout()}a.$on("$destroy",function(){for(var e in t.layoutDelegate=ie.noop,r(),_.MEDIA)v.getQuery(_.MEDIA[e]).removeListener(n)});var l=h.startSymbol(),u=h.endSymbol();function e(e){return l+e+u}var p=h(e("share")+"% - ("+e("gutter")+" * "+e("gutterShare")+")"),m=h("calc(("+e("unit")+" + "+e("gutter")+") * "+e("offset")+")"),g=h("calc(("+e("unit")+") * "+e("span")+" + ("+e("span")+" - 1) * "+e("gutter")+")");function f(){var e=v.getResponsiveAttribute(s,"md-row-height");if(!e)throw"md-grid-list: md-row-height attribute was not found";return"fit"==e?"fit":-1!==e.indexOf(":")?"ratio":"fixed"}function d(e){return/\D$/.test(e)?e:e+"px"}}}}function t(e){this.layoutInvalidated=!1,this.tilesInvalidated=!1,this.$timeout_=e.nextTick,this.layoutDelegate=ie.noop}function n(c){var l=t;return e.animateWith=function(e){l=ie.isFunction(e)?e:t},e;function e(e,t){var n,r,i,a,o,s;return a=c.time(function(){r=function(i,e){var a=0,o=0,s=function(){for(var e=[],t=0;t<i;t++)e.push(0);return e}();return{positioning:e.map(function(e,t){return{spans:e,position:function(e,t){if(e.col>i)throw"md-grid-list: Tile at position "+t+" has a colspan ("+e.col+") that exceeds the column count ("+i+")";var n=0,r=0;for(;r-n<e.col;)i<=a?c():-1!==(n=s.indexOf(0,a))&&-1!==(r=u(n+1))?a=r+1:(n=r=0,c());return l(n,e.col,e.row),a=n+e.col,{col:n,row:o}}(e,t)}}),rowCount:o+Math.max.apply(Math,s)};function c(){o++,l(a=0,i,-1)}function l(e,t,n){for(var r=e;r<e+t;r++)s[r]=Math.max(s[r]+n,0)}function u(e){var t;for(t=e;t<s.length;t++)if(0!==s[t])return t;if(t===s.length)return t}}(e,t)}),n={layoutInfo:function(){return r},map:function(t){return o=c.time(function(){var e=n.layoutInfo();i=t(e.positioning,e.rowCount)}),n},reflow:function(e){return s=c.time(function(){(e||l)(i.grid,i.tiles)}),n},performance:function(){return{tileCount:t.length,layoutTime:a,mapTime:o,reflowTime:s,totalTime:a+o+s}}}}function t(e,t){e.element.css(e.style),t.forEach(function(e){e.element.css(e.style)})}}function r(a){return{restrict:"E",require:"^mdGridList",template:"<figure ng-transclude></figure>",transclude:!0,scope:{},controller:["$attrs",function(e){this.$attrs=e}],link:function(e,t,n,r){t.attr("role","listitem");var i=a.watchResponsiveAttributes(["md-colspan","md-rowspan"],n,ie.bind(r,r.invalidateLayout));r.invalidateTiles(),e.$on("$destroy",function(){t[0].$$mdDestroyed=!0,i(),r.invalidateLayout()}),ie.isDefined(e.$parent.$index)&&e.$watch(function(){return e.$parent.$index},function(e,t){e!==t&&r.invalidateTiles()})}}}function i(){return{template:"<figcaption ng-transclude></figcaption>",transclude:!0}}t.$inject=["$mdUtil"],n.$inject=["$mdUtil"],e.$inject=["$interpolate","$mdConstant","$mdGridLayout","$mdMedia"],r.$inject=["$mdMedia"],ie.module("material.components.gridList",["material.core"]).directive("mdGridList",e).directive("mdGridTile",r).directive("mdGridTileFooter",i).directive("mdGridTileHeader",i).factory("$mdGridLayout",n),t.prototype={invalidateTiles:function(){this.tilesInvalidated=!0,this.invalidateLayout()},invalidateLayout:function(){this.layoutInvalidated||(this.layoutInvalidated=!0,this.$timeout_(ie.bind(this,this.layout)))},layout:function(){try{this.layoutDelegate(this.tilesInvalidated)}finally{this.layoutInvalidated=!1,this.tilesInvalidated=!1}}}}(),ie.module("material.components.icon",["material.core"]),function(){function e(r,a){t.$inject=["$scope","$element","$attrs","$animate"];var e=["INPUT","TEXTAREA","SELECT","MD-SELECT"],i=e.reduce(function(e,t){return e.concat(["md-icon ~ "+t,".md-icon ~ "+t])},[]).join(","),o=e.reduce(function(e,t){return e.concat([t+" ~ md-icon",t+" ~ .md-icon"])},[]).join(",");return{restrict:"E",compile:function(e){var t=e[0].querySelector(i),n=e[0].querySelector(o);t&&e.addClass("md-icon-left");n&&e.addClass("md-icon-right");return function(e,t){r(t)}},controller:t};function t(e,t,n,r){var i=this;i.isErrorGetter=n.mdIsError&&a(n.mdIsError),i.delegateClick=function(){i.input.focus()},i.element=t,i.setFocused=function(e){t.toggleClass("md-input-focused",!!e)},i.setHasValue=function(e){t.toggleClass("md-input-has-value",!!e)},i.setHasPlaceholder=function(e){t.toggleClass("md-input-has-placeholder",!!e)},i.setInvalid=function(e){e?r.addClass(t,"md-input-invalid"):r.removeClass(t,"md-input-invalid")},e.$watch(function(){return i.label&&i.input},function(e){e&&!i.label.attr("for")&&i.label.attr("for",i.input.attr("id"))})}}function t(_,b,l,v,y){return{restrict:"E",require:["^?mdInputContainer","?ngModel","?^form"],link:function(f,d,h,e){var p=e[0],m=!!e[1],g=e[1]||_.fakeNgModel(),t=e[2],n=ie.isDefined(h.readonly),r=_.parseAttributeBoolean(h.mdNoAsterisk),i=d[0].tagName.toLowerCase();if(!p)return;{if("hidden"===h.type)return void d.attr("aria-hidden","true");if(p.input){if(p.input[0].contains(d[0]))return;throw new Error("<md-input-container> can only have *one* <input>, <textarea> or <md-select> child element!")}}p.input=d,p.label&&h.$observe("required",function(e){p.label.toggleClass("md-required",e&&!r)});var a=ie.element('<div class="md-errors-spacer">');d.after(a),p.label||l.expect(d,"aria-label",h.placeholder);d.addClass("md-input"),d.attr("id")||d.attr("id","input_"+_.nextUid());"input"===i&&"number"===h.type&&h.min&&h.max&&!h.step?d.attr("step","any"):"textarea"===i&&function(){var t=!h.hasOwnProperty("mdNoAutogrow");if(function(){if(!h.hasOwnProperty("mdNoResize")){var e=ie.element('<div class="md-resize-handle"></div>'),t=!1,n=null,r=0,i=p.element,a=y.register(e,"drag",{horizontal:!1});d.wrap('<div class="md-resize-wrapper">').after(e),e.on("mousedown",o),i.on("$md.dragstart",s).on("$md.drag",c).on("$md.dragend",l),f.$on("$destroy",function(){e.off("mousedown",o).remove(),i.off("$md.dragstart",s).off("$md.drag",c).off("$md.dragend",l),a(),a=i=e=null})}function o(e){e.preventDefault(),t=!0,n=e.clientY,r=parseFloat(d.css("height"))||d.prop("offsetHeight")}function s(e){t&&(e.preventDefault(),u(),i.addClass("md-input-resized"))}function c(e){t&&d.css("height",r+(e.pointer.y-n)-_.scrollTop()+"px")}function l(e){t&&(t=!1,i.removeClass("md-input-resized"))}}(),!t)return;var a=h.hasOwnProperty("rows")?parseInt(h.rows):NaN,o=h.hasOwnProperty("maxRows")?parseInt(h.maxRows):NaN,n=f.$on("md-resize-textarea",r),s=null,c=d[0];v(function(){_.nextTick(r)},10,!1),d.on("input",r),m&&g.$formatters.push(i);a||d.attr("rows",1);function r(){d.attr("rows",1).css("height","auto").addClass("md-no-flex");var e,t,n=(e=c.offsetHeight,t=c.scrollHeight-e,e+Math.max(t,0));if(!s){var r=d[0].style.padding||"";s=d.css("padding",0).prop("offsetHeight"),d[0].style.padding=r}if(a&&s&&(n=Math.max(n,s*a)),o&&s){var i=s*o;i<n?(d.attr("md-no-autogrow",""),n=i):d.removeAttr("md-no-autogrow")}s&&d.attr("rows",Math.round(n/s)),d.css("height",n+"px").removeClass("md-no-flex")}function i(e){return _.nextTick(r),e}function u(){if(t&&(t=!1,ie.element(b).off("resize",r),n&&n(),d.attr("md-no-autogrow","").off("input",r),m)){var e=g.$formatters.indexOf(i);-1<e&&g.$formatters.splice(e,1)}}if(ie.element(b).on("resize",r),f.$on("$destroy",u),h.hasOwnProperty("mdDetectHidden")){var e=(l=!1,function(){var e=0===c.offsetHeight;!1===e&&!0===l&&r(),l=e});f.$watch(function(){return _.nextTick(e,!1),!0})}var l}();m||c();var o=p.isErrorGetter||function(){return g.$invalid&&(g.$touched||t&&t.$submitted)};f.$watch(o,p.setInvalid),h.ngValue&&h.$observe("value",c);g.$parsers.push(s),g.$formatters.push(s),d.on("input",c),n||d.on("focus",function(e){_.nextTick(function(){p.setFocused(!0)})}).on("blur",function(e){_.nextTick(function(){p.setFocused(!1),c()})});function s(e){return p.setHasValue(!g.$isEmpty(e)),e}function c(){p.setHasValue(0<d.val().length||(d[0].validity||{}).badInput)}f.$on("$destroy",function(){p.setFocused(!1),p.setHasValue(!1),p.input=null})}}}function n(u,f){return{restrict:"A",require:["ngModel","^mdInputContainer"],link:function(e,n,t,r){var i,a,o,s=r[0],c=r[1];function l(e){return a.parent&&a.text(String(n.val()||e||"").length+" / "+i),e}f.nextTick(function(){o=ie.element(c.element[0].querySelector(".md-errors-spacer")),a=ie.element('<div class="md-char-counter">'),o.append(a),t.$set("ngTrim","false"),s.$formatters.push(l),s.$viewChangeListeners.push(l),n.on("input keydown keyup",function(){l()}),e.$watch(t.mdMaxlength,function(e){i=e,ie.isNumber(e)&&0<e?(a.parent().length||u.enter(a,o),l()):u.leave(a)}),s.$validators["md-maxlength"]=function(e,t){return!ie.isNumber(i)||i<0||(e||n.val()||t||"").length<=i}})}}}function r(s){return{restrict:"A",require:"^^?mdInputContainer",priority:200,link:{pre:function(e,t,n,r){if(!r)return;var i=r.element.find("label"),a=r.element.attr("md-no-float");if(i&&i.length||""===a||e.$eval(a))return void r.setHasPlaceholder(!0);if("MD-SELECT"!=t[0].nodeName){var o=ie.element('<label ng-click="delegateClick()" tabindex="-1">'+n.placeholder+"</label>");n.$set("placeholder",null),r.element.addClass("md-icon-float").prepend(o),s(o)(e)}}}}}function i(o){return{restrict:"A",link:function(e,t,n){if("INPUT"!==t[0].nodeName&&"TEXTAREA"!==t[0].nodeName)return;var r=!1;function i(){o(function(){t[0].select(),r=!1},1,!(r=!0))}function a(e){r&&e.preventDefault()}t.on("focus",i).on("mouseup",a),e.$on("$destroy",function(){t.off("focus",i).off("mouseup",a)})}}}e.$inject=["$mdTheming","$parse"],t.$inject=["$mdUtil","$window","$mdAria","$timeout","$mdGesture"],n.$inject=["$animate","$mdUtil"],r.$inject=["$compile"],l.$inject=["$mdUtil"],i.$inject=["$timeout"],u.$inject=["$$AnimateRunner","$animateCss","$mdUtil"],f.$inject=["$$AnimateRunner","$animateCss","$mdUtil"],d.$inject=["$$AnimateRunner","$animateCss","$mdUtil"],ie.module("material.components.input",["material.core"]).directive("mdInputContainer",e).directive("label",function(){return{restrict:"E",require:"^?mdInputContainer",link:function(e,t,n,r){!r||n.mdNoFloat||t.hasClass("md-container-ignore")||(r.label=t,e.$on("$destroy",function(){r.label=null}))}}}).directive("input",t).directive("textarea",t).directive("mdMaxlength",n).directive("placeholder",r).directive("ngMessages",function(){return{restrict:"EA",link:function(e,t,n,r){if(!r)return;t.toggleClass("md-input-messages-animation",!0),t.toggleClass("md-auto-hide",!0),("false"==n.mdAutoHide||(i=n,c.some(function(e){return i[e]})))&&t.toggleClass("md-auto-hide",!1);var i},require:"^^?mdInputContainer"}}).directive("ngMessage",l).directive("ngMessageExp",l).directive("mdSelectOnFocus",i).animation(".md-input-invalid",u).animation(".md-input-messages-animation",f).animation(".md-input-message-animation",d).service("mdInputInvalidAnimation",u).service("mdInputMessagesAnimation",f).service("mdInputMessageAnimation",d);var a,o,s,c=["ngIf","ngShow","ngHide","ngSwitchWhen","ngSwitchDefault"];function l(t){return{restrict:"EA",compile:function(n){if(r(n))i(n);else if(function(){var e=n[0];for(;e=e.parentNode;)if(e.nodeType===Node.DOCUMENT_FRAGMENT_NODE)return!0;return!1}())return function(e,t){r(t)&&i(n)};function r(e){return!!t.getClosest(e,"md-input-container")}function i(e){e.toggleClass("md-input-message-animation",!0)}},priority:100}}function u(e,t,n){return b(e,t,n),{addClass:function(e,t,n){h(e,n)}}}function f(e,t,n){return b(e,t,n),{enter:function(e,t){h(e,t)},leave:function(e,t){p(e,t)},addClass:function(e,t,n){"ng-hide"==t?p(e,n):n()},removeClass:function(e,t,n){"ng-hide"==t?h(e,n):n()}}}function d(e,t,n){return b(e,t,n),{enter:function(e,t){m(e).start().done(t)},leave:function(e,t){g(e).start().done(t)}}}function h(e,t){var n,r=[],i=_(e);ie.forEach(i.children(),function(e){n=m(ie.element(e)),r.push(n.start())}),a.all(r,t)}function p(e,t){var n,r=[],i=_(e);ie.forEach(i.children(),function(e){n=g(ie.element(e)),r.push(n.start())}),a.all(r,t)}function m(e){var t=parseInt(G.getComputedStyle(e[0]).height),n=parseInt(G.getComputedStyle(e[0]).marginTop),r=_(e),i=e.controller("mdInputContainer").element;return-t<n||r.hasClass("md-auto-hide")&&!i.hasClass("md-input-invalid")?o(e,{}):o(e,{event:"enter",structural:!0,from:{opacity:0,"margin-top":-t+"px"},to:{opacity:1,"margin-top":"0"},duration:.3})}function g(e){var t=e[0].offsetHeight;return 0==G.getComputedStyle(e[0]).opacity?o(e,{}):o(e,{event:"leave",structural:!0,from:{opacity:1,"margin-top":0},to:{opacity:0,"margin-top":-t+"px"},duration:.3})}function _(e){return e.hasClass("md-input-message-animation")?ie.element(s.getClosest(e,function(e){return e.classList.contains("md-input-messages-animation")})):ie.element(e[0].querySelector(".md-input-messages-animation"))}function b(e,t,n){a=e,o=t,s=n}}(),function(){function e(t){return{restrict:"E",compile:function(e){return e[0].setAttribute("role","list"),t}}}function t(d,h,p,m){var g=["md-checkbox","md-switch","md-menu"];return{restrict:"E",controller:"MdListController",compile:function(a,o){var e,i,t,n=a[0].querySelectorAll(".md-secondary"),r=a;if(a[0].setAttribute("role","listitem"),o.ngClick||o.ngDblclick||o.ngHref||o.href||o.uiSref||o.ngAttrUiSref)l("button");else{for(var s,c=0;s=g[c];++c)if(i=a[0].querySelector(s)){e=!0;break}e?l("div"):a[0].querySelector("md-button:not(.md-secondary):not(.md-exclude)")||a.addClass("md-no-proxy")}function l(e){if("div"==e)(r=ie.element('<div class="md-no-style md-list-item-inner">')).append(a.contents()),a.addClass("md-proxy-focus");else{r=ie.element('<div class="md-button md-no-style">   <div class="md-list-item-inner"></div></div>');var t=ie.element('<md-button class="md-no-style"></md-button>');t[0].setAttribute("aria-label",a[0].textContent),u(a[0],t[0]),a.hasClass("md-no-focus")&&t.addClass("md-no-focus"),r.prepend(t),r.children().eq(1).append(a.contents()),a.addClass("_md-button-wrap")}a[0].setAttribute("tabindex","-1"),a.append(r)}function u(t,n,e){var r=p.prefixer(["ng-if","ng-click","ng-dblclick","aria-label","ng-disabled","ui-sref","href","ng-href","target","ng-attr-ui-sref","ui-sref-opts"]);e&&(r=r.concat(p.prefixer(e))),ie.forEach(r,function(e){t.hasAttribute(e)&&(n.setAttribute(e,t.getAttribute(e)),t.removeAttribute(e))})}function f(e){for(var t=e.attributes,n=0;n<t.length;n++)if("ngClick"===o.$normalize(t[n].name))return!0;return!1}return t=ie.element('<div class="md-secondary-container">'),ie.forEach(n,function(e){!function(e,t){if(e&&("MD-BUTTON"!=(r=e.nodeName.toUpperCase())&&"BUTTON"!=r)&&e.hasAttribute("ng-click")){d.expect(e,"aria-label");var n=ie.element('<md-button class="md-secondary md-icon-button">');u(e,n[0],["ng-if","ng-hide","ng-show"]),e.setAttribute("tabindex","-1"),n.append(e),e=n[0]}var r,i;!e||f(e)&&(o.ngClick||(i=e,-1==g.indexOf(i.nodeName.toLowerCase())))||ie.element(e).removeClass("md-secondary"),a.addClass("md-with-secondary"),t.append(e)}(e,t)}),r.append(t),function(){for(var e,t,n=["md-switch","md-checkbox"],r=0;t=n[r];++r)if((e=a.find(t)[0])&&!e.hasAttribute("aria-label")){var i=a.find("p")[0];if(!i)return;e.setAttribute("aria-label","Toggle "+i.textContent)}}(),e&&"MD-MENU"===i.nodeName&&function(){var e=ie.element(i),t=e.parent().hasClass("md-secondary-container")||i.parentNode.firstElementChild!==i,n="left";t&&(n="right");e.attr("md-position-mode")||e.attr("md-position-mode",n+" target");var r=e.children().eq(0);f(r[0])||r.attr("ng-click","$mdOpenMenu($event)");r.attr("aria-label")||r.attr("aria-label","Open List Menu")}(),function(e,i,t,n){i.addClass("_md");var r=[],a=i[0].firstElementChild,o=i.hasClass("_md-button-wrap")?a.firstElementChild:a,s=o&&f(o);a&&a.children&&!s&&ie.forEach(g,function(e){ie.forEach(a.querySelectorAll(e+":not(.md-secondary)"),function(e){r.push(e)})}),(1==r.length||s)&&(i.addClass("md-clickable"),s||n.attachRipple(e,ie.element(i[0].querySelector(".md-no-style")))),i.hasClass("md-proxy-focus")&&r.length&&ie.forEach(r,function(t){t=ie.element(t),e.mouseActive=!1,t.on("mousedown",function(){e.mouseActive=!0,m(function(){e.mouseActive=!1},100)}).on("focus",function(){!1===e.mouseActive&&i.addClass("md-focused"),t.on("blur",function e(){i.removeClass("md-focused"),t.off("blur",e)})})});var c=function(e){if("INPUT"!=e.target.nodeName&&"TEXTAREA"!=e.target.nodeName&&!e.target.isContentEditable){var t=e.which||e.keyCode;t==h.KEY_CODE.SPACE&&o&&(o.click(),e.preventDefault(),e.stopPropagation())}};s||r.length||o&&o.addEventListener("keypress",c);i.off("click"),i.off("keypress"),1==r.length&&o&&i.children().eq(0).on("click",function(t){if(!function(e){var t=["md-slider"];if(!e.path)return-1!==t.indexOf(e.target.tagName.toLowerCase());for(var n=e.path.indexOf(i.children()[0]),r=0;r<n;r++)if(-1!==t.indexOf(e.path[r].tagName.toLowerCase()))return!0}(t)){var e=p.getClosest(t.target,"BUTTON");!e&&o.contains(t.target)&&ie.forEach(r,function(e){t.target===e||e.contains(t.target)||("MD-MENU"===e.nodeName&&(e=e.children[0]),ie.element(e).triggerHandler("click"))})}});e.$on("$destroy",function(){o&&o.removeEventListener("keypress",c)})}}}}function n(e,t,n){this.attachRipple=function(e,t){n.attach(e,t,{})}}n.$inject=["$scope","$element","$mdListInkRipple"],e.$inject=["$mdTheming"],t.$inject=["$mdAria","$mdConstant","$mdUtil","$timeout"],ie.module("material.components.list",["material.core"]).controller("MdListController",n).directive("mdList",e).directive("mdListItem",t)}(),ie.module("material.components.menu",["material.core","material.components.backdrop"]),ie.module("material.components.menuBar",["material.core","material.components.icon","material.components.menu"]),function(){function e(i,a){return{restrict:"E",transclude:!0,controller:t,controllerAs:"ctrl",bindToController:!0,scope:{mdSelectedNavItem:"=?",navBarAriaLabel:"@?"},template:'<div class="md-nav-bar"><nav role="navigation"><ul class="_md-nav-bar-list" ng-transclude role="listbox"tabindex="0"ng-focus="ctrl.onFocus()"ng-blur="ctrl.onBlur()"ng-keydown="ctrl.onKeydown($event)"aria-label="{{ctrl.navBarAriaLabel}}"></ul></nav><md-nav-ink-bar></md-nav-ink-bar></div>',link:function(e,t,n,r){a(t),r.navBarAriaLabel||i.expectAsync(t,"aria-label",ie.noop)}}}function t(e,t,n,r){this._$timeout=n,this._$scope=t,this._$mdConstant=r,this.mdSelectedNavItem,this.navBarAriaLabel,this._navBarEl=e[0],this._inkbar;var i=this,a=this._$scope.$watch(function(){return i._navBarEl.querySelectorAll("._md-nav-button").length},function(e){0<e&&(i._initTabs(),a())})}function n(o){return{restrict:"E",require:["mdNavItem","^mdNavBar"],controller:r,bindToController:!0,controllerAs:"ctrl",replace:!0,transclude:!0,template:'<li class="md-nav-item" role="option" aria-selected="{{ctrl.isSelected()}}"><md-button ng-if="ctrl.mdNavSref" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ui-sref="{{ctrl.mdNavSref}}"><span ng-transclude class="_md-nav-button-text"></span></md-button><md-button ng-if="ctrl.mdNavHref" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ng-href="{{ctrl.mdNavHref}}"><span ng-transclude class="_md-nav-button-text"></span></md-button><md-button ng-if="ctrl.mdNavClick" class="_md-nav-button md-accent"ng-class="ctrl.getNgClassMap()"tabindex="-1"ng-click="ctrl.mdNavClick()"><span ng-transclude class="_md-nav-button-text"></span></md-button></li>',scope:{mdNavClick:"&?",mdNavHref:"@?",mdNavSref:"@?",name:"@"},link:function(e,t,n,r){var i=r[0],a=r[1];o(function(){i.name||(i.name=ie.element(t[0].querySelector("._md-nav-button-text")).text().trim()),ie.element(t[0].querySelector("._md-nav-button")).on("click",function(){a.mdSelectedNavItem=i.name,e.$apply()})})}}}function r(e){if(this._$element=e,this.mdNavClick,this.mdNavHref,this.name,this._selected=!1,this._focused=!1,1<(!!e.attr("md-nav-click")?1:0)+(!!e.attr("md-nav-href")?1:0)+(!!e.attr("md-nav-sref")?1:0))throw Error("Must specify exactly one of md-nav-click, md-nav-href, md-nav-sref for nav-item directive")}t.$inject=["$element","$scope","$timeout","$mdConstant"],n.$inject=["$$rAF"],r.$inject=["$element"],e.$inject=["$mdAria","$mdTheming"],ie.module("material.components.navBar",["material.core"]).controller("MdNavBarController",t).directive("mdNavBar",e).controller("MdNavItemController",r).directive("mdNavItem",n),t.prototype._initTabs=function(){this._inkbar=ie.element(this._navBarEl.getElementsByTagName("md-nav-ink-bar")[0]);var n=this;this._$timeout(function(){n._updateTabs(n.mdSelectedNavItem,ae)}),this._$scope.$watch("ctrl.mdSelectedNavItem",function(e,t){n._$timeout(function(){n._updateTabs(e,t)})})},t.prototype._updateTabs=function(e,t){var n=this,r=this._getTabs(),i=-1,a=-1,o=this._getTabByName(e),s=this._getTabByName(t);s&&(s.setSelected(!1),i=r.indexOf(s)),o&&(o.setSelected(!0),a=r.indexOf(o)),this._$timeout(function(){n._updateInkBarStyles(o,a,i)})},t.prototype._updateInkBarStyles=function(e,t,n){if(this._inkbar.toggleClass("_md-left",t<n).toggleClass("_md-right",n<t),this._inkbar.css({display:t<0?"none":""}),e){var r=e.getButtonEl(),i=r.offsetLeft;this._inkbar.css({left:i+"px",width:r.offsetWidth+"px"})}},t.prototype._getTabs=function(){return Array.prototype.slice.call(this._navBarEl.querySelectorAll(".md-nav-item")).map(function(e){return ie.element(e).controller("mdNavItem")})},t.prototype._getTabByName=function(t){return this._findTab(function(e){return e.getName()==t})},t.prototype._getSelectedTab=function(){return this._findTab(function(e){return e.isSelected()})},t.prototype.getFocusedTab=function(){return this._findTab(function(e){return e.hasFocus()})},t.prototype._findTab=function(e){for(var t=this._getTabs(),n=0;n<t.length;n++)if(e(t[n]))return t[n];return null},t.prototype.onFocus=function(){var e=this._getSelectedTab();e&&e.setFocused(!0)},t.prototype.onBlur=function(){var e=this.getFocusedTab();e&&e.setFocused(!1)},t.prototype._moveFocus=function(e,t){e.setFocused(!1),t.setFocused(!0)},t.prototype.onKeydown=function(e){var t=this._$mdConstant.KEY_CODE,n=this._getTabs(),r=this.getFocusedTab();if(r){var i=n.indexOf(r);switch(e.keyCode){case t.UP_ARROW:case t.LEFT_ARROW:0<i&&this._moveFocus(r,n[i-1]);break;case t.DOWN_ARROW:case t.RIGHT_ARROW:i<n.length-1&&this._moveFocus(r,n[i+1]);break;case t.SPACE:case t.ENTER:this._$timeout(function(){r.getButtonEl().click()})}}},r.prototype.getNgClassMap=function(){return{"md-active":this._selected,"md-primary":this._selected,"md-unselected":!this._selected,"md-focused":this._focused}},r.prototype.getName=function(){return this.name},r.prototype.getButtonEl=function(){return this._$element[0].querySelector("._md-nav-button")},r.prototype.setSelected=function(e){this._selected=e},r.prototype.isSelected=function(){return this._selected},r.prototype.setFocused=function(e){this._focused=e},r.prototype.hasFocus=function(){return this._focused}}(),function(){e.$inject=["$rootElement","$rootScope","$injector","$window"],ie.module("material.components.panel",["material.core","material.components.backdrop"]).service("$mdPanel",e);var i=80,a="_md-panel-hidden",n=ie.element('<div class="_md-panel-focus-trap" tabindex="0"></div>');function e(e,t,n,r){this._defaultConfigOptions={bindToController:!0,clickOutsideToClose:!1,disableParentScroll:!1,escapeToClose:!1,focusOnOpen:!0,fullscreen:!1,hasBackdrop:!1,propagateContainerEvents:!1,transformTemplate:ie.bind(this,this._wrapTemplate),trapFocus:!1,zIndex:i},this._config={},this._$rootElement=e,this._$rootScope=t,this._$injector=n,this._$window=r,this._trackedPanels={},this.animation=c.animation,this.xPosition=p.xPosition,this.yPosition=p.yPosition}function r(e,t){this._$q=t.get("$q"),this._$mdCompiler=t.get("$mdCompiler"),this._$mdConstant=t.get("$mdConstant"),this._$mdUtil=t.get("$mdUtil"),this._$rootScope=t.get("$rootScope"),this._$animate=t.get("$animate"),this._$mdPanel=t.get("$mdPanel"),this._$log=t.get("$log"),this._$window=t.get("$window"),this._$$rAF=t.get("$$rAF"),this.id=e.id,this.config=e,this.panelContainer,this.panelEl,this.isAttached=!1,this._removeListeners=[],this._topFocusTrap,this._bottomFocusTrap,this._backdropRef,this._restoreScroll=null}function p(e){this._$window=e.get("$window"),this._isRTL="rtl"===e.get("$mdUtil").bidi(),this._absolute=!1,this._relativeToEl,this._top="",this._bottom="",this._left="",this._right="",this._translateX=[],this._translateY=[],this._positions=[],this._actualPosition}function c(e){this._$mdUtil=e.get("$mdUtil"),this._openFrom,this._closeTo,this._animationClass=""}function o(e){var t=ie.isString(e)?document.querySelector(e):e;return ie.element(t)}e.prototype.create=function(e){if(e=e||{},ie.isDefined(e.id)&&this._trackedPanels[e.id])return this._trackedPanels[e.id];this._config={id:e.id||"panel_"+this._$injector.get("$mdUtil").nextUid(),scope:this._$rootScope.$new(!0),attachTo:this._$rootElement},ie.extend(this._config,this._defaultConfigOptions,e);var t=new r(this._config,this._$injector);return this._trackedPanels[e.id]=t},e.prototype.open=function(e){var t=this.create(e);return t.open().then(function(){return t})},e.prototype.newPanelPosition=function(){return new p(this._$injector)},e.prototype.newPanelAnimation=function(){return new c(this._$injector)},e.prototype._wrapTemplate=function(e){return'<div class="md-panel-outer-wrapper">  <div class="md-panel" style="left: -9999px;">'+(e||"")+"</div></div>"},r.prototype.open=function(){var i=this;return this._$q(function(e,t){var n=i._done(e,i),r=i._simpleBind(i.show,i);i.attach().then(r).then(n).catch(t)})},r.prototype.close=function(){var i=this;return this._$q(function(e,t){var n=i._done(e,i),r=i._simpleBind(i.detach,i);i.hide().then(r).then(n).catch(t)})},r.prototype.attach=function(){if(this.isAttached&&this.panelEl)return this._$q.when(this);var i=this;return this._$q(function(e,t){var n=i._done(e,i),r=i.config.onDomAdded||ie.noop;i._$q.all([i._createBackdrop(),i._createPanel().then(function(e){return i.isAttached=!0,i._addEventListeners(),e}).catch(t)]).then(r).then(n).catch(t)})},r.prototype.detach=function(){if(!this.isAttached)return this._$q.when(this);var r=this,i=r.config.onDomRemoved||ie.noop;return this._restoreScroll&&(this._restoreScroll(),this._restoreScroll=null),this._$q(function(e,t){var n=r._done(e,r);r._$q.all([(r._removeEventListeners(),r._topFocusTrap&&r._topFocusTrap.parentNode&&r._topFocusTrap.parentNode.removeChild(r._topFocusTrap),r._bottomFocusTrap&&r._bottomFocusTrap.parentNode&&r._bottomFocusTrap.parentNode.removeChild(r._bottomFocusTrap),r.panelContainer.remove(),r.isAttached=!1,r._$q.when(r)),!r._backdropRef||r._backdropRef.detach()]).then(i).then(n).catch(t)})},r.prototype.destroy=function(){this.config.scope.$destroy(),this.config.locals=null},r.prototype.show=function(){if(!this.panelContainer)return this._$q(function(e,t){t("Panel does not exist yet. Call open() or attach().")});if(!this.panelContainer.hasClass(a))return this._$q.when(this);var i=this;return this._$q(function(e,t){var n=i._done(e,i),r=i.config.onOpenComplete||ie.noop;i._$q.all([i._backdropRef?i._backdropRef.show():i,(i.panelContainer.removeClass(a),i._animateOpen()).then(function(){i._focusOnOpen()},t)]).then(r).then(n).catch(t)})},r.prototype.hide=function(){if(!this.panelContainer)return this._$q(function(e,t){t("Panel does not exist yet. Call open() or attach().")});if(this.panelContainer.hasClass(a))return this._$q.when(this);var i=this;return this._$q(function(e,t){var n=i._done(e,i),r=i.config.onRemoving||ie.noop;i._$q.all([i._backdropRef?i._backdropRef.hide():i,i._animateClose().then(r).then(function(){i.panelContainer.addClass(a)}).then(function(){var e=i.config.origin;e&&o(e).focus()}).catch(t)]).then(n,t)})},r.prototype.addClass=function(e,t){if(this._$log.warn("The addClass method is in the process of being deprecated. Full deprecation is scheduled for the Angular Material 1.2 release. To achieve the same results, use the panelContainer or panelEl JQLite elements that are referenced in MdPanelRef."),!this.panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");t||this.panelContainer.hasClass(e)?t&&!this.panelEl.hasClass(e)&&this.panelEl.addClass(e):this.panelContainer.addClass(e)},r.prototype.removeClass=function(e,t){if(this._$log.warn("The removeClass method is in the process of being deprecated. Full deprecation is scheduled for the Angular Material 1.2 release. To achieve the same results, use the panelContainer or panelEl JQLite elements that are referenced in MdPanelRef."),!this.panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");!t&&this.panelContainer.hasClass(e)?this.panelContainer.removeClass(e):t&&this.panelEl.hasClass(e)&&this.panelEl.removeClass(e)},r.prototype.toggleClass=function(e,t){if(this._$log.warn("The toggleClass method is in the process of being deprecated. Full deprecation is scheduled for the Angular Material 1.2 release. To achieve the same results, use the panelContainer or panelEl JQLite elements that are referenced in MdPanelRef."),!this.panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");t?this.panelEl.toggleClass(e):this.panelContainer.toggleClass(e)},r.prototype._createPanel=function(){var r=this;return this._$q(function(t,n){r.config.locals||(r.config.locals={}),(r.config.locals.mdPanelRef=r)._$mdCompiler.compile(r.config).then(function(e){r.panelContainer=e.link(r.config.scope),o(r.config.attachTo).append(r.panelContainer),r.config.disableParentScroll&&(r._restoreScroll=r._$mdUtil.disableScrollAround(null,r.panelContainer,{disableScrollMask:!0})),r.panelEl=ie.element(r.panelContainer[0].querySelector(".md-panel")),r.config.panelClass&&r.panelEl.addClass(r.config.panelClass),r.config.propagateContainerEvents&&r.panelContainer.css("pointer-events","none"),r._$animate.pin&&r._$animate.pin(r.panelContainer,o(r.config.attachTo)),r._configureTrapFocus(),r._addStyles().then(function(){t(r)},n)},n)})},r.prototype._addStyles=function(){var n=this;return this._$q(function(e){n.panelContainer.css("z-index",n.config.zIndex),n.panelEl.css("z-index",n.config.zIndex+1);var t=function(){n.panelEl.css("left",""),n.panelContainer.addClass(a),e(n)};if(n.config.fullscreen)return n.panelEl.addClass("_md-panel-fullscreen"),void t();n.config.position?n._$rootScope.$$postDigest(function(){n._updatePosition(!0),e(n)}):t()})},r.prototype.updatePosition=function(e){if(!this.panelContainer)throw new Error("Panel does not exist yet. Call open() or attach().");this.config.position=e,this._updatePosition()},r.prototype._updatePosition=function(e){var t=this.config.position;if(t){t._setPanelPosition(this.panelEl),e&&this.panelContainer.addClass(a),this.panelEl.css(p.absPosition.TOP,t.getTop()),this.panelEl.css(p.absPosition.BOTTOM,t.getBottom()),this.panelEl.css(p.absPosition.LEFT,t.getLeft()),this.panelEl.css(p.absPosition.RIGHT,t.getRight());var n=this._$mdConstant.CSS.TRANSFORM;this.panelEl.css(n,t.getTransform())}},r.prototype._focusOnOpen=function(){if(this.config.focusOnOpen){var e=this;this._$rootScope.$$postDigest(function(){(e._$mdUtil.findFocusTarget(e.panelEl)||e.panelEl).focus()})}},r.prototype._createBackdrop=function(){if(this.config.hasBackdrop){if(!this._backdropRef){var e={animation:this._$mdPanel.newPanelAnimation().openFrom(this.config.attachTo).withAnimation({open:"_md-opaque-enter",close:"_md-opaque-leave"}),attachTo:this.config.attachTo,focusOnOpen:!1,panelClass:"_md-panel-backdrop",zIndex:this.config.zIndex-1};this._backdropRef=this._$mdPanel.create(e)}if(!this._backdropRef.isAttached)return this._backdropRef.attach()}},r.prototype._addEventListeners=function(){this._configureEscapeToClose(),this._configureClickOutsideToClose(),this._configureScrollListener()},r.prototype._removeEventListeners=function(){this._removeListeners&&this._removeListeners.forEach(function(e){e()}),this._removeListeners=[]},r.prototype._configureEscapeToClose=function(){if(this.config.escapeToClose){var e=o(this.config.attachTo),t=this,n=function(e){e.keyCode===t._$mdConstant.KEY_CODE.ESCAPE&&(e.stopPropagation(),e.preventDefault(),t.close())};this.panelContainer.on("keydown",n),e.on("keydown",n),this._removeListeners.push(function(){t.panelContainer.off("keydown",n),e.off("keydown",n)})}},r.prototype._configureClickOutsideToClose=function(){if(this.config.clickOutsideToClose){var t,n=this.panelContainer,e=function(e){t=e.target},r=this,i=function(e){t===n[0]&&e.target===n[0]&&(e.stopPropagation(),e.preventDefault(),r.close())};n.on("mousedown",e),n.on("mouseup",i),this._removeListeners.push(function(){n.off("mousedown",e),n.off("mouseup",i)})}},r.prototype._configureScrollListener=function(){var e=ie.bind(this,this._updatePosition),t=this._$$rAF.throttle(e),n=this,r=function(){n.config.disableParentScroll||t()};this._$window.addEventListener("scroll",r,!0),this._removeListeners.push(function(){n._$window.removeEventListener("scroll",r,!0)})},r.prototype._configureTrapFocus=function(){if(this.panelEl.attr("tabIndex","-1"),this.config.trapFocus){var e=this.panelEl;this._topFocusTrap=n.clone()[0],this._bottomFocusTrap=n.clone()[0];var t=function(){e.focus()};this._topFocusTrap.addEventListener("focus",t),this._bottomFocusTrap.addEventListener("focus",t),this._removeListeners.push(this._simpleBind(function(){this._topFocusTrap.removeEventListener("focus",t),this._bottomFocusTrap.removeEventListener("focus",t)},this)),e[0].parentNode.insertBefore(this._topFocusTrap,e[0]),e.after(this._bottomFocusTrap)}},r.prototype._animateOpen=function(){this.panelContainer.addClass("md-panel-is-showing");var n=this.config.animation;if(!n)return this.panelContainer.addClass("_md-panel-shown"),this._$q.when(this);var r=this;return this._$q(function(e){var t=r._done(e,r);n.animateOpen(r.panelEl).then(t,function(){r._$log.warn("MdPanel Animations failed. Showing panel without animating."),t()})})},r.prototype._animateClose=function(){var n=this.config.animation;if(!n)return this.panelContainer.removeClass("md-panel-is-showing"),this.panelContainer.removeClass("_md-panel-shown"),this._$q.when(this);var r=this;return this._$q(function(e){var t=function(){r.panelContainer.removeClass("md-panel-is-showing"),e(r)};n.animateClose(r.panelEl).then(t,function(){r._$log.warn("MdPanel Animations failed. Hiding panel without animating."),t()})})},r.prototype._simpleBind=function(t,n){return function(e){return t.apply(n,e)}},r.prototype._done=function(e,t){return function(){e(t)}},p.xPosition={CENTER:"center",ALIGN_START:"align-start",ALIGN_END:"align-end",OFFSET_START:"offset-start",OFFSET_END:"offset-end"},p.yPosition={CENTER:"center",ALIGN_TOPS:"align-tops",ALIGN_BOTTOMS:"align-bottoms",ABOVE:"above",BELOW:"below"},p.absPosition={TOP:"top",RIGHT:"right",BOTTOM:"bottom",LEFT:"left"},p.prototype.absolute=function(){return this._absolute=!0,this},p.prototype._setPosition=function(e,t){if(e===p.absPosition.RIGHT||e===p.absPosition.LEFT)this._left=this._right="";else{if(e!==p.absPosition.BOTTOM&&e!==p.absPosition.TOP){var n=Object.keys(p.absPosition).join().toLowerCase();throw new Error("Position must be one of "+n+".")}this._top=this._bottom=""}return this["_"+e]=ie.isString(t)?t:"0",this},p.prototype.top=function(e){return this._setPosition(p.absPosition.TOP,e)},p.prototype.bottom=function(e){return this._setPosition(p.absPosition.BOTTOM,e)},p.prototype.start=function(e){var t=this._isRTL?p.absPosition.RIGHT:p.absPosition.LEFT;return this._setPosition(t,e)},p.prototype.end=function(e){var t=this._isRTL?p.absPosition.LEFT:p.absPosition.RIGHT;return this._setPosition(t,e)},p.prototype.left=function(e){return this._setPosition(p.absPosition.LEFT,e)},p.prototype.right=function(e){return this._setPosition(p.absPosition.RIGHT,e)},p.prototype.centerHorizontally=function(){return this._left="50%",this._right="",this._translateX=["-50%"],this},p.prototype.centerVertically=function(){return this._top="50%",this._bottom="",this._translateY=["-50%"],this},p.prototype.center=function(){return this.centerHorizontally().centerVertically()},p.prototype.relativeTo=function(e){return this._absolute=!1,this._relativeToEl=o(e),this},p.prototype.addPanelPosition=function(e,t){if(!this._relativeToEl)throw new Error("addPanelPosition can only be used with relative positioning. Set relativeTo first.");return this._validateXPosition(e),this._validateYPosition(t),this._positions.push({x:e,y:t}),this},p.prototype._validateYPosition=function(e){if(null!=e){for(var t,n=Object.keys(p.yPosition),r=[],i=0;t=n[i];i++){var a=p.yPosition[t];if(r.push(a),a===e)return}throw new Error("Panel y position only accepts the following values:\n"+r.join(" | "))}},p.prototype._validateXPosition=function(e){if(null!=e){for(var t,n=Object.keys(p.xPosition),r=[],i=0;t=n[i];i++){var a=p.xPosition[t];if(r.push(a),a===e)return}throw new Error("Panel x Position only accepts the following values:\n"+r.join(" | "))}},p.prototype.withOffsetX=function(e){return this._translateX.push(e),this},p.prototype.withOffsetY=function(e){return this._translateY.push(e),this},p.prototype.getTop=function(){return this._top},p.prototype.getBottom=function(){return this._bottom},p.prototype.getLeft=function(){return this._left},p.prototype.getRight=function(){return this._right},p.prototype.getTransform=function(){return(this._reduceTranslateValues("translateX",this._translateX)+" "+this._reduceTranslateValues("translateY",this._translateY)).trim()},p.prototype._isOnscreen=function(e){var t=parseInt(this.getLeft()),n=parseInt(this.getTop()),r=t+e[0].offsetWidth,i=n+e[0].offsetHeight;return 0<=t&&0<=n&&i<=this._$window.innerHeight&&r<=this._$window.innerWidth},p.prototype.getActualPosition=function(){return this._actualPosition},p.prototype._reduceTranslateValues=function(t,e){return e.map(function(e){return t+"("+e+")"}).join(" ")},p.prototype._setPanelPosition=function(e){if(!this._absolute)if(this._actualPosition)this._calculatePanelPosition(e,this._actualPosition);else for(var t=0;t<this._positions.length&&(this._actualPosition=this._positions[t],this._calculatePanelPosition(e,this._actualPosition),!this._isOnscreen(e));t++);},p.prototype._reverseXPosition=function(e){if(e!==p.xPosition.CENTER){return-1<e.indexOf("start")?e.replace("start","end"):e.replace("end","start")}},p.prototype._bidi=function(e){return this._isRTL?this._reverseXPosition(e):e},p.prototype._calculatePanelPosition=function(e,t){var n=e[0].getBoundingClientRect(),r=n.width,i=n.height,a=this._relativeToEl[0].getBoundingClientRect(),o=a.left,s=a.right,c=a.width;switch(this._bidi(t.x)){case p.xPosition.OFFSET_START:this._left=o-r+"px";break;case p.xPosition.ALIGN_END:this._left=s-r+"px";break;case p.xPosition.CENTER:var l=o+.5*c-.5*r;this._left=l+"px";break;case p.xPosition.ALIGN_START:this._left=o+"px";break;case p.xPosition.OFFSET_END:this._left=s+"px"}var u=a.top,f=a.bottom,d=a.height;switch(t.y){case p.yPosition.ABOVE:this._top=u-i+"px";break;case p.yPosition.ALIGN_BOTTOMS:this._top=f-i+"px";break;case p.yPosition.CENTER:var h=u+.5*d-.5*i;this._top=h+"px";break;case p.yPosition.ALIGN_TOPS:this._top=u+"px";break;case p.yPosition.BELOW:this._top=f+"px"}},c.animation={SLIDE:"md-panel-animate-slide",SCALE:"md-panel-animate-scale",FADE:"md-panel-animate-fade"},c.prototype.openFrom=function(e){return e=e.target?e.target:e,this._openFrom=this._getPanelAnimationTarget(e),this._closeTo||(this._closeTo=this._openFrom),this},c.prototype.closeTo=function(e){return this._closeTo=this._getPanelAnimationTarget(e),this},c.prototype._getPanelAnimationTarget=function(e){return ie.isDefined(e.top)||ie.isDefined(e.left)?{element:ae,bounds:{top:e.top||0,left:e.left||0}}:this._getBoundingClientRect(o(e))},c.prototype.withAnimation=function(e){return this._animationClass=e,this},c.prototype.animateOpen=function(e){var t=this._$mdUtil.dom.animator;this._fixBounds(e);var n={},r=e[0].style.transform||"",i=t.toTransformCss(r),a=t.toTransformCss(r);switch(this._animationClass){case c.animation.SLIDE:e.css("opacity","1"),n={transitionInClass:"_md-panel-animate-enter"};var o=t.calculateSlideToOrigin(e,this._openFrom)||"";i=t.toTransformCss(o+" "+r);break;case c.animation.SCALE:n={transitionInClass:"_md-panel-animate-enter"};var s=t.calculateZoomToOrigin(e,this._openFrom)||"";i=t.toTransformCss(s+" "+r);break;case c.animation.FADE:n={transitionInClass:"_md-panel-animate-enter"};break;default:n=ie.isString(this._animationClass)?{transitionInClass:this._animationClass}:{transitionInClass:this._animationClass.open,transitionOutClass:this._animationClass.close}}return t.translate3d(e,i,a,n)},c.prototype.animateClose=function(e){var t=this._$mdUtil.dom.animator,n={},r=e[0].style.transform||"",i=t.toTransformCss(r),a=t.toTransformCss(r);switch(this._animationClass){case c.animation.SLIDE:e.css("opacity","1"),n={transitionInClass:"_md-panel-animate-leave"};var o=t.calculateSlideToOrigin(e,this._closeTo)||"";a=t.toTransformCss(o+" "+r);break;case c.animation.SCALE:n={transitionInClass:"_md-panel-animate-scale-out _md-panel-animate-leave"};var s=t.calculateZoomToOrigin(e,this._closeTo)||"";a=t.toTransformCss(s+" "+r);break;case c.animation.FADE:n={transitionInClass:"_md-panel-animate-fade-out _md-panel-animate-leave"};break;default:n=ie.isString(this._animationClass)?{transitionOutClass:this._animationClass}:{transitionInClass:this._animationClass.close,transitionOutClass:this._animationClass.open}}return t.translate3d(e,i,a,n)},c.prototype._fixBounds=function(e){var t=e[0].offsetWidth,n=e[0].offsetHeight;this._openFrom&&null==this._openFrom.bounds.height&&(this._openFrom.bounds.height=n),this._openFrom&&null==this._openFrom.bounds.width&&(this._openFrom.bounds.width=t),this._closeTo&&null==this._closeTo.bounds.height&&(this._closeTo.bounds.height=n),this._closeTo&&null==this._closeTo.bounds.width&&(this._closeTo.bounds.width=t)},c.prototype._getBoundingClientRect=function(e){if(e instanceof ie.element)return{element:e,bounds:e[0].getBoundingClientRect()}}}(),ie.module("material.components.progressCircular",["material.core"]),function(){function e(f,d,e){var h="determinate",p="indeterminate",m="buffer",g="query",_="_md-progress-linear-disabled";return{restrict:"E",template:'<div class="md-container"><div class="md-dashed"></div><div class="md-bar md-bar1"></div><div class="md-bar md-bar2"></div></div>',compile:function(e,t,n){return e.attr("aria-valuemin",0),e.attr("aria-valuemax",100),e.attr("role","progressbar"),r}};function r(e,n,r){var t;f(n);var i=r.hasOwnProperty("disabled"),a=d.dom.animator.toCss,o=ie.element(n[0].querySelector(".md-bar1")),s=ie.element(n[0].querySelector(".md-bar2")),c=ie.element(n[0].querySelector(".md-container"));function l(){var e=(r.mdMode||"").trim();if(e)switch(e){case h:case p:case m:case g:break;default:e=p}return e}function u(e,t){if(!i&&l()){var n=d.supplant("translateX({0}%) scale({1},1)",[(t-100)/2,t/100]),r=a({transform:n});ie.element(e).css(r)}}n.attr("md-mode",l()).toggleClass(_,i),function(){if(ie.isUndefined(r.mdMode)){var e=ie.isDefined(r.value),t=e?h:p;n.attr("md-mode",t),r.mdMode=t}}(),r.$observe("value",function(e){var t=b(e);n.attr("aria-valuenow",t),l()!=g&&u(s,t)}),r.$observe("mdBufferValue",function(e){u(o,b(e))}),r.$observe("disabled",function(e){i=!0===e||!1===e?!!e:ie.isDefined(e),n.toggleClass(_,i),c.toggleClass(t,!i)}),r.$observe("mdMode",function(e){switch(t&&c.removeClass(t),e){case g:case m:case h:case p:c.addClass(t="md-mode-"+e);break;default:c.addClass(t="md-mode-"+p)}})}function b(e){return Math.max(0,Math.min(e||0,100))}}e.$inject=["$mdTheming","$mdUtil","$log"],ie.module("material.components.progressLinear",["material.core"]).directive("mdProgressLinear",e)}(),function(){function e(s,c,l,u){return e.prototype={init:function(e){this._ngModelCtrl=e,this._ngModelCtrl.$render=ie.bind(this,this.render)},add:function(e){this._radioButtonRenderFns.push(e)},remove:function(e){var t=this._radioButtonRenderFns.indexOf(e);-1!==t&&this._radioButtonRenderFns.splice(t,1)},render:function(){this._radioButtonRenderFns.forEach(function(e){e()})},setViewValue:function(e,t){this._ngModelCtrl.$setViewValue(e,t),this.render()},getViewValue:function(){return this._ngModelCtrl.$viewValue},selectNext:function(){return t(this.$element,1)},selectPrevious:function(){return t(this.$element,-1)},setActiveDescendant:function(e){this.$element.attr("aria-activedescendant",e)},isDisabled:function(){return this.$element[0].hasAttribute("disabled")}},{restrict:"E",controller:["$element",e],require:["mdRadioGroup","?ngModel"],link:{pre:function(t,r,e,n){r.addClass("_md"),l(r);var i=n[0],a=n[1]||s.fakeNgModel();function o(){r.hasClass("md-focused")||r.addClass("md-focused")}i.init(a),t.mouseActive=!1,r.attr({role:"radiogroup",tabIndex:r.attr("tabindex")||"0"}).on("keydown",function(e){var t=e.which||e.keyCode;if(t!=c.KEY_CODE.ENTER&&e.currentTarget!=e.target)return;switch(t){case c.KEY_CODE.LEFT_ARROW:case c.KEY_CODE.UP_ARROW:e.preventDefault(),i.selectPrevious(),o();break;case c.KEY_CODE.RIGHT_ARROW:case c.KEY_CODE.DOWN_ARROW:e.preventDefault(),i.selectNext(),o();break;case c.KEY_CODE.ENTER:var n=ie.element(s.getClosest(r[0],"form"));0<n.length&&n.triggerHandler("submit")}}).on("mousedown",function(e){t.mouseActive=!0,u(function(){t.mouseActive=!1},100)}).on("focus",function(){!1===t.mouseActive&&i.$element.addClass("md-focused")}).on("blur",function(){i.$element.removeClass("md-focused")})}}};function e(e){this._radioButtonRenderFns=[],this.$element=e}function t(e,t){var n=s.iterator(e[0].querySelectorAll("md-radio-button"),!0);if(n.count()){var r=e[0].querySelector("md-radio-button.md-checked"),i=n[t<0?"previous":"next"](r,function(e){return!ie.element(e).attr("disabled")})||n.first();ie.element(i).triggerHandler("click")}}}function t(l,u,f){var d="md-checked";return{restrict:"E",require:"^mdRadioGroup",transclude:!0,template:'<div class="md-container" md-ink-ripple md-ink-ripple-checkbox><div class="md-off"></div><div class="md-on"></div></div><div ng-transclude class="md-label"></div>',link:function(t,n,r,i){var a;function e(e){n[0].hasAttribute("disabled")||i.isDisabled()||t.$apply(function(){i.setViewValue(r.value,e&&e.type)})}function o(){var e=i.getViewValue()==r.value;function t(e){"MD-RADIO-GROUP"!=n.parent()[0].nodeName&&n.parent()[e?"addClass":"removeClass"](d)}e!==a&&(a=e,n.attr("aria-checked",e),e?(t(!0),n.addClass(d),i.setActiveDescendant(n.attr("id"))):(t(!1),n.removeClass(d)))}f(n),s=n,c=t,c.ariaId=r.id||"radio_"+u.nextUid(),s.attr({id:c.ariaId,role:"radio","aria-checked":"false"}),l.expectWithText(s,"aria-label"),function(){if(!i)throw"RadioButton: No RadioGroupController could be found.";i.add(o),r.$observe("value",o),n.on("click",e).on("$destroy",function(){i.remove(o)})}();var s,c}}}e.$inject=["$mdUtil","$mdConstant","$mdTheming","$timeout"],t.$inject=["$mdAria","$mdUtil","$mdTheming"],ie.module("material.components.radioButton",["material.core"]).directive("mdRadioGroup",e).directive("mdRadioButton",t)}(),function(){e.$inject=["$mdSelect","$mdUtil","$mdConstant","$mdTheming","$mdAria","$compile","$parse"],t.$inject=["$parse","$mdUtil","$mdConstant","$mdTheming"],n.$inject=["$mdButtonInkRipple","$mdUtil"],r.$inject=["$$interimElementProvider"];var F=8,g=0,l=ie.element('<div class="md-container"><div class="md-icon"></div></div>');function e(E,D,I,P,M,e,$){var t=I.KEY_CODE;t.SPACE,t.ENTER,t.UP_ARROW,t.DOWN_ARROW;return{restrict:"E",require:["^?mdInputContainer","mdSelect","ngModel","?^form"],compile:function(e,t){var n=ie.element("<md-select-value><span></span></md-select-value>");n.append('<span class="md-select-icon" aria-hidden="true"></span>'),n.addClass("md-select-value"),n[0].hasAttribute("id")||n.attr("id","select_value_label_"+D.nextUid());e.find("md-content").length||e.append(ie.element("<md-content>").append(e.contents()));t.mdOnOpen&&(e.find("md-content").prepend(ie.element('<div> <md-progress-circular md-mode="indeterminate" ng-if="$$loadingAsyncDone === false" md-diameter="25px"></md-progress-circular></div>')),e.find("md-option").attr("ng-show","$$loadingAsyncDone"));if(t.name){var r=ie.element('<select class="md-visually-hidden">');r.attr({name:t.name,"aria-hidden":"true",tabindex:"-1"});var i=e.find("md-option");ie.forEach(i,function(e){var t=ie.element("<option>"+e.innerHTML+"</option>");e.hasAttribute("ng-value")?t.attr("ng-value",e.getAttribute("ng-value")):e.hasAttribute("value")&&t.attr("value",e.getAttribute("value")),r.append(t)}),r.append('<option ng-value="'+t.ngModel+'" selected></option>'),e.parent().append(r)}var k=D.parseAttributeBoolean(t.multiple),a=k?"multiple":"",o='<div class="md-select-menu-container" aria-hidden="true"><md-select-menu {0}>{1}</md-select-menu></div>';o=D.supplant(o,[a,e.html()]),e.empty().append(n),e.append(o),t.tabindex||t.$set("tabindex",0);return function(r,n,i,e){var t,a,o,s,c,l=!0,u=e[0],f=e[1],d=e[2],h=e[3],p=n.find("md-select-value"),m=ie.isDefined(i.readonly),g=D.parseAttributeBoolean(i.mdNoAsterisk);if(g&&n.addClass("md-no-asterisk"),u){var _=u.isErrorGetter||function(){return d.$invalid&&(d.$touched||h&&h.$submitted)};if(u.input&&n.find("md-select-header").find("input")[0]!==u.input[0])throw new Error("<md-input-container> can only have *one* child <input>, <textarea> or <select> element!");u.input=n,u.label||M.expect(n,"aria-label",n.attr("placeholder")),r.$watch(_,u.setInvalid)}!function(){if(o=ie.element(n[0].querySelector(".md-select-menu-container")),s=r,i.mdContainerClass){var e=o[0].getAttribute("class")+" "+i.mdContainerClass;o[0].setAttribute("class",e)}(c=o.find("md-select-menu").controller("mdSelectMenu")).init(d,i.ngModel),n.on("$destroy",function(){o.remove()})}(),P(n),h&&ie.isDefined(i.multiple)&&D.nextTick(function(){var e=d.$modelValue||d.$viewValue;e&&h.$setPristine()});var b,v=d.$render;function y(){o&&(c=c||o.find("md-select-menu").controller("mdSelectMenu"),f.setLabelText(c.selectedLabels()))}function w(){if(a){var e=c.selectedLabels({mode:"aria"});n.attr("aria-label",e.length?a+": "+e:a)}}d.$render=function(){v(),y(),w(),S()},i.$observe("placeholder",d.$render),u&&u.label&&i.$observe("required",function(e){u.label.toggleClass("md-required",e&&!g)}),f.setLabelText=function(e){if(f.setIsPlaceholder(!e),i.mdSelectedText)e=$(i.mdSelectedText)(r);else{var t=i.placeholder||(u&&u.label?u.label.text():"");e=e||t||""}var n=p.children().eq(0);n.html(e)},f.setIsPlaceholder=function(e){e?(p.addClass("md-select-placeholder"),u&&u.label&&u.label.addClass("md-placeholder")):(p.removeClass("md-select-placeholder"),u&&u.label&&u.label.removeClass("md-placeholder"))},m||(n.on("focus",function(e){u&&u.setFocused(!0)}),n.on("blur",function(e){l&&(l=!1,s._mdSelectIsOpen&&e.stopImmediatePropagation()),s._mdSelectIsOpen||(u&&u.setFocused(!1),S())})),f.triggerClose=function(){$(i.mdOnClose)(r)},r.$$postDigest(function(){!function(){var e=n.attr("aria-label")||n.attr("placeholder");!e&&u&&u.label&&(e=u.label.text());a=e,M.expect(n,"aria-label",e)}(),y(),w()}),r.$watch(function(){return c.selectedLabels()},y),i.$observe("ngMultiple",function(e){b&&b();var t=$(e);b=r.$watch(function(){return t(r)},function(e,t){e===ae&&t===ae||(e?n.attr("multiple","multiple"):n.removeAttr("multiple"),n.attr("aria-multiselectable",e?"true":"false"),o&&(c.setMultiple(e),v=d.$render,d.$render=function(){v(),y(),w(),S()},d.$render()))})}),i.$observe("disabled",function(e){ie.isString(e)&&(e=!0),t!==ae&&t===e||((t=e)?n.attr({"aria-disabled":"true"}).removeAttr("tabindex").off("click",x).off("keydown",T):n.attr({tabindex:i.tabindex,"aria-disabled":"false"}).on("click",x).on("keydown",T))}),i.hasOwnProperty("disabled")||i.hasOwnProperty("ngDisabled")||(n.attr({"aria-disabled":"false"}),n.on("click",x),n.on("keydown",T));var C={role:"listbox","aria-expanded":"false","aria-multiselectable":k&&!i.ngMultiple?"true":"false"};n[0].hasAttribute("id")||(C.id="select_"+D.nextUid());var A="select_container_"+D.nextUid();function S(){u&&u.setHasValue(0<c.selectedLabels().length||(n[0].validity||{}).badInput)}function T(e){if(I.isNavigationKey(e))e.preventDefault(),x();else if(I.isInputKey(e)||I.isNumPadKey(e)){e.preventDefault();var t=c.optNodeForKeyboardSearch(e);if(!t||t.hasAttribute("disabled"))return;var n=ie.element(t).controller("mdOption");c.isMultiple||c.deselect(Object.keys(c.selected)[0]),c.select(n.hashKey,n.value),c.refreshViewValue()}}function x(){s._mdSelectIsOpen=!0,n.attr("aria-expanded","true"),E.show({scope:s,preserveScope:!0,skipCompile:!0,element:o,target:n[0],selectCtrl:f,preserveElement:!0,hasBackdrop:!0,loadingAsync:!!i.mdOnOpen&&(r.$eval(i.mdOnOpen)||!0)}).finally(function(){s._mdSelectIsOpen=!1,n.focus(),n.attr("aria-expanded","false"),d.$setTouched()})}o.attr("id",A),C["aria-owns"]=A,n.attr(C),r.$on("$destroy",function(){E.destroy().finally(function(){u&&(u.setFocused(!1),u.setHasValue(!1),u.input=null),d.$setTouched()})})}},controller:function(){}}}function t(h,p,m,i){return{restrict:"E",require:["mdSelectMenu"],scope:!(e.$inject=["$scope","$attrs","$element"]),controller:e,link:{pre:function(a,e,t,n){var o=n[0];function r(e){var t=p.getClosest(e.target,"md-option"),n=t&&ie.element(t).data("$mdOptionController");if(t&&n){if(t.hasAttribute("disabled"))return e.stopImmediatePropagation(),!1;var r=o.hashGetter(n.value),i=ie.isDefined(o.selected[r]);a.$apply(function(){o.isMultiple?i?o.deselect(r):o.select(r,n.value):i||(o.deselect(Object.keys(o.selected)[0]),o.select(r,n.value)),o.refreshViewValue()})}}e.addClass("_md"),i(e),e.on("click",r),e.on("keypress",function(e){13!=e.keyCode&&32!=e.keyCode||r(e)})}}};function e(i,e,a){var r,o=this;o.isMultiple=ie.isDefined(e.multiple),o.selected={},o.options={},i.$watchCollection(function(){return o.options},function(){o.ngModel.$render()}),o.setMultiple=function(e){var t=o.ngModel;function n(e,t){return ie.isArray(e||t||[])}r=r||t.$isEmpty,o.isMultiple=e,o.isMultiple?(t.$validators["md-multiple"]=n,t.$render=f,i.$watchCollection(o.modelBinding,function(e){n(e)&&f(),o.ngModel.$setPristine()}),t.$isEmpty=function(e){return!e||0===e.length}):(delete t.$validators["md-multiple"],t.$render=d)};var s,c,l,u="";function f(){var n=o.ngModel.$modelValue||o.ngModel.$viewValue||[];if(ie.isArray(n)){var e=Object.keys(o.selected),t=n.map(o.hashGetter);e.filter(function(e){return-1===t.indexOf(e)}).forEach(o.deselect),t.forEach(function(e,t){o.select(e,n[t])})}}function d(){var e=o.ngModel.$viewValue||o.ngModel.$modelValue;Object.keys(o.selected).forEach(o.deselect),o.select(o.hashGetter(e),e)}o.optNodeForKeyboardSearch=function(e){s&&clearTimeout(s),s=setTimeout(function(){u="",c=l=s=ae},300);var t=e.keyCode-(m.isNumPadKey(e)?48:0);u+=String.fromCharCode(t);var n=new RegExp("^"+u,"i");c||(c=a.find("md-option"),l=new Array(c.length),ie.forEach(c,function(e,t){l[t]=e.textContent.trim()}));for(var r=0;r<l.length;++r)if(n.test(l[r]))return c[r]},o.init=function(e,t){if(o.ngModel=e,o.modelBinding=t,o.ngModel.$isEmpty=function(e){return!o.options[o.hashGetter(e)]},e.$options&&e.$options.trackBy){var n={},r=h(e.$options.trackBy);o.hashGetter=function(e,t){return n.$value=e,r(t||i,n)}}else o.hashGetter=function(e){return ie.isObject(e)?"object_"+(e.$$mdSelectId||(e.$$mdSelectId=++g)):e};o.setMultiple(o.isMultiple)},o.selectedLabels=function(e){var t,n=(e=e||{}).mode||"html",r=p.nodesToArray(a[0].querySelectorAll("md-option[selected]"));return r.length?("html"==n?t=function(e){if(e.hasAttribute("md-option-empty"))return"";var t=e.innerHTML,n=e.querySelector(".md-ripple-container");n&&(t=t.replace(n.outerHTML,""));var r=e.querySelector(".md-container");return r&&(t=t.replace(r.outerHTML,"")),t}:"aria"==n&&(t=function(e){return e.hasAttribute("aria-label")?e.getAttribute("aria-label"):e.textContent}),r.map(t).join(", ")):""},o.select=function(e,t){var n=o.options[e];n&&n.setSelected(!0),o.selected[e]=t},o.deselect=function(e){var t=o.options[e];t&&t.setSelected(!1),delete o.selected[e]},o.addOption=function(e,t){if(ie.isDefined(o.options[e]))throw new Error('Duplicate md-option values are not allowed in a select. Duplicate value "'+t.value+'" found.');o.options[e]=t,ie.isDefined(o.selected[e])&&(o.select(e,t.value),ie.isDefined(o.ngModel.$modelValue)&&o.hashGetter(o.ngModel.$modelValue)===e&&o.ngModel.$validate(),o.refreshViewValue())},o.removeOption=function(e){delete o.options[e]},o.refreshViewValue=function(){var e,t=[];for(var n in o.selected)(e=o.options[n])?t.push(e.value):t.push(o.selected[n]);var r=o.ngModel.$options&&o.ngModel.$options.trackBy,i=o.isMultiple?t:t[0],a=o.ngModel.$modelValue;(r?ie.equals(a,i):a==i)||(o.ngModel.$setViewValue(i),o.ngModel.$render())}}}function n(r,i){return e.$inject=["$element"],{restrict:"E",require:["mdOption","^^mdSelectMenu"],controller:e,compile:function(e,t){e.append(ie.element('<div class="md-text">').append(e.contents())),e.attr("tabindex",t.tabindex||"0"),n=t,r=n.value,i=n.ngValue,r||i||e.attr("md-option-empty","");var n,r,i;return a}};function a(a,t,e,n){var o=n[0],s=n[1];function c(e,t,n){if(s.hashGetter){var r=s.hashGetter(t,a),i=s.hashGetter(e,a);o.hashKey=i,o.value=e,s.removeOption(r,o),s.addOption(i,o)}else n||a.$$postDigest(function(){c(e,t,!0)})}s.isMultiple&&(t.addClass("md-checkbox-enabled"),t.prepend(l.clone())),ie.isDefined(e.ngValue)?a.$watch(e.ngValue,c):ie.isDefined(e.value)?c(e.value):a.$watch(function(){return t.text().trim()},c),e.$observe("disabled",function(e){e?t.attr("tabindex","-1"):t.attr("tabindex","0")}),a.$$postDigest(function(){e.$observe("selected",function(e){ie.isDefined(e)&&("string"==typeof e&&(e=!0),e?(s.isMultiple||s.deselect(Object.keys(s.selected)[0]),s.select(o.hashKey,o.value)):s.deselect(o.hashKey),s.refreshViewValue())})}),r.attach(a,t),function(){var e={role:"option","aria-selected":"false"};t[0].hasAttribute("id")||(e.id="select_option_"+i.nextUid());t.attr(e)}(),a.$on("$destroy",function(){s.removeOption(o.hashKey,o)})}function e(t){this.selected=!1,this.setSelected=function(e){e&&!this.selected?t.attr({selected:"selected","aria-selected":"true"}):!e&&this.selected&&(t.removeAttr("selected"),t.attr("aria-selected","false")),this.selected=e}}}function r(e){return t.$inject=["$mdSelect","$mdConstant","$mdUtil","$window","$q","$$rAF","$animateCss","$animate","$document"],e("$mdSelect").setDefaults({methods:["target"],options:t});function t(l,u,O,R,a,f,d,h,N){var p=O.dom.animator,m=u.KEY_CODE;return{parent:"body",themable:!0,onShow:function(o,s,c){return c.loadingAsync&&!c.isRemoved&&(o.$$loadingAsyncDone=!1,a.when(c.loadingAsync).then(function(){o.$$loadingAsyncDone=!0,delete c.loadingAsync}).then(function(){f(i)})),function(e,t){var n=s.find("md-select-menu");if(!t.target)throw new Error(O.supplant("$mdSelect.show() expected a target element in options.target but got '{0}'!",[t.target]));ie.extend(t,{isRemoved:!1,target:ie.element(t.target),parent:ie.element(t.parent),selectEl:n,contentEl:s.find("md-content"),optionNodes:n[0].getElementsByTagName("md-option")})}(0,c),c.hideBackdrop=(t=o,r=c,r.disableParentScroll&&!O.getClosest(r.target,"MD-DIALOG")?r.restoreScroll=O.disableScrollAround(r.element,r.parent):r.disableParentScroll=!1,r.hasBackdrop&&(r.backdrop=O.createBackdrop(t,"md-select-backdrop md-click-catcher"),h.enter(r.backdrop,N[0].body,null,{duration:0})),function(){r.backdrop&&r.backdrop.remove(),r.disableParentScroll&&r.restoreScroll(),delete r.restoreScroll}),(n=s,e=c,e.parent.append(n),a(function(e,t){try{d(n,{removeClass:"md-leave",duration:0}).start().then(i).then(e)}catch(e){t(e)}})).then(function(e){var t,n,r,i,a;return s.attr("aria-hidden","false"),c.alreadyOpen=!0,c.cleanupInteraction=function(){if(!c.isRemoved){var r=c.selectEl,t=r.controller("mdSelectMenu")||{};return s.addClass("md-clickable"),c.backdrop&&c.backdrop.on("click",e),r.on("keydown",n),r.on("click",a),function(){c.backdrop&&c.backdrop.off("click",e),r.off("keydown",n),r.off("click",a),s.removeClass("md-clickable"),c.isRemoved=!0}}function e(e){e.preventDefault(),e.stopPropagation(),c.restoreFocus=!1,O.nextTick(l.hide,!0)}function n(e){switch(e.preventDefault(),e.stopPropagation(),e.keyCode){case m.UP_ARROW:return void i("prev");case m.DOWN_ARROW:return void i("next");case m.SPACE:case m.ENTER:var t=O.getClosest(e.target,"md-option");t&&(r.triggerHandler({type:"click",target:t}),e.preventDefault()),a(e);break;case m.TAB:case m.ESCAPE:e.stopPropagation(),e.preventDefault(),c.restoreFocus=!0,O.nextTick(l.hide,!0);break;default:if(u.isInputKey(e)||u.isNumPadKey(e)){var n=r.controller("mdSelectMenu").optNodeForKeyboardSearch(e);c.focusedNode=n||c.focusedNode,n&&n.focus()}}}function i(e){for(var t,n=O.nodesToArray(c.optionNodes),r=n.indexOf(c.focusedNode);-1===r?r=0:"next"===e&&r<n.length-1?r++:"prev"===e&&0<r&&r--,(t=n[r]).hasAttribute("disabled")&&(t=ae),!t&&r<n.length-1&&0<r;);t&&t.focus(),c.focusedNode=t}function a(i){if(!(i&&"click"==i.type&&i.currentTarget!=r[0]||function(){var e=!1;if(i&&0<i.currentTarget.children.length){var t=i.currentTarget.children[0],n=t.scrollHeight>t.clientHeight;if(n&&0<t.children.length){var r=i.pageX-i.currentTarget.getBoundingClientRect().left;r>t.querySelector("md-option").offsetWidth&&(e=!0)}}return e}())){var e=O.getClosest(i.target,"md-option");e&&e.hasAttribute&&!e.hasAttribute("disabled")&&(i.preventDefault(),i.stopPropagation(),t.isMultiple||(c.restoreFocus=!0,O.nextTick(function(){l.hide(t.ngModel.$viewValue)},!0)))}}}(),c.cleanupResizing=(r=o,i=s,a=c,t=function(){if(!a.isRemoved){var e=g(r,i,a),t=e.container,n=e.dropDown;t.element.css(p.toCss(t.styles)),n.element.css(p.toCss(n.styles))}},(n=ie.element(R)).on("resize",t),n.on("orientationchange",t),function(){n.off("resize",t),n.off("orientationchange",t)}),e},c.hideBackdrop);var n,e;var t,r;function i(){return a(function(t){if(c.isRemoved)return a.reject(!1);var n=g(o,s,c);n.container.element.css(p.toCss(n.container.styles)),n.dropDown.element.css(p.toCss(n.dropDown.styles)),f(function(){var e;s.addClass("md-active"),n.dropDown.element.css(p.toCss({transform:""})),(e=c.focusedNode)&&!e.hasAttribute("disabled")&&e.focus(),t()})})}},onRemove:function(e,t,n){return(n=n||{}).cleanupInteraction(),n.cleanupResizing(),n.hideBackdrop(),!0===n.$destroy?r():d(t,{addClass:"md-leave"}).start().then(r);function r(){t.removeClass("md-active"),t.attr("aria-hidden","true"),t[0].style.display="none",function(e){var t=e.selectCtrl;if(t){var n=e.selectEl.controller("mdSelectMenu");t.setLabelText(n?n.selectedLabels():""),t.triggerClose()}}(n),!n.$destroy&&n.restoreFocus&&n.target.focus()}},hasBackdrop:!0,disableParentScroll:!0};function g(e,t,n){var r,i,a=t[0],o=n.target[0].children[0],s=N[0].body,c=n.selectEl[0],l=n.contentEl[0],u=s.getBoundingClientRect(),f=o.getBoundingClientRect(),d={left:u.left+F,top:F,bottom:u.height-F,right:u.width-F-(O.floatingScrollbars()?16:0)},h=f.top-d.top,p=(f.left,f.left,f.width,d.bottom-(f.top+f.height)),m=u.width-2*F,g=c.querySelector("md-option[selected]"),_=c.getElementsByTagName("md-option"),b=c.getElementsByTagName("md-optgroup"),v=function(e,t){var n=!1;try{var r=e[0].style.display;e[0].style.display="block",n=t.scrollHeight>t.offsetHeight,e[0].style.display=r}finally{}return n}(t,l);r=(i=n.loadingAsync)&&ie.isFunction(i.then)?l.firstElementChild||l:g||(b.length?b[0]:_.length?_[0]:l.firstElementChild||l),l.offsetWidth>m?l.style["max-width"]=m+"px":l.style.maxWidth=null,v&&c.classList.add("md-overflow");var y=r;"MD-OPTGROUP"===(y.tagName||"").toUpperCase()&&(r=y=_[0]||l.firstElementChild||l),n.focusedNode=y,a.style.display="block";var w,C,A,S,T,x,k=c.getBoundingClientRect(),E=(w=r)?{left:w.offsetLeft,top:w.offsetTop,width:w.offsetWidth,height:w.offsetHeight}:{left:0,top:0,width:0,height:0};if(r){var D=R.getComputedStyle(r);E.paddingLeft=parseInt(D.paddingLeft,10)||0,E.paddingRight=parseInt(D.paddingRight,10)||0}if(v){var I=l.offsetHeight/2;l.scrollTop=E.top+E.height/2-I,h<I?l.scrollTop=Math.min(E.top,l.scrollTop+I-h):p<I&&(l.scrollTop=Math.max(E.top+E.height-k.height,l.scrollTop-I+p))}C=f.left+E.left-E.paddingLeft+2,A=Math.floor(f.top+f.height/2-E.height/2-E.top+l.scrollTop)+2,S=E.left+f.width/2+"px "+(E.top+E.height/2-l.scrollTop)+"px 0px",T=Math.min(f.width+E.paddingLeft+E.paddingRight,m),x=G.getComputedStyle(o)["font-size"];var P=a.getBoundingClientRect(),M=Math.round(100*Math.min(f.width/k.width,1))/100,$=Math.round(100*Math.min(f.height/k.height,1))/100;return{container:{element:ie.element(a),styles:{left:Math.floor(L(d.left,C,d.right-P.width)),top:Math.floor(L(d.top,A,d.bottom-P.height)),"min-width":T,"font-size":x}},dropDown:{element:ie.element(c),styles:{transformOrigin:S,transform:n.alreadyOpen?"":O.supplant("scale({0},{1})",[M,$])}}}}}function L(e,t,n){return Math.max(e,Math.min(t,n))}}ie.module("material.components.select",["material.core","material.components.backdrop"]).directive("mdSelect",e).directive("mdSelectMenu",t).directive("mdOption",n).directive("mdOptgroup",function(){return{restrict:"E",compile:function(t,n){t.parent().find("md-select-header").length||function(){var e=t.find("label");e.length||(e=ie.element("<label>"),t.prepend(e));e.addClass("md-container-ignore"),n.label&&e.text(n.label)}()}}}).directive("mdSelectHeader",function(){return{restrict:"E"}}).provider("$mdSelect",r)}(),function(){function e(c,l){return["$mdUtil","$window",function(o,s){return{restrict:"A",multiElement:!0,link:function(r,i,t){var a=r.$on("$md-resize-enable",function(){a();var e=i[0],n=e.nodeType===s.Node.ELEMENT_NODE?s.getComputedStyle(e):{};r.$watch(t[c],function(e){if(!!e===l){o.nextTick(function(){r.$broadcast("$md-resize")});var t={cachedTransitionStyles:n};o.dom.animator.waitTransitionEnd(i,t).then(function(){r.$broadcast("$md-resize")})}})})}}}]}ie.module("material.components.showHide",["material.core"]).directive("ngShow",e("ngShow",!0)).directive("ngHide",e("ngHide",!1))}(),function(){function e(r,c,l,i){var u="SideNav '{0}' is not available! Did you use md-component-id='{0}'?",f={find:function(e,t){var n=r.get(e);return n||t?n:(i.error(c.supplant(u,[e||""])),ae)},waitFor:d};return function(e,t){if(ie.isUndefined(e))return f;var n,r,i,a,o=!0===t,s=f.find(e,o);return!s&&o?f.waitFor(e):!s&&ie.isUndefined(t)?(n=f,r=e,i=function(){return!1},a=function(){return l.when(c.supplant(u,[r||""]))},ie.extend({isLockedOpen:i,isOpen:i,toggle:a,open:a,close:a,onClose:ie.noop,then:function(e){return d(r).then(e||ie.noop)}},n)):s};function d(e){return r.when(e).catch(i.error)}}function t(r,m,i,g,_,e,b,v,y,w){return{restrict:"E",scope:{isOpen:"=?mdIsOpen"},controller:"$mdSidenavController",compile:function(e){return e.addClass("md-closed"),e.attr("tabIndex","-1"),t}};function t(a,o,e,t){var s,c,l,u=null,f=null,d=y.when(!0),n=b(e.mdIsLockedOpen);function h(e){return e.keyCode===i.KEY_CODE.ESCAPE?p(e):y.when(!0)}function p(e){return e.preventDefault(),t.close()}e.mdDisableScrollTarget&&((u=w[0].querySelector(e.mdDisableScrollTarget))?u=ie.element(u):v.warn(m.supplant('mdSidenav: couldn\'t find element matching selector "{selector}". Falling back to parent.',{selector:e.mdDisableScrollTarget}))),u||(u=o.parent()),e.hasOwnProperty("mdDisableBackdrop")||(c=m.createBackdrop(a,"md-sidenav-backdrop md-opaque ng-enter")),o.addClass("_md"),g(o),c&&g.inherit(c,o),o.on("$destroy",function(){c&&c.remove(),t.destroy()}),a.$on("$destroy",function(){c&&c.remove()}),a.$watch(function(){return n(a.$parent,{$media:function(e){return v.warn("$media is deprecated for is-locked-open. Use $mdMedia instead."),r(e)},$mdMedia:r})},function(e,t){(a.isLockedOpen=e)===t?o.toggleClass("md-locked-open",!!e):_[e?"addClass":"removeClass"](o,"md-locked-open");c&&c.toggleClass("md-locked-open",!!e)}),a.$watch("isOpen",function(e){var t=m.findFocusTarget(o)||m.findFocusTarget(o,"[md-sidenav-focus]")||o,n=o.parent();n[e?"on":"off"]("keydown",h),c&&c[e?"on":"off"]("click",p);var r=function(e,t){var n=o[0],r=e[0].scrollTop;if(t&&r){l={top:n.style.top,bottom:n.style.bottom,height:n.style.height};var i={top:r+"px",bottom:"auto",height:e[0].clientHeight+"px"};o.css(i),c.css(i)}if(!t&&l)return function(){n.style.top=l.top,n.style.bottom=l.bottom,n.style.height=l.height,c[0].style.top=null,c[0].style.bottom=null,c[0].style.height=null,l=null}}(n,e);e&&(f=w[0].activeElement);return i=e,i&&!s?(s=u.css("overflow"),u.css("overflow","hidden")):ie.isDefined(s)&&(u.css("overflow",s),s=ae),d=y.all([e&&c?_.enter(c,n):c?_.leave(c):y.when(!0),_[e?"removeClass":"addClass"](o,"md-closed")]).then(function(){a.isOpen&&t&&t.focus(),r&&r()});var i}),t.$toggleOpen=function(e){return a.isOpen==e?y.when(!0):(a.isOpen&&t.onCloseCb&&t.onCloseCb(),y(function(t){a.isOpen=e,m.nextTick(function(){d.then(function(e){a.isOpen||(f&&f.focus(),f=null),t(e)})})}))}}}function n(t,e,n,r,i){var a=this;a.isOpen=function(){return!!t.isOpen},a.isLockedOpen=function(){return!!t.isLockedOpen},a.onClose=function(e){return a.onCloseCb=e,a},a.open=function(){return a.$toggleOpen(!0)},a.close=function(){return a.$toggleOpen(!1)},a.toggle=function(){return a.$toggleOpen(!t.isOpen)},a.$toggleOpen=function(e){return i.when(t.isOpen=e)},a.destroy=r.register(a,n.mdComponentId)}e.$inject=["$mdComponentRegistry","$mdUtil","$q","$log"],t.$inject=["$mdMedia","$mdUtil","$mdConstant","$mdTheming","$animate","$compile","$parse","$log","$q","$document"],n.$inject=["$scope","$element","$attrs","$mdComponentRegistry","$q"],ie.module("material.components.sidenav",["material.core","material.components.backdrop"]).factory("$mdSidenav",e).directive("mdSidenav",t).directive("mdSidenavFocus",function(){return{restrict:"A",require:"^mdSidenav",link:function(e,t,n,r){}}}).controller("$mdSidenavController",n)}(),function(){function e(H,W,i,q,z,V,Y,K,Q,X){return{scope:{},require:["?ngModel","?^mdSliderContainer"],template:'<div class="md-slider-wrapper"><div class="md-slider-content"><div class="md-track-container"><div class="md-track"></div><div class="md-track md-track-fill"></div><div class="md-track-ticks"></div></div><div class="md-thumb-container"><div class="md-thumb"></div><div class="md-focus-thumb"></div><div class="md-focus-ring"></div><div class="md-sign"><span class="md-thumb-text"></span></div><div class="md-disabled-thumb"></div></div></div></div>',compile:function(e,t){var n=ie.element(e[0].getElementsByClassName("md-slider-wrapper")),r=t.tabindex||0;n.attr("tabindex",r),(t.disabled||t.ngDisabled)&&n.attr("tabindex",-1);return n.attr("role","slider"),i.expect(e,"aria-label"),a}};function a(i,a,e,t){V(a);var n=t[0]||{$setViewValue:function(e){this.$viewValue=e,this.$viewChangeListeners.forEach(function(e){e()})},$parsers:[],$formatters:[],$viewChangeListeners:[]},r=t[1],o=(ie.element(q.getClosest(a,"_md-slider-container",!0)),e.ngDisabled?ie.bind(null,K(e.ngDisabled),i.$parent):function(){return a[0].hasAttribute("disabled")}),s=ie.element(a[0].querySelector(".md-thumb")),c=ie.element(a[0].querySelector(".md-thumb-text")),l=s.parent(),u=ie.element(a[0].querySelector(".md-track-container")),f=ie.element(a[0].querySelector(".md-track-fill")),d=ie.element(a[0].querySelector(".md-track-ticks")),h=ie.element(a[0].getElementsByClassName("md-slider-wrapper")),p=(ie.element(a[0].getElementsByClassName("md-slider-content")),q.throttle(P,5e3)),m=ie.isDefined(e.mdVertical),g=ie.isDefined(e.mdDiscrete),_=ie.isDefined(e.mdInvert);ie.isDefined(e.min)?e.$observe("min",x):x(0),ie.isDefined(e.max)?e.$observe("max",k):k(100),ie.isDefined(e.step)?e.$observe("step",E):E(1),ie.isDefined(e.round)?e.$observe("round",D):D(3);ie.noop;function b(){P(),O()}e.ngDisabled&&i.$parent.$watch(e.ngDisabled,function(){a.attr("aria-disabled",!!o())}),Y.register(h,"drag",{horizontal:!m}),i.mouseActive=!1,h.on("keydown",function(e){if(o())return;var t;(m?e.keyCode===z.KEY_CODE.DOWN_ARROW:e.keyCode===z.KEY_CODE.LEFT_ARROW)?t=-w:(m?e.keyCode===z.KEY_CODE.UP_ARROW:e.keyCode===z.KEY_CODE.RIGHT_ARROW)&&(t=w);(t=_?-t:t)&&((e.metaKey||e.ctrlKey||e.altKey)&&(t*=4),e.preventDefault(),e.stopPropagation(),i.$evalAsync(function(){$(n.$viewValue+t)}))}).on("mousedown",function(){(function(){if(!g||o())return;if(ie.isUndefined(w))return;if(w<=0){var e="Slider step value must be greater than zero when in discrete mode";throw Q.error(e),new Error(e)}var t=Math.floor((y-v)/w);A||(A=ie.element("<canvas>").css("position","absolute"),d.append(A),S=A[0].getContext("2d"));var n,r=M();!r||r.height||r.width||(P(),r=I);A[0].width=r.width,A[0].height=r.height;for(var i=0;i<=t;i++){var a=W.getComputedStyle(d[0]);S.fillStyle=a.color||"black",n=Math.floor((m?r.height:r.width)*(i/t)),S.fillRect(m?0:n-1,m?n-1:0,m?r.width:2,m?2:r.height)}})(),i.mouseActive=!0,h.removeClass("md-focused"),X(function(){i.mouseActive=!1},100)}).on("focus",function(){!1===i.mouseActive&&h.addClass("md-focused")}).on("blur",function(){h.removeClass("md-focused"),a.removeClass("md-active"),function(){if(A&&S){var e=M();S.clearRect(0,0,e.width,e.height)}}()}).on("$md.pressdown",function(e){if(o())return;a.addClass("md-active"),a[0].focus(),P();var t=R(N(B(j(m?e.pointer.y:e.pointer.x))));i.$apply(function(){$(t),L(U(t))})}).on("$md.pressup",function(e){if(o())return;a.removeClass("md-dragging");var t=R(N(B(j(m?e.pointer.y:e.pointer.x))));i.$apply(function(){$(t),O()})}).on("$md.dragstart",function(e){if(o())return;F=!0,e.stopPropagation(),a.addClass("md-dragging"),G(e)}).on("$md.drag",function(e){if(!F)return;e.stopPropagation(),G(e)}).on("$md.dragend",function(e){if(!F)return;e.stopPropagation(),F=!1}),setTimeout(b,0);var v,y,w,C,A,S,T=H.throttle(b);function x(e){v=parseFloat(e),a.attr("aria-valuemin",e),b()}function k(e){y=parseFloat(e),a.attr("aria-valuemax",e),b()}function E(e){w=parseFloat(e)}function D(e){C=R(parseInt(e),0,6)}ie.element(W).on("resize",T),i.$on("$destroy",function(){ie.element(W).off("resize",T)}),n.$render=O,n.$viewChangeListeners.push(O),n.$formatters.push(R),n.$formatters.push(N);var I={};function P(){I=u[0].getBoundingClientRect()}function M(){return p(),I}function $(e){n.$setViewValue(R(N(e)))}function O(){isNaN(n.$viewValue)&&(n.$viewValue=n.$modelValue),n.$viewValue=R(n.$viewValue);var e=U(n.$viewValue);i.modelValue=n.$viewValue,a.attr("aria-valuenow",n.$viewValue),L(e),c.text(n.$viewValue)}function R(e,t,n){if(ie.isNumber(e))return t=ie.isNumber(t)?t:v,n=ie.isNumber(n)?n:y,Math.max(t,Math.min(n,e))}function N(e){if(ie.isNumber(e)){var t=Math.round((e-v)/w)*w+v;return t=Math.round(t*Math.pow(10,C))/Math.pow(10,C),r&&r.fitInputWidthToTextLength&&q.debounce(function(){r.fitInputWidthToTextLength(t.toString().length)},100)(),t}}function L(e){var t;t=e;var n=100*(e=Math.max(0,Math.min(t||0,1)))+"%",r=_?100*(1-e)+"%":n;m?l.css("bottom",n):q.bidiProperty(l,"left","right",n),f.css(m?"height":"width",r),a.toggleClass(_?"md-max":"md-min",0===e),a.toggleClass(_?"md-min":"md-max",1===e)}P();var F=!1;function G(e){var t,n,r;g?(n=m?e.pointer.y:e.pointer.x,r=R(N(B(j(n)))),L(j(n)),c.text(r)):(t=m?e.pointer.y:e.pointer.x,i.$evalAsync(function(){$(B(j(t)))}))}function j(e){var t=(e-(m?I.top:I.left))/(m?I.height:I.width);return m||"rtl"!==q.bidi()||(t=1-t),Math.max(0,Math.min(1,m?1-t:t))}function B(e){return v+(_?1-e:e)*(y-v)}function U(e){var t=(e-v)/(y-v);return _?1-t:t}}}e.$inject=["$$rAF","$window","$mdAria","$mdUtil","$mdConstant","$mdTheming","$mdGesture","$parse","$log","$timeout"],ie.module("material.components.slider",["material.core"]).directive("mdSlider",e).directive("mdSliderContainer",function(){return{controller:function(){},compile:function(e){var t=e.find("md-slider");if(t){var n=t.attr("md-vertical");return n!==ae&&e.attr("md-vertical",""),t.attr("flex")||t.attr("flex",""),function(e,o,t,n){function r(e){o.children().attr("disabled",e),o.find("input").attr("disabled",e)}o.addClass("_md");var s,i=ie.noop;t.disabled?r(!0):t.ngDisabled&&(i=e.$watch(t.ngDisabled,function(e){r(e)})),e.$on("$destroy",function(){i()}),n.fitInputWidthToTextLength=function(e){var t=o[0].querySelector("md-input-container");if(t){var n=getComputedStyle(t),r=parseInt(n.minWidth),i=2*parseInt(n.padding);s=s||parseInt(n.maxWidth);var a=Math.max(s,r+i+r/2*e);t.style.maxWidth=a+"px"}}}}}}})}(),function(){function e(l,u,f,s){var c=f.checkStickySupport();return function(e,t,n){var r=t.controller("mdContent");if(r)if(c)t.css({position:c,top:0,"z-index":2});else{var i=r.$element.data("$$sticky");i||(i=function(e){var r,i=e.$element,a=u.throttle(t);return function(e){var t,n,r=200;function i(){+f.now()-n>r?(t=!1,e.triggerHandler("$scrollend")):(e.triggerHandler("$scroll"),u.throttle(i))}e.on("scroll touchmove",function(){t||(t=!0,u.throttle(i),e.triggerHandler("$scrollstart")),e.triggerHandler("$scroll"),n=+f.now()})}(i),i.on("$scrollstart",a),i.on("$scroll",function e(){var t=i.prop("scrollTop"),n=(e.prevScrollTop||0)<t;if(0!==(e.prevScrollTop=t)){if(n){if(r.next&&r.next.top<=t)return void s(r.next);if(r.current&&r.next&&r.next.top-t<=r.next.height)return void c(r.current,t+(r.next.top-r.next.height-t))}if(!n){if(r.current&&r.prev&&t<r.current.top)return void s(r.prev);if(r.next&&r.current&&t>=r.next.top-r.current.height)return void c(r.current,t+(r.next.top-t-r.current.height))}r.current&&c(r.current,t)}else s(null)}),r={prev:null,current:null,next:null,items:[],add:function(n,e){e.addClass("md-sticky-clone");var t={element:n,clone:e};return r.items.push(t),f.nextTick(function(){i.prepend(t.clone)}),a(),function(){r.items.forEach(function(e,t){e.element[0]===n[0]&&(r.items.splice(t,1),e.clone.remove())}),a()}},refreshElements:t};function t(){var e;r.items.forEach(o),r.items=r.items.sort(function(e,t){return e.top<t.top?-1:1});for(var t=i.prop("scrollTop"),n=r.items.length-1;0<=n;n--)if(t>r.items[n].top){e=r.items[n];break}s(e)}function o(e){var t=e.element[0];for(e.top=0,e.left=0,e.right=0;t&&t!==i[0];)e.top+=t.offsetTop,e.left+=t.offsetLeft,t.offsetParent&&(e.right+=t.offsetParent.offsetWidth-t.offsetWidth-t.offsetLeft),t=t.offsetParent;e.height=e.element.prop("offsetHeight");var n=f.floatingScrollbars()?"0":ae;f.bidi(e.clone,"margin-left",e.left,n),f.bidi(e.clone,"margin-right",n,e.right)}function s(e){if(r.current!==e){r.current&&(c(r.current,null),n(r.current,null)),e&&n(e,"active"),r.current=e;var t=r.items.indexOf(e);r.next=r.items[t+1],r.prev=r.items[t-1],n(r.next,"next"),n(r.prev,"prev")}}function n(e,t){e&&e.state!==t&&(e.state&&(e.clone.attr("sticky-prev-state",e.state),e.element.attr("sticky-prev-state",e.state)),e.clone.attr("sticky-state",t),e.element.attr("sticky-state",t),e.state=t)}function c(e,t){e&&(null===t||t===ae?e.translateY&&(e.translateY=null,e.clone.css(l.CSS.TRANSFORM,"")):(e.translateY=t,f.bidi(e.clone,l.CSS.TRANSFORM,"translate3d("+e.left+"px,"+t+"px,0)","translateY("+t+"px)")))}}(r),r.$element.data("$$sticky",i));var a=n||s(t.clone())(e),o=i.add(t,a);e.$on("$destroy",o)}}}e.$inject=["$mdConstant","$$rAF","$mdUtil","$compile"],ie.module("material.components.sticky",["material.core","material.components.content"]).factory("$mdSticky",e)}(),function(){function e(s,c,l,u){return{restrict:"E",replace:!0,transclude:!0,template:'<div class="md-subheader _md">  <div class="md-subheader-inner">    <div class="md-subheader-content"></div>  </div></div>',link:function(n,r,e,t,i){l(r),r.addClass("_md"),u.prefixer().removeAttribute(r,"ng-repeat");var a=r[0].outerHTML;function o(e){return ie.element(e[0].querySelector(".md-subheader-content"))}i(n,function(e){o(r).append(e)}),r.hasClass("md-no-sticky")||i(n,function(e){var t=c('<div class="md-subheader-wrapper">'+a+"</div>")(n);u.nextTick(function(){o(t).append(e)}),s(n,r,t)})}}}e.$inject=["$mdSticky","$compile","$mdTheming","$mdUtil"],ie.module("material.components.subheader",["material.core","material.components.sticky"]).directive("mdSubheader",e)}(),function(){function e(e){t.$inject=["$parse"];var a="md"+e,o="$md."+e.toLowerCase();return t;function t(i){return{restrict:"A",link:function(t,e,n){var r=i(n[a]);e.on(o,function(e){t.$applyAsync(function(){r(t,{$event:e})})})}}}}ie.module("material.components.swipe",["material.core"]).directive("mdSwipeLeft",e("SwipeLeft")).directive("mdSwipeRight",e("SwipeRight")).directive("mdSwipeUp",e("SwipeUp")).directive("mdSwipeDown",e("SwipeDown"))}(),function(){function e(e,l,u,f,d,h,p){var n=e[0];return{restrict:"E",priority:210,transclude:!0,template:'<div class="md-container"><div class="md-bar"></div><div class="md-thumb-container"><div class="md-thumb" md-ink-ripple md-ink-ripple-checkbox></div></div></div><div ng-transclude class="md-label"></div>',require:"?ngModel",compile:function(e,t){var c=n.compile(e,t).post;return e.addClass("md-dragging"),function(n,r,e,i){i=i||l.fakeNgModel();var t=null;null!=e.disabled?t=function(){return!0}:e.ngDisabled&&(t=f(e.ngDisabled));var a,o=ie.element(r[0].querySelector(".md-thumb-container")),s=ie.element(r[0].querySelector(".md-container"));d(function(){r.removeClass("md-dragging")}),c(n,r,e,i),t&&n.$watch(t,function(e){r.attr("tabindex",e?-1:0)}),h.register(s,"drag"),s.on("$md.dragstart",function(e){t&&t(n)||(e.stopPropagation(),r.addClass("md-dragging"),a={width:o.prop("offsetWidth")})}).on("$md.drag",function(e){if(a){e.stopPropagation(),e.srcEvent&&e.srcEvent.preventDefault();var t=e.pointer.distanceX/a.width,n=i.$viewValue?1+t:t;n=Math.max(0,Math.min(1,n)),o.css(u.CSS.TRANSFORM,"translate3d("+100*n+"%,0,0)"),a.translate=n}}).on("$md.dragend",function(e){var t;a&&(e.stopPropagation(),r.removeClass("md-dragging"),o.css(u.CSS.TRANSFORM,""),(i.$viewValue?a.translate<.5:.5<a.translate)&&(t=!i.$viewValue,n.$apply(function(){i.$setViewValue(t),i.$render()})),a=null,n.skipToggle=!0,p(function(){n.skipToggle=!1},1))})}}}}e.$inject=["mdCheckboxDirective","$mdUtil","$mdConstant","$parse","$$rAF","$mdGesture","$timeout"],ie.module("material.components.switch",["material.core","material.components.checkbox"]).directive("mdSwitch",e)}(),ie.module("material.components.tabs",["material.core","material.components.icon"]),function(){function e(n){return{restrict:"E",link:function(e,t){t.addClass("_md"),e.$on("$destroy",function(){n.destroy()})}}}function t(e){n.$inject=["$animate","$mdToast","$mdUtil","$mdMedia"];var u;function t(e){u=e}return e("$mdToast").setDefaults({methods:["position","hideDelay","capsule","parent","position","toastClass"],options:n}).addPreset("simple",{argOption:"textContent",methods:["textContent","content","action","highlightAction","highlightClass","theme","parent"],options:["$mdToast","$mdTheming",function(n,e){return{template:'<md-toast md-theme="{{ toast.theme }}" ng-class="{\'md-capsule\': toast.capsule}">  <div class="md-toast-content">    <span class="md-toast-text" role="alert" aria-relevant="all" aria-atomic="true">      {{ toast.content }}    </span>    <md-button class="md-action" ng-if="toast.action" ng-click="toast.resolve()"         ng-class="highlightClasses">      {{ toast.action }}    </md-button>  </div></md-toast>',controller:["$scope",function(e){var t=this;t.highlightAction&&(e.highlightClasses=["md-highlight",t.highlightClass]),e.$watch(function(){return u},function(){t.content=u}),this.resolve=function(){n.hide("ok")}}],theme:e.defaultTheme(),controllerAs:"toast",bindToController:!0}}]}).addMethod("updateTextContent",t).addMethod("updateContent",t);function n(r,s,c,n){var l="$md.swipeleft $md.swiperight $md.swipeup $md.swipedown";return{onShow:function(e,i,a){u=a.textContent||a.content;var o=!n("gt-sm");i=c.extractElementByName(i,"md-toast",!0),a.element=i,a.onSwipe=function(e,t){var n=e.type.replace("$md.",""),r=n.replace("swipe","");"down"===r&&-1!=a.position.indexOf("top")&&!o||"up"===r&&(-1!=a.position.indexOf("bottom")||o)||("left"!==r&&"right"!==r||!o)&&(i.addClass("md-"+n),c.nextTick(s.cancel))},a.openClass=(t=a.position,n("gt-xs")?"md-toast-open-"+(-1<t.indexOf("top")?"top":"bottom"):"md-toast-open-bottom"),i.addClass(a.toastClass),a.parent.addClass(a.openClass),c.hasComputedStyle(a.parent,"position","static")&&a.parent.css("position","relative");var t;i.on(l,a.onSwipe),i.addClass(o?"md-bottom":a.position.split(" ").map(function(e){return"md-"+e}).join(" ")),a.parent&&a.parent.addClass("md-toast-animating");return r.enter(i,a.parent).then(function(){a.parent&&a.parent.removeClass("md-toast-animating")})},onRemove:function(e,t,n){t.off(l,n.onSwipe),n.parent&&n.parent.addClass("md-toast-animating");n.openClass&&n.parent.removeClass(n.openClass);return(1==n.$destroy?t.remove():r.leave(t)).then(function(){n.parent&&n.parent.removeClass("md-toast-animating"),c.hasComputedStyle(n.parent,"position","static")&&n.parent.css("position","")})},toastClass:"",position:"bottom left",themable:!0,hideDelay:3e3,autoWrap:!0,transformTemplate:function(e,t){if(t.autoWrap&&e&&!/md-toast-content/g.test(e)){var n=document.createElement("md-template");n.innerHTML=e;for(var r=0;r<n.children.length;r++)if("MD-TOAST"===n.children[r].nodeName){var i=ie.element('<div class="md-toast-content">');i.append(ie.element(n.children[r].childNodes)),n.children[r].appendChild(i[0])}return n.innerHTML}return e||""}}}}e.$inject=["$mdToast"],t.$inject=["$$interimElementProvider"],ie.module("material.components.toast",["material.core","material.components.button"]).directive("mdToast",e).provider("$mdToast",t)}(),function(){function e(m,g,_,e,b){var v=ie.bind(null,_.supplant,"translate3d(0,{0}px,0)");return{template:"",restrict:"E",link:function(d,h,p){h.addClass("_md"),e(h),_.nextTick(function(){h.addClass("_md-toolbar-transitions")},!1),ie.isDefined(p.mdScrollShrink)&&function(){var n,r,i=ie.noop,a=0,o=0,s=p.mdShrinkSpeedFactor||.5,c=m.throttle(t),l=_.debounce(e,5e3);d.$on("$mdContentLoaded",u),p.$observe("mdScrollShrink",function(e){var t=h.parent().find("md-content");!r&&t.length&&u(null,t),!1===(e=d.$eval(e))?i():i=f()}),p.ngShow&&d.$watch(p.ngShow,e);p.ngHide&&d.$watch(p.ngHide,e);function u(e,t){t&&h.parent()[0]===t.parent()[0]&&(r&&r.off("scroll",c),r=t,i=f())}function t(e){var t=e?e.target.scrollTop:o;l(),a=Math.min(n/s,Math.max(0,a+t-o)),h.css(g.CSS.TRANSFORM,v([-a*s])),r.css(g.CSS.TRANSFORM,v([(n-a)*s])),o=t,_.nextTick(function(){var e=h.hasClass("md-whiteframe-z1");e&&!a?b.removeClass(h,"md-whiteframe-z1"):!e&&a&&b.addClass(h,"md-whiteframe-z1")})}function f(){return r?(r.on("scroll",c),r.attr("scroll-shrink","true"),_.nextTick(e,!1),function(){r.off("scroll",c),r.attr("scroll-shrink","false"),e()}):ie.noop}function e(){var e=-(n=h.prop("offsetHeight"))*s+"px";r.css({"margin-top":e,"margin-bottom":e}),t()}d.$on("$destroy",i)}()}}}e.$inject=["$$rAF","$mdConstant","$mdUtil","$mdTheming","$animate"],ie.module("material.components.toolbar",["material.core","material.components.content"]).directive("mdToolbar",e)}(),function(){function e(p,m,a,g,_,b,e,v,t,y){var w="focus touchstart mouseenter",C="blur touchcancel mouseleave",A="md-show";return{restrict:"E",transclude:!0,priority:210,template:'<div class="md-content _md" ng-transclude></div>',scope:{delay:"=?mdDelay",visible:"=?mdVisible",autohide:"=?mdAutohide",direction:"@?mdDirection"},compile:function(e,t){return t.mdDirection||t.$set("mdDirection","bottom"),n}};function n(c,o,l){b(o);var u=_.getParentWithPointerEvents(o),t=ie.element(o[0].getElementsByClassName("md-content")[0]),s=ie.element(document.body),f=null,d=a.throttle(function(){i()});function e(){var e="center top";switch(c.direction){case"left":e="right center";break;case"right":e="left center";break;case"top":e="center bottom";break;case"bottom":e="center top"}t.css("transform-origin",e)}function n(e){e?function(){if(!o[0].textContent.trim())return;if(o.css({top:0,left:0}),s.append(o),_.hasComputedStyle(o,"display","none"))return c.visible=!1,o.detach();i(),v.addClass(t,A).then(function(){o.addClass(A)})}():v.removeClass(t,A).then(function(){o.removeClass(A),c.visible||o.detach()})}function r(e){if((e||!u.attr("aria-label"))&&!u.text().trim()){var t=e||o.text().trim(),n=y(t)(u.scope());u.attr("aria-label",n)}}function h(e){h.queued&&h.value===!!e||!h.queued&&c.visible===!!e||(h.value=!!e,h.queued||(e?(h.queued=!0,f=p(function(){c.visible=h.value,h.queued=!1,f=null,c.visibleWatcher||n(c.visible)},c.delay)):_.nextTick(function(){c.visible=!1,c.visibleWatcher||n(!1)})))}function i(){c.visible&&(e(),function(){var n=_.offsetRect(o,s),t=_.offsetRect(u,s),e=a(c.direction),r=o.prop("offsetParent");c.direction?e=i(e):r&&e.top>r.scrollHeight-n.height-8&&(e=i(a("top")));function i(e){var t={left:e.left,top:e.top};return t.left=Math.min(t.left,s.prop("scrollWidth")-n.width-8),t.left=Math.max(t.left,8),t.top=Math.min(t.top,s.prop("scrollHeight")-n.height-8),t.top=Math.max(t.top,8),t}function a(e){return"left"===e?{left:t.left-n.width-8,top:t.top+t.height/2-n.height/2}:"right"===e?{left:t.left+t.width+8,top:t.top+t.height/2-n.height/2}:"top"===e?{left:t.left+t.width/2-n.width/2,top:t.top-n.height-8}:{left:t.left+t.width/2-n.width/2,top:t.top+t.height+8}}o.css({left:e.left+"px",top:e.top+"px"})}())}v.pin&&v.pin(o,u),c.delay=c.delay||0,o.detach(),o.attr("role","tooltip"),function(){var t=!1;if(u[0]&&"MutationObserver"in m){var e=new MutationObserver(function(e){e.some(function(e){return"disabled"===e.attributeName&&u[0].disabled})&&_.nextTick(function(){h(!1)})});e.observe(u[0],{attributes:!0})}var n=function(){r=document.activeElement===u[0]},r=!1;function i(){h(!1)}ie.element(m).on("blur",n).on("resize",d),document.addEventListener("scroll",i,!0),c.$on("$destroy",function(){ie.element(m).off("blur",n).off("resize",d),u.off(w,a).off(C,o).off("mousedown",s),o(),document.removeEventListener("scroll",i,!0),e&&e.disconnect()});var a=function(e){"focus"===e.type&&r?r=!1:c.visible||(u.on(C,o),h(!0),"touchstart"===e.type&&u.one("touchend",function(){_.nextTick(function(){g.one("touchend",o)},!1)}))},o=function(){var e=c.hasOwnProperty("autohide")?c.autohide:l.hasOwnProperty("mdAutohide");(e||t||g[0].activeElement!==u[0])&&(f&&(p.cancel(f),h.queued=!1,f=null),u.off(C,o),u.triggerHandler("blur"),h(!1)),t=!1},s=function(){t=!0};u.on("mousedown",s),u.on(w,a)}(),e(),function(){if(o[0]&&"MutationObserver"in m){var e=new MutationObserver(function(e){e.forEach(function(e){"md-visible"===e.attributeName&&(c.visibleWatcher||(c.visibleWatcher=c.$watch("visible",n))),"md-direction"===e.attributeName&&i(c.direction)})});e.observe(o[0],{attributes:!0}),l.hasOwnProperty("mdVisible")&&(c.visibleWatcher=c.$watch("visible",n))}else c.visibleWatcher=c.$watch("visible",n),c.$watch("direction",i);var t=function(){c.$destroy()};o.one("$destroy",t),u.one("$destroy",t),c.$on("$destroy",function(){h(!1),o.remove(),e&&e.disconnect()}),-1<o.text().indexOf(y.startSymbol())&&c.$watch(function(){return o.text().trim()},r)}(),r()}}e.$inject=["$timeout","$window","$$rAF","$document","$mdUtil","$mdTheming","$rootElement","$animate","$q","$interpolate"],ie.module("material.components.tooltip",["material.core"]).directive("mdTooltip",e)}(),function(){function e(e){return'<div class="md-virtual-repeat-scroller"><div class="md-virtual-repeat-sizer"></div><div class="md-virtual-repeat-offsetter">'+e[0].innerHTML+"</div></div>"}t.$inject=["$$rAF","$mdUtil","$parse","$rootScope","$window","$scope","$element","$attrs"],i.$inject=["$scope","$element","$attrs","$browser","$document","$rootScope","$$rAF","$mdUtil"],n.$inject=["$parse"],ie.module("material.components.virtualRepeat",["material.core","material.components.showHide"]).directive("mdVirtualRepeatContainer",function(){return{controller:t,template:e,compile:function(e,t){e.addClass("md-virtual-repeat-container").addClass(t.hasOwnProperty("mdOrientHorizontal")?"md-orient-horizontal":"md-orient-vertical")}}}).directive("mdVirtualRepeat",n);var o=1533917;function t(e,n,t,r,i,a,o,s){this.$rootScope=r,this.$scope=a,this.$element=o,this.$attrs=s,this.size=0,this.scrollSize=0,this.scrollOffset=0,this.horizontal=this.$attrs.hasOwnProperty("mdOrientHorizontal"),this.repeater=null,this.autoShrink=this.$attrs.hasOwnProperty("mdAutoShrink"),this.autoShrinkMin=parseInt(this.$attrs.mdAutoShrinkMin,10)||0,this.originalSize=null,this.offsetSize=parseInt(this.$attrs.mdOffsetSize,10)||0,this.oldElementSize=null,this.$attrs.mdTopIndex?(this.bindTopIndex=t(this.$attrs.mdTopIndex),this.topIndex=this.bindTopIndex(this.$scope),ie.isDefined(this.topIndex)||(this.topIndex=0,this.bindTopIndex.assign(this.$scope,0)),this.$scope.$watch(this.bindTopIndex,ie.bind(this,function(e){e!==this.topIndex&&this.scrollToIndex(e)}))):this.topIndex=0,this.scroller=o[0].querySelector(".md-virtual-repeat-scroller"),this.sizer=this.scroller.querySelector(".md-virtual-repeat-sizer"),this.offsetter=this.scroller.querySelector(".md-virtual-repeat-offsetter");var c=ie.bind(this,this.updateSize);e(ie.bind(this,function(){c();var e=n.debounce(c,10,null,!1),t=ie.element(i);this.size||e(),t.on("resize",e),a.$on("$destroy",function(){t.off("resize",e)}),a.$emit("$md-resize-enable"),a.$on("$md-resize",c)}))}function n(r){return{controller:i,priority:1e3,require:["mdVirtualRepeat","^^mdVirtualRepeatContainer"],restrict:"A",terminal:!0,transclude:"element",compile:function(e,t){var n=t.mdVirtualRepeat.match(/^\s*([\s\S]+?)\s+in\s+([\s\S]+?)\s*$/),a=n[1],o=r(n[2]),s=t.mdExtraName&&r(t.mdExtraName);return function(e,t,n,r,i){r[0].link_(r[1],i,a,o,s)}}}}function i(e,t,n,r,i,a,o,s){this.$scope=e,this.$element=t,this.$attrs=n,this.$browser=r,this.$document=i,this.$rootScope=a,this.$$rAF=o,this.onDemand=s.parseAttributeBoolean(n.mdOnDemand),this.browserCheckUrlChange=r.$$checkUrlChange,this.newStartIndex=0,this.newEndIndex=0,this.newVisibleEnd=0,this.startIndex=0,this.endIndex=0,this.itemSize=e.$eval(n.mdItemSize)||null,this.isFirstRender=!0,this.isVirtualRepeatUpdating_=!1,this.itemsLength=0,this.unwatchItemSize_=ie.noop,this.blocks={},this.pooledBlocks=[],e.$on("$destroy",ie.bind(this,this.cleanupBlocks_))}function r(e){if(!ie.isFunction(e.getItemAtIndex)||!ie.isFunction(e.getLength))throw Error("When md-on-demand is enabled, the Object passed to md-virtual-repeat must implement functions getItemAtIndex() and getLength() ");this.model=e}t.prototype.register=function(e){this.repeater=e,ie.element(this.scroller).on("scroll wheel touchmove touchend",ie.bind(this,this.handleScroll_))},t.prototype.isHorizontal=function(){return this.horizontal},t.prototype.getSize=function(){return this.size},t.prototype.setSize_=function(e){var t=this.getDimensionName_();this.size=e,this.$element[0].style[t]=e+"px"},t.prototype.unsetSize_=function(){this.$element[0].style[this.getDimensionName_()]=this.oldElementSize,this.oldElementSize=null},t.prototype.updateSize=function(){this.originalSize||(this.size=this.isHorizontal()?this.$element[0].clientWidth:this.$element[0].clientHeight,this.handleScroll_(),this.repeater&&this.repeater.containerUpdated())},t.prototype.getScrollSize=function(){return this.scrollSize},t.prototype.getDimensionName_=function(){return this.isHorizontal()?"width":"height"},t.prototype.sizeScroller_=function(e){var t=this.getDimensionName_(),n=this.isHorizontal()?"height":"width";if(this.sizer.innerHTML="",e<o)this.sizer.style[t]=e+"px";else{this.sizer.style[t]="auto",this.sizer.style[n]="auto";var r=Math.floor(e/o),i=document.createElement("div");i.style[t]=o+"px",i.style[n]="1px";for(var a=0;a<r;a++)this.sizer.appendChild(i.cloneNode(!1));i.style[t]=e-r*o+"px",this.sizer.appendChild(i)}},t.prototype.autoShrink_=function(e){var t=Math.max(e,this.autoShrinkMin*this.repeater.getItemSize());if(this.autoShrink&&t!==this.size){null===this.oldElementSize&&(this.oldElementSize=this.$element[0].style[this.getDimensionName_()]);var n=this.originalSize||this.size;if(!n||t<n)this.originalSize||(this.originalSize=this.size),this.setSize_(t);else if(null!==this.originalSize){this.unsetSize_();var r=this.originalSize;this.originalSize=null,r||this.updateSize(),this.setSize_(r||this.size)}this.repeater.containerUpdated()}},t.prototype.setScrollSize=function(e){var t=e+this.offsetSize;this.scrollSize!==t&&(this.sizeScroller_(t),this.autoShrink_(t),this.scrollSize=t)},t.prototype.getScrollOffset=function(){return this.scrollOffset},t.prototype.scrollTo=function(e){this.scroller[this.isHorizontal()?"scrollLeft":"scrollTop"]=e,this.handleScroll_()},t.prototype.scrollToIndex=function(e){var t=this.repeater.getItemSize(),n=this.repeater.itemsLength;n<e&&(e=n-1),this.scrollTo(t*e)},t.prototype.resetScroll=function(){this.scrollTo(0)},t.prototype.handleScroll_=function(){var e=ie.element(document)[0],t="rtl"!=e.dir&&"rtl"!=e.body.dir;t||this.maxSize||(this.scroller.scrollLeft=this.scrollSize,this.maxSize=this.scroller.scrollLeft);var n=this.isHorizontal()?t?this.scroller.scrollLeft:this.maxSize-this.scroller.scrollLeft:this.scroller.scrollTop;if(!(n===this.scrollOffset||n>this.scrollSize-this.size)){var r=this.repeater.getItemSize();if(r){var i=Math.max(0,Math.floor(n/r)-3),a=(this.isHorizontal()?"translateX(":"translateY(")+(!this.isHorizontal()||t?i*r:-i*r)+"px)";if(this.scrollOffset=n,this.offsetter.style.webkitTransform=a,this.offsetter.style.transform=a,this.bindTopIndex){var o=Math.floor(n/r);o!==this.topIndex&&o<this.repeater.getItemCount()&&(this.topIndex=o,this.bindTopIndex.assign(this.$scope,o),this.$rootScope.$$phase||this.$scope.$digest())}this.repeater.containerUpdated()}}},i.prototype.link_=function(e,t,n,r,i){this.container=e,this.transclude=t,this.repeatName=n,this.rawRepeatListExpression=r,this.extraName=i,this.sized=!1,this.repeatListExpression=ie.bind(this,this.repeatListExpression_),this.container.register(this)},i.prototype.cleanupBlocks_=function(){ie.forEach(this.pooledBlocks,function(e){e.element.remove()})},i.prototype.readItemSize_=function(){if(!this.itemSize){this.items=this.repeatListExpression(this.$scope),this.parentNode=this.$element[0].parentNode;var e=this.getBlock_(0);e.element[0].parentNode||this.parentNode.appendChild(e.element[0]),this.itemSize=e.element[0][this.container.isHorizontal()?"offsetWidth":"offsetHeight"]||null,this.blocks[0]=e,this.poolBlock_(0),this.itemSize&&this.containerUpdated()}},i.prototype.repeatListExpression_=function(e){var t=this.rawRepeatListExpression(e);if(this.onDemand&&t){var n=new r(t);return n.$$includeIndexes(this.newStartIndex,this.newVisibleEnd),n}return t},i.prototype.containerUpdated=function(){if(!this.itemSize)return this.unwatchItemSize_&&this.unwatchItemSize_!==ie.noop&&this.unwatchItemSize_(),this.unwatchItemSize_=this.$scope.$watchCollection(this.repeatListExpression,ie.bind(this,function(e){e&&e.length&&this.readItemSize_()})),void(this.$rootScope.$$phase||this.$scope.$digest());this.sized||(this.items=this.repeatListExpression(this.$scope)),this.sized||(this.unwatchItemSize_(),this.sized=!0,this.$scope.$watchCollection(this.repeatListExpression,ie.bind(this,function(e,t){this.isVirtualRepeatUpdating_||this.virtualRepeatUpdate_(e,t)}))),this.updateIndexes_(),(this.newStartIndex!==this.startIndex||this.newEndIndex!==this.endIndex||this.container.getScrollOffset()>this.container.getScrollSize())&&(this.items instanceof r&&this.items.$$includeIndexes(this.newStartIndex,this.newEndIndex),this.virtualRepeatUpdate_(this.items,this.items))},i.prototype.getItemSize=function(){return this.itemSize},i.prototype.getItemCount=function(){return this.itemsLength},i.prototype.virtualRepeatUpdate_=function(e,t){this.isVirtualRepeatUpdating_=!0;var n=e&&e.length||0,r=!1;if(this.items&&n<this.items.length&&0!==this.container.getScrollOffset()){this.items=e;var i=this.container.getScrollOffset();this.container.resetScroll(),this.container.scrollTo(i)}if(n!==this.itemsLength&&(r=!0,this.itemsLength=n),((this.items=e)!==t||r)&&this.updateIndexes_(),this.parentNode=this.$element[0].parentNode,r&&this.container.setScrollSize(n*this.itemSize),this.isFirstRender){this.isFirstRender=!1;var a=this.$attrs.mdStartIndex?this.$scope.$eval(this.$attrs.mdStartIndex):this.container.topIndex;this.container.scrollToIndex(a)}Object.keys(this.blocks).forEach(function(e){var t=parseInt(e,10);(t<this.newStartIndex||t>=this.newEndIndex)&&this.poolBlock_(t)},this),this.$browser.$$checkUrlChange=ie.noop;var o,s,c=[],l=[];for(o=this.newStartIndex;o<this.newEndIndex&&null==this.blocks[o];o++)s=this.getBlock_(o),this.updateBlock_(s,o),c.push(s);for(;null!=this.blocks[o];o++)this.updateBlock_(this.blocks[o],o);for(var u=o-1;o<this.newEndIndex;o++)s=this.getBlock_(o),this.updateBlock_(s,o),l.push(s);c.length&&this.parentNode.insertBefore(this.domFragmentFromBlocks_(c),this.$element[0].nextSibling),l.length&&this.parentNode.insertBefore(this.domFragmentFromBlocks_(l),this.blocks[u]&&this.blocks[u].element[0].nextSibling),this.$browser.$$checkUrlChange=this.browserCheckUrlChange,this.startIndex=this.newStartIndex,this.endIndex=this.newEndIndex,this.isVirtualRepeatUpdating_=!1},i.prototype.getBlock_=function(n){return this.pooledBlocks.length?this.pooledBlocks.pop():(this.transclude(ie.bind(this,function(e,t){r={element:e,new:!0,scope:t},this.updateScope_(t,n),this.parentNode.appendChild(e[0])})),r);var r},i.prototype.updateBlock_=function(e,t){((this.blocks[t]=e).new||e.scope.$index!==t||e.scope[this.repeatName]!==this.items[t])&&(e.new=!1,this.updateScope_(e.scope,t),this.$rootScope.$$phase||e.scope.$digest())},i.prototype.updateScope_=function(e,t){e.$index=t,e[this.repeatName]=this.items&&this.items[t],this.extraName&&(e[this.extraName(this.$scope)]=this.items[t])},i.prototype.poolBlock_=function(e){this.pooledBlocks.push(this.blocks[e]),this.parentNode.removeChild(this.blocks[e].element[0]),delete this.blocks[e]},i.prototype.domFragmentFromBlocks_=function(e){var t=this.$document[0].createDocumentFragment();return e.forEach(function(e){t.appendChild(e.element[0])}),t},i.prototype.updateIndexes_=function(){var e=this.items?this.items.length:0,t=Math.ceil(this.container.getSize()/this.itemSize);this.newStartIndex=Math.max(0,Math.min(e-t,Math.floor(this.container.getScrollOffset()/this.itemSize))),this.newVisibleEnd=this.newStartIndex+t+3,this.newEndIndex=Math.min(e,this.newVisibleEnd),this.newStartIndex=Math.max(0,this.newStartIndex-3)},r.prototype.$$includeIndexes=function(e,t){for(var n=e;n<t;n++)this.hasOwnProperty(n)||(this[n]=this.model.getItemAtIndex(n));this.length=this.model.getLength()}}(),function(){function e(a){return{link:function(e,n,r){var i="";r.$observe("mdWhiteframe",function(e){-1!=(e=parseInt(e,10)||4)&&(24<e||e<1)&&(a.warn("md-whiteframe attribute value is invalid. It should be a number between 1 and 24",n[0]),e=4);var t=-1==e?"":"md-whiteframe-"+e+"dp";r.$updateClass(t,i),i=t})}}}e.$inject=["$log"],ie.module("material.components.whiteframe",["material.core"]).directive("mdWhiteframe",e)}(),function(){e.$inject=["$scope","$element","$mdUtil","$mdConstant","$mdTheming","$window","$animate","$rootElement","$attrs","$q","$log"],ie.module("material.components.autocomplete").controller("MdAutocompleteCtrl",e);var te=225.5,ne=8,re=2;function e(l,u,f,t,e,n,r,i,d,s,a){var o,c,h,p,m=this,g=l.itemsExpr.split(/ in /i),_=g[1],b=null,v={},y=!1,w=[],C=!1,A=0,S=0,T=null,x=null;return o="hidden",c=function(e,t){!e&&t?(E(),b&&(f.disableScrollAround(b.ul),T=function(e){function t(e){e.preventDefault()}return e.on("wheel",t),e.on("touchmove",t),function(){e.off("wheel",t),e.off("touchmove",t)}}(ie.element(b.wrap)))):e&&!t&&(f.enableScrolling(),T&&(T(),T=null))},h=!0,Object.defineProperty(m,o,{get:function(){return h},set:function(e){var t=h;c(h=e,t)}}),m.scope=l,m.parent=l.$parent,m.itemName=g[0],m.matches=[],m.loading=!1,m.hidden=!0,m.index=null,m.messages=[],m.id=f.nextUid(),m.isDisabled=null,m.isRequired=null,m.isReadonly=null,m.hasNotFound=!1,m.keydown=function(e){switch(e.keyCode){case t.KEY_CODE.DOWN_ARROW:if(m.loading)return;e.stopPropagation(),e.preventDefault(),m.index=Math.min(m.index+1,m.matches.length-1),K(),Y();break;case t.KEY_CODE.UP_ARROW:if(m.loading)return;e.stopPropagation(),e.preventDefault(),m.index=m.index<0?m.matches.length-1:Math.max(0,m.index-1),K(),Y();break;case t.KEY_CODE.TAB:if(P(),m.hidden||m.loading||m.index<0||m.matches.length<1)return;q(m.index);break;case t.KEY_CODE.ENTER:if(m.hidden||m.loading||m.index<0||m.matches.length<1)return;if(U())return;e.stopPropagation(),e.preventDefault(),q(m.index);break;case t.KEY_CODE.ESCAPE:if(e.preventDefault(),!(j("blur")||!m.hidden||m.loading||j("clear")&&l.searchText))return;e.stopPropagation(),z(),l.searchText&&j("clear")&&V(),m.hidden=!0,j("blur")&&function(e){e&&(C=y=!1);b.input.blur()}(!0)}},m.blur=function(e){C=!1,y||(m.hidden=F(),ee("ngBlur",{$event:e}))},m.focus=function(e){C=!0,G()&&W()&&Z();m.hidden=F(),ee("ngFocus",{$event:e})},m.clear=function(){z(),V()},m.select=q,m.listEnter=function(){y=!0},m.listLeave=P,m.mouseUp=function(){b.input.focus()},m.getCurrentDisplayValue=H,m.registerSelectedItemWatcher=function(e){-1==w.indexOf(e)&&w.push(e)},m.unregisterSelectedItemWatcher=function(e){var t=w.indexOf(e);-1!=t&&w.splice(t,1)},m.notFoundVisible=X,m.loadingIsVisible=function(){return m.loading&&!U()},m.positionDropdown=E,f.initOptionalProperties(l,d,{searchText:"",selectedItem:null}),e(u),p=parseInt(l.delay,10)||0,d.$observe("disabled",function(e){m.isDisabled=f.parseAttributeBoolean(e,!1)}),d.$observe("required",function(e){m.isRequired=f.parseAttributeBoolean(e,!1)}),d.$observe("readonly",function(e){m.isReadonly=f.parseAttributeBoolean(e,!1)}),l.$watch("searchText",p?f.debounce($,p):$),l.$watch("selectedItem",M),ie.element(n).on("resize",E),l.$on("$destroy",I),void f.nextTick(function(){(b={main:u[0],scrollContainer:u[0].querySelector(".md-virtual-repeat-container"),scroller:u[0].querySelector(".md-virtual-repeat-scroller"),ul:u.find("ul")[0],input:u.find("input")[0],wrap:u.find("md-autocomplete-wrap")[0],root:document.body}).li=b.ul.getElementsByTagName("li"),b.snap=function(){for(var e=u;e.length;e=e.parent())if(ie.isDefined(e.attr("md-autocomplete-snap")))return e[0];return b.wrap}(),b.$=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=ie.element(e[n]));return t}(b),x=b.$.input.controller("ngModel"),b.$.root.length&&(e(b.$.scrollContainer),b.$.scrollContainer.detach(),b.$.root.append(b.$.scrollContainer),r.pin&&r.pin(b.$.scrollContainer,i)),l.autofocus&&u.on("focus",D)});function k(){l.requireMatch&&x&&x.$setValidity("md-require-match",!!l.selectedItem)}function E(){if(!b)return f.nextTick(E,!1,l);var e,n=b.wrap.getBoundingClientRect(),t=b.snap.getBoundingClientRect(),r=b.root.getBoundingClientRect(),i=t.bottom-r.top,a=r.bottom-t.top,o=n.left-r.left,s=n.width,c=function(){var e=0,t=u.find("md-input-container");if(t.length){var n=t.find("input");e=t.prop("offsetHeight"),e-=n.prop("offsetTop"),e-=n.prop("offsetHeight"),e+=t.prop("offsetTop")}return e}();d.mdFloatingLabel&&(o+=re,s-=2*re),e={left:o+"px",minWidth:s+"px",maxWidth:Math.max(n.right-r.left,r.right-n.left)-ne+"px"},a<i&&r.height-n.bottom-ne<te?(e.top="auto",e.bottom=a+"px",e.maxHeight=Math.min(te,n.top-r.top-ne)+"px"):(e.top=i-c+"px",e.bottom="auto",e.maxHeight=Math.min(te,r.bottom+f.scrollTop()-n.bottom-ne)+"px"),b.$.scrollContainer.css(e),f.nextTick(function(){var e=b.scrollContainer.getBoundingClientRect(),t={};e.right>r.right-ne&&(t.left=n.right-e.width+"px");b.$.scrollContainer.css(t)},!1)}function D(){b.input.focus()}function I(){if(m.hidden||f.enableScrolling(),ie.element(n).off("resize",E),b){ie.forEach(["ul","scroller","scrollContainer","input"],function(e){b.$[e].remove()})}}function P(){C||m.hidden||b.input.focus(),y=!1,m.hidden=F()}function M(r,i){k(),r?R(r).then(function(e){var t,n;l.searchText=e,t=r,n=i,w.forEach(function(e){e(t,n)})}):i&&l.searchText&&R(i).then(function(e){e.toString().toLowerCase()===l.searchText.toLowerCase()&&(l.searchText="")}),r!==i&&ie.isFunction(l.itemChange)&&l.itemChange(N(l.selectedItem))}function $(t,n){m.index=l.autoselect?0:-1,t!==n&&(k(),R(l.selectedItem).then(function(e){t!==e&&(l.selectedItem=null,t!==n&&ie.isFunction(l.textChange)&&l.textChange(),W()?Z():(L(!(m.matches=[])),Y()))}))}function O(){return ie.isNumber(l.minLength)?l.minLength:1}function R(e){return s.when((t=e,(t&&l.itemText?l.itemText(N(t)):null)||e)).then(function(e){return e&&!ie.isString(e)&&a.warn("md-autocomplete: Could not resolve display value to a string. Please check the `md-item-text` attribute."),e});var t}function N(e){if(!e)return ae;var t={};return m.itemName&&(t[m.itemName]=e),t}function L(e){m.loading!=e&&(m.loading=e),m.hidden=F()}function F(){return!G()||!(W()&&B()||X())}function G(){return!(m.loading&&!B())&&(!U()&&!!C)}function j(e){return!l.escapeOptions||-1!==l.escapeOptions.toLowerCase().indexOf(e)}function B(){return!!m.matches.length}function U(){return!!m.scope.selectedItem}function H(){return R(m.matches[m.index])}function W(){return(l.searchText||"").length>=O()}function q(e){f.nextTick(function(){R(m.matches[e]).then(function(e){var t=b.$.input.controller("ngModel");t.$setViewValue(e),t.$render()}).finally(function(){l.selectedItem=m.matches[e],L(!1)})},!1)}function z(){m.index=0,m.matches=[]}function V(){L(!0),l.searchText="";var e=document.createEvent("CustomEvent");e.initCustomEvent("change",!0,!0,{value:""}),b.input.dispatchEvent(e),b.input.blur(),l.searchText="",b.input.focus()}function Y(){H().then(function(e){m.messages=[function(){if(A===m.matches.length)return"";switch(A=m.matches.length,m.matches.length){case 0:return"There are no matches available.";case 1:return"There is 1 match available.";default:return"There are "+m.matches.length+" matches available."}}(),e]})}function K(){if(b.li[0]){var e=b.li[0].offsetHeight,t=e*m.index,n=t+e,r=b.scroller.clientHeight,i=b.scroller.scrollTop;t<i?Q(t):i+r<n&&Q(n-r)}}function Q(e){b.$.scrollContainer.controller("mdVirtualRepeatContainer").scrollTo(e)}function X(){var e=(m.scope.searchText||"").length;return m.hasNotFound&&!B()&&(!m.loading||0!==S)&&e>=O()&&(C||y)&&!U()}function Z(){var e=l.searchText||"",t=e.toLowerCase();!l.noCache&&v[t]?J(v[t]):function(t){var e=l.$parent.$eval(_),n=t.toLowerCase(),r=ie.isArray(e),i=!!e.then;function a(e){v[n]=e,(t||"")===(l.searchText||"")&&J(e)}r?a(e):i&&(o=e,o&&(o=s.when(o),S++,L(!0),f.nextTick(function(){o.then(a).finally(function(){0==--S&&L(!1)})},!0,l)));var o}(e),m.hidden=F()}function J(e){var n,t,r;m.matches=e,m.hidden=F(),m.loading&&L(!1),l.selectOnMatch&&(n=l.searchText,t=m.matches,r=t[0],1===t.length&&R(r).then(function(e){var t=n==e;l.matchInsensitive&&!t&&(t=n.toLowerCase()==e.toLowerCase()),t&&q(0)})),Y(),E()}function ee(e,t){d[e]&&l.$parent.$eval(d[e],t||{})}}}(),function(){function e(c){return{controller:"MdAutocompleteCtrl",controllerAs:"$mdAutocompleteCtrl",scope:{inputName:"@mdInputName",inputMinlength:"@mdInputMinlength",inputMaxlength:"@mdInputMaxlength",searchText:"=?mdSearchText",selectedItem:"=?mdSelectedItem",itemsExpr:"@mdItems",itemText:"&mdItemText",placeholder:"@placeholder",noCache:"=?mdNoCache",requireMatch:"=?mdRequireMatch",selectOnMatch:"=?mdSelectOnMatch",matchInsensitive:"=?mdMatchCaseInsensitive",itemChange:"&?mdSelectedItemChange",textChange:"&?mdSearchTextChange",minLength:"=?mdMinLength",delay:"=?mdDelay",autofocus:"=?mdAutofocus",floatingLabel:"@?mdFloatingLabel",autoselect:"=?mdAutoselect",menuClass:"@?mdMenuClass",inputId:"@?mdInputId",escapeOptions:"@?mdEscapeOptions"},link:function(e,t,n,r){r.hasNotFound=!!t.attr("md-has-not-found")},template:function(n,e){var t,r,i=(t=n.find("md-not-found").detach(),(r=t.length?t.html():"")?'<li ng-if="$mdAutocompleteCtrl.notFoundVisible()"                         md-autocomplete-parent-scope>'+r+"</li>":""),a=function(){var e=n.find("md-item-template").detach(),t=e.length?e.html():n.html();e.length||n.empty();return"<md-autocomplete-parent-scope md-autocomplete-replace>"+t+"</md-autocomplete-parent-scope>"}(),o=n.html(),s=e.tabindex;return i&&n.attr("md-has-not-found",!0),n.attr("tabindex","-1"),"        <md-autocomplete-wrap            ng-class=\"{ 'md-whiteframe-z1': !floatingLabel, 'md-menu-showing': !$mdAutocompleteCtrl.hidden }\">          "+(e.mdFloatingLabel?'            <md-input-container ng-if="floatingLabel">              <label>{{floatingLabel}}</label>              <input type="search"                  '+(null!=s?'tabindex="'+s+'"':"")+'                  id="{{ inputId || \'fl-input-\' + $mdAutocompleteCtrl.id }}"                  name="{{inputName}}"                  autocomplete="off"                  ng-required="$mdAutocompleteCtrl.isRequired"                  ng-readonly="$mdAutocompleteCtrl.isReadonly"                  ng-minlength="inputMinlength"                  ng-maxlength="inputMaxlength"                  ng-disabled="$mdAutocompleteCtrl.isDisabled"                  ng-model="$mdAutocompleteCtrl.scope.searchText"                  ng-model-options="{ allowInvalid: true }"                  ng-keydown="$mdAutocompleteCtrl.keydown($event)"                  ng-blur="$mdAutocompleteCtrl.blur($event)"                  ng-focus="$mdAutocompleteCtrl.focus($event)"                  aria-owns="ul-{{$mdAutocompleteCtrl.id}}"                  '+(null!=e.mdNoAsterisk?'md-no-asterisk="'+e.mdNoAsterisk+'"':"")+"                  "+(null!=e.mdSelectOnFocus?'md-select-on-focus=""':"")+'                  aria-label="{{floatingLabel}}"                  aria-autocomplete="list"                  role="combobox"                  aria-haspopup="true"                  aria-activedescendant=""                  aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/>              <div md-autocomplete-parent-scope md-autocomplete-replace>'+o+"</div>            </md-input-container>":'            <input type="search"                '+(null!=s?'tabindex="'+s+'"':"")+'                id="{{ inputId || \'input-\' + $mdAutocompleteCtrl.id }}"                name="{{inputName}}"                ng-if="!floatingLabel"                autocomplete="off"                ng-required="$mdAutocompleteCtrl.isRequired"                ng-disabled="$mdAutocompleteCtrl.isDisabled"                ng-readonly="$mdAutocompleteCtrl.isReadonly"                ng-model="$mdAutocompleteCtrl.scope.searchText"                ng-keydown="$mdAutocompleteCtrl.keydown($event)"                ng-blur="$mdAutocompleteCtrl.blur($event)"                ng-focus="$mdAutocompleteCtrl.focus($event)"                placeholder="{{placeholder}}"                aria-owns="ul-{{$mdAutocompleteCtrl.id}}"                '+(null!=e.mdSelectOnFocus?'md-select-on-focus=""':"")+'                aria-label="{{placeholder}}"                aria-autocomplete="list"                role="combobox"                aria-haspopup="true"                aria-activedescendant=""                aria-expanded="{{!$mdAutocompleteCtrl.hidden}}"/>            <button                type="button"                tabindex="-1"                ng-if="$mdAutocompleteCtrl.scope.searchText && !$mdAutocompleteCtrl.isDisabled"                ng-click="$mdAutocompleteCtrl.clear($event)">              <md-icon md-svg-src="'+c.mdClose+'"></md-icon>              <span class="md-visually-hidden">Clear</span>            </button>                ')+'          <md-progress-linear              class="'+(e.mdFloatingLabel?"md-inline":"")+'"              ng-if="$mdAutocompleteCtrl.loadingIsVisible()"              md-mode="indeterminate"></md-progress-linear>          <md-virtual-repeat-container              md-auto-shrink              md-auto-shrink-min="1"              ng-mouseenter="$mdAutocompleteCtrl.listEnter()"              ng-mouseleave="$mdAutocompleteCtrl.listLeave()"              ng-mouseup="$mdAutocompleteCtrl.mouseUp()"              ng-hide="$mdAutocompleteCtrl.hidden"              class="md-autocomplete-suggestions-container md-whiteframe-z1"              ng-class="{ \'md-not-found\': $mdAutocompleteCtrl.notFoundVisible() }"              role="presentation">            <ul class="md-autocomplete-suggestions"                ng-class="::menuClass"                id="ul-{{$mdAutocompleteCtrl.id}}">              <li md-virtual-repeat="item in $mdAutocompleteCtrl.matches"                  ng-class="{ selected: $index === $mdAutocompleteCtrl.index }"                  ng-click="$mdAutocompleteCtrl.select($index)"                  md-extra-name="$mdAutocompleteCtrl.itemName">                  '+a+"                  </li>"+i+'            </ul>          </md-virtual-repeat-container>        </md-autocomplete-wrap>        <aria-status            class="md-visually-hidden"            role="status"            aria-live="assertive">          <p ng-repeat="message in $mdAutocompleteCtrl.messages track by $index" ng-if="message">{{message}}</p>        </aria-status>'}}}e.$inject=["$$mdSvgRegistry"],ie.module("material.components.autocomplete").directive("mdAutocomplete",e)}(),function(){function e(e,u){return{restrict:"AE",compile:function(e,t,l){return function(n,t,e){var r,i,a=n.$mdAutocompleteCtrl,o=a.parent.$new(),s=a.itemName;function c(e,t){o[t]=n[e],n.$watch(e,function(e){u.nextTick(function(){o[t]=e})})}c("$index","$index"),c("item",s),i=r=!1,n.$watch(function(){i||r||(r=!0,n.$$postDigest(function(){i||o.$digest(),r=i=!1}))}),o.$watch(function(){i=!0}),l(o,function(e){t.after(e)})}},terminal:!0,transclude:"element"}}e.$inject=["$compile","$mdUtil"],ie.module("material.components.autocomplete").directive("mdAutocompleteParentScope",e)}(),function(){function e(e,t,n){this.$scope=e,this.$element=t,this.$attrs=n,this.regex=null}e.$inject=["$scope","$element","$attrs"],ie.module("material.components.autocomplete").controller("MdHighlightCtrl",e),e.prototype.init=function(t,n){this.flags=this.$attrs.mdHighlightFlags||"",this.unregisterFn=this.$scope.$watch(function(e){return{term:t(e),contentText:n(e)}}.bind(this),this.onRender.bind(this),!0),this.$element.on("$destroy",this.unregisterFn)},e.prototype.onRender=function(e,t){var n=e.contentText;null!==this.regex&&e.term===t.term||(this.regex=this.createRegex(e.term,this.flags)),e.term?this.applyRegex(n):this.$element.text(n)},e.prototype.applyRegex=function(e){var t=this.resolveTokens(e);this.$element.empty(),t.forEach(function(e){if(e.isMatch){var t=ie.element('<span class="highlight">').text(e.text);this.$element.append(t)}else this.$element.append(document.createTextNode(e))}.bind(this))},e.prototype.resolveTokens=function(r){var i=[],n=0;return r.replace(this.regex,function(e,t){a(n,t),i.push({text:e,isMatch:!0}),n=t+e.length}),a(n),i;function a(e,t){var n=r.slice(e,t);n&&i.push(n)}},e.prototype.createRegex=function(e,t){var n="",r="",i=this.sanitizeRegex(e);return 0<=t.indexOf("^")&&(n="^"),0<=t.indexOf("$")&&(r="$"),new RegExp(n+i+r,t.replace(/[$\^]/g,""))},e.prototype.sanitizeRegex=function(e){return e&&e.toString().replace(/[\\\^\$\*\+\?\.\(\)\|\{}\[\]]/g,"\\$&")}}(),function(){function e(n,r){return{terminal:!0,controller:"MdHighlightCtrl",compile:function(e,t){var i=r(t.mdHighlightText),a=n(e.html());return function(e,t,n,r){r.init(i,a)}}}}e.$inject=["$interpolate","$parse"],ie.module("material.components.autocomplete").directive("mdHighlightText",e)}(),function(){function e(e,t,n,r,i){this.$scope=e,this.$element=t,this.$mdConstant=n,this.$timeout=r,this.$mdUtil=i,this.isEditting=!1,this.parentController=ae,this.enableChipEdit=!1}e.$inject=["$scope","$element","$mdConstant","$timeout","$mdUtil"],ie.module("material.components.chips").controller("MdChipCtrl",e),e.prototype.init=function(e){this.parentController=e,this.enableChipEdit=this.parentController.enableChipEdit,this.enableChipEdit&&(this.$element.on("keydown",this.chipKeyDown.bind(this)),this.$element.on("mousedown",this.chipMouseDown.bind(this)),this.getChipContent().addClass("_md-chip-content-edit-is-enabled"))},e.prototype.getChipContent=function(){var e=this.$element[0].getElementsByClassName("md-chip-content");return ie.element(e[0])},e.prototype.getContentElement=function(){return ie.element(this.getChipContent().children()[0])},e.prototype.getChipIndex=function(){return parseInt(this.$element.attr("index"))},e.prototype.goOutOfEditMode=function(){if(this.isEditting){this.isEditting=!1,this.$element.removeClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="false";var e=this.getChipIndex();this.getContentElement().text()?(this.parentController.updateChipContents(e,this.getContentElement().text()),this.$mdUtil.nextTick(function(){this.parentController.selectedChip===e&&this.parentController.focusChip(e)}.bind(this))):this.parentController.removeChipAndFocusInput(e)}},e.prototype.selectNodeContents=function(e){var t,n;document.body.createTextRange?((t=document.body.createTextRange()).moveToElementText(e),t.select()):G.getSelection&&(n=G.getSelection(),(t=document.createRange()).selectNodeContents(e),n.removeAllRanges(),n.addRange(t))},e.prototype.goInEditMode=function(){this.isEditting=!0,this.$element.addClass("_md-chip-editing"),this.getChipContent()[0].contentEditable="true",this.getChipContent().on("blur",function(){this.goOutOfEditMode()}.bind(this)),this.selectNodeContents(this.getChipContent()[0])},e.prototype.chipKeyDown=function(e){this.isEditting||e.keyCode!==this.$mdConstant.KEY_CODE.ENTER&&e.keyCode!==this.$mdConstant.KEY_CODE.SPACE?this.isEditting&&e.keyCode===this.$mdConstant.KEY_CODE.ENTER&&(e.preventDefault(),this.goOutOfEditMode()):(e.preventDefault(),this.goInEditMode())},e.prototype.chipMouseDown=function(){this.getChipIndex()==this.parentController.selectedChip&&this.enableChipEdit&&!this.isEditting&&this.goInEditMode()}}(),function(){t.$inject=["$mdTheming","$mdUtil"],ie.module("material.components.chips").directive("mdChip",t);var e='    <span ng-if="!$mdChipsCtrl.readonly" class="md-visually-hidden">      {{$mdChipsCtrl.deleteHint}}    </span>';function t(o,n){var r=n.processTemplate(e);return{restrict:"E",require:["^?mdChips","mdChip"],compile:function(e,t){return e.append(n.processTemplate(r)),function(e,t,n,r){var i=r.shift(),a=r.shift();o(t),i&&(a.init(i),ie.element(t[0].querySelector(".md-chip-content")).on("blur",function(){i.resetSelectedChip(),i.$scope.$applyAsync()}))}},controller:"MdChipCtrl"}}}(),function(){function e(i){return{restrict:"A",require:"^mdChips",scope:!1,link:function(t,e,n,r){e.on("click",function(e){t.$apply(function(){r.removeChip(t.$$replacedScope.$index)})}),i(function(){e.attr({tabindex:-1,"aria-hidden":!0}),e.find("button").attr("tabindex","-1")})}}}e.$inject=["$timeout"],ie.module("material.components.chips").directive("mdChipRemove",e)}(),function(){function e(o){return{restrict:"EA",terminal:!0,link:function(e,t,n){var r=e.$parent.$mdChipsCtrl,i=r.parent.$new(!1,r.parent);i.$$replacedScope=e,i.$chip=e.$chip,i.$index=e.$index;var a=(i.$mdChipsCtrl=r).$scope.$eval(n.mdChipTransclude);t.html(a),o(t.contents())(i)},scope:!1}}e.$inject=["$compile"],ie.module("material.components.chips").directive("mdChipTransclude",e)}(),function(){function e(e,t,n,r,i,a,o){this.$timeout=a,this.$mdConstant=n,this.$scope=e,this.parent=e.$parent,this.$log=r,this.$element=i,this.ngModelCtrl=null,this.userInputNgModelCtrl=null,this.autocompleteCtrl=null,this.userInputElement=null,this.items=[],this.selectedChip=-1,this.enableChipEdit=o.parseAttributeBoolean(t.mdEnableChipEdit),this.addOnBlur=o.parseAttributeBoolean(t.mdAddOnBlur),this.deleteHint="Press delete to remove this chip.",this.deleteButtonLabel="Remove",this.chipBuffer="",this.useTransformChip=!1,this.useOnAdd=!1,this.useOnRemove=!1}e.$inject=["$scope","$attrs","$mdConstant","$log","$element","$timeout","$mdUtil"],ie.module("material.components.chips").controller("MdChipsCtrl",e),e.prototype.inputKeydown=function(e){var t=this.getChipBuffer();if(!(this.autocompleteCtrl&&e.isDefaultPrevented&&e.isDefaultPrevented())){if(e.keyCode===this.$mdConstant.KEY_CODE.BACKSPACE){if(0!==this.getCursorPosition(e.target))return;return e.preventDefault(),e.stopPropagation(),void(this.items.length&&this.selectAndFocusChipSafe(this.items.length-1))}if((!this.separatorKeys||this.separatorKeys.length<1)&&(this.separatorKeys=[this.$mdConstant.KEY_CODE.ENTER]),-1!==this.separatorKeys.indexOf(e.keyCode)){if(this.autocompleteCtrl&&this.requireMatch||!t)return;if(e.preventDefault(),this.hasMaxChipsReached())return;this.appendChip(t.trim()),this.resetChipBuffer()}}},e.prototype.getCursorPosition=function(t){try{if(t.selectionStart===t.selectionEnd)return t.selectionStart}catch(e){if(!t.value)return 0}},e.prototype.updateChipContents=function(e,t){0<=e&&e<this.items.length&&(this.items[e]=t,this.ngModelCtrl.$setDirty())},e.prototype.isEditingChip=function(){return!!this.$element[0].getElementsByClassName("_md-chip-editing").length},e.prototype.isRemovable=function(){return!!this.ngModelCtrl&&(this.readonly?this.removable:!ie.isDefined(this.removable)||this.removable)},e.prototype.chipKeydown=function(e){if(!this.getChipBuffer()&&!this.isEditingChip())switch(e.keyCode){case this.$mdConstant.KEY_CODE.BACKSPACE:case this.$mdConstant.KEY_CODE.DELETE:if(this.selectedChip<0)return;if(e.preventDefault(),!this.isRemovable())return;this.removeAndSelectAdjacentChip(this.selectedChip);break;case this.$mdConstant.KEY_CODE.LEFT_ARROW:e.preventDefault(),this.selectedChip<0&&(this.selectedChip=this.items.length),this.items.length&&this.selectAndFocusChipSafe(this.selectedChip-1);break;case this.$mdConstant.KEY_CODE.RIGHT_ARROW:e.preventDefault(),this.selectAndFocusChipSafe(this.selectedChip+1);break;case this.$mdConstant.KEY_CODE.ESCAPE:case this.$mdConstant.KEY_CODE.TAB:if(this.selectedChip<0)return;e.preventDefault(),this.onFocus()}},e.prototype.getPlaceholder=function(){return this.items&&this.items.length&&(""==this.secondaryPlaceholder||this.secondaryPlaceholder)?this.secondaryPlaceholder:this.placeholder},e.prototype.removeAndSelectAdjacentChip=function(e){var t=this.getAdjacentChipIndex(e);this.removeChip(e),this.$timeout(ie.bind(this,function(){this.selectAndFocusChipSafe(t)}))},e.prototype.resetSelectedChip=function(){this.selectedChip=-1},e.prototype.getAdjacentChipIndex=function(e){var t=this.items.length-1;return 0==t?-1:e==t?e-1:e},e.prototype.appendChip=function(t){if(this.useTransformChip&&this.transformChip){var e=this.transformChip({$chip:t});ie.isDefined(e)&&(t=e)}if(ie.isObject(t)&&this.items.some(function(e){return ie.equals(t,e)}))return;if(!(null==t||this.items.indexOf(t)+1)){var n=this.items.push(t);this.ngModelCtrl.$setDirty(),this.validateModel(),this.useOnAdd&&this.onAdd&&this.onAdd({$chip:t,$index:n})}},e.prototype.useTransformChipExpression=function(){this.useTransformChip=!0},e.prototype.useOnAddExpression=function(){this.useOnAdd=!0},e.prototype.useOnRemoveExpression=function(){this.useOnRemove=!0},e.prototype.useOnSelectExpression=function(){this.useOnSelect=!0},e.prototype.getChipBuffer=function(){return this.userInputElement?this.userInputNgModelCtrl?this.userInputNgModelCtrl.$viewValue:this.userInputElement[0].value:this.chipBuffer},e.prototype.resetChipBuffer=function(){this.userInputElement?this.userInputNgModelCtrl?(this.userInputNgModelCtrl.$setViewValue(""),this.userInputNgModelCtrl.$render()):this.userInputElement[0].value="":this.chipBuffer=""},e.prototype.hasMaxChipsReached=function(){return ie.isString(this.maxChips)&&(this.maxChips=parseInt(this.maxChips,10)||0),0<this.maxChips&&this.items.length>=this.maxChips},e.prototype.validateModel=function(){this.ngModelCtrl.$setValidity("md-max-chips",!this.hasMaxChipsReached())},e.prototype.removeChip=function(e){var t=this.items.splice(e,1);this.ngModelCtrl.$setDirty(),this.validateModel(),t&&t.length&&this.useOnRemove&&this.onRemove&&this.onRemove({$chip:t[0],$index:e})},e.prototype.removeChipAndFocusInput=function(e){this.removeChip(e),this.autocompleteCtrl?(this.autocompleteCtrl.hidden=!0,this.$mdUtil.nextTick(this.onFocus.bind(this))):this.onFocus()},e.prototype.selectAndFocusChipSafe=function(e){return this.items.length?e===this.items.length?this.onFocus():(e=Math.max(e,0),e=Math.min(e,this.items.length-1),this.selectChip(e),void this.focusChip(e)):(this.selectChip(-1),void this.onFocus())},e.prototype.selectChip=function(e){-1<=e&&e<=this.items.length?(this.selectedChip=e,this.useOnSelect&&this.onSelect&&this.onSelect({$chip:this.items[this.selectedChip]})):this.$log.warn("Selected Chip index out of bounds; ignoring.")},e.prototype.selectAndFocusChip=function(e){this.selectChip(e),-1!=e&&this.focusChip(e)},e.prototype.focusChip=function(e){this.$element[0].querySelector('md-chip[index="'+e+'"] .md-chip-content').focus()},e.prototype.configureNgModel=function(e){this.ngModelCtrl=e;var t=this;e.$render=function(){t.items=t.ngModelCtrl.$viewValue}},e.prototype.onFocus=function(){var e=this.$element[0].querySelector("input");e&&e.focus(),this.resetSelectedChip()},e.prototype.onInputFocus=function(){this.inputHasFocus=!0,this.resetSelectedChip()},e.prototype.onInputBlur=function(){this.inputHasFocus=!1;var e=this.getChipBuffer().trim();this.validateModel();var t=this.ngModelCtrl.$valid;this.userInputNgModelCtrl&&(t&=this.userInputNgModelCtrl.$valid),this.addOnBlur&&e&&t&&(this.appendChip(e),this.resetChipBuffer())},e.prototype.configureUserInput=function(e){var t=(this.userInputElement=e).controller("ngModel");t!=this.ngModelCtrl&&(this.userInputNgModelCtrl=t);var n=this.$scope,r=this,i=function(e,t){n.$evalAsync(ie.bind(r,t,e))};e.attr({tabindex:0}).on("keydown",function(e){i(e,r.inputKeydown)}).on("focus",function(e){i(e,r.onInputFocus)}).on("blur",function(e){i(e,r.onInputBlur)})},e.prototype.configureAutocomplete=function(e){e&&((this.autocompleteCtrl=e).registerSelectedItemWatcher(ie.bind(this,function(e){if(e){if(this.hasMaxChipsReached())return;this.appendChip(e),this.resetChipBuffer()}})),this.$element.find("input").on("focus",ie.bind(this,this.onInputFocus)).on("blur",ie.bind(this,this.onInputBlur)))},e.prototype.hasFocus=function(){return this.inputHasFocus||0<=this.selectedChip}}(),function(){r.$inject=["$mdTheming","$mdUtil","$compile","$log","$timeout","$$mdSvgRegistry"],ie.module("material.components.chips").directive("mdChips",r);var e='      <md-chips-wrap          ng-keydown="$mdChipsCtrl.chipKeydown($event)"          ng-class="{ \'md-focused\': $mdChipsCtrl.hasFocus(),                       \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly,                      \'md-removable\': $mdChipsCtrl.isRemovable() }"          class="md-chips">        <md-chip ng-repeat="$chip in $mdChipsCtrl.items"            index="{{$index}}"            ng-class="{\'md-focused\': $mdChipsCtrl.selectedChip == $index, \'md-readonly\': !$mdChipsCtrl.ngModelCtrl || $mdChipsCtrl.readonly}">          <div class="md-chip-content"              tabindex="-1"              aria-hidden="true"              ng-click="!$mdChipsCtrl.readonly && $mdChipsCtrl.focusChip($index)"              ng-focus="!$mdChipsCtrl.readonly && $mdChipsCtrl.selectChip($index)"              md-chip-transclude="$mdChipsCtrl.chipContentsTemplate"></div>          <div ng-if="$mdChipsCtrl.isRemovable()"               class="md-chip-remove-container"               md-chip-transclude="$mdChipsCtrl.chipRemoveTemplate"></div>        </md-chip>        <div class="md-chip-input-container" ng-if="!$mdChipsCtrl.readonly && $mdChipsCtrl.ngModelCtrl">          <div md-chip-transclude="$mdChipsCtrl.chipInputTemplate"></div>        </div>      </md-chips-wrap>',t='        <input            class="md-input"            tabindex="0"            placeholder="{{$mdChipsCtrl.getPlaceholder()}}"            aria-label="{{$mdChipsCtrl.getPlaceholder()}}"            ng-model="$mdChipsCtrl.chipBuffer"            ng-focus="$mdChipsCtrl.onInputFocus()"            ng-blur="$mdChipsCtrl.onInputBlur()"            ng-keydown="$mdChipsCtrl.inputKeydown($event)">',n="      <span>{{$chip}}</span>",i='      <button          class="md-chip-remove"          ng-if="$mdChipsCtrl.isRemovable()"          ng-click="$mdChipsCtrl.removeChipAndFocusInput($$replacedScope.$index)"          type="button"          aria-hidden="true"          tabindex="-1">        <md-icon md-svg-src="{{ $mdChipsCtrl.mdCloseIcon }}"></md-icon>        <span class="md-visually-hidden">          {{$mdChipsCtrl.deleteButtonLabel}}        </span>      </button>';function r(d,h,p,r,m,g){var _={chips:h.processTemplate(e),input:h.processTemplate(t),default:h.processTemplate(n),remove:h.processTemplate(i)};return{template:function(e,t){return t.$mdUserTemplate=e.clone(),_.chips},require:["mdChips"],restrict:"E",controller:"MdChipsCtrl",controllerAs:"$mdChipsCtrl",bindToController:!0,compile:function(e,o){var n=o.$mdUserTemplate;o.$mdUserTemplate=null;var s=t("md-chips>md-chip-template"),c=t(h.prefixer().buildList("md-chip-remove").map(function(e){return"md-chips>*["+e+"]"}).join(","))||_.remove,l=s||_.default,u=t("md-chips>md-autocomplete")||t("md-chips>input")||_.input,f=n.find("md-chip");n[0].querySelector("md-chip-template>*[md-chip-remove]")&&r.warn("invalid placement of md-chip-remove within md-chip-template.");function t(e){if(o.ngModel){var t=n[0].querySelector(e);return t&&t.outerHTML}}return function(e,t,n,r){h.initOptionalProperties(e,o),d(t);var i=r[0];if(s&&(i.enableChipEdit=!1),i.chipContentsTemplate=l,i.chipRemoveTemplate=c,i.chipInputTemplate=u,i.mdCloseIcon=g.mdClose,t.attr({"aria-hidden":!0,tabindex:-1}).on("focus",function(){i.onFocus()}),o.ngModel&&(i.configureNgModel(t.controller("ngModel")),n.mdTransformChip&&i.useTransformChipExpression(),n.mdOnAppend&&i.useOnAppendExpression(),n.mdOnAdd&&i.useOnAddExpression(),n.mdOnRemove&&i.useOnRemoveExpression(),n.mdOnSelect&&i.useOnSelectExpression(),u!=_.input&&e.$watch("$mdChipsCtrl.readonly",function(e){e||h.nextTick(function(){if(0===u.indexOf("<md-autocomplete")){var e=t.find("md-autocomplete");i.configureAutocomplete(e.controller("mdAutocomplete"))}i.configureUserInput(t.find("input"))})}),h.nextTick(function(){var e=t.find("input");e&&e.toggleClass("md-input",!0)})),0<f.length){var a=p(f.clone())(e.$parent);m(function(){t.find("md-chips-wrap").prepend(a)})}}},scope:{readonly:"=readonly",removable:"=mdRemovable",placeholder:"@",secondaryPlaceholder:"@",maxChips:"@mdMaxChips",transformChip:"&mdTransformChip",onAppend:"&mdOnAppend",onAdd:"&mdOnAdd",onRemove:"&mdOnRemove",onSelect:"&mdOnSelect",deleteHint:"@",deleteButtonLabel:"@",separatorKeys:"=?mdSeparatorKeys",requireMatch:"=?mdRequireMatch"}}}}(),function(){function e(){this.selectedItem=null,this.searchText=""}ie.module("material.components.chips").controller("MdContactChipsCtrl",e),e.prototype.queryContact=function(e){var t=this.contactQuery({$query:e});return this.filterSelected?t.filter(ie.bind(this,this.filterSelectedContacts)):t},e.prototype.itemName=function(e){return e[this.contactName]},e.prototype.filterSelectedContacts=function(e){return-1==this.contacts.indexOf(e)}}(),function(){e.$inject=["$mdTheming","$mdUtil"],ie.module("material.components.chips").directive("mdContactChips",e);var n='      <md-chips class="md-contact-chips"          ng-model="$mdContactChipsCtrl.contacts"          md-require-match="$mdContactChipsCtrl.requireMatch"          md-autocomplete-snap>          <md-autocomplete              md-menu-class="md-contact-chips-suggestions"              md-selected-item="$mdContactChipsCtrl.selectedItem"              md-search-text="$mdContactChipsCtrl.searchText"              md-items="item in $mdContactChipsCtrl.queryContact($mdContactChipsCtrl.searchText)"              md-item-text="$mdContactChipsCtrl.itemName(item)"              md-no-cache="true"              md-autoselect              placeholder="{{$mdContactChipsCtrl.contacts.length == 0 ?                  $mdContactChipsCtrl.placeholder : $mdContactChipsCtrl.secondaryPlaceholder}}">            <div class="md-contact-suggestion">              <img                   ng-src="{{item[$mdContactChipsCtrl.contactImage]}}"                  alt="{{item[$mdContactChipsCtrl.contactName]}}"                  ng-if="item[$mdContactChipsCtrl.contactImage]" />              <span class="md-contact-name" md-highlight-text="$mdContactChipsCtrl.searchText"                    md-highlight-flags="{{$mdContactChipsCtrl.highlightFlags}}">                {{item[$mdContactChipsCtrl.contactName]}}              </span>              <span class="md-contact-email" >{{item[$mdContactChipsCtrl.contactEmail]}}</span>            </div>          </md-autocomplete>          <md-chip-template>            <div class="md-contact-avatar">              <img                   ng-src="{{$chip[$mdContactChipsCtrl.contactImage]}}"                  alt="{{$chip[$mdContactChipsCtrl.contactName]}}"                  ng-if="$chip[$mdContactChipsCtrl.contactImage]" />            </div>            <div class="md-contact-name">              {{$chip[$mdContactChipsCtrl.contactName]}}            </div>          </md-chip-template>      </md-chips>';function e(a,o){return{template:function(e,t){return n},restrict:"E",controller:"MdContactChipsCtrl",controllerAs:"$mdContactChipsCtrl",bindToController:!0,compile:function(e,i){return function(e,t,n,r){o.initOptionalProperties(e,i),a(t),t.attr("tabindex","-1")}},scope:{contactQuery:"&mdContacts",placeholder:"@",secondaryPlaceholder:"@",contactName:"@mdContactName",contactImage:"@mdContactImage",contactEmail:"@mdContactEmail",contacts:"=ngModel",requireMatch:"=?mdRequireMatch",highlightFlags:"@?mdHighlightFlags"}}}}(),function(){e.$inject=["$element","$scope","$$mdDateUtil","$mdUtil","$mdConstant","$mdTheming","$$rAF","$attrs","$mdDateLocale"],ie.module("material.components.datepicker").directive("mdCalendar",function(){return{template:function(e,t){var n=t.hasOwnProperty("ngIf")?"":'ng-if="calendarCtrl.isInitialized"',r='<div ng-switch="calendarCtrl.currentView" '+n+'><md-calendar-year ng-switch-when="year"></md-calendar-year><md-calendar-month ng-switch-default></md-calendar-month></div>';return r},scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",dateFilter:"=mdDateFilter",_currentView:"@mdCurrentView"},require:["ngModel","mdCalendar"],controller:e,controllerAs:"calendarCtrl",bindToController:!0,link:function(e,t,n,r){var i=r[0],a=r[1];a.configureNgModel(i)}}});var u=0;function e(e,t,n,r,i,a,o,s,c){a(e),this.$element=e,this.$scope=t,this.dateUtil=n,this.$mdUtil=r,this.keyCode=i.KEY_CODE,this.$$rAF=o,this.today=this.dateUtil.createDateAtMidnight(),this.ngModelCtrl=null,this.currentView=this._currentView||"month",this.SELECTED_DATE_CLASS="md-calendar-selected-date",this.TODAY_CLASS="md-calendar-date-today",this.FOCUSED_DATE_CLASS="md-focus",this.id=u++,this.displayDate=null,this.selectedDate=null,this.firstRenderableDate=null,this.lastRenderableDate=null,this.isInitialized=!1,this.width=0,this.scrollbarWidth=0,s.tabindex||e.attr("tabindex","-1");var l=ie.bind(this,this.handleKeyEvent);ie.element(document.body).on("keydown",l),t.$on("$destroy",function(){ie.element(document.body).off("keydown",l)}),this.minDate&&this.minDate>c.firstRenderableDate?this.firstRenderableDate=this.minDate:this.firstRenderableDate=c.firstRenderableDate,this.maxDate&&this.maxDate<c.lastRenderableDate?this.lastRenderableDate=this.maxDate:this.lastRenderableDate=c.lastRenderableDate}e.prototype.configureNgModel=function(e){var t=this;t.ngModelCtrl=e,t.$mdUtil.nextTick(function(){t.isInitialized=!0}),e.$render=function(){var e=this.$viewValue;t.$scope.$broadcast("md-calendar-parent-changed",e),t.selectedDate||(t.selectedDate=e),t.displayDate||(t.displayDate=t.selectedDate||t.today)}},e.prototype.setNgModelValue=function(e){var t=this.dateUtil.createDateAtMidnight(e);return this.focus(t),this.$scope.$emit("md-calendar-change",t),this.ngModelCtrl.$setViewValue(t),this.ngModelCtrl.$render(),t},e.prototype.setCurrentView=function(e,t){var n=this;n.$mdUtil.nextTick(function(){n.currentView=e,t&&(n.displayDate=ie.isDate(t)?t:new Date(t))})},e.prototype.focus=function(e){if(this.dateUtil.isValidDate(e)){var t=this.$element[0].querySelector(".md-focus");t&&t.classList.remove(this.FOCUSED_DATE_CLASS);var n=this.getDateId(e,this.currentView),r=document.getElementById(n);r&&(r.classList.add(this.FOCUSED_DATE_CLASS),r.focus(),this.displayDate=e)}else{var i=this.$element[0].querySelector("[ng-switch]");i&&i.focus()}},e.prototype.getActionFromKeyEvent=function(e){var t=this.keyCode;switch(e.which){case t.ENTER:return"select";case t.RIGHT_ARROW:return"move-right";case t.LEFT_ARROW:return"move-left";case t.DOWN_ARROW:return e.metaKey?"move-page-down":"move-row-down";case t.UP_ARROW:return e.metaKey?"move-page-up":"move-row-up";case t.PAGE_DOWN:return"move-page-down";case t.PAGE_UP:return"move-page-up";case t.HOME:return"start";case t.END:return"end";default:return null}},e.prototype.handleKeyEvent=function(t){var n=this;this.$scope.$apply(function(){if(t.which==n.keyCode.ESCAPE||t.which==n.keyCode.TAB)return n.$scope.$emit("md-calendar-close"),void(t.which==n.keyCode.TAB&&t.preventDefault());var e=n.getActionFromKeyEvent(t);e&&(t.preventDefault(),t.stopPropagation(),n.$scope.$broadcast("md-calendar-parent-action",e))})},e.prototype.hideVerticalScrollbar=function(r){var i=this,t=r.$element[0],a=t.querySelector(".md-calendar-scroll-mask");function n(){var e=i.width||340,t=i.scrollbarWidth,n=r.calendarScroller;a.style.width=e+"px",n.style.width=e+t+"px",n.style.paddingRight=t+"px"}0<i.width?n():i.$$rAF(function(){var e=r.calendarScroller;i.scrollbarWidth=e.offsetWidth-e.clientWidth,i.width=t.querySelector("table").offsetWidth,n()})},e.prototype.getDateId=function(e,t){if(!t)throw new Error("A namespace for the date id has to be specified.");return["md",this.id,t,e.getFullYear(),e.getMonth(),e.getDate()].join("-")},e.prototype.updateVirtualRepeat=function(){var e=this.$scope,t=e.$on("$md-resize-enable",function(){e.$$phase||e.$apply(),t()})}}(),function(){t.$inject=["$element","$scope","$animate","$q","$$mdDateUtil","$mdDateLocale"],ie.module("material.components.datepicker").directive("mdCalendarMonth",function(){return{template:'<table aria-hidden="true" class="md-calendar-day-header"><thead></thead></table><div class="md-calendar-scroll-mask"><md-virtual-repeat-container class="md-calendar-scroll-container" md-offset-size="'+(e-n)+'"><table role="grid" tabindex="0" class="md-calendar" aria-readonly="true"><tbody md-calendar-month-body role="rowgroup" md-virtual-repeat="i in monthCtrl.items" md-month-offset="$index" class="md-calendar-month" md-start-index="monthCtrl.getSelectedMonthIndex()" md-item-size="'+n+'"></tbody></table></md-virtual-repeat-container></div>',require:["^^mdCalendar","mdCalendarMonth"],controller:t,controllerAs:"monthCtrl",bindToController:!0,link:function(e,t,n,r){var i=r[0],a=r[1];a.initialize(i)}}});var n=265,e=45;function t(e,t,n,r,i,a){this.$element=e,this.$scope=t,this.$animate=n,this.$q=r,this.dateUtil=i,this.dateLocale=a,this.calendarScroller=e[0].querySelector(".md-virtual-repeat-scroller"),this.isInitialized=!1,this.isMonthTransitionInProgress=!1;var o=this;this.cellClickHandler=function(){var e=i.getTimestampFromNode(this);o.$scope.$apply(function(){o.calendarCtrl.setNgModelValue(e)})},this.headerClickHandler=function(){o.calendarCtrl.setCurrentView("year",i.getTimestampFromNode(this))}}t.prototype.initialize=function(e){this.items={length:this.dateUtil.getMonthDistance(e.firstRenderableDate,e.lastRenderableDate)+2},this.calendarCtrl=e,this.attachScopeListeners(),e.updateVirtualRepeat(),e.ngModelCtrl&&e.ngModelCtrl.$render()},t.prototype.getSelectedMonthIndex=function(){var e=this.calendarCtrl;return this.dateUtil.getMonthDistance(e.firstRenderableDate,e.displayDate||e.selectedDate||e.today)},t.prototype.changeSelectedDate=function(r){var i=this.calendarCtrl,a=i.selectedDate;i.selectedDate=r,this.changeDisplayDate(r).then(function(){var e=i.SELECTED_DATE_CLASS;if(a){var t=document.getElementById(i.getDateId(a,"month"));t&&(t.classList.remove(e),t.setAttribute("aria-selected","false"))}if(r){var n=document.getElementById(i.getDateId(r,"month"));n&&(n.classList.add(e),n.setAttribute("aria-selected","true"))}})},t.prototype.changeDisplayDate=function(e){if(!this.isInitialized)return this.buildWeekHeader(),this.calendarCtrl.hideVerticalScrollbar(this),this.isInitialized=!0,this.$q.when();if(!this.dateUtil.isValidDate(e)||this.isMonthTransitionInProgress)return this.$q.when();this.isMonthTransitionInProgress=!0;var t=this.animateDateChange(e);this.calendarCtrl.displayDate=e;var n=this;return t.then(function(){n.isMonthTransitionInProgress=!1}),t},t.prototype.animateDateChange=function(e){if(this.dateUtil.isValidDate(e)){var t=this.dateUtil.getMonthDistance(this.calendarCtrl.firstRenderableDate,e);this.calendarScroller.scrollTop=t*n}return this.$q.when()},t.prototype.buildWeekHeader=function(){for(var e=this.dateLocale.firstDayOfWeek,t=this.dateLocale.shortDays,n=document.createElement("tr"),r=0;r<7;r++){var i=document.createElement("th");i.textContent=t[(r+e)%7],n.appendChild(i)}this.$element.find("thead").append(n)},t.prototype.attachScopeListeners=function(){var n=this;n.$scope.$on("md-calendar-parent-changed",function(e,t){n.changeSelectedDate(t)}),n.$scope.$on("md-calendar-parent-action",ie.bind(this,this.handleKeyEvent))},t.prototype.handleKeyEvent=function(e,t){var n=this.calendarCtrl,r=n.displayDate;if("select"===t)n.setNgModelValue(r);else{var i=null,a=this.dateUtil;switch(t){case"move-right":i=a.incrementDays(r,1);break;case"move-left":i=a.incrementDays(r,-1);break;case"move-page-down":i=a.incrementMonths(r,1);break;case"move-page-up":i=a.incrementMonths(r,-1);break;case"move-row-down":i=a.incrementDays(r,7);break;case"move-row-up":i=a.incrementDays(r,-7);break;case"start":i=a.getFirstDateOfMonth(r);break;case"end":i=a.getLastDateOfMonth(r)}i&&(i=this.dateUtil.clampDate(i,n.minDate,n.maxDate),this.changeDisplayDate(i).then(function(){n.focus(i)}))}}}(),function(){function e(e,t){var s=e('<md-icon md-svg-src="'+t.mdTabsArrow+'"></md-icon>')({})[0];return{require:["^^mdCalendar","^^mdCalendarMonth","mdCalendarMonthBody"],scope:{offset:"=mdMonthOffset"},controller:n,controllerAs:"mdMonthBodyCtrl",bindToController:!0,link:function(e,t,n,r){var i=r[0],a=r[1],o=r[2];o.calendarCtrl=i,o.monthCtrl=a,o.arrowIcon=s.cloneNode(!0),e.$watch(function(){return o.offset},function(e,t){e!==t&&o.generateContent()})}}}function n(e,t,n){this.$element=e,this.dateUtil=t,this.dateLocale=n,this.monthCtrl=null,this.calendarCtrl=null,this.offset=null,this.focusAfterAppend=null}e.$inject=["$compile","$$mdSvgRegistry"],n.$inject=["$element","$$mdDateUtil","$mdDateLocale"],ie.module("material.components.datepicker").directive("mdCalendarMonthBody",e),n.prototype.generateContent=function(){var e=this.dateUtil.incrementMonths(this.calendarCtrl.firstRenderableDate,this.offset);this.$element.empty().append(this.buildCalendarForMonth(e)),this.focusAfterAppend&&(this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS),this.focusAfterAppend.focus(),this.focusAfterAppend=null)},n.prototype.buildDateCell=function(e){var t=this.monthCtrl,n=this.calendarCtrl,r=document.createElement("td");if(r.tabIndex=-1,r.classList.add("md-calendar-date"),r.setAttribute("role","gridcell"),e){r.setAttribute("tabindex","-1"),r.setAttribute("aria-label",this.dateLocale.longDateFormatter(e)),r.id=n.getDateId(e,"month"),r.setAttribute("data-timestamp",e.getTime()),this.dateUtil.isSameDay(e,n.today)&&r.classList.add(n.TODAY_CLASS),this.dateUtil.isValidDate(n.selectedDate)&&this.dateUtil.isSameDay(e,n.selectedDate)&&(r.classList.add(n.SELECTED_DATE_CLASS),r.setAttribute("aria-selected","true"));var i=this.dateLocale.dates[e.getDate()];if(this.isDateEnabled(e)){var a=document.createElement("span");a.classList.add("md-calendar-date-selection-indicator"),a.textContent=i,r.appendChild(a),r.addEventListener("click",t.cellClickHandler),n.displayDate&&this.dateUtil.isSameDay(e,n.displayDate)&&(this.focusAfterAppend=r)}else r.classList.add("md-calendar-date-disabled"),r.textContent=i}return r},n.prototype.isDateEnabled=function(e){return this.dateUtil.isDateWithinRange(e,this.calendarCtrl.minDate,this.calendarCtrl.maxDate)&&(!ie.isFunction(this.calendarCtrl.dateFilter)||this.calendarCtrl.dateFilter(e))},n.prototype.buildDateRow=function(e){var t=document.createElement("tr");return t.setAttribute("role","row"),t.setAttribute("aria-label",this.dateLocale.weekNumberFormatter(e)),t},n.prototype.buildCalendarForMonth=function(e){var t=this.dateUtil.isValidDate(e)?e:new Date,n=this.dateUtil.getFirstDateOfMonth(t),r=this.getLocaleDay_(n),i=this.dateUtil.getNumberOfDaysInMonth(t),a=document.createDocumentFragment(),o=1,s=this.buildDateRow(o);a.appendChild(s);var c=this.offset===this.monthCtrl.items.length-1,l=0,u=document.createElement("td"),f=document.createElement("span");if(f.textContent=this.dateLocale.monthHeaderFormatter(t),u.appendChild(f),u.classList.add("md-calendar-month-label"),this.calendarCtrl.maxDate&&n>this.calendarCtrl.maxDate?u.classList.add("md-calendar-month-label-disabled"):(u.addEventListener("click",this.monthCtrl.headerClickHandler),u.setAttribute("data-timestamp",n.getTime()),u.setAttribute("aria-label",this.dateLocale.monthFormatter(t)),u.appendChild(this.arrowIcon.cloneNode(!0))),r<=2){u.setAttribute("colspan","7");var d=this.buildDateRow();if(d.appendChild(u),a.insertBefore(d,s),c)return a}else l=3,u.setAttribute("colspan","3"),s.appendChild(u);for(var h=l;h<r;h++)s.appendChild(this.buildDateCell());for(var p=r,m=n,g=1;g<=i;g++){if(7===p){if(c)return a;p=0,o++,s=this.buildDateRow(o),a.appendChild(s)}m.setDate(g);var _=this.buildDateCell(m);s.appendChild(_),p++}for(;s.childNodes.length<7;)s.appendChild(this.buildDateCell());for(;a.childNodes.length<6;){for(var b=this.buildDateRow(),v=0;v<7;v++)b.appendChild(this.buildDateCell());a.appendChild(b)}return a},n.prototype.getLocaleDay_=function(e){return(e.getDay()+(7-this.dateLocale.firstDayOfWeek))%7}}(),function(){e.$inject=["$element","$scope","$animate","$q","$$mdDateUtil"],ie.module("material.components.datepicker").directive("mdCalendarYear",function(){return{template:'<div class="md-calendar-scroll-mask"><md-virtual-repeat-container class="md-calendar-scroll-container"><table role="grid" tabindex="0" class="md-calendar" aria-readonly="true"><tbody md-calendar-year-body role="rowgroup" md-virtual-repeat="i in yearCtrl.items" md-year-offset="$index" class="md-calendar-year" md-start-index="yearCtrl.getFocusedYearIndex()" md-item-size="'+n+'"></tbody></table></md-virtual-repeat-container></div>',require:["^^mdCalendar","mdCalendarYear"],controller:e,controllerAs:"yearCtrl",bindToController:!0,link:function(e,t,n,r){var i=r[0],a=r[1];a.initialize(i)}}});var n=88;function e(e,t,n,r,i){this.$element=e,this.$scope=t,this.$animate=n,this.$q=r,this.dateUtil=i,this.calendarScroller=e[0].querySelector(".md-virtual-repeat-scroller"),this.isInitialized=!1,this.isMonthTransitionInProgress=!1;var a=this;this.cellClickHandler=function(){a.calendarCtrl.setCurrentView("month",i.getTimestampFromNode(this))}}e.prototype.initialize=function(e){this.items={length:this.dateUtil.getYearDistance(e.firstRenderableDate,e.lastRenderableDate)+1},this.calendarCtrl=e,this.attachScopeListeners(),e.updateVirtualRepeat(),e.ngModelCtrl&&e.ngModelCtrl.$render()},e.prototype.getFocusedYearIndex=function(){var e=this.calendarCtrl;return this.dateUtil.getYearDistance(e.firstRenderableDate,e.displayDate||e.selectedDate||e.today)},e.prototype.changeDate=function(e){if(!this.isInitialized)return this.calendarCtrl.hideVerticalScrollbar(this),this.isInitialized=!0,this.$q.when();if(this.dateUtil.isValidDate(e)&&!this.isMonthTransitionInProgress){var t=this,n=this.animateDateChange(e);return t.isMonthTransitionInProgress=!0,t.calendarCtrl.displayDate=e,n.then(function(){t.isMonthTransitionInProgress=!1})}},e.prototype.animateDateChange=function(e){if(this.dateUtil.isValidDate(e)){var t=this.dateUtil.getYearDistance(this.calendarCtrl.firstRenderableDate,e);this.calendarScroller.scrollTop=t*n}return this.$q.when()},e.prototype.handleKeyEvent=function(e,t){var n=this.calendarCtrl,r=n.displayDate;if("select"===t)this.changeDate(r).then(function(){n.setCurrentView("month",r),n.focus(r)});else{var i=null,a=this.dateUtil;switch(t){case"move-right":i=a.incrementMonths(r,1);break;case"move-left":i=a.incrementMonths(r,-1);break;case"move-row-down":i=a.incrementMonths(r,6);break;case"move-row-up":i=a.incrementMonths(r,-6)}if(i){var o=n.minDate?a.getFirstDateOfMonth(n.minDate):null,s=n.maxDate?a.getFirstDateOfMonth(n.maxDate):null;i=a.getFirstDateOfMonth(this.dateUtil.clampDate(i,o,s)),this.changeDate(i).then(function(){n.focus(i)})}}},e.prototype.attachScopeListeners=function(){var n=this;n.$scope.$on("md-calendar-parent-changed",function(e,t){n.changeDate(t)}),n.$scope.$on("md-calendar-parent-action",ie.bind(n,n.handleKeyEvent))}}(),function(){function e(e,t,n){this.$element=e,this.dateUtil=t,this.dateLocale=n,this.calendarCtrl=null,this.yearCtrl=null,this.offset=null,this.focusAfterAppend=null}e.$inject=["$element","$$mdDateUtil","$mdDateLocale"],ie.module("material.components.datepicker").directive("mdCalendarYearBody",function(){return{require:["^^mdCalendar","^^mdCalendarYear","mdCalendarYearBody"],scope:{offset:"=mdYearOffset"},controller:e,controllerAs:"mdYearBodyCtrl",bindToController:!0,link:function(e,t,n,r){var i=r[0],a=r[1],o=r[2];o.calendarCtrl=i,o.yearCtrl=a,e.$watch(function(){return o.offset},function(e,t){e!==t&&o.generateContent()})}}}),e.prototype.generateContent=function(){var e=this.dateUtil.incrementYears(this.calendarCtrl.firstRenderableDate,this.offset);this.$element.empty().append(this.buildCalendarForYear(e)),this.focusAfterAppend&&(this.focusAfterAppend.classList.add(this.calendarCtrl.FOCUSED_DATE_CLASS),this.focusAfterAppend.focus(),this.focusAfterAppend=null)},e.prototype.buildMonthCell=function(e,t){var n=this.calendarCtrl,r=this.yearCtrl,i=this.buildBlankCell(),a=new Date(e,t,1);i.setAttribute("aria-label",this.dateLocale.monthFormatter(a)),i.id=n.getDateId(a,"year"),i.setAttribute("data-timestamp",a.getTime()),this.dateUtil.isSameMonthAndYear(a,n.today)&&i.classList.add(n.TODAY_CLASS),this.dateUtil.isValidDate(n.selectedDate)&&this.dateUtil.isSameMonthAndYear(a,n.selectedDate)&&(i.classList.add(n.SELECTED_DATE_CLASS),i.setAttribute("aria-selected","true"));var o=this.dateLocale.shortMonths[t];if(this.dateUtil.isMonthWithinRange(a,n.minDate,n.maxDate)){var s=document.createElement("span");s.classList.add("md-calendar-date-selection-indicator"),s.textContent=o,i.appendChild(s),i.addEventListener("click",r.cellClickHandler),n.displayDate&&this.dateUtil.isSameMonthAndYear(a,n.displayDate)&&(this.focusAfterAppend=i)}else i.classList.add("md-calendar-date-disabled"),i.textContent=o;return i},e.prototype.buildBlankCell=function(){var e=document.createElement("td");return e.tabIndex=-1,e.classList.add("md-calendar-date"),e.setAttribute("role","gridcell"),e.setAttribute("tabindex","-1"),e},e.prototype.buildCalendarForYear=function(e){var t,n=e.getFullYear(),r=document.createDocumentFragment(),i=document.createElement("tr"),a=document.createElement("td");for(a.className="md-calendar-month-label",a.textContent=n,i.appendChild(a),t=0;t<6;t++)i.appendChild(this.buildMonthCell(n,t));r.appendChild(i);var o=document.createElement("tr");for(o.appendChild(this.buildBlankCell()),t=6;t<12;t++)o.appendChild(this.buildMonthCell(n,t));return r.appendChild(o),r}}(),ie.module("material.components.datepicker").config(["$provide",function(e){function t(){this.months=null,this.shortMonths=null,this.days=null,this.shortDays=null,this.dates=null,this.firstDayOfWeek=0,this.formatDate=null,this.parseDate=null,this.monthHeaderFormatter=null,this.weekNumberFormatter=null,this.longDateFormatter=null,this.msgCalendar="",this.msgOpenCalendar=""}(t.prototype.$get=function(e,r){for(var t=e.DATETIME_FORMATS.SHORTDAY.map(function(e){return e.substring(0,1)}),n=Array(32),i=1;i<=31;i++)n[i]=i;var a=new Date(1880,0,1),o=new Date(a.getFullYear()+250,0,1),s={months:this.months||e.DATETIME_FORMATS.MONTH,shortMonths:this.shortMonths||e.DATETIME_FORMATS.SHORTMONTH,days:this.days||e.DATETIME_FORMATS.DAY,shortDays:this.shortDays||t,dates:this.dates||n,firstDayOfWeek:this.firstDayOfWeek||0,formatDate:this.formatDate||function(e){if(!e)return"";var t=e.toLocaleTimeString(),n=e;return 0!=e.getHours()||-1===t.indexOf("11:")&&-1===t.indexOf("23:")||(n=new Date(e.getFullYear(),e.getMonth(),e.getDate(),1,0,0)),r("date")(n,"M/d/yyyy")},parseDate:this.parseDate||function(e){return new Date(e)},isDateComplete:this.isDateComplete||function(e){return e=e.trim(),/^(([a-zA-Z]{3,}|[0-9]{1,4})([ \.,]+|[\/\-])){2}([a-zA-Z]{3,}|[0-9]{1,4})$/.test(e)},monthHeaderFormatter:this.monthHeaderFormatter||function(e){return s.shortMonths[e.getMonth()]+" "+e.getFullYear()},monthFormatter:this.monthFormatter||function(e){return s.months[e.getMonth()]+" "+e.getFullYear()},weekNumberFormatter:this.weekNumberFormatter||function(e){return"Week "+e},longDateFormatter:this.longDateFormatter||function(e){return[s.days[e.getDay()],s.months[e.getMonth()],s.dates[e.getDate()],e.getFullYear()].join(" ")},msgCalendar:this.msgCalendar||"Calendar",msgOpenCalendar:this.msgOpenCalendar||"Open calendar",firstRenderableDate:this.firstRenderableDate||a,lastRenderableDate:this.lastRenderableDate||o};return s}).$inject=["$locale","$filter"],e.provider("$mdDateLocale",new t)}]),ie.module("material.components.datepicker").factory("$$mdDateUtil",function(){return{getFirstDateOfMonth:n,getNumberOfDaysInMonth:i,getDateInNextMonth:r,getDateInPreviousMonth:a,isInNextMonth:function(e,t){return o(r(e),t)},isInPreviousMonth:function(e,t){var n=a(e);return o(t,n)},getDateMidpoint:function(e,t){return u((e.getTime()+t.getTime())/2)},isSameMonthAndYear:o,getWeekOfMonth:function(e){var t=n(e);return Math.floor((t.getDay()+e.getDate()-1)/7)},incrementDays:function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate()+t)},incrementMonths:s,getLastDateOfMonth:function(e){return new Date(e.getFullYear(),e.getMonth(),i(e))},isSameDay:function(e,t){return e.getDate()==t.getDate()&&o(e,t)},getMonthDistance:function(e,t){return 12*(t.getFullYear()-e.getFullYear())+(t.getMonth()-e.getMonth())},isValidDate:c,setDateTimeToMidnight:l,createDateAtMidnight:u,isDateWithinRange:function(e,t,n){var r=u(e),i=c(t)?u(t):null,a=c(n)?u(n):null;return(!i||i<=r)&&(!a||r<=a)},incrementYears:function(e,t){return s(e,12*t)},getYearDistance:function(e,t){return t.getFullYear()-e.getFullYear()},clampDate:function(e,t,n){var r=e;return t&&e<t&&(r=new Date(t.getTime())),n&&n<e&&(r=new Date(n.getTime())),r},getTimestampFromNode:function(e){if(e&&e.hasAttribute("data-timestamp"))return Number(e.getAttribute("data-timestamp"))},isMonthWithinRange:function(e,t,n){var r=e.getMonth(),i=e.getFullYear();return(!t||t.getFullYear()<i||t.getMonth()<=r)&&(!n||n.getFullYear()>i||n.getMonth()>=r)}};function n(e){return new Date(e.getFullYear(),e.getMonth(),1)}function i(e){return new Date(e.getFullYear(),e.getMonth()+1,0).getDate()}function r(e){return new Date(e.getFullYear(),e.getMonth()+1,1)}function a(e){return new Date(e.getFullYear(),e.getMonth()-1,1)}function o(e,t){return e.getFullYear()===t.getFullYear()&&e.getMonth()===t.getMonth()}function s(e,t){var n=new Date(e.getFullYear(),e.getMonth()+t,1),r=i(n);return r<e.getDate()?n.setDate(r):n.setDate(e.getDate()),n}function c(e){return null!=e&&e.getTime&&!isNaN(e.getTime())}function l(e){c(e)&&e.setHours(0,0,0,0)}function u(e){var t;return l(t=ie.isUndefined(e)?new Date:new Date(e)),t}}),function(){function e(i,f,d,h){return{template:function(e,t){var n=t.mdHideIcons,r=t.ariaLabel||t.mdPlaceholder;return("all"===n||"calendar"===n?"":'<md-button class="md-datepicker-button md-icon-button" type="button" tabindex="-1" aria-hidden="true" ng-click="ctrl.openCalendarPane($event)"><md-icon class="md-datepicker-calendar-icon" aria-label="md-calendar" md-svg-src="'+i.mdCalendar+'"></md-icon></md-button>')+'<div class="md-datepicker-input-container" ng-class="{\'md-datepicker-focused\': ctrl.isFocused}"><input '+(r?'aria-label="'+r+'" ':"")+'class="md-datepicker-input" aria-haspopup="true" ng-focus="ctrl.setFocused(true)" ng-blur="ctrl.setFocused(false)"> '+("all"===n||"triangle"===n?"":'<md-button type="button" md-no-ink class="md-datepicker-triangle-button md-icon-button" ng-click="ctrl.openCalendarPane($event)" aria-label="{{::ctrl.dateLocale.msgOpenCalendar}}"><div class="md-datepicker-expand-triangle"></div></md-button>')+'</div><div class="md-datepicker-calendar-pane md-whiteframe-z1"><div class="md-datepicker-input-mask"><div class="md-datepicker-input-mask-opaque"></div></div><div class="md-datepicker-calendar"><md-calendar role="dialog" aria-label="{{::ctrl.dateLocale.msgCalendar}}" md-current-view="{{::ctrl.currentView}}"md-min-date="ctrl.minDate"md-max-date="ctrl.maxDate"md-date-filter="ctrl.dateFilter"ng-model="ctrl.date" ng-if="ctrl.isCalendarOpen"></md-calendar></div></div>'},require:["ngModel","mdDatepicker","?^mdInputContainer","?^form"],scope:{minDate:"=mdMinDate",maxDate:"=mdMaxDate",placeholder:"@mdPlaceholder",currentView:"@mdCurrentView",dateFilter:"=mdDateFilter",isOpen:"=?mdIsOpen",debounceInterval:"=mdDebounceInterval"},controller:t,controllerAs:"ctrl",bindToController:!0,link:function(e,t,n,r){var i=r[0],a=r[1],o=r[2],s=r[3],c=f.parseAttributeBoolean(n.mdNoAsterisk);if(a.configureNgModel(i,o,h),o){var l=t[0].querySelector(".md-errors-spacer");l&&t.after(ie.element("<div>").append(l)),o.setHasPlaceholder(n.mdPlaceholder),o.input=t,o.element.addClass(p).toggleClass(m,"calendar"!==n.mdHideIcons&&"all"!==n.mdHideIcons),o.label?c||n.$observe("required",function(e){o.label.toggleClass("md-required",!!e)}):d.expect(t,"aria-label",n.mdPlaceholder),e.$watch(o.isErrorGetter||function(){return i.$invalid&&(i.$touched||s&&s.$submitted)},o.setInvalid)}else if(s)var u=e.$watch(function(){return s.$submitted},function(e){e&&(a.updateErrorState(),u())})}}}t.$inject=["$scope","$element","$attrs","$window","$mdConstant","$mdTheming","$mdUtil","$mdDateLocale","$$mdDateUtil","$$rAF","$mdGesture","$filter"],e.$inject=["$$mdSvgRegistry","$mdUtil","$mdAria","inputDirective"],ie.module("material.components.datepicker").directive("mdDatepicker",e);var i="md-datepicker-invalid",f="md-datepicker-open",p="_md-datepicker-floating-label",m="_md-datepicker-has-calendar-icon";function t(e,t,n,r,i,a,o,s,c,l,u,f){this.$window=r,this.dateLocale=s,this.dateUtil=c,this.$mdConstant=i,this.$mdUtil=o,this.$$rAF=l,this.documentElement=ie.element(document.documentElement),this.ngModelCtrl=null,this.inputElement=t[0].querySelector("input"),this.ngInputElement=ie.element(this.inputElement),this.inputContainer=t[0].querySelector(".md-datepicker-input-container"),this.calendarPane=t[0].querySelector(".md-datepicker-calendar-pane"),this.calendarButton=t[0].querySelector(".md-datepicker-button"),this.inputMask=ie.element(t[0].querySelector(".md-datepicker-input-mask-opaque")),this.$element=t,this.$attrs=n,this.$scope=e,this.date=null,this.isFocused=!1,this.isDisabled,this.setDisabled(t[0].disabled||ie.isString(n.disabled)),this.isCalendarOpen=!1,this.openOnFocus=n.hasOwnProperty("mdOpenOnFocus"),this.mdInputContainer=null,this.calendarPaneOpenedFrom=null,this.calendarPane.id="md-date-pane"+o.nextUid(),this.bodyClickHandler=ie.bind(this,this.handleBodyClick),this.windowEventName=u.isIos||u.isAndroid?"orientationchange":"resize",this.windowEventHandler=o.debounce(ie.bind(this,this.closeCalendarPane),100),this.windowBlurHandler=ie.bind(this,this.handleWindowBlur),this.ngDateFilter=f("date"),this.leftMargin=20,this.topMargin=null,n.tabindex?(this.ngInputElement.attr("tabindex",n.tabindex),n.$set("tabindex",null)):n.$set("tabindex","-1"),a(t),a(ie.element(this.calendarPane)),this.installPropertyInterceptors(),this.attachChangeListeners(),this.attachInteractionListeners();var d=this;e.$on("$destroy",function(){d.detachCalendarPane()}),n.mdIsOpen&&e.$watch("ctrl.isOpen",function(e){e?d.openCalendarPane({target:d.inputElement}):d.closeCalendarPane()})}t.prototype.configureNgModel=function(e,t,n){this.ngModelCtrl=e,this.mdInputContainer=t,this.$attrs.$set("type","date"),n[0].link.pre(this.$scope,{on:ie.noop,val:ie.noop,0:{}},this.$attrs,[e]);var r=this;r.ngModelCtrl.$formatters.push(function(e){if(e&&!(e instanceof Date))throw Error("The ng-model for md-datepicker must be a Date instance. Currently the model is a: "+typeof e);return r.date=e,r.inputElement.value=r.dateLocale.formatDate(e),r.mdInputContainer&&r.mdInputContainer.setHasValue(!!e),r.resizeInputElement(),r.updateErrorState(),e}),e.$viewChangeListeners.unshift(ie.bind(this,this.updateErrorState))},t.prototype.attachChangeListeners=function(){var n=this;n.$scope.$on("md-calendar-change",function(e,t){n.setModelValue(t),n.date=t,n.inputElement.value=n.dateLocale.formatDate(t),n.mdInputContainer&&n.mdInputContainer.setHasValue(!!t),n.closeCalendarPane(),n.resizeInputElement(),n.updateErrorState()}),n.ngInputElement.on("input",ie.bind(n,n.resizeInputElement));var e=ie.isDefined(this.debounceInterval)?this.debounceInterval:500;n.ngInputElement.on("input",n.$mdUtil.debounce(n.handleInputEvent,e,n))},t.prototype.attachInteractionListeners=function(){var t=this,n=this.$scope,r=this.$mdConstant.KEY_CODE;t.ngInputElement.on("keydown",function(e){e.altKey&&e.keyCode==r.DOWN_ARROW&&(t.openCalendarPane(e),n.$digest())}),t.openOnFocus&&(t.ngInputElement.on("focus",ie.bind(t,t.openCalendarPane)),ie.element(t.$window).on("blur",t.windowBlurHandler),n.$on("$destroy",function(){ie.element(t.$window).off("blur",t.windowBlurHandler)})),n.$on("md-calendar-close",function(){t.closeCalendarPane()})},t.prototype.installPropertyInterceptors=function(){var t=this;if(this.$attrs.ngDisabled){var e=this.$scope.$parent;e&&e.$watch(this.$attrs.ngDisabled,function(e){t.setDisabled(e)})}Object.defineProperty(this,"placeholder",{get:function(){return t.inputElement.placeholder},set:function(e){t.inputElement.placeholder=e||""}})},t.prototype.setDisabled=function(e){this.isDisabled=e,this.inputElement.disabled=e,this.calendarButton&&(this.calendarButton.disabled=e)},t.prototype.updateErrorState=function(e){var t=e||this.date;if(this.clearErrorState(),this.dateUtil.isValidDate(t)){if(t=this.dateUtil.createDateAtMidnight(t),this.dateUtil.isValidDate(this.minDate)){var n=this.dateUtil.createDateAtMidnight(this.minDate);this.ngModelCtrl.$setValidity("mindate",n<=t)}if(this.dateUtil.isValidDate(this.maxDate)){var r=this.dateUtil.createDateAtMidnight(this.maxDate);this.ngModelCtrl.$setValidity("maxdate",t<=r)}ie.isFunction(this.dateFilter)&&this.ngModelCtrl.$setValidity("filtered",this.dateFilter(t))}else this.ngModelCtrl.$setValidity("valid",null==t);this.ngModelCtrl.$valid||this.inputContainer.classList.add(i)},t.prototype.clearErrorState=function(){this.inputContainer.classList.remove(i),["mindate","maxdate","filtered","valid"].forEach(function(e){this.ngModelCtrl.$setValidity(e,!0)},this)},t.prototype.resizeInputElement=function(){this.inputElement.size=this.inputElement.value.length+3},t.prototype.handleInputEvent=function(){var e=this.inputElement.value,t=e?this.dateLocale.parseDate(e):null;this.dateUtil.setDateTimeToMidnight(t),(""==e||this.dateUtil.isValidDate(t)&&this.dateLocale.isDateComplete(e)&&this.isDateEnabled(t))&&(this.setModelValue(t),this.date=t),this.updateErrorState(t)},t.prototype.isDateEnabled=function(e){return this.dateUtil.isDateWithinRange(e,this.minDate,this.maxDate)&&(!ie.isFunction(this.dateFilter)||this.dateFilter(e))},t.prototype.attachCalendarPane=function(){var e=this.calendarPane,t=document.body;e.style.transform="",this.$element.addClass(f),this.mdInputContainer&&this.mdInputContainer.element.addClass(f),ie.element(t).addClass("md-datepicker-is-showing");var n=this.inputContainer.getBoundingClientRect(),r=t.getBoundingClientRect();(!this.topMargin||this.topMargin<0)&&(this.topMargin=(this.inputMask.parent().prop("clientHeight")-this.ngInputElement.prop("clientHeight"))/2);var i=n.top-r.top-this.topMargin,a=n.left-r.left-this.leftMargin,o=r.top<0&&0==document.body.scrollTop?-r.top:document.body.scrollTop,s=r.left<0&&0==document.body.scrollLeft?-r.left:document.body.scrollLeft,c=o+this.$window.innerHeight,l=s+this.$window.innerWidth;if(this.inputMask.css({position:"absolute",left:this.leftMargin+"px",top:this.topMargin+"px",width:n.width-1+"px",height:n.height-2+"px"}),l<a+360){if(0<l-360)a=l-360;else{a=s;var u=this.$window.innerWidth/360;e.style.transform="scale("+u+")"}e.classList.add("md-datepicker-pos-adjusted")}c<i+368&&o<c-368&&(i=c-368,e.classList.add("md-datepicker-pos-adjusted")),e.style.left=a+"px",e.style.top=i+"px",document.body.appendChild(e),this.$$rAF(function(){e.classList.add("md-pane-open")})},t.prototype.detachCalendarPane=function(){this.$element.removeClass(f),this.mdInputContainer&&this.mdInputContainer.element.removeClass(f),ie.element(document.body).removeClass("md-datepicker-is-showing"),this.calendarPane.classList.remove("md-pane-open"),this.calendarPane.classList.remove("md-datepicker-pos-adjusted"),this.isCalendarOpen&&this.$mdUtil.enableScrolling(),this.calendarPane.parentNode&&this.calendarPane.parentNode.removeChild(this.calendarPane)},t.prototype.openCalendarPane=function(e){if(!this.isCalendarOpen&&!this.isDisabled&&!this.inputFocusedOnWindowBlur){this.isCalendarOpen=this.isOpen=!0,this.calendarPaneOpenedFrom=e.target,this.$mdUtil.disableScrollAround(this.calendarPane),this.attachCalendarPane(),this.focusCalendar(),this.evalAttr("ngFocus");var t=this;this.$mdUtil.nextTick(function(){t.documentElement.on("click touchstart",t.bodyClickHandler)},!1),G.addEventListener(this.windowEventName,this.windowEventHandler)}},t.prototype.closeCalendarPane=function(){if(this.isCalendarOpen){var e=this;e.detachCalendarPane(),e.ngModelCtrl.$setTouched(),e.evalAttr("ngBlur"),e.documentElement.off("click touchstart",e.bodyClickHandler),G.removeEventListener(e.windowEventName,e.windowEventHandler),e.calendarPaneOpenedFrom.focus(),e.calendarPaneOpenedFrom=null,e.openOnFocus?e.$mdUtil.nextTick(t):t()}function t(){e.isCalendarOpen=e.isOpen=!1}},t.prototype.getCalendarCtrl=function(){return ie.element(this.calendarPane.querySelector("md-calendar")).controller("mdCalendar")},t.prototype.focusCalendar=function(){var e=this;this.$mdUtil.nextTick(function(){e.getCalendarCtrl().focus()},!1)},t.prototype.setFocused=function(e){e||this.ngModelCtrl.$setTouched(),this.openOnFocus||this.evalAttr(e?"ngFocus":"ngBlur"),this.isFocused=e},t.prototype.handleBodyClick=function(e){this.isCalendarOpen&&(this.$mdUtil.getClosest(e.target,"md-calendar")||this.closeCalendarPane(),this.$scope.$digest())},t.prototype.handleWindowBlur=function(){this.inputFocusedOnWindowBlur=document.activeElement===this.inputElement},t.prototype.evalAttr=function(e){this.$attrs[e]&&this.$scope.$parent.$eval(this.$attrs[e])},t.prototype.setModelValue=function(e){this.ngModelCtrl.$setViewValue(this.ngDateFilter(e,"yyyy-MM-dd"))}}(),ie.module("material.components.icon").directive("mdIcon",["$mdIcon","$mdTheming","$mdAria","$sce",function(l,u,f,e){return{restrict:"E",link:function(e,t,n){u(t);var r=n.mdFontIcon,i=l.fontSet(n.mdFontSet);n.mdSvgIcon||n.mdSvgSrc||(n.mdFontIcon&&t.addClass("md-font "+n.mdFontIcon),t.addClass(i)),n.$observe("mdFontIcon",c),n.$observe("mdFontSet",c),t[0].getAttribute(n.$attr.mdSvgSrc);var a,o=n.alt||n.mdFontIcon||n.mdSvgIcon||t.text(),s=n.$normalize(n.$attr.mdSvgIcon||n.$attr.mdSvgSrc||"");function c(){if(!n.mdSvgIcon&&!n.mdSvgSrc){n.mdFontIcon&&(t.removeClass(r),t.addClass(n.mdFontIcon),r=n.mdFontIcon);var e=l.fontSet(n.mdFontSet);i!==e&&(t.removeClass(i),t.addClass(e),i=e)}}n["aria-label"]||(""===o||((a=t.parent()).attr("aria-label")||a.text()||a.parent().attr("aria-label")||a.parent().text())?t.text()||f.expect(t,"aria-hidden","true"):(f.expect(t,"aria-label",o),f.expect(t,"role","img"))),s&&n.$observe(s,function(e){t.empty(),e&&l(e).then(function(e){t.empty(),t.append(e)})})}}}]),function(){o.$inject=["config","$templateRequest","$q","$log","$mdUtil","$sce"],ie.module("material.components.icon").constant("$$mdSvgRegistry",{mdTabsArrow:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4=",mdClose:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xOSA2LjQxbC0xLjQxLTEuNDEtNS41OSA1LjU5LTUuNTktNS41OS0xLjQxIDEuNDEgNS41OSA1LjU5LTUuNTkgNS41OSAxLjQxIDEuNDEgNS41OS01LjU5IDUuNTkgNS41OSAxLjQxLTEuNDEtNS41OS01LjU5eiIvPjwvZz48L3N2Zz4=",mdCancel:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik0xMiAyYy01LjUzIDAtMTAgNC40Ny0xMCAxMHM0LjQ3IDEwIDEwIDEwIDEwLTQuNDcgMTAtMTAtNC40Ny0xMC0xMC0xMHptNSAxMy41OWwtMS40MSAxLjQxLTMuNTktMy41OS0zLjU5IDMuNTktMS40MS0xLjQxIDMuNTktMy41OS0zLjU5LTMuNTkgMS40MS0xLjQxIDMuNTkgMy41OSAzLjU5LTMuNTkgMS40MSAxLjQxLTMuNTkgMy41OSAzLjU5IDMuNTl6Ii8+PC9nPjwvc3ZnPg==",mdMenu:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxwYXRoIGQ9Ik0zLDZIMjFWOEgzVjZNMywxMUgyMVYxM0gzVjExTTMsMTZIMjFWMThIM1YxNloiIC8+PC9zdmc+",mdToggleArrow:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgNDggNDgiPjxwYXRoIGQ9Ik0yNCAxNmwtMTIgMTIgMi44MyAyLjgzIDkuMTctOS4xNyA5LjE3IDkuMTcgMi44My0yLjgzeiIvPjxwYXRoIGQ9Ik0wIDBoNDh2NDhoLTQ4eiIgZmlsbD0ibm9uZSIvPjwvc3ZnPg==",mdCalendar:"data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTkgM2gtMVYxaC0ydjJIOFYxSDZ2Mkg1Yy0xLjExIDAtMS45OS45LTEuOTkgMkwzIDE5YzAgMS4xLjg5IDIgMiAyaDE0YzEuMSAwIDItLjkgMi0yVjVjMC0xLjEtLjktMi0yLTJ6bTAgMTZINVY4aDE0djExek03IDEwaDV2NUg3eiIvPjwvc3ZnPg==",mdChecked:"data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwYXRoIGQ9Ik05IDE2LjE3TDQuODMgMTJsLTEuNDIgMS40MUw5IDE5IDIxIDdsLTEuNDEtMS40MXoiLz48L2c+PC9zdmc+"}).provider("$mdIcon",e);var a={defaultViewBoxSize:24,defaultFontSet:"material-icons",fontSets:[]};function e(){}function r(e,t){this.url=e,this.viewBoxSize=t||a.defaultViewBoxSize}function o(o,a,s,c,r,t){var i={},l={},n=/[-\w@:%\+.~#?&//=]{2,}\.[a-z]{2,4}\b(\/[-\w@:%\+.~#?&//=]*)?/i,u=/^data:image\/svg\+xml[\s*;\w\-\=]*?(base64)?,(.*)$/i;return m.prototype={clone:function(){return this.element.cloneNode(!0)},prepare:function(){var e=this.config?this.config.viewBoxSize:o.defaultViewBoxSize;ie.forEach({fit:"",height:"100%",width:"100%",preserveAspectRatio:"xMidYMid meet",viewBox:this.element.getAttribute("viewBox")||"0 0 "+e+" "+e,focusable:!1},function(e,t){this.element.setAttribute(t,e)},this)}},e.fontSet=function(t){if(ie.isUndefined(t)||!t||!t.length)return o.defaultFontSet;var n=t;return ie.forEach(o.fontSets,function(e){e.alias==t&&(n=e.fontSet||n)}),n},e;function e(e){return e=e||"",ie.isString(e)||(e=t.getTrustedUrl(e)),i[e]?s.when(function(e){var t=e.clone(),n="_cache"+r.nextUid();t.id&&(t.id+=n);return ie.forEach(t.querySelectorAll("[id]"),function(e){e.id+=n}),t}(i[e])):n.test(e)||u.test(e)?p(e).then(f(e)):(-1==e.indexOf(":")&&(e="$default:"+e),(o[e]?d:h)(e).then(f(e)))}function f(n){return function(e){var t;return i[n]=(t=e,ie.isDefined(t.element)&&ie.isDefined(t.config)?e:new m(e,o[n])),i[n].clone()}}function d(e){var t=o[e];return p(t.url).then(function(e){return new m(e,t)})}function h(r){var e=r.substring(0,r.lastIndexOf(":"))||"$default",i=o[e];return i?p(i.url).then(function(e){var t=r.slice(r.lastIndexOf(":")+1),n=e.querySelector("#"+t);return n?new m(n,i):a(r)}):a(r);function a(e){var t="icon "+e+" not found";return c.warn(t),s.reject(t||e)}}function p(e){return u.test(e)?(t=e,n=u.exec(t),i=/base64/i.test(t)?G.atob(n[2]):n[2],s.when(ie.element(i)[0])):(r=e,s(function(t,n){a(r,!0).then(function(e){l[r]||(l[r]=ie.element("<div>").append(e)[0].querySelector("svg")),t(l[r])},function(e){var t=ie.isString(e)?e:e.message||e.data||e.statusText;c.warn(t),n(e)})}));var r,t,n,i}function m(e,t){e&&"svg"!=e.tagName&&(e=ie.element('<svg xmlns="http://www.w3.org/2000/svg">').append(e.cloneNode(!0))[0]),e.getAttribute("xmlns")||e.setAttribute("xmlns","http://www.w3.org/2000/svg"),this.element=e,this.config=t,this.prepare()}}e.prototype={icon:function(e,t,n){return-1==e.indexOf(":")&&(e="$default:"+e),a[e]=new r(t,n),this},iconSet:function(e,t,n){return a[e]=new r(t,n),this},defaultIconSet:function(e,t){var n="$default";return a[n]||(a[n]=new r(e,t)),a[n].viewBoxSize=t||a.defaultViewBoxSize,this},defaultViewBoxSize:function(e){return a.defaultViewBoxSize=e,this},fontSet:function(e,t){return a.fontSets.push({alias:e,fontSet:t||e}),this},defaultFontSet:function(e){return a.defaultFontSet=e||"",this},defaultIconSize:function(e){return a.defaultIconSize=e,this},$get:["$templateRequest","$q","$log","$mdUtil","$sce",function(e,t,n,r,i){return o(a,e,t,n,r,i)}]}}(),function(){function e(i,t,a,o,s,r,e,n){var c,l,u=s.prefixer(),f=this;this.nestLevel=parseInt(t.mdNestLevel,10)||0,this.init=function(e,t){t=t||{},c=e,(l=a[0].querySelector(u.buildSelector(["ng-click","ng-mouseenter"]))).setAttribute("aria-expanded","false"),this.isInMenuBar=t.isInMenuBar,this.nestedMenus=s.nodesToArray(c[0].querySelectorAll(".md-nested-menu")),c.on("$mdInterimElementRemove",function(){f.isOpen=!1,s.nextTick(function(){f.onIsOpenChanged(f.isOpen)})}),s.nextTick(function(){f.onIsOpenChanged(f.isOpen)});var n="menu_container_"+s.nextUid();c.attr("id",n),ie.element(l).attr({"aria-owns":n,"aria-haspopup":"true"}),o.$on("$destroy",ie.bind(this,function(){this.disableHoverListener(),i.destroy()})),c.on("$destroy",function(){i.destroy()})};var d,h,p=[];this.enableHoverListener=function(){p.push(e.$on("$mdMenuOpen",function(e,t){c[0].contains(t[0])&&(f.currentlyOpenMenu=t.controller("mdMenu"),f.isAlreadyOpening=!1,f.currentlyOpenMenu.registerContainerProxy(f.triggerContainerProxy.bind(f)))})),p.push(e.$on("$mdMenuClose",function(e,t){c[0].contains(t[0])&&(f.currentlyOpenMenu=ae)})),(h=ie.element(s.nodesToArray(c[0].children[0].children))).on("mouseenter",f.handleMenuItemHover),h.on("mouseleave",f.handleMenuItemMouseLeave)},this.disableHoverListener=function(){for(;p.length;)p.shift()();h&&h.off("mouseenter",f.handleMenuItemHover),h&&h.off("mouseleave",f.handleMenuItemMouseLeave)},this.handleMenuItemHover=function(e){if(!f.isAlreadyOpening){var t=e.target.querySelector("md-menu")||s.getClosest(e.target,"MD-MENU");d=r(function(){if(t&&(t=ie.element(t).controller("mdMenu")),f.currentlyOpenMenu&&f.currentlyOpenMenu!=t){var e=f.nestLevel+1;f.currentlyOpenMenu.close(!0,{closeTo:e}),f.isAlreadyOpening=!!t,t&&t.open()}else t&&!t.isOpen&&t.open&&(f.isAlreadyOpening=!!t,t&&t.open())},t?100:250);var n=e.currentTarget.querySelector(".md-button:not([disabled])");n&&n.focus()}},this.handleMenuItemMouseLeave=function(){d&&(r.cancel(d),d=ae)},this.open=function(e){e&&e.stopPropagation(),e&&e.preventDefault(),f.isOpen||(f.enableHoverListener(),f.isOpen=!0,s.nextTick(function(){f.onIsOpenChanged(f.isOpen)}),(l=l||(e?e.target:a[0])).setAttribute("aria-expanded","true"),o.$emit("$mdMenuOpen",a),i.show({scope:o,mdMenuCtrl:f,nestLevel:f.nestLevel,element:c,target:l,preserveElement:!0,parent:"body"}).finally(function(){l.setAttribute("aria-expanded","false"),f.disableHoverListener()}))},o.$mdOpenMenu=this.open,this.onIsOpenChanged=function(e){e?(c.attr("aria-hidden","false"),a[0].classList.add("md-open"),ie.forEach(f.nestedMenus,function(e){e.classList.remove("md-open")})):(c.attr("aria-hidden","true"),a[0].classList.remove("md-open")),o.$mdMenuIsOpen=f.isOpen},this.focusMenuContainer=function(){var e=c[0].querySelector(u.buildSelector(["md-menu-focus-target","md-autofocus"]));e||(e=c[0].querySelector(".md-button")),e.focus()},this.registerContainerProxy=function(e){this.containerProxy=e},this.triggerContainerProxy=function(e){this.containerProxy&&this.containerProxy(e)},this.destroy=function(){return f.isOpen?i.destroy():n.when(!1)},this.close=function(e,t){if(f.isOpen){f.isOpen=!1,s.nextTick(function(){f.onIsOpenChanged(f.isOpen)});var n=ie.extend({},t,{skipFocus:e});if(o.$emit("$mdMenuClose",a,n),i.hide(null,t),!e){var r=f.restoreFocusTo||a.find("button")[0];r instanceof ie.element&&(r=r[0]),r&&r.focus()}}},this.positionMode=function(){var e=(t.mdPositionMode||"target").split(" ");return 1==e.length&&e.push(e[0]),{left:e[0],top:e[1]}},this.offsets=function(){var e=(t.mdOffset||"0 0").split(" ").map(parseFloat);if(2==e.length)return{left:e[0],top:e[1]};if(1==e.length)return{top:e[0],left:e[0]};throw Error("Invalid offsets specified. Please follow format <x, y> or <n>")}}e.$inject=["$mdMenu","$attrs","$element","$scope","$mdUtil","$timeout","$rootScope","$q"],ie.module("material.components.menu").controller("mdMenuCtrl",e)}(),function(){function e(a){return{restrict:"E",require:["mdMenu","?^mdMenuBar"],controller:"mdMenuCtrl",scope:!0,compile:function(e){e.addClass("md-menu");var t=e.children()[0],n=a.prefixer();n.hasAttribute(t,"ng-click")||(t=t.querySelector(n.buildSelector(["ng-click","ng-mouseenter"]))||t);!t||"MD-BUTTON"!=t.nodeName&&"BUTTON"!=t.nodeName||t.hasAttribute("type")||t.setAttribute("type","button");if(2!=e.children().length)throw Error("Invalid HTML for md-menu: Expected two children elements.");t&&t.setAttribute("aria-haspopup","true");var r=e[0].querySelectorAll("md-menu"),i=parseInt(e[0].getAttribute("md-nest-level"),10)||0;r&&ie.forEach(a.nodesToArray(r),function(e){e.hasAttribute("md-position-mode")||e.setAttribute("md-position-mode","cascade"),e.classList.add("_md-nested-menu"),e.setAttribute("md-nest-level",i+1)});return o}};function o(e,t,n,r){var i=r[0],a=r[1]!=ae,o=ie.element('<div class="_md md-open-menu-container md-whiteframe-z2"></div>'),s=t.children()[1];t.addClass("_md"),s.hasAttribute("role")||s.setAttribute("role","menu"),o.append(s),t.on("$destroy",function(){o.remove()}),t.append(o),o[0].style.display="none",i.init(o,{isInMenuBar:a})}}e.$inject=["$mdUtil"],ie.module("material.components.menu").directive("mdMenu",e)}(),function(){function e(e){t.$inject=["$mdUtil","$mdTheming","$mdConstant","$document","$window","$q","$$rAF","$animateCss","$animate"];var x=8;return e("$mdMenu").setDefaults({methods:["target"],options:t});function t(C,c,l,A,S,u,f,d,h){var T=C.prefixer(),p=C.dom.animator;return{parent:"body",onShow:function(a,o,s){return function(){if(!s.target)throw Error("$mdMenu.show() expected a target to animate from in options.target");ie.extend(s,{alreadyOpen:!1,isRemoved:!1,target:ie.element(s.target),parent:ie.element(s.parent),menuContentEl:ie.element(o[0].querySelector("md-menu-content"))})}(),c.inherit(s.menuContentEl,s.target),s.cleanupResizing=(n=o,r=s,i=f.throttle(function(){if(!s.isRemoved){var e=_(n,r);n.css(p.toCss(e))}}),S.addEventListener("resize",i),S.addEventListener("orientationchange",i),function(){S.removeEventListener("resize",i),S.removeEventListener("orientationchange",i)}),s.hideBackdrop=(e=a,t=s,t.nestLevel?ie.noop:(t.disableParentScroll&&!C.getClosest(t.target,"MD-DIALOG")?t.restoreScroll=C.disableScrollAround(t.element,t.parent):t.disableParentScroll=!1,t.hasBackdrop&&(t.backdrop=C.createBackdrop(e,"md-menu-backdrop md-click-catcher"),h.enter(t.backdrop,A[0].body)),function(){t.backdrop&&t.backdrop.remove(),t.disableParentScroll&&t.restoreScroll()})),(s.parent.append(o),o[0].style.display="",u(function(e){var t=_(o,s);o.removeClass("md-leave"),d(o,{addClass:"md-active",from:p.toCss(t),to:p.toCss({transform:""})}).start().then(e)})).then(function(e){return s.alreadyOpen=!0,s.cleanupInteraction=function(){o.addClass("md-clickable"),s.backdrop&&s.backdrop.on("click",r),s.menuContentEl.on("keydown",n),s.menuContentEl[0].addEventListener("click",i,!0);var e=s.menuContentEl[0].querySelector(T.buildSelector(["md-menu-focus-target","md-autofocus"]));if(!e){var t=s.menuContentEl[0].firstElementChild;e=t&&(t.querySelector(".md-button:not([disabled])")||t.firstElementChild)}return e&&e.focus(),function(){o.removeClass("md-clickable"),s.backdrop&&s.backdrop.off("click",r),s.menuContentEl.off("keydown",n),s.menuContentEl[0].removeEventListener("click",i,!0)};function n(e){var t;switch(e.keyCode){case l.KEY_CODE.ESCAPE:s.mdMenuCtrl.close(!1,{closeAll:!0}),t=!0;break;case l.KEY_CODE.UP_ARROW:m(e,s.menuContentEl,s,-1)||s.nestLevel||s.mdMenuCtrl.triggerContainerProxy(e),t=!0;break;case l.KEY_CODE.DOWN_ARROW:m(e,s.menuContentEl,s,1)||s.nestLevel||s.mdMenuCtrl.triggerContainerProxy(e),t=!0;break;case l.KEY_CODE.LEFT_ARROW:s.nestLevel?s.mdMenuCtrl.close():s.mdMenuCtrl.triggerContainerProxy(e),t=!0;break;case l.KEY_CODE.RIGHT_ARROW:var n=C.getClosest(e.target,"MD-MENU");n&&n!=s.parent[0]?e.target.click():s.mdMenuCtrl.triggerContainerProxy(e),t=!0}t&&(e.preventDefault(),e.stopImmediatePropagation())}function r(e){e.preventDefault(),e.stopPropagation(),a.$apply(function(){s.mdMenuCtrl.close(!0,{closeAll:!0})})}function i(e){var t=e.target;do{if(t==s.menuContentEl[0])return;if((r(t,["ng-click","ng-href","ui-sref"])||"BUTTON"==t.nodeName||"MD-BUTTON"==t.nodeName)&&!r(t,["md-prevent-menu-close"])){var n=C.getClosest(t,"MD-MENU");t.hasAttribute("disabled")||n&&n!=s.parent[0]||a.$apply(function(){s.mdMenuCtrl.close(!0,{closeAll:!0})});break}}while(t=t.parentNode);function r(e,t){if(!e)return!1;for(var n,r=0;n=t[r];++r)if(T.hasAttribute(e,n))return!0;return!1}}}(),e});var e,t;var n,r,i},onRemove:function(e,n,r){return r.cleanupInteraction&&r.cleanupInteraction(),r.cleanupResizing(),r.hideBackdrop(),!0===r.$destroy?t():d(n,{addClass:"md-leave"}).start().then(t);function t(){var e,t;n.removeClass("md-active"),e=n,(t=r).preserveElement?i(e).style.display="none":i(e).parentNode===i(t.parent)&&i(t.parent).removeChild(i(e)),r.alreadyOpen=!1}},hasBackdrop:!0,disableParentScroll:!0,skipCompile:!0,preserveScope:!0,skipHide:!0,themable:!0};function m(e,t,n,r){for(var i,a=C.getClosest(e.target,"MD-MENU-ITEM"),o=C.nodesToArray(t[0].children),s=o.indexOf(a)+r;0<=s&&s<o.length;s+=r){if(i=g(o[s].querySelector(".md-button")))break}return i}function g(e){if(e&&-1!=e.getAttribute("tabindex"))return e.focus(),A[0].activeElement==e}function _(e,t){var n,r=e[0],i=e[0].firstElementChild,a=i.getBoundingClientRect(),o=A[0].body.getBoundingClientRect(),s=S.getComputedStyle(i),c=t.target[0].querySelector(T.buildSelector("md-menu-origin"))||t.target[0],l=c.getBoundingClientRect(),u={left:o.left+x,top:Math.max(o.top,0)+x,bottom:Math.max(o.bottom,Math.max(o.top,0)+o.height)-x,right:o.right-x},f={top:0,left:0,right:0,bottom:0},d={top:0,left:0,right:0,bottom:0},h=t.mdMenuCtrl.positionMode();"target"!=h.top&&"target"!=h.left&&"target-right"!=h.left||(n=function(){for(var e=0;e<i.children.length;++e)if("none"!=S.getComputedStyle(i.children[e]).display)return i.children[e]}())&&(f=(n=(n=n.firstElementChild||n).querySelector(T.buildSelector("md-menu-align-target"))||n).getBoundingClientRect(),d={top:parseFloat(r.style.top||0),left:parseFloat(r.style.left||0)});var p={},m="top ";switch(h.top){case"target":p.top=d.top+l.top-f.top;break;case"cascade":p.top=l.top-parseFloat(s.paddingTop)-c.style.top;break;case"bottom":p.top=l.top+l.height;break;default:throw new Error('Invalid target mode "'+h.top+'" specified for md-menu on Y axis.')}var g="rtl"==C.bidi();switch(h.left){case"target":p.left=d.left+l.left-f.left,m+=g?"right":"left";break;case"target-left":p.left=l.left,m+="left";break;case"target-right":p.left=l.right-a.width+(a.right-f.right),m+="right";break;case"cascade":var _=g?l.left-a.width<u.left:l.right+a.width<u.right;p.left=_?l.right-c.style.left:l.left-c.style.left-a.width,m+=_?"left":"right";break;case"right":g?(p.left=l.right-l.width,m+="left"):(p.left=l.right-a.width,m+="right");break;case"left":g?(p.left=l.right-a.width,m+="right"):(p.left=l.left,m+="left");break;default:throw new Error('Invalid target mode "'+h.left+'" specified for md-menu on X axis.')}var b,v=t.mdMenuCtrl.offsets();p.top+=v.top,p.left+=v.left,(b=p).top=Math.max(Math.min(b.top,u.bottom-r.offsetHeight),u.top),b.left=Math.max(Math.min(b.left,u.right-r.offsetWidth),u.left);var y=Math.round(100*Math.min(l.width/r.offsetWidth,1))/100,w=Math.round(100*Math.min(l.height/r.offsetHeight,1))/100;return{top:Math.round(p.top),left:Math.round(p.left),transform:t.alreadyOpen?ae:C.supplant("scale({0},{1})",[y,w]),transformOrigin:m}}}function i(e){return e instanceof ie.element&&(e=e[0]),e}}e.$inject=["$$interimElementProvider"],ie.module("material.components.menu").provider("$mdMenu",e)}(),function(){e.$inject=["$scope","$rootScope","$element","$attrs","$mdConstant","$document","$mdUtil","$timeout"],ie.module("material.components.menuBar").controller("MenuBarController",e);var l=["handleKeyDown","handleMenuHover","scheduleOpenHoveredMenu","cancelScheduledOpen"];function e(e,t,n,r,i,a,o,s){this.$element=n,this.$attrs=r,this.$mdConstant=i,this.$mdUtil=o,this.$document=a,this.$scope=e,this.$rootScope=t,this.$timeout=s;var c=this;ie.forEach(l,function(e){c[e]=ie.bind(c,c[e])})}e.prototype.init=function(){var a=this.$element,o=this.$mdUtil,e=this.$scope,s=this,t=[];a.on("keydown",this.handleKeyDown),this.parentToolbar=o.getClosest(a,"MD-TOOLBAR"),t.push(this.$rootScope.$on("$mdMenuOpen",function(e,t){-1!=s.getMenus().indexOf(t[0])&&(a[0].classList.add("md-open"),t[0].classList.add("md-open"),s.currentlyOpenMenu=t.controller("mdMenu"),s.currentlyOpenMenu.registerContainerProxy(s.handleKeyDown),s.enableOpenOnHover())})),t.push(this.$rootScope.$on("$mdMenuClose",function(e,t,n){var r=s.getMenus();if(-1!=r.indexOf(t[0])&&(a[0].classList.remove("md-open"),t[0].classList.remove("md-open")),a[0].contains(t[0])){for(var i=t[0];i&&-1==r.indexOf(i);)i=o.getClosest(i,"MD-MENU",!0);i&&(n.skipFocus||i.querySelector("button:not([disabled])").focus(),s.currentlyOpenMenu=ae,s.disableOpenOnHover(),s.setKeyboardMode(!0))}})),e.$on("$destroy",function(){for(s.disableOpenOnHover();t.length;)t.shift()()}),this.setKeyboardMode(!0)},e.prototype.setKeyboardMode=function(e){e?this.$element[0].classList.add("md-keyboard-mode"):this.$element[0].classList.remove("md-keyboard-mode")},e.prototype.enableOpenOnHover=function(){if(!this.openOnHoverEnabled){var e=this;e.openOnHoverEnabled=!0,e.parentToolbar&&(e.parentToolbar.classList.add("md-has-open-menu"),e.$mdUtil.nextTick(function(){ie.element(e.parentToolbar).on("click",e.handleParentClick)},!1)),ie.element(e.getMenus()).on("mouseenter",e.handleMenuHover)}},e.prototype.handleMenuHover=function(e){this.setKeyboardMode(!1),this.openOnHoverEnabled&&this.scheduleOpenHoveredMenu(e)},e.prototype.disableOpenOnHover=function(){this.openOnHoverEnabled&&(this.openOnHoverEnabled=!1,this.parentToolbar&&(this.parentToolbar.classList.remove("md-has-open-menu"),ie.element(this.parentToolbar).off("click",this.handleParentClick)),ie.element(this.getMenus()).off("mouseenter",this.handleMenuHover))},e.prototype.scheduleOpenHoveredMenu=function(e){var t=ie.element(e.currentTarget).controller("mdMenu");this.setKeyboardMode(!1),this.scheduleOpenMenu(t)},e.prototype.scheduleOpenMenu=function(e){var t=this,n=this.$timeout;e!=t.currentlyOpenMenu&&(n.cancel(t.pendingMenuOpen),t.pendingMenuOpen=n(function(){t.pendingMenuOpen=ae,t.currentlyOpenMenu&&t.currentlyOpenMenu.close(!0,{closeAll:!0}),e.open()},200,!1))},e.prototype.handleKeyDown=function(e){var t,n,r,i=this.$mdConstant.KEY_CODE,a=this.currentlyOpenMenu,o=a&&a.isOpen;switch(this.setKeyboardMode(!0),e.keyCode){case i.DOWN_ARROW:a?a.focusMenuContainer():this.openFocusedMenu(),t=!0;break;case i.UP_ARROW:a&&a.close(),t=!0;break;case i.LEFT_ARROW:n=this.focusMenu(-1),o&&(r=ie.element(n).controller("mdMenu"),this.scheduleOpenMenu(r)),t=!0;break;case i.RIGHT_ARROW:n=this.focusMenu(1),o&&(r=ie.element(n).controller("mdMenu"),this.scheduleOpenMenu(r)),t=!0}t&&(e&&e.preventDefault&&e.preventDefault(),e&&e.stopImmediatePropagation&&e.stopImmediatePropagation())},e.prototype.focusMenu=function(e){var t=this.getMenus(),n=this.getFocusedMenuIndex();-1==n&&(n=this.getOpenMenuIndex());var r=!1;if(-1==n?r=!(n=0):(e<0&&0<n||0<e&&n<t.length-e)&&(n+=e,r=!0),r)return t[n].querySelector("button").focus(),t[n]},e.prototype.openFocusedMenu=function(){var e=this.getFocusedMenu();e&&ie.element(e).controller("mdMenu").open()},e.prototype.getMenus=function(){var e=this.$element;return this.$mdUtil.nodesToArray(e[0].children).filter(function(e){return"MD-MENU"==e.nodeName})},e.prototype.getFocusedMenu=function(){return this.getMenus()[this.getFocusedMenuIndex()]},e.prototype.getFocusedMenuIndex=function(){var e=this.$mdUtil.getClosest(this.$document[0].activeElement,"MD-MENU");return e?this.getMenus().indexOf(e):-1},e.prototype.getOpenMenuIndex=function(){for(var e=this.getMenus(),t=0;t<e.length;++t)if(e[t].classList.contains("md-open"))return t;return-1},e.prototype.handleParentClick=function(e){var t=this.querySelector("md-menu.md-open");t&&!t.contains(e.target)&&ie.element(t).controller("mdMenu").close()}}(),function(){function e(n,i){return{restrict:"E",require:"mdMenuBar",controller:"MenuBarController",compile:function(e,t){return t.ariaRole||e[0].setAttribute("role","menubar"),ie.forEach(e[0].children,function(e){if("MD-MENU"==e.nodeName){e.hasAttribute("md-position-mode")||(e.setAttribute("md-position-mode","left bottom"),e.querySelector("button, a, md-button").setAttribute("role","menuitem"));var t=n.nodesToArray(e.querySelectorAll("md-menu-content"));ie.forEach(t,function(e){e.classList.add("md-menu-bar-menu"),e.classList.add("md-dense"),e.hasAttribute("width")||e.setAttribute("width",5)})}}),e.find("md-menu-item").addClass("md-in-menu-bar"),function(e,t,n,r){t.addClass("_md"),i(e,t),r.init()}}}}e.$inject=["$mdUtil","$mdTheming"],ie.module("material.components.menuBar").directive("mdMenuBar",e)}(),ie.module("material.components.menuBar").directive("mdMenuDivider",function(){return{restrict:"E",compile:function(e,t){t.role||e[0].setAttribute("role","separator")}}}),function(){function e(e,t,n){this.$element=t,this.$attrs=n,this.$scope=e}e.$inject=["$scope","$element","$attrs"],ie.module("material.components.menuBar").controller("MenuItemController",e),e.prototype.init=function(e){var t=this.$element,n=this.$attrs;this.ngModel=e,"checkbox"!=n.type&&"radio"!=n.type||(this.mode=n.type,this.iconEl=t[0].children[0],this.buttonEl=t[0].children[1],e&&this.initClickListeners())},e.prototype.clearNgAria=function(){var t=this.$element[0];ie.forEach(["role","tabindex","aria-invalid","aria-checked"],function(e){t.removeAttribute(e)})},e.prototype.initClickListeners=function(){var e=this,t=this.ngModel,n=this.$scope,r=this.$attrs,i=(this.$element,this.mode);this.handleClick=ie.bind(this,this.handleClick);var a=this.iconEl,o=ie.element(this.buttonEl),s=this.handleClick;function c(e){e?o.off("click",s):o.on("click",s)}r.$observe("disabled",c),c(r.disabled),t.$render=function(){e.clearNgAria(),!function(){{if("radio"!=i)return t.$modelValue;var e=r.ngValue?n.$eval(r.ngValue):r.value;return t.$modelValue==e}}()?(a.style.display="none",o.attr("aria-checked","false")):(a.style.display="",o.attr("aria-checked","true"))},n.$$postDigest(t.$render)},e.prototype.handleClick=function(e){var t,n=this.mode,r=this.ngModel,i=this.$attrs;"checkbox"==n?t=!r.$modelValue:"radio"==n&&(t=i.ngValue?this.$scope.$eval(i.ngValue):i.value),r.$setViewValue(t),r.$render()}}(),function(){function e(u,f){return{controller:"MenuItemController",require:["mdMenuItem","?ngModel"],priority:210,compile:function(r,e){var t,n,i=e.type,a="md-in-menu-bar";if("checkbox"!=i&&"radio"!=i||!r.hasClass(a))l("role","menuitem",r[0].querySelector("md-button, button, a"));else{var o=r[0].textContent,s=ie.element('<md-button type="button"></md-button>'),c='<md-icon md-svg-src="'+f.mdChecked+'"></md-icon>';s.html(o),s.attr("tabindex","0"),r.html(""),r.append(ie.element(c)),r.append(s),r.addClass("md-indent").removeClass(a),l("role","checkbox"==i?"menuitemcheckbox":"menuitemradio",s),t="ng-disabled",n=u.prefixer(t),ie.forEach(n,function(e){if(r[0].hasAttribute(e)){var t=r[0].getAttribute(e);s[0].setAttribute(e,t),r[0].removeAttribute(e)}})}return function(e,t,n,r){var i=r[0],a=r[1];i.init(a)};function l(e,t,n){(n=n||r)instanceof ie.element&&(n=n[0]),n.hasAttribute(e)||n.setAttribute(e,t)}}}}e.$inject=["$mdUtil","$$mdSvgRegistry"],ie.module("material.components.menuBar").directive("mdMenuItem",e)}(),function(){function e(g,_,b,v,y,e){var w=g.requestAnimationFrame||g.webkitRequestAnimationFrame||ie.noop,C=g.cancelAnimationFrame||g.webkitCancelAnimationFrame||g.webkitCancelRequestAnimationFrame||ie.noop,i=g.Math.PI/180,A="determinate",S="indeterminate",T="_md-progress-circular-disabled",x="md-mode-indeterminate";return{restrict:"E",scope:{value:"@",mdDiameter:"@",mdMode:"@"},template:'<svg xmlns="http://www.w3.org/2000/svg"><path fill="none"/></svg>',compile:function(e,t){if(e.attr({"aria-valuemin":0,"aria-valuemax":100,role:"progressbar"}),ie.isUndefined(t.mdMode)){var n=ie.isDefined(t.value)?A:S;t.$set("mdMode",n)}else t.$set("mdMode",t.mdMode.trim());return r}};function r(d,a,o){var h,e,t=a[0],s=ie.element(t.querySelector("svg")),p=ie.element(t.querySelector("path")),n=_.startIndeterminate,r=_.endIndeterminate,i=0,m=0;function c(n,e,t,r,i){var a=++m,o=v.now(),s=e-n,c=D(d.mdDiameter),l=c-I(c),u=t||_.easeFn,f=r||_.duration;e===n?p.attr("d",k(e,c,l,i)):h=w(function e(){var t=g.Math.max(0,g.Math.min(v.now()-o,f));p.attr("d",k(u(t,n,s,f),c,l,i)),a===m&&t<f&&(h=w(e))})}function l(){c(n,r,_.easeFnIndeterminate,_.durationIndeterminate,i),i=(i+r)%100;var e=n;n=-r,r=-e}function u(){e||(e=y(l,_.durationIndeterminate+50,0,!1),l(),a.addClass(x).removeAttr("aria-valuenow"))}function f(){e&&(y.cancel(e),e=null,a.removeClass(x))}b(a),a.toggleClass(T,o.hasOwnProperty("disabled")),d.mdMode===S&&u(),d.$on("$destroy",function(){f(),h&&C(h)}),d.$watchGroup(["value","mdMode",function(){var e=t.disabled;return!0===e||!1===e?e:ie.isDefined(a.attr("disabled"))}],function(e,t){var n=e[1],r=e[2];if(r!==t[2]&&a.toggleClass(T,!!r),r)f();else if(n!==A&&n!==S&&(n=S,o.$set("mdMode",n)),n===S)u();else{var i=E(e[0]);f(),a.attr("aria-valuenow",i),c(E(t[0]),i)}}),d.$watch("mdDiameter",function(e){var t=D(e),n=I(t),r=t/2+"px",i={width:t+"px",height:t+"px"};s[0].setAttribute("viewBox","0 0 "+t+" "+t),s.css(i).css("transform-origin",r+" "+r+" "+r),a.css(i),p.css("stroke-width",n+"px")})}function k(e,t,n,r){var i=t/2,a=n/2,o=3.5999*(r||0),s=3.5999*e;return"M"+c(i,a,o)+"A"+a+","+a+" 0 "+(s<0?-180<=s?0:1:s<=180?0:1)+","+(s<0?0:1)+" "+c(i,a,s+o)}function c(e,t,n){var r=(n-90)*i;return e+t*g.Math.cos(r)+","+(e+t*g.Math.sin(r))}function E(e){return g.Math.max(0,g.Math.min(e||0,100))}function D(e){var t=_.progressSize;if(e){var n=parseFloat(e);return e.lastIndexOf("%")===e.length-1&&(n=n/100*t),n}return t}function I(e){return _.strokeWidth/100*e}}e.$inject=["$window","$mdProgressCircular","$mdTheming","$mdUtil","$interval","$log"],ie.module("material.components.progressCircular").directive("mdProgressCircular",e)}(),ie.module("material.components.progressCircular").provider("$mdProgressCircular",function(){var t={progressSize:50,strokeWidth:10,duration:100,easeFn:e,durationIndeterminate:500,startIndeterminate:3,endIndeterminate:80,easeFnIndeterminate:n,easingPresets:{linearEase:e,materialEase:n}};return{configure:function(e){return t=ie.extend(t,e||{})},$get:function(){return t}};function e(e,t,n,r){return n*e/r+t}function n(e,t,n,r){var i=(e/=r)*e,a=i*e;return t+n*(6*a*i+-15*i*i+10*a)}}),ie.module("material.components.tabs").directive("mdTab",function(){return{require:"^?mdTabs",terminal:!0,compile:function(e,t){var n=c(e,"md-tab-label"),r=c(e,"md-tab-body");if(0==n.length&&(n=ie.element("<md-tab-label></md-tab-label>"),t.label?n.text(t.label):n.append(e.contents()),0==r.length)){var i=e.contents().detach();(r=ie.element("<md-tab-body></md-tab-body>")).append(i)}return e.append(n),r.html()&&e.append(r),a},scope:{active:"=?mdActive",disabled:"=?ngDisabled",select:"&?mdOnSelect",deselect:"&?mdOnDeselect"}};function a(e,t,n,r){if(r){var i=r.getTabElementIndex(t),a=c(t,"md-tab-body").remove(),o=c(t,"md-tab-label").remove(),s=r.insertTab({scope:e,parent:e.$parent,index:i,element:t,template:a.html(),label:o.html()},i);e.select=e.select||ie.noop,e.deselect=e.deselect||ie.noop,e.$watch("active",function(e){e&&r.select(s.getIndex(),!0)}),e.$watch("disabled",function(){r.refreshIndex()}),e.$watch(function(){return r.getTabElementIndex(t)},function(e){s.index=e,r.updateTabOrder()}),e.$on("$destroy",function(){r.removeTab(s)})}}function c(e,t){for(var n=e[0].children,r=0,i=n.length;r<i;r++){var a=n[r];if(a.tagName===t.toUpperCase())return ie.element(a)}return ie.element()}}),ie.module("material.components.tabs").directive("mdTabItem",function(){return{require:"^?mdTabs",link:function(e,t,n,r){r&&r.attachRipple(e,t)}}}),ie.module("material.components.tabs").directive("mdTabLabel",function(){return{terminal:!0}}),function(){function e(r){return{restrict:"A",compile:function(e,t){var n=r(t.mdTabScroll,null,!0);return function(t,e){e.on("mousewheel",function(e){t.$apply(function(){n(t,{$event:e})})})}}}}e.$inject=["$parse"],ie.module("material.components.tabs").directive("mdTabScroll",e)}(),function(){function e(o,c,e,r,i,l,u,a,t,n){var s,f,d=this,h=!1,p=(C(),[]),m=!1,g=!1;function _(t,e){var n=a.$normalize("md-"+t);function r(e){d[t]="false"!==e}e&&x(t,e),a.hasOwnProperty(n)&&r(a[n]),a.$observe(n,r)}function b(){m=!0,ie.element(e).off("resize",w)}function v(e,t){e!==t&&(d.selectedIndex=T(e),d.lastSelectedIndex=t,d.updateInkBarStyles(),O(),M(e),o.$broadcast("$mdTabsChanged"),d.tabs[t]&&d.tabs[t].scope.deselect(),d.tabs[e]&&d.tabs[e].scope.select())}function y(e,t){h||(d.focusIndex=d.selectedIndex=e),d.lastClick=!0,t&&d.noSelectClick||l.nextTick(function(){d.tabs[e].element.triggerHandler("click")},!1)}function w(){d.lastSelectedIndex=d.selectedIndex,d.offsetLeft=N(d.offsetLeft),l.nextTick(function(){d.updateInkBarStyles(),k()})}function C(){var e={},t=c[0];return e.wrapper=t.querySelector("md-tabs-wrapper"),e.canvas=e.wrapper.querySelector("md-tabs-canvas"),e.paging=e.canvas.querySelector("md-pagination-wrapper"),e.inkBar=e.paging.querySelector("md-ink-bar"),e.contents=t.querySelectorAll("md-tabs-content-wrapper > md-tab-content"),e.tabs=e.paging.querySelectorAll("md-tab-item"),e.dummies=e.canvas.querySelectorAll("md-dummy-tab"),e}function A(){switch(d.stretchTabs){case"always":return!0;case"never":return!1;default:return!d.shouldPaginate&&e.matchMedia("(max-width: 600px)").matches}}function S(){return d.centerTabs&&!d.shouldPaginate}function T(e){if(-1===e)return-1;var t,n,r=Math.max(d.tabs.length-e,e);for(t=0;t<=r;t++){if((n=d.tabs[e+t])&&!0!==n.scope.disabled)return n.getIndex();if((n=d.tabs[e-t])&&!0!==n.scope.disabled)return n.getIndex()}return e}function x(e,n,r){Object.defineProperty(d,e,{get:function(){return r},set:function(e){var t=r;r=e,n&&n(e,t)}})}function k(){var e;e=C(),A()?ie.element(e.paging).css("width",""):ie.element(e.paging).css("width",E(C().dummies)+"px"),d.maxTabWidth=D(),d.shouldPaginate=function(){if(d.noPagination||!g)return!1;var t=c.prop("clientWidth");return ie.forEach(C().dummies,function(e){t-=e.offsetWidth}),t<0}()}function E(e){var t=0;return ie.forEach(e,function(e){t+=Math.max(e.offsetWidth,e.getBoundingClientRect().width)}),Math.ceil(t)}function D(){return c.prop("clientWidth")}function I(e,t){var n,r=t?"focusIndex":"selectedIndex";for(n=d[r]+e;d.tabs[n]&&d.tabs[n].scope.disabled;n+=e);d.tabs[n]&&(d[r]=n)}function P(){C().dummies[d.focusIndex].focus()}function M(e){var t=C();if(null==e&&(e=d.focusIndex),t.tabs[e]&&!d.shouldCenterTabs){var n=t.tabs[e],r=n.offsetLeft,i=n.offsetWidth+r;d.offsetLeft=Math.max(d.offsetLeft,N(i-t.canvas.clientWidth+64)),d.offsetLeft=Math.min(d.offsetLeft,N(r))}}function $(){d.selectedIndex=T(d.selectedIndex),d.focusIndex=T(d.focusIndex)}function O(){if(!d.dynamicHeight)return c.css("height","");if(!d.tabs.length)return p.push(O);var e=C(),t=e.contents[d.selectedIndex],n=t?t.offsetHeight:0,r=e.wrapper.offsetHeight,i=n+r,a=c.prop("clientHeight");if(a!==i){"bottom"===c.attr("md-align-tabs")&&(a-=r,i-=r,c.attr("md-border-bottom")!==ae&&++a),h=!0;var o={height:a+"px"},s={height:i+"px"};c.css(o),u(c,{from:o,to:s,easing:"cubic-bezier(0.35, 0, 0.25, 1)",duration:.5}).start().done(function(){c.css({transition:"none",height:""}),l.nextTick(function(){c.css("transition","")}),h=!1})}}function R(){var e=C();if(e.tabs[d.selectedIndex]){if(!d.tabs.length)return p.push(d.updateInkBarStyles);if(!c.prop("offsetParent"))return function e(){e.watcher||(e.watcher=o.$watch(function(){l.nextTick(function(){e.watcher&&c.prop("offsetParent")&&(e.watcher(),e.watcher=null,w())},!1)}))}();var t=d.selectedIndex,n=e.paging.offsetWidth,r=e.tabs[t],i=r.offsetLeft,a=n-i-r.offsetWidth;if(d.shouldCenterTabs)E(e.tabs)<n&&l.nextTick(R,!1);!function(){var e=C(),t=d.selectedIndex,n=d.lastSelectedIndex,r=ie.element(e.inkBar);if(!ie.isNumber(n))return;r.toggleClass("md-left",t<n).toggleClass("md-right",n<t)}(),ie.element(e.inkBar).css({left:i+"px",right:a+"px"})}else ie.element(e.inkBar).css({left:"auto",right:"auto"})}function N(e){var t=C();if(!t.tabs.length||!d.shouldPaginate)return 0;var n=t.tabs[t.tabs.length-1],r=n.offsetLeft+n.offsetWidth;return e=Math.max(0,e),e=Math.min(r-t.canvas.clientWidth,e)}!function(t,e){var n=a.$normalize("md-"+t);e&&x(t,e);a.$observe(n,function(e){d[t]=e})}("stretchTabs",function(e){var t=C();ie.element(t.wrapper).toggleClass("md-stretch-tabs",A()),R()}),x("focusIndex",function(e,t){if(e===t)return;if(!C().tabs[e])return;M(),P()},d.selectedIndex||0),x("offsetLeft",function(e){var t=C(),n=d.shouldCenterTabs?"":"-"+e+"px";ie.element(t.paging).css(r.CSS.TRANSFORM,"translate3d("+n+", 0, 0)"),o.$broadcast("$mdTabsPaginationChanged")},0),x("hasContent",function(e){c[e?"removeClass":"addClass"]("md-no-tab-content")},!1),x("maxTabWidth",function(t,e){if(t!==e){var n=C();ie.forEach(n.tabs,function(e){e.style.maxWidth=t+"px"}),l.nextTick(d.updateInkBarStyles)}},D()),x("shouldPaginate",function(e,t){e!==t&&(d.maxTabWidth=D(),d.shouldCenterTabs=S(),l.nextTick(function(){d.maxTabWidth=D(),M(d.selectedIndex)}))},!1),_("noInkBar",function(e){ie.element(C().inkBar).toggleClass("ng-hide",e)}),_("dynamicHeight",function(e){c.toggleClass("md-dynamic-height",e)}),_("noPagination"),_("swipeContent"),_("noDisconnect"),_("autoselect"),_("noSelectClick"),_("centerTabs",function(e){d.shouldCenterTabs=S()}),_("enableDisconnect"),d.scope=o,d.parent=o.$parent,d.tabs=[],d.lastSelectedIndex=null,d.hasFocus=!1,d.lastClick=!0,d.shouldCenterTabs=S(),d.updatePagination=l.debounce(k,100),d.redirectFocus=P,d.attachRipple=function(e,t){var n=C(),r={colorElement:ie.element(n.inkBar)};i.attach(e,t,r)},d.insertTab=function(e,t){var n=g,r={getIndex:function(){return d.tabs.indexOf(i)},isActive:function(){return this.getIndex()===d.selectedIndex},isLeft:function(){return this.getIndex()<d.selectedIndex},isRight:function(){return this.getIndex()>d.selectedIndex},shouldRender:function(){return!d.noDisconnect||this.isActive()},hasFocus:function(){return!d.lastClick&&d.hasFocus&&this.getIndex()===d.focusIndex},id:l.nextUid()},i=ie.extend(r,e);ie.isDefined(t)?d.tabs.splice(t,0,i):d.tabs.push(i);return p.forEach(function(e){l.nextTick(e)}),p=[],a=!1,ie.forEach(d.tabs,function(e){e.template&&(a=!0)}),d.hasContent=a,l.nextTick(function(){k(),n&&d.autoselect&&l.nextTick(function(){l.nextTick(function(){y(d.tabs.indexOf(i))})})}),i;var a},d.removeTab=function(e){if(m)return;var t=d.selectedIndex,n=d.tabs.splice(e.getIndex(),1)[0];$(),d.selectedIndex===t&&(n.scope.deselect(),d.tabs[d.selectedIndex]&&d.tabs[d.selectedIndex].scope.select());l.nextTick(function(){k(),d.offsetLeft=N(d.offsetLeft)})},d.select=y,d.scroll=function(e){if(!d.shouldPaginate)return;e.preventDefault(),d.offsetLeft=N(d.offsetLeft-e.wheelDelta)},d.nextPage=function(){var e,t,n=C(),r=n.canvas.clientWidth,i=r+d.offsetLeft;for(e=0;e<n.tabs.length&&!((t=n.tabs[e]).offsetLeft+t.offsetWidth>i);e++);r>t.offsetWidth?d.offsetLeft=N(t.offsetLeft):d.offsetLeft=N(t.offsetLeft+(t.offsetWidth-r+1))},d.previousPage=function(){var e,t,n=C();for(e=0;e<n.tabs.length&&!((t=n.tabs[e]).offsetLeft+t.offsetWidth>=d.offsetLeft);e++);n.canvas.clientWidth>t.offsetWidth?d.offsetLeft=N(t.offsetLeft+t.offsetWidth-n.canvas.clientWidth):d.offsetLeft=N(t.offsetLeft)},d.keydown=function(e){switch(e.keyCode){case r.KEY_CODE.LEFT_ARROW:e.preventDefault(),I(-1,!0);break;case r.KEY_CODE.RIGHT_ARROW:e.preventDefault(),I(1,!0);break;case r.KEY_CODE.SPACE:case r.KEY_CODE.ENTER:e.preventDefault(),h||y(d.focusIndex)}d.lastClick=!1},d.canPageForward=function(){var e=C(),t=e.tabs[e.tabs.length-1];return t&&t.offsetLeft+t.offsetWidth>e.canvas.clientWidth+d.offsetLeft},d.canPageBack=function(){return 0<d.offsetLeft},d.refreshIndex=$,d.incrementIndex=I,d.getTabElementIndex=function(e){var t=c[0].getElementsByTagName("md-tab");return Array.prototype.indexOf.call(t,e[0])},d.updateInkBarStyles=l.debounce(R,100),d.updateTabOrder=l.debounce(function(){var e=d.tabs[d.selectedIndex],t=d.tabs[d.focusIndex];d.tabs=d.tabs.sort(function(e,t){return e.index-t.index}),d.selectedIndex=d.tabs.indexOf(e),d.focusIndex=d.tabs.indexOf(t)},100),d.selectedIndex=d.selectedIndex||0,s=a.$mdTabsTemplate,(f=ie.element(c[0].querySelector("md-tab-data"))).html(s),t(f.contents())(d.parent),delete a.$mdTabsTemplate,o.$watch("$mdTabsCtrl.selectedIndex",v),ie.element(e).on("resize",w),o.$on("$destroy",b),n(c),l.nextTick(function(){C(),O(),M(),R(),d.tabs[d.selectedIndex]&&d.tabs[d.selectedIndex].scope.select(),g=!0,k()})}e.$inject=["$scope","$element","$window","$mdConstant","$mdTabInkRipple","$mdUtil","$animateCss","$attrs","$compile","$mdTheming"],ie.module("material.components.tabs").controller("MdTabsController",e)}(),function(){function e(n){return{scope:{selectedIndex:"=?mdSelected"},template:function(e,t){return t.$mdTabsTemplate=e.html(),'<md-tabs-wrapper> <md-tab-data></md-tab-data> <md-prev-button tabindex="-1" role="button" aria-label="Previous Page" aria-disabled="{{!$mdTabsCtrl.canPageBack()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageBack() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.previousPage()"> <md-icon md-svg-src="'+n.mdTabsArrow+'"></md-icon> </md-prev-button> <md-next-button tabindex="-1" role="button" aria-label="Next Page" aria-disabled="{{!$mdTabsCtrl.canPageForward()}}" ng-class="{ \'md-disabled\': !$mdTabsCtrl.canPageForward() }" ng-if="$mdTabsCtrl.shouldPaginate" ng-click="$mdTabsCtrl.nextPage()"> <md-icon md-svg-src="'+n.mdTabsArrow+'"></md-icon> </md-next-button> <md-tabs-canvas tabindex="{{ $mdTabsCtrl.hasFocus ? -1 : 0 }}" aria-activedescendant="tab-item-{{$mdTabsCtrl.tabs[$mdTabsCtrl.focusIndex].id}}" ng-focus="$mdTabsCtrl.redirectFocus()" ng-class="{ \'md-paginated\': $mdTabsCtrl.shouldPaginate, \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" ng-keydown="$mdTabsCtrl.keydown($event)" role="tablist"> <md-pagination-wrapper ng-class="{ \'md-center-tabs\': $mdTabsCtrl.shouldCenterTabs }" md-tab-scroll="$mdTabsCtrl.scroll($event)"> <md-tab-item tabindex="-1" class="md-tab" ng-repeat="tab in $mdTabsCtrl.tabs" role="tab" aria-controls="tab-content-{{::tab.id}}" aria-selected="{{tab.isActive()}}" aria-disabled="{{tab.scope.disabled || \'false\'}}" ng-click="$mdTabsCtrl.select(tab.getIndex())" ng-class="{ \'md-active\':    tab.isActive(), \'md-focused\':   tab.hasFocus(), \'md-disabled\':  tab.scope.disabled }" ng-disabled="tab.scope.disabled" md-swipe-left="$mdTabsCtrl.nextPage()" md-swipe-right="$mdTabsCtrl.previousPage()" md-tabs-template="::tab.label" md-scope="::tab.parent"></md-tab-item> <md-ink-bar></md-ink-bar> </md-pagination-wrapper> <md-tabs-dummy-wrapper class="md-visually-hidden md-dummy-wrapper"> <md-dummy-tab class="md-tab" tabindex="-1" id="tab-item-{{::tab.id}}" role="tab" aria-controls="tab-content-{{::tab.id}}" aria-selected="{{tab.isActive()}}" aria-disabled="{{tab.scope.disabled || \'false\'}}" ng-focus="$mdTabsCtrl.hasFocus = true" ng-blur="$mdTabsCtrl.hasFocus = false" ng-repeat="tab in $mdTabsCtrl.tabs" md-tabs-template="::tab.label" md-scope="::tab.parent"></md-dummy-tab> </md-tabs-dummy-wrapper> </md-tabs-canvas> </md-tabs-wrapper> <md-tabs-content-wrapper ng-show="$mdTabsCtrl.hasContent && $mdTabsCtrl.selectedIndex >= 0" class="_md"> <md-tab-content id="tab-content-{{::tab.id}}" class="_md" role="tabpanel" aria-labelledby="tab-item-{{::tab.id}}" md-swipe-left="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(1)" md-swipe-right="$mdTabsCtrl.swipeContent && $mdTabsCtrl.incrementIndex(-1)" ng-if="$mdTabsCtrl.hasContent" ng-repeat="(index, tab) in $mdTabsCtrl.tabs" ng-class="{ \'md-no-transition\': $mdTabsCtrl.lastSelectedIndex == null, \'md-active\':        tab.isActive(), \'md-left\':          tab.isLeft(), \'md-right\':         tab.isRight(), \'md-no-scroll\':     $mdTabsCtrl.dynamicHeight }"> <div md-tabs-template="::tab.template" md-connected-if="tab.isActive()" md-scope="::tab.parent" ng-if="$mdTabsCtrl.enableDisconnect || tab.shouldRender()"></div> </md-tab-content> </md-tabs-content-wrapper>'},controller:"MdTabsController",controllerAs:"$mdTabsCtrl",bindToController:!0}}e.$inject=["$$mdSvgRegistry"],ie.module("material.components.tabs").directive("mdTabs",e)}(),function(){function e(c,l){return{require:"^?mdTabs",link:function(e,t,n,r){if(r){var i,a,o=function(){r.updatePagination(),r.updateInkBarStyles()};if("MutationObserver"in l){(i=new MutationObserver(o)).observe(t[0],{childList:!0,subtree:!0,characterData:!0}),a=i.disconnect.bind(i)}else{var s=c.debounce(o,15,null,!1);t.on("DOMSubtreeModified",s),a=t.off.bind(t,"DOMSubtreeModified",s)}e.$on("$destroy",function(){a()})}}}}e.$inject=["$mdUtil","$window"],ie.module("material.components.tabs").directive("mdTabsDummyWrapper",e)}(),function(){function e(o,s){return{restrict:"A",link:function(e,t,n,r){if(!r)return;var i=r.enableDisconnect?e.compileScope.$new():e.compileScope;return t.html(e.template),o(t.contents())(i),s.nextTick(function(){e.$watch("connected",function(e){!1===e?r.enableDisconnect&&s.disconnectScope(i):a()}),e.$on("$destroy",a)});function a(){r.enableDisconnect&&s.reconnectScope(i)}},scope:{template:"=mdTabsTemplate",connected:"=?mdConnectedIf",compileScope:"=mdScope"},require:"^?mdTabs"}}e.$inject=["$compile","$mdUtil"],ie.module("material.components.tabs").directive("mdTabsTemplate",e)}(),ie.module("material.core").constant("$MD_THEME_CSS","md-autocomplete.md-THEME_NAME-theme {  background: '{{background-A100}}'; }  md-autocomplete.md-THEME_NAME-theme[disabled]:not([md-floating-label]) {    background: '{{background-100}}'; }  md-autocomplete.md-THEME_NAME-theme button md-icon path {    fill: '{{background-600}}'; }  md-autocomplete.md-THEME_NAME-theme button:after {    background: '{{background-600-0.3}}'; }.md-autocomplete-suggestions-container.md-THEME_NAME-theme {  background: '{{background-A100}}'; }  .md-autocomplete-suggestions-container.md-THEME_NAME-theme li {    color: '{{background-900}}'; }    .md-autocomplete-suggestions-container.md-THEME_NAME-theme li .highlight {      color: '{{background-600}}'; }    .md-autocomplete-suggestions-container.md-THEME_NAME-theme li:hover, .md-autocomplete-suggestions-container.md-THEME_NAME-theme li.selected {      background: '{{background-200}}'; }md-backdrop {  background-color: '{{background-900-0.0}}'; }  md-backdrop.md-opaque.md-THEME_NAME-theme {    background-color: '{{background-900-1.0}}'; }md-bottom-sheet.md-THEME_NAME-theme {  background-color: '{{background-50}}';  border-top-color: '{{background-300}}'; }  md-bottom-sheet.md-THEME_NAME-theme.md-list md-list-item {    color: '{{foreground-1}}'; }  md-bottom-sheet.md-THEME_NAME-theme .md-subheader {    background-color: '{{background-50}}'; }  md-bottom-sheet.md-THEME_NAME-theme .md-subheader {    color: '{{foreground-1}}'; }.md-button.md-THEME_NAME-theme:not([disabled]):hover {  background-color: '{{background-500-0.2}}'; }.md-button.md-THEME_NAME-theme:not([disabled]).md-focused {  background-color: '{{background-500-0.2}}'; }.md-button.md-THEME_NAME-theme:not([disabled]).md-icon-button:hover {  background-color: transparent; }.md-button.md-THEME_NAME-theme.md-fab {  background-color: '{{accent-color}}';  color: '{{accent-contrast}}'; }  .md-button.md-THEME_NAME-theme.md-fab md-icon {    color: '{{accent-contrast}}'; }  .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover {    background-color: '{{accent-A700}}'; }  .md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused {    background-color: '{{accent-A700}}'; }.md-button.md-THEME_NAME-theme.md-primary {  color: '{{primary-color}}'; }  .md-button.md-THEME_NAME-theme.md-primary.md-raised, .md-button.md-THEME_NAME-theme.md-primary.md-fab {    color: '{{primary-contrast}}';    background-color: '{{primary-color}}'; }    .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]) md-icon {      color: '{{primary-contrast}}'; }    .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]):hover {      background-color: '{{primary-600}}'; }    .md-button.md-THEME_NAME-theme.md-primary.md-raised:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-primary.md-fab:not([disabled]).md-focused {      background-color: '{{primary-600}}'; }  .md-button.md-THEME_NAME-theme.md-primary:not([disabled]) md-icon {    color: '{{primary-color}}'; }.md-button.md-THEME_NAME-theme.md-fab {  background-color: '{{accent-color}}';  color: '{{accent-contrast}}'; }  .md-button.md-THEME_NAME-theme.md-fab:not([disabled]) .md-icon {    color: '{{accent-contrast}}'; }  .md-button.md-THEME_NAME-theme.md-fab:not([disabled]):hover {    background-color: '{{accent-A700}}'; }  .md-button.md-THEME_NAME-theme.md-fab:not([disabled]).md-focused {    background-color: '{{accent-A700}}'; }.md-button.md-THEME_NAME-theme.md-raised {  color: '{{background-900}}';  background-color: '{{background-50}}'; }  .md-button.md-THEME_NAME-theme.md-raised:not([disabled]) md-icon {    color: '{{background-900}}'; }  .md-button.md-THEME_NAME-theme.md-raised:not([disabled]):hover {    background-color: '{{background-50}}'; }  .md-button.md-THEME_NAME-theme.md-raised:not([disabled]).md-focused {    background-color: '{{background-200}}'; }.md-button.md-THEME_NAME-theme.md-warn {  color: '{{warn-color}}'; }  .md-button.md-THEME_NAME-theme.md-warn.md-raised, .md-button.md-THEME_NAME-theme.md-warn.md-fab {    color: '{{warn-contrast}}';    background-color: '{{warn-color}}'; }    .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]) md-icon {      color: '{{warn-contrast}}'; }    .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]):hover {      background-color: '{{warn-600}}'; }    .md-button.md-THEME_NAME-theme.md-warn.md-raised:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-warn.md-fab:not([disabled]).md-focused {      background-color: '{{warn-600}}'; }  .md-button.md-THEME_NAME-theme.md-warn:not([disabled]) md-icon {    color: '{{warn-color}}'; }.md-button.md-THEME_NAME-theme.md-accent {  color: '{{accent-color}}'; }  .md-button.md-THEME_NAME-theme.md-accent.md-raised, .md-button.md-THEME_NAME-theme.md-accent.md-fab {    color: '{{accent-contrast}}';    background-color: '{{accent-color}}'; }    .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]) md-icon, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]) md-icon {      color: '{{accent-contrast}}'; }    .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]):hover, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]):hover {      background-color: '{{accent-A700}}'; }    .md-button.md-THEME_NAME-theme.md-accent.md-raised:not([disabled]).md-focused, .md-button.md-THEME_NAME-theme.md-accent.md-fab:not([disabled]).md-focused {      background-color: '{{accent-A700}}'; }  .md-button.md-THEME_NAME-theme.md-accent:not([disabled]) md-icon {    color: '{{accent-color}}'; }.md-button.md-THEME_NAME-theme[disabled], .md-button.md-THEME_NAME-theme.md-raised[disabled], .md-button.md-THEME_NAME-theme.md-fab[disabled], .md-button.md-THEME_NAME-theme.md-accent[disabled], .md-button.md-THEME_NAME-theme.md-warn[disabled] {  color: '{{foreground-3}}';  cursor: default; }  .md-button.md-THEME_NAME-theme[disabled] md-icon, .md-button.md-THEME_NAME-theme.md-raised[disabled] md-icon, .md-button.md-THEME_NAME-theme.md-fab[disabled] md-icon, .md-button.md-THEME_NAME-theme.md-accent[disabled] md-icon, .md-button.md-THEME_NAME-theme.md-warn[disabled] md-icon {    color: '{{foreground-3}}'; }.md-button.md-THEME_NAME-theme.md-raised[disabled], .md-button.md-THEME_NAME-theme.md-fab[disabled] {  background-color: '{{foreground-4}}'; }.md-button.md-THEME_NAME-theme[disabled] {  background-color: transparent; }._md a.md-THEME_NAME-theme:not(.md-button).md-primary {  color: '{{primary-color}}'; }  ._md a.md-THEME_NAME-theme:not(.md-button).md-primary:hover {    color: '{{primary-700}}'; }._md a.md-THEME_NAME-theme:not(.md-button).md-accent {  color: '{{accent-color}}'; }  ._md a.md-THEME_NAME-theme:not(.md-button).md-accent:hover {    color: '{{accent-700}}'; }._md a.md-THEME_NAME-theme:not(.md-button).md-accent {  color: '{{accent-color}}'; }  ._md a.md-THEME_NAME-theme:not(.md-button).md-accent:hover {    color: '{{accent-A700}}'; }._md a.md-THEME_NAME-theme:not(.md-button).md-warn {  color: '{{warn-color}}'; }  ._md a.md-THEME_NAME-theme:not(.md-button).md-warn:hover {    color: '{{warn-700}}'; }md-card.md-THEME_NAME-theme {  color: '{{foreground-1}}';  background-color: '{{background-hue-1}}';  border-radius: 2px; }  md-card.md-THEME_NAME-theme .md-card-image {    border-radius: 2px 2px 0 0; }  md-card.md-THEME_NAME-theme md-card-header md-card-avatar md-icon {    color: '{{background-color}}';    background-color: '{{foreground-3}}'; }  md-card.md-THEME_NAME-theme md-card-header md-card-header-text .md-subhead {    color: '{{foreground-2}}'; }  md-card.md-THEME_NAME-theme md-card-title md-card-title-text:not(:only-child) .md-subhead {    color: '{{foreground-2}}'; }md-chips.md-THEME_NAME-theme .md-chips {  box-shadow: 0 1px '{{foreground-4}}'; }  md-chips.md-THEME_NAME-theme .md-chips.md-focused {    box-shadow: 0 2px '{{primary-color}}'; }  md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input {    color: '{{foreground-1}}'; }    md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::-webkit-input-placeholder {      color: '{{foreground-3}}'; }    md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input:-moz-placeholder {      color: '{{foreground-3}}'; }    md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::-moz-placeholder {      color: '{{foreground-3}}'; }    md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input:-ms-input-placeholder {      color: '{{foreground-3}}'; }    md-chips.md-THEME_NAME-theme .md-chips .md-chip-input-container input::-webkit-input-placeholder {      color: '{{foreground-3}}'; }md-chips.md-THEME_NAME-theme md-chip {  background: '{{background-300}}';  color: '{{background-800}}'; }  md-chips.md-THEME_NAME-theme md-chip md-icon {    color: '{{background-700}}'; }  md-chips.md-THEME_NAME-theme md-chip.md-focused {    background: '{{primary-color}}';    color: '{{primary-contrast}}'; }    md-chips.md-THEME_NAME-theme md-chip.md-focused md-icon {      color: '{{primary-contrast}}'; }  md-chips.md-THEME_NAME-theme md-chip._md-chip-editing {    background: transparent;    color: '{{background-800}}'; }md-chips.md-THEME_NAME-theme md-chip-remove .md-button md-icon path {  fill: '{{background-500}}'; }.md-contact-suggestion span.md-contact-email {  color: '{{background-400}}'; }md-checkbox.md-THEME_NAME-theme .md-ripple {  color: '{{accent-A700}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-ripple {  color: '{{background-600}}'; }md-checkbox.md-THEME_NAME-theme.md-checked.md-focused .md-container:before {  background-color: '{{accent-color-0.26}}'; }md-checkbox.md-THEME_NAME-theme .md-ink-ripple {  color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-ink-ripple {  color: '{{accent-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not(.md-checked) .md-icon {  border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-icon {  background-color: '{{accent-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme.md-checked .md-icon:after {  border-color: '{{accent-contrast-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ripple {  color: '{{primary-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ripple {  color: '{{background-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-ink-ripple {  color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple {  color: '{{primary-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary:not(.md-checked) .md-icon {  border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon {  background-color: '{{primary-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked.md-focused .md-container:before {  background-color: '{{primary-color-0.26}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-icon:after {  border-color: '{{primary-contrast-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-primary .md-indeterminate[disabled] .md-container {  color: '{{foreground-3}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ripple {  color: '{{warn-600}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn .md-ink-ripple {  color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple {  color: '{{warn-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn:not(.md-checked) .md-icon {  border-color: '{{foreground-2}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon {  background-color: '{{warn-color-0.87}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked.md-focused:not([disabled]) .md-container:before {  background-color: '{{warn-color-0.26}}'; }md-checkbox.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-icon:after {  border-color: '{{background-200}}'; }md-checkbox.md-THEME_NAME-theme[disabled]:not(.md-checked) .md-icon {  border-color: '{{foreground-3}}'; }md-checkbox.md-THEME_NAME-theme[disabled].md-checked .md-icon {  background-color: '{{foreground-3}}'; }md-checkbox.md-THEME_NAME-theme[disabled].md-checked .md-icon:after {  border-color: '{{background-200}}'; }md-checkbox.md-THEME_NAME-theme[disabled] .md-icon:after {  border-color: '{{foreground-3}}'; }md-checkbox.md-THEME_NAME-theme[disabled] .md-label {  color: '{{foreground-3}}'; }md-content.md-THEME_NAME-theme {  color: '{{foreground-1}}';  background-color: '{{background-default}}'; }/** Theme styles for mdCalendar. */.md-calendar.md-THEME_NAME-theme {  background: '{{background-A100}}';  color: '{{background-A200-0.87}}'; }  .md-calendar.md-THEME_NAME-theme tr:last-child td {    border-bottom-color: '{{background-200}}'; }.md-THEME_NAME-theme .md-calendar-day-header {  background: '{{background-300}}';  color: '{{background-A200-0.87}}'; }.md-THEME_NAME-theme .md-calendar-date.md-calendar-date-today .md-calendar-date-selection-indicator {  border: 1px solid '{{primary-500}}'; }.md-THEME_NAME-theme .md-calendar-date.md-calendar-date-today.md-calendar-date-disabled {  color: '{{primary-500-0.6}}'; }.md-calendar-date.md-focus .md-THEME_NAME-theme .md-calendar-date-selection-indicator, .md-THEME_NAME-theme .md-calendar-date-selection-indicator:hover {  background: '{{background-300}}'; }.md-THEME_NAME-theme .md-calendar-date.md-calendar-selected-date .md-calendar-date-selection-indicator,.md-THEME_NAME-theme .md-calendar-date.md-focus.md-calendar-selected-date .md-calendar-date-selection-indicator {  background: '{{primary-500}}';  color: '{{primary-500-contrast}}';  border-color: transparent; }.md-THEME_NAME-theme .md-calendar-date-disabled,.md-THEME_NAME-theme .md-calendar-month-label-disabled {  color: '{{background-A200-0.435}}'; }/** Theme styles for mdDatepicker. */.md-THEME_NAME-theme .md-datepicker-input {  color: '{{foreground-1}}'; }  .md-THEME_NAME-theme .md-datepicker-input::-webkit-input-placeholder {    color: '{{foreground-3}}'; }  .md-THEME_NAME-theme .md-datepicker-input:-moz-placeholder {    color: '{{foreground-3}}'; }  .md-THEME_NAME-theme .md-datepicker-input::-moz-placeholder {    color: '{{foreground-3}}'; }  .md-THEME_NAME-theme .md-datepicker-input:-ms-input-placeholder {    color: '{{foreground-3}}'; }  .md-THEME_NAME-theme .md-datepicker-input::-webkit-input-placeholder {    color: '{{foreground-3}}'; }.md-THEME_NAME-theme .md-datepicker-input-container {  border-bottom-color: '{{foreground-4}}'; }  .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused {    border-bottom-color: '{{primary-color}}'; }    .md-accent .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused {      border-bottom-color: '{{accent-color}}'; }    .md-warn .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-focused {      border-bottom-color: '{{warn-A700}}'; }  .md-THEME_NAME-theme .md-datepicker-input-container.md-datepicker-invalid {    border-bottom-color: '{{warn-A700}}'; }.md-THEME_NAME-theme .md-datepicker-calendar-pane {  border-color: '{{background-hue-1}}'; }.md-THEME_NAME-theme .md-datepicker-triangle-button .md-datepicker-expand-triangle {  border-top-color: '{{foreground-3}}'; }.md-THEME_NAME-theme .md-datepicker-triangle-button:hover .md-datepicker-expand-triangle {  border-top-color: '{{foreground-2}}'; }.md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon {  color: '{{primary-color}}'; }.md-THEME_NAME-theme .md-datepicker-open.md-accent .md-datepicker-calendar-icon, .md-accent .md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon {  color: '{{accent-color}}'; }.md-THEME_NAME-theme .md-datepicker-open.md-warn .md-datepicker-calendar-icon, .md-warn .md-THEME_NAME-theme .md-datepicker-open .md-datepicker-calendar-icon {  color: '{{warn-A700}}'; }.md-THEME_NAME-theme .md-datepicker-calendar {  background: '{{background-A100}}'; }.md-THEME_NAME-theme .md-datepicker-input-mask-opaque {  box-shadow: 0 0 0 9999px \"{{background-hue-1}}\"; }.md-THEME_NAME-theme .md-datepicker-open .md-datepicker-input-container {  background: \"{{background-hue-1}}\"; }md-dialog.md-THEME_NAME-theme {  border-radius: 4px;  background-color: '{{background-hue-1}}';  color: '{{foreground-1}}'; }  md-dialog.md-THEME_NAME-theme.md-content-overflow .md-actions, md-dialog.md-THEME_NAME-theme.md-content-overflow md-dialog-actions {    border-top-color: '{{foreground-4}}'; }md-divider.md-THEME_NAME-theme {  border-top-color: '{{foreground-4}}'; }.layout-row > md-divider.md-THEME_NAME-theme,.layout-xs-row > md-divider.md-THEME_NAME-theme, .layout-gt-xs-row > md-divider.md-THEME_NAME-theme,.layout-sm-row > md-divider.md-THEME_NAME-theme, .layout-gt-sm-row > md-divider.md-THEME_NAME-theme,.layout-md-row > md-divider.md-THEME_NAME-theme, .layout-gt-md-row > md-divider.md-THEME_NAME-theme,.layout-lg-row > md-divider.md-THEME_NAME-theme, .layout-gt-lg-row > md-divider.md-THEME_NAME-theme,.layout-xl-row > md-divider.md-THEME_NAME-theme {  border-right-color: '{{foreground-4}}'; }md-icon.md-THEME_NAME-theme {  color: '{{foreground-2}}'; }  md-icon.md-THEME_NAME-theme.md-primary {    color: '{{primary-color}}'; }  md-icon.md-THEME_NAME-theme.md-accent {    color: '{{accent-color}}'; }  md-icon.md-THEME_NAME-theme.md-warn {    color: '{{warn-color}}'; }md-input-container.md-THEME_NAME-theme .md-input {  color: '{{foreground-1}}';  border-color: '{{foreground-4}}'; }  md-input-container.md-THEME_NAME-theme .md-input::-webkit-input-placeholder {    color: '{{foreground-3}}'; }  md-input-container.md-THEME_NAME-theme .md-input:-moz-placeholder {    color: '{{foreground-3}}'; }  md-input-container.md-THEME_NAME-theme .md-input::-moz-placeholder {    color: '{{foreground-3}}'; }  md-input-container.md-THEME_NAME-theme .md-input:-ms-input-placeholder {    color: '{{foreground-3}}'; }  md-input-container.md-THEME_NAME-theme .md-input::-webkit-input-placeholder {    color: '{{foreground-3}}'; }md-input-container.md-THEME_NAME-theme > md-icon {  color: '{{foreground-1}}'; }md-input-container.md-THEME_NAME-theme label,md-input-container.md-THEME_NAME-theme .md-placeholder {  color: '{{foreground-3}}'; }md-input-container.md-THEME_NAME-theme label.md-required:after {  color: '{{warn-A700}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-focused):not(.md-input-invalid) label.md-required:after {  color: '{{foreground-2}}'; }md-input-container.md-THEME_NAME-theme .md-input-messages-animation, md-input-container.md-THEME_NAME-theme .md-input-message-animation {  color: '{{warn-A700}}'; }  md-input-container.md-THEME_NAME-theme .md-input-messages-animation .md-char-counter, md-input-container.md-THEME_NAME-theme .md-input-message-animation .md-char-counter {    color: '{{foreground-1}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-has-value label {  color: '{{foreground-2}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused .md-input, md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-resized .md-input {  border-color: '{{primary-color}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused md-icon {  color: '{{primary-color}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent .md-input {  border-color: '{{accent-color}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-accent md-icon {  color: '{{accent-color}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn .md-input {  border-color: '{{warn-A700}}'; }md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn label,md-input-container.md-THEME_NAME-theme:not(.md-input-invalid).md-input-focused.md-warn md-icon {  color: '{{warn-A700}}'; }md-input-container.md-THEME_NAME-theme.md-input-invalid .md-input {  border-color: '{{warn-A700}}'; }md-input-container.md-THEME_NAME-theme.md-input-invalid label,md-input-container.md-THEME_NAME-theme.md-input-invalid .md-input-message-animation,md-input-container.md-THEME_NAME-theme.md-input-invalid .md-char-counter {  color: '{{warn-A700}}'; }md-input-container.md-THEME_NAME-theme .md-input[disabled],[disabled] md-input-container.md-THEME_NAME-theme .md-input {  border-bottom-color: transparent;  color: '{{foreground-3}}';  background-image: linear-gradient(to right, \"{{foreground-3}}\" 0%, \"{{foreground-3}}\" 33%, transparent 0%);  background-image: -ms-linear-gradient(left, transparent 0%, \"{{foreground-3}}\" 100%); }md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text h3, md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text h4,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text h3,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text h4 {  color: '{{foreground-1}}'; }md-list.md-THEME_NAME-theme md-list-item.md-2-line .md-list-item-text p,md-list.md-THEME_NAME-theme md-list-item.md-3-line .md-list-item-text p {  color: '{{foreground-2}}'; }md-list.md-THEME_NAME-theme .md-proxy-focus.md-focused div.md-no-style {  background-color: '{{background-100}}'; }md-list.md-THEME_NAME-theme md-list-item .md-avatar-icon {  background-color: '{{foreground-3}}';  color: '{{background-color}}'; }md-list.md-THEME_NAME-theme md-list-item > md-icon {  color: '{{foreground-2}}'; }  md-list.md-THEME_NAME-theme md-list-item > md-icon.md-highlight {    color: '{{primary-color}}'; }    md-list.md-THEME_NAME-theme md-list-item > md-icon.md-highlight.md-accent {      color: '{{accent-color}}'; }md-menu-content.md-THEME_NAME-theme {  background-color: '{{background-A100}}'; }  md-menu-content.md-THEME_NAME-theme md-menu-item {    color: '{{background-A200-0.87}}'; }    md-menu-content.md-THEME_NAME-theme md-menu-item md-icon {      color: '{{background-A200-0.54}}'; }    md-menu-content.md-THEME_NAME-theme md-menu-item .md-button[disabled] {      color: '{{background-A200-0.25}}'; }      md-menu-content.md-THEME_NAME-theme md-menu-item .md-button[disabled] md-icon {        color: '{{background-A200-0.25}}'; }  md-menu-content.md-THEME_NAME-theme md-menu-divider {    background-color: '{{background-A200-0.11}}'; }md-menu-bar.md-THEME_NAME-theme > button.md-button {  color: '{{foreground-2}}';  border-radius: 2px; }md-menu-bar.md-THEME_NAME-theme md-menu.md-open > button, md-menu-bar.md-THEME_NAME-theme md-menu > button:focus {  outline: none;  background: '{{background-200}}'; }md-menu-bar.md-THEME_NAME-theme.md-open:not(.md-keyboard-mode) md-menu:hover > button {  background-color: '{{ background-500-0.2}}'; }md-menu-bar.md-THEME_NAME-theme:not(.md-keyboard-mode):not(.md-open) md-menu button:hover,md-menu-bar.md-THEME_NAME-theme:not(.md-keyboard-mode):not(.md-open) md-menu button:focus {  background: transparent; }md-menu-content.md-THEME_NAME-theme .md-menu > .md-button:after {  color: '{{background-A200-0.54}}'; }md-menu-content.md-THEME_NAME-theme .md-menu.md-open > .md-button {  background-color: '{{ background-500-0.2}}'; }md-toolbar.md-THEME_NAME-theme.md-menu-toolbar {  background-color: '{{background-A100}}';  color: '{{background-A200}}'; }  md-toolbar.md-THEME_NAME-theme.md-menu-toolbar md-toolbar-filler {    background-color: '{{primary-color}}';    color: '{{background-A100-0.87}}'; }    md-toolbar.md-THEME_NAME-theme.md-menu-toolbar md-toolbar-filler md-icon {      color: '{{background-A100-0.87}}'; }md-nav-bar.md-THEME_NAME-theme .md-nav-bar {  background-color: transparent;  border-color: '{{foreground-4}}'; }md-nav-bar.md-THEME_NAME-theme .md-button._md-nav-button.md-unselected {  color: '{{foreground-2}}'; }md-nav-bar.md-THEME_NAME-theme md-nav-ink-bar {  color: '{{accent-color}}';  background: '{{accent-color}}'; }.md-panel {  background-color: '{{background-900-0.0}}'; }  .md-panel._md-panel-backdrop.md-THEME_NAME-theme {    background-color: '{{background-900-1.0}}'; }md-progress-circular.md-THEME_NAME-theme path {  stroke: '{{primary-color}}'; }md-progress-circular.md-THEME_NAME-theme.md-warn path {  stroke: '{{warn-color}}'; }md-progress-circular.md-THEME_NAME-theme.md-accent path {  stroke: '{{accent-color}}'; }md-progress-linear.md-THEME_NAME-theme .md-container {  background-color: '{{primary-100}}'; }md-progress-linear.md-THEME_NAME-theme .md-bar {  background-color: '{{primary-color}}'; }md-progress-linear.md-THEME_NAME-theme.md-warn .md-container {  background-color: '{{warn-100}}'; }md-progress-linear.md-THEME_NAME-theme.md-warn .md-bar {  background-color: '{{warn-color}}'; }md-progress-linear.md-THEME_NAME-theme.md-accent .md-container {  background-color: '{{accent-100}}'; }md-progress-linear.md-THEME_NAME-theme.md-accent .md-bar {  background-color: '{{accent-color}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-bar1 {  background-color: '{{warn-100}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-warn .md-dashed:before {  background: radial-gradient(\"{{warn-100}}\" 0%, \"{{warn-100}}\" 16%, transparent 42%); }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-bar1 {  background-color: '{{accent-100}}'; }md-progress-linear.md-THEME_NAME-theme[md-mode=buffer].md-accent .md-dashed:before {  background: radial-gradient(\"{{accent-100}}\" 0%, \"{{accent-100}}\" 16%, transparent 42%); }md-radio-button.md-THEME_NAME-theme .md-off {  border-color: '{{foreground-2}}'; }md-radio-button.md-THEME_NAME-theme .md-on {  background-color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme.md-checked .md-off {  border-color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme.md-checked .md-ink-ripple {  color: '{{accent-color-0.87}}'; }md-radio-button.md-THEME_NAME-theme .md-container .md-ripple {  color: '{{accent-A700}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-on, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-on {  background-color: '{{primary-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-off {  border-color: '{{primary-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary.md-checked .md-ink-ripple {  color: '{{primary-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-primary .md-container .md-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-primary .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-primary .md-container .md-ripple {  color: '{{primary-600}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-on, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-on,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-on {  background-color: '{{warn-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-off, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-off,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-off {  border-color: '{{warn-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-ink-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn.md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-checked .md-ink-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn.md-checked .md-ink-ripple {  color: '{{warn-color-0.87}}'; }md-radio-group.md-THEME_NAME-theme:not([disabled]) .md-warn .md-container .md-ripple, md-radio-group.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]) .md-warn .md-container .md-ripple,md-radio-button.md-THEME_NAME-theme:not([disabled]).md-warn .md-container .md-ripple {  color: '{{warn-600}}'; }md-radio-group.md-THEME_NAME-theme[disabled],md-radio-button.md-THEME_NAME-theme[disabled] {  color: '{{foreground-3}}'; }  md-radio-group.md-THEME_NAME-theme[disabled] .md-container .md-off,  md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-off {    border-color: '{{foreground-3}}'; }  md-radio-group.md-THEME_NAME-theme[disabled] .md-container .md-on,  md-radio-button.md-THEME_NAME-theme[disabled] .md-container .md-on {    border-color: '{{foreground-3}}'; }md-radio-group.md-THEME_NAME-theme .md-checked .md-ink-ripple {  color: '{{accent-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme.md-primary .md-checked:not([disabled]) .md-ink-ripple, md-radio-group.md-THEME_NAME-theme .md-checked:not([disabled]).md-primary .md-ink-ripple {  color: '{{primary-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme .md-checked.md-primary .md-ink-ripple {  color: '{{warn-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked .md-container:before {  background-color: '{{accent-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty).md-primary .md-checked .md-container:before,md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked.md-primary .md-container:before {  background-color: '{{primary-color-0.26}}'; }md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty).md-warn .md-checked .md-container:before,md-radio-group.md-THEME_NAME-theme.md-focused:not(:empty) .md-checked.md-warn .md-container:before {  background-color: '{{warn-color-0.26}}'; }md-input-container md-select.md-THEME_NAME-theme .md-select-value span:first-child:after {  color: '{{warn-A700}}'; }md-input-container:not(.md-input-focused):not(.md-input-invalid) md-select.md-THEME_NAME-theme .md-select-value span:first-child:after {  color: '{{foreground-3}}'; }md-input-container.md-input-focused:not(.md-input-has-value) md-select.md-THEME_NAME-theme .md-select-value {  color: '{{primary-color}}'; }  md-input-container.md-input-focused:not(.md-input-has-value) md-select.md-THEME_NAME-theme .md-select-value.md-select-placeholder {    color: '{{primary-color}}'; }md-input-container.md-input-invalid md-select.md-THEME_NAME-theme .md-select-value {  color: '{{warn-A700}}' !important;  border-bottom-color: '{{warn-A700}}' !important; }md-input-container.md-input-invalid md-select.md-THEME_NAME-theme.md-no-underline .md-select-value {  border-bottom-color: transparent !important; }md-select.md-THEME_NAME-theme[disabled] .md-select-value {  border-bottom-color: transparent;  background-image: linear-gradient(to right, \"{{foreground-3}}\" 0%, \"{{foreground-3}}\" 33%, transparent 0%);  background-image: -ms-linear-gradient(left, transparent 0%, \"{{foreground-3}}\" 100%); }md-select.md-THEME_NAME-theme .md-select-value {  border-bottom-color: '{{foreground-4}}'; }  md-select.md-THEME_NAME-theme .md-select-value.md-select-placeholder {    color: '{{foreground-3}}'; }  md-select.md-THEME_NAME-theme .md-select-value span:first-child:after {    color: '{{warn-A700}}'; }md-select.md-THEME_NAME-theme.md-no-underline .md-select-value {  border-bottom-color: transparent !important; }md-select.md-THEME_NAME-theme.ng-invalid.ng-touched .md-select-value {  color: '{{warn-A700}}' !important;  border-bottom-color: '{{warn-A700}}' !important; }md-select.md-THEME_NAME-theme.ng-invalid.ng-touched.md-no-underline .md-select-value {  border-bottom-color: transparent !important; }md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-value {  border-bottom-color: '{{primary-color}}';  color: '{{ foreground-1 }}'; }  md-select.md-THEME_NAME-theme:not([disabled]):focus .md-select-value.md-select-placeholder {    color: '{{ foreground-1 }}'; }md-select.md-THEME_NAME-theme:not([disabled]):focus.md-no-underline .md-select-value {  border-bottom-color: transparent !important; }md-select.md-THEME_NAME-theme:not([disabled]):focus.md-accent .md-select-value {  border-bottom-color: '{{accent-color}}'; }md-select.md-THEME_NAME-theme:not([disabled]):focus.md-warn .md-select-value {  border-bottom-color: '{{warn-color}}'; }md-select.md-THEME_NAME-theme[disabled] .md-select-value {  color: '{{foreground-3}}'; }  md-select.md-THEME_NAME-theme[disabled] .md-select-value.md-select-placeholder {    color: '{{foreground-3}}'; }md-select-menu.md-THEME_NAME-theme md-content {  background: '{{background-A100}}'; }  md-select-menu.md-THEME_NAME-theme md-content md-optgroup {    color: '{{background-600-0.87}}'; }  md-select-menu.md-THEME_NAME-theme md-content md-option {    color: '{{background-900-0.87}}'; }    md-select-menu.md-THEME_NAME-theme md-content md-option[disabled] .md-text {      color: '{{background-400-0.87}}'; }    md-select-menu.md-THEME_NAME-theme md-content md-option:not([disabled]):focus, md-select-menu.md-THEME_NAME-theme md-content md-option:not([disabled]):hover {      background: '{{background-200}}'; }    md-select-menu.md-THEME_NAME-theme md-content md-option[selected] {      color: '{{primary-500}}'; }      md-select-menu.md-THEME_NAME-theme md-content md-option[selected]:focus {        color: '{{primary-600}}'; }      md-select-menu.md-THEME_NAME-theme md-content md-option[selected].md-accent {        color: '{{accent-color}}'; }        md-select-menu.md-THEME_NAME-theme md-content md-option[selected].md-accent:focus {          color: '{{accent-A700}}'; }.md-checkbox-enabled.md-THEME_NAME-theme .md-ripple {  color: '{{primary-600}}'; }.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-ripple {  color: '{{background-600}}'; }.md-checkbox-enabled.md-THEME_NAME-theme .md-ink-ripple {  color: '{{foreground-2}}'; }.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-ink-ripple {  color: '{{primary-color-0.87}}'; }.md-checkbox-enabled.md-THEME_NAME-theme:not(.md-checked) .md-icon {  border-color: '{{foreground-2}}'; }.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-icon {  background-color: '{{primary-color-0.87}}'; }.md-checkbox-enabled.md-THEME_NAME-theme[selected].md-focused .md-container:before {  background-color: '{{primary-color-0.26}}'; }.md-checkbox-enabled.md-THEME_NAME-theme[selected] .md-icon:after {  border-color: '{{primary-contrast-0.87}}'; }.md-checkbox-enabled.md-THEME_NAME-theme .md-indeterminate[disabled] .md-container {  color: '{{foreground-3}}'; }.md-checkbox-enabled.md-THEME_NAME-theme md-option .md-text {  color: '{{background-900-0.87}}'; }md-sidenav.md-THEME_NAME-theme, md-sidenav.md-THEME_NAME-theme md-content {  background-color: '{{background-hue-1}}'; }md-slider.md-THEME_NAME-theme .md-track {  background-color: '{{foreground-3}}'; }md-slider.md-THEME_NAME-theme .md-track-ticks {  color: '{{background-contrast}}'; }md-slider.md-THEME_NAME-theme .md-focus-ring {  background-color: '{{accent-A200-0.2}}'; }md-slider.md-THEME_NAME-theme .md-disabled-thumb {  border-color: '{{background-color}}';  background-color: '{{background-color}}'; }md-slider.md-THEME_NAME-theme.md-min .md-thumb:after {  background-color: '{{background-color}}';  border-color: '{{foreground-3}}'; }md-slider.md-THEME_NAME-theme.md-min .md-focus-ring {  background-color: '{{foreground-3-0.38}}'; }md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-thumb:after {  background-color: '{{background-contrast}}';  border-color: transparent; }md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-sign {  background-color: '{{background-400}}'; }  md-slider.md-THEME_NAME-theme.md-min[md-discrete] .md-sign:after {    border-top-color: '{{background-400}}'; }md-slider.md-THEME_NAME-theme.md-min[md-discrete][md-vertical] .md-sign:after {  border-top-color: transparent;  border-left-color: '{{background-400}}'; }md-slider.md-THEME_NAME-theme .md-track.md-track-fill {  background-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-thumb:after {  border-color: '{{accent-color}}';  background-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-sign {  background-color: '{{accent-color}}'; }  md-slider.md-THEME_NAME-theme .md-sign:after {    border-top-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme[md-vertical] .md-sign:after {  border-top-color: transparent;  border-left-color: '{{accent-color}}'; }md-slider.md-THEME_NAME-theme .md-thumb-text {  color: '{{accent-contrast}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-focus-ring {  background-color: '{{warn-200-0.38}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-track.md-track-fill {  background-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-thumb:after {  border-color: '{{warn-color}}';  background-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-sign {  background-color: '{{warn-color}}'; }  md-slider.md-THEME_NAME-theme.md-warn .md-sign:after {    border-top-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn[md-vertical] .md-sign:after {  border-top-color: transparent;  border-left-color: '{{warn-color}}'; }md-slider.md-THEME_NAME-theme.md-warn .md-thumb-text {  color: '{{warn-contrast}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-focus-ring {  background-color: '{{primary-200-0.38}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-track.md-track-fill {  background-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-thumb:after {  border-color: '{{primary-color}}';  background-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-sign {  background-color: '{{primary-color}}'; }  md-slider.md-THEME_NAME-theme.md-primary .md-sign:after {    border-top-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary[md-vertical] .md-sign:after {  border-top-color: transparent;  border-left-color: '{{primary-color}}'; }md-slider.md-THEME_NAME-theme.md-primary .md-thumb-text {  color: '{{primary-contrast}}'; }md-slider.md-THEME_NAME-theme[disabled] .md-thumb:after {  border-color: transparent; }md-slider.md-THEME_NAME-theme[disabled]:not(.md-min) .md-thumb:after, md-slider.md-THEME_NAME-theme[disabled][md-discrete] .md-thumb:after {  background-color: '{{foreground-3}}';  border-color: transparent; }md-slider.md-THEME_NAME-theme[disabled][readonly] .md-sign {  background-color: '{{background-400}}'; }  md-slider.md-THEME_NAME-theme[disabled][readonly] .md-sign:after {    border-top-color: '{{background-400}}'; }md-slider.md-THEME_NAME-theme[disabled][readonly][md-vertical] .md-sign:after {  border-top-color: transparent;  border-left-color: '{{background-400}}'; }md-slider.md-THEME_NAME-theme[disabled][readonly] .md-disabled-thumb {  border-color: transparent;  background-color: transparent; }md-slider-container[disabled] > *:first-child:not(md-slider),md-slider-container[disabled] > *:last-child:not(md-slider) {  color: '{{foreground-3}}'; }.md-subheader.md-THEME_NAME-theme {  color: '{{ foreground-2-0.23 }}';  background-color: '{{background-default}}'; }  .md-subheader.md-THEME_NAME-theme.md-primary {    color: '{{primary-color}}'; }  .md-subheader.md-THEME_NAME-theme.md-accent {    color: '{{accent-color}}'; }  .md-subheader.md-THEME_NAME-theme.md-warn {    color: '{{warn-color}}'; }md-switch.md-THEME_NAME-theme .md-ink-ripple {  color: '{{background-500}}'; }md-switch.md-THEME_NAME-theme .md-thumb {  background-color: '{{background-50}}'; }md-switch.md-THEME_NAME-theme .md-bar {  background-color: '{{background-500}}'; }md-switch.md-THEME_NAME-theme.md-checked .md-ink-ripple {  color: '{{accent-color}}'; }md-switch.md-THEME_NAME-theme.md-checked .md-thumb {  background-color: '{{accent-color}}'; }md-switch.md-THEME_NAME-theme.md-checked .md-bar {  background-color: '{{accent-color-0.5}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-focused .md-thumb:before {  background-color: '{{accent-color-0.26}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-ink-ripple {  color: '{{primary-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-thumb {  background-color: '{{primary-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary .md-bar {  background-color: '{{primary-color-0.5}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-primary.md-focused .md-thumb:before {  background-color: '{{primary-color-0.26}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-ink-ripple {  color: '{{warn-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-thumb {  background-color: '{{warn-color}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn .md-bar {  background-color: '{{warn-color-0.5}}'; }md-switch.md-THEME_NAME-theme.md-checked.md-warn.md-focused .md-thumb:before {  background-color: '{{warn-color-0.26}}'; }md-switch.md-THEME_NAME-theme[disabled] .md-thumb {  background-color: '{{background-400}}'; }md-switch.md-THEME_NAME-theme[disabled] .md-bar {  background-color: '{{foreground-4}}'; }md-tabs.md-THEME_NAME-theme md-tabs-wrapper {  background-color: transparent;  border-color: '{{foreground-4}}'; }md-tabs.md-THEME_NAME-theme .md-paginator md-icon {  color: '{{primary-color}}'; }md-tabs.md-THEME_NAME-theme md-ink-bar {  color: '{{accent-color}}';  background: '{{accent-color}}'; }md-tabs.md-THEME_NAME-theme .md-tab {  color: '{{foreground-2}}'; }  md-tabs.md-THEME_NAME-theme .md-tab[disabled], md-tabs.md-THEME_NAME-theme .md-tab[disabled] md-icon {    color: '{{foreground-3}}'; }  md-tabs.md-THEME_NAME-theme .md-tab.md-active, md-tabs.md-THEME_NAME-theme .md-tab.md-active md-icon, md-tabs.md-THEME_NAME-theme .md-tab.md-focused, md-tabs.md-THEME_NAME-theme .md-tab.md-focused md-icon {    color: '{{primary-color}}'; }  md-tabs.md-THEME_NAME-theme .md-tab.md-focused {    background: '{{primary-color-0.1}}'; }  md-tabs.md-THEME_NAME-theme .md-tab .md-ripple-container {    color: '{{accent-A100}}'; }md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper {  background-color: '{{accent-color}}'; }  md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) {    color: '{{accent-A100}}'; }    md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon {      color: '{{accent-contrast}}'; }    md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused {      background: '{{accent-contrast-0.1}}'; }  md-tabs.md-THEME_NAME-theme.md-accent > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-ink-bar {    color: '{{primary-600-1}}';    background: '{{primary-600-1}}'; }md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper {  background-color: '{{primary-color}}'; }  md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) {    color: '{{primary-100}}'; }    md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon {      color: '{{primary-contrast}}'; }    md-tabs.md-THEME_NAME-theme.md-primary > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused {      background: '{{primary-contrast-0.1}}'; }md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper {  background-color: '{{warn-color}}'; }  md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) {    color: '{{warn-100}}'; }    md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon {      color: '{{warn-contrast}}'; }    md-tabs.md-THEME_NAME-theme.md-warn > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused {      background: '{{warn-contrast-0.1}}'; }md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper {  background-color: '{{primary-color}}'; }  md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) {    color: '{{primary-100}}'; }    md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon {      color: '{{primary-contrast}}'; }    md-toolbar > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused {      background: '{{primary-contrast-0.1}}'; }md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper {  background-color: '{{accent-color}}'; }  md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) {    color: '{{accent-A100}}'; }    md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon {      color: '{{accent-contrast}}'; }    md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused {      background: '{{accent-contrast-0.1}}'; }  md-toolbar.md-accent > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-ink-bar {    color: '{{primary-600-1}}';    background: '{{primary-600-1}}'; }md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper {  background-color: '{{warn-color}}'; }  md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]) {    color: '{{warn-100}}'; }    md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active, md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-active md-icon, md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused, md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused md-icon {      color: '{{warn-contrast}}'; }    md-toolbar.md-warn > md-tabs.md-THEME_NAME-theme > md-tabs-wrapper > md-tabs-canvas > md-pagination-wrapper > md-tab-item:not([disabled]).md-focused {      background: '{{warn-contrast-0.1}}'; }md-toast.md-THEME_NAME-theme .md-toast-content {  background-color: #323232;  color: '{{background-50}}'; }  md-toast.md-THEME_NAME-theme .md-toast-content .md-button {    color: '{{background-50}}'; }    md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight {      color: '{{accent-color}}'; }      md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight.md-primary {        color: '{{primary-color}}'; }      md-toast.md-THEME_NAME-theme .md-toast-content .md-button.md-highlight.md-warn {        color: '{{warn-color}}'; }md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) {  background-color: '{{primary-color}}';  color: '{{primary-contrast}}'; }  md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) md-icon {    color: '{{primary-contrast}}';    fill: '{{primary-contrast}}'; }  md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar) .md-button[disabled] md-icon {    color: '{{primary-contrast-0.26}}';    fill: '{{primary-contrast-0.26}}'; }  md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent {    background-color: '{{accent-color}}';    color: '{{accent-contrast}}'; }    md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent .md-ink-ripple {      color: '{{accent-contrast}}'; }    md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent md-icon {      color: '{{accent-contrast}}';      fill: '{{accent-contrast}}'; }    md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-accent .md-button[disabled] md-icon {      color: '{{accent-contrast-0.26}}';      fill: '{{accent-contrast-0.26}}'; }  md-toolbar.md-THEME_NAME-theme:not(.md-menu-toolbar).md-warn {    background-color: '{{warn-color}}';    color: '{{warn-contrast}}'; }md-tooltip.md-THEME_NAME-theme {  color: '{{background-700-contrast}}'; }  md-tooltip.md-THEME_NAME-theme .md-content {    background-color: '{{background-700}}'; }/*  Only used with Theme processes */html.md-THEME_NAME-theme, body.md-THEME_NAME-theme {  color: '{{foreground-1}}';  background-color: '{{background-color}}'; }")}(window,window.angular),window.ngMaterial={version:{full:"1.1.1"}},function(e,N){"use strict";var L=N.$$minErr("$resource"),s=/^(\.[a-zA-Z_$@][0-9a-zA-Z_$@]*)+$/;function F(e,t){if(null==(n=t)||""===n||"hasOwnProperty"===n||!s.test("."+n))throw L("badmember",'Dotted member path "@{0}" is invalid.',t);for(var n,r=t.split("."),i=0,a=r.length;i<a&&N.isDefined(e);i++){var o=r[i];e=null!==e?e[o]:void 0}return e}function G(e,n){for(var t in n=n||{},N.forEach(n,function(e,t){delete n[t]}),e)!e.hasOwnProperty(t)||"$"===t.charAt(0)&&"$"===t.charAt(1)||(n[t]=e[t]);return n}N.module("ngResource",["ng"]).provider("$resource",function(){var u=/^https?:\/\/[^\/]*/,o=this;this.defaults={stripTrailingSlashes:!0,cancellable:!1,actions:{get:{method:"GET"},save:{method:"POST"},query:{method:"GET",isArray:!0},remove:{method:"DELETE"},delete:{method:"DELETE"}}},this.$get=["$http","$log","$q","$timeout",function(E,i,D,I){var P=N.noop,M=N.forEach,$=N.extend,O=N.copy,R=N.isFunction;function l(e,t){return encodeURIComponent(e).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,t?"%20":"+")}function a(e,t){this.template=e,this.defaults=$({},o.defaults,t),this.urlParams={}}return a.prototype={setUrlParams:function(n,r,e){var i,a,o=this,s=e||o.template,t="",c=o.urlParams={};M(s.split(/\W/),function(e){if("hasOwnProperty"===e)throw L("badname","hasOwnProperty is not a valid parameter name.");!new RegExp("^\\d+$").test(e)&&e&&new RegExp("(^|[^\\\\]):"+e+"(\\W|$)").test(s)&&(c[e]={isQueryParamValue:new RegExp("\\?.*=:"+e+"(?:\\W|$)").test(s)})}),s=(s=s.replace(/\\:/g,":")).replace(u,function(e){return t=e,""}),r=r||{},M(o.urlParams,function(e,t){i=r.hasOwnProperty(t)?r[t]:o.defaults[t],s=N.isDefined(i)&&null!==i?(a=e.isQueryParamValue?l(i,!0):l(i,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+"),s.replace(new RegExp(":"+t+"(\\W|$)","g"),function(e,t){return a+t})):s.replace(new RegExp("(/?):"+t+"(\\W|$)","g"),function(e,t,n){return"/"==n.charAt(0)?n:t+n})}),o.defaults.stripTrailingSlashes&&(s=s.replace(/\/+$/,"")||"/"),s=s.replace(/\/\.(?=\w+($|\?))/,"."),n.url=t+s.replace(/\/\\\./,"/."),M(r,function(e,t){o.urlParams[t]||(n.params=n.params||{},n.params[t]=e)})}},function t(n,S,r,e){var T=new a(n,e);function x(e){return e.resource}function k(e){G(e||{},this)}return r=$({},o.defaults.actions,r),k.prototype.toJSON=function(){var e=$({},this);return delete e.$promise,delete e.$resolved,e},M(r,function(v,y){var w=/^(POST|PUT|PATCH)$/i.test(v.method),C=v.timeout,A=N.isDefined(v.cancellable)?v.cancellable:e&&N.isDefined(e.cancellable)?e.cancellable:o.defaults.cancellable;C&&!N.isNumber(C)&&(i.debug("ngResource:\n  Only numeric values are allowed as `timeout`.\n  Promises are not supported in $resource, because the same value would be used for multiple requests. If you are looking for a way to cancel requests, you should use the `cancellable` option."),delete v.timeout,C=null),k[y]=function(e,t,n,r){var i,a,o,s={};switch(arguments.length){case 4:o=r,a=n;case 3:case 2:if(!R(t)){s=e,i=t,a=n;break}if(R(e)){a=e,o=t;break}a=t,o=n;case 1:R(e)?a=e:w?i=e:s=e;break;case 0:break;default:throw L("badargs","Expected up to 4 arguments [params, data, success, error], got {0} arguments",arguments.length)}var c,l,u,f,d,h=this instanceof k,p=h?i:v.isArray?[]:new k(i),m={},g=v.interceptor&&v.interceptor.response||x,_=v.interceptor&&v.interceptor.responseError||void 0;M(v,function(e,t){switch(t){default:m[t]=O(e);break;case"params":case"isArray":case"interceptor":case"cancellable":}}),!h&&A&&(c=D.defer(),m.timeout=c.promise,C&&(l=I(c.resolve,C))),w&&(m.data=i),T.setUrlParams(m,$({},(u=i,f=v.params||{},d={},f=$({},S,f),M(f,function(e,t){R(e)&&(e=e(u)),d[t]=e&&e.charAt&&"@"==e.charAt(0)?F(u,e.substr(1)):e}),d),s),v.url);var b=E(m).then(function(e){var t=e.data;if(t){if(N.isArray(t)!==!!v.isArray)throw L("badcfg","Error in resource configuration for action `{0}`. Expected response to contain an {1} but got an {2} (Request: {3} {4})",y,v.isArray?"array":"object",N.isArray(t)?"array":"object",m.method,m.url);if(v.isArray)p.length=0,M(t,function(e){"object"==typeof e?p.push(new k(e)):p.push(e)});else{var n=p.$promise;G(t,p),p.$promise=n}}return e.resource=p,e},function(e){return(o||P)(e),D.reject(e)});return b.finally(function(){p.$resolved=!0,!h&&A&&(p.$cancelRequest=N.noop,I.cancel(l),c=l=m.timeout=null)}),b=b.then(function(e){var t=g(e);return(a||P)(t,e.headers),t},_),h?b:(p.$promise=b,p.$resolved=!1,A&&(p.$cancelRequest=c.resolve),p)},k.prototype["$"+y]=function(e,t,n){R(e)&&(n=t,t=e,e={});var r=k[y].call(this,e,this,t,n);return r.$promise||r}}),k.bind=function(e){return t(n,$({},S,e),r)},k}}]})}(window,window.angular),function(w,C){"use strict";var A,S,T,x,k,E,D,I,P=C.$$minErr("$sanitize");C.module("ngSanitize",[]).provider("$sanitize",function(){var t=!1;this.$get=["$$sanitizeUri",function(n){return t&&S(d,u),function(e){var t=[];return D(e,I(t,function(e,t){return!/^unsafe:/.test(n(e,t))})),t.join("")}}],this.enableSvg=function(e){return x(e)?(t=e,this):t},A=C.bind,S=C.extend,T=C.forEach,x=C.isDefined,k=C.lowercase,E=C.noop,D=function(e,t){null==e?e="":"string"!=typeof e&&(e=""+e),a.innerHTML=e;var n=5;do{if(0===n)throw P("uinput","Failed to sanitize html because the input is unstable");n--,w.document.documentMode&&y(a),e=a.innerHTML,a.innerHTML=e}while(e!==a.innerHTML);for(var r=a.firstChild;r;){switch(r.nodeType){case 1:t.start(r.nodeName.toLowerCase(),b(r.attributes));break;case 3:t.chars(r.textContent)}var i;if(!((i=r.firstChild)||(1==r.nodeType&&t.end(r.nodeName.toLowerCase()),i=r.nextSibling)))for(;null==i&&(r=r.parentNode)!==a;)i=r.nextSibling,1==r.nodeType&&t.end(r.nodeName.toLowerCase());r=i}for(;r=a.firstChild;)a.removeChild(r)},I=function(e,a){var t=!1,o=A(e,e.push);return{start:function(i,e){i=k(i),!t&&f[i]&&(t=i),t||!0!==d[i]||(o("<"),o(i),T(e,function(e,t){var n=k(t),r="img"===i&&"src"===n||"background"===n;!0!==g[n]||!0===h[n]&&!a(e,r)||(o(" "),o(t),o('="'),o(v(e)),o('"'))}),o(">"))},end:function(e){e=k(e),t||!0!==d[e]||!0===i[e]||(o("</"),o(e),o(">")),e==t&&(t=!1)},chars:function(e){t||o(v(e))}}};var a,n=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,r=/([^\#-~ |!])/g,i=_("area,br,col,hr,img,wbr"),e=_("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),o=_("rp,rt"),s=S({},o,e),c=S({},e,_("address,article,aside,blockquote,caption,center,del,dir,div,dl,figure,figcaption,footer,h1,h2,h3,h4,h5,h6,header,hgroup,hr,ins,map,menu,nav,ol,pre,section,table,ul")),l=S({},o,_("a,abbr,acronym,b,bdi,bdo,big,br,cite,code,del,dfn,em,font,i,img,ins,kbd,label,map,mark,q,ruby,rp,rt,s,samp,small,span,strike,strong,sub,sup,time,tt,u,var")),u=_("circle,defs,desc,ellipse,font-face,font-face-name,font-face-src,g,glyph,hkern,image,linearGradient,line,marker,metadata,missing-glyph,mpath,path,polygon,polyline,radialGradient,rect,stop,svg,switch,text,title,tspan"),f=_("script,style"),d=S({},i,c,l,s),h=_("background,cite,href,longdesc,src,xlink:href"),p=_("abbr,align,alt,axis,bgcolor,border,cellpadding,cellspacing,class,clear,color,cols,colspan,compact,coords,dir,face,headers,height,hreflang,hspace,ismap,lang,language,nohref,nowrap,rel,rev,rows,rowspan,rules,scope,scrolling,shape,size,span,start,summary,tabindex,target,title,type,valign,value,vspace,width"),m=_("accent-height,accumulate,additive,alphabetic,arabic-form,ascent,baseProfile,bbox,begin,by,calcMode,cap-height,class,color,color-rendering,content,cx,cy,d,dx,dy,descent,display,dur,end,fill,fill-rule,font-family,font-size,font-stretch,font-style,font-variant,font-weight,from,fx,fy,g1,g2,glyph-name,gradientUnits,hanging,height,horiz-adv-x,horiz-origin-x,ideographic,k,keyPoints,keySplines,keyTimes,lang,marker-end,marker-mid,marker-start,markerHeight,markerUnits,markerWidth,mathematical,max,min,offset,opacity,orient,origin,overline-position,overline-thickness,panose-1,path,pathLength,points,preserveAspectRatio,r,refX,refY,repeatCount,repeatDur,requiredExtensions,requiredFeatures,restart,rotate,rx,ry,slope,stemh,stemv,stop-color,stop-opacity,strikethrough-position,strikethrough-thickness,stroke,stroke-dasharray,stroke-dashoffset,stroke-linecap,stroke-linejoin,stroke-miterlimit,stroke-opacity,stroke-width,systemLanguage,target,text-anchor,to,transform,type,u1,u2,underline-position,underline-thickness,unicode,unicode-range,units-per-em,values,version,viewBox,visibility,width,widths,x,x-height,x1,x2,xlink:actuate,xlink:arcrole,xlink:role,xlink:show,xlink:title,xlink:type,xml:base,xml:lang,xml:space,xmlns,xmlns:xlink,y,y1,y2,zoomAndPan",!0),g=S({},h,m,p);function _(e,t){var n,r={},i=e.split(",");for(n=0;n<i.length;n++)r[t?k(i[n]):i[n]]=!0;return r}function b(e){for(var t={},n=0,r=e.length;n<r;n++){var i=e[n];t[i.name]=i.value}return t}function v(e){return e.replace(/&/g,"&amp;").replace(n,function(e){return"&#"+(1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320)+65536)+";"}).replace(r,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(/</g,"&lt;").replace(/>/g,"&gt;")}function y(e){if(e.nodeType===w.Node.ELEMENT_NODE)for(var t=e.attributes,n=0,r=t.length;n<r;n++){var i=t[n],a=i.name.toLowerCase();"xmlns:ns1"!==a&&0!==a.lastIndexOf("ns1:",0)||(e.removeAttributeNode(i),n--,r--)}var o=e.firstChild;o&&y(o),(o=e.nextSibling)&&y(o)}!function(e){var t;if(!e.document||!e.document.implementation)throw P("noinert","Can't create an inert html document");var n=((t=e.document.implementation.createHTMLDocument("inert")).documentElement||t.getDocumentElement()).getElementsByTagName("body");if(1===n.length)a=n[0];else{var r=t.createElement("html");a=t.createElement("body"),r.appendChild(a),t.appendChild(r)}}(w)}),C.module("ngSanitize").filter("linky",["$sanitize",function(f){var d=/((ftp|https?):\/\/|(www\.)|(mailto:)?[A-Za-z0-9._%+-]+@)\S*[^\s.;,(){}<>"\u201d\u2019]/i,h=/^mailto:/i,p=C.$$minErr("linky"),m=C.isDefined,g=C.isFunction,_=C.isObject,b=C.isString;return function(e,i,t){if(null==e||""===e)return e;if(!b(e))throw p("notstring","Expected string but received: {0}",e);for(var n,r,a,o=g(t)?t:_(t)?function(){return t}:function(){return{}},s=e,c=[];n=s.match(d);)r=n[0],n[2]||n[4]||(r=(n[3]?"http://":"mailto:")+r),a=n.index,l(s.substr(0,a)),u(r,n[0].replace(h,"")),s=s.substring(a+n[0].length);return l(s),f(c.join(""));function l(e){var t,n;e&&c.push((t=e,I(n=[],E).chars(t),n.join("")))}function u(e,t){var n,r=o(e);for(n in c.push("<a "),r)c.push(n+'="'+r[n]+'" ');!m(i)||"target"in r||c.push('target="',i,'" '),c.push('href="',e.replace(/"/g,"&quot;"),'">'),l(t),c.push("</a>")}}}])}(window,window.angular),function(e,t){"function"==typeof define&&define.amd?define([],function(){return t()}):"object"==typeof exports?module.exports=t():t()}(0,function(){function e(t){"use strict";var n=t.storageKey(),r=t.storage(),e=function(){var e=t.preferredLanguage();angular.isString(e)?t.use(e):r.put(n,t.use())};e.displayName="fallbackFromIncorrectStorageValue",r?r.get(n)?t.use(r.get(n)).catch(e):e():angular.isString(t.preferredLanguage())&&t.use(t.preferredLanguage())}function t(e,i,t,a){"use strict";var M,u,$,O,R,N,L,n,F,G,j,B,U,H,W,q,z={},V=[],Y=e,K=[],Q="translate-cloak",X=!1,Z=!1,J=".",ee=!1,te=0,ne=!0,r="default",o={default:function(e){return(e||"").split("-").join("_")},java:function(e){var t=(e||"").split("-").join("_"),n=t.split("_");return 1<n.length?n[0].toLowerCase()+"_"+n[1].toUpperCase():t},bcp47:function(e){var t=(e||"").split("_").join("-"),n=t.split("-");return 1<n.length?n[0].toLowerCase()+"-"+n[1].toUpperCase():t},"iso639-1":function(e){return(e||"").split("_").join("-").split("-")[0].toLowerCase()}},s=function(){if(angular.isFunction(a.getLocale))return a.getLocale();var e,t,n=i.$get().navigator,r=["language","browserLanguage","systemLanguage","userLanguage"];if(angular.isArray(n.languages))for(e=0;e<n.languages.length;e++)if((t=n.languages[e])&&t.length)return t;for(e=0;e<r.length;e++)if((t=n[r[e]])&&t.length)return t;return null};s.displayName="angular-translate/service: getFirstBrowserLanguage";var re=function(){var e=s()||"";return o[r]&&(e=o[r](e)),e};re.displayName="angular-translate/service: getLocale";var ie=function(e,t){for(var n=0,r=e.length;n<r;n++)if(e[n]===t)return n;return-1},ae=function(){return this.toString().replace(/^\s+|\s+$/g,"")},oe=function(e){if(e){for(var t,n=[],r=angular.lowercase(e),i=0,a=V.length;i<a;i++)n.push(angular.lowercase(V[i]));if(-1<ie(n,r))return e;if(u)for(var o in u)if(u.hasOwnProperty(o)){var s=!1,c=Object.prototype.hasOwnProperty.call(u,o)&&angular.lowercase(o)===angular.lowercase(e);if("*"===o.slice(-1)&&(s=o.slice(0,-1)===e.slice(0,o.length-1)),(c||s)&&(t=u[o],-1<ie(n,angular.lowercase(t))))return t}var l=e.split("_");return 1<l.length&&-1<ie(n,angular.lowercase(l[0]))?l[0]:void 0}},se=function(e,t){if(!e&&!t)return z;if(e&&!t){if(angular.isString(e))return z[e]}else angular.isObject(z[e])||(z[e]={}),angular.extend(z[e],ce(t));return this};this.translations=se,this.cloakClassName=function(e){return e?(Q=e,this):Q},this.nestedObjectDelimeter=function(e){return e?(J=e,this):J};var ce=function(e,t,n,r){var i,a,o;for(i in t||(t=[]),n||(n={}),e)Object.prototype.hasOwnProperty.call(e,i)&&(o=e[i],angular.isObject(o)?ce(o,t.concat(i),n,i):(a=t.length?""+t.join(J)+J+i:i,t.length&&i===r&&(n[""+t.join(J)]="@:"+a),n[a]=o));return n};ce.displayName="flatObject",this.addInterpolation=function(e){return K.push(e),this},this.useMessageFormatInterpolation=function(){return this.useInterpolation("$translateMessageFormatInterpolation")},this.useInterpolation=function(e){return G=e,this},this.useSanitizeValueStrategy=function(e){return t.useStrategy(e),this},this.preferredLanguage=function(e){return e?(le(e),this):M};var le=function(e){return e&&(M=e),M};this.translationNotFoundIndicator=function(e){return this.translationNotFoundIndicatorLeft(e),this.translationNotFoundIndicatorRight(e),this},this.translationNotFoundIndicatorLeft=function(e){return e?(U=e,this):U},this.translationNotFoundIndicatorRight=function(e){return e?(H=e,this):H},this.fallbackLanguage=function(e){return ue(e),this};var ue=function(e){return e?(angular.isString(e)?(O=!0,$=[e]):angular.isArray(e)&&(O=!1,$=e),angular.isString(M)&&ie($,M)<0&&$.push(M),this):O?$[0]:$};this.use=function(e){if(e){if(!z[e]&&!j)throw new Error("$translateProvider couldn't find translationTable for langKey: '"+e+"'");return R=e,this}return R},this.resolveClientLocale=function(){return re()};var fe=function(e){return e?(Y=e,this):n?n+Y:Y};this.storageKey=fe,this.useUrlLoader=function(e,t){return this.useLoader("$translateUrlLoader",angular.extend({url:e},t))},this.useStaticFilesLoader=function(e){return this.useLoader("$translateStaticFilesLoader",e)},this.useLoader=function(e,t){return j=e,B=t||{},this},this.useLocalStorage=function(){return this.useStorage("$translateLocalStorage")},this.useCookieStorage=function(){return this.useStorage("$translateCookieStorage")},this.useStorage=function(e){return L=e,this},this.storagePrefix=function(e){return e?(n=e,this):e},this.useMissingTranslationHandlerLog=function(){return this.useMissingTranslationHandler("$translateMissingTranslationHandlerLog")},this.useMissingTranslationHandler=function(e){return F=e,this},this.usePostCompiling=function(e){return X=!!e,this},this.forceAsyncReload=function(e){return Z=!!e,this},this.uniformLanguageTag=function(e){return e?angular.isString(e)&&(e={standard:e}):e={},r=e.standard,this},this.determinePreferredLanguage=function(e){var t=e&&angular.isFunction(e)?e():re();return M=V.length&&oe(t)||t,this},this.registerAvailableLanguageKeys=function(e,t){return e?(V=e,t&&(u=t),this):V},this.useLoaderCache=function(e){return!1===e?W=void 0:!0===e?W=!0:void 0===e?W="$translationCache":e&&(W=e),this},this.directivePriority=function(e){return void 0===e?te:(te=e,this)},this.statefulFilter=function(e){return void 0===e?ne:(ne=e,this)},this.postProcess=function(e){return q=e||void 0,this},this.$get=["$log","$injector","$rootScope","$q",function(e,o,u,m){var a,g,_,b=o.get(G||"$translateDefaultInterpolation"),v=!1,y={},f={},w=function(e,o,s,c,l){!R&&M&&(R=M);var r=l&&l!==R?oe(l)||l:R;if(l&&k(l),angular.isArray(e)){return function(e){for(var r={},t=[],n=function(t){var n=m.defer(),e=function(e){r[t]=e,n.resolve([t,e])};return w(t,o,s,c,l).then(e,e),n.promise},i=0,a=e.length;i<a;i++)t.push(n(e[i]));return m.all(t).then(function(){return r})}(e)}var t=m.defer();e&&(e=ae.apply(e));var n=function(){var e=M?f[M]:f[r];if(g=0,L&&!e){var t=a.get(Y);if(e=f[t],$&&$.length){var n=ie($,t);g=0===n?1:0,ie($,M)<0&&$.push(M)}}return e}();if(n){var i=function(){l||(r=R),p(e,o,s,c,r).then(t.resolve,t.reject)};i.displayName="promiseResolved",n.finally(i)}else p(e,o,s,c,r).then(t.resolve,t.reject);return t.promise},C=function(e){return U&&(e=[U,e].join(" ")),H&&(e=[e,H].join(" ")),e},d=function(e){R=e,L&&a.put(w.storageKey(),R),u.$emit("$translateChangeSuccess",{language:e}),b.setLocale(R);var t=function(e,t){y[t].setLocale(R)};t.displayName="eachInterpolatorLocaleSetter",angular.forEach(y,t),u.$emit("$translateChangeEnd",{language:e})},h=function(n){if(!n)throw"No language key specified for loading.";var r=m.defer();u.$emit("$translateLoadingStart",{language:n}),v=!0;var e=W;"string"==typeof e&&(e=o.get(e));var t=angular.extend({},B,{key:n,$http:angular.extend({},{cache:e},B.$http)}),i=function(e){var t={};u.$emit("$translateLoadingSuccess",{language:n}),angular.isArray(e)?angular.forEach(e,function(e){angular.extend(t,ce(e))}):angular.extend(t,ce(e)),v=!1,r.resolve({key:n,table:t}),u.$emit("$translateLoadingEnd",{language:n})};i.displayName="onLoaderSuccess";var a=function(e){u.$emit("$translateLoadingError",{language:e}),r.reject(e),u.$emit("$translateLoadingEnd",{language:e})};return a.displayName="onLoaderError",o.get(j)(t).then(i,a),r.promise};if(L&&(!(a=o.get(L)).get||!a.put))throw new Error("Couldn't use storage '"+L+"', missing get() or put() method!");if(K.length){var t=function(e){var t=o.get(e);t.setLocale(M||R),y[t.getInterpolationIdentifier()]=t};t.displayName="interpolationFactoryAdder",angular.forEach(K,t)}var c=function(r,i,a,o){var s=m.defer(),e=function(e){if(Object.prototype.hasOwnProperty.call(e,i)){o.setLocale(r);var t=e[i];if("@:"===t.substr(0,2))c(r,t.substr(2),a,o).then(s.resolve,s.reject);else{var n=o.interpolate(e[i],a);n=x(i,e[i],n,a,r),s.resolve(n)}o.setLocale(R)}else s.reject()};return e.displayName="fallbackTranslationResolver",function(e){var t=m.defer();if(Object.prototype.hasOwnProperty.call(z,e))t.resolve(z[e]);else if(f[e]){var n=function(e){se(e.key,e.table),t.resolve(e.table)};n.displayName="translationTableResolver",f[e].then(n,t.reject)}else t.reject();return t.promise}(r).then(e,s.reject),s.promise},s=function(e,t,n,r){var i,a=z[e];if(a&&Object.prototype.hasOwnProperty.call(a,t)){if(r.setLocale(e),"@:"===(i=r.interpolate(a[t],n)).substr(0,2))return s(e,i.substr(2),n,r);r.setLocale(R)}return i},A=function(e,t,n){if(F){var r=o.get(F)(e,R,t,n);return void 0!==r?r:e}return e},S=function(e,t,n,r,i){var a=m.defer();if(e<$.length){var o=$[e];c(o,t,n,r).then(function(e){a.resolve(e)},function(){return S(e+1,t,n,r,i).then(a.resolve,a.reject)})}else i?a.resolve(i):F?a.resolve(A(t,n)):a.reject(A(t,n));return a.promise},l=function(e,t,n,r){var i;if(e<$.length){var a=$[e];(i=s(a,t,n,r))||(i=l(e+1,t,n,r))}return i},p=function(e,t,n,r,i){var a,o,s,c,l=m.defer(),u=i?z[i]:z,f=n?y[n]:b;if(u&&Object.prototype.hasOwnProperty.call(u,e)){var d=u[e];if("@:"===d.substr(0,2))w(d.substr(2),t,n,r,i).then(l.resolve,l.reject);else{var h=f.interpolate(d,t);h=x(e,d,h,t,i),l.resolve(h)}}else{var p;F&&!v&&(p=A(e,t,r)),i&&$&&$.length?(a=e,o=t,s=f,c=r,S(0<_?_:g,a,o,s,c)).then(function(e){l.resolve(e)},function(e){l.reject(C(e))}):F&&!v&&p?r?l.resolve(r):l.resolve(p):r?l.resolve(r):l.reject(C(e))}return l.promise},T=function(e,t,n,r){var i,a=r?z[r]:z,o=b;if(y&&Object.prototype.hasOwnProperty.call(y,n)&&(o=y[n]),a&&Object.prototype.hasOwnProperty.call(a,e)){var s=a[e];i="@:"===s.substr(0,2)?T(s.substr(2),t,n,r):o.interpolate(s,t)}else{var c;F&&!v&&(c=A(e,t)),i=r&&$&&$.length?l((g=0)<_?_:g,e,t,o):F&&!v&&c?c:C(e)}return i},x=function(e,t,n,r,i){var a=q;return a&&("string"==typeof a&&(a=o.get(a)),a)?a(e,t,n,r,i):n},k=function(e){z[e]||!j||f[e]||(f[e]=h(e).then(function(e){se(e.key,e.table)}))};w.preferredLanguage=function(e){return e&&le(e),M},w.cloakClassName=function(){return Q},w.nestedObjectDelimeter=function(){return J},w.fallbackLanguage=function(e){if(null!=e){if(ue(e),j&&$&&$.length)for(var t=0,n=$.length;t<n;t++)f[$[t]]||(f[$[t]]=h($[t]));w.use(w.use())}return O?$[0]:$},w.useFallbackLanguage=function(e){if(null!=e)if(e){var t=ie($,e);-1<t&&(_=t)}else _=0},w.proposedLanguage=function(){return N},w.storage=function(){return a},w.negotiateLocale=oe,w.use=function(t){if(!t)return R;var n=m.defer();u.$emit("$translateChangeStart",{language:t});var e=oe(t);return 0<V.length&&!e?m.reject(t):(e&&(t=e),N=t,!Z&&z[t]||!j||f[t]?f[t]?f[t].then(function(e){return N===e.key&&d(e.key),n.resolve(e.key),e},function(e){return!R&&$&&0<$.length?w.use($[0]).then(n.resolve,n.reject):n.reject(e)}):(n.resolve(t),d(t)):(f[t]=h(t).then(function(e){return se(e.key,e.table),n.resolve(e.key),N===t&&d(e.key),e},function(e){return u.$emit("$translateChangeError",{language:e}),n.reject(e),u.$emit("$translateChangeEnd",{language:e}),m.reject(e)}),f[t].finally(function(){var e;N===(e=t)&&(N=void 0),f[e]=void 0})),n.promise)},w.resolveClientLocale=function(){return re()},w.storageKey=function(){return fe()},w.isPostCompilingEnabled=function(){return X},w.isForceAsyncReloadEnabled=function(){return Z},w.refresh=function(t){if(!j)throw new Error("Couldn't refresh translation table, no loader registered!");var e=m.defer();function n(){e.resolve(),u.$emit("$translateRefreshEnd",{language:t})}function r(){e.reject(),u.$emit("$translateRefreshEnd",{language:t})}if(u.$emit("$translateRefreshStart",{language:t}),t)if(z[t]){var i=function(e){se(e.key,e.table),t===R&&d(R),n()};i.displayName="refreshPostProcessor",h(t).then(i,r)}else r();else{var a=[],o={};if($&&$.length)for(var s=0,c=$.length;s<c;s++)a.push(h($[s])),o[$[s]]=!0;R&&!o[R]&&a.push(h(R));var l=function(e){z={},angular.forEach(e,function(e){se(e.key,e.table)}),R&&d(R),n()};l.displayName="refreshPostProcessor",m.all(a).then(l,r)}return e.promise},w.instant=function(e,t,n,r){var i=r&&r!==R?oe(r)||r:R;if(null===e||angular.isUndefined(e))return e;if(r&&k(r),angular.isArray(e)){for(var a={},o=0,s=e.length;o<s;o++)a[e[o]]=w.instant(e[o],t,n,r);return a}if(angular.isString(e)&&e.length<1)return e;e&&(e=ae.apply(e));var c,l=[];M&&l.push(M),i&&l.push(i),$&&$.length&&(l=l.concat($));for(var u=0,f=l.length;u<f;u++){var d=l[u];if(z[d]&&void 0!==z[d][e]&&(c=T(e,t,n,i)),void 0!==c)break}return c||""===c||(U||H?c=C(e):(c=b.interpolate(e,t),F&&!v&&(c=A(e,t)))),c},w.versionInfo=function(){return"2.11.0"},w.loaderCache=function(){return W},w.directivePriority=function(){return te},w.statefulFilter=function(){return ne},w.isReady=function(){return ee};var n=m.defer();n.promise.then(function(){ee=!0}),w.onReady=function(e){var t=m.defer();return angular.isFunction(e)&&t.promise.then(e),ee?t.resolve():n.promise.then(t.resolve),t.promise},w.getAvailableLanguageKeys=function(){return 0<V.length?V:null};var r=u.$on("$translateReady",function(){n.resolve(),r(),r=null}),i=u.$on("$translateChangeEnd",function(){n.resolve(),i(),i=null});if(j){if(angular.equals(z,{})&&w.use()&&w.use(w.use()),$&&$.length)for(var E=function(e){return se(e.key,e.table),u.$emit("$translateChangeEnd",{language:e.key}),e},D=0,I=$.length;D<I;D++){var P=$[D];!Z&&z[P]||(f[P]=h(P).then(E))}}else u.$emit("$translateReady",{language:w.use()});return w}]}function n(r,i){"use strict";var e={};return e.setLocale=function(e){e},e.getInterpolationIdentifier=function(){return"default"},e.useSanitizeValueStrategy=function(e){return i.useStrategy(e),this},e.interpolate=function(e,t){t=t||{},t=i.sanitize(t,"params");var n=r(e)(t);return n=i.sanitize(n,"text")},e}function r(w,e,C,A,S,T){"use strict";return{restrict:"AE",scope:!0,priority:w.directivePriority(),compile:function(e,m){var g=m.translateValues?m.translateValues:void 0,_=m.translateInterpolation?m.translateInterpolation:void 0,b=e[0].outerHTML.match(/translate-value-+/i),v="^(.*)("+C.startSymbol()+".*"+C.endSymbol()+")(.*)",y="^(.*)"+C.startSymbol()+"(.*)"+C.endSymbol()+"(.*)";return function(i,c,l){i.interpolateParams={},i.preText="",i.postText="",i.translateNamespace=x(i);var a={},o=function(e){if(angular.isFunction(o._unwatchOld)&&(o._unwatchOld(),o._unwatchOld=void 0),angular.equals(e,"")||!angular.isDefined(e)){var t=function(){return this.toString().replace(/^\s+|\s+$/g,"")}.apply(c.text()),n=t.match(v);if(angular.isArray(n)){i.preText=n[1],i.postText=n[3],a.translate=C(n[2])(i.$parent);var r=t.match(y);angular.isArray(r)&&r[2]&&r[2].length&&(o._unwatchOld=i.$watch(r[2],function(e){a.translate=e,u()}))}else a.translate=t||void 0}else a.translate=e;u()},e=function(t){l.$observe(t,function(e){a[t]=e,u()})};!function(e,t,n){if(t.translateValues&&angular.extend(e,S(t.translateValues)(i.$parent)),b)for(var r in n)Object.prototype.hasOwnProperty.call(t,r)&&"translateValue"===r.substr(0,14)&&"translateValues"!==r&&(e[angular.lowercase(r.substr(14,1))+r.substr(15)]=n[r])}(i.interpolateParams,l,m);var t=!0;for(var n in l.$observe("translate",function(e){void 0===e?o(""):""===e&&t||(a.translate=e,u()),t=!1}),l)l.hasOwnProperty(n)&&"translateAttr"===n.substr(0,13)&&e(n);if(l.$observe("translateDefault",function(e){i.defaultText=e,u()}),g&&l.$observe("translateValues",function(e){e&&i.$parent.$watch(function(){angular.extend(i.interpolateParams,S(e)(i.$parent))})}),b){var r=function(n){l.$observe(n,function(e){var t=angular.lowercase(n.substr(14,1))+n.substr(15);i.interpolateParams[t]=e})};for(var s in l)Object.prototype.hasOwnProperty.call(l,s)&&"translateValue"===s.substr(0,14)&&"translateValues"!==s&&r(s)}var u=function(){for(var e in a)a.hasOwnProperty(e)&&void 0!==a[e]&&f(e,a[e],i,i.interpolateParams,i.defaultText,i.translateNamespace)},f=function(t,e,n,r,i,a){e?(a&&"."===e.charAt(0)&&(e=a+e),w(e,r,_,i,n.translateLanguage).then(function(e){d(e,n,!0,t)},function(e){d(e,n,!1,t)})):d(e,n,!1,t)},d=function(e,t,n,r){if(n||void 0!==t.defaultText&&(e=t.defaultText),"translate"===r){(n||!n&&void 0===l.translateKeepContent)&&c.empty().append(t.preText+e+t.postText);var i=w.isPostCompilingEnabled(),a=void 0!==m.translateCompile,o=a&&"false"!==m.translateCompile;(i&&!a||o)&&A(c.contents())(t)}else{var s=l.$attr[r];"data-"===s.substr(0,5)&&(s=s.substr(5)),s=s.substr(15),c.attr(s,e)}};(g||b||l.translateDefault)&&i.$watch("interpolateParams",u,!0);var h=i.$on("translateLanguageChanged",u),p=T.$on("$translateChangeSuccess",u);c.text().length?l.translate?o(l.translate):o(""):l.translate&&o(l.translate),u(),i.$on("$destroy",function(){h(),p()})}}}}function x(e){"use strict";return e.translateNamespace?e.translateNamespace:e.$parent?x(e.$parent):void 0}function i(a,o){"use strict";return{compile:function(e){var r=function(){e.addClass(a.cloakClassName())},i=function(){e.removeClass(a.cloakClassName())};return a.onReady(function(){i()}),r(),function(e,t,n){n.translateCloak&&n.translateCloak.length&&(n.$observe("translateCloak",function(e){a(e).then(i,r)}),o.$on("$translateChangeSuccess",function(){a(n.translateCloak).then(i,r)}))}}}}function a(){"use strict";return{restrict:"A",scope:!0,compile:function(){return{pre:function(e,t,n){e.translateNamespace=x(e),e.translateNamespace&&"."===n.translateNamespace.charAt(0)?e.translateNamespace+=n.translateNamespace:e.translateNamespace=n.translateNamespace}}}}}function x(e){"use strict";return e.translateNamespace?e.translateNamespace:e.$parent?x(e.$parent):void 0}function o(){"use strict";return{restrict:"A",scope:!0,compile:function(){return function(t,e,n){n.$observe("translateLanguage",function(e){t.translateLanguage=e}),t.$watch("translateLanguage",function(){t.$broadcast("translateLanguageChanged")})}}}}function s(i,a){"use strict";var e=function(e,t,n,r){return angular.isObject(t)||(t=i(t)(this)),a.instant(e,t,n,r)};return a.statefulFilter()&&(e.$stateful=!0),e}function c(e){"use strict";return e("translations")}return e.$inject=["$translate"],t.$inject=["$STORAGE_KEY","$windowProvider","$translateSanitizationProvider","pascalprechtTranslateOverrider"],n.$inject=["$interpolate","$translateSanitization"],r.$inject=["$translate","$q","$interpolate","$compile","$parse","$rootScope"],i.$inject=["$translate","$rootScope"],s.$inject=["$parse","$translate"],c.$inject=["$cacheFactory"],angular.module("pascalprecht.translate",["ng"]).run(e),e.displayName="runTranslate",angular.module("pascalprecht.translate").provider("$translateSanitization",function(){"use strict";var n,u,f=null,d=!1,h=!1;(u={sanitize:function(e,t){return"text"===t&&(e=i(e)),e},escape:function(e,t){return"text"===t&&(e=r(e)),e},sanitizeParameters:function(e,t){return"params"===t&&(e=a(e,i)),e},escapeParameters:function(e,t){return"params"===t&&(e=a(e,r)),e}}).escaped=u.escapeParameters,this.addStrategy=function(e,t){return u[e]=t,this},this.removeStrategy=function(e){return delete u[e],this},this.useStrategy=function(e){return d=!0,f=e,this},this.$get=["$injector","$log",function(s,c){var t,l={};return s.has("$sanitize")&&(n=s.get("$sanitize")),{useStrategy:(t=this,function(e){t.useStrategy(e)}),sanitize:function(e,t,n){if(f||d||h||(c.warn("pascalprecht.translate.$translateSanitization: No sanitization strategy has been configured. This can have serious security implications. See http://angular-translate.github.io/docs/#/guide/19_security for details."),h=!0),arguments.length<3&&(n=f),!n)return e;var r,i,a,o=angular.isArray(n)?n:[n];return r=e,i=t,a=o,angular.forEach(a,function(t){if(angular.isFunction(t))r=t(r,i);else if(angular.isFunction(u[t]))r=u[t](r,i);else{if(!angular.isString(u[t]))throw new Error("pascalprecht.translate.$translateSanitization: Unknown sanitization strategy: '"+t+"'");if(!l[u[t]])try{l[u[t]]=s.get(u[t])}catch(e){throw l[u[t]]=function(){},new Error("pascalprecht.translate.$translateSanitization: Unknown sanitization strategy: '"+t+"'")}r=l[u[t]](r,i)}}),r}}}];var r=function(e){var t=angular.element("<div></div>");return t.text(e),t.html()},i=function(e){if(!n)throw new Error("pascalprecht.translate.$translateSanitization: Error cannot find $sanitize service. Either include the ngSanitize module (https://docs.angularjs.org/api/ngSanitize) or use a sanitization strategy which does not depend on $sanitize, such as 'escape'.");return n(e)},a=function(e,n,r){if(angular.isObject(e)){var i=angular.isArray(e)?[]:{};if(r){if(-1<r.indexOf(e))throw new Error("pascalprecht.translate.$translateSanitization: Error cannot interpolate parameter due recursive object")}else r=[];return r.push(e),angular.forEach(e,function(e,t){i[t]=a(e,n,r)}),r.splice(-1,1),i}return angular.isNumber(e)?e:n(e)}}),angular.module("pascalprecht.translate").constant("pascalprechtTranslateOverrider",{}).provider("$translate",t),t.displayName="displayName",angular.module("pascalprecht.translate").factory("$translateDefaultInterpolation",n),n.displayName="$translateDefaultInterpolation",angular.module("pascalprecht.translate").constant("$STORAGE_KEY","NG_TRANSLATE_LANG_KEY"),angular.module("pascalprecht.translate").directive("translate",r),r.displayName="translateDirective",angular.module("pascalprecht.translate").directive("translateCloak",i),i.displayName="translateCloakDirective",angular.module("pascalprecht.translate").directive("translateNamespace",a),a.displayName="translateNamespaceDirective",angular.module("pascalprecht.translate").directive("translateLanguage",o),o.displayName="translateLanguageDirective",angular.module("pascalprecht.translate").filter("translate",s),s.displayName="translateFilterFactory",angular.module("pascalprecht.translate").factory("$translationCache",c),c.displayName="$translationCache","pascalprecht.translate"}),function(e,t){"function"==typeof define&&define.amd?define([],function(){return t()}):"object"==typeof exports?module.exports=t():t()}(0,function(){function e(){"use strict";function r(e,t){this.name=e,this.isActive=!0,this.tables={},this.priority=t||0}r.prototype.parseUrl=function(e,t){return angular.isFunction(e)?e(this.name,t):e.replace(/\{part\}/g,this.name).replace(/\{lang\}/g,t)},r.prototype.getTable=function(t,e,n,r,i,a){if(this.tables[t])return e.when(this.tables[t]);var o=this;return n(angular.extend({method:"GET",url:this.parseUrl(i,t)},r)).then(function(e){return o.tables[t]=e.data,e.data},function(){return a?a(o.name,t).then(function(e){return o.tables[t]=e},function(){return e.reject(o.name)}):e.reject(o.name)})};var l={};function u(e){return Object.prototype.hasOwnProperty.call(l,e)}function f(e){return angular.isString(e)&&""!==e}function e(e){if(!f(e))throw new TypeError("Invalid type of a first argument, a non-empty string expected.");return u(e)&&l[e].isActive}function d(){var e=[];for(var t in l)l[t].isActive&&e.push(l[t]);return e.sort(function(e,t){return e.priority-t.priority}),e}this.addPart=function(e,t){if(!f(e))throw new TypeError("Couldn't add part, part name has to be a string!");return u(e)||(l[e]=new r(e,t)),l[e].isActive=!0,this},this.setPart=function(e,t,n){if(!f(e))throw new TypeError("Couldn't set part.`lang` parameter has to be a string!");if(!f(t))throw new TypeError("Couldn't set part.`part` parameter has to be a string!");if("object"!=typeof n||null===n)throw new TypeError("Couldn't set part. `table` parameter has to be an object!");return u(t)||(l[t]=new r(t),l[t].isActive=!1),l[t].tables[e]=n,this},this.deletePart=function(e){if(!f(e))throw new TypeError("Couldn't delete part, first arg has to be string.");return u(e)&&(l[e].isActive=!1),this},this.isPartAvailable=e,this.$get=["$rootScope","$injector","$q","$http",function(i,a,o,s){var c=function(n){if(!f(n.key))throw new TypeError("Unable to load data, a key is not a non-empty string.");if(!f(n.urlTemplate)&&!angular.isFunction(n.urlTemplate))throw new TypeError("Unable to load data, a urlTemplate is not a non-empty string or not a function.");var t=n.loadFailureHandler;if(void 0!==t){if(!angular.isString(t))throw new Error("Unable to load data, a loadFailureHandler is not a string.");t=a.get(t)}var r=[],e=d();return angular.forEach(e,function(e){r.push(e.getTable(n.key,o,s,n.$http,n.urlTemplate,t)),e.urlTemplate=n.urlTemplate}),o.all(r).then(function(){var t={};return e=d(),angular.forEach(e,function(e){!function e(t,n){for(var r in n)n[r]&&n[r].constructor&&n[r].constructor===Object?(t[r]=t[r]||{},e(t[r],n[r])):t[r]=n[r];return t}(t,e.tables[n.key])}),t},function(){return o.reject(n.key)})};return c.addPart=function(e,t){if(!f(e))throw new TypeError("Couldn't add part, first arg has to be a string");return u(e)?l[e].isActive||(l[e].isActive=!0,i.$emit("$translatePartialLoaderStructureChanged",e)):(l[e]=new r(e,t),i.$emit("$translatePartialLoaderStructureChanged",e)),c},c.deletePart=function(n,e){if(!f(n))throw new TypeError("Couldn't delete part, first arg has to be string");if(void 0===e)e=!1;else if("boolean"!=typeof e)throw new TypeError("Invalid type of a second argument, a boolean expected.");if(u(n)){var t=l[n].isActive;if(e){var r=a.get("$translate").loaderCache();"string"==typeof r&&(r=a.get(r)),"object"==typeof r&&angular.forEach(l[n].tables,function(e,t){r.remove(l[n].parseUrl(l[n].urlTemplate,t))}),delete l[n]}else l[n].isActive=!1;t&&i.$emit("$translatePartialLoaderStructureChanged",n)}return c},c.isPartLoaded=function(e,t){return angular.isDefined(l[e])&&angular.isDefined(l[e].tables[t])},c.getRegisteredParts=function(){var t=[];return angular.forEach(l,function(e){e.isActive&&t.push(e.name)}),t},c.isPartAvailable=e,c}]}return angular.module("pascalprecht.translate").provider("$translatePartialLoader",e),e.displayName="$translatePartialLoader","pascalprecht.translate"}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.moment=t()}(this,function(){"use strict";var e,r;function d(){return e.apply(null,arguments)}function s(e){return e instanceof Array||"[object Array]"===Object.prototype.toString.call(e)}function c(e){return e instanceof Date||"[object Date]"===Object.prototype.toString.call(e)}function l(e,t){var n,r=[];for(n=0;n<e.length;++n)r.push(t(e[n],n));return r}function h(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function u(e,t){for(var n in t)h(t,n)&&(e[n]=t[n]);return h(t,"toString")&&(e.toString=t.toString),h(t,"valueOf")&&(e.valueOf=t.valueOf),e}function f(e,t,n,r){return st(e,t,n,r,!0).utc()}function p(e){return null==e._pf&&(e._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null}),e._pf}function m(e){if(null==e._isValid){var t=p(e),n=r.call(t.parsedDateParts,function(e){return null!=e});e._isValid=!isNaN(e._d.getTime())&&t.overflow<0&&!t.empty&&!t.invalidMonth&&!t.invalidWeekday&&!t.nullInput&&!t.invalidFormat&&!t.userInvalidated&&(!t.meridiem||t.meridiem&&n),e._strict&&(e._isValid=e._isValid&&0===t.charsLeftOver&&0===t.unusedTokens.length&&void 0===t.bigHour)}return e._isValid}function g(e){var t=f(NaN);return null!=e?u(p(t),e):p(t).userInvalidated=!0,t}function a(e){return void 0===e}r=Array.prototype.some?Array.prototype.some:function(e){for(var t=Object(this),n=t.length>>>0,r=0;r<n;r++)if(r in t&&e.call(this,t[r],r,t))return!0;return!1};var o=d.momentProperties=[];function _(e,t){var n,r,i;if(a(t._isAMomentObject)||(e._isAMomentObject=t._isAMomentObject),a(t._i)||(e._i=t._i),a(t._f)||(e._f=t._f),a(t._l)||(e._l=t._l),a(t._strict)||(e._strict=t._strict),a(t._tzm)||(e._tzm=t._tzm),a(t._isUTC)||(e._isUTC=t._isUTC),a(t._offset)||(e._offset=t._offset),a(t._pf)||(e._pf=p(t)),a(t._locale)||(e._locale=t._locale),0<o.length)for(n in o)a(i=t[r=o[n]])||(e[r]=i);return e}var t=!1;function b(e){_(this,e),this._d=new Date(null!=e._d?e._d.getTime():NaN),!1===t&&(t=!0,d.updateOffset(this),t=!1)}function v(e){return e instanceof b||null!=e&&null!=e._isAMomentObject}function y(e){return e<0?Math.ceil(e):Math.floor(e)}function w(e){var t=+e,n=0;return 0!==t&&isFinite(t)&&(n=y(t)),n}function C(e,t,n){var r,i=Math.min(e.length,t.length),a=Math.abs(e.length-t.length),o=0;for(r=0;r<i;r++)(n&&e[r]!==t[r]||!n&&w(e[r])!==w(t[r]))&&o++;return o+a}function i(e){!1===d.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+e)}function n(e,t){var n=!0;return u(function(){return null!=d.deprecationHandler&&d.deprecationHandler(null,e),n&&(i(e+"\nArguments: "+Array.prototype.slice.call(arguments).join(", ")+"\n"+(new Error).stack),n=!1),t.apply(this,arguments)},t)}var A,S={};function T(e,t){null!=d.deprecationHandler&&d.deprecationHandler(e,t),S[e]||(i(t),S[e]=!0)}function x(e){return e instanceof Function||"[object Function]"===Object.prototype.toString.call(e)}function k(e){return"[object Object]"===Object.prototype.toString.call(e)}function E(e,t){var n,r=u({},e);for(n in t)h(t,n)&&(k(e[n])&&k(t[n])?(r[n]={},u(r[n],e[n]),u(r[n],t[n])):null!=t[n]?r[n]=t[n]:delete r[n]);return r}function D(e){null!=e&&this.set(e)}d.suppressDeprecationWarnings=!1,d.deprecationHandler=null,A=Object.keys?Object.keys:function(e){var t,n=[];for(t in e)h(e,t)&&n.push(t);return n};var I,P={};function M(e){return e?e.toLowerCase().replace("_","-"):e}function $(e){var t=null;if(!P[e]&&"undefined"!=typeof module&&module&&module.exports)try{t=I._abbr,require("./locale/"+e),O(t)}catch(e){}return P[e]}function O(e,t){var n;return e&&(n=a(t)?N(e):R(e,t))&&(I=n),I._abbr}function R(e,t){return null!==t?(t.abbr=e,null!=P[e]?(T("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale"),t=E(P[e]._config,t)):null!=t.parentLocale&&(null!=P[t.parentLocale]?t=E(P[t.parentLocale]._config,t):T("parentLocaleUndefined","specified parentLocale is not defined yet")),P[e]=new D(t),O(e),P[e]):(delete P[e],null)}function N(e){var t;if(e&&e._locale&&e._locale._abbr&&(e=e._locale._abbr),!e)return I;if(!s(e)){if(t=$(e))return t;e=[e]}return function(e){for(var t,n,r,i,a=0;a<e.length;){for(t=(i=M(e[a]).split("-")).length,n=(n=M(e[a+1]))?n.split("-"):null;0<t;){if(r=$(i.slice(0,t).join("-")))return r;if(n&&n.length>=t&&C(i,n,!0)>=t-1)break;t--}a++}return null}(e)}var L={};function F(e,t){var n=e.toLowerCase();L[n]=L[n+"s"]=L[t]=e}function G(e){return"string"==typeof e?L[e]||L[e.toLowerCase()]:void 0}function j(e){var t,n,r={};for(n in e)h(e,n)&&(t=G(n))&&(r[t]=e[n]);return r}function B(t,n){return function(e){return null!=e?(H(this,t,e),d.updateOffset(this,n),this):U(this,t)}}function U(e,t){return e.isValid()?e._d["get"+(e._isUTC?"UTC":"")+t]():NaN}function H(e,t,n){e.isValid()&&e._d["set"+(e._isUTC?"UTC":"")+t](n)}function W(e,t){var n;if("object"==typeof e)for(n in e)this.set(n,e[n]);else if(x(this[e=G(e)]))return this[e](t);return this}function q(e,t,n){var r=""+Math.abs(e),i=t-r.length;return(0<=e?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var z=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,V=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Y={},K={};function Q(e,t,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),e&&(K[e]=i),t&&(K[t[0]]=function(){return q(i.apply(this,arguments),t[1],t[2])}),n&&(K[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),e)})}function X(e,t){return e.isValid()?(t=Z(t,e.localeData()),Y[t]=Y[t]||function(r){var e,i,t,a=r.match(z);for(e=0,i=a.length;e<i;e++)K[a[e]]?a[e]=K[a[e]]:a[e]=(t=a[e]).match(/\[[\s\S]/)?t.replace(/^\[|\]$/g,""):t.replace(/\\/g,"");return function(e){var t,n="";for(t=0;t<i;t++)n+=a[t]instanceof Function?a[t].call(e,r):a[t];return n}}(t),Y[t](e)):e.localeData().invalidDate()}function Z(e,t){var n=5;function r(e){return t.longDateFormat(e)||e}for(V.lastIndex=0;0<=n&&V.test(e);)e=e.replace(V,r),V.lastIndex=0,n-=1;return e}var J=/\d/,ee=/\d\d/,te=/\d{3}/,ne=/\d{4}/,re=/[+-]?\d{6}/,ie=/\d\d?/,ae=/\d\d\d\d?/,oe=/\d\d\d\d\d\d?/,se=/\d{1,3}/,ce=/\d{1,4}/,le=/[+-]?\d{1,6}/,ue=/\d+/,fe=/[+-]?\d+/,de=/Z|[+-]\d\d:?\d\d/gi,he=/Z|[+-]\d\d(?::?\d\d)?/gi,pe=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,me={};function ge(e,n,r){me[e]=x(n)?n:function(e,t){return e&&r?r:n}}function _e(e,t){return h(me,e)?me[e](t._strict,t._locale):new RegExp(be(e.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(e,t,n,r,i){return t||n||r||i})))}function be(e){return e.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var ve={};function ye(e,n){var t,r=n;for("string"==typeof e&&(e=[e]),"number"==typeof n&&(r=function(e,t){t[n]=w(e)}),t=0;t<e.length;t++)ve[e[t]]=r}function we(e,i){ye(e,function(e,t,n,r){n._w=n._w||{},i(e,n._w,n,r)})}var Ce,Ae=0,Se=1,Te=2,xe=3,ke=4,Ee=5,De=6,Ie=7,Pe=8;function Me(e,t){return new Date(Date.UTC(e,t+1,0)).getUTCDate()}Ce=Array.prototype.indexOf?Array.prototype.indexOf:function(e){var t;for(t=0;t<this.length;++t)if(this[t]===e)return t;return-1},Q("M",["MM",2],"Mo",function(){return this.month()+1}),Q("MMM",0,0,function(e){return this.localeData().monthsShort(this,e)}),Q("MMMM",0,0,function(e){return this.localeData().months(this,e)}),F("month","M"),ge("M",ie),ge("MM",ie,ee),ge("MMM",function(e,t){return t.monthsShortRegex(e)}),ge("MMMM",function(e,t){return t.monthsRegex(e)}),ye(["M","MM"],function(e,t){t[Se]=w(e)-1}),ye(["MMM","MMMM"],function(e,t,n,r){var i=n._locale.monthsParse(e,r,n._strict);null!=i?t[Se]=i:p(n).invalidMonth=e});var $e=/D[oD]?(\[[^\[\]]*\]|\s+)+MMMM?/,Oe="January_February_March_April_May_June_July_August_September_October_November_December".split("_");var Re="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function Ne(e,t){var n;if(!e.isValid())return e;if("string"==typeof t)if(/^\d+$/.test(t))t=w(t);else if("number"!=typeof(t=e.localeData().monthsParse(t)))return e;return n=Math.min(e.date(),Me(e.year(),t)),e._d["set"+(e._isUTC?"UTC":"")+"Month"](t,n),e}function Le(e){return null!=e?(Ne(this,e),d.updateOffset(this,!0),this):U(this,"Month")}var Fe=pe;var Ge=pe;function je(){function e(e,t){return t.length-e.length}var t,n,r=[],i=[],a=[];for(t=0;t<12;t++)n=f([2e3,t]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(e),i.sort(e),a.sort(e),t=0;t<12;t++)r[t]=be(r[t]),i[t]=be(i[t]),a[t]=be(a[t]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Be(e){var t,n=e._a;return n&&-2===p(e).overflow&&(t=n[Se]<0||11<n[Se]?Se:n[Te]<1||n[Te]>Me(n[Ae],n[Se])?Te:n[xe]<0||24<n[xe]||24===n[xe]&&(0!==n[ke]||0!==n[Ee]||0!==n[De])?xe:n[ke]<0||59<n[ke]?ke:n[Ee]<0||59<n[Ee]?Ee:n[De]<0||999<n[De]?De:-1,p(e)._overflowDayOfYear&&(t<Ae||Te<t)&&(t=Te),p(e)._overflowWeeks&&-1===t&&(t=Ie),p(e)._overflowWeekday&&-1===t&&(t=Pe),p(e).overflow=t),e}var Ue=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,He=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?/,We=/Z|[+-]\d\d(?::?\d\d)?/,qe=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],ze=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],Ve=/^\/?Date\((\-?\d+)/i;function Ye(e){var t,n,r,i,a,o,s=e._i,c=Ue.exec(s)||He.exec(s);if(c){for(p(e).iso=!0,t=0,n=qe.length;t<n;t++)if(qe[t][1].exec(c[1])){i=qe[t][0],r=!1!==qe[t][2];break}if(null==i)return void(e._isValid=!1);if(c[3]){for(t=0,n=ze.length;t<n;t++)if(ze[t][1].exec(c[3])){a=(c[2]||" ")+ze[t][0];break}if(null==a)return void(e._isValid=!1)}if(!r&&null!=a)return void(e._isValid=!1);if(c[4]){if(!We.exec(c[4]))return void(e._isValid=!1);o="Z"}e._f=i+(a||"")+(o||""),at(e)}else e._isValid=!1}function Ke(e){var t=new Date(Date.UTC.apply(null,arguments));return e<100&&0<=e&&isFinite(t.getUTCFullYear())&&t.setUTCFullYear(e),t}function Qe(e){return Xe(e)?366:365}function Xe(e){return e%4==0&&e%100!=0||e%400==0}d.createFromInputFallback=n("moment construction falls back to js Date. This is discouraged and will be removed in upcoming major release. Please refer to https://github.com/moment/moment/issues/1407 for more info.",function(e){e._d=new Date(e._i+(e._useUTC?" UTC":""))}),Q("Y",0,0,function(){var e=this.year();return e<=9999?""+e:"+"+e}),Q(0,["YY",2],0,function(){return this.year()%100}),Q(0,["YYYY",4],0,"year"),Q(0,["YYYYY",5],0,"year"),Q(0,["YYYYYY",6,!0],0,"year"),F("year","y"),ge("Y",fe),ge("YY",ie,ee),ge("YYYY",ce,ne),ge("YYYYY",le,re),ge("YYYYYY",le,re),ye(["YYYYY","YYYYYY"],Ae),ye("YYYY",function(e,t){t[Ae]=2===e.length?d.parseTwoDigitYear(e):w(e)}),ye("YY",function(e,t){t[Ae]=d.parseTwoDigitYear(e)}),ye("Y",function(e,t){t[Ae]=parseInt(e,10)}),d.parseTwoDigitYear=function(e){return w(e)+(68<w(e)?1900:2e3)};var Ze=B("FullYear",!0);function Je(e,t,n){var r=7+t-n;return-((7+Ke(e,0,r).getUTCDay()-t)%7)+r-1}function et(e,t,n,r,i){var a,o,s=1+7*(t-1)+(7+n-r)%7+Je(e,r,i);return o=s<=0?Qe(a=e-1)+s:s>Qe(e)?(a=e+1,s-Qe(e)):(a=e,s),{year:a,dayOfYear:o}}function tt(e,t,n){var r,i,a=Je(e.year(),t,n),o=Math.floor((e.dayOfYear()-a-1)/7)+1;return o<1?r=o+nt(i=e.year()-1,t,n):o>nt(e.year(),t,n)?(r=o-nt(e.year(),t,n),i=e.year()+1):(i=e.year(),r=o),{week:r,year:i}}function nt(e,t,n){var r=Je(e,t,n),i=Je(e+1,t,n);return(Qe(e)-r+i)/7}function rt(e,t,n){return null!=e?e:null!=t?t:n}function it(e){var t,n,r,i,a=[];if(!e._d){var o,s;for(o=e,s=new Date(d.now()),r=o._useUTC?[s.getUTCFullYear(),s.getUTCMonth(),s.getUTCDate()]:[s.getFullYear(),s.getMonth(),s.getDate()],e._w&&null==e._a[Te]&&null==e._a[Se]&&function(e){var t,n,r,i,a,o,s,c;null!=(t=e._w).GG||null!=t.W||null!=t.E?(a=1,o=4,n=rt(t.GG,e._a[Ae],tt(ct(),1,4).year),r=rt(t.W,1),((i=rt(t.E,1))<1||7<i)&&(c=!0)):(a=e._locale._week.dow,o=e._locale._week.doy,n=rt(t.gg,e._a[Ae],tt(ct(),a,o).year),r=rt(t.w,1),null!=t.d?((i=t.d)<0||6<i)&&(c=!0):null!=t.e?(i=t.e+a,(t.e<0||6<t.e)&&(c=!0)):i=a);r<1||r>nt(n,a,o)?p(e)._overflowWeeks=!0:null!=c?p(e)._overflowWeekday=!0:(s=et(n,r,i,a,o),e._a[Ae]=s.year,e._dayOfYear=s.dayOfYear)}(e),e._dayOfYear&&(i=rt(e._a[Ae],r[Ae]),e._dayOfYear>Qe(i)&&(p(e)._overflowDayOfYear=!0),n=Ke(i,0,e._dayOfYear),e._a[Se]=n.getUTCMonth(),e._a[Te]=n.getUTCDate()),t=0;t<3&&null==e._a[t];++t)e._a[t]=a[t]=r[t];for(;t<7;t++)e._a[t]=a[t]=null==e._a[t]?2===t?1:0:e._a[t];24===e._a[xe]&&0===e._a[ke]&&0===e._a[Ee]&&0===e._a[De]&&(e._nextDay=!0,e._a[xe]=0),e._d=(e._useUTC?Ke:function(e,t,n,r,i,a,o){var s=new Date(e,t,n,r,i,a,o);return e<100&&0<=e&&isFinite(s.getFullYear())&&s.setFullYear(e),s}).apply(null,a),null!=e._tzm&&e._d.setUTCMinutes(e._d.getUTCMinutes()-e._tzm),e._nextDay&&(e._a[xe]=24)}}function at(e){if(e._f!==d.ISO_8601){e._a=[],p(e).empty=!0;var t,n,r,i,a,o,s,c,l=""+e._i,u=l.length,f=0;for(r=Z(e._f,e._locale).match(z)||[],t=0;t<r.length;t++)i=r[t],(n=(l.match(_e(i,e))||[])[0])&&(0<(a=l.substr(0,l.indexOf(n))).length&&p(e).unusedInput.push(a),l=l.slice(l.indexOf(n)+n.length),f+=n.length),K[i]?(n?p(e).empty=!1:p(e).unusedTokens.push(i),o=i,c=e,null!=(s=n)&&h(ve,o)&&ve[o](s,c._a,c,o)):e._strict&&!n&&p(e).unusedTokens.push(i);p(e).charsLeftOver=u-f,0<l.length&&p(e).unusedInput.push(l),!0===p(e).bigHour&&e._a[xe]<=12&&0<e._a[xe]&&(p(e).bigHour=void 0),p(e).parsedDateParts=e._a.slice(0),p(e).meridiem=e._meridiem,e._a[xe]=function(e,t,n){var r;if(null==n)return t;return null!=e.meridiemHour?e.meridiemHour(t,n):(null!=e.isPM&&((r=e.isPM(n))&&t<12&&(t+=12),r||12!==t||(t=0)),t)}(e._locale,e._a[xe],e._meridiem),it(e),Be(e)}else Ye(e)}function ot(e){var t,n,r,i,a=e._i,o=e._f;return e._locale=e._locale||N(e._l),null===a||void 0===o&&""===a?g({nullInput:!0}):("string"==typeof a&&(e._i=a=e._locale.preparse(a)),v(a)?new b(Be(a)):(s(o)?function(e){var t,n,r,i,a;if(0===e._f.length)return p(e).invalidFormat=!0,e._d=new Date(NaN);for(i=0;i<e._f.length;i++)a=0,t=_({},e),null!=e._useUTC&&(t._useUTC=e._useUTC),t._f=e._f[i],at(t),m(t)&&(a+=p(t).charsLeftOver,a+=10*p(t).unusedTokens.length,p(t).score=a,(null==r||a<r)&&(r=a,n=t));u(e,n||t)}(e):o?at(e):c(a)?e._d=a:void 0===(n=(t=e)._i)?t._d=new Date(d.now()):c(n)?t._d=new Date(n.valueOf()):"string"==typeof n?(r=t,null===(i=Ve.exec(r._i))?(Ye(r),!1===r._isValid&&(delete r._isValid,d.createFromInputFallback(r))):r._d=new Date(+i[1])):s(n)?(t._a=l(n.slice(0),function(e){return parseInt(e,10)}),it(t)):"object"==typeof n?function(e){if(!e._d){var t=j(e._i);e._a=l([t.year,t.month,t.day||t.date,t.hour,t.minute,t.second,t.millisecond],function(e){return e&&parseInt(e,10)}),it(e)}}(t):"number"==typeof n?t._d=new Date(n):d.createFromInputFallback(t),m(e)||(e._d=null),e))}function st(e,t,n,r,i){var a,o={};return"boolean"==typeof n&&(r=n,n=void 0),o._isAMomentObject=!0,o._useUTC=o._isUTC=i,o._l=n,o._i=e,o._f=t,o._strict=r,(a=new b(Be(ot(o))))._nextDay&&(a.add(1,"d"),a._nextDay=void 0),a}function ct(e,t,n,r){return st(e,t,n,r,!1)}d.ISO_8601=function(){};var lt=n("moment().min is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(){var e=ct.apply(null,arguments);return this.isValid()&&e.isValid()?e<this?this:e:g()}),ut=n("moment().max is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(){var e=ct.apply(null,arguments);return this.isValid()&&e.isValid()?this<e?this:e:g()});function ft(e,t){var n,r;if(1===t.length&&s(t[0])&&(t=t[0]),!t.length)return ct();for(n=t[0],r=1;r<t.length;++r)t[r].isValid()&&!t[r][e](n)||(n=t[r]);return n}function dt(e){var t=j(e),n=t.year||0,r=t.quarter||0,i=t.month||0,a=t.week||0,o=t.day||0,s=t.hour||0,c=t.minute||0,l=t.second||0,u=t.millisecond||0;this._milliseconds=+u+1e3*l+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=N(),this._bubble()}function ht(e){return e instanceof dt}function pt(e,n){Q(e,0,0,function(){var e=this.utcOffset(),t="+";return e<0&&(e=-e,t="-"),t+q(~~(e/60),2)+n+q(~~e%60,2)})}pt("Z",":"),pt("ZZ",""),ge("Z",he),ge("ZZ",he),ye(["Z","ZZ"],function(e,t,n){n._useUTC=!0,n._tzm=gt(he,e)});var mt=/([\+\-]|\d\d)/gi;function gt(e,t){var n=(t||"").match(e)||[],r=((n[n.length-1]||[])+"").match(mt)||["-",0,0],i=60*r[1]+w(r[2]);return"+"===r[0]?i:-i}function _t(e,t){var n,r;return t._isUTC?(n=t.clone(),r=(v(e)||c(e)?e.valueOf():ct(e).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),d.updateOffset(n,!1),n):ct(e).local()}function bt(e){return 15*-Math.round(e._d.getTimezoneOffset()/15)}function vt(){return!!this.isValid()&&(this._isUTC&&0===this._offset)}d.updateOffset=function(){};var yt=/^(\-)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?\d*)?$/,wt=/^(-)?P(?:(-?[0-9,.]*)Y)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)W)?(?:(-?[0-9,.]*)D)?(?:T(?:(-?[0-9,.]*)H)?(?:(-?[0-9,.]*)M)?(?:(-?[0-9,.]*)S)?)?$/;function Ct(e,t){var n,r,i,a=e,o=null;return ht(e)?a={ms:e._milliseconds,d:e._days,M:e._months}:"number"==typeof e?(a={},t?a[t]=e:a.milliseconds=e):(o=yt.exec(e))?(n="-"===o[1]?-1:1,a={y:0,d:w(o[Te])*n,h:w(o[xe])*n,m:w(o[ke])*n,s:w(o[Ee])*n,ms:w(o[De])*n}):(o=wt.exec(e))?(n="-"===o[1]?-1:1,a={y:At(o[2],n),M:At(o[3],n),w:At(o[4],n),d:At(o[5],n),h:At(o[6],n),m:At(o[7],n),s:At(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(e,t){var n;if(!e.isValid()||!t.isValid())return{milliseconds:0,months:0};t=_t(t,e),e.isBefore(t)?n=St(e,t):((n=St(t,e)).milliseconds=-n.milliseconds,n.months=-n.months);return n}(ct(a.from),ct(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new dt(a),ht(e)&&h(e,"_locale")&&(r._locale=e._locale),r}function At(e,t){var n=e&&parseFloat(e.replace(",","."));return(isNaN(n)?0:n)*t}function St(e,t){var n={milliseconds:0,months:0};return n.months=t.month()-e.month()+12*(t.year()-e.year()),e.clone().add(n.months,"M").isAfter(t)&&--n.months,n.milliseconds=+t-+e.clone().add(n.months,"M"),n}function Tt(e){return e<0?-1*Math.round(-1*e):Math.round(e)}function xt(r,i){return function(e,t){var n;return null===t||isNaN(+t)||(T(i,"moment()."+i+"(period, number) is deprecated. Please use moment()."+i+"(number, period)."),n=e,e=t,t=n),kt(this,Ct(e="string"==typeof e?+e:e,t),r),this}}function kt(e,t,n,r){var i=t._milliseconds,a=Tt(t._days),o=Tt(t._months);e.isValid()&&(r=null==r||r,i&&e._d.setTime(e._d.valueOf()+i*n),a&&H(e,"Date",U(e,"Date")+a*n),o&&Ne(e,U(e,"Month")+o*n),r&&d.updateOffset(e,a||o))}Ct.fn=dt.prototype;var Et=xt(1,"add"),Dt=xt(-1,"subtract");function It(e){var t;return void 0===e?this._locale._abbr:(null!=(t=N(e))&&(this._locale=t),this)}d.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",d.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Pt=n("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(e){return void 0===e?this.localeData():this.locale(e)});function Mt(){return this._locale}function $t(e,t){Q(0,[e,e.length],0,t)}function Ot(e,t,n,r,i){var a;return null==e?tt(this,r,i).year:((a=nt(e,r,i))<t&&(t=a),function(e,t,n,r,i){var a=et(e,t,n,r,i),o=Ke(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,e,t,n,r,i))}Q(0,["gg",2],0,function(){return this.weekYear()%100}),Q(0,["GG",2],0,function(){return this.isoWeekYear()%100}),$t("gggg","weekYear"),$t("ggggg","weekYear"),$t("GGGG","isoWeekYear"),$t("GGGGG","isoWeekYear"),F("weekYear","gg"),F("isoWeekYear","GG"),ge("G",fe),ge("g",fe),ge("GG",ie,ee),ge("gg",ie,ee),ge("GGGG",ce,ne),ge("gggg",ce,ne),ge("GGGGG",le,re),ge("ggggg",le,re),we(["gggg","ggggg","GGGG","GGGGG"],function(e,t,n,r){t[r.substr(0,2)]=w(e)}),we(["gg","GG"],function(e,t,n,r){t[r]=d.parseTwoDigitYear(e)}),Q("Q",0,"Qo","quarter"),F("quarter","Q"),ge("Q",J),ye("Q",function(e,t){t[Se]=3*(w(e)-1)}),Q("w",["ww",2],"wo","week"),Q("W",["WW",2],"Wo","isoWeek"),F("week","w"),F("isoWeek","W"),ge("w",ie),ge("ww",ie,ee),ge("W",ie),ge("WW",ie,ee),we(["w","ww","W","WW"],function(e,t,n,r){t[r.substr(0,1)]=w(e)});Q("D",["DD",2],"Do","date"),F("date","D"),ge("D",ie),ge("DD",ie,ee),ge("Do",function(e,t){return e?t._ordinalParse:t._ordinalParseLenient}),ye(["D","DD"],Te),ye("Do",function(e,t){t[Te]=w(e.match(ie)[0])});var Rt=B("Date",!0);Q("d",0,"do","day"),Q("dd",0,0,function(e){return this.localeData().weekdaysMin(this,e)}),Q("ddd",0,0,function(e){return this.localeData().weekdaysShort(this,e)}),Q("dddd",0,0,function(e){return this.localeData().weekdays(this,e)}),Q("e",0,0,"weekday"),Q("E",0,0,"isoWeekday"),F("day","d"),F("weekday","e"),F("isoWeekday","E"),ge("d",ie),ge("e",ie),ge("E",ie),ge("dd",function(e,t){return t.weekdaysMinRegex(e)}),ge("ddd",function(e,t){return t.weekdaysShortRegex(e)}),ge("dddd",function(e,t){return t.weekdaysRegex(e)}),we(["dd","ddd","dddd"],function(e,t,n,r){var i=n._locale.weekdaysParse(e,r,n._strict);null!=i?t.d=i:p(n).invalidWeekday=e}),we(["d","e","E"],function(e,t,n,r){t[r]=w(e)});var Nt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_");var Lt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_");var Ft="Su_Mo_Tu_We_Th_Fr_Sa".split("_");var Gt=pe;var jt=pe;var Bt=pe;function Ut(){function e(e,t){return t.length-e.length}var t,n,r,i,a,o=[],s=[],c=[],l=[];for(t=0;t<7;t++)n=f([2e3,1]).day(t),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),c.push(a),l.push(r),l.push(i),l.push(a);for(o.sort(e),s.sort(e),c.sort(e),l.sort(e),t=0;t<7;t++)s[t]=be(s[t]),c[t]=be(c[t]),l[t]=be(l[t]);this._weekdaysRegex=new RegExp("^("+l.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Ht(){return this.hours()%12||12}function Wt(e,t){Q(e,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),t)})}function qt(e,t){return t._meridiemParse}Q("DDD",["DDDD",3],"DDDo","dayOfYear"),F("dayOfYear","DDD"),ge("DDD",se),ge("DDDD",te),ye(["DDD","DDDD"],function(e,t,n){n._dayOfYear=w(e)}),Q("H",["HH",2],0,"hour"),Q("h",["hh",2],0,Ht),Q("k",["kk",2],0,function(){return this.hours()||24}),Q("hmm",0,0,function(){return""+Ht.apply(this)+q(this.minutes(),2)}),Q("hmmss",0,0,function(){return""+Ht.apply(this)+q(this.minutes(),2)+q(this.seconds(),2)}),Q("Hmm",0,0,function(){return""+this.hours()+q(this.minutes(),2)}),Q("Hmmss",0,0,function(){return""+this.hours()+q(this.minutes(),2)+q(this.seconds(),2)}),Wt("a",!0),Wt("A",!1),F("hour","h"),ge("a",qt),ge("A",qt),ge("H",ie),ge("h",ie),ge("HH",ie,ee),ge("hh",ie,ee),ge("hmm",ae),ge("hmmss",oe),ge("Hmm",ae),ge("Hmmss",oe),ye(["H","HH"],xe),ye(["a","A"],function(e,t,n){n._isPm=n._locale.isPM(e),n._meridiem=e}),ye(["h","hh"],function(e,t,n){t[xe]=w(e),p(n).bigHour=!0}),ye("hmm",function(e,t,n){var r=e.length-2;t[xe]=w(e.substr(0,r)),t[ke]=w(e.substr(r)),p(n).bigHour=!0}),ye("hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[xe]=w(e.substr(0,r)),t[ke]=w(e.substr(r,2)),t[Ee]=w(e.substr(i)),p(n).bigHour=!0}),ye("Hmm",function(e,t,n){var r=e.length-2;t[xe]=w(e.substr(0,r)),t[ke]=w(e.substr(r))}),ye("Hmmss",function(e,t,n){var r=e.length-4,i=e.length-2;t[xe]=w(e.substr(0,r)),t[ke]=w(e.substr(r,2)),t[Ee]=w(e.substr(i))});var zt=B("Hours",!0);Q("m",["mm",2],0,"minute"),F("minute","m"),ge("m",ie),ge("mm",ie,ee),ye(["m","mm"],ke);var Vt=B("Minutes",!1);Q("s",["ss",2],0,"second"),F("second","s"),ge("s",ie),ge("ss",ie,ee),ye(["s","ss"],Ee);var Yt,Kt=B("Seconds",!1);for(Q("S",0,0,function(){return~~(this.millisecond()/100)}),Q(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Q(0,["SSS",3],0,"millisecond"),Q(0,["SSSS",4],0,function(){return 10*this.millisecond()}),Q(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),Q(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),Q(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),Q(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),Q(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),F("millisecond","ms"),ge("S",se,J),ge("SS",se,ee),ge("SSS",se,te),Yt="SSSS";Yt.length<=9;Yt+="S")ge(Yt,ue);function Qt(e,t){t[De]=w(1e3*("0."+e))}for(Yt="S";Yt.length<=9;Yt+="S")ye(Yt,Qt);var Xt=B("Milliseconds",!1);Q("z",0,0,"zoneAbbr"),Q("zz",0,0,"zoneName");var Zt=b.prototype;Zt.add=Et,Zt.calendar=function(e,t){var n=e||ct(),r=_t(n,this).startOf("day"),i=this.diff(r,"days",!0),a=i<-6?"sameElse":i<-1?"lastWeek":i<0?"lastDay":i<1?"sameDay":i<2?"nextDay":i<7?"nextWeek":"sameElse",o=t&&(x(t[a])?t[a]():t[a]);return this.format(o||this.localeData().calendar(a,this,ct(n)))},Zt.clone=function(){return new b(this)},Zt.diff=function(e,t,n){var r,i,a,o;return this.isValid()&&(r=_t(e,this)).isValid()?(i=6e4*(r.utcOffset()-this.utcOffset()),"year"===(t=G(t))||"month"===t||"quarter"===t?(s=this,c=r,f=12*(c.year()-s.year())+(c.month()-s.month()),d=s.clone().add(f,"months"),u=c-d<0?(l=s.clone().add(f-1,"months"),(c-d)/(d-l)):(l=s.clone().add(f+1,"months"),(c-d)/(l-d)),o=-(f+u)||0,"quarter"===t?o/=3:"year"===t&&(o/=12)):(a=this-r,o="second"===t?a/1e3:"minute"===t?a/6e4:"hour"===t?a/36e5:"day"===t?(a-i)/864e5:"week"===t?(a-i)/6048e5:a),n?o:y(o)):NaN;var s,c,l,u,f,d},Zt.endOf=function(e){return void 0===(e=G(e))||"millisecond"===e?this:("date"===e&&(e="day"),this.startOf(e).add(1,"isoWeek"===e?"week":e).subtract(1,"ms"))},Zt.format=function(e){e||(e=this.isUtc()?d.defaultFormatUtc:d.defaultFormat);var t=X(this,e);return this.localeData().postformat(t)},Zt.from=function(e,t){return this.isValid()&&(v(e)&&e.isValid()||ct(e).isValid())?Ct({to:this,from:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Zt.fromNow=function(e){return this.from(ct(),e)},Zt.to=function(e,t){return this.isValid()&&(v(e)&&e.isValid()||ct(e).isValid())?Ct({from:this,to:e}).locale(this.locale()).humanize(!t):this.localeData().invalidDate()},Zt.toNow=function(e){return this.to(ct(),e)},Zt.get=W,Zt.invalidAt=function(){return p(this).overflow},Zt.isAfter=function(e,t){var n=v(e)?e:ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=G(a(t)?"millisecond":t))?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(t).valueOf())},Zt.isBefore=function(e,t){var n=v(e)?e:ct(e);return!(!this.isValid()||!n.isValid())&&("millisecond"===(t=G(a(t)?"millisecond":t))?this.valueOf()<n.valueOf():this.clone().endOf(t).valueOf()<n.valueOf())},Zt.isBetween=function(e,t,n,r){return("("===(r=r||"()")[0]?this.isAfter(e,n):!this.isBefore(e,n))&&(")"===r[1]?this.isBefore(t,n):!this.isAfter(t,n))},Zt.isSame=function(e,t){var n,r=v(e)?e:ct(e);return!(!this.isValid()||!r.isValid())&&("millisecond"===(t=G(t||"millisecond"))?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(t).valueOf()<=n&&n<=this.clone().endOf(t).valueOf()))},Zt.isSameOrAfter=function(e,t){return this.isSame(e,t)||this.isAfter(e,t)},Zt.isSameOrBefore=function(e,t){return this.isSame(e,t)||this.isBefore(e,t)},Zt.isValid=function(){return m(this)},Zt.lang=Pt,Zt.locale=It,Zt.localeData=Mt,Zt.max=ut,Zt.min=lt,Zt.parsingFlags=function(){return u({},p(this))},Zt.set=W,Zt.startOf=function(e){switch(e=G(e)){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":case"date":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}return"week"===e&&this.weekday(0),"isoWeek"===e&&this.isoWeekday(1),"quarter"===e&&this.month(3*Math.floor(this.month()/3)),this},Zt.subtract=Dt,Zt.toArray=function(){return[this.year(),this.month(),this.date(),this.hour(),this.minute(),this.second(),this.millisecond()]},Zt.toObject=function(){return{years:this.year(),months:this.month(),date:this.date(),hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()}},Zt.toDate=function(){return this._offset?new Date(this.valueOf()):this._d},Zt.toISOString=function(){var e=this.clone().utc();return 0<e.year()&&e.year()<=9999?x(Date.prototype.toISOString)?this.toDate().toISOString():X(e,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]"):X(e,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")},Zt.toJSON=function(){return this.isValid()?this.toISOString():null},Zt.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},Zt.unix=function(){return Math.floor(this.valueOf()/1e3)},Zt.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},Zt.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},Zt.year=Ze,Zt.isLeapYear=function(){return Xe(this.year())},Zt.weekYear=function(e){return Ot.call(this,e,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},Zt.isoWeekYear=function(e){return Ot.call(this,e,this.isoWeek(),this.isoWeekday(),1,4)},Zt.quarter=Zt.quarters=function(e){return null==e?Math.ceil((this.month()+1)/3):this.month(3*(e-1)+this.month()%3)},Zt.month=Le,Zt.daysInMonth=function(){return Me(this.year(),this.month())},Zt.week=Zt.weeks=function(e){var t=this.localeData().week(this);return null==e?t:this.add(7*(e-t),"d")},Zt.isoWeek=Zt.isoWeeks=function(e){var t=tt(this,1,4).week;return null==e?t:this.add(7*(e-t),"d")},Zt.weeksInYear=function(){var e=this.localeData()._week;return nt(this.year(),e.dow,e.doy)},Zt.isoWeeksInYear=function(){return nt(this.year(),1,4)},Zt.date=Rt,Zt.day=Zt.days=function(e){if(!this.isValid())return null!=e?this:NaN;var t,n,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=e?(t=e,n=this.localeData(),e="string"!=typeof t?t:isNaN(t)?"number"==typeof(t=n.weekdaysParse(t))?t:null:parseInt(t,10),this.add(e-r,"d")):r},Zt.weekday=function(e){if(!this.isValid())return null!=e?this:NaN;var t=(this.day()+7-this.localeData()._week.dow)%7;return null==e?t:this.add(e-t,"d")},Zt.isoWeekday=function(e){return this.isValid()?null==e?this.day()||7:this.day(this.day()%7?e:e-7):null!=e?this:NaN},Zt.dayOfYear=function(e){var t=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==e?t:this.add(e-t,"d")},Zt.hour=Zt.hours=zt,Zt.minute=Zt.minutes=Vt,Zt.second=Zt.seconds=Kt,Zt.millisecond=Zt.milliseconds=Xt,Zt.utcOffset=function(e,t){var n,r=this._offset||0;return this.isValid()?null!=e?("string"==typeof e?e=gt(he,e):Math.abs(e)<16&&(e*=60),!this._isUTC&&t&&(n=bt(this)),this._offset=e,this._isUTC=!0,null!=n&&this.add(n,"m"),r!==e&&(!t||this._changeInProgress?kt(this,Ct(e-r,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,d.updateOffset(this,!0),this._changeInProgress=null)),this):this._isUTC?r:bt(this):null!=e?this:NaN},Zt.utc=function(e){return this.utcOffset(0,e)},Zt.local=function(e){return this._isUTC&&(this.utcOffset(0,e),this._isUTC=!1,e&&this.subtract(bt(this),"m")),this},Zt.parseZone=function(){return this._tzm?this.utcOffset(this._tzm):"string"==typeof this._i&&this.utcOffset(gt(de,this._i)),this},Zt.hasAlignedHourOffset=function(e){return!!this.isValid()&&(e=e?ct(e).utcOffset():0,(this.utcOffset()-e)%60==0)},Zt.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},Zt.isDSTShifted=function(){if(!a(this._isDSTShifted))return this._isDSTShifted;var e={};if(_(e,this),(e=ot(e))._a){var t=e._isUTC?f(e._a):ct(e._a);this._isDSTShifted=this.isValid()&&0<C(e._a,t.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted},Zt.isLocal=function(){return!!this.isValid()&&!this._isUTC},Zt.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},Zt.isUtc=vt,Zt.isUTC=vt,Zt.zoneAbbr=function(){return this._isUTC?"UTC":""},Zt.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},Zt.dates=n("dates accessor is deprecated. Use date instead.",Rt),Zt.months=n("months accessor is deprecated. Use month instead",Le),Zt.years=n("years accessor is deprecated. Use year instead",Ze),Zt.zone=n("moment().zone is deprecated, use moment().utcOffset instead. https://github.com/moment/moment/issues/1779",function(e,t){return null!=e?("string"!=typeof e&&(e=-e),this.utcOffset(e,t),this):-this.utcOffset()});var Jt=Zt;function en(e){return e}var tn=D.prototype;function nn(e,t,n,r){var i=N(),a=f().set(r,t);return i[n](a,e)}function rn(e,t,n){if("number"==typeof e&&(t=e,e=void 0),e=e||"",null!=t)return nn(e,t,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=nn(e,r,n,"month");return i}function an(e,t,n,r){t=("boolean"==typeof e?"number"==typeof t&&(n=t,t=void 0):(t=e,e=!1,"number"==typeof(n=t)&&(n=t,t=void 0)),t||"");var i,a=N(),o=e?a._week.dow:0;if(null!=n)return nn(t,(n+o)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=nn(t,(i+o)%7,r,"day");return s}tn._calendar={sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},tn.calendar=function(e,t,n){var r=this._calendar[e];return x(r)?r.call(t,n):r},tn._longDateFormat={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},tn.longDateFormat=function(e){var t=this._longDateFormat[e],n=this._longDateFormat[e.toUpperCase()];return t||!n?t:(this._longDateFormat[e]=n.replace(/MMMM|MM|DD|dddd/g,function(e){return e.slice(1)}),this._longDateFormat[e])},tn._invalidDate="Invalid date",tn.invalidDate=function(){return this._invalidDate},tn._ordinal="%d",tn.ordinal=function(e){return this._ordinal.replace("%d",e)},tn._ordinalParse=/\d{1,2}/,tn.preparse=en,tn.postformat=en,tn._relativeTime={future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},tn.relativeTime=function(e,t,n,r){var i=this._relativeTime[n];return x(i)?i(e,t,n,r):i.replace(/%d/i,e)},tn.pastFuture=function(e,t){var n=this._relativeTime[0<e?"future":"past"];return x(n)?n(t):n.replace(/%s/i,t)},tn.set=function(e){var t,n;for(n in e)x(t=e[n])?this[n]=t:this["_"+n]=t;this._config=e,this._ordinalParseLenient=new RegExp(this._ordinalParse.source+"|"+/\d{1,2}/.source)},tn.months=function(e,t){return s(this._months)?this._months[e.month()]:this._months[$e.test(t)?"format":"standalone"][e.month()]},tn._months=Oe,tn.monthsShort=function(e,t){return s(this._monthsShort)?this._monthsShort[e.month()]:this._monthsShort[$e.test(t)?"format":"standalone"][e.month()]},tn._monthsShort=Re,tn.monthsParse=function(e,t,n){var r,i,a;if(this._monthsParseExact)return function(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=f([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===t?-1!==(i=Ce.call(this._shortMonthsParse,o))?i:null:-1!==(i=Ce.call(this._longMonthsParse,o))?i:null:"MMM"===t?-1!==(i=Ce.call(this._shortMonthsParse,o))?i:-1!==(i=Ce.call(this._longMonthsParse,o))?i:null:-1!==(i=Ce.call(this._longMonthsParse,o))?i:-1!==(i=Ce.call(this._shortMonthsParse,o))?i:null}.call(this,e,t,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=f([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===t&&this._longMonthsParse[r].test(e))return r;if(n&&"MMM"===t&&this._shortMonthsParse[r].test(e))return r;if(!n&&this._monthsParse[r].test(e))return r}},tn._monthsRegex=Ge,tn.monthsRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||je.call(this),e?this._monthsStrictRegex:this._monthsRegex):this._monthsStrictRegex&&e?this._monthsStrictRegex:this._monthsRegex},tn._monthsShortRegex=Fe,tn.monthsShortRegex=function(e){return this._monthsParseExact?(h(this,"_monthsRegex")||je.call(this),e?this._monthsShortStrictRegex:this._monthsShortRegex):this._monthsShortStrictRegex&&e?this._monthsShortStrictRegex:this._monthsShortRegex},tn.week=function(e){return tt(e,this._week.dow,this._week.doy).week},tn._week={dow:0,doy:6},tn.firstDayOfYear=function(){return this._week.doy},tn.firstDayOfWeek=function(){return this._week.dow},tn.weekdays=function(e,t){return s(this._weekdays)?this._weekdays[e.day()]:this._weekdays[this._weekdays.isFormat.test(t)?"format":"standalone"][e.day()]},tn._weekdays=Nt,tn.weekdaysMin=function(e){return this._weekdaysMin[e.day()]},tn._weekdaysMin=Ft,tn.weekdaysShort=function(e){return this._weekdaysShort[e.day()]},tn._weekdaysShort=Lt,tn.weekdaysParse=function(e,t,n){var r,i,a;if(this._weekdaysParseExact)return function(e,t,n){var r,i,a,o=e.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=f([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===t?-1!==(i=Ce.call(this._weekdaysParse,o))?i:null:"ddd"===t?-1!==(i=Ce.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=Ce.call(this._minWeekdaysParse,o))?i:null:"dddd"===t?-1!==(i=Ce.call(this._weekdaysParse,o))?i:-1!==(i=Ce.call(this._shortWeekdaysParse,o))?i:-1!==(i=Ce.call(this._minWeekdaysParse,o))?i:null:"ddd"===t?-1!==(i=Ce.call(this._shortWeekdaysParse,o))?i:-1!==(i=Ce.call(this._weekdaysParse,o))?i:-1!==(i=Ce.call(this._minWeekdaysParse,o))?i:null:-1!==(i=Ce.call(this._minWeekdaysParse,o))?i:-1!==(i=Ce.call(this._weekdaysParse,o))?i:-1!==(i=Ce.call(this._shortWeekdaysParse,o))?i:null}.call(this,e,t,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=f([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".",".?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".",".?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".",".?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===t&&this._fullWeekdaysParse[r].test(e))return r;if(n&&"ddd"===t&&this._shortWeekdaysParse[r].test(e))return r;if(n&&"dd"===t&&this._minWeekdaysParse[r].test(e))return r;if(!n&&this._weekdaysParse[r].test(e))return r}},tn._weekdaysRegex=Gt,tn.weekdaysRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Ut.call(this),e?this._weekdaysStrictRegex:this._weekdaysRegex):this._weekdaysStrictRegex&&e?this._weekdaysStrictRegex:this._weekdaysRegex},tn._weekdaysShortRegex=jt,tn.weekdaysShortRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Ut.call(this),e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):this._weekdaysShortStrictRegex&&e?this._weekdaysShortStrictRegex:this._weekdaysShortRegex},tn._weekdaysMinRegex=Bt,tn.weekdaysMinRegex=function(e){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Ut.call(this),e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):this._weekdaysMinStrictRegex&&e?this._weekdaysMinStrictRegex:this._weekdaysMinRegex},tn.isPM=function(e){return"p"===(e+"").toLowerCase().charAt(0)},tn._meridiemParse=/[ap]\.?m?\.?/i,tn.meridiem=function(e,t,n){return 11<e?n?"pm":"PM":n?"am":"AM"},O("en",{ordinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(e){var t=e%10;return e+(1===w(e%100/10)?"th":1===t?"st":2===t?"nd":3===t?"rd":"th")}}),d.lang=n("moment.lang is deprecated. Use moment.locale instead.",O),d.langData=n("moment.langData is deprecated. Use moment.localeData instead.",N);var on=Math.abs;function sn(e,t,n,r){var i=Ct(t,n);return e._milliseconds+=r*i._milliseconds,e._days+=r*i._days,e._months+=r*i._months,e._bubble()}function cn(e){return e<0?Math.floor(e):Math.ceil(e)}function ln(e){return 4800*e/146097}function un(e){return 146097*e/4800}function fn(e){return function(){return this.as(e)}}var dn=fn("ms"),hn=fn("s"),pn=fn("m"),mn=fn("h"),gn=fn("d"),_n=fn("w"),bn=fn("M"),vn=fn("y");function yn(e){return function(){return this._data[e]}}var wn=yn("milliseconds"),Cn=yn("seconds"),An=yn("minutes"),Sn=yn("hours"),Tn=yn("days"),xn=yn("months"),kn=yn("years");var En=Math.round,Dn={s:45,m:45,h:22,d:26,M:11};var In=Math.abs;function Pn(){var e,t,n=In(this._milliseconds)/1e3,r=In(this._days),i=In(this._months);t=y((e=y(n/60))/60),n%=60,e%=60;var a=y(i/12),o=i%=12,s=r,c=t,l=e,u=n,f=this.asSeconds();return f?(f<0?"-":"")+"P"+(a?a+"Y":"")+(o?o+"M":"")+(s?s+"D":"")+(c||l||u?"T":"")+(c?c+"H":"")+(l?l+"M":"")+(u?u+"S":""):"P0D"}var Mn=dt.prototype;return Mn.abs=function(){var e=this._data;return this._milliseconds=on(this._milliseconds),this._days=on(this._days),this._months=on(this._months),e.milliseconds=on(e.milliseconds),e.seconds=on(e.seconds),e.minutes=on(e.minutes),e.hours=on(e.hours),e.months=on(e.months),e.years=on(e.years),this},Mn.add=function(e,t){return sn(this,e,t,1)},Mn.subtract=function(e,t){return sn(this,e,t,-1)},Mn.as=function(e){var t,n,r=this._milliseconds;if("month"===(e=G(e))||"year"===e)return t=this._days+r/864e5,n=this._months+ln(t),"month"===e?n:n/12;switch(t=this._days+Math.round(un(this._months)),e){case"week":return t/7+r/6048e5;case"day":return t+r/864e5;case"hour":return 24*t+r/36e5;case"minute":return 1440*t+r/6e4;case"second":return 86400*t+r/1e3;case"millisecond":return Math.floor(864e5*t)+r;default:throw new Error("Unknown unit "+e)}},Mn.asMilliseconds=dn,Mn.asSeconds=hn,Mn.asMinutes=pn,Mn.asHours=mn,Mn.asDays=gn,Mn.asWeeks=_n,Mn.asMonths=bn,Mn.asYears=vn,Mn.valueOf=function(){return this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12)},Mn._bubble=function(){var e,t,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return 0<=a&&0<=o&&0<=s||a<=0&&o<=0&&s<=0||(a+=864e5*cn(un(s)+o),s=o=0),c.milliseconds=a%1e3,e=y(a/1e3),c.seconds=e%60,t=y(e/60),c.minutes=t%60,n=y(t/60),c.hours=n%24,s+=i=y(ln(o+=y(n/24))),o-=cn(un(i)),r=y(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},Mn.get=function(e){return this[(e=G(e))+"s"]()},Mn.milliseconds=wn,Mn.seconds=Cn,Mn.minutes=An,Mn.hours=Sn,Mn.days=Tn,Mn.weeks=function(){return y(this.days()/7)},Mn.months=xn,Mn.years=kn,Mn.humanize=function(e){var t,n,r,i,a,o,s,c,l,u,f,d=this.localeData(),h=(n=!e,r=d,i=Ct(t=this).abs(),a=En(i.as("s")),o=En(i.as("m")),s=En(i.as("h")),c=En(i.as("d")),l=En(i.as("M")),u=En(i.as("y")),(f=a<Dn.s&&["s",a]||o<=1&&["m"]||o<Dn.m&&["mm",o]||s<=1&&["h"]||s<Dn.h&&["hh",s]||c<=1&&["d"]||c<Dn.d&&["dd",c]||l<=1&&["M"]||l<Dn.M&&["MM",l]||u<=1&&["y"]||["yy",u])[2]=n,f[3]=0<+t,f[4]=r,function(e,t,n,r,i){return i.relativeTime(t||1,!!n,e,r)}.apply(null,f));return e&&(h=d.pastFuture(+this,h)),d.postformat(h)},Mn.toISOString=Pn,Mn.toString=Pn,Mn.toJSON=Pn,Mn.locale=It,Mn.localeData=Mt,Mn.toIsoString=n("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Pn),Mn.lang=Pt,Q("X",0,0,"unix"),Q("x",0,0,"valueOf"),ge("x",fe),ge("X",/[+-]?\d+(\.\d{1,3})?/),ye("X",function(e,t,n){n._d=new Date(1e3*parseFloat(e,10))}),ye("x",function(e,t,n){n._d=new Date(w(e))}),d.version="2.13.0",e=ct,d.fn=Jt,d.min=function(){return ft("isBefore",[].slice.call(arguments,0))},d.max=function(){return ft("isAfter",[].slice.call(arguments,0))},d.now=function(){return Date.now?Date.now():+new Date},d.utc=f,d.unix=function(e){return ct(1e3*e)},d.months=function(e,t){return rn(e,t,"months")},d.isDate=c,d.locale=O,d.invalid=g,d.duration=Ct,d.isMoment=v,d.weekdays=function(e,t,n){return an(e,t,n,"weekdays")},d.parseZone=function(){return ct.apply(null,arguments).parseZone()},d.localeData=N,d.isDuration=ht,d.monthsShort=function(e,t){return rn(e,t,"monthsShort")},d.weekdaysMin=function(e,t,n){return an(e,t,n,"weekdaysMin")},d.defineLocale=R,d.updateLocale=function(e,t){var n;return null!=t?(null!=P[e]&&(t=E(P[e]._config,t)),(n=new D(t)).parentLocale=P[e],P[e]=n,O(e)):null!=P[e]&&(null!=P[e].parentLocale?P[e]=P[e].parentLocale:null!=P[e]&&delete P[e]),P[e]},d.locales=function(){return A(P)},d.weekdaysShort=function(e,t,n){return an(e,t,n,"weekdaysShort")},d.normalizeUnits=G,d.relativeTimeThreshold=function(e,t){return void 0!==Dn[e]&&(void 0===t?Dn[e]:(Dn[e]=t,!0))},d.prototype=Jt,d}),function(e){"function"==typeof define&&define.amd?define(["jquery","moment"],e):"object"==typeof exports?module.exports=e(require("jquery"),require("moment")):e(jQuery,moment)}(function(M,$){var O=M.fullCalendar={version:"2.3.1"},f=O.views={};M.fn.fullCalendar=function(a){var o=Array.prototype.slice.call(arguments,1),s=this;return this.each(function(e,t){var n,r=M(t),i=r.data("fullCalendar");"string"==typeof a?i&&M.isFunction(i[a])&&(n=i[a].apply(i,o),e||(s=n),"destroy"===a&&r.removeData("fullCalendar")):i||(i=new O.CalendarBase(r,a),r.data("fullCalendar",i),i.render())}),s};var s=["header","buttonText","buttonIcons","themeButtonIcons"];function d(){var e,t,n,r,i,a=Array.prototype.slice.call(arguments),o={};for(e=0;e<s.length;e++){for(t=s[e],n=null,r=0;r<a.length;r++)i=a[r][t],M.isPlainObject(i)?n=M.extend(n||{},i):null!=i&&(n=null);null!==n&&(o[t]=n)}return a.unshift({}),a.push(o),M.extend.apply(M,a)}function i(e,t){t.left&&e.css({"border-left-width":1,"margin-left":t.left-1}),t.right&&e.css({"border-right-width":1,"margin-right":t.right-1})}function a(e){e.css({"margin-left":"","margin-right":"","border-left-width":"","border-right-width":""})}function h(){M("body").addClass("fc-not-allowed")}function p(){M("body").removeClass("fc-not-allowed")}function n(i,e,t){var a=Math.floor(e/i.length),o=Math.floor(e-a*(i.length-1)),s=[],c=[],l=[],u=0;r(i),i.each(function(e,t){var n=e===i.length-1?o:a,r=M(t).outerHeight(!0);r<n?(s.push(t),c.push(r),l.push(M(t).height())):u+=r}),t&&(e-=u,a=Math.floor(e/s.length),o=Math.floor(e-a*(s.length-1))),M(s).each(function(e,t){var n=e===s.length-1?o:a,r=c[e],i=n-(r-l[e]);r<n&&M(t).height(i)})}function r(e){e.height("")}function e(e){var r=0;return e.find("> *").each(function(e,t){var n=M(t).outerWidth();r<n&&(r=n)}),r++,e.width(r),r}function o(e,t){return e.height(t).addClass("fc-scroller"),e[0].scrollHeight-1>e[0].clientHeight||(c(e),!1)}function c(e){e.height("").removeClass("fc-scroller")}function m(e){var t=e.css("position"),n=e.parents().filter(function(){var e=M(this);return/(auto|scroll)/.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==t&&n.length?n:M(e[0].ownerDocument||document)}function g(e){var t=e.offset();return{left:t.left,right:t.left+e.outerWidth(),top:t.top,bottom:t.top+e.outerHeight()}}function t(e){var t=e.offset(),n=l(e),r=t.left+_(e,"border-left-width")+n.left,i=t.top+_(e,"border-top-width")+n.top;return{left:r,right:r+e[0].clientWidth,top:i,bottom:i+e[0].clientHeight}}function l(e){var t=e.innerWidth()-e[0].clientWidth,n={left:0,right:0,top:0,bottom:e.innerHeight()-e[0].clientHeight};return!function(){null===u&&(e=M("<div><div/></div>").css({position:"absolute",top:-1e3,left:0,border:0,padding:0,overflow:"scroll",direction:"rtl"}).appendTo("body"),t=e.children().offset().left>e.offset().left,e.remove(),u=t);var e,t;return u}()||"rtl"!=e.css("direction")?n.right=t:n.left=t,n}O.intersectionToSeg=v,O.applyAll=F,O.debounce=H,O.isInt=B,O.htmlEscape=E,O.cssToStr=P,O.proxy=U,O.getClientRect=t,O.getContentRect=function(e){var t=e.offset(),n=t.left+_(e,"border-left-width")+_(e,"padding-left"),r=t.top+_(e,"border-top-width")+_(e,"padding-top");return{left:n,right:n+e.width(),top:r,bottom:r+e.height()}},O.getScrollbarWidths=l;var u=null;function _(e,t){return parseFloat(e.css(t))||0}function b(e){return 1==e.which&&!e.ctrlKey}function v(e,t){var n,r,i,a,o=e.start,s=e.end,c=t.start,l=t.end;if(c<s&&o<l)return i=c<=o?(n=o.clone(),!0):(n=c.clone(),!1),a=s<=l?(r=s.clone(),!0):(r=l.clone(),!1),{start:n,end:r,isStart:i,isEnd:a}}O.computeIntervalUnit=C,O.durationHasTime=S;var y=["sun","mon","tue","wed","thu","fri","sat"],w=["year","month","week","day","hour","minute","second","millisecond"];function R(e,t){return $.duration({days:e.clone().stripTime().diff(t.clone().stripTime(),"days"),ms:e.time()-t.time()})}function N(e,t,n){return $.duration(Math.round(e.diff(t,n,!0)),n)}function C(e,t){var n,r,i;for(n=0;n<w.length&&!(1<=(i=A(r=w[n],e,t))&&B(i));n++);return r}function A(e,t,n){return null!=n?n.diff(t,e,!0):$.isDuration(t)?t.as(e):t.end.diff(t.start,e,!0)}function S(e){return Boolean(e.hours()||e.minutes()||e.seconds()||e.milliseconds())}function L(e){return/^\d+\:\d+(?:\:\d+\.?(?:\d{3})?)?$/.test(e)}var T={}.hasOwnProperty;function I(e){var t=function(){};return t.prototype=e,new t}function x(e,t){for(var n in e)k(e,n)&&(t[n]=e[n])}function k(e,t){return T.call(e,t)}function F(e,t,n){if(M.isFunction(e)&&(e=[e]),e){var r,i;for(r=0;r<e.length;r++)i=e[r].apply(t,n)||i;return i}}function G(){for(var e=0;e<arguments.length;e++)if(void 0!==arguments[e])return arguments[e]}function E(e){return(e+"").replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/'/g,"&#039;").replace(/"/g,"&quot;").replace(/\n/g,"<br />")}function D(e){return e.replace(/&.*?;/g,"")}function P(e){var n=[];return M.each(e,function(e,t){null!=t&&n.push(e+":"+t)}),n.join(";")}function j(e,t){return e-t}function B(e){return e%1==0}function U(e,t){var n=e[t];return function(){return n.apply(e,arguments)}}function H(t,n){var r,i,a,o,s=function(){var e=+new Date-o;e<n&&0<e?r=setTimeout(s,n-e):(r=null,t.apply(a,i),r||(a=i=null))};return function(){a=this,i=arguments,o=+new Date,r||(r=setTimeout(s,n))}}var W,q,z,V=/^\s*\d{4}-\d\d$/,Y=/^\s*\d{4}-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?)?$/,K=$.fn,Q=M.extend({},K);function X(e,t,n){var r,i,a,o,s,c=e[0],l=1==e.length&&"string"==typeof c;return $.isMoment(c)?J(c,o=$.apply(null,e)):(s=c,"[object Date]"===Object.prototype.toString.call(s)||s instanceof Date||void 0===c?o=$.apply(null,e):(i=r=!1,l?V.test(c)?(e=[c+="-01"],i=r=!0):(a=Y.exec(c))&&(r=!a[5],i=!0):M.isArray(c)&&(i=!0),o=t||r?$.utc.apply($,e):$.apply(null,e),r?(o._ambigTime=!0,o._ambigZone=!0):n&&(i?o._ambigZone=!0:l&&(o.utcOffset?o.utcOffset(c):o.zone(c))))),o._fullCalendar=!0,o}function Z(e,t){var n,r,i=!1,a=!1,o=e.length,s=[];for(n=0;n<o;n++)r=e[n],$.isMoment(r)||(r=O.moment.parseZone(r)),i=i||r._ambigTime,a=a||r._ambigZone,s.push(r);for(n=0;n<o;n++)r=s[n],t||!i||r._ambigTime?a&&!r._ambigZone&&(s[n]=r.clone().stripZone()):s[n]=r.clone().stripTime();return s}function J(e,t){e._ambigTime?t._ambigTime=!0:t._ambigTime&&(t._ambigTime=!1),e._ambigZone?t._ambigZone=!0:t._ambigZone&&(t._ambigZone=!1)}function ee(e,t){e.year(t[0]||0).month(t[1]||0).date(t[2]||0).hours(t[3]||0).minutes(t[4]||0).seconds(t[5]||0).milliseconds(t[6]||0)}function te(e,t){return Q.format.call(e,t)}function ne(e,t){var n,r="";for(n=0;n<t.length;n++)r+=ie(e,t[n]);return r}O.moment=function(){return X(arguments)},O.moment.utc=function(){var e=X(arguments,!0);return e.hasTime()&&e.utc(),e},O.moment.parseZone=function(){return X(arguments,!0,!0)},K.clone=function(){var e=Q.clone.apply(this,arguments);return J(this,e),this._fullCalendar&&(e._fullCalendar=!0),e},K.week=K.weeks=function(e){var t=(this._locale||this._lang)._fullCalendar_weekCalc;return null==e&&"function"==typeof t?t(this):"ISO"===t?Q.isoWeek.apply(this,arguments):Q.week.apply(this,arguments)},K.time=function(e){if(!this._fullCalendar)return Q.time.apply(this,arguments);if(null==e)return $.duration({hours:this.hours(),minutes:this.minutes(),seconds:this.seconds(),milliseconds:this.milliseconds()});this._ambigTime=!1,$.isDuration(e)||$.isMoment(e)||(e=$.duration(e));var t=0;return $.isDuration(e)&&(t=24*Math.floor(e.asDays())),this.hours(t+e.hours()).minutes(e.minutes()).seconds(e.seconds()).milliseconds(e.milliseconds())},K.stripTime=function(){var e;return this._ambigTime||(e=this.toArray(),this.utc(),q(this,e.slice(0,3)),this._ambigTime=!0,this._ambigZone=!0),this},K.hasTime=function(){return!this._ambigTime},K.stripZone=function(){var e,t;return this._ambigZone||(e=this.toArray(),t=this._ambigTime,this.utc(),q(this,e),this._ambigTime=t||!1,this._ambigZone=!0),this},K.hasZone=function(){return!this._ambigZone},K.local=function(){var e=this.toArray(),t=this._ambigZone;return Q.local.apply(this,arguments),this._ambigTime=!1,this._ambigZone=!1,t&&z(this,e),this},K.utc=function(){return Q.utc.apply(this,arguments),this._ambigTime=!1,this._ambigZone=!1,this},M.each(["zone","utcOffset"],function(e,t){Q[t]&&(K[t]=function(e){return null!=e&&(this._ambigTime=!1,this._ambigZone=!1),Q[t].apply(this,arguments)})}),K.format=function(){return this._fullCalendar&&arguments[0]?(e=this,t=arguments[0],ne(e,le(t))):this._ambigTime?te(this,"YYYY-MM-DD"):this._ambigZone?te(this,"YYYY-MM-DD[T]HH:mm:ss"):Q.format.apply(this,arguments);var e,t},K.toISOString=function(){return this._ambigTime?te(this,"YYYY-MM-DD"):this._ambigZone?te(this,"YYYY-MM-DD[T]HH:mm:ss"):Q.toISOString.apply(this,arguments)},K.isWithin=function(e,t){var n=Z([this,e,t]);return n[0]>=n[1]&&n[0]<n[2]},K.isSame=function(e,t){var n;return this._fullCalendar?t?(n=Z([this,e],!0),Q.isSame.call(n[0],n[1],t)):(e=O.moment.parseZone(e),Q.isSame.call(this,e)&&Boolean(this._ambigTime)===Boolean(e._ambigTime)&&Boolean(this._ambigZone)===Boolean(e._ambigZone)):Q.isSame.apply(this,arguments)},M.each(["isBefore","isAfter"],function(e,r){K[r]=function(e,t){var n;return this._fullCalendar?(n=Z([this,e]),Q[r].call(n[0],n[1],t)):Q[r].apply(this,arguments)}}),W="_d"in $()&&"updateOffset"in $,q=W?function(e,t){e._d.setTime(Date.UTC.apply(Date,t)),$.updateOffset(e,!1)}:ee,z=W?function(e,t){e._d.setTime(+new Date(t[0]||0,t[1]||0,t[2]||0,t[3]||0,t[4]||0,t[5]||0,t[6]||0)),$.updateOffset(e,!1)}:ee;var re={t:function(e){return te(e,"a").charAt(0)},T:function(e){return te(e,"A").charAt(0)}};function ie(e,t){var n,r;return"string"==typeof t?t:(n=t.token)?re[n]?re[n](e):te(e,n):t.maybe&&(r=ne(e,t.maybe)).match(/[1-9]/)?r:""}function ae(e,t,n,r,i){return r=r||" - ",function(e,t,n,r,i){var a,o,s,c,l="",u="",f="",d="",h="";for(o=0;o<n.length&&!1!==(a=se(e,t,n[o]));o++)l+=a;for(s=n.length-1;o<s&&!1!==(a=se(e,t,n[s]));s--)u=a+u;for(c=o;c<=s;c++)f+=ie(e,n[c]),d+=ie(t,n[c]);(f||d)&&(h=i?d+r+f:f+r+d);return l+h+u}(e=O.moment.parseZone(e),t=O.moment.parseZone(t),le(n=(e.localeData||e.lang).call(e).longDateFormat(n)||n),r,i)}O.formatRange=ae;var oe={Y:"year",M:"month",D:"day",d:"day",A:"second",a:"second",T:"second",t:"second",H:"second",h:"second",m:"second",s:"second"};function se(e,t,n){var r,i;return"string"==typeof n?n:!!((r=n.token)&&(i=oe[r.charAt(0)])&&e.isSame(t,i))&&te(e,r)}var ce={};function le(e){return e in ce?ce[e]:ce[e]=function e(t){var n=[];var r=/\[([^\]]*)\]|\(([^\)]*)\)|(LTS|LT|(\w)\4*o?)|([^\w\[\(]+)/g;var i;for(;i=r.exec(t);)i[1]?n.push(i[1]):i[2]?n.push({maybe:e(i[2])}):i[3]?n.push({token:i[3]}):i[5]&&n.push(i[5]);return n}(e)}function ue(){}(O.Class=ue).extend=function(e){var t,n=this;return k(e=e||{},"constructor")&&(t=e.constructor),"function"!=typeof t&&(t=e.constructor=function(){n.apply(this,arguments)}),t.prototype=I(n.prototype),x(e,t.prototype),function(e,t){var n,r,i=["constructor","toString","valueOf"];for(n=0;n<i.length;n++)e[r=i[n]]!==Object.prototype[r]&&(t[r]=e[r])}(e,t.prototype),x(n,t),t},ue.mixin=function(e){x(e.prototype||e,this.prototype)};var fe=ue.extend({isHidden:!0,options:null,el:null,documentMousedownProxy:null,margin:10,constructor:function(e){this.options=e||{}},show:function(){this.isHidden&&(this.el||this.render(),this.el.show(),this.position(),this.isHidden=!1,this.trigger("show"))},hide:function(){this.isHidden||(this.el.hide(),this.isHidden=!0,this.trigger("hide"))},render:function(){var e=this,t=this.options;this.el=M('<div class="fc-popover"/>').addClass(t.className||"").css({top:0,left:0}).append(t.content).appendTo(t.parentEl),this.el.on("click",".fc-close",function(){e.hide()}),t.autoHide&&M(document).on("mousedown",this.documentMousedownProxy=U(this,"documentMousedown"))},documentMousedown:function(e){this.el&&!M(e.target).closest(this.el).length&&this.hide()},destroy:function(){this.hide(),this.el&&(this.el.remove(),this.el=null),M(document).off("mousedown",this.documentMousedownProxy)},position:function(){var e,t,n,r,i,a=this.options,o=this.el.offsetParent().offset(),s=this.el.outerWidth(),c=this.el.outerHeight(),l=M(window),u=m(this.el);r=a.top||0,i=void 0!==a.left?a.left:void 0!==a.right?a.right-s:0,t=u.is(window)||u.is(document)?(u=l,e=0):(e=(n=u.offset()).top,n.left),e+=l.scrollTop(),t+=l.scrollLeft(),!1!==a.viewportConstrain&&(r=Math.min(r,e+u.outerHeight()-c-this.margin),r=Math.max(r,e+this.margin),i=Math.min(i,t+u.outerWidth()-s-this.margin),i=Math.max(i,t+this.margin)),this.el.css({top:r-o.top,left:i-o.left})},trigger:function(e){this.options[e]&&this.options[e].apply(this,Array.prototype.slice.call(arguments,1))}}),de=ue.extend({grid:null,rowCoords:null,colCoords:null,containerEl:null,bounds:null,constructor:function(e){this.grid=e},build:function(){this.rowCoords=this.grid.computeRowCoords(),this.colCoords=this.grid.computeColCoords(),this.computeBounds()},clear:function(){this.rowCoords=null,this.colCoords=null},getCell:function(e,t){var n,r,i,a=this.rowCoords,o=a.length,s=this.colCoords,c=s.length,l=null,u=null;if(this.inBounds(e,t)){for(n=0;n<o;n++)if(t>=(r=a[n]).top&&t<r.bottom){l=n;break}for(n=0;n<c;n++)if(e>=(r=s[n]).left&&e<r.right){u=n;break}if(null!==l&&null!==u)return(i=this.grid.getCell(l,u)).grid=this.grid,M.extend(i,a[l],s[u]),i}return null},computeBounds:function(){this.bounds=this.containerEl?t(this.containerEl):null},inBounds:function(e,t){var n=this.bounds;return!n||e>=n.left&&e<n.right&&t>=n.top&&t<n.bottom}}),he=ue.extend({coordMaps:null,constructor:function(e){this.coordMaps=e},build:function(){var e,t=this.coordMaps;for(e=0;e<t.length;e++)t[e].build()},getCell:function(e,t){var n,r=this.coordMaps,i=null;for(n=0;n<r.length&&!i;n++)i=r[n].getCell(e,t);return i},clear:function(){var e,t=this.coordMaps;for(e=0;e<t.length;e++)t[e].clear()}}),pe=O.DragListener=ue.extend({options:null,isListening:!1,isDragging:!1,originX:null,originY:null,mousemoveProxy:null,mouseupProxy:null,subjectEl:null,subjectHref:null,scrollEl:null,scrollBounds:null,scrollTopVel:null,scrollLeftVel:null,scrollIntervalId:null,scrollHandlerProxy:null,scrollSensitivity:30,scrollSpeed:200,scrollIntervalMs:50,constructor:function(e){e=e||{},this.options=e,this.subjectEl=e.subjectEl},mousedown:function(e){b(e)&&(e.preventDefault(),this.startListening(e),this.options.distance||this.startDrag(e))},startListening:function(e){var t;this.isListening||(e&&this.options.scroll&&((t=m(M(e.target))).is(window)||t.is(document)||(this.scrollEl=t,this.scrollHandlerProxy=H(U(this,"scrollHandler"),100),this.scrollEl.on("scroll",this.scrollHandlerProxy))),M(document).on("mousemove",this.mousemoveProxy=U(this,"mousemove")).on("mouseup",this.mouseupProxy=U(this,"mouseup")).on("selectstart",this.preventDefault),e?(this.originX=e.pageX,this.originY=e.pageY):(this.originX=0,this.originY=0),this.isListening=!0,this.listenStart(e))},listenStart:function(e){this.trigger("listenStart",e)},mousemove:function(e){var t,n=e.pageX-this.originX,r=e.pageY-this.originY;this.isDragging||(t=this.options.distance||1)*t<=n*n+r*r&&this.startDrag(e),this.isDragging&&this.drag(n,r,e)},startDrag:function(e){this.isListening||this.startListening(),this.isDragging||(this.isDragging=!0,this.dragStart(e))},dragStart:function(e){var t=this.subjectEl;this.trigger("dragStart",e),(this.subjectHref=t?t.attr("href"):null)&&t.removeAttr("href")},drag:function(e,t,n){this.trigger("drag",e,t,n),this.updateScroll(n)},mouseup:function(e){this.stopListening(e)},stopDrag:function(e){this.isDragging&&(this.stopScrolling(),this.dragStop(e),this.isDragging=!1)},dragStop:function(e){var t=this;this.trigger("dragStop",e),setTimeout(function(){t.subjectHref&&t.subjectEl.attr("href",t.subjectHref)},0)},stopListening:function(e){this.stopDrag(e),this.isListening&&(this.scrollEl&&(this.scrollEl.off("scroll",this.scrollHandlerProxy),this.scrollHandlerProxy=null),M(document).off("mousemove",this.mousemoveProxy).off("mouseup",this.mouseupProxy).off("selectstart",this.preventDefault),this.mousemoveProxy=null,this.mouseupProxy=null,this.isListening=!1,this.listenStop(e))},listenStop:function(e){this.trigger("listenStop",e)},trigger:function(e){this.options[e]&&this.options[e].apply(this,Array.prototype.slice.call(arguments,1))},preventDefault:function(e){e.preventDefault()},computeScrollBounds:function(){var e=this.scrollEl;this.scrollBounds=e?g(e):null},updateScroll:function(e){var t,n,r,i,a=this.scrollSensitivity,o=this.scrollBounds,s=0,c=0;o&&(t=(a-(e.pageY-o.top))/a,n=(a-(o.bottom-e.pageY))/a,r=(a-(e.pageX-o.left))/a,i=(a-(o.right-e.pageX))/a,0<=t&&t<=1?s=t*this.scrollSpeed*-1:0<=n&&n<=1&&(s=n*this.scrollSpeed),0<=r&&r<=1?c=r*this.scrollSpeed*-1:0<=i&&i<=1&&(c=i*this.scrollSpeed)),this.setScrollVel(s,c)},setScrollVel:function(e,t){this.scrollTopVel=e,this.scrollLeftVel=t,this.constrainScrollVel(),!this.scrollTopVel&&!this.scrollLeftVel||this.scrollIntervalId||(this.scrollIntervalId=setInterval(U(this,"scrollIntervalFunc"),this.scrollIntervalMs))},constrainScrollVel:function(){var e=this.scrollEl;this.scrollTopVel<0?e.scrollTop()<=0&&(this.scrollTopVel=0):0<this.scrollTopVel&&e.scrollTop()+e[0].clientHeight>=e[0].scrollHeight&&(this.scrollTopVel=0),this.scrollLeftVel<0?e.scrollLeft()<=0&&(this.scrollLeftVel=0):0<this.scrollLeftVel&&e.scrollLeft()+e[0].clientWidth>=e[0].scrollWidth&&(this.scrollLeftVel=0)},scrollIntervalFunc:function(){var e=this.scrollEl,t=this.scrollIntervalMs/1e3;this.scrollTopVel&&e.scrollTop(e.scrollTop()+this.scrollTopVel*t),this.scrollLeftVel&&e.scrollLeft(e.scrollLeft()+this.scrollLeftVel*t),this.constrainScrollVel(),this.scrollTopVel||this.scrollLeftVel||this.stopScrolling()},stopScrolling:function(){this.scrollIntervalId&&(clearInterval(this.scrollIntervalId),this.scrollIntervalId=null,this.scrollStop())},scrollHandler:function(){this.scrollIntervalId||this.scrollStop()},scrollStop:function(){}}),me=pe.extend({coordMap:null,origCell:null,cell:null,coordAdjust:null,constructor:function(e,t){pe.prototype.constructor.call(this,t),this.coordMap=e},listenStart:function(e){var t,n,r,i,a,o,s,c,l,u,f,d=this.subjectEl;pe.prototype.listenStart.apply(this,arguments),this.computeCoords(),e?(r=n={left:e.pageX,top:e.pageY},d&&(t=g(d),u=r,f=t,r={left:Math.min(Math.max(u.left,f.left),f.right),top:Math.min(Math.max(u.top,f.top),f.bottom)}),this.origCell=this.getCell(r.left,r.top),d&&this.options.subjectCenter&&(this.origCell&&(s=this.origCell,c=t,t=(l={left:Math.max(s.left,c.left),right:Math.min(s.right,c.right),top:Math.max(s.top,c.top),bottom:Math.min(s.bottom,c.bottom)}).left<l.right&&l.top<l.bottom&&l||t),r={left:((o=t).left+o.right)/2,top:(o.top+o.bottom)/2}),this.coordAdjust=(a=n,{left:(i=r).left-a.left,top:i.top-a.top})):(this.origCell=null,this.coordAdjust=null)},computeCoords:function(){this.coordMap.build(),this.computeScrollBounds()},dragStart:function(e){var t;pe.prototype.dragStart.apply(this,arguments),(t=this.getCell(e.pageX,e.pageY))&&this.cellOver(t)},drag:function(e,t,n){var r;pe.prototype.drag.apply(this,arguments),ge(r=this.getCell(n.pageX,n.pageY),this.cell)||(this.cell&&this.cellOut(),r&&this.cellOver(r))},dragStop:function(){this.cellDone(),pe.prototype.dragStop.apply(this,arguments)},cellOver:function(e){this.cell=e,this.trigger("cellOver",e,ge(e,this.origCell),this.origCell)},cellOut:function(){this.cell&&(this.trigger("cellOut",this.cell),this.cellDone(),this.cell=null)},cellDone:function(){this.cell&&this.trigger("cellDone",this.cell)},listenStop:function(){pe.prototype.listenStop.apply(this,arguments),this.origCell=this.cell=null,this.coordMap.clear()},scrollStop:function(){pe.prototype.scrollStop.apply(this,arguments),this.computeCoords()},getCell:function(e,t){return this.coordAdjust&&(e+=this.coordAdjust.left,t+=this.coordAdjust.top),this.coordMap.getCell(e,t)}});function ge(e,t){return!e&&!t||!(!e||!t)&&(e.grid===t.grid&&e.row===t.row&&e.col===t.col)}var _e=ue.extend({options:null,sourceEl:null,el:null,parentEl:null,top0:null,left0:null,mouseY0:null,mouseX0:null,topDelta:null,leftDelta:null,mousemoveProxy:null,isFollowing:!1,isHidden:!1,isAnimating:!1,constructor:function(e,t){this.options=t=t||{},this.sourceEl=e,this.parentEl=t.parentEl?M(t.parentEl):e.parent()},start:function(e){this.isFollowing||(this.isFollowing=!0,this.mouseY0=e.pageY,this.mouseX0=e.pageX,this.topDelta=0,this.leftDelta=0,this.isHidden||this.updatePosition(),M(document).on("mousemove",this.mousemoveProxy=U(this,"mousemove")))},stop:function(e,t){var n=this,r=this.options.revertDuration;function i(){this.isAnimating=!1,n.destroyEl(),this.top0=this.left0=null,t&&t()}this.isFollowing&&!this.isAnimating&&(this.isFollowing=!1,M(document).off("mousemove",this.mousemoveProxy),e&&r&&!this.isHidden?(this.isAnimating=!0,this.el.animate({top:this.top0,left:this.left0},{duration:r,complete:i})):i())},getEl:function(){var e=this.el;return e||(this.sourceEl.width(),e=this.el=this.sourceEl.clone().css({position:"absolute",visibility:"",display:this.isHidden?"none":"",margin:0,right:"auto",bottom:"auto",width:this.sourceEl.width(),height:this.sourceEl.height(),opacity:this.options.opacity||"",zIndex:this.options.zIndex}).appendTo(this.parentEl)),e},destroyEl:function(){this.el&&(this.el.remove(),this.el=null)},updatePosition:function(){var e,t;this.getEl(),null===this.top0&&(this.sourceEl.width(),e=this.sourceEl.offset(),t=this.el.offsetParent().offset(),this.top0=e.top-t.top,this.left0=e.left-t.left),this.el.css({top:this.top0+this.topDelta,left:this.left0+this.leftDelta})},mousemove:function(e){this.topDelta=e.pageY-this.mouseY0,this.leftDelta=e.pageX-this.mouseX0,this.isHidden||this.updatePosition()},hide:function(){this.isHidden||(this.isHidden=!0,this.el&&this.el.hide())},show:function(){this.isHidden&&(this.isHidden=!1,this.updatePosition(),this.getEl().show())}}),be=ue.extend({view:null,isRTL:null,cellHtml:"<td/>",constructor:function(e){this.view=e,this.isRTL=e.opt("isRTL")},rowHtml:function(e,t){var n,r=this.getHtmlRenderer("cell",e),i="";for(t=t||0,n=0;n<this.colCnt;n++)i+=r(this.getCell(t,n));return"<tr>"+(i=this.bookendCells(i,e,t))+"</tr>"},bookendCells:function(e,t,n){var r=this.getHtmlRenderer("intro",t)(n||0),i=this.getHtmlRenderer("outro",t)(n||0),a=this.isRTL?i:r,o=this.isRTL?r:i;return"string"==typeof e?a+e+o:e.prepend(a).append(o)},getHtmlRenderer:function(e,t){var n,r,i,a,o,s=this.view;return n=e+"Html",t&&(r=t+((o=e).charAt(0).toUpperCase()+o.slice(1))+"Html"),r&&(a=s[r])?i=s:r&&(a=this[r])?i=this:(a=s[n])?i=s:(a=this[n])&&(i=this),"function"==typeof a?function(){return a.apply(i,arguments)||""}:function(){return a||""}}}),ve=O.Grid=be.extend({start:null,end:null,rowCnt:0,colCnt:0,rowData:null,colData:null,el:null,coordMap:null,elsByFill:null,externalDragStartProxy:null,colHeadFormat:null,eventTimeFormat:null,displayEventTime:null,displayEventEnd:null,cellDuration:null,largeUnit:null,constructor:function(){be.apply(this,arguments),this.coordMap=new de(this),this.elsByFill={},this.externalDragStartProxy=U(this,"externalDragStart")},computeColHeadFormat:function(){},computeEventTimeFormat:function(){return this.view.opt("smallTimeFormat")},computeDisplayEventTime:function(){return!0},computeDisplayEventEnd:function(){return!0},setRange:function(e){var t,n,r=this.view;this.start=e.start.clone(),this.end=e.end.clone(),this.rowData=[],this.colData=[],this.updateCells(),this.colHeadFormat=r.opt("columnFormat")||this.computeColHeadFormat(),this.eventTimeFormat=r.opt("eventTimeFormat")||r.opt("timeFormat")||this.computeEventTimeFormat(),null==(t=r.opt("displayEventTime"))&&(t=this.computeDisplayEventTime()),null==(n=r.opt("displayEventEnd"))&&(n=this.computeDisplayEventEnd()),this.displayEventTime=t,this.displayEventEnd=n},updateCells:function(){},rangeToSegs:function(e){},diffDates:function(e,t){return this.largeUnit?N(e,t,this.largeUnit):R(e,t)},getCell:function(e,t){var n;return null==t&&(e="number"==typeof e?(t=e%this.colCnt,Math.floor(e/this.colCnt)):(t=e.col,e.row)),n={row:e,col:t},M.extend(n,this.getRowData(e),this.getColData(t)),M.extend(n,this.computeCellRange(n)),n},computeCellRange:function(e){var t=this.computeCellDate(e);return{start:t,end:t.clone().add(this.cellDuration)}},computeCellDate:function(e){},getRowData:function(e){return this.rowData[e]||{}},getColData:function(e){return this.colData[e]||{}},getRowEl:function(e){},getColEl:function(e){},getCellDayEl:function(e){return this.getColEl(e.col)||this.getRowEl(e.row)},computeRowCoords:function(){var e,t,n,r=[];for(e=0;e<this.rowCnt;e++)n=(t=this.getRowEl(e)).offset().top,r.push({top:n,bottom:n+t.outerHeight()});return r},computeColCoords:function(){var e,t,n,r=[];for(e=0;e<this.colCnt;e++)n=(t=this.getColEl(e)).offset().left,r.push({left:n,right:n+t.outerWidth()});return r},setElement:function(e){var t=this;(this.el=e).on("mousedown",function(e){M(e.target).is(".fc-event-container *, .fc-more")||M(e.target).closest(".fc-popover").length||t.dayMousedown(e)}),this.bindSegHandlers(),this.bindGlobalHandlers()},removeElement:function(){this.unbindGlobalHandlers(),this.el.remove()},renderSkeleton:function(){},renderDates:function(){},destroyDates:function(){},bindGlobalHandlers:function(){M(document).on("dragstart sortstart",this.externalDragStartProxy)},unbindGlobalHandlers:function(){M(document).off("dragstart sortstart",this.externalDragStartProxy)},dayMousedown:function(e){var r,i,a=this,t=this.view,o=t.opt("selectable");new me(this.coordMap,{scroll:t.opt("dragScroll"),dragStart:function(){t.unselect()},cellOver:function(e,t,n){n&&(r=t?e:null,o&&((i=a.computeSelection(n,e))?a.renderSelection(i):h()))},cellOut:function(e){i=r=null,a.destroySelection(),p()},listenStop:function(e){r&&t.trigger("dayClick",a.getCellDayEl(r),r.start,e),i&&t.reportSelection(i,e),p()}}).mousedown(e)},renderRangeHelper:function(e,t){var n=this.fabricateHelperEvent(e,t);this.renderHelper(n,t)},fabricateHelperEvent:function(e,t){var n=t?I(t.event):{};return n.start=e.start.clone(),n.end=e.end?e.end.clone():null,n.allDay=null,this.view.calendar.normalizeEventRange(n),n.className=(n.className||[]).concat("fc-helper"),t||(n.editable=!1),n},renderHelper:function(e,t){},destroyHelper:function(){},renderSelection:function(e){this.renderHighlight(e)},destroySelection:function(){this.destroyHighlight()},computeSelection:function(e,t){var n,r=[e.start,e.end,t.start,t.end];return r.sort(j),n={start:r[0].clone(),end:r[3].clone()},this.view.calendar.isSelectionRangeAllowed(n)?n:null},renderHighlight:function(e){this.renderFill("highlight",this.rangeToSegs(e))},destroyHighlight:function(){this.destroyFill("highlight")},highlightSegClasses:function(){return["fc-highlight"]},renderFill:function(e,t){},destroyFill:function(e){var t=this.elsByFill[e];t&&(t.remove(),delete this.elsByFill[e])},renderFillSegEls:function(e,i){var t,a=this,o=this[e+"SegEl"],n="",s=[];if(i.length){for(t=0;t<i.length;t++)n+=this.fillSegHtml(e,i[t]);M(n).each(function(e,t){var n=i[e],r=M(t);o&&(r=o.call(a,n,r)),r&&(r=M(r)).is(a.fillSegTag)&&(n.el=r,s.push(n))})}return s},fillSegTag:"div",fillSegHtml:function(e,t){var n=this[e+"SegClasses"],r=this[e+"SegCss"],i=n?n.call(this,t):[],a=P(r?r.call(this,t):{});return"<"+this.fillSegTag+(i.length?' class="'+i.join(" ")+'"':"")+(a?' style="'+a+'"':"")+" />"},headHtml:function(){return'<div class="fc-row '+this.view.widgetHeaderClass+'"><table><thead>'+this.rowHtml("head")+"</thead></table></div>"},headCellHtml:function(e){var t=this.view,n=e.start;return'<th class="fc-day-header '+t.widgetHeaderClass+" fc-"+y[n.day()]+'">'+E(n.format(this.colHeadFormat))+"</th>"},bgCellHtml:function(e){var t=this.view,n=e.start,r=this.getDayClasses(n);return r.unshift("fc-day",t.widgetContentClass),'<td class="'+r.join(" ")+'" data-date="'+n.format("YYYY-MM-DD")+'"></td>'},getDayClasses:function(e){var t=this.view,n=t.calendar.getNow().stripTime(),r=["fc-"+y[e.day()]];return 1==t.intervalDuration.as("months")&&e.month()!=t.intervalStart.month()&&r.push("fc-other-month"),e.isSame(n,"day")?r.push("fc-today",t.highlightStateClass):e<n?r.push("fc-past"):r.push("fc-future"),r}});function ye(e){return G((e.source||{}).rendering,e.rendering)}function we(e,t){return e.eventStartMS-t.eventStartMS}function Ce(e,t){return e.eventStartMS-t.eventStartMS||t.eventDurationMS-e.eventDurationMS||t.event.allDay-e.event.allDay||(e.event.title||"").localeCompare(t.event.title)}ve.mixin({mousedOverSeg:null,isDraggingSeg:!1,isResizingSeg:!1,isDraggingExternal:!1,segs:null,renderEvents:function(e){var t,n,r,i,a=this.eventsToSegs(e),o=[],s=[];for(t=0;t<a.length;t++)n=a[t],r=n.event,void 0,"background"===(i=ye(r))||"inverse-background"===i?o.push(n):s.push(n);o=this.renderBgSegs(o)||o,s=this.renderFgSegs(s)||s,this.segs=o.concat(s)},destroyEvents:function(){this.triggerSegMouseout(),this.destroyFgSegs(),this.destroyBgSegs(),this.segs=null},getEventSegs:function(){return this.segs||[]},renderFgSegs:function(e){},destroyFgSegs:function(){},renderFgSegEls:function(i,e){var t,a=this.view,n="",o=[];if(i.length){for(t=0;t<i.length;t++)n+=this.fgSegHtml(i[t],e);M(n).each(function(e,t){var n=i[e],r=a.resolveEventEl(n.event,M(t));r&&(r.data("fc-seg",n),n.el=r,o.push(n))})}return o},fgSegHtml:function(e,t){},renderBgSegs:function(e){return this.renderFill("bgEvent",e)},destroyBgSegs:function(){this.destroyFill("bgEvent")},bgEventSegEl:function(e,t){return this.view.resolveEventEl(e.event,t)},bgEventSegClasses:function(e){var t=e.event,n=t.source||{};return["fc-bgevent"].concat(t.className,n.className||[])},bgEventSegCss:function(e){var t=this.view,n=e.event,r=n.source||{};return{"background-color":n.backgroundColor||n.color||r.backgroundColor||r.color||t.opt("eventBackgroundColor")||t.opt("eventColor")}},businessHoursSegClasses:function(e){return["fc-nonbusiness","fc-bgevent"]},bindSegHandlers:function(){var r=this,n=this.view;M.each({mouseenter:function(e,t){r.triggerSegMouseover(e,t)},mouseleave:function(e,t){r.triggerSegMouseout(e,t)},click:function(e,t){return n.trigger("eventClick",this,e.event,t)},mousedown:function(e,t){M(t.target).is(".fc-resizer")&&n.isEventResizable(e.event)?r.segResizeMousedown(e,t,M(t.target).is(".fc-start-resizer")):n.isEventDraggable(e.event)&&r.segDragMousedown(e,t)}},function(e,n){r.el.on(e,".fc-event-container > *",function(e){var t=M(this).data("fc-seg");if(t&&!r.isDraggingSeg&&!r.isResizingSeg)return n.call(this,t,e)})})},triggerSegMouseover:function(e,t){this.mousedOverSeg||(this.mousedOverSeg=e,this.view.trigger("eventMouseover",e.el[0],e.event,t))},triggerSegMouseout:function(e,t){t=t||{},this.mousedOverSeg&&(e=e||this.mousedOverSeg,this.mousedOverSeg=null,this.view.trigger("eventMouseout",e.el[0],e.event,t))},segDragMousedown:function(r,e){var i,a=this,o=this.view,s=o.calendar,t=r.el,c=r.event,l=new _e(r.el,{parentEl:o.el,opacity:o.opt("dragOpacity"),revertDuration:o.opt("dragRevertDuration"),zIndex:2});new me(o.coordMap,{distance:5,scroll:o.opt("dragScroll"),subjectEl:t,subjectCenter:!0,listenStart:function(e){l.hide(),l.start(e)},dragStart:function(e){a.triggerSegMouseout(r,e),a.segDragStart(r,e),o.hideEvent(c)},cellOver:function(e,t,n){r.cell&&(n=r.cell),(i=a.computeEventDrop(n,e,c))&&!s.isEventRangeAllowed(i,c)&&(h(),i=null),i&&o.renderDrag(i,r)?l.hide():l.show(),t&&(i=null)},cellOut:function(){o.destroyDrag(),l.show(),i=null},cellDone:function(){p()},dragStop:function(e){l.stop(!i,function(){o.destroyDrag(),o.showEvent(c),a.segDragStop(r,e),i&&o.reportEventDrop(c,i,this.largeUnit,t,e)})},listenStop:function(){l.stop()}}).mousedown(e)},segDragStart:function(e,t){this.isDraggingSeg=!0,this.view.trigger("eventDragStart",e.el[0],e.event,t,{})},segDragStop:function(e,t){this.isDraggingSeg=!1,this.view.trigger("eventDragStop",e.el[0],e.event,t,{})},computeEventDrop:function(e,t,n){var r,i,a=this.view.calendar,o=e.start,s=t.start;return o.hasTime()===s.hasTime()?(r=this.diffDates(s,o),n.allDay&&S(r)?(i={start:n.start.clone(),end:a.getEventEnd(n),allDay:!1},a.normalizeEventRangeTimes(i)):i={start:n.start.clone(),end:n.end?n.end.clone():null,allDay:n.allDay},i.start.add(r),i.end&&i.end.add(r)):i={start:s.clone(),end:null,allDay:!s.hasTime()},i},applyDragOpacity:function(e){var n=this.view.opt("dragOpacity");null!=n&&e.each(function(e,t){t.style.opacity=n})},externalDragStart:function(e,t){var n,r,i=this.view;i.opt("droppable")&&(n=M((t?t.item:null)||e.target),r=i.opt("dropAccept"),(M.isFunction(r)?r.call(n[0],n):n.is(r))&&(this.isDraggingExternal||this.listenToExternalDrag(n,e,t)))},listenToExternalDrag:function(e,t,n){var r,i=this,a=function(e){var t,n,r,i,a=O.dataAttrPrefix;a&&(a+="-");(t=e.data(a+"event")||null)&&(t="object"==typeof t?M.extend({},t):{},null==(n=t.start)&&(n=t.time),r=t.duration,i=t.stick,delete t.start,delete t.time,delete t.duration,delete t.stick);null==n&&(n=e.data(a+"start"));null==n&&(n=e.data(a+"time"));null==r&&(r=e.data(a+"duration"));null==i&&(i=e.data(a+"stick"));return n=null!=n?$.duration(n):null,r=null!=r?$.duration(r):null,i=Boolean(i),{eventProps:t,startTime:n,duration:r,stick:i}}(e);new me(this.coordMap,{listenStart:function(){i.isDraggingExternal=!0},cellOver:function(e){(r=i.computeExternalDrop(e,a))?i.renderDrag(r):h()},cellOut:function(){r=null,i.destroyDrag(),p()},dragStop:function(){i.destroyDrag(),p(),r&&i.view.reportExternalDrop(a,r,e,t,n)},listenStop:function(){i.isDraggingExternal=!1}}).startDrag(t)},computeExternalDrop:function(e,t){var n={start:e.start.clone(),end:null};return t.startTime&&!n.start.hasTime()&&n.start.time(t.startTime),t.duration&&(n.end=n.start.clone().add(t.duration)),this.view.calendar.isExternalDropRangeAllowed(n,t.eventProps)?n:null},renderDrag:function(e,t){},destroyDrag:function(){},segResizeMousedown:function(r,e,i){var a,o=this,s=this.view,c=s.calendar,t=r.el,l=r.event,u=c.getEventEnd(l);new me(this.coordMap,{distance:5,scroll:s.opt("dragScroll"),subjectEl:t,dragStart:function(e){o.triggerSegMouseout(r,e),o.segResizeStart(r,e)},cellOver:function(e,t,n){(a=i?o.computeEventStartResize(n,e,l):o.computeEventEndResize(n,e,l))&&(c.isEventRangeAllowed(a,l)?a.start.isSame(l.start)&&a.end.isSame(u)&&(a=null):(h(),a=null)),a&&(s.hideEvent(l),o.renderEventResize(a,r))},cellOut:function(){a=null},cellDone:function(){o.destroyEventResize(),s.showEvent(l),p()},dragStop:function(e){o.segResizeStop(r,e),a&&s.reportEventResize(l,a,this.largeUnit,t,e)}}).mousedown(e)},segResizeStart:function(e,t){this.isResizingSeg=!0,this.view.trigger("eventResizeStart",e.el[0],e.event,t,{})},segResizeStop:function(e,t){this.isResizingSeg=!1,this.view.trigger("eventResizeStop",e.el[0],e.event,t,{})},computeEventStartResize:function(e,t,n){return this.computeEventResize("start",e,t,n)},computeEventEndResize:function(e,t,n){return this.computeEventResize("end",e,t,n)},computeEventResize:function(e,t,n,r){var i,a,o=this.view.calendar,s=this.diffDates(n[e],t[e]);return(i={start:r.start.clone(),end:o.getEventEnd(r),allDay:r.allDay}).allDay&&S(s)&&(i.allDay=!1,o.normalizeEventRangeTimes(i)),i[e].add(s),i.start.isBefore(i.end)||(a=r.allDay?o.defaultAllDayEventDuration:o.defaultTimedEventDuration,this.cellDuration&&this.cellDuration<a&&(a=this.cellDuration),"start"==e?i.start=i.end.clone().subtract(a):i.end=i.start.clone().add(a)),i},renderEventResize:function(e,t){},destroyEventResize:function(){},getEventTimeText:function(e,t,n){return null==t&&(t=this.eventTimeFormat),null==n&&(n=this.displayEventEnd),this.displayEventTime&&e.start.hasTime()?n&&e.end?this.view.formatRange(e,t):e.start.format(t):""},getSegClasses:function(e,t,n){var r=e.event,i=["fc-event",e.isStart?"fc-start":"fc-not-start",e.isEnd?"fc-end":"fc-not-end"].concat(r.className,r.source?r.source.className:[]);return t&&i.push("fc-draggable"),n&&i.push("fc-resizable"),i},getEventSkinCss:function(e){var t=this.view,n=e.source||{},r=e.color,i=n.color,a=t.opt("eventColor");return{"background-color":e.backgroundColor||r||n.backgroundColor||i||t.opt("eventBackgroundColor")||a,"border-color":e.borderColor||r||n.borderColor||i||t.opt("eventBorderColor")||a,color:e.textColor||n.textColor||t.opt("eventTextColor")}},eventsToSegs:function(e,t){var n,r=this.eventsToRanges(e),i=[];for(n=0;n<r.length;n++)i.push.apply(i,this.eventRangeToSegs(r[n],t));return i},eventsToRanges:function(e){var n=this,t=function(e){var t,n,r={};for(t=0;t<e.length;t++)n=e[t],(r[n._id]||(r[n._id]=[])).push(n);return r}(e),r=[];return M.each(t,function(e,t){t.length&&r.push.apply(r,"inverse-background"===ye(t[0])?n.eventsToInverseRanges(t):n.eventsToNormalRanges(t))}),r},eventsToNormalRanges:function(e){var t,n,r,i,a=this.view.calendar,o=[];for(t=0;t<e.length;t++)r=(n=e[t]).start.clone().stripZone(),i=a.getEventEnd(n).stripZone(),o.push({event:n,start:r,end:i,eventStartMS:+r,eventDurationMS:i-r});return o},eventsToInverseRanges:function(e){var t,n,r=this.view,i=r.start.clone().stripZone(),a=r.end.clone().stripZone(),o=this.eventsToNormalRanges(e),s=[],c=e[0],l=i;for(o.sort(we),t=0;t<o.length;t++)(n=o[t]).start>l&&s.push({event:c,start:l,end:n.start}),l=n.end;return l<a&&s.push({event:c,start:l,end:a}),s},eventRangeToSegs:function(e,t){var n,r,i;for(n=t?t(e):this.rangeToSegs(e),r=0;r<n.length;r++)(i=n[r]).event=e.event,i.eventStartMS=e.eventStartMS,i.eventDurationMS=e.eventDurationMS;return n}}),O.compareSegs=Ce,O.dataAttrPrefix="";var Ae=ve.extend({numbersVisible:!1,bottomCoordPadding:0,breakOnWeeks:null,cellDates:null,dayToCellOffsets:null,rowEls:null,dayEls:null,helperEls:null,constructor:function(){ve.apply(this,arguments),this.cellDuration=$.duration(1,"day")},renderDates:function(e){var t,n,r,i=this.view,a=this.rowCnt,o=a*this.colCnt,s="";for(t=0;t<a;t++)s+=this.dayRowHtml(t,e);for(this.el.html(s),this.rowEls=this.el.find(".fc-row"),this.dayEls=this.el.find(".fc-day"),n=0;n<o;n++)r=this.getCell(n),i.trigger("dayRender",null,r.start,this.dayEls.eq(n))},destroyDates:function(){this.destroySegPopover()},renderBusinessHours:function(){var e=this.view.calendar.getBusinessHoursEvents(!0),t=this.eventsToSegs(e);this.renderFill("businessHours",t,"bgevent")},dayRowHtml:function(e,t){var n=["fc-row","fc-week",this.view.widgetContentClass];return t&&n.push("fc-rigid"),'<div class="'+n.join(" ")+'"><div class="fc-bg"><table>'+this.rowHtml("day",e)+'</table></div><div class="fc-content-skeleton"><table>'+(this.numbersVisible?"<thead>"+this.rowHtml("number",e)+"</thead>":"")+"</table></div></div>"},dayCellHtml:function(e){return this.bgCellHtml(e)},computeColHeadFormat:function(){return 1<this.rowCnt?"ddd":1<this.colCnt?this.view.opt("dayOfMonthFormat"):"dddd"},computeEventTimeFormat:function(){return this.view.opt("extraSmallTimeFormat")},computeDisplayEventEnd:function(){return 1==this.colCnt},updateCells:function(){var e,t,n,r;if(this.updateCellDates(),e=this.cellDates,this.breakOnWeeks){for(t=e[0].day(),r=1;r<e.length&&e[r].day()!=t;r++);n=Math.ceil(e.length/r)}else n=1,r=e.length;this.rowCnt=n,this.colCnt=r},updateCellDates:function(){for(var e=this.view,t=this.start.clone(),n=[],r=-1,i=[];t.isBefore(this.end);)e.isHiddenDay(t)?i.push(r+.5):(r++,i.push(r),n.push(t.clone())),t.add(1,"days");this.cellDates=n,this.dayToCellOffsets=i},computeCellDate:function(e){var t=this.colCnt,n=e.row*t+(this.isRTL?t-e.col-1:e.col);return this.cellDates[n].clone()},getRowEl:function(e){return this.rowEls.eq(e)},getColEl:function(e){return this.dayEls.eq(e)},getCellDayEl:function(e){return this.dayEls.eq(e.row*this.colCnt+e.col)},computeRowCoords:function(){var e=ve.prototype.computeRowCoords.call(this);return e[e.length-1].bottom+=this.bottomCoordPadding,e},rangeToSegs:function(e){var t,n,r,i,a,o,s,c,l,u,f=this.isRTL,d=this.rowCnt,h=this.colCnt,p=[];for(e=this.view.computeDayRange(e),t=this.dateToCellOffset(e.start),n=this.dateToCellOffset(e.end.subtract(1,"days")),r=0;r<d;r++)a=(i=r*h)+h-1,c=Math.max(i,t),l=Math.min(a,n),(c=Math.ceil(c))<=(l=Math.floor(l))&&(o=c===t,s=l===n,c-=i,l-=i,u={row:r,isStart:o,isEnd:s},f?(u.leftCol=h-l-1,u.rightCol=h-c-1):(u.leftCol=c,u.rightCol=l),p.push(u));return p},dateToCellOffset:function(e){var t=this.dayToCellOffsets,n=e.diff(this.start,"days");return n<0?t[0]-1:n>=t.length?t[t.length-1]+1:t[n]},renderDrag:function(e,t){if(this.renderHighlight(this.view.calendar.ensureVisibleEventRange(e)),t&&!t.el.closest(this.el).length)return this.renderRangeHelper(e,t),this.applyDragOpacity(this.helperEls),!0},destroyDrag:function(){this.destroyHighlight(),this.destroyHelper()},renderEventResize:function(e,t){this.renderHighlight(e),this.renderRangeHelper(e,t)},destroyEventResize:function(){this.destroyHighlight(),this.destroyHelper()},renderHelper:function(e,a){var o,s=[],t=this.eventsToSegs([e]);t=this.renderFgSegEls(t),o=this.renderSegRows(t),this.rowEls.each(function(e,t){var n,r=M(t),i=M('<div class="fc-helper-skeleton"><table/></div>');n=a&&a.row===e?a.el.position().top:r.find(".fc-content-skeleton tbody").position().top,i.css("top",n).find("table").append(o[e].tbodyEl),r.append(i),s.push(i[0])}),this.helperEls=M(s)},destroyHelper:function(){this.helperEls&&(this.helperEls.remove(),this.helperEls=null)},fillSegTag:"td",renderFill:function(e,t,n){var r,i,a,o=[];for(t=this.renderFillSegEls(e,t),r=0;r<t.length;r++)i=t[r],a=this.renderFillRow(e,i,n),this.rowEls.eq(i.row).append(a),o.push(a[0]);return this.elsByFill[e]=M(o),t},renderFillRow:function(e,t,n){var r,i,a=this.colCnt,o=t.leftCol,s=t.rightCol+1;return n=n||e.toLowerCase(),i=(r=M('<div class="fc-'+n+'-skeleton"><table><tr/></table></div>')).find("tr"),0<o&&i.append('<td colspan="'+o+'"/>'),i.append(t.el.attr("colspan",s-o)),s<a&&i.append('<td colspan="'+(a-s)+'"/>'),this.bookendCells(i,e),r}});function Se(e,t){var n,r;for(n=0;n<t.length;n++)if((r=t[n]).leftCol<=e.rightCol&&r.rightCol>=e.leftCol)return!0;return!1}function Te(e,t){return e.leftCol-t.leftCol}Ae.mixin({rowStructs:null,destroyEvents:function(){this.destroySegPopover(),ve.prototype.destroyEvents.apply(this,arguments)},getEventSegs:function(){return ve.prototype.getEventSegs.call(this).concat(this.popoverSegs||[])},renderBgSegs:function(e){var t=M.grep(e,function(e){return e.event.allDay});return ve.prototype.renderBgSegs.call(this,t)},renderFgSegs:function(e){var n;return e=this.renderFgSegEls(e),n=this.rowStructs=this.renderSegRows(e),this.rowEls.each(function(e,t){M(t).find(".fc-content-skeleton > table").append(n[e].tbodyEl)}),e},destroyFgSegs:function(){for(var e,t=this.rowStructs||[];e=t.pop();)e.tbodyEl.remove();this.rowStructs=null},renderSegRows:function(e){var t,n,r=[];for(t=this.groupSegRows(e),n=0;n<t.length;n++)r.push(this.renderSegRow(n,t[n]));return r},fgSegHtml:function(e,t){var n,r,i=this.view,a=e.event,o=i.isEventDraggable(a),s=!t&&a.allDay&&e.isStart&&i.isEventResizableFromStart(a),c=!t&&a.allDay&&e.isEnd&&i.isEventResizableFromEnd(a),l=this.getSegClasses(e,o,s||c),u=P(this.getEventSkinCss(a)),f="";return l.unshift("fc-day-grid-event","fc-h-event"),e.isStart&&(n=this.getEventTimeText(a))&&(f='<span class="fc-time">'+E(n)+"</span>"),r='<span class="fc-title">'+(E(a.title||"")||"&nbsp;")+"</span>",'<a class="'+l.join(" ")+'"'+(a.url?' href="'+E(a.url)+'"':"")+(u?' style="'+u+'"':"")+'><div class="fc-content">'+(this.isRTL?r+" "+f:f+" "+r)+"</div>"+(s?'<div class="fc-resizer fc-start-resizer" />':"")+(c?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},renderSegRow:function(e,t){var n,r,i,a,o,s,c,l=this.colCnt,u=this.buildSegLevels(t),f=Math.max(1,u.length),d=M("<tbody/>"),h=[],p=[],m=[];function g(e){for(;i<e;)(c=(m[n-1]||[])[i])?c.attr("rowspan",parseInt(c.attr("rowspan")||1,10)+1):(c=M("<td/>"),a.append(c)),p[n][i]=c,m[n][i]=c,i++}for(n=0;n<f;n++){if(r=u[n],i=0,a=M("<tr/>"),h.push([]),p.push([]),m.push([]),r)for(o=0;o<r.length;o++){for(g((s=r[o]).leftCol),c=M('<td class="fc-event-container"/>').append(s.el),s.leftCol!=s.rightCol?c.attr("colspan",s.rightCol-s.leftCol+1):m[n][i]=c;i<=s.rightCol;)p[n][i]=c,h[n][i]=s,i++;a.append(c)}g(l),this.bookendCells(a,"eventSkeleton"),d.append(a)}return{row:e,tbodyEl:d,cellMatrix:p,segMatrix:h,segLevels:u,segs:t}},buildSegLevels:function(e){var t,n,r,i=[];for(e.sort(Ce),t=0;t<e.length;t++){for(n=e[t],r=0;r<i.length&&Se(n,i[r]);r++);(i[n.level=r]||(i[r]=[])).push(n)}for(r=0;r<i.length;r++)i[r].sort(Te);return i},groupSegRows:function(e){var t,n=[];for(t=0;t<this.rowCnt;t++)n.push([]);for(t=0;t<e.length;t++)n[e[t].row].push(e[t]);return n}}),Ae.mixin({segPopover:null,popoverSegs:null,destroySegPopover:function(){this.segPopover&&this.segPopover.hide()},limitRows:function(e){var t,n,r=this.rowStructs||[];for(t=0;t<r.length;t++)this.unlimitRow(t),!1!==(n=!!e&&("number"==typeof e?e:this.computeRowLevelLimit(t)))&&this.limitRow(t,n)},computeRowLevelLimit:function(e){var t,n,r,i=this.rowEls.eq(e).height(),a=this.rowStructs[e].tbodyEl.children();function o(e,t){r=Math.max(r,M(t).outerHeight())}for(t=0;t<a.length;t++)if(n=a.eq(t).removeClass("fc-limited"),r=0,n.find("> td > :first-child").each(o),n.position().top+r>i)return t;return!1},limitRow:function(t,n){var r,e,i,a,o,s,c,l,u,f,d,h,p,m,g,_,b=this,v=this.rowStructs[t],y=[],w=0;function C(e){for(;w<e;)r=b.getCell(t,w),(c=b.getCellSegs(r,n)).length&&(f=i[n-1][w],_=b.renderMoreLink(r,c),g=M("<div/>").append(_),f.append(g),y.push(g[0])),w++}if(n&&n<v.segLevels.length){for(e=v.segLevels[n-1],i=v.cellMatrix,a=v.tbodyEl.children().slice(n).addClass("fc-limited").get(),o=0;o<e.length;o++){for(C((s=e[o]).leftCol),u=[],l=0;w<=s.rightCol;)r=this.getCell(t,w),c=this.getCellSegs(r,n),u.push(c),l+=c.length,w++;if(l){for(d=(f=i[n-1][s.leftCol]).attr("rowspan")||1,h=[],p=0;p<u.length;p++)m=M('<td class="fc-more-cell"/>').attr("rowspan",d),c=u[p],r=this.getCell(t,s.leftCol+p),_=this.renderMoreLink(r,[s].concat(c)),g=M("<div/>").append(_),m.append(g),h.push(m[0]),y.push(m[0]);f.addClass("fc-limited").after(M(h)),a.push(f[0])}}C(this.colCnt),v.moreEls=M(y),v.limitedEls=M(a)}},unlimitRow:function(e){var t=this.rowStructs[e];t.moreEls&&(t.moreEls.remove(),t.moreEls=null),t.limitedEls&&(t.limitedEls.removeClass("fc-limited"),t.limitedEls=null)},renderMoreLink:function(c,l){var u=this,f=this.view;return M('<a class="fc-more"/>').text(this.getMoreLinkText(l.length)).on("click",function(e){var t=f.opt("eventLimitClick"),n=c.start,r=M(this),i=u.getCellDayEl(c),a=u.getCellSegs(c),o=u.resliceDaySegs(a,n),s=u.resliceDaySegs(l,n);"function"==typeof t&&(t=f.trigger("eventLimitClick",null,{date:n,dayEl:i,moreEl:r,segs:o,hiddenSegs:s},e)),"popover"===t?u.showSegPopover(c,r,o):"string"==typeof t&&f.calendar.zoomTo(n,t)})},showSegPopover:function(e,t,n){var r,i,a=this,o=this.view,s=t.parent();r=1==this.rowCnt?o.el:this.rowEls.eq(e.row),i={className:"fc-more-popover",content:this.renderSegPopoverContent(e,n),parentEl:this.el,top:r.offset().top,autoHide:!0,viewportConstrain:o.opt("popoverViewportConstrain"),hide:function(){a.segPopover.destroy(),a.segPopover=null,a.popoverSegs=null}},this.isRTL?i.right=s.offset().left+s.outerWidth()+1:i.left=s.offset().left-1,this.segPopover=new fe(i),this.segPopover.show()},renderSegPopoverContent:function(e,t){var n,r=this.view,i=r.opt("theme"),a=e.start.format(r.opt("dayPopoverFormat")),o=M('<div class="fc-header '+r.widgetHeaderClass+'"><span class="fc-close '+(i?"ui-icon ui-icon-closethick":"fc-icon fc-icon-x")+'"></span><span class="fc-title">'+E(a)+'</span><div class="fc-clear"/></div><div class="fc-body '+r.widgetContentClass+'"><div class="fc-event-container"></div></div>'),s=o.find(".fc-event-container");for(t=this.renderFgSegEls(t,!0),this.popoverSegs=t,n=0;n<t.length;n++)t[n].cell=e,s.append(t[n].el);return o},resliceDaySegs:function(e,t){var n=M.map(e,function(e){return e.event}),r=t.clone().stripTime(),i=r.clone().add(1,"days"),a={start:r,end:i};return(e=this.eventsToSegs(n,function(e){var t=v(e,a);return t?[t]:[]})).sort(Ce),e},getMoreLinkText:function(e){var t=this.view.opt("eventLimitText");return"function"==typeof t?t(e):"+"+e+" "+t},getCellSegs:function(e,t){for(var n,r=this.rowStructs[e.row].segMatrix,i=t||0,a=[];i<r.length;)(n=r[i][e.col])&&a.push(n),i++;return a}});var xe=ve.extend({slotDuration:null,snapDuration:null,minTime:null,maxTime:null,axisFormat:null,dayEls:null,slatEls:null,slatTops:null,helperEl:null,businessHourSegs:null,constructor:function(){ve.apply(this,arguments),this.processOptions()},renderDates:function(){this.el.html(this.renderHtml()),this.dayEls=this.el.find(".fc-day"),this.slatEls=this.el.find(".fc-slats tr")},renderBusinessHours:function(){var e=this.view.calendar.getBusinessHoursEvents();this.businessHourSegs=this.renderFill("businessHours",this.eventsToSegs(e),"bgevent")},renderHtml:function(){return'<div class="fc-bg"><table>'+this.rowHtml("slotBg")+'</table></div><div class="fc-slats"><table>'+this.slatRowHtml()+"</table></div>"},slotBgCellHtml:function(e){return this.bgCellHtml(e)},slatRowHtml:function(){for(var e,t,n,r=this.view,i=this.isRTL,a="",o=this.slotDuration.asMinutes()%15==0,s=$.duration(+this.minTime);s<this.maxTime;)t=(e=this.start.clone().time(s)).minutes(),n='<td class="fc-axis fc-time '+r.widgetContentClass+'" '+r.axisStyleAttr()+">"+(o&&t?"":"<span>"+E(e.format(this.axisFormat))+"</span>")+"</td>",a+="<tr "+(t?'class="fc-minor"':"")+">"+(i?"":n)+'<td class="'+r.widgetContentClass+'"/>'+(i?n:"")+"</tr>",s.add(this.slotDuration);return a},processOptions:function(){var e=this.view,t=e.opt("slotDuration"),n=e.opt("snapDuration");t=$.duration(t),n=n?$.duration(n):t,this.slotDuration=t,this.snapDuration=n,this.cellDuration=n,this.minTime=$.duration(e.opt("minTime")),this.maxTime=$.duration(e.opt("maxTime")),this.axisFormat=e.opt("axisFormat")||e.opt("smallTimeFormat")},computeColHeadFormat:function(){return 1<this.colCnt?this.view.opt("dayOfMonthFormat"):"dddd"},computeEventTimeFormat:function(){return this.view.opt("noMeridiemTimeFormat")},computeDisplayEventEnd:function(){return!0},updateCells:function(){var e,t=this.view,n=[];for(e=this.start.clone();e.isBefore(this.end);)n.push({day:e.clone()}),e.add(1,"day"),e=t.skipHiddenDays(e);this.isRTL&&n.reverse(),this.colData=n,this.colCnt=n.length,this.rowCnt=Math.ceil((this.maxTime-this.minTime)/this.snapDuration)},computeCellDate:function(e){var t=this.computeSnapTime(e.row);return this.view.calendar.rezoneDate(e.day).time(t)},getColEl:function(e){return this.dayEls.eq(e)},computeSnapTime:function(e){return $.duration(this.minTime+this.snapDuration*e)},rangeToSegs:function(e){var t,n,r,i=this.colCnt,a=[];for(e={start:e.start.clone().stripZone(),end:e.end.clone().stripZone()},n=0;n<i;n++)(t=v(e,{start:(r=this.colData[n].day).clone().time(this.minTime),end:r.clone().time(this.maxTime)}))&&(t.col=n,a.push(t));return a},updateSize:function(e){this.computeSlatTops(),e&&this.updateSegVerticals()},computeRowCoords:function(){var e,t,n=this.el.offset().top,r=[];for(e=0;e<this.rowCnt;e++)t={top:n+this.computeTimeTop(this.computeSnapTime(e))},0<e&&(r[e-1].bottom=t.top),r.push(t);return t.bottom=t.top+this.computeTimeTop(this.computeSnapTime(e)),r},computeDateTop:function(e,t){return this.computeTimeTop($.duration(e.clone().stripZone()-t.clone().stripTime()))},computeTimeTop:function(e){var t,n,r,i=(e-this.minTime)/this.slotDuration;return i=Math.max(0,i),n=(i=Math.min(this.slatEls.length,i))-(t=Math.floor(i)),r=this.slatTops[t],n?r+(this.slatTops[t+1]-r)*n:r},computeSlatTops:function(){var n,r=[];this.slatEls.each(function(e,t){n=M(t).position().top,r.push(n)}),r.push(n+this.slatEls.last().outerHeight()),this.slatTops=r},renderDrag:function(e,t){if(t)return this.renderRangeHelper(e,t),this.applyDragOpacity(this.helperEl),!0;this.renderHighlight(this.view.calendar.ensureVisibleEventRange(e))},destroyDrag:function(){this.destroyHelper(),this.destroyHighlight()},renderEventResize:function(e,t){this.renderRangeHelper(e,t)},destroyEventResize:function(){this.destroyHelper()},renderHelper:function(e,t){var n,r,i,a,o=this.eventsToSegs([e]);for(o=this.renderFgSegEls(o),n=this.renderSegTable(o),r=0;r<o.length;r++)i=o[r],t&&t.col===i.col&&(a=t.el,i.el.css({left:a.css("left"),right:a.css("right"),"margin-left":a.css("margin-left"),"margin-right":a.css("margin-right")}));this.helperEl=M('<div class="fc-helper-skeleton"/>').append(n).appendTo(this.el)},destroyHelper:function(){this.helperEl&&(this.helperEl.remove(),this.helperEl=null)},renderSelection:function(e){this.view.opt("selectHelper")?this.renderRangeHelper(e):this.renderHighlight(e)},destroySelection:function(){this.destroyHelper(),this.destroyHighlight()},renderFill:function(e,t,n){var r,i,a,o,s,c,l,u,f,d;if(t.length){for(t=this.renderFillSegEls(e,t),r=this.groupSegCols(t),n=n||e.toLowerCase(),a=(i=M('<div class="fc-'+n+'-skeleton"><table><tr/></table></div>')).find("tr"),o=0;o<r.length;o++)if(s=r[o],c=M("<td/>").appendTo(a),s.length)for(l=M('<div class="fc-'+n+'-container"/>').appendTo(c),u=this.colData[o].day,f=0;f<s.length;f++)d=s[f],l.append(d.el.css({top:this.computeDateTop(d.start,u),bottom:-this.computeDateTop(d.end,u)}));this.bookendCells(a,e),this.el.append(i),this.elsByFill[e]=i}return t}});function ke(e){var t,n,r;if(e.sort(Ce),function(e){var t,n,r,i,a;for(t=0;t<e.length;t++)for(n=e[t],r=0;r<n.length;r++)for((i=n[r]).forwardSegs=[],a=t+1;a<e.length;a++)Ie(i,e[a],i.forwardSegs)}(t=function(e){var t,n,r,i=[];for(t=0;t<e.length;t++){for(n=e[t],r=0;r<i.length&&Ie(n,i[r]).length;r++);n.level=r,(i[r]||(i[r]=[])).push(n)}return i}(e)),n=t[0]){for(r=0;r<n.length;r++)Ee(n[r]);for(r=0;r<n.length;r++)De(n[r],0,0)}}function Ee(e){var t,n,r=e.forwardSegs,i=0;if(void 0===e.forwardPressure){for(t=0;t<r.length;t++)Ee(n=r[t]),i=Math.max(i,1+n.forwardPressure);e.forwardPressure=i}}function De(e,t,n){var r,i=e.forwardSegs;if(void 0===e.forwardCoord)for(i.length?(i.sort(Pe),De(i[0],t+1,n),e.forwardCoord=i[0].backwardCoord):e.forwardCoord=1,e.backwardCoord=e.forwardCoord-(e.forwardCoord-n)/(t+1),r=0;r<i.length;r++)De(i[r],0,e.forwardCoord)}function Ie(e,t,n){n=n||[];for(var r=0;r<t.length;r++)i=e,a=t[r],i.bottom>a.top&&i.top<a.bottom&&n.push(t[r]);var i,a;return n}function Pe(e,t){return t.forwardPressure-e.forwardPressure||(e.backwardCoord||0)-(t.backwardCoord||0)||Ce(e,t)}xe.mixin({eventSkeletonEl:null,renderFgSegs:function(e){return e=this.renderFgSegEls(e),this.el.append(this.eventSkeletonEl=M('<div class="fc-content-skeleton"/>').append(this.renderSegTable(e))),e},destroyFgSegs:function(e){this.eventSkeletonEl&&(this.eventSkeletonEl.remove(),this.eventSkeletonEl=null)},renderSegTable:function(e){var t,n,r,i,a,o,s=M("<table><tr/></table>"),c=s.find("tr");for(t=this.groupSegCols(e),this.computeSegVerticals(e),i=0;i<t.length;i++){for(ke(a=t[i]),o=M('<div class="fc-event-container"/>'),n=0;n<a.length;n++)(r=a[n]).el.css(this.generateSegPositionCss(r)),r.bottom-r.top<30&&r.el.addClass("fc-short"),o.append(r.el);c.append(M("<td/>").append(o))}return this.bookendCells(c,"eventSkeleton"),s},updateSegVerticals:function(){var e,t=(this.segs||[]).concat(this.businessHourSegs||[]);for(this.computeSegVerticals(t),e=0;e<t.length;e++)t[e].el.css(this.generateSegVerticalCss(t[e]))},computeSegVerticals:function(e){var t,n;for(t=0;t<e.length;t++)(n=e[t]).top=this.computeDateTop(n.start,n.start),n.bottom=this.computeDateTop(n.end,n.start)},fgSegHtml:function(e,t){var n,r,i,a=this.view,o=e.event,s=a.isEventDraggable(o),c=!t&&e.isStart&&a.isEventResizableFromStart(o),l=!t&&e.isEnd&&a.isEventResizableFromEnd(o),u=this.getSegClasses(e,s,c||l),f=P(this.getEventSkinCss(o));return u.unshift("fc-time-grid-event","fc-v-event"),a.isMultiDayEvent(o)?(e.isStart||e.isEnd)&&(n=this.getEventTimeText(e),r=this.getEventTimeText(e,"LT"),i=this.getEventTimeText(e,null,!1)):(n=this.getEventTimeText(o),r=this.getEventTimeText(o,"LT"),i=this.getEventTimeText(o,null,!1)),'<a class="'+u.join(" ")+'"'+(o.url?' href="'+E(o.url)+'"':"")+(f?' style="'+f+'"':"")+'><div class="fc-content">'+(n?'<div class="fc-time" data-start="'+E(i)+'" data-full="'+E(r)+'"><span>'+E(n)+"</span></div>":"")+(o.title?'<div class="fc-title">'+E(o.title)+"</div>":"")+'</div><div class="fc-bg"/>'+(l?'<div class="fc-resizer fc-end-resizer" />':"")+"</a>"},generateSegPositionCss:function(e){var t,n,r=this.view.opt("slotEventOverlap"),i=e.backwardCoord,a=e.forwardCoord,o=this.generateSegVerticalCss(e);return r&&(a=Math.min(1,i+2*(a-i))),n=this.isRTL?(t=1-a,i):(t=i,1-a),o.zIndex=e.level+1,o.left=100*t+"%",o.right=100*n+"%",r&&e.forwardPressure&&(o[this.isRTL?"marginLeft":"marginRight"]=20),o},generateSegVerticalCss:function(e){return{top:e.top,bottom:-e.bottom}},groupSegCols:function(e){var t,n=[];for(t=0;t<this.colCnt;t++)n.push([]);for(t=0;t<e.length;t++)n[e[t].col].push(e[t]);return n}});var Me=O.View=ue.extend({type:null,name:null,title:null,calendar:null,options:null,coordMap:null,el:null,isDisplayed:!1,isSkeletonRendered:!1,isEventsRendered:!1,start:null,end:null,intervalStart:null,intervalEnd:null,intervalDuration:null,intervalUnit:null,isSelected:!1,scrollerEl:null,scrollTop:null,widgetHeaderClass:null,widgetContentClass:null,highlightStateClass:null,nextDayThreshold:null,isHiddenDayHash:null,documentMousedownProxy:null,constructor:function(e,t,n,r){this.calendar=e,this.type=this.name=t,this.options=n,this.intervalDuration=r||$.duration(1,"day"),this.nextDayThreshold=$.duration(this.opt("nextDayThreshold")),this.initThemingProps(),this.initHiddenDays(),this.documentMousedownProxy=U(this,"documentMousedown"),this.initialize()},initialize:function(){},opt:function(e){return this.options[e]},trigger:function(e,t){var n=this.calendar;return n.trigger.apply(n,[e,t||this].concat(Array.prototype.slice.call(arguments,2),[this]))},setDate:function(e){this.setRange(this.computeRange(e))},setRange:function(e){M.extend(this,e),this.updateTitle()},computeRange:function(e){var t,n,r=C(this.intervalDuration),i=e.clone().startOf(r),a=i.clone().add(this.intervalDuration);return/year|month|week|day/.test(r)?(i.stripTime(),a.stripTime()):(i.hasTime()||(i=this.calendar.rezoneDate(i)),a.hasTime()||(a=this.calendar.rezoneDate(a))),t=i.clone(),t=this.skipHiddenDays(t),n=a.clone(),{intervalUnit:r,intervalStart:i,intervalEnd:a,start:t,end:n=this.skipHiddenDays(n,-1,!0)}},computePrevDate:function(e){return this.massageCurrentDate(e.clone().startOf(this.intervalUnit).subtract(this.intervalDuration),-1)},computeNextDate:function(e){return this.massageCurrentDate(e.clone().startOf(this.intervalUnit).add(this.intervalDuration))},massageCurrentDate:function(e,t){return this.intervalDuration.as("days")<=1&&this.isHiddenDay(e)&&(e=this.skipHiddenDays(e,t)).startOf("day"),e},updateTitle:function(){this.title=this.computeTitle()},computeTitle:function(){return this.formatRange({start:this.intervalStart,end:this.intervalEnd},this.opt("titleFormat")||this.computeTitleFormat(),this.opt("titleRangeSeparator"))},computeTitleFormat:function(){return"year"==this.intervalUnit?"YYYY":"month"==this.intervalUnit?this.opt("monthYearFormat"):1<this.intervalDuration.as("days")?"ll":"LL"},formatRange:function(e,t,n){var r=e.end;return r.hasTime()||(r=r.clone().subtract(1)),ae(e.start,r,t,n,this.opt("isRTL"))},setElement:function(e){this.el=e,this.bindGlobalHandlers()},removeElement:function(){this.clear(),this.isSkeletonRendered&&(this.destroySkeleton(),this.isSkeletonRendered=!1),this.unbindGlobalHandlers(),this.el.remove()},display:function(e){var t=null;this.isDisplayed&&(t=this.queryScroll()),this.clear(),this.setDate(e),this.render(),this.updateSize(),this.renderBusinessHours(),this.isDisplayed=!0,t=this.computeInitialScroll(t),this.forceScroll(t),this.triggerRender()},clear:function(){this.isDisplayed&&(this.unselect(),this.clearEvents(),this.triggerDestroy(),this.destroyBusinessHours(),this.destroy(),this.isDisplayed=!1)},render:function(){this.isSkeletonRendered||(this.renderSkeleton(),this.isSkeletonRendered=!0),this.renderDates()},destroy:function(){this.destroyDates()},renderSkeleton:function(){},destroySkeleton:function(){},renderDates:function(){},destroyDates:function(){},renderBusinessHours:function(){},destroyBusinessHours:function(){},triggerRender:function(){this.trigger("viewRender",this,this,this.el)},triggerDestroy:function(){this.trigger("viewDestroy",this,this,this.el)},bindGlobalHandlers:function(){M(document).on("mousedown",this.documentMousedownProxy)},unbindGlobalHandlers:function(){M(document).off("mousedown",this.documentMousedownProxy)},initThemingProps:function(){var e=this.opt("theme")?"ui":"fc";this.widgetHeaderClass=e+"-widget-header",this.widgetContentClass=e+"-widget-content",this.highlightStateClass=e+"-state-highlight"},updateSize:function(e){var t;e&&(t=this.queryScroll()),this.updateHeight(),this.updateWidth(),e&&this.setScroll(t)},updateWidth:function(){},updateHeight:function(){var e=this.calendar;this.setHeight(e.getSuggestedViewHeight(),e.isHeightAuto())},setHeight:function(e,t){},computeScrollerHeight:function(e){var t,n,r=this.scrollerEl;return(t=this.el.add(r)).css({position:"relative",left:-1}),n=this.el.outerHeight()-r.height(),t.css({position:"",left:""}),e-n},computeInitialScroll:function(e){return 0},queryScroll:function(){if(this.scrollerEl)return this.scrollerEl.scrollTop()},setScroll:function(e){if(this.scrollerEl)return this.scrollerEl.scrollTop(e)},forceScroll:function(e){var t=this;this.setScroll(e),setTimeout(function(){t.setScroll(e)},0)},displayEvents:function(e){var t=this.queryScroll();this.clearEvents(),this.renderEvents(e),this.isEventsRendered=!0,this.setScroll(t),this.triggerEventRender()},clearEvents:function(){this.isEventsRendered&&(this.triggerEventDestroy(),this.destroyEvents(),this.isEventsRendered=!1)},renderEvents:function(e){},destroyEvents:function(){},triggerEventRender:function(){this.renderedEventSegEach(function(e){this.trigger("eventAfterRender",e.event,e.event,e.el)}),this.trigger("eventAfterAllRender")},triggerEventDestroy:function(){this.renderedEventSegEach(function(e){this.trigger("eventDestroy",e.event,e.event,e.el)})},resolveEventEl:function(e,t){var n=this.trigger("eventRender",e,e,t);return!1===n?t=null:n&&!0!==n&&(t=M(n)),t},showEvent:function(e){this.renderedEventSegEach(function(e){e.el.css("visibility","")},e)},hideEvent:function(e){this.renderedEventSegEach(function(e){e.el.css("visibility","hidden")},e)},renderedEventSegEach:function(e,t){var n,r=this.getEventSegs();for(n=0;n<r.length;n++)t&&r[n].event._id!==t._id||r[n].el&&e.call(this,r[n])},getEventSegs:function(){return[]},isEventDraggable:function(e){var t=e.source||{};return G(e.startEditable,t.startEditable,this.opt("eventStartEditable"),e.editable,t.editable,this.opt("editable"))},reportEventDrop:function(e,t,n,r,i){var a=this.calendar,o=a.mutateEvent(e,t,n);this.triggerEventDrop(e,o.dateDelta,function(){o.undo(),a.reportEventChange()},r,i),a.reportEventChange()},triggerEventDrop:function(e,t,n,r,i){this.trigger("eventDrop",r[0],e,t,n,i,{})},reportExternalDrop:function(e,t,n,r,i){var a,o,s=e.eventProps;s&&(a=M.extend({},s,t),o=this.calendar.renderEvent(a,e.stick)[0]),this.triggerExternalDrop(o,t,n,r,i)},triggerExternalDrop:function(e,t,n,r,i){this.trigger("drop",n[0],t.start,r,i),e&&this.trigger("eventReceive",null,e)},renderDrag:function(e,t){},destroyDrag:function(){},isEventResizableFromStart:function(e){return this.opt("eventResizableFromStart")&&this.isEventResizable(e)},isEventResizableFromEnd:function(e){return this.isEventResizable(e)},isEventResizable:function(e){var t=e.source||{};return G(e.durationEditable,t.durationEditable,this.opt("eventDurationEditable"),e.editable,t.editable,this.opt("editable"))},reportEventResize:function(e,t,n,r,i){var a=this.calendar,o=a.mutateEvent(e,t,n);this.triggerEventResize(e,o.durationDelta,function(){o.undo(),a.reportEventChange()},r,i),a.reportEventChange()},triggerEventResize:function(e,t,n,r,i){this.trigger("eventResize",r[0],e,t,n,i,{})},select:function(e,t){this.unselect(t),this.renderSelection(e),this.reportSelection(e,t)},renderSelection:function(e){},reportSelection:function(e,t){this.isSelected=!0,this.trigger("select",null,e.start,e.end,t)},unselect:function(e){this.isSelected&&(this.isSelected=!1,this.destroySelection(),this.trigger("unselect",null,e))},destroySelection:function(){},documentMousedown:function(e){var t;this.isSelected&&this.opt("unselectAuto")&&b(e)&&((t=this.opt("unselectCancel"))&&M(e.target).closest(t).length||this.unselect(e))},initHiddenDays:function(){var e,t=this.opt("hiddenDays")||[],n=[],r=0;for(!1===this.opt("weekends")&&t.push(0,6),e=0;e<7;e++)(n[e]=-1!==M.inArray(e,t))||r++;if(!r)throw"invalid hiddenDays";this.isHiddenDayHash=n},isHiddenDay:function(e){return $.isMoment(e)&&(e=e.day()),this.isHiddenDayHash[e]},skipHiddenDays:function(e,t,n){var r=e.clone();for(t=t||1;this.isHiddenDayHash[(r.day()+(n?t:0)+7)%7];)r.add(t,"days");return r},computeDayRange:function(e){var t,n=e.start.clone().stripTime(),r=e.end,i=null;return r&&(i=r.clone().stripTime(),(t=+r.time())&&t>=this.nextDayThreshold&&i.add(1,"days")),(!r||i<=n)&&(i=n.clone().add(1,"days")),{start:n,end:i}},isMultiDayEvent:function(e){var t=this.computeDayRange(e);return 1<t.end.diff(t.start,"days")}}),$e=O.Calendar=O.CalendarBase=ue.extend({dirDefaults:null,langDefaults:null,overrides:null,options:null,viewSpecCache:null,view:null,header:null,constructor:function(e,t){var r=this;r.initOptions(t||{});var n=this.options;r.render=function(){l?y()&&(A(),w()):function(){n.theme?"ui":"fc",e.addClass("fc"),n.isRTL?e.addClass("fc-rtl"):e.addClass("fc-ltr");n.theme?e.addClass("ui-widget"):e.addClass("fc-unthemed");l=M("<div class='fc-view-container'/>").prependTo(e),s=r.header=new je(r,n),(c=s.render())&&e.prepend(c);w(n.defaultView),n.handleWindowResize&&(d=H(T,n.windowResizeDelay),M(window).resize(d))}()},r.destroy=function(){u&&u.removeElement();s.destroy(),l.remove(),e.removeClass("fc fc-ltr fc-rtl fc-unthemed ui-widget"),d&&M(window).unbind("resize",d)},r.refetchEvents=function(){E(),u.clearEvents(),D(),k()},r.reportEvents=function(e){v=e,x()},r.reportEventChange=function(){x()},r.rerenderEvents=x,r.changeView=w,r.select=function(e,t){e=r.moment(e),t=t?r.moment(t):e.hasTime()?e.clone().add(r.defaultTimedEventDuration):e.clone().add(r.defaultAllDayEventDuration);u.select({start:e,end:t})},r.unselect=function(){u&&u.unselect()},r.prev=function(){h=u.computePrevDate(h),w()},r.next=function(){h=u.computeNextDate(h),w()},r.prevYear=function(){h.add(-1,"years"),w()},r.nextYear=function(){h.add(1,"years"),w()},r.today=function(){h=r.getNow(),w()},r.gotoDate=function(e){h=r.moment(e),w()},r.incrementDate=function(e){h.add($.duration(e)),w()},r.zoomTo=function(e,t){var n;t=t||"day",n=r.getViewSpec(t)||r.getUnitViewSpec(t),h=e,w(n?n.type:null)},r.getDate=function(){return h.clone()},r.getCalendar=function(){return r},r.getView=function(){return u},r.option=function(e,t){if(void 0===t)return n[e];"height"!=e&&"contentHeight"!=e&&"aspectRatio"!=e||(n[e]=t,C(!0))},r.trigger=function(e,t){if(n[e])return n[e].apply(t||g,Array.prototype.slice.call(arguments,2))};var i=I(Ge(n.lang));n.monthNames&&(i._months=n.monthNames);n.monthNamesShort&&(i._monthsShort=n.monthNamesShort);n.dayNames&&(i._weekdays=n.dayNames);n.dayNamesShort&&(i._weekdaysShort=n.dayNamesShort);if(null!=n.firstDay){var a=I(i._week);a.dow=n.firstDay,i._week=a}i._fullCalendar_weekCalc=(o=n.weekNumberCalculation,"function"==typeof o?o:"local"===o?o:"iso"===o||"ISO"===o?"ISO":void 0),r.defaultAllDayEventDuration=$.duration(n.defaultAllDayEventDuration),r.defaultTimedEventDuration=$.duration(n.defaultTimedEventDuration),r.moment=function(){var e;return"local"===n.timezone?(e=O.moment.apply(null,arguments)).hasTime()&&e.local():e="UTC"===n.timezone?O.moment.utc.apply(null,arguments):O.moment.parseZone.apply(null,arguments),"_locale"in e?e._locale=i:e._lang=i,e},r.getIsAmbigTimezone=function(){return"local"!==n.timezone&&"UTC"!==n.timezone},r.rezoneDate=function(e){return r.moment(e.toArray())},r.getNow=function(){var e=n.now;return"function"==typeof e&&(e=e()),r.moment(e)},r.getEventEnd=function(e){return e.end?e.end.clone():r.getDefaultEventEnd(e.allDay,e.start)},r.getDefaultEventEnd=function(e,t){var n=t.clone();return e?n.stripTime().add(r.defaultAllDayEventDuration):n.add(r.defaultTimedEventDuration),r.getIsAmbigTimezone()&&n.stripZone(),n},r.humanizeDuration=function(e){return(e.locale||e.lang).call(e,n.lang).humanize()},function(g){var v=this;v.isFetchNeeded=function(e,t){return!_||e.clone().stripZone()<_.clone().stripZone()||t.clone().stripZone()>b.clone().stripZone()},v.fetchEvents=function(e,t){_=e,b=t,u=[];var n=++c,r=a.length;l=r;for(var i=0;i<r;i++)f(a[i],n)},v.addEventSource=function(e){var t=r(e);t&&(a.push(t),l++,f(t,c))},v.removeEventSource=function(t){a=M.grep(a,function(e){return!i(e,t)}),u=M.grep(u,function(e){return!i(e.source,t)}),s(u)},v.updateEvent=function(e){e.start=v.moment(e.start),e.end?e.end=v.moment(e.end):e.end=null;k(e,(t=e,r={},M.each(t,function(e,t){var n;h(e)&&void 0!==t&&(n=t,/undefined|null|boolean|number|string/.test(M.type(n)))&&(r[e]=t)}),r)),s(u);var t,r},v.renderEvent=function(e,t){var n,r,i,a=A(e);if(a){for(n=x(a),r=0;r<n.length;r++)(i=n[r]).source||(t&&(o.events.push(i),i.source=o),u.push(i));return s(u),n}return[]},v.removeEvents=function(e){var t,n;null==e?e=function(){return!0}:M.isFunction(e)||(t=e+"",e=function(e){return e._id==t});for(u=M.grep(u,e,!0),n=0;n<a.length;n++)M.isArray(a[n].events)&&(a[n].events=M.grep(a[n].events,e,!0));s(u)},v.clientEvents=y,v.mutateEvent=k,v.normalizeEventRange=m,v.normalizeEventRangeTimes=S,v.ensureVisibleEventRange=T;var _,b,e=v.trigger,t=v.getView,s=v.reportEvents,o={events:[]},a=[o],c=0,l=0,n=0,u=[];function f(a,o){!function e(t,n){var r;var i=O.sourceFetchers;var a;for(r=0;r<i.length;r++){if(!0===(a=i[r].call(v,t,_.clone(),b.clone(),g.timezone,n)))return;if("object"==typeof a)return void e(a,n)}var o=t.events;if(o)M.isFunction(o)?(w(),o.call(v,_.clone(),b.clone(),g.timezone,function(e){n(e),C()})):M.isArray(o)?n(o):n();else{var s=t.url;if(s){var c,l=t.success,u=t.error,f=t.complete;c=M.isFunction(t.data)?t.data():t.data;var d=M.extend({},c||{}),h=G(t.startParam,g.startParam),p=G(t.endParam,g.endParam),m=G(t.timezoneParam,g.timezoneParam);h&&(d[h]=_.format()),p&&(d[p]=b.format()),g.timezone&&"local"!=g.timezone&&(d[m]=g.timezone),w(),M.ajax(M.extend({},Be,t,{data:d,success:function(e){e=e||[];var t=F(l,this,arguments);M.isArray(t)&&(e=t),n(e)},error:function(){F(u,this,arguments),n()},complete:function(){F(f,this,arguments),C()}}))}else n()}}(a,function(e){var t,n,r,i=M.isArray(a.events);if(o==c){if(e)for(t=0;t<e.length;t++)n=e[t],(r=i?n:A(n,a))&&u.push.apply(u,x(r));--l||s(u)}})}function r(e){var t,n,r=O.sourceNormalizers;if(M.isFunction(e)||M.isArray(e)?t={events:e}:"string"==typeof e?t={url:e}:"object"==typeof e&&(t=M.extend({},e)),t){for(t.className?"string"==typeof t.className&&(t.className=t.className.split(/\s+/)):t.className=[],M.isArray(t.events)&&(t.origArray=t.events,t.events=M.map(t.events,function(e){return A(e,t)})),n=0;n<r.length;n++)r[n].call(v,t);return t}}function i(e,t){return e&&t&&d(e)==d(t)}function d(e){return("object"==typeof e?e.origArray||e.googleCalendarId||e.url||e.events:null)||e}function h(e){return!/^_|^(id|allDay|start|end)$/.test(e)}function y(t){return M.isFunction(t)?M.grep(u,t):null!=t?(t+="",M.grep(u,function(e){return e._id==t})):u}function w(){n++||e("loading",null,!0,t())}function C(){--n||e("loading",null,!1,t())}function A(e,t){var n,r,i,a={};if(g.eventDataTransform&&(e=g.eventDataTransform(e)),t&&t.eventDataTransform&&(e=t.eventDataTransform(e)),M.extend(a,e),t&&(a.source=t),a._id=e._id||(void 0===e.id?"_fc"+Ue++:e.id+""),e.className?"string"==typeof e.className?a.className=e.className.split(/\s+/):a.className=e.className:a.className=[],n=e.start||e.date,r=e.end,L(n)&&(n=$.duration(n)),L(r)&&(r=$.duration(r)),e.dow||$.isDuration(n)||$.isDuration(r))a.start=n?$.duration(n):null,a.end=r?$.duration(r):null,a._recurring=!0;else{if(n&&!(n=v.moment(n)).isValid())return!1;r&&((r=v.moment(r)).isValid()||(r=null)),void 0===(i=e.allDay)&&(i=G(t?t.allDayDefault:void 0,g.allDayDefault)),p(n,r,i,a)}return a}function p(e,t,n,r){r.start=e,r.end=t,r.allDay=n,m(r),He(r)}function m(e){S(e),e.end&&!e.end.isAfter(e.start)&&(e.end=null),e.end||(g.forceEventDuration?e.end=v.getDefaultEventEnd(e.allDay,e.start):e.end=null)}function S(e){null==e.allDay&&(e.allDay=!(e.start.hasTime()||e.end&&e.end.hasTime())),e.allDay?(e.start.stripTime(),e.end&&e.end.stripTime()):(e.start.hasTime()||(e.start=v.rezoneDate(e.start)),e.end&&!e.end.hasTime()&&(e.end=v.rezoneDate(e.end)))}function T(e){var t;return e.end||(null==(t=e.allDay)&&(t=!e.start.hasTime()),(e=M.extend({},e)).end=v.getDefaultEventEnd(t,e.start)),e}function x(e,t,n){var r,i,a,o,s,c,l,u,f,d=[];if(t=t||_,n=n||b,e)if(e._recurring){if(i=e.dow)for(r={},a=0;a<i.length;a++)r[i[a]]=!0;for(o=t.clone().stripTime();o.isBefore(n);)r&&!r[o.day()]||(s=e.start,c=e.end,l=o.clone(),u=null,s&&(l=l.time(s)),c&&(u=o.clone().time(c)),f=M.extend({},e),p(l,u,!s&&!c,f),d.push(f)),o.add(1,"days")}else d.push(e);return d}function k(e,i,a){var t,n,r,o,s,c={};function l(e,t){return a?N(e,t,a):i.allDay?(n=e,r=t,$.duration({days:n.clone().stripTime().diff(r.clone().stripTime(),"days")})):R(e,t);var n,r}return(i=i||{}).start||(i.start=e.start.clone()),void 0===i.end&&(i.end=e.end?e.end.clone():null),null==i.allDay&&(i.allDay=e.allDay),m(i),m(t={start:e._start.clone(),end:e._end?e._end.clone():v.getDefaultEventEnd(e._allDay,e._start),allDay:i.allDay}),n=null!==e._end&&null===i.end,r=l(i.start,t.start),o=i.end?l(i.end,t.end).subtract(r):null,M.each(i,function(e,t){h(e)&&void 0!==t&&(c[e]=t)}),s=function(e,i,a,o,s,c){var l=v.getIsAmbigTimezone(),u=[];o&&!o.valueOf()&&(o=null);s&&!s.valueOf()&&(s=null);return M.each(e,function(e,t){var n,r;n={start:t.start.clone(),end:t.end?t.end.clone():null,allDay:t.allDay},M.each(c,function(e){n[e]=t[e]}),m(r={start:t._start,end:t._end,allDay:a}),i?r.end=null:s&&!r.end&&(r.end=v.getDefaultEventEnd(r.allDay,r.start)),o&&(r.start.add(o),r.end&&r.end.add(o)),s&&r.end.add(s),l&&!r.allDay&&(o||s)&&(r.start.stripZone(),r.end&&r.end.stripZone()),M.extend(t,c,r),He(t),u.push(function(){M.extend(t,n),He(t)})}),function(){for(var e=0;e<u.length;e++)u[e]()}}(y(e._id),n,i.allDay,r,o,c),{dateDelta:r,durationDelta:o,undo:s}}function E(e){var t,n=g.businessHours,r=v.getView();return n&&(t=M.extend({},{className:"fc-nonbusiness",start:"09:00",end:"17:00",dow:[1,2,3,4,5],rendering:"inverse-background"},"object"==typeof n?n:{})),t?(e&&(t.start=null,t.end=null),x(A(t),r.start,r.end)):[]}function D(e,t){var n=t.source||{},r=G(t.constraint,n.constraint,g.eventConstraint),i=G(t.overlap,n.overlap,g.eventOverlap);return P(e=T(e),r,i,t)}function I(e){return P(e,g.selectConstraint,g.selectOverlap)}function P(e,t,n,r){var i,a,o,s,c,l,u,f,d,h,p,m,g,_,b;if((e=M.extend({},e)).start=e.start.clone().stripZone(),e.end=e.end.clone().stripZone(),null!=t){for(i="businessHours"!==(p=t)?"object"!=typeof p?y(p):x(A(p)):E(),a=!1,s=0;s<i.length;s++)if(u=i[s],f=e,void 0,d=u.start.clone().stripZone(),h=v.getEventEnd(u).stripZone(),f.start>=d&&f.end<=h){a=!0;break}if(!a)return!1}for(o=v.getPeerEvents(r,e),s=0;s<o.length;s++)if(c=o[s],g=e,void 0,_=(m=c).start.clone().stripZone(),b=v.getEventEnd(m).stripZone(),g.start<b&&g.end>_){if(!1===n)return!1;if("function"==typeof n&&!n(c,r))return!1;if(r){if(!1===(l=G(c.overlap,(c.source||{}).overlap)))return!1;if("function"==typeof l&&!l(r,c))return!1}}return!0}M.each((g.events?[g.events]:[]).concat(g.eventSources||[]),function(e,t){var n=r(t);n&&a.push(n)}),v.getBusinessHoursEvents=E,v.isEventRangeAllowed=D,v.isSelectionRangeAllowed=I,v.isExternalDropRangeAllowed=function(e,t){var n,r;t&&(n=M.extend({},t,e),r=x(A(n))[0]);return r?D(e,r):I(e=T(e))},v.getEventCache=function(){return u}}.call(r,n);var o;var s,c,l,u,f,d,h,p=r.isFetchNeeded,m=r.fetchEvents,g=e[0],_={},b=0,v=[];h=null!=n.defaultDate?r.moment(n.defaultDate):r.getNow();function y(){return e.is(":visible")}function w(e){b++,u&&e&&u.type!==e&&(s.deactivateButton(u.type),E(),u.removeElement(),u=r.view=null),!u&&e&&((u=r.view=_[e]||(_[e]=r.instantiateView(e))).setElement(M("<div class='fc-view fc-"+e+"-view' />").appendTo(l)),s.activateButton(e)),u&&(h=u.massageCurrentDate(h),u.isDisplayed&&h.isWithin(u.intervalStart,u.intervalEnd)||y()&&(E(),u.display(h),D(),s.updateTitle(u.title),r.getNow().isWithin(u.intervalStart,u.intervalEnd)?s.disableButton("today"):s.enableButton("today"),!n.lazyFetching||p(u.start,u.end)?k():x())),D(),b--}function C(e){if(y())return e&&S(),b++,u.updateSize(!0),b--,!0}function A(){y()&&S()}function S(){f="number"==typeof n.contentHeight?n.contentHeight:"number"==typeof n.height?n.height-(c?c.outerHeight(!0):0):Math.round(l.width()/Math.max(n.aspectRatio,.5))}function T(e){!b&&e.target===window&&u.start&&C(!0)&&u.trigger("windowResize",g)}function x(){y()&&(E(),u.displayEvents(v),D())}function k(){m(u.start,u.end)}function E(){l.css({width:"100%",height:l.height(),overflow:"hidden"})}function D(){l.css({width:"",height:"",overflow:""})}r.getSuggestedViewHeight=function(){return void 0===f&&A(),f},r.isHeightAuto=function(){return"auto"===n.contentHeight||"auto"===n.height}},initOptions:function(e){var t,n,r,i,a,o;o={views:(i=e).views||{}},M.each(i,function(n,e){"views"!=n&&(M.isPlainObject(e)&&!/(time|duration|interval)$/i.test(n)&&-1==M.inArray(n,s)?(a=null,M.each(e,function(e,t){/^(month|week|day|default|basic(Week|Day)?|agenda(Week|Day)?)$/.test(e)?(o.views[e]||(o.views[e]={}),o.views[e][n]=t):(a||(a={}),a[e]=t)}),a&&(o[n]=a)):o[n]=e)}),t=(e=o).lang,(n=Oe[t])||(t=$e.defaults.lang,n=Oe[t]||{}),r=G(e.isRTL,n.isRTL,$e.defaults.isRTL)?$e.rtlDefaults:{},this.dirDefaults=r,this.langDefaults=n,this.overrides=e,this.options=d($e.defaults,r,n,e),Fe(this.options),this.viewSpecCache={}},getViewSpec:function(e){var t=this.viewSpecCache;return t[e]||(t[e]=this.buildViewSpec(e))},getUnitViewSpec:function(e){var t,n,r;if(-1!=M.inArray(e,w))for(t=this.header.getViewsWithButtons(),M.each(O.views,function(e){t.push(e)}),n=0;n<t.length;n++)if((r=this.getViewSpec(t[n]))&&r.singleUnit==e)return r},buildViewSpec:function(e){for(var t,n,r,i,a,o,s=this.overrides.views||{},c=[],l=[],u=e;u&&!t;)n=f[u]||{},r=s[u]||{},i=i||r.duration||n.duration,u=r.type||n.type,"function"==typeof n?(t=n,c.unshift(t.defaults||{})):c.unshift(n),l.unshift(r);if(t)return o={class:t,type:e},i&&((i=$.duration(i)).valueOf()||(i=null)),i&&(a=C(o.duration=i),1===i.as(a)&&(o.singleUnit=a,l.unshift(s[a]||{}))),o.defaults=d.apply(null,c),o.overrides=d.apply(null,l),this.buildViewSpecOptions(o),this.buildViewSpecButtonText(o,e),o},buildViewSpecOptions:function(e){e.options=d($e.defaults,e.defaults,this.dirDefaults,this.langDefaults,this.overrides,e.overrides),Fe(e.options)},buildViewSpecButtonText:function(n,r){function e(e){var t=e.buttonText||{};return t[r]||(n.singleUnit?t[n.singleUnit]:null)}n.buttonTextOverride=e(this.overrides)||n.overrides.buttonText,n.buttonTextDefault=e(this.langDefaults)||e(this.dirDefaults)||n.defaults.buttonText||e($e.defaults)||(n.duration?this.humanizeDuration(n.duration):null)||r},instantiateView:function(e){var t=this.getViewSpec(e);return new t.class(this,e,t.options,t.duration)},isValidViewType:function(e){return Boolean(this.getViewSpec(e))}});$e.defaults={titleRangeSeparator:" — ",monthYearFormat:"MMMM YYYY",defaultTimedEventDuration:"02:00:00",defaultAllDayEventDuration:{days:1},forceEventDuration:!1,nextDayThreshold:"09:00:00",defaultView:"month",aspectRatio:1.35,header:{left:"title",center:"",right:"today prev,next"},weekends:!0,weekNumbers:!1,weekNumberTitle:"W",weekNumberCalculation:"local",lazyFetching:!0,startParam:"start",endParam:"end",timezoneParam:"timezone",timezone:!1,isRTL:!1,buttonText:{prev:"prev",next:"next",prevYear:"prev year",nextYear:"next year",year:"year",today:"today",month:"month",week:"week",day:"day"},buttonIcons:{prev:"left-single-arrow",next:"right-single-arrow",prevYear:"left-double-arrow",nextYear:"right-double-arrow"},theme:!1,themeButtonIcons:{prev:"circle-triangle-w",next:"circle-triangle-e",prevYear:"seek-prev",nextYear:"seek-next"},dragOpacity:.75,dragRevertDuration:500,dragScroll:!0,unselectAuto:!0,dropAccept:"*",eventLimit:!1,eventLimitText:"more",eventLimitClick:"popover",dayPopoverFormat:"LL",handleWindowResize:!0,windowResizeDelay:200},$e.englishDefaults={dayPopoverFormat:"dddd, MMMM D"},$e.rtlDefaults={header:{left:"next,prev today",center:"",right:"title"},buttonIcons:{prev:"right-single-arrow",next:"left-single-arrow",prevYear:"right-double-arrow",nextYear:"left-double-arrow"},themeButtonIcons:{prev:"circle-triangle-e",next:"circle-triangle-w",nextYear:"seek-prev",prevYear:"seek-next"}};var Oe=O.langs={};O.datepickerLang=function(e,t,n){var r=Oe[e]||(Oe[e]={});r.isRTL=n.isRTL,r.weekNumberTitle=n.weekHeader,M.each(Re,function(e,t){r[e]=t(n)}),M.datepicker&&(M.datepicker.regional[t]=M.datepicker.regional[e]=n,M.datepicker.regional.en=M.datepicker.regional[""],M.datepicker.setDefaults(n))},O.lang=function(e,t){var n,r;n=Oe[e]||(Oe[e]={}),t&&(n=Oe[e]=d(n,t)),r=Ge(e),M.each(Ne,function(e,t){null==n[e]&&(n[e]=t(r,n))}),$e.defaults.lang=e};var Re={buttonText:function(e){return{prev:D(e.prevText),next:D(e.nextText),today:D(e.currentText)}},monthYearFormat:function(e){return e.showMonthAfterYear?"YYYY["+e.yearSuffix+"] MMMM":"MMMM YYYY["+e.yearSuffix+"]"}},Ne={dayOfMonthFormat:function(e,t){var n=e.longDateFormat("l");return n=n.replace(/^Y+[^\w\s]*|[^\w\s]*Y+$/g,""),t.isRTL?n+=" ddd":n="ddd "+n,n},mediumTimeFormat:function(e){return e.longDateFormat("LT").replace(/\s*a$/i,"a")},smallTimeFormat:function(e){return e.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"a")},extraSmallTimeFormat:function(e){return e.longDateFormat("LT").replace(":mm","(:mm)").replace(/(\Wmm)$/,"($1)").replace(/\s*a$/i,"t")},hourFormat:function(e){return e.longDateFormat("LT").replace(":mm","").replace(/(\Wmm)$/,"").replace(/\s*a$/i,"a")},noMeridiemTimeFormat:function(e){return e.longDateFormat("LT").replace(/\s*a$/i,"")}},Le={smallDayDateFormat:function(e){return e.isRTL?"D dd":"dd D"},weekFormat:function(e){return e.isRTL?"w[ "+e.weekNumberTitle+"]":"["+e.weekNumberTitle+" ]w"},smallWeekFormat:function(e){return e.isRTL?"w["+e.weekNumberTitle+"]":"["+e.weekNumberTitle+"]w"}};function Fe(n){M.each(Le,function(e,t){null==n[e]&&(n[e]=t(n))})}function Ge(e){var t=$.localeData||$.langData;return t.call($,e)||t.call($,"en")}function je(d,h){this.render=function(){var e=h.header;if(p=h.theme?"ui":"fc",e)return t=M("<div class='fc-toolbar'/>").append(n("left")).append(n("right")).append(n("center")).append('<div class="fc-clear"/>')},this.destroy=function(){t.remove()},this.updateTitle=function(e){t.find("h2").text(e)},this.activateButton=function(e){t.find(".fc-"+e+"-button").addClass(p+"-state-active")},this.deactivateButton=function(e){t.find(".fc-"+e+"-button").removeClass(p+"-state-active")},this.disableButton=function(e){t.find(".fc-"+e+"-button").attr("disabled","disabled").addClass(p+"-state-disabled")},this.enableButton=function(e){t.find(".fc-"+e+"-button").removeAttr("disabled").removeClass(p+"-state-disabled")},this.getViewsWithButtons=function(){return m};var p,t=M(),m=[];function n(e){var n=M('<div class="fc-'+e+'"/>'),t=h.header[e];return t&&M.each(t.split(" "),function(e){var t,u=M(),f=!0;M.each(this.split(","),function(e,t){var n,r,i,a,o,s,c,l;"title"==t?(u=u.add(M("<h2>&nbsp;</h2>")),f=!1):((n=d.getViewSpec(t))?(r=function(){d.changeView(t)},m.push(t),i=n.buttonTextOverride,a=n.buttonTextDefault):d[t]&&(r=function(){d[t]()},i=(d.overrides.buttonText||{})[t],a=h.buttonText[t]),r&&(o=h.themeButtonIcons[t],s=h.buttonIcons[t],c=i?E(i):o&&h.theme?"<span class='ui-icon ui-icon-"+o+"'></span>":s&&!h.theme?"<span class='fc-icon fc-icon-"+s+"'></span>":E(a),l=M('<button type="button" class="'+["fc-"+t+"-button",p+"-button",p+"-state-default"].join(" ")+'">'+c+"</button>").click(function(){l.hasClass(p+"-state-disabled")||(r(),(l.hasClass(p+"-state-active")||l.hasClass(p+"-state-disabled"))&&l.removeClass(p+"-state-hover"))}).mousedown(function(){l.not("."+p+"-state-active").not("."+p+"-state-disabled").addClass(p+"-state-down")}).mouseup(function(){l.removeClass(p+"-state-down")}).hover(function(){l.not("."+p+"-state-active").not("."+p+"-state-disabled").addClass(p+"-state-hover")},function(){l.removeClass(p+"-state-hover").removeClass(p+"-state-down")}),u=u.add(l)))}),f&&u.first().addClass(p+"-corner-left").end().last().addClass(p+"-corner-right").end(),1<u.length?(t=M("<div/>"),f&&t.addClass("fc-button-group"),t.append(u),n.append(t)):n.append(u)}),n}}O.lang("en",$e.englishDefaults),O.sourceNormalizers=[];var Be={dataType:"json",cache:!(O.sourceFetchers=[])},Ue=1;function He(e){e._allDay=e.allDay,e._start=e.start.clone(),e._end=e.end?e.end.clone():null}$e.prototype.getPeerEvents=function(e,t){var n,r,i=this.getEventCache(),a=[];for(n=0;n<i.length;n++)r=i[n],e&&e._id===r._id||a.push(r);return a};var We=f.basic=Me.extend({dayGrid:null,dayNumbersVisible:!1,weekNumbersVisible:!1,weekNumberWidth:null,headRowEl:null,initialize:function(){this.dayGrid=new Ae(this),this.coordMap=this.dayGrid.coordMap},setRange:function(e){Me.prototype.setRange.call(this,e),this.dayGrid.breakOnWeeks=/year|month|week/.test(this.intervalUnit),this.dayGrid.setRange(e)},computeRange:function(e){var t=Me.prototype.computeRange.call(this,e);return/year|month/.test(t.intervalUnit)&&(t.start.startOf("week"),t.start=this.skipHiddenDays(t.start),t.end.weekday()&&(t.end.add(1,"week").startOf("week"),t.end=this.skipHiddenDays(t.end,-1,!0))),t},render:function(){this.dayNumbersVisible=1<this.dayGrid.rowCnt,this.weekNumbersVisible=this.opt("weekNumbers"),this.dayGrid.numbersVisible=this.dayNumbersVisible||this.weekNumbersVisible,this.el.addClass("fc-basic-view").html(this.renderHtml()),this.headRowEl=this.el.find("thead .fc-row"),this.scrollerEl=this.el.find(".fc-day-grid-container"),this.dayGrid.coordMap.containerEl=this.scrollerEl,this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.renderDates(this.hasRigidRows())},destroy:function(){this.dayGrid.destroyDates(),this.dayGrid.removeElement()},renderBusinessHours:function(){this.dayGrid.renderBusinessHours()},renderHtml:function(){return'<table><thead class="fc-head"><tr><td class="'+this.widgetHeaderClass+'">'+this.dayGrid.headHtml()+'</td></tr></thead><tbody class="fc-body"><tr><td class="'+this.widgetContentClass+'"><div class="fc-day-grid-container"><div class="fc-day-grid"/></div></td></tr></tbody></table>'},headIntroHtml:function(){if(this.weekNumbersVisible)return'<th class="fc-week-number '+this.widgetHeaderClass+'" '+this.weekNumberStyleAttr()+"><span>"+E(this.opt("weekNumberTitle"))+"</span></th>"},numberIntroHtml:function(e){if(this.weekNumbersVisible)return'<td class="fc-week-number" '+this.weekNumberStyleAttr()+"><span>"+this.dayGrid.getCell(e,0).start.format("w")+"</span></td>"},dayIntroHtml:function(){if(this.weekNumbersVisible)return'<td class="fc-week-number '+this.widgetContentClass+'" '+this.weekNumberStyleAttr()+"></td>"},introHtml:function(){if(this.weekNumbersVisible)return'<td class="fc-week-number" '+this.weekNumberStyleAttr()+"></td>"},numberCellHtml:function(e){var t,n=e.start;return this.dayNumbersVisible?((t=this.dayGrid.getDayClasses(n)).unshift("fc-day-number"),'<td class="'+t.join(" ")+'" data-date="'+n.format()+'">'+n.date()+"</td>"):"<td/>"},weekNumberStyleAttr:function(){return null!==this.weekNumberWidth?'style="width:'+this.weekNumberWidth+'px"':""},hasRigidRows:function(){var e=this.opt("eventLimit");return e&&"number"!=typeof e},updateWidth:function(){this.weekNumbersVisible&&(this.weekNumberWidth=e(this.el.find(".fc-week-number")))},setHeight:function(e,t){var n,r=this.opt("eventLimit");c(this.scrollerEl),a(this.headRowEl),this.dayGrid.destroySegPopover(),r&&"number"==typeof r&&this.dayGrid.limitRows(r),n=this.computeScrollerHeight(e),this.setGridHeight(n,t),r&&"number"!=typeof r&&this.dayGrid.limitRows(r),!t&&o(this.scrollerEl,n)&&(i(this.headRowEl,l(this.scrollerEl)),n=this.computeScrollerHeight(e),this.scrollerEl.height(n))},setGridHeight:function(e,t){t?r(this.dayGrid.rowEls):n(this.dayGrid.rowEls,e,!0)},renderEvents:function(e){this.dayGrid.renderEvents(e),this.updateHeight()},getEventSegs:function(){return this.dayGrid.getEventSegs()},destroyEvents:function(){this.dayGrid.destroyEvents()},renderDrag:function(e,t){return this.dayGrid.renderDrag(e,t)},destroyDrag:function(){this.dayGrid.destroyDrag()},renderSelection:function(e){this.dayGrid.renderSelection(e)},destroySelection:function(){this.dayGrid.destroySelection()}}),qe=f.month=We.extend({computeRange:function(e){var t,n=We.prototype.computeRange.call(this,e);return this.isFixedWeeks()&&(t=Math.ceil(n.end.diff(n.start,"weeks",!0)),n.end.add(6-t,"weeks")),n},setGridHeight:function(e,t){(t=t||"variable"===this.opt("weekMode"))&&(e*=this.rowCnt/6),n(this.dayGrid.rowEls,e,!t)},isFixedWeeks:function(){var e=this.opt("weekMode");return e?"fixed"===e:this.opt("fixedWeekCount")}});qe.duration={months:1},qe.defaults={fixedWeekCount:!0},f.basicWeek={type:"basic",duration:{weeks:1}},f.basicDay={type:"basic",duration:{days:1}};return(f.agenda=Me.extend({timeGrid:null,dayGrid:null,axisWidth:null,noScrollRowEls:null,bottomRuleEl:null,bottomRuleHeight:null,initialize:function(){this.timeGrid=new xe(this),this.opt("allDaySlot")?(this.dayGrid=new Ae(this),this.coordMap=new he([this.dayGrid.coordMap,this.timeGrid.coordMap])):this.coordMap=this.timeGrid.coordMap},setRange:function(e){Me.prototype.setRange.call(this,e),this.timeGrid.setRange(e),this.dayGrid&&this.dayGrid.setRange(e)},render:function(){this.el.addClass("fc-agenda-view").html(this.renderHtml()),this.scrollerEl=this.el.find(".fc-time-grid-container"),this.timeGrid.coordMap.containerEl=this.scrollerEl,this.timeGrid.setElement(this.el.find(".fc-time-grid")),this.timeGrid.renderDates(),this.bottomRuleEl=M('<hr class="fc-divider '+this.widgetHeaderClass+'"/>').appendTo(this.timeGrid.el),this.dayGrid&&(this.dayGrid.setElement(this.el.find(".fc-day-grid")),this.dayGrid.renderDates(),this.dayGrid.bottomCoordPadding=this.dayGrid.el.next("hr").outerHeight()),this.noScrollRowEls=this.el.find(".fc-row:not(.fc-scroller *)")},destroy:function(){this.timeGrid.destroyDates(),this.timeGrid.removeElement(),this.dayGrid&&(this.dayGrid.destroyDates(),this.dayGrid.removeElement())},renderBusinessHours:function(){this.timeGrid.renderBusinessHours(),this.dayGrid&&this.dayGrid.renderBusinessHours()},renderHtml:function(){return'<table><thead class="fc-head"><tr><td class="'+this.widgetHeaderClass+'">'+this.timeGrid.headHtml()+'</td></tr></thead><tbody class="fc-body"><tr><td class="'+this.widgetContentClass+'">'+(this.dayGrid?'<div class="fc-day-grid"/><hr class="fc-divider '+this.widgetHeaderClass+'"/>':"")+'<div class="fc-time-grid-container"><div class="fc-time-grid"/></div></td></tr></tbody></table>'},headIntroHtml:function(){var e;return this.opt("weekNumbers")?(e=this.timeGrid.getCell(0).start.format(this.opt("smallWeekFormat")),'<th class="fc-axis fc-week-number '+this.widgetHeaderClass+'" '+this.axisStyleAttr()+"><span>"+E(e)+"</span></th>"):'<th class="fc-axis '+this.widgetHeaderClass+'" '+this.axisStyleAttr()+"></th>"},dayIntroHtml:function(){return'<td class="fc-axis '+this.widgetContentClass+'" '+this.axisStyleAttr()+"><span>"+(this.opt("allDayHtml")||E(this.opt("allDayText")))+"</span></td>"},slotBgIntroHtml:function(){return'<td class="fc-axis '+this.widgetContentClass+'" '+this.axisStyleAttr()+"></td>"},introHtml:function(){return'<td class="fc-axis" '+this.axisStyleAttr()+"></td>"},axisStyleAttr:function(){return null!==this.axisWidth?'style="width:'+this.axisWidth+'px"':""},updateSize:function(e){this.timeGrid.updateSize(e),Me.prototype.updateSize.call(this,e)},updateWidth:function(){this.axisWidth=e(this.el.find(".fc-axis"))},setHeight:function(e,t){var n,r;null===this.bottomRuleHeight&&(this.bottomRuleHeight=this.bottomRuleEl.outerHeight()),this.bottomRuleEl.hide(),this.scrollerEl.css("overflow",""),c(this.scrollerEl),a(this.noScrollRowEls),this.dayGrid&&(this.dayGrid.destroySegPopover(),(n=this.opt("eventLimit"))&&"number"!=typeof n&&(n=5),n&&this.dayGrid.limitRows(n)),t||(r=this.computeScrollerHeight(e),o(this.scrollerEl,r)?(i(this.noScrollRowEls,l(this.scrollerEl)),r=this.computeScrollerHeight(e),this.scrollerEl.height(r)):(this.scrollerEl.height(r).css("overflow","hidden"),this.bottomRuleEl.show()))},computeInitialScroll:function(){var e=$.duration(this.opt("scrollTime")),t=this.timeGrid.computeTimeTop(e);return(t=Math.ceil(t))&&t++,t},renderEvents:function(e){var t,n=[],r=[];for(t=0;t<e.length;t++)e[t].allDay?n.push(e[t]):r.push(e[t]);this.timeGrid.renderEvents(r),this.dayGrid&&this.dayGrid.renderEvents(n),this.updateHeight()},getEventSegs:function(){return this.timeGrid.getEventSegs().concat(this.dayGrid?this.dayGrid.getEventSegs():[])},destroyEvents:function(){this.timeGrid.destroyEvents(),this.dayGrid&&this.dayGrid.destroyEvents()},renderDrag:function(e,t){return e.start.hasTime()?this.timeGrid.renderDrag(e,t):this.dayGrid?this.dayGrid.renderDrag(e,t):void 0},destroyDrag:function(){this.timeGrid.destroyDrag(),this.dayGrid&&this.dayGrid.destroyDrag()},renderSelection:function(e){e.start.hasTime()||e.end.hasTime()?this.timeGrid.renderSelection(e):this.dayGrid&&this.dayGrid.renderSelection(e)},destroySelection:function(){this.timeGrid.destroySelection(),this.dayGrid&&this.dayGrid.destroySelection()}})).defaults={allDaySlot:!0,allDayText:"all-day",scrollTime:"06:00:00",slotDuration:"00:30:00",minTime:"00:00:00",maxTime:"24:00:00",slotEventOverlap:!0},f.agendaWeek={type:"agenda",duration:{weeks:1}},f.agendaDay={type:"agenda",duration:{days:1}},O}),angular.module("ui.calendar",[]).constant("uiCalendarConfig",{calendars:{}}).controller("uiCalendarCtrl",["$scope","$locale",function(i,r){var s=i.eventSources,t=i.calendarWatchEvent?i.calendarWatchEvent:angular.noop,n=1;this.eventFingerprint=function(e){return e._id||(e._id=n++),""+e._id+(e.id||"")+(e.title||"")+(e.url||"")+(+e.start||"")+(+e.end||"")+(e.allDay||"")+(e.className||"")+t({event:e})||""};var a=1,o=1;this.sourceFingerprint=function(e){var t=""+(e.__id||(e.__id=a++)),n=angular.isObject(e)&&e.events;return n&&(t=t+"-"+(n.__id||(n.__id=o++))),t},this.allEvents=function(){for(var e=[],t=0,n=s.length;t<n;t++){var r=s[t];if(angular.isArray(r))e.push(r);else if(angular.isObject(r)&&angular.isArray(r.events)){var i={};for(var a in r)"_id"!==a&&"events"!==a&&(i[a]=r[a]);for(var o=0;o<r.events.length;o++)angular.extend(r.events[o],i);e.push(r.events)}}return Array.prototype.concat.apply([],e)},this.changeWatcher=function(o,f){var d,t=function(){for(var e,t,n=angular.isFunction(o)?o():o,r=[],i=0,a=n.length;i<a;i++)t=n[i],e=f(t),p[e]=t,r.push(e);return r},h=function(e,t){var n,r,i=[],a={};for(n=0,r=t.length;n<r;n++)a[t[n]]=!0;for(n=0,r=e.length;n<r;n++)a[e[n]]||i.push(e[n]);return i},p={};return d={subscribe:function(e,n){e.$watch(t,function(e,t){!(n&&!1===n(e,t))&&function(e,t){var n,r,i,a,o={},s=h(t,e);for(n=0,r=s.length;n<r;n++){var c=s[n];i=p[c],delete p[c];var l=f(i);l===c?d.onRemoved(i):(o[l]=c,d.onChanged(i))}var u=h(e,t);for(n=0,r=u.length;n<r;n++)a=u[n],i=p[a],o[a]||d.onAdded(i)}(e,t)},!0)},onAdded:angular.noop,onChanged:angular.noop,onRemoved:angular.noop}},this.getFullCalendarConfig=function(e,t){var r={};return angular.extend(r,t),angular.extend(r,e),angular.forEach(r,function(e,t){var n;"function"==typeof e&&(r[t]=(n=r[t],function(){if(i.$root.$$phase)return n.apply(this,arguments);var e=arguments,t=this;return i.$root.$apply(function(){return n.apply(t,e)})}))}),r},this.getLocaleConfig=function(e){if(e.lang&&!e.useNgLocale)return{};var t=function(e){var t,n;for(n in t=[],e)t[n]=e[n];return t},n=r.DATETIME_FORMATS;return{monthNames:t(n.MONTH),monthNamesShort:t(n.SHORTMONTH),dayNames:t(n.DAY),dayNamesShort:t(n.SHORTDAY)}}}]).directive("uiCalendar",["uiCalendarConfig",function(u){return{restrict:"A",scope:{eventSources:"=ngModel",calendarWatchEvent:"&"},controller:"uiCalendarCtrl",link:function(a,e,o,s){var i,c=a.eventSources,t=!1,n=s.changeWatcher(c,s.sourceFingerprint),r=s.changeWatcher(s.allEvents,s.eventFingerprint),l=null;a.destroy=function(){i&&i.fullCalendar&&i.fullCalendar("destroy"),i=o.calendar?u.calendars[o.calendar]=$(e).html(""):$(e).html("")},a.init=function(){i.fullCalendar(l),o.calendar&&(u.calendars[o.calendar]=i)},n.onAdded=function(e){i.fullCalendar("addEventSource",e),t=!0},n.onRemoved=function(e){i.fullCalendar("removeEventSource",e),t=!0},n.onChanged=function(e){i.fullCalendar("refetchEvents"),t=!0},r.onAdded=function(e){i.fullCalendar("renderEvent",e,!!e.stick)},r.onRemoved=function(e){i.fullCalendar("removeEvents",e._id)},r.onChanged=function(e){for(var t=i.fullCalendar("clientEvents",e._id),n=0;n<t.length;n++){var r=t[n];r=angular.extend(r,e),i.fullCalendar("updateEvent",r)}},n.subscribe(a),r.subscribe(a,function(){if(!0===t)return t=!1}),a.$watch(function(){var e,t=o.uiCalendar?a.$parent.$eval(o.uiCalendar):{};e=s.getFullCalendarConfig(t,u);var n=s.getLocaleConfig(e);angular.extend(n,e),l={eventSources:c},angular.extend(l,n),l.calendars=null;var r={};for(var i in l)"eventSources"!==i&&(r[i]=l[i]);return JSON.stringify(r)},function(e,t){a.destroy(),a.init()})}}}]),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("angular")):"function"==typeof define&&define.amd?define(["exports","angular"],t):t((e=e||self)["@uirouter/angularjs"]={},e.angular)}(this,function(m,e){"use strict";kr.$inject=["state"];var t=angular,A=e&&e.module?e:t,r=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r};function l(n){return function e(){if(arguments.length>=n.length)return n.apply(this,arguments);var t=Array.prototype.slice.call(arguments);return e.bind.apply(e,r([this],t))}}function n(){var n=arguments,r=n.length-1;return function(){for(var e=r,t=n[r].apply(this,arguments);e--;)t=n[e].call(this,t);return t}}function c(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.apply(null,[].slice.call(arguments).reverse())}var v=function(t){return function(e){return e&&e[t]}},_=l(function(e,t,n){return n&&n[e]===t}),S=function(e){return c.apply(null,e.split(".").map(v))},f=function(n){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return!n.apply(null,e)}};function i(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.apply(null,e)&&r.apply(null,e)}}function a(n,r){return function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.apply(null,e)||r.apply(null,e)}}var u=function(n){return function(e){return e.reduce(function(e,t){return e&&!!n(t)},!0)}},d=function(n){return function(e){return e.reduce(function(e,t){return e||!!n(t)},!1)}},h=function(t){return function(e){return null!=e&&e.constructor===t||e instanceof t}},o=function(t){return function(e){return t===e}},p=function(e){return function(){return e}};function s(t,n){return function(e){return e[t].apply(e,n)}}function g(n){return function(e){for(var t=0;t<n.length;t++)if(n[t][0](e))return n[t][1](e)}}var b=Object.prototype.toString,y=function(t){return function(e){return typeof e===t}},w=y("undefined"),T=f(w),C=function(e){return null===e},x=a(C,w),k=y("function"),E=y("number"),D=y("string"),I=function(e){return null!==e&&"object"==typeof e},P=Array.isArray,M=function(e){return"[object Date]"===b.call(e)},$=function(e){return"[object RegExp]"===b.call(e)};function O(e){if(P(e)&&e.length){var t=e.slice(0,-1),n=e.slice(-1);return!(t.filter(f(D)).length||n.filter(f(k)).length)}return k(e)}var R=i(I,c(v("then"),k)),N=function(r,e){return e.reduce(function(e,t){return e[t]=(n=r+"."+t+"()",function(){throw new Error("No implementation for "+n+". The framework specific code did not implement this method.")}),e;var n},{})},L={$q:void 0,$injector:void 0},F=function(){for(var e=0,t=0,n=arguments.length;t<n;t++)e+=arguments[t].length;var r=Array(e),i=0;for(t=0;t<n;t++)for(var a=arguments[t],o=0,s=a.length;o<s;o++,i++)r[i]=a[o];return r},G="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||void 0,j=G.angular||{},B=j.fromJson||JSON.parse.bind(JSON),U=j.toJson||JSON.stringify.bind(JSON),H=j.forEach||function(t,n,e){if(P(t))return t.forEach(n,e);Object.keys(t).forEach(function(e){return n(t[e],e)})},W=Object.assign||Ie,q=j.equals||Pe;function z(e){return e}function V(){}function Y(t,r,n,e,i){void 0===i&&(i=!1);var a=function(e){return t()[e].bind(n())};return(e=e||Object.keys(t())).reduce(function(e,t){var n;return e[t]=i?(n=t,function(){return r[n]=a(n),r[n].apply(null,arguments)}):a(t),e},r)}var K=function(e,t){return W(Object.create(e),t)},Q=l(X);function X(e,t){return-1!==e.indexOf(t)}var Z=l(J);function J(e,t){var n=e.indexOf(t);return 0<=n&&e.splice(n,1),e}var ee=l(te);function te(e,t){return e.push(t),t}var ne=function(t){return t.slice().forEach(function(e){"function"==typeof e&&e(),Z(t,e)})};function re(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];var r=W.apply(void 0,F([{}],t.reverse()));return W(r,oe(e||{},Object.keys(r)))}var ie=function(e,t){return W(e,t)};function ae(e,t){var n=[];for(var r in e.path){if(e.path[r]!==t.path[r])break;n.push(e.path[r])}return n}function oe(e,t){var n={};for(var r in e)-1!==t.indexOf(r)&&(n[r]=e[r]);return n}function se(n,e){return Object.keys(n).filter(f(Q(e))).reduce(function(e,t){return e[t]=n[t],e},{})}function ce(e,t){return de(e,v(t))}function le(e,n){var t=P(e),r=t?[]:{},i=t?function(e){return r.push(e)}:function(e,t){return r[t]=e};return H(e,function(e,t){n(e,t)&&i(e,t)}),r}function ue(e,n){var r;return H(e,function(e,t){r||n(e,t)&&(r=e)}),r}var fe=de;function de(e,n,r){return r=r||(P(e)?[]:{}),H(e,function(e,t){return r[t]=n(e,t)}),r}var he=function(t){return Object.keys(t).map(function(e){return t[e]})},pe=function(e,t){return e&&t},me=function(e,t){return e||t},ge=function(e,t){return e.concat(t)},_e=function(e,t){return P(t)?e.concat(t.reduce(_e,[])):be(e,t)};function be(e,t){return e.push(t),e}var ve=function(e,t){return Q(e,t)?e:be(e,t)},ye=function(e){return e.reduce(ge,[])},we=function(e){return e.reduce(_e,[])},Ce=Se,Ae=Se;function Se(n,r){return void 0===r&&(r="assert failure"),function(e){var t=n(e);if(!t)throw new Error(k(r)?r(e):r);return t}}var Te=function(t){return Object.keys(t).map(function(e){return[e,t[e]]})};function xe(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(0===e.length)return[];for(var n=e.reduce(function(e,t){return Math.min(t.length,e)},9007199254740991),r=[],i=function(t){switch(e.length){case 1:r.push([e[0][t]]);break;case 2:r.push([e[0][t],e[1][t]]);break;case 3:r.push([e[0][t],e[1][t],e[2][t]]);break;case 4:r.push([e[0][t],e[1][t],e[2][t],e[3][t]]);break;default:r.push(e.map(function(e){return e[t]}))}},a=0;a<n;a++)i(a);return r}function ke(e,t){var n,r;if(P(t)&&(n=t[0],r=t[1]),!D(n))throw new Error("invalid parameters to applyPairs");return e[n]=r,e}function Ee(e){return e.length&&e[e.length-1]||void 0}function De(e,t){return t&&Object.keys(t).forEach(function(e){return delete t[e]}),t||(t={}),W(t,e)}function Ie(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];if(n)for(var r=Object.keys(n),i=0;i<r.length;i++)e[r[i]]=n[r[i]]}return e}function Pe(e,t){if(e===t)return!0;if(null===e||null===t)return!1;if(e!=e&&t!=t)return!0;var n=typeof e;if(n!==typeof t||"object"!==n)return!1;var r,i,a=[e,t];if(u(P)(a))return i=t,(r=e).length===i.length&&xe(r,i).reduce(function(e,t){return e&&Pe(t[0],t[1])},!0);if(u(M)(a))return e.getTime()===t.getTime();if(u($)(a))return e.toString()===t.toString();if(u(k)(a))return!0;if([k,P,M,$].map(d).reduce(function(e,t){return e||!!t(a)},!1))return!1;var o={};for(var s in e){if(!Pe(e[s],t[s]))return!1;o[s]=!0}for(var s in t)if(!o[s])return!1;return!0}var Me,$e=function(e){return e.catch(function(e){return 0})&&e},Oe=function(e){return $e(L.$q.reject(e))},Re=function(){function t(e){this.text=e,this.glob=e.split(".");var t=this.text.split(".").map(function(e){return"**"===e?"(?:|(?:\\.[^.]*)*)":"*"===e?"\\.[^.]*":"\\."+e}).join("");this.regexp=new RegExp("^"+t+"$")}return t.is=function(e){return!!/[!,*]+/.exec(e)},t.fromString=function(e){return t.is(e)?new t(e):null},t.prototype.matches=function(e){return this.regexp.test("."+e)},t}(),Ne=function(){function e(e,t){void 0===e&&(e=[]),void 0===t&&(t=null),this._items=e,this._limit=t,this._evictListeners=[],this.onEvict=ee(this._evictListeners)}return e.prototype.enqueue=function(e){var t=this._items;return t.push(e),this._limit&&t.length>this._limit&&this.evict(),e},e.prototype.evict=function(){var t=this._items.shift();return this._evictListeners.forEach(function(e){return e(t)}),t},e.prototype.dequeue=function(){if(this.size())return this._items.splice(0,1)[0]},e.prototype.clear=function(){var e=this._items;return this._items=[],e},e.prototype.size=function(){return this._items.length},e.prototype.remove=function(e){var t=this._items.indexOf(e);return-1<t&&this._items.splice(t,1)[0]},e.prototype.peekTail=function(){return this._items[this._items.length-1]},e.prototype.peekHead=function(){if(this.size())return this._items[0]},e}();(Me=m.RejectType||(m.RejectType={}))[Me.SUPERSEDED=2]="SUPERSEDED",Me[Me.ABORTED=3]="ABORTED",Me[Me.INVALID=4]="INVALID",Me[Me.IGNORED=5]="IGNORED",Me[Me.ERROR=6]="ERROR";var Le=0,Fe=function(){function r(e,t,n){this.$id=Le++,this.type=e,this.message=t,this.detail=n}return r.isRejectionPromise=function(e){return e&&"function"==typeof e.then&&h(r)(e._transitionRejection)},r.superseded=function(e,t){var n=new r(m.RejectType.SUPERSEDED,"The transition has been superseded by a different transition",e);return t&&t.redirected&&(n.redirected=!0),n},r.redirected=function(e){return r.superseded(e,{redirected:!0})},r.invalid=function(e){return new r(m.RejectType.INVALID,"This transition is invalid",e)},r.ignored=function(e){return new r(m.RejectType.IGNORED,"The transition was ignored",e)},r.aborted=function(e){return new r(m.RejectType.ABORTED,"The transition has been aborted",e)},r.errored=function(e){return new r(m.RejectType.ERROR,"The transition errored",e)},r.normalize=function(e){return h(r)(e)?e:r.errored(e)},r.prototype.toString=function(){var e,t=(e=this.detail)&&e.toString!==Object.prototype.toString?e.toString():ze(e);return"Transition Rejection($id: "+this.$id+" type: "+this.type+", message: "+this.message+", detail: "+t+")"},r.prototype.toPromise=function(){return W(Oe(this),{_transitionRejection:this})},r}();function Ge(e,t){return t.length<=e?t:t.substr(0,e-3)+"..."}function je(e,t){for(;t.length<e;)t+=" ";return t}function Be(e){return e.replace(/^([A-Z])/,function(e){return e.toLowerCase()}).replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}function Ue(e){var t=He(e),n=t.match(/^(function [^ ]+\([^)]*\))/),r=n?n[1]:t,i=e.name||"";return i&&r.match(/function \(/)?"function "+i+r.substr(9):r}function He(e){var t=P(e)?e.slice(-1)[0]:e;return t&&t.toString()||"undefined"}var We=Fe.isRejectionPromise,qe=g([[w,p("undefined")],[C,p("null")],[R,p("[Promise]")],[We,function(e){return e._transitionRejection.toString()}],[function(e){return I(e)&&!P(e)&&e.constructor!==Object&&k(e.toString)},function(e){return e.toString()}],[O,Ue],[p(!0),z]]);function ze(e){var t=[];function n(e){if(I(e)){if(-1!==t.indexOf(e))return"[circular ref]";t.push(e)}return qe(e)}return w(e)?n(e):JSON.stringify(e,function(e,t){return n(t)}).replace(/\\"/g,'"')}var Ve=function(n){return function(e){if(!e)return["",""];var t=e.indexOf(n);return-1===t?[e,""]:[e.substr(0,t),e.substr(t+1)]}},Ye=new RegExp("^(?:[a-z]+:)?//[^/]+/"),Ke=function(e){return e.replace(/\/[^/]*$/,"")},Qe=Ve("#"),Xe=Ve("?"),Ze=Ve("="),Je=function(e){return e?e.replace(/^#/,""):""};function et(e){var t=new RegExp("("+e+")","g");return function(e){return e.split(t).filter(z)}}function tt(e,t){return D(Ee(e))&&D(t)?e.slice(0,-1).concat(Ee(e)+t):be(e,t)}var nt={log:V,error:V,table:V};var rt,it,at,ot,st="undefined"!=typeof document&&document.documentMode&&9===document.documentMode?window&&window.console?(at=window.console,{log:(ot=function(e){return Function.prototype.bind.call(e,at)})(at.log),error:ot(at.log),table:ot(at.log)}):nt:console.table&&console.error?console:(rt=console,{log:it=rt.log.bind(rt),error:rt.error?rt.error.bind(rt):it,table:rt.table?rt.table.bind(rt):it});function ct(e){if(!e)return"ui-view (defunct)";var t=e.creationContext?e.creationContext.name||"(root)":"(none)";return"[ui-view#"+e.id+" "+e.$type+":"+e.fqn+" ("+e.name+"@"+t+")]"}var lt;function ut(e){return E(e)?m.Category[e]:m.Category[m.Category[e]]}(lt=m.Category||(m.Category={}))[lt.RESOLVE=0]="RESOLVE",lt[lt.TRANSITION=1]="TRANSITION",lt[lt.HOOK=2]="HOOK",lt[lt.UIVIEW=3]="UIVIEW",lt[lt.VIEWCONFIG=4]="VIEWCONFIG";var ft=S("$id"),dt=S("router.$id"),ht=function(e){return"Transition #"+ft(e)+"-"+dt(e)},pt=function(){function e(){this._enabled={},this.approximateDigests=0}return e.prototype._set=function(t,e){var n=this;e.length||(e=Object.keys(m.Category).map(function(e){return parseInt(e,10)}).filter(function(e){return!isNaN(e)}).map(function(e){return m.Category[e]})),e.map(ut).forEach(function(e){return n._enabled[e]=t})},e.prototype.enable=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._set(!0,e)},e.prototype.disable=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this._set(!1,e)},e.prototype.enabled=function(e){return!!this._enabled[ut(e)]},e.prototype.traceTransitionStart=function(e){this.enabled(m.Category.TRANSITION)&&st.log(ht(e)+": Started  -> "+ze(e))},e.prototype.traceTransitionIgnored=function(e){this.enabled(m.Category.TRANSITION)&&st.log(ht(e)+": Ignored  <> "+ze(e))},e.prototype.traceHookInvocation=function(e,t,n){if(this.enabled(m.Category.HOOK)){var r=S("traceData.hookType")(n)||"internal",i=S("traceData.context.state.name")(n)||S("traceData.context")(n)||"unknown",a=Ue(e.registeredHook.callback);st.log(ht(t)+":   Hook -> "+r+" context: "+i+", "+Ge(200,a))}},e.prototype.traceHookResult=function(e,t,n){this.enabled(m.Category.HOOK)&&st.log(ht(t)+":   <- Hook returned: "+Ge(200,ze(e)))},e.prototype.traceResolvePath=function(e,t,n){this.enabled(m.Category.RESOLVE)&&st.log(ht(n)+":         Resolving "+e+" ("+t+")")},e.prototype.traceResolvableResolved=function(e,t){this.enabled(m.Category.RESOLVE)&&st.log(ht(t)+":               <- Resolved  "+e+" to: "+Ge(200,ze(e.data)))},e.prototype.traceError=function(e,t){this.enabled(m.Category.TRANSITION)&&st.log(ht(t)+": <- Rejected "+ze(t)+", reason: "+e)},e.prototype.traceSuccess=function(e,t){this.enabled(m.Category.TRANSITION)&&st.log(ht(t)+": <- Success  "+ze(t)+", final state: "+e.name)},e.prototype.traceUIViewEvent=function(e,t,n){void 0===n&&(n=""),this.enabled(m.Category.UIVIEW)&&st.log("ui-view: "+je(30,e)+" "+ct(t)+n)},e.prototype.traceUIViewConfigUpdated=function(e,t){this.enabled(m.Category.UIVIEW)&&this.traceUIViewEvent("Updating",e," with ViewConfig from context='"+t+"'")},e.prototype.traceUIViewFill=function(e,t){this.enabled(m.Category.UIVIEW)&&this.traceUIViewEvent("Fill",e," with: "+Ge(200,t))},e.prototype.traceViewSync=function(e){if(this.enabled(m.Category.VIEWCONFIG)){var o="uiview component fqn",t=e.map(function(e){var t,n=e.uiView,r=e.viewConfig,i=n&&n.fqn,a=r&&r.viewDecl.$context.name+": ("+r.viewDecl.$name+")";return(t={})[o]=i,t["view config state (view name)"]=a,t}).sort(function(e,t){return(e[o]||"").localeCompare(t[o]||"")});st.table(t)}},e.prototype.traceViewServiceEvent=function(e,t){var n,r,i;this.enabled(m.Category.VIEWCONFIG)&&st.log("VIEWCONFIG: "+e+" "+(r=(n=t).viewDecl,i=r.$context.name||"(root)","[View#"+n.$id+" from '"+i+"' state]: target ui-view: '"+r.$uiViewName+"@"+r.$uiViewContextAnchor+"'"))},e.prototype.traceViewServiceUIViewEvent=function(e,t){this.enabled(m.Category.VIEWCONFIG)&&st.log("VIEWCONFIG: "+e+" "+ct(t))},e}(),mt=new pt,gt=function(){function e(e){this.pattern=/.*/,this.inherit=!0,W(this,e)}return e.prototype.is=function(e,t){return!0},e.prototype.encode=function(e,t){return e},e.prototype.decode=function(e,t){return e},e.prototype.equals=function(e,t){return e==t},e.prototype.$subPattern=function(){var e=this.pattern.toString();return e.substr(1,e.length-2)},e.prototype.toString=function(){return"{ParamType:"+this.name+"}"},e.prototype.$normalize=function(e){return this.is(e)?e:this.decode(e)},e.prototype.$asArray=function(e,t){if(!e)return this;if("auto"===e&&!t)throw new Error("'auto' array mode is for query parameters only");return new _t(this,e)},e}();function _t(r,i){var a=this;function o(e){return P(e)?e:T(e)?[e]:[]}function s(n,r){return function(e){if(P(e)&&0===e.length)return e;var t=de(o(e),n);return!0===r?0===le(t,function(e){return!e}).length:function(e){switch(e.length){case 0:return;case 1:return"auto"===i?e[0]:e;default:return e}}(t)}}function c(a){return function(e,t){var n=o(e),r=o(t);if(n.length!==r.length)return!1;for(var i=0;i<n.length;i++)if(!a(n[i],r[i]))return!1;return!0}}["encode","decode","equals","$normalize"].forEach(function(e){var t=r[e].bind(r),n="equals"===e?c:s;a[e]=n(t)}),W(this,{dynamic:r.dynamic,name:r.name,pattern:r.pattern,inherit:r.inherit,raw:r.raw,is:s(r.is.bind(r),!0),$arrayMode:i})}var bt,vt=Object.prototype.hasOwnProperty,yt=function(e){return 0===["value","type","squash","array","dynamic"].filter(vt.bind(e||{})).length};function wt(e,t,n){var r=!1===n.reloadOnSearch&&t===m.DefType.SEARCH||void 0,i=ue([n.dynamic,r],T),a=T(i)?{dynamic:i}:{},o=function(e){function t(){return e.value}e=yt(e)?{value:e}:e,t.__cacheable=!0;var n=O(e.value)?e.value:t;return W(e,{$$fn:n})}(n&&n.params&&n.params[e]);return W(a,o)}(bt=m.DefType||(m.DefType={}))[bt.PATH=0]="PATH",bt[bt.SEARCH=1]="SEARCH",bt[bt.CONFIG=2]="CONFIG";var Ct,At=function(){function r(e,t,n,r,i){var a=wt(e,n,i);t=function(e,t,n,r,i){if(e.type&&t&&"string"!==t.name)throw new Error("Param '"+r+"' has two type configurations.");if(e.type&&t&&"string"===t.name&&i.type(e.type))return i.type(e.type);if(t)return t;if(e.type)return e.type instanceof gt?e.type:i.type(e.type);var a=n===m.DefType.CONFIG?"any":n===m.DefType.PATH?"path":n===m.DefType.SEARCH?"query":"string";return i.type(a)}(a,t,n,e,r.paramTypes);var o,s,c=(o={array:n===m.DefType.SEARCH&&"auto"},s=e.match(/\[\]$/)?{array:!0}:{},W(o,s,a).array);t=c?t.$asArray(c,n===m.DefType.SEARCH):t;var l=void 0!==a.value||n===m.DefType.SEARCH,u=T(a.dynamic)?!!a.dynamic:!!t.dynamic,f=T(a.raw)?!!a.raw:!!t.raw,d=function(e,t,n){var r=e.squash;if(!t||!1===r)return!1;if(!T(r)||null==r)return n;if(!0===r||D(r))return r;throw new Error("Invalid squash policy: '"+r+"'. Valid policies: false, true, or arbitrary string")}(a,l,r.defaultSquashPolicy()),h=function(e,t,n,r){var i=[{from:"",to:n||t?void 0:""},{from:null,to:n||t?void 0:""}],a=P(e.replace)?e.replace:[];D(r)&&a.push({from:r,to:void 0});var o=de(a,v("from"));return le(i,function(e){return-1===o.indexOf(e.from)}).concat(a)}(a,c,l,d),p=T(a.inherit)?!!a.inherit:!!t.inherit;W(this,{id:e,type:t,location:n,isOptional:l,dynamic:u,raw:f,squash:d,replace:h,inherit:p,array:c,config:a})}return r.values=function(e,t){void 0===t&&(t={});for(var n={},r=0,i=e;r<i.length;r++){var a=i[r];n[a.id]=a.value(t[a.id])}return n},r.changed=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),e.filter(function(e){return!e.type.equals(t[e.id],n[e.id])})},r.equals=function(e,t,n){return void 0===t&&(t={}),void 0===n&&(n={}),0===r.changed(e,t,n).length},r.validates=function(e,t){return void 0===t&&(t={}),e.map(function(e){return e.validates(t[e.id])}).reduce(pe,!0)},r.prototype.isDefaultValue=function(e){return this.isOptional&&this.type.equals(this.value(),e)},r.prototype.value=function(e){var i=this;return e=function(e){for(var t=0,n=i.replace;t<n.length;t++){var r=n[t];if(r.from===e)return r.to}return e}(e),w(e)?function(){if(i._defaultValueCache)return i._defaultValueCache.defaultValue;if(!L.$injector)throw new Error("Injectable functions cannot be called at configuration time");var e=L.$injector.invoke(i.config.$$fn);if(null!=e&&!i.type.is(e))throw new Error("Default value ("+e+") for parameter '"+i.id+"' is not an instance of ParamType ("+i.type.name+")");return i.config.$$fn.__cacheable&&(i._defaultValueCache={defaultValue:e}),e}():this.type.$normalize(e)},r.prototype.isSearch=function(){return this.location===m.DefType.SEARCH},r.prototype.validates=function(e){if((w(e)||null===e)&&this.isOptional)return!0;var t=this.type.$normalize(e);if(!this.type.is(t))return!1;var n=this.type.encode(t);return!(D(n)&&!this.type.pattern.exec(n))},r.prototype.toString=function(){return"{Param:"+this.id+" "+this.type+" squash: '"+this.squash+"' optional: "+this.isOptional+"}"},r}(),St=function(){function e(){this.enqueue=!0,this.typeQueue=[],this.defaultTypes=oe(e.prototype,["hash","string","query","path","int","bool","date","json","any"]);this.types=K(de(this.defaultTypes,function(e,t){return new gt(W({name:t},e))}),{})}return e.prototype.dispose=function(){this.types={}},e.prototype.type=function(e,t,n){if(!T(t))return this.types[e];if(this.types.hasOwnProperty(e))throw new Error("A type named '"+e+"' has already been defined.");return this.types[e]=new gt(W({name:e},t)),n&&(this.typeQueue.push({name:e,def:n}),this.enqueue||this._flushTypeQueue()),this},e.prototype._flushTypeQueue=function(){for(;this.typeQueue.length;){var e=this.typeQueue.shift();if(e.pattern)throw new Error("You cannot override a type's .pattern at runtime.");W(this.types[e.name],L.$injector.invoke(e.def))}},e}();Ct=function(e){var t=function(e){return null!=e?e.toString():e},n={encode:t,decode:t,is:h(String),pattern:/.*/,equals:function(e,t){return e==t}};return W({},n,e)},W(St.prototype,{string:Ct({}),path:Ct({pattern:/[^/]*/}),query:Ct({}),hash:Ct({inherit:!1}),int:Ct({decode:function(e){return parseInt(e,10)},is:function(e){return!x(e)&&this.decode(e.toString())===e},pattern:/-?\d+/}),bool:Ct({encode:function(e){return e?1:0},decode:function(e){return 0!==parseInt(e,10)},is:h(Boolean),pattern:/0|1/}),date:Ct({encode:function(e){return this.is(e)?[e.getFullYear(),("0"+(e.getMonth()+1)).slice(-2),("0"+e.getDate()).slice(-2)].join("-"):void 0},decode:function(e){if(this.is(e))return e;var t=this.capture.exec(e);return t?new Date(t[1],t[2]-1,t[3]):void 0},is:function(e){return e instanceof Date&&!isNaN(e.valueOf())},equals:function(n,r){return["getFullYear","getMonth","getDate"].reduce(function(e,t){return e&&n[t]()===r[t]()},!0)},pattern:/[0-9]{4}-(?:0[1-9]|1[0-2])-(?:0[1-9]|[1-2][0-9]|3[0-1])/,capture:/([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])/}),json:Ct({encode:U,decode:B,is:h(Object),equals:q,pattern:/[^/]*/}),any:Ct({encode:z,decode:z,is:function(){return!0},equals:q})});var Tt=function(){function e(e){void 0===e&&(e={}),W(this,e)}return e.prototype.$inherit=function(e,t,n){var r,i=ae(t,n),a={},o=[];for(var s in i)if(i[s]&&i[s].params&&(r=Object.keys(i[s].params)).length)for(var c in r)0<=o.indexOf(r[c])||(o.push(r[c]),a[r[c]]=this[r[c]]);return W({},a,e)},e}(),xt=function(){function r(e){if(e instanceof r){var t=e;this.state=t.state,this.paramSchema=t.paramSchema.slice(),this.paramValues=W({},t.paramValues),this.resolvables=t.resolvables.slice(),this.views=t.views&&t.views.slice()}else{var n=e;this.state=n,this.paramSchema=n.parameters({inherit:!1}),this.paramValues={},this.resolvables=n.resolvables.map(function(e){return e.clone()})}}return r.prototype.clone=function(){return new r(this)},r.prototype.applyRawParams=function(r){return this.paramValues=this.paramSchema.reduce(function(e,t){return ke(e,[(n=t).id,n.value(r[n.id])]);var n},{}),this},r.prototype.parameter=function(e){return ue(this.paramSchema,_("id",e))},r.prototype.equals=function(e,t){var n=this.diff(e,t);return n&&0===n.length},r.prototype.diff=function(e,t){if(this.state!==e.state)return!1;var n=t?t(this):this.paramSchema;return At.changed(n,this.paramValues,e.paramValues)},r.clone=function(e){return e.clone()},r}(),kt=function(){function r(e,t,n,r){this._stateRegistry=e,this._identifier=t,this._identifier=t,this._params=W({},n||{}),this._options=W({},r||{}),this._definition=e.matcher.find(t,this._options.relative)}return r.prototype.name=function(){return this._definition&&this._definition.name||this._identifier},r.prototype.identifier=function(){return this._identifier},r.prototype.params=function(){return this._params},r.prototype.$state=function(){return this._definition},r.prototype.state=function(){return this._definition&&this._definition.self},r.prototype.options=function(){return this._options},r.prototype.exists=function(){return!(!this._definition||!this._definition.self)},r.prototype.valid=function(){return!this.error()},r.prototype.error=function(){var e=this.options().relative;if(this._definition||!e)return this._definition?this._definition.self?void 0:"State '"+this.name()+"' has an invalid definition":"No such state '"+this.name()+"'";var t=e.name?e.name:e;return"Could not resolve '"+this.name()+"' from state '"+t+"'"},r.prototype.toString=function(){return"'"+this.name()+"'"+ze(this.params())},r.prototype.withState=function(e){return new r(this._stateRegistry,e,this._params,this._options)},r.prototype.withParams=function(e,t){void 0===t&&(t=!1);var n=t?e:W({},this._params,e);return new r(this._stateRegistry,this._identifier,n,this._options)},r.prototype.withOptions=function(e,t){void 0===t&&(t=!1);var n=t?e:W({},this._options,e);return new r(this._stateRegistry,this._identifier,this._params,n)},r.isDef=function(e){return e&&e.state&&(D(e.state)||D(e.state.name))},r}(),Et=function(){function d(){}return d.makeTargetState=function(e,t){var n=Ee(t).state;return new kt(e,n,t.map(v("paramValues")).reduce(ie,{}),{})},d.buildPath=function(e){var t=e.params();return e.$state().path.map(function(e){return new xt(e).applyRawParams(t)})},d.buildToPath=function(e,t){var n=d.buildPath(t);return t.options().inherit?d.inheritParams(e,n,Object.keys(t.params())):n},d.applyViewConfigs=function(i,a,t){a.filter(function(e){return Q(t,e.state)}).forEach(function(t){var e=he(t.state.views||{}),n=d.subPath(a,function(e){return e===t}),r=e.map(function(e){return i.createViewConfig(n,e)});t.views=r.reduce(ge,[])})},d.inheritParams=function(c,e,l){void 0===l&&(l=[]);var u=c.map(function(e){return e.paramSchema}).reduce(ge,[]).filter(function(e){return!e.inherit}).map(v("id"));return e.map(function(e){var t=W({},e&&e.paramValues),n=oe(t,l);t=se(t,l);var r,i,a,o=se((r=c,i=e.state,a=ue(r,_("state",i)),W({},a&&a.paramValues)||{}),u),s=W(t,o,n);return new xt(e.state).applyRawParams(s)})},d.treeChanges=function(e,r,t){for(var n,i,a,o,s,c,l=Math.min(e.length,r.length),u=0;u<l&&e[u].state!==t&&(n=e[u],i=r[u],n.equals(i,d.nonDynamicParams));)u++;o=(a=e).slice(0,u),s=a.slice(u);var f=o.map(function(e,t){var n=e.clone();return n.paramValues=r[t].paramValues,n});return c=r.slice(u),{from:a,to:f.concat(c),retained:o,retainedWithToParams:f,exiting:s,entering:c}},d.matching=function(e,t,i){var a=!1;return xe(e,t).reduce(function(e,t){var n=t[0],r=t[1];return(a=a||!n.equals(r,i))?e:e.concat(n)},[])},d.equals=function(e,t,n){return e.length===t.length&&d.matching(e,t,n).length===e.length},d.subPath=function(e,t){var n=ue(e,t),r=e.indexOf(n);return-1===r?void 0:e.slice(0,r+1)},d.nonDynamicParams=function(e){return e.state.parameters({inherit:!1}).filter(function(e){return!e.dynamic})},d.paramValues=function(e){return e.reduce(function(e,t){return W(e,t.paramValues)},{})},d}(),Dt={when:{LAZY:"LAZY",EAGER:"EAGER"},async:{WAIT:"WAIT",NOWAIT:"NOWAIT"}},It={when:"LAZY",async:"WAIT"},Pt=function(){function o(e,t,n,r,i){if(this.resolved=!1,this.promise=void 0,e instanceof o)W(this,e);else if(k(t)){if(x(e))throw new Error("new Resolvable(): token argument is required");if(!k(t))throw new Error("new Resolvable(): resolveFn argument must be a function");this.token=e,this.policy=r,this.resolveFn=t,this.deps=n||[],this.data=i,this.resolved=void 0!==i,this.promise=this.resolved?L.$q.when(this.data):void 0}else if(I(e)&&e.token&&(e.hasOwnProperty("resolveFn")||e.hasOwnProperty("data"))){var a=e;return new o(a.token,a.resolveFn,a.deps,a.policy,a.data)}}return o.prototype.getPolicy=function(e){var t=this.policy||{},n=e&&e.resolvePolicy||{};return{when:t.when||n.when||It.when,async:t.async||n.async||It.async}},o.prototype.resolve=function(t,n){var r=this,e=L.$q,i=t.findNode(this),a=i&&i.state,o=this.getPolicy(a).async,s=k(o)?o:z;return this.promise=e.when().then(function(){return e.all(t.getDependencies(r).map(function(e){return e.get(t,n)}))}).then(function(e){return r.resolveFn.apply(null,e)}).then(s).then(function(e){return r.data=e,r.resolved=!0,r.resolveFn=null,mt.traceResolvableResolved(r,n),r.data})},o.prototype.get=function(e,t){return this.promise||this.resolve(e,t)},o.prototype.toString=function(){return"Resolvable(token: "+ze(this.token)+", requires: ["+this.deps.map(ze)+"])"},o.prototype.clone=function(){return new o(this)},o.fromData=function(e,t){return new o(e,function(){return t},null,null,t)},o}(),Mt=Dt.when,$t=[Mt.EAGER,Mt.LAZY],Ot=[Mt.EAGER],Rt="Native Injector",Nt=function(){function e(e){this._path=e}return e.prototype.getTokens=function(){return this._path.reduce(function(e,t){return e.concat(t.resolvables.map(function(e){return e.token}))},[]).reduce(ve,[])},e.prototype.getResolvable=function(t){return Ee(this._path.map(function(e){return e.resolvables}).reduce(ge,[]).filter(function(e){return e.token===t}))},e.prototype.getPolicy=function(e){var t=this.findNode(e);return e.getPolicy(t.state)},e.prototype.subContext=function(t){return new e(Et.subPath(this._path,function(e){return e.state===t}))},e.prototype.addResolvables=function(e,t){var n=ue(this._path,_("state",t)),r=e.map(function(e){return e.token});n.resolvables=n.resolvables.filter(function(e){return-1===r.indexOf(e.token)}).concat(e)},e.prototype.resolvePath=function(e,s){var c=this;void 0===e&&(e="LAZY");var l=(Q($t,e)?e:"LAZY")===Dt.when.EAGER?Ot:$t;mt.traceResolvePath(this._path,e,s);var u=function(t,n){return function(e){return Q(t,c.getPolicy(e)[n])}},t=this._path.reduce(function(e,t){var n=t.resolvables.filter(u(l,"when")),r=n.filter(u(["NOWAIT"],"async")),i=n.filter(f(u(["NOWAIT"],"async"))),a=c.subContext(t.state),o=function(t){return t.get(a,s).then(function(e){return{token:t.token,value:e}})};return r.forEach(o),e.concat(i.map(o))},[]);return L.$q.all(t)},e.prototype.injector=function(){return this._injector||(this._injector=new Lt(this))},e.prototype.findNode=function(t){return ue(this._path,function(e){return Q(e.resolvables,t)})},e.prototype.getDependencies=function(t){var r=this,n=this.findNode(t),i=(Et.subPath(this._path,function(e){return e===n})||this._path).reduce(function(e,t){return e.concat(t.resolvables)},[]).filter(function(e){return e!==t});return t.deps.map(function(t){var e=i.filter(function(e){return e.token===t});if(e.length)return Ee(e);var n=r.injector().getNative(t);if(w(n))throw new Error("Could not find Dependency Injection token: "+ze(t));return new Pt(t,function(){return n},[],n)})},e}(),Lt=function(){function e(e){this.context=e,this.native=this.get(Rt)||L.$injector}return e.prototype.get=function(e){var t=this.context.getResolvable(e);if(t){if("NOWAIT"===this.context.getPolicy(t).async)return t.get(this.context);if(!t.resolved)throw new Error("Resolvable async .get() not complete:"+ze(t.token));return t.data}return this.getNative(e)},e.prototype.getAsync=function(e){var t=this.context.getResolvable(e);return t?t.get(this.context):L.$q.when(this.native.get(e))},e.prototype.getNative=function(e){return this.native&&this.native.get(e)},e}();function Ft(e){return e.name}function Gt(e){return e.self.$$state=function(){return e},e.self}function jt(e){return e.parent&&e.parent.data&&(e.data=e.self.data=K(e.parent.data,e.data)),e.data}var Bt=function(o,s){return function(e){var t=e.self;if(t&&t.url&&t.name&&t.name.match(/\.\*\*$/)){var n={};De(t,n),n.url+="{remainder:any}",t=n}var r=e.parent,i=function(e){if(!D(e))return!1;var t="^"===e.charAt(0);return{val:t?e.substring(1):e,root:t}}(t.url),a=i?o.compile(i.val,{state:t}):t.url;if(!a)return null;if(!o.isMatcher(a))throw new Error("Invalid url '"+a+"' in state '"+e+"'");return i&&i.root?a:(r&&r.navigable||s()).url.append(a)}};function Ut(e){return e.parent?e.parent.path.concat(e):[e]}function Ht(e){var t=e.parent?W({},e.parent.includes):{};return t[e.name]=!0,t}function Wt(e){var t,n,r=function(e){return e.provide||e.token},i=g([[v("resolveFn"),function(e){return new Pt(r(e),e.resolveFn,e.deps,e.policy)}],[v("useFactory"),function(e){return new Pt(r(e),e.useFactory,e.deps||e.dependencies,e.policy)}],[v("useClass"),function(e){return new Pt(r(e),function(){return new e.useClass},[],e.policy)}],[v("useValue"),function(e){return new Pt(r(e),function(){return e.useValue},[],e.policy,e.useValue)}],[v("useExisting"),function(e){return new Pt(r(e),z,[e.useExisting],e.policy)}]]),a=g([[c(v("val"),D),function(e){return new Pt(e.token,z,[e.val],e.policy)}],[c(v("val"),P),function(e){return new Pt(e.token,Ee(e.val),e.val.slice(0,-1),e.policy)}],[c(v("val"),k),function(e){return new Pt(e.token,e.val,(t=e.val,n=L.$injector,t.$inject||n&&n.annotate(t,n.strictDi)||"deferred"),e.policy);var t,n}]]),o=g([[h(Pt),function(e){return e}],[function(e){return!(!e.token||!e.resolveFn)},i],[function(e){return!(!e.provide&&!e.token||!(e.useValue||e.useFactory||e.useExisting||e.useClass))},i],[function(e){return!!(e&&e.val&&(D(e.val)||P(e.val)||k(e.val)))},a],[p(!0),function(e){throw new Error("Invalid resolve value: "+ze(e))}]]),s=e.resolve;return(P(s)?s:(t=s,n=e.resolvePolicy||{},Object.keys(t||{}).map(function(e){return{token:e,val:t[e],deps:void 0,policy:n[e]}}))).map(o)}var qt,zt,Vt=function(){function e(t,e){this.matcher=t;var r,n,i=this,a=function(){return t.find("")},o=function(e){return""===e.name};this.builders={name:[Ft],self:[Gt],parent:[function(e){return o(e)?null:t.find(i.parentName(e))||a()}],data:[jt],url:[Bt(e,a)],navigable:[(n=o,function(e){return!n(e)&&e.url?e:e.parent?e.parent.navigable:null})],params:[(r=e.paramFactory,function(n){var e=n.url&&n.url.parameters({inherit:!1})||[],t=he(fe(se(n.params||{},e.map(v("id"))),function(e,t){return r.fromConfig(t,null,n.self)}));return e.concat(t).map(function(e){return[e.id,e]}).reduce(ke,{})})],views:[],path:[Ut],includes:[Ht],resolvables:[Wt]}}return e.prototype.builder=function(e,t){var n=this.builders,r=n[e]||[];return D(e)&&!T(t)?1<r.length?r:r[0]:D(e)&&k(t)?(n[e]=r,n[e].push(t),function(){return n[e].splice(n[e].indexOf(t,1))&&null}):void 0},e.prototype.build=function(e){var t=this.matcher,n=this.builders,r=this.parentName(e);if(r&&!t.find(r,void 0,!1))return null;for(var i in n)if(n.hasOwnProperty(i)){var a=n[i].reduce(function(t,n){return function(e){return n(e,t)}},V);e[i]=a(e)}return e},e.prototype.parentName=function(e){var t=e.name||"",n=t.split(".");if("**"===n.pop()&&n.pop(),n.length){if(e.parent)throw new Error("States that specify the 'parent:' property should not have a '.' in their name ("+t+")");return n.join(".")}return e.parent?D(e.parent)?e.parent:e.parent.name:""},e.prototype.name=function(e){var t=e.name;if(-1!==t.indexOf(".")||!e.parent)return t;var n=D(e.parent)?e.parent:e.parent.name;return n?n+"."+t:t},e}(),Yt=function(){function n(e){return n.create(e||{})}return n.create=function(e){e=n.isStateClass(e)?new e:e;var t=K(K(e,n.prototype));return e.$$state=function(){return t},t.self=e,t.__stateObjectCache={nameGlob:Re.fromString(t.name)},t},n.prototype.is=function(e){return this===e||this.self===e||this.fqn()===e},n.prototype.fqn=function(){if(!(this.parent&&this.parent instanceof this.constructor))return this.name;var e=this.parent.fqn();return e?e+"."+this.name:this.name},n.prototype.root=function(){return this.parent&&this.parent.root()||this},n.prototype.parameters=function(t){return((t=re(t,{inherit:!0,matchingKeys:null})).inherit&&this.parent&&this.parent.parameters()||[]).concat(he(this.params)).filter(function(e){return!t.matchingKeys||t.matchingKeys.hasOwnProperty(e.id)})},n.prototype.parameter=function(e,t){return void 0===t&&(t={}),this.url&&this.url.parameter(e,t)||ue(he(this.params),_("id",e))||t.inherit&&this.parent&&this.parent.parameter(e)},n.prototype.toString=function(){return this.fqn()},n.isStateClass=function(e){return k(e)&&!0===e.__uiRouterState},n.isState=function(e){return I(e.__stateObjectCache)},n}(),Kt=function(){function e(e){this._states=e}return e.prototype.isRelative=function(e){return 0===(e=e||"").indexOf(".")||0===e.indexOf("^")},e.prototype.find=function(e,t,n){if(void 0===n&&(n=!0),e||""===e){var r=D(e),i=r?e:e.name;this.isRelative(i)&&(i=this.resolvePath(i,t));var a=this._states[i];if(a&&(r||!(r||a!==e&&a.self!==e)))return a;if(r&&n){var o=he(this._states).filter(function(e){return e.__stateObjectCache.nameGlob&&e.__stateObjectCache.nameGlob.matches(i)});return 1<o.length&&st.error("stateMatcher.find: Found multiple matches for "+i+" using glob: ",o.map(function(e){return e.name})),o[0]}}},e.prototype.resolvePath=function(e,t){if(!t)throw new Error("No reference point given for path '"+e+"'");for(var n=this.find(t),r=e.split("."),i=r.length,a=0,o=n;a<i;a++)if(""!==r[a]||0!==a){if("^"!==r[a])break;if(!o.parent)throw new Error("Path '"+e+"' not valid for state '"+n.name+"'");o=o.parent}else o=n;var s=r.slice(a).join(".");return o.name+(o.name&&s?".":"")+s},e}(),Qt=function(){function e(e,t,n,r){this.router=e,this.states=t,this.builder=n,this.listeners=r,this.queue=[]}return e.prototype.dispose=function(){this.queue=[]},e.prototype.register=function(e){var t=this.queue,n=Yt.create(e),r=n.name;if(!D(r))throw new Error("State must have a valid name");if(this.states.hasOwnProperty(r)||Q(t.map(v("name")),r))throw new Error("State '"+r+"' is already defined");return t.push(n),this.flush(),n},e.prototype.flush=function(){for(var t=this,e=this.queue,n=this.states,r=this.builder,i=[],a=[],o={},s=function(e){return t.states.hasOwnProperty(e)&&t.states[e]},c=function(){i.length&&t.listeners.forEach(function(e){return e("registered",i.map(function(e){return e.self}))})};0<e.length;){var l=e.shift(),u=l.name,f=r.build(l),d=a.indexOf(l);if(f){var h=s(u);if(h&&h.name===u)throw new Error("State '"+u+"' is already defined");var p=s(u+".**");p&&this.router.stateRegistry.deregister(p),n[u]=l,this.attachRoute(l),0<=d&&a.splice(d,1),i.push(l)}else{var m=o[u];if(o[u]=e.length,0<=d&&m===e.length)return e.push(l),c(),n;d<0&&a.push(l),e.push(l)}}return c(),n},e.prototype.attachRoute=function(e){if(!e.abstract&&e.url){var t=this.router.urlService.rules;t.rule(t.urlRuleFactory.create(e))}},e}(),Xt=function(){function e(e){this.router=e,this.states={},this.listeners=[],this.matcher=new Kt(this.states),this.builder=new Vt(this.matcher,e.urlMatcherFactory),this.stateQueue=new Qt(e,this.states,this.builder,this.listeners),this._registerRoot()}return e.prototype._registerRoot=function(){(this._root=this.stateQueue.register({name:"",url:"^",views:null,params:{"#":{value:null,type:"hash",dynamic:!0}},abstract:!0})).navigable=null},e.prototype.dispose=function(){var t=this;this.stateQueue.dispose(),this.listeners=[],this.get().forEach(function(e){return t.get(e)&&t.deregister(e)})},e.prototype.onStatesChanged=function(e){return this.listeners.push(e),function(){Z(this.listeners)(e)}.bind(this)},e.prototype.root=function(){return this._root},e.prototype.register=function(e){return this.stateQueue.register(e)},e.prototype._deregisterTree=function(e){var n=this,r=this.get().map(function(e){return e.$$state()}),i=function(t){var e=r.filter(function(e){return-1!==t.indexOf(e.parent)});return 0===e.length?e:e.concat(i(e))},t=i([e]),a=[e].concat(t).reverse();return a.forEach(function(e){var t=n.router.urlService.rules;t.rules().filter(_("state",e)).forEach(function(e){return t.removeRule(e)}),delete n.states[e.name]}),a},e.prototype.deregister=function(e){var t=this.get(e);if(!t)throw new Error("Can't deregister state; not found: "+e);var n=this._deregisterTree(t.$$state());return this.listeners.forEach(function(e){return e("deregistered",n.map(function(e){return e.self}))}),n},e.prototype.get=function(e,t){var n=this;if(0===arguments.length)return Object.keys(this.states).map(function(e){return n.states[e].self});var r=this.matcher.find(e,t);return r&&r.self||null},e.prototype.decorator=function(e,t){return this.builder.builder(e,t)},e}();(qt=m.TransitionHookPhase||(m.TransitionHookPhase={}))[qt.CREATE=0]="CREATE",qt[qt.BEFORE=1]="BEFORE",qt[qt.RUN=2]="RUN",qt[qt.SUCCESS=3]="SUCCESS",qt[qt.ERROR=4]="ERROR",(zt=m.TransitionHookScope||(m.TransitionHookScope={}))[zt.TRANSITION=0]="TRANSITION",zt[zt.STATE=1]="STATE";var Zt={current:V,transition:null,traceData:{},bind:null},Jt=function(){function a(e,t,n,r){var i=this;this.transition=e,this.stateContext=t,this.registeredHook=n,this.options=r,this.isSuperseded=function(){return i.type.hookPhase===m.TransitionHookPhase.RUN&&!i.options.transition.isActive()},this.options=re(r,Zt),this.type=n.eventType}return a.chain=function(e,t){return e.reduce(function(e,t){return e.then(function(){return t.invokeHook()})},t||L.$q.when())},a.invokeHooks=function(e,t){for(var n=0;n<e.length;n++){var r=e[n].invokeHook();if(R(r)){var i=e.slice(n+1);return a.chain(i,r).then(t)}}return t()},a.runAllHooks=function(e){e.forEach(function(e){return e.invokeHook()})},a.prototype.logError=function(e){this.transition.router.stateService.defaultErrorHandler()(e)},a.prototype.invokeHook=function(){var t=this,n=this.registeredHook;if(!n._deregistered){var e=this.getNotCurrentRejection();if(e)return e;var r=this.options;mt.traceHookInvocation(this,this.transition,r);var i=function(e){return n.eventType.getErrorHandler(t)(e)},a=function(e){return n.eventType.getResultHandler(t)(e)};try{var o=n.callback.call(r.bind,t.transition,t.stateContext);return!this.type.synchronous&&R(o)?o.catch(function(e){return Fe.normalize(e).toPromise()}).then(a,i):a(o)}catch(e){return i(Fe.normalize(e))}finally{n.invokeLimit&&++n.invokeCount>=n.invokeLimit&&n.deregister()}}},a.prototype.handleHookResult=function(e){var t=this,n=this.getNotCurrentRejection();return n||(R(e)?e.then(function(e){return t.handleHookResult(e)}):(mt.traceHookResult(e,this.transition,this.options),!1===e?Fe.aborted("Hook aborted transition").toPromise():h(kt)(e)?Fe.redirected(e).toPromise():void 0))},a.prototype.getNotCurrentRejection=function(){var e=this.transition.router;return e._disposed?Fe.aborted("UIRouter instance #"+e.$id+" has been stopped (disposed)").toPromise():this.transition._aborted?Fe.aborted().toPromise():this.isSuperseded()?Fe.superseded(this.options.current()).toPromise():void 0},a.prototype.toString=function(){var e=this.options,t=this.registeredHook;return(S("traceData.hookType")(e)||"internal")+" context: "+(S("traceData.context.state.name")(e)||S("traceData.context")(e)||"unknown")+", "+Ge(200,He(t.callback))},a.HANDLE_RESULT=function(t){return function(e){return t.handleHookResult(e)}},a.LOG_REJECTED_RESULT=function(t){return function(e){R(e)&&e.catch(function(e){return t.logError(Fe.normalize(e))})}},a.LOG_ERROR=function(t){return function(e){return t.logError(e)}},a.REJECT_ERROR=function(e){return function(e){return Oe(e)}},a.THROW_ERROR=function(e){return function(e){throw e}},a}();function en(e,t,n){var i=D(t)?[t]:t;return!!(k(i)?i:function(e){for(var t=i,n=0;n<t.length;n++){var r=new Re(t[n]);if(r&&r.matches(e.name)||!r&&t[n]===e.name)return!0}return!1})(e,n)}var tn=function(){function e(e,t,n,r,i,a){void 0===a&&(a={}),this.tranSvc=e,this.eventType=t,this.callback=n,this.matchCriteria=r,this.removeHookFromRegistry=i,this.invokeCount=0,this._deregistered=!1,this.priority=a.priority||0,this.bind=a.bind||null,this.invokeLimit=a.invokeLimit}return e.prototype._matchingNodes=function(e,t,n){if(!0===t)return e;var r=e.filter(function(e){return en(e.state,t,n)});return r.length?r:null},e.prototype._getDefaultMatchCriteria=function(){return fe(this.tranSvc._pluginapi._getPathTypes(),function(){return!0})},e.prototype._getMatchingNodes=function(a,o){var s=this,c=W(this._getDefaultMatchCriteria(),this.matchCriteria);return he(this.tranSvc._pluginapi._getPathTypes()).reduce(function(e,t){var n=t.scope===m.TransitionHookScope.STATE,r=a[t.name]||[],i=n?r:[Ee(r)];return e[t.name]=s._matchingNodes(i,c[t.name],o),e},{})},e.prototype.matches=function(e,t){var n=this._getMatchingNodes(e,t);return he(n).every(z)?n:null},e.prototype.deregister=function(){this.removeHookFromRegistry(this),this._deregistered=!0},e}();function nn(e,i,a){var o=(e._registeredHooks=e._registeredHooks||{})[a.name]=[],s=Z(o);function t(e,t,n){void 0===n&&(n={});var r=new tn(i,a,t,e,s,n);return o.push(r),r.deregister.bind(r)}return e[a.name]=t}var rn=function(){function e(e){this.transition=e}return e.prototype.buildHooksForPhase=function(e){var t=this;return this.transition.router.transitionService._pluginapi._getEvents(e).map(function(e){return t.buildHooks(e)}).reduce(ge,[]).filter(z)},e.prototype.buildHooks=function(a){var o=this.transition,e=o.treeChanges(),t=this.getMatchingHooks(a,e,o);if(!t)return[];var s={transition:o,current:o.options().current};return t.map(function(i){return i.matches(e,o)[a.criteriaMatchPath.name].map(function(e){var t=W({bind:i.bind,traceData:{hookType:a.name,context:e}},s),n=a.criteriaMatchPath.scope===m.TransitionHookScope.STATE?e.state.self:null,r=new Jt(o,n,i,t);return{hook:i,node:e,transitionHook:r}})}).reduce(ge,[]).sort(function(i){void 0===i&&(i=!1);return function(e,t){var n=i?-1:1,r=(e.node.state.path.length-t.node.state.path.length)*n;return 0!==r?r:t.hook.priority-e.hook.priority}}(a.reverseSort)).map(function(e){return e.transitionHook})},e.prototype.getMatchingHooks=function(t,n,r){var e=t.hookPhase===m.TransitionHookPhase.CREATE,i=this.transition.router.transitionService;return(e?[i]:[this.transition,i]).map(function(e){return e.getHooks(t.name)}).filter(Ce(P,"broken event named: "+t.name)).reduce(ge,[]).filter(function(e){return e.matches(n,r)})},e}();var an=v("self"),on=function(){function t(e,t,n){var r=this;if(this._deferred=L.$q.defer(),this.promise=this._deferred.promise,this._registeredHooks={},this._hookBuilder=new rn(this),this.isActive=function(){return r.router.globals.transition===r},this.router=n,!(this._targetState=t).valid())throw new Error(t.error());this._options=W({current:p(this)},t.options()),this.$id=n.transitionService._transitionCount++;var i=Et.buildToPath(e,t);this._treeChanges=Et.treeChanges(e,i,this._options.reloadState),this.createTransitionHookRegFns();var a=this._hookBuilder.buildHooksForPhase(m.TransitionHookPhase.CREATE);Jt.invokeHooks(a,function(){return null}),this.applyViewConfigs(n)}return t.prototype.onBefore=function(e,t,n){},t.prototype.onStart=function(e,t,n){},t.prototype.onExit=function(e,t,n){},t.prototype.onRetain=function(e,t,n){},t.prototype.onEnter=function(e,t,n){},t.prototype.onFinish=function(e,t,n){},t.prototype.onSuccess=function(e,t,n){},t.prototype.onError=function(e,t,n){},t.prototype.createTransitionHookRegFns=function(){var t=this;this.router.transitionService._pluginapi._getEvents().filter(function(e){return e.hookPhase!==m.TransitionHookPhase.CREATE}).forEach(function(e){return nn(t,t.router.transitionService,e)})},t.prototype.getHooks=function(e){return this._registeredHooks[e]},t.prototype.applyViewConfigs=function(e){var t=this._treeChanges.entering.map(function(e){return e.state});Et.applyViewConfigs(e.transitionService.$view,this._treeChanges.to,t)},t.prototype.$from=function(){return Ee(this._treeChanges.from).state},t.prototype.$to=function(){return Ee(this._treeChanges.to).state},t.prototype.from=function(){return this.$from().self},t.prototype.to=function(){return this.$to().self},t.prototype.targetState=function(){return this._targetState},t.prototype.is=function(e){return e instanceof t?this.is({to:e.$to().name,from:e.$from().name}):!(e.to&&!en(this.$to(),e.to,this)||e.from&&!en(this.$from(),e.from,this))},t.prototype.params=function(e){return void 0===e&&(e="to"),Object.freeze(this._treeChanges[e].map(v("paramValues")).reduce(ie,{}))},t.prototype.paramsChanged=function(){var e=this.params("from"),n=this.params("to"),t=[].concat(this._treeChanges.to).concat(this._treeChanges.from).map(function(e){return e.paramSchema}).reduce(_e,[]).reduce(ve,[]);return At.changed(t,e,n).reduce(function(e,t){return e[t.id]=n[t.id],e},{})},t.prototype.injector=function(t,e){void 0===e&&(e="to");var n=this._treeChanges[e];return t&&(n=Et.subPath(n,function(e){return e.state===t||e.state.name===t})),new Nt(n).injector()},t.prototype.getResolveTokens=function(e){return void 0===e&&(e="to"),new Nt(this._treeChanges[e]).getTokens()},t.prototype.addResolvable=function(e,t){void 0===t&&(t=""),e=h(Pt)(e)?e:new Pt(e);var n="string"==typeof t?t:t.name,r=this._treeChanges.to,i=ue(r,function(e){return e.state.name===n});new Nt(r).addResolvables([e],i.state)},t.prototype.redirectedFrom=function(){return this._options.redirectedFrom||null},t.prototype.originalTransition=function(){var e=this.redirectedFrom();return e&&e.originalTransition()||this},t.prototype.options=function(){return this._options},t.prototype.entering=function(){return de(this._treeChanges.entering,v("state")).map(an)},t.prototype.exiting=function(){return de(this._treeChanges.exiting,v("state")).map(an).reverse()},t.prototype.retained=function(){return de(this._treeChanges.retained,v("state")).map(an)},t.prototype.views=function(e,t){void 0===e&&(e="entering");var n=this._treeChanges[e];return(n=t?n.filter(_("state",t)):n).map(v("views")).filter(z).reduce(ge,[])},t.prototype.treeChanges=function(e){return e?this._treeChanges[e]:this._treeChanges},t.prototype.redirect=function(e){for(var t=1,n=this;null!=(n=n.redirectedFrom());)if(20<++t)throw new Error("Too many consecutive Transition redirects (20+)");var r={redirectedFrom:this,source:"redirect"};"url"===this.options().source&&!1!==e.options().location&&(r.location="replace");var i=W({},this.options(),e.options(),r);e=e.withOptions(i,!0);var a,o=this.router.transitionService.create(this._treeChanges.from,e),s=this._treeChanges.entering,c=o._treeChanges.entering;return Et.matching(c,s,Et.nonDynamicParams).filter(f((a=e.options().reloadState,function(e){return a&&e.state.includes[a.name]}))).forEach(function(e,t){e.resolvables=s[t].resolvables}),o},t.prototype._changedParams=function(){var e=this._treeChanges;if(!this._options.reload&&(!e.exiting.length&&!e.entering.length&&e.to.length===e.from.length&&!xe(e.to,e.from).map(function(e){return e[0].state!==e[1].state}).reduce(me,!1))){var t=e.to.map(function(e){return e.paramSchema}),n=[e.to,e.from].map(function(e){return e.map(function(e){return e.paramValues})});return xe(t,n[0],n[1]).map(function(e){var t=e[0],n=e[1],r=e[2];return At.changed(t,n,r)}).reduce(ge,[])}},t.prototype.dynamic=function(){var e=this._changedParams();return!!e&&e.map(function(e){return e.dynamic}).reduce(me,!1)},t.prototype.ignored=function(){return!!this._ignoredReason()},t.prototype._ignoredReason=function(){var e=this.router.globals.transition,r=this._options.reloadState,t=function(e,t){if(e.length!==t.length)return!1;var n=Et.matching(e,t);return e.length===n.filter(function(e){return!r||!e.state.includes[r.name]}).length},n=this.treeChanges(),i=e&&e.treeChanges();return i&&t(i.to,n.to)&&t(i.exiting,n.exiting)?"SameAsPending":0===n.exiting.length&&0===n.entering.length&&t(n.from,n.to)?"SameAsCurrent":void 0},t.prototype.run=function(){var t=this,n=Jt.runAllHooks,r=function(e){return t._hookBuilder.buildHooksForPhase(e)},e=r(m.TransitionHookPhase.BEFORE);return Jt.invokeHooks(e,function(){var e=t.router.globals;return e.lastStartedTransitionId=t.$id,e.transition=t,e.transitionHistory.enqueue(t),mt.traceTransitionStart(t),L.$q.when(void 0)}).then(function(){var e=r(m.TransitionHookPhase.RUN);return Jt.invokeHooks(e,function(){return L.$q.when(void 0)})}).then(function(){mt.traceSuccess(t.$to(),t),t.success=!0,t._deferred.resolve(t.to()),n(r(m.TransitionHookPhase.SUCCESS))},function(e){mt.traceError(e,t),t.success=!1,t._deferred.reject(e),t._error=e,n(r(m.TransitionHookPhase.ERROR))}),this.promise},t.prototype.valid=function(){return!this.error()||void 0!==this.success},t.prototype.abort=function(){w(this.success)&&(this._aborted=!0)},t.prototype.error=function(){var e=this.$to();if(e.self.abstract)return Fe.invalid("Cannot transition to abstract state '"+e.name+"'");var t=e.parameters(),n=this.params(),r=t.filter(function(e){return!e.validates(n[e.id])});if(r.length){var i=r.map(function(e){return"["+e.id+":"+ze(n[e.id])+"]"}).join(", "),a="The following parameter values are not valid for state '"+e.name+"': "+i;return Fe.invalid(a)}return!1===this.success?this._error:void 0},t.prototype.toString=function(){var e=this.from(),t=this.to(),n=function(e){return null!==e["#"]&&void 0!==e["#"]?e:se(e,["#"])};return"Transition#"+this.$id+"( '"+(I(e)?e.name:e)+"'"+ze(n(this._treeChanges.from.map(v("paramValues")).reduce(ie,{})))+" -> "+(this.valid()?"":"(X) ")+"'"+(I(t)?t.name:t)+"'"+ze(n(this.params()))+" )"},t.diToken=t}();function sn(e,t){var n=["",""],r=e.replace(/[\\\[\]\^$*+?.()|{}]/g,"\\$&");if(!t)return r;switch(t.squash){case!1:n=["(",")"+(t.isOptional?"?":"")];break;case!0:r=r.replace(/\/$/,""),n=["(?:/(",")|/)?"];break;default:n=["("+t.squash+"|",")?"]}return r+n[0]+t.type.pattern.source+n[1]}var cn=et("/"),ln={state:{params:{}},strict:!0,caseInsensitive:!0},un=function(){function g(a,o,e,t){var s=this;this._cache={path:[this]},this._children=[],this._params=[],this._segments=[],this._compiled=[],this.config=t=re(t,ln),this.pattern=a;for(var n,r,i,c=/([:*])([\w\[\]]+)|\{([\w\[\]]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,l=/([:]?)([\w\[\].-]+)|\{([\w\[\].-]+)(?:\:\s*((?:[^{}\\]+|\\.|\{(?:[^{}\\]+|\\.)*\})+))?\}/g,u=[],f=0,d=function(e){if(!g.nameValidator.test(e))throw new Error("Invalid parameter name '"+e+"' in pattern '"+a+"'");if(ue(s._params,_("id",e)))throw new Error("Duplicate parameter name '"+e+"' in pattern '"+a+"'")},h=function(e,t){var n,r=e[2]||e[3],i=t?e[4]:e[4]||("*"===e[1]?"[\\s\\S]*":null);return{id:r,regexp:i,segment:a.substring(f,e.index),type:i?o.type(i)||(n=i,K(o.type(t?"query":"path"),{pattern:new RegExp(n,s.config.caseInsensitive?"i":void 0)})):null}};(n=c.exec(a))&&!(0<=(r=h(n,!1)).segment.indexOf("?"));)d(r.id),this._params.push(e.fromPath(r.id,r.type,t.state)),this._segments.push(r.segment),u.push([r.segment,Ee(this._params)]),f=c.lastIndex;var p=(i=a.substring(f)).indexOf("?");if(0<=p){var m=i.substring(p);if(i=i.substring(0,p),0<m.length)for(f=0;n=l.exec(m);)d((r=h(n,!0)).id),this._params.push(e.fromSearch(r.id,r.type,t.state)),f=c.lastIndex}this._segments.push(i),this._compiled=u.map(function(e){return sn.apply(null,e)}).concat(sn(i))}return g.encodeDashes=function(e){return encodeURIComponent(e).replace(/-/g,function(e){return"%5C%"+e.charCodeAt(0).toString(16).toUpperCase()})},g.pathSegmentsAndParams=function(e){return xe(e._segments,e._params.filter(function(e){return e.location===m.DefType.PATH}).concat(void 0)).reduce(ge,[]).filter(function(e){return""!==e&&T(e)})},g.queryParams=function(e){return e._params.filter(function(e){return e.location===m.DefType.SEARCH})},g.compare=function(e,t){var n=function(e){return e._cache.weights=e._cache.weights||(t=e,t._cache.segments=t._cache.segments||t._cache.path.map(g.pathSegmentsAndParams).reduce(ge,[]).reduce(tt,[]).map(function(e){return D(e)?cn(e):e}).reduce(ge,[])).map(function(e){return"/"===e?1:D(e)?2:e instanceof At?3:void 0});var t},r=n(e),i=n(t);!function(e,t,n){for(var r=Math.max(e.length,t.length);e.length<r;)e.push(n);for(;t.length<r;)t.push(n)}(r,i,0);var a,o,s=xe(r,i);for(o=0;o<s.length;o++)if(0!==(a=s[o][0]-s[o][1]))return a;return 0},g.prototype.append=function(e){return this._children.push(e),e._cache={path:this._cache.path.concat(e),parent:this,pattern:null},e},g.prototype.isRoot=function(){return this._cache.path[0]===this},g.prototype.toString=function(){return this.pattern},g.prototype.exec=function(e,r,t,n){var i=this;void 0===r&&(r={});var a,o,s,c=(a=this._cache,o="pattern",s=function(){return new RegExp(["^",ye(i._cache.path.map(v("_compiled"))).join(""),!1===i.config.strict?"/?":"","$"].join(""),i.config.caseInsensitive?"i":void 0)},a[o]=a[o]||s()).exec(e);if(!c)return null;var l,u=this.parameters(),f=u.filter(function(e){return!e.isSearch()}),d=u.filter(function(e){return e.isSearch()}),h=this._cache.path.map(function(e){return e._segments.length-1}).reduce(function(e,t){return e+t}),p={};if(h!==c.length-1)throw new Error("Unbalanced capture group in route '"+this.pattern+"'");for(var m=0;m<h;m++){for(var g=f[m],_=c[m+1],b=0;b<g.replace.length;b++)g.replace[b].from===_&&(_=g.replace[b].to);_&&!0===g.array&&(void 0,_=de(de((l=function(e){return e.split("").reverse().join("")})(_).split(/-(?!\\)/),l),function(e){return e.replace(/\\-/g,"-")}).reverse()),T(_)&&(_=g.type.decode(_)),p[g.id]=g.value(_)}return d.forEach(function(e){for(var t=r[e.id],n=0;n<e.replace.length;n++)e.replace[n].from===t&&(t=e.replace[n].to);T(t)&&(t=e.type.decode(t)),p[e.id]=e.value(t)}),t&&(p["#"]=t),p},g.prototype.parameters=function(e){return void 0===e&&(e={}),!1===e.inherit?this._params:ye(this._cache.path.map(function(e){return e._params}))},g.prototype.parameter=function(r,e){var i=this;void 0===e&&(e={});var t=this._cache.parent;return function(){for(var e=0,t=i._params;e<t.length;e++){var n=t[e];if(n.id===r)return n}}()||!1!==e.inherit&&t&&t.parameter(r,e)||null},g.prototype.validates=function(r){return r=r||{},this.parameters().filter(function(e){return r.hasOwnProperty(e.id)}).map(function(e){return n=r[(t=e).id],!t||t.validates(n);var t,n}).reduce(pe,!0)},g.prototype.format=function(o){void 0===o&&(o={});var e=this._cache.path,t=e.map(g.pathSegmentsAndParams).reduce(ge,[]).map(function(e){return D(e)?e:r(e)}),n=e.map(g.queryParams).reduce(ge,[]).map(r);if(t.concat(n).filter(function(e){return!1===e.isValid}).length)return null;function r(e){var t=e.value(o[e.id]),n=e.validates(t),r=e.isDefaultValue(t),i=!!r&&e.squash,a=e.type.encode(t);return{param:e,value:t,isValid:n,isDefaultValue:r,squash:i,encoded:a}}var i=t.reduce(function(e,t){if(D(t))return e+t;var n=t.squash,r=t.encoded,i=t.param;return!0===n?e.match(/\/$/)?e.slice(0,-1):e:D(n)?e+n:!1!==n?e:null==r?e:P(r)?e+de(r,g.encodeDashes).join("-"):i.raw?e+r:e+encodeURIComponent(r)},""),a=n.map(function(e){var t=e.param,n=e.squash,r=e.encoded,i=e.isDefaultValue;if(!(null==r||i&&!1!==n)&&(P(r)||(r=[r]),0!==r.length))return t.raw||(r=de(r,encodeURIComponent)),r.map(function(e){return t.id+"="+e})}).filter(z).reduce(ge,[]).join("&");return i+(a?"?"+a:"")+(o["#"]?"#"+o["#"]:"")},g.nameValidator=/^\w+([-.]+\w+)*(?:\[\])?$/,g}(),fn=function(){return(fn=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e}).apply(this,arguments)},dn=function(){function e(e){this.router=e}return e.prototype.fromConfig=function(e,t,n){return new At(e,t,m.DefType.CONFIG,this.router.urlService.config,n)},e.prototype.fromPath=function(e,t,n){return new At(e,t,m.DefType.PATH,this.router.urlService.config,n)},e.prototype.fromSearch=function(e,t,n){return new At(e,t,m.DefType.SEARCH,this.router.urlService.config,n)},e}(),hn=function(){function e(e){var r=this;this.router=e,this.paramFactory=new dn(this.router),this.caseInsensitive=function(e){return r.router.urlService.config.caseInsensitive(e)},this.defaultSquashPolicy=function(e){return r.router.urlService.config.defaultSquashPolicy(e)},this.strictMode=function(e){return r.router.urlService.config.strictMode(e)},this.type=function(e,t,n){return r.router.urlService.config.type(e,t,n)||r},W(this,{UrlMatcher:un,Param:At})}return e.prototype.compile=function(e,t){var n=this.router.urlService.config,r=t&&!t.state&&t.params;t=r?fn({state:{params:r}},t):t;var i={strict:n._isStrictMode,caseInsensitive:n._isCaseInsensitive};return new un(e,n.paramTypes,this.paramFactory,W(i,t))},e.prototype.isMatcher=function(n){if(!I(n))return!1;var r=!0;return H(un.prototype,function(e,t){k(e)&&(r=r&&T(n[t])&&k(n[t]))}),r},e.prototype.$get=function(){var e=this.router.urlService.config;return e.paramTypes.enqueue=!1,e.paramTypes._flushTypeQueue(),this},e}(),pn=function(){function e(e){this.router=e}return e.prototype.compile=function(e){return this.router.urlMatcherFactory.compile(e)},e.prototype.create=function(e,t){var n=this,r=Yt.isState,i=g([[D,function(e){return i(n.compile(e))}],[h(un),function(e){return n.fromUrlMatcher(e,t)}],[r,function(e){return n.fromState(e,n.router)}],[h(RegExp),function(e){return n.fromRegExp(e,t)}],[k,function(e){return new mn(e,t)}]]),a=i(e);if(!a)throw new Error("invalid 'what' in when()");return a},e.prototype.fromUrlMatcher=function(n,t){var e=t;D(t)&&(t=this.router.urlMatcherFactory.compile(t)),h(un)(t)&&(e=function(e){return t.format(e)});var r={urlMatcher:n,matchPriority:function(t){var e=n.parameters().filter(function(e){return e.isOptional});return e.length?e.filter(function(e){return t[e.id]}).length/e.length:1e-6},type:"URLMATCHER"};return W(new mn(function(e){var t=n.exec(e.path,e.search,e.hash);return n.validates(t)&&t},e),r)},e.prototype.fromState=function(r,i){var e={state:r,type:"STATE"};return W(this.fromUrlMatcher(r.url,function(e){var t=i.stateService,n=i.globals;t.href(r,e)!==t.href(n.current,n.params)&&t.transitionTo(r,e,{inherit:!0,source:"url"})}),e)},e.prototype.fromRegExp=function(t,e){if(t.global||t.sticky)throw new Error("Rule RegExp must not be global or sticky");var n=D(e)?function(n){return e.replace(/\$(\$|\d{1,2})/,function(e,t){return n["$"===t?0:Number(t)]})}:e,r={regexp:t,type:"REGEXP"};return W(new mn(function(e){return t.exec(e.path)},n),r)},e.isUrlRule=function(t){return t&&["type","match","handler"].every(function(e){return T(t[e])})},e}(),mn=function(e,t){var n=this;this.match=e,this.type="RAW",this.matchPriority=function(e){return 0-n.$id},this.handler=t||z};var gn,_n=function(){function e(e){var r=this;this.router=e,this.sync=function(e){return r.router.urlService.sync(e)},this.listen=function(e){return r.router.urlService.listen(e)},this.deferIntercept=function(e){return r.router.urlService.deferIntercept(e)},this.match=function(e){return r.router.urlService.match(e)},this.initial=function(e){return r.router.urlService.rules.initial(e)},this.otherwise=function(e){return r.router.urlService.rules.otherwise(e)},this.removeRule=function(e){return r.router.urlService.rules.removeRule(e)},this.rule=function(e){return r.router.urlService.rules.rule(e)},this.rules=function(){return r.router.urlService.rules.rules()},this.sort=function(e){return r.router.urlService.rules.sort(e)},this.when=function(e,t,n){return r.router.urlService.rules.when(e,t,n)},this.urlRuleFactory=new pn(e)}return e.prototype.update=function(e){var t=this.router.locationService;e?this.location=t.url():t.url()!==this.location&&t.url(this.location,!0)},e.prototype.push=function(e,t,n){var r=n&&!!n.replace;this.router.urlService.url(e.format(t||{}),r)},e.prototype.href=function(e,t,n){var r=e.format(t);if(null==r)return null;n=n||{absolute:!1};var i,a,o,s,c=this.router.urlService.config,l=c.html5Mode();if(l||null===r||(r="#"+c.hashPrefix()+r),i=r,a=l,o=n.absolute,r="/"===(s=c.baseHref())?i:a?Ke(s)+i:o?s.slice(1)+i:i,!n.absolute||!r)return r;var u=!l&&r?"/":"",f=c.port(),d=80===f||443===f?"":":"+f;return[c.protocol(),"://",c.host(),d,u,r].join("")},Object.defineProperty(e.prototype,"interceptDeferred",{get:function(){return this.router.urlService.interceptDeferred},enumerable:!0,configurable:!0}),e}(),bn=function(){function c(e){var n=this;this.router=e,this._uiViews=[],this._viewConfigs=[],this._viewConfigFactories={},this._listeners=[],this._pluginapi={_rootViewContext:this._rootViewContext.bind(this),_viewConfigFactory:this._viewConfigFactory.bind(this),_registeredUIView:function(t){return ue(n._uiViews,function(e){return n.router.$id+"."+e.id===t})},_registeredUIViews:function(){return n._uiViews},_activeViewConfigs:function(){return n._viewConfigs},_onSync:function(e){return n._listeners.push(e),function(){return Z(n._listeners,e)}}}}return c.normalizeUIViewTarget=function(e,t){void 0===t&&(t="");var n=t.split("@"),r=n[0]||"$default",i=D(n[1])?n[1]:"^",a=/^(\^(?:\.\^)*)\.(.*$)/.exec(r);a&&(i=a[1],r=a[2]),"!"===r.charAt(0)&&(r=r.substr(1),i="");/^(\^(?:\.\^)*)$/.exec(i)?i=i.split(".").reduce(function(e,t){return e.parent},e).name:"."===i&&(i=e.name);return{uiViewName:r,uiViewContextAnchor:i}},c.prototype._rootViewContext=function(e){return this._rootContext=e||this._rootContext},c.prototype._viewConfigFactory=function(e,t){this._viewConfigFactories[e]=t},c.prototype.createViewConfig=function(e,t){var n=this._viewConfigFactories[t.$type];if(!n)throw new Error("ViewService: No view config factory registered for type "+t.$type);var r=n(e,t);return P(r)?r:[r]},c.prototype.deactivateViewConfig=function(e){mt.traceViewServiceEvent("<- Removing",e),Z(this._viewConfigs,e)},c.prototype.activateViewConfig=function(e){mt.traceViewServiceEvent("-> Registering",e),this._viewConfigs.push(e)},c.prototype.sync=function(){var n=this,r=this._uiViews.map(function(e){return[e.fqn,e]}).reduce(ke,{});function i(e){for(var t=e.viewDecl.$context,n=0;++n&&t.parent;)t=t.parent;return n}var a=l(function(e,t,n,r){return t*(e(n)-e(r))}),e=this._uiViews.sort(a(function(e){var t=function(e){return e&&e.parent?t(e.parent)+1:1};return 1e4*e.fqn.split(".").length+t(e.creationContext)},1)).map(function(e){var t=n._viewConfigs.filter(c.matches(r,e));return 1<t.length&&t.sort(a(i,-1)),{uiView:e,viewConfig:t[0]}}),t=e.map(function(e){return e.viewConfig}),o=this._viewConfigs.filter(function(e){return!Q(t,e)}).map(function(e){return{uiView:void 0,viewConfig:e}});e.forEach(function(e){-1!==n._uiViews.indexOf(e.uiView)&&e.uiView.configUpdated(e.viewConfig)});var s=e.concat(o);this._listeners.forEach(function(e){return e(s)}),mt.traceViewSync(s)},c.prototype.registerUIView=function(t){mt.traceViewServiceUIViewEvent("-> Registering",t);var e=this._uiViews;return e.filter(function(e){return e.fqn===t.fqn&&e.$type===t.$type}).length&&mt.traceViewServiceUIViewEvent("!!!! duplicate uiView named:",t),e.push(t),this.sync(),function(){-1!==e.indexOf(t)?(mt.traceViewServiceUIViewEvent("<- Deregistering",t),Z(e)(t)):mt.traceViewServiceUIViewEvent("Tried removing non-registered uiView",t)}},c.prototype.available=function(){return this._uiViews.map(v("fqn"))},c.prototype.active=function(){return this._uiViews.filter(v("$config")).map(v("name"))},c.matches=function(s,c){return function(e){if(c.$type!==e.viewDecl.$type)return!1;var t=e.viewDecl,n=t.$uiViewName.split("."),r=c.fqn.split(".");if(!q(n,r.slice(0-n.length)))return!1;var i=1-n.length||void 0,a=r.slice(0,i).join("."),o=s[a].creationContext;return t.$uiViewContextAnchor===(o&&o.name)}},c}(),vn=function(){function e(){this.params=new Tt,this.lastStartedTransitionId=-1,this.transitionHistory=new Ne([],1),this.successfulTransitions=new Ne([],1)}return e.prototype.dispose=function(){this.transitionHistory.clear(),this.successfulTransitions.clear(),this.transition=null},e}();function yn(e){if(!(k(e)||D(e)||h(kt)(e)||kt.isDef(e)))throw new Error("'handler' must be a string, function, TargetState, or have a state: 'newtarget' property");return k(e)?e:p(e)}gn=function(e,t){var n,r,i,a,o,s,c,l,u=(n=e,(t.priority||0)-(n.priority||0));return 0!==u?u:(r=t,0!==(u=((i={STATE:4,URLMATCHER:4,REGEXP:3,RAW:2,OTHER:1})[e.type]||0)-(i[r.type]||0))?u:(o=t,0!==(u=(a=e).urlMatcher&&o.urlMatcher?un.compare(a.urlMatcher,o.urlMatcher):0)?u:(c=t,(l={STATE:!0,URLMATCHER:!0})[(s=e).type]&&l[c.type]?0:(s.$id||0)-(c.$id||0))))};var wn=function(){function e(e){this.router=e,this._sortFn=gn,this._rules=[],this._id=0,this.urlRuleFactory=new pn(e)}return e.prototype.dispose=function(e){this._rules=[],delete this._otherwiseFn},e.prototype.initial=function(e){var t=yn(e);this.rule(this.urlRuleFactory.create(function(e,t){return 0===t.globals.transitionHistory.size()&&!!/^\/?$/.exec(e.path)},t))},e.prototype.otherwise=function(e){var t=yn(e);this._otherwiseFn=this.urlRuleFactory.create(p(!0),t),this._sorted=!1},e.prototype.removeRule=function(e){Z(this._rules,e)},e.prototype.rule=function(e){var t=this;if(!pn.isUrlRule(e))throw new Error("invalid rule");return e.$id=this._id++,e.priority=e.priority||0,this._rules.push(e),this._sorted=!1,function(){return t.removeRule(e)}},e.prototype.rules=function(){return this.ensureSorted(),this._rules.concat(this._otherwiseFn?[this._otherwiseFn]:[])},e.prototype.sort=function(e){for(var t=this.stableSort(this._rules,this._sortFn=e||this._sortFn),n=0,r=0;r<t.length;r++)t[r]._group=n,r<t.length-1&&0!==this._sortFn(t[r],t[r+1])&&n++;this._rules=t,this._sorted=!0},e.prototype.ensureSorted=function(){this._sorted||this.sort()},e.prototype.stableSort=function(e,r){var t=e.map(function(e,t){return{elem:e,idx:t}});return t.sort(function(e,t){var n=r(e.elem,t.elem);return 0===n?e.idx-t.idx:n}),t.map(function(e){return e.elem})},e.prototype.when=function(e,t,n){var r=this.urlRuleFactory.create(e,t);return T(n&&n.priority)&&(r.priority=n.priority),this.rule(r),r},e}(),Cn=function(){function e(e){var t=this;this.router=e,this.paramTypes=new St,this._isCaseInsensitive=!1,this._isStrictMode=!0,this._defaultSquashPolicy=!1,this.dispose=function(){return t.paramTypes.dispose()},this.baseHref=function(){return t.router.locationConfig.baseHref()},this.hashPrefix=function(e){return t.router.locationConfig.hashPrefix(e)},this.host=function(){return t.router.locationConfig.host()},this.html5Mode=function(){return t.router.locationConfig.html5Mode()},this.port=function(){return t.router.locationConfig.port()},this.protocol=function(){return t.router.locationConfig.protocol()}}return e.prototype.caseInsensitive=function(e){return this._isCaseInsensitive=T(e)?e:this._isCaseInsensitive},e.prototype.defaultSquashPolicy=function(e){if(T(e)&&!0!==e&&!1!==e&&!D(e))throw new Error("Invalid squash policy: "+e+". Valid policies: false, true, arbitrary-string");return this._defaultSquashPolicy=T(e)?e:this._defaultSquashPolicy},e.prototype.strictMode=function(e){return this._isStrictMode=T(e)?e:this._isStrictMode},e.prototype.type=function(e,t,n){var r=this.paramTypes.type(e,t,n);return T(t)?this:r},e}(),An=function(){function e(e){var r=this;this.router=e,this.interceptDeferred=!1,this.rules=new wn(this.router),this.config=new Cn(this.router),this.url=function(e,t,n){return r.router.locationService.url(e,t,n)},this.path=function(){return r.router.locationService.path()},this.search=function(){return r.router.locationService.search()},this.hash=function(){return r.router.locationService.hash()},this.onChange=function(e){return r.router.locationService.onChange(e)}}return e.prototype.dispose=function(){this.listen(!1),this.rules.dispose()},e.prototype.parts=function(){return{path:this.path(),search:this.search(),hash:this.hash()}},e.prototype.sync=function(e){if(!e||!e.defaultPrevented){var t=this.router,n=t.urlService,r=t.stateService,i={path:n.path(),search:n.search(),hash:n.hash()},a=this.match(i);g([[D,function(e){return n.url(e,!0)}],[kt.isDef,function(e){return r.go(e.state,e.params,e.options)}],[h(kt),function(e){return r.go(e.state(),e.params(),e.options())}]])(a&&a.rule.handler(a.match,i,this.router))}},e.prototype.listen=function(e){var t=this;if(!1!==e)return this._stopListeningFn=this._stopListeningFn||this.router.urlService.onChange(function(e){return t.sync(e)});this._stopListeningFn&&this._stopListeningFn(),delete this._stopListeningFn},e.prototype.deferIntercept=function(e){void 0===e&&(e=!0),this.interceptDeferred=e},e.prototype.match=function(e){var t=this;e=W({path:"",search:{},hash:""},e);for(var n,r,i,a=this.rules.rules(),o=0;o<a.length&&(!n||n.rule._group===a[o]._group);o++){var s=(r=a[o],void 0,(i=r.match(e,t.router))&&{match:i,rule:r,weight:r.matchPriority(i)});n=!n||s&&s.weight>n.weight?s:n}return n},e}(),Sn=0,Tn=N("LocationServices",["url","path","search","hash","onChange"]),xn=N("LocationConfig",["port","protocol","host","baseHref","html5Mode","hashPrefix"]),kn=function(){function e(e,t){void 0===e&&(e=Tn),void 0===t&&(t=xn),this.locationService=e,this.locationConfig=t,this.$id=Sn++,this._disposed=!1,this._disposables=[],this.trace=mt,this.viewService=new bn(this),this.globals=new vn,this.transitionService=new Kn(this),this.urlMatcherFactory=new hn(this),this.urlRouter=new _n(this),this.urlService=new An(this),this.stateRegistry=new Xt(this),this.stateService=new Qn(this),this._plugins={},this.viewService._pluginapi._rootViewContext(this.stateRegistry.root()),this.globals.$current=this.stateRegistry.root(),this.globals.current=this.globals.$current.self,this.disposable(this.globals),this.disposable(this.stateService),this.disposable(this.stateRegistry),this.disposable(this.transitionService),this.disposable(this.urlService),this.disposable(e),this.disposable(t)}return e.prototype.disposable=function(e){this._disposables.push(e)},e.prototype.dispose=function(e){var t=this;e&&k(e.dispose)?e.dispose(this):(this._disposed=!0,this._disposables.slice().forEach(function(e){try{"function"==typeof e.dispose&&e.dispose(t),Z(t._disposables,e)}catch(e){}}))},e.prototype.plugin=function(e,t){void 0===t&&(t={});var n=new e(this,t);if(!n.name)throw new Error("Required property `name` missing on plugin: "+n);return this._disposables.push(n),this._plugins[n.name]=n},e.prototype.getPlugin=function(e){return e?this._plugins[e]:he(this._plugins)},e}();function En(t){t.addResolvable(Pt.fromData(kn,t.router),""),t.addResolvable(Pt.fromData(on,t),""),t.addResolvable(Pt.fromData("$transition$",t),""),t.addResolvable(Pt.fromData("$stateParams",t.params()),""),t.entering().forEach(function(e){t.addResolvable(Pt.fromData("$state$",e),e)})}var Dn=Q(["$transition$",on]),In=function(e){var t=he(e.treeChanges()).reduce(ge,[]).reduce(ve,[]),n=function(e){return Dn(e.token)?Pt.fromData(e.token,null):e};t.forEach(function(e){e.resolvables=e.resolvables.map(n)})},Pn=function(t){var e=t.to().redirectTo;if(e){var n=t.router.stateService;return k(e)?L.$q.when(e(t)).then(r):r(e)}function r(e){if(e)return e instanceof kt?e:D(e)?n.target(e,t.params(),t.options()):e.state||e.params?n.target(e.state||t.to(),e.params||t.params(),t.options()):void 0}};function Mn(n){return function(e,t){return(0,t.$$state()[n])(e,t)}}var $n=Mn("onExit"),On=Mn("onRetain"),Rn=Mn("onEnter"),Nn=function(e){return new Nt(e.treeChanges().to).resolvePath("EAGER",e).then(V)},Ln=function(e,t){return new Nt(e.treeChanges().to).subContext(t.$$state()).resolvePath("LAZY",e).then(V)},Fn=function(e){return new Nt(e.treeChanges().to).resolvePath("LAZY",e).then(V)},Gn=function(e){var t=L.$q,n=e.views("entering");if(n.length)return t.all(n.map(function(e){return t.when(e.load())})).then(V)},jn=function(e){var t=e.views("entering"),n=e.views("exiting");if(t.length||n.length){var r=e.router.viewService;n.forEach(function(e){return r.deactivateViewConfig(e)}),t.forEach(function(e){return r.activateViewConfig(e)}),r.sync()}},Bn=function(e){var t=e.router.globals,n=function(){t.transition===e&&(t.transition=null)};e.onSuccess({},function(){t.successfulTransitions.enqueue(e),t.$current=e.$to(),t.current=t.$current.self,De(e.params(),t.params)},{priority:1e4}),e.promise.then(n,n)},Un=function(e){var t=e.options(),n=e.router.stateService,r=e.router.urlRouter;if("url"!==t.source&&t.location&&n.$current.navigable){var i={replace:"replace"===t.location};r.push(n.$current.navigable.url,n.params,i)}r.update(!0)},Hn=function(o){var s=o.router;var e=o.entering().filter(function(e){return!!e.$$state().lazyLoad}).map(function(e){return Wn(o,e)});return L.$q.all(e).then(function(){if("url"!==o.originalTransition().options().source){var e=o.targetState();return s.stateService.target(e.identifier(),e.params(),e.options())}var t=s.urlService,n=t.match(t.parts()),r=n&&n.rule;if(r&&"STATE"===r.type){var i=r.state,a=n.match;return s.stateService.target(i,a,o.options())}s.urlService.sync()})};function Wn(t,n){var r=n.$$state().lazyLoad,e=r._promise;if(!e){e=r._promise=L.$q.when(r(t,n)).then(function(e){e&&Array.isArray(e.states)&&e.states.forEach(function(e){return t.router.stateRegistry.register(e)});return e}).then(function(e){return delete n.lazyLoad,delete n.$$state().lazyLoad,delete r._promise,e},function(e){return delete r._promise,L.$q.reject(e)})}return e}var qn=function(e,t,n,r,i,a,o,s){void 0===i&&(i=!1),void 0===a&&(a=Jt.HANDLE_RESULT),void 0===o&&(o=Jt.REJECT_ERROR),void 0===s&&(s=!1),this.name=e,this.hookPhase=t,this.hookOrder=n,this.criteriaMatchPath=r,this.reverseSort=i,this.getResultHandler=a,this.getErrorHandler=o,this.synchronous=s};function zn(e){var t=e._ignoredReason();if(t){mt.traceTransitionIgnored(e);var n=e.router.globals.transition;return"SameAsCurrent"===t&&n&&n.abort(),Fe.ignored().toPromise()}}function Vn(e){if(!e.valid())throw new Error(e.error().toString())}var Yn={location:!0,relative:null,inherit:!1,notify:!0,reload:!1,supercede:!0,custom:{},current:function(){return null},source:"unknown"},Kn=function(){function e(e){this._transitionCount=0,this._eventTypes=[],this._registeredHooks={},this._criteriaPaths={},this._router=e,this.$view=e.viewService,this._deregisterHookFns={},this._pluginapi=Y(p(this),{},p(this),["_definePathType","_defineEvent","_getPathTypes","_getEvents","getHooks"]),this._defineCorePaths(),this._defineCoreEvents(),this._registerCoreTransitionHooks(),e.globals.successfulTransitions.onEvict(In)}return e.prototype.onCreate=function(e,t,n){},e.prototype.onBefore=function(e,t,n){},e.prototype.onStart=function(e,t,n){},e.prototype.onExit=function(e,t,n){},e.prototype.onRetain=function(e,t,n){},e.prototype.onEnter=function(e,t,n){},e.prototype.onFinish=function(e,t,n){},e.prototype.onSuccess=function(e,t,n){},e.prototype.onError=function(e,t,n){},e.prototype.dispose=function(e){he(this._registeredHooks).forEach(function(t){return t.forEach(function(e){e._deregistered=!0,Z(t,e)})})},e.prototype.create=function(e,t){return new on(e,t,this._router)},e.prototype._defineCoreEvents=function(){var e=m.TransitionHookPhase,t=Jt,n=this._criteriaPaths;this._defineEvent("onCreate",e.CREATE,0,n.to,!1,t.LOG_REJECTED_RESULT,t.THROW_ERROR,!0),this._defineEvent("onBefore",e.BEFORE,0,n.to),this._defineEvent("onStart",e.RUN,0,n.to),this._defineEvent("onExit",e.RUN,100,n.exiting,!0),this._defineEvent("onRetain",e.RUN,200,n.retained),this._defineEvent("onEnter",e.RUN,300,n.entering),this._defineEvent("onFinish",e.RUN,400,n.to),this._defineEvent("onSuccess",e.SUCCESS,0,n.to,!1,t.LOG_REJECTED_RESULT,t.LOG_ERROR,!0),this._defineEvent("onError",e.ERROR,0,n.to,!1,t.LOG_REJECTED_RESULT,t.LOG_ERROR,!0)},e.prototype._defineCorePaths=function(){var e=m.TransitionHookScope.STATE,t=m.TransitionHookScope.TRANSITION;this._definePathType("to",t),this._definePathType("from",t),this._definePathType("exiting",e),this._definePathType("retained",e),this._definePathType("entering",e)},e.prototype._defineEvent=function(e,t,n,r,i,a,o,s){void 0===i&&(i=!1),void 0===a&&(a=Jt.HANDLE_RESULT),void 0===o&&(o=Jt.REJECT_ERROR),void 0===s&&(s=!1);var c=new qn(e,t,n,r,i,a,o,s);this._eventTypes.push(c),nn(this,this,c)},e.prototype._getEvents=function(t){return(T(t)?this._eventTypes.filter(function(e){return e.hookPhase===t}):this._eventTypes.slice()).sort(function(e,t){var n=e.hookPhase-t.hookPhase;return 0===n?e.hookOrder-t.hookOrder:n})},e.prototype._definePathType=function(e,t){this._criteriaPaths[e]={name:e,scope:t}},e.prototype._getPathTypes=function(){return this._criteriaPaths},e.prototype.getHooks=function(e){return this._registeredHooks[e]},e.prototype._registerCoreTransitionHooks=function(){var e=this._deregisterHookFns;e.addCoreResolves=this.onCreate({},En),e.ignored=this.onBefore({},zn,{priority:-9999}),e.invalid=this.onBefore({},Vn,{priority:-1e4}),e.redirectTo=this.onStart({to:function(e){return!!e.redirectTo}},Pn),e.onExit=this.onExit({exiting:function(e){return!!e.onExit}},$n),e.onRetain=this.onRetain({retained:function(e){return!!e.onRetain}},On),e.onEnter=this.onEnter({entering:function(e){return!!e.onEnter}},Rn),e.eagerResolve=this.onStart({},Nn,{priority:1e3}),e.lazyResolve=this.onEnter({entering:p(!0)},Ln,{priority:1e3}),e.resolveAll=this.onFinish({},Fn,{priority:1e3}),e.loadViews=this.onFinish({},Gn),e.activateViews=this.onSuccess({},jn),e.updateGlobals=this.onCreate({},Bn),e.updateUrl=this.onSuccess({},Un,{priority:9999}),e.lazyLoad=this.onBefore({entering:function(e){return!!e.lazyLoad}},Hn)},e}(),Qn=function(){function n(e){this.router=e,this.invalidCallbacks=[],this._defaultErrorHandler=function(e){e instanceof Error&&e.stack?(console.error(e),console.error(e.stack)):e instanceof Fe?(console.error(e.toString()),e.detail&&e.detail.stack&&console.error(e.detail.stack)):console.error(e)};var t=Object.keys(n.prototype).filter(f(Q(["current","$current","params","transition"])));Y(p(n.prototype),this,p(this),t)}return Object.defineProperty(n.prototype,"transition",{get:function(){return this.router.globals.transition},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"params",{get:function(){return this.router.globals.params},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"current",{get:function(){return this.router.globals.current},enumerable:!0,configurable:!0}),Object.defineProperty(n.prototype,"$current",{get:function(){return this.router.globals.$current},enumerable:!0,configurable:!0}),n.prototype.dispose=function(){this.defaultErrorHandler(V),this.invalidCallbacks=[]},n.prototype._handleInvalidTargetState=function(e,n){var r=this,i=Et.makeTargetState(this.router.stateRegistry,e),t=this.router.globals,a=function(){return t.transitionHistory.peekTail()},o=a(),s=new Ne(this.invalidCallbacks.slice()),c=new Nt(e).injector(),l=function(e){if(e instanceof kt){var t=e;return(t=r.target(t.identifier(),t.params(),t.options())).valid()?a()!==o?Fe.superseded().toPromise():r.transitionTo(t.identifier(),t.params(),t.options()):Fe.invalid(t.error()).toPromise()}};return function t(){var e=s.dequeue();return void 0===e?Fe.invalid(n.error()).toPromise():L.$q.when(e(n,i,c)).then(l).then(function(e){return e||t()})}()},n.prototype.onInvalid=function(e){return this.invalidCallbacks.push(e),function(){Z(this.invalidCallbacks)(e)}.bind(this)},n.prototype.reload=function(e){return this.transitionTo(this.current,this.params,{reload:!T(e)||e,inherit:!1,notify:!1})},n.prototype.go=function(e,t,n){var r=re(n,{relative:this.$current,inherit:!0},Yn);return this.transitionTo(e,t,r)},n.prototype.target=function(e,t,n){if(void 0===n&&(n={}),I(n.reload)&&!n.reload.name)throw new Error("Invalid reload state object");var r=this.router.stateRegistry;if(n.reloadState=!0===n.reload?r.root():r.matcher.find(n.reload,n.relative),n.reload&&!n.reloadState)throw new Error("No such reload state '"+(D(n.reload)?n.reload:n.reload.name)+"'");return new kt(this.router.stateRegistry,e,t,n)},n.prototype.getCurrentPath=function(){var e=this,t=this.router.globals.successfulTransitions.peekTail();return t?t.treeChanges().to:[new xt(e.router.stateRegistry.root())]},n.prototype.transitionTo=function(e,t,n){var a=this;void 0===t&&(t={}),void 0===n&&(n={});var o=this.router,s=o.globals;n=re(n,Yn);var r=function(){return s.transition};n=W(n,{current:r});var i=this.target(e,t,n),c=this.getCurrentPath();if(!i.exists())return this._handleInvalidTargetState(c,i);if(!i.valid())return Oe(i.error());if(!1===n.supercede&&r())return Fe.ignored("Another transition is in progress and supercede has been set to false in TransitionOptions for the transition. So the transition was ignored in favour of the existing one in progress.").toPromise();var l=function(i){return function(e){if(e instanceof Fe){var t=o.globals.lastStartedTransitionId<=i.$id;if(e.type===m.RejectType.IGNORED)return t&&o.urlRouter.update(),L.$q.when(s.current);var n=e.detail;if(e.type===m.RejectType.SUPERSEDED&&e.redirected&&n instanceof kt){var r=i.redirect(n);return r.run().catch(l(r))}if(e.type===m.RejectType.ABORTED)return t&&o.urlRouter.update(),L.$q.reject(e)}return a.defaultErrorHandler()(e),L.$q.reject(e)}},u=this.router.transitionService.create(c,i),f=u.run().catch(l(u));return $e(f),W(f,{transition:u})},n.prototype.is=function(e,t,n){n=re(n,{relative:this.$current});var r=this.router.stateRegistry.matcher.find(e,n.relative);if(T(r)){if(this.$current!==r)return!1;if(!t)return!0;var i=r.parameters({inherit:!0,matchingKeys:t});return At.equals(i,At.values(i,t),this.params)}},n.prototype.includes=function(e,t,n){n=re(n,{relative:this.$current});var r=D(e)&&Re.fromString(e);if(r){if(!r.matches(this.$current.name))return!1;e=this.$current.name}var i=this.router.stateRegistry.matcher.find(e,n.relative),a=this.$current.includes;if(T(i)){if(!T(a[i.name]))return!1;if(!t)return!0;var o=i.parameters({inherit:!0,matchingKeys:t});return At.equals(o,At.values(o,t),this.params)}},n.prototype.href=function(e,t,n){n=re(n,{lossy:!0,inherit:!0,absolute:!1,relative:this.$current}),t=t||{};var r=this.router.stateRegistry.matcher.find(e,n.relative);if(!T(r))return null;n.inherit&&(t=this.params.$inherit(t,this.$current,r));var i=r&&n.lossy?r.navigable:r;return i&&void 0!==i.url&&null!==i.url?this.router.urlRouter.href(i.url,t,{absolute:n.absolute}):null},n.prototype.defaultErrorHandler=function(e){return this._defaultErrorHandler=e||this._defaultErrorHandler},n.prototype.get=function(e,t){var n=this.router.stateRegistry;return 0===arguments.length?n.get():n.get(e,t||this.$current)},n.prototype.lazyLoad=function(e,t){var n=this.get(e);if(!n||!n.lazyLoad)throw new Error("Can not lazy load "+e);var r=this.getCurrentPath(),i=Et.makeTargetState(this.router.stateRegistry,r);return Wn(t=t||this.router.transitionService.create(r,i),n)},n}(),Xn={when:function(n){return new Promise(function(e,t){return e(n)})},reject:function(n){return new Promise(function(e,t){t(n)})},defer:function(){var n={};return n.promise=new Promise(function(e,t){n.resolve=e,n.reject=t}),n},all:function(e){if(P(e))return Promise.all(e);if(I(e)){var t=Object.keys(e).map(function(t){return e[t].then(function(e){return{key:t,val:e}})});return Xn.all(t).then(function(e){return e.reduce(function(e,t){return e[t.key]=t.val,e},{})})}}},Zn={},Jn=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/gm,er=/([^\s,]+)/g,tr={get:function(e){return Zn[e]},has:function(e){return null!=tr.get(e)},invoke:function(e,t,n){var r=W({},Zn,n||{}),i=tr.annotate(e),a=Ce(function(e){return r.hasOwnProperty(e)},function(e){return"DI can't find injectable: '"+e+"'"}),o=i.filter(a).map(function(e){return r[e]});return k(e)?e.apply(t,o):e.slice(-1)[0].apply(t,o)},annotate:function(e){if(!O(e))throw new Error("Not an injectable function: "+e);if(e&&e.$inject)return e.$inject;if(P(e))return e.slice(0,-1);var t=e.toString().replace(Jn,"");return t.slice(t.indexOf("(")+1,t.indexOf(")")).match(er)||[]}},nr=function(e,t){var n=t[0],r=t[1];return e.hasOwnProperty(n)?P(e[n])?e[n].push(r):e[n]=[e[n],r]:e[n]=r,e},rr=function(e){return e.split("&").filter(z).map(Ze).reduce(nr,{})};function ir(e){var t=function(e){return e||""},n=Qe(e).map(t),r=n[0],i=n[1],a=Xe(r).map(t);return{path:a[0],search:a[1],hash:i,url:e}}var ar=function(e){var t=e.path(),n=e.search(),r=e.hash(),i=Object.keys(n).map(function(t){var e=n[t];return(P(e)?e:[e]).map(function(e){return t+"="+e})}).reduce(ge,[]).join("&");return t+(i?"?"+i:"")+(r?"#"+r:"")};function or(r,i,a,o){return function(e){var t=e.locationService=new a(e),n=e.locationConfig=new o(e,i);return{name:r,service:t,configuration:n,dispose:function(e){e.dispose(t),e.dispose(n)}}}}var sr,cr,lr,ur=function(){function e(e,t){var n=this;this.fireAfterUpdate=t,this._listeners=[],this._listener=function(t){return n._listeners.forEach(function(e){return e(t)})},this.hash=function(){return ir(n._get()).hash},this.path=function(){return ir(n._get()).path},this.search=function(){return rr(ir(n._get()).search)},this._location=G.location,this._history=G.history}return e.prototype.url=function(t,e){return void 0===e&&(e=!0),T(t)&&t!==this._get()&&(this._set(null,null,t,e),this.fireAfterUpdate&&this._listeners.forEach(function(e){return e({url:t})})),ar(this)},e.prototype.onChange=function(e){var t=this;return this._listeners.push(e),function(){return Z(t._listeners,e)}},e.prototype.dispose=function(e){ne(this._listeners)},e}(),fr=(sr=function(e,t){return(sr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}sr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),dr=function(n){function e(e){var t=n.call(this,e,!1)||this;return G.addEventListener("hashchange",t._listener,!1),t}return fr(e,n),e.prototype._get=function(){return Je(this._location.hash)},e.prototype._set=function(e,t,n,r){this._location.hash=n},e.prototype.dispose=function(e){n.prototype.dispose.call(this,e),G.removeEventListener("hashchange",this._listener)},e}(ur),hr=(cr=function(e,t){return(cr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}cr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),pr=function(t){function e(e){return t.call(this,e,!0)||this}return hr(e,t),e.prototype._get=function(){return this._url},e.prototype._set=function(e,t,n,r){this._url=n},e}(ur),mr=(lr=function(e,t){return(lr=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])})(e,t)},function(e,t){function n(){this.constructor=e}lr(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)}),gr=function(n){function e(e){var t=n.call(this,e,!0)||this;return t._config=e.urlService.config,G.addEventListener("popstate",t._listener,!1),t}return mr(e,n),e.prototype._getBasePrefix=function(){return Ke(this._config.baseHref())},e.prototype._get=function(){var e=this._location,t=e.pathname,n=e.hash,r=e.search;r=Xe(r)[1],n=Qe(n)[1];var i=this._getBasePrefix(),a=t===this._config.baseHref(),o=t.substr(0,i.length)===i;return(t=a?"/":o?t.substring(i.length):t)+(r?"?"+r:"")+(n?"#"+n:"")},e.prototype._set=function(e,t,n,r){var i=this._getBasePrefix(),a=n&&"/"!==n[0]?"/":"",o=""===n||"/"===n?this._config.baseHref():i+a+n;r?this._history.replaceState(e,t,o):this._history.pushState(e,t,o)},e.prototype.dispose=function(e){n.prototype.dispose.call(this,e),G.removeEventListener("popstate",this._listener)},e}(ur),_r=function(){var t=this;this.dispose=V,this._baseHref="",this._port=80,this._protocol="http",this._host="localhost",this._hashPrefix="",this.port=function(){return t._port},this.protocol=function(){return t._protocol},this.host=function(){return t._host},this.baseHref=function(){return t._baseHref},this.html5Mode=function(){return!1},this.hashPrefix=function(e){return T(e)?t._hashPrefix=e:t._hashPrefix}},br=function(){function e(e,t){void 0===t&&(t=!1),this._isHtml5=t,this._baseHref=void 0,this._hashPrefix=""}return e.prototype.port=function(){return location.port?Number(location.port):"https"===this.protocol()?443:80},e.prototype.protocol=function(){return location.protocol.replace(/:/g,"")},e.prototype.host=function(){return location.hostname},e.prototype.html5Mode=function(){return this._isHtml5},e.prototype.hashPrefix=function(e){return T(e)?this._hashPrefix=e:this._hashPrefix},e.prototype.baseHref=function(e){return T(e)&&(this._baseHref=e),w(this._baseHref)&&(this._baseHref=this.getBaseHref()),this._baseHref},e.prototype.getBaseHref=function(){var e=document.getElementsByTagName("base")[0];return e&&e.href?e.href.replace(/^([^/:]*:)?\/\/[^/]*/,""):this._isHtml5?"/":location.pathname||"/"},e.prototype.dispose=function(){},e}();function vr(e){return L.$injector=tr,{name:"vanilla.services",$q:L.$q=Xn,$injector:tr,dispose:function(){return null}}}var yr=or("vanilla.hashBangLocation",!1,dr,br),wr=or("vanilla.pushStateLocation",!0,gr,br),Cr=or("vanilla.memoryLocation",!1,pr,_r),Ar=function(){function e(){}return e.prototype.dispose=function(e){},e}(),Sr=Object.freeze({__proto__:null,root:G,fromJson:B,toJson:U,forEach:H,extend:W,equals:q,identity:z,noop:V,createProxyFunctions:Y,inherit:K,inArray:Q,_inArray:X,removeFrom:Z,_removeFrom:J,pushTo:ee,_pushTo:te,deregAll:ne,defaults:re,mergeR:ie,ancestors:ae,pick:oe,omit:se,pluck:ce,filter:le,find:ue,mapObj:fe,map:de,values:he,allTrueR:pe,anyTrueR:me,unnestR:ge,flattenR:_e,pushR:be,uniqR:ve,unnest:ye,flatten:we,assertPredicate:Ce,assertMap:Ae,assertFn:Se,pairs:Te,arrayTuples:xe,applyPairs:ke,tail:Ee,copy:De,_extend:Ie,silenceUncaughtInPromise:$e,silentRejection:Oe,makeStub:N,services:L,Glob:Re,curry:l,compose:n,pipe:c,prop:v,propEq:_,parse:S,not:f,and:i,or:a,all:u,any:d,is:h,eq:o,val:p,invoke:s,pattern:g,isUndefined:w,isDefined:T,isNull:C,isNullOrUndefined:x,isFunction:k,isNumber:E,isString:D,isObject:I,isArray:P,isDate:M,isRegExp:$,isInjectable:O,isPromise:R,Queue:Ne,maxLength:Ge,padString:je,kebobString:Be,functionToString:Ue,fnToString:He,stringify:ze,beforeAfterSubstr:Ve,hostRegex:Ye,stripLastPathElement:Ke,splitHash:Qe,splitQuery:Xe,splitEqual:Ze,trimHashVal:Je,splitOnDelim:et,joinNeighborsR:tt,get Category(){return m.Category},Trace:pt,trace:mt,get DefType(){return m.DefType},Param:At,ParamTypes:St,StateParams:Tt,ParamType:gt,PathNode:xt,PathUtils:Et,resolvePolicies:Dt,defaultResolvePolicy:It,Resolvable:Pt,NATIVE_INJECTOR_TOKEN:Rt,ResolveContext:Nt,resolvablesBuilder:Wt,StateBuilder:Vt,StateObject:Yt,StateMatcher:Kt,StateQueueManager:Qt,StateRegistry:Xt,StateService:Qn,TargetState:kt,get TransitionHookPhase(){return m.TransitionHookPhase},get TransitionHookScope(){return m.TransitionHookScope},HookBuilder:rn,matchState:en,RegisteredHook:tn,makeEvent:nn,get RejectType(){return m.RejectType},Rejection:Fe,Transition:on,TransitionHook:Jt,TransitionEventType:qn,defaultTransOpts:Yn,TransitionService:Kn,UrlRules:wn,UrlConfig:Cn,UrlMatcher:un,ParamFactory:dn,UrlMatcherFactory:hn,UrlRouter:_n,UrlRuleFactory:pn,BaseUrlRule:mn,UrlService:An,ViewService:bn,UIRouterGlobals:vn,UIRouter:kn,$q:Xn,$injector:tr,BaseLocationServices:ur,HashLocationService:dr,MemoryLocationService:pr,PushStateLocationService:gr,MemoryLocationConfig:_r,BrowserLocationConfig:br,keyValsToObjectR:nr,getParams:rr,parseUrl:ir,buildUrl:ar,locationPluginFactory:or,servicesPlugin:vr,hashLocationPlugin:yr,pushStateLocationPlugin:wr,memoryLocationPlugin:Cr,UIRouterPluginBase:Ar});function Tr(){var n=null;return function(e,t){return n=n||L.$injector.get("$templateFactory"),[new Dr(e,t,n)]}}var xr=function(e,n){return e.reduce(function(e,t){return e||T(n[t])},!1)};function kr(r){if(!r.parent)return{};var i=["component","bindings","componentProvider"],a=["templateProvider","templateUrl","template","notify","async"].concat(["controller","controllerProvider","controllerAs","resolveAs"]),e=i.concat(a);if(T(r.views)&&xr(e,r))throw new Error("State '"+r.name+"' has a 'views' object. It cannot also have \"view properties\" at the state level.  Move the following properties into a view (in the 'views' object):  "+e.filter(function(e){return T(r[e])}).join(", "));var o={},t=r.views||{$default:oe(r,e)};return H(t,function(e,t){if(t=t||"$default",D(e)&&(e={component:e}),e=W({},e),xr(i,e)&&xr(a,e))throw new Error("Cannot combine: "+i.join("|")+" with: "+a.join("|")+" in stateview: '"+t+"@"+r.name+"'");e.resolveAs=e.resolveAs||"$resolve",e.$type="ng1",e.$context=r,e.$name=t;var n=bn.normalizeUIViewTarget(e.$context,e.$name);e.$uiViewName=n.uiViewName,e.$uiViewContextAnchor=n.uiViewContextAnchor,o[t]=e}),o}var Er=0,Dr=function(){function e(e,t,n){var r=this;this.path=e,this.viewDecl=t,this.factory=n,this.$id=Er++,this.loaded=!1,this.getTemplate=function(e,t){return r.component?r.factory.makeComponentTemplate(e,t,r.component,r.viewDecl.bindings):r.template}}return e.prototype.load=function(){var t=this,e=L.$q,n=new Nt(this.path),r=this.path.reduce(function(e,t){return W(e,t.paramValues)},{}),i={template:e.when(this.factory.fromConfig(this.viewDecl,r,n)),controller:e.when(this.getController(n))};return e.all(i).then(function(e){return mt.traceViewServiceEvent("Loaded",t),t.controller=e.controller,W(t,e.template),t})},e.prototype.getController=function(e){var t=this.viewDecl.controllerProvider;if(!O(t))return this.viewDecl.controller;var n=L.$injector.annotate(t),r=P(t)?Ee(t):t;return new Pt("",r,n).get(e)},e}(),Ir=function(){function e(){var r=this;this._useHttp=A.version.minor<3,this.$get=["$http","$templateCache","$injector",function(e,t,n){return r.$templateRequest=n.has&&n.has("$templateRequest")&&n.get("$templateRequest"),r.$http=e,r.$templateCache=t,r}]}return e.prototype.useHttpService=function(e){this._useHttp=e},e.prototype.fromConfig=function(e,t,n){var r=function(e){return L.$q.when(e).then(function(e){return{template:e}})},i=function(e){return L.$q.when(e).then(function(e){return{component:e}})};return T(e.template)?r(this.fromString(e.template,t)):T(e.templateUrl)?r(this.fromUrl(e.templateUrl,t)):T(e.templateProvider)?r(this.fromProvider(e.templateProvider,t,n)):T(e.component)?i(e.component):T(e.componentProvider)?i(this.fromComponentProvider(e.componentProvider,t,n)):r("<ui-view></ui-view>")},e.prototype.fromString=function(e,t){return k(e)?e(t):e},e.prototype.fromUrl=function(e,t){return k(e)&&(e=e(t)),null==e?null:this._useHttp?this.$http.get(e,{cache:this.$templateCache,headers:{Accept:"text/html"}}).then(function(e){return e.data}):this.$templateRequest(e)},e.prototype.fromProvider=function(e,t,n){var r=L.$injector.annotate(e),i=P(e)?Ee(e):e;return new Pt("",i,r).get(n)},e.prototype.fromComponentProvider=function(e,t,n){var r=L.$injector.annotate(e),i=P(e)?Ee(e):e;return new Pt("",i,r).get(n)},e.prototype.makeComponentTemplate=function(c,l,e,u){u=u||{};var f=3<=A.version.minor?"::":"",d=function(e){var t=Be(e);return/^(x|data)-/.exec(t)?"x-"+t:t},t=function(e){var t=L.$injector.get(e+"Directive");if(!t||!t.length)throw new Error("Unable to find component named '"+e+"'");return t.map(Pr).reduce(ge,[])}(e).map(function(e){var t=e.name,n=e.type,r=d(t);if(c.attr(r)&&!u[t])return r+"='"+c.attr(r)+"'";var i=u[t]||t;if("@"===n)return r+"='{{"+f+"$resolve."+i+"}}'";if("&"!==n)return r+"='"+f+"$resolve."+i+"'";var a=l.getResolvable(i),o=a&&a.data,s=o&&L.$injector.annotate(o)||[];return r+"='$resolve."+i+(P(o)?"["+(o.length-1)+"]":"")+"("+s.join(",")+")'"}).join(" "),n=d(e);return"<"+n+" "+t+"></"+n+">"},e}();var Pr=function(e){return I(e.bindToController)?Mr(e.bindToController):Mr(e.scope)},Mr=function(t){return Object.keys(t||{}).map(function(e){return[e,/^([=<@&])[?]?(.*)/.exec(t[e])]}).filter(function(e){return T(e)&&P(e[1])}).map(function(e){return{name:e[1][2]||e[0],type:e[1][1]}})},$r=function(){function n(e,t){this.stateRegistry=e,this.stateService=t,Y(p(n.prototype),this,p(this))}return n.prototype.decorator=function(e,t){return this.stateRegistry.decorator(e,t)||this},n.prototype.state=function(e,t){return I(e)?t=e:t.name=e,this.stateRegistry.register(t),this},n.prototype.onInvalid=function(e){return this.stateService.onInvalid(e)},n}(),Or=function(n){return function(e,t){var i=e[n],a="onExit"===n?"from":"to";return i?function(e,t){var n=new Nt(e.treeChanges(a)).subContext(t.$$state()),r=W(Xr(n),{$state$:t,$transition$:e});return L.$injector.invoke(i,this,r)}:void 0}},Rr=function(){function e(e){this._urlListeners=[],this.$locationProvider=e;var t=p(e);Y(t,this,t,["hashPrefix"])}return e.monkeyPatchPathParameterType=function(e){var t=e.urlMatcherFactory.type("path");t.encode=function(e){return null!=e?e.toString().replace(/(~|\/)/g,function(e){return{"~":"~~","/":"~2F"}[e]}):e},t.decode=function(e){return null!=e?e.toString().replace(/(~~|~2F)/g,function(e){return{"~~":"~","~2F":"/"}[e]}):e}},e.prototype.dispose=function(){},e.prototype.onChange=function(e){var t=this;return this._urlListeners.push(e),function(){return Z(t._urlListeners)(e)}},e.prototype.html5Mode=function(){var e=this.$locationProvider.html5Mode();return(e=I(e)?e.enabled:e)&&this.$sniffer.history},e.prototype.baseHref=function(){return this._baseHref||(this._baseHref=this.$browser.baseHref()||this.$window.location.pathname)},e.prototype.url=function(e,t,n){return void 0===t&&(t=!1),T(e)&&this.$location.url(e),t&&this.$location.replace(),n&&this.$location.state(n),this.$location.url()},e.prototype._runtimeServices=function(e,t,n,r,i){var a=this;this.$location=t,this.$sniffer=n,this.$browser=r,this.$window=i,e.$on("$locationChangeSuccess",function(t){return a._urlListeners.forEach(function(e){return e(t)})});var o=p(t);Y(o,this,o,["replace","path","search","hash"]),Y(o,this,o,["port","protocol","host"])},e}(),Nr=function(){function n(e){this.router=e}return n.injectableHandler=function(t,n){return function(e){return L.$injector.invoke(n,null,{$match:e,$stateParams:t.globals.params})}},n.prototype.$get=function(){var e=this.router.urlService;return this.router.urlRouter.update(!0),e.interceptDeferred||e.listen(),this.router.urlRouter},n.prototype.rule=function(e){var t=this;if(!k(e))throw new Error("'rule' must be a function");var n=new mn(function(){return e(L.$injector,t.router.locationService)},z);return this.router.urlService.rules.rule(n),this},n.prototype.otherwise=function(e){var t=this,n=this.router.urlService.rules;if(D(e))n.otherwise(e);else{if(!k(e))throw new Error("'rule' must be a string or function");n.otherwise(function(){return e(L.$injector,t.router.locationService)})}return this},n.prototype.when=function(e,t){return(P(t)||k(t))&&(t=n.injectableHandler(this.router,t)),this.router.urlService.rules.when(e,t),this},n.prototype.deferIntercept=function(e){this.router.urlService.deferIntercept(e)},n}();A.module("ui.router.angular1",[]);var Lr=A.module("ui.router.init",["ng"]),Fr=A.module("ui.router.util",["ui.router.init"]),Gr=A.module("ui.router.router",["ui.router.util"]),jr=A.module("ui.router.state",["ui.router.router","ui.router.util","ui.router.angular1"]),Br=A.module("ui.router",["ui.router.init","ui.router.state","ui.router.angular1"]),Ur=(A.module("ui.router.compat",["ui.router"]),null);function Hr(e){(Ur=this.router=new kn).stateProvider=new $r(Ur.stateRegistry,Ur.stateService),Ur.stateRegistry.decorator("views",kr),Ur.stateRegistry.decorator("onExit",Or("onExit")),Ur.stateRegistry.decorator("onRetain",Or("onRetain")),Ur.stateRegistry.decorator("onEnter",Or("onEnter")),Ur.viewService._pluginapi._viewConfigFactory("ng1",Tr());var s=Ur.locationService=Ur.locationConfig=new Rr(e);function t(e,t,n,r,i,a,o){return s._runtimeServices(i,e,r,t,n),delete Ur.router,delete Ur.$get,Ur}return Rr.monkeyPatchPathParameterType(Ur),((Ur.router=Ur).$get=t).$inject=["$location","$browser","$window","$sniffer","$rootScope","$http","$templateCache"],Ur}Hr.$inject=["$locationProvider"];var Wr=function(n){return["$uiRouterProvider",function(e){var t=e.router[n];return t.$get=function(){return t},t}]};function qr(t,e,n){if(L.$injector=t,L.$q=e,!t.hasOwnProperty("strictDi"))try{t.invoke(["checkStrictDi",function(e){}])}catch(e){t.strictDi=!!/strict mode/.exec(e&&e.toString())}n.stateRegistry.get().map(function(e){return e.$$state().resolvables}).reduce(ge,[]).filter(function(e){return"deferred"===e.deps}).forEach(function(e){return e.deps=t.annotate(e.resolveFn,t.strictDi)})}qr.$inject=["$injector","$q","$uiRouter"];function zr(e){e.$watch(function(){mt.approximateDigests++})}zr.$inject=["$rootScope"],Lr.provider("$uiRouter",Hr),Gr.provider("$urlRouter",["$uiRouterProvider",function(e){return e.urlRouterProvider=new Nr(e)}]),Fr.provider("$urlService",Wr("urlService")),Fr.provider("$urlMatcherFactory",["$uiRouterProvider",function(){return Ur.urlMatcherFactory}]),Fr.provider("$templateFactory",function(){return new Ir}),jr.provider("$stateRegistry",Wr("stateRegistry")),jr.provider("$uiRouterGlobals",Wr("globals")),jr.provider("$transitions",Wr("transitionService")),jr.provider("$state",["$uiRouterProvider",function(){return W(Ur.stateProvider,{$get:function(){return Ur.stateService}})}]),jr.factory("$stateParams",["$uiRouter",function(e){return e.globals.params}]),Br.factory("$view",function(){return Ur.viewService}),Br.service("$trace",function(){return mt}),Br.run(zr),Fr.run(["$urlMatcherFactory",function(e){}]),jr.run(["$state",function(e){}]),Gr.run(["$urlRouter",function(e){}]),Lr.run(qr);var Vr,Yr,Kr,Qr,Xr=function(n){return n.getTokens().filter(D).map(function(e){var t=n.getResolvable(e);return[e,"NOWAIT"===n.getPolicy(t).async?t.promise:t.data]}).reduce(ke,{})};function Zr(e){var t,n=e.match(/^\s*({[^}]*})\s*$/);if(n&&(e="("+n[1]+")"),!(t=e.replace(/\n/g," ").match(/^\s*([^(]*?)\s*(\((.*)\))?\s*$/))||4!==t.length)throw new Error("Invalid state ref '"+e+"'");return{state:t[1]||null,paramExpr:t[3]||null}}function Jr(e){var t=e.parent().inheritedData("$uiView"),n=S("$cfg.path")(t);return n?Ee(n).state.name:void 0}function ei(e,t,n){var r,i=n.uiState||e.current.name,a=W((r=e,{relative:Jr(t)||r.$current,inherit:!0,source:"sref"}),n.uiStateOpts||{}),o=e.href(i,n.uiStateParams,a);return{uiState:i,uiStateParams:n.uiStateParams,uiStateOpts:a,href:o}}function ti(e){var t="[object SVGAnimatedString]"===Object.prototype.toString.call(e.prop("href")),n="FORM"===e[0].nodeName;return{attr:n?"action":t?"xlink:href":"href",isAnchor:"A"===e.prop("tagName").toUpperCase(),clickable:!n}}function ni(a,o,s,c,l){return function(e){var t=e.which||e.button,n=l();if(!(1<t||e.ctrlKey||e.metaKey||e.shiftKey||a.attr("target"))){var r=s(function(){a.attr("disabled")||o.go(n.uiState,n.uiStateParams,n.uiStateOpts)});e.preventDefault();var i=c.isAnchor&&!n.href?1:0;e.preventDefault=function(){i--<=0&&s.cancel(r)}}}}function ri(i,e,a,t){var o;t&&(o=t.events),P(o)||(o=["click"]);for(var n=i.on?"on":"bind",r=0,s=o;r<s.length;r++){var c=s[r];i[n](c,a)}e.$on("$destroy",function(){for(var e=i.off?"off":"unbind",t=0,n=o;t<n.length;t++){var r=n[t];i[e](r,a)}})}function ii(r){var e=function(e,t,n){return r.is(e,t,n)};return e.$stateful=!0,e}function ai(r){var e=function(e,t,n){return r.includes(e,t,n)};return e.$stateful=!0,e}function oi(m,g,_,e,b,t){var v=S("viewDecl.controllerAs"),y=S("viewDecl.resolveAs");return{restrict:"ECA",priority:-400,compile:function(e){var p=e.html();return e.empty(),function(t,n){var e=n.data("$uiView");if(!e)return n.html(p),void m(n.contents())(t);var r=e.$cfg||{viewDecl:{},getTemplate:V},i=r.path&&new Nt(r.path);n.html(r.getTemplate(n,i)||p),mt.traceUIViewFill(e.$uiView,n.html());var a=m(n.contents()),o=r.controller,s=v(r),c=y(r),l=i&&Xr(i);if(t[c]=l,o){var u=g(o,W({},l,{$scope:t,$element:n}));s&&(t[s]=u,t[s][c]=l),n.data("$ngControllerController",u),n.children().data("$ngControllerController",u),li(b,_,u,t,r)}if(D(r.component))var f=Be(r.component),d=new RegExp("^(x-|data-)?"+f+"$","i"),h=t.$watch(function(){var e=[].slice.call(n[0].children).filter(function(e){return e&&e.tagName&&d.exec(e.tagName)});return e&&A.element(e).data("$"+r.component+"Controller")},function(e){e&&(li(b,_,e,t,r),h())});a(t)}}}}Vr=["$uiRouter","$timeout",function(d,h){var p=d.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(e,t,n,r){var i,a=ti(t),o=r[1]||r[0],s=null,c={},l=function(){return ei(p,t,c)},u=Zr(n.uiSref);function f(){var e=l();s&&s(),o&&(s=o.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&n.$set(a.attr,e.href)}c.uiState=u.state,c.uiStateOpts=n.uiSrefOpts?e.$eval(n.uiSrefOpts):{},u.paramExpr&&(e.$watch(u.paramExpr,function(e){c.uiStateParams=W({},e),f()},!0),c.uiStateParams=W({},e.$eval(u.paramExpr))),f(),e.$on("$destroy",d.stateRegistry.onStatesChanged(f)),e.$on("$destroy",d.transitionService.onSuccess({},f)),a.clickable&&(i=ni(t,p,h,a,l),ri(t,e,i,c.uiStateOpts))}}}],Yr=["$uiRouter","$timeout",function(h,p){var m=h.stateService;return{restrict:"A",require:["?^uiSrefActive","?^uiSrefActiveEq"],link:function(n,e,r,t){var i,a=ti(e),o=t[1]||t[0],s=null,c={},l=function(){return ei(m,e,c)},u=["uiState","uiStateParams","uiStateOpts"],f=u.reduce(function(e,t){return e[t]=V,e},{});function d(){var e=l();s&&s(),o&&(s=o.$$addStateInfo(e.uiState,e.uiStateParams)),null!=e.href&&r.$set(a.attr,e.href)}u.forEach(function(t){c[t]=r[t]?n.$eval(r[t]):null,r.$observe(t,function(e){f[t](),f[t]=n.$watch(e,function(e){c[t]=e,d()},!0)})}),d(),n.$on("$destroy",h.stateRegistry.onStatesChanged(d)),n.$on("$destroy",h.transitionService.onSuccess({},d)),a.clickable&&(i=ni(e,m,p,a,l),ri(e,n,i,c.uiStateOpts))}}}],Kr=["$state","$stateParams","$interpolate","$uiRouter",function(p,e,m,g){return{restrict:"A",controller:["$scope","$element","$attrs",function(s,c,e){var l,r,t,n,i,u=[];l=m(e.uiSrefActiveEq||"",!1)(s);try{r=s.$eval(e.uiSrefActive)}catch(e){}function a(e){e.promise.then(h,V)}function o(){f(r)}function f(e){I(e)&&(u=[],H(e,function(e,t){var n=function(e,t){var n=Zr(e);d(n.state,s.$eval(n.paramExpr),t)};D(e)?n(e,t):P(e)&&H(e,function(e){n(e,t)})}))}function d(e,t,n){var r={state:p.get(e,Jr(c))||{name:e},params:t,activeClass:n};return u.push(r),function(){Z(u)(r)}}function h(){var t=function(e){return e.split(/\s/).filter(z)},e=function(e){return e.map(function(e){return e.activeClass}).map(t).reduce(ge,[])},n=e(u).concat(t(l)).reduce(ve,[]),r=e(u.filter(function(e){return p.includes(e.state.name,e.params)})),i=!!u.filter(function(e){return p.is(e.state.name,e.params)}).length?t(l):[],a=r.concat(i).reduce(ve,[]),o=n.filter(function(e){return!Q(a,e)});s.$evalAsync(function(){a.forEach(function(e){return c.addClass(e)}),o.forEach(function(e){return c.removeClass(e)})})}f(r=r||m(e.uiSrefActive||"",!1)(s)),this.$$addStateInfo=function(e,t){if(!(I(r)&&0<u.length)){var n=d(e,t,r);return h(),n}},s.$on("$destroy",(t=g.stateRegistry.onStatesChanged(o),n=g.transitionService.onStart({},a),i=s.$on("$stateChangeSuccess",h),function(){t(),n(),i()})),g.globals.transition&&a(g.globals.transition),h()}]}}],A.module("ui.router.state").directive("uiSref",Vr).directive("uiSrefActive",Kr).directive("uiSrefActiveEq",Kr).directive("uiState",Yr),ii.$inject=["$state"],ai.$inject=["$state"],A.module("ui.router.state").filter("isState",ii).filter("includedByState",ai),Qr=["$view","$animate","$uiViewScroll","$interpolate","$q",function(i,a,b,v,y){var w={$cfg:{viewDecl:{$context:i._pluginapi._rootViewContext()}},$uiView:{}},C={count:0,restrict:"ECA",terminal:!0,priority:400,transclude:"element",compile:function(e,t,_){return function(o,s,e){var c,l,u,f,t,d=e.onload||"",h=e.autoscroll,p={enter:function(e,t,n){2<A.version.minor?a.enter(e,null,t).then(n):a.enter(e,null,t,n)},leave:function(e,t){2<A.version.minor?a.leave(e).then(t):a.leave(e,t)}},n=s.inheritedData("$uiView")||w,m=v(e.uiView||e.name||"")(o)||"$default",g={$type:"ng1",id:C.count++,name:m,fqn:n.$uiView.fqn?n.$uiView.fqn+"."+m:m,config:null,configUpdated:function(e){if(e&&!(e instanceof Dr))return;if(t=f,n=e,t===n)return;var t,n;mt.traceUIViewConfigUpdated(g,e&&e.viewDecl&&e.viewDecl.$context),r(f=e)},get creationContext(){var e=S("$cfg.viewDecl.$context")(n),t=S("$uiView.creationContext")(n);return e||t}};function r(e){var t=o.$new(),n=y.defer(),r=y.defer(),i={$cfg:e,$uiView:g},a={$animEnter:n.promise,$animLeave:r.promise,$$animLeave:r};t.$emit("$viewContentLoading",m),l=_(t,function(e){e.data("$uiViewAnim",a),e.data("$uiView",i),p.enter(e,s,function(){n.resolve(),u&&u.$emit("$viewContentAnimationEnded"),(T(h)&&!h||o.$eval(h))&&b(e)}),function(){if(c&&(mt.traceUIViewEvent("Removing (previous) el",c.data("$uiView")),c.remove(),c=null),u&&(mt.traceUIViewEvent("Destroying scope",g),u.$destroy(),u=null),l){var e=l.data("$uiViewAnim");mt.traceUIViewEvent("Animate out",e),p.leave(l,function(){e.$$animLeave.resolve(),c=null}),c=l,l=null}}()}),(u=t).$emit("$viewContentLoaded",e||f),u.$eval(d)}mt.traceUIViewEvent("Linking",g),s.data("$uiView",{$uiView:g}),r(),t=i.registerUIView(g),o.$on("$destroy",function(){mt.traceUIViewEvent("Destroying/Unregistering",g),t()})}}};return C}],oi.$inject=["$compile","$controller","$transitions","$view","$q","$timeout"];var si="function"==typeof A.module("ui.router").component,ci=0;function li(r,e,l,t,n){!k(l.$onInit)||(n.viewDecl.component||n.viewDecl.componentProvider)&&si||l.$onInit();var u=Ee(n.path).state.self,i={bind:l};if(k(l.uiOnParamsChanged)){var f=new Nt(n.path).getResolvable("$transition$").data;t.$on("$destroy",e.onSuccess({},function(e){if(e!==f&&-1===e.exiting().indexOf(u)){var n=e.params("to"),r=e.params("from"),t=function(e){return e.paramSchema},i=e.treeChanges("to").map(t).reduce(ge,[]),a=e.treeChanges("from").map(t).reduce(ge,[]),o=i.filter(function(e){var t=a.indexOf(e);return-1===t||!a[t].type.equals(n[e.id],r[e.id])});if(o.length){var s=o.map(function(e){return e.id}),c=le(n,function(e,t){return-1!==s.indexOf(t)});l.uiOnParamsChanged(c,e)}}},i))}if(k(l.uiCanExit)){var a=ci++,o="_uiCanExitIds",s=function(e){return!!e&&(e[o]&&!0===e[o][a]||s(e.redirectedFrom()))},c={exiting:u.name};t.$on("$destroy",e.onBefore(c,function(e){var t,n=e[o]=e[o]||{};return s(e)||(t=r.when(l.uiCanExit(e))).then(function(e){return n[a]=!1!==e}),t},i))}}A.module("ui.router.state").directive("uiView",Qr),A.module("ui.router.state").directive("uiView",oi),A.module("ui.router.state").provider("$uiViewScroll",function(){var n=!1;this.useAnchorScroll=function(){n=!0},this.$get=["$anchorScroll","$timeout",function(e,t){return n?e:function(e){return t(function(){e[0].scrollIntoView()},0,!1)}}]});m.$injector=tr,m.$q=Xn,m.BaseLocationServices=ur,m.BaseUrlRule=mn,m.BrowserLocationConfig=br,m.Glob=Re,m.HashLocationService=dr,m.HookBuilder=rn,m.MemoryLocationConfig=_r,m.MemoryLocationService=pr,m.NATIVE_INJECTOR_TOKEN=Rt,m.Ng1ViewConfig=Dr,m.Param=At,m.ParamFactory=dn,m.ParamType=gt,m.ParamTypes=St,m.PathNode=xt,m.PathUtils=Et,m.PushStateLocationService=gr,m.Queue=Ne,m.RegisteredHook=tn,m.Rejection=Fe,m.Resolvable=Pt,m.ResolveContext=Nt,m.StateBuilder=Vt,m.StateMatcher=Kt,m.StateObject=Yt,m.StateParams=Tt,m.StateProvider=$r,m.StateQueueManager=Qt,m.StateRegistry=Xt,m.StateService=Qn,m.TargetState=kt,m.Trace=pt,m.Transition=on,m.TransitionEventType=qn,m.TransitionHook=Jt,m.TransitionService=Kn,m.UIRouter=kn,m.UIRouterGlobals=vn,m.UIRouterPluginBase=Ar,m.UrlConfig=Cn,m.UrlMatcher=un,m.UrlMatcherFactory=hn,m.UrlRouter=_n,m.UrlRouterProvider=Nr,m.UrlRuleFactory=pn,m.UrlRules=wn,m.UrlService=An,m.ViewService=bn,m._extend=Ie,m._inArray=X,m._pushTo=te,m._removeFrom=J,m.all=u,m.allTrueR=pe,m.ancestors=ae,m.and=i,m.any=d,m.anyTrueR=me,m.applyPairs=ke,m.arrayTuples=xe,m.assertFn=Se,m.assertMap=Ae,m.assertPredicate=Ce,m.beforeAfterSubstr=Ve,m.buildUrl=ar,m.compose=n,m.copy=De,m.core=Sr,m.createProxyFunctions=Y,m.curry=l,m.default="ui.router",m.defaultResolvePolicy=It,m.defaultTransOpts=Yn,m.defaults=re,m.deregAll=ne,m.eq=o,m.equals=q,m.extend=W,m.filter=le,m.find=ue,m.flatten=we,m.flattenR=_e,m.fnToString=He,m.forEach=H,m.fromJson=B,m.functionToString=Ue,m.getLocals=Xr,m.getNg1ViewConfigFactory=Tr,m.getParams=rr,m.hashLocationPlugin=yr,m.hostRegex=Ye,m.identity=z,m.inArray=Q,m.inherit=K,m.invoke=s,m.is=h,m.isArray=P,m.isDate=M,m.isDefined=T,m.isFunction=k,m.isInjectable=O,m.isNull=C,m.isNullOrUndefined=x,m.isNumber=E,m.isObject=I,m.isPromise=R,m.isRegExp=$,m.isString=D,m.isUndefined=w,m.joinNeighborsR=tt,m.kebobString=Be,m.keyValsToObjectR=nr,m.locationPluginFactory=or,m.makeEvent=nn,m.makeStub=N,m.map=de,m.mapObj=fe,m.matchState=en,m.maxLength=Ge,m.memoryLocationPlugin=Cr,m.mergeR=ie,m.ng1ViewsBuilder=kr,m.noop=V,m.not=f,m.omit=se,m.or=a,m.padString=je,m.pairs=Te,m.parse=S,m.parseUrl=ir,m.pattern=g,m.pick=oe,m.pipe=c,m.pluck=ce,m.prop=v,m.propEq=_,m.pushR=be,m.pushStateLocationPlugin=wr,m.pushTo=ee,m.removeFrom=Z,m.resolvablesBuilder=Wt,m.resolvePolicies=Dt,m.root=G,m.services=L,m.servicesPlugin=vr,m.silenceUncaughtInPromise=$e,m.silentRejection=Oe,m.splitEqual=Ze,m.splitHash=Qe,m.splitOnDelim=et,m.splitQuery=Xe,m.stringify=ze,m.stripLastPathElement=Ke,m.tail=Ee,m.toJson=U,m.trace=mt,m.trimHashVal=Je,m.uniqR=ve,m.unnest=ye,m.unnestR=ge,m.val=p,m.values=he,m.watchDigests=zr,Object.defineProperty(m,"__esModule",{value:!0})}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("angular")):"function"==typeof define&&define.amd?define(["exports","angular"],t):t((e=e||self)["@uirouter/angularjs-state-events"]={},e.angular)}(this,function(e,t){"use strict";var n=angular,r=t&&t.module?t:n;!function(){var l=r.isFunction,i=r.isString;function o(e,t){var n,r;if(Array.isArray(t)&&(n=t[0],r=t[1]),!i(n))throw new Error("invalid parameters to applyPairs");return e[n]=r,e}function s(t){if(t.options().notify&&t.valid()&&!t.ignored()){var e=t.injector(),n=e.get("$stateEvents"),r=e.get("$rootScope"),i=e.get("$state"),a=e.get("$urlRouter"),o=n.provider.enabled(),s=t.params("to"),c=t.params("from");if(o.$stateChangeSuccess){if(r.$broadcast("$stateChangeStart",t.to(),s,t.from(),c,t.options(),t).defaultPrevented)return o.$stateChangeCancel&&r.$broadcast("$stateChangeCancel",t.to(),s,t.from(),c,t.options(),t),null==i.transition&&a.update(),!1;t.onSuccess({},function(){r.$broadcast("$stateChangeSuccess",t.to(),s,t.from(),c,t.options(),t)},{priority:9999})}o.$stateChangeError&&t.promise.catch(function(e){(!e||2!==e.type&&3!==e.type)&&(r.$broadcast("$stateChangeError",t.to(),s,t.from(),c,e,t.options(),t).defaultPrevented||a.update())})}}function c(e,t,n){var r=n.get("$state"),i=n.get("$rootScope"),a=n.get("$urlRouter"),o={to:e.identifier(),toParams:e.params(),options:e.options()},s=i.$broadcast("$stateNotFound",o,t.state(),t.params());function c(){return r.target(o.to,o.toParams,o.options)}return(s.defaultPrevented||s.retry)&&a.update(),!s.defaultPrevented&&(s.retry||r.get(o.to)?s.retry&&l(s.retry.then)?s.retry.then(c):c():void 0)}function u(t){u.prototype.instance=this;var n=!1,r=["$stateChangeStart","$stateNotFound","$stateChangeSuccess","$stateChangeError"],i=r.map(function(e){return[e,!0]}).reduce(o,{});function a(){if(n)throw new Error("Cannot enable events at runtime (use $stateEventsProvider")}function e(e){return n=!0,i.$stateNotFound&&t.onInvalid(c),i.$stateChangeStart&&e.onBefore({},s,{priority:1e3}),{provider:u.prototype.instance}}this.enable=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a(),e&&e.length||(e=r),e.forEach(function(e){return i[e]=!0})},this.disable=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];a(),e&&e.length||(e=r),e.forEach(function(e){return delete i[e]})},this.enabled=function(){return i},(this.$get=e).$inject=["$transitions"]}c.$inject=["$to$","$from$","$state","$rootScope","$urlRouter"],u.$inject=["$stateProvider"],r.module("ui.router.state.events",["ui.router.state"]).provider("$stateEvents",u).run(["$stateEvents",function(e){}])}(),e.$stateChangeCancel=void 0,e.$stateChangeError=void 0,e.$stateChangeStart=void 0,e.$stateChangeSuccess=void 0,e.$stateNotFound=void 0,Object.defineProperty(e,"__esModule",{value:!0})}),function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e(jQuery)}(function(x){x.ui=x.ui||{};x.ui.version="1.12.1";var i,n=0,s=Array.prototype.slice;x.cleanData=(i=x.cleanData,function(e){var t,n,r;for(r=0;null!=(n=e[r]);r++)try{(t=x._data(n,"events"))&&t.remove&&x(n).triggerHandler("remove")}catch(e){}i(e)}),x.widget=function(e,n,t){var r,i,a,o={},s=e.split(".")[0],c=s+"-"+(e=e.split(".")[1]);return t||(t=n,n=x.Widget),x.isArray(t)&&(t=x.extend.apply(null,[{}].concat(t))),x.expr[":"][c.toLowerCase()]=function(e){return!!x.data(e,c)},x[s]=x[s]||{},r=x[s][e],i=x[s][e]=function(e,t){if(!this._createWidget)return new i(e,t);arguments.length&&this._createWidget(e,t)},x.extend(i,r,{version:t.version,_proto:x.extend({},t),_childConstructors:[]}),(a=new n).options=x.widget.extend({},a.options),x.each(t,function(t,a){x.isFunction(a)?o[t]=function(){function r(){return n.prototype[t].apply(this,arguments)}function i(e){return n.prototype[t].apply(this,e)}return function(){var e,t=this._super,n=this._superApply;return this._super=r,this._superApply=i,e=a.apply(this,arguments),this._super=t,this._superApply=n,e}}():o[t]=a}),i.prototype=x.widget.extend(a,{widgetEventPrefix:r&&a.widgetEventPrefix||e},o,{constructor:i,namespace:s,widgetName:e,widgetFullName:c}),r?(x.each(r._childConstructors,function(e,t){var n=t.prototype;x.widget(n.namespace+"."+n.widgetName,i,t._proto)}),delete r._childConstructors):n._childConstructors.push(i),x.widget.bridge(e,i),i},x.widget.extend=function(e){for(var t,n,r=s.call(arguments,1),i=0,a=r.length;i<a;i++)for(t in r[i])n=r[i][t],r[i].hasOwnProperty(t)&&void 0!==n&&(x.isPlainObject(n)?e[t]=x.isPlainObject(e[t])?x.widget.extend({},e[t],n):x.widget.extend({},n):e[t]=n);return e},x.widget.bridge=function(a,t){var o=t.prototype.widgetFullName||a;x.fn[a]=function(n){var e="string"==typeof n,r=s.call(arguments,1),i=this;return e?this.length||"instance"!==n?this.each(function(){var e,t=x.data(this,o);return"instance"===n?(i=t,!1):t?x.isFunction(t[n])&&"_"!==n.charAt(0)?(e=t[n].apply(t,r))!==t&&void 0!==e?(i=e&&e.jquery?i.pushStack(e.get()):e,!1):void 0:x.error("no such method '"+n+"' for "+a+" widget instance"):x.error("cannot call methods on "+a+" prior to initialization; attempted to call method '"+n+"'")}):i=void 0:(r.length&&(n=x.widget.extend.apply(null,[n].concat(r))),this.each(function(){var e=x.data(this,o);e?(e.option(n||{}),e._init&&e._init()):x.data(this,o,new t(n,this))})),i}},x.Widget=function(){},x.Widget._childConstructors=[],x.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,t){t=x(t||this.defaultElement||this)[0],this.element=x(t),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=x(),this.hoverable=x(),this.focusable=x(),this.classesElementLookup={},t!==this&&(x.data(t,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===t&&this.destroy()}}),this.document=x(t.style?t.ownerDocument:t.document||t),this.window=x(this.document[0].defaultView||this.document[0].parentWindow)),this.options=x.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:x.noop,_create:x.noop,_init:x.noop,destroy:function(){var n=this;this._destroy(),x.each(this.classesElementLookup,function(e,t){n._removeClass(t,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:x.noop,widget:function(){return this.element},option:function(e,t){var n,r,i,a=e;if(0===arguments.length)return x.widget.extend({},this.options);if("string"==typeof e)if(a={},e=(n=e.split(".")).shift(),n.length){for(r=a[e]=x.widget.extend({},this.options[e]),i=0;i<n.length-1;i++)r[n[i]]=r[n[i]]||{},r=r[n[i]];if(e=n.pop(),1===arguments.length)return void 0===r[e]?null:r[e];r[e]=t}else{if(1===arguments.length)return void 0===this.options[e]?null:this.options[e];a[e]=t}return this._setOptions(a),this},_setOptions:function(e){var t;for(t in e)this._setOption(t,e[t]);return this},_setOption:function(e,t){return"classes"===e&&this._setOptionClasses(t),this.options[e]=t,"disabled"===e&&this._setOptionDisabled(t),this},_setOptionClasses:function(e){var t,n,r;for(t in e)r=this.classesElementLookup[t],e[t]!==this.options.classes[t]&&r&&r.length&&(n=x(r.get()),this._removeClass(r,t),n.addClass(this._classes({element:n,keys:t,classes:e,add:!0})))},_setOptionDisabled:function(e){this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!!e),e&&(this._removeClass(this.hoverable,null,"ui-state-hover"),this._removeClass(this.focusable,null,"ui-state-focus"))},enable:function(){return this._setOptions({disabled:!1})},disable:function(){return this._setOptions({disabled:!0})},_classes:function(i){var a=[],o=this;function e(e,t){var n,r;for(r=0;r<e.length;r++)n=o.classesElementLookup[e[r]]||x(),n=i.add?x(x.unique(n.get().concat(i.element.get()))):x(n.not(i.element).get()),o.classesElementLookup[e[r]]=n,a.push(e[r]),t&&i.classes[e[r]]&&a.push(i.classes[e[r]])}return i=x.extend({element:this.element,classes:this.options.classes||{}},i),this._on(i.element,{remove:"_untrackClassesElement"}),i.keys&&e(i.keys.match(/\S+/g)||[],!0),i.extra&&e(i.extra.match(/\S+/g)||[]),a.join(" ")},_untrackClassesElement:function(n){var r=this;x.each(r.classesElementLookup,function(e,t){-1!==x.inArray(n.target,t)&&(r.classesElementLookup[e]=x(t.not(n.target).get()))})},_removeClass:function(e,t,n){return this._toggleClass(e,t,n,!1)},_addClass:function(e,t,n){return this._toggleClass(e,t,n,!0)},_toggleClass:function(e,t,n,r){r="boolean"==typeof r?r:n;var i="string"==typeof e||null===e,a={extra:i?t:n,keys:i?e:t,element:i?this.element:e,add:r};return a.element.toggleClass(this._classes(a),r),this},_on:function(o,s,e){var c,l=this;"boolean"!=typeof o&&(e=s,s=o,o=!1),e?(s=c=x(s),this.bindings=this.bindings.add(s)):(e=s,s=this.element,c=this.widget()),x.each(e,function(e,t){function n(){if(o||!0!==l.options.disabled&&!x(this).hasClass("ui-state-disabled"))return("string"==typeof t?l[t]:t).apply(l,arguments)}"string"!=typeof t&&(n.guid=t.guid=t.guid||n.guid||x.guid++);var r=e.match(/^([\w:-]*)\s*(.*)$/),i=r[1]+l.eventNamespace,a=r[2];a?c.on(i,a,n):s.on(i,n)})},_off:function(e,t){t=(t||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace,e.off(t).off(t),this.bindings=x(this.bindings.not(e).get()),this.focusable=x(this.focusable.not(e).get()),this.hoverable=x(this.hoverable.not(e).get())},_delay:function(e,t){var n=this;return setTimeout(function(){return("string"==typeof e?n[e]:e).apply(n,arguments)},t||0)},_hoverable:function(e){this.hoverable=this.hoverable.add(e),this._on(e,{mouseenter:function(e){this._addClass(x(e.currentTarget),null,"ui-state-hover")},mouseleave:function(e){this._removeClass(x(e.currentTarget),null,"ui-state-hover")}})},_focusable:function(e){this.focusable=this.focusable.add(e),this._on(e,{focusin:function(e){this._addClass(x(e.currentTarget),null,"ui-state-focus")},focusout:function(e){this._removeClass(x(e.currentTarget),null,"ui-state-focus")}})},_trigger:function(e,t,n){var r,i,a=this.options[e];if(n=n||{},(t=x.Event(t)).type=(e===this.widgetEventPrefix?e:this.widgetEventPrefix+e).toLowerCase(),t.target=this.element[0],i=t.originalEvent)for(r in i)r in t||(t[r]=i[r]);return this.element.trigger(t,n),!(x.isFunction(a)&&!1===a.apply(this.element[0],[t].concat(n))||t.isDefaultPrevented())}},x.each({show:"fadeIn",hide:"fadeOut"},function(a,o){x.Widget.prototype["_"+a]=function(t,e,n){var r;"string"==typeof e&&(e={effect:e});var i=e?!0===e||"number"==typeof e?o:e.effect||o:a;"number"==typeof(e=e||{})&&(e={duration:e}),r=!x.isEmptyObject(e),e.complete=n,e.delay&&t.delay(e.delay),r&&x.effects&&x.effects.effect[i]?t[a](e):i!==a&&t[i]?t[i](e.duration,e.easing,n):t.queue(function(e){x(this)[a](),n&&n.call(t[0]),e()})}});x.widget;!function(){var i,C=Math.max,A=Math.abs,r=/left|center|right/,a=/top|center|bottom/,o=/[\+\-]\d+(\.[\d]+)?%?/,s=/^\w+/,c=/%$/,l=x.fn.position;function S(e,t,n){return[parseFloat(e[0])*(c.test(e[0])?t/100:1),parseFloat(e[1])*(c.test(e[1])?n/100:1)]}function T(e,t){return parseInt(x.css(e,t),10)||0}x.position={scrollbarWidth:function(){if(void 0!==i)return i;var e,t,n=x("<div style='display:block;position:absolute;width:50px;height:50px;overflow:hidden;'><div style='height:100px;width:auto;'></div></div>"),r=n.children()[0];return x("body").append(n),e=r.offsetWidth,n.css("overflow","scroll"),e===(t=r.offsetWidth)&&(t=n[0].clientWidth),n.remove(),i=e-t},getScrollInfo:function(e){var t=e.isWindow||e.isDocument?"":e.element.css("overflow-x"),n=e.isWindow||e.isDocument?"":e.element.css("overflow-y"),r="scroll"===t||"auto"===t&&e.width<e.element[0].scrollWidth;return{width:"scroll"===n||"auto"===n&&e.height<e.element[0].scrollHeight?x.position.scrollbarWidth():0,height:r?x.position.scrollbarWidth():0}},getWithinInfo:function(e){var t=x(e||window),n=x.isWindow(t[0]),r=!!t[0]&&9===t[0].nodeType;return{element:t,isWindow:n,isDocument:r,offset:!n&&!r?x(e).offset():{left:0,top:0},scrollLeft:t.scrollLeft(),scrollTop:t.scrollTop(),width:t.outerWidth(),height:t.outerHeight()}}},x.fn.position=function(f){if(!f||!f.of)return l.apply(this,arguments);f=x.extend({},f);var d,h,p,m,g,e,t,n,_=x(f.of),b=x.position.getWithinInfo(f.within),v=x.position.getScrollInfo(b),y=(f.collision||"flip").split(" "),w={};return e=9===(n=(t=_)[0]).nodeType?{width:t.width(),height:t.height(),offset:{top:0,left:0}}:x.isWindow(n)?{width:t.width(),height:t.height(),offset:{top:t.scrollTop(),left:t.scrollLeft()}}:n.preventDefault?{width:0,height:0,offset:{top:n.pageY,left:n.pageX}}:{width:t.outerWidth(),height:t.outerHeight(),offset:t.offset()},_[0].preventDefault&&(f.at="left top"),h=e.width,p=e.height,m=e.offset,g=x.extend({},m),x.each(["my","at"],function(){var e,t,n=(f[this]||"").split(" ");1===n.length&&(n=r.test(n[0])?n.concat(["center"]):a.test(n[0])?["center"].concat(n):["center","center"]),n[0]=r.test(n[0])?n[0]:"center",n[1]=a.test(n[1])?n[1]:"center",e=o.exec(n[0]),t=o.exec(n[1]),w[this]=[e?e[0]:0,t?t[0]:0],f[this]=[s.exec(n[0])[0],s.exec(n[1])[0]]}),1===y.length&&(y[1]=y[0]),"right"===f.at[0]?g.left+=h:"center"===f.at[0]&&(g.left+=h/2),"bottom"===f.at[1]?g.top+=p:"center"===f.at[1]&&(g.top+=p/2),d=S(w.at,h,p),g.left+=d[0],g.top+=d[1],this.each(function(){var n,e,o=x(this),s=o.outerWidth(),c=o.outerHeight(),t=T(this,"marginLeft"),r=T(this,"marginTop"),i=s+t+T(this,"marginRight")+v.width,a=c+r+T(this,"marginBottom")+v.height,l=x.extend({},g),u=S(w.my,o.outerWidth(),o.outerHeight());"right"===f.my[0]?l.left-=s:"center"===f.my[0]&&(l.left-=s/2),"bottom"===f.my[1]?l.top-=c:"center"===f.my[1]&&(l.top-=c/2),l.left+=u[0],l.top+=u[1],n={marginLeft:t,marginTop:r},x.each(["left","top"],function(e,t){x.ui.position[y[e]]&&x.ui.position[y[e]][t](l,{targetWidth:h,targetHeight:p,elemWidth:s,elemHeight:c,collisionPosition:n,collisionWidth:i,collisionHeight:a,offset:[d[0]+u[0],d[1]+u[1]],my:f.my,at:f.at,within:b,elem:o})}),f.using&&(e=function(e){var t=m.left-l.left,n=t+h-s,r=m.top-l.top,i=r+p-c,a={target:{element:_,left:m.left,top:m.top,width:h,height:p},element:{element:o,left:l.left,top:l.top,width:s,height:c},horizontal:n<0?"left":0<t?"right":"center",vertical:i<0?"top":0<r?"bottom":"middle"};h<s&&A(t+n)<h&&(a.horizontal="center"),p<c&&A(r+i)<p&&(a.vertical="middle"),C(A(t),A(n))>C(A(r),A(i))?a.important="horizontal":a.important="vertical",f.using.call(this,e,a)}),o.offset(x.extend(l,{using:e}))})},x.ui.position={fit:{left:function(e,t){var n,r=t.within,i=r.isWindow?r.scrollLeft:r.offset.left,a=r.width,o=e.left-t.collisionPosition.marginLeft,s=i-o,c=o+t.collisionWidth-a-i;t.collisionWidth>a?0<s&&c<=0?(n=e.left+s+t.collisionWidth-a-i,e.left+=s-n):e.left=0<c&&s<=0?i:c<s?i+a-t.collisionWidth:i:0<s?e.left+=s:0<c?e.left-=c:e.left=C(e.left-o,e.left)},top:function(e,t){var n,r=t.within,i=r.isWindow?r.scrollTop:r.offset.top,a=t.within.height,o=e.top-t.collisionPosition.marginTop,s=i-o,c=o+t.collisionHeight-a-i;t.collisionHeight>a?0<s&&c<=0?(n=e.top+s+t.collisionHeight-a-i,e.top+=s-n):e.top=0<c&&s<=0?i:c<s?i+a-t.collisionHeight:i:0<s?e.top+=s:0<c?e.top-=c:e.top=C(e.top-o,e.top)}},flip:{left:function(e,t){var n,r,i=t.within,a=i.offset.left+i.scrollLeft,o=i.width,s=i.isWindow?i.scrollLeft:i.offset.left,c=e.left-t.collisionPosition.marginLeft,l=c-s,u=c+t.collisionWidth-o-s,f="left"===t.my[0]?-t.elemWidth:"right"===t.my[0]?t.elemWidth:0,d="left"===t.at[0]?t.targetWidth:"right"===t.at[0]?-t.targetWidth:0,h=-2*t.offset[0];l<0?((n=e.left+f+d+h+t.collisionWidth-o-a)<0||n<A(l))&&(e.left+=f+d+h):0<u&&(0<(r=e.left-t.collisionPosition.marginLeft+f+d+h-s)||A(r)<u)&&(e.left+=f+d+h)},top:function(e,t){var n,r,i=t.within,a=i.offset.top+i.scrollTop,o=i.height,s=i.isWindow?i.scrollTop:i.offset.top,c=e.top-t.collisionPosition.marginTop,l=c-s,u=c+t.collisionHeight-o-s,f="top"===t.my[1]?-t.elemHeight:"bottom"===t.my[1]?t.elemHeight:0,d="top"===t.at[1]?t.targetHeight:"bottom"===t.at[1]?-t.targetHeight:0,h=-2*t.offset[1];l<0?((r=e.top+f+d+h+t.collisionHeight-o-a)<0||r<A(l))&&(e.top+=f+d+h):0<u&&(0<(n=e.top-t.collisionPosition.marginTop+f+d+h-s)||A(n)<u)&&(e.top+=f+d+h)}},flipfit:{left:function(){x.ui.position.flip.left.apply(this,arguments),x.ui.position.fit.left.apply(this,arguments)},top:function(){x.ui.position.flip.top.apply(this,arguments),x.ui.position.fit.top.apply(this,arguments)}}}}();x.ui.position,x.extend(x.expr[":"],{data:x.expr.createPseudo?x.expr.createPseudo(function(t){return function(e){return!!x.data(e,t)}}):function(e,t,n){return!!x.data(e,n[3])}}),x.fn.extend({disableSelection:(e="onselectstart"in document.createElement("div")?"selectstart":"mousedown",function(){return this.on(e+".ui-disableSelection",function(e){e.preventDefault()})}),enableSelection:function(){return this.off(".ui-disableSelection")}});var e,r,c="ui-effects-",l="ui-effects-style",f="ui-effects-animated",u=x;x.effects={effect:{}},function(u,f){var l,d=/^([\-+])=\s*(\d+\.?\d*)/,e=[{re:/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[e[1],e[2],e[3],e[4]]}},{re:/rgba?\(\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,parse:function(e){return[2.55*e[1],2.55*e[2],2.55*e[3],e[4]]}},{re:/#([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})/,parse:function(e){return[parseInt(e[1],16),parseInt(e[2],16),parseInt(e[3],16)]}},{re:/#([a-f0-9])([a-f0-9])([a-f0-9])/,parse:function(e){return[parseInt(e[1]+e[1],16),parseInt(e[2]+e[2],16),parseInt(e[3]+e[3],16)]}},{re:/hsla?\(\s*(\d+(?:\.\d+)?)\s*,\s*(\d+(?:\.\d+)?)\%\s*,\s*(\d+(?:\.\d+)?)\%\s*(?:,\s*(\d?(?:\.\d+)?)\s*)?\)/,space:"hsla",parse:function(e){return[e[1],e[2]/100,e[3]/100,e[4]]}}],h=u.Color=function(e,t,n,r){return new u.Color.fn.parse(e,t,n,r)},p={rgba:{props:{red:{idx:0,type:"byte"},green:{idx:1,type:"byte"},blue:{idx:2,type:"byte"}}},hsla:{props:{hue:{idx:0,type:"degrees"},saturation:{idx:1,type:"percent"},lightness:{idx:2,type:"percent"}}}},m={byte:{floor:!0,max:255},percent:{max:1},degrees:{mod:360,floor:!0}},o=h.support={},t=u("<p>")[0],g=u.each;function _(e,t,n){var r=m[t.type]||{};return null==e?n||!t.def?null:t.def:(e=r.floor?~~e:parseFloat(e),isNaN(e)?t.def:r.mod?(e+r.mod)%r.mod:e<0?0:r.max<e?r.max:e)}function s(o){var s=h(),c=s._rgba=[];return o=o.toLowerCase(),g(e,function(e,t){var n,r=t.re.exec(o),i=r&&t.parse(r),a=t.space||"rgba";if(i)return n=s[a](i),s[p[a].cache]=n[p[a].cache],c=s._rgba=n._rgba,!1}),c.length?("0,0,0,0"===c.join()&&u.extend(c,l.transparent),s):l[o]}function c(e,t,n){return 6*(n=(n+1)%1)<1?e+(t-e)*n*6:2*n<1?t:3*n<2?e+(t-e)*(2/3-n)*6:e}t.style.cssText="background-color:rgba(1,1,1,.5)",o.rgba=-1<t.style.backgroundColor.indexOf("rgba"),g(p,function(e,t){t.cache="_"+e,t.props.alpha={idx:3,type:"percent",def:1}}),h.fn=u.extend(h.prototype,{parse:function(i,e,t,n){if(i===f)return this._rgba=[null,null,null,null],this;(i.jquery||i.nodeType)&&(i=u(i).css(e),e=f);var a=this,r=u.type(i),o=this._rgba=[];return e!==f&&(i=[i,e,t,n],r="array"),"string"===r?this.parse(s(i)||l._default):"array"===r?(g(p.rgba.props,function(e,t){o[t.idx]=_(i[t.idx],t)}),this):"object"===r?(g(p,i instanceof h?function(e,t){i[t.cache]&&(a[t.cache]=i[t.cache].slice())}:function(e,n){var r=n.cache;g(n.props,function(e,t){if(!a[r]&&n.to){if("alpha"===e||null==i[e])return;a[r]=n.to(a._rgba)}a[r][t.idx]=_(i[e],t,!0)}),a[r]&&u.inArray(null,a[r].slice(0,3))<0&&(a[r][3]=1,n.from&&(a._rgba=n.from(a[r])))}),this):void 0},is:function(e){var i=h(e),a=!0,o=this;return g(p,function(e,t){var n,r=i[t.cache];return r&&(n=o[t.cache]||t.to&&t.to(o._rgba)||[],g(t.props,function(e,t){if(null!=r[t.idx])return a=r[t.idx]===n[t.idx]})),a}),a},_space:function(){var n=[],r=this;return g(p,function(e,t){r[t.cache]&&n.push(e)}),n.pop()},transition:function(e,o){var s=h(e),t=s._space(),n=p[t],r=0===this.alpha()?h("transparent"):this,c=r[n.cache]||n.to(r._rgba),l=c.slice();return s=s[n.cache],g(n.props,function(e,t){var n=t.idx,r=c[n],i=s[n],a=m[t.type]||{};null!==i&&(null===r?l[n]=i:(a.mod&&(i-r>a.mod/2?r+=a.mod:r-i>a.mod/2&&(r-=a.mod)),l[n]=_((i-r)*o+r,t)))}),this[t](l)},blend:function(e){if(1===this._rgba[3])return this;var t=this._rgba.slice(),n=t.pop(),r=h(e)._rgba;return h(u.map(t,function(e,t){return(1-n)*r[t]+n*e}))},toRgbaString:function(){var e="rgba(",t=u.map(this._rgba,function(e,t){return null==e?2<t?1:0:e});return 1===t[3]&&(t.pop(),e="rgb("),e+t.join()+")"},toHslaString:function(){var e="hsla(",t=u.map(this.hsla(),function(e,t){return null==e&&(e=2<t?1:0),t&&t<3&&(e=Math.round(100*e)+"%"),e});return 1===t[3]&&(t.pop(),e="hsl("),e+t.join()+")"},toHexString:function(e){var t=this._rgba.slice(),n=t.pop();return e&&t.push(~~(255*n)),"#"+u.map(t,function(e){return 1===(e=(e||0).toString(16)).length?"0"+e:e}).join("")},toString:function(){return 0===this._rgba[3]?"transparent":this.toRgbaString()}}),h.fn.parse.prototype=h.fn,p.hsla.to=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t,n,r=e[0]/255,i=e[1]/255,a=e[2]/255,o=e[3],s=Math.max(r,i,a),c=Math.min(r,i,a),l=s-c,u=s+c,f=.5*u;return t=c===s?0:r===s?60*(i-a)/l+360:i===s?60*(a-r)/l+120:60*(r-i)/l+240,n=0===l?0:f<=.5?l/u:l/(2-u),[Math.round(t)%360,n,f,null==o?1:o]},p.hsla.from=function(e){if(null==e[0]||null==e[1]||null==e[2])return[null,null,null,e[3]];var t=e[0]/360,n=e[1],r=e[2],i=e[3],a=r<=.5?r*(1+n):r+n-r*n,o=2*r-a;return[Math.round(255*c(o,a,t+1/3)),Math.round(255*c(o,a,t)),Math.round(255*c(o,a,t-1/3)),i]},g(p,function(c,e){var n=e.props,o=e.cache,s=e.to,l=e.from;h.fn[c]=function(e){if(s&&!this[o]&&(this[o]=s(this._rgba)),e===f)return this[o].slice();var t,r=u.type(e),i="array"===r||"object"===r?e:arguments,a=this[o].slice();return g(n,function(e,t){var n=i["object"===r?e:t.idx];null==n&&(n=a[t.idx]),a[t.idx]=_(n,t)}),l?((t=h(l(a)))[o]=a,t):h(a)},g(n,function(o,s){h.fn[o]||(h.fn[o]=function(e){var t,n=u.type(e),r="alpha"===o?this._hsla?"hsla":"rgba":c,i=this[r](),a=i[s.idx];return"undefined"===n?a:("function"===n&&(e=e.call(this,a),n=u.type(e)),null==e&&s.empty?this:("string"===n&&(t=d.exec(e))&&(e=a+parseFloat(t[2])*("+"===t[1]?1:-1)),i[s.idx]=e,this[r](i)))})})}),h.hook=function(e){var t=e.split(" ");g(t,function(e,a){u.cssHooks[a]={set:function(e,t){var n,r,i="";if("transparent"!==t&&("string"!==u.type(t)||(n=s(t)))){if(t=h(n||t),!o.rgba&&1!==t._rgba[3]){for(r="backgroundColor"===a?e.parentNode:e;(""===i||"transparent"===i)&&r&&r.style;)try{i=u.css(r,"backgroundColor"),r=r.parentNode}catch(e){}t=t.blend(i&&"transparent"!==i?i:"_default")}t=t.toRgbaString()}try{e.style[a]=t}catch(e){}}},u.fx.step[a]=function(e){e.colorInit||(e.start=h(e.elem,a),e.end=h(e.end),e.colorInit=!0),u.cssHooks[a].set(e.elem,e.start.transition(e.end,e.pos))}})},h.hook("backgroundColor borderBottomColor borderLeftColor borderRightColor borderTopColor color columnRuleColor outlineColor textDecorationColor textEmphasisColor"),u.cssHooks.borderColor={expand:function(n){var r={};return g(["Top","Right","Bottom","Left"],function(e,t){r["border"+t+"Color"]=n}),r}},l=u.Color.names={aqua:"#00ffff",black:"#000000",blue:"#0000ff",fuchsia:"#ff00ff",gray:"#808080",green:"#008000",lime:"#00ff00",maroon:"#800000",navy:"#000080",olive:"#808000",purple:"#800080",red:"#ff0000",silver:"#c0c0c0",teal:"#008080",white:"#ffffff",yellow:"#ffff00",transparent:[null,null,null,0],_default:"#ffffff"}}(u),function(){var a,i,o,s=["add","remove","toggle"],c={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};function l(e){var t,n,r=e.ownerDocument.defaultView?e.ownerDocument.defaultView.getComputedStyle(e,null):e.currentStyle,i={};if(r&&r.length&&r[0]&&r[r[0]])for(n=r.length;n--;)"string"==typeof r[t=r[n]]&&(i[x.camelCase(t)]=r[t]);else for(t in r)"string"==typeof r[t]&&(i[t]=r[t]);return i}x.each(["borderLeftStyle","borderRightStyle","borderBottomStyle","borderTopStyle"],function(e,t){x.fx.step[t]=function(e){("none"!==e.end&&!e.setAttr||1===e.pos&&!e.setAttr)&&(u.style(e.elem,t,e.end),e.setAttr=!0)}}),x.fn.addBack||(x.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}),x.effects.animateClass=function(i,e,t,n){var a=x.speed(e,t,n);return this.queue(function(){var e,n=x(this),t=n.attr("class")||"",r=a.children?n.find("*").addBack():n;r=r.map(function(){return{el:x(this),start:l(this)}}),(e=function(){x.each(s,function(e,t){i[t]&&n[t+"Class"](i[t])})})(),r=r.map(function(){return this.end=l(this.el[0]),this.diff=function(e,t){var n,r,i={};for(n in t)r=t[n],e[n]!==r&&(c[n]||!x.fx.step[n]&&isNaN(parseFloat(r))||(i[n]=r));return i}(this.start,this.end),this}),n.attr("class",t),r=r.map(function(){var e=this,t=x.Deferred(),n=x.extend({},a,{queue:!1,complete:function(){t.resolve(e)}});return this.el.animate(this.diff,n),t.promise()}),x.when.apply(x,r.get()).done(function(){e(),x.each(arguments,function(){var t=this.el;x.each(this.diff,function(e){t.css(e,"")})}),a.complete.call(n[0])})})},x.fn.extend({addClass:(o=x.fn.addClass,function(e,t,n,r){return t?x.effects.animateClass.call(this,{add:e},t,n,r):o.apply(this,arguments)}),removeClass:(i=x.fn.removeClass,function(e,t,n,r){return 1<arguments.length?x.effects.animateClass.call(this,{remove:e},t,n,r):i.apply(this,arguments)}),toggleClass:(a=x.fn.toggleClass,function(e,t,n,r,i){return"boolean"==typeof t||void 0===t?n?x.effects.animateClass.call(this,t?{add:e}:{remove:e},n,r,i):a.apply(this,arguments):x.effects.animateClass.call(this,{toggle:e},t,n,r)}),switchClass:function(e,t,n,r,i){return x.effects.animateClass.call(this,{add:t,remove:e},n,r,i)}})}(),function(){var t,n,r,i;function u(e,t,n,r){return x.isPlainObject(e)&&(e=(t=e).effect),e={effect:e},null==t&&(t={}),x.isFunction(t)&&(r=t,n=null,t={}),("number"==typeof t||x.fx.speeds[t])&&(r=n,n=t,t={}),x.isFunction(n)&&(r=n,n=null),t&&x.extend(e,t),n=n||t.duration,e.duration=x.fx.off?0:"number"==typeof n?n:n in x.fx.speeds?x.fx.speeds[n]:x.fx.speeds._default,e.complete=r||t.complete,e}function a(e){return!(e&&"number"!=typeof e&&!x.fx.speeds[e])||("string"==typeof e&&!x.effects.effect[e]||(!!x.isFunction(e)||"object"==typeof e&&!e.effect))}function o(e,t){var n=t.outerWidth(),r=t.outerHeight(),i=/^rect\((-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto),?\s*(-?\d*\.?\d*px|-?\d+%|auto)\)$/.exec(e)||["",0,n,r,0];return{top:parseFloat(i[1])||0,right:"auto"===i[2]?n:parseFloat(i[2]),bottom:"auto"===i[3]?r:parseFloat(i[3]),left:parseFloat(i[4])||0}}x.expr&&x.expr.filters&&x.expr.filters.animated&&(x.expr.filters.animated=(t=x.expr.filters.animated,function(e){return!!x(e).data(f)||t(e)})),!1!==x.uiBackCompat&&x.extend(x.effects,{save:function(e,t){for(var n=0,r=t.length;n<r;n++)null!==t[n]&&e.data(c+t[n],e[0].style[t[n]])},restore:function(e,t){for(var n,r=0,i=t.length;r<i;r++)null!==t[r]&&(n=e.data(c+t[r]),e.css(t[r],n))},setMode:function(e,t){return"toggle"===t&&(t=e.is(":hidden")?"show":"hide"),t},createWrapper:function(n){if(n.parent().is(".ui-effects-wrapper"))return n.parent();var r={width:n.outerWidth(!0),height:n.outerHeight(!0),float:n.css("float")},e=x("<div></div>").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}),t={width:n.width(),height:n.height()},i=document.activeElement;try{i.id}catch(e){i=document.body}return n.wrap(e),(n[0]===i||x.contains(n[0],i))&&x(i).trigger("focus"),e=n.parent(),"static"===n.css("position")?(e.css({position:"relative"}),n.css({position:"relative"})):(x.extend(r,{position:n.css("position"),zIndex:n.css("z-index")}),x.each(["top","left","bottom","right"],function(e,t){r[t]=n.css(t),isNaN(parseInt(r[t],10))&&(r[t]="auto")}),n.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})),n.css(t),e.css(r).show()},removeWrapper:function(e){var t=document.activeElement;return e.parent().is(".ui-effects-wrapper")&&(e.parent().replaceWith(e),(e[0]===t||x.contains(e[0],t))&&x(t).trigger("focus")),e}}),x.extend(x.effects,{version:"1.12.1",define:function(e,t,n){return n||(n=t,t="effect"),x.effects.effect[e]=n,x.effects.effect[e].mode=t,n},scaledDimensions:function(e,t,n){if(0===t)return{height:0,width:0,outerHeight:0,outerWidth:0};var r="horizontal"!==n?(t||100)/100:1,i="vertical"!==n?(t||100)/100:1;return{height:e.height()*i,width:e.width()*r,outerHeight:e.outerHeight()*i,outerWidth:e.outerWidth()*r}},clipToBox:function(e){return{width:e.clip.right-e.clip.left,height:e.clip.bottom-e.clip.top,left:e.clip.left,top:e.clip.top}},unshift:function(e,t,n){var r=e.queue();1<t&&r.splice.apply(r,[1,0].concat(r.splice(t,n))),e.dequeue()},saveStyle:function(e){e.data(l,e[0].style.cssText)},restoreStyle:function(e){e[0].style.cssText=e.data(l)||"",e.removeData(l)},mode:function(e,t){var n=e.is(":hidden");return"toggle"===t&&(t=n?"show":"hide"),(n?"hide"===t:"show"===t)&&(t="none"),t},getBaseline:function(e,t){var n,r;switch(e[0]){case"top":n=0;break;case"middle":n=.5;break;case"bottom":n=1;break;default:n=e[0]/t.height}switch(e[1]){case"left":r=0;break;case"center":r=.5;break;case"right":r=1;break;default:r=e[1]/t.width}return{x:r,y:n}},createPlaceholder:function(e){var t,n=e.css("position"),r=e.position();return e.css({marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()),/^(static|relative)/.test(n)&&(n="absolute",t=x("<"+e[0].nodeName+">").insertAfter(e).css({display:/^(inline|ruby)/.test(e.css("display"))?"inline-block":"block",visibility:"hidden",marginTop:e.css("marginTop"),marginBottom:e.css("marginBottom"),marginLeft:e.css("marginLeft"),marginRight:e.css("marginRight"),float:e.css("float")}).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).addClass("ui-effects-placeholder"),e.data(c+"placeholder",t)),e.css({position:n,left:r.left,top:r.top}),t},removePlaceholder:function(e){var t=c+"placeholder",n=e.data(t);n&&(n.remove(),e.removeData(t))},cleanUp:function(e){x.effects.restoreStyle(e),x.effects.removePlaceholder(e)},setTransition:function(r,e,i,a){return a=a||{},x.each(e,function(e,t){var n=r.cssUnit(t);0<n[0]&&(a[t]=n[0]*i+n[1])}),a}}),x.fn.extend({effect:function(){var r=u.apply(this,arguments),i=x.effects.effect[r.effect],a=i.mode,e=r.queue,t=e||"fx",o=r.complete,s=r.mode,c=[],n=function(e){var t=x(this),n=x.effects.mode(t,s)||a;t.data(f,!0),c.push(n),a&&("show"===n||n===a&&"hide"===n)&&t.show(),a&&"none"===n||x.effects.saveStyle(t),x.isFunction(e)&&e()};if(x.fx.off||!i)return s?this[s](r.duration,o):this.each(function(){o&&o.call(this)});function l(e){var t=x(this);function n(){x.isFunction(o)&&o.call(t[0]),x.isFunction(e)&&e()}r.mode=c.shift(),!1===x.uiBackCompat||a?"none"===r.mode?(t[s](),n()):i.call(t[0],r,function(){t.removeData(f),x.effects.cleanUp(t),"hide"===r.mode&&t.hide(),n()}):(t.is(":hidden")?"hide"===s:"show"===s)?(t[s](),n()):i.call(t[0],r,n)}return!1===e?this.each(n).each(l):this.queue(t,n).queue(t,l)},show:(i=x.fn.show,function(e){if(a(e))return i.apply(this,arguments);var t=u.apply(this,arguments);return t.mode="show",this.effect.call(this,t)}),hide:(r=x.fn.hide,function(e){if(a(e))return r.apply(this,arguments);var t=u.apply(this,arguments);return t.mode="hide",this.effect.call(this,t)}),toggle:(n=x.fn.toggle,function(e){if(a(e)||"boolean"==typeof e)return n.apply(this,arguments);var t=u.apply(this,arguments);return t.mode="toggle",this.effect.call(this,t)}),cssUnit:function(e){var n=this.css(e),r=[];return x.each(["em","px","%","pt"],function(e,t){0<n.indexOf(t)&&(r=[parseFloat(n),t])}),r},cssClip:function(e){return e?this.css("clip","rect("+e.top+"px "+e.right+"px "+e.bottom+"px "+e.left+"px)"):o(this.css("clip"),this)},transfer:function(e,t){var n=x(this),r=x(e.to),i="fixed"===r.css("position"),a=x("body"),o=i?a.scrollTop():0,s=i?a.scrollLeft():0,c=r.offset(),l={top:c.top-o,left:c.left-s,height:r.innerHeight(),width:r.innerWidth()},u=n.offset(),f=x("<div class='ui-effects-transfer'></div>").appendTo("body").addClass(e.className).css({top:u.top-o,left:u.left-s,height:n.innerHeight(),width:n.innerWidth(),position:i?"fixed":"absolute"}).animate(l,e.duration,e.easing,function(){f.remove(),x.isFunction(t)&&t()})}}),x.fx.step.clip=function(e){e.clipInit||(e.start=x(e.elem).cssClip(),"string"==typeof e.end&&(e.end=o(e.end,e.elem)),e.clipInit=!0),x(e.elem).cssClip({top:e.pos*(e.end.top-e.start.top)+e.start.top,right:e.pos*(e.end.right-e.start.right)+e.start.right,bottom:e.pos*(e.end.bottom-e.start.bottom)+e.start.bottom,left:e.pos*(e.end.left-e.start.left)+e.start.left})}}(),r={},x.each(["Quad","Cubic","Quart","Quint","Expo"],function(t,e){r[e]=function(e){return Math.pow(e,t+2)}}),x.extend(r,{Sine:function(e){return 1-Math.cos(e*Math.PI/2)},Circ:function(e){return 1-Math.sqrt(1-e*e)},Elastic:function(e){return 0===e||1===e?e:-Math.pow(2,8*(e-1))*Math.sin((80*(e-1)-7.5)*Math.PI/15)},Back:function(e){return e*e*(3*e-2)},Bounce:function(e){for(var t,n=4;e<((t=Math.pow(2,--n))-1)/11;);return 1/Math.pow(4,3-n)-7.5625*Math.pow((3*t-2)/22-e,2)}}),x.each(r,function(e,t){x.easing["easeIn"+e]=t,x.easing["easeOut"+e]=function(e){return 1-t(1-e)},x.easing["easeInOut"+e]=function(e){return e<.5?t(2*e)/2:1-t(-2*e+2)/2}});x.effects,x.effects.define("blind","hide",function(e,t){var n={up:["bottom","top"],vertical:["bottom","top"],down:["top","bottom"],left:["right","left"],horizontal:["right","left"],right:["left","right"]},r=x(this),i=e.direction||"up",a=r.cssClip(),o={clip:x.extend({},a)},s=x.effects.createPlaceholder(r);o.clip[n[i][0]]=o.clip[n[i][1]],"show"===e.mode&&(r.cssClip(o.clip),s&&s.css(x.effects.clipToBox(o)),o.clip=a),s&&s.animate(x.effects.clipToBox(o),e.duration,e.easing),r.animate(o,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),x.effects.define("bounce",function(e,t){var n,r,i,a=x(this),o=e.mode,s="hide"===o,c="show"===o,l=e.direction||"up",u=e.distance,f=e.times||5,d=2*f+(c||s?1:0),h=e.duration/d,p=e.easing,m="up"===l||"down"===l?"top":"left",g="up"===l||"left"===l,_=0,b=a.queue().length;for(x.effects.createPlaceholder(a),i=a.css(m),u||(u=a["top"===m?"outerHeight":"outerWidth"]()/3),c&&((r={opacity:1})[m]=i,a.css("opacity",0).css(m,g?2*-u:2*u).animate(r,h,p)),s&&(u/=Math.pow(2,f-1)),(r={})[m]=i;_<f;_++)(n={})[m]=(g?"-=":"+=")+u,a.animate(n,h,p).animate(r,h,p),u=s?2*u:u/2;s&&((n={opacity:0})[m]=(g?"-=":"+=")+u,a.animate(n,h,p)),a.queue(t),x.effects.unshift(a,b,d+1)}),x.effects.define("clip","hide",function(e,t){var n,r={},i=x(this),a=e.direction||"vertical",o="both"===a,s=o||"horizontal"===a,c=o||"vertical"===a;n=i.cssClip(),r.clip={top:c?(n.bottom-n.top)/2:n.top,right:s?(n.right-n.left)/2:n.right,bottom:c?(n.bottom-n.top)/2:n.bottom,left:s?(n.right-n.left)/2:n.left},x.effects.createPlaceholder(i),"show"===e.mode&&(i.cssClip(r.clip),r.clip=n),i.animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),x.effects.define("drop","hide",function(e,t){var n,r=x(this),i="show"===e.mode,a=e.direction||"left",o="up"===a||"down"===a?"top":"left",s="up"===a||"left"===a?"-=":"+=",c="+="===s?"-=":"+=",l={opacity:0};x.effects.createPlaceholder(r),n=e.distance||r["top"===o?"outerHeight":"outerWidth"](!0)/2,l[o]=s+n,i&&(r.css(l),l[o]=c+n,l.opacity=1),r.animate(l,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),x.effects.define("explode","hide",function(e,t){var n,r,i,a,o,s,c=e.pieces?Math.round(Math.sqrt(e.pieces)):3,l=c,u=x(this),f="show"===e.mode,d=u.show().css("visibility","hidden").offset(),h=Math.ceil(u.outerWidth()/l),p=Math.ceil(u.outerHeight()/c),m=[];function g(){m.push(this),m.length===c*l&&(u.css({visibility:"visible"}),x(m).remove(),t())}for(n=0;n<c;n++)for(a=d.top+n*p,s=n-(c-1)/2,r=0;r<l;r++)i=d.left+r*h,o=r-(l-1)/2,u.clone().appendTo("body").wrap("<div></div>").css({position:"absolute",visibility:"visible",left:-r*h,top:-n*p}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h,height:p,left:i+(f?o*h:0),top:a+(f?s*p:0),opacity:f?0:1}).animate({left:i+(f?0:o*h),top:a+(f?0:s*p),opacity:f?1:0},e.duration||500,e.easing,g)}),x.effects.define("fade","toggle",function(e,t){var n="show"===e.mode;x(this).css("opacity",n?0:1).animate({opacity:n?1:0},{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),x.effects.define("fold","hide",function(t,e){var n=x(this),r=t.mode,i="show"===r,a="hide"===r,o=t.size||15,s=/([0-9]+)%/.exec(o),c=!!t.horizFirst?["right","bottom"]:["bottom","right"],l=t.duration/2,u=x.effects.createPlaceholder(n),f=n.cssClip(),d={clip:x.extend({},f)},h={clip:x.extend({},f)},p=[f[c[0]],f[c[1]]],m=n.queue().length;s&&(o=parseInt(s[1],10)/100*p[a?0:1]),d.clip[c[0]]=o,h.clip[c[0]]=o,h.clip[c[1]]=0,i&&(n.cssClip(h.clip),u&&u.css(x.effects.clipToBox(h)),h.clip=f),n.queue(function(e){u&&u.animate(x.effects.clipToBox(d),l,t.easing).animate(x.effects.clipToBox(h),l,t.easing),e()}).animate(d,l,t.easing).animate(h,l,t.easing).queue(e),x.effects.unshift(n,m,4)}),x.effects.define("highlight","show",function(e,t){var n=x(this),r={backgroundColor:n.css("backgroundColor")};"hide"===e.mode&&(r.opacity=0),x.effects.saveStyle(n),n.css({backgroundImage:"none",backgroundColor:e.color||"#ffff99"}).animate(r,{queue:!1,duration:e.duration,easing:e.easing,complete:t})}),x.effects.define("size",function(i,t){var e,a,n,r=x(this),o=["fontSize"],s=["borderTopWidth","borderBottomWidth","paddingTop","paddingBottom"],c=["borderLeftWidth","borderRightWidth","paddingLeft","paddingRight"],l=i.mode,u="effect"!==l,f=i.scale||"both",d=i.origin||["middle","center"],h=r.css("position"),p=r.position(),m=x.effects.scaledDimensions(r),g=i.from||m,_=i.to||x.effects.scaledDimensions(r,0);x.effects.createPlaceholder(r),"show"===l&&(n=g,g=_,_=n),a={from:{y:g.height/m.height,x:g.width/m.width},to:{y:_.height/m.height,x:_.width/m.width}},"box"!==f&&"both"!==f||(a.from.y!==a.to.y&&(g=x.effects.setTransition(r,s,a.from.y,g),_=x.effects.setTransition(r,s,a.to.y,_)),a.from.x!==a.to.x&&(g=x.effects.setTransition(r,c,a.from.x,g),_=x.effects.setTransition(r,c,a.to.x,_))),"content"!==f&&"both"!==f||a.from.y!==a.to.y&&(g=x.effects.setTransition(r,o,a.from.y,g),_=x.effects.setTransition(r,o,a.to.y,_)),d&&(e=x.effects.getBaseline(d,m),g.top=(m.outerHeight-g.outerHeight)*e.y+p.top,g.left=(m.outerWidth-g.outerWidth)*e.x+p.left,_.top=(m.outerHeight-_.outerHeight)*e.y+p.top,_.left=(m.outerWidth-_.outerWidth)*e.x+p.left),r.css(g),"content"!==f&&"both"!==f||(s=s.concat(["marginTop","marginBottom"]).concat(o),c=c.concat(["marginLeft","marginRight"]),r.find("*[width]").each(function(){var e=x(this),t=x.effects.scaledDimensions(e),n={height:t.height*a.from.y,width:t.width*a.from.x,outerHeight:t.outerHeight*a.from.y,outerWidth:t.outerWidth*a.from.x},r={height:t.height*a.to.y,width:t.width*a.to.x,outerHeight:t.height*a.to.y,outerWidth:t.width*a.to.x};a.from.y!==a.to.y&&(n=x.effects.setTransition(e,s,a.from.y,n),r=x.effects.setTransition(e,s,a.to.y,r)),a.from.x!==a.to.x&&(n=x.effects.setTransition(e,c,a.from.x,n),r=x.effects.setTransition(e,c,a.to.x,r)),u&&x.effects.saveStyle(e),e.css(n),e.animate(r,i.duration,i.easing,function(){u&&x.effects.restoreStyle(e)})})),r.animate(_,{queue:!1,duration:i.duration,easing:i.easing,complete:function(){var e=r.offset();0===_.opacity&&r.css("opacity",g.opacity),u||(r.css("position","static"===h?"relative":h).offset(e),x.effects.saveStyle(r)),t()}})}),x.effects.define("scale",function(e,t){var n=x(this),r=e.mode,i=parseInt(e.percent,10)||(0===parseInt(e.percent,10)?0:"effect"!==r?0:100),a=x.extend(!0,{from:x.effects.scaledDimensions(n),to:x.effects.scaledDimensions(n,i,e.direction||"both"),origin:e.origin||["middle","center"]},e);e.fade&&(a.from.opacity=1,a.to.opacity=0),x.effects.effect.size.call(this,a,t)}),x.effects.define("puff","hide",function(e,t){var n=x.extend(!0,{},e,{fade:!0,percent:parseInt(e.percent,10)||150});x.effects.effect.scale.call(this,n,t)}),x.effects.define("pulsate","show",function(e,t){var n=x(this),r=e.mode,i="show"===r,a=i||"hide"===r,o=2*(e.times||5)+(a?1:0),s=e.duration/o,c=0,l=1,u=n.queue().length;for(!i&&n.is(":visible")||(n.css("opacity",0).show(),c=1);l<o;l++)n.animate({opacity:c},s,e.easing),c=1-c;n.animate({opacity:c},s,e.easing),n.queue(t),x.effects.unshift(n,u,o+1)}),x.effects.define("shake",function(e,t){var n=1,r=x(this),i=e.direction||"left",a=e.distance||20,o=e.times||3,s=2*o+1,c=Math.round(e.duration/s),l="up"===i||"down"===i?"top":"left",u="up"===i||"left"===i,f={},d={},h={},p=r.queue().length;for(x.effects.createPlaceholder(r),f[l]=(u?"-=":"+=")+a,d[l]=(u?"+=":"-=")+2*a,h[l]=(u?"-=":"+=")+2*a,r.animate(f,c,e.easing);n<o;n++)r.animate(d,c,e.easing).animate(h,c,e.easing);r.animate(d,c,e.easing).animate(f,c/2,e.easing).queue(t),x.effects.unshift(r,p,s+1)}),x.effects.define("slide","show",function(e,t){var n,r,i=x(this),a={up:["bottom","top"],down:["top","bottom"],left:["right","left"],right:["left","right"]},o=e.mode,s=e.direction||"left",c="up"===s||"down"===s?"top":"left",l="up"===s||"left"===s,u=e.distance||i["top"===c?"outerHeight":"outerWidth"](!0),f={};x.effects.createPlaceholder(i),n=i.cssClip(),r=i.position()[c],f[c]=(l?-1:1)*u+r,f.clip=i.cssClip(),f.clip[a[s][1]]=f.clip[a[s][0]],"show"===o&&(i.cssClip(f.clip),i.css(c,f[c]),f.clip=n,f[c]=r),i.animate(f,{queue:!1,duration:e.duration,easing:e.easing,complete:t})});!1!==x.uiBackCompat&&x.effects.define("transfer",function(e,t){x(this).transfer(e,t)});x.ui.focusable=function(e,t){var n,r,i,a,o,s=e.nodeName.toLowerCase();return"area"===s?(r=(n=e.parentNode).name,!(!e.href||!r||"map"!==n.nodeName.toLowerCase())&&(0<(i=x("img[usemap='#"+r+"']")).length&&i.is(":visible"))):(/^(input|select|textarea|button|object)$/.test(s)?(a=!e.disabled)&&(o=x(e).closest("fieldset")[0])&&(a=!o.disabled):a="a"===s&&e.href||t,a&&x(e).is(":visible")&&function(e){var t=e.css("visibility");for(;"inherit"===t;)e=e.parent(),t=e.css("visibility");return"hidden"!==t}(x(e)))},x.extend(x.expr[":"],{focusable:function(e){return x.ui.focusable(e,null!=x.attr(e,"tabindex"))}});x.ui.focusable,x.fn.form=function(){return"string"==typeof this[0].form?this.closest("form"):x(this[0].form)},x.ui.formResetMixin={_formResetHandler:function(){var t=x(this);setTimeout(function(){var e=t.data("ui-form-reset-instances");x.each(e,function(){this.refresh()})})},_bindFormResetHandler:function(){if(this.form=this.element.form(),this.form.length){var e=this.form.data("ui-form-reset-instances")||[];e.length||this.form.on("reset.ui-form-reset",this._formResetHandler),e.push(this),this.form.data("ui-form-reset-instances",e)}},_unbindFormResetHandler:function(){if(this.form.length){var e=this.form.data("ui-form-reset-instances");e.splice(x.inArray(this,e),1),e.length?this.form.data("ui-form-reset-instances",e):this.form.removeData("ui-form-reset-instances").off("reset.ui-form-reset")}}};"1.7"===x.fn.jquery.substring(0,3)&&(x.each(["Width","Height"],function(e,n){var i="Width"===n?["Left","Right"]:["Top","Bottom"],r=n.toLowerCase(),a={innerWidth:x.fn.innerWidth,innerHeight:x.fn.innerHeight,outerWidth:x.fn.outerWidth,outerHeight:x.fn.outerHeight};function o(e,t,n,r){return x.each(i,function(){t-=parseFloat(x.css(e,"padding"+this))||0,n&&(t-=parseFloat(x.css(e,"border"+this+"Width"))||0),r&&(t-=parseFloat(x.css(e,"margin"+this))||0)}),t}x.fn["inner"+n]=function(e){return void 0===e?a["inner"+n].call(this):this.each(function(){x(this).css(r,o(this,e)+"px")})},x.fn["outer"+n]=function(e,t){return"number"!=typeof e?a["outer"+n].call(this,e):this.each(function(){x(this).css(r,o(this,e,!0,t)+"px")})}}),x.fn.addBack=function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))});var t,a;x.ui.keyCode={BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38},x.ui.escapeSelector=(t=/([!"#$%&'()*+,./:;<=>?@[\]^`{|}~])/g,function(e){return e.replace(t,"\\$1")}),x.fn.labels=function(){var e,t,n,r,i;return this[0].labels&&this[0].labels.length?this.pushStack(this[0].labels):(r=this.eq(0).parents("label"),(n=this.attr("id"))&&(i=(e=this.eq(0).parents().last()).add(e.length?e.siblings():this.siblings()),t="label[for='"+x.ui.escapeSelector(n)+"']",r=r.add(i.find(t).addBack(t))),this.pushStack(r))},x.fn.scrollParent=function(e){var t=this.css("position"),n="absolute"===t,r=e?/(auto|scroll|hidden)/:/(auto|scroll)/,i=this.parents().filter(function(){var e=x(this);return(!n||"static"!==e.css("position"))&&r.test(e.css("overflow")+e.css("overflow-y")+e.css("overflow-x"))}).eq(0);return"fixed"!==t&&i.length?i:x(this[0].ownerDocument||document)},x.extend(x.expr[":"],{tabbable:function(e){var t=x.attr(e,"tabindex"),n=null!=t;return(!n||0<=t)&&x.ui.focusable(e,n)}}),x.fn.extend({uniqueId:(a=0,function(){return this.each(function(){this.id||(this.id="ui-id-"+ ++a)})}),removeUniqueId:function(){return this.each(function(){/^ui-id-\d+$/.test(this.id)&&x(this).removeAttr("id")})}}),x.widget("ui.accordion",{version:"1.12.1",options:{active:0,animate:{},classes:{"ui-accordion-header":"ui-corner-top","ui-accordion-header-collapsed":"ui-corner-all","ui-accordion-content":"ui-corner-bottom"},collapsible:!1,event:"click",header:"> li > :first-child, > :not(li):even",heightStyle:"auto",icons:{activeHeader:"ui-icon-triangle-1-s",header:"ui-icon-triangle-1-e"},activate:null,beforeActivate:null},hideProps:{borderTopWidth:"hide",borderBottomWidth:"hide",paddingTop:"hide",paddingBottom:"hide",height:"hide"},showProps:{borderTopWidth:"show",borderBottomWidth:"show",paddingTop:"show",paddingBottom:"show",height:"show"},_create:function(){var e=this.options;this.prevShow=this.prevHide=x(),this._addClass("ui-accordion","ui-widget ui-helper-reset"),this.element.attr("role","tablist"),e.collapsible||!1!==e.active&&null!=e.active||(e.active=0),this._processPanels(),e.active<0&&(e.active+=this.headers.length),this._refresh()},_getCreateEventData:function(){return{header:this.active,panel:this.active.length?this.active.next():x()}},_createIcons:function(){var e,t,n=this.options.icons;n&&(e=x("<span>"),this._addClass(e,"ui-accordion-header-icon","ui-icon "+n.header),e.prependTo(this.headers),t=this.active.children(".ui-accordion-header-icon"),this._removeClass(t,n.header)._addClass(t,null,n.activeHeader)._addClass(this.headers,"ui-accordion-icons"))},_destroyIcons:function(){this._removeClass(this.headers,"ui-accordion-icons"),this.headers.children(".ui-accordion-header-icon").remove()},_destroy:function(){var e;this.element.removeAttr("role"),this.headers.removeAttr("role aria-expanded aria-selected aria-controls tabIndex").removeUniqueId(),this._destroyIcons(),e=this.headers.next().css("display","").removeAttr("role aria-hidden aria-labelledby").removeUniqueId(),"content"!==this.options.heightStyle&&e.css("height","")},_setOption:function(e,t){"active"!==e?("event"===e&&(this.options.event&&this._off(this.headers,this.options.event),this._setupEvents(t)),this._super(e,t),"collapsible"!==e||t||!1!==this.options.active||this._activate(0),"icons"===e&&(this._destroyIcons(),t&&this._createIcons())):this._activate(t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e),this._toggleClass(this.headers.add(this.headers.next()),null,"ui-state-disabled",!!e)},_keydown:function(e){if(!e.altKey&&!e.ctrlKey){var t=x.ui.keyCode,n=this.headers.length,r=this.headers.index(e.target),i=!1;switch(e.keyCode){case t.RIGHT:case t.DOWN:i=this.headers[(r+1)%n];break;case t.LEFT:case t.UP:i=this.headers[(r-1+n)%n];break;case t.SPACE:case t.ENTER:this._eventHandler(e);break;case t.HOME:i=this.headers[0];break;case t.END:i=this.headers[n-1]}i&&(x(e.target).attr("tabIndex",-1),x(i).attr("tabIndex",0),x(i).trigger("focus"),e.preventDefault())}},_panelKeyDown:function(e){e.keyCode===x.ui.keyCode.UP&&e.ctrlKey&&x(e.currentTarget).prev().trigger("focus")},refresh:function(){var e=this.options;this._processPanels(),!1===e.active&&!0===e.collapsible||!this.headers.length?(e.active=!1,this.active=x()):!1===e.active?this._activate(0):this.active.length&&!x.contains(this.element[0],this.active[0])?this.headers.length===this.headers.find(".ui-state-disabled").length?(e.active=!1,this.active=x()):this._activate(Math.max(0,e.active-1)):e.active=this.headers.index(this.active),this._destroyIcons(),this._refresh()},_processPanels:function(){var e=this.headers,t=this.panels;this.headers=this.element.find(this.options.header),this._addClass(this.headers,"ui-accordion-header ui-accordion-header-collapsed","ui-state-default"),this.panels=this.headers.next().filter(":not(.ui-accordion-content-active)").hide(),this._addClass(this.panels,"ui-accordion-content","ui-helper-reset ui-widget-content"),t&&(this._off(e.not(this.headers)),this._off(t.not(this.panels)))},_refresh:function(){var n,e=this.options,t=e.heightStyle,r=this.element.parent();this.active=this._findActive(e.active),this._addClass(this.active,"ui-accordion-header-active","ui-state-active")._removeClass(this.active,"ui-accordion-header-collapsed"),this._addClass(this.active.next(),"ui-accordion-content-active"),this.active.next().show(),this.headers.attr("role","tab").each(function(){var e=x(this),t=e.uniqueId().attr("id"),n=e.next(),r=n.uniqueId().attr("id");e.attr("aria-controls",r),n.attr("aria-labelledby",t)}).next().attr("role","tabpanel"),this.headers.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}).next().attr({"aria-hidden":"true"}).hide(),this.active.length?this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}).next().attr({"aria-hidden":"false"}):this.headers.eq(0).attr("tabIndex",0),this._createIcons(),this._setupEvents(e.event),"fill"===t?(n=r.height(),this.element.siblings(":visible").each(function(){var e=x(this),t=e.css("position");"absolute"!==t&&"fixed"!==t&&(n-=e.outerHeight(!0))}),this.headers.each(function(){n-=x(this).outerHeight(!0)}),this.headers.next().each(function(){x(this).height(Math.max(0,n-x(this).innerHeight()+x(this).height()))}).css("overflow","auto")):"auto"===t&&(n=0,this.headers.next().each(function(){var e=x(this).is(":visible");e||x(this).show(),n=Math.max(n,x(this).css("height","").height()),e||x(this).hide()}).height(n))},_activate:function(e){var t=this._findActive(e)[0];t!==this.active[0]&&(t=t||this.active[0],this._eventHandler({target:t,currentTarget:t,preventDefault:x.noop}))},_findActive:function(e){return"number"==typeof e?this.headers.eq(e):x()},_setupEvents:function(e){var n={keydown:"_keydown"};e&&x.each(e.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.headers.add(this.headers.next())),this._on(this.headers,n),this._on(this.headers.next(),{keydown:"_panelKeyDown"}),this._hoverable(this.headers),this._focusable(this.headers)},_eventHandler:function(e){var t,n,r=this.options,i=this.active,a=x(e.currentTarget),o=a[0]===i[0],s=o&&r.collapsible,c=s?x():a.next(),l=i.next(),u={oldHeader:i,oldPanel:l,newHeader:s?x():a,newPanel:c};e.preventDefault(),o&&!r.collapsible||!1===this._trigger("beforeActivate",e,u)||(r.active=!s&&this.headers.index(a),this.active=o?x():a,this._toggle(u),this._removeClass(i,"ui-accordion-header-active","ui-state-active"),r.icons&&(t=i.children(".ui-accordion-header-icon"),this._removeClass(t,null,r.icons.activeHeader)._addClass(t,null,r.icons.header)),o||(this._removeClass(a,"ui-accordion-header-collapsed")._addClass(a,"ui-accordion-header-active","ui-state-active"),r.icons&&(n=a.children(".ui-accordion-header-icon"),this._removeClass(n,null,r.icons.header)._addClass(n,null,r.icons.activeHeader)),this._addClass(a.next(),"ui-accordion-content-active")))},_toggle:function(e){var t=e.newPanel,n=this.prevShow.length?this.prevShow:e.oldPanel;this.prevShow.add(this.prevHide).stop(!0,!0),this.prevShow=t,this.prevHide=n,this.options.animate?this._animate(t,n,e):(n.hide(),t.show(),this._toggleComplete(e)),n.attr({"aria-hidden":"true"}),n.prev().attr({"aria-selected":"false","aria-expanded":"false"}),t.length&&n.length?n.prev().attr({tabIndex:-1,"aria-expanded":"false"}):t.length&&this.headers.filter(function(){return 0===parseInt(x(this).attr("tabIndex"),10)}).attr("tabIndex",-1),t.attr("aria-hidden","false").prev().attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_animate:function(e,n,t){var r,i,a,o=this,s=0,c=e.css("box-sizing"),l=e.length&&(!n.length||e.index()<n.index()),u=this.options.animate||{},f=l&&u.down||u,d=function(){o._toggleComplete(t)};return"number"==typeof f&&(a=f),"string"==typeof f&&(i=f),i=i||f.easing||u.easing,a=a||f.duration||u.duration,n.length?e.length?(r=e.show().outerHeight(),n.animate(this.hideProps,{duration:a,easing:i,step:function(e,t){t.now=Math.round(e)}}),void e.hide().animate(this.showProps,{duration:a,easing:i,complete:d,step:function(e,t){t.now=Math.round(e),"height"!==t.prop?"content-box"===c&&(s+=t.now):"content"!==o.options.heightStyle&&(t.now=Math.round(r-n.outerHeight()-s),s=0)}})):n.animate(this.hideProps,a,i,d):e.animate(this.showProps,a,i,d)},_toggleComplete:function(e){var t=e.oldPanel,n=t.prev();this._removeClass(t,"ui-accordion-content-active"),this._removeClass(n,"ui-accordion-header-active")._addClass(n,"ui-accordion-header-collapsed"),t.length&&(t.parent()[0].className=t.parent()[0].className),this._trigger("activate",null,e)}}),x.ui.safeActiveElement=function(t){var n;try{n=t.activeElement}catch(e){n=t.body}return n||(n=t.body),n.nodeName||(n=t.body),n},x.widget("ui.menu",{version:"1.12.1",defaultElement:"<ul>",delay:300,options:{icons:{submenu:"ui-icon-caret-1-e"},items:"> *",menus:"ul",position:{my:"left top",at:"right top"},role:"menu",blur:null,focus:null,select:null},_create:function(){this.activeMenu=this.element,this.mouseHandled=!1,this.element.uniqueId().attr({role:this.options.role,tabIndex:0}),this._addClass("ui-menu","ui-widget ui-widget-content"),this._on({"mousedown .ui-menu-item":function(e){e.preventDefault()},"click .ui-menu-item":function(e){var t=x(e.target),n=x(x.ui.safeActiveElement(this.document[0]));!this.mouseHandled&&t.not(".ui-state-disabled").length&&(this.select(e),e.isPropagationStopped()||(this.mouseHandled=!0),t.has(".ui-menu").length?this.expand(e):!this.element.is(":focus")&&n.closest(".ui-menu").length&&(this.element.trigger("focus",[!0]),this.active&&1===this.active.parents(".ui-menu").length&&clearTimeout(this.timer)))},"mouseenter .ui-menu-item":function(e){if(!this.previousFilter){var t=x(e.target).closest(".ui-menu-item"),n=x(e.currentTarget);t[0]===n[0]&&(this._removeClass(n.siblings().children(".ui-state-active"),null,"ui-state-active"),this.focus(e,n))}},mouseleave:"collapseAll","mouseleave .ui-menu":"collapseAll",focus:function(e,t){var n=this.active||this.element.find(this.options.items).eq(0);t||this.focus(e,n)},blur:function(e){this._delay(function(){!x.contains(this.element[0],x.ui.safeActiveElement(this.document[0]))&&this.collapseAll(e)})},keydown:"_keydown"}),this.refresh(),this._on(this.document,{click:function(e){this._closeOnDocumentClick(e)&&this.collapseAll(e),this.mouseHandled=!1}})},_destroy:function(){var e=this.element.find(".ui-menu-item").removeAttr("role aria-disabled").children(".ui-menu-item-wrapper").removeUniqueId().removeAttr("tabIndex role aria-haspopup");this.element.removeAttr("aria-activedescendant").find(".ui-menu").addBack().removeAttr("role aria-labelledby aria-expanded aria-hidden aria-disabled tabIndex").removeUniqueId().show(),e.children().each(function(){var e=x(this);e.data("ui-menu-submenu-caret")&&e.remove()})},_keydown:function(e){var t,n,r,i,a=!0;switch(e.keyCode){case x.ui.keyCode.PAGE_UP:this.previousPage(e);break;case x.ui.keyCode.PAGE_DOWN:this.nextPage(e);break;case x.ui.keyCode.HOME:this._move("first","first",e);break;case x.ui.keyCode.END:this._move("last","last",e);break;case x.ui.keyCode.UP:this.previous(e);break;case x.ui.keyCode.DOWN:this.next(e);break;case x.ui.keyCode.LEFT:this.collapse(e);break;case x.ui.keyCode.RIGHT:this.active&&!this.active.is(".ui-state-disabled")&&this.expand(e);break;case x.ui.keyCode.ENTER:case x.ui.keyCode.SPACE:this._activate(e);break;case x.ui.keyCode.ESCAPE:this.collapse(e);break;default:a=!1,n=this.previousFilter||"",i=!1,r=96<=e.keyCode&&e.keyCode<=105?(e.keyCode-96).toString():String.fromCharCode(e.keyCode),clearTimeout(this.filterTimer),r===n?i=!0:r=n+r,t=this._filterMenuItems(r),(t=i&&-1!==t.index(this.active.next())?this.active.nextAll(".ui-menu-item"):t).length||(r=String.fromCharCode(e.keyCode),t=this._filterMenuItems(r)),t.length?(this.focus(e,t),this.previousFilter=r,this.filterTimer=this._delay(function(){delete this.previousFilter},1e3)):delete this.previousFilter}a&&e.preventDefault()},_activate:function(e){this.active&&!this.active.is(".ui-state-disabled")&&(this.active.children("[aria-haspopup='true']").length?this.expand(e):this.select(e))},refresh:function(){var e,t,n,r,i=this,a=this.options.icons.submenu,o=this.element.find(this.options.menus);this._toggleClass("ui-menu-icons",null,!!this.element.find(".ui-icon").length),t=o.filter(":not(.ui-menu)").hide().attr({role:this.options.role,"aria-hidden":"true","aria-expanded":"false"}).each(function(){var e=x(this),t=e.prev(),n=x("<span>").data("ui-menu-submenu-caret",!0);i._addClass(n,"ui-menu-icon","ui-icon "+a),t.attr("aria-haspopup","true").prepend(n),e.attr("aria-labelledby",t.attr("id"))}),this._addClass(t,"ui-menu","ui-widget ui-widget-content ui-front"),(e=o.add(this.element).find(this.options.items)).not(".ui-menu-item").each(function(){var e=x(this);i._isDivider(e)&&i._addClass(e,"ui-menu-divider","ui-widget-content")}),r=(n=e.not(".ui-menu-item, .ui-menu-divider")).children().not(".ui-menu").uniqueId().attr({tabIndex:-1,role:this._itemRole()}),this._addClass(n,"ui-menu-item")._addClass(r,"ui-menu-item-wrapper"),e.filter(".ui-state-disabled").attr("aria-disabled","true"),this.active&&!x.contains(this.element[0],this.active[0])&&this.blur()},_itemRole:function(){return{menu:"menuitem",listbox:"option"}[this.options.role]},_setOption:function(e,t){if("icons"===e){var n=this.element.find(".ui-menu-icon");this._removeClass(n,null,this.options.icons.submenu)._addClass(n,null,t.submenu)}this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",String(e)),this._toggleClass(null,"ui-state-disabled",!!e)},focus:function(e,t){var n,r,i;this.blur(e,e&&"focus"===e.type),this._scrollIntoView(t),this.active=t.first(),r=this.active.children(".ui-menu-item-wrapper"),this._addClass(r,null,"ui-state-active"),this.options.role&&this.element.attr("aria-activedescendant",r.attr("id")),i=this.active.parent().closest(".ui-menu-item").children(".ui-menu-item-wrapper"),this._addClass(i,null,"ui-state-active"),e&&"keydown"===e.type?this._close():this.timer=this._delay(function(){this._close()},this.delay),(n=t.children(".ui-menu")).length&&e&&/^mouse/.test(e.type)&&this._startOpening(n),this.activeMenu=t.parent(),this._trigger("focus",e,{item:t})},_scrollIntoView:function(e){var t,n,r,i,a,o;this._hasScroll()&&(t=parseFloat(x.css(this.activeMenu[0],"borderTopWidth"))||0,n=parseFloat(x.css(this.activeMenu[0],"paddingTop"))||0,r=e.offset().top-this.activeMenu.offset().top-t-n,i=this.activeMenu.scrollTop(),a=this.activeMenu.height(),o=e.outerHeight(),r<0?this.activeMenu.scrollTop(i+r):a<r+o&&this.activeMenu.scrollTop(i+r-a+o))},blur:function(e,t){t||clearTimeout(this.timer),this.active&&(this._removeClass(this.active.children(".ui-menu-item-wrapper"),null,"ui-state-active"),this._trigger("blur",e,{item:this.active}),this.active=null)},_startOpening:function(e){clearTimeout(this.timer),"true"===e.attr("aria-hidden")&&(this.timer=this._delay(function(){this._close(),this._open(e)},this.delay))},_open:function(e){var t=x.extend({of:this.active},this.options.position);clearTimeout(this.timer),this.element.find(".ui-menu").not(e.parents(".ui-menu")).hide().attr("aria-hidden","true"),e.show().removeAttr("aria-hidden").attr("aria-expanded","true").position(t)},collapseAll:function(t,n){clearTimeout(this.timer),this.timer=this._delay(function(){var e=n?this.element:x(t&&t.target).closest(this.element.find(".ui-menu"));e.length||(e=this.element),this._close(e),this.blur(t),this._removeClass(e.find(".ui-state-active"),null,"ui-state-active"),this.activeMenu=e},this.delay)},_close:function(e){e||(e=this.active?this.active.parent():this.element),e.find(".ui-menu").hide().attr("aria-hidden","true").attr("aria-expanded","false")},_closeOnDocumentClick:function(e){return!x(e.target).closest(".ui-menu").length},_isDivider:function(e){return!/[^\-\u2014\u2013\s]/.test(e.text())},collapse:function(e){var t=this.active&&this.active.parent().closest(".ui-menu-item",this.element);t&&t.length&&(this._close(),this.focus(e,t))},expand:function(e){var t=this.active&&this.active.children(".ui-menu ").find(this.options.items).first();t&&t.length&&(this._open(t.parent()),this._delay(function(){this.focus(e,t)}))},next:function(e){this._move("next","first",e)},previous:function(e){this._move("prev","last",e)},isFirstItem:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},isLastItem:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},_move:function(e,t,n){var r;this.active&&(r="first"===e||"last"===e?this.active["first"===e?"prevAll":"nextAll"](".ui-menu-item").eq(-1):this.active[e+"All"](".ui-menu-item").eq(0)),r&&r.length&&this.active||(r=this.activeMenu.find(this.options.items)[t]()),this.focus(n,r)},nextPage:function(e){var t,n,r;this.active?this.isLastItem()||(this._hasScroll()?(n=this.active.offset().top,r=this.element.height(),this.active.nextAll(".ui-menu-item").each(function(){return(t=x(this)).offset().top-n-r<0}),this.focus(e,t)):this.focus(e,this.activeMenu.find(this.options.items)[this.active?"last":"first"]())):this.next(e)},previousPage:function(e){var t,n,r;this.active?this.isFirstItem()||(this._hasScroll()?(n=this.active.offset().top,r=this.element.height(),this.active.prevAll(".ui-menu-item").each(function(){return 0<(t=x(this)).offset().top-n+r}),this.focus(e,t)):this.focus(e,this.activeMenu.find(this.options.items).first())):this.next(e)},_hasScroll:function(){return this.element.outerHeight()<this.element.prop("scrollHeight")},select:function(e){this.active=this.active||x(e.target).closest(".ui-menu-item");var t={item:this.active};this.active.has(".ui-menu").length||this.collapseAll(e,!0),this._trigger("select",e,t)},_filterMenuItems:function(e){var t=e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"),n=new RegExp("^"+t,"i");return this.activeMenu.find(this.options.items).filter(".ui-menu-item").filter(function(){return n.test(x.trim(x(this).children(".ui-menu-item-wrapper").text()))})}});x.widget("ui.autocomplete",{version:"1.12.1",defaultElement:"<input>",options:{appendTo:null,autoFocus:!1,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null,change:null,close:null,focus:null,open:null,response:null,search:null,select:null},requestIndex:0,pending:0,_create:function(){var n,r,i,e=this.element[0].nodeName.toLowerCase(),t="textarea"===e,a="input"===e;this.isMultiLine=t||!a&&this._isContentEditable(this.element),this.valueMethod=this.element[t||a?"val":"text"],this.isNewMenu=!0,this._addClass("ui-autocomplete-input"),this.element.attr("autocomplete","off"),this._on(this.element,{keydown:function(e){if(this.element.prop("readOnly"))r=i=n=!0;else{r=i=n=!1;var t=x.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:n=!0,this._move("previousPage",e);break;case t.PAGE_DOWN:n=!0,this._move("nextPage",e);break;case t.UP:n=!0,this._keyEvent("previous",e);break;case t.DOWN:n=!0,this._keyEvent("next",e);break;case t.ENTER:this.menu.active&&(n=!0,e.preventDefault(),this.menu.select(e));break;case t.TAB:this.menu.active&&this.menu.select(e);break;case t.ESCAPE:this.menu.element.is(":visible")&&(this.isMultiLine||this._value(this.term),this.close(e),e.preventDefault());break;default:r=!0,this._searchTimeout(e)}}},keypress:function(e){if(n)return n=!1,void(this.isMultiLine&&!this.menu.element.is(":visible")||e.preventDefault());if(!r){var t=x.ui.keyCode;switch(e.keyCode){case t.PAGE_UP:this._move("previousPage",e);break;case t.PAGE_DOWN:this._move("nextPage",e);break;case t.UP:this._keyEvent("previous",e);break;case t.DOWN:this._keyEvent("next",e)}}},input:function(e){if(i)return i=!1,void e.preventDefault();this._searchTimeout(e)},focus:function(){this.selectedItem=null,this.previous=this._value()},blur:function(e){this.cancelBlur?delete this.cancelBlur:(clearTimeout(this.searching),this.close(e),this._change(e))}}),this._initSource(),this.menu=x("<ul>").appendTo(this._appendTo()).menu({role:null}).hide().menu("instance"),this._addClass(this.menu.element,"ui-autocomplete","ui-front"),this._on(this.menu.element,{mousedown:function(e){e.preventDefault(),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,this.element[0]!==x.ui.safeActiveElement(this.document[0])&&this.element.trigger("focus")})},menufocus:function(e,t){var n,r;if(this.isNewMenu&&(this.isNewMenu=!1,e.originalEvent&&/^mouse/.test(e.originalEvent.type)))return this.menu.blur(),void this.document.one("mousemove",function(){x(e.target).trigger(e.originalEvent)});r=t.item.data("ui-autocomplete-item"),!1!==this._trigger("focus",e,{item:r})&&e.originalEvent&&/^key/.test(e.originalEvent.type)&&this._value(r.value),(n=t.item.attr("aria-label")||r.value)&&x.trim(n).length&&(this.liveRegion.children().hide(),x("<div>").text(n).appendTo(this.liveRegion))},menuselect:function(e,t){var n=t.item.data("ui-autocomplete-item"),r=this.previous;this.element[0]!==x.ui.safeActiveElement(this.document[0])&&(this.element.trigger("focus"),this.previous=r,this._delay(function(){this.previous=r,this.selectedItem=n})),!1!==this._trigger("select",e,{item:n})&&this._value(n.value),this.term=this._value(),this.close(e),this.selectedItem=n}}),this.liveRegion=x("<div>",{role:"status","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_destroy:function(){clearTimeout(this.searching),this.element.removeAttr("autocomplete"),this.menu.element.remove(),this.liveRegion.remove()},_setOption:function(e,t){this._super(e,t),"source"===e&&this._initSource(),"appendTo"===e&&this.menu.element.appendTo(this._appendTo()),"disabled"===e&&t&&this.xhr&&this.xhr.abort()},_isEventTargetInWidget:function(e){var t=this.menu.element[0];return e.target===this.element[0]||e.target===t||x.contains(t,e.target)},_closeOnClickOutside:function(e){this._isEventTargetInWidget(e)||this.close()},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?x(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_initSource:function(){var n,r,i=this;x.isArray(this.options.source)?(n=this.options.source,this.source=function(e,t){t(x.ui.autocomplete.filter(n,e.term))}):"string"==typeof this.options.source?(r=this.options.source,this.source=function(e,t){i.xhr&&i.xhr.abort(),i.xhr=x.ajax({url:r,data:e,dataType:"json",success:function(e){t(e)},error:function(){t([])}})}):this.source=this.options.source},_searchTimeout:function(r){clearTimeout(this.searching),this.searching=this._delay(function(){var e=this.term===this._value(),t=this.menu.element.is(":visible"),n=r.altKey||r.ctrlKey||r.metaKey||r.shiftKey;e&&(!e||t||n)||(this.selectedItem=null,this.search(null,r))},this.options.delay)},search:function(e,t){return e=null!=e?e:this._value(),this.term=this._value(),e.length<this.options.minLength?this.close(t):!1!==this._trigger("search",t)?this._search(e):void 0},_search:function(e){this.pending++,this._addClass("ui-autocomplete-loading"),this.cancelSearch=!1,this.source({term:e},this._response())},_response:function(){var t=++this.requestIndex;return x.proxy(function(e){t===this.requestIndex&&this.__response(e),this.pending--,this.pending||this._removeClass("ui-autocomplete-loading")},this)},__response:function(e){e&&(e=this._normalize(e)),this._trigger("response",null,{content:e}),!this.options.disabled&&e&&e.length&&!this.cancelSearch?(this._suggest(e),this._trigger("open")):this._close()},close:function(e){this.cancelSearch=!0,this._close(e)},_close:function(e){this._off(this.document,"mousedown"),this.menu.element.is(":visible")&&(this.menu.element.hide(),this.menu.blur(),this.isNewMenu=!0,this._trigger("close",e))},_change:function(e){this.previous!==this._value()&&this._trigger("change",e,{item:this.selectedItem})},_normalize:function(e){return e.length&&e[0].label&&e[0].value?e:x.map(e,function(e){return"string"==typeof e?{label:e,value:e}:x.extend({},e,{label:e.label||e.value,value:e.value||e.label})})},_suggest:function(e){var t=this.menu.element.empty();this._renderMenu(t,e),this.isNewMenu=!0,this.menu.refresh(),t.show(),this._resizeMenu(),t.position(x.extend({of:this.element},this.options.position)),this.options.autoFocus&&this.menu.next(),this._on(this.document,{mousedown:"_closeOnClickOutside"})},_resizeMenu:function(){var e=this.menu.element;e.outerWidth(Math.max(e.width("").outerWidth()+1,this.element.outerWidth()))},_renderMenu:function(n,e){var r=this;x.each(e,function(e,t){r._renderItemData(n,t)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-autocomplete-item",t)},_renderItem:function(e,t){return x("<li>").append(x("<div>").text(t.label)).appendTo(e)},_move:function(e,t){if(this.menu.element.is(":visible"))return this.menu.isFirstItem()&&/^previous/.test(e)||this.menu.isLastItem()&&/^next/.test(e)?(this.isMultiLine||this._value(this.term),void this.menu.blur()):void this.menu[e](t);this.search(null,t)},widget:function(){return this.menu.element},_value:function(){return this.valueMethod.apply(this.element,arguments)},_keyEvent:function(e,t){this.isMultiLine&&!this.menu.element.is(":visible")||(this._move(e,t),t.preventDefault())},_isContentEditable:function(e){if(!e.length)return!1;var t=e.prop("contentEditable");return"inherit"===t?this._isContentEditable(e.parent()):"true"===t}}),x.extend(x.ui.autocomplete,{escapeRegex:function(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")},filter:function(e,t){var n=new RegExp(x.ui.autocomplete.escapeRegex(t),"i");return x.grep(e,function(e){return n.test(e.label||e.value||e)})}}),x.widget("ui.autocomplete",x.ui.autocomplete,{options:{messages:{noResults:"No search results.",results:function(e){return e+(1<e?" results are":" result is")+" available, use up and down arrow keys to navigate."}}},__response:function(e){var t;this._superApply(arguments),this.options.disabled||this.cancelSearch||(t=e&&e.length?this.options.messages.results(e.length):this.options.messages.noResults,this.liveRegion.children().hide(),x("<div>").text(t).appendTo(this.liveRegion))}});x.ui.autocomplete;var o=/ui-corner-([a-z]){2,6}/g;x.widget("ui.controlgroup",{version:"1.12.1",defaultElement:"<div>",options:{direction:"horizontal",disabled:null,onlyVisible:!0,items:{button:"input[type=button], input[type=submit], input[type=reset], button, a",controlgroupLabel:".ui-controlgroup-label",checkboxradio:"input[type='checkbox'], input[type='radio']",selectmenu:"select",spinner:".ui-spinner-input"}},_create:function(){this._enhance()},_enhance:function(){this.element.attr("role","toolbar"),this.refresh()},_destroy:function(){this._callChildMethod("destroy"),this.childWidgets.removeData("ui-controlgroup-data"),this.element.removeAttr("role"),this.options.items.controlgroupLabel&&this.element.find(this.options.items.controlgroupLabel).find(".ui-controlgroup-label-contents").contents().unwrap()},_initWidgets:function(){var o=this,s=[];x.each(this.options.items,function(i,e){var t,a={};if(e)return"controlgroupLabel"===i?((t=o.element.find(e)).each(function(){var e=x(this);e.children(".ui-controlgroup-label-contents").length||e.contents().wrapAll("<span class='ui-controlgroup-label-contents'></span>")}),o._addClass(t,null,"ui-widget ui-widget-content ui-state-default"),void(s=s.concat(t.get()))):void(x.fn[i]&&(a=o["_"+i+"Options"]?o["_"+i+"Options"]("middle"):{classes:{}},o.element.find(e).each(function(){var e=x(this),t=e[i]("instance"),n=x.widget.extend({},a);if("button"!==i||!e.parent(".ui-spinner").length){t||(t=e[i]()[i]("instance")),t&&(n.classes=o._resolveClassesValues(n.classes,t)),e[i](n);var r=e[i]("widget");x.data(r[0],"ui-controlgroup-data",t||e[i]("instance")),s.push(r[0])}})))}),this.childWidgets=x(x.unique(s)),this._addClass(this.childWidgets,"ui-controlgroup-item")},_callChildMethod:function(t){this.childWidgets.each(function(){var e=x(this).data("ui-controlgroup-data");e&&e[t]&&e[t]()})},_updateCornerClass:function(e,t){var n=this._buildSimpleOptions(t,"label").classes.label;this._removeClass(e,null,"ui-corner-top ui-corner-bottom ui-corner-left ui-corner-right ui-corner-all"),this._addClass(e,null,n)},_buildSimpleOptions:function(e,t){var n="vertical"===this.options.direction,r={classes:{}};return r.classes[t]={middle:"",first:"ui-corner-"+(n?"top":"left"),last:"ui-corner-"+(n?"bottom":"right"),only:"ui-corner-all"}[e],r},_spinnerOptions:function(e){var t=this._buildSimpleOptions(e,"ui-spinner");return t.classes["ui-spinner-up"]="",t.classes["ui-spinner-down"]="",t},_buttonOptions:function(e){return this._buildSimpleOptions(e,"ui-button")},_checkboxradioOptions:function(e){return this._buildSimpleOptions(e,"ui-checkboxradio-label")},_selectmenuOptions:function(e){var t="vertical"===this.options.direction;return{width:!!t&&"auto",classes:{middle:{"ui-selectmenu-button-open":"","ui-selectmenu-button-closed":""},first:{"ui-selectmenu-button-open":"ui-corner-"+(t?"top":"tl"),"ui-selectmenu-button-closed":"ui-corner-"+(t?"top":"left")},last:{"ui-selectmenu-button-open":t?"":"ui-corner-tr","ui-selectmenu-button-closed":"ui-corner-"+(t?"bottom":"right")},only:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"}}[e]}},_resolveClassesValues:function(n,r){var i={};return x.each(n,function(e){var t=r.options.classes[e]||"";t=x.trim(t.replace(o,"")),i[e]=(t+" "+n[e]).replace(/\s+/g," ")}),i},_setOption:function(e,t){"direction"===e&&this._removeClass("ui-controlgroup-"+this.options.direction),this._super(e,t),"disabled"!==e?this.refresh():this._callChildMethod(t?"disable":"enable")},refresh:function(){var i,a=this;this._addClass("ui-controlgroup ui-controlgroup-"+this.options.direction),"horizontal"===this.options.direction&&this._addClass(null,"ui-helper-clearfix"),this._initWidgets(),i=this.childWidgets,this.options.onlyVisible&&(i=i.filter(":visible")),i.length&&(x.each(["first","last"],function(e,t){var n=i[t]().data("ui-controlgroup-data");if(n&&a["_"+n.widgetName+"Options"]){var r=a["_"+n.widgetName+"Options"](1===i.length?"only":t);r.classes=a._resolveClassesValues(r.classes,n),n.element[n.widgetName](r)}else a._updateCornerClass(i[t](),t)}),this._callChildMethod("refresh"))}});x.widget("ui.checkboxradio",[x.ui.formResetMixin,{version:"1.12.1",options:{disabled:null,label:null,icon:!0,classes:{"ui-checkboxradio-label":"ui-corner-all","ui-checkboxradio-icon":"ui-corner-all"}},_getCreateOptions:function(){var e,t,n=this,r=this._super()||{};return this._readType(),t=this.element.labels(),this.label=x(t[t.length-1]),this.label.length||x.error("No label found for checkboxradio widget"),this.originalLabel="",this.label.contents().not(this.element[0]).each(function(){n.originalLabel+=3===this.nodeType?x(this).text():this.outerHTML}),this.originalLabel&&(r.label=this.originalLabel),null!=(e=this.element[0].disabled)&&(r.disabled=e),r},_create:function(){var e=this.element[0].checked;this._bindFormResetHandler(),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled),this._setOption("disabled",this.options.disabled),this._addClass("ui-checkboxradio","ui-helper-hidden-accessible"),this._addClass(this.label,"ui-checkboxradio-label","ui-button ui-widget"),"radio"===this.type&&this._addClass(this.label,"ui-checkboxradio-radio-label"),this.options.label&&this.options.label!==this.originalLabel?this._updateLabel():this.originalLabel&&(this.options.label=this.originalLabel),this._enhance(),e&&(this._addClass(this.label,"ui-checkboxradio-checked","ui-state-active"),this.icon&&this._addClass(this.icon,null,"ui-state-hover")),this._on({change:"_toggleClasses",focus:function(){this._addClass(this.label,null,"ui-state-focus ui-visual-focus")},blur:function(){this._removeClass(this.label,null,"ui-state-focus ui-visual-focus")}})},_readType:function(){var e=this.element[0].nodeName.toLowerCase();this.type=this.element[0].type,"input"===e&&/radio|checkbox/.test(this.type)||x.error("Can't create checkboxradio on element.nodeName="+e+" and element.type="+this.type)},_enhance:function(){this._updateIcon(this.element[0].checked)},widget:function(){return this.label},_getRadioGroup:function(){var e=this.element[0].name,t="input[name='"+x.ui.escapeSelector(e)+"']";return e?(this.form.length?x(this.form[0].elements).filter(t):x(t).filter(function(){return 0===x(this).form().length})).not(this.element):x([])},_toggleClasses:function(){var e=this.element[0].checked;this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),this.options.icon&&"checkbox"===this.type&&this._toggleClass(this.icon,null,"ui-icon-check ui-state-checked",e)._toggleClass(this.icon,null,"ui-icon-blank",!e),"radio"===this.type&&this._getRadioGroup().each(function(){var e=x(this).checkboxradio("instance");e&&e._removeClass(e.label,"ui-checkboxradio-checked","ui-state-active")})},_destroy:function(){this._unbindFormResetHandler(),this.icon&&(this.icon.remove(),this.iconSpace.remove())},_setOption:function(e,t){if("label"!==e||t){if(this._super(e,t),"disabled"===e)return this._toggleClass(this.label,null,"ui-state-disabled",t),void(this.element[0].disabled=t);this.refresh()}},_updateIcon:function(e){var t="ui-icon ui-icon-background ";this.options.icon?(this.icon||(this.icon=x("<span>"),this.iconSpace=x("<span> </span>"),this._addClass(this.iconSpace,"ui-checkboxradio-icon-space")),"checkbox"===this.type?(t+=e?"ui-icon-check ui-state-checked":"ui-icon-blank",this._removeClass(this.icon,null,e?"ui-icon-blank":"ui-icon-check")):t+="ui-icon-blank",this._addClass(this.icon,"ui-checkboxradio-icon",t),e||this._removeClass(this.icon,null,"ui-icon-check ui-state-checked"),this.icon.prependTo(this.label).after(this.iconSpace)):void 0!==this.icon&&(this.icon.remove(),this.iconSpace.remove(),delete this.icon)},_updateLabel:function(){var e=this.label.contents().not(this.element[0]);this.icon&&(e=e.not(this.icon[0])),this.iconSpace&&(e=e.not(this.iconSpace[0])),e.remove(),this.label.append(this.options.label)},refresh:function(){var e=this.element[0].checked,t=this.element[0].disabled;this._updateIcon(e),this._toggleClass(this.label,"ui-checkboxradio-checked","ui-state-active",e),null!==this.options.label&&this._updateLabel(),t!==this.options.disabled&&this._setOptions({disabled:t})}}]);var d;x.ui.checkboxradio;x.widget("ui.button",{version:"1.12.1",defaultElement:"<button>",options:{classes:{"ui-button":"ui-corner-all"},disabled:null,icon:null,iconPosition:"beginning",label:null,showLabel:!0},_getCreateOptions:function(){var e,t=this._super()||{};return this.isInput=this.element.is("input"),null!=(e=this.element[0].disabled)&&(t.disabled=e),this.originalLabel=this.isInput?this.element.val():this.element.html(),this.originalLabel&&(t.label=this.originalLabel),t},_create:function(){!this.option.showLabel&!this.options.icon&&(this.options.showLabel=!0),null==this.options.disabled&&(this.options.disabled=this.element[0].disabled||!1),this.hasTitle=!!this.element.attr("title"),this.options.label&&this.options.label!==this.originalLabel&&(this.isInput?this.element.val(this.options.label):this.element.html(this.options.label)),this._addClass("ui-button","ui-widget"),this._setOption("disabled",this.options.disabled),this._enhance(),this.element.is("a")&&this._on({keyup:function(e){e.keyCode===x.ui.keyCode.SPACE&&(e.preventDefault(),this.element[0].click?this.element[0].click():this.element.trigger("click"))}})},_enhance:function(){this.element.is("button")||this.element.attr("role","button"),this.options.icon&&(this._updateIcon("icon",this.options.icon),this._updateTooltip())},_updateTooltip:function(){this.title=this.element.attr("title"),this.options.showLabel||this.title||this.element.attr("title",this.options.label)},_updateIcon:function(e,t){var n="iconPosition"!==e,r=n?this.options.iconPosition:t,i="top"===r||"bottom"===r;this.icon?n&&this._removeClass(this.icon,null,this.options.icon):(this.icon=x("<span>"),this._addClass(this.icon,"ui-button-icon","ui-icon"),this.options.showLabel||this._addClass("ui-button-icon-only")),n&&this._addClass(this.icon,null,t),this._attachIcon(r),i?(this._addClass(this.icon,null,"ui-widget-icon-block"),this.iconSpace&&this.iconSpace.remove()):(this.iconSpace||(this.iconSpace=x("<span> </span>"),this._addClass(this.iconSpace,"ui-button-icon-space")),this._removeClass(this.icon,null,"ui-wiget-icon-block"),this._attachIconSpace(r))},_destroy:function(){this.element.removeAttr("role"),this.icon&&this.icon.remove(),this.iconSpace&&this.iconSpace.remove(),this.hasTitle||this.element.removeAttr("title")},_attachIconSpace:function(e){this.icon[/^(?:end|bottom)/.test(e)?"before":"after"](this.iconSpace)},_attachIcon:function(e){this.element[/^(?:end|bottom)/.test(e)?"append":"prepend"](this.icon)},_setOptions:function(e){var t=void 0===e.showLabel?this.options.showLabel:e.showLabel,n=void 0===e.icon?this.options.icon:e.icon;t||n||(e.showLabel=!0),this._super(e)},_setOption:function(e,t){"icon"===e&&(t?this._updateIcon(e,t):this.icon&&(this.icon.remove(),this.iconSpace&&this.iconSpace.remove())),"iconPosition"===e&&this._updateIcon(e,t),"showLabel"===e&&(this._toggleClass("ui-button-icon-only",null,!t),this._updateTooltip()),"label"===e&&(this.isInput?this.element.val(t):(this.element.html(t),this.icon&&(this._attachIcon(this.options.iconPosition),this._attachIconSpace(this.options.iconPosition)))),this._super(e,t),"disabled"===e&&(this._toggleClass(null,"ui-state-disabled",t),(this.element[0].disabled=t)&&this.element.blur())},refresh:function(){var e=this.element.is("input, button")?this.element[0].disabled:this.element.hasClass("ui-button-disabled");e!==this.options.disabled&&this._setOptions({disabled:e}),this._updateTooltip()}}),!1!==x.uiBackCompat&&(x.widget("ui.button",x.ui.button,{options:{text:!0,icons:{primary:null,secondary:null}},_create:function(){this.options.showLabel&&!this.options.text&&(this.options.showLabel=this.options.text),!this.options.showLabel&&this.options.text&&(this.options.text=this.options.showLabel),this.options.icon||!this.options.icons.primary&&!this.options.icons.secondary?this.options.icon&&(this.options.icons.primary=this.options.icon):this.options.icons.primary?this.options.icon=this.options.icons.primary:(this.options.icon=this.options.icons.secondary,this.options.iconPosition="end"),this._super()},_setOption:function(e,t){"text"!==e?("showLabel"===e&&(this.options.text=t),"icon"===e&&(this.options.icons.primary=t),"icons"===e&&(t.primary?(this._super("icon",t.primary),this._super("iconPosition","beginning")):t.secondary&&(this._super("icon",t.secondary),this._super("iconPosition","end"))),this._superApply(arguments)):this._super("showLabel",t)}}),x.fn.button=(d=x.fn.button,function(){return!this.length||this.length&&"INPUT"!==this[0].tagName||this.length&&"INPUT"===this[0].tagName&&"checkbox"!==this.attr("type")&&"radio"!==this.attr("type")?d.apply(this,arguments):(x.ui.checkboxradio||x.error("Checkboxradio widget missing"),0===arguments.length?this.checkboxradio({icon:!1}):this.checkboxradio.apply(this,arguments))}),x.fn.buttonset=function(){return x.ui.controlgroup||x.error("Controlgroup widget missing"),"option"===arguments[0]&&"items"===arguments[1]&&arguments[2]?this.controlgroup.apply(this,[arguments[0],"items.button",arguments[2]]):"option"===arguments[0]&&"items"===arguments[1]?this.controlgroup.apply(this,[arguments[0],"items.button"]):("object"==typeof arguments[0]&&arguments[0].items&&(arguments[0].items={button:arguments[0].items}),this.controlgroup.apply(this,arguments))});var h;x.ui.button;function p(){this._curInst=null,this._keyEvent=!1,this._disabledInputs=[],this._datepickerShowing=!1,this._inDialog=!1,this._mainDivId="ui-datepicker-div",this._inlineClass="ui-datepicker-inline",this._appendClass="ui-datepicker-append",this._triggerClass="ui-datepicker-trigger",this._dialogClass="ui-datepicker-dialog",this._disableClass="ui-datepicker-disabled",this._unselectableClass="ui-datepicker-unselectable",this._currentClass="ui-datepicker-current-day",this._dayOverClass="ui-datepicker-days-cell-over",this.regional=[],this.regional[""]={closeText:"Done",prevText:"Prev",nextText:"Next",currentText:"Today",monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNamesShort:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],dayNamesShort:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],dayNamesMin:["Su","Mo","Tu","We","Th","Fr","Sa"],weekHeader:"Wk",dateFormat:"mm/dd/yy",firstDay:0,isRTL:!1,showMonthAfterYear:!1,yearSuffix:""},this._defaults={showOn:"focus",showAnim:"fadeIn",showOptions:{},defaultDate:null,appendText:"",buttonText:"...",buttonImage:"",buttonImageOnly:!1,hideIfNoPrevNext:!1,navigationAsDateFormat:!1,gotoCurrent:!1,changeMonth:!1,changeYear:!1,yearRange:"c-10:c+10",showOtherMonths:!1,selectOtherMonths:!1,showWeek:!1,calculateWeek:this.iso8601Week,shortYearCutoff:"+10",minDate:null,maxDate:null,duration:"fast",beforeShowDay:null,beforeShow:null,onSelect:null,onChangeMonthYear:null,onClose:null,numberOfMonths:1,showCurrentAtPos:0,stepMonths:1,stepBigMonths:12,altField:"",altFormat:"",constrainInput:!0,showButtonPanel:!1,autoSize:!1,disabled:!1},x.extend(this._defaults,this.regional[""]),this.regional.en=x.extend(!0,{},this.regional[""]),this.regional["en-US"]=x.extend(!0,{},this.regional.en),this.dpDiv=m(x("<div id='"+this._mainDivId+"' class='ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>"))}function m(e){var t="button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a";return e.on("mouseout",t,function(){x(this).removeClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&x(this).removeClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&x(this).removeClass("ui-datepicker-next-hover")}).on("mouseover",t,g)}function g(){x.datepicker._isDisabledDatepicker(h.inline?h.dpDiv.parent()[0]:h.input[0])||(x(this).parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"),x(this).addClass("ui-state-hover"),-1!==this.className.indexOf("ui-datepicker-prev")&&x(this).addClass("ui-datepicker-prev-hover"),-1!==this.className.indexOf("ui-datepicker-next")&&x(this).addClass("ui-datepicker-next-hover"))}function _(e,t){for(var n in x.extend(e,t),t)null==t[n]&&(e[n]=t[n]);return e}x.extend(x.ui,{datepicker:{version:"1.12.1"}}),x.extend(p.prototype,{markerClassName:"hasDatepicker",maxRows:4,_widgetDatepicker:function(){return this.dpDiv},setDefaults:function(e){return _(this._defaults,e||{}),this},_attachDatepicker:function(e,t){var n,r,i;r="div"===(n=e.nodeName.toLowerCase())||"span"===n,e.id||(this.uuid+=1,e.id="dp"+this.uuid),(i=this._newInst(x(e),r)).settings=x.extend({},t||{}),"input"===n?this._connectDatepicker(e,i):r&&this._inlineDatepicker(e,i)},_newInst:function(e,t){return{id:e[0].id.replace(/([^A-Za-z0-9_\-])/g,"\\\\$1"),input:e,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:t,dpDiv:t?m(x("<div class='"+this._inlineClass+" ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all'></div>")):this.dpDiv}},_connectDatepicker:function(e,t){var n=x(e);t.append=x([]),t.trigger=x([]),n.hasClass(this.markerClassName)||(this._attachments(n,t),n.addClass(this.markerClassName).on("keydown",this._doKeyDown).on("keypress",this._doKeyPress).on("keyup",this._doKeyUp),this._autoSize(t),x.data(e,"datepicker",t),t.settings.disabled&&this._disableDatepicker(e))},_attachments:function(e,t){var n,r,i,a=this._get(t,"appendText"),o=this._get(t,"isRTL");t.append&&t.append.remove(),a&&(t.append=x("<span class='"+this._appendClass+"'>"+a+"</span>"),e[o?"before":"after"](t.append)),e.off("focus",this._showDatepicker),t.trigger&&t.trigger.remove(),"focus"!==(n=this._get(t,"showOn"))&&"both"!==n||e.on("focus",this._showDatepicker),"button"!==n&&"both"!==n||(r=this._get(t,"buttonText"),i=this._get(t,"buttonImage"),t.trigger=x(this._get(t,"buttonImageOnly")?x("<img/>").addClass(this._triggerClass).attr({src:i,alt:r,title:r}):x("<button type='button'></button>").addClass(this._triggerClass).html(i?x("<img/>").attr({src:i,alt:r,title:r}):r)),e[o?"before":"after"](t.trigger),t.trigger.on("click",function(){return x.datepicker._datepickerShowing&&x.datepicker._lastInput===e[0]?x.datepicker._hideDatepicker():(x.datepicker._datepickerShowing&&x.datepicker._lastInput!==e[0]&&x.datepicker._hideDatepicker(),x.datepicker._showDatepicker(e[0])),!1}))},_autoSize:function(e){if(this._get(e,"autoSize")&&!e.inline){var t,n,r,i,a=new Date(2009,11,20),o=this._get(e,"dateFormat");o.match(/[DM]/)&&(t=function(e){for(i=r=n=0;i<e.length;i++)e[i].length>n&&(n=e[i].length,r=i);return r},a.setMonth(t(this._get(e,o.match(/MM/)?"monthNames":"monthNamesShort"))),a.setDate(t(this._get(e,o.match(/DD/)?"dayNames":"dayNamesShort"))+20-a.getDay())),e.input.attr("size",this._formatDate(e,a).length)}},_inlineDatepicker:function(e,t){var n=x(e);n.hasClass(this.markerClassName)||(n.addClass(this.markerClassName).append(t.dpDiv),x.data(e,"datepicker",t),this._setDate(t,this._getDefaultDate(t),!0),this._updateDatepicker(t),this._updateAlternate(t),t.settings.disabled&&this._disableDatepicker(e),t.dpDiv.css("display","block"))},_dialogDatepicker:function(e,t,n,r,i){var a,o,s,c,l,u=this._dialogInst;return u||(this.uuid+=1,a="dp"+this.uuid,this._dialogInput=x("<input type='text' id='"+a+"' style='position: absolute; top: -100px; width: 0px;'/>"),this._dialogInput.on("keydown",this._doKeyDown),x("body").append(this._dialogInput),(u=this._dialogInst=this._newInst(this._dialogInput,!1)).settings={},x.data(this._dialogInput[0],"datepicker",u)),_(u.settings,r||{}),t=t&&t.constructor===Date?this._formatDate(u,t):t,this._dialogInput.val(t),this._pos=i?i.length?i:[i.pageX,i.pageY]:null,this._pos||(o=document.documentElement.clientWidth,s=document.documentElement.clientHeight,c=document.documentElement.scrollLeft||document.body.scrollLeft,l=document.documentElement.scrollTop||document.body.scrollTop,this._pos=[o/2-100+c,s/2-150+l]),this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px"),u.settings.onSelect=n,this._inDialog=!0,this.dpDiv.addClass(this._dialogClass),this._showDatepicker(this._dialogInput[0]),x.blockUI&&x.blockUI(this.dpDiv),x.data(this._dialogInput[0],"datepicker",u),this},_destroyDatepicker:function(e){var t,n=x(e),r=x.data(e,"datepicker");n.hasClass(this.markerClassName)&&(t=e.nodeName.toLowerCase(),x.removeData(e,"datepicker"),"input"===t?(r.append.remove(),r.trigger.remove(),n.removeClass(this.markerClassName).off("focus",this._showDatepicker).off("keydown",this._doKeyDown).off("keypress",this._doKeyPress).off("keyup",this._doKeyUp)):"div"!==t&&"span"!==t||n.removeClass(this.markerClassName).empty(),h===r&&(h=null))},_enableDatepicker:function(t){var e,n,r=x(t),i=x.data(t,"datepicker");r.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!1,i.trigger.filter("button").each(function(){this.disabled=!1}).end().filter("img").css({opacity:"1.0",cursor:""})):"div"!==e&&"span"!==e||((n=r.children("."+this._inlineClass)).children().removeClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!1)),this._disabledInputs=x.map(this._disabledInputs,function(e){return e===t?null:e}))},_disableDatepicker:function(t){var e,n,r=x(t),i=x.data(t,"datepicker");r.hasClass(this.markerClassName)&&("input"===(e=t.nodeName.toLowerCase())?(t.disabled=!0,i.trigger.filter("button").each(function(){this.disabled=!0}).end().filter("img").css({opacity:"0.5",cursor:"default"})):"div"!==e&&"span"!==e||((n=r.children("."+this._inlineClass)).children().addClass("ui-state-disabled"),n.find("select.ui-datepicker-month, select.ui-datepicker-year").prop("disabled",!0)),this._disabledInputs=x.map(this._disabledInputs,function(e){return e===t?null:e}),this._disabledInputs[this._disabledInputs.length]=t)},_isDisabledDatepicker:function(e){if(!e)return!1;for(var t=0;t<this._disabledInputs.length;t++)if(this._disabledInputs[t]===e)return!0;return!1},_getInst:function(e){try{return x.data(e,"datepicker")}catch(e){throw"Missing instance data for this datepicker"}},_optionDatepicker:function(e,t,n){var r,i,a,o,s=this._getInst(e);if(2===arguments.length&&"string"==typeof t)return"defaults"===t?x.extend({},x.datepicker._defaults):s?"all"===t?x.extend({},s.settings):this._get(s,t):null;r=t||{},"string"==typeof t&&((r={})[t]=n),s&&(this._curInst===s&&this._hideDatepicker(),i=this._getDateDatepicker(e,!0),a=this._getMinMaxDate(s,"min"),o=this._getMinMaxDate(s,"max"),_(s.settings,r),null!==a&&void 0!==r.dateFormat&&void 0===r.minDate&&(s.settings.minDate=this._formatDate(s,a)),null!==o&&void 0!==r.dateFormat&&void 0===r.maxDate&&(s.settings.maxDate=this._formatDate(s,o)),"disabled"in r&&(r.disabled?this._disableDatepicker(e):this._enableDatepicker(e)),this._attachments(x(e),s),this._autoSize(s),this._setDate(s,i),this._updateAlternate(s),this._updateDatepicker(s))},_changeDatepicker:function(e,t,n){this._optionDatepicker(e,t,n)},_refreshDatepicker:function(e){var t=this._getInst(e);t&&this._updateDatepicker(t)},_setDateDatepicker:function(e,t){var n=this._getInst(e);n&&(this._setDate(n,t),this._updateDatepicker(n),this._updateAlternate(n))},_getDateDatepicker:function(e,t){var n=this._getInst(e);return n&&!n.inline&&this._setDateFromField(n,t),n?this._getDate(n):null},_doKeyDown:function(e){var t,n,r,i=x.datepicker._getInst(e.target),a=!0,o=i.dpDiv.is(".ui-datepicker-rtl");if(i._keyEvent=!0,x.datepicker._datepickerShowing)switch(e.keyCode){case 9:x.datepicker._hideDatepicker(),a=!1;break;case 13:return(r=x("td."+x.datepicker._dayOverClass+":not(."+x.datepicker._currentClass+")",i.dpDiv))[0]&&x.datepicker._selectDay(e.target,i.selectedMonth,i.selectedYear,r[0]),(t=x.datepicker._get(i,"onSelect"))?(n=x.datepicker._formatDate(i),t.apply(i.input?i.input[0]:null,[n,i])):x.datepicker._hideDatepicker(),!1;case 27:x.datepicker._hideDatepicker();break;case 33:x.datepicker._adjustDate(e.target,e.ctrlKey?-x.datepicker._get(i,"stepBigMonths"):-x.datepicker._get(i,"stepMonths"),"M");break;case 34:x.datepicker._adjustDate(e.target,e.ctrlKey?+x.datepicker._get(i,"stepBigMonths"):+x.datepicker._get(i,"stepMonths"),"M");break;case 35:(e.ctrlKey||e.metaKey)&&x.datepicker._clearDate(e.target),a=e.ctrlKey||e.metaKey;break;case 36:(e.ctrlKey||e.metaKey)&&x.datepicker._gotoToday(e.target),a=e.ctrlKey||e.metaKey;break;case 37:(e.ctrlKey||e.metaKey)&&x.datepicker._adjustDate(e.target,o?1:-1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&x.datepicker._adjustDate(e.target,e.ctrlKey?-x.datepicker._get(i,"stepBigMonths"):-x.datepicker._get(i,"stepMonths"),"M");break;case 38:(e.ctrlKey||e.metaKey)&&x.datepicker._adjustDate(e.target,-7,"D"),a=e.ctrlKey||e.metaKey;break;case 39:(e.ctrlKey||e.metaKey)&&x.datepicker._adjustDate(e.target,o?-1:1,"D"),a=e.ctrlKey||e.metaKey,e.originalEvent.altKey&&x.datepicker._adjustDate(e.target,e.ctrlKey?+x.datepicker._get(i,"stepBigMonths"):+x.datepicker._get(i,"stepMonths"),"M");break;case 40:(e.ctrlKey||e.metaKey)&&x.datepicker._adjustDate(e.target,7,"D"),a=e.ctrlKey||e.metaKey;break;default:a=!1}else 36===e.keyCode&&e.ctrlKey?x.datepicker._showDatepicker(this):a=!1;a&&(e.preventDefault(),e.stopPropagation())},_doKeyPress:function(e){var t,n,r=x.datepicker._getInst(e.target);if(x.datepicker._get(r,"constrainInput"))return t=x.datepicker._possibleChars(x.datepicker._get(r,"dateFormat")),n=String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),e.ctrlKey||e.metaKey||n<" "||!t||-1<t.indexOf(n)},_doKeyUp:function(e){var t=x.datepicker._getInst(e.target);if(t.input.val()!==t.lastVal)try{x.datepicker.parseDate(x.datepicker._get(t,"dateFormat"),t.input?t.input.val():null,x.datepicker._getFormatConfig(t))&&(x.datepicker._setDateFromField(t),x.datepicker._updateAlternate(t),x.datepicker._updateDatepicker(t))}catch(e){}return!0},_showDatepicker:function(e){var t,n,r,i,a,o,s;("input"!==(e=e.target||e).nodeName.toLowerCase()&&(e=x("input",e.parentNode)[0]),x.datepicker._isDisabledDatepicker(e)||x.datepicker._lastInput===e)||(t=x.datepicker._getInst(e),x.datepicker._curInst&&x.datepicker._curInst!==t&&(x.datepicker._curInst.dpDiv.stop(!0,!0),t&&x.datepicker._datepickerShowing&&x.datepicker._hideDatepicker(x.datepicker._curInst.input[0])),!1!==(r=(n=x.datepicker._get(t,"beforeShow"))?n.apply(e,[e,t]):{})&&(_(t.settings,r),t.lastVal=null,x.datepicker._lastInput=e,x.datepicker._setDateFromField(t),x.datepicker._inDialog&&(e.value=""),x.datepicker._pos||(x.datepicker._pos=x.datepicker._findPos(e),x.datepicker._pos[1]+=e.offsetHeight),i=!1,x(e).parents().each(function(){return!(i|="fixed"===x(this).css("position"))}),a={left:x.datepicker._pos[0],top:x.datepicker._pos[1]},x.datepicker._pos=null,t.dpDiv.empty(),t.dpDiv.css({position:"absolute",display:"block",top:"-1000px"}),x.datepicker._updateDatepicker(t),a=x.datepicker._checkOffset(t,a,i),t.dpDiv.css({position:x.datepicker._inDialog&&x.blockUI?"static":i?"fixed":"absolute",display:"none",left:a.left+"px",top:a.top+"px"}),t.inline||(o=x.datepicker._get(t,"showAnim"),s=x.datepicker._get(t,"duration"),t.dpDiv.css("z-index",function(e){for(var t,n;e.length&&e[0]!==document;){if(("absolute"===(t=e.css("position"))||"relative"===t||"fixed"===t)&&(n=parseInt(e.css("zIndex"),10),!isNaN(n)&&0!==n))return n;e=e.parent()}return 0}(x(e))+1),x.datepicker._datepickerShowing=!0,x.effects&&x.effects.effect[o]?t.dpDiv.show(o,x.datepicker._get(t,"showOptions"),s):t.dpDiv[o||"show"](o?s:null),x.datepicker._shouldFocusInput(t)&&t.input.trigger("focus"),x.datepicker._curInst=t)))},_updateDatepicker:function(e){this.maxRows=4,(h=e).dpDiv.empty().append(this._generateHTML(e)),this._attachHandlers(e);var t,n=this._getNumberOfMonths(e),r=n[1],i=e.dpDiv.find("."+this._dayOverClass+" a");0<i.length&&g.apply(i.get(0)),e.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width(""),1<r&&e.dpDiv.addClass("ui-datepicker-multi-"+r).css("width",17*r+"em"),e.dpDiv[(1!==n[0]||1!==n[1]?"add":"remove")+"Class"]("ui-datepicker-multi"),e.dpDiv[(this._get(e,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl"),e===x.datepicker._curInst&&x.datepicker._datepickerShowing&&x.datepicker._shouldFocusInput(e)&&e.input.trigger("focus"),e.yearshtml&&(t=e.yearshtml,setTimeout(function(){t===e.yearshtml&&e.yearshtml&&e.dpDiv.find("select.ui-datepicker-year:first").replaceWith(e.yearshtml),t=e.yearshtml=null},0))},_shouldFocusInput:function(e){return e.input&&e.input.is(":visible")&&!e.input.is(":disabled")&&!e.input.is(":focus")},_checkOffset:function(e,t,n){var r=e.dpDiv.outerWidth(),i=e.dpDiv.outerHeight(),a=e.input?e.input.outerWidth():0,o=e.input?e.input.outerHeight():0,s=document.documentElement.clientWidth+(n?0:x(document).scrollLeft()),c=document.documentElement.clientHeight+(n?0:x(document).scrollTop());return t.left-=this._get(e,"isRTL")?r-a:0,t.left-=n&&t.left===e.input.offset().left?x(document).scrollLeft():0,t.top-=n&&t.top===e.input.offset().top+o?x(document).scrollTop():0,t.left-=Math.min(t.left,t.left+r>s&&r<s?Math.abs(t.left+r-s):0),t.top-=Math.min(t.top,t.top+i>c&&i<c?Math.abs(i+o):0),t},_findPos:function(e){for(var t,n=this._getInst(e),r=this._get(n,"isRTL");e&&("hidden"===e.type||1!==e.nodeType||x.expr.filters.hidden(e));)e=e[r?"previousSibling":"nextSibling"];return[(t=x(e).offset()).left,t.top]},_hideDatepicker:function(e){var t,n,r,i,a=this._curInst;!a||e&&a!==x.data(e,"datepicker")||this._datepickerShowing&&(t=this._get(a,"showAnim"),n=this._get(a,"duration"),r=function(){x.datepicker._tidyDialog(a)},x.effects&&(x.effects.effect[t]||x.effects[t])?a.dpDiv.hide(t,x.datepicker._get(a,"showOptions"),n,r):a.dpDiv["slideDown"===t?"slideUp":"fadeIn"===t?"fadeOut":"hide"](t?n:null,r),t||r(),this._datepickerShowing=!1,(i=this._get(a,"onClose"))&&i.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a]),this._lastInput=null,this._inDialog&&(this._dialogInput.css({position:"absolute",left:"0",top:"-100px"}),x.blockUI&&(x.unblockUI(),x("body").append(this.dpDiv))),this._inDialog=!1)},_tidyDialog:function(e){e.dpDiv.removeClass(this._dialogClass).off(".ui-datepicker-calendar")},_checkExternalClick:function(e){if(x.datepicker._curInst){var t=x(e.target),n=x.datepicker._getInst(t[0]);(t[0].id===x.datepicker._mainDivId||0!==t.parents("#"+x.datepicker._mainDivId).length||t.hasClass(x.datepicker.markerClassName)||t.closest("."+x.datepicker._triggerClass).length||!x.datepicker._datepickerShowing||x.datepicker._inDialog&&x.blockUI)&&(!t.hasClass(x.datepicker.markerClassName)||x.datepicker._curInst===n)||x.datepicker._hideDatepicker()}},_adjustDate:function(e,t,n){var r=x(e),i=this._getInst(r[0]);this._isDisabledDatepicker(r[0])||(this._adjustInstDate(i,t+("M"===n?this._get(i,"showCurrentAtPos"):0),n),this._updateDatepicker(i))},_gotoToday:function(e){var t,n=x(e),r=this._getInst(n[0]);this._get(r,"gotoCurrent")&&r.currentDay?(r.selectedDay=r.currentDay,r.drawMonth=r.selectedMonth=r.currentMonth,r.drawYear=r.selectedYear=r.currentYear):(t=new Date,r.selectedDay=t.getDate(),r.drawMonth=r.selectedMonth=t.getMonth(),r.drawYear=r.selectedYear=t.getFullYear()),this._notifyChange(r),this._adjustDate(n)},_selectMonthYear:function(e,t,n){var r=x(e),i=this._getInst(r[0]);i["selected"+("M"===n?"Month":"Year")]=i["draw"+("M"===n?"Month":"Year")]=parseInt(t.options[t.selectedIndex].value,10),this._notifyChange(i),this._adjustDate(r)},_selectDay:function(e,t,n,r){var i,a=x(e);x(r).hasClass(this._unselectableClass)||this._isDisabledDatepicker(a[0])||((i=this._getInst(a[0])).selectedDay=i.currentDay=x("a",r).html(),i.selectedMonth=i.currentMonth=t,i.selectedYear=i.currentYear=n,this._selectDate(e,this._formatDate(i,i.currentDay,i.currentMonth,i.currentYear)))},_clearDate:function(e){var t=x(e);this._selectDate(t,"")},_selectDate:function(e,t){var n,r=x(e),i=this._getInst(r[0]);t=null!=t?t:this._formatDate(i),i.input&&i.input.val(t),this._updateAlternate(i),(n=this._get(i,"onSelect"))?n.apply(i.input?i.input[0]:null,[t,i]):i.input&&i.input.trigger("change"),i.inline?this._updateDatepicker(i):(this._hideDatepicker(),this._lastInput=i.input[0],"object"!=typeof i.input[0]&&i.input.trigger("focus"),this._lastInput=null)},_updateAlternate:function(e){var t,n,r,i=this._get(e,"altField");i&&(t=this._get(e,"altFormat")||this._get(e,"dateFormat"),n=this._getDate(e),r=this.formatDate(t,n,this._getFormatConfig(e)),x(i).val(r))},noWeekends:function(e){var t=e.getDay();return[0<t&&t<6,""]},iso8601Week:function(e){var t,n=new Date(e.getTime());return n.setDate(n.getDate()+4-(n.getDay()||7)),t=n.getTime(),n.setMonth(0),n.setDate(1),Math.floor(Math.round((t-n)/864e5)/7)+1},parseDate:function(n,a,e){if(null==n||null==a)throw"Invalid arguments";if(""===(a="object"==typeof a?a.toString():a+""))return null;var r,t,i,o,s=0,c=(e?e.shortYearCutoff:null)||this._defaults.shortYearCutoff,l="string"!=typeof c?c:(new Date).getFullYear()%100+parseInt(c,10),u=(e?e.dayNamesShort:null)||this._defaults.dayNamesShort,f=(e?e.dayNames:null)||this._defaults.dayNames,d=(e?e.monthNamesShort:null)||this._defaults.monthNamesShort,h=(e?e.monthNames:null)||this._defaults.monthNames,p=-1,m=-1,g=-1,_=-1,b=!1,v=function(e){var t=r+1<n.length&&n.charAt(r+1)===e;return t&&r++,t},y=function(e){var t=v(e),n="@"===e?14:"!"===e?20:"y"===e&&t?4:"o"===e?3:2,r=new RegExp("^\\d{"+("y"===e?n:1)+","+n+"}"),i=a.substring(s).match(r);if(!i)throw"Missing number at position "+s;return s+=i[0].length,parseInt(i[0],10)},w=function(e,t,n){var r=-1,i=x.map(v(e)?n:t,function(e,t){return[[t,e]]}).sort(function(e,t){return-(e[1].length-t[1].length)});if(x.each(i,function(e,t){var n=t[1];if(a.substr(s,n.length).toLowerCase()===n.toLowerCase())return r=t[0],s+=n.length,!1}),-1!==r)return r+1;throw"Unknown name at position "+s},C=function(){if(a.charAt(s)!==n.charAt(r))throw"Unexpected literal at position "+s;s++};for(r=0;r<n.length;r++)if(b)"'"!==n.charAt(r)||v("'")?C():b=!1;else switch(n.charAt(r)){case"d":g=y("d");break;case"D":w("D",u,f);break;case"o":_=y("o");break;case"m":m=y("m");break;case"M":m=w("M",d,h);break;case"y":p=y("y");break;case"@":p=(o=new Date(y("@"))).getFullYear(),m=o.getMonth()+1,g=o.getDate();break;case"!":p=(o=new Date((y("!")-this._ticksTo1970)/1e4)).getFullYear(),m=o.getMonth()+1,g=o.getDate();break;case"'":v("'")?C():b=!0;break;default:C()}if(s<a.length&&(i=a.substr(s),!/^\s+/.test(i)))throw"Extra/unparsed characters found in date: "+i;if(-1===p?p=(new Date).getFullYear():p<100&&(p+=(new Date).getFullYear()-(new Date).getFullYear()%100+(p<=l?0:-100)),-1<_)for(m=1,g=_;;){if(g<=(t=this._getDaysInMonth(p,m-1)))break;m++,g-=t}if((o=this._daylightSavingAdjust(new Date(p,m-1,g))).getFullYear()!==p||o.getMonth()+1!==m||o.getDate()!==g)throw"Invalid date";return o},ATOM:"yy-mm-dd",COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:24*(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*60*60*1e7,formatDate:function(n,e,t){if(!e)return"";var r,i=(t?t.dayNamesShort:null)||this._defaults.dayNamesShort,a=(t?t.dayNames:null)||this._defaults.dayNames,o=(t?t.monthNamesShort:null)||this._defaults.monthNamesShort,s=(t?t.monthNames:null)||this._defaults.monthNames,c=function(e){var t=r+1<n.length&&n.charAt(r+1)===e;return t&&r++,t},l=function(e,t,n){var r=""+t;if(c(e))for(;r.length<n;)r="0"+r;return r},u=function(e,t,n,r){return c(e)?r[t]:n[t]},f="",d=!1;if(e)for(r=0;r<n.length;r++)if(d)"'"!==n.charAt(r)||c("'")?f+=n.charAt(r):d=!1;else switch(n.charAt(r)){case"d":f+=l("d",e.getDate(),2);break;case"D":f+=u("D",e.getDay(),i,a);break;case"o":f+=l("o",Math.round((new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()-new Date(e.getFullYear(),0,0).getTime())/864e5),3);break;case"m":f+=l("m",e.getMonth()+1,2);break;case"M":f+=u("M",e.getMonth(),o,s);break;case"y":f+=c("y")?e.getFullYear():(e.getFullYear()%100<10?"0":"")+e.getFullYear()%100;break;case"@":f+=e.getTime();break;case"!":f+=1e4*e.getTime()+this._ticksTo1970;break;case"'":c("'")?f+="'":d=!0;break;default:f+=n.charAt(r)}return f},_possibleChars:function(n){var r,e="",t=!1,i=function(e){var t=r+1<n.length&&n.charAt(r+1)===e;return t&&r++,t};for(r=0;r<n.length;r++)if(t)"'"!==n.charAt(r)||i("'")?e+=n.charAt(r):t=!1;else switch(n.charAt(r)){case"d":case"m":case"y":case"@":e+="0123456789";break;case"D":case"M":return null;case"'":i("'")?e+="'":t=!0;break;default:e+=n.charAt(r)}return e},_get:function(e,t){return void 0!==e.settings[t]?e.settings[t]:this._defaults[t]},_setDateFromField:function(e,t){if(e.input.val()!==e.lastVal){var n=this._get(e,"dateFormat"),r=e.lastVal=e.input?e.input.val():null,i=this._getDefaultDate(e),a=i,o=this._getFormatConfig(e);try{a=this.parseDate(n,r,o)||i}catch(e){r=t?"":r}e.selectedDay=a.getDate(),e.drawMonth=e.selectedMonth=a.getMonth(),e.drawYear=e.selectedYear=a.getFullYear(),e.currentDay=r?a.getDate():0,e.currentMonth=r?a.getMonth():0,e.currentYear=r?a.getFullYear():0,this._adjustInstDate(e)}},_getDefaultDate:function(e){return this._restrictMinMax(e,this._determineDate(e,this._get(e,"defaultDate"),new Date))},_determineDate:function(s,e,t){var n,r,i=null==e||""===e?t:"string"==typeof e?function(e){try{return x.datepicker.parseDate(x.datepicker._get(s,"dateFormat"),e,x.datepicker._getFormatConfig(s))}catch(e){}for(var t=(e.toLowerCase().match(/^c/)?x.datepicker._getDate(s):null)||new Date,n=t.getFullYear(),r=t.getMonth(),i=t.getDate(),a=/([+\-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g,o=a.exec(e);o;){switch(o[2]||"d"){case"d":case"D":i+=parseInt(o[1],10);break;case"w":case"W":i+=7*parseInt(o[1],10);break;case"m":case"M":r+=parseInt(o[1],10),i=Math.min(i,x.datepicker._getDaysInMonth(n,r));break;case"y":case"Y":n+=parseInt(o[1],10),i=Math.min(i,x.datepicker._getDaysInMonth(n,r))}o=a.exec(e)}return new Date(n,r,i)}(e):"number"==typeof e?isNaN(e)?t:(n=e,(r=new Date).setDate(r.getDate()+n),r):new Date(e.getTime());return(i=i&&"Invalid Date"===i.toString()?t:i)&&(i.setHours(0),i.setMinutes(0),i.setSeconds(0),i.setMilliseconds(0)),this._daylightSavingAdjust(i)},_daylightSavingAdjust:function(e){return e?(e.setHours(12<e.getHours()?e.getHours()+2:0),e):null},_setDate:function(e,t,n){var r=!t,i=e.selectedMonth,a=e.selectedYear,o=this._restrictMinMax(e,this._determineDate(e,t,new Date));e.selectedDay=e.currentDay=o.getDate(),e.drawMonth=e.selectedMonth=e.currentMonth=o.getMonth(),e.drawYear=e.selectedYear=e.currentYear=o.getFullYear(),i===e.selectedMonth&&a===e.selectedYear||n||this._notifyChange(e),this._adjustInstDate(e),e.input&&e.input.val(r?"":this._formatDate(e))},_getDate:function(e){return!e.currentYear||e.input&&""===e.input.val()?null:this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay))},_attachHandlers:function(e){var t=this._get(e,"stepMonths"),n="#"+e.id.replace(/\\\\/g,"\\");e.dpDiv.find("[data-handler]").map(function(){var e={prev:function(){x.datepicker._adjustDate(n,-t,"M")},next:function(){x.datepicker._adjustDate(n,+t,"M")},hide:function(){x.datepicker._hideDatepicker()},today:function(){x.datepicker._gotoToday(n)},selectDay:function(){return x.datepicker._selectDay(n,+this.getAttribute("data-month"),+this.getAttribute("data-year"),this),!1},selectMonth:function(){return x.datepicker._selectMonthYear(n,this,"M"),!1},selectYear:function(){return x.datepicker._selectMonthYear(n,this,"Y"),!1}};x(this).on(this.getAttribute("data-event"),e[this.getAttribute("data-handler")])})},_generateHTML:function(e){var t,n,r,i,a,o,s,c,l,u,f,d,h,p,m,g,_,b,v,y,w,C,A,S,T,x,k,E,D,I,P,M,$,O,R,N,L,F,G,j=new Date,B=this._daylightSavingAdjust(new Date(j.getFullYear(),j.getMonth(),j.getDate())),U=this._get(e,"isRTL"),H=this._get(e,"showButtonPanel"),W=this._get(e,"hideIfNoPrevNext"),q=this._get(e,"navigationAsDateFormat"),z=this._getNumberOfMonths(e),V=this._get(e,"showCurrentAtPos"),Y=this._get(e,"stepMonths"),K=1!==z[0]||1!==z[1],Q=this._daylightSavingAdjust(e.currentDay?new Date(e.currentYear,e.currentMonth,e.currentDay):new Date(9999,9,9)),X=this._getMinMaxDate(e,"min"),Z=this._getMinMaxDate(e,"max"),J=e.drawMonth-V,ee=e.drawYear;if(J<0&&(J+=12,ee--),Z)for(t=this._daylightSavingAdjust(new Date(Z.getFullYear(),Z.getMonth()-z[0]*z[1]+1,Z.getDate())),t=X&&t<X?X:t;this._daylightSavingAdjust(new Date(ee,J,1))>t;)--J<0&&(J=11,ee--);for(e.drawMonth=J,e.drawYear=ee,n=this._get(e,"prevText"),n=q?this.formatDate(n,this._daylightSavingAdjust(new Date(ee,J-Y,1)),this._getFormatConfig(e)):n,r=this._canAdjustMonth(e,-1,ee,J)?"<a class='ui-datepicker-prev ui-corner-all' data-handler='prev' data-event='click' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(U?"e":"w")+"'>"+n+"</span></a>":W?"":"<a class='ui-datepicker-prev ui-corner-all ui-state-disabled' title='"+n+"'><span class='ui-icon ui-icon-circle-triangle-"+(U?"e":"w")+"'>"+n+"</span></a>",i=this._get(e,"nextText"),i=q?this.formatDate(i,this._daylightSavingAdjust(new Date(ee,J+Y,1)),this._getFormatConfig(e)):i,a=this._canAdjustMonth(e,1,ee,J)?"<a class='ui-datepicker-next ui-corner-all' data-handler='next' data-event='click' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(U?"w":"e")+"'>"+i+"</span></a>":W?"":"<a class='ui-datepicker-next ui-corner-all ui-state-disabled' title='"+i+"'><span class='ui-icon ui-icon-circle-triangle-"+(U?"w":"e")+"'>"+i+"</span></a>",o=this._get(e,"currentText"),s=this._get(e,"gotoCurrent")&&e.currentDay?Q:B,o=q?this.formatDate(o,s,this._getFormatConfig(e)):o,c=e.inline?"":"<button type='button' class='ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all' data-handler='hide' data-event='click'>"+this._get(e,"closeText")+"</button>",l=H?"<div class='ui-datepicker-buttonpane ui-widget-content'>"+(U?c:"")+(this._isInRange(e,s)?"<button type='button' class='ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all' data-handler='today' data-event='click'>"+o+"</button>":"")+(U?"":c)+"</div>":"",u=parseInt(this._get(e,"firstDay"),10),u=isNaN(u)?0:u,f=this._get(e,"showWeek"),d=this._get(e,"dayNames"),h=this._get(e,"dayNamesMin"),p=this._get(e,"monthNames"),m=this._get(e,"monthNamesShort"),g=this._get(e,"beforeShowDay"),_=this._get(e,"showOtherMonths"),b=this._get(e,"selectOtherMonths"),v=this._getDefaultDate(e),y="",C=0;C<z[0];C++){for(A="",this.maxRows=4,S=0;S<z[1];S++){if(T=this._daylightSavingAdjust(new Date(ee,J,e.selectedDay)),x=" ui-corner-all",k="",K){if(k+="<div class='ui-datepicker-group",1<z[1])switch(S){case 0:k+=" ui-datepicker-group-first",x=" ui-corner-"+(U?"right":"left");break;case z[1]-1:k+=" ui-datepicker-group-last",x=" ui-corner-"+(U?"left":"right");break;default:k+=" ui-datepicker-group-middle",x=""}k+="'>"}for(k+="<div class='ui-datepicker-header ui-widget-header ui-helper-clearfix"+x+"'>"+(/all|left/.test(x)&&0===C?U?a:r:"")+(/all|right/.test(x)&&0===C?U?r:a:"")+this._generateMonthYearHeader(e,J,ee,X,Z,0<C||0<S,p,m)+"</div><table class='ui-datepicker-calendar'><thead><tr>",E=f?"<th class='ui-datepicker-week-col'>"+this._get(e,"weekHeader")+"</th>":"",w=0;w<7;w++)E+="<th scope='col'"+(5<=(w+u+6)%7?" class='ui-datepicker-week-end'":"")+"><span title='"+d[D=(w+u)%7]+"'>"+h[D]+"</span></th>";for(k+=E+"</tr></thead><tbody>",I=this._getDaysInMonth(ee,J),ee===e.selectedYear&&J===e.selectedMonth&&(e.selectedDay=Math.min(e.selectedDay,I)),P=(this._getFirstDayOfMonth(ee,J)-u+7)%7,M=Math.ceil((P+I)/7),$=K&&this.maxRows>M?this.maxRows:M,this.maxRows=$,O=this._daylightSavingAdjust(new Date(ee,J,1-P)),R=0;R<$;R++){for(k+="<tr>",N=f?"<td class='ui-datepicker-week-col'>"+this._get(e,"calculateWeek")(O)+"</td>":"",w=0;w<7;w++)L=g?g.apply(e.input?e.input[0]:null,[O]):[!0,""],G=(F=O.getMonth()!==J)&&!b||!L[0]||X&&O<X||Z&&Z<O,N+="<td class='"+(5<=(w+u+6)%7?" ui-datepicker-week-end":"")+(F?" ui-datepicker-other-month":"")+(O.getTime()===T.getTime()&&J===e.selectedMonth&&e._keyEvent||v.getTime()===O.getTime()&&v.getTime()===T.getTime()?" "+this._dayOverClass:"")+(G?" "+this._unselectableClass+" ui-state-disabled":"")+(F&&!_?"":" "+L[1]+(O.getTime()===Q.getTime()?" "+this._currentClass:"")+(O.getTime()===B.getTime()?" ui-datepicker-today":""))+"'"+(F&&!_||!L[2]?"":" title='"+L[2].replace(/'/g,"&#39;")+"'")+(G?"":" data-handler='selectDay' data-event='click' data-month='"+O.getMonth()+"' data-year='"+O.getFullYear()+"'")+">"+(F&&!_?"&#xa0;":G?"<span class='ui-state-default'>"+O.getDate()+"</span>":"<a class='ui-state-default"+(O.getTime()===B.getTime()?" ui-state-highlight":"")+(O.getTime()===Q.getTime()?" ui-state-active":"")+(F?" ui-priority-secondary":"")+"' href='#'>"+O.getDate()+"</a>")+"</td>",O.setDate(O.getDate()+1),O=this._daylightSavingAdjust(O);k+=N+"</tr>"}11<++J&&(J=0,ee++),A+=k+="</tbody></table>"+(K?"</div>"+(0<z[0]&&S===z[1]-1?"<div class='ui-datepicker-row-break'></div>":""):"")}y+=A}return y+=l,e._keyEvent=!1,y},_generateMonthYearHeader:function(e,t,n,r,i,a,o,s){var c,l,u,f,d,h,p,m,g=this._get(e,"changeMonth"),_=this._get(e,"changeYear"),b=this._get(e,"showMonthAfterYear"),v="<div class='ui-datepicker-title'>",y="";if(a||!g)y+="<span class='ui-datepicker-month'>"+o[t]+"</span>";else{for(c=r&&r.getFullYear()===n,l=i&&i.getFullYear()===n,y+="<select class='ui-datepicker-month' data-handler='selectMonth' data-event='change'>",u=0;u<12;u++)(!c||u>=r.getMonth())&&(!l||u<=i.getMonth())&&(y+="<option value='"+u+"'"+(u===t?" selected='selected'":"")+">"+s[u]+"</option>");y+="</select>"}if(b||(v+=y+(!a&&g&&_?"":"&#xa0;")),!e.yearshtml)if(e.yearshtml="",a||!_)v+="<span class='ui-datepicker-year'>"+n+"</span>";else{for(f=this._get(e,"yearRange").split(":"),d=(new Date).getFullYear(),p=(h=function(e){var t=e.match(/c[+\-].*/)?n+parseInt(e.substring(1),10):e.match(/[+\-].*/)?d+parseInt(e,10):parseInt(e,10);return isNaN(t)?d:t})(f[0]),m=Math.max(p,h(f[1]||"")),p=r?Math.max(p,r.getFullYear()):p,m=i?Math.min(m,i.getFullYear()):m,e.yearshtml+="<select class='ui-datepicker-year' data-handler='selectYear' data-event='change'>";p<=m;p++)e.yearshtml+="<option value='"+p+"'"+(p===n?" selected='selected'":"")+">"+p+"</option>";e.yearshtml+="</select>",v+=e.yearshtml,e.yearshtml=null}return v+=this._get(e,"yearSuffix"),b&&(v+=(!a&&g&&_?"":"&#xa0;")+y),v+="</div>"},_adjustInstDate:function(e,t,n){var r=e.selectedYear+("Y"===n?t:0),i=e.selectedMonth+("M"===n?t:0),a=Math.min(e.selectedDay,this._getDaysInMonth(r,i))+("D"===n?t:0),o=this._restrictMinMax(e,this._daylightSavingAdjust(new Date(r,i,a)));e.selectedDay=o.getDate(),e.drawMonth=e.selectedMonth=o.getMonth(),e.drawYear=e.selectedYear=o.getFullYear(),"M"!==n&&"Y"!==n||this._notifyChange(e)},_restrictMinMax:function(e,t){var n=this._getMinMaxDate(e,"min"),r=this._getMinMaxDate(e,"max"),i=n&&t<n?n:t;return r&&r<i?r:i},_notifyChange:function(e){var t=this._get(e,"onChangeMonthYear");t&&t.apply(e.input?e.input[0]:null,[e.selectedYear,e.selectedMonth+1,e])},_getNumberOfMonths:function(e){var t=this._get(e,"numberOfMonths");return null==t?[1,1]:"number"==typeof t?[1,t]:t},_getMinMaxDate:function(e,t){return this._determineDate(e,this._get(e,t+"Date"),null)},_getDaysInMonth:function(e,t){return 32-this._daylightSavingAdjust(new Date(e,t,32)).getDate()},_getFirstDayOfMonth:function(e,t){return new Date(e,t,1).getDay()},_canAdjustMonth:function(e,t,n,r){var i=this._getNumberOfMonths(e),a=this._daylightSavingAdjust(new Date(n,r+(t<0?t:i[0]*i[1]),1));return t<0&&a.setDate(this._getDaysInMonth(a.getFullYear(),a.getMonth())),this._isInRange(e,a)},_isInRange:function(e,t){var n,r,i=this._getMinMaxDate(e,"min"),a=this._getMinMaxDate(e,"max"),o=null,s=null,c=this._get(e,"yearRange");return c&&(n=c.split(":"),r=(new Date).getFullYear(),o=parseInt(n[0],10),s=parseInt(n[1],10),n[0].match(/[+\-].*/)&&(o+=r),n[1].match(/[+\-].*/)&&(s+=r)),(!i||t.getTime()>=i.getTime())&&(!a||t.getTime()<=a.getTime())&&(!o||t.getFullYear()>=o)&&(!s||t.getFullYear()<=s)},_getFormatConfig:function(e){var t=this._get(e,"shortYearCutoff");return{shortYearCutoff:t="string"!=typeof t?t:(new Date).getFullYear()%100+parseInt(t,10),dayNamesShort:this._get(e,"dayNamesShort"),dayNames:this._get(e,"dayNames"),monthNamesShort:this._get(e,"monthNamesShort"),monthNames:this._get(e,"monthNames")}},_formatDate:function(e,t,n,r){t||(e.currentDay=e.selectedDay,e.currentMonth=e.selectedMonth,e.currentYear=e.selectedYear);var i=t?"object"==typeof t?t:this._daylightSavingAdjust(new Date(r,n,t)):this._daylightSavingAdjust(new Date(e.currentYear,e.currentMonth,e.currentDay));return this.formatDate(this._get(e,"dateFormat"),i,this._getFormatConfig(e))}}),x.fn.datepicker=function(e){if(!this.length)return this;x.datepicker.initialized||(x(document).on("mousedown",x.datepicker._checkExternalClick),x.datepicker.initialized=!0),0===x("#"+x.datepicker._mainDivId).length&&x("body").append(x.datepicker.dpDiv);var t=Array.prototype.slice.call(arguments,1);return"string"!=typeof e||"isDisabled"!==e&&"getDate"!==e&&"widget"!==e?"option"===e&&2===arguments.length&&"string"==typeof arguments[1]?x.datepicker["_"+e+"Datepicker"].apply(x.datepicker,[this[0]].concat(t)):this.each(function(){"string"==typeof e?x.datepicker["_"+e+"Datepicker"].apply(x.datepicker,[this].concat(t)):x.datepicker._attachDatepicker(this,e)}):x.datepicker["_"+e+"Datepicker"].apply(x.datepicker,[this[0]].concat(t))},x.datepicker=new p,x.datepicker.initialized=!1,x.datepicker.uuid=(new Date).getTime(),x.datepicker.version="1.12.1";x.datepicker,x.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());var b=!1;x(document).on("mouseup",function(){b=!1});x.widget("ui.mouse",{version:"1.12.1",options:{cancel:"input, textarea, button, select, option",distance:1,delay:0},_mouseInit:function(){var t=this;this.element.on("mousedown."+this.widgetName,function(e){return t._mouseDown(e)}).on("click."+this.widgetName,function(e){if(!0===x.data(e.target,t.widgetName+".preventClickEvent"))return x.removeData(e.target,t.widgetName+".preventClickEvent"),e.stopImmediatePropagation(),!1}),this.started=!1},_mouseDestroy:function(){this.element.off("."+this.widgetName),this._mouseMoveDelegate&&this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate)},_mouseDown:function(e){if(!b){this._mouseMoved=!1,this._mouseStarted&&this._mouseUp(e),this._mouseDownEvent=e;var t=this,n=1===e.which,r=!("string"!=typeof this.options.cancel||!e.target.nodeName)&&x(e.target).closest(this.options.cancel).length;return!(n&&!r&&this._mouseCapture(e))||(this.mouseDelayMet=!this.options.delay,this.mouseDelayMet||(this._mouseDelayTimer=setTimeout(function(){t.mouseDelayMet=!0},this.options.delay)),this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(e),!this._mouseStarted)?(e.preventDefault(),!0):(!0===x.data(e.target,this.widgetName+".preventClickEvent")&&x.removeData(e.target,this.widgetName+".preventClickEvent"),this._mouseMoveDelegate=function(e){return t._mouseMove(e)},this._mouseUpDelegate=function(e){return t._mouseUp(e)},this.document.on("mousemove."+this.widgetName,this._mouseMoveDelegate).on("mouseup."+this.widgetName,this._mouseUpDelegate),e.preventDefault(),b=!0))}},_mouseMove:function(e){if(this._mouseMoved){if(x.ui.ie&&(!document.documentMode||document.documentMode<9)&&!e.button)return this._mouseUp(e);if(!e.which)if(e.originalEvent.altKey||e.originalEvent.ctrlKey||e.originalEvent.metaKey||e.originalEvent.shiftKey)this.ignoreMissingWhich=!0;else if(!this.ignoreMissingWhich)return this._mouseUp(e)}return(e.which||e.button)&&(this._mouseMoved=!0),this._mouseStarted?(this._mouseDrag(e),e.preventDefault()):(this._mouseDistanceMet(e)&&this._mouseDelayMet(e)&&(this._mouseStarted=!1!==this._mouseStart(this._mouseDownEvent,e),this._mouseStarted?this._mouseDrag(e):this._mouseUp(e)),!this._mouseStarted)},_mouseUp:function(e){this.document.off("mousemove."+this.widgetName,this._mouseMoveDelegate).off("mouseup."+this.widgetName,this._mouseUpDelegate),this._mouseStarted&&(this._mouseStarted=!1,e.target===this._mouseDownEvent.target&&x.data(e.target,this.widgetName+".preventClickEvent",!0),this._mouseStop(e)),this._mouseDelayTimer&&(clearTimeout(this._mouseDelayTimer),delete this._mouseDelayTimer),this.ignoreMissingWhich=!1,b=!1,e.preventDefault()},_mouseDistanceMet:function(e){return Math.max(Math.abs(this._mouseDownEvent.pageX-e.pageX),Math.abs(this._mouseDownEvent.pageY-e.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return!0}}),x.ui.plugin={add:function(e,t,n){var r,i=x.ui[e].prototype;for(r in n)i.plugins[r]=i.plugins[r]||[],i.plugins[r].push([t,n[r]])},call:function(e,t,n,r){var i,a=e.plugins[t];if(a&&(r||e.element[0].parentNode&&11!==e.element[0].parentNode.nodeType))for(i=0;i<a.length;i++)e.options[a[i][0]]&&a[i][1].apply(e.element,n)}},x.ui.safeBlur=function(e){e&&"body"!==e.nodeName.toLowerCase()&&x(e).trigger("blur")};x.widget("ui.draggable",x.ui.mouse,{version:"1.12.1",widgetEventPrefix:"drag",options:{addClasses:!0,appendTo:"parent",axis:!1,connectToSortable:!1,containment:!1,cursor:"auto",cursorAt:!1,grid:!1,handle:!1,helper:"original",iframeFix:!1,opacity:!1,refreshPositions:!1,revert:!1,revertDuration:500,scope:"default",scroll:!0,scrollSensitivity:20,scrollSpeed:20,snap:!1,snapMode:"both",snapTolerance:20,stack:!1,zIndex:!1,drag:null,start:null,stop:null},_create:function(){"original"===this.options.helper&&this._setPositionRelative(),this.options.addClasses&&this._addClass("ui-draggable"),this._setHandleClassName(),this._mouseInit()},_setOption:function(e,t){this._super(e,t),"handle"===e&&(this._removeHandleClassName(),this._setHandleClassName())},_destroy:function(){(this.helper||this.element).is(".ui-draggable-dragging")?this.destroyOnClear=!0:(this._removeHandleClassName(),this._mouseDestroy())},_mouseCapture:function(e){var t=this.options;return!(this.helper||t.disabled||0<x(e.target).closest(".ui-resizable-handle").length)&&(this.handle=this._getHandle(e),!!this.handle&&(this._blurActiveElement(e),this._blockFrames(!0===t.iframeFix?"iframe":t.iframeFix),!0))},_blockFrames:function(e){this.iframeBlocks=this.document.find(e).map(function(){var e=x(this);return x("<div>").css("position","absolute").appendTo(e.parent()).outerWidth(e.outerWidth()).outerHeight(e.outerHeight()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_blurActiveElement:function(e){var t=x.ui.safeActiveElement(this.document[0]);x(e.target).closest(t).length||x.ui.safeBlur(t)},_mouseStart:function(e){var t=this.options;return this.helper=this._createHelper(e),this._addClass(this.helper,"ui-draggable-dragging"),this._cacheHelperProportions(),x.ui.ddmanager&&(x.ui.ddmanager.current=this),this._cacheMargins(),this.cssPosition=this.helper.css("position"),this.scrollParent=this.helper.scrollParent(!0),this.offsetParent=this.helper.offsetParent(),this.hasFixedAncestor=0<this.helper.parents().filter(function(){return"fixed"===x(this).css("position")}).length,this.positionAbs=this.element.offset(),this._refreshOffsets(e),this.originalPosition=this.position=this._generatePosition(e,!1),this.originalPageX=e.pageX,this.originalPageY=e.pageY,t.cursorAt&&this._adjustOffsetFromHelper(t.cursorAt),this._setContainment(),!1===this._trigger("start",e)?(this._clear(),!1):(this._cacheHelperProportions(),x.ui.ddmanager&&!t.dropBehaviour&&x.ui.ddmanager.prepareOffsets(this,e),this._mouseDrag(e,!0),x.ui.ddmanager&&x.ui.ddmanager.dragStart(this,e),!0)},_refreshOffsets:function(e){this.offset={top:this.positionAbs.top-this.margins.top,left:this.positionAbs.left-this.margins.left,scroll:!1,parent:this._getParentOffset(),relative:this._getRelativeOffset()},this.offset.click={left:e.pageX-this.offset.left,top:e.pageY-this.offset.top}},_mouseDrag:function(e,t){if(this.hasFixedAncestor&&(this.offset.parent=this._getParentOffset()),this.position=this._generatePosition(e,!0),this.positionAbs=this._convertPositionTo("absolute"),!t){var n=this._uiHash();if(!1===this._trigger("drag",e,n))return this._mouseUp(new x.Event("mouseup",e)),!1;this.position=n.position}return this.helper[0].style.left=this.position.left+"px",this.helper[0].style.top=this.position.top+"px",x.ui.ddmanager&&x.ui.ddmanager.drag(this,e),!1},_mouseStop:function(e){var t=this,n=!1;return x.ui.ddmanager&&!this.options.dropBehaviour&&(n=x.ui.ddmanager.drop(this,e)),this.dropped&&(n=this.dropped,this.dropped=!1),"invalid"===this.options.revert&&!n||"valid"===this.options.revert&&n||!0===this.options.revert||x.isFunction(this.options.revert)&&this.options.revert.call(this.element,n)?x(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){!1!==t._trigger("stop",e)&&t._clear()}):!1!==this._trigger("stop",e)&&this._clear(),!1},_mouseUp:function(e){return this._unblockFrames(),x.ui.ddmanager&&x.ui.ddmanager.dragStop(this,e),this.handleElement.is(e.target)&&this.element.trigger("focus"),x.ui.mouse.prototype._mouseUp.call(this,e)},cancel:function(){return this.helper.is(".ui-draggable-dragging")?this._mouseUp(new x.Event("mouseup",{target:this.element[0]})):this._clear(),this},_getHandle:function(e){return!this.options.handle||!!x(e.target).closest(this.element.find(this.options.handle)).length},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element,this._addClass(this.handleElement,"ui-draggable-handle")},_removeHandleClassName:function(){this._removeClass(this.handleElement,"ui-draggable-handle")},_createHelper:function(e){var t=this.options,n=x.isFunction(t.helper),r=n?x(t.helper.apply(this.element[0],[e])):"clone"===t.helper?this.element.clone().removeAttr("id"):this.element;return r.parents("body").length||r.appendTo("parent"===t.appendTo?this.element[0].parentNode:t.appendTo),n&&r[0]===this.element[0]&&this._setPositionRelative(),r[0]===this.element[0]||/(fixed|absolute)/.test(r.css("position"))||r.css("position","absolute"),r},_setPositionRelative:function(){/^(?:r|a|f)/.test(this.element.css("position"))||(this.element[0].style.position="relative")},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),x.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_isRootNode:function(e){return/(html|body)/i.test(e.tagName)||e===this.document[0]},_getParentOffset:function(){var e=this.offsetParent.offset(),t=this.document[0];return"absolute"===this.cssPosition&&this.scrollParent[0]!==t&&x.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),this._isRootNode(this.offsetParent[0])&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.element.position(),t=this._isRootNode(this.scrollParent[0]);return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+(t?0:this.scrollParent.scrollTop()),left:e.left-(parseInt(this.helper.css("left"),10)||0)+(t?0:this.scrollParent.scrollLeft())}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,t,n,r=this.options,i=this.document[0];this.relativeContainer=null,r.containment?"window"!==r.containment?"document"!==r.containment?r.containment.constructor!==Array?("parent"===r.containment&&(r.containment=this.helper[0].parentNode),(n=(t=x(r.containment))[0])&&(e=/(scroll|auto)/.test(t.css("overflow")),this.containment=[(parseInt(t.css("borderLeftWidth"),10)||0)+(parseInt(t.css("paddingLeft"),10)||0),(parseInt(t.css("borderTopWidth"),10)||0)+(parseInt(t.css("paddingTop"),10)||0),(e?Math.max(n.scrollWidth,n.offsetWidth):n.offsetWidth)-(parseInt(t.css("borderRightWidth"),10)||0)-(parseInt(t.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(e?Math.max(n.scrollHeight,n.offsetHeight):n.offsetHeight)-(parseInt(t.css("borderBottomWidth"),10)||0)-(parseInt(t.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom],this.relativeContainer=t)):this.containment=r.containment:this.containment=[0,0,x(i).width()-this.helperProportions.width-this.margins.left,(x(i).height()||i.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=[x(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,x(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,x(window).scrollLeft()+x(window).width()-this.helperProportions.width-this.margins.left,x(window).scrollTop()+(x(window).height()||i.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]:this.containment=null},_convertPositionTo:function(e,t){t||(t=this.position);var n="absolute"===e?1:-1,r=this._isRootNode(this.scrollParent[0]);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.offset.scroll.top:r?0:this.offset.scroll.top)*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.offset.scroll.left:r?0:this.offset.scroll.left)*n}},_generatePosition:function(e,t){var n,r,i,a,o=this.options,s=this._isRootNode(this.scrollParent[0]),c=e.pageX,l=e.pageY;return s&&this.offset.scroll||(this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}),t&&(this.containment&&(n=this.relativeContainer?(r=this.relativeContainer.offset(),[this.containment[0]+r.left,this.containment[1]+r.top,this.containment[2]+r.left,this.containment[3]+r.top]):this.containment,e.pageX-this.offset.click.left<n[0]&&(c=n[0]+this.offset.click.left),e.pageY-this.offset.click.top<n[1]&&(l=n[1]+this.offset.click.top),e.pageX-this.offset.click.left>n[2]&&(c=n[2]+this.offset.click.left),e.pageY-this.offset.click.top>n[3]&&(l=n[3]+this.offset.click.top)),o.grid&&(i=o.grid[1]?this.originalPageY+Math.round((l-this.originalPageY)/o.grid[1])*o.grid[1]:this.originalPageY,l=n?i-this.offset.click.top>=n[1]||i-this.offset.click.top>n[3]?i:i-this.offset.click.top>=n[1]?i-o.grid[1]:i+o.grid[1]:i,a=o.grid[0]?this.originalPageX+Math.round((c-this.originalPageX)/o.grid[0])*o.grid[0]:this.originalPageX,c=n?a-this.offset.click.left>=n[0]||a-this.offset.click.left>n[2]?a:a-this.offset.click.left>=n[0]?a-o.grid[0]:a+o.grid[0]:a),"y"===o.axis&&(c=this.originalPageX),"x"===o.axis&&(l=this.originalPageY)),{top:l-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.offset.scroll.top:s?0:this.offset.scroll.top),left:c-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.offset.scroll.left:s?0:this.offset.scroll.left)}},_clear:function(){this._removeClass(this.helper,"ui-draggable-dragging"),this.helper[0]===this.element[0]||this.cancelHelperRemoval||this.helper.remove(),this.helper=null,this.cancelHelperRemoval=!1,this.destroyOnClear&&this.destroy()},_trigger:function(e,t,n){return n=n||this._uiHash(),x.ui.plugin.call(this,e,[t,n,this],!0),/^(drag|start|stop)/.test(e)&&(this.positionAbs=this._convertPositionTo("absolute"),n.offset=this.positionAbs),x.Widget.prototype._trigger.call(this,e,t,n)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}}),x.ui.plugin.add("draggable","connectToSortable",{start:function(t,e,n){var r=x.extend({},e,{item:n.element});n.sortables=[],x(n.options.connectToSortable).each(function(){var e=x(this).sortable("instance");e&&!e.options.disabled&&(n.sortables.push(e),e.refreshPositions(),e._trigger("activate",t,r))})},stop:function(t,e,n){var r=x.extend({},e,{item:n.element});n.cancelHelperRemoval=!1,x.each(n.sortables,function(){var e=this;e.isOver?(e.isOver=0,n.cancelHelperRemoval=!0,e.cancelHelperRemoval=!1,e._storedCSS={position:e.placeholder.css("position"),top:e.placeholder.css("top"),left:e.placeholder.css("left")},e._mouseStop(t),e.options.helper=e.options._helper):(e.cancelHelperRemoval=!0,e._trigger("deactivate",t,r))})},drag:function(n,r,i){x.each(i.sortables,function(){var e=!1,t=this;t.positionAbs=i.positionAbs,t.helperProportions=i.helperProportions,t.offset.click=i.offset.click,t._intersectsWith(t.containerCache)&&(e=!0,x.each(i.sortables,function(){return this.positionAbs=i.positionAbs,this.helperProportions=i.helperProportions,this.offset.click=i.offset.click,this!==t&&this._intersectsWith(this.containerCache)&&x.contains(t.element[0],this.element[0])&&(e=!1),e})),e?(t.isOver||(t.isOver=1,i._parent=r.helper.parent(),t.currentItem=r.helper.appendTo(t.element).data("ui-sortable-item",!0),t.options._helper=t.options.helper,t.options.helper=function(){return r.helper[0]},n.target=t.currentItem[0],t._mouseCapture(n,!0),t._mouseStart(n,!0,!0),t.offset.click.top=i.offset.click.top,t.offset.click.left=i.offset.click.left,t.offset.parent.left-=i.offset.parent.left-t.offset.parent.left,t.offset.parent.top-=i.offset.parent.top-t.offset.parent.top,i._trigger("toSortable",n),i.dropped=t.element,x.each(i.sortables,function(){this.refreshPositions()}),i.currentItem=i.element,t.fromOutside=i),t.currentItem&&(t._mouseDrag(n),r.position=t.position)):t.isOver&&(t.isOver=0,t.cancelHelperRemoval=!0,t.options._revert=t.options.revert,t.options.revert=!1,t._trigger("out",n,t._uiHash(t)),t._mouseStop(n,!0),t.options.revert=t.options._revert,t.options.helper=t.options._helper,t.placeholder&&t.placeholder.remove(),r.helper.appendTo(i._parent),i._refreshOffsets(n),r.position=i._generatePosition(n,!0),i._trigger("fromSortable",n),i.dropped=!1,x.each(i.sortables,function(){this.refreshPositions()}))})}}),x.ui.plugin.add("draggable","cursor",{start:function(e,t,n){var r=x("body"),i=n.options;r.css("cursor")&&(i._cursor=r.css("cursor")),r.css("cursor",i.cursor)},stop:function(e,t,n){var r=n.options;r._cursor&&x("body").css("cursor",r._cursor)}}),x.ui.plugin.add("draggable","opacity",{start:function(e,t,n){var r=x(t.helper),i=n.options;r.css("opacity")&&(i._opacity=r.css("opacity")),r.css("opacity",i.opacity)},stop:function(e,t,n){var r=n.options;r._opacity&&x(t.helper).css("opacity",r._opacity)}}),x.ui.plugin.add("draggable","scroll",{start:function(e,t,n){n.scrollParentNotHidden||(n.scrollParentNotHidden=n.helper.scrollParent(!1)),n.scrollParentNotHidden[0]!==n.document[0]&&"HTML"!==n.scrollParentNotHidden[0].tagName&&(n.overflowOffset=n.scrollParentNotHidden.offset())},drag:function(e,t,n){var r=n.options,i=!1,a=n.scrollParentNotHidden[0],o=n.document[0];a!==o&&"HTML"!==a.tagName?(r.axis&&"x"===r.axis||(n.overflowOffset.top+a.offsetHeight-e.pageY<r.scrollSensitivity?a.scrollTop=i=a.scrollTop+r.scrollSpeed:e.pageY-n.overflowOffset.top<r.scrollSensitivity&&(a.scrollTop=i=a.scrollTop-r.scrollSpeed)),r.axis&&"y"===r.axis||(n.overflowOffset.left+a.offsetWidth-e.pageX<r.scrollSensitivity?a.scrollLeft=i=a.scrollLeft+r.scrollSpeed:e.pageX-n.overflowOffset.left<r.scrollSensitivity&&(a.scrollLeft=i=a.scrollLeft-r.scrollSpeed))):(r.axis&&"x"===r.axis||(e.pageY-x(o).scrollTop()<r.scrollSensitivity?i=x(o).scrollTop(x(o).scrollTop()-r.scrollSpeed):x(window).height()-(e.pageY-x(o).scrollTop())<r.scrollSensitivity&&(i=x(o).scrollTop(x(o).scrollTop()+r.scrollSpeed))),r.axis&&"y"===r.axis||(e.pageX-x(o).scrollLeft()<r.scrollSensitivity?i=x(o).scrollLeft(x(o).scrollLeft()-r.scrollSpeed):x(window).width()-(e.pageX-x(o).scrollLeft())<r.scrollSensitivity&&(i=x(o).scrollLeft(x(o).scrollLeft()+r.scrollSpeed)))),!1!==i&&x.ui.ddmanager&&!r.dropBehaviour&&x.ui.ddmanager.prepareOffsets(n,e)}}),x.ui.plugin.add("draggable","snap",{start:function(e,t,n){var r=n.options;n.snapElements=[],x(r.snap.constructor!==String?r.snap.items||":data(ui-draggable)":r.snap).each(function(){var e=x(this),t=e.offset();this!==n.element[0]&&n.snapElements.push({item:this,width:e.outerWidth(),height:e.outerHeight(),top:t.top,left:t.left})})},drag:function(e,t,n){var r,i,a,o,s,c,l,u,f,d,h=n.options,p=h.snapTolerance,m=t.offset.left,g=m+n.helperProportions.width,_=t.offset.top,b=_+n.helperProportions.height;for(f=n.snapElements.length-1;0<=f;f--)c=(s=n.snapElements[f].left-n.margins.left)+n.snapElements[f].width,u=(l=n.snapElements[f].top-n.margins.top)+n.snapElements[f].height,g<s-p||c+p<m||b<l-p||u+p<_||!x.contains(n.snapElements[f].item.ownerDocument,n.snapElements[f].item)?(n.snapElements[f].snapping&&n.options.snap.release&&n.options.snap.release.call(n.element,e,x.extend(n._uiHash(),{snapItem:n.snapElements[f].item})),n.snapElements[f].snapping=!1):("inner"!==h.snapMode&&(r=Math.abs(l-b)<=p,i=Math.abs(u-_)<=p,a=Math.abs(s-g)<=p,o=Math.abs(c-m)<=p,r&&(t.position.top=n._convertPositionTo("relative",{top:l-n.helperProportions.height,left:0}).top),i&&(t.position.top=n._convertPositionTo("relative",{top:u,left:0}).top),a&&(t.position.left=n._convertPositionTo("relative",{top:0,left:s-n.helperProportions.width}).left),o&&(t.position.left=n._convertPositionTo("relative",{top:0,left:c}).left)),d=r||i||a||o,"outer"!==h.snapMode&&(r=Math.abs(l-_)<=p,i=Math.abs(u-b)<=p,a=Math.abs(s-m)<=p,o=Math.abs(c-g)<=p,r&&(t.position.top=n._convertPositionTo("relative",{top:l,left:0}).top),i&&(t.position.top=n._convertPositionTo("relative",{top:u-n.helperProportions.height,left:0}).top),a&&(t.position.left=n._convertPositionTo("relative",{top:0,left:s}).left),o&&(t.position.left=n._convertPositionTo("relative",{top:0,left:c-n.helperProportions.width}).left)),!n.snapElements[f].snapping&&(r||i||a||o||d)&&n.options.snap.snap&&n.options.snap.snap.call(n.element,e,x.extend(n._uiHash(),{snapItem:n.snapElements[f].item})),n.snapElements[f].snapping=r||i||a||o||d)}}),x.ui.plugin.add("draggable","stack",{start:function(e,t,n){var r,i=n.options,a=x.makeArray(x(i.stack)).sort(function(e,t){return(parseInt(x(e).css("zIndex"),10)||0)-(parseInt(x(t).css("zIndex"),10)||0)});a.length&&(r=parseInt(x(a[0]).css("zIndex"),10)||0,x(a).each(function(e){x(this).css("zIndex",r+e)}),this.css("zIndex",r+a.length))}}),x.ui.plugin.add("draggable","zIndex",{start:function(e,t,n){var r=x(t.helper),i=n.options;r.css("zIndex")&&(i._zIndex=r.css("zIndex")),r.css("zIndex",i.zIndex)},stop:function(e,t,n){var r=n.options;r._zIndex&&x(t.helper).css("zIndex",r._zIndex)}});x.ui.draggable;x.widget("ui.resizable",x.ui.mouse,{version:"1.12.1",widgetEventPrefix:"resize",options:{alsoResize:!1,animate:!1,animateDuration:"slow",animateEasing:"swing",aspectRatio:!1,autoHide:!1,classes:{"ui-resizable-se":"ui-icon ui-icon-gripsmall-diagonal-se"},containment:!1,ghost:!1,grid:!1,handles:"e,s,se",helper:!1,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(e){return parseFloat(e)||0},_isNumber:function(e){return!isNaN(parseFloat(e))},_hasScroll:function(e,t){if("hidden"===x(e).css("overflow"))return!1;var n,r=t&&"left"===t?"scrollLeft":"scrollTop";return 0<e[r]||(e[r]=1,n=0<e[r],e[r]=0,n)},_create:function(){var e,t=this.options,n=this;this._addClass("ui-resizable"),x.extend(this,{_aspectRatio:!!t.aspectRatio,aspectRatio:t.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:t.helper||t.ghost||t.animate?t.helper||"ui-resizable-helper":null}),this.element[0].nodeName.match(/^(canvas|textarea|input|select|button|img)$/i)&&(this.element.wrap(x("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")})),this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance")),this.elementIsWrapper=!0,e={marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom"),marginLeft:this.originalElement.css("marginLeft")},this.element.css(e),this.originalElement.css("margin",0),this.originalResizeStyle=this.originalElement.css("resize"),this.originalElement.css("resize","none"),this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"})),this.originalElement.css(e),this._proportionallyResize()),this._setupHandles(),t.autoHide&&x(this.element).on("mouseenter",function(){t.disabled||(n._removeClass("ui-resizable-autohide"),n._handles.show())}).on("mouseleave",function(){t.disabled||n.resizing||(n._addClass("ui-resizable-autohide"),n._handles.hide())}),this._mouseInit()},_destroy:function(){this._mouseDestroy();var e,t=function(e){x(e).removeData("resizable").removeData("ui-resizable").off(".resizable").find(".ui-resizable-handle").remove()};return this.elementIsWrapper&&(t(this.element),e=this.element,this.originalElement.css({position:e.css("position"),width:e.outerWidth(),height:e.outerHeight(),top:e.css("top"),left:e.css("left")}).insertAfter(e),e.remove()),this.originalElement.css("resize",this.originalResizeStyle),t(this.originalElement),this},_setOption:function(e,t){switch(this._super(e,t),e){case"handles":this._removeHandles(),this._setupHandles()}},_setupHandles:function(){var e,t,n,r,i,a=this.options,o=this;if(this.handles=a.handles||(x(".ui-resizable-handle",this.element).length?{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"}:"e,s,se"),this._handles=x(),this.handles.constructor===String)for("all"===this.handles&&(this.handles="n,e,s,w,se,sw,ne,nw"),n=this.handles.split(","),this.handles={},t=0;t<n.length;t++)r="ui-resizable-"+(e=x.trim(n[t])),i=x("<div>"),this._addClass(i,"ui-resizable-handle "+r),i.css({zIndex:a.zIndex}),this.handles[e]=".ui-resizable-"+e,this.element.append(i);this._renderAxis=function(e){var t,n,r,i;for(t in e=e||this.element,this.handles)this.handles[t].constructor===String?this.handles[t]=this.element.children(this.handles[t]).first().show():(this.handles[t].jquery||this.handles[t].nodeType)&&(this.handles[t]=x(this.handles[t]),this._on(this.handles[t],{mousedown:o._mouseDown})),this.elementIsWrapper&&this.originalElement[0].nodeName.match(/^(textarea|input|select|button)$/i)&&(n=x(this.handles[t],this.element),i=/sw|ne|nw|se|n|s/.test(t)?n.outerHeight():n.outerWidth(),r=["padding",/ne|nw|n/.test(t)?"Top":/se|sw|s/.test(t)?"Bottom":/^e$/.test(t)?"Right":"Left"].join(""),e.css(r,i),this._proportionallyResize()),this._handles=this._handles.add(this.handles[t])},this._renderAxis(this.element),this._handles=this._handles.add(this.element.find(".ui-resizable-handle")),this._handles.disableSelection(),this._handles.on("mouseover",function(){o.resizing||(this.className&&(i=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)),o.axis=i&&i[1]?i[1]:"se")}),a.autoHide&&(this._handles.hide(),this._addClass("ui-resizable-autohide"))},_removeHandles:function(){this._handles.remove()},_mouseCapture:function(e){var t,n,r=!1;for(t in this.handles)((n=x(this.handles[t])[0])===e.target||x.contains(n,e.target))&&(r=!0);return!this.options.disabled&&r},_mouseStart:function(e){var t,n,r,i=this.options,a=this.element;return this.resizing=!0,this._renderProxy(),t=this._num(this.helper.css("left")),n=this._num(this.helper.css("top")),i.containment&&(t+=x(i.containment).scrollLeft()||0,n+=x(i.containment).scrollTop()||0),this.offset=this.helper.offset(),this.position={left:t,top:n},this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:a.width(),height:a.height()},this.originalSize=this._helper?{width:a.outerWidth(),height:a.outerHeight()}:{width:a.width(),height:a.height()},this.sizeDiff={width:a.outerWidth()-a.width(),height:a.outerHeight()-a.height()},this.originalPosition={left:t,top:n},this.originalMousePosition={left:e.pageX,top:e.pageY},this.aspectRatio="number"==typeof i.aspectRatio?i.aspectRatio:this.originalSize.width/this.originalSize.height||1,r=x(".ui-resizable-"+this.axis).css("cursor"),x("body").css("cursor","auto"===r?this.axis+"-resize":r),this._addClass("ui-resizable-resizing"),this._propagate("start",e),!0},_mouseDrag:function(e){var t,n,r=this.originalMousePosition,i=this.axis,a=e.pageX-r.left||0,o=e.pageY-r.top||0,s=this._change[i];return this._updatePrevProperties(),s&&(t=s.apply(this,[e,a,o]),this._updateVirtualBoundaries(e.shiftKey),(this._aspectRatio||e.shiftKey)&&(t=this._updateRatio(t,e)),t=this._respectSize(t,e),this._updateCache(t),this._propagate("resize",e),n=this._applyChanges(),!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize(),x.isEmptyObject(n)||(this._updatePrevProperties(),this._trigger("resize",e,this.ui()),this._applyChanges())),!1},_mouseStop:function(e){this.resizing=!1;var t,n,r,i,a,o,s,c=this.options,l=this;return this._helper&&(r=(n=(t=this._proportionallyResizeElements).length&&/textarea/i.test(t[0].nodeName))&&this._hasScroll(t[0],"left")?0:l.sizeDiff.height,i=n?0:l.sizeDiff.width,a={width:l.helper.width()-i,height:l.helper.height()-r},o=parseFloat(l.element.css("left"))+(l.position.left-l.originalPosition.left)||null,s=parseFloat(l.element.css("top"))+(l.position.top-l.originalPosition.top)||null,c.animate||this.element.css(x.extend(a,{top:s,left:o})),l.helper.height(l.size.height),l.helper.width(l.size.width),this._helper&&!c.animate&&this._proportionallyResize()),x("body").css("cursor","auto"),this._removeClass("ui-resizable-resizing"),this._propagate("stop",e),this._helper&&this.helper.remove(),!1},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left},this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var e={};return this.position.top!==this.prevPosition.top&&(e.top=this.position.top+"px"),this.position.left!==this.prevPosition.left&&(e.left=this.position.left+"px"),this.size.width!==this.prevSize.width&&(e.width=this.size.width+"px"),this.size.height!==this.prevSize.height&&(e.height=this.size.height+"px"),this.helper.css(e),e},_updateVirtualBoundaries:function(e){var t,n,r,i,a,o=this.options;a={minWidth:this._isNumber(o.minWidth)?o.minWidth:0,maxWidth:this._isNumber(o.maxWidth)?o.maxWidth:1/0,minHeight:this._isNumber(o.minHeight)?o.minHeight:0,maxHeight:this._isNumber(o.maxHeight)?o.maxHeight:1/0},(this._aspectRatio||e)&&(t=a.minHeight*this.aspectRatio,r=a.minWidth/this.aspectRatio,n=a.maxHeight*this.aspectRatio,i=a.maxWidth/this.aspectRatio,t>a.minWidth&&(a.minWidth=t),r>a.minHeight&&(a.minHeight=r),n<a.maxWidth&&(a.maxWidth=n),i<a.maxHeight&&(a.maxHeight=i)),this._vBoundaries=a},_updateCache:function(e){this.offset=this.helper.offset(),this._isNumber(e.left)&&(this.position.left=e.left),this._isNumber(e.top)&&(this.position.top=e.top),this._isNumber(e.height)&&(this.size.height=e.height),this._isNumber(e.width)&&(this.size.width=e.width)},_updateRatio:function(e){var t=this.position,n=this.size,r=this.axis;return this._isNumber(e.height)?e.width=e.height*this.aspectRatio:this._isNumber(e.width)&&(e.height=e.width/this.aspectRatio),"sw"===r&&(e.left=t.left+(n.width-e.width),e.top=null),"nw"===r&&(e.top=t.top+(n.height-e.height),e.left=t.left+(n.width-e.width)),e},_respectSize:function(e){var t=this._vBoundaries,n=this.axis,r=this._isNumber(e.width)&&t.maxWidth&&t.maxWidth<e.width,i=this._isNumber(e.height)&&t.maxHeight&&t.maxHeight<e.height,a=this._isNumber(e.width)&&t.minWidth&&t.minWidth>e.width,o=this._isNumber(e.height)&&t.minHeight&&t.minHeight>e.height,s=this.originalPosition.left+this.originalSize.width,c=this.originalPosition.top+this.originalSize.height,l=/sw|nw|w/.test(n),u=/nw|ne|n/.test(n);return a&&(e.width=t.minWidth),o&&(e.height=t.minHeight),r&&(e.width=t.maxWidth),i&&(e.height=t.maxHeight),a&&l&&(e.left=s-t.minWidth),r&&l&&(e.left=s-t.maxWidth),o&&u&&(e.top=c-t.minHeight),i&&u&&(e.top=c-t.maxHeight),e.width||e.height||e.left||!e.top?e.width||e.height||e.top||!e.left||(e.left=null):e.top=null,e},_getPaddingPlusBorderDimensions:function(e){for(var t=0,n=[],r=[e.css("borderTopWidth"),e.css("borderRightWidth"),e.css("borderBottomWidth"),e.css("borderLeftWidth")],i=[e.css("paddingTop"),e.css("paddingRight"),e.css("paddingBottom"),e.css("paddingLeft")];t<4;t++)n[t]=parseFloat(r[t])||0,n[t]+=parseFloat(i[t])||0;return{height:n[0]+n[2],width:n[1]+n[3]}},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var e,t=0,n=this.helper||this.element;t<this._proportionallyResizeElements.length;t++)e=this._proportionallyResizeElements[t],this.outerDimensions||(this.outerDimensions=this._getPaddingPlusBorderDimensions(e)),e.css({height:n.height()-this.outerDimensions.height||0,width:n.width()-this.outerDimensions.width||0})},_renderProxy:function(){var e=this.element,t=this.options;this.elementOffset=e.offset(),this._helper?(this.helper=this.helper||x("<div style='overflow:hidden;'></div>"),this._addClass(this.helper,this._helper),this.helper.css({width:this.element.outerWidth(),height:this.element.outerHeight(),position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++t.zIndex}),this.helper.appendTo("body").disableSelection()):this.helper=this.element},_change:{e:function(e,t){return{width:this.originalSize.width+t}},w:function(e,t){var n=this.originalSize;return{left:this.originalPosition.left+t,width:n.width-t}},n:function(e,t,n){var r=this.originalSize;return{top:this.originalPosition.top+n,height:r.height-n}},s:function(e,t,n){return{height:this.originalSize.height+n}},se:function(e,t,n){return x.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[e,t,n]))},sw:function(e,t,n){return x.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[e,t,n]))},ne:function(e,t,n){return x.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[e,t,n]))},nw:function(e,t,n){return x.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[e,t,n]))}},_propagate:function(e,t){x.ui.plugin.call(this,e,[t,this.ui()]),"resize"!==e&&this._trigger(e,t,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}}),x.ui.plugin.add("resizable","animate",{stop:function(t){var n=x(this).resizable("instance"),e=n.options,r=n._proportionallyResizeElements,i=r.length&&/textarea/i.test(r[0].nodeName),a=i&&n._hasScroll(r[0],"left")?0:n.sizeDiff.height,o=i?0:n.sizeDiff.width,s={width:n.size.width-o,height:n.size.height-a},c=parseFloat(n.element.css("left"))+(n.position.left-n.originalPosition.left)||null,l=parseFloat(n.element.css("top"))+(n.position.top-n.originalPosition.top)||null;n.element.animate(x.extend(s,l&&c?{top:l,left:c}:{}),{duration:e.animateDuration,easing:e.animateEasing,step:function(){var e={width:parseFloat(n.element.css("width")),height:parseFloat(n.element.css("height")),top:parseFloat(n.element.css("top")),left:parseFloat(n.element.css("left"))};r&&r.length&&x(r[0]).css({width:e.width,height:e.height}),n._updateCache(e),n._propagate("resize",t)}})}}),x.ui.plugin.add("resizable","containment",{start:function(){var n,r,e,t,i,a,o,s=x(this).resizable("instance"),c=s.options,l=s.element,u=c.containment,f=u instanceof x?u.get(0):/parent/.test(u)?l.parent().get(0):u;f&&(s.containerElement=x(f),/document/.test(u)||u===document?(s.containerOffset={left:0,top:0},s.containerPosition={left:0,top:0},s.parentData={element:x(document),left:0,top:0,width:x(document).width(),height:x(document).height()||document.body.parentNode.scrollHeight}):(n=x(f),r=[],x(["Top","Right","Left","Bottom"]).each(function(e,t){r[e]=s._num(n.css("padding"+t))}),s.containerOffset=n.offset(),s.containerPosition=n.position(),s.containerSize={height:n.innerHeight()-r[3],width:n.innerWidth()-r[1]},e=s.containerOffset,t=s.containerSize.height,i=s.containerSize.width,a=s._hasScroll(f,"left")?f.scrollWidth:i,o=s._hasScroll(f)?f.scrollHeight:t,s.parentData={element:f,left:e.left,top:e.top,width:a,height:o}))},resize:function(e){var t,n,r,i,a=x(this).resizable("instance"),o=a.options,s=a.containerOffset,c=a.position,l=a._aspectRatio||e.shiftKey,u={top:0,left:0},f=a.containerElement,d=!0;f[0]!==document&&/static/.test(f.css("position"))&&(u=s),c.left<(a._helper?s.left:0)&&(a.size.width=a.size.width+(a._helper?a.position.left-s.left:a.position.left-u.left),l&&(a.size.height=a.size.width/a.aspectRatio,d=!1),a.position.left=o.helper?s.left:0),c.top<(a._helper?s.top:0)&&(a.size.height=a.size.height+(a._helper?a.position.top-s.top:a.position.top),l&&(a.size.width=a.size.height*a.aspectRatio,d=!1),a.position.top=a._helper?s.top:0),r=a.containerElement.get(0)===a.element.parent().get(0),i=/relative|absolute/.test(a.containerElement.css("position")),r&&i?(a.offset.left=a.parentData.left+a.position.left,a.offset.top=a.parentData.top+a.position.top):(a.offset.left=a.element.offset().left,a.offset.top=a.element.offset().top),t=Math.abs(a.sizeDiff.width+(a._helper?a.offset.left-u.left:a.offset.left-s.left)),n=Math.abs(a.sizeDiff.height+(a._helper?a.offset.top-u.top:a.offset.top-s.top)),t+a.size.width>=a.parentData.width&&(a.size.width=a.parentData.width-t,l&&(a.size.height=a.size.width/a.aspectRatio,d=!1)),n+a.size.height>=a.parentData.height&&(a.size.height=a.parentData.height-n,l&&(a.size.width=a.size.height*a.aspectRatio,d=!1)),d||(a.position.left=a.prevPosition.left,a.position.top=a.prevPosition.top,a.size.width=a.prevSize.width,a.size.height=a.prevSize.height)},stop:function(){var e=x(this).resizable("instance"),t=e.options,n=e.containerOffset,r=e.containerPosition,i=e.containerElement,a=x(e.helper),o=a.offset(),s=a.outerWidth()-e.sizeDiff.width,c=a.outerHeight()-e.sizeDiff.height;e._helper&&!t.animate&&/relative/.test(i.css("position"))&&x(this).css({left:o.left-r.left-n.left,width:s,height:c}),e._helper&&!t.animate&&/static/.test(i.css("position"))&&x(this).css({left:o.left-r.left-n.left,width:s,height:c})}}),x.ui.plugin.add("resizable","alsoResize",{start:function(){var e=x(this).resizable("instance").options;x(e.alsoResize).each(function(){var e=x(this);e.data("ui-resizable-alsoresize",{width:parseFloat(e.width()),height:parseFloat(e.height()),left:parseFloat(e.css("left")),top:parseFloat(e.css("top"))})})},resize:function(e,n){var t=x(this).resizable("instance"),r=t.options,i=t.originalSize,a=t.originalPosition,o={height:t.size.height-i.height||0,width:t.size.width-i.width||0,top:t.position.top-a.top||0,left:t.position.left-a.left||0};x(r.alsoResize).each(function(){var e=x(this),r=x(this).data("ui-resizable-alsoresize"),i={},t=e.parents(n.originalElement[0]).length?["width","height"]:["width","height","top","left"];x.each(t,function(e,t){var n=(r[t]||0)+(o[t]||0);n&&0<=n&&(i[t]=n||null)}),e.css(i)})},stop:function(){x(this).removeData("ui-resizable-alsoresize")}}),x.ui.plugin.add("resizable","ghost",{start:function(){var e=x(this).resizable("instance"),t=e.size;e.ghost=e.originalElement.clone(),e.ghost.css({opacity:.25,display:"block",position:"relative",height:t.height,width:t.width,margin:0,left:0,top:0}),e._addClass(e.ghost,"ui-resizable-ghost"),!1!==x.uiBackCompat&&"string"==typeof e.options.ghost&&e.ghost.addClass(this.options.ghost),e.ghost.appendTo(e.helper)},resize:function(){var e=x(this).resizable("instance");e.ghost&&e.ghost.css({position:"relative",height:e.size.height,width:e.size.width})},stop:function(){var e=x(this).resizable("instance");e.ghost&&e.helper&&e.helper.get(0).removeChild(e.ghost.get(0))}}),x.ui.plugin.add("resizable","grid",{resize:function(){var e,t=x(this).resizable("instance"),n=t.options,r=t.size,i=t.originalSize,a=t.originalPosition,o=t.axis,s="number"==typeof n.grid?[n.grid,n.grid]:n.grid,c=s[0]||1,l=s[1]||1,u=Math.round((r.width-i.width)/c)*c,f=Math.round((r.height-i.height)/l)*l,d=i.width+u,h=i.height+f,p=n.maxWidth&&n.maxWidth<d,m=n.maxHeight&&n.maxHeight<h,g=n.minWidth&&n.minWidth>d,_=n.minHeight&&n.minHeight>h;n.grid=s,g&&(d+=c),_&&(h+=l),p&&(d-=c),m&&(h-=l),/^(se|s|e)$/.test(o)?(t.size.width=d,t.size.height=h):/^(ne)$/.test(o)?(t.size.width=d,t.size.height=h,t.position.top=a.top-f):/^(sw)$/.test(o)?(t.size.width=d,t.size.height=h,t.position.left=a.left-u):((h-l<=0||d-c<=0)&&(e=t._getPaddingPlusBorderDimensions(this)),0<h-l?(t.size.height=h,t.position.top=a.top-f):(h=l-e.height,t.size.height=h,t.position.top=a.top+i.height-h),0<d-c?(t.size.width=d,t.position.left=a.left-u):(d=c-e.width,t.size.width=d,t.position.left=a.left+i.width-d))}});x.ui.resizable;x.widget("ui.dialog",{version:"1.12.1",options:{appendTo:"body",autoOpen:!0,buttons:[],classes:{"ui-dialog":"ui-corner-all","ui-dialog-titlebar":"ui-corner-all"},closeOnEscape:!0,closeText:"Close",draggable:!0,hide:null,height:"auto",maxHeight:null,maxWidth:null,minHeight:150,minWidth:150,modal:!1,position:{my:"center",at:"center",of:window,collision:"fit",using:function(e){var t=x(this).css(e).offset().top;t<0&&x(this).css("top",e.top-t)}},resizable:!0,show:null,title:null,width:300,beforeClose:null,close:null,drag:null,dragStart:null,dragStop:null,focus:null,open:null,resize:null,resizeStart:null,resizeStop:null},sizeRelatedOptions:{buttons:!0,height:!0,maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0,width:!0},resizableRelatedOptions:{maxHeight:!0,maxWidth:!0,minHeight:!0,minWidth:!0},_create:function(){this.originalCss={display:this.element[0].style.display,width:this.element[0].style.width,minHeight:this.element[0].style.minHeight,maxHeight:this.element[0].style.maxHeight,height:this.element[0].style.height},this.originalPosition={parent:this.element.parent(),index:this.element.parent().children().index(this.element)},this.originalTitle=this.element.attr("title"),null==this.options.title&&null!=this.originalTitle&&(this.options.title=this.originalTitle),this.options.disabled&&(this.options.disabled=!1),this._createWrapper(),this.element.show().removeAttr("title").appendTo(this.uiDialog),this._addClass("ui-dialog-content","ui-widget-content"),this._createTitlebar(),this._createButtonPane(),this.options.draggable&&x.fn.draggable&&this._makeDraggable(),this.options.resizable&&x.fn.resizable&&this._makeResizable(),this._isOpen=!1,this._trackFocus()},_init:function(){this.options.autoOpen&&this.open()},_appendTo:function(){var e=this.options.appendTo;return e&&(e.jquery||e.nodeType)?x(e):this.document.find(e||"body").eq(0)},_destroy:function(){var e,t=this.originalPosition;this._untrackInstance(),this._destroyOverlay(),this.element.removeUniqueId().css(this.originalCss).detach(),this.uiDialog.remove(),this.originalTitle&&this.element.attr("title",this.originalTitle),(e=t.parent.children().eq(t.index)).length&&e[0]!==this.element[0]?e.before(this.element):t.parent.append(this.element)},widget:function(){return this.uiDialog},disable:x.noop,enable:x.noop,close:function(e){var t=this;this._isOpen&&!1!==this._trigger("beforeClose",e)&&(this._isOpen=!1,this._focusedElement=null,this._destroyOverlay(),this._untrackInstance(),this.opener.filter(":focusable").trigger("focus").length||x.ui.safeBlur(x.ui.safeActiveElement(this.document[0])),this._hide(this.uiDialog,this.options.hide,function(){t._trigger("close",e)}))},isOpen:function(){return this._isOpen},moveToTop:function(){this._moveToTop()},_moveToTop:function(e,t){var n=!1,r=this.uiDialog.siblings(".ui-front:visible").map(function(){return+x(this).css("z-index")}).get(),i=Math.max.apply(null,r);return i>=+this.uiDialog.css("z-index")&&(this.uiDialog.css("z-index",i+1),n=!0),n&&!t&&this._trigger("focus",e),n},open:function(){var e=this;this._isOpen?this._moveToTop()&&this._focusTabbable():(this._isOpen=!0,this.opener=x(x.ui.safeActiveElement(this.document[0])),this._size(),this._position(),this._createOverlay(),this._moveToTop(null,!0),this.overlay&&this.overlay.css("z-index",this.uiDialog.css("z-index")-1),this._show(this.uiDialog,this.options.show,function(){e._focusTabbable(),e._trigger("focus")}),this._makeFocusTarget(),this._trigger("open"))},_focusTabbable:function(){var e=this._focusedElement;e||(e=this.element.find("[autofocus]")),e.length||(e=this.element.find(":tabbable")),e.length||(e=this.uiDialogButtonPane.find(":tabbable")),e.length||(e=this.uiDialogTitlebarClose.filter(":tabbable")),e.length||(e=this.uiDialog),e.eq(0).trigger("focus")},_keepFocus:function(e){function t(){var e=x.ui.safeActiveElement(this.document[0]);this.uiDialog[0]===e||x.contains(this.uiDialog[0],e)||this._focusTabbable()}e.preventDefault(),t.call(this),this._delay(t)},_createWrapper:function(){this.uiDialog=x("<div>").hide().attr({tabIndex:-1,role:"dialog"}).appendTo(this._appendTo()),this._addClass(this.uiDialog,"ui-dialog","ui-widget ui-widget-content ui-front"),this._on(this.uiDialog,{keydown:function(e){if(this.options.closeOnEscape&&!e.isDefaultPrevented()&&e.keyCode&&e.keyCode===x.ui.keyCode.ESCAPE)return e.preventDefault(),void this.close(e);if(e.keyCode===x.ui.keyCode.TAB&&!e.isDefaultPrevented()){var t=this.uiDialog.find(":tabbable"),n=t.filter(":first"),r=t.filter(":last");e.target!==r[0]&&e.target!==this.uiDialog[0]||e.shiftKey?e.target!==n[0]&&e.target!==this.uiDialog[0]||!e.shiftKey||(this._delay(function(){r.trigger("focus")}),e.preventDefault()):(this._delay(function(){n.trigger("focus")}),e.preventDefault())}},mousedown:function(e){this._moveToTop(e)&&this._focusTabbable()}}),this.element.find("[aria-describedby]").length||this.uiDialog.attr({"aria-describedby":this.element.uniqueId().attr("id")})},_createTitlebar:function(){var e;this.uiDialogTitlebar=x("<div>"),this._addClass(this.uiDialogTitlebar,"ui-dialog-titlebar","ui-widget-header ui-helper-clearfix"),this._on(this.uiDialogTitlebar,{mousedown:function(e){x(e.target).closest(".ui-dialog-titlebar-close")||this.uiDialog.trigger("focus")}}),this.uiDialogTitlebarClose=x("<button type='button'></button>").button({label:x("<a>").text(this.options.closeText).html(),icon:"ui-icon-closethick",showLabel:!1}).appendTo(this.uiDialogTitlebar),this._addClass(this.uiDialogTitlebarClose,"ui-dialog-titlebar-close"),this._on(this.uiDialogTitlebarClose,{click:function(e){e.preventDefault(),this.close(e)}}),e=x("<span>").uniqueId().prependTo(this.uiDialogTitlebar),this._addClass(e,"ui-dialog-title"),this._title(e),this.uiDialogTitlebar.prependTo(this.uiDialog),this.uiDialog.attr({"aria-labelledby":e.attr("id")})},_title:function(e){this.options.title?e.text(this.options.title):e.html("&#160;")},_createButtonPane:function(){this.uiDialogButtonPane=x("<div>"),this._addClass(this.uiDialogButtonPane,"ui-dialog-buttonpane","ui-widget-content ui-helper-clearfix"),this.uiButtonSet=x("<div>").appendTo(this.uiDialogButtonPane),this._addClass(this.uiButtonSet,"ui-dialog-buttonset"),this._createButtons()},_createButtons:function(){var i=this,e=this.options.buttons;this.uiDialogButtonPane.remove(),this.uiButtonSet.empty(),x.isEmptyObject(e)||x.isArray(e)&&!e.length?this._removeClass(this.uiDialog,"ui-dialog-buttons"):(x.each(e,function(e,t){var n,r;t=x.isFunction(t)?{click:t,text:e}:t,t=x.extend({type:"button"},t),n=t.click,r={icon:t.icon,iconPosition:t.iconPosition,showLabel:t.showLabel,icons:t.icons,text:t.text},delete t.click,delete t.icon,delete t.iconPosition,delete t.showLabel,delete t.icons,"boolean"==typeof t.text&&delete t.text,x("<button></button>",t).button(r).appendTo(i.uiButtonSet).on("click",function(){n.apply(i.element[0],arguments)})}),this._addClass(this.uiDialog,"ui-dialog-buttons"),this.uiDialogButtonPane.appendTo(this.uiDialog))},_makeDraggable:function(){var i=this,a=this.options;function o(e){return{position:e.position,offset:e.offset}}this.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close",handle:".ui-dialog-titlebar",containment:"document",start:function(e,t){i._addClass(x(this),"ui-dialog-dragging"),i._blockFrames(),i._trigger("dragStart",e,o(t))},drag:function(e,t){i._trigger("drag",e,o(t))},stop:function(e,t){var n=t.offset.left-i.document.scrollLeft(),r=t.offset.top-i.document.scrollTop();a.position={my:"left top",at:"left"+(0<=n?"+":"")+n+" top"+(0<=r?"+":"")+r,of:i.window},i._removeClass(x(this),"ui-dialog-dragging"),i._unblockFrames(),i._trigger("dragStop",e,o(t))}})},_makeResizable:function(){var a=this,o=this.options,e=o.resizable,t=this.uiDialog.css("position"),n="string"==typeof e?e:"n,e,s,w,se,sw,ne,nw";function s(e){return{originalPosition:e.originalPosition,originalSize:e.originalSize,position:e.position,size:e.size}}this.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:this.element,maxWidth:o.maxWidth,maxHeight:o.maxHeight,minWidth:o.minWidth,minHeight:this._minHeight(),handles:n,start:function(e,t){a._addClass(x(this),"ui-dialog-resizing"),a._blockFrames(),a._trigger("resizeStart",e,s(t))},resize:function(e,t){a._trigger("resize",e,s(t))},stop:function(e,t){var n=a.uiDialog.offset(),r=n.left-a.document.scrollLeft(),i=n.top-a.document.scrollTop();o.height=a.uiDialog.height(),o.width=a.uiDialog.width(),o.position={my:"left top",at:"left"+(0<=r?"+":"")+r+" top"+(0<=i?"+":"")+i,of:a.window},a._removeClass(x(this),"ui-dialog-resizing"),a._unblockFrames(),a._trigger("resizeStop",e,s(t))}}).css("position",t)},_trackFocus:function(){this._on(this.widget(),{focusin:function(e){this._makeFocusTarget(),this._focusedElement=x(e.target)}})},_makeFocusTarget:function(){this._untrackInstance(),this._trackingInstances().unshift(this)},_untrackInstance:function(){var e=this._trackingInstances(),t=x.inArray(this,e);-1!==t&&e.splice(t,1)},_trackingInstances:function(){var e=this.document.data("ui-dialog-instances");return e||(e=[],this.document.data("ui-dialog-instances",e)),e},_minHeight:function(){var e=this.options;return"auto"===e.height?e.minHeight:Math.min(e.minHeight,e.height)},_position:function(){var e=this.uiDialog.is(":visible");e||this.uiDialog.show(),this.uiDialog.position(this.options.position),e||this.uiDialog.hide()},_setOptions:function(e){var n=this,r=!1,i={};x.each(e,function(e,t){n._setOption(e,t),e in n.sizeRelatedOptions&&(r=!0),e in n.resizableRelatedOptions&&(i[e]=t)}),r&&(this._size(),this._position()),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option",i)},_setOption:function(e,t){var n,r,i=this.uiDialog;"disabled"!==e&&(this._super(e,t),"appendTo"===e&&this.uiDialog.appendTo(this._appendTo()),"buttons"===e&&this._createButtons(),"closeText"===e&&this.uiDialogTitlebarClose.button({label:x("<a>").text(""+this.options.closeText).html()}),"draggable"===e&&((n=i.is(":data(ui-draggable)"))&&!t&&i.draggable("destroy"),!n&&t&&this._makeDraggable()),"position"===e&&this._position(),"resizable"===e&&((r=i.is(":data(ui-resizable)"))&&!t&&i.resizable("destroy"),r&&"string"==typeof t&&i.resizable("option","handles",t),r||!1===t||this._makeResizable()),"title"===e&&this._title(this.uiDialogTitlebar.find(".ui-dialog-title")))},_size:function(){var e,t,n,r=this.options;this.element.show().css({width:"auto",minHeight:0,maxHeight:"none",height:0}),r.minWidth>r.width&&(r.width=r.minWidth),e=this.uiDialog.css({height:"auto",width:r.width}).outerHeight(),t=Math.max(0,r.minHeight-e),n="number"==typeof r.maxHeight?Math.max(0,r.maxHeight-e):"none","auto"===r.height?this.element.css({minHeight:t,maxHeight:n,height:"auto"}):this.element.height(Math.max(0,r.height-e)),this.uiDialog.is(":data(ui-resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())},_blockFrames:function(){this.iframeBlocks=this.document.find("iframe").map(function(){var e=x(this);return x("<div>").css({position:"absolute",width:e.outerWidth(),height:e.outerHeight()}).appendTo(e.parent()).offset(e.offset())[0]})},_unblockFrames:function(){this.iframeBlocks&&(this.iframeBlocks.remove(),delete this.iframeBlocks)},_allowInteraction:function(e){return!!x(e.target).closest(".ui-dialog").length||!!x(e.target).closest(".ui-datepicker").length},_createOverlay:function(){if(this.options.modal){var t=!0;this._delay(function(){t=!1}),this.document.data("ui-dialog-overlays")||this._on(this.document,{focusin:function(e){t||this._allowInteraction(e)||(e.preventDefault(),this._trackingInstances()[0]._focusTabbable())}}),this.overlay=x("<div>").appendTo(this._appendTo()),this._addClass(this.overlay,null,"ui-widget-overlay ui-front"),this._on(this.overlay,{mousedown:"_keepFocus"}),this.document.data("ui-dialog-overlays",(this.document.data("ui-dialog-overlays")||0)+1)}},_destroyOverlay:function(){if(this.options.modal&&this.overlay){var e=this.document.data("ui-dialog-overlays")-1;e?this.document.data("ui-dialog-overlays",e):(this._off(this.document,"focusin"),this.document.removeData("ui-dialog-overlays")),this.overlay.remove(),this.overlay=null}}}),!1!==x.uiBackCompat&&x.widget("ui.dialog",x.ui.dialog,{options:{dialogClass:""},_createWrapper:function(){this._super(),this.uiDialog.addClass(this.options.dialogClass)},_setOption:function(e,t){"dialogClass"===e&&this.uiDialog.removeClass(this.options.dialogClass).addClass(t),this._superApply(arguments)}});x.ui.dialog;x.widget("ui.droppable",{version:"1.12.1",widgetEventPrefix:"drop",options:{accept:"*",addClasses:!0,greedy:!1,scope:"default",tolerance:"intersect",activate:null,deactivate:null,drop:null,out:null,over:null},_create:function(){var e,t=this.options,n=t.accept;this.isover=!1,this.isout=!0,this.accept=x.isFunction(n)?n:function(e){return e.is(n)},this.proportions=function(){if(!arguments.length)return e||(e={width:this.element[0].offsetWidth,height:this.element[0].offsetHeight});e=arguments[0]},this._addToManager(t.scope),t.addClasses&&this._addClass("ui-droppable")},_addToManager:function(e){x.ui.ddmanager.droppables[e]=x.ui.ddmanager.droppables[e]||[],x.ui.ddmanager.droppables[e].push(this)},_splice:function(e){for(var t=0;t<e.length;t++)e[t]===this&&e.splice(t,1)},_destroy:function(){var e=x.ui.ddmanager.droppables[this.options.scope];this._splice(e)},_setOption:function(e,t){if("accept"===e)this.accept=x.isFunction(t)?t:function(e){return e.is(t)};else if("scope"===e){var n=x.ui.ddmanager.droppables[this.options.scope];this._splice(n),this._addToManager(t)}this._super(e,t)},_activate:function(e){var t=x.ui.ddmanager.current;this._addActiveClass(),t&&this._trigger("activate",e,this.ui(t))},_deactivate:function(e){var t=x.ui.ddmanager.current;this._removeActiveClass(),t&&this._trigger("deactivate",e,this.ui(t))},_over:function(e){var t=x.ui.ddmanager.current;t&&(t.currentItem||t.element)[0]!==this.element[0]&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this._addHoverClass(),this._trigger("over",e,this.ui(t)))},_out:function(e){var t=x.ui.ddmanager.current;t&&(t.currentItem||t.element)[0]!==this.element[0]&&this.accept.call(this.element[0],t.currentItem||t.element)&&(this._removeHoverClass(),this._trigger("out",e,this.ui(t)))},_drop:function(t,e){var n=e||x.ui.ddmanager.current,r=!1;return!(!n||(n.currentItem||n.element)[0]===this.element[0])&&(this.element.find(":data(ui-droppable)").not(".ui-draggable-dragging").each(function(){var e=x(this).droppable("instance");if(e.options.greedy&&!e.options.disabled&&e.options.scope===n.options.scope&&e.accept.call(e.element[0],n.currentItem||n.element)&&v(n,x.extend(e,{offset:e.element.offset()}),e.options.tolerance,t))return!(r=!0)}),!r&&(!!this.accept.call(this.element[0],n.currentItem||n.element)&&(this._removeActiveClass(),this._removeHoverClass(),this._trigger("drop",t,this.ui(n)),this.element)))},ui:function(e){return{draggable:e.currentItem||e.element,helper:e.helper,position:e.position,offset:e.positionAbs}},_addHoverClass:function(){this._addClass("ui-droppable-hover")},_removeHoverClass:function(){this._removeClass("ui-droppable-hover")},_addActiveClass:function(){this._addClass("ui-droppable-active")},_removeActiveClass:function(){this._removeClass("ui-droppable-active")}});var v=x.ui.intersect=function(){function d(e,t,n){return t<=e&&e<t+n}return function(e,t,n,r){if(!t.offset)return!1;var i=(e.positionAbs||e.position.absolute).left+e.margins.left,a=(e.positionAbs||e.position.absolute).top+e.margins.top,o=i+e.helperProportions.width,s=a+e.helperProportions.height,c=t.offset.left,l=t.offset.top,u=c+t.proportions().width,f=l+t.proportions().height;switch(n){case"fit":return c<=i&&o<=u&&l<=a&&s<=f;case"intersect":return c<i+e.helperProportions.width/2&&o-e.helperProportions.width/2<u&&l<a+e.helperProportions.height/2&&s-e.helperProportions.height/2<f;case"pointer":return d(r.pageY,l,t.proportions().height)&&d(r.pageX,c,t.proportions().width);case"touch":return(l<=a&&a<=f||l<=s&&s<=f||a<l&&f<s)&&(c<=i&&i<=u||c<=o&&o<=u||i<c&&u<o);default:return!1}}}();!(x.ui.ddmanager={current:null,droppables:{default:[]},prepareOffsets:function(e,t){var n,r,i=x.ui.ddmanager.droppables[e.options.scope]||[],a=t?t.type:null,o=(e.currentItem||e.element).find(":data(ui-droppable)").addBack();e:for(n=0;n<i.length;n++)if(!(i[n].options.disabled||e&&!i[n].accept.call(i[n].element[0],e.currentItem||e.element))){for(r=0;r<o.length;r++)if(o[r]===i[n].element[0]){i[n].proportions().height=0;continue e}i[n].visible="none"!==i[n].element.css("display"),i[n].visible&&("mousedown"===a&&i[n]._activate.call(i[n],t),i[n].offset=i[n].element.offset(),i[n].proportions({width:i[n].element[0].offsetWidth,height:i[n].element[0].offsetHeight}))}},drop:function(e,t){var n=!1;return x.each((x.ui.ddmanager.droppables[e.options.scope]||[]).slice(),function(){this.options&&(!this.options.disabled&&this.visible&&v(e,this,this.options.tolerance,t)&&(n=this._drop.call(this,t)||n),!this.options.disabled&&this.visible&&this.accept.call(this.element[0],e.currentItem||e.element)&&(this.isout=!0,this.isover=!1,this._deactivate.call(this,t)))}),n},dragStart:function(e,t){e.element.parentsUntil("body").on("scroll.droppable",function(){e.options.refreshPositions||x.ui.ddmanager.prepareOffsets(e,t)})},drag:function(a,o){a.options.refreshPositions&&x.ui.ddmanager.prepareOffsets(a,o),x.each(x.ui.ddmanager.droppables[a.options.scope]||[],function(){if(!this.options.disabled&&!this.greedyChild&&this.visible){var e,t,n,r=v(a,this,this.options.tolerance,o),i=!r&&this.isover?"isout":r&&!this.isover?"isover":null;i&&(this.options.greedy&&(t=this.options.scope,(n=this.element.parents(":data(ui-droppable)").filter(function(){return x(this).droppable("instance").options.scope===t})).length&&((e=x(n[0]).droppable("instance")).greedyChild="isover"===i)),e&&"isover"===i&&(e.isover=!1,e.isout=!0,e._out.call(e,o)),this[i]=!0,this["isout"===i?"isover":"isout"]=!1,this["isover"===i?"_over":"_out"].call(this,o),e&&"isout"===i&&(e.isout=!1,e.isover=!0,e._over.call(e,o)))}})},dragStop:function(e,t){e.element.parentsUntil("body").off("scroll.droppable"),e.options.refreshPositions||x.ui.ddmanager.prepareOffsets(e,t)}})!==x.uiBackCompat&&x.widget("ui.droppable",x.ui.droppable,{options:{hoverClass:!1,activeClass:!1},_addActiveClass:function(){this._super(),this.options.activeClass&&this.element.addClass(this.options.activeClass)},_removeActiveClass:function(){this._super(),this.options.activeClass&&this.element.removeClass(this.options.activeClass)},_addHoverClass:function(){this._super(),this.options.hoverClass&&this.element.addClass(this.options.hoverClass)},_removeHoverClass:function(){this._super(),this.options.hoverClass&&this.element.removeClass(this.options.hoverClass)}});x.ui.droppable,x.widget("ui.progressbar",{version:"1.12.1",options:{classes:{"ui-progressbar":"ui-corner-all","ui-progressbar-value":"ui-corner-left","ui-progressbar-complete":"ui-corner-right"},max:100,value:0,change:null,complete:null},min:0,_create:function(){this.oldValue=this.options.value=this._constrainedValue(),this.element.attr({role:"progressbar","aria-valuemin":this.min}),this._addClass("ui-progressbar","ui-widget ui-widget-content"),this.valueDiv=x("<div>").appendTo(this.element),this._addClass(this.valueDiv,"ui-progressbar-value","ui-widget-header"),this._refreshValue()},_destroy:function(){this.element.removeAttr("role aria-valuemin aria-valuemax aria-valuenow"),this.valueDiv.remove()},value:function(e){if(void 0===e)return this.options.value;this.options.value=this._constrainedValue(e),this._refreshValue()},_constrainedValue:function(e){return void 0===e&&(e=this.options.value),this.indeterminate=!1===e,"number"!=typeof e&&(e=0),!this.indeterminate&&Math.min(this.options.max,Math.max(this.min,e))},_setOptions:function(e){var t=e.value;delete e.value,this._super(e),this.options.value=this._constrainedValue(t),this._refreshValue()},_setOption:function(e,t){"max"===e&&(t=Math.max(this.min,t)),this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this.element.attr("aria-disabled",e),this._toggleClass(null,"ui-state-disabled",!!e)},_percentage:function(){return this.indeterminate?100:100*(this.options.value-this.min)/(this.options.max-this.min)},_refreshValue:function(){var e=this.options.value,t=this._percentage();this.valueDiv.toggle(this.indeterminate||e>this.min).width(t.toFixed(0)+"%"),this._toggleClass(this.valueDiv,"ui-progressbar-complete",null,e===this.options.max)._toggleClass("ui-progressbar-indeterminate",null,this.indeterminate),this.indeterminate?(this.element.removeAttr("aria-valuenow"),this.overlayDiv||(this.overlayDiv=x("<div>").appendTo(this.valueDiv),this._addClass(this.overlayDiv,"ui-progressbar-overlay"))):(this.element.attr({"aria-valuemax":this.options.max,"aria-valuenow":e}),this.overlayDiv&&(this.overlayDiv.remove(),this.overlayDiv=null)),this.oldValue!==e&&(this.oldValue=e,this._trigger("change")),e===this.options.max&&this._trigger("complete")}}),x.widget("ui.selectable",x.ui.mouse,{version:"1.12.1",options:{appendTo:"body",autoRefresh:!0,distance:0,filter:"*",tolerance:"touch",selected:null,selecting:null,start:null,stop:null,unselected:null,unselecting:null},_create:function(){var r=this;this._addClass("ui-selectable"),this.dragged=!1,this.refresh=function(){r.elementPos=x(r.element[0]).offset(),r.selectees=x(r.options.filter,r.element[0]),r._addClass(r.selectees,"ui-selectee"),r.selectees.each(function(){var e=x(this),t=e.offset(),n={left:t.left-r.elementPos.left,top:t.top-r.elementPos.top};x.data(this,"selectable-item",{element:this,$element:e,left:n.left,top:n.top,right:n.left+e.outerWidth(),bottom:n.top+e.outerHeight(),startselected:!1,selected:e.hasClass("ui-selected"),selecting:e.hasClass("ui-selecting"),unselecting:e.hasClass("ui-unselecting")})})},this.refresh(),this._mouseInit(),this.helper=x("<div>"),this._addClass(this.helper,"ui-selectable-helper")},_destroy:function(){this.selectees.removeData("selectable-item"),this._mouseDestroy()},_mouseStart:function(n){var r=this,e=this.options;this.opos=[n.pageX,n.pageY],this.elementPos=x(this.element[0]).offset(),this.options.disabled||(this.selectees=x(e.filter,this.element[0]),this._trigger("start",n),x(e.appendTo).append(this.helper),this.helper.css({left:n.pageX,top:n.pageY,width:0,height:0}),e.autoRefresh&&this.refresh(),this.selectees.filter(".ui-selected").each(function(){var e=x.data(this,"selectable-item");e.startselected=!0,n.metaKey||n.ctrlKey||(r._removeClass(e.$element,"ui-selected"),e.selected=!1,r._addClass(e.$element,"ui-unselecting"),e.unselecting=!0,r._trigger("unselecting",n,{unselecting:e.element}))}),x(n.target).parents().addBack().each(function(){var e,t=x.data(this,"selectable-item");if(t)return e=!n.metaKey&&!n.ctrlKey||!t.$element.hasClass("ui-selected"),r._removeClass(t.$element,e?"ui-unselecting":"ui-selected")._addClass(t.$element,e?"ui-selecting":"ui-unselecting"),t.unselecting=!e,t.selecting=e,(t.selected=e)?r._trigger("selecting",n,{selecting:t.element}):r._trigger("unselecting",n,{unselecting:t.element}),!1}))},_mouseDrag:function(r){if(this.dragged=!0,!this.options.disabled){var e,i=this,a=this.options,o=this.opos[0],s=this.opos[1],c=r.pageX,l=r.pageY;return c<o&&(e=c,c=o,o=e),l<s&&(e=l,l=s,s=e),this.helper.css({left:o,top:s,width:c-o,height:l-s}),this.selectees.each(function(){var e=x.data(this,"selectable-item"),t=!1,n={};e&&e.element!==i.element[0]&&(n.left=e.left+i.elementPos.left,n.right=e.right+i.elementPos.left,n.top=e.top+i.elementPos.top,n.bottom=e.bottom+i.elementPos.top,"touch"===a.tolerance?t=!(n.left>c||n.right<o||n.top>l||n.bottom<s):"fit"===a.tolerance&&(t=n.left>o&&n.right<c&&n.top>s&&n.bottom<l),t?(e.selected&&(i._removeClass(e.$element,"ui-selected"),e.selected=!1),e.unselecting&&(i._removeClass(e.$element,"ui-unselecting"),e.unselecting=!1),e.selecting||(i._addClass(e.$element,"ui-selecting"),e.selecting=!0,i._trigger("selecting",r,{selecting:e.element}))):(e.selecting&&((r.metaKey||r.ctrlKey)&&e.startselected?(i._removeClass(e.$element,"ui-selecting"),e.selecting=!1,i._addClass(e.$element,"ui-selected"),e.selected=!0):(i._removeClass(e.$element,"ui-selecting"),e.selecting=!1,e.startselected&&(i._addClass(e.$element,"ui-unselecting"),e.unselecting=!0),i._trigger("unselecting",r,{unselecting:e.element}))),e.selected&&(r.metaKey||r.ctrlKey||e.startselected||(i._removeClass(e.$element,"ui-selected"),e.selected=!1,i._addClass(e.$element,"ui-unselecting"),e.unselecting=!0,i._trigger("unselecting",r,{unselecting:e.element})))))}),!1}},_mouseStop:function(t){var n=this;return this.dragged=!1,x(".ui-unselecting",this.element[0]).each(function(){var e=x.data(this,"selectable-item");n._removeClass(e.$element,"ui-unselecting"),e.unselecting=!1,e.startselected=!1,n._trigger("unselected",t,{unselected:e.element})}),x(".ui-selecting",this.element[0]).each(function(){var e=x.data(this,"selectable-item");n._removeClass(e.$element,"ui-selecting")._addClass(e.$element,"ui-selected"),e.selecting=!1,e.selected=!0,e.startselected=!0,n._trigger("selected",t,{selected:e.element})}),this._trigger("stop",t),this.helper.remove(),!1}}),x.widget("ui.selectmenu",[x.ui.formResetMixin,{version:"1.12.1",defaultElement:"<select>",options:{appendTo:null,classes:{"ui-selectmenu-button-open":"ui-corner-top","ui-selectmenu-button-closed":"ui-corner-all"},disabled:null,icons:{button:"ui-icon-triangle-1-s"},position:{my:"left top",at:"left bottom",collision:"none"},width:!1,change:null,close:null,focus:null,open:null,select:null},_create:function(){var e=this.element.uniqueId().attr("id");this.ids={element:e,button:e+"-button",menu:e+"-menu"},this._drawButton(),this._drawMenu(),this._bindFormResetHandler(),this._rendered=!1,this.menuItems=x()},_drawButton:function(){var e,t=this,n=this._parseOption(this.element.find("option:selected"),this.element[0].selectedIndex);this.labels=this.element.labels().attr("for",this.ids.button),this._on(this.labels,{click:function(e){this.button.focus(),e.preventDefault()}}),this.element.hide(),this.button=x("<span>",{tabindex:this.options.disabled?-1:0,id:this.ids.button,role:"combobox","aria-expanded":"false","aria-autocomplete":"list","aria-owns":this.ids.menu,"aria-haspopup":"true",title:this.element.attr("title")}).insertAfter(this.element),this._addClass(this.button,"ui-selectmenu-button ui-selectmenu-button-closed","ui-button ui-widget"),e=x("<span>").appendTo(this.button),this._addClass(e,"ui-selectmenu-icon","ui-icon "+this.options.icons.button),this.buttonItem=this._renderButtonItem(n).appendTo(this.button),!1!==this.options.width&&this._resizeButton(),this._on(this.button,this._buttonEvents),this.button.one("focusin",function(){t._rendered||t._refreshMenu()})},_drawMenu:function(){var r=this;this.menu=x("<ul>",{"aria-hidden":"true","aria-labelledby":this.ids.button,id:this.ids.menu}),this.menuWrap=x("<div>").append(this.menu),this._addClass(this.menuWrap,"ui-selectmenu-menu","ui-front"),this.menuWrap.appendTo(this._appendTo()),this.menuInstance=this.menu.menu({classes:{"ui-menu":"ui-corner-bottom"},role:"listbox",select:function(e,t){e.preventDefault(),r._setSelection(),r._select(t.item.data("ui-selectmenu-item"),e)},focus:function(e,t){var n=t.item.data("ui-selectmenu-item");null!=r.focusIndex&&n.index!==r.focusIndex&&(r._trigger("focus",e,{item:n}),r.isOpen||r._select(n,e)),r.focusIndex=n.index,r.button.attr("aria-activedescendant",r.menuItems.eq(n.index).attr("id"))}}).menu("instance"),this.menuInstance._off(this.menu,"mouseleave"),this.menuInstance._closeOnDocumentClick=function(){return!1},this.menuInstance._isDivider=function(){return!1}},refresh:function(){this._refreshMenu(),this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(this._getSelectedItem().data("ui-selectmenu-item")||{})),null===this.options.width&&this._resizeButton()},_refreshMenu:function(){var e,t=this.element.find("option");this.menu.empty(),this._parseOptions(t),this._renderMenu(this.menu,this.items),this.menuInstance.refresh(),this.menuItems=this.menu.find("li").not(".ui-selectmenu-optgroup").find(".ui-menu-item-wrapper"),this._rendered=!0,t.length&&(e=this._getSelectedItem(),this.menuInstance.focus(null,e),this._setAria(e.data("ui-selectmenu-item")),this._setOption("disabled",this.element.prop("disabled")))},open:function(e){this.options.disabled||(this._rendered?(this._removeClass(this.menu.find(".ui-state-active"),null,"ui-state-active"),this.menuInstance.focus(null,this._getSelectedItem())):this._refreshMenu(),this.menuItems.length&&(this.isOpen=!0,this._toggleAttr(),this._resizeMenu(),this._position(),this._on(this.document,this._documentClick),this._trigger("open",e)))},_position:function(){this.menuWrap.position(x.extend({of:this.button},this.options.position))},close:function(e){this.isOpen&&(this.isOpen=!1,this._toggleAttr(),this.range=null,this._off(this.document),this._trigger("close",e))},widget:function(){return this.button},menuWidget:function(){return this.menu},_renderButtonItem:function(e){var t=x("<span>");return this._setText(t,e.label),this._addClass(t,"ui-selectmenu-text"),t},_renderMenu:function(r,e){var i=this,a="";x.each(e,function(e,t){var n;t.optgroup!==a&&(n=x("<li>",{text:t.optgroup}),i._addClass(n,"ui-selectmenu-optgroup","ui-menu-divider"+(t.element.parent("optgroup").prop("disabled")?" ui-state-disabled":"")),n.appendTo(r),a=t.optgroup),i._renderItemData(r,t)})},_renderItemData:function(e,t){return this._renderItem(e,t).data("ui-selectmenu-item",t)},_renderItem:function(e,t){var n=x("<li>"),r=x("<div>",{title:t.element.attr("title")});return t.disabled&&this._addClass(n,null,"ui-state-disabled"),this._setText(r,t.label),n.append(r).appendTo(e)},_setText:function(e,t){t?e.text(t):e.html("&#160;")},_move:function(e,t){var n,r,i=".ui-menu-item";this.isOpen?n=this.menuItems.eq(this.focusIndex).parent("li"):(n=this.menuItems.eq(this.element[0].selectedIndex).parent("li"),i+=":not(.ui-state-disabled)"),(r="first"===e||"last"===e?n["first"===e?"prevAll":"nextAll"](i).eq(-1):n[e+"All"](i).eq(0)).length&&this.menuInstance.focus(t,r)},_getSelectedItem:function(){return this.menuItems.eq(this.element[0].selectedIndex).parent("li")},_toggle:function(e){this[this.isOpen?"close":"open"](e)},_setSelection:function(){var e;this.range&&(window.getSelection?((e=window.getSelection()).removeAllRanges(),e.addRange(this.range)):this.range.select(),this.button.focus())},_documentClick:{mousedown:function(e){this.isOpen&&(x(e.target).closest(".ui-selectmenu-menu, #"+x.ui.escapeSelector(this.ids.button)).length||this.close(e))}},_buttonEvents:{mousedown:function(){var e;window.getSelection?(e=window.getSelection()).rangeCount&&(this.range=e.getRangeAt(0)):this.range=document.selection.createRange()},click:function(e){this._setSelection(),this._toggle(e)},keydown:function(e){var t=!0;switch(e.keyCode){case x.ui.keyCode.TAB:case x.ui.keyCode.ESCAPE:this.close(e),t=!1;break;case x.ui.keyCode.ENTER:this.isOpen&&this._selectFocusedItem(e);break;case x.ui.keyCode.UP:e.altKey?this._toggle(e):this._move("prev",e);break;case x.ui.keyCode.DOWN:e.altKey?this._toggle(e):this._move("next",e);break;case x.ui.keyCode.SPACE:this.isOpen?this._selectFocusedItem(e):this._toggle(e);break;case x.ui.keyCode.LEFT:this._move("prev",e);break;case x.ui.keyCode.RIGHT:this._move("next",e);break;case x.ui.keyCode.HOME:case x.ui.keyCode.PAGE_UP:this._move("first",e);break;case x.ui.keyCode.END:case x.ui.keyCode.PAGE_DOWN:this._move("last",e);break;default:this.menu.trigger(e),t=!1}t&&e.preventDefault()}},_selectFocusedItem:function(e){var t=this.menuItems.eq(this.focusIndex).parent("li");t.hasClass("ui-state-disabled")||this._select(t.data("ui-selectmenu-item"),e)},_select:function(e,t){var n=this.element[0].selectedIndex;this.element[0].selectedIndex=e.index,this.buttonItem.replaceWith(this.buttonItem=this._renderButtonItem(e)),this._setAria(e),this._trigger("select",t,{item:e}),e.index!==n&&this._trigger("change",t,{item:e}),this.close(t)},_setAria:function(e){var t=this.menuItems.eq(e.index).attr("id");this.button.attr({"aria-labelledby":t,"aria-activedescendant":t}),this.menu.attr("aria-activedescendant",t)},_setOption:function(e,t){if("icons"===e){var n=this.button.find("span.ui-icon");this._removeClass(n,null,this.options.icons.button)._addClass(n,null,t.button)}this._super(e,t),"appendTo"===e&&this.menuWrap.appendTo(this._appendTo()),"width"===e&&this._resizeButton()},_setOptionDisabled:function(e){this._super(e),this.menuInstance.option("disabled",e),this.button.attr("aria-disabled",e),this._toggleClass(this.button,null,"ui-state-disabled",e),this.element.prop("disabled",e),e?(this.button.attr("tabindex",-1),this.close()):this.button.attr("tabindex",0)},_appendTo:function(){var e=this.options.appendTo;return e&&(e=e.jquery||e.nodeType?x(e):this.document.find(e).eq(0)),e&&e[0]||(e=this.element.closest(".ui-front, dialog")),e.length||(e=this.document[0].body),e},_toggleAttr:function(){this.button.attr("aria-expanded",this.isOpen),this._removeClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"closed":"open"))._addClass(this.button,"ui-selectmenu-button-"+(this.isOpen?"open":"closed"))._toggleClass(this.menuWrap,"ui-selectmenu-open",null,this.isOpen),this.menu.attr("aria-hidden",!this.isOpen)},_resizeButton:function(){var e=this.options.width;!1!==e?(null===e&&(e=this.element.show().outerWidth(),this.element.hide()),this.button.outerWidth(e)):this.button.css("width","")},_resizeMenu:function(){this.menu.outerWidth(Math.max(this.button.outerWidth(),this.menu.width("").outerWidth()+1))},_getCreateOptions:function(){var e=this._super();return e.disabled=this.element.prop("disabled"),e},_parseOptions:function(e){var n=this,r=[];e.each(function(e,t){r.push(n._parseOption(x(t),e))}),this.items=r},_parseOption:function(e,t){var n=e.parent("optgroup");return{element:e,index:t,value:e.val(),label:e.text(),optgroup:n.attr("label")||"",disabled:n.prop("disabled")||e.prop("disabled")}},_destroy:function(){this._unbindFormResetHandler(),this.menuWrap.remove(),this.button.remove(),this.element.show(),this.element.removeUniqueId(),this.labels.attr("for",this.ids.element)}}]),x.widget("ui.slider",x.ui.mouse,{version:"1.12.1",widgetEventPrefix:"slide",options:{animate:!1,classes:{"ui-slider":"ui-corner-all","ui-slider-handle":"ui-corner-all","ui-slider-range":"ui-corner-all ui-widget-header"},distance:0,max:100,min:0,orientation:"horizontal",range:!1,step:1,value:0,values:null,change:null,slide:null,start:null,stop:null},numPages:5,_create:function(){this._keySliding=!1,this._mouseSliding=!1,this._animateOff=!0,this._handleIndex=null,this._detectOrientation(),this._mouseInit(),this._calculateNewMax(),this._addClass("ui-slider ui-slider-"+this.orientation,"ui-widget ui-widget-content"),this._refresh(),this._animateOff=!1},_refresh:function(){this._createRange(),this._createHandles(),this._setupEvents(),this._refreshValue()},_createHandles:function(){var e,t,n=this.options,r=this.element.find(".ui-slider-handle"),i=[];for(t=n.values&&n.values.length||1,r.length>t&&(r.slice(t).remove(),r=r.slice(0,t)),e=r.length;e<t;e++)i.push("<span tabindex='0'></span>");this.handles=r.add(x(i.join("")).appendTo(this.element)),this._addClass(this.handles,"ui-slider-handle","ui-state-default"),this.handle=this.handles.eq(0),this.handles.each(function(e){x(this).data("ui-slider-handle-index",e).attr("tabIndex",0)})},_createRange:function(){var e=this.options;e.range?(!0===e.range&&(e.values?e.values.length&&2!==e.values.length?e.values=[e.values[0],e.values[0]]:x.isArray(e.values)&&(e.values=e.values.slice(0)):e.values=[this._valueMin(),this._valueMin()]),this.range&&this.range.length?(this._removeClass(this.range,"ui-slider-range-min ui-slider-range-max"),this.range.css({left:"",bottom:""})):(this.range=x("<div>").appendTo(this.element),this._addClass(this.range,"ui-slider-range")),"min"!==e.range&&"max"!==e.range||this._addClass(this.range,"ui-slider-range-"+e.range)):(this.range&&this.range.remove(),this.range=null)},_setupEvents:function(){this._off(this.handles),this._on(this.handles,this._handleEvents),this._hoverable(this.handles),this._focusable(this.handles)},_destroy:function(){this.handles.remove(),this.range&&this.range.remove(),this._mouseDestroy()},_mouseCapture:function(e){var t,n,r,i,a,o,s,c=this,l=this.options;return!l.disabled&&(this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()},this.elementOffset=this.element.offset(),t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t),r=this._valueMax()-this._valueMin()+1,this.handles.each(function(e){var t=Math.abs(n-c.values(e));(t<r||r===t&&(e===c._lastChangedValue||c.values(e)===l.min))&&(r=t,i=x(this),a=e)}),!1!==this._start(e,a)&&(this._mouseSliding=!0,this._handleIndex=a,this._addClass(i,null,"ui-state-active"),i.trigger("focus"),o=i.offset(),s=!x(e.target).parents().addBack().is(".ui-slider-handle"),this._clickOffset=s?{left:0,top:0}:{left:e.pageX-o.left-i.width()/2,top:e.pageY-o.top-i.height()/2-(parseInt(i.css("borderTopWidth"),10)||0)-(parseInt(i.css("borderBottomWidth"),10)||0)+(parseInt(i.css("marginTop"),10)||0)},this.handles.hasClass("ui-state-hover")||this._slide(e,a,n),this._animateOff=!0))},_mouseStart:function(){return!0},_mouseDrag:function(e){var t={x:e.pageX,y:e.pageY},n=this._normValueFromMouse(t);return this._slide(e,this._handleIndex,n),!1},_mouseStop:function(e){return this._removeClass(this.handles,null,"ui-state-active"),this._mouseSliding=!1,this._stop(e,this._handleIndex),this._change(e,this._handleIndex),this._handleIndex=null,this._clickOffset=null,this._animateOff=!1},_detectOrientation:function(){this.orientation="vertical"===this.options.orientation?"vertical":"horizontal"},_normValueFromMouse:function(e){var t,n,r,i;return 1<(n=("horizontal"===this.orientation?(t=this.elementSize.width,e.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)):(t=this.elementSize.height,e.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)))/t)&&(n=1),n<0&&(n=0),"vertical"===this.orientation&&(n=1-n),r=this._valueMax()-this._valueMin(),i=this._valueMin()+n*r,this._trimAlignValue(i)},_uiHash:function(e,t,n){var r={handle:this.handles[e],handleIndex:e,value:void 0!==t?t:this.value()};return this._hasMultipleValues()&&(r.value=void 0!==t?t:this.values(e),r.values=n||this.values()),r},_hasMultipleValues:function(){return this.options.values&&this.options.values.length},_start:function(e,t){return this._trigger("start",e,this._uiHash(t))},_slide:function(e,t,n){var r,i=this.value(),a=this.values();this._hasMultipleValues()&&(r=this.values(t?0:1),i=this.values(t),2===this.options.values.length&&!0===this.options.range&&(n=0===t?Math.min(r,n):Math.max(r,n)),a[t]=n),n!==i&&!1!==this._trigger("slide",e,this._uiHash(t,n,a))&&(this._hasMultipleValues()?this.values(t,n):this.value(n))},_stop:function(e,t){this._trigger("stop",e,this._uiHash(t))},_change:function(e,t){this._keySliding||this._mouseSliding||(this._lastChangedValue=t,this._trigger("change",e,this._uiHash(t)))},value:function(e){return arguments.length?(this.options.value=this._trimAlignValue(e),this._refreshValue(),void this._change(null,0)):this._value()},values:function(e,t){var n,r,i;if(1<arguments.length)return this.options.values[e]=this._trimAlignValue(t),this._refreshValue(),void this._change(null,e);if(!arguments.length)return this._values();if(!x.isArray(e))return this._hasMultipleValues()?this._values(e):this.value();for(n=this.options.values,r=e,i=0;i<n.length;i+=1)n[i]=this._trimAlignValue(r[i]),this._change(null,i);this._refreshValue()},_setOption:function(e,t){var n,r=0;switch("range"===e&&!0===this.options.range&&("min"===t?(this.options.value=this._values(0),this.options.values=null):"max"===t&&(this.options.value=this._values(this.options.values.length-1),this.options.values=null)),x.isArray(this.options.values)&&(r=this.options.values.length),this._super(e,t),e){case"orientation":this._detectOrientation(),this._removeClass("ui-slider-horizontal ui-slider-vertical")._addClass("ui-slider-"+this.orientation),this._refreshValue(),this.options.range&&this._refreshRange(t),this.handles.css("horizontal"===t?"bottom":"left","");break;case"value":this._animateOff=!0,this._refreshValue(),this._change(null,0),this._animateOff=!1;break;case"values":for(this._animateOff=!0,this._refreshValue(),n=r-1;0<=n;n--)this._change(null,n);this._animateOff=!1;break;case"step":case"min":case"max":this._animateOff=!0,this._calculateNewMax(),this._refreshValue(),this._animateOff=!1;break;case"range":this._animateOff=!0,this._refresh(),this._animateOff=!1}},_setOptionDisabled:function(e){this._super(e),this._toggleClass(null,"ui-state-disabled",!!e)},_value:function(){var e=this.options.value;return e=this._trimAlignValue(e)},_values:function(e){var t,n,r;if(arguments.length)return t=this.options.values[e],t=this._trimAlignValue(t);if(this._hasMultipleValues()){for(n=this.options.values.slice(),r=0;r<n.length;r+=1)n[r]=this._trimAlignValue(n[r]);return n}return[]},_trimAlignValue:function(e){if(e<=this._valueMin())return this._valueMin();if(e>=this._valueMax())return this._valueMax();var t=0<this.options.step?this.options.step:1,n=(e-this._valueMin())%t,r=e-n;return 2*Math.abs(n)>=t&&(r+=0<n?t:-t),parseFloat(r.toFixed(5))},_calculateNewMax:function(){var e=this.options.max,t=this._valueMin(),n=this.options.step;(e=Math.round((e-t)/n)*n+t)>this.options.max&&(e-=n),this.max=parseFloat(e.toFixed(this._precision()))},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return-1===n?0:t.length-n-1},_valueMin:function(){return this.options.min},_valueMax:function(){return this.max},_refreshRange:function(e){"vertical"===e&&this.range.css({width:"",left:""}),"horizontal"===e&&this.range.css({height:"",bottom:""})},_refreshValue:function(){var t,n,e,r,i,a=this.options.range,o=this.options,s=this,c=!this._animateOff&&o.animate,l={};this._hasMultipleValues()?this.handles.each(function(e){n=(s.values(e)-s._valueMin())/(s._valueMax()-s._valueMin())*100,l["horizontal"===s.orientation?"left":"bottom"]=n+"%",x(this).stop(1,1)[c?"animate":"css"](l,o.animate),!0===s.options.range&&("horizontal"===s.orientation?(0===e&&s.range.stop(1,1)[c?"animate":"css"]({left:n+"%"},o.animate),1===e&&s.range[c?"animate":"css"]({width:n-t+"%"},{queue:!1,duration:o.animate})):(0===e&&s.range.stop(1,1)[c?"animate":"css"]({bottom:n+"%"},o.animate),1===e&&s.range[c?"animate":"css"]({height:n-t+"%"},{queue:!1,duration:o.animate}))),t=n}):(e=this.value(),r=this._valueMin(),i=this._valueMax(),n=i!==r?(e-r)/(i-r)*100:0,l["horizontal"===this.orientation?"left":"bottom"]=n+"%",this.handle.stop(1,1)[c?"animate":"css"](l,o.animate),"min"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:n+"%"},o.animate),"max"===a&&"horizontal"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({width:100-n+"%"},o.animate),"min"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:n+"%"},o.animate),"max"===a&&"vertical"===this.orientation&&this.range.stop(1,1)[c?"animate":"css"]({height:100-n+"%"},o.animate))},_handleEvents:{keydown:function(e){var t,n,r,i=x(e.target).data("ui-slider-handle-index");switch(e.keyCode){case x.ui.keyCode.HOME:case x.ui.keyCode.END:case x.ui.keyCode.PAGE_UP:case x.ui.keyCode.PAGE_DOWN:case x.ui.keyCode.UP:case x.ui.keyCode.RIGHT:case x.ui.keyCode.DOWN:case x.ui.keyCode.LEFT:if(e.preventDefault(),!this._keySliding&&(this._keySliding=!0,this._addClass(x(e.target),null,"ui-state-active"),!1===this._start(e,i)))return}switch(r=this.options.step,t=n=this._hasMultipleValues()?this.values(i):this.value(),e.keyCode){case x.ui.keyCode.HOME:n=this._valueMin();break;case x.ui.keyCode.END:n=this._valueMax();break;case x.ui.keyCode.PAGE_UP:n=this._trimAlignValue(t+(this._valueMax()-this._valueMin())/this.numPages);break;case x.ui.keyCode.PAGE_DOWN:n=this._trimAlignValue(t-(this._valueMax()-this._valueMin())/this.numPages);break;case x.ui.keyCode.UP:case x.ui.keyCode.RIGHT:if(t===this._valueMax())return;n=this._trimAlignValue(t+r);break;case x.ui.keyCode.DOWN:case x.ui.keyCode.LEFT:if(t===this._valueMin())return;n=this._trimAlignValue(t-r)}this._slide(e,i,n)},keyup:function(e){var t=x(e.target).data("ui-slider-handle-index");this._keySliding&&(this._keySliding=!1,this._stop(e,t),this._change(e,t),this._removeClass(x(e.target),null,"ui-state-active"))}}}),x.widget("ui.sortable",x.ui.mouse,{version:"1.12.1",widgetEventPrefix:"sort",ready:!1,options:{appendTo:"parent",axis:!1,connectWith:!1,containment:!1,cursor:"auto",cursorAt:!1,dropOnEmpty:!0,forcePlaceholderSize:!1,forceHelperSize:!1,grid:!1,handle:!1,helper:"original",items:"> *",opacity:!1,placeholder:!1,revert:!1,scroll:!0,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(e,t,n){return t<=e&&e<t+n},_isFloating:function(e){return/left|right/.test(e.css("float"))||/inline|table-cell/.test(e.css("display"))},_create:function(){this.containerCache={},this._addClass("ui-sortable"),this.refresh(),this.offset=this.element.offset(),this._mouseInit(),this._setHandleClassName(),this.ready=!0},_setOption:function(e,t){this._super(e,t),"handle"===e&&this._setHandleClassName()},_setHandleClassName:function(){var e=this;this._removeClass(this.element.find(".ui-sortable-handle"),"ui-sortable-handle"),x.each(this.items,function(){e._addClass(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item,"ui-sortable-handle")})},_destroy:function(){this._mouseDestroy();for(var e=this.items.length-1;0<=e;e--)this.items[e].item.removeData(this.widgetName+"-item");return this},_mouseCapture:function(e,t){var n=null,r=!1,i=this;return!this.reverting&&(!this.options.disabled&&"static"!==this.options.type&&(this._refreshItems(e),x(e.target).parents().each(function(){if(x.data(this,i.widgetName+"-item")===i)return n=x(this),!1}),x.data(e.target,i.widgetName+"-item")===i&&(n=x(e.target)),!!n&&(!(this.options.handle&&!t&&(x(this.options.handle,n).find("*").addBack().each(function(){this===e.target&&(r=!0)}),!r))&&(this.currentItem=n,this._removeCurrentsFromItems(),!0))))},_mouseStart:function(e,t,n){var r,i,a=this.options;if((this.currentContainer=this).refreshPositions(),this.helper=this._createHelper(e),this._cacheHelperProportions(),this._cacheMargins(),this.scrollParent=this.helper.scrollParent(),this.offset=this.currentItem.offset(),this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left},x.extend(this.offset,{click:{left:e.pageX-this.offset.left,top:e.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}),this.helper.css("position","absolute"),this.cssPosition=this.helper.css("position"),this.originalPosition=this._generatePosition(e),this.originalPageX=e.pageX,this.originalPageY=e.pageY,a.cursorAt&&this._adjustOffsetFromHelper(a.cursorAt),this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]},this.helper[0]!==this.currentItem[0]&&this.currentItem.hide(),this._createPlaceholder(),a.containment&&this._setContainment(),a.cursor&&"auto"!==a.cursor&&(i=this.document.find("body"),this.storedCursor=i.css("cursor"),i.css("cursor",a.cursor),this.storedStylesheet=x("<style>*{ cursor: "+a.cursor+" !important; }</style>").appendTo(i)),a.opacity&&(this.helper.css("opacity")&&(this._storedOpacity=this.helper.css("opacity")),this.helper.css("opacity",a.opacity)),a.zIndex&&(this.helper.css("zIndex")&&(this._storedZIndex=this.helper.css("zIndex")),this.helper.css("zIndex",a.zIndex)),this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName&&(this.overflowOffset=this.scrollParent.offset()),this._trigger("start",e,this._uiHash()),this._preserveHelperProportions||this._cacheHelperProportions(),!n)for(r=this.containers.length-1;0<=r;r--)this.containers[r]._trigger("activate",e,this._uiHash(this));return x.ui.ddmanager&&(x.ui.ddmanager.current=this),x.ui.ddmanager&&!a.dropBehaviour&&x.ui.ddmanager.prepareOffsets(this,e),this.dragging=!0,this._addClass(this.helper,"ui-sortable-helper"),this._mouseDrag(e),!0},_mouseDrag:function(e){var t,n,r,i,a=this.options,o=!1;for(this.position=this._generatePosition(e),this.positionAbs=this._convertPositionTo("absolute"),this.lastPositionAbs||(this.lastPositionAbs=this.positionAbs),this.options.scroll&&(this.scrollParent[0]!==this.document[0]&&"HTML"!==this.scrollParent[0].tagName?(this.overflowOffset.top+this.scrollParent[0].offsetHeight-e.pageY<a.scrollSensitivity?this.scrollParent[0].scrollTop=o=this.scrollParent[0].scrollTop+a.scrollSpeed:e.pageY-this.overflowOffset.top<a.scrollSensitivity&&(this.scrollParent[0].scrollTop=o=this.scrollParent[0].scrollTop-a.scrollSpeed),this.overflowOffset.left+this.scrollParent[0].offsetWidth-e.pageX<a.scrollSensitivity?this.scrollParent[0].scrollLeft=o=this.scrollParent[0].scrollLeft+a.scrollSpeed:e.pageX-this.overflowOffset.left<a.scrollSensitivity&&(this.scrollParent[0].scrollLeft=o=this.scrollParent[0].scrollLeft-a.scrollSpeed)):(e.pageY-this.document.scrollTop()<a.scrollSensitivity?o=this.document.scrollTop(this.document.scrollTop()-a.scrollSpeed):this.window.height()-(e.pageY-this.document.scrollTop())<a.scrollSensitivity&&(o=this.document.scrollTop(this.document.scrollTop()+a.scrollSpeed)),e.pageX-this.document.scrollLeft()<a.scrollSensitivity?o=this.document.scrollLeft(this.document.scrollLeft()-a.scrollSpeed):this.window.width()-(e.pageX-this.document.scrollLeft())<a.scrollSensitivity&&(o=this.document.scrollLeft(this.document.scrollLeft()+a.scrollSpeed))),!1!==o&&x.ui.ddmanager&&!a.dropBehaviour&&x.ui.ddmanager.prepareOffsets(this,e)),this.positionAbs=this._convertPositionTo("absolute"),this.options.axis&&"y"===this.options.axis||(this.helper[0].style.left=this.position.left+"px"),this.options.axis&&"x"===this.options.axis||(this.helper[0].style.top=this.position.top+"px"),t=this.items.length-1;0<=t;t--)if(r=(n=this.items[t]).item[0],(i=this._intersectsWithPointer(n))&&n.instance===this.currentContainer&&!(r===this.currentItem[0]||this.placeholder[1===i?"next":"prev"]()[0]===r||x.contains(this.placeholder[0],r)||"semi-dynamic"===this.options.type&&x.contains(this.element[0],r))){if(this.direction=1===i?"down":"up","pointer"!==this.options.tolerance&&!this._intersectsWithSides(n))break;this._rearrange(e,n),this._trigger("change",e,this._uiHash());break}return this._contactContainers(e),x.ui.ddmanager&&x.ui.ddmanager.drag(this,e),this._trigger("sort",e,this._uiHash()),this.lastPositionAbs=this.positionAbs,!1},_mouseStop:function(e,t){if(e){if(x.ui.ddmanager&&!this.options.dropBehaviour&&x.ui.ddmanager.drop(this,e),this.options.revert){var n=this,r=this.placeholder.offset(),i=this.options.axis,a={};i&&"x"!==i||(a.left=r.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollLeft)),i&&"y"!==i||(a.top=r.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===this.document[0].body?0:this.offsetParent[0].scrollTop)),this.reverting=!0,x(this.helper).animate(a,parseInt(this.options.revert,10)||500,function(){n._clear(e)})}else this._clear(e,t);return!1}},cancel:function(){if(this.dragging){this._mouseUp(new x.Event("mouseup",{target:null})),"original"===this.options.helper?(this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")):this.currentItem.show();for(var e=this.containers.length-1;0<=e;e--)this.containers[e]._trigger("deactivate",null,this._uiHash(this)),this.containers[e].containerCache.over&&(this.containers[e]._trigger("out",null,this._uiHash(this)),this.containers[e].containerCache.over=0)}return this.placeholder&&(this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]),"original"!==this.options.helper&&this.helper&&this.helper[0].parentNode&&this.helper.remove(),x.extend(this,{helper:null,dragging:!1,reverting:!1,_noFinalSort:null}),this.domPosition.prev?x(this.domPosition.prev).after(this.currentItem):x(this.domPosition.parent).prepend(this.currentItem)),this},serialize:function(t){var e=this._getItemsAsjQuery(t&&t.connected),n=[];return t=t||{},x(e).each(function(){var e=(x(t.item||this).attr(t.attribute||"id")||"").match(t.expression||/(.+)[\-=_](.+)/);e&&n.push((t.key||e[1]+"[]")+"="+(t.key&&t.expression?e[1]:e[2]))}),!n.length&&t.key&&n.push(t.key+"="),n.join("&")},toArray:function(e){var t=this._getItemsAsjQuery(e&&e.connected),n=[];return e=e||{},t.each(function(){n.push(x(e.item||this).attr(e.attribute||"id")||"")}),n},_intersectsWith:function(e){var t=this.positionAbs.left,n=t+this.helperProportions.width,r=this.positionAbs.top,i=r+this.helperProportions.height,a=e.left,o=a+e.width,s=e.top,c=s+e.height,l=this.offset.click.top,u=this.offset.click.left,f="x"===this.options.axis||s<r+l&&r+l<c,d="y"===this.options.axis||a<t+u&&t+u<o,h=f&&d;return"pointer"===this.options.tolerance||this.options.forcePointerForContainers||"pointer"!==this.options.tolerance&&this.helperProportions[this.floating?"width":"height"]>e[this.floating?"width":"height"]?h:a<t+this.helperProportions.width/2&&n-this.helperProportions.width/2<o&&s<r+this.helperProportions.height/2&&i-this.helperProportions.height/2<c},_intersectsWithPointer:function(e){var t,n,r="x"===this.options.axis||this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top,e.height),i="y"===this.options.axis||this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left,e.width);return!(!r||!i)&&(t=this._getDragVerticalDirection(),n=this._getDragHorizontalDirection(),this.floating?"right"===n||"down"===t?2:1:t&&("down"===t?2:1))},_intersectsWithSides:function(e){var t=this._isOverAxis(this.positionAbs.top+this.offset.click.top,e.top+e.height/2,e.height),n=this._isOverAxis(this.positionAbs.left+this.offset.click.left,e.left+e.width/2,e.width),r=this._getDragVerticalDirection(),i=this._getDragHorizontalDirection();return this.floating&&i?"right"===i&&n||"left"===i&&!n:r&&("down"===r&&t||"up"===r&&!t)},_getDragVerticalDirection:function(){var e=this.positionAbs.top-this.lastPositionAbs.top;return 0!==e&&(0<e?"down":"up")},_getDragHorizontalDirection:function(){var e=this.positionAbs.left-this.lastPositionAbs.left;return 0!==e&&(0<e?"right":"left")},refresh:function(e){return this._refreshItems(e),this._setHandleClassName(),this.refreshPositions(),this},_connectWith:function(){var e=this.options;return e.connectWith.constructor===String?[e.connectWith]:e.connectWith},_getItemsAsjQuery:function(e){var t,n,r,i,a=[],o=[],s=this._connectWith();if(s&&e)for(t=s.length-1;0<=t;t--)for(n=(r=x(s[t],this.document[0])).length-1;0<=n;n--)(i=x.data(r[n],this.widgetFullName))&&i!==this&&!i.options.disabled&&o.push([x.isFunction(i.options.items)?i.options.items.call(i.element):x(i.options.items,i.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),i]);function c(){a.push(this)}for(o.push([x.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):x(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]),t=o.length-1;0<=t;t--)o[t][0].each(c);return x(a)},_removeCurrentsFromItems:function(){var n=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=x.grep(this.items,function(e){for(var t=0;t<n.length;t++)if(n[t]===e.item[0])return!1;return!0})},_refreshItems:function(e){this.items=[],this.containers=[this];var t,n,r,i,a,o,s,c,l=this.items,u=[[x.isFunction(this.options.items)?this.options.items.call(this.element[0],e,{item:this.currentItem}):x(this.options.items,this.element),this]],f=this._connectWith();if(f&&this.ready)for(t=f.length-1;0<=t;t--)for(n=(r=x(f[t],this.document[0])).length-1;0<=n;n--)(i=x.data(r[n],this.widgetFullName))&&i!==this&&!i.options.disabled&&(u.push([x.isFunction(i.options.items)?i.options.items.call(i.element[0],e,{item:this.currentItem}):x(i.options.items,i.element),i]),this.containers.push(i));for(t=u.length-1;0<=t;t--)for(a=u[t][1],n=0,c=(o=u[t][0]).length;n<c;n++)(s=x(o[n])).data(this.widgetName+"-item",a),l.push({item:s,instance:a,width:0,height:0,left:0,top:0})},refreshPositions:function(e){var t,n,r,i;for(this.floating=!!this.items.length&&("x"===this.options.axis||this._isFloating(this.items[0].item)),this.offsetParent&&this.helper&&(this.offset.parent=this._getParentOffset()),t=this.items.length-1;0<=t;t--)(n=this.items[t]).instance!==this.currentContainer&&this.currentContainer&&n.item[0]!==this.currentItem[0]||(r=this.options.toleranceElement?x(this.options.toleranceElement,n.item):n.item,e||(n.width=r.outerWidth(),n.height=r.outerHeight()),i=r.offset(),n.left=i.left,n.top=i.top);if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(t=this.containers.length-1;0<=t;t--)i=this.containers[t].element.offset(),this.containers[t].containerCache.left=i.left,this.containers[t].containerCache.top=i.top,this.containers[t].containerCache.width=this.containers[t].element.outerWidth(),this.containers[t].containerCache.height=this.containers[t].element.outerHeight();return this},_createPlaceholder:function(n){var r,i=(n=n||this).options;i.placeholder&&i.placeholder.constructor!==String||(r=i.placeholder,i.placeholder={element:function(){var e=n.currentItem[0].nodeName.toLowerCase(),t=x("<"+e+">",n.document[0]);return n._addClass(t,"ui-sortable-placeholder",r||n.currentItem[0].className)._removeClass(t,"ui-sortable-helper"),"tbody"===e?n._createTrPlaceholder(n.currentItem.find("tr").eq(0),x("<tr>",n.document[0]).appendTo(t)):"tr"===e?n._createTrPlaceholder(n.currentItem,t):"img"===e&&t.attr("src",n.currentItem.attr("src")),r||t.css("visibility","hidden"),t},update:function(e,t){r&&!i.forcePlaceholderSize||(t.height()||t.height(n.currentItem.innerHeight()-parseInt(n.currentItem.css("paddingTop")||0,10)-parseInt(n.currentItem.css("paddingBottom")||0,10)),t.width()||t.width(n.currentItem.innerWidth()-parseInt(n.currentItem.css("paddingLeft")||0,10)-parseInt(n.currentItem.css("paddingRight")||0,10)))}}),n.placeholder=x(i.placeholder.element.call(n.element,n.currentItem)),n.currentItem.after(n.placeholder),i.placeholder.update(n,n.placeholder)},_createTrPlaceholder:function(e,t){var n=this;e.children().each(function(){x("<td>&#160;</td>",n.document[0]).attr("colspan",x(this).attr("colspan")||1).appendTo(t)})},_contactContainers:function(e){var t,n,r,i,a,o,s,c,l,u,f=null,d=null;for(t=this.containers.length-1;0<=t;t--)if(!x.contains(this.currentItem[0],this.containers[t].element[0]))if(this._intersectsWith(this.containers[t].containerCache)){if(f&&x.contains(this.containers[t].element[0],f.element[0]))continue;f=this.containers[t],d=t}else this.containers[t].containerCache.over&&(this.containers[t]._trigger("out",e,this._uiHash(this)),this.containers[t].containerCache.over=0);if(f)if(1===this.containers.length)this.containers[d].containerCache.over||(this.containers[d]._trigger("over",e,this._uiHash(this)),this.containers[d].containerCache.over=1);else{for(r=1e4,i=null,a=(l=f.floating||this._isFloating(this.currentItem))?"left":"top",o=l?"width":"height",u=l?"pageX":"pageY",n=this.items.length-1;0<=n;n--)x.contains(this.containers[d].element[0],this.items[n].item[0])&&this.items[n].item[0]!==this.currentItem[0]&&(s=this.items[n].item.offset()[a],c=!1,e[u]-s>this.items[n][o]/2&&(c=!0),Math.abs(e[u]-s)<r&&(r=Math.abs(e[u]-s),i=this.items[n],this.direction=c?"up":"down"));if(!i&&!this.options.dropOnEmpty)return;if(this.currentContainer===this.containers[d])return void(this.currentContainer.containerCache.over||(this.containers[d]._trigger("over",e,this._uiHash()),this.currentContainer.containerCache.over=1));i?this._rearrange(e,i,null,!0):this._rearrange(e,null,this.containers[d].element,!0),this._trigger("change",e,this._uiHash()),this.containers[d]._trigger("change",e,this._uiHash(this)),this.currentContainer=this.containers[d],this.options.placeholder.update(this.currentContainer,this.placeholder),this.containers[d]._trigger("over",e,this._uiHash(this)),this.containers[d].containerCache.over=1}},_createHelper:function(e){var t=this.options,n=x.isFunction(t.helper)?x(t.helper.apply(this.element[0],[e,this.currentItem])):"clone"===t.helper?this.currentItem.clone():this.currentItem;return n.parents("body").length||x("parent"!==t.appendTo?t.appendTo:this.currentItem[0].parentNode)[0].appendChild(n[0]),n[0]===this.currentItem[0]&&(this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}),n[0].style.width&&!t.forceHelperSize||n.width(this.currentItem.width()),n[0].style.height&&!t.forceHelperSize||n.height(this.currentItem.height()),n},_adjustOffsetFromHelper:function(e){"string"==typeof e&&(e=e.split(" ")),x.isArray(e)&&(e={left:+e[0],top:+e[1]||0}),"left"in e&&(this.offset.click.left=e.left+this.margins.left),"right"in e&&(this.offset.click.left=this.helperProportions.width-e.right+this.margins.left),"top"in e&&(this.offset.click.top=e.top+this.margins.top),"bottom"in e&&(this.offset.click.top=this.helperProportions.height-e.bottom+this.margins.top)},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var e=this.offsetParent.offset();return"absolute"===this.cssPosition&&this.scrollParent[0]!==this.document[0]&&x.contains(this.scrollParent[0],this.offsetParent[0])&&(e.left+=this.scrollParent.scrollLeft(),e.top+=this.scrollParent.scrollTop()),(this.offsetParent[0]===this.document[0].body||this.offsetParent[0].tagName&&"html"===this.offsetParent[0].tagName.toLowerCase()&&x.ui.ie)&&(e={top:0,left:0}),{top:e.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:e.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if("relative"!==this.cssPosition)return{top:0,left:0};var e=this.currentItem.position();return{top:e.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:e.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var e,t,n,r=this.options;"parent"===r.containment&&(r.containment=this.helper[0].parentNode),"document"!==r.containment&&"window"!==r.containment||(this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,"document"===r.containment?this.document.width():this.window.width()-this.helperProportions.width-this.margins.left,("document"===r.containment?this.document.height()||document.body.parentNode.scrollHeight:this.window.height()||this.document[0].body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]),/^(document|window|parent)$/.test(r.containment)||(e=x(r.containment)[0],t=x(r.containment).offset(),n="hidden"!==x(e).css("overflow"),this.containment=[t.left+(parseInt(x(e).css("borderLeftWidth"),10)||0)+(parseInt(x(e).css("paddingLeft"),10)||0)-this.margins.left,t.top+(parseInt(x(e).css("borderTopWidth"),10)||0)+(parseInt(x(e).css("paddingTop"),10)||0)-this.margins.top,t.left+(n?Math.max(e.scrollWidth,e.offsetWidth):e.offsetWidth)-(parseInt(x(e).css("borderLeftWidth"),10)||0)-(parseInt(x(e).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,t.top+(n?Math.max(e.scrollHeight,e.offsetHeight):e.offsetHeight)-(parseInt(x(e).css("borderTopWidth"),10)||0)-(parseInt(x(e).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top])},_convertPositionTo:function(e,t){t||(t=this.position);var n="absolute"===e?1:-1,r="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&x.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,i=/(html|body)/i.test(r[0].tagName);return{top:t.top+this.offset.relative.top*n+this.offset.parent.top*n-("fixed"===this.cssPosition?-this.scrollParent.scrollTop():i?0:r.scrollTop())*n,left:t.left+this.offset.relative.left*n+this.offset.parent.left*n-("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():i?0:r.scrollLeft())*n}},_generatePosition:function(e){var t,n,r=this.options,i=e.pageX,a=e.pageY,o="absolute"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&x.contains(this.scrollParent[0],this.offsetParent[0])?this.scrollParent:this.offsetParent,s=/(html|body)/i.test(o[0].tagName);return"relative"!==this.cssPosition||this.scrollParent[0]!==this.document[0]&&this.scrollParent[0]!==this.offsetParent[0]||(this.offset.relative=this._getRelativeOffset()),this.originalPosition&&(this.containment&&(e.pageX-this.offset.click.left<this.containment[0]&&(i=this.containment[0]+this.offset.click.left),e.pageY-this.offset.click.top<this.containment[1]&&(a=this.containment[1]+this.offset.click.top),e.pageX-this.offset.click.left>this.containment[2]&&(i=this.containment[2]+this.offset.click.left),e.pageY-this.offset.click.top>this.containment[3]&&(a=this.containment[3]+this.offset.click.top)),r.grid&&(t=this.originalPageY+Math.round((a-this.originalPageY)/r.grid[1])*r.grid[1],a=this.containment?t-this.offset.click.top>=this.containment[1]&&t-this.offset.click.top<=this.containment[3]?t:t-this.offset.click.top>=this.containment[1]?t-r.grid[1]:t+r.grid[1]:t,n=this.originalPageX+Math.round((i-this.originalPageX)/r.grid[0])*r.grid[0],i=this.containment?n-this.offset.click.left>=this.containment[0]&&n-this.offset.click.left<=this.containment[2]?n:n-this.offset.click.left>=this.containment[0]?n-r.grid[0]:n+r.grid[0]:n)),{top:a-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+("fixed"===this.cssPosition?-this.scrollParent.scrollTop():s?0:o.scrollTop()),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+("fixed"===this.cssPosition?-this.scrollParent.scrollLeft():s?0:o.scrollLeft())}},_rearrange:function(e,t,n,r){n?n[0].appendChild(this.placeholder[0]):t.item[0].parentNode.insertBefore(this.placeholder[0],"down"===this.direction?t.item[0]:t.item[0].nextSibling),this.counter=this.counter?++this.counter:1;var i=this.counter;this._delay(function(){i===this.counter&&this.refreshPositions(!r)})},_clear:function(e,t){this.reverting=!1;var n,r=[];if(!this._noFinalSort&&this.currentItem.parent().length&&this.placeholder.before(this.currentItem),this._noFinalSort=null,this.helper[0]===this.currentItem[0]){for(n in this._storedCSS)"auto"!==this._storedCSS[n]&&"static"!==this._storedCSS[n]||(this._storedCSS[n]="");this.currentItem.css(this._storedCSS),this._removeClass(this.currentItem,"ui-sortable-helper")}else this.currentItem.show();function i(t,n,r){return function(e){r._trigger(t,e,n._uiHash(n))}}for(this.fromOutside&&!t&&r.push(function(e){this._trigger("receive",e,this._uiHash(this.fromOutside))}),!this.fromOutside&&this.domPosition.prev===this.currentItem.prev().not(".ui-sortable-helper")[0]&&this.domPosition.parent===this.currentItem.parent()[0]||t||r.push(function(e){this._trigger("update",e,this._uiHash())}),this!==this.currentContainer&&(t||(r.push(function(e){this._trigger("remove",e,this._uiHash())}),r.push(function(t){return function(e){t._trigger("receive",e,this._uiHash(this))}}.call(this,this.currentContainer)),r.push(function(t){return function(e){t._trigger("update",e,this._uiHash(this))}}.call(this,this.currentContainer)))),n=this.containers.length-1;0<=n;n--)t||r.push(i("deactivate",this,this.containers[n])),this.containers[n].containerCache.over&&(r.push(i("out",this,this.containers[n])),this.containers[n].containerCache.over=0);if(this.storedCursor&&(this.document.find("body").css("cursor",this.storedCursor),this.storedStylesheet.remove()),this._storedOpacity&&this.helper.css("opacity",this._storedOpacity),this._storedZIndex&&this.helper.css("zIndex","auto"===this._storedZIndex?"":this._storedZIndex),this.dragging=!1,t||this._trigger("beforeStop",e,this._uiHash()),this.placeholder[0].parentNode.removeChild(this.placeholder[0]),this.cancelHelperRemoval||(this.helper[0]!==this.currentItem[0]&&this.helper.remove(),this.helper=null),!t){for(n=0;n<r.length;n++)r[n].call(this,e);this._trigger("stop",e,this._uiHash())}return this.fromOutside=!1,!this.cancelHelperRemoval},_trigger:function(){!1===x.Widget.prototype._trigger.apply(this,arguments)&&this.cancel()},_uiHash:function(e){var t=e||this;return{helper:t.helper,placeholder:t.placeholder||x([]),position:t.position,originalPosition:t.originalPosition,offset:t.positionAbs,item:t.currentItem,sender:e?e.element:null}}});function y(t){return function(){var e=this.element.val();t.apply(this,arguments),this._refresh(),e!==this.element.val()&&this._trigger("change")}}x.widget("ui.spinner",{version:"1.12.1",defaultElement:"<input>",widgetEventPrefix:"spin",options:{classes:{"ui-spinner":"ui-corner-all","ui-spinner-down":"ui-corner-br","ui-spinner-up":"ui-corner-tr"},culture:null,icons:{down:"ui-icon-triangle-1-s",up:"ui-icon-triangle-1-n"},incremental:!0,max:null,min:null,numberFormat:null,page:10,step:1,change:null,spin:null,start:null,stop:null},_create:function(){this._setOption("max",this.options.max),this._setOption("min",this.options.min),this._setOption("step",this.options.step),""!==this.value()&&this._value(this.element.val(),!0),this._draw(),this._on(this._events),this._refresh(),this._on(this.window,{beforeunload:function(){this.element.removeAttr("autocomplete")}})},_getCreateOptions:function(){var r=this._super(),i=this.element;return x.each(["min","max","step"],function(e,t){var n=i.attr(t);null!=n&&n.length&&(r[t]=n)}),r},_events:{keydown:function(e){this._start(e)&&this._keydown(e)&&e.preventDefault()},keyup:"_stop",focus:function(){this.previous=this.element.val()},blur:function(e){this.cancelBlur?delete this.cancelBlur:(this._stop(),this._refresh(),this.previous!==this.element.val()&&this._trigger("change",e))},mousewheel:function(e,t){if(t){if(!this.spinning&&!this._start(e))return!1;this._spin((0<t?1:-1)*this.options.step,e),clearTimeout(this.mousewheelTimer),this.mousewheelTimer=this._delay(function(){this.spinning&&this._stop(e)},100),e.preventDefault()}},"mousedown .ui-spinner-button":function(e){var t;function n(){this.element[0]===x.ui.safeActiveElement(this.document[0])||(this.element.trigger("focus"),this.previous=t,this._delay(function(){this.previous=t}))}t=this.element[0]===x.ui.safeActiveElement(this.document[0])?this.previous:this.element.val(),e.preventDefault(),n.call(this),this.cancelBlur=!0,this._delay(function(){delete this.cancelBlur,n.call(this)}),!1!==this._start(e)&&this._repeat(null,x(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseup .ui-spinner-button":"_stop","mouseenter .ui-spinner-button":function(e){if(x(e.currentTarget).hasClass("ui-state-active"))return!1!==this._start(e)&&void this._repeat(null,x(e.currentTarget).hasClass("ui-spinner-up")?1:-1,e)},"mouseleave .ui-spinner-button":"_stop"},_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap("<span>").parent().append("<a></a><a></a>")},_draw:function(){this._enhance(),this._addClass(this.uiSpinner,"ui-spinner","ui-widget ui-widget-content"),this._addClass("ui-spinner-input"),this.element.attr("role","spinbutton"),this.buttons=this.uiSpinner.children("a").attr("tabIndex",-1).attr("aria-hidden",!0).button({classes:{"ui-button":""}}),this._removeClass(this.buttons,"ui-corner-all"),this._addClass(this.buttons.first(),"ui-spinner-button ui-spinner-up"),this._addClass(this.buttons.last(),"ui-spinner-button ui-spinner-down"),this.buttons.first().button({icon:this.options.icons.up,showLabel:!1}),this.buttons.last().button({icon:this.options.icons.down,showLabel:!1}),this.buttons.height()>Math.ceil(.5*this.uiSpinner.height())&&0<this.uiSpinner.height()&&this.uiSpinner.height(this.uiSpinner.height())},_keydown:function(e){var t=this.options,n=x.ui.keyCode;switch(e.keyCode){case n.UP:return this._repeat(null,1,e),!0;case n.DOWN:return this._repeat(null,-1,e),!0;case n.PAGE_UP:return this._repeat(null,t.page,e),!0;case n.PAGE_DOWN:return this._repeat(null,-t.page,e),!0}return!1},_start:function(e){return!(!this.spinning&&!1===this._trigger("start",e))&&(this.counter||(this.counter=1),this.spinning=!0)},_repeat:function(e,t,n){e=e||500,clearTimeout(this.timer),this.timer=this._delay(function(){this._repeat(40,t,n)},e),this._spin(t*this.options.step,n)},_spin:function(e,t){var n=this.value()||0;this.counter||(this.counter=1),n=this._adjustValue(n+e*this._increment(this.counter)),this.spinning&&!1===this._trigger("spin",t,{value:n})||(this._value(n),this.counter++)},_increment:function(e){var t=this.options.incremental;return t?x.isFunction(t)?t(e):Math.floor(e*e*e/5e4-e*e/500+17*e/200+1):1},_precision:function(){var e=this._precisionOf(this.options.step);return null!==this.options.min&&(e=Math.max(e,this._precisionOf(this.options.min))),e},_precisionOf:function(e){var t=e.toString(),n=t.indexOf(".");return-1===n?0:t.length-n-1},_adjustValue:function(e){var t,n,r=this.options;return n=e-(t=null!==r.min?r.min:0),e=t+(n=Math.round(n/r.step)*r.step),e=parseFloat(e.toFixed(this._precision())),null!==r.max&&e>r.max?r.max:null!==r.min&&e<r.min?r.min:e},_stop:function(e){this.spinning&&(clearTimeout(this.timer),clearTimeout(this.mousewheelTimer),this.counter=0,this.spinning=!1,this._trigger("stop",e))},_setOption:function(e,t){var n,r,i;if("culture"===e||"numberFormat"===e)return n=this._parse(this.element.val()),this.options[e]=t,void this.element.val(this._format(n));"max"!==e&&"min"!==e&&"step"!==e||"string"==typeof t&&(t=this._parse(t)),"icons"===e&&(r=this.buttons.first().find(".ui-icon"),this._removeClass(r,null,this.options.icons.up),this._addClass(r,null,t.up),i=this.buttons.last().find(".ui-icon"),this._removeClass(i,null,this.options.icons.down),this._addClass(i,null,t.down)),this._super(e,t)},_setOptionDisabled:function(e){this._super(e),this._toggleClass(this.uiSpinner,null,"ui-state-disabled",!!e),this.element.prop("disabled",!!e),this.buttons.button(e?"disable":"enable")},_setOptions:y(function(e){this._super(e)}),_parse:function(e){return"string"==typeof e&&""!==e&&(e=window.Globalize&&this.options.numberFormat?Globalize.parseFloat(e,10,this.options.culture):+e),""===e||isNaN(e)?null:e},_format:function(e){return""===e?"":window.Globalize&&this.options.numberFormat?Globalize.format(e,this.options.numberFormat,this.options.culture):e},_refresh:function(){this.element.attr({"aria-valuemin":this.options.min,"aria-valuemax":this.options.max,"aria-valuenow":this._parse(this.element.val())})},isValid:function(){var e=this.value();return null!==e&&e===this._adjustValue(e)},_value:function(e,t){var n;""!==e&&null!==(n=this._parse(e))&&(t||(n=this._adjustValue(n)),e=this._format(n)),this.element.val(e),this._refresh()},_destroy:function(){this.element.prop("disabled",!1).removeAttr("autocomplete role aria-valuemin aria-valuemax aria-valuenow"),this.uiSpinner.replaceWith(this.element)},stepUp:y(function(e){this._stepUp(e)}),_stepUp:function(e){this._start()&&(this._spin((e||1)*this.options.step),this._stop())},stepDown:y(function(e){this._stepDown(e)}),_stepDown:function(e){this._start()&&(this._spin((e||1)*-this.options.step),this._stop())},pageUp:y(function(e){this._stepUp((e||1)*this.options.page)}),pageDown:y(function(e){this._stepDown((e||1)*this.options.page)}),value:function(e){if(!arguments.length)return this._parse(this.element.val());y(this._value).call(this,e)},widget:function(){return this.uiSpinner}}),!1!==x.uiBackCompat&&x.widget("ui.spinner",x.ui.spinner,{_enhance:function(){this.uiSpinner=this.element.attr("autocomplete","off").wrap(this._uiSpinnerHtml()).parent().append(this._buttonHtml())},_uiSpinnerHtml:function(){return"<span>"},_buttonHtml:function(){return"<a></a><a></a>"}});var w;x.ui.spinner;x.widget("ui.tabs",{version:"1.12.1",delay:300,options:{active:null,classes:{"ui-tabs":"ui-corner-all","ui-tabs-nav":"ui-corner-all","ui-tabs-panel":"ui-corner-bottom","ui-tabs-tab":"ui-corner-top"},collapsible:!1,event:"click",heightStyle:"content",hide:null,show:null,activate:null,beforeActivate:null,beforeLoad:null,load:null},_isLocal:(w=/#.*$/,function(e){var t,n;t=e.href.replace(w,""),n=location.href.replace(w,"");try{t=decodeURIComponent(t)}catch(e){}try{n=decodeURIComponent(n)}catch(e){}return 1<e.hash.length&&t===n}),_create:function(){var t=this,e=this.options;this.running=!1,this._addClass("ui-tabs","ui-widget ui-widget-content"),this._toggleClass("ui-tabs-collapsible",null,e.collapsible),this._processTabs(),e.active=this._initialActive(),x.isArray(e.disabled)&&(e.disabled=x.unique(e.disabled.concat(x.map(this.tabs.filter(".ui-state-disabled"),function(e){return t.tabs.index(e)}))).sort()),!1!==this.options.active&&this.anchors.length?this.active=this._findActive(e.active):this.active=x(),this._refresh(),this.active.length&&this.load(e.active)},_initialActive:function(){var n=this.options.active,e=this.options.collapsible,r=location.hash.substring(1);return null===n&&(r&&this.tabs.each(function(e,t){if(x(t).attr("aria-controls")===r)return n=e,!1}),null===n&&(n=this.tabs.index(this.tabs.filter(".ui-tabs-active"))),null!==n&&-1!==n||(n=!!this.tabs.length&&0)),!1!==n&&-1===(n=this.tabs.index(this.tabs.eq(n)))&&(n=!e&&0),!e&&!1===n&&this.anchors.length&&(n=0),n},_getCreateEventData:function(){return{tab:this.active,panel:this.active.length?this._getPanelForTab(this.active):x()}},_tabKeydown:function(e){var t=x(x.ui.safeActiveElement(this.document[0])).closest("li"),n=this.tabs.index(t),r=!0;if(!this._handlePageNav(e)){switch(e.keyCode){case x.ui.keyCode.RIGHT:case x.ui.keyCode.DOWN:n++;break;case x.ui.keyCode.UP:case x.ui.keyCode.LEFT:r=!1,n--;break;case x.ui.keyCode.END:n=this.anchors.length-1;break;case x.ui.keyCode.HOME:n=0;break;case x.ui.keyCode.SPACE:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n);case x.ui.keyCode.ENTER:return e.preventDefault(),clearTimeout(this.activating),void this._activate(n!==this.options.active&&n);default:return}e.preventDefault(),clearTimeout(this.activating),n=this._focusNextTab(n,r),e.ctrlKey||e.metaKey||(t.attr("aria-selected","false"),this.tabs.eq(n).attr("aria-selected","true"),this.activating=this._delay(function(){this.option("active",n)},this.delay))}},_panelKeydown:function(e){this._handlePageNav(e)||e.ctrlKey&&e.keyCode===x.ui.keyCode.UP&&(e.preventDefault(),this.active.trigger("focus"))},_handlePageNav:function(e){return e.altKey&&e.keyCode===x.ui.keyCode.PAGE_UP?(this._activate(this._focusNextTab(this.options.active-1,!1)),!0):e.altKey&&e.keyCode===x.ui.keyCode.PAGE_DOWN?(this._activate(this._focusNextTab(this.options.active+1,!0)),!0):void 0},_findNextTab:function(e,t){var n=this.tabs.length-1;for(;-1!==x.inArray((n<e&&(e=0),e<0&&(e=n),e),this.options.disabled);)e=t?e+1:e-1;return e},_focusNextTab:function(e,t){return e=this._findNextTab(e,t),this.tabs.eq(e).trigger("focus"),e},_setOption:function(e,t){"active"!==e?(this._super(e,t),"collapsible"===e&&(this._toggleClass("ui-tabs-collapsible",null,t),t||!1!==this.options.active||this._activate(0)),"event"===e&&this._setupEvents(t),"heightStyle"===e&&this._setupHeightStyle(t)):this._activate(t)},_sanitizeSelector:function(e){return e?e.replace(/[!"$%&'()*+,.\/:;<=>?@\[\]\^`{|}~]/g,"\\$&"):""},refresh:function(){var e=this.options,t=this.tablist.children(":has(a[href])");e.disabled=x.map(t.filter(".ui-state-disabled"),function(e){return t.index(e)}),this._processTabs(),!1!==e.active&&this.anchors.length?this.active.length&&!x.contains(this.tablist[0],this.active[0])?this.tabs.length===e.disabled.length?(e.active=!1,this.active=x()):this._activate(this._findNextTab(Math.max(0,e.active-1),!1)):e.active=this.tabs.index(this.active):(e.active=!1,this.active=x()),this._refresh()},_refresh:function(){this._setOptionDisabled(this.options.disabled),this._setupEvents(this.options.event),this._setupHeightStyle(this.options.heightStyle),this.tabs.not(this.active).attr({"aria-selected":"false","aria-expanded":"false",tabIndex:-1}),this.panels.not(this._getPanelForTab(this.active)).hide().attr({"aria-hidden":"true"}),this.active.length?(this.active.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0}),this._addClass(this.active,"ui-tabs-active","ui-state-active"),this._getPanelForTab(this.active).show().attr({"aria-hidden":"false"})):this.tabs.eq(0).attr("tabIndex",0)},_processTabs:function(){var c=this,e=this.tabs,t=this.anchors,n=this.panels;this.tablist=this._getList().attr("role","tablist"),this._addClass(this.tablist,"ui-tabs-nav","ui-helper-reset ui-helper-clearfix ui-widget-header"),this.tablist.on("mousedown"+this.eventNamespace,"> li",function(e){x(this).is(".ui-state-disabled")&&e.preventDefault()}).on("focus"+this.eventNamespace,".ui-tabs-anchor",function(){x(this).closest("li").is(".ui-state-disabled")&&this.blur()}),this.tabs=this.tablist.find("> li:has(a[href])").attr({role:"tab",tabIndex:-1}),this._addClass(this.tabs,"ui-tabs-tab","ui-state-default"),this.anchors=this.tabs.map(function(){return x("a",this)[0]}).attr({role:"presentation",tabIndex:-1}),this._addClass(this.anchors,"ui-tabs-anchor"),this.panels=x(),this.anchors.each(function(e,t){var n,r,i,a=x(t).uniqueId().attr("id"),o=x(t).closest("li"),s=o.attr("aria-controls");c._isLocal(t)?(i=(n=t.hash).substring(1),r=c.element.find(c._sanitizeSelector(n))):(n="#"+(i=o.attr("aria-controls")||x({}).uniqueId()[0].id),(r=c.element.find(n)).length||(r=c._createPanel(i)).insertAfter(c.panels[e-1]||c.tablist),r.attr("aria-live","polite")),r.length&&(c.panels=c.panels.add(r)),s&&o.data("ui-tabs-aria-controls",s),o.attr({"aria-controls":i,"aria-labelledby":a}),r.attr("aria-labelledby",a)}),this.panels.attr("role","tabpanel"),this._addClass(this.panels,"ui-tabs-panel","ui-widget-content"),e&&(this._off(e.not(this.tabs)),this._off(t.not(this.anchors)),this._off(n.not(this.panels)))},_getList:function(){return this.tablist||this.element.find("ol, ul").eq(0)},_createPanel:function(e){return x("<div>").attr("id",e).data("ui-tabs-destroy",!0)},_setOptionDisabled:function(e){var t,n,r;for(x.isArray(e)&&(e.length?e.length===this.anchors.length&&(e=!0):e=!1),r=0;n=this.tabs[r];r++)t=x(n),!0===e||-1!==x.inArray(r,e)?(t.attr("aria-disabled","true"),this._addClass(t,null,"ui-state-disabled")):(t.removeAttr("aria-disabled"),this._removeClass(t,null,"ui-state-disabled"));this.options.disabled=e,this._toggleClass(this.widget(),this.widgetFullName+"-disabled",null,!0===e)},_setupEvents:function(e){var n={};e&&x.each(e.split(" "),function(e,t){n[t]="_eventHandler"}),this._off(this.anchors.add(this.tabs).add(this.panels)),this._on(!0,this.anchors,{click:function(e){e.preventDefault()}}),this._on(this.anchors,n),this._on(this.tabs,{keydown:"_tabKeydown"}),this._on(this.panels,{keydown:"_panelKeydown"}),this._focusable(this.tabs),this._hoverable(this.tabs)},_setupHeightStyle:function(e){var n,t=this.element.parent();"fill"===e?(n=t.height(),n-=this.element.outerHeight()-this.element.height(),this.element.siblings(":visible").each(function(){var e=x(this),t=e.css("position");"absolute"!==t&&"fixed"!==t&&(n-=e.outerHeight(!0))}),this.element.children().not(this.panels).each(function(){n-=x(this).outerHeight(!0)}),this.panels.each(function(){x(this).height(Math.max(0,n-x(this).innerHeight()+x(this).height()))}).css("overflow","auto")):"auto"===e&&(n=0,this.panels.each(function(){n=Math.max(n,x(this).height("").height())}).height(n))},_eventHandler:function(e){var t=this.options,n=this.active,r=x(e.currentTarget).closest("li"),i=r[0]===n[0],a=i&&t.collapsible,o=a?x():this._getPanelForTab(r),s=n.length?this._getPanelForTab(n):x(),c={oldTab:n,oldPanel:s,newTab:a?x():r,newPanel:o};e.preventDefault(),r.hasClass("ui-state-disabled")||r.hasClass("ui-tabs-loading")||this.running||i&&!t.collapsible||!1===this._trigger("beforeActivate",e,c)||(t.active=!a&&this.tabs.index(r),this.active=i?x():r,this.xhr&&this.xhr.abort(),s.length||o.length||x.error("jQuery UI Tabs: Mismatching fragment identifier."),o.length&&this.load(this.tabs.index(r),e),this._toggle(e,c))},_toggle:function(e,t){var n=this,r=t.newPanel,i=t.oldPanel;function a(){n.running=!1,n._trigger("activate",e,t)}function o(){n._addClass(t.newTab.closest("li"),"ui-tabs-active","ui-state-active"),r.length&&n.options.show?n._show(r,n.options.show,a):(r.show(),a())}this.running=!0,i.length&&this.options.hide?this._hide(i,this.options.hide,function(){n._removeClass(t.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),o()}):(this._removeClass(t.oldTab.closest("li"),"ui-tabs-active","ui-state-active"),i.hide(),o()),i.attr("aria-hidden","true"),t.oldTab.attr({"aria-selected":"false","aria-expanded":"false"}),r.length&&i.length?t.oldTab.attr("tabIndex",-1):r.length&&this.tabs.filter(function(){return 0===x(this).attr("tabIndex")}).attr("tabIndex",-1),r.attr("aria-hidden","false"),t.newTab.attr({"aria-selected":"true","aria-expanded":"true",tabIndex:0})},_activate:function(e){var t,n=this._findActive(e);n[0]!==this.active[0]&&(n.length||(n=this.active),t=n.find(".ui-tabs-anchor")[0],this._eventHandler({target:t,currentTarget:t,preventDefault:x.noop}))},_findActive:function(e){return!1===e?x():this.tabs.eq(e)},_getIndex:function(e){return"string"==typeof e&&(e=this.anchors.index(this.anchors.filter("[href$='"+x.ui.escapeSelector(e)+"']"))),e},_destroy:function(){this.xhr&&this.xhr.abort(),this.tablist.removeAttr("role").off(this.eventNamespace),this.anchors.removeAttr("role tabIndex").removeUniqueId(),this.tabs.add(this.panels).each(function(){x.data(this,"ui-tabs-destroy")?x(this).remove():x(this).removeAttr("role tabIndex aria-live aria-busy aria-selected aria-labelledby aria-hidden aria-expanded")}),this.tabs.each(function(){var e=x(this),t=e.data("ui-tabs-aria-controls");t?e.attr("aria-controls",t).removeData("ui-tabs-aria-controls"):e.removeAttr("aria-controls")}),this.panels.show(),"content"!==this.options.heightStyle&&this.panels.css("height","")},enable:function(n){var e=this.options.disabled;!1!==e&&(e=void 0!==n&&(n=this._getIndex(n),x.isArray(e)?x.map(e,function(e){return e!==n?e:null}):x.map(this.tabs,function(e,t){return t!==n?t:null})),this._setOptionDisabled(e))},disable:function(e){var t=this.options.disabled;if(!0!==t){if(void 0===e)t=!0;else{if(e=this._getIndex(e),-1!==x.inArray(e,t))return;t=x.isArray(t)?x.merge([e],t).sort():[e]}this._setOptionDisabled(t)}},load:function(e,r){e=this._getIndex(e);var i=this,n=this.tabs.eq(e),t=n.find(".ui-tabs-anchor"),a=this._getPanelForTab(n),o={tab:n,panel:a},s=function(e,t){"abort"===t&&i.panels.stop(!1,!0),i._removeClass(n,"ui-tabs-loading"),a.removeAttr("aria-busy"),e===i.xhr&&delete i.xhr};this._isLocal(t[0])||(this.xhr=x.ajax(this._ajaxSettings(t,r,o)),this.xhr&&"canceled"!==this.xhr.statusText&&(this._addClass(n,"ui-tabs-loading"),a.attr("aria-busy","true"),this.xhr.done(function(e,t,n){setTimeout(function(){a.html(e),i._trigger("load",r,o),s(n,t)},1)}).fail(function(e,t){setTimeout(function(){s(e,t)},1)})))},_ajaxSettings:function(e,n,r){var i=this;return{url:e.attr("href").replace(/#.*$/,""),beforeSend:function(e,t){return i._trigger("beforeLoad",n,x.extend({jqXHR:e,ajaxSettings:t},r))}}},_getPanelForTab:function(e){var t=x(e).attr("aria-controls");return this.element.find(this._sanitizeSelector("#"+t))}}),!1!==x.uiBackCompat&&x.widget("ui.tabs",x.ui.tabs,{_processTabs:function(){this._superApply(arguments),this._addClass(this.tabs,"ui-tab")}});x.ui.tabs;x.widget("ui.tooltip",{version:"1.12.1",options:{classes:{"ui-tooltip":"ui-corner-all ui-widget-shadow"},content:function(){var e=x(this).attr("title")||"";return x("<a>").text(e).html()},hide:!0,items:"[title]:not([disabled])",position:{my:"left top+15",at:"left bottom",collision:"flipfit flip"},show:!0,track:!1,close:null,open:null},_addDescribedBy:function(e,t){var n=(e.attr("aria-describedby")||"").split(/\s+/);n.push(t),e.data("ui-tooltip-id",t).attr("aria-describedby",x.trim(n.join(" ")))},_removeDescribedBy:function(e){var t=e.data("ui-tooltip-id"),n=(e.attr("aria-describedby")||"").split(/\s+/),r=x.inArray(t,n);-1!==r&&n.splice(r,1),e.removeData("ui-tooltip-id"),(n=x.trim(n.join(" ")))?e.attr("aria-describedby",n):e.removeAttr("aria-describedby")},_create:function(){this._on({mouseover:"open",focusin:"open"}),this.tooltips={},this.parents={},this.liveRegion=x("<div>").attr({role:"log","aria-live":"assertive","aria-relevant":"additions"}).appendTo(this.document[0].body),this._addClass(this.liveRegion,null,"ui-helper-hidden-accessible"),this.disabledTitles=x([])},_setOption:function(e,t){var n=this;this._super(e,t),"content"===e&&x.each(this.tooltips,function(e,t){n._updateContent(t.element)})},_setOptionDisabled:function(e){this[e?"_disable":"_enable"]()},_disable:function(){var r=this;x.each(this.tooltips,function(e,t){var n=x.Event("blur");n.target=n.currentTarget=t.element[0],r.close(n,!0)}),this.disabledTitles=this.disabledTitles.add(this.element.find(this.options.items).addBack().filter(function(){var e=x(this);if(e.is("[title]"))return e.data("ui-tooltip-title",e.attr("title")).removeAttr("title")}))},_enable:function(){this.disabledTitles.each(function(){var e=x(this);e.data("ui-tooltip-title")&&e.attr("title",e.data("ui-tooltip-title"))}),this.disabledTitles=x([])},open:function(e){var n=this,t=x(e?e.target:this.element).closest(this.options.items);t.length&&!t.data("ui-tooltip-id")&&(t.attr("title")&&t.data("ui-tooltip-title",t.attr("title")),t.data("ui-tooltip-open",!0),e&&"mouseover"===e.type&&t.parents().each(function(){var e,t=x(this);t.data("ui-tooltip-open")&&((e=x.Event("blur")).target=e.currentTarget=this,n.close(e,!0)),t.attr("title")&&(t.uniqueId(),n.parents[this.id]={element:this,title:t.attr("title")},t.attr("title",""))}),this._registerCloseHandlers(e,t),this._updateContent(t,e))},_updateContent:function(t,n){var e,r=this.options.content,i=this,a=n?n.type:null;if("string"==typeof r||r.nodeType||r.jquery)return this._open(n,t,r);(e=r.call(t[0],function(e){i._delay(function(){t.data("ui-tooltip-open")&&(n&&(n.type=a),this._open(n,t,e))})}))&&this._open(n,t,e)},_open:function(e,t,n){var r,i,a,o,s=x.extend({},this.options.position);function c(e){s.of=e,i.is(":hidden")||i.position(s)}n&&((r=this._find(t))?r.tooltip.find(".ui-tooltip-content").html(n):(t.is("[title]")&&(e&&"mouseover"===e.type?t.attr("title",""):t.removeAttr("title")),r=this._tooltip(t),i=r.tooltip,this._addDescribedBy(t,i.attr("id")),i.find(".ui-tooltip-content").html(n),this.liveRegion.children().hide(),(o=x("<div>").html(i.find(".ui-tooltip-content").html())).removeAttr("name").find("[name]").removeAttr("name"),o.removeAttr("id").find("[id]").removeAttr("id"),o.appendTo(this.liveRegion),this.options.track&&e&&/^mouse/.test(e.type)?(this._on(this.document,{mousemove:c}),c(e)):i.position(x.extend({of:t},this.options.position)),i.hide(),this._show(i,this.options.show),this.options.track&&this.options.show&&this.options.show.delay&&(a=this.delayedShow=setInterval(function(){i.is(":visible")&&(c(s.of),clearInterval(a))},x.fx.interval)),this._trigger("open",e,{tooltip:i})))},_registerCloseHandlers:function(e,n){var t={keyup:function(e){if(e.keyCode===x.ui.keyCode.ESCAPE){var t=x.Event(e);t.currentTarget=n[0],this.close(t,!0)}}};n[0]!==this.element[0]&&(t.remove=function(){this._removeTooltip(this._find(n).tooltip)}),e&&"mouseover"!==e.type||(t.mouseleave="close"),e&&"focusin"!==e.type||(t.focusout="close"),this._on(!0,n,t)},close:function(e){var t,n=this,r=x(e?e.currentTarget:this.element),i=this._find(r);i?(t=i.tooltip,i.closing||(clearInterval(this.delayedShow),r.data("ui-tooltip-title")&&!r.attr("title")&&r.attr("title",r.data("ui-tooltip-title")),this._removeDescribedBy(r),i.hiding=!0,t.stop(!0),this._hide(t,this.options.hide,function(){n._removeTooltip(x(this))}),r.removeData("ui-tooltip-open"),this._off(r,"mouseleave focusout keyup"),r[0]!==this.element[0]&&this._off(r,"remove"),this._off(this.document,"mousemove"),e&&"mouseleave"===e.type&&x.each(this.parents,function(e,t){x(t.element).attr("title",t.title),delete n.parents[e]}),i.closing=!0,this._trigger("close",e,{tooltip:t}),i.hiding||(i.closing=!1))):r.removeData("ui-tooltip-open")},_tooltip:function(e){var t=x("<div>").attr("role","tooltip"),n=x("<div>").appendTo(t),r=t.uniqueId().attr("id");return this._addClass(n,"ui-tooltip-content"),this._addClass(t,"ui-tooltip","ui-widget ui-widget-content"),t.appendTo(this._appendTo(e)),this.tooltips[r]={element:e,tooltip:t}},_find:function(e){var t=e.data("ui-tooltip-id");return t?this.tooltips[t]:null},_removeTooltip:function(e){e.remove(),delete this.tooltips[e.attr("id")]},_appendTo:function(e){var t=e.closest(".ui-front, dialog");return t.length||(t=this.document[0].body),t},_destroy:function(){var i=this;x.each(this.tooltips,function(e,t){var n=x.Event("blur"),r=t.element;n.target=n.currentTarget=r[0],i.close(n,!0),x("#"+e).remove(),r.data("ui-tooltip-title")&&(r.attr("title")||r.attr("title",r.data("ui-tooltip-title")),r.removeData("ui-tooltip-title"))}),this.liveRegion.remove()}}),!1!==x.uiBackCompat&&x.widget("ui.tooltip",x.ui.tooltip,{options:{tooltipClass:null},_tooltip:function(){var e=this._superApply(arguments);return this.options.tooltipClass&&e.tooltip.addClass(this.options.tooltipClass),e}});x.ui.tooltip}),function(e,w,t){"use strict";w.module("ui.sortable",[]).value("uiSortableConfig",{items:"> [ng-repeat],> [data-ng-repeat],> [x-ng-repeat]"}).directive("uiSortable",["uiSortableConfig","$timeout","$log",function(b,v,y){return{require:"?ngModel",scope:{ngModel:"=",uiSortable:"="},link:function(c,l,e,a){var u;function n(e,t){var n=t&&"function"==typeof t;return e&&"function"==typeof e&&n?function(){e.apply(this,arguments),t.apply(this,arguments)}:n?t:e}function o(e){var t=e.data("ui-sortable");return t&&"object"==typeof t&&"ui-sortable"===t.widgetFullName?t:null}function s(e,t){return m[e]?("stop"===e&&(t=n(t=n(t,function(){c.$apply()}),r)),t=n(m[e],t)):g[e]&&(t=g[e](t)),t||("items"===e?t=b.items:"ui-model-items"===e&&(t=b.items)),t}function i(r,e,n){w.forEach(m,function(e,t){t in h||(h[t]=null)});var i,a=null;e&&w.forEach(e,function(e,t){if(!(r&&t in r)){if(t in p)return void(h[t]="ui-floating"===t?"auto":s(t,void 0));i||(i=w.element.ui.sortable().options);var n=i[t];n=s(t,n),a||(a={}),a[t]=n,h[t]=n}});return w.forEach(r,function(e,t){if(t in p)return"ui-floating"!==t||!1!==e&&!0!==e||!n||(n.floating=e),void(h[t]=s(t,e));e=s(t,e),a||(a={}),a[t]=e,h[t]=e}),a}function f(e,t,n){var r,i,a=null;return r=t,("clone"===(i=e.sortable("option","helper"))||"function"==typeof i&&r.item.sortable.isCustomHelperUsed())&&"parent"===e.sortable("option","appendTo")&&(a=n.last()),a}function r(e,t){t.item.sortable._destroy()}function d(e){return e.item.parent().find(h["ui-model-items"]).index(e.item)}var h={},p={"ui-floating":void 0,"ui-model-items":b.items},m={receive:null,remove:null,start:null,stop:null,update:null},g={helper:null};function t(){c.$watchCollection("ngModel",function(){v(function(){o(l)&&l.sortable("refresh")},0,!1)}),m.start=function(e,n){if("auto"===h["ui-floating"]){var t=n.item.siblings();o(w.element(e.target)).floating=/left|right/.test((r=t).css("float"))||/inline|table-cell/.test(r.css("display"))}var r,i=d(n);n.item.sortable={model:a.$modelValue[i],index:i,source:n.item.parent(),sourceModel:a.$modelValue,cancel:function(){n.item.sortable._isCanceled=!0},isCanceled:function(){return n.item.sortable._isCanceled},isCustomHelperUsed:function(){return!!n.item.sortable._isCustomHelperUsed},_isCanceled:!1,_isCustomHelperUsed:n.item.sortable._isCustomHelperUsed,_destroy:function(){w.forEach(n.item.sortable,function(e,t){n.item.sortable[t]=void 0})}}},m.activate=function(e,t){u=l.contents();var n,r,i,a=function(e){var t=e.sortable("option","placeholder");if(t&&t.element&&"function"==typeof t.element){var n=t.element();return n=w.element(n)}return null}(l);if(a&&a.length){var o=(n=l,r=a,i=h["ui-model-items"].replace(/[^,]*>/g,""),n.find('[class="'+r.attr("class")+'"]:not('+i+")"));u=u.not(o)}var s=t.item.sortable._connectedSortables||[];s.push({element:l,scope:c}),t.item.sortable._connectedSortables=s},m.update=function(e,t){if(!t.item.sortable.received){t.item.sortable.dropindex=d(t);var n=t.item.parent();t.item.sortable.droptarget=n;var r=function(e,t){for(var n=null,r=0;r<e.length;r++){var i=e[r];if(i.element[0]===t[0]){n=i.scope;break}}return n}(t.item.sortable._connectedSortables,n);t.item.sortable.droptargetModel=r.ngModel,l.sortable("cancel")}var i=!t.item.sortable.received&&f(l,t,u);i&&i.length&&(u=u.not(i)),u.appendTo(l),t.item.sortable.received&&(u=null),t.item.sortable.received&&!t.item.sortable.isCanceled()&&c.$apply(function(){a.$modelValue.splice(t.item.sortable.dropindex,0,t.item.sortable.moved)})},m.stop=function(e,t){if(!t.item.sortable.received&&"dropindex"in t.item.sortable&&!t.item.sortable.isCanceled())c.$apply(function(){a.$modelValue.splice(t.item.sortable.dropindex,0,a.$modelValue.splice(t.item.sortable.index,1)[0])});else if((!("dropindex"in t.item.sortable)||t.item.sortable.isCanceled())&&!w.equals(l.contents(),u)){var n=f(l,t,u);n&&n.length&&(u=u.not(n)),u.appendTo(l)}u=null},m.receive=function(e,t){t.item.sortable.received=!0},m.remove=function(e,t){"dropindex"in t.item.sortable||(l.sortable("cancel"),t.item.sortable.cancel()),t.item.sortable.isCanceled()||c.$apply(function(){t.item.sortable.moved=a.$modelValue.splice(t.item.sortable.index,1)[0]})},g.helper=function(r){return r&&"function"==typeof r?function(e,t){var n=r.apply(this,arguments);return t.sortable._isCustomHelperUsed=t!==n,n}:r},c.$watchCollection("uiSortable",function(e,t){var n=o(l);if(n){var r=i(e,t,n);r&&l.sortable("option",r)}},!0),i(h)}function _(){return(!c.uiSortable||!c.uiSortable.disabled)&&(a?t():y.info("ui.sortable: ngModel not provided!",l),l.sortable(h),_.cancelWatcher(),_.cancelWatcher=w.noop,!0)}w.extend(h,p,b,c.uiSortable),w.element.fn&&w.element.fn.jquery?(_.cancelWatcher=w.noop,_()||(_.cancelWatcher=c.$watch("uiSortable.disabled",_))):y.error("ui.sortable: jQuery should be included before AngularJS!")}}}])}(window,window.angular),function(){"use strict";angular.module("ui.tree",[]).constant("treeConfig",{treeClass:"angular-ui-tree",emptyTreeClass:"angular-ui-tree-empty",hiddenClass:"angular-ui-tree-hidden",nodesClass:"angular-ui-tree-nodes",nodeClass:"angular-ui-tree-node",handleClass:"angular-ui-tree-handle",placeholderClass:"angular-ui-tree-placeholder",dragClass:"angular-ui-tree-drag",dragThreshold:3,levelThreshold:30,defaultCollapsed:!1})}(),function(){"use strict";angular.module("ui.tree").controller("TreeHandleController",["$scope","$element",function(e,t){(this.scope=e).$element=t,e.$nodeScope=null,e.$type="uiTreeHandle"}])}(),function(){"use strict";angular.module("ui.tree").controller("TreeNodeController",["$scope","$element",function(n,r){(this.scope=n).$element=r,n.$modelValue=null,n.$parentNodeScope=null,n.$childNodesScope=null,n.$parentNodesScope=null,n.$treeScope=null,n.$handleScope=null,n.$type="uiTreeNode",n.$$allowNodeDrop=!1,n.collapsed=!1,n.init=function(e){var t=e[0];n.$treeScope=e[1]?e[1].scope:null,n.$parentNodeScope=t.scope.$nodeScope,n.$modelValue=t.scope.$modelValue[n.$index],n.$parentNodesScope=t.scope,t.scope.initSubNode(n),r.on("$destroy",function(){t.scope.destroySubNode(n)})},n.index=function(){return n.$parentNodesScope.$modelValue.indexOf(n.$modelValue)},n.dragEnabled=function(){return!(n.$treeScope&&!n.$treeScope.dragEnabled)},n.isSibling=function(e){return n.$parentNodesScope==e.$parentNodesScope},n.isChild=function(e){var t=n.childNodes();return t&&-1<t.indexOf(e)},n.prev=function(){var e=n.index();return 0<e?n.siblings()[e-1]:null},n.siblings=function(){return n.$parentNodesScope.childNodes()},n.childNodesCount=function(){return n.childNodes()?n.childNodes().length:0},n.hasChild=function(){return 0<n.childNodesCount()},n.childNodes=function(){return n.$childNodesScope&&n.$childNodesScope.$modelValue?n.$childNodesScope.childNodes():null},n.accept=function(e,t){return n.$childNodesScope&&n.$childNodesScope.$modelValue&&n.$childNodesScope.accept(e,t)},n.remove=function(){return n.$parentNodesScope.removeNode(n)},n.toggle=function(){n.collapsed=!n.collapsed},n.collapse=function(){n.collapsed=!0},n.expand=function(){n.collapsed=!1},n.depth=function(){var e=n.$parentNodeScope;return e?e.depth()+1:1},n.maxSubDepth=function(){return n.$childNodesScope?function e(t){var n,r,i=0,a=t.childNodes();if(!a||0===a.length)return 0;for(r=a.length-1;0<=r;r--)n=1+e(a[r]),i=Math.max(i,n);return i}(n.$childNodesScope):0}}])}(),function(){"use strict";angular.module("ui.tree").controller("TreeNodesController",["$scope","$element",function(n,e){(this.scope=n).$element=e,n.$modelValue=null,n.$nodeScope=null,n.$treeScope=null,n.$type="uiTreeNodes",n.$nodesMap={},n.nodropEnabled=!1,n.maxDepth=0,n.cloneEnabled=!1,n.initSubNode=function(e){if(!e.$modelValue)return null;n.$nodesMap[e.$modelValue.$$hashKey]=e},n.destroySubNode=function(e){if(!e.$modelValue)return null;n.$nodesMap[e.$modelValue.$$hashKey]=null},n.accept=function(e,t){return n.$treeScope.$callbacks.accept(e,n,t)},n.beforeDrag=function(e){return n.$treeScope.$callbacks.beforeDrag(e)},n.isParent=function(e){return e.$parentNodesScope==n},n.hasChild=function(){return 0<n.$modelValue.length},n.safeApply=function(e){var t=this.$root.$$phase;"$apply"==t||"$digest"==t?e&&"function"==typeof e&&e():this.$apply(e)},n.removeNode=function(e){var t=n.$modelValue.indexOf(e.$modelValue);return-1<t?(n.safeApply(function(){n.$modelValue.splice(t,1)[0]}),n.$treeScope.$callbacks.removed(e)):null},n.insertNode=function(e,t){n.safeApply(function(){n.$modelValue.splice(e,0,t)})},n.childNodes=function(){var e,t=[];if(n.$modelValue)for(e=0;e<n.$modelValue.length;e++)t.push(n.$nodesMap[n.$modelValue[e].$$hashKey]);return t},n.depth=function(){return n.$nodeScope?n.$nodeScope.depth():0},n.outOfDepth=function(e){var t=n.maxDepth||n.$treeScope.maxDepth;return 0<t&&n.depth()+e.maxSubDepth()+1>t}}])}(),function(){"use strict";angular.module("ui.tree").controller("TreeController",["$scope","$element",function(t,e){(this.scope=t).$element=e,t.$nodesScope=null,t.$type="uiTree",t.$emptyElm=null,t.$callbacks=null,t.dragEnabled=!0,t.emptyPlaceholderEnabled=!0,t.maxDepth=0,t.dragDelay=0,t.cloneEnabled=!1,t.nodropEnabled=!1,t.isEmpty=function(){return t.$nodesScope&&t.$nodesScope.$modelValue&&0===t.$nodesScope.$modelValue.length},t.place=function(e){t.$nodesScope.$element.append(e),t.$emptyElm.remove()},this.resetEmptyElement=function(){t.$nodesScope.$modelValue&&0!==t.$nodesScope.$modelValue.length||!t.emptyPlaceholderEnabled?t.$emptyElm.remove():e.append(t.$emptyElm)},t.resetEmptyElement=this.resetEmptyElement}])}(),function(){"use strict";angular.module("ui.tree").directive("uiTree",["treeConfig","$window",function(l,u){return{restrict:"A",scope:!0,controller:"TreeController",link:function(n,e,t,r){var i,a,o,s={accept:null,beforeDrag:null},c={};angular.extend(c,l),c.treeClass&&e.addClass(c.treeClass),"table"===e.prop("tagName").toLowerCase()?(n.$emptyElm=angular.element(u.document.createElement("tr")),o=0<(a=e.find("tr")).length?angular.element(a).children().length:1e6,i=angular.element(u.document.createElement("td")).attr("colspan",o),n.$emptyElm.append(i)):n.$emptyElm=angular.element(u.document.createElement("div")),c.emptyTreeClass&&n.$emptyElm.addClass(c.emptyTreeClass),n.$watch("$nodesScope.$modelValue.length",function(e){angular.isNumber(e)&&r.resetEmptyElement()},!0),n.$watch(t.dragEnabled,function(e){"boolean"==typeof e&&(n.dragEnabled=e)}),n.$watch(t.emptyPlaceholderEnabled,function(e){"boolean"==typeof e&&(n.emptyPlaceholderEnabled=e,r.resetEmptyElement())}),n.$watch(t.nodropEnabled,function(e){"boolean"==typeof e&&(n.nodropEnabled=e)}),n.$watch(t.cloneEnabled,function(e){"boolean"==typeof e&&(n.cloneEnabled=e)}),n.$watch(t.maxDepth,function(e){"number"==typeof e&&(n.maxDepth=e)}),n.$watch(t.dragDelay,function(e){"number"==typeof e&&(n.dragDelay=e)}),s.accept=function(e,t,n){return!(t.nodropEnabled||t.$treeScope.nodropEnabled||t.outOfDepth(e))},s.beforeDrag=function(e){return!0},s.removed=function(e){},s.dropped=function(e){},s.dragStart=function(e){},s.dragMove=function(e){},s.dragStop=function(e){},s.beforeDrop=function(e){},n.$watch(t.uiTree,function(e,t){angular.forEach(e,function(e,t){s[t]&&"function"==typeof e&&(s[t]=e)}),n.$callbacks=s},!0)}}}])}(),function(){"use strict";angular.module("ui.tree").directive("uiTreeHandle",["treeConfig",function(a){return{require:"^uiTreeNode",restrict:"A",scope:!0,controller:"TreeHandleController",link:function(e,t,n,r){var i={};angular.extend(i,a),i.handleClass&&t.addClass(i.handleClass),e!=r.scope&&(e.$nodeScope=r.scope,r.scope.$handleScope=e)}}}])}(),function(){"use strict";angular.module("ui.tree").directive("uiTreeNode",["treeConfig","UiTreeHelper","$window","$document","$timeout","$q","$rootElement",function(O,R,N,L,F,G,j){return{require:["^uiTreeNodes","^uiTree"],restrict:"A",controller:"TreeNodeController",link:function(g,f,t,e){var _,b,v,y,d,w,C,A,S,n,r,i,a,o,s,c,l,u,h,p,m,T,x,k,E,D={},I="ontouchstart"in window,P=null,M=document.body,$=document.documentElement;angular.extend(D,O),D.nodeClass&&f.addClass(D.nodeClass),g.init(e),g.collapsed=!!R.getNodeAttribute(g,"collapsed")||O.defaultCollapsed,g.sourceOnly=g.nodropEnabled||g.$treeScope.nodropEnabled,g.$watch(t.collapsed,function(e){"boolean"==typeof e&&(g.collapsed=e)}),g.$watch("collapsed",function(e){R.setNodeAttribute(g,"collapsed",e),t.$set("collapsed",e)}),g.$on("angular-ui-tree:collapse-all",function(){g.collapsed=!0}),g.$on("angular-ui-tree:expand-all",function(){g.collapsed=!1}),n=function(e){if((I||2!==e.button&&3!==e.which)&&!(e.uiTreeDragging||e.originalEvent&&e.originalEvent.uiTreeDragging)){var t,n,r,i,a,o,s,c,l,u=angular.element(e.target);if((t=R.treeNodeHandlerContainerOfElement(u))&&(u=angular.element(t)),n=f.clone(),c=R.elementIsTreeNode(u),l=R.elementIsTreeNodeHandle(u),(c||l)&&!(c&&R.elementContainsTreeNodeHandler(u)||"input"==(r=u.prop("tagName").toLowerCase())||"textarea"==r||"button"==r||"select"==r)){for(k=angular.element(e.target);k&&k[0]&&k[0]!==f;){if(R.nodrag(k))return;k=k.parent()}g.beforeDrag(g)&&(e.uiTreeDragging=!0,e.originalEvent&&(e.originalEvent.uiTreeDragging=!0),e.preventDefault(),a=R.eventObj(e),_=!0,b=R.dragInfo(g),"tr"===(i=f.prop("tagName")).toLowerCase()?(y=angular.element(N.document.createElement(i)),o=angular.element(N.document.createElement("td")).addClass(D.placeholderClass).attr("colspan",f[0].children.length),y.append(o)):y=angular.element(N.document.createElement(i)).addClass(D.placeholderClass),d=angular.element(N.document.createElement(i)),D.hiddenClass&&d.addClass(D.hiddenClass),v=R.positionStarted(a,f),y.css("height",R.height(f)+"px"),(w=angular.element(N.document.createElement(g.$parentNodesScope.$element.prop("tagName"))).addClass(g.$parentNodesScope.$element.attr("class")).addClass(D.dragClass)).css("width",R.width(f)+"px"),w.css("z-index",9999),(s=(f[0].querySelector(".angular-ui-tree-handle")||f[0]).currentStyle)&&(document.body.setAttribute("ui-tree-cursor",L.find("body").css("cursor")||""),L.find("body").css({cursor:s.cursor+"!important"})),g.sourceOnly&&y.css("display","none"),f.after(y),f.after(d),b.isClone()&&g.sourceOnly?w.append(n):w.append(f),j.append(w),w.css({left:a.pageX-v.offsetX+"px",top:a.pageY-v.offsetY+"px"}),C={placeholder:y,dragging:w},h(),g.$apply(function(){g.$treeScope.$callbacks.dragStart(b.eventArgs(C,v))}),A=Math.max(M.scrollHeight,M.offsetHeight,$.clientHeight,$.scrollHeight,$.offsetHeight),S=Math.max(M.scrollWidth,M.offsetWidth,$.clientWidth,$.scrollWidth,$.offsetWidth))}}},r=function(e){var t,n,r,i,a,o,s,c,l,u,f,d,h,p,m=R.eventObj(e);if(w){if(e.preventDefault(),N.getSelection?N.getSelection().removeAllRanges():N.document.selection&&N.document.selection.empty(),(n=m.pageX-v.offsetX)<0&&(n=0),(r=m.pageY-v.offsetY)<0&&(r=0),A<r+10&&(r=A-10),S<n+10&&(n=S-10),w.css({left:n+"px",top:r+"px"}),(a=(i=window.pageYOffset||N.document.documentElement.scrollTop)+(window.innerHeight||N.document.clientHeight||N.document.clientHeight))<m.pageY&&a<=A&&window.scrollBy(0,10),i>m.pageY&&window.scrollBy(0,-10),R.positionMoved(e,v,_),_)return void(_=!1);if(R.offset(w).left-R.offset(y).left>=D.threshold,s=m.pageX-(N.pageXOffset||N.document.body.scrollLeft||N.document.documentElement.scrollLeft)-(N.document.documentElement.clientLeft||0),c=m.pageY-(N.pageYOffset||N.document.body.scrollTop||N.document.documentElement.scrollTop)-(N.document.documentElement.clientTop||0),angular.isFunction(w.hide)?w.hide():(l=w[0].style.display,w[0].style.display="none"),N.document.elementFromPoint(s,c),f=angular.element(N.document.elementFromPoint(s,c)),(x=R.treeNodeHandlerContainerOfElement(f))&&(f=angular.element(x)),angular.isFunction(w.show)?w.show():w[0].style.display=l,(T=!(R.elementIsTreeNodeHandle(f)||R.elementIsTreeNode(f)||R.elementIsTreeNodes(f)||R.elementIsTree(f)||R.elementIsPlaceholder(f)))&&(y.remove(),P&&(P.resetEmptyElement(),P=null)),v.dirAx&&v.distAxX>=D.levelThreshold&&((v.distAxX=0)<v.distX&&(t=b.prev())&&!t.collapsed&&t.accept(g,t.childNodesCount())&&(t.$childNodesScope.$element.append(y),b.moveTo(t.$childNodesScope,t.childNodes(),t.childNodesCount())),v.distX<0&&(b.next()||(o=b.parentNode())&&o.$parentNodesScope.accept(g,o.index()+1)&&(o.$element.after(y),b.moveTo(o.$parentNodesScope,o.siblings(),o.index()+1)))),!v.dirAx){if(R.elementIsTree(f)?u=f.controller("uiTree").scope:R.elementIsTreeNodeHandle(f)?u=f.controller("uiTreeHandle").scope:R.elementIsTreeNode(f)?u=f.controller("uiTreeNode").scope:R.elementIsTreeNodes(f)?u=f.controller("uiTreeNodes").scope:R.elementIsPlaceholder(f)?u=f.controller("uiTreeNodes").scope:f.controller("uiTreeNode")&&(u=f.controller("uiTreeNode").scope),d=!1,!u)return;if(!u.$treeScope||u.$parent.nodropEnabled||u.$treeScope.nodropEnabled||y.css("display",""),"uiTree"==u.$type&&u.dragEnabled&&(d=u.isEmpty()),"uiTreeHandle"==u.$type&&(u=u.$nodeScope),"uiTreeNode"!=u.$type&&!d)return;P&&y.parent()[0]!=P.$element[0]&&(P.resetEmptyElement(),P=null),d?(P=u).$nodesScope.accept(g,0)&&(u.place(y),b.moveTo(u.$nodesScope,u.$nodesScope.childNodes(),0)):u.dragEnabled()&&(f=u.$element,h=R.offset(f),p=u.horizontal?m.pageX<h.left+R.width(f)/2:m.pageY<h.top+R.height(f)/2,u.$parentNodesScope.accept(g,u.index())?p?(f[0].parentNode.insertBefore(y[0],f[0]),b.moveTo(u.$parentNodesScope,u.siblings(),u.index())):(f.after(y),b.moveTo(u.$parentNodesScope,u.siblings(),u.index()+1)):!p&&u.accept(g,u.childNodesCount())?(u.$childNodesScope.$element.append(y),b.moveTo(u.$childNodesScope,u.childNodes(),u.childNodesCount())):T=!0)}g.$apply(function(){g.$treeScope.$callbacks.dragMove(b.eventArgs(C,v))})}},i=function(e){var t=b.eventArgs(C,v);e.preventDefault(),p(),g.$treeScope.$apply(function(){G.when(g.$treeScope.$callbacks.beforeDrop(t)).then(function(e){!1!==e&&g.$$allowNodeDrop&&!T?(b.apply(),g.$treeScope.$callbacks.dropped(t)):u()}).catch(function(){u()}).finally(function(){d.replaceWith(g.$element),y.remove(),w&&(w.remove(),w=null),g.$treeScope.$callbacks.dragStop(t),g.$$allowNodeDrop=!1,b=null;var e=document.body.getAttribute("ui-tree-cursor");null!==e&&(L.find("body").css({cursor:e}),document.body.removeAttribute("ui-tree-cursor"))})})},a=function(e){g.dragEnabled()&&n(e)},o=function(e){r(e)},s=function(e){g.$$allowNodeDrop=!0,i(e)},c=function(e){i(e)},l={exec:function(e,t){t||(t=0),this.cancel(),E=F(e,t)},cancel:function(){F.cancel(E)}},(u=function(){f.bind("touchstart mousedown",function(e){l.exec(function(){a(e)},g.dragDelay||0)}),f.bind("touchend touchcancel mouseup",function(){l.cancel()})})(),h=function(){angular.element(L).bind("touchend",s),angular.element(L).bind("touchcancel",s),angular.element(L).bind("touchmove",o),angular.element(L).bind("mouseup",s),angular.element(L).bind("mousemove",o),angular.element(L).bind("mouseleave",c)},p=function(){angular.element(L).unbind("touchend",s),angular.element(L).unbind("touchcancel",s),angular.element(L).unbind("touchmove",o),angular.element(L).unbind("mouseup",s),angular.element(L).unbind("mousemove",o),angular.element(L).unbind("mouseleave",c)},m=function(e){27==e.keyCode&&(g.$$allowNodeDrop=!1,i(e))},angular.element(N.document).bind("keydown",m),g.$on("$destroy",function(){angular.element(N.document).unbind("keydown",m)})}}}])}(),function(){"use strict";angular.module("ui.tree").directive("uiTreeNodes",["treeConfig","$window",function(c){return{require:["ngModel","?^uiTreeNode","^uiTree"],restrict:"A",scope:!0,controller:"TreeNodesController",link:function(t,e,n,r){var i={},a=r[0],o=r[1],s=r[2];angular.extend(i,c),i.nodesClass&&e.addClass(i.nodesClass),o?(o.scope.$childNodesScope=t).$nodeScope=o.scope:s.scope.$nodesScope=t,t.$treeScope=s.scope,a&&(a.$render=function(){t.$modelValue=a.$modelValue}),t.$watch(function(){return n.maxDepth},function(e){"number"==typeof e&&(t.maxDepth=e)}),t.$watch(function(){return n.nodropEnabled},function(e){void 0!==e&&(t.nodropEnabled=!0)},!0),n.$observe("horizontal",function(e){t.horizontal=void 0!==e})}}}])}(),function(){"use strict";angular.module("ui.tree").factory("UiTreeHelper",["$document","$window","treeConfig",function(n,r,t){return{nodesData:{},setNodeAttribute:function(e,t,n){if(!e.$modelValue)return null;var r=this.nodesData[e.$modelValue.$$hashKey];r||(r={},this.nodesData[e.$modelValue.$$hashKey]=r),r[t]=n},getNodeAttribute:function(e,t){if(!e.$modelValue)return null;var n=this.nodesData[e.$modelValue.$$hashKey];return n?n[t]:null},nodrag:function(e){return void 0!==e.attr("data-nodrag")&&"false"!==e.attr("data-nodrag")},eventObj:function(e){var t=e;return void 0!==e.targetTouches?t=e.targetTouches.item(0):void 0!==e.originalEvent&&void 0!==e.originalEvent.targetTouches&&(t=e.originalEvent.targetTouches.item(0)),t},dragInfo:function(e){return{source:e,sourceInfo:{cloneModel:!0===e.$treeScope.cloneEnabled?angular.copy(e.$modelValue):void 0,nodeScope:e,index:e.index(),nodesScope:e.$parentNodesScope},index:e.index(),siblings:e.siblings().slice(0),parent:e.$parentNodesScope,moveTo:function(e,t,n){this.parent=e,this.siblings=t.slice(0);var r=this.siblings.indexOf(this.source);-1<r&&(this.siblings.splice(r,1),this.source.index()<n&&n--),this.siblings.splice(n,0,this.source),this.index=n},parentNode:function(){return this.parent.$nodeScope},prev:function(){return 0<this.index?this.siblings[this.index-1]:null},next:function(){return this.index<this.siblings.length-1?this.siblings[this.index+1]:null},isClone:function(){return!0===this.source.$treeScope.cloneEnabled},clonedNode:function(e){return angular.copy(e)},isDirty:function(){return this.source.$parentNodesScope!=this.parent||this.source.index()!=this.index},isForeign:function(){return this.source.$treeScope!==this.parent.$treeScope},eventArgs:function(e,t){return{source:this.sourceInfo,dest:{index:this.index,nodesScope:this.parent},elements:e,pos:t}},apply:function(){var e=this.source.$modelValue;this.parent.nodropEnabled||this.parent.$treeScope.nodropEnabled||this.isDirty()&&(this.isClone()&&this.isForeign()?this.parent.insertNode(this.index,this.sourceInfo.cloneModel):(this.source.remove(),this.parent.insertNode(this.index,e)))}}},height:function(e){return e.prop("scrollHeight")},width:function(e){return e.prop("scrollWidth")},offset:function(e){var t=e[0].getBoundingClientRect();return{width:e.prop("offsetWidth"),height:e.prop("offsetHeight"),top:t.top+(r.pageYOffset||n[0].body.scrollTop||n[0].documentElement.scrollTop),left:t.left+(r.pageXOffset||n[0].body.scrollLeft||n[0].documentElement.scrollLeft)}},positionStarted:function(e,t){var n={},r=e.pageX,i=e.pageY;return e.originalEvent&&e.originalEvent.touches&&0<e.originalEvent.touches.length&&(r=e.originalEvent.touches[0].pageX,i=e.originalEvent.touches[0].pageY),n.offsetX=r-this.offset(t).left,n.offsetY=i-this.offset(t).top,n.startX=n.lastX=r,n.startY=n.lastY=i,n.nowX=n.nowY=n.distX=n.distY=n.dirAx=0,n.dirX=n.dirY=n.lastDirX=n.lastDirY=n.distAxX=n.distAxY=0,n},positionMoved:function(e,t,n){var r,i=e.pageX,a=e.pageY;if(e.originalEvent&&e.originalEvent.touches&&0<e.originalEvent.touches.length&&(i=e.originalEvent.touches[0].pageX,a=e.originalEvent.touches[0].pageY),t.lastX=t.nowX,t.lastY=t.nowY,t.nowX=i,t.nowY=a,t.distX=t.nowX-t.lastX,t.distY=t.nowY-t.lastY,t.lastDirX=t.dirX,t.lastDirY=t.dirY,t.dirX=0===t.distX?0:0<t.distX?1:-1,t.dirY=0===t.distY?0:0<t.distY?1:-1,r=Math.abs(t.distX)>Math.abs(t.distY)?1:0,n)return t.dirAx=r,void(t.moving=!0);t.dirAx!==r?(t.distAxX=0,t.distAxY=0):(t.distAxX+=Math.abs(t.distX),0!==t.dirX&&t.dirX!==t.lastDirX&&(t.distAxX=0),t.distAxY+=Math.abs(t.distY),0!==t.dirY&&t.dirY!==t.lastDirY&&(t.distAxY=0)),t.dirAx=r},elementIsTreeNode:function(e){return void 0!==e.attr("ui-tree-node")},elementIsTreeNodeHandle:function(e){return void 0!==e.attr("ui-tree-handle")},elementIsTree:function(e){return void 0!==e.attr("ui-tree")},elementIsTreeNodes:function(e){return void 0!==e.attr("ui-tree-nodes")},elementIsPlaceholder:function(e){return e.hasClass(t.placeholderClass)},elementContainsTreeNodeHandler:function(e){return 1<=e[0].querySelectorAll("[ui-tree-handle]").length},treeNodeHandlerContainerOfElement:function(e){return function(e,t){if(void 0===t)return null;var n=t.parentNode,r="function"==typeof n.setAttribute&&n.hasAttribute(e)?n:null;for(;n&&"function"==typeof n.setAttribute&&!n.hasAttribute(e);){if(n=n.parentNode,(r=n)===document.documentElement){r=null;break}0}return r}("ui-tree-handle",e[0])}}}])}(),function(){var _=window.ResizeSensor;"undefined"!=typeof module&&void 0!==module.exports&&(_=require("./ResizeSensor"));var t=this.ElementQueries=function(){var d=!1,h=[];function a(e){e||(e=document.documentElement);var t=getComputedStyle(e,"fontSize");return parseFloat(t)||16}function f(e,t){var n=t.replace(/[0-9]*/,"");switch(t=parseFloat(t),n){case"px":return t;case"em":return t*a(e);case"rem":return t*a();case"vw":return t*document.documentElement.clientWidth/100;case"vh":return t*document.documentElement.clientHeight/100;case"vmin":case"vmax":var r=document.documentElement.clientWidth/100,i=document.documentElement.clientHeight/100;return t*(0,Math["vmin"===n?"min":"max"])(r,i);default:return t}}function n(e){this.element=e,this.options={};var t,n,r,i,a,o,s,c=0,l=0;this.addOption=function(e){var t=[e.mode,e.property,e.value].join(",");this.options[t]=e};var u=["min-width","min-height","max-width","max-height"];this.call=function(){for(t in c=this.element.offsetWidth,l=this.element.offsetHeight,a={},this.options)this.options.hasOwnProperty(t)&&(n=this.options[t],r=f(this.element,n.value),i="width"==n.property?c:l,s=n.mode+"-"+n.property,o="","min"==n.mode&&r<=i&&(o+=n.value),"max"==n.mode&&i<=r&&(o+=n.value),a[s]||(a[s]=""),o&&-1===(" "+a[s]+" ").indexOf(" "+o+" ")&&(a[s]+=" "+o));for(var e in u)u.hasOwnProperty(e)&&(a[u[e]]?this.element.setAttribute(u[e],a[u[e]].substr(1)):this.element.removeAttribute(u[e]))}}function s(e,t){e.elementQueriesSetupInformation?e.elementQueriesSetupInformation.addOption(t):(e.elementQueriesSetupInformation=new n(e),e.elementQueriesSetupInformation.addOption(t),e.elementQueriesSensor=new _(e,function(){e.elementQueriesSetupInformation.call()})),e.elementQueriesSetupInformation.call(),d&&h.indexOf(e)<0&&h.push(e)}var c={};function l(){var e;if(document.querySelectorAll&&(e=document.querySelectorAll.bind(document)),e||"undefined"==typeof $$||(e=$$),e||"undefined"==typeof jQuery||(e=jQuery),!e)throw"No document.querySelectorAll, jQuery or Mootools's $$ found.";return e}function i(r){var i=[],a=[],o=[],s=0,c=-1,l=[];for(var e in r.children)if(r.children.hasOwnProperty(e)&&r.children[e].tagName&&"img"===r.children[e].tagName.toLowerCase()){i.push(r.children[e]);var t=r.children[e].getAttribute("min-width")||r.children[e].getAttribute("data-min-width"),n=r.children[e].getAttribute("data-src")||r.children[e].getAttribute("url");o.push(n);var u={minWidth:t};a.push(u),t?r.children[e].style.display="none":(s=i.length-1,r.children[e].style.display="block")}function f(){var e,t=!1;for(e in i)i.hasOwnProperty(e)&&a[e].minWidth&&r.offsetWidth>a[e].minWidth&&(t=e);if(t||(t=s),c!=t)if(l[t])i[c].style.display="none",i[t].style.display="block",c=t;else{var n=new Image;n.onload=function(){i[t].src=o[t],i[c].style.display="none",i[t].style.display="block",l[t]=!0,c=t},n.src=o[t]}else i[t].src=o[t]}c=s,r.resizeSensor=new _(r,f),f(),d&&h.push(r)}var u=/,?[\s\t]*([^,\n]*?)((?:\[[\s\t]*?(?:min|max)-(?:width|height)[\s\t]*?[~$\^]?=[\s\t]*?"[^"]*?"[\s\t]*?])+)([^,\n\s\{]*)/gim,p=/\[[\s\t]*?(min|max)-(width|height)[\s\t]*?[~$\^]?=[\s\t]*?"([^"]*?)"[\s\t]*?]/gim;function o(e){var t,n,r,i,a,o;for(e=e.replace(/'/g,'"');null!==(t=u.exec(e));)for(n=t[1]+t[3],attrs=t[2];null!==(attrMatch=p.exec(attrs));)r=n,i=attrMatch[1],a=attrMatch[2],o=attrMatch[3],void 0===c[i]&&(c[i]={}),void 0===c[i][a]&&(c[i][a]={}),void 0===c[i][a][o]?c[i][a][o]=r:c[i][a][o]+=","+r}function m(e){var t="";if(e)if("string"==typeof e)-1===(e=e.toLowerCase()).indexOf("min-width")&&-1===e.indexOf("max-width")||o(e);else for(var n=0,r=e.length;n<r;n++)1===e[n].type?-1!==(t=e[n].selectorText||e[n].cssText).indexOf("min-height")||-1!==t.indexOf("max-height")?o(t):-1===t.indexOf("min-width")&&-1===t.indexOf("max-width")||o(t):4===e[n].type&&m(e[n].cssRules||e[n].rules)}var g=!1;this.init=function(e){d=void 0!==e&&e;for(var t=0,n=document.styleSheets.length;t<n;t++)try{m(document.styleSheets[t].cssRules||document.styleSheets[t].rules||document.styleSheets[t].cssText)}catch(e){if("SecurityError"!==e.name)throw e}if(!g){var r=document.createElement("style");r.type="text/css",r.innerHTML="[responsive-image] > img, [data-responsive-image] {overflow: hidden; padding: 0; } [responsive-image] > img, [data-responsive-image] > img { width: 100%;}",document.getElementsByTagName("head")[0].appendChild(r),g=!0}!function(){var e=l();for(var t in c)if(c.hasOwnProperty(t))for(var n in c[t])if(c[t].hasOwnProperty(n))for(var r in c[t][n])if(c[t][n].hasOwnProperty(r))for(var i=e(c[t][n][r]),a=0,o=i.length;a<o;a++)s(i[a],{mode:t,property:n,value:r})}(),function(){for(var e=l()("[data-responsive-image],[responsive-image]"),t=0,n=e.length;t<n;t++)i(e[t])}()},this.update=function(e){this.init(e)},this.detach=function(){if(!this.withTracking)throw"withTracking is not enabled. We can not detach elements since we don not store it.Use ElementQueries.withTracking = true; before domready or call ElementQueryes.update(true).";for(var e;e=h.pop();)t.detach(e);h=[]}};t.update=function(e){t.instance.update(e)},t.detach=function(e){e.elementQueriesSetupInformation?(e.elementQueriesSensor.detach(),delete e.elementQueriesSetupInformation,delete e.elementQueriesSensor):e.resizeSensor&&(e.resizeSensor.detach(),delete e.resizeSensor)},t.withTracking=!1,t.init=function(){t.instance||(t.instance=new t),t.instance.init(t.withTracking)};t.listen=function(){!function(e){if(document.addEventListener)document.addEventListener("DOMContentLoaded",e,!1);else if(/KHTML|WebKit|iCab/i.test(navigator.userAgent))var t=setInterval(function(){/loaded|complete/i.test(document.readyState)&&(e(),clearInterval(t))},10);else window.onload=e}(t.init)},"undefined"!=typeof module&&void 0!==module.exports?module.exports=t:(window.ElementQueries=t).listen()}(),function(){var s=function(n,e){function p(){var e,t;this.q=[],this.add=function(e){this.q.push(e)},this.call=function(){for(e=0,t=this.q.length;e<t;e++)this.q[e].call()}}function t(e,t){if(e.resizedAttached){if(e.resizedAttached)return void e.resizedAttached.add(t)}else e.resizedAttached=new p,e.resizedAttached.add(t);e.resizeSensor=document.createElement("div"),e.resizeSensor.className="resize-sensor";var n,r,i="position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;",a="position: absolute; left: 0; top: 0; transition: 0s;";e.resizeSensor.style.cssText=i,e.resizeSensor.innerHTML='<div class="resize-sensor-expand" style="'+i+'"><div style="'+a+'"></div></div><div class="resize-sensor-shrink" style="'+i+'"><div style="'+a+' width: 200%; height: 200%"></div></div>',e.appendChild(e.resizeSensor),{fixed:1,absolute:1}[(n=e,r="position",n.currentStyle?n.currentStyle[r]:window.getComputedStyle?window.getComputedStyle(n,null).getPropertyValue(r):n.style[r])]||(e.style.position="relative");var o,s,c=e.resizeSensor.childNodes[0],l=c.childNodes[0],u=e.resizeSensor.childNodes[1],f=(u.childNodes[0],function(){l.style.width=c.offsetWidth+10+"px",l.style.height=c.offsetHeight+10+"px",c.scrollLeft=c.scrollWidth,c.scrollTop=c.scrollHeight,u.scrollLeft=u.scrollWidth,u.scrollTop=u.scrollHeight,o=e.offsetWidth,s=e.offsetHeight});f();var d=function(e,t,n){e.attachEvent?e.attachEvent("on"+t,n):e.addEventListener(t,n)},h=function(){e.offsetWidth==o&&e.offsetHeight==s||e.resizedAttached&&e.resizedAttached.call(),f()};d(c,"scroll",h),d(u,"scroll",h)}var r=Object.prototype.toString.call(n),i="[object Array]"===r||"[object NodeList]"===r||"[object HTMLCollection]"===r||"undefined"!=typeof jQuery&&n instanceof jQuery||"undefined"!=typeof Elements&&n instanceof Elements;if(i)for(var a=0,o=n.length;a<o;a++)t(n[a],e);else t(n,e);this.detach=function(){if(i)for(var e=0,t=n.length;e<t;e++)s.detach(n[e]);else s.detach(n)}};s.detach=function(e){e.resizeSensor&&(e.removeChild(e.resizeSensor),delete e.resizeSensor,delete e.resizedAttached)},"undefined"!=typeof module&&void 0!==module.exports?module.exports=s:window.ResizeSensor=s}(),function(n){"function"==typeof define&&define.amd?define(["jquery","datatables.net"],function(e){return n(e,window,document)}):"object"==typeof exports?module.exports=function(e,t){return e||(e=window),t&&t.fn.dataTable||(t=require("datatables.net")(e,t).$),n(t,e,e.document)}:n(jQuery,window,document)}(function(p,d,o,h){"use strict";var a=p.fn.dataTable,i=function(e,t){if(!a.versionCheck||!a.versionCheck("1.10.3"))throw"DataTables Responsive requires DataTables 1.10.3 or newer";this.s={dt:new a.Api(e),columns:[],current:[]},this.s.dt.settings()[0].responsive||(t&&"string"==typeof t.details?t.details={type:t.details}:t&&!1===t.details?t.details={type:!1}:t&&!0===t.details&&(t.details={type:"inline"}),this.c=p.extend(!0,{},i.defaults,a.defaults.responsive,t),(e.responsive=this)._constructor())};p.extend(i.prototype,{_constructor:function(){var i=this,r=this.s.dt,e=r.settings()[0],t=p(d).width();r.settings()[0]._responsive=this,p(d).on("resize.dtr orientationchange.dtr",a.util.throttle(function(){var e=p(d).width();e!==t&&(i._resize(),t=e)})),e.oApi._fnCallbackReg(e,"aoRowCreatedCallback",function(e,t,n){-1!==p.inArray(!1,i.s.current)&&p("td, th",e).each(function(e){var t=r.column.index("toData",e);!1===i.s.current[t]&&p(this).css("display","none")})}),r.on("destroy.dtr",function(){r.off(".dtr"),p(r.table().body()).off(".dtr"),p(d).off("resize.dtr orientationchange.dtr"),p.each(i.s.current,function(e,t){!1===t&&i._setColumnVis(e,!0)})}),this.c.breakpoints.sort(function(e,t){return e.width<t.width?1:e.width>t.width?-1:0}),this._classLogic(),this._resizeAuto();var n=this.c.details;!1!==n.type&&(i._detailsInit(),r.on("column-visibility.dtr",function(e,t,n,r){i._classLogic(),i._resizeAuto(),i._resize()}),r.on("draw.dtr",function(){i._redrawChildren()}),p(r.table().node()).addClass("dtr-"+n.type)),r.on("column-reorder.dtr",function(e,t,n){i._classLogic(),i._resizeAuto(),i._resize()}),r.on("column-sizing.dtr",function(){i._resizeAuto(),i._resize()}),r.on("init.dtr",function(e,t,n){i._resizeAuto(),i._resize(),p.inArray(!1,i.s.current)&&r.columns.adjust()}),this._resize()},_columnsVisiblity:function(t){var e,n,r=this.s.dt,i=this.s.columns,a=i.map(function(e,t){return{columnIdx:t,priority:e.priority}}).sort(function(e,t){return e.priority!==t.priority?e.priority-t.priority:e.columnIdx-t.columnIdx}),o=p.map(i,function(e){return(!e.auto||null!==e.minWidth)&&(!0===e.auto?"-":-1!==p.inArray(t,e.includeIn))}),s=0;for(e=0,n=o.length;e<n;e++)!0===o[e]&&(s+=i[e].minWidth);var c=r.settings()[0].oScroll,l=c.sY||c.sX?c.iBarWidth:0,u=r.table().container().offsetWidth-l-s;for(e=0,n=o.length;e<n;e++)i[e].control&&(u-=i[e].minWidth);var f=!1;for(e=0,n=a.length;e<n;e++){var d=a[e].columnIdx;"-"===o[d]&&!i[d].control&&i[d].minWidth&&(f||u-i[d].minWidth<0?(f=!0,o[d]=!1):o[d]=!0,u-=i[d].minWidth)}var h=!1;for(e=0,n=i.length;e<n;e++)if(!i[e].control&&!i[e].never&&!o[e]){h=!0;break}for(e=0,n=i.length;e<n;e++)i[e].control&&(o[e]=h);return-1===p.inArray(!0,o)&&(o[0]=!0),o},_classLogic:function(){var s=this,c=this.c.breakpoints,a=this.s.dt,l=a.columns().eq(0).map(function(e){var t=this.column(e),n=t.header().className,r=a.settings()[0].aoColumns[e].responsivePriority;if(r===h){var i=p(t.header()).data("priority");r=i!==h?1*i:1e4}return{className:n,includeIn:[],auto:!1,control:!1,never:!!n.match(/\bnever\b/),priority:r}}),u=function(e,t){var n=l[e].includeIn;-1===p.inArray(t,n)&&n.push(t)},f=function(e,t,n,r){var i,a,o;if(n){if("max-"===n)for(i=s._find(t).width,a=0,o=c.length;a<o;a++)c[a].width<=i&&u(e,c[a].name);else if("min-"===n)for(i=s._find(t).width,a=0,o=c.length;a<o;a++)c[a].width>=i&&u(e,c[a].name);else if("not-"===n)for(a=0,o=c.length;a<o;a++)-1===c[a].name.indexOf(r)&&u(e,c[a].name)}else l[e].includeIn.push(t)};l.each(function(e,a){for(var t=e.className.split(" "),o=!1,n=0,r=t.length;n<r;n++){var s=p.trim(t[n]);if("all"===s)return o=!0,void(e.includeIn=p.map(c,function(e){return e.name}));if("none"===s||e.never)return void(o=!0);if("control"===s)return o=!0,void(e.control=!0);p.each(c,function(e,t){var n=t.name.split("-"),r=new RegExp("(min\\-|max\\-|not\\-)?("+n[0]+")(\\-[_a-zA-Z0-9])?"),i=s.match(r);i&&(o=!0,i[2]===n[0]&&i[3]==="-"+n[1]?f(a,t.name,i[1],i[2]+i[3]):i[2]!==n[0]||i[3]||f(a,t.name,i[1],i[2]))})}o||(e.auto=!0)}),this.s.columns=l},_detailsDisplay:function(e,t){var n=this,r=this.s.dt,i=this.c.details;if(i&&!1!==i.type){var a=i.display(e,t,function(){return i.renderer(r,e[0],n._detailsObj(e[0]))});!0!==a&&!1!==a||p(r.table().node()).triggerHandler("responsive-display.dt",[r,e,a,t])}},_detailsInit:function(){var r=this,i=this.s.dt,e=this.c.details;"inline"===e.type&&(e.target="td:first-child, th:first-child"),i.on("draw.dtr",function(){r._tabIndexes()}),r._tabIndexes(),p(i.table().body()).on("keyup.dtr","td, th",function(e){13===e.keyCode&&p(this).data("dtr-keyboard")&&p(this).click()});var a=e.target,t="string"==typeof a?a:"td, th";p(i.table().body()).on("click.dtr mousedown.dtr mouseup.dtr",t,function(e){if(p(i.table().node()).hasClass("collapsed")&&i.row(p(this).closest("tr")).length){if("number"==typeof a){var t=a<0?i.columns().eq(0).length+a:a;if(i.cell(this).index().column!==t)return}var n=i.row(p(this).closest("tr"));"click"===e.type?r._detailsDisplay(n,!1):"mousedown"===e.type?p(this).css("outline","none"):"mouseup"===e.type&&p(this).blur().css("outline","")}})},_detailsObj:function(n){var r=this,i=this.s.dt;return p.map(this.s.columns,function(e,t){if(!e.never&&!e.control)return{title:i.settings()[0].aoColumns[t].sTitle,data:i.cell(n,t).render(r.c.orthogonal),hidden:i.column(t).visible()&&!r.s.current[t],columnIndex:t,rowIndex:n}})},_find:function(e){for(var t=this.c.breakpoints,n=0,r=t.length;n<r;n++)if(t[n].name===e)return t[n]},_redrawChildren:function(){var n=this,r=this.s.dt;r.rows({page:"current"}).iterator("row",function(e,t){r.row(t);n._detailsDisplay(r.row(t),!0)})},_resize:function(){var e,t,n=this,r=this.s.dt,i=p(d).width(),a=this.c.breakpoints,o=a[0].name,s=this.s.columns,c=this.s.current.slice();for(e=a.length-1;0<=e;e--)if(i<=a[e].width){o=a[e].name;break}var l=this._columnsVisiblity(o);this.s.current=l;var u=!1;for(e=0,t=s.length;e<t;e++)if(!1===l[e]&&!s[e].never&&!s[e].control){u=!0;break}p(r.table().node()).toggleClass("collapsed",u);var f=!1;r.columns().eq(0).each(function(e,t){l[t]!==c[t]&&(f=!0,n._setColumnVis(e,l[t]))}),f&&(this._redrawChildren(),p(r.table().node()).trigger("responsive-resize.dt",[r,this.s.current]))},_resizeAuto:function(){var n=this.s.dt,r=this.s.columns;if(this.c.auto&&-1!==p.inArray(!0,p.map(r,function(e){return e.auto}))){n.table().node().offsetWidth,n.columns;var e=n.table().node().cloneNode(!1),t=p(n.table().header().cloneNode(!1)).appendTo(e),i=p(n.table().body()).clone(!1,!1).empty().appendTo(e),a=n.columns().header().filter(function(e){return n.column(e).visible()}).to$().clone(!1).css("display","table-cell");p(i).append(p(n.rows({page:"current"}).nodes()).clone(!1)).find("th, td").css("display","");var o=n.table().footer();if(o){var s=p(o.cloneNode(!1)).appendTo(e),c=n.columns().footer().filter(function(e){return n.column(e).visible()}).to$().clone(!1).css("display","table-cell");p("<tr/>").append(c).appendTo(s)}p("<tr/>").append(a).appendTo(t),"inline"===this.c.details.type&&p(e).addClass("dtr-inline collapsed"),p(e).find("[name]").removeAttr("name");var l=p("<div/>").css({width:1,height:1,overflow:"hidden"}).append(e);l.insertBefore(n.table().node()),a.each(function(e){var t=n.column.index("fromVisible",e);r[t].minWidth=this.offsetWidth||0}),l.remove()}},_setColumnVis:function(e,t){var n=this.s.dt,r=t?"":"none";p(n.column(e).header()).css("display",r),p(n.column(e).footer()).css("display",r),n.column(e).nodes().to$().css("display",r)},_tabIndexes:function(){var e=this.s.dt,t=e.cells({page:"current"}).nodes().to$(),n=e.settings()[0],r=this.c.details.target;t.filter("[data-dtr-keyboard]").removeData("[data-dtr-keyboard]"),p("number"==typeof r?":eq("+r+")":r,e.rows({page:"current"}).nodes()).attr("tabIndex",n.iTabIndex).data("dtr-keyboard",1)}}),i.breakpoints=[{name:"desktop",width:1/0},{name:"tablet-l",width:1024},{name:"tablet-p",width:768},{name:"mobile-l",width:480},{name:"mobile-p",width:320}],i.display={childRow:function(e,t,n){return t?p(e.node()).hasClass("parent")?(e.child(n(),"child").show(),!0):void 0:e.child.isShown()?(e.child(!1),p(e.node()).removeClass("parent"),!1):(e.child(n(),"child").show(),p(e.node()).addClass("parent"),!0)},childRowImmediate:function(e,t,n){return!t&&e.child.isShown()||!e.responsive.hasHidden()?(e.child(!1),p(e.node()).removeClass("parent"),!1):(e.child(n(),"child").show(),p(e.node()).addClass("parent"),!0)},modal:function(a){return function(e,t,n){if(t)p("div.dtr-modal-content").empty().append(n());else{var r=function(){i.remove(),p(o).off("keypress.dtr")},i=p('<div class="dtr-modal"/>').append(p('<div class="dtr-modal-display"/>').append(p('<div class="dtr-modal-content"/>').append(n())).append(p('<div class="dtr-modal-close">&times;</div>').click(function(){r()}))).append(p('<div class="dtr-modal-background"/>').click(function(){r()})).appendTo("body");p(o).on("keyup.dtr",function(e){27===e.keyCode&&(e.stopPropagation(),r())})}a&&a.header&&p("div.dtr-modal-content").prepend("<h2>"+a.header(e)+"</h2>")}}},i.renderer={listHidden:function(){return function(e,t,n){var r=p.map(n,function(e){return e.hidden?'<li data-dtr-index="'+e.columnIndex+'" data-dt-row="'+e.rowIndex+'" data-dt-column="'+e.columnIndex+'"><span class="dtr-title">'+e.title+'</span> <span class="dtr-data">'+e.data+"</span></li>":""}).join("");return!!r&&p('<ul data-dtr-index="'+t+'"/>').append(r)}},tableAll:function(i){return i=p.extend({tableClass:""},i),function(e,t,n){var r=p.map(n,function(e){return'<tr data-dt-row="'+e.rowIndex+'" data-dt-column="'+e.columnIndex+'"><td>'+e.title+":</td> <td>"+e.data+"</td></tr>"}).join("");return p('<table class="'+i.tableClass+'" width="100%"/>').append(r)}}},i.defaults={breakpoints:i.breakpoints,auto:!0,details:{display:i.display.childRow,renderer:i.renderer.listHidden(),target:0,type:"inline"},orthogonal:"display"};var e=p.fn.dataTable.Api;return e.register("responsive()",function(){return this}),e.register("responsive.index()",function(e){return{column:(e=p(e)).data("dtr-index"),row:e.parent().data("dtr-index")}}),e.register("responsive.rebuild()",function(){return this.iterator("table",function(e){e._responsive&&e._responsive._classLogic()})}),e.register("responsive.recalc()",function(){return this.iterator("table",function(e){e._responsive&&(e._responsive._resizeAuto(),e._responsive._resize())})}),e.register("responsive.hasHidden()",function(){var e=this.context[0];return!!e._responsive&&-1!==p.inArray(!1,e._responsive.s.current)}),i.version="2.1.0",p.fn.dataTable.Responsive=i,p.fn.DataTable.Responsive=i,p(o).on("preInit.dt.dtr",function(e,t,n){if("dt"===e.namespace&&(p(t.nTable).hasClass("responsive")||p(t.nTable).hasClass("dt-responsive")||t.oInit.responsive||a.defaults.responsive)){var r=t.oInit.responsive;!1!==r&&new i(t,p.isPlainObject(r)?r:{})}}),i}),function(e){"undefined"!=typeof exports?e(exports):(window.hljs=e({}),"function"==typeof define&&define.amd&&define("hljs",[],function(){return window.hljs}))}(function(i){function b(e){return e.replace(/&/gm,"&amp;").replace(/</gm,"&lt;").replace(/>/gm,"&gt;")}function d(e){return e.nodeName.toLowerCase()}function v(e,t){var n=e&&e.exec(t);return n&&0==n.index}function h(e){return/^(no-?highlight|plain|text)$/i.test(e)}function y(e,t){var n,r={};for(n in e)r[n]=e[n];if(t)for(n in t)r[n]=t[n];return r}function p(e){var i=[];return function e(t,n){for(var r=t.firstChild;r;r=r.nextSibling)3==r.nodeType?n+=r.nodeValue.length:1==r.nodeType&&(i.push({event:"start",offset:n,node:r}),n=e(r,n),d(r).match(/br|hr|img|input/)||i.push({event:"stop",offset:n,node:r}));return n}(e,0),i}function w(e,t,s,n){function c(e,t,n,r){var i='<span class="'+(r?"":A.classPrefix);return(i+=e+'">')+t+(n?"":"</span>")}function l(){return void 0!==d.subLanguage?function(){var e="string"==typeof d.subLanguage;if(e&&!S[d.subLanguage])return b(p);var t=e?w(d.subLanguage,p,!0,a[d.subLanguage]):C(p,d.subLanguage.length?d.subLanguage:void 0);return 0<d.relevance&&(m+=t.relevance),e&&(a[d.subLanguage]=t.top),c(t.language,t.value,!1,!0)}():function(){if(!d.keywords)return b(p);var e="",t=0;d.lexemesRe.lastIndex=0;for(var n,r,i,a=d.lexemesRe.exec(p);a;){e+=b(p.substr(t,a.index-t));var o=(n=d,r=a,i=f.case_insensitive?r[0].toLowerCase():r[0],n.keywords.hasOwnProperty(i)&&n.keywords[i]);o?(m+=o[1],e+=c(o[0],b(a[0]))):e+=b(a[0]),t=d.lexemesRe.lastIndex,a=d.lexemesRe.exec(p)}return e+b(p.substr(t))}()}function u(e,t){var n=e.className?c(e.className,"",!0):"";p=e.returnBegin?(h+=n,""):e.excludeBegin?(h+=b(t)+n,""):(h+=n,t),d=Object.create(e,{parent:{value:d}})}function r(e,t){if(p+=e,void 0===t)return h+=l(),0;var n=function(e,t){for(var n=0;n<t.contains.length;n++)if(v(t.contains[n].beginRe,e))return t.contains[n]}(t,d);if(n)return h+=l(),u(n,t),n.returnBegin?0:t.length;var r,i,a=function e(t,n){if(v(t.endRe,n)){for(;t.endsParent&&t.parent;)t=t.parent;return t}if(t.endsWithParent)return e(t.parent,n)}(d,t);if(a){var o=d;for(o.returnEnd||o.excludeEnd||(p+=t),h+=l();d.className&&(h+="</span>"),m+=d.relevance,(d=d.parent)!=a.parent;);return o.excludeEnd&&(h+=b(t)),p="",a.starts&&u(a.starts,""),o.returnEnd?0:t.length}if(r=t,i=d,!s&&v(i.illegalRe,r))throw new Error('Illegal lexeme "'+t+'" for mode "'+(d.className||"<unnamed>")+'"');return p+=t,t.length||1}var f=T(e);if(!f)throw new Error('Unknown language: "'+e+'"');!function(s){function c(e){return e&&e.source||e}function l(e,t){return new RegExp(c(e),"m"+(s.case_insensitive?"i":"")+(t?"g":""))}!function t(n,e){if(!n.compiled){if(n.compiled=!0,n.keywords=n.keywords||n.beginKeywords,n.keywords){var r={},i=function(n,e){s.case_insensitive&&(e=e.toLowerCase()),e.split(" ").forEach(function(e){var t=e.split("|");r[t[0]]=[n,t[1]?Number(t[1]):1]})};"string"==typeof n.keywords?i("keyword",n.keywords):Object.keys(n.keywords).forEach(function(e){i(e,n.keywords[e])}),n.keywords=r}n.lexemesRe=l(n.lexemes||/\b\w+\b/,!0),e&&(n.beginKeywords&&(n.begin="\\b("+n.beginKeywords.split(" ").join("|")+")\\b"),n.begin||(n.begin=/\B|\b/),n.beginRe=l(n.begin),n.end||n.endsWithParent||(n.end=/\B|\b/),n.end&&(n.endRe=l(n.end)),n.terminator_end=c(n.end)||"",n.endsWithParent&&e.terminator_end&&(n.terminator_end+=(n.end?"|":"")+e.terminator_end)),n.illegal&&(n.illegalRe=l(n.illegal)),void 0===n.relevance&&(n.relevance=1),n.contains||(n.contains=[]);var a=[];n.contains.forEach(function(t){t.variants?t.variants.forEach(function(e){a.push(y(t,e))}):a.push("self"==t?n:t)}),n.contains=a,n.contains.forEach(function(e){t(e,n)}),n.starts&&t(n.starts,e);var o=n.contains.map(function(e){return e.beginKeywords?"\\.?("+e.begin+")\\.?":e.begin}).concat([n.terminator_end,n.illegal]).map(c).filter(Boolean);n.terminators=o.length?l(o.join("|"),!0):{exec:function(){return null}}}}(s)}(f);var i,d=n||f,a={},h="";for(i=d;i!=f;i=i.parent)i.className&&(h=c(i.className,"",!0)+h);var p="",m=0;try{for(var o,g,_=0;d.terminators.lastIndex=_,o=d.terminators.exec(t);)g=r(t.substr(_,o.index-_),o[0]),_=o.index+g;for(r(t.substr(_)),i=d;i.parent;i=i.parent)i.className&&(h+="</span>");return{relevance:m,value:h,language:e,top:d}}catch(e){if(-1!=e.message.indexOf("Illegal"))return{relevance:0,value:b(t)};throw e}}function C(n,e){e=e||A.languages||Object.keys(S);var r={relevance:0,value:b(n)},i=r;return e.forEach(function(e){if(T(e)){var t=w(e,n,!1);t.language=e,t.relevance>i.relevance&&(i=t),t.relevance>r.relevance&&(i=r,r=t)}}),i.language&&(r.second_best=i),r}function m(e){return A.tabReplace&&(e=e.replace(/^((<[^>]+>|\t)+)/gm,function(e,t){return t.replace(/\t/g,A.tabReplace)})),A.useBR&&(e=e.replace(/\n/g,"<br>")),e}function t(e){var t=function(e){var t,n,r,i=e.className+" ";if(i+=e.parentNode?e.parentNode.className:"",n=/\blang(?:uage)?-([\w-]+)\b/i.exec(i))return T(n[1])?n[1]:"no-highlight";for(t=0,r=(i=i.split(/\s+/)).length;t<r;t++)if(T(i[t])||h(i[t]))return i[t]}(e);if(!h(t)){var n;A.useBR?(n=document.createElementNS("http://www.w3.org/1999/xhtml","div")).innerHTML=e.innerHTML.replace(/\n/g,"").replace(/<br[ \/]*>/g,"\n"):n=e;var r,i,a,o,s,c=n.textContent,l=t?w(t,c,!0):C(c),u=p(n);if(u.length){var f=document.createElementNS("http://www.w3.org/1999/xhtml","div");f.innerHTML=l.value,l.value=function(e,t,n){var r=0,i="",a=[];function o(){return e.length&&t.length?e[0].offset!=t[0].offset?e[0].offset<t[0].offset?e:t:"start"==t[0].event?e:t:e.length?e:t}function s(e){i+="<"+d(e)+Array.prototype.map.call(e.attributes,function(e){return" "+e.nodeName+'="'+b(e.value)+'"'}).join("")+">"}function c(e){i+="</"+d(e)+">"}function l(e){("start"==e.event?s:c)(e.node)}for(;e.length||t.length;){var u=o();if(i+=b(n.substr(r,u[0].offset-r)),r=u[0].offset,u==e){for(a.reverse().forEach(c);l(u.splice(0,1)[0]),(u=o())==e&&u.length&&u[0].offset==r;);a.reverse().forEach(s)}else"start"==u[0].event?a.push(u[0].node):a.pop(),l(u.splice(0,1)[0])}return i+b(n.substr(r))}(u,p(f),c)}l.value=m(l.value),e.innerHTML=l.value,e.className=(r=e.className,i=t,a=l.language,o=i?g[i]:a,s=[r.trim()],r.match(/\bhljs\b/)||s.push("hljs"),-1===r.indexOf(o)&&s.push(o),s.join(" ").trim()),e.result={language:l.language,re:l.relevance},l.second_best&&(e.second_best={language:l.second_best.language,re:l.second_best.relevance})}}var A={classPrefix:"hljs-",tabReplace:null,useBR:!1,languages:void 0};function n(){if(!n.called){n.called=!0;var e=document.querySelectorAll("pre code");Array.prototype.forEach.call(e,t)}}var S={},g={};function T(e){return e=(e||"").toLowerCase(),S[e]||S[g[e]]}return i.highlight=w,i.highlightAuto=C,i.fixMarkup=m,i.highlightBlock=t,i.configure=function(e){A=y(A,e)},i.initHighlighting=n,i.initHighlightingOnLoad=function(){addEventListener("DOMContentLoaded",n,!1),addEventListener("load",n,!1)},i.registerLanguage=function(t,e){var n=S[t]=e(i);n.aliases&&n.aliases.forEach(function(e){g[e]=t})},i.listLanguages=function(){return Object.keys(S)},i.getLanguage=T,i.inherit=y,i.IDENT_RE="[a-zA-Z]\\w*",i.UNDERSCORE_IDENT_RE="[a-zA-Z_]\\w*",i.NUMBER_RE="\\b\\d+(\\.\\d+)?",i.C_NUMBER_RE="(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",i.BINARY_NUMBER_RE="\\b(0b[01]+)",i.RE_STARTERS_RE="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",i.BACKSLASH_ESCAPE={begin:"\\\\[\\s\\S]",relevance:0},i.APOS_STRING_MODE={className:"string",begin:"'",end:"'",illegal:"\\n",contains:[i.BACKSLASH_ESCAPE]},i.QUOTE_STRING_MODE={className:"string",begin:'"',end:'"',illegal:"\\n",contains:[i.BACKSLASH_ESCAPE]},i.PHRASAL_WORDS_MODE={begin:/\b(a|an|the|are|I|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|like)\b/},i.COMMENT=function(e,t,n){var r=i.inherit({className:"comment",begin:e,end:t,contains:[]},n||{});return r.contains.push(i.PHRASAL_WORDS_MODE),r.contains.push({className:"doctag",begin:"(?:TODO|FIXME|NOTE|BUG|XXX):",relevance:0}),r},i.C_LINE_COMMENT_MODE=i.COMMENT("//","$"),i.C_BLOCK_COMMENT_MODE=i.COMMENT("/\\*","\\*/"),i.HASH_COMMENT_MODE=i.COMMENT("#","$"),i.NUMBER_MODE={className:"number",begin:i.NUMBER_RE,relevance:0},i.C_NUMBER_MODE={className:"number",begin:i.C_NUMBER_RE,relevance:0},i.BINARY_NUMBER_MODE={className:"number",begin:i.BINARY_NUMBER_RE,relevance:0},i.CSS_NUMBER_MODE={className:"number",begin:i.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},i.REGEXP_MODE={className:"regexp",begin:/\//,end:/\/[gimuy]*/,illegal:/\n/,contains:[i.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[i.BACKSLASH_ESCAPE]}]},i.TITLE_MODE={className:"title",begin:i.IDENT_RE,relevance:0},i.UNDERSCORE_TITLE_MODE={className:"title",begin:i.UNDERSCORE_IDENT_RE,relevance:0},i.registerLanguage("1c",function(e){var t="[a-zA-Zа-яА-Я][a-zA-Z0-9_а-яА-Я]*",n={className:"dquote",begin:'""'},r={className:"string",begin:'"',end:'"|$',contains:[n]},i={className:"string",begin:"\\|",end:'"|$',contains:[n]};return{case_insensitive:!0,lexemes:t,keywords:{keyword:"возврат дата для если и или иначе иначеесли исключение конецесли конецпопытки конецпроцедуры конецфункции конеццикла константа не перейти перем перечисление по пока попытка прервать продолжить процедура строка тогда фс функция цикл число экспорт",built_in:"ansitooem oemtoansi ввестивидсубконто ввестидату ввестизначение ввестиперечисление ввестипериод ввестиплансчетов ввестистроку ввестичисло вопрос восстановитьзначение врег выбранныйплансчетов вызватьисключение датагод датамесяц датачисло добавитьмесяц завершитьработусистемы заголовоксистемы записьжурналарегистрации запуститьприложение зафиксироватьтранзакцию значениевстроку значениевстрокувнутр значениевфайл значениеизстроки значениеизстрокивнутр значениеизфайла имякомпьютера имяпользователя каталогвременныхфайлов каталогиб каталогпользователя каталогпрограммы кодсимв командасистемы конгода конецпериодаби конецрассчитанногопериодаби конецстандартногоинтервала конквартала конмесяца коннедели лев лог лог10 макс максимальноеколичествосубконто мин монопольныйрежим названиеинтерфейса названиенабораправ назначитьвид назначитьсчет найти найтипомеченныенаудаление найтиссылки началопериодаби началостандартногоинтервала начатьтранзакцию начгода начквартала начмесяца начнедели номерднягода номерднянедели номернеделигода нрег обработкаожидания окр описаниеошибки основнойжурналрасчетов основнойплансчетов основнойязык открытьформу открытьформумодально отменитьтранзакцию очиститьокносообщений периодстр полноеимяпользователя получитьвремята получитьдатута получитьдокументта получитьзначенияотбора получитьпозициюта получитьпустоезначение получитьта прав праводоступа предупреждение префиксавтонумерации пустаястрока пустоезначение рабочаядаттьпустоезначение рабочаядата разделительстраниц разделительстрок разм разобратьпозициюдокумента рассчитатьрегистрына рассчитатьрегистрыпо сигнал симв символтабуляции создатьобъект сокрл сокрлп сокрп сообщить состояние сохранитьзначение сред статусвозврата стрдлина стрзаменить стрколичествострок стрполучитьстроку  стрчисловхождений сформироватьпозициюдокумента счетпокоду текущаядата текущеевремя типзначения типзначениястр удалитьобъекты установитьтана установитьтапо фиксшаблон формат цел шаблон"},contains:[e.C_LINE_COMMENT_MODE,e.NUMBER_MODE,r,i,{className:"function",begin:"(процедура|функция)",end:"$",lexemes:t,keywords:"процедура функция",contains:[e.inherit(e.TITLE_MODE,{begin:t}),{className:"tail",endsWithParent:!0,contains:[{className:"params",begin:"\\(",end:"\\)",lexemes:t,keywords:"знач",contains:[r,i]},{className:"export",begin:"экспорт",endsWithParent:!0,lexemes:t,keywords:"экспорт",contains:[e.C_LINE_COMMENT_MODE]}]},e.C_LINE_COMMENT_MODE]},{className:"preprocessor",begin:"#",end:"$"},{className:"date",begin:"'\\d{2}\\.\\d{2}\\.(\\d{2}|\\d{4})'"}]}}),i.registerLanguage("accesslog",function(e){return{contains:[{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+\\b",relevance:0},{className:"string",begin:'"(GET|POST|HEAD|PUT|DELETE|CONNECT|OPTIONS|PATCH|TRACE)',end:'"',keywords:"GET POST HEAD PUT DELETE CONNECT OPTIONS PATCH TRACE",illegal:"\\n",relevance:10},{className:"string",begin:/\[/,end:/\]/,illegal:"\\n"},{className:"string",begin:'"',end:'"',illegal:"\\n"}]}}),i.registerLanguage("actionscript",function(e){var t={className:"rest_arg",begin:"[.]{3}",end:"[a-zA-Z_$][a-zA-Z0-9_$]*",relevance:10};return{aliases:["as"],keywords:{keyword:"as break case catch class const continue default delete do dynamic each else extends final finally for function get if implements import in include instanceof interface internal is namespace native new override package private protected public return set static super switch this throw try typeof use var void while with",literal:"true false null undefined"},contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"package",beginKeywords:"package",end:"{",contains:[e.TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.TITLE_MODE]},{className:"preprocessor",beginKeywords:"import include",end:";"},{className:"function",beginKeywords:"function",end:"[{;]",excludeEnd:!0,illegal:"\\S",contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t]},{className:"type",begin:":",end:"([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",relevance:10}]}],illegal:/#/}}),i.registerLanguage("apache",function(e){var t={className:"number",begin:"[\\$%]\\d+"};return{aliases:["apacheconf"],case_insensitive:!0,contains:[e.HASH_COMMENT_MODE,{className:"tag",begin:"</?",end:">"},{className:"keyword",begin:/\w+/,relevance:0,keywords:{common:"order deny allow setenv rewriterule rewriteengine rewritecond documentroot sethandler errordocument loadmodule options header listen serverroot servername"},starts:{end:/$/,relevance:0,keywords:{literal:"on off all"},contains:[{className:"sqbracket",begin:"\\s\\[",end:"\\]$"},{className:"cbracket",begin:"[\\$%]\\{",end:"\\}",contains:["self",t]},t,e.QUOTE_STRING_MODE]}}],illegal:/\S/}}),i.registerLanguage("applescript",function(e){var t=e.inherit(e.QUOTE_STRING_MODE,{illegal:""}),n={className:"params",begin:"\\(",end:"\\)",contains:["self",e.C_NUMBER_MODE,t]},r=e.COMMENT("--","$"),i=[r,e.COMMENT("\\(\\*","\\*\\)",{contains:["self",r]}),e.HASH_COMMENT_MODE];return{aliases:["osascript"],keywords:{keyword:"about above after against and around as at back before beginning behind below beneath beside between but by considering contain contains continue copy div does eighth else end equal equals error every exit fifth first for fourth from front get given global if ignoring in into is it its last local me middle mod my ninth not of on onto or over prop property put ref reference repeat returning script second set seventh since sixth some tell tenth that the|0 then third through thru timeout times to transaction try until where while whose with without",constant:"AppleScript false linefeed return pi quote result space tab true",type:"alias application boolean class constant date file integer list number real record string text",command:"activate beep count delay launch log offset read round run say summarize write",property:"character characters contents day frontmost id item length month name paragraph paragraphs rest reverse running time version weekday word words year"},contains:[t,e.C_NUMBER_MODE,{className:"type",begin:"\\bPOSIX file\\b"},{className:"command",begin:"\\b(clipboard info|the clipboard|info for|list (disks|folder)|mount volume|path to|(close|open for) access|(get|set) eof|current date|do shell script|get volume settings|random number|set volume|system attribute|system info|time to GMT|(load|run|store) script|scripting components|ASCII (character|number)|localized string|choose (application|color|file|file name|folder|from list|remote application|URL)|display (alert|dialog))\\b|^\\s*return\\b"},{className:"constant",begin:"\\b(text item delimiters|current application|missing value)\\b"},{className:"keyword",begin:"\\b(apart from|aside from|instead of|out of|greater than|isn't|(doesn't|does not) (equal|come before|come after|contain)|(greater|less) than( or equal)?|(starts?|ends|begins?) with|contained by|comes (before|after)|a (ref|reference))\\b"},{className:"property",begin:"\\b(POSIX path|(date|time) string|quoted form)\\b"},{className:"function_start",beginKeywords:"on",illegal:"[${=;\\n]",contains:[e.UNDERSCORE_TITLE_MODE,n]}].concat(i),illegal:"//|->|=>|\\[\\["}}),i.registerLanguage("armasm",function(e){return{case_insensitive:!0,aliases:["arm"],lexemes:"\\.?"+e.IDENT_RE,keywords:{literal:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 pc lr sp ip sl sb fp a1 a2 a3 a4 v1 v2 v3 v4 v5 v6 v7 v8 f0 f1 f2 f3 f4 f5 f6 f7 p0 p1 p2 p3 p4 p5 p6 p7 p8 p9 p10 p11 p12 p13 p14 p15 c0 c1 c2 c3 c4 c5 c6 c7 c8 c9 c10 c11 c12 c13 c14 c15 q0 q1 q2 q3 q4 q5 q6 q7 q8 q9 q10 q11 q12 q13 q14 q15 cpsr_c cpsr_x cpsr_s cpsr_f cpsr_cx cpsr_cxs cpsr_xs cpsr_xsf cpsr_sf cpsr_cxsf spsr_c spsr_x spsr_s spsr_f spsr_cx spsr_cxs spsr_xs spsr_xsf spsr_sf spsr_cxsf s0 s1 s2 s3 s4 s5 s6 s7 s8 s9 s10 s11 s12 s13 s14 s15 s16 s17 s18 s19 s20 s21 s22 s23 s24 s25 s26 s27 s28 s29 s30 s31 d0 d1 d2 d3 d4 d5 d6 d7 d8 d9 d10 d11 d12 d13 d14 d15 d16 d17 d18 d19 d20 d21 d22 d23 d24 d25 d26 d27 d28 d29 d30 d31 ",preprocessor:".2byte .4byte .align .ascii .asciz .balign .byte .code .data .else .end .endif .endm .endr .equ .err .exitm .extern .global .hword .if .ifdef .ifndef .include .irp .long .macro .rept .req .section .set .skip .space .text .word .arm .thumb .code16 .code32 .force_thumb .thumb_func .ltorg ALIAS ALIGN ARM AREA ASSERT ATTR CN CODE CODE16 CODE32 COMMON CP DATA DCB DCD DCDU DCDO DCFD DCFDU DCI DCQ DCQU DCW DCWU DN ELIF ELSE END ENDFUNC ENDIF ENDP ENTRY EQU EXPORT EXPORTAS EXTERN FIELD FILL FUNCTION GBLA GBLL GBLS GET GLOBAL IF IMPORT INCBIN INCLUDE INFO KEEP LCLA LCLL LCLS LTORG MACRO MAP MEND MEXIT NOFP OPT PRESERVE8 PROC QN READONLY RELOC REQUIRE REQUIRE8 RLIST FN ROUT SETA SETL SETS SN SPACE SUBT THUMB THUMBX TTL WHILE WEND ",built_in:"{PC} {VAR} {TRUE} {FALSE} {OPT} {CONFIG} {ENDIAN} {CODESIZE} {CPU} {FPU} {ARCHITECTURE} {PCSTOREOFFSET} {ARMASM_VERSION} {INTER} {ROPI} {RWPI} {SWST} {NOSWST} . @ "},contains:[{className:"keyword",begin:"\\b(adc|(qd?|sh?|u[qh]?)?add(8|16)?|usada?8|(q|sh?|u[qh]?)?(as|sa)x|and|adrl?|sbc|rs[bc]|asr|b[lx]?|blx|bxj|cbn?z|tb[bh]|bic|bfc|bfi|[su]bfx|bkpt|cdp2?|clz|clrex|cmp|cmn|cpsi[ed]|cps|setend|dbg|dmb|dsb|eor|isb|it[te]{0,3}|lsl|lsr|ror|rrx|ldm(([id][ab])|f[ds])?|ldr((s|ex)?[bhd])?|movt?|mvn|mra|mar|mul|[us]mull|smul[bwt][bt]|smu[as]d|smmul|smmla|mla|umlaal|smlal?([wbt][bt]|d)|mls|smlsl?[ds]|smc|svc|sev|mia([bt]{2}|ph)?|mrr?c2?|mcrr2?|mrs|msr|orr|orn|pkh(tb|bt)|rbit|rev(16|sh)?|sel|[su]sat(16)?|nop|pop|push|rfe([id][ab])?|stm([id][ab])?|str(ex)?[bhd]?|(qd?)?sub|(sh?|q|u[qh]?)?sub(8|16)|[su]xt(a?h|a?b(16)?)|srs([id][ab])?|swpb?|swi|smi|tst|teq|wfe|wfi|yield)(eq|ne|cs|cc|mi|pl|vs|vc|hi|ls|ge|lt|gt|le|al|hs|lo)?[sptrx]?",end:"\\s"},e.COMMENT("[;@]","$",{relevance:0}),e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",relevance:0},{className:"title",begin:"\\|",end:"\\|",illegal:"\\n",relevance:0},{className:"number",variants:[{begin:"[#$=]?0x[0-9a-f]+"},{begin:"[#$=]?0b[01]+"},{begin:"[#$=]\\d+"},{begin:"\\b\\d+"}],relevance:0},{className:"label",variants:[{begin:"^[a-z_\\.\\$][a-z0-9_\\.\\$]+"},{begin:"^\\s*[a-z_\\.\\$][a-z0-9_\\.\\$]+:"},{begin:"[=#]\\w+"}],relevance:0}]}}),i.registerLanguage("xml",function(e){var t={begin:/<\?(php)?(?!\w)/,end:/\?>/,subLanguage:"php"},n={endsWithParent:!0,illegal:/</,relevance:0,contains:[t,{className:"attribute",begin:"[A-Za-z0-9\\._:-]+",relevance:0},{begin:"=",relevance:0,contains:[{className:"value",contains:[t],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/},{begin:/[^\s\/>]+/}]}]}]};return{aliases:["html","xhtml","rss","atom","xsl","plist"],case_insensitive:!0,contains:[{className:"doctype",begin:"<!DOCTYPE",end:">",relevance:10,contains:[{begin:"\\[",end:"\\]"}]},e.COMMENT("\x3c!--","--\x3e",{relevance:10}),{className:"cdata",begin:"<\\!\\[CDATA\\[",end:"\\]\\]>",relevance:10},{className:"tag",begin:"<style(?=\\s|>|$)",end:">",keywords:{title:"style"},contains:[n],starts:{end:"</style>",returnEnd:!0,subLanguage:"css"}},{className:"tag",begin:"<script(?=\\s|>|$)",end:">",keywords:{title:"script"},contains:[n],starts:{end:"<\/script>",returnEnd:!0,subLanguage:["actionscript","javascript","handlebars"]}},t,{className:"pi",begin:/<\?\w+/,end:/\?>/,relevance:10},{className:"tag",begin:"</?",end:"/?>",contains:[{className:"title",begin:/[^ \/><\n\t]+/,relevance:0},n]}]}}),i.registerLanguage("asciidoc",function(e){return{aliases:["adoc"],contains:[e.COMMENT("^/{4,}\\n","\\n/{4,}$",{relevance:10}),e.COMMENT("^//","$",{relevance:0}),{className:"title",begin:"^\\.\\w.*$"},{begin:"^[=\\*]{4,}\\n",end:"\\n^[=\\*]{4,}$",relevance:10},{className:"header",begin:"^(={1,5}) .+?( \\1)?$",relevance:10},{className:"header",begin:"^[^\\[\\]\\n]+?\\n[=\\-~\\^\\+]{2,}$",relevance:10},{className:"attribute",begin:"^:.+?:",end:"\\s",excludeEnd:!0,relevance:10},{className:"attribute",begin:"^\\[.+?\\]$",relevance:0},{className:"blockquote",begin:"^_{4,}\\n",end:"\\n_{4,}$",relevance:10},{className:"code",begin:"^[\\-\\.]{4,}\\n",end:"\\n[\\-\\.]{4,}$",relevance:10},{begin:"^\\+{4,}\\n",end:"\\n\\+{4,}$",contains:[{begin:"<",end:">",subLanguage:"xml",relevance:0}],relevance:10},{className:"bullet",begin:"^(\\*+|\\-+|\\.+|[^\\n]+?::)\\s+"},{className:"label",begin:"^(NOTE|TIP|IMPORTANT|WARNING|CAUTION):\\s+",relevance:10},{className:"strong",begin:"\\B\\*(?![\\*\\s])",end:"(\\n{2}|\\*)",contains:[{begin:"\\\\*\\w",relevance:0}]},{className:"emphasis",begin:"\\B'(?!['\\s])",end:"(\\n{2}|')",contains:[{begin:"\\\\'\\w",relevance:0}],relevance:0},{className:"emphasis",begin:"_(?![_\\s])",end:"(\\n{2}|_)",relevance:0},{className:"smartquote",variants:[{begin:"``.+?''"},{begin:"`.+?'"}]},{className:"code",begin:"(`.+?`|\\+.+?\\+)",relevance:0},{className:"code",begin:"^[ \\t]",end:"$",relevance:0},{className:"horizontal_rule",begin:"^'{3,}[ \\t]*$",relevance:10},{begin:"(link:)?(http|https|ftp|file|irc|image:?):\\S+\\[.*?\\]",returnBegin:!0,contains:[{begin:"(link|image:?):",relevance:0},{className:"link_url",begin:"\\w",end:"[^\\[]+",relevance:0},{className:"link_label",begin:"\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0,relevance:0}],relevance:10}]}}),i.registerLanguage("aspectj",function(e){var t="false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else extends implements break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws privileged aspectOf adviceexecution proceed cflowbelow cflow initialization preinitialization staticinitialization withincode target within execution getWithinTypeName handler thisJoinPoint thisJoinPointStaticPart thisEnclosingJoinPointStaticPart declare parents warning error soft precedence thisAspectInstance",n="get set args call";return{keywords:t,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"aspect",beginKeywords:"aspect",end:/[{;=]/,excludeEnd:!0,illegal:/[:;"\[\]]/,contains:[{beginKeywords:"extends implements pertypewithin perthis pertarget percflowbelow percflow issingleton"},e.UNDERSCORE_TITLE_MODE,{begin:/\([^\)]*/,end:/[)]+/,keywords:t+" "+n,excludeEnd:!1}]},{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,relevance:0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"pointcut after before around throwing returning",end:/[)]/,excludeEnd:!1,illegal:/["\[\]]/,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[e.UNDERSCORE_TITLE_MODE]}]},{begin:/[:]/,returnBegin:!0,end:/[{;]/,relevance:0,excludeEnd:!1,keywords:t,illegal:/["\[\]]/,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",keywords:t+" "+n},e.QUOTE_STRING_MODE]},{beginKeywords:"new throw",relevance:0},{className:"function",begin:/\w+ +\w+(\.)?\w+\s*\([^\)]*\)\s*((throws)[\w\s,]+)?[\{;]/,returnBegin:!0,end:/[{;=]/,keywords:t,excludeEnd:!0,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,relevance:0,keywords:t,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"}]}}),i.registerLanguage("autohotkey",function(e){var t={className:"escape",begin:"`[\\s\\S]"},n=e.COMMENT(";","$",{relevance:0});return{case_insensitive:!0,keywords:{keyword:"Break Continue Else Gosub If Loop Return While",literal:"A true false NOT AND OR"},contains:[{className:"built_in",begin:"A_[a-zA-Z0-9]+"},{className:"built_in",beginKeywords:"ComSpec Clipboard ClipboardAll ErrorLevel"}].concat([t,e.inherit(e.QUOTE_STRING_MODE,{contains:[t]}),n,{className:"number",begin:e.NUMBER_RE,relevance:0},{className:"var_expand",begin:"%",end:"%",illegal:"\\n",contains:[t]},{className:"label",contains:[t],variants:[{begin:'^[^\\n";]+::(?!=)'},{begin:'^[^\\n";]+:(?!=)',relevance:0}]},{begin:",\\s*,",relevance:10}])}}),i.registerLanguage("autoit",function(e){var t={variants:[e.COMMENT(";","$",{relevance:0}),e.COMMENT("#cs","#ce"),e.COMMENT("#comments-start","#comments-end")]},n={className:"variable",begin:"\\$[A-z0-9_]+"},r={className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},i={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{case_insensitive:!0,illegal:/\/\*/,keywords:{keyword:"ByRef Case Const ContinueCase ContinueLoop Default Dim Do Else ElseIf EndFunc EndIf EndSelect EndSwitch EndWith Enum Exit ExitLoop For Func Global If In Local Next ReDim Return Select Static Step Switch Then To Until Volatile WEnd While With",built_in:"Abs ACos AdlibRegister AdlibUnRegister Asc AscW ASin Assign ATan AutoItSetOption AutoItWinGetTitle AutoItWinSetTitle Beep Binary BinaryLen BinaryMid BinaryToString BitAND BitNOT BitOR BitRotate BitShift BitXOR BlockInput Break Call CDTray Ceiling Chr ChrW ClipGet ClipPut ConsoleRead ConsoleWrite ConsoleWriteError ControlClick ControlCommand ControlDisable ControlEnable ControlFocus ControlGetFocus ControlGetHandle ControlGetPos ControlGetText ControlHide ControlListView ControlMove ControlSend ControlSetText ControlShow ControlTreeView Cos Dec DirCopy DirCreate DirGetSize DirMove DirRemove DllCall DllCallAddress DllCallbackFree DllCallbackGetPtr DllCallbackRegister DllClose DllOpen DllStructCreate DllStructGetData DllStructGetPtr DllStructGetSize DllStructSetData DriveGetDrive DriveGetFileSystem DriveGetLabel DriveGetSerial DriveGetType DriveMapAdd DriveMapDel DriveMapGet DriveSetLabel DriveSpaceFree DriveSpaceTotal DriveStatus EnvGet EnvSet EnvUpdate Eval Execute Exp FileChangeDir FileClose FileCopy FileCreateNTFSLink FileCreateShortcut FileDelete FileExists FileFindFirstFile FileFindNextFile FileFlush FileGetAttrib FileGetEncoding FileGetLongName FileGetPos FileGetShortcut FileGetShortName FileGetSize FileGetTime FileGetVersion FileInstall FileMove FileOpen FileOpenDialog FileRead FileReadLine FileReadToArray FileRecycle FileRecycleEmpty FileSaveDialog FileSelectFolder FileSetAttrib FileSetEnd FileSetPos FileSetTime FileWrite FileWriteLine Floor FtpSetProxy FuncName GUICreate GUICtrlCreateAvi GUICtrlCreateButton GUICtrlCreateCheckbox GUICtrlCreateCombo GUICtrlCreateContextMenu GUICtrlCreateDate GUICtrlCreateDummy GUICtrlCreateEdit GUICtrlCreateGraphic GUICtrlCreateGroup GUICtrlCreateIcon GUICtrlCreateInput GUICtrlCreateLabel GUICtrlCreateList GUICtrlCreateListView GUICtrlCreateListViewItem GUICtrlCreateMenu GUICtrlCreateMenuItem GUICtrlCreateMonthCal GUICtrlCreateObj GUICtrlCreatePic GUICtrlCreateProgress GUICtrlCreateRadio GUICtrlCreateSlider GUICtrlCreateTab GUICtrlCreateTabItem GUICtrlCreateTreeView GUICtrlCreateTreeViewItem GUICtrlCreateUpdown GUICtrlDelete GUICtrlGetHandle GUICtrlGetState GUICtrlRead GUICtrlRecvMsg GUICtrlRegisterListViewSort GUICtrlSendMsg GUICtrlSendToDummy GUICtrlSetBkColor GUICtrlSetColor GUICtrlSetCursor GUICtrlSetData GUICtrlSetDefBkColor GUICtrlSetDefColor GUICtrlSetFont GUICtrlSetGraphic GUICtrlSetImage GUICtrlSetLimit GUICtrlSetOnEvent GUICtrlSetPos GUICtrlSetResizing GUICtrlSetState GUICtrlSetStyle GUICtrlSetTip GUIDelete GUIGetCursorInfo GUIGetMsg GUIGetStyle GUIRegisterMsg GUISetAccelerators GUISetBkColor GUISetCoord GUISetCursor GUISetFont GUISetHelp GUISetIcon GUISetOnEvent GUISetState GUISetStyle GUIStartGroup GUISwitch Hex HotKeySet HttpSetProxy HttpSetUserAgent HWnd InetClose InetGet InetGetInfo InetGetSize InetRead IniDelete IniRead IniReadSection IniReadSectionNames IniRenameSection IniWrite IniWriteSection InputBox Int IsAdmin IsArray IsBinary IsBool IsDeclared IsDllStruct IsFloat IsFunc IsHWnd IsInt IsKeyword IsNumber IsObj IsPtr IsString Log MemGetStats Mod MouseClick MouseClickDrag MouseDown MouseGetCursor MouseGetPos MouseMove MouseUp MouseWheel MsgBox Number ObjCreate ObjCreateInterface ObjEvent ObjGet ObjName OnAutoItExitRegister OnAutoItExitUnRegister Opt Ping PixelChecksum PixelGetColor PixelSearch ProcessClose ProcessExists ProcessGetStats ProcessList ProcessSetPriority ProcessWait ProcessWaitClose ProgressOff ProgressOn ProgressSet Ptr Random RegDelete RegEnumKey RegEnumVal RegRead RegWrite Round Run RunAs RunAsWait RunWait Send SendKeepActive SetError SetExtended ShellExecute ShellExecuteWait Shutdown Sin Sleep SoundPlay SoundSetWaveVolume SplashImageOn SplashOff SplashTextOn Sqrt SRandom StatusbarGetText StderrRead StdinWrite StdioClose StdoutRead String StringAddCR StringCompare StringFormat StringFromASCIIArray StringInStr StringIsAlNum StringIsAlpha StringIsASCII StringIsDigit StringIsFloat StringIsInt StringIsLower StringIsSpace StringIsUpper StringIsXDigit StringLeft StringLen StringLower StringMid StringRegExp StringRegExpReplace StringReplace StringReverse StringRight StringSplit StringStripCR StringStripWS StringToASCIIArray StringToBinary StringTrimLeft StringTrimRight StringUpper Tan TCPAccept TCPCloseSocket TCPConnect TCPListen TCPNameToIP TCPRecv TCPSend TCPShutdown TCPStartup TimerDiff TimerInit ToolTip TrayCreateItem TrayCreateMenu TrayGetMsg TrayItemDelete TrayItemGetHandle TrayItemGetState TrayItemGetText TrayItemSetOnEvent TrayItemSetState TrayItemSetText TraySetClick TraySetIcon TraySetOnEvent TraySetPauseIcon TraySetState TraySetToolTip TrayTip UBound UDPBind UDPCloseSocket UDPOpen UDPRecv UDPSend UDPShutdown UDPStartup VarGetType WinActivate WinActive WinClose WinExists WinFlash WinGetCaretPos WinGetClassList WinGetClientSize WinGetHandle WinGetPos WinGetProcess WinGetState WinGetText WinGetTitle WinKill WinList WinMenuSelectItem WinMinimizeAll WinMinimizeAllUndo WinMove WinSetOnTop WinSetState WinSetTitle WinSetTrans WinWait WinWaitActive WinWaitClose WinWaitNotActive Array1DToHistogram ArrayAdd ArrayBinarySearch ArrayColDelete ArrayColInsert ArrayCombinations ArrayConcatenate ArrayDelete ArrayDisplay ArrayExtract ArrayFindAll ArrayInsert ArrayMax ArrayMaxIndex ArrayMin ArrayMinIndex ArrayPermute ArrayPop ArrayPush ArrayReverse ArraySearch ArrayShuffle ArraySort ArraySwap ArrayToClip ArrayToString ArrayTranspose ArrayTrim ArrayUnique Assert ChooseColor ChooseFont ClipBoard_ChangeChain ClipBoard_Close ClipBoard_CountFormats ClipBoard_Empty ClipBoard_EnumFormats ClipBoard_FormatStr ClipBoard_GetData ClipBoard_GetDataEx ClipBoard_GetFormatName ClipBoard_GetOpenWindow ClipBoard_GetOwner ClipBoard_GetPriorityFormat ClipBoard_GetSequenceNumber ClipBoard_GetViewer ClipBoard_IsFormatAvailable ClipBoard_Open ClipBoard_RegisterFormat ClipBoard_SetData ClipBoard_SetDataEx ClipBoard_SetViewer ClipPutFile ColorConvertHSLtoRGB ColorConvertRGBtoHSL ColorGetBlue ColorGetCOLORREF ColorGetGreen ColorGetRed ColorGetRGB ColorSetCOLORREF ColorSetRGB Crypt_DecryptData Crypt_DecryptFile Crypt_DeriveKey Crypt_DestroyKey Crypt_EncryptData Crypt_EncryptFile Crypt_GenRandom Crypt_HashData Crypt_HashFile Crypt_Shutdown Crypt_Startup DateAdd DateDayOfWeek DateDaysInMonth DateDiff DateIsLeapYear DateIsValid DateTimeFormat DateTimeSplit DateToDayOfWeek DateToDayOfWeekISO DateToDayValue DateToMonth Date_Time_CompareFileTime Date_Time_DOSDateTimeToArray Date_Time_DOSDateTimeToFileTime Date_Time_DOSDateTimeToStr Date_Time_DOSDateToArray Date_Time_DOSDateToStr Date_Time_DOSTimeToArray Date_Time_DOSTimeToStr Date_Time_EncodeFileTime Date_Time_EncodeSystemTime Date_Time_FileTimeToArray Date_Time_FileTimeToDOSDateTime Date_Time_FileTimeToLocalFileTime Date_Time_FileTimeToStr Date_Time_FileTimeToSystemTime Date_Time_GetFileTime Date_Time_GetLocalTime Date_Time_GetSystemTime Date_Time_GetSystemTimeAdjustment Date_Time_GetSystemTimeAsFileTime Date_Time_GetSystemTimes Date_Time_GetTickCount Date_Time_GetTimeZoneInformation Date_Time_LocalFileTimeToFileTime Date_Time_SetFileTime Date_Time_SetLocalTime Date_Time_SetSystemTime Date_Time_SetSystemTimeAdjustment Date_Time_SetTimeZoneInformation Date_Time_SystemTimeToArray Date_Time_SystemTimeToDateStr Date_Time_SystemTimeToDateTimeStr Date_Time_SystemTimeToFileTime Date_Time_SystemTimeToTimeStr Date_Time_SystemTimeToTzSpecificLocalTime Date_Time_TzSpecificLocalTimeToSystemTime DayValueToDate DebugBugReportEnv DebugCOMError DebugOut DebugReport DebugReportEx DebugReportVar DebugSetup Degree EventLog__Backup EventLog__Clear EventLog__Close EventLog__Count EventLog__DeregisterSource EventLog__Full EventLog__Notify EventLog__Oldest EventLog__Open EventLog__OpenBackup EventLog__Read EventLog__RegisterSource EventLog__Report Excel_BookAttach Excel_BookClose Excel_BookList Excel_BookNew Excel_BookOpen Excel_BookOpenText Excel_BookSave Excel_BookSaveAs Excel_Close Excel_ColumnToLetter Excel_ColumnToNumber Excel_ConvertFormula Excel_Export Excel_FilterGet Excel_FilterSet Excel_Open Excel_PictureAdd Excel_Print Excel_RangeCopyPaste Excel_RangeDelete Excel_RangeFind Excel_RangeInsert Excel_RangeLinkAddRemove Excel_RangeRead Excel_RangeReplace Excel_RangeSort Excel_RangeValidate Excel_RangeWrite Excel_SheetAdd Excel_SheetCopyMove Excel_SheetDelete Excel_SheetList FileCountLines FileCreate FileListToArray FileListToArrayRec FilePrint FileReadToArray FileWriteFromArray FileWriteLog FileWriteToLine FTP_Close FTP_Command FTP_Connect FTP_DecodeInternetStatus FTP_DirCreate FTP_DirDelete FTP_DirGetCurrent FTP_DirPutContents FTP_DirSetCurrent FTP_FileClose FTP_FileDelete FTP_FileGet FTP_FileGetSize FTP_FileOpen FTP_FilePut FTP_FileRead FTP_FileRename FTP_FileTimeLoHiToStr FTP_FindFileClose FTP_FindFileFirst FTP_FindFileNext FTP_GetLastResponseInfo FTP_ListToArray FTP_ListToArray2D FTP_ListToArrayEx FTP_Open FTP_ProgressDownload FTP_ProgressUpload FTP_SetStatusCallback GDIPlus_ArrowCapCreate GDIPlus_ArrowCapDispose GDIPlus_ArrowCapGetFillState GDIPlus_ArrowCapGetHeight GDIPlus_ArrowCapGetMiddleInset GDIPlus_ArrowCapGetWidth GDIPlus_ArrowCapSetFillState GDIPlus_ArrowCapSetHeight GDIPlus_ArrowCapSetMiddleInset GDIPlus_ArrowCapSetWidth GDIPlus_BitmapApplyEffect GDIPlus_BitmapApplyEffectEx GDIPlus_BitmapCloneArea GDIPlus_BitmapConvertFormat GDIPlus_BitmapCreateApplyEffect GDIPlus_BitmapCreateApplyEffectEx GDIPlus_BitmapCreateDIBFromBitmap GDIPlus_BitmapCreateFromFile GDIPlus_BitmapCreateFromGraphics GDIPlus_BitmapCreateFromHBITMAP GDIPlus_BitmapCreateFromHICON GDIPlus_BitmapCreateFromHICON32 GDIPlus_BitmapCreateFromMemory GDIPlus_BitmapCreateFromResource GDIPlus_BitmapCreateFromScan0 GDIPlus_BitmapCreateFromStream GDIPlus_BitmapCreateHBITMAPFromBitmap GDIPlus_BitmapDispose GDIPlus_BitmapGetHistogram GDIPlus_BitmapGetHistogramEx GDIPlus_BitmapGetHistogramSize GDIPlus_BitmapGetPixel GDIPlus_BitmapLockBits GDIPlus_BitmapSetPixel GDIPlus_BitmapUnlockBits GDIPlus_BrushClone GDIPlus_BrushCreateSolid GDIPlus_BrushDispose GDIPlus_BrushGetSolidColor GDIPlus_BrushGetType GDIPlus_BrushSetSolidColor GDIPlus_ColorMatrixCreate GDIPlus_ColorMatrixCreateGrayScale GDIPlus_ColorMatrixCreateNegative GDIPlus_ColorMatrixCreateSaturation GDIPlus_ColorMatrixCreateScale GDIPlus_ColorMatrixCreateTranslate GDIPlus_CustomLineCapClone GDIPlus_CustomLineCapCreate GDIPlus_CustomLineCapDispose GDIPlus_CustomLineCapGetStrokeCaps GDIPlus_CustomLineCapSetStrokeCaps GDIPlus_Decoders GDIPlus_DecodersGetCount GDIPlus_DecodersGetSize GDIPlus_DrawImageFX GDIPlus_DrawImageFXEx GDIPlus_DrawImagePoints GDIPlus_EffectCreate GDIPlus_EffectCreateBlur GDIPlus_EffectCreateBrightnessContrast GDIPlus_EffectCreateColorBalance GDIPlus_EffectCreateColorCurve GDIPlus_EffectCreateColorLUT GDIPlus_EffectCreateColorMatrix GDIPlus_EffectCreateHueSaturationLightness GDIPlus_EffectCreateLevels GDIPlus_EffectCreateRedEyeCorrection GDIPlus_EffectCreateSharpen GDIPlus_EffectCreateTint GDIPlus_EffectDispose GDIPlus_EffectGetParameters GDIPlus_EffectSetParameters GDIPlus_Encoders GDIPlus_EncodersGetCLSID GDIPlus_EncodersGetCount GDIPlus_EncodersGetParamList GDIPlus_EncodersGetParamListSize GDIPlus_EncodersGetSize GDIPlus_FontCreate GDIPlus_FontDispose GDIPlus_FontFamilyCreate GDIPlus_FontFamilyCreateFromCollection GDIPlus_FontFamilyDispose GDIPlus_FontFamilyGetCellAscent GDIPlus_FontFamilyGetCellDescent GDIPlus_FontFamilyGetEmHeight GDIPlus_FontFamilyGetLineSpacing GDIPlus_FontGetHeight GDIPlus_FontPrivateAddFont GDIPlus_FontPrivateAddMemoryFont GDIPlus_FontPrivateCollectionDispose GDIPlus_FontPrivateCreateCollection GDIPlus_GraphicsClear GDIPlus_GraphicsCreateFromHDC GDIPlus_GraphicsCreateFromHWND GDIPlus_GraphicsDispose GDIPlus_GraphicsDrawArc GDIPlus_GraphicsDrawBezier GDIPlus_GraphicsDrawClosedCurve GDIPlus_GraphicsDrawClosedCurve2 GDIPlus_GraphicsDrawCurve GDIPlus_GraphicsDrawCurve2 GDIPlus_GraphicsDrawEllipse GDIPlus_GraphicsDrawImage GDIPlus_GraphicsDrawImagePointsRect GDIPlus_GraphicsDrawImageRect GDIPlus_GraphicsDrawImageRectRect GDIPlus_GraphicsDrawLine GDIPlus_GraphicsDrawPath GDIPlus_GraphicsDrawPie GDIPlus_GraphicsDrawPolygon GDIPlus_GraphicsDrawRect GDIPlus_GraphicsDrawString GDIPlus_GraphicsDrawStringEx GDIPlus_GraphicsFillClosedCurve GDIPlus_GraphicsFillClosedCurve2 GDIPlus_GraphicsFillEllipse GDIPlus_GraphicsFillPath GDIPlus_GraphicsFillPie GDIPlus_GraphicsFillPolygon GDIPlus_GraphicsFillRect GDIPlus_GraphicsFillRegion GDIPlus_GraphicsGetCompositingMode GDIPlus_GraphicsGetCompositingQuality GDIPlus_GraphicsGetDC GDIPlus_GraphicsGetInterpolationMode GDIPlus_GraphicsGetSmoothingMode GDIPlus_GraphicsGetTransform GDIPlus_GraphicsMeasureCharacterRanges GDIPlus_GraphicsMeasureString GDIPlus_GraphicsReleaseDC GDIPlus_GraphicsResetClip GDIPlus_GraphicsResetTransform GDIPlus_GraphicsRestore GDIPlus_GraphicsRotateTransform GDIPlus_GraphicsSave GDIPlus_GraphicsScaleTransform GDIPlus_GraphicsSetClipPath GDIPlus_GraphicsSetClipRect GDIPlus_GraphicsSetClipRegion GDIPlus_GraphicsSetCompositingMode GDIPlus_GraphicsSetCompositingQuality GDIPlus_GraphicsSetInterpolationMode GDIPlus_GraphicsSetPixelOffsetMode GDIPlus_GraphicsSetSmoothingMode GDIPlus_GraphicsSetTextRenderingHint GDIPlus_GraphicsSetTransform GDIPlus_GraphicsTransformPoints GDIPlus_GraphicsTranslateTransform GDIPlus_HatchBrushCreate GDIPlus_HICONCreateFromBitmap GDIPlus_ImageAttributesCreate GDIPlus_ImageAttributesDispose GDIPlus_ImageAttributesSetColorKeys GDIPlus_ImageAttributesSetColorMatrix GDIPlus_ImageDispose GDIPlus_ImageGetDimension GDIPlus_ImageGetFlags GDIPlus_ImageGetGraphicsContext GDIPlus_ImageGetHeight GDIPlus_ImageGetHorizontalResolution GDIPlus_ImageGetPixelFormat GDIPlus_ImageGetRawFormat GDIPlus_ImageGetThumbnail GDIPlus_ImageGetType GDIPlus_ImageGetVerticalResolution GDIPlus_ImageGetWidth GDIPlus_ImageLoadFromFile GDIPlus_ImageLoadFromStream GDIPlus_ImageResize GDIPlus_ImageRotateFlip GDIPlus_ImageSaveToFile GDIPlus_ImageSaveToFileEx GDIPlus_ImageSaveToStream GDIPlus_ImageScale GDIPlus_LineBrushCreate GDIPlus_LineBrushCreateFromRect GDIPlus_LineBrushCreateFromRectWithAngle GDIPlus_LineBrushGetColors GDIPlus_LineBrushGetRect GDIPlus_LineBrushMultiplyTransform GDIPlus_LineBrushResetTransform GDIPlus_LineBrushSetBlend GDIPlus_LineBrushSetColors GDIPlus_LineBrushSetGammaCorrection GDIPlus_LineBrushSetLinearBlend GDIPlus_LineBrushSetPresetBlend GDIPlus_LineBrushSetSigmaBlend GDIPlus_LineBrushSetTransform GDIPlus_MatrixClone GDIPlus_MatrixCreate GDIPlus_MatrixDispose GDIPlus_MatrixGetElements GDIPlus_MatrixInvert GDIPlus_MatrixMultiply GDIPlus_MatrixRotate GDIPlus_MatrixScale GDIPlus_MatrixSetElements GDIPlus_MatrixShear GDIPlus_MatrixTransformPoints GDIPlus_MatrixTranslate GDIPlus_PaletteInitialize GDIPlus_ParamAdd GDIPlus_ParamInit GDIPlus_ParamSize GDIPlus_PathAddArc GDIPlus_PathAddBezier GDIPlus_PathAddClosedCurve GDIPlus_PathAddClosedCurve2 GDIPlus_PathAddCurve GDIPlus_PathAddCurve2 GDIPlus_PathAddCurve3 GDIPlus_PathAddEllipse GDIPlus_PathAddLine GDIPlus_PathAddLine2 GDIPlus_PathAddPath GDIPlus_PathAddPie GDIPlus_PathAddPolygon GDIPlus_PathAddRectangle GDIPlus_PathAddString GDIPlus_PathBrushCreate GDIPlus_PathBrushCreateFromPath GDIPlus_PathBrushGetCenterPoint GDIPlus_PathBrushGetFocusScales GDIPlus_PathBrushGetPointCount GDIPlus_PathBrushGetRect GDIPlus_PathBrushGetWrapMode GDIPlus_PathBrushMultiplyTransform GDIPlus_PathBrushResetTransform GDIPlus_PathBrushSetBlend GDIPlus_PathBrushSetCenterColor GDIPlus_PathBrushSetCenterPoint GDIPlus_PathBrushSetFocusScales GDIPlus_PathBrushSetGammaCorrection GDIPlus_PathBrushSetLinearBlend GDIPlus_PathBrushSetPresetBlend GDIPlus_PathBrushSetSigmaBlend GDIPlus_PathBrushSetSurroundColor GDIPlus_PathBrushSetSurroundColorsWithCount GDIPlus_PathBrushSetTransform GDIPlus_PathBrushSetWrapMode GDIPlus_PathClone GDIPlus_PathCloseFigure GDIPlus_PathCreate GDIPlus_PathCreate2 GDIPlus_PathDispose GDIPlus_PathFlatten GDIPlus_PathGetData GDIPlus_PathGetFillMode GDIPlus_PathGetLastPoint GDIPlus_PathGetPointCount GDIPlus_PathGetPoints GDIPlus_PathGetWorldBounds GDIPlus_PathIsOutlineVisiblePoint GDIPlus_PathIsVisiblePoint GDIPlus_PathIterCreate GDIPlus_PathIterDispose GDIPlus_PathIterGetSubpathCount GDIPlus_PathIterNextMarkerPath GDIPlus_PathIterNextSubpathPath GDIPlus_PathIterRewind GDIPlus_PathReset GDIPlus_PathReverse GDIPlus_PathSetFillMode GDIPlus_PathSetMarker GDIPlus_PathStartFigure GDIPlus_PathTransform GDIPlus_PathWarp GDIPlus_PathWiden GDIPlus_PathWindingModeOutline GDIPlus_PenCreate GDIPlus_PenCreate2 GDIPlus_PenDispose GDIPlus_PenGetAlignment GDIPlus_PenGetColor GDIPlus_PenGetCustomEndCap GDIPlus_PenGetDashCap GDIPlus_PenGetDashStyle GDIPlus_PenGetEndCap GDIPlus_PenGetMiterLimit GDIPlus_PenGetWidth GDIPlus_PenSetAlignment GDIPlus_PenSetColor GDIPlus_PenSetCustomEndCap GDIPlus_PenSetDashCap GDIPlus_PenSetDashStyle GDIPlus_PenSetEndCap GDIPlus_PenSetLineCap GDIPlus_PenSetLineJoin GDIPlus_PenSetMiterLimit GDIPlus_PenSetStartCap GDIPlus_PenSetWidth GDIPlus_RectFCreate GDIPlus_RegionClone GDIPlus_RegionCombinePath GDIPlus_RegionCombineRect GDIPlus_RegionCombineRegion GDIPlus_RegionCreate GDIPlus_RegionCreateFromPath GDIPlus_RegionCreateFromRect GDIPlus_RegionDispose GDIPlus_RegionGetBounds GDIPlus_RegionGetHRgn GDIPlus_RegionTransform GDIPlus_RegionTranslate GDIPlus_Shutdown GDIPlus_Startup GDIPlus_StringFormatCreate GDIPlus_StringFormatDispose GDIPlus_StringFormatGetMeasurableCharacterRangeCount GDIPlus_StringFormatSetAlign GDIPlus_StringFormatSetLineAlign GDIPlus_StringFormatSetMeasurableCharacterRanges GDIPlus_TextureCreate GDIPlus_TextureCreate2 GDIPlus_TextureCreateIA GetIP GUICtrlAVI_Close GUICtrlAVI_Create GUICtrlAVI_Destroy GUICtrlAVI_IsPlaying GUICtrlAVI_Open GUICtrlAVI_OpenEx GUICtrlAVI_Play GUICtrlAVI_Seek GUICtrlAVI_Show GUICtrlAVI_Stop GUICtrlButton_Click GUICtrlButton_Create GUICtrlButton_Destroy GUICtrlButton_Enable GUICtrlButton_GetCheck GUICtrlButton_GetFocus GUICtrlButton_GetIdealSize GUICtrlButton_GetImage GUICtrlButton_GetImageList GUICtrlButton_GetNote GUICtrlButton_GetNoteLength GUICtrlButton_GetSplitInfo GUICtrlButton_GetState GUICtrlButton_GetText GUICtrlButton_GetTextMargin GUICtrlButton_SetCheck GUICtrlButton_SetDontClick GUICtrlButton_SetFocus GUICtrlButton_SetImage GUICtrlButton_SetImageList GUICtrlButton_SetNote GUICtrlButton_SetShield GUICtrlButton_SetSize GUICtrlButton_SetSplitInfo GUICtrlButton_SetState GUICtrlButton_SetStyle GUICtrlButton_SetText GUICtrlButton_SetTextMargin GUICtrlButton_Show GUICtrlComboBoxEx_AddDir GUICtrlComboBoxEx_AddString GUICtrlComboBoxEx_BeginUpdate GUICtrlComboBoxEx_Create GUICtrlComboBoxEx_CreateSolidBitMap GUICtrlComboBoxEx_DeleteString GUICtrlComboBoxEx_Destroy GUICtrlComboBoxEx_EndUpdate GUICtrlComboBoxEx_FindStringExact GUICtrlComboBoxEx_GetComboBoxInfo GUICtrlComboBoxEx_GetComboControl GUICtrlComboBoxEx_GetCount GUICtrlComboBoxEx_GetCurSel GUICtrlComboBoxEx_GetDroppedControlRect GUICtrlComboBoxEx_GetDroppedControlRectEx GUICtrlComboBoxEx_GetDroppedState GUICtrlComboBoxEx_GetDroppedWidth GUICtrlComboBoxEx_GetEditControl GUICtrlComboBoxEx_GetEditSel GUICtrlComboBoxEx_GetEditText GUICtrlComboBoxEx_GetExtendedStyle GUICtrlComboBoxEx_GetExtendedUI GUICtrlComboBoxEx_GetImageList GUICtrlComboBoxEx_GetItem GUICtrlComboBoxEx_GetItemEx GUICtrlComboBoxEx_GetItemHeight GUICtrlComboBoxEx_GetItemImage GUICtrlComboBoxEx_GetItemIndent GUICtrlComboBoxEx_GetItemOverlayImage GUICtrlComboBoxEx_GetItemParam GUICtrlComboBoxEx_GetItemSelectedImage GUICtrlComboBoxEx_GetItemText GUICtrlComboBoxEx_GetItemTextLen GUICtrlComboBoxEx_GetList GUICtrlComboBoxEx_GetListArray GUICtrlComboBoxEx_GetLocale GUICtrlComboBoxEx_GetLocaleCountry GUICtrlComboBoxEx_GetLocaleLang GUICtrlComboBoxEx_GetLocalePrimLang GUICtrlComboBoxEx_GetLocaleSubLang GUICtrlComboBoxEx_GetMinVisible GUICtrlComboBoxEx_GetTopIndex GUICtrlComboBoxEx_GetUnicode GUICtrlComboBoxEx_InitStorage GUICtrlComboBoxEx_InsertString GUICtrlComboBoxEx_LimitText GUICtrlComboBoxEx_ReplaceEditSel GUICtrlComboBoxEx_ResetContent GUICtrlComboBoxEx_SetCurSel GUICtrlComboBoxEx_SetDroppedWidth GUICtrlComboBoxEx_SetEditSel GUICtrlComboBoxEx_SetEditText GUICtrlComboBoxEx_SetExtendedStyle GUICtrlComboBoxEx_SetExtendedUI GUICtrlComboBoxEx_SetImageList GUICtrlComboBoxEx_SetItem GUICtrlComboBoxEx_SetItemEx GUICtrlComboBoxEx_SetItemHeight GUICtrlComboBoxEx_SetItemImage GUICtrlComboBoxEx_SetItemIndent GUICtrlComboBoxEx_SetItemOverlayImage GUICtrlComboBoxEx_SetItemParam GUICtrlComboBoxEx_SetItemSelectedImage GUICtrlComboBoxEx_SetMinVisible GUICtrlComboBoxEx_SetTopIndex GUICtrlComboBoxEx_SetUnicode GUICtrlComboBoxEx_ShowDropDown GUICtrlComboBox_AddDir GUICtrlComboBox_AddString GUICtrlComboBox_AutoComplete GUICtrlComboBox_BeginUpdate GUICtrlComboBox_Create GUICtrlComboBox_DeleteString GUICtrlComboBox_Destroy GUICtrlComboBox_EndUpdate GUICtrlComboBox_FindString GUICtrlComboBox_FindStringExact GUICtrlComboBox_GetComboBoxInfo GUICtrlComboBox_GetCount GUICtrlComboBox_GetCueBanner GUICtrlComboBox_GetCurSel GUICtrlComboBox_GetDroppedControlRect GUICtrlComboBox_GetDroppedControlRectEx GUICtrlComboBox_GetDroppedState GUICtrlComboBox_GetDroppedWidth GUICtrlComboBox_GetEditSel GUICtrlComboBox_GetEditText GUICtrlComboBox_GetExtendedUI GUICtrlComboBox_GetHorizontalExtent GUICtrlComboBox_GetItemHeight GUICtrlComboBox_GetLBText GUICtrlComboBox_GetLBTextLen GUICtrlComboBox_GetList GUICtrlComboBox_GetListArray GUICtrlComboBox_GetLocale GUICtrlComboBox_GetLocaleCountry GUICtrlComboBox_GetLocaleLang GUICtrlComboBox_GetLocalePrimLang GUICtrlComboBox_GetLocaleSubLang GUICtrlComboBox_GetMinVisible GUICtrlComboBox_GetTopIndex GUICtrlComboBox_InitStorage GUICtrlComboBox_InsertString GUICtrlComboBox_LimitText GUICtrlComboBox_ReplaceEditSel GUICtrlComboBox_ResetContent GUICtrlComboBox_SelectString GUICtrlComboBox_SetCueBanner GUICtrlComboBox_SetCurSel GUICtrlComboBox_SetDroppedWidth GUICtrlComboBox_SetEditSel GUICtrlComboBox_SetEditText GUICtrlComboBox_SetExtendedUI GUICtrlComboBox_SetHorizontalExtent GUICtrlComboBox_SetItemHeight GUICtrlComboBox_SetMinVisible GUICtrlComboBox_SetTopIndex GUICtrlComboBox_ShowDropDown GUICtrlDTP_Create GUICtrlDTP_Destroy GUICtrlDTP_GetMCColor GUICtrlDTP_GetMCFont GUICtrlDTP_GetMonthCal GUICtrlDTP_GetRange GUICtrlDTP_GetRangeEx GUICtrlDTP_GetSystemTime GUICtrlDTP_GetSystemTimeEx GUICtrlDTP_SetFormat GUICtrlDTP_SetMCColor GUICtrlDTP_SetMCFont GUICtrlDTP_SetRange GUICtrlDTP_SetRangeEx GUICtrlDTP_SetSystemTime GUICtrlDTP_SetSystemTimeEx GUICtrlEdit_AppendText GUICtrlEdit_BeginUpdate GUICtrlEdit_CanUndo GUICtrlEdit_CharFromPos GUICtrlEdit_Create GUICtrlEdit_Destroy GUICtrlEdit_EmptyUndoBuffer GUICtrlEdit_EndUpdate GUICtrlEdit_Find GUICtrlEdit_FmtLines GUICtrlEdit_GetCueBanner GUICtrlEdit_GetFirstVisibleLine GUICtrlEdit_GetLimitText GUICtrlEdit_GetLine GUICtrlEdit_GetLineCount GUICtrlEdit_GetMargins GUICtrlEdit_GetModify GUICtrlEdit_GetPasswordChar GUICtrlEdit_GetRECT GUICtrlEdit_GetRECTEx GUICtrlEdit_GetSel GUICtrlEdit_GetText GUICtrlEdit_GetTextLen GUICtrlEdit_HideBalloonTip GUICtrlEdit_InsertText GUICtrlEdit_LineFromChar GUICtrlEdit_LineIndex GUICtrlEdit_LineLength GUICtrlEdit_LineScroll GUICtrlEdit_PosFromChar GUICtrlEdit_ReplaceSel GUICtrlEdit_Scroll GUICtrlEdit_SetCueBanner GUICtrlEdit_SetLimitText GUICtrlEdit_SetMargins GUICtrlEdit_SetModify GUICtrlEdit_SetPasswordChar GUICtrlEdit_SetReadOnly GUICtrlEdit_SetRECT GUICtrlEdit_SetRECTEx GUICtrlEdit_SetRECTNP GUICtrlEdit_SetRectNPEx GUICtrlEdit_SetSel GUICtrlEdit_SetTabStops GUICtrlEdit_SetText GUICtrlEdit_ShowBalloonTip GUICtrlEdit_Undo GUICtrlHeader_AddItem GUICtrlHeader_ClearFilter GUICtrlHeader_ClearFilterAll GUICtrlHeader_Create GUICtrlHeader_CreateDragImage GUICtrlHeader_DeleteItem GUICtrlHeader_Destroy GUICtrlHeader_EditFilter GUICtrlHeader_GetBitmapMargin GUICtrlHeader_GetImageList GUICtrlHeader_GetItem GUICtrlHeader_GetItemAlign GUICtrlHeader_GetItemBitmap GUICtrlHeader_GetItemCount GUICtrlHeader_GetItemDisplay GUICtrlHeader_GetItemFlags GUICtrlHeader_GetItemFormat GUICtrlHeader_GetItemImage GUICtrlHeader_GetItemOrder GUICtrlHeader_GetItemParam GUICtrlHeader_GetItemRect GUICtrlHeader_GetItemRectEx GUICtrlHeader_GetItemText GUICtrlHeader_GetItemWidth GUICtrlHeader_GetOrderArray GUICtrlHeader_GetUnicodeFormat GUICtrlHeader_HitTest GUICtrlHeader_InsertItem GUICtrlHeader_Layout GUICtrlHeader_OrderToIndex GUICtrlHeader_SetBitmapMargin GUICtrlHeader_SetFilterChangeTimeout GUICtrlHeader_SetHotDivider GUICtrlHeader_SetImageList GUICtrlHeader_SetItem GUICtrlHeader_SetItemAlign GUICtrlHeader_SetItemBitmap GUICtrlHeader_SetItemDisplay GUICtrlHeader_SetItemFlags GUICtrlHeader_SetItemFormat GUICtrlHeader_SetItemImage GUICtrlHeader_SetItemOrder GUICtrlHeader_SetItemParam GUICtrlHeader_SetItemText GUICtrlHeader_SetItemWidth GUICtrlHeader_SetOrderArray GUICtrlHeader_SetUnicodeFormat GUICtrlIpAddress_ClearAddress GUICtrlIpAddress_Create GUICtrlIpAddress_Destroy GUICtrlIpAddress_Get GUICtrlIpAddress_GetArray GUICtrlIpAddress_GetEx GUICtrlIpAddress_IsBlank GUICtrlIpAddress_Set GUICtrlIpAddress_SetArray GUICtrlIpAddress_SetEx GUICtrlIpAddress_SetFocus GUICtrlIpAddress_SetFont GUICtrlIpAddress_SetRange GUICtrlIpAddress_ShowHide GUICtrlListBox_AddFile GUICtrlListBox_AddString GUICtrlListBox_BeginUpdate GUICtrlListBox_ClickItem GUICtrlListBox_Create GUICtrlListBox_DeleteString GUICtrlListBox_Destroy GUICtrlListBox_Dir GUICtrlListBox_EndUpdate GUICtrlListBox_FindInText GUICtrlListBox_FindString GUICtrlListBox_GetAnchorIndex GUICtrlListBox_GetCaretIndex GUICtrlListBox_GetCount GUICtrlListBox_GetCurSel GUICtrlListBox_GetHorizontalExtent GUICtrlListBox_GetItemData GUICtrlListBox_GetItemHeight GUICtrlListBox_GetItemRect GUICtrlListBox_GetItemRectEx GUICtrlListBox_GetListBoxInfo GUICtrlListBox_GetLocale GUICtrlListBox_GetLocaleCountry GUICtrlListBox_GetLocaleLang GUICtrlListBox_GetLocalePrimLang GUICtrlListBox_GetLocaleSubLang GUICtrlListBox_GetSel GUICtrlListBox_GetSelCount GUICtrlListBox_GetSelItems GUICtrlListBox_GetSelItemsText GUICtrlListBox_GetText GUICtrlListBox_GetTextLen GUICtrlListBox_GetTopIndex GUICtrlListBox_InitStorage GUICtrlListBox_InsertString GUICtrlListBox_ItemFromPoint GUICtrlListBox_ReplaceString GUICtrlListBox_ResetContent GUICtrlListBox_SelectString GUICtrlListBox_SelItemRange GUICtrlListBox_SelItemRangeEx GUICtrlListBox_SetAnchorIndex GUICtrlListBox_SetCaretIndex GUICtrlListBox_SetColumnWidth GUICtrlListBox_SetCurSel GUICtrlListBox_SetHorizontalExtent GUICtrlListBox_SetItemData GUICtrlListBox_SetItemHeight GUICtrlListBox_SetLocale GUICtrlListBox_SetSel GUICtrlListBox_SetTabStops GUICtrlListBox_SetTopIndex GUICtrlListBox_Sort GUICtrlListBox_SwapString GUICtrlListBox_UpdateHScroll GUICtrlListView_AddArray GUICtrlListView_AddColumn GUICtrlListView_AddItem GUICtrlListView_AddSubItem GUICtrlListView_ApproximateViewHeight GUICtrlListView_ApproximateViewRect GUICtrlListView_ApproximateViewWidth GUICtrlListView_Arrange GUICtrlListView_BeginUpdate GUICtrlListView_CancelEditLabel GUICtrlListView_ClickItem GUICtrlListView_CopyItems GUICtrlListView_Create GUICtrlListView_CreateDragImage GUICtrlListView_CreateSolidBitMap GUICtrlListView_DeleteAllItems GUICtrlListView_DeleteColumn GUICtrlListView_DeleteItem GUICtrlListView_DeleteItemsSelected GUICtrlListView_Destroy GUICtrlListView_DrawDragImage GUICtrlListView_EditLabel GUICtrlListView_EnableGroupView GUICtrlListView_EndUpdate GUICtrlListView_EnsureVisible GUICtrlListView_FindInText GUICtrlListView_FindItem GUICtrlListView_FindNearest GUICtrlListView_FindParam GUICtrlListView_FindText GUICtrlListView_GetBkColor GUICtrlListView_GetBkImage GUICtrlListView_GetCallbackMask GUICtrlListView_GetColumn GUICtrlListView_GetColumnCount GUICtrlListView_GetColumnOrder GUICtrlListView_GetColumnOrderArray GUICtrlListView_GetColumnWidth GUICtrlListView_GetCounterPage GUICtrlListView_GetEditControl GUICtrlListView_GetExtendedListViewStyle GUICtrlListView_GetFocusedGroup GUICtrlListView_GetGroupCount GUICtrlListView_GetGroupInfo GUICtrlListView_GetGroupInfoByIndex GUICtrlListView_GetGroupRect GUICtrlListView_GetGroupViewEnabled GUICtrlListView_GetHeader GUICtrlListView_GetHotCursor GUICtrlListView_GetHotItem GUICtrlListView_GetHoverTime GUICtrlListView_GetImageList GUICtrlListView_GetISearchString GUICtrlListView_GetItem GUICtrlListView_GetItemChecked GUICtrlListView_GetItemCount GUICtrlListView_GetItemCut GUICtrlListView_GetItemDropHilited GUICtrlListView_GetItemEx GUICtrlListView_GetItemFocused GUICtrlListView_GetItemGroupID GUICtrlListView_GetItemImage GUICtrlListView_GetItemIndent GUICtrlListView_GetItemParam GUICtrlListView_GetItemPosition GUICtrlListView_GetItemPositionX GUICtrlListView_GetItemPositionY GUICtrlListView_GetItemRect GUICtrlListView_GetItemRectEx GUICtrlListView_GetItemSelected GUICtrlListView_GetItemSpacing GUICtrlListView_GetItemSpacingX GUICtrlListView_GetItemSpacingY GUICtrlListView_GetItemState GUICtrlListView_GetItemStateImage GUICtrlListView_GetItemText GUICtrlListView_GetItemTextArray GUICtrlListView_GetItemTextString GUICtrlListView_GetNextItem GUICtrlListView_GetNumberOfWorkAreas GUICtrlListView_GetOrigin GUICtrlListView_GetOriginX GUICtrlListView_GetOriginY GUICtrlListView_GetOutlineColor GUICtrlListView_GetSelectedColumn GUICtrlListView_GetSelectedCount GUICtrlListView_GetSelectedIndices GUICtrlListView_GetSelectionMark GUICtrlListView_GetStringWidth GUICtrlListView_GetSubItemRect GUICtrlListView_GetTextBkColor GUICtrlListView_GetTextColor GUICtrlListView_GetToolTips GUICtrlListView_GetTopIndex GUICtrlListView_GetUnicodeFormat GUICtrlListView_GetView GUICtrlListView_GetViewDetails GUICtrlListView_GetViewLarge GUICtrlListView_GetViewList GUICtrlListView_GetViewRect GUICtrlListView_GetViewSmall GUICtrlListView_GetViewTile GUICtrlListView_HideColumn GUICtrlListView_HitTest GUICtrlListView_InsertColumn GUICtrlListView_InsertGroup GUICtrlListView_InsertItem GUICtrlListView_JustifyColumn GUICtrlListView_MapIDToIndex GUICtrlListView_MapIndexToID GUICtrlListView_RedrawItems GUICtrlListView_RegisterSortCallBack GUICtrlListView_RemoveAllGroups GUICtrlListView_RemoveGroup GUICtrlListView_Scroll GUICtrlListView_SetBkColor GUICtrlListView_SetBkImage GUICtrlListView_SetCallBackMask GUICtrlListView_SetColumn GUICtrlListView_SetColumnOrder GUICtrlListView_SetColumnOrderArray GUICtrlListView_SetColumnWidth GUICtrlListView_SetExtendedListViewStyle GUICtrlListView_SetGroupInfo GUICtrlListView_SetHotItem GUICtrlListView_SetHoverTime GUICtrlListView_SetIconSpacing GUICtrlListView_SetImageList GUICtrlListView_SetItem GUICtrlListView_SetItemChecked GUICtrlListView_SetItemCount GUICtrlListView_SetItemCut GUICtrlListView_SetItemDropHilited GUICtrlListView_SetItemEx GUICtrlListView_SetItemFocused GUICtrlListView_SetItemGroupID GUICtrlListView_SetItemImage GUICtrlListView_SetItemIndent GUICtrlListView_SetItemParam GUICtrlListView_SetItemPosition GUICtrlListView_SetItemPosition32 GUICtrlListView_SetItemSelected GUICtrlListView_SetItemState GUICtrlListView_SetItemStateImage GUICtrlListView_SetItemText GUICtrlListView_SetOutlineColor GUICtrlListView_SetSelectedColumn GUICtrlListView_SetSelectionMark GUICtrlListView_SetTextBkColor GUICtrlListView_SetTextColor GUICtrlListView_SetToolTips GUICtrlListView_SetUnicodeFormat GUICtrlListView_SetView GUICtrlListView_SetWorkAreas GUICtrlListView_SimpleSort GUICtrlListView_SortItems GUICtrlListView_SubItemHitTest GUICtrlListView_UnRegisterSortCallBack GUICtrlMenu_AddMenuItem GUICtrlMenu_AppendMenu GUICtrlMenu_CalculatePopupWindowPosition GUICtrlMenu_CheckMenuItem GUICtrlMenu_CheckRadioItem GUICtrlMenu_CreateMenu GUICtrlMenu_CreatePopup GUICtrlMenu_DeleteMenu GUICtrlMenu_DestroyMenu GUICtrlMenu_DrawMenuBar GUICtrlMenu_EnableMenuItem GUICtrlMenu_FindItem GUICtrlMenu_FindParent GUICtrlMenu_GetItemBmp GUICtrlMenu_GetItemBmpChecked GUICtrlMenu_GetItemBmpUnchecked GUICtrlMenu_GetItemChecked GUICtrlMenu_GetItemCount GUICtrlMenu_GetItemData GUICtrlMenu_GetItemDefault GUICtrlMenu_GetItemDisabled GUICtrlMenu_GetItemEnabled GUICtrlMenu_GetItemGrayed GUICtrlMenu_GetItemHighlighted GUICtrlMenu_GetItemID GUICtrlMenu_GetItemInfo GUICtrlMenu_GetItemRect GUICtrlMenu_GetItemRectEx GUICtrlMenu_GetItemState GUICtrlMenu_GetItemStateEx GUICtrlMenu_GetItemSubMenu GUICtrlMenu_GetItemText GUICtrlMenu_GetItemType GUICtrlMenu_GetMenu GUICtrlMenu_GetMenuBackground GUICtrlMenu_GetMenuBarInfo GUICtrlMenu_GetMenuContextHelpID GUICtrlMenu_GetMenuData GUICtrlMenu_GetMenuDefaultItem GUICtrlMenu_GetMenuHeight GUICtrlMenu_GetMenuInfo GUICtrlMenu_GetMenuStyle GUICtrlMenu_GetSystemMenu GUICtrlMenu_InsertMenuItem GUICtrlMenu_InsertMenuItemEx GUICtrlMenu_IsMenu GUICtrlMenu_LoadMenu GUICtrlMenu_MapAccelerator GUICtrlMenu_MenuItemFromPoint GUICtrlMenu_RemoveMenu GUICtrlMenu_SetItemBitmaps GUICtrlMenu_SetItemBmp GUICtrlMenu_SetItemBmpChecked GUICtrlMenu_SetItemBmpUnchecked GUICtrlMenu_SetItemChecked GUICtrlMenu_SetItemData GUICtrlMenu_SetItemDefault GUICtrlMenu_SetItemDisabled GUICtrlMenu_SetItemEnabled GUICtrlMenu_SetItemGrayed GUICtrlMenu_SetItemHighlighted GUICtrlMenu_SetItemID GUICtrlMenu_SetItemInfo GUICtrlMenu_SetItemState GUICtrlMenu_SetItemSubMenu GUICtrlMenu_SetItemText GUICtrlMenu_SetItemType GUICtrlMenu_SetMenu GUICtrlMenu_SetMenuBackground GUICtrlMenu_SetMenuContextHelpID GUICtrlMenu_SetMenuData GUICtrlMenu_SetMenuDefaultItem GUICtrlMenu_SetMenuHeight GUICtrlMenu_SetMenuInfo GUICtrlMenu_SetMenuStyle GUICtrlMenu_TrackPopupMenu GUICtrlMonthCal_Create GUICtrlMonthCal_Destroy GUICtrlMonthCal_GetCalendarBorder GUICtrlMonthCal_GetCalendarCount GUICtrlMonthCal_GetColor GUICtrlMonthCal_GetColorArray GUICtrlMonthCal_GetCurSel GUICtrlMonthCal_GetCurSelStr GUICtrlMonthCal_GetFirstDOW GUICtrlMonthCal_GetFirstDOWStr GUICtrlMonthCal_GetMaxSelCount GUICtrlMonthCal_GetMaxTodayWidth GUICtrlMonthCal_GetMinReqHeight GUICtrlMonthCal_GetMinReqRect GUICtrlMonthCal_GetMinReqRectArray GUICtrlMonthCal_GetMinReqWidth GUICtrlMonthCal_GetMonthDelta GUICtrlMonthCal_GetMonthRange GUICtrlMonthCal_GetMonthRangeMax GUICtrlMonthCal_GetMonthRangeMaxStr GUICtrlMonthCal_GetMonthRangeMin GUICtrlMonthCal_GetMonthRangeMinStr GUICtrlMonthCal_GetMonthRangeSpan GUICtrlMonthCal_GetRange GUICtrlMonthCal_GetRangeMax GUICtrlMonthCal_GetRangeMaxStr GUICtrlMonthCal_GetRangeMin GUICtrlMonthCal_GetRangeMinStr GUICtrlMonthCal_GetSelRange GUICtrlMonthCal_GetSelRangeMax GUICtrlMonthCal_GetSelRangeMaxStr GUICtrlMonthCal_GetSelRangeMin GUICtrlMonthCal_GetSelRangeMinStr GUICtrlMonthCal_GetToday GUICtrlMonthCal_GetTodayStr GUICtrlMonthCal_GetUnicodeFormat GUICtrlMonthCal_HitTest GUICtrlMonthCal_SetCalendarBorder GUICtrlMonthCal_SetColor GUICtrlMonthCal_SetCurSel GUICtrlMonthCal_SetDayState GUICtrlMonthCal_SetFirstDOW GUICtrlMonthCal_SetMaxSelCount GUICtrlMonthCal_SetMonthDelta GUICtrlMonthCal_SetRange GUICtrlMonthCal_SetSelRange GUICtrlMonthCal_SetToday GUICtrlMonthCal_SetUnicodeFormat GUICtrlRebar_AddBand GUICtrlRebar_AddToolBarBand GUICtrlRebar_BeginDrag GUICtrlRebar_Create GUICtrlRebar_DeleteBand GUICtrlRebar_Destroy GUICtrlRebar_DragMove GUICtrlRebar_EndDrag GUICtrlRebar_GetBandBackColor GUICtrlRebar_GetBandBorders GUICtrlRebar_GetBandBordersEx GUICtrlRebar_GetBandChildHandle GUICtrlRebar_GetBandChildSize GUICtrlRebar_GetBandCount GUICtrlRebar_GetBandForeColor GUICtrlRebar_GetBandHeaderSize GUICtrlRebar_GetBandID GUICtrlRebar_GetBandIdealSize GUICtrlRebar_GetBandLength GUICtrlRebar_GetBandLParam GUICtrlRebar_GetBandMargins GUICtrlRebar_GetBandMarginsEx GUICtrlRebar_GetBandRect GUICtrlRebar_GetBandRectEx GUICtrlRebar_GetBandStyle GUICtrlRebar_GetBandStyleBreak GUICtrlRebar_GetBandStyleChildEdge GUICtrlRebar_GetBandStyleFixedBMP GUICtrlRebar_GetBandStyleFixedSize GUICtrlRebar_GetBandStyleGripperAlways GUICtrlRebar_GetBandStyleHidden GUICtrlRebar_GetBandStyleHideTitle GUICtrlRebar_GetBandStyleNoGripper GUICtrlRebar_GetBandStyleTopAlign GUICtrlRebar_GetBandStyleUseChevron GUICtrlRebar_GetBandStyleVariableHeight GUICtrlRebar_GetBandText GUICtrlRebar_GetBarHeight GUICtrlRebar_GetBarInfo GUICtrlRebar_GetBKColor GUICtrlRebar_GetColorScheme GUICtrlRebar_GetRowCount GUICtrlRebar_GetRowHeight GUICtrlRebar_GetTextColor GUICtrlRebar_GetToolTips GUICtrlRebar_GetUnicodeFormat GUICtrlRebar_HitTest GUICtrlRebar_IDToIndex GUICtrlRebar_MaximizeBand GUICtrlRebar_MinimizeBand GUICtrlRebar_MoveBand GUICtrlRebar_SetBandBackColor GUICtrlRebar_SetBandForeColor GUICtrlRebar_SetBandHeaderSize GUICtrlRebar_SetBandID GUICtrlRebar_SetBandIdealSize GUICtrlRebar_SetBandLength GUICtrlRebar_SetBandLParam GUICtrlRebar_SetBandStyle GUICtrlRebar_SetBandStyleBreak GUICtrlRebar_SetBandStyleChildEdge GUICtrlRebar_SetBandStyleFixedBMP GUICtrlRebar_SetBandStyleFixedSize GUICtrlRebar_SetBandStyleGripperAlways GUICtrlRebar_SetBandStyleHidden GUICtrlRebar_SetBandStyleHideTitle GUICtrlRebar_SetBandStyleNoGripper GUICtrlRebar_SetBandStyleTopAlign GUICtrlRebar_SetBandStyleUseChevron GUICtrlRebar_SetBandStyleVariableHeight GUICtrlRebar_SetBandText GUICtrlRebar_SetBarInfo GUICtrlRebar_SetBKColor GUICtrlRebar_SetColorScheme GUICtrlRebar_SetTextColor GUICtrlRebar_SetToolTips GUICtrlRebar_SetUnicodeFormat GUICtrlRebar_ShowBand GUICtrlRichEdit_AppendText GUICtrlRichEdit_AutoDetectURL GUICtrlRichEdit_CanPaste GUICtrlRichEdit_CanPasteSpecial GUICtrlRichEdit_CanRedo GUICtrlRichEdit_CanUndo GUICtrlRichEdit_ChangeFontSize GUICtrlRichEdit_Copy GUICtrlRichEdit_Create GUICtrlRichEdit_Cut GUICtrlRichEdit_Deselect GUICtrlRichEdit_Destroy GUICtrlRichEdit_EmptyUndoBuffer GUICtrlRichEdit_FindText GUICtrlRichEdit_FindTextInRange GUICtrlRichEdit_GetBkColor GUICtrlRichEdit_GetCharAttributes GUICtrlRichEdit_GetCharBkColor GUICtrlRichEdit_GetCharColor GUICtrlRichEdit_GetCharPosFromXY GUICtrlRichEdit_GetCharPosOfNextWord GUICtrlRichEdit_GetCharPosOfPreviousWord GUICtrlRichEdit_GetCharWordBreakInfo GUICtrlRichEdit_GetFirstCharPosOnLine GUICtrlRichEdit_GetFont GUICtrlRichEdit_GetLineCount GUICtrlRichEdit_GetLineLength GUICtrlRichEdit_GetLineNumberFromCharPos GUICtrlRichEdit_GetNextRedo GUICtrlRichEdit_GetNextUndo GUICtrlRichEdit_GetNumberOfFirstVisibleLine GUICtrlRichEdit_GetParaAlignment GUICtrlRichEdit_GetParaAttributes GUICtrlRichEdit_GetParaBorder GUICtrlRichEdit_GetParaIndents GUICtrlRichEdit_GetParaNumbering GUICtrlRichEdit_GetParaShading GUICtrlRichEdit_GetParaSpacing GUICtrlRichEdit_GetParaTabStops GUICtrlRichEdit_GetPasswordChar GUICtrlRichEdit_GetRECT GUICtrlRichEdit_GetScrollPos GUICtrlRichEdit_GetSel GUICtrlRichEdit_GetSelAA GUICtrlRichEdit_GetSelText GUICtrlRichEdit_GetSpaceUnit GUICtrlRichEdit_GetText GUICtrlRichEdit_GetTextInLine GUICtrlRichEdit_GetTextInRange GUICtrlRichEdit_GetTextLength GUICtrlRichEdit_GetVersion GUICtrlRichEdit_GetXYFromCharPos GUICtrlRichEdit_GetZoom GUICtrlRichEdit_GotoCharPos GUICtrlRichEdit_HideSelection GUICtrlRichEdit_InsertText GUICtrlRichEdit_IsModified GUICtrlRichEdit_IsTextSelected GUICtrlRichEdit_Paste GUICtrlRichEdit_PasteSpecial GUICtrlRichEdit_PauseRedraw GUICtrlRichEdit_Redo GUICtrlRichEdit_ReplaceText GUICtrlRichEdit_ResumeRedraw GUICtrlRichEdit_ScrollLineOrPage GUICtrlRichEdit_ScrollLines GUICtrlRichEdit_ScrollToCaret GUICtrlRichEdit_SetBkColor GUICtrlRichEdit_SetCharAttributes GUICtrlRichEdit_SetCharBkColor GUICtrlRichEdit_SetCharColor GUICtrlRichEdit_SetEventMask GUICtrlRichEdit_SetFont GUICtrlRichEdit_SetLimitOnText GUICtrlRichEdit_SetModified GUICtrlRichEdit_SetParaAlignment GUICtrlRichEdit_SetParaAttributes GUICtrlRichEdit_SetParaBorder GUICtrlRichEdit_SetParaIndents GUICtrlRichEdit_SetParaNumbering GUICtrlRichEdit_SetParaShading GUICtrlRichEdit_SetParaSpacing GUICtrlRichEdit_SetParaTabStops GUICtrlRichEdit_SetPasswordChar GUICtrlRichEdit_SetReadOnly GUICtrlRichEdit_SetRECT GUICtrlRichEdit_SetScrollPos GUICtrlRichEdit_SetSel GUICtrlRichEdit_SetSpaceUnit GUICtrlRichEdit_SetTabStops GUICtrlRichEdit_SetText GUICtrlRichEdit_SetUndoLimit GUICtrlRichEdit_SetZoom GUICtrlRichEdit_StreamFromFile GUICtrlRichEdit_StreamFromVar GUICtrlRichEdit_StreamToFile GUICtrlRichEdit_StreamToVar GUICtrlRichEdit_Undo GUICtrlSlider_ClearSel GUICtrlSlider_ClearTics GUICtrlSlider_Create GUICtrlSlider_Destroy GUICtrlSlider_GetBuddy GUICtrlSlider_GetChannelRect GUICtrlSlider_GetChannelRectEx GUICtrlSlider_GetLineSize GUICtrlSlider_GetLogicalTics GUICtrlSlider_GetNumTics GUICtrlSlider_GetPageSize GUICtrlSlider_GetPos GUICtrlSlider_GetRange GUICtrlSlider_GetRangeMax GUICtrlSlider_GetRangeMin GUICtrlSlider_GetSel GUICtrlSlider_GetSelEnd GUICtrlSlider_GetSelStart GUICtrlSlider_GetThumbLength GUICtrlSlider_GetThumbRect GUICtrlSlider_GetThumbRectEx GUICtrlSlider_GetTic GUICtrlSlider_GetTicPos GUICtrlSlider_GetToolTips GUICtrlSlider_GetUnicodeFormat GUICtrlSlider_SetBuddy GUICtrlSlider_SetLineSize GUICtrlSlider_SetPageSize GUICtrlSlider_SetPos GUICtrlSlider_SetRange GUICtrlSlider_SetRangeMax GUICtrlSlider_SetRangeMin GUICtrlSlider_SetSel GUICtrlSlider_SetSelEnd GUICtrlSlider_SetSelStart GUICtrlSlider_SetThumbLength GUICtrlSlider_SetTic GUICtrlSlider_SetTicFreq GUICtrlSlider_SetTipSide GUICtrlSlider_SetToolTips GUICtrlSlider_SetUnicodeFormat GUICtrlStatusBar_Create GUICtrlStatusBar_Destroy GUICtrlStatusBar_EmbedControl GUICtrlStatusBar_GetBorders GUICtrlStatusBar_GetBordersHorz GUICtrlStatusBar_GetBordersRect GUICtrlStatusBar_GetBordersVert GUICtrlStatusBar_GetCount GUICtrlStatusBar_GetHeight GUICtrlStatusBar_GetIcon GUICtrlStatusBar_GetParts GUICtrlStatusBar_GetRect GUICtrlStatusBar_GetRectEx GUICtrlStatusBar_GetText GUICtrlStatusBar_GetTextFlags GUICtrlStatusBar_GetTextLength GUICtrlStatusBar_GetTextLengthEx GUICtrlStatusBar_GetTipText GUICtrlStatusBar_GetUnicodeFormat GUICtrlStatusBar_GetWidth GUICtrlStatusBar_IsSimple GUICtrlStatusBar_Resize GUICtrlStatusBar_SetBkColor GUICtrlStatusBar_SetIcon GUICtrlStatusBar_SetMinHeight GUICtrlStatusBar_SetParts GUICtrlStatusBar_SetSimple GUICtrlStatusBar_SetText GUICtrlStatusBar_SetTipText GUICtrlStatusBar_SetUnicodeFormat GUICtrlStatusBar_ShowHide GUICtrlTab_ActivateTab GUICtrlTab_ClickTab GUICtrlTab_Create GUICtrlTab_DeleteAllItems GUICtrlTab_DeleteItem GUICtrlTab_DeselectAll GUICtrlTab_Destroy GUICtrlTab_FindTab GUICtrlTab_GetCurFocus GUICtrlTab_GetCurSel GUICtrlTab_GetDisplayRect GUICtrlTab_GetDisplayRectEx GUICtrlTab_GetExtendedStyle GUICtrlTab_GetImageList GUICtrlTab_GetItem GUICtrlTab_GetItemCount GUICtrlTab_GetItemImage GUICtrlTab_GetItemParam GUICtrlTab_GetItemRect GUICtrlTab_GetItemRectEx GUICtrlTab_GetItemState GUICtrlTab_GetItemText GUICtrlTab_GetRowCount GUICtrlTab_GetToolTips GUICtrlTab_GetUnicodeFormat GUICtrlTab_HighlightItem GUICtrlTab_HitTest GUICtrlTab_InsertItem GUICtrlTab_RemoveImage GUICtrlTab_SetCurFocus GUICtrlTab_SetCurSel GUICtrlTab_SetExtendedStyle GUICtrlTab_SetImageList GUICtrlTab_SetItem GUICtrlTab_SetItemImage GUICtrlTab_SetItemParam GUICtrlTab_SetItemSize GUICtrlTab_SetItemState GUICtrlTab_SetItemText GUICtrlTab_SetMinTabWidth GUICtrlTab_SetPadding GUICtrlTab_SetToolTips GUICtrlTab_SetUnicodeFormat GUICtrlToolbar_AddBitmap GUICtrlToolbar_AddButton GUICtrlToolbar_AddButtonSep GUICtrlToolbar_AddString GUICtrlToolbar_ButtonCount GUICtrlToolbar_CheckButton GUICtrlToolbar_ClickAccel GUICtrlToolbar_ClickButton GUICtrlToolbar_ClickIndex GUICtrlToolbar_CommandToIndex GUICtrlToolbar_Create GUICtrlToolbar_Customize GUICtrlToolbar_DeleteButton GUICtrlToolbar_Destroy GUICtrlToolbar_EnableButton GUICtrlToolbar_FindToolbar GUICtrlToolbar_GetAnchorHighlight GUICtrlToolbar_GetBitmapFlags GUICtrlToolbar_GetButtonBitmap GUICtrlToolbar_GetButtonInfo GUICtrlToolbar_GetButtonInfoEx GUICtrlToolbar_GetButtonParam GUICtrlToolbar_GetButtonRect GUICtrlToolbar_GetButtonRectEx GUICtrlToolbar_GetButtonSize GUICtrlToolbar_GetButtonState GUICtrlToolbar_GetButtonStyle GUICtrlToolbar_GetButtonText GUICtrlToolbar_GetColorScheme GUICtrlToolbar_GetDisabledImageList GUICtrlToolbar_GetExtendedStyle GUICtrlToolbar_GetHotImageList GUICtrlToolbar_GetHotItem GUICtrlToolbar_GetImageList GUICtrlToolbar_GetInsertMark GUICtrlToolbar_GetInsertMarkColor GUICtrlToolbar_GetMaxSize GUICtrlToolbar_GetMetrics GUICtrlToolbar_GetPadding GUICtrlToolbar_GetRows GUICtrlToolbar_GetString GUICtrlToolbar_GetStyle GUICtrlToolbar_GetStyleAltDrag GUICtrlToolbar_GetStyleCustomErase GUICtrlToolbar_GetStyleFlat GUICtrlToolbar_GetStyleList GUICtrlToolbar_GetStyleRegisterDrop GUICtrlToolbar_GetStyleToolTips GUICtrlToolbar_GetStyleTransparent GUICtrlToolbar_GetStyleWrapable GUICtrlToolbar_GetTextRows GUICtrlToolbar_GetToolTips GUICtrlToolbar_GetUnicodeFormat GUICtrlToolbar_HideButton GUICtrlToolbar_HighlightButton GUICtrlToolbar_HitTest GUICtrlToolbar_IndexToCommand GUICtrlToolbar_InsertButton GUICtrlToolbar_InsertMarkHitTest GUICtrlToolbar_IsButtonChecked GUICtrlToolbar_IsButtonEnabled GUICtrlToolbar_IsButtonHidden GUICtrlToolbar_IsButtonHighlighted GUICtrlToolbar_IsButtonIndeterminate GUICtrlToolbar_IsButtonPressed GUICtrlToolbar_LoadBitmap GUICtrlToolbar_LoadImages GUICtrlToolbar_MapAccelerator GUICtrlToolbar_MoveButton GUICtrlToolbar_PressButton GUICtrlToolbar_SetAnchorHighlight GUICtrlToolbar_SetBitmapSize GUICtrlToolbar_SetButtonBitMap GUICtrlToolbar_SetButtonInfo GUICtrlToolbar_SetButtonInfoEx GUICtrlToolbar_SetButtonParam GUICtrlToolbar_SetButtonSize GUICtrlToolbar_SetButtonState GUICtrlToolbar_SetButtonStyle GUICtrlToolbar_SetButtonText GUICtrlToolbar_SetButtonWidth GUICtrlToolbar_SetCmdID GUICtrlToolbar_SetColorScheme GUICtrlToolbar_SetDisabledImageList GUICtrlToolbar_SetDrawTextFlags GUICtrlToolbar_SetExtendedStyle GUICtrlToolbar_SetHotImageList GUICtrlToolbar_SetHotItem GUICtrlToolbar_SetImageList GUICtrlToolbar_SetIndent GUICtrlToolbar_SetIndeterminate GUICtrlToolbar_SetInsertMark GUICtrlToolbar_SetInsertMarkColor GUICtrlToolbar_SetMaxTextRows GUICtrlToolbar_SetMetrics GUICtrlToolbar_SetPadding GUICtrlToolbar_SetParent GUICtrlToolbar_SetRows GUICtrlToolbar_SetStyle GUICtrlToolbar_SetStyleAltDrag GUICtrlToolbar_SetStyleCustomErase GUICtrlToolbar_SetStyleFlat GUICtrlToolbar_SetStyleList GUICtrlToolbar_SetStyleRegisterDrop GUICtrlToolbar_SetStyleToolTips GUICtrlToolbar_SetStyleTransparent GUICtrlToolbar_SetStyleWrapable GUICtrlToolbar_SetToolTips GUICtrlToolbar_SetUnicodeFormat GUICtrlToolbar_SetWindowTheme GUICtrlTreeView_Add GUICtrlTreeView_AddChild GUICtrlTreeView_AddChildFirst GUICtrlTreeView_AddFirst GUICtrlTreeView_BeginUpdate GUICtrlTreeView_ClickItem GUICtrlTreeView_Create GUICtrlTreeView_CreateDragImage GUICtrlTreeView_CreateSolidBitMap GUICtrlTreeView_Delete GUICtrlTreeView_DeleteAll GUICtrlTreeView_DeleteChildren GUICtrlTreeView_Destroy GUICtrlTreeView_DisplayRect GUICtrlTreeView_DisplayRectEx GUICtrlTreeView_EditText GUICtrlTreeView_EndEdit GUICtrlTreeView_EndUpdate GUICtrlTreeView_EnsureVisible GUICtrlTreeView_Expand GUICtrlTreeView_ExpandedOnce GUICtrlTreeView_FindItem GUICtrlTreeView_FindItemEx GUICtrlTreeView_GetBkColor GUICtrlTreeView_GetBold GUICtrlTreeView_GetChecked GUICtrlTreeView_GetChildCount GUICtrlTreeView_GetChildren GUICtrlTreeView_GetCount GUICtrlTreeView_GetCut GUICtrlTreeView_GetDropTarget GUICtrlTreeView_GetEditControl GUICtrlTreeView_GetExpanded GUICtrlTreeView_GetFirstChild GUICtrlTreeView_GetFirstItem GUICtrlTreeView_GetFirstVisible GUICtrlTreeView_GetFocused GUICtrlTreeView_GetHeight GUICtrlTreeView_GetImageIndex GUICtrlTreeView_GetImageListIconHandle GUICtrlTreeView_GetIndent GUICtrlTreeView_GetInsertMarkColor GUICtrlTreeView_GetISearchString GUICtrlTreeView_GetItemByIndex GUICtrlTreeView_GetItemHandle GUICtrlTreeView_GetItemParam GUICtrlTreeView_GetLastChild GUICtrlTreeView_GetLineColor GUICtrlTreeView_GetNext GUICtrlTreeView_GetNextChild GUICtrlTreeView_GetNextSibling GUICtrlTreeView_GetNextVisible GUICtrlTreeView_GetNormalImageList GUICtrlTreeView_GetParentHandle GUICtrlTreeView_GetParentParam GUICtrlTreeView_GetPrev GUICtrlTreeView_GetPrevChild GUICtrlTreeView_GetPrevSibling GUICtrlTreeView_GetPrevVisible GUICtrlTreeView_GetScrollTime GUICtrlTreeView_GetSelected GUICtrlTreeView_GetSelectedImageIndex GUICtrlTreeView_GetSelection GUICtrlTreeView_GetSiblingCount GUICtrlTreeView_GetState GUICtrlTreeView_GetStateImageIndex GUICtrlTreeView_GetStateImageList GUICtrlTreeView_GetText GUICtrlTreeView_GetTextColor GUICtrlTreeView_GetToolTips GUICtrlTreeView_GetTree GUICtrlTreeView_GetUnicodeFormat GUICtrlTreeView_GetVisible GUICtrlTreeView_GetVisibleCount GUICtrlTreeView_HitTest GUICtrlTreeView_HitTestEx GUICtrlTreeView_HitTestItem GUICtrlTreeView_Index GUICtrlTreeView_InsertItem GUICtrlTreeView_IsFirstItem GUICtrlTreeView_IsParent GUICtrlTreeView_Level GUICtrlTreeView_SelectItem GUICtrlTreeView_SelectItemByIndex GUICtrlTreeView_SetBkColor GUICtrlTreeView_SetBold GUICtrlTreeView_SetChecked GUICtrlTreeView_SetCheckedByIndex GUICtrlTreeView_SetChildren GUICtrlTreeView_SetCut GUICtrlTreeView_SetDropTarget GUICtrlTreeView_SetFocused GUICtrlTreeView_SetHeight GUICtrlTreeView_SetIcon GUICtrlTreeView_SetImageIndex GUICtrlTreeView_SetIndent GUICtrlTreeView_SetInsertMark GUICtrlTreeView_SetInsertMarkColor GUICtrlTreeView_SetItemHeight GUICtrlTreeView_SetItemParam GUICtrlTreeView_SetLineColor GUICtrlTreeView_SetNormalImageList GUICtrlTreeView_SetScrollTime GUICtrlTreeView_SetSelected GUICtrlTreeView_SetSelectedImageIndex GUICtrlTreeView_SetState GUICtrlTreeView_SetStateImageIndex GUICtrlTreeView_SetStateImageList GUICtrlTreeView_SetText GUICtrlTreeView_SetTextColor GUICtrlTreeView_SetToolTips GUICtrlTreeView_SetUnicodeFormat GUICtrlTreeView_Sort GUIImageList_Add GUIImageList_AddBitmap GUIImageList_AddIcon GUIImageList_AddMasked GUIImageList_BeginDrag GUIImageList_Copy GUIImageList_Create GUIImageList_Destroy GUIImageList_DestroyIcon GUIImageList_DragEnter GUIImageList_DragLeave GUIImageList_DragMove GUIImageList_Draw GUIImageList_DrawEx GUIImageList_Duplicate GUIImageList_EndDrag GUIImageList_GetBkColor GUIImageList_GetIcon GUIImageList_GetIconHeight GUIImageList_GetIconSize GUIImageList_GetIconSizeEx GUIImageList_GetIconWidth GUIImageList_GetImageCount GUIImageList_GetImageInfoEx GUIImageList_Remove GUIImageList_ReplaceIcon GUIImageList_SetBkColor GUIImageList_SetIconSize GUIImageList_SetImageCount GUIImageList_Swap GUIScrollBars_EnableScrollBar GUIScrollBars_GetScrollBarInfoEx GUIScrollBars_GetScrollBarRect GUIScrollBars_GetScrollBarRGState GUIScrollBars_GetScrollBarXYLineButton GUIScrollBars_GetScrollBarXYThumbBottom GUIScrollBars_GetScrollBarXYThumbTop GUIScrollBars_GetScrollInfo GUIScrollBars_GetScrollInfoEx GUIScrollBars_GetScrollInfoMax GUIScrollBars_GetScrollInfoMin GUIScrollBars_GetScrollInfoPage GUIScrollBars_GetScrollInfoPos GUIScrollBars_GetScrollInfoTrackPos GUIScrollBars_GetScrollPos GUIScrollBars_GetScrollRange GUIScrollBars_Init GUIScrollBars_ScrollWindow GUIScrollBars_SetScrollInfo GUIScrollBars_SetScrollInfoMax GUIScrollBars_SetScrollInfoMin GUIScrollBars_SetScrollInfoPage GUIScrollBars_SetScrollInfoPos GUIScrollBars_SetScrollRange GUIScrollBars_ShowScrollBar GUIToolTip_Activate GUIToolTip_AddTool GUIToolTip_AdjustRect GUIToolTip_BitsToTTF GUIToolTip_Create GUIToolTip_Deactivate GUIToolTip_DelTool GUIToolTip_Destroy GUIToolTip_EnumTools GUIToolTip_GetBubbleHeight GUIToolTip_GetBubbleSize GUIToolTip_GetBubbleWidth GUIToolTip_GetCurrentTool GUIToolTip_GetDelayTime GUIToolTip_GetMargin GUIToolTip_GetMarginEx GUIToolTip_GetMaxTipWidth GUIToolTip_GetText GUIToolTip_GetTipBkColor GUIToolTip_GetTipTextColor GUIToolTip_GetTitleBitMap GUIToolTip_GetTitleText GUIToolTip_GetToolCount GUIToolTip_GetToolInfo GUIToolTip_HitTest GUIToolTip_NewToolRect GUIToolTip_Pop GUIToolTip_PopUp GUIToolTip_SetDelayTime GUIToolTip_SetMargin GUIToolTip_SetMaxTipWidth GUIToolTip_SetTipBkColor GUIToolTip_SetTipTextColor GUIToolTip_SetTitle GUIToolTip_SetToolInfo GUIToolTip_SetWindowTheme GUIToolTip_ToolExists GUIToolTip_ToolToArray GUIToolTip_TrackActivate GUIToolTip_TrackPosition GUIToolTip_Update GUIToolTip_UpdateTipText HexToString IEAction IEAttach IEBodyReadHTML IEBodyReadText IEBodyWriteHTML IECreate IECreateEmbedded IEDocGetObj IEDocInsertHTML IEDocInsertText IEDocReadHTML IEDocWriteHTML IEErrorNotify IEFormElementCheckBoxSelect IEFormElementGetCollection IEFormElementGetObjByName IEFormElementGetValue IEFormElementOptionSelect IEFormElementRadioSelect IEFormElementSetValue IEFormGetCollection IEFormGetObjByName IEFormImageClick IEFormReset IEFormSubmit IEFrameGetCollection IEFrameGetObjByName IEGetObjById IEGetObjByName IEHeadInsertEventScript IEImgClick IEImgGetCollection IEIsFrameSet IELinkClickByIndex IELinkClickByText IELinkGetCollection IELoadWait IELoadWaitTimeout IENavigate IEPropertyGet IEPropertySet IEQuit IETableGetCollection IETableWriteToArray IETagNameAllGetCollection IETagNameGetCollection IE_Example IE_Introduction IE_VersionInfo INetExplorerCapable INetGetSource INetMail INetSmtpMail IsPressed MathCheckDiv Max MemGlobalAlloc MemGlobalFree MemGlobalLock MemGlobalSize MemGlobalUnlock MemMoveMemory MemVirtualAlloc MemVirtualAllocEx MemVirtualFree MemVirtualFreeEx Min MouseTrap NamedPipes_CallNamedPipe NamedPipes_ConnectNamedPipe NamedPipes_CreateNamedPipe NamedPipes_CreatePipe NamedPipes_DisconnectNamedPipe NamedPipes_GetNamedPipeHandleState NamedPipes_GetNamedPipeInfo NamedPipes_PeekNamedPipe NamedPipes_SetNamedPipeHandleState NamedPipes_TransactNamedPipe NamedPipes_WaitNamedPipe Net_Share_ConnectionEnum Net_Share_FileClose Net_Share_FileEnum Net_Share_FileGetInfo Net_Share_PermStr Net_Share_ResourceStr Net_Share_SessionDel Net_Share_SessionEnum Net_Share_SessionGetInfo Net_Share_ShareAdd Net_Share_ShareCheck Net_Share_ShareDel Net_Share_ShareEnum Net_Share_ShareGetInfo Net_Share_ShareSetInfo Net_Share_StatisticsGetSvr Net_Share_StatisticsGetWrk Now NowCalc NowCalcDate NowDate NowTime PathFull PathGetRelative PathMake PathSplit ProcessGetName ProcessGetPriority Radian ReplaceStringInFile RunDos ScreenCapture_Capture ScreenCapture_CaptureWnd ScreenCapture_SaveImage ScreenCapture_SetBMPFormat ScreenCapture_SetJPGQuality ScreenCapture_SetTIFColorDepth ScreenCapture_SetTIFCompression Security__AdjustTokenPrivileges Security__CreateProcessWithToken Security__DuplicateTokenEx Security__GetAccountSid Security__GetLengthSid Security__GetTokenInformation Security__ImpersonateSelf Security__IsValidSid Security__LookupAccountName Security__LookupAccountSid Security__LookupPrivilegeValue Security__OpenProcessToken Security__OpenThreadToken Security__OpenThreadTokenEx Security__SetPrivilege Security__SetTokenInformation Security__SidToStringSid Security__SidTypeStr Security__StringSidToSid SendMessage SendMessageA SetDate SetTime Singleton SoundClose SoundLength SoundOpen SoundPause SoundPlay SoundPos SoundResume SoundSeek SoundStatus SoundStop SQLite_Changes SQLite_Close SQLite_Display2DResult SQLite_Encode SQLite_ErrCode SQLite_ErrMsg SQLite_Escape SQLite_Exec SQLite_FastEncode SQLite_FastEscape SQLite_FetchData SQLite_FetchNames SQLite_GetTable SQLite_GetTable2d SQLite_LastInsertRowID SQLite_LibVersion SQLite_Open SQLite_Query SQLite_QueryFinalize SQLite_QueryReset SQLite_QuerySingleRow SQLite_SafeMode SQLite_SetTimeout SQLite_Shutdown SQLite_SQLiteExe SQLite_Startup SQLite_TotalChanges StringBetween StringExplode StringInsert StringProper StringRepeat StringTitleCase StringToHex TCPIpToName TempFile TicksToTime Timer_Diff Timer_GetIdleTime Timer_GetTimerID Timer_Init Timer_KillAllTimers Timer_KillTimer Timer_SetTimer TimeToTicks VersionCompare viClose viExecCommand viFindGpib viGpibBusReset viGTL viInteractiveControl viOpen viSetAttribute viSetTimeout WeekNumberISO WinAPI_AbortPath WinAPI_ActivateKeyboardLayout WinAPI_AddClipboardFormatListener WinAPI_AddFontMemResourceEx WinAPI_AddFontResourceEx WinAPI_AddIconOverlay WinAPI_AddIconTransparency WinAPI_AddMRUString WinAPI_AdjustBitmap WinAPI_AdjustTokenPrivileges WinAPI_AdjustWindowRectEx WinAPI_AlphaBlend WinAPI_AngleArc WinAPI_AnimateWindow WinAPI_Arc WinAPI_ArcTo WinAPI_ArrayToStruct WinAPI_AssignProcessToJobObject WinAPI_AssocGetPerceivedType WinAPI_AssocQueryString WinAPI_AttachConsole WinAPI_AttachThreadInput WinAPI_BackupRead WinAPI_BackupReadAbort WinAPI_BackupSeek WinAPI_BackupWrite WinAPI_BackupWriteAbort WinAPI_Beep WinAPI_BeginBufferedPaint WinAPI_BeginDeferWindowPos WinAPI_BeginPaint WinAPI_BeginPath WinAPI_BeginUpdateResource WinAPI_BitBlt WinAPI_BringWindowToTop WinAPI_BroadcastSystemMessage WinAPI_BrowseForFolderDlg WinAPI_BufferedPaintClear WinAPI_BufferedPaintInit WinAPI_BufferedPaintSetAlpha WinAPI_BufferedPaintUnInit WinAPI_CallNextHookEx WinAPI_CallWindowProc WinAPI_CallWindowProcW WinAPI_CascadeWindows WinAPI_ChangeWindowMessageFilterEx WinAPI_CharToOem WinAPI_ChildWindowFromPointEx WinAPI_ClientToScreen WinAPI_ClipCursor WinAPI_CloseDesktop WinAPI_CloseEnhMetaFile WinAPI_CloseFigure WinAPI_CloseHandle WinAPI_CloseThemeData WinAPI_CloseWindow WinAPI_CloseWindowStation WinAPI_CLSIDFromProgID WinAPI_CoInitialize WinAPI_ColorAdjustLuma WinAPI_ColorHLSToRGB WinAPI_ColorRGBToHLS WinAPI_CombineRgn WinAPI_CombineTransform WinAPI_CommandLineToArgv WinAPI_CommDlgExtendedError WinAPI_CommDlgExtendedErrorEx WinAPI_CompareString WinAPI_CompressBitmapBits WinAPI_CompressBuffer WinAPI_ComputeCrc32 WinAPI_ConfirmCredentials WinAPI_CopyBitmap WinAPI_CopyCursor WinAPI_CopyEnhMetaFile WinAPI_CopyFileEx WinAPI_CopyIcon WinAPI_CopyImage WinAPI_CopyRect WinAPI_CopyStruct WinAPI_CoTaskMemAlloc WinAPI_CoTaskMemFree WinAPI_CoTaskMemRealloc WinAPI_CoUninitialize WinAPI_Create32BitHBITMAP WinAPI_Create32BitHICON WinAPI_CreateANDBitmap WinAPI_CreateBitmap WinAPI_CreateBitmapIndirect WinAPI_CreateBrushIndirect WinAPI_CreateBuffer WinAPI_CreateBufferFromStruct WinAPI_CreateCaret WinAPI_CreateColorAdjustment WinAPI_CreateCompatibleBitmap WinAPI_CreateCompatibleBitmapEx WinAPI_CreateCompatibleDC WinAPI_CreateDesktop WinAPI_CreateDIB WinAPI_CreateDIBColorTable WinAPI_CreateDIBitmap WinAPI_CreateDIBSection WinAPI_CreateDirectory WinAPI_CreateDirectoryEx WinAPI_CreateEllipticRgn WinAPI_CreateEmptyIcon WinAPI_CreateEnhMetaFile WinAPI_CreateEvent WinAPI_CreateFile WinAPI_CreateFileEx WinAPI_CreateFileMapping WinAPI_CreateFont WinAPI_CreateFontEx WinAPI_CreateFontIndirect WinAPI_CreateGUID WinAPI_CreateHardLink WinAPI_CreateIcon WinAPI_CreateIconFromResourceEx WinAPI_CreateIconIndirect WinAPI_CreateJobObject WinAPI_CreateMargins WinAPI_CreateMRUList WinAPI_CreateMutex WinAPI_CreateNullRgn WinAPI_CreateNumberFormatInfo WinAPI_CreateObjectID WinAPI_CreatePen WinAPI_CreatePoint WinAPI_CreatePolygonRgn WinAPI_CreateProcess WinAPI_CreateProcessWithToken WinAPI_CreateRect WinAPI_CreateRectEx WinAPI_CreateRectRgn WinAPI_CreateRectRgnIndirect WinAPI_CreateRoundRectRgn WinAPI_CreateSemaphore WinAPI_CreateSize WinAPI_CreateSolidBitmap WinAPI_CreateSolidBrush WinAPI_CreateStreamOnHGlobal WinAPI_CreateString WinAPI_CreateSymbolicLink WinAPI_CreateTransform WinAPI_CreateWindowEx WinAPI_CreateWindowStation WinAPI_DecompressBuffer WinAPI_DecryptFile WinAPI_DeferWindowPos WinAPI_DefineDosDevice WinAPI_DefRawInputProc WinAPI_DefSubclassProc WinAPI_DefWindowProc WinAPI_DefWindowProcW WinAPI_DeleteDC WinAPI_DeleteEnhMetaFile WinAPI_DeleteFile WinAPI_DeleteObject WinAPI_DeleteObjectID WinAPI_DeleteVolumeMountPoint WinAPI_DeregisterShellHookWindow WinAPI_DestroyCaret WinAPI_DestroyCursor WinAPI_DestroyIcon WinAPI_DestroyWindow WinAPI_DeviceIoControl WinAPI_DisplayStruct WinAPI_DllGetVersion WinAPI_DllInstall WinAPI_DllUninstall WinAPI_DPtoLP WinAPI_DragAcceptFiles WinAPI_DragFinish WinAPI_DragQueryFileEx WinAPI_DragQueryPoint WinAPI_DrawAnimatedRects WinAPI_DrawBitmap WinAPI_DrawEdge WinAPI_DrawFocusRect WinAPI_DrawFrameControl WinAPI_DrawIcon WinAPI_DrawIconEx WinAPI_DrawLine WinAPI_DrawShadowText WinAPI_DrawText WinAPI_DrawThemeBackground WinAPI_DrawThemeEdge WinAPI_DrawThemeIcon WinAPI_DrawThemeParentBackground WinAPI_DrawThemeText WinAPI_DrawThemeTextEx WinAPI_DuplicateEncryptionInfoFile WinAPI_DuplicateHandle WinAPI_DuplicateTokenEx WinAPI_DwmDefWindowProc WinAPI_DwmEnableBlurBehindWindow WinAPI_DwmEnableComposition WinAPI_DwmExtendFrameIntoClientArea WinAPI_DwmGetColorizationColor WinAPI_DwmGetColorizationParameters WinAPI_DwmGetWindowAttribute WinAPI_DwmInvalidateIconicBitmaps WinAPI_DwmIsCompositionEnabled WinAPI_DwmQueryThumbnailSourceSize WinAPI_DwmRegisterThumbnail WinAPI_DwmSetColorizationParameters WinAPI_DwmSetIconicLivePreviewBitmap WinAPI_DwmSetIconicThumbnail WinAPI_DwmSetWindowAttribute WinAPI_DwmUnregisterThumbnail WinAPI_DwmUpdateThumbnailProperties WinAPI_DWordToFloat WinAPI_DWordToInt WinAPI_EjectMedia WinAPI_Ellipse WinAPI_EmptyWorkingSet WinAPI_EnableWindow WinAPI_EncryptFile WinAPI_EncryptionDisable WinAPI_EndBufferedPaint WinAPI_EndDeferWindowPos WinAPI_EndPaint WinAPI_EndPath WinAPI_EndUpdateResource WinAPI_EnumChildProcess WinAPI_EnumChildWindows WinAPI_EnumDesktops WinAPI_EnumDesktopWindows WinAPI_EnumDeviceDrivers WinAPI_EnumDisplayDevices WinAPI_EnumDisplayMonitors WinAPI_EnumDisplaySettings WinAPI_EnumDllProc WinAPI_EnumFiles WinAPI_EnumFileStreams WinAPI_EnumFontFamilies WinAPI_EnumHardLinks WinAPI_EnumMRUList WinAPI_EnumPageFiles WinAPI_EnumProcessHandles WinAPI_EnumProcessModules WinAPI_EnumProcessThreads WinAPI_EnumProcessWindows WinAPI_EnumRawInputDevices WinAPI_EnumResourceLanguages WinAPI_EnumResourceNames WinAPI_EnumResourceTypes WinAPI_EnumSystemGeoID WinAPI_EnumSystemLocales WinAPI_EnumUILanguages WinAPI_EnumWindows WinAPI_EnumWindowsPopup WinAPI_EnumWindowStations WinAPI_EnumWindowsTop WinAPI_EqualMemory WinAPI_EqualRect WinAPI_EqualRgn WinAPI_ExcludeClipRect WinAPI_ExpandEnvironmentStrings WinAPI_ExtCreatePen WinAPI_ExtCreateRegion WinAPI_ExtFloodFill WinAPI_ExtractIcon WinAPI_ExtractIconEx WinAPI_ExtSelectClipRgn WinAPI_FatalAppExit WinAPI_FatalExit WinAPI_FileEncryptionStatus WinAPI_FileExists WinAPI_FileIconInit WinAPI_FileInUse WinAPI_FillMemory WinAPI_FillPath WinAPI_FillRect WinAPI_FillRgn WinAPI_FindClose WinAPI_FindCloseChangeNotification WinAPI_FindExecutable WinAPI_FindFirstChangeNotification WinAPI_FindFirstFile WinAPI_FindFirstFileName WinAPI_FindFirstStream WinAPI_FindNextChangeNotification WinAPI_FindNextFile WinAPI_FindNextFileName WinAPI_FindNextStream WinAPI_FindResource WinAPI_FindResourceEx WinAPI_FindTextDlg WinAPI_FindWindow WinAPI_FlashWindow WinAPI_FlashWindowEx WinAPI_FlattenPath WinAPI_FloatToDWord WinAPI_FloatToInt WinAPI_FlushFileBuffers WinAPI_FlushFRBuffer WinAPI_FlushViewOfFile WinAPI_FormatDriveDlg WinAPI_FormatMessage WinAPI_FrameRect WinAPI_FrameRgn WinAPI_FreeLibrary WinAPI_FreeMemory WinAPI_FreeMRUList WinAPI_FreeResource WinAPI_GdiComment WinAPI_GetActiveWindow WinAPI_GetAllUsersProfileDirectory WinAPI_GetAncestor WinAPI_GetApplicationRestartSettings WinAPI_GetArcDirection WinAPI_GetAsyncKeyState WinAPI_GetBinaryType WinAPI_GetBitmapBits WinAPI_GetBitmapDimension WinAPI_GetBitmapDimensionEx WinAPI_GetBkColor WinAPI_GetBkMode WinAPI_GetBoundsRect WinAPI_GetBrushOrg WinAPI_GetBufferedPaintBits WinAPI_GetBufferedPaintDC WinAPI_GetBufferedPaintTargetDC WinAPI_GetBufferedPaintTargetRect WinAPI_GetBValue WinAPI_GetCaretBlinkTime WinAPI_GetCaretPos WinAPI_GetCDType WinAPI_GetClassInfoEx WinAPI_GetClassLongEx WinAPI_GetClassName WinAPI_GetClientHeight WinAPI_GetClientRect WinAPI_GetClientWidth WinAPI_GetClipboardSequenceNumber WinAPI_GetClipBox WinAPI_GetClipCursor WinAPI_GetClipRgn WinAPI_GetColorAdjustment WinAPI_GetCompressedFileSize WinAPI_GetCompression WinAPI_GetConnectedDlg WinAPI_GetCurrentDirectory WinAPI_GetCurrentHwProfile WinAPI_GetCurrentObject WinAPI_GetCurrentPosition WinAPI_GetCurrentProcess WinAPI_GetCurrentProcessExplicitAppUserModelID WinAPI_GetCurrentProcessID WinAPI_GetCurrentThemeName WinAPI_GetCurrentThread WinAPI_GetCurrentThreadId WinAPI_GetCursor WinAPI_GetCursorInfo WinAPI_GetDateFormat WinAPI_GetDC WinAPI_GetDCEx WinAPI_GetDefaultPrinter WinAPI_GetDefaultUserProfileDirectory WinAPI_GetDesktopWindow WinAPI_GetDeviceCaps WinAPI_GetDeviceDriverBaseName WinAPI_GetDeviceDriverFileName WinAPI_GetDeviceGammaRamp WinAPI_GetDIBColorTable WinAPI_GetDIBits WinAPI_GetDiskFreeSpaceEx WinAPI_GetDlgCtrlID WinAPI_GetDlgItem WinAPI_GetDllDirectory WinAPI_GetDriveBusType WinAPI_GetDriveGeometryEx WinAPI_GetDriveNumber WinAPI_GetDriveType WinAPI_GetDurationFormat WinAPI_GetEffectiveClientRect WinAPI_GetEnhMetaFile WinAPI_GetEnhMetaFileBits WinAPI_GetEnhMetaFileDescription WinAPI_GetEnhMetaFileDimension WinAPI_GetEnhMetaFileHeader WinAPI_GetErrorMessage WinAPI_GetErrorMode WinAPI_GetExitCodeProcess WinAPI_GetExtended WinAPI_GetFileAttributes WinAPI_GetFileID WinAPI_GetFileInformationByHandle WinAPI_GetFileInformationByHandleEx WinAPI_GetFilePointerEx WinAPI_GetFileSizeEx WinAPI_GetFileSizeOnDisk WinAPI_GetFileTitle WinAPI_GetFileType WinAPI_GetFileVersionInfo WinAPI_GetFinalPathNameByHandle WinAPI_GetFinalPathNameByHandleEx WinAPI_GetFocus WinAPI_GetFontMemoryResourceInfo WinAPI_GetFontName WinAPI_GetFontResourceInfo WinAPI_GetForegroundWindow WinAPI_GetFRBuffer WinAPI_GetFullPathName WinAPI_GetGeoInfo WinAPI_GetGlyphOutline WinAPI_GetGraphicsMode WinAPI_GetGuiResources WinAPI_GetGUIThreadInfo WinAPI_GetGValue WinAPI_GetHandleInformation WinAPI_GetHGlobalFromStream WinAPI_GetIconDimension WinAPI_GetIconInfo WinAPI_GetIconInfoEx WinAPI_GetIdleTime WinAPI_GetKeyboardLayout WinAPI_GetKeyboardLayoutList WinAPI_GetKeyboardState WinAPI_GetKeyboardType WinAPI_GetKeyNameText WinAPI_GetKeyState WinAPI_GetLastActivePopup WinAPI_GetLastError WinAPI_GetLastErrorMessage WinAPI_GetLayeredWindowAttributes WinAPI_GetLocaleInfo WinAPI_GetLogicalDrives WinAPI_GetMapMode WinAPI_GetMemorySize WinAPI_GetMessageExtraInfo WinAPI_GetModuleFileNameEx WinAPI_GetModuleHandle WinAPI_GetModuleHandleEx WinAPI_GetModuleInformation WinAPI_GetMonitorInfo WinAPI_GetMousePos WinAPI_GetMousePosX WinAPI_GetMousePosY WinAPI_GetMUILanguage WinAPI_GetNumberFormat WinAPI_GetObject WinAPI_GetObjectID WinAPI_GetObjectInfoByHandle WinAPI_GetObjectNameByHandle WinAPI_GetObjectType WinAPI_GetOpenFileName WinAPI_GetOutlineTextMetrics WinAPI_GetOverlappedResult WinAPI_GetParent WinAPI_GetParentProcess WinAPI_GetPerformanceInfo WinAPI_GetPEType WinAPI_GetPhysicallyInstalledSystemMemory WinAPI_GetPixel WinAPI_GetPolyFillMode WinAPI_GetPosFromRect WinAPI_GetPriorityClass WinAPI_GetProcAddress WinAPI_GetProcessAffinityMask WinAPI_GetProcessCommandLine WinAPI_GetProcessFileName WinAPI_GetProcessHandleCount WinAPI_GetProcessID WinAPI_GetProcessIoCounters WinAPI_GetProcessMemoryInfo WinAPI_GetProcessName WinAPI_GetProcessShutdownParameters WinAPI_GetProcessTimes WinAPI_GetProcessUser WinAPI_GetProcessWindowStation WinAPI_GetProcessWorkingDirectory WinAPI_GetProfilesDirectory WinAPI_GetPwrCapabilities WinAPI_GetRawInputBuffer WinAPI_GetRawInputBufferLength WinAPI_GetRawInputData WinAPI_GetRawInputDeviceInfo WinAPI_GetRegionData WinAPI_GetRegisteredRawInputDevices WinAPI_GetRegKeyNameByHandle WinAPI_GetRgnBox WinAPI_GetROP2 WinAPI_GetRValue WinAPI_GetSaveFileName WinAPI_GetShellWindow WinAPI_GetStartupInfo WinAPI_GetStdHandle WinAPI_GetStockObject WinAPI_GetStretchBltMode WinAPI_GetString WinAPI_GetSysColor WinAPI_GetSysColorBrush WinAPI_GetSystemDefaultLangID WinAPI_GetSystemDefaultLCID WinAPI_GetSystemDefaultUILanguage WinAPI_GetSystemDEPPolicy WinAPI_GetSystemInfo WinAPI_GetSystemMetrics WinAPI_GetSystemPowerStatus WinAPI_GetSystemTimes WinAPI_GetSystemWow64Directory WinAPI_GetTabbedTextExtent WinAPI_GetTempFileName WinAPI_GetTextAlign WinAPI_GetTextCharacterExtra WinAPI_GetTextColor WinAPI_GetTextExtentPoint32 WinAPI_GetTextFace WinAPI_GetTextMetrics WinAPI_GetThemeAppProperties WinAPI_GetThemeBackgroundContentRect WinAPI_GetThemeBackgroundExtent WinAPI_GetThemeBackgroundRegion WinAPI_GetThemeBitmap WinAPI_GetThemeBool WinAPI_GetThemeColor WinAPI_GetThemeDocumentationProperty WinAPI_GetThemeEnumValue WinAPI_GetThemeFilename WinAPI_GetThemeFont WinAPI_GetThemeInt WinAPI_GetThemeMargins WinAPI_GetThemeMetric WinAPI_GetThemePartSize WinAPI_GetThemePosition WinAPI_GetThemePropertyOrigin WinAPI_GetThemeRect WinAPI_GetThemeString WinAPI_GetThemeSysBool WinAPI_GetThemeSysColor WinAPI_GetThemeSysColorBrush WinAPI_GetThemeSysFont WinAPI_GetThemeSysInt WinAPI_GetThemeSysSize WinAPI_GetThemeSysString WinAPI_GetThemeTextExtent WinAPI_GetThemeTextMetrics WinAPI_GetThemeTransitionDuration WinAPI_GetThreadDesktop WinAPI_GetThreadErrorMode WinAPI_GetThreadLocale WinAPI_GetThreadUILanguage WinAPI_GetTickCount WinAPI_GetTickCount64 WinAPI_GetTimeFormat WinAPI_GetTopWindow WinAPI_GetUDFColorMode WinAPI_GetUpdateRect WinAPI_GetUpdateRgn WinAPI_GetUserDefaultLangID WinAPI_GetUserDefaultLCID WinAPI_GetUserDefaultUILanguage WinAPI_GetUserGeoID WinAPI_GetUserObjectInformation WinAPI_GetVersion WinAPI_GetVersionEx WinAPI_GetVolumeInformation WinAPI_GetVolumeInformationByHandle WinAPI_GetVolumeNameForVolumeMountPoint WinAPI_GetWindow WinAPI_GetWindowDC WinAPI_GetWindowDisplayAffinity WinAPI_GetWindowExt WinAPI_GetWindowFileName WinAPI_GetWindowHeight WinAPI_GetWindowInfo WinAPI_GetWindowLong WinAPI_GetWindowOrg WinAPI_GetWindowPlacement WinAPI_GetWindowRect WinAPI_GetWindowRgn WinAPI_GetWindowRgnBox WinAPI_GetWindowSubclass WinAPI_GetWindowText WinAPI_GetWindowTheme WinAPI_GetWindowThreadProcessId WinAPI_GetWindowWidth WinAPI_GetWorkArea WinAPI_GetWorldTransform WinAPI_GetXYFromPoint WinAPI_GlobalMemoryStatus WinAPI_GradientFill WinAPI_GUIDFromString WinAPI_GUIDFromStringEx WinAPI_HashData WinAPI_HashString WinAPI_HiByte WinAPI_HideCaret WinAPI_HiDWord WinAPI_HiWord WinAPI_InflateRect WinAPI_InitMUILanguage WinAPI_InProcess WinAPI_IntersectClipRect WinAPI_IntersectRect WinAPI_IntToDWord WinAPI_IntToFloat WinAPI_InvalidateRect WinAPI_InvalidateRgn WinAPI_InvertANDBitmap WinAPI_InvertColor WinAPI_InvertRect WinAPI_InvertRgn WinAPI_IOCTL WinAPI_IsAlphaBitmap WinAPI_IsBadCodePtr WinAPI_IsBadReadPtr WinAPI_IsBadStringPtr WinAPI_IsBadWritePtr WinAPI_IsChild WinAPI_IsClassName WinAPI_IsDoorOpen WinAPI_IsElevated WinAPI_IsHungAppWindow WinAPI_IsIconic WinAPI_IsInternetConnected WinAPI_IsLoadKBLayout WinAPI_IsMemory WinAPI_IsNameInExpression WinAPI_IsNetworkAlive WinAPI_IsPathShared WinAPI_IsProcessInJob WinAPI_IsProcessorFeaturePresent WinAPI_IsRectEmpty WinAPI_IsThemeActive WinAPI_IsThemeBackgroundPartiallyTransparent WinAPI_IsThemePartDefined WinAPI_IsValidLocale WinAPI_IsWindow WinAPI_IsWindowEnabled WinAPI_IsWindowUnicode WinAPI_IsWindowVisible WinAPI_IsWow64Process WinAPI_IsWritable WinAPI_IsZoomed WinAPI_Keybd_Event WinAPI_KillTimer WinAPI_LineDDA WinAPI_LineTo WinAPI_LoadBitmap WinAPI_LoadCursor WinAPI_LoadCursorFromFile WinAPI_LoadIcon WinAPI_LoadIconMetric WinAPI_LoadIconWithScaleDown WinAPI_LoadImage WinAPI_LoadIndirectString WinAPI_LoadKeyboardLayout WinAPI_LoadLibrary WinAPI_LoadLibraryEx WinAPI_LoadMedia WinAPI_LoadResource WinAPI_LoadShell32Icon WinAPI_LoadString WinAPI_LoadStringEx WinAPI_LoByte WinAPI_LocalFree WinAPI_LockDevice WinAPI_LockFile WinAPI_LockResource WinAPI_LockWindowUpdate WinAPI_LockWorkStation WinAPI_LoDWord WinAPI_LongMid WinAPI_LookupIconIdFromDirectoryEx WinAPI_LoWord WinAPI_LPtoDP WinAPI_MAKELANGID WinAPI_MAKELCID WinAPI_MakeLong WinAPI_MakeQWord WinAPI_MakeWord WinAPI_MapViewOfFile WinAPI_MapVirtualKey WinAPI_MaskBlt WinAPI_MessageBeep WinAPI_MessageBoxCheck WinAPI_MessageBoxIndirect WinAPI_MirrorIcon WinAPI_ModifyWorldTransform WinAPI_MonitorFromPoint WinAPI_MonitorFromRect WinAPI_MonitorFromWindow WinAPI_Mouse_Event WinAPI_MoveFileEx WinAPI_MoveMemory WinAPI_MoveTo WinAPI_MoveToEx WinAPI_MoveWindow WinAPI_MsgBox WinAPI_MulDiv WinAPI_MultiByteToWideChar WinAPI_MultiByteToWideCharEx WinAPI_NtStatusToDosError WinAPI_OemToChar WinAPI_OffsetClipRgn WinAPI_OffsetPoints WinAPI_OffsetRect WinAPI_OffsetRgn WinAPI_OffsetWindowOrg WinAPI_OpenDesktop WinAPI_OpenFileById WinAPI_OpenFileDlg WinAPI_OpenFileMapping WinAPI_OpenIcon WinAPI_OpenInputDesktop WinAPI_OpenJobObject WinAPI_OpenMutex WinAPI_OpenProcess WinAPI_OpenProcessToken WinAPI_OpenSemaphore WinAPI_OpenThemeData WinAPI_OpenWindowStation WinAPI_PageSetupDlg WinAPI_PaintDesktop WinAPI_PaintRgn WinAPI_ParseURL WinAPI_ParseUserName WinAPI_PatBlt WinAPI_PathAddBackslash WinAPI_PathAddExtension WinAPI_PathAppend WinAPI_PathBuildRoot WinAPI_PathCanonicalize WinAPI_PathCommonPrefix WinAPI_PathCompactPath WinAPI_PathCompactPathEx WinAPI_PathCreateFromUrl WinAPI_PathFindExtension WinAPI_PathFindFileName WinAPI_PathFindNextComponent WinAPI_PathFindOnPath WinAPI_PathGetArgs WinAPI_PathGetCharType WinAPI_PathGetDriveNumber WinAPI_PathIsContentType WinAPI_PathIsDirectory WinAPI_PathIsDirectoryEmpty WinAPI_PathIsExe WinAPI_PathIsFileSpec WinAPI_PathIsLFNFileSpec WinAPI_PathIsRelative WinAPI_PathIsRoot WinAPI_PathIsSameRoot WinAPI_PathIsSystemFolder WinAPI_PathIsUNC WinAPI_PathIsUNCServer WinAPI_PathIsUNCServerShare WinAPI_PathMakeSystemFolder WinAPI_PathMatchSpec WinAPI_PathParseIconLocation WinAPI_PathRelativePathTo WinAPI_PathRemoveArgs WinAPI_PathRemoveBackslash WinAPI_PathRemoveExtension WinAPI_PathRemoveFileSpec WinAPI_PathRenameExtension WinAPI_PathSearchAndQualify WinAPI_PathSkipRoot WinAPI_PathStripPath WinAPI_PathStripToRoot WinAPI_PathToRegion WinAPI_PathUndecorate WinAPI_PathUnExpandEnvStrings WinAPI_PathUnmakeSystemFolder WinAPI_PathUnquoteSpaces WinAPI_PathYetAnotherMakeUniqueName WinAPI_PickIconDlg WinAPI_PlayEnhMetaFile WinAPI_PlaySound WinAPI_PlgBlt WinAPI_PointFromRect WinAPI_PolyBezier WinAPI_PolyBezierTo WinAPI_PolyDraw WinAPI_Polygon WinAPI_PostMessage WinAPI_PrimaryLangId WinAPI_PrintDlg WinAPI_PrintDlgEx WinAPI_PrintWindow WinAPI_ProgIDFromCLSID WinAPI_PtInRect WinAPI_PtInRectEx WinAPI_PtInRegion WinAPI_PtVisible WinAPI_QueryDosDevice WinAPI_QueryInformationJobObject WinAPI_QueryPerformanceCounter WinAPI_QueryPerformanceFrequency WinAPI_RadialGradientFill WinAPI_ReadDirectoryChanges WinAPI_ReadFile WinAPI_ReadProcessMemory WinAPI_Rectangle WinAPI_RectInRegion WinAPI_RectIsEmpty WinAPI_RectVisible WinAPI_RedrawWindow WinAPI_RegCloseKey WinAPI_RegConnectRegistry WinAPI_RegCopyTree WinAPI_RegCopyTreeEx WinAPI_RegCreateKey WinAPI_RegDeleteEmptyKey WinAPI_RegDeleteKey WinAPI_RegDeleteKeyValue WinAPI_RegDeleteTree WinAPI_RegDeleteTreeEx WinAPI_RegDeleteValue WinAPI_RegDisableReflectionKey WinAPI_RegDuplicateHKey WinAPI_RegEnableReflectionKey WinAPI_RegEnumKey WinAPI_RegEnumValue WinAPI_RegFlushKey WinAPI_RegisterApplicationRestart WinAPI_RegisterClass WinAPI_RegisterClassEx WinAPI_RegisterHotKey WinAPI_RegisterPowerSettingNotification WinAPI_RegisterRawInputDevices WinAPI_RegisterShellHookWindow WinAPI_RegisterWindowMessage WinAPI_RegLoadMUIString WinAPI_RegNotifyChangeKeyValue WinAPI_RegOpenKey WinAPI_RegQueryInfoKey WinAPI_RegQueryLastWriteTime WinAPI_RegQueryMultipleValues WinAPI_RegQueryReflectionKey WinAPI_RegQueryValue WinAPI_RegRestoreKey WinAPI_RegSaveKey WinAPI_RegSetValue WinAPI_ReleaseCapture WinAPI_ReleaseDC WinAPI_ReleaseMutex WinAPI_ReleaseSemaphore WinAPI_ReleaseStream WinAPI_RemoveClipboardFormatListener WinAPI_RemoveDirectory WinAPI_RemoveFontMemResourceEx WinAPI_RemoveFontResourceEx WinAPI_RemoveWindowSubclass WinAPI_ReOpenFile WinAPI_ReplaceFile WinAPI_ReplaceTextDlg WinAPI_ResetEvent WinAPI_RestartDlg WinAPI_RestoreDC WinAPI_RGB WinAPI_RotatePoints WinAPI_RoundRect WinAPI_SaveDC WinAPI_SaveFileDlg WinAPI_SaveHBITMAPToFile WinAPI_SaveHICONToFile WinAPI_ScaleWindowExt WinAPI_ScreenToClient WinAPI_SearchPath WinAPI_SelectClipPath WinAPI_SelectClipRgn WinAPI_SelectObject WinAPI_SendMessageTimeout WinAPI_SetActiveWindow WinAPI_SetArcDirection WinAPI_SetBitmapBits WinAPI_SetBitmapDimensionEx WinAPI_SetBkColor WinAPI_SetBkMode WinAPI_SetBoundsRect WinAPI_SetBrushOrg WinAPI_SetCapture WinAPI_SetCaretBlinkTime WinAPI_SetCaretPos WinAPI_SetClassLongEx WinAPI_SetColorAdjustment WinAPI_SetCompression WinAPI_SetCurrentDirectory WinAPI_SetCurrentProcessExplicitAppUserModelID WinAPI_SetCursor WinAPI_SetDCBrushColor WinAPI_SetDCPenColor WinAPI_SetDefaultPrinter WinAPI_SetDeviceGammaRamp WinAPI_SetDIBColorTable WinAPI_SetDIBits WinAPI_SetDIBitsToDevice WinAPI_SetDllDirectory WinAPI_SetEndOfFile WinAPI_SetEnhMetaFileBits WinAPI_SetErrorMode WinAPI_SetEvent WinAPI_SetFileAttributes WinAPI_SetFileInformationByHandleEx WinAPI_SetFilePointer WinAPI_SetFilePointerEx WinAPI_SetFileShortName WinAPI_SetFileValidData WinAPI_SetFocus WinAPI_SetFont WinAPI_SetForegroundWindow WinAPI_SetFRBuffer WinAPI_SetGraphicsMode WinAPI_SetHandleInformation WinAPI_SetInformationJobObject WinAPI_SetKeyboardLayout WinAPI_SetKeyboardState WinAPI_SetLastError WinAPI_SetLayeredWindowAttributes WinAPI_SetLocaleInfo WinAPI_SetMapMode WinAPI_SetMessageExtraInfo WinAPI_SetParent WinAPI_SetPixel WinAPI_SetPolyFillMode WinAPI_SetPriorityClass WinAPI_SetProcessAffinityMask WinAPI_SetProcessShutdownParameters WinAPI_SetProcessWindowStation WinAPI_SetRectRgn WinAPI_SetROP2 WinAPI_SetSearchPathMode WinAPI_SetStretchBltMode WinAPI_SetSysColors WinAPI_SetSystemCursor WinAPI_SetTextAlign WinAPI_SetTextCharacterExtra WinAPI_SetTextColor WinAPI_SetTextJustification WinAPI_SetThemeAppProperties WinAPI_SetThreadDesktop WinAPI_SetThreadErrorMode WinAPI_SetThreadExecutionState WinAPI_SetThreadLocale WinAPI_SetThreadUILanguage WinAPI_SetTimer WinAPI_SetUDFColorMode WinAPI_SetUserGeoID WinAPI_SetUserObjectInformation WinAPI_SetVolumeMountPoint WinAPI_SetWindowDisplayAffinity WinAPI_SetWindowExt WinAPI_SetWindowLong WinAPI_SetWindowOrg WinAPI_SetWindowPlacement WinAPI_SetWindowPos WinAPI_SetWindowRgn WinAPI_SetWindowsHookEx WinAPI_SetWindowSubclass WinAPI_SetWindowText WinAPI_SetWindowTheme WinAPI_SetWinEventHook WinAPI_SetWorldTransform WinAPI_SfcIsFileProtected WinAPI_SfcIsKeyProtected WinAPI_ShellAboutDlg WinAPI_ShellAddToRecentDocs WinAPI_ShellChangeNotify WinAPI_ShellChangeNotifyDeregister WinAPI_ShellChangeNotifyRegister WinAPI_ShellCreateDirectory WinAPI_ShellEmptyRecycleBin WinAPI_ShellExecute WinAPI_ShellExecuteEx WinAPI_ShellExtractAssociatedIcon WinAPI_ShellExtractIcon WinAPI_ShellFileOperation WinAPI_ShellFlushSFCache WinAPI_ShellGetFileInfo WinAPI_ShellGetIconOverlayIndex WinAPI_ShellGetImageList WinAPI_ShellGetKnownFolderIDList WinAPI_ShellGetKnownFolderPath WinAPI_ShellGetLocalizedName WinAPI_ShellGetPathFromIDList WinAPI_ShellGetSetFolderCustomSettings WinAPI_ShellGetSettings WinAPI_ShellGetSpecialFolderLocation WinAPI_ShellGetSpecialFolderPath WinAPI_ShellGetStockIconInfo WinAPI_ShellILCreateFromPath WinAPI_ShellNotifyIcon WinAPI_ShellNotifyIconGetRect WinAPI_ShellObjectProperties WinAPI_ShellOpenFolderAndSelectItems WinAPI_ShellOpenWithDlg WinAPI_ShellQueryRecycleBin WinAPI_ShellQueryUserNotificationState WinAPI_ShellRemoveLocalizedName WinAPI_ShellRestricted WinAPI_ShellSetKnownFolderPath WinAPI_ShellSetLocalizedName WinAPI_ShellSetSettings WinAPI_ShellStartNetConnectionDlg WinAPI_ShellUpdateImage WinAPI_ShellUserAuthenticationDlg WinAPI_ShellUserAuthenticationDlgEx WinAPI_ShortToWord WinAPI_ShowCaret WinAPI_ShowCursor WinAPI_ShowError WinAPI_ShowLastError WinAPI_ShowMsg WinAPI_ShowOwnedPopups WinAPI_ShowWindow WinAPI_ShutdownBlockReasonCreate WinAPI_ShutdownBlockReasonDestroy WinAPI_ShutdownBlockReasonQuery WinAPI_SizeOfResource WinAPI_StretchBlt WinAPI_StretchDIBits WinAPI_StrFormatByteSize WinAPI_StrFormatByteSizeEx WinAPI_StrFormatKBSize WinAPI_StrFromTimeInterval WinAPI_StringFromGUID WinAPI_StringLenA WinAPI_StringLenW WinAPI_StrLen WinAPI_StrokeAndFillPath WinAPI_StrokePath WinAPI_StructToArray WinAPI_SubLangId WinAPI_SubtractRect WinAPI_SwapDWord WinAPI_SwapQWord WinAPI_SwapWord WinAPI_SwitchColor WinAPI_SwitchDesktop WinAPI_SwitchToThisWindow WinAPI_SystemParametersInfo WinAPI_TabbedTextOut WinAPI_TerminateJobObject WinAPI_TerminateProcess WinAPI_TextOut WinAPI_TileWindows WinAPI_TrackMouseEvent WinAPI_TransparentBlt WinAPI_TwipsPerPixelX WinAPI_TwipsPerPixelY WinAPI_UnhookWindowsHookEx WinAPI_UnhookWinEvent WinAPI_UnionRect WinAPI_UnionStruct WinAPI_UniqueHardwareID WinAPI_UnloadKeyboardLayout WinAPI_UnlockFile WinAPI_UnmapViewOfFile WinAPI_UnregisterApplicationRestart WinAPI_UnregisterClass WinAPI_UnregisterHotKey WinAPI_UnregisterPowerSettingNotification WinAPI_UpdateLayeredWindow WinAPI_UpdateLayeredWindowEx WinAPI_UpdateLayeredWindowIndirect WinAPI_UpdateResource WinAPI_UpdateWindow WinAPI_UrlApplyScheme WinAPI_UrlCanonicalize WinAPI_UrlCombine WinAPI_UrlCompare WinAPI_UrlCreateFromPath WinAPI_UrlFixup WinAPI_UrlGetPart WinAPI_UrlHash WinAPI_UrlIs WinAPI_UserHandleGrantAccess WinAPI_ValidateRect WinAPI_ValidateRgn WinAPI_VerQueryRoot WinAPI_VerQueryValue WinAPI_VerQueryValueEx WinAPI_WaitForInputIdle WinAPI_WaitForMultipleObjects WinAPI_WaitForSingleObject WinAPI_WideCharToMultiByte WinAPI_WidenPath WinAPI_WindowFromDC WinAPI_WindowFromPoint WinAPI_WordToShort WinAPI_Wow64EnableWow64FsRedirection WinAPI_WriteConsole WinAPI_WriteFile WinAPI_WriteProcessMemory WinAPI_ZeroMemory WinNet_AddConnection WinNet_AddConnection2 WinNet_AddConnection3 WinNet_CancelConnection WinNet_CancelConnection2 WinNet_CloseEnum WinNet_ConnectionDialog WinNet_ConnectionDialog1 WinNet_DisconnectDialog WinNet_DisconnectDialog1 WinNet_EnumResource WinNet_GetConnection WinNet_GetConnectionPerformance WinNet_GetLastError WinNet_GetNetworkInformation WinNet_GetProviderName WinNet_GetResourceInformation WinNet_GetResourceParent WinNet_GetUniversalName WinNet_GetUser WinNet_OpenEnum WinNet_RestoreConnection WinNet_UseConnection Word_Create Word_DocAdd Word_DocAttach Word_DocClose Word_DocExport Word_DocFind Word_DocFindReplace Word_DocGet Word_DocLinkAdd Word_DocLinkGet Word_DocOpen Word_DocPictureAdd Word_DocPrint Word_DocRangeSet Word_DocSave Word_DocSaveAs Word_DocTableRead Word_DocTableWrite Word_Quit",literal:"True False And Null Not Or"},contains:[t,n,r,i,{className:"preprocessor",begin:"#",end:"$",keywords:"include include-once NoTrayIcon OnAutoItStartRegister RequireAdmin pragma Au3Stripper_Ignore_Funcs Au3Stripper_Ignore_Variables Au3Stripper_Off Au3Stripper_On Au3Stripper_Parameters AutoIt3Wrapper_Add_Constants AutoIt3Wrapper_Au3Check_Parameters AutoIt3Wrapper_Au3Check_Stop_OnWarning AutoIt3Wrapper_Aut2Exe AutoIt3Wrapper_AutoIt3 AutoIt3Wrapper_AutoIt3Dir AutoIt3Wrapper_Change2CUI AutoIt3Wrapper_Compile_Both AutoIt3Wrapper_Compression AutoIt3Wrapper_EndIf AutoIt3Wrapper_Icon AutoIt3Wrapper_If_Compile AutoIt3Wrapper_If_Run AutoIt3Wrapper_Jump_To_First_Error AutoIt3Wrapper_OutFile AutoIt3Wrapper_OutFile_Type AutoIt3Wrapper_OutFile_X64 AutoIt3Wrapper_PlugIn_Funcs AutoIt3Wrapper_Res_Comment Autoit3Wrapper_Res_Compatibility AutoIt3Wrapper_Res_Description AutoIt3Wrapper_Res_Field AutoIt3Wrapper_Res_File_Add AutoIt3Wrapper_Res_FileVersion AutoIt3Wrapper_Res_FileVersion_AutoIncrement AutoIt3Wrapper_Res_Icon_Add AutoIt3Wrapper_Res_Language AutoIt3Wrapper_Res_LegalCopyright AutoIt3Wrapper_Res_ProductVersion AutoIt3Wrapper_Res_requestedExecutionLevel AutoIt3Wrapper_Res_SaveSource AutoIt3Wrapper_Run_After AutoIt3Wrapper_Run_Au3Check AutoIt3Wrapper_Run_Au3Stripper AutoIt3Wrapper_Run_Before AutoIt3Wrapper_Run_Debug_Mode AutoIt3Wrapper_Run_SciTE_Minimized AutoIt3Wrapper_Run_SciTE_OutputPane_Minimized AutoIt3Wrapper_Run_Tidy AutoIt3Wrapper_ShowProgress AutoIt3Wrapper_Testing AutoIt3Wrapper_Tidy_Stop_OnError AutoIt3Wrapper_UPX_Parameters AutoIt3Wrapper_UseUPX AutoIt3Wrapper_UseX64 AutoIt3Wrapper_Version AutoIt3Wrapper_Versioning AutoIt3Wrapper_Versioning_Parameters Tidy_Off Tidy_On Tidy_Parameters EndRegion Region",contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",contains:[r,{className:"string",variants:[{begin:"<",end:">"},{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]}]},r,t]},{className:"constant",begin:"@[A-z0-9_]+"},{className:"function",beginKeywords:"Func",end:"$",excludeEnd:!0,illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[n,r,i]}]}]}}),i.registerLanguage("avrasm",function(e){return{case_insensitive:!0,lexemes:"\\.?"+e.IDENT_RE,keywords:{keyword:"adc add adiw and andi asr bclr bld brbc brbs brcc brcs break breq brge brhc brhs brid brie brlo brlt brmi brne brpl brsh brtc brts brvc brvs bset bst call cbi cbr clc clh cli cln clr cls clt clv clz com cp cpc cpi cpse dec eicall eijmp elpm eor fmul fmuls fmulsu icall ijmp in inc jmp ld ldd ldi lds lpm lsl lsr mov movw mul muls mulsu neg nop or ori out pop push rcall ret reti rjmp rol ror sbc sbr sbrc sbrs sec seh sbi sbci sbic sbis sbiw sei sen ser ses set sev sez sleep spm st std sts sub subi swap tst wdr",built_in:"r0 r1 r2 r3 r4 r5 r6 r7 r8 r9 r10 r11 r12 r13 r14 r15 r16 r17 r18 r19 r20 r21 r22 r23 r24 r25 r26 r27 r28 r29 r30 r31 x|0 xh xl y|0 yh yl z|0 zh zl ucsr1c udr1 ucsr1a ucsr1b ubrr1l ubrr1h ucsr0c ubrr0h tccr3c tccr3a tccr3b tcnt3h tcnt3l ocr3ah ocr3al ocr3bh ocr3bl ocr3ch ocr3cl icr3h icr3l etimsk etifr tccr1c ocr1ch ocr1cl twcr twdr twar twsr twbr osccal xmcra xmcrb eicra spmcsr spmcr portg ddrg ping portf ddrf sreg sph spl xdiv rampz eicrb eimsk gimsk gicr eifr gifr timsk tifr mcucr mcucsr tccr0 tcnt0 ocr0 assr tccr1a tccr1b tcnt1h tcnt1l ocr1ah ocr1al ocr1bh ocr1bl icr1h icr1l tccr2 tcnt2 ocr2 ocdr wdtcr sfior eearh eearl eedr eecr porta ddra pina portb ddrb pinb portc ddrc pinc portd ddrd pind spdr spsr spcr udr0 ucsr0a ucsr0b ubrr0l acsr admux adcsr adch adcl porte ddre pine pinf",preprocessor:".byte .cseg .db .def .device .dseg .dw .endmacro .equ .eseg .exit .include .list .listmac .macro .nolist .org .set"},contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT(";","$",{relevance:0}),e.C_NUMBER_MODE,e.BINARY_NUMBER_MODE,{className:"number",begin:"\\b(\\$[a-zA-Z0-9]+|0o[0-7]+)"},e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"},{className:"label",begin:"^[A-Za-z0-9_.$]+:"},{className:"preprocessor",begin:"#",end:"$"},{className:"localvars",begin:"@[0-9]+"}]}}),i.registerLanguage("axapta",function(e){return{keywords:"false int abstract private char boolean static null if for true while long throw finally protected final return void enum else break new catch byte super case short default double public try this switch continue reverse firstfast firstonly forupdate nofetch sum avg minof maxof count order group by asc desc index hint like dispaly edit client server ttsbegin ttscommit str real date container anytype common div mod",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$"},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:":",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]}]}}),i.registerLanguage("bash",function(e){var t={className:"variable",variants:[{begin:/\$[\w\d#@][\w\d_]*/},{begin:/\$\{(.*?)}/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t,{className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]}]};return{aliases:["sh","zsh"],lexemes:/-?[a-z\.]+/,keywords:{keyword:"if then else elif fi for while in do done case esac function",literal:"true false",built_in:"break cd continue eval exec exit export getopts hash pwd readonly return shift test times trap umask unset alias bind builtin caller command declare echo enable help let local logout mapfile printf read readarray source type typeset ulimit unalias set shopt autoload bg bindkey bye cap chdir clone comparguments compcall compctl compdescribe compfiles compgroups compquote comptags comptry compvalues dirs disable disown echotc echoti emulate fc fg float functions getcap getln history integer jobs kill limit log noglob popd print pushd pushln rehash sched setcap setopt stat suspend ttyctl unfunction unhash unlimit unsetopt vared wait whence where which zcompile zformat zftp zle zmodload zparseopts zprof zpty zregexparse zsocket zstyle ztcp",operator:"-ne -eq -lt -gt -f -d -e -s -l -a"},contains:[{className:"shebang",begin:/^#![^\n]+sh\s*$/,relevance:10},{className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},e.HASH_COMMENT_MODE,e.NUMBER_MODE,n,{className:"string",begin:/'/,end:/'/},t]}}),i.registerLanguage("brainfuck",function(e){var t={className:"literal",begin:"[\\+\\-]",relevance:0};return{aliases:["bf"],contains:[e.COMMENT("[^\\[\\]\\.,\\+\\-<> \r\n]","[\\[\\]\\.,\\+\\-<> \r\n]",{returnEnd:!0,relevance:0}),{className:"title",begin:"[\\[\\]]",relevance:0},{className:"string",begin:"[\\.,]",relevance:0},{begin:/\+\+|\-\-/,returnBegin:!0,contains:[t]},t]}}),i.registerLanguage("cal",function(e){var t="div mod in and or not xor asserterror begin case do downto else end exit for if of repeat then to until while with var",n=[e.C_LINE_COMMENT_MODE,e.COMMENT(/\{/,/\}/,{relevance:0}),e.COMMENT(/\(\*/,/\*\)/,{relevance:10})],r={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},i={className:"string",begin:/(#\d+)+/},a={className:"function",beginKeywords:"procedure",end:/[:;]/,keywords:"procedure|10",contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,contains:[r,i]}].concat(n)},o={className:"class",begin:"OBJECT (Table|Form|Report|Dataport|Codeunit|XMLport|MenuSuite|Page|Query) (\\d+) ([^\\r\\n]+)",returnBegin:!0,contains:[e.TITLE_MODE,a]};return{case_insensitive:!0,keywords:{keyword:t,literal:"false true"},illegal:/\/\*/,contains:[r,i,{className:"date",begin:"\\b\\d+(\\.\\d+)?(DT|D|T)",relevance:0},{className:"variable",begin:'"',end:'"'},e.NUMBER_MODE,o,a]}}),i.registerLanguage("capnproto",function(e){return{aliases:["capnp"],keywords:{keyword:"struct enum interface union group import using const annotation extends in of on as with from fixed",built_in:"Void Bool Int8 Int16 Int32 Int64 UInt8 UInt16 UInt32 UInt64 Float32 Float64 Text Data AnyPointer AnyStruct Capability List",literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.HASH_COMMENT_MODE,{className:"shebang",begin:/@0x[\w\d]{16};/,illegal:/\n/},{className:"number",begin:/@\d+\b/},{className:"class",beginKeywords:"struct enum",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"class",beginKeywords:"interface",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]}]}}),i.registerLanguage("ceylon",function(e){var t="assembly module package import alias class interface object given value assign void function new of extends satisfies abstracts in out return break continue throw assert dynamic if else switch case for while try catch finally then let this outer super is exists nonempty",n={className:"subst",excludeBegin:!0,excludeEnd:!0,begin:/``/,end:/``/,keywords:t,relevance:10},r=[{className:"string",begin:'"""',end:'"""',relevance:10},{className:"string",begin:'"',end:'"',contains:[n]},{className:"string",begin:"'",end:"'"},{className:"number",begin:"#[0-9a-fA-F_]+|\\$[01_]+|[0-9_]+(?:\\.[0-9_](?:[eE][+-]?\\d+)?)?[kMGTPmunpf]?",relevance:0}];return n.contains=r,{keywords:{keyword:t,annotation:"shared abstract formal default actual variable late native deprecatedfinal sealed annotation suppressWarnings small doc by license see throws tagged"},illegal:"\\$[^01]|#[^0-9a-fA-F]",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),{className:"annotation",begin:'@[a-z]\\w*(?:\\:"[^"]*")?'}].concat(r)}}),i.registerLanguage("clojure",function(e){var t="a-zA-Z_\\-!.?+*=<>&#'",n="["+t+"]["+t+"0-9/;:]*",r={begin:n,relevance:0},i={className:"number",begin:"[-+]?\\d+(\\.\\d+)?",relevance:0},a=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),o=e.COMMENT(";","$",{relevance:0}),s={className:"literal",begin:/\b(true|false|nil)\b/},c={className:"collection",begin:"[\\[\\{]",end:"[\\]\\}]"},l={className:"comment",begin:"\\^"+n},u=e.COMMENT("\\^\\{","\\}"),f={className:"attribute",begin:"[:]"+n},d={className:"list",begin:"\\(",end:"\\)"},h={endsWithParent:!0,relevance:0},p={keywords:{built_in:"def defonce cond apply if-not if-let if not not= = < > <= >= == + / * - rem quot neg? pos? delay? symbol? keyword? true? false? integer? empty? coll? list? set? ifn? fn? associative? sequential? sorted? counted? reversible? number? decimal? class? distinct? isa? float? rational? reduced? ratio? odd? even? char? seq? vector? string? map? nil? contains? zero? instance? not-every? not-any? libspec? -> ->> .. . inc compare do dotimes mapcat take remove take-while drop letfn drop-last take-last drop-while while intern condp case reduced cycle split-at split-with repeat replicate iterate range merge zipmap declare line-seq sort comparator sort-by dorun doall nthnext nthrest partition eval doseq await await-for let agent atom send send-off release-pending-sends add-watch mapv filterv remove-watch agent-error restart-agent set-error-handler error-handler set-error-mode! error-mode shutdown-agents quote var fn loop recur throw try monitor-enter monitor-exit defmacro defn defn- macroexpand macroexpand-1 for dosync and or when when-not when-let comp juxt partial sequence memoize constantly complement identity assert peek pop doto proxy defstruct first rest cons defprotocol cast coll deftype defrecord last butlast sigs reify second ffirst fnext nfirst nnext defmulti defmethod meta with-meta ns in-ns create-ns import refer keys select-keys vals key val rseq name namespace promise into transient persistent! conj! assoc! dissoc! pop! disj! use class type num float double short byte boolean bigint biginteger bigdec print-method print-dup throw-if printf format load compile get-in update-in pr pr-on newline flush read slurp read-line subvec with-open memfn time re-find re-groups rand-int rand mod locking assert-valid-fdecl alias resolve ref deref refset swap! reset! set-validator! compare-and-set! alter-meta! reset-meta! commute get-validator alter ref-set ref-history-count ref-min-history ref-max-history ensure sync io! new next conj set! to-array future future-call into-array aset gen-class reduce map filter find empty hash-map hash-set sorted-map sorted-map-by sorted-set sorted-set-by vec vector seq flatten reverse assoc dissoc list disj get union difference intersection extend extend-type extend-protocol int nth delay count concat chunk chunk-buffer chunk-append chunk-first chunk-rest max min dec unchecked-inc-int unchecked-inc unchecked-dec-inc unchecked-dec unchecked-negate unchecked-add-int unchecked-add unchecked-subtract-int unchecked-subtract chunk-next chunk-cons chunked-seq? prn vary-meta lazy-seq spread list* str find-keyword keyword symbol gensym force rationalize"},lexemes:n,className:"keyword",begin:n,starts:h},m=[d,a,l,u,o,f,c,i,s,r];return d.contains=[e.COMMENT("comment",""),p,h],h.contains=m,c.contains=m,{aliases:["clj"],illegal:/\S/,contains:[d,a,l,u,o,f,c,i,s]}}),i.registerLanguage("clojure-repl",function(e){return{contains:[{className:"prompt",begin:/^([\w.-]+|\s*#_)=>/,starts:{end:/$/,subLanguage:"clojure"}}]}}),i.registerLanguage("cmake",function(e){return{aliases:["cmake.in"],case_insensitive:!0,keywords:{keyword:"add_custom_command add_custom_target add_definitions add_dependencies add_executable add_library add_subdirectory add_test aux_source_directory break build_command cmake_minimum_required cmake_policy configure_file create_test_sourcelist define_property else elseif enable_language enable_testing endforeach endfunction endif endmacro endwhile execute_process export find_file find_library find_package find_path find_program fltk_wrap_ui foreach function get_cmake_property get_directory_property get_filename_component get_property get_source_file_property get_target_property get_test_property if include include_directories include_external_msproject include_regular_expression install link_directories load_cache load_command macro mark_as_advanced message option output_required_files project qt_wrap_cpp qt_wrap_ui remove_definitions return separate_arguments set set_directory_properties set_property set_source_files_properties set_target_properties set_tests_properties site_name source_group string target_link_libraries try_compile try_run unset variable_watch while build_name exec_program export_library_dependencies install_files install_programs install_targets link_libraries make_directory remove subdir_depends subdirs use_mangled_mesa utility_source variable_requires write_file qt5_use_modules qt5_use_package qt5_wrap_cpp on off true false and or",operator:"equal less greater strless strgreater strequal matches"},contains:[{className:"envvar",begin:"\\${",end:"}"},e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE]}}),i.registerLanguage("coffeescript",function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger super then unless until loop of by when and or is isnt not",literal:"true false null undefined yes no on off",built_in:"npm require console print module global window document"},n="[A-Za-z$_][0-9A-Za-z$_]*",r={className:"subst",begin:/#\{/,end:/}/,keywords:t},i=[e.BINARY_NUMBER_MODE,e.inherit(e.C_NUMBER_MODE,{starts:{end:"(\\s*/)?",relevance:0}}),{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,r]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,r]}]},{className:"regexp",variants:[{begin:"///",end:"///",contains:[r,e.HASH_COMMENT_MODE]},{begin:"//[gim]*",relevance:0},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{className:"property",begin:"@"+n},{begin:"`",end:"`",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];r.contains=i;var a=e.inherit(e.TITLE_MODE,{begin:n}),o="(\\(.*\\))?\\s*\\B[-=]>",s={className:"params",begin:"\\([^\\(]",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(i)}]};return{aliases:["coffee","cson","iced"],keywords:t,illegal:/\/\*/,contains:i.concat([e.COMMENT("###","###"),e.HASH_COMMENT_MODE,{className:"function",begin:"^\\s*"+n+"\\s*=\\s*"+o,end:"[-=]>",returnBegin:!0,contains:[a,s]},{begin:/[:\(,=]\s*/,relevance:0,contains:[{className:"function",begin:o,end:"[-=]>",returnBegin:!0,contains:[s]}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[a]},a]},{className:"attribute",begin:n+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}),i.registerLanguage("cpp",function(e){var t={className:"keyword",begin:"\\b[a-z\\d_]*_t\\b"},n={className:"string",variants:[e.inherit(e.QUOTE_STRING_MODE,{begin:'((u8?|U)|L)?"'}),{begin:'(u8?|U)?R"',end:'"',contains:[e.BACKSLASH_ESCAPE]},{begin:"'\\\\?.",end:"'",illegal:"."}]},r={className:"number",variants:[{begin:"\\b(\\d+(\\.\\d*)?|\\.\\d+)(u|U|l|L|ul|UL|f|F)"},{begin:e.C_NUMBER_RE}]},i={className:"preprocessor",begin:"#",end:"$",keywords:"if else elif endif define undef warning error line pragma ifdef ifndef",contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",contains:[n,{className:"string",begin:"<",end:">",illegal:"\\n"}]},n,r,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},a=e.IDENT_RE+"\\s*\\(",o={keyword:"int float while private char catch export virtual operator sizeof dynamic_cast|10 typedef const_cast|10 const struct for static_cast|10 union namespace unsigned long volatile static protected bool template mutable if public friend do goto auto void enum else break extern using class asm case typeid short reinterpret_cast|10 default double register explicit signed typename try this switch continue inline delete alignof constexpr decltype noexcept static_assert thread_local restrict _Bool complex _Complex _Imaginary atomic_bool atomic_char atomic_schar atomic_uchar atomic_short atomic_ushort atomic_int atomic_uint atomic_long atomic_ulong atomic_llong atomic_ullong",built_in:"std string cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap array shared_ptr abort abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf",literal:"true false nullptr NULL"};return{aliases:["c","cc","h","c++","h++","hpp"],keywords:o,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,n,i,{begin:"\\b(deque|list|queue|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array)\\s*<",end:">",keywords:o,contains:["self",t]},{begin:e.IDENT_RE+"::",keywords:o},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"("+e.IDENT_RE+"[\\*&\\s]+)+"+a,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:o,illegal:/[^\w\s\*&]/,contains:[{begin:a,returnBegin:!0,contains:[e.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:o,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,r]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,i]}]}}),i.registerLanguage("crmsh",function(e){var t="group clone ms master location colocation order fencing_topology rsc_ticket acl_target acl_group user role tag xml";return{aliases:["crm","pcmk"],case_insensitive:!0,keywords:{keyword:"params meta operations op rule attributes utilization",operator:"read write deny defined not_defined in_range date spec in ref reference attribute type xpath version and or lt gt tag lte gte eq ne \\",type:"number string",literal:"Master Started Slave Stopped start promote demote stop monitor true false"},contains:[e.HASH_COMMENT_MODE,{beginKeywords:"node",starts:{className:"identifier",end:"\\s*([\\w_-]+:)?",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*"}}},{beginKeywords:"primitive rsc_template",starts:{className:"title",end:"\\s*[\\$\\w_][\\w_-]*",starts:{className:"pragma",end:"\\s*@?[\\w_][\\w_\\.:-]*"}}},{begin:"\\b("+t.split(" ").join("|")+")\\s+",keywords:t,starts:{className:"title",end:"[\\$\\w_][\\w_-]*"}},{beginKeywords:"property rsc_defaults op_defaults",starts:{className:"title",end:"\\s*([\\w_-]+:)?"}},e.QUOTE_STRING_MODE,{className:"pragma",begin:"(ocf|systemd|service|lsb):[\\w_:-]+",relevance:0},{className:"number",begin:"\\b\\d+(\\.\\d+)?(ms|s|h|m)?",relevance:0},{className:"number",begin:"[-]?(infinity|inf)",relevance:0},{className:"variable",begin:/([A-Za-z\$_\#][\w_-]+)=/,relevance:0},{className:"tag",begin:"</?",end:"/?>",relevance:0}]}}),i.registerLanguage("crystal",function(e){var t="(_[uif](8|16|32|64))?",n="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\][=?]?",r={keyword:"abstract alias as asm begin break case class def do else elsif end ensure enum extend for fun if ifdef include instance_sizeof is_a? lib macro module next of out pointerof private protected rescue responds_to? return require self sizeof struct super then type typeof union unless until when while with yield __DIR__ __FILE__ __LINE__",literal:"false nil true"},i={className:"subst",begin:"#{",end:"}",keywords:r},a={className:"expansion",variants:[{begin:"\\{\\{",end:"\\}\\}"},{begin:"\\{%",end:"%\\}"}],keywords:r,relevance:10};function o(e,t){var n=[{begin:e,end:t}];return n[0].contains=n}var s={className:"string",contains:[e.BACKSLASH_ESCAPE,i],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%w?\\(",end:"\\)",contains:o("\\(","\\)")},{begin:"%w?\\[",end:"\\]",contains:o("\\[","\\]")},{begin:"%w?{",end:"}",contains:o("{","}")},{begin:"%w?<",end:">",contains:o("<",">")},{begin:"%w?/",end:"/"},{begin:"%w?%",end:"%"},{begin:"%w?-",end:"-"},{begin:"%w?\\|",end:"\\|"}],relevance:0},c={className:"annotation",begin:"@\\[",end:"\\]",relevance:5},l=[a,s,{begin:"(!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~)\\s*",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,i],variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r\\(",end:"\\)",contains:o("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:o("\\[","\\]")},{begin:"%r{",end:"}",contains:o("{","}")},{begin:"%r<",end:">",contains:o("<",">")},{begin:"%r/",end:"/"},{begin:"%r%",end:"%"},{begin:"%r-",end:"-"},{begin:"%r\\|",end:"\\|"}]}],relevance:0},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,i],variants:[{begin:"%r\\(",end:"\\)",contains:o("\\(","\\)")},{begin:"%r\\[",end:"\\]",contains:o("\\[","\\]")},{begin:"%r{",end:"}",contains:o("{","}")},{begin:"%r<",end:">",contains:o("<",">")},{begin:"%r/",end:"/"},{begin:"%r%",end:"%"},{begin:"%r-",end:"-"},{begin:"%r\\|",end:"\\|"}],relevance:0},c,e.HASH_COMMENT_MODE,{className:"class",beginKeywords:"class module struct",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{className:"inheritance",begin:"<\\s*",contains:[{className:"parent",begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}]},{className:"class",beginKeywords:"lib enum union",end:"$|;",illegal:/=/,contains:[e.HASH_COMMENT_MODE,e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"})],relevance:10},{className:"function",beginKeywords:"def",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:n,endsParent:!0})]},{className:"function",beginKeywords:"fun macro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:n,endsParent:!0})],relevance:5},{className:"constant",begin:"(::)?(\\b[A-Z]\\w*(::)?)+",relevance:0},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[s,{begin:n}],relevance:0},{className:"number",variants:[{begin:"\\b0b([01_]*[01])"+t},{begin:"\\b0o([0-7_]*[0-7])"+t},{begin:"\\b0x([A-Fa-f0-9_]*[A-Fa-f0-9])"+t},{begin:"\\b(([0-9][0-9_]*[0-9]|[0-9])(\\.[0-9_]*[0-9])?([eE][+-]?[0-9_]*[0-9])?)"+t}],relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?|%)(\\w+))"}];return i.contains=l,c.contains=l,a.contains=l.slice(1),{aliases:["cr"],lexemes:"[a-zA-Z_]\\w*[!?=]?",keywords:r,contains:l}}),i.registerLanguage("cs",function(e){var t="abstract as base bool break byte case catch char checked const continue decimal dynamic default delegate do double else enum event explicit extern false finally fixed float for foreach goto if implicit in int interface internal is lock long null when object operator out override params private protected public readonly ref sbyte sealed short sizeof stackalloc static string struct switch this true try typeof uint ulong unchecked unsafe ushort using virtual volatile void while async protected public private internal ascending descending from get group into join let orderby partial select set value var where yield",n=e.IDENT_RE+"(<"+e.IDENT_RE+">)?";return{aliases:["csharp"],keywords:t,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"xmlDocTag",variants:[{begin:"///",relevance:0},{begin:"\x3c!--|--\x3e"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"preprocessor",begin:"#",end:"$",keywords:"if else elif endif define undef warning error line region endregion pragma checksum"},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{beginKeywords:"class interface",end:/[{;=]/,illegal:/[^\s:]/,contains:[e.TITLE_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",end:/[{;=]/,illegal:/[^\s:]/,contains:[{className:"title",begin:"[a-zA-Z](\\.?\\w)*",relevance:0},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new return throw await",relevance:0},{className:"function",begin:"("+n+"\\s+)+"+e.IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:t,contains:[{begin:e.IDENT_RE+"\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE],relevance:0},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,relevance:0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}]}}),i.registerLanguage("css",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",n={className:"function",begin:t+"\\(",returnBegin:!0,excludeEnd:!0,end:"\\("},r={className:"rule",begin:/[A-Z\_\.\-]+\s*:/,returnBegin:!0,end:";",endsWithParent:!0,contains:[{className:"attribute",begin:/\S/,end:":",excludeEnd:!0,starts:{className:"value",endsWithParent:!0,excludeEnd:!0,contains:[n,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE,{className:"hexcolor",begin:"#[0-9A-Fa-f]+"},{className:"important",begin:"!important"}]}}]};return{case_insensitive:!0,illegal:/[=\/|'\$]/,contains:[e.C_BLOCK_COMMENT_MODE,{className:"id",begin:/\#[A-Za-z0-9_-]+/},{className:"class",begin:/\.[A-Za-z0-9_-]+/},{className:"attr_selector",begin:/\[/,end:/\]/,illegal:"$"},{className:"pseudo",begin:/:(:)?[a-zA-Z0-9\_\-\+\(\)"']+/},{className:"at_rule",begin:"@(font-face|page)",lexemes:"[a-z-]+",keywords:"font-face page"},{className:"at_rule",begin:"@",end:"[{;]",contains:[{className:"keyword",begin:/\S+/},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,contains:[n,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.CSS_NUMBER_MODE]}]},{className:"tag",begin:t,relevance:0},{className:"rules",begin:"{",end:"}",illegal:/\S/,contains:[e.C_BLOCK_COMMENT_MODE,r]}]}}),i.registerLanguage("d",function(e){var t="(0|[1-9][\\d_]*)",n="("+t+"|0[bB][01_]+|0[xX]([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))",r="\\\\(['\"\\?\\\\abfnrtv]|u[\\dA-Fa-f]{4}|[0-7]{1,3}|x[\\dA-Fa-f]{2}|U[\\dA-Fa-f]{8})|&[a-zA-Z\\d]{2,};",i={className:"number",begin:"\\b"+n+"(L|u|U|Lu|LU|uL|UL)?",relevance:0},a={className:"number",begin:"\\b(((0[xX](([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)\\.([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*)|\\.?([\\da-fA-F][\\da-fA-F_]*|_[\\da-fA-F][\\da-fA-F_]*))[pP][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))|((0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(\\.\\d*|([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)))|\\d+\\.(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d)|\\.(0|[1-9][\\d_]*)([eE][+-]?(0|[1-9][\\d_]*|\\d[\\d_]*|[\\d_]+?\\d))?))([fF]|L|i|[fF]i|Li)?|"+n+"(i|[fF]i|Li))",relevance:0},o={className:"string",begin:"'("+r+"|.)",end:"'",illegal:"."},s={className:"string",begin:'"',contains:[{begin:r,relevance:0}],end:'"[cwd]?'},c=e.COMMENT("\\/\\+","\\+\\/",{contains:["self"],relevance:10});return{lexemes:e.UNDERSCORE_IDENT_RE,keywords:{keyword:"abstract alias align asm assert auto body break byte case cast catch class const continue debug default delete deprecated do else enum export extern final finally for foreach foreach_reverse|10 goto if immutable import in inout int interface invariant is lazy macro mixin module new nothrow out override package pragma private protected public pure ref return scope shared static struct super switch synchronized template this throw try typedef typeid typeof union unittest version void volatile while with __FILE__ __LINE__ __gshared|10 __thread __traits __DATE__ __EOF__ __TIME__ __TIMESTAMP__ __VENDOR__ __VERSION__",built_in:"bool cdouble cent cfloat char creal dchar delegate double dstring float function idouble ifloat ireal long real short string ubyte ucent uint ulong ushort wchar wstring",literal:"false null true"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,c,{className:"string",begin:'x"[\\da-fA-F\\s\\n\\r]*"[cwd]?',relevance:10},s,{className:"string",begin:'[rq]"',end:'"[cwd]?',relevance:5},{className:"string",begin:"`",end:"`[cwd]?"},{className:"string",begin:'q"\\{',end:'\\}"'},a,i,o,{className:"shebang",begin:"^#!",end:"$",relevance:5},{className:"preprocessor",begin:"#(line)",end:"$",relevance:5},{className:"keyword",begin:"@[a-zA-Z_][a-zA-Z_\\d]*"}]}}),i.registerLanguage("markdown",function(e){return{aliases:["md","mkdown","mkd"],contains:[{className:"header",variants:[{begin:"^#{1,6}",end:"$"},{begin:"^.+?\\n[=-]{2,}$"}]},{begin:"<",end:">",subLanguage:"xml",relevance:0},{className:"bullet",begin:"^([*+-]|(\\d+\\.))\\s+"},{className:"strong",begin:"[*_]{2}.+?[*_]{2}"},{className:"emphasis",variants:[{begin:"\\*.+?\\*"},{begin:"_.+?_",relevance:0}]},{className:"blockquote",begin:"^>\\s+",end:"$"},{className:"code",variants:[{begin:"`.+?`"},{begin:"^( {4}|\t)",end:"$",relevance:0}]},{className:"horizontal_rule",begin:"^[-\\*]{3,}",end:"$"},{begin:"\\[.+?\\][\\(\\[].*?[\\)\\]]",returnBegin:!0,contains:[{className:"link_label",begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0,relevance:0},{className:"link_url",begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"link_reference",begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}],relevance:10},{begin:"^\\[.+\\]:",returnBegin:!0,contains:[{className:"link_reference",begin:"\\[",end:"\\]:",excludeBegin:!0,excludeEnd:!0,starts:{className:"link_url",end:"$"}}]}]}}),i.registerLanguage("dart",function(e){var t={className:"subst",begin:"\\$\\{",end:"}",keywords:"true false null this is new super"},n={className:"string",variants:[{begin:"r'''",end:"'''"},{begin:'r"""',end:'"""'},{begin:"r'",end:"'",illegal:"\\n"},{begin:'r"',end:'"',illegal:"\\n"},{begin:"'''",end:"'''",contains:[e.BACKSLASH_ESCAPE,t]},{begin:'"""',end:'"""',contains:[e.BACKSLASH_ESCAPE,t]},{begin:"'",end:"'",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t]},{begin:'"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,t]}]};t.contains=[e.C_NUMBER_MODE,n];return{keywords:{keyword:"assert break case catch class const continue default do else enum extends false final finally for if in is new null rethrow return super switch this throw true try var void while with",literal:"abstract as dynamic export external factory get implements import library operator part set static typedef",built_in:"print Comparable DateTime Duration Function Iterable Iterator List Map Match Null Object Pattern RegExp Set Stopwatch String StringBuffer StringSink Symbol Type Uri bool double int num document window querySelector querySelectorAll Element ElementList"},contains:[n,e.COMMENT("/\\*\\*","\\*/",{subLanguage:"markdown"}),e.COMMENT("///","$",{subLanguage:"markdown"}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},e.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"},{begin:"=>"}]}}),i.registerLanguage("delphi",function(e){var t="exports register file shl array record property for mod while set ally label uses raise not stored class safecall var interface or private static exit index inherited to else stdcall override shr asm far resourcestring finalization packed virtual out and protected library do xorwrite goto near function end div overload object unit begin string on inline repeat until destructor write message program with read initialization except default nil if case cdecl in downto threadvar of try pascal const external constructor type public then implementation finally published procedure",n=[e.C_LINE_COMMENT_MODE,e.COMMENT(/\{/,/\}/,{relevance:0}),e.COMMENT(/\(\*/,/\*\)/,{relevance:10})],r={className:"string",begin:/'/,end:/'/,contains:[{begin:/''/}]},i={className:"string",begin:/(#\d+)+/},a={begin:e.IDENT_RE+"\\s*=\\s*class\\s*\\(",returnBegin:!0,contains:[e.TITLE_MODE]},o={className:"function",beginKeywords:"function constructor destructor procedure",end:/[:;]/,keywords:"function constructor|10 destructor|10 procedure|10",contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,keywords:t,contains:[r,i]}].concat(n)};return{case_insensitive:!0,keywords:t,illegal:/"|\$[G-Zg-z]|\/\*|<\/|\|/,contains:[r,i,e.NUMBER_MODE,a,o].concat(n)}}),i.registerLanguage("diff",function(e){return{aliases:["patch"],contains:[{className:"chunk",relevance:10,variants:[{begin:/^@@ +\-\d+,\d+ +\+\d+,\d+ +@@$/},{begin:/^\*\*\* +\d+,\d+ +\*\*\*\*$/},{begin:/^\-\-\- +\d+,\d+ +\-\-\-\-$/}]},{className:"header",variants:[{begin:/Index: /,end:/$/},{begin:/=====/,end:/=====$/},{begin:/^\-\-\-/,end:/$/},{begin:/^\*{3} /,end:/$/},{begin:/^\+\+\+/,end:/$/},{begin:/\*{5}/,end:/\*{5}$/}]},{className:"addition",begin:"^\\+",end:"$"},{className:"deletion",begin:"^\\-",end:"$"},{className:"change",begin:"^\\!",end:"$"}]}}),i.registerLanguage("django",function(e){var t={className:"filter",begin:/\|[A-Za-z]+:?/,keywords:"truncatewords removetags linebreaksbr yesno get_digit timesince random striptags filesizeformat escape linebreaks length_is ljust rjust cut urlize fix_ampersands title floatformat capfirst pprint divisibleby add make_list unordered_list urlencode timeuntil urlizetrunc wordcount stringformat linenumbers slice date dictsort dictsortreversed default_if_none pluralize lower join center default truncatewords_html upper length phone2numeric wordwrap time addslashes slugify first escapejs force_escape iriencode last safe safeseq truncatechars localize unlocalize localtime utc timezone",contains:[{className:"argument",begin:/"/,end:/"/},{className:"argument",begin:/'/,end:/'/}]};return{aliases:["jinja"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{%\s*comment\s*%}/,/\{%\s*endcomment\s*%}/),e.COMMENT(/\{#/,/#}/),{className:"template_tag",begin:/\{%/,end:/%}/,keywords:"comment endcomment load templatetag ifchanged endifchanged if endif firstof for endfor in ifnotequal endifnotequal widthratio extends include spaceless endspaceless regroup by as ifequal endifequal ssi now with cycle url filter endfilter debug block endblock else autoescape endautoescape csrf_token empty elif endwith static trans blocktrans endblocktrans get_static_prefix get_media_prefix plural get_current_language language get_available_languages get_current_language_bidi get_language_info get_language_info_list localize endlocalize localtime endlocaltime timezone endtimezone get_current_timezone verbatim",contains:[t]},{className:"variable",begin:/\{\{/,end:/}}/,contains:[t]}]}}),i.registerLanguage("dns",function(e){return{aliases:["bind","zone"],keywords:{keyword:"IN A AAAA AFSDB APL CAA CDNSKEY CDS CERT CNAME DHCID DLV DNAME DNSKEY DS HIP IPSECKEY KEY KX LOC MX NAPTR NS NSEC NSEC3 NSEC3PARAM PTR RRSIG RP SIG SOA SRV SSHFP TA TKEY TLSA TSIG TXT"},contains:[e.COMMENT(";","$"),{className:"operator",beginKeywords:"$TTL $GENERATE $INCLUDE $ORIGIN"},{className:"number",begin:"((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)(\\.(25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]?\\d)){3}))|:)))"},{className:"number",begin:"((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]).){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])"}]}}),i.registerLanguage("dockerfile",function(e){return{aliases:["docker"],case_insensitive:!0,keywords:{built_ins:"from maintainer cmd expose add copy entrypoint volume user workdir onbuild run env label"},contains:[e.HASH_COMMENT_MODE,{keywords:{built_in:"run cmd entrypoint volume add copy workdir onbuild label"},begin:/^ *(onbuild +)?(run|cmd|entrypoint|volume|add|copy|workdir|label) +/,starts:{end:/[^\\]\n/,subLanguage:"bash"}},{keywords:{built_in:"from maintainer expose env user onbuild"},begin:/^ *(onbuild +)?(from|maintainer|expose|env|user|onbuild) +/,end:/[^\\]\n/,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.HASH_COMMENT_MODE]}]}}),i.registerLanguage("dos",function(e){var t=e.COMMENT(/@?rem\b/,/$/,{relevance:10});return{aliases:["bat","cmd"],case_insensitive:!0,illegal:/\/\*/,keywords:{flow:"if else goto for in do call exit not exist errorlevel defined",operator:"equ neq lss leq gtr geq",keyword:"shift cd dir echo setlocal endlocal set pause copy",stream:"prn nul lpt3 lpt2 lpt1 con com4 com3 com2 com1 aux",winutils:"ping net ipconfig taskkill xcopy ren del",built_in:"append assoc at attrib break cacls cd chcp chdir chkdsk chkntfs cls cmd color comp compact convert date dir diskcomp diskcopy doskey erase fs find findstr format ftype graftabl help keyb label md mkdir mode more move path pause print popd pushd promt rd recover rem rename replace restore rmdir shiftsort start subst time title tree type ver verify vol"},contains:[{className:"envvar",begin:/%%[^ ]|%[^ ]+?%|![^ ]+?!/},{className:"function",begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)",end:"goto:eof",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),t]},{className:"number",begin:"\\b\\d+",relevance:0},t]}}),i.registerLanguage("dust",function(e){var t="if eq ne lt lte gt gte select default math sep";return{aliases:["dst"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"expression",begin:"{",end:"}",relevance:0,contains:[{className:"begin-block",begin:"#[a-zA-Z- .]+",keywords:t},{className:"string",begin:'"',end:'"'},{className:"end-block",begin:"\\/[a-zA-Z- .]+",keywords:t},{className:"variable",begin:"[a-zA-Z-.]+",keywords:t,relevance:0}]}]}}),i.registerLanguage("elixir",function(e){var t="[a-zA-Z_][a-zA-Z0-9_]*(\\!|\\?)?",n="and false then defined module in return redo retry end for true self when next until do begin unless nil break not case cond alias while ensure or include use alias fn quote",r={className:"subst",begin:"#\\{",end:"}",lexemes:t,keywords:n},i={className:"string",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]},a={className:"function",beginKeywords:"def defp defmacro",end:/\B\b/,contains:[e.inherit(e.TITLE_MODE,{begin:t,endsParent:!0})]},o=e.inherit(a,{className:"class",beginKeywords:"defmodule defrecord",end:/\bdo\b|$|;/}),s=[i,e.HASH_COMMENT_MODE,o,a,{className:"constant",begin:"(\\b[A-Z_]\\w*(.)?)+",relevance:0},{className:"symbol",begin:":",contains:[i,{begin:"[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?"}],relevance:0},{className:"symbol",begin:t+":",relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{begin:"->"},{begin:"("+e.RE_STARTERS_RE+")\\s*",contains:[e.HASH_COMMENT_MODE,{className:"regexp",illegal:"\\n",contains:[e.BACKSLASH_ESCAPE,r],variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}],relevance:0}];return{lexemes:t,keywords:n,contains:r.contains=s}}),i.registerLanguage("elm",function(e){var t=[e.COMMENT("--","$"),e.COMMENT("{-","-}",{contains:["self"]})],n={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},r={className:"container",begin:"\\(",end:"\\)",illegal:'"',contains:[{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"}].concat(t)},i={className:"container",begin:"{",end:"}",contains:r.contains};return{keywords:"let in if then else case of where module import exposing type alias as infix infixl infixr port",contains:[{className:"module",begin:"\\bmodule\\b",end:"where",keywords:"module where",contains:[r].concat(t),illegal:"\\W\\.|;"},{className:"import",begin:"\\bimport\\b",end:"$",keywords:"import|0 as exposing",contains:[r].concat(t),illegal:"\\W\\.|;"},{className:"typedef",begin:"\\btype\\b",end:"$",keywords:"type alias",contains:[n,r,i].concat(t)},{className:"infix",beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE].concat(t)},{className:"foreign",begin:"\\bport\\b",end:"$",keywords:"port",contains:t},e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,n,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),{begin:"->|<-"}].concat(t)}}),i.registerLanguage("ruby",function(e){var t="[a-zA-Z_]\\w*[!?=]?|[-+~]\\@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?",n="and false then defined module in return redo if BEGIN retry end for true self when next until do begin unless END rescue nil else break undef not super class case require yield alias while ensure elsif or include attr_reader attr_writer attr_accessor",r={className:"doctag",begin:"@[A-Za-z]+"},i={className:"value",begin:"#<",end:">"},a=[e.COMMENT("#","$",{contains:[r]}),e.COMMENT("^\\=begin","^\\=end",{contains:[r],relevance:10}),e.COMMENT("^__END__","\\n$")],o={className:"subst",begin:"#\\{",end:"}",keywords:n},s={className:"string",contains:[e.BACKSLASH_ESCAPE,o],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:"%[qQwWx]?\\(",end:"\\)"},{begin:"%[qQwWx]?\\[",end:"\\]"},{begin:"%[qQwWx]?{",end:"}"},{begin:"%[qQwWx]?<",end:">"},{begin:"%[qQwWx]?/",end:"/"},{begin:"%[qQwWx]?%",end:"%"},{begin:"%[qQwWx]?-",end:"-"},{begin:"%[qQwWx]?\\|",end:"\\|"},{begin:/\B\?(\\\d{1,3}|\\x[A-Fa-f0-9]{1,2}|\\u[A-Fa-f0-9]{4}|\\?\S)\b/}]},c={className:"params",begin:"\\(",end:"\\)",keywords:n},l=[s,i,{className:"class",beginKeywords:"class module",end:"$|;",illegal:/=/,contains:[e.inherit(e.TITLE_MODE,{begin:"[A-Za-z_]\\w*(::\\w+)*(\\?|\\!)?"}),{className:"inheritance",begin:"<\\s*",contains:[{className:"parent",begin:"("+e.IDENT_RE+"::)?"+e.IDENT_RE}]}].concat(a)},{className:"function",beginKeywords:"def",end:"$|;",contains:[e.inherit(e.TITLE_MODE,{begin:t}),c].concat(a)},{className:"constant",begin:"(::)?(\\b[A-Z]\\w*(::)?)+",relevance:0},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(\\!|\\?)?:",relevance:0},{className:"symbol",begin:":",contains:[s,{begin:t}],relevance:0},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{className:"variable",begin:"(\\$\\W)|((\\$|\\@\\@?)(\\w+))"},{begin:"("+e.RE_STARTERS_RE+")\\s*",contains:[i,{className:"regexp",contains:[e.BACKSLASH_ESCAPE,o],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:"%r{",end:"}[a-z]*"},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(a),relevance:0}].concat(a);o.contains=l;var u=[{begin:/^\s*=>/,className:"status",starts:{end:"$",contains:c.contains=l}},{className:"prompt",begin:"^([>?]>|[\\w#]+\\(\\w+\\):\\d+:\\d+>|(\\w+-)?\\d+\\.\\d+\\.\\d(p\\d+)?[^>]+>)",starts:{end:"$",contains:l}}];return{aliases:["rb","gemspec","podspec","thor","irb"],keywords:n,illegal:/\/\*/,contains:a.concat(u).concat(l)}}),i.registerLanguage("erb",function(e){return{subLanguage:"xml",contains:[e.COMMENT("<%#","%>"),{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0}]}}),i.registerLanguage("erlang-repl",function(e){return{keywords:{special_functions:"spawn spawn_link self",reserved:"after and andalso|10 band begin bnot bor bsl bsr bxor case catch cond div end fun if let not of or orelse|10 query receive rem try when xor"},contains:[{className:"prompt",begin:"^[0-9]+> ",relevance:10},e.COMMENT("%","$"),{className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"constant",begin:"\\?(::)?([A-Z]\\w*(::)?)+"},{className:"arrow",begin:"->"},{className:"ok",begin:"ok"},{className:"exclamation_mark",begin:"!"},{className:"function_or_atom",begin:"(\\b[a-z'][a-zA-Z0-9_']*:[a-z'][a-zA-Z0-9_']*)|(\\b[a-z'][a-zA-Z0-9_']*)",relevance:0},{className:"variable",begin:"[A-Z][a-zA-Z0-9_']*",relevance:0}]}}),i.registerLanguage("erlang",function(e){var t="[a-z'][a-zA-Z0-9_']*",n="("+t+":"+t+"|"+t+")",r={keyword:"after and andalso|10 band begin bnot bor bsl bzr bxor case catch cond div end fun if let not of orelse|10 query receive rem try when xor",literal:"false true"},i=e.COMMENT("%","$"),a={className:"number",begin:"\\b(\\d+#[a-fA-F0-9]+|\\d+(\\.\\d+)?([eE][-+]?\\d+)?)",relevance:0},o={begin:"fun\\s+"+t+"/\\d+"},s={begin:n+"\\(",end:"\\)",returnBegin:!0,relevance:0,contains:[{className:"function_name",begin:n,relevance:0},{begin:"\\(",end:"\\)",endsWithParent:!0,returnEnd:!0,relevance:0}]},c={className:"tuple",begin:"{",end:"}",relevance:0},l={className:"variable",begin:"\\b_([A-Z][A-Za-z0-9_]*)?",relevance:0},u={className:"variable",begin:"[A-Z][a-zA-Z0-9_]*",relevance:0},f={begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0,returnBegin:!0,contains:[{className:"record_name",begin:"#"+e.UNDERSCORE_IDENT_RE,relevance:0},{begin:"{",end:"}",relevance:0}]},d={beginKeywords:"fun receive if try case",end:"end",keywords:r};d.contains=[i,o,e.inherit(e.APOS_STRING_MODE,{className:""}),d,s,e.QUOTE_STRING_MODE,a,c,l,u,f];var h=[i,o,d,s,e.QUOTE_STRING_MODE,a,c,l,u,f];s.contains[1].contains=h,c.contains=h;var p={className:"params",begin:"\\(",end:"\\)",contains:f.contains[1].contains=h};return{aliases:["erl"],keywords:r,illegal:"(</|\\*=|\\+=|-=|/\\*|\\*/|\\(\\*|\\*\\))",contains:[{className:"function",begin:"^"+t+"\\s*\\(",end:"->",returnBegin:!0,illegal:"\\(|#|//|/\\*|\\\\|:|;",contains:[p,e.inherit(e.TITLE_MODE,{begin:t})],starts:{end:";|\\.",keywords:r,contains:h}},i,{className:"pp",begin:"^-",end:"\\.",relevance:0,excludeEnd:!0,returnBegin:!0,lexemes:"-"+e.IDENT_RE,keywords:"-module -record -undef -export -ifdef -ifndef -author -copyright -doc -vsn -import -include -include_lib -compile -define -else -endif -file -behaviour -behavior -spec",contains:[p]},a,e.QUOTE_STRING_MODE,f,l,u,c,{begin:/\.$/}]}}),i.registerLanguage("fix",function(e){return{contains:[{begin:/[^\u2401\u0001]+/,end:/[\u2401\u0001]/,excludeEnd:!0,returnBegin:!0,returnEnd:!1,contains:[{begin:/([^\u2401\u0001=]+)/,end:/=([^\u2401\u0001=]+)/,returnEnd:!0,returnBegin:!1,className:"attribute"},{begin:/=/,end:/([\u2401\u0001])/,excludeEnd:!0,excludeBegin:!0,className:"string"}]}],case_insensitive:!0}}),i.registerLanguage("fortran",function(e){return{case_insensitive:!0,aliases:["f90","f95"],keywords:{constant:".False. .True.",type:"integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated  c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image"},illegal:/\/\*/,contains:[e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},e.COMMENT("!","$",{relevance:0}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}),i.registerLanguage("fsharp",function(e){var t={begin:"<",end:">",contains:[e.inherit(e.TITLE_MODE,{begin:/'[a-zA-Z0-9_]+/})]};return{aliases:["fs"],keywords:"abstract and as assert base begin class default delegate do done downcast downto elif else end exception extern false finally for fun function global if in inherit inline interface internal lazy let match member module mutable namespace new null of open or override private public rec return sig static struct then to true try type upcast use val void when while with yield",illegal:/\/\*/,contains:[{className:"keyword",begin:/\b(yield|return|let|do)!/},{className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},{className:"string",begin:'"""',end:'"""'},e.COMMENT("\\(\\*","\\*\\)"),{className:"class",beginKeywords:"type",end:"\\(|=|$",excludeEnd:!0,contains:[e.UNDERSCORE_TITLE_MODE,t]},{className:"annotation",begin:"\\[<",end:">\\]",relevance:10},{className:"attribute",begin:"\\B('[A-Za-z])\\b",contains:[e.BACKSLASH_ESCAPE]},e.C_LINE_COMMENT_MODE,e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),e.C_NUMBER_MODE]}}),i.registerLanguage("gams",function(e){return{aliases:["gms"],case_insensitive:!0,keywords:"abort acronym acronyms alias all and assign binary card diag display else1 eps eq equation equations file files for1 free ge gt if inf integer le loop lt maximizing minimizing model models na ne negative no not option options or ord parameter parameters positive prod putpage puttl repeat sameas scalar scalars semicont semiint set1 sets smax smin solve sos1 sos2 sum system table then until using variable variables while1 xor yes",contains:[{className:"section",beginKeywords:"sets parameters variables equations",end:";",contains:[{begin:"/",end:"/",contains:[e.NUMBER_MODE]}]},{className:"string",begin:"\\*{3}",end:"\\*{3}"},e.NUMBER_MODE,{className:"number",begin:"\\$[a-zA-Z0-9]+"}]}}),i.registerLanguage("gcode",function(e){var t=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT(/\(/,/\)/),e.inherit(e.C_NUMBER_MODE,{begin:"([-+]?([0-9]*\\.?[0-9]+\\.?))|"+e.C_NUMBER_RE}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"keyword",begin:"([G])([0-9]+\\.?[0-9]?)"},{className:"title",begin:"([M])([0-9]+\\.?[0-9]?)"},{className:"title",begin:"(VC|VS|#)",end:"(\\d+)"},{className:"title",begin:"(VZOFX|VZOFY|VZOFZ)"},{className:"built_in",begin:"(ATAN|ABS|ACOS|ASIN|SIN|COS|EXP|FIX|FUP|ROUND|LN|TAN)(\\[)",end:"([-+]?([0-9]*\\.?[0-9]+\\.?))(\\])"},{className:"label",variants:[{begin:"N",end:"\\d+",illegal:"\\W"}]}];return{aliases:["nc"],case_insensitive:!0,lexemes:"[A-Z_][A-Z0-9_.]*",keywords:{literal:"",built_in:"",keyword:"IF DO WHILE ENDWHILE CALL ENDIF SUB ENDSUB GOTO REPEAT ENDREPEAT EQ LT GT NE GE LE OR XOR"},contains:[{className:"preprocessor",begin:"\\%"},{className:"preprocessor",begin:"([O])([0-9]+)"}].concat(t)}}),i.registerLanguage("gherkin",function(e){return{aliases:["feature"],keywords:"Feature Background Ability Business Need Scenario Scenarios Scenario Outline Scenario Template Examples Given And Then But When",contains:[{className:"keyword",begin:"\\*"},e.COMMENT("@[^@\r\n\t ]+","$"),{begin:"\\|",end:"\\|\\w*$",contains:[{className:"string",begin:"[^|]+"}]},{className:"variable",begin:"<",end:">"},e.HASH_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},e.QUOTE_STRING_MODE]}}),i.registerLanguage("glsl",function(e){return{keywords:{keyword:"atomic_uint attribute bool break bvec2 bvec3 bvec4 case centroid coherent const continue default discard dmat2 dmat2x2 dmat2x3 dmat2x4 dmat3 dmat3x2 dmat3x3 dmat3x4 dmat4 dmat4x2 dmat4x3 dmat4x4 do double dvec2 dvec3 dvec4 else flat float for highp if iimage1D iimage1DArray iimage2D iimage2DArray iimage2DMS iimage2DMSArray iimage2DRect iimage3D iimageBuffer iimageCube iimageCubeArray image1D image1DArray image2D image2DArray image2DMS image2DMSArray image2DRect image3D imageBuffer imageCube imageCubeArray in inout int invariant isampler1D isampler1DArray isampler2D isampler2DArray isampler2DMS isampler2DMSArray isampler2DRect isampler3D isamplerBuffer isamplerCube isamplerCubeArray ivec2 ivec3 ivec4 layout lowp mat2 mat2x2 mat2x3 mat2x4 mat3 mat3x2 mat3x3 mat3x4 mat4 mat4x2 mat4x3 mat4x4 mediump noperspective out patch precision readonly restrict return sample sampler1D sampler1DArray sampler1DArrayShadow sampler1DShadow sampler2D sampler2DArray sampler2DArrayShadow sampler2DMS sampler2DMSArray sampler2DRect sampler2DRectShadow sampler2DShadow sampler3D samplerBuffer samplerCube samplerCubeArray samplerCubeArrayShadow samplerCubeShadow smooth struct subroutine switch uimage1D uimage1DArray uimage2D uimage2DArray uimage2DMS uimage2DMSArray uimage2DRect uimage3D uimageBuffer uimageCube uimageCubeArray uint uniform usampler1D usampler1DArray usampler2D usampler2DArray usampler2DMS usampler2DMSArray usampler2DRect usampler3D usamplerBuffer usamplerCube usamplerCubeArray uvec2 uvec3 uvec4 varying vec2 vec3 vec4 void volatile while writeonly",built_in:"gl_BackColor gl_BackLightModelProduct gl_BackLightProduct gl_BackMaterial gl_BackSecondaryColor gl_ClipDistance gl_ClipPlane gl_ClipVertex gl_Color gl_DepthRange gl_EyePlaneQ gl_EyePlaneR gl_EyePlaneS gl_EyePlaneT gl_Fog gl_FogCoord gl_FogFragCoord gl_FragColor gl_FragCoord gl_FragData gl_FragDepth gl_FrontColor gl_FrontFacing gl_FrontLightModelProduct gl_FrontLightProduct gl_FrontMaterial gl_FrontSecondaryColor gl_InstanceID gl_InvocationID gl_Layer gl_LightModel gl_LightSource gl_MaxAtomicCounterBindings gl_MaxAtomicCounterBufferSize gl_MaxClipDistances gl_MaxClipPlanes gl_MaxCombinedAtomicCounterBuffers gl_MaxCombinedAtomicCounters gl_MaxCombinedImageUniforms gl_MaxCombinedImageUnitsAndFragmentOutputs gl_MaxCombinedTextureImageUnits gl_MaxDrawBuffers gl_MaxFragmentAtomicCounterBuffers gl_MaxFragmentAtomicCounters gl_MaxFragmentImageUniforms gl_MaxFragmentInputComponents gl_MaxFragmentUniformComponents gl_MaxFragmentUniformVectors gl_MaxGeometryAtomicCounterBuffers gl_MaxGeometryAtomicCounters gl_MaxGeometryImageUniforms gl_MaxGeometryInputComponents gl_MaxGeometryOutputComponents gl_MaxGeometryOutputVertices gl_MaxGeometryTextureImageUnits gl_MaxGeometryTotalOutputComponents gl_MaxGeometryUniformComponents gl_MaxGeometryVaryingComponents gl_MaxImageSamples gl_MaxImageUnits gl_MaxLights gl_MaxPatchVertices gl_MaxProgramTexelOffset gl_MaxTessControlAtomicCounterBuffers gl_MaxTessControlAtomicCounters gl_MaxTessControlImageUniforms gl_MaxTessControlInputComponents gl_MaxTessControlOutputComponents gl_MaxTessControlTextureImageUnits gl_MaxTessControlTotalOutputComponents gl_MaxTessControlUniformComponents gl_MaxTessEvaluationAtomicCounterBuffers gl_MaxTessEvaluationAtomicCounters gl_MaxTessEvaluationImageUniforms gl_MaxTessEvaluationInputComponents gl_MaxTessEvaluationOutputComponents gl_MaxTessEvaluationTextureImageUnits gl_MaxTessEvaluationUniformComponents gl_MaxTessGenLevel gl_MaxTessPatchComponents gl_MaxTextureCoords gl_MaxTextureImageUnits gl_MaxTextureUnits gl_MaxVaryingComponents gl_MaxVaryingFloats gl_MaxVaryingVectors gl_MaxVertexAtomicCounterBuffers gl_MaxVertexAtomicCounters gl_MaxVertexAttribs gl_MaxVertexImageUniforms gl_MaxVertexOutputComponents gl_MaxVertexTextureImageUnits gl_MaxVertexUniformComponents gl_MaxVertexUniformVectors gl_MaxViewports gl_MinProgramTexelOffsetgl_ModelViewMatrix gl_ModelViewMatrixInverse gl_ModelViewMatrixInverseTranspose gl_ModelViewMatrixTranspose gl_ModelViewProjectionMatrix gl_ModelViewProjectionMatrixInverse gl_ModelViewProjectionMatrixInverseTranspose gl_ModelViewProjectionMatrixTranspose gl_MultiTexCoord0 gl_MultiTexCoord1 gl_MultiTexCoord2 gl_MultiTexCoord3 gl_MultiTexCoord4 gl_MultiTexCoord5 gl_MultiTexCoord6 gl_MultiTexCoord7 gl_Normal gl_NormalMatrix gl_NormalScale gl_ObjectPlaneQ gl_ObjectPlaneR gl_ObjectPlaneS gl_ObjectPlaneT gl_PatchVerticesIn gl_PerVertex gl_Point gl_PointCoord gl_PointSize gl_Position gl_PrimitiveID gl_PrimitiveIDIn gl_ProjectionMatrix gl_ProjectionMatrixInverse gl_ProjectionMatrixInverseTranspose gl_ProjectionMatrixTranspose gl_SampleID gl_SampleMask gl_SampleMaskIn gl_SamplePosition gl_SecondaryColor gl_TessCoord gl_TessLevelInner gl_TessLevelOuter gl_TexCoord gl_TextureEnvColor gl_TextureMatrixInverseTranspose gl_TextureMatrixTranspose gl_Vertex gl_VertexID gl_ViewportIndex gl_in gl_out EmitStreamVertex EmitVertex EndPrimitive EndStreamPrimitive abs acos acosh all any asin asinh atan atanh atomicCounter atomicCounterDecrement atomicCounterIncrement barrier bitCount bitfieldExtract bitfieldInsert bitfieldReverse ceil clamp cos cosh cross dFdx dFdy degrees determinant distance dot equal exp exp2 faceforward findLSB findMSB floatBitsToInt floatBitsToUint floor fma fract frexp ftransform fwidth greaterThan greaterThanEqual imageAtomicAdd imageAtomicAnd imageAtomicCompSwap imageAtomicExchange imageAtomicMax imageAtomicMin imageAtomicOr imageAtomicXor imageLoad imageStore imulExtended intBitsToFloat interpolateAtCentroid interpolateAtOffset interpolateAtSample inverse inversesqrt isinf isnan ldexp length lessThan lessThanEqual log log2 matrixCompMult max memoryBarrier min mix mod modf noise1 noise2 noise3 noise4 normalize not notEqual outerProduct packDouble2x32 packHalf2x16 packSnorm2x16 packSnorm4x8 packUnorm2x16 packUnorm4x8 pow radians reflect refract round roundEven shadow1D shadow1DLod shadow1DProj shadow1DProjLod shadow2D shadow2DLod shadow2DProj shadow2DProjLod sign sin sinh smoothstep sqrt step tan tanh texelFetch texelFetchOffset texture texture1D texture1DLod texture1DProj texture1DProjLod texture2D texture2DLod texture2DProj texture2DProjLod texture3D texture3DLod texture3DProj texture3DProjLod textureCube textureCubeLod textureGather textureGatherOffset textureGatherOffsets textureGrad textureGradOffset textureLod textureLodOffset textureOffset textureProj textureProjGrad textureProjGradOffset textureProjLod textureProjLodOffset textureProjOffset textureQueryLod textureSize transpose trunc uaddCarry uintBitsToFloat umulExtended unpackDouble2x32 unpackHalf2x16 unpackSnorm2x16 unpackSnorm4x8 unpackUnorm2x16 unpackUnorm4x8 usubBorrow gl_TextureMatrix gl_TextureMatrixInverse",literal:"true false"},illegal:'"',contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$"}]}}),i.registerLanguage("go",function(e){return{aliases:["golang"],keywords:{keyword:"break default func interface select case map struct chan else goto package switch const fallthrough if range type continue for import return var go defer",constant:"true false iota nil",typename:"bool byte complex64 complex128 float32 float64 int8 int16 int32 int64 string uint8 uint16 uint32 uint64 int uint uintptr rune",built_in:"append cap close complex copy imag len make new panic print println real recover delete"},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"[^\\\\]'"},{className:"string",begin:"`",end:"`"},{className:"number",begin:e.C_NUMBER_RE+"[dflsi]?",relevance:0},e.C_NUMBER_MODE]}}),i.registerLanguage("golo",function(e){return{keywords:{keyword:"println readln print import module function local return let var while for foreach times in case when match with break continue augment augmentation each find filter reduce if then else otherwise try catch finally raise throw orIfNull",typename:"DynamicObject|10 DynamicVariable struct Observable map set vector list array",literal:"true false null"},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"}]}}),i.registerLanguage("gradle",function(e){return{case_insensitive:!0,keywords:{keyword:"task project allprojects subprojects artifacts buildscript configurations dependencies repositories sourceSets description delete from into include exclude source classpath destinationDir includes options sourceCompatibility targetCompatibility group flatDir doLast doFirst flatten todir fromdir ant def abstract break case catch continue default do else extends final finally for if implements instanceof native new private protected public return static switch synchronized throw throws transient try volatile while strictfp package import false null super this true antlrtask checkstyle codenarc copy boolean byte char class double float int interface long short void compile runTime file fileTree abs any append asList asWritable call collect compareTo count div dump each eachByte eachFile eachLine every find findAll flatten getAt getErr getIn getOut getText grep immutable inject inspect intersect invokeMethods isCase join leftShift minus multiply newInputStream newOutputStream newPrintWriter newReader newWriter next plus pop power previous print println push putAt read readBytes readLines reverse reverseEach round size sort splitEachLine step subMap times toInteger toList tokenize upto waitForOrKill withPrintWriter withReader withStream withWriter withWriterAppend write writeLine"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.REGEXP_MODE]}}),i.registerLanguage("groovy",function(e){return{keywords:{typename:"byte short char int long boolean float double void",literal:"true false null",keyword:"def as in assert trait super this abstract static volatile transient public private protected synchronized final class interface enum if else for while switch case break default continue throw throws try catch finally implements extends new import package return instanceof"},contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""'},{className:"string",begin:"'''",end:"'''"},{className:"string",begin:"\\$/",end:"/\\$",relevance:10},e.APOS_STRING_MODE,{className:"regexp",begin:/~?\/[^\/\n]+\//,contains:[e.BACKSLASH_ESCAPE]},e.QUOTE_STRING_MODE,{className:"shebang",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},e.BINARY_NUMBER_MODE,{className:"class",beginKeywords:"class interface trait enum",end:"{",illegal:":",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},e.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"},{className:"string",begin:/[^\?]{0}[A-Za-z0-9_$]+ *:/},{begin:/\?/,end:/\:/},{className:"label",begin:"^\\s*[A-Za-z0-9_$]+:",relevance:0}],illegal:/#/}}),i.registerLanguage("haml",function(e){return{case_insensitive:!0,contains:[{className:"doctype",begin:"^!!!( (5|1\\.1|Strict|Frameset|Basic|Mobile|RDFa|XML\\b.*))?$",relevance:10},e.COMMENT("^\\s*(!=#|=#|-#|/).*$",!1,{relevance:0}),{begin:"^\\s*(-|=|!=)(?!#)",starts:{end:"\\n",subLanguage:"ruby"}},{className:"tag",begin:"^\\s*%",contains:[{className:"title",begin:"\\w+"},{className:"value",begin:"[#\\.][\\w-]+"},{begin:"{\\s*",end:"\\s*}",excludeEnd:!0,contains:[{begin:":\\w+\\s*=>",end:",\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"symbol",begin:":\\w+"},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]},{begin:"\\(\\s*",end:"\\s*\\)",excludeEnd:!0,contains:[{begin:"\\w+\\s*=",end:"\\s+",returnBegin:!0,endsWithParent:!0,contains:[{className:"attribute",begin:"\\w+",relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{begin:"\\w+",relevance:0}]}]}]},{className:"bullet",begin:"^\\s*[=~]\\s*",relevance:0},{begin:"#{",starts:{end:"}",subLanguage:"ruby"}}]}}),i.registerLanguage("handlebars",function(e){var t="each in with if else unless bindattr action collection debugger log outlet template unbound view yield";return{aliases:["hbs","html.hbs","html.handlebars"],case_insensitive:!0,subLanguage:"xml",contains:[{className:"expression",begin:"{{",end:"}}",contains:[{className:"begin-block",begin:"#[a-zA-Z- .]+",keywords:t},{className:"string",begin:'"',end:'"'},{className:"end-block",begin:"\\/[a-zA-Z- .]+",keywords:t},{className:"variable",begin:"[a-zA-Z-.]+",keywords:t}]}]}}),i.registerLanguage("haskell",function(e){var t=[e.COMMENT("--","$"),e.COMMENT("{-","-}",{contains:["self"]})],n={className:"pragma",begin:"{-#",end:"#-}"},r={className:"preprocessor",begin:"^#",end:"$"},i={className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},a={className:"container",begin:"\\(",end:"\\)",illegal:'"',contains:[n,r,{className:"type",begin:"\\b[A-Z][\\w]*(\\((\\.\\.|,|\\w+)\\))?"},e.inherit(e.TITLE_MODE,{begin:"[_a-z][\\w']*"})].concat(t)},o={className:"container",begin:"{",end:"}",contains:a.contains};return{aliases:["hs"],keywords:"let in if then else case of where do module import hiding qualified type data newtype deriving class instance as default infix infixl infixr foreign export ccall stdcall cplusplus jvm dotnet safe unsafe family forall mdo proc rec",contains:[{className:"module",begin:"\\bmodule\\b",end:"where",keywords:"module where",contains:[a].concat(t),illegal:"\\W\\.|;"},{className:"import",begin:"\\bimport\\b",end:"$",keywords:"import|0 qualified as hiding",contains:[a].concat(t),illegal:"\\W\\.|;"},{className:"class",begin:"^(\\s*)?(class|instance)\\b",end:"where",keywords:"class family instance where",contains:[i,a].concat(t)},{className:"typedef",begin:"\\b(data|(new)?type)\\b",end:"$",keywords:"data family type newtype deriving",contains:[n,i,a,o].concat(t)},{className:"default",beginKeywords:"default",end:"$",contains:[i,a].concat(t)},{className:"infix",beginKeywords:"infix infixl infixr",end:"$",contains:[e.C_NUMBER_MODE].concat(t)},{className:"foreign",begin:"\\bforeign\\b",end:"$",keywords:"foreign import export ccall stdcall cplusplus jvm dotnet safe unsafe",contains:[i,e.QUOTE_STRING_MODE].concat(t)},{className:"shebang",begin:"#!\\/usr\\/bin\\/env runhaskell",end:"$"},n,r,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,i,e.inherit(e.TITLE_MODE,{begin:"^[_a-z][\\w']*"}),{begin:"->|<-"}].concat(t)}}),i.registerLanguage("haxe",function(e){return{aliases:["hx"],keywords:{keyword:"break callback case cast catch class continue default do dynamic else enum extends extern for function here if implements import in inline interface never new override package private public return static super switch this throw trace try typedef untyped using var while",literal:"true false null"},contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.TITLE_MODE]},{className:"preprocessor",begin:"#",end:"$",keywords:"if else elseif end error"},{className:"function",beginKeywords:"function",end:"[{;]",excludeEnd:!0,illegal:"\\S",contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"type",begin:":",end:"([*]|[a-zA-Z_$][a-zA-Z0-9_$]*)",relevance:10}]}]}}),i.registerLanguage("http",function(e){return{aliases:["https"],illegal:"\\S",contains:[{className:"status",begin:"^HTTP/[0-9\\.]+",end:"$",contains:[{className:"number",begin:"\\b\\d{3}\\b"}]},{className:"request",begin:"^[A-Z]+ (.*?) HTTP/[0-9\\.]+$",returnBegin:!0,end:"$",contains:[{className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0}]},{className:"attribute",begin:"^\\w",end:": ",excludeEnd:!0,illegal:"\\n|\\s|=",starts:{className:"string",end:"$"}},{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}}]}}),i.registerLanguage("inform7",function(e){return{aliases:["i7"],case_insensitive:!0,keywords:{keyword:"thing room person man woman animal container supporter backdrop door scenery open closed locked inside gender is are say understand kind of rule"},contains:[{className:"string",begin:'"',end:'"',relevance:0,contains:[{className:"subst",begin:"\\[",end:"\\]"}]},{className:"title",begin:/^(Volume|Book|Part|Chapter|Section|Table)\b/,end:"$"},{begin:/^(Check|Carry out|Report|Instead of|To|Rule|When|Before|After)\b/,end:":",contains:[{begin:"\\b\\(This",end:"\\)"}]},{className:"comment",begin:"\\[",end:"\\]",contains:["self"]}]}}),i.registerLanguage("ini",function(e){var t={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]};return{aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[e.COMMENT(";","$"),e.HASH_COMMENT_MODE,{className:"title",begin:/^\s*\[+/,end:/\]+/},{className:"setting",begin:/^[a-z0-9\[\]_-]+\s*=\s*/,end:"$",contains:[{className:"value",endsWithParent:!0,keywords:"on off true false yes no",contains:[{className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)}/}]},t,{className:"number",begin:/([\+\-]+)?[\d]+_[\d_]+/},e.NUMBER_MODE],relevance:0}]}]}}),i.registerLanguage("irpf90",function(e){return{case_insensitive:!0,keywords:{constant:".False. .True.",type:"integer real character complex logical dimension allocatable|10 parameter external implicit|10 none double precision assign intent optional pointer target in out common equivalence data",keyword:"kind do while private call intrinsic where elsewhere type endtype endmodule endselect endinterface end enddo endif if forall endforall only contains default return stop then public subroutine|10 function program .and. .or. .not. .le. .eq. .ge. .gt. .lt. goto save else use module select case access blank direct exist file fmt form formatted iostat name named nextrec number opened rec recl sequential status unformatted unit continue format pause cycle exit c_null_char c_alert c_backspace c_form_feed flush wait decimal round iomsg synchronous nopass non_overridable pass protected volatile abstract extends import non_intrinsic value deferred generic final enumerator class associate bind enum c_int c_short c_long c_long_long c_signed_char c_size_t c_int8_t c_int16_t c_int32_t c_int64_t c_int_least8_t c_int_least16_t c_int_least32_t c_int_least64_t c_int_fast8_t c_int_fast16_t c_int_fast32_t c_int_fast64_t c_intmax_t C_intptr_t c_float c_double c_long_double c_float_complex c_double_complex c_long_double_complex c_bool c_char c_null_ptr c_null_funptr c_new_line c_carriage_return c_horizontal_tab c_vertical_tab iso_c_binding c_loc c_funloc c_associated  c_f_pointer c_ptr c_funptr iso_fortran_env character_storage_size error_unit file_storage_size input_unit iostat_end iostat_eor numeric_storage_size output_unit c_f_procpointer ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode newunit contiguous recursive pad position action delim readwrite eor advance nml interface procedure namelist include sequence elemental pure begin_provider &begin_provider end_provider begin_shell end_shell begin_template end_template subst assert touch soft_touch provide no_dep free irp_if irp_else irp_endif irp_write irp_read",built_in:"alog alog10 amax0 amax1 amin0 amin1 amod cabs ccos cexp clog csin csqrt dabs dacos dasin datan datan2 dcos dcosh ddim dexp dint dlog dlog10 dmax1 dmin1 dmod dnint dsign dsin dsinh dsqrt dtan dtanh float iabs idim idint idnint ifix isign max0 max1 min0 min1 sngl algama cdabs cdcos cdexp cdlog cdsin cdsqrt cqabs cqcos cqexp cqlog cqsin cqsqrt dcmplx dconjg derf derfc dfloat dgamma dimag dlgama iqint qabs qacos qasin qatan qatan2 qcmplx qconjg qcos qcosh qdim qerf qerfc qexp qgamma qimag qlgama qlog qlog10 qmax1 qmin1 qmod qnint qsign qsin qsinh qsqrt qtan qtanh abs acos aimag aint anint asin atan atan2 char cmplx conjg cos cosh exp ichar index int log log10 max min nint sign sin sinh sqrt tan tanh print write dim lge lgt lle llt mod nullify allocate deallocate adjustl adjustr all allocated any associated bit_size btest ceiling count cshift date_and_time digits dot_product eoshift epsilon exponent floor fraction huge iand ibclr ibits ibset ieor ior ishft ishftc lbound len_trim matmul maxexponent maxloc maxval merge minexponent minloc minval modulo mvbits nearest pack present product radix random_number random_seed range repeat reshape rrspacing scale scan selected_int_kind selected_real_kind set_exponent shape size spacing spread sum system_clock tiny transpose trim ubound unpack verify achar iachar transfer dble entry dprod cpu_time command_argument_count get_command get_command_argument get_environment_variable is_iostat_end ieee_arithmetic ieee_support_underflow_control ieee_get_underflow_mode ieee_set_underflow_mode is_iostat_eor move_alloc new_line selected_char_kind same_type_as extends_type_ofacosh asinh atanh bessel_j0 bessel_j1 bessel_jn bessel_y0 bessel_y1 bessel_yn erf erfc erfc_scaled gamma log_gamma hypot norm2 atomic_define atomic_ref execute_command_line leadz trailz storage_size merge_bits bge bgt ble blt dshiftl dshiftr findloc iall iany iparity image_index lcobound ucobound maskl maskr num_images parity popcnt poppar shifta shiftl shiftr this_image IRP_ALIGN irp_here"},illegal:/\/\*/,contains:[e.inherit(e.APOS_STRING_MODE,{className:"string",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{className:"string",relevance:0}),{className:"function",beginKeywords:"subroutine function program",illegal:"[${=\\n]",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},e.COMMENT("!","$",{relevance:0}),e.COMMENT("begin_doc","end_doc",{relevance:10}),{className:"number",begin:"(?=\\b|\\+|\\-|\\.)(?=\\.\\d|\\d)(?:\\d+)?(?:\\.?\\d*)(?:[de][+-]?\\d+)?\\b\\.?",relevance:0}]}}),i.registerLanguage("java",function(e){var t=e.UNDERSCORE_IDENT_RE+"(<"+e.UNDERSCORE_IDENT_RE+">)?",n="false synchronized int abstract float private char boolean static null if const for true while long strictfp finally protected import native final void enum else break transient catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",r={className:"number",begin:"\\b(0[bB]([01]+[01_]+[01]+|[01]+)|0[xX]([a-fA-F0-9]+[a-fA-F0-9_]+[a-fA-F0-9]+|[a-fA-F0-9]+)|(([\\d]+[\\d_]+[\\d]+|[\\d]+)(\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))?|\\.([\\d]+[\\d_]+[\\d]+|[\\d]+))([eE][-+]?\\d+)?)[lLfF]?",relevance:0};return{aliases:["jsp"],keywords:n,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"class",beginKeywords:"class interface",end:/[{;=]/,excludeEnd:!0,keywords:"class interface",illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"new throw return else",relevance:0},{className:"function",begin:"("+t+"\\s+)+"+e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:n,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"params",begin:/\(/,end:/\)/,keywords:n,relevance:0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},r,{className:"annotation",begin:"@[A-Za-z]+"}]}}),i.registerLanguage("javascript",function(e){return{aliases:["js"],keywords:{keyword:"in of if for while finally var new function do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const export super debugger as async await",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document Symbol Set Map WeakSet WeakMap Proxy Reflect Promise"},contains:[{className:"pi",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,{className:"subst",begin:"\\$\\{",end:"\\}"}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE,{begin:/</,end:/>\s*[);\]]/,relevance:0,subLanguage:"xml"}],relevance:0},{className:"function",beginKeywords:"function",end:/\{/,excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}],illegal:/\[|%/},{begin:/\$[(.]/},{begin:"\\."+e.IDENT_RE,relevance:0},{beginKeywords:"import",end:"[;$]",keywords:"import from as",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},{className:"class",beginKeywords:"class",end:/[{;=]/,excludeEnd:!0,illegal:/[:"\[\]]/,contains:[{beginKeywords:"extends"},e.UNDERSCORE_TITLE_MODE]}],illegal:/#/}}),i.registerLanguage("json",function(e){var t={literal:"true false null"},n=[e.QUOTE_STRING_MODE,e.C_NUMBER_MODE],r={className:"value",end:",",endsWithParent:!0,excludeEnd:!0,contains:n,keywords:t},i={begin:"{",end:"}",contains:[{className:"attribute",begin:'\\s*"',end:'"\\s*:\\s*',excludeBegin:!0,excludeEnd:!0,contains:[e.BACKSLASH_ESCAPE],illegal:"\\n",starts:r}],illegal:"\\S"},a={begin:"\\[",end:"\\]",contains:[e.inherit(r,{className:null})],illegal:"\\S"};return n.splice(n.length,0,i,a),{contains:n,keywords:t,illegal:"\\S"}}),i.registerLanguage("julia",function(e){var t={keyword:"in abstract baremodule begin bitstype break catch ccall const continue do else elseif end export finally for function global if immutable import importall let local macro module quote return try type typealias using while",literal:"true false ANY ARGS CPU_CORES C_NULL DL_LOAD_PATH DevNull ENDIAN_BOM ENV I|0 Inf Inf16 Inf32 InsertionSort JULIA_HOME LOAD_PATH MS_ASYNC MS_INVALIDATE MS_SYNC MergeSort NaN NaN16 NaN32 OS_NAME QuickSort RTLD_DEEPBIND RTLD_FIRST RTLD_GLOBAL RTLD_LAZY RTLD_LOCAL RTLD_NODELETE RTLD_NOLOAD RTLD_NOW RoundDown RoundFromZero RoundNearest RoundToZero RoundUp STDERR STDIN STDOUT VERSION WORD_SIZE catalan cglobal e|0 eu|0 eulergamma golden im nothing pi γ π φ",built_in:"ASCIIString AbstractArray AbstractRNG AbstractSparseArray Any ArgumentError Array Associative Base64Pipe Bidiagonal BigFloat BigInt BitArray BitMatrix BitVector Bool BoundsError Box CFILE Cchar Cdouble Cfloat Char CharString Cint Clong Clonglong ClusterManager Cmd Coff_t Colon Complex Complex128 Complex32 Complex64 Condition Cptrdiff_t Cshort Csize_t Cssize_t Cuchar Cuint Culong Culonglong Cushort Cwchar_t DArray DataType DenseArray Diagonal Dict DimensionMismatch DirectIndexString Display DivideError DomainError EOFError EachLine Enumerate ErrorException Exception Expr Factorization FileMonitor FileOffset Filter Float16 Float32 Float64 FloatRange FloatingPoint Function GetfieldNode GotoNode Hermitian IO IOBuffer IOStream IPv4 IPv6 InexactError Int Int128 Int16 Int32 Int64 Int8 IntSet Integer InterruptException IntrinsicFunction KeyError LabelNode LambdaStaticData LineNumberNode LoadError LocalProcess MIME MathConst MemoryError MersenneTwister Method MethodError MethodTable Module NTuple NewvarNode Nothing Number ObjectIdDict OrdinalRange OverflowError ParseError PollingFileWatcher ProcessExitedException ProcessGroup Ptr QuoteNode Range Range1 Ranges Rational RawFD Real Regex RegexMatch RemoteRef RepString RevString RopeString RoundingMode Set SharedArray Signed SparseMatrixCSC StackOverflowError Stat StatStruct StepRange String SubArray SubString SymTridiagonal Symbol SymbolNode Symmetric SystemError Task TextDisplay Timer TmStruct TopNode Triangular Tridiagonal Type TypeConstructor TypeError TypeName TypeVar UTF16String UTF32String UTF8String UdpSocket Uint Uint128 Uint16 Uint32 Uint64 Uint8 UndefRefError UndefVarError UniformScaling UnionType UnitRange Unsigned Vararg VersionNumber WString WeakKeyDict WeakRef Woodbury Zip"},n="[A-Za-z_\\u00A1-\\uFFFF][A-Za-z_0-9\\u00A1-\\uFFFF]*",r={lexemes:n,keywords:t},i={className:"subst",begin:/\$\(/,end:/\)/,keywords:t},a={className:"variable",begin:"\\$"+n},o={className:"string",contains:[e.BACKSLASH_ESCAPE,i,a],variants:[{begin:/\w*"/,end:/"\w*/},{begin:/\w*"""/,end:/"""\w*/}]},s={className:"string",contains:[e.BACKSLASH_ESCAPE,i,a],begin:"`",end:"`"},c={className:"macrocall",begin:"@"+n};return r.contains=[{className:"number",begin:/(\b0x[\d_]*(\.[\d_]*)?|0x\.\d[\d_]*)p[-+]?\d+|\b0[box][a-fA-F0-9][a-fA-F0-9_]*|(\b\d[\d_]*(\.[\d_]*)?|\.\d[\d_]*)([eEfF][-+]?\d+)?/,relevance:0},{className:"char",begin:/'(.|\\[xXuU][a-zA-Z0-9]+)'/},{className:"type-annotation",begin:/::/},{className:"subtype",begin:/<:/},o,s,c,{className:"comment",variants:[{begin:"#=",end:"=#",relevance:10},{begin:"#",end:"$"}]},e.HASH_COMMENT_MODE],i.contains=r.contains,r}),i.registerLanguage("kotlin",function(e){var t="val var get set class trait object public open private protected final enum if else do while for when break continue throw try catch finally import package is as in return fun override default companion reified inline volatile transient native";return{keywords:{typename:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null",keyword:t},contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"type",begin:/</,end:/>/,returnBegin:!0,excludeEnd:!1,relevance:0},{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,illegal:/fun\s+(<.*>)?[^\s\(]+(\s+[^\s\(]+)\s*=/,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,keywords:t,relevance:0,illegal:/\([^\(,\s:]+,/,contains:[{className:"typename",begin:/:\s*/,end:/\s*[=\)]/,excludeBegin:!0,returnEnd:!0,relevance:0}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",beginKeywords:"class trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"typename",begin:/[,:]\s*/,end:/[<\(,]|$/,excludeBegin:!0,returnEnd:!0}]},{className:"variable",beginKeywords:"var val",end:/\s*[=:$]/,excludeEnd:!0},e.QUOTE_STRING_MODE,{className:"shebang",begin:"^#!/usr/bin/env",end:"$",illegal:"\n"},e.C_NUMBER_MODE]}}),i.registerLanguage("lasso",function(e){var t="[a-zA-Z_][a-zA-Z0-9_.]*",n="<\\?(lasso(script)?|=)",r="\\]|\\?>",i={literal:"true false none minimal full all void bw nbw ew new cn ncn lt lte gt gte eq neq rx nrx ft",built_in:"array date decimal duration integer map pair string tag xml null boolean bytes keyword list locale queue set stack staticarray local var variable global data self inherited currentcapture givenblock",keyword:"error_code error_msg error_pop error_push error_reset cache database_names database_schemanames database_tablenames define_tag define_type email_batch encode_set html_comment handle handle_error header if inline iterate ljax_target link link_currentaction link_currentgroup link_currentrecord link_detail link_firstgroup link_firstrecord link_lastgroup link_lastrecord link_nextgroup link_nextrecord link_prevgroup link_prevrecord log loop namespace_using output_none portal private protect records referer referrer repeating resultset rows search_args search_arguments select sort_args sort_arguments thread_atomic value_list while abort case else if_empty if_false if_null if_true loop_abort loop_continue loop_count params params_up return return_value run_children soap_definetag soap_lastrequest soap_lastresponse tag_name ascending average by define descending do equals frozen group handle_failure import in into join let match max min on order parent protected provide public require returnhome skip split_thread sum take thread to trait type where with yield yieldhome"},a=e.COMMENT("\x3c!--","--\x3e",{relevance:0}),o={className:"preprocessor",begin:"\\[noprocess\\]",starts:{className:"markup",end:"\\[/noprocess\\]",returnEnd:!0,contains:[a]}},s={className:"preprocessor",begin:"\\[/noprocess|"+n},c={className:"variable",begin:"'"+t+"'"},l=[e.COMMENT("/\\*\\*!","\\*/"),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.inherit(e.C_NUMBER_MODE,{begin:e.C_NUMBER_RE+"|(infinity|nan)\\b"}),e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"`",end:"`"},{className:"variable",variants:[{begin:"[#$]"+t},{begin:"#",end:"\\d+",illegal:"\\W"}]},{className:"tag",begin:"::\\s*",end:t,illegal:"\\W"},{className:"attribute",variants:[{begin:"-(?!infinity)"+e.UNDERSCORE_IDENT_RE,relevance:0},{begin:"(\\.\\.\\.)"}]},{className:"subst",variants:[{begin:"->\\s*",contains:[c]},{begin:"->|\\\\|&&?|\\|\\||!(?!=|>)|(and|or|not)\\b",relevance:0}]},{className:"built_in",begin:"\\.\\.?\\s*",relevance:0,contains:[c]},{className:"class",beginKeywords:"define",returnEnd:!0,end:"\\(|=>",contains:[e.inherit(e.TITLE_MODE,{begin:e.UNDERSCORE_IDENT_RE+"(=(?!>))?"})]}];return{aliases:["ls","lassoscript"],case_insensitive:!0,lexemes:t+"|&[lg]t;",keywords:i,contains:[{className:"preprocessor",begin:r,relevance:0,starts:{className:"markup",end:"\\[|"+n,returnEnd:!0,relevance:0,contains:[a]}},o,s,{className:"preprocessor",begin:"\\[no_square_brackets",starts:{end:"\\[/no_square_brackets\\]",lexemes:t+"|&[lg]t;",keywords:i,contains:[{className:"preprocessor",begin:r,relevance:0,starts:{className:"markup",end:"\\[noprocess\\]|"+n,returnEnd:!0,contains:[a]}},o,s].concat(l)}},{className:"preprocessor",begin:"\\[",relevance:0},{className:"shebang",begin:"^#!.+lasso9\\b",relevance:10}].concat(l)}}),i.registerLanguage("less",function(r){var e="[\\w-]+",t="([\\w-]+|@{[\\w-]+})",n=[],i=[],a=function(e){return{className:"string",begin:"~?"+e+".*?"+e}},o=function(e,t,n){return{className:e,begin:t,relevance:n}},s=function(e,t,n){return r.inherit({className:e,begin:t+"\\(",end:"\\(",returnBegin:!0,excludeEnd:!0,relevance:0},n)},c={begin:"\\(",end:"\\)",contains:i,relevance:0};i.push(r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,a("'"),a('"'),r.CSS_NUMBER_MODE,o("hexcolor","#[0-9A-Fa-f]+\\b"),s("function","(url|data-uri)",{starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}}),s("function",e),c,o("variable","@@?"+e,10),o("variable","@{[\\w-]+}"),o("built_in","~?`[^`]*?`"),{className:"attribute",begin:e+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0});var l=i.concat({begin:"{",end:"}",contains:n}),u={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(i)},f={className:"attribute",begin:t,end:":",excludeEnd:!0,contains:[r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE],illegal:/\S/,starts:{end:"[;}]",returnEnd:!0,contains:i,illegal:"[<=$]"}},d={className:"at_rule",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",returnEnd:!0,contains:i,relevance:0}},h={className:"variable",variants:[{begin:"@[\\w-]+\\s*:",relevance:15},{begin:"@"+e}],starts:{end:"[;}]",returnEnd:!0,contains:l}},p={variants:[{begin:"[\\.#:&\\[]",end:"[;{}]"},{begin:t+"[^;]*{",end:"{"}],returnBegin:!0,returnEnd:!0,illegal:"[<='$\"]",contains:[r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,u,o("keyword","all\\b"),o("variable","@{[\\w-]+}"),o("tag",t+"%?",0),o("id","#"+t),o("class","\\."+t,0),o("keyword","&",0),s("pseudo",":not"),s("keyword",":extend"),o("pseudo","::?"+t),{className:"attr_selector",begin:"\\[",end:"\\]"},{begin:"\\(",end:"\\)",contains:l},{begin:"!important"}]};return n.push(r.C_LINE_COMMENT_MODE,r.C_BLOCK_COMMENT_MODE,d,h,p,f),{case_insensitive:!0,illegal:"[=>'/<($\"]",contains:n}}),i.registerLanguage("lisp",function(e){var t="[a-zA-Z_\\-\\+\\*\\/\\<\\=\\>\\&\\#][a-zA-Z0-9_\\-\\+\\*\\/\\<\\=\\>\\&\\#!]*",n="\\|[^]*?\\|",r="(\\-|\\+)?\\d+(\\.\\d+|\\/\\d+)?((d|e|f|l|s|D|E|F|L|S)(\\+|\\-)?\\d+)?",i={className:"literal",begin:"\\b(t{1}|nil)\\b"},a={className:"number",variants:[{begin:r,relevance:0},{begin:"#(b|B)[0-1]+(/[0-1]+)?"},{begin:"#(o|O)[0-7]+(/[0-7]+)?"},{begin:"#(x|X)[0-9a-fA-F]+(/[0-9a-fA-F]+)?"},{begin:"#(c|C)\\("+r+" +"+r,end:"\\)"}]},o=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),s=e.COMMENT(";","$",{relevance:0}),c={className:"variable",begin:"\\*",end:"\\*"},l={className:"keyword",begin:"[:&]"+t},u={begin:t,relevance:0},f={begin:n},d={className:"quoted",contains:[a,o,c,l,{begin:"\\(",end:"\\)",contains:["self",i,o,a,u]},u],variants:[{begin:"['`]\\(",end:"\\)"},{begin:"\\(quote ",end:"\\)",keywords:"quote"},{begin:"'"+n}]},h={className:"quoted",variants:[{begin:"'"+t},{begin:"#'"+t+"(::"+t+")*"}]},p={className:"list",begin:"\\(\\s*",end:"\\)"},m={endsWithParent:!0,relevance:0};return p.contains=[{className:"keyword",variants:[{begin:t},{begin:n}]},m],m.contains=[d,h,p,i,a,o,s,c,l,f,u],{illegal:/\S/,contains:[a,{className:"shebang",begin:"^#!",end:"$"},i,o,s,d,h,p,u]}}),i.registerLanguage("livecodeserver",function(e){var t={className:"variable",begin:"\\b[gtps][A-Z]+[A-Za-z0-9_\\-]*\\b|\\$_[A-Z]+",relevance:0},n=[e.C_BLOCK_COMMENT_MODE,e.HASH_COMMENT_MODE,e.COMMENT("--","$"),e.COMMENT("[^:]//","$")],r=e.inherit(e.TITLE_MODE,{variants:[{begin:"\\b_*rig[A-Z]+[A-Za-z0-9_\\-]*"},{begin:"\\b_[a-z0-9\\-]+"}]}),i=e.inherit(e.TITLE_MODE,{begin:"\\b([A-Za-z0-9_\\-]+)\\b"});return{case_insensitive:!1,keywords:{keyword:"$_COOKIE $_FILES $_GET $_GET_BINARY $_GET_RAW $_POST $_POST_BINARY $_POST_RAW $_SESSION $_SERVER codepoint codepoints segment segments codeunit codeunits sentence sentences trueWord trueWords paragraph after byte bytes english the until http forever descending using line real8 with seventh for stdout finally element word words fourth before black ninth sixth characters chars stderr uInt1 uInt1s uInt2 uInt2s stdin string lines relative rel any fifth items from middle mid at else of catch then third it file milliseconds seconds second secs sec int1 int1s int4 int4s internet int2 int2s normal text item last long detailed effective uInt4 uInt4s repeat end repeat URL in try into switch to words https token binfile each tenth as ticks tick system real4 by dateItems without char character ascending eighth whole dateTime numeric short first ftp integer abbreviated abbr abbrev private case while if",constant:"SIX TEN FORMFEED NINE ZERO NONE SPACE FOUR FALSE COLON CRLF PI COMMA ENDOFFILE EOF EIGHT FIVE QUOTE EMPTY ONE TRUE RETURN CR LINEFEED RIGHT BACKSLASH NULL SEVEN TAB THREE TWO six ten formfeed nine zero none space four false colon crlf pi comma endoffile eof eight five quote empty one true return cr linefeed right backslash null seven tab three two RIVERSION RISTATE FILE_READ_MODE FILE_WRITE_MODE FILE_WRITE_MODE DIR_WRITE_MODE FILE_READ_UMASK FILE_WRITE_UMASK DIR_READ_UMASK DIR_WRITE_UMASK",operator:"div mod wrap and or bitAnd bitNot bitOr bitXor among not in a an within contains ends with begins the keys of keys",built_in:"put abs acos aliasReference annuity arrayDecode arrayEncode asin atan atan2 average avg avgDev base64Decode base64Encode baseConvert binaryDecode binaryEncode byteOffset byteToNum cachedURL cachedURLs charToNum cipherNames codepointOffset codepointProperty codepointToNum codeunitOffset commandNames compound compress constantNames cos date dateFormat decompress directories diskSpace DNSServers exp exp1 exp2 exp10 extents files flushEvents folders format functionNames geometricMean global globals hasMemory harmonicMean hostAddress hostAddressToName hostName hostNameToAddress isNumber ISOToMac itemOffset keys len length libURLErrorData libUrlFormData libURLftpCommand libURLLastHTTPHeaders libURLLastRHHeaders libUrlMultipartFormAddPart libUrlMultipartFormData libURLVersion lineOffset ln ln1 localNames log log2 log10 longFilePath lower macToISO matchChunk matchText matrixMultiply max md5Digest median merge millisec millisecs millisecond milliseconds min monthNames nativeCharToNum normalizeText num number numToByte numToChar numToCodepoint numToNativeChar offset open openfiles openProcesses openProcessIDs openSockets paragraphOffset paramCount param params peerAddress pendingMessages platform popStdDev populationStandardDeviation populationVariance popVariance processID random randomBytes replaceText result revCreateXMLTree revCreateXMLTreeFromFile revCurrentRecord revCurrentRecordIsFirst revCurrentRecordIsLast revDatabaseColumnCount revDatabaseColumnIsNull revDatabaseColumnLengths revDatabaseColumnNames revDatabaseColumnNamed revDatabaseColumnNumbered revDatabaseColumnTypes revDatabaseConnectResult revDatabaseCursors revDatabaseID revDatabaseTableNames revDatabaseType revDataFromQuery revdb_closeCursor revdb_columnbynumber revdb_columncount revdb_columnisnull revdb_columnlengths revdb_columnnames revdb_columntypes revdb_commit revdb_connect revdb_connections revdb_connectionerr revdb_currentrecord revdb_cursorconnection revdb_cursorerr revdb_cursors revdb_dbtype revdb_disconnect revdb_execute revdb_iseof revdb_isbof revdb_movefirst revdb_movelast revdb_movenext revdb_moveprev revdb_query revdb_querylist revdb_recordcount revdb_rollback revdb_tablenames revGetDatabaseDriverPath revNumberOfRecords revOpenDatabase revOpenDatabases revQueryDatabase revQueryDatabaseBlob revQueryResult revQueryIsAtStart revQueryIsAtEnd revUnixFromMacPath revXMLAttribute revXMLAttributes revXMLAttributeValues revXMLChildContents revXMLChildNames revXMLCreateTreeFromFileWithNamespaces revXMLCreateTreeWithNamespaces revXMLDataFromXPathQuery revXMLEvaluateXPath revXMLFirstChild revXMLMatchingNode revXMLNextSibling revXMLNodeContents revXMLNumberOfChildren revXMLParent revXMLPreviousSibling revXMLRootNode revXMLRPC_CreateRequest revXMLRPC_Documents revXMLRPC_Error revXMLRPC_GetHost revXMLRPC_GetMethod revXMLRPC_GetParam revXMLText revXMLRPC_Execute revXMLRPC_GetParamCount revXMLRPC_GetParamNode revXMLRPC_GetParamType revXMLRPC_GetPath revXMLRPC_GetPort revXMLRPC_GetProtocol revXMLRPC_GetRequest revXMLRPC_GetResponse revXMLRPC_GetSocket revXMLTree revXMLTrees revXMLValidateDTD revZipDescribeItem revZipEnumerateItems revZipOpenArchives round sampVariance sec secs seconds sentenceOffset sha1Digest shell shortFilePath sin specialFolderPath sqrt standardDeviation statRound stdDev sum sysError systemVersion tan tempName textDecode textEncode tick ticks time to tokenOffset toLower toUpper transpose truewordOffset trunc uniDecode uniEncode upper URLDecode URLEncode URLStatus uuid value variableNames variance version waitDepth weekdayNames wordOffset xsltApplyStylesheet xsltApplyStylesheetFromFile xsltLoadStylesheet xsltLoadStylesheetFromFile add breakpoint cancel clear local variable file word line folder directory URL close socket process combine constant convert create new alias folder directory decrypt delete variable word line folder directory URL dispatch divide do encrypt filter get include intersect kill libURLDownloadToFile libURLFollowHttpRedirects libURLftpUpload libURLftpUploadFile libURLresetAll libUrlSetAuthCallback libURLSetCustomHTTPHeaders libUrlSetExpect100 libURLSetFTPListCommand libURLSetFTPMode libURLSetFTPStopTime libURLSetStatusCallback load multiply socket prepare process post seek rel relative read from process rename replace require resetAll resolve revAddXMLNode revAppendXML revCloseCursor revCloseDatabase revCommitDatabase revCopyFile revCopyFolder revCopyXMLNode revDeleteFolder revDeleteXMLNode revDeleteAllXMLTrees revDeleteXMLTree revExecuteSQL revGoURL revInsertXMLNode revMoveFolder revMoveToFirstRecord revMoveToLastRecord revMoveToNextRecord revMoveToPreviousRecord revMoveToRecord revMoveXMLNode revPutIntoXMLNode revRollBackDatabase revSetDatabaseDriverPath revSetXMLAttribute revXMLRPC_AddParam revXMLRPC_DeleteAllDocuments revXMLAddDTD revXMLRPC_Free revXMLRPC_FreeAll revXMLRPC_DeleteDocument revXMLRPC_DeleteParam revXMLRPC_SetHost revXMLRPC_SetMethod revXMLRPC_SetPort revXMLRPC_SetProtocol revXMLRPC_SetSocket revZipAddItemWithData revZipAddItemWithFile revZipAddUncompressedItemWithData revZipAddUncompressedItemWithFile revZipCancel revZipCloseArchive revZipDeleteItem revZipExtractItemToFile revZipExtractItemToVariable revZipSetProgressCallback revZipRenameItem revZipReplaceItemWithData revZipReplaceItemWithFile revZipOpenArchive send set sort split start stop subtract union unload wait write"},contains:[t,{className:"keyword",begin:"\\bend\\sif\\b"},{className:"function",beginKeywords:"function",end:"$",contains:[t,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r]},{className:"function",begin:"\\bend\\s+",end:"$",keywords:"end",contains:[i,r]},{className:"command",beginKeywords:"command on",end:"$",contains:[t,i,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r]},{className:"preprocessor",variants:[{begin:"<\\?(rev|lc|livecode)",relevance:10},{begin:"<\\?"},{begin:"\\?>"}]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE,r].concat(n),illegal:";$|^\\[|^="}}),i.registerLanguage("livescript",function(e){var t={keyword:"in if for while finally new do return else break catch instanceof throw try this switch continue typeof delete debugger case default function var with then unless until loop of by when and or is isnt not it that otherwise from to til fallthrough super case default function var void const let enum export import native __hasProp __extends __slice __bind __indexOf",literal:"true false null undefined yes no on off it that void",built_in:"npm require console print module global window document"},n="[A-Za-z$_](?:-[0-9A-Za-z$_]|[0-9A-Za-z$_])*",r=e.inherit(e.TITLE_MODE,{begin:n}),i={className:"subst",begin:/#\{/,end:/}/,keywords:t},a={className:"subst",begin:/#[A-Za-z$_]/,end:/(?:\-[0-9A-Za-z$_]|[0-9A-Za-z$_])*/,keywords:t},o=[e.BINARY_NUMBER_MODE,{className:"number",begin:"(\\b0[xX][a-fA-F0-9_]+)|(\\b\\d(\\d|_\\d)*(\\.(\\d(\\d|_\\d)*)?)?(_*[eE]([-+]\\d(_\\d|\\d)*)?)?[_a-z]*)",relevance:0,starts:{end:"(\\s*/)?",relevance:0}},{className:"string",variants:[{begin:/'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE]},{begin:/'/,end:/'/,contains:[e.BACKSLASH_ESCAPE]},{begin:/"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,i,a]},{begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,i,a]},{begin:/\\/,end:/(\s|$)/,excludeEnd:!0}]},{className:"pi",variants:[{begin:"//",end:"//[gim]*",contains:[i,e.HASH_COMMENT_MODE]},{begin:/\/(?![ *])(\\\/|.)*?\/[gim]*(?=\W|$)/}]},{className:"property",begin:"@"+n},{begin:"``",end:"``",excludeBegin:!0,excludeEnd:!0,subLanguage:"javascript"}];i.contains=o;var s={className:"params",begin:"\\(",returnBegin:!0,contains:[{begin:/\(/,end:/\)/,keywords:t,contains:["self"].concat(o)}]};return{aliases:["ls"],keywords:t,illegal:/\/\*/,contains:o.concat([e.COMMENT("\\/\\*","\\*\\/"),e.HASH_COMMENT_MODE,{className:"function",contains:[r,s],returnBegin:!0,variants:[{begin:"("+n+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B\\->\\*?",end:"\\->\\*?"},{begin:"("+n+"\\s*(?:=|:=)\\s*)?!?(\\(.*\\))?\\s*\\B[-~]{1,2}>\\*?",end:"[-~]{1,2}>\\*?"},{begin:"("+n+"\\s*(?:=|:=)\\s*)?(\\(.*\\))?\\s*\\B!?[-~]{1,2}>\\*?",end:"!?[-~]{1,2}>\\*?"}]},{className:"class",beginKeywords:"class",end:"$",illegal:/[:="\[\]]/,contains:[{beginKeywords:"extends",endsWithParent:!0,illegal:/[:="\[\]]/,contains:[r]},r]},{className:"attribute",begin:n+":",end:":",returnBegin:!0,returnEnd:!0,relevance:0}])}}),i.registerLanguage("lua",function(e){var t="\\[=*\\[",n="\\]=*\\]",r={begin:t,end:n,contains:["self"]},i=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[r],relevance:10})];return{lexemes:e.UNDERSCORE_IDENT_RE,keywords:{keyword:"and break do else elseif end false for if in local nil not or repeat return then true until while",built_in:"_G _VERSION assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall coroutine debug io math os package string table"},contains:i.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:i}].concat(i)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[r],relevance:5}])}}),i.registerLanguage("makefile",function(e){var t={className:"variable",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]};return{aliases:["mk","mak"],contains:[e.HASH_COMMENT_MODE,{begin:/^\w+\s*\W*=/,returnBegin:!0,relevance:0,starts:{className:"constant",end:/\s*\W*=/,excludeEnd:!0,starts:{end:/$/,relevance:0,contains:[t]}}},{className:"title",begin:/^[\w]+:\s*$/},{className:"phony",begin:/^\.PHONY:/,end:/$/,keywords:".PHONY",lexemes:/[\.\w]+/},{begin:/^\t+/,end:/$/,relevance:0,contains:[e.QUOTE_STRING_MODE,t]}]}}),i.registerLanguage("mathematica",function(e){return{aliases:["mma"],lexemes:"(\\$|\\b)"+e.IDENT_RE+"\\b",keywords:"AbelianGroup Abort AbortKernels AbortProtect Above Abs Absolute AbsoluteCorrelation AbsoluteCorrelationFunction AbsoluteCurrentValue AbsoluteDashing AbsoluteFileName AbsoluteOptions AbsolutePointSize AbsoluteThickness AbsoluteTime AbsoluteTiming AccountingForm Accumulate Accuracy AccuracyGoal ActionDelay ActionMenu ActionMenuBox ActionMenuBoxOptions Active ActiveItem ActiveStyle AcyclicGraphQ AddOnHelpPath AddTo AdjacencyGraph AdjacencyList AdjacencyMatrix AdjustmentBox AdjustmentBoxOptions AdjustTimeSeriesForecast AffineTransform After AiryAi AiryAiPrime AiryAiZero AiryBi AiryBiPrime AiryBiZero AlgebraicIntegerQ AlgebraicNumber AlgebraicNumberDenominator AlgebraicNumberNorm AlgebraicNumberPolynomial AlgebraicNumberTrace AlgebraicRules AlgebraicRulesData Algebraics AlgebraicUnitQ Alignment AlignmentMarker AlignmentPoint All AllowedDimensions AllowGroupClose AllowInlineCells AllowKernelInitialization AllowReverseGroupClose AllowScriptLevelChange AlphaChannel AlternatingGroup AlternativeHypothesis Alternatives AmbientLight Analytic AnchoredSearch And AndersonDarlingTest AngerJ AngleBracket AngularGauge Animate AnimationCycleOffset AnimationCycleRepetitions AnimationDirection AnimationDisplayTime AnimationRate AnimationRepetitions AnimationRunning Animator AnimatorBox AnimatorBoxOptions AnimatorElements Annotation Annuity AnnuityDue Antialiasing Antisymmetric Apart ApartSquareFree Appearance AppearanceElements AppellF1 Append AppendTo Apply ArcCos ArcCosh ArcCot ArcCoth ArcCsc ArcCsch ArcSec ArcSech ArcSin ArcSinDistribution ArcSinh ArcTan ArcTanh Arg ArgMax ArgMin ArgumentCountQ ARIMAProcess ArithmeticGeometricMean ARMAProcess ARProcess Array ArrayComponents ArrayDepth ArrayFlatten ArrayPad ArrayPlot ArrayQ ArrayReshape ArrayRules Arrays Arrow Arrow3DBox ArrowBox Arrowheads AspectRatio AspectRatioFixed Assert Assuming Assumptions AstronomicalData Asynchronous AsynchronousTaskObject AsynchronousTasks AtomQ Attributes AugmentedSymmetricPolynomial AutoAction AutoDelete AutoEvaluateEvents AutoGeneratedPackage AutoIndent AutoIndentSpacings AutoItalicWords AutoloadPath AutoMatch Automatic AutomaticImageSize AutoMultiplicationSymbol AutoNumberFormatting AutoOpenNotebooks AutoOpenPalettes AutorunSequencing AutoScaling AutoScroll AutoSpacing AutoStyleOptions AutoStyleWords Axes AxesEdge AxesLabel AxesOrigin AxesStyle Axis BabyMonsterGroupB Back Background BackgroundTasksSettings Backslash Backsubstitution Backward Band BandpassFilter BandstopFilter BarabasiAlbertGraphDistribution BarChart BarChart3D BarLegend BarlowProschanImportance BarnesG BarOrigin BarSpacing BartlettHannWindow BartlettWindow BaseForm Baseline BaselinePosition BaseStyle BatesDistribution BattleLemarieWavelet Because BeckmannDistribution Beep Before Begin BeginDialogPacket BeginFrontEndInteractionPacket BeginPackage BellB BellY Below BenfordDistribution BeniniDistribution BenktanderGibratDistribution BenktanderWeibullDistribution BernoulliB BernoulliDistribution BernoulliGraphDistribution BernoulliProcess BernsteinBasis BesselFilterModel BesselI BesselJ BesselJZero BesselK BesselY BesselYZero Beta BetaBinomialDistribution BetaDistribution BetaNegativeBinomialDistribution BetaPrimeDistribution BetaRegularized BetweennessCentrality BezierCurve BezierCurve3DBox BezierCurve3DBoxOptions BezierCurveBox BezierCurveBoxOptions BezierFunction BilateralFilter Binarize BinaryFormat BinaryImageQ BinaryRead BinaryReadList BinaryWrite BinCounts BinLists Binomial BinomialDistribution BinomialProcess BinormalDistribution BiorthogonalSplineWavelet BipartiteGraphQ BirnbaumImportance BirnbaumSaundersDistribution BitAnd BitClear BitGet BitLength BitNot BitOr BitSet BitShiftLeft BitShiftRight BitXor Black BlackmanHarrisWindow BlackmanNuttallWindow BlackmanWindow Blank BlankForm BlankNullSequence BlankSequence Blend Block BlockRandom BlomqvistBeta BlomqvistBetaTest Blue Blur BodePlot BohmanWindow Bold Bookmarks Boole BooleanConsecutiveFunction BooleanConvert BooleanCountingFunction BooleanFunction BooleanGraph BooleanMaxterms BooleanMinimize BooleanMinterms Booleans BooleanTable BooleanVariables BorderDimensions BorelTannerDistribution Bottom BottomHatTransform BoundaryStyle Bounds Box BoxBaselineShift BoxData BoxDimensions Boxed Boxes BoxForm BoxFormFormatTypes BoxFrame BoxID BoxMargins BoxMatrix BoxRatios BoxRotation BoxRotationPoint BoxStyle BoxWhiskerChart Bra BracketingBar BraKet BrayCurtisDistance BreadthFirstScan Break Brown BrownForsytheTest BrownianBridgeProcess BrowserCategory BSplineBasis BSplineCurve BSplineCurve3DBox BSplineCurveBox BSplineCurveBoxOptions BSplineFunction BSplineSurface BSplineSurface3DBox BubbleChart BubbleChart3D BubbleScale BubbleSizes BulletGauge BusinessDayQ ButterflyGraph ButterworthFilterModel Button ButtonBar ButtonBox ButtonBoxOptions ButtonCell ButtonContents ButtonData ButtonEvaluator ButtonExpandable ButtonFrame ButtonFunction ButtonMargins ButtonMinHeight ButtonNote ButtonNotebook ButtonSource ButtonStyle ButtonStyleMenuListing Byte ByteCount ByteOrdering C CachedValue CacheGraphics CalendarData CalendarType CallPacket CanberraDistance Cancel CancelButton CandlestickChart Cap CapForm CapitalDifferentialD CardinalBSplineBasis CarmichaelLambda Cases Cashflow Casoratian Catalan CatalanNumber Catch CauchyDistribution CauchyWindow CayleyGraph CDF CDFDeploy CDFInformation CDFWavelet Ceiling Cell CellAutoOverwrite CellBaseline CellBoundingBox CellBracketOptions CellChangeTimes CellContents CellContext CellDingbat CellDynamicExpression CellEditDuplicate CellElementsBoundingBox CellElementSpacings CellEpilog CellEvaluationDuplicate CellEvaluationFunction CellEventActions CellFrame CellFrameColor CellFrameLabelMargins CellFrameLabels CellFrameMargins CellGroup CellGroupData CellGrouping CellGroupingRules CellHorizontalScrolling CellID CellLabel CellLabelAutoDelete CellLabelMargins CellLabelPositioning CellMargins CellObject CellOpen CellPrint CellProlog Cells CellSize CellStyle CellTags CellularAutomaton CensoredDistribution Censoring Center CenterDot CentralMoment CentralMomentGeneratingFunction CForm ChampernowneNumber ChanVeseBinarize Character CharacterEncoding CharacterEncodingsPath CharacteristicFunction CharacteristicPolynomial CharacterRange Characters ChartBaseStyle ChartElementData ChartElementDataFunction ChartElementFunction ChartElements ChartLabels ChartLayout ChartLegends ChartStyle Chebyshev1FilterModel Chebyshev2FilterModel ChebyshevDistance ChebyshevT ChebyshevU Check CheckAbort CheckAll Checkbox CheckboxBar CheckboxBox CheckboxBoxOptions ChemicalData ChessboardDistance ChiDistribution ChineseRemainder ChiSquareDistribution ChoiceButtons ChoiceDialog CholeskyDecomposition Chop Circle CircleBox CircleDot CircleMinus CirclePlus CircleTimes CirculantGraph CityData Clear ClearAll ClearAttributes ClearSystemCache ClebschGordan ClickPane Clip ClipboardNotebook ClipFill ClippingStyle ClipPlanes ClipRange Clock ClockGauge ClockwiseContourIntegral Close Closed CloseKernels ClosenessCentrality Closing ClosingAutoSave ClosingEvent ClusteringComponents CMYKColor Coarse Coefficient CoefficientArrays CoefficientDomain CoefficientList CoefficientRules CoifletWavelet Collect Colon ColonForm ColorCombine ColorConvert ColorData ColorDataFunction ColorFunction ColorFunctionScaling Colorize ColorNegate ColorOutput ColorProfileData ColorQuantize ColorReplace ColorRules ColorSelectorSettings ColorSeparate ColorSetter ColorSetterBox ColorSetterBoxOptions ColorSlider ColorSpace Column ColumnAlignments ColumnBackgrounds ColumnForm ColumnLines ColumnsEqual ColumnSpacings ColumnWidths CommonDefaultFormatTypes Commonest CommonestFilter CommonUnits CommunityBoundaryStyle CommunityGraphPlot CommunityLabels CommunityRegionStyle CompatibleUnitQ CompilationOptions CompilationTarget Compile Compiled CompiledFunction Complement CompleteGraph CompleteGraphQ CompleteKaryTree CompletionsListPacket Complex Complexes ComplexExpand ComplexInfinity ComplexityFunction ComponentMeasurements ComponentwiseContextMenu Compose ComposeList ComposeSeries Composition CompoundExpression CompoundPoissonDistribution CompoundPoissonProcess CompoundRenewalProcess Compress CompressedData Condition ConditionalExpression Conditioned Cone ConeBox ConfidenceLevel ConfidenceRange ConfidenceTransform ConfigurationPath Congruent Conjugate ConjugateTranspose Conjunction Connect ConnectedComponents ConnectedGraphQ ConnesWindow ConoverTest ConsoleMessage ConsoleMessagePacket ConsolePrint Constant ConstantArray Constants ConstrainedMax ConstrainedMin ContentPadding ContentsBoundingBox ContentSelectable ContentSize Context ContextMenu Contexts ContextToFilename ContextToFileName Continuation Continue ContinuedFraction ContinuedFractionK ContinuousAction ContinuousMarkovProcess ContinuousTimeModelQ ContinuousWaveletData ContinuousWaveletTransform ContourDetect ContourGraphics ContourIntegral ContourLabels ContourLines ContourPlot ContourPlot3D Contours ContourShading ContourSmoothing ContourStyle ContraharmonicMean Control ControlActive ControlAlignment ControllabilityGramian ControllabilityMatrix ControllableDecomposition ControllableModelQ ControllerDuration ControllerInformation ControllerInformationData ControllerLinking ControllerManipulate ControllerMethod ControllerPath ControllerState ControlPlacement ControlsRendering ControlType Convergents ConversionOptions ConversionRules ConvertToBitmapPacket ConvertToPostScript ConvertToPostScriptPacket Convolve ConwayGroupCo1 ConwayGroupCo2 ConwayGroupCo3 CoordinateChartData CoordinatesToolOptions CoordinateTransform CoordinateTransformData CoprimeQ Coproduct CopulaDistribution Copyable CopyDirectory CopyFile CopyTag CopyToClipboard CornerFilter CornerNeighbors Correlation CorrelationDistance CorrelationFunction CorrelationTest Cos Cosh CoshIntegral CosineDistance CosineWindow CosIntegral Cot Coth Count CounterAssignments CounterBox CounterBoxOptions CounterClockwiseContourIntegral CounterEvaluator CounterFunction CounterIncrements CounterStyle CounterStyleMenuListing CountRoots CountryData Covariance CovarianceEstimatorFunction CovarianceFunction CoxianDistribution CoxIngersollRossProcess CoxModel CoxModelFit CramerVonMisesTest CreateArchive CreateDialog CreateDirectory CreateDocument CreateIntermediateDirectories CreatePalette CreatePalettePacket CreateScheduledTask CreateTemporary CreateWindow CriticalityFailureImportance CriticalitySuccessImportance CriticalSection Cross CrossingDetect CrossMatrix Csc Csch CubeRoot Cubics Cuboid CuboidBox Cumulant CumulantGeneratingFunction Cup CupCap Curl CurlyDoubleQuote CurlyQuote CurrentImage CurrentlySpeakingPacket CurrentValue CurvatureFlowFilter CurveClosed Cyan CycleGraph CycleIndexPolynomial Cycles CyclicGroup Cyclotomic Cylinder CylinderBox CylindricalDecomposition D DagumDistribution DamerauLevenshteinDistance DampingFactor Darker Dashed Dashing DataCompression DataDistribution DataRange DataReversed Date DateDelimiters DateDifference DateFunction DateList DateListLogPlot DateListPlot DatePattern DatePlus DateRange DateString DateTicksFormat DaubechiesWavelet DavisDistribution DawsonF DayCount DayCountConvention DayMatchQ DayName DayPlus DayRange DayRound DeBruijnGraph Debug DebugTag Decimal DeclareKnownSymbols DeclarePackage Decompose Decrement DedekindEta Default DefaultAxesStyle DefaultBaseStyle DefaultBoxStyle DefaultButton DefaultColor DefaultControlPlacement DefaultDuplicateCellStyle DefaultDuration DefaultElement DefaultFaceGridsStyle DefaultFieldHintStyle DefaultFont DefaultFontProperties DefaultFormatType DefaultFormatTypeForStyle DefaultFrameStyle DefaultFrameTicksStyle DefaultGridLinesStyle DefaultInlineFormatType DefaultInputFormatType DefaultLabelStyle DefaultMenuStyle DefaultNaturalLanguage DefaultNewCellStyle DefaultNewInlineCellStyle DefaultNotebook DefaultOptions DefaultOutputFormatType DefaultStyle DefaultStyleDefinitions DefaultTextFormatType DefaultTextInlineFormatType DefaultTicksStyle DefaultTooltipStyle DefaultValues Defer DefineExternal DefineInputStreamMethod DefineOutputStreamMethod Definition Degree DegreeCentrality DegreeGraphDistribution DegreeLexicographic DegreeReverseLexicographic Deinitialization Del Deletable Delete DeleteBorderComponents DeleteCases DeleteContents DeleteDirectory DeleteDuplicates DeleteFile DeleteSmallComponents DeleteWithContents DeletionWarning Delimiter DelimiterFlashTime DelimiterMatching Delimiters Denominator DensityGraphics DensityHistogram DensityPlot DependentVariables Deploy Deployed Depth DepthFirstScan Derivative DerivativeFilter DescriptorStateSpace DesignMatrix Det DGaussianWavelet DiacriticalPositioning Diagonal DiagonalMatrix Dialog DialogIndent DialogInput DialogLevel DialogNotebook DialogProlog DialogReturn DialogSymbols Diamond DiamondMatrix DiceDissimilarity DictionaryLookup DifferenceDelta DifferenceOrder DifferenceRoot DifferenceRootReduce Differences DifferentialD DifferentialRoot DifferentialRootReduce DifferentiatorFilter DigitBlock DigitBlockMinimum DigitCharacter DigitCount DigitQ DihedralGroup Dilation Dimensions DiracComb DiracDelta DirectedEdge DirectedEdges DirectedGraph DirectedGraphQ DirectedInfinity Direction Directive Directory DirectoryName DirectoryQ DirectoryStack DirichletCharacter DirichletConvolve DirichletDistribution DirichletL DirichletTransform DirichletWindow DisableConsolePrintPacket DiscreteChirpZTransform DiscreteConvolve DiscreteDelta DiscreteHadamardTransform DiscreteIndicator DiscreteLQEstimatorGains DiscreteLQRegulatorGains DiscreteLyapunovSolve DiscreteMarkovProcess DiscretePlot DiscretePlot3D DiscreteRatio DiscreteRiccatiSolve DiscreteShift DiscreteTimeModelQ DiscreteUniformDistribution DiscreteVariables DiscreteWaveletData DiscreteWaveletPacketTransform DiscreteWaveletTransform Discriminant Disjunction Disk DiskBox DiskMatrix Dispatch DispersionEstimatorFunction Display DisplayAllSteps DisplayEndPacket DisplayFlushImagePacket DisplayForm DisplayFunction DisplayPacket DisplayRules DisplaySetSizePacket DisplayString DisplayTemporary DisplayWith DisplayWithRef DisplayWithVariable DistanceFunction DistanceTransform Distribute Distributed DistributedContexts DistributeDefinitions DistributionChart DistributionDomain DistributionFitTest DistributionParameterAssumptions DistributionParameterQ Dithering Div Divergence Divide DivideBy Dividers Divisible Divisors DivisorSigma DivisorSum DMSList DMSString Do DockedCells DocumentNotebook DominantColors DOSTextFormat Dot DotDashed DotEqual Dotted DoubleBracketingBar DoubleContourIntegral DoubleDownArrow DoubleLeftArrow DoubleLeftRightArrow DoubleLeftTee DoubleLongLeftArrow DoubleLongLeftRightArrow DoubleLongRightArrow DoubleRightArrow DoubleRightTee DoubleUpArrow DoubleUpDownArrow DoubleVerticalBar DoublyInfinite Down DownArrow DownArrowBar DownArrowUpArrow DownLeftRightVector DownLeftTeeVector DownLeftVector DownLeftVectorBar DownRightTeeVector DownRightVector DownRightVectorBar Downsample DownTee DownTeeArrow DownValues DragAndDrop DrawEdges DrawFrontFaces DrawHighlighted Drop DSolve Dt DualLinearProgramming DualSystemsModel DumpGet DumpSave DuplicateFreeQ Dynamic DynamicBox DynamicBoxOptions DynamicEvaluationTimeout DynamicLocation DynamicModule DynamicModuleBox DynamicModuleBoxOptions DynamicModuleParent DynamicModuleValues DynamicName DynamicNamespace DynamicReference DynamicSetting DynamicUpdating DynamicWrapper DynamicWrapperBox DynamicWrapperBoxOptions E EccentricityCentrality EdgeAdd EdgeBetweennessCentrality EdgeCapacity EdgeCapForm EdgeColor EdgeConnectivity EdgeCost EdgeCount EdgeCoverQ EdgeDashing EdgeDelete EdgeDetect EdgeForm EdgeIndex EdgeJoinForm EdgeLabeling EdgeLabels EdgeLabelStyle EdgeList EdgeOpacity EdgeQ EdgeRenderingFunction EdgeRules EdgeShapeFunction EdgeStyle EdgeThickness EdgeWeight Editable EditButtonSettings EditCellTagsSettings EditDistance EffectiveInterest Eigensystem Eigenvalues EigenvectorCentrality Eigenvectors Element ElementData Eliminate EliminationOrder EllipticE EllipticExp EllipticExpPrime EllipticF EllipticFilterModel EllipticK EllipticLog EllipticNomeQ EllipticPi EllipticReducedHalfPeriods EllipticTheta EllipticThetaPrime EmitSound EmphasizeSyntaxErrors EmpiricalDistribution Empty EmptyGraphQ EnableConsolePrintPacket Enabled Encode End EndAdd EndDialogPacket EndFrontEndInteractionPacket EndOfFile EndOfLine EndOfString EndPackage EngineeringForm Enter EnterExpressionPacket EnterTextPacket Entropy EntropyFilter Environment Epilog Equal EqualColumns EqualRows EqualTilde EquatedTo Equilibrium EquirippleFilterKernel Equivalent Erf Erfc Erfi ErlangB ErlangC ErlangDistribution Erosion ErrorBox ErrorBoxOptions ErrorNorm ErrorPacket ErrorsDialogSettings EstimatedDistribution EstimatedProcess EstimatorGains EstimatorRegulator EuclideanDistance EulerE EulerGamma EulerianGraphQ EulerPhi Evaluatable Evaluate Evaluated EvaluatePacket EvaluationCell EvaluationCompletionAction EvaluationElements EvaluationMode EvaluationMonitor EvaluationNotebook EvaluationObject EvaluationOrder Evaluator EvaluatorNames EvenQ EventData EventEvaluator EventHandler EventHandlerTag EventLabels ExactBlackmanWindow ExactNumberQ ExactRootIsolation ExampleData Except ExcludedForms ExcludePods Exclusions ExclusionsStyle Exists Exit ExitDialog Exp Expand ExpandAll ExpandDenominator ExpandFileName ExpandNumerator Expectation ExpectationE ExpectedValue ExpGammaDistribution ExpIntegralE ExpIntegralEi Exponent ExponentFunction ExponentialDistribution ExponentialFamily ExponentialGeneratingFunction ExponentialMovingAverage ExponentialPowerDistribution ExponentPosition ExponentStep Export ExportAutoReplacements ExportPacket ExportString Expression ExpressionCell ExpressionPacket ExpToTrig ExtendedGCD Extension ExtentElementFunction ExtentMarkers ExtentSize ExternalCall ExternalDataCharacterEncoding Extract ExtractArchive ExtremeValueDistribution FaceForm FaceGrids FaceGridsStyle Factor FactorComplete Factorial Factorial2 FactorialMoment FactorialMomentGeneratingFunction FactorialPower FactorInteger FactorList FactorSquareFree FactorSquareFreeList FactorTerms FactorTermsList Fail FailureDistribution False FARIMAProcess FEDisableConsolePrintPacket FeedbackSector FeedbackSectorStyle FeedbackType FEEnableConsolePrintPacket Fibonacci FieldHint FieldHintStyle FieldMasked FieldSize File FileBaseName FileByteCount FileDate FileExistsQ FileExtension FileFormat FileHash FileInformation FileName FileNameDepth FileNameDialogSettings FileNameDrop FileNameJoin FileNames FileNameSetter FileNameSplit FileNameTake FilePrint FileType FilledCurve FilledCurveBox Filling FillingStyle FillingTransform FilterRules FinancialBond FinancialData FinancialDerivative FinancialIndicator Find FindArgMax FindArgMin FindClique FindClusters FindCurvePath FindDistributionParameters FindDivisions FindEdgeCover FindEdgeCut FindEulerianCycle FindFaces FindFile FindFit FindGeneratingFunction FindGeoLocation FindGeometricTransform FindGraphCommunities FindGraphIsomorphism FindGraphPartition FindHamiltonianCycle FindIndependentEdgeSet FindIndependentVertexSet FindInstance FindIntegerNullVector FindKClan FindKClique FindKClub FindKPlex FindLibrary FindLinearRecurrence FindList FindMaximum FindMaximumFlow FindMaxValue FindMinimum FindMinimumCostFlow FindMinimumCut FindMinValue FindPermutation FindPostmanTour FindProcessParameters FindRoot FindSequenceFunction FindSettings FindShortestPath FindShortestTour FindThreshold FindVertexCover FindVertexCut Fine FinishDynamic FiniteAbelianGroupCount FiniteGroupCount FiniteGroupData First FirstPassageTimeDistribution FischerGroupFi22 FischerGroupFi23 FischerGroupFi24Prime FisherHypergeometricDistribution FisherRatioTest FisherZDistribution Fit FitAll FittedModel FixedPoint FixedPointList FlashSelection Flat Flatten FlattenAt FlatTopWindow FlipView Floor FlushPrintOutputPacket Fold FoldList Font FontColor FontFamily FontForm FontName FontOpacity FontPostScriptName FontProperties FontReencoding FontSize FontSlant FontSubstitutions FontTracking FontVariations FontWeight For ForAll Format FormatRules FormatType FormatTypeAutoConvert FormatValues FormBox FormBoxOptions FortranForm Forward ForwardBackward Fourier FourierCoefficient FourierCosCoefficient FourierCosSeries FourierCosTransform FourierDCT FourierDCTFilter FourierDCTMatrix FourierDST FourierDSTMatrix FourierMatrix FourierParameters FourierSequenceTransform FourierSeries FourierSinCoefficient FourierSinSeries FourierSinTransform FourierTransform FourierTrigSeries FractionalBrownianMotionProcess FractionalPart FractionBox FractionBoxOptions FractionLine Frame FrameBox FrameBoxOptions Framed FrameInset FrameLabel Frameless FrameMargins FrameStyle FrameTicks FrameTicksStyle FRatioDistribution FrechetDistribution FreeQ FrequencySamplingFilterKernel FresnelC FresnelS Friday FrobeniusNumber FrobeniusSolve FromCharacterCode FromCoefficientRules FromContinuedFraction FromDate FromDigits FromDMS Front FrontEndDynamicExpression FrontEndEventActions FrontEndExecute FrontEndObject FrontEndResource FrontEndResourceString FrontEndStackSize FrontEndToken FrontEndTokenExecute FrontEndValueCache FrontEndVersion FrontFaceColor FrontFaceOpacity Full FullAxes FullDefinition FullForm FullGraphics FullOptions FullSimplify Function FunctionExpand FunctionInterpolation FunctionSpace FussellVeselyImportance GaborFilter GaborMatrix GaborWavelet GainMargins GainPhaseMargins Gamma GammaDistribution GammaRegularized GapPenalty Gather GatherBy GaugeFaceElementFunction GaugeFaceStyle GaugeFrameElementFunction GaugeFrameSize GaugeFrameStyle GaugeLabels GaugeMarkers GaugeStyle GaussianFilter GaussianIntegers GaussianMatrix GaussianWindow GCD GegenbauerC General GeneralizedLinearModelFit GenerateConditions GeneratedCell GeneratedParameters GeneratingFunction Generic GenericCylindricalDecomposition GenomeData GenomeLookup GeodesicClosing GeodesicDilation GeodesicErosion GeodesicOpening GeoDestination GeodesyData GeoDirection GeoDistance GeoGridPosition GeometricBrownianMotionProcess GeometricDistribution GeometricMean GeometricMeanFilter GeometricTransformation GeometricTransformation3DBox GeometricTransformation3DBoxOptions GeometricTransformationBox GeometricTransformationBoxOptions GeoPosition GeoPositionENU GeoPositionXYZ GeoProjectionData GestureHandler GestureHandlerTag Get GetBoundingBoxSizePacket GetContext GetEnvironment GetFileName GetFrontEndOptionsDataPacket GetLinebreakInformationPacket GetMenusPacket GetPageBreakInformationPacket Glaisher GlobalClusteringCoefficient GlobalPreferences GlobalSession Glow GoldenRatio GompertzMakehamDistribution GoodmanKruskalGamma GoodmanKruskalGammaTest Goto Grad Gradient GradientFilter GradientOrientationFilter Graph GraphAssortativity GraphCenter GraphComplement GraphData GraphDensity GraphDiameter GraphDifference GraphDisjointUnion GraphDistance GraphDistanceMatrix GraphElementData GraphEmbedding GraphHighlight GraphHighlightStyle GraphHub Graphics Graphics3D Graphics3DBox Graphics3DBoxOptions GraphicsArray GraphicsBaseline GraphicsBox GraphicsBoxOptions GraphicsColor GraphicsColumn GraphicsComplex GraphicsComplex3DBox GraphicsComplex3DBoxOptions GraphicsComplexBox GraphicsComplexBoxOptions GraphicsContents GraphicsData GraphicsGrid GraphicsGridBox GraphicsGroup GraphicsGroup3DBox GraphicsGroup3DBoxOptions GraphicsGroupBox GraphicsGroupBoxOptions GraphicsGrouping GraphicsHighlightColor GraphicsRow GraphicsSpacing GraphicsStyle GraphIntersection GraphLayout GraphLinkEfficiency GraphPeriphery GraphPlot GraphPlot3D GraphPower GraphPropertyDistribution GraphQ GraphRadius GraphReciprocity GraphRoot GraphStyle GraphUnion Gray GrayLevel GreatCircleDistance Greater GreaterEqual GreaterEqualLess GreaterFullEqual GreaterGreater GreaterLess GreaterSlantEqual GreaterTilde Green Grid GridBaseline GridBox GridBoxAlignment GridBoxBackground GridBoxDividers GridBoxFrame GridBoxItemSize GridBoxItemStyle GridBoxOptions GridBoxSpacings GridCreationSettings GridDefaultElement GridElementStyleOptions GridFrame GridFrameMargins GridGraph GridLines GridLinesStyle GroebnerBasis GroupActionBase GroupCentralizer GroupElementFromWord GroupElementPosition GroupElementQ GroupElements GroupElementToWord GroupGenerators GroupMultiplicationTable GroupOrbits GroupOrder GroupPageBreakWithin GroupSetwiseStabilizer GroupStabilizer GroupStabilizerChain Gudermannian GumbelDistribution HaarWavelet HadamardMatrix HalfNormalDistribution HamiltonianGraphQ HammingDistance HammingWindow HankelH1 HankelH2 HankelMatrix HannPoissonWindow HannWindow HaradaNortonGroupHN HararyGraph HarmonicMean HarmonicMeanFilter HarmonicNumber Hash HashTable Haversine HazardFunction Head HeadCompose Heads HeavisideLambda HeavisidePi HeavisideTheta HeldGroupHe HeldPart HelpBrowserLookup HelpBrowserNotebook HelpBrowserSettings HermiteDecomposition HermiteH HermitianMatrixQ HessenbergDecomposition Hessian HexadecimalCharacter Hexahedron HexahedronBox HexahedronBoxOptions HiddenSurface HighlightGraph HighlightImage HighpassFilter HigmanSimsGroupHS HilbertFilter HilbertMatrix Histogram Histogram3D HistogramDistribution HistogramList HistogramTransform HistogramTransformInterpolation HitMissTransform HITSCentrality HodgeDual HoeffdingD HoeffdingDTest Hold HoldAll HoldAllComplete HoldComplete HoldFirst HoldForm HoldPattern HoldRest HolidayCalendar HomeDirectory HomePage Horizontal HorizontalForm HorizontalGauge HorizontalScrollPosition HornerForm HotellingTSquareDistribution HoytDistribution HTMLSave Hue HumpDownHump HumpEqual HurwitzLerchPhi HurwitzZeta HyperbolicDistribution HypercubeGraph HyperexponentialDistribution Hyperfactorial Hypergeometric0F1 Hypergeometric0F1Regularized Hypergeometric1F1 Hypergeometric1F1Regularized Hypergeometric2F1 Hypergeometric2F1Regularized HypergeometricDistribution HypergeometricPFQ HypergeometricPFQRegularized HypergeometricU Hyperlink HyperlinkCreationSettings Hyphenation HyphenationOptions HypoexponentialDistribution HypothesisTestData I Identity IdentityMatrix If IgnoreCase Im Image Image3D Image3DSlices ImageAccumulate ImageAdd ImageAdjust ImageAlign ImageApply ImageAspectRatio ImageAssemble ImageCache ImageCacheValid ImageCapture ImageChannels ImageClip ImageColorSpace ImageCompose ImageConvolve ImageCooccurrence ImageCorners ImageCorrelate ImageCorrespondingPoints ImageCrop ImageData ImageDataPacket ImageDeconvolve ImageDemosaic ImageDifference ImageDimensions ImageDistance ImageEffect ImageFeatureTrack ImageFileApply ImageFileFilter ImageFileScan ImageFilter ImageForestingComponents ImageForwardTransformation ImageHistogram ImageKeypoints ImageLevels ImageLines ImageMargins ImageMarkers ImageMeasurements ImageMultiply ImageOffset ImagePad ImagePadding ImagePartition ImagePeriodogram ImagePerspectiveTransformation ImageQ ImageRangeCache ImageReflect ImageRegion ImageResize ImageResolution ImageRotate ImageRotated ImageScaled ImageScan ImageSize ImageSizeAction ImageSizeCache ImageSizeMultipliers ImageSizeRaw ImageSubtract ImageTake ImageTransformation ImageTrim ImageType ImageValue ImageValuePositions Implies Import ImportAutoReplacements ImportString ImprovementImportance In IncidenceGraph IncidenceList IncidenceMatrix IncludeConstantBasis IncludeFileExtension IncludePods IncludeSingularTerm Increment Indent IndentingNewlineSpacings IndentMaxFraction IndependenceTest IndependentEdgeSetQ IndependentUnit IndependentVertexSetQ Indeterminate IndexCreationOptions Indexed IndexGraph IndexTag Inequality InexactNumberQ InexactNumbers Infinity Infix Information Inherited InheritScope Initialization InitializationCell InitializationCellEvaluation InitializationCellWarning InlineCounterAssignments InlineCounterIncrements InlineRules Inner Inpaint Input InputAliases InputAssumptions InputAutoReplacements InputField InputFieldBox InputFieldBoxOptions InputForm InputGrouping InputNamePacket InputNotebook InputPacket InputSettings InputStream InputString InputStringPacket InputToBoxFormPacket Insert InsertionPointObject InsertResults Inset Inset3DBox Inset3DBoxOptions InsetBox InsetBoxOptions Install InstallService InString Integer IntegerDigits IntegerExponent IntegerLength IntegerPart IntegerPartitions IntegerQ Integers IntegerString Integral Integrate Interactive InteractiveTradingChart Interlaced Interleaving InternallyBalancedDecomposition InterpolatingFunction InterpolatingPolynomial Interpolation InterpolationOrder InterpolationPoints InterpolationPrecision Interpretation InterpretationBox InterpretationBoxOptions InterpretationFunction InterpretTemplate InterquartileRange Interrupt InterruptSettings Intersection Interval IntervalIntersection IntervalMemberQ IntervalUnion Inverse InverseBetaRegularized InverseCDF InverseChiSquareDistribution InverseContinuousWaveletTransform InverseDistanceTransform InverseEllipticNomeQ InverseErf InverseErfc InverseFourier InverseFourierCosTransform InverseFourierSequenceTransform InverseFourierSinTransform InverseFourierTransform InverseFunction InverseFunctions InverseGammaDistribution InverseGammaRegularized InverseGaussianDistribution InverseGudermannian InverseHaversine InverseJacobiCD InverseJacobiCN InverseJacobiCS InverseJacobiDC InverseJacobiDN InverseJacobiDS InverseJacobiNC InverseJacobiND InverseJacobiNS InverseJacobiSC InverseJacobiSD InverseJacobiSN InverseLaplaceTransform InversePermutation InverseRadon InverseSeries InverseSurvivalFunction InverseWaveletTransform InverseWeierstrassP InverseZTransform Invisible InvisibleApplication InvisibleTimes IrreduciblePolynomialQ IsolatingInterval IsomorphicGraphQ IsotopeData Italic Item ItemBox ItemBoxOptions ItemSize ItemStyle ItoProcess JaccardDissimilarity JacobiAmplitude Jacobian JacobiCD JacobiCN JacobiCS JacobiDC JacobiDN JacobiDS JacobiNC JacobiND JacobiNS JacobiP JacobiSC JacobiSD JacobiSN JacobiSymbol JacobiZeta JankoGroupJ1 JankoGroupJ2 JankoGroupJ3 JankoGroupJ4 JarqueBeraALMTest JohnsonDistribution Join Joined JoinedCurve JoinedCurveBox JoinForm JordanDecomposition JordanModelDecomposition K KagiChart KaiserBesselWindow KaiserWindow KalmanEstimator KalmanFilter KarhunenLoeveDecomposition KaryTree KatzCentrality KCoreComponents KDistribution KelvinBei KelvinBer KelvinKei KelvinKer KendallTau KendallTauTest KernelExecute KernelMixtureDistribution KernelObject Kernels Ket Khinchin KirchhoffGraph KirchhoffMatrix KleinInvariantJ KnightTourGraph KnotData KnownUnitQ KolmogorovSmirnovTest KroneckerDelta KroneckerModelDecomposition KroneckerProduct KroneckerSymbol KuiperTest KumaraswamyDistribution Kurtosis KuwaharaFilter Label Labeled LabeledSlider LabelingFunction LabelStyle LaguerreL LambdaComponents LambertW LanczosWindow LandauDistribution Language LanguageCategory LaplaceDistribution LaplaceTransform Laplacian LaplacianFilter LaplacianGaussianFilter Large Larger Last Latitude LatitudeLongitude LatticeData LatticeReduce Launch LaunchKernels LayeredGraphPlot LayerSizeFunction LayoutInformation LCM LeafCount LeapYearQ LeastSquares LeastSquaresFilterKernel Left LeftArrow LeftArrowBar LeftArrowRightArrow LeftDownTeeVector LeftDownVector LeftDownVectorBar LeftRightArrow LeftRightVector LeftTee LeftTeeArrow LeftTeeVector LeftTriangle LeftTriangleBar LeftTriangleEqual LeftUpDownVector LeftUpTeeVector LeftUpVector LeftUpVectorBar LeftVector LeftVectorBar LegendAppearance Legended LegendFunction LegendLabel LegendLayout LegendMargins LegendMarkers LegendMarkerSize LegendreP LegendreQ LegendreType Length LengthWhile LerchPhi Less LessEqual LessEqualGreater LessFullEqual LessGreater LessLess LessSlantEqual LessTilde LetterCharacter LetterQ Level LeveneTest LeviCivitaTensor LevyDistribution Lexicographic LibraryFunction LibraryFunctionError LibraryFunctionInformation LibraryFunctionLoad LibraryFunctionUnload LibraryLoad LibraryUnload LicenseID LiftingFilterData LiftingWaveletTransform LightBlue LightBrown LightCyan Lighter LightGray LightGreen Lighting LightingAngle LightMagenta LightOrange LightPink LightPurple LightRed LightSources LightYellow Likelihood Limit LimitsPositioning LimitsPositioningTokens LindleyDistribution Line Line3DBox LinearFilter LinearFractionalTransform LinearModelFit LinearOffsetFunction LinearProgramming LinearRecurrence LinearSolve LinearSolveFunction LineBox LineBreak LinebreakAdjustments LineBreakChart LineBreakWithin LineColor LineForm LineGraph LineIndent LineIndentMaxFraction LineIntegralConvolutionPlot LineIntegralConvolutionScale LineLegend LineOpacity LineSpacing LineWrapParts LinkActivate LinkClose LinkConnect LinkConnectedQ LinkCreate LinkError LinkFlush LinkFunction LinkHost LinkInterrupt LinkLaunch LinkMode LinkObject LinkOpen LinkOptions LinkPatterns LinkProtocol LinkRead LinkReadHeld LinkReadyQ Links LinkWrite LinkWriteHeld LiouvilleLambda List Listable ListAnimate ListContourPlot ListContourPlot3D ListConvolve ListCorrelate ListCurvePathPlot ListDeconvolve ListDensityPlot Listen ListFourierSequenceTransform ListInterpolation ListLineIntegralConvolutionPlot ListLinePlot ListLogLinearPlot ListLogLogPlot ListLogPlot ListPicker ListPickerBox ListPickerBoxBackground ListPickerBoxOptions ListPlay ListPlot ListPlot3D ListPointPlot3D ListPolarPlot ListQ ListStreamDensityPlot ListStreamPlot ListSurfacePlot3D ListVectorDensityPlot ListVectorPlot ListVectorPlot3D ListZTransform Literal LiteralSearch LocalClusteringCoefficient LocalizeVariables LocationEquivalenceTest LocationTest Locator LocatorAutoCreate LocatorBox LocatorBoxOptions LocatorCentering LocatorPane LocatorPaneBox LocatorPaneBoxOptions LocatorRegion Locked Log Log10 Log2 LogBarnesG LogGamma LogGammaDistribution LogicalExpand LogIntegral LogisticDistribution LogitModelFit LogLikelihood LogLinearPlot LogLogisticDistribution LogLogPlot LogMultinormalDistribution LogNormalDistribution LogPlot LogRankTest LogSeriesDistribution LongEqual Longest LongestAscendingSequence LongestCommonSequence LongestCommonSequencePositions LongestCommonSubsequence LongestCommonSubsequencePositions LongestMatch LongForm Longitude LongLeftArrow LongLeftRightArrow LongRightArrow Loopback LoopFreeGraphQ LowerCaseQ LowerLeftArrow LowerRightArrow LowerTriangularize LowpassFilter LQEstimatorGains LQGRegulator LQOutputRegulatorGains LQRegulatorGains LUBackSubstitution LucasL LuccioSamiComponents LUDecomposition LyapunovSolve LyonsGroupLy MachineID MachineName MachineNumberQ MachinePrecision MacintoshSystemPageSetup Magenta Magnification Magnify MainSolve MaintainDynamicCaches Majority MakeBoxes MakeExpression MakeRules MangoldtLambda ManhattanDistance Manipulate Manipulator MannWhitneyTest MantissaExponent Manual Map MapAll MapAt MapIndexed MAProcess MapThread MarcumQ MardiaCombinedTest MardiaKurtosisTest MardiaSkewnessTest MarginalDistribution MarkovProcessProperties Masking MatchingDissimilarity MatchLocalNameQ MatchLocalNames MatchQ Material MathematicaNotation MathieuC MathieuCharacteristicA MathieuCharacteristicB MathieuCharacteristicExponent MathieuCPrime MathieuGroupM11 MathieuGroupM12 MathieuGroupM22 MathieuGroupM23 MathieuGroupM24 MathieuS MathieuSPrime MathMLForm MathMLText Matrices MatrixExp MatrixForm MatrixFunction MatrixLog MatrixPlot MatrixPower MatrixQ MatrixRank Max MaxBend MaxDetect MaxExtraBandwidths MaxExtraConditions MaxFeatures MaxFilter Maximize MaxIterations MaxMemoryUsed MaxMixtureKernels MaxPlotPoints MaxPoints MaxRecursion MaxStableDistribution MaxStepFraction MaxSteps MaxStepSize MaxValue MaxwellDistribution McLaughlinGroupMcL Mean MeanClusteringCoefficient MeanDegreeConnectivity MeanDeviation MeanFilter MeanGraphDistance MeanNeighborDegree MeanShift MeanShiftFilter Median MedianDeviation MedianFilter Medium MeijerG MeixnerDistribution MemberQ MemoryConstrained MemoryInUse Menu MenuAppearance MenuCommandKey MenuEvaluator MenuItem MenuPacket MenuSortingValue MenuStyle MenuView MergeDifferences Mesh MeshFunctions MeshRange MeshShading MeshStyle Message MessageDialog MessageList MessageName MessageOptions MessagePacket Messages MessagesNotebook MetaCharacters MetaInformation Method MethodOptions MexicanHatWavelet MeyerWavelet Min MinDetect MinFilter MinimalPolynomial MinimalStateSpaceModel Minimize Minors MinRecursion MinSize MinStableDistribution Minus MinusPlus MinValue Missing MissingDataMethod MittagLefflerE MixedRadix MixedRadixQuantity MixtureDistribution Mod Modal Mode Modular ModularLambda Module Modulus MoebiusMu Moment Momentary MomentConvert MomentEvaluate MomentGeneratingFunction Monday Monitor MonomialList MonomialOrder MonsterGroupM MorletWavelet MorphologicalBinarize MorphologicalBranchPoints MorphologicalComponents MorphologicalEulerNumber MorphologicalGraph MorphologicalPerimeter MorphologicalTransform Most MouseAnnotation MouseAppearance MouseAppearanceTag MouseButtons Mouseover MousePointerNote MousePosition MovingAverage MovingMedian MoyalDistribution MultiedgeStyle MultilaunchWarning MultiLetterItalics MultiLetterStyle MultilineFunction Multinomial MultinomialDistribution MultinormalDistribution MultiplicativeOrder Multiplicity Multiselection MultivariateHypergeometricDistribution MultivariatePoissonDistribution MultivariateTDistribution N NakagamiDistribution NameQ Names NamespaceBox Nand NArgMax NArgMin NBernoulliB NCache NDSolve NDSolveValue Nearest NearestFunction NeedCurrentFrontEndPackagePacket NeedCurrentFrontEndSymbolsPacket NeedlemanWunschSimilarity Needs Negative NegativeBinomialDistribution NegativeMultinomialDistribution NeighborhoodGraph Nest NestedGreaterGreater NestedLessLess NestedScriptRules NestList NestWhile NestWhileList NevilleThetaC NevilleThetaD NevilleThetaN NevilleThetaS NewPrimitiveStyle NExpectation Next NextPrime NHoldAll NHoldFirst NHoldRest NicholsGridLines NicholsPlot NIntegrate NMaximize NMaxValue NMinimize NMinValue NominalVariables NonAssociative NoncentralBetaDistribution NoncentralChiSquareDistribution NoncentralFRatioDistribution NoncentralStudentTDistribution NonCommutativeMultiply NonConstants None NonlinearModelFit NonlocalMeansFilter NonNegative NonPositive Nor NorlundB Norm Normal NormalDistribution NormalGrouping Normalize NormalizedSquaredEuclideanDistance NormalsFunction NormFunction Not NotCongruent NotCupCap NotDoubleVerticalBar Notebook NotebookApply NotebookAutoSave NotebookClose NotebookConvertSettings NotebookCreate NotebookCreateReturnObject NotebookDefault NotebookDelete NotebookDirectory NotebookDynamicExpression NotebookEvaluate NotebookEventActions NotebookFileName NotebookFind NotebookFindReturnObject NotebookGet NotebookGetLayoutInformationPacket NotebookGetMisspellingsPacket NotebookInformation NotebookInterfaceObject NotebookLocate NotebookObject NotebookOpen NotebookOpenReturnObject NotebookPath NotebookPrint NotebookPut NotebookPutReturnObject NotebookRead NotebookResetGeneratedCells Notebooks NotebookSave NotebookSaveAs NotebookSelection NotebookSetupLayoutInformationPacket NotebooksMenu NotebookWrite NotElement NotEqualTilde NotExists NotGreater NotGreaterEqual NotGreaterFullEqual NotGreaterGreater NotGreaterLess NotGreaterSlantEqual NotGreaterTilde NotHumpDownHump NotHumpEqual NotLeftTriangle NotLeftTriangleBar NotLeftTriangleEqual NotLess NotLessEqual NotLessFullEqual NotLessGreater NotLessLess NotLessSlantEqual NotLessTilde NotNestedGreaterGreater NotNestedLessLess NotPrecedes NotPrecedesEqual NotPrecedesSlantEqual NotPrecedesTilde NotReverseElement NotRightTriangle NotRightTriangleBar NotRightTriangleEqual NotSquareSubset NotSquareSubsetEqual NotSquareSuperset NotSquareSupersetEqual NotSubset NotSubsetEqual NotSucceeds NotSucceedsEqual NotSucceedsSlantEqual NotSucceedsTilde NotSuperset NotSupersetEqual NotTilde NotTildeEqual NotTildeFullEqual NotTildeTilde NotVerticalBar NProbability NProduct NProductFactors NRoots NSolve NSum NSumTerms Null NullRecords NullSpace NullWords Number NumberFieldClassNumber NumberFieldDiscriminant NumberFieldFundamentalUnits NumberFieldIntegralBasis NumberFieldNormRepresentatives NumberFieldRegulator NumberFieldRootsOfUnity NumberFieldSignature NumberForm NumberFormat NumberMarks NumberMultiplier NumberPadding NumberPoint NumberQ NumberSeparator NumberSigns NumberString Numerator NumericFunction NumericQ NuttallWindow NValues NyquistGridLines NyquistPlot O ObservabilityGramian ObservabilityMatrix ObservableDecomposition ObservableModelQ OddQ Off Offset OLEData On ONanGroupON OneIdentity Opacity Open OpenAppend Opener OpenerBox OpenerBoxOptions OpenerView OpenFunctionInspectorPacket Opening OpenRead OpenSpecialOptions OpenTemporary OpenWrite Operate OperatingSystem OptimumFlowData Optional OptionInspectorSettings OptionQ Options OptionsPacket OptionsPattern OptionValue OptionValueBox OptionValueBoxOptions Or Orange Order OrderDistribution OrderedQ Ordering Orderless OrnsteinUhlenbeckProcess Orthogonalize Out Outer OutputAutoOverwrite OutputControllabilityMatrix OutputControllableModelQ OutputForm OutputFormData OutputGrouping OutputMathEditExpression OutputNamePacket OutputResponse OutputSizeLimit OutputStream Over OverBar OverDot Overflow OverHat Overlaps Overlay OverlayBox OverlayBoxOptions Overscript OverscriptBox OverscriptBoxOptions OverTilde OverVector OwenT OwnValues PackingMethod PaddedForm Padding PadeApproximant PadLeft PadRight PageBreakAbove PageBreakBelow PageBreakWithin PageFooterLines PageFooters PageHeaderLines PageHeaders PageHeight PageRankCentrality PageWidth PairedBarChart PairedHistogram PairedSmoothHistogram PairedTTest PairedZTest PaletteNotebook PalettePath Pane PaneBox PaneBoxOptions Panel PanelBox PanelBoxOptions Paneled PaneSelector PaneSelectorBox PaneSelectorBoxOptions PaperWidth ParabolicCylinderD ParagraphIndent ParagraphSpacing ParallelArray ParallelCombine ParallelDo ParallelEvaluate Parallelization Parallelize ParallelMap ParallelNeeds ParallelProduct ParallelSubmit ParallelSum ParallelTable ParallelTry Parameter ParameterEstimator ParameterMixtureDistribution ParameterVariables ParametricFunction ParametricNDSolve ParametricNDSolveValue ParametricPlot ParametricPlot3D ParentConnect ParentDirectory ParentForm Parenthesize ParentList ParetoDistribution Part PartialCorrelationFunction PartialD ParticleData Partition PartitionsP PartitionsQ ParzenWindow PascalDistribution PassEventsDown PassEventsUp Paste PasteBoxFormInlineCells PasteButton Path PathGraph PathGraphQ Pattern PatternSequence PatternTest PauliMatrix PaulWavelet Pause PausedTime PDF PearsonChiSquareTest PearsonCorrelationTest PearsonDistribution PerformanceGoal PeriodicInterpolation Periodogram PeriodogramArray PermutationCycles PermutationCyclesQ PermutationGroup PermutationLength PermutationList PermutationListQ PermutationMax PermutationMin PermutationOrder PermutationPower PermutationProduct PermutationReplace Permutations PermutationSupport Permute PeronaMalikFilter Perpendicular PERTDistribution PetersenGraph PhaseMargins Pi Pick PIDData PIDDerivativeFilter PIDFeedforward PIDTune Piecewise PiecewiseExpand PieChart PieChart3D PillaiTrace PillaiTraceTest Pink Pivoting PixelConstrained PixelValue PixelValuePositions Placed Placeholder PlaceholderReplace Plain PlanarGraphQ Play PlayRange Plot Plot3D Plot3Matrix PlotDivision PlotJoined PlotLabel PlotLayout PlotLegends PlotMarkers PlotPoints PlotRange PlotRangeClipping PlotRangePadding PlotRegion PlotStyle Plus PlusMinus Pochhammer PodStates PodWidth Point Point3DBox PointBox PointFigureChart PointForm PointLegend PointSize PoissonConsulDistribution PoissonDistribution PoissonProcess PoissonWindow PolarAxes PolarAxesOrigin PolarGridLines PolarPlot PolarTicks PoleZeroMarkers PolyaAeppliDistribution PolyGamma Polygon Polygon3DBox Polygon3DBoxOptions PolygonBox PolygonBoxOptions PolygonHoleScale PolygonIntersections PolygonScale PolyhedronData PolyLog PolynomialExtendedGCD PolynomialForm PolynomialGCD PolynomialLCM PolynomialMod PolynomialQ PolynomialQuotient PolynomialQuotientRemainder PolynomialReduce PolynomialRemainder Polynomials PopupMenu PopupMenuBox PopupMenuBoxOptions PopupView PopupWindow Position Positive PositiveDefiniteMatrixQ PossibleZeroQ Postfix PostScript Power PowerDistribution PowerExpand PowerMod PowerModList PowerSpectralDensity PowersRepresentations PowerSymmetricPolynomial Precedence PrecedenceForm Precedes PrecedesEqual PrecedesSlantEqual PrecedesTilde Precision PrecisionGoal PreDecrement PredictionRoot PreemptProtect PreferencesPath Prefix PreIncrement Prepend PrependTo PreserveImageOptions Previous PriceGraphDistribution PrimaryPlaceholder Prime PrimeNu PrimeOmega PrimePi PrimePowerQ PrimeQ Primes PrimeZetaP PrimitiveRoot PrincipalComponents PrincipalValue Print PrintAction PrintForm PrintingCopies PrintingOptions PrintingPageRange PrintingStartingPageNumber PrintingStyleEnvironment PrintPrecision PrintTemporary Prism PrismBox PrismBoxOptions PrivateCellOptions PrivateEvaluationOptions PrivateFontOptions PrivateFrontEndOptions PrivateNotebookOptions PrivatePaths Probability ProbabilityDistribution ProbabilityPlot ProbabilityPr ProbabilityScalePlot ProbitModelFit ProcessEstimator ProcessParameterAssumptions ProcessParameterQ ProcessStateDomain ProcessTimeDomain Product ProductDistribution ProductLog ProgressIndicator ProgressIndicatorBox ProgressIndicatorBoxOptions Projection Prolog PromptForm Properties Property PropertyList PropertyValue Proportion Proportional Protect Protected ProteinData Pruning PseudoInverse Purple Put PutAppend Pyramid PyramidBox PyramidBoxOptions QBinomial QFactorial QGamma QHypergeometricPFQ QPochhammer QPolyGamma QRDecomposition QuadraticIrrationalQ Quantile QuantilePlot Quantity QuantityForm QuantityMagnitude QuantityQ QuantityUnit Quartics QuartileDeviation Quartiles QuartileSkewness QueueingNetworkProcess QueueingProcess QueueProperties Quiet Quit Quotient QuotientRemainder RadialityCentrality RadicalBox RadicalBoxOptions RadioButton RadioButtonBar RadioButtonBox RadioButtonBoxOptions Radon RamanujanTau RamanujanTauL RamanujanTauTheta RamanujanTauZ Random RandomChoice RandomComplex RandomFunction RandomGraph RandomImage RandomInteger RandomPermutation RandomPrime RandomReal RandomSample RandomSeed RandomVariate RandomWalkProcess Range RangeFilter RangeSpecification RankedMax RankedMin Raster Raster3D Raster3DBox Raster3DBoxOptions RasterArray RasterBox RasterBoxOptions Rasterize RasterSize Rational RationalFunctions Rationalize Rationals Ratios Raw RawArray RawBoxes RawData RawMedium RayleighDistribution Re Read ReadList ReadProtected Real RealBlockDiagonalForm RealDigits RealExponent Reals Reap Record RecordLists RecordSeparators Rectangle RectangleBox RectangleBoxOptions RectangleChart RectangleChart3D RecurrenceFilter RecurrenceTable RecurringDigitsForm Red Reduce RefBox ReferenceLineStyle ReferenceMarkers ReferenceMarkerStyle Refine ReflectionMatrix ReflectionTransform Refresh RefreshRate RegionBinarize RegionFunction RegionPlot RegionPlot3D RegularExpression Regularization Reinstall Release ReleaseHold ReliabilityDistribution ReliefImage ReliefPlot Remove RemoveAlphaChannel RemoveAsynchronousTask Removed RemoveInputStreamMethod RemoveOutputStreamMethod RemoveProperty RemoveScheduledTask RenameDirectory RenameFile RenderAll RenderingOptions RenewalProcess RenkoChart Repeated RepeatedNull RepeatedString Replace ReplaceAll ReplaceHeldPart ReplaceImageValue ReplaceList ReplacePart ReplacePixelValue ReplaceRepeated Resampling Rescale RescalingTransform ResetDirectory ResetMenusPacket ResetScheduledTask Residue Resolve Rest Resultant ResumePacket Return ReturnExpressionPacket ReturnInputFormPacket ReturnPacket ReturnTextPacket Reverse ReverseBiorthogonalSplineWavelet ReverseElement ReverseEquilibrium ReverseGraph ReverseUpEquilibrium RevolutionAxis RevolutionPlot3D RGBColor RiccatiSolve RiceDistribution RidgeFilter RiemannR RiemannSiegelTheta RiemannSiegelZ Riffle Right RightArrow RightArrowBar RightArrowLeftArrow RightCosetRepresentative RightDownTeeVector RightDownVector RightDownVectorBar RightTee RightTeeArrow RightTeeVector RightTriangle RightTriangleBar RightTriangleEqual RightUpDownVector RightUpTeeVector RightUpVector RightUpVectorBar RightVector RightVectorBar RiskAchievementImportance RiskReductionImportance RogersTanimotoDissimilarity Root RootApproximant RootIntervals RootLocusPlot RootMeanSquare RootOfUnityQ RootReduce Roots RootSum Rotate RotateLabel RotateLeft RotateRight RotationAction RotationBox RotationBoxOptions RotationMatrix RotationTransform Round RoundImplies RoundingRadius Row RowAlignments RowBackgrounds RowBox RowHeights RowLines RowMinHeight RowReduce RowsEqual RowSpacings RSolve RudvalisGroupRu Rule RuleCondition RuleDelayed RuleForm RulerUnits Run RunScheduledTask RunThrough RuntimeAttributes RuntimeOptions RussellRaoDissimilarity SameQ SameTest SampleDepth SampledSoundFunction SampledSoundList SampleRate SamplingPeriod SARIMAProcess SARMAProcess SatisfiabilityCount SatisfiabilityInstances SatisfiableQ Saturday Save Saveable SaveAutoDelete SaveDefinitions SawtoothWave Scale Scaled ScaleDivisions ScaledMousePosition ScaleOrigin ScalePadding ScaleRanges ScaleRangeStyle ScalingFunctions ScalingMatrix ScalingTransform Scan ScheduledTaskActiveQ ScheduledTaskData ScheduledTaskObject ScheduledTasks SchurDecomposition ScientificForm ScreenRectangle ScreenStyleEnvironment ScriptBaselineShifts ScriptLevel ScriptMinSize ScriptRules ScriptSizeMultipliers Scrollbars ScrollingOptions ScrollPosition Sec Sech SechDistribution SectionGrouping SectorChart SectorChart3D SectorOrigin SectorSpacing SeedRandom Select Selectable SelectComponents SelectedCells SelectedNotebook Selection SelectionAnimate SelectionCell SelectionCellCreateCell SelectionCellDefaultStyle SelectionCellParentStyle SelectionCreateCell SelectionDebuggerTag SelectionDuplicateCell SelectionEvaluate SelectionEvaluateCreateCell SelectionMove SelectionPlaceholder SelectionSetStyle SelectWithContents SelfLoops SelfLoopStyle SemialgebraicComponentInstances SendMail Sequence SequenceAlignment SequenceForm SequenceHold SequenceLimit Series SeriesCoefficient SeriesData SessionTime Set SetAccuracy SetAlphaChannel SetAttributes Setbacks SetBoxFormNamesPacket SetDelayed SetDirectory SetEnvironment SetEvaluationNotebook SetFileDate SetFileLoadingContext SetNotebookStatusLine SetOptions SetOptionsPacket SetPrecision SetProperty SetSelectedNotebook SetSharedFunction SetSharedVariable SetSpeechParametersPacket SetStreamPosition SetSystemOptions Setter SetterBar SetterBox SetterBoxOptions Setting SetValue Shading Shallow ShannonWavelet ShapiroWilkTest Share Sharpen ShearingMatrix ShearingTransform ShenCastanMatrix Short ShortDownArrow Shortest ShortestMatch ShortestPathFunction ShortLeftArrow ShortRightArrow ShortUpArrow Show ShowAutoStyles ShowCellBracket ShowCellLabel ShowCellTags ShowClosedCellArea ShowContents ShowControls ShowCursorTracker ShowGroupOpenCloseIcon ShowGroupOpener ShowInvisibleCharacters ShowPageBreaks ShowPredictiveInterface ShowSelection ShowShortBoxForm ShowSpecialCharacters ShowStringCharacters ShowSyntaxStyles ShrinkingDelay ShrinkWrapBoundingBox SiegelTheta SiegelTukeyTest Sign Signature SignedRankTest SignificanceLevel SignPadding SignTest SimilarityRules SimpleGraph SimpleGraphQ Simplify Sin Sinc SinghMaddalaDistribution SingleEvaluation SingleLetterItalics SingleLetterStyle SingularValueDecomposition SingularValueList SingularValuePlot SingularValues Sinh SinhIntegral SinIntegral SixJSymbol Skeleton SkeletonTransform SkellamDistribution Skewness SkewNormalDistribution Skip SliceDistribution Slider Slider2D Slider2DBox Slider2DBoxOptions SliderBox SliderBoxOptions SlideView Slot SlotSequence Small SmallCircle Smaller SmithDelayCompensator SmithWatermanSimilarity SmoothDensityHistogram SmoothHistogram SmoothHistogram3D SmoothKernelDistribution SocialMediaData Socket SokalSneathDissimilarity Solve SolveAlways SolveDelayed Sort SortBy Sound SoundAndGraphics SoundNote SoundVolume Sow Space SpaceForm Spacer Spacings Span SpanAdjustments SpanCharacterRounding SpanFromAbove SpanFromBoth SpanFromLeft SpanLineThickness SpanMaxSize SpanMinSize SpanningCharacters SpanSymmetric SparseArray SpatialGraphDistribution Speak SpeakTextPacket SpearmanRankTest SpearmanRho Spectrogram SpectrogramArray Specularity SpellingCorrection SpellingDictionaries SpellingDictionariesPath SpellingOptions SpellingSuggestionsPacket Sphere SphereBox SphericalBesselJ SphericalBesselY SphericalHankelH1 SphericalHankelH2 SphericalHarmonicY SphericalPlot3D SphericalRegion SpheroidalEigenvalue SpheroidalJoiningFactor SpheroidalPS SpheroidalPSPrime SpheroidalQS SpheroidalQSPrime SpheroidalRadialFactor SpheroidalS1 SpheroidalS1Prime SpheroidalS2 SpheroidalS2Prime Splice SplicedDistribution SplineClosed SplineDegree SplineKnots SplineWeights Split SplitBy SpokenString Sqrt SqrtBox SqrtBoxOptions Square SquaredEuclideanDistance SquareFreeQ SquareIntersection SquaresR SquareSubset SquareSubsetEqual SquareSuperset SquareSupersetEqual SquareUnion SquareWave StabilityMargins StabilityMarginsStyle StableDistribution Stack StackBegin StackComplete StackInhibit StandardDeviation StandardDeviationFilter StandardForm Standardize StandbyDistribution Star StarGraph StartAsynchronousTask StartingStepSize StartOfLine StartOfString StartScheduledTask StartupSound StateDimensions StateFeedbackGains StateOutputEstimator StateResponse StateSpaceModel StateSpaceRealization StateSpaceTransform StationaryDistribution StationaryWaveletPacketTransform StationaryWaveletTransform StatusArea StatusCentrality StepMonitor StieltjesGamma StirlingS1 StirlingS2 StopAsynchronousTask StopScheduledTask StrataVariables StratonovichProcess StreamColorFunction StreamColorFunctionScaling StreamDensityPlot StreamPlot StreamPoints StreamPosition Streams StreamScale StreamStyle String StringBreak StringByteCount StringCases StringCount StringDrop StringExpression StringForm StringFormat StringFreeQ StringInsert StringJoin StringLength StringMatchQ StringPosition StringQ StringReplace StringReplaceList StringReplacePart StringReverse StringRotateLeft StringRotateRight StringSkeleton StringSplit StringTake StringToStream StringTrim StripBoxes StripOnInput StripWrapperBoxes StrokeForm StructuralImportance StructuredArray StructuredSelection StruveH StruveL Stub StudentTDistribution Style StyleBox StyleBoxAutoDelete StyleBoxOptions StyleData StyleDefinitions StyleForm StyleKeyMapping StyleMenuListing StyleNameDialogSettings StyleNames StylePrint StyleSheetPath Subfactorial Subgraph SubMinus SubPlus SubresultantPolynomialRemainders SubresultantPolynomials Subresultants Subscript SubscriptBox SubscriptBoxOptions Subscripted Subset SubsetEqual Subsets SubStar Subsuperscript SubsuperscriptBox SubsuperscriptBoxOptions Subtract SubtractFrom SubValues Succeeds SucceedsEqual SucceedsSlantEqual SucceedsTilde SuchThat Sum SumConvergence Sunday SuperDagger SuperMinus SuperPlus Superscript SuperscriptBox SuperscriptBoxOptions Superset SupersetEqual SuperStar Surd SurdForm SurfaceColor SurfaceGraphics SurvivalDistribution SurvivalFunction SurvivalModel SurvivalModelFit SuspendPacket SuzukiDistribution SuzukiGroupSuz SwatchLegend Switch Symbol SymbolName SymletWavelet Symmetric SymmetricGroup SymmetricMatrixQ SymmetricPolynomial SymmetricReduction Symmetrize SymmetrizedArray SymmetrizedArrayRules SymmetrizedDependentComponents SymmetrizedIndependentComponents SymmetrizedReplacePart SynchronousInitialization SynchronousUpdating Syntax SyntaxForm SyntaxInformation SyntaxLength SyntaxPacket SyntaxQ SystemDialogInput SystemException SystemHelpPath SystemInformation SystemInformationData SystemOpen SystemOptions SystemsModelDelay SystemsModelDelayApproximate SystemsModelDelete SystemsModelDimensions SystemsModelExtract SystemsModelFeedbackConnect SystemsModelLabels SystemsModelOrder SystemsModelParallelConnect SystemsModelSeriesConnect SystemsModelStateFeedbackConnect SystemStub Tab TabFilling Table TableAlignments TableDepth TableDirections TableForm TableHeadings TableSpacing TableView TableViewBox TabSpacings TabView TabViewBox TabViewBoxOptions TagBox TagBoxNote TagBoxOptions TaggingRules TagSet TagSetDelayed TagStyle TagUnset Take TakeWhile Tally Tan Tanh TargetFunctions TargetUnits TautologyQ TelegraphProcess TemplateBox TemplateBoxOptions TemplateSlotSequence TemporalData Temporary TemporaryVariable TensorContract TensorDimensions TensorExpand TensorProduct TensorQ TensorRank TensorReduce TensorSymmetry TensorTranspose TensorWedge Tetrahedron TetrahedronBox TetrahedronBoxOptions TeXForm TeXSave Text Text3DBox Text3DBoxOptions TextAlignment TextBand TextBoundingBox TextBox TextCell TextClipboardType TextData TextForm TextJustification TextLine TextPacket TextParagraph TextRecognize TextRendering TextStyle Texture TextureCoordinateFunction TextureCoordinateScaling Therefore ThermometerGauge Thick Thickness Thin Thinning ThisLink ThompsonGroupTh Thread ThreeJSymbol Threshold Through Throw Thumbnail Thursday Ticks TicksStyle Tilde TildeEqual TildeFullEqual TildeTilde TimeConstrained TimeConstraint Times TimesBy TimeSeriesForecast TimeSeriesInvertibility TimeUsed TimeValue TimeZone Timing Tiny TitleGrouping TitsGroupT ToBoxes ToCharacterCode ToColor ToContinuousTimeModel ToDate ToDiscreteTimeModel ToeplitzMatrix ToExpression ToFileName Together Toggle ToggleFalse Toggler TogglerBar TogglerBox TogglerBoxOptions ToHeldExpression ToInvertibleTimeSeries TokenWords Tolerance ToLowerCase ToNumberField TooBig Tooltip TooltipBox TooltipBoxOptions TooltipDelay TooltipStyle Top TopHatTransform TopologicalSort ToRadicals ToRules ToString Total TotalHeight TotalVariationFilter TotalWidth TouchscreenAutoZoom TouchscreenControlPlacement ToUpperCase Tr Trace TraceAbove TraceAction TraceBackward TraceDepth TraceDialog TraceForward TraceInternal TraceLevel TraceOff TraceOn TraceOriginal TracePrint TraceScan TrackedSymbols TradingChart TraditionalForm TraditionalFunctionNotation TraditionalNotation TraditionalOrder TransferFunctionCancel TransferFunctionExpand TransferFunctionFactor TransferFunctionModel TransferFunctionPoles TransferFunctionTransform TransferFunctionZeros TransformationFunction TransformationFunctions TransformationMatrix TransformedDistribution TransformedField Translate TranslationTransform TransparentColor Transpose TreeForm TreeGraph TreeGraphQ TreePlot TrendStyle TriangleWave TriangularDistribution Trig TrigExpand TrigFactor TrigFactorList Trigger TrigReduce TrigToExp TrimmedMean True TrueQ TruncatedDistribution TsallisQExponentialDistribution TsallisQGaussianDistribution TTest Tube TubeBezierCurveBox TubeBezierCurveBoxOptions TubeBox TubeBSplineCurveBox TubeBSplineCurveBoxOptions Tuesday TukeyLambdaDistribution TukeyWindow Tuples TuranGraph TuringMachine Transparent UnateQ Uncompress Undefined UnderBar Underflow Underlined Underoverscript UnderoverscriptBox UnderoverscriptBoxOptions Underscript UnderscriptBox UnderscriptBoxOptions UndirectedEdge UndirectedGraph UndirectedGraphQ UndocumentedTestFEParserPacket UndocumentedTestGetSelectionPacket Unequal Unevaluated UniformDistribution UniformGraphDistribution UniformSumDistribution Uninstall Union UnionPlus Unique UnitBox UnitConvert UnitDimensions Unitize UnitRootTest UnitSimplify UnitStep UnitTriangle UnitVector Unprotect UnsameQ UnsavedVariables Unset UnsetShared UntrackedVariables Up UpArrow UpArrowBar UpArrowDownArrow Update UpdateDynamicObjects UpdateDynamicObjectsSynchronous UpdateInterval UpDownArrow UpEquilibrium UpperCaseQ UpperLeftArrow UpperRightArrow UpperTriangularize Upsample UpSet UpSetDelayed UpTee UpTeeArrow UpValues URL URLFetch URLFetchAsynchronous URLSave URLSaveAsynchronous UseGraphicsRange Using UsingFrontEnd V2Get ValidationLength Value ValueBox ValueBoxOptions ValueForm ValueQ ValuesData Variables Variance VarianceEquivalenceTest VarianceEstimatorFunction VarianceGammaDistribution VarianceTest VectorAngle VectorColorFunction VectorColorFunctionScaling VectorDensityPlot VectorGlyphData VectorPlot VectorPlot3D VectorPoints VectorQ Vectors VectorScale VectorStyle Vee Verbatim Verbose VerboseConvertToPostScriptPacket VerifyConvergence VerifySolutions VerifyTestAssumptions Version VersionNumber VertexAdd VertexCapacity VertexColors VertexComponent VertexConnectivity VertexCoordinateRules VertexCoordinates VertexCorrelationSimilarity VertexCosineSimilarity VertexCount VertexCoverQ VertexDataCoordinates VertexDegree VertexDelete VertexDiceSimilarity VertexEccentricity VertexInComponent VertexInDegree VertexIndex VertexJaccardSimilarity VertexLabeling VertexLabels VertexLabelStyle VertexList VertexNormals VertexOutComponent VertexOutDegree VertexQ VertexRenderingFunction VertexReplace VertexShape VertexShapeFunction VertexSize VertexStyle VertexTextureCoordinates VertexWeight Vertical VerticalBar VerticalForm VerticalGauge VerticalSeparator VerticalSlider VerticalTilde ViewAngle ViewCenter ViewMatrix ViewPoint ViewPointSelectorSettings ViewPort ViewRange ViewVector ViewVertical VirtualGroupData Visible VisibleCell VoigtDistribution VonMisesDistribution WaitAll WaitAsynchronousTask WaitNext WaitUntil WakebyDistribution WalleniusHypergeometricDistribution WaringYuleDistribution WatershedComponents WatsonUSquareTest WattsStrogatzGraphDistribution WaveletBestBasis WaveletFilterCoefficients WaveletImagePlot WaveletListPlot WaveletMapIndexed WaveletMatrixPlot WaveletPhi WaveletPsi WaveletScale WaveletScalogram WaveletThreshold WeaklyConnectedComponents WeaklyConnectedGraphQ WeakStationarity WeatherData WeberE Wedge Wednesday WeibullDistribution WeierstrassHalfPeriods WeierstrassInvariants WeierstrassP WeierstrassPPrime WeierstrassSigma WeierstrassZeta WeightedAdjacencyGraph WeightedAdjacencyMatrix WeightedData WeightedGraphQ Weights WelchWindow WheelGraph WhenEvent Which While White Whitespace WhitespaceCharacter WhittakerM WhittakerW WienerFilter WienerProcess WignerD WignerSemicircleDistribution WilksW WilksWTest WindowClickSelect WindowElements WindowFloating WindowFrame WindowFrameElements WindowMargins WindowMovable WindowOpacity WindowSelected WindowSize WindowStatusArea WindowTitle WindowToolbars WindowWidth With WolframAlpha WolframAlphaDate WolframAlphaQuantity WolframAlphaResult Word WordBoundary WordCharacter WordData WordSearch WordSeparators WorkingPrecision Write WriteString Wronskian XMLElement XMLObject Xnor Xor Yellow YuleDissimilarity ZernikeR ZeroSymmetric ZeroTest ZeroWidthTimes Zeta ZetaZero ZipfDistribution ZTest ZTransform $Aborted $ActivationGroupID $ActivationKey $ActivationUserRegistered $AddOnsDirectory $AssertFunction $Assumptions $AsynchronousTask $BaseDirectory $BatchInput $BatchOutput $BoxForms $ByteOrdering $Canceled $CharacterEncoding $CharacterEncodings $CommandLine $CompilationTarget $ConditionHold $ConfiguredKernels $Context $ContextPath $ControlActiveSetting $CreationDate $CurrentLink $DateStringFormat $DefaultFont $DefaultFrontEnd $DefaultImagingDevice $DefaultPath $Display $DisplayFunction $DistributedContexts $DynamicEvaluation $Echo $Epilog $ExportFormats $Failed $FinancialDataSource $FormatType $FrontEnd $FrontEndSession $GeoLocation $HistoryLength $HomeDirectory $HTTPCookies $IgnoreEOF $ImagingDevices $ImportFormats $InitialDirectory $Input $InputFileName $InputStreamMethods $Inspector $InstallationDate $InstallationDirectory $InterfaceEnvironment $IterationLimit $KernelCount $KernelID $Language $LaunchDirectory $LibraryPath $LicenseExpirationDate $LicenseID $LicenseProcesses $LicenseServer $LicenseSubprocesses $LicenseType $Line $Linked $LinkSupported $LoadedFiles $MachineAddresses $MachineDomain $MachineDomains $MachineEpsilon $MachineID $MachineName $MachinePrecision $MachineType $MaxExtraPrecision $MaxLicenseProcesses $MaxLicenseSubprocesses $MaxMachineNumber $MaxNumber $MaxPiecewiseCases $MaxPrecision $MaxRootDegree $MessageGroups $MessageList $MessagePrePrint $Messages $MinMachineNumber $MinNumber $MinorReleaseNumber $MinPrecision $ModuleNumber $NetworkLicense $NewMessage $NewSymbol $Notebooks $NumberMarks $Off $OperatingSystem $Output $OutputForms $OutputSizeLimit $OutputStreamMethods $Packages $ParentLink $ParentProcessID $PasswordFile $PatchLevelID $Path $PathnameSeparator $PerformanceGoal $PipeSupported $Post $Pre $PreferencesDirectory $PrePrint $PreRead $PrintForms $PrintLiteral $ProcessID $ProcessorCount $ProcessorType $ProductInformation $ProgramName $RandomState $RecursionLimit $ReleaseNumber $RootDirectory $ScheduledTask $ScriptCommandLine $SessionID $SetParentLink $SharedFunctions $SharedVariables $SoundDisplay $SoundDisplayFunction $SuppressInputFormHeads $SynchronousEvaluation $SyntaxHandler $System $SystemCharacterEncoding $SystemID $SystemWordLength $TemporaryDirectory $TemporaryPrefix $TextStyle $TimedOut $TimeUnit $TimeZone $TopDirectory $TraceOff $TraceOn $TracePattern $TracePostAction $TracePreAction $Urgent $UserAddOnsDirectory $UserBaseDirectory $UserDocumentsDirectory $UserName $Version $VersionNumber",contains:[{className:"comment",begin:/\(\*/,end:/\*\)/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"list",begin:/\{/,end:/\}/,illegal:/:/}]}}),i.registerLanguage("matlab",function(e){var t=[e.C_NUMBER_MODE,{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]}],n={relevance:0,contains:[{className:"operator",begin:/'['\.]*/}]};return{keywords:{keyword:"break case catch classdef continue else elseif end enumerated events for function global if methods otherwise parfor persistent properties return spmd switch try while",built_in:"sin sind sinh asin asind asinh cos cosd cosh acos acosd acosh tan tand tanh atan atand atan2 atanh sec secd sech asec asecd asech csc cscd csch acsc acscd acsch cot cotd coth acot acotd acoth hypot exp expm1 log log1p log10 log2 pow2 realpow reallog realsqrt sqrt nthroot nextpow2 abs angle complex conj imag real unwrap isreal cplxpair fix floor ceil round mod rem sign airy besselj bessely besselh besseli besselk beta betainc betaln ellipj ellipke erf erfc erfcx erfinv expint gamma gammainc gammaln psi legendre cross dot factor isprime primes gcd lcm rat rats perms nchoosek factorial cart2sph cart2pol pol2cart sph2cart hsv2rgb rgb2hsv zeros ones eye repmat rand randn linspace logspace freqspace meshgrid accumarray size length ndims numel disp isempty isequal isequalwithequalnans cat reshape diag blkdiag tril triu fliplr flipud flipdim rot90 find sub2ind ind2sub bsxfun ndgrid permute ipermute shiftdim circshift squeeze isscalar isvector ans eps realmax realmin pi i inf nan isnan isinf isfinite j why compan gallery hadamard hankel hilb invhilb magic pascal rosser toeplitz vander wilkinson"},illegal:'(//|"|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function",end:"$",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"},{className:"params",begin:"\\[",end:"\\]"}]},{begin:/[a-zA-Z_][a-zA-Z_0-9]*'['\.]*/,returnBegin:!0,relevance:0,contains:[{begin:/[a-zA-Z_][a-zA-Z_0-9]*/,relevance:0},n.contains[0]]},{className:"matrix",begin:"\\[",end:"\\]",contains:t,relevance:0,starts:n},{className:"cell",begin:"\\{",end:/}/,contains:t,relevance:0,starts:n},{begin:/\)/,relevance:0,starts:n},e.COMMENT("^\\s*\\%\\{\\s*$","^\\s*\\%\\}\\s*$"),e.COMMENT("\\%","$")].concat(t)}}),i.registerLanguage("mel",function(e){return{keywords:"int float string vector matrix if else switch case default while do for in break continue global proc return about abs addAttr addAttributeEditorNodeHelp addDynamic addNewShelfTab addPP addPanelCategory addPrefixToName advanceToNextDrivenKey affectedNet affects aimConstraint air alias aliasAttr align alignCtx alignCurve alignSurface allViewFit ambientLight angle angleBetween animCone animCurveEditor animDisplay animView annotate appendStringArray applicationName applyAttrPreset applyTake arcLenDimContext arcLengthDimension arclen arrayMapper art3dPaintCtx artAttrCtx artAttrPaintVertexCtx artAttrSkinPaintCtx artAttrTool artBuildPaintMenu artFluidAttrCtx artPuttyCtx artSelectCtx artSetPaintCtx artUserPaintCtx assignCommand assignInputDevice assignViewportFactories attachCurve attachDeviceAttr attachSurface attrColorSliderGrp attrCompatibility attrControlGrp attrEnumOptionMenu attrEnumOptionMenuGrp attrFieldGrp attrFieldSliderGrp attrNavigationControlGrp attrPresetEditWin attributeExists attributeInfo attributeMenu attributeQuery autoKeyframe autoPlace bakeClip bakeFluidShading bakePartialHistory bakeResults bakeSimulation basename basenameEx batchRender bessel bevel bevelPlus binMembership bindSkin blend2 blendShape blendShapeEditor blendShapePanel blendTwoAttr blindDataType boneLattice boundary boxDollyCtx boxZoomCtx bufferCurve buildBookmarkMenu buildKeyframeMenu button buttonManip CBG cacheFile cacheFileCombine cacheFileMerge cacheFileTrack camera cameraView canCreateManip canvas capitalizeString catch catchQuiet ceil changeSubdivComponentDisplayLevel changeSubdivRegion channelBox character characterMap characterOutlineEditor characterize chdir checkBox checkBoxGrp checkDefaultRenderGlobals choice circle circularFillet clamp clear clearCache clip clipEditor clipEditorCurrentTimeCtx clipSchedule clipSchedulerOutliner clipTrimBefore closeCurve closeSurface cluster cmdFileOutput cmdScrollFieldExecuter cmdScrollFieldReporter cmdShell coarsenSubdivSelectionList collision color colorAtPoint colorEditor colorIndex colorIndexSliderGrp colorSliderButtonGrp colorSliderGrp columnLayout commandEcho commandLine commandPort compactHairSystem componentEditor compositingInterop computePolysetVolume condition cone confirmDialog connectAttr connectControl connectDynamic connectJoint connectionInfo constrain constrainValue constructionHistory container containsMultibyte contextInfo control convertFromOldLayers convertIffToPsd convertLightmap convertSolidTx convertTessellation convertUnit copyArray copyFlexor copyKey copySkinWeights cos cpButton cpCache cpClothSet cpCollision cpConstraint cpConvClothToMesh cpForces cpGetSolverAttr cpPanel cpProperty cpRigidCollisionFilter cpSeam cpSetEdit cpSetSolverAttr cpSolver cpSolverTypes cpTool cpUpdateClothUVs createDisplayLayer createDrawCtx createEditor createLayeredPsdFile createMotionField createNewShelf createNode createRenderLayer createSubdivRegion cross crossProduct ctxAbort ctxCompletion ctxEditMode ctxTraverse currentCtx currentTime currentTimeCtx currentUnit curve curveAddPtCtx curveCVCtx curveEPCtx curveEditorCtx curveIntersect curveMoveEPCtx curveOnSurface curveSketchCtx cutKey cycleCheck cylinder dagPose date defaultLightListCheckBox defaultNavigation defineDataServer defineVirtualDevice deformer deg_to_rad delete deleteAttr deleteShadingGroupsAndMaterials deleteShelfTab deleteUI deleteUnusedBrushes delrandstr detachCurve detachDeviceAttr detachSurface deviceEditor devicePanel dgInfo dgdirty dgeval dgtimer dimWhen directKeyCtx directionalLight dirmap dirname disable disconnectAttr disconnectJoint diskCache displacementToPoly displayAffected displayColor displayCull displayLevelOfDetail displayPref displayRGBColor displaySmoothness displayStats displayString displaySurface distanceDimContext distanceDimension doBlur dolly dollyCtx dopeSheetEditor dot dotProduct doubleProfileBirailSurface drag dragAttrContext draggerContext dropoffLocator duplicate duplicateCurve duplicateSurface dynCache dynControl dynExport dynExpression dynGlobals dynPaintEditor dynParticleCtx dynPref dynRelEdPanel dynRelEditor dynamicLoad editAttrLimits editDisplayLayerGlobals editDisplayLayerMembers editRenderLayerAdjustment editRenderLayerGlobals editRenderLayerMembers editor editorTemplate effector emit emitter enableDevice encodeString endString endsWith env equivalent equivalentTol erf error eval evalDeferred evalEcho event exactWorldBoundingBox exclusiveLightCheckBox exec executeForEachObject exists exp expression expressionEditorListen extendCurve extendSurface extrude fcheck fclose feof fflush fgetline fgetword file fileBrowserDialog fileDialog fileExtension fileInfo filetest filletCurve filter filterCurve filterExpand filterStudioImport findAllIntersections findAnimCurves findKeyframe findMenuItem findRelatedSkinCluster finder firstParentOf fitBspline flexor floatEq floatField floatFieldGrp floatScrollBar floatSlider floatSlider2 floatSliderButtonGrp floatSliderGrp floor flow fluidCacheInfo fluidEmitter fluidVoxelInfo flushUndo fmod fontDialog fopen formLayout format fprint frameLayout fread freeFormFillet frewind fromNativePath fwrite gamma gauss geometryConstraint getApplicationVersionAsFloat getAttr getClassification getDefaultBrush getFileList getFluidAttr getInputDeviceRange getMayaPanelTypes getModifiers getPanel getParticleAttr getPluginResource getenv getpid glRender glRenderEditor globalStitch gmatch goal gotoBindPose grabColor gradientControl gradientControlNoAttr graphDollyCtx graphSelectContext graphTrackCtx gravity grid gridLayout group groupObjectsByName HfAddAttractorToAS HfAssignAS HfBuildEqualMap HfBuildFurFiles HfBuildFurImages HfCancelAFR HfConnectASToHF HfCreateAttractor HfDeleteAS HfEditAS HfPerformCreateAS HfRemoveAttractorFromAS HfSelectAttached HfSelectAttractors HfUnAssignAS hardenPointCurve hardware hardwareRenderPanel headsUpDisplay headsUpMessage help helpLine hermite hide hilite hitTest hotBox hotkey hotkeyCheck hsv_to_rgb hudButton hudSlider hudSliderButton hwReflectionMap hwRender hwRenderLoad hyperGraph hyperPanel hyperShade hypot iconTextButton iconTextCheckBox iconTextRadioButton iconTextRadioCollection iconTextScrollList iconTextStaticLabel ikHandle ikHandleCtx ikHandleDisplayScale ikSolver ikSplineHandleCtx ikSystem ikSystemInfo ikfkDisplayMethod illustratorCurves image imfPlugins inheritTransform insertJoint insertJointCtx insertKeyCtx insertKnotCurve insertKnotSurface instance instanceable instancer intField intFieldGrp intScrollBar intSlider intSliderGrp interToUI internalVar intersect iprEngine isAnimCurve isConnected isDirty isParentOf isSameObject isTrue isValidObjectName isValidString isValidUiName isolateSelect itemFilter itemFilterAttr itemFilterRender itemFilterType joint jointCluster jointCtx jointDisplayScale jointLattice keyTangent keyframe keyframeOutliner keyframeRegionCurrentTimeCtx keyframeRegionDirectKeyCtx keyframeRegionDollyCtx keyframeRegionInsertKeyCtx keyframeRegionMoveKeyCtx keyframeRegionScaleKeyCtx keyframeRegionSelectKeyCtx keyframeRegionSetKeyCtx keyframeRegionTrackCtx keyframeStats lassoContext lattice latticeDeformKeyCtx launch launchImageEditor layerButton layeredShaderPort layeredTexturePort layout layoutDialog lightList lightListEditor lightListPanel lightlink lineIntersection linearPrecision linstep listAnimatable listAttr listCameras listConnections listDeviceAttachments listHistory listInputDeviceAxes listInputDeviceButtons listInputDevices listMenuAnnotation listNodeTypes listPanelCategories listRelatives listSets listTransforms listUnselected listerEditor loadFluid loadNewShelf loadPlugin loadPluginLanguageResources loadPrefObjects localizedPanelLabel lockNode loft log longNameOf lookThru ls lsThroughFilter lsType lsUI Mayatomr mag makeIdentity makeLive makePaintable makeRoll makeSingleSurface makeTubeOn makebot manipMoveContext manipMoveLimitsCtx manipOptions manipRotateContext manipRotateLimitsCtx manipScaleContext manipScaleLimitsCtx marker match max memory menu menuBarLayout menuEditor menuItem menuItemToShelf menuSet menuSetPref messageLine min minimizeApp mirrorJoint modelCurrentTimeCtx modelEditor modelPanel mouse movIn movOut move moveIKtoFK moveKeyCtx moveVertexAlongDirection multiProfileBirailSurface mute nParticle nameCommand nameField namespace namespaceInfo newPanelItems newton nodeCast nodeIconButton nodeOutliner nodePreset nodeType noise nonLinear normalConstraint normalize nurbsBoolean nurbsCopyUVSet nurbsCube nurbsEditUV nurbsPlane nurbsSelect nurbsSquare nurbsToPoly nurbsToPolygonsPref nurbsToSubdiv nurbsToSubdivPref nurbsUVSet nurbsViewDirectionVector objExists objectCenter objectLayer objectType objectTypeUI obsoleteProc oceanNurbsPreviewPlane offsetCurve offsetCurveOnSurface offsetSurface openGLExtension openMayaPref optionMenu optionMenuGrp optionVar orbit orbitCtx orientConstraint outlinerEditor outlinerPanel overrideModifier paintEffectsDisplay pairBlend palettePort paneLayout panel panelConfiguration panelHistory paramDimContext paramDimension paramLocator parent parentConstraint particle particleExists particleInstancer particleRenderInfo partition pasteKey pathAnimation pause pclose percent performanceOptions pfxstrokes pickWalk picture pixelMove planarSrf plane play playbackOptions playblast plugAttr plugNode pluginInfo pluginResourceUtil pointConstraint pointCurveConstraint pointLight pointMatrixMult pointOnCurve pointOnSurface pointPosition poleVectorConstraint polyAppend polyAppendFacetCtx polyAppendVertex polyAutoProjection polyAverageNormal polyAverageVertex polyBevel polyBlendColor polyBlindData polyBoolOp polyBridgeEdge polyCacheMonitor polyCheck polyChipOff polyClipboard polyCloseBorder polyCollapseEdge polyCollapseFacet polyColorBlindData polyColorDel polyColorPerVertex polyColorSet polyCompare polyCone polyCopyUV polyCrease polyCreaseCtx polyCreateFacet polyCreateFacetCtx polyCube polyCut polyCutCtx polyCylinder polyCylindricalProjection polyDelEdge polyDelFacet polyDelVertex polyDuplicateAndConnect polyDuplicateEdge polyEditUV polyEditUVShell polyEvaluate polyExtrudeEdge polyExtrudeFacet polyExtrudeVertex polyFlipEdge polyFlipUV polyForceUV polyGeoSampler polyHelix polyInfo polyInstallAction polyLayoutUV polyListComponentConversion polyMapCut polyMapDel polyMapSew polyMapSewMove polyMergeEdge polyMergeEdgeCtx polyMergeFacet polyMergeFacetCtx polyMergeUV polyMergeVertex polyMirrorFace polyMoveEdge polyMoveFacet polyMoveFacetUV polyMoveUV polyMoveVertex polyNormal polyNormalPerVertex polyNormalizeUV polyOptUvs polyOptions polyOutput polyPipe polyPlanarProjection polyPlane polyPlatonicSolid polyPoke polyPrimitive polyPrism polyProjection polyPyramid polyQuad polyQueryBlindData polyReduce polySelect polySelectConstraint polySelectConstraintMonitor polySelectCtx polySelectEditCtx polySeparate polySetToFaceNormal polySewEdge polyShortestPathCtx polySmooth polySoftEdge polySphere polySphericalProjection polySplit polySplitCtx polySplitEdge polySplitRing polySplitVertex polyStraightenUVBorder polySubdivideEdge polySubdivideFacet polyToSubdiv polyTorus polyTransfer polyTriangulate polyUVSet polyUnite polyWedgeFace popen popupMenu pose pow preloadRefEd print progressBar progressWindow projFileViewer projectCurve projectTangent projectionContext projectionManip promptDialog propModCtx propMove psdChannelOutliner psdEditTextureFile psdExport psdTextureFile putenv pwd python querySubdiv quit rad_to_deg radial radioButton radioButtonGrp radioCollection radioMenuItemCollection rampColorPort rand randomizeFollicles randstate rangeControl readTake rebuildCurve rebuildSurface recordAttr recordDevice redo reference referenceEdit referenceQuery refineSubdivSelectionList refresh refreshAE registerPluginResource rehash reloadImage removeJoint removeMultiInstance removePanelCategory rename renameAttr renameSelectionList renameUI render renderGlobalsNode renderInfo renderLayerButton renderLayerParent renderLayerPostProcess renderLayerUnparent renderManip renderPartition renderQualityNode renderSettings renderThumbnailUpdate renderWindowEditor renderWindowSelectContext renderer reorder reorderDeformers requires reroot resampleFluid resetAE resetPfxToPolyCamera resetTool resolutionNode retarget reverseCurve reverseSurface revolve rgb_to_hsv rigidBody rigidSolver roll rollCtx rootOf rot rotate rotationInterpolation roundConstantRadius rowColumnLayout rowLayout runTimeCommand runup sampleImage saveAllShelves saveAttrPreset saveFluid saveImage saveInitialState saveMenu savePrefObjects savePrefs saveShelf saveToolSettings scale scaleBrushBrightness scaleComponents scaleConstraint scaleKey scaleKeyCtx sceneEditor sceneUIReplacement scmh scriptCtx scriptEditorInfo scriptJob scriptNode scriptTable scriptToShelf scriptedPanel scriptedPanelType scrollField scrollLayout sculpt searchPathArray seed selLoadSettings select selectContext selectCurveCV selectKey selectKeyCtx selectKeyframeRegionCtx selectMode selectPref selectPriority selectType selectedNodes selectionConnection separator setAttr setAttrEnumResource setAttrMapping setAttrNiceNameResource setConstraintRestPosition setDefaultShadingGroup setDrivenKeyframe setDynamic setEditCtx setEditor setFluidAttr setFocus setInfinity setInputDeviceMapping setKeyCtx setKeyPath setKeyframe setKeyframeBlendshapeTargetWts setMenuMode setNodeNiceNameResource setNodeTypeFlag setParent setParticleAttr setPfxToPolyCamera setPluginResource setProject setStampDensity setStartupMessage setState setToolTo setUITemplate setXformManip sets shadingConnection shadingGeometryRelCtx shadingLightRelCtx shadingNetworkCompare shadingNode shapeCompare shelfButton shelfLayout shelfTabLayout shellField shortNameOf showHelp showHidden showManipCtx showSelectionInTitle showShadingGroupAttrEditor showWindow sign simplify sin singleProfileBirailSurface size sizeBytes skinCluster skinPercent smoothCurve smoothTangentSurface smoothstep snap2to2 snapKey snapMode snapTogetherCtx snapshot soft softMod softModCtx sort sound soundControl source spaceLocator sphere sphrand spotLight spotLightPreviewPort spreadSheetEditor spring sqrt squareSurface srtContext stackTrace startString startsWith stitchAndExplodeShell stitchSurface stitchSurfacePoints strcmp stringArrayCatenate stringArrayContains stringArrayCount stringArrayInsertAtIndex stringArrayIntersector stringArrayRemove stringArrayRemoveAtIndex stringArrayRemoveDuplicates stringArrayRemoveExact stringArrayToString stringToStringArray strip stripPrefixFromName stroke subdAutoProjection subdCleanTopology subdCollapse subdDuplicateAndConnect subdEditUV subdListComponentConversion subdMapCut subdMapSewMove subdMatchTopology subdMirror subdToBlind subdToPoly subdTransferUVsToCache subdiv subdivCrease subdivDisplaySmoothness substitute substituteAllString substituteGeometry substring surface surfaceSampler surfaceShaderList swatchDisplayPort switchTable symbolButton symbolCheckBox sysFile system tabLayout tan tangentConstraint texLatticeDeformContext texManipContext texMoveContext texMoveUVShellContext texRotateContext texScaleContext texSelectContext texSelectShortestPathCtx texSmudgeUVContext texWinToolCtx text textCurves textField textFieldButtonGrp textFieldGrp textManip textScrollList textToShelf textureDisplacePlane textureHairColor texturePlacementContext textureWindow threadCount threePointArcCtx timeControl timePort timerX toNativePath toggle toggleAxis toggleWindowVisibility tokenize tokenizeList tolerance tolower toolButton toolCollection toolDropped toolHasOptions toolPropertyWindow torus toupper trace track trackCtx transferAttributes transformCompare transformLimits translator trim trunc truncateFluidCache truncateHairCache tumble tumbleCtx turbulence twoPointArcCtx uiRes uiTemplate unassignInputDevice undo undoInfo ungroup uniform unit unloadPlugin untangleUV untitledFileName untrim upAxis updateAE userCtx uvLink uvSnapshot validateShelfName vectorize view2dToolCtx viewCamera viewClipPlane viewFit viewHeadOn viewLookAt viewManip viewPlace viewSet visor volumeAxis vortex waitCursor warning webBrowser webBrowserPrefs whatIs window windowPref wire wireContext workspace wrinkle wrinkleContext writeTake xbmLangPathList xform",illegal:"</",contains:[e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{className:"variable",variants:[{begin:"\\$\\d"},{begin:"[\\$\\%\\@](\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)"},{begin:"\\*(\\^\\w\\b|#\\w+|[^\\s\\w{]|{\\w+}|\\w+)",relevance:0}]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}),i.registerLanguage("mercury",function(e){var t={className:"label",begin:"XXX",end:"$",endsWithParent:!0,relevance:0},n=e.inherit(e.C_LINE_COMMENT_MODE,{begin:"%"}),r=e.inherit(e.C_BLOCK_COMMENT_MODE,{relevance:0});n.contains.push(t),r.contains.push(t);var i=e.inherit(e.APOS_STRING_MODE,{relevance:0}),a=e.inherit(e.QUOTE_STRING_MODE,{relevance:0});a.contains.push({className:"constant",begin:"\\\\[abfnrtv]\\|\\\\x[0-9a-fA-F]*\\\\\\|%[-+# *.0-9]*[dioxXucsfeEgGp]",relevance:0});return{aliases:["m","moo"],keywords:{keyword:"module use_module import_module include_module end_module initialise mutable initialize finalize finalise interface implementation pred mode func type inst solver any_pred any_func is semidet det nondet multi erroneous failure cc_nondet cc_multi typeclass instance where pragma promise external trace atomic or_else require_complete_switch require_det require_semidet require_multi require_nondet require_cc_multi require_cc_nondet require_erroneous require_failure",pragma:"inline no_inline type_spec source_file fact_table obsolete memo loop_check minimal_model terminates does_not_terminate check_termination promise_equivalent_clauses",preprocessor:"foreign_proc foreign_decl foreign_code foreign_type foreign_import_module foreign_export_enum foreign_export foreign_enum may_call_mercury will_not_call_mercury thread_safe not_thread_safe maybe_thread_safe promise_pure promise_semipure tabled_for_io local untrailed trailed attach_to_io_state can_pass_as_mercury_type stable will_not_throw_exception may_modify_trail will_not_modify_trail may_duplicate may_not_duplicate affects_liveness does_not_affect_liveness doesnt_affect_liveness no_sharing unknown_sharing sharing",built_in:"some all not if then else true fail false try catch catch_any semidet_true semidet_false semidet_fail impure_true impure semipure"},contains:[{className:"built_in",variants:[{begin:"<=>"},{begin:"<=",relevance:0},{begin:"=>",relevance:0},{begin:"/\\\\"},{begin:"\\\\/"}]},{className:"built_in",variants:[{begin:":-\\|--\x3e"},{begin:"=",relevance:0}]},n,r,{className:"number",begin:"0'.\\|0[box][0-9a-fA-F]*"},e.NUMBER_MODE,i,a,{begin:/:-/}]}}),i.registerLanguage("mizar",function(e){return{keywords:"environ vocabularies notations constructors definitions registrations theorems schemes requirements begin end definition registration cluster existence pred func defpred deffunc theorem proof let take assume then thus hence ex for st holds consider reconsider such that and in provided of as from be being by means equals implies iff redefine define now not or attr is mode suppose per cases set thesis contradiction scheme reserve struct correctness compatibility coherence symmetry assymetry reflexivity irreflexivity connectedness uniqueness commutativity idempotence involutiveness projectivity",contains:[e.COMMENT("::","$")]}}),i.registerLanguage("perl",function(e){var t="getpwent getservent quotemeta msgrcv scalar kill dbmclose undef lc ma syswrite tr send umask sysopen shmwrite vec qx utime local oct semctl localtime readpipe do return format read sprintf dbmopen pop getpgrp not getpwnam rewinddir qqfileno qw endprotoent wait sethostent bless s|0 opendir continue each sleep endgrent shutdown dump chomp connect getsockname die socketpair close flock exists index shmgetsub for endpwent redo lstat msgctl setpgrp abs exit select print ref gethostbyaddr unshift fcntl syscall goto getnetbyaddr join gmtime symlink semget splice x|0 getpeername recv log setsockopt cos last reverse gethostbyname getgrnam study formline endhostent times chop length gethostent getnetent pack getprotoent getservbyname rand mkdir pos chmod y|0 substr endnetent printf next open msgsnd readdir use unlink getsockopt getpriority rindex wantarray hex system getservbyport endservent int chr untie rmdir prototype tell listen fork shmread ucfirst setprotoent else sysseek link getgrgid shmctl waitpid unpack getnetbyname reset chdir grep split require caller lcfirst until warn while values shift telldir getpwuid my getprotobynumber delete and sort uc defined srand accept package seekdir getprotobyname semop our rename seek if q|0 chroot sysread setpwent no crypt getc chown sqrt write setnetent setpriority foreach tie sin msgget map stat getlogin unless elsif truncate exec keys glob tied closedirioctl socket readlink eval xor readline binmode setservent eof ord bind alarm pipe atan2 getgrent exp time push setgrent gt lt or ne m|0 break given say state when",n={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:t},r={begin:"->{",end:"}"},i={className:"variable",variants:[{begin:/\$\d/},{begin:/[\$%@](\^\w\b|#\w+(::\w+)*|{\w+}|\w+(::\w*)*)/},{begin:/[\$%@][^\s\w{]/,relevance:0}]},a=[e.BACKSLASH_ESCAPE,n,i],o=[i,e.HASH_COMMENT_MODE,e.COMMENT("^\\=\\w","\\=cut",{endsWithParent:!0}),r,{className:"string",contains:a,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*\\<",end:"\\>",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:"{\\w+}",contains:[],relevance:0},{begin:"-?\\w+\\s*\\=\\>",contains:[],relevance:0}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",begin:"(s|tr|y)/(\\\\.|[^/])*/(\\\\.|[^/])*/[a-z]*",relevance:10},{className:"regexp",begin:"(m|qr)?/",end:"/[a-z]*",contains:[e.BACKSLASH_ESCAPE],relevance:0}]},{className:"sub",beginKeywords:"sub",end:"(\\s*\\(.*?\\))?[;{]",relevance:5},{className:"operator",begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return n.contains=o,{aliases:["pl"],keywords:t,contains:r.contains=o}}),i.registerLanguage("mojolicious",function(e){return{subLanguage:"xml",contains:[{className:"preprocessor",begin:"^__(END|DATA)__$"},{begin:"^\\s*%{1,2}={0,2}",end:"$",subLanguage:"perl"},{begin:"<%{1,2}={0,2}",end:"={0,1}%>",subLanguage:"perl",excludeBegin:!0,excludeEnd:!0}]}}),i.registerLanguage("monkey",function(e){var t={className:"number",relevance:0,variants:[{begin:"[$][a-fA-F0-9]+"},e.NUMBER_MODE]};return{case_insensitive:!0,keywords:{keyword:"public private property continue exit extern new try catch eachin not abstract final select case default const local global field end if then else elseif endif while wend repeat until forever for to step next return module inline throw",built_in:"DebugLog DebugStop Error Print ACos ACosr ASin ASinr ATan ATan2 ATan2r ATanr Abs Abs Ceil Clamp Clamp Cos Cosr Exp Floor Log Max Max Min Min Pow Sgn Sgn Sin Sinr Sqrt Tan Tanr Seed PI HALFPI TWOPI",literal:"true false null and or shl shr mod"},illegal:/\/\*/,contains:[e.COMMENT("#rem","#end"),e.COMMENT("'","$",{relevance:0}),{className:"function",beginKeywords:"function method",end:"[(=:]|$",illegal:/\n/,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"class",beginKeywords:"class interface",end:"$",contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{className:"variable",begin:"\\b(self|super)\\b"},{className:"preprocessor",beginKeywords:"import",end:"$"},{className:"preprocessor",begin:"\\s*#",end:"$",keywords:"if else elseif endif end then"},{className:"pi",begin:"^\\s*strict\\b"},{beginKeywords:"alias",end:"=",contains:[e.UNDERSCORE_TITLE_MODE]},e.QUOTE_STRING_MODE,t]}}),i.registerLanguage("nginx",function(e){var t={className:"variable",variants:[{begin:/\$\d+/},{begin:/\$\{/,end:/}/},{begin:"[\\$\\@]"+e.UNDERSCORE_IDENT_RE}]},n={endsWithParent:!0,lexemes:"[a-z/_]+",keywords:{built_in:"on off yes no true false none blocked debug info notice warn error crit select break last permanent redirect kqueue rtsig epoll poll /dev/poll"},relevance:0,illegal:"=>",contains:[e.HASH_COMMENT_MODE,{className:"string",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:/"/,end:/"/},{begin:/'/,end:/'/}]},{className:"url",begin:"([a-z]+):/",end:"\\s",endsWithParent:!0,excludeEnd:!0,contains:[t]},{className:"regexp",contains:[e.BACKSLASH_ESCAPE,t],variants:[{begin:"\\s\\^",end:"\\s|{|;",returnEnd:!0},{begin:"~\\*?\\s+",end:"\\s|{|;",returnEnd:!0},{begin:"\\*(\\.[a-z\\-]+)+"},{begin:"([a-z\\-]+\\.)+\\*"}]},{className:"number",begin:"\\b\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}(:\\d{1,5})?\\b"},{className:"number",begin:"\\b\\d+[kKmMgGdshdwy]*\\b",relevance:0},t]};return{aliases:["nginxconf"],contains:[e.HASH_COMMENT_MODE,{begin:e.UNDERSCORE_IDENT_RE+"\\s",end:";|{",returnBegin:!0,contains:[{className:"title",begin:e.UNDERSCORE_IDENT_RE,starts:n}],relevance:0}],illegal:"[^\\s\\}]"}}),i.registerLanguage("nimrod",function(e){return{aliases:["nim"],keywords:{keyword:"addr and as asm bind block break|0 case|0 cast const|0 continue|0 converter discard distinct|10 div do elif else|0 end|0 enum|0 except export finally for from generic if|0 import|0 in include|0 interface is isnot|10 iterator|10 let|0 macro method|10 mixin mod nil not notin|10 object|0 of or out proc|10 ptr raise ref|10 return shl shr static template try|0 tuple type|0 using|0 var|0 when while|0 with without xor yield",literal:"shared guarded stdin stdout stderr result|10 true false"},contains:[{className:"decorator",begin:/{\./,end:/\.}/,relevance:10},{className:"string",begin:/[a-zA-Z]\w*"/,end:/"/,contains:[{begin:/""/}]},{className:"string",begin:/([a-zA-Z]\w*)?"""/,end:/"""/},e.QUOTE_STRING_MODE,{className:"type",begin:/\b[A-Z]\w+\b/,relevance:0},{className:"type",begin:/\b(int|int8|int16|int32|int64|uint|uint8|uint16|uint32|uint64|float|float32|float64|bool|char|string|cstring|pointer|expr|stmt|void|auto|any|range|array|openarray|varargs|seq|set|clong|culong|cchar|cschar|cshort|cint|csize|clonglong|cfloat|cdouble|clongdouble|cuchar|cushort|cuint|culonglong|cstringarray|semistatic)\b/},{className:"number",begin:/\b(0[xX][0-9a-fA-F][_0-9a-fA-F]*)('?[iIuU](8|16|32|64))?/,relevance:0},{className:"number",begin:/\b(0o[0-7][_0-7]*)('?[iIuUfF](8|16|32|64))?/,relevance:0},{className:"number",begin:/\b(0(b|B)[01][_01]*)('?[iIuUfF](8|16|32|64))?/,relevance:0},{className:"number",begin:/\b(\d[_\d]*)('?[iIuUfF](8|16|32|64))?/,relevance:0},e.HASH_COMMENT_MODE]}}),i.registerLanguage("nix",function(e){var t={keyword:"rec with let in inherit assert if else then",constant:"true false or and null",built_in:"import abort baseNameOf dirOf isNull builtins map removeAttrs throw toString derivation"},n={className:"subst",begin:/\$\{/,end:/}/,keywords:t},r={className:"string",begin:"''",end:"''",contains:[n]},i={className:"string",begin:'"',end:'"',contains:[n]},a=[e.NUMBER_MODE,e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,i,{className:"variable",begin:/[a-zA-Z0-9-_]+(\s*=)/,relevance:0}];return{aliases:["nixos"],keywords:t,contains:n.contains=a}}),i.registerLanguage("nsis",function(e){var t={className:"constant",begin:"\\$+{[a-zA-Z0-9_]+}"},n={className:"variable",begin:"\\$+[a-zA-Z0-9_]+",illegal:"\\(\\){}"},r={className:"constant",begin:"\\$+\\([a-zA-Z0-9_]+\\)"};return{case_insensitive:!1,keywords:{keyword:"Abort AddBrandingImage AddSize AllowRootDirInstall AllowSkipFiles AutoCloseWindow BGFont BGGradient BrandingText BringToFront Call CallInstDLL Caption ChangeUI CheckBitmap ClearErrors CompletedText ComponentText CopyFiles CRCCheck CreateDirectory CreateFont CreateShortCut Delete DeleteINISec DeleteINIStr DeleteRegKey DeleteRegValue DetailPrint DetailsButtonText DirText DirVar DirVerify EnableWindow EnumRegKey EnumRegValue Exch Exec ExecShell ExecWait ExpandEnvStrings File FileBufSize FileClose FileErrorText FileOpen FileRead FileReadByte FileReadUTF16LE FileReadWord FileSeek FileWrite FileWriteByte FileWriteUTF16LE FileWriteWord FindClose FindFirst FindNext FindWindow FlushINI FunctionEnd GetCurInstType GetCurrentAddress GetDlgItem GetDLLVersion GetDLLVersionLocal GetErrorLevel GetFileTime GetFileTimeLocal GetFullPathName GetFunctionAddress GetInstDirError GetLabelAddress GetTempFileName Goto HideWindow Icon IfAbort IfErrors IfFileExists IfRebootFlag IfSilent InitPluginsDir InstallButtonText InstallColors InstallDir InstallDirRegKey InstProgressFlags InstType InstTypeGetText InstTypeSetText IntCmp IntCmpU IntFmt IntOp IsWindow LangString LicenseBkColor LicenseData LicenseForceSelection LicenseLangString LicenseText LoadLanguageFile LockWindow LogSet LogText ManifestDPIAware ManifestSupportedOS MessageBox MiscButtonText Name Nop OutFile Page PageCallbacks PageExEnd Pop Push Quit ReadEnvStr ReadINIStr ReadRegDWORD ReadRegStr Reboot RegDLL Rename RequestExecutionLevel ReserveFile Return RMDir SearchPath SectionEnd SectionGetFlags SectionGetInstTypes SectionGetSize SectionGetText SectionGroupEnd SectionIn SectionSetFlags SectionSetInstTypes SectionSetSize SectionSetText SendMessage SetAutoClose SetBrandingImage SetCompress SetCompressor SetCompressorDictSize SetCtlColors SetCurInstType SetDatablockOptimize SetDateSave SetDetailsPrint SetDetailsView SetErrorLevel SetErrors SetFileAttributes SetFont SetOutPath SetOverwrite SetPluginUnload SetRebootFlag SetRegView SetShellVarContext SetSilent ShowInstDetails ShowUninstDetails ShowWindow SilentInstall SilentUnInstall Sleep SpaceTexts StrCmp StrCmpS StrCpy StrLen SubCaption SubSectionEnd Unicode UninstallButtonText UninstallCaption UninstallIcon UninstallSubCaption UninstallText UninstPage UnRegDLL Var VIAddVersionKey VIFileVersion VIProductVersion WindowIcon WriteINIStr WriteRegBin WriteRegDWORD WriteRegExpandStr WriteRegStr WriteUninstaller XPStyle",literal:"admin all auto both colored current false force hide highest lastused leave listonly none normal notset off on open print show silent silentlog smooth textonly true user "},contains:[e.HASH_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"',end:'"',illegal:"\\n",contains:[{className:"symbol",begin:"\\$(\\\\(n|r|t)|\\$)"},{className:"symbol",begin:"\\$(ADMINTOOLS|APPDATA|CDBURN_AREA|CMDLINE|COMMONFILES32|COMMONFILES64|COMMONFILES|COOKIES|DESKTOP|DOCUMENTS|EXEDIR|EXEFILE|EXEPATH|FAVORITES|FONTS|HISTORY|HWNDPARENT|INSTDIR|INTERNET_CACHE|LANGUAGE|LOCALAPPDATA|MUSIC|NETHOOD|OUTDIR|PICTURES|PLUGINSDIR|PRINTHOOD|PROFILE|PROGRAMFILES32|PROGRAMFILES64|PROGRAMFILES|QUICKLAUNCH|RECENT|RESOURCES_LOCALIZED|RESOURCES|SENDTO|SMPROGRAMS|SMSTARTUP|STARTMENU|SYSDIR|TEMP|TEMPLATES|VIDEOS|WINDIR)"},t,n,r]},e.COMMENT(";","$",{relevance:0}),{className:"function",beginKeywords:"Function PageEx Section SectionGroup SubSection",end:"$"},{className:"constant",begin:"\\!(addincludedir|addplugindir|appendfile|cd|define|delfile|echo|else|endif|error|execute|finalize|getdllversionsystem|ifdef|ifmacrodef|ifmacrondef|ifndef|if|include|insertmacro|macroend|macro|makensis|packhdr|searchparse|searchreplace|tempfile|undef|verbose|warning)"},t,n,r,{className:"params",begin:"(ARCHIVE|FILE_ATTRIBUTE_ARCHIVE|FILE_ATTRIBUTE_NORMAL|FILE_ATTRIBUTE_OFFLINE|FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_SYSTEM|FILE_ATTRIBUTE_TEMPORARY|HKCR|HKCU|HKDD|HKEY_CLASSES_ROOT|HKEY_CURRENT_CONFIG|HKEY_CURRENT_USER|HKEY_DYN_DATA|HKEY_LOCAL_MACHINE|HKEY_PERFORMANCE_DATA|HKEY_USERS|HKLM|HKPD|HKU|IDABORT|IDCANCEL|IDIGNORE|IDNO|IDOK|IDRETRY|IDYES|MB_ABORTRETRYIGNORE|MB_DEFBUTTON1|MB_DEFBUTTON2|MB_DEFBUTTON3|MB_DEFBUTTON4|MB_ICONEXCLAMATION|MB_ICONINFORMATION|MB_ICONQUESTION|MB_ICONSTOP|MB_OK|MB_OKCANCEL|MB_RETRYCANCEL|MB_RIGHT|MB_RTLREADING|MB_SETFOREGROUND|MB_TOPMOST|MB_USERICON|MB_YESNO|NORMAL|OFFLINE|READONLY|SHCTX|SHELL_CONTEXT|SYSTEM|TEMPORARY)"},e.NUMBER_MODE,{className:"literal",begin:e.IDENT_RE+"::"+e.IDENT_RE}]}}),i.registerLanguage("objectivec",function(e){var t=/[a-zA-Z@][a-zA-Z0-9_]*/,n="@interface @class @protocol @implementation";return{aliases:["mm","objc","obj-c"],keywords:{keyword:"int float while char export sizeof typedef const struct for union unsigned long volatile static bool mutable if do return goto void enum else break extern asm case short default double register explicit signed typename this switch continue wchar_t inline readonly assign readwrite self @synchronized id typeof nonatomic super unichar IBOutlet IBAction strong weak copy in out inout bycopy byref oneway __strong __weak __block __autoreleasing @private @protected @public @try @property @end @throw @catch @finally @autoreleasepool @synthesize @dynamic @selector @optional @required",literal:"false true FALSE TRUE nil YES NO NULL",built_in:"BOOL dispatch_once_t dispatch_queue_t dispatch_sync dispatch_async dispatch_once"},lexemes:t,illegal:"</",contains:[{className:"built_in",begin:"(AV|CA|CF|CG|CI|MK|MP|NS|UI)\\w+"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"'",end:"[^\\\\]'",illegal:"[^\\\\][^']"}]},{className:"preprocessor",begin:"#",end:"$",contains:[{className:"title",variants:[{begin:'"',end:'"'},{begin:"<",end:">"}]}]},{className:"class",begin:"("+n.split(" ").join("|")+")\\b",end:"({|$)",excludeEnd:!0,keywords:n,lexemes:t,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"variable",begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}),i.registerLanguage("ocaml",function(e){return{aliases:["ml"],keywords:{keyword:"and as assert asr begin class constraint do done downto else end exception external for fun function functor if in include inherit! inherit initializer land lazy let lor lsl lsr lxor match method!|10 method mod module mutable new object of open! open or private rec sig struct then to try type val! val virtual when while with parser value",built_in:"array bool bytes char exn|5 float int int32 int64 list lazy_t|5 nativeint|5 string unit in_channel out_channel ref",literal:"true false"},illegal:/\/\/|>>/,lexemes:"[a-z_]\\w*!?",contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)",relevance:0},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"tag",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"char",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}),i.registerLanguage("openscad",function(e){var t={className:"keyword",begin:"\\$(f[asn]|t|vp[rtd]|children)"},n={className:"number",begin:"\\b\\d+(\\.\\d+)?(e-?\\d+)?",relevance:0},r=e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),i={className:"function",beginKeywords:"module function",end:"\\=|\\{",contains:[{className:"params",begin:"\\(",end:"\\)",contains:["self",n,r,t,{className:"literal",begin:"false|true|PI|undef"}]},e.UNDERSCORE_TITLE_MODE]};return{aliases:["scad"],keywords:{keyword:"function module include use for intersection_for if else \\%",literal:"false true PI undef",built_in:"circle square polygon text sphere cube cylinder polyhedron translate rotate scale resize mirror multmatrix color offset hull minkowski union difference intersection abs sign sin cos tan acos asin atan atan2 floor round ceil ln log pow sqrt exp rands min max concat lookup str chr search version version_num norm cross parent_module echo import import_dxf dxf_linear_extrude linear_extrude rotate_extrude surface projection render children dxf_cross dxf_dim let assign"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"preprocessor",keywords:"include use",begin:"include|use <",end:">"},r,t,{className:"built_in",begin:"[*!#%]",relevance:0},i]}}),i.registerLanguage("oxygene",function(e){var t="abstract add and array as asc aspect assembly async begin break block by case class concat const copy constructor continue create default delegate desc distinct div do downto dynamic each else empty end ensure enum equals event except exit extension external false final finalize finalizer finally flags for forward from function future global group has if implementation implements implies in index inherited inline interface into invariants is iterator join locked locking loop matching method mod module namespace nested new nil not notify nullable of old on operator or order out override parallel params partial pinned private procedure property protected public queryable raise read readonly record reintroduce remove repeat require result reverse sealed select self sequence set shl shr skip static step soft take then to true try tuple type union unit unsafe until uses using var virtual raises volatile where while with write xor yield await mapped deprecated stdcall cdecl pascal register safecall overload library platform reference packed strict published autoreleasepool selector strong weak unretained",n=e.COMMENT("{","}",{relevance:0}),r=e.COMMENT("\\(\\*","\\*\\)",{relevance:10}),i={className:"string",begin:"'",end:"'",contains:[{begin:"''"}]},a={className:"string",begin:"(#\\d+)+"},o={className:"function",beginKeywords:"function constructor destructor procedure method",end:"[:;]",keywords:"function constructor|10 destructor|10 procedure|10 method|10",contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",keywords:t,contains:[i,a]},n,r]};return{case_insensitive:!0,keywords:t,illegal:'("|\\$[G-Zg-z]|\\/\\*|</|=>|->)',contains:[n,r,e.C_LINE_COMMENT_MODE,i,a,e.NUMBER_MODE,o,{className:"class",begin:"=\\bclass\\b",end:"end;",keywords:t,contains:[i,a,n,r,e.C_LINE_COMMENT_MODE,o]}]}}),i.registerLanguage("parser3",function(e){var t=e.COMMENT("{","}",{contains:["self"]});return{subLanguage:"xml",relevance:0,contains:[e.COMMENT("^#","$"),e.COMMENT("\\^rem{","}",{relevance:10,contains:[t]}),{className:"preprocessor",begin:"^@(?:BASE|USE|CLASS|OPTIONS)$",relevance:10},{className:"title",begin:"@[\\w\\-]+\\[[\\w^;\\-]*\\](?:\\[[\\w^;\\-]*\\])?(?:.*)$"},{className:"variable",begin:"\\$\\{?[\\w\\-\\.\\:]+\\}?"},{className:"keyword",begin:"\\^[\\w\\-\\.\\:]+"},{className:"number",begin:"\\^#[0-9a-fA-F]+"},e.C_NUMBER_MODE]}}),i.registerLanguage("pf",function(e){return{aliases:["pf.conf"],lexemes:/[a-z0-9_<>-]+/,keywords:{built_in:"block match pass load anchor|5 antispoof|10 set table",keyword:"in out log quick on rdomain inet inet6 proto from port os to routeallow-opts divert-packet divert-reply divert-to flags group icmp-typeicmp6-type label once probability recieved-on rtable prio queuetos tag tagged user keep fragment for os dropaf-to|10 binat-to|10 nat-to|10 rdr-to|10 bitmask least-stats random round-robinsource-hash static-portdup-to reply-to route-toparent bandwidth default min max qlimitblock-policy debug fingerprints hostid limit loginterface optimizationreassemble ruleset-optimization basic none profile skip state-defaultsstate-policy timeoutconst counters persistno modulate synproxy state|5 floating if-bound no-sync pflow|10 sloppysource-track global rule max-src-nodes max-src-states max-src-connmax-src-conn-rate overload flushscrub|5 max-mss min-ttl no-df|10 random-id",literal:"all any no-route self urpf-failed egress|5 unknown"},contains:[e.HASH_COMMENT_MODE,e.NUMBER_MODE,e.QUOTE_STRING_MODE,{className:"variable",begin:/\$[\w\d#@][\w\d_]*/},{className:"variable",begin:/</,end:/>/}]}}),i.registerLanguage("php",function(e){var t={className:"variable",begin:"\\$+[a-zA-Z_\7f-ÿ][a-zA-Z0-9_\7f-ÿ]*"},n={className:"preprocessor",begin:/<\?(php)?|\?>/},r={className:"string",contains:[e.BACKSLASH_ESCAPE,n],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},i={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{aliases:["php3","php4","php5","php6"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally",contains:[e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"},n]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:e.UNDERSCORE_IDENT_RE}),{className:"string",begin:/<<<['"]?\w+['"]?$/,end:/^\w+;?$/,contains:[e.BACKSLASH_ESCAPE,{className:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]}]},n,t,{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",t,e.C_BLOCK_COMMENT_MODE,r,i]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},r,i]}}),i.registerLanguage("powershell",function(e){var t={className:"variable",variants:[{begin:/\$[\w\d][\w\d_:]*/}]},n={className:"string",begin:/"/,end:/"/,contains:[{begin:"`[\\s\\S]",relevance:0},t,{className:"variable",begin:/\$[A-z]/,end:/[^A-z]/}]};return{aliases:["ps"],lexemes:/-?[A-z\.\-]+/,case_insensitive:!0,keywords:{keyword:"if else foreach return function do while until elseif begin for trap data dynamicparam end break throw param continue finally in switch exit filter try process catch",literal:"$null $true $false",built_in:"Add-Content Add-History Add-Member Add-PSSnapin Clear-Content Clear-Item Clear-Item Property Clear-Variable Compare-Object ConvertFrom-SecureString Convert-Path ConvertTo-Html ConvertTo-SecureString Copy-Item Copy-ItemProperty Export-Alias Export-Clixml Export-Console Export-Csv ForEach-Object Format-Custom Format-List Format-Table Format-Wide Get-Acl Get-Alias Get-AuthenticodeSignature Get-ChildItem Get-Command Get-Content Get-Credential Get-Culture Get-Date Get-EventLog Get-ExecutionPolicy Get-Help Get-History Get-Host Get-Item Get-ItemProperty Get-Location Get-Member Get-PfxCertificate Get-Process Get-PSDrive Get-PSProvider Get-PSSnapin Get-Service Get-TraceSource Get-UICulture Get-Unique Get-Variable Get-WmiObject Group-Object Import-Alias Import-Clixml Import-Csv Invoke-Expression Invoke-History Invoke-Item Join-Path Measure-Command Measure-Object Move-Item Move-ItemProperty New-Alias New-Item New-ItemProperty New-Object New-PSDrive New-Service New-TimeSpan New-Variable Out-Default Out-File Out-Host Out-Null Out-Printer Out-String Pop-Location Push-Location Read-Host Remove-Item Remove-ItemProperty Remove-PSDrive Remove-PSSnapin Remove-Variable Rename-Item Rename-ItemProperty Resolve-Path Restart-Service Resume-Service Select-Object Select-String Set-Acl Set-Alias Set-AuthenticodeSignature Set-Content Set-Date Set-ExecutionPolicy Set-Item Set-ItemProperty Set-Location Set-PSDebug Set-Service Set-TraceSource Set-Variable Sort-Object Split-Path Start-Service Start-Sleep Start-Transcript Stop-Process Stop-Service Stop-Transcript Suspend-Service Tee-Object Test-Path Trace-Command Update-FormatData Update-TypeData Where-Object Write-Debug Write-Error Write-Host Write-Output Write-Progress Write-Verbose Write-Warning",operator:"-ne -eq -lt -gt -ge -le -not -like -notlike -match -notmatch -contains -notcontains -in -notin -replace"},contains:[e.HASH_COMMENT_MODE,e.NUMBER_MODE,n,{className:"string",begin:/'/,end:/'/},t]}}),i.registerLanguage("processing",function(e){return{keywords:{keyword:"BufferedReader PVector PFont PImage PGraphics HashMap boolean byte char color double float int long String Array FloatDict FloatList IntDict IntList JSONArray JSONObject Object StringDict StringList Table TableRow XML false synchronized int abstract float private char boolean static null if const for true while long throw strictfp finally protected import native final return void enum else break transient new catch instanceof byte super volatile case assert short package default double public try this switch continue throws protected public private",constant:"P2D P3D HALF_PI PI QUARTER_PI TAU TWO_PI",variable:"displayHeight displayWidth mouseY mouseX mousePressed pmouseX pmouseY key keyCode pixels focused frameCount frameRate height width",title:"setup draw",built_in:"size createGraphics beginDraw createShape loadShape PShape arc ellipse line point quad rect triangle bezier bezierDetail bezierPoint bezierTangent curve curveDetail curvePoint curveTangent curveTightness shape shapeMode beginContour beginShape bezierVertex curveVertex endContour endShape quadraticVertex vertex ellipseMode noSmooth rectMode smooth strokeCap strokeJoin strokeWeight mouseClicked mouseDragged mouseMoved mousePressed mouseReleased mouseWheel keyPressed keyPressedkeyReleased keyTyped print println save saveFrame day hour millis minute month second year background clear colorMode fill noFill noStroke stroke alpha blue brightness color green hue lerpColor red saturation modelX modelY modelZ screenX screenY screenZ ambient emissive shininess specular add createImage beginCamera camera endCamera frustum ortho perspective printCamera printProjection cursor frameRate noCursor exit loop noLoop popStyle pushStyle redraw binary boolean byte char float hex int str unbinary unhex join match matchAll nf nfc nfp nfs split splitTokens trim append arrayCopy concat expand reverse shorten sort splice subset box sphere sphereDetail createInput createReader loadBytes loadJSONArray loadJSONObject loadStrings loadTable loadXML open parseXML saveTable selectFolder selectInput beginRaw beginRecord createOutput createWriter endRaw endRecord PrintWritersaveBytes saveJSONArray saveJSONObject saveStream saveStrings saveXML selectOutput popMatrix printMatrix pushMatrix resetMatrix rotate rotateX rotateY rotateZ scale shearX shearY translate ambientLight directionalLight lightFalloff lights lightSpecular noLights normal pointLight spotLight image imageMode loadImage noTint requestImage tint texture textureMode textureWrap blend copy filter get loadPixels set updatePixels blendMode loadShader PShaderresetShader shader createFont loadFont text textFont textAlign textLeading textMode textSize textWidth textAscent textDescent abs ceil constrain dist exp floor lerp log mag map max min norm pow round sq sqrt acos asin atan atan2 cos degrees radians sin tan noise noiseDetail noiseSeed random randomGaussian randomSeed"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}),i.registerLanguage("profile",function(e){return{contains:[e.C_NUMBER_MODE,{className:"built_in",begin:"{",end:"}$",excludeBegin:!0,excludeEnd:!0,contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE],relevance:0},{className:"filename",begin:"[a-zA-Z_][\\da-zA-Z_]+\\.[\\da-zA-Z_]{1,3}",end:":",excludeEnd:!0},{className:"header",begin:"(ncalls|tottime|cumtime)",end:"$",keywords:"ncalls tottime|10 cumtime|10 filename",relevance:10},{className:"summary",begin:"function calls",end:"$",contains:[e.C_NUMBER_MODE],relevance:10},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"function",begin:"\\(",end:"\\)$",contains:[e.UNDERSCORE_TITLE_MODE],relevance:0}]}}),i.registerLanguage("prolog",function(e){var t={begin:/\(/,end:/\)/,relevance:0},n={begin:/\[/,end:/\]/},r={className:"comment",begin:/%/,end:/$/,contains:[e.PHRASAL_WORDS_MODE]},i={className:"string",begin:/`/,end:/`/,contains:[e.BACKSLASH_ESCAPE]},a=[{className:"atom",begin:/[a-z][A-Za-z0-9_]*/,relevance:0},{className:"name",variants:[{begin:/[A-Z][a-zA-Z0-9_]*/},{begin:/_[A-Za-z0-9_]*/}],relevance:0},t,{begin:/:-/},n,r,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,i,{className:"string",begin:/0\'(\\\'|.)/},{className:"string",begin:/0\'\\s/},e.C_NUMBER_MODE];return t.contains=a,{contains:(n.contains=a).concat([{begin:/\.$/}])}}),i.registerLanguage("protobuf",function(e){return{keywords:{keyword:"package import option optional required repeated group",built_in:"double float int32 int64 uint32 uint64 sint32 sint64 fixed32 fixed64 sfixed32 sfixed64 bool string bytes",literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,{className:"class",beginKeywords:"message enum service",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{className:"function",beginKeywords:"rpc",end:/;/,excludeEnd:!0,keywords:"rpc returns"},{className:"constant",begin:/^\s*[A-Z_]+/,end:/\s*=/,excludeEnd:!0}]}}),i.registerLanguage("puppet",function(e){var t=e.COMMENT("#","$"),n="([A-Za-z_]|::)(\\w|::)*",r=e.inherit(e.TITLE_MODE,{begin:n}),i={className:"variable",begin:"\\$"+n},a={className:"string",contains:[e.BACKSLASH_ESCAPE,i],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/}]};return{aliases:["pp"],contains:[t,i,a,{beginKeywords:"class",end:"\\{|;",illegal:/=/,contains:[r,t]},{beginKeywords:"define",end:/\{/,contains:[{className:"title",begin:e.IDENT_RE,endsParent:!0}]},{begin:e.IDENT_RE+"\\s+\\{",returnBegin:!0,end:/\S/,contains:[{className:"name",begin:e.IDENT_RE},{begin:/\{/,end:/\}/,keywords:{keyword:"and case default else elsif false if in import enherits node or true undef unless main settings $string ",literal:"alias audit before loglevel noop require subscribe tag owner ensure group mode name|0 changes context force incl lens load_path onlyif provider returns root show_diff type_check en_address ip_address realname command environment hour monute month monthday special target weekday creates cwd ogoutput refresh refreshonly tries try_sleep umask backup checksum content ctime force ignore links mtime purge recurse recurselimit replace selinux_ignore_defaults selrange selrole seltype seluser source souirce_permissions sourceselect validate_cmd validate_replacement allowdupe attribute_membership auth_membership forcelocal gid ia_load_module members system host_aliases ip allowed_trunk_vlans description device_url duplex encapsulation etherchannel native_vlan speed principals allow_root auth_class auth_type authenticate_user k_of_n mechanisms rule session_owner shared options device fstype enable hasrestart directory present absent link atboot blockdevice device dump pass remounts poller_tag use message withpath adminfile allow_virtual allowcdrom category configfiles flavor install_options instance package_settings platform responsefile status uninstall_options vendor unless_system_user unless_uid binary control flags hasstatus manifest pattern restart running start stop allowdupe auths expiry gid groups home iterations key_membership keys managehome membership password password_max_age password_min_age profile_membership profiles project purge_ssh_keys role_membership roles salt shell uid baseurl cost descr enabled enablegroups exclude failovermethod gpgcheck gpgkey http_caching include includepkgs keepalive metadata_expire metalink mirrorlist priority protect proxy proxy_password proxy_username repo_gpgcheck s3_enabled skip_if_unavailable sslcacert sslclientcert sslclientkey sslverify mounted",built_in:"architecture augeasversion blockdevices boardmanufacturer boardproductname boardserialnumber cfkey dhcp_servers domain ec2_ ec2_userdata facterversion filesystems ldom fqdn gid hardwareisa hardwaremodel hostname id|0 interfaces ipaddress ipaddress_ ipaddress6 ipaddress6_ iphostnumber is_virtual kernel kernelmajversion kernelrelease kernelversion kernelrelease kernelversion lsbdistcodename lsbdistdescription lsbdistid lsbdistrelease lsbmajdistrelease lsbminordistrelease lsbrelease macaddress macaddress_ macosx_buildversion macosx_productname macosx_productversion macosx_productverson_major macosx_productversion_minor manufacturer memoryfree memorysize netmask metmask_ network_ operatingsystem operatingsystemmajrelease operatingsystemrelease osfamily partitions path physicalprocessorcount processor processorcount productname ps puppetversion rubysitedir rubyversion selinux selinux_config_mode selinux_config_policy selinux_current_mode selinux_current_mode selinux_enforced selinux_policyversion serialnumber sp_ sshdsakey sshecdsakey sshrsakey swapencrypted swapfree swapsize timezone type uniqueid uptime uptime_days uptime_hours uptime_seconds uuid virtual vlans xendomains zfs_version zonenae zones zpool_version"},relevance:0,contains:[a,t,{begin:"[a-zA-Z_]+\\s*=>"},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},i]}],relevance:0}]}}),i.registerLanguage("python",function(e){var t={className:"prompt",begin:/^(>>>|\.\.\.) /},n={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/(u|b)?r?'''/,end:/'''/,contains:[t],relevance:10},{begin:/(u|b)?r?"""/,end:/"""/,contains:[t],relevance:10},{begin:/(u|r|ur)'/,end:/'/,relevance:10},{begin:/(u|r|ur)"/,end:/"/,relevance:10},{begin:/(b|br)'/,end:/'/},{begin:/(b|br)"/,end:/"/},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},r={className:"number",relevance:0,variants:[{begin:e.BINARY_NUMBER_RE+"[lLjJ]?"},{begin:"\\b(0o[0-7]+)[lLjJ]?"},{begin:e.C_NUMBER_RE+"[lLjJ]?"}]},i={className:"params",begin:/\(/,end:/\)/,contains:["self",t,r,n]};return{aliases:["py","gyp"],keywords:{keyword:"and elif is global as in if from raise for except finally print import pass return exec else break not with class assert yield try while continue del or def lambda async await nonlocal|10 None True False",built_in:"Ellipsis NotImplemented"},illegal:/(<\/|->|\?)/,contains:[t,r,n,e.HASH_COMMENT_MODE,{variants:[{className:"function",beginKeywords:"def",relevance:10},{className:"class",beginKeywords:"class"}],end:/:/,illegal:/[${=;\n,]/,contains:[e.UNDERSCORE_TITLE_MODE,i]},{className:"decorator",begin:/^[\t ]*@/,end:/$/},{begin:/\b(print|exec)\(/}]}}),i.registerLanguage("q",function(e){return{aliases:["k","kdb"],keywords:{keyword:"do while select delete by update from",constant:"0b 1b",built_in:"neg not null string reciprocal floor ceiling signum mod xbar xlog and or each scan over prior mmu lsq inv md5 ltime gtime count first var dev med cov cor all any rand sums prds mins maxs fills deltas ratios avgs differ prev next rank reverse iasc idesc asc desc msum mcount mavg mdev xrank mmin mmax xprev rotate distinct group where flip type key til get value attr cut set upsert raze union inter except cross sv vs sublist enlist read0 read1 hopen hclose hdel hsym hcount peach system ltrim rtrim trim lower upper ssr view tables views cols xcols keys xkey xcol xasc xdesc fkeys meta lj aj aj0 ij pj asof uj ww wj wj1 fby xgroup ungroup ej save load rsave rload show csv parse eval min max avg wavg wsum sin cos tan sum",typename:"`float `double int `timestamp `timespan `datetime `time `boolean `symbol `char `byte `short `long `real `month `date `minute `second `guid"},lexemes:/\b(`?)[A-Za-z0-9_]+\b/,contains:[e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE]}}),i.registerLanguage("r",function(e){var t="([a-zA-Z]|\\.[a-zA-Z.])[a-zA-Z0-9._]*";return{contains:[e.HASH_COMMENT_MODE,{begin:t,lexemes:t,keywords:{keyword:"function if in break next repeat else for return switch while try tryCatch stop warning require library attach detach source setMethod setGeneric setGroupGeneric setClass ...",literal:"NULL NA TRUE FALSE T F Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10"},relevance:0},{className:"number",begin:"0[xX][0-9a-fA-F]+[Li]?\\b",relevance:0},{className:"number",begin:"\\d+(?:[eE][+\\-]?\\d*)?L\\b",relevance:0},{className:"number",begin:"\\d+\\.(?!\\d)(?:i\\b)?",relevance:0},{className:"number",begin:"\\d+(?:\\.\\d*)?(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{className:"number",begin:"\\.\\d+(?:[eE][+\\-]?\\d*)?i?\\b",relevance:0},{begin:"`",end:"`",relevance:0},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:'"',end:'"'},{begin:"'",end:"'"}]}]}}),i.registerLanguage("rib",function(e){return{keywords:"ArchiveRecord AreaLightSource Atmosphere Attribute AttributeBegin AttributeEnd Basis Begin Blobby Bound Clipping ClippingPlane Color ColorSamples ConcatTransform Cone CoordinateSystem CoordSysTransform CropWindow Curves Cylinder DepthOfField Detail DetailRange Disk Displacement Display End ErrorHandler Exposure Exterior Format FrameAspectRatio FrameBegin FrameEnd GeneralPolygon GeometricApproximation Geometry Hider Hyperboloid Identity Illuminate Imager Interior LightSource MakeCubeFaceEnvironment MakeLatLongEnvironment MakeShadow MakeTexture Matte MotionBegin MotionEnd NuPatch ObjectBegin ObjectEnd ObjectInstance Opacity Option Orientation Paraboloid Patch PatchMesh Perspective PixelFilter PixelSamples PixelVariance Points PointsGeneralPolygons PointsPolygons Polygon Procedural Projection Quantize ReadArchive RelativeDetail ReverseOrientation Rotate Scale ScreenWindow ShadingInterpolation ShadingRate Shutter Sides Skew SolidBegin SolidEnd Sphere SubdivisionMesh Surface TextureCoordinates Torus Transform TransformBegin TransformEnd TransformPoints Translate TrimCurve WorldBegin WorldEnd",illegal:"</",contains:[e.HASH_COMMENT_MODE,e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]}}),i.registerLanguage("roboconf",function(e){var t="[a-zA-Z-_][^\n{\r\n]+\\{";return{aliases:["graph","instances"],case_insensitive:!0,keywords:"import",contains:[{className:"facet",begin:"^facet "+t,end:"}",keywords:"facet installer exports children extends",contains:[e.HASH_COMMENT_MODE]},{className:"instance-of",begin:"^instance of "+t,end:"}",keywords:"name count channels instance-data instance-state instance of",contains:[{className:"keyword",begin:"[a-zA-Z-_]+( |\t)*:"},e.HASH_COMMENT_MODE]},{className:"component",begin:"^"+t,end:"}",lexemes:"\\(?[a-zA-Z]+\\)?",keywords:"installer exports children extends imports facets alias (optional)",contains:[{className:"string",begin:"\\.[a-zA-Z-_]+",end:"\\s|,|;",excludeEnd:!0},e.HASH_COMMENT_MODE]},e.HASH_COMMENT_MODE]}}),i.registerLanguage("rsl",function(e){return{keywords:{keyword:"float color point normal vector matrix while for if do return else break extern continue",built_in:"abs acos ambient area asin atan atmosphere attribute calculatenormal ceil cellnoise clamp comp concat cos degrees depth Deriv diffuse distance Du Dv environment exp faceforward filterstep floor format fresnel incident length lightsource log match max min mod noise normalize ntransform opposite option phong pnoise pow printf ptlined radians random reflect refract renderinfo round setcomp setxcomp setycomp setzcomp shadow sign sin smoothstep specular specularbrdf spline sqrt step tan texture textureinfo trace transform vtransform xcomp ycomp zcomp"},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$"},{className:"shader",beginKeywords:"surface displacement light volume imager",end:"\\("},{className:"shading",beginKeywords:"illuminate illuminance gather",end:"\\("}]}}),i.registerLanguage("ruleslanguage",function(e){return{keywords:{keyword:"BILL_PERIOD BILL_START BILL_STOP RS_EFFECTIVE_START RS_EFFECTIVE_STOP RS_JURIS_CODE RS_OPCO_CODE INTDADDATTRIBUTE|5 INTDADDVMSG|5 INTDBLOCKOP|5 INTDBLOCKOPNA|5 INTDCLOSE|5 INTDCOUNT|5 INTDCOUNTSTATUSCODE|5 INTDCREATEMASK|5 INTDCREATEDAYMASK|5 INTDCREATEFACTORMASK|5 INTDCREATEHANDLE|5 INTDCREATEOVERRIDEDAYMASK|5 INTDCREATEOVERRIDEMASK|5 INTDCREATESTATUSCODEMASK|5 INTDCREATETOUPERIOD|5 INTDDELETE|5 INTDDIPTEST|5 INTDEXPORT|5 INTDGETERRORCODE|5 INTDGETERRORMESSAGE|5 INTDISEQUAL|5 INTDJOIN|5 INTDLOAD|5 INTDLOADACTUALCUT|5 INTDLOADDATES|5 INTDLOADHIST|5 INTDLOADLIST|5 INTDLOADLISTDATES|5 INTDLOADLISTENERGY|5 INTDLOADLISTHIST|5 INTDLOADRELATEDCHANNEL|5 INTDLOADSP|5 INTDLOADSTAGING|5 INTDLOADUOM|5 INTDLOADUOMDATES|5 INTDLOADUOMHIST|5 INTDLOADVERSION|5 INTDOPEN|5 INTDREADFIRST|5 INTDREADNEXT|5 INTDRECCOUNT|5 INTDRELEASE|5 INTDREPLACE|5 INTDROLLAVG|5 INTDROLLPEAK|5 INTDSCALAROP|5 INTDSCALE|5 INTDSETATTRIBUTE|5 INTDSETDSTPARTICIPANT|5 INTDSETSTRING|5 INTDSETVALUE|5 INTDSETVALUESTATUS|5 INTDSHIFTSTARTTIME|5 INTDSMOOTH|5 INTDSORT|5 INTDSPIKETEST|5 INTDSUBSET|5 INTDTOU|5 INTDTOURELEASE|5 INTDTOUVALUE|5 INTDUPDATESTATS|5 INTDVALUE|5 STDEV INTDDELETEEX|5 INTDLOADEXACTUAL|5 INTDLOADEXCUT|5 INTDLOADEXDATES|5 INTDLOADEX|5 INTDLOADEXRELATEDCHANNEL|5 INTDSAVEEX|5 MVLOAD|5 MVLOADACCT|5 MVLOADACCTDATES|5 MVLOADACCTHIST|5 MVLOADDATES|5 MVLOADHIST|5 MVLOADLIST|5 MVLOADLISTDATES|5 MVLOADLISTHIST|5 IF FOR NEXT DONE SELECT END CALL ABORT CLEAR CHANNEL FACTOR LIST NUMBER OVERRIDE SET WEEK DISTRIBUTIONNODE ELSE WHEN THEN OTHERWISE IENUM CSV INCLUDE LEAVE RIDER SAVE DELETE NOVALUE SECTION WARN SAVE_UPDATE DETERMINANT LABEL REPORT REVENUE EACH IN FROM TOTAL CHARGE BLOCK AND OR CSV_FILE RATE_CODE AUXILIARY_DEMAND UIDACCOUNT RS BILL_PERIOD_SELECT HOURS_PER_MONTH INTD_ERROR_STOP SEASON_SCHEDULE_NAME ACCOUNTFACTOR ARRAYUPPERBOUND CALLSTOREDPROC GETADOCONNECTION GETCONNECT GETDATASOURCE GETQUALIFIER GETUSERID HASVALUE LISTCOUNT LISTOP LISTUPDATE LISTVALUE PRORATEFACTOR RSPRORATE SETBINPATH SETDBMONITOR WQ_OPEN BILLINGHOURS DATE DATEFROMFLOAT DATETIMEFROMSTRING DATETIMETOSTRING DATETOFLOAT DAY DAYDIFF DAYNAME DBDATETIME HOUR MINUTE MONTH MONTHDIFF MONTHHOURS MONTHNAME ROUNDDATE SAMEWEEKDAYLASTYEAR SECOND WEEKDAY WEEKDIFF YEAR YEARDAY YEARSTR COMPSUM HISTCOUNT HISTMAX HISTMIN HISTMINNZ HISTVALUE MAXNRANGE MAXRANGE MINRANGE COMPIKVA COMPKVA COMPKVARFROMKQKW COMPLF IDATTR FLAG LF2KW LF2KWH MAXKW POWERFACTOR READING2USAGE AVGSEASON MAXSEASON MONTHLYMERGE SEASONVALUE SUMSEASON ACCTREADDATES ACCTTABLELOAD CONFIGADD CONFIGGET CREATEOBJECT CREATEREPORT EMAILCLIENT EXPBLKMDMUSAGE EXPMDMUSAGE EXPORT_USAGE FACTORINEFFECT GETUSERSPECIFIEDSTOP INEFFECT ISHOLIDAY RUNRATE SAVE_PROFILE SETREPORTTITLE USEREXIT WATFORRUNRATE TO TABLE ACOS ASIN ATAN ATAN2 BITAND CEIL COS COSECANT COSH COTANGENT DIVQUOT DIVREM EXP FABS FLOOR FMOD FREPM FREXPN LOG LOG10 MAX MAXN MIN MINNZ MODF POW ROUND ROUND2VALUE ROUNDINT SECANT SIN SINH SQROOT TAN TANH FLOAT2STRING FLOAT2STRINGNC INSTR LEFT LEN LTRIM MID RIGHT RTRIM STRING STRINGNC TOLOWER TOUPPER TRIM NUMDAYS READ_DATE STAGING",built_in:"IDENTIFIER OPTIONS XML_ELEMENT XML_OP XML_ELEMENT_OF DOMDOCCREATE DOMDOCLOADFILE DOMDOCLOADXML DOMDOCSAVEFILE DOMDOCGETROOT DOMDOCADDPI DOMNODEGETNAME DOMNODEGETTYPE DOMNODEGETVALUE DOMNODEGETCHILDCT DOMNODEGETFIRSTCHILD DOMNODEGETSIBLING DOMNODECREATECHILDELEMENT DOMNODESETATTRIBUTE DOMNODEGETCHILDELEMENTCT DOMNODEGETFIRSTCHILDELEMENT DOMNODEGETSIBLINGELEMENT DOMNODEGETATTRIBUTECT DOMNODEGETATTRIBUTEI DOMNODEGETATTRIBUTEBYNAME DOMNODEGETBYNAME"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"array",variants:[{begin:"#\\s+[a-zA-Z\\ \\.]*",relevance:0},{begin:"#[a-zA-Z\\ \\.]+"}]}]}}),i.registerLanguage("rust",function(e){var t="([uif](8|16|32|64|size))?",n=e.inherit(e.C_BLOCK_COMMENT_MODE);return n.contains.push("self"),{aliases:["rs"],keywords:{keyword:"alignof as be box break const continue crate do else enum extern false fn for if impl in let loop match mod mut offsetof once priv proc pub pure ref return self Self sizeof static struct super trait true type typeof unsafe unsized use virtual while where yield int i8 i16 i32 i64 uint u8 u32 u64 float f32 f64 str char bool",built_in:"Copy Send Sized Sync Drop Fn FnMut FnOnce drop Box ToOwned Clone PartialEq PartialOrd Eq Ord AsRef AsMut Into From Default Iterator Extend IntoIterator DoubleEndedIterator ExactSizeIterator Option Some None Result Ok Err SliceConcatExt String ToString Vec assert! assert_eq! bitflags! bytes! cfg! col! concat! concat_idents! debug_assert! debug_assert_eq! env! panic! file! format! format_args! include_bin! include_str! line! local_data_key! module_path! option_env! print! println! select! stringify! try! unimplemented! unreachable! vec! write! writeln!"},lexemes:e.IDENT_RE+"!?",illegal:"</",contains:[e.C_LINE_COMMENT_MODE,n,e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",variants:[{begin:/r(#*)".*?"\1(?!#)/},{begin:/'\\?(x\w{2}|u\w{4}|U\w{8}|.)'/},{begin:/'[a-zA-Z_][a-zA-Z0-9_]*/}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+t},{begin:"\\b0o([0-7_]+)"+t},{begin:"\\b0x([A-Fa-f0-9_]+)"+t},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+t}],relevance:0},{className:"function",beginKeywords:"fn",end:"(\\(|<)",excludeEnd:!0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"preprocessor",begin:"#\\!?\\[",end:"\\]"},{beginKeywords:"type",end:"(=|<)",contains:[e.UNDERSCORE_TITLE_MODE],illegal:"\\S"},{beginKeywords:"trait enum",end:"{",contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{endsParent:!0})],illegal:"[\\w\\d]"},{begin:e.IDENT_RE+"::"},{begin:"->"}]}}),i.registerLanguage("scala",function(e){var t={className:"title",begin:/[^0-9\n\t "'(),.`{}\[\]:;][^\n\t "'(),.`{}\[\]:;]+|[^0-9\n\t "'(),.`{}\[\]:;=]/,relevance:0},n={className:"class",beginKeywords:"class object trait type",end:/[:={\[(\n;]/,contains:[{className:"keyword",beginKeywords:"extends with",relevance:10},t]},r={className:"function",beginKeywords:"def",end:/[:={\[(\n;]/,contains:[t]};return{keywords:{literal:"true false null",keyword:"type yield lazy override def with val var sealed abstract private trait object if forSome for while throw finally protected extends import final return else break new catch super class case package default try this match continue throws implicit"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'u?r?"""',end:'"""',relevance:10},e.QUOTE_STRING_MODE,{className:"symbol",begin:"'\\w[\\w\\d_]*(?!')"},{className:"type",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},r,n,e.C_NUMBER_MODE,{className:"annotation",begin:"@[A-Za-z]+"}]}}),i.registerLanguage("scheme",function(e){var t="[^\\(\\)\\[\\]\\{\\}\",'`;#|\\\\\\s]+",n="(\\-|\\+)?\\d+([./]\\d+)?",r={className:"literal",begin:"(#t|#f|#\\\\"+t+"|#\\\\.)"},i={className:"number",variants:[{begin:n,relevance:0},{begin:"(\\-|\\+)?\\d+([./]\\d+)?[+\\-](\\-|\\+)?\\d+([./]\\d+)?i",relevance:0},{begin:"#b[0-1]+(/[0-1]+)?"},{begin:"#o[0-7]+(/[0-7]+)?"},{begin:"#x[0-9a-f]+(/[0-9a-f]+)?"}]},a=e.QUOTE_STRING_MODE,o=[e.COMMENT(";","$",{relevance:0}),e.COMMENT("#\\|","\\|#")],s={begin:t,relevance:0},c={className:"variable",begin:"'"+t},l={endsWithParent:!0,relevance:0},u={className:"list",variants:[{begin:"\\(",end:"\\)"},{begin:"\\[",end:"\\]"}],contains:[{className:"keyword",begin:t,lexemes:t,keywords:{built_in:"case-lambda call/cc class define-class exit-handler field import inherit init-field interface let*-values let-values let/ec mixin opt-lambda override protect provide public rename require require-for-syntax syntax syntax-case syntax-error unit/sig unless when with-syntax and begin call-with-current-continuation call-with-input-file call-with-output-file case cond define define-syntax delay do dynamic-wind else for-each if lambda let let* let-syntax letrec letrec-syntax map or syntax-rules ' * + , ,@ - ... / ; < <= = => > >= ` abs acos angle append apply asin assoc assq assv atan boolean? caar cadr call-with-input-file call-with-output-file call-with-values car cdddar cddddr cdr ceiling char->integer char-alphabetic? char-ci<=? char-ci<? char-ci=? char-ci>=? char-ci>? char-downcase char-lower-case? char-numeric? char-ready? char-upcase char-upper-case? char-whitespace? char<=? char<? char=? char>=? char>? char? close-input-port close-output-port complex? cons cos current-input-port current-output-port denominator display eof-object? eq? equal? eqv? eval even? exact->inexact exact? exp expt floor force gcd imag-part inexact->exact inexact? input-port? integer->char integer? interaction-environment lcm length list list->string list->vector list-ref list-tail list? load log magnitude make-polar make-rectangular make-string make-vector max member memq memv min modulo negative? newline not null-environment null? number->string number? numerator odd? open-input-file open-output-file output-port? pair? peek-char port? positive? procedure? quasiquote quote quotient rational? rationalize read read-char real-part real? remainder reverse round scheme-report-environment set! set-car! set-cdr! sin sqrt string string->list string->number string->symbol string-append string-ci<=? string-ci<? string-ci=? string-ci>=? string-ci>? string-copy string-fill! string-length string-ref string-set! string<=? string<? string=? string>=? string>? string? substring symbol->string symbol? tan transcript-off transcript-on truncate values vector vector->list vector-fill! vector-length vector-ref vector-set! with-input-from-file with-output-to-file write write-char zero?"}},l]};return l.contains=[r,i,a,s,c,u].concat(o),{illegal:/\S/,contains:[{className:"shebang",begin:"^#!",end:"$"},i,a,c,u].concat(o)}}),i.registerLanguage("scilab",function(e){var t=[e.C_NUMBER_MODE,{className:"string",begin:"'|\"",end:"'|\"",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]}];return{aliases:["sci"],keywords:{keyword:"abort break case clear catch continue do elseif else endfunction end for functionglobal if pause return resume select try then while%f %F %t %T %pi %eps %inf %nan %e %i %z %s",built_in:"abs and acos asin atan ceil cd chdir clearglobal cosh cos cumprod deff disp errorexec execstr exists exp eye gettext floor fprintf fread fsolve imag isdef isemptyisinfisnan isvector lasterror length load linspace list listfiles log10 log2 logmax min msprintf mclose mopen ones or pathconvert poly printf prod pwd rand realround sinh sin size gsort sprintf sqrt strcat strcmps tring sum system tanh tantype typename warning zeros matrix"},illegal:'("|#|/\\*|\\s+/\\w+)',contains:[{className:"function",beginKeywords:"function endfunction",end:"$",keywords:"function endfunction|10",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]},{className:"transposed_variable",begin:"[a-zA-Z_][a-zA-Z_0-9]*('+[\\.']*|[\\.']+)",end:"",relevance:0},{className:"matrix",begin:"\\[",end:"\\]'*[\\.']*",relevance:0,contains:t},e.COMMENT("//","$")].concat(t)}}),i.registerLanguage("scss",function(e){var t="[a-zA-Z-][a-zA-Z0-9_-]*",n={className:"variable",begin:"(\\$"+t+")\\b"},r={className:"function",begin:t+"\\(",returnBegin:!0,excludeEnd:!0,end:"\\("},i={className:"hexcolor",begin:"#[0-9A-Fa-f]+"};e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_BLOCK_COMMENT_MODE;return{case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,r,{className:"id",begin:"\\#[A-Za-z0-9_-]+",relevance:0},{className:"class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},{className:"attr_selector",begin:"\\[",end:"\\]",illegal:"$"},{className:"tag",begin:"\\b(a|abbr|acronym|address|area|article|aside|audio|b|base|big|blockquote|body|br|button|canvas|caption|cite|code|col|colgroup|command|datalist|dd|del|details|dfn|div|dl|dt|em|embed|fieldset|figcaption|figure|footer|form|frame|frameset|(h[1-6])|head|header|hgroup|hr|html|i|iframe|img|input|ins|kbd|keygen|label|legend|li|link|map|mark|meta|meter|nav|noframes|noscript|object|ol|optgroup|option|output|p|param|pre|progress|q|rp|rt|ruby|samp|script|section|select|small|span|strike|strong|style|sub|sup|table|tbody|td|textarea|tfoot|th|thead|time|title|tr|tt|ul|var|video)\\b",relevance:0},{className:"pseudo",begin:":(visited|valid|root|right|required|read-write|read-only|out-range|optional|only-of-type|only-child|nth-of-type|nth-last-of-type|nth-last-child|nth-child|not|link|left|last-of-type|last-child|lang|invalid|indeterminate|in-range|hover|focus|first-of-type|first-line|first-letter|first-child|first|enabled|empty|disabled|default|checked|before|after|active)"},{className:"pseudo",begin:"::(after|before|choices|first-letter|first-line|repeat-index|repeat-item|selection|value)"},n,{className:"attribute",begin:"\\b(z-index|word-wrap|word-spacing|word-break|width|widows|white-space|visibility|vertical-align|unicode-bidi|transition-timing-function|transition-property|transition-duration|transition-delay|transition|transform-style|transform-origin|transform|top|text-underline-position|text-transform|text-shadow|text-rendering|text-overflow|text-indent|text-decoration-style|text-decoration-line|text-decoration-color|text-decoration|text-align-last|text-align|tab-size|table-layout|right|resize|quotes|position|pointer-events|perspective-origin|perspective|page-break-inside|page-break-before|page-break-after|padding-top|padding-right|padding-left|padding-bottom|padding|overflow-y|overflow-x|overflow-wrap|overflow|outline-width|outline-style|outline-offset|outline-color|outline|orphans|order|opacity|object-position|object-fit|normal|none|nav-up|nav-right|nav-left|nav-index|nav-down|min-width|min-height|max-width|max-height|mask|marks|margin-top|margin-right|margin-left|margin-bottom|margin|list-style-type|list-style-position|list-style-image|list-style|line-height|letter-spacing|left|justify-content|initial|inherit|ime-mode|image-orientation|image-resolution|image-rendering|icon|hyphens|height|font-weight|font-variant-ligatures|font-variant|font-style|font-stretch|font-size-adjust|font-size|font-language-override|font-kerning|font-feature-settings|font-family|font|float|flex-wrap|flex-shrink|flex-grow|flex-flow|flex-direction|flex-basis|flex|filter|empty-cells|display|direction|cursor|counter-reset|counter-increment|content|column-width|column-span|column-rule-width|column-rule-style|column-rule-color|column-rule|column-gap|column-fill|column-count|columns|color|clip-path|clip|clear|caption-side|break-inside|break-before|break-after|box-sizing|box-shadow|box-decoration-break|bottom|border-width|border-top-width|border-top-style|border-top-right-radius|border-top-left-radius|border-top-color|border-top|border-style|border-spacing|border-right-width|border-right-style|border-right-color|border-right|border-radius|border-left-width|border-left-style|border-left-color|border-left|border-image-width|border-image-source|border-image-slice|border-image-repeat|border-image-outset|border-image|border-color|border-collapse|border-bottom-width|border-bottom-style|border-bottom-right-radius|border-bottom-left-radius|border-bottom-color|border-bottom|border|background-size|background-repeat|background-position|background-origin|background-image|background-color|background-clip|background-attachment|background-blend-mode|background|backface-visibility|auto|animation-timing-function|animation-play-state|animation-name|animation-iteration-count|animation-fill-mode|animation-duration|animation-direction|animation-delay|animation|align-self|align-items|align-content)\\b",illegal:"[^\\s]"},{className:"value",begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{className:"value",begin:":",end:";",contains:[r,n,i,e.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"important",begin:"!important"}]},{className:"at_rule",begin:"@",end:"[{;]",keywords:"mixin include extend for if else each while charset import debug media page content font-face namespace warn",contains:[r,n,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,i,e.CSS_NUMBER_MODE,{className:"preprocessor",begin:"\\s[A-Za-z0-9_.-]+",relevance:0}]}]}}),i.registerLanguage("smali",function(e){var t=["add","and","cmp","cmpg","cmpl","const","div","double","float","goto","if","int","long","move","mul","neg","new","nop","not","or","rem","return","shl","shr","sput","sub","throw","ushr","xor"];return{aliases:["smali"],contains:[{className:"string",begin:'"',end:'"',relevance:0},e.COMMENT("#","$",{relevance:0}),{className:"keyword",begin:"\\s*\\.end\\s[a-zA-Z0-9]*",relevance:1},{className:"keyword",begin:"^[ ]*\\.[a-zA-Z]*",relevance:0},{className:"keyword",begin:"\\s:[a-zA-Z_0-9]*",relevance:0},{className:"keyword",begin:"\\s("+["transient","constructor","abstract","final","synthetic","public","private","protected","static","bridge","system"].join("|")+")",relevance:1},{className:"keyword",begin:"\\[",relevance:0},{className:"instruction",begin:"\\s("+t.join("|")+")\\s",relevance:1},{className:"instruction",begin:"\\s("+t.join("|")+")((\\-|/)[a-zA-Z0-9]+)+\\s",relevance:10},{className:"instruction",begin:"\\s("+["aget","aput","array","check","execute","fill","filled","goto/16","goto/32","iget","instance","invoke","iput","monitor","packed","sget","sparse"].join("|")+")((\\-|/)[a-zA-Z0-9]+)*\\s",relevance:10},{className:"class",begin:"L[^(;:\n]*;",relevance:0},{className:"function",begin:'( |->)[^(\n ;"]*\\(',relevance:0},{className:"function",begin:"\\)",relevance:0},{className:"variable",begin:"[vp][0-9]+",relevance:0}]}}),i.registerLanguage("smalltalk",function(e){var t="[a-z][a-zA-Z0-9_]*",n={className:"char",begin:"\\$.{1}"},r={className:"symbol",begin:"#"+e.UNDERSCORE_IDENT_RE};return{aliases:["st"],keywords:"self super nil true false thisContext",contains:[e.COMMENT('"','"'),e.APOS_STRING_MODE,{className:"class",begin:"\\b[A-Z][A-Za-z0-9_]*",relevance:0},{className:"method",begin:t+":",relevance:0},e.C_NUMBER_MODE,r,n,{className:"localvars",begin:"\\|[ ]*"+t+"([ ]+"+t+")*[ ]*\\|",returnBegin:!0,end:/\|/,illegal:/\S/,contains:[{begin:"(\\|[ ]*)?"+t}]},{className:"array",begin:"\\#\\(",end:"\\)",contains:[e.APOS_STRING_MODE,n,e.C_NUMBER_MODE,r]}]}}),i.registerLanguage("sml",function(e){return{aliases:["ml"],keywords:{keyword:"abstype and andalso as case datatype do else end eqtype exception fn fun functor handle if in include infix infixr let local nonfix of op open orelse raise rec sharing sig signature struct structure then type val with withtype where while",built_in:"array bool char exn int list option order real ref string substring vector unit word",literal:"true false NONE SOME LESS EQUAL GREATER nil"},illegal:/\/\/|>>/,lexemes:"[a-z_]\\w*!?",contains:[{className:"literal",begin:"\\[(\\|\\|)?\\]|\\(\\)"},e.COMMENT("\\(\\*","\\*\\)",{contains:["self"]}),{className:"symbol",begin:"'[A-Za-z_](?!')[\\w']*"},{className:"tag",begin:"`[A-Z][\\w']*"},{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},{begin:"[a-z_]\\w*'[\\w']*"},e.inherit(e.APOS_STRING_MODE,{className:"char",relevance:0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"number",begin:"\\b(0[xX][a-fA-F0-9_]+[Lln]?|0[oO][0-7_]+[Lln]?|0[bB][01_]+[Lln]?|[0-9][0-9_]*([Lln]|(\\.[0-9_]*)?([eE][-+]?[0-9_]+)?)?)",relevance:0},{begin:/[-=]>/}]}}),i.registerLanguage("sqf",function(e){var t=["case","catch","default","do","else","exit","exitWith|5","for","forEach","from","if","switch","then","throw","to","try","while","with"],n=["!","-","+","!=","%","&&","*","/","=","==",">",">=","<","<=","^",":",">>"],r=["true","false","nil"],i=["!","-","+","!=","%","&&","*","/","=","==",">",">=","<","<=","or","plus","^",":",">>","abs","accTime","acos","action","actionKeys","actionKeysImages","actionKeysNames","actionKeysNamesArray","actionName","activateAddons","activatedAddons","activateKey","addAction","addBackpack","addBackpackCargo","addBackpackCargoGlobal","addBackpackGlobal","addCamShake","addCuratorAddons","addCuratorCameraArea","addCuratorEditableObjects","addCuratorEditingArea","addCuratorPoints","addEditorObject","addEventHandler","addGoggles","addGroupIcon","addHandgunItem","addHeadgear","addItem","addItemCargo","addItemCargoGlobal","addItemPool","addItemToBackpack","addItemToUniform","addItemToVest","addLiveStats","addMagazine","addMagazine array","addMagazineAmmoCargo","addMagazineCargo","addMagazineCargoGlobal","addMagazineGlobal","addMagazinePool","addMagazines","addMagazineTurret","addMenu","addMenuItem","addMissionEventHandler","addMPEventHandler","addMusicEventHandler","addPrimaryWeaponItem","addPublicVariableEventHandler","addRating","addResources","addScore","addScoreSide","addSecondaryWeaponItem","addSwitchableUnit","addTeamMember","addToRemainsCollector","addUniform","addVehicle","addVest","addWaypoint","addWeapon","addWeaponCargo","addWeaponCargoGlobal","addWeaponGlobal","addWeaponPool","addWeaponTurret","agent","agents","AGLToASL","aimedAtTarget","aimPos","airDensityRTD","airportSide","AISFinishHeal","alive","allControls","allCurators","allDead","allDeadMen","allDisplays","allGroups","allMapMarkers","allMines","allMissionObjects","allow3DMode","allowCrewInImmobile","allowCuratorLogicIgnoreAreas","allowDamage","allowDammage","allowFileOperations","allowFleeing","allowGetIn","allPlayers","allSites","allTurrets","allUnits","allUnitsUAV","allVariables","ammo","and","animate","animateDoor","animationPhase","animationState","append","armoryPoints","arrayIntersect","asin","ASLToAGL","ASLToATL","assert","assignAsCargo","assignAsCargoIndex","assignAsCommander","assignAsDriver","assignAsGunner","assignAsTurret","assignCurator","assignedCargo","assignedCommander","assignedDriver","assignedGunner","assignedItems","assignedTarget","assignedTeam","assignedVehicle","assignedVehicleRole","assignItem","assignTeam","assignToAirport","atan","atan2","atg","ATLToASL","attachedObject","attachedObjects","attachedTo","attachObject","attachTo","attackEnabled","backpack","backpackCargo","backpackContainer","backpackItems","backpackMagazines","backpackSpaceFor","behaviour","benchmark","binocular","blufor","boundingBox","boundingBoxReal","boundingCenter","breakOut","breakTo","briefingName","buildingExit","buildingPos","buttonAction","buttonSetAction","cadetMode","call","callExtension","camCommand","camCommit","camCommitPrepared","camCommitted","camConstuctionSetParams","camCreate","camDestroy","cameraEffect","cameraEffectEnableHUD","cameraInterest","cameraOn","cameraView","campaignConfigFile","camPreload","camPreloaded","camPrepareBank","camPrepareDir","camPrepareDive","camPrepareFocus","camPrepareFov","camPrepareFovRange","camPreparePos","camPrepareRelPos","camPrepareTarget","camSetBank","camSetDir","camSetDive","camSetFocus","camSetFov","camSetFovRange","camSetPos","camSetRelPos","camSetTarget","camTarget","camUseNVG","canAdd","canAddItemToBackpack","canAddItemToUniform","canAddItemToVest","cancelSimpleTaskDestination","canFire","canMove","canSlingLoad","canStand","canUnloadInCombat","captive","captiveNum","case","catch","cbChecked","cbSetChecked","ceil","cheatsEnabled","checkAIFeature","civilian","className","clearAllItemsFromBackpack","clearBackpackCargo","clearBackpackCargoGlobal","clearGroupIcons","clearItemCargo","clearItemCargoGlobal","clearItemPool","clearMagazineCargo","clearMagazineCargoGlobal","clearMagazinePool","clearOverlay","clearRadio","clearWeaponCargo","clearWeaponCargoGlobal","clearWeaponPool","closeDialog","closeDisplay","closeOverlay","collapseObjectTree","combatMode","commandArtilleryFire","commandChat","commander","commandFire","commandFollow","commandFSM","commandGetOut","commandingMenu","commandMove","commandRadio","commandStop","commandTarget","commandWatch","comment","commitOverlay","compile","compileFinal","completedFSM","composeText","configClasses","configFile","configHierarchy","configName","configProperties","configSourceMod","configSourceModList","connectTerminalToUAV","controlNull","controlsGroupCtrl","copyFromClipboard","copyToClipboard","copyWaypoints","cos","count","countEnemy","countFriendly","countSide","countType","countUnknown","createAgent","createCenter","createDialog","createDiaryLink","createDiaryRecord","createDiarySubject","createDisplay","createGearDialog","createGroup","createGuardedPoint","createLocation","createMarker","createMarkerLocal","createMenu","createMine","createMissionDisplay","createSimpleTask","createSite","createSoundSource","createTask","createTeam","createTrigger","createUnit","createUnit array","createVehicle","createVehicle array","createVehicleCrew","createVehicleLocal","crew","ctrlActivate","ctrlAddEventHandler","ctrlAutoScrollDelay","ctrlAutoScrollRewind","ctrlAutoScrollSpeed","ctrlChecked","ctrlClassName","ctrlCommit","ctrlCommitted","ctrlCreate","ctrlDelete","ctrlEnable","ctrlEnabled","ctrlFade","ctrlHTMLLoaded","ctrlIDC","ctrlIDD","ctrlMapAnimAdd","ctrlMapAnimClear","ctrlMapAnimCommit","ctrlMapAnimDone","ctrlMapCursor","ctrlMapMouseOver","ctrlMapScale","ctrlMapScreenToWorld","ctrlMapWorldToScreen","ctrlModel","ctrlModelDirAndUp","ctrlModelScale","ctrlParent","ctrlPosition","ctrlRemoveAllEventHandlers","ctrlRemoveEventHandler","ctrlScale","ctrlSetActiveColor","ctrlSetAutoScrollDelay","ctrlSetAutoScrollRewind","ctrlSetAutoScrollSpeed","ctrlSetBackgroundColor","ctrlSetChecked","ctrlSetEventHandler","ctrlSetFade","ctrlSetFocus","ctrlSetFont","ctrlSetFontH1","ctrlSetFontH1B","ctrlSetFontH2","ctrlSetFontH2B","ctrlSetFontH3","ctrlSetFontH3B","ctrlSetFontH4","ctrlSetFontH4B","ctrlSetFontH5","ctrlSetFontH5B","ctrlSetFontH6","ctrlSetFontH6B","ctrlSetFontHeight","ctrlSetFontHeightH1","ctrlSetFontHeightH2","ctrlSetFontHeightH3","ctrlSetFontHeightH4","ctrlSetFontHeightH5","ctrlSetFontHeightH6","ctrlSetFontP","ctrlSetFontPB","ctrlSetForegroundColor","ctrlSetModel","ctrlSetModelDirAndUp","ctrlSetModelScale","ctrlSetPosition","ctrlSetScale","ctrlSetStructuredText","ctrlSetText","ctrlSetTextColor","ctrlSetTooltip","ctrlSetTooltipColorBox","ctrlSetTooltipColorShade","ctrlSetTooltipColorText","ctrlShow","ctrlShown","ctrlText","ctrlTextHeight","ctrlType","ctrlVisible","curatorAddons","curatorCamera","curatorCameraArea","curatorCameraAreaCeiling","curatorCoef","curatorEditableObjects","curatorEditingArea","curatorEditingAreaType","curatorMouseOver","curatorPoints","curatorRegisteredObjects","curatorSelected","curatorWaypointCost","currentChannel","currentCommand","currentMagazine","currentMagazineDetail","currentMagazineDetailTurret","currentMagazineTurret","currentMuzzle","currentNamespace","currentTask","currentTasks","currentThrowable","currentVisionMode","currentWaypoint","currentWeapon","currentWeaponMode","currentWeaponTurret","currentZeroing","cursorTarget","customChat","customRadio","cutFadeOut","cutObj","cutRsc","cutText","damage","date","dateToNumber","daytime","deActivateKey","debriefingText","debugFSM","debugLog","default","deg","deleteAt","deleteCenter","deleteCollection","deleteEditorObject","deleteGroup","deleteIdentity","deleteLocation","deleteMarker","deleteMarkerLocal","deleteRange","deleteResources","deleteSite","deleteStatus","deleteTeam","deleteVehicle","deleteVehicleCrew","deleteWaypoint","detach","detectedMines","diag activeMissionFSMs","diag activeSQFScripts","diag activeSQSScripts","diag captureFrame","diag captureSlowFrame","diag fps","diag fpsMin","diag frameNo","diag log","diag logSlowFrame","diag tickTime","dialog","diarySubjectExists","didJIP","didJIPOwner","difficulty","difficultyEnabled","difficultyEnabledRTD","direction","directSay","disableAI","disableCollisionWith","disableConversation","disableDebriefingStats","disableSerialization","disableTIEquipment","disableUAVConnectability","disableUserInput","displayAddEventHandler","displayCtrl","displayNull","displayRemoveAllEventHandlers","displayRemoveEventHandler","displaySetEventHandler","dissolveTeam","distance","distance2D","distanceSqr","distributionRegion","do","doArtilleryFire","doFire","doFollow","doFSM","doGetOut","doMove","doorPhase","doStop","doTarget","doWatch","drawArrow","drawEllipse","drawIcon","drawIcon3D","drawLine","drawLine3D","drawLink","drawLocation","drawRectangle","driver","drop","east","echo","editObject","editorSetEventHandler","effectiveCommander","else","emptyPositions","enableAI","enableAIFeature","enableAttack","enableCamShake","enableCaustics","enableCollisionWith","enableCopilot","enableDebriefingStats","enableDiagLegend","enableEndDialog","enableEngineArtillery","enableEnvironment","enableFatigue","enableGunLights","enableIRLasers","enableMimics","enablePersonTurret","enableRadio","enableReload","enableRopeAttach","enableSatNormalOnDetail","enableSaving","enableSentences","enableSimulation","enableSimulationGlobal","enableTeamSwitch","enableUAVConnectability","enableUAVWaypoints","endLoadingScreen","endMission","engineOn","enginesIsOnRTD","enginesRpmRTD","enginesTorqueRTD","entities","estimatedEndServerTime","estimatedTimeLeft","evalObjectArgument","everyBackpack","everyContainer","exec","execEditorScript","execFSM","execVM","exit","exitWith","exp","expectedDestination","eyeDirection","eyePos","face","faction","fadeMusic","fadeRadio","fadeSound","fadeSpeech","failMission","false","fillWeaponsFromPool","find","findCover","findDisplay","findEditorObject","findEmptyPosition","findEmptyPositionReady","findNearestEnemy","finishMissionInit","finite","fire","fireAtTarget","firstBackpack","flag","flagOwner","fleeing","floor","flyInHeight","fog","fogForecast","fogParams","for","forceAddUniform","forceEnd","forceMap","forceRespawn","forceSpeed","forceWalk","forceWeaponFire","forceWeatherChange","forEach","forEachMember","forEachMemberAgent","forEachMemberTeam","format","formation","formationDirection","formationLeader","formationMembers","formationPosition","formationTask","formatText","formLeader","freeLook","from","fromEditor","fuel","fullCrew","gearSlotAmmoCount","gearSlotData","getAllHitPointsDamage","getAmmoCargo","getArray","getArtilleryAmmo","getArtilleryComputerSettings","getArtilleryETA","getAssignedCuratorLogic","getAssignedCuratorUnit","getBackpackCargo","getBleedingRemaining","getBurningValue","getCargoIndex","getCenterOfMass","getClientState","getConnectedUAV","getDammage","getDescription","getDir","getDirVisual","getDLCs","getEditorCamera","getEditorMode","getEditorObjectScope","getElevationOffset","getFatigue","getFriend","getFSMVariable","getFuelCargo","getGroupIcon","getGroupIconParams","getGroupIcons","getHideFrom","getHit","getHitIndex","getHitPointDamage","getItemCargo","getMagazineCargo","getMarkerColor","getMarkerPos","getMarkerSize","getMarkerType","getMass","getModelInfo","getNumber","getObjectArgument","getObjectChildren","getObjectDLC","getObjectMaterials","getObjectProxy","getObjectTextures","getObjectType","getObjectViewDistance","getOxygenRemaining","getPersonUsedDLCs","getPlayerChannel","getPlayerUID","getPos","getPosASL","getPosASLVisual","getPosASLW","getPosATL","getPosATLVisual","getPosVisual","getPosWorld","getRepairCargo","getResolution","getShadowDistance","getSlingLoad","getSpeed","getSuppression","getTerrainHeightASL","getText","getVariable","getWeaponCargo","getWPPos","glanceAt","globalChat","globalRadio","goggles","goto","group","groupChat","groupFromNetId","groupIconSelectable","groupIconsVisible","groupId","groupOwner","groupRadio","groupSelectedUnits","groupSelectUnit","grpNull","gunner","gusts","halt","handgunItems","handgunMagazine","handgunWeapon","handsHit","hasInterface","hasWeapon","hcAllGroups","hcGroupParams","hcLeader","hcRemoveAllGroups","hcRemoveGroup","hcSelected","hcSelectGroup","hcSetGroup","hcShowBar","hcShownBar","headgear","hideBody","hideObject","hideObjectGlobal","hint","hintC","hintCadet","hintSilent","hmd","hostMission","htmlLoad","HUDMovementLevels","humidity","if","image","importAllGroups","importance","in","incapacitatedState","independent","inflame","inflamed","inGameUISetEventHandler","inheritsFrom","initAmbientLife","inputAction","inRangeOfArtillery","insertEditorObject","intersect","isAbleToBreathe","isAgent","isArray","isAutoHoverOn","isAutonomous","isAutotest","isBleeding","isBurning","isClass","isCollisionLightOn","isCopilotEnabled","isDedicated","isDLCAvailable","isEngineOn","isEqualTo","isFlashlightOn","isFlatEmpty","isForcedWalk","isFormationLeader","isHidden","isInRemainsCollector","isInstructorFigureEnabled","isIRLaserOn","isKeyActive","isKindOf","isLightOn","isLocalized","isManualFire","isMarkedForCollection","isMultiplayer","isNil","isNull","isNumber","isObjectHidden","isObjectRTD","isOnRoad","isPipEnabled","isPlayer","isRealTime","isServer","isShowing3DIcons","isSteamMission","isStreamFriendlyUIEnabled","isText","isTouchingGround","isTurnedOut","isTutHintsEnabled","isUAVConnectable","isUAVConnected","isUniformAllowed","isWalking","isWeaponDeployed","isWeaponRested","itemCargo","items","itemsWithMagazines","join","joinAs","joinAsSilent","joinSilent","joinString","kbAddDatabase","kbAddDatabaseTargets","kbAddTopic","kbHasTopic","kbReact","kbRemoveTopic","kbTell","kbWasSaid","keyImage","keyName","knowsAbout","land","landAt","landResult","language","laserTarget","lbAdd","lbClear","lbColor","lbCurSel","lbData","lbDelete","lbIsSelected","lbPicture","lbSelection","lbSetColor","lbSetCurSel","lbSetData","lbSetPicture","lbSetPictureColor","lbSetPictureColorDisabled","lbSetPictureColorSelected","lbSetSelectColor","lbSetSelectColorRight","lbSetSelected","lbSetTooltip","lbSetValue","lbSize","lbSort","lbSortByValue","lbText","lbValue","leader","leaderboardDeInit","leaderboardGetRows","leaderboardInit","leaveVehicle","libraryCredits","libraryDisclaimers","lifeState","lightAttachObject","lightDetachObject","lightIsOn","lightnings","limitSpeed","linearConversion","lineBreak","lineIntersects","lineIntersectsObjs","lineIntersectsSurfaces","lineIntersectsWith","linkItem","list","listObjects","ln","lnbAddArray","lnbAddColumn","lnbAddRow","lnbClear","lnbColor","lnbCurSelRow","lnbData","lnbDeleteColumn","lnbDeleteRow","lnbGetColumnsPosition","lnbPicture","lnbSetColor","lnbSetColumnsPos","lnbSetCurSelRow","lnbSetData","lnbSetPicture","lnbSetText","lnbSetValue","lnbSize","lnbText","lnbValue","load","loadAbs","loadBackpack","loadFile","loadGame","loadIdentity","loadMagazine","loadOverlay","loadStatus","loadUniform","loadVest","local","localize","locationNull","locationPosition","lock","lockCameraTo","lockCargo","lockDriver","locked","lockedCargo","lockedDriver","lockedTurret","lockTurret","lockWP","log","logEntities","lookAt","lookAtPos","magazineCargo","magazines","magazinesAllTurrets","magazinesAmmo","magazinesAmmoCargo","magazinesAmmoFull","magazinesDetail","magazinesDetailBackpack","magazinesDetailUniform","magazinesDetailVest","magazinesTurret","magazineTurretAmmo","mapAnimAdd","mapAnimClear","mapAnimCommit","mapAnimDone","mapCenterOnCamera","mapGridPosition","markAsFinishedOnSteam","markerAlpha","markerBrush","markerColor","markerDir","markerPos","markerShape","markerSize","markerText","markerType","max","members","min","mineActive","mineDetectedBy","missionConfigFile","missionName","missionNamespace","missionStart","mod","modelToWorld","modelToWorldVisual","moonIntensity","morale","move","moveInAny","moveInCargo","moveInCommander","moveInDriver","moveInGunner","moveInTurret","moveObjectToEnd","moveOut","moveTime","moveTo","moveToCompleted","moveToFailed","musicVolume","name","name location","nameSound","nearEntities","nearestBuilding","nearestLocation","nearestLocations","nearestLocationWithDubbing","nearestObject","nearestObjects","nearObjects","nearObjectsReady","nearRoads","nearSupplies","nearTargets","needReload","netId","netObjNull","newOverlay","nextMenuItemIndex","nextWeatherChange","nil","nMenuItems","not","numberToDate","objectCurators","objectFromNetId","objectParent","objNull","objStatus","onBriefingGroup","onBriefingNotes","onBriefingPlan","onBriefingTeamSwitch","onCommandModeChanged","onDoubleClick","onEachFrame","onGroupIconClick","onGroupIconOverEnter","onGroupIconOverLeave","onHCGroupSelectionChanged","onMapSingleClick","onPlayerConnected","onPlayerDisconnected","onPreloadFinished","onPreloadStarted","onShowNewObject","onTeamSwitch","openCuratorInterface","openMap","openYoutubeVideo","opfor","or","orderGetIn","overcast","overcastForecast","owner","param","params","parseNumber","parseText","parsingNamespace","particlesQuality","pi","pickWeaponPool","pitch","playableSlotsNumber","playableUnits","playAction","playActionNow","player","playerRespawnTime","playerSide","playersNumber","playGesture","playMission","playMove","playMoveNow","playMusic","playScriptedMission","playSound","playSound3D","position","positionCameraToWorld","posScreenToWorld","posWorldToScreen","ppEffectAdjust","ppEffectCommit","ppEffectCommitted","ppEffectCreate","ppEffectDestroy","ppEffectEnable","ppEffectForceInNVG","precision","preloadCamera","preloadObject","preloadSound","preloadTitleObj","preloadTitleRsc","preprocessFile","preprocessFileLineNumbers","primaryWeapon","primaryWeaponItems","primaryWeaponMagazine","priority","private","processDiaryLink","productVersion","profileName","profileNamespace","profileNameSteam","progressLoadingScreen","progressPosition","progressSetPosition","publicVariable","publicVariableClient","publicVariableServer","pushBack","putWeaponPool","queryItemsPool","queryMagazinePool","queryWeaponPool","rad","radioChannelAdd","radioChannelCreate","radioChannelRemove","radioChannelSetCallSign","radioChannelSetLabel","radioVolume","rain","rainbow","random","rank","rankId","rating","rectangular","registeredTasks","registerTask","reload","reloadEnabled","remoteControl","remoteExec","remoteExecCall","removeAction","removeAllActions","removeAllAssignedItems","removeAllContainers","removeAllCuratorAddons","removeAllCuratorCameraAreas","removeAllCuratorEditingAreas","removeAllEventHandlers","removeAllHandgunItems","removeAllItems","removeAllItemsWithMagazines","removeAllMissionEventHandlers","removeAllMPEventHandlers","removeAllMusicEventHandlers","removeAllPrimaryWeaponItems","removeAllWeapons","removeBackpack","removeBackpackGlobal","removeCuratorAddons","removeCuratorCameraArea","removeCuratorEditableObjects","removeCuratorEditingArea","removeDrawIcon","removeDrawLinks","removeEventHandler","removeFromRemainsCollector","removeGoggles","removeGroupIcon","removeHandgunItem","removeHeadgear","removeItem","removeItemFromBackpack","removeItemFromUniform","removeItemFromVest","removeItems","removeMagazine","removeMagazineGlobal","removeMagazines","removeMagazinesTurret","removeMagazineTurret","removeMenuItem","removeMissionEventHandler","removeMPEventHandler","removeMusicEventHandler","removePrimaryWeaponItem","removeSecondaryWeaponItem","removeSimpleTask","removeSwitchableUnit","removeTeamMember","removeUniform","removeVest","removeWeapon","removeWeaponGlobal","removeWeaponTurret","requiredVersion","resetCamShake","resetSubgroupDirection","resistance","resize","resources","respawnVehicle","restartEditorCamera","reveal","revealMine","reverse","reversedMouseY","roadsConnectedTo","roleDescription","ropeAttachedObjects","ropeAttachedTo","ropeAttachEnabled","ropeAttachTo","ropeCreate","ropeCut","ropeEndPosition","ropeLength","ropes","ropeUnwind","ropeUnwound","rotorsForcesRTD","rotorsRpmRTD","round","runInitScript","safeZoneH","safeZoneW","safeZoneWAbs","safeZoneX","safeZoneXAbs","safeZoneY","saveGame","saveIdentity","saveJoysticks","saveOverlay","saveProfileNamespace","saveStatus","saveVar","savingEnabled","say","say2D","say3D","scopeName","score","scoreSide","screenToWorld","scriptDone","scriptName","scriptNull","scudState","secondaryWeapon","secondaryWeaponItems","secondaryWeaponMagazine","select","selectBestPlaces","selectDiarySubject","selectedEditorObjects","selectEditorObject","selectionPosition","selectLeader","selectNoPlayer","selectPlayer","selectWeapon","selectWeaponTurret","sendAUMessage","sendSimpleCommand","sendTask","sendTaskResult","sendUDPMessage","serverCommand","serverCommandAvailable","serverCommandExecutable","serverName","serverTime","set","setAccTime","setAirportSide","setAmmo","setAmmoCargo","setAperture","setApertureNew","setArmoryPoints","setAttributes","setAutonomous","setBehaviour","setBleedingRemaining","setCameraInterest","setCamShakeDefParams","setCamShakeParams","setCamUseTi","setCaptive","setCenterOfMass","setCollisionLight","setCombatMode","setCompassOscillation","setCuratorCameraAreaCeiling","setCuratorCoef","setCuratorEditingAreaType","setCuratorWaypointCost","setCurrentChannel","setCurrentTask","setCurrentWaypoint","setDamage","setDammage","setDate","setDebriefingText","setDefaultCamera","setDestination","setDetailMapBlendPars","setDir","setDirection","setDrawIcon","setDropInterval","setEditorMode","setEditorObjectScope","setEffectCondition","setFace","setFaceAnimation","setFatigue","setFlagOwner","setFlagSide","setFlagTexture","setFog","setFog array","setFormation","setFormationTask","setFormDir","setFriend","setFromEditor","setFSMVariable","setFuel","setFuelCargo","setGroupIcon","setGroupIconParams","setGroupIconsSelectable","setGroupIconsVisible","setGroupId","setGroupIdGlobal","setGroupOwner","setGusts","setHideBehind","setHit","setHitIndex","setHitPointDamage","setHorizonParallaxCoef","setHUDMovementLevels","setIdentity","setImportance","setLeader","setLightAmbient","setLightAttenuation","setLightBrightness","setLightColor","setLightDayLight","setLightFlareMaxDistance","setLightFlareSize","setLightIntensity","setLightnings","setLightUseFlare","setLocalWindParams","setMagazineTurretAmmo","setMarkerAlpha","setMarkerAlphaLocal","setMarkerBrush","setMarkerBrushLocal","setMarkerColor","setMarkerColorLocal","setMarkerDir","setMarkerDirLocal","setMarkerPos","setMarkerPosLocal","setMarkerShape","setMarkerShapeLocal","setMarkerSize","setMarkerSizeLocal","setMarkerText","setMarkerTextLocal","setMarkerType","setMarkerTypeLocal","setMass","setMimic","setMousePosition","setMusicEffect","setMusicEventHandler","setName","setNameSound","setObjectArguments","setObjectMaterial","setObjectProxy","setObjectTexture","setObjectTextureGlobal","setObjectViewDistance","setOvercast","setOwner","setOxygenRemaining","setParticleCircle","setParticleClass","setParticleFire","setParticleParams","setParticleRandom","setPilotLight","setPiPEffect","setPitch","setPlayable","setPlayerRespawnTime","setPos","setPosASL","setPosASL2","setPosASLW","setPosATL","setPosition","setPosWorld","setRadioMsg","setRain","setRainbow","setRandomLip","setRank","setRectangular","setRepairCargo","setShadowDistance","setSide","setSimpleTaskDescription","setSimpleTaskDestination","setSimpleTaskTarget","setSimulWeatherLayers","setSize","setSkill","setSkill array","setSlingLoad","setSoundEffect","setSpeaker","setSpeech","setSpeedMode","setStatValue","setSuppression","setSystemOfUnits","setTargetAge","setTaskResult","setTaskState","setTerrainGrid","setText","setTimeMultiplier","setTitleEffect","setTriggerActivation","setTriggerArea","setTriggerStatements","setTriggerText","setTriggerTimeout","setTriggerType","setType","setUnconscious","setUnitAbility","setUnitPos","setUnitPosWeak","setUnitRank","setUnitRecoilCoefficient","setUnloadInCombat","setUserActionText","setVariable","setVectorDir","setVectorDirAndUp","setVectorUp","setVehicleAmmo","setVehicleAmmoDef","setVehicleArmor","setVehicleId","setVehicleLock","setVehiclePosition","setVehicleTiPars","setVehicleVarName","setVelocity","setVelocityTransformation","setViewDistance","setVisibleIfTreeCollapsed","setWaves","setWaypointBehaviour","setWaypointCombatMode","setWaypointCompletionRadius","setWaypointDescription","setWaypointFormation","setWaypointHousePosition","setWaypointLoiterRadius","setWaypointLoiterType","setWaypointName","setWaypointPosition","setWaypointScript","setWaypointSpeed","setWaypointStatements","setWaypointTimeout","setWaypointType","setWaypointVisible","setWeaponReloadingTime","setWind","setWindDir","setWindForce","setWindStr","setWPPos","show3DIcons","showChat","showCinemaBorder","showCommandingMenu","showCompass","showCuratorCompass","showGPS","showHUD","showLegend","showMap","shownArtilleryComputer","shownChat","shownCompass","shownCuratorCompass","showNewEditorObject","shownGPS","shownHUD","shownMap","shownPad","shownRadio","shownUAVFeed","shownWarrant","shownWatch","showPad","showRadio","showSubtitles","showUAVFeed","showWarrant","showWatch","showWaypoint","side","sideChat","sideEnemy","sideFriendly","sideLogic","sideRadio","sideUnknown","simpleTasks","simulationEnabled","simulCloudDensity","simulCloudOcclusion","simulInClouds","simulWeatherSync","sin","size","sizeOf","skill","skillFinal","skipTime","sleep","sliderPosition","sliderRange","sliderSetPosition","sliderSetRange","sliderSetSpeed","sliderSpeed","slingLoadAssistantShown","soldierMagazines","someAmmo","sort","soundVolume","spawn","speaker","speed","speedMode","splitString","sqrt","squadParams","stance","startLoadingScreen","step","stop","stopped","str","sunOrMoon","supportInfo","suppressFor","surfaceIsWater","surfaceNormal","surfaceType","swimInDepth","switch","switchableUnits","switchAction","switchCamera","switchGesture","switchLight","switchMove","synchronizedObjects","synchronizedTriggers","synchronizedWaypoints","synchronizeObjectsAdd","synchronizeObjectsRemove","synchronizeTrigger","synchronizeWaypoint","synchronizeWaypoint trigger","systemChat","systemOfUnits","tan","targetKnowledge","targetsAggregate","targetsQuery","taskChildren","taskCompleted","taskDescription","taskDestination","taskHint","taskNull","taskParent","taskResult","taskState","teamMember","teamMemberNull","teamName","teams","teamSwitch","teamSwitchEnabled","teamType","terminate","terrainIntersect","terrainIntersectASL","text","text location","textLog","textLogFormat","tg","then","throw","time","timeMultiplier","titleCut","titleFadeOut","titleObj","titleRsc","titleText","to","toArray","toLower","toString","toUpper","triggerActivated","triggerActivation","triggerArea","triggerAttachedVehicle","triggerAttachObject","triggerAttachVehicle","triggerStatements","triggerText","triggerTimeout","triggerTimeoutCurrent","triggerType","true","try","turretLocal","turretOwner","turretUnit","tvAdd","tvClear","tvCollapse","tvCount","tvCurSel","tvData","tvDelete","tvExpand","tvPicture","tvSetCurSel","tvSetData","tvSetPicture","tvSetPictureColor","tvSetTooltip","tvSetValue","tvSort","tvSortByValue","tvText","tvValue","type","typeName","typeOf","UAVControl","uiNamespace","uiSleep","unassignCurator","unassignItem","unassignTeam","unassignVehicle","underwater","uniform","uniformContainer","uniformItems","uniformMagazines","unitAddons","unitBackpack","unitPos","unitReady","unitRecoilCoefficient","units","unitsBelowHeight","unlinkItem","unlockAchievement","unregisterTask","updateDrawIcon","updateMenuItem","updateObjectTree","useAudioTimeForMoves","vectorAdd","vectorCos","vectorCrossProduct","vectorDiff","vectorDir","vectorDirVisual","vectorDistance","vectorDistanceSqr","vectorDotProduct","vectorFromTo","vectorMagnitude","vectorMagnitudeSqr","vectorMultiply","vectorNormalized","vectorUp","vectorUpVisual","vehicle","vehicleChat","vehicleRadio","vehicles","vehicleVarName","velocity","velocityModelSpace","verifySignature","vest","vestContainer","vestItems","vestMagazines","viewDistance","visibleCompass","visibleGPS","visibleMap","visiblePosition","visiblePositionASL","visibleWatch","waitUntil","waves","waypointAttachedObject","waypointAttachedVehicle","waypointAttachObject","waypointAttachVehicle","waypointBehaviour","waypointCombatMode","waypointCompletionRadius","waypointDescription","waypointFormation","waypointHousePosition","waypointLoiterRadius","waypointLoiterType","waypointName","waypointPosition","waypoints","waypointScript","waypointsEnabledUAV","waypointShow","waypointSpeed","waypointStatements","waypointTimeout","waypointTimeoutCurrent","waypointType","waypointVisible","weaponAccessories","weaponCargo","weaponDirection","weaponLowered","weapons","weaponsItems","weaponsItemsCargo","weaponState","weaponsTurret","weightRTD","west","WFSideText","while","wind","windDir","windStr","wingsForcesRTD","with","worldName","worldSize","worldToModel","worldToModelVisual","worldToScreen"].filter(function(e){return-1==t.indexOf(e)&&-1==r.indexOf(e)&&-1==n.indexOf(e)});i=i.concat(["_forEachIndex|10","_this|10","_x|10"]);var a={className:"number",begin:e.NUMBER_RE,relevance:0},o={className:"string",variants:[e.QUOTE_STRING_MODE,{begin:"'\\\\?.",end:"'",illegal:"."}]},s={className:"preprocessor",begin:"#",end:"$",keywords:"if else elif endif define undef warning error line pragma ifdef ifndef",contains:[{begin:/\\\n/,relevance:0},{beginKeywords:"include",end:"$",contains:[o,{className:"string",begin:"<",end:">",illegal:"\\n"}]},o,a,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]};return{aliases:["sqf"],case_insensitive:!0,keywords:{keyword:t.join(" "),built_in:i.join(" "),literal:r.join(" ")},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,a,{className:"string",relevance:0,variants:[{begin:'"',end:'"',contains:[{begin:'""'}]},{begin:"'",end:"'",contains:[{begin:"''"}]}]},s]}}),i.registerLanguage("sql",function(e){var t=e.COMMENT("--","$");return{case_insensitive:!0,illegal:/[<>{}*]/,contains:[{className:"operator",beginKeywords:"begin end start commit rollback savepoint lock alter create drop rename call delete do handler insert load replace select truncate update set show pragma grant merge describe use explain help declare prepare execute deallocate release unlock purge reset change stop analyze cache flush optimize repair kill install uninstall checksum restore check backup revoke",end:/;/,endsWithParent:!0,keywords:{keyword:"abort abs absolute acc acce accep accept access accessed accessible account acos action activate add addtime admin administer advanced advise aes_decrypt aes_encrypt after agent aggregate ali alia alias allocate allow alter always analyze ancillary and any anydata anydataset anyschema anytype apply archive archived archivelog are as asc ascii asin assembly assertion associate asynchronous at atan atn2 attr attri attrib attribu attribut attribute attributes audit authenticated authentication authid authors auto autoallocate autodblink autoextend automatic availability avg backup badfile basicfile before begin beginning benchmark between bfile bfile_base big bigfile bin binary_double binary_float binlog bit_and bit_count bit_length bit_or bit_xor bitmap blob_base block blocksize body both bound buffer_cache buffer_pool build bulk by byte byteordermark bytes c cache caching call calling cancel capacity cascade cascaded case cast catalog category ceil ceiling chain change changed char_base char_length character_length characters characterset charindex charset charsetform charsetid check checksum checksum_agg child choose chr chunk class cleanup clear client clob clob_base clone close cluster_id cluster_probability cluster_set clustering coalesce coercibility col collate collation collect colu colum column column_value columns columns_updated comment commit compact compatibility compiled complete composite_limit compound compress compute concat concat_ws concurrent confirm conn connec connect connect_by_iscycle connect_by_isleaf connect_by_root connect_time connection consider consistent constant constraint constraints constructor container content contents context contributors controlfile conv convert convert_tz corr corr_k corr_s corresponding corruption cos cost count count_big counted covar_pop covar_samp cpu_per_call cpu_per_session crc32 create creation critical cross cube cume_dist curdate current current_date current_time current_timestamp current_user cursor curtime customdatum cycle d data database databases datafile datafiles datalength date_add date_cache date_format date_sub dateadd datediff datefromparts datename datepart datetime2fromparts day day_to_second dayname dayofmonth dayofweek dayofyear days db_role_change dbtimezone ddl deallocate declare decode decompose decrement decrypt deduplicate def defa defau defaul default defaults deferred defi defin define degrees delayed delegate delete delete_all delimited demand dense_rank depth dequeue des_decrypt des_encrypt des_key_file desc descr descri describ describe descriptor deterministic diagnostics difference dimension direct_load directory disable disable_all disallow disassociate discardfile disconnect diskgroup distinct distinctrow distribute distributed div do document domain dotnet double downgrade drop dumpfile duplicate duration e each edition editionable editions element ellipsis else elsif elt empty enable enable_all enclosed encode encoding encrypt end end-exec endian enforced engine engines enqueue enterprise entityescaping eomonth error errors escaped evalname evaluate event eventdata events except exception exceptions exchange exclude excluding execu execut execute exempt exists exit exp expire explain export export_set extended extent external external_1 external_2 externally extract f failed failed_login_attempts failover failure far fast feature_set feature_value fetch field fields file file_name_convert filesystem_like_logging final finish first first_value fixed flash_cache flashback floor flush following follows for forall force form forma format found found_rows freelist freelists freepools fresh from from_base64 from_days ftp full function g general generated get get_format get_lock getdate getutcdate global global_name globally go goto grant grants greatest group group_concat group_id grouping grouping_id groups gtid_subtract guarantee guard handler hash hashkeys having hea head headi headin heading heap help hex hierarchy high high_priority hosts hour http i id ident_current ident_incr ident_seed identified identity idle_time if ifnull ignore iif ilike ilm immediate import in include including increment index indexes indexing indextype indicator indices inet6_aton inet6_ntoa inet_aton inet_ntoa infile initial initialized initially initrans inmemory inner innodb input insert install instance instantiable instr interface interleaved intersect into invalidate invisible is is_free_lock is_ipv4 is_ipv4_compat is_not is_not_null is_used_lock isdate isnull isolation iterate java join json json_exists k keep keep_duplicates key keys kill l language large last last_day last_insert_id last_value lax lcase lead leading least leaves left len lenght length less level levels library like like2 like4 likec limit lines link list listagg little ln load load_file lob lobs local localtime localtimestamp locate locator lock locked log log10 log2 logfile logfiles logging logical logical_reads_per_call logoff logon logs long loop low low_priority lower lpad lrtrim ltrim m main make_set makedate maketime managed management manual map mapping mask master master_pos_wait match matched materialized max maxextents maximize maxinstances maxlen maxlogfiles maxloghistory maxlogmembers maxsize maxtrans md5 measures median medium member memcompress memory merge microsecond mid migration min minextents minimum mining minus minute minvalue missing mod mode model modification modify module monitoring month months mount move movement multiset mutex n name name_const names nan national native natural nav nchar nclob nested never new newline next nextval no no_write_to_binlog noarchivelog noaudit nobadfile nocheck nocompress nocopy nocycle nodelay nodiscardfile noentityescaping noguarantee nokeep nologfile nomapping nomaxvalue nominimize nominvalue nomonitoring none noneditionable nonschema noorder nopr nopro noprom nopromp noprompt norely noresetlogs noreverse normal norowdependencies noschemacheck noswitch not nothing notice notrim novalidate now nowait nth_value nullif nulls num numb numbe nvarchar nvarchar2 object ocicoll ocidate ocidatetime ociduration ociinterval ociloblocator ocinumber ociref ocirefcursor ocirowid ocistring ocitype oct octet_length of off offline offset oid oidindex old on online only opaque open operations operator optimal optimize option optionally or oracle oracle_date oradata ord ordaudio orddicom orddoc order ordimage ordinality ordvideo organization orlany orlvary out outer outfile outline output over overflow overriding p package pad parallel parallel_enable parameters parent parse partial partition partitions pascal passing password password_grace_time password_lock_time password_reuse_max password_reuse_time password_verify_function patch path patindex pctincrease pctthreshold pctused pctversion percent percent_rank percentile_cont percentile_disc performance period period_add period_diff permanent physical pi pipe pipelined pivot pluggable plugin policy position post_transaction pow power pragma prebuilt precedes preceding precision prediction prediction_cost prediction_details prediction_probability prediction_set prepare present preserve prior priority private private_sga privileges procedural procedure procedure_analyze processlist profiles project prompt protection public publishingservername purge quarter query quick quiesce quota quotename radians raise rand range rank raw read reads readsize rebuild record records recover recovery recursive recycle redo reduced ref reference referenced references referencing refresh regexp_like register regr_avgx regr_avgy regr_count regr_intercept regr_r2 regr_slope regr_sxx regr_sxy reject rekey relational relative relaylog release release_lock relies_on relocate rely rem remainder rename repair repeat replace replicate replication required reset resetlogs resize resource respect restore restricted result result_cache resumable resume retention return returning returns reuse reverse revoke right rlike role roles rollback rolling rollup round row row_count rowdependencies rowid rownum rows rtrim rules safe salt sample save savepoint sb1 sb2 sb4 scan schema schemacheck scn scope scroll sdo_georaster sdo_topo_geometry search sec_to_time second section securefile security seed segment select self sequence sequential serializable server servererror session session_user sessions_per_user set sets settings sha sha1 sha2 share shared shared_pool short show shrink shutdown si_averagecolor si_colorhistogram si_featurelist si_positionalcolor si_stillimage si_texture siblings sid sign sin size size_t sizes skip slave sleep smalldatetimefromparts smallfile snapshot some soname sort soundex source space sparse spfile split sql sql_big_result sql_buffer_result sql_cache sql_calc_found_rows sql_small_result sql_variant_property sqlcode sqldata sqlerror sqlname sqlstate sqrt square standalone standby start starting startup statement static statistics stats_binomial_test stats_crosstab stats_ks_test stats_mode stats_mw_test stats_one_way_anova stats_t_test_ stats_t_test_indep stats_t_test_one stats_t_test_paired stats_wsr_test status std stddev stddev_pop stddev_samp stdev stop storage store stored str str_to_date straight_join strcmp strict string struct stuff style subdate subpartition subpartitions substitutable substr substring subtime subtring_index subtype success sum suspend switch switchoffset switchover sync synchronous synonym sys sys_xmlagg sysasm sysaux sysdate sysdatetimeoffset sysdba sysoper system system_user sysutcdatetime t table tables tablespace tan tdo template temporary terminated tertiary_weights test than then thread through tier ties time time_format time_zone timediff timefromparts timeout timestamp timestampadd timestampdiff timezone_abbr timezone_minute timezone_region to to_base64 to_date to_days to_seconds todatetimeoffset trace tracking transaction transactional translate translation treat trigger trigger_nestlevel triggers trim truncate try_cast try_convert try_parse type ub1 ub2 ub4 ucase unarchived unbounded uncompress under undo unhex unicode uniform uninstall union unique unix_timestamp unknown unlimited unlock unpivot unrecoverable unsafe unsigned until untrusted unusable unused update updated upgrade upped upper upsert url urowid usable usage use use_stored_outlines user user_data user_resources users using utc_date utc_timestamp uuid uuid_short validate validate_password_strength validation valist value values var var_samp varcharc vari varia variab variabl variable variables variance varp varraw varrawc varray verify version versions view virtual visible void wait wallet warning warnings week weekday weekofyear wellformed when whene whenev wheneve whenever where while whitespace with within without work wrapped xdb xml xmlagg xmlattributes xmlcast xmlcolattval xmlelement xmlexists xmlforest xmlindex xmlnamespaces xmlpi xmlquery xmlroot xmlschema xmlserialize xmltable xmltype xor year year_to_month years yearweek",literal:"true false null",built_in:"array bigint binary bit blob boolean char character date dec decimal float int int8 integer interval number numeric real record serial serial8 smallint text varchar varying void"},contains:[{className:"string",begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE,{begin:"''"}]},{className:"string",begin:'"',end:'"',contains:[e.BACKSLASH_ESCAPE,{begin:'""'}]},{className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,t]},e.C_BLOCK_COMMENT_MODE,t]}}),i.registerLanguage("stata",function(e){return{aliases:["do","ado"],case_insensitive:!0,keywords:"if else in foreach for forv forva forval forvalu forvalue forvalues by bys bysort xi quietly qui capture about ac ac_7 acprplot acprplot_7 adjust ado adopath adoupdate alpha ameans an ano anov anova anova_estat anova_terms anovadef aorder ap app appe appen append arch arch_dr arch_estat arch_p archlm areg areg_p args arima arima_dr arima_estat arima_p as asmprobit asmprobit_estat asmprobit_lf asmprobit_mfx__dlg asmprobit_p ass asse asser assert avplot avplot_7 avplots avplots_7 bcskew0 bgodfrey binreg bip0_lf biplot bipp_lf bipr_lf bipr_p biprobit bitest bitesti bitowt blogit bmemsize boot bootsamp bootstrap bootstrap_8 boxco_l boxco_p boxcox boxcox_6 boxcox_p bprobit br break brier bro brow brows browse brr brrstat bs bs_7 bsampl_w bsample bsample_7 bsqreg bstat bstat_7 bstat_8 bstrap bstrap_7 ca ca_estat ca_p cabiplot camat canon canon_8 canon_8_p canon_estat canon_p cap caprojection capt captu captur capture cat cc cchart cchart_7 cci cd censobs_table centile cf char chdir checkdlgfiles checkestimationsample checkhlpfiles checksum chelp ci cii cl class classutil clear cli clis clist clo clog clog_lf clog_p clogi clogi_sw clogit clogit_lf clogit_p clogitp clogl_sw cloglog clonevar clslistarray cluster cluster_measures cluster_stop cluster_tree cluster_tree_8 clustermat cmdlog cnr cnre cnreg cnreg_p cnreg_sw cnsreg codebook collaps4 collapse colormult_nb colormult_nw compare compress conf confi confir confirm conren cons const constr constra constrai constrain constraint continue contract copy copyright copysource cor corc corr corr2data corr_anti corr_kmo corr_smc corre correl correla correlat correlate corrgram cou coun count cox cox_p cox_sw coxbase coxhaz coxvar cprplot cprplot_7 crc cret cretu cretur creturn cross cs cscript cscript_log csi ct ct_is ctset ctst_5 ctst_st cttost cumsp cumsp_7 cumul cusum cusum_7 cutil d datasig datasign datasigna datasignat datasignatu datasignatur datasignature datetof db dbeta de dec deco decod decode deff des desc descr descri describ describe destring dfbeta dfgls dfuller di di_g dir dirstats dis discard disp disp_res disp_s displ displa display distinct do doe doed doedi doedit dotplot dotplot_7 dprobit drawnorm drop ds ds_util dstdize duplicates durbina dwstat dydx e ed edi edit egen eivreg emdef en enc enco encod encode eq erase ereg ereg_lf ereg_p ereg_sw ereghet ereghet_glf ereghet_glf_sh ereghet_gp ereghet_ilf ereghet_ilf_sh ereghet_ip eret eretu eretur ereturn err erro error est est_cfexist est_cfname est_clickable est_expand est_hold est_table est_unhold est_unholdok estat estat_default estat_summ estat_vce_only esti estimates etodow etof etomdy ex exi exit expand expandcl fac fact facto factor factor_estat factor_p factor_pca_rotated factor_rotate factormat fcast fcast_compute fcast_graph fdades fdadesc fdadescr fdadescri fdadescrib fdadescribe fdasav fdasave fdause fh_st file open file read file close file filefilter fillin find_hlp_file findfile findit findit_7 fit fl fli flis flist for5_0 form forma format fpredict frac_154 frac_adj frac_chk frac_cox frac_ddp frac_dis frac_dv frac_in frac_mun frac_pp frac_pq frac_pv frac_wgt frac_xo fracgen fracplot fracplot_7 fracpoly fracpred fron_ex fron_hn fron_p fron_tn fron_tn2 frontier ftodate ftoe ftomdy ftowdate g gamhet_glf gamhet_gp gamhet_ilf gamhet_ip gamma gamma_d2 gamma_p gamma_sw gammahet gdi_hexagon gdi_spokes ge gen gene gener genera generat generate genrank genstd genvmean gettoken gl gladder gladder_7 glim_l01 glim_l02 glim_l03 glim_l04 glim_l05 glim_l06 glim_l07 glim_l08 glim_l09 glim_l10 glim_l11 glim_l12 glim_lf glim_mu glim_nw1 glim_nw2 glim_nw3 glim_p glim_v1 glim_v2 glim_v3 glim_v4 glim_v5 glim_v6 glim_v7 glm glm_6 glm_p glm_sw glmpred glo glob globa global glogit glogit_8 glogit_p gmeans gnbre_lf gnbreg gnbreg_5 gnbreg_p gomp_lf gompe_sw gomper_p gompertz gompertzhet gomphet_glf gomphet_glf_sh gomphet_gp gomphet_ilf gomphet_ilf_sh gomphet_ip gphdot gphpen gphprint gprefs gprobi_p gprobit gprobit_8 gr gr7 gr_copy gr_current gr_db gr_describe gr_dir gr_draw gr_draw_replay gr_drop gr_edit gr_editviewopts gr_example gr_example2 gr_export gr_print gr_qscheme gr_query gr_read gr_rename gr_replay gr_save gr_set gr_setscheme gr_table gr_undo gr_use graph graph7 grebar greigen greigen_7 greigen_8 grmeanby grmeanby_7 gs_fileinfo gs_filetype gs_graphinfo gs_stat gsort gwood h hadimvo hareg hausman haver he heck_d2 heckma_p heckman heckp_lf heckpr_p heckprob hel help hereg hetpr_lf hetpr_p hetprob hettest hexdump hilite hist hist_7 histogram hlogit hlu hmeans hotel hotelling hprobit hreg hsearch icd9 icd9_ff icd9p iis impute imtest inbase include inf infi infil infile infix inp inpu input ins insheet insp inspe inspec inspect integ inten intreg intreg_7 intreg_p intrg2_ll intrg_ll intrg_ll2 ipolate iqreg ir irf irf_create irfm iri is_svy is_svysum isid istdize ivprob_1_lf ivprob_lf ivprobit ivprobit_p ivreg ivreg_footnote ivtob_1_lf ivtob_lf ivtobit ivtobit_p jackknife jacknife jknife jknife_6 jknife_8 jkstat joinby kalarma1 kap kap_3 kapmeier kappa kapwgt kdensity kdensity_7 keep ksm ksmirnov ktau kwallis l la lab labe label labelbook ladder levels levelsof leverage lfit lfit_p li lincom line linktest lis list lloghet_glf lloghet_glf_sh lloghet_gp lloghet_ilf lloghet_ilf_sh lloghet_ip llogi_sw llogis_p llogist llogistic llogistichet lnorm_lf lnorm_sw lnorma_p lnormal lnormalhet lnormhet_glf lnormhet_glf_sh lnormhet_gp lnormhet_ilf lnormhet_ilf_sh lnormhet_ip lnskew0 loadingplot loc loca local log logi logis_lf logistic logistic_p logit logit_estat logit_p loglogs logrank loneway lookfor lookup lowess lowess_7 lpredict lrecomp lroc lroc_7 lrtest ls lsens lsens_7 lsens_x lstat ltable ltable_7 ltriang lv lvr2plot lvr2plot_7 m ma mac macr macro makecns man manova manova_estat manova_p manovatest mantel mark markin markout marksample mat mat_capp mat_order mat_put_rr mat_rapp mata mata_clear mata_describe mata_drop mata_matdescribe mata_matsave mata_matuse mata_memory mata_mlib mata_mosave mata_rename mata_which matalabel matcproc matlist matname matr matri matrix matrix_input__dlg matstrik mcc mcci md0_ md1_ md1debug_ md2_ md2debug_ mds mds_estat mds_p mdsconfig mdslong mdsmat mdsshepard mdytoe mdytof me_derd mean means median memory memsize meqparse mer merg merge mfp mfx mhelp mhodds minbound mixed_ll mixed_ll_reparm mkassert mkdir mkmat mkspline ml ml_5 ml_adjs ml_bhhhs ml_c_d ml_check ml_clear ml_cnt ml_debug ml_defd ml_e0 ml_e0_bfgs ml_e0_cycle ml_e0_dfp ml_e0i ml_e1 ml_e1_bfgs ml_e1_bhhh ml_e1_cycle ml_e1_dfp ml_e2 ml_e2_cycle ml_ebfg0 ml_ebfr0 ml_ebfr1 ml_ebh0q ml_ebhh0 ml_ebhr0 ml_ebr0i ml_ecr0i ml_edfp0 ml_edfr0 ml_edfr1 ml_edr0i ml_eds ml_eer0i ml_egr0i ml_elf ml_elf_bfgs ml_elf_bhhh ml_elf_cycle ml_elf_dfp ml_elfi ml_elfs ml_enr0i ml_enrr0 ml_erdu0 ml_erdu0_bfgs ml_erdu0_bhhh ml_erdu0_bhhhq ml_erdu0_cycle ml_erdu0_dfp ml_erdu0_nrbfgs ml_exde ml_footnote ml_geqnr ml_grad0 ml_graph ml_hbhhh ml_hd0 ml_hold ml_init ml_inv ml_log ml_max ml_mlout ml_mlout_8 ml_model ml_nb0 ml_opt ml_p ml_plot ml_query ml_rdgrd ml_repor ml_s_e ml_score ml_searc ml_technique ml_unhold mleval mlf_ mlmatbysum mlmatsum mlog mlogi mlogit mlogit_footnote mlogit_p mlopts mlsum mlvecsum mnl0_ mor more mov move mprobit mprobit_lf mprobit_p mrdu0_ mrdu1_ mvdecode mvencode mvreg mvreg_estat n nbreg nbreg_al nbreg_lf nbreg_p nbreg_sw nestreg net newey newey_7 newey_p news nl nl_7 nl_9 nl_9_p nl_p nl_p_7 nlcom nlcom_p nlexp2 nlexp2_7 nlexp2a nlexp2a_7 nlexp3 nlexp3_7 nlgom3 nlgom3_7 nlgom4 nlgom4_7 nlinit nllog3 nllog3_7 nllog4 nllog4_7 nlog_rd nlogit nlogit_p nlogitgen nlogittree nlpred no nobreak noi nois noisi noisil noisily note notes notes_dlg nptrend numlabel numlist odbc old_ver olo olog ologi ologi_sw ologit ologit_p ologitp on one onew onewa oneway op_colnm op_comp op_diff op_inv op_str opr opro oprob oprob_sw oprobi oprobi_p oprobit oprobitp opts_exclusive order orthog orthpoly ou out outf outfi outfil outfile outs outsh outshe outshee outsheet ovtest pac pac_7 palette parse parse_dissim pause pca pca_8 pca_display pca_estat pca_p pca_rotate pcamat pchart pchart_7 pchi pchi_7 pcorr pctile pentium pergram pergram_7 permute permute_8 personal peto_st pkcollapse pkcross pkequiv pkexamine pkexamine_7 pkshape pksumm pksumm_7 pl plo plot plugin pnorm pnorm_7 poisgof poiss_lf poiss_sw poisso_p poisson poisson_estat post postclose postfile postutil pperron pr prais prais_e prais_e2 prais_p predict predictnl preserve print pro prob probi probit probit_estat probit_p proc_time procoverlay procrustes procrustes_estat procrustes_p profiler prog progr progra program prop proportion prtest prtesti pwcorr pwd q\\s qby qbys qchi qchi_7 qladder qladder_7 qnorm qnorm_7 qqplot qqplot_7 qreg qreg_c qreg_p qreg_sw qu quadchk quantile quantile_7 que quer query range ranksum ratio rchart rchart_7 rcof recast reclink recode reg reg3 reg3_p regdw regr regre regre_p2 regres regres_p regress regress_estat regriv_p remap ren rena renam rename renpfix repeat replace report reshape restore ret retu retur return rm rmdir robvar roccomp roccomp_7 roccomp_8 rocf_lf rocfit rocfit_8 rocgold rocplot rocplot_7 roctab roctab_7 rolling rologit rologit_p rot rota rotat rotate rotatemat rreg rreg_p ru run runtest rvfplot rvfplot_7 rvpplot rvpplot_7 sa safesum sample sampsi sav save savedresults saveold sc sca scal scala scalar scatter scm_mine sco scob_lf scob_p scobi_sw scobit scor score scoreplot scoreplot_help scree screeplot screeplot_help sdtest sdtesti se search separate seperate serrbar serrbar_7 serset set set_defaults sfrancia sh she shel shell shewhart shewhart_7 signestimationsample signrank signtest simul simul_7 simulate simulate_8 sktest sleep slogit slogit_d2 slogit_p smooth snapspan so sor sort spearman spikeplot spikeplot_7 spikeplt spline_x split sqreg sqreg_p sret sretu sretur sreturn ssc st st_ct st_hc st_hcd st_hcd_sh st_is st_issys st_note st_promo st_set st_show st_smpl st_subid stack statsby statsby_8 stbase stci stci_7 stcox stcox_estat stcox_fr stcox_fr_ll stcox_p stcox_sw stcoxkm stcoxkm_7 stcstat stcurv stcurve stcurve_7 stdes stem stepwise stereg stfill stgen stir stjoin stmc stmh stphplot stphplot_7 stphtest stphtest_7 stptime strate strate_7 streg streg_sw streset sts sts_7 stset stsplit stsum sttocc sttoct stvary stweib su suest suest_8 sum summ summa summar summari summariz summarize sunflower sureg survcurv survsum svar svar_p svmat svy svy_disp svy_dreg svy_est svy_est_7 svy_estat svy_get svy_gnbreg_p svy_head svy_header svy_heckman_p svy_heckprob_p svy_intreg_p svy_ivreg_p svy_logistic_p svy_logit_p svy_mlogit_p svy_nbreg_p svy_ologit_p svy_oprobit_p svy_poisson_p svy_probit_p svy_regress_p svy_sub svy_sub_7 svy_x svy_x_7 svy_x_p svydes svydes_8 svygen svygnbreg svyheckman svyheckprob svyintreg svyintreg_7 svyintrg svyivreg svylc svylog_p svylogit svymarkout svymarkout_8 svymean svymlog svymlogit svynbreg svyolog svyologit svyoprob svyoprobit svyopts svypois svypois_7 svypoisson svyprobit svyprobt svyprop svyprop_7 svyratio svyreg svyreg_p svyregress svyset svyset_7 svyset_8 svytab svytab_7 svytest svytotal sw sw_8 swcnreg swcox swereg swilk swlogis swlogit swologit swoprbt swpois swprobit swqreg swtobit swweib symmetry symmi symplot symplot_7 syntax sysdescribe sysdir sysuse szroeter ta tab tab1 tab2 tab_or tabd tabdi tabdis tabdisp tabi table tabodds tabodds_7 tabstat tabu tabul tabula tabulat tabulate te tempfile tempname tempvar tes test testnl testparm teststd tetrachoric time_it timer tis tob tobi tobit tobit_p tobit_sw token tokeni tokeniz tokenize tostring total translate translator transmap treat_ll treatr_p treatreg trim trnb_cons trnb_mean trpoiss_d2 trunc_ll truncr_p truncreg tsappend tset tsfill tsline tsline_ex tsreport tsrevar tsrline tsset tssmooth tsunab ttest ttesti tut_chk tut_wait tutorial tw tware_st two twoway twoway__fpfit_serset twoway__function_gen twoway__histogram_gen twoway__ipoint_serset twoway__ipoints_serset twoway__kdensity_gen twoway__lfit_serset twoway__normgen_gen twoway__pci_serset twoway__qfit_serset twoway__scatteri_serset twoway__sunflower_gen twoway_ksm_serset ty typ type typeof u unab unabbrev unabcmd update us use uselabel var var_mkcompanion var_p varbasic varfcast vargranger varirf varirf_add varirf_cgraph varirf_create varirf_ctable varirf_describe varirf_dir varirf_drop varirf_erase varirf_graph varirf_ograph varirf_rename varirf_set varirf_table varlist varlmar varnorm varsoc varstable varstable_w varstable_w2 varwle vce vec vec_fevd vec_mkphi vec_p vec_p_w vecirf_create veclmar veclmar_w vecnorm vecnorm_w vecrank vecstable verinst vers versi versio version view viewsource vif vwls wdatetof webdescribe webseek webuse weib1_lf weib2_lf weib_lf weib_lf0 weibhet_glf weibhet_glf_sh weibhet_glfa weibhet_glfa_sh weibhet_gp weibhet_ilf weibhet_ilf_sh weibhet_ilfa weibhet_ilfa_sh weibhet_ip weibu_sw weibul_p weibull weibull_c weibull_s weibullhet wh whelp whi which whil while wilc_st wilcoxon win wind windo window winexec wntestb wntestb_7 wntestq xchart xchart_7 xcorr xcorr_7 xi xi_6 xmlsav xmlsave xmluse xpose xsh xshe xshel xshell xt_iis xt_tis xtab_p xtabond xtbin_p xtclog xtcloglog xtcloglog_8 xtcloglog_d2 xtcloglog_pa_p xtcloglog_re_p xtcnt_p xtcorr xtdata xtdes xtfront_p xtfrontier xtgee xtgee_elink xtgee_estat xtgee_makeivar xtgee_p xtgee_plink xtgls xtgls_p xthaus xthausman xtht_p xthtaylor xtile xtint_p xtintreg xtintreg_8 xtintreg_d2 xtintreg_p xtivp_1 xtivp_2 xtivreg xtline xtline_ex xtlogit xtlogit_8 xtlogit_d2 xtlogit_fe_p xtlogit_pa_p xtlogit_re_p xtmixed xtmixed_estat xtmixed_p xtnb_fe xtnb_lf xtnbreg xtnbreg_pa_p xtnbreg_refe_p xtpcse xtpcse_p xtpois xtpoisson xtpoisson_d2 xtpoisson_pa_p xtpoisson_refe_p xtpred xtprobit xtprobit_8 xtprobit_d2 xtprobit_re_p xtps_fe xtps_lf xtps_ren xtps_ren_8 xtrar_p xtrc xtrc_p xtrchh xtrefe_p xtreg xtreg_be xtreg_fe xtreg_ml xtreg_pa_p xtreg_re xtregar xtrere_p xtset xtsf_ll xtsf_llti xtsum xttab xttest0 xttobit xttobit_8 xttobit_p xttrans yx yxview__barlike_draw yxview_area_draw yxview_bar_draw yxview_dot_draw yxview_dropline_draw yxview_function_draw yxview_iarrow_draw yxview_ilabels_draw yxview_normal_draw yxview_pcarrow_draw yxview_pcbarrow_draw yxview_pccapsym_draw yxview_pcscatter_draw yxview_pcspike_draw yxview_rarea_draw yxview_rbar_draw yxview_rbarm_draw yxview_rcap_draw yxview_rcapsym_draw yxview_rconnected_draw yxview_rline_draw yxview_rscatter_draw yxview_rspike_draw yxview_spike_draw yxview_sunflower_draw zap_s zinb zinb_llf zinb_plf zip zip_llf zip_p zip_plf zt_ct_5 zt_hc_5 zt_hcd_5 zt_is_5 zt_iss_5 zt_sho_5 zt_smp_5 ztbase_5 ztcox_5 ztdes_5 ztereg_5 ztfill_5 ztgen_5 ztir_5 ztjoin_5 ztnb ztnb_p ztp ztp_p zts_5 ztset_5 ztspli_5 ztsum_5 zttoct_5 ztvary_5 ztweib_5",contains:[{className:"label",variants:[{begin:"\\$\\{?[a-zA-Z0-9_]+\\}?"},{begin:"`[a-zA-Z0-9_]+'"}]},{className:"string",variants:[{begin:'`"[^\r\n]*?"\''},{begin:'"[^\r\n"]*"'}]},{className:"literal",variants:[{begin:"\\b(abs|acos|asin|atan|atan2|atanh|ceil|cloglog|comb|cos|digamma|exp|floor|invcloglog|invlogit|ln|lnfact|lnfactorial|lngamma|log|log10|max|min|mod|reldif|round|sign|sin|sqrt|sum|tan|tanh|trigamma|trunc|betaden|Binomial|binorm|binormal|chi2|chi2tail|dgammapda|dgammapdada|dgammapdadx|dgammapdx|dgammapdxdx|F|Fden|Ftail|gammaden|gammap|ibeta|invbinomial|invchi2|invchi2tail|invF|invFtail|invgammap|invibeta|invnchi2|invnFtail|invnibeta|invnorm|invnormal|invttail|nbetaden|nchi2|nFden|nFtail|nibeta|norm|normal|normalden|normd|npnchi2|tden|ttail|uniform|abbrev|char|index|indexnot|length|lower|ltrim|match|plural|proper|real|regexm|regexr|regexs|reverse|rtrim|string|strlen|strlower|strltrim|strmatch|strofreal|strpos|strproper|strreverse|strrtrim|strtrim|strupper|subinstr|subinword|substr|trim|upper|word|wordcount|_caller|autocode|byteorder|chop|clip|cond|e|epsdouble|epsfloat|group|inlist|inrange|irecode|matrix|maxbyte|maxdouble|maxfloat|maxint|maxlong|mi|minbyte|mindouble|minfloat|minint|minlong|missing|r|recode|replay|return|s|scalar|d|date|day|dow|doy|halfyear|mdy|month|quarter|week|year|d|daily|dofd|dofh|dofm|dofq|dofw|dofy|h|halfyearly|hofd|m|mofd|monthly|q|qofd|quarterly|tin|twithin|w|weekly|wofd|y|yearly|yh|ym|yofd|yq|yw|cholesky|colnumb|colsof|corr|det|diag|diag0cnt|el|get|hadamard|I|inv|invsym|issym|issymmetric|J|matmissing|matuniform|mreldif|nullmat|rownumb|rowsof|sweep|syminv|trace|vec|vecdiag)(?=\\(|$)"}]},e.COMMENT("^[ \t]*\\*.*$",!1),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]}}),i.registerLanguage("step21",function(e){var t=[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.COMMENT("/\\*\\*!","\\*/"),e.C_NUMBER_MODE,e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null}),{className:"string",begin:"'",end:"'"},{className:"label",variants:[{begin:"#",end:"\\d+",illegal:"\\W"}]}];return{aliases:["p21","step","stp"],case_insensitive:!0,lexemes:"[A-Z_][A-Z0-9_.]*",keywords:{literal:"",built_in:"",keyword:"HEADER ENDSEC DATA"},contains:[{className:"preprocessor",begin:"END-ISO-10303-21;",relevance:10},{className:"preprocessor",begin:"ISO-10303-21;",relevance:10}].concat(t)}}),i.registerLanguage("stylus",function(e){var t={className:"variable",begin:"\\$"+e.IDENT_RE},n={className:"hexcolor",begin:"#([a-fA-F0-9]{6}|[a-fA-F0-9]{3})",relevance:10},r="[\\.\\s\\n\\[\\:,]";return{aliases:["styl"],case_insensitive:!1,illegal:"("+["\\{","\\}","\\?","(\\bReturn\\b)","(\\bEnd\\b)","(\\bend\\b)",";","#\\s","\\*\\s","===\\s","\\|","%"].join("|")+")",keywords:"if else for in",contains:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,{begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"+r,returnBegin:!0,contains:[{className:"class",begin:"\\.[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"\\#[a-zA-Z][a-zA-Z0-9_-]*"+r,returnBegin:!0,contains:[{className:"id",begin:"\\#[a-zA-Z][a-zA-Z0-9_-]*"}]},{begin:"\\b("+["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","mark","menu","nav","object","ol","p","q","quote","samp","section","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"].join("|")+")"+r,returnBegin:!0,contains:[{className:"tag",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"}]},{className:"pseudo",begin:"&?:?:\\b("+["after","before","first-letter","first-line","active","first-child","focus","hover","lang","link","visited"].join("|")+")"+r},{className:"at_rule",begin:"@("+["charset","css","debug","extend","font-face","for","import","include","media","mixin","page","warn","while"].join("|")+")\\b"},t,e.CSS_NUMBER_MODE,e.NUMBER_MODE,{className:"function",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*\\(.*\\)",illegal:"[\\n]",returnBegin:!0,contains:[{className:"title",begin:"\\b[a-zA-Z][a-zA-Z0-9_-]*"},{className:"params",begin:/\(/,end:/\)/,contains:[n,t,e.APOS_STRING_MODE,e.CSS_NUMBER_MODE,e.NUMBER_MODE,e.QUOTE_STRING_MODE]}]},{className:"attribute",begin:"\\b("+["align-content","align-items","align-self","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","auto","backface-visibility","background","background-attachment","background-clip","background-color","background-image","background-origin","background-position","background-repeat","background-size","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","clear","clip","clip-path","color","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","content","counter-increment","counter-reset","cursor","direction","display","empty-cells","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","font","font-family","font-feature-settings","font-kerning","font-language-override","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-variant-ligatures","font-weight","height","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","inherit","initial","justify-content","left","letter-spacing","line-height","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","mask","max-height","max-width","min-height","min-width","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page-break-after","page-break-before","page-break-inside","perspective","perspective-origin","pointer-events","position","quotes","resize","right","tab-size","table-layout","text-align","text-align-last","text-decoration","text-decoration-color","text-decoration-line","text-decoration-style","text-indent","text-overflow","text-rendering","text-shadow","text-transform","text-underline-position","top","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","unicode-bidi","vertical-align","visibility","white-space","widows","width","word-break","word-spacing","word-wrap","z-index"].reverse().join("|")+")\\b"}]}}),i.registerLanguage("swift",function(e){var t={keyword:"__COLUMN__ __FILE__ __FUNCTION__ __LINE__ as as! as? associativity break case catch class continue convenience default defer deinit didSet do dynamic dynamicType else enum extension fallthrough false final for func get guard if import in indirect infix init inout internal is lazy left let mutating nil none nonmutating operator optional override postfix precedence prefix private protocol Protocol public repeat required rethrows return right self Self set static struct subscript super switch throw throws true try try! try? Type typealias unowned var weak where while willSet",literal:"true false nil",built_in:"abs advance alignof alignofValue anyGenerator assert assertionFailure bridgeFromObjectiveC bridgeFromObjectiveCUnconditional bridgeToObjectiveC bridgeToObjectiveCUnconditional c contains count countElements countLeadingZeros debugPrint debugPrintln distance dropFirst dropLast dump encodeBitsAsWords enumerate equal fatalError filter find getBridgedObjectiveCType getVaList indices insertionSort isBridgedToObjectiveC isBridgedVerbatimToObjectiveC isUniquelyReferenced isUniquelyReferencedNonObjC join lazy lexicographicalCompare map max maxElement min minElement numericCast overlaps partition posix precondition preconditionFailure print println quickSort readLine reduce reflect reinterpretCast reverse roundUpToAlignment sizeof sizeofValue sort split startsWith stride strideof strideofValue swap toString transcode underestimateCount unsafeAddressOf unsafeBitCast unsafeDowncast unsafeUnwrap unsafeReflect withExtendedLifetime withObjectAtPlusZero withUnsafePointer withUnsafePointerToObject withUnsafeMutablePointer withUnsafeMutablePointers withUnsafePointer withUnsafePointers withVaList zip"},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),r={className:"subst",begin:/\\\(/,end:"\\)",keywords:t,contains:[]},i={className:"number",begin:"\\b([\\d_]+(\\.[\\deE_]+)?|0x[a-fA-F0-9_]+(\\.[a-fA-F0-9p_]+)?|0b[01_]+|0o[0-7_]+)\\b",relevance:0},a=e.inherit(e.QUOTE_STRING_MODE,{contains:[r,e.BACKSLASH_ESCAPE]});return r.contains=[i],{keywords:t,contains:[a,e.C_LINE_COMMENT_MODE,n,{className:"type",begin:"\\b[A-Z][\\w']*",relevance:0},i,{className:"func",beginKeywords:"func",end:"{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/,illegal:/\(/}),{className:"generics",begin:/</,end:/>/,illegal:/>/},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,contains:["self",i,a,e.C_BLOCK_COMMENT_MODE,{begin:":"}],illegal:/["']/}],illegal:/\[|%/},{className:"class",beginKeywords:"struct protocol class extension enum",keywords:t,end:"\\{",excludeEnd:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/})]},{className:"preprocessor",begin:"(@warn_unused_result|@exported|@lazy|@noescape|@NSCopying|@NSManaged|@objc|@convention|@required|@noreturn|@IBAction|@IBDesignable|@IBInspectable|@IBOutlet|@infix|@prefix|@postfix|@autoclosure|@testable|@available|@nonobjc|@NSApplicationMain|@UIApplicationMain)"},{beginKeywords:"import",end:/$/,contains:[e.C_LINE_COMMENT_MODE,n]}]}}),i.registerLanguage("tcl",function(e){return{aliases:["tk"],keywords:"after append apply array auto_execok auto_import auto_load auto_mkindex auto_mkindex_old auto_qualify auto_reset bgerror binary break catch cd chan clock close concat continue dde dict encoding eof error eval exec exit expr fblocked fconfigure fcopy file fileevent filename flush for foreach format gets glob global history http if incr info interp join lappend|10 lassign|10 lindex|10 linsert|10 list llength|10 load lrange|10 lrepeat|10 lreplace|10 lreverse|10 lsearch|10 lset|10 lsort|10 mathfunc mathop memory msgcat namespace open package parray pid pkg::create pkg_mkIndex platform platform::shell proc puts pwd read refchan regexp registry regsub|10 rename return safe scan seek set socket source split string subst switch tcl_endOfWord tcl_findLibrary tcl_startOfNextWord tcl_startOfPreviousWord tcl_wordBreakAfter tcl_wordBreakBefore tcltest tclvars tell time tm trace unknown unload unset update uplevel upvar variable vwait while",contains:[e.COMMENT(";[ \\t]*#","$"),e.COMMENT("^[ \\t]*#","$"),{beginKeywords:"proc",end:"[\\{]",excludeEnd:!0,contains:[{className:"symbol",begin:"[ \\t\\n\\r]+(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"[ \\t\\n\\r]",endsWithParent:!0,excludeEnd:!0}]},{className:"variable",excludeEnd:!0,variants:[{begin:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*\\(([a-zA-Z0-9_])*\\)",end:"[^a-zA-Z0-9_\\}\\$]"},{begin:"\\$(\\{)?(::)?[a-zA-Z_]((::)?[a-zA-Z0-9_])*",end:"(\\))?[^a-zA-Z0-9_\\}\\$]"}]},{className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},{className:"number",variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]}]}}),i.registerLanguage("tex",function(e){var t={className:"command",begin:"\\\\[a-zA-Zа-яА-я]+[\\*]?"},n={className:"command",begin:"\\\\[^a-zA-Zа-яА-я0-9]"},r={className:"special",begin:"[{}\\[\\]\\&#~]",relevance:0};return{contains:[{begin:"\\\\[a-zA-Zа-яА-я]+[\\*]? *= *-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",returnBegin:!0,contains:[t,n,{className:"number",begin:" *=",end:"-?\\d*\\.?\\d+(pt|pc|mm|cm|in|dd|cc|ex|em)?",excludeBegin:!0}],relevance:10},t,n,r,{className:"formula",begin:"\\$\\$",end:"\\$\\$",contains:[t,n,r],relevance:0},{className:"formula",begin:"\\$",end:"\\$",contains:[t,n,r],relevance:0},e.COMMENT("%","$",{relevance:0})]}}),i.registerLanguage("thrift",function(e){var t="bool byte i16 i32 i64 double string binary";return{keywords:{keyword:"namespace const typedef struct enum service exception void oneway set list map required optional",built_in:t,literal:"true false"},contains:[e.QUOTE_STRING_MODE,e.NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"class",beginKeywords:"struct enum service exception",end:/\{/,illegal:/\n/,contains:[e.inherit(e.TITLE_MODE,{starts:{endsWithParent:!0,excludeEnd:!0}})]},{begin:"\\b(set|list|map)\\s*<",end:">",keywords:t,contains:["self"]}]}}),i.registerLanguage("tp",function(e){var t={className:"number",begin:"[1-9][0-9]*",relevance:0},n={className:"comment",begin:":[^\\]]+"};return{keywords:{keyword:"ABORT ACC ADJUST AND AP_LD BREAK CALL CNT COL CONDITION CONFIG DA DB DIV DETECT ELSE END ENDFOR ERR_NUM ERROR_PROG FINE FOR GP GUARD INC IF JMP LINEAR_MAX_SPEED LOCK MOD MONITOR OFFSET Offset OR OVERRIDE PAUSE PREG PTH RT_LD RUN SELECT SKIP Skip TA TB TO TOOL_OFFSET Tool_Offset UF UT UFRAME_NUM UTOOL_NUM UNLOCK WAIT X Y Z W P R STRLEN SUBSTR FINDSTR VOFFSET",constant:"ON OFF max_speed LPOS JPOS ENABLE DISABLE START STOP RESET"},contains:[{className:"built_in",begin:"(AR|P|PAYLOAD|PR|R|SR|RSR|LBL|VR|UALM|MESSAGE|UTOOL|UFRAME|TIMER|    TIMER_OVERFLOW|JOINT_MAX_SPEED|RESUME_PROG|DIAG_REC)\\[",end:"\\]",contains:["self",t,n]},{className:"built_in",begin:"(AI|AO|DI|DO|F|RI|RO|UI|UO|GI|GO|SI|SO)\\[",end:"\\]",contains:["self",t,e.QUOTE_STRING_MODE,n]},{className:"keyword",begin:"/(PROG|ATTR|MN|POS|END)\\b"},{className:"keyword",begin:"(CALL|RUN|POINT_LOGIC|LBL)\\b"},{className:"keyword",begin:"\\b(ACC|CNT|Skip|Offset|PSPD|RT_LD|AP_LD|Tool_Offset)"},{className:"number",begin:"\\d+(sec|msec|mm/sec|cm/min|inch/min|deg/sec|mm|in|cm)?\\b",relevance:0},e.COMMENT("//","[;$]"),e.COMMENT("!","[;$]"),e.COMMENT("--eg:","$"),e.QUOTE_STRING_MODE,{className:"string",begin:"'",end:"'"},e.C_NUMBER_MODE,{className:"variable",begin:"\\$[A-Za-z0-9_]+"}]}}),i.registerLanguage("twig",function(e){var t={className:"function",beginKeywords:"attribute block constant cycle date dump include max min parent random range source template_from_string",relevance:0,contains:[{className:"params",begin:"\\(",end:"\\)"}]},n={className:"filter",begin:/\|[A-Za-z_]+:?/,keywords:"abs batch capitalize convert_encoding date date_modify default escape first format join json_encode keys last length lower merge nl2br number_format raw replace reverse round slice sort split striptags title trim upper url_encode",contains:[t]},r="autoescape block do embed extends filter flush for if import include macro sandbox set spaceless use verbatim";return r=r+" "+r.split(" ").map(function(e){return"end"+e}).join(" "),{aliases:["craftcms"],case_insensitive:!0,subLanguage:"xml",contains:[e.COMMENT(/\{#/,/#}/),{className:"template_tag",begin:/\{%/,end:/%}/,keywords:r,contains:[n,t]},{className:"variable",begin:/\{\{/,end:/}}/,contains:[n,t]}]}}),i.registerLanguage("typescript",function(e){var t={keyword:"in if for while finally var new function|0 do return void else break catch instanceof with throw case default try this switch continue typeof delete let yield const class public private protected get set super static implements enum export import declare type namespace abstract",literal:"true false null undefined NaN Infinity",built_in:"eval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Error EvalError InternalError RangeError ReferenceError StopIteration SyntaxError TypeError URIError Number Math Date String RegExp Array Float32Array Float64Array Int16Array Int32Array Int8Array Uint16Array Uint32Array Uint8Array Uint8ClampedArray ArrayBuffer DataView JSON Intl arguments require module console window document any number boolean string void"};return{aliases:["ts"],keywords:t,contains:[{className:"pi",begin:/^\s*['"]use strict['"]/,relevance:0},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"number",variants:[{begin:"\\b(0[bB][01]+)"},{begin:"\\b(0[oO][0-7]+)"},{begin:e.C_NUMBER_RE}],relevance:0},{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.REGEXP_MODE],relevance:0},{className:"function",begin:"function",end:/[\{;]/,excludeEnd:!0,keywords:t,contains:["self",e.inherit(e.TITLE_MODE,{begin:/[A-Za-z$_][0-9A-Za-z$_]*/}),{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:t,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:/["'\(]/}],illegal:/\[|%/,relevance:0},{className:"constructor",beginKeywords:"constructor",end:/\{/,excludeEnd:!0,relevance:10},{className:"module",beginKeywords:"module",end:/\{/,excludeEnd:!0},{className:"interface",beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:"interface extends"},{begin:/\$[(.]/},{begin:"\\."+e.IDENT_RE,relevance:0}]}}),i.registerLanguage("vala",function(e){return{keywords:{keyword:"char uchar unichar int uint long ulong short ushort int8 int16 int32 int64 uint8 uint16 uint32 uint64 float double bool struct enum string void weak unowned owned async signal static abstract interface override while do for foreach else switch case break default return try catch public private protected internal using new this get set const stdout stdin stderr var",built_in:"DBus GLib CCode Gee Object",literal:"false true null"},contains:[{className:"class",beginKeywords:"class interface delegate namespace",end:"{",excludeEnd:!0,illegal:"[^,:\\n\\s\\.]",contains:[e.UNDERSCORE_TITLE_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",begin:'"""',end:'"""',relevance:5},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,e.C_NUMBER_MODE,{className:"preprocessor",begin:"^#",end:"$",relevance:2},{className:"constant",begin:" [A-Z_]+ ",relevance:0}]}}),i.registerLanguage("vbnet",function(e){return{aliases:["vb"],case_insensitive:!0,keywords:{keyword:"addhandler addressof alias and andalso aggregate ansi as assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into is isfalse isnot istrue join key let lib like loop me mid mod module mustinherit mustoverride mybase myclass namespace narrowing new next not notinheritable notoverridable of off on operator option optional or order orelse overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim rem removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly xor",built_in:"boolean byte cbool cbyte cchar cdate cdec cdbl char cint clng cobj csbyte cshort csng cstr ctype date decimal directcast double gettype getxmlnamespace iif integer long object sbyte short single string trycast typeof uinteger ulong ushort",literal:"true false nothing"},illegal:"//|{|}|endif|gosub|variant|wend",contains:[e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT("'","$",{returnBegin:!0,contains:[{className:"xmlDocTag",begin:"'''|\x3c!--|--\x3e",contains:[e.PHRASAL_WORDS_MODE]},{className:"xmlDocTag",begin:"</?",end:">",contains:[e.PHRASAL_WORDS_MODE]}]}),e.C_NUMBER_MODE,{className:"preprocessor",begin:"#",end:"$",keywords:"if else elseif end region externalsource"}]}}),i.registerLanguage("vbscript",function(e){return{aliases:["vbs"],case_insensitive:!0,keywords:{keyword:"call class const dim do loop erase execute executeglobal exit for each next function if then else on error option explicit new private property let get public randomize redim rem select case set stop sub while wend with end to elseif is or xor and not class_initialize class_terminate default preserve in me byval byref step resume goto",built_in:"lcase month vartype instrrev ubound setlocale getobject rgb getref string weekdayname rnd dateadd monthname now day minute isarray cbool round formatcurrency conversions csng timevalue second year space abs clng timeserial fixs len asc isempty maths dateserial atn timer isobject filter weekday datevalue ccur isdate instr datediff formatdatetime replace isnull right sgn array snumeric log cdbl hex chr lbound msgbox ucase getlocale cos cdate cbyte rtrim join hour oct typename trim strcomp int createobject loadpicture tan formatnumber mid scriptenginebuildversion scriptengine split scriptengineminorversion cint sin datepart ltrim sqr scriptenginemajorversion time derived eval date formatpercent exp inputbox left ascw chrw regexp server response request cstr err",literal:"true false null nothing empty"},illegal:"//",contains:[e.inherit(e.QUOTE_STRING_MODE,{contains:[{begin:'""'}]}),e.COMMENT(/'/,/$/,{relevance:0}),e.C_NUMBER_MODE]}}),i.registerLanguage("vbscript-html",function(e){return{subLanguage:"xml",contains:[{begin:"<%",end:"%>",subLanguage:"vbscript"}]}}),i.registerLanguage("verilog",function(e){return{aliases:["v"],case_insensitive:!0,keywords:{keyword:"always and assign begin buf bufif0 bufif1 case casex casez cmos deassign default defparam disable edge else end endcase endfunction endmodule endprimitive endspecify endtable endtask event for force forever fork function if ifnone initial inout input join macromodule module nand negedge nmos nor not notif0 notif1 or output parameter pmos posedge primitive pulldown pullup rcmos release repeat rnmos rpmos rtran rtranif0 rtranif1 specify specparam table task timescale tran tranif0 tranif1 wait while xnor xor",typename:"highz0 highz1 integer large medium pull0 pull1 real realtime reg scalared signed small strong0 strong1 supply0 supply0 supply1 supply1 time tri tri0 tri1 triand trior trireg vectored wand weak0 weak1 wire wor"},contains:[e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE,e.QUOTE_STRING_MODE,{className:"number",begin:"\\b(\\d+'(b|h|o|d|B|H|O|D))?[0-9xzXZ]+",contains:[e.BACKSLASH_ESCAPE],relevance:0},{className:"typename",begin:"\\.\\w+",relevance:0},{className:"value",begin:"#\\((?!parameter).+\\)"},{className:"keyword",begin:"\\+|-|\\*|/|%|<|>|=|#|`|\\!|&|\\||@|:|\\^|~|\\{|\\}",relevance:0}]}}),i.registerLanguage("vhdl",function(e){return{case_insensitive:!0,keywords:{keyword:"abs access after alias all and architecture array assert attribute begin block body buffer bus case component configuration constant context cover disconnect downto default else elsif end entity exit fairness file for force function generate generic group guarded if impure in inertial inout is label library linkage literal loop map mod nand new next nor not null of on open or others out package port postponed procedure process property protected pure range record register reject release rem report restrict restrict_guarantee return rol ror select sequence severity shared signal sla sll sra srl strong subtype then to transport type unaffected units until use variable vmode vprop vunit wait when while with xnor xor",typename:"boolean bit character severity_level integer time delay_length natural positive string bit_vector file_open_kind file_open_status std_ulogic std_ulogic_vector std_logic std_logic_vector unsigned signed boolean_vector integer_vector real_vector time_vector"},illegal:"{",contains:[e.C_BLOCK_COMMENT_MODE,e.COMMENT("--","$"),e.QUOTE_STRING_MODE,{className:"number",begin:"\\b(\\d(_|\\d)*#\\w+(\\.\\w+)?#([eE][-+]?\\d(_|\\d)*)?|\\d(_|\\d)*(\\.\\d(_|\\d)*)?([eE][-+]?\\d(_|\\d)*)?)",relevance:0},{className:"literal",begin:"'(U|X|0|1|Z|W|L|H|-)'",contains:[e.BACKSLASH_ESCAPE]},{className:"attribute",begin:"'[A-Za-z](_?[A-Za-z0-9])*",contains:[e.BACKSLASH_ESCAPE]}]}}),i.registerLanguage("vim",function(e){return{lexemes:/[!#@\w]+/,keywords:{keyword:"N|0 P|0 X|0 a|0 ab abc abo al am an|0 ar arga argd arge argdo argg argl argu as au aug aun b|0 bN ba bad bd be bel bf bl bm bn bo bp br brea breaka breakd breakl bro bufdo buffers bun bw c|0 cN cNf ca cabc caddb cad caddf cal cat cb cc ccl cd ce cex cf cfir cgetb cgete cg changes chd che checkt cl cla clo cm cmapc cme cn cnew cnf cno cnorea cnoreme co col colo com comc comp con conf cope cp cpf cq cr cs cst cu cuna cunme cw d|0 delm deb debugg delc delf dif diffg diffo diffp diffpu diffs diffthis dig di dl dell dj dli do doautoa dp dr ds dsp e|0 ea ec echoe echoh echom echon el elsei em en endfo endf endt endw ene ex exe exi exu f|0 files filet fin fina fini fir fix fo foldc foldd folddoc foldo for fu g|0 go gr grepa gu gv ha h|0 helpf helpg helpt hi hid his i|0 ia iabc if ij il im imapc ime ino inorea inoreme int is isp iu iuna iunme j|0 ju k|0 keepa kee keepj lN lNf l|0 lad laddb laddf la lan lat lb lc lch lcl lcs le lefta let lex lf lfir lgetb lgete lg lgr lgrepa lh ll lla lli lmak lm lmapc lne lnew lnf ln loadk lo loc lockv lol lope lp lpf lr ls lt lu lua luad luaf lv lvimgrepa lw m|0 ma mak map mapc marks mat me menut mes mk mks mksp mkv mkvie mod mz mzf nbc nb nbs n|0 new nm nmapc nme nn nnoreme noa no noh norea noreme norm nu nun nunme ol o|0 om omapc ome on ono onoreme opt ou ounme ow p|0 profd prof pro promptr pc ped pe perld po popu pp pre prev ps pt ptN ptf ptj ptl ptn ptp ptr pts pu pw py3 python3 py3d py3f py pyd pyf q|0 quita qa r|0 rec red redi redr redraws reg res ret retu rew ri rightb rub rubyd rubyf rund ru rv s|0 sN san sa sal sav sb sbN sba sbf sbl sbm sbn sbp sbr scrip scripte scs se setf setg setl sf sfir sh sim sig sil sl sla sm smap smapc sme sn sni sno snor snoreme sor so spelld spe spelli spellr spellu spellw sp spr sre st sta startg startr star stopi stj sts sun sunm sunme sus sv sw sy synti sync t|0 tN tabN tabc tabdo tabe tabf tabfir tabl tabm tabnew tabn tabo tabp tabr tabs tab ta tags tc tcld tclf te tf th tj tl tm tn to tp tr try ts tu u|0 undoj undol una unh unl unlo unm unme uns up v|0 ve verb vert vim vimgrepa vi viu vie vm vmapc vme vne vn vnoreme vs vu vunme windo w|0 wN wa wh wi winc winp wn wp wq wqa ws wu wv x|0 xa xmapc xm xme xn xnoreme xu xunme y|0 z|0 ~ Next Print append abbreviate abclear aboveleft all amenu anoremenu args argadd argdelete argedit argglobal arglocal argument ascii autocmd augroup aunmenu buffer bNext ball badd bdelete behave belowright bfirst blast bmodified bnext botright bprevious brewind break breakadd breakdel breaklist browse bunload bwipeout change cNext cNfile cabbrev cabclear caddbuffer caddexpr caddfile call catch cbuffer cclose center cexpr cfile cfirst cgetbuffer cgetexpr cgetfile chdir checkpath checktime clist clast close cmap cmapclear cmenu cnext cnewer cnfile cnoremap cnoreabbrev cnoremenu copy colder colorscheme command comclear compiler continue confirm copen cprevious cpfile cquit crewind cscope cstag cunmap cunabbrev cunmenu cwindow delete delmarks debug debuggreedy delcommand delfunction diffupdate diffget diffoff diffpatch diffput diffsplit digraphs display deletel djump dlist doautocmd doautoall deletep drop dsearch dsplit edit earlier echo echoerr echohl echomsg else elseif emenu endif endfor endfunction endtry endwhile enew execute exit exusage file filetype find finally finish first fixdel fold foldclose folddoopen folddoclosed foldopen function global goto grep grepadd gui gvim hardcopy help helpfind helpgrep helptags highlight hide history insert iabbrev iabclear ijump ilist imap imapclear imenu inoremap inoreabbrev inoremenu intro isearch isplit iunmap iunabbrev iunmenu join jumps keepalt keepmarks keepjumps lNext lNfile list laddexpr laddbuffer laddfile last language later lbuffer lcd lchdir lclose lcscope left leftabove lexpr lfile lfirst lgetbuffer lgetexpr lgetfile lgrep lgrepadd lhelpgrep llast llist lmake lmap lmapclear lnext lnewer lnfile lnoremap loadkeymap loadview lockmarks lockvar lolder lopen lprevious lpfile lrewind ltag lunmap luado luafile lvimgrep lvimgrepadd lwindow move mark make mapclear match menu menutranslate messages mkexrc mksession mkspell mkvimrc mkview mode mzscheme mzfile nbclose nbkey nbsart next nmap nmapclear nmenu nnoremap nnoremenu noautocmd noremap nohlsearch noreabbrev noremenu normal number nunmap nunmenu oldfiles open omap omapclear omenu only onoremap onoremenu options ounmap ounmenu ownsyntax print profdel profile promptfind promptrepl pclose pedit perl perldo pop popup ppop preserve previous psearch ptag ptNext ptfirst ptjump ptlast ptnext ptprevious ptrewind ptselect put pwd py3do py3file python pydo pyfile quit quitall qall read recover redo redir redraw redrawstatus registers resize retab return rewind right rightbelow ruby rubydo rubyfile rundo runtime rviminfo substitute sNext sandbox sargument sall saveas sbuffer sbNext sball sbfirst sblast sbmodified sbnext sbprevious sbrewind scriptnames scriptencoding scscope set setfiletype setglobal setlocal sfind sfirst shell simalt sign silent sleep slast smagic smapclear smenu snext sniff snomagic snoremap snoremenu sort source spelldump spellgood spellinfo spellrepall spellundo spellwrong split sprevious srewind stop stag startgreplace startreplace startinsert stopinsert stjump stselect sunhide sunmap sunmenu suspend sview swapname syntax syntime syncbind tNext tabNext tabclose tabedit tabfind tabfirst tablast tabmove tabnext tabonly tabprevious tabrewind tag tcl tcldo tclfile tearoff tfirst throw tjump tlast tmenu tnext topleft tprevious trewind tselect tunmenu undo undojoin undolist unabbreviate unhide unlet unlockvar unmap unmenu unsilent update vglobal version verbose vertical vimgrep vimgrepadd visual viusage view vmap vmapclear vmenu vnew vnoremap vnoremenu vsplit vunmap vunmenu write wNext wall while winsize wincmd winpos wnext wprevious wqall wsverb wundo wviminfo xit xall xmapclear xmap xmenu xnoremap xnoremenu xunmap xunmenu yank",built_in:"abs acos add and append argc argidx argv asin atan atan2 browse browsedir bufexists buflisted bufloaded bufname bufnr bufwinnr byte2line byteidx call ceil changenr char2nr cindent clearmatches col complete complete_add complete_check confirm copy cos cosh count cscope_connection cursor deepcopy delete did_filetype diff_filler diff_hlID empty escape eval eventhandler executable exists exp expand extend feedkeys filereadable filewritable filter finddir findfile float2nr floor fmod fnameescape fnamemodify foldclosed foldclosedend foldlevel foldtext foldtextresult foreground function garbagecollect get getbufline getbufvar getchar getcharmod getcmdline getcmdpos getcmdtype getcwd getfontname getfperm getfsize getftime getftype getline getloclist getmatches getpid getpos getqflist getreg getregtype gettabvar gettabwinvar getwinposx getwinposy getwinvar glob globpath has has_key haslocaldir hasmapto histadd histdel histget histnr hlexists hlID hostname iconv indent index input inputdialog inputlist inputrestore inputsave inputsecret insert invert isdirectory islocked items join keys len libcall libcallnr line line2byte lispindent localtime log log10 luaeval map maparg mapcheck match matchadd matcharg matchdelete matchend matchlist matchstr max min mkdir mode mzeval nextnonblank nr2char or pathshorten pow prevnonblank printf pumvisible py3eval pyeval range readfile reltime reltimestr remote_expr remote_foreground remote_peek remote_read remote_send remove rename repeat resolve reverse round screenattr screenchar screencol screenrow search searchdecl searchpair searchpairpos searchpos server2client serverlist setbufvar setcmdpos setline setloclist setmatches setpos setqflist setreg settabvar settabwinvar setwinvar sha256 shellescape shiftwidth simplify sin sinh sort soundfold spellbadword spellsuggest split sqrt str2float str2nr strchars strdisplaywidth strftime stridx string strlen strpart strridx strtrans strwidth submatch substitute synconcealed synID synIDattr synIDtrans synstack system tabpagebuflist tabpagenr tabpagewinnr tagfiles taglist tan tanh tempname tolower toupper tr trunc type undofile undotree values virtcol visualmode wildmenumode winbufnr wincol winheight winline winnr winrestcmd winrestview winsaveview winwidth writefile xor"},illegal:/[{:]/,contains:[e.NUMBER_MODE,e.APOS_STRING_MODE,{className:"string",begin:/"((\\")|[^"\n])*("|\n)/},{className:"variable",begin:/[bwtglsav]:[\w\d_]*/},{className:"function",beginKeywords:"function function!",end:"$",relevance:0,contains:[e.TITLE_MODE,{className:"params",begin:"\\(",end:"\\)"}]}]}}),i.registerLanguage("x86asm",function(e){return{case_insensitive:!0,lexemes:"\\.?"+e.IDENT_RE,keywords:{keyword:"lock rep repe repz repne repnz xaquire xrelease bnd nobnd aaa aad aam aas adc add and arpl bb0_reset bb1_reset bound bsf bsr bswap bt btc btr bts call cbw cdq cdqe clc cld cli clts cmc cmp cmpsb cmpsd cmpsq cmpsw cmpxchg cmpxchg486 cmpxchg8b cmpxchg16b cpuid cpu_read cpu_write cqo cwd cwde daa das dec div dmint emms enter equ f2xm1 fabs fadd faddp fbld fbstp fchs fclex fcmovb fcmovbe fcmove fcmovnb fcmovnbe fcmovne fcmovnu fcmovu fcom fcomi fcomip fcomp fcompp fcos fdecstp fdisi fdiv fdivp fdivr fdivrp femms feni ffree ffreep fiadd ficom ficomp fidiv fidivr fild fimul fincstp finit fist fistp fisttp fisub fisubr fld fld1 fldcw fldenv fldl2e fldl2t fldlg2 fldln2 fldpi fldz fmul fmulp fnclex fndisi fneni fninit fnop fnsave fnstcw fnstenv fnstsw fpatan fprem fprem1 fptan frndint frstor fsave fscale fsetpm fsin fsincos fsqrt fst fstcw fstenv fstp fstsw fsub fsubp fsubr fsubrp ftst fucom fucomi fucomip fucomp fucompp fxam fxch fxtract fyl2x fyl2xp1 hlt ibts icebp idiv imul in inc incbin insb insd insw int int01 int1 int03 int3 into invd invpcid invlpg invlpga iret iretd iretq iretw jcxz jecxz jrcxz jmp jmpe lahf lar lds lea leave les lfence lfs lgdt lgs lidt lldt lmsw loadall loadall286 lodsb lodsd lodsq lodsw loop loope loopne loopnz loopz lsl lss ltr mfence monitor mov movd movq movsb movsd movsq movsw movsx movsxd movzx mul mwait neg nop not or out outsb outsd outsw packssdw packsswb packuswb paddb paddd paddsb paddsiw paddsw paddusb paddusw paddw pand pandn pause paveb pavgusb pcmpeqb pcmpeqd pcmpeqw pcmpgtb pcmpgtd pcmpgtw pdistib pf2id pfacc pfadd pfcmpeq pfcmpge pfcmpgt pfmax pfmin pfmul pfrcp pfrcpit1 pfrcpit2 pfrsqit1 pfrsqrt pfsub pfsubr pi2fd pmachriw pmaddwd pmagw pmulhriw pmulhrwa pmulhrwc pmulhw pmullw pmvgezb pmvlzb pmvnzb pmvzb pop popa popad popaw popf popfd popfq popfw por prefetch prefetchw pslld psllq psllw psrad psraw psrld psrlq psrlw psubb psubd psubsb psubsiw psubsw psubusb psubusw psubw punpckhbw punpckhdq punpckhwd punpcklbw punpckldq punpcklwd push pusha pushad pushaw pushf pushfd pushfq pushfw pxor rcl rcr rdshr rdmsr rdpmc rdtsc rdtscp ret retf retn rol ror rdm rsdc rsldt rsm rsts sahf sal salc sar sbb scasb scasd scasq scasw sfence sgdt shl shld shr shrd sidt sldt skinit smi smint smintold smsw stc std sti stosb stosd stosq stosw str sub svdc svldt svts swapgs syscall sysenter sysexit sysret test ud0 ud1 ud2b ud2 ud2a umov verr verw fwait wbinvd wrshr wrmsr xadd xbts xchg xlatb xlat xor cmove cmovz cmovne cmovnz cmova cmovnbe cmovae cmovnb cmovb cmovnae cmovbe cmovna cmovg cmovnle cmovge cmovnl cmovl cmovnge cmovle cmovng cmovc cmovnc cmovo cmovno cmovs cmovns cmovp cmovpe cmovnp cmovpo je jz jne jnz ja jnbe jae jnb jb jnae jbe jna jg jnle jge jnl jl jnge jle jng jc jnc jo jno js jns jpo jnp jpe jp sete setz setne setnz seta setnbe setae setnb setnc setb setnae setcset setbe setna setg setnle setge setnl setl setnge setle setng sets setns seto setno setpe setp setpo setnp addps addss andnps andps cmpeqps cmpeqss cmpleps cmpless cmpltps cmpltss cmpneqps cmpneqss cmpnleps cmpnless cmpnltps cmpnltss cmpordps cmpordss cmpunordps cmpunordss cmpps cmpss comiss cvtpi2ps cvtps2pi cvtsi2ss cvtss2si cvttps2pi cvttss2si divps divss ldmxcsr maxps maxss minps minss movaps movhps movlhps movlps movhlps movmskps movntps movss movups mulps mulss orps rcpps rcpss rsqrtps rsqrtss shufps sqrtps sqrtss stmxcsr subps subss ucomiss unpckhps unpcklps xorps fxrstor fxrstor64 fxsave fxsave64 xgetbv xsetbv xsave xsave64 xsaveopt xsaveopt64 xrstor xrstor64 prefetchnta prefetcht0 prefetcht1 prefetcht2 maskmovq movntq pavgb pavgw pextrw pinsrw pmaxsw pmaxub pminsw pminub pmovmskb pmulhuw psadbw pshufw pf2iw pfnacc pfpnacc pi2fw pswapd maskmovdqu clflush movntdq movnti movntpd movdqa movdqu movdq2q movq2dq paddq pmuludq pshufd pshufhw pshuflw pslldq psrldq psubq punpckhqdq punpcklqdq addpd addsd andnpd andpd cmpeqpd cmpeqsd cmplepd cmplesd cmpltpd cmpltsd cmpneqpd cmpneqsd cmpnlepd cmpnlesd cmpnltpd cmpnltsd cmpordpd cmpordsd cmpunordpd cmpunordsd cmppd comisd cvtdq2pd cvtdq2ps cvtpd2dq cvtpd2pi cvtpd2ps cvtpi2pd cvtps2dq cvtps2pd cvtsd2si cvtsd2ss cvtsi2sd cvtss2sd cvttpd2pi cvttpd2dq cvttps2dq cvttsd2si divpd divsd maxpd maxsd minpd minsd movapd movhpd movlpd movmskpd movupd mulpd mulsd orpd shufpd sqrtpd sqrtsd subpd subsd ucomisd unpckhpd unpcklpd xorpd addsubpd addsubps haddpd haddps hsubpd hsubps lddqu movddup movshdup movsldup clgi stgi vmcall vmclear vmfunc vmlaunch vmload vmmcall vmptrld vmptrst vmread vmresume vmrun vmsave vmwrite vmxoff vmxon invept invvpid pabsb pabsw pabsd palignr phaddw phaddd phaddsw phsubw phsubd phsubsw pmaddubsw pmulhrsw pshufb psignb psignw psignd extrq insertq movntsd movntss lzcnt blendpd blendps blendvpd blendvps dppd dpps extractps insertps movntdqa mpsadbw packusdw pblendvb pblendw pcmpeqq pextrb pextrd pextrq phminposuw pinsrb pinsrd pinsrq pmaxsb pmaxsd pmaxud pmaxuw pminsb pminsd pminud pminuw pmovsxbw pmovsxbd pmovsxbq pmovsxwd pmovsxwq pmovsxdq pmovzxbw pmovzxbd pmovzxbq pmovzxwd pmovzxwq pmovzxdq pmuldq pmulld ptest roundpd roundps roundsd roundss crc32 pcmpestri pcmpestrm pcmpistri pcmpistrm pcmpgtq popcnt getsec pfrcpv pfrsqrtv movbe aesenc aesenclast aesdec aesdeclast aesimc aeskeygenassist vaesenc vaesenclast vaesdec vaesdeclast vaesimc vaeskeygenassist vaddpd vaddps vaddsd vaddss vaddsubpd vaddsubps vandpd vandps vandnpd vandnps vblendpd vblendps vblendvpd vblendvps vbroadcastss vbroadcastsd vbroadcastf128 vcmpeq_ospd vcmpeqpd vcmplt_ospd vcmpltpd vcmple_ospd vcmplepd vcmpunord_qpd vcmpunordpd vcmpneq_uqpd vcmpneqpd vcmpnlt_uspd vcmpnltpd vcmpnle_uspd vcmpnlepd vcmpord_qpd vcmpordpd vcmpeq_uqpd vcmpnge_uspd vcmpngepd vcmpngt_uspd vcmpngtpd vcmpfalse_oqpd vcmpfalsepd vcmpneq_oqpd vcmpge_ospd vcmpgepd vcmpgt_ospd vcmpgtpd vcmptrue_uqpd vcmptruepd vcmplt_oqpd vcmple_oqpd vcmpunord_spd vcmpneq_uspd vcmpnlt_uqpd vcmpnle_uqpd vcmpord_spd vcmpeq_uspd vcmpnge_uqpd vcmpngt_uqpd vcmpfalse_ospd vcmpneq_ospd vcmpge_oqpd vcmpgt_oqpd vcmptrue_uspd vcmppd vcmpeq_osps vcmpeqps vcmplt_osps vcmpltps vcmple_osps vcmpleps vcmpunord_qps vcmpunordps vcmpneq_uqps vcmpneqps vcmpnlt_usps vcmpnltps vcmpnle_usps vcmpnleps vcmpord_qps vcmpordps vcmpeq_uqps vcmpnge_usps vcmpngeps vcmpngt_usps vcmpngtps vcmpfalse_oqps vcmpfalseps vcmpneq_oqps vcmpge_osps vcmpgeps vcmpgt_osps vcmpgtps vcmptrue_uqps vcmptrueps vcmplt_oqps vcmple_oqps vcmpunord_sps vcmpneq_usps vcmpnlt_uqps vcmpnle_uqps vcmpord_sps vcmpeq_usps vcmpnge_uqps vcmpngt_uqps vcmpfalse_osps vcmpneq_osps vcmpge_oqps vcmpgt_oqps vcmptrue_usps vcmpps vcmpeq_ossd vcmpeqsd vcmplt_ossd vcmpltsd vcmple_ossd vcmplesd vcmpunord_qsd vcmpunordsd vcmpneq_uqsd vcmpneqsd vcmpnlt_ussd vcmpnltsd vcmpnle_ussd vcmpnlesd vcmpord_qsd vcmpordsd vcmpeq_uqsd vcmpnge_ussd vcmpngesd vcmpngt_ussd vcmpngtsd vcmpfalse_oqsd vcmpfalsesd vcmpneq_oqsd vcmpge_ossd vcmpgesd vcmpgt_ossd vcmpgtsd vcmptrue_uqsd vcmptruesd vcmplt_oqsd vcmple_oqsd vcmpunord_ssd vcmpneq_ussd vcmpnlt_uqsd vcmpnle_uqsd vcmpord_ssd vcmpeq_ussd vcmpnge_uqsd vcmpngt_uqsd vcmpfalse_ossd vcmpneq_ossd vcmpge_oqsd vcmpgt_oqsd vcmptrue_ussd vcmpsd vcmpeq_osss vcmpeqss vcmplt_osss vcmpltss vcmple_osss vcmpless vcmpunord_qss vcmpunordss vcmpneq_uqss vcmpneqss vcmpnlt_usss vcmpnltss vcmpnle_usss vcmpnless vcmpord_qss vcmpordss vcmpeq_uqss vcmpnge_usss vcmpngess vcmpngt_usss vcmpngtss vcmpfalse_oqss vcmpfalsess vcmpneq_oqss vcmpge_osss vcmpgess vcmpgt_osss vcmpgtss vcmptrue_uqss vcmptruess vcmplt_oqss vcmple_oqss vcmpunord_sss vcmpneq_usss vcmpnlt_uqss vcmpnle_uqss vcmpord_sss vcmpeq_usss vcmpnge_uqss vcmpngt_uqss vcmpfalse_osss vcmpneq_osss vcmpge_oqss vcmpgt_oqss vcmptrue_usss vcmpss vcomisd vcomiss vcvtdq2pd vcvtdq2ps vcvtpd2dq vcvtpd2ps vcvtps2dq vcvtps2pd vcvtsd2si vcvtsd2ss vcvtsi2sd vcvtsi2ss vcvtss2sd vcvtss2si vcvttpd2dq vcvttps2dq vcvttsd2si vcvttss2si vdivpd vdivps vdivsd vdivss vdppd vdpps vextractf128 vextractps vhaddpd vhaddps vhsubpd vhsubps vinsertf128 vinsertps vlddqu vldqqu vldmxcsr vmaskmovdqu vmaskmovps vmaskmovpd vmaxpd vmaxps vmaxsd vmaxss vminpd vminps vminsd vminss vmovapd vmovaps vmovd vmovq vmovddup vmovdqa vmovqqa vmovdqu vmovqqu vmovhlps vmovhpd vmovhps vmovlhps vmovlpd vmovlps vmovmskpd vmovmskps vmovntdq vmovntqq vmovntdqa vmovntpd vmovntps vmovsd vmovshdup vmovsldup vmovss vmovupd vmovups vmpsadbw vmulpd vmulps vmulsd vmulss vorpd vorps vpabsb vpabsw vpabsd vpacksswb vpackssdw vpackuswb vpackusdw vpaddb vpaddw vpaddd vpaddq vpaddsb vpaddsw vpaddusb vpaddusw vpalignr vpand vpandn vpavgb vpavgw vpblendvb vpblendw vpcmpestri vpcmpestrm vpcmpistri vpcmpistrm vpcmpeqb vpcmpeqw vpcmpeqd vpcmpeqq vpcmpgtb vpcmpgtw vpcmpgtd vpcmpgtq vpermilpd vpermilps vperm2f128 vpextrb vpextrw vpextrd vpextrq vphaddw vphaddd vphaddsw vphminposuw vphsubw vphsubd vphsubsw vpinsrb vpinsrw vpinsrd vpinsrq vpmaddwd vpmaddubsw vpmaxsb vpmaxsw vpmaxsd vpmaxub vpmaxuw vpmaxud vpminsb vpminsw vpminsd vpminub vpminuw vpminud vpmovmskb vpmovsxbw vpmovsxbd vpmovsxbq vpmovsxwd vpmovsxwq vpmovsxdq vpmovzxbw vpmovzxbd vpmovzxbq vpmovzxwd vpmovzxwq vpmovzxdq vpmulhuw vpmulhrsw vpmulhw vpmullw vpmulld vpmuludq vpmuldq vpor vpsadbw vpshufb vpshufd vpshufhw vpshuflw vpsignb vpsignw vpsignd vpslldq vpsrldq vpsllw vpslld vpsllq vpsraw vpsrad vpsrlw vpsrld vpsrlq vptest vpsubb vpsubw vpsubd vpsubq vpsubsb vpsubsw vpsubusb vpsubusw vpunpckhbw vpunpckhwd vpunpckhdq vpunpckhqdq vpunpcklbw vpunpcklwd vpunpckldq vpunpcklqdq vpxor vrcpps vrcpss vrsqrtps vrsqrtss vroundpd vroundps vroundsd vroundss vshufpd vshufps vsqrtpd vsqrtps vsqrtsd vsqrtss vstmxcsr vsubpd vsubps vsubsd vsubss vtestps vtestpd vucomisd vucomiss vunpckhpd vunpckhps vunpcklpd vunpcklps vxorpd vxorps vzeroall vzeroupper pclmullqlqdq pclmulhqlqdq pclmullqhqdq pclmulhqhqdq pclmulqdq vpclmullqlqdq vpclmulhqlqdq vpclmullqhqdq vpclmulhqhqdq vpclmulqdq vfmadd132ps vfmadd132pd vfmadd312ps vfmadd312pd vfmadd213ps vfmadd213pd vfmadd123ps vfmadd123pd vfmadd231ps vfmadd231pd vfmadd321ps vfmadd321pd vfmaddsub132ps vfmaddsub132pd vfmaddsub312ps vfmaddsub312pd vfmaddsub213ps vfmaddsub213pd vfmaddsub123ps vfmaddsub123pd vfmaddsub231ps vfmaddsub231pd vfmaddsub321ps vfmaddsub321pd vfmsub132ps vfmsub132pd vfmsub312ps vfmsub312pd vfmsub213ps vfmsub213pd vfmsub123ps vfmsub123pd vfmsub231ps vfmsub231pd vfmsub321ps vfmsub321pd vfmsubadd132ps vfmsubadd132pd vfmsubadd312ps vfmsubadd312pd vfmsubadd213ps vfmsubadd213pd vfmsubadd123ps vfmsubadd123pd vfmsubadd231ps vfmsubadd231pd vfmsubadd321ps vfmsubadd321pd vfnmadd132ps vfnmadd132pd vfnmadd312ps vfnmadd312pd vfnmadd213ps vfnmadd213pd vfnmadd123ps vfnmadd123pd vfnmadd231ps vfnmadd231pd vfnmadd321ps vfnmadd321pd vfnmsub132ps vfnmsub132pd vfnmsub312ps vfnmsub312pd vfnmsub213ps vfnmsub213pd vfnmsub123ps vfnmsub123pd vfnmsub231ps vfnmsub231pd vfnmsub321ps vfnmsub321pd vfmadd132ss vfmadd132sd vfmadd312ss vfmadd312sd vfmadd213ss vfmadd213sd vfmadd123ss vfmadd123sd vfmadd231ss vfmadd231sd vfmadd321ss vfmadd321sd vfmsub132ss vfmsub132sd vfmsub312ss vfmsub312sd vfmsub213ss vfmsub213sd vfmsub123ss vfmsub123sd vfmsub231ss vfmsub231sd vfmsub321ss vfmsub321sd vfnmadd132ss vfnmadd132sd vfnmadd312ss vfnmadd312sd vfnmadd213ss vfnmadd213sd vfnmadd123ss vfnmadd123sd vfnmadd231ss vfnmadd231sd vfnmadd321ss vfnmadd321sd vfnmsub132ss vfnmsub132sd vfnmsub312ss vfnmsub312sd vfnmsub213ss vfnmsub213sd vfnmsub123ss vfnmsub123sd vfnmsub231ss vfnmsub231sd vfnmsub321ss vfnmsub321sd rdfsbase rdgsbase rdrand wrfsbase wrgsbase vcvtph2ps vcvtps2ph adcx adox rdseed clac stac xstore xcryptecb xcryptcbc xcryptctr xcryptcfb xcryptofb montmul xsha1 xsha256 llwpcb slwpcb lwpval lwpins vfmaddpd vfmaddps vfmaddsd vfmaddss vfmaddsubpd vfmaddsubps vfmsubaddpd vfmsubaddps vfmsubpd vfmsubps vfmsubsd vfmsubss vfnmaddpd vfnmaddps vfnmaddsd vfnmaddss vfnmsubpd vfnmsubps vfnmsubsd vfnmsubss vfrczpd vfrczps vfrczsd vfrczss vpcmov vpcomb vpcomd vpcomq vpcomub vpcomud vpcomuq vpcomuw vpcomw vphaddbd vphaddbq vphaddbw vphadddq vphaddubd vphaddubq vphaddubw vphaddudq vphadduwd vphadduwq vphaddwd vphaddwq vphsubbw vphsubdq vphsubwd vpmacsdd vpmacsdqh vpmacsdql vpmacssdd vpmacssdqh vpmacssdql vpmacsswd vpmacssww vpmacswd vpmacsww vpmadcsswd vpmadcswd vpperm vprotb vprotd vprotq vprotw vpshab vpshad vpshaq vpshaw vpshlb vpshld vpshlq vpshlw vbroadcasti128 vpblendd vpbroadcastb vpbroadcastw vpbroadcastd vpbroadcastq vpermd vpermpd vpermps vpermq vperm2i128 vextracti128 vinserti128 vpmaskmovd vpmaskmovq vpsllvd vpsllvq vpsravd vpsrlvd vpsrlvq vgatherdpd vgatherqpd vgatherdps vgatherqps vpgatherdd vpgatherqd vpgatherdq vpgatherqq xabort xbegin xend xtest andn bextr blci blcic blsi blsic blcfill blsfill blcmsk blsmsk blsr blcs bzhi mulx pdep pext rorx sarx shlx shrx tzcnt tzmsk t1mskc valignd valignq vblendmpd vblendmps vbroadcastf32x4 vbroadcastf64x4 vbroadcasti32x4 vbroadcasti64x4 vcompresspd vcompressps vcvtpd2udq vcvtps2udq vcvtsd2usi vcvtss2usi vcvttpd2udq vcvttps2udq vcvttsd2usi vcvttss2usi vcvtudq2pd vcvtudq2ps vcvtusi2sd vcvtusi2ss vexpandpd vexpandps vextractf32x4 vextractf64x4 vextracti32x4 vextracti64x4 vfixupimmpd vfixupimmps vfixupimmsd vfixupimmss vgetexppd vgetexpps vgetexpsd vgetexpss vgetmantpd vgetmantps vgetmantsd vgetmantss vinsertf32x4 vinsertf64x4 vinserti32x4 vinserti64x4 vmovdqa32 vmovdqa64 vmovdqu32 vmovdqu64 vpabsq vpandd vpandnd vpandnq vpandq vpblendmd vpblendmq vpcmpltd vpcmpled vpcmpneqd vpcmpnltd vpcmpnled vpcmpd vpcmpltq vpcmpleq vpcmpneqq vpcmpnltq vpcmpnleq vpcmpq vpcmpequd vpcmpltud vpcmpleud vpcmpnequd vpcmpnltud vpcmpnleud vpcmpud vpcmpequq vpcmpltuq vpcmpleuq vpcmpnequq vpcmpnltuq vpcmpnleuq vpcmpuq vpcompressd vpcompressq vpermi2d vpermi2pd vpermi2ps vpermi2q vpermt2d vpermt2pd vpermt2ps vpermt2q vpexpandd vpexpandq vpmaxsq vpmaxuq vpminsq vpminuq vpmovdb vpmovdw vpmovqb vpmovqd vpmovqw vpmovsdb vpmovsdw vpmovsqb vpmovsqd vpmovsqw vpmovusdb vpmovusdw vpmovusqb vpmovusqd vpmovusqw vpord vporq vprold vprolq vprolvd vprolvq vprord vprorq vprorvd vprorvq vpscatterdd vpscatterdq vpscatterqd vpscatterqq vpsraq vpsravq vpternlogd vpternlogq vptestmd vptestmq vptestnmd vptestnmq vpxord vpxorq vrcp14pd vrcp14ps vrcp14sd vrcp14ss vrndscalepd vrndscaleps vrndscalesd vrndscaless vrsqrt14pd vrsqrt14ps vrsqrt14sd vrsqrt14ss vscalefpd vscalefps vscalefsd vscalefss vscatterdpd vscatterdps vscatterqpd vscatterqps vshuff32x4 vshuff64x2 vshufi32x4 vshufi64x2 kandnw kandw kmovw knotw kortestw korw kshiftlw kshiftrw kunpckbw kxnorw kxorw vpbroadcastmb2q vpbroadcastmw2d vpconflictd vpconflictq vplzcntd vplzcntq vexp2pd vexp2ps vrcp28pd vrcp28ps vrcp28sd vrcp28ss vrsqrt28pd vrsqrt28ps vrsqrt28sd vrsqrt28ss vgatherpf0dpd vgatherpf0dps vgatherpf0qpd vgatherpf0qps vgatherpf1dpd vgatherpf1dps vgatherpf1qpd vgatherpf1qps vscatterpf0dpd vscatterpf0dps vscatterpf0qpd vscatterpf0qps vscatterpf1dpd vscatterpf1dps vscatterpf1qpd vscatterpf1qps prefetchwt1 bndmk bndcl bndcu bndcn bndmov bndldx bndstx sha1rnds4 sha1nexte sha1msg1 sha1msg2 sha256rnds2 sha256msg1 sha256msg2 hint_nop0 hint_nop1 hint_nop2 hint_nop3 hint_nop4 hint_nop5 hint_nop6 hint_nop7 hint_nop8 hint_nop9 hint_nop10 hint_nop11 hint_nop12 hint_nop13 hint_nop14 hint_nop15 hint_nop16 hint_nop17 hint_nop18 hint_nop19 hint_nop20 hint_nop21 hint_nop22 hint_nop23 hint_nop24 hint_nop25 hint_nop26 hint_nop27 hint_nop28 hint_nop29 hint_nop30 hint_nop31 hint_nop32 hint_nop33 hint_nop34 hint_nop35 hint_nop36 hint_nop37 hint_nop38 hint_nop39 hint_nop40 hint_nop41 hint_nop42 hint_nop43 hint_nop44 hint_nop45 hint_nop46 hint_nop47 hint_nop48 hint_nop49 hint_nop50 hint_nop51 hint_nop52 hint_nop53 hint_nop54 hint_nop55 hint_nop56 hint_nop57 hint_nop58 hint_nop59 hint_nop60 hint_nop61 hint_nop62 hint_nop63",literal:"ip eip rip al ah bl bh cl ch dl dh sil dil bpl spl r8b r9b r10b r11b r12b r13b r14b r15b ax bx cx dx si di bp sp r8w r9w r10w r11w r12w r13w r14w r15w eax ebx ecx edx esi edi ebp esp eip r8d r9d r10d r11d r12d r13d r14d r15d rax rbx rcx rdx rsi rdi rbp rsp r8 r9 r10 r11 r12 r13 r14 r15 cs ds es fs gs ss st st0 st1 st2 st3 st4 st5 st6 st7 mm0 mm1 mm2 mm3 mm4 mm5 mm6 mm7 xmm0  xmm1  xmm2  xmm3  xmm4  xmm5  xmm6  xmm7  xmm8  xmm9 xmm10  xmm11 xmm12 xmm13 xmm14 xmm15 xmm16 xmm17 xmm18 xmm19 xmm20 xmm21 xmm22 xmm23 xmm24 xmm25 xmm26 xmm27 xmm28 xmm29 xmm30 xmm31 ymm0  ymm1  ymm2  ymm3  ymm4  ymm5  ymm6  ymm7  ymm8  ymm9 ymm10  ymm11 ymm12 ymm13 ymm14 ymm15 ymm16 ymm17 ymm18 ymm19 ymm20 ymm21 ymm22 ymm23 ymm24 ymm25 ymm26 ymm27 ymm28 ymm29 ymm30 ymm31 zmm0  zmm1  zmm2  zmm3  zmm4  zmm5  zmm6  zmm7  zmm8  zmm9 zmm10  zmm11 zmm12 zmm13 zmm14 zmm15 zmm16 zmm17 zmm18 zmm19 zmm20 zmm21 zmm22 zmm23 zmm24 zmm25 zmm26 zmm27 zmm28 zmm29 zmm30 zmm31 k0 k1 k2 k3 k4 k5 k6 k7 bnd0 bnd1 bnd2 bnd3 cr0 cr1 cr2 cr3 cr4 cr8 dr0 dr1 dr2 dr3 dr8 tr3 tr4 tr5 tr6 tr7 r0 r1 r2 r3 r4 r5 r6 r7 r0b r1b r2b r3b r4b r5b r6b r7b r0w r1w r2w r3w r4w r5w r6w r7w r0d r1d r2d r3d r4d r5d r6d r7d r0h r1h r2h r3h r0l r1l r2l r3l r4l r5l r6l r7l r8l r9l r10l r11l r12l r13l r14l r15l",pseudo:"db dw dd dq dt ddq do dy dz resb resw resd resq rest resdq reso resy resz incbin equ times",preprocessor:"%define %xdefine %+ %undef %defstr %deftok %assign %strcat %strlen %substr %rotate %elif %else %endif %ifmacro %ifctx %ifidn %ifidni %ifid %ifnum %ifstr %iftoken %ifempty %ifenv %error %warning %fatal %rep %endrep %include %push %pop %repl %pathsearch %depend %use %arg %stacksize %local %line %comment %endcomment .nolist byte word dword qword nosplit rel abs seg wrt strict near far a32 ptr __FILE__ __LINE__ __SECT__  __BITS__ __OUTPUT_FORMAT__ __DATE__ __TIME__ __DATE_NUM__ __TIME_NUM__ __UTC_DATE__ __UTC_TIME__ __UTC_DATE_NUM__ __UTC_TIME_NUM__  __PASS__ struc endstruc istruc at iend align alignb sectalign daz nodaz up down zero default option assume public ",built_in:"bits use16 use32 use64 default section segment absolute extern global common cpu float __utf16__ __utf16le__ __utf16be__ __utf32__ __utf32le__ __utf32be__ __float8__ __float16__ __float32__ __float64__ __float80m__ __float80e__ __float128l__ __float128h__ __Infinity__ __QNaN__ __SNaN__ Inf NaN QNaN SNaN float8 float16 float32 float64 float80m float80e float128l float128h __FLOAT_DAZ__ __FLOAT_ROUND__ __FLOAT__"},contains:[e.COMMENT(";","$",{relevance:0}),{className:"number",variants:[{begin:"\\b(?:([0-9][0-9_]*)?\\.[0-9_]*(?:[eE][+-]?[0-9_]+)?|(0[Xx])?[0-9][0-9_]*\\.?[0-9_]*(?:[pP](?:[+-]?[0-9_]+)?)?)\\b",relevance:0},{begin:"\\$[0-9][0-9A-Fa-f]*",relevance:0},{begin:"\\b(?:[0-9A-Fa-f][0-9A-Fa-f_]*[Hh]|[0-9][0-9_]*[DdTt]?|[0-7][0-7_]*[QqOo]|[0-1][0-1_]*[BbYy])\\b"},{begin:"\\b(?:0[Xx][0-9A-Fa-f_]+|0[DdTt][0-9_]+|0[QqOo][0-7_]+|0[BbYy][0-1_]+)\\b"}]},e.QUOTE_STRING_MODE,{className:"string",variants:[{begin:"'",end:"[^\\\\]'"},{begin:"`",end:"[^\\\\]`"},{begin:"\\.[A-Za-z0-9]+"}],relevance:0},{className:"label",variants:[{begin:"^\\s*[A-Za-z._?][A-Za-z0-9_$#@~.?]*(:|\\s+label)"},{begin:"^\\s*%%[A-Za-z0-9_$#@~.?]*:"}],relevance:0},{className:"argument",begin:"%[0-9]+",relevance:0},{className:"built_in",begin:"%!S+",relevance:0}]}}),i.registerLanguage("xl",function(e){var t="ObjectLoader Animate MovieCredits Slides Filters Shading Materials LensFlare Mapping VLCAudioVideo StereoDecoder PointCloud NetworkAccess RemoteControl RegExp ChromaKey Snowfall NodeJS Speech Charts",n={className:"string",begin:'"',end:'"',illegal:"\\n"},r={className:"import",beginKeywords:"import",end:"$",keywords:{keyword:"import",module:t},relevance:0,contains:[n]};return{aliases:["tao"],lexemes:/[a-zA-Z][a-zA-Z0-9_?]*/,keywords:{keyword:"if then else do while until for loop import with is as where when by data constant",literal:"true false nil",type:"integer real text name boolean symbol infix prefix postfix block tree",built_in:"in mod rem and or xor not abs sign floor ceil sqrt sin cos tan asin acos atan exp expm1 log log2 log10 log1p pi at",module:t,id:"text_length text_range text_find text_replace contains page slide basic_slide title_slide title subtitle fade_in fade_out fade_at clear_color color line_color line_width texture_wrap texture_transform texture scale_?x scale_?y scale_?z? translate_?x translate_?y translate_?z? rotate_?x rotate_?y rotate_?z? rectangle circle ellipse sphere path line_to move_to quad_to curve_to theme background contents locally time mouse_?x mouse_?y mouse_buttons"},contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,n,{className:"string",begin:"'",end:"'",illegal:"\\n"},{className:"string",begin:"<<",end:">>"},{className:"function",begin:"[a-z].*->"},r,{className:"constant",begin:"[A-Z][A-Z_0-9]+",relevance:0},{className:"variable",begin:"([A-Z][a-z_0-9]+)+",relevance:0},{className:"id",begin:"[a-z][a-z_0-9]+",relevance:0},{className:"number",begin:"[0-9]+#[0-9A-Z_]+(\\.[0-9-A-Z_]+)?#?([Ee][+-]?[0-9]+)?",relevance:10},e.NUMBER_MODE]}}),i.registerLanguage("xquery",function(e){var t={begin:"{",end:"}"},n=[{className:"variable",begin:/\$[a-zA-Z0-9\-]+/,relevance:5},{className:"string",variants:[{begin:/"/,end:/"/,contains:[{begin:/""/,relevance:0}]},{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]}]},{className:"number",begin:"(\\b0[0-7_]+)|(\\b0x[0-9a-fA-F_]+)|(\\b[1-9][0-9_]*(\\.[0-9_]+)?)|[0_]\\b",relevance:0},{className:"comment",begin:"\\(:",end:":\\)",relevance:10,contains:[{className:"doc",begin:"@\\w+"}]},{className:"decorator",begin:"%\\w+"},t];return{aliases:["xpath","xq"],case_insensitive:!1,lexemes:/[a-zA-Z\$][a-zA-Z0-9_:\-]*/,illegal:/(proc)|(abstract)|(extends)|(until)|(#)/,keywords:{keyword:"for let if while then else return where group by xquery encoding versionmodule namespace boundary-space preserve strip default collation base-uri orderingcopy-namespaces order declare import schema namespace function option in allowing emptyat tumbling window sliding window start when only end when previous next stable ascendingdescending empty greatest least some every satisfies switch case typeswitch try catch andor to union intersect instance of treat as castable cast map array delete insert intoreplace value rename copy modify update",literal:"false true xs:string xs:integer element item xs:date xs:datetime xs:float xs:double xs:decimal QName xs:anyURI xs:long xs:int xs:short xs:byte attribute"},contains:t.contains=n}}),i.registerLanguage("zephir",function(e){var t={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:'b"',end:'"'},{begin:"b'",end:"'"},e.inherit(e.APOS_STRING_MODE,{illegal:null}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null})]},n={variants:[e.BINARY_NUMBER_MODE,e.C_NUMBER_MODE]};return{aliases:["zep"],case_insensitive:!0,keywords:"and include_once list abstract global private echo interface as static endswitch array null if endwhile or const for endforeach self var let while isset public protected exit foreach throw elseif include __FILE__ empty require_once do xor return parent clone use __CLASS__ __LINE__ else break print eval new catch __METHOD__ case exception default die require __FUNCTION__ enddeclare final try switch continue endfor endif declare unset true false trait goto instanceof insteadof __DIR__ __NAMESPACE__ yield finally int uint long ulong char uchar double float bool boolean stringlikely unlikely",contains:[e.C_LINE_COMMENT_MODE,e.HASH_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.COMMENT("__halt_compiler.+?;",!1,{endsWithParent:!0,keywords:"__halt_compiler",lexemes:e.UNDERSCORE_IDENT_RE}),{className:"string",begin:"<<<['\"]?\\w+['\"]?$",end:"^\\w+;",contains:[e.BACKSLASH_ESCAPE]},{begin:/(::|->)+[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/},{className:"function",beginKeywords:"function",end:/[;{]/,excludeEnd:!0,illegal:"\\$|\\[|%",contains:[e.UNDERSCORE_TITLE_MODE,{className:"params",begin:"\\(",end:"\\)",contains:["self",e.C_BLOCK_COMMENT_MODE,t,n]}]},{className:"class",beginKeywords:"class interface",end:"{",excludeEnd:!0,illegal:/[:\(\$"]/,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",end:";",illegal:/[\.']/,contains:[e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"use",end:";",contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"=>"},t,n]}}),i}),function(e,t){"function"==typeof define&&define.amd?define(t):"object"==typeof module&&module.exports?module.exports=t():e.EvEmitter=t()}("undefined"!=typeof window?window:this,function(){"use strict";function e(){}var t=e.prototype;return t.on=function(e,t){if(e&&t){var n=this._events=this._events||{},r=n[e]=n[e]||[];return-1==r.indexOf(t)&&r.push(t),this}},t.once=function(e,t){if(e&&t){this.on(e,t);var n=this._onceEvents=this._onceEvents||{};return(n[e]=n[e]||{})[t]=!0,this}},t.off=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var r=n.indexOf(t);return-1!=r&&n.splice(r,1),this}},t.emitEvent=function(e,t){var n=this._events&&this._events[e];if(n&&n.length){var r=0,i=n[r];t=t||[];for(var a=this._onceEvents&&this._onceEvents[e];i;){var o=a&&a[i];o&&(this.off(e,i),delete a[i]),i.apply(this,t),i=n[r+=o?0:1]}return this}},e}),function(t,n){"use strict";"function"==typeof define&&define.amd?define(["ev-emitter/ev-emitter"],function(e){return n(t,e)}):"object"==typeof module&&module.exports?module.exports=n(t,require("ev-emitter")):t.imagesLoaded=n(t,t.EvEmitter)}(window,function(t,e){"use strict";var r=t.jQuery,i=t.console;function a(e,t){for(var n in t)e[n]=t[n];return e}function o(e,t,n){if(!(this instanceof o))return new o(e,t,n);"string"==typeof e&&(e=document.querySelectorAll(e)),this.elements=function(e){var t=[];if(Array.isArray(e))t=e;else if("number"==typeof e.length)for(var n=0;n<e.length;n++)t.push(e[n]);else t.push(e);return t}(e),this.options=a({},this.options),"function"==typeof t?n=t:a(this.options,t),n&&this.on("always",n),this.getImages(),r&&(this.jqDeferred=new r.Deferred),setTimeout(function(){this.check()}.bind(this))}(o.prototype=Object.create(e.prototype)).options={},o.prototype.getImages=function(){this.images=[],this.elements.forEach(this.addElementImages,this)},o.prototype.addElementImages=function(e){"IMG"==e.nodeName&&this.addImage(e),!0===this.options.background&&this.addElementBackgroundImages(e);var t=e.nodeType;if(t&&s[t]){for(var n=e.querySelectorAll("img"),r=0;r<n.length;r++){var i=n[r];this.addImage(i)}if("string"==typeof this.options.background){var a=e.querySelectorAll(this.options.background);for(r=0;r<a.length;r++){var o=a[r];this.addElementBackgroundImages(o)}}}};var s={1:!0,9:!0,11:!0};function n(e){this.img=e}function c(e,t){this.url=e,this.element=t,this.img=new Image}return o.prototype.addElementBackgroundImages=function(e){var t=getComputedStyle(e);if(t)for(var n=/url\((['"])?(.*?)\1\)/gi,r=n.exec(t.backgroundImage);null!==r;){var i=r&&r[2];i&&this.addBackground(i,e),r=n.exec(t.backgroundImage)}},o.prototype.addImage=function(e){var t=new n(e);this.images.push(t)},o.prototype.addBackground=function(e,t){var n=new c(e,t);this.images.push(n)},o.prototype.check=function(){var r=this;function t(e,t,n){setTimeout(function(){r.progress(e,t,n)})}this.progressedCount=0,this.hasAnyBroken=!1,this.images.length?this.images.forEach(function(e){e.once("progress",t),e.check()}):this.complete()},o.prototype.progress=function(e,t,n){this.progressedCount++,this.hasAnyBroken=this.hasAnyBroken||!e.isLoaded,this.emitEvent("progress",[this,e,t]),this.jqDeferred&&this.jqDeferred.notify&&this.jqDeferred.notify(this,e),this.progressedCount==this.images.length&&this.complete(),this.options.debug&&i&&i.log("progress: "+n,e,t)},o.prototype.complete=function(){var e=this.hasAnyBroken?"fail":"done";if(this.isComplete=!0,this.emitEvent(e,[this]),this.emitEvent("always",[this]),this.jqDeferred){var t=this.hasAnyBroken?"reject":"resolve";this.jqDeferred[t](this)}},(n.prototype=Object.create(e.prototype)).check=function(){this.getIsImageComplete()?this.confirm(0!==this.img.naturalWidth,"naturalWidth"):(this.proxyImage=new Image,this.proxyImage.addEventListener("load",this),this.proxyImage.addEventListener("error",this),this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.proxyImage.src=this.img.src)},n.prototype.getIsImageComplete=function(){return this.img.complete&&void 0!==this.img.naturalWidth},n.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.img,t])},n.prototype.handleEvent=function(e){var t="on"+e.type;this[t]&&this[t](e)},n.prototype.onload=function(){this.confirm(!0,"onload"),this.unbindEvents()},n.prototype.onerror=function(){this.confirm(!1,"onerror"),this.unbindEvents()},n.prototype.unbindEvents=function(){this.proxyImage.removeEventListener("load",this),this.proxyImage.removeEventListener("error",this),this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},(c.prototype=Object.create(n.prototype)).check=function(){this.img.addEventListener("load",this),this.img.addEventListener("error",this),this.img.src=this.url,this.getIsImageComplete()&&(this.confirm(0!==this.img.naturalWidth,"naturalWidth"),this.unbindEvents())},c.prototype.unbindEvents=function(){this.img.removeEventListener("load",this),this.img.removeEventListener("error",this)},c.prototype.confirm=function(e,t){this.isLoaded=e,this.emitEvent("progress",[this,this.element,t])},o.makeJQueryPlugin=function(e){(e=e||t.jQuery)&&((r=e).fn.imagesLoaded=function(e,t){return new o(this,e,t).jqDeferred.promise(r(this))})},o.makeJQueryPlugin(),o}),function(e){function t(e,t){if(!(1<e.originalEvent.touches.length)){e.preventDefault();var n=e.originalEvent.changedTouches[0],r=document.createEvent("MouseEvents");r.initMouseEvent(t,!0,!0,window,1,n.screenX,n.screenY,n.clientX,n.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(r)}}if(e.support.touch="ontouchend"in document,e.support.touch){var n,r=e.ui.mouse.prototype,i=r._mouseInit,a=r._mouseDestroy;r._touchStart=function(e){!n&&this._mouseCapture(e.originalEvent.changedTouches[0])&&(n=!0,this._touchMoved=!1,t(e,"mouseover"),t(e,"mousemove"),t(e,"mousedown"))},r._touchMove=function(e){n&&(this._touchMoved=!0,t(e,"mousemove"))},r._touchEnd=function(e){n&&(t(e,"mouseup"),t(e,"mouseout"),this._touchMoved||t(e,"click"),n=!1)},r._mouseInit=function(){this.element.bind({touchstart:e.proxy(this,"_touchStart"),touchmove:e.proxy(this,"_touchMove"),touchend:e.proxy(this,"_touchEnd")}),i.call(this)},r._mouseDestroy=function(){this.element.unbind({touchstart:e.proxy(this,"_touchStart"),touchmove:e.proxy(this,"_touchMove"),touchend:e.proxy(this,"_touchEnd")}),a.call(this)}}}(jQuery),function(e,f){(function(e){if(typeof module!=="undefined"&&module.exports){return function(e){module.exports=e()}}else if(typeof define==="function"&&define.amd){return define}else if(typeof window!=="undefined"){return function(e){window.MobileDetect=e()}}else{throw new Error("unknown environment")}})()(function(){"use strict";var s,c={mobileDetectRules:{phones:{iPhone:"\\biPhone\\b|\\biPod\\b",BlackBerry:"BlackBerry|\\bBB10\\b|rim[0-9]+",HTC:"HTC|HTC.*(Sensation|Evo|Vision|Explorer|6800|8100|8900|A7272|S510e|C110e|Legend|Desire|T8282)|APX515CKT|Qtek9090|APA9292KT|HD_mini|Sensation.*Z710e|PG86100|Z715e|Desire.*(A8181|HD)|ADR6200|ADR6400L|ADR6425|001HT|Inspire 4G|Android.*\\bEVO\\b|T-Mobile G1|Z520m",Nexus:"Nexus One|Nexus S|Galaxy.*Nexus|Android.*Nexus.*Mobile|Nexus 4|Nexus 5|Nexus 6",Dell:"Dell.*Streak|Dell.*Aero|Dell.*Venue|DELL.*Venue Pro|Dell Flash|Dell Smoke|Dell Mini 3iX|XCD28|XCD35|\\b001DL\\b|\\b101DL\\b|\\bGS01\\b",Motorola:"Motorola|DROIDX|DROID BIONIC|\\bDroid\\b.*Build|Android.*Xoom|HRI39|MOT-|A1260|A1680|A555|A853|A855|A953|A955|A956|Motorola.*ELECTRIFY|Motorola.*i1|i867|i940|MB200|MB300|MB501|MB502|MB508|MB511|MB520|MB525|MB526|MB611|MB612|MB632|MB810|MB855|MB860|MB861|MB865|MB870|ME501|ME502|ME511|ME525|ME600|ME632|ME722|ME811|ME860|ME863|ME865|MT620|MT710|MT716|MT720|MT810|MT870|MT917|Motorola.*TITANIUM|WX435|WX445|XT300|XT301|XT311|XT316|XT317|XT319|XT320|XT390|XT502|XT530|XT531|XT532|XT535|XT603|XT610|XT611|XT615|XT681|XT701|XT702|XT711|XT720|XT800|XT806|XT860|XT862|XT875|XT882|XT883|XT894|XT901|XT907|XT909|XT910|XT912|XT928|XT926|XT915|XT919|XT925|XT1021|\\bMoto E\\b",Samsung:"Samsung|SM-G9250|GT-19300|SGH-I337|BGT-S5230|GT-B2100|GT-B2700|GT-B2710|GT-B3210|GT-B3310|GT-B3410|GT-B3730|GT-B3740|GT-B5510|GT-B5512|GT-B5722|GT-B6520|GT-B7300|GT-B7320|GT-B7330|GT-B7350|GT-B7510|GT-B7722|GT-B7800|GT-C3010|GT-C3011|GT-C3060|GT-C3200|GT-C3212|GT-C3212I|GT-C3262|GT-C3222|GT-C3300|GT-C3300K|GT-C3303|GT-C3303K|GT-C3310|GT-C3322|GT-C3330|GT-C3350|GT-C3500|GT-C3510|GT-C3530|GT-C3630|GT-C3780|GT-C5010|GT-C5212|GT-C6620|GT-C6625|GT-C6712|GT-E1050|GT-E1070|GT-E1075|GT-E1080|GT-E1081|GT-E1085|GT-E1087|GT-E1100|GT-E1107|GT-E1110|GT-E1120|GT-E1125|GT-E1130|GT-E1160|GT-E1170|GT-E1175|GT-E1180|GT-E1182|GT-E1200|GT-E1210|GT-E1225|GT-E1230|GT-E1390|GT-E2100|GT-E2120|GT-E2121|GT-E2152|GT-E2220|GT-E2222|GT-E2230|GT-E2232|GT-E2250|GT-E2370|GT-E2550|GT-E2652|GT-E3210|GT-E3213|GT-I5500|GT-I5503|GT-I5700|GT-I5800|GT-I5801|GT-I6410|GT-I6420|GT-I7110|GT-I7410|GT-I7500|GT-I8000|GT-I8150|GT-I8160|GT-I8190|GT-I8320|GT-I8330|GT-I8350|GT-I8530|GT-I8700|GT-I8703|GT-I8910|GT-I9000|GT-I9001|GT-I9003|GT-I9010|GT-I9020|GT-I9023|GT-I9070|GT-I9082|GT-I9100|GT-I9103|GT-I9220|GT-I9250|GT-I9300|GT-I9305|GT-I9500|GT-I9505|GT-M3510|GT-M5650|GT-M7500|GT-M7600|GT-M7603|GT-M8800|GT-M8910|GT-N7000|GT-S3110|GT-S3310|GT-S3350|GT-S3353|GT-S3370|GT-S3650|GT-S3653|GT-S3770|GT-S3850|GT-S5210|GT-S5220|GT-S5229|GT-S5230|GT-S5233|GT-S5250|GT-S5253|GT-S5260|GT-S5263|GT-S5270|GT-S5300|GT-S5330|GT-S5350|GT-S5360|GT-S5363|GT-S5369|GT-S5380|GT-S5380D|GT-S5560|GT-S5570|GT-S5600|GT-S5603|GT-S5610|GT-S5620|GT-S5660|GT-S5670|GT-S5690|GT-S5750|GT-S5780|GT-S5830|GT-S5839|GT-S6102|GT-S6500|GT-S7070|GT-S7200|GT-S7220|GT-S7230|GT-S7233|GT-S7250|GT-S7500|GT-S7530|GT-S7550|GT-S7562|GT-S7710|GT-S8000|GT-S8003|GT-S8500|GT-S8530|GT-S8600|SCH-A310|SCH-A530|SCH-A570|SCH-A610|SCH-A630|SCH-A650|SCH-A790|SCH-A795|SCH-A850|SCH-A870|SCH-A890|SCH-A930|SCH-A950|SCH-A970|SCH-A990|SCH-I100|SCH-I110|SCH-I400|SCH-I405|SCH-I500|SCH-I510|SCH-I515|SCH-I600|SCH-I730|SCH-I760|SCH-I770|SCH-I830|SCH-I910|SCH-I920|SCH-I959|SCH-LC11|SCH-N150|SCH-N300|SCH-R100|SCH-R300|SCH-R351|SCH-R400|SCH-R410|SCH-T300|SCH-U310|SCH-U320|SCH-U350|SCH-U360|SCH-U365|SCH-U370|SCH-U380|SCH-U410|SCH-U430|SCH-U450|SCH-U460|SCH-U470|SCH-U490|SCH-U540|SCH-U550|SCH-U620|SCH-U640|SCH-U650|SCH-U660|SCH-U700|SCH-U740|SCH-U750|SCH-U810|SCH-U820|SCH-U900|SCH-U940|SCH-U960|SCS-26UC|SGH-A107|SGH-A117|SGH-A127|SGH-A137|SGH-A157|SGH-A167|SGH-A177|SGH-A187|SGH-A197|SGH-A227|SGH-A237|SGH-A257|SGH-A437|SGH-A517|SGH-A597|SGH-A637|SGH-A657|SGH-A667|SGH-A687|SGH-A697|SGH-A707|SGH-A717|SGH-A727|SGH-A737|SGH-A747|SGH-A767|SGH-A777|SGH-A797|SGH-A817|SGH-A827|SGH-A837|SGH-A847|SGH-A867|SGH-A877|SGH-A887|SGH-A897|SGH-A927|SGH-B100|SGH-B130|SGH-B200|SGH-B220|SGH-C100|SGH-C110|SGH-C120|SGH-C130|SGH-C140|SGH-C160|SGH-C170|SGH-C180|SGH-C200|SGH-C207|SGH-C210|SGH-C225|SGH-C230|SGH-C417|SGH-C450|SGH-D307|SGH-D347|SGH-D357|SGH-D407|SGH-D415|SGH-D780|SGH-D807|SGH-D980|SGH-E105|SGH-E200|SGH-E315|SGH-E316|SGH-E317|SGH-E335|SGH-E590|SGH-E635|SGH-E715|SGH-E890|SGH-F300|SGH-F480|SGH-I200|SGH-I300|SGH-I320|SGH-I550|SGH-I577|SGH-I600|SGH-I607|SGH-I617|SGH-I627|SGH-I637|SGH-I677|SGH-I700|SGH-I717|SGH-I727|SGH-i747M|SGH-I777|SGH-I780|SGH-I827|SGH-I847|SGH-I857|SGH-I896|SGH-I897|SGH-I900|SGH-I907|SGH-I917|SGH-I927|SGH-I937|SGH-I997|SGH-J150|SGH-J200|SGH-L170|SGH-L700|SGH-M110|SGH-M150|SGH-M200|SGH-N105|SGH-N500|SGH-N600|SGH-N620|SGH-N625|SGH-N700|SGH-N710|SGH-P107|SGH-P207|SGH-P300|SGH-P310|SGH-P520|SGH-P735|SGH-P777|SGH-Q105|SGH-R210|SGH-R220|SGH-R225|SGH-S105|SGH-S307|SGH-T109|SGH-T119|SGH-T139|SGH-T209|SGH-T219|SGH-T229|SGH-T239|SGH-T249|SGH-T259|SGH-T309|SGH-T319|SGH-T329|SGH-T339|SGH-T349|SGH-T359|SGH-T369|SGH-T379|SGH-T409|SGH-T429|SGH-T439|SGH-T459|SGH-T469|SGH-T479|SGH-T499|SGH-T509|SGH-T519|SGH-T539|SGH-T559|SGH-T589|SGH-T609|SGH-T619|SGH-T629|SGH-T639|SGH-T659|SGH-T669|SGH-T679|SGH-T709|SGH-T719|SGH-T729|SGH-T739|SGH-T746|SGH-T749|SGH-T759|SGH-T769|SGH-T809|SGH-T819|SGH-T839|SGH-T919|SGH-T929|SGH-T939|SGH-T959|SGH-T989|SGH-U100|SGH-U200|SGH-U800|SGH-V205|SGH-V206|SGH-X100|SGH-X105|SGH-X120|SGH-X140|SGH-X426|SGH-X427|SGH-X475|SGH-X495|SGH-X497|SGH-X507|SGH-X600|SGH-X610|SGH-X620|SGH-X630|SGH-X700|SGH-X820|SGH-X890|SGH-Z130|SGH-Z150|SGH-Z170|SGH-ZX10|SGH-ZX20|SHW-M110|SPH-A120|SPH-A400|SPH-A420|SPH-A460|SPH-A500|SPH-A560|SPH-A600|SPH-A620|SPH-A660|SPH-A700|SPH-A740|SPH-A760|SPH-A790|SPH-A800|SPH-A820|SPH-A840|SPH-A880|SPH-A900|SPH-A940|SPH-A960|SPH-D600|SPH-D700|SPH-D710|SPH-D720|SPH-I300|SPH-I325|SPH-I330|SPH-I350|SPH-I500|SPH-I600|SPH-I700|SPH-L700|SPH-M100|SPH-M220|SPH-M240|SPH-M300|SPH-M305|SPH-M320|SPH-M330|SPH-M350|SPH-M360|SPH-M370|SPH-M380|SPH-M510|SPH-M540|SPH-M550|SPH-M560|SPH-M570|SPH-M580|SPH-M610|SPH-M620|SPH-M630|SPH-M800|SPH-M810|SPH-M850|SPH-M900|SPH-M910|SPH-M920|SPH-M930|SPH-N100|SPH-N200|SPH-N240|SPH-N300|SPH-N400|SPH-Z400|SWC-E100|SCH-i909|GT-N7100|GT-N7105|SCH-I535|SM-N900A|SGH-I317|SGH-T999L|GT-S5360B|GT-I8262|GT-S6802|GT-S6312|GT-S6310|GT-S5312|GT-S5310|GT-I9105|GT-I8510|GT-S6790N|SM-G7105|SM-N9005|GT-S5301|GT-I9295|GT-I9195|SM-C101|GT-S7392|GT-S7560|GT-B7610|GT-I5510|GT-S7582|GT-S7530E|GT-I8750|SM-G9006V|SM-G9008V|SM-G9009D|SM-G900A|SM-G900D|SM-G900F|SM-G900H|SM-G900I|SM-G900J|SM-G900K|SM-G900L|SM-G900M|SM-G900P|SM-G900R4|SM-G900S|SM-G900T|SM-G900V|SM-G900W8|SHV-E160K|SCH-P709|SCH-P729|SM-T2558|GT-I9205|SM-G9350",LG:"\\bLG\\b;|LG[- ]?(C800|C900|E400|E610|E900|E-900|F160|F180K|F180L|F180S|730|855|L160|LS740|LS840|LS970|LU6200|MS690|MS695|MS770|MS840|MS870|MS910|P500|P700|P705|VM696|AS680|AS695|AX840|C729|E970|GS505|272|C395|E739BK|E960|L55C|L75C|LS696|LS860|P769BK|P350|P500|P509|P870|UN272|US730|VS840|VS950|LN272|LN510|LS670|LS855|LW690|MN270|MN510|P509|P769|P930|UN200|UN270|UN510|UN610|US670|US740|US760|UX265|UX840|VN271|VN530|VS660|VS700|VS740|VS750|VS910|VS920|VS930|VX9200|VX11000|AX840A|LW770|P506|P925|P999|E612|D955|D802|MS323)",Sony:"SonyST|SonyLT|SonyEricsson|SonyEricssonLT15iv|LT18i|E10i|LT28h|LT26w|SonyEricssonMT27i|C5303|C6902|C6903|C6906|C6943|D2533",Asus:"Asus.*Galaxy|PadFone.*Mobile",Micromax:"Micromax.*\\b(A210|A92|A88|A72|A111|A110Q|A115|A116|A110|A90S|A26|A51|A35|A54|A25|A27|A89|A68|A65|A57|A90)\\b",Palm:"PalmSource|Palm",Vertu:"Vertu|Vertu.*Ltd|Vertu.*Ascent|Vertu.*Ayxta|Vertu.*Constellation(F|Quest)?|Vertu.*Monika|Vertu.*Signature",Pantech:"PANTECH|IM-A850S|IM-A840S|IM-A830L|IM-A830K|IM-A830S|IM-A820L|IM-A810K|IM-A810S|IM-A800S|IM-T100K|IM-A725L|IM-A780L|IM-A775C|IM-A770K|IM-A760S|IM-A750K|IM-A740S|IM-A730S|IM-A720L|IM-A710K|IM-A690L|IM-A690S|IM-A650S|IM-A630K|IM-A600S|VEGA PTL21|PT003|P8010|ADR910L|P6030|P6020|P9070|P4100|P9060|P5000|CDM8992|TXT8045|ADR8995|IS11PT|P2030|P6010|P8000|PT002|IS06|CDM8999|P9050|PT001|TXT8040|P2020|P9020|P2000|P7040|P7000|C790",Fly:"IQ230|IQ444|IQ450|IQ440|IQ442|IQ441|IQ245|IQ256|IQ236|IQ255|IQ235|IQ245|IQ275|IQ240|IQ285|IQ280|IQ270|IQ260|IQ250",Wiko:"KITE 4G|HIGHWAY|GETAWAY|STAIRWAY|DARKSIDE|DARKFULL|DARKNIGHT|DARKMOON|SLIDE|WAX 4G|RAINBOW|BLOOM|SUNSET|GOA|LENNY|BARRY|IGGY|OZZY|CINK FIVE|CINK PEAX|CINK PEAX 2|CINK SLIM|CINK SLIM 2|CINK +|CINK KING|CINK PEAX|CINK SLIM|SUBLIM",iMobile:"i-mobile (IQ|i-STYLE|idea|ZAA|Hitz)",SimValley:"\\b(SP-80|XT-930|SX-340|XT-930|SX-310|SP-360|SP60|SPT-800|SP-120|SPT-800|SP-140|SPX-5|SPX-8|SP-100|SPX-8|SPX-12)\\b",Wolfgang:"AT-B24D|AT-AS50HD|AT-AS40W|AT-AS55HD|AT-AS45q2|AT-B26D|AT-AS50Q",Alcatel:"Alcatel",Nintendo:"Nintendo 3DS",Amoi:"Amoi",INQ:"INQ",GenericPhone:"Tapatalk|PDA;|SAGEM|\\bmmp\\b|pocket|\\bpsp\\b|symbian|Smartphone|smartfon|treo|up.browser|up.link|vodafone|\\bwap\\b|nokia|Series40|Series60|S60|SonyEricsson|N900|MAUI.*WAP.*Browser"},tablets:{iPad:"iPad|iPad.*Mobile",NexusTablet:"Android.*Nexus[\\s]+(7|9|10)",SamsungTablet:"SAMSUNG.*Tablet|Galaxy.*Tab|SC-01C|GT-P1000|GT-P1003|GT-P1010|GT-P3105|GT-P6210|GT-P6800|GT-P6810|GT-P7100|GT-P7300|GT-P7310|GT-P7500|GT-P7510|SCH-I800|SCH-I815|SCH-I905|SGH-I957|SGH-I987|SGH-T849|SGH-T859|SGH-T869|SPH-P100|GT-P3100|GT-P3108|GT-P3110|GT-P5100|GT-P5110|GT-P6200|GT-P7320|GT-P7511|GT-N8000|GT-P8510|SGH-I497|SPH-P500|SGH-T779|SCH-I705|SCH-I915|GT-N8013|GT-P3113|GT-P5113|GT-P8110|GT-N8010|GT-N8005|GT-N8020|GT-P1013|GT-P6201|GT-P7501|GT-N5100|GT-N5105|GT-N5110|SHV-E140K|SHV-E140L|SHV-E140S|SHV-E150S|SHV-E230K|SHV-E230L|SHV-E230S|SHW-M180K|SHW-M180L|SHW-M180S|SHW-M180W|SHW-M300W|SHW-M305W|SHW-M380K|SHW-M380S|SHW-M380W|SHW-M430W|SHW-M480K|SHW-M480S|SHW-M480W|SHW-M485W|SHW-M486W|SHW-M500W|GT-I9228|SCH-P739|SCH-I925|GT-I9200|GT-P5200|GT-P5210|GT-P5210X|SM-T311|SM-T310|SM-T310X|SM-T210|SM-T210R|SM-T211|SM-P600|SM-P601|SM-P605|SM-P900|SM-P901|SM-T217|SM-T217A|SM-T217S|SM-P6000|SM-T3100|SGH-I467|XE500|SM-T110|GT-P5220|GT-I9200X|GT-N5110X|GT-N5120|SM-P905|SM-T111|SM-T2105|SM-T315|SM-T320|SM-T320X|SM-T321|SM-T520|SM-T525|SM-T530NU|SM-T230NU|SM-T330NU|SM-T900|XE500T1C|SM-P605V|SM-P905V|SM-T337V|SM-T537V|SM-T707V|SM-T807V|SM-P600X|SM-P900X|SM-T210X|SM-T230|SM-T230X|SM-T325|GT-P7503|SM-T531|SM-T330|SM-T530|SM-T705|SM-T705C|SM-T535|SM-T331|SM-T800|SM-T700|SM-T537|SM-T807|SM-P907A|SM-T337A|SM-T537A|SM-T707A|SM-T807A|SM-T237|SM-T807P|SM-P607T|SM-T217T|SM-T337T|SM-T807T|SM-T116NQ|SM-P550|SM-T350|SM-T550|SM-T9000|SM-P9000|SM-T705Y|SM-T805|GT-P3113|SM-T710|SM-T810|SM-T815|SM-T360|SM-T533|SM-T113|SM-T335|SM-T715|SM-T560|SM-T670|SM-T677|SM-T377|SM-T567|SM-T357T|SM-T555|SM-T561",Kindle:"Kindle|Silk.*Accelerated|Android.*\\b(KFOT|KFTT|KFJWI|KFJWA|KFOTE|KFSOWI|KFTHWI|KFTHWA|KFAPWI|KFAPWA|WFJWAE|KFSAWA|KFSAWI|KFASWI)\\b",SurfaceTablet:"Windows NT [0-9.]+; ARM;.*(Tablet|ARMBJS)",HPTablet:"HP Slate (7|8|10)|HP ElitePad 900|hp-tablet|EliteBook.*Touch|HP 8|Slate 21|HP SlateBook 10",AsusTablet:"^.*PadFone((?!Mobile).)*$|Transformer|TF101|TF101G|TF300T|TF300TG|TF300TL|TF700T|TF700KL|TF701T|TF810C|ME171|ME301T|ME302C|ME371MG|ME370T|ME372MG|ME172V|ME173X|ME400C|Slider SL101|\\bK00F\\b|\\bK00C\\b|\\bK00E\\b|\\bK00L\\b|TX201LA|ME176C|ME102A|\\bM80TA\\b|ME372CL|ME560CG|ME372CG|ME302KL| K010 | K017 |ME572C|ME103K|ME170C|ME171C|\\bME70C\\b|ME581C|ME581CL|ME8510C|ME181C",BlackBerryTablet:"PlayBook|RIM Tablet",HTCtablet:"HTC_Flyer_P512|HTC Flyer|HTC Jetstream|HTC-P715a|HTC EVO View 4G|PG41200|PG09410",MotorolaTablet:"xoom|sholest|MZ615|MZ605|MZ505|MZ601|MZ602|MZ603|MZ604|MZ606|MZ607|MZ608|MZ609|MZ615|MZ616|MZ617",NookTablet:"Android.*Nook|NookColor|nook browser|BNRV200|BNRV200A|BNTV250|BNTV250A|BNTV400|BNTV600|LogicPD Zoom2",AcerTablet:"Android.*; \\b(A100|A101|A110|A200|A210|A211|A500|A501|A510|A511|A700|A701|W500|W500P|W501|W501P|W510|W511|W700|G100|G100W|B1-A71|B1-710|B1-711|A1-810|A1-811|A1-830)\\b|W3-810|\\bA3-A10\\b|\\bA3-A11\\b",ToshibaTablet:"Android.*(AT100|AT105|AT200|AT205|AT270|AT275|AT300|AT305|AT1S5|AT500|AT570|AT700|AT830)|TOSHIBA.*FOLIO",LGTablet:"\\bL-06C|LG-V909|LG-V900|LG-V700|LG-V510|LG-V500|LG-V410|LG-V400|LG-VK810\\b",FujitsuTablet:"Android.*\\b(F-01D|F-02F|F-05E|F-10D|M532|Q572)\\b",PrestigioTablet:"PMP3170B|PMP3270B|PMP3470B|PMP7170B|PMP3370B|PMP3570C|PMP5870C|PMP3670B|PMP5570C|PMP5770D|PMP3970B|PMP3870C|PMP5580C|PMP5880D|PMP5780D|PMP5588C|PMP7280C|PMP7280C3G|PMP7280|PMP7880D|PMP5597D|PMP5597|PMP7100D|PER3464|PER3274|PER3574|PER3884|PER5274|PER5474|PMP5097CPRO|PMP5097|PMP7380D|PMP5297C|PMP5297C_QUAD|PMP812E|PMP812E3G|PMP812F|PMP810E|PMP880TD|PMT3017|PMT3037|PMT3047|PMT3057|PMT7008|PMT5887|PMT5001|PMT5002",LenovoTablet:"Lenovo TAB|Idea(Tab|Pad)( A1|A10| K1|)|ThinkPad([ ]+)?Tablet|Lenovo.*(S2109|S2110|S5000|S6000|K3011|A3000|A3500|A1000|A2107|A2109|A1107|A5500|A7600|B6000|B8000|B8080)(-|)(FL|F|HV|H|)",DellTablet:"Venue 11|Venue 8|Venue 7|Dell Streak 10|Dell Streak 7",YarvikTablet:"Android.*\\b(TAB210|TAB211|TAB224|TAB250|TAB260|TAB264|TAB310|TAB360|TAB364|TAB410|TAB411|TAB420|TAB424|TAB450|TAB460|TAB461|TAB464|TAB465|TAB467|TAB468|TAB07-100|TAB07-101|TAB07-150|TAB07-151|TAB07-152|TAB07-200|TAB07-201-3G|TAB07-210|TAB07-211|TAB07-212|TAB07-214|TAB07-220|TAB07-400|TAB07-485|TAB08-150|TAB08-200|TAB08-201-3G|TAB08-201-30|TAB09-100|TAB09-211|TAB09-410|TAB10-150|TAB10-201|TAB10-211|TAB10-400|TAB10-410|TAB13-201|TAB274EUK|TAB275EUK|TAB374EUK|TAB462EUK|TAB474EUK|TAB9-200)\\b",MedionTablet:"Android.*\\bOYO\\b|LIFE.*(P9212|P9514|P9516|S9512)|LIFETAB",ArnovaTablet:"AN10G2|AN7bG3|AN7fG3|AN8G3|AN8cG3|AN7G3|AN9G3|AN7dG3|AN7dG3ST|AN7dG3ChildPad|AN10bG3|AN10bG3DT|AN9G2",IntensoTablet:"INM8002KP|INM1010FP|INM805ND|Intenso Tab|TAB1004",IRUTablet:"M702pro",MegafonTablet:"MegaFon V9|\\bZTE V9\\b|Android.*\\bMT7A\\b",EbodaTablet:"E-Boda (Supreme|Impresspeed|Izzycomm|Essential)",AllViewTablet:"Allview.*(Viva|Alldro|City|Speed|All TV|Frenzy|Quasar|Shine|TX1|AX1|AX2)",ArchosTablet:"\\b(101G9|80G9|A101IT)\\b|Qilive 97R|Archos5|\\bARCHOS (70|79|80|90|97|101|FAMILYPAD|)(b|)(G10| Cobalt| TITANIUM(HD|)| Xenon| Neon|XSK| 2| XS 2| PLATINUM| CARBON|GAMEPAD)\\b",AinolTablet:"NOVO7|NOVO8|NOVO10|Novo7Aurora|Novo7Basic|NOVO7PALADIN|novo9-Spark",SonyTablet:"Sony.*Tablet|Xperia Tablet|Sony Tablet S|SO-03E|SGPT12|SGPT13|SGPT114|SGPT121|SGPT122|SGPT123|SGPT111|SGPT112|SGPT113|SGPT131|SGPT132|SGPT133|SGPT211|SGPT212|SGPT213|SGP311|SGP312|SGP321|EBRD1101|EBRD1102|EBRD1201|SGP351|SGP341|SGP511|SGP512|SGP521|SGP541|SGP551|SGP621|SGP612|SOT31",PhilipsTablet:"\\b(PI2010|PI3000|PI3100|PI3105|PI3110|PI3205|PI3210|PI3900|PI4010|PI7000|PI7100)\\b",CubeTablet:"Android.*(K8GT|U9GT|U10GT|U16GT|U17GT|U18GT|U19GT|U20GT|U23GT|U30GT)|CUBE U8GT",CobyTablet:"MID1042|MID1045|MID1125|MID1126|MID7012|MID7014|MID7015|MID7034|MID7035|MID7036|MID7042|MID7048|MID7127|MID8042|MID8048|MID8127|MID9042|MID9740|MID9742|MID7022|MID7010",MIDTablet:"M9701|M9000|M9100|M806|M1052|M806|T703|MID701|MID713|MID710|MID727|MID760|MID830|MID728|MID933|MID125|MID810|MID732|MID120|MID930|MID800|MID731|MID900|MID100|MID820|MID735|MID980|MID130|MID833|MID737|MID960|MID135|MID860|MID736|MID140|MID930|MID835|MID733|MID4X10",MSITablet:"MSI \\b(Primo 73K|Primo 73L|Primo 81L|Primo 77|Primo 93|Primo 75|Primo 76|Primo 73|Primo 81|Primo 91|Primo 90|Enjoy 71|Enjoy 7|Enjoy 10)\\b",SMiTTablet:"Android.*(\\bMID\\b|MID-560|MTV-T1200|MTV-PND531|MTV-P1101|MTV-PND530)",RockChipTablet:"Android.*(RK2818|RK2808A|RK2918|RK3066)|RK2738|RK2808A",FlyTablet:"IQ310|Fly Vision",bqTablet:"Android.*(bq)?.*(Elcano|Curie|Edison|Maxwell|Kepler|Pascal|Tesla|Hypatia|Platon|Newton|Livingstone|Cervantes|Avant|Aquaris E10)|Maxwell.*Lite|Maxwell.*Plus",HuaweiTablet:"MediaPad|MediaPad 7 Youth|IDEOS S7|S7-201c|S7-202u|S7-101|S7-103|S7-104|S7-105|S7-106|S7-201|S7-Slim",NecTablet:"\\bN-06D|\\bN-08D",PantechTablet:"Pantech.*P4100",BronchoTablet:"Broncho.*(N701|N708|N802|a710)",VersusTablet:"TOUCHPAD.*[78910]|\\bTOUCHTAB\\b",ZyncTablet:"z1000|Z99 2G|z99|z930|z999|z990|z909|Z919|z900",PositivoTablet:"TB07STA|TB10STA|TB07FTA|TB10FTA",NabiTablet:"Android.*\\bNabi",KoboTablet:"Kobo Touch|\\bK080\\b|\\bVox\\b Build|\\bArc\\b Build",DanewTablet:"DSlide.*\\b(700|701R|702|703R|704|802|970|971|972|973|974|1010|1012)\\b",TexetTablet:"NaviPad|TB-772A|TM-7045|TM-7055|TM-9750|TM-7016|TM-7024|TM-7026|TM-7041|TM-7043|TM-7047|TM-8041|TM-9741|TM-9747|TM-9748|TM-9751|TM-7022|TM-7021|TM-7020|TM-7011|TM-7010|TM-7023|TM-7025|TM-7037W|TM-7038W|TM-7027W|TM-9720|TM-9725|TM-9737W|TM-1020|TM-9738W|TM-9740|TM-9743W|TB-807A|TB-771A|TB-727A|TB-725A|TB-719A|TB-823A|TB-805A|TB-723A|TB-715A|TB-707A|TB-705A|TB-709A|TB-711A|TB-890HD|TB-880HD|TB-790HD|TB-780HD|TB-770HD|TB-721HD|TB-710HD|TB-434HD|TB-860HD|TB-840HD|TB-760HD|TB-750HD|TB-740HD|TB-730HD|TB-722HD|TB-720HD|TB-700HD|TB-500HD|TB-470HD|TB-431HD|TB-430HD|TB-506|TB-504|TB-446|TB-436|TB-416|TB-146SE|TB-126SE",PlaystationTablet:"Playstation.*(Portable|Vita)",TrekstorTablet:"ST10416-1|VT10416-1|ST70408-1|ST702xx-1|ST702xx-2|ST80208|ST97216|ST70104-2|VT10416-2|ST10216-2A|SurfTab",PyleAudioTablet:"\\b(PTBL10CEU|PTBL10C|PTBL72BC|PTBL72BCEU|PTBL7CEU|PTBL7C|PTBL92BC|PTBL92BCEU|PTBL9CEU|PTBL9CUK|PTBL9C)\\b",AdvanTablet:"Android.* \\b(E3A|T3X|T5C|T5B|T3E|T3C|T3B|T1J|T1F|T2A|T1H|T1i|E1C|T1-E|T5-A|T4|E1-B|T2Ci|T1-B|T1-D|O1-A|E1-A|T1-A|T3A|T4i)\\b ",DanyTechTablet:"Genius Tab G3|Genius Tab S2|Genius Tab Q3|Genius Tab G4|Genius Tab Q4|Genius Tab G-II|Genius TAB GII|Genius TAB GIII|Genius Tab S1",GalapadTablet:"Android.*\\bG1\\b",MicromaxTablet:"Funbook|Micromax.*\\b(P250|P560|P360|P362|P600|P300|P350|P500|P275)\\b",KarbonnTablet:"Android.*\\b(A39|A37|A34|ST8|ST10|ST7|Smart Tab3|Smart Tab2)\\b",AllFineTablet:"Fine7 Genius|Fine7 Shine|Fine7 Air|Fine8 Style|Fine9 More|Fine10 Joy|Fine11 Wide",PROSCANTablet:"\\b(PEM63|PLT1023G|PLT1041|PLT1044|PLT1044G|PLT1091|PLT4311|PLT4311PL|PLT4315|PLT7030|PLT7033|PLT7033D|PLT7035|PLT7035D|PLT7044K|PLT7045K|PLT7045KB|PLT7071KG|PLT7072|PLT7223G|PLT7225G|PLT7777G|PLT7810K|PLT7849G|PLT7851G|PLT7852G|PLT8015|PLT8031|PLT8034|PLT8036|PLT8080K|PLT8082|PLT8088|PLT8223G|PLT8234G|PLT8235G|PLT8816K|PLT9011|PLT9045K|PLT9233G|PLT9735|PLT9760G|PLT9770G)\\b",YONESTablet:"BQ1078|BC1003|BC1077|RK9702|BC9730|BC9001|IT9001|BC7008|BC7010|BC708|BC728|BC7012|BC7030|BC7027|BC7026",ChangJiaTablet:"TPC7102|TPC7103|TPC7105|TPC7106|TPC7107|TPC7201|TPC7203|TPC7205|TPC7210|TPC7708|TPC7709|TPC7712|TPC7110|TPC8101|TPC8103|TPC8105|TPC8106|TPC8203|TPC8205|TPC8503|TPC9106|TPC9701|TPC97101|TPC97103|TPC97105|TPC97106|TPC97111|TPC97113|TPC97203|TPC97603|TPC97809|TPC97205|TPC10101|TPC10103|TPC10106|TPC10111|TPC10203|TPC10205|TPC10503",GUTablet:"TX-A1301|TX-M9002|Q702|kf026",PointOfViewTablet:"TAB-P506|TAB-navi-7-3G-M|TAB-P517|TAB-P-527|TAB-P701|TAB-P703|TAB-P721|TAB-P731N|TAB-P741|TAB-P825|TAB-P905|TAB-P925|TAB-PR945|TAB-PL1015|TAB-P1025|TAB-PI1045|TAB-P1325|TAB-PROTAB[0-9]+|TAB-PROTAB25|TAB-PROTAB26|TAB-PROTAB27|TAB-PROTAB26XL|TAB-PROTAB2-IPS9|TAB-PROTAB30-IPS9|TAB-PROTAB25XXL|TAB-PROTAB26-IPS10|TAB-PROTAB30-IPS10",OvermaxTablet:"OV-(SteelCore|NewBase|Basecore|Baseone|Exellen|Quattor|EduTab|Solution|ACTION|BasicTab|TeddyTab|MagicTab|Stream|TB-08|TB-09)",HCLTablet:"HCL.*Tablet|Connect-3G-2.0|Connect-2G-2.0|ME Tablet U1|ME Tablet U2|ME Tablet G1|ME Tablet X1|ME Tablet Y2|ME Tablet Sync",DPSTablet:"DPS Dream 9|DPS Dual 7",VistureTablet:"V97 HD|i75 3G|Visture V4( HD)?|Visture V5( HD)?|Visture V10",CrestaTablet:"CTP(-)?810|CTP(-)?818|CTP(-)?828|CTP(-)?838|CTP(-)?888|CTP(-)?978|CTP(-)?980|CTP(-)?987|CTP(-)?988|CTP(-)?989",MediatekTablet:"\\bMT8125|MT8389|MT8135|MT8377\\b",ConcordeTablet:"Concorde([ ]+)?Tab|ConCorde ReadMan",GoCleverTablet:"GOCLEVER TAB|A7GOCLEVER|M1042|M7841|M742|R1042BK|R1041|TAB A975|TAB A7842|TAB A741|TAB A741L|TAB M723G|TAB M721|TAB A1021|TAB I921|TAB R721|TAB I720|TAB T76|TAB R70|TAB R76.2|TAB R106|TAB R83.2|TAB M813G|TAB I721|GCTA722|TAB I70|TAB I71|TAB S73|TAB R73|TAB R74|TAB R93|TAB R75|TAB R76.1|TAB A73|TAB A93|TAB A93.2|TAB T72|TAB R83|TAB R974|TAB R973|TAB A101|TAB A103|TAB A104|TAB A104.2|R105BK|M713G|A972BK|TAB A971|TAB R974.2|TAB R104|TAB R83.3|TAB A1042",ModecomTablet:"FreeTAB 9000|FreeTAB 7.4|FreeTAB 7004|FreeTAB 7800|FreeTAB 2096|FreeTAB 7.5|FreeTAB 1014|FreeTAB 1001 |FreeTAB 8001|FreeTAB 9706|FreeTAB 9702|FreeTAB 7003|FreeTAB 7002|FreeTAB 1002|FreeTAB 7801|FreeTAB 1331|FreeTAB 1004|FreeTAB 8002|FreeTAB 8014|FreeTAB 9704|FreeTAB 1003",VoninoTablet:"\\b(Argus[ _]?S|Diamond[ _]?79HD|Emerald[ _]?78E|Luna[ _]?70C|Onyx[ _]?S|Onyx[ _]?Z|Orin[ _]?HD|Orin[ _]?S|Otis[ _]?S|SpeedStar[ _]?S|Magnet[ _]?M9|Primus[ _]?94[ _]?3G|Primus[ _]?94HD|Primus[ _]?QS|Android.*\\bQ8\\b|Sirius[ _]?EVO[ _]?QS|Sirius[ _]?QS|Spirit[ _]?S)\\b",ECSTablet:"V07OT2|TM105A|S10OT1|TR10CS1",StorexTablet:"eZee[_']?(Tab|Go)[0-9]+|TabLC7|Looney Tunes Tab",VodafoneTablet:"SmartTab([ ]+)?[0-9]+|SmartTabII10|SmartTabII7",EssentielBTablet:"Smart[ ']?TAB[ ]+?[0-9]+|Family[ ']?TAB2",RossMoorTablet:"RM-790|RM-997|RMD-878G|RMD-974R|RMT-705A|RMT-701|RME-601|RMT-501|RMT-711",iMobileTablet:"i-mobile i-note",TolinoTablet:"tolino tab [0-9.]+|tolino shine",AudioSonicTablet:"\\bC-22Q|T7-QC|T-17B|T-17P\\b",AMPETablet:"Android.* A78 ",SkkTablet:"Android.* (SKYPAD|PHOENIX|CYCLOPS)",TecnoTablet:"TECNO P9",JXDTablet:"Android.* \\b(F3000|A3300|JXD5000|JXD3000|JXD2000|JXD300B|JXD300|S5800|S7800|S602b|S5110b|S7300|S5300|S602|S603|S5100|S5110|S601|S7100a|P3000F|P3000s|P101|P200s|P1000m|P200m|P9100|P1000s|S6600b|S908|P1000|P300|S18|S6600|S9100)\\b",iJoyTablet:"Tablet (Spirit 7|Essentia|Galatea|Fusion|Onix 7|Landa|Titan|Scooby|Deox|Stella|Themis|Argon|Unique 7|Sygnus|Hexen|Finity 7|Cream|Cream X2|Jade|Neon 7|Neron 7|Kandy|Scape|Saphyr 7|Rebel|Biox|Rebel|Rebel 8GB|Myst|Draco 7|Myst|Tab7-004|Myst|Tadeo Jones|Tablet Boing|Arrow|Draco Dual Cam|Aurix|Mint|Amity|Revolution|Finity 9|Neon 9|T9w|Amity 4GB Dual Cam|Stone 4GB|Stone 8GB|Andromeda|Silken|X2|Andromeda II|Halley|Flame|Saphyr 9,7|Touch 8|Planet|Triton|Unique 10|Hexen 10|Memphis 4GB|Memphis 8GB|Onix 10)",FX2Tablet:"FX2 PAD7|FX2 PAD10",XoroTablet:"KidsPAD 701|PAD[ ]?712|PAD[ ]?714|PAD[ ]?716|PAD[ ]?717|PAD[ ]?718|PAD[ ]?720|PAD[ ]?721|PAD[ ]?722|PAD[ ]?790|PAD[ ]?792|PAD[ ]?900|PAD[ ]?9715D|PAD[ ]?9716DR|PAD[ ]?9718DR|PAD[ ]?9719QR|PAD[ ]?9720QR|TelePAD1030|Telepad1032|TelePAD730|TelePAD731|TelePAD732|TelePAD735Q|TelePAD830|TelePAD9730|TelePAD795|MegaPAD 1331|MegaPAD 1851|MegaPAD 2151",ViewsonicTablet:"ViewPad 10pi|ViewPad 10e|ViewPad 10s|ViewPad E72|ViewPad7|ViewPad E100|ViewPad 7e|ViewSonic VB733|VB100a",OdysTablet:"LOOX|XENO10|ODYS[ -](Space|EVO|Xpress|NOON)|\\bXELIO\\b|Xelio10Pro|XELIO7PHONETAB|XELIO10EXTREME|XELIOPT2|NEO_QUAD10",CaptivaTablet:"CAPTIVA PAD",IconbitTablet:"NetTAB|NT-3702|NT-3702S|NT-3702S|NT-3603P|NT-3603P|NT-0704S|NT-0704S|NT-3805C|NT-3805C|NT-0806C|NT-0806C|NT-0909T|NT-0909T|NT-0907S|NT-0907S|NT-0902S|NT-0902S",TeclastTablet:"T98 4G|\\bP80\\b|\\bX90HD\\b|X98 Air|X98 Air 3G|\\bX89\\b|P80 3G|\\bX80h\\b|P98 Air|\\bX89HD\\b|P98 3G|\\bP90HD\\b|P89 3G|X98 3G|\\bP70h\\b|P79HD 3G|G18d 3G|\\bP79HD\\b|\\bP89s\\b|\\bA88\\b|\\bP10HD\\b|\\bP19HD\\b|G18 3G|\\bP78HD\\b|\\bA78\\b|\\bP75\\b|G17s 3G|G17h 3G|\\bP85t\\b|\\bP90\\b|\\bP11\\b|\\bP98t\\b|\\bP98HD\\b|\\bG18d\\b|\\bP85s\\b|\\bP11HD\\b|\\bP88s\\b|\\bA80HD\\b|\\bA80se\\b|\\bA10h\\b|\\bP89\\b|\\bP78s\\b|\\bG18\\b|\\bP85\\b|\\bA70h\\b|\\bA70\\b|\\bG17\\b|\\bP18\\b|\\bA80s\\b|\\bA11s\\b|\\bP88HD\\b|\\bA80h\\b|\\bP76s\\b|\\bP76h\\b|\\bP98\\b|\\bA10HD\\b|\\bP78\\b|\\bP88\\b|\\bA11\\b|\\bA10t\\b|\\bP76a\\b|\\bP76t\\b|\\bP76e\\b|\\bP85HD\\b|\\bP85a\\b|\\bP86\\b|\\bP75HD\\b|\\bP76v\\b|\\bA12\\b|\\bP75a\\b|\\bA15\\b|\\bP76Ti\\b|\\bP81HD\\b|\\bA10\\b|\\bT760VE\\b|\\bT720HD\\b|\\bP76\\b|\\bP73\\b|\\bP71\\b|\\bP72\\b|\\bT720SE\\b|\\bC520Ti\\b|\\bT760\\b|\\bT720VE\\b|T720-3GE|T720-WiFi",OndaTablet:"\\b(V975i|Vi30|VX530|V701|Vi60|V701s|Vi50|V801s|V719|Vx610w|VX610W|V819i|Vi10|VX580W|Vi10|V711s|V813|V811|V820w|V820|Vi20|V711|VI30W|V712|V891w|V972|V819w|V820w|Vi60|V820w|V711|V813s|V801|V819|V975s|V801|V819|V819|V818|V811|V712|V975m|V101w|V961w|V812|V818|V971|V971s|V919|V989|V116w|V102w|V973|Vi40)\\b[\\s]+",JaytechTablet:"TPC-PA762",BlaupunktTablet:"Endeavour 800NG|Endeavour 1010",DigmaTablet:"\\b(iDx10|iDx9|iDx8|iDx7|iDxD7|iDxD8|iDsQ8|iDsQ7|iDsQ8|iDsD10|iDnD7|3TS804H|iDsQ11|iDj7|iDs10)\\b",EvolioTablet:"ARIA_Mini_wifi|Aria[ _]Mini|Evolio X10|Evolio X7|Evolio X8|\\bEvotab\\b|\\bNeura\\b",LavaTablet:"QPAD E704|\\bIvoryS\\b|E-TAB IVORY|\\bE-TAB\\b",AocTablet:"MW0811|MW0812|MW0922|MTK8382",MpmanTablet:"MP11 OCTA|MP10 OCTA|MPQC1114|MPQC1004|MPQC994|MPQC974|MPQC973|MPQC804|MPQC784|MPQC780|\\bMPG7\\b|MPDCG75|MPDCG71|MPDC1006|MP101DC|MPDC9000|MPDC905|MPDC706HD|MPDC706|MPDC705|MPDC110|MPDC100|MPDC99|MPDC97|MPDC88|MPDC8|MPDC77|MP709|MID701|MID711|MID170|MPDC703|MPQC1010",CelkonTablet:"CT695|CT888|CT[\\s]?910|CT7 Tab|CT9 Tab|CT3 Tab|CT2 Tab|CT1 Tab|C820|C720|\\bCT-1\\b",WolderTablet:"miTab \\b(DIAMOND|SPACE|BROOKLYN|NEO|FLY|MANHATTAN|FUNK|EVOLUTION|SKY|GOCAR|IRON|GENIUS|POP|MINT|EPSILON|BROADWAY|JUMP|HOP|LEGEND|NEW AGE|LINE|ADVANCE|FEEL|FOLLOW|LIKE|LINK|LIVE|THINK|FREEDOM|CHICAGO|CLEVELAND|BALTIMORE-GH|IOWA|BOSTON|SEATTLE|PHOENIX|DALLAS|IN 101|MasterChef)\\b",MiTablet:"\\bMI PAD\\b|\\bHM NOTE 1W\\b",NibiruTablet:"Nibiru M1|Nibiru Jupiter One",NexoTablet:"NEXO NOVA|NEXO 10|NEXO AVIO|NEXO FREE|NEXO GO|NEXO EVO|NEXO 3G|NEXO SMART|NEXO KIDDO|NEXO MOBI",LeaderTablet:"TBLT10Q|TBLT10I|TBL-10WDKB|TBL-10WDKBO2013|TBL-W230V2|TBL-W450|TBL-W500|SV572|TBLT7I|TBA-AC7-8G|TBLT79|TBL-8W16|TBL-10W32|TBL-10WKB|TBL-W100",UbislateTablet:"UbiSlate[\\s]?7C",PocketBookTablet:"Pocketbook",Hudl:"Hudl HT7S3|Hudl 2",TelstraTablet:"T-Hub2",GenericTablet:"Android.*\\b97D\\b|Tablet(?!.*PC)|BNTV250A|MID-WCDMA|LogicPD Zoom2|\\bA7EB\\b|CatNova8|A1_07|CT704|CT1002|\\bM721\\b|rk30sdk|\\bEVOTAB\\b|M758A|ET904|ALUMIUM10|Smartfren Tab|Endeavour 1010|Tablet-PC-4|Tagi Tab|\\bM6pro\\b|CT1020W|arc 10HD|\\bJolla\\b|\\bTP750\\b"},oss:{AndroidOS:"Android",BlackBerryOS:"blackberry|\\bBB10\\b|rim tablet os",PalmOS:"PalmOS|avantgo|blazer|elaine|hiptop|palm|plucker|xiino",SymbianOS:"Symbian|SymbOS|Series60|Series40|SYB-[0-9]+|\\bS60\\b",WindowsMobileOS:"Windows CE.*(PPC|Smartphone|Mobile|[0-9]{3}x[0-9]{3})|Window Mobile|Windows Phone [0-9.]+|WCE;",WindowsPhoneOS:"Windows Phone 10.0|Windows Phone 8.1|Windows Phone 8.0|Windows Phone OS|XBLWP7|ZuneWP7|Windows NT 6.[23]; ARM;",iOS:"\\biPhone.*Mobile|\\biPod|\\biPad",MeeGoOS:"MeeGo",MaemoOS:"Maemo",JavaOS:"J2ME/|\\bMIDP\\b|\\bCLDC\\b",webOS:"webOS|hpwOS",badaOS:"\\bBada\\b",BREWOS:"BREW"},uas:{Chrome:"\\bCrMo\\b|CriOS|Android.*Chrome/[.0-9]* (Mobile)?",Dolfin:"\\bDolfin\\b",Opera:"Opera.*Mini|Opera.*Mobi|Android.*Opera|Mobile.*OPR/[0-9.]+|Coast/[0-9.]+",Skyfire:"Skyfire",IE:"IEMobile|MSIEMobile",Firefox:"fennec|firefox.*maemo|(Mobile|Tablet).*Firefox|Firefox.*Mobile",Bolt:"bolt",TeaShark:"teashark",Blazer:"Blazer",Safari:"Version.*Mobile.*Safari|Safari.*Mobile|MobileSafari",Tizen:"Tizen",UCBrowser:"UC.*Browser|UCWEB",baiduboxapp:"baiduboxapp",baidubrowser:"baidubrowser",DiigoBrowser:"DiigoBrowser",Puffin:"Puffin",Mercury:"\\bMercury\\b",ObigoBrowser:"Obigo",NetFront:"NF-Browser",GenericBrowser:"NokiaBrowser|OviBrowser|OneBrowser|TwonkyBeamBrowser|SEMC.*Browser|FlyFlow|Minimo|NetFront|Novarra-Vision|MQQBrowser|MicroMessenger"},props:{Mobile:"Mobile/[VER]",Build:"Build/[VER]",Version:"Version/[VER]",VendorID:"VendorID/[VER]",iPad:"iPad.*CPU[a-z ]+[VER]",iPhone:"iPhone.*CPU[a-z ]+[VER]",iPod:"iPod.*CPU[a-z ]+[VER]",Kindle:"Kindle/[VER]",Chrome:["Chrome/[VER]","CriOS/[VER]","CrMo/[VER]"],Coast:["Coast/[VER]"],Dolfin:"Dolfin/[VER]",Firefox:"Firefox/[VER]",Fennec:"Fennec/[VER]",IE:["IEMobile/[VER];","IEMobile [VER]","MSIE [VER];","Trident/[0-9.]+;.*rv:[VER]"],NetFront:"NetFront/[VER]",NokiaBrowser:"NokiaBrowser/[VER]",Opera:[" OPR/[VER]","Opera Mini/[VER]","Version/[VER]"],"Opera Mini":"Opera Mini/[VER]","Opera Mobi":"Version/[VER]","UC Browser":"UC Browser[VER]",MQQBrowser:"MQQBrowser/[VER]",MicroMessenger:"MicroMessenger/[VER]",baiduboxapp:"baiduboxapp/[VER]",baidubrowser:"baidubrowser/[VER]",Iron:"Iron/[VER]",Safari:["Version/[VER]","Safari/[VER]"],Skyfire:"Skyfire/[VER]",Tizen:"Tizen/[VER]",Webkit:"webkit[ /][VER]",Gecko:"Gecko/[VER]",Trident:"Trident/[VER]",Presto:"Presto/[VER]",iOS:" \\bi?OS\\b [VER][ ;]{1}",Android:"Android [VER]",BlackBerry:["BlackBerry[\\w]+/[VER]","BlackBerry.*Version/[VER]","Version/[VER]"],BREW:"BREW [VER]",Java:"Java/[VER]","Windows Phone OS":["Windows Phone OS [VER]","Windows Phone [VER]"],"Windows Phone":"Windows Phone [VER]","Windows CE":"Windows CE/[VER]","Windows NT":"Windows NT [VER]",Symbian:["SymbianOS/[VER]","Symbian/[VER]"],webOS:["webOS/[VER]","hpwOS/[VER];"]},utils:{Bot:"Googlebot|facebookexternalhit|AdsBot-Google|Google Keyword Suggestion|Facebot|YandexBot|bingbot|ia_archiver|AhrefsBot|Ezooms|GSLFbot|WBSearchBot|Twitterbot|TweetmemeBot|Twikle|PaperLiBot|Wotbox|UnwindFetchor|Exabot|MJ12bot|YandexImages|TurnitinBot|Pingdom",MobileBot:"Googlebot-Mobile|AdsBot-Google-Mobile|YahooSeeker/M1A1-R2D2",DesktopMode:"WPDesktop",TV:"SonyDTV|HbbTV",WebKit:"(webkit)[ /]([\\w.]+)",Console:"\\b(Nintendo|Nintendo WiiU|Nintendo 3DS|PLAYSTATION|Xbox)\\b",Watch:"SM-V700"}},detectMobileBrowsers:{fullPattern:/(android|bb\d+|meego).+mobile|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series(4|6)0|symbian|treo|up\.(browser|link)|vodafone|wap|windows ce|xda|xiino/i,shortPattern:/1207|6310|6590|3gso|4thp|50[1-6]i|770s|802s|a wa|abac|ac(er|oo|s\-)|ai(ko|rn)|al(av|ca|co)|amoi|an(ex|ny|yw)|aptu|ar(ch|go)|as(te|us)|attw|au(di|\-m|r |s )|avan|be(ck|ll|nq)|bi(lb|rd)|bl(ac|az)|br(e|v)w|bumb|bw\-(n|u)|c55\/|capi|ccwa|cdm\-|cell|chtm|cldc|cmd\-|co(mp|nd)|craw|da(it|ll|ng)|dbte|dc\-s|devi|dica|dmob|do(c|p)o|ds(12|\-d)|el(49|ai)|em(l2|ul)|er(ic|k0)|esl8|ez([4-7]0|os|wa|ze)|fetc|fly(\-|_)|g1 u|g560|gene|gf\-5|g\-mo|go(\.w|od)|gr(ad|un)|haie|hcit|hd\-(m|p|t)|hei\-|hi(pt|ta)|hp( i|ip)|hs\-c|ht(c(\-| |_|a|g|p|s|t)|tp)|hu(aw|tc)|i\-(20|go|ma)|i230|iac( |\-|\/)|ibro|idea|ig01|ikom|im1k|inno|ipaq|iris|ja(t|v)a|jbro|jemu|jigs|kddi|keji|kgt( |\/)|klon|kpt |kwc\-|kyo(c|k)|le(no|xi)|lg( g|\/(k|l|u)|50|54|\-[a-w])|libw|lynx|m1\-w|m3ga|m50\/|ma(te|ui|xo)|mc(01|21|ca)|m\-cr|me(rc|ri)|mi(o8|oa|ts)|mmef|mo(01|02|bi|de|do|t(\-| |o|v)|zz)|mt(50|p1|v )|mwbp|mywa|n10[0-2]|n20[2-3]|n30(0|2)|n50(0|2|5)|n7(0(0|1)|10)|ne((c|m)\-|on|tf|wf|wg|wt)|nok(6|i)|nzph|o2im|op(ti|wv)|oran|owg1|p800|pan(a|d|t)|pdxg|pg(13|\-([1-8]|c))|phil|pire|pl(ay|uc)|pn\-2|po(ck|rt|se)|prox|psio|pt\-g|qa\-a|qc(07|12|21|32|60|\-[2-7]|i\-)|qtek|r380|r600|raks|rim9|ro(ve|zo)|s55\/|sa(ge|ma|mm|ms|ny|va)|sc(01|h\-|oo|p\-)|sdk\/|se(c(\-|0|1)|47|mc|nd|ri)|sgh\-|shar|sie(\-|m)|sk\-0|sl(45|id)|sm(al|ar|b3|it|t5)|so(ft|ny)|sp(01|h\-|v\-|v )|sy(01|mb)|t2(18|50)|t6(00|10|18)|ta(gt|lk)|tcl\-|tdg\-|tel(i|m)|tim\-|t\-mo|to(pl|sh)|ts(70|m\-|m3|m5)|tx\-9|up(\.b|g1|si)|utst|v400|v750|veri|vi(rg|te)|vk(40|5[0-3]|\-v)|vm40|voda|vulc|vx(52|53|60|61|70|80|81|83|85|98)|w3c(\-| )|webc|whit|wi(g |nc|nw)|wmlb|wonu|x700|yas\-|your|zeto|zte\-/i,tabletPattern:/android|ipad|playbook|silk/i}},l=Object.prototype.hasOwnProperty;function t(e,t){return null!=e&&null!=t&&e.toLowerCase()===t.toLowerCase()}function n(e,t){var n,r,i=e.length;if(!i||!t)return!1;for(n=t.toLowerCase(),r=0;r<i;++r)if(n===e[r].toLowerCase())return!0;return!1}function u(e){for(var t in e)l.call(e,t)&&(e[t]=new RegExp(e[t],"i"))}function o(e,t){this.ua=e||"",this._cache={},this.maxPhoneWidth=t||600}return c.FALLBACK_PHONE="UnknownPhone",c.FALLBACK_TABLET="UnknownTablet",c.FALLBACK_MOBILE="UnknownMobile",s="isArray"in Array?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},function(){var e,t,n,r,i,a,o=c.mobileDetectRules;for(e in o.props)if(l.call(o.props,e)){for(t=o.props[e],s(t)||(t=[t]),i=t.length,r=0;r<i;++r)0<=(a=(n=t[r]).indexOf("[VER]"))&&(n=n.substring(0,a)+"([\\w._\\+]+)"+n.substring(a+5)),t[r]=new RegExp(n,"i");o.props[e]=t}u(o.oss),u(o.phones),u(o.tablets),u(o.uas),u(o.utils),o.oss0={WindowsPhoneOS:o.oss.WindowsPhoneOS,WindowsMobileOS:o.oss.WindowsMobileOS}}(),c.findMatch=function(e,t){for(var n in e)if(l.call(e,n)&&e[n].test(t))return n;return null},c.findMatches=function(e,t){var n=[];for(var r in e)l.call(e,r)&&e[r].test(t)&&n.push(r);return n},c.getVersionStr=function(e,t){var n,r,i,a,o=c.mobileDetectRules.props;if(l.call(o,e))for(i=(n=o[e]).length,r=0;r<i;++r)if(null!==(a=n[r].exec(t)))return a[1];return null},c.getVersion=function(e,t){var n=c.getVersionStr(e,t);return n?c.prepareVersionNo(n):NaN},c.prepareVersionNo=function(e){var t;return 1===(t=e.split(/[a-z._ \/\-]/i)).length&&(e=t[0]),1<t.length&&(e=t[0]+".",t.shift(),e+=t.join("")),Number(e)},c.isMobileFallback=function(e){return c.detectMobileBrowsers.fullPattern.test(e)||c.detectMobileBrowsers.shortPattern.test(e.substr(0,4))},c.isTabletFallback=function(e){return c.detectMobileBrowsers.tabletPattern.test(e)},c.prepareDetectionCache=function(e,t,n){if(e.mobile===f){var r,i,a;if(i=c.findMatch(c.mobileDetectRules.tablets,t))return e.mobile=e.tablet=i,void(e.phone=null);if(r=c.findMatch(c.mobileDetectRules.phones,t))return e.mobile=e.phone=r,void(e.tablet=null);c.isMobileFallback(t)?(a=o.isPhoneSized(n))===f?(e.mobile=c.FALLBACK_MOBILE,e.tablet=e.phone=null):a?(e.mobile=e.phone=c.FALLBACK_PHONE,e.tablet=null):(e.mobile=e.tablet=c.FALLBACK_TABLET,e.phone=null):c.isTabletFallback(t)?(e.mobile=e.tablet=c.FALLBACK_TABLET,e.phone=null):e.mobile=e.tablet=e.phone=null}},c.mobileGrade=function(e){var t=null!==e.mobile();return e.os("iOS")&&4.3<=e.version("iPad")||e.os("iOS")&&3.1<=e.version("iPhone")||e.os("iOS")&&3.1<=e.version("iPod")||2.1<e.version("Android")&&e.is("Webkit")||7<=e.version("Windows Phone OS")||e.is("BlackBerry")&&6<=e.version("BlackBerry")||e.match("Playbook.*Tablet")||1.4<=e.version("webOS")&&e.match("Palm|Pre|Pixi")||e.match("hp.*TouchPad")||e.is("Firefox")&&12<=e.version("Firefox")||e.is("Chrome")&&e.is("AndroidOS")&&4<=e.version("Android")||e.is("Skyfire")&&4.1<=e.version("Skyfire")&&e.is("AndroidOS")&&2.3<=e.version("Android")||e.is("Opera")&&11<e.version("Opera Mobi")&&e.is("AndroidOS")||e.is("MeeGoOS")||e.is("Tizen")||e.is("Dolfin")&&2<=e.version("Bada")||(e.is("UC Browser")||e.is("Dolfin"))&&2.3<=e.version("Android")||e.match("Kindle Fire")||e.is("Kindle")&&3<=e.version("Kindle")||e.is("AndroidOS")&&e.is("NookTablet")||11<=e.version("Chrome")&&!t||5<=e.version("Safari")&&!t||4<=e.version("Firefox")&&!t||7<=e.version("MSIE")&&!t||10<=e.version("Opera")&&!t?"A":e.os("iOS")&&e.version("iPad")<4.3||e.os("iOS")&&e.version("iPhone")<3.1||e.os("iOS")&&e.version("iPod")<3.1||e.is("Blackberry")&&5<=e.version("BlackBerry")&&e.version("BlackBerry")<6||5<=e.version("Opera Mini")&&e.version("Opera Mini")<=6.5&&(2.3<=e.version("Android")||e.is("iOS"))||e.match("NokiaN8|NokiaC7|N97.*Series60|Symbian/3")||11<=e.version("Opera Mobi")&&e.is("SymbianOS")?"B":(e.version("BlackBerry")<5||e.match("MSIEMobile|Windows CE.*Mobile")||e.version("Windows Mobile"),"C")},c.detectOS=function(e){return c.findMatch(c.mobileDetectRules.oss0,e)||c.findMatch(c.mobileDetectRules.oss,e)},c.getDeviceSmallerSide=function(){return window.screen.width<window.screen.height?window.screen.width:window.screen.height},o.prototype={constructor:o,mobile:function(){return c.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.mobile},phone:function(){return c.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.phone},tablet:function(){return c.prepareDetectionCache(this._cache,this.ua,this.maxPhoneWidth),this._cache.tablet},userAgent:function(){return this._cache.userAgent===f&&(this._cache.userAgent=c.findMatch(c.mobileDetectRules.uas,this.ua)),this._cache.userAgent},userAgents:function(){return this._cache.userAgents===f&&(this._cache.userAgents=c.findMatches(c.mobileDetectRules.uas,this.ua)),this._cache.userAgents},os:function(){return this._cache.os===f&&(this._cache.os=c.detectOS(this.ua)),this._cache.os},version:function(e){return c.getVersion(e,this.ua)},versionStr:function(e){return c.getVersionStr(e,this.ua)},is:function(e){return n(this.userAgents(),e)||t(e,this.os())||t(e,this.phone())||t(e,this.tablet())||n(c.findMatches(c.mobileDetectRules.utils,this.ua),e)},match:function(e){return e instanceof RegExp||(e=new RegExp(e,"i")),e.test(this.ua)},isPhoneSized:function(e){return o.isPhoneSized(e||this.maxPhoneWidth)},mobileGrade:function(){return this._cache.grade===f&&(this._cache.grade=c.mobileGrade(this)),this._cache.grade}},o.isPhoneSized="undefined"!=typeof window&&window.screen?function(e){return e<0?f:c.getDeviceSmallerSide()<=e}:function(){},o._impl=c,o})}(),function(o){var s,c,l,u,f,e=function(){function e(){defaults={locale:"en",format:"L LTS",minView:"year",maxView:"minute",startView:"year",leftArrow:"&larr;",rightArrow:"&rarr;",monthsFormat:"MMM",daysFormat:"D",hoursFormat:"HH:[00]",minutesFormat:moment.localeData().longDateFormat("LT").replace(/[aA]/,""),secondsFormat:"ss",minutesStep:5,secondsStep:1}}return e.prototype.options=function(e){return o.extend(defaults,e),o.copy(defaults)},e.prototype.$get=function(){return defaults},e}(),a=function(){function e(e,t,n,r,i){this.restrict="A",this.scope={model:"=momentPicker",locale:"@?",format:"@?",minView:"@?",maxView:"@?",startView:"@?",minDate:"=?",maxDate:"=?",disabled:"=?disable",change:"&?"},s=e,c=t,l=n,u=r,f=i}return e.prototype.$inject=["$timeout","$sce","$compile","$document","momentPicker"],e.prototype.link=function(a,e,t){a.template='<div class="moment-picker-container {{view.selected}}-view" ng-show="view.isOpen && !disabled" ng-class="{\'moment-picker-disabled\': disabled}"><table class="header-view"><thead><tr><th ng-class="{disabled: !view.previous.selectable}" ng-bind-html="view.previous.label" ng-click="view.previous.set()"></th><th ng-bind="view.title" ng-click="view.setParentView()"></th><th ng-class="{disabled: !view.next.selectable}" ng-bind-html="view.next.label" ng-click="view.next.set()"></th></tr></thead></table><div class="moment-picker-specific-views"><table ng-if="view.selected == \'year\'"><tbody><tr ng-repeat="fourMonth in yearView.fourMonths"><td ng-repeat="month in fourMonth track by month.month" ng-class="month.class" ng-bind="month.label" ng-click="yearView.setMonth(month)"></td></tr></tbody></table><table ng-if="view.selected == \'month\'"><thead><tr><th ng-repeat="day in monthView.days" ng-bind="day"></th></tr></thead><tbody><tr ng-repeat="days in monthView.weeks"><td ng-repeat="day in days track by day.date" ng-class="day.class" ng-bind="day.label" ng-click="monthView.setDate(day)"></td></tr></tbody></table><table ng-if="view.selected == \'day\'"><tbody><tr ng-repeat="threeHours in dayView.threeHours"><td ng-repeat="hour in threeHours track by hour.hour" ng-class="hour.class" ng-bind="hour.label" ng-click="dayView.setHour(hour)"></td></tr></tbody></table><table ng-if="view.selected == \'hour\'"><tbody><tr ng-repeat="minutes in hourView.minutes"><td ng-repeat="minute in minutes" ng-class="minute.class" ng-bind="minute.label" ng-click="hourView.setMinute(minute)"></td></tr></tbody></table><table ng-if="view.selected == \'minute\'"><tbody><tr ng-repeat="seconds in minuteView.seconds"><td ng-repeat="second in seconds" ng-class="second.class" ng-bind="second.label" ng-click="minuteView.setSecond(second)"></td></tr></tbody></table></div></div>',o.forEach(["locale","format","minView","maxView","startView","leftArrow","rightArrow"],function(e){o.isDefined(a[e])||(a[e]=f[e]),o.isDefined(t[e])||(t[e]=a[e])}),a.momentToDate=function(e){return o.isDefined(e)&&e.isValid()?e.clone().toDate():void 0},a.valueUpdate=function(){a.disabled||(a.value=a.momentToDate(a.valueMoment))},a.limits={isAfterOrEqualMin:function(e,t){return!o.isDefined(a.minDateMoment)||e.isAfter(a.minDateMoment,t)||e.isSame(a.minDateMoment,t)},isBeforeOrEqualMax:function(e,t){return!o.isDefined(a.maxDateMoment)||e.isBefore(a.maxDateMoment,t)||e.isSame(a.maxDateMoment,t)},isSelectable:function(e,t){return a.limits.isAfterOrEqualMin(e,t)&&a.limits.isBeforeOrEqualMax(e,t)},checkValue:function(){o.isDefined(a.valueMoment)&&(a.limits.isAfterOrEqualMin(a.valueMoment)||a.valueUpdate(a.valueMoment=a.minDateMoment.clone()),a.limits.isBeforeOrEqualMax(a.valueMoment)||a.valueUpdate(a.valueMoment=a.maxDateMoment.clone()))},checkView:function(){o.isDefined(a.view.moment)||(a.view.moment=moment().locale(a.locale)),a.limits.isAfterOrEqualMin(a.view.moment)||(a.view.moment=a.minDateMoment.clone()),a.limits.isBeforeOrEqualMax(a.view.moment)||(a.view.moment=a.maxDateMoment.clone()),a.view.update()}},a.views={all:["year","month","day","hour","minute"],formats:{year:"M{1,4}(?![Mo])|Mo|Q|[Ll]{1,4}(?!T)",month:"[Dd]{1,4}(?![Ddo])|DDDo|[Dd]o|[Ww]{1,2}(?![Wwo])|[Ww]o|[Ee]|L{1,4}(?!T)|l{1,4}",day:"[Hh]{1,2}|LTS?",hour:"m{1,2}|[Ll]{3,4}|LT(?!S)",minute:"s{1,2}|S{1,}|X|LTS"},detectMinMax:function(){var r,i;o.forEach(a.views.formats,function(e,t){var n=new RegExp("("+e+")(?![^[]*])","g");a.format.match(n)&&(o.isDefined(r)||(r=t),i=t)}),r=o.isDefined(r)?Math.max(0,a.views.all.indexOf(r)):0,i=o.isDefined(i)?Math.min(a.views.all.length-1,a.views.all.indexOf(i)):a.views.all.length-1,r>a.views.all.indexOf(a.minView)&&(a.minView=a.views.all[r]),i<a.views.all.indexOf(a.maxView)&&(a.maxView=a.views.all[i])}},a.view={isOpen:!1,selected:a.startView,update:function(){a.view.value=a.momentToDate(a.view.moment)},toggle:function(){a.view.isOpen?a.view.close():a.view.open()},open:function(){o.forEach(u[0].querySelectorAll(".moment-picker-container.open"),function(e){((o.element(e).scope().view||{}).close||o.noop)()}),a.view.isOpen=!0},close:function(){a.view.isOpen=!1,a.view.selected=a.startView},title:"",previous:{selectable:!0,label:c.trustAsHtml(a.leftArrow),selectable:!0,set:function(){a.view.previous.selectable&&a.view.update(a.view.moment.subtract(1,a.view.selected).toDate())}},next:{selectable:!0,label:c.trustAsHtml(a.rightArrow),set:function(){a.view.next.selectable&&a.view.update(a.view.moment.add(1,a.view.selected).toDate())}},setParentView:function(){a.view.change(a.views.all[Math.max(0,a.views.all.indexOf(a.view.selected)-1)])},render:function(){var e=a.view.moment.clone().startOf(a.view.selected).subtract(1,a.view.selected),t=a.view.moment.clone().endOf(a.view.selected).add(1,a.view.selected);a.view.previous.selectable=a.limits.isAfterOrEqualMin(e,a.view.selected),a.view.previous.label=c.trustAsHtml(a.view.previous.selectable?a.leftArrow:"&nbsp;"),a.view.next.selectable=a.limits.isBeforeOrEqualMax(t,a.view.selected),a.view.next.label=c.trustAsHtml(a.view.next.selectable?a.rightArrow:"&nbsp;"),a.view.title=a[a.view.selected+"View"].render()},change:function(e){var t=a.views.all.indexOf(e),n=a.views.all.indexOf(a.minView),r=a.views.all.indexOf(a.maxView);t<0||r<t?(a.valueUpdate(a.valueMoment=a.view.moment.clone()),a.view.close()):n<=t&&(a.view.selected=e)}},a.yearView={fourMonths:{},render:function(){var i=a.view.moment.clone().startOf("year"),e=moment.monthsShort();return a.yearView.fourMonths=[],e.forEach(function(e,t){var n=Math.floor(t/4),r=a.limits.isSelectable(i,"month");a.yearView.fourMonths[n]||(a.yearView.fourMonths[n]=[]),a.yearView.fourMonths[n].push({label:i.format(f.monthsFormat),year:i.year(),month:i.month(),class:r?i.isSame(a.valueMoment,"month")?"selected":"":"disabled",selectable:r}),i.add(1,"months")}),a.view.moment.format("YYYY")},setMonth:function(e){e.selectable&&(a.view.update(a.view.moment.year(e.year).month(e.month)),a.view.change("month"))}},a.monthView={days:function(){for(var e=[],t=moment().locale(a.locale).startOf("week"),n=0;n<7;n++)e.push(t.format("dd")),t.add(1,"days");return e}(),weeks:[],render:function(){var n=a.view.moment.month(),r=a.view.moment.clone().startOf("month").startOf("week"),e=(a.view.moment.clone().endOf("month").endOf("week"),r.week()),t=e+5;weeks={},a.monthView.weeks=[];for(var i=e;i<=t;i++)weeks[i]="0000000".split("").map(function(){var e=a.limits.isSelectable(r,"day"),t={label:r.format(f.daysFormat),year:r.year(),date:r.date(),month:r.month(),class:e&&r.month()==n?r.isSame(a.valueMoment,"day")?"selected":"":"disabled",selectable:e};return r.add(1,"days"),t});return o.forEach(weeks,function(e){a.monthView.weeks.push(e)}),a.view.moment.format("MMMM YYYY")},setDate:function(e){e.selectable&&(a.view.update(a.view.moment.year(e.year).month(e.month).date(e.date)),a.view.change("day"))}},a.dayView={threeHours:[],render:function(){var e=a.view.moment.clone().startOf("day");moment.localeData().longDateFormat("LT").replace(/[aA]/,""),a.dayView.threeHours=[];for(var t=0;t<24;t++){var n=Math.floor(t/4),r=a.limits.isSelectable(e,"hour");a.dayView.threeHours[n]||(a.dayView.threeHours[n]=[]),a.dayView.threeHours[n].push({label:e.format(f.hoursFormat),year:e.year(),month:e.month(),date:e.date(),hour:e.hour(),class:r?e.isSame(a.valueMoment,"hour")?"selected":"":"disabled",selectable:r}),e.add(1,"hours")}return a.view.moment.format("LL")},setHour:function(e){e.selectable&&(a.view.update(a.view.moment.year(e.year).month(e.month).date(e.date).hour(e.hour)),a.view.change("hour"))}},a.hourView={minutes:[],render:function(){var e=0,t=a.view.moment.clone().startOf("hour");a.hourView.minutes=[];for(var n=0;n<60;n+=f.minutesStep){var r=Math.floor(e/4),i=a.limits.isSelectable(t,"minute");a.hourView.minutes[r]||(a.hourView.minutes[r]=[]),a.hourView.minutes[r].push({label:t.format(f.minutesFormat),year:t.year(),month:t.month(),date:t.date(),hour:t.hour(),minute:t.minute(),class:i?t.isSame(a.valueMoment,"minute")?"selected":"":"disabled",selectable:i}),e++,t.add(f.minutesStep,"minutes")}return a.view.moment.clone().startOf("hour").format("lll")},setMinute:function(e){e.selectable&&(a.view.update(a.view.moment.year(e.year).month(e.month).date(e.date).hour(e.hour).minute(e.minute)),a.view.change("minute"))}},a.minuteView={seconds:[],render:function(){var e=0,t=a.view.moment.clone().startOf("minute");a.minuteView.seconds=[];for(var n=0;n<60;n+=f.secondsStep){var r=Math.floor(e/6),i=a.limits.isSelectable(t,"second");a.minuteView.seconds[r]||(a.minuteView.seconds[r]=[]),a.minuteView.seconds[r].push({label:t.format(f.secondsFormat),year:t.year(),month:t.month(),date:t.date(),hour:t.hour(),minute:t.minute(),second:t.second(),class:i?t.isSame(a.valueMoment,"second")?"selected":"":"disabled",selectable:i}),e++,t.add(f.secondsStep,"seconds")}return a.view.moment.clone().startOf("minute").format("lll")},setSecond:function(e){e.selectable&&(a.view.update(a.view.moment.year(e.year).month(e.month).date(e.date).hour(e.hour).minute(e.minute).second(e.second)),a.view.change("second"))}},a.picker=o.element('<span class="moment-picker"></span>'),e.after(a.picker),a.contents=e.addClass("moment-picker-contents").removeAttr("moment-picker"),a.container=l(a.template)(a),a.picker.append(a.contents),a.picker.append(a.container),a.views.detectMinMax(),a.limits.checkView(),a.$watch("model",function(e,t){o.isDefined(e)&&(a.valueMoment=moment(e,a.format,a.locale),a.valueMoment.isValid()?(a.view.moment=a.valueMoment.clone(),a.view.update()):a.valueMoment=void 0),a.valueUpdate(a.valueMoment),a.limits.checkValue()}),a.$watch("value",function(e,t){if(o.isDefined(a.valueMoment)){var n=a.model,r=a.valueMoment.format(a.format);r!=n&&s(function(){a.view.update(a.view.moment=a.valueMoment.clone()),a.model=r,o.isFunction(a.change)&&a.change({newValue:r,oldValue:n})})}}),a.$watch("[view.selected, view.value]",a.view.render,!0),a.$watch("[minView, maxView]",function(){a.views.detectMinMax(),a.startView=a.views.all[Math.max(Math.min(a.views.all.indexOf(a.startView),a.views.all.indexOf(a.maxView)),a.views.all.indexOf(a.minView))],a.view.selected=a.startView}),a.$watch("[minDate, maxDate]",function(){o.forEach(["minDate","maxDate"],function(e){o.isDefined(a[e])&&(a[e+"Moment"]=moment(a[e],a.format,a.locale),a[e+"Moment"].isValid()||(a[e+"Moment"]=void 0))}),a.limits.checkValue(),a.limits.checkView(),a.view.render()},!0),u.on("click",function(){a.view.isOpen&&s(a.view.close)}),a.container.on("click",function(e){e.stopPropagation()}),a.contents.on("click",function(e){e.stopPropagation(),a.view.isOpen||s(a.view.open)}),o.element(a.contents[0].querySelector("input")).on("focus",function(){a.view.isOpen||s(a.view.open)})},e}();o.module("moment-picker",[]).provider("momentPicker",[function(){return new e}]).directive("momentPicker",["$timeout","$sce","$compile","$document","momentPicker",function(e,t,n,r,i){return new a(e,t,n,r,i)}])}(window.angular),function(t,n){"function"==typeof define&&define.amd?define(["moment"],function(e){return t.DateRange=n(e)}):"object"==typeof exports?module.exports=n(require("moment")):t.DateRange=n(moment)}(this,function(o){var n={year:!0,month:!0,week:!0,day:!0,hour:!0,minute:!0,second:!0};function i(e,t){var n,r=e,i=t;1!==arguments.length&&void 0!==t||("object"==typeof e&&2===e.length?(r=e[0],i=e[1]):"string"==typeof e&&(r=(n=e.split("/"))[0],i=n[1])),this.start=o(null===r?-864e13:r),this.end=o(null===i?864e13:i)}return(i.prototype.constructor=i).prototype.clone=function(){return o().range(this.start,this.end)},i.prototype.contains=function(e,t){var n=this.start,r=this.end;return e instanceof i?n<=e.start&&(r>e.end||r.isSame(e.end)&&!t):n<=e&&(e<r||r.isSame(e)&&!t)},i.prototype.overlaps=function(e){return null!==this.intersect(e)},i.prototype.intersect=function(e){var t=this.start,n=this.end;return t<=e.start&&e.start<n&&n<e.end?new i(e.start,n):e.start<t&&t<e.end&&e.end<=n?new i(t,e.end):e.start<t&&t<=n&&n<e.end?this:t<=e.start&&e.start<=e.end&&e.end<=n?e:null},i.prototype.add=function(e){return this.overlaps(e)?new i(o.min(this.start,e.start),o.max(this.end,e.end)):null},i.prototype.subtract=function(e){var t=this.start,n=this.end;return null===this.intersect(e)?[this]:e.start<=t&&t<n&&n<=e.end?[]:e.start<=t&&t<e.end&&e.end<n?[new i(e.end,n)]:t<e.start&&e.start<n&&n<=e.end?[new i(t,e.start)]:t<e.start&&e.start<e.end&&e.end<n?[new i(t,e.start),new i(e.end,n)]:t<e.start&&e.start<n&&e.end<n?[new i(t,e.start),new i(e.start,n)]:void 0},i.prototype.toArray=function(e,t){var n=[];return this.by(e,function(e){n.push(e)},t),n},i.prototype.by=function(e,t,n){return"string"==typeof e?function(e,t,n){var r=o(this.start);for(;this.contains(r,n);)t.call(this,r.clone()),r.add(1,e)}.call(this,e,t,n):function(e,t,n){var r=this/e,i=Math.floor(r);if(i===1/0)return;i===r&&n&&i--;for(var a=0;a<=i;a++)t.call(this,o(this.start.valueOf()+e.valueOf()*a))}.call(this,e,t,n),this},i.prototype.toString=function(){return this.start.format()+"/"+this.end.format()},i.prototype.valueOf=function(){return this.end-this.start},i.prototype.center=function(){var e=this.start+this.diff()/2;return o(e)},i.prototype.toDate=function(){return[this.start.toDate(),this.end.toDate()]},i.prototype.isSame=function(e){return this.start.isSame(e.start)&&this.end.isSame(e.end)},i.prototype.diff=function(e){return this.end.diff(this.start,e)},o.range=function(e,t){return e in n?new i(o(this).startOf(e),o(this).endOf(e)):new i(e,t)},o.range.constructor=i,o.fn.range=o.range,o.fn.within=function(e){return e.contains(this._d)},i}),function(e){"use strict";"function"==typeof define&&define.amd?define(e):"undefined"!=typeof module&&void 0!==module.exports?module.exports=e():"undefined"!=typeof Package?Sortable=e():window.Sortable=e()}(function(){"use strict";var T,x,k,E,D,I,h,p,P,M,$,l,r,O,c,a,R,e,m={},i=/\s+/g,N="Sortable"+(new Date).getTime(),g=window,u=g.document,o=g.parseInt,s=!!("draggable"in u.createElement("div")),f=((e=u.createElement("x")).style.cssText="pointer-events:auto","auto"===e.style.pointerEvents),L=!1,_=Math.abs,d=[],F=t(function(e,t,n){if(n&&t.scroll){var r,i,a,o,s=t.scrollSensitivity,c=t.scrollSpeed,l=e.clientX,u=e.clientY,f=window.innerWidth,d=window.innerHeight;if(p!==n&&(h=t.scroll,p=n,!0===h)){h=n;do{if(h.offsetWidth<h.scrollWidth||h.offsetHeight<h.scrollHeight)break}while(h=h.parentNode)}h&&(i=(r=h).getBoundingClientRect(),a=(_(i.right-l)<=s)-(_(i.left-l)<=s),o=(_(i.bottom-u)<=s)-(_(i.top-u)<=s)),a||o||(o=(d-u<=s)-(u<=s),((a=(f-l<=s)-(l<=s))||o)&&(r=g)),m.vx===a&&m.vy===o&&m.el===r||(m.el=r,m.vx=a,m.vy=o,clearInterval(m.pid),r&&(m.pid=setInterval(function(){r===g?g.scrollTo(g.pageXOffset+a*c,g.pageYOffset+o*c):(o&&(r.scrollTop+=o*c),a&&(r.scrollLeft+=a*c))},24)))}},30),b=function(e){var t=e.group;t&&"object"==typeof t||(t=e.group={name:t}),["pull","put"].forEach(function(e){e in t||(t[e]=!0)}),e.groups=" "+t.name+(t.put.join?" "+t.put.join(" "):"")+" "};function v(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be HTMLElement, and not "+{}.toString.call(e);this.el=e,this.options=t=V({},t),e[N]=this;var n={group:Math.random(),sort:!0,disabled:!1,store:null,handle:null,scroll:!0,scrollSensitivity:30,scrollSpeed:10,draggable:/[uo]l/i.test(e.nodeName)?"li":">*",ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",ignore:"a, img",filter:null,animation:0,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1};for(var r in n)!(r in t)&&(t[r]=n[r]);for(var i in b(t),this)"_"===i.charAt(0)&&(this[i]=this[i].bind(this));this.nativeDraggable=!t.forceFallback&&s,y(e,"mousedown",this._onTapStart),y(e,"touchstart",this._onTapStart),this.nativeDraggable&&(y(e,"dragover",this),y(e,"dragenter",this)),d.push(this._onDragOver),t.store&&this.sort(t.store.get(this))}function G(e){E&&E.state!==e&&(B(E,"display",e?"none":""),!e&&E.state&&D.insertBefore(E,T),E.state=e)}function j(e,t,n){if(e){n=n||u;var r=(t=t.split(".")).shift().toUpperCase(),i=new RegExp("\\s("+t.join("|")+")(?=\\s)","g");do{if(">*"===r&&e.parentNode===n||(""===r||e.nodeName.toUpperCase()==r)&&(!t.length||((" "+e.className+" ").match(i)||[]).length==t.length))return e}while(e!==n&&(e=e.parentNode))}return null}function y(e,t,n){e.addEventListener(t,n,!1)}function w(e,t,n){e.removeEventListener(t,n,!1)}function C(e,t,n){if(e)if(e.classList)e.classList[n?"add":"remove"](t);else{var r=(" "+e.className+" ").replace(i," ").replace(" "+t+" "," ");e.className=(r+(n?" "+t:"")).replace(i," ")}}function B(e,t,n){var r=e&&e.style;if(r){if(void 0===n)return u.defaultView&&u.defaultView.getComputedStyle?n=u.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in r||(t="-webkit-"+t),r[t]=n+("string"==typeof n?"":"px")}}function A(e,t,n){if(e){var r=e.getElementsByTagName(t),i=0,a=r.length;if(n)for(;i<a;i++)n(r[i],i);return r}return[]}function S(e,t,n,r,i,a,o){var s=u.createEvent("Event"),c=(e||t[N]).options,l="on"+n.charAt(0).toUpperCase()+n.substr(1);s.initEvent(n,!0,!0),s.to=t,s.from=i||t,s.item=r||t,s.clone=E,s.oldIndex=a,s.newIndex=o,t.dispatchEvent(s),c[l]&&c[l].call(e,s)}function U(e,t,n,r,i,a){var o,s,c=e[N],l=c.options.onMove;return(o=u.createEvent("Event")).initEvent("move",!0,!0),o.to=t,o.from=e,o.dragged=n,o.draggedRect=r,o.related=i||t,o.relatedRect=a||t.getBoundingClientRect(),e.dispatchEvent(o),l&&(s=l.call(c,o)),s}function H(e){e.draggable=!1}function W(){L=!1}function q(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,r=0;n--;)r+=t.charCodeAt(n);return r.toString(36)}function z(e){var t=0;if(!e||!e.parentNode)return-1;for(;e&&(e=e.previousElementSibling);)"TEMPLATE"!==e.nodeName.toUpperCase()&&t++;return t}function t(e,t){var n,r;return function(){void 0===n&&(n=arguments,r=this,setTimeout(function(){1===n.length?e.call(r,n[0]):e.apply(r,n),n=void 0},t))}}function V(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}return v.prototype={constructor:v,_onTapStart:function(e){var t=this,n=this.el,r=this.options,i=e.type,a=e.touches&&e.touches[0],o=(a||e).target,s=o,c=r.filter;if(!("mousedown"===i&&0!==e.button||r.disabled)&&(o=j(o,r.draggable,n))){if(l=z(o),"function"==typeof c){if(c.call(this,e,o,this))return S(t,s,"filter",o,n,l),void e.preventDefault()}else if(c&&(c=c.split(",").some(function(e){if(e=j(s,e.trim(),n))return S(t,e,"filter",o,n,l),!0})))return void e.preventDefault();r.handle&&!j(s,r.handle,n)||this._prepareDragStart(e,a,o)}},_prepareDragStart:function(e,t,n){var r,i=this,a=i.el,o=i.options,s=a.ownerDocument;n&&!T&&n.parentNode===a&&(c=e,D=a,x=(T=n).parentNode,I=T.nextSibling,O=o.group,r=function(){i._disableDelayedDrag(),T.draggable=!0,C(T,i.options.chosenClass,!0),i._triggerDragStart(t)},o.ignore.split(",").forEach(function(e){A(T,e.trim(),H)}),y(s,"mouseup",i._onDrop),y(s,"touchend",i._onDrop),y(s,"touchcancel",i._onDrop),o.delay?(y(s,"mouseup",i._disableDelayedDrag),y(s,"touchend",i._disableDelayedDrag),y(s,"touchcancel",i._disableDelayedDrag),y(s,"mousemove",i._disableDelayedDrag),y(s,"touchmove",i._disableDelayedDrag),i._dragStartTimer=setTimeout(r,o.delay)):r())},_disableDelayedDrag:function(){var e=this.el.ownerDocument;clearTimeout(this._dragStartTimer),w(e,"mouseup",this._disableDelayedDrag),w(e,"touchend",this._disableDelayedDrag),w(e,"touchcancel",this._disableDelayedDrag),w(e,"mousemove",this._disableDelayedDrag),w(e,"touchmove",this._disableDelayedDrag)},_triggerDragStart:function(e){e?(c={target:T,clientX:e.clientX,clientY:e.clientY},this._onDragStart(c,"touch")):this.nativeDraggable?(y(T,"dragend",this),y(D,"dragstart",this._onDragStart)):this._onDragStart(c,!0);try{u.selection?u.selection.empty():window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(){D&&T&&(C(T,this.options.ghostClass,!0),S(v.active=this,D,"start",T,D,l))},_emulateDragOver:function(){if(a){if(this._lastX===a.clientX&&this._lastY===a.clientY)return;this._lastX=a.clientX,this._lastY=a.clientY,f||B(k,"display","none");var e=u.elementFromPoint(a.clientX,a.clientY),t=e,n=" "+this.options.group.name,r=d.length;if(t)do{if(t[N]&&-1<t[N].options.groups.indexOf(n)){for(;r--;)d[r]({clientX:a.clientX,clientY:a.clientY,target:e,rootEl:t});break}e=t}while(t=t.parentNode);f||B(k,"display","")}},_onTouchMove:function(e){if(c){v.active||this._dragStarted(),this._appendGhost();var t=e.touches?e.touches[0]:e,n=t.clientX-c.clientX,r=t.clientY-c.clientY,i=e.touches?"translate3d("+n+"px,"+r+"px,0)":"translate("+n+"px,"+r+"px)";R=!0,a=t,B(k,"webkitTransform",i),B(k,"mozTransform",i),B(k,"msTransform",i),B(k,"transform",i),e.preventDefault()}},_appendGhost:function(){if(!k){var e,t=T.getBoundingClientRect(),n=B(T),r=this.options;C(k=T.cloneNode(!0),r.ghostClass,!1),C(k,r.fallbackClass,!0),B(k,"top",t.top-o(n.marginTop,10)),B(k,"left",t.left-o(n.marginLeft,10)),B(k,"width",t.width),B(k,"height",t.height),B(k,"opacity","0.8"),B(k,"position","fixed"),B(k,"zIndex","100000"),B(k,"pointerEvents","none"),r.fallbackOnBody&&u.body.appendChild(k)||D.appendChild(k),e=k.getBoundingClientRect(),B(k,"width",2*t.width-e.width),B(k,"height",2*t.height-e.height)}},_onDragStart:function(e,t){var n=e.dataTransfer,r=this.options;this._offUpEvents(),"clone"==O.pull&&(B(E=T.cloneNode(!0),"display","none"),D.insertBefore(E,T)),t?("touch"===t?(y(u,"touchmove",this._onTouchMove),y(u,"touchend",this._onDrop),y(u,"touchcancel",this._onDrop)):(y(u,"mousemove",this._onTouchMove),y(u,"mouseup",this._onDrop)),this._loopId=setInterval(this._emulateDragOver,50)):(n&&(n.effectAllowed="move",r.setData&&r.setData.call(this,n,T)),y(u,"drop",this),setTimeout(this._dragStarted,0))},_onDragOver:function(e){var t,n,r,i,a,o,s=this.el,c=this.options,l=c.group,u=l.put,f=O===l,d=c.sort;if(void 0!==e.preventDefault&&(e.preventDefault(),!c.dragoverBubble&&e.stopPropagation()),R=!0,O&&!c.disabled&&(f?d||(r=!D.contains(T)):O.pull&&u&&(O.name===l.name||u.indexOf&&~u.indexOf(O.name)))&&(void 0===e.rootEl||e.rootEl===this.el)){if(F(e,c,this.el),L)return;if(t=j(e.target,c.draggable,s),n=T.getBoundingClientRect(),r)return G(!0),void(E||I?D.insertBefore(T,E||I):d||D.appendChild(T));if(0===s.children.length||s.children[0]===k||s===e.target&&(i=e,a=s.lastElementChild,o=a.getBoundingClientRect(),t=(5<i.clientY-(o.top+o.height)||5<i.clientX-(o.right+o.width))&&a)){if(t){if(t.animated)return;p=t.getBoundingClientRect()}G(f),!1!==U(D,s,T,n,t,p)&&(T.contains(s)||(s.appendChild(T),x=s),this._animate(n,T),t&&this._animate(p,t))}else if(t&&!t.animated&&t!==T&&void 0!==t.parentNode[N]){P!==t&&(M=B(P=t),$=B(t.parentNode));var h,p=t.getBoundingClientRect(),m=p.right-p.left,g=p.bottom-p.top,_=/left|right|inline/.test(M.cssFloat+M.display)||"flex"==$.display&&0===$["flex-direction"].indexOf("row"),b=t.offsetWidth>T.offsetWidth,v=t.offsetHeight>T.offsetHeight,y=.5<(_?(e.clientX-p.left)/m:(e.clientY-p.top)/g),w=t.nextElementSibling,C=U(D,s,T,n,t,p);if(!1!==C){if(L=!0,setTimeout(W,30),G(f),1===C||-1===C)h=1===C;else if(_){var A=T.offsetTop,S=t.offsetTop;h=A===S?t.previousElementSibling===T&&!b||y&&b:A<S}else h=w!==T&&!v||y&&v;T.contains(s)||(h&&!w?s.appendChild(T):t.parentNode.insertBefore(T,h?w:t)),x=T.parentNode,this._animate(n,T),this._animate(p,t)}}}},_animate:function(e,t){var n=this.options.animation;if(n){var r=t.getBoundingClientRect();B(t,"transition","none"),B(t,"transform","translate3d("+(e.left-r.left)+"px,"+(e.top-r.top)+"px,0)"),t.offsetWidth,B(t,"transition","all "+n+"ms"),B(t,"transform","translate3d(0,0,0)"),clearTimeout(t.animated),t.animated=setTimeout(function(){B(t,"transition",""),B(t,"transform",""),t.animated=!1},n)}},_offUpEvents:function(){var e=this.el.ownerDocument;w(u,"touchmove",this._onTouchMove),w(e,"mouseup",this._onDrop),w(e,"touchend",this._onDrop),w(e,"touchcancel",this._onDrop)},_onDrop:function(e){var t=this.el,n=this.options;clearInterval(this._loopId),clearInterval(m.pid),clearTimeout(this._dragStartTimer),w(u,"mousemove",this._onTouchMove),this.nativeDraggable&&(w(u,"drop",this),w(t,"dragstart",this._onDragStart)),this._offUpEvents(),e&&(R&&(e.preventDefault(),!n.dropBubble&&e.stopPropagation()),k&&k.parentNode.removeChild(k),T&&(this.nativeDraggable&&w(T,"dragend",this),H(T),C(T,this.options.ghostClass,!1),C(T,this.options.chosenClass,!1),D!==x?0<=(r=z(T))&&(S(null,x,"sort",T,D,l,r),S(this,D,"sort",T,D,l,r),S(null,x,"add",T,D,l,r),S(this,D,"remove",T,D,l,r)):(E&&E.parentNode.removeChild(E),T.nextSibling!==I&&0<=(r=z(T))&&(S(this,D,"update",T,D,l,r),S(this,D,"sort",T,D,l,r))),v.active&&(null!==r&&-1!==r||(r=l),S(this,D,"end",T,D,l,r),this.save())),D=T=x=k=I=E=h=p=c=a=R=r=P=M=O=v.active=null)},handleEvent:function(e){var t=e.type;"dragover"===t||"dragenter"===t?T&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move");e.preventDefault()}(e)):"drop"!==t&&"dragend"!==t||this._onDrop(e)},toArray:function(){for(var e,t=[],n=this.el.children,r=0,i=n.length,a=this.options;r<i;r++)j(e=n[r],a.draggable,this.el)&&t.push(e.getAttribute(a.dataIdAttr)||q(e));return t},sort:function(e){var r={},i=this.el;this.toArray().forEach(function(e,t){var n=i.children[t];j(n,this.options.draggable,i)&&(r[e]=n)},this),e.forEach(function(e){r[e]&&(i.removeChild(r[e]),i.appendChild(r[e]))})},save:function(){var e=this.options.store;e&&e.set(this)},closest:function(e,t){return j(e,t||this.options.draggable,this.el)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];n[e]=t,"group"===e&&b(n)},destroy:function(){var e=this.el;e[N]=null,w(e,"mousedown",this._onTapStart),w(e,"touchstart",this._onTapStart),this.nativeDraggable&&(w(e,"dragover",this),w(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(e){e.removeAttribute("draggable")}),d.splice(d.indexOf(this._onDragOver),1),this._onDrop(),this.el=e=null}},v.utils={on:y,off:w,css:B,find:A,is:function(e,t){return!!j(e,t,e)},extend:V,throttle:t,closest:j,toggleClass:C,index:z},v.create=function(e,t){return new v(e,t)},v.version="1.4.2",v}),function(e){"use strict";"function"==typeof define&&define.amd?define(["angular","./Sortable"],e):"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?(require("angular"),e(angular,require("./Sortable")),module.exports="ng-sortable"):window.angular&&window.Sortable&&e(angular,Sortable)}(function(h,p){"use strict";var m="Sortable:ng-sortable";h.module("ng-sortable",[]).constant("ngSortableVersion","0.4.0").constant("ngSortableConfig",{}).directive("ngSortable",["$parse","ngSortableConfig",function(l,u){var f,d;return{restrict:"AC",scope:{ngSortable:"=?"},link:function(a,e){var n,o=e[0],i=h.extend(a.ngSortable||{},u),r=[],s=function(e,t){var n=[].filter.call(e.childNodes,function(e){return 8===e.nodeType&&-1!==e.nodeValue.indexOf("ngRepeat:")})[0];if(!n)return function(){return null};n=n.nodeValue.match(/ngRepeat:\s*(?:\(.*?,\s*)?([^\s)]+)[\s)]+in\s+([^\s|]+)/);var r=l(n[2]);return function(){return r(t.$parent)||[]}}(o,a);function t(e,t){var n="on"+e.type.charAt(0).toUpperCase()+e.type.substr(1),r=s();i[n]&&i[n]({model:t||r[e.newIndex],models:r,oldIndex:e.oldIndex,newIndex:e.newIndex})}function c(e){var t=s();if(t){var n=e.oldIndex,r=e.newIndex;if(o!==e.from){var i=e.from[m]();f=i[n],e.clone?(f=h.copy(f),i.splice(p.utils.index(e.clone),0,i.splice(n,1)[0]),e.from.removeChild(e.clone)):i.splice(n,1),t.splice(r,0,f),e.from.insertBefore(e.item,d)}else t.splice(r,0,t.splice(n,1)[0]);a.$apply()}}o[m]=s,n=p.create(o,Object.keys(i).reduce(function(e,t){return e[t]=e[t]||i[t],e},{onStart:function(e){d=e.item.nextSibling,t(e),a.$apply()},onEnd:function(e){t(e,f),a.$apply()},onAdd:function(e){c(e),t(e,f),a.$apply()},onUpdate:function(e){c(e),t(e)},onRemove:function(e){t(e,f)},onSort:function(e){t(e)}})),e.on("$destroy",function(){h.forEach(r,function(e){e()}),n.destroy(),o[m]=null,d=n=r=o=null}),h.forEach(["sort","disabled","draggable","handle","animation","group","ghostClass","filter","onStart","onEnd","onAdd","onUpdate","onRemove","onSort"],function(t){r.push(a.$watch("ngSortable."+t,function(e){void 0!==e&&(i[t]=e,/^on[A-Z]/.test(t)||n.option(t,e))}))})}}}])}),function(l){angular.module("ngCsv.config",[]).value("ngCsv.config",{debug:!0}).config(["$compileProvider",function(e){angular.isDefined(e.urlSanitizationWhitelist)?e.urlSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|data):/):e.aHrefSanitizationWhitelist(/^\s*(https?|ftp|mailto|file|data):/)}]),angular.module("ngCsv.directives",["ngCsv.services"]),angular.module("ngCsv.services",[]),angular.module("ngCsv",["ngCsv.config","ngCsv.services","ngCsv.directives","ngSanitize"]),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="ngCsv"),angular.module("ngCsv.services").service("CSV",["$q",function(n){var t={"\\t":"\t","\\b":"\b","\\v":"\v","\\f":"\f","\\r":"\r"};this.stringifyField=function(e,t){return"locale"===t.decimalSep&&this.isFloat(e)?e.toLocaleString():"."!==t.decimalSep&&this.isFloat(e)?e.toString().replace(".",t.decimalSep):"string"==typeof e?(e=e.replace(/"/g,'""'),(t.quoteStrings||-1<e.indexOf(",")||-1<e.indexOf("\n")||-1<e.indexOf("\r"))&&(e=t.txtDelim+e+t.txtDelim),e):"boolean"==typeof e?e?"TRUE":"FALSE":e},this.isFloat=function(e){return+e===e&&(!isFinite(e)||Boolean(e%1))},this.stringify=function(e,s){var a=n.defer(),c=this,l="",u="",t=n.when(e).then(function(e){var t,n;angular.isDefined(s.header)&&s.header&&(t=[],angular.forEach(s.header,function(e){this.push(c.stringifyField(e,s))},t),n=t.join(s.fieldSep?s.fieldSep:","),u+=n+"\r\n");var r,i,o=[];(angular.isArray(e)?o=e:angular.isFunction(e)&&(o=e()),angular.isDefined(s.label)&&s.label&&"boolean"==typeof s.label)&&(r=[],angular.forEach(o[0],function(e,t){this.push(c.stringifyField(t,s))},r),i=r.join(s.fieldSep?s.fieldSep:","),u+=i+"\r\n");angular.forEach(o,function(e,t){var n,r,i=angular.copy(o[t]);r=[];var a=s.columnOrder?s.columnOrder:i;angular.forEach(a,function(e){var t=s.columnOrder?i[e]:e;this.push(c.stringifyField(t,s))},r),n=r.join(s.fieldSep?s.fieldSep:","),u+=t<o.length?n+"\r\n":n}),s.addByteOrderMarker&&(l+="\ufeff"),l+=u,a.resolve(l)});return"function"==typeof t.catch&&t.catch(function(e){a.reject(e)}),a.promise},this.isSpecialChar=function(e){return void 0!==t[e]},this.getSpecialChar=function(e){return t[e]}}]),angular.module("ngCsv.directives").directive("ngCsv",["$parse","$q","CSV","$document","$timeout",function(e,a,o,s,c){return{restrict:"AC",scope:{data:"&ngCsv",filename:"@filename",header:"&csvHeader",columnOrder:"&csvColumnOrder",txtDelim:"@textDelimiter",decimalSep:"@decimalSeparator",quoteStrings:"@quoteStrings",fieldSep:"@fieldSeparator",lazyLoad:"@lazyLoad",addByteOrderMarker:"@addBom",ngClick:"&",charset:"@charset",label:"&csvLabel"},controller:["$scope","$element","$attrs","$transclude",function(n,r,i){n.csv="",angular.isDefined(n.lazyLoad)&&"true"==n.lazyLoad||angular.isArray(n.data)&&n.$watch("data",function(){n.buildCSV()},!0),n.getFilename=function(){return n.filename||"download.csv"},n.buildCSV=function(){var e,t=a.defer();return r.addClass(i.ngCsvLoadingClass||"ng-csv-loading"),o.stringify(n.data(),(e={txtDelim:n.txtDelim?n.txtDelim:'"',decimalSep:n.decimalSep?n.decimalSep:".",quoteStrings:n.quoteStrings,addByteOrderMarker:n.addByteOrderMarker},angular.isDefined(i.csvHeader)&&(e.header=n.$eval(n.header)),angular.isDefined(i.csvColumnOrder)&&(e.columnOrder=n.$eval(n.columnOrder)),angular.isDefined(i.csvLabel)&&(e.label=n.$eval(n.label)),e.fieldSep=n.fieldSep?n.fieldSep:",",e.fieldSep=o.isSpecialChar(e.fieldSep)?o.getSpecialChar(e.fieldSep):e.fieldSep,e)).then(function(e){n.csv=e,r.removeClass(i.ngCsvLoadingClass||"ng-csv-loading"),t.resolve(e)}),n.$apply(),t.promise}}],link:function(i,e){e.bind("click",function(){i.buildCSV().then(function(){!function(){var e=i.charset||"utf-8",t=new Blob([i.csv],{type:"text/csv;charset="+e+";"});if(l.navigator.msSaveOrOpenBlob)navigator.msSaveBlob(t,i.getFilename());else{var n=angular.element('<div data-tap-disabled="true"><a></a></div>'),r=angular.element(n.children()[0]);r.attr("href",l.URL.createObjectURL(t)),r.attr("download",i.getFilename()),r.attr("target","_blank"),s.find("body").append(n),c(function(){r[0].click(),r.remove()},null)}}()}),i.$apply()})}}}])}(window,document),function(){"use strict";angular.module("ngPassword",[]).directive("matchPassword",function(){return{restrict:"A",require:["^ngModel","^form"],link:function(e,t,n,r){var i=r[1],a=r[0],o=i[n.matchPassword];e.$watch(function(){return o.$viewValue},function(){a.$$parseAndValidate()}),a.$validators?a.$validators.passwordMatch=function(e){return!e&&!o.$modelValue||e===o.$modelValue}:a.$parsers.push(function(e){return a.$setValidity("passwordMatch",!e&&!o.$viewValue||e===o.$viewValue),e}),o.$parsers.push(function(e){return a.$setValidity("passwordMatch",!e&&!a.$viewValue||e===a.$viewValue),e})}}}),angular.module("angular.password",["ngPassword"]),angular.module("angular-password",["ngPassword"]),"object"==typeof module&&"function"!=typeof define&&(module.exports=angular.module("ngPassword"))}(),function(e,k,t){"use strict";function n(h,p){function t(t,n,e,r){var i=r.shift(),a=r.shift();function o(){Array.prototype.some.call(n.find("md-icon"),function(e){return e.classList.contains("md-sort-icon")&&n[0].removeChild(e)}),n.removeClass("md-sort").off("click",f)}function s(){var e;e=k.element('<md-icon md-svg-icon="arrow-up.svg">'),h(e.addClass("md-sort-icon").attr("ng-class","getDirection()"))(t),n.hasClass("md-numeric")?n.prepend(e):n.append(e),n.addClass("md-sort").on("click",f)}function c(){return Array.prototype.indexOf.call(n.parent().children(),n[0])}function l(){return t.orderBy&&(i.order===t.orderBy||i.order==="-"+t.orderBy)}function u(){return""===e.mdNumeric||t.numeric}function f(){t.$applyAsync(function(){l()?i.order="md-asc"===t.getDirection()?"-"+t.orderBy:t.orderBy:i.order="md-asc"===t.getDirection()?t.orderBy:"-"+t.orderBy,k.isFunction(i.onReorder)&&p.nextTick(function(){i.onReorder(i.order)})})}function d(e,t){(a.$$columns[e]=t).numeric?n.addClass("md-numeric"):n.removeClass("md-numeric")}t.getDirection=function(){return l()?"-"===i.order.charAt(0)?"md-desc":"md-asc":""===e.mdDesc||t.$eval(e.mdDesc)?"md-desc":"md-asc"},t.$watch(l,function(e){e?n.addClass("md-active"):n.removeClass("md-active")}),t.$watch(c,function(e){d(e,{numeric:u()})}),t.$watch(u,function(e){d(c(),{numeric:e})}),t.$watch("orderBy",function(e){e?n.hasClass("md-sort")||s():n.hasClass("md-sort")&&o()})}return{compile:function(e){return e.addClass("md-column"),t},require:["^^mdHead","^^mdTable"],restrict:"A",scope:{numeric:"=?mdNumeric",orderBy:"@?mdOrderBy"}}}function r(a){return function(e,t,n,r){if(n&&"object"==typeof n){var i=a(e,t,!0,r);return k.extend(i.instance,n),i()}return a(e,t,n,r)}}function i(v,y,e,w,a,C,o,s,A){var S=27,T=!1,x=k.element(e.prop("body")),c={clickOutsideToClose:!0,disableScroll:!0,escToClose:!0,focusOnOpen:!0};function l(e,t){var n,r,i,a,o,s,c,l,u,f,d,h,p,m,g=C.$new(),_=v(e)(g),b=w.createBackdrop(g,"md-edit-dialog-backdrop");return t.controller?n=function(e,t,n){if(!e.controller)return;e.resolve&&k.extend(n,e.resolve);e.locals&&k.extend(n,e.locals);e.controllerAs?(t[e.controllerAs]={},e.bindToController?k.extend(t[e.controllerAs],e.scope):k.extend(t,e.scope)):k.extend(t,e.scope);return e.bindToController?y(e.controller,n,t[e.controllerAs]):y(e.controller,n)}(t,g,{$element:_,$scope:g}):k.extend(g,t.scope),t.disableScroll&&(r=_,i=w.disableScrollAround(r,x),r.on("$destroy",function(){i()})),x.prepend(b).append(_.addClass("md-whiteframe-1dp")),a=_,o=t.target,s=k.element(o).controller("mdCell").getTable(),c=function(){return a.prop("clientHeight")},l=function(){return a.prop("clientWidth")},u=function(){var e,t={width:l(),height:c()},n=o.getBoundingClientRect(),r="MD-TABLE-CONTAINER"===(e=s.parent()).prop("tagName")?e[0].getBoundingClientRect():s[0].getBoundingClientRect();t.width>r.right-n.left?a.css("left",r.right-t.width+"px"):a.css("left",n.left+"px"),t.height>r.bottom-n.top?a.css("top",r.bottom-t.height+"px"):a.css("top",n.top+1+"px"),a.css("minWidth",n.width+"px")},f=C.$watch(l,u),d=C.$watch(c,u),A.addEventListener("resize",u),a.on("$destroy",function(){f(),d(),A.removeEventListener("resize",u)}),t.focusOnOpen&&(h=_,w.nextTick(function(){var e=w.findFocusTarget(h);e&&e.focus()},!1)),t.clickOutsideToClose&&b.on("click",function(){_.remove()}),t.escToClose&&(p=_,m=function(e){e.keyCode===S&&p.remove()},x.on("keyup",m),p.on("$destroy",function(){x.off("keyup",m)})),_.on("$destroy",function(){T=!1,b.remove()}),n}function u(e){T=!1,console.error(e)}function t(e,n){return{controller:["$element","$q","save","$scope",function(e,t,n,r){this.dismiss=function(){e.remove()},this.getInput=function(){return r.editDialog.input},r.dismiss=this.dismiss,r.submit=function(){(r.editDialog.$invalid?t.reject():k.isFunction(n)?t.when(n(r.editDialog.input)):t.resolve()).then(function(){r.dismiss()})}}],locals:{save:n.save},scope:{cancel:n.cancel||"Cancel",messages:n.messages,model:n.modelValue,ok:n.ok||"Save",placeholder:n.placeholder,title:n.title,size:e},template:'<md-edit-dialog><div layout="column" class="md-content"><div ng-if="size === \'large\'" class="md-title">{{title || \'Edit\'}}</div><form name="editDialog" layout="column" ng-submit="submit(model)"><md-input-container md-no-float><input name="input" ng-model="model" md-autofocus placeholder="{{placeholder}} "'+function(){var e='type="'+(n.type||"text")+'"';for(var t in n.validators)e+=" "+t+'="'+n.validators[t]+'"';return e}()+'><div ng-messages="editDialog.input.$error"><div ng-repeat="(key, message) in messages" ng-message="{{key}}">{{message}}</div></div></md-input-container></form></div><div ng-if="size === \'large\'" layout="row" layout-align="end" class="md-actions"><md-button class="md-primary" ng-click="dismiss()">{{cancel}}</md-button><md-button class="md-primary" ng-click="submit()">{{ok}}</md-button></div></md-edit-dialog>'}}return this.show=function(r){if(T)return a.reject();if(T=!0,!(r=k.extend({},c,r)).targetEvent)return u("options.targetEvent is required to align the dialog with the table cell.");if(!r.targetEvent.currentTarget.classList.contains("md-cell"))return u("The event target must be a table cell.");if(r.bindToController&&!r.controllerAs)return u("You must define options.controllerAs when options.bindToController is true.");r.target=r.targetEvent.currentTarget;var i,e=(i=r,a(function(t,e){var n=i.template;return n?k.isString(n)?t(n):void e("Unexpected template value. Expected a string; received a "+typeof n+"."):i.templateUrl?(n=o.get(i.templateUrl))?t(n):s(i.templateUrl).then(function(e){return t(e)},function(){return e("Error retrieving template from URL.")}):void e("Template not provided.")})),t=[e];for(var n in r.resolve)e=r.resolve[n],t.push(a.when(k.isFunction(e)?e():e));return(e=a.all(t)).catch(u),e.then(function(e){var t=e.shift();for(var n in r.resolve)r.resolve[n]=e.shift();return l(t,r)})},this.small=function(e){return this.show(k.extend({},e,t("small",e)))}.bind(this),this.large=function(e){return this.show(k.extend({},e,t("large",e)))}.bind(this),this}function a(s){function t(t,n,e,r){var i=new Array(2);function a(){n.prop("lastElementChild").firstElementChild.appendChild(s(k.element("<md-checkbox>").attr({"aria-label":"Select All","ng-click":"toggleAll()","ng-checked":"allSelected()","ng-disabled":"!getSelectableRows().length"}))(t)[0])}function o(e){return k.element(e).controller("mdSelect")}t.allSelected=function(){var e=t.getSelectableRows();return e.length&&e.every(function(e){return e.isSelected()})},t.getSelectableRows=function(){return r.getBodyRows().map(o).filter(function(e){return e&&!e.disabled})},t.selectAll=function(){r.getBodyRows().map(o).forEach(function(e){e&&!e.isSelected()&&e.select()})},t.toggleAll=function(){return t.allSelected()?t.unSelectAll():t.selectAll()},t.unSelectAll=function(){r.getBodyRows().map(o).forEach(function(e){e&&e.isSelected()&&e.deselect()})},t.$watchGroup([function(){return r.$$rowSelect},r.enableMultiSelect],function(e){var t;e[0]!==i[0]?e[0]?(n.children().prepend('<th class="md-column md-checkbox-column">'),e[1]&&a()):Array.prototype.some.call(n.find("th"),function(e){return e.classList.contains("md-checkbox-column")&&e.remove()}):e[0]&&e[1]!==i[1]&&(e[1]?a():(t=n.prop("lastElementChild").firstElementChild).classList.contains("md-checkbox-column")&&k.element(t).empty()),k.copy(e,i)})}return{bindToController:!0,compile:function(e){return e.addClass("md-head"),t},controller:function(){},controllerAs:"$mdHead",require:"^^mdTable",restrict:"A",scope:{order:"=?mdOrder",onReorder:"=?mdOnReorder"}}}function o(d,h){return{bindToController:!0,controller:function(){},controllerAs:"$mdSelect",link:function(t,n,e,r){var i=r.shift(),a=r.shift(),o=h(e.mdSelectId);if(i.id=o(i.model),a.$$rowSelect&&i.id)if(a.$$hash.has(i.id)){var s=a.selected.indexOf(a.$$hash.get(i.id));-1===s?a.$$hash.purge(i.id):a.$$hash.equals(i.id,i.model)||(a.$$hash.update(i.id,i.model),a.selected.splice(s,1,i.model))}else a.selected.some(function(e,t){if(o(e)===i.id)return a.$$hash.update(i.id,i.model),a.selected.splice(t,1,i.model),!0});function c(){return""===e.mdAutoSelect||i.autoSelect}function l(){var e;n.prepend((e=k.element("<md-checkbox>").attr({"aria-label":"Select Row","ng-click":"$mdSelect.toggle($event)","ng-checked":"$mdSelect.isSelected()","ng-disabled":"$mdSelect.disabled"}),k.element('<td class="md-cell md-checkbox-cell">').append(d(e)(t)))),c()&&n.on("click",f)}function u(e){i.id&&(a.$$hash.has(i.id)?-1===e.indexOf(a.$$hash.get(i.id))&&a.$$hash.purge(i.id):-1!==e.indexOf(i.model)&&a.$$hash.update(i.id,i.model))}function f(e){t.$applyAsync(function(){i.toggle(e)})}i.isSelected=function(){return!!a.$$rowSelect&&(i.id?a.$$hash.has(i.id):-1!==a.selected.indexOf(i.model))},i.select=function(){i.disabled||(a.enableMultiSelect()?a.selected.push(i.model):a.selected.splice(0,a.selected.length,i.model),k.isFunction(i.onSelect)&&i.onSelect(i.model))},i.deselect=function(){i.disabled||(a.selected.splice(a.selected.indexOf(i.model),1),k.isFunction(i.onDeselect)&&i.onDeselect(i.model))},i.toggle=function(e){return e&&e.stopPropagation&&e.stopPropagation(),i.isSelected()?i.deselect():i.select()},t.$watch(function(){return a.$$rowSelect},function(e){e?l():(Array.prototype.some.call(n.children(),function(e){return e.classList.contains("md-checkbox-cell")&&n[0].removeChild(e)}),c()&&n.off("click",f))}),t.$watch(c,function(e,t){e!==t&&(a.$$rowSelect&&e?n.on("click",f):n.off("click",f))}),t.$watch(i.isSelected,function(e){return e?n.addClass("md-selected"):n.removeClass("md-selected")}),t.$watch(a.enableMultiSelect,function(e){a.$$rowSelect&&!e&&a.selected.splice(1)}),a.registerModelChangeListener(u),n.on("$destroy",function(){a.removeModelChangeListener(u)})},require:["mdSelect","^^mdTable"],restrict:"A",scope:{model:"=mdSelect",disabled:"=ngDisabled",onSelect:"=?mdOnSelect",onDeselect:"=?mdOnDeselect",autoSelect:"=mdAutoSelect"}}}function c(){var n={};this.equals=function(e,t){return n[e]===t},this.get=function(e){return n[e]},this.has=function(e){return n.hasOwnProperty(e)},this.purge=function(e){delete n[e]},this.update=function(e,t){n[e]=t}}k.module("md.table.templates",["md-table-pagination.html","md-table-progress.html","arrow-up.svg","navigate-before.svg","navigate-first.svg","navigate-last.svg","navigate-next.svg"]),k.module("md-table-pagination.html",[]).run(["$templateCache",function(e){e.put("md-table-pagination.html",'<div class="page-select" ng-if="$pagination.showPageSelect()">\n  <div class="label">{{$pagination.label.page}}</div>\n\n  <md-select virtual-page-select total="{{$pagination.pages()}}" class="md-table-select" ng-model="$pagination.page" md-container-class="md-pagination-select" ng-change="$pagination.onPaginationChange()" ng-disabled="$pagination.disabled" aria-label="Page">\n    <md-content>\n      <md-option ng-repeat="page in $pageSelect.pages" ng-value="page">{{page}}</md-option>\n    </md-content>\n  </md-select>\n</div>\n\n<div class="limit-select" ng-if="$pagination.limitOptions">\n  <div class="label">{{$pagination.label.rowsPerPage}}</div>\n\n  <md-select class="md-table-select" ng-model="$pagination.limit" md-container-class="md-pagination-select" ng-disabled="$pagination.disabled" aria-label="Rows" placeholder="{{ $pagination.limitOptions[0] }}">\n    <md-option ng-repeat="option in $pagination.limitOptions" ng-value="option.value ? $pagination.eval(option.value) : option">{{::option.label ? option.label : option}}</md-option>\n  </md-select>\n</div>\n\n<div class="buttons">\n  <div class="label">{{$pagination.min()}} - {{$pagination.max()}} {{$pagination.label.of}} {{$pagination.total}}</div>\n\n  <md-button class="md-icon-button" type="button" ng-if="$pagination.showBoundaryLinks()" ng-click="$pagination.first()" ng-disabled="$pagination.disabled || !$pagination.hasPrevious()" aria-label="First">\n    <md-icon md-svg-icon="navigate-first.svg"></md-icon>\n  </md-button>\n\n  <md-button class="md-icon-button" type="button" ng-click="$pagination.previous()" ng-disabled="$pagination.disabled || !$pagination.hasPrevious()" aria-label="Previous">\n    <md-icon md-svg-icon="navigate-before.svg"></md-icon>\n  </md-button>\n\n  <md-button class="md-icon-button" type="button" ng-click="$pagination.next()" ng-disabled="$pagination.disabled || !$pagination.hasNext()" aria-label="Next">\n    <md-icon md-svg-icon="navigate-next.svg"></md-icon>\n  </md-button>\n\n  <md-button class="md-icon-button" type="button" ng-if="$pagination.showBoundaryLinks()" ng-click="$pagination.last()" ng-disabled="$pagination.disabled || !$pagination.hasNext()" aria-label="Last">\n    <md-icon md-svg-icon="navigate-last.svg"></md-icon>\n  </md-button>\n</div>')}]),k.module("md-table-progress.html",[]).run(["$templateCache",function(e){e.put("md-table-progress.html",'<tr>\n  <th colspan="{{columnCount()}}">\n    <md-progress-linear ng-show="deferred()" md-mode="indeterminate"></md-progress-linear>\n  </th>\n</tr>')}]),k.module("arrow-up.svg",[]).run(["$templateCache",function(e){e.put("arrow-up.svg",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M4 12l1.41 1.41L11 7.83V20h2V7.83l5.58 5.59L20 12l-8-8-8 8z"/></svg>')}]),k.module("navigate-before.svg",[]).run(["$templateCache",function(e){e.put("navigate-before.svg",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>')}]),k.module("navigate-first.svg",[]).run(["$templateCache",function(e){e.put("navigate-first.svg",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M7 6 v12 h2 v-12 h-2z M17.41 7.41L16 6l-6 6 6 6 1.41-1.41L12.83 12z"/></svg>')}]),k.module("navigate-last.svg",[]).run(["$templateCache",function(e){e.put("navigate-last.svg",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M15 6 v12 h2 v-12 h-2z M8 6L6.59 7.41 11.17 12l-4.58 4.59L8 18l6-6z"/></svg>')}]),k.module("navigate-next.svg",[]).run(["$templateCache",function(e){e.put("navigate-next.svg",'<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/></svg>')}]),k.module("md.data.table",["md.table.templates"]),k.module("md.data.table").directive("mdBody",function(){return{compile:function(e){e.addClass("md-body")},restrict:"A"}}),k.module("md.data.table").directive("mdCell",function(){function n(e,t,n,r){var i=t.find("md-select"),a=r.shift(),o=r.shift();n.ngClick&&t.addClass("md-clickable"),i.length&&(i.on("click",function(e){e.stopPropagation()}),t.addClass("md-clickable").on("click",function(e){e.stopPropagation(),i[0].click()})),a.getTable=o.getElement,e.$watch(function(){return o.$$columns[Array.prototype.indexOf.call(t.parent().children(),t[0])]},function(e){e&&(e.numeric?t.addClass("md-numeric"):t.removeClass("md-numeric"))})}return{controller:function(){},compile:function(e){var t=e.find("md-select");t.length&&t.addClass("md-table-select").attr("md-container-class","md-table-select");return e.addClass("md-cell"),n},require:["mdCell","^^mdTable"],restrict:"A"}}),k.module("md.data.table").directive("mdColumn",n),n.$inject=["$compile","$mdUtil"],k.module("md.data.table").decorator("$controller",r).factory("$mdEditDialog",i),r.$inject=["$delegate"],i.$inject=["$compile","$controller","$document","$mdUtil","$q","$rootScope","$templateCache","$templateRequest","$window"],k.module("md.data.table").directive("mdFoot",function(){return{compile:function(e){e.addClass("md-foot")},restrict:"A"}}),k.module("md.data.table").directive("mdHead",a),a.$inject=["$compile"],k.module("md.data.table").directive("mdRow",function(){function t(e,t,n,r){function i(e){return t[0].contains(e[0])}if(-1!==r.getBodyRows().indexOf(t[0])){var a=k.element('<td class="md-cell">');e.$watch(function(){return r.$$rowSelect},function(e){!e||n.mdSelect?i(a)&&a.remove():i(a)||t.prepend(a)})}}return{compile:function(e){return e.addClass("md-row"),t},require:"^^mdTable",restrict:"A"}}),k.module("md.data.table").directive("mdSelect",o),o.$inject=["$compile","$parse"],k.module("md.data.table").directive("mdTable",function(){function e(e,t,n,r){var i,a=this,o=[],s=[];a.$$hash=new c,a.$$columns={},a.columnCount=function(){return a.getRows(t[0]).reduce(function(e,t){return t.cells.length>e?t.cells.length:e},0)},a.getRows=function(e){return Array.prototype.filter.call(e.rows,function(e){return!e.classList.contains("ng-leave")})},a.getBodyRows=function(){return Array.prototype.reduce.call(t.prop("tBodies"),function(e,t){return e.concat(a.getRows(t))},[])},a.getElement=function(){return t},a.getHeaderRows=function(){return a.getRows(t.prop("tHead"))},a.enableMultiSelect=function(){return""===e.multiple||r.$eval(e.multiple)},a.waitingOnPromise=function(){return!!o.length},a.queuePromise=function(e){e&&1===o.push(k.isArray(e)?n.all(e):n.when(e))&&function e(){if(!o.length)return r.$applyAsync();o[0].finally(function(){o.shift(),e()})}()},a.registerModelChangeListener=function(e){s.push(e)},a.removeModelChangeListener=function(e){var t=s.indexOf(e);-1!==t&&s.splice(t,1)},e.hasOwnProperty("mdProgress")&&r.$watch("$mdTable.progress",a.queuePromise),r.$watch(function(){return""===e.mdRowSelect||a.rowSelect},function(e){e&&(a.selected?k.isArray(a.selected)||console.error("Row selection: Expected an array. Recived "+typeof a.selected+"."):console.error("Row selection: ngModel is not defined."))?(a.$$rowSelect=!0,i=r.$watchCollection("$mdTable.selected",function(t){s.forEach(function(e){e(t)})}),t.addClass("md-row-select")):function(){a.$$rowSelect=!1,k.isFunction(i)&&i();t.removeClass("md-row-select")}()})}return e.$inject=["$attrs","$element","$q","$scope"],{bindToController:!0,compile:function(e,t){if(e.addClass("md-table"),t.hasOwnProperty("mdProgress")){var n=e.find("tbody")[0],r=k.element('<thead class="md-table-progress" md-table-progress>');n&&e[0].insertBefore(r[0],n)}},controller:e,controllerAs:"$mdTable",restrict:"A",scope:{progress:"=?mdProgress",selected:"=ngModel",rowSelect:"=mdRowSelect"}}}),k.module("md.data.table").directive("mdTablePagination",function(){function e(e,t,n){var r=this,i={page:"Page:",rowsPerPage:"Rows per page:",of:"of"};function a(e){return 0<parseInt(e,10)}r.label=k.copy(i),r.eval=function(e){return n.$eval(e)},r.first=function(){r.page=1,r.onPaginationChange()},r.hasNext=function(){return r.page*r.limit<r.total},r.hasPrevious=function(){return 1<r.page},r.last=function(){r.page=r.pages(),r.onPaginationChange()},r.max=function(){return r.hasNext()?r.page*r.limit:r.total},r.min=function(){return a(r.total)?r.page*r.limit-r.limit+1:0},r.next=function(){r.page++,r.onPaginationChange()},r.onPaginationChange=function(){k.isFunction(r.onPaginate)&&t.nextTick(function(){r.onPaginate(r.page,r.limit)})},r.pages=function(){return a(r.total)?Math.ceil(r.total/(a(r.limit)?r.limit:1)):1},r.previous=function(){r.page--,r.onPaginationChange()},r.showBoundaryLinks=function(){return""===e.mdBoundaryLinks||r.boundaryLinks},r.showPageSelect=function(){return""===e.mdPageSelect||r.pageSelect},n.$watch("$pagination.limit",function(e,t){isNaN(e)||isNaN(t)||e===t||(r.page=Math.floor((r.page*t-t+e)/(a(e)?e:1)),r.onPaginationChange())}),e.$observe("mdLabel",function(e){k.extend(r.label,i,n.$eval(e))}),n.$watch("$pagination.total",function(e,t){isNaN(e)||e===t||r.page>r.pages()&&r.last()})}return e.$inject=["$attrs","$mdUtil","$scope"],{bindToController:{boundaryLinks:"=?mdBoundaryLinks",disabled:"=ngDisabled",limit:"=mdLimit",page:"=mdPage",pageSelect:"=?mdPageSelect",onPaginate:"=?mdOnPaginate",limitOptions:"=?mdLimitOptions",total:"@mdTotal"},compile:function(e){e.addClass("md-table-pagination")},controller:e,controllerAs:"$pagination",restrict:"E",scope:{},templateUrl:"md-table-pagination.html"}}),k.module("md.data.table").directive("mdTableProgress",function(){return{link:function(e,t,n,r){e.columnCount=r.columnCount,e.deferred=r.waitingOnPromise},require:"^^mdTable",restrict:"A",scope:{},templateUrl:"md-table-progress.html"}}),k.module("md.data.table").directive("virtualPageSelect",function(){function e(e,t){var n=this,r=e.find("md-content");function i(e,t){return Math.min(e,isFinite(t)&&0<t?t:1)}function a(e){if(n.pages.length>e)return n.pages.splice(e);for(var t=n.pages.length;t<e;t++)n.pages.push(t+1)}n.pages=[],r.on("scroll",function(){r.prop("clientHeight")+r.prop("scrollTop")>=r.prop("scrollHeight")&&t.$applyAsync(function(){a(i(n.pages.length+10,n.total))})}),t.$watch("$pageSelect.total",function(e){a(i(Math.max(n.pages.length,10),e))}),t.$watch("$pagination.page",function(e){for(var t=n.pages.length;t<e;t++)n.pages.push(t+1)})}return e.$inject=["$element","$scope"],{bindToController:{total:"@"},controller:e,controllerAs:"$pageSelect"}})}(window,angular),angular.module("angular-toasty",[]),angular.module("angular-toasty").directive("toasty",["toasty","$timeout","$sce",function(e,g,_){return{replace:!0,restrict:"EA",scope:!0,link:function(f,e,t){var d=0,h=["default","material","bootstrap"];function p(n){n?angular.forEach(f.toasty,function(e,t){e.id==n&&(f.$broadcast("toasty-cleared",f.toasty[t]),e.onRemove&&angular.isFunction(e.onRemove)&&e.onRemove.call(f.toasty[t]),f.toasty.splice(t,1),f.$$phase||f.$digest())}):(angular.forEach(f.toasty,function(e,t){e.onRemove&&angular.isFunction(e.onRemove)&&e.onRemove.call(f.toasty[t])}),f.toasty=[],f.$broadcast("toasty-cleared"))}function m(e,t,n){return 0!=t[n]&&(!!t[n]||e[n])}f.position="",f.toasty=[],f.$on("toasty-new",function(e,t){var n=t.config,r=t.options;f.position||(f.position="toasty-position-"+n.position),function(e,t){d++;var n,r=m(e,t,"sound"),i=m(e,t,"showClose"),a=m(e,t,"clickToClose"),o=m(e,t,"html"),s=m(e,t,"shake");n=t.theme&&-1<h.indexOf(t.theme)?t.theme:e.theme;f.toasty.length>=e.limit&&f.toasty.shift();r&&document.getElementById("toasty-sound").play();var c={id:d,title:o?_.trustAsHtml(t.title):t.title,msg:o?_.trustAsHtml(t.msg):t.msg,showClose:i,clickToClose:a,sound:r,shake:s?"toasty-shake":"",html:o,type:"toasty-type-"+t.type,theme:"toasty-theme-"+n,onAdd:t.onAdd&&angular.isFunction(t.onAdd)?t.onAdd:null,onRemove:t.onRemove&&angular.isFunction(t.onRemove)?t.onRemove:null,onClick:t.onClick&&angular.isFunction(t.onClick)?t.onClick:null,onAccept:t.onAccept&&angular.isFunction(t.onAccept)?t.onAccept:null,onReject:t.onReject&&angular.isFunction(t.onReject)?t.onReject:null};f.toasty.push(c),t.onAdd&&angular.isFunction(t.onAdd)&&t.onAdd.call(c);f.$broadcast("toasty-added",c),0!=t.timeout&&(t.timeout||e.timeout)&&(l=f.toasty[f.toasty.length-1],u=t.timeout||e.timeout,l.timeout=g(function(){p(l.id)},u));var l,u}(n,r)}),f.$on("toasty-clear",function(e,t){p(t.id)}),f.close=function(e){p(e)},f.clickToasty=function(e){f.$broadcast("toasty-clicked",e),e.onClick&&angular.isFunction(e.onClick)&&e.onClick.call(e),e.clickToClose&&p(e.id)}},template:'<div id="toasty" ng-class="[position]"><audio id="toasty-sound" src="data:audio/wav;base64,UklGRiQ9AABXQVZFZm10IBAAAAABAAEAIlYAAESsAAACABAAZGF0YQA9AAA4AFAASABAADgAQAAwACgAGAAoADAAIAAoADgAKAAgACAAKAA4ADgAMABIADgAQABIAFAAWABQAHAASABYAFAAUAA4AEAAMAAwADgAQABQAFAASABYAFgAaABwAHgAeABoAGgAaABoAGgAUABQAFAAWABQAEgASAA4AEAAOAAgADAAMABIAEAAOABAADAAQAAwADgAKAAwACAAIAAwACAAIAAwACgAGAAQABAAAAD4//D/2P/o/+j/8P/o/+D/0P/Y/9D/2P/I/8D/yP/g/8j/0P/Y/+j/2P/w/9D/2P/A/8D/yP/A/9D/yP/A/9D/0P/I/8j/yP+4/9j/6P/g/+D/2P/Y/+D/4P/Y/9j/4P/o/+j/0P/g/+D/4P/o/+D/4P/g/9D/4P/g/+D/4P/w/wAAIAAwABgAMABAADAAOAAwADAAKAAwADgAIAAYACAAAAAAAAgAIAAIABAACAAgACAAIAAgAAgAEAAIAAAAAAAAAOj/8P8AAAAA+P/4//j/+P/o/+j/6P/g/+j/+P8AAPD/6P/o//D/2P/o/9D/4P/w/+j/4P8IABAAAAAQABgAAAAAAAgAAAAAAPj/8P/w//D/6P/4//D/+P8AAPj/AAAAAAgACAD4//j/CAAAAPj/CAAAAAAAAAAQABgAIAA4ADgAMABIAEgAOAAwAFAAOABAAEAASABIAEAAOAAgACgAGAAwACAAKAAwADgAMAA4ADgAQABAADAAKAAYAPj/6P/4/+j/4P/I/8D/uP+w/8D/uP+o/7j/qP/A/9j/qP/I/9j/wP/A/8D/4P/g/9j/2P+4/8D/wP+w/9D/wP/Q/9j/0P/Q/8D/2P/I/9j/6P/o/+j/+P/o//j/AAAAAAgAEAAIAAAAAAAIAAgAEAAYABAACAAgACAAAAAYADgAMABIAEAAKAA4ADAASABQAFAAUABYAEAAKAAQAAgAEAAQACgAGAAYABgAGAAgACAAMAAgADgAMAAwADgAMABIAEAASAAoAEgAQABYADAAUABQADgAMAAoACgAOABAAEAAMAAoACgAIAAgACAAOAAwACgAKAAoADAAKAAwACAAIAAYADAAKAAgACgAIAAQABgAGAAIAAgAAAAIAAAAAAD4//j/EAAYAAAAAAAQAPD/GAAgABAAEAAYACAAOABIAEAAMABAACgAKAAoAAgAEAAgABgACAAQAAgAEAAgAAgAAAAAABgACAAYABAACAAQAAAAAAAQAAgA+P/w/+j/4P/w/+D/6P/o//D/2P/g/9D/6P/o/8D/wP+w/7j/0P/I/9D/wP/g/9j/6P/g/+D/2P/Y/9D/2P/g/9j/0P+w/6j/4P/Y/9j/2P/Y/9D/0P/A/8D/8P+w/8D/uP/A/8j/0P/Q/9D/0P/w//D/2P/g/+D/6P8AAPD/6P/g/+j/6P/Q/+D/4P/4/+j/+P/o/+D/8P/4/wAAAAD4//j/6P/Y/9D/yP/g/+j/2P/Y/9j/yP/Q/9D/yP/Q/9D/yP+4/6D/qP+g/7j/sP+4/8D/yP/Y/8D/wP/Q//D/0P/g/8j/wP/A/7j/qP+w/7D/sP+w/6j/sP+w/7j/uP/A/8D/2P/A/+D/6P/o/+j/4P/Y/+j/2P/Q/9j/4P/o//j/EAAAAAgA+P/4//D/AAAAAAAAAAD4//j/8P/4/wAAIAAQACAAEAAIABgACAAQADAAKAAgACAAMABAAEgAMAAwAFgAWABgAFgAQABIAFgAYABYAGgAUABwAEgAQABAADgAOAA4ADgAMAAgACgAKAAoACgAMAAoACAAEAAQABAACAAIAAAAAAD4/wAAEAAIAPj/6P/Y//D/AAAAAOj/4P/w//j/8P8IAPj/EAAAAPj/6P/4/+D/4P/Y/9j/2P/g//D/8P/o/+D/6P8gABAACAD4/yAAIABAADgAMAA4ADgAIAAQACAAIAAgADAAKAAwAEgAOAA4AEAAQABIAEAAMABAAEAAMABQADAAYABAAEgAQABQADAAUABYABgAQABAAEAAKABIADAAIAAYABgAAAAgACAAGAAgAAgAGAAAAAgACAAQABAACAAQAPD/IAAoAPD/CAAgAPj/4P/w//D/+P/g/9j/2P/Y/9j/6P/I/6j/4P/Y/+D/0P/A/8D/yP/A/8D/2P8AAPD/CAAAAAAAGAAQAOj/GAAoAPD/GAAYAPD/IAAgAOj/GAAgAAAACABQACgAEABQADAAKADw//j/+P8IABAAGAAYADgAEAD4/8D/2P8AAFAAKAAoAPj/8P8QAOj/6P/Q/7j/iP+I/7j/8P8oAPj/aP9w/5j/+P8YAAAACAB4/5j/CAAQAOj/GADg/1D/uP8oAHAAKADw/4D/sAAwABAA4P9I/2j/AACAAXAAiABo/zAAMAAA/+D9EP7w/2AAKAGAAOAAiP8YAFD/YP5I/7j+mP2g/jAAIAPQAYAAMP/Y/8D/SP6g/ID9yP/QAYgCiAGQAMgAKAD4/0j+CP9g/ij9AP+QAAACQAAwADAAmP8gATD/cP6Y/rD/gADA/7j8iP04/WD/QAEYATD+yP9g/Lj8WP/I/tAAIP6I/wj+uP8IAagA8P9g/gj+cAOw/dD+QADYAYgDSP8QAhj8uP5wAXj+wAMIAfgBsP+w/7gBmAMwA4AAmAC4AAj/SP0IAegEoAWw/lD7iPrY/IACuP+QA4gEqAgAACj4CAFQ+9gB8P9wAjgDOP5QBbgCSAfgAfD/IP+Y/qgFmACIAsAEIP0wBTAAeAGo/OgFWP2oDrADoAZAAqgK+P5ACsgBCALwD0AL0AlwBhgCiP9o/dj7+AJg/6AEWAXICej7KADYAjgCEP94B4j4SAEY/yAAWP4Y/8D8QACIAYgDUP4w/fj98AEYANgDGAIoAJD90AcIBXgC4AeYB+D9OP0Q+IAAWAKQCPgFsAZI/AADmPxQBKD/kABIAcAFqP+IBnAH4AQoApgSYP4QDmjvwAGgBdgCiAJw+wgDAAE4B6gT8P6wB9D78AdQCbj/aACo/oAAWPtYAvj/IPug+MgDQAJQA7D7EPdI/yD2uPSg+dDyyPWw7pjysOvY9vjugO8Y6ZjfeOZw62jkgOXA4ijgsOSw4dDdKOBY1QjTMNUg1GDciNfY0ADbUNhA29DUqNQY3HDe4Ncg1QjVoND41aDUcNno2QDWYNdw2tDjUOEA5QDpoO3Y70D46PFY8vj3iP4QBRgBAAiADVAP6BDIFogfqCHQKTgzcDGgNfg48EPQRzBGCEvQUMhQ4FLgV2BZ8FpAUnBVUFhgUehRCFDYUShKeEMYQhg9uDCAMfgrACUwG8AUcBXYDBAGuALA/oD0mOt451jlyOAg3vDaQNhw1BDRgNBgzVDOIM+Y04jR0NJA0pDY0N0g3rjlUOow7tDt4PdA/agACASYCGAOSBHgEhAX8ByQH1AneCd4KbApACqALhAv+C4gMLgvuC/4MPgqyCmIJRgfAB2QGTgTyA6QCjgHcAK4+oj4MPHI7BDrYOgg4fjcSNrg1zDUINHAz2jNuMqAybjJaMewydjJYM7wz4DSgNRQ2XjciOP46ODrmPCg9UD5SP1YAcAE4AqYDDgSUBPAGKgb4BqYHiAg6CFoIFAj8CNgIvggoCBoHqAawBUwEygQMAtoB2gCYP6Y+Pj3APFA7UDqeOfw4qDeQN7I2nDYWNUQ1qjRCNJg0KjRANKQ1NDWGNfo2qDckN/44NjnyOuY8LD1OPvI/lgEAAegCqgOwBGoGFgZKB6IH3Ak8CHYJgAnqCh4KZgpACqQJ8gnICdQJUghuCDQHFAYMBPgD+gMaAfoBQgB2PwQ+LD1OPLo7kDsOOwo6ojn4OYw5vDj4OO45CDk2OSQ5MDnuOlI7SjukO9Q8yD2cPuY/LgBoAQAB0ALUA4wEVgTMBUQF9AYUBloG2ga+BlwGzgamBlIF3gWSBQoE7ARQBHADfAJaAdQA+AAaP14+iD2WPKQ8fjsCOuI6EDmqOM44ujhyOAQ30DgIOIg4tDiyOPA5ODlgOgw60DsIO+Y8hD22PmY+xD/cAB4AhgHoAgoDKAOOBIgFNAVOBcAGPAWgBewF/AWCBeQF7gUuBMAEuAPGA2ACfgJUAd4BWADKALg/pD6APo49sjz+PAg8PjtMO7Q7mjtEOpg6xjs2Ozg7MDtMO9A8HDySPQ49oD3iPpI/KD+QAEwBMgFaAjIC7gNAA4gDrAQCBGQEtATABVAFHgUgBR4E5gR4BB4DwgNAAzwCQAHUAQQA/gAeP5w/ID6IPcY9Yj0cPIY8RDu6O3g6jjrMOqY6SDpMOo462DsqO5g7uDvmO+A8nj0OPbo+GD7wP4QAbgDGAUYBkAJQAzIDbAQaBE4FMgTWBa4FogWABZAFiAXGBbIFfgUgBSoE7gRyA4IDXgKwAjYBUgEsAJo/xj9oPoA+Zj28PXg8xDycPEo8NDuIO1g7CjsqOo46/jrGO0w7WjvSPII80D0CPWo9hD5WPtA/Xj+uABYA+gFcAcQCmgLWAxYDSAQQBHYETgS8BKIEzATGBPwEWARmBGgEEgQUA+4DlANKAuYCegHcAWoA9AB4AA4/xj+aP3w+xD6IPlI95j26PV49qD1wPWA9RD1mPRw9aD10PUo9yD5kPp4+qD7SP1I/pj+eAA4APAAUAK4A3gECAWwBzAGuAfgBuAGUAeQBugGgAYgBqgEkAMIA2ACoAAYAIj/UP/Y/Wj98Psg+wj6CPhY9wD28PUo9cD1iPWY9VD14PT49MD1uPXQ9QD26Pao+Lj4OPqg+6D8oP2I/nAAUAKAA2AF0AbwB3AIMAgwCbAJcAsQCzAM8AzgDDgNSA04DVAMeAswC6AJsAjwBxgHAAY4BQgE8AHQAEgAyP8I/hj9OP3w+3j6EPqw+LD46Peo9tj32PfI+Gj4yPiA+dj5ePqo+kj8cP3I/Sj/WAAwAVgCYAKQBKgEwAUwBuAHuAhQCUgKqAkwCpAJWAmoCOAIaAiwCOAHEAgAB/AFUATQAtAB0P8A/9D9yP1I/MD6EPqI+Ej4KPco9nD20PUg9Sj0kPMA9GDzGPMQ8/DyiPPQ9MD1IPeg95j44PiA+RD6cPqo++D8aP2Y/qD/SABoAegBsAJ4A9ADUAT4BAgFcAVgBTAFuASQBHAE2AOgAzADaAMIAxgCoAEIAFj/wP4g/ij9uPxo/BD8ePvA+kD6uPm4+dD5aPlw+Yj5QPmY+WD50Pkw+jj6APtg+0j8QP0g/gD/OP/Y/xAAkP9oAFAA4AFIAvACCARwBIAEiASIBBgFgAXgBDgG2AUoBhgFSAVoBVgFKAVwBDAEgARYBAAE4ATQA3AEsANIA+ACqALwAhgDIAOwA6AD8AKAAzADMAOoAuACGAM4A3gDMANQA5gDCAQABLgEgAVoBQgGeAWgBfAEgARgBPADuANgA3gDgAP4A3ADUAMYA2gC8AFwAdgAWAAAAPj/oP8g/0j+yP2g/Xj9KP1Q/Bj9mPxA/Cj8WPzQ+6D7kPuo+1D7mPvg+1j8aP2A/Wj9UPwg/BD8gPwY/aj9SP6o/sj+gP6g/qj+gP5A/zj/mP+w/xD/QP9o/nj+IP7A/dD9yP3w/Rj+2P34/eD9SP3I/JD8GPz4+0D8EPwo/Cj8+PuQ+9D7cPsQ+8j7+Ptg/Aj8YPzI/PD82PyY/Aj9UP1g/lj+eP8IAEgAOADo/wAAUAAAAXABOAKAApgC6AL4AgADkAMwA/gDAATgA6ADiAOQA6ADSAMgA8gCyAGQAbAB2AGYASABiADwAAgAYP+o/iD+iP2Q/ZD9gP14/eD8iPyo+zj7APtQ+wD7EPsQ+zD7CPv4+nD72PvY+3D8qP2g/eD9cP6w/rj+6P4IAOj/OACYAHgBCALQAngDmAMIBAAE+APYA2AE4ATYBcAF4AWoBTAFUAXYBJAEqAQQBVgFYAXgBHAEiAO4AyADAAPwAhAD4AJYAoACGAKoARgBAAFYADAAmACAAKgAEADQ/yAA8P/A/wAAWACwAEgAuACoACAA4P9gAHAA0ACAAJAAsAAAATABAAF4ARABKAHgAJgAsABwAAABmABQAEAA2P+o/2j/eP+A/1j/WP8Y/4D/KP/Q/tj+uP7Q/pj+oP7A/rD+0P7Y/rD+gP5o/kj+OP64/mj+kP4I/yD/EP9I/4D/sP/Y/ygASAA4AHAAkADgAPAAmACIAKAAwAA4ATgB0AG4AZgBYAE4AcgAsACwAHgAsABYAIgAWABoAPD/sP+o/+j+0P7Y/gD/cP74/Qj+IP6A/Yj9QP0o/VD9cP1Y/ZD9CP3w/CD9+Pz4/PD84Px4/Vj9iP24/Yj9kP3Q/fD9aP7Y/lj/uP/Y/xgAeAB4ALgAMAFgAcgBYAJoApACaAIoAhgCiAJwAkACQAIwAlACQAIYAngCCALQAaAB8AC4AGgAAAD4/+j/UP/4/rj+4P2Q/cj9iP1A/Tj9QP1Y/cj8+Pzo/Mj8EP2I/XD9oP3w/Rj+KP5A/jj+aP7w/lD/yP+AAAgBmAHgAYACwALwAmgDoAMgBFAEgASYBDgEcAQIBfgEAAU4BUAFQAV4BUgFCAW4BGAECARwA+gCoAJgAigCkAEQAXAA6P9o//j+2P5w/hj+cP3A/Gj8KPwI/Nj7mPtA++D6kPp4+tD6uPq4+sD6APvQ+sD6yPpo+wj8CPwQ/Hj8UPzg/Ej9YP1o/dj9SP54/oj+2P5I/zj/eP+Y/5D/sP8QAFgAkACAAHgAWAAYALj/QP84/7j+2P7w/hD/8P6I/nj+gP54/kD+OP4w/kD+aP54/nD+0P6w/hD/GP8o/1D/gP8IAEgA+ABoAbABoAJYA4gD8ANwBNAEMAWIBegF8AX4BRAGeAagBrgGyAaoBoAGQAZABugFqAVgBRgFqARwBMADaAPwApgCwAHYACAAYP9Y/+D+mP4w/sD9KP34/ID8IPwQ/Pj7EPwA/OD7uPuw+4D7APwY/Ej8sPwY/RD9mP0Q/oD+2P7w/rj/0P+IABgBqAHYAUACqALYAvgCCAOIA8ADOATQA9gD+AMABJgDsANIAyADmAJIAgAC0AGgAVABEAFAAMj/OP/A/nD+6P2g/UD98PzA/HD8GPy4+5j7kPt4+zD7OPtI+2j7oPuY++D78Pvw+1j8uPzo/FD9oP0g/mj+uP4w/4j/yP9wABABUAGoAZgB8AEAAgAC6AEwAggCSAJIAiAC0AFYAfgA2ADQAIAAeAD4/6D/WP9A/4j+aP64/aD9cP0I/dj8yPyI/GD8iPww/Cj8EPxI/KD8uPz4/Kj9yP1A/sj+gP/Y/wgAiADQAIABEAKwAmgDIATIBAgFYAXIBSgGsAYoB7gH6AcYCCgIsAeIB1gHIAfIBqgGGAbgBWgF+ASIBNgDMAOIAugBmAGwAOj/KP9I/rD96PxA/JD72PqI+jD6wPmQ+Yj5QPnw+GD4gPiA+MD4MPlo+ej5+PlA+pj68Pqg+zD84PyY/Uj+2P6I/9j/SAD4AJgBAAKIAsACMAOIA9ADOAQYBCAEIAT4AxgEyAOAA3gDOAPAAnAC6AFoAeAAoABAAND/UP/I/ij+wP1o/fj8oPwY/Mj7YPuY+8D7sPug+6D7iPuo+9D76Ps4/LD8SP2o/Sj+cP44/3j/8P+AABABmAEQAsACKAO4A/ADWASIBOgESAVwBdgF6AXIBZgFkAVwBTgFAAUABaAEeAQIBJgDMAPQAmAC0AEwAeAAQAC4/xj/oP74/XD9yPxg/Mj7IPvw+qj6aPoY+uj54PnI+bD5mPl4+Xj5ePn4+Xj6IPsg+6j78PsY/KD8UP0w/rD+iP9AANAAWAEIAsACgAMgBHAE4AQYBdAFQAaoBvgG4AYoBygHSAc4B1AHYAdQB2AHEAfIBiAG2AWQBSAFsAQABHAD2AI4AtABEAGQADAAkP8Q/3D+GP6w/Uj9KP3Y/JD8EPzY+8j7ePu4+6D7uPvo+7D7qPvY++j7OPyY/BD9gP3g/Sj+WP6A/tj+EP+o/+j/OACAAIgA+ABoAcABsAHIAeABIAJQAmACcAJIAlACMAIoAtABeAEwAQgBKAHYAKgAWADY/2D/OP8Y/7D+oP5w/jj+2P3I/aj9gP2I/Vj9EP3Q/PD8+Pw4/XD9eP1Q/Uj9kP2I/fj9SP6Q/rD+uP4A/xj/CP9o/1j/cP9g/4j/eP9w/5j/gP+Y/5j/sP/Q/yAAGAAwAIAAQABQADAAMABgAFgAiACIAFgAYABwAHgAIADQ/9j/IAAgAPj/MAA4AAgA+P/I/6j/yP/I/7j/qP9o/0D/SP8Y/xj/AP/g/qj+cP54/oD+gP64/oj+YP5Q/uD90P0o/nD+qP6Y/uD+GP8g/yj/UP94/+j/EABQALgAAAEQAXgB6AHIAQACUAJwAqgC8AIwA1gDIAMQAygDSANgA5ADoANwA4gDSANQAygDyAKYAlAC6AG4AUAB+AC4AHAA4P+o/xj/yP6I/lj+MP4A/rD9SP3o/KD8iPxQ/DD8KPw4/ED8aPyQ/ID8wPwI/UD9cP24/VD+6P6A/+D/KABYAMgAWAHYATgCsAIQA5AD0AMoBHgE+AQQBWAFiAWwBcgF8AUABhAGoAVoBSgF2ASoBIAEAASoAygDoAIQAlgBsAAoAIj/AP94/hj+cP24/Dj8sPs4+7D6YPr4+fD52Pnw+cj5sPmY+cD56Pko+rD6APt4++j7gPzQ/HD98P2g/ij/2P9QAMAAkAFAAnAC6AKIA+ADaATIBCAFiAWgBfgF4AXwBegFuAWABXAFSAUgBeAEgAQQBHgDCAOQAvgBaAEAAYgAIACY/0j/sP5I/gj+cP34/Lj8aPwI/DD8KPwo/BD8KPwo/Fj8aPyg/Cj9qP1A/pj+8P4I/5D/EACYABABkAH4AWgC+AIoA5AD0AP4AyAEQARoBIgEeASYBFgE+AN4AxAD2AKQApgCCAJQAdgAUAC4/wD/eP7I/SD9aPwA/Ij7GPvY+mj6wPlQ+RD58PjA+LD4wPiQ+Lj46Pj4+Dj5cPng+Wj62PpA++j7aPwA/Yj90P1I/sj+UP/w/6AAMAGoATACwAIYAxgDMAN4A7gDAAQIBPgDwAOwA4ADIAPYArgCQALgAZgBcAEwAbAASACg/xD/uP5A/kD++P0I/uD9qP1w/VD9+PwY/UD9QP2Q/aj94P3w/RD+aP7Y/ij/kP/A/xAAeADQABABcAHAAdAB+AE4AmgCkAKwAtgC+AIIAwADsAKIAnACUAIgAugBiAEwAdgAeAAoAOj/aP/4/qj+eP4o/gD+yP1o/UD9CP3Q/MD8yPwI/XD9WP1Y/Tj9cP2Q/cj9GP5w/vD+QP+I//D/KACAANgAQAG4ASACoALoAkADmAPIA+ADEARYBJAE2AToBBgF+ATwBOAEqASYBJgEYAQYBOADsANYAxgD6AIoAuABmAFgASgB0ACQAFgA+P/Q/4j/QP8Y/wD/2P7g/sD+wP7o/rD+0P7Q/rj+4P4A/zj/UP9o/5D/uP/g//D/AAAQACgASABYAIgAkAB4AJAAoABgACgAGAAIAAAA6P/Y/7D/kP9w/1D/+P6o/lj+OP5I/gD+8P2w/Xj9QP0I/QD9GP0g/UD9eP2Q/Zj9wP3Q/QD+SP6Q/uj+IP+Y/8j/CABIAIgA2AAYAXABoAEQAkACmALYAhgDWAOAA5gDoAOwA7ADyAOwA4ADYAMwA8gCiAJQAhAC+AGYAUgB6AC4AGgA8P+w/2j/CP+4/pD+UP44/vj9gP1Q/Sj9AP3o/Mj88Pzw/AD9CP0g/WD9iP2Y/dj9EP5A/qj+AP8o/5D/8P8gAHgAoADIABgBUAHAAdgBCAIQAjACMAIgAggCEAIIAvAByAGoAWABGAHIAIgAMAD4/8D/eP8o/+j+aP4w/vD9wP1w/Tj98PzQ/MD8sPy4/ID8aPxg/Fj8YPyY/Lj8CP1Y/Yj9qP2w/eD9AP6A/tD+SP9w/9j/EABoAMAAAAEwAVABmAGgAdgB+AEYAgACKAI4AhAC6AHgAegBwAHIAcABmAFAASgB2AC4AJgAcABgAGgASAAIAOj/yP9o/0D/cP9A/zj/OP8Q//j+0P7A/rj+kP5w/nj+gP5g/nj+mP6I/qD+gP6Y/nD+eP6A/mD+cP6I/mj+YP6Q/oD+kP6o/qD+0P6o/tD+2P7g/vj+CP8g/xj/QP9o/8D/4P/w/wAAGABQAHgAsAC4ABABWAGgAdAB+AEIAigCUAJgApgCgAKgAtgC6ALoAgADCAP4AtgCoAJwAkACIALwAeABuAGAATgBKAHIAKAAeAAYAAgAsP9g/xD/oP5w/jD+6P3A/aj9iP1Y/Uj9MP0o/QD9EP1A/Xj9iP2g/bD96P1A/mD+gP6o/tj+CP9Q/6D/GAAwAIAAsADYAPAAMAFwAbgBAAIgAjgCQAIoAkgCWAJoAoACWAJIAmACYAJIAkgCGALwAagBaAFQAVgBEAEAAfgAyACwAIAAWABIAEgAMAAIAMj/uP+Q/5D/oP+o/8j/2P/Y/8D/0P/Q/9D/wP/Q/+D/+P8AAPj/CAAAABAAEAAoAEAAUABYABgACAAIAAgAEAA4ACgAWABoAFgAQAAwAEgAOABIADgAIAD4//j/AAD4/wAAMAAwACAACAAIAAAAAAAYABgACAAIACAAIAA4ADgAWABwAIAAgACIAHgAmACgALAAsACgALgAoACYAKAAmACgALAAmACgAJAAeABwAGgAgABoAEgAMAAgABAA4P/I/6j/kP9Y/0j/GP8Q/wD/0P7Q/pD+gP5o/lD+UP5Q/lj+eP5A/lj+SP44/jj+QP5g/lj+aP6Y/rj+wP74/iD/SP9g/2D/gP+I/7j/wP/Y/+j/CAAIAPD/8P/w/wgA+P/g/9j/2P/A/8D/eP+A/2D/QP9I/0D/CP/o/sj+qP6I/mj+YP44/jj+QP4I/vj9KP44/kj+UP54/oj+sP7Q/vD+MP9Q/4j/wP+g/zAAIACIAKgAAAEgAWABeAFwAbgB0AHgAfABCAIgAjgCQAJAAiACKAIIAugByAGoAbABuAGgAVgBIAEIAcgAkABgAEgAUABIACAA6P/Q/8j/mP94/3D/aP9g/0D/QP9I/yD/OP84/0j/IP9I/0j/aP94/3j/gP+Y/6D/sP+4/9j/6P/g/xAAGAA4ABAAAAAIAAAA+P8QACAAQAAwACgAOAAYADAAKAAIAPj/+P/o/9j/qP/Y/9j/sP+4/5D/kP+w/7D/yP+o/7j/qP+g/8D/4P/Q/8D/yP/w//j/CAAoADAAaAB4AIAAkACIALgAsACoAMAAsACoALAA8ADQAOAA2ADAAKgAmACYAKAAeAB4AGgASABQAGAAaABoAFAAWABgAHAAaABYAFgAeABwAHAAcACQAIAAeACQAJAAcACAAJgAiACwAMgAwADQALgAsADIAMgAyAC4ALgAmACIAIAAcABYAFAAOAAYAAgA8P/o/7j/uP+Q/4D/gP9I/yj/MP8w/wD/+P7Q/qj+kP54/pj+oP6o/qj+eP54/qj+oP64/tj+AP8I/xj/SP84/1j/gP+w/9D/6P8AABAAQABwAIgAsACwAPAAIAFAAVABSAFoAXgBcAGYAagBsAGoAYgBeAGgAYgBcAF4AVgBQAEIAfgAuACAAEAAQAAQAAAAuP+A/0j/OP8I/+D+qP6Y/nD+eP5g/lj+aP5Q/mD+YP5w/nj+mP6w/rj+4P4A/yj/OP9w/5j/mP+o/9j/AAAYAEgAiAB4AKAAuADAALgAAAEgAQABOAEIARAB+ADwAPAA6ADQAMAAqACIAEgAMAAIAPj/6P+w/3j/QP8Y/wj/6P7Y/pj+eP5Y/iD+AP4Y/iD+IP4g/jD+OP5A/kD+MP5A/oj+uP7Y/vD+IP9Q/4D/yP/o/xgAUAB4AKAA2AD4APgAKAFYAZABoAGwAbgBwAHYAdgB4AHwAegB0AGgAYgBeAFQATABGAH4AMgAuABwAGAAGAAAANj/sP+Y/3D/UP8Y//j++P7o/uD+yP7Q/tj+wP7A/sD+wP7w/gj/OP9A/0j/cP+I/7j/+P8QADAASABwAIgAuADYAOgA6ADwAOgA4AAAAfgAIAEwASgBMAE4AQgBEAHwAPAA4ADIAKAAqAB4AGgAGAAIAOj/0P+g/5D/cP9I/0j/QP8g//D+AP8A/+D+8P7Q/uj+8P74/hj/GP8Y/yj/GP8Y/1D/eP+4/7j/0P/A/9D/6P8AACAAKAAwADAAUABYADgAaAB4AFgAWABIAFgAQABQAGgAGAAAAAgAEAD4//j/AADo/9D/wP+o/5D/kP+Q/6D/mP+Q/4j/oP+Q/5D/kP+I/5D/qP+Y/7j/0P/o/wAA8P/o//D/6P/w/wAAEAAIACAACAAoAEgAQABYAFAAUABoAEgASABAACgAGAAoABgAKAA4ACgAIAAIAAgAAADw/+j/+P/w/+j/AAAAAPj/AAAAABgAIAAQACAAQAAoAGgAgACIALAAuADAAOAAAAEwAUgBcAFwAXgBiAGYAZABuAGwAbgBuAGoAaABkAGQAXABYAEoAQAB4ACwAJAAaABQABgA4P+w/3D/KP8Y/9D+oP5w/lD+OP4Q/uD9wP2w/aD9qP2I/Zj9oP2g/cD96P34/TD+UP54/qj++P4o/5D/uP8IAFgAkACwAAABUAGAAcgBEAI4AjgCUAJIAlgCcAJgAlgCOAJAAjACIALgAbABeAFQARAB2ACoAFgAAADQ/6j/WP8Y/7j+iP5Y/gD+wP2g/XD9UP0w/Qj96PzQ/Oj8+Pzw/Pj8CP1A/XD9mP3Q/Qj+QP6A/tD+IP9o/5j/2P8oAHAAoADoADgBSAGIAdAB0AHwARACIAIoAjACSAJAAjgCOAIIAuABqAF4ATgBKAHoALAAeAA4ABgA2P+w/3D/OP8g/+j+wP6Y/pD+cP5g/mj+WP5o/oj+kP7I/vj++P5I/2j/oP/A//D/SACgAMgAAAFAAWgBqAHYAfgBQAJIAlgCcAKAAogCiAKAAngCWAJQAkgCGALoAcABkAFIARAB0ACIAEAA8P+o/1j/CP+w/oD+aP5A/uj9sP2g/Wj9UP1I/Rj9EP0Q/RD9QP0w/WD9mP2Y/dj9KP5Y/pD+6P4w/3D/oP/w/xAAcADAAPgAOAF4AagByAHoARgCKAI4AkgCYAJQAkgCSAIgAgACuAF4AWABKAEIAdAAkABQACgA4P+4/1D/GP+4/nD+WP4Q/tj9mP2Q/XD9WP04/Sj9IP0I/Sj9MP1A/VD9aP2Y/bj9+P0A/lD+gP7Q/vj+QP9w/7j/8P8gAHgAuAAIAUABWAFoAZABmAG4AcgB0AHYAdgB2AG4AagBkAFwAXABUAE4AQgBwACoAHAASAAgAOj/uP+Y/4D/MP/g/uD+wP6Y/oj+aP5Q/kj+UP5Q/mD+cP6I/oj+iP6w/rj+0P7o/iD/KP9Q/4D/mP/Q/+j/EAAwAGgAmACwANgACAEwARgBMAE4AUgBKAFAATgBMAE4ASgBEAEYAfgA+ADoANAA0ADAAKAAkABwAGgAWAAwAPD/6P/Q/+D/4P/w/8j/0P/I/8j/0P/I/+j/8P/o/wAA6P8AAPj/AAAIADAAMAAwADAAQABAAFgAcACQAIAAsAC4ANgAwADgAOAA+ADoANgA2ACwALgAmACIAHgAcABwAGAAWABYAEgASABIAEAASABQAEAAQAAoABgAGAAIAAgAEAD4/wAAAAD4/wAA+P/w/+j/8P8AACAAKAA4AEAAKABYAEgAaABoAGAAeACQALAAkACIAJAAiAB4AIAAiACIAHgAgABwAGAAQAAwACAAIAAoABAAAAD4/wAA6P/Y/9j/wP+g/5j/kP+o/5j/kP+I/6j/mP+w/4j/mP+o/6j/oP+o/8D/qP+4/6j/sP/I/9j/2P/g//D/AAAIABAACAAAAPj/AADo//D/2P+4/6D/mP+o/6j/uP+Y/5D/kP94/3D/eP9w/2D/UP9o/0j/UP9Q/1j/YP94/3D/iP+Q/5j/mP/A/+D/+P8QACAAMAA4AFAAUABwAHgAsADYAOAA6ADwAAgBEAEQAQABOAFAAUABQAFIAVgBUAEoASABCAHgANgAuACgAHgAYAAwAAgA6P+w/3j/UP8w/xj/AP/w/sD+sP6Q/oj+YP5g/mD+SP5g/jj+OP4g/ij+OP44/jj+SP5Y/lj+cP6Q/rD+4P4I/0D/cP+Y/7D/4P8YADAAcACgANAA2ADwAAgBGAE4AWABYAFYAWgBcAFoAWgBSAFQATABIAHoANgAsAB4AJAAkABIAEgAKAAIAPj/wP+Y/5D/eP9o/1D/OP8w/yD/AP8A//D+4P7o/uD+6P74/gD/GP8g/yD/QP9I/2j/iP/A/9j/+P8QABAAIAAQADAAQABAAFgAgACAAJAAmACgAKgAoACoAJAAiACIAHgAaABYAFAAOAAYAAgA+P/Y/8j/uP+Q/3j/YP9I/1D/MP84/zj/KP8Y/xj/EP/o/uj+AP8Q/xD/KP9I/3j/mP+w/8D/0P/g/wAAIAA4AFgAkAC4AMgA4AAQARABGAFIAUgBWAFoAXgBmAGgAagBiAGQAXgBcAFwAVgBUAFIAUABKAEAAfgA0AC4AKgAmACQAHAAaABQAEgAKAAoABAAGAAAAAAACADo//D/0P/A/7j/uP/I/9j/6P/Y//D/+P8IABAAKAAIACgAEAAYABgAKAAYAAAACAAAAAAA+P/o/+D/yP/A/8j/mP+A/2j/cP9I/1D/SP9A/zj/KP8o/wD/+P7g/uj+8P7o/vD++P7o/tD+0P74/uD+8P4A//j+8P4Q/yD/SP9g/3D/cP94/3j/oP+w/8j/6P/4/wgAAAAYABgAGAAwADAAMAAoADAAEAAQAAAAAADo//j/+P/4/+j/8P/4/8j/4P/g/+D/4P/I/9D/yP/Q/9D/2P/Y/9D/uP/Q/8D/2P/A/+D/4P/w//j/8P/4/+j/EAA4ADgASABQAFAASABAADAAOAAYACAAKAAAAPj/CAD4//D/8P/Y/+j/0P/I/8j/oP+Q/5D/cP9g/1D/MP84/zj/OP8o/0j/KP8o/zj/KP9A/1D/SP9o/2j/eP+I/5D/mP+4/+j/4P8IABAAKAA4AFAAeACIAKAAwADIANAA0ADoAOgA+ADwAPgACAEAAfgA6ADYAOAA0AC4AKgAkAB4AGgAWABYAEgAOAAwABgA8P/g/+j/2P+4/8D/uP+4/7j/wP+w/8j/wP+4/8D/yP/g/9j/8P/g//D/+P8AAAAAEAAgADAAKABAAEgAWABgAGAAQABQAFgAWABwAGAAaAB4AFgAUAAwACgAEAAwAAgACAAAAPj/6P/Y/7j/wP+w/5j/kP+Q/5j/mP9w/3D/eP94/2j/gP+Q/6D/2P/Q/+D/8P8AAAAAEAAoAEgAYAB4AKAAqACwANAA4AAAAfgA8ADwAPAAEAEQAQgBEAEIASABAAEAAfgA8AD4AOgA2ADIALAAkACIAHAAYABAAFAAIAAoABAAAADo/9j/2P/I/7D/0P/A/7D/qP+g/6j/oP+w/9D/0P/Y/9j/+P/g/+D/UAB4AHAAeACIAJAAqACYAMAA4AAAATABMAFIATgBGAEoASgBMAEwAVABSAFIATABMAEgAQgBCAEAAdgAyACwAKgAsACQAJAAiABwAGAAOAAoABgAEAD4//j/4P/I/6D/eP9w/2D/UP9Q/0D/IP8w/yD/QP8o/xj/OP8o/xD/GP8g/wj/EP8Y/xj/CP8g/xj/IP8Y/yj/KP8g/xj/IP8Y/wj/GP8o/yD/OP9Q/1D/WP9w/1j/UP9g/2D/YP9Y/2D/aP9w/4j/kP+g/6j/uP+4/6j/oP+w/5j/sP+g/5j/kP+I/3j/cP9g/1j/WP9Y/1D/SP9A/zj/KP8w/zj/OP84/yD/KP8o/yj/KP9A/0j/OP8w/0D/OP9Q/1D/gP9w/4D/aP+A/4j/kP/A/7j/0P/I//D/+P8AABgAMABQAGgAiACQAKgAsACgALgAwADYAPAA6ADgAOgA4ADYAMgAyAC4AMAAwACoAJgAkABwAFgAUABQACgAMAAIABAA+P/g/8D/oP+I/3j/aP9o/2j/YP9A/zj/QP84/0D/UP9Y/1D/aP9o/2j/cP94/5D/kP+Y/7D/sP+4/7D/0P/4/wgAIABAAFgAWABoAIgAgACAAIgAkACQAJAAmACQAJAAiAB4AHAAcABoAFgAUAAwADgAMAAQAAgAAADg/9D/2P/Q/8D/yP+o/6D/iP+I/4j/gP+Q/3j/cP+A/5D/kP+I/5D/mP+o/6j/kP+w/9D/wP/o//D/+P8IABgAIAA4ADgAQABIAFAAUABQAGgAkABwAHAAcABoAHAAWABgAFAAOABAADAAIAAYADAAKAAgADAAIAAYAAAAAADo/wAA+P/4/+j/4P/A/7j/sP+Y/6D/sP+w/8D/wP/Q/9D/0P/Q/9D/2P/g//j/AAAgADAAQABAAGAAeACAAJgAwADAAOAAyADgAMAA6ADgANAA8ADoAAAB+AAIAdgAyADoAOgA2ADYAMgAwAC4AKgAqACQAHgAaABQAEAAKAAYAAgAAAAAAOD/uP+w/7D/oP+Y/5j/gP+A/3j/aP9w/3D/SP9g/2j/YP9g/2j/eP9w/3j/eP9w/3D/iP+Q/5D/mP+4/7j/wP/I/+j/6P/4/wAAAAAIABAAAAAIADAAOAAwAEgAQABIAFAASABQAGgAWABIAEgAUABYAFgAQAAoABgACAAQAPD/2P/Q/+D/yP/A/7j/uP/A/8D/sP+4/6j/oP+Y/4j/mP+Q/4D/gP+A/3j/iP+I/5j/oP+g/7D/yP/Y/+D/4P/g//D/+P8AAAAA6P8QAAAA+P8YABgACAAQACAAGAAYACAAKAA4AEgAUABYAGgAUAA4AEgASABAAEgAQAAoACgAMAAgABAAGAAwADAAIAAQACAAGAAwADgAKAAoADAAIAAYABgAIAAIABAACAAYAAAACAAoACgAMABAADgAUABIAFgAaABoAHgAeABwAGgAUABAADgAKAAwACAAGAAgABgACAAQACAAIAAgADAAQABAAFAAUABQAFAASABIADgAOAAwAEAAOABAACgAIAAgACgAKAAoADAAMAAYADAAMABAAEAAOABQAGgAaABwAIAAcABoAHAAYABIAFgAQABgAFAAcABwAHgAeABwAIAAiAB4AHAAaABoAEAAWABIACgAMAAgACAAAAAAAOj/6P/Q/+j/yP/A/7D/qP+g/4j/iP94/3D/aP9o/3D/OP8w/zj/GP8o/0D/MP9A/0D/OP8w/yj/OP9A/0j/UP9A/2D/WP9o/3j/gP9w/6D/mP+o/7j/qP+4/7D/2P/A/+D/yP/Q//D/6P/o/+D/AAD4/wgAKAAgADgAKAAgACgAMAAoACgACAAAABgAAAAIAAgACAAAAPD/AADw/9j/4P/Q/8j/0P+w/7j/sP+w/5j/iP9w/3D/YP9Y/1j/UP84/yj/IP9I/1j/WP9w/3D/cP+I/4j/eP+Q/4j/oP+w/6j/uP+4/7D/0P/Y//D/AAAIABAAIAAwAEAASABwAHgAcAB4AJAAmACIAIAAcABgAFAAYAAwADAAQAAgAAgACAD4//D/0P/Q/8D/qP+Y/4j/aP9w/2j/YP9A/yD/IP8I//D+GP8I/wj/AP8I/xD/KP9A/0j/UP9Y/3j/eP+Q/6j/yP/Q//D/AAAAADAAQABIAFAAaACIAJgAsAC4ANAA2ADgANAA2ADoAOgAyADQAMAAsACYAIgAgACIAIAAaABgAEgAKAAQAAAA+P/w/+D/wP+4/6D/mP+A/4D/UP9Q/0D/UP9A/xj/IP8g/yD/KP8g/zD/QP9A/0j/YP9w/4D/kP+Y/7D/wP/Q/+D/+P8AAAgAGAAoADgAUABQAGAAcACAAIgAiACIAJgAgACIAJAAiACYAJgAoACIAIgAkACIAHgAcABwAGAAWABAADgAKAAwACAAQAAoACAAKAAYACgAIAAwADAAKAAgADgAIAAgAEAAMABYAFgAaABoAGgAgACAAHAAaACAAHgAiABoAGgAeABgAGgAiABwAGgAQABAACAAIAAQAAAACAAIAAAA6P/Y/9D/4P/Y/8D/0P+4/7D/sP+o/5j/eP9w/0j/UP9I/0j/MP9Y/1j/aP+I/3j/kP+Y/5j/qP/A/8D/wP/Y//j/8P8QABAACAAgABAAEAAgADAAMABIAGAAYABYAFgAaABoAGgAaABoAFAAaABQAFgAUAAwADAAIAAgABAACAAYABAAAAAAAAgA+P8IAPj/CADw/+D/AAAAAAAAAAAYAAgAAAAAAAAAAAD4//j/AAAAAPj/8P/w//D/8P/w/wAACAAQAAAA8P/w//D/4P/w/+D/2P/o/8D/2P/g/7j/0P+w/8D/qP/A/7D/sP+o/7j/uP/I/8j/yP/Y/9j/0P/I/8j/4P/o//j/+P8QAAgAGAAYACAAEAAgAEAASABIAEgAUABgAGAAcABYAFgAaABQAEgAWABIAFgAWABgAFAASABQAEgAQABYAEgAUABYAEgAUAAwADAAOAAYABgAEAAAAPj/+P/4/+D/wP/A/7D/qP+w/6j/sP/Q/8j/2P/g/+D/AAAAAPj/+P8IAPD/AAAQAAgAAAAYABgACAAQABgAIAAgABgAGAAgACAAKAAwADAAKAAgABgAEAAYAAAA+P/o//D/2P/o/+D/0P/Q/9j/2P/I/+j/4P/w/9D/0P/A/7j/qP+w/5D/qP+Y/7D/sP+o/8D/yP/Y/+D/6P/4/wgAKAAwACgAOABAAEgASABAAEAAQAA4ACgAMABIAEgAUABwAGgAaABoAHgAaABoAGgAYABwAFAAWABQAEgASAA4ACgAOAAwABgAKAAAAAgAAAD4//j/6P/o//D/yP/I/9j/4P/g/9D/yP/I/8j/sP/I/8D/yP/Y/9D/4P/Y/+D/4P/Y//D/+P/g/wAACAAIAPD/EAAgADAAIAAQABAAGAAYABAAEAAwAEgAMAAwAEgAMAA4ACgAMAAgADAAKAAoABgACADw/+D/2P+4/8D/wP+g/5j/mP+o/6D/kP+Q/5j/qP+o/5j/qP+g/7D/qP+g/6D/qP+Y/6j/uP/A/8j/2P/Y/wAA8P/4/wAACAAYABgAIAAoABgAOAA4AEAAYAB4AHAAcABwAHgAeABQAGAAOAAgACgACAAQAAgACAAIAPj/4P/Y/+D/uP+w/7D/qP+Q/5j/kP94/2D/UP9A/1D/SP9I/2D/OP9A/0j/UP9Y/1D/UP9I/2D/aP94/4D/gP+Q/6D/oP+o/6D/qP/I/+D/4P/w/wAACAAQAAgAAAAgACAAMAAwAEAASABQAGgAYABoAHAAaACAAGAAaABQAEgASABAADAAMABAADgAMAAgABAAGAAQABgAIAAoABAAGAAoACAAGAAIAAAAAAAQAAAAAAAIAPD/AAAYAOj/AAAQABAAMAAoABgAMABAAEAAIAA4ADgAQABAACAAKAAYADgAKAA4AEgAOABIAFgAYABgAFgAcABwAIgAiACAAGAAaABwAHAAgABoAGAAeABIAGAAcABYAGgAUABIAFgAUABQAGAAWABgAGAAYABoAEgASABIADAAKAAwACgAIAAYABAACAAIAPj/6P/4/wAA+P/w/+j/AADo/+j/AADY//j/AADw//j/4P/Q/9j/2P/g/8D/uP/Q/8D/uP/I/8D/0P/Q/9D/wP+4/7D/mP+Y/5D/eP9w/2j/cP9g/2j/YP9Q/1j/WP9g/1j/cP94/4D/gP+A/4j/aP9g/2D/UP9o/2j/cP9Y/4D/gP94/4j/kP+Q/6D/sP+4/9j/4P8IAAAAAAAYABgAEAAQABgAKAAwACAAGAAgAEAAMAAwADgAKAAwADgAOAAYADAAGAAgABAAGAAAAAgAAADg/9D/yP/Y/9D/wP+4/8j/2P+4/7D/sP+4/8D/qP+Y/4j/cP9w/3D/cP9w/4j/kP+Y/6D/sP+w/7j/uP/Y/+D/4P8QAAgAIABAAEgAUABgAHAAeAB4AJAAmACoALAAuADAAMgAyADYAMAAuADAALAAoACYAJAAcABwAFAAQAAwABgAAAAQAOj/4P/Y/6D/oP+Y/4D/aP9g/1D/QP9I/1j/SP84/zD/SP9g/2j/cP+A/3j/iP+A/5j/kP+w/8D/4P/4//D/AAAQACAAUABAAFAAWACAAJAAiACIAIgAcAB4AGAAWABoAEgAUABIADAAMAAoACgAGAAQAPD/8P8AAPD/8P/Y/+D/+P/Q/8D/yP+w/7D/sP+w/6j/oP+g/5D/iP+I/5j/qP+o/6j/wP/Y/+D/8P8IACAAMAAoAEAAUABYAGAAcACIAKAAoACIAKgAsACwAKgAqACgALgAsACoAKgAsACgAJgAmACAAIgAYABQAFAASABgAEgASAAoADAAKAAYAAAAEAAYABAAAAAAAAAAAAAQAAgAAAAQAAgAAAAYACgAIAA4AEAAWABoAHAAeACIAIAAiACAAIAAcACAAIgAiACIAIgAeACAAHAAeABoAHgAeABIAEgAKAAoADgAMAAwADAAMAAYAAAAAADo/+j/+P/w//j/8P/g/+j/0P/I/7j/wP/A/7j/sP+w/7D/uP+w/5j/sP+o/7D/sP/A/8j/wP/I/+D/2P/g/+j/0P+4/9D/yP/Q/7j/uP/I/8D/wP+o/5j/gP94/2D/cP9w/4D/aP9w/1j/WP9g/0j/UP9Y/1D/QP9Q/zj/QP8o/zj/QP8w/0D/MP9I/1j/WP9o/2j/YP+A/2j/eP94/2D/aP94/3D/cP+Y/6D/sP+o/8D/uP+4/7j/sP/A/8D/uP+4/5j/uP+g/5j/mP+g/5j/kP+A/5D/iP+g/5j/sP+Y/4j/mP+g/5D/qP+Y/5D/mP+Y/4j/sP+o/7D/wP/Q/9D/0P8AAAgAAAAAACgAMAAwADgAWABYAFAAaABgAGAAUABgAFgA" preload="auto"></audio><div class="toast" ng-repeat="toast in toasty" ng-class="[toast.type, toast.interact, toast.shake, toast.theme]" ng-click="clickToasty(toast)"><div ng-click="close(toast.id)" class="close-button" ng-if="toast.showClose"></div><div ng-if="toast.title || toast.msg" class="toast-text"><span class="toast-title" ng-if="!toast.html && toast.title" ng-bind="toast.title"></span><span class="toast-title" ng-if="toast.html && toast.title" ng-bind-html="toast.title"></span><br ng-if="toast.title && toast.msg" /><span class="toast-msg" ng-if="!toast.html && toast.msg" ng-bind="toast.msg"></span><span class="toast-msg" ng-if="toast.html && toast.msg" ng-bind-html="toast.msg"></span><div layout="row"><span ng-if="toast.onAccept" class="md-button md-raised md-accent" ng-click="toast.onAccept()">ACCEPT</span><span ng-if="toast.onReject" class="md-button md-raised md-warn" ng-click="toast.onReject()">REJECT</span></div></div></div></div>'}}]),angular.module("angular-toasty").provider("toastyConfig",function(){var e={limit:5,showClose:!0,clickToClose:!1,position:"bottom-right",timeout:5e3,sound:!0,html:!1,shake:!1,theme:"default"},t={};return{setConfig:function(e){t=e},$get:function(){return{config:angular.extend(e,t)}}}}),angular.module("angular-toasty").factory("toasty",["$rootScope","toastyConfig",function(n,e){var r=e.config,t=function(e,t){(angular.isString(e)&&""!=e||angular.isNumber(e))&&(e={title:e.toString()}),e&&(e.title||e.msg)?(e.type=t||"default",n.$broadcast("toasty-new",{config:r,options:e})):console.error("angular-toasty: No toast title or message specified!")};return t.default=function(e){t(e)},t.info=function(e){t(e,"info")},t.wait=function(e){t(e,"wait")},t.success=function(e){t(e,"success")},t.error=function(e){t(e,"error")},t.warning=function(e){t(e,"warning")},t.clear=function(e){n.$broadcast("toasty-clear",{id:e})},t.getGlobalConfig=function(){return r},t}]),function(e,n,s){"use strict";var a=n.isDefined,p=n.isUndefined,c=n.isFunction,l=n.isString,u=n.isNumber,m=n.isObject,f=n.isArray,g=n.forEach,o=n.extend,d=n.copy,h=n.equals;function _(t){return f(t)?t:Object.keys(t).map(function(e){return t[e]})}function b(e){return null===e}function r(t,n){return-1==Object.keys(t).map(function(e){return n[e]!==s&&n[e]==t[e]}).indexOf(!1)}function v(e,t){function n(e,t,n){for(var r=0;t+r<=e.length;){if(e.charAt(t+r)==n)return r;r++}return-1}for(var r=0,i=0;i<=t.length;i++){var a=n(e,r,t.charAt(i));if(-1==a)return!1;r+=a+1}return!0}function y(e,n,r){var i=0;return e.filter(function(e){var t=a(r)?i<n&&r(e):i<n;return i=t?i+1:i,t})}function i(e,t){return Math.round(e*Math.pow(10,t))/Math.pow(10,t)}function w(e){return e&&e.$evalAsync&&e.$watch}function t(){return function(e,t){return t<e}}function C(){return function(e,t){return t<=e}}function A(){return function(e,t){return e<t}}function S(){return function(e,t){return e<=t}}function T(){return function(e,t){return e==t}}function x(){return function(e,t){return e!=t}}function k(){return function(e,t){return e===t}}function E(){return function(e,t){return e!==t}}function D(n){return function(e,t){return e=m(e)?_(e):e,!(!f(e)||p(t))&&e.some(function(e){return l(t)&&m(e)||c(t)?n(t)(e):e===t})}}function I(i){return function(e,t){if(e=m(e)?_(e):e,!f(e))return e;var n=[],r=i(t);return p(t)?e.filter(function(e,t,n){return n.indexOf(e)===t}):e.filter(function(e){var t=r(e);return!function(e,t){if(p(t))return!1;return e.some(function(e){return h(e,t)})}(n,t)&&(n.push(t),!0)})}}function P(){return function(e){return l(e)?e.split(" ").map(function(e){return e.charAt(0).toUpperCase()+e.substring(1)}).join(" "):e}}String.prototype.contains||(String.prototype.contains=function(){return-1!==String.prototype.indexOf.apply(this,arguments)}),n.module("a8m.angular",[]).filter("isUndefined",function(){return function(e){return n.isUndefined(e)}}).filter("isDefined",function(){return function(e){return n.isDefined(e)}}).filter("isFunction",function(){return function(e){return n.isFunction(e)}}).filter("isString",function(){return function(e){return n.isString(e)}}).filter("isNumber",function(){return function(e){return n.isNumber(e)}}).filter("isArray",function(){return function(e){return n.isArray(e)}}).filter("isObject",function(){return function(e){return n.isObject(e)}}).filter("isEqual",function(){return function(e,t){return n.equals(e,t)}}),n.module("a8m.conditions",[]).filter({isGreaterThan:t,">":t,isGreaterThanOrEqualTo:C,">=":C,isLessThan:A,"<":A,isLessThanOrEqualTo:S,"<=":S,isEqualTo:T,"==":T,isNotEqualTo:x,"!=":x,isIdenticalTo:k,"===":k,isNotIdenticalTo:E,"!==":E}),n.module("a8m.is-null",[]).filter("isNull",function(){return function(e){return b(e)}}),n.module("a8m.after-where",[]).filter("afterWhere",function(){return function(e,t){if(e=m(e)?_(e):e,!f(e)||p(t))return e;var n=e.map(function(e){return r(t,e)}).indexOf(!0);return e.slice(-1===n?0:n)}}),n.module("a8m.after",[]).filter("after",function(){return function(e,t){return e=m(e)?_(e):e,f(e)?e.slice(t):e}}),n.module("a8m.before-where",[]).filter("beforeWhere",function(){return function(e,t){if(e=m(e)?_(e):e,!f(e)||p(t))return e;var n=e.map(function(e){return r(t,e)}).indexOf(!0);return e.slice(0,-1===n?e.length:++n)}}),n.module("a8m.before",[]).filter("before",function(){return function(e,t){return e=m(e)?_(e):e,f(e)?e.slice(0,t?--t:t):e}}),n.module("a8m.chunk-by",["a8m.filter-watcher"]).filter("chunkBy",["filterWatcher",function(o){return function(e,t,n){return o.isMemoized("chunkBy",arguments)||o.memoize("chunkBy",arguments,this,(i=t,a=n,f(r=e)?r.map(function(e,t,n){return t*=i,e=n.slice(t,t+i),!p(a)&&e.length<i?e.concat(function(e,t){for(var n=[];e--;)n[e]=t;return n}(i-e.length,a)):e}).slice(0,Math.ceil(r.length/i)):r));var r,i,a}}]),n.module("a8m.concat",[]).filter("concat",[function(){return function(e,t){if(p(t))return e;if(f(e))return m(t)?e.concat(_(t)):e.concat(t);if(m(e)){var n=_(e);return m(t)?n.concat(_(t)):n.concat(t)}return e}}]),n.module("a8m.contains",[]).filter({contains:["$parse",D],some:["$parse",D]}),n.module("a8m.count-by",[]).filter("countBy",["$parse",function(a){return function(e,t){var n,r={},i=a(t);return e=m(e)?_(e):e,!f(e)||p(t)?e:(e.forEach(function(e){n=i(e),r[n]||(r[n]=0),r[n]++}),r)}}]),n.module("a8m.defaults",[]).filter("defaults",["$parse",function(a){return function(e,i){if(e=m(e)?_(e):e,!f(e)||!m(i))return e;var t=function r(i,a,o){return a=a||[],Object.keys(i).forEach(function(e){if(m(i[e])&&!f(i[e])){var t=o?o+"."+e:o;r(i[e],a,t||e)}else{var n=o?o+"."+e:e;a.push(n)}}),a}(i);return e.forEach(function(r){t.forEach(function(e){var t=a(e),n=t.assign;p(t(r))&&n(r,t(i))})}),e}}]),n.module("a8m.every",[]).filter("every",["$parse",function(n){return function(e,t){return e=m(e)?_(e):e,!(f(e)&&!p(t))||e.every(function(e){return m(e)||c(t)?n(t)(e):e===t})}}]),n.module("a8m.filter-by",[]).filter("filterBy",["$parse",function(o){return function(e,t,r,i){var a;return r=l(r)||u(r)?String(r).toLowerCase():s,e=m(e)?_(e):e,!f(e)||p(r)?e:e.filter(function(n){return t.some(function(e){if(~e.indexOf("+")){var t=e.replace(/\s+/g,"").split("+");a=t.map(function(e){return o(e)(n)}).join(" ")}else a=o(e)(n);return!(!l(a)&&!u(a))&&(a=String(a).toLowerCase(),i?a===r:a.contains(r))})})}}]),n.module("a8m.first",[]).filter("first",["$parse",function(i){return function(e){var t,n,r;return e=m(e)?_(e):e,f(e)?(r=Array.prototype.slice.call(arguments,1),t=u(r[0])?r[0]:1,n=u(r[0])?u(r[1])?s:r[1]:r[0],r.length?y(e,t,n?i(n):n):e[0]):e}}]),n.module("a8m.flatten",[]).filter("flatten",function(){return function(e,t){return t=t||!1,e=m(e)?_(e):e,f(e)?t?[].concat.apply([],e):function e(t,n){n=n||0;if(n>=t.length)return t;if(f(t[n]))return e(t.slice(0,n).concat(t[n],t.slice(n+1)),n);return e(t,n+1)}(e,0):e}}),n.module("a8m.fuzzy-by",[]).filter("fuzzyBy",["$parse",function(s){return function(e,t,n,r){var i,a,o=r||!1;return e=m(e)?_(e):e,!f(e)||p(t)||p(n)?e:(a=s(t),e.filter(function(e){return i=a(e),!!l(i)&&(i=o?i:i.toLowerCase(),n=o?n:n.toLowerCase(),!1!==v(i,n))}))}}]),n.module("a8m.fuzzy",[]).filter("fuzzy",function(){return function(e,a,t){var o=t||!1;return e=m(e)?_(e):e,!f(e)||p(a)?e:(a=o?a:a.toLowerCase(),e.filter(function(e){return l(e)?!1!==v(e=o?e:e.toLowerCase(),a):!!m(e)&&(t=e,n=a,0<Object.keys(t).filter(function(e){return r=t[e],!!i||!!l(r)&&(r=o?r:r.toLowerCase(),i=!1!==v(r,n))}).length);var t,n,r,i}))}}),n.module("a8m.group-by",["a8m.filter-watcher"]).filter("groupBy",["$parse","filterWatcher",function(o,s){return function(e,t){return!m(e)||p(t)?e:s.isMemoized("groupBy",arguments)||s.memoize("groupBy",arguments,this,(n=e,r=o(t),a={},g(n,function(e){i=r(e),a[i]||(a[i]=[]),a[i].push(e)}),a));var n,r,i,a}}]),n.module("a8m.is-empty",[]).filter("isEmpty",function(){return function(e){return m(e)?!_(e).length:!e.length}}),n.module("a8m.join",[]).filter("join",function(){return function(e,t){return p(e)||!f(e)?e:(p(t)&&(t=" "),e.join(t))}}),n.module("a8m.last",[]).filter("last",["$parse",function(a){return function(e){var t,n,r,i=d(e);return i=m(i)?_(i):i,f(i)?(r=Array.prototype.slice.call(arguments,1),t=u(r[0])?r[0]:1,n=u(r[0])?u(r[1])?s:r[1]:r[0],r.length?y(i.reverse(),t,n?a(n):n).reverse():i[i.length-1]):i}}]),n.module("a8m.map",[]).filter("map",["$parse",function(n){return function(e,t){return e=m(e)?_(e):e,!f(e)||p(t)?e:e.map(function(e){return n(t)(e)})}}]),n.module("a8m.omit",[]).filter("omit",["$parse",function(n){return function(e,t){return e=m(e)?_(e):e,!f(e)||p(t)?e:e.filter(function(e){return!n(t)(e)})}}]),n.module("a8m.pick",[]).filter("pick",["$parse",function(n){return function(e,t){return e=m(e)?_(e):e,!f(e)||p(t)?e:e.filter(function(e){return n(t)(e)})}}]),n.module("a8m.range",[]).filter("range",function(){return function(e,t,n,r,i){n=n||0,r=r||1;for(var a=0;a<parseInt(t);a++){var o=n+a*r;e.push(c(i)?i(o):o)}return e}}),n.module("a8m.remove-with",[]).filter("removeWith",function(){return function(e,t){return p(t)?e:(e=m(e)?_(e):e).filter(function(e){return!r(t,e)})}}),n.module("a8m.remove",[]).filter("remove",function(){return function(e){e=m(e)?_(e):e;var n=Array.prototype.slice.call(arguments,1);return f(e)?e.filter(function(t){return!n.some(function(e){return h(e,t)})}):e}}),n.module("a8m.reverse",[]).filter("reverse",[function(){return function(e){return e=m(e)?_(e):e,l(e)?e.split("").reverse().join(""):f(e)?e.slice().reverse():e}}]),n.module("a8m.search-field",[]).filter("searchField",["$parse",function(i){return function(e){var n;e=m(e)?_(e):e;var r=Array.prototype.slice.call(arguments,1);return f(e)&&r.length?e.map(function(t){return n=r.map(function(e){return i(e)(t)}).join(" "),o(t,{searchField:n})}):e}}]),n.module("a8m.to-array",[]).filter("toArray",function(){return function(t,e){return m(t)?e?Object.keys(t).map(function(e){return o(t[e],{$key:e})}):_(t):t}}),n.module("a8m.unique",[]).filter({unique:["$parse",I],uniq:["$parse",I]}),n.module("a8m.where",[]).filter("where",function(){return function(e,t){return p(t)?e:(e=m(e)?_(e):e).filter(function(e){return r(t,e)})}}),n.module("a8m.xor",[]).filter("xor",["$parse",function(a){return function(t,n,r){return r=r||!1,t=m(t)?_(t):t,n=m(n)?_(n):n,f(t)&&f(n)?t.concat(n).filter(function(e){return!(i(e,t)&&i(e,n))}):t;function i(t,e){var n=a(r);return e.some(function(e){return r?h(n(e),n(t)):h(e,t)})}}}]),n.module("a8m.math.abs",[]).filter("abs",function(){return function(e){return Math.abs(e)}}),n.module("a8m.math.byteFmt",[]).filter("byteFmt",function(){var r=[{str:"B",val:1024}];return["KB","MB","GB","TB","PB","EB","ZB","YB"].forEach(function(e,t){r.push({str:e,val:1024*r[t].val})}),function(e,t){if(u(t)&&isFinite(t)&&t%1==0&&0<=t&&u(e)&&isFinite(e)){for(var n=0;n<r.length-1&&e>=r[n].val;)n++;return i(e/=0<n?r[n-1].val:1,t)+" "+r[n].str}return"NaN"}}),n.module("a8m.math.degrees",[]).filter("degrees",function(){return function(e,t){if(u(t)&&isFinite(t)&&t%1==0&&0<=t&&u(e)&&isFinite(e)){var n=180*e/Math.PI;return Math.round(n*Math.pow(10,t))/Math.pow(10,t)}return"NaN"}}),n.module("a8m.math.kbFmt",[]).filter("kbFmt",function(){var r=[{str:"KB",val:1024}];return["MB","GB","TB","PB","EB","ZB","YB"].forEach(function(e,t){r.push({str:e,val:1024*r[t].val})}),function(e,t){if(u(t)&&isFinite(t)&&t%1==0&&0<=t&&u(e)&&isFinite(e)){for(var n=0;n<r.length-1&&e>=r[n].val;)n++;return i(e/=0<n?r[n-1].val:1,t)+" "+r[n].str}return"NaN"}}),n.module("a8m.math.max",[]).filter("max",["$parse",function(a){return function(e,t){return f(e)?p(t)?Math.max.apply(Math,e):e[(n=e,r=t,i=n.map(function(e){return a(r)(e)}),i.indexOf(Math.max.apply(Math,i)))]:e;var n,r,i}}]),n.module("a8m.math.min",[]).filter("min",["$parse",function(a){return function(e,t){return f(e)?p(t)?Math.min.apply(Math,e):e[(n=e,r=t,i=n.map(function(e){return a(r)(e)}),i.indexOf(Math.min.apply(Math,i)))]:e;var n,r,i}}]),n.module("a8m.math.percent",[]).filter("percent",function(){return function(e,t,n){var r=l(e)?Number(e):e;return t=t||100,n=n||!1,!u(r)||isNaN(r)?e:n?Math.round(r/t*100):r/t*100}}),n.module("a8m.math.radians",[]).filter("radians",function(){return function(e,t){if(u(t)&&isFinite(t)&&t%1==0&&0<=t&&u(e)&&isFinite(e)){var n=3.14159265359*e/180;return Math.round(n*Math.pow(10,t))/Math.pow(10,t)}return"NaN"}}),n.module("a8m.math.radix",[]).filter("radix",function(){return function(e,t){return u(e)&&/^[2-9]$|^[1-2]\d$|^3[0-6]$/.test(t)?e.toString(t).toUpperCase():e}}),n.module("a8m.math.shortFmt",[]).filter("shortFmt",function(){return function(e,t){return u(t)&&isFinite(t)&&t%1==0&&0<=t&&u(e)&&isFinite(e)?e<1e3?""+e:e<1e6?i(e/1e3,t)+" K":e<1e9?i(e/1e6,t)+" M":i(e/1e9,t)+" B":"NaN"}}),n.module("a8m.math.sum",[]).filter("sum",function(){return function(e,t){return f(e)?e.reduce(function(e,t){return e+t},t||0):e}}),n.module("a8m.ends-with",[]).filter("endsWith",function(){return function(e,t,n){var r,i=n||!1;return!l(e)||p(t)?e:(r=(e=i?e:e.toLowerCase()).length-t.length,-1!==e.indexOf(i?t:t.toLowerCase(),r))}}),n.module("a8m.latinize",[]).filter("latinize",[function(){for(var e=[{base:"A",letters:"AⒶAÀÁÂẦẤẪẨÃĀĂẰẮẴẲȦǠÄǞẢÅǺǍȀȂẠẬẶḀĄȺⱯ"},{base:"AA",letters:"Ꜳ"},{base:"AE",letters:"ÆǼǢ"},{base:"AO",letters:"Ꜵ"},{base:"AU",letters:"Ꜷ"},{base:"AV",letters:"ꜸꜺ"},{base:"AY",letters:"Ꜽ"},{base:"B",letters:"BⒷBḂḄḆɃƂƁ"},{base:"C",letters:"CⒸCĆĈĊČÇḈƇȻꜾ"},{base:"D",letters:"DⒹDḊĎḌḐḒḎĐƋƊƉꝹ"},{base:"DZ",letters:"DZDŽ"},{base:"Dz",letters:"DzDž"},{base:"E",letters:"EⒺEÈÉÊỀẾỄỂẼĒḔḖĔĖËẺĚȄȆẸỆȨḜĘḘḚƐƎ"},{base:"F",letters:"FⒻFḞƑꝻ"},{base:"G",letters:"GⒼGǴĜḠĞĠǦĢǤƓꞠꝽꝾ"},{base:"H",letters:"HⒽHĤḢḦȞḤḨḪĦⱧⱵꞍ"},{base:"I",letters:"IⒾIÌÍÎĨĪĬİÏḮỈǏȈȊỊĮḬƗ"},{base:"J",letters:"JⒿJĴɈ"},{base:"K",letters:"KⓀKḰǨḲĶḴƘⱩꝀꝂꝄꞢ"},{base:"L",letters:"LⓁLĿĹĽḶḸĻḼḺŁȽⱢⱠꝈꝆꞀ"},{base:"LJ",letters:"LJ"},{base:"Lj",letters:"Lj"},{base:"M",letters:"MⓂMḾṀṂⱮƜ"},{base:"N",letters:"NⓃNǸŃÑṄŇṆŅṊṈȠƝꞐꞤ"},{base:"NJ",letters:"NJ"},{base:"Nj",letters:"Nj"},{base:"O",letters:"OⓄOÒÓÔỒỐỖỔÕṌȬṎŌṐṒŎȮȰÖȪỎŐǑȌȎƠỜỚỠỞỢỌỘǪǬØǾƆƟꝊꝌ"},{base:"OI",letters:"Ƣ"},{base:"OO",letters:"Ꝏ"},{base:"OU",letters:"Ȣ"},{base:"OE",letters:"\8cŒ"},{base:"oe",letters:"\9cœ"},{base:"P",letters:"PⓅPṔṖƤⱣꝐꝒꝔ"},{base:"Q",letters:"QⓆQꝖꝘɊ"},{base:"R",letters:"RⓇRŔṘŘȐȒṚṜŖṞɌⱤꝚꞦꞂ"},{base:"S",letters:"SⓈSẞŚṤŜṠŠṦṢṨȘŞⱾꞨꞄ"},{base:"T",letters:"TⓉTṪŤṬȚŢṰṮŦƬƮȾꞆ"},{base:"TZ",letters:"Ꜩ"},{base:"U",letters:"UⓊUÙÚÛŨṸŪṺŬÜǛǗǕǙỦŮŰǓȔȖƯỪỨỮỬỰỤṲŲṶṴɄ"},{base:"V",letters:"VⓋVṼṾƲꝞɅ"},{base:"VY",letters:"Ꝡ"},{base:"W",letters:"WⓌWẀẂŴẆẄẈⱲ"},{base:"X",letters:"XⓍXẊẌ"},{base:"Y",letters:"YⓎYỲÝŶỸȲẎŸỶỴƳɎỾ"},{base:"Z",letters:"ZⓏZŹẐŻŽẒẔƵȤⱿⱫꝢ"},{base:"a",letters:"aⓐaẚàáâầấẫẩãāăằắẵẳȧǡäǟảåǻǎȁȃạậặḁąⱥɐ"},{base:"aa",letters:"ꜳ"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"ꜵ"},{base:"au",letters:"ꜷ"},{base:"av",letters:"ꜹꜻ"},{base:"ay",letters:"ꜽ"},{base:"b",letters:"bⓑbḃḅḇƀƃɓ"},{base:"c",letters:"cⓒcćĉċčçḉƈȼꜿↄ"},{base:"d",letters:"dⓓdḋďḍḑḓḏđƌɖɗꝺ"},{base:"dz",letters:"dzdž"},{base:"e",letters:"eⓔeèéêềếễểẽēḕḗĕėëẻěȅȇẹệȩḝęḙḛɇɛǝ"},{base:"f",letters:"fⓕfḟƒꝼ"},{base:"g",letters:"gⓖgǵĝḡğġǧģǥɠꞡᵹꝿ"},{base:"h",letters:"hⓗhĥḣḧȟḥḩḫẖħⱨⱶɥ"},{base:"hv",letters:"ƕ"},{base:"i",letters:"iⓘiìíîĩīĭïḯỉǐȉȋịįḭɨı"},{base:"j",letters:"jⓙjĵǰɉ"},{base:"k",letters:"kⓚkḱǩḳķḵƙⱪꝁꝃꝅꞣ"},{base:"l",letters:"lⓛlŀĺľḷḹļḽḻſłƚɫⱡꝉꞁꝇ"},{base:"lj",letters:"lj"},{base:"m",letters:"mⓜmḿṁṃɱɯ"},{base:"n",letters:"nⓝnǹńñṅňṇņṋṉƞɲʼnꞑꞥ"},{base:"nj",letters:"nj"},{base:"o",letters:"oⓞoòóôồốỗổõṍȭṏōṑṓŏȯȱöȫỏőǒȍȏơờớỡởợọộǫǭøǿɔꝋꝍɵ"},{base:"oi",letters:"ƣ"},{base:"ou",letters:"ȣ"},{base:"oo",letters:"ꝏ"},{base:"p",letters:"pⓟpṕṗƥᵽꝑꝓꝕ"},{base:"q",letters:"qⓠqɋꝗꝙ"},{base:"r",letters:"rⓡrŕṙřȑȓṛṝŗṟɍɽꝛꞧꞃ"},{base:"s",letters:"sⓢsßśṥŝṡšṧṣṩșşȿꞩꞅẛ"},{base:"t",letters:"tⓣtṫẗťṭțţṱṯŧƭʈⱦꞇ"},{base:"tz",letters:"ꜩ"},{base:"u",letters:"uⓤuùúûũṹūṻŭüǜǘǖǚủůűǔȕȗưừứữửựụṳųṷṵʉ"},{base:"v",letters:"vⓥvṽṿʋꝟʌ"},{base:"vy",letters:"ꝡ"},{base:"w",letters:"wⓦwẁẃŵẇẅẘẉⱳ"},{base:"x",letters:"xⓧxẋẍ"},{base:"y",letters:"yⓨyỳýŷỹȳẏÿỷẙỵƴɏỿ"},{base:"z",letters:"zⓩzźẑżžẓẕƶȥɀⱬꝣ"}],t={},n=0;n<e.length;n++)for(var r=e[n].letters.split(""),i=0;i<r.length;i++)t[r[i]]=e[n].base;return function(e){return l(e)?e.replace(/[^\u0000-\u007E]/g,function(e){return t[e]||e}):e}}]),n.module("a8m.ltrim",[]).filter("ltrim",function(){return function(e,t){var n=t||"\\s";return l(e)?e.replace(new RegExp("^"+n+"+"),""):e}}),n.module("a8m.match",[]).filter("match",function(){return function(e,t,n){var r=new RegExp(t,n);return l(e)?e.match(r):null}}),n.module("a8m.phoneUS",[]).filter("phoneUS",function(){return function(e){return"("+(e+="").slice(0,3)+") "+e.slice(3,6)+"-"+e.slice(6)}}),n.module("a8m.repeat",[]).filter("repeat",[function(){return function(e,t,n){var r=~~t;return l(e)&&r?function e(t,n,r){if(!n)return t;return t+r+e(t,--n,r)}(e,--t,n||""):e}}]),n.module("a8m.rtrim",[]).filter("rtrim",function(){return function(e,t){var n=t||"\\s";return l(e)?e.replace(new RegExp(n+"+$"),""):e}}),n.module("a8m.slugify",[]).filter("slugify",[function(){return function(e,t){var n=p(t)?"-":t;return l(e)?e.toLowerCase().replace(/\s+/g,n):e}}]),n.module("a8m.split",[]).filter("split",function(){return function(e,t,n){var r,i,a,o;return p(e)||!l(e)?null:(p(t)&&(t=""),isNaN(n)&&(n=0),r=new RegExp(t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&"),"g"),b(i=e.match(r))||n>=i.length?[e]:0===n?e.split(t):(o=(a=e.split(t)).splice(0,n+1),a.unshift(o.join(t)),a))}}),n.module("a8m.starts-with",[]).filter("startsWith",function(){return function(e,t,n){var r=n||!1;return!l(e)||p(t)?e:!(e=r?e:e.toLowerCase()).indexOf(r?t:t.toLowerCase())}}),n.module("a8m.stringular",[]).filter("stringular",function(){return function(e){var n=Array.prototype.slice.call(arguments,1);return e.replace(/{(\d+)}/g,function(e,t){return p(n[t])?e:n[t]})}}),n.module("a8m.strip-tags",[]).filter("stripTags",function(){return function(e){return l(e)?e.replace(/<\S[^><]*>/g,""):e}}),n.module("a8m.test",[]).filter("test",function(){return function(e,t,n){var r=new RegExp(t,n);return l(e)?r.test(e):e}}),n.module("a8m.trim",[]).filter("trim",function(){return function(e,t){var n=t||"\\s";return l(e)?e.replace(new RegExp("^"+n+"+|"+n+"+$","g"),""):e}}),n.module("a8m.truncate",[]).filter("truncate",function(){return function(e,t,n,r){return t=p(t)?e.length:t,r=r||!1,n=n||"",!l(e)||e.length<=t?e:e.substring(0,r?-1===e.indexOf(" ",t)?e.length:e.indexOf(" ",t):t)+n}}),n.module("a8m.ucfirst",[]).filter({ucfirst:P,titleize:P}),n.module("a8m.uri-component-encode",[]).filter("uriComponentEncode",["$window",function(t){return function(e){return l(e)?t.encodeURIComponent(e):e}}]),n.module("a8m.uri-encode",[]).filter("uriEncode",["$window",function(t){return function(e){return l(e)?t.encodeURI(e):e}}]),n.module("a8m.wrap",[]).filter("wrap",function(){return function(e,t,n){return l(e)&&a(t)?[t,e,n||t].join(""):e}}),n.module("a8m.filter-watcher",[]).provider("filterWatcher",function(){this.$get=["$window","$rootScope",function(r,c){var l={},u={},f=r.setTimeout;function d(e,t){return[e,JSON.stringify(t,(n=[],function(e,t){if(m(t)&&!b(t)){if(~n.indexOf(t))return"[Circular]";n.push(t)}return r==t?"$WINDOW":r.document==t?"$DOCUMENT":w(t)?"$SCOPE":t}))].join("#").replace(/"/g,"");var n}function h(e){var t=e.targetScope.$id;g(u[t],function(e){delete l[e]}),delete u[t]}return{isMemoized:function(e,t){var n=d(e,t);return l[n]},memoize:function(e,t,n,r){var i,a,o,s=d(e,t);return l[s]=r,w(n)?(a=s,o=(i=n).$id,p(u[o])&&(i.$on("$destroy",h),u[o]=[]),u[o].push(a)):f(function(){c.$$phase||(l={})},2e3),r}}}]}),n.module("angular.filter",["a8m.ucfirst","a8m.uri-encode","a8m.uri-component-encode","a8m.slugify","a8m.latinize","a8m.strip-tags","a8m.stringular","a8m.truncate","a8m.starts-with","a8m.ends-with","a8m.wrap","a8m.trim","a8m.ltrim","a8m.rtrim","a8m.repeat","a8m.test","a8m.match","a8m.split","a8m.phoneUS","a8m.to-array","a8m.concat","a8m.contains","a8m.unique","a8m.is-empty","a8m.after","a8m.after-where","a8m.before","a8m.before-where","a8m.defaults","a8m.where","a8m.reverse","a8m.remove","a8m.remove-with","a8m.group-by","a8m.count-by","a8m.chunk-by","a8m.search-field","a8m.fuzzy-by","a8m.fuzzy","a8m.omit","a8m.pick","a8m.every","a8m.filter-by","a8m.xor","a8m.map","a8m.first","a8m.last","a8m.flatten","a8m.join","a8m.range","a8m.math.max","a8m.math.min","a8m.math.abs","a8m.math.percent","a8m.math.radix","a8m.math.sum","a8m.math.degrees","a8m.math.radians","a8m.math.byteFmt","a8m.math.kbFmt","a8m.math.shortFmt","a8m.angular","a8m.conditions","a8m.is-null","a8m.filter-watcher"])}(window,window.angular),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof module&&"undefined"!=typeof exports?module.exports=t():e.Papa=t()}(this,function(){"use strict";var a,e,u="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==u?u:{},i=!u.document&&!!u.postMessage,s=i&&/(\?|&)papaworker(=|&|$)/.test(u.location.search),o=!1,c={},l=0,y={parse:function(e,t){var n=(t=t||{}).dynamicTyping||!1;L(n)&&(t.dynamicTypingFunction=n,n={});if(t.dynamicTyping=n,t.transform=!!L(t.transform)&&t.transform,t.worker&&y.WORKERS_SUPPORTED){var r=function(){if(!y.WORKERS_SUPPORTED)return!1;if(!o&&null===y.SCRIPT_PATH)throw new Error("Script path cannot be determined automatically when Papa Parse is loaded asynchronously. You need to set Papa.SCRIPT_PATH manually.");var e=y.SCRIPT_PATH||a;e+=(-1!==e.indexOf("?")?"&":"?")+"papaworker";var t=new u.Worker(e);return t.onmessage=b,t.id=l++,c[t.id]=t}();return r.userStep=t.step,r.userChunk=t.chunk,r.userComplete=t.complete,r.userError=t.error,t.step=L(t.step),t.chunk=L(t.chunk),t.complete=L(t.complete),t.error=L(t.error),delete t.worker,void r.postMessage({input:e,config:t,workerId:r.id})}var i=null;{if(e===y.NODE_STREAM_INPUT&&"undefined"==typeof PAPA_BROWSER_CONTEXT)return(i=new _(t)).getStream();"string"==typeof e?i=t.download?new h(t):new m(t):!0===e.readable&&L(e.read)&&L(e.on)?i=new g(t):(u.File&&e instanceof File||e instanceof Object)&&(i=new p(t))}return i.stream(e)},unparse:function(e,t){var r=!1,g=!0,_=",",b="\r\n",i='"',n=!1;!function(){if("object"!=typeof t)return;"string"!=typeof t.delimiter||y.BAD_DELIMITERS.filter(function(e){return-1!==t.delimiter.indexOf(e)}).length||(_=t.delimiter);("boolean"==typeof t.quotes||Array.isArray(t.quotes))&&(r=t.quotes);"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(n=t.skipEmptyLines);"string"==typeof t.newline&&(b=t.newline);"string"==typeof t.quoteChar&&(i=t.quoteChar);"boolean"==typeof t.header&&(g=t.header)}();var a=new RegExp(N(i),"g");"string"==typeof e&&(e=JSON.parse(e));if(Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return s(null,e,n);if("object"==typeof e[0])return s(o(e[0]),e,n)}else if("object"==typeof e)return"string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:o(e.data[0])),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),s(e.fields||[],e.data||[],n);throw"exception: Unable to serialize unrecognized input";function o(e){if("object"!=typeof e)return[];var t=[];for(var n in e)t.push(n);return t}function s(e,t,n){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var i=Array.isArray(e)&&0<e.length,a=!Array.isArray(t[0]);if(i&&g){for(var o=0;o<e.length;o++)0<o&&(r+=_),r+=v(e[o],o);0<t.length&&(r+=b)}for(var s=0;s<t.length;s++){var c=i?e.length:t[s].length,l=!1,u=i?0===Object.keys(t[s]).length:0===t[s].length;if(n&&!i&&(l="greedy"===n?""===t[s].join("").trim():1===t[s].length&&0===t[s][0].length),"greedy"===n&&i){for(var f=[],d=0;d<c;d++){var h=a?e[d]:d;f.push(t[s][h])}l=""===f.join("").trim()}if(!l){for(var p=0;p<c;p++){0<p&&!u&&(r+=_);var m=i&&a?e[p]:p;r+=v(t[s][m],p)}s<t.length-1&&(!n||0<c&&!u)&&(r+=b)}}return r}function v(e,t){if(null==e)return"";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);e=e.toString().replace(a,i+i);var n="boolean"==typeof r&&r||Array.isArray(r)&&r[t]||function(e,t){for(var n=0;n<t.length;n++)if(-1<e.indexOf(t[n]))return!0;return!1}(e,y.BAD_DELIMITERS)||-1<e.indexOf(_)||" "===e.charAt(0)||" "===e.charAt(e.length-1);return n?i+e+i:e}}};if(y.RECORD_SEP=String.fromCharCode(30),y.UNIT_SEP=String.fromCharCode(31),y.BYTE_ORDER_MARK="\ufeff",y.BAD_DELIMITERS=["\r","\n",'"',y.BYTE_ORDER_MARK],y.WORKERS_SUPPORTED=!i&&!!u.Worker,y.SCRIPT_PATH=null,y.NODE_STREAM_INPUT=1,y.LocalChunkSize=10485760,y.RemoteChunkSize=5242880,y.DefaultDelimiter=",",y.Parser=v,y.ParserHandle=n,y.NetworkStreamer=h,y.FileStreamer=p,y.StringStreamer=m,y.ReadableStreamStreamer=g,"undefined"==typeof PAPA_BROWSER_CONTEXT&&(y.DuplexStreamStreamer=_),u.jQuery){var f=u.jQuery;f.fn.parse=function(s){var n=s.config||{},c=[];return this.each(function(e){if(!("INPUT"===f(this).prop("tagName").toUpperCase()&&"file"===f(this).attr("type").toLowerCase()&&u.FileReader)||!this.files||0===this.files.length)return!0;for(var t=0;t<this.files.length;t++)c.push({file:this.files[t],inputElem:this,instanceConfig:f.extend({},n)})}),e(),this;function e(){if(0!==c.length){var e,t,n,r,i=c[0];if(L(s.before)){var a=s.before(i.file,i.inputElem);if("object"==typeof a){if("abort"===a.action)return e="AbortError",t=i.file,n=i.inputElem,r=a.reason,void(L(s.error)&&s.error({name:e},t,n,r));if("skip"===a.action)return void l();"object"==typeof a.config&&(i.instanceConfig=f.extend(i.instanceConfig,a.config))}else if("skip"===a)return void l()}var o=i.instanceConfig.complete;i.instanceConfig.complete=function(e){L(o)&&o(e,i.file,i.inputElem),l()},y.parse(i.file,i.instanceConfig)}else L(s.complete)&&s.complete()}function l(){c.splice(0,1),e()}}}function d(e){this._handle=null,this._finished=!1,this._completed=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=A(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null);this._handle=new n(t),(this._handle.streamer=this)._config=t}.call(this,e),this.parseChunk=function(e,t){if(this.isFirstChunk&&L(this._config.beforeFirstChunk)){var n=this._config.beforeFirstChunk(e);void 0!==n&&(e=n)}this.isFirstChunk=!1;var r=this._partialLine+e;this._partialLine="";var i=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var a=i.meta.cursor;this._finished||(this._partialLine=r.substring(a-this._baseIndex),this._baseIndex=a),i&&i.data&&(this._rowCount+=i.data.length);var o=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(s)u.postMessage({results:i,workerId:y.WORKER_ID,finished:o});else if(L(this._config.chunk)&&!t){if(this._config.chunk(i,this._handle),this._handle.paused()||this._handle.aborted())return;i=void 0,this._completeResults=void 0}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(i.data),this._completeResults.errors=this._completeResults.errors.concat(i.errors),this._completeResults.meta=i.meta),this._completed||!o||!L(this._config.complete)||i&&i.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),o||i&&i.meta.paused||this._nextChunk(),i}},this._sendError=function(e){L(this._config.error)?this._config.error(e):s&&this._config.error&&u.postMessage({workerId:y.WORKER_ID,error:e,finished:!1})}}function h(e){var r;(e=e||{}).chunkSize||(e.chunkSize=y.RemoteChunkSize),d.call(this,e),this._nextChunk=i?function(){this._readChunk(),this._chunkLoaded()}:function(){this._readChunk()},this.stream=function(e){this._input=e,this._nextChunk()},this._readChunk=function(){if(this._finished)this._chunkLoaded();else{if(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),i||(r.onload=S(this._chunkLoaded,this),r.onerror=S(this._chunkError,this)),r.open("GET",this._input,!i),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var t in e)r.setRequestHeader(t,e[t])}if(this._config.chunkSize){var n=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+n),r.setRequestHeader("If-None-Match","webkit-no-cache")}try{r.send()}catch(e){this._chunkError(e.message)}i&&0===r.status?this._chunkError():this._start+=this._config.chunkSize}},this._chunkLoaded=function(){var e;4===r.readyState&&(r.status<200||400<=r.status?this._chunkError():(this._finished=!this._config.chunkSize||this._start>(null!==(e=r.getResponseHeader("Content-Range"))?parseInt(e.substr(e.lastIndexOf("/")+1)):-1),this.parseChunk(r.responseText)))},this._chunkError=function(e){var t=r.statusText||e;this._sendError(new Error(t))}}function p(e){var r,i;(e=e||{}).chunkSize||(e.chunkSize=y.LocalChunkSize),d.call(this,e);var a="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,i=e.slice||e.webkitSlice||e.mozSlice,a?((r=new FileReader).onload=S(this._chunkLoaded,this),r.onerror=S(this._chunkError,this)):r=new FileReaderSync,this._nextChunk()},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk()},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var t=Math.min(this._start+this._config.chunkSize,this._input.size);e=i.call(e,this._start,t)}var n=r.readAsText(e,this._config.encoding);a||this._chunkLoaded({target:{result:n}})},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result)},this._chunkError=function(){this._sendError(r.error)}}function m(e){var n;d.call(this,e=e||{}),this.stream=function(e){return n=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e=this._config.chunkSize,t=e?n.substr(0,e):n;return n=e?n.substr(e):"",this._finished=!n,this.parseChunk(t)}}}function g(e){d.call(this,e=e||{});var t=[],n=!0,r=!1;this.pause=function(){d.prototype.pause.apply(this,arguments),this._input.pause()},this.resume=function(){d.prototype.resume.apply(this,arguments),this._input.resume()},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError)},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0)},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):n=!0},this._streamData=S(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),n&&(n=!1,this._checkIsFinished(),this.parseChunk(t.shift()))}catch(e){this._streamError(e)}},this),this._streamError=S(function(e){this._streamCleanUp(),this._sendError(e)},this),this._streamEnd=S(function(){this._streamCleanUp(),r=!0,this._streamData("")},this),this._streamCleanUp=S(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError)},this)}function _(e){var t=require("stream").Duplex,n=A(e),r=!0,i=!1,a=[],o=null;this._onCsvData=function(e){for(var t=e.data,n=0;n<t.length;n++)o.push(t[n])||this._handle.paused()||this._handle.pause()},this._onCsvComplete=function(){o.push(null)},n.step=S(this._onCsvData,this),n.complete=S(this._onCsvComplete,this),d.call(this,n),this._nextChunk=function(){i&&1===a.length&&(this._finished=!0),a.length?a.shift()():r=!0},this._addToParseQueue=function(e,t){a.push(S(function(){if(this.parseChunk("string"==typeof e?e:e.toString(n.encoding)),L(t))return t()},this)),r&&(r=!1,this._nextChunk())},this._onRead=function(){this._handle.paused()&&this._handle.resume()},this._onWrite=function(e,t,n){this._addToParseQueue(e,n)},this._onWriteComplete=function(){i=!0,this._addToParseQueue("")},this.getStream=function(){return o},(o=new t({readableObjectMode:!0,decodeStrings:!1,read:S(this._onRead,this),write:S(this._onWrite,this)})).once("finish",S(this._onWriteComplete,this))}function n(g){var o,s,c,r=/^\s*-?(\d*\.?\d+|\d+\.?\d*)(e[-+]?\d+)?\s*$/i,i=/(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))/,t=this,n=0,a=0,l=!1,e=!1,u=[],f={data:[],errors:[],meta:{}};if(L(g.step)){var d=g.step;g.step=function(e){if(f=e,p())h();else{if(h(),0===f.data.length)return;n+=e.data.length,g.preview&&n>g.preview?s.abort():d(f,t)}}}function _(e){return"greedy"===g.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function h(){if(f&&c&&(b("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+y.DefaultDelimiter+"'"),c=!1),g.skipEmptyLines)for(var e=0;e<f.data.length;e++)_(f.data[e])&&f.data.splice(e--,1);return p()&&function(){if(!f)return;for(var e=0;p()&&e<f.data.length;e++)for(var t=0;t<f.data[e].length;t++){var n=f.data[e][t];g.trimHeaders&&(n=n.trim()),u.push(n)}f.data.splice(0,1)}(),function(){if(!f||!g.header&&!g.dynamicTyping&&!g.transform)return f;for(var e=0;e<f.data.length;e++){var t,n=g.header?{}:[];for(t=0;t<f.data[e].length;t++){var r=t,i=f.data[e][t];g.header&&(r=t>=u.length?"__parsed_extra":u[t]),g.transform&&(i=g.transform(i,r)),i=m(r,i),"__parsed_extra"===r?(n[r]=n[r]||[],n[r].push(i)):n[r]=i}f.data[e]=n,g.header&&(t>u.length?b("FieldMismatch","TooManyFields","Too many fields: expected "+u.length+" fields but parsed "+t,a+e):t<u.length&&b("FieldMismatch","TooFewFields","Too few fields: expected "+u.length+" fields but parsed "+t,a+e))}g.header&&f.meta&&(f.meta.fields=u);return a+=f.data.length,f}()}function p(){return g.header&&0===u.length}function m(e,t){return n=e,g.dynamicTypingFunction&&void 0===g.dynamicTyping[n]&&(g.dynamicTyping[n]=g.dynamicTypingFunction(n)),!0===(g.dynamicTyping[n]||g.dynamicTyping)?"true"===t||"TRUE"===t||"false"!==t&&"FALSE"!==t&&(r.test(t)?parseFloat(t):i.test(t)?new Date(t):""===t?null:t):t;var n}function b(e,t,n,r){f.errors.push({type:e,code:t,message:n,row:r})}this.parse=function(e,t,n){var r=g.quoteChar||'"';if(g.newline||(g.newline=function(e,t){e=e.substr(0,1048576);var n=new RegExp(N(t)+"([^]*?)"+N(t),"gm"),r=(e=e.replace(n,"")).split("\r"),i=e.split("\n"),a=1<i.length&&i[0].length<r[0].length;if(1===r.length||a)return"\n";for(var o=0,s=0;s<r.length;s++)"\n"===r[s][0]&&o++;return o>=r.length/2?"\r\n":"\r"}(e,r)),c=!1,g.delimiter)L(g.delimiter)&&(g.delimiter=g.delimiter(e),f.meta.delimiter=g.delimiter);else{var i=function(e,t,n,r){for(var i,a,o,s=[",","\t","|",";",y.RECORD_SEP,y.UNIT_SEP],c=0;c<s.length;c++){var l=s[c],u=0,f=0,d=0;o=void 0;for(var h=new v({comments:r,delimiter:l,newline:t,preview:10}).parse(e),p=0;p<h.data.length;p++)if(n&&_(h.data[p]))d++;else{var m=h.data[p].length;f+=m,void 0!==o?1<m&&(u+=Math.abs(m-o),o=m):o=0}0<h.data.length&&(f/=h.data.length-d),(void 0===a||a<u)&&1.99<f&&(a=u,i=l)}return{successful:!!(g.delimiter=i),bestDelimiter:i}}(e,g.newline,g.skipEmptyLines,g.comments);i.successful?g.delimiter=i.bestDelimiter:(c=!0,g.delimiter=y.DefaultDelimiter),f.meta.delimiter=g.delimiter}var a=A(g);return g.preview&&g.header&&a.preview++,o=e,s=new v(a),f=s.parse(o,t,n),h(),l?{meta:{paused:!0}}:f||{meta:{paused:!1}}},this.paused=function(){return l},this.pause=function(){l=!0,s.abort(),o=o.substr(s.getCharIndex())},this.resume=function(){l=!1,t.streamer.parseChunk(o,!0)},this.aborted=function(){return e},this.abort=function(){e=!0,s.abort(),f.meta.aborted=!0,L(g.complete)&&g.complete(f),o=""}}function N(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function v(e){var x,k=(e=e||{}).delimiter,E=e.newline,D=e.comments,I=e.step,P=e.preview,M=e.fastMode,$=x=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&($=e.escapeChar),("string"!=typeof k||-1<y.BAD_DELIMITERS.indexOf(k))&&(k=","),D===k)throw"Comment character same as delimiter";!0===D?D="#":("string"!=typeof D||-1<y.BAD_DELIMITERS.indexOf(D))&&(D=!1),"\n"!==E&&"\r"!==E&&"\r\n"!==E&&(E="\n");var O=0,R=!1;this.parse=function(r,t,n){if("string"!=typeof r)throw"Input must be a string";var i=r.length,e=k.length,a=E.length,o=D.length,s=L(I),c=[],l=[],u=[],f=O=0;if(!r)return S();if(M||!1!==M&&-1===r.indexOf(x)){for(var d=r.split(E),h=0;h<d.length;h++){if(u=d[h],O+=u.length,h!==d.length-1)O+=E.length;else if(n)return S();if(!D||u.substr(0,o)!==D){if(s){if(c=[],y(u.split(k)),T(),R)return S()}else y(u.split(k));if(P&&P<=h)return c=c.slice(0,P),S(!0)}}return S()}for(var p,m=r.indexOf(k,O),g=r.indexOf(E,O),_=new RegExp(N($)+N(x),"g");;)if(r[O]!==x)if(D&&0===u.length&&r.substr(O,o)===D){if(-1===g)return S();O=g+a,g=r.indexOf(E,O),m=r.indexOf(k,O)}else if(-1!==m&&(m<g||-1===g))u.push(r.substring(O,m)),O=m+e,m=r.indexOf(k,O);else{if(-1===g)break;if(u.push(r.substring(O,g)),A(g+a),s&&(T(),R))return S();if(P&&c.length>=P)return S(!0)}else for(p=O,O++;;){if(-1===(p=r.indexOf(x,p+1)))return n||l.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:c.length,index:O}),C();if(p===i-1)return C(r.substring(O,p).replace(_,x));if(x!==$||r[p+1]!==$){if(x===$||0===p||r[p-1]!==$){var b=w(-1===g?m:Math.min(m,g));if(r[p+1+b]===k){u.push(r.substring(O,p).replace(_,x)),O=p+1+b+e,m=r.indexOf(k,O),g=r.indexOf(E,O);break}var v=w(g);if(r.substr(p+1+v,a)===E){if(u.push(r.substring(O,p).replace(_,x)),A(p+1+v+a),m=r.indexOf(k,O),s&&(T(),R))return S();if(P&&c.length>=P)return S(!0);break}l.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:c.length,index:O}),p++}}else p++}return C();function y(e){c.push(e),f=O}function w(e){var t=0;if(-1!==e){var n=r.substring(p+1,e);n&&""===n.trim()&&(t=n.length)}return t}function C(e){return n||(void 0===e&&(e=r.substr(O)),u.push(e),O=i,y(u),s&&T()),S()}function A(e){O=e,y(u),u=[],g=r.indexOf(E,O)}function S(e){return{data:c,errors:l,meta:{delimiter:k,linebreak:E,aborted:R,truncated:!!e,cursor:f+(t||0)}}}function T(){I(S()),c=[],l=[]}},this.abort=function(){R=!0},this.getCharIndex=function(){return O}}function b(e){var t=e.data,n=c[t.workerId],r=!1;if(t.error)n.userError(t.error,t.file);else if(t.results&&t.results.data){var i={abort:function(){r=!0,w(t.workerId,{data:[],errors:[],meta:{aborted:!0}})},pause:C,resume:C};if(L(n.userStep)){for(var a=0;a<t.results.data.length&&(n.userStep({data:[t.results.data[a]],errors:t.results.errors,meta:t.results.meta},i),!r);a++);delete t.results}else L(n.userChunk)&&(n.userChunk(t.results,i,t.file),delete t.results)}t.finished&&!r&&w(t.workerId,t.results)}function w(e,t){var n=c[e];L(n.userComplete)&&n.userComplete(t),n.terminate(),delete c[e]}function C(){throw"Not implemented."}function A(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var n in e)t[n]=A(e[n]);return t}function S(e,t){return function(){e.apply(t,arguments)}}function L(e){return"function"==typeof e}return s?u.onmessage=function(e){var t=e.data;void 0===y.WORKER_ID&&t&&(y.WORKER_ID=t.workerId);if("string"==typeof t.input)u.postMessage({workerId:y.WORKER_ID,results:y.parse(t.input,t.config),finished:!0});else if(u.File&&t.input instanceof File||t.input instanceof Object){var n=y.parse(t.input,t.config);n&&u.postMessage({workerId:y.WORKER_ID,results:n,finished:!0})}}:y.WORKERS_SUPPORTED&&(e=document.getElementsByTagName("script"),a=e.length?e[e.length-1].src:"",document.body?document.addEventListener("DOMContentLoaded",function(){o=!0},!0):o=!0),(h.prototype=Object.create(d.prototype)).constructor=h,(p.prototype=Object.create(d.prototype)).constructor=p,(m.prototype=Object.create(m.prototype)).constructor=m,(g.prototype=Object.create(d.prototype)).constructor=g,"undefined"==typeof PAPA_BROWSER_CONTEXT&&((_.prototype=Object.create(d.prototype)).constructor=_),y}),function(){"use strict";var e=angular.module("mdPickers",["ngMaterial","ngAnimate","ngAria"]);function u(t,n,e,r,i,a){var o=this;this.date=moment(i),this.minDate=a.minDate&&moment(a.minDate).isValid()?moment(a.minDate):null,this.maxDate=a.maxDate&&moment(a.maxDate).isValid()?moment(a.maxDate):null,this.displayFormat=a.displayFormat||"ddd, MMM DD",this.dateFilter=angular.isFunction(a.dateFilter)?a.dateFilter:null,this.selectingYear=!1,this.minDate&&this.maxDate&&this.maxDate.isBefore(this.minDate)&&(this.maxDate=moment(this.minDate).add(1,"days")),this.date&&(this.minDate&&this.date.isBefore(this.minDate)&&(this.date=moment(this.minDate)),this.maxDate&&this.date.isAfter(this.maxDate)&&(this.date=moment(this.maxDate))),this.yearItems={currentIndex_:0,PAGE_SIZE:5,START:o.minDate?o.minDate.year():1900,END:o.maxDate?o.maxDate.year():0,getItemAtIndex:function(e){return this.currentIndex_<e&&(this.currentIndex_=e),this.START+e},getLength:function(){return Math.min(this.currentIndex_+Math.floor(this.PAGE_SIZE/2),Math.abs(this.START-this.END)+1)}},t.$mdMedia=e,t.year=this.date.year(),this.selectYear=function(e){o.date.year(e),t.year=e,o.selectingYear=!1,o.animate()},this.showYear=function(){o.yearTopIndex=o.date.year()-o.yearItems.START+Math.floor(o.yearItems.PAGE_SIZE/2),o.yearItems.currentIndex_=o.date.year()-o.yearItems.START+1,o.selectingYear=!0},this.showCalendar=function(){o.selectingYear=!1},this.cancel=function(){n.cancel()},this.confirm=function(){var e=this.date;this.minDate&&this.date.isBefore(this.minDate)&&(e=moment(this.minDate)),this.maxDate&&this.date.isAfter(this.maxDate)&&(e=moment(this.maxDate)),n.hide(e.toDate())},this.animate=function(){o.animating=!0,r(angular.noop).then(function(){o.animating=!1})}}function t(e){var a=this;this.$onInit=function(){a.daysInMonth=[],a.dow=moment.localeData().firstDayOfWeek(),a.weekDays=[].concat(moment.weekdaysMin().slice(a.dow),moment.weekdaysMin().slice(0,a.dow)),e.$watch(function(){return a.date.unix()},function(e,t){e&&e!==t&&a.updateDaysInMonth()}),a.updateDaysInMonth()},this.getDaysInMonth=function(){var e=a.date.daysInMonth(),t=moment(a.date).date(1).day()-this.dow;t<0&&(t=this.weekDays.length-1);for(var n=[],r=1;r<=t+e;r++){var i=null;t<r&&(i={value:r-t,enabled:a.isDayEnabled(moment(a.date).date(r-t).toDate())}),n.push(i)}return n},this.isDayEnabled=function(e){return!(this.minDate&&!(this.minDate<=e)||this.maxDate&&!(this.maxDate>=e)||a.dateFilter&&a.dateFilter(e))},this.selectDate=function(e){a.date.date(e)},this.nextMonth=function(){a.date.add(1,"months")},this.prevMonth=function(){a.date.subtract(1,"months")},this.updateDaysInMonth=function(){a.daysInMonth=a.getDaysInMonth()},e.$watch(function(){return a.date.unix()},function(e,t){e&&e!==t&&a.updateDaysInMonth()})}function _(e,t){return!e||angular.isDate(e)||moment(e,t,!0).isValid()}function r(e,t,n,r){angular.isDate(n)&&(n=moment(n).format(t)),n=moment(n,t,!0);var i=angular.isDate(e)?moment(e):moment(e,t,!0);return!e||angular.isDate(e)||!n.isValid()||r(i,n)}function b(e,t,n){return r(e,t,n,function(e,t){return e.isSameOrAfter(t)})}function v(e,t,n){return r(e,t,n,function(e,t){return e.isSameOrBefore(t)})}function y(e,t,n){var r=angular.isDate(e)?moment(e):moment(e,t,!0);return!e||angular.isDate(e)||!angular.isFunction(n)||!n(r.toDate())}function l(e,t,n,r,i,a){var o=this;this.VIEW_HOURS=1,this.VIEW_MINUTES=2,this.currentView=this.VIEW_HOURS,this.time=moment(n),this.autoSwitch=!!r,this.ampm=!!i,this.hoursFormat=o.ampm?"h":"H",this.minutesFormat="mm",this.clockHours=parseInt(this.time.format(this.hoursFormat)),this.clockMinutes=parseInt(this.time.format(this.minutesFormat)),e.$mdMedia=a,this.switchView=function(){o.currentView=o.currentView==o.VIEW_HOURS?o.VIEW_MINUTES:o.VIEW_HOURS},this.setAM=function(){12<=o.time.hours()&&o.time.hour(o.time.hour()-12)},this.setPM=function(){o.time.hours()<12&&o.time.hour(o.time.hour()+12)},this.cancel=function(){t.cancel()},this.confirm=function(){t.hide(this.time.toDate())}}function n(e){var r=this,i="hours",a="minutes";this.$onInit=function(){switch(r.STEP_DEG=30,r.steps=[],this.CLOCK_TYPES={hours:{range:r.ampm?12:24},minutes:{range:60}},r.type=r.type||"hours",r.type){case i:for(var e=r.ampm?1:2,t=r.ampm?12:23,n=e;n<=t;n+=e)r.steps.push(n);r.ampm||r.steps.push(0),r.selected=r.time.hours()||0,r.ampm&&12<r.selected&&(r.selected-=12);break;case a:for(n=5;n<=55;n+=5)r.steps.push(n);r.steps.push(0),r.selected=r.time.minutes()||0}},this.getPointerStyle=function(){var e=1;switch(r.type){case i:e=r.ampm?12:24;break;case a:e=60}var t=Math.round(r.selected*(360/e))-180;return{"-webkit-transform":"rotate("+t+"deg)","-ms-transform":"rotate("+t+"deg)",transform:"rotate("+t+"deg)"}},this.setTimeByDeg=function(e){e=360<=e?0:e;var t=0;switch(r.type){case i:t=r.ampm?12:24;break;case a:t=60}r.setTime(Math.round(t/360*e))},this.setTime=function(e,t){switch(this.selected=e,r.type){case i:r.ampm&&"PM"==r.time.format("A")&&(e+=12),this.time.hours(e);break;case a:59<e&&(e-=60),this.time.minutes(e)}}}function w(e,t,n,r){angular.isDate(n)&&(n=moment(n).format(t)),n=moment(n,t,!0);var i=angular.isDate(e)?moment(e):moment(e,t,!0);return!e||angular.isDate(e)||!n.isValid()||r(i,n)}e.config(["$mdIconProvider","mdpIconsRegistry",function(n,e){angular.forEach(e,function(e,t){n.icon(e.id,e.url)})}]),e.run(["$templateCache","mdpIconsRegistry",function(n,e){angular.forEach(e,function(e,t){n.put(e.url,e.svg)})}]),e.constant("mdpIconsRegistry",[{id:"mdp-chevron-left",url:"mdp-chevron-left.svg",svg:'<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'},{id:"mdp-chevron-right",url:"mdp-chevron-right.svg",svg:'<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'},{id:"mdp-access-time",url:"mdp-access-time.svg",svg:'<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M11.99 2C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"/><path d="M0 0h24v24H0z" fill="none"/><path d="M12.5 7H11v6l5.25 3.15.75-1.23-4.5-2.67z"/></svg>'},{id:"mdp-event",url:"mdp-event.svg",svg:'<svg height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg"><path d="M17 12h-5v5h5v-5zM16 1v2H8V1H6v2H5c-1.11 0-1.99.9-1.99 2L3 19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2h-1V1h-2zm3 18H5V8h14v11z"/><path d="M0 0h24v24H0z" fill="none"/></svg>'}]),e.factory("$mdpLocale",[function(){return{time:{minTime:null,maxTime:null,okLabel:"OK",cancelLabel:"Cancel",timeFormat:"HH:mm",noFloat:!1,openOnClick:!1,autoSwitch:!1,ampm:!0,clearOnCancel:!1},date:{minDate:null,maxDate:null,okLabel:"OK",cancelLabel:"Cancel",dateFilter:null,dateFormat:"YYYY-MM-DD",displayFormat:"ddd, MMM DD",noFloat:!1,openOnClick:!1,clearOnCancel:!1}}}]),e.directive("ngMessage",["$mdUtil",function(t){return{restrict:"EA",priority:101,compile:function(e){if(t.getClosest(e,"mdp-time-picker",!0)||t.getClosest(e,"mdp-date-picker",!0))return e.toggleClass("md-input-message-animation",!0),{}}}}]),e.provider("$mdpDatePicker",function(){var o="OK",s="Cancel",c="ddd, MMM DD",l=function(){};this.setDisplayFormat=function(e){c=e},this.setOKButtonLabel=function(e){o=e},this.setCancelButtonLabel=function(e){s=e},this.setDialogParentGetter=function(e){l=e},this.$get=["$mdDialog","$mdpLocale",function(i,a){return function(e,t){angular.isDate(e)||(e=Date.now()),angular.isObject(t)||(t={}),t.displayFormat=t.displayFormat||a.date.displayFormat||c;var n=t.okLabel||a.date.okLabel||o,r=t.cancelLabel||a.date.cancelLabel||s;return i.show({controller:["$scope","$mdDialog","$mdMedia","$timeout","currentDate","options",u],controllerAs:"datepicker",clickOutsideToClose:!0,skipHide:!0,multiple:!0,template:'<md-dialog aria-label="" class="mdp-datepicker" ng-class="{ \'portrait\': !$mdMedia(\'gt-xs\') }"><md-dialog-content layout="row" layout-wrap><div layout="column" layout-align="start center"><md-toolbar layout-align="start start" flex class="mdp-datepicker-date-wrapper md-hue-1 md-primary" layout="column"><span class="mdp-datepicker-year" ng-click="datepicker.showYear()" ng-class="{ \'active\': datepicker.selectingYear }">{{ datepicker.date.format(\'YYYY\') }}</span><span class="mdp-datepicker-date" ng-click="datepicker.showCalendar()" ng-class="{ \'active\': !datepicker.selectingYear }">{{ datepicker.date.format(datepicker.displayFormat) }}</span> </md-toolbar></div><div><div class="mdp-datepicker-select-year mdp-animation-zoom" layout="column" layout-align="center start" ng-if="datepicker.selectingYear"><md-virtual-repeat-container md-auto-shrink md-top-index="datepicker.yearTopIndex"><div flex md-virtual-repeat="item in datepicker.yearItems" md-on-demand class="repeated-year"><span class="md-button" ng-click="datepicker.selectYear(item)" md-ink-ripple ng-class="{ \'md-primary current\': item == year }">{{ item }}</span></div></md-virtual-repeat-container></div><mdp-calendar ng-if="!datepicker.selectingYear" class="mdp-animation-zoom" date="datepicker.date" min-date="datepicker.minDate" date-filter="datepicker.dateFilter" max-date="datepicker.maxDate"></mdp-calendar><md-dialog-actions layout="row"><span flex></span><md-button ng-click="datepicker.cancel()" aria-label="'+r+'">'+r+'</md-button><md-button ng-click="datepicker.confirm()" class="md-primary" aria-label="'+n+'">'+n+"</md-button></md-dialog-actions></div></md-dialog-content></md-dialog>",targetEvent:t.targetEvent,locals:{currentDate:e,options:t},parent:l()})}}]}),e.directive("mdpCalendar",["$animate",function(a){return{restrict:"E",bindToController:{date:"=",minDate:"=",maxDate:"=",dateFilter:"="},template:'<div class="mdp-calendar"><div layout="row" layout-align="space-between center"><md-button aria-label="previous month" class="md-icon-button" ng-click="calendar.prevMonth()"><md-icon md-svg-icon="mdp-chevron-left"></md-icon></md-button><div class="mdp-calendar-monthyear" ng-show="!calendar.animating">{{ calendar.date.format("MMMM YYYY") }}</div><md-button aria-label="next month" class="md-icon-button" ng-click="calendar.nextMonth()"><md-icon md-svg-icon="mdp-chevron-right"></md-icon></md-button></div><div layout="row" layout-align="space-around center" class="mdp-calendar-week-days" ng-show="!calendar.animating"><div layout layout-align="center center" ng-repeat="d in calendar.weekDays track by $index">{{ d }}</div></div><div layout="row" layout-align="start center" layout-wrap class="mdp-calendar-days" ng-class="{ \'mdp-animate-next\': calendar.animating }" ng-show="!calendar.animating" md-swipe-left="calendar.nextMonth()" md-swipe-right="calendar.prevMonth()"><div layout layout-align="center center" ng-repeat-start="day in calendar.daysInMonth track by $index" ng-class="{ \'mdp-day-placeholder\': !day }"><md-button class="md-icon-button" aria-label="Select day" ng-mouseenter="raised = true" ng-mouseleave="raised = false" ng-if="day" ng-class="{ \'md-accent\': calendar.date.date() == day.value, \'md-raised\': raised || calendar.date.date() == day.value }" ng-click="calendar.selectDate(day.value)" ng-disabled="!day.enabled">{{ day.value }}</md-button></div><div flex="100" ng-if="($index + 1) % 7 == 0" ng-repeat-end></div></div></div>',controller:["$scope",t],controllerAs:"calendar",link:function(e,t,n,r){var i=[t[0].querySelector(".mdp-calendar-week-days"),t[0].querySelector(".mdp-calendar-days"),t[0].querySelector(".mdp-calendar-monthyear")].map(function(e){return angular.element(e)});e.raised=!1,e.$watch(function(){return r.date.format("YYYYMM")},function(e,t){var n=null;if(t<e?n="mdp-animate-next":e<t&&(n="mdp-animate-prev"),n)for(var r in i)i[r].addClass(n),a.removeClass(i[r],n)})}}}]),e.directive("mdpDatePicker",["$mdpDatePicker","$timeout","$mdpLocale",function(m,e,g){return{restrict:"E",require:["ngModel","^^?form"],transclude:!0,template:function(e,t){var n=angular.isDefined(t.mdpNoFloat)||g.date.noFloat,r=angular.isDefined(t.mdpOpenOnClick)||g.date.openOnClick;return'<div layout layout-align="start start"><md-button'+(angular.isDefined(t.mdpDisabled)?' ng-disabled="disabled"':"")+' class="md-icon-button" ng-click="showPicker($event)"><md-icon md-svg-icon="mdp-event"></md-icon></md-button><md-input-container'+(n?" md-no-float":"")+' md-is-error="isError()"><input name="{{ inputName }}" ng-model="model.$viewValue" ng-required="required()" type="{{ ::type }}"'+(angular.isDefined(t.mdpDisabled)?' ng-disabled="disabled"':"")+' aria-label="{{placeholder}}" placeholder="{{placeholder}}"'+(r?' ng-click="showPicker($event)" ':"")+" /></md-input-container></div>"},scope:{minDate:"=mdpMinDate",maxDate:"=mdpMaxDate",okLabel:"@?mdpOkLabel",cancelLabel:"@?mdpCancelLabel",dateFilter:"=mdpDateFilter",dateFormat:"@mdpFormat",placeholder:"@mdpPlaceholder",noFloat:"=mdpNoFloat",openOnClick:"=mdpOpenOnClick",disabled:"=?mdpDisabled",inputName:"@?mdpInputName",clearOnCancel:"=?mdpClearOnCancel"},link:{pre:function(e,t,n,r,i){},post:function(r,e,n,t,i){var a=t[0],o=t[1],s={get minDate(){return r.minDate||g.date.minDate},get maxDate(){return r.maxDate||g.date.maxDate},get dateFilter(){return r.dateFilter||g.date.dateFilter},get clearOnCancel(){return angular.isDefined(r.clearOnCancel)?r.clearOnCancel:g.date.clearOnCancel}},c=angular.element(e[0].querySelector("input")),l=angular.element(e[0].querySelector("md-input-container")),u=l.controller("mdInputContainer");i(function(e){l.append(e)});var f=angular.element(l[0].querySelector("[ng-messages]"));function d(e){c[0].value=e,u.setHasValue(!a.$isEmpty(e))}function h(e){var t=moment(e,angular.isDate(e)?null:r.dateFormat,!0),n=t.format(r.dateFormat);t.isValid()?(d(n),a.$setViewValue(n)):(d(e),a.$setViewValue(e)),!a.$pristine&&f.hasClass("md-auto-hide")&&l.hasClass("md-input-invalid")&&f.removeClass("md-auto-hide"),a.$render()}function p(e){e.target.value!==a.$viewVaue&&h(e.target.value)}r.type=r.dateFormat||g.date.dateFormat?"text":"date",r.dateFormat=r.dateFormat||g.date.dateFormat||"YYYY-MM-DD",r.model=a,r.isError=function(){return!!a.$invalid&&(!a.$pristine||null!=o&&o.$submitted)},r.required=function(){return!!n.required},a.$formatters.unshift(function(e){var t=angular.isDate(e)&&moment(e);if(t&&t.isValid()){var n=t.format(r.dateFormat);return d(n),n}return d(null),null}),a.$validators.format=function(e,t){return _(t,r.dateFormat)},a.$validators.minDate=function(e,t){return b(t,r.dateFormat,s.minDate)},a.$validators.maxDate=function(e,t){return v(t,r.dateFormat,s.maxDate)},a.$validators.filter=function(e,t){return y(t,r.dateFormat,s.dateFilter)},a.$validators.required=function(e,t){return angular.isUndefined(n.required)||!1===n.required||!a.$isEmpty(e)||!a.$isEmpty(t)},a.$parsers.unshift(function(e){var t=moment(e,r.dateFormat,!0);if(t.isValid()){if(angular.isDate(a.$modelValue)){var n=moment(a.$modelValue);n.year(t.year()),n.month(t.month()),n.date(t.date()),t=n}return t.toDate()}return null}),r.showPicker=function(e){m(a.$modelValue,{minDate:s.minDate,maxDate:s.maxDate,dateFilter:s.dateFilter,okLabel:r.okLabel,cancelLabel:r.cancelLabel,targetEvent:e}).then(function(e){h(e)},function(e){s.clearOnCancel&&h(null)})},c.on("reset input blur",p),r.$on("$destroy",function(){c.off("reset input blur",p)}),r.$watch("minDate + maxDate",function(){a.$validate()})}}}}]),e.directive("mdpDatePicker",["$mdpDatePicker","$timeout",function(o,e){return{restrict:"A",require:"ngModel",scope:{minDate:"@min",maxDate:"@max",okLabel:"@?mdpOkLabel",cancelLabel:"@?mdpCancelLabel",dateFilter:"=mdpDateFilter",dateFormat:"@mdpFormat"},link:function(n,e,t,r,i){function a(e){o(r.$modelValue,{minDate:n.minDate,maxDate:n.maxDate,dateFilter:n.dateFilter,okLabel:n.okLabel,cancelLabel:n.cancelLabel,targetEvent:e}).then(function(e){r.$setViewValue(moment(e).format(n.format)),r.$render()})}n.dateFormat=n.dateFormat||"YYYY-MM-DD",r.$validators.format=function(e,t){return _(t,n.format)},r.$validators.minDate=function(e,t){return b(t,n.format,n.minDate)},r.$validators.maxDate=function(e,t){return v(t,n.format,n.maxDate)},r.$validators.filter=function(e,t){return y(t,n.format,n.dateFilter)},e.on("click",a),n.$on("$destroy",function(){e.off("click",a)})}}}]),e.directive("mdpClock",["$animate","$timeout",function(e,s){return{restrict:"E",bindToController:{type:"@?",time:"=",autoSwitch:"=?",ampm:"=?"},replace:!0,template:'<md-card class="mdp-clock"><div class="mdp-clock-container"><md-toolbar class="mdp-clock-center md-primary"></md-toolbar><md-toolbar ng-style="clock.getPointerStyle()" class="mdp-pointer md-primary"><span class="mdp-clock-selected md-button md-raised md-primary"></span></md-toolbar><md-button ng-class="{ \'md-primary\': clock.selected == step, \'md-raised\': raised || clock.selected == step  }" ng-mouseenter="raised = true" ng-mouseleave="raised = false" class="md-icon-button mdp-clock-deg{{ ::(clock.STEP_DEG * ($index + 1)) }}" ng-repeat="step in clock.steps" ng-click="clock.setTime(step)">{{ step }}</md-button></div></md-card>',controller:["$scope",n],controllerAs:"clock",link:function(e,t,n,a){angular.element(t[0].querySelector(".mdp-pointer"));var o=e.$parent.timepicker;e.raised=!1;var r=function(e){var t=e.currentTarget.getClientRects()[0],n=e.currentTarget.offsetWidth/2-(e.pageX-t.left),r=e.pageY-t.top-e.currentTarget.offsetHeight/2,i=Math.round(Math.atan2(n,r)*(180/Math.PI));s(function(){a.setTimeByDeg(i+180),a.autoSwitch&&-1!==["mouseup","click"].indexOf(e.type)&&o&&o.switchView()})};t.on("mousedown",function(){t.on("mousemove",r)}),t.on("mouseup",function(e){t.off("mousemove")}),t.on("click",r),e.$on("$destroy",function(){t.off("click",r),t.off("mousemove",r)})}}}]),e.provider("$mdpTimePicker",function(){var o="OK",s="Cancel",c=function(){};this.setOKButtonLabel=function(e){o=e},this.setCancelButtonLabel=function(e){s=e},this.setDialogParentGetter=function(e){c=e},this.$get=["$mdDialog","$mdpLocale",function(i,a){return function(e,t){angular.isDate(e)||(e=Date.now()),angular.isObject(t)||(t={});var n=t.okLabel||a.time.okLabel||o,r=t.cancelLabel||a.time.cancelLabel||s;return i.show({controller:["$scope","$mdDialog","time","autoSwitch","ampm","$mdMedia",l],controllerAs:"timepicker",clickOutsideToClose:!0,skipHide:!0,multiple:!0,template:'<md-dialog aria-label="" class="mdp-timepicker" ng-class="{ \'portrait\': !$mdMedia(\'gt-xs\') }"><md-dialog-content layout-gt-xs="row" layout-wrap><md-toolbar layout-gt-xs="column" layout-xs="row" layout-align="center center" flex class="mdp-timepicker-time md-hue-1 md-primary"><div class="mdp-timepicker-selected-time"><span ng-class="{ \'active\': timepicker.currentView == timepicker.VIEW_HOURS }" ng-click="timepicker.currentView = timepicker.VIEW_HOURS">{{ timepicker.time.format(timepicker.hoursFormat) }}</span>:<span ng-class="{ \'active\': timepicker.currentView == timepicker.VIEW_MINUTES }" ng-click="timepicker.currentView = timepicker.VIEW_MINUTES">{{ timepicker.time.format(timepicker.minutesFormat) }}</span></div><div layout="column" ng-show="timepicker.ampm" class="mdp-timepicker-selected-ampm"><span ng-click="timepicker.setAM()" ng-class="{ \'active\': timepicker.time.hours() < 12 }">AM</span><span ng-click="timepicker.setPM()" ng-class="{ \'active\': timepicker.time.hours() >= 12 }">PM</span></div></md-toolbar><md-content><div class="mdp-clock-switch-container" ng-switch="timepicker.currentView" layout layout-align="center center"><mdp-clock class="mdp-animation-zoom" ampm="timepicker.ampm" auto-switch="timepicker.autoSwitch" time="timepicker.time" type="hours" ng-switch-when="1"></mdp-clock><mdp-clock class="mdp-animation-zoom" ampm="timepicker.ampm" auto-switch="timepicker.autoSwitch" time="timepicker.time" type="minutes" ng-switch-when="2"></mdp-clock></div><md-dialog-actions layout="row"><span flex></span><md-button ng-click="timepicker.cancel()" aria-label="'+r+'">'+r+'</md-button><md-button ng-click="timepicker.confirm()" class="md-primary" aria-label="'+n+'">'+n+"</md-button></md-dialog-actions></md-content></md-dialog-content></md-dialog>",targetEvent:t.targetEvent,locals:{time:e,autoSwitch:t.autoSwitch,ampm:angular.isDefined(t.ampm)?t.ampm:a.time.ampm},parent:c()})}}]}),e.directive("mdpTimePicker",["$mdpTimePicker","$timeout","$mdpLocale",function(m,e,g){return{restrict:"E",require:["ngModel","^^?form"],transclude:!0,template:function(e,t){var n=angular.isDefined(t.mdpNoFloat)||g.time.noFloat,r=angular.isDefined(t.mdpOpenOnClick)||g.time.openOnClick;return'<div layout layout-align="start start"><md-button class="md-icon-button" ng-click="showPicker($event)"'+(angular.isDefined(t.mdpDisabled)?' ng-disabled="disabled"':"")+'><md-icon md-svg-icon="mdp-access-time"></md-icon></md-button><md-input-container'+(n?" md-no-float":"")+' md-is-error="isError()"><input name="{{ inputName }}" ng-model="model.$viewValue" ng-required="required()" type="{{ ::type }}"'+(angular.isDefined(t.mdpDisabled)?' ng-disabled="disabled"':"")+' aria-label="{{placeholder}}" placeholder="{{placeholder}}"'+(r?' ng-click="showPicker($event)" ':"")+" /></md-input-container></div>"},scope:{minTime:"=?mdpMinTime",maxTime:"=?mdpMaxTime",timeFormat:"@mdpFormat",okLabel:"@?mdpOkLabel",cancelLabel:"@?mdpCancelLabel",placeholder:"@mdpPlaceholder",autoSwitch:"=?mdpAutoSwitch",disabled:"=?mdpDisabled",ampm:"=?mdpAmpm",inputName:"@?mdpInputName",clearOnCancel:"=?mdpClearOnCancel"},link:function(a,e,n,t,r){var i=t[0],o=t[1],s={get minTime(){return a.minTime||g.time.minTime},get maxTime(){return a.maxTime||g.time.maxTime},get clearOnCancel(){return angular.isDefined(a.clearOnCancel)?a.clearOnCancel:g.time.clearOnCancel}},c=angular.element(e[0].querySelector("input")),l=angular.element(e[0].querySelector("md-input-container")),u=l.controller("mdInputContainer");r(function(e){l.append(e)});var f=angular.element(l[0].querySelector("[ng-messages]"));function d(e){c[0].value=e,u.setHasValue(!i.$isEmpty(e))}function h(e){var t=moment(e,angular.isDate(e)?null:a.timeFormat,!0),n=t.format(a.timeFormat);t.isValid()?(d(n),i.$setViewValue(n)):(d(e),i.$setViewValue(e)),!i.$pristine&&f.hasClass("md-auto-hide")&&l.hasClass("md-input-invalid")&&f.removeClass("md-auto-hide"),i.$render()}function p(e){e.target.value!==i.$viewVaue&&h(e.target.value)}a.type=a.timeFormat||g.time.timeFormat?"text":"time",a.timeFormat=a.timeFormat||g.time.timeFormat||"HH:mm",a.autoSwitch=void 0===a.autoSwitch?g.time.autoSwitch:a.autoSwitch,a.model=i,a.isError=function(){return!!i.$invalid&&(!i.$pristine||null!=o&&o.$submitted)},a.required=function(){return!!n.required},a.$watch(function(){return i.$error},function(e,t){u.setInvalid(!i.$pristine&&!!Object.keys(i.$error).length)},!0),i.$formatters.unshift(function(e){var t=angular.isDate(e)&&moment(e);if(t&&t.isValid()){var n=t.format(a.timeFormat);return d(n),n}return d(null),null}),i.$validators.format=function(e,t){return!t||angular.isDate(t)||moment(t,a.timeFormat,!0).isValid()},i.$validators.required=function(e,t){return angular.isUndefined(n.required)||!1===n.required||!i.$isEmpty(e)||!i.$isEmpty(t)},i.$validators.minTime=function(e,t){return n=t,r=a.timeFormat,i=s.minTime,w(n,r,i,function(e,t){return e.isSameOrAfter(t)});var n,r,i},i.$validators.maxTime=function(e,t){return n=t,r=a.timeFormat,i=s.maxTime,w(n,r,i,function(e,t){return e.isSameOrBefore(t)});var n,r,i},i.$parsers.unshift(function(e){var t=moment(e,a.timeFormat,!0);if(t.isValid()){if(angular.isDate(i.$modelValue)){var n=moment(i.$modelValue);n.minutes(t.minutes()),n.hours(t.hours()),n.seconds(t.seconds()),t=n}return t.toDate()}return null}),a.showPicker=function(e){m(i.$modelValue,{targetEvent:e,okLabel:a.okLabel,cancelLabel:a.cancelLabel,autoSwitch:a.autoSwitch,ampm:a.ampm}).then(function(e){h(e)},function(e){s.clearOnCancel&&h(null)})},c.on("reset input blur",p),a.$on("$destroy",function(){c.off("reset input blur",p)}),a.$watch("minTime + maxTime",function(){i.$validate()})}}}]),e.directive("mdpTimePicker",["$mdpTimePicker","$timeout",function(o,e){return{restrict:"A",require:"ngModel",scope:{timeFormat:"@mdpFormat",okLabel:"@?mdpOkLabel",cancelLabel:"@?mdpCancelLabel",autoSwitch:"=?mdpAutoSwitch",ampm:"=?mdpAmpm"},link:function(t,e,n,r,i){function a(e){o(r.$modelValue,{targetEvent:e,autoSwitch:t.autoSwitch,okLabel:t.okLabel,cancelLabel:t.cancelLabel,ampm:t.ampm}).then(function(e){r.$setViewValue(moment(e).format(t.format)),r.$render()})}t.format=t.format||"HH:mm",e.on("click",a),t.$on("$destroy",function(){e.off("click",a)})}}}])}(),function(e){"use strict";"function"==typeof define&&define.amd?define(["jquery"],e):"undefined"!=typeof module&&module.exports?module.exports=e(require("jquery")):e(jQuery)}(function(P,M){"use strict";if(!P.jstree){var i=0,a=!1,o=!1,s=!1,r=[],e=P("script:last").attr("src"),y=window.document,l=window.setImmediate,n=window.Promise;!l&&n&&(l=function(e,t){n.resolve(t).then(e)}),P.jstree={version:"3.3.12",defaults:{plugins:[]},plugins:{},path:e&&-1!==e.indexOf("/")?e.replace(/\/[^\/]+$/,""):"",idregex:/[\\:&!^|()\[\]<>@*'+~#";.,=\- \/${}%?`]/g,root:"#"},P.jstree.create=function(e,n){var r=new P.jstree.core(++i),t=n;return n=P.extend(!0,{},P.jstree.defaults,n),t&&t.plugins&&(n.plugins=t.plugins),P.each(n.plugins,function(e,t){"core"!==e&&(r=r.plugin(t,n[t]))}),P(e).data("jstree",r),r.init(e,n),r},P.jstree.destroy=function(){P(".jstree:jstree").jstree("destroy"),P(y).off(".jstree")},P.jstree.core=function(e){this._id=e,this._cnt=0,this._wrk=null,this._data={core:{themes:{name:!1,dots:!1,icons:!1,ellipsis:!1},selected:[],last_error:{},working:!1,worker_queue:[],focused:null}}},P.jstree.reference=function(t){var n=null,e=null;if(!t||!t.id||t.tagName&&t.nodeType||(t=t.id),!e||!e.length)try{e=P(t)}catch(e){}if(!e||!e.length)try{e=P("#"+t.replace(P.jstree.idregex,"\\$&"))}catch(e){}return e&&e.length&&(e=e.closest(".jstree")).length&&(e=e.data("jstree"))?n=e:P(".jstree").each(function(){var e=P(this).data("jstree");if(e&&e._model.data[t])return n=e,!1}),n},P.fn.jstree=function(n){var r="string"==typeof n,i=Array.prototype.slice.call(arguments,1),a=null;return!(!0===n&&!this.length)&&(this.each(function(){var e=P.jstree.reference(this),t=r&&e?e[n]:null;if(a=r&&t?t.apply(e,i):null,e||r||n!==M&&!P.isPlainObject(n)||P.jstree.create(this,n),(e&&!r||!0===n)&&(a=e||!1),null!==a&&a!==M)return!1}),null!==a&&a!==M?a:this)},P.expr.pseudos.jstree=P.expr.createPseudo(function(e){return function(e){return P(e).hasClass("jstree")&&P(e).data("jstree")!==M}}),P.jstree.defaults.core={data:!1,strings:!1,check_callback:!1,error:P.noop,animation:200,multiple:!0,themes:{name:!1,url:!1,dir:!1,dots:!0,icons:!0,ellipsis:!1,stripes:!1,variant:!1,responsive:!1},expand_selected_onload:!0,worker:!0,force_text:!1,dblclick_toggle:!0,loaded_state:!1,restore_focus:!0,compute_elements_positions:!1,keyboard:{"ctrl-space":function(e){e.type="click",P(e.currentTarget).trigger(e)},enter:function(e){e.type="click",P(e.currentTarget).trigger(e)},left:function(e){if(e.preventDefault(),this.is_open(e.currentTarget))this.close_node(e.currentTarget);else{var t=this.get_parent(e.currentTarget);t&&t.id!==P.jstree.root&&this.get_node(t,!0).children(".jstree-anchor").trigger("focus")}},up:function(e){e.preventDefault();var t=this.get_prev_dom(e.currentTarget);t&&t.length&&t.children(".jstree-anchor").trigger("focus")},right:function(e){if(e.preventDefault(),this.is_closed(e.currentTarget))this.open_node(e.currentTarget,function(e){this.get_node(e,!0).children(".jstree-anchor").trigger("focus")});else if(this.is_open(e.currentTarget)){var t=this.get_node(e.currentTarget,!0).children(".jstree-children")[0];t&&P(this._firstChild(t)).children(".jstree-anchor").trigger("focus")}},down:function(e){e.preventDefault();var t=this.get_next_dom(e.currentTarget);t&&t.length&&t.children(".jstree-anchor").trigger("focus")},"*":function(e){this.open_all()},home:function(e){e.preventDefault();var t=this._firstChild(this.get_container_ul()[0]);t&&P(t).children(".jstree-anchor").filter(":visible").trigger("focus")},end:function(e){e.preventDefault(),this.element.find(".jstree-anchor").filter(":visible").last().trigger("focus")},f2:function(e){e.preventDefault(),this.edit(e.currentTarget)}}},P.jstree.core.prototype={plugin:function(e,t){var n=P.jstree.plugins[e];return n?(this._data[e]={},n.prototype=this,new n(t,this)):this},init:function(e,t){this._model={data:{},changed:[],force_full_redraw:!1,redraw_timeout:!1,default_state:{loaded:!0,opened:!1,selected:!1,disabled:!1}},this._model.data[P.jstree.root]={id:P.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this.element=P(e).addClass("jstree jstree-"+this._id),this.settings=t,this._data.core.ready=!1,this._data.core.loaded=!1,this._data.core.rtl="rtl"===this.element.css("direction"),this.element[this._data.core.rtl?"addClass":"removeClass"]("jstree-rtl"),this.element.attr("role","tree"),this.settings.core.multiple&&this.element.attr("aria-multiselectable",!0),this.element.attr("tabindex")||this.element.attr("tabindex","0"),this.bind(),this.trigger("init"),this._data.core.original_container_html=this.element.find(" > ul > li").clone(!0),this._data.core.original_container_html.find("li").addBack().contents().filter(function(){return 3===this.nodeType&&(!this.nodeValue||/^\s+$/.test(this.nodeValue))}).remove(),this.element.html("<ul class='jstree-container-ul jstree-children' role='group'><li id='j"+this._id+"_loading' class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' role='treeitem' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading"),this._data.core.li_height=this.get_container_ul().children("li").first().outerHeight()||24,this._data.core.node=this._create_prototype_node(),this.trigger("loading"),this.load_node(P.jstree.root)},destroy:function(e){if(this.trigger("destroy"),this._wrk)try{window.URL.revokeObjectURL(this._wrk),this._wrk=null}catch(e){}e||this.element.empty(),this.teardown()},_create_prototype_node:function(){var e,t,n=y.createElement("LI");return n.setAttribute("role","none"),(e=y.createElement("I")).className="jstree-icon jstree-ocl",e.setAttribute("role","presentation"),n.appendChild(e),(e=y.createElement("A")).className="jstree-anchor",e.setAttribute("href","#"),e.setAttribute("tabindex","-1"),e.setAttribute("role","treeitem"),(t=y.createElement("I")).className="jstree-icon jstree-themeicon",t.setAttribute("role","presentation"),e.appendChild(t),n.appendChild(e),e=t=null,n},_kbevent_to_func:function(e){var t=[];if(e.ctrlKey&&t.push("ctrl"),e.altKey&&t.push("alt"),e.shiftKey&&t.push("shift"),t.push({8:"Backspace",9:"Tab",13:"Enter",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",96:"Numpad0",97:"Numpad1",98:"Numpad2",99:"Numpad3",100:"Numpad4",101:"Numpad5",102:"Numpad6",103:"Numpad7",104:"Numpad8",105:"Numpad9","-13":"NumpadEnter",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock",16:"Shift",17:"Ctrl",18:"Alt",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",111:"/",106:"*",173:"-"}[e.which]||e.which),"shift-shift"===(t=t.sort().join("-").toLowerCase())||"ctrl-ctrl"===t||"alt-alt"===t)return null;var n,r,i=this.settings.core.keyboard;for(n in i)if(i.hasOwnProperty(n)&&("-"!==(r=n)&&"+"!==r&&(r=(r=r.replace("--","-MINUS").replace("+-","-MINUS").replace("++","-PLUS").replace("-+","-PLUS")).split(/-|\+/).sort().join("-").replace("MINUS","-").replace("PLUS","+").toLowerCase()),r===t))return i[n];return null},teardown:function(){this.unbind(),this.element.removeClass("jstree").removeData("jstree").find("[class^='jstree']").addBack().attr("class",function(){return this.className.replace(/jstree[^ ]*|$/gi,"")}),this.element=null},bind:function(){var a="",o=null,t=0;this.element.on("dblclick.jstree",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;if(y.selection&&y.selection.empty)y.selection.empty();else if(window.getSelection){var t=window.getSelection();try{t.removeAllRanges(),t.collapse()}catch(e){}}}).on("mousedown.jstree",function(e){e.target===this.element[0]&&(e.preventDefault(),t=+new Date)}.bind(this)).on("mousedown.jstree",".jstree-ocl",function(e){e.preventDefault()}).on("click.jstree",".jstree-ocl",function(e){this.toggle_node(e.target)}.bind(this)).on("dblclick.jstree",".jstree-anchor",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;this.settings.core.dblclick_toggle&&this.toggle_node(e.target)}.bind(this)).on("click.jstree",".jstree-anchor",function(e){e.preventDefault(),e.currentTarget!==y.activeElement&&P(e.currentTarget).trigger("focus"),this.activate_node(e.currentTarget,e)}.bind(this)).on("keydown.jstree",".jstree-anchor",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;this._data.core.rtl&&(37===e.which?e.which=39:39===e.which&&(e.which=37));var t=this._kbevent_to_func(e);if(t){var n=t.call(this,e);if(!1===n||!0===n)return n}}.bind(this)).on("load_node.jstree",function(e,t){t.status&&(t.node.id!==P.jstree.root||this._data.core.loaded||(this._data.core.loaded=!0,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.trigger("loaded")),this._data.core.ready||setTimeout(function(){if(this.element&&!this.get_container_ul().find(".jstree-loading").length){if(this._data.core.ready=!0,this._data.core.selected.length){if(this.settings.core.expand_selected_onload){var e,t,n=[];for(e=0,t=this._data.core.selected.length;e<t;e++)n=n.concat(this._model.data[this._data.core.selected[e]].parents);for(e=0,t=(n=P.vakata.array_unique(n)).length;e<t;e++)this.open_node(n[e],!1,0)}this.trigger("changed",{action:"ready",selected:this._data.core.selected})}this.trigger("ready")}}.bind(this),0))}.bind(this)).on("keypress.jstree",function(e){if(e.target.tagName&&"input"===e.target.tagName.toLowerCase())return!0;o&&clearTimeout(o),o=setTimeout(function(){a=""},500);var n=String.fromCharCode(e.which).toLowerCase(),t=this.element.find(".jstree-anchor").filter(":visible"),r=t.index(y.activeElement)||0,i=!1;if(1<(a+=n).length){if(t.slice(r).each(function(e,t){if(0===P(t).text().toLowerCase().indexOf(a))return P(t).trigger("focus"),!(i=!0)}.bind(this)),i)return;if(t.slice(0,r).each(function(e,t){if(0===P(t).text().toLowerCase().indexOf(a))return P(t).trigger("focus"),!(i=!0)}.bind(this)),i)return}if(new RegExp("^"+n.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")+"+$").test(a)){if(t.slice(r+1).each(function(e,t){if(P(t).text().toLowerCase().charAt(0)===n)return P(t).trigger("focus"),!(i=!0)}.bind(this)),i)return;if(t.slice(0,r+1).each(function(e,t){if(P(t).text().toLowerCase().charAt(0)===n)return P(t).trigger("focus"),!(i=!0)}.bind(this)),i)return}}.bind(this)).on("init.jstree",function(){var e=this.settings.core.themes;this._data.core.themes.dots=e.dots,this._data.core.themes.stripes=e.stripes,this._data.core.themes.icons=e.icons,this._data.core.themes.ellipsis=e.ellipsis,this.set_theme(e.name||"default",e.url),this.set_theme_variant(e.variant)}.bind(this)).on("loading.jstree",function(){this[this._data.core.themes.dots?"show_dots":"hide_dots"](),this[this._data.core.themes.icons?"show_icons":"hide_icons"](),this[this._data.core.themes.stripes?"show_stripes":"hide_stripes"](),this[this._data.core.themes.ellipsis?"show_ellipsis":"hide_ellipsis"]()}.bind(this)).on("blur.jstree",".jstree-anchor",function(e){this._data.core.focused=null,P(e.currentTarget).filter(".jstree-hovered").trigger("mouseleave"),this.element.attr("tabindex","0")}.bind(this)).on("focus.jstree",".jstree-anchor",function(e){var t=this.get_node(e.currentTarget);t&&t.id&&(this._data.core.focused=t.id),this.element.find(".jstree-hovered").not(e.currentTarget).trigger("mouseleave"),P(e.currentTarget).trigger("mouseenter"),this.element.attr("tabindex","-1")}.bind(this)).on("focus.jstree",function(){if(500<+new Date-t&&!this._data.core.focused&&this.settings.core.restore_focus){t=0;var e=this.get_node(this.element.attr("aria-activedescendant"),!0);e&&e.find("> .jstree-anchor").trigger("focus")}}.bind(this)).on("mouseenter.jstree",".jstree-anchor",function(e){this.hover_node(e.currentTarget)}.bind(this)).on("mouseleave.jstree",".jstree-anchor",function(e){this.dehover_node(e.currentTarget)}.bind(this))},unbind:function(){this.element.off(".jstree"),P(y).off(".jstree-"+this._id)},trigger:function(e,t){t||(t={}),(t.instance=this).element.triggerHandler(e.replace(".jstree","")+".jstree",t)},get_container:function(){return this.element},get_container_ul:function(){return this.element.children(".jstree-children").first()},get_string:function(e){var t=this.settings.core.strings;return P.vakata.is_function(t)?t.call(this,e):t&&t[e]?t[e]:e},_firstChild:function(e){for(e=e?e.firstChild:null;null!==e&&1!==e.nodeType;)e=e.nextSibling;return e},_nextSibling:function(e){for(e=e?e.nextSibling:null;null!==e&&1!==e.nodeType;)e=e.nextSibling;return e},_previousSibling:function(e){for(e=e?e.previousSibling:null;null!==e&&1!==e.nodeType;)e=e.previousSibling;return e},get_node:function(e,t){var n;e&&e.id&&(e=e.id),e instanceof P&&e.length&&e[0].id&&(e=e[0].id);try{if(this._model.data[e])e=this._model.data[e];else if("string"==typeof e&&this._model.data[e.replace(/^#/,"")])e=this._model.data[e.replace(/^#/,"")];else if("string"==typeof e&&(n=P("#"+e.replace(P.jstree.idregex,"\\$&"),this.element)).length&&this._model.data[n.closest(".jstree-node").attr("id")])e=this._model.data[n.closest(".jstree-node").attr("id")];else if((n=this.element.find(e)).length&&this._model.data[n.closest(".jstree-node").attr("id")])e=this._model.data[n.closest(".jstree-node").attr("id")];else{if(!(n=this.element.find(e)).length||!n.hasClass("jstree"))return!1;e=this._model.data[P.jstree.root]}return t&&(e=e.id===P.jstree.root?this.element:P("#"+e.id.replace(P.jstree.idregex,"\\$&"),this.element)),e}catch(e){return!1}},get_path:function(e,t,n){if(!(e=e.parents?e:this.get_node(e))||e.id===P.jstree.root||!e.parents)return!1;var r,i,a=[];for(a.push(n?e.id:e.text),r=0,i=e.parents.length;r<i;r++)a.push(n?e.parents[r]:this.get_text(e.parents[r]));return a=a.reverse().slice(1),t?a.join(t):a},get_next_dom:function(e,t){var n;if((e=this.get_node(e,!0))[0]===this.element[0]){for(n=this._firstChild(this.get_container_ul()[0]);n&&0===n.offsetHeight;)n=this._nextSibling(n);return!!n&&P(n)}if(!e||!e.length)return!1;if(t){for(n=e[0];(n=this._nextSibling(n))&&0===n.offsetHeight;);return!!n&&P(n)}if(e.hasClass("jstree-open")){for(n=this._firstChild(e.children(".jstree-children")[0]);n&&0===n.offsetHeight;)n=this._nextSibling(n);if(null!==n)return P(n)}for(n=e[0];(n=this._nextSibling(n))&&0===n.offsetHeight;);return null!==n?P(n):e.parentsUntil(".jstree",".jstree-node").nextAll(".jstree-node:visible").first()},get_prev_dom:function(e,t){var n;if((e=this.get_node(e,!0))[0]===this.element[0]){for(n=this.get_container_ul()[0].lastChild;n&&0===n.offsetHeight;)n=this._previousSibling(n);return!!n&&P(n)}if(!e||!e.length)return!1;if(t){for(n=e[0];(n=this._previousSibling(n))&&0===n.offsetHeight;);return!!n&&P(n)}for(n=e[0];(n=this._previousSibling(n))&&0===n.offsetHeight;);if(null===n)return!(!(n=e[0].parentNode.parentNode)||!n.className||-1===n.className.indexOf("jstree-node"))&&P(n);for(e=P(n);e.hasClass("jstree-open");)e=e.children(".jstree-children").first().children(".jstree-node:visible:last");return e},get_parent:function(e){return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&e.parent},get_children_dom:function(e){return(e=this.get_node(e,!0))[0]===this.element[0]?this.get_container_ul().children(".jstree-node"):!(!e||!e.length)&&e.children(".jstree-children").children(".jstree-node")},is_parent:function(e){return(e=this.get_node(e))&&(!1===e.state.loaded||0<e.children.length)},is_loaded:function(e){return(e=this.get_node(e))&&e.state.loaded},is_loading:function(e){return(e=this.get_node(e))&&e.state&&e.state.loading},is_open:function(e){return(e=this.get_node(e))&&e.state.opened},is_closed:function(e){return(e=this.get_node(e))&&this.is_parent(e)&&!e.state.opened},is_leaf:function(e){return!this.is_parent(e)},load_node:function(o,s){var e,t,n,r,i;if(P.vakata.is_array(o))return this._load_nodes(o.slice(),s),!0;if(!(o=this.get_node(o)))return s&&s.call(this,o,!1),!1;if(o.state.loaded){for(o.state.loaded=!1,n=0,r=o.parents.length;n<r;n++)this._model.data[o.parents[n]].children_d=P.vakata.array_filter(this._model.data[o.parents[n]].children_d,function(e){return-1===P.inArray(e,o.children_d)});for(e=0,t=o.children_d.length;e<t;e++)this._model.data[o.children_d[e]].state.selected&&(i=!0),delete this._model.data[o.children_d[e]];i&&(this._data.core.selected=P.vakata.array_filter(this._data.core.selected,function(e){return-1===P.inArray(e,o.children_d)})),o.children=[],o.children_d=[],i&&this.trigger("changed",{action:"load_node",node:o,selected:this._data.core.selected})}return o.state.failed=!1,o.state.loading=!0,this.get_node(o,!0).addClass("jstree-loading").attr("aria-busy",!0),this._load_node(o,function(e){(o=this._model.data[o.id]).state.loading=!1,o.state.loaded=e,o.state.failed=!o.state.loaded;var t,n=this.get_node(o,!0),r=0,i=this._model.data,a=!1;for(r=0,t=o.children.length;r<t;r++)if(i[o.children[r]]&&!i[o.children[r]].state.hidden){a=!0;break}o.state.loaded&&n&&n.length&&(n.removeClass("jstree-closed jstree-open jstree-leaf"),a?"#"!==o.id&&n.addClass(o.state.opened?"jstree-open":"jstree-closed"):n.addClass("jstree-leaf")),n.removeClass("jstree-loading").attr("aria-busy",!1),this.trigger("load_node",{node:o,status:e}),s&&s.call(this,o,e)}.bind(this)),!0},_load_nodes:function(e,t,n,r){var i,a,o=!0,s=function(){this._load_nodes(e,t,!0)},c=this._model.data,l=[];for(i=0,a=e.length;i<a;i++)c[e[i]]&&(!c[e[i]].state.loaded&&!c[e[i]].state.failed||!n&&r)&&(this.is_loading(e[i])||this.load_node(e[i],s),o=!1);if(o){for(i=0,a=e.length;i<a;i++)c[e[i]]&&c[e[i]].state.loaded&&l.push(e[i]);t&&!t.done&&(t.call(this,l),t.done=!0)}},load_all:function(e,t){if(e||(e=P.jstree.root),!(e=this.get_node(e)))return!1;var n,r,i=[],a=this._model.data,o=a[e.id].children_d;for(e.state&&!e.state.loaded&&i.push(e.id),n=0,r=o.length;n<r;n++)a[o[n]]&&a[o[n]].state&&!a[o[n]].state.loaded&&i.push(o[n]);i.length?this._load_nodes(i,function(){this.load_all(e,t)}):(t&&t.call(this,e),this.trigger("load_all",{node:e}))},_load_node:function(i,a){var e,t=this.settings.core.data,o=function(){return 3!==this.nodeType&&8!==this.nodeType};return t?P.vakata.is_function(t)?t.call(this,i,function(e){!1===e?a.call(this,!1):this["string"==typeof e?"_append_html_data":"_append_json_data"](i,"string"==typeof e?P(P.parseHTML(e)).filter(o):e,function(e){a.call(this,e)})}.bind(this)):"object"==typeof t?t.url?(t=P.extend(!0,{},t),P.vakata.is_function(t.url)&&(t.url=t.url.call(this,i)),P.vakata.is_function(t.data)&&(t.data=t.data.call(this,i)),P.ajax(t).done(function(e,t,n){var r=n.getResponseHeader("Content-Type");return r&&-1!==r.indexOf("json")||"object"==typeof e?this._append_json_data(i,e,function(e){a.call(this,e)}):r&&-1!==r.indexOf("html")||"string"==typeof e?this._append_html_data(i,P(P.parseHTML(e)).filter(o),function(e){a.call(this,e)}):(this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:i.id,xhr:n})},this.settings.core.error.call(this,this._data.core.last_error),a.call(this,!1))}.bind(this)).fail(function(e){this._data.core.last_error={error:"ajax",plugin:"core",id:"core_04",reason:"Could not load node",data:JSON.stringify({id:i.id,xhr:e})},a.call(this,!1),this.settings.core.error.call(this,this._data.core.last_error)}.bind(this))):(e=P.vakata.is_array(t)?P.extend(!0,[],t):P.isPlainObject(t)?P.extend(!0,{},t):t,i.id===P.jstree.root?this._append_json_data(i,e,function(e){a.call(this,e)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_05",reason:"Could not load node",data:JSON.stringify({id:i.id})},this.settings.core.error.call(this,this._data.core.last_error),a.call(this,!1))):"string"==typeof t?i.id===P.jstree.root?this._append_html_data(i,P(P.parseHTML(t)).filter(o),function(e){a.call(this,e)}):(this._data.core.last_error={error:"nodata",plugin:"core",id:"core_06",reason:"Could not load node",data:JSON.stringify({id:i.id})},this.settings.core.error.call(this,this._data.core.last_error),a.call(this,!1)):a.call(this,!1):i.id===P.jstree.root?this._append_html_data(i,this._data.core.original_container_html.clone(!0),function(e){a.call(this,e)}):a.call(this,!1)},_node_changed:function(e){(e=this.get_node(e))&&-1===P.inArray(e.id,this._model.changed)&&this._model.changed.push(e.id)},_append_html_data:function(e,t,n){(e=this.get_node(e)).children=[],e.children_d=[];var r,i,a,o=t.is("ul")?t.children():t,s=e.id,c=[],l=[],u=this._model.data,f=u[s],d=this._data.core.selected.length;for(o.each(function(e,t){(r=this._parse_model_from_html(P(t),s,f.parents.concat()))&&(c.push(r),l.push(r),u[r].children_d.length&&(l=l.concat(u[r].children_d)))}.bind(this)),f.children=c,f.children_d=l,i=0,a=f.parents.length;i<a;i++)u[f.parents[i]].children_d=u[f.parents[i]].children_d.concat(l);this.trigger("model",{nodes:l,parent:s}),s!==P.jstree.root?(this._node_changed(s),this.redraw()):(this.get_container_ul().children(".jstree-initial-node").remove(),this.redraw(!0)),this._data.core.selected.length!==d&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),n.call(this,!0)},_append_json_data:function(e,t,c,n){if(null!==this.element){(e=this.get_node(e)).children=[],e.children_d=[],t.d&&"string"==typeof(t=t.d)&&(t=JSON.parse(t)),P.vakata.is_array(t)||(t=[t]);var r=null,i={df:this._model.default_state,dat:t,par:e.id,m:this._model.data,t_id:this._id,t_cnt:this._cnt,sel:this._data.core.selected},v=this,a=function(e,l){e.data&&(e=e.data);var t,n,r,i,a=e.dat,o=e.par,s=[],c=[],u=[],f=e.df,d=e.t_id,h=e.t_cnt,p=e.m,m=p[o],g=e.sel,_=function(e,t,n){n=n?n.concat():[],t&&n.unshift(t);var r,i,a,o,s=e.id.toString(),c={id:s,text:e.text||"",icon:e.icon===l||e.icon,parent:t,parents:n,children:e.children||[],children_d:e.children_d||[],data:e.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(r in f)f.hasOwnProperty(r)&&(c.state[r]=f[r]);if(e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(c.icon=e.data.jstree.icon),c.icon!==l&&null!==c.icon&&""!==c.icon||(c.icon=!0),e&&e.data&&(c.data=e.data,e.data.jstree))for(r in e.data.jstree)e.data.jstree.hasOwnProperty(r)&&(c.state[r]=e.data.jstree[r]);if(e&&"object"==typeof e.state)for(r in e.state)e.state.hasOwnProperty(r)&&(c.state[r]=e.state[r]);if(e&&"object"==typeof e.li_attr)for(r in e.li_attr)e.li_attr.hasOwnProperty(r)&&(c.li_attr[r]=e.li_attr[r]);if(c.li_attr.id||(c.li_attr.id=s),e&&"object"==typeof e.a_attr)for(r in e.a_attr)e.a_attr.hasOwnProperty(r)&&(c.a_attr[r]=e.a_attr[r]);for(e&&e.children&&!0===e.children&&(c.state.loaded=!1,c.children=[],c.children_d=[]),r=0,i=(p[c.id]=c).children.length;r<i;r++)a=_(p[c.children[r]],c.id,n),o=p[a],c.children_d.push(a),o.children_d.length&&(c.children_d=c.children_d.concat(o.children_d));return delete e.data,delete e.children,p[c.id].original=e,c.state.selected&&u.push(c.id),c.id},b=function(e,t,n){n=n?n.concat():[],t&&n.unshift(t);for(var r,i,a,o,s,c=!1;c="j"+d+"_"+ ++h,p[c];);for(r in s={id:!1,text:"string"==typeof e?e:"",icon:"object"!=typeof e||e.icon===l||e.icon,parent:t,parents:n,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},f)f.hasOwnProperty(r)&&(s.state[r]=f[r]);if(e&&e.id&&(s.id=e.id.toString()),e&&e.text&&(s.text=e.text),e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(s.icon=e.data.jstree.icon),s.icon!==l&&null!==s.icon&&""!==s.icon||(s.icon=!0),e&&e.data&&(s.data=e.data,e.data.jstree))for(r in e.data.jstree)e.data.jstree.hasOwnProperty(r)&&(s.state[r]=e.data.jstree[r]);if(e&&"object"==typeof e.state)for(r in e.state)e.state.hasOwnProperty(r)&&(s.state[r]=e.state[r]);if(e&&"object"==typeof e.li_attr)for(r in e.li_attr)e.li_attr.hasOwnProperty(r)&&(s.li_attr[r]=e.li_attr[r]);if(s.li_attr.id&&!s.id&&(s.id=s.li_attr.id.toString()),s.id||(s.id=c),s.li_attr.id||(s.li_attr.id=s.id),e&&"object"==typeof e.a_attr)for(r in e.a_attr)e.a_attr.hasOwnProperty(r)&&(s.a_attr[r]=e.a_attr[r]);if(e&&e.children&&e.children.length){for(r=0,i=e.children.length;r<i;r++)a=b(e.children[r],s.id,n),o=p[a],s.children.push(a),o.children_d.length&&(s.children_d=s.children_d.concat(o.children_d));s.children_d=s.children_d.concat(s.children)}return e&&e.children&&!0===e.children&&(s.state.loaded=!1,s.children=[],s.children_d=[]),delete e.data,delete e.children,s.original=e,(p[s.id]=s).state.selected&&u.push(s.id),s.id};if(a.length&&a[0].id!==l&&a[0].parent!==l){for(n=0,r=a.length;n<r;n++)a[n].children||(a[n].children=[]),a[n].state||(a[n].state={}),p[a[n].id.toString()]=a[n];for(n=0,r=a.length;n<r;n++)p[a[n].parent.toString()]?(p[a[n].parent.toString()].children.push(a[n].id.toString()),m.children_d.push(a[n].id.toString())):void 0!==v&&(v._data.core.last_error={error:"parse",plugin:"core",id:"core_07",reason:"Node with invalid parent",data:JSON.stringify({id:a[n].id.toString(),parent:a[n].parent.toString()})},v.settings.core.error.call(v,v._data.core.last_error));for(n=0,r=m.children.length;n<r;n++)t=_(p[m.children[n]],o,m.parents.concat()),c.push(t),p[t].children_d.length&&(c=c.concat(p[t].children_d));for(n=0,r=m.parents.length;n<r;n++)p[m.parents[n]].children_d=p[m.parents[n]].children_d.concat(c);i={cnt:h,mod:p,sel:g,par:o,dpc:c,add:u}}else{for(n=0,r=a.length;n<r;n++)(t=b(a[n],o,m.parents.concat()))&&(s.push(t),c.push(t),p[t].children_d.length&&(c=c.concat(p[t].children_d)));for(m.children=s,m.children_d=c,n=0,r=m.parents.length;n<r;n++)p[m.parents[n]].children_d=p[m.parents[n]].children_d.concat(c);i={cnt:h,mod:p,sel:g,par:o,dpc:c,add:u}}if("undefined"!=typeof window&&void 0!==window.document)return i;postMessage(i)},o=function(e,t){if(null!==this.element){this._cnt=e.cnt;var n,r=this._model.data;for(n in r)r.hasOwnProperty(n)&&r[n].state&&r[n].state.loading&&e.mod[n]&&(e.mod[n].state.loading=!0);if(this._model.data=e.mod,t){var i,a=e.add,o=e.sel,s=this._data.core.selected.slice();if(r=this._model.data,o.length!==s.length||P.vakata.array_unique(o.concat(s)).length!==o.length){for(n=0,i=o.length;n<i;n++)-1===P.inArray(o[n],a)&&-1===P.inArray(o[n],s)&&(r[o[n]].state.selected=!1);for(n=0,i=s.length;n<i;n++)-1===P.inArray(s[n],o)&&(r[s[n]].state.selected=!0)}}e.add.length&&(this._data.core.selected=this._data.core.selected.concat(e.add)),this.trigger("model",{nodes:e.dpc,parent:e.par}),e.par!==P.jstree.root?(this._node_changed(e.par),this.redraw()):this.redraw(!0),e.add.length&&this.trigger("changed",{action:"model",selected:this._data.core.selected}),!t&&l?l(function(){c.call(v,!0)}):c.call(v,!0)}};if(this.settings.core.worker&&window.Blob&&window.URL&&window.Worker)try{null===this._wrk&&(this._wrk=window.URL.createObjectURL(new window.Blob(["self.onmessage = "+a.toString()],{type:"text/javascript"}))),!this._data.core.working||n?(this._data.core.working=!0,(r=new window.Worker(this._wrk)).onmessage=function(e){o.call(this,e.data,!0);try{r.terminate(),r=null}catch(e){}this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}.bind(this),i.par?r.postMessage(i):this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1):this._data.core.worker_queue.push([e,t,c,!0])}catch(e){o.call(this,a(i),!1),this._data.core.worker_queue.length?this._append_json_data.apply(this,this._data.core.worker_queue.shift()):this._data.core.working=!1}else o.call(this,a(i),!1)}},_parse_model_from_html:function(e,t,n){n=n?[].concat(n):[],t&&n.unshift(t);var r,i,a,o,s,c=this._model.data,l={id:!1,text:!1,icon:!0,parent:t,parents:n,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(a in this._model.default_state)this._model.default_state.hasOwnProperty(a)&&(l.state[a]=this._model.default_state[a]);if(o=P.vakata.attributes(e,!0),P.each(o,function(e,t){if(!(t=P.vakata.trim(t)).length)return!0;l.li_attr[e]=t,"id"===e&&(l.id=t.toString())}),(o=e.children("a").first()).length&&(o=P.vakata.attributes(o,!0),P.each(o,function(e,t){(t=P.vakata.trim(t)).length&&(l.a_attr[e]=t)})),(o=e.children("a").first().length?e.children("a").first().clone():e.clone()).children("ins, i, ul").remove(),o=o.html(),o=P("<div></div>").html(o),l.text=this.settings.core.force_text?o.text():o.html(),o=e.data(),l.data=o?P.extend(!0,{},o):null,l.state.opened=e.hasClass("jstree-open"),l.state.selected=e.children("a").hasClass("jstree-clicked"),l.state.disabled=e.children("a").hasClass("jstree-disabled"),l.data&&l.data.jstree)for(a in l.data.jstree)l.data.jstree.hasOwnProperty(a)&&(l.state[a]=l.data.jstree[a]);for((o=e.children("a").children(".jstree-themeicon")).length&&(l.icon=!o.hasClass("jstree-themeicon-hidden")&&o.attr("rel")),l.state.icon!==M&&(l.icon=l.state.icon),l.icon!==M&&null!==l.icon&&""!==l.icon||(l.icon=!0),o=e.children("ul").children("li");c[s="j"+this._id+"_"+ ++this._cnt];);return l.id=l.li_attr.id?l.li_attr.id.toString():s,o.length?(o.each(function(e,t){r=this._parse_model_from_html(P(t),l.id,n),i=this._model.data[r],l.children.push(r),i.children_d.length&&(l.children_d=l.children_d.concat(i.children_d))}.bind(this)),l.children_d=l.children_d.concat(l.children)):e.hasClass("jstree-closed")&&(l.state.loaded=!1),l.li_attr.class&&(l.li_attr.class=l.li_attr.class.replace("jstree-closed","").replace("jstree-open","")),l.a_attr.class&&(l.a_attr.class=l.a_attr.class.replace("jstree-clicked","").replace("jstree-disabled","")),(c[l.id]=l).state.selected&&this._data.core.selected.push(l.id),l.id},_parse_model_from_flat_json:function(e,t,n){n=n?n.concat():[],t&&n.unshift(t);var r,i,a,o,s=e.id.toString(),c=this._model.data,l=this._model.default_state,u={id:s,text:e.text||"",icon:e.icon===M||e.icon,parent:t,parents:n,children:e.children||[],children_d:e.children_d||[],data:e.data,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1};for(r in l)l.hasOwnProperty(r)&&(u.state[r]=l[r]);if(e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(u.icon=e.data.jstree.icon),u.icon!==M&&null!==u.icon&&""!==u.icon||(u.icon=!0),e&&e.data&&(u.data=e.data,e.data.jstree))for(r in e.data.jstree)e.data.jstree.hasOwnProperty(r)&&(u.state[r]=e.data.jstree[r]);if(e&&"object"==typeof e.state)for(r in e.state)e.state.hasOwnProperty(r)&&(u.state[r]=e.state[r]);if(e&&"object"==typeof e.li_attr)for(r in e.li_attr)e.li_attr.hasOwnProperty(r)&&(u.li_attr[r]=e.li_attr[r]);if(u.li_attr.id||(u.li_attr.id=s),e&&"object"==typeof e.a_attr)for(r in e.a_attr)e.a_attr.hasOwnProperty(r)&&(u.a_attr[r]=e.a_attr[r]);for(e&&e.children&&!0===e.children&&(u.state.loaded=!1,u.children=[],u.children_d=[]),r=0,i=(c[u.id]=u).children.length;r<i;r++)o=c[a=this._parse_model_from_flat_json(c[u.children[r]],u.id,n)],u.children_d.push(a),o.children_d.length&&(u.children_d=u.children_d.concat(o.children_d));return delete e.data,delete e.children,c[u.id].original=e,u.state.selected&&this._data.core.selected.push(u.id),u.id},_parse_model_from_json:function(e,t,n){n=n?n.concat():[],t&&n.unshift(t);for(var r,i,a,o,s,c=!1,l=this._model.data,u=this._model.default_state;l[c="j"+this._id+"_"+ ++this._cnt];);for(r in s={id:!1,text:"string"==typeof e?e:"",icon:"object"!=typeof e||e.icon===M||e.icon,parent:t,parents:n,children:[],children_d:[],data:null,state:{},li_attr:{id:!1},a_attr:{href:"#"},original:!1},u)u.hasOwnProperty(r)&&(s.state[r]=u[r]);if(e&&e.id&&(s.id=e.id.toString()),e&&e.text&&(s.text=e.text),e&&e.data&&e.data.jstree&&e.data.jstree.icon&&(s.icon=e.data.jstree.icon),s.icon!==M&&null!==s.icon&&""!==s.icon||(s.icon=!0),e&&e.data&&(s.data=e.data,e.data.jstree))for(r in e.data.jstree)e.data.jstree.hasOwnProperty(r)&&(s.state[r]=e.data.jstree[r]);if(e&&"object"==typeof e.state)for(r in e.state)e.state.hasOwnProperty(r)&&(s.state[r]=e.state[r]);if(e&&"object"==typeof e.li_attr)for(r in e.li_attr)e.li_attr.hasOwnProperty(r)&&(s.li_attr[r]=e.li_attr[r]);if(s.li_attr.id&&!s.id&&(s.id=s.li_attr.id.toString()),s.id||(s.id=c),s.li_attr.id||(s.li_attr.id=s.id),e&&"object"==typeof e.a_attr)for(r in e.a_attr)e.a_attr.hasOwnProperty(r)&&(s.a_attr[r]=e.a_attr[r]);if(e&&e.children&&e.children.length){for(r=0,i=e.children.length;r<i;r++)o=l[a=this._parse_model_from_json(e.children[r],s.id,n)],s.children.push(a),o.children_d.length&&(s.children_d=s.children_d.concat(o.children_d));s.children_d=s.children.concat(s.children_d)}return e&&e.children&&!0===e.children&&(s.state.loaded=!1,s.children=[],s.children_d=[]),delete e.data,delete e.children,s.original=e,(l[s.id]=s).state.selected&&this._data.core.selected.push(s.id),s.id},_redraw:function(){var e,t,n,r=this._model.force_full_redraw?this._model.data[P.jstree.root].children.concat([]):this._model.changed.concat([]),i=y.createElement("UL"),a=this._data.core.focused;for(t=0,n=r.length;t<n;t++)(e=this.redraw_node(r[t],!0,this._model.force_full_redraw))&&this._model.force_full_redraw&&i.appendChild(e);this._model.force_full_redraw&&(i.className=this.get_container_ul()[0].className,i.setAttribute("role","group"),this.element.empty().append(i)),null!==a&&this.settings.core.restore_focus&&((e=this.get_node(a,!0))&&e.length&&e.children(".jstree-anchor")[0]!==y.activeElement?e.children(".jstree-anchor").trigger("focus"):this._data.core.focused=null),this._model.force_full_redraw=!1,this._model.changed=[],this.trigger("redraw",{nodes:r})},redraw:function(e){e&&(this._model.force_full_redraw=!0),this._redraw()},draw_children:function(e){var t=this.get_node(e),n=!1,r=!1,i=!1,a=y;if(!t)return!1;if(t.id===P.jstree.root)return this.redraw(!0);if(!(e=this.get_node(e,!0))||!e.length)return!1;if(e.children(".jstree-children").remove(),e=e[0],t.children.length&&t.state.loaded){for((i=a.createElement("UL")).setAttribute("role","group"),i.className="jstree-children",n=0,r=t.children.length;n<r;n++)i.appendChild(this.redraw_node(t.children[n],!0,!0));e.appendChild(i)}},redraw_node:function(e,t,n,r){var i=this.get_node(e),a=!1,o=!1,s=!1,c=!1,l=!1,u=!1,f="",d=y,h=this._model.data,p=!1,m=null,g=0,_=0,b=!1,v=!1;if(!i)return!1;if(i.id===P.jstree.root)return this.redraw(!0);if(t=t||0===i.children.length,e=y.querySelector?this.element[0].querySelector("#"+(-1!=="0123456789".indexOf(i.id[0])?"\\3"+i.id[0]+" "+i.id.substr(1).replace(P.jstree.idregex,"\\$&"):i.id.replace(P.jstree.idregex,"\\$&"))):y.getElementById(i.id))e=P(e),n||((a=e.parent().parent()[0])===this.element[0]&&(a=null),o=e.index()),t||!i.children.length||e.children(".jstree-children").length||(t=!0),t||(s=e.children(".jstree-children")[0]),p=e.children(".jstree-anchor")[0]===y.activeElement,e.remove();else if(t=!0,!n){if(!(null===(a=i.parent!==P.jstree.root?P("#"+i.parent.replace(P.jstree.idregex,"\\$&"),this.element)[0]:null)||a&&h[i.parent].state.opened))return!1;o=P.inArray(i.id,null===a?h[P.jstree.root].children:h[i.parent].children)}for(c in e=this._data.core.node.cloneNode(!0),f="jstree-node ",i.li_attr)if(i.li_attr.hasOwnProperty(c)){if("id"===c)continue;"class"!==c?e.setAttribute(c,i.li_attr[c]):f+=i.li_attr[c]}for(i.a_attr.id||(i.a_attr.id=i.id+"_anchor"),e.childNodes[1].setAttribute("aria-selected",!!i.state.selected),e.childNodes[1].setAttribute("aria-level",i.parents.length),this.settings.core.compute_elements_positions&&(e.childNodes[1].setAttribute("aria-setsize",h[i.parent].children.length),e.childNodes[1].setAttribute("aria-posinset",h[i.parent].children.indexOf(i.id)+1)),i.state.disabled&&e.childNodes[1].setAttribute("aria-disabled",!0),c=0,l=i.children.length;c<l;c++)if(!h[i.children[c]].state.hidden){b=!0;break}if(null!==i.parent&&h[i.parent]&&!i.state.hidden&&(c=P.inArray(i.id,h[i.parent].children),v=i.id,-1!==c))for(c++,l=h[i.parent].children.length;c<l&&(h[h[i.parent].children[c]].state.hidden||(v=h[i.parent].children[c]),v===i.id);c++);for(l in i.state.hidden&&(f+=" jstree-hidden"),i.state.loading&&(f+=" jstree-loading"),i.state.loaded&&!b?f+=" jstree-leaf":(f+=i.state.opened&&i.state.loaded?" jstree-open":" jstree-closed",e.childNodes[1].setAttribute("aria-expanded",i.state.opened&&i.state.loaded)),v===i.id&&(f+=" jstree-last"),e.id=i.id,e.className=f,f=(i.state.selected?" jstree-clicked":"")+(i.state.disabled?" jstree-disabled":""),i.a_attr)if(i.a_attr.hasOwnProperty(l)){if("href"===l&&"#"===i.a_attr[l])continue;"class"!==l?e.childNodes[1].setAttribute(l,i.a_attr[l]):f+=" "+i.a_attr[l]}if(f.length&&(e.childNodes[1].className="jstree-anchor "+f),(i.icon&&!0!==i.icon||!1===i.icon)&&(!1===i.icon?e.childNodes[1].childNodes[0].className+=" jstree-themeicon-hidden":-1===i.icon.indexOf("/")&&-1===i.icon.indexOf(".")?e.childNodes[1].childNodes[0].className+=" "+i.icon+" jstree-themeicon-custom":(e.childNodes[1].childNodes[0].style.backgroundImage='url("'+i.icon+'")',e.childNodes[1].childNodes[0].style.backgroundPosition="center center",e.childNodes[1].childNodes[0].style.backgroundSize="auto",e.childNodes[1].childNodes[0].className+=" jstree-themeicon-custom")),this.settings.core.force_text?e.childNodes[1].appendChild(d.createTextNode(i.text)):e.childNodes[1].innerHTML+=i.text,t&&i.children.length&&(i.state.opened||r)&&i.state.loaded){for((u=d.createElement("UL")).setAttribute("role","group"),u.className="jstree-children",c=0,l=i.children.length;c<l;c++)u.appendChild(this.redraw_node(i.children[c],t,!0));e.appendChild(u)}if(s&&e.appendChild(s),!n){for(a||(a=this.element[0]),c=0,l=a.childNodes.length;c<l;c++)if(a.childNodes[c]&&a.childNodes[c].className&&-1!==a.childNodes[c].className.indexOf("jstree-children")){m=a.childNodes[c];break}m||((m=d.createElement("UL")).setAttribute("role","group"),m.className="jstree-children",a.appendChild(m)),o<(a=m).childNodes.length?a.insertBefore(e,a.childNodes[o]):a.appendChild(e),p&&(g=this.element[0].scrollTop,_=this.element[0].scrollLeft,e.childNodes[1].focus(),this.element[0].scrollTop=g,this.element[0].scrollLeft=_)}return i.state.opened&&!i.state.loaded&&(i.state.opened=!1,setTimeout(function(){this.open_node(i.id,!1,0)}.bind(this),0)),e},open_node:function(e,n,r){var t,i,a,o;if(P.vakata.is_array(e)){for(t=0,i=(e=e.slice()).length;t<i;t++)this.open_node(e[t],n,r);return!0}return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&(r=r===M?this.settings.core.animation:r,this.is_closed(e)?this.is_loaded(e)?(a=this.get_node(e,!0),o=this,a.length&&(r&&a.children(".jstree-children").length&&a.children(".jstree-children").stop(!0,!0),e.children.length&&!this._firstChild(a.children(".jstree-children")[0])&&this.draw_children(e),r?(this.trigger("before_open",{node:e}),a.children(".jstree-children").css("display","none").end().removeClass("jstree-closed").addClass("jstree-open").children(".jstree-anchor").attr("aria-expanded",!0).end().children(".jstree-children").stop(!0,!0).slideDown(r,function(){this.style.display="",o.element&&o.trigger("after_open",{node:e})})):(this.trigger("before_open",{node:e}),a[0].className=a[0].className.replace("jstree-closed","jstree-open"),a[0].childNodes[1].setAttribute("aria-expanded",!0))),e.state.opened=!0,n&&n.call(this,e,!0),a.length||this.trigger("before_open",{node:e}),this.trigger("open_node",{node:e}),r&&a.length||this.trigger("after_open",{node:e}),!0):this.is_loading(e)?setTimeout(function(){this.open_node(e,n,r)}.bind(this),500):void this.load_node(e,function(e,t){return t?this.open_node(e,n,r):!!n&&n.call(this,e,!1)}):(n&&n.call(this,e,!1),!1))},_open_to:function(e){if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;var t,n,r=e.parents;for(t=0,n=r.length;t<n;t+=1)t!==P.jstree.root&&this.open_node(r[t],!1,0);return P("#"+e.id.replace(P.jstree.idregex,"\\$&"),this.element)},close_node:function(e,t){var n,r,i,a;if(P.vakata.is_array(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.close_node(e[n],t);return!0}return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&(!this.is_closed(e)&&(t=t===M?this.settings.core.animation:t,a=(i=this).get_node(e,!0),e.state.opened=!1,this.trigger("close_node",{node:e}),void(a.length?t?a.children(".jstree-children").attr("style","display:block !important").end().removeClass("jstree-open").addClass("jstree-closed").children(".jstree-anchor").attr("aria-expanded",!1).end().children(".jstree-children").stop(!0,!0).slideUp(t,function(){this.style.display="",a.children(".jstree-children").remove(),i.element&&i.trigger("after_close",{node:e})}):(a[0].className=a[0].className.replace("jstree-open","jstree-closed"),a.children(".jstree-anchor").attr("aria-expanded",!1),a.children(".jstree-children").remove(),this.trigger("after_close",{node:e})):this.trigger("after_close",{node:e}))))},toggle_node:function(e){var t,n;if(P.vakata.is_array(e)){for(t=0,n=(e=e.slice()).length;t<n;t++)this.toggle_node(e[t]);return!0}return this.is_closed(e)?this.open_node(e):this.is_open(e)?this.close_node(e):void 0},open_all:function(e,n,r){if(e||(e=P.jstree.root),!(e=this.get_node(e)))return!1;var t,i,a,o=e.id===P.jstree.root?this.get_container_ul():this.get_node(e,!0);if(!o.length){for(t=0,i=e.children_d.length;t<i;t++)this.is_closed(this._model.data[e.children_d[t]])&&(this._model.data[e.children_d[t]].state.opened=!0);return this.trigger("open_all",{node:e})}r=r||o,(o=(a=this).is_closed(e)?o.find(".jstree-closed").addBack():o.find(".jstree-closed")).each(function(){a.open_node(this,function(e,t){t&&this.is_parent(e)&&this.open_all(e,n,r)},n||0)}),0===r.find(".jstree-closed").length&&this.trigger("open_all",{node:this.get_node(r)})},close_all:function(e,t){if(e||(e=P.jstree.root),!(e=this.get_node(e)))return!1;var n,r,i=e.id===P.jstree.root?this.get_container_ul():this.get_node(e,!0),a=this;for(i.length&&(i=this.is_open(e)?i.find(".jstree-open").addBack():i.find(".jstree-open"),P(i.get().reverse()).each(function(){a.close_node(this,t||0)})),n=0,r=e.children_d.length;n<r;n++)this._model.data[e.children_d[n]].state.opened=!1;this.trigger("close_all",{node:e})},is_disabled:function(e){return(e=this.get_node(e))&&e.state&&e.state.disabled},enable_node:function(e){var t,n;if(P.vakata.is_array(e)){for(t=0,n=(e=e.slice()).length;t<n;t++)this.enable_node(e[t]);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;e.state.disabled=!1,this.get_node(e,!0).children(".jstree-anchor").removeClass("jstree-disabled").attr("aria-disabled",!1),this.trigger("enable_node",{node:e})},disable_node:function(e){var t,n;if(P.vakata.is_array(e)){for(t=0,n=(e=e.slice()).length;t<n;t++)this.disable_node(e[t]);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;e.state.disabled=!0,this.get_node(e,!0).children(".jstree-anchor").addClass("jstree-disabled").attr("aria-disabled",!0),this.trigger("disable_node",{node:e})},is_hidden:function(e){return!0===(e=this.get_node(e)).state.hidden},hide_node:function(e,t){var n,r;if(P.vakata.is_array(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.hide_node(e[n],!0);return t||this.redraw(),!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;e.state.hidden||(e.state.hidden=!0,this._node_changed(e.parent),t||this.redraw(),this.trigger("hide_node",{node:e}))},show_node:function(e,t){var n,r;if(P.vakata.is_array(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.show_node(e[n],!0);return t||this.redraw(),!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;e.state.hidden&&(e.state.hidden=!1,this._node_changed(e.parent),t||this.redraw(),this.trigger("show_node",{node:e}))},hide_all:function(e){var t,n=this._model.data,r=[];for(t in n)n.hasOwnProperty(t)&&t!==P.jstree.root&&!n[t].state.hidden&&(n[t].state.hidden=!0,r.push(t));return this._model.force_full_redraw=!0,e||this.redraw(),this.trigger("hide_all",{nodes:r}),r},show_all:function(e){var t,n=this._model.data,r=[];for(t in n)n.hasOwnProperty(t)&&t!==P.jstree.root&&n[t].state.hidden&&(n[t].state.hidden=!1,r.push(t));return this._model.force_full_redraw=!0,e||this.redraw(),this.trigger("show_all",{nodes:r}),r},activate_node:function(e,t){if(this.is_disabled(e))return!1;if(t&&"object"==typeof t||(t={}),this._data.core.last_clicked=this._data.core.last_clicked&&this._data.core.last_clicked.id!==M?this.get_node(this._data.core.last_clicked.id):null,this._data.core.last_clicked&&!this._data.core.last_clicked.state.selected&&(this._data.core.last_clicked=null),!this._data.core.last_clicked&&this._data.core.selected.length&&(this._data.core.last_clicked=this.get_node(this._data.core.selected[this._data.core.selected.length-1])),this.settings.core.multiple&&(t.metaKey||t.ctrlKey||t.shiftKey)&&(!t.shiftKey||this._data.core.last_clicked&&this.get_parent(e)&&this.get_parent(e)===this._data.core.last_clicked.parent))if(t.shiftKey){var n,r,i=this.get_node(e).id,a=this._data.core.last_clicked.id,o=this.get_node(this._data.core.last_clicked.parent).children,s=!1;for(n=0,r=o.length;n<r;n+=1)o[n]===i&&(s=!s),o[n]===a&&(s=!s),this.is_disabled(o[n])||!s&&o[n]!==i&&o[n]!==a?this.deselect_node(o[n],!0,t):this.is_hidden(o[n])||this.select_node(o[n],!0,!1,t);this.trigger("changed",{action:"select_node",node:this.get_node(e),selected:this._data.core.selected,event:t})}else this.is_selected(e)?this.deselect_node(e,!1,t):this.select_node(e,!1,!1,t);else!this.settings.core.multiple&&(t.metaKey||t.ctrlKey||t.shiftKey)&&this.is_selected(e)?this.deselect_node(e,!1,t):(this.deselect_all(!0),this.select_node(e,!1,!1,t),this._data.core.last_clicked=this.get_node(e));this.trigger("activate_node",{node:this.get_node(e),event:t})},hover_node:function(e){if(!(e=this.get_node(e,!0))||!e.length||e.children(".jstree-hovered").length)return!1;var t=this.element.find(".jstree-hovered"),n=this.element;t&&t.length&&this.dehover_node(t),e.children(".jstree-anchor").addClass("jstree-hovered"),this.trigger("hover_node",{node:this.get_node(e)}),setTimeout(function(){n.attr("aria-activedescendant",e[0].id)},0)},dehover_node:function(e){if(!(e=this.get_node(e,!0))||!e.length||!e.children(".jstree-hovered").length)return!1;e.children(".jstree-anchor").removeClass("jstree-hovered"),this.trigger("dehover_node",{node:this.get_node(e)})},select_node:function(e,t,n,r){var i,a,o;if(P.vakata.is_array(e)){for(a=0,o=(e=e.slice()).length;a<o;a++)this.select_node(e[a],t,n,r);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;i=this.get_node(e,!0),e.state.selected||(e.state.selected=!0,this._data.core.selected.push(e.id),n||(i=this._open_to(e)),i&&i.length&&i.children(".jstree-anchor").addClass("jstree-clicked").attr("aria-selected",!0),this.trigger("select_node",{node:e,selected:this._data.core.selected,event:r}),t||this.trigger("changed",{action:"select_node",node:e,selected:this._data.core.selected,event:r}))},deselect_node:function(e,t,n){var r,i,a;if(P.vakata.is_array(e)){for(r=0,i=(e=e.slice()).length;r<i;r++)this.deselect_node(e[r],t,n);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;a=this.get_node(e,!0),e.state.selected&&(e.state.selected=!1,this._data.core.selected=P.vakata.array_remove_item(this._data.core.selected,e.id),a.length&&a.children(".jstree-anchor").removeClass("jstree-clicked").attr("aria-selected",!1),this.trigger("deselect_node",{node:e,selected:this._data.core.selected,event:n}),t||this.trigger("changed",{action:"deselect_node",node:e,selected:this._data.core.selected,event:n}))},select_all:function(e){var t,n,r=this._data.core.selected.concat([]);for(this._data.core.selected=this._model.data[P.jstree.root].children_d.concat(),t=0,n=this._data.core.selected.length;t<n;t++)this._model.data[this._data.core.selected[t]]&&(this._model.data[this._data.core.selected[t]].state.selected=!0);this.redraw(!0),this.trigger("select_all",{selected:this._data.core.selected}),e||this.trigger("changed",{action:"select_all",selected:this._data.core.selected,old_selection:r})},deselect_all:function(e){var t,n,r=this._data.core.selected.concat([]);for(t=0,n=this._data.core.selected.length;t<n;t++)this._model.data[this._data.core.selected[t]]&&(this._model.data[this._data.core.selected[t]].state.selected=!1);this._data.core.selected=[],this.element.find(".jstree-clicked").removeClass("jstree-clicked").attr("aria-selected",!1),this.trigger("deselect_all",{selected:this._data.core.selected,node:r}),e||this.trigger("changed",{action:"deselect_all",selected:this._data.core.selected,old_selection:r})},is_selected:function(e){return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&e.state.selected},get_selected:function(e){return e?P.map(this._data.core.selected,function(e){return this.get_node(e)}.bind(this)):this._data.core.selected.slice()},get_top_selected:function(e){var t,n,r,i,a=this.get_selected(!0),o={};for(t=0,n=a.length;t<n;t++)o[a[t].id]=a[t];for(t=0,n=a.length;t<n;t++)for(r=0,i=a[t].children_d.length;r<i;r++)o[a[t].children_d[r]]&&delete o[a[t].children_d[r]];for(t in a=[],o)o.hasOwnProperty(t)&&a.push(t);return e?P.map(a,function(e){return this.get_node(e)}.bind(this)):a},get_bottom_selected:function(e){var t,n,r=this.get_selected(!0),i=[];for(t=0,n=r.length;t<n;t++)r[t].children.length||i.push(r[t].id);return e?P.map(i,function(e){return this.get_node(e)}.bind(this)):i},get_state:function(){var e,t={core:{open:[],loaded:[],scroll:{left:this.element.scrollLeft(),top:this.element.scrollTop()},selected:[]}};for(e in this._model.data)this._model.data.hasOwnProperty(e)&&e!==P.jstree.root&&(this._model.data[e].state.loaded&&this.settings.core.loaded_state&&t.core.loaded.push(e),this._model.data[e].state.opened&&t.core.open.push(e),this._model.data[e].state.selected&&t.core.selected.push(e));return t},set_state:function(t,n){if(t){if(t.core&&t.core.selected&&t.core.initial_selection===M&&(t.core.initial_selection=this._data.core.selected.concat([]).sort().join(",")),t.core){var r,e;if(t.core.loaded)return this.settings.core.loaded_state&&P.vakata.is_array(t.core.loaded)&&t.core.loaded.length?this._load_nodes(t.core.loaded,function(e){delete t.core.loaded,this.set_state(t,n)}):(delete t.core.loaded,this.set_state(t,n)),!1;if(t.core.open)return P.vakata.is_array(t.core.open)&&t.core.open.length?this._load_nodes(t.core.open,function(e){this.open_node(e,!1,0),delete t.core.open,this.set_state(t,n)}):(delete t.core.open,this.set_state(t,n)),!1;if(t.core.scroll)return t.core.scroll&&t.core.scroll.left!==M&&this.element.scrollLeft(t.core.scroll.left),t.core.scroll&&t.core.scroll.top!==M&&this.element.scrollTop(t.core.scroll.top),delete t.core.scroll,this.set_state(t,n),!1;if(t.core.selected)return r=this,t.core.initial_selection!==M&&t.core.initial_selection!==this._data.core.selected.concat([]).sort().join(",")||(this.deselect_all(),P.each(t.core.selected,function(e,t){r.select_node(t,!1,!0)})),delete t.core.initial_selection,delete t.core.selected,this.set_state(t,n),!1;for(e in t)t.hasOwnProperty(e)&&"core"!==e&&-1===P.inArray(e,this.settings.plugins)&&delete t[e];if(P.isEmptyObject(t.core))return delete t.core,this.set_state(t,n),!1}return!P.isEmptyObject(t)||(t=null,n&&n.call(this),this.trigger("set_state"),!1)}return!1},refresh:function(e,t){this._data.core.state=!0===t?{}:this.get_state(),t&&P.vakata.is_function(t)&&(this._data.core.state=t.call(this,this._data.core.state)),this._cnt=0,this._model.data={},this._model.data[P.jstree.root]={id:P.jstree.root,parent:null,parents:[],children:[],children_d:[],state:{loaded:!1}},this._data.core.selected=[],this._data.core.last_clicked=null,this._data.core.focused=null;var n=this.get_container_ul()[0].className;e||(this.element.html("<ul class='"+n+"' role='group'><li class='jstree-initial-node jstree-loading jstree-leaf jstree-last' role='none' id='j"+this._id+"_loading'><i class='jstree-icon jstree-ocl'></i><a class='jstree-anchor' role='treeitem' href='#'><i class='jstree-icon jstree-themeicon-hidden'></i>"+this.get_string("Loading ...")+"</a></li></ul>"),this.element.attr("aria-activedescendant","j"+this._id+"_loading")),this.load_node(P.jstree.root,function(e,t){t&&(this.get_container_ul()[0].className=n,this._firstChild(this.get_container_ul()[0])&&this.element.attr("aria-activedescendant",this._firstChild(this.get_container_ul()[0]).id),this.set_state(P.extend(!0,{},this._data.core.state),function(){this.trigger("refresh")})),this._data.core.state=null})},refresh_node:function(t){if(!(t=this.get_node(t))||t.id===P.jstree.root)return!1;var n=[],e=[],r=this._data.core.selected.concat([]);e.push(t.id),!0===t.state.opened&&n.push(t.id),this.get_node(t,!0).find(".jstree-open").each(function(){e.push(this.id),n.push(this.id)}),this._load_nodes(e,function(e){this.open_node(n,!1,0),this.select_node(r),this.trigger("refresh_node",{node:t,nodes:e})}.bind(this),!1,!0)},set_id:function(e,t){if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;var n,r,i=this._model.data,a=e.id;for(t=t.toString(),i[e.parent].children[P.inArray(e.id,i[e.parent].children)]=t,n=0,r=e.parents.length;n<r;n++)i[e.parents[n]].children_d[P.inArray(e.id,i[e.parents[n]].children_d)]=t;for(n=0,r=e.children.length;n<r;n++)i[e.children[n]].parent=t;for(n=0,r=e.children_d.length;n<r;n++)i[e.children_d[n]].parents[P.inArray(e.id,i[e.children_d[n]].parents)]=t;return-1!==(n=P.inArray(e.id,this._data.core.selected))&&(this._data.core.selected[n]=t),(n=this.get_node(e.id,!0))&&(n.attr("id",t),this.element.attr("aria-activedescendant")===e.id&&this.element.attr("aria-activedescendant",t)),delete i[e.id],e.id=t,i[e.li_attr.id=t]=e,this.trigger("set_id",{node:e,new:e.id,old:a}),!0},get_text:function(e){return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&e.text},set_text:function(e,t){var n,r;if(P.vakata.is_array(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.set_text(e[n],t);return!0}return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&(e.text=t,this.get_node(e,!0).length&&this.redraw_node(e.id),this.trigger("set_text",{obj:e,text:t}),!0)},get_json:function(e,t,n){if(!(e=this.get_node(e||P.jstree.root)))return!1;t&&t.flat&&!n&&(n=[]);var r,i,a={id:e.id,text:e.text,icon:this.get_icon(e),li_attr:P.extend(!0,{},e.li_attr),a_attr:P.extend(!0,{},e.a_attr),state:{},data:(!t||!t.no_data)&&P.extend(!0,P.vakata.is_array(e.data)?[]:{},e.data)};if(t&&t.flat?a.parent=e.parent:a.children=[],t&&t.no_state)delete a.state;else for(r in e.state)e.state.hasOwnProperty(r)&&(a.state[r]=e.state[r]);if(t&&t.no_li_attr&&delete a.li_attr,t&&t.no_a_attr&&delete a.a_attr,t&&t.no_id&&(delete a.id,a.li_attr&&a.li_attr.id&&delete a.li_attr.id,a.a_attr&&a.a_attr.id&&delete a.a_attr.id),t&&t.flat&&e.id!==P.jstree.root&&n.push(a),!t||!t.no_children)for(r=0,i=e.children.length;r<i;r++)t&&t.flat?this.get_json(e.children[r],t,n):a.children.push(this.get_json(e.children[r],t));return t&&t.flat?n:e.id===P.jstree.root?a.children:a},create_node:function(e,t,n,r,i){if(null===e&&(e=P.jstree.root),!(e=this.get_node(e)))return!1;if(!(n=n===M?"last":n).toString().match(/^(before|after)$/)&&!i&&!this.is_loaded(e))return this.load_node(e,function(){this.create_node(e,t,n,r,!0)});var a,o,s,c;switch(t||(t={text:this.get_string("New node")}),(t="string"==typeof t?{text:t}:P.extend(!0,{},t)).text===M&&(t.text=this.get_string("New node")),e.id===P.jstree.root&&("before"===n&&(n="first"),"after"===n&&(n="last")),n){case"before":a=this.get_node(e.parent),n=P.inArray(e.id,a.children),e=a;break;case"after":a=this.get_node(e.parent),n=P.inArray(e.id,a.children)+1,e=a;break;case"inside":case"first":n=0;break;case"last":n=e.children.length;break;default:n||(n=0)}if(n>e.children.length&&(n=e.children.length),t.id||(t.id=!0),!this.check("create_node",t,e,n))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!0===t.id&&delete t.id,!(t=this._parse_model_from_json(t,e.id,e.parents.concat())))return!1;for(a=this.get_node(t),(o=[]).push(t),o=o.concat(a.children_d),this.trigger("model",{nodes:o,parent:e.id}),e.children_d=e.children_d.concat(o),s=0,c=e.parents.length;s<c;s++)this._model.data[e.parents[s]].children_d=this._model.data[e.parents[s]].children_d.concat(o);for(t=a,a=[],s=0,c=e.children.length;s<c;s++)a[n<=s?s+1:s]=e.children[s];return a[n]=t.id,e.children=a,this.redraw_node(e,!0),this.trigger("create_node",{node:this.get_node(t),parent:e.id,position:n}),r&&r.call(this,this.get_node(t)),t.id},rename_node:function(e,t){var n,r,i;if(P.vakata.is_array(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.rename_node(e[n],t);return!0}return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&(i=e.text,this.check("rename_node",e,this.get_parent(e),t)?(this.set_text(e,t),this.trigger("rename_node",{node:e,text:t,old:i}),!0):(this.settings.core.error.call(this,this._data.core.last_error),!1))},delete_node:function(e){var t,n,r,i,a,o,s,c,l,u,f,d;if(P.vakata.is_array(e)){for(t=0,n=(e=e.slice()).length;t<n;t++)this.delete_node(e[t]);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;if(r=this.get_node(e.parent),i=P.inArray(e.id,r.children),u=!1,!this.check("delete_node",e,r,i))return this.settings.core.error.call(this,this._data.core.last_error),!1;for(-1!==i&&(r.children=P.vakata.array_remove(r.children,i)),(a=e.children_d.concat([])).push(e.id),o=0,s=e.parents.length;o<s;o++)this._model.data[e.parents[o]].children_d=P.vakata.array_filter(this._model.data[e.parents[o]].children_d,function(e){return-1===P.inArray(e,a)});for(c=0,l=a.length;c<l;c++)if(this._model.data[a[c]].state.selected){u=!0;break}for(u&&(this._data.core.selected=P.vakata.array_filter(this._data.core.selected,function(e){return-1===P.inArray(e,a)})),this.trigger("delete_node",{node:e,parent:r.id}),u&&this.trigger("changed",{action:"delete_node",node:e,selected:this._data.core.selected,parent:r.id}),c=0,l=a.length;c<l;c++)delete this._model.data[a[c]];return-1!==P.inArray(this._data.core.focused,a)&&(this._data.core.focused=null,f=this.element[0].scrollTop,d=this.element[0].scrollLeft,r.id===P.jstree.root?this._model.data[P.jstree.root].children[0]&&this.get_node(this._model.data[P.jstree.root].children[0],!0).children(".jstree-anchor").triger("focus"):this.get_node(r,!0).children(".jstree-anchor").trigger("focus"),this.element[0].scrollTop=f,this.element[0].scrollLeft=d),this.redraw_node(r,!0),!0},check:function(e,t,n,r,i){t=t&&t.id?t:this.get_node(t),n=n&&n.id?n:this.get_node(n);var a=e.match(/^move_node|copy_node|create_node$/i)?n:t,o=this.settings.core.check_callback;if("move_node"===e||"copy_node"===e){if(!(i&&i.is_multi||"move_node"!==e||P.inArray(t.id,n.children)!==r))return!(this._data.core.last_error={error:"check",plugin:"core",id:"core_08",reason:"Moving node to its current position",data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})});if(!(i&&i.is_multi||t.id!==n.id&&("move_node"!==e||P.inArray(t.id,n.children)!==r)&&-1===P.inArray(n.id,t.children_d)))return!(this._data.core.last_error={error:"check",plugin:"core",id:"core_01",reason:"Moving parent inside child",data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})})}return a&&a.data&&(a=a.data),a&&a.functions&&(!1===a.functions[e]||!0===a.functions[e])?(!1===a.functions[e]&&(this._data.core.last_error={error:"check",plugin:"core",id:"core_02",reason:"Node data prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})}),a.functions[e]):!(!1===o||P.vakata.is_function(o)&&!1===o.call(this,e,t,n,r,i)||o&&!1===o[e])||!(this._data.core.last_error={error:"check",plugin:"core",id:"core_03",reason:"User config for core.check_callback prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})})},last_error:function(){return this._data.core.last_error},move_node:function(e,t,n,r,i,a,o){var s,c,l,u,f,d,h,p,m,g,_,b,v,y;if(t=this.get_node(t),n=n===M?0:n,!t)return!1;if(!n.toString().match(/^(before|after)$/)&&!i&&!this.is_loaded(t))return this.load_node(t,function(){this.move_node(e,t,n,r,!0,!1,o)});if(P.vakata.is_array(e)){if(1!==e.length){for(s=0,c=e.length;s<c;s++)(m=this.move_node(e[s],t,n,r,i,!1,o))&&(t=m,n="after");return this.redraw(),!0}e=e[0]}if(!(e=e&&e.id?e:this.get_node(e))||e.id===P.jstree.root)return!1;if(l=(e.parent||P.jstree.root).toString(),f=n.toString().match(/^(before|after)$/)&&t.id!==P.jstree.root?this.get_node(t.parent):t,h=!(d=o||(this._model.data[e.id]?this:P.jstree.reference(e.id)))||!d._id||this._id!==d._id,u=d&&d._id&&l&&d._model.data[l]&&d._model.data[l].children?P.inArray(e.id,d._model.data[l].children):-1,d&&d._id&&(e=d._model.data[e.id]),h)return!!(m=this.copy_node(e,t,n,r,i,!1,o))&&(d&&d.delete_node(e),m);switch(t.id===P.jstree.root&&("before"===n&&(n="first"),"after"===n&&(n="last")),n){case"before":n=P.inArray(t.id,f.children);break;case"after":n=P.inArray(t.id,f.children)+1;break;case"inside":case"first":n=0;break;case"last":n=f.children.length;break;default:n||(n=0)}if(n>f.children.length&&(n=f.children.length),!this.check("move_node",e,f,n,{core:!0,origin:o,is_multi:d&&d._id&&d._id!==this._id,is_foreign:!d||!d._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(e.parent===f.id){for(p=f.children.concat(),-1!==(m=P.inArray(e.id,p))&&(p=P.vakata.array_remove(p,m),m<n&&n--),m=[],g=0,_=p.length;g<_;g++)m[n<=g?g+1:g]=p[g];m[n]=e.id,f.children=m,this._node_changed(f.id),this.redraw(f.id===P.jstree.root)}else{for((m=e.children_d.concat()).push(e.id),g=0,_=e.parents.length;g<_;g++){for(p=[],b=0,v=(y=d._model.data[e.parents[g]].children_d).length;b<v;b++)-1===P.inArray(y[b],m)&&p.push(y[b]);d._model.data[e.parents[g]].children_d=p}for(d._model.data[l].children=P.vakata.array_remove_item(d._model.data[l].children,e.id),g=0,_=f.parents.length;g<_;g++)this._model.data[f.parents[g]].children_d=this._model.data[f.parents[g]].children_d.concat(m);for(p=[],g=0,_=f.children.length;g<_;g++)p[n<=g?g+1:g]=f.children[g];for(p[n]=e.id,f.children=p,f.children_d.push(e.id),f.children_d=f.children_d.concat(e.children_d),e.parent=f.id,(m=f.parents.concat()).unshift(f.id),y=e.parents.length,m=(e.parents=m).concat(),g=0,_=e.children_d.length;g<_;g++)this._model.data[e.children_d[g]].parents=this._model.data[e.children_d[g]].parents.slice(0,-1*y),Array.prototype.push.apply(this._model.data[e.children_d[g]].parents,m);l!==P.jstree.root&&f.id!==P.jstree.root||(this._model.force_full_redraw=!0),this._model.force_full_redraw||(this._node_changed(l),this._node_changed(f.id)),a||this.redraw()}return r&&r.call(this,e,f,n),this.trigger("move_node",{node:e,parent:f.id,position:n,old_parent:l,old_position:u,is_multi:d&&d._id&&d._id!==this._id,is_foreign:!d||!d._id,old_instance:d,new_instance:this}),e.id},copy_node:function(e,t,n,r,i,a,o){var s,c,l,u,f,d,h,p,m,g;if(t=this.get_node(t),n=n===M?0:n,!t)return!1;if(!n.toString().match(/^(before|after)$/)&&!i&&!this.is_loaded(t))return this.load_node(t,function(){this.copy_node(e,t,n,r,!0,!1,o)});if(P.vakata.is_array(e)){if(1!==e.length){for(s=0,c=e.length;s<c;s++)(u=this.copy_node(e[s],t,n,r,i,!0,o))&&(t=u,n="after");return this.redraw(),!0}e=e[0]}if(!(e=e&&e.id?e:this.get_node(e))||e.id===P.jstree.root)return!1;switch(p=(e.parent||P.jstree.root).toString(),m=n.toString().match(/^(before|after)$/)&&t.id!==P.jstree.root?this.get_node(t.parent):t,!(g=o||(this._model.data[e.id]?this:P.jstree.reference(e.id)))||!g._id||this._id!==g._id,g&&g._id&&(e=g._model.data[e.id]),t.id===P.jstree.root&&("before"===n&&(n="first"),"after"===n&&(n="last")),n){case"before":n=P.inArray(t.id,m.children);break;case"after":n=P.inArray(t.id,m.children)+1;break;case"inside":case"first":n=0;break;case"last":n=m.children.length;break;default:n||(n=0)}if(n>m.children.length&&(n=m.children.length),!this.check("copy_node",e,m,n,{core:!0,origin:o,is_multi:g&&g._id&&g._id!==this._id,is_foreign:!g||!g._id}))return this.settings.core.error.call(this,this._data.core.last_error),!1;if(!(h=g?g.get_json(e,{no_id:!0,no_data:!0,no_state:!0}):e))return!1;if(!0===h.id&&delete h.id,!(h=this._parse_model_from_json(h,m.id,m.parents.concat())))return!1;for(u=this.get_node(h),e&&e.state&&!1===e.state.loaded&&(u.state.loaded=!1),(l=[]).push(h),l=l.concat(u.children_d),this.trigger("model",{nodes:l,parent:m.id}),f=0,d=m.parents.length;f<d;f++)this._model.data[m.parents[f]].children_d=this._model.data[m.parents[f]].children_d.concat(l);for(l=[],f=0,d=m.children.length;f<d;f++)l[n<=f?f+1:f]=m.children[f];return l[n]=u.id,m.children=l,m.children_d.push(u.id),m.children_d=m.children_d.concat(u.children_d),m.id===P.jstree.root&&(this._model.force_full_redraw=!0),this._model.force_full_redraw||this._node_changed(m.id),a||this.redraw(m.id===P.jstree.root),r&&r.call(this,u,m,n),this.trigger("copy_node",{node:u,original:e,parent:m.id,position:n,old_parent:p,old_position:g&&g._id&&p&&g._model.data[p]&&g._model.data[p].children?P.inArray(e.id,g._model.data[p].children):-1,is_multi:g&&g._id&&g._id!==this._id,is_foreign:!g||!g._id,old_instance:g,new_instance:this}),u.id},cut:function(e){if(e||(e=this._data.core.selected.concat()),P.vakata.is_array(e)||(e=[e]),!e.length)return!1;var t,n,r,i=[];for(n=0,r=e.length;n<r;n++)(t=this.get_node(e[n]))&&t.id&&t.id!==P.jstree.root&&i.push(t);if(!i.length)return!1;a=i,o="move_node",(s=this).trigger("cut",{node:e})},copy:function(e){if(e||(e=this._data.core.selected.concat()),P.vakata.is_array(e)||(e=[e]),!e.length)return!1;var t,n,r,i=[];for(n=0,r=e.length;n<r;n++)(t=this.get_node(e[n]))&&t.id&&t.id!==P.jstree.root&&i.push(t);if(!i.length)return!1;a=i,o="copy_node",(s=this).trigger("copy",{node:e})},get_buffer:function(){return{mode:o,node:a,inst:s}},can_paste:function(){return!1!==o&&!1!==a},paste:function(e,t){if(!((e=this.get_node(e))&&o&&o.match(/^(copy_node|move_node)$/)&&a))return!1;this[o](a,e,t,!1,!1,!1,s)&&this.trigger("paste",{parent:e.id,node:a,mode:o}),s=o=a=!1},clear_buffer:function(){s=o=a=!1,this.trigger("clear_buffer")},edit:function(i,e,a){var t,n,o,s,c,l,u,r,f,d=!1;return!!(i=this.get_node(i))&&(this.check("edit",i,this.get_parent(i))?(f=i,e="string"==typeof e?e:i.text,this.set_text(i,""),i=this._open_to(i),f.text=e,t=this._data.core.rtl,n=this.element.width(),this._data.core.focused=f.id,o=i.children(".jstree-anchor").trigger("focus"),s=P("<span></span>"),c=e,l=P("<div></div>",{css:{position:"absolute",top:"-200px",left:t?"0px":"-1000px",visibility:"hidden"}}).appendTo(y.body),u=P("<input />",{value:c,class:"jstree-rename-input",css:{padding:"0",border:"1px solid silver","box-sizing":"border-box",display:"inline-block",height:this._data.core.li_height+"px",lineHeight:this._data.core.li_height+"px",width:"150px"},blur:function(e){e.stopImmediatePropagation(),e.preventDefault();var t,n=s.children(".jstree-rename-input").val(),r=this.settings.core.force_text;""===n&&(n=c),l.remove(),s.replaceWith(o),s.remove(),c=r?c:P("<div></div>").append(P.parseHTML(c)).html(),i=this.get_node(i),this.set_text(i,c),(t=!!this.rename_node(i,r?P("<div></div>").text(n).text():P("<div></div>").append(P.parseHTML(n)).html()))||this.set_text(i,c),this._data.core.focused=f.id,setTimeout(function(){var e=this.get_node(f.id,!0);e.length&&(this._data.core.focused=f.id,e.children(".jstree-anchor").trigger("focus"))}.bind(this),0),a&&a.call(this,f,t,d,n),u=null}.bind(this),keydown:function(e){var t=e.which;27===t&&(d=!0,this.value=c),27!==t&&13!==t&&37!==t&&38!==t&&39!==t&&40!==t&&32!==t||e.stopImmediatePropagation(),27!==t&&13!==t||(e.preventDefault(),this.blur())},click:function(e){e.stopImmediatePropagation()},mousedown:function(e){e.stopImmediatePropagation()},keyup:function(e){u.width(Math.min(l.text("pW"+this.value).width(),n))},keypress:function(e){if(13===e.which)return!1}}),r={fontFamily:o.css("fontFamily")||"",fontSize:o.css("fontSize")||"",fontWeight:o.css("fontWeight")||"",fontStyle:o.css("fontStyle")||"",fontStretch:o.css("fontStretch")||"",fontVariant:o.css("fontVariant")||"",letterSpacing:o.css("letterSpacing")||"",wordSpacing:o.css("wordSpacing")||""},s.attr("class",o.attr("class")).append(o.contents().clone()).append(u),o.replaceWith(s),l.css(r),u.css(r).width(Math.min(l.text("pW"+u[0].value).width(),n))[0].select(),void P(y).one("mousedown.jstree touchstart.jstree dnd_start.vakata",function(e){u&&e.target!==u&&P(u).trigger("blur")})):(this.settings.core.error.call(this,this._data.core.last_error),!1))},set_theme:function(e,t){if(!e)return!1;if(!0===t){var n=this.settings.core.themes.dir;n||(n=P.jstree.path+"/themes"),t=n+"/"+e+"/style.css"}t&&-1===P.inArray(t,r)&&(P("head").append('<link rel="stylesheet" href="'+t+'" type="text/css" />'),r.push(t)),this._data.core.themes.name&&this.element.removeClass("jstree-"+this._data.core.themes.name),this._data.core.themes.name=e,this.element.addClass("jstree-"+e),this.element[this.settings.core.themes.responsive?"addClass":"removeClass"]("jstree-"+e+"-responsive"),this.trigger("set_theme",{theme:e})},get_theme:function(){return this._data.core.themes.name},set_theme_variant:function(e){this._data.core.themes.variant&&this.element.removeClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant),(this._data.core.themes.variant=e)&&this.element.addClass("jstree-"+this._data.core.themes.name+"-"+this._data.core.themes.variant)},get_theme_variant:function(){return this._data.core.themes.variant},show_stripes:function(){this._data.core.themes.stripes=!0,this.get_container_ul().addClass("jstree-striped"),this.trigger("show_stripes")},hide_stripes:function(){this._data.core.themes.stripes=!1,this.get_container_ul().removeClass("jstree-striped"),this.trigger("hide_stripes")},toggle_stripes:function(){this._data.core.themes.stripes?this.hide_stripes():this.show_stripes()},show_dots:function(){this._data.core.themes.dots=!0,this.get_container_ul().removeClass("jstree-no-dots"),this.trigger("show_dots")},hide_dots:function(){this._data.core.themes.dots=!1,this.get_container_ul().addClass("jstree-no-dots"),this.trigger("hide_dots")},toggle_dots:function(){this._data.core.themes.dots?this.hide_dots():this.show_dots()},show_icons:function(){this._data.core.themes.icons=!0,this.get_container_ul().removeClass("jstree-no-icons"),this.trigger("show_icons")},hide_icons:function(){this._data.core.themes.icons=!1,this.get_container_ul().addClass("jstree-no-icons"),this.trigger("hide_icons")},toggle_icons:function(){this._data.core.themes.icons?this.hide_icons():this.show_icons()},show_ellipsis:function(){this._data.core.themes.ellipsis=!0,this.get_container_ul().addClass("jstree-ellipsis"),this.trigger("show_ellipsis")},hide_ellipsis:function(){this._data.core.themes.ellipsis=!1,this.get_container_ul().removeClass("jstree-ellipsis"),this.trigger("hide_ellipsis")},toggle_ellipsis:function(){this._data.core.themes.ellipsis?this.hide_ellipsis():this.show_ellipsis()},set_icon:function(e,t){var n,r,i,a;if(P.vakata.is_array(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.set_icon(e[n],t);return!0}return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&(a=e.icon,e.icon=!0===t||null===t||t===M||""===t||t,i=this.get_node(e,!0).children(".jstree-anchor").children(".jstree-themeicon"),!1===t?(i.removeClass("jstree-themeicon-custom "+a).css("background","").removeAttr("rel"),this.hide_icon(e)):(!0===t||null===t||t===M||""===t?i.removeClass("jstree-themeicon-custom "+a).css("background","").removeAttr("rel"):-1===t.indexOf("/")&&-1===t.indexOf(".")?(i.removeClass(a).css("background",""),i.addClass(t+" jstree-themeicon-custom").attr("rel",t)):(i.removeClass(a).css("background",""),i.addClass("jstree-themeicon-custom").css("background","url('"+t+"') center center no-repeat").attr("rel",t)),!1===a&&this.show_icon(e)),!0)},get_icon:function(e){return!(!(e=this.get_node(e))||e.id===P.jstree.root)&&e.icon},hide_icon:function(e){var t,n;if(P.vakata.is_array(e)){for(t=0,n=(e=e.slice()).length;t<n;t++)this.hide_icon(e[t]);return!0}return!(!(e=this.get_node(e))||e===P.jstree.root)&&(e.icon=!1,this.get_node(e,!0).children(".jstree-anchor").children(".jstree-themeicon").addClass("jstree-themeicon-hidden"),!0)},show_icon:function(e){var t,n,r;if(P.vakata.is_array(e)){for(t=0,n=(e=e.slice()).length;t<n;t++)this.show_icon(e[t]);return!0}return!(!(e=this.get_node(e))||e===P.jstree.root)&&(r=this.get_node(e,!0),e.icon=!r.length||r.children(".jstree-anchor").children(".jstree-themeicon").attr("rel"),e.icon||(e.icon=!0),r.children(".jstree-anchor").children(".jstree-themeicon").removeClass("jstree-themeicon-hidden"),!0)}},P.vakata={},P.vakata.attributes=function(e,n){e=P(e)[0];var r=n?{}:[];return e&&e.attributes&&P.each(e.attributes,function(e,t){-1===P.inArray(t.name.toLowerCase(),["style","contenteditable","hasfocus","tabindex"])&&null!==t.value&&""!==P.vakata.trim(t.value)&&(n?r[t.name]=t.value:r.push(t.name))}),r},P.vakata.array_unique=function(e){var t,n,r=[],i={};for(t=0,n=e.length;t<n;t++)i[e[t]]===M&&(r.push(e[t]),i[e[t]]=!0);return r},P.vakata.array_remove=function(e,t){return e.splice(t,1),e},P.vakata.array_remove_item=function(e,t){var n=P.inArray(t,e);return-1!==n?P.vakata.array_remove(e,n):e},P.vakata.array_filter=function(e,t,n,r,i){if(e.filter)return e.filter(t,n);for(i in r=[],e)~~i+""==i+""&&0<=i&&t.call(n,e[i],+i,e)&&r.push(e[i]);return r},P.vakata.trim=function(e){return String.prototype.trim?String.prototype.trim.call(e.toString()):e.toString().replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},P.vakata.is_function=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},P.vakata.is_array=Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)},Function.prototype.bind||(Function.prototype.bind=function(){var t=this,n=arguments[0],r=Array.prototype.slice.call(arguments,1);if("function"!=typeof t)throw new TypeError("Function.prototype.bind - what is trying to be bound is not callable");return function(){var e=r.concat(Array.prototype.slice.call(arguments));return t.apply(n,e)}}),P.jstree.plugins.changed=function(e,a){var o=[];this.trigger=function(e,t){var n,r;if(t||(t={}),"changed"===e.replace(".jstree","")){t.changed={selected:[],deselected:[]};var i={};for(n=0,r=o.length;n<r;n++)i[o[n]]=1;for(n=0,r=t.selected.length;n<r;n++)i[t.selected[n]]?i[t.selected[n]]=2:t.changed.selected.push(t.selected[n]);for(n=0,r=o.length;n<r;n++)1===i[o[n]]&&t.changed.deselected.push(o[n]);o=t.selected.slice()}a.trigger.call(this,e,t)},this.refresh=function(e,t){return o=[],a.refresh.apply(this,arguments)}};var f,d,h,c,u,p,m,S,g=y.createElement("I");g.className="jstree-icon jstree-checkbox",g.setAttribute("role","presentation"),P.jstree.defaults.checkbox={visible:!0,three_state:!0,whole_node:!0,keep_selected_style:!0,cascade:"",tie_selection:!0,cascade_to_disabled:!0,cascade_to_hidden:!0},P.jstree.plugins.checkbox=function(e,c){this.bind=function(){c.bind.call(this),this._data.checkbox.uto=!1,this._data.checkbox.selected=[],this.settings.checkbox.three_state&&(this.settings.checkbox.cascade="up+down+undetermined"),this.element.on("init.jstree",function(){this._data.checkbox.visible=this.settings.checkbox.visible,this.settings.checkbox.keep_selected_style||this.element.addClass("jstree-checkbox-no-clicked"),this.settings.checkbox.tie_selection&&this.element.addClass("jstree-checkbox-selection")}.bind(this)).on("loading.jstree",function(){this[this._data.checkbox.visible?"show_checkboxes":"hide_checkboxes"]()}.bind(this)),-1!==this.settings.checkbox.cascade.indexOf("undetermined")&&this.element.on("changed.jstree uncheck_node.jstree check_node.jstree uncheck_all.jstree check_all.jstree move_node.jstree copy_node.jstree redraw.jstree open_node.jstree",function(){this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(this._undetermined.bind(this),50)}.bind(this)),this.settings.checkbox.tie_selection||this.element.on("model.jstree",function(e,t){var n,r,i=this._model.data,a=(i[t.parent],t.nodes);for(n=0,r=a.length;n<r;n++)i[a[n]].state.checked=i[a[n]].state.checked||i[a[n]].original&&i[a[n]].original.state&&i[a[n]].original.state.checked,i[a[n]].state.checked&&this._data.checkbox.selected.push(a[n])}.bind(this)),-1===this.settings.checkbox.cascade.indexOf("up")&&-1===this.settings.checkbox.cascade.indexOf("down")||this.element.on("model.jstree",function(e,t){var n,r,i,a,o,s,c=this._model.data,l=c[t.parent],u=t.nodes,f=[],d=this.settings.checkbox.cascade,h=this.settings.checkbox.tie_selection;if(-1!==d.indexOf("down"))if(l.state[h?"selected":"checked"]){for(r=0,i=u.length;r<i;r++)c[u[r]].state[h?"selected":"checked"]=!0;this._data[h?"core":"checkbox"].selected=this._data[h?"core":"checkbox"].selected.concat(u)}else for(r=0,i=u.length;r<i;r++)if(c[u[r]].state[h?"selected":"checked"]){for(a=0,o=c[u[r]].children_d.length;a<o;a++)c[c[u[r]].children_d[a]].state[h?"selected":"checked"]=!0;this._data[h?"core":"checkbox"].selected=this._data[h?"core":"checkbox"].selected.concat(c[u[r]].children_d)}if(-1!==d.indexOf("up")){for(r=0,i=l.children_d.length;r<i;r++)c[l.children_d[r]].children.length||f.push(c[l.children_d[r]].parent);for(a=0,o=(f=P.vakata.array_unique(f)).length;a<o;a++)for(l=c[f[a]];l&&l.id!==P.jstree.root;){for(r=n=0,i=l.children.length;r<i;r++)n+=c[l.children[r]].state[h?"selected":"checked"];if(n!==i)break;l.state[h?"selected":"checked"]=!0,this._data[h?"core":"checkbox"].selected.push(l.id),(s=this.get_node(l,!0))&&s.length&&s.attr("aria-selected",!0).children(".jstree-anchor").addClass(h?"jstree-clicked":"jstree-checked"),l=this.get_node(l.parent)}}this._data[h?"core":"checkbox"].selected=P.vakata.array_unique(this._data[h?"core":"checkbox"].selected)}.bind(this)).on(this.settings.checkbox.tie_selection?"select_node.jstree":"check_node.jstree",function(e,t){var n,r,i,a,o=t.node,s=this._model.data,c=this.get_node(o.parent),l=this.settings.checkbox.cascade,u=this.settings.checkbox.tie_selection,f={},d=this._data[u?"core":"checkbox"].selected;for(n=0,r=d.length;n<r;n++)f[d[n]]=!0;if(-1!==l.indexOf("down")){var h=this._cascade_new_checked_state(o.id,!0),p=o.children_d.concat(o.id);for(n=0,r=p.length;n<r;n++)-1<h.indexOf(p[n])?f[p[n]]=!0:delete f[p[n]]}if(-1!==l.indexOf("up"))for(;c&&c.id!==P.jstree.root;){for(n=i=0,r=c.children.length;n<r;n++)i+=s[c.children[n]].state[u?"selected":"checked"];if(i!==r)break;c.state[u?"selected":"checked"]=!0,f[c.id]=!0,(a=this.get_node(c,!0))&&a.length&&a.attr("aria-selected",!0).children(".jstree-anchor").addClass(u?"jstree-clicked":"jstree-checked"),c=this.get_node(c.parent)}for(n in d=[],f)f.hasOwnProperty(n)&&d.push(n);this._data[u?"core":"checkbox"].selected=d}.bind(this)).on(this.settings.checkbox.tie_selection?"deselect_all.jstree":"uncheck_all.jstree",function(e,t){var n,r,i,a=this.get_node(P.jstree.root),o=this._model.data;for(n=0,r=a.children_d.length;n<r;n++)(i=o[a.children_d[n]])&&i.original&&i.original.state&&i.original.state.undetermined&&(i.original.state.undetermined=!1)}.bind(this)).on(this.settings.checkbox.tie_selection?"deselect_node.jstree":"uncheck_node.jstree",function(e,t){var n,r,i,a=t.node,o=(this.get_node(a,!0),this.settings.checkbox.cascade),s=this.settings.checkbox.tie_selection,c=this._data[s?"core":"checkbox"].selected,l=a.children_d.concat(a.id);if(-1!==o.indexOf("down")){var u=this._cascade_new_checked_state(a.id,!1);c=P.vakata.array_filter(c,function(e){return-1===l.indexOf(e)||-1<u.indexOf(e)})}if(-1!==o.indexOf("up")&&-1===c.indexOf(a.id)){for(n=0,r=a.parents.length;n<r;n++)(i=this._model.data[a.parents[n]]).state[s?"selected":"checked"]=!1,i&&i.original&&i.original.state&&i.original.state.undetermined&&(i.original.state.undetermined=!1),(i=this.get_node(a.parents[n],!0))&&i.length&&i.attr("aria-selected",!1).children(".jstree-anchor").removeClass(s?"jstree-clicked":"jstree-checked");c=P.vakata.array_filter(c,function(e){return-1===a.parents.indexOf(e)})}this._data[s?"core":"checkbox"].selected=c}.bind(this)),-1!==this.settings.checkbox.cascade.indexOf("up")&&this.element.on("delete_node.jstree",function(e,t){for(var n,r,i,a,o=this.get_node(t.parent),s=this._model.data,c=this.settings.checkbox.tie_selection;o&&o.id!==P.jstree.root&&!o.state[c?"selected":"checked"];){for(n=i=0,r=o.children.length;n<r;n++)i+=s[o.children[n]].state[c?"selected":"checked"];if(!(0<r&&i===r))break;o.state[c?"selected":"checked"]=!0,this._data[c?"core":"checkbox"].selected.push(o.id),(a=this.get_node(o,!0))&&a.length&&a.attr("aria-selected",!0).children(".jstree-anchor").addClass(c?"jstree-clicked":"jstree-checked"),o=this.get_node(o.parent)}}.bind(this)).on("move_node.jstree",function(e,t){var n,r,i,a,o,s=t.is_multi,c=t.old_parent,l=this.get_node(t.parent),u=this._model.data,f=this.settings.checkbox.tie_selection;if(!s)for(n=this.get_node(c);n&&n.id!==P.jstree.root&&!n.state[f?"selected":"checked"];){for(i=r=0,a=n.children.length;i<a;i++)r+=u[n.children[i]].state[f?"selected":"checked"];if(!(0<a&&r===a))break;n.state[f?"selected":"checked"]=!0,this._data[f?"core":"checkbox"].selected.push(n.id),(o=this.get_node(n,!0))&&o.length&&o.attr("aria-selected",!0).children(".jstree-anchor").addClass(f?"jstree-clicked":"jstree-checked"),n=this.get_node(n.parent)}for(n=l;n&&n.id!==P.jstree.root;){for(i=r=0,a=n.children.length;i<a;i++)r+=u[n.children[i]].state[f?"selected":"checked"];if(r===a)n.state[f?"selected":"checked"]||(n.state[f?"selected":"checked"]=!0,this._data[f?"core":"checkbox"].selected.push(n.id),(o=this.get_node(n,!0))&&o.length&&o.attr("aria-selected",!0).children(".jstree-anchor").addClass(f?"jstree-clicked":"jstree-checked"));else{if(!n.state[f?"selected":"checked"])break;n.state[f?"selected":"checked"]=!1,this._data[f?"core":"checkbox"].selected=P.vakata.array_remove_item(this._data[f?"core":"checkbox"].selected,n.id),(o=this.get_node(n,!0))&&o.length&&o.attr("aria-selected",!1).children(".jstree-anchor").removeClass(f?"jstree-clicked":"jstree-checked")}n=this.get_node(n.parent)}}.bind(this))},this.get_undetermined=function(e){if(-1===this.settings.checkbox.cascade.indexOf("undetermined"))return[];var n,r,i,a,o={},s=this._model.data,t=this.settings.checkbox.tie_selection,c=this._data[t?"core":"checkbox"].selected,l=[],u=this,f=[];for(n=0,r=c.length;n<r;n++)if(s[c[n]]&&s[c[n]].parents)for(i=0,a=s[c[n]].parents.length;i<a&&o[s[c[n]].parents[i]]===M;i++)s[c[n]].parents[i]!==P.jstree.root&&(o[s[c[n]].parents[i]]=!0,l.push(s[c[n]].parents[i]));for(this.element.find(".jstree-closed").not(":has(.jstree-children)").each(function(){var e,t=u.get_node(this);if(t)if(t.state.loaded){for(n=0,r=t.children_d.length;n<r;n++)if(!(e=s[t.children_d[n]]).state.loaded&&e.original&&e.original.state&&e.original.state.undetermined&&!0===e.original.state.undetermined)for(o[e.id]===M&&e.id!==P.jstree.root&&(o[e.id]=!0,l.push(e.id)),i=0,a=e.parents.length;i<a;i++)o[e.parents[i]]===M&&e.parents[i]!==P.jstree.root&&(o[e.parents[i]]=!0,l.push(e.parents[i]))}else if(t.original&&t.original.state&&t.original.state.undetermined&&!0===t.original.state.undetermined)for(o[t.id]===M&&t.id!==P.jstree.root&&(o[t.id]=!0,l.push(t.id)),i=0,a=t.parents.length;i<a;i++)o[t.parents[i]]===M&&t.parents[i]!==P.jstree.root&&(o[t.parents[i]]=!0,l.push(t.parents[i]))}),n=0,r=l.length;n<r;n++)s[l[n]].state[t?"selected":"checked"]||f.push(e?s[l[n]]:l[n]);return f},this._undetermined=function(){if(null!==this.element){var e,t,n,r=this.get_undetermined(!1);for(this.element.find(".jstree-undetermined").removeClass("jstree-undetermined"),e=0,t=r.length;e<t;e++)(n=this.get_node(r[e],!0))&&n.length&&n.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-undetermined")}},this.redraw_node=function(e,t,n,r){if(e=c.redraw_node.apply(this,arguments)){var i,a,o=null,s=null;for(i=0,a=e.childNodes.length;i<a;i++)if(e.childNodes[i]&&e.childNodes[i].className&&-1!==e.childNodes[i].className.indexOf("jstree-anchor")){o=e.childNodes[i];break}o&&(!this.settings.checkbox.tie_selection&&this._model.data[e.id].state.checked&&(o.className+=" jstree-checked"),s=g.cloneNode(!1),this._model.data[e.id].state.checkbox_disabled&&(s.className+=" jstree-checkbox-disabled"),o.insertBefore(s,o.childNodes[0]))}return n||-1===this.settings.checkbox.cascade.indexOf("undetermined")||(this._data.checkbox.uto&&clearTimeout(this._data.checkbox.uto),this._data.checkbox.uto=setTimeout(this._undetermined.bind(this),50)),e},this.show_checkboxes=function(){this._data.core.themes.checkboxes=!0,this.get_container_ul().removeClass("jstree-no-checkboxes")},this.hide_checkboxes=function(){this._data.core.themes.checkboxes=!1,this.get_container_ul().addClass("jstree-no-checkboxes")},this.toggle_checkboxes=function(){this._data.core.themes.checkboxes?this.hide_checkboxes():this.show_checkboxes()},this.is_undetermined=function(e){e=this.get_node(e);var t,n,r=this.settings.checkbox.cascade,i=this.settings.checkbox.tie_selection,a=this._data[i?"core":"checkbox"].selected,o=this._model.data;if(!e||!0===e.state[i?"selected":"checked"]||-1===r.indexOf("undetermined")||-1===r.indexOf("down")&&-1===r.indexOf("up"))return!1;if(!e.state.loaded&&!0===e.original.state.undetermined)return!0;for(t=0,n=e.children_d.length;t<n;t++)if(-1!==P.inArray(e.children_d[t],a)||!o[e.children_d[t]].state.loaded&&o[e.children_d[t]].original.state.undetermined)return!0;return!1},this.disable_checkbox=function(e){var t,n,r;if(P.vakata.is_array(e)){for(t=0,n=(e=e.slice()).length;t<n;t++)this.disable_checkbox(e[t]);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;r=this.get_node(e,!0),e.state.checkbox_disabled||(e.state.checkbox_disabled=!0,r&&r.length&&r.children(".jstree-anchor").children(".jstree-checkbox").addClass("jstree-checkbox-disabled"),this.trigger("disable_checkbox",{node:e}))},this.enable_checkbox=function(e){var t,n,r;if(P.vakata.is_array(e)){for(t=0,n=(e=e.slice()).length;t<n;t++)this.enable_checkbox(e[t]);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;r=this.get_node(e,!0),e.state.checkbox_disabled&&(e.state.checkbox_disabled=!1,r&&r.length&&r.children(".jstree-anchor").children(".jstree-checkbox").removeClass("jstree-checkbox-disabled"),this.trigger("enable_checkbox",{node:e}))},this.activate_node=function(e,t){return!P(t.target).hasClass("jstree-checkbox-disabled")&&(this.settings.checkbox.tie_selection&&(this.settings.checkbox.whole_node||P(t.target).hasClass("jstree-checkbox"))&&(t.ctrlKey=!0),this.settings.checkbox.tie_selection||!this.settings.checkbox.whole_node&&!P(t.target).hasClass("jstree-checkbox")?c.activate_node.call(this,e,t):!this.is_disabled(e)&&(this.is_checked(e)?this.uncheck_node(e,t):this.check_node(e,t),void this.trigger("activate_node",{node:this.get_node(e)})))},this._cascade_new_checked_state=function(e,t){var n,r,i,a=this.settings.checkbox.tie_selection,o=this._model.data[e],s=[],c=[];if(!this.settings.checkbox.cascade_to_disabled&&o.state.disabled||!this.settings.checkbox.cascade_to_hidden&&o.state.hidden)i=this.get_checked_descendants(e),o.state[a?"selected":"checked"]&&i.push(o.id),s=s.concat(i);else{if(o.children)for(n=0,r=o.children.length;n<r;n++){var l=o.children[n];i=this._cascade_new_checked_state(l,t),s=s.concat(i),-1<i.indexOf(l)&&c.push(l)}var u=this.get_node(o,!0),f=0<c.length&&c.length<o.children.length;o.original&&o.original.state&&o.original.state.undetermined&&(o.original.state.undetermined=f),f?(o.state[a?"selected":"checked"]=!1,u.attr("aria-selected",!1).children(".jstree-anchor").removeClass(a?"jstree-clicked":"jstree-checked")):t&&c.length===o.children.length?(o.state[a?"selected":"checked"]=t,s.push(o.id),u.attr("aria-selected",!0).children(".jstree-anchor").addClass(a?"jstree-clicked":"jstree-checked")):(o.state[a?"selected":"checked"]=!1,u.attr("aria-selected",!1).children(".jstree-anchor").removeClass(a?"jstree-clicked":"jstree-checked"))}return s},this.get_checked_descendants=function(e){var t=this,n=t.settings.checkbox.tie_selection,r=t._model.data[e];return P.vakata.array_filter(r.children_d,function(e){return t._model.data[e].state[n?"selected":"checked"]})},this.check_node=function(e,t){if(this.settings.checkbox.tie_selection)return this.select_node(e,!1,!0,t);var n,r,i;if(P.vakata.is_array(e)){for(r=0,i=(e=e.slice()).length;r<i;r++)this.check_node(e[r],t);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;n=this.get_node(e,!0),e.state.checked||(e.state.checked=!0,this._data.checkbox.selected.push(e.id),n&&n.length&&n.children(".jstree-anchor").addClass("jstree-checked"),this.trigger("check_node",{node:e,selected:this._data.checkbox.selected,event:t}))},this.uncheck_node=function(e,t){if(this.settings.checkbox.tie_selection)return this.deselect_node(e,!1,t);var n,r,i;if(P.vakata.is_array(e)){for(n=0,r=(e=e.slice()).length;n<r;n++)this.uncheck_node(e[n],t);return!0}if(!(e=this.get_node(e))||e.id===P.jstree.root)return!1;i=this.get_node(e,!0),e.state.checked&&(e.state.checked=!1,this._data.checkbox.selected=P.vakata.array_remove_item(this._data.checkbox.selected,e.id),i.length&&i.children(".jstree-anchor").removeClass("jstree-checked"),this.trigger("uncheck_node",{node:e,selected:this._data.checkbox.selected,event:t}))},this.check_all=function(){if(this.settings.checkbox.tie_selection)return this.select_all();var e,t;this._data.checkbox.selected.concat([]);for(this._data.checkbox.selected=this._model.data[P.jstree.root].children_d.concat(),e=0,t=this._data.checkbox.selected.length;e<t;e++)this._model.data[this._data.checkbox.selected[e]]&&(this._model.data[this._data.checkbox.selected[e]].state.checked=!0);this.redraw(!0),this.trigger("check_all",{selected:this._data.checkbox.selected})},this.uncheck_all=function(){if(this.settings.checkbox.tie_selection)return this.deselect_all();var e,t,n=this._data.checkbox.selected.concat([]);for(e=0,t=this._data.checkbox.selected.length;e<t;e++)this._model.data[this._data.checkbox.selected[e]]&&(this._model.data[this._data.checkbox.selected[e]].state.checked=!1);this._data.checkbox.selected=[],this.element.find(".jstree-checked").removeClass("jstree-checked"),this.trigger("uncheck_all",{selected:this._data.checkbox.selected,node:n})},this.is_checked=function(e){return this.settings.checkbox.tie_selection?this.is_selected(e):!(!(e=this.get_node(e))||e.id===P.jstree.root)&&e.state.checked},this.get_checked=function(e){return this.settings.checkbox.tie_selection?this.get_selected(e):e?P.map(this._data.checkbox.selected,function(e){return this.get_node(e)}.bind(this)):this._data.checkbox.selected.slice()},this.get_top_checked=function(e){if(this.settings.checkbox.tie_selection)return this.get_top_selected(e);var t,n,r,i,a=this.get_checked(!0),o={};for(t=0,n=a.length;t<n;t++)o[a[t].id]=a[t];for(t=0,n=a.length;t<n;t++)for(r=0,i=a[t].children_d.length;r<i;r++)o[a[t].children_d[r]]&&delete o[a[t].children_d[r]];for(t in a=[],o)o.hasOwnProperty(t)&&a.push(t);return e?P.map(a,function(e){return this.get_node(e)}.bind(this)):a},this.get_bottom_checked=function(e){if(this.settings.checkbox.tie_selection)return this.get_bottom_selected(e);var t,n,r=this.get_checked(!0),i=[];for(t=0,n=r.length;t<n;t++)r[t].children.length||i.push(r[t].id);return e?P.map(i,function(e){return this.get_node(e)}.bind(this)):i},this.load_node=function(e,t){var n,r,i;if(!P.vakata.is_array(e)&&!this.settings.checkbox.tie_selection&&(i=this.get_node(e))&&i.state.loaded)for(n=0,r=i.children_d.length;n<r;n++)this._model.data[i.children_d[n]].state.checked&&(!0,this._data.checkbox.selected=P.vakata.array_remove_item(this._data.checkbox.selected,i.children_d[n]));return c.load_node.apply(this,arguments)},this.get_state=function(){var e=c.get_state.apply(this,arguments);return this.settings.checkbox.tie_selection||(e.checkbox=this._data.checkbox.selected.slice()),e},this.set_state=function(e,t){var n=c.set_state.apply(this,arguments);if(n&&e.checkbox){if(!this.settings.checkbox.tie_selection){this.uncheck_all();var r=this;P.each(e.checkbox,function(e,t){r.check_node(t)})}return delete e.checkbox,this.set_state(e,t),!1}return n},this.refresh=function(e,t){return this.settings.checkbox.tie_selection&&(this._data.checkbox.selected=[]),c.refresh.apply(this,arguments)}},P.jstree.defaults.conditionalselect=function(){return!0},P.jstree.plugins.conditionalselect=function(e,n){this.activate_node=function(e,t){if(this.settings.conditionalselect.call(this,this.get_node(e),t))return n.activate_node.call(this,e,t)}},P.jstree.defaults.contextmenu={select_node:!0,show_at_node:!0,items:function(e,t){return{create:{separator_before:!1,separator_after:!0,_disabled:!1,label:"Create",action:function(e){var n=P.jstree.reference(e.reference),t=n.get_node(e.reference);n.create_node(t,{},"last",function(t){try{n.edit(t)}catch(e){setTimeout(function(){n.edit(t)},0)}})}},rename:{separator_before:!1,separator_after:!1,_disabled:!1,label:"Rename",action:function(e){var t=P.jstree.reference(e.reference),n=t.get_node(e.reference);t.edit(n)}},remove:{separator_before:!1,icon:!1,separator_after:!1,_disabled:!1,label:"Delete",action:function(e){var t=P.jstree.reference(e.reference),n=t.get_node(e.reference);t.is_selected(n)?t.delete_node(t.get_selected()):t.delete_node(n)}},ccp:{separator_before:!0,icon:!1,separator_after:!1,label:"Edit",action:!1,submenu:{cut:{separator_before:!1,separator_after:!1,label:"Cut",action:function(e){var t=P.jstree.reference(e.reference),n=t.get_node(e.reference);t.is_selected(n)?t.cut(t.get_top_selected()):t.cut(n)}},copy:{separator_before:!1,icon:!1,separator_after:!1,label:"Copy",action:function(e){var t=P.jstree.reference(e.reference),n=t.get_node(e.reference);t.is_selected(n)?t.copy(t.get_top_selected()):t.copy(n)}},paste:{separator_before:!1,icon:!1,_disabled:function(e){return!P.jstree.reference(e.reference).can_paste()},separator_after:!1,label:"Paste",action:function(e){var t=P.jstree.reference(e.reference),n=t.get_node(e.reference);t.paste(n)}}}}}}},P.jstree.plugins.contextmenu=function(e,a){this.bind=function(){a.bind.call(this);var t,n,r=0,i=null;this.element.on("init.jstree loading.jstree ready.jstree",function(){this.get_container_ul().addClass("jstree-contextmenu")}.bind(this)).on("contextmenu.jstree",".jstree-anchor",function(e,t){"input"!==e.target.tagName.toLowerCase()&&(e.preventDefault(),r=e.ctrlKey?+new Date:0,(t||i)&&(r=+new Date+1e4),i&&clearTimeout(i),this.is_loading(e.currentTarget)||this.show_contextmenu(e.currentTarget,e.pageX,e.pageY,e))}.bind(this)).on("click.jstree",".jstree-anchor",function(e){this._data.contextmenu.visible&&(!r||250<+new Date-r)&&P.vakata.context.hide(),r=0}.bind(this)).on("touchstart.jstree",".jstree-anchor",function(e){e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(t=e.originalEvent.changedTouches[0].clientX,n=e.originalEvent.changedTouches[0].clientY,i=setTimeout(function(){P(e.currentTarget).trigger("contextmenu",!0)},750))}).on("touchmove.vakata.jstree",function(e){i&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(10<Math.abs(t-e.originalEvent.changedTouches[0].clientX)||10<Math.abs(n-e.originalEvent.changedTouches[0].clientY))&&(clearTimeout(i),P.vakata.context.hide())}).on("touchend.vakata.jstree",function(e){i&&clearTimeout(i)}),P(y).on("context_hide.vakata.jstree",function(e,t){this._data.contextmenu.visible=!1,P(t.reference).removeClass("jstree-context")}.bind(this))},this.teardown=function(){this._data.contextmenu.visible&&P.vakata.context.hide(),P(y).off("context_hide.vakata.jstree"),a.teardown.call(this)},this.show_contextmenu=function(t,n,r,e){if(!(t=this.get_node(t))||t.id===P.jstree.root)return!1;var i=this.settings.contextmenu,a=this.get_node(t,!0).children(".jstree-anchor"),o=!1,s=!1;(i.show_at_node||n===M||r===M)&&(o=a.offset(),n=o.left,r=o.top+this._data.core.li_height),this.settings.contextmenu.select_node&&!this.is_selected(t)&&this.activate_node(t,e),s=i.items,P.vakata.is_function(s)&&(s=s.call(this,t,function(e){this._show_contextmenu(t,n,r,e)}.bind(this))),P.isPlainObject(s)&&this._show_contextmenu(t,n,r,s)},this._show_contextmenu=function(e,t,n,r){var i=this.get_node(e,!0).children(".jstree-anchor");P(y).one("context_show.vakata.jstree",function(e,t){var n="jstree-contextmenu jstree-"+this.get_theme()+"-contextmenu";P(t.element).addClass(n),i.addClass("jstree-context")}.bind(this)),this._data.contextmenu.visible=!0,P.vakata.context.show(i,{x:t,y:n},r),this.trigger("show_contextmenu",{node:e,x:t,y:n})}},h={element:d=!1,reference:!1,position_x:0,position_y:0,items:[],html:"",is_visible:!1},(f=P).vakata.context={settings:{hide_onmouseleave:0,icons:!0},_trigger:function(e){f(y).triggerHandler("context_"+e+".vakata",{reference:h.reference,element:h.element,position:{x:h.position_x,y:h.position_y}})},_execute:function(e){return!(!(e=h.items[e])||e._disabled&&(!f.vakata.is_function(e._disabled)||e._disabled({item:e,reference:h.reference,element:h.element}))||!e.action)&&e.action.call(null,{item:e,reference:h.reference,element:h.element,position:{x:h.position_x,y:h.position_y}})},_parse:function(e,t){if(!e)return!1;t||(h.html="",h.items=[]);var n,r="",i=!1;return t&&(r+="<ul>"),f.each(e,function(e,t){if(!t)return!0;h.items.push(t),!i&&t.separator_before&&(r+="<li class='vakata-context-separator'><a href='#' "+(f.vakata.context.settings.icons?"":'class="vakata-context-no-icons"')+">&#160;</a></li>"),i=!1,r+="<li class='"+(t._class||"")+(!0===t._disabled||f.vakata.is_function(t._disabled)&&t._disabled({item:t,reference:h.reference,element:h.element})?" vakata-contextmenu-disabled ":"")+"' "+(t.shortcut?" data-shortcut='"+t.shortcut+"' ":"")+">",r+="<a href='#' rel='"+(h.items.length-1)+"' "+(t.title?"title='"+t.title+"'":"")+">",f.vakata.context.settings.icons&&(r+="<i ",t.icon&&(-1!==t.icon.indexOf("/")||-1!==t.icon.indexOf(".")?r+=" style='background:url(\""+t.icon+"\") center center no-repeat' ":r+=" class='"+t.icon+"' "),r+="></i><span class='vakata-contextmenu-sep'>&#160;</span>"),r+=(f.vakata.is_function(t.label)?t.label({item:e,reference:h.reference,element:h.element}):t.label)+(t.shortcut?' <span class="vakata-contextmenu-shortcut vakata-contextmenu-shortcut-'+t.shortcut+'">'+(t.shortcut_label||"")+"</span>":"")+"</a>",t.submenu&&(n=f.vakata.context._parse(t.submenu,!0))&&(r+=n),r+="</li>",t.separator_after&&(r+="<li class='vakata-context-separator'><a href='#' "+(f.vakata.context.settings.icons?"":'class="vakata-context-no-icons"')+">&#160;</a></li>",i=!0)}),r=r.replace(/<li class\='vakata-context-separator'\><\/li\>$/,""),t&&(r+="</ul>"),t||(h.html=r,f.vakata.context._trigger("parse")),10<r.length&&r},_show_submenu:function(e){if((e=f(e)).length&&e.children("ul").length){var t=e.children("ul"),n=e.offset().left,r=n+e.outerWidth(),i=e.offset().top,a=t.width(),o=t.height(),s=f(window).width()+f(window).scrollLeft(),c=f(window).height()+f(window).scrollTop();d?e[r-(a+10+e.outerWidth())<0?"addClass":"removeClass"]("vakata-context-left"):e[s<r+a&&s-r<n?"addClass":"removeClass"]("vakata-context-right"),c<i+o+10&&t.css("bottom","-1px"),e.hasClass("vakata-context-right")?n<a&&t.css("margin-right",n-a):s-r<a&&t.css("margin-left",s-r-a),t.show()}},show:function(e,t,n){var r,i,a,o,s,c,l,u;switch(h.element&&h.element.length&&h.element.width(""),!0){case!t&&!e:return!1;case!!t&&!!e:h.reference=e,h.position_x=t.x,h.position_y=t.y;break;case!t&&!!e:r=(h.reference=e).offset(),h.position_x=r.left+e.outerHeight(),h.position_y=r.top;break;case!!t&&!e:h.position_x=t.x,h.position_y=t.y}e&&!n&&f(e).data("vakata_contextmenu")&&(n=f(e).data("vakata_contextmenu")),f.vakata.context._parse(n)&&h.element.html(h.html),h.items.length&&(h.element.appendTo(y.body),i=h.element,a=h.position_x,o=h.position_y,s=i.width(),c=i.height(),l=f(window).width()+f(window).scrollLeft(),u=f(window).height()+f(window).scrollTop(),d&&(a-=i.outerWidth()-f(e).outerWidth())<f(window).scrollLeft()+20&&(a=f(window).scrollLeft()+20),l<a+s+20&&(a=l-(s+20)),u<o+c+20&&(o=u-(c+20)),h.element.css({left:a,top:o}).show().find("a").first().trigger("focus").parent().addClass("vakata-context-hover"),h.is_visible=!0,f.vakata.context._trigger("show"))},hide:function(){h.is_visible&&(h.element.hide().find("ul").hide().end().find(":focus").trigger("blur").end().detach(),h.is_visible=!1,f.vakata.context._trigger("hide"))}},f(function(){d="rtl"===f(y.body).css("direction");var t=!1;h.element=f("<ul class='vakata-context'></ul>"),h.element.on("mouseenter","li",function(e){e.stopImmediatePropagation(),f.contains(this,e.relatedTarget)||(t&&clearTimeout(t),h.element.find(".vakata-context-hover").removeClass("vakata-context-hover").end(),f(this).siblings().find("ul").hide().end().end().parentsUntil(".vakata-context","li").addBack().addClass("vakata-context-hover"),f.vakata.context._show_submenu(this))}).on("mouseleave","li",function(e){f.contains(this,e.relatedTarget)||f(this).find(".vakata-context-hover").addBack().removeClass("vakata-context-hover")}).on("mouseleave",function(e){f(this).find(".vakata-context-hover").removeClass("vakata-context-hover"),f.vakata.context.settings.hide_onmouseleave&&(t=setTimeout(function(){f.vakata.context.hide()},f.vakata.context.settings.hide_onmouseleave))}).on("click","a",function(e){e.preventDefault(),f(this).trigger("blur").parent().hasClass("vakata-context-disabled")||!1===f.vakata.context._execute(f(this).attr("rel"))||f.vakata.context.hide()}).on("keydown","a",function(e){var t=null;switch(e.which){case 13:case 32:e.type="click",e.preventDefault(),f(e.currentTarget).trigger(e);break;case 37:h.is_visible&&(h.element.find(".vakata-context-hover").last().closest("li").first().find("ul").hide().find(".vakata-context-hover").removeClass("vakata-context-hover").end().end().children("a").trigger("focus"),e.stopImmediatePropagation(),e.preventDefault());break;case 38:h.is_visible&&((t=h.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").prevAll("li:not(.vakata-context-separator)").first()).length||(t=h.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").last()),t.addClass("vakata-context-hover").children("a").trigger("focus"),e.stopImmediatePropagation(),e.preventDefault());break;case 39:h.is_visible&&(h.element.find(".vakata-context-hover").last().children("ul").show().children("li:not(.vakata-context-separator)").removeClass("vakata-context-hover").first().addClass("vakata-context-hover").children("a").trigger("focus"),e.stopImmediatePropagation(),e.preventDefault());break;case 40:h.is_visible&&((t=h.element.find("ul:visible").addBack().last().children(".vakata-context-hover").removeClass("vakata-context-hover").nextAll("li:not(.vakata-context-separator)").first()).length||(t=h.element.find("ul:visible").addBack().last().children("li:not(.vakata-context-separator)").first()),t.addClass("vakata-context-hover").children("a").trigger("focus"),e.stopImmediatePropagation(),e.preventDefault());break;case 27:f.vakata.context.hide(),e.preventDefault()}}).on("keydown",function(e){e.preventDefault();var t=h.element.find(".vakata-contextmenu-shortcut-"+e.which).parent();t.parent().not(".vakata-context-disabled")&&t.trigger("click")}),f(y).on("mousedown.vakata.jstree",function(e){h.is_visible&&h.element[0]!==e.target&&!f.contains(h.element[0],e.target)&&f.vakata.context.hide()}).on("context_show.vakata.jstree",function(e,t){h.element.find("li:has(ul)").children("a").addClass("vakata-context-parent"),d&&h.element.addClass("vakata-context-rtl").css("direction","rtl"),h.element.find("ul").hide().end()})}),P.jstree.defaults.dnd={copy:!0,open_timeout:500,is_draggable:!0,check_while_dragging:!0,always_copy:!1,inside_pos:0,drag_selection:!0,touch:!0,large_drop_target:!1,large_drag_target:!1,use_html5:!1},P.jstree.plugins.dnd=function(e,s){this.init=function(e,t){s.init.call(this,e,t),this.settings.dnd.use_html5=this.settings.dnd.use_html5&&"draggable"in y.createElement("span")},this.bind=function(){s.bind.call(this),this.element.on(this.settings.dnd.use_html5?"dragstart.jstree":"mousedown.jstree touchstart.jstree",this.settings.dnd.large_drag_target?".jstree-node":".jstree-anchor",function(e){if(this.settings.dnd.large_drag_target&&P(e.target).closest(".jstree-node")[0]!==e.currentTarget)return!0;if("touchstart"===e.type&&(!this.settings.dnd.touch||"selected"===this.settings.dnd.touch&&!P(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").hasClass("jstree-clicked")))return!0;var t=this.get_node(e.target),n=this.is_selected(t)&&this.settings.dnd.drag_selection?this.get_top_selected().length:1,r=1<n?n+" "+this.get_string("nodes"):this.get_text(e.currentTarget);if(this.settings.core.force_text&&(r=P.vakata.html.escape(r)),t&&t.id&&t.id!==P.jstree.root&&(1===e.which||"touchstart"===e.type||"dragstart"===e.type)&&(!0===this.settings.dnd.is_draggable||P.vakata.is_function(this.settings.dnd.is_draggable)&&this.settings.dnd.is_draggable.call(this,1<n?this.get_top_selected(!0):[t],e))){if(c={jstree:!0,origin:this,obj:this.get_node(t,!0),nodes:1<n?this.get_top_selected():[t.id]},u=e.currentTarget,!this.settings.dnd.use_html5)return this.element.trigger("mousedown.jstree"),P.vakata.dnd.start(e,c,'<div id="jstree-dnd" class="jstree-'+this.get_theme()+" jstree-"+this.get_theme()+"-"+this.get_theme_variant()+" "+(this.settings.core.themes.responsive?" jstree-dnd-responsive":"")+'"><i class="jstree-icon jstree-er"></i>'+r+'<ins class="jstree-copy">+</ins></div>');P.vakata.dnd._trigger("start",e,{helper:P(),element:u,data:c})}}.bind(this)),this.settings.dnd.use_html5&&this.element.on("dragover.jstree",function(e){return e.preventDefault(),P.vakata.dnd._trigger("move",e,{helper:P(),element:u,data:c}),!1}).on("drop.jstree",function(e){return e.preventDefault(),P.vakata.dnd._trigger("stop",e,{helper:P(),element:u,data:c}),!1}.bind(this))},this.redraw_node=function(e,t,n,r){if((e=s.redraw_node.apply(this,arguments))&&this.settings.dnd.use_html5)if(this.settings.dnd.large_drag_target)e.setAttribute("draggable",!0);else{var i,a,o=null;for(i=0,a=e.childNodes.length;i<a;i++)if(e.childNodes[i]&&e.childNodes[i].className&&-1!==e.childNodes[i].className.indexOf("jstree-anchor")){o=e.childNodes[i];break}o&&o.setAttribute("draggable",!0)}return e}},P(function(){var x=!1,k=!1,E=!1,D=!1,I=P('<div id="jstree-marker">&#160;</div>').hide();P(y).on("dragover.vakata.jstree",function(e){u&&P.vakata.dnd._trigger("move",e,{helper:P(),element:u,data:c})}).on("drop.vakata.jstree",function(e){u&&(P.vakata.dnd._trigger("stop",e,{helper:P(),element:u,data:c}),c=u=null)}).on("dnd_start.vakata.jstree",function(e,t){E=x=!1,t&&t.data&&t.data.jstree&&I.appendTo(y.body)}).on("dnd_move.vakata.jstree",function(e,i){var a=i.event.target!==E.target;if(D&&(i.event&&"dragover"===i.event.type&&!a||clearTimeout(D)),i&&i.data&&i.data.jstree&&(!i.event.target.id||"jstree-marker"!==i.event.target.id)){E=i.event;var o,s,c,l,u,f,d,h,p,m,g,_,b,v,y,w,C,A=P.jstree.reference(i.event.target),S=!1,T=!1,t=!1;if(A&&A._data&&A._data.dnd)if(I.attr("class","jstree-"+A.get_theme()+(A.settings.core.themes.responsive?" jstree-dnd-responsive":"")),y=i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey)),i.helper.children().attr("class","jstree-"+A.get_theme()+" jstree-"+A.get_theme()+"-"+A.get_theme_variant()+" "+(A.settings.core.themes.responsive?" jstree-dnd-responsive":"")).find(".jstree-copy").first()[y?"show":"hide"](),i.event.target!==A.element[0]&&i.event.target!==A.get_container_ul()[0]||0!==A.get_container_ul().children().length){if((S=A.settings.dnd.large_drop_target?P(i.event.target).closest(".jstree-node").children(".jstree-anchor"):P(i.event.target).closest(".jstree-anchor"))&&S.length&&S.parent().is(".jstree-closed, .jstree-open, .jstree-leaf")&&(T=S.offset(),t=(i.event.pageY!==M?i.event.pageY:i.event.originalEvent.pageY)-T.top,c=S.outerHeight(),f=t<c/3?["b","i","a"]:c-c/3<t?["a","i","b"]:c/2<t?["i","a","b"]:["i","b","a"],P.each(f,function(e,t){switch(t){case"b":o=T.left-6,s=T.top,l=A.get_parent(S),u=S.parent().index(),C="jstree-below";break;case"i":b=A.settings.dnd.inside_pos,v=A.get_node(S.parent()),o=T.left-2,s=T.top+c/2+1,l=v.id,u="first"===b?0:"last"===b?v.children.length:Math.min(b,v.children.length),C="jstree-inside";break;case"a":o=T.left-6,s=T.top+c,l=A.get_parent(S),u=S.parent().index()+1,C="jstree-above"}for(d=!0,h=0,p=i.data.nodes.length;h<p;h++)if(m=i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey))?"copy_node":"move_node",g=u,"move_node"===m&&"a"===t&&i.data.origin&&i.data.origin===A&&l===A.get_parent(i.data.nodes[h])&&(_=A.get_node(l),g>P.inArray(i.data.nodes[h],_.children)&&(g-=1)),!(d=d&&(A&&A.settings&&A.settings.dnd&&!1===A.settings.dnd.check_while_dragging||A.check(m,i.data.origin&&i.data.origin!==A?i.data.origin.get_node(i.data.nodes[h]):i.data.nodes[h],l,g,{dnd:!0,ref:A.get_node(S.parent()),pos:t,origin:i.data.origin,is_multi:i.data.origin&&i.data.origin!==A,is_foreign:!i.data.origin})))){A&&A.last_error&&(k=A.last_error());break}var n,r;if("i"===t&&S.parent().is(".jstree-closed")&&A.settings.dnd.open_timeout&&(i.event&&"dragover"===i.event.type&&!a||(D&&clearTimeout(D),D=setTimeout((n=A,r=S,function(){n.open_node(r)}),A.settings.dnd.open_timeout))),d)return(w=A.get_node(l,!0)).hasClass(".jstree-dnd-parent")||(P(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),w.addClass("jstree-dnd-parent")),x={ins:A,par:l,pos:"i"!==t||"last"!==b||0!==u||A.is_loaded(v)?u:"last"},I.css({left:o+"px",top:s+"px"}).show(),I.removeClass("jstree-above jstree-inside jstree-below").addClass(C),i.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),i.event.originalEvent&&i.event.originalEvent.dataTransfer&&(i.event.originalEvent.dataTransfer.dropEffect=y?"copy":"move"),k={},!(f=!0)}),!0===f))return}else{for(d=!0,h=0,p=i.data.nodes.length;h<p&&(d=d&&A.check(i.data.origin&&(i.data.origin.settings.dnd.always_copy||i.data.origin.settings.dnd.copy&&(i.event.metaKey||i.event.ctrlKey))?"copy_node":"move_node",i.data.origin&&i.data.origin!==A?i.data.origin.get_node(i.data.nodes[h]):i.data.nodes[h],P.jstree.root,"last",{dnd:!0,ref:A.get_node(P.jstree.root),pos:"i",origin:i.data.origin,is_multi:i.data.origin&&i.data.origin!==A,is_foreign:!i.data.origin}));h++);if(d)return x={ins:A,par:P.jstree.root,pos:"last"},I.hide(),i.helper.find(".jstree-icon").first().removeClass("jstree-er").addClass("jstree-ok"),void(i.event.originalEvent&&i.event.originalEvent.dataTransfer&&(i.event.originalEvent.dataTransfer.dropEffect=y?"copy":"move"))}P(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),x=!1,i.helper.find(".jstree-icon").removeClass("jstree-ok").addClass("jstree-er"),i.event.originalEvent&&i.event.originalEvent.dataTransfer,I.hide()}}).on("dnd_scroll.vakata.jstree",function(e,t){t&&t.data&&t.data.jstree&&(I.hide(),E=x=!1,t.helper.find(".jstree-icon").first().removeClass("jstree-ok").addClass("jstree-er"))}).on("dnd_stop.vakata.jstree",function(e,t){if(P(".jstree-dnd-parent").removeClass("jstree-dnd-parent"),D&&clearTimeout(D),t&&t.data&&t.data.jstree){I.hide().detach();var n,r,i=[];if(x){for(n=0,r=t.data.nodes.length;n<r;n++)i[n]=t.data.origin?t.data.origin.get_node(t.data.nodes[n]):t.data.nodes[n];x.ins[t.data.origin&&(t.data.origin.settings.dnd.always_copy||t.data.origin.settings.dnd.copy&&(t.event.metaKey||t.event.ctrlKey))?"copy_node":"move_node"](i,x.par,x.pos,!1,!1,!1,t.data.origin)}else(n=P(t.event.target).closest(".jstree")).length&&k&&k.error&&"check"===k.error&&(n=n.jstree(!0))&&n.settings.core.error.call(this,k);x=E=!1}}).on("keyup.jstree keydown.jstree",function(e,t){(t=P.vakata.dnd._get())&&t.data&&t.data.jstree&&("keyup"===e.type&&27===e.which?(D&&clearTimeout(D),D=E=k=x=!1,I.hide().detach(),P.vakata.dnd._clean()):(t.helper.find(".jstree-copy").first()[t.data.origin&&(t.data.origin.settings.dnd.always_copy||t.data.origin.settings.dnd.copy&&(e.metaKey||e.ctrlKey))?"show":"hide"](),E&&(E.metaKey=e.metaKey,E.ctrlKey=e.ctrlKey,P.vakata.dnd._trigger("move",E))))})}),m={element:!((p=P).vakata.html={div:p("<div></div>"),escape:function(e){return p.vakata.html.div.text(e).html()},strip:function(e){return p.vakata.html.div.empty().append(p.parseHTML(e)).text()}}),target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},p.vakata.dnd={settings:{scroll_speed:10,scroll_proximity:20,helper_left:5,helper_top:10,threshold:5,threshold_touch:10},_trigger:function(e,t,n){n===M&&(n=p.vakata.dnd._get()),n.event=t,p(y).triggerHandler("dnd_"+e+".vakata",n)},_get:function(){return{data:m.data,element:m.element,helper:m.helper}},_clean:function(){m.helper&&m.helper.remove(),m.scroll_i&&(clearInterval(m.scroll_i),m.scroll_i=!1),m={element:!1,target:!1,is_down:!1,is_drag:!1,helper:!1,helper_w:0,data:!1,init_x:0,init_y:0,scroll_l:0,scroll_t:0,scroll_e:!1,scroll_i:!1,is_touch:!1},u=null,p(y).off("mousemove.vakata.jstree touchmove.vakata.jstree",p.vakata.dnd.drag),p(y).off("mouseup.vakata.jstree touchend.vakata.jstree",p.vakata.dnd.stop)},_scroll:function(e){if(!m.scroll_e||!m.scroll_l&&!m.scroll_t)return m.scroll_i&&(clearInterval(m.scroll_i),m.scroll_i=!1),!1;if(!m.scroll_i)return m.scroll_i=setInterval(p.vakata.dnd._scroll,100),!1;if(!0===e)return!1;var t=m.scroll_e.scrollTop(),n=m.scroll_e.scrollLeft();m.scroll_e.scrollTop(t+m.scroll_t*p.vakata.dnd.settings.scroll_speed),m.scroll_e.scrollLeft(n+m.scroll_l*p.vakata.dnd.settings.scroll_speed),t===m.scroll_e.scrollTop()&&n===m.scroll_e.scrollLeft()||p.vakata.dnd._trigger("scroll",m.scroll_e)},start:function(e,t,n){"touchstart"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=y.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),m.is_drag&&p.vakata.dnd.stop({});try{e.currentTarget.unselectable="on",e.currentTarget.onselectstart=function(){return!1},e.currentTarget.style&&(e.currentTarget.style.touchAction="none",e.currentTarget.style.msTouchAction="none",e.currentTarget.style.MozUserSelect="none")}catch(e){}return m.init_x=e.pageX,m.init_y=e.pageY,m.data=t,m.is_down=!0,m.element=e.currentTarget,m.target=e.target,m.is_touch="touchstart"===e.type,!1!==n&&(m.helper=p("<div id='vakata-dnd'></div>").html(n).css({display:"block",margin:"0",padding:"0",position:"absolute",top:"-2000px",lineHeight:"16px",zIndex:"10000"})),p(y).on("mousemove.vakata.jstree touchmove.vakata.jstree",p.vakata.dnd.drag),p(y).on("mouseup.vakata.jstree touchend.vakata.jstree",p.vakata.dnd.stop),!1},drag:function(n){if("touchmove"===n.type&&n.originalEvent&&n.originalEvent.changedTouches&&n.originalEvent.changedTouches[0]&&(n.pageX=n.originalEvent.changedTouches[0].pageX,n.pageY=n.originalEvent.changedTouches[0].pageY,n.target=y.elementFromPoint(n.originalEvent.changedTouches[0].pageX-window.pageXOffset,n.originalEvent.changedTouches[0].pageY-window.pageYOffset)),m.is_down){if(!m.is_drag){if(!(Math.abs(n.pageX-m.init_x)>(m.is_touch?p.vakata.dnd.settings.threshold_touch:p.vakata.dnd.settings.threshold)||Math.abs(n.pageY-m.init_y)>(m.is_touch?p.vakata.dnd.settings.threshold_touch:p.vakata.dnd.settings.threshold)))return;m.helper&&(m.helper.appendTo(y.body),m.helper_w=m.helper.outerWidth()),m.is_drag=!0,p(m.target).one("click.vakata",!1),p.vakata.dnd._trigger("start",n)}var e=!1,t=!1,r=!1,i=!1,a=!1,o=!1,s=!1,c=!1,l=!1,u=!1;return m.scroll_t=0,m.scroll_l=0,m.scroll_e=!1,p(p(n.target).parentsUntil("body").addBack().get().reverse()).filter(function(){return/^auto|scroll$/.test(p(this).css("overflow"))&&(this.scrollHeight>this.offsetHeight||this.scrollWidth>this.offsetWidth)}).each(function(){var e=p(this),t=e.offset();if(this.scrollHeight>this.offsetHeight&&(t.top+e.height()-n.pageY<p.vakata.dnd.settings.scroll_proximity&&(m.scroll_t=1),n.pageY-t.top<p.vakata.dnd.settings.scroll_proximity&&(m.scroll_t=-1)),this.scrollWidth>this.offsetWidth&&(t.left+e.width()-n.pageX<p.vakata.dnd.settings.scroll_proximity&&(m.scroll_l=1),n.pageX-t.left<p.vakata.dnd.settings.scroll_proximity&&(m.scroll_l=-1)),m.scroll_t||m.scroll_l)return m.scroll_e=p(this),!1}),m.scroll_e||(e=p(y),t=p(window),r=e.height(),i=t.height(),a=e.width(),o=t.width(),s=e.scrollTop(),c=e.scrollLeft(),i<r&&n.pageY-s<p.vakata.dnd.settings.scroll_proximity&&(m.scroll_t=-1),i<r&&i-(n.pageY-s)<p.vakata.dnd.settings.scroll_proximity&&(m.scroll_t=1),o<a&&n.pageX-c<p.vakata.dnd.settings.scroll_proximity&&(m.scroll_l=-1),o<a&&o-(n.pageX-c)<p.vakata.dnd.settings.scroll_proximity&&(m.scroll_l=1),(m.scroll_t||m.scroll_l)&&(m.scroll_e=e)),m.scroll_e&&p.vakata.dnd._scroll(!0),m.helper&&(l=parseInt(n.pageY+p.vakata.dnd.settings.helper_top,10),u=parseInt(n.pageX+p.vakata.dnd.settings.helper_left,10),r&&r<l+25&&(l=r-50),a&&u+m.helper_w>a&&(u=a-(m.helper_w+2)),m.helper.css({left:u+"px",top:l+"px"})),p.vakata.dnd._trigger("move",n),!1}},stop:function(e){if("touchend"===e.type&&e.originalEvent&&e.originalEvent.changedTouches&&e.originalEvent.changedTouches[0]&&(e.pageX=e.originalEvent.changedTouches[0].pageX,e.pageY=e.originalEvent.changedTouches[0].pageY,e.target=y.elementFromPoint(e.originalEvent.changedTouches[0].pageX-window.pageXOffset,e.originalEvent.changedTouches[0].pageY-window.pageYOffset)),m.is_drag)e.target!==m.target&&p(m.target).off("click.vakata"),p.vakata.dnd._trigger("stop",e);else if("touchend"===e.type&&e.target===m.target){var t=setTimeout(function(){p(e.target).trigger("click")},100);p(e.target).one("click",function(){t&&clearTimeout(t)})}return p.vakata.dnd._clean(),!1}},P.jstree.defaults.massload=null,P.jstree.plugins.massload=function(e,u){this.init=function(e,t){this._data.massload={},u.init.call(this,e,t)},this._load_nodes=function(a,o,s,c){var e,t,l,n=this.settings.massload,r=[],i=this._model.data;if(!s){for(e=0,t=a.length;e<t;e++)i[a[e]]&&(i[a[e]].state.loaded||i[a[e]].state.failed)&&!c||(r.push(a[e]),(l=this.get_node(a[e],!0))&&l.length&&l.addClass("jstree-loading").attr("aria-busy",!0));if(this._data.massload={},r.length){if(P.vakata.is_function(n))return n.call(this,r,function(e){var t,n;if(e)for(t in e)e.hasOwnProperty(t)&&(this._data.massload[t]=e[t]);for(t=0,n=a.length;t<n;t++)(l=this.get_node(a[t],!0))&&l.length&&l.removeClass("jstree-loading").attr("aria-busy",!1);u._load_nodes.call(this,a,o,s,c)}.bind(this));if("object"==typeof n&&n&&n.url)return n=P.extend(!0,{},n),P.vakata.is_function(n.url)&&(n.url=n.url.call(this,r)),P.vakata.is_function(n.data)&&(n.data=n.data.call(this,r)),P.ajax(n).done(function(e,t,n){var r,i;if(e)for(r in e)e.hasOwnProperty(r)&&(this._data.massload[r]=e[r]);for(r=0,i=a.length;r<i;r++)(l=this.get_node(a[r],!0))&&l.length&&l.removeClass("jstree-loading").attr("aria-busy",!1);u._load_nodes.call(this,a,o,s,c)}.bind(this)).fail(function(e){u._load_nodes.call(this,a,o,s,c)}.bind(this))}}return u._load_nodes.call(this,a,o,s,c)},this._load_node=function(e,t){var n,r=this._data.massload[e.id],i=null;return r?(i=this["string"==typeof r?"_append_html_data":"_append_json_data"](e,"string"==typeof r?P(P.parseHTML(r)).filter(function(){return 3!==this.nodeType}):r,function(e){t.call(this,e)}),(n=this.get_node(e.id,!0))&&n.length&&n.removeClass("jstree-loading").attr("aria-busy",!1),delete this._data.massload[e.id],i):u._load_node.call(this,e,t)}},P.jstree.defaults.search={ajax:!1,fuzzy:!1,case_sensitive:!1,show_only_matches:!1,show_only_matches_children:!1,close_opened_onclear:!0,search_leaves_only:!1,search_callback:!1},P.jstree.plugins.search=function(e,s){this.bind=function(){s.bind.call(this),this._data.search.str="",this._data.search.dom=P(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=!1,this._data.search.smc=!1,this._data.search.hdn=[],this.element.on("search.jstree",function(e,t){if(this._data.search.som&&t.res.length){var n,r,i,a,o=this._model.data,s=[];for(n=0,r=t.res.length;n<r;n++)if(o[t.res[n]]&&!o[t.res[n]].state.hidden&&(s.push(t.res[n]),s=s.concat(o[t.res[n]].parents),this._data.search.smc))for(i=0,a=o[t.res[n]].children_d.length;i<a;i++)o[o[t.res[n]].children_d[i]]&&!o[o[t.res[n]].children_d[i]].state.hidden&&s.push(o[t.res[n]].children_d[i]);s=P.vakata.array_remove_item(P.vakata.array_unique(s),P.jstree.root),this._data.search.hdn=this.hide_all(!0),this.show_node(s,!0),this.redraw(!0)}}.bind(this)).on("clear_search.jstree",function(e,t){this._data.search.som&&t.res.length&&(this.show_node(this._data.search.hdn,!0),this.redraw(!0))}.bind(this))},this.search=function(r,e,t,n,i,a){if(!1===r||""===P.vakata.trim(r.toString()))return this.clear_search();n=(n=this.get_node(n))&&n.id?n.id:null,r=r.toString();var o,s,c=this.settings.search,l=!!c.ajax&&c.ajax,u=this._model.data,f=null,d=[],h=[];if(this._data.search.res.length&&!i&&this.clear_search(),t===M&&(t=c.show_only_matches),a===M&&(a=c.show_only_matches_children),!e&&!1!==l)return P.vakata.is_function(l)?l.call(this,r,function(e){e&&e.d&&(e=e.d),this._load_nodes(P.vakata.is_array(e)?P.vakata.array_unique(e):[],function(){this.search(r,!0,t,n,i,a)})}.bind(this),n):((l=P.extend({},l)).data||(l.data={}),l.data.str=r,n&&(l.data.inside=n),this._data.search.lastRequest&&this._data.search.lastRequest.abort(),this._data.search.lastRequest=P.ajax(l).fail(function(){this._data.core.last_error={error:"ajax",plugin:"search",id:"search_01",reason:"Could not load search parents",data:JSON.stringify(l)},this.settings.core.error.call(this,this._data.core.last_error)}.bind(this)).done(function(e){e&&e.d&&(e=e.d),this._load_nodes(P.vakata.is_array(e)?P.vakata.array_unique(e):[],function(){this.search(r,!0,t,n,i,a)})}.bind(this)),this._data.search.lastRequest);if(i||(this._data.search.str=r,this._data.search.dom=P(),this._data.search.res=[],this._data.search.opn=[],this._data.search.som=t,this._data.search.smc=a),f=new P.vakata.search(r,!0,{caseSensitive:c.case_sensitive,fuzzy:c.fuzzy}),P.each(u[n||P.jstree.root].children_d,function(e,t){var n=u[t];n.text&&!n.state.hidden&&(!c.search_leaves_only||n.state.loaded&&0===n.children.length)&&(c.search_callback&&c.search_callback.call(this,r,n)||!c.search_callback&&f.search(n.text).isMatch)&&(d.push(t),h=h.concat(n.parents))}),d.length){for(o=0,s=(h=P.vakata.array_unique(h)).length;o<s;o++)h[o]!==P.jstree.root&&u[h[o]]&&!0===this.open_node(h[o],null,0)&&this._data.search.opn.push(h[o]);i?(this._data.search.dom=this._data.search.dom.add(P(this.element[0].querySelectorAll("#"+P.map(d,function(e){return-1!=="0123456789".indexOf(e[0])?"\\3"+e[0]+" "+e.substr(1).replace(P.jstree.idregex,"\\$&"):e.replace(P.jstree.idregex,"\\$&")}).join(", #")))),this._data.search.res=P.vakata.array_unique(this._data.search.res.concat(d))):(this._data.search.dom=P(this.element[0].querySelectorAll("#"+P.map(d,function(e){return-1!=="0123456789".indexOf(e[0])?"\\3"+e[0]+" "+e.substr(1).replace(P.jstree.idregex,"\\$&"):e.replace(P.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.res=d),this._data.search.dom.children(".jstree-anchor").addClass("jstree-search")}this.trigger("search",{nodes:this._data.search.dom,str:r,res:this._data.search.res,show_only_matches:t})},this.clear_search=function(){this.settings.search.close_opened_onclear&&this.close_node(this._data.search.opn,0),this.trigger("clear_search",{nodes:this._data.search.dom,str:this._data.search.str,res:this._data.search.res}),this._data.search.res.length&&(this._data.search.dom=P(this.element[0].querySelectorAll("#"+P.map(this._data.search.res,function(e){return-1!=="0123456789".indexOf(e[0])?"\\3"+e[0]+" "+e.substr(1).replace(P.jstree.idregex,"\\$&"):e.replace(P.jstree.idregex,"\\$&")}).join(", #"))),this._data.search.dom.children(".jstree-anchor").removeClass("jstree-search")),this._data.search.str="",this._data.search.res=[],this._data.search.opn=[],this._data.search.dom=P()},this.redraw_node=function(e,t,n,r){if((e=s.redraw_node.apply(this,arguments))&&-1!==P.inArray(e.id,this._data.search.res)){var i,a,o=null;for(i=0,a=e.childNodes.length;i<a;i++)if(e.childNodes[i]&&e.childNodes[i].className&&-1!==e.childNodes[i].className.indexOf("jstree-anchor")){o=e.childNodes[i];break}o&&(o.className+=" jstree-search")}return e}},(S=P).vakata.search=function(g,e,_){_=_||{},!1!==(_=S.extend({},S.vakata.search.defaults,_)).fuzzy&&(_.fuzzy=!0),g=_.caseSensitive?g:g.toLowerCase();var b,v,y,t,w=_.location,i=_.distance,C=_.threshold,A=g.length;return 32<A&&(_.fuzzy=!1),_.fuzzy&&(b=1<<A-1,v=function(){var e={},t=0;for(t=0;t<A;t++)e[g.charAt(t)]=0;for(t=0;t<A;t++)e[g.charAt(t)]|=1<<A-t-1;return e}(),y=function(e,t){var n=e/A,r=Math.abs(w-t);return i?n+r/i:r?1:n}),t=function(e){if(e=_.caseSensitive?e:e.toLowerCase(),g===e||-1!==e.indexOf(g))return{isMatch:!0,score:0};if(!_.fuzzy)return{isMatch:!1,score:1};var t,n,r,i,a,o,s,c,l,u=e.length,f=C,d=e.indexOf(g,w),h=A+u,p=1,m=[];for(-1!==d&&(f=Math.min(y(0,d),f),-1!==(d=e.lastIndexOf(g,w+A))&&(f=Math.min(y(0,d),f))),d=-1,t=0;t<A;t++){for(r=0,i=h;r<i;)y(t,w+i)<=f?r=i:h=i,i=Math.floor((h-r)/2+r);for(h=i,o=Math.max(1,w-i+1),s=Math.min(w+i,u)+A,(c=new Array(s+2))[s+1]=(1<<t)-1,n=s;o<=n;n--)if(l=v[e.charAt(n-1)],c[n]=0===t?(c[n+1]<<1|1)&l:(c[n+1]<<1|1)&l|(a[n+1]|a[n])<<1|1|a[n+1],c[n]&b&&(p=y(t,n-1))<=f){if(f=p,d=n-1,m.push(d),!(w<d))break;o=Math.max(1,2*w-d)}if(y(t+1,w)>f)break;a=c}return{isMatch:0<=d,score:p}},!0===e?{search:t}:t(e)},S.vakata.search.defaults={location:0,distance:100,threshold:.6,fuzzy:!1,caseSensitive:!1},P.jstree.defaults.sort=function(e,t){return this.get_text(e)>this.get_text(t)?1:-1};var _=!(P.jstree.plugins.sort=function(e,t){this.bind=function(){t.bind.call(this),this.element.on("model.jstree",function(e,t){this.sort(t.parent,!0)}.bind(this)).on("rename_node.jstree create_node.jstree",function(e,t){this.sort(t.parent||t.node.parent,!1),this.redraw_node(t.parent||t.node.parent,!0)}.bind(this)).on("move_node.jstree copy_node.jstree",function(e,t){this.sort(t.parent,!1),this.redraw_node(t.parent,!0)}.bind(this))},this.sort=function(e,t){var n,r;if((e=this.get_node(e))&&e.children&&e.children.length&&(e.children.sort(this.settings.sort.bind(this)),t))for(n=0,r=e.children_d.length;n<r;n++)this.sort(e.children_d[n],!1)}});P.jstree.defaults.state={key:"jstree",events:"changed.jstree open_node.jstree close_node.jstree check_node.jstree uncheck_node.jstree",ttl:!1,filter:!1,preserve_loaded:!1},P.jstree.plugins.state=function(e,t){this.bind=function(){t.bind.call(this);var n=function(){this.element.on(this.settings.state.events,function(){_&&clearTimeout(_),_=setTimeout(function(){this.save_state()}.bind(this),100)}.bind(this)),this.trigger("state_ready")}.bind(this);this.element.on("ready.jstree",function(e,t){this.element.one("restore_state.jstree",n),this.restore_state()||n()}.bind(this))},this.save_state=function(){var e=this.get_state();this.settings.state.preserve_loaded||delete e.core.loaded;var t={state:e,ttl:this.settings.state.ttl,sec:+new Date};P.vakata.storage.set(this.settings.state.key,JSON.stringify(t))},this.restore_state=function(){var n=P.vakata.storage.get(this.settings.state.key);if(n)try{n=JSON.parse(n)}catch(e){return!1}return!(n&&n.ttl&&n.sec&&+new Date-n.sec>n.ttl)&&(n&&n.state&&(n=n.state),n&&P.vakata.is_function(this.settings.state.filter)&&(n=this.settings.state.filter.call(this,n)),!!n&&(this.settings.state.preserve_loaded||delete n.core.loaded,this.element.one("set_state.jstree",function(e,t){t.instance.trigger("restore_state",{state:P.extend(!0,{},n)})}),this.set_state(n),!0))},this.clear_state=function(){return P.vakata.storage.del(this.settings.state.key)}},P.vakata.storage={set:function(e,t){return window.localStorage.setItem(e,t)},get:function(e){return window.localStorage.getItem(e)},del:function(e){return window.localStorage.removeItem(e)}},P.jstree.defaults.types={default:{}},P.jstree.defaults.types[P.jstree.root]={},P.jstree.plugins.types=function(e,u){this.init=function(e,t){var n,r;if(t&&t.types&&t.types.default)for(n in t.types)if("default"!==n&&n!==P.jstree.root&&t.types.hasOwnProperty(n))for(r in t.types.default)t.types.default.hasOwnProperty(r)&&t.types[n][r]===M&&(t.types[n][r]=t.types.default[r]);u.init.call(this,e,t),this._model.data[P.jstree.root].type=P.jstree.root},this.refresh=function(e,t){u.refresh.call(this,e,t),this._model.data[P.jstree.root].type=P.jstree.root},this.bind=function(){this.element.on("model.jstree",function(e,t){var n,r,i,a=this._model.data,o=t.nodes,s=this.settings.types,c="default";for(n=0,r=o.length;n<r;n++){if(c="default",a[o[n]].original&&a[o[n]].original.type&&s[a[o[n]].original.type]&&(c=a[o[n]].original.type),a[o[n]].data&&a[o[n]].data.jstree&&a[o[n]].data.jstree.type&&s[a[o[n]].data.jstree.type]&&(c=a[o[n]].data.jstree.type),a[o[n]].type=c,!0===a[o[n]].icon&&s[c].icon!==M&&(a[o[n]].icon=s[c].icon),s[c].li_attr!==M&&"object"==typeof s[c].li_attr)for(i in s[c].li_attr)if(s[c].li_attr.hasOwnProperty(i)){if("id"===i)continue;a[o[n]].li_attr[i]===M?a[o[n]].li_attr[i]=s[c].li_attr[i]:"class"===i&&(a[o[n]].li_attr.class=s[c].li_attr.class+" "+a[o[n]].li_attr.class)}if(s[c].a_attr!==M&&"object"==typeof s[c].a_attr)for(i in s[c].a_attr)if(s[c].a_attr.hasOwnProperty(i)){if("id"===i)continue;a[o[n]].a_attr[i]===M?a[o[n]].a_attr[i]=s[c].a_attr[i]:"href"===i&&"#"===a[o[n]].a_attr[i]?a[o[n]].a_attr.href=s[c].a_attr.href:"class"===i&&(a[o[n]].a_attr.class=s[c].a_attr.class+" "+a[o[n]].a_attr.class)}}a[P.jstree.root].type=P.jstree.root}.bind(this)),u.bind.call(this)},this.get_json=function(e,t,n){var r,i,a=this._model.data,o=t?P.extend(!0,{},t,{no_id:!1}):{},s=u.get_json.call(this,e,o,n);if(!1===s)return!1;if(P.vakata.is_array(s))for(r=0,i=s.length;r<i;r++)s[r].type=s[r].id&&a[s[r].id]&&a[s[r].id].type?a[s[r].id].type:"default",t&&t.no_id&&(delete s[r].id,s[r].li_attr&&s[r].li_attr.id&&delete s[r].li_attr.id,s[r].a_attr&&s[r].a_attr.id&&delete s[r].a_attr.id);else s.type=s.id&&a[s.id]&&a[s.id].type?a[s.id].type:"default",t&&t.no_id&&(s=this._delete_ids(s));return s},this._delete_ids=function(e){if(P.vakata.is_array(e)){for(var t=0,n=e.length;t<n;t++)e[t]=this._delete_ids(e[t]);return e}return delete e.id,e.li_attr&&e.li_attr.id&&delete e.li_attr.id,e.a_attr&&e.a_attr.id&&delete e.a_attr.id,e.children&&P.vakata.is_array(e.children)&&(e.children=this._delete_ids(e.children)),e},this.check=function(e,t,n,r,i){if(!1===u.check.call(this,e,t,n,r,i))return!1;t=t&&t.id?t:this.get_node(t),n=n&&n.id?n:this.get_node(n);var a,o,s,c,l=t&&t.id?i&&i.origin?i.origin:P.jstree.reference(t.id):null;switch(l=l&&l._model&&l._model.data?l._model.data:null,e){case"create_node":case"move_node":case"copy_node":if("move_node"!==e||-1===P.inArray(t.id,n.children)){if((a=this.get_rules(n)).max_children!==M&&-1!==a.max_children&&a.max_children===n.children.length)return!(this._data.core.last_error={error:"check",plugin:"types",id:"types_01",reason:"max_children prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})});if(a.valid_children!==M&&-1!==a.valid_children&&-1===P.inArray(t.type||"default",a.valid_children))return!(this._data.core.last_error={error:"check",plugin:"types",id:"types_02",reason:"valid_children prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})});if(l&&t.children_d&&t.parents){for(s=o=0,c=t.children_d.length;s<c;s++)o=Math.max(o,l[t.children_d[s]].parents.length);o=o-t.parents.length+1}(o<=0||o===M)&&(o=1);do{if(a.max_depth!==M&&-1!==a.max_depth&&a.max_depth<o)return!(this._data.core.last_error={error:"check",plugin:"types",id:"types_03",reason:"max_depth prevents function: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})});n=this.get_node(n.parent),a=this.get_rules(n),o++}while(n)}}return!0},this.get_rules=function(e){if(!(e=this.get_node(e)))return!1;var t=this.get_type(e,!0);return t.max_depth===M&&(t.max_depth=-1),t.max_children===M&&(t.max_children=-1),t.valid_children===M&&(t.valid_children=-1),t},this.get_type=function(e,t){return!!(e=this.get_node(e))&&(t?P.extend({type:e.type},this.settings.types[e.type]):e.type)},this.set_type=function(e,t){var n,r,i,a,o,s,c,l,u=this._model.data;if(P.vakata.is_array(e)){for(r=0,i=(e=e.slice()).length;r<i;r++)this.set_type(e[r],t);return!0}if(n=this.settings.types,e=this.get_node(e),!n[t]||!e)return!1;if((c=this.get_node(e,!0))&&c.length&&(l=c.children(".jstree-anchor")),a=e.type,o=this.get_icon(e),e.type=t,(!0===o||!n[a]||n[a].icon!==M&&o===n[a].icon)&&this.set_icon(e,n[t].icon===M||n[t].icon),n[a]&&n[a].li_attr!==M&&"object"==typeof n[a].li_attr)for(s in n[a].li_attr)if(n[a].li_attr.hasOwnProperty(s)){if("id"===s)continue;"class"===s?(u[e.id].li_attr.class=(u[e.id].li_attr.class||"").replace(n[a].li_attr[s],""),c&&c.removeClass(n[a].li_attr[s])):u[e.id].li_attr[s]===n[a].li_attr[s]&&(u[e.id].li_attr[s]=null,c&&c.removeAttr(s))}if(n[a]&&n[a].a_attr!==M&&"object"==typeof n[a].a_attr)for(s in n[a].a_attr)if(n[a].a_attr.hasOwnProperty(s)){if("id"===s)continue;"class"===s?(u[e.id].a_attr.class=(u[e.id].a_attr.class||"").replace(n[a].a_attr[s],""),l&&l.removeClass(n[a].a_attr[s])):u[e.id].a_attr[s]===n[a].a_attr[s]&&("href"===s?(u[e.id].a_attr[s]="#",l&&l.attr("href","#")):(delete u[e.id].a_attr[s],l&&l.removeAttr(s)))}if(n[t].li_attr!==M&&"object"==typeof n[t].li_attr)for(s in n[t].li_attr)if(n[t].li_attr.hasOwnProperty(s)){if("id"===s)continue;u[e.id].li_attr[s]===M?(u[e.id].li_attr[s]=n[t].li_attr[s],c&&("class"===s?c.addClass(n[t].li_attr[s]):c.attr(s,n[t].li_attr[s]))):"class"===s&&(u[e.id].li_attr.class=n[t].li_attr[s]+" "+u[e.id].li_attr.class,c&&c.addClass(n[t].li_attr[s]))}if(n[t].a_attr!==M&&"object"==typeof n[t].a_attr)for(s in n[t].a_attr)if(n[t].a_attr.hasOwnProperty(s)){if("id"===s)continue;u[e.id].a_attr[s]===M?(u[e.id].a_attr[s]=n[t].a_attr[s],l&&("class"===s?l.addClass(n[t].a_attr[s]):l.attr(s,n[t].a_attr[s]))):"href"===s&&"#"===u[e.id].a_attr[s]?(u[e.id].a_attr.href=n[t].a_attr.href,l&&l.attr("href",n[t].a_attr.href)):"class"===s&&(u[e.id].a_attr.class=n[t].a_attr.class+" "+u[e.id].a_attr.class,l&&l.addClass(n[t].a_attr[s]))}return!0}},P.jstree.defaults.unique={case_sensitive:!1,trim_whitespace:!1,duplicate:function(e,t){return e+" ("+t+")"}},P.jstree.plugins.unique=function(e,m){this.check=function(e,t,n,r,i){if(!1===m.check.call(this,e,t,n,r,i))return!1;if(t=t&&t.id?t:this.get_node(t),!(n=n&&n.id?n:this.get_node(n))||!n.children)return!0;var a,o,s,c="rename_node"===e?r:t.text,l=[],u=this.settings.unique.case_sensitive,f=this.settings.unique.trim_whitespace,d=this._model.data;for(a=0,o=n.children.length;a<o;a++)s=d[n.children[a]].text,u||(s=s.toLowerCase()),f&&(s=s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),l.push(s);switch(u||(c=c.toLowerCase()),f&&(c=c.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),e){case"delete_node":return!0;case"rename_node":return s=t.text||"",u||(s=s.toLowerCase()),f&&(s=s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),(a=-1===P.inArray(c,l)||t.text&&s===c)||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_01",reason:"Child with name "+c+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})}),a;case"create_node":return(a=-1===P.inArray(c,l))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_04",reason:"Child with name "+c+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})}),a;case"copy_node":return(a=-1===P.inArray(c,l))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_02",reason:"Child with name "+c+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})}),a;case"move_node":return(a=t.parent===n.id&&(!i||!i.is_multi)||-1===P.inArray(c,l))||(this._data.core.last_error={error:"check",plugin:"unique",id:"unique_03",reason:"Child with name "+c+" already exists. Preventing: "+e,data:JSON.stringify({chk:e,pos:r,obj:!(!t||!t.id)&&t.id,par:!(!n||!n.id)&&n.id})}),a}return!0},this.create_node=function(e,t,n,r,i){if(!t||t.text===M){if(null===e&&(e=P.jstree.root),!(e=this.get_node(e)))return m.create_node.call(this,e,t,n,r,i);if(!(n=n===M?"last":n).toString().match(/^(before|after)$/)&&!i&&!this.is_loaded(e))return m.create_node.call(this,e,t,n,r,i);t||(t={});var a,o,s,c,l,u,f=this._model.data,d=this.settings.unique.case_sensitive,h=this.settings.unique.trim_whitespace,p=this.settings.unique.duplicate;for(o=a=this.get_string("New node"),s=[],c=0,l=e.children.length;c<l;c++)u=f[e.children[c]].text,d||(u=u.toLowerCase()),h&&(u=u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")),s.push(u);for(c=1,u=o,d||(u=u.toLowerCase()),h&&(u=u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));-1!==P.inArray(u,s);)u=o=p.call(this,a,++c).toString(),d||(u=u.toLowerCase()),h&&(u=u.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,""));t.text=o}return m.create_node.call(this,e,t,n,r,i)}};var b=y.createElement("DIV");if(b.setAttribute("unselectable","on"),b.setAttribute("role","presentation"),b.className="jstree-wholerow",b.innerHTML="&#160;",P.jstree.plugins.wholerow=function(e,a){this.bind=function(){a.bind.call(this),this.element.on("ready.jstree set_state.jstree",function(){this.hide_dots()}.bind(this)).on("init.jstree loading.jstree ready.jstree",function(){this.get_container_ul().addClass("jstree-wholerow-ul")}.bind(this)).on("deselect_all.jstree",function(e,t){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked")}.bind(this)).on("changed.jstree",function(e,t){this.element.find(".jstree-wholerow-clicked").removeClass("jstree-wholerow-clicked");var n,r,i=!1;for(n=0,r=t.selected.length;n<r;n++)(i=this.get_node(t.selected[n],!0))&&i.length&&i.children(".jstree-wholerow").addClass("jstree-wholerow-clicked")}.bind(this)).on("open_node.jstree",function(e,t){this.get_node(t.node,!0).find(".jstree-clicked").parent().children(".jstree-wholerow").addClass("jstree-wholerow-clicked")}.bind(this)).on("hover_node.jstree dehover_node.jstree",function(e,t){"hover_node"===e.type&&this.is_disabled(t.node)||this.get_node(t.node,!0).children(".jstree-wholerow")["hover_node"===e.type?"addClass":"removeClass"]("jstree-wholerow-hovered")}.bind(this)).on("contextmenu.jstree",".jstree-wholerow",function(e){if(this._data.contextmenu){e.preventDefault();var t=P.Event("contextmenu",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,pageX:e.pageX,pageY:e.pageY});P(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(t)}}.bind(this)).on("click.jstree",".jstree-wholerow",function(e){e.stopImmediatePropagation();var t=P.Event("click",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});P(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(t).trigger("focus")}).on("dblclick.jstree",".jstree-wholerow",function(e){e.stopImmediatePropagation();var t=P.Event("dblclick",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});P(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(t).trigger("focus")}).on("click.jstree",".jstree-leaf > .jstree-ocl",function(e){e.stopImmediatePropagation();var t=P.Event("click",{metaKey:e.metaKey,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey});P(e.currentTarget).closest(".jstree-node").children(".jstree-anchor").first().trigger(t).trigger("focus")}.bind(this)).on("mouseover.jstree",".jstree-wholerow, .jstree-icon",function(e){return e.stopImmediatePropagation(),this.is_disabled(e.currentTarget)||this.hover_node(e.currentTarget),!1}.bind(this)).on("mouseleave.jstree",".jstree-node",function(e){this.dehover_node(e.currentTarget)}.bind(this))},this.teardown=function(){this.settings.wholerow&&this.element.find(".jstree-wholerow").remove(),a.teardown.call(this)},this.redraw_node=function(e,t,n,r){if(e=a.redraw_node.apply(this,arguments)){var i=b.cloneNode(!0);-1!==P.inArray(e.id,this._data.core.selected)&&(i.className+=" jstree-wholerow-clicked"),this._data.core.focused&&this._data.core.focused===e.id&&(i.className+=" jstree-wholerow-hovered"),e.insertBefore(i,e.childNodes[0])}return e}},window.customElements&&Object&&Object.create){var t=Object.create(HTMLElement.prototype);t.createdCallback=function(){var e,t={core:{},plugins:[]};for(e in P.jstree.plugins)P.jstree.plugins.hasOwnProperty(e)&&this.attributes[e]&&(t.plugins.push(e),this.getAttribute(e)&&JSON.parse(this.getAttribute(e))&&(t[e]=JSON.parse(this.getAttribute(e))));for(e in P.jstree.defaults.core)P.jstree.defaults.core.hasOwnProperty(e)&&this.attributes[e]&&(t.core[e]=JSON.parse(this.getAttribute(e))||this.getAttribute(e));P(this).jstree(t)};try{window.customElements.define("vakata-jstree",function(){},{prototype:t})}catch(e){}}}}),function(o,e){"use strict";o.jstree.defaults.alltrigger=null,o.jstree.plugins.alltrigger=function(i,a){this.init=function(e,t){if(i){this.trigger=function(e,t){a.trigger.call(this,e,t),i(e.replace(".jstree","")+".jstree",t)};var n=o.vakata.context._trigger;o.vakata.context._trigger=function(e){n(e),i("context_"+e+".vakata")};var r=o.vakata.dnd._trigger;o.vakata.dnd._trigger=function(e,t,n){r(e,t,n),i("dnd_"+e+".vakata",t,n)}}a.init.call(this,e,t)}}}(jQuery),function(u){"use strict";var e=u.module("ngJsTree",[]);e.controller("jsTreeCtrl",function(){var t=1;this.nodesFingerprint=function(e){return e.__uiNodeId||(e.__uiNodeId=t++),""+e.__uiNodeId+(e.id||"")+(e.text||"")+(e.type||"")},this.changeWatcher=function(o,f){var d,t=function(){var e,t,n=[];if(o)for(var r=u.isFunction(o)?o():o,i=0,a=r.length;i<a;i++)t=r[i],e=f(t),p[e]=t,n.push(e);return n},h=function(e,t){var n,r,i=[],a={};for(n=0,r=t.length;n<r;n++)a[t[n]]=!0;for(n=0,r=e.length;n<r;n++)a[e[n]]||i.push(e[n]);return i},p={};return d={subscribe:function(e,n){e.$watch(t,function(e,t){n&&!1===n(e,t)||function(e,t){var n,r,i,a,o={},s=h(t,e);for(n=0,r=s.length;n<r;n++){var c=s[n];i=p[c],delete p[c];var l=f(i);l===c?d.onRemoved(i):(o[l]=c,d.onChanged(i))}var u=h(e,t);for(n=0,r=u.length;n<r;n++)a=u[n],i=p[a],o[a]||d.onAdded(i)}(e,t)},!0)},onAdded:u.noop,onChanged:u.noop,onRemoved:u.noop}}}),e.directive("jsTree",["$timeout",function(l){return{restrict:"A",scope:{treeData:"=ngModel",treeEventsObj:"=?treeEventsObj",shouldApply:"&"},controller:"jsTreeCtrl",link:function(i,a,o,e){var n=null,t=e.changeWatcher(i.treeData,e.nodesFingerprint),s=[],r=!1;function c(n,r){return function(){var e=arguments,t=n.$parent.$eval(r);n.$root.$$phase?t.apply(n.$parent,e):n.$parent.$apply(function(){t.apply(n.$parent,e)})}}i.destroy=function(){if(s=[],o.tree)if(-1!==o.tree.indexOf(".")){for(var e=o.tree.split("."),t=e.pop(),n=i.$parent,r=0;r<e.length;r++)n=n[e[r]];i.tree=n[t]=a}else i.tree=i.$parent[o.tree]=a;else i.tree=a;i.tree.jstree("destroy")},i.init=function(){i.tree.jstree(n),l(function(){!function(n,e,t){if(t.treeEvents)for(var r=t.treeEvents.split(";"),i=0;i<r.length;i++)if(0<r[i].length){var a=r[i].split(":")[0],o=r[i].split(":")[1];-1===a.indexOf(".")&&(a+=".jstree"),s.push(a),-1===a.indexOf(".vakata")?n.tree.on(a,c(n,o)):$(document).on(a,c(n,o))}u.isObject(n.treeEventsObj)&&u.forEach(n.treeEventsObj,function(t,e){-1===e.indexOf(".")&&(e+=".jstree"),s.push(e),-1===e.indexOf(".vakata")?n.tree.on(e,function(){var e=arguments;n.$root.$$phase?t.apply(n.$parent,e):n.$parent.$apply(function(){t.apply(n.$parent,e)})}):$(document).on(e,function(){var e=arguments;n.$root.$$phase?t.apply(n.$parent,e):n.$parent.$apply(function(){t.apply(n.$parent,e)})})})}(i,0,o)})},t.onChanged=function(e){u.isDefined(i.tree.jstree(!0).set_type)&&i.tree.jstree(!0).set_type(e.id,e.type),i.tree.jstree(!0).rename_node(e.id,e.text)},t.onAdded=function(t){l(function(){for(;r;);r=!0;var e=i.tree.jstree(!0).get_node(t.parent);i.tree.jstree(!0).create_node(e,t,"inside",function(){r=!1})||(r=!1)})},t.onRemoved=function(e){i.tree.jstree(!0).delete_node(e.id)},t.subscribe(i,function(){return!i.shouldApply||i.shouldApply()}),i.$watch(function(){var e=o.jsTree?i.$parent.$eval(o.jsTree):{};n={},u.copy(e,n);var t=JSON.stringify(n);return n.core?n.core.data=i.treeData:n.core={data:i.treeData},n.plugins?n.plugins.push("alltrigger"):n.plugins=["alltrigger"],n.alltrigger=function(e){i.$root.$$phase||-1!==s.indexOf(e)||i.$apply()},t},function(){i.destroy(),i.init()})}}}])}(angular),function(){var to,no="Expected a function",ro="__lodash_hash_undefined__",io="__lodash_placeholder__",ao=9007199254740991,oo=NaN,so=4294967295,co=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]],lo="[object Arguments]",uo="[object Array]",fo="[object Boolean]",ho="[object Date]",po="[object Error]",mo="[object Function]",go="[object GeneratorFunction]",_o="[object Map]",bo="[object Number]",vo="[object Object]",yo="[object Promise]",wo="[object RegExp]",Co="[object Set]",Ao="[object String]",So="[object Symbol]",To="[object WeakMap]",xo="[object ArrayBuffer]",ko="[object DataView]",Eo="[object Float32Array]",Do="[object Float64Array]",Io="[object Int8Array]",Po="[object Int16Array]",Mo="[object Int32Array]",$o="[object Uint8Array]",Oo="[object Uint8ClampedArray]",Ro="[object Uint16Array]",No="[object Uint32Array]",Lo=/\b__p \+= '';/g,Fo=/\b(__p \+=) '' \+/g,Go=/(__e\(.*?\)|\b__t\)) \+\n'';/g,jo=/&(?:amp|lt|gt|quot|#39);/g,Bo=/[&<>"']/g,Uo=RegExp(jo.source),Ho=RegExp(Bo.source),Wo=/<%-([\s\S]+?)%>/g,qo=/<%([\s\S]+?)%>/g,zo=/<%=([\s\S]+?)%>/g,Vo=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Yo=/^\w*$/,Ko=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,Qo=/[\\^$.*+?()[\]{}|]/g,Xo=RegExp(Qo.source),Zo=/^\s+/,n=/\s/,Jo=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,es=/\{\n\/\* \[wrapped with (.+)\] \*/,ts=/,? & /,ns=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,rs=/[()=,{}\[\]\/\s]/,is=/\\(\\)?/g,as=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,os=/\w*$/,ss=/^[-+]0x[0-9a-f]+$/i,cs=/^0b[01]+$/i,ls=/^\[object .+?Constructor\]$/,us=/^0o[0-7]+$/i,fs=/^(?:0|[1-9]\d*)$/,ds=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,hs=/($^)/,ps=/['\n\r\u2028\u2029\\]/g,e="\\ud800-\\udfff",t="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",r="\\u2700-\\u27bf",i="a-z\\xdf-\\xf6\\xf8-\\xff",a="A-Z\\xc0-\\xd6\\xd8-\\xde",o="\\ufe0e\\ufe0f",s="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",c="["+e+"]",l="["+s+"]",u="["+t+"]",f="\\d+",d="["+r+"]",h="["+i+"]",p="[^"+e+s+f+r+i+a+"]",m="\\ud83c[\\udffb-\\udfff]",g="[^"+e+"]",_="(?:\\ud83c[\\udde6-\\uddff]){2}",b="[\\ud800-\\udbff][\\udc00-\\udfff]",v="["+a+"]",y="(?:"+h+"|"+p+")",w="(?:"+v+"|"+p+")",C="(?:['’](?:d|ll|m|re|s|t|ve))?",A="(?:['’](?:D|LL|M|RE|S|T|VE))?",S="(?:"+u+"|"+m+")"+"?",T="["+o+"]?",x=T+S+("(?:\\u200d(?:"+[g,_,b].join("|")+")"+T+S+")*"),k="(?:"+[d,_,b].join("|")+")"+x,E="(?:"+[g+u+"?",u,_,b,c].join("|")+")",ms=RegExp("['’]","g"),gs=RegExp(u,"g"),D=RegExp(m+"(?="+m+")|"+E+x,"g"),_s=RegExp([v+"?"+h+"+"+C+"(?="+[l,v,"$"].join("|")+")",w+"+"+A+"(?="+[l,v+y,"$"].join("|")+")",v+"?"+y+"+"+C,v+"+"+A,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",f,k].join("|"),"g"),I=RegExp("[\\u200d"+e+t+o+"]"),bs=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,vs=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],ys=-1,ws={};ws[Eo]=ws[Do]=ws[Io]=ws[Po]=ws[Mo]=ws[$o]=ws[Oo]=ws[Ro]=ws[No]=!0,ws[lo]=ws[uo]=ws[xo]=ws[fo]=ws[ko]=ws[ho]=ws[po]=ws[mo]=ws[_o]=ws[bo]=ws[vo]=ws[wo]=ws[Co]=ws[Ao]=ws[To]=!1;var Cs={};Cs[lo]=Cs[uo]=Cs[xo]=Cs[ko]=Cs[fo]=Cs[ho]=Cs[Eo]=Cs[Do]=Cs[Io]=Cs[Po]=Cs[Mo]=Cs[_o]=Cs[bo]=Cs[vo]=Cs[wo]=Cs[Co]=Cs[Ao]=Cs[So]=Cs[$o]=Cs[Oo]=Cs[Ro]=Cs[No]=!0,Cs[po]=Cs[mo]=Cs[To]=!1;var P={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},As=parseFloat,Ss=parseInt,M="object"==typeof global&&global&&global.Object===Object&&global,$="object"==typeof self&&self&&self.Object===Object&&self,Ts=M||$||Function("return this")(),O="object"==typeof exports&&exports&&!exports.nodeType&&exports,R=O&&"object"==typeof module&&module&&!module.nodeType&&module,xs=R&&R.exports===O,N=xs&&M.process,L=function(){try{var e=R&&R.require&&R.require("util").types;return e||N&&N.binding&&N.binding("util")}catch(e){}}(),ks=L&&L.isArrayBuffer,Es=L&&L.isDate,Ds=L&&L.isMap,Is=L&&L.isRegExp,Ps=L&&L.isSet,Ms=L&&L.isTypedArray;function $s(e,t,n){switch(n.length){case 0:return e.call(t);case 1:return e.call(t,n[0]);case 2:return e.call(t,n[0],n[1]);case 3:return e.call(t,n[0],n[1],n[2])}return e.apply(t,n)}function Os(e,t,n,r){for(var i=-1,a=null==e?0:e.length;++i<a;){var o=e[i];t(r,o,n(o),e)}return r}function Rs(e,t){for(var n=-1,r=null==e?0:e.length;++n<r&&!1!==t(e[n],n,e););return e}function Ns(e,t){for(var n=null==e?0:e.length;n--&&!1!==t(e[n],n,e););return e}function Ls(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(!t(e[n],n,e))return!1;return!0}function Fs(e,t){for(var n=-1,r=null==e?0:e.length,i=0,a=[];++n<r;){var o=e[n];t(o,n,e)&&(a[i++]=o)}return a}function Gs(e,t){return!!(null==e?0:e.length)&&-1<Ys(e,t,0)}function js(e,t,n){for(var r=-1,i=null==e?0:e.length;++r<i;)if(n(t,e[r]))return!0;return!1}function Bs(e,t){for(var n=-1,r=null==e?0:e.length,i=Array(r);++n<r;)i[n]=t(e[n],n,e);return i}function Us(e,t){for(var n=-1,r=t.length,i=e.length;++n<r;)e[i+n]=t[n];return e}function Hs(e,t,n,r){var i=-1,a=null==e?0:e.length;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function Ws(e,t,n,r){var i=null==e?0:e.length;for(r&&i&&(n=e[--i]);i--;)n=t(n,e[i],i,e);return n}function qs(e,t){for(var n=-1,r=null==e?0:e.length;++n<r;)if(t(e[n],n,e))return!0;return!1}var F=Zs("length");function zs(e,r,t){var i;return t(e,function(e,t,n){if(r(e,t,n))return i=t,!1}),i}function Vs(e,t,n,r){for(var i=e.length,a=n+(r?1:-1);r?a--:++a<i;)if(t(e[a],a,e))return a;return-1}function Ys(e,t,n){return t==t?function(e,t,n){var r=n-1,i=e.length;for(;++r<i;)if(e[r]===t)return r;return-1}(e,t,n):Vs(e,Qs,n)}function Ks(e,t,n,r){for(var i=n-1,a=e.length;++i<a;)if(r(e[i],t))return i;return-1}function Qs(e){return e!=e}function Xs(e,t){var n=null==e?0:e.length;return n?ec(e,t)/n:oo}function Zs(t){return function(e){return null==e?to:e[t]}}function G(t){return function(e){return null==t?to:t[e]}}function Js(e,r,i,a,t){return t(e,function(e,t,n){i=a?(a=!1,e):r(i,e,t,n)}),i}function ec(e,t){for(var n,r=-1,i=e.length;++r<i;){var a=t(e[r]);a!==to&&(n=n===to?a:n+a)}return n}function tc(e,t){for(var n=-1,r=Array(e);++n<e;)r[n]=t(n);return r}function nc(e){return e?e.slice(0,bc(e)+1).replace(Zo,""):e}function rc(t){return function(e){return t(e)}}function ic(t,e){return Bs(e,function(e){return t[e]})}function ac(e,t){return e.has(t)}function oc(e,t){for(var n=-1,r=e.length;++n<r&&-1<Ys(t,e[n],0););return n}function sc(e,t){for(var n=e.length;n--&&-1<Ys(t,e[n],0););return n}var cc=G({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),lc=G({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function uc(e){return"\\"+P[e]}function fc(e){return I.test(e)}function dc(e){var n=-1,r=Array(e.size);return e.forEach(function(e,t){r[++n]=[t,e]}),r}function hc(t,n){return function(e){return t(n(e))}}function pc(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n];o!==t&&o!==io||(e[n]=io,a[i++]=n)}return a}function mc(e){var t=-1,n=Array(e.size);return e.forEach(function(e){n[++t]=e}),n}function gc(e){return fc(e)?function(e){var t=D.lastIndex=0;for(;D.test(e);)++t;return t}(e):F(e)}function _c(e){return fc(e)?e.match(D)||[]:e.split("")}function bc(e){for(var t=e.length;t--&&n.test(e.charAt(t)););return t}var vc=G({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var yc=function e(t){var n,E=(t=null==t?Ts:yc.defaults(Ts.Object(),t,yc.pick(Ts,vs))).Array,r=t.Date,g=t.Error,_=t.Function,i=t.Math,S=t.Object,b=t.RegExp,u=t.String,D=t.TypeError,a=E.prototype,o=_.prototype,f=S.prototype,s=t["__core-js_shared__"],c=o.toString,T=f.hasOwnProperty,l=0,d=(n=/[^.]+$/.exec(s&&s.keys&&s.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",h=f.toString,p=c.call(S),m=Ts._,v=b("^"+c.call(T).replace(Qo,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),y=xs?t.Buffer:to,w=t.Symbol,C=t.Uint8Array,A=y?y.allocUnsafe:to,x=hc(S.getPrototypeOf,S),k=S.create,I=f.propertyIsEnumerable,P=a.splice,M=w?w.isConcatSpreadable:to,$=w?w.iterator:to,O=w?w.toStringTag:to,R=function(){try{var e=jn(S,"defineProperty");return e({},"",{}),e}catch(e){}}(),N=t.clearTimeout!==Ts.clearTimeout&&t.clearTimeout,L=r&&r.now!==Ts.Date.now&&r.now,F=t.setTimeout!==Ts.setTimeout&&t.setTimeout,G=i.ceil,j=i.floor,B=S.getOwnPropertySymbols,U=y?y.isBuffer:to,H=t.isFinite,W=a.join,q=hc(S.keys,S),z=i.max,V=i.min,Y=r.now,K=t.parseInt,Q=i.random,X=a.reverse,Z=jn(t,"DataView"),J=jn(t,"Map"),ee=jn(t,"Promise"),te=jn(t,"Set"),ne=jn(t,"WeakMap"),re=jn(S,"create"),ie=ne&&new ne,ae={},oe=pr(Z),se=pr(J),ce=pr(ee),le=pr(te),ue=pr(ne),fe=w?w.prototype:to,de=fe?fe.valueOf:to,he=fe?fe.toString:to;function pe(e){if(Pi(e)&&!yi(e)&&!(e instanceof be)){if(e instanceof _e)return e;if(T.call(e,"__wrapped__"))return mr(e)}return new _e(e)}var me=function(){function n(){}return function(e){if(!Ii(e))return{};if(k)return k(e);n.prototype=e;var t=new n;return n.prototype=to,t}}();function ge(){}function _e(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=to}function be(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=so,this.__views__=[]}function ve(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function ye(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function we(e){var t=-1,n=null==e?0:e.length;for(this.clear();++t<n;){var r=e[t];this.set(r[0],r[1])}}function Ce(e){var t=-1,n=null==e?0:e.length;for(this.__data__=new we;++t<n;)this.add(e[t])}function Ae(e){var t=this.__data__=new ye(e);this.size=t.size}function Se(e,t){var n=yi(e),r=!n&&vi(e),i=!n&&!r&&Si(e),a=!n&&!r&&!i&&Gi(e),o=n||r||i||a,s=o?tc(e.length,u):[],c=s.length;for(var l in e)!t&&!T.call(e,l)||o&&("length"==l||i&&("offset"==l||"parent"==l)||a&&("buffer"==l||"byteLength"==l||"byteOffset"==l)||Vn(l,c))||s.push(l);return s}function Te(e){var t=e.length;return t?e[Ct(0,t-1)]:to}function xe(e,t){return lr(rn(e),Re(t,0,e.length))}function ke(e){return lr(rn(e))}function Ee(e,t,n){(n===to||gi(e[t],n))&&(n!==to||t in e)||$e(e,t,n)}function De(e,t,n){var r=e[t];T.call(e,t)&&gi(r,n)&&(n!==to||t in e)||$e(e,t,n)}function Ie(e,t){for(var n=e.length;n--;)if(gi(e[n][0],t))return n;return-1}function Pe(e,r,i,a){return je(e,function(e,t,n){r(a,e,i(e),n)}),a}function Me(e,t){return e&&an(t,sa(t),e)}function $e(e,t,n){"__proto__"==t&&R?R(e,t,{configurable:!0,enumerable:!0,value:n,writable:!0}):e[t]=n}function Oe(e,t){for(var n=-1,r=t.length,i=E(r),a=null==e;++n<r;)i[n]=a?to:na(e,t[n]);return i}function Re(e,t,n){return e==e&&(n!==to&&(e=e<=n?e:n),t!==to&&(e=t<=e?e:t)),e}function Ne(n,r,i,e,t,a){var o,s=1&r,c=2&r,l=4&r;if(i&&(o=t?i(n,e,t,a):i(n)),o!==to)return o;if(!Ii(n))return n;var u,f,d,h,p,m,g,_,b,v=yi(n);if(v){if(_=(g=n).length,b=new g.constructor(_),_&&"string"==typeof g[0]&&T.call(g,"index")&&(b.index=g.index,b.input=g.input),o=b,!s)return rn(n,o)}else{var y=Hn(n),w=y==mo||y==go;if(Si(n))return Xt(n,s);if(y==vo||y==lo||w&&!t){if(o=c||w?{}:qn(n),!s)return c?(m=d=n,h=(p=o)&&an(m,ca(m),p),an(d,Un(d),h)):(f=Me(o,u=n),an(u,Bn(u),f))}else{if(!Cs[y])return t?n:{};o=function(e,t,n){var r,i,a,o,s,c=e.constructor;switch(t){case xo:return Zt(e);case fo:case ho:return new c(+e);case ko:return o=e,s=n?Zt(o.buffer):o.buffer,new o.constructor(s,o.byteOffset,o.byteLength);case Eo:case Do:case Io:case Po:case Mo:case $o:case Oo:case Ro:case No:return Jt(e,n);case _o:return new c;case bo:case Ao:return new c(e);case wo:return(a=new(i=e).constructor(i.source,os.exec(i))).lastIndex=i.lastIndex,a;case Co:return new c;case So:return r=e,de?S(de.call(r)):{}}}(n,y,s)}}a||(a=new Ae);var C=a.get(n);if(C)return C;a.set(n,o),Ni(n)?n.forEach(function(e){o.add(Ne(e,r,i,e,n,a))}):Mi(n)&&n.forEach(function(e,t){o.set(t,Ne(e,r,i,t,n,a))});var A=v?to:(l?c?$n:Mn:c?ca:sa)(n);return Rs(A||n,function(e,t){A&&(e=n[t=e]),De(o,t,Ne(e,r,i,t,n,a))}),o}function Le(e,t,n){var r=n.length;if(null==e)return!r;for(e=S(e);r--;){var i=n[r],a=t[i],o=e[i];if(o===to&&!(i in e)||!a(o))return!1}return!0}function Fe(e,t,n){if("function"!=typeof e)throw new D(no);return ar(function(){e.apply(to,n)},t)}function Ge(e,t,n,r){var i=-1,a=Gs,o=!0,s=e.length,c=[],l=t.length;if(!s)return c;n&&(t=Bs(t,rc(n))),r?(a=js,o=!1):200<=t.length&&(a=ac,o=!1,t=new Ce(t));e:for(;++i<s;){var u=e[i],f=null==n?u:n(u);if(u=r||0!==u?u:0,o&&f==f){for(var d=l;d--;)if(t[d]===f)continue e;c.push(u)}else a(t,f,r)||c.push(u)}return c}pe.templateSettings={escape:Wo,evaluate:qo,interpolate:zo,variable:"",imports:{_:pe}},(pe.prototype=ge.prototype).constructor=pe,(_e.prototype=me(ge.prototype)).constructor=_e,(be.prototype=me(ge.prototype)).constructor=be,ve.prototype.clear=function(){this.__data__=re?re(null):{},this.size=0},ve.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ve.prototype.get=function(e){var t=this.__data__;if(re){var n=t[e];return n===ro?to:n}return T.call(t,e)?t[e]:to},ve.prototype.has=function(e){var t=this.__data__;return re?t[e]!==to:T.call(t,e)},ve.prototype.set=function(e,t){var n=this.__data__;return this.size+=this.has(e)?0:1,n[e]=re&&t===to?ro:t,this},ye.prototype.clear=function(){this.__data__=[],this.size=0},ye.prototype.delete=function(e){var t=this.__data__,n=Ie(t,e);return!(n<0||(n==t.length-1?t.pop():P.call(t,n,1),--this.size,0))},ye.prototype.get=function(e){var t=this.__data__,n=Ie(t,e);return n<0?to:t[n][1]},ye.prototype.has=function(e){return-1<Ie(this.__data__,e)},ye.prototype.set=function(e,t){var n=this.__data__,r=Ie(n,e);return r<0?(++this.size,n.push([e,t])):n[r][1]=t,this},we.prototype.clear=function(){this.size=0,this.__data__={hash:new ve,map:new(J||ye),string:new ve}},we.prototype.delete=function(e){var t=Fn(this,e).delete(e);return this.size-=t?1:0,t},we.prototype.get=function(e){return Fn(this,e).get(e)},we.prototype.has=function(e){return Fn(this,e).has(e)},we.prototype.set=function(e,t){var n=Fn(this,e),r=n.size;return n.set(e,t),this.size+=n.size==r?0:1,this},Ce.prototype.add=Ce.prototype.push=function(e){return this.__data__.set(e,ro),this},Ce.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.clear=function(){this.__data__=new ye,this.size=0},Ae.prototype.delete=function(e){var t=this.__data__,n=t.delete(e);return this.size=t.size,n},Ae.prototype.get=function(e){return this.__data__.get(e)},Ae.prototype.has=function(e){return this.__data__.has(e)},Ae.prototype.set=function(e,t){var n=this.__data__;if(n instanceof ye){var r=n.__data__;if(!J||r.length<199)return r.push([e,t]),this.size=++n.size,this;n=this.__data__=new we(r)}return n.set(e,t),this.size=n.size,this};var je=cn(Ye),Be=cn(Ke,!0);function Ue(e,r){var i=!0;return je(e,function(e,t,n){return i=!!r(e,t,n)}),i}function He(e,t,n){for(var r=-1,i=e.length;++r<i;){var a=e[r],o=t(a);if(null!=o&&(s===to?o==o&&!Fi(o):n(o,s)))var s=o,c=a}return c}function We(e,r){var i=[];return je(e,function(e,t,n){r(e,t,n)&&i.push(e)}),i}function qe(e,t,n,r,i){var a=-1,o=e.length;for(n||(n=zn),i||(i=[]);++a<o;){var s=e[a];0<t&&n(s)?1<t?qe(s,t-1,n,r,i):Us(i,s):r||(i[i.length]=s)}return i}var ze=ln(),Ve=ln(!0);function Ye(e,t){return e&&ze(e,t,sa)}function Ke(e,t){return e&&Ve(e,t,sa)}function Qe(t,e){return Fs(e,function(e){return ki(t[e])})}function Xe(e,t){for(var n=0,r=(t=Vt(t,e)).length;null!=e&&n<r;)e=e[hr(t[n++])];return n&&n==r?e:to}function Ze(e,t,n){var r=t(e);return yi(e)?r:Us(r,n(e))}function Je(e){return null==e?e===to?"[object Undefined]":"[object Null]":O&&O in S(e)?function(e){var t=T.call(e,O),n=e[O];try{e[O]=to;var r=!0}catch(e){}var i=h.call(e);return r&&(t?e[O]=n:delete e[O]),i}(e):(t=e,h.call(t));var t}function et(e,t){return t<e}function tt(e,t){return null!=e&&T.call(e,t)}function nt(e,t){return null!=e&&t in S(e)}function rt(e,t,n){for(var r=n?js:Gs,i=e[0].length,a=e.length,o=a,s=E(a),c=1/0,l=[];o--;){var u=e[o];o&&t&&(u=Bs(u,rc(t))),c=V(u.length,c),s[o]=!n&&(t||120<=i&&120<=u.length)?new Ce(o&&u):to}u=e[0];var f=-1,d=s[0];e:for(;++f<i&&l.length<c;){var h=u[f],p=t?t(h):h;if(h=n||0!==h?h:0,!(d?ac(d,p):r(l,p,n))){for(o=a;--o;){var m=s[o];if(!(m?ac(m,p):r(e[o],p,n)))continue e}d&&d.push(p),l.push(h)}}return l}function it(e,t,n){var r=null==(e=nr(e,t=Vt(t,e)))?e:e[hr(xr(t))];return null==r?to:$s(r,e,n)}function at(e){return Pi(e)&&Je(e)==lo}function ot(e,t,n,r,i){return e===t||(null==e||null==t||!Pi(e)&&!Pi(t)?e!=e&&t!=t:function(e,t,n,r,i,a){var o=yi(e),s=yi(t),c=o?uo:Hn(e),l=s?uo:Hn(t),u=(c=c==lo?vo:c)==vo,f=(l=l==lo?vo:l)==vo,d=c==l;if(d&&Si(e)){if(!Si(t))return!1;u=!(o=!0)}if(d&&!u)return a||(a=new Ae),o||Gi(e)?In(e,t,n,r,i,a):function(e,t,n,r,i,a,o){switch(n){case ko:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case xo:return!(e.byteLength!=t.byteLength||!a(new C(e),new C(t)));case fo:case ho:case bo:return gi(+e,+t);case po:return e.name==t.name&&e.message==t.message;case wo:case Ao:return e==t+"";case _o:var s=dc;case Co:var c=1&r;if(s||(s=mc),e.size!=t.size&&!c)return!1;var l=o.get(e);if(l)return l==t;r|=2,o.set(e,t);var u=In(s(e),s(t),r,i,a,o);return o.delete(e),u;case So:if(de)return de.call(e)==de.call(t)}return!1}(e,t,c,n,r,i,a);if(!(1&n)){var h=u&&T.call(e,"__wrapped__"),p=f&&T.call(t,"__wrapped__");if(h||p){var m=h?e.value():e,g=p?t.value():t;return a||(a=new Ae),i(m,g,n,r,a)}}return!!d&&(a||(a=new Ae),function(e,t,n,r,i,a){var o=1&n,s=Mn(e),c=s.length,l=Mn(t).length;if(c!=l&&!o)return!1;for(var u=c;u--;){var f=s[u];if(!(o?f in t:T.call(t,f)))return!1}var d=a.get(e),h=a.get(t);if(d&&h)return d==t&&h==e;var p=!0;a.set(e,t),a.set(t,e);for(var m=o;++u<c;){f=s[u];var g=e[f],_=t[f];if(r)var b=o?r(_,g,f,t,e,a):r(g,_,f,e,t,a);if(!(b===to?g===_||i(g,_,n,r,a):b)){p=!1;break}m||(m="constructor"==f)}if(p&&!m){var v=e.constructor,y=t.constructor;v!=y&&"constructor"in e&&"constructor"in t&&!("function"==typeof v&&v instanceof v&&"function"==typeof y&&y instanceof y)&&(p=!1)}return a.delete(e),a.delete(t),p}(e,t,n,r,i,a))}(e,t,n,r,ot,i))}function st(e,t,n,r){var i=n.length,a=i,o=!r;if(null==e)return!a;for(e=S(e);i--;){var s=n[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){var c=(s=n[i])[0],l=e[c],u=s[1];if(o&&s[2]){if(l===to&&!(c in e))return!1}else{var f=new Ae;if(r)var d=r(l,u,c,e,t,f);if(!(d===to?ot(u,l,3,r,f):d))return!1}}return!0}function ct(e){return!(!Ii(e)||(t=e,d&&d in t))&&(ki(e)?v:ls).test(pr(e));var t}function lt(e){return"function"==typeof e?e:null==e?$a:"object"==typeof e?yi(e)?mt(e[0],e[1]):pt(e):Ua(e)}function ut(e){if(!Zn(e))return q(e);var t=[];for(var n in S(e))T.call(e,n)&&"constructor"!=n&&t.push(n);return t}function ft(e){if(!Ii(e))return function(e){var t=[];if(null!=e)for(var n in S(e))t.push(n);return t}(e);var t=Zn(e),n=[];for(var r in e)("constructor"!=r||!t&&T.call(e,r))&&n.push(r);return n}function dt(e,t){return e<t}function ht(e,r){var i=-1,a=Ci(e)?E(e.length):[];return je(e,function(e,t,n){a[++i]=r(e,t,n)}),a}function pt(t){var n=Gn(t);return 1==n.length&&n[0][2]?er(n[0][0],n[0][1]):function(e){return e===t||st(e,t,n)}}function mt(n,r){return Kn(n)&&Jn(r)?er(hr(n),r):function(e){var t=na(e,n);return t===to&&t===r?ra(e,n):ot(r,t,3)}}function gt(r,i,a,o,s){r!==i&&ze(i,function(e,t){if(s||(s=new Ae),Ii(e))!function(e,t,n,r,i,a,o){var s=rr(e,n),c=rr(t,n),l=o.get(c);if(l)return Ee(e,n,l);var u=a?a(s,c,n+"",e,t,o):to,f=u===to;if(f){var d=yi(c),h=!d&&Si(c),p=!d&&!h&&Gi(c);u=c,d||h||p?u=yi(s)?s:Ai(s)?rn(s):h?Xt(c,!(f=!1)):p?Jt(c,!(f=!1)):[]:Oi(c)||vi(c)?vi(u=s)?u=Vi(s):Ii(s)&&!ki(s)||(u=qn(c)):f=!1}f&&(o.set(c,u),i(u,c,r,a,o),o.delete(c)),Ee(e,n,u)}(r,i,t,a,gt,o,s);else{var n=o?o(rr(r,t),e,t+"",r,i,s):to;n===to&&(n=e),Ee(r,t,n)}},ca)}function _t(e,t){var n=e.length;if(n)return Vn(t+=t<0?n:0,n)?e[t]:to}function bt(e,r,n){r=r.length?Bs(r,function(t){return yi(t)?function(e){return Xe(e,1===t.length?t[0]:t)}:t}):[$a];var i=-1;return r=Bs(r,rc(Ln())),function(e,t){var n=e.length;for(e.sort(t);n--;)e[n]=e[n].value;return e}(ht(e,function(t,e,n){return{criteria:Bs(r,function(e){return e(t)}),index:++i,value:t}}),function(e,t){return function(e,t,n){for(var r=-1,i=e.criteria,a=t.criteria,o=i.length,s=n.length;++r<o;){var c=en(i[r],a[r]);if(c){if(s<=r)return c;var l=n[r];return c*("desc"==l?-1:1)}}return e.index-t.index}(e,t,n)})}function vt(e,t,n){for(var r=-1,i=t.length,a={};++r<i;){var o=t[r],s=Xe(e,o);n(s,o)&&kt(a,Vt(o,e),s)}return a}function yt(e,t,n,r){var i=r?Ks:Ys,a=-1,o=t.length,s=e;for(e===t&&(t=rn(t)),n&&(s=Bs(e,rc(n)));++a<o;)for(var c=0,l=t[a],u=n?n(l):l;-1<(c=i(s,u,c,r));)s!==e&&P.call(s,c,1),P.call(e,c,1);return e}function wt(e,t){for(var n=e?t.length:0,r=n-1;n--;){var i=t[n];if(n==r||i!==a){var a=i;Vn(i)?P.call(e,i,1):Gt(e,i)}}return e}function Ct(e,t){return e+j(Q()*(t-e+1))}function At(e,t){var n="";if(!e||t<1||ao<t)return n;for(;t%2&&(n+=e),(t=j(t/2))&&(e+=e),t;);return n}function St(e,t){return or(tr(e,t,$a),e+"")}function Tt(e){return Te(ga(e))}function xt(e,t){var n=ga(e);return lr(n,Re(t,0,n.length))}function kt(e,t,n,r){if(!Ii(e))return e;for(var i=-1,a=(t=Vt(t,e)).length,o=a-1,s=e;null!=s&&++i<a;){var c=hr(t[i]),l=n;if("__proto__"===c||"constructor"===c||"prototype"===c)return e;if(i!=o){var u=s[c];(l=r?r(u,c,s):to)===to&&(l=Ii(u)?u:Vn(t[i+1])?[]:{})}De(s,c,l),s=s[c]}return e}var Et=ie?function(e,t){return ie.set(e,t),e}:$a,Dt=R?function(e,t){return R(e,"toString",{configurable:!0,enumerable:!1,value:Ia(t),writable:!0})}:$a;function It(e){return lr(ga(e))}function Pt(e,t,n){var r=-1,i=e.length;t<0&&(t=i<-t?0:i+t),(n=i<n?i:n)<0&&(n+=i),i=n<t?0:n-t>>>0,t>>>=0;for(var a=E(i);++r<i;)a[r]=e[r+t];return a}function Mt(e,r){var i;return je(e,function(e,t,n){return!(i=r(e,t,n))}),!!i}function $t(e,t,n){var r=0,i=null==e?r:e.length;if("number"==typeof t&&t==t&&i<=2147483647){for(;r<i;){var a=r+i>>>1,o=e[a];null!==o&&!Fi(o)&&(n?o<=t:o<t)?r=a+1:i=a}return i}return Ot(e,t,$a,n)}function Ot(e,t,n,r){var i=0,a=null==e?0:e.length;if(0===a)return 0;for(var o=(t=n(t))!=t,s=null===t,c=Fi(t),l=t===to;i<a;){var u=j((i+a)/2),f=n(e[u]),d=f!==to,h=null===f,p=f==f,m=Fi(f);if(o)var g=r||p;else g=l?p&&(r||d):s?p&&d&&(r||!h):c?p&&d&&!h&&(r||!m):!h&&!m&&(r?f<=t:f<t);g?i=u+1:a=u}return V(a,4294967294)}function Rt(e,t){for(var n=-1,r=e.length,i=0,a=[];++n<r;){var o=e[n],s=t?t(o):o;if(!n||!gi(s,c)){var c=s;a[i++]=0===o?0:o}}return a}function Nt(e){return"number"==typeof e?e:Fi(e)?oo:+e}function Lt(e){if("string"==typeof e)return e;if(yi(e))return Bs(e,Lt)+"";if(Fi(e))return he?he.call(e):"";var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function Ft(e,t,n){var r=-1,i=Gs,a=e.length,o=!0,s=[],c=s;if(n)o=!1,i=js;else if(200<=a){var l=t?null:Sn(e);if(l)return mc(l);o=!1,i=ac,c=new Ce}else c=t?[]:s;e:for(;++r<a;){var u=e[r],f=t?t(u):u;if(u=n||0!==u?u:0,o&&f==f){for(var d=c.length;d--;)if(c[d]===f)continue e;t&&c.push(f),s.push(u)}else i(c,f,n)||(c!==s&&c.push(f),s.push(u))}return s}function Gt(e,t){return null==(e=nr(e,t=Vt(t,e)))||delete e[hr(xr(t))]}function jt(e,t,n,r){return kt(e,t,n(Xe(e,t)),r)}function Bt(e,t,n,r){for(var i=e.length,a=r?i:-1;(r?a--:++a<i)&&t(e[a],a,e););return n?Pt(e,r?0:a,r?a+1:i):Pt(e,r?a+1:0,r?i:a)}function Ut(e,t){var n=e;return n instanceof be&&(n=n.value()),Hs(t,function(e,t){return t.func.apply(t.thisArg,Us([e],t.args))},n)}function Ht(e,t,n){var r=e.length;if(r<2)return r?Ft(e[0]):[];for(var i=-1,a=E(r);++i<r;)for(var o=e[i],s=-1;++s<r;)s!=i&&(a[i]=Ge(a[i]||o,e[s],t,n));return Ft(qe(a,1),t,n)}function Wt(e,t,n){for(var r=-1,i=e.length,a=t.length,o={};++r<i;){var s=r<a?t[r]:to;n(o,e[r],s)}return o}function qt(e){return Ai(e)?e:[]}function zt(e){return"function"==typeof e?e:$a}function Vt(e,t){return yi(e)?e:Kn(e,t)?[e]:dr(Yi(e))}var Yt=St;function Kt(e,t,n){var r=e.length;return n=n===to?r:n,!t&&r<=n?e:Pt(e,t,n)}var Qt=N||function(e){return Ts.clearTimeout(e)};function Xt(e,t){if(t)return e.slice();var n=e.length,r=A?A(n):new e.constructor(n);return e.copy(r),r}function Zt(e){var t=new e.constructor(e.byteLength);return new C(t).set(new C(e)),t}function Jt(e,t){var n=t?Zt(e.buffer):e.buffer;return new e.constructor(n,e.byteOffset,e.length)}function en(e,t){if(e!==t){var n=e!==to,r=null===e,i=e==e,a=Fi(e),o=t!==to,s=null===t,c=t==t,l=Fi(t);if(!s&&!l&&!a&&t<e||a&&o&&c&&!s&&!l||r&&o&&c||!n&&c||!i)return 1;if(!r&&!a&&!l&&e<t||l&&n&&i&&!r&&!a||s&&n&&i||!o&&i||!c)return-1}return 0}function tn(e,t,n,r){for(var i=-1,a=e.length,o=n.length,s=-1,c=t.length,l=z(a-o,0),u=E(c+l),f=!r;++s<c;)u[s]=t[s];for(;++i<o;)(f||i<a)&&(u[n[i]]=e[i]);for(;l--;)u[s++]=e[i++];return u}function nn(e,t,n,r){for(var i=-1,a=e.length,o=-1,s=n.length,c=-1,l=t.length,u=z(a-s,0),f=E(u+l),d=!r;++i<u;)f[i]=e[i];for(var h=i;++c<l;)f[h+c]=t[c];for(;++o<s;)(d||i<a)&&(f[h+n[o]]=e[i++]);return f}function rn(e,t){var n=-1,r=e.length;for(t||(t=E(r));++n<r;)t[n]=e[n];return t}function an(e,t,n,r){var i=!n;n||(n={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=r?r(n[s],e[s],s,n,e):to;c===to&&(c=e[s]),i?$e(n,s,c):De(n,s,c)}return n}function on(i,a){return function(e,t){var n=yi(e)?Os:Pe,r=a?a():{};return n(e,i,Ln(t,2),r)}}function sn(s){return St(function(e,t){var n=-1,r=t.length,i=1<r?t[r-1]:to,a=2<r?t[2]:to;for(i=3<s.length&&"function"==typeof i?(r--,i):to,a&&Yn(t[0],t[1],a)&&(i=r<3?to:i,r=1),e=S(e);++n<r;){var o=t[n];o&&s(e,o,n,i)}return e})}function cn(a,o){return function(e,t){if(null==e)return e;if(!Ci(e))return a(e,t);for(var n=e.length,r=o?n:-1,i=S(e);(o?r--:++r<n)&&!1!==t(i[r],r,i););return e}}function ln(c){return function(e,t,n){for(var r=-1,i=S(e),a=n(e),o=a.length;o--;){var s=a[c?o:++r];if(!1===t(i[s],s,i))break}return e}}function un(i){return function(e){var t=fc(e=Yi(e))?_c(e):to,n=t?t[0]:e.charAt(0),r=t?Kt(t,1).join(""):e.slice(1);return n[i]()+r}}function fn(t){return function(e){return Hs(ka(va(e).replace(ms,"")),t,"")}}function dn(r){return function(){var e=arguments;switch(e.length){case 0:return new r;case 1:return new r(e[0]);case 2:return new r(e[0],e[1]);case 3:return new r(e[0],e[1],e[2]);case 4:return new r(e[0],e[1],e[2],e[3]);case 5:return new r(e[0],e[1],e[2],e[3],e[4]);case 6:return new r(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new r(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var t=me(r.prototype),n=r.apply(t,e);return Ii(n)?n:t}}function hn(o){return function(e,t,n){var r=S(e);if(!Ci(e)){var i=Ln(t,3);e=sa(e),t=function(e){return i(r[e],e,r)}}var a=o(e,t,n);return-1<a?r[i?e[a]:a]:to}}function pn(c){return Pn(function(i){var a=i.length,e=a,t=_e.prototype.thru;for(c&&i.reverse();e--;){var n=i[e];if("function"!=typeof n)throw new D(no);if(t&&!o&&"wrapper"==Rn(n))var o=new _e([],!0)}for(e=o?e:a;++e<a;){var r=Rn(n=i[e]),s="wrapper"==r?On(n):to;o=s&&Qn(s[0])&&424==s[1]&&!s[4].length&&1==s[9]?o[Rn(s[0])].apply(o,s[3]):1==n.length&&Qn(n)?o[r]():o.thru(n)}return function(){var e=arguments,t=e[0];if(o&&1==e.length&&yi(t))return o.plant(t).value();for(var n=0,r=a?i[n].apply(this,e):t;++n<a;)r=i[n].call(this,r);return r}})}function mn(l,u,f,d,h,p,m,g,_,b){var v=128&u,y=1&u,w=2&u,C=24&u,A=512&u,S=w?to:dn(l);return function e(){for(var t=arguments.length,n=E(t),r=t;r--;)n[r]=arguments[r];if(C)var i=Nn(e),a=function(e,t){for(var n=e.length,r=0;n--;)e[n]===t&&++r;return r}(n,i);if(d&&(n=tn(n,d,h,C)),p&&(n=nn(n,p,m,C)),t-=a,C&&t<b){var o=pc(n,i);return Cn(l,u,mn,e.placeholder,f,n,o,g,_,b-t)}var s=y?f:this,c=w?s[l]:l;return t=n.length,g?n=function(e,t){for(var n=e.length,r=V(t.length,n),i=rn(e);r--;){var a=t[r];e[r]=Vn(a,n)?i[a]:to}return e}(n,g):A&&1<t&&n.reverse(),v&&_<t&&(n.length=_),this&&this!==Ts&&this instanceof e&&(c=S||dn(c)),c.apply(s,n)}}function gn(o,s){return function(e,t){return n=e,r=o,i=s(t),a={},Ye(n,function(e,t,n){r(a,i(e),t,n)}),a;var n,r,i,a}}function _n(r,i){return function(e,t){var n;if(e===to&&t===to)return i;if(e!==to&&(n=e),t!==to){if(n===to)return t;t="string"==typeof e||"string"==typeof t?(e=Lt(e),Lt(t)):(e=Nt(e),Nt(t)),n=r(e,t)}return n}}function bn(r){return Pn(function(e){return e=Bs(e,rc(Ln())),St(function(t){var n=this;return r(e,function(e){return $s(e,n,t)})})})}function vn(e,t){var n=(t=t===to?" ":Lt(t)).length;if(n<2)return n?At(t,e):t;var r=At(t,G(e/gc(t)));return fc(t)?Kt(_c(r),0,e).join(""):r.slice(0,e)}function yn(r){return function(e,t,n){return n&&"number"!=typeof n&&Yn(e,t,n)&&(t=n=to),e=Hi(e),t===to?(t=e,e=0):t=Hi(t),function(e,t,n,r){for(var i=-1,a=z(G((t-e)/(n||1)),0),o=E(a);a--;)o[r?a:++i]=e,e+=n;return o}(e,t,n=n===to?e<t?1:-1:Hi(n),r)}}function wn(n){return function(e,t){return"string"==typeof e&&"string"==typeof t||(e=zi(e),t=zi(t)),n(e,t)}}function Cn(e,t,n,r,i,a,o,s,c,l){var u=8&t;t|=u?32:64,4&(t&=~(u?64:32))||(t&=-4);var f=[e,t,i,u?a:to,u?o:to,u?to:a,u?to:o,s,c,l],d=n.apply(to,f);return Qn(e)&&ir(d,f),d.placeholder=r,sr(d,e,t)}function An(e){var r=i[e];return function(e,t){if(e=zi(e),(t=null==t?0:V(Wi(t),292))&&H(e)){var n=(Yi(e)+"e").split("e");return+((n=(Yi(r(n[0]+"e"+(+n[1]+t)))+"e").split("e"))[0]+"e"+(+n[1]-t))}return r(e)}}var Sn=te&&1/mc(new te([,-0]))[1]==1/0?function(e){return new te(e)}:Fa;function Tn(o){return function(e){var t,n,r,i,a=Hn(e);return a==_o?dc(e):a==Co?(t=e,n=-1,r=Array(t.size),t.forEach(function(e){r[++n]=[e,e]}),r):Bs(o(i=e),function(e){return[e,i[e]]})}}function xn(e,t,n,r,i,a,o,s){var c=2&t;if(!c&&"function"!=typeof e)throw new D(no);var l=r?r.length:0;if(l||(t&=-97,r=i=to),o=o===to?o:z(Wi(o),0),s=s===to?s:Wi(s),l-=i?i.length:0,64&t){var u=r,f=i;r=i=to}var d,h,p,m,g,_,b,v,y,w,C,A,S,T=c?to:On(e),x=[e,t,n,r,i,u,f,a,o,s];if(T&&function(e,t){var n=e[1],r=t[1],i=n|r,a=i<131,o=128==r&&8==n||128==r&&256==n&&e[7].length<=t[8]||384==r&&t[7].length<=t[8]&&8==n;if(a||o){1&r&&(e[2]=t[2],i|=1&n?0:4);var s=t[3];if(s){var c=e[3];e[3]=c?tn(c,s,t[4]):s,e[4]=c?pc(e[3],io):t[4]}(s=t[5])&&(c=e[5],e[5]=c?nn(c,s,t[6]):s,e[6]=c?pc(e[5],io):t[6]),(s=t[7])&&(e[7]=s),128&r&&(e[8]=null==e[8]?t[8]:V(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=i}}(x,T),e=x[0],t=x[1],n=x[2],r=x[3],i=x[4],!(s=x[9]=x[9]===to?c?0:e.length:z(x[9]-l,0))&&24&t&&(t&=-25),t&&1!=t)k=8==t||16==t?(b=t,v=s,y=dn(_=e),function e(){for(var t=arguments.length,n=E(t),r=t,i=Nn(e);r--;)n[r]=arguments[r];var a=t<3&&n[0]!==i&&n[t-1]!==i?[]:pc(n,i);return(t-=a.length)<v?Cn(_,b,mn,e.placeholder,to,n,a,to,to,v-t):$s(this&&this!==Ts&&this instanceof e?y:_,this,n)}):32!=t&&33!=t||i.length?mn.apply(to,x):(h=n,p=r,m=1&t,g=dn(d=e),function e(){for(var t=-1,n=arguments.length,r=-1,i=p.length,a=E(i+n),o=this&&this!==Ts&&this instanceof e?g:d;++r<i;)a[r]=p[r];for(;n--;)a[r++]=arguments[++t];return $s(o,m?h:this,a)});else var k=(C=n,A=1&t,S=dn(w=e),function e(){return(this&&this!==Ts&&this instanceof e?S:w).apply(A?C:this,arguments)});return sr((T?Et:ir)(k,x),e,t)}function kn(e,t,n,r){return e===to||gi(e,f[n])&&!T.call(r,n)?t:e}function En(e,t,n,r,i,a){return Ii(e)&&Ii(t)&&(a.set(t,e),gt(e,t,to,En,a),a.delete(t)),e}function Dn(e){return Oi(e)?to:e}function In(e,t,n,r,i,a){var o=1&n,s=e.length,c=t.length;if(s!=c&&!(o&&s<c))return!1;var l=a.get(e),u=a.get(t);if(l&&u)return l==t&&u==e;var f=-1,d=!0,h=2&n?new Ce:to;for(a.set(e,t),a.set(t,e);++f<s;){var p=e[f],m=t[f];if(r)var g=o?r(m,p,f,t,e,a):r(p,m,f,e,t,a);if(g!==to){if(g)continue;d=!1;break}if(h){if(!qs(t,function(e,t){if(!ac(h,t)&&(p===e||i(p,e,n,r,a)))return h.push(t)})){d=!1;break}}else if(p!==m&&!i(p,m,n,r,a)){d=!1;break}}return a.delete(e),a.delete(t),d}function Pn(e){return or(tr(e,to,wr),e+"")}function Mn(e){return Ze(e,sa,Bn)}function $n(e){return Ze(e,ca,Un)}var On=ie?function(e){return ie.get(e)}:Fa;function Rn(e){for(var t=e.name+"",n=ae[t],r=T.call(ae,t)?n.length:0;r--;){var i=n[r],a=i.func;if(null==a||a==e)return i.name}return t}function Nn(e){return(T.call(pe,"placeholder")?pe:e).placeholder}function Ln(){var e=pe.iteratee||Oa;return e=e===Oa?lt:e,arguments.length?e(arguments[0],arguments[1]):e}function Fn(e,t){var n,r,i=e.__data__;return("string"==(r=typeof(n=t))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?i["string"==typeof t?"string":"hash"]:i.map}function Gn(e){for(var t=sa(e),n=t.length;n--;){var r=t[n],i=e[r];t[n]=[r,i,Jn(i)]}return t}function jn(e,t){var n,r,i=(r=t,null==(n=e)?to:n[r]);return ct(i)?i:to}var Bn=B?function(t){return null==t?[]:(t=S(t),Fs(B(t),function(e){return I.call(t,e)}))}:qa,Un=B?function(e){for(var t=[];e;)Us(t,Bn(e)),e=x(e);return t}:qa,Hn=Je;function Wn(e,t,n){for(var r=-1,i=(t=Vt(t,e)).length,a=!1;++r<i;){var o=hr(t[r]);if(!(a=null!=e&&n(e,o)))break;e=e[o]}return a||++r!=i?a:!!(i=null==e?0:e.length)&&Di(i)&&Vn(o,i)&&(yi(e)||vi(e))}function qn(e){return"function"!=typeof e.constructor||Zn(e)?{}:me(x(e))}function zn(e){return yi(e)||vi(e)||!!(M&&e&&e[M])}function Vn(e,t){var n=typeof e;return!!(t=null==t?ao:t)&&("number"==n||"symbol"!=n&&fs.test(e))&&-1<e&&e%1==0&&e<t}function Yn(e,t,n){if(!Ii(n))return!1;var r=typeof t;return!!("number"==r?Ci(n)&&Vn(t,n.length):"string"==r&&t in n)&&gi(n[t],e)}function Kn(e,t){if(yi(e))return!1;var n=typeof e;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=e&&!Fi(e))||Yo.test(e)||!Vo.test(e)||null!=t&&e in S(t)}function Qn(e){var t=Rn(e),n=pe[t];if("function"!=typeof n||!(t in be.prototype))return!1;if(e===n)return!0;var r=On(n);return!!r&&e===r[0]}(Z&&Hn(new Z(new ArrayBuffer(1)))!=ko||J&&Hn(new J)!=_o||ee&&Hn(ee.resolve())!=yo||te&&Hn(new te)!=Co||ne&&Hn(new ne)!=To)&&(Hn=function(e){var t=Je(e),n=t==vo?e.constructor:to,r=n?pr(n):"";if(r)switch(r){case oe:return ko;case se:return _o;case ce:return yo;case le:return Co;case ue:return To}return t});var Xn=s?ki:za;function Zn(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||f)}function Jn(e){return e==e&&!Ii(e)}function er(t,n){return function(e){return null!=e&&e[t]===n&&(n!==to||t in S(e))}}function tr(a,o,s){return o=z(o===to?a.length-1:o,0),function(){for(var e=arguments,t=-1,n=z(e.length-o,0),r=E(n);++t<n;)r[t]=e[o+t];t=-1;for(var i=E(o+1);++t<o;)i[t]=e[t];return i[o]=s(r),$s(a,this,i)}}function nr(e,t){return t.length<2?e:Xe(e,Pt(t,0,-1))}function rr(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var ir=cr(Et),ar=F||function(e,t){return Ts.setTimeout(e,t)},or=cr(Dt);function sr(e,t,n){var r,i,a,o=t+"";return or(e,function(e,t){var n=t.length;if(!n)return e;var r=n-1;return t[r]=(1<n?"& ":"")+t[r],t=t.join(2<n?", ":" "),e.replace(Jo,"{\n/* [wrapped with "+t+"] */\n")}(o,(a=o.match(es),r=a?a[1].split(ts):[],i=n,Rs(co,function(e){var t="_."+e[0];i&e[1]&&!Gs(r,t)&&r.push(t)}),r.sort())))}function cr(n){var r=0,i=0;return function(){var e=Y(),t=16-(e-i);if(i=e,0<t){if(800<=++r)return arguments[0]}else r=0;return n.apply(to,arguments)}}function lr(e,t){var n=-1,r=e.length,i=r-1;for(t=t===to?r:t;++n<t;){var a=Ct(n,i),o=e[a];e[a]=e[n],e[n]=o}return e.length=t,e}var ur,fr,dr=(fr=(ur=ui(function(e){var i=[];return 46===e.charCodeAt(0)&&i.push(""),e.replace(Ko,function(e,t,n,r){i.push(n?r.replace(is,"$1"):t||e)}),i},function(e){return 500===fr.size&&fr.clear(),e})).cache,ur);function hr(e){if("string"==typeof e||Fi(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}function pr(e){if(null!=e){try{return c.call(e)}catch(e){}try{return e+""}catch(e){}}return""}function mr(e){if(e instanceof be)return e.clone();var t=new _e(e.__wrapped__,e.__chain__);return t.__actions__=rn(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}var gr=St(function(e,t){return Ai(e)?Ge(e,qe(t,1,Ai,!0)):[]}),_r=St(function(e,t){var n=xr(t);return Ai(n)&&(n=to),Ai(e)?Ge(e,qe(t,1,Ai,!0),Ln(n,2)):[]}),br=St(function(e,t){var n=xr(t);return Ai(n)&&(n=to),Ai(e)?Ge(e,qe(t,1,Ai,!0),to,n):[]});function vr(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Wi(n);return i<0&&(i=z(r+i,0)),Vs(e,Ln(t,3),i)}function yr(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r-1;return n!==to&&(i=Wi(n),i=n<0?z(r+i,0):V(i,r-1)),Vs(e,Ln(t,3),i,!0)}function wr(e){return null!=e&&e.length?qe(e,1):[]}function Cr(e){return e&&e.length?e[0]:to}var Ar=St(function(e){var t=Bs(e,qt);return t.length&&t[0]===e[0]?rt(t):[]}),Sr=St(function(e){var t=xr(e),n=Bs(e,qt);return t===xr(n)?t=to:n.pop(),n.length&&n[0]===e[0]?rt(n,Ln(t,2)):[]}),Tr=St(function(e){var t=xr(e),n=Bs(e,qt);return(t="function"==typeof t?t:to)&&n.pop(),n.length&&n[0]===e[0]?rt(n,to,t):[]});function xr(e){var t=null==e?0:e.length;return t?e[t-1]:to}var kr=St(Er);function Er(e,t){return e&&e.length&&t&&t.length?yt(e,t):e}var Dr=Pn(function(e,t){var n=null==e?0:e.length,r=Oe(e,t);return wt(e,Bs(t,function(e){return Vn(e,n)?+e:e}).sort(en)),r});function Ir(e){return null==e?e:X.call(e)}var Pr=St(function(e){return Ft(qe(e,1,Ai,!0))}),Mr=St(function(e){var t=xr(e);return Ai(t)&&(t=to),Ft(qe(e,1,Ai,!0),Ln(t,2))}),$r=St(function(e){var t=xr(e);return t="function"==typeof t?t:to,Ft(qe(e,1,Ai,!0),to,t)});function Or(t){if(!t||!t.length)return[];var n=0;return t=Fs(t,function(e){if(Ai(e))return n=z(e.length,n),!0}),tc(n,function(e){return Bs(t,Zs(e))})}function Rr(e,t){if(!e||!e.length)return[];var n=Or(e);return null==t?n:Bs(n,function(e){return $s(t,to,e)})}var Nr=St(function(e,t){return Ai(e)?Ge(e,t):[]}),Lr=St(function(e){return Ht(Fs(e,Ai))}),Fr=St(function(e){var t=xr(e);return Ai(t)&&(t=to),Ht(Fs(e,Ai),Ln(t,2))}),Gr=St(function(e){var t=xr(e);return t="function"==typeof t?t:to,Ht(Fs(e,Ai),to,t)}),jr=St(Or);var Br=St(function(e){var t=e.length,n=1<t?e[t-1]:to;return n="function"==typeof n?(e.pop(),n):to,Rr(e,n)});function Ur(e){var t=pe(e);return t.__chain__=!0,t}function Hr(e,t){return t(e)}var Wr=Pn(function(t){var n=t.length,e=n?t[0]:0,r=this.__wrapped__,i=function(e){return Oe(e,t)};return!(1<n||this.__actions__.length)&&r instanceof be&&Vn(e)?((r=r.slice(e,+e+(n?1:0))).__actions__.push({func:Hr,args:[i],thisArg:to}),new _e(r,this.__chain__).thru(function(e){return n&&!e.length&&e.push(to),e})):this.thru(i)});var qr=on(function(e,t,n){T.call(e,n)?++e[n]:$e(e,n,1)});var zr=hn(vr),Vr=hn(yr);function Yr(e,t){return(yi(e)?Rs:je)(e,Ln(t,3))}function Kr(e,t){return(yi(e)?Ns:Be)(e,Ln(t,3))}var Qr=on(function(e,t,n){T.call(e,n)?e[n].push(t):$e(e,n,[t])});var Xr=St(function(e,t,n){var r=-1,i="function"==typeof t,a=Ci(e)?E(e.length):[];return je(e,function(e){a[++r]=i?$s(t,e,n):it(e,t,n)}),a}),Zr=on(function(e,t,n){$e(e,n,t)});function Jr(e,t){return(yi(e)?Bs:ht)(e,Ln(t,3))}var ei=on(function(e,t,n){e[n?0:1].push(t)},function(){return[[],[]]});var ti=St(function(e,t){if(null==e)return[];var n=t.length;return 1<n&&Yn(e,t[0],t[1])?t=[]:2<n&&Yn(t[0],t[1],t[2])&&(t=[t[0]]),bt(e,qe(t,1),[])}),ni=L||function(){return Ts.Date.now()};function ri(e,t,n){return t=n?to:t,t=e&&null==t?e.length:t,xn(e,128,to,to,to,to,t)}function ii(e,t){var n;if("function"!=typeof t)throw new D(no);return e=Wi(e),function(){return 0<--e&&(n=t.apply(this,arguments)),e<=1&&(t=to),n}}var ai=St(function(e,t,n){var r=1;if(n.length){var i=pc(n,Nn(ai));r|=32}return xn(e,r,t,n,i)}),oi=St(function(e,t,n){var r=3;if(n.length){var i=pc(n,Nn(oi));r|=32}return xn(t,r,e,n,i)});function si(r,i,e){var a,o,s,c,l,u,f=0,d=!1,h=!1,t=!0;if("function"!=typeof r)throw new D(no);function p(e){var t=a,n=o;return a=o=to,f=e,c=r.apply(n,t)}function m(e){var t=e-u;return u===to||i<=t||t<0||h&&s<=e-f}function g(){var e,t,n=ni();if(m(n))return _(n);l=ar(g,(t=i-((e=n)-u),h?V(t,s-(e-f)):t))}function _(e){return l=to,t&&a?p(e):(a=o=to,c)}function n(){var e,t=ni(),n=m(t);if(a=arguments,o=this,u=t,n){if(l===to)return f=e=u,l=ar(g,i),d?p(e):c;if(h)return Qt(l),l=ar(g,i),p(u)}return l===to&&(l=ar(g,i)),c}return i=zi(i)||0,Ii(e)&&(d=!!e.leading,s=(h="maxWait"in e)?z(zi(e.maxWait)||0,i):s,t="trailing"in e?!!e.trailing:t),n.cancel=function(){l!==to&&Qt(l),f=0,a=u=o=l=to},n.flush=function(){return l===to?c:_(ni())},n}var ci=St(function(e,t){return Fe(e,1,t)}),li=St(function(e,t,n){return Fe(e,zi(t)||0,n)});function ui(i,a){if("function"!=typeof i||null!=a&&"function"!=typeof a)throw new D(no);var o=function(){var e=arguments,t=a?a.apply(this,e):e[0],n=o.cache;if(n.has(t))return n.get(t);var r=i.apply(this,e);return o.cache=n.set(t,r)||n,r};return o.cache=new(ui.Cache||we),o}function fi(t){if("function"!=typeof t)throw new D(no);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}ui.Cache=we;var di=Yt(function(r,i){var a=(i=1==i.length&&yi(i[0])?Bs(i[0],rc(Ln())):Bs(qe(i,1),rc(Ln()))).length;return St(function(e){for(var t=-1,n=V(e.length,a);++t<n;)e[t]=i[t].call(this,e[t]);return $s(r,this,e)})}),hi=St(function(e,t){var n=pc(t,Nn(hi));return xn(e,32,to,t,n)}),pi=St(function(e,t){var n=pc(t,Nn(pi));return xn(e,64,to,t,n)}),mi=Pn(function(e,t){return xn(e,256,to,to,to,t)});function gi(e,t){return e===t||e!=e&&t!=t}var _i=wn(et),bi=wn(function(e,t){return t<=e}),vi=at(function(){return arguments}())?at:function(e){return Pi(e)&&T.call(e,"callee")&&!I.call(e,"callee")},yi=E.isArray,wi=ks?rc(ks):function(e){return Pi(e)&&Je(e)==xo};function Ci(e){return null!=e&&Di(e.length)&&!ki(e)}function Ai(e){return Pi(e)&&Ci(e)}var Si=U||za,Ti=Es?rc(Es):function(e){return Pi(e)&&Je(e)==ho};function xi(e){if(!Pi(e))return!1;var t=Je(e);return t==po||"[object DOMException]"==t||"string"==typeof e.message&&"string"==typeof e.name&&!Oi(e)}function ki(e){if(!Ii(e))return!1;var t=Je(e);return t==mo||t==go||"[object AsyncFunction]"==t||"[object Proxy]"==t}function Ei(e){return"number"==typeof e&&e==Wi(e)}function Di(e){return"number"==typeof e&&-1<e&&e%1==0&&e<=ao}function Ii(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Pi(e){return null!=e&&"object"==typeof e}var Mi=Ds?rc(Ds):function(e){return Pi(e)&&Hn(e)==_o};function $i(e){return"number"==typeof e||Pi(e)&&Je(e)==bo}function Oi(e){if(!Pi(e)||Je(e)!=vo)return!1;var t=x(e);if(null===t)return!0;var n=T.call(t,"constructor")&&t.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==p}var Ri=Is?rc(Is):function(e){return Pi(e)&&Je(e)==wo};var Ni=Ps?rc(Ps):function(e){return Pi(e)&&Hn(e)==Co};function Li(e){return"string"==typeof e||!yi(e)&&Pi(e)&&Je(e)==Ao}function Fi(e){return"symbol"==typeof e||Pi(e)&&Je(e)==So}var Gi=Ms?rc(Ms):function(e){return Pi(e)&&Di(e.length)&&!!ws[Je(e)]};var ji=wn(dt),Bi=wn(function(e,t){return e<=t});function Ui(e){if(!e)return[];if(Ci(e))return Li(e)?_c(e):rn(e);if($&&e[$])return function(e){for(var t,n=[];!(t=e.next()).done;)n.push(t.value);return n}(e[$]());var t=Hn(e);return(t==_o?dc:t==Co?mc:ga)(e)}function Hi(e){return e?(e=zi(e))!==1/0&&e!==-1/0?e==e?e:0:17976931348623157e292*(e<0?-1:1):0===e?e:0}function Wi(e){var t=Hi(e),n=t%1;return t==t?n?t-n:t:0}function qi(e){return e?Re(Wi(e),0,so):0}function zi(e){if("number"==typeof e)return e;if(Fi(e))return oo;if(Ii(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=Ii(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=nc(e);var n=cs.test(e);return n||us.test(e)?Ss(e.slice(2),n?2:8):ss.test(e)?oo:+e}function Vi(e){return an(e,ca(e))}function Yi(e){return null==e?"":Lt(e)}var Ki=sn(function(e,t){if(Zn(t)||Ci(t))an(t,sa(t),e);else for(var n in t)T.call(t,n)&&De(e,n,t[n])}),Qi=sn(function(e,t){an(t,ca(t),e)}),Xi=sn(function(e,t,n,r){an(t,ca(t),e,r)}),Zi=sn(function(e,t,n,r){an(t,sa(t),e,r)}),Ji=Pn(Oe);var ea=St(function(e,t){e=S(e);var n=-1,r=t.length,i=2<r?t[2]:to;for(i&&Yn(t[0],t[1],i)&&(r=1);++n<r;)for(var a=t[n],o=ca(a),s=-1,c=o.length;++s<c;){var l=o[s],u=e[l];(u===to||gi(u,f[l])&&!T.call(e,l))&&(e[l]=a[l])}return e}),ta=St(function(e){return e.push(to,En),$s(ua,to,e)});function na(e,t,n){var r=null==e?to:Xe(e,t);return r===to?n:r}function ra(e,t){return null!=e&&Wn(e,t,nt)}var ia=gn(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=h.call(t)),e[t]=n},Ia($a)),aa=gn(function(e,t,n){null!=t&&"function"!=typeof t.toString&&(t=h.call(t)),T.call(e,t)?e[t].push(n):e[t]=[n]},Ln),oa=St(it);function sa(e){return Ci(e)?Se(e):ut(e)}function ca(e){return Ci(e)?Se(e,!0):ft(e)}var la=sn(function(e,t,n){gt(e,t,n)}),ua=sn(function(e,t,n,r){gt(e,t,n,r)}),fa=Pn(function(t,e){var n={};if(null==t)return n;var r=!1;e=Bs(e,function(e){return e=Vt(e,t),r||(r=1<e.length),e}),an(t,$n(t),n),r&&(n=Ne(n,7,Dn));for(var i=e.length;i--;)Gt(n,e[i]);return n});var da=Pn(function(e,t){return null==e?{}:vt(n=e,t,function(e,t){return ra(n,t)});var n});function ha(e,n){if(null==e)return{};var t=Bs($n(e),function(e){return[e]});return n=Ln(n),vt(e,t,function(e,t){return n(e,t[0])})}var pa=Tn(sa),ma=Tn(ca);function ga(e){return null==e?[]:ic(e,sa(e))}var _a=fn(function(e,t,n){return t=t.toLowerCase(),e+(n?ba(t):t)});function ba(e){return xa(Yi(e).toLowerCase())}function va(e){return(e=Yi(e))&&e.replace(ds,cc).replace(gs,"")}var ya=fn(function(e,t,n){return e+(n?"-":"")+t.toLowerCase()}),wa=fn(function(e,t,n){return e+(n?" ":"")+t.toLowerCase()}),Ca=un("toLowerCase");var Aa=fn(function(e,t,n){return e+(n?"_":"")+t.toLowerCase()});var Sa=fn(function(e,t,n){return e+(n?" ":"")+xa(t)});var Ta=fn(function(e,t,n){return e+(n?" ":"")+t.toUpperCase()}),xa=un("toUpperCase");function ka(e,t,n){return e=Yi(e),(t=n?to:t)===to?(r=e,bs.test(r)?e.match(_s)||[]:e.match(ns)||[]):e.match(t)||[];var r}var Ea=St(function(e,t){try{return $s(e,to,t)}catch(e){return xi(e)?e:new g(e)}}),Da=Pn(function(t,e){return Rs(e,function(e){e=hr(e),$e(t,e,ai(t[e],t))}),t});function Ia(e){return function(){return e}}var Pa=pn(),Ma=pn(!0);function $a(e){return e}function Oa(e){return lt("function"==typeof e?e:Ne(e,1))}var Ra=St(function(t,n){return function(e){return it(e,t,n)}}),Na=St(function(t,n){return function(e){return it(t,e,n)}});function La(r,t,e){var n=sa(t),i=Qe(t,n);null!=e||Ii(t)&&(i.length||!n.length)||(e=t,t=r,r=this,i=Qe(t,sa(t)));var a=!(Ii(e)&&"chain"in e&&!e.chain),o=ki(r);return Rs(i,function(e){var n=t[e];r[e]=n,o&&(r.prototype[e]=function(){var e=this.__chain__;if(a||e){var t=r(this.__wrapped__);return(t.__actions__=rn(this.__actions__)).push({func:n,args:arguments,thisArg:r}),t.__chain__=e,t}return n.apply(r,Us([this.value()],arguments))})}),r}function Fa(){}var Ga=bn(Bs),ja=bn(Ls),Ba=bn(qs);function Ua(e){return Kn(e)?Zs(hr(e)):(t=e,function(e){return Xe(e,t)});var t}var Ha=yn(),Wa=yn(!0);function qa(){return[]}function za(){return!1}var Va=_n(function(e,t){return e+t},0),Ya=An("ceil"),Ka=_n(function(e,t){return e/t},1),Qa=An("floor");var Xa,Za=_n(function(e,t){return e*t},1),Ja=An("round"),eo=_n(function(e,t){return e-t},0);return pe.after=function(e,t){if("function"!=typeof t)throw new D(no);return e=Wi(e),function(){if(--e<1)return t.apply(this,arguments)}},pe.ary=ri,pe.assign=Ki,pe.assignIn=Qi,pe.assignInWith=Xi,pe.assignWith=Zi,pe.at=Ji,pe.before=ii,pe.bind=ai,pe.bindAll=Da,pe.bindKey=oi,pe.castArray=function(){if(!arguments.length)return[];var e=arguments[0];return yi(e)?e:[e]},pe.chain=Ur,pe.chunk=function(e,t,n){t=(n?Yn(e,t,n):t===to)?1:z(Wi(t),0);var r=null==e?0:e.length;if(!r||t<1)return[];for(var i=0,a=0,o=E(G(r/t));i<r;)o[a++]=Pt(e,i,i+=t);return o},pe.compact=function(e){for(var t=-1,n=null==e?0:e.length,r=0,i=[];++t<n;){var a=e[t];a&&(i[r++]=a)}return i},pe.concat=function(){var e=arguments.length;if(!e)return[];for(var t=E(e-1),n=arguments[0],r=e;r--;)t[r-1]=arguments[r];return Us(yi(n)?rn(n):[n],qe(t,1))},pe.cond=function(r){var i=null==r?0:r.length,t=Ln();return r=i?Bs(r,function(e){if("function"!=typeof e[1])throw new D(no);return[t(e[0]),e[1]]}):[],St(function(e){for(var t=-1;++t<i;){var n=r[t];if($s(n[0],this,e))return $s(n[1],this,e)}})},pe.conforms=function(e){return t=Ne(e,1),n=sa(t),function(e){return Le(e,t,n)};var t,n},pe.constant=Ia,pe.countBy=qr,pe.create=function(e,t){var n=me(e);return null==t?n:Me(n,t)},pe.curry=function e(t,n,r){var i=xn(t,8,to,to,to,to,to,n=r?to:n);return i.placeholder=e.placeholder,i},pe.curryRight=function e(t,n,r){var i=xn(t,16,to,to,to,to,to,n=r?to:n);return i.placeholder=e.placeholder,i},pe.debounce=si,pe.defaults=ea,pe.defaultsDeep=ta,pe.defer=ci,pe.delay=li,pe.difference=gr,pe.differenceBy=_r,pe.differenceWith=br,pe.drop=function(e,t,n){var r=null==e?0:e.length;return r?Pt(e,(t=n||t===to?1:Wi(t))<0?0:t,r):[]},pe.dropRight=function(e,t,n){var r=null==e?0:e.length;return r?Pt(e,0,(t=r-(t=n||t===to?1:Wi(t)))<0?0:t):[]},pe.dropRightWhile=function(e,t){return e&&e.length?Bt(e,Ln(t,3),!0,!0):[]},pe.dropWhile=function(e,t){return e&&e.length?Bt(e,Ln(t,3),!0):[]},pe.fill=function(e,t,n,r){var i=null==e?0:e.length;return i?(n&&"number"!=typeof n&&Yn(e,t,n)&&(n=0,r=i),function(e,t,n,r){var i=e.length;for((n=Wi(n))<0&&(n=i<-n?0:i+n),(r=r===to||i<r?i:Wi(r))<0&&(r+=i),r=r<n?0:qi(r);n<r;)e[n++]=t;return e}(e,t,n,r)):[]},pe.filter=function(e,t){return(yi(e)?Fs:We)(e,Ln(t,3))},pe.flatMap=function(e,t){return qe(Jr(e,t),1)},pe.flatMapDeep=function(e,t){return qe(Jr(e,t),1/0)},pe.flatMapDepth=function(e,t,n){return n=n===to?1:Wi(n),qe(Jr(e,t),n)},pe.flatten=wr,pe.flattenDeep=function(e){return null!=e&&e.length?qe(e,1/0):[]},pe.flattenDepth=function(e,t){return null!=e&&e.length?qe(e,t=t===to?1:Wi(t)):[]},pe.flip=function(e){return xn(e,512)},pe.flow=Pa,pe.flowRight=Ma,pe.fromPairs=function(e){for(var t=-1,n=null==e?0:e.length,r={};++t<n;){var i=e[t];r[i[0]]=i[1]}return r},pe.functions=function(e){return null==e?[]:Qe(e,sa(e))},pe.functionsIn=function(e){return null==e?[]:Qe(e,ca(e))},pe.groupBy=Qr,pe.initial=function(e){return null!=e&&e.length?Pt(e,0,-1):[]},pe.intersection=Ar,pe.intersectionBy=Sr,pe.intersectionWith=Tr,pe.invert=ia,pe.invertBy=aa,pe.invokeMap=Xr,pe.iteratee=Oa,pe.keyBy=Zr,pe.keys=sa,pe.keysIn=ca,pe.map=Jr,pe.mapKeys=function(e,r){var i={};return r=Ln(r,3),Ye(e,function(e,t,n){$e(i,r(e,t,n),e)}),i},pe.mapValues=function(e,r){var i={};return r=Ln(r,3),Ye(e,function(e,t,n){$e(i,t,r(e,t,n))}),i},pe.matches=function(e){return pt(Ne(e,1))},pe.matchesProperty=function(e,t){return mt(e,Ne(t,1))},pe.memoize=ui,pe.merge=la,pe.mergeWith=ua,pe.method=Ra,pe.methodOf=Na,pe.mixin=La,pe.negate=fi,pe.nthArg=function(t){return t=Wi(t),St(function(e){return _t(e,t)})},pe.omit=fa,pe.omitBy=function(e,t){return ha(e,fi(Ln(t)))},pe.once=function(e){return ii(2,e)},pe.orderBy=function(e,t,n,r){return null==e?[]:(yi(t)||(t=null==t?[]:[t]),yi(n=r?to:n)||(n=null==n?[]:[n]),bt(e,t,n))},pe.over=Ga,pe.overArgs=di,pe.overEvery=ja,pe.overSome=Ba,pe.partial=hi,pe.partialRight=pi,pe.partition=ei,pe.pick=da,pe.pickBy=ha,pe.property=Ua,pe.propertyOf=function(t){return function(e){return null==t?to:Xe(t,e)}},pe.pull=kr,pe.pullAll=Er,pe.pullAllBy=function(e,t,n){return e&&e.length&&t&&t.length?yt(e,t,Ln(n,2)):e},pe.pullAllWith=function(e,t,n){return e&&e.length&&t&&t.length?yt(e,t,to,n):e},pe.pullAt=Dr,pe.range=Ha,pe.rangeRight=Wa,pe.rearg=mi,pe.reject=function(e,t){return(yi(e)?Fs:We)(e,fi(Ln(t,3)))},pe.remove=function(e,t){var n=[];if(!e||!e.length)return n;var r=-1,i=[],a=e.length;for(t=Ln(t,3);++r<a;){var o=e[r];t(o,r,e)&&(n.push(o),i.push(r))}return wt(e,i),n},pe.rest=function(e,t){if("function"!=typeof e)throw new D(no);return St(e,t=t===to?t:Wi(t))},pe.reverse=Ir,pe.sampleSize=function(e,t,n){return t=(n?Yn(e,t,n):t===to)?1:Wi(t),(yi(e)?xe:xt)(e,t)},pe.set=function(e,t,n){return null==e?e:kt(e,t,n)},pe.setWith=function(e,t,n,r){return r="function"==typeof r?r:to,null==e?e:kt(e,t,n,r)},pe.shuffle=function(e){return(yi(e)?ke:It)(e)},pe.slice=function(e,t,n){var r=null==e?0:e.length;return r?(n=n&&"number"!=typeof n&&Yn(e,t,n)?(t=0,r):(t=null==t?0:Wi(t),n===to?r:Wi(n)),Pt(e,t,n)):[]},pe.sortBy=ti,pe.sortedUniq=function(e){return e&&e.length?Rt(e):[]},pe.sortedUniqBy=function(e,t){return e&&e.length?Rt(e,Ln(t,2)):[]},pe.split=function(e,t,n){return n&&"number"!=typeof n&&Yn(e,t,n)&&(t=n=to),(n=n===to?so:n>>>0)?(e=Yi(e))&&("string"==typeof t||null!=t&&!Ri(t))&&!(t=Lt(t))&&fc(e)?Kt(_c(e),0,n):e.split(t,n):[]},pe.spread=function(r,i){if("function"!=typeof r)throw new D(no);return i=null==i?0:z(Wi(i),0),St(function(e){var t=e[i],n=Kt(e,0,i);return t&&Us(n,t),$s(r,this,n)})},pe.tail=function(e){var t=null==e?0:e.length;return t?Pt(e,1,t):[]},pe.take=function(e,t,n){return e&&e.length?Pt(e,0,(t=n||t===to?1:Wi(t))<0?0:t):[]},pe.takeRight=function(e,t,n){var r=null==e?0:e.length;return r?Pt(e,(t=r-(t=n||t===to?1:Wi(t)))<0?0:t,r):[]},pe.takeRightWhile=function(e,t){return e&&e.length?Bt(e,Ln(t,3),!1,!0):[]},pe.takeWhile=function(e,t){return e&&e.length?Bt(e,Ln(t,3)):[]},pe.tap=function(e,t){return t(e),e},pe.throttle=function(e,t,n){var r=!0,i=!0;if("function"!=typeof e)throw new D(no);return Ii(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),si(e,t,{leading:r,maxWait:t,trailing:i})},pe.thru=Hr,pe.toArray=Ui,pe.toPairs=pa,pe.toPairsIn=ma,pe.toPath=function(e){return yi(e)?Bs(e,hr):Fi(e)?[e]:rn(dr(Yi(e)))},pe.toPlainObject=Vi,pe.transform=function(e,r,i){var t=yi(e),n=t||Si(e)||Gi(e);if(r=Ln(r,4),null==i){var a=e&&e.constructor;i=n?t?new a:[]:Ii(e)&&ki(a)?me(x(e)):{}}return(n?Rs:Ye)(e,function(e,t,n){return r(i,e,t,n)}),i},pe.unary=function(e){return ri(e,1)},pe.union=Pr,pe.unionBy=Mr,pe.unionWith=$r,pe.uniq=function(e){return e&&e.length?Ft(e):[]},pe.uniqBy=function(e,t){return e&&e.length?Ft(e,Ln(t,2)):[]},pe.uniqWith=function(e,t){return t="function"==typeof t?t:to,e&&e.length?Ft(e,to,t):[]},pe.unset=function(e,t){return null==e||Gt(e,t)},pe.unzip=Or,pe.unzipWith=Rr,pe.update=function(e,t,n){return null==e?e:jt(e,t,zt(n))},pe.updateWith=function(e,t,n,r){return r="function"==typeof r?r:to,null==e?e:jt(e,t,zt(n),r)},pe.values=ga,pe.valuesIn=function(e){return null==e?[]:ic(e,ca(e))},pe.without=Nr,pe.words=ka,pe.wrap=function(e,t){return hi(zt(t),e)},pe.xor=Lr,pe.xorBy=Fr,pe.xorWith=Gr,pe.zip=jr,pe.zipObject=function(e,t){return Wt(e||[],t||[],De)},pe.zipObjectDeep=function(e,t){return Wt(e||[],t||[],kt)},pe.zipWith=Br,pe.entries=pa,pe.entriesIn=ma,pe.extend=Qi,pe.extendWith=Xi,La(pe,pe),pe.add=Va,pe.attempt=Ea,pe.camelCase=_a,pe.capitalize=ba,pe.ceil=Ya,pe.clamp=function(e,t,n){return n===to&&(n=t,t=to),n!==to&&(n=(n=zi(n))==n?n:0),t!==to&&(t=(t=zi(t))==t?t:0),Re(zi(e),t,n)},pe.clone=function(e){return Ne(e,4)},pe.cloneDeep=function(e){return Ne(e,5)},pe.cloneDeepWith=function(e,t){return Ne(e,5,t="function"==typeof t?t:to)},pe.cloneWith=function(e,t){return Ne(e,4,t="function"==typeof t?t:to)},pe.conformsTo=function(e,t){return null==t||Le(e,t,sa(t))},pe.deburr=va,pe.defaultTo=function(e,t){return null==e||e!=e?t:e},pe.divide=Ka,pe.endsWith=function(e,t,n){e=Yi(e),t=Lt(t);var r=e.length,i=n=n===to?r:Re(Wi(n),0,r);return 0<=(n-=t.length)&&e.slice(n,i)==t},pe.eq=gi,pe.escape=function(e){return(e=Yi(e))&&Ho.test(e)?e.replace(Bo,lc):e},pe.escapeRegExp=function(e){return(e=Yi(e))&&Xo.test(e)?e.replace(Qo,"\\$&"):e},pe.every=function(e,t,n){var r=yi(e)?Ls:Ue;return n&&Yn(e,t,n)&&(t=to),r(e,Ln(t,3))},pe.find=zr,pe.findIndex=vr,pe.findKey=function(e,t){return zs(e,Ln(t,3),Ye)},pe.findLast=Vr,pe.findLastIndex=yr,pe.findLastKey=function(e,t){return zs(e,Ln(t,3),Ke)},pe.floor=Qa,pe.forEach=Yr,pe.forEachRight=Kr,pe.forIn=function(e,t){return null==e?e:ze(e,Ln(t,3),ca)},pe.forInRight=function(e,t){return null==e?e:Ve(e,Ln(t,3),ca)},pe.forOwn=function(e,t){return e&&Ye(e,Ln(t,3))},pe.forOwnRight=function(e,t){return e&&Ke(e,Ln(t,3))},pe.get=na,pe.gt=_i,pe.gte=bi,pe.has=function(e,t){return null!=e&&Wn(e,t,tt)},pe.hasIn=ra,pe.head=Cr,pe.identity=$a,pe.includes=function(e,t,n,r){e=Ci(e)?e:ga(e),n=n&&!r?Wi(n):0;var i=e.length;return n<0&&(n=z(i+n,0)),Li(e)?n<=i&&-1<e.indexOf(t,n):!!i&&-1<Ys(e,t,n)},pe.indexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=null==n?0:Wi(n);return i<0&&(i=z(r+i,0)),Ys(e,t,i)},pe.inRange=function(e,t,n){return t=Hi(t),n===to?(n=t,t=0):n=Hi(n),e=zi(e),(r=e)>=V(i=t,a=n)&&r<z(i,a);var r,i,a},pe.invoke=oa,pe.isArguments=vi,pe.isArray=yi,pe.isArrayBuffer=wi,pe.isArrayLike=Ci,pe.isArrayLikeObject=Ai,pe.isBoolean=function(e){return!0===e||!1===e||Pi(e)&&Je(e)==fo},pe.isBuffer=Si,pe.isDate=Ti,pe.isElement=function(e){return Pi(e)&&1===e.nodeType&&!Oi(e)},pe.isEmpty=function(e){if(null==e)return!0;if(Ci(e)&&(yi(e)||"string"==typeof e||"function"==typeof e.splice||Si(e)||Gi(e)||vi(e)))return!e.length;var t=Hn(e);if(t==_o||t==Co)return!e.size;if(Zn(e))return!ut(e).length;for(var n in e)if(T.call(e,n))return!1;return!0},pe.isEqual=function(e,t){return ot(e,t)},pe.isEqualWith=function(e,t,n){var r=(n="function"==typeof n?n:to)?n(e,t):to;return r===to?ot(e,t,to,n):!!r},pe.isError=xi,pe.isFinite=function(e){return"number"==typeof e&&H(e)},pe.isFunction=ki,pe.isInteger=Ei,pe.isLength=Di,pe.isMap=Mi,pe.isMatch=function(e,t){return e===t||st(e,t,Gn(t))},pe.isMatchWith=function(e,t,n){return n="function"==typeof n?n:to,st(e,t,Gn(t),n)},pe.isNaN=function(e){return $i(e)&&e!=+e},pe.isNative=function(e){if(Xn(e))throw new g("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return ct(e)},pe.isNil=function(e){return null==e},pe.isNull=function(e){return null===e},pe.isNumber=$i,pe.isObject=Ii,pe.isObjectLike=Pi,pe.isPlainObject=Oi,pe.isRegExp=Ri,pe.isSafeInteger=function(e){return Ei(e)&&-ao<=e&&e<=ao},pe.isSet=Ni,pe.isString=Li,pe.isSymbol=Fi,pe.isTypedArray=Gi,pe.isUndefined=function(e){return e===to},pe.isWeakMap=function(e){return Pi(e)&&Hn(e)==To},pe.isWeakSet=function(e){return Pi(e)&&"[object WeakSet]"==Je(e)},pe.join=function(e,t){return null==e?"":W.call(e,t)},pe.kebabCase=ya,pe.last=xr,pe.lastIndexOf=function(e,t,n){var r=null==e?0:e.length;if(!r)return-1;var i=r;return n!==to&&(i=(i=Wi(n))<0?z(r+i,0):V(i,r-1)),t==t?function(e,t,n){for(var r=n+1;r--;)if(e[r]===t)return r;return r}(e,t,i):Vs(e,Qs,i,!0)},pe.lowerCase=wa,pe.lowerFirst=Ca,pe.lt=ji,pe.lte=Bi,pe.max=function(e){return e&&e.length?He(e,$a,et):to},pe.maxBy=function(e,t){return e&&e.length?He(e,Ln(t,2),et):to},pe.mean=function(e){return Xs(e,$a)},pe.meanBy=function(e,t){return Xs(e,Ln(t,2))},pe.min=function(e){return e&&e.length?He(e,$a,dt):to},pe.minBy=function(e,t){return e&&e.length?He(e,Ln(t,2),dt):to},pe.stubArray=qa,pe.stubFalse=za,pe.stubObject=function(){return{}},pe.stubString=function(){return""},pe.stubTrue=function(){return!0},pe.multiply=Za,pe.nth=function(e,t){return e&&e.length?_t(e,Wi(t)):to},pe.noConflict=function(){return Ts._===this&&(Ts._=m),this},pe.noop=Fa,pe.now=ni,pe.pad=function(e,t,n){e=Yi(e);var r=(t=Wi(t))?gc(e):0;if(!t||t<=r)return e;var i=(t-r)/2;return vn(j(i),n)+e+vn(G(i),n)},pe.padEnd=function(e,t,n){e=Yi(e);var r=(t=Wi(t))?gc(e):0;return t&&r<t?e+vn(t-r,n):e},pe.padStart=function(e,t,n){e=Yi(e);var r=(t=Wi(t))?gc(e):0;return t&&r<t?vn(t-r,n)+e:e},pe.parseInt=function(e,t,n){return n||null==t?t=0:t&&(t=+t),K(Yi(e).replace(Zo,""),t||0)},pe.random=function(e,t,n){if(n&&"boolean"!=typeof n&&Yn(e,t,n)&&(t=n=to),n===to&&("boolean"==typeof t?(n=t,t=to):"boolean"==typeof e&&(n=e,e=to)),e===to&&t===to?(e=0,t=1):(e=Hi(e),t===to?(t=e,e=0):t=Hi(t)),t<e){var r=e;e=t,t=r}if(n||e%1||t%1){var i=Q();return V(e+i*(t-e+As("1e-"+((i+"").length-1))),t)}return Ct(e,t)},pe.reduce=function(e,t,n){var r=yi(e)?Hs:Js,i=arguments.length<3;return r(e,Ln(t,4),n,i,je)},pe.reduceRight=function(e,t,n){var r=yi(e)?Ws:Js,i=arguments.length<3;return r(e,Ln(t,4),n,i,Be)},pe.repeat=function(e,t,n){return t=(n?Yn(e,t,n):t===to)?1:Wi(t),At(Yi(e),t)},pe.replace=function(){var e=arguments,t=Yi(e[0]);return e.length<3?t:t.replace(e[1],e[2])},pe.result=function(e,t,n){var r=-1,i=(t=Vt(t,e)).length;for(i||(i=1,e=to);++r<i;){var a=null==e?to:e[hr(t[r])];a===to&&(r=i,a=n),e=ki(a)?a.call(e):a}return e},pe.round=Ja,pe.runInContext=e,pe.sample=function(e){return(yi(e)?Te:Tt)(e)},pe.size=function(e){if(null==e)return 0;if(Ci(e))return Li(e)?gc(e):e.length;var t=Hn(e);return t==_o||t==Co?e.size:ut(e).length},pe.snakeCase=Aa,pe.some=function(e,t,n){var r=yi(e)?qs:Mt;return n&&Yn(e,t,n)&&(t=to),r(e,Ln(t,3))},pe.sortedIndex=function(e,t){return $t(e,t)},pe.sortedIndexBy=function(e,t,n){return Ot(e,t,Ln(n,2))},pe.sortedIndexOf=function(e,t){var n=null==e?0:e.length;if(n){var r=$t(e,t);if(r<n&&gi(e[r],t))return r}return-1},pe.sortedLastIndex=function(e,t){return $t(e,t,!0)},pe.sortedLastIndexBy=function(e,t,n){return Ot(e,t,Ln(n,2),!0)},pe.sortedLastIndexOf=function(e,t){if(null!=e&&e.length){var n=$t(e,t,!0)-1;if(gi(e[n],t))return n}return-1},pe.startCase=Sa,pe.startsWith=function(e,t,n){return e=Yi(e),n=null==n?0:Re(Wi(n),0,e.length),t=Lt(t),e.slice(n,n+t.length)==t},pe.subtract=eo,pe.sum=function(e){return e&&e.length?ec(e,$a):0},pe.sumBy=function(e,t){return e&&e.length?ec(e,Ln(t,2)):0},pe.template=function(o,e,t){var n=pe.templateSettings;t&&Yn(o,e,t)&&(e=to),o=Yi(o),e=Xi({},e,n,kn);var s,c,r=Xi({},e.imports,n.imports,kn),i=sa(r),a=ic(r,i),l=0,u=e.interpolate||hs,f="__p += '",d=b((e.escape||hs).source+"|"+u.source+"|"+(u===zo?as:hs).source+"|"+(e.evaluate||hs).source+"|$","g"),h="//# sourceURL="+(T.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++ys+"]")+"\n";o.replace(d,function(e,t,n,r,i,a){return n||(n=r),f+=o.slice(l,a).replace(ps,uc),t&&(s=!0,f+="' +\n__e("+t+") +\n'"),i&&(c=!0,f+="';\n"+i+";\n__p += '"),n&&(f+="' +\n((__t = ("+n+")) == null ? '' : __t) +\n'"),l=a+e.length,e}),f+="';\n";var p=T.call(e,"variable")&&e.variable;if(p){if(rs.test(p))throw new g("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(c?f.replace(Lo,""):f).replace(Fo,"$1").replace(Go,"$1;"),f="function("+(p||"obj")+") {\n"+(p?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(s?", __e = _.escape":"")+(c?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var m=Ea(function(){return _(i,h+"return "+f).apply(to,a)});if(m.source=f,xi(m))throw m;return m},pe.times=function(e,t){if((e=Wi(e))<1||ao<e)return[];var n=so,r=V(e,so);t=Ln(t),e-=so;for(var i=tc(r,t);++n<e;)t(n);return i},pe.toFinite=Hi,pe.toInteger=Wi,pe.toLength=qi,pe.toLower=function(e){return Yi(e).toLowerCase()},pe.toNumber=zi,pe.toSafeInteger=function(e){return e?Re(Wi(e),-ao,ao):0===e?e:0},pe.toString=Yi,pe.toUpper=function(e){return Yi(e).toUpperCase()},pe.trim=function(e,t,n){if((e=Yi(e))&&(n||t===to))return nc(e);if(!e||!(t=Lt(t)))return e;var r=_c(e),i=_c(t);return Kt(r,oc(r,i),sc(r,i)+1).join("")},pe.trimEnd=function(e,t,n){if((e=Yi(e))&&(n||t===to))return e.slice(0,bc(e)+1);if(!e||!(t=Lt(t)))return e;var r=_c(e);return Kt(r,0,sc(r,_c(t))+1).join("")},pe.trimStart=function(e,t,n){if((e=Yi(e))&&(n||t===to))return e.replace(Zo,"");if(!e||!(t=Lt(t)))return e;var r=_c(e);return Kt(r,oc(r,_c(t))).join("")},pe.truncate=function(e,t){var n=30,r="...";if(Ii(t)){var i="separator"in t?t.separator:i;n="length"in t?Wi(t.length):n,r="omission"in t?Lt(t.omission):r}var a=(e=Yi(e)).length;if(fc(e)){var o=_c(e);a=o.length}if(a<=n)return e;var s=n-gc(r);if(s<1)return r;var c=o?Kt(o,0,s).join(""):e.slice(0,s);if(i===to)return c+r;if(o&&(s+=c.length-s),Ri(i)){if(e.slice(s).search(i)){var l,u=c;for(i.global||(i=b(i.source,Yi(os.exec(i))+"g")),i.lastIndex=0;l=i.exec(u);)var f=l.index;c=c.slice(0,f===to?s:f)}}else if(e.indexOf(Lt(i),s)!=s){var d=c.lastIndexOf(i);-1<d&&(c=c.slice(0,d))}return c+r},pe.unescape=function(e){return(e=Yi(e))&&Uo.test(e)?e.replace(jo,vc):e},pe.uniqueId=function(e){var t=++l;return Yi(e)+t},pe.upperCase=Ta,pe.upperFirst=xa,pe.each=Yr,pe.eachRight=Kr,pe.first=Cr,La(pe,(Xa={},Ye(pe,function(e,t){T.call(pe.prototype,t)||(Xa[t]=e)}),Xa),{chain:!1}),pe.VERSION="4.17.21",Rs(["bind","bindKey","curry","curryRight","partial","partialRight"],function(e){pe[e].placeholder=pe}),Rs(["drop","take"],function(n,r){be.prototype[n]=function(e){e=e===to?1:z(Wi(e),0);var t=this.__filtered__&&!r?new be(this):this.clone();return t.__filtered__?t.__takeCount__=V(e,t.__takeCount__):t.__views__.push({size:V(e,so),type:n+(t.__dir__<0?"Right":"")}),t},be.prototype[n+"Right"]=function(e){return this.reverse()[n](e).reverse()}}),Rs(["filter","map","takeWhile"],function(e,t){var n=t+1,r=1==n||3==n;be.prototype[e]=function(e){var t=this.clone();return t.__iteratees__.push({iteratee:Ln(e,3),type:n}),t.__filtered__=t.__filtered__||r,t}}),Rs(["head","last"],function(e,t){var n="take"+(t?"Right":"");be.prototype[e]=function(){return this[n](1).value()[0]}}),Rs(["initial","tail"],function(e,t){var n="drop"+(t?"":"Right");be.prototype[e]=function(){return this.__filtered__?new be(this):this[n](1)}}),be.prototype.compact=function(){return this.filter($a)},be.prototype.find=function(e){return this.filter(e).head()},be.prototype.findLast=function(e){return this.reverse().find(e)},be.prototype.invokeMap=St(function(t,n){return"function"==typeof t?new be(this):this.map(function(e){return it(e,t,n)})}),be.prototype.reject=function(e){return this.filter(fi(Ln(e)))},be.prototype.slice=function(e,t){e=Wi(e);var n=this;return n.__filtered__&&(0<e||t<0)?new be(n):(e<0?n=n.takeRight(-e):e&&(n=n.drop(e)),t!==to&&(n=(t=Wi(t))<0?n.dropRight(-t):n.take(t-e)),n)},be.prototype.takeRightWhile=function(e){return this.reverse().takeWhile(e).reverse()},be.prototype.toArray=function(){return this.take(so)},Ye(be.prototype,function(f,e){var d=/^(?:filter|find|map|reject)|While$/.test(e),h=/^(?:head|last)$/.test(e),p=pe[h?"take"+("last"==e?"Right":""):e],m=h||/^find/.test(e);p&&(pe.prototype[e]=function(){var e=this.__wrapped__,n=h?[1]:arguments,t=e instanceof be,r=n[0],i=t||yi(e),a=function(e){var t=p.apply(pe,Us([e],n));return h&&o?t[0]:t};i&&d&&"function"==typeof r&&1!=r.length&&(t=i=!1);var o=this.__chain__,s=!!this.__actions__.length,c=m&&!o,l=t&&!s;if(m||!i)return c&&l?f.apply(this,n):(u=this.thru(a),c?h?u.value()[0]:u.value():u);e=l?e:new be(this);var u=f.apply(e,n);return u.__actions__.push({func:Hr,args:[a],thisArg:to}),new _e(u,o)})}),Rs(["pop","push","shift","sort","splice","unshift"],function(e){var n=a[e],r=/^(?:push|sort|unshift)$/.test(e)?"tap":"thru",i=/^(?:pop|shift)$/.test(e);pe.prototype[e]=function(){var t=arguments;if(!i||this.__chain__)return this[r](function(e){return n.apply(yi(e)?e:[],t)});var e=this.value();return n.apply(yi(e)?e:[],t)}}),Ye(be.prototype,function(e,t){var n=pe[t];if(n){var r=n.name+"";T.call(ae,r)||(ae[r]=[]),ae[r].push({name:t,func:n})}}),ae[mn(to,2).name]=[{name:"wrapper",func:to}],be.prototype.clone=function(){var e=new be(this.__wrapped__);return e.__actions__=rn(this.__actions__),e.__dir__=this.__dir__,e.__filtered__=this.__filtered__,e.__iteratees__=rn(this.__iteratees__),e.__takeCount__=this.__takeCount__,e.__views__=rn(this.__views__),e},be.prototype.reverse=function(){if(this.__filtered__){var e=new be(this);e.__dir__=-1,e.__filtered__=!0}else(e=this.clone()).__dir__*=-1;return e},be.prototype.value=function(){var e=this.__wrapped__.value(),t=this.__dir__,n=yi(e),r=t<0,i=n?e.length:0,a=function(e,t,n){for(var r=-1,i=n.length;++r<i;){var a=n[r],o=a.size;switch(a.type){case"drop":e+=o;break;case"dropRight":t-=o;break;case"take":t=V(t,e+o);break;case"takeRight":e=z(e,t-o)}}return{start:e,end:t}}(0,i,this.__views__),o=a.start,s=a.end,c=s-o,l=r?s:o-1,u=this.__iteratees__,f=u.length,d=0,h=V(c,this.__takeCount__);if(!n||!r&&i==c&&h==c)return Ut(e,this.__actions__);var p=[];e:for(;c--&&d<h;){for(var m=-1,g=e[l+=t];++m<f;){var _=u[m],b=_.iteratee,v=_.type,y=b(g);if(2==v)g=y;else if(!y){if(1==v)continue e;break e}}p[d++]=g}return p},pe.prototype.at=Wr,pe.prototype.chain=function(){return Ur(this)},pe.prototype.commit=function(){return new _e(this.value(),this.__chain__)},pe.prototype.next=function(){this.__values__===to&&(this.__values__=Ui(this.value()));var e=this.__index__>=this.__values__.length;return{done:e,value:e?to:this.__values__[this.__index__++]}},pe.prototype.plant=function(e){for(var t,n=this;n instanceof ge;){var r=mr(n);r.__index__=0,r.__values__=to,t?i.__wrapped__=r:t=r;var i=r;n=n.__wrapped__}return i.__wrapped__=e,t},pe.prototype.reverse=function(){var e=this.__wrapped__;if(e instanceof be){var t=e;return this.__actions__.length&&(t=new be(this)),(t=t.reverse()).__actions__.push({func:Hr,args:[Ir],thisArg:to}),new _e(t,this.__chain__)}return this.thru(Ir)},pe.prototype.toJSON=pe.prototype.valueOf=pe.prototype.value=function(){return Ut(this.__wrapped__,this.__actions__)},pe.prototype.first=pe.prototype.head,$&&(pe.prototype[$]=function(){return this}),pe}();"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Ts._=yc,define(function(){return yc})):R?((R.exports=yc)._=yc,O._=yc):Ts._=yc}.call(this),function(){var t,n,r=document.attachEvent,i=!1;if(!r){var e=(n=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||function(e){return window.setTimeout(e,20)},function(e){return n(e)}),a=(t=window.cancelAnimationFrame||window.mozCancelAnimationFrame||window.webkitCancelAnimationFrame||window.clearTimeout,function(e){return t(e)});function o(e){var t=e.__resizeTriggers__,n=t.firstElementChild,r=t.lastElementChild,i=n.firstElementChild;r.scrollLeft=r.scrollWidth,r.scrollTop=r.scrollHeight,i.style.width=n.offsetWidth+1+"px",i.style.height=n.offsetHeight+1+"px",n.scrollLeft=n.scrollWidth,n.scrollTop=n.scrollHeight}function s(t){var n=this;o(this),this.__resizeRAF__&&a(this.__resizeRAF__),this.__resizeRAF__=e(function(){var e;((e=n).offsetWidth!=e.__resizeLast__.width||e.offsetHeight!=e.__resizeLast__.height)&&(n.__resizeLast__.width=n.offsetWidth,n.__resizeLast__.height=n.offsetHeight,n.__resizeListeners__.forEach(function(e){e.call(n,t)}))})}var c=!1,l="",u="animationstart",f="Webkit Moz O ms".split(" "),d="webkitAnimationStart animationstart oAnimationStart MSAnimationStart".split(" "),h="",p=document.createElement("fakeelement");if(void 0!==p.style.animationName&&(c=!0),!1===c)for(var m=0;m<f.length;m++)if(void 0!==p.style[f[m]+"AnimationName"]){(h=f[m])+"Animation",l="-"+h.toLowerCase()+"-",u=d[m],c=!0;break}var g="resizeanim",_="@"+l+"keyframes "+g+" { from { opacity: 0; } to { opacity: 0; } } ",b=l+"animation: 1ms "+g+"; "}window.addResizeListener=function(t,e){r?t.attachEvent("onresize",e):(t.__resizeTriggers__||("static"==getComputedStyle(t).position&&(t.style.position="relative"),function(){if(!i){var e=(_||"")+".resize-triggers { "+(b||"")+'visibility: hidden; opacity: 0; } .resize-triggers, .resize-triggers > div, .contract-trigger:before { content: " "; display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; } .resize-triggers > div { background: #eee; overflow: auto; } .contract-trigger:before { width: 200%; height: 200%; }',t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e)),t.appendChild(n),i=!0}}(),t.__resizeLast__={},t.__resizeListeners__=[],(t.__resizeTriggers__=document.createElement("div")).className="resize-triggers",t.__resizeTriggers__.innerHTML='<div class="expand-trigger"><div></div></div><div class="contract-trigger"></div>',t.appendChild(t.__resizeTriggers__),o(t),t.addEventListener("scroll",s,!0),u&&t.__resizeTriggers__.addEventListener(u,function(e){e.animationName==g&&o(t)})),t.__resizeListeners__.push(e))},window.removeResizeListener=function(e,t){r?e.detachEvent("onresize",t):(e.__resizeListeners__.splice(e.__resizeListeners__.indexOf(t),1),e.__resizeListeners__.length||(e.removeEventListener("scroll",s),e.__resizeTriggers__=!e.removeChild(e.__resizeTriggers__)))}}(),function(e,t){"use strict";"function"==typeof define&&define.amd?define(["angular"],t):"object"==typeof exports?module.exports=t(require("angular")):t(e.angular)}(this,function(M){"use strict";return M.module("gridster",[]).constant("gridsterConfig",{columns:6,pushing:!0,floating:!0,swapping:!1,width:"auto",colWidth:"auto",rowHeight:"match",margins:[10,10],outerMargin:!0,sparse:!1,isMobile:!1,mobileBreakPoint:600,mobileModeEnabled:!0,minColumns:1,minRows:1,maxRows:100,defaultSizeX:2,defaultSizeY:1,minSizeX:1,maxSizeX:null,minSizeY:1,maxSizeY:null,saveGridItemCalculatedHeightInMobile:!1,resizable:{enabled:!0,handles:["s","e","n","w","se","ne","sw","nw"]},draggable:{enabled:!0,scrollSensitivity:20,scrollSpeed:15}}).controller("GridsterCtrl",["gridsterConfig","$timeout",function(e,t){var n=this;M.extend(this,e),this.resizable=M.extend({},e.resizable||{}),this.draggable=M.extend({},e.draggable||{});var r=!1;this.layoutChanged=function(){r||(r=!0,t(function(){r=!1,n.loaded&&n.floatItemsUp(),n.updateHeight(n.movingItem?n.movingItem.sizeY:0)},30))},this.grid=[],this.allItems=[],this.destroy=function(){this.grid&&(this.grid=[]),this.$element=null,this.allItems&&(this.allItems.length=0,this.allItems=null)},this.setOptions=function(e){if(e)if((e=M.extend({},e)).draggable&&(M.extend(this.draggable,e.draggable),delete e.draggable),e.resizable&&(M.extend(this.resizable,e.resizable),delete e.resizable),M.extend(this,e),this.margins&&2===this.margins.length)for(var t=0,n=this.margins.length;t<n;++t)this.margins[t]=parseInt(this.margins[t],10),isNaN(this.margins[t])&&(this.margins[t]=0);else this.margins=[0,0]},this.canItemOccupy=function(e,t,n){return-1<t&&-1<n&&e.sizeX+n<=this.columns&&e.sizeY+t<=this.maxRows},this.autoSetItemPosition=function(e){for(var t=0;t<this.maxRows;++t)for(var n=0;n<this.columns;++n){if(0===this.getItems(t,n,e.sizeX,e.sizeY,e).length&&this.canItemOccupy(e,t,n))return void this.putItem(e,t,n)}throw new Error("Unable to place item!")},this.getItems=function(e,t,n,r,i){var a,o=[];if(n&&r||(n=r=1),!i||i instanceof Array||(i=[i]),!1===this.sparse)for(var s=0;s<r;++s)for(var c=0;c<n;++c)!(a=this.getItem(e+s,t+c,i))||i&&-1!==i.indexOf(a)||-1!==o.indexOf(a)||o.push(a);else for(var l=e+r-1,u=t+n-1,f=0;f<this.allItems.length;++f)!(a=this.allItems[f])||i&&-1!==i.indexOf(a)||-1!==o.indexOf(a)||!this.intersect(a,t,u,e,l)||o.push(a);return o},this.getBoundingBox=function(e){if(0===e.length)return null;if(1===e.length)return{row:e[0].row,col:e[0].col,sizeY:e[0].sizeY,sizeX:e[0].sizeX};for(var t=0,n=0,r=9999,i=9999,a=0,o=e.length;a<o;++a){var s=e[a];r=Math.min(s.row,r),i=Math.min(s.col,i),t=Math.max(s.row+s.sizeY,t),n=Math.max(s.col+s.sizeX,n)}return{row:r,col:i,sizeY:t-r,sizeX:n-i}},this.intersect=function(e,t,n,r,i){return t<=e.col+e.sizeX-1&&n>=e.col&&r<=e.row+e.sizeY-1&&i>=e.row},this.removeItem=function(e){for(var t,n=0,r=this.grid.length;n<r;++n){var i=this.grid[n];if(i&&-1!==(t=i.indexOf(e))){i[t]=null;break}}this.sparse&&-1!==(t=this.allItems.indexOf(e))&&this.allItems.splice(t,1),this.layoutChanged()},this.getItem=function(e,t,n){!n||n instanceof Array||(n=[n]);for(var r=1;-1<e;){for(var i=1,a=t;-1<a;){var o=this.grid[e];if(o){var s=o[a];if(s&&(!n||-1===n.indexOf(s))&&s.sizeX>=i&&s.sizeY>=r)return s}++i,--a}--e,++r}return null},this.putItems=function(e){for(var t=0,n=e.length;t<n;++t)this.putItem(e[t])},this.putItem=function(e,t,n,r){if(null!=t||(t=e.row,n=e.col,null!=t)){if(this.canItemOccupy(e,t,n)||(n=Math.min(this.columns-e.sizeX,Math.max(0,n)),t=Math.min(this.maxRows-e.sizeY,Math.max(0,t))),null!==e.oldRow&&void 0!==e.oldRow){var i=e.oldRow===t&&e.oldColumn===n,a=this.grid[t]&&this.grid[t][n]===e;if(i&&a)return e.row=t,void(e.col=n);var o=this.grid[e.oldRow];o&&o[e.oldColumn]===e&&delete o[e.oldColumn]}e.oldRow=e.row=t,e.oldColumn=e.col=n,this.moveOverlappingItems(e,r),this.grid[t]||(this.grid[t]=[]),this.grid[t][n]=e,this.sparse&&-1===this.allItems.indexOf(e)&&this.allItems.push(e),this.movingItem===e&&this.floatItemUp(e),this.layoutChanged()}else this.autoSetItemPosition(e)},this.swapItems=function(e,t){this.grid[e.row][e.col]=t;var n=(this.grid[t.row][t.col]=e).row,r=e.col;e.row=t.row,e.col=t.col,t.row=n,t.col=r},this.moveOverlappingItems=function(e,t){t?-1===t.indexOf(e)&&(t=t.slice(0)).push(e):t=[e];var n=this.getItems(e.row,e.col,e.sizeX,e.sizeY,t);this.moveItemsDown(n,e.row+e.sizeY,t)},this.moveItemsDown=function(e,t,n){if(e&&0!==e.length){e.sort(function(e,t){return e.row-t.row}),n=n?n.slice(0):[];var r,i,a,o={};for(i=0,a=e.length;i<a;++i){var s=o[(r=e[i]).col];(void 0===s||r.row<s)&&(o[r.col]=r.row)}for(i=0,a=e.length;i<a;++i){var c=t-o[(r=e[i]).col];this.moveItemDown(r,r.row+c,n),n.push(r)}}},this.moveItemDown=function(e,t,n){if(!(e.row>=t)){for(;e.row<t;)++e.row,this.moveOverlappingItems(e,n);this.putItem(e,e.row,e.col,n)}},this.floatItemsUp=function(){if(!1!==this.floating)for(var e=0,t=this.grid.length;e<t;++e){var n=this.grid[e];if(n)for(var r=0,i=n.length;r<i;++r){var a=n[r];a&&this.floatItemUp(a)}}},this.floatItemUp=function(e){if(!1!==this.floating){for(var t=e.col,n=e.sizeY,r=e.sizeX,i=null,a=null,o=e.row-1;-1<o;){if(0!==this.getItems(o,t,r,n,e).length)break;i=o,a=t,--o}null!==i&&this.putItem(e,i,a)}},this.updateHeight=function(e){var t=this.minRows;e=e||0;for(var n=this.grid.length;0<=n;--n){var r=this.grid[n];if(r)for(var i=0,a=r.length;i<a;++i)r[i]&&(t=Math.max(t,n+e+r[i].sizeY))}this.gridHeight=0<this.maxRows-t?Math.min(this.maxRows,t):Math.max(this.maxRows,t)},this.pixelsToRows=function(e,t){return this.outerMargin||(e+=this.margins[0]/2),!0===t?Math.ceil(e/this.curRowHeight):!1===t?Math.floor(e/this.curRowHeight):Math.round(e/this.curRowHeight)},this.pixelsToColumns=function(e,t){return this.outerMargin||(e+=this.margins[1]/2),!0===t?Math.ceil(e/this.curColWidth):!1===t?Math.floor(e/this.curColWidth):Math.round(e/this.curColWidth)}}]).directive("gridsterPreview",function(){return{replace:!0,scope:!0,require:"^gridster",template:'<div ng-style="previewStyle()" class="gridster-item gridster-preview-holder"></div>',link:function(e,t,n,r){e.previewStyle=function(){return r.movingItem?{display:"block",height:r.movingItem.sizeY*r.curRowHeight-r.margins[0]+"px",width:r.movingItem.sizeX*r.curColWidth-r.margins[1]+"px",top:r.movingItem.row*r.curRowHeight+(r.outerMargin?r.margins[0]:0)+"px",left:r.movingItem.col*r.curColWidth+(r.outerMargin?r.margins[1]:0)+"px"}:{display:"none"}}}}}).directive("gridster",["$timeout","$window","$rootScope","gridsterDebounce",function(d,h,p,m){return{scope:!0,restrict:"EAC",controller:"GridsterCtrl",controllerAs:"gridster",compile:function(e){return e.prepend('<div ng-if="gridster.movingItem" gridster-preview></div>'),function(e,s,t,c){c.loaded=!1,c.$element=s,e.gridster=c,s.addClass("gridster");var l=function(e){return"hidden"!==e.style.visibility&&"none"!==e.style.display};function u(){s.css("height",c.gridHeight*c.curRowHeight+(c.outerMargin?c.margins[0]:-c.margins[0])+"px")}function n(e){if(c.setOptions(e),l(s[0])){"auto"===c.width?c.curWidth=s[0].offsetWidth||parseInt(s.css("width"),10):c.curWidth=c.width,"auto"===c.colWidth?c.curColWidth=(c.curWidth+(c.outerMargin?-c.margins[1]:c.margins[1]))/c.columns:c.curColWidth=c.colWidth,c.curRowHeight=c.rowHeight,"string"==typeof c.rowHeight&&("match"===c.rowHeight?c.curRowHeight=Math.round(c.curColWidth):-1!==c.rowHeight.indexOf("*")?c.curRowHeight=Math.round(c.curColWidth*c.rowHeight.replace("*","").replace(" ","")):-1!==c.rowHeight.indexOf("/")&&(c.curRowHeight=Math.round(c.curColWidth/c.rowHeight.replace("/","").replace(" ","")))),c.isMobile=c.mobileModeEnabled&&c.curWidth<=c.mobileBreakPoint;for(var t=0,n=c.grid.length;t<n;++t){var r=c.grid[t];if(r)for(var i=0,a=r.length;i<a;++i)if(r[i]){var o=r[i];o.setElementPosition(),o.setElementSizeY(),o.setElementSizeX()}}u()}}e.$watch(function(){return c.gridHeight},u),e.$watch(function(){return c.movingItem},function(){c.updateHeight(c.movingItem?c.movingItem.sizeY:0)});var r=t.gridster;r?e.$parent.$watch(r,function(e){n(e)},!0):n({}),e.$watch(function(){return c.loaded},function(){c.loaded?(s.addClass("gridster-loaded"),p.$broadcast("gridster-loaded",c)):s.removeClass("gridster-loaded")}),e.$watch(function(){return c.isMobile},function(){c.isMobile?s.addClass("gridster-mobile").removeClass("gridster-desktop"):s.removeClass("gridster-mobile").addClass("gridster-desktop"),p.$broadcast("gridster-mobile-changed",c)}),e.$watch(function(){return c.draggable},function(){p.$broadcast("gridster-draggable-changed",c)},!0),e.$watch(function(){return c.resizable},function(){p.$broadcast("gridster-resizable-changed",c)},!0);var i=s[0].offsetWidth||parseInt(s.css("width"),10),a=function(){var e=s[0].offsetWidth||parseInt(s.css("width"),10);e&&e!==i&&!c.movingItem&&(i=e,c.loaded&&s.removeClass("gridster-loaded"),n(),c.loaded&&s.addClass("gridster-loaded"),p.$broadcast("gridster-resized",[e,s[0].offsetHeight],c))},o=m(function(){a(),d(function(){e.$apply()})},100);e.$watch(function(){return l(s[0])},o),"function"==typeof window.addResizeListener?window.addResizeListener(s[0],o):e.$watch(function(){return s[0].offsetWidth||parseInt(s.css("width"),10)},a);var f=M.element(h);f.on("resize",o),e.$on("$destroy",function(){c.destroy(),f.off("resize",o),"function"==typeof window.removeResizeListener&&window.removeResizeListener(s[0],o)}),d(function(){e.$watch("gridster.floating",function(){c.floatItemsUp()}),c.loaded=!0},100)}}}}]).controller("GridsterItemCtrl",function(){this.$element=null,this.gridster=null,this.row=null,this.col=null,this.sizeX=null,this.sizeY=null,this.minSizeX=0,this.minSizeY=0,this.maxSizeX=null,this.maxSizeY=null,this.init=function(e,t){this.$element=e,this.gridster=t,this.sizeX=t.defaultSizeX,this.sizeY=t.defaultSizeY},this.destroy=function(){this.gridster=null,this.$element=null},this.toJSON=function(){return{row:this.row,col:this.col,sizeY:this.sizeY,sizeX:this.sizeX}},this.isMoving=function(){return this.gridster.movingItem===this},this.setPosition=function(e,t){this.gridster.putItem(this,e,t),this.isMoving()||this.setElementPosition()},this.setSize=function(e,t,n){var r="size"+(e=e.toUpperCase()),i="Size"+e;if(""!==t){t=parseInt(t,10),(isNaN(t)||0===t)&&(t=this.gridster["default"+i]);var a="X"===e?this.gridster.columns:this.gridster.maxRows;this["max"+i]&&(a=Math.min(this["max"+i],a)),this.gridster["max"+i]&&(a=Math.min(this.gridster["max"+i],a)),"X"===e&&this.cols?a-=this.cols:"Y"===e&&this.rows&&(a-=this.rows);var o=0;this["min"+i]&&(o=Math.max(this["min"+i],o)),this.gridster["min"+i]&&(o=Math.max(this.gridster["min"+i],o)),t=Math.max(Math.min(t,a),o);var s=this[r]!==t||this["old"+i]&&this["old"+i]!==t;return this["old"+i]=this[r]=t,this.isMoving()||this["setElement"+i](),!n&&s&&(this.gridster.moveOverlappingItems(this),this.gridster.layoutChanged()),s}},this.setSizeY=function(e,t){return this.setSize("Y",e,t)},this.setSizeX=function(e,t){return this.setSize("X",e,t)},this.setElementPosition=function(){this.gridster.isMobile?this.$element.css({marginLeft:this.gridster.margins[0]+"px",marginRight:this.gridster.margins[0]+"px",marginTop:this.gridster.margins[1]+"px",marginBottom:this.gridster.margins[1]+"px",top:"",left:""}):this.$element.css({margin:0,top:this.row*this.gridster.curRowHeight+(this.gridster.outerMargin?this.gridster.margins[0]:0)+"px",left:this.col*this.gridster.curColWidth+(this.gridster.outerMargin?this.gridster.margins[1]:0)+"px"})},this.setElementSizeY=function(){this.gridster.isMobile&&!this.gridster.saveGridItemCalculatedHeightInMobile?this.$element.css("height",""):this.$element.css("height",this.sizeY*this.gridster.curRowHeight-this.gridster.margins[0]+"px")},this.setElementSizeX=function(){this.gridster.isMobile?this.$element.css("width",""):this.$element.css("width",this.sizeX*this.gridster.curColWidth-this.gridster.margins[1]+"px")},this.getElementSizeX=function(){return this.sizeX*this.gridster.curColWidth-this.gridster.margins[1]},this.getElementSizeY=function(){return this.sizeY*this.gridster.curRowHeight-this.gridster.margins[0]}}).factory("GridsterTouch",[function(){return function(f,d,h,p){var e,t,m={},g=function(e){if(Object.keys)return Object.keys(e).length;var t,n=0;for(t in e)++n;return n},_=function(e){for(var t=0,n=0,r=navigator.userAgent.match(/\bMSIE\b/),i=e;null!=i;i=i.offsetParent)r&&(!document.documentMode||document.documentMode<8)&&"relative"===i.currentStyle.position&&i.offsetParent&&"relative"===i.offsetParent.currentStyle.position&&i.offsetLeft===i.offsetParent.offsetLeft||(t+=i.offsetLeft),n+=i.offsetTop;return{x:t,y:n}},b=_(f),v=!1,y=function(e){if("mousemove"!==e.type||0!==g(m)){for(var t=!0,n=e.changedTouches?e.changedTouches:[e],r=0;r<n.length;++r){var i=n[r],a=void 0!==i.identifier?i.identifier:void 0!==i.pointerId?i.pointerId:1;if(void 0===i.pageX)if(i.pageX=i.offsetX+b.x,i.pageY=i.offsetY+b.y,i.srcElement.offsetParent===f&&document.documentMode&&8===document.documentMode&&"mousedown"===i.type)i.pageX+=i.srcElement.offsetLeft,i.pageY+=i.srcElement.offsetTop;else if(i.srcElement!==f&&!document.documentMode||document.documentMode<8){for(var o=-2,s=-2,c=i.srcElement;null!==c;c=c.parentNode)o+=c.scrollLeft?c.scrollLeft:0,s+=c.scrollTop?c.scrollTop:0;i.pageX=i.clientX+o,i.pageY=i.clientY+s}var l=i.pageX,u=i.pageY;e.type.match(/(start|down)$/i)?(b=_(f),m[a]&&(p&&p({target:e.target,which:e.which,pointerId:a,pageX:l,pageY:u}),delete m[a]),d&&t&&(t=d({target:e.target,which:e.which,pointerId:a,pageX:l,pageY:u})),m[a]={x:l,y:u},f.msSetPointerCapture&&t?f.msSetPointerCapture(a):"mousedown"===e.type&&1===g(m)&&(v?f.setCapture(!0):(document.addEventListener("mousemove",y,!1),document.addEventListener("mouseup",y,!1)))):e.type.match(/move$/i)?!m[a]||m[a].x===l&&m[a].y===u||(h&&t&&(t=h({target:e.target,which:e.which,pointerId:a,pageX:l,pageY:u})),m[a].x=l,m[a].y=u):m[a]&&e.type.match(/(up|end|cancel)$/i)&&(p&&t&&(t=p({target:e.target,which:e.which,pointerId:a,pageX:l,pageY:u})),delete m[a],f.msReleasePointerCapture?f.msReleasePointerCapture(a):"mouseup"===e.type&&0===g(m)&&(v?f.releaseCapture():(document.removeEventListener("mousemove",y,!1),document.removeEventListener("mouseup",y,!1))))}t&&(e.preventDefault&&e.preventDefault(),e.preventManipulation&&e.preventManipulation(),e.preventMouseEvent&&e.preventMouseEvent())}};return this.enable=function(){window.navigator.msPointerEnabled?(f.addEventListener("MSPointerDown",y,!1),f.addEventListener("MSPointerMove",y,!1),f.addEventListener("MSPointerUp",y,!1),f.addEventListener("MSPointerCancel",y,!1),void 0!==f.style.msContentZooming&&(e=f.style.msContentZooming,f.style.msContentZooming="none"),void 0!==f.style.msTouchAction&&(t=f.style.msTouchAction,f.style.msTouchAction="none")):f.addEventListener?(f.addEventListener("touchstart",y,!1),f.addEventListener("touchmove",y,!1),f.addEventListener("touchend",y,!1),f.addEventListener("touchcancel",y,!1),f.addEventListener("mousedown",y,!1),f.setCapture&&!window.navigator.userAgent.match(/\bGecko\b/)&&(v=!0,f.addEventListener("mousemove",y,!1),f.addEventListener("mouseup",y,!1))):f.attachEvent&&f.setCapture&&(v=!0,f.attachEvent("onmousedown",function(){return y(window.event),window.event.returnValue=!1}),f.attachEvent("onmousemove",function(){return y(window.event),window.event.returnValue=!1}),f.attachEvent("onmouseup",function(){return y(window.event),window.event.returnValue=!1}))},this.disable=function(){window.navigator.msPointerEnabled?(f.removeEventListener("MSPointerDown",y,!1),f.removeEventListener("MSPointerMove",y,!1),f.removeEventListener("MSPointerUp",y,!1),f.removeEventListener("MSPointerCancel",y,!1),e&&(f.style.msContentZooming=e),t&&(f.style.msTouchAction=t)):f.removeEventListener?(f.removeEventListener("touchstart",y,!1),f.removeEventListener("touchmove",y,!1),f.removeEventListener("touchend",y,!1),f.removeEventListener("touchcancel",y,!1),f.removeEventListener("mousedown",y,!1),f.setCapture&&!window.navigator.userAgent.match(/\bGecko\b/)&&(v=!0,f.removeEventListener("mousemove",y,!1),f.removeEventListener("mouseup",y,!1))):f.detachEvent&&f.setCapture&&(v=!0,f.detachEvent("onmousedown"),f.detachEvent("onmousemove"),f.detachEvent("onmouseup"))},this}}]).factory("GridsterDraggable",["$document","$window","GridsterTouch",function(a,P,o){return function(A,S,T,x,k){var E,D,f,d,s=0,c=0,h=0,p=0,l=0,u=0,I=a[0],m=["select","option","input","textarea","button"];function e(e){if(-1!==m.indexOf(e.target.nodeName.toLowerCase()))return!1;var t,n=M.element(e.target);if(n.hasClass("gridster-item-resizable-handler"))return!1;if(n.attr("onclick")||n.attr("ng-click"))return!1;if(n.closest&&n.closest(".gridster-no-drag").length)return!1;if(T.draggable&&T.draggable.handle){var r=M.element(A[0].querySelectorAll(T.draggable.handle)),i=!1;e:for(var a=0,o=r.length;a<o;++a){var s=r[a];if(s===e.target){i=!0;break}for(var c=e.target,l=0;l<20;++l){var u=c.parentNode;if(u===A[0]||!u)break;if(u===s){i=!0;break e}c=u}}if(!i)return!1}switch(e.which){case 1:break;case 2:case 3:return}return h=e.pageX,p=e.pageY,E=parseInt(A.css("left"),10),D=parseInt(A.css("top"),10),f=A[0].offsetWidth,d=A[0].offsetHeight,x.col,x.row,t=e,A.addClass("gridster-item-moving"),T.movingItem=x,T.updateHeight(x.sizeY),S.$apply(function(){T.draggable&&T.draggable.start&&T.draggable.start(t,A,k,x)}),!0}function t(e){if(!A.hasClass("gridster-item-moving")||A.hasClass("gridster-item-resizing"))return!1;var t=T.curWidth-1,n=T.curRowHeight*T.maxRows-1;s=e.pageX,c=e.pageY;var r=s-h+l,i=c-p+u;l=u=0,h=s,p=c;var a=r,o=i;return E+a<0?l=a-(r=0-E):t<E+f+a&&(l=a-(r=t-E-f)),D+o<0?u=o-(i=0-D):n<D+d+o&&(u=o-(i=n-D-d)),E+=r,D+=i,A.css({top:D+"px",left:E+"px"}),function(e){var t=x.row,n=x.col,r=T.draggable&&T.draggable.drag,i=T.draggable.scrollSensitivity,a=T.draggable.scrollSpeed,o=Math.min(T.pixelsToRows(D),T.maxRows-1),s=Math.min(T.pixelsToColumns(E),T.columns-1),c=T.getItems(o,s,x.sizeX,x.sizeY,x),l=0!==c.length;if(!0===T.swapping&&l){var u=T.getBoundingBox(c),f=u.sizeX===x.sizeX&&u.sizeY===x.sizeY,d=u.row===t,h=u.col===n,p=u.row===o&&u.col===s,m=d||h;if(f&&1===c.length){if(p)T.swapItems(x,c[0]);else if(m)return}else if(u.sizeX<=x.sizeX&&u.sizeY<=x.sizeY&&m)for(var g=x.row<=o?x.row:o+x.sizeY,_=x.col<=s?x.col:s+x.sizeX,b=g-u.row,v=_-u.col,y=0,w=c.length;y<w;++y){var C=c[y];0===T.getItems(C.row+b,C.col+v,C.sizeX,C.sizeY,x).length&&T.putItem(C,C.row+b,C.col+v)}}!1===T.pushing&&l||(x.row=o,x.col=s),e.pageY-I.body.scrollTop<i?I.body.scrollTop=I.body.scrollTop-a:P.innerHeight-(e.pageY-I.body.scrollTop)<i&&(I.body.scrollTop=I.body.scrollTop+a),e.pageX-I.body.scrollLeft<i?I.body.scrollLeft=I.body.scrollLeft-a:P.innerWidth-(e.pageX-I.body.scrollLeft)<i&&(I.body.scrollLeft=I.body.scrollLeft+a),(r||t!==x.row||n!==x.col)&&S.$apply(function(){r&&T.draggable.drag(e,A,k,x)})}(e),!0}function n(e){return!(!A.hasClass("gridster-item-moving")||A.hasClass("gridster-item-resizing")||(l=u=0,function(e){A.removeClass("gridster-item-moving");var t=Math.min(T.pixelsToRows(D),T.maxRows-1),n=Math.min(T.pixelsToColumns(E),T.columns-1);!1===T.pushing&&0!==T.getItems(t,n,x.sizeX,x.sizeY,x).length||(x.row=t,x.col=n),T.movingItem=null,x.setPosition(x.row,x.col),S.$apply(function(){T.draggable&&T.draggable.stop&&T.draggable.stop(e,A,k,x)})}(e),0))}var r=null,i=null;this.enable=function(){!0!==r&&(r=!0,i?i.enable():(i=new o(A[0],e,t,n)).enable())},this.disable=function(){!1!==r&&(r=!1,i&&i.disable())},this.toggle=function(e){e?this.enable():this.disable()},this.destroy=function(){this.disable()}}}]).factory("GridsterResizable",["GridsterTouch",function(T){return function(y,w,C,A,S){function e(f){var d,h,p,m,n,o=f,s=0,c=0,l=0,u=0,g=0,_=0,b=function(){return(A.minSizeY?A.minSizeY:1)*C.curRowHeight-C.margins[0]},v=function(){return(A.minSizeX?A.minSizeX:1)*C.curColWidth-C.margins[1]};function e(e){switch(e.which){case 1:break;case 2:case 3:return}var t;return(n=C.draggable.enabled)&&(C.draggable.enabled=!1,w.$broadcast("gridster-draggable-changed",C)),l=e.pageX,u=e.pageY,d=parseInt(y.css("left"),10),h=parseInt(y.css("top"),10),p=y[0].offsetWidth,m=y[0].offsetHeight,A.sizeX,A.sizeY,t=e,y.addClass("gridster-item-moving"),y.addClass("gridster-item-resizing"),(C.movingItem=A).setElementSizeX(),A.setElementSizeY(),A.setElementPosition(),C.updateHeight(1),w.$apply(function(){C.resizable&&C.resizable.start&&C.resizable.start(t,y,S,A)}),!0}function t(e){var t=C.curWidth-1;s=e.pageX,c=e.pageY;var n=s-l+g,r=c-u+_;g=_=0,l=s,u=c;var i=r,a=n;return 0<=o.indexOf("n")&&(m-i<b()?(r=m-b(),_=i-r):h+i<0&&(_=i-(r=0-h)),h+=r,m-=r),0<=o.indexOf("s")&&(m+i<b()?(r=b()-m,_=i-r):9999<h+m+i&&(_=i-(r=9999-h-m)),m+=r),0<=o.indexOf("w")&&(p-a<v()?(n=p-v(),g=a-n):d+a<0&&(g=a-(n=0-d)),d+=n,p-=n),0<=o.indexOf("e")&&(p+a<v()?(n=v()-p,g=a-n):t<d+p+a&&(g=a-(n=t-d-p)),p+=n),y.css({top:h+"px",left:d+"px",width:p+"px",height:m+"px"}),function(e){var t=A.row,n=A.col,r=A.sizeX,i=A.sizeY,a=C.resizable&&C.resizable.resize,o=A.col;-1!==["w","nw","sw"].indexOf(f)&&(o=C.pixelsToColumns(d,!1));var s=A.row;-1!==["n","ne","nw"].indexOf(f)&&(s=C.pixelsToRows(h,!1));var c=A.sizeX;-1===["n","s"].indexOf(f)&&(c=C.pixelsToColumns(p,!0));var l=A.sizeY;-1===["e","w"].indexOf(f)&&(l=C.pixelsToRows(m,!0)),!(-1<s&&-1<o&&c+o<=C.columns&&l+s<=C.maxRows)||!1===C.pushing&&0!==C.getItems(s,o,c,l,A).length||(A.row=s,A.col=o,A.sizeX=c,A.sizeY=l);var u=A.row!==t||A.col!==n||A.sizeX!==r||A.sizeY!==i;(a||u)&&w.$apply(function(){a&&C.resizable.resize(e,y,S,A)})}(e),!0}function r(e){var t;return C.draggable.enabled!==n&&(C.draggable.enabled=n,w.$broadcast("gridster-draggable-changed",C)),g=_=0,t=e,y.removeClass("gridster-item-moving"),y.removeClass("gridster-item-resizing"),C.movingItem=null,A.setPosition(A.row,A.col),A.setSizeY(A.sizeY),A.setSizeX(A.sizeX),w.$apply(function(){C.resizable&&C.resizable.stop&&C.resizable.stop(t,y,S,A)}),!0}var i,a=null;this.enable=function(){a||(a=M.element('<div class="gridster-item-resizable-handler handle-'+o+'"></div>'),y.append(a)),(i=new T(a[0],e,t,r)).enable()},this.disable=function(){a&&(a.remove(),a=null),i.disable(),i=void 0},this.destroy=function(){this.disable()}}var n=[],t=C.resizable.handles;"string"==typeof t&&(t=C.resizable.handles.split(","));for(var r=!1,i=0,a=t.length;i<a;i++)n.push(new e(t[i]));this.enable=function(){if(!r){for(var e=0,t=n.length;e<t;e++)n[e].enable();r=!0}},this.disable=function(){if(r){for(var e=0,t=n.length;e<t;e++)n[e].disable();r=!1}},this.toggle=function(e){e?this.enable():this.disable()},this.destroy=function(){for(var e=0,t=n.length;e<t;e++)n[e].destroy()}}}]).factory("gridsterDebounce",function(){return function(r,i,a){var o;return function(){var e=this,t=arguments,n=a&&!o;clearTimeout(o),o=setTimeout(function(){o=null,a||r.apply(e,t)},i),n&&r.apply(e,t)}}}).directive("gridsterItem",["$parse","GridsterDraggable","GridsterResizable","gridsterDebounce",function(w,C,A,S){return{scope:!0,restrict:"EA",controller:"GridsterItemCtrl",controllerAs:"gridsterItem",require:["^gridster","gridsterItem"],link:function(r,e,t,n){var i,a=t.gridsterItem,o=n[0],s=n[1];if(r.gridster=o,a){var c=w(a);!(i=c(r)||{})&&c.assign&&(i={row:s.row,col:s.col,sizeX:s.sizeX,sizeY:s.sizeY,minSizeX:0,minSizeY:0,maxSizeX:null,maxSizeY:null},c.assign(r,i))}else i=t;s.init(e,o),e.addClass("gridster-item");for(var l=["minSizeX","maxSizeX","minSizeY","maxSizeY","sizeX","sizeY","row","col"],u={},f=[],d=function(e){var t;if("string"==typeof i[e])t=i[e];else if("string"==typeof i[e.toLowerCase()])t=i[e.toLowerCase()];else{if(!a)return;t=a+"."+e}f.push('"'+e+'":'+t),u[e]=w(t);var n=u[e](r);"number"==typeof n&&(s[e]=n)},h=0,p=l.length;h<p;++h)d(l[h]);var m="{"+f.join(",")+"}";r.$watchCollection(m,function(e,t){for(var n in e){var r=e[n];t[n]!==r&&(r=parseInt(r,10),isNaN(r)||(s[n]=r))}}),r.$watch(function(){return s.row+","+s.col},function(){s.setPosition(s.row,s.col),u.row&&u.row.assign&&u.row.assign(r,s.row),u.col&&u.col.assign&&u.col.assign(r,s.col)}),r.$watch(function(){return s.sizeY+","+s.sizeX+","+s.minSizeX+","+s.maxSizeX+","+s.minSizeY+","+s.maxSizeY},function(){var e=s.setSizeX(s.sizeX,!0);e&&u.sizeX&&u.sizeX.assign&&u.sizeX.assign(r,s.sizeX);var t=s.setSizeY(s.sizeY,!0);t&&u.sizeY&&u.sizeY.assign&&u.sizeY.assign(r,s.sizeY),(e||t)&&(s.gridster.moveOverlappingItems(s),o.layoutChanged(),r.$broadcast("gridster-item-resized",s))});var g=new C(e,r,o,s,i),_=new A(e,r,o,s,i),b=function(){_.toggle(!o.isMobile&&o.resizable&&o.resizable.enabled)};b();var v=function(){g.toggle(!o.isMobile&&o.draggable&&o.draggable.enabled)};v(),r.$on("gridster-draggable-changed",v),r.$on("gridster-resizable-changed",b),r.$on("gridster-resized",b),r.$on("gridster-mobile-changed",function(){b(),v()});var y=S(function(){r.$apply(function(){r.$broadcast("gridster-item-transition-end",s)})},50);return e.on(function(){var e=document.createElement("div"),t={transition:"transitionend",OTransition:"oTransitionEnd",MozTransition:"transitionend",WebkitTransition:"webkitTransitionEnd"};for(var n in t)if(void 0!==e.style[n])return t[n]}(),y),r.$broadcast("gridster-item-initialized",s),r.$on("$destroy",function(){try{_.destroy(),g.destroy()}catch(e){}try{o.removeItem(s)}catch(e){}try{s.destroy()}catch(e){}})}}}]).directive("gridsterNoDrag",function(){return{restrict:"A",link:function(e,t){t.addClass("gridster-no-drag")}}})}),function(){"use strict";function s(e){var t=isNaN(e.startTime)?new Date:new Date(e.startTime);if(null===e.gmtOffset||!1===e.gmtOffset)return{hrs:t.getHours(),mins:t.getMinutes(),secs:t.getSeconds(),date:t};var n=t.getTime()+6e4*t.getTimezoneOffset(),r=new Date(n+36e5*e.gmtOffset);return{hrs:r.getHours(),mins:r.getMinutes(),secs:r.getSeconds(),date:r}}angular.module("ds.clock",[]).directive("dsWidgetClock",["$interval","$filter",function(e,t){return a=e,o=t,{restrict:"EA",scope:{gmtOffset:"=gmtOffset",digitalFormat:"=digitalFormat",showDigital:"=showDigital",showAnalog:"=showAnalog",startTime:"=startTime",theme:"=theme"},template:'<div class="widget-clock" ng-class="themeClass" ng-if="date"><div class="digital" ng-if="digital"><span class="time"><span class="hours">{{digital}}</span></span></div><div class="analog" ng-if="analog"><div class="square"><svg viewBox="0 0 100 100"><g transform="translate(50,50)"><circle class="clock-face" r="48" /><line ng-repeat="minor in minors track by $index" class="minor" y1="42" y2="45" ng-attr-transform="rotate({{360 * $index / minors.length}})" /><line ng-repeat="major in majors track by $index" class="major" y1="35" y2="46" ng-attr-transform="rotate({{360 * $index / majors.length}})" /><line class="hour" y1="2" y2="-20" ng-attr-transform="rotate({{30 * date.hrs + date.mins / 2}})" /><line class="minute" y1="4" y2="-30" ng-attr-transform="rotate({{6 * date.mins + date.secs / 10}})" /><g ng-attr-transform="rotate({{6 * date.secs}})"><line class="second" y1="10" y2="-38" /><line class="second-counterweight" y1="10" y2="2" /></g></g></svg></div></div><div ng-if="gmtInfo" class="gmt-info">{{gmtInfo}}</div></div>',link:function(c,e,n){var t,l={},u=c.gmtOffset,r=c.digitalFormat?c.digitalFormat:"HH:mm:ss";l.showDigital=null!=c.showDigital?c.showDigital:void 0!==n.showDigital,l.showAnalog=null!=c.showAnalog?c.showAnalog:void 0!==n.showAnalog,l.showGmtInfo=void 0!==n.showGmtInfo,l.startTime=parseInt(c.startTime,10),c.themeClass=c.theme?c.theme:n.theme?n.theme:"light",l.showDigital||l.showAnalog||(l.showAnalog=!0,l.showDigital=!0),c.gmtInfo=!1,c.date=s(l),c.digital=!!l.showDigital&&"Loading..",c.analog=l.showAnalog,c.majors=new Array(12),c.minors=new Array(60);var i=null,f=function(){var e,t,n;isNaN(l.startTime)||(l.startTime=l.startTime+1e3),i=s(l),c.date=i,l.showDigital&&(c.digital=(e=i,t=r,n=u,o("date")(e.date,t,n)))};t=a(f,1e3),c.$watch("gmtOffset",function(e,t){var n,r,i,a,o,s;u=e,l.gmtOffset=null!=u&&(n=u,(0<(n=parseFloat(n))?Math.floor(n):Math.ceil(n))+n%1/.6),l.showGmtInfo&&!1!==l.gmtOffset&&(c.gmtInfo=(r=l.gmtOffset,i=0<r?Math.floor(r):Math.ceil(r),a=Math.round((0<r?r:-1*r)%1*60),"GMT"+(0===r?"":(0<r?" +":" ")+((s=i)<0?(-10<s?"-0":"-")+-1*s:(s<10?"0":"")+s)+"."+(o=a,o+(o<10?"0":"")).substring(0,2)))),f()}),c.$watch("digitalFormat",function(e,t){e!=t&&(r=e)}),c.$watch("showDigital",function(e,t){e!=t&&(l.showDigital=e,c.digital=!!l.showDigital&&"Loading..")}),c.$watch("showAnalog",function(e,t){e!=t&&(l.showAnalog=e,c.analog=e)}),c.$watch("theme",function(e,t){e!=t&&(c.themeClass=e||(n.theme?n.theme:"light"))}),e.on("$destroy",function(){a.cancel(t),t=null})}};var a,o}])}(),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).Clipboard=e()}}(function(){return function a(o,s,c){function l(n,e){if(!s[n]){if(!o[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=s[n]={exports:{}};o[n][0].call(i.exports,function(e){var t=o[n][1][e];return l(t||e)},i,i.exports,a,o,s,c)}return s[n].exports}for(var u="function"==typeof require&&require,e=0;e<c.length;e++)l(c[e]);return l}({1:[function(e,t,n){if(Element&&!Element.prototype.matches){var r=Element.prototype;r.matches=r.matchesSelector||r.mozMatchesSelector||r.msMatchesSelector||r.oMatchesSelector||r.webkitMatchesSelector}t.exports=function(e,t){for(;e&&9!==e.nodeType;){if(e.matches(t))return e;e=e.parentNode}}},{}],2:[function(e,t,n){var o=e("./closest");t.exports=function(e,t,n,r,i){var a=function(t,n,e,r){return function(e){e.delegateTarget=o(e.target,n),e.delegateTarget&&r.call(t,e)}}.apply(this,arguments);return e.addEventListener(n,a,i),{destroy:function(){e.removeEventListener(n,a,i)}}}},{"./closest":1}],3:[function(e,t,n){n.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},n.nodeList=function(e){var t=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===t||"[object HTMLCollection]"===t)&&"length"in e&&(0===e.length||n.node(e[0]))},n.string=function(e){return"string"==typeof e||e instanceof String},n.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},{}],4:[function(e,t,n){var d=e("./is"),h=e("delegate");t.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!d.string(t))throw new TypeError("Second argument must be a String");if(!d.fn(n))throw new TypeError("Third argument must be a Function");if(d.node(e))return u=t,f=n,(l=e).addEventListener(u,f),{destroy:function(){l.removeEventListener(u,f)}};if(d.nodeList(e))return o=e,s=t,c=n,Array.prototype.forEach.call(o,function(e){e.addEventListener(s,c)}),{destroy:function(){Array.prototype.forEach.call(o,function(e){e.removeEventListener(s,c)})}};if(d.string(e))return r=e,i=t,a=n,h(document.body,r,i,a);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList");var r,i,a,o,s,c,l,u,f}},{"./is":3,delegate:2}],5:[function(e,t,n){t.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName)e.focus(),e.setSelectionRange(0,e.value.length),t=e.value;else{e.hasAttribute("contenteditable")&&e.focus();var n=window.getSelection(),r=document.createRange();r.selectNodeContents(e),n.removeAllRanges(),n.addRange(r),t=n.toString()}return t}},{}],6:[function(e,t,n){function r(){}r.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function i(){r.off(e,i),t.apply(n,arguments)}return i._=t,this.on(e,i,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,i=n.length;r<i;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],i=[];if(r&&t)for(var a=0,o=r.length;a<o;a++)r[a].fn!==t&&r[a].fn._!==t&&i.push(r[a]);return i.length?n[e]=i:delete n[e],this}},t.exports=r},{}],7:[function(r,i,a){!function(e,t){if(void 0!==a)t(i,r("select"));else{var n={exports:{}};t(n,e.select),e.clipboardAction=n.exports}}(this,function(e,t){"use strict";var n,r=(n=t)&&n.__esModule?n:{default:n};var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e};var a=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),o=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this.resolveOptions(e),this.initSelection()}return a(t,[{key:"resolveOptions",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action=e.action,this.emitter=e.emitter,this.target=e.target,this.text=e.text,this.trigger=e.trigger,this.selectedText=""}},{key:"initSelection",value:function(){this.text?this.selectFake():this.target&&this.selectTarget()}},{key:"selectFake",value:function(){var e=this,t="rtl"==document.documentElement.getAttribute("dir");this.removeFake(),this.fakeHandlerCallback=function(){return e.removeFake()},this.fakeHandler=document.body.addEventListener("click",this.fakeHandlerCallback)||!0,this.fakeElem=document.createElement("textarea"),this.fakeElem.style.fontSize="12pt",this.fakeElem.style.border="0",this.fakeElem.style.padding="0",this.fakeElem.style.margin="0",this.fakeElem.style.position="absolute",this.fakeElem.style[t?"right":"left"]="-9999px";var n=window.pageYOffset||document.documentElement.scrollTop;this.fakeElem.addEventListener("focus",window.scrollTo(0,n)),this.fakeElem.style.top=n+"px",this.fakeElem.setAttribute("readonly",""),this.fakeElem.value=this.text,document.body.appendChild(this.fakeElem),this.selectedText=(0,r.default)(this.fakeElem),this.copyText()}},{key:"removeFake",value:function(){this.fakeHandler&&(document.body.removeEventListener("click",this.fakeHandlerCallback),this.fakeHandler=null,this.fakeHandlerCallback=null),this.fakeElem&&(document.body.removeChild(this.fakeElem),this.fakeElem=null)}},{key:"selectTarget",value:function(){this.selectedText=(0,r.default)(this.target),this.copyText()}},{key:"copyText",value:function(){var t=void 0;try{t=document.execCommand(this.action)}catch(e){t=!1}this.handleResult(t)}},{key:"handleResult",value:function(e){this.emitter.emit(e?"success":"error",{action:this.action,text:this.selectedText,trigger:this.trigger,clearSelection:this.clearSelection.bind(this)})}},{key:"clearSelection",value:function(){this.target&&this.target.blur(),window.getSelection().removeAllRanges()}},{key:"destroy",value:function(){this.removeFake()}},{key:"action",set:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"copy";if(this._action=e,"copy"!==this._action&&"cut"!==this._action)throw new Error('Invalid "action" value, use either "copy" or "cut"')},get:function(){return this._action}},{key:"target",set:function(e){if(void 0!==e){if(!e||"object"!==(void 0===e?"undefined":i(e))||1!==e.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===this.action&&e.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===this.action&&(e.hasAttribute("readonly")||e.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes');this._target=e}},get:function(){return this._target}}]),t}();e.exports=o})},{select:5}],8:[function(r,i,a){!function(e,t){if(void 0!==a)t(i,r("./clipboard-action"),r("tiny-emitter"),r("good-listener"));else{var n={exports:{}};t(n,e.clipboardAction,e.tinyEmitter,e.goodListener),e.clipboard=n.exports}}(this,function(e,t,n,r){"use strict";var i=s(t),a=s(n),o=s(r);function s(e){return e&&e.__esModule?e:{default:e}}var c=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var l=function(e){function r(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r);var n=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.resolveOptions(t),n.listenClick(e),n}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(r,a.default),c(r,[{key:"resolveOptions",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText}},{key:"listenClick",value:function(e){var t=this;this.listener=(0,o.default)(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget;this.clipboardAction&&(this.clipboardAction=null),this.clipboardAction=new i.default({action:this.action(t),target:this.target(t),text:this.text(t),trigger:t,emitter:this})}},{key:"defaultAction",value:function(e){return u("action",e)}},{key:"defaultTarget",value:function(e){var t=u("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return u("text",e)}},{key:"destroy",value:function(){this.listener.destroy(),this.clipboardAction&&(this.clipboardAction.destroy(),this.clipboardAction=null)}}]),r}();function u(e,t){var n="data-clipboard-"+e;if(t.hasAttribute(n))return t.getAttribute(n)}e.exports=l})},{"./clipboard-action":7,"good-listener":4,"tiny-emitter":6}]},{},[8])(8)}),function(){"use strict";var e,r,t="ngclipboard";"object"==typeof module&&module.exports?(e=require("angular"),r=require("clipboard"),module.exports=t):(e=window.angular,r=window.Clipboard),e.module(t,[]).directive("ngclipboard",function(){return{restrict:"A",scope:{ngclipboardSuccess:"&",ngclipboardError:"&"},link:function(t,e){var n=new r(e[0]);n.on("success",function(e){t.$apply(function(){t.ngclipboardSuccess({e:e})})}),n.on("error",function(e){t.$apply(function(){t.ngclipboardError({e:e})})}),e.on("$destroy",function(){n.destroy()})}}})}(),function(o,T){"use strict";T.mock={},T.mock.$BrowserProvider=function(){this.$get=function(){return new T.mock.$Browser}},T.mock.$Browser=function(){var i=this;this.isMock=!0,i.$$url="http://server/",i.$$lastUrl=i.$$url,i.pollFns=[],i.$$completeOutstandingRequest=T.noop,i.$$incOutstandingRequestCount=T.noop,i.onUrlChange=function(e){return i.pollFns.push(function(){i.$$lastUrl===i.$$url&&i.$$state===i.$$lastState||(i.$$lastUrl=i.$$url,i.$$lastState=i.$$state,e(i.$$url,i.$$state))}),e},i.$$applicationDestroyed=T.noop,i.$$checkUrlChange=T.noop,i.deferredFns=[],i.deferredNextId=0,i.defer=function(e,t){return t=t||0,i.deferredFns.push({time:i.defer.now+t,fn:e,id:i.deferredNextId}),i.deferredFns.sort(function(e,t){return e.time-t.time}),i.deferredNextId++},i.defer.now=0,i.defer.cancel=function(n){var r;return T.forEach(i.deferredFns,function(e,t){e.id===n&&(r=t)}),!!T.isDefined(r)&&(i.deferredFns.splice(r,1),!0)},i.defer.flush=function(e){var t;if(T.isDefined(e))t=i.defer.now+e;else{if(!i.deferredFns.length)throw new Error("No deferred tasks to be flushed");t=i.deferredFns[i.deferredFns.length-1].time}for(;i.deferredFns.length&&i.deferredFns[0].time<=t;)i.defer.now=i.deferredFns[0].time,i.deferredFns.shift().fn();i.defer.now=t},i.$$baseHref="/",i.baseHref=function(){return this.$$baseHref}},T.mock.$Browser.prototype={poll:function(){T.forEach(this.pollFns,function(e){e()})},url:function(e,t,n){return T.isUndefined(n)&&(n=null),e?(this.$$url=e,this.$$state=T.copy(n),this):this.$$url},state:function(){return this.$$state},notifyWhenNoOutstandingRequests:function(e){e()}},T.mock.$ExceptionHandlerProvider=function(){var e;this.mode=function(t){switch(t){case"log":case"rethrow":var n=[];(e=function(e){if(1==arguments.length?n.push(e):n.push([].slice.call(arguments,0)),"rethrow"===t)throw e}).errors=n;break;default:throw new Error("Unknown mode '"+t+"', only 'log'/'rethrow' modes are allowed!")}},this.$get=function(){return e},this.mode("rethrow")},T.mock.$LogProvider=function(){var t=!0;function n(e,t,n){return e.concat(Array.prototype.slice.call(t,n))}this.debugEnabled=function(e){return T.isDefined(e)?(t=e,this):t},this.$get=function(){var e={log:function(){e.log.logs.push(n([],arguments,0))},warn:function(){e.warn.logs.push(n([],arguments,0))},info:function(){e.info.logs.push(n([],arguments,0))},error:function(){e.error.logs.push(n([],arguments,0))},debug:function(){t&&e.debug.logs.push(n([],arguments,0))},reset:function(){e.log.logs=[],e.info.logs=[],e.warn.logs=[],e.error.logs=[],e.debug.logs=[]},assertEmpty:function(){var n=[];if(T.forEach(["error","warn","info","log","debug"],function(t){T.forEach(e[t].logs,function(e){T.forEach(e,function(e){n.push("MOCK $log ("+t+"): "+String(e)+"\n"+(e.stack||""))})})}),n.length)throw n.unshift("Expected $log to be empty! Either a message was logged unexpectedly, or an expected log message was not checked and removed:"),n.push(""),new Error(n.join("\n---------\n"))}};return e.reset(),e}},T.mock.$IntervalProvider=function(){this.$get=["$browser","$rootScope","$q","$$q",function(u,f,d,h){var p=[],m=0,g=0,e=function(e,t,r,n){var i=4<arguments.length,a=i?Array.prototype.slice.call(arguments,4):[],o=0,s=T.isDefined(n)&&!n,c=(s?h:d).defer(),l=c.promise;return r=T.isDefined(r)?r:0,l.then(null,null,i?function(){e.apply(null,a)}:e),l.$$intervalId=m,p.push({nextTime:g+t,delay:t,fn:function(){var n;c.notify(o++),0<r&&r<=o&&(c.resolve(o),T.forEach(p,function(e,t){e.id===l.$$intervalId&&(n=t)}),T.isDefined(n)&&p.splice(n,1)),s?u.defer.flush():f.$apply()},id:m,deferred:c}),p.sort(function(e,t){return e.nextTime-t.nextTime}),m++,l};return e.cancel=function(n){return!!n&&(T.forEach(p,function(e,t){e.id===n.$$intervalId&&(r=t)}),!!T.isDefined(r)&&(p[r].deferred.reject("canceled"),p.splice(r,1),!0));var r},e.flush=function(e){for(g+=e;p.length&&p[0].nextTime<=g;){var t=p[0];t.fn(),t.nextTime+=t.delay,p.sort(function(e,t){return e.nextTime-t.nextTime})}return e},e}]};var l,a=/^(-?\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?:\:?(\d\d)(?:\:?(\d\d)(?:\.(\d{3}))?)?)?(Z|([+-])(\d\d):?(\d\d)))?$/;function s(e){return parseInt(e,10)}function c(e,t,n){var r="";for(e<0&&(r="-",e=-e),e=""+e;e.length<t;)e="0"+e;return n&&(e=e.substr(e.length-t)),r+e}function e(n,_,b,v){var y=[],w=[],C=[],A=T.bind(C,C.push),S=T.copy;function s(e,t,n,r){return T.isFunction(e)?e:function(){return T.isNumber(e)?[e,t,n,r]:[200,e,t,n]}}function o(r,i,a,o,s,c,e,t,n,l){var u=new x,f=w[0],d=!1;function h(e){return T.isString(e)||T.isFunction(e)||e instanceof RegExp?e:T.toJson(e)}function p(t){return!v&&c&&(c.then?c.then(e):_(e,c)),n;function n(){var e=t.response(r,i,a,s,t.params(i));u.$$respHeaders=e[2],o(S(e[0]),S(e[1]),u.getAllResponseHeaders(),S(e[3]||""))}function e(){for(var e=0,t=C.length;e<t;e++)if(C[e]===n){C.splice(e,1),o(-1,void 0,"");break}}}if(u.$$events=n,u.upload.$$events=l,f&&f.match(r,i)){if(!f.matchData(a))throw new Error("Expected "+f+" with different data\nEXPECTED: "+h(f.data)+"\nGOT:      "+a);if(!f.matchHeaders(s))throw new Error("Expected "+f+" with different headers\nEXPECTED: "+h(f.headers)+"\nGOT:      "+h(s));if(w.shift(),f.response)return void C.push(p(f));d=!0}for(var m,g=-1;m=y[++g];)if(m.match(r,i,a,s||{})){if(m.response)(v?v.defer:A)(p(m));else{if(!m.passThrough)throw new Error("No response defined !");b(r,i,a,o,s,c,e,t,n,l)}return}throw d?new Error("No response defined !"):new Error("Unexpected request: "+r+" "+i+"\n"+(f?"Expected "+f:"No more request expected"))}function r(e){var t={regexp:e},o=t.keys=[];return e&&T.isString(e)&&(e=e.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)([\?\*])?/g,function(e,t,n,r){var i="?"===r?r:null,a="*"===r?r:null;return o.push({name:n,optional:!!i}),t=t||"",(i?"":t)+"(?:"+(i?t:"")+(a?"(.+?)":"([^/]+)")+(i||"")+")"+(i||"")}).replace(/([\/$\*])/g,"\\$1"),t.regexp=new RegExp("^"+e,"i")),t}return o.when=function(e,t,n,r,i){var a=new u(e,t,n,r,i),o={respond:function(e,t,n,r){return a.passThrough=void 0,a.response=s(e,t,n,r),o}};return v&&(o.passThrough=function(){return a.response=void 0,a.passThrough=!0,o}),y.push(a),o},e("when"),o.whenRoute=function(e,t){var n=r(t);return o.when(e,n.regexp,void 0,void 0,n.keys)},o.expect=function(e,t,n,r,i){var a=new u(e,t,n,r,i),o={respond:function(e,t,n,r){return a.response=s(e,t,n,r),o}};return w.push(a),o},e("expect"),o.expectRoute=function(e,t){var n=r(t);return o.expect(e,n.regexp,void 0,void 0,n.keys)},o.flush=function(e,t){if(!1!==t&&n.$digest(),!C.length)throw new Error("No pending request to flush !");if(T.isDefined(e)&&null!==e)for(;e--;){if(!C.length)throw new Error("No more pending request to flush !");C.shift()()}else for(;C.length;)C.shift()();o.verifyNoOutstandingExpectation(t)},o.verifyNoOutstandingExpectation=function(e){if(!1!==e&&n.$digest(),w.length)throw new Error("Unsatisfied requests: "+w.join(", "))},o.verifyNoOutstandingRequest=function(){if(C.length)throw new Error("Unflushed requests: "+C.length)},o.resetExpectations=function(){w.length=0,C.length=0},o;function e(a){T.forEach(["GET","DELETE","JSONP","HEAD"],function(r){o[a+r]=function(e,t,n){return o[a](r,e,void 0,t,n)}}),T.forEach(["PUT","POST","PATCH"],function(i){o[a+i]=function(e,t,n,r){return o[a](i,e,t,n,r)}})}}function u(i,s,t,n,c){function r(e){return e.slice(e.indexOf("?")+1).split("&").sort()}this.data=t,this.headers=n,this.match=function(e,t,n,r){return i==e&&(!!this.matchUrl(t)&&(!(T.isDefined(n)&&!this.matchData(n))&&!(T.isDefined(r)&&!this.matchHeaders(r))))},this.matchUrl=function(e){return!s||(T.isFunction(s.test)?s.test(e):T.isFunction(s)?s(e):s==e||(t=e,s.slice(0,s.indexOf("?"))==t.slice(0,t.indexOf("?"))&&r(s).join()==r(t).join()));var t},this.matchHeaders=function(e){return!!T.isUndefined(n)||(T.isFunction(n)?n(e):T.equals(n,e))},this.matchData=function(e){return!!T.isUndefined(t)||(t&&T.isFunction(t.test)?t.test(e):t&&T.isFunction(t)?t(e):t&&!T.isString(t)?T.equals(T.fromJson(T.toJson(t)),T.fromJson(e)):t==e)},this.toString=function(){return i+" "+s},this.params=function(o){return T.extend((i={},e=-1<o.indexOf("?")?o.substring(o.indexOf("?")+1):"",T.forEach(e.split("&"),function(e){if(e&&(n=e.replace(/\+/g,"%20").split("="),r=a(n[0]),T.isDefined(r))){var t=!T.isDefined(n[1])||a(n[1]);hasOwnProperty.call(i,r)?T.isArray(i[r])?i[r].push(t):i[r]=[i[r],t]:i[r]=t}}),i),function(){var e={};if(!s||!T.isFunction(s.test)||!c||0===c.length)return e;var t=s.exec(o);if(!t)return e;for(var n=1,r=t.length;n<r;++n){var i=c[n-1],a=t[n];i&&a&&(e[i.name||i]=a)}return e}());var n,r,i,e;function a(e){try{return decodeURIComponent(e)}catch(e){}}}}function x(){(x.$$lastInstance=this).open=function(e,t,n){this.$$method=e,this.$$url=t,this.$$async=n,this.$$reqHeaders={},this.$$respHeaders={}},this.send=function(e){this.$$data=e},this.setRequestHeader=function(e,t){this.$$reqHeaders[e]=t},this.getResponseHeader=function(n){var r=this.$$respHeaders[n];return r||(n=T.lowercase(n),(r=this.$$respHeaders[n])||(r=void 0,T.forEach(this.$$respHeaders,function(e,t){r||T.lowercase(t)!=n||(r=e)})),r)},this.getAllResponseHeaders=function(){var n=[];return T.forEach(this.$$respHeaders,function(e,t){n.push(t+": "+e)}),n.join("\n")},this.abort=T.noop,this.$$events={},this.addEventListener=function(e,t){T.isUndefined(this.$$events[e])&&(this.$$events[e]=[]),this.$$events[e].push(t)},this.upload={$$events:{},addEventListener:this.addEventListener}}T.mock.TzDate=function(e,t){var n=new Date(0);if(T.isString(t)){var r=t;if(n.origDate=function(e){var t;if(t=e.match(a)){var n=new Date(0),r=0,i=0;return t[9]&&(r=s(t[9]+t[10]),i=s(t[9]+t[11])),n.setUTCFullYear(s(t[1]),s(t[2])-1,s(t[3])),n.setUTCHours(s(t[4]||0)-r,s(t[5]||0)-i,s(t[6]||0),s(t[7]||0)),n}return e}(t),t=n.origDate.getTime(),isNaN(t))throw{name:"Illegal Argument",message:"Arg '"+r+"' passed into TzDate constructor is not a valid date string"}}else n.origDate=new Date(t);var i=new Date(t).getTimezoneOffset();n.offsetDiff=60*i*1e3-1e3*e*60*60,n.date=new Date(t+n.offsetDiff),n.getTime=function(){return n.date.getTime()-n.offsetDiff},n.toLocaleDateString=function(){return n.date.toLocaleDateString()},n.getFullYear=function(){return n.date.getFullYear()},n.getMonth=function(){return n.date.getMonth()},n.getDate=function(){return n.date.getDate()},n.getHours=function(){return n.date.getHours()},n.getMinutes=function(){return n.date.getMinutes()},n.getSeconds=function(){return n.date.getSeconds()},n.getMilliseconds=function(){return n.date.getMilliseconds()},n.getTimezoneOffset=function(){return 60*e},n.getUTCFullYear=function(){return n.origDate.getUTCFullYear()},n.getUTCMonth=function(){return n.origDate.getUTCMonth()},n.getUTCDate=function(){return n.origDate.getUTCDate()},n.getUTCHours=function(){return n.origDate.getUTCHours()},n.getUTCMinutes=function(){return n.origDate.getUTCMinutes()},n.getUTCSeconds=function(){return n.origDate.getUTCSeconds()},n.getUTCMilliseconds=function(){return n.origDate.getUTCMilliseconds()},n.getDay=function(){return n.date.getDay()},n.toISOString&&(n.toISOString=function(){return c(n.origDate.getUTCFullYear(),4)+"-"+c(n.origDate.getUTCMonth()+1,2)+"-"+c(n.origDate.getUTCDate(),2)+"T"+c(n.origDate.getUTCHours(),2)+":"+c(n.origDate.getUTCMinutes(),2)+":"+c(n.origDate.getUTCSeconds(),2)+"."+c(n.origDate.getUTCMilliseconds(),3)+"Z"});return T.forEach(["getUTCDay","getYear","setDate","setFullYear","setHours","setMilliseconds","setMinutes","setMonth","setSeconds","setTime","setUTCDate","setUTCFullYear","setUTCHours","setUTCMilliseconds","setUTCMinutes","setUTCMonth","setUTCSeconds","setYear","toDateString","toGMTString","toJSON","toLocaleFormat","toLocaleString","toLocaleTimeString","toSource","toString","toTimeString","toUTCString","valueOf"],function(e){n[e]=function(){throw new Error("Method '"+e+"' is not implemented in the TzDate mock")}}),n},T.mock.TzDate.prototype=Date.prototype,T.mock.animate=T.module("ngAnimateMock",["ng"]).config(["$provide",function(e){e.factory("$$forceReflow",function(){function e(){e.totalReflows++}return e.totalReflows=0,e}),e.factory("$$animateAsyncRun",function(){var t=[],e=function(){return function(e){t.push(e)}};return e.flush=function(){if(0===t.length)return!1;for(var e=0;e<t.length;e++)t[e]();return t=[],!0},e}),e.decorator("$$animateJs",["$delegate",function(t){var n=[],e=function(){var e=t.apply(t,arguments);return e&&n.push(e),e};return e.$closeAndFlush=function(){n.forEach(function(e){e.end()}),n=[]},e}]),e.decorator("$animateCss",["$delegate",function(r){var i=[],e=function(e,t){var n=r(e,t);return i.push(n),n};return e.$closeAndFlush=function(){i.forEach(function(e){e.end()}),i=[]},e}]),e.decorator("$animate",["$delegate","$timeout","$browser","$$rAF","$animateCss","$$animateJs","$$forceReflow","$$animateAsyncRun","$rootScope",function(t,e,n,r,i,a,o,s,c){var l={queue:[],cancel:t.cancel,on:t.on,off:t.off,pin:t.pin,get reflows(){return o.totalReflows},enabled:t.enabled,closeAndFlush:function(){this.flush(!0),i.$closeAndFlush(),a.$closeAndFlush(),this.flush()},flush:function(e){c.$digest();for(var t,n=!1;t=!1,r.queue.length&&(r.flush(),t=n=!0),s.flush()&&(t=n=!0),t;);if(!n&&!e)throw new Error("No pending animations ready to be closed or flushed");c.$digest()}};return T.forEach(["animate","enter","leave","move","addClass","removeClass","setClass"],function(e){l[e]=function(){return l.queue.push({event:e,element:arguments[0],options:arguments[arguments.length-1],args:arguments}),t[e].apply(t,arguments)}}),l}])}]),T.mock.dump=function(e){return function t(e){var n;n=T.isElement(e)?(e=T.element(e),n=T.element("<div></div>"),T.forEach(e,function(e){n.append(T.element(e).clone())}),n.html()):T.isArray(e)?(n=[],T.forEach(e,function(e){n.push(t(e))}),"[ "+n.join(", ")+" ]"):T.isObject(e)?T.isFunction(e.$eval)&&T.isFunction(e.$apply)?a(e):e instanceof Error?e.stack||e.name+": "+e.message:T.toJson(e,!0):String(e);return n}(e);function a(e,t){var n=[(t=t||"  ")+"Scope("+e.$id+"): {"];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&!r.match(/^(\$|this)/)&&n.push("  "+r+": "+T.toJson(e[r]));for(var i=e.$$childHead;i;)n.push(a(i,t+"  ")),i=i.$$nextSibling;return n.push("}"),n.join("\n"+t)}},T.mock.$HttpBackendProvider=function(){this.$get=["$rootScope","$timeout",e]},T.mock.$TimeoutDecorator=["$delegate","$browser",function(e,n){return e.flush=function(e){n.defer.flush(e)},e.verifyNoPendingTasks=function(){if(n.deferredFns.length)throw new Error("Deferred tasks to flush ("+n.deferredFns.length+"): "+(e=n.deferredFns,t=[],T.forEach(e,function(e){t.push("{id: "+e.id+", time: "+e.time+"}")}),t.join(", ")));var e,t},e}],T.mock.$RAFDecorator=["$delegate",function(e){var n=function(e){var t=n.queue.length;return n.queue.push(e),function(){n.queue.splice(t,1)}};return n.queue=[],n.supported=e.supported,n.flush=function(){if(0===n.queue.length)throw new Error("No rAF callbacks present");for(var e=n.queue.length,t=0;t<e;t++)n.queue[t]();n.queue=n.queue.slice(t)},n}],T.mock.$RootElementProvider=function(){this.$get=["$injector",function(e){return l=T.element("<div ng-app></div>").data("$injector",e)}]},T.mock.$ControllerDecorator=["$delegate",function(o){return function(e,t,n,r){if(n&&"object"==typeof n){var i=o(e,t,!0,r);T.extend(i.instance,n);var a=i();return a!==i.instance&&T.extend(a,n),a}return o(e,t,n,r)}}],T.mock.$ComponentControllerProvider=["$compileProvider",function(e){this.$get=["$controller","$injector","$rootScope",function(o,s,c){return function(e,t,n,r){var i=s.get(e+"Directive").filter(function(e){return e.controller&&e.controllerAs&&"E"===e.restrict});if(0===i.length)throw new Error("No component found");if(1<i.length)throw new Error("Too many components found");var a=i[0];return(t=t||{}).$scope=t.$scope||c.$new(!0),o(a.controller,t,n,r||a.controllerAs)}}]}],T.module("ngMock",["ng"]).provider({$browser:T.mock.$BrowserProvider,$exceptionHandler:T.mock.$ExceptionHandlerProvider,$log:T.mock.$LogProvider,$interval:T.mock.$IntervalProvider,$httpBackend:T.mock.$HttpBackendProvider,$rootElement:T.mock.$RootElementProvider,$componentController:T.mock.$ComponentControllerProvider}).config(["$provide",function(e){e.decorator("$timeout",T.mock.$TimeoutDecorator),e.decorator("$$rAF",T.mock.$RAFDecorator),e.decorator("$rootScope",T.mock.$RootScopeDecorator),e.decorator("$controller",T.mock.$ControllerDecorator)}]),T.module("ngMockE2E",["ng"]).config(["$provide",function(e){e.value("$httpBackend",T.injector(["ng"]).get("$httpBackend")),e.decorator("$httpBackend",T.mock.e2e.$httpBackendDecorator)}]),T.mock.e2e={},T.mock.e2e.$httpBackendDecorator=["$rootScope","$timeout","$delegate","$browser",e],T.mock.$RootScopeDecorator=["$delegate",function(e){var t=Object.getPrototypeOf(e);return t.$countChildScopes=function(){var e,t=0,n=[this.$$childHead];for(;n.length;)for(e=n.shift();e;)t+=1,n.push(e.$$childHead),e=e.$$nextSibling;return t},t.$countWatchers=function(){var e,t=this.$$watchers?this.$$watchers.length:0,n=[this.$$childHead];for(;n.length;)for(e=n.shift();e;)t+=e.$$watchers?e.$$watchers.length:0,n.push(e.$$childHead),e=e.$$nextSibling;return t},e}],function(e){if(o.jasmine||o.mocha){var s=null,n=new i,a=[],r=function(){return!!s};T.mock.$$annotate=T.injector.$$annotate,T.injector.$$annotate=function(e){return"function"!=typeof e||e.$inject||a.push(e),T.mock.$$annotate.apply(this,arguments)};var t=o.module=T.mock.module=function(){var e=Array.prototype.slice.call(arguments,0);return r()?t():t;function t(){if(s.$injector)throw new Error("Injector already created, can not register a module!");var t,n=s.$modules||(s.$modules=[]);T.forEach(e,function(e){t=T.isObject(e)&&!T.isArray(e)?["$provide",function(n){T.forEach(e,function(e,t){n.value(t,e)})}]:e,s.$providerInjector?s.$providerInjector.invoke(t):n.push(t)})}};t.$$beforeAllHook=o.before||o.beforeAll,t.$$afterAllHook=o.after||o.afterAll,t.$$currentSpec=function(e){if(0===arguments.length)return e;s=e},t.sharedInjector=function(){if(!t.$$beforeAllHook||!t.$$afterAllHook)throw Error("sharedInjector() cannot be used unless your test runner defines beforeAll/afterAll");var e=!1;t.$$beforeAllHook(function(){if(n.shared)throw n.sharedError=Error("sharedInjector() cannot be called inside a context that has already called sharedInjector()"),n.sharedError;e=!0,s=this,n.shared=!0}),t.$$afterAllHook(function(){e?(n=new i,t.$$cleanup()):n.sharedError=null})},t.$$beforeEach=function(){if(n.shared&&s&&s!=this){var t=s;s=this,T.forEach(["$injector","$modules","$providerInjector","$injectorStrict"],function(e){s[e]=t[e],t[e]=null})}else s=this,l=null,a=[]},t.$$afterEach=function(){n.cleanupAfterEach()&&t.$$cleanup()},t.$$cleanup=function(){var e=s.$injector;if(a.forEach(function(e){delete e.$inject}),T.forEach(s.$modules,function(e){e&&e.$$hashKey&&(e.$$hashKey=void 0)}),s.$injector=null,s.$modules=null,s.$providerInjector=null,s=null,e){var t=e.get("$rootElement"),n=t&&t[0],r=l?[l[0]]:[];!n||l&&n===l[0]||r.push(n),T.element.cleanData(r);var i=e.get("$rootScope");i&&i.$destroy&&i.$destroy()}T.forEach(T.element.fragments,function(e,t){delete T.element.fragments[t]}),x.$$lastInstance=null,T.forEach(T.callbacks,function(e,t){delete T.callbacks[t]}),T.callbacks.$$counter=0},(o.beforeEach||o.setup)(t.$$beforeEach),(o.afterEach||o.teardown)(t.$$afterEach);var c=function(e,t){this.message=e.message,this.name=e.name,e.line&&(this.line=e.line),e.sourceId&&(this.sourceId=e.sourceId),e.stack&&t&&(this.stack=e.stack+"\n"+t.stack),e.stackArray&&(this.stackArray=e.stackArray)};c.prototype=Error.prototype,o.inject=T.mock.inject=function(){var a=Array.prototype.slice.call(arguments,0),o=new Error("Declaration Location");if(!o.stack)try{throw o}catch(e){}return r()?e.call(s):e;function e(){var e=s.$modules||[],t=!!s.$injectorStrict;e.unshift(["$injector",function(e){s.$providerInjector=e}]),e.unshift("ngMock"),e.unshift("ng");var n=s.$injector;n||(t&&T.forEach(e,function(e){"function"==typeof e&&T.injector.$$annotate(e)}),n=s.$injector=T.injector(e,t),s.$injectorStrict=t);for(var r=0,i=a.length;r<i;r++){s.$injectorStrict&&n.annotate(a[r]);try{n.invoke(a[r]||T.noop,this)}catch(e){if(e.stack&&o)throw new c(e,o);throw e}finally{o=null}}}},T.mock.inject.strictDi=function(e){return e=!arguments.length||!!e,r()?t():t;function t(){if(e!==s.$injectorStrict){if(s.$injector)throw new Error("Injector already created, can not modify strict annotations");s.$injectorStrict=e}}}}function i(){this.shared=!1,this.sharedError=null,this.cleanupAfterEach=function(){return!this.shared||this.sharedError}}}()}(window,window.angular),angular.module("templates-angularcronjobs",["cronselection.html"]),angular.module("cronselection.html",[]).run(["$templateCache",function(e){e.put("cronselection.html",'<div class="cron-wrap">\n    <span>Every: </span>\n    <div class="cron-select-wrap">\n        <select class="cron-select" ng-model="myFrequency.base" ng-options="item.value as item.label for item in frequency"></select>\n    </div>\n    <div class="select-options">\n        <span ng-show="myFrequency.base == 4">on </span>\n        <div ng-show="myFrequency.base == 4" class="cron-select-wrap">\n            \x3c!-- If Multiple is Enabled --\x3e\n            <select class="cron-select day-value"\n                    ng-model="myFrequency.dayValues"\n                    ng-if="allowMultiple" multiple\n                    ng-options="value as (value | cronDayName: cronStyle) for value in dayValues">\n            </select>\n            \x3c!-- If Multiple is not Enabled --\x3e\n            <select class="cron-select day-value"\n                    ng-model="myFrequency.dayValues"\n                    ng-if="!allowMultiple"\n                    ng-options="value as (value | cronDayName: cronStyle) for value in dayValues">\n            </select>\n        </div>\n        <span ng-show="myFrequency.base >= 5">on the </span>\n        <div ng-show="myFrequency.base >= 5" class="cron-select-wrap">\n            \x3c!-- If Multiple is Enabled --\x3e\n            <select class="cron-select day-of-month-value"\n                    ng-model="myFrequency.dayOfMonthValues"\n                    ng-if="allowMultiple" multiple\n                    ng-options="value as (value | cronNumeral) for value in dayOfMonthValues">\n            </select>\n            \x3c!-- If Multiple is not Enabled --\x3e\n            <select class="cron-select day-of-month-value"\n                    ng-model="myFrequency.dayOfMonthValues"\n                    ng-if="!allowMultiple"\n                    ng-options="value as (value | cronNumeral) for value in dayOfMonthValues">\n            </select>\n        </div>\n        <span ng-show="myFrequency.base == 6">of </span>\n        \x3c!-- If Multiple is Enabled --\x3e\n        <div ng-show="myFrequency.base == 6" class="cron-select-wrap">\n            <select class="cron-select month-value"\n                    ng-model="myFrequency.monthValues"\n                    ng-if="allowMultiple" multiple\n                    ng-options="value as (value | cronMonthName) for value in monthValues">\n            </select>\n            \x3c!-- If Multiple is not Enabled --\x3e\n            <select class="cron-select month-value"\n                    ng-model="myFrequency.monthValues"\n                    ng-if="!allowMultiple"\n                    ng-options="value as (value | cronMonthName) for value in monthValues">\n            </select>\n        </div>\n        <span ng-show="myFrequency.base >= 2">at </span>\n        \x3c!-- If Multiple is Enabled --\x3e\n        <div ng-show="myFrequency.base >= 3" class="cron-select-wrap">\n            <select class="cron-select hour-value"\n                    ng-model="myFrequency.hourValues"\n                    ng-if="allowMultiple" multiple\n                    ng-options="value as value for value in hourValues">\n            </select>\n            \x3c!-- If Multiple is not Enabled --\x3e\n            <select class="cron-select hour-value"\n                    ng-model="myFrequency.hourValues"\n                    ng-if="!allowMultiple"\n                    ng-options="value as value for value in hourValues">\n            </select>\n        </div>\n        <span ng-show="myFrequency.base >= 3"> : </span>\n        \x3c!-- If Multiple is Enabled --\x3e\n        <div ng-show="myFrequency.base >= 2" class="cron-select-wrap">\n            <select class="cron-select minute-value"\n                    ng-model="myFrequency.minuteValues"\n                    ng-if="allowMultiple" multiple\n                    ng-options="value as value for value in minuteValues">\n            </select>\n            \x3c!-- If Multiple is not Enabled --\x3e\n            <select class="cron-select minute-value"\n                    ng-model="myFrequency.minuteValues"\n                    ng-if="!allowMultiple"\n                    ng-options="value as value for value in minuteValues">\n            </select>\n        </div>\n        <span ng-show="myFrequency.base == 2"> past the hour</span>\n    </div>\n</div>')}]),angular.module("angular-cron-jobs",["templates-angularcronjobs"]),angular.module("angular-cron-jobs").directive("cronSelection",["cronService","baseFrequency",function(u,f){return{restrict:"EA",replace:!0,transclude:!0,require:"ngModel",scope:{ngModel:"=",config:"=",myFrequency:"=?frequency"},templateUrl:function(e,t){return t.template||"cronselection.html"},link:function(r,e,t,i){var a=!1;if(r.baseFrequency=f,r.frequency=[{value:1,label:"Minute"},{value:2,label:"Hour"},{value:3,label:"Day"},{value:4,label:"Week"},{value:5,label:"Month"},{value:6,label:"Year"}],r.$watch("ngModel",function(e){angular.isDefined(e)&&e?(a=!0,r.myFrequency=u.fromCron(e,r.allowMultiple,r.cronStyle)):""===e&&(r.myFrequency=void 0)}),"object"==typeof r.config&&!r.config.length){if("object"==typeof r.config.options){var n=Object.keys(r.config.options);for(var o in n){var s=n[o].replace(/^allow/,""),c=n[o];if(!r.config.options[c])for(var l in r.frequency)r.frequency[l].label===s&&r.frequency.splice(l,1)}}angular.isDefined(r.config.allowMultiple)?r.allowMultiple=r.config.allowMultiple:r.allowMultiple=!1,angular.isDefined(r.config.quartz)&&r.config.quartz?r.cronStyle="quartz":r.cronStyle="default"}r.minuteValues=[0,5,10,15,20,25,30,35,40,45,50,55],r.hourValues=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23],r.dayOfMonthValues=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31],r.dayValues=[0,1,2,3,4,5,6],r.monthValues=[1,2,3,4,5,6,7,8,9,10,11,12],"quartz"===r.cronStyle&&(r.dayValues=[1,2,3,4,5,6,7]),r.$watch("myFrequency",function(e,t){if(void 0!==e){!e||!e.base||t&&e.base===t.base||a?e&&e.base&&t&&t.base&&(a=!1):function(e){e.base=parseInt(e.base),e.base>=f.hour&&(e.minuteValues=r.minuteValues[0]);e.base>=f.day&&(e.hourValues=r.hourValues[0]);e.base===f.week&&(e.dayValues=r.dayValues[0]);e.base>=f.month&&(e.dayOfMonthValues=r.dayOfMonthValues[0]);e.base===f.year&&(e.monthValues=r.monthValues[0])}(e);var n=u.setCron(e,r.cronStyle);i.$setViewValue(n)}},!0)}}}]).filter("cronNumeral",function(){return function(e){switch(e){case 1:return"1st";case 2:return"2nd";case 3:return"3rd";case 21:return"21st";case 22:return"22nd";case 23:return"23rd";case 31:return"31st";case null:return null;default:return e+"th"}}}).filter("cronMonthName",function(){return function(e){var t={1:"January",2:"February",3:"March",4:"April",5:"May",6:"June",7:"July",8:"August",9:"September",10:"October",11:"November",12:"December"};return null!==e&&angular.isDefined(t[e])?t[e]:null}}).filter("cronDayName",function(){return function(e,t){var n;return n="quartz"===t?{1:"Sunday",2:"Monday",3:"Tuesday",4:"Wednesday",5:"Thursday",6:"Friday",7:"Saturday"}:{0:"Sunday",1:"Monday",2:"Tuesday",3:"Wednesday",4:"Thursday",5:"Friday",6:"Saturday"},null!==e&&angular.isDefined(n[e])?n[e]:null}}).directive("ngMultiple",function(){return{restrict:"A",scope:{ngMultiple:"="},link:function(e,t){e.$watch("ngMultiple",function(e){e?t.attr("multiple","multiple"):t.removeAttr("multiple")})}}}),angular.module("angular-cron-jobs").value("baseFrequency",{minute:1,hour:2,day:3,week:4,month:5,year:6}).factory("cronService",["baseFrequency",function(o){var e={setCron:function(e,t){return"quartz"===t?this.setQuartzCron(e):this.setDefaultCron(e)},setQuartzCron:function(e){var t=["0","*","*","*","*","?"];return e&&e.base&&e.base>=o.hour&&(t[1]=void 0!==e.minuteValues?e.minuteValues:"0"),e&&e.base&&e.base>=o.day&&(t[2]=void 0!==e.hourValues?e.hourValues:"*"),e&&e.base&&e.base===o.week&&(t[3]="?",t[5]=e.dayValues),e&&e.base&&e.base>=o.month&&(t[3]=void 0!==e.dayOfMonthValues?e.dayOfMonthValues:"?"),e&&e.base&&e.base===o.year&&(t[4]=void 0!==e.monthValues?e.monthValues:"*"),t.join(" ")},setDefaultCron:function(e){var t=["*","*","*","*","*"];return e&&e.base&&e.base>=o.hour&&(t[0]=void 0!==e.minuteValues?e.minuteValues:"*"),e&&e.base&&e.base>=o.day&&(t[1]=void 0!==e.hourValues?e.hourValues:"*"),e&&e.base&&e.base===o.week&&(t[4]=e.dayValues),e&&e.base&&e.base>=o.month&&(t[2]=void 0!==e.dayOfMonthValues?e.dayOfMonthValues:"*"),e&&e.base&&e.base===o.year&&(t[3]=void 0!==e.monthValues?e.monthValues:"*"),t.join(" ")},fromCron:function(e,t,n){return"quartz"===n?this.fromQuartzCron(e,t):this.fromDefaultCron(e,t)},fromDefaultCron:function(e,t){var n=e.replace(/\s+/g," ").split(" "),r={base:"1"},i=[];if("*"===n[0]&&"*"===n[1]&&"*"===n[2]&&"*"===n[3]&&"*"===n[4]?r.base=o.minute:"*"===n[1]&&"*"===n[2]&&"*"===n[3]&&"*"===n[4]?r.base=o.hour:"*"===n[2]&&"*"===n[3]&&"*"===n[4]?r.base=o.day:"*"===n[2]&&"*"===n[3]?r.base=o.week:"*"===n[3]&&"*"===n[4]?r.base=o.month:"*"===n[4]&&(r.base=o.year),"*"!==n[0])if(t){i=n[0].split(",");for(var a=0;a<i.length;a++)i[a]=+i[a];r.minuteValues=i}else r.minuteValues=parseInt(n[0]);if("*"!==n[1])if(t){i=n[1].split(",");for(a=0;a<i.length;a++)i[a]=+i[a];r.hourValues=i}else r.hourValues=parseInt(n[1]);if("*"!==n[2])if(t){i=n[2].split(",");for(a=0;a<i.length;a++)i[a]=+i[a];r.dayOfMonthValues=i}else r.dayOfMonthValues=parseInt(n[2]);if("*"!==n[3])if(t){i=n[3].split(",");for(a=0;a<i.length;a++)i[a]=+i[a];r.monthValues=i}else r.monthValues=parseInt(n[3]);if("*"!==n[4])if(t){i=n[4].split(",");for(a=0;a<i.length;a++)i[a]=+i[a];r.dayValues=i}else r.dayValues=parseInt(n[4]);return r},fromQuartzCron:function(e,t){var n=e.replace(/\s+/g," ").split(" "),r={base:"1"},i=[];if("*"===n[1]&&"*"===n[2]&&"*"===n[3]&&"*"===n[4]&&"?"===n[5]?r.base=1:"*"===n[2]&&"*"===n[3]&&"*"===n[4]&&"?"===n[5]?r.base=2:"*"===n[3]&&"*"===n[4]&&"?"===n[5]?r.base=3:"?"===n[3]?r.base=4:"*"===n[4]&&"?"===n[5]?r.base=5:"?"===n[5]&&(r.base=6),"*"!==n[1])if(t){i=n[1].split(",");for(var a=0;a<i.length;a++)i[a]=+i[a];r.minuteValues=i}else r.minuteValues=parseInt(n[1]);if("*"!==n[2])if(t){i=n[2].split(",");for(a=0;a<i.length;a++)i[a]=+i[a];r.hourValues=i}else r.hourValues=parseInt(n[2]);if("*"!==n[3]&&"?"!==n[3])if(t){i=n[3].split(",");for(a=0;a<i.length;a++)i[a]=+i[a];r.dayOfMonthValues=i}else r.dayOfMonthValues=parseInt(n[3]);if("*"!==n[4])if(t){i=n[4].split(",");for(a=0;a<i.length;a++)i[a]=+i[a];r.monthValues=i}else r.monthValues=parseInt(n[4]);if("*"!==n[5]&&"?"!==n[5])if(t){i=n[5].split(",");for(a=0;a<i.length;a++)i[a]=+i[a];r.dayValues=i}else r.dayValues=parseInt(n[5]);return r}};return e}]),function(){"use strict";angular.module("ngEmbed",["ngSanitize"]).filter("embed",["$sce",function(c){var l=[{text:":)",class:"smiley",code:"e60a"},{text:":D",class:"happy",code:"e608"},{text:":d",class:"happy",code:"e608"},{text:":(",class:"sad",code:"e60e"},{text:":/",class:"wondering",code:"e620"},{text:":P",class:"tongue",code:"e60c"},{text:":p",class:"tongue",code:"e60c"},{text:"3:)",class:"evil",code:"e618"},{text:"(^)",class:"thumbsup2",code:"e607"},{text:";)",class:"wink",code:"e610"},{text:":o",class:"shocked",code:"e61a"},{text:"-_-",class:"neutral",code:"e61e"},{text:"(y)",class:"thumbs-up",code:"e606"},{text:":*",class:"heart",code:"e604"},{text:"&lt;3",class:"heart",code:"e604"},{text:"<3",class:"heart",code:"e604"},{text:"&lt;/3",class:"heart-broken",code:"e605"},{text:"</3",class:"heart-broken",code:"e605"},{text:"^_^",class:"grin",code:"e612"},{text:"8-)",class:"cool",code:"e614"},{text:"8|",class:"cool",code:"e614"},{text:":S",class:"confused",code:"e61c"},{text:":s",class:"confused",code:"e61c"}],u=["bowtie","smile","laughing","blush","smiley","relaxed","smirk","heart_eyes","kissing_heart","kissing_closed_eyes","flushed","relieved","satisfied","grin","wink","stuck_out_tongue_winking_eye","stuck_out_tongue_closed_eyes","grinning","kissing","winky_face","kissing_smiling_eyes","stuck_out_tongue","sleeping","worried","frowning","anguished","open_mouth","grimacing","confused","hushed","expressionless","unamused","sweat_smile","sweat","wow","disappointed_relieved","weary","pensive","disappointed","confounded","fearful","cold_sweat","persevere","cry","sob","joy","astonished","scream","neckbeard","tired_face","angry","rage","triumph","sleepy","yum","mask","sunglasses","dizzy_face","imp","smiling_imp","neutral_face","no_mouth","innocent","alien","yellow_heart","blue_heart","purple_heart","heart","green_heart","broken_heart","heartbeat","heartpulse","two_hearts","revolving_hearts","cupid","sparkling_heart","sparkles","star","star2","dizzy","boom","collision","anger","exclamation","question","grey_exclamation","grey_question","zzz","dash","sweat_drops","notes","musical_note","fire","hankey","poop","shit","\\+1","thumbsup","-1","thumbsdown","ok_hand","punch","facepunch","fist","v","wave","hand","raised_hand","open_hands","point_up","point_down","point_left","point_right","raised_hands","pray","point_up_2","clap","muscle","metal","fu","walking","runner","running","couple","family","two_men_holding_hands","two_women_holding_hands","dancer","dancers","ok_woman","no_good","information_desk_person","raising_hand","bride_with_veil","person_with_pouting_face","person_frowning","bow","couplekiss","couple_with_heart","massage","haircut","nail_care","boy","girl","woman","man","baby","older_woman","older_man","person_with_blond_hair","man_with_gua_pi_mao","man_with_turban","construction_worker","cop","angel","princess","smiley_cat","smile_cat","heart_eyes_cat","kissing_cat","smirk_cat","scream_cat","crying_cat_face","joy_cat","pouting_cat","japanese_ogre","japanese_goblin","see_no_evil","hear_no_evil","speak_no_evil","guardsman","skull","feet","lips","kiss","droplet","ear","eyes","nose","tongue","love_letter","bust_in_silhouette","busts_in_silhouette","speech_balloon","thought_balloon","feelsgood","finnadie","goberserk","godmode","hurtrealbad","rage1","rage2","rage3","rage4","suspect","trollface","sunny","umbrella","cloud","snowflake","snowman","zap","cyclone","foggy","ocean","cat","dog","mouse","hamster","rabbit","wolf","frog","tiger","koala","bear","pig","pig_nose","cow","boar","monkey_face","monkey","horse","racehorse","camel","sheep","elephant","panda_face","snake","bird","baby_chick","hatched_chick","hatching_chick","chicken","penguin","turtle","bug","honeybee","ant","beetle","snail","octopus","tropical_fish","fish","whale","whale2","dolphin","cow2","ram","rat","water_buffalo","tiger2","rabbit2","dragon","goat","rooster","dog2","pig2","mouse2","ox","dragon_face","blowfish","crocodile","dromedary_camel","leopard","cat2","poodle","paw_prints","bouquet","cherry_blossom","tulip","four_leaf_clover","rose","sunflower","hibiscus","maple_leaf","leaves","fallen_leaf","herb","mushroom","cactus","palm_tree","evergreen_tree","deciduous_tree","chestnut","seedling","blossom","ear_of_rice","shell","globe_with_meridians","sun_with_face","full_moon_with_face","new_moon_with_face","new_moon","waxing_crescent_moon","first_quarter_moon","waxing_gibbous_moon","full_moon","waning_gibbous_moon","last_quarter_moon","waning_crescent_moon","last_quarter_moon_with_face","first_quarter_moon_with_face","moon","earth_africa","earth_americas","earth_asia","volcano","milky_way","partly_sunny","octocat","squirrel","bamboo","gift_heart","dolls","school_satchel","mortar_board","flags","fireworks","sparkler","wind_chime","rice_scene","jack_o_lantern","ghost","santa","christmas_tree","gift","bell","no_bell","tanabata_tree","tada","confetti_ball","balloon","crystal_ball","cd","dvd","floppy_disk","camera","video_camera","movie_camera","computer","tv","iphone","phone","telephone","telephone_receiver","pager","fax","minidisc","vhs","sound","speaker","mute","loudspeaker","mega","hourglass","hourglass_flowing_sand","alarm_clock","watch","radio","satellite","loop","mag","mag_right","unlock","lock","lock_with_ink_pen","closed_lock_with_key","key","bulb","flashlight","high_brightness","low_brightness","electric_plug","battery","calling","email","mailbox","postbox","bath","bathtub","shower","toilet","wrench","nut_and_bolt","hammer","seat","moneybag","yen","dollar","pound","euro","credit_card","money_with_wings","e-mail","inbox_tray","outbox_tray","envelope","incoming_envelope","postal_horn","mailbox_closed","mailbox_with_mail","mailbox_with_no_mail","door","smoking","bomb","gun","hocho","pill","syringe","page_facing_up","page_with_curl","bookmark_tabs","bar_chart","chart_with_upwards_trend","chart_with_downwards_trend","scroll","clipboard","calendar","date","card_index","file_folder","open_file_folder","scissors","pushpin","paperclip","black_nib","pencil2","straight_ruler","triangular_ruler","closed_book","green_book","blue_book","orange_book","notebook","notebook_with_decorative_cover","ledger","books","bookmark","name_badge","microscope","telescope","newspaper","football","basketball","soccer","baseball","tennis","8ball","rugby_football","bowling","golf","mountain_bicyclist","bicyclist","horse_racing","snowboarder","swimmer","surfer","ski","spades","hearts","clubs","diamonds","gem","ring","trophy","musical_score","musical_keyboard","violin","space_invader","video_game","black_joker","flower_playing_cards","game_die","dart","mahjong","clapper","memo","pencil","book","art","microphone","headphones","trumpet","saxophone","guitar","shoe","sandal","high_heel","lipstick","boot","shirt","tshirt","necktie","womans_clothes","dress","running_shirt_with_sash","jeans","kimono","bikini","ribbon","tophat","crown","womans_hat","mans_shoe","closed_umbrella","briefcase","handbag","pouch","purse","eyeglasses","fishing_pole_and_fish","coffee","tea","sake","baby_bottle","beer","beers","cocktail","tropical_drink","wine_glass","fork_and_knife","pizza","hamburger","fries","poultry_leg","meat_on_bone","spaghetti","curry","fried_shrimp","bento","sushi","fish_cake","rice_ball","rice_cracker","rice","ramen","stew","oden","dango","egg","bread","doughnut","custard","icecream","ice_cream","shaved_ice","birthday","cake","cookie","chocolate_bar","candy","lollipop","honey_pot","apple","green_apple","tangerine","lemon","cherries","grapes","watermelon","strawberry","peach","melon","banana","pear","pineapple","sweet_potato","eggplant","tomato","corn","house","house_with_garden","school","office","post_office","hospital","bank","convenience_store","love_hotel","hotel","wedding","church","department_store","european_post_office","city_sunrise","city_sunset","japanese_castle","european_castle","tent","factory","tokyo_tower","japan","mount_fuji","sunrise_over_mountains","sunrise","stars","themoreyouknow","tmyk","statue_of_liberty","bridge_at_night","carousel_horse","rainbow","ferris_wheel","fountain","roller_coaster","ship","speedboat","boat","sailboat","rowboat","anchor","rocket","airplane","helicopter","steam_locomotive","tram","mountain_railway","bike","aerial_tramway","suspension_railway","mountain_cableway","tractor","blue_car","oncoming_automobile","car","red_car","taxi","oncoming_taxi","articulated_lorry","bus","oncoming_bus","rotating_light","police_car","oncoming_police_car","fire_engine","ambulance","minibus","truck","train","station","train2","bullettrain_front","bullettrain_side","light_rail","monorail","railway_car","trolleybus","ticket","fuelpump","vertical_traffic_light","traffic_light","warning","construction","beginner","atm","slot_machine","busstop","barber","hotsprings","checkered_flag","crossed_flags","izakaya_lantern","moyai","circus_tent","performing_arts","round_pushpin","triangular_flag_on_post","jp","kr","cn","us","fr","es","it","ru","gb","uk","de","one","two","three","four","five","six","seven","eight","nine","keycap_ten","1234","zero","hash","symbols","arrow_backward","arrow_down","arrow_forward","arrow_left","capital_abcd","abcd","abc","arrow_lower_left","arrow_lower_right","arrow_right","arrow_up","arrow_upper_left","arrow_upper_right","arrow_double_down","arrow_double_up","arrow_down_small","arrow_heading_down","arrow_heading_up","leftwards_arrow_with_hook","arrow_right_hook","left_right_arrow","arrow_up_down","arrow_up_small","arrows_clockwise","arrows_counterclockwise","rewind","fast_forward","information_source","ok","twisted_rightwards_arrows","repeat","repeat_one","new","top","up","cool","free","ng","cinema","koko","signal_strength","u5272","u5408","u55b6","u6307","u6708","u6709","u6e80","u7121","u7533","u7a7a","u7981","sa","restroom","mens","womens","baby_symbol","no_smoking","parking","wheelchair","metro","baggage_claim","accept","wc","potable_water","put_litter_in_its_place","secret","congratulations","m","passport_control","left_luggage","customs","ideograph_advantage","cl","sos","id","no_entry_sign","underage","no_mobile_phones","do_not_litter","non-potable_water","no_bicycles","no_pedestrians","children_crossing","no_entry","eight_spoked_asterisk","eight_pointed_black_star","heart_decoration","vs","vibration_mode","mobile_phone_off","chart","currency_exchange","aries","taurus","gemini","cancer","leo","virgo","libra","scorpius","sagittarius","capricorn","aquarius","pisces","ophiuchus","six_pointed_star","negative_squared_cross_mark","a","b","ab","o2","diamond_shape_with_a_dot_inside","recycle","end","on","soon","clock1","clock130","clock10","clock1030","clock11","clock1130","clock12","clock1230","clock2","clock230","clock3","clock330","clock4","clock430","clock5","clock530","clock6","clock630","clock7","clock730","clock8","clock830","clock9","clock930","heavy_dollar_sign","copyright","registered","tm","x","heavy_exclamation_mark","bangbang","interrobang","o","heavy_multiplication_x","heavy_plus_sign","heavy_minus_sign","heavy_division_sign","white_flower","100","heavy_check_mark","ballot_box_with_check","radio_button","link","curly_loop","wavy_dash","part_alternation_mark","trident","black_square","white_square","white_check_mark","black_square_button","white_square_button","black_circle","white_circle","red_circle","large_blue_circle","large_blue_diamond","large_orange_diamond","small_blue_diamond","small_orange_diamond","small_red_triangle","small_red_triangle_down","shipit"];return function(e,t){var n={fontSmiley:!0,emoji:!0,link:!0,linkTarget:"_self"};if(function n(r){return angular.forEach(arguments,function(e){e!==r&&angular.forEach(e,function(e,t){r[t]&&r[t].constructor&&r[t].constructor===Object?n(r[t],e):r[t]=e})}),r}(n,t),null!=e){if("object"==typeof e)return e;var r,i,a,o,s={"&":"&amp;",">":"&gt;","<":"&lt;"};return angular.isNumber(e)||(e=e.toString()),e=e.replace(/[&<>]/g,function(e){return s[e]}),n.fontSmiley&&(r=e.split(" "),angular.forEach(l,function(e){for(var t=0;t<r.length;t++)r[t]===e.text&&(r[t]='<i class="ne-emoticon" title="'+e.text+'">&#x'+e.code+"</i>")}),e=r.join(" ")),n.emoji&&(i=e,a=new RegExp(":("+u.join("|")+"):","g"),e=i.replace(a,function(e,t){return"<i class='emoticon emoticon-"+t+"' title=':"+t+":'></i>"})),n.link&&(o=/^[a-z]+\:\/\//i,e=e.replace(/\b(?:(https?|ftp|file):\/\/|www\.)[-A-Z0-9+()&@$#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|]/gi,function(e){var t=e;return o.test(e)||(t="http://"+e),"cordova"==n.linkTarget?'<a href="#" onclick="window.open(\''+t+"', '_system', 'location=yes')\" >"+e+"</a>":'<a href="'+t+'" target="'+n.linkTarget+'">'+e+"</a>"})),c.trustAsHtml(e)}}}]).directive("ngEmbed",["$filter","$sce","$http","$timeout","$templateCache",function(w,C,A,S,e){return e.put("",'<div ng-bind-html="neText"></div> <div class="ne-video" ng-if="video.host" class="fade"> <div class="ne-video-preview" ng-hide="nePlayVideo || !options.video.details"> <div class="ne-video-thumb" ng-click="nePlayVideo=!nePlayVideo"> <img ng-src="{{video.thumbnail}}" alt=""/> <i class="fa fa-play-circle-o"></i> </div> <div class="ne-video-detail"> <div class="ne-video-title"> <a ng-href="{{video.url}}">{{video.title}}</a> </div> <div class="ne-video-desc"> {{video.description}} </div> <div class="ne-video-stats"> <span><i class="fa fa-eye"></i> {{video.views}}</span> <span><i class="fa fa-heart"></i> {{video.likes}}</span> </div> </div> </div> <div class="ne-video-player" ng-if="nePlayVideo || !(options.video.details)"> <iframe ng-src="{{video.embedSrc}}" frameBorder="0" width="{{video.width}}" height="{{video.height}}" webkitallowfullscreen mozallowfullscreen allowfullscreen></iframe> </div> </div> <div class="ne-video" ng-if="video.basic"> <div class="ne-video-player"> <div class="player"> <video ng-src="{{video.basic}}" controls></video> </div> </div> </div> <div ng-init="neImageLong=false" ng-class="{false:\'ne-image\', true:\'ne-image ne-image-long\'}[neImageLong]" ng-if="image.url"> <div class="ne-image-wrapper"> <img ng-src="{{image.url}}" ng-click="neImageLong=!neImageLong" alt=""/> </div> </div> <div class="ne-pdf" ng-if="pdf.url"> <div class="ne-pdf-preview" ng-hide="neShowPdf"> <div class="ne-pdf-icon"> <i class="fa fa-file-pdf-o"></i> </div> <div class="ne-pdf-detail" > <div class="ne-pdf-title"> <a href="">{{pdf.url}}</a> </div> <div class="ne-pdf-view"> <button><i class="fa fa-download"></i> <a ng-href="{{pdf.url}}" target="_blank">Download</a></button> <button ng-click="neShowPdf=!neShowPdf"><i class="fa fa-eye"></i> View PDF</button> </div> </div> </div> <div class="ne-pdf-viewer" ng-if="neShowPdf" ng-show="neShowPdf"> <iframe ng-src="{{pdf.url}}" frameBorder="0"></iframe> </div> </div> <div class="ne-audio" ng-if="audio.url"> <audio ng-src="{{audio.url}}" controls></audio> </div> <div ng-if="tweets" ng-repeat="tweet in tweets"> <div ng-bind-html="tweet"></div> </div> <div ng-if="videoServices" class="ne-video" ng-repeat="v in videoServices"> <div class="ne-video-player"> <div class="player"> <div ng-bind-html="v"></div> </div> </div> </div> <div ng-if="audioServices" class="ne-audio" ng-repeat="a in audioServices"> <div ng-bind-html="a"></div> </div> <div ng-if="codeServices" class="ne-embed" ng-repeat="c in codeServices"> <div ng-bind-html="c"></div> </div> <div ng-if="gist" class="ne-gist" ng-repeat="g in gist"> <ne-gist id="{{g}}"></ne-gist> </div>'),{restrict:"AE",scope:!0,templateUrl:function(e,t){return t.embedTemplateUrl||""},link:function(s,e,t){var n=s.$eval(t.embedData),r=s.$eval(t.embedOptions);s.video={},s.image={},s.pdf={},s.audio={},s.videoServices=[],s.audioServices=[],s.codeServices=[];var i={fontSmiley:!0,emoji:!0,link:!0,linkTarget:"_self",pdf:{embed:!0},image:{embed:!(s.gist=[])},audio:{embed:!0},code:{highlight:!0,lineNumbers:!1},basicVideo:!1,gdevAuth:null,video:{embed:!1,width:null,height:null,ytTheme:"dark",details:!1,thumbnailQuality:"medium"},tweetEmbed:!0,tweetOptions:{maxWidth:550,hideMedia:!1,hideThread:!1,align:"none",lang:"en"},twitchtvEmbed:!0,dailymotionEmbed:!0,tedEmbed:!0,dotsubEmbed:!0,liveleakEmbed:!0,soundCloudEmbed:!0,soundCloudOptions:{height:160,themeColor:"f50000",autoPlay:!1,hideRelated:!1,showComments:!0,showUser:!0,showReposts:!1,visual:!1,download:!1},spotifyEmbed:!0,codepenEmbed:!0,codepenHeight:300,jsfiddleEmbed:!0,jsfiddleHeight:300,jsbinEmbed:!0,jsbinHeight:300,plunkerEmbed:!0,githubgistEmbed:!0,ideoneEmbed:!0,ideoneHeight:300};!function n(r){return angular.forEach(arguments,function(e){e!==r&&angular.forEach(e,function(e,t){r[t]&&r[t].constructor&&r[t].constructor===Object?n(r[t],e):r[t]=e})}),r}(i,r),String.prototype.trunc=function(e,t){var n=this.length>e,r=n?this.substr(0,e-1):this;return r=t&&n?r.substr(0,r.lastIndexOf(" ")):r,n?r+"...":r},Array.prototype.getUnique=function(){for(var e={},t=[],n=0,r=this.length;n<r;++n)e.hasOwnProperty(this[n])||(t.push(this[n]),e[this[n]]=1);return t};var c={calcDimensions:function(e){var t={width:null,height:null};return t.width=e.video.width,t.height=e.video.height,e.video.height&&e.video.width||(e.video.height?t.width=e.video.height/390*640:e.video.width?t.height=t.width/640*390:(t.width=640,t.height=390)),t},embed:function(e,r){if(e.match(/https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com(?:\/embed\/|\/v\/|\/watch\?v=|\/ytscreeningroom\?v=|\/feeds\/api\/videos\/|\/user\S*[^\w\-\s]|\S*[^\w\-\s]))([\w\-]{11})[?=&+%\w-]*/gi)){var i=this.calcDimensions(r);return s.video.id=RegExp.$1,r.video.details?A.get("https://www.googleapis.com/youtube/v3/videos?id="+RegExp.$1+"&key="+r.gdevAuth+"&part=snippet,statistics").success(function(e){var t=void 0===r.video.autoPlay||!0===r.video.autoPlay?"?autoplay=1":"?autoplay=0",n=e.items[0];s.video.host="youtube",s.video.title=n.snippet.title,s.video.thumbnail=n.snippet.thumbnails.medium.url,s.video.description=n.snippet.description.trunc(250,!0).replace(/\n/g," ").replace(/&#10;/g," "),s.video.rawDescription=n.snippet.description,s.video.views=n.statistics.viewCount,s.video.likes=n.statistics.likeCount,s.video.uploader=n.snippet.channelTitle,s.video.uploaderPage="https://www.youtube.com/channel/"+n.snippet.channelId,s.video.uploadDate=n.snippet.publishedAt,s.video.url=C.trustAsResourceUrl("https://www.youtube.com/watch?v="+n.id),s.video.embedSrc=C.trustAsResourceUrl("https://www.youtube.com/embed/"+s.video.id+t),s.video.width=i.width,s.video.height=i.height}):(s.video.width=i.width,s.video.height=i.height,s.video.host="youtube",s.video.embedSrc=C.trustAsResourceUrl("https://www.youtube.com/embed/"+RegExp.$1+"?autoplay=0")),e}if(e.match(/https?:\/\/(?:www\.)?vimeo.com\/(?:channels\/(?:\w+\/)?|groups\/([^\/]*)\/videos\/|album\/(\d+)\/video\/|)(\d+)(?:$|\/|\?)*/gi)){var n=this.calcDimensions(r);s.video.id=RegExp.$3,r.video.details?A.get("https://vimeo.com/api/v2/video/"+RegExp.$3+".json").success(function(e){var t=void 0===r.video.autoPlay||!0===r.video.autoPlay?"&autoplay=1":"&autoplay=0";s.video.host="vimeo",s.video.title=e[0].title,s.video.rawDescription=e[0].description.replace(/\n/g,"<br/>").replace(/&#10;/g,"<br/>"),s.video.description=e[0].description.replace(/((<|&lt;)br\s*\/*(>|&gt;)\r\n)/g," ").trunc(250,!0),s.video.thumbnail=e[0].thumbnail_medium,s.video.views=e[0].stats_number_of_plays,s.video.likes=e[0].stats_number_of_likes,s.video.uploader=e[0].user_name,s.video.uploaderPage=e[0].user_url,s.video.uploadDate=e[0].uploadDate,s.video.url=e[0].url,s.video.embedSrc=C.trustAsResourceUrl("//player.vimeo.com/video/"+e[0].id+"?title=0&byline=0&portrait=0"+t),s.video.width=n.width,s.video.height=n.height}):(s.video.width=n.width,s.video.height=n.height,s.video.host="vimeo",s.video.embedSrc=C.trustAsResourceUrl("//player.vimeo.com/video/"+RegExp.$3+"?title=0&byline=0&portrait=0&autoplay=0"))}return e},embedBasic:function(e){return e.match(/((?:https?):\/\/\S*\.(?:ogv|webm|mp4))/gi)&&(s.video.basic=C.trustAsResourceUrl(RegExp.$1)),e},twitchtvEmbed:function(e,t){var n=/www.twitch.tv\/[a-zA_Z0-9_]+/gi,r=e.match(n)?e.match(n).getUnique():null,i=c.calcDimensions(t);if(r)for(var a=0;a<r.length;){var o=C.trustAsHtml('<object bgcolor="#000000" data="//www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf" height="'+i.height+'" id="clip_embed_player_flash" type="application/x-shockwave-flash" width="'+i.width+'"><param name="movie" value="http://www-cdn.jtvnw.net/swflibs/TwitchPlayer.swf" /><param name="allowScriptAccess" value="always" /><param name="allowNetworking" value="all" /><param name="allowFullScreen" value="true" /><param name="flashvars" value="channel='+r[a].split("/")[1]+'&auto_play=false" /></object>');s.videoServices.push(o),a++}return e},dailymotionEmbed:function(e,t){var n=/dailymotion.com\/video\/[a-zA-Z0-9-_]+/gi,r=e.match(n)?e.match(n).getUnique():null,i=c.calcDimensions(t);if(r)for(var a=0;a<r.length;){var o=C.trustAsHtml('<iframe src="http://www.dailymotion.com/embed/video/'+r[a].split("/")[2]+'" height="'+i.height+'" width="'+i.width+'"></iframe>');s.videoServices.push(o),a++}return e},tedEmbed:function(e,t){var n=/ted.com\/talks\/[a-zA-Z0-9_]+/gi,r=e.match(n)?e.match(n).getUnique():null,i=c.calcDimensions(t);if(r)for(var a=0;a<r.length;){var o=C.trustAsHtml('<iframe src="https://embed.ted.com/talks/'+r[a].split("/")[2]+'.html" height="'+i.height+'" width="'+i.width+'"></iframe>');s.videoServices.push(o),a++}return e},dotsubEmbed:function(e,t){var n=/dotsub.com\/view\/[a-zA-Z0-9-]+/gi,r=e.match(n)?e.match(n).getUnique():null,i=c.calcDimensions(t);if(r)for(var a=0;a<r.length;){var o=C.trustAsHtml('<iframe src="https://dotsub.com/media/'+r[a].split("/")[2]+'/embed/" width="'+i.width+'" height="'+i.height+'"></iframe>');s.videoServices.push(o),a++}return e},liveleakEmbed:function(e,t){var n=/liveleak.com\/view\?i=[a-zA-Z0-9_]+/gi,r=e.match(n)?e.match(n).getUnique():null,i=c.calcDimensions(t);if(r)for(var a=0;a<r.length;){var o=C.trustAsHtml('<iframe src="http://www.liveleak.com/e/'+r[a].split("=")[1]+'" height="'+i.height+'" width="'+i.width+'"></iframe></div>');s.videoServices.push(o),a++}return e}},a=function(e){return e.match(/((?:https?):\/\/\S*\.(?:wav|mp3|ogg))/gi)&&(s.audio.url=C.trustAsResourceUrl(RegExp.$1)),e},o=function(e,t){var n=/soundcloud.com\/[a-zA-Z0-9-_]+\/[a-zA-Z0-9-_]+/gi,r=e.match(n)?e.match(n).getUnique():null;if(r)for(var i=0;i<r.length;){var a=C.trustAsHtml('<iframe height="160" scrolling="no" src="https://w.soundcloud.com/player/?url=https://'+r[i]+"&auto_play="+t.soundCloudOptions.autoPlay+"&hide_related="+t.soundCloudOptions.hideRelated+"&show_comments="+t.soundCloudOptions.showComments+"&show_user="+t.soundCloudOptions.showUser+"&show_reposts="+t.soundCloudOptions.showReposts+"&visual="+t.soundCloudOptions.visual+"&download="+t.soundCloudOptions.download+"&color="+t.soundCloudOptions.themeColor+"&theme_color="+t.soundCloudOptions.themeColor+'"></iframe>');s.videoServices.push(a),i++}return e},l=function(e){var t=/spotify.com\/track\/[a-zA-Z0-9_]+/gi,n=e.match(t)?e.match(t).getUnique():null;if(n)for(var r=0;r<n.length;){var i=C.trustAsHtml('<iframe src="https://embed.spotify.com/?uri=spotify:track:'+n[r].split("/")[2]+'" height="80"></iframe>');s.audioServices.push(i),r++}return e},u=function(e){return e.match(/((?:https?):\/\/\S*\.(?:gif|jpg|jpeg|tiff|png|svg|webp))/gi)&&(s.image.url=RegExp.$1),e},f=function(e){return e=e.replace(/(`+)(\s|[a-z]+)\s*([\s\S]*?[^`])\s*\1(?!`)/gm,function(e,t,n,r){var i=r;i=(i=(i=i.replace(/^([ \t]*)/g,"")).replace(/[ \t]*$/g,"")).replace(/:\/\//g,"~P");var a=[];return n&&a.push(n),'<pre><code class="ne-code hljs '+n+'">'+hljs.highlightAuto(i,a).value+"</code></pre>"})},d=function(e){return e.match(/((?:https?):\/\/\S*\.(?:pdf|PDF))/gi)&&(s.pdf.url=C.trustAsResourceUrl(RegExp.$1)),e},h=function(e,t){if(!window.twttr)throw new ReferenceError("twttr is not defined. Load http://platform.twitter.com/widgets.js");var n=/https:\/\/twitter\.com\/\w+\/\w+\/\d+/gi,r=e.match(n)?e.match(n).getUnique():null;if(s.tweets=[],r)for(var i=0;i<r.length;){var a="https://api.twitter.com/1/statuses/oembed.json?omit_script=true&callback=JSON_CALLBACK&url="+r[i]+"&maxwidth="+t.tweetOptions.maxWidth+"&hide_media="+t.tweetOptions.hideMedia+"&hide_thread="+t.tweetOptions.hideThread+"&align="+t.tweetOptions.align+"&lang="+t.tweetOptions.lang;A.jsonp(a).success(function(e){s.tweets.push(e.html),s.tweets.length==r.length&&S(function(){twttr.widgets.load()},10)}),i++}return e},p=function(e,t){var n=/http:\/\/codepen.io\/([A-Za-z0-9_]+)\/pen\/([A-Za-z0-9_]+)/gi,r=e.match(n)?e.match(n).getUnique():null;if(r)for(var i=0;i<r.length;){var a=C.trustAsHtml('<iframe scrolling="no" height="'+t.codepenHeight+'" src="'+r[i].replace(/\/pen\//,"/embed/")+"/?height="+t.codepenHeight+'" frameborder="no" allowtransparency="true" allowfullscreen="true"></iframe>');s.codeServices.push(a),i++}return e},m=function(e,t){var n=/jsfiddle.net\/[a-zA-Z0-9_]+\/[a-zA-Z0-9_]+/gi,r=e.match(n)?e.match(n).getUnique():null;if(r)for(var i=0;i<r.length;){var a=C.trustAsHtml('<iframe height="'+t.jsfiddleHeight+'" src="http://'+r[i]+'/embedded"></iframe>');s.codeServices.push(a),i++}return e},g=function(e,t){var n=/jsbin.com\/[a-zA-Z0-9_]+\/[0-9_]+/gi,r=e.match(n)?e.match(n).getUnique():null;if(r)for(var i=0;i<r.length;){var a=C.trustAsHtml('<iframe height="'+t.jsbinHeight+'" class="jsbin-embed foo" src="http://'+r[i]+'/embed?html,js,output">Simple Animation Tests</iframe>');s.codeServices.push(a),i++}return e},_=function(e,t){var n=/plnkr.co\/edit\/[a-zA-Z0-9\?=]+/gi,r=e.match(n)?e.match(n).getUnique():null;if(r)for(var i=0;i<r.length;){var a=-1===r[i].indexOf("?")?r[i].split("/")[2]:r[i].split("/")[2].split("?")[0],o=C.trustAsHtml('<iframe class="ne-plunker" src="http://embed.plnkr.co/'+a+'" height="'+t.jsbinHeight+'"></iframe>');s.codeServices.push(o),i++}return e},b=function(e){var t=/gist.github.com\/[a-zA-Z0-9_-]+\/([a-zA-Z0-9]+)/g,n=e.match(t)?e.match(t).getUnique():null;if(n)for(var r=0;r<n.length;)s.gist.push(n[r].split("/")[2]),r++;return e},v=function(e,t){var n=/ideone.com\/[a-zA-Z0-9]{6}/gi,r=e.match(n)?e.match(n).getUnique():null;if(r)for(var i=0;i<r.length;){var a=C.trustAsHtml('<iframe src="http://ideone.com/embed/'+r[i].split("/")[1]+'" height="'+t.ideoneHeight+'"></iframe>');s.codeServices.push(a),i++}return e};if(i.code.highlight){if(!window.hljs)throw new ReferenceError("hlsj (Highlight JS is not defined.");n=f(n),S(function(){i.code.lineNumbers&&angular.element(".ne-code").each(function(){var e=1,t=$(this).text().split("\n").length,n=$("<ul/>").addClass("pre-numbering");for(angular.element(this).addClass("has-numbering").parent().append(n);e<=t;e++)n.append(angular.element("<li/>").text(e))})},0)}var y=w("embed")(n,i).$$unwrapTrustedValue();if(i.video.embed){if(!i.gdevAuth)throw"Youtube authentication key is required to get data from youtube.";y=c.embed(y,i)}y=i.basicVideo?c.embedBasic(y):y,y=i.audio.embed?a(y):y,y=i.image.embed?u(y):y,y=i.pdf.embed?d(y):y,y=i.tweetEmbed?h(y,i):y,y=i.twitchtvEmbed?c.twitchtvEmbed(y,i):y,y=i.dailymotionEmbed?c.dailymotionEmbed(y,i):y,y=i.tedEmbed?c.tedEmbed(y,i):y,y=i.dotsubEmbed?c.dotsubEmbed(y,i):y,y=i.liveleakEmbed?c.liveleakEmbed(y,i):y,y=i.soundCloudEmbed?o(y,i):y,y=i.spotifyEmbed?l(y):y,y=i.codepenEmbed?p(y,i):y,y=i.jsfiddleEmbed?m(y,i):y,y=i.jsbinEmbed?g(y,i):y,y=i.plunkerEmbed?_(y,i):y,y=i.githubgistEmbed?b(y,i):y,y=i.ideoneEmbed?v(y,i):y,s.neText=C.trustAsHtml(y)}}}]).directive("neGist",function(){return{restrict:"EA",replace:!0,template:"<div></div>",link:function(e,t,n){var r=n.id,i=document.createElement("iframe");i.setAttribute("width","100%"),i.setAttribute("frameborder","0"),i.id="gist-"+r,t[0].appendChild(i);var a='<html><head><base target="_parent"><style>table{font-size:12px;}</style></head><body onload="parent.document.getElementById(\''+i.id+'\').style.height=document.body.scrollHeight + \'px\'" style="margin:10px 0;"><script type="text/javascript">!function(){"use strict";window.retargetLinks=function(){ var gists=document.getElementsByClassName("gist");for(var i=0,links;i<gists.length;i++){links=gists[i].getElementsByTagName("a");for(var j=0;j<links.length;j++){ links[j].setAttribute("target","_blank");}}}}();<\/script><script type="text/javascript" src="https://gist.github.com/'+r+'.js" onload="retargetLinks()"><\/script></body></html>',o=i.document;i.contentDocument?o=i.contentDocument:i.contentWindow&&(o=i.contentWindow.document),o.open(),o.writeln(a),o.close()}}})}(),function(){"use strict";angular.module("material.components.expansionPanels",["material.core"])}(),function(){"use strict";angular.module("material.components.expansionPanels").run(["$templateCache",function(e){e.put("icons/ic_keyboard_arrow_right_black_24px.svg",'<svg fill="#000000" height="24" viewBox="0 0 24 24" width="24" xmlns="http://www.w3.org/2000/svg">\n    <path d="M8.59 16.34l4.58-4.59-4.58-4.59L10 5.75l6 6-6 6z"/>\n    <path d="M0-.25h24v24H0z" fill="none"/>\n</svg>')}])}(),function(){"use strict";angular.module("material.components.expansionPanels").directive("mdExpansionPanel",function(){return{restrict:"E",require:["mdExpansionPanel","?^^mdExpansionPanelGroup"],scope:!0,compile:function(e,t){var n="Invalid HTML for md-expansion-panel: ";if(e.attr("tabindex",t.tabindex||"0"),null===e[0].querySelector("md-expansion-panel-collapsed"))throw Error(n+"Expected a child element of `md-epxansion-panel-collapsed`");if(null!==e[0].querySelector("md-expansion-panel-expanded"))return function(e,t,n,r){var i=r[0],a=r[1];i.epxansionPanelGroupCtrl=a||void 0,i.init()};throw Error(n+"Expected a child element of `md-epxansion-panel-expanded`")},controller:["$scope","$element","$attrs","$window","$$rAF","$mdConstant","$mdUtil","$mdComponentRegistry","$timeout","$q","$animate","$parse",function(n,r,e,i,t,a,o,s,c,l,u,f){var d,h,p,m,g,_,b,v,y,w,C,A=this,S=!1,T=!1,x=!1,k=!1,E=t.throttle(function(e){var t,n,r;r=!0===h.setHeight?h.$element[0].getBoundingClientRect():_.getBoundingClientRect();var i=w?w.getBoundingClientRect().top:0;t=Math.max(r.top,0),n=t+r.height,m&&!1===m.noSticky&&m.onScroll(t,n,i);p&&!1===p.noSticky&&p.onScroll(t,n,i)}),D=t.throttle(function(){var e=r[0].offsetWidth;m&&!1===m.noSticky&&m.onResize(e);p&&!1===p.noSticky&&p.onResize(e)});A.registerCollapsed=function(e){d=e},A.registerExpanded=function(e){h=e},A.registerHeader=function(e){p=e},A.registerFooter=function(e){m=e},void 0===e.mdComponentId?(e.$set("mdComponentId","_expansion_panel_id_"+o.nextUid()),P()):e.$observe("mdComponentId",function(){P()});A.$element=r,A.expand=$,A.collapse=O,A.remove=R,A.destroy=F,A.onRemove=N,A.init=function(){(S=!0)===T&&P()},void 0!==e.ngDisabled?n.$watch(e.ngDisabled,function(e){k=e,r.attr("tabindex",k?-1:0)}):void 0!==e.disabled&&(k=void 0!==e.disabled&&"false"!==e.disabled&&!1!==e.disabled,r.attr("tabindex",k?-1:0));function I(e){var t=a.KEY_CODE;switch(e.keyCode){case t.ENTER:$();break;case t.ESCAPE:O()}}function P(){!1!==S?("function"==typeof g&&(g(),g=void 0),A.componentId&&A.epxansionPanelGroupCtrl&&A.epxansionPanelGroupCtrl.removePanel(A.componentId),void 0===e.mdComponentId&&e.$set("mdComponentId","_expansion_panel_id_"+o.nextUid()),A.componentId=e.mdComponentId,g=s.register({expand:$,collapse:O,remove:R,onRemove:N,isOpen:M,addClickCatcher:B,removeClickCatcher:U,componentId:e.mdComponentId},e.mdComponentId),A.epxansionPanelGroupCtrl&&A.epxansionPanelGroupCtrl.addPanel(A.componentId,{expand:$,collapse:O,remove:R,onRemove:N,destroy:F,isOpen:M})):T=!0}function M(){return x}function $(e){if(!0!==x&&!0!==k){x=!0,e=e||{};var t=l.defer();return A.epxansionPanelGroupCtrl&&A.epxansionPanelGroupCtrl.expandPanel(A.componentId),r.removeClass("md-close"),r.addClass("md-open"),!1===e.animation?r.addClass("md-no-animation"):r.removeClass("md-no-animation"),function(){if(!(m&&!0!==m.noSticky||p&&!0!==p.noSticky))return;b=n.$watch(function(){return r[0].offsetTop},E,!0),v=n.$watch(function(){return r[0].offsetWidth},D,!0),"MD-CONTENT"===(_=o.getNearestContentElement(r)).nodeName?(w=function(e){var t=e.parentNode;for(;t&&t!==document;){if(j(t,"transform"))return t;t=t.parentNode}return}(_),angular.element(_).on("scroll",E)):w=void 0;!0===h.setHeight&&h.$element.on("scroll",E);angular.element(i).on("scroll",E).on("resize",E).on("resize",D)}(),d.hide(e),h.show(e),p&&p.show(e),m&&m.show(e),c(function(){t.resolve()},!1===e.animation?0:H),t.promise}}function O(e){if(!1!==x){x=!1,e=e||{};var t=l.defer();return r.addClass("md-close"),r.removeClass("md-open"),!1===e.animation?r.addClass("md-no-animation"):r.removeClass("md-no-animation"),G(),d.show(e),h.hide(e),p&&p.hide(e),m&&m.hide(e),c(function(){t.resolve()},!1===e.animation?0:H),t.promise}}function R(e){e=e||{};var t=l.defer();return A.epxansionPanelGroupCtrl&&A.epxansionPanelGroupCtrl.removePanel(A.componentId),"function"==typeof g&&(g(),g=void 0),!1===e.animation||!1===x?(n.$destroy(),r.remove(),t.resolve(),L()):(O(),c(function(){n.$destroy(),r.remove(),t.resolve(),L()},H)),t.promise}function N(e){y=e}function L(){"function"==typeof y&&(y(),y=void 0)}function F(){n.$destroy()}function G(){"function"==typeof b&&(b(),b=void 0),"function"==typeof v&&(v(),v=void 0),_&&"MD-CONTENT"===_.nodeName&&angular.element(_).off("scroll",E),!0===h.setHeight&&h.$element.off("scroll",E),angular.element(i).off("scroll",E).off("resize",E).off("resize",D)}function j(e,t){var n=!1;if(e){var r=i.getComputedStyle(e);n=void 0!==r[t]&&"none"!==r[t]}return n}function B(e){(C=o.createBackdrop(n))[0].tabIndex=-1,"function"==typeof e&&C.on("click",e),u.enter(C,r.parent(),null,{duration:0}),r.css("z-index",60)}function U(){C&&(C.remove(),C.off("click"),C=void 0,r.css("z-index",""))}r.on("focus",function(e){r.on("keydown",I)}).on("blur",function(e){r.off("keydown",I)}),n.$panel={collapse:O,expand:$,remove:R,isOpen:M},n.$on("$destroy",function(){U(),"function"==typeof g&&(g(),g=void 0),G()})}]}});var H=180}(),function(){"use strict";function e(n,r,i){var t={find:a,waitFor:function(e){return n.when(e).catch(i.error)}};return function(e){return void 0===e?t:a(e)};function a(e){var t=n.get(e);if(t)return t;i.error(r.supplant("ExpansionPanel '{0}' is not available! Did you use md-component-id='{0}'?",[e||""]))}}angular.module("material.components.expansionPanels").factory("$mdExpansionPanel",e),e.$inject=["$mdComponentRegistry","$mdUtil","$log"]}(),function(){"use strict";function e(i,a){return{restrict:"E",require:"^^mdExpansionPanel",link:function(e,n,t,r){r.registerCollapsed({show:function(e){n.css("display",""),n.css("width",n[0].parentNode.offsetWidth+"px");var t={addClass:"md-show",from:{opacity:0},to:{opacity:1}};!1===e.animation&&(t.duration=0);i(n,t).start().then(function(){r.$element.css("transition","none"),n.removeClass("md-absolute md-show"),n.css("width",""),r.$element.css("min-height",""),a(function(){r.$element.css("transition","")},0)})},hide:function(e){n.css("width",n[0].offsetWidth+"px"),r.$element.css("min-height",n[0].offsetHeight+"px");var t={addClass:"md-absolute md-hide",from:{opacity:1},to:{opacity:0}};!1===e.animation&&(t.duration=0);i(n,t).start().then(function(){n.removeClass("md-hide"),n.css("display","none")})}}),n.on("click",function(){r.expand()})}}}angular.module("material.components.expansionPanels").directive("mdExpansionPanelCollapsed",e),e.$inject=["$animateCss","$timeout"]}(),function(){"use strict";function e(a,o){return{restrict:"E",require:"^^mdExpansionPanel",link:function(e,r,t,n){var i=t.height||void 0;void 0!==i&&(i=i.replace("px","")+"px");n.registerExpanded({show:function(e){r.css("display",""),r.addClass("md-show md-overflow");var t={from:{"max-height":"48px",opacity:0},to:{"max-height":i||r[0].scrollHeight+"px",opacity:1}};!1===e.animation&&(t.duration=0);a(r,t).start().then(function(){void 0!==i?r.addClass("md-scroll-y"):(r.css("transition","none"),r.css("max-height","none"),o(function(){r.css("transition","")},0)),r.removeClass("md-overflow")})},hide:function(e){var t=i||r[0].scrollHeight+"px";r.addClass("md-hide md-overflow"),r.removeClass("md-show md-scroll-y");var n={from:{"max-height":t,opacity:1},to:{"max-height":"48px",opacity:0}};!1===e.animation&&(n.duration=0);a(r,n).start().then(function(){r.css("display","none"),r.removeClass("md-hide")})},setHeight:void 0!==i,$element:r})}}}angular.module("material.components.expansionPanels").directive("mdExpansionPanelExpanded",e),e.$inject=["$animateCss","$timeout"]}(),function(){"use strict";angular.module("material.components.expansionPanels").directive("mdExpansionPanelFooter",function(){return{restrict:"E",transclude:!0,template:'<div class="md-expansion-panel-footer-container" ng-transclude></div>',require:"^^mdExpansionPanel",link:function(e,a,t,o){var s=!1,n=void 0!==t.mdNoSticky,c=angular.element(a[0].querySelector(".md-expansion-panel-footer-container"));function l(){s=!1,c.css("width",""),c.css("top",""),a.css("height",""),a.removeClass("md-stick")}o.registerFooter({show:function(){},hide:function(){l()},onScroll:function(e,t,n){var r,i;a[0].getBoundingClientRect().bottom>t?(r=c[0].offsetHeight,(i=t-r-n)<a[0].parentNode.getBoundingClientRect().top&&(i=a[0].parentNode.getBoundingClientRect().top),c.css("width",o.$element[0].offsetWidth+"px"),a.css("height",r+"px"),c.css("top",i+"px"),a.addClass("md-stick"),s=!0):!0===s&&l()},onResize:function(e){if(!1===s)return;c.css("width",e+"px")},noSticky:n})}}})}(),function(){"use strict";angular.module("material.components.expansionPanels").directive("mdExpansionPanelGroup",function(){return{restrict:"E",controller:["$scope","$attrs","$element","$mdComponentRegistry",function(e,t,n,r){var i,a={},o={},s=[],c=void 0!==t.mdMultiple||void 0!==t.multiple,l=void 0!==t.mdAutoExpand||void 0!==t.autoExpand;function u(){var t=f();s.forEach(function(e){e(t)})}function f(){return Object.keys(o).length}function d(t){!1===c&&Object.keys(o).forEach(function(e){e!==t&&o[e].collapse()})}i=r.register({$element:n,register:function(e,t){if(void 0!==a[e])throw Error('$mdExpansionPanelGroup.register() The name "'+e+'" has already been registered');a[e]=t},getRegistered:function(e){if(void 0!==a[e])return a[e];throw Error('$mdExpansionPanelGroup.addPanel() Cannot find Panel with name of "'+e+'"')},getAll:function(){return Object.keys(o).map(function(e){return o[e]})},getOpen:function(){return Object.keys(o).map(function(e){return o[e]}).filter(function(e){return e.isOpen()})},remove:function(e,t){return o[e].remove(t)},removeAll:function(t){Object.keys(o).forEach(function(e){o[e].remove(t)})},collapseAll:function(e){var t=!0!==e;Object.keys(o).forEach(function(e){o[e].collapse({animation:t})})},onChange:function(e){return s.push(e),function(){s.splice(s.indexOf(e),1)}},count:f},t.mdComponentId),this.addPanel=function(e,t){o[e]=t,!0===l&&(t.expand(),d(e));u()},this.expandPanel=function(e){d(e)},this.removePanel=function(e){delete o[e],u()},e.$on("$destroy",function(){"function"==typeof i&&(i(),i=void 0),Object.keys(o).forEach(function(e){o[e].destroy()})})}]}})}(),function(){"use strict";function e(n,d,h,r,i,p,m,a,o){var t={find:s,waitFor:function(e){var t=a.defer();return n.when(e).then(function(e){t.resolve(c(e))}).catch(function(e){t.reject(),o.error(e)}),t.promise}};return function(e){return void 0===e?t:s(e)};function s(e){var t=n.get(e);if(t)return c(t);o.error(d.supplant("ExpansionPanelGroup '{0}' is not available! Did you use md-component-id='{0}'?",[e||""]))}function c(f){return{add:function e(s,c){c=c||{};if("string"==typeof s)return e(f.getRegistered(s),c);n(s);if(s.componentId&&f.isPanelActive(s.componentId))return a.reject('panel with componentId "'+s.componentId+'" is currently active');var l=a.defer();var u=i.$new();angular.extend(u,s.scope);t(s,function(e){var t=angular.element(e),n=s.componentId||t.attr("md-component-id")||"_panelComponentId_"+d.nextUid(),r=h().waitFor(n);t.attr("md-component-id",n);var i=p(t);if(s.controller){angular.extend(c,s.locals||{}),c.$scope=u,c.$panel=r;var a=m(s.controller,c,!0),o=a();t.data("$ngControllerController",o),t.children().data("$ngControllerController",o),s.controllerAs&&(u[s.controllerAs]=o)}f.$element.append(t),i(u),r.then(function(e){l.resolve(e)})});return l.promise},register:function(e,t){if("string"!=typeof e)throw Error("$mdExpansionPanelGroup.register() Expects name to be a string");n(t),f.register(e,t)},getAll:function(){return f.getAll()},getOpen:function(){return f.getOpen()},remove:function(e,t){return f.remove(e,t)},removeAll:function(e){f.removeAll(e)},collapseAll:function(e){f.collapseAll(e)},onChange:function(e){return f.onChange(e)},count:function(){return f.count()}};function n(e){if("object"!=typeof e||null===e)throw Error("$mdExapnsionPanelGroup.add()/.register() : Requires an options object to be passed in");if(!e.template&&!e.templateUrl)throw Error("$mdExapnsionPanelGroup.add()/.register() : Is missing required paramters to create. Required One of the following: template, templateUrl")}function t(e,t){void 0!==e.templateUrl?r(e.templateUrl).then(function(e){t(e)}):t(e.template)}}}angular.module("material.components.expansionPanels").factory("$mdExpansionPanelGroup",e),e.$inject=["$mdComponentRegistry","$mdUtil","$mdExpansionPanel","$templateRequest","$rootScope","$compile","$controller","$q","$log"]}(),function(){"use strict";function e(){return{restrict:"E",transclude:!0,template:'<div class="md-expansion-panel-header-container" ng-transclude></div>',require:"^^mdExpansionPanel",link:function(e,o,t,n){var s=!1,r=void 0!==t.mdNoSticky,c=angular.element(o[0].querySelector(".md-expansion-panel-header-container"));function l(){s=!1,c.css("width",""),o.css("height",""),o.css("top",""),o.removeClass("md-stick"),o.addClass("md-no-stick")}n.registerHeader({show:function(){},hide:function(){l()},noSticky:r,onScroll:function(e,t,n){var r,i,a=o[0].getBoundingClientRect();a.top<e?(r=e-n,(i=o[0].parentNode.getBoundingClientRect().bottom-e-a.height)<0&&(r+=i),c.css("width",o[0].offsetWidth+"px"),c.css("top",r+"px"),o.css("height",c[0].offsetHeight+"px"),o.removeClass("md-no-stick"),o.addClass("md-stick"),s=!0):!0===s&&l()},onResize:function(e){if(!1===s)return;c.css("width",e+"px")}})}}}angular.module("material.components.expansionPanels").directive("mdExpansionPanelHeader",e),e.$inject=[]}(),function(){"use strict";angular.module("material.components.expansionPanels").directive("mdExpansionPanelIcon",function(){return{restrict:"E",template:'<md-icon class="md-expansion-panel-icon" md-svg-icon="icons/ic_keyboard_arrow_right_black_24px.svg"></md-icon>',replace:!0}})}(),function(e,C){"use strict";var t=C.module("angular-sortable-view",[]);function _(e){if(!("clientX"in e||"clientY"in e)){var t=e.touches||e.originalEvent.touches;t&&t.length&&(e.clientX=t[0].clientX,e.clientY=t[0].clientY),e.preventDefault()}}t.directive("svRoot",[function(){function y(e){return r[e]}var w,r=Object.create(null);return{restrict:"A",controller:["$scope","$attrs","$interpolate","$parse",function(f,e,t,n){var d=t(e.svRoot)(f)||f.$id;r[d]||(r[d]=[]);var h,p,m,g,_,b=!1,c=n(e.svOnSort);e.svOnStart=e.$$element[0].attributes["sv-on-start"],e.svOnStart=e.svOnStart&&e.svOnStart.value,e.svOnStop=e.$$element[0].attributes["sv-on-stop"],e.svOnStop=e.svOnStop&&e.svOnStop.value;var v=n(e.svOnStart),l=n(e.svOnStop);if(this.sortingInProgress=function(){return w},e.svGrid){if(null===(b="true"===e.svGrid||"false"!==e.svGrid&&null))throw"Invalid value of sv-grid attribute"}else f.$watchCollection(function(){return y(d)},function(e){b=!1;var t=e.filter(function(e){return!e.container}).map(function(e){return{part:e.getPart().id,y:e.element[0].getBoundingClientRect().top}}),r=Object.create(null);t.forEach(function(e){r[e.part]?r[e.part].push(e.y):r[e.part]=[e.y]}),Object.keys(r).forEach(function(n){r[n].sort(),r[n].forEach(function(e,t){t<r[n].length-1&&0<e&&e===r[n][t+1]&&(b=!0)})})});this.$moveUpdate=function(s,c,e,t,n,r,i){var a=e[0].getBoundingClientRect();"element"===s.tolerance&&(c={x:~~(a.left+a.width/2),y:~~(a.top+a.height/2)}),w=!0,h=[],p||(n?(p=n.clone()).removeClass("ng-hide"):((p=t.clone()).addClass("sv-visibility-hidden"),p.addClass("sv-placeholder"),p.css({height:a.height+"px",width:a.width+"px"})),t.after(p),t.addClass("ng-hide"),g=t,s,v(f,{$helper:{element:m=e},$part:r.model(r.scope),$index:i,$item:r.model(r.scope)[i]}),f.$root&&f.$root.$$phase||f.$apply()),m[0].reposition({x:c.x+document.body.scrollLeft-c.offset.x*a.width,y:c.y+document.body.scrollTop-c.offset.y*a.height}),y(d).forEach(function(e,t){if(null==s.containment||A(e.element,s.containment)||A(e.element,s.containment+" *")){var n,r,i,a=e.element[0].getBoundingClientRect(),o={x:~~(a.left+a.width/2),y:~~(a.top+a.height/2)};e.container||!e.element[0].scrollHeight&&!e.element[0].scrollWidth||h.push({element:e.element,q:(o.x-c.x)*(o.x-c.x)+(o.y-c.y)*(o.y-c.y),view:e.getPart(),targetIndex:e.getIndex(),after:(n=o,r=c,i=b,i?n.x-r.x<0:n.y-r.y<0)}),e.container&&!e.element[0].querySelector("[sv-element]:not(.sv-placeholder):not(.sv-source)")&&h.push({element:e.element,q:(o.x-c.x)*(o.x-c.x)+(o.y-c.y)*(o.y-c.y),view:e.getPart(),targetIndex:0,container:!0})}});var o=p[0].getBoundingClientRect(),l=~~(o.left+o.width/2),u=~~(o.top+o.height/2);h.push({q:(l-c.x)*(l-c.x)+(u-c.y)*(u-c.y),element:p,placeholder:!0}),h.sort(function(e,t){return e.q-t.q}),h.forEach(function(e,t){var n,r,i;0!==t||e.placeholder||e.container?0===t&&e.container?(_=e).element.append(p):e.element.removeClass("sv-candidate"):((_=e).element.addClass("sv-candidate"),e.after?e.element.after(p):(n=e.element,r=p,0<(i=function(e){{if((e=e[0]).previousElementSibling)return C.element(e.previousElementSibling);for(var t=e.previousSibling;null!=t&&1!=t.nodeType;)t=t.previousSibling;return C.element(t)}}(n)).length?i.after(r):n.parent().prepend(r)))})},this.$drop=function(n,r,i){if(p)if(i.revert){var e=p[0].getBoundingClientRect(),t=m[0].getBoundingClientRect(),a=Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2)),o=+i.revert*a/200;o=Math.min(o,+i.revert),["-webkit-","-moz-","-ms-","-o-",""].forEach(function(e){void 0!==m[0].style[e+"transition"]&&(m[0].style[e+"transition"]="all "+o+"ms ease")}),setTimeout(s,o),m.css({top:e.top+document.body.scrollTop+"px",left:e.left+document.body.scrollLeft+"px"})}else s();function s(){if(w=!1,p.remove(),m.remove(),g.removeClass("ng-hide"),g=m=i=p=h=void 0,l(f,{$part:n.model(n.scope),$index:r,$item:n.model(n.scope)[r]}),_){_.element.removeClass("sv-candidate");var e=n.model(n.scope).splice(r,1),t=_.targetIndex;_.view===n&&_.targetIndex>r&&t--,_.after&&t++,_.view.model(_.view.scope).splice(t,0,e[0]),_.view===n&&r===t||c(f,{$partTo:_.view.model(_.view.scope),$partFrom:n.model(n.scope),$item:e[0],$indexTo:t,$indexFrom:r})}_=void 0,f.$root&&f.$root.$$phase||f.$apply()}},this.addToSortableElements=function(e){y(d).push(e)},this.removeFromSortableElements=function(e){var t=y(d),n=t.indexOf(e);-1<n&&(t.splice(n,1),0===t.length&&delete r[d])}}]}}]),t.directive("svPart",["$parse",function(o){return{restrict:"A",require:"^svRoot",controller:["$scope",function(n){(n.$ctrl=this).getPart=function(){return n.part},this.$drop=function(e,t){n.$sortableRoot.$drop(n.part,e,t)}}],scope:!0,link:function(e,t,n,r){if(!n.svPart)throw new Error("no model provided");var i=o(n.svPart);if(!i.assign)throw new Error("model not assignable");e.part={id:e.$id,element:t,model:i,scope:e},e.$sortableRoot=r;var a={element:t,getPart:e.$ctrl.getPart,container:!0};r.addToSortableElements(a),e.$on("$destroy",function(){r.removeFromSortableElements(a)})}}}]),t.directive("svElement",["$parse",function(g){return{restrict:"A",require:["^svPart","^svRoot"],controller:["$scope",function(e){e.$ctrl=this}],link:function(c,l,u,f){var e={element:l,getPart:f[0].getPart,getIndex:function(){return c.$index}};f[1].addToSortableElements(e),c.$on("$destroy",function(){f[1].removeFromSortableElements(e)});var d,h,t=l;t.on("mousedown touchstart",n),c.$watch("$ctrl.handle",function(e){e&&(t.off("mousedown touchstart",n),(t=e).on("mousedown touchstart",n))}),c.$watch("$ctrl.helper",function(e){e&&(d=e)}),c.$watch("$ctrl.placeholder",function(e){e&&(h=e)});C.element(document.body);var p,m=C.element(document.documentElement);function n(e){if(_(e),!f[1].sortingInProgress()&&(0==e.button||"mousedown"!==e.type)){p=!1;var n=g(u.svElement)(c);if((n=C.extend({},{tolerance:"pointer",revert:200,containment:"html"},n)).containment)var a=b.call(l,n.containment)[0].getBoundingClientRect();var o,t=l,r=l[0].getBoundingClientRect();d||(d=f[0].helper),h||(h=f[0].placeholder),d?((o=d.clone()).removeClass("ng-hide"),o.css({left:r.left+document.body.scrollLeft+"px",top:r.top+document.body.scrollTop+"px"}),t.addClass("sv-visibility-hidden")):(o=t.clone()).addClass("sv-helper").css({left:r.left+document.body.scrollLeft+"px",top:r.top+document.body.scrollTop+"px",width:r.width+"px"}),o[0].reposition=function(e){var t=e.x,n=e.y,r=o[0].getBoundingClientRect(),i=document.body;a&&(n<a.top+i.scrollTop&&(n=a.top+i.scrollTop),n+r.height>a.top+i.scrollTop+a.height&&(n=a.top+i.scrollTop+a.height-r.height),t<a.left+i.scrollLeft&&(t=a.left+i.scrollLeft),t+r.width>a.left+i.scrollLeft+a.width&&(t=a.left+i.scrollLeft+a.width-r.width)),this.style.left=t-i.scrollLeft+"px",this.style.top=n-i.scrollTop+"px"};var i={x:(e.clientX-r.left)/r.width,y:(e.clientY-r.top)/r.height};m.addClass("sv-sorting-in-progress"),m.on("mousemove touchmove",s).on("mouseup touchend touchcancel",function e(t){m.off("mousemove touchmove",s),m.off("mouseup touchend touchcancel",e),m.removeClass("sv-sorting-in-progress"),p&&f[0].$drop(c.$index,n),l.removeClass("sv-visibility-hidden")})}function s(e){_(e),p||(l.parent().prepend(o),p=!0),f[1].$moveUpdate(n,{x:e.clientX,y:e.clientY,offset:i},o,l,h,f[0].getPart(),c.$index)}}}}}]),t.directive("svHandle",function(){return{require:"?^svElement",link:function(e,t,n,r){r&&(r.handle=t.add(r.handle))}}}),t.directive("svHelper",function(){return{require:["?^svPart","?^svElement"],link:function(e,t,n,r){t.addClass("sv-helper").addClass("ng-hide"),r[1]?r[1].helper=t:r[0]&&(r[0].helper=t)}}}),t.directive("svPlaceholder",function(){return{require:["?^svPart","?^svElement"],link:function(e,t,n,r){t.addClass("sv-placeholder").addClass("ng-hide"),r[1]?r[1].placeholder=t:r[0]&&(r[0].placeholder=t)}}}),C.element(document.head).append(["<style>.sv-helper{position: fixed !important;z-index: 99999;margin: 0 !important;}.sv-candidate{}.sv-placeholder{}.sv-sorting-in-progress{-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;}.sv-visibility-hidden{visibility: hidden !important;opacity: 0 !important;}</style>"].join(""));var n=document.documentElement,r=n.matches?"matches":n.matchesSelector?"matchesSelector":n.webkitMatches?"webkitMatches":n.webkitMatchesSelector?"webkitMatchesSelector":n.msMatches?"msMatches":n.msMatchesSelector?"msMatchesSelector":n.mozMatches?"mozMatches":n.mozMatchesSelector?"mozMatchesSelector":null;if(null==r)throw"This browser doesn't support the HTMLElement.matches method";function A(e,t){if(e instanceof C.element&&(e=e[0]),null!==r)return e[r](t)}var b=C.element.prototype.closest||function(e){for(var t=this[0].parentNode;t!==document.documentElement&&!t[r](e);)t=t.parentNode;return t[r](e)?C.element(t):C.element()};"function"!=typeof C.element.prototype.add&&(C.element.prototype.add=function(e){var t,n=C.element();for(e=C.element(e),t=0;t<this.length;t++)n.push(this[t]);for(t=0;t<e.length;t++)n.push(e[t]);return n})}(window,window.angular),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).tinycolor=t()}(this,function(){"use strict";var f=/^\s+/,d=/\s+$/,o=Math.round,h=Math.min,p=Math.max,e=Math.random;function u(e,t){if(t=t||{},(e=e||"")instanceof u)return e;if(!(this instanceof u))return new u(e,t);var n=function(e){var t={r:0,g:0,b:0},n=1,r=null,i=null,a=null,o=!1,s=!1;"string"==typeof e&&(e=function(e){e=e.replace(f,"").replace(d,"").toLowerCase();var t,n=!1;if(S[e])e=S[e],n=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};if(t=L.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=L.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=L.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=L.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=L.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=L.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=L.hex8.exec(e))return{r:D(t[1]),g:D(t[2]),b:D(t[3]),a:$(t[4]),format:n?"name":"hex8"};if(t=L.hex6.exec(e))return{r:D(t[1]),g:D(t[2]),b:D(t[3]),format:n?"name":"hex"};if(t=L.hex4.exec(e))return{r:D(t[1]+""+t[1]),g:D(t[2]+""+t[2]),b:D(t[3]+""+t[3]),a:$(t[4]+""+t[4]),format:n?"name":"hex8"};if(t=L.hex3.exec(e))return{r:D(t[1]+""+t[1]),g:D(t[2]+""+t[2]),b:D(t[3]+""+t[3]),format:n?"name":"hex"};return!1}(e));"object"==typeof e&&(F(e.r)&&F(e.g)&&F(e.b)?(c=e.r,l=e.g,u=e.b,t={r:255*k(c,255),g:255*k(l,255),b:255*k(u,255)},o=!0,s="%"===String(e.r).substr(-1)?"prgb":"rgb"):F(e.h)&&F(e.s)&&F(e.v)?(r=P(e.s),i=P(e.v),t=function(e,t,n){e=6*k(e,360),t=k(t,100),n=k(n,100);var r=Math.floor(e),i=e-r,a=n*(1-t),o=n*(1-i*t),s=n*(1-(1-i)*t),c=r%6;return{r:255*[n,o,a,a,s,n][c],g:255*[s,n,n,o,a,a][c],b:255*[a,a,s,n,n,o][c]}}(e.h,r,i),o=!0,s="hsv"):F(e.h)&&F(e.s)&&F(e.l)&&(r=P(e.s),a=P(e.l),t=function(e,t,n){var r,i,a;function o(e,t,n){return n<0&&(n+=1),1<n&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=k(e,360),t=k(t,100),n=k(n,100),0===t)r=i=a=n;else{var s=n<.5?n*(1+t):n+t-n*t,c=2*n-s;r=o(c,s,e+1/3),i=o(c,s,e),a=o(c,s,e-1/3)}return{r:255*r,g:255*i,b:255*a}}(e.h,r,a),o=!0,s="hsl"),e.hasOwnProperty("a")&&(n=e.a));var c,l,u;return n=x(n),{ok:o,format:e.format||s,r:h(255,p(t.r,0)),g:h(255,p(t.g,0)),b:h(255,p(t.b,0)),a:n}}(e);this._originalInput=e,this._r=n.r,this._g=n.g,this._b=n.b,this._a=n.a,this._roundA=o(100*this._a)/100,this._format=t.format||n.format,this._gradientType=t.gradientType,this._r<1&&(this._r=o(this._r)),this._g<1&&(this._g=o(this._g)),this._b<1&&(this._b=o(this._b)),this._ok=n.ok}function i(e,t,n){e=k(e,255),t=k(t,255),n=k(n,255);var r,i,a=p(e,t,n),o=h(e,t,n),s=(a+o)/2;if(a==o)r=i=0;else{var c=a-o;switch(i=.5<s?c/(2-a-o):c/(a+o),a){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:i,l:s}}function a(e,t,n){e=k(e,255),t=k(t,255),n=k(n,255);var r,i,a=p(e,t,n),o=h(e,t,n),s=a,c=a-o;if(i=0===a?0:c/a,a==o)r=0;else{switch(a){case e:r=(t-n)/c+(t<n?6:0);break;case t:r=(n-e)/c+2;break;case n:r=(e-t)/c+4}r/=6}return{h:r,s:i,v:s}}function t(e,t,n,r){var i=[I(o(e).toString(16)),I(o(t).toString(16)),I(o(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join("")}function s(e,t,n,r){return[I(M(r)),I(o(e).toString(16)),I(o(t).toString(16)),I(o(n).toString(16))].join("")}function n(e,t){t=0===t?0:t||10;var n=u(e).toHsl();return n.s-=t/100,n.s=E(n.s),u(n)}function r(e,t){t=0===t?0:t||10;var n=u(e).toHsl();return n.s+=t/100,n.s=E(n.s),u(n)}function c(e){return u(e).desaturate(100)}function l(e,t){t=0===t?0:t||10;var n=u(e).toHsl();return n.l+=t/100,n.l=E(n.l),u(n)}function m(e,t){t=0===t?0:t||10;var n=u(e).toRgb();return n.r=p(0,h(255,n.r-o(-t/100*255))),n.g=p(0,h(255,n.g-o(-t/100*255))),n.b=p(0,h(255,n.b-o(-t/100*255))),u(n)}function g(e,t){t=0===t?0:t||10;var n=u(e).toHsl();return n.l-=t/100,n.l=E(n.l),u(n)}function _(e,t){var n=u(e).toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,u(n)}function b(e){var t=u(e).toHsl();return t.h=(t.h+180)%360,u(t)}function v(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+120)%360,s:t.s,l:t.l}),u({h:(n+240)%360,s:t.s,l:t.l})]}function y(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+90)%360,s:t.s,l:t.l}),u({h:(n+180)%360,s:t.s,l:t.l}),u({h:(n+270)%360,s:t.s,l:t.l})]}function w(e){var t=u(e).toHsl(),n=t.h;return[u(e),u({h:(n+72)%360,s:t.s,l:t.l}),u({h:(n+216)%360,s:t.s,l:t.l})]}function C(e,t,n){t=t||6,n=n||30;var r=u(e).toHsl(),i=360/n,a=[u(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,a.push(u(r));return a}function A(e,t){t=t||6;for(var n=u(e).toHsv(),r=n.h,i=n.s,a=n.v,o=[],s=1/t;t--;)o.push(u({h:r,s:i,v:a})),a=(a+s)%1;return o}u.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,n,r=this.toRgb();return e=r.r/255,t=r.g/255,n=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(e){return this._a=x(e),this._roundA=o(100*this._a)/100,this},toHsv:function(){var e=a(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=a(this._r,this._g,this._b),t=o(360*e.h),n=o(100*e.s),r=o(100*e.v);return 1==this._a?"hsv("+t+", "+n+"%, "+r+"%)":"hsva("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=i(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=i(this._r,this._g,this._b),t=o(360*e.h),n=o(100*e.s),r=o(100*e.l);return 1==this._a?"hsl("+t+", "+n+"%, "+r+"%)":"hsla("+t+", "+n+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return t(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,n,r,i){var a=[I(o(e).toString(16)),I(o(t).toString(16)),I(o(n).toString(16)),I(M(r))];if(i&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1))return a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0);return a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:o(this._r),g:o(this._g),b:o(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+o(this._r)+", "+o(this._g)+", "+o(this._b)+")":"rgba("+o(this._r)+", "+o(this._g)+", "+o(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:o(100*k(this._r,255))+"%",g:o(100*k(this._g,255))+"%",b:o(100*k(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+o(100*k(this._r,255))+"%, "+o(100*k(this._g,255))+"%, "+o(100*k(this._b,255))+"%)":"rgba("+o(100*k(this._r,255))+"%, "+o(100*k(this._g,255))+"%, "+o(100*k(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(T[t(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+s(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?"GradientType = 1, ":"";if(e){var i=u(e);n="#"+s(i._r,i._g,i._b,i._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+n+")"},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&0<=this._a;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(n=this.toRgbString()),"prgb"===e&&(n=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(n=this.toHexString()),"hex3"===e&&(n=this.toHexString(!0)),"hex4"===e&&(n=this.toHex8String(!0)),"hex8"===e&&(n=this.toHex8String()),"name"===e&&(n=this.toName()),"hsl"===e&&(n=this.toHslString()),"hsv"===e&&(n=this.toHsvString()),n||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return u(this.toString())},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(l,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(g,arguments)},desaturate:function(){return this._applyModification(n,arguments)},saturate:function(){return this._applyModification(r,arguments)},greyscale:function(){return this._applyModification(c,arguments)},spin:function(){return this._applyModification(_,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(C,arguments)},complement:function(){return this._applyCombination(b,arguments)},monochromatic:function(){return this._applyCombination(A,arguments)},splitcomplement:function(){return this._applyCombination(w,arguments)},triad:function(){return this._applyCombination(v,arguments)},tetrad:function(){return this._applyCombination(y,arguments)}},u.fromRatio=function(e,t){if("object"==typeof e){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]="a"===r?e[r]:P(e[r]));e=n}return u(e,t)},u.equals=function(e,t){return!(!e||!t)&&u(e).toRgbString()==u(t).toRgbString()},u.random=function(){return u.fromRatio({r:e(),g:e(),b:e()})},u.mix=function(e,t,n){n=0===n?0:n||50;var r=u(e).toRgb(),i=u(t).toRgb(),a=n/100;return u({r:(i.r-r.r)*a+r.r,g:(i.g-r.g)*a+r.g,b:(i.b-r.b)*a+r.b,a:(i.a-r.a)*a+r.a})},u.readability=function(e,t){var n=u(e),r=u(t);return(Math.max(n.getLuminance(),r.getLuminance())+.05)/(Math.min(n.getLuminance(),r.getLuminance())+.05)},u.isReadable=function(e,t,n){var r,i,a=u.readability(e,t);switch(i=!1,(r=function(e){var t,n;t=((e=e||{level:"AA",size:"small"}).level||"AA").toUpperCase(),n=(e.size||"small").toLowerCase(),"AA"!==t&&"AAA"!==t&&(t="AA");"small"!==n&&"large"!==n&&(n="small");return{level:t,size:n}}(n)).level+r.size){case"AAsmall":case"AAAlarge":i=4.5<=a;break;case"AAlarge":i=3<=a;break;case"AAAsmall":i=7<=a}return i},u.mostReadable=function(e,t,n){var r,i,a,o,s=null,c=0;i=(n=n||{}).includeFallbackColors,a=n.level,o=n.size;for(var l=0;l<t.length;l++)c<(r=u.readability(e,t[l]))&&(c=r,s=u(t[l]));return u.isReadable(e,s,{level:a,size:o})||!i?s:(n.includeFallbackColors=!1,u.mostReadable(e,["#fff","#000"],n))};var S=u.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},T=u.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(S);function x(e){return e=parseFloat(e),(isNaN(e)||e<0||1<e)&&(e=1),e}function k(e,t){var n;"string"==typeof(n=e)&&-1!=n.indexOf(".")&&1===parseFloat(n)&&(e="100%");var r,i="string"==typeof(r=e)&&-1!=r.indexOf("%");return e=h(t,p(0,parseFloat(e))),i&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function E(e){return h(1,p(0,e))}function D(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function P(e){return e<=1&&(e=100*e+"%"),e}function M(e){return Math.round(255*parseFloat(e)).toString(16)}function $(e){return D(e)/255}var O,R,N,L=(R="[\\s|\\(]+("+(O="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+O+")[,|\\s]+("+O+")\\s*\\)?",N="[\\s|\\(]+("+O+")[,|\\s]+("+O+")[,|\\s]+("+O+")[,|\\s]+("+O+")\\s*\\)?",{CSS_UNIT:new RegExp(O),rgb:new RegExp("rgb"+R),rgba:new RegExp("rgba"+N),hsl:new RegExp("hsl"+R),hsla:new RegExp("hsla"+N),hsv:new RegExp("hsv"+R),hsva:new RegExp("hsva"+N),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function F(e){return!!L.CSS_UNIT.exec(e)}return u}),function(e,t,f){!function(e,u,l){"use strict";var n={hue:{getColorByPoint:function(e,t){var n=this.getImageData(e,t);return this.setMarkerCenter(t),new f({r:n[0],g:n[1],b:n[2]}).toHsl().h},draw:function(){this.$element.css({height:this.height+"px"}),this.canvas.height=this.height,this.canvas.width=this.height;var e=this.context.createLinearGradient(90,0,90,this.height);e.addColorStop(.01,"rgba(255, 0, 0, 1.000)"),e.addColorStop(.167,"rgba(255, 0, 255, 1.000)"),e.addColorStop(.333,"rgba(0, 0, 255, 1.000)"),e.addColorStop(.5,"rgba(0, 255, 255, 1.000)"),e.addColorStop(.666,"rgba(0, 255, 0, 1.000)"),e.addColorStop(.828,"rgba(255, 255, 0, 1.000)"),e.addColorStop(.999,"rgba(255, 0, 0, 1.000)"),this.context.fillStyle=e,this.context.fillRect(0,0,this.canvas.width,this.height)}},alpha:{getColorByPoint:function(e,t){var n=this.getImageData(e,t);return this.setMarkerCenter(t),n[3]/255},draw:function(){this.$element.css({height:this.height+"px"}),this.canvas.height=this.height,this.canvas.width=this.height;var e=this.context.createLinearGradient(90,0,90,this.height);e.addColorStop(.01,"rgba("+this.currentColor.r+","+this.currentColor.g+","+this.currentColor.b+", 1.000)"),e.addColorStop(.99,"rgba("+this.currentColor.r+","+this.currentColor.g+","+this.currentColor.b+", 0.000)"),this.context.fillStyle=e,this.context.fillRect(-1,-1,this.canvas.width+2,this.height+2)},extra:function(){this.$scope.$on("mdColorPicker:spectrumColorChange",u.bind(this,function(e,t){this.currentColor=t.color,this.draw()}))}},spectrum:{getColorByPoint:function(e,t){var n=this.getImageData(e,t);return this.setMarkerCenter(e,t),{r:n[0],g:n[1],b:n[2]}},draw:function(){this.canvas.height=this.height,this.canvas.width=this.height,this.context.clearRect(0,0,this.canvas.width,this.canvas.height);var e=this.context.createLinearGradient(0,0,this.canvas.width,0);e.addColorStop(.01,"rgba(255, 255, 255, 1.000)"),e.addColorStop(.99,"rgba(255, 255, 255, 0.000)");var t=this.context.createLinearGradient(0,0,0,this.canvas.height);t.addColorStop(.01,"rgba(0, 0, 0, 0.000)"),t.addColorStop(.99,"rgba(0, 0, 0, 1.000)"),this.context.fillStyle="hsl( "+this.currentHue+", 100%, 50%)",this.context.fillRect(0,0,this.canvas.width,this.canvas.height),this.context.fillStyle=e,this.context.fillRect(-1,-1,this.canvas.width+2,this.canvas.height+2),this.context.fillStyle=t,this.context.fillRect(-1,-1,this.canvas.width+2,this.canvas.height+2)},extra:function(){this.$scope.$on("mdColorPicker:spectrumHueChange",u.bind(this,function(e,t){this.currentHue=t.hue,this.draw();var n=this.getMarkerCenter(),r=this.getColorByPoint(n.x,n.y);this.setColor(r)}))}}};function r(e,t){this.type=e,this.restrictX=t,this.offset={x:null,y:null},this.height=255,this.$scope=null,this.$element=null,this.get=u.bind(this,function(e,t,n){this.$scope=e,this.$element=t,this.canvas=this.$element.children()[0],this.marker=this.$element.children()[1],this.context=this.canvas.getContext("2d"),this.currentColor=this.$scope.color.toRgb(),this.currentHue=this.$scope.color.toHsv().h,this.$element.on("touchstart mousedown",u.bind(this,this.onMouseDown)),this.$scope.$on("mdColorPicker:colorSet",u.bind(this,this.onColorSet)),this.extra&&this.extra(),this.draw()})}r.prototype.$window=u.element(e),r.prototype.getColorByMouse=function(e){var t=e.touches&&e.touches[0],n=t&&t.pageX||e.pageX,r=t&&t.pageY||e.pageY,i=Math.round(n-this.offset.x),a=Math.round(r-this.offset.y);return this.getColorByPoint(i,a)},r.prototype.setMarkerCenter=function(e,t){var n,r,i,a,o=-1*this.marker.offsetWidth/2,s=-1*this.marker.offsetHeight/2;t===l?(i=e+s,a=Math.round(Math.max(Math.min(this.height-1+s,i),s)),r=0):(n=e+o,i=t+s,r=Math.floor(Math.max(Math.min(this.height+o,n),o)),a=Math.floor(Math.max(Math.min(this.height+s,i),s))),u.element(this.marker).css({left:r+"px"}),u.element(this.marker).css({top:a+"px"})},r.prototype.getMarkerCenter=function(){return{x:this.marker.offsetLeft+Math.floor(this.marker.offsetWidth/2),y:this.marker.offsetTop+Math.floor(this.marker.offsetHeight/2)}},r.prototype.getImageData=function(e,t){return e=Math.max(0,Math.min(e,this.canvas.width-1)),t=Math.max(0,Math.min(t,this.canvas.height-1)),this.context.getImageData(e,t,1,1).data},r.prototype.onMouseDown=function(e){e.preventDefault(),e.stopImmediatePropagation(),this.$scope.previewUnfocus(),this.$element.css({cursor:"none"}),this.offset.x=this.canvas.getBoundingClientRect().left,this.offset.y=this.canvas.getBoundingClientRect().top;var t=u.bind(this,function(e){switch(this.type){case"hue":var t=this.getColorByMouse(e);this.$scope.$broadcast("mdColorPicker:spectrumHueChange",{hue:t});break;case"alpha":var n=this.getColorByMouse(e);this.$scope.color.setAlpha(n),this.$scope.alpha=n,this.$scope.$apply();break;case"spectrum":var r=this.getColorByMouse(e);this.setColor(r)}});this.$window.on("touchmove mousemove",t),this.$window.one("touchend mouseup",u.bind(this,function(e){this.$window.off("touchmove mousemove",t),this.$element.css({cursor:"crosshair"})})),t(e)},r.prototype.setColor=function(e){this.$scope.color._r=e.r,this.$scope.color._g=e.g,this.$scope.color._b=e.b,this.$scope.$apply(),this.$scope.$broadcast("mdColorPicker:spectrumColorChange",{color:e})},r.prototype.onColorSet=function(e,t){switch(this.type){case"hue":var n=this.$scope.color.toHsv();this.setMarkerCenter(this.canvas.height-this.canvas.height*(n.h/360));break;case"alpha":this.currentColor=t.color.toRgb(),this.draw();var r=t.color.getAlpha(),i=this.canvas.height-this.canvas.height*r;this.setMarkerCenter(i);break;case"spectrum":n=t.color.toHsv();this.currentHue=n.h,this.draw();var a=this.canvas.width*n.s,o=this.canvas.height-this.canvas.height*n.v;this.setMarkerCenter(a,o)}},u.module("mdColorPicker",[]).run(["$templateCache",function(e){var t={clear:'<path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/>',gradient:'<path d="M11 9h2v2h-2zm-2 2h2v2H9zm4 0h2v2h-2zm2-2h2v2h-2zM7 9h2v2H7zm12-6H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM9 18H7v-2h2v2zm4 0h-2v-2h2v2zm4 0h-2v-2h2v2zm2-7h-2v2h2v2h-2v-2h-2v2h-2v-2h-2v2H9v-2H7v2H5v-2h2v-2H5V5h14v6z"/>',tune:'<path d="M13 21v-2h8v-2h-8v-2h-2v6h2zM3 17v2h6v-2H3z"/><path d="M21 13v-2H11v2h10zM7 9v2H3v2h4v2h2V9H7z"/><path d="M15 9h2V7h4V5h-4V3h-2v6zM3 5v2h10V5H3z"/>',view_module:'<path d="M4 11h5V5H4v6z"/><path d="M4 18h5v-6H4v6z"/><path d="M10 18h5v-6h-5v6z"/><path d="M16 18h5v-6h-5v6z"/><path d="M10 11h5V5h-5v6z"/><path d="M16 5v6h5V5h-5z"/>',view_headline:'<path d="M4 15h17v-2H4v2z"/><path d="M4 19h17v-2H4v2z"/><path d="M4 11h17V9H4v2z"/><path d="M4 5v2h17V5H4z"/>',history:'<path d="M13 3c-4.97 0-9 4.03-9 9H1l3.89 3.89.07.14L9 12H6c0-3.87 3.13-7 7-7s7 3.13 7 7-3.13 7-7 7c-1.93 0-3.68-.79-4.94-2.06l-1.42 1.42C8.27 19.99 10.51 21 13 21c4.97 0 9-4.03 9-9s-4.03-9-9-9z"/><path d="M12 8v5l4.28 2.54.72-1.21-3.5-2.08V8H12z"/>',clear_all:'<path d="M5 13h14v-2H5v2zm-2 4h14v-2H3v2zM7 7v2h14V7H7z"/>'};for(var n in t)t.hasOwnProperty(n)&&e.put([n,"svg"].join("."),['<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24">',t[n],"</svg>"].join(""))}]).factory("mdColorGradientCanvas",function(){return function(e){var t=new r(e,"spectrum"!=e);return{template:'<canvas width="100%" height="100%"></canvas><div class="md-color-picker-marker"></div>',link:(t=u.merge(t,n[e])).get,controller:function(){}}}}).factory("mdColorPickerHistory",["$injector",function(e){var n=[],r=[],i=!1;try{i=e.get("$cookies")}catch(e){}if(i)for(var t=i.getObject("mdColorPickerHistory")||[],a=0;a<t.length;a++)n.push(f(t[a])),r.push(t[a]);var o=40;return{length:function(){if(!arguments[0])return n.length;o=arguments[0]},add:function(e){for(var t=0;t<n.length;t++)n[t].toRgbString()===e.toRgbString()&&(n.splice(t,1),r.splice(t,1));n.unshift(e),r.unshift(e.toRgbString()),n.length>o&&(n.pop(),r.pop()),i&&i.putObject("mdColorPickerHistory",r)},get:function(){return n},reset:function(){n=[],r=[],i&&i.putObject("mdColorPickerHistory",r)}}}]).directive("mdColorPicker",["$timeout","mdColorPickerHistory",function(e,t){return{templateUrl:"mdColorPicker.tpl.html",require:"^ngModel",scope:{options:"=mdColorPicker",type:"@",label:"@?",icon:"@?",random:"@?",default:"@?",openOnInput:"=?",hasBackdrop:"=?",clickOutsideToClose:"=?",skipHide:"=?",preserveScope:"=?",mdColorClearButton:"=?",mdColorPreview:"=?",mdColorAlphaChannel:"=?",mdColorSpectrum:"=?",mdColorSliders:"=?",mdColorGenericPalette:"=?",mdColorMaterialPalette:"=?",mdColorHistory:"=?",mdColorHex:"=?",mdColorRgb:"=?",mdColorHsl:"=?",mdColorDefaultTab:"=?"},controller:["$scope","$element","$attrs","$mdDialog","$mdColorPicker",function(t,e,n,r,i){if(t.options!==l)for(var a in t.options){var o;if(t.options.hasOwnProperty(a))o=a,t.hasOwnProperty("mdColor"+a.slice(0,1).toUpperCase()+a.slice(1))&&(o="mdColor"+a.slice(0,1).toUpperCase()+a.slice(1)),!o||t[o]!==l&&""!==t[o]||(t[o]=t.options[a])}var s=e.controller("ngModel"),c=function(e){t.value=e||s.$viewValue||""};t.mdColorClearButton=t.mdColorClearButton===l||t.mdColorClearButton,t.mdColorPreview=t.mdColorPreview===l||t.mdColorPreview,t.mdColorAlphaChannel=t.mdColorAlphaChannel===l||t.mdColorAlphaChannel,t.mdColorSpectrum=t.mdColorSpectrum===l||t.mdColorSpectrum,t.mdColorSliders=t.mdColorSliders===l||t.mdColorSliders,t.mdColorGenericPalette=t.mdColorGenericPalette===l||t.mdColorGenericPalette,t.mdColorMaterialPalette=t.mdColorMaterialPalette===l||t.mdColorMaterialPalette,t.mdColorHistory=t.mdColorHistory===l||t.mdColorHistory,t.mdColorHex=t.mdColorHex===l||t.mdColorHex,t.mdColorRgb=t.mdColorRgb===l||t.mdColorRgb,t.mdColorHsl=t.mdColorHsl===l||t.mdColorHsl,c(),t.$watch(function(){return s.$modelValue},function(e){c(e)}),t.$watch("value",function(e,t){""!==e&&void 0!==e&&e&&e!==t&&s.$setViewValue(e)}),t.clearValue=function(){s.$setViewValue("")},t.showColorPicker=function(e){i.show({value:t.value,defaultValue:t.default,random:t.random,clickOutsideToClose:t.clickOutsideToClose,hasBackdrop:t.hasBackdrop,skipHide:t.skipHide,preserveScope:t.preserveScope,mdColorAlphaChannel:t.mdColorAlphaChannel,mdColorSpectrum:t.mdColorSpectrum,mdColorSliders:t.mdColorSliders,mdColorGenericPalette:t.mdColorGenericPalette,mdColorMaterialPalette:t.mdColorMaterialPalette,mdColorHistory:t.mdColorHistory,mdColorHex:t.mdColorHex,mdColorRgb:t.mdColorRgb,mdColorHsl:t.mdColorHsl,mdColorDefaultTab:t.mdColorDefaultTab,$event:e}).then(function(e){t.value=e})}}],compile:function(e,t){t.type=t.type!==l?t.type:0}}}]).directive("mdColorPickerContainer",["$compile","$timeout","$mdColorPalette","mdColorPickerHistory",function(e,o,s,c){return{templateUrl:"mdColorPickerContainer.tpl.html",scope:{value:"=?",default:"@",random:"@",ok:"=?",mdColorAlphaChannel:"=",mdColorSpectrum:"=",mdColorSliders:"=",mdColorGenericPalette:"=",mdColorMaterialPalette:"=",mdColorHistory:"=",mdColorHex:"=",mdColorRgb:"=",mdColorHsl:"=",mdColorDefaultTab:"="},controller:["$scope","$element","$attrs",function(a,e,t){var n=u.element(e[0].querySelector(".md-color-picker-container")),r=(u.element(n[0].querySelector(".md-color-picker-result")),u.element(e[0].querySelector(".md-color-picker-preview-input"))),i=["toHexString","toRgbString","toHslString"];a.default=a.default?a.default:a.random?f.random():"rgb(255,255,255)",0<=a.value.search("#")?a.type=0:0<=a.value.search("rgb")?a.type=1:0<=a.value.search("hsl")&&(a.type=2),a.color=new f(a.value||a.default),a.alpha=a.color.getAlpha(),a.history=c,a.materialFamily=[],a.whichPane=function(e){var t=0;if(e&&"string"==typeof e){for(var n="mdColor"+e.slice(0,1).toUpperCase()+e.slice(1),r=["mdColorSpectrum","mdColorSliders","mdColorGenericPalette","mdColorMaterialPalette","mdColorHistory"],i=0;i<r.length;i++)if(r[i]==n&&a[n]){t=i;break}}else e&&"number"==typeof e&&(t=e);return t}(a.mdColorDefaultTab),a.inputFocus=!1;Math.PI;a.palette=[["rgb(255, 204, 204)","rgb(255, 230, 204)","rgb(255, 255, 204)","rgb(204, 255, 204)","rgb(204, 255, 230)","rgb(204, 255, 255)","rgb(204, 230, 255)","rgb(204, 204, 255)","rgb(230, 204, 255)","rgb(255, 204, 255)"],["rgb(255, 153, 153)","rgb(255, 204, 153)","rgb(255, 255, 153)","rgb(153, 255, 153)","rgb(153, 255, 204)","rgb(153, 255, 255)","rgb(153, 204, 255)","rgb(153, 153, 255)","rgb(204, 153, 255)","rgb(255, 153, 255)"],["rgb(255, 102, 102)","rgb(255, 179, 102)","rgb(255, 255, 102)","rgb(102, 255, 102)","rgb(102, 255, 179)","rgb(102, 255, 255)","rgb(102, 179, 255)","rgb(102, 102, 255)","rgb(179, 102, 255)","rgb(255, 102, 255)"],["rgb(255, 51, 51)","rgb(255, 153, 51)","rgb(255, 255, 51)","rgb(51, 255, 51)","rgb(51, 255, 153)","rgb(51, 255, 255)","rgb(51, 153, 255)","rgb(51, 51, 255)","rgb(153, 51, 255)","rgb(255, 51, 255)"],["rgb(255, 0, 0)","rgb(255, 128, 0)","rgb(255, 255, 0)","rgb(0, 255, 0)","rgb(0, 255, 128)","rgb(0, 255, 255)","rgb(0, 128, 255)","rgb(0, 0, 255)","rgb(128, 0, 255)","rgb(255, 0, 255)"],["rgb(245, 0, 0)","rgb(245, 123, 0)","rgb(245, 245, 0)","rgb(0, 245, 0)","rgb(0, 245, 123)","rgb(0, 245, 245)","rgb(0, 123, 245)","rgb(0, 0, 245)","rgb(123, 0, 245)","rgb(245, 0, 245)"],["rgb(214, 0, 0)","rgb(214, 108, 0)","rgb(214, 214, 0)","rgb(0, 214, 0)","rgb(0, 214, 108)","rgb(0, 214, 214)","rgb(0, 108, 214)","rgb(0, 0, 214)","rgb(108, 0, 214)","rgb(214, 0, 214)"],["rgb(163, 0, 0)","rgb(163, 82, 0)","rgb(163, 163, 0)","rgb(0, 163, 0)","rgb(0, 163, 82)","rgb(0, 163, 163)","rgb(0, 82, 163)","rgb(0, 0, 163)","rgb(82, 0, 163)","rgb(163, 0, 163)"],["rgb(92, 0, 0)","rgb(92, 46, 0)","rgb(92, 92, 0)","rgb(0, 92, 0)","rgb(0, 92, 46)","rgb(0, 92, 92)","rgb(0, 46, 92)","rgb(0, 0, 92)","rgb(46, 0, 92)","rgb(92, 0, 92)"],["rgb(255, 255, 255)","rgb(205, 205, 205)","rgb(178, 178, 178)","rgb(153, 153, 153)","rgb(127, 127, 127)","rgb(102, 102, 102)","rgb(76, 76, 76)","rgb(51, 51, 51)","rgb(25, 25, 25)","rgb(0, 0, 0)"]],a.materialPalette=s,a.isDark=function(e){return u.isArray(e)?f({r:e[0],g:e[1],b:e[2]}).isDark():f(e).isDark()},a.previewFocus=function(){a.inputFocus=!0,o(function(){r[0].setSelectionRange(0,r[0].value.length)})},a.previewUnfocus=function(){a.inputFocus=!1,r[0].blur()},a.previewBlur=function(){a.inputFocus=!1,a.setValue()},a.previewKeyDown=function(e){13==e.keyCode&&a.ok&&a.ok()},a.setPaletteColor=function(e){o(function(){a.color=f(e.target.style.backgroundColor)})},a.setValue=function(){a.color&&a.color&&i[a.type]&&"rgba(0, 0, 0, 0)"!==a.color.toRgbString()&&(a.value=a.color[i[a.type]]())},a.changeValue=function(){a.color=f(a.value),a.$broadcast("mdColorPicker:colorSet",{color:a.color})},a.$watch("color._a",function(e){a.color.setAlpha(e)},!0),a.$watch("whichPane",function(e){a.$broadcast("mdColorPicker:colorSet",{color:a.color})}),a.$watch("type",function(){r.removeClass("switch"),o(function(){r.addClass("switch")})}),a.$watchGroup(["color.toRgbString()","type"],function(e){a.inputFocus||a.setValue()}),o(function(){a.$broadcast("mdColorPicker:colorSet",{color:a.color}),r.focus(),a.previewFocus()})}],link:function(l,e,t){e[0].getElementsByTagName("md-tab");o(function(){var r,i,a,o,s,c;r=u.element(e[0].querySelector(".md-color-picker-palette")),i=u.element(e[0].querySelector(".md-color-picker-material-palette")),a=u.element('<div class="flex-15 layout-fill layout-row layout-align-space-between" layout-align="space-between" layout="row" layout-fill"></div>'),o=u.element('<div class="flex-10"></div>'),s=u.element('<div class="md-color-picker-material-title"></div>'),c=u.element('<div class="md-color-picker-with-label"></div>'),u.forEach(l.palette,function(e,t){var n=a.clone();u.forEach(e,function(e){var t=o.clone();t.css({height:"25.5px",backgroundColor:e}),t.bind("click",l.setPaletteColor),n.append(t)}),r.append(n)}),u.forEach(l.materialPalette,function(e,t){var n=s.clone();n.html("<span>"+t.replace("-"," ")+"</span>"),n.css({height:"75px",backgroundColor:"rgb("+e[500].value[0]+","+e[500].value[1]+","+e[500].value[2]+")"}),l.isDark(e[500].value)&&n.addClass("dark"),i.append(n),u.forEach(e,function(e,t){var n=c.clone();n.css({height:"33px",backgroundColor:"rgb("+e.value[0]+","+e.value[1]+","+e.value[2]+")"}),l.isDark(e.value)&&n.addClass("dark"),n.html("<span>"+t+"</span>"),n.bind("click",l.setPaletteColor),i.append(n)})})})}}}]).directive("mdColorPickerHue",["mdColorGradientCanvas",function(e){return new e("hue")}]).directive("mdColorPickerAlpha",["mdColorGradientCanvas",function(e){return new e("alpha")}]).directive("mdColorPickerSpectrum",["mdColorGradientCanvas",function(e){return new e("spectrum")}]).factory("$mdColorPicker",["$q","$mdDialog","mdColorPickerHistory",function(e,n,t){var r;return{show:function(e){return e===l&&(e={}),e.hasBackdrop=e.hasBackdrop===l||e.hasBackdrop,e.clickOutsideToClose=e.clickOutsideToClose===l||e.clickOutsideToClose,e.defaultValue=e.defaultValue===l?"#FFFFFF":e.defaultValue,e.focusOnOpen=e.focusOnOpen!==l&&e.focusOnOpen,e.preserveScope=e.preserveScope===l||e.preserveScope,e.skipHide=e.skipHide===l||e.skipHide,e.mdColorAlphaChannel=e.mdColorAlphaChannel!==l&&e.mdColorAlphaChannel,e.mdColorSpectrum=e.mdColorSpectrum===l||e.mdColorSpectrum,e.mdColorSliders=e.mdColorSliders===l||e.mdColorSliders,e.mdColorGenericPalette=e.mdColorGenericPalette===l||e.mdColorGenericPalette,e.mdColorMaterialPalette=e.mdColorMaterialPalette===l||e.mdColorMaterialPalette,e.mdColorHistory=e.mdColorHistory===l||e.mdColorHistory,e.mdColorRgb=e.mdColorRgb===l||e.mdColorRgb,e.mdColorHsl=e.mdColorHsl===l||e.mdColorHsl,e.mdColorHex=e.mdColorHex===l||!e.mdColorRgb&&!e.mdColorHsl||e.mdColorHex,e.mdColorAlphaChannel=!(!e.mdColorRgb&&!e.mdColorHsl)&&e.mdColorAlphaChannel,(r=n.show({templateUrl:"mdColorPickerDialog.tpl.html",hasBackdrop:e.hasBackdrop,multiple:!0,clickOutsideToClose:e.clickOutsideToClose,controller:["$scope","options",function(e,t){e.close=function(){n.cancel()},e.ok=function(){n.hide(e.value)},e.hide=e.ok,e.value=t.value,e.default=t.defaultValue,e.random=t.random,e.mdColorAlphaChannel=t.mdColorAlphaChannel,e.mdColorSpectrum=t.mdColorSpectrum,e.mdColorSliders=t.mdColorSliders,e.mdColorGenericPalette=t.mdColorGenericPalette,e.mdColorMaterialPalette=t.mdColorMaterialPalette,e.mdColorHistory=t.mdColorHistory,e.mdColorHex=t.mdColorHex,e.mdColorRgb=t.mdColorRgb,e.mdColorHsl=t.mdColorHsl,e.mdColorDefaultTab=t.mdColorDefaultTab}],locals:{options:e},preserveScope:e.preserveScope,skipHide:e.skipHide,targetEvent:e.$event,focusOnOpen:e.focusOnOpen,autoWrap:!1,onShowing:function(){},onComplete:function(){}})).then(function(e){t.add(new f(e))},function(){}),r},hide:function(){return r.hide()},cancel:function(){return r.cancel()}}}])}(t,t.angular),e.module("mdColorPicker").run(["$templateCache",function(e){e.put("mdColorPicker.tpl.html",'<div class="md-color-picker-input-container" layout="row">\n\t<div class="md-color-picker-preview md-color-picker-checkered-bg" ng-click="showColorPicker($event)" ng-if="mdColorPreview">\n\t\t<div class="md-color-picker-result" ng-style="{background: value}"></div>\n\t</div>\n\t<md-input-container flex>\n\t\t<label><md-icon ng-if="icon">{{icon}}</md-icon>{{label}}</label>\n\t\t<input type="input" ng-model="value" class=\'md-color-picker-input\'  ng-mousedown="(openOnInput || !mdColorPreview) && showColorPicker($event)"/>\n\t</md-input-container>\n\t<md-button class="md-icon-button md-color-picker-clear" ng-if="mdColorClearButton && value" ng-click="clearValue();" aria-label="Clear Color">\n\t\t<md-icon md-svg-icon="clear.svg"></md-icon>\n\t</md-button>\n</div>\n'),e.put("mdColorPickerContainer.tpl.html",'<div class="md-color-picker-container in" layout="column">\n\t<div class="md-color-picker-arrow" ng-style="{\'border-bottom-color\': color.toRgbString() }"></div>\n\n\t<div class="md-color-picker-preview md-color-picker-checkered-bg" ng-class="{\'dark\': !color.isDark() || color.getAlpha() < .45}" flex="1" layout="column">\n\n\t\t<div class="md-color-picker-result" ng-style="{\'background\': color.toRgbString()}" flex="100" layout="column" layout-fill layout-align="center center" ng-click="focusPreviewInput( $event )">\n\t\t\t\x3c!--<span flex  layout="column" layout-align="center center">{{value}}</span>--\x3e\n\t\t\t<div flex  layout="row" layout-align="center center">\n\t\t\t\t<input class="md-color-picker-preview-input" type="text" ng-model="value" ng-focus="previewFocus($event);" ng-blur="previewBlur()" ng-change="changeValue()" ng-keypress="previewKeyDown($event)" layout-fill />\n\t\t\t</div>\n\t\t\t<div class="md-color-picker-tabs" style="width: 100%">\n\t\t\t\t<md-tabs md-selected="type" md-stretch-tabs="always" md-no-bar md-no-ink md-no-pagination="true" >\n\t\t\t\t\t<md-tab ng-if="mdColorHex" label="Hex" ng-disabled="color.getAlpha() !== 1" md-ink-ripple="#ffffff"></md-tab>\n\t\t\t\t\t<md-tab ng-if="mdColorRgb" label="RGB"></md-tab>\n\t\t\t\t\t<md-tab ng-if="mdColorHsl" label="HSL"></md-tab>\n\t\t\t\t\t\x3c!--<md-tab label="HSV"></md-tab>\n\t\t\t\t\t<md-tab label="VEC"></md-tab>--\x3e\n\t\t\t\t</md-tabs>\n\t\t\t</div>\n\t\t</div>\n\t</div>\n\n\t<div class="md-color-picker-tabs md-color-picker-colors">\n\t\t<md-tabs md-stretch-tabs="always" md-align-tabs="bottom"  md-selected="whichPane" md-no-pagination>\n\t\t\t<md-tab ng-if="mdColorSpectrum">\n\t\t\t\t<md-tab-label>\n\t\t\t\t\t<md-icon md-svg-icon="gradient.svg"></md-icon>\n\t\t\t\t</md-tab-label>\n\t\t\t\t<md-tab-body>\n\t\t\t\t\t<div layout="row" layout-align="space-between" style="height: 255px">\n\t\t\t\t\t\t<div md-color-picker-spectrum></div>\n\t\t\t\t\t\t<div md-color-picker-hue ng-class="{\'md-color-picker-wide\': !mdColorAlphaChannel}"></div>\n\t\t\t\t\t\t<div md-color-picker-alpha class="md-color-picker-checkered-bg" ng-if="mdColorAlphaChannel"></div>\n\t\t\t\t\t</div>\n\t\t\t\t</md-tab-body>\n\t\t\t</md-tab>\n\t\t\t<md-tab ng-if="mdColorSliders">\n\t\t\t\t<md-tab-label>\n\t\t\t\t\t<md-icon md-svg-icon="tune.svg"></md-icon>\n\t\t\t\t</md-tab-label>\n\t\t\t\t<md-tab-body>\n\t\t\t\t\t<div layout="column" flex="100" layout-fill layout-align="space-between start center" class="md-color-picker-sliders">\n\t\t\t\t\t\t<div layout="row" layout-align="start center" layout-wrap flex layout-fill>\n\t\t\t\t\t\t\t<div flex="10" layout layout-align="center center">\n\t\t\t\t\t\t\t\t<span class="md-body-1">R</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<md-slider flex="65" min="0" max="255" ng-model="color._r" aria-label="red" class="red-slider"></md-slider>\n\t\t\t\t\t\t\t<span flex></span>\n\t\t\t\t\t\t\t<div flex="20" layout layout-align="center center">\n\t\t\t\t\t\t\t\t<input style="width: 100%;" min="0" max="255" type="number" ng-model="color._r" aria-label="red" aria-controls="red-slider">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div layout="row" layout-align="start center" layout-wrap flex layout-fill>\n\t\t\t\t\t\t\t<div flex="10" layout layout-align="center center">\n\t\t\t\t\t\t\t\t<span class="md-body-1">G</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<md-slider flex="65" min="0" max="255" ng-model="color._g" aria-label="green" class="green-slider"></md-slider>\n\t\t\t\t\t\t\t<span flex></span>\n\t\t\t\t\t\t\t<div flex="20" layout layout-align="center center">\n\t\t\t\t\t\t\t\t<input style="width: 100%;" min="0" max="255" type="number" ng-model="color._g" aria-label="green" aria-controls="green-slider">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div layout="row" layout-align="start center" layout-wrap flex layout-fill>\n\t\t\t\t\t\t\t<div flex="10" layout layout-align="center center">\n\t\t\t\t\t\t\t\t<span class="md-body-1">B</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<md-slider flex="65" min="0" max="255" ng-model="color._b" aria-label="blue" class="blue-slider"></md-slider>\n\t\t\t\t\t\t\t<span flex></span>\n\t\t\t\t\t\t\t<div flex="20" layout layout-align="center center" >\n\t\t\t\t\t\t\t\t<input style="width: 100%;" min="0" max="255" type="number" ng-model="color._b" aria-label="blue" aria-controls="blue-slider">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div layout="row" layout-align="start center" layout-wrap flex layout-fill ng-if="!mdColorAlphaChannel">\n\t\t\t\t\t\t\t<div flex="10" layout layout-align="center center">\n\t\t\t\t\t\t\t\t<span class="md-body-1">A</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<md-slider flex="65" min="0" max="1" step=".01" ng-model="color._a" aria-label="alpha" class="md-primary"></md-slider>\n\t\t\t\t\t\t\t<span flex></span>\n\t\t\t\t\t\t\t<div flex="20" layout layout-align="center center" >\n\t\t\t\t\t\t\t\t<input style="width: 100%;" min="0" max="1" step=".01" type="number" ng-model="color._a" aria-label="alpha" aria-controls="alpha-slider">\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t</md-tab-body>\n\t\t\t</md-tab>\n\t\t\t<md-tab ng-if="mdColorGenericPalette">\n\t\t\t\t<md-tab-label>\n\t\t\t\t\t<md-icon md-svg-icon="view_module.svg"></md-icon>\n\t\t\t\t</md-tab-label>\n\t\t\t\t<md-tab-body>\n\t\t\t\t\t<div layout="column" layout-align="space-between start center" flex class="md-color-picker-palette">\n\n\t\t\t\t\t</div>\n\t\t\t\t</md-tab-body>\n\t\t\t</md-tab>\n\t\t\t<md-tab  ng-if="mdColorMaterialPalette">\n\t\t\t\t<md-tab-label>\n\t\t\t\t\t<md-icon md-svg-icon="view_headline.svg"></md-icon>\n\t\t\t\t</md-tab-label>\n\t\t\t\t<md-tab-body>\n\t\t\t\t\t<div layout="column" layout-fill flex class="md-color-picker-material-palette">\n\n\t\t\t\t\t</div>\n\t\t\t\t</md-tab-body>\n\t\t\t</md-tab>\n\t\t\t<md-tab ng-if="mdColorHistory">\n\t\t\t\t<md-tab-label>\n\t\t\t\t\t<md-icon md-svg-icon="history.svg"></md-icon>\n\t\t\t\t</md-tab-label>\n\t\t\t\t<md-tab-body layout="row" layout-fill>\n\t\t\t\t\t<div layout="column" flex layout-align="space-between start" layout-wrap layout-fill class="md-color-picker-history">\n\t\t\t\t\t\t<div layout="row" flex="80" layout-align="space-between start start" layout-wrap  layout-fill>\n\t\t\t\t\t\t\t<div flex="10" ng-repeat="historyColor in history.get() track by $index">\n\t\t\t\t\t\t\t\t<div  ng-style="{\'background\': historyColor.toRgbString()}" ng-click="setPaletteColor($event)"></div>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\n\n\t\t\t\t\t\t<md-button flex-end ng-click="history.reset()" class="md-mini" aria-label="Clear History">\n\t\t\t\t\t\t\t<md-icon md-svg-icon="clear_all.svg"></md-icon>\n\t\t\t\t\t\t</md-button>\n\t\t\t\t\t</div>\n\t\t\t\t</md-tab-body>\n\t\t\t</md-tab>\n\t\t</md-tabs>\n\t</div>\n\n</div>\n'),e.put("mdColorPickerDialog.tpl.html",'<md-dialog class="md-color-picker-dialog">\n\t<div md-color-picker-container\n\t\tvalue="value"\n\t\tdefault="{{defaultValue}}"\n\t\trandom="{{random}}"\n\t\tok="ok"\n\t\tmd-color-alpha-channel="mdColorAlphaChannel"\n\t\tmd-color-spectrum="mdColorSpectrum"\n\t\tmd-color-sliders="mdColorSliders"\n\t\tmd-color-generic-palette="mdColorGenericPalette"\n\t\tmd-color-material-palette="mdColorMaterialPalette"\n\t\tmd-color-history="mdColorHistory"\n\t\tmd-color-hex="mdColorHex"\n\t\tmd-color-rgb="mdColorRgb"\n\t\tmd-color-hsl="mdColorHsl"\n\t\tmd-color-default-tab="mdColorDefaultTab"\n\t></div>\n\t<md-actions layout="row">\n\t\t<md-button class="md-mini" ng-click="close()" style="width: 50%;">Cancel</md-button>\n\t\t<md-button class="md-mini" ng-click="ok()" style="width: 50%;">Select</md-button>\n\t</md-actions>\n</md-dialog>\n')}])}(angular,window,tinycolor),function(e,t){"function"==typeof define&&define.amd?define(["angular"],t):t(angular)}(0,function(e){e.module("ckeditor",[]).directive("ckeditor",["$parse",function(o){return{restrict:"A",require:["ckeditor","ngModel"],controller:["$scope","$element","$attrs","$parse","$q",t],link:function(e,t,n,r){var i=r[0],a=r[1];i.ready().then(function(){["dataReady","change","blur","saveSnapshot"].forEach(function(e){i.onCKEvent(e,function(){a.$setViewValue(i.instance.getData()||"")})}),i.instance.setReadOnly(!!n.readonly),n.$observe("readonly",function(e){i.instance.setReadOnly(!!e)}),l(function(){o(n.ready)(e)})}),a.$render=function(){i.ready().then(function(){i.instance.setData(a.$viewValue||"",{noSnapshot:!0,callback:function(){i.instance.fire("updateSnapshot")}})})}}}}]);var l=window&&window.setImmediate?window.setImmediate:function(e){setTimeout(e,0)};function t(r,e,t,n,i){var a,o=n(t.ckeditor)(r)||{},s=e[0],c=i.defer();a=s.hasAttribute("contenteditable")&&"true"==s.getAttribute("contenteditable").toLowerCase()?this.instance=CKEDITOR.inline(s,o):this.instance=CKEDITOR.replace(s,o),this.onCKEvent=function(e,t){function n(){var e=arguments;r.$apply(function(){t.apply(null,e)})}return a.on(e,function(){var e=arguments;l(function(){n.apply(null,e)})}),function(){a.removeListener(e,n)}},this.onCKEvent("instanceReady",function(){c.resolve(!0)}),this.ready=function(){return c.promise},r.$on("$destroy",function(){c.promise.then(function(){a.destroy(!1)})})}}),function(d){d.emojioneList={":kiss_mm:":{uc_base:"1f468-2764-1f48b-1f468",uc_output:"1f468-200d-2764-fe0f-200d-1f48b-200d-1f468",uc_match:"1f468-2764-fe0f-1f48b-1f468",uc_greedy:"1f468-2764-1f48b-1f468",shortnames:[":couplekiss_mm:"],category:"people"},":kiss_woman_man:":{uc_base:"1f469-2764-1f48b-1f468",uc_output:"1f469-200d-2764-fe0f-200d-1f48b-200d-1f468",uc_match:"1f469-2764-fe0f-1f48b-1f468",uc_greedy:"1f469-2764-1f48b-1f468",shortnames:[],category:"people"},":kiss_ww:":{uc_base:"1f469-2764-1f48b-1f469",uc_output:"1f469-200d-2764-fe0f-200d-1f48b-200d-1f469",uc_match:"1f469-2764-fe0f-1f48b-1f469",uc_greedy:"1f469-2764-1f48b-1f469",shortnames:[":couplekiss_ww:"],category:"people"},":england:":{uc_base:"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",uc_output:"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",uc_match:"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",uc_greedy:"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f",shortnames:[],category:"flags"},":scotland:":{uc_base:"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",uc_output:"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",uc_match:"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",uc_greedy:"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f",shortnames:[],category:"flags"},":wales:":{uc_base:"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",uc_output:"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",uc_match:"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",uc_greedy:"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f",shortnames:[],category:"flags"},":family_mmbb:":{uc_base:"1f468-1f468-1f466-1f466",uc_output:"1f468-200d-1f468-200d-1f466-200d-1f466",uc_match:"1f468-1f468-1f466-1f466",uc_greedy:"1f468-1f468-1f466-1f466",shortnames:[],category:"people"},":family_mmgb:":{uc_base:"1f468-1f468-1f467-1f466",uc_output:"1f468-200d-1f468-200d-1f467-200d-1f466",uc_match:"1f468-1f468-1f467-1f466",uc_greedy:"1f468-1f468-1f467-1f466",shortnames:[],category:"people"},":family_mmgg:":{uc_base:"1f468-1f468-1f467-1f467",uc_output:"1f468-200d-1f468-200d-1f467-200d-1f467",uc_match:"1f468-1f468-1f467-1f467",uc_greedy:"1f468-1f468-1f467-1f467",shortnames:[],category:"people"},":family_mwbb:":{uc_base:"1f468-1f469-1f466-1f466",uc_output:"1f468-200d-1f469-200d-1f466-200d-1f466",uc_match:"1f468-1f469-1f466-1f466",uc_greedy:"1f468-1f469-1f466-1f466",shortnames:[],category:"people"},":family_mwgb:":{uc_base:"1f468-1f469-1f467-1f466",uc_output:"1f468-200d-1f469-200d-1f467-200d-1f466",uc_match:"1f468-1f469-1f467-1f466",uc_greedy:"1f468-1f469-1f467-1f466",shortnames:[],category:"people"},":family_mwgg:":{uc_base:"1f468-1f469-1f467-1f467",uc_output:"1f468-200d-1f469-200d-1f467-200d-1f467",uc_match:"1f468-1f469-1f467-1f467",uc_greedy:"1f468-1f469-1f467-1f467",shortnames:[],category:"people"},":family_wwbb:":{uc_base:"1f469-1f469-1f466-1f466",uc_output:"1f469-200d-1f469-200d-1f466-200d-1f466",uc_match:"1f469-1f469-1f466-1f466",uc_greedy:"1f469-1f469-1f466-1f466",shortnames:[],category:"people"},":family_wwgb:":{uc_base:"1f469-1f469-1f467-1f466",uc_output:"1f469-200d-1f469-200d-1f467-200d-1f466",uc_match:"1f469-1f469-1f467-1f466",uc_greedy:"1f469-1f469-1f467-1f466",shortnames:[],category:"people"},":family_wwgg:":{uc_base:"1f469-1f469-1f467-1f467",uc_output:"1f469-200d-1f469-200d-1f467-200d-1f467",uc_match:"1f469-1f469-1f467-1f467",uc_greedy:"1f469-1f469-1f467-1f467",shortnames:[],category:"people"},":couple_mm:":{uc_base:"1f468-2764-1f468",uc_output:"1f468-200d-2764-fe0f-200d-1f468",uc_match:"1f468-2764-fe0f-1f468",uc_greedy:"1f468-2764-1f468",shortnames:[":couple_with_heart_mm:"],category:"people"},":couple_with_heart_woman_man:":{uc_base:"1f469-2764-1f468",uc_output:"1f469-200d-2764-fe0f-200d-1f468",uc_match:"1f469-2764-fe0f-1f468",uc_greedy:"1f469-2764-1f468",shortnames:[],category:"people"},":couple_ww:":{uc_base:"1f469-2764-1f469",uc_output:"1f469-200d-2764-fe0f-200d-1f469",uc_match:"1f469-2764-fe0f-1f469",uc_greedy:"1f469-2764-1f469",shortnames:[":couple_with_heart_ww:"],category:"people"},":family_man_boy_boy:":{uc_base:"1f468-1f466-1f466",uc_output:"1f468-200d-1f466-200d-1f466",uc_match:"1f468-1f466-1f466",uc_greedy:"1f468-1f466-1f466",shortnames:[],category:"people"},":family_man_girl_boy:":{uc_base:"1f468-1f467-1f466",uc_output:"1f468-200d-1f467-200d-1f466",uc_match:"1f468-1f467-1f466",uc_greedy:"1f468-1f467-1f466",shortnames:[],category:"people"},":family_man_girl_girl:":{uc_base:"1f468-1f467-1f467",uc_output:"1f468-200d-1f467-200d-1f467",uc_match:"1f468-1f467-1f467",uc_greedy:"1f468-1f467-1f467",shortnames:[],category:"people"},":family_man_woman_boy:":{uc_base:"1f468-1f469-1f466",uc_output:"1f468-200d-1f469-200d-1f466",uc_match:"1f468-1f469-1f466",uc_greedy:"1f468-1f469-1f466",shortnames:[],category:"people"},":family_mmb:":{uc_base:"1f468-1f468-1f466",uc_output:"1f468-200d-1f468-200d-1f466",uc_match:"1f468-1f468-1f466",uc_greedy:"1f468-1f468-1f466",shortnames:[],category:"people"},":family_mmg:":{uc_base:"1f468-1f468-1f467",uc_output:"1f468-200d-1f468-200d-1f467",uc_match:"1f468-1f468-1f467",uc_greedy:"1f468-1f468-1f467",shortnames:[],category:"people"},":family_mwg:":{uc_base:"1f468-1f469-1f467",uc_output:"1f468-200d-1f469-200d-1f467",uc_match:"1f468-1f469-1f467",uc_greedy:"1f468-1f469-1f467",shortnames:[],category:"people"},":family_woman_boy_boy:":{uc_base:"1f469-1f466-1f466",uc_output:"1f469-200d-1f466-200d-1f466",uc_match:"1f469-1f466-1f466",uc_greedy:"1f469-1f466-1f466",shortnames:[],category:"people"},":family_woman_girl_boy:":{uc_base:"1f469-1f467-1f466",uc_output:"1f469-200d-1f467-200d-1f466",uc_match:"1f469-1f467-1f466",uc_greedy:"1f469-1f467-1f466",shortnames:[],category:"people"},":family_woman_girl_girl:":{uc_base:"1f469-1f467-1f467",uc_output:"1f469-200d-1f467-200d-1f467",uc_match:"1f469-1f467-1f467",uc_greedy:"1f469-1f467-1f467",shortnames:[],category:"people"},":family_wwb:":{uc_base:"1f469-1f469-1f466",uc_output:"1f469-200d-1f469-200d-1f466",uc_match:"1f469-1f469-1f466",uc_greedy:"1f469-1f469-1f466",shortnames:[],category:"people"},":family_wwg:":{uc_base:"1f469-1f469-1f467",uc_output:"1f469-200d-1f469-200d-1f467",uc_match:"1f469-1f469-1f467",uc_greedy:"1f469-1f469-1f467",shortnames:[],category:"people"},":blond-haired_man_tone1:":{uc_base:"1f471-1f3fb-2642",uc_output:"1f471-1f3fb-200d-2642-fe0f",uc_match:"1f471-1f3fb-2642-fe0f",uc_greedy:"1f471-1f3fb-2642",shortnames:[":blond-haired_man_light_skin_tone:"],category:"people"},":blond-haired_man_tone2:":{uc_base:"1f471-1f3fc-2642",uc_output:"1f471-1f3fc-200d-2642-fe0f",uc_match:"1f471-1f3fc-2642-fe0f",uc_greedy:"1f471-1f3fc-2642",shortnames:[":blond-haired_man_medium_light_skin_tone:"],category:"people"},":blond-haired_man_tone3:":{uc_base:"1f471-1f3fd-2642",uc_output:"1f471-1f3fd-200d-2642-fe0f",uc_match:"1f471-1f3fd-2642-fe0f",uc_greedy:"1f471-1f3fd-2642",shortnames:[":blond-haired_man_medium_skin_tone:"],category:"people"},":blond-haired_man_tone4:":{uc_base:"1f471-1f3fe-2642",uc_output:"1f471-1f3fe-200d-2642-fe0f",uc_match:"1f471-1f3fe-2642-fe0f",uc_greedy:"1f471-1f3fe-2642",shortnames:[":blond-haired_man_medium_dark_skin_tone:"],category:"people"},":blond-haired_man_tone5:":{uc_base:"1f471-1f3ff-2642",uc_output:"1f471-1f3ff-200d-2642-fe0f",uc_match:"1f471-1f3ff-2642-fe0f",uc_greedy:"1f471-1f3ff-2642",shortnames:[":blond-haired_man_dark_skin_tone:"],category:"people"},":blond-haired_woman_tone1:":{uc_base:"1f471-1f3fb-2640",uc_output:"1f471-1f3fb-200d-2640-fe0f",uc_match:"1f471-1f3fb-2640-fe0f",uc_greedy:"1f471-1f3fb-2640",shortnames:[":blond-haired_woman_light_skin_tone:"],category:"people"},":blond-haired_woman_tone2:":{uc_base:"1f471-1f3fc-2640",uc_output:"1f471-1f3fc-200d-2640-fe0f",uc_match:"1f471-1f3fc-2640-fe0f",uc_greedy:"1f471-1f3fc-2640",shortnames:[":blond-haired_woman_medium_light_skin_tone:"],category:"people"},":blond-haired_woman_tone3:":{uc_base:"1f471-1f3fd-2640",uc_output:"1f471-1f3fd-200d-2640-fe0f",uc_match:"1f471-1f3fd-2640-fe0f",uc_greedy:"1f471-1f3fd-2640",shortnames:[":blond-haired_woman_medium_skin_tone:"],category:"people"},":blond-haired_woman_tone4:":{uc_base:"1f471-1f3fe-2640",uc_output:"1f471-1f3fe-200d-2640-fe0f",uc_match:"1f471-1f3fe-2640-fe0f",uc_greedy:"1f471-1f3fe-2640",shortnames:[":blond-haired_woman_medium_dark_skin_tone:"],category:"people"},":blond-haired_woman_tone5:":{uc_base:"1f471-1f3ff-2640",uc_output:"1f471-1f3ff-200d-2640-fe0f",uc_match:"1f471-1f3ff-2640-fe0f",uc_greedy:"1f471-1f3ff-2640",shortnames:[":blond-haired_woman_dark_skin_tone:"],category:"people"},":eye_in_speech_bubble:":{uc_base:"1f441-1f5e8",uc_output:"1f441-fe0f-200d-1f5e8-fe0f",uc_match:"1f441-fe0f-200d-1f5e8",uc_greedy:"1f441-1f5e8",shortnames:[],category:"symbols"},":man_biking_tone1:":{uc_base:"1f6b4-1f3fb-2642",uc_output:"1f6b4-1f3fb-200d-2642-fe0f",uc_match:"1f6b4-1f3fb-2642-fe0f",uc_greedy:"1f6b4-1f3fb-2642",shortnames:[":man_biking_light_skin_tone:"],category:"activity"},":man_biking_tone2:":{uc_base:"1f6b4-1f3fc-2642",uc_output:"1f6b4-1f3fc-200d-2642-fe0f",uc_match:"1f6b4-1f3fc-2642-fe0f",uc_greedy:"1f6b4-1f3fc-2642",shortnames:[":man_biking_medium_light_skin_tone:"],category:"activity"},":man_biking_tone3:":{uc_base:"1f6b4-1f3fd-2642",uc_output:"1f6b4-1f3fd-200d-2642-fe0f",uc_match:"1f6b4-1f3fd-2642-fe0f",uc_greedy:"1f6b4-1f3fd-2642",shortnames:[":man_biking_medium_skin_tone:"],category:"activity"},":man_biking_tone4:":{uc_base:"1f6b4-1f3fe-2642",uc_output:"1f6b4-1f3fe-200d-2642-fe0f",uc_match:"1f6b4-1f3fe-2642-fe0f",uc_greedy:"1f6b4-1f3fe-2642",shortnames:[":man_biking_medium_dark_skin_tone:"],category:"activity"},":man_biking_tone5:":{uc_base:"1f6b4-1f3ff-2642",uc_output:"1f6b4-1f3ff-200d-2642-fe0f",uc_match:"1f6b4-1f3ff-2642-fe0f",uc_greedy:"1f6b4-1f3ff-2642",shortnames:[":man_biking_dark_skin_tone:"],category:"activity"},":man_bowing_tone1:":{uc_base:"1f647-1f3fb-2642",uc_output:"1f647-1f3fb-200d-2642-fe0f",uc_match:"1f647-1f3fb-2642-fe0f",uc_greedy:"1f647-1f3fb-2642",shortnames:[":man_bowing_light_skin_tone:"],category:"people"},":man_bowing_tone2:":{uc_base:"1f647-1f3fc-2642",uc_output:"1f647-1f3fc-200d-2642-fe0f",uc_match:"1f647-1f3fc-2642-fe0f",uc_greedy:"1f647-1f3fc-2642",shortnames:[":man_bowing_medium_light_skin_tone:"],category:"people"},":man_bowing_tone3:":{uc_base:"1f647-1f3fd-2642",uc_output:"1f647-1f3fd-200d-2642-fe0f",uc_match:"1f647-1f3fd-2642-fe0f",uc_greedy:"1f647-1f3fd-2642",shortnames:[":man_bowing_medium_skin_tone:"],category:"people"},":man_bowing_tone4:":{uc_base:"1f647-1f3fe-2642",uc_output:"1f647-1f3fe-200d-2642-fe0f",uc_match:"1f647-1f3fe-2642-fe0f",uc_greedy:"1f647-1f3fe-2642",shortnames:[":man_bowing_medium_dark_skin_tone:"],category:"people"},":man_bowing_tone5:":{uc_base:"1f647-1f3ff-2642",uc_output:"1f647-1f3ff-200d-2642-fe0f",uc_match:"1f647-1f3ff-2642-fe0f",uc_greedy:"1f647-1f3ff-2642",shortnames:[":man_bowing_dark_skin_tone:"],category:"people"},":man_cartwheeling_tone1:":{uc_base:"1f938-1f3fb-2642",uc_output:"1f938-1f3fb-200d-2642-fe0f",uc_match:"1f938-1f3fb-2642-fe0f",uc_greedy:"1f938-1f3fb-2642",shortnames:[":man_cartwheeling_light_skin_tone:"],category:"activity"},":man_cartwheeling_tone2:":{uc_base:"1f938-1f3fc-2642",uc_output:"1f938-1f3fc-200d-2642-fe0f",uc_match:"1f938-1f3fc-2642-fe0f",uc_greedy:"1f938-1f3fc-2642",shortnames:[":man_cartwheeling_medium_light_skin_tone:"],category:"activity"},":man_cartwheeling_tone3:":{uc_base:"1f938-1f3fd-2642",uc_output:"1f938-1f3fd-200d-2642-fe0f",uc_match:"1f938-1f3fd-2642-fe0f",uc_greedy:"1f938-1f3fd-2642",shortnames:[":man_cartwheeling_medium_skin_tone:"],category:"activity"},":man_cartwheeling_tone4:":{uc_base:"1f938-1f3fe-2642",uc_output:"1f938-1f3fe-200d-2642-fe0f",uc_match:"1f938-1f3fe-2642-fe0f",uc_greedy:"1f938-1f3fe-2642",shortnames:[":man_cartwheeling_medium_dark_skin_tone:"],category:"activity"},":man_cartwheeling_tone5:":{uc_base:"1f938-1f3ff-2642",uc_output:"1f938-1f3ff-200d-2642-fe0f",uc_match:"1f938-1f3ff-2642-fe0f",uc_greedy:"1f938-1f3ff-2642",shortnames:[":man_cartwheeling_dark_skin_tone:"],category:"activity"},":man_climbing_tone1:":{uc_base:"1f9d7-1f3fb-2642",uc_output:"1f9d7-1f3fb-200d-2642-fe0f",uc_match:"1f9d7-1f3fb-2642-fe0f",uc_greedy:"1f9d7-1f3fb-2642",shortnames:[":man_climbing_light_skin_tone:"],category:"activity"},":man_climbing_tone2:":{uc_base:"1f9d7-1f3fc-2642",uc_output:"1f9d7-1f3fc-200d-2642-fe0f",uc_match:"1f9d7-1f3fc-2642-fe0f",uc_greedy:"1f9d7-1f3fc-2642",shortnames:[":man_climbing_medium_light_skin_tone:"],category:"activity"},":man_climbing_tone3:":{uc_base:"1f9d7-1f3fd-2642",uc_output:"1f9d7-1f3fd-200d-2642-fe0f",uc_match:"1f9d7-1f3fd-2642-fe0f",uc_greedy:"1f9d7-1f3fd-2642",shortnames:[":man_climbing_medium_skin_tone:"],category:"activity"},":man_climbing_tone4:":{uc_base:"1f9d7-1f3fe-2642",uc_output:"1f9d7-1f3fe-200d-2642-fe0f",uc_match:"1f9d7-1f3fe-2642-fe0f",uc_greedy:"1f9d7-1f3fe-2642",shortnames:[":man_climbing_medium_dark_skin_tone:"],category:"activity"},":man_climbing_tone5:":{uc_base:"1f9d7-1f3ff-2642",uc_output:"1f9d7-1f3ff-200d-2642-fe0f",uc_match:"1f9d7-1f3ff-2642-fe0f",uc_greedy:"1f9d7-1f3ff-2642",shortnames:[":man_climbing_dark_skin_tone:"],category:"activity"},":man_construction_worker_tone1:":{uc_base:"1f477-1f3fb-2642",uc_output:"1f477-1f3fb-200d-2642-fe0f",uc_match:"1f477-1f3fb-2642-fe0f",uc_greedy:"1f477-1f3fb-2642",shortnames:[":man_construction_worker_light_skin_tone:"],category:"people"},":man_construction_worker_tone2:":{uc_base:"1f477-1f3fc-2642",uc_output:"1f477-1f3fc-200d-2642-fe0f",uc_match:"1f477-1f3fc-2642-fe0f",uc_greedy:"1f477-1f3fc-2642",shortnames:[":man_construction_worker_medium_light_skin_tone:"],category:"people"},":man_construction_worker_tone3:":{uc_base:"1f477-1f3fd-2642",uc_output:"1f477-1f3fd-200d-2642-fe0f",uc_match:"1f477-1f3fd-2642-fe0f",uc_greedy:"1f477-1f3fd-2642",shortnames:[":man_construction_worker_medium_skin_tone:"],category:"people"},":man_construction_worker_tone4:":{uc_base:"1f477-1f3fe-2642",uc_output:"1f477-1f3fe-200d-2642-fe0f",uc_match:"1f477-1f3fe-2642-fe0f",uc_greedy:"1f477-1f3fe-2642",shortnames:[":man_construction_worker_medium_dark_skin_tone:"],category:"people"},":man_construction_worker_tone5:":{uc_base:"1f477-1f3ff-2642",uc_output:"1f477-1f3ff-200d-2642-fe0f",uc_match:"1f477-1f3ff-2642-fe0f",uc_greedy:"1f477-1f3ff-2642",shortnames:[":man_construction_worker_dark_skin_tone:"],category:"people"},":man_detective_tone1:":{uc_base:"1f575-1f3fb-2642",uc_output:"1f575-1f3fb-200d-2642-fe0f",uc_match:"1f575-fe0f-1f3fb-2642-fe0f",uc_greedy:"1f575-1f3fb-2642",shortnames:[":man_detective_light_skin_tone:"],category:"people"},":man_detective_tone2:":{uc_base:"1f575-1f3fc-2642",uc_output:"1f575-1f3fc-200d-2642-fe0f",uc_match:"1f575-fe0f-1f3fc-2642-fe0f",uc_greedy:"1f575-1f3fc-2642",shortnames:[":man_detective_medium_light_skin_tone:"],category:"people"},":man_detective_tone3:":{uc_base:"1f575-1f3fd-2642",uc_output:"1f575-1f3fd-200d-2642-fe0f",uc_match:"1f575-fe0f-1f3fd-2642-fe0f",uc_greedy:"1f575-1f3fd-2642",shortnames:[":man_detective_medium_skin_tone:"],category:"people"},":man_detective_tone4:":{uc_base:"1f575-1f3fe-2642",uc_output:"1f575-1f3fe-200d-2642-fe0f",uc_match:"1f575-fe0f-1f3fe-2642-fe0f",uc_greedy:"1f575-1f3fe-2642",shortnames:[":man_detective_medium_dark_skin_tone:"],category:"people"},":man_detective_tone5:":{uc_base:"1f575-1f3ff-2642",uc_output:"1f575-1f3ff-200d-2642-fe0f",uc_match:"1f575-fe0f-1f3ff-2642-fe0f",uc_greedy:"1f575-1f3ff-2642",shortnames:[":man_detective_dark_skin_tone:"],category:"people"},":man_elf_tone1:":{uc_base:"1f9dd-1f3fb-2642",uc_output:"1f9dd-1f3fb-200d-2642-fe0f",uc_match:"1f9dd-1f3fb-2642-fe0f",uc_greedy:"1f9dd-1f3fb-2642",shortnames:[":man_elf_light_skin_tone:"],category:"people"},":man_elf_tone2:":{uc_base:"1f9dd-1f3fc-2642",uc_output:"1f9dd-1f3fc-200d-2642-fe0f",uc_match:"1f9dd-1f3fc-2642-fe0f",uc_greedy:"1f9dd-1f3fc-2642",shortnames:[":man_elf_medium_light_skin_tone:"],category:"people"},":man_elf_tone3:":{uc_base:"1f9dd-1f3fd-2642",uc_output:"1f9dd-1f3fd-200d-2642-fe0f",uc_match:"1f9dd-1f3fd-2642-fe0f",uc_greedy:"1f9dd-1f3fd-2642",shortnames:[":man_elf_medium_skin_tone:"],category:"people"},":man_elf_tone4:":{uc_base:"1f9dd-1f3fe-2642",uc_output:"1f9dd-1f3fe-200d-2642-fe0f",uc_match:"1f9dd-1f3fe-2642-fe0f",uc_greedy:"1f9dd-1f3fe-2642",shortnames:[":man_elf_medium_dark_skin_tone:"],category:"people"},":man_elf_tone5:":{uc_base:"1f9dd-1f3ff-2642",uc_output:"1f9dd-1f3ff-200d-2642-fe0f",uc_match:"1f9dd-1f3ff-2642-fe0f",uc_greedy:"1f9dd-1f3ff-2642",shortnames:[":man_elf_dark_skin_tone:"],category:"people"},":man_facepalming_tone1:":{uc_base:"1f926-1f3fb-2642",uc_output:"1f926-1f3fb-200d-2642-fe0f",uc_match:"1f926-1f3fb-2642-fe0f",uc_greedy:"1f926-1f3fb-2642",shortnames:[":man_facepalming_light_skin_tone:"],category:"people"},":man_facepalming_tone2:":{uc_base:"1f926-1f3fc-2642",uc_output:"1f926-1f3fc-200d-2642-fe0f",uc_match:"1f926-1f3fc-2642-fe0f",uc_greedy:"1f926-1f3fc-2642",shortnames:[":man_facepalming_medium_light_skin_tone:"],category:"people"},":man_facepalming_tone3:":{uc_base:"1f926-1f3fd-2642",uc_output:"1f926-1f3fd-200d-2642-fe0f",uc_match:"1f926-1f3fd-2642-fe0f",uc_greedy:"1f926-1f3fd-2642",shortnames:[":man_facepalming_medium_skin_tone:"],category:"people"},":man_facepalming_tone4:":{uc_base:"1f926-1f3fe-2642",uc_output:"1f926-1f3fe-200d-2642-fe0f",uc_match:"1f926-1f3fe-2642-fe0f",uc_greedy:"1f926-1f3fe-2642",shortnames:[":man_facepalming_medium_dark_skin_tone:"],category:"people"},":man_facepalming_tone5:":{uc_base:"1f926-1f3ff-2642",uc_output:"1f926-1f3ff-200d-2642-fe0f",uc_match:"1f926-1f3ff-2642-fe0f",uc_greedy:"1f926-1f3ff-2642",shortnames:[":man_facepalming_dark_skin_tone:"],category:"people"},":man_fairy_tone1:":{uc_base:"1f9da-1f3fb-2642",uc_output:"1f9da-1f3fb-200d-2642-fe0f",uc_match:"1f9da-1f3fb-2642-fe0f",uc_greedy:"1f9da-1f3fb-2642",shortnames:[":man_fairy_light_skin_tone:"],category:"people"},":man_fairy_tone2:":{uc_base:"1f9da-1f3fc-2642",uc_output:"1f9da-1f3fc-200d-2642-fe0f",uc_match:"1f9da-1f3fc-2642-fe0f",uc_greedy:"1f9da-1f3fc-2642",shortnames:[":man_fairy_medium_light_skin_tone:"],category:"people"},":man_fairy_tone3:":{uc_base:"1f9da-1f3fd-2642",uc_output:"1f9da-1f3fd-200d-2642-fe0f",uc_match:"1f9da-1f3fd-2642-fe0f",uc_greedy:"1f9da-1f3fd-2642",shortnames:[":man_fairy_medium_skin_tone:"],category:"people"},":man_fairy_tone4:":{uc_base:"1f9da-1f3fe-2642",uc_output:"1f9da-1f3fe-200d-2642-fe0f",uc_match:"1f9da-1f3fe-2642-fe0f",uc_greedy:"1f9da-1f3fe-2642",shortnames:[":man_fairy_medium_dark_skin_tone:"],category:"people"},":man_fairy_tone5:":{uc_base:"1f9da-1f3ff-2642",uc_output:"1f9da-1f3ff-200d-2642-fe0f",uc_match:"1f9da-1f3ff-2642-fe0f",uc_greedy:"1f9da-1f3ff-2642",shortnames:[":man_fairy_dark_skin_tone:"],category:"people"},":man_frowning_tone1:":{uc_base:"1f64d-1f3fb-2642",uc_output:"1f64d-1f3fb-200d-2642-fe0f",uc_match:"1f64d-1f3fb-2642-fe0f",uc_greedy:"1f64d-1f3fb-2642",shortnames:[":man_frowning_light_skin_tone:"],category:"people"},":man_frowning_tone2:":{uc_base:"1f64d-1f3fc-2642",uc_output:"1f64d-1f3fc-200d-2642-fe0f",uc_match:"1f64d-1f3fc-2642-fe0f",uc_greedy:"1f64d-1f3fc-2642",shortnames:[":man_frowning_medium_light_skin_tone:"],category:"people"},":man_frowning_tone3:":{uc_base:"1f64d-1f3fd-2642",uc_output:"1f64d-1f3fd-200d-2642-fe0f",uc_match:"1f64d-1f3fd-2642-fe0f",uc_greedy:"1f64d-1f3fd-2642",shortnames:[":man_frowning_medium_skin_tone:"],category:"people"},":man_frowning_tone4:":{uc_base:"1f64d-1f3fe-2642",uc_output:"1f64d-1f3fe-200d-2642-fe0f",uc_match:"1f64d-1f3fe-2642-fe0f",uc_greedy:"1f64d-1f3fe-2642",shortnames:[":man_frowning_medium_dark_skin_tone:"],category:"people"},":man_frowning_tone5:":{uc_base:"1f64d-1f3ff-2642",uc_output:"1f64d-1f3ff-200d-2642-fe0f",uc_match:"1f64d-1f3ff-2642-fe0f",uc_greedy:"1f64d-1f3ff-2642",shortnames:[":man_frowning_dark_skin_tone:"],category:"people"},":man_gesturing_no_tone1:":{uc_base:"1f645-1f3fb-2642",uc_output:"1f645-1f3fb-200d-2642-fe0f",uc_match:"1f645-1f3fb-2642-fe0f",uc_greedy:"1f645-1f3fb-2642",shortnames:[":man_gesturing_no_light_skin_tone:"],category:"people"},":man_gesturing_no_tone2:":{uc_base:"1f645-1f3fc-2642",uc_output:"1f645-1f3fc-200d-2642-fe0f",uc_match:"1f645-1f3fc-2642-fe0f",uc_greedy:"1f645-1f3fc-2642",shortnames:[":man_gesturing_no_medium_light_skin_tone:"],category:"people"},":man_gesturing_no_tone3:":{uc_base:"1f645-1f3fd-2642",uc_output:"1f645-1f3fd-200d-2642-fe0f",uc_match:"1f645-1f3fd-2642-fe0f",uc_greedy:"1f645-1f3fd-2642",shortnames:[":man_gesturing_no_medium_skin_tone:"],category:"people"},":man_gesturing_no_tone4:":{uc_base:"1f645-1f3fe-2642",uc_output:"1f645-1f3fe-200d-2642-fe0f",uc_match:"1f645-1f3fe-2642-fe0f",uc_greedy:"1f645-1f3fe-2642",shortnames:[":man_gesturing_no_medium_dark_skin_tone:"],category:"people"},":man_gesturing_no_tone5:":{uc_base:"1f645-1f3ff-2642",uc_output:"1f645-1f3ff-200d-2642-fe0f",uc_match:"1f645-1f3ff-2642-fe0f",uc_greedy:"1f645-1f3ff-2642",shortnames:[":man_gesturing_no_dark_skin_tone:"],category:"people"},":man_gesturing_ok_tone1:":{uc_base:"1f646-1f3fb-2642",uc_output:"1f646-1f3fb-200d-2642-fe0f",uc_match:"1f646-1f3fb-2642-fe0f",uc_greedy:"1f646-1f3fb-2642",shortnames:[":man_gesturing_ok_light_skin_tone:"],category:"people"},":man_gesturing_ok_tone2:":{uc_base:"1f646-1f3fc-2642",uc_output:"1f646-1f3fc-200d-2642-fe0f",uc_match:"1f646-1f3fc-2642-fe0f",uc_greedy:"1f646-1f3fc-2642",shortnames:[":man_gesturing_ok_medium_light_skin_tone:"],category:"people"},":man_gesturing_ok_tone3:":{uc_base:"1f646-1f3fd-2642",uc_output:"1f646-1f3fd-200d-2642-fe0f",uc_match:"1f646-1f3fd-2642-fe0f",uc_greedy:"1f646-1f3fd-2642",shortnames:[":man_gesturing_ok_medium_skin_tone:"],category:"people"},":man_gesturing_ok_tone4:":{uc_base:"1f646-1f3fe-2642",uc_output:"1f646-1f3fe-200d-2642-fe0f",uc_match:"1f646-1f3fe-2642-fe0f",uc_greedy:"1f646-1f3fe-2642",shortnames:[":man_gesturing_ok_medium_dark_skin_tone:"],category:"people"},":man_gesturing_ok_tone5:":{uc_base:"1f646-1f3ff-2642",uc_output:"1f646-1f3ff-200d-2642-fe0f",uc_match:"1f646-1f3ff-2642-fe0f",uc_greedy:"1f646-1f3ff-2642",shortnames:[":man_gesturing_ok_dark_skin_tone:"],category:"people"},":man_getting_face_massage_tone1:":{uc_base:"1f486-1f3fb-2642",uc_output:"1f486-1f3fb-200d-2642-fe0f",uc_match:"1f486-1f3fb-2642-fe0f",uc_greedy:"1f486-1f3fb-2642",shortnames:[":man_getting_face_massage_light_skin_tone:"],category:"people"},":man_getting_face_massage_tone2:":{uc_base:"1f486-1f3fc-2642",uc_output:"1f486-1f3fc-200d-2642-fe0f",uc_match:"1f486-1f3fc-2642-fe0f",uc_greedy:"1f486-1f3fc-2642",shortnames:[":man_getting_face_massage_medium_light_skin_tone:"],category:"people"},":man_getting_face_massage_tone3:":{uc_base:"1f486-1f3fd-2642",uc_output:"1f486-1f3fd-200d-2642-fe0f",uc_match:"1f486-1f3fd-2642-fe0f",uc_greedy:"1f486-1f3fd-2642",shortnames:[":man_getting_face_massage_medium_skin_tone:"],category:"people"},":man_getting_face_massage_tone4:":{uc_base:"1f486-1f3fe-2642",uc_output:"1f486-1f3fe-200d-2642-fe0f",uc_match:"1f486-1f3fe-2642-fe0f",uc_greedy:"1f486-1f3fe-2642",shortnames:[":man_getting_face_massage_medium_dark_skin_tone:"],category:"people"},":man_getting_face_massage_tone5:":{uc_base:"1f486-1f3ff-2642",uc_output:"1f486-1f3ff-200d-2642-fe0f",uc_match:"1f486-1f3ff-2642-fe0f",uc_greedy:"1f486-1f3ff-2642",shortnames:[":man_getting_face_massage_dark_skin_tone:"],category:"people"},":man_getting_haircut_tone1:":{uc_base:"1f487-1f3fb-2642",uc_output:"1f487-1f3fb-200d-2642-fe0f",uc_match:"1f487-1f3fb-2642-fe0f",uc_greedy:"1f487-1f3fb-2642",shortnames:[":man_getting_haircut_light_skin_tone:"],category:"people"},":man_getting_haircut_tone2:":{uc_base:"1f487-1f3fc-2642",uc_output:"1f487-1f3fc-200d-2642-fe0f",uc_match:"1f487-1f3fc-2642-fe0f",uc_greedy:"1f487-1f3fc-2642",shortnames:[":man_getting_haircut_medium_light_skin_tone:"],category:"people"},":man_getting_haircut_tone3:":{uc_base:"1f487-1f3fd-2642",uc_output:"1f487-1f3fd-200d-2642-fe0f",uc_match:"1f487-1f3fd-2642-fe0f",uc_greedy:"1f487-1f3fd-2642",shortnames:[":man_getting_haircut_medium_skin_tone:"],category:"people"},":man_getting_haircut_tone4:":{uc_base:"1f487-1f3fe-2642",uc_output:"1f487-1f3fe-200d-2642-fe0f",uc_match:"1f487-1f3fe-2642-fe0f",uc_greedy:"1f487-1f3fe-2642",shortnames:[":man_getting_haircut_medium_dark_skin_tone:"],category:"people"},":man_getting_haircut_tone5:":{uc_base:"1f487-1f3ff-2642",uc_output:"1f487-1f3ff-200d-2642-fe0f",uc_match:"1f487-1f3ff-2642-fe0f",uc_greedy:"1f487-1f3ff-2642",shortnames:[":man_getting_haircut_dark_skin_tone:"],category:"people"},":man_golfing_tone1:":{uc_base:"1f3cc-1f3fb-2642",uc_output:"1f3cc-1f3fb-200d-2642-fe0f",uc_match:"1f3cc-fe0f-1f3fb-2642-fe0f",uc_greedy:"1f3cc-1f3fb-2642",shortnames:[":man_golfing_light_skin_tone:"],category:"activity"},":man_golfing_tone2:":{uc_base:"1f3cc-1f3fc-2642",uc_output:"1f3cc-1f3fc-200d-2642-fe0f",uc_match:"1f3cc-fe0f-1f3fc-2642-fe0f",uc_greedy:"1f3cc-1f3fc-2642",shortnames:[":man_golfing_medium_light_skin_tone:"],category:"activity"},":man_golfing_tone3:":{uc_base:"1f3cc-1f3fd-2642",uc_output:"1f3cc-1f3fd-200d-2642-fe0f",uc_match:"1f3cc-fe0f-1f3fd-2642-fe0f",uc_greedy:"1f3cc-1f3fd-2642",shortnames:[":man_golfing_medium_skin_tone:"],category:"activity"},":man_golfing_tone4:":{uc_base:"1f3cc-1f3fe-2642",uc_output:"1f3cc-1f3fe-200d-2642-fe0f",uc_match:"1f3cc-fe0f-1f3fe-2642-fe0f",uc_greedy:"1f3cc-1f3fe-2642",shortnames:[":man_golfing_medium_dark_skin_tone:"],category:"activity"},":man_golfing_tone5:":{uc_base:"1f3cc-1f3ff-2642",uc_output:"1f3cc-1f3ff-200d-2642-fe0f",uc_match:"1f3cc-fe0f-1f3ff-2642-fe0f",uc_greedy:"1f3cc-1f3ff-2642",shortnames:[":man_golfing_dark_skin_tone:"],category:"activity"},":man_guard_tone1:":{uc_base:"1f482-1f3fb-2642",uc_output:"1f482-1f3fb-200d-2642-fe0f",uc_match:"1f482-1f3fb-2642-fe0f",uc_greedy:"1f482-1f3fb-2642",shortnames:[":man_guard_light_skin_tone:"],category:"people"},":man_guard_tone2:":{uc_base:"1f482-1f3fc-2642",uc_output:"1f482-1f3fc-200d-2642-fe0f",uc_match:"1f482-1f3fc-2642-fe0f",uc_greedy:"1f482-1f3fc-2642",shortnames:[":man_guard_medium_light_skin_tone:"],category:"people"},":man_guard_tone3:":{uc_base:"1f482-1f3fd-2642",uc_output:"1f482-1f3fd-200d-2642-fe0f",uc_match:"1f482-1f3fd-2642-fe0f",uc_greedy:"1f482-1f3fd-2642",shortnames:[":man_guard_medium_skin_tone:"],category:"people"},":man_guard_tone4:":{uc_base:"1f482-1f3fe-2642",uc_output:"1f482-1f3fe-200d-2642-fe0f",uc_match:"1f482-1f3fe-2642-fe0f",uc_greedy:"1f482-1f3fe-2642",shortnames:[":man_guard_medium_dark_skin_tone:"],category:"people"},":man_guard_tone5:":{uc_base:"1f482-1f3ff-2642",uc_output:"1f482-1f3ff-200d-2642-fe0f",uc_match:"1f482-1f3ff-2642-fe0f",uc_greedy:"1f482-1f3ff-2642",shortnames:[":man_guard_dark_skin_tone:"],category:"people"},":man_health_worker_tone1:":{uc_base:"1f468-1f3fb-2695",uc_output:"1f468-1f3fb-200d-2695-fe0f",uc_match:"1f468-1f3fb-2695-fe0f",uc_greedy:"1f468-1f3fb-2695",shortnames:[":man_health_worker_light_skin_tone:"],category:"people"},":man_health_worker_tone2:":{uc_base:"1f468-1f3fc-2695",uc_output:"1f468-1f3fc-200d-2695-fe0f",uc_match:"1f468-1f3fc-2695-fe0f",uc_greedy:"1f468-1f3fc-2695",shortnames:[":man_health_worker_medium_light_skin_tone:"],category:"people"},":man_health_worker_tone3:":{uc_base:"1f468-1f3fd-2695",uc_output:"1f468-1f3fd-200d-2695-fe0f",uc_match:"1f468-1f3fd-2695-fe0f",uc_greedy:"1f468-1f3fd-2695",shortnames:[":man_health_worker_medium_skin_tone:"],category:"people"},":man_health_worker_tone4:":{uc_base:"1f468-1f3fe-2695",uc_output:"1f468-1f3fe-200d-2695-fe0f",uc_match:"1f468-1f3fe-2695-fe0f",uc_greedy:"1f468-1f3fe-2695",shortnames:[":man_health_worker_medium_dark_skin_tone:"],category:"people"},":man_health_worker_tone5:":{uc_base:"1f468-1f3ff-2695",uc_output:"1f468-1f3ff-200d-2695-fe0f",uc_match:"1f468-1f3ff-2695-fe0f",uc_greedy:"1f468-1f3ff-2695",shortnames:[":man_health_worker_dark_skin_tone:"],category:"people"},":man_in_lotus_position_tone1:":{uc_base:"1f9d8-1f3fb-2642",uc_output:"1f9d8-1f3fb-200d-2642-fe0f",uc_match:"1f9d8-1f3fb-2642-fe0f",uc_greedy:"1f9d8-1f3fb-2642",shortnames:[":man_in_lotus_position_light_skin_tone:"],category:"activity"},":man_in_lotus_position_tone2:":{uc_base:"1f9d8-1f3fc-2642",uc_output:"1f9d8-1f3fc-200d-2642-fe0f",uc_match:"1f9d8-1f3fc-2642-fe0f",uc_greedy:"1f9d8-1f3fc-2642",shortnames:[":man_in_lotus_position_medium_light_skin_tone:"],category:"activity"},":man_in_lotus_position_tone3:":{uc_base:"1f9d8-1f3fd-2642",uc_output:"1f9d8-1f3fd-200d-2642-fe0f",uc_match:"1f9d8-1f3fd-2642-fe0f",uc_greedy:"1f9d8-1f3fd-2642",shortnames:[":man_in_lotus_position_medium_skin_tone:"],category:"activity"},":man_in_lotus_position_tone4:":{uc_base:"1f9d8-1f3fe-2642",uc_output:"1f9d8-1f3fe-200d-2642-fe0f",uc_match:"1f9d8-1f3fe-2642-fe0f",uc_greedy:"1f9d8-1f3fe-2642",shortnames:[":man_in_lotus_position_medium_dark_skin_tone:"],category:"activity"},":man_in_lotus_position_tone5:":{uc_base:"1f9d8-1f3ff-2642",uc_output:"1f9d8-1f3ff-200d-2642-fe0f",uc_match:"1f9d8-1f3ff-2642-fe0f",uc_greedy:"1f9d8-1f3ff-2642",shortnames:[":man_in_lotus_position_dark_skin_tone:"],category:"activity"},":man_in_steamy_room_tone1:":{uc_base:"1f9d6-1f3fb-2642",uc_output:"1f9d6-1f3fb-200d-2642-fe0f",uc_match:"1f9d6-1f3fb-2642-fe0f",uc_greedy:"1f9d6-1f3fb-2642",shortnames:[":man_in_steamy_room_light_skin_tone:"],category:"people"},":man_in_steamy_room_tone2:":{uc_base:"1f9d6-1f3fc-2642",uc_output:"1f9d6-1f3fc-200d-2642-fe0f",uc_match:"1f9d6-1f3fc-2642-fe0f",uc_greedy:"1f9d6-1f3fc-2642",shortnames:[":man_in_steamy_room_medium_light_skin_tone:"],category:"people"},":man_in_steamy_room_tone3:":{uc_base:"1f9d6-1f3fd-2642",uc_output:"1f9d6-1f3fd-200d-2642-fe0f",uc_match:"1f9d6-1f3fd-2642-fe0f",uc_greedy:"1f9d6-1f3fd-2642",shortnames:[":man_in_steamy_room_medium_skin_tone:"],category:"people"},":man_in_steamy_room_tone4:":{uc_base:"1f9d6-1f3fe-2642",uc_output:"1f9d6-1f3fe-200d-2642-fe0f",uc_match:"1f9d6-1f3fe-2642-fe0f",uc_greedy:"1f9d6-1f3fe-2642",shortnames:[":man_in_steamy_room_medium_dark_skin_tone:"],category:"people"},":man_in_steamy_room_tone5:":{uc_base:"1f9d6-1f3ff-2642",uc_output:"1f9d6-1f3ff-200d-2642-fe0f",uc_match:"1f9d6-1f3ff-2642-fe0f",uc_greedy:"1f9d6-1f3ff-2642",shortnames:[":man_in_steamy_room_dark_skin_tone:"],category:"people"},":man_judge_tone1:":{uc_base:"1f468-1f3fb-2696",uc_output:"1f468-1f3fb-200d-2696-fe0f",uc_match:"1f468-1f3fb-2696-fe0f",uc_greedy:"1f468-1f3fb-2696",shortnames:[":man_judge_light_skin_tone:"],category:"people"},":man_judge_tone2:":{uc_base:"1f468-1f3fc-2696",uc_output:"1f468-1f3fc-200d-2696-fe0f",uc_match:"1f468-1f3fc-2696-fe0f",uc_greedy:"1f468-1f3fc-2696",shortnames:[":man_judge_medium_light_skin_tone:"],category:"people"},":man_judge_tone3:":{uc_base:"1f468-1f3fd-2696",uc_output:"1f468-1f3fd-200d-2696-fe0f",uc_match:"1f468-1f3fd-2696-fe0f",uc_greedy:"1f468-1f3fd-2696",shortnames:[":man_judge_medium_skin_tone:"],category:"people"},":man_judge_tone4:":{uc_base:"1f468-1f3fe-2696",uc_output:"1f468-1f3fe-200d-2696-fe0f",uc_match:"1f468-1f3fe-2696-fe0f",uc_greedy:"1f468-1f3fe-2696",shortnames:[":man_judge_medium_dark_skin_tone:"],category:"people"},":man_judge_tone5:":{uc_base:"1f468-1f3ff-2696",uc_output:"1f468-1f3ff-200d-2696-fe0f",uc_match:"1f468-1f3ff-2696-fe0f",uc_greedy:"1f468-1f3ff-2696",shortnames:[":man_judge_dark_skin_tone:"],category:"people"},":man_juggling_tone1:":{uc_base:"1f939-1f3fb-2642",uc_output:"1f939-1f3fb-200d-2642-fe0f",uc_match:"1f939-1f3fb-2642-fe0f",uc_greedy:"1f939-1f3fb-2642",shortnames:[":man_juggling_light_skin_tone:"],category:"activity"},":man_juggling_tone2:":{uc_base:"1f939-1f3fc-2642",uc_output:"1f939-1f3fc-200d-2642-fe0f",uc_match:"1f939-1f3fc-2642-fe0f",uc_greedy:"1f939-1f3fc-2642",shortnames:[":man_juggling_medium_light_skin_tone:"],category:"activity"},":man_juggling_tone3:":{uc_base:"1f939-1f3fd-2642",uc_output:"1f939-1f3fd-200d-2642-fe0f",uc_match:"1f939-1f3fd-2642-fe0f",uc_greedy:"1f939-1f3fd-2642",shortnames:[":man_juggling_medium_skin_tone:"],category:"activity"},":man_juggling_tone4:":{uc_base:"1f939-1f3fe-2642",uc_output:"1f939-1f3fe-200d-2642-fe0f",uc_match:"1f939-1f3fe-2642-fe0f",uc_greedy:"1f939-1f3fe-2642",shortnames:[":man_juggling_medium_dark_skin_tone:"],category:"activity"},":man_juggling_tone5:":{uc_base:"1f939-1f3ff-2642",uc_output:"1f939-1f3ff-200d-2642-fe0f",uc_match:"1f939-1f3ff-2642-fe0f",uc_greedy:"1f939-1f3ff-2642",shortnames:[":man_juggling_dark_skin_tone:"],category:"activity"},":man_lifting_weights_tone1:":{uc_base:"1f3cb-1f3fb-2642",uc_output:"1f3cb-1f3fb-200d-2642-fe0f",uc_match:"1f3cb-fe0f-1f3fb-2642-fe0f",uc_greedy:"1f3cb-1f3fb-2642",shortnames:[":man_lifting_weights_light_skin_tone:"],category:"activity"},":man_lifting_weights_tone2:":{uc_base:"1f3cb-1f3fc-2642",uc_output:"1f3cb-1f3fc-200d-2642-fe0f",uc_match:"1f3cb-fe0f-1f3fc-2642-fe0f",uc_greedy:"1f3cb-1f3fc-2642",shortnames:[":man_lifting_weights_medium_light_skin_tone:"],category:"activity"},":man_lifting_weights_tone3:":{uc_base:"1f3cb-1f3fd-2642",uc_output:"1f3cb-1f3fd-200d-2642-fe0f",uc_match:"1f3cb-fe0f-1f3fd-2642-fe0f",uc_greedy:"1f3cb-1f3fd-2642",shortnames:[":man_lifting_weights_medium_skin_tone:"],category:"activity"},":man_lifting_weights_tone4:":{uc_base:"1f3cb-1f3fe-2642",uc_output:"1f3cb-1f3fe-200d-2642-fe0f",uc_match:"1f3cb-fe0f-1f3fe-2642-fe0f",uc_greedy:"1f3cb-1f3fe-2642",shortnames:[":man_lifting_weights_medium_dark_skin_tone:"],category:"activity"},":man_lifting_weights_tone5:":{uc_base:"1f3cb-1f3ff-2642",uc_output:"1f3cb-1f3ff-200d-2642-fe0f",uc_match:"1f3cb-fe0f-1f3ff-2642-fe0f",uc_greedy:"1f3cb-1f3ff-2642",shortnames:[":man_lifting_weights_dark_skin_tone:"],category:"activity"},":man_mage_tone1:":{uc_base:"1f9d9-1f3fb-2642",uc_output:"1f9d9-1f3fb-200d-2642-fe0f",uc_match:"1f9d9-1f3fb-2642-fe0f",uc_greedy:"1f9d9-1f3fb-2642",shortnames:[":man_mage_light_skin_tone:"],category:"people"},":man_mage_tone2:":{uc_base:"1f9d9-1f3fc-2642",uc_output:"1f9d9-1f3fc-200d-2642-fe0f",uc_match:"1f9d9-1f3fc-2642-fe0f",uc_greedy:"1f9d9-1f3fc-2642",shortnames:[":man_mage_medium_light_skin_tone:"],category:"people"},":man_mage_tone3:":{uc_base:"1f9d9-1f3fd-2642",uc_output:"1f9d9-1f3fd-200d-2642-fe0f",uc_match:"1f9d9-1f3fd-2642-fe0f",uc_greedy:"1f9d9-1f3fd-2642",shortnames:[":man_mage_medium_skin_tone:"],category:"people"},":man_mage_tone4:":{uc_base:"1f9d9-1f3fe-2642",uc_output:"1f9d9-1f3fe-200d-2642-fe0f",uc_match:"1f9d9-1f3fe-2642-fe0f",uc_greedy:"1f9d9-1f3fe-2642",shortnames:[":man_mage_medium_dark_skin_tone:"],category:"people"},":man_mage_tone5:":{uc_base:"1f9d9-1f3ff-2642",uc_output:"1f9d9-1f3ff-200d-2642-fe0f",uc_match:"1f9d9-1f3ff-2642-fe0f",uc_greedy:"1f9d9-1f3ff-2642",shortnames:[":man_mage_dark_skin_tone:"],category:"people"},":man_mountain_biking_tone1:":{uc_base:"1f6b5-1f3fb-2642",uc_output:"1f6b5-1f3fb-200d-2642-fe0f",uc_match:"1f6b5-1f3fb-2642-fe0f",uc_greedy:"1f6b5-1f3fb-2642",shortnames:[":man_mountain_biking_light_skin_tone:"],category:"activity"},":man_mountain_biking_tone2:":{uc_base:"1f6b5-1f3fc-2642",uc_output:"1f6b5-1f3fc-200d-2642-fe0f",uc_match:"1f6b5-1f3fc-2642-fe0f",uc_greedy:"1f6b5-1f3fc-2642",shortnames:[":man_mountain_biking_medium_light_skin_tone:"],category:"activity"},":man_mountain_biking_tone3:":{uc_base:"1f6b5-1f3fd-2642",uc_output:"1f6b5-1f3fd-200d-2642-fe0f",uc_match:"1f6b5-1f3fd-2642-fe0f",uc_greedy:"1f6b5-1f3fd-2642",shortnames:[":man_mountain_biking_medium_skin_tone:"],category:"activity"},":man_mountain_biking_tone4:":{uc_base:"1f6b5-1f3fe-2642",uc_output:"1f6b5-1f3fe-200d-2642-fe0f",uc_match:"1f6b5-1f3fe-2642-fe0f",uc_greedy:"1f6b5-1f3fe-2642",shortnames:[":man_mountain_biking_medium_dark_skin_tone:"],category:"activity"},":man_mountain_biking_tone5:":{uc_base:"1f6b5-1f3ff-2642",uc_output:"1f6b5-1f3ff-200d-2642-fe0f",uc_match:"1f6b5-1f3ff-2642-fe0f",uc_greedy:"1f6b5-1f3ff-2642",shortnames:[":man_mountain_biking_dark_skin_tone:"],category:"activity"},":man_pilot_tone1:":{uc_base:"1f468-1f3fb-2708",uc_output:"1f468-1f3fb-200d-2708-fe0f",uc_match:"1f468-1f3fb-2708-fe0f",uc_greedy:"1f468-1f3fb-2708",shortnames:[":man_pilot_light_skin_tone:"],category:"people"},":man_pilot_tone2:":{uc_base:"1f468-1f3fc-2708",uc_output:"1f468-1f3fc-200d-2708-fe0f",uc_match:"1f468-1f3fc-2708-fe0f",uc_greedy:"1f468-1f3fc-2708",shortnames:[":man_pilot_medium_light_skin_tone:"],category:"people"},":man_pilot_tone3:":{uc_base:"1f468-1f3fd-2708",uc_output:"1f468-1f3fd-200d-2708-fe0f",uc_match:"1f468-1f3fd-2708-fe0f",uc_greedy:"1f468-1f3fd-2708",shortnames:[":man_pilot_medium_skin_tone:"],category:"people"},":man_pilot_tone4:":{uc_base:"1f468-1f3fe-2708",uc_output:"1f468-1f3fe-200d-2708-fe0f",uc_match:"1f468-1f3fe-2708-fe0f",uc_greedy:"1f468-1f3fe-2708",shortnames:[":man_pilot_medium_dark_skin_tone:"],category:"people"},":man_pilot_tone5:":{uc_base:"1f468-1f3ff-2708",uc_output:"1f468-1f3ff-200d-2708-fe0f",uc_match:"1f468-1f3ff-2708-fe0f",uc_greedy:"1f468-1f3ff-2708",shortnames:[":man_pilot_dark_skin_tone:"],category:"people"},":man_playing_handball_tone1:":{uc_base:"1f93e-1f3fb-2642",uc_output:"1f93e-1f3fb-200d-2642-fe0f",uc_match:"1f93e-1f3fb-2642-fe0f",uc_greedy:"1f93e-1f3fb-2642",shortnames:[":man_playing_handball_light_skin_tone:"],category:"activity"},":man_playing_handball_tone2:":{uc_base:"1f93e-1f3fc-2642",uc_output:"1f93e-1f3fc-200d-2642-fe0f",uc_match:"1f93e-1f3fc-2642-fe0f",uc_greedy:"1f93e-1f3fc-2642",shortnames:[":man_playing_handball_medium_light_skin_tone:"],category:"activity"},":man_playing_handball_tone3:":{uc_base:"1f93e-1f3fd-2642",uc_output:"1f93e-1f3fd-200d-2642-fe0f",uc_match:"1f93e-1f3fd-2642-fe0f",uc_greedy:"1f93e-1f3fd-2642",shortnames:[":man_playing_handball_medium_skin_tone:"],category:"activity"},":man_playing_handball_tone4:":{uc_base:"1f93e-1f3fe-2642",uc_output:"1f93e-1f3fe-200d-2642-fe0f",uc_match:"1f93e-1f3fe-2642-fe0f",uc_greedy:"1f93e-1f3fe-2642",shortnames:[":man_playing_handball_medium_dark_skin_tone:"],category:"activity"},":man_playing_handball_tone5:":{uc_base:"1f93e-1f3ff-2642",uc_output:"1f93e-1f3ff-200d-2642-fe0f",uc_match:"1f93e-1f3ff-2642-fe0f",uc_greedy:"1f93e-1f3ff-2642",shortnames:[":man_playing_handball_dark_skin_tone:"],category:"activity"},":man_playing_water_polo_tone1:":{uc_base:"1f93d-1f3fb-2642",uc_output:"1f93d-1f3fb-200d-2642-fe0f",uc_match:"1f93d-1f3fb-2642-fe0f",uc_greedy:"1f93d-1f3fb-2642",shortnames:[":man_playing_water_polo_light_skin_tone:"],category:"activity"},":man_playing_water_polo_tone2:":{uc_base:"1f93d-1f3fc-2642",uc_output:"1f93d-1f3fc-200d-2642-fe0f",uc_match:"1f93d-1f3fc-2642-fe0f",uc_greedy:"1f93d-1f3fc-2642",shortnames:[":man_playing_water_polo_medium_light_skin_tone:"],category:"activity"},":man_playing_water_polo_tone3:":{uc_base:"1f93d-1f3fd-2642",uc_output:"1f93d-1f3fd-200d-2642-fe0f",uc_match:"1f93d-1f3fd-2642-fe0f",uc_greedy:"1f93d-1f3fd-2642",shortnames:[":man_playing_water_polo_medium_skin_tone:"],category:"activity"},":man_playing_water_polo_tone4:":{uc_base:"1f93d-1f3fe-2642",uc_output:"1f93d-1f3fe-200d-2642-fe0f",uc_match:"1f93d-1f3fe-2642-fe0f",uc_greedy:"1f93d-1f3fe-2642",shortnames:[":man_playing_water_polo_medium_dark_skin_tone:"],category:"activity"},":man_playing_water_polo_tone5:":{uc_base:"1f93d-1f3ff-2642",uc_output:"1f93d-1f3ff-200d-2642-fe0f",uc_match:"1f93d-1f3ff-2642-fe0f",uc_greedy:"1f93d-1f3ff-2642",shortnames:[":man_playing_water_polo_dark_skin_tone:"],category:"activity"},":man_police_officer_tone1:":{uc_base:"1f46e-1f3fb-2642",uc_output:"1f46e-1f3fb-200d-2642-fe0f",uc_match:"1f46e-1f3fb-2642-fe0f",uc_greedy:"1f46e-1f3fb-2642",shortnames:[":man_police_officer_light_skin_tone:"],category:"people"},":man_police_officer_tone2:":{uc_base:"1f46e-1f3fc-2642",uc_output:"1f46e-1f3fc-200d-2642-fe0f",uc_match:"1f46e-1f3fc-2642-fe0f",uc_greedy:"1f46e-1f3fc-2642",shortnames:[":man_police_officer_medium_light_skin_tone:"],category:"people"},":man_police_officer_tone3:":{uc_base:"1f46e-1f3fd-2642",uc_output:"1f46e-1f3fd-200d-2642-fe0f",uc_match:"1f46e-1f3fd-2642-fe0f",uc_greedy:"1f46e-1f3fd-2642",shortnames:[":man_police_officer_medium_skin_tone:"],category:"people"},":man_police_officer_tone4:":{uc_base:"1f46e-1f3fe-2642",uc_output:"1f46e-1f3fe-200d-2642-fe0f",uc_match:"1f46e-1f3fe-2642-fe0f",uc_greedy:"1f46e-1f3fe-2642",shortnames:[":man_police_officer_medium_dark_skin_tone:"],category:"people"},":man_police_officer_tone5:":{uc_base:"1f46e-1f3ff-2642",uc_output:"1f46e-1f3ff-200d-2642-fe0f",uc_match:"1f46e-1f3ff-2642-fe0f",uc_greedy:"1f46e-1f3ff-2642",shortnames:[":man_police_officer_dark_skin_tone:"],category:"people"},":man_pouting_tone1:":{uc_base:"1f64e-1f3fb-2642",uc_output:"1f64e-1f3fb-200d-2642-fe0f",uc_match:"1f64e-1f3fb-2642-fe0f",uc_greedy:"1f64e-1f3fb-2642",shortnames:[":man_pouting_light_skin_tone:"],category:"people"},":man_pouting_tone2:":{uc_base:"1f64e-1f3fc-2642",uc_output:"1f64e-1f3fc-200d-2642-fe0f",uc_match:"1f64e-1f3fc-2642-fe0f",uc_greedy:"1f64e-1f3fc-2642",shortnames:[":man_pouting_medium_light_skin_tone:"],category:"people"},":man_pouting_tone3:":{uc_base:"1f64e-1f3fd-2642",uc_output:"1f64e-1f3fd-200d-2642-fe0f",uc_match:"1f64e-1f3fd-2642-fe0f",uc_greedy:"1f64e-1f3fd-2642",shortnames:[":man_pouting_medium_skin_tone:"],category:"people"},":man_pouting_tone4:":{uc_base:"1f64e-1f3fe-2642",uc_output:"1f64e-1f3fe-200d-2642-fe0f",uc_match:"1f64e-1f3fe-2642-fe0f",uc_greedy:"1f64e-1f3fe-2642",shortnames:[":man_pouting_medium_dark_skin_tone:"],category:"people"},":man_pouting_tone5:":{uc_base:"1f64e-1f3ff-2642",uc_output:"1f64e-1f3ff-200d-2642-fe0f",uc_match:"1f64e-1f3ff-2642-fe0f",uc_greedy:"1f64e-1f3ff-2642",shortnames:[":man_pouting_dark_skin_tone:"],category:"people"},":man_raising_hand_tone1:":{uc_base:"1f64b-1f3fb-2642",uc_output:"1f64b-1f3fb-200d-2642-fe0f",uc_match:"1f64b-1f3fb-2642-fe0f",uc_greedy:"1f64b-1f3fb-2642",shortnames:[":man_raising_hand_light_skin_tone:"],category:"people"},":man_raising_hand_tone2:":{uc_base:"1f64b-1f3fc-2642",uc_output:"1f64b-1f3fc-200d-2642-fe0f",uc_match:"1f64b-1f3fc-2642-fe0f",uc_greedy:"1f64b-1f3fc-2642",shortnames:[":man_raising_hand_medium_light_skin_tone:"],category:"people"},":man_raising_hand_tone3:":{uc_base:"1f64b-1f3fd-2642",uc_output:"1f64b-1f3fd-200d-2642-fe0f",uc_match:"1f64b-1f3fd-2642-fe0f",uc_greedy:"1f64b-1f3fd-2642",shortnames:[":man_raising_hand_medium_skin_tone:"],category:"people"},":man_raising_hand_tone4:":{uc_base:"1f64b-1f3fe-2642",uc_output:"1f64b-1f3fe-200d-2642-fe0f",uc_match:"1f64b-1f3fe-2642-fe0f",uc_greedy:"1f64b-1f3fe-2642",shortnames:[":man_raising_hand_medium_dark_skin_tone:"],category:"people"},":man_raising_hand_tone5:":{uc_base:"1f64b-1f3ff-2642",uc_output:"1f64b-1f3ff-200d-2642-fe0f",uc_match:"1f64b-1f3ff-2642-fe0f",uc_greedy:"1f64b-1f3ff-2642",shortnames:[":man_raising_hand_dark_skin_tone:"],category:"people"},":man_rowing_boat_tone1:":{uc_base:"1f6a3-1f3fb-2642",uc_output:"1f6a3-1f3fb-200d-2642-fe0f",uc_match:"1f6a3-1f3fb-2642-fe0f",uc_greedy:"1f6a3-1f3fb-2642",shortnames:[":man_rowing_boat_light_skin_tone:"],category:"activity"},":man_rowing_boat_tone2:":{uc_base:"1f6a3-1f3fc-2642",uc_output:"1f6a3-1f3fc-200d-2642-fe0f",uc_match:"1f6a3-1f3fc-2642-fe0f",uc_greedy:"1f6a3-1f3fc-2642",shortnames:[":man_rowing_boat_medium_light_skin_tone:"],category:"activity"},":man_rowing_boat_tone3:":{uc_base:"1f6a3-1f3fd-2642",uc_output:"1f6a3-1f3fd-200d-2642-fe0f",uc_match:"1f6a3-1f3fd-2642-fe0f",uc_greedy:"1f6a3-1f3fd-2642",shortnames:[":man_rowing_boat_medium_skin_tone:"],category:"activity"},":man_rowing_boat_tone4:":{uc_base:"1f6a3-1f3fe-2642",uc_output:"1f6a3-1f3fe-200d-2642-fe0f",uc_match:"1f6a3-1f3fe-2642-fe0f",uc_greedy:"1f6a3-1f3fe-2642",shortnames:[":man_rowing_boat_medium_dark_skin_tone:"],category:"activity"},":man_rowing_boat_tone5:":{uc_base:"1f6a3-1f3ff-2642",uc_output:"1f6a3-1f3ff-200d-2642-fe0f",uc_match:"1f6a3-1f3ff-2642-fe0f",uc_greedy:"1f6a3-1f3ff-2642",shortnames:[":man_rowing_boat_dark_skin_tone:"],category:"activity"},":man_running_tone1:":{uc_base:"1f3c3-1f3fb-2642",uc_output:"1f3c3-1f3fb-200d-2642-fe0f",uc_match:"1f3c3-1f3fb-2642-fe0f",uc_greedy:"1f3c3-1f3fb-2642",shortnames:[":man_running_light_skin_tone:"],category:"people"},":man_running_tone2:":{uc_base:"1f3c3-1f3fc-2642",uc_output:"1f3c3-1f3fc-200d-2642-fe0f",uc_match:"1f3c3-1f3fc-2642-fe0f",uc_greedy:"1f3c3-1f3fc-2642",shortnames:[":man_running_medium_light_skin_tone:"],category:"people"},":man_running_tone3:":{uc_base:"1f3c3-1f3fd-2642",uc_output:"1f3c3-1f3fd-200d-2642-fe0f",uc_match:"1f3c3-1f3fd-2642-fe0f",uc_greedy:"1f3c3-1f3fd-2642",shortnames:[":man_running_medium_skin_tone:"],category:"people"},":man_running_tone4:":{uc_base:"1f3c3-1f3fe-2642",uc_output:"1f3c3-1f3fe-200d-2642-fe0f",uc_match:"1f3c3-1f3fe-2642-fe0f",uc_greedy:"1f3c3-1f3fe-2642",shortnames:[":man_running_medium_dark_skin_tone:"],category:"people"},":man_running_tone5:":{uc_base:"1f3c3-1f3ff-2642",uc_output:"1f3c3-1f3ff-200d-2642-fe0f",uc_match:"1f3c3-1f3ff-2642-fe0f",uc_greedy:"1f3c3-1f3ff-2642",shortnames:[":man_running_dark_skin_tone:"],category:"people"},":man_shrugging_tone1:":{uc_base:"1f937-1f3fb-2642",uc_output:"1f937-1f3fb-200d-2642-fe0f",uc_match:"1f937-1f3fb-2642-fe0f",uc_greedy:"1f937-1f3fb-2642",shortnames:[":man_shrugging_light_skin_tone:"],category:"people"},":man_shrugging_tone2:":{uc_base:"1f937-1f3fc-2642",uc_output:"1f937-1f3fc-200d-2642-fe0f",uc_match:"1f937-1f3fc-2642-fe0f",uc_greedy:"1f937-1f3fc-2642",shortnames:[":man_shrugging_medium_light_skin_tone:"],category:"people"},":man_shrugging_tone3:":{uc_base:"1f937-1f3fd-2642",uc_output:"1f937-1f3fd-200d-2642-fe0f",uc_match:"1f937-1f3fd-2642-fe0f",uc_greedy:"1f937-1f3fd-2642",shortnames:[":man_shrugging_medium_skin_tone:"],category:"people"},":man_shrugging_tone4:":{uc_base:"1f937-1f3fe-2642",uc_output:"1f937-1f3fe-200d-2642-fe0f",uc_match:"1f937-1f3fe-2642-fe0f",uc_greedy:"1f937-1f3fe-2642",shortnames:[":man_shrugging_medium_dark_skin_tone:"],category:"people"},":man_shrugging_tone5:":{uc_base:"1f937-1f3ff-2642",uc_output:"1f937-1f3ff-200d-2642-fe0f",uc_match:"1f937-1f3ff-2642-fe0f",uc_greedy:"1f937-1f3ff-2642",shortnames:[":man_shrugging_dark_skin_tone:"],category:"people"},":man_superhero_tone1:":{uc_base:"1f9b8-1f3fb-2642",uc_output:"1f9b8-1f3fb-200d-2642-fe0f",uc_match:"1f9b8-1f3fb-2642-fe0f",uc_greedy:"1f9b8-1f3fb-2642",shortnames:[":man_superhero_light_skin_tone:"],category:"people"},":man_superhero_tone2:":{uc_base:"1f9b8-1f3fc-2642",uc_output:"1f9b8-1f3fc-200d-2642-fe0f",uc_match:"1f9b8-1f3fc-2642-fe0f",uc_greedy:"1f9b8-1f3fc-2642",shortnames:[":man_superhero_medium_light_skin_tone:"],category:"people"},":man_superhero_tone3:":{uc_base:"1f9b8-1f3fd-2642",uc_output:"1f9b8-1f3fd-200d-2642-fe0f",uc_match:"1f9b8-1f3fd-2642-fe0f",uc_greedy:"1f9b8-1f3fd-2642",shortnames:[":man_superhero_medium_skin_tone:"],category:"people"},":man_superhero_tone4:":{uc_base:"1f9b8-1f3fe-2642",uc_output:"1f9b8-1f3fe-200d-2642-fe0f",uc_match:"1f9b8-1f3fe-2642-fe0f",uc_greedy:"1f9b8-1f3fe-2642",shortnames:[":man_superhero_medium_dark_skin_tone:"],category:"people"},":man_superhero_tone5:":{uc_base:"1f9b8-1f3ff-2642",uc_output:"1f9b8-1f3ff-200d-2642-fe0f",uc_match:"1f9b8-1f3ff-2642-fe0f",uc_greedy:"1f9b8-1f3ff-2642",shortnames:[":man_superhero_dark_skin_tone:"],category:"people"},":man_supervillain_tone1:":{uc_base:"1f9b9-1f3fb-2642",uc_output:"1f9b9-1f3fb-200d-2642-fe0f",uc_match:"1f9b9-1f3fb-2642-fe0f",uc_greedy:"1f9b9-1f3fb-2642",shortnames:[":man_supervillain_light_skin_tone:"],category:"people"},":man_supervillain_tone2:":{uc_base:"1f9b9-1f3fc-2642",uc_output:"1f9b9-1f3fc-200d-2642-fe0f",uc_match:"1f9b9-1f3fc-2642-fe0f",uc_greedy:"1f9b9-1f3fc-2642",shortnames:[":man_supervillain_medium_light_skin_tone:"],category:"people"},":man_supervillain_tone3:":{uc_base:"1f9b9-1f3fd-2642",uc_output:"1f9b9-1f3fd-200d-2642-fe0f",uc_match:"1f9b9-1f3fd-2642-fe0f",uc_greedy:"1f9b9-1f3fd-2642",shortnames:[":man_supervillain_medium_skin_tone:"],category:"people"},":man_supervillain_tone4:":{uc_base:"1f9b9-1f3fe-2642",uc_output:"1f9b9-1f3fe-200d-2642-fe0f",uc_match:"1f9b9-1f3fe-2642-fe0f",uc_greedy:"1f9b9-1f3fe-2642",shortnames:[":man_supervillain_medium_dark_skin_tone:"],category:"people"},":man_supervillain_tone5:":{uc_base:"1f9b9-1f3ff-2642",uc_output:"1f9b9-1f3ff-200d-2642-fe0f",uc_match:"1f9b9-1f3ff-2642-fe0f",uc_greedy:"1f9b9-1f3ff-2642",shortnames:[":man_supervillain_dark_skin_tone:"],category:"people"},":man_surfing_tone1:":{uc_base:"1f3c4-1f3fb-2642",uc_output:"1f3c4-1f3fb-200d-2642-fe0f",uc_match:"1f3c4-1f3fb-2642-fe0f",uc_greedy:"1f3c4-1f3fb-2642",shortnames:[":man_surfing_light_skin_tone:"],category:"activity"},":man_surfing_tone2:":{uc_base:"1f3c4-1f3fc-2642",uc_output:"1f3c4-1f3fc-200d-2642-fe0f",uc_match:"1f3c4-1f3fc-2642-fe0f",uc_greedy:"1f3c4-1f3fc-2642",shortnames:[":man_surfing_medium_light_skin_tone:"],category:"activity"},":man_surfing_tone3:":{uc_base:"1f3c4-1f3fd-2642",uc_output:"1f3c4-1f3fd-200d-2642-fe0f",uc_match:"1f3c4-1f3fd-2642-fe0f",uc_greedy:"1f3c4-1f3fd-2642",shortnames:[":man_surfing_medium_skin_tone:"],category:"activity"},":man_surfing_tone4:":{uc_base:"1f3c4-1f3fe-2642",uc_output:"1f3c4-1f3fe-200d-2642-fe0f",uc_match:"1f3c4-1f3fe-2642-fe0f",uc_greedy:"1f3c4-1f3fe-2642",shortnames:[":man_surfing_medium_dark_skin_tone:"],category:"activity"},":man_surfing_tone5:":{uc_base:"1f3c4-1f3ff-2642",uc_output:"1f3c4-1f3ff-200d-2642-fe0f",uc_match:"1f3c4-1f3ff-2642-fe0f",uc_greedy:"1f3c4-1f3ff-2642",shortnames:[":man_surfing_dark_skin_tone:"],category:"activity"},":man_swimming_tone1:":{uc_base:"1f3ca-1f3fb-2642",uc_output:"1f3ca-1f3fb-200d-2642-fe0f",uc_match:"1f3ca-1f3fb-2642-fe0f",uc_greedy:"1f3ca-1f3fb-2642",shortnames:[":man_swimming_light_skin_tone:"],category:"activity"},":man_swimming_tone2:":{uc_base:"1f3ca-1f3fc-2642",uc_output:"1f3ca-1f3fc-200d-2642-fe0f",uc_match:"1f3ca-1f3fc-2642-fe0f",uc_greedy:"1f3ca-1f3fc-2642",shortnames:[":man_swimming_medium_light_skin_tone:"],category:"activity"},":man_swimming_tone3:":{uc_base:"1f3ca-1f3fd-2642",uc_output:"1f3ca-1f3fd-200d-2642-fe0f",uc_match:"1f3ca-1f3fd-2642-fe0f",uc_greedy:"1f3ca-1f3fd-2642",shortnames:[":man_swimming_medium_skin_tone:"],category:"activity"},":man_swimming_tone4:":{uc_base:"1f3ca-1f3fe-2642",uc_output:"1f3ca-1f3fe-200d-2642-fe0f",uc_match:"1f3ca-1f3fe-2642-fe0f",uc_greedy:"1f3ca-1f3fe-2642",shortnames:[":man_swimming_medium_dark_skin_tone:"],category:"activity"},":man_swimming_tone5:":{uc_base:"1f3ca-1f3ff-2642",uc_output:"1f3ca-1f3ff-200d-2642-fe0f",uc_match:"1f3ca-1f3ff-2642-fe0f",uc_greedy:"1f3ca-1f3ff-2642",shortnames:[":man_swimming_dark_skin_tone:"],category:"activity"},":man_tipping_hand_tone1:":{uc_base:"1f481-1f3fb-2642",uc_output:"1f481-1f3fb-200d-2642-fe0f",uc_match:"1f481-1f3fb-2642-fe0f",uc_greedy:"1f481-1f3fb-2642",shortnames:[":man_tipping_hand_light_skin_tone:"],category:"people"},":man_tipping_hand_tone2:":{uc_base:"1f481-1f3fc-2642",uc_output:"1f481-1f3fc-200d-2642-fe0f",uc_match:"1f481-1f3fc-2642-fe0f",uc_greedy:"1f481-1f3fc-2642",shortnames:[":man_tipping_hand_medium_light_skin_tone:"],category:"people"},":man_tipping_hand_tone3:":{uc_base:"1f481-1f3fd-2642",uc_output:"1f481-1f3fd-200d-2642-fe0f",uc_match:"1f481-1f3fd-2642-fe0f",uc_greedy:"1f481-1f3fd-2642",shortnames:[":man_tipping_hand_medium_skin_tone:"],category:"people"},":man_tipping_hand_tone4:":{uc_base:"1f481-1f3fe-2642",uc_output:"1f481-1f3fe-200d-2642-fe0f",uc_match:"1f481-1f3fe-2642-fe0f",uc_greedy:"1f481-1f3fe-2642",shortnames:[":man_tipping_hand_medium_dark_skin_tone:"],category:"people"},":man_tipping_hand_tone5:":{uc_base:"1f481-1f3ff-2642",uc_output:"1f481-1f3ff-200d-2642-fe0f",uc_match:"1f481-1f3ff-2642-fe0f",uc_greedy:"1f481-1f3ff-2642",shortnames:[":man_tipping_hand_dark_skin_tone:"],category:"people"},":man_vampire_tone1:":{uc_base:"1f9db-1f3fb-2642",uc_output:"1f9db-1f3fb-200d-2642-fe0f",uc_match:"1f9db-1f3fb-2642-fe0f",uc_greedy:"1f9db-1f3fb-2642",shortnames:[":man_vampire_light_skin_tone:"],category:"people"},":man_vampire_tone2:":{uc_base:"1f9db-1f3fc-2642",uc_output:"1f9db-1f3fc-200d-2642-fe0f",uc_match:"1f9db-1f3fc-2642-fe0f",uc_greedy:"1f9db-1f3fc-2642",shortnames:[":man_vampire_medium_light_skin_tone:"],category:"people"},":man_vampire_tone3:":{uc_base:"1f9db-1f3fd-2642",uc_output:"1f9db-1f3fd-200d-2642-fe0f",uc_match:"1f9db-1f3fd-2642-fe0f",uc_greedy:"1f9db-1f3fd-2642",shortnames:[":man_vampire_medium_skin_tone:"],category:"people"},":man_vampire_tone4:":{uc_base:"1f9db-1f3fe-2642",uc_output:"1f9db-1f3fe-200d-2642-fe0f",uc_match:"1f9db-1f3fe-2642-fe0f",uc_greedy:"1f9db-1f3fe-2642",shortnames:[":man_vampire_medium_dark_skin_tone:"],category:"people"},":man_vampire_tone5:":{uc_base:"1f9db-1f3ff-2642",uc_output:"1f9db-1f3ff-200d-2642-fe0f",uc_match:"1f9db-1f3ff-2642-fe0f",uc_greedy:"1f9db-1f3ff-2642",shortnames:[":man_vampire_dark_skin_tone:"],category:"people"},":man_walking_tone1:":{uc_base:"1f6b6-1f3fb-2642",uc_output:"1f6b6-1f3fb-200d-2642-fe0f",uc_match:"1f6b6-1f3fb-2642-fe0f",uc_greedy:"1f6b6-1f3fb-2642",shortnames:[":man_walking_light_skin_tone:"],category:"people"},":man_walking_tone2:":{uc_base:"1f6b6-1f3fc-2642",uc_output:"1f6b6-1f3fc-200d-2642-fe0f",uc_match:"1f6b6-1f3fc-2642-fe0f",uc_greedy:"1f6b6-1f3fc-2642",shortnames:[":man_walking_medium_light_skin_tone:"],category:"people"},":man_walking_tone3:":{uc_base:"1f6b6-1f3fd-2642",uc_output:"1f6b6-1f3fd-200d-2642-fe0f",uc_match:"1f6b6-1f3fd-2642-fe0f",uc_greedy:"1f6b6-1f3fd-2642",shortnames:[":man_walking_medium_skin_tone:"],category:"people"},":man_walking_tone4:":{uc_base:"1f6b6-1f3fe-2642",uc_output:"1f6b6-1f3fe-200d-2642-fe0f",uc_match:"1f6b6-1f3fe-2642-fe0f",uc_greedy:"1f6b6-1f3fe-2642",shortnames:[":man_walking_medium_dark_skin_tone:"],category:"people"},":man_walking_tone5:":{uc_base:"1f6b6-1f3ff-2642",uc_output:"1f6b6-1f3ff-200d-2642-fe0f",uc_match:"1f6b6-1f3ff-2642-fe0f",uc_greedy:"1f6b6-1f3ff-2642",shortnames:[":man_walking_dark_skin_tone:"],category:"people"},":man_wearing_turban_tone1:":{uc_base:"1f473-1f3fb-2642",uc_output:"1f473-1f3fb-200d-2642-fe0f",uc_match:"1f473-1f3fb-2642-fe0f",uc_greedy:"1f473-1f3fb-2642",shortnames:[":man_wearing_turban_light_skin_tone:"],category:"people"},":man_wearing_turban_tone2:":{uc_base:"1f473-1f3fc-2642",uc_output:"1f473-1f3fc-200d-2642-fe0f",uc_match:"1f473-1f3fc-2642-fe0f",uc_greedy:"1f473-1f3fc-2642",shortnames:[":man_wearing_turban_medium_light_skin_tone:"],category:"people"},":man_wearing_turban_tone3:":{uc_base:"1f473-1f3fd-2642",uc_output:"1f473-1f3fd-200d-2642-fe0f",uc_match:"1f473-1f3fd-2642-fe0f",uc_greedy:"1f473-1f3fd-2642",shortnames:[":man_wearing_turban_medium_skin_tone:"],category:"people"},":man_wearing_turban_tone4:":{uc_base:"1f473-1f3fe-2642",uc_output:"1f473-1f3fe-200d-2642-fe0f",uc_match:"1f473-1f3fe-2642-fe0f",uc_greedy:"1f473-1f3fe-2642",shortnames:[":man_wearing_turban_medium_dark_skin_tone:"],category:"people"},":man_wearing_turban_tone5:":{uc_base:"1f473-1f3ff-2642",uc_output:"1f473-1f3ff-200d-2642-fe0f",uc_match:"1f473-1f3ff-2642-fe0f",uc_greedy:"1f473-1f3ff-2642",shortnames:[":man_wearing_turban_dark_skin_tone:"],category:"people"},":mermaid_tone1:":{uc_base:"1f9dc-1f3fb-2640",uc_output:"1f9dc-1f3fb-200d-2640-fe0f",uc_match:"1f9dc-1f3fb-2640-fe0f",uc_greedy:"1f9dc-1f3fb-2640",shortnames:[":mermaid_light_skin_tone:"],category:"people"},":mermaid_tone2:":{uc_base:"1f9dc-1f3fc-2640",uc_output:"1f9dc-1f3fc-200d-2640-fe0f",uc_match:"1f9dc-1f3fc-2640-fe0f",uc_greedy:"1f9dc-1f3fc-2640",shortnames:[":mermaid_medium_light_skin_tone:"],category:"people"},":mermaid_tone3:":{uc_base:"1f9dc-1f3fd-2640",uc_output:"1f9dc-1f3fd-200d-2640-fe0f",uc_match:"1f9dc-1f3fd-2640-fe0f",uc_greedy:"1f9dc-1f3fd-2640",shortnames:[":mermaid_medium_skin_tone:"],category:"people"},":mermaid_tone4:":{uc_base:"1f9dc-1f3fe-2640",uc_output:"1f9dc-1f3fe-200d-2640-fe0f",uc_match:"1f9dc-1f3fe-2640-fe0f",uc_greedy:"1f9dc-1f3fe-2640",shortnames:[":mermaid_medium_dark_skin_tone:"],category:"people"},":mermaid_tone5:":{uc_base:"1f9dc-1f3ff-2640",uc_output:"1f9dc-1f3ff-200d-2640-fe0f",uc_match:"1f9dc-1f3ff-2640-fe0f",uc_greedy:"1f9dc-1f3ff-2640",shortnames:[":mermaid_dark_skin_tone:"],category:"people"},":merman_tone1:":{uc_base:"1f9dc-1f3fb-2642",uc_output:"1f9dc-1f3fb-200d-2642-fe0f",uc_match:"1f9dc-1f3fb-2642-fe0f",uc_greedy:"1f9dc-1f3fb-2642",shortnames:[":merman_light_skin_tone:"],category:"people"},":merman_tone2:":{uc_base:"1f9dc-1f3fc-2642",uc_output:"1f9dc-1f3fc-200d-2642-fe0f",uc_match:"1f9dc-1f3fc-2642-fe0f",uc_greedy:"1f9dc-1f3fc-2642",shortnames:[":merman_medium_light_skin_tone:"],category:"people"},":merman_tone3:":{uc_base:"1f9dc-1f3fd-2642",uc_output:"1f9dc-1f3fd-200d-2642-fe0f",uc_match:"1f9dc-1f3fd-2642-fe0f",uc_greedy:"1f9dc-1f3fd-2642",shortnames:[":merman_medium_skin_tone:"],category:"people"},":merman_tone4:":{uc_base:"1f9dc-1f3fe-2642",uc_output:"1f9dc-1f3fe-200d-2642-fe0f",uc_match:"1f9dc-1f3fe-2642-fe0f",uc_greedy:"1f9dc-1f3fe-2642",shortnames:[":merman_medium_dark_skin_tone:"],category:"people"},":merman_tone5:":{uc_base:"1f9dc-1f3ff-2642",uc_output:"1f9dc-1f3ff-200d-2642-fe0f",uc_match:"1f9dc-1f3ff-2642-fe0f",uc_greedy:"1f9dc-1f3ff-2642",shortnames:[":merman_dark_skin_tone:"],category:"people"},":woman_biking_tone1:":{uc_base:"1f6b4-1f3fb-2640",uc_output:"1f6b4-1f3fb-200d-2640-fe0f",uc_match:"1f6b4-1f3fb-2640-fe0f",uc_greedy:"1f6b4-1f3fb-2640",shortnames:[":woman_biking_light_skin_tone:"],category:"activity"},":woman_biking_tone2:":{uc_base:"1f6b4-1f3fc-2640",uc_output:"1f6b4-1f3fc-200d-2640-fe0f",uc_match:"1f6b4-1f3fc-2640-fe0f",uc_greedy:"1f6b4-1f3fc-2640",shortnames:[":woman_biking_medium_light_skin_tone:"],category:"activity"},":woman_biking_tone3:":{uc_base:"1f6b4-1f3fd-2640",uc_output:"1f6b4-1f3fd-200d-2640-fe0f",uc_match:"1f6b4-1f3fd-2640-fe0f",uc_greedy:"1f6b4-1f3fd-2640",shortnames:[":woman_biking_medium_skin_tone:"],category:"activity"},":woman_biking_tone4:":{uc_base:"1f6b4-1f3fe-2640",uc_output:"1f6b4-1f3fe-200d-2640-fe0f",uc_match:"1f6b4-1f3fe-2640-fe0f",uc_greedy:"1f6b4-1f3fe-2640",shortnames:[":woman_biking_medium_dark_skin_tone:"],category:"activity"},":woman_biking_tone5:":{uc_base:"1f6b4-1f3ff-2640",uc_output:"1f6b4-1f3ff-200d-2640-fe0f",uc_match:"1f6b4-1f3ff-2640-fe0f",uc_greedy:"1f6b4-1f3ff-2640",shortnames:[":woman_biking_dark_skin_tone:"],category:"activity"},":woman_bowing_tone1:":{uc_base:"1f647-1f3fb-2640",uc_output:"1f647-1f3fb-200d-2640-fe0f",uc_match:"1f647-1f3fb-2640-fe0f",uc_greedy:"1f647-1f3fb-2640",shortnames:[":woman_bowing_light_skin_tone:"],category:"people"},":woman_bowing_tone2:":{uc_base:"1f647-1f3fc-2640",uc_output:"1f647-1f3fc-200d-2640-fe0f",uc_match:"1f647-1f3fc-2640-fe0f",uc_greedy:"1f647-1f3fc-2640",shortnames:[":woman_bowing_medium_light_skin_tone:"],category:"people"},":woman_bowing_tone3:":{uc_base:"1f647-1f3fd-2640",uc_output:"1f647-1f3fd-200d-2640-fe0f",uc_match:"1f647-1f3fd-2640-fe0f",uc_greedy:"1f647-1f3fd-2640",shortnames:[":woman_bowing_medium_skin_tone:"],category:"people"},":woman_bowing_tone4:":{uc_base:"1f647-1f3fe-2640",uc_output:"1f647-1f3fe-200d-2640-fe0f",uc_match:"1f647-1f3fe-2640-fe0f",uc_greedy:"1f647-1f3fe-2640",shortnames:[":woman_bowing_medium_dark_skin_tone:"],category:"people"},":woman_bowing_tone5:":{uc_base:"1f647-1f3ff-2640",uc_output:"1f647-1f3ff-200d-2640-fe0f",uc_match:"1f647-1f3ff-2640-fe0f",uc_greedy:"1f647-1f3ff-2640",shortnames:[":woman_bowing_dark_skin_tone:"],category:"people"},":woman_cartwheeling_tone1:":{uc_base:"1f938-1f3fb-2640",uc_output:"1f938-1f3fb-200d-2640-fe0f",uc_match:"1f938-1f3fb-2640-fe0f",uc_greedy:"1f938-1f3fb-2640",shortnames:[":woman_cartwheeling_light_skin_tone:"],category:"activity"},":woman_cartwheeling_tone2:":{uc_base:"1f938-1f3fc-2640",uc_output:"1f938-1f3fc-200d-2640-fe0f",uc_match:"1f938-1f3fc-2640-fe0f",uc_greedy:"1f938-1f3fc-2640",shortnames:[":woman_cartwheeling_medium_light_skin_tone:"],category:"activity"},":woman_cartwheeling_tone3:":{uc_base:"1f938-1f3fd-2640",uc_output:"1f938-1f3fd-200d-2640-fe0f",uc_match:"1f938-1f3fd-2640-fe0f",uc_greedy:"1f938-1f3fd-2640",shortnames:[":woman_cartwheeling_medium_skin_tone:"],category:"activity"},":woman_cartwheeling_tone4:":{uc_base:"1f938-1f3fe-2640",uc_output:"1f938-1f3fe-200d-2640-fe0f",uc_match:"1f938-1f3fe-2640-fe0f",uc_greedy:"1f938-1f3fe-2640",shortnames:[":woman_cartwheeling_medium_dark_skin_tone:"],category:"activity"},":woman_cartwheeling_tone5:":{uc_base:"1f938-1f3ff-2640",uc_output:"1f938-1f3ff-200d-2640-fe0f",uc_match:"1f938-1f3ff-2640-fe0f",uc_greedy:"1f938-1f3ff-2640",shortnames:[":woman_cartwheeling_dark_skin_tone:"],category:"activity"},":woman_climbing_tone1:":{uc_base:"1f9d7-1f3fb-2640",uc_output:"1f9d7-1f3fb-200d-2640-fe0f",uc_match:"1f9d7-1f3fb-2640-fe0f",uc_greedy:"1f9d7-1f3fb-2640",shortnames:[":woman_climbing_light_skin_tone:"],category:"activity"},":woman_climbing_tone2:":{uc_base:"1f9d7-1f3fc-2640",uc_output:"1f9d7-1f3fc-200d-2640-fe0f",uc_match:"1f9d7-1f3fc-2640-fe0f",uc_greedy:"1f9d7-1f3fc-2640",shortnames:[":woman_climbing_medium_light_skin_tone:"],category:"activity"},":woman_climbing_tone3:":{uc_base:"1f9d7-1f3fd-2640",uc_output:"1f9d7-1f3fd-200d-2640-fe0f",uc_match:"1f9d7-1f3fd-2640-fe0f",uc_greedy:"1f9d7-1f3fd-2640",shortnames:[":woman_climbing_medium_skin_tone:"],category:"activity"},":woman_climbing_tone4:":{uc_base:"1f9d7-1f3fe-2640",uc_output:"1f9d7-1f3fe-200d-2640-fe0f",uc_match:"1f9d7-1f3fe-2640-fe0f",uc_greedy:"1f9d7-1f3fe-2640",shortnames:[":woman_climbing_medium_dark_skin_tone:"],category:"activity"},":woman_climbing_tone5:":{uc_base:"1f9d7-1f3ff-2640",uc_output:"1f9d7-1f3ff-200d-2640-fe0f",uc_match:"1f9d7-1f3ff-2640-fe0f",uc_greedy:"1f9d7-1f3ff-2640",shortnames:[":woman_climbing_dark_skin_tone:"],category:"activity"},":woman_construction_worker_tone1:":{uc_base:"1f477-1f3fb-2640",uc_output:"1f477-1f3fb-200d-2640-fe0f",uc_match:"1f477-1f3fb-2640-fe0f",uc_greedy:"1f477-1f3fb-2640",shortnames:[":woman_construction_worker_light_skin_tone:"],category:"people"},":woman_construction_worker_tone2:":{uc_base:"1f477-1f3fc-2640",uc_output:"1f477-1f3fc-200d-2640-fe0f",uc_match:"1f477-1f3fc-2640-fe0f",uc_greedy:"1f477-1f3fc-2640",shortnames:[":woman_construction_worker_medium_light_skin_tone:"],category:"people"},":woman_construction_worker_tone3:":{uc_base:"1f477-1f3fd-2640",uc_output:"1f477-1f3fd-200d-2640-fe0f",uc_match:"1f477-1f3fd-2640-fe0f",uc_greedy:"1f477-1f3fd-2640",shortnames:[":woman_construction_worker_medium_skin_tone:"],category:"people"},":woman_construction_worker_tone4:":{uc_base:"1f477-1f3fe-2640",uc_output:"1f477-1f3fe-200d-2640-fe0f",uc_match:"1f477-1f3fe-2640-fe0f",uc_greedy:"1f477-1f3fe-2640",shortnames:[":woman_construction_worker_medium_dark_skin_tone:"],category:"people"},":woman_construction_worker_tone5:":{uc_base:"1f477-1f3ff-2640",uc_output:"1f477-1f3ff-200d-2640-fe0f",uc_match:"1f477-1f3ff-2640-fe0f",uc_greedy:"1f477-1f3ff-2640",shortnames:[":woman_construction_worker_dark_skin_tone:"],category:"people"},":woman_detective_tone1:":{uc_base:"1f575-1f3fb-2640",uc_output:"1f575-1f3fb-200d-2640-fe0f",uc_match:"1f575-fe0f-1f3fb-2640-fe0f",uc_greedy:"1f575-1f3fb-2640",shortnames:[":woman_detective_light_skin_tone:"],category:"people"},":woman_detective_tone2:":{uc_base:"1f575-1f3fc-2640",uc_output:"1f575-1f3fc-200d-2640-fe0f",uc_match:"1f575-fe0f-1f3fc-2640-fe0f",uc_greedy:"1f575-1f3fc-2640",shortnames:[":woman_detective_medium_light_skin_tone:"],category:"people"},":woman_detective_tone3:":{uc_base:"1f575-1f3fd-2640",uc_output:"1f575-1f3fd-200d-2640-fe0f",uc_match:"1f575-fe0f-1f3fd-2640-fe0f",uc_greedy:"1f575-1f3fd-2640",shortnames:[":woman_detective_medium_skin_tone:"],category:"people"},":woman_detective_tone4:":{uc_base:"1f575-1f3fe-2640",uc_output:"1f575-1f3fe-200d-2640-fe0f",uc_match:"1f575-fe0f-1f3fe-2640-fe0f",uc_greedy:"1f575-1f3fe-2640",shortnames:[":woman_detective_medium_dark_skin_tone:"],category:"people"},":woman_detective_tone5:":{uc_base:"1f575-1f3ff-2640",uc_output:"1f575-1f3ff-200d-2640-fe0f",uc_match:"1f575-fe0f-1f3ff-2640-fe0f",uc_greedy:"1f575-1f3ff-2640",shortnames:[":woman_detective_dark_skin_tone:"],category:"people"},":woman_elf_tone1:":{uc_base:"1f9dd-1f3fb-2640",uc_output:"1f9dd-1f3fb-200d-2640-fe0f",uc_match:"1f9dd-1f3fb-2640-fe0f",uc_greedy:"1f9dd-1f3fb-2640",shortnames:[":woman_elf_light_skin_tone:"],category:"people"},":woman_elf_tone2:":{uc_base:"1f9dd-1f3fc-2640",uc_output:"1f9dd-1f3fc-200d-2640-fe0f",uc_match:"1f9dd-1f3fc-2640-fe0f",uc_greedy:"1f9dd-1f3fc-2640",shortnames:[":woman_elf_medium_light_skin_tone:"],category:"people"},":woman_elf_tone3:":{uc_base:"1f9dd-1f3fd-2640",uc_output:"1f9dd-1f3fd-200d-2640-fe0f",uc_match:"1f9dd-1f3fd-2640-fe0f",uc_greedy:"1f9dd-1f3fd-2640",shortnames:[":woman_elf_medium_skin_tone:"],category:"people"},":woman_elf_tone4:":{uc_base:"1f9dd-1f3fe-2640",uc_output:"1f9dd-1f3fe-200d-2640-fe0f",uc_match:"1f9dd-1f3fe-2640-fe0f",uc_greedy:"1f9dd-1f3fe-2640",shortnames:[":woman_elf_medium_dark_skin_tone:"],category:"people"},":woman_elf_tone5:":{uc_base:"1f9dd-1f3ff-2640",uc_output:"1f9dd-1f3ff-200d-2640-fe0f",uc_match:"1f9dd-1f3ff-2640-fe0f",uc_greedy:"1f9dd-1f3ff-2640",shortnames:[":woman_elf_dark_skin_tone:"],category:"people"},":woman_facepalming_tone1:":{uc_base:"1f926-1f3fb-2640",uc_output:"1f926-1f3fb-200d-2640-fe0f",uc_match:"1f926-1f3fb-2640-fe0f",uc_greedy:"1f926-1f3fb-2640",shortnames:[":woman_facepalming_light_skin_tone:"],category:"people"},":woman_facepalming_tone2:":{uc_base:"1f926-1f3fc-2640",uc_output:"1f926-1f3fc-200d-2640-fe0f",uc_match:"1f926-1f3fc-2640-fe0f",uc_greedy:"1f926-1f3fc-2640",shortnames:[":woman_facepalming_medium_light_skin_tone:"],category:"people"},":woman_facepalming_tone3:":{uc_base:"1f926-1f3fd-2640",uc_output:"1f926-1f3fd-200d-2640-fe0f",uc_match:"1f926-1f3fd-2640-fe0f",uc_greedy:"1f926-1f3fd-2640",shortnames:[":woman_facepalming_medium_skin_tone:"],category:"people"},":woman_facepalming_tone4:":{uc_base:"1f926-1f3fe-2640",uc_output:"1f926-1f3fe-200d-2640-fe0f",uc_match:"1f926-1f3fe-2640-fe0f",uc_greedy:"1f926-1f3fe-2640",shortnames:[":woman_facepalming_medium_dark_skin_tone:"],category:"people"},":woman_facepalming_tone5:":{uc_base:"1f926-1f3ff-2640",uc_output:"1f926-1f3ff-200d-2640-fe0f",uc_match:"1f926-1f3ff-2640-fe0f",uc_greedy:"1f926-1f3ff-2640",shortnames:[":woman_facepalming_dark_skin_tone:"],category:"people"},":woman_fairy_tone1:":{uc_base:"1f9da-1f3fb-2640",uc_output:"1f9da-1f3fb-200d-2640-fe0f",uc_match:"1f9da-1f3fb-2640-fe0f",uc_greedy:"1f9da-1f3fb-2640",shortnames:[":woman_fairy_light_skin_tone:"],category:"people"},":woman_fairy_tone2:":{uc_base:"1f9da-1f3fc-2640",uc_output:"1f9da-1f3fc-200d-2640-fe0f",uc_match:"1f9da-1f3fc-2640-fe0f",uc_greedy:"1f9da-1f3fc-2640",shortnames:[":woman_fairy_medium_light_skin_tone:"],category:"people"},":woman_fairy_tone3:":{uc_base:"1f9da-1f3fd-2640",uc_output:"1f9da-1f3fd-200d-2640-fe0f",uc_match:"1f9da-1f3fd-2640-fe0f",uc_greedy:"1f9da-1f3fd-2640",shortnames:[":woman_fairy_medium_skin_tone:"],category:"people"},":woman_fairy_tone4:":{uc_base:"1f9da-1f3fe-2640",uc_output:"1f9da-1f3fe-200d-2640-fe0f",uc_match:"1f9da-1f3fe-2640-fe0f",uc_greedy:"1f9da-1f3fe-2640",shortnames:[":woman_fairy_medium_dark_skin_tone:"],category:"people"},":woman_fairy_tone5:":{uc_base:"1f9da-1f3ff-2640",uc_output:"1f9da-1f3ff-200d-2640-fe0f",uc_match:"1f9da-1f3ff-2640-fe0f",uc_greedy:"1f9da-1f3ff-2640",shortnames:[":woman_fairy_dark_skin_tone:"],category:"people"},":woman_frowning_tone1:":{uc_base:"1f64d-1f3fb-2640",uc_output:"1f64d-1f3fb-200d-2640-fe0f",uc_match:"1f64d-1f3fb-2640-fe0f",uc_greedy:"1f64d-1f3fb-2640",shortnames:[":woman_frowning_light_skin_tone:"],category:"people"},":woman_frowning_tone2:":{uc_base:"1f64d-1f3fc-2640",uc_output:"1f64d-1f3fc-200d-2640-fe0f",uc_match:"1f64d-1f3fc-2640-fe0f",uc_greedy:"1f64d-1f3fc-2640",shortnames:[":woman_frowning_medium_light_skin_tone:"],category:"people"},":woman_frowning_tone3:":{uc_base:"1f64d-1f3fd-2640",uc_output:"1f64d-1f3fd-200d-2640-fe0f",uc_match:"1f64d-1f3fd-2640-fe0f",uc_greedy:"1f64d-1f3fd-2640",shortnames:[":woman_frowning_medium_skin_tone:"],category:"people"},":woman_frowning_tone4:":{uc_base:"1f64d-1f3fe-2640",uc_output:"1f64d-1f3fe-200d-2640-fe0f",uc_match:"1f64d-1f3fe-2640-fe0f",uc_greedy:"1f64d-1f3fe-2640",shortnames:[":woman_frowning_medium_dark_skin_tone:"],category:"people"},":woman_frowning_tone5:":{uc_base:"1f64d-1f3ff-2640",uc_output:"1f64d-1f3ff-200d-2640-fe0f",uc_match:"1f64d-1f3ff-2640-fe0f",uc_greedy:"1f64d-1f3ff-2640",shortnames:[":woman_frowning_dark_skin_tone:"],category:"people"},":woman_gesturing_no_tone1:":{uc_base:"1f645-1f3fb-2640",uc_output:"1f645-1f3fb-200d-2640-fe0f",uc_match:"1f645-1f3fb-2640-fe0f",uc_greedy:"1f645-1f3fb-2640",shortnames:[":woman_gesturing_no_light_skin_tone:"],category:"people"},":woman_gesturing_no_tone2:":{uc_base:"1f645-1f3fc-2640",uc_output:"1f645-1f3fc-200d-2640-fe0f",uc_match:"1f645-1f3fc-2640-fe0f",uc_greedy:"1f645-1f3fc-2640",shortnames:[":woman_gesturing_no_medium_light_skin_tone:"],category:"people"},":woman_gesturing_no_tone3:":{uc_base:"1f645-1f3fd-2640",uc_output:"1f645-1f3fd-200d-2640-fe0f",uc_match:"1f645-1f3fd-2640-fe0f",uc_greedy:"1f645-1f3fd-2640",shortnames:[":woman_gesturing_no_medium_skin_tone:"],category:"people"},":woman_gesturing_no_tone4:":{uc_base:"1f645-1f3fe-2640",uc_output:"1f645-1f3fe-200d-2640-fe0f",uc_match:"1f645-1f3fe-2640-fe0f",uc_greedy:"1f645-1f3fe-2640",shortnames:[":woman_gesturing_no_medium_dark_skin_tone:"],category:"people"},":woman_gesturing_no_tone5:":{uc_base:"1f645-1f3ff-2640",uc_output:"1f645-1f3ff-200d-2640-fe0f",uc_match:"1f645-1f3ff-2640-fe0f",uc_greedy:"1f645-1f3ff-2640",shortnames:[":woman_gesturing_no_dark_skin_tone:"],category:"people"},":woman_gesturing_ok_tone1:":{uc_base:"1f646-1f3fb-2640",uc_output:"1f646-1f3fb-200d-2640-fe0f",uc_match:"1f646-1f3fb-2640-fe0f",uc_greedy:"1f646-1f3fb-2640",shortnames:[":woman_gesturing_ok_light_skin_tone:"],category:"people"},":woman_gesturing_ok_tone2:":{uc_base:"1f646-1f3fc-2640",uc_output:"1f646-1f3fc-200d-2640-fe0f",uc_match:"1f646-1f3fc-2640-fe0f",uc_greedy:"1f646-1f3fc-2640",shortnames:[":woman_gesturing_ok_medium_light_skin_tone:"],category:"people"},":woman_gesturing_ok_tone3:":{uc_base:"1f646-1f3fd-2640",uc_output:"1f646-1f3fd-200d-2640-fe0f",uc_match:"1f646-1f3fd-2640-fe0f",uc_greedy:"1f646-1f3fd-2640",shortnames:[":woman_gesturing_ok_medium_skin_tone:"],category:"people"},":woman_gesturing_ok_tone4:":{uc_base:"1f646-1f3fe-2640",uc_output:"1f646-1f3fe-200d-2640-fe0f",uc_match:"1f646-1f3fe-2640-fe0f",uc_greedy:"1f646-1f3fe-2640",shortnames:[":woman_gesturing_ok_medium_dark_skin_tone:"],category:"people"},":woman_gesturing_ok_tone5:":{uc_base:"1f646-1f3ff-2640",uc_output:"1f646-1f3ff-200d-2640-fe0f",uc_match:"1f646-1f3ff-2640-fe0f",uc_greedy:"1f646-1f3ff-2640",shortnames:[":woman_gesturing_ok_dark_skin_tone:"],category:"people"},":woman_getting_face_massage_tone1:":{uc_base:"1f486-1f3fb-2640",uc_output:"1f486-1f3fb-200d-2640-fe0f",uc_match:"1f486-1f3fb-2640-fe0f",uc_greedy:"1f486-1f3fb-2640",shortnames:[":woman_getting_face_massage_light_skin_tone:"],category:"people"},":woman_getting_face_massage_tone2:":{uc_base:"1f486-1f3fc-2640",uc_output:"1f486-1f3fc-200d-2640-fe0f",uc_match:"1f486-1f3fc-2640-fe0f",uc_greedy:"1f486-1f3fc-2640",shortnames:[":woman_getting_face_massage_medium_light_skin_tone:"],category:"people"},":woman_getting_face_massage_tone3:":{uc_base:"1f486-1f3fd-2640",uc_output:"1f486-1f3fd-200d-2640-fe0f",uc_match:"1f486-1f3fd-2640-fe0f",uc_greedy:"1f486-1f3fd-2640",shortnames:[":woman_getting_face_massage_medium_skin_tone:"],category:"people"},":woman_getting_face_massage_tone4:":{uc_base:"1f486-1f3fe-2640",uc_output:"1f486-1f3fe-200d-2640-fe0f",uc_match:"1f486-1f3fe-2640-fe0f",uc_greedy:"1f486-1f3fe-2640",shortnames:[":woman_getting_face_massage_medium_dark_skin_tone:"],category:"people"},":woman_getting_face_massage_tone5:":{uc_base:"1f486-1f3ff-2640",uc_output:"1f486-1f3ff-200d-2640-fe0f",uc_match:"1f486-1f3ff-2640-fe0f",uc_greedy:"1f486-1f3ff-2640",shortnames:[":woman_getting_face_massage_dark_skin_tone:"],category:"people"},":woman_getting_haircut_tone1:":{uc_base:"1f487-1f3fb-2640",uc_output:"1f487-1f3fb-200d-2640-fe0f",uc_match:"1f487-1f3fb-2640-fe0f",uc_greedy:"1f487-1f3fb-2640",shortnames:[":woman_getting_haircut_light_skin_tone:"],category:"people"},":woman_getting_haircut_tone2:":{uc_base:"1f487-1f3fc-2640",uc_output:"1f487-1f3fc-200d-2640-fe0f",uc_match:"1f487-1f3fc-2640-fe0f",uc_greedy:"1f487-1f3fc-2640",shortnames:[":woman_getting_haircut_medium_light_skin_tone:"],category:"people"},":woman_getting_haircut_tone3:":{uc_base:"1f487-1f3fd-2640",uc_output:"1f487-1f3fd-200d-2640-fe0f",uc_match:"1f487-1f3fd-2640-fe0f",uc_greedy:"1f487-1f3fd-2640",shortnames:[":woman_getting_haircut_medium_skin_tone:"],category:"people"},":woman_getting_haircut_tone4:":{uc_base:"1f487-1f3fe-2640",uc_output:"1f487-1f3fe-200d-2640-fe0f",uc_match:"1f487-1f3fe-2640-fe0f",uc_greedy:"1f487-1f3fe-2640",shortnames:[":woman_getting_haircut_medium_dark_skin_tone:"],category:"people"},":woman_getting_haircut_tone5:":{uc_base:"1f487-1f3ff-2640",uc_output:"1f487-1f3ff-200d-2640-fe0f",uc_match:"1f487-1f3ff-2640-fe0f",uc_greedy:"1f487-1f3ff-2640",shortnames:[":woman_getting_haircut_dark_skin_tone:"],category:"people"},":woman_golfing_tone1:":{uc_base:"1f3cc-1f3fb-2640",uc_output:"1f3cc-1f3fb-200d-2640-fe0f",uc_match:"1f3cc-fe0f-1f3fb-2640-fe0f",uc_greedy:"1f3cc-1f3fb-2640",shortnames:[":woman_golfing_light_skin_tone:"],category:"activity"},":woman_golfing_tone2:":{uc_base:"1f3cc-1f3fc-2640",uc_output:"1f3cc-1f3fc-200d-2640-fe0f",uc_match:"1f3cc-fe0f-1f3fc-2640-fe0f",uc_greedy:"1f3cc-1f3fc-2640",shortnames:[":woman_golfing_medium_light_skin_tone:"],category:"activity"},":woman_golfing_tone3:":{uc_base:"1f3cc-1f3fd-2640",uc_output:"1f3cc-1f3fd-200d-2640-fe0f",uc_match:"1f3cc-fe0f-1f3fd-2640-fe0f",uc_greedy:"1f3cc-1f3fd-2640",shortnames:[":woman_golfing_medium_skin_tone:"],category:"activity"},":woman_golfing_tone4:":{uc_base:"1f3cc-1f3fe-2640",uc_output:"1f3cc-1f3fe-200d-2640-fe0f",uc_match:"1f3cc-fe0f-1f3fe-2640-fe0f",uc_greedy:"1f3cc-1f3fe-2640",shortnames:[":woman_golfing_medium_dark_skin_tone:"],category:"activity"},":woman_golfing_tone5:":{uc_base:"1f3cc-1f3ff-2640",uc_output:"1f3cc-1f3ff-200d-2640-fe0f",uc_match:"1f3cc-fe0f-1f3ff-2640-fe0f",uc_greedy:"1f3cc-1f3ff-2640",shortnames:[":woman_golfing_dark_skin_tone:"],category:"activity"},":woman_guard_tone1:":{uc_base:"1f482-1f3fb-2640",uc_output:"1f482-1f3fb-200d-2640-fe0f",uc_match:"1f482-1f3fb-2640-fe0f",uc_greedy:"1f482-1f3fb-2640",shortnames:[":woman_guard_light_skin_tone:"],category:"people"},":woman_guard_tone2:":{uc_base:"1f482-1f3fc-2640",uc_output:"1f482-1f3fc-200d-2640-fe0f",uc_match:"1f482-1f3fc-2640-fe0f",uc_greedy:"1f482-1f3fc-2640",shortnames:[":woman_guard_medium_light_skin_tone:"],category:"people"},":woman_guard_tone3:":{uc_base:"1f482-1f3fd-2640",uc_output:"1f482-1f3fd-200d-2640-fe0f",uc_match:"1f482-1f3fd-2640-fe0f",uc_greedy:"1f482-1f3fd-2640",shortnames:[":woman_guard_medium_skin_tone:"],category:"people"},":woman_guard_tone4:":{uc_base:"1f482-1f3fe-2640",uc_output:"1f482-1f3fe-200d-2640-fe0f",uc_match:"1f482-1f3fe-2640-fe0f",uc_greedy:"1f482-1f3fe-2640",shortnames:[":woman_guard_medium_dark_skin_tone:"],category:"people"},":woman_guard_tone5:":{uc_base:"1f482-1f3ff-2640",uc_output:"1f482-1f3ff-200d-2640-fe0f",uc_match:"1f482-1f3ff-2640-fe0f",uc_greedy:"1f482-1f3ff-2640",shortnames:[":woman_guard_dark_skin_tone:"],category:"people"},":woman_health_worker_tone1:":{uc_base:"1f469-1f3fb-2695",uc_output:"1f469-1f3fb-200d-2695-fe0f",uc_match:"1f469-1f3fb-2695-fe0f",uc_greedy:"1f469-1f3fb-2695",shortnames:[":woman_health_worker_light_skin_tone:"],category:"people"},":woman_health_worker_tone2:":{uc_base:"1f469-1f3fc-2695",uc_output:"1f469-1f3fc-200d-2695-fe0f",uc_match:"1f469-1f3fc-2695-fe0f",uc_greedy:"1f469-1f3fc-2695",shortnames:[":woman_health_worker_medium_light_skin_tone:"],category:"people"},":woman_health_worker_tone3:":{uc_base:"1f469-1f3fd-2695",uc_output:"1f469-1f3fd-200d-2695-fe0f",uc_match:"1f469-1f3fd-2695-fe0f",uc_greedy:"1f469-1f3fd-2695",shortnames:[":woman_health_worker_medium_skin_tone:"],category:"people"},":woman_health_worker_tone4:":{uc_base:"1f469-1f3fe-2695",uc_output:"1f469-1f3fe-200d-2695-fe0f",uc_match:"1f469-1f3fe-2695-fe0f",uc_greedy:"1f469-1f3fe-2695",shortnames:[":woman_health_worker_medium_dark_skin_tone:"],category:"people"},":woman_health_worker_tone5:":{uc_base:"1f469-1f3ff-2695",uc_output:"1f469-1f3ff-200d-2695-fe0f",uc_match:"1f469-1f3ff-2695-fe0f",uc_greedy:"1f469-1f3ff-2695",shortnames:[":woman_health_worker_dark_skin_tone:"],category:"people"},":woman_in_lotus_position_tone1:":{uc_base:"1f9d8-1f3fb-2640",uc_output:"1f9d8-1f3fb-200d-2640-fe0f",uc_match:"1f9d8-1f3fb-2640-fe0f",uc_greedy:"1f9d8-1f3fb-2640",shortnames:[":woman_in_lotus_position_light_skin_tone:"],category:"activity"},":woman_in_lotus_position_tone2:":{uc_base:"1f9d8-1f3fc-2640",uc_output:"1f9d8-1f3fc-200d-2640-fe0f",uc_match:"1f9d8-1f3fc-2640-fe0f",uc_greedy:"1f9d8-1f3fc-2640",shortnames:[":woman_in_lotus_position_medium_light_skin_tone:"],category:"activity"},":woman_in_lotus_position_tone3:":{uc_base:"1f9d8-1f3fd-2640",uc_output:"1f9d8-1f3fd-200d-2640-fe0f",uc_match:"1f9d8-1f3fd-2640-fe0f",uc_greedy:"1f9d8-1f3fd-2640",shortnames:[":woman_in_lotus_position_medium_skin_tone:"],category:"activity"},":woman_in_lotus_position_tone4:":{uc_base:"1f9d8-1f3fe-2640",uc_output:"1f9d8-1f3fe-200d-2640-fe0f",uc_match:"1f9d8-1f3fe-2640-fe0f",uc_greedy:"1f9d8-1f3fe-2640",shortnames:[":woman_in_lotus_position_medium_dark_skin_tone:"],category:"activity"},":woman_in_lotus_position_tone5:":{uc_base:"1f9d8-1f3ff-2640",uc_output:"1f9d8-1f3ff-200d-2640-fe0f",uc_match:"1f9d8-1f3ff-2640-fe0f",uc_greedy:"1f9d8-1f3ff-2640",shortnames:[":woman_in_lotus_position_dark_skin_tone:"],category:"activity"},":woman_in_steamy_room_tone1:":{uc_base:"1f9d6-1f3fb-2640",uc_output:"1f9d6-1f3fb-200d-2640-fe0f",uc_match:"1f9d6-1f3fb-2640-fe0f",uc_greedy:"1f9d6-1f3fb-2640",shortnames:[":woman_in_steamy_room_light_skin_tone:"],category:"people"},":woman_in_steamy_room_tone2:":{uc_base:"1f9d6-1f3fc-2640",uc_output:"1f9d6-1f3fc-200d-2640-fe0f",uc_match:"1f9d6-1f3fc-2640-fe0f",uc_greedy:"1f9d6-1f3fc-2640",shortnames:[":woman_in_steamy_room_medium_light_skin_tone:"],category:"people"},":woman_in_steamy_room_tone3:":{uc_base:"1f9d6-1f3fd-2640",uc_output:"1f9d6-1f3fd-200d-2640-fe0f",uc_match:"1f9d6-1f3fd-2640-fe0f",uc_greedy:"1f9d6-1f3fd-2640",shortnames:[":woman_in_steamy_room_medium_skin_tone:"],category:"people"},":woman_in_steamy_room_tone4:":{uc_base:"1f9d6-1f3fe-2640",uc_output:"1f9d6-1f3fe-200d-2640-fe0f",uc_match:"1f9d6-1f3fe-2640-fe0f",uc_greedy:"1f9d6-1f3fe-2640",shortnames:[":woman_in_steamy_room_medium_dark_skin_tone:"],category:"people"},":woman_in_steamy_room_tone5:":{uc_base:"1f9d6-1f3ff-2640",uc_output:"1f9d6-1f3ff-200d-2640-fe0f",uc_match:"1f9d6-1f3ff-2640-fe0f",uc_greedy:"1f9d6-1f3ff-2640",shortnames:[":woman_in_steamy_room_dark_skin_tone:"],category:"people"},":woman_judge_tone1:":{uc_base:"1f469-1f3fb-2696",uc_output:"1f469-1f3fb-200d-2696-fe0f",uc_match:"1f469-1f3fb-2696-fe0f",uc_greedy:"1f469-1f3fb-2696",shortnames:[":woman_judge_light_skin_tone:"],category:"people"},":woman_judge_tone2:":{uc_base:"1f469-1f3fc-2696",uc_output:"1f469-1f3fc-200d-2696-fe0f",uc_match:"1f469-1f3fc-2696-fe0f",uc_greedy:"1f469-1f3fc-2696",shortnames:[":woman_judge_medium_light_skin_tone:"],category:"people"},":woman_judge_tone3:":{uc_base:"1f469-1f3fd-2696",uc_output:"1f469-1f3fd-200d-2696-fe0f",uc_match:"1f469-1f3fd-2696-fe0f",uc_greedy:"1f469-1f3fd-2696",shortnames:[":woman_judge_medium_skin_tone:"],category:"people"},":woman_judge_tone4:":{uc_base:"1f469-1f3fe-2696",uc_output:"1f469-1f3fe-200d-2696-fe0f",uc_match:"1f469-1f3fe-2696-fe0f",uc_greedy:"1f469-1f3fe-2696",shortnames:[":woman_judge_medium_dark_skin_tone:"],category:"people"},":woman_judge_tone5:":{uc_base:"1f469-1f3ff-2696",uc_output:"1f469-1f3ff-200d-2696-fe0f",uc_match:"1f469-1f3ff-2696-fe0f",uc_greedy:"1f469-1f3ff-2696",shortnames:[":woman_judge_dark_skin_tone:"],category:"people"},":woman_juggling_tone1:":{uc_base:"1f939-1f3fb-2640",uc_output:"1f939-1f3fb-200d-2640-fe0f",uc_match:"1f939-1f3fb-2640-fe0f",uc_greedy:"1f939-1f3fb-2640",shortnames:[":woman_juggling_light_skin_tone:"],category:"activity"},":woman_juggling_tone2:":{uc_base:"1f939-1f3fc-2640",uc_output:"1f939-1f3fc-200d-2640-fe0f",uc_match:"1f939-1f3fc-2640-fe0f",uc_greedy:"1f939-1f3fc-2640",shortnames:[":woman_juggling_medium_light_skin_tone:"],category:"activity"},":woman_juggling_tone3:":{uc_base:"1f939-1f3fd-2640",uc_output:"1f939-1f3fd-200d-2640-fe0f",uc_match:"1f939-1f3fd-2640-fe0f",uc_greedy:"1f939-1f3fd-2640",shortnames:[":woman_juggling_medium_skin_tone:"],category:"activity"},":woman_juggling_tone4:":{uc_base:"1f939-1f3fe-2640",uc_output:"1f939-1f3fe-200d-2640-fe0f",uc_match:"1f939-1f3fe-2640-fe0f",uc_greedy:"1f939-1f3fe-2640",shortnames:[":woman_juggling_medium_dark_skin_tone:"],category:"activity"},":woman_juggling_tone5:":{uc_base:"1f939-1f3ff-2640",uc_output:"1f939-1f3ff-200d-2640-fe0f",uc_match:"1f939-1f3ff-2640-fe0f",uc_greedy:"1f939-1f3ff-2640",shortnames:[":woman_juggling_dark_skin_tone:"],category:"activity"},":woman_lifting_weights_tone1:":{uc_base:"1f3cb-1f3fb-2640",uc_output:"1f3cb-1f3fb-200d-2640-fe0f",uc_match:"1f3cb-fe0f-1f3fb-2640-fe0f",uc_greedy:"1f3cb-1f3fb-2640",shortnames:[":woman_lifting_weights_light_skin_tone:"],category:"activity"},":woman_lifting_weights_tone2:":{uc_base:"1f3cb-1f3fc-2640",uc_output:"1f3cb-1f3fc-200d-2640-fe0f",uc_match:"1f3cb-fe0f-1f3fc-2640-fe0f",uc_greedy:"1f3cb-1f3fc-2640",shortnames:[":woman_lifting_weights_medium_light_skin_tone:"],category:"activity"},":woman_lifting_weights_tone3:":{uc_base:"1f3cb-1f3fd-2640",uc_output:"1f3cb-1f3fd-200d-2640-fe0f",uc_match:"1f3cb-fe0f-1f3fd-2640-fe0f",uc_greedy:"1f3cb-1f3fd-2640",shortnames:[":woman_lifting_weights_medium_skin_tone:"],category:"activity"},":woman_lifting_weights_tone4:":{uc_base:"1f3cb-1f3fe-2640",uc_output:"1f3cb-1f3fe-200d-2640-fe0f",uc_match:"1f3cb-fe0f-1f3fe-2640-fe0f",uc_greedy:"1f3cb-1f3fe-2640",shortnames:[":woman_lifting_weights_medium_dark_skin_tone:"],category:"activity"},":woman_lifting_weights_tone5:":{uc_base:"1f3cb-1f3ff-2640",uc_output:"1f3cb-1f3ff-200d-2640-fe0f",uc_match:"1f3cb-fe0f-1f3ff-2640-fe0f",uc_greedy:"1f3cb-1f3ff-2640",shortnames:[":woman_lifting_weights_dark_skin_tone:"],category:"activity"},":woman_mage_tone1:":{uc_base:"1f9d9-1f3fb-2640",uc_output:"1f9d9-1f3fb-200d-2640-fe0f",uc_match:"1f9d9-1f3fb-2640-fe0f",uc_greedy:"1f9d9-1f3fb-2640",shortnames:[":woman_mage_light_skin_tone:"],category:"people"},":woman_mage_tone2:":{uc_base:"1f9d9-1f3fc-2640",uc_output:"1f9d9-1f3fc-200d-2640-fe0f",uc_match:"1f9d9-1f3fc-2640-fe0f",uc_greedy:"1f9d9-1f3fc-2640",shortnames:[":woman_mage_medium_light_skin_tone:"],category:"people"},":woman_mage_tone3:":{uc_base:"1f9d9-1f3fd-2640",uc_output:"1f9d9-1f3fd-200d-2640-fe0f",uc_match:"1f9d9-1f3fd-2640-fe0f",uc_greedy:"1f9d9-1f3fd-2640",shortnames:[":woman_mage_medium_skin_tone:"],category:"people"},":woman_mage_tone4:":{uc_base:"1f9d9-1f3fe-2640",uc_output:"1f9d9-1f3fe-200d-2640-fe0f",uc_match:"1f9d9-1f3fe-2640-fe0f",uc_greedy:"1f9d9-1f3fe-2640",shortnames:[":woman_mage_medium_dark_skin_tone:"],category:"people"},":woman_mage_tone5:":{uc_base:"1f9d9-1f3ff-2640",uc_output:"1f9d9-1f3ff-200d-2640-fe0f",uc_match:"1f9d9-1f3ff-2640-fe0f",uc_greedy:"1f9d9-1f3ff-2640",shortnames:[":woman_mage_dark_skin_tone:"],category:"people"},":woman_mountain_biking_tone1:":{uc_base:"1f6b5-1f3fb-2640",uc_output:"1f6b5-1f3fb-200d-2640-fe0f",uc_match:"1f6b5-1f3fb-2640-fe0f",uc_greedy:"1f6b5-1f3fb-2640",shortnames:[":woman_mountain_biking_light_skin_tone:"],category:"activity"},":woman_mountain_biking_tone2:":{uc_base:"1f6b5-1f3fc-2640",uc_output:"1f6b5-1f3fc-200d-2640-fe0f",uc_match:"1f6b5-1f3fc-2640-fe0f",uc_greedy:"1f6b5-1f3fc-2640",shortnames:[":woman_mountain_biking_medium_light_skin_tone:"],category:"activity"},":woman_mountain_biking_tone3:":{uc_base:"1f6b5-1f3fd-2640",uc_output:"1f6b5-1f3fd-200d-2640-fe0f",uc_match:"1f6b5-1f3fd-2640-fe0f",uc_greedy:"1f6b5-1f3fd-2640",shortnames:[":woman_mountain_biking_medium_skin_tone:"],category:"activity"},":woman_mountain_biking_tone4:":{uc_base:"1f6b5-1f3fe-2640",uc_output:"1f6b5-1f3fe-200d-2640-fe0f",uc_match:"1f6b5-1f3fe-2640-fe0f",uc_greedy:"1f6b5-1f3fe-2640",shortnames:[":woman_mountain_biking_medium_dark_skin_tone:"],category:"activity"},":woman_mountain_biking_tone5:":{uc_base:"1f6b5-1f3ff-2640",uc_output:"1f6b5-1f3ff-200d-2640-fe0f",uc_match:"1f6b5-1f3ff-2640-fe0f",uc_greedy:"1f6b5-1f3ff-2640",shortnames:[":woman_mountain_biking_dark_skin_tone:"],category:"activity"},":woman_pilot_tone1:":{uc_base:"1f469-1f3fb-2708",uc_output:"1f469-1f3fb-200d-2708-fe0f",uc_match:"1f469-1f3fb-2708-fe0f",uc_greedy:"1f469-1f3fb-2708",shortnames:[":woman_pilot_light_skin_tone:"],category:"people"},":woman_pilot_tone2:":{uc_base:"1f469-1f3fc-2708",uc_output:"1f469-1f3fc-200d-2708-fe0f",uc_match:"1f469-1f3fc-2708-fe0f",uc_greedy:"1f469-1f3fc-2708",shortnames:[":woman_pilot_medium_light_skin_tone:"],category:"people"},":woman_pilot_tone3:":{uc_base:"1f469-1f3fd-2708",uc_output:"1f469-1f3fd-200d-2708-fe0f",uc_match:"1f469-1f3fd-2708-fe0f",uc_greedy:"1f469-1f3fd-2708",shortnames:[":woman_pilot_medium_skin_tone:"],category:"people"},":woman_pilot_tone4:":{uc_base:"1f469-1f3fe-2708",uc_output:"1f469-1f3fe-200d-2708-fe0f",uc_match:"1f469-1f3fe-2708-fe0f",uc_greedy:"1f469-1f3fe-2708",shortnames:[":woman_pilot_medium_dark_skin_tone:"],category:"people"},":woman_pilot_tone5:":{uc_base:"1f469-1f3ff-2708",uc_output:"1f469-1f3ff-200d-2708-fe0f",uc_match:"1f469-1f3ff-2708-fe0f",uc_greedy:"1f469-1f3ff-2708",shortnames:[":woman_pilot_dark_skin_tone:"],category:"people"},":woman_playing_handball_tone1:":{uc_base:"1f93e-1f3fb-2640",uc_output:"1f93e-1f3fb-200d-2640-fe0f",uc_match:"1f93e-1f3fb-2640-fe0f",uc_greedy:"1f93e-1f3fb-2640",shortnames:[":woman_playing_handball_light_skin_tone:"],category:"activity"},":woman_playing_handball_tone2:":{uc_base:"1f93e-1f3fc-2640",uc_output:"1f93e-1f3fc-200d-2640-fe0f",uc_match:"1f93e-1f3fc-2640-fe0f",uc_greedy:"1f93e-1f3fc-2640",shortnames:[":woman_playing_handball_medium_light_skin_tone:"],category:"activity"},":woman_playing_handball_tone3:":{uc_base:"1f93e-1f3fd-2640",uc_output:"1f93e-1f3fd-200d-2640-fe0f",uc_match:"1f93e-1f3fd-2640-fe0f",uc_greedy:"1f93e-1f3fd-2640",shortnames:[":woman_playing_handball_medium_skin_tone:"],category:"activity"},":woman_playing_handball_tone4:":{uc_base:"1f93e-1f3fe-2640",uc_output:"1f93e-1f3fe-200d-2640-fe0f",uc_match:"1f93e-1f3fe-2640-fe0f",uc_greedy:"1f93e-1f3fe-2640",shortnames:[":woman_playing_handball_medium_dark_skin_tone:"],category:"activity"},":woman_playing_handball_tone5:":{uc_base:"1f93e-1f3ff-2640",uc_output:"1f93e-1f3ff-200d-2640-fe0f",uc_match:"1f93e-1f3ff-2640-fe0f",uc_greedy:"1f93e-1f3ff-2640",shortnames:[":woman_playing_handball_dark_skin_tone:"],category:"activity"},":woman_playing_water_polo_tone1:":{uc_base:"1f93d-1f3fb-2640",uc_output:"1f93d-1f3fb-200d-2640-fe0f",uc_match:"1f93d-1f3fb-2640-fe0f",uc_greedy:"1f93d-1f3fb-2640",shortnames:[":woman_playing_water_polo_light_skin_tone:"],category:"activity"},":woman_playing_water_polo_tone2:":{uc_base:"1f93d-1f3fc-2640",uc_output:"1f93d-1f3fc-200d-2640-fe0f",uc_match:"1f93d-1f3fc-2640-fe0f",uc_greedy:"1f93d-1f3fc-2640",shortnames:[":woman_playing_water_polo_medium_light_skin_tone:"],category:"activity"},":woman_playing_water_polo_tone3:":{uc_base:"1f93d-1f3fd-2640",uc_output:"1f93d-1f3fd-200d-2640-fe0f",uc_match:"1f93d-1f3fd-2640-fe0f",uc_greedy:"1f93d-1f3fd-2640",shortnames:[":woman_playing_water_polo_medium_skin_tone:"],category:"activity"},":woman_playing_water_polo_tone4:":{uc_base:"1f93d-1f3fe-2640",uc_output:"1f93d-1f3fe-200d-2640-fe0f",uc_match:"1f93d-1f3fe-2640-fe0f",uc_greedy:"1f93d-1f3fe-2640",shortnames:[":woman_playing_water_polo_medium_dark_skin_tone:"],category:"activity"},":woman_playing_water_polo_tone5:":{uc_base:"1f93d-1f3ff-2640",uc_output:"1f93d-1f3ff-200d-2640-fe0f",uc_match:"1f93d-1f3ff-2640-fe0f",uc_greedy:"1f93d-1f3ff-2640",shortnames:[":woman_playing_water_polo_dark_skin_tone:"],category:"activity"},":woman_police_officer_tone1:":{uc_base:"1f46e-1f3fb-2640",uc_output:"1f46e-1f3fb-200d-2640-fe0f",uc_match:"1f46e-1f3fb-2640-fe0f",uc_greedy:"1f46e-1f3fb-2640",shortnames:[":woman_police_officer_light_skin_tone:"],category:"people"},":woman_police_officer_tone2:":{uc_base:"1f46e-1f3fc-2640",uc_output:"1f46e-1f3fc-200d-2640-fe0f",uc_match:"1f46e-1f3fc-2640-fe0f",uc_greedy:"1f46e-1f3fc-2640",shortnames:[":woman_police_officer_medium_light_skin_tone:"],category:"people"},":woman_police_officer_tone3:":{uc_base:"1f46e-1f3fd-2640",uc_output:"1f46e-1f3fd-200d-2640-fe0f",uc_match:"1f46e-1f3fd-2640-fe0f",uc_greedy:"1f46e-1f3fd-2640",shortnames:[":woman_police_officer_medium_skin_tone:"],category:"people"},":woman_police_officer_tone4:":{uc_base:"1f46e-1f3fe-2640",uc_output:"1f46e-1f3fe-200d-2640-fe0f",uc_match:"1f46e-1f3fe-2640-fe0f",uc_greedy:"1f46e-1f3fe-2640",shortnames:[":woman_police_officer_medium_dark_skin_tone:"],category:"people"},":woman_police_officer_tone5:":{uc_base:"1f46e-1f3ff-2640",uc_output:"1f46e-1f3ff-200d-2640-fe0f",uc_match:"1f46e-1f3ff-2640-fe0f",uc_greedy:"1f46e-1f3ff-2640",shortnames:[":woman_police_officer_dark_skin_tone:"],category:"people"},":woman_pouting_tone1:":{uc_base:"1f64e-1f3fb-2640",uc_output:"1f64e-1f3fb-200d-2640-fe0f",uc_match:"1f64e-1f3fb-2640-fe0f",uc_greedy:"1f64e-1f3fb-2640",shortnames:[":woman_pouting_light_skin_tone:"],category:"people"},":woman_pouting_tone2:":{uc_base:"1f64e-1f3fc-2640",uc_output:"1f64e-1f3fc-200d-2640-fe0f",uc_match:"1f64e-1f3fc-2640-fe0f",uc_greedy:"1f64e-1f3fc-2640",shortnames:[":woman_pouting_medium_light_skin_tone:"],category:"people"},":woman_pouting_tone3:":{uc_base:"1f64e-1f3fd-2640",uc_output:"1f64e-1f3fd-200d-2640-fe0f",uc_match:"1f64e-1f3fd-2640-fe0f",uc_greedy:"1f64e-1f3fd-2640",shortnames:[":woman_pouting_medium_skin_tone:"],category:"people"},":woman_pouting_tone4:":{uc_base:"1f64e-1f3fe-2640",uc_output:"1f64e-1f3fe-200d-2640-fe0f",uc_match:"1f64e-1f3fe-2640-fe0f",uc_greedy:"1f64e-1f3fe-2640",shortnames:[":woman_pouting_medium_dark_skin_tone:"],category:"people"},":woman_pouting_tone5:":{uc_base:"1f64e-1f3ff-2640",uc_output:"1f64e-1f3ff-200d-2640-fe0f",uc_match:"1f64e-1f3ff-2640-fe0f",uc_greedy:"1f64e-1f3ff-2640",shortnames:[":woman_pouting_dark_skin_tone:"],category:"people"},":woman_raising_hand_tone1:":{uc_base:"1f64b-1f3fb-2640",uc_output:"1f64b-1f3fb-200d-2640-fe0f",uc_match:"1f64b-1f3fb-2640-fe0f",uc_greedy:"1f64b-1f3fb-2640",shortnames:[":woman_raising_hand_light_skin_tone:"],category:"people"},":woman_raising_hand_tone2:":{uc_base:"1f64b-1f3fc-2640",uc_output:"1f64b-1f3fc-200d-2640-fe0f",uc_match:"1f64b-1f3fc-2640-fe0f",uc_greedy:"1f64b-1f3fc-2640",shortnames:[":woman_raising_hand_medium_light_skin_tone:"],category:"people"},":woman_raising_hand_tone3:":{uc_base:"1f64b-1f3fd-2640",uc_output:"1f64b-1f3fd-200d-2640-fe0f",uc_match:"1f64b-1f3fd-2640-fe0f",uc_greedy:"1f64b-1f3fd-2640",shortnames:[":woman_raising_hand_medium_skin_tone:"],category:"people"},":woman_raising_hand_tone4:":{uc_base:"1f64b-1f3fe-2640",uc_output:"1f64b-1f3fe-200d-2640-fe0f",uc_match:"1f64b-1f3fe-2640-fe0f",uc_greedy:"1f64b-1f3fe-2640",shortnames:[":woman_raising_hand_medium_dark_skin_tone:"],category:"people"},":woman_raising_hand_tone5:":{uc_base:"1f64b-1f3ff-2640",uc_output:"1f64b-1f3ff-200d-2640-fe0f",uc_match:"1f64b-1f3ff-2640-fe0f",uc_greedy:"1f64b-1f3ff-2640",shortnames:[":woman_raising_hand_dark_skin_tone:"],category:"people"},":woman_rowing_boat_tone1:":{uc_base:"1f6a3-1f3fb-2640",uc_output:"1f6a3-1f3fb-200d-2640-fe0f",uc_match:"1f6a3-1f3fb-2640-fe0f",uc_greedy:"1f6a3-1f3fb-2640",shortnames:[":woman_rowing_boat_light_skin_tone:"],category:"activity"},":woman_rowing_boat_tone2:":{uc_base:"1f6a3-1f3fc-2640",uc_output:"1f6a3-1f3fc-200d-2640-fe0f",uc_match:"1f6a3-1f3fc-2640-fe0f",uc_greedy:"1f6a3-1f3fc-2640",shortnames:[":woman_rowing_boat_medium_light_skin_tone:"],category:"activity"},":woman_rowing_boat_tone3:":{uc_base:"1f6a3-1f3fd-2640",uc_output:"1f6a3-1f3fd-200d-2640-fe0f",uc_match:"1f6a3-1f3fd-2640-fe0f",uc_greedy:"1f6a3-1f3fd-2640",shortnames:[":woman_rowing_boat_medium_skin_tone:"],category:"activity"},":woman_rowing_boat_tone4:":{uc_base:"1f6a3-1f3fe-2640",uc_output:"1f6a3-1f3fe-200d-2640-fe0f",uc_match:"1f6a3-1f3fe-2640-fe0f",uc_greedy:"1f6a3-1f3fe-2640",shortnames:[":woman_rowing_boat_medium_dark_skin_tone:"],category:"activity"},":woman_rowing_boat_tone5:":{uc_base:"1f6a3-1f3ff-2640",uc_output:"1f6a3-1f3ff-200d-2640-fe0f",uc_match:"1f6a3-1f3ff-2640-fe0f",uc_greedy:"1f6a3-1f3ff-2640",shortnames:[":woman_rowing_boat_dark_skin_tone:"],category:"activity"},":woman_running_tone1:":{uc_base:"1f3c3-1f3fb-2640",uc_output:"1f3c3-1f3fb-200d-2640-fe0f",uc_match:"1f3c3-1f3fb-2640-fe0f",uc_greedy:"1f3c3-1f3fb-2640",shortnames:[":woman_running_light_skin_tone:"],category:"people"},":woman_running_tone2:":{uc_base:"1f3c3-1f3fc-2640",uc_output:"1f3c3-1f3fc-200d-2640-fe0f",uc_match:"1f3c3-1f3fc-2640-fe0f",uc_greedy:"1f3c3-1f3fc-2640",shortnames:[":woman_running_medium_light_skin_tone:"],category:"people"},":woman_running_tone3:":{uc_base:"1f3c3-1f3fd-2640",uc_output:"1f3c3-1f3fd-200d-2640-fe0f",uc_match:"1f3c3-1f3fd-2640-fe0f",uc_greedy:"1f3c3-1f3fd-2640",shortnames:[":woman_running_medium_skin_tone:"],category:"people"},":woman_running_tone4:":{uc_base:"1f3c3-1f3fe-2640",uc_output:"1f3c3-1f3fe-200d-2640-fe0f",uc_match:"1f3c3-1f3fe-2640-fe0f",uc_greedy:"1f3c3-1f3fe-2640",shortnames:[":woman_running_medium_dark_skin_tone:"],category:"people"},":woman_running_tone5:":{uc_base:"1f3c3-1f3ff-2640",uc_output:"1f3c3-1f3ff-200d-2640-fe0f",uc_match:"1f3c3-1f3ff-2640-fe0f",uc_greedy:"1f3c3-1f3ff-2640",shortnames:[":woman_running_dark_skin_tone:"],category:"people"},":woman_shrugging_tone1:":{uc_base:"1f937-1f3fb-2640",uc_output:"1f937-1f3fb-200d-2640-fe0f",uc_match:"1f937-1f3fb-2640-fe0f",uc_greedy:"1f937-1f3fb-2640",shortnames:[":woman_shrugging_light_skin_tone:"],category:"people"},":woman_shrugging_tone2:":{uc_base:"1f937-1f3fc-2640",uc_output:"1f937-1f3fc-200d-2640-fe0f",uc_match:"1f937-1f3fc-2640-fe0f",uc_greedy:"1f937-1f3fc-2640",shortnames:[":woman_shrugging_medium_light_skin_tone:"],category:"people"},":woman_shrugging_tone3:":{uc_base:"1f937-1f3fd-2640",uc_output:"1f937-1f3fd-200d-2640-fe0f",uc_match:"1f937-1f3fd-2640-fe0f",uc_greedy:"1f937-1f3fd-2640",shortnames:[":woman_shrugging_medium_skin_tone:"],category:"people"},":woman_shrugging_tone4:":{uc_base:"1f937-1f3fe-2640",uc_output:"1f937-1f3fe-200d-2640-fe0f",uc_match:"1f937-1f3fe-2640-fe0f",uc_greedy:"1f937-1f3fe-2640",shortnames:[":woman_shrugging_medium_dark_skin_tone:"],category:"people"},":woman_shrugging_tone5:":{uc_base:"1f937-1f3ff-2640",uc_output:"1f937-1f3ff-200d-2640-fe0f",uc_match:"1f937-1f3ff-2640-fe0f",uc_greedy:"1f937-1f3ff-2640",shortnames:[":woman_shrugging_dark_skin_tone:"],category:"people"},":woman_superhero_tone1:":{uc_base:"1f9b8-1f3fb-2640",uc_output:"1f9b8-1f3fb-200d-2640-fe0f",uc_match:"1f9b8-1f3fb-2640-fe0f",uc_greedy:"1f9b8-1f3fb-2640",shortnames:[":woman_superhero_light_skin_tone:"],category:"people"},":woman_superhero_tone2:":{uc_base:"1f9b8-1f3fc-2640",uc_output:"1f9b8-1f3fc-200d-2640-fe0f",uc_match:"1f9b8-1f3fc-2640-fe0f",uc_greedy:"1f9b8-1f3fc-2640",shortnames:[":woman_superhero_medium_light_skin_tone:"],category:"people"},":woman_superhero_tone3:":{uc_base:"1f9b8-1f3fd-2640",uc_output:"1f9b8-1f3fd-200d-2640-fe0f",uc_match:"1f9b8-1f3fd-2640-fe0f",uc_greedy:"1f9b8-1f3fd-2640",shortnames:[":woman_superhero_medium_skin_tone:"],category:"people"},":woman_superhero_tone4:":{uc_base:"1f9b8-1f3fe-2640",uc_output:"1f9b8-1f3fe-200d-2640-fe0f",uc_match:"1f9b8-1f3fe-2640-fe0f",uc_greedy:"1f9b8-1f3fe-2640",shortnames:[":woman_superhero_medium_dark_skin_tone:"],category:"people"},":woman_superhero_tone5:":{uc_base:"1f9b8-1f3ff-2640",uc_output:"1f9b8-1f3ff-200d-2640-fe0f",uc_match:"1f9b8-1f3ff-2640-fe0f",uc_greedy:"1f9b8-1f3ff-2640",shortnames:[":woman_superhero_dark_skin_tone:"],category:"people"},":woman_supervillain_tone1:":{uc_base:"1f9b9-1f3fb-2640",uc_output:"1f9b9-1f3fb-200d-2640-fe0f",uc_match:"1f9b9-1f3fb-2640-fe0f",uc_greedy:"1f9b9-1f3fb-2640",shortnames:[":woman_supervillain_light_skin_tone:"],category:"people"},":woman_supervillain_tone2:":{uc_base:"1f9b9-1f3fc-2640",uc_output:"1f9b9-1f3fc-200d-2640-fe0f",uc_match:"1f9b9-1f3fc-2640-fe0f",uc_greedy:"1f9b9-1f3fc-2640",shortnames:[":woman_supervillain_medium_light_skin_tone:"],category:"people"},":woman_supervillain_tone3:":{uc_base:"1f9b9-1f3fd-2640",uc_output:"1f9b9-1f3fd-200d-2640-fe0f",uc_match:"1f9b9-1f3fd-2640-fe0f",uc_greedy:"1f9b9-1f3fd-2640",shortnames:[":woman_supervillain_medium_skin_tone:"],category:"people"},":woman_supervillain_tone4:":{uc_base:"1f9b9-1f3fe-2640",uc_output:"1f9b9-1f3fe-200d-2640-fe0f",uc_match:"1f9b9-1f3fe-2640-fe0f",uc_greedy:"1f9b9-1f3fe-2640",shortnames:[":woman_supervillain_medium_dark_skin_tone:"],category:"people"},":woman_supervillain_tone5:":{uc_base:"1f9b9-1f3ff-2640",uc_output:"1f9b9-1f3ff-200d-2640-fe0f",uc_match:"1f9b9-1f3ff-2640-fe0f",uc_greedy:"1f9b9-1f3ff-2640",shortnames:[":woman_supervillain_dark_skin_tone:"],category:"people"},":woman_surfing_tone1:":{uc_base:"1f3c4-1f3fb-2640",uc_output:"1f3c4-1f3fb-200d-2640-fe0f",uc_match:"1f3c4-1f3fb-2640-fe0f",uc_greedy:"1f3c4-1f3fb-2640",shortnames:[":woman_surfing_light_skin_tone:"],category:"activity"},":woman_surfing_tone2:":{uc_base:"1f3c4-1f3fc-2640",uc_output:"1f3c4-1f3fc-200d-2640-fe0f",uc_match:"1f3c4-1f3fc-2640-fe0f",uc_greedy:"1f3c4-1f3fc-2640",shortnames:[":woman_surfing_medium_light_skin_tone:"],category:"activity"},":woman_surfing_tone3:":{uc_base:"1f3c4-1f3fd-2640",uc_output:"1f3c4-1f3fd-200d-2640-fe0f",uc_match:"1f3c4-1f3fd-2640-fe0f",uc_greedy:"1f3c4-1f3fd-2640",shortnames:[":woman_surfing_medium_skin_tone:"],category:"activity"},":woman_surfing_tone4:":{uc_base:"1f3c4-1f3fe-2640",uc_output:"1f3c4-1f3fe-200d-2640-fe0f",uc_match:"1f3c4-1f3fe-2640-fe0f",uc_greedy:"1f3c4-1f3fe-2640",shortnames:[":woman_surfing_medium_dark_skin_tone:"],category:"activity"},":woman_surfing_tone5:":{uc_base:"1f3c4-1f3ff-2640",uc_output:"1f3c4-1f3ff-200d-2640-fe0f",uc_match:"1f3c4-1f3ff-2640-fe0f",uc_greedy:"1f3c4-1f3ff-2640",shortnames:[":woman_surfing_dark_skin_tone:"],category:"activity"},":woman_swimming_tone1:":{uc_base:"1f3ca-1f3fb-2640",uc_output:"1f3ca-1f3fb-200d-2640-fe0f",uc_match:"1f3ca-1f3fb-2640-fe0f",uc_greedy:"1f3ca-1f3fb-2640",shortnames:[":woman_swimming_light_skin_tone:"],category:"activity"},":woman_swimming_tone2:":{uc_base:"1f3ca-1f3fc-2640",uc_output:"1f3ca-1f3fc-200d-2640-fe0f",uc_match:"1f3ca-1f3fc-2640-fe0f",uc_greedy:"1f3ca-1f3fc-2640",shortnames:[":woman_swimming_medium_light_skin_tone:"],category:"activity"},":woman_swimming_tone3:":{uc_base:"1f3ca-1f3fd-2640",uc_output:"1f3ca-1f3fd-200d-2640-fe0f",uc_match:"1f3ca-1f3fd-2640-fe0f",uc_greedy:"1f3ca-1f3fd-2640",shortnames:[":woman_swimming_medium_skin_tone:"],category:"activity"},":woman_swimming_tone4:":{uc_base:"1f3ca-1f3fe-2640",uc_output:"1f3ca-1f3fe-200d-2640-fe0f",uc_match:"1f3ca-1f3fe-2640-fe0f",uc_greedy:"1f3ca-1f3fe-2640",shortnames:[":woman_swimming_medium_dark_skin_tone:"],category:"activity"},":woman_swimming_tone5:":{uc_base:"1f3ca-1f3ff-2640",uc_output:"1f3ca-1f3ff-200d-2640-fe0f",uc_match:"1f3ca-1f3ff-2640-fe0f",uc_greedy:"1f3ca-1f3ff-2640",shortnames:[":woman_swimming_dark_skin_tone:"],category:"activity"},":woman_tipping_hand_tone1:":{uc_base:"1f481-1f3fb-2640",uc_output:"1f481-1f3fb-200d-2640-fe0f",uc_match:"1f481-1f3fb-2640-fe0f",uc_greedy:"1f481-1f3fb-2640",shortnames:[":woman_tipping_hand_light_skin_tone:"],category:"people"},":woman_tipping_hand_tone2:":{uc_base:"1f481-1f3fc-2640",uc_output:"1f481-1f3fc-200d-2640-fe0f",uc_match:"1f481-1f3fc-2640-fe0f",uc_greedy:"1f481-1f3fc-2640",shortnames:[":woman_tipping_hand_medium_light_skin_tone:"],category:"people"},":woman_tipping_hand_tone3:":{uc_base:"1f481-1f3fd-2640",uc_output:"1f481-1f3fd-200d-2640-fe0f",uc_match:"1f481-1f3fd-2640-fe0f",uc_greedy:"1f481-1f3fd-2640",shortnames:[":woman_tipping_hand_medium_skin_tone:"],category:"people"},":woman_tipping_hand_tone4:":{uc_base:"1f481-1f3fe-2640",uc_output:"1f481-1f3fe-200d-2640-fe0f",uc_match:"1f481-1f3fe-2640-fe0f",uc_greedy:"1f481-1f3fe-2640",shortnames:[":woman_tipping_hand_medium_dark_skin_tone:"],category:"people"},":woman_tipping_hand_tone5:":{uc_base:"1f481-1f3ff-2640",uc_output:"1f481-1f3ff-200d-2640-fe0f",uc_match:"1f481-1f3ff-2640-fe0f",uc_greedy:"1f481-1f3ff-2640",shortnames:[":woman_tipping_hand_dark_skin_tone:"],category:"people"},":woman_vampire_tone1:":{uc_base:"1f9db-1f3fb-2640",uc_output:"1f9db-1f3fb-200d-2640-fe0f",uc_match:"1f9db-1f3fb-2640-fe0f",uc_greedy:"1f9db-1f3fb-2640",shortnames:[":woman_vampire_light_skin_tone:"],category:"people"},":woman_vampire_tone2:":{uc_base:"1f9db-1f3fc-2640",uc_output:"1f9db-1f3fc-200d-2640-fe0f",uc_match:"1f9db-1f3fc-2640-fe0f",uc_greedy:"1f9db-1f3fc-2640",shortnames:[":woman_vampire_medium_light_skin_tone:"],category:"people"},":woman_vampire_tone3:":{uc_base:"1f9db-1f3fd-2640",uc_output:"1f9db-1f3fd-200d-2640-fe0f",uc_match:"1f9db-1f3fd-2640-fe0f",uc_greedy:"1f9db-1f3fd-2640",shortnames:[":woman_vampire_medium_skin_tone:"],category:"people"},":woman_vampire_tone4:":{uc_base:"1f9db-1f3fe-2640",uc_output:"1f9db-1f3fe-200d-2640-fe0f",uc_match:"1f9db-1f3fe-2640-fe0f",uc_greedy:"1f9db-1f3fe-2640",shortnames:[":woman_vampire_medium_dark_skin_tone:"],category:"people"},":woman_vampire_tone5:":{uc_base:"1f9db-1f3ff-2640",uc_output:"1f9db-1f3ff-200d-2640-fe0f",uc_match:"1f9db-1f3ff-2640-fe0f",uc_greedy:"1f9db-1f3ff-2640",shortnames:[":woman_vampire_dark_skin_tone:"],category:"people"},":woman_walking_tone1:":{uc_base:"1f6b6-1f3fb-2640",uc_output:"1f6b6-1f3fb-200d-2640-fe0f",uc_match:"1f6b6-1f3fb-2640-fe0f",uc_greedy:"1f6b6-1f3fb-2640",shortnames:[":woman_walking_light_skin_tone:"],category:"people"},":woman_walking_tone2:":{uc_base:"1f6b6-1f3fc-2640",uc_output:"1f6b6-1f3fc-200d-2640-fe0f",uc_match:"1f6b6-1f3fc-2640-fe0f",uc_greedy:"1f6b6-1f3fc-2640",shortnames:[":woman_walking_medium_light_skin_tone:"],category:"people"},":woman_walking_tone3:":{uc_base:"1f6b6-1f3fd-2640",uc_output:"1f6b6-1f3fd-200d-2640-fe0f",uc_match:"1f6b6-1f3fd-2640-fe0f",uc_greedy:"1f6b6-1f3fd-2640",shortnames:[":woman_walking_medium_skin_tone:"],category:"people"},":woman_walking_tone4:":{uc_base:"1f6b6-1f3fe-2640",uc_output:"1f6b6-1f3fe-200d-2640-fe0f",uc_match:"1f6b6-1f3fe-2640-fe0f",uc_greedy:"1f6b6-1f3fe-2640",shortnames:[":woman_walking_medium_dark_skin_tone:"],category:"people"},":woman_walking_tone5:":{uc_base:"1f6b6-1f3ff-2640",uc_output:"1f6b6-1f3ff-200d-2640-fe0f",uc_match:"1f6b6-1f3ff-2640-fe0f",uc_greedy:"1f6b6-1f3ff-2640",shortnames:[":woman_walking_dark_skin_tone:"],category:"people"},":woman_wearing_turban_tone1:":{uc_base:"1f473-1f3fb-2640",uc_output:"1f473-1f3fb-200d-2640-fe0f",uc_match:"1f473-1f3fb-2640-fe0f",uc_greedy:"1f473-1f3fb-2640",shortnames:[":woman_wearing_turban_light_skin_tone:"],category:"people"},":woman_wearing_turban_tone2:":{uc_base:"1f473-1f3fc-2640",uc_output:"1f473-1f3fc-200d-2640-fe0f",uc_match:"1f473-1f3fc-2640-fe0f",uc_greedy:"1f473-1f3fc-2640",shortnames:[":woman_wearing_turban_medium_light_skin_tone:"],category:"people"},":woman_wearing_turban_tone3:":{uc_base:"1f473-1f3fd-2640",uc_output:"1f473-1f3fd-200d-2640-fe0f",uc_match:"1f473-1f3fd-2640-fe0f",uc_greedy:"1f473-1f3fd-2640",shortnames:[":woman_wearing_turban_medium_skin_tone:"],category:"people"},":woman_wearing_turban_tone4:":{uc_base:"1f473-1f3fe-2640",uc_output:"1f473-1f3fe-200d-2640-fe0f",uc_match:"1f473-1f3fe-2640-fe0f",uc_greedy:"1f473-1f3fe-2640",shortnames:[":woman_wearing_turban_medium_dark_skin_tone:"],category:"people"},":woman_wearing_turban_tone5:":{uc_base:"1f473-1f3ff-2640",uc_output:"1f473-1f3ff-200d-2640-fe0f",uc_match:"1f473-1f3ff-2640-fe0f",uc_greedy:"1f473-1f3ff-2640",shortnames:[":woman_wearing_turban_dark_skin_tone:"],category:"people"},":man_bouncing_ball_tone1:":{uc_base:"26f9-1f3fb-2642",uc_output:"26f9-1f3fb-200d-2642-fe0f",uc_match:"26f9-fe0f-1f3fb-2642-fe0f",uc_greedy:"26f9-1f3fb-2642",shortnames:[":man_bouncing_ball_light_skin_tone:"],category:"activity"},":man_bouncing_ball_tone2:":{uc_base:"26f9-1f3fc-2642",uc_output:"26f9-1f3fc-200d-2642-fe0f",uc_match:"26f9-fe0f-1f3fc-2642-fe0f",uc_greedy:"26f9-1f3fc-2642",shortnames:[":man_bouncing_ball_medium_light_skin_tone:"],category:"activity"},":man_bouncing_ball_tone3:":{uc_base:"26f9-1f3fd-2642",uc_output:"26f9-1f3fd-200d-2642-fe0f",uc_match:"26f9-fe0f-1f3fd-2642-fe0f",uc_greedy:"26f9-1f3fd-2642",shortnames:[":man_bouncing_ball_medium_skin_tone:"],category:"activity"},":man_bouncing_ball_tone4:":{uc_base:"26f9-1f3fe-2642",uc_output:"26f9-1f3fe-200d-2642-fe0f",uc_match:"26f9-fe0f-1f3fe-2642-fe0f",uc_greedy:"26f9-1f3fe-2642",shortnames:[":man_bouncing_ball_medium_dark_skin_tone:"],category:"activity"},":man_bouncing_ball_tone5:":{uc_base:"26f9-1f3ff-2642",uc_output:"26f9-1f3ff-200d-2642-fe0f",uc_match:"26f9-fe0f-1f3ff-2642-fe0f",uc_greedy:"26f9-1f3ff-2642",shortnames:[":man_bouncing_ball_dark_skin_tone:"],category:"activity"},":man_detective:":{uc_base:"1f575-2642",uc_output:"1f575-fe0f-200d-2642-fe0f",uc_match:"1f575-fe0f-200d-2642",uc_greedy:"1f575-2642",shortnames:[],category:"people"},":man_golfing:":{uc_base:"1f3cc-2642",uc_output:"1f3cc-fe0f-200d-2642-fe0f",uc_match:"1f3cc-fe0f-200d-2642",uc_greedy:"1f3cc-2642",shortnames:[],category:"activity"},":man_lifting_weights:":{uc_base:"1f3cb-2642",uc_output:"1f3cb-fe0f-200d-2642-fe0f",uc_match:"1f3cb-fe0f-200d-2642",uc_greedy:"1f3cb-2642",shortnames:[],category:"activity"},":woman_bouncing_ball_tone1:":{uc_base:"26f9-1f3fb-2640",uc_output:"26f9-1f3fb-200d-2640-fe0f",uc_match:"26f9-fe0f-1f3fb-2640-fe0f",uc_greedy:"26f9-1f3fb-2640",shortnames:[":woman_bouncing_ball_light_skin_tone:"],category:"activity"},":woman_bouncing_ball_tone2:":{uc_base:"26f9-1f3fc-2640",uc_output:"26f9-1f3fc-200d-2640-fe0f",uc_match:"26f9-fe0f-1f3fc-2640-fe0f",uc_greedy:"26f9-1f3fc-2640",shortnames:[":woman_bouncing_ball_medium_light_skin_tone:"],category:"activity"},":woman_bouncing_ball_tone3:":{uc_base:"26f9-1f3fd-2640",uc_output:"26f9-1f3fd-200d-2640-fe0f",uc_match:"26f9-fe0f-1f3fd-2640-fe0f",uc_greedy:"26f9-1f3fd-2640",shortnames:[":woman_bouncing_ball_medium_skin_tone:"],category:"activity"},":woman_bouncing_ball_tone4:":{uc_base:"26f9-1f3fe-2640",uc_output:"26f9-1f3fe-200d-2640-fe0f",uc_match:"26f9-fe0f-1f3fe-2640-fe0f",uc_greedy:"26f9-1f3fe-2640",shortnames:[":woman_bouncing_ball_medium_dark_skin_tone:"],category:"activity"},":woman_bouncing_ball_tone5:":{uc_base:"26f9-1f3ff-2640",uc_output:"26f9-1f3ff-200d-2640-fe0f",uc_match:"26f9-fe0f-1f3ff-2640-fe0f",uc_greedy:"26f9-1f3ff-2640",shortnames:[":woman_bouncing_ball_dark_skin_tone:"],category:"activity"},":woman_detective:":{uc_base:"1f575-2640",uc_output:"1f575-fe0f-200d-2640-fe0f",uc_match:"1f575-fe0f-200d-2640",uc_greedy:"1f575-2640",shortnames:[],category:"people"},":woman_golfing:":{uc_base:"1f3cc-2640",uc_output:"1f3cc-fe0f-200d-2640-fe0f",uc_match:"1f3cc-fe0f-200d-2640",uc_greedy:"1f3cc-2640",shortnames:[],category:"activity"},":woman_lifting_weights:":{uc_base:"1f3cb-2640",uc_output:"1f3cb-fe0f-200d-2640-fe0f",uc_match:"1f3cb-fe0f-200d-2640",uc_greedy:"1f3cb-2640",shortnames:[],category:"activity"},":man_bouncing_ball:":{uc_base:"26f9-2642",uc_output:"26f9-fe0f-200d-2642-fe0f",uc_match:"26f9-fe0f-200d-2642",uc_greedy:"26f9-2642",shortnames:[],category:"activity"},":woman_bouncing_ball:":{uc_base:"26f9-2640",uc_output:"26f9-fe0f-200d-2640-fe0f",uc_match:"26f9-fe0f-200d-2640",uc_greedy:"26f9-2640",shortnames:[],category:"activity"},":man_artist_tone1:":{uc_base:"1f468-1f3fb-1f3a8",uc_output:"1f468-1f3fb-200d-1f3a8",uc_match:"1f468-1f3fb-1f3a8",uc_greedy:"1f468-1f3fb-1f3a8",shortnames:[":man_artist_light_skin_tone:"],category:"people"},":man_artist_tone2:":{uc_base:"1f468-1f3fc-1f3a8",uc_output:"1f468-1f3fc-200d-1f3a8",uc_match:"1f468-1f3fc-1f3a8",uc_greedy:"1f468-1f3fc-1f3a8",shortnames:[":man_artist_medium_light_skin_tone:"],category:"people"},":man_artist_tone3:":{uc_base:"1f468-1f3fd-1f3a8",uc_output:"1f468-1f3fd-200d-1f3a8",uc_match:"1f468-1f3fd-1f3a8",uc_greedy:"1f468-1f3fd-1f3a8",shortnames:[":man_artist_medium_skin_tone:"],category:"people"},":man_artist_tone4:":{uc_base:"1f468-1f3fe-1f3a8",uc_output:"1f468-1f3fe-200d-1f3a8",uc_match:"1f468-1f3fe-1f3a8",uc_greedy:"1f468-1f3fe-1f3a8",shortnames:[":man_artist_medium_dark_skin_tone:"],category:"people"},":man_artist_tone5:":{uc_base:"1f468-1f3ff-1f3a8",uc_output:"1f468-1f3ff-200d-1f3a8",uc_match:"1f468-1f3ff-1f3a8",uc_greedy:"1f468-1f3ff-1f3a8",shortnames:[":man_artist_dark_skin_tone:"],category:"people"},":man_astronaut_tone1:":{uc_base:"1f468-1f3fb-1f680",uc_output:"1f468-1f3fb-200d-1f680",uc_match:"1f468-1f3fb-1f680",uc_greedy:"1f468-1f3fb-1f680",shortnames:[":man_astronaut_light_skin_tone:"],category:"people"},":man_astronaut_tone2:":{uc_base:"1f468-1f3fc-1f680",uc_output:"1f468-1f3fc-200d-1f680",uc_match:"1f468-1f3fc-1f680",uc_greedy:"1f468-1f3fc-1f680",shortnames:[":man_astronaut_medium_light_skin_tone:"],category:"people"},":man_astronaut_tone3:":{uc_base:"1f468-1f3fd-1f680",uc_output:"1f468-1f3fd-200d-1f680",uc_match:"1f468-1f3fd-1f680",uc_greedy:"1f468-1f3fd-1f680",shortnames:[":man_astronaut_medium_skin_tone:"],category:"people"},":man_astronaut_tone4:":{uc_base:"1f468-1f3fe-1f680",uc_output:"1f468-1f3fe-200d-1f680",uc_match:"1f468-1f3fe-1f680",uc_greedy:"1f468-1f3fe-1f680",shortnames:[":man_astronaut_medium_dark_skin_tone:"],category:"people"},":man_astronaut_tone5:":{uc_base:"1f468-1f3ff-1f680",uc_output:"1f468-1f3ff-200d-1f680",uc_match:"1f468-1f3ff-1f680",uc_greedy:"1f468-1f3ff-1f680",shortnames:[":man_astronaut_dark_skin_tone:"],category:"people"},":man_bald_tone1:":{uc_base:"1f468-1f3fb-1f9b2",uc_output:"1f468-1f3fb-200d-1f9b2",uc_match:"1f468-1f3fb-1f9b2",uc_greedy:"1f468-1f3fb-1f9b2",shortnames:[":man_bald_light_skin_tone:"],category:"people"},":man_bald_tone2:":{uc_base:"1f468-1f3fc-1f9b2",uc_output:"1f468-1f3fc-200d-1f9b2",uc_match:"1f468-1f3fc-1f9b2",uc_greedy:"1f468-1f3fc-1f9b2",shortnames:[":man_bald_medium_light_skin_tone:"],category:"people"},":man_bald_tone3:":{uc_base:"1f468-1f3fd-1f9b2",uc_output:"1f468-1f3fd-200d-1f9b2",uc_match:"1f468-1f3fd-1f9b2",uc_greedy:"1f468-1f3fd-1f9b2",shortnames:[":man_bald_medium_skin_tone:"],category:"people"},":man_bald_tone4:":{uc_base:"1f468-1f3fe-1f9b2",uc_output:"1f468-1f3fe-200d-1f9b2",uc_match:"1f468-1f3fe-1f9b2",uc_greedy:"1f468-1f3fe-1f9b2",shortnames:[":man_bald_medium_dark_skin_tone:"],category:"people"},":man_bald_tone5:":{uc_base:"1f468-1f3ff-1f9b2",uc_output:"1f468-1f3ff-200d-1f9b2",uc_match:"1f468-1f3ff-1f9b2",uc_greedy:"1f468-1f3ff-1f9b2",shortnames:[":man_bald_dark_skin_tone:"],category:"people"},":man_cook_tone1:":{uc_base:"1f468-1f3fb-1f373",uc_output:"1f468-1f3fb-200d-1f373",uc_match:"1f468-1f3fb-1f373",uc_greedy:"1f468-1f3fb-1f373",shortnames:[":man_cook_light_skin_tone:"],category:"people"},":man_cook_tone2:":{uc_base:"1f468-1f3fc-1f373",uc_output:"1f468-1f3fc-200d-1f373",uc_match:"1f468-1f3fc-1f373",uc_greedy:"1f468-1f3fc-1f373",shortnames:[":man_cook_medium_light_skin_tone:"],category:"people"},":man_cook_tone3:":{uc_base:"1f468-1f3fd-1f373",uc_output:"1f468-1f3fd-200d-1f373",uc_match:"1f468-1f3fd-1f373",uc_greedy:"1f468-1f3fd-1f373",shortnames:[":man_cook_medium_skin_tone:"],category:"people"},":man_cook_tone4:":{uc_base:"1f468-1f3fe-1f373",uc_output:"1f468-1f3fe-200d-1f373",uc_match:"1f468-1f3fe-1f373",uc_greedy:"1f468-1f3fe-1f373",shortnames:[":man_cook_medium_dark_skin_tone:"],category:"people"},":man_cook_tone5:":{uc_base:"1f468-1f3ff-1f373",uc_output:"1f468-1f3ff-200d-1f373",uc_match:"1f468-1f3ff-1f373",uc_greedy:"1f468-1f3ff-1f373",shortnames:[":man_cook_dark_skin_tone:"],category:"people"},":man_curly_haired_tone1:":{uc_base:"1f468-1f3fb-1f9b1",uc_output:"1f468-1f3fb-200d-1f9b1",uc_match:"1f468-1f3fb-1f9b1",uc_greedy:"1f468-1f3fb-1f9b1",shortnames:[":man_curly_haired_light_skin_tone:"],category:"people"},":man_curly_haired_tone2:":{uc_base:"1f468-1f3fc-1f9b1",uc_output:"1f468-1f3fc-200d-1f9b1",uc_match:"1f468-1f3fc-1f9b1",uc_greedy:"1f468-1f3fc-1f9b1",shortnames:[":man_curly_haired_medium_light_skin_tone:"],category:"people"},":man_curly_haired_tone3:":{uc_base:"1f468-1f3fd-1f9b1",uc_output:"1f468-1f3fd-200d-1f9b1",uc_match:"1f468-1f3fd-1f9b1",uc_greedy:"1f468-1f3fd-1f9b1",shortnames:[":man_curly_haired_medium_skin_tone:"],category:"people"},":man_curly_haired_tone4:":{uc_base:"1f468-1f3fe-1f9b1",uc_output:"1f468-1f3fe-200d-1f9b1",uc_match:"1f468-1f3fe-1f9b1",uc_greedy:"1f468-1f3fe-1f9b1",shortnames:[":man_curly_haired_medium_dark_skin_tone:"],category:"people"},":man_curly_haired_tone5:":{uc_base:"1f468-1f3ff-1f9b1",uc_output:"1f468-1f3ff-200d-1f9b1",uc_match:"1f468-1f3ff-1f9b1",uc_greedy:"1f468-1f3ff-1f9b1",shortnames:[":man_curly_haired_dark_skin_tone:"],category:"people"},":man_factory_worker_tone1:":{uc_base:"1f468-1f3fb-1f3ed",uc_output:"1f468-1f3fb-200d-1f3ed",uc_match:"1f468-1f3fb-1f3ed",uc_greedy:"1f468-1f3fb-1f3ed",shortnames:[":man_factory_worker_light_skin_tone:"],category:"people"},":man_factory_worker_tone2:":{uc_base:"1f468-1f3fc-1f3ed",uc_output:"1f468-1f3fc-200d-1f3ed",uc_match:"1f468-1f3fc-1f3ed",uc_greedy:"1f468-1f3fc-1f3ed",shortnames:[":man_factory_worker_medium_light_skin_tone:"],category:"people"},":man_factory_worker_tone3:":{uc_base:"1f468-1f3fd-1f3ed",uc_output:"1f468-1f3fd-200d-1f3ed",uc_match:"1f468-1f3fd-1f3ed",uc_greedy:"1f468-1f3fd-1f3ed",shortnames:[":man_factory_worker_medium_skin_tone:"],category:"people"},":man_factory_worker_tone4:":{uc_base:"1f468-1f3fe-1f3ed",uc_output:"1f468-1f3fe-200d-1f3ed",uc_match:"1f468-1f3fe-1f3ed",uc_greedy:"1f468-1f3fe-1f3ed",shortnames:[":man_factory_worker_medium_dark_skin_tone:"],category:"people"},":man_factory_worker_tone5:":{uc_base:"1f468-1f3ff-1f3ed",uc_output:"1f468-1f3ff-200d-1f3ed",uc_match:"1f468-1f3ff-1f3ed",uc_greedy:"1f468-1f3ff-1f3ed",shortnames:[":man_factory_worker_dark_skin_tone:"],category:"people"},":man_farmer_tone1:":{uc_base:"1f468-1f3fb-1f33e",uc_output:"1f468-1f3fb-200d-1f33e",uc_match:"1f468-1f3fb-1f33e",uc_greedy:"1f468-1f3fb-1f33e",shortnames:[":man_farmer_light_skin_tone:"],category:"people"},":man_farmer_tone2:":{uc_base:"1f468-1f3fc-1f33e",uc_output:"1f468-1f3fc-200d-1f33e",uc_match:"1f468-1f3fc-1f33e",uc_greedy:"1f468-1f3fc-1f33e",shortnames:[":man_farmer_medium_light_skin_tone:"],category:"people"},":man_farmer_tone3:":{uc_base:"1f468-1f3fd-1f33e",uc_output:"1f468-1f3fd-200d-1f33e",uc_match:"1f468-1f3fd-1f33e",uc_greedy:"1f468-1f3fd-1f33e",shortnames:[":man_farmer_medium_skin_tone:"],category:"people"},":man_farmer_tone4:":{uc_base:"1f468-1f3fe-1f33e",uc_output:"1f468-1f3fe-200d-1f33e",uc_match:"1f468-1f3fe-1f33e",uc_greedy:"1f468-1f3fe-1f33e",shortnames:[":man_farmer_medium_dark_skin_tone:"],category:"people"},":man_farmer_tone5:":{uc_base:"1f468-1f3ff-1f33e",uc_output:"1f468-1f3ff-200d-1f33e",uc_match:"1f468-1f3ff-1f33e",uc_greedy:"1f468-1f3ff-1f33e",shortnames:[":man_farmer_dark_skin_tone:"],category:"people"},":man_firefighter_tone1:":{uc_base:"1f468-1f3fb-1f692",uc_output:"1f468-1f3fb-200d-1f692",uc_match:"1f468-1f3fb-1f692",uc_greedy:"1f468-1f3fb-1f692",shortnames:[":man_firefighter_light_skin_tone:"],category:"people"},":man_firefighter_tone2:":{uc_base:"1f468-1f3fc-1f692",uc_output:"1f468-1f3fc-200d-1f692",uc_match:"1f468-1f3fc-1f692",uc_greedy:"1f468-1f3fc-1f692",shortnames:[":man_firefighter_medium_light_skin_tone:"],category:"people"},":man_firefighter_tone3:":{uc_base:"1f468-1f3fd-1f692",uc_output:"1f468-1f3fd-200d-1f692",uc_match:"1f468-1f3fd-1f692",uc_greedy:"1f468-1f3fd-1f692",shortnames:[":man_firefighter_medium_skin_tone:"],category:"people"},":man_firefighter_tone4:":{uc_base:"1f468-1f3fe-1f692",uc_output:"1f468-1f3fe-200d-1f692",uc_match:"1f468-1f3fe-1f692",uc_greedy:"1f468-1f3fe-1f692",shortnames:[":man_firefighter_medium_dark_skin_tone:"],category:"people"},":man_firefighter_tone5:":{uc_base:"1f468-1f3ff-1f692",uc_output:"1f468-1f3ff-200d-1f692",uc_match:"1f468-1f3ff-1f692",uc_greedy:"1f468-1f3ff-1f692",shortnames:[":man_firefighter_dark_skin_tone:"],category:"people"},":man_mechanic_tone1:":{uc_base:"1f468-1f3fb-1f527",uc_output:"1f468-1f3fb-200d-1f527",uc_match:"1f468-1f3fb-1f527",uc_greedy:"1f468-1f3fb-1f527",shortnames:[":man_mechanic_light_skin_tone:"],category:"people"},":man_mechanic_tone2:":{uc_base:"1f468-1f3fc-1f527",uc_output:"1f468-1f3fc-200d-1f527",uc_match:"1f468-1f3fc-1f527",uc_greedy:"1f468-1f3fc-1f527",shortnames:[":man_mechanic_medium_light_skin_tone:"],category:"people"},":man_mechanic_tone3:":{uc_base:"1f468-1f3fd-1f527",uc_output:"1f468-1f3fd-200d-1f527",uc_match:"1f468-1f3fd-1f527",uc_greedy:"1f468-1f3fd-1f527",shortnames:[":man_mechanic_medium_skin_tone:"],category:"people"},":man_mechanic_tone4:":{uc_base:"1f468-1f3fe-1f527",uc_output:"1f468-1f3fe-200d-1f527",uc_match:"1f468-1f3fe-1f527",uc_greedy:"1f468-1f3fe-1f527",shortnames:[":man_mechanic_medium_dark_skin_tone:"],category:"people"},":man_mechanic_tone5:":{uc_base:"1f468-1f3ff-1f527",uc_output:"1f468-1f3ff-200d-1f527",uc_match:"1f468-1f3ff-1f527",uc_greedy:"1f468-1f3ff-1f527",shortnames:[":man_mechanic_dark_skin_tone:"],category:"people"},":man_office_worker_tone1:":{uc_base:"1f468-1f3fb-1f4bc",uc_output:"1f468-1f3fb-200d-1f4bc",uc_match:"1f468-1f3fb-1f4bc",uc_greedy:"1f468-1f3fb-1f4bc",shortnames:[":man_office_worker_light_skin_tone:"],category:"people"},":man_office_worker_tone2:":{uc_base:"1f468-1f3fc-1f4bc",uc_output:"1f468-1f3fc-200d-1f4bc",uc_match:"1f468-1f3fc-1f4bc",uc_greedy:"1f468-1f3fc-1f4bc",shortnames:[":man_office_worker_medium_light_skin_tone:"],category:"people"},":man_office_worker_tone3:":{uc_base:"1f468-1f3fd-1f4bc",uc_output:"1f468-1f3fd-200d-1f4bc",uc_match:"1f468-1f3fd-1f4bc",uc_greedy:"1f468-1f3fd-1f4bc",shortnames:[":man_office_worker_medium_skin_tone:"],category:"people"},":man_office_worker_tone4:":{uc_base:"1f468-1f3fe-1f4bc",uc_output:"1f468-1f3fe-200d-1f4bc",uc_match:"1f468-1f3fe-1f4bc",uc_greedy:"1f468-1f3fe-1f4bc",shortnames:[":man_office_worker_medium_dark_skin_tone:"],category:"people"},":man_office_worker_tone5:":{uc_base:"1f468-1f3ff-1f4bc",uc_output:"1f468-1f3ff-200d-1f4bc",uc_match:"1f468-1f3ff-1f4bc",uc_greedy:"1f468-1f3ff-1f4bc",shortnames:[":man_office_worker_dark_skin_tone:"],category:"people"},":man_red_haired_tone1:":{uc_base:"1f468-1f3fb-1f9b0",uc_output:"1f468-1f3fb-200d-1f9b0",uc_match:"1f468-1f3fb-1f9b0",uc_greedy:"1f468-1f3fb-1f9b0",shortnames:[":man_red_haired_light_skin_tone:"],category:"people"},":man_red_haired_tone2:":{uc_base:"1f468-1f3fc-1f9b0",uc_output:"1f468-1f3fc-200d-1f9b0",uc_match:"1f468-1f3fc-1f9b0",uc_greedy:"1f468-1f3fc-1f9b0",shortnames:[":man_red_haired_medium_light_skin_tone:"],category:"people"},":man_red_haired_tone3:":{uc_base:"1f468-1f3fd-1f9b0",uc_output:"1f468-1f3fd-200d-1f9b0",uc_match:"1f468-1f3fd-1f9b0",uc_greedy:"1f468-1f3fd-1f9b0",shortnames:[":man_red_haired_medium_skin_tone:"],category:"people"},":man_red_haired_tone4:":{uc_base:"1f468-1f3fe-1f9b0",uc_output:"1f468-1f3fe-200d-1f9b0",uc_match:"1f468-1f3fe-1f9b0",uc_greedy:"1f468-1f3fe-1f9b0",shortnames:[":man_red_haired_medium_dark_skin_tone:"],category:"people"},":man_red_haired_tone5:":{uc_base:"1f468-1f3ff-1f9b0",uc_output:"1f468-1f3ff-200d-1f9b0",uc_match:"1f468-1f3ff-1f9b0",uc_greedy:"1f468-1f3ff-1f9b0",shortnames:[":man_red_haired_dark_skin_tone:"],category:"people"},":man_scientist_tone1:":{uc_base:"1f468-1f3fb-1f52c",uc_output:"1f468-1f3fb-200d-1f52c",uc_match:"1f468-1f3fb-1f52c",uc_greedy:"1f468-1f3fb-1f52c",shortnames:[":man_scientist_light_skin_tone:"],category:"people"},":man_scientist_tone2:":{uc_base:"1f468-1f3fc-1f52c",uc_output:"1f468-1f3fc-200d-1f52c",uc_match:"1f468-1f3fc-1f52c",uc_greedy:"1f468-1f3fc-1f52c",shortnames:[":man_scientist_medium_light_skin_tone:"],category:"people"},":man_scientist_tone3:":{uc_base:"1f468-1f3fd-1f52c",uc_output:"1f468-1f3fd-200d-1f52c",uc_match:"1f468-1f3fd-1f52c",uc_greedy:"1f468-1f3fd-1f52c",shortnames:[":man_scientist_medium_skin_tone:"],category:"people"},":man_scientist_tone4:":{uc_base:"1f468-1f3fe-1f52c",uc_output:"1f468-1f3fe-200d-1f52c",uc_match:"1f468-1f3fe-1f52c",uc_greedy:"1f468-1f3fe-1f52c",shortnames:[":man_scientist_medium_dark_skin_tone:"],category:"people"},":man_scientist_tone5:":{uc_base:"1f468-1f3ff-1f52c",uc_output:"1f468-1f3ff-200d-1f52c",uc_match:"1f468-1f3ff-1f52c",uc_greedy:"1f468-1f3ff-1f52c",shortnames:[":man_scientist_dark_skin_tone:"],category:"people"},":man_singer_tone1:":{uc_base:"1f468-1f3fb-1f3a4",uc_output:"1f468-1f3fb-200d-1f3a4",uc_match:"1f468-1f3fb-1f3a4",uc_greedy:"1f468-1f3fb-1f3a4",shortnames:[":man_singer_light_skin_tone:"],category:"people"},":man_singer_tone2:":{uc_base:"1f468-1f3fc-1f3a4",uc_output:"1f468-1f3fc-200d-1f3a4",uc_match:"1f468-1f3fc-1f3a4",uc_greedy:"1f468-1f3fc-1f3a4",shortnames:[":man_singer_medium_light_skin_tone:"],category:"people"},":man_singer_tone3:":{uc_base:"1f468-1f3fd-1f3a4",uc_output:"1f468-1f3fd-200d-1f3a4",uc_match:"1f468-1f3fd-1f3a4",uc_greedy:"1f468-1f3fd-1f3a4",shortnames:[":man_singer_medium_skin_tone:"],category:"people"},":man_singer_tone4:":{uc_base:"1f468-1f3fe-1f3a4",uc_output:"1f468-1f3fe-200d-1f3a4",uc_match:"1f468-1f3fe-1f3a4",uc_greedy:"1f468-1f3fe-1f3a4",shortnames:[":man_singer_medium_dark_skin_tone:"],category:"people"},":man_singer_tone5:":{uc_base:"1f468-1f3ff-1f3a4",uc_output:"1f468-1f3ff-200d-1f3a4",uc_match:"1f468-1f3ff-1f3a4",uc_greedy:"1f468-1f3ff-1f3a4",shortnames:[":man_singer_dark_skin_tone:"],category:"people"},":man_student_tone1:":{uc_base:"1f468-1f3fb-1f393",uc_output:"1f468-1f3fb-200d-1f393",uc_match:"1f468-1f3fb-1f393",uc_greedy:"1f468-1f3fb-1f393",shortnames:[":man_student_light_skin_tone:"],category:"people"},":man_student_tone2:":{uc_base:"1f468-1f3fc-1f393",uc_output:"1f468-1f3fc-200d-1f393",uc_match:"1f468-1f3fc-1f393",uc_greedy:"1f468-1f3fc-1f393",shortnames:[":man_student_medium_light_skin_tone:"],category:"people"},":man_student_tone3:":{uc_base:"1f468-1f3fd-1f393",uc_output:"1f468-1f3fd-200d-1f393",uc_match:"1f468-1f3fd-1f393",uc_greedy:"1f468-1f3fd-1f393",shortnames:[":man_student_medium_skin_tone:"],category:"people"},":man_student_tone4:":{uc_base:"1f468-1f3fe-1f393",uc_output:"1f468-1f3fe-200d-1f393",uc_match:"1f468-1f3fe-1f393",uc_greedy:"1f468-1f3fe-1f393",shortnames:[":man_student_medium_dark_skin_tone:"],category:"people"},":man_student_tone5:":{uc_base:"1f468-1f3ff-1f393",uc_output:"1f468-1f3ff-200d-1f393",uc_match:"1f468-1f3ff-1f393",uc_greedy:"1f468-1f3ff-1f393",shortnames:[":man_student_dark_skin_tone:"],category:"people"},":man_teacher_tone1:":{uc_base:"1f468-1f3fb-1f3eb",uc_output:"1f468-1f3fb-200d-1f3eb",uc_match:"1f468-1f3fb-1f3eb",uc_greedy:"1f468-1f3fb-1f3eb",shortnames:[":man_teacher_light_skin_tone:"],category:"people"},":man_teacher_tone2:":{uc_base:"1f468-1f3fc-1f3eb",uc_output:"1f468-1f3fc-200d-1f3eb",uc_match:"1f468-1f3fc-1f3eb",uc_greedy:"1f468-1f3fc-1f3eb",shortnames:[":man_teacher_medium_light_skin_tone:"],category:"people"},":man_teacher_tone3:":{uc_base:"1f468-1f3fd-1f3eb",uc_output:"1f468-1f3fd-200d-1f3eb",uc_match:"1f468-1f3fd-1f3eb",uc_greedy:"1f468-1f3fd-1f3eb",shortnames:[":man_teacher_medium_skin_tone:"],category:"people"},":man_teacher_tone4:":{uc_base:"1f468-1f3fe-1f3eb",uc_output:"1f468-1f3fe-200d-1f3eb",uc_match:"1f468-1f3fe-1f3eb",uc_greedy:"1f468-1f3fe-1f3eb",shortnames:[":man_teacher_medium_dark_skin_tone:"],category:"people"},":man_teacher_tone5:":{uc_base:"1f468-1f3ff-1f3eb",uc_output:"1f468-1f3ff-200d-1f3eb",uc_match:"1f468-1f3ff-1f3eb",uc_greedy:"1f468-1f3ff-1f3eb",shortnames:[":man_teacher_dark_skin_tone:"],category:"people"},":man_technologist_tone1:":{uc_base:"1f468-1f3fb-1f4bb",uc_output:"1f468-1f3fb-200d-1f4bb",uc_match:"1f468-1f3fb-1f4bb",uc_greedy:"1f468-1f3fb-1f4bb",shortnames:[":man_technologist_light_skin_tone:"],category:"people"},":man_technologist_tone2:":{uc_base:"1f468-1f3fc-1f4bb",uc_output:"1f468-1f3fc-200d-1f4bb",uc_match:"1f468-1f3fc-1f4bb",uc_greedy:"1f468-1f3fc-1f4bb",shortnames:[":man_technologist_medium_light_skin_tone:"],category:"people"},":man_technologist_tone3:":{uc_base:"1f468-1f3fd-1f4bb",uc_output:"1f468-1f3fd-200d-1f4bb",uc_match:"1f468-1f3fd-1f4bb",uc_greedy:"1f468-1f3fd-1f4bb",shortnames:[":man_technologist_medium_skin_tone:"],category:"people"},":man_technologist_tone4:":{uc_base:"1f468-1f3fe-1f4bb",uc_output:"1f468-1f3fe-200d-1f4bb",uc_match:"1f468-1f3fe-1f4bb",uc_greedy:"1f468-1f3fe-1f4bb",shortnames:[":man_technologist_medium_dark_skin_tone:"],category:"people"},":man_technologist_tone5:":{uc_base:"1f468-1f3ff-1f4bb",uc_output:"1f468-1f3ff-200d-1f4bb",uc_match:"1f468-1f3ff-1f4bb",uc_greedy:"1f468-1f3ff-1f4bb",shortnames:[":man_technologist_dark_skin_tone:"],category:"people"},":man_white_haired_tone1:":{uc_base:"1f468-1f3fb-1f9b3",uc_output:"1f468-1f3fb-200d-1f9b3",uc_match:"1f468-1f3fb-1f9b3",uc_greedy:"1f468-1f3fb-1f9b3",shortnames:[":man_white_haired_light_skin_tone:"],category:"people"},":man_white_haired_tone2:":{uc_base:"1f468-1f3fc-1f9b3",uc_output:"1f468-1f3fc-200d-1f9b3",uc_match:"1f468-1f3fc-1f9b3",uc_greedy:"1f468-1f3fc-1f9b3",shortnames:[":man_white_haired_medium_light_skin_tone:"],category:"people"},":man_white_haired_tone3:":{uc_base:"1f468-1f3fd-1f9b3",uc_output:"1f468-1f3fd-200d-1f9b3",uc_match:"1f468-1f3fd-1f9b3",uc_greedy:"1f468-1f3fd-1f9b3",shortnames:[":man_white_haired_medium_skin_tone:"],category:"people"},":man_white_haired_tone4:":{uc_base:"1f468-1f3fe-1f9b3",uc_output:"1f468-1f3fe-200d-1f9b3",uc_match:"1f468-1f3fe-1f9b3",uc_greedy:"1f468-1f3fe-1f9b3",shortnames:[":man_white_haired_medium_dark_skin_tone:"],category:"people"},":man_white_haired_tone5:":{uc_base:"1f468-1f3ff-1f9b3",uc_output:"1f468-1f3ff-200d-1f9b3",uc_match:"1f468-1f3ff-1f9b3",uc_greedy:"1f468-1f3ff-1f9b3",shortnames:[":man_white_haired_dark_skin_tone:"],category:"people"},":woman_artist_tone1:":{uc_base:"1f469-1f3fb-1f3a8",uc_output:"1f469-1f3fb-200d-1f3a8",uc_match:"1f469-1f3fb-1f3a8",uc_greedy:"1f469-1f3fb-1f3a8",shortnames:[":woman_artist_light_skin_tone:"],category:"people"},":woman_artist_tone2:":{uc_base:"1f469-1f3fc-1f3a8",uc_output:"1f469-1f3fc-200d-1f3a8",uc_match:"1f469-1f3fc-1f3a8",uc_greedy:"1f469-1f3fc-1f3a8",shortnames:[":woman_artist_medium_light_skin_tone:"],category:"people"},":woman_artist_tone3:":{uc_base:"1f469-1f3fd-1f3a8",uc_output:"1f469-1f3fd-200d-1f3a8",uc_match:"1f469-1f3fd-1f3a8",uc_greedy:"1f469-1f3fd-1f3a8",shortnames:[":woman_artist_medium_skin_tone:"],category:"people"},":woman_artist_tone4:":{uc_base:"1f469-1f3fe-1f3a8",uc_output:"1f469-1f3fe-200d-1f3a8",uc_match:"1f469-1f3fe-1f3a8",uc_greedy:"1f469-1f3fe-1f3a8",shortnames:[":woman_artist_medium_dark_skin_tone:"],category:"people"},":woman_artist_tone5:":{uc_base:"1f469-1f3ff-1f3a8",uc_output:"1f469-1f3ff-200d-1f3a8",uc_match:"1f469-1f3ff-1f3a8",uc_greedy:"1f469-1f3ff-1f3a8",shortnames:[":woman_artist_dark_skin_tone:"],category:"people"},":woman_astronaut_tone1:":{uc_base:"1f469-1f3fb-1f680",uc_output:"1f469-1f3fb-200d-1f680",uc_match:"1f469-1f3fb-1f680",uc_greedy:"1f469-1f3fb-1f680",shortnames:[":woman_astronaut_light_skin_tone:"],category:"people"},":woman_astronaut_tone2:":{uc_base:"1f469-1f3fc-1f680",uc_output:"1f469-1f3fc-200d-1f680",uc_match:"1f469-1f3fc-1f680",uc_greedy:"1f469-1f3fc-1f680",shortnames:[":woman_astronaut_medium_light_skin_tone:"],category:"people"},":woman_astronaut_tone3:":{uc_base:"1f469-1f3fd-1f680",uc_output:"1f469-1f3fd-200d-1f680",uc_match:"1f469-1f3fd-1f680",uc_greedy:"1f469-1f3fd-1f680",shortnames:[":woman_astronaut_medium_skin_tone:"],category:"people"},":woman_astronaut_tone4:":{uc_base:"1f469-1f3fe-1f680",uc_output:"1f469-1f3fe-200d-1f680",uc_match:"1f469-1f3fe-1f680",uc_greedy:"1f469-1f3fe-1f680",shortnames:[":woman_astronaut_medium_dark_skin_tone:"],category:"people"},":woman_astronaut_tone5:":{uc_base:"1f469-1f3ff-1f680",uc_output:"1f469-1f3ff-200d-1f680",uc_match:"1f469-1f3ff-1f680",uc_greedy:"1f469-1f3ff-1f680",shortnames:[":woman_astronaut_dark_skin_tone:"],category:"people"},":woman_bald_tone1:":{uc_base:"1f469-1f3fb-1f9b2",uc_output:"1f469-1f3fb-200d-1f9b2",uc_match:"1f469-1f3fb-1f9b2",uc_greedy:"1f469-1f3fb-1f9b2",shortnames:[":woman_bald_light_skin_tone:"],category:"people"},":woman_bald_tone2:":{uc_base:"1f469-1f3fc-1f9b2",uc_output:"1f469-1f3fc-200d-1f9b2",uc_match:"1f469-1f3fc-1f9b2",uc_greedy:"1f469-1f3fc-1f9b2",shortnames:[":woman_bald_medium_light_skin_tone:"],category:"people"},":woman_bald_tone3:":{uc_base:"1f469-1f3fd-1f9b2",uc_output:"1f469-1f3fd-200d-1f9b2",uc_match:"1f469-1f3fd-1f9b2",uc_greedy:"1f469-1f3fd-1f9b2",shortnames:[":woman_bald_medium_skin_tone:"],category:"people"},":woman_bald_tone4:":{uc_base:"1f469-1f3fe-1f9b2",uc_output:"1f469-1f3fe-200d-1f9b2",uc_match:"1f469-1f3fe-1f9b2",uc_greedy:"1f469-1f3fe-1f9b2",shortnames:[":woman_bald_medium_dark_skin_tone:"],category:"people"},":woman_bald_tone5:":{uc_base:"1f469-1f3ff-1f9b2",uc_output:"1f469-1f3ff-200d-1f9b2",uc_match:"1f469-1f3ff-1f9b2",uc_greedy:"1f469-1f3ff-1f9b2",shortnames:[":woman_bald_dark_skin_tone:"],category:"people"},":woman_cook_tone1:":{uc_base:"1f469-1f3fb-1f373",uc_output:"1f469-1f3fb-200d-1f373",uc_match:"1f469-1f3fb-1f373",uc_greedy:"1f469-1f3fb-1f373",shortnames:[":woman_cook_light_skin_tone:"],category:"people"},":woman_cook_tone2:":{uc_base:"1f469-1f3fc-1f373",uc_output:"1f469-1f3fc-200d-1f373",uc_match:"1f469-1f3fc-1f373",uc_greedy:"1f469-1f3fc-1f373",shortnames:[":woman_cook_medium_light_skin_tone:"],category:"people"},":woman_cook_tone3:":{uc_base:"1f469-1f3fd-1f373",uc_output:"1f469-1f3fd-200d-1f373",uc_match:"1f469-1f3fd-1f373",uc_greedy:"1f469-1f3fd-1f373",shortnames:[":woman_cook_medium_skin_tone:"],category:"people"},":woman_cook_tone4:":{uc_base:"1f469-1f3fe-1f373",uc_output:"1f469-1f3fe-200d-1f373",uc_match:"1f469-1f3fe-1f373",uc_greedy:"1f469-1f3fe-1f373",shortnames:[":woman_cook_medium_dark_skin_tone:"],category:"people"},":woman_cook_tone5:":{uc_base:"1f469-1f3ff-1f373",uc_output:"1f469-1f3ff-200d-1f373",uc_match:"1f469-1f3ff-1f373",uc_greedy:"1f469-1f3ff-1f373",shortnames:[":woman_cook_dark_skin_tone:"],category:"people"},":woman_curly_haired_tone1:":{uc_base:"1f469-1f3fb-1f9b1",uc_output:"1f469-1f3fb-200d-1f9b1",uc_match:"1f469-1f3fb-1f9b1",uc_greedy:"1f469-1f3fb-1f9b1",shortnames:[":woman_curly_haired_light_skin_tone:"],category:"people"},":woman_curly_haired_tone2:":{uc_base:"1f469-1f3fc-1f9b1",uc_output:"1f469-1f3fc-200d-1f9b1",uc_match:"1f469-1f3fc-1f9b1",uc_greedy:"1f469-1f3fc-1f9b1",shortnames:[":woman_curly_haired_medium_light_skin_tone:"],category:"people"},":woman_curly_haired_tone3:":{uc_base:"1f469-1f3fd-1f9b1",uc_output:"1f469-1f3fd-200d-1f9b1",uc_match:"1f469-1f3fd-1f9b1",uc_greedy:"1f469-1f3fd-1f9b1",shortnames:[":woman_curly_haired_medium_skin_tone:"],category:"people"},":woman_curly_haired_tone4:":{uc_base:"1f469-1f3fe-1f9b1",uc_output:"1f469-1f3fe-200d-1f9b1",uc_match:"1f469-1f3fe-1f9b1",uc_greedy:"1f469-1f3fe-1f9b1",shortnames:[":woman_curly_haired_medium_dark_skin_tone:"],category:"people"},":woman_curly_haired_tone5:":{uc_base:"1f469-1f3ff-1f9b1",uc_output:"1f469-1f3ff-200d-1f9b1",uc_match:"1f469-1f3ff-1f9b1",uc_greedy:"1f469-1f3ff-1f9b1",shortnames:[":woman_curly_haired_dark_skin_tone:"],category:"people"},":woman_factory_worker_tone1:":{uc_base:"1f469-1f3fb-1f3ed",uc_output:"1f469-1f3fb-200d-1f3ed",uc_match:"1f469-1f3fb-1f3ed",uc_greedy:"1f469-1f3fb-1f3ed",shortnames:[":woman_factory_worker_light_skin_tone:"],category:"people"},":woman_factory_worker_tone2:":{uc_base:"1f469-1f3fc-1f3ed",uc_output:"1f469-1f3fc-200d-1f3ed",uc_match:"1f469-1f3fc-1f3ed",uc_greedy:"1f469-1f3fc-1f3ed",shortnames:[":woman_factory_worker_medium_light_skin_tone:"],category:"people"},":woman_factory_worker_tone3:":{uc_base:"1f469-1f3fd-1f3ed",uc_output:"1f469-1f3fd-200d-1f3ed",uc_match:"1f469-1f3fd-1f3ed",uc_greedy:"1f469-1f3fd-1f3ed",shortnames:[":woman_factory_worker_medium_skin_tone:"],category:"people"},":woman_factory_worker_tone4:":{uc_base:"1f469-1f3fe-1f3ed",uc_output:"1f469-1f3fe-200d-1f3ed",uc_match:"1f469-1f3fe-1f3ed",uc_greedy:"1f469-1f3fe-1f3ed",shortnames:[":woman_factory_worker_medium_dark_skin_tone:"],category:"people"},":woman_factory_worker_tone5:":{uc_base:"1f469-1f3ff-1f3ed",uc_output:"1f469-1f3ff-200d-1f3ed",uc_match:"1f469-1f3ff-1f3ed",uc_greedy:"1f469-1f3ff-1f3ed",shortnames:[":woman_factory_worker_dark_skin_tone:"],category:"people"},":woman_farmer_tone1:":{uc_base:"1f469-1f3fb-1f33e",uc_output:"1f469-1f3fb-200d-1f33e",uc_match:"1f469-1f3fb-1f33e",uc_greedy:"1f469-1f3fb-1f33e",shortnames:[":woman_farmer_light_skin_tone:"],category:"people"},":woman_farmer_tone2:":{uc_base:"1f469-1f3fc-1f33e",uc_output:"1f469-1f3fc-200d-1f33e",uc_match:"1f469-1f3fc-1f33e",uc_greedy:"1f469-1f3fc-1f33e",shortnames:[":woman_farmer_medium_light_skin_tone:"],category:"people"},":woman_farmer_tone3:":{uc_base:"1f469-1f3fd-1f33e",uc_output:"1f469-1f3fd-200d-1f33e",uc_match:"1f469-1f3fd-1f33e",uc_greedy:"1f469-1f3fd-1f33e",shortnames:[":woman_farmer_medium_skin_tone:"],category:"people"},":woman_farmer_tone4:":{uc_base:"1f469-1f3fe-1f33e",uc_output:"1f469-1f3fe-200d-1f33e",uc_match:"1f469-1f3fe-1f33e",uc_greedy:"1f469-1f3fe-1f33e",shortnames:[":woman_farmer_medium_dark_skin_tone:"],category:"people"},":woman_farmer_tone5:":{uc_base:"1f469-1f3ff-1f33e",uc_output:"1f469-1f3ff-200d-1f33e",uc_match:"1f469-1f3ff-1f33e",uc_greedy:"1f469-1f3ff-1f33e",shortnames:[":woman_farmer_dark_skin_tone:"],category:"people"},":woman_firefighter_tone1:":{uc_base:"1f469-1f3fb-1f692",uc_output:"1f469-1f3fb-200d-1f692",uc_match:"1f469-1f3fb-1f692",uc_greedy:"1f469-1f3fb-1f692",shortnames:[":woman_firefighter_light_skin_tone:"],category:"people"},":woman_firefighter_tone2:":{uc_base:"1f469-1f3fc-1f692",uc_output:"1f469-1f3fc-200d-1f692",uc_match:"1f469-1f3fc-1f692",uc_greedy:"1f469-1f3fc-1f692",shortnames:[":woman_firefighter_medium_light_skin_tone:"],category:"people"},":woman_firefighter_tone3:":{uc_base:"1f469-1f3fd-1f692",uc_output:"1f469-1f3fd-200d-1f692",uc_match:"1f469-1f3fd-1f692",uc_greedy:"1f469-1f3fd-1f692",shortnames:[":woman_firefighter_medium_skin_tone:"],category:"people"},":woman_firefighter_tone4:":{uc_base:"1f469-1f3fe-1f692",uc_output:"1f469-1f3fe-200d-1f692",uc_match:"1f469-1f3fe-1f692",uc_greedy:"1f469-1f3fe-1f692",shortnames:[":woman_firefighter_medium_dark_skin_tone:"],category:"people"},":woman_firefighter_tone5:":{uc_base:"1f469-1f3ff-1f692",uc_output:"1f469-1f3ff-200d-1f692",uc_match:"1f469-1f3ff-1f692",uc_greedy:"1f469-1f3ff-1f692",shortnames:[":woman_firefighter_dark_skin_tone:"],category:"people"},":woman_mechanic_tone1:":{uc_base:"1f469-1f3fb-1f527",uc_output:"1f469-1f3fb-200d-1f527",uc_match:"1f469-1f3fb-1f527",uc_greedy:"1f469-1f3fb-1f527",shortnames:[":woman_mechanic_light_skin_tone:"],category:"people"},":woman_mechanic_tone2:":{uc_base:"1f469-1f3fc-1f527",uc_output:"1f469-1f3fc-200d-1f527",uc_match:"1f469-1f3fc-1f527",uc_greedy:"1f469-1f3fc-1f527",shortnames:[":woman_mechanic_medium_light_skin_tone:"],category:"people"},":woman_mechanic_tone3:":{uc_base:"1f469-1f3fd-1f527",uc_output:"1f469-1f3fd-200d-1f527",uc_match:"1f469-1f3fd-1f527",uc_greedy:"1f469-1f3fd-1f527",shortnames:[":woman_mechanic_medium_skin_tone:"],category:"people"},":woman_mechanic_tone4:":{uc_base:"1f469-1f3fe-1f527",uc_output:"1f469-1f3fe-200d-1f527",uc_match:"1f469-1f3fe-1f527",uc_greedy:"1f469-1f3fe-1f527",shortnames:[":woman_mechanic_medium_dark_skin_tone:"],category:"people"},":woman_mechanic_tone5:":{uc_base:"1f469-1f3ff-1f527",uc_output:"1f469-1f3ff-200d-1f527",uc_match:"1f469-1f3ff-1f527",uc_greedy:"1f469-1f3ff-1f527",shortnames:[":woman_mechanic_dark_skin_tone:"],category:"people"},":woman_office_worker_tone1:":{uc_base:"1f469-1f3fb-1f4bc",uc_output:"1f469-1f3fb-200d-1f4bc",uc_match:"1f469-1f3fb-1f4bc",uc_greedy:"1f469-1f3fb-1f4bc",shortnames:[":woman_office_worker_light_skin_tone:"],category:"people"},":woman_office_worker_tone2:":{uc_base:"1f469-1f3fc-1f4bc",uc_output:"1f469-1f3fc-200d-1f4bc",uc_match:"1f469-1f3fc-1f4bc",uc_greedy:"1f469-1f3fc-1f4bc",shortnames:[":woman_office_worker_medium_light_skin_tone:"],category:"people"},":woman_office_worker_tone3:":{uc_base:"1f469-1f3fd-1f4bc",uc_output:"1f469-1f3fd-200d-1f4bc",uc_match:"1f469-1f3fd-1f4bc",uc_greedy:"1f469-1f3fd-1f4bc",shortnames:[":woman_office_worker_medium_skin_tone:"],category:"people"},":woman_office_worker_tone4:":{uc_base:"1f469-1f3fe-1f4bc",uc_output:"1f469-1f3fe-200d-1f4bc",uc_match:"1f469-1f3fe-1f4bc",uc_greedy:"1f469-1f3fe-1f4bc",shortnames:[":woman_office_worker_medium_dark_skin_tone:"],category:"people"},":woman_office_worker_tone5:":{uc_base:"1f469-1f3ff-1f4bc",uc_output:"1f469-1f3ff-200d-1f4bc",uc_match:"1f469-1f3ff-1f4bc",uc_greedy:"1f469-1f3ff-1f4bc",shortnames:[":woman_office_worker_dark_skin_tone:"],category:"people"},":woman_red_haired_tone1:":{uc_base:"1f469-1f3fb-1f9b0",uc_output:"1f469-1f3fb-200d-1f9b0",uc_match:"1f469-1f3fb-1f9b0",uc_greedy:"1f469-1f3fb-1f9b0",shortnames:[":woman_red_haired_light_skin_tone:"],category:"people"},":woman_red_haired_tone2:":{uc_base:"1f469-1f3fc-1f9b0",uc_output:"1f469-1f3fc-200d-1f9b0",uc_match:"1f469-1f3fc-1f9b0",uc_greedy:"1f469-1f3fc-1f9b0",shortnames:[":woman_red_haired_medium_light_skin_tone:"],category:"people"},":woman_red_haired_tone3:":{uc_base:"1f469-1f3fd-1f9b0",uc_output:"1f469-1f3fd-200d-1f9b0",uc_match:"1f469-1f3fd-1f9b0",uc_greedy:"1f469-1f3fd-1f9b0",shortnames:[":woman_red_haired_medium_skin_tone:"],category:"people"},":woman_red_haired_tone4:":{uc_base:"1f469-1f3fe-1f9b0",uc_output:"1f469-1f3fe-200d-1f9b0",uc_match:"1f469-1f3fe-1f9b0",uc_greedy:"1f469-1f3fe-1f9b0",shortnames:[":woman_red_haired_medium_dark_skin_tone:"],category:"people"},":woman_red_haired_tone5:":{uc_base:"1f469-1f3ff-1f9b0",uc_output:"1f469-1f3ff-200d-1f9b0",uc_match:"1f469-1f3ff-1f9b0",uc_greedy:"1f469-1f3ff-1f9b0",shortnames:[":woman_red_haired_dark_skin_tone:"],category:"people"},":woman_scientist_tone1:":{uc_base:"1f469-1f3fb-1f52c",uc_output:"1f469-1f3fb-200d-1f52c",uc_match:"1f469-1f3fb-1f52c",uc_greedy:"1f469-1f3fb-1f52c",shortnames:[":woman_scientist_light_skin_tone:"],category:"people"},":woman_scientist_tone2:":{uc_base:"1f469-1f3fc-1f52c",uc_output:"1f469-1f3fc-200d-1f52c",uc_match:"1f469-1f3fc-1f52c",uc_greedy:"1f469-1f3fc-1f52c",shortnames:[":woman_scientist_medium_light_skin_tone:"],category:"people"},":woman_scientist_tone3:":{uc_base:"1f469-1f3fd-1f52c",uc_output:"1f469-1f3fd-200d-1f52c",uc_match:"1f469-1f3fd-1f52c",uc_greedy:"1f469-1f3fd-1f52c",shortnames:[":woman_scientist_medium_skin_tone:"],category:"people"},":woman_scientist_tone4:":{uc_base:"1f469-1f3fe-1f52c",uc_output:"1f469-1f3fe-200d-1f52c",uc_match:"1f469-1f3fe-1f52c",uc_greedy:"1f469-1f3fe-1f52c",shortnames:[":woman_scientist_medium_dark_skin_tone:"],category:"people"},":woman_scientist_tone5:":{uc_base:"1f469-1f3ff-1f52c",uc_output:"1f469-1f3ff-200d-1f52c",uc_match:"1f469-1f3ff-1f52c",uc_greedy:"1f469-1f3ff-1f52c",shortnames:[":woman_scientist_dark_skin_tone:"],category:"people"},":woman_singer_tone1:":{uc_base:"1f469-1f3fb-1f3a4",uc_output:"1f469-1f3fb-200d-1f3a4",uc_match:"1f469-1f3fb-1f3a4",uc_greedy:"1f469-1f3fb-1f3a4",shortnames:[":woman_singer_light_skin_tone:"],category:"people"},":woman_singer_tone2:":{uc_base:"1f469-1f3fc-1f3a4",uc_output:"1f469-1f3fc-200d-1f3a4",uc_match:"1f469-1f3fc-1f3a4",uc_greedy:"1f469-1f3fc-1f3a4",shortnames:[":woman_singer_medium_light_skin_tone:"],category:"people"},":woman_singer_tone3:":{uc_base:"1f469-1f3fd-1f3a4",uc_output:"1f469-1f3fd-200d-1f3a4",uc_match:"1f469-1f3fd-1f3a4",uc_greedy:"1f469-1f3fd-1f3a4",shortnames:[":woman_singer_medium_skin_tone:"],category:"people"},":woman_singer_tone4:":{uc_base:"1f469-1f3fe-1f3a4",uc_output:"1f469-1f3fe-200d-1f3a4",uc_match:"1f469-1f3fe-1f3a4",uc_greedy:"1f469-1f3fe-1f3a4",shortnames:[":woman_singer_medium_dark_skin_tone:"],category:"people"},":woman_singer_tone5:":{uc_base:"1f469-1f3ff-1f3a4",uc_output:"1f469-1f3ff-200d-1f3a4",uc_match:"1f469-1f3ff-1f3a4",uc_greedy:"1f469-1f3ff-1f3a4",shortnames:[":woman_singer_dark_skin_tone:"],category:"people"},":woman_student_tone1:":{uc_base:"1f469-1f3fb-1f393",uc_output:"1f469-1f3fb-200d-1f393",uc_match:"1f469-1f3fb-1f393",uc_greedy:"1f469-1f3fb-1f393",shortnames:[":woman_student_light_skin_tone:"],category:"people"},":woman_student_tone2:":{uc_base:"1f469-1f3fc-1f393",uc_output:"1f469-1f3fc-200d-1f393",uc_match:"1f469-1f3fc-1f393",uc_greedy:"1f469-1f3fc-1f393",shortnames:[":woman_student_medium_light_skin_tone:"],category:"people"},":woman_student_tone3:":{uc_base:"1f469-1f3fd-1f393",uc_output:"1f469-1f3fd-200d-1f393",uc_match:"1f469-1f3fd-1f393",uc_greedy:"1f469-1f3fd-1f393",shortnames:[":woman_student_medium_skin_tone:"],category:"people"},":woman_student_tone4:":{uc_base:"1f469-1f3fe-1f393",uc_output:"1f469-1f3fe-200d-1f393",uc_match:"1f469-1f3fe-1f393",uc_greedy:"1f469-1f3fe-1f393",shortnames:[":woman_student_medium_dark_skin_tone:"],category:"people"},":woman_student_tone5:":{uc_base:"1f469-1f3ff-1f393",uc_output:"1f469-1f3ff-200d-1f393",uc_match:"1f469-1f3ff-1f393",uc_greedy:"1f469-1f3ff-1f393",shortnames:[":woman_student_dark_skin_tone:"],category:"people"},":woman_teacher_tone1:":{uc_base:"1f469-1f3fb-1f3eb",uc_output:"1f469-1f3fb-200d-1f3eb",uc_match:"1f469-1f3fb-1f3eb",uc_greedy:"1f469-1f3fb-1f3eb",shortnames:[":woman_teacher_light_skin_tone:"],category:"people"},":woman_teacher_tone2:":{uc_base:"1f469-1f3fc-1f3eb",uc_output:"1f469-1f3fc-200d-1f3eb",uc_match:"1f469-1f3fc-1f3eb",uc_greedy:"1f469-1f3fc-1f3eb",shortnames:[":woman_teacher_medium_light_skin_tone:"],category:"people"},":woman_teacher_tone3:":{uc_base:"1f469-1f3fd-1f3eb",uc_output:"1f469-1f3fd-200d-1f3eb",uc_match:"1f469-1f3fd-1f3eb",uc_greedy:"1f469-1f3fd-1f3eb",shortnames:[":woman_teacher_medium_skin_tone:"],category:"people"},":woman_teacher_tone4:":{uc_base:"1f469-1f3fe-1f3eb",uc_output:"1f469-1f3fe-200d-1f3eb",uc_match:"1f469-1f3fe-1f3eb",uc_greedy:"1f469-1f3fe-1f3eb",shortnames:[":woman_teacher_medium_dark_skin_tone:"],category:"people"},":woman_teacher_tone5:":{uc_base:"1f469-1f3ff-1f3eb",uc_output:"1f469-1f3ff-200d-1f3eb",uc_match:"1f469-1f3ff-1f3eb",uc_greedy:"1f469-1f3ff-1f3eb",shortnames:[":woman_teacher_dark_skin_tone:"],category:"people"},":woman_technologist_tone1:":{uc_base:"1f469-1f3fb-1f4bb",uc_output:"1f469-1f3fb-200d-1f4bb",uc_match:"1f469-1f3fb-1f4bb",uc_greedy:"1f469-1f3fb-1f4bb",shortnames:[":woman_technologist_light_skin_tone:"],category:"people"},":woman_technologist_tone2:":{uc_base:"1f469-1f3fc-1f4bb",uc_output:"1f469-1f3fc-200d-1f4bb",uc_match:"1f469-1f3fc-1f4bb",uc_greedy:"1f469-1f3fc-1f4bb",shortnames:[":woman_technologist_medium_light_skin_tone:"],category:"people"},":woman_technologist_tone3:":{uc_base:"1f469-1f3fd-1f4bb",uc_output:"1f469-1f3fd-200d-1f4bb",uc_match:"1f469-1f3fd-1f4bb",uc_greedy:"1f469-1f3fd-1f4bb",shortnames:[":woman_technologist_medium_skin_tone:"],category:"people"},":woman_technologist_tone4:":{uc_base:"1f469-1f3fe-1f4bb",uc_output:"1f469-1f3fe-200d-1f4bb",uc_match:"1f469-1f3fe-1f4bb",uc_greedy:"1f469-1f3fe-1f4bb",shortnames:[":woman_technologist_medium_dark_skin_tone:"],category:"people"},":woman_technologist_tone5:":{uc_base:"1f469-1f3ff-1f4bb",uc_output:"1f469-1f3ff-200d-1f4bb",uc_match:"1f469-1f3ff-1f4bb",uc_greedy:"1f469-1f3ff-1f4bb",shortnames:[":woman_technologist_dark_skin_tone:"],category:"people"},":woman_white_haired_tone1:":{uc_base:"1f469-1f3fb-1f9b3",uc_output:"1f469-1f3fb-200d-1f9b3",uc_match:"1f469-1f3fb-1f9b3",uc_greedy:"1f469-1f3fb-1f9b3",shortnames:[":woman_white_haired_light_skin_tone:"],category:"people"},":woman_white_haired_tone2:":{uc_base:"1f469-1f3fc-1f9b3",uc_output:"1f469-1f3fc-200d-1f9b3",uc_match:"1f469-1f3fc-1f9b3",uc_greedy:"1f469-1f3fc-1f9b3",shortnames:[":woman_white_haired_medium_light_skin_tone:"],category:"people"},":woman_white_haired_tone3:":{uc_base:"1f469-1f3fd-1f9b3",uc_output:"1f469-1f3fd-200d-1f9b3",uc_match:"1f469-1f3fd-1f9b3",uc_greedy:"1f469-1f3fd-1f9b3",shortnames:[":woman_white_haired_medium_skin_tone:"],category:"people"},":woman_white_haired_tone4:":{uc_base:"1f469-1f3fe-1f9b3",uc_output:"1f469-1f3fe-200d-1f9b3",uc_match:"1f469-1f3fe-1f9b3",uc_greedy:"1f469-1f3fe-1f9b3",shortnames:[":woman_white_haired_medium_dark_skin_tone:"],category:"people"},":woman_white_haired_tone5:":{uc_base:"1f469-1f3ff-1f9b3",uc_output:"1f469-1f3ff-200d-1f9b3",uc_match:"1f469-1f3ff-1f9b3",uc_greedy:"1f469-1f3ff-1f9b3",shortnames:[":woman_white_haired_dark_skin_tone:"],category:"people"},":rainbow_flag:":{uc_base:"1f3f3-1f308",uc_output:"1f3f3-fe0f-200d-1f308",uc_match:"1f3f3-fe0f-1f308",uc_greedy:"1f3f3-1f308",shortnames:[":gay_pride_flag:"],category:"flags"},":blond-haired_man:":{uc_base:"1f471-2642",uc_output:"1f471-200d-2642-fe0f",uc_match:"1f471-2642-fe0f",uc_greedy:"1f471-2642",shortnames:[],category:"people"},":blond-haired_woman:":{uc_base:"1f471-2640",uc_output:"1f471-200d-2640-fe0f",uc_match:"1f471-2640-fe0f",uc_greedy:"1f471-2640",shortnames:[],category:"people"},":man_biking:":{uc_base:"1f6b4-2642",uc_output:"1f6b4-200d-2642-fe0f",uc_match:"1f6b4-2642-fe0f",uc_greedy:"1f6b4-2642",shortnames:[],category:"activity"},":man_bowing:":{uc_base:"1f647-2642",uc_output:"1f647-200d-2642-fe0f",uc_match:"1f647-2642-fe0f",uc_greedy:"1f647-2642",shortnames:[],category:"people"},":man_cartwheeling:":{uc_base:"1f938-2642",uc_output:"1f938-200d-2642-fe0f",uc_match:"1f938-2642-fe0f",uc_greedy:"1f938-2642",shortnames:[],category:"activity"},":man_climbing:":{uc_base:"1f9d7-2642",uc_output:"1f9d7-200d-2642-fe0f",uc_match:"1f9d7-2642-fe0f",uc_greedy:"1f9d7-2642",shortnames:[],category:"activity"},":man_construction_worker:":{uc_base:"1f477-2642",uc_output:"1f477-200d-2642-fe0f",uc_match:"1f477-2642-fe0f",uc_greedy:"1f477-2642",shortnames:[],category:"people"},":man_elf:":{uc_base:"1f9dd-2642",uc_output:"1f9dd-200d-2642-fe0f",uc_match:"1f9dd-2642-fe0f",uc_greedy:"1f9dd-2642",shortnames:[],category:"people"},":man_facepalming:":{uc_base:"1f926-2642",uc_output:"1f926-200d-2642-fe0f",uc_match:"1f926-2642-fe0f",uc_greedy:"1f926-2642",shortnames:[],category:"people"},":man_fairy:":{uc_base:"1f9da-2642",uc_output:"1f9da-200d-2642-fe0f",uc_match:"1f9da-2642-fe0f",uc_greedy:"1f9da-2642",shortnames:[],category:"people"},":man_frowning:":{uc_base:"1f64d-2642",uc_output:"1f64d-200d-2642-fe0f",uc_match:"1f64d-2642-fe0f",uc_greedy:"1f64d-2642",shortnames:[],category:"people"},":man_genie:":{uc_base:"1f9de-2642",uc_output:"1f9de-200d-2642-fe0f",uc_match:"1f9de-2642-fe0f",uc_greedy:"1f9de-2642",shortnames:[],category:"people"},":man_gesturing_no:":{uc_base:"1f645-2642",uc_output:"1f645-200d-2642-fe0f",uc_match:"1f645-2642-fe0f",uc_greedy:"1f645-2642",shortnames:[],category:"people"},":man_gesturing_ok:":{uc_base:"1f646-2642",uc_output:"1f646-200d-2642-fe0f",uc_match:"1f646-2642-fe0f",uc_greedy:"1f646-2642",shortnames:[],category:"people"},":man_getting_face_massage:":{uc_base:"1f486-2642",uc_output:"1f486-200d-2642-fe0f",uc_match:"1f486-2642-fe0f",uc_greedy:"1f486-2642",shortnames:[],category:"people"},":man_getting_haircut:":{uc_base:"1f487-2642",uc_output:"1f487-200d-2642-fe0f",uc_match:"1f487-2642-fe0f",uc_greedy:"1f487-2642",shortnames:[],category:"people"},":man_guard:":{uc_base:"1f482-2642",uc_output:"1f482-200d-2642-fe0f",uc_match:"1f482-2642-fe0f",uc_greedy:"1f482-2642",shortnames:[],category:"people"},":man_health_worker:":{uc_base:"1f468-2695",uc_output:"1f468-200d-2695-fe0f",uc_match:"1f468-2695-fe0f",uc_greedy:"1f468-2695",shortnames:[],category:"people"},":man_in_lotus_position:":{uc_base:"1f9d8-2642",uc_output:"1f9d8-200d-2642-fe0f",uc_match:"1f9d8-2642-fe0f",uc_greedy:"1f9d8-2642",shortnames:[],category:"activity"},":man_in_steamy_room:":{uc_base:"1f9d6-2642",uc_output:"1f9d6-200d-2642-fe0f",uc_match:"1f9d6-2642-fe0f",uc_greedy:"1f9d6-2642",shortnames:[],category:"people"},":man_judge:":{uc_base:"1f468-2696",uc_output:"1f468-200d-2696-fe0f",uc_match:"1f468-2696-fe0f",uc_greedy:"1f468-2696",shortnames:[],category:"people"},":man_juggling:":{uc_base:"1f939-2642",uc_output:"1f939-200d-2642-fe0f",uc_match:"1f939-2642-fe0f",uc_greedy:"1f939-2642",shortnames:[],category:"activity"},":man_mage:":{uc_base:"1f9d9-2642",uc_output:"1f9d9-200d-2642-fe0f",uc_match:"1f9d9-2642-fe0f",uc_greedy:"1f9d9-2642",shortnames:[],category:"people"},":man_mountain_biking:":{uc_base:"1f6b5-2642",uc_output:"1f6b5-200d-2642-fe0f",uc_match:"1f6b5-2642-fe0f",uc_greedy:"1f6b5-2642",shortnames:[],category:"activity"},":man_pilot:":{uc_base:"1f468-2708",uc_output:"1f468-200d-2708-fe0f",uc_match:"1f468-2708-fe0f",uc_greedy:"1f468-2708",shortnames:[],category:"people"},":man_playing_handball:":{uc_base:"1f93e-2642",uc_output:"1f93e-200d-2642-fe0f",uc_match:"1f93e-2642-fe0f",uc_greedy:"1f93e-2642",shortnames:[],category:"activity"},":man_playing_water_polo:":{uc_base:"1f93d-2642",uc_output:"1f93d-200d-2642-fe0f",uc_match:"1f93d-2642-fe0f",uc_greedy:"1f93d-2642",shortnames:[],category:"activity"},":man_police_officer:":{uc_base:"1f46e-2642",uc_output:"1f46e-200d-2642-fe0f",uc_match:"1f46e-2642-fe0f",uc_greedy:"1f46e-2642",shortnames:[],category:"people"},":man_pouting:":{uc_base:"1f64e-2642",uc_output:"1f64e-200d-2642-fe0f",uc_match:"1f64e-2642-fe0f",uc_greedy:"1f64e-2642",shortnames:[],category:"people"},":man_raising_hand:":{uc_base:"1f64b-2642",uc_output:"1f64b-200d-2642-fe0f",uc_match:"1f64b-2642-fe0f",uc_greedy:"1f64b-2642",shortnames:[],category:"people"},":man_rowing_boat:":{uc_base:"1f6a3-2642",uc_output:"1f6a3-200d-2642-fe0f",uc_match:"1f6a3-2642-fe0f",uc_greedy:"1f6a3-2642",shortnames:[],category:"activity"},":man_running:":{uc_base:"1f3c3-2642",uc_output:"1f3c3-200d-2642-fe0f",uc_match:"1f3c3-2642-fe0f",uc_greedy:"1f3c3-2642",shortnames:[],category:"people"},":man_shrugging:":{uc_base:"1f937-2642",uc_output:"1f937-200d-2642-fe0f",uc_match:"1f937-2642-fe0f",uc_greedy:"1f937-2642",shortnames:[],category:"people"},":man_superhero:":{uc_base:"1f9b8-2642",uc_output:"1f9b8-200d-2642-fe0f",uc_match:"1f9b8-2642-fe0f",uc_greedy:"1f9b8-2642",shortnames:[],category:"people"},":man_supervillain:":{uc_base:"1f9b9-2642",uc_output:"1f9b9-200d-2642-fe0f",uc_match:"1f9b9-2642-fe0f",uc_greedy:"1f9b9-2642",shortnames:[],category:"people"},":man_surfing:":{uc_base:"1f3c4-2642",uc_output:"1f3c4-200d-2642-fe0f",uc_match:"1f3c4-2642-fe0f",uc_greedy:"1f3c4-2642",shortnames:[],category:"activity"},":man_swimming:":{uc_base:"1f3ca-2642",uc_output:"1f3ca-200d-2642-fe0f",uc_match:"1f3ca-2642-fe0f",uc_greedy:"1f3ca-2642",shortnames:[],category:"activity"},":man_tipping_hand:":{uc_base:"1f481-2642",uc_output:"1f481-200d-2642-fe0f",uc_match:"1f481-2642-fe0f",uc_greedy:"1f481-2642",shortnames:[],category:"people"},":man_vampire:":{uc_base:"1f9db-2642",uc_output:"1f9db-200d-2642-fe0f",uc_match:"1f9db-2642-fe0f",uc_greedy:"1f9db-2642",shortnames:[],category:"people"},":man_walking:":{uc_base:"1f6b6-2642",uc_output:"1f6b6-200d-2642-fe0f",uc_match:"1f6b6-2642-fe0f",uc_greedy:"1f6b6-2642",shortnames:[],category:"people"},":man_wearing_turban:":{uc_base:"1f473-2642",uc_output:"1f473-200d-2642-fe0f",uc_match:"1f473-2642-fe0f",uc_greedy:"1f473-2642",shortnames:[],category:"people"},":man_zombie:":{uc_base:"1f9df-2642",uc_output:"1f9df-200d-2642-fe0f",uc_match:"1f9df-2642-fe0f",uc_greedy:"1f9df-2642",shortnames:[],category:"people"},":men_with_bunny_ears_partying:":{uc_base:"1f46f-2642",uc_output:"1f46f-200d-2642-fe0f",uc_match:"1f46f-2642-fe0f",uc_greedy:"1f46f-2642",shortnames:[],category:"people"},":men_wrestling:":{uc_base:"1f93c-2642",uc_output:"1f93c-200d-2642-fe0f",uc_match:"1f93c-2642-fe0f",uc_greedy:"1f93c-2642",shortnames:[],category:"activity"},":mermaid:":{uc_base:"1f9dc-2640",uc_output:"1f9dc-200d-2640-fe0f",uc_match:"1f9dc-2640-fe0f",uc_greedy:"1f9dc-2640",shortnames:[],category:"people"},":merman:":{uc_base:"1f9dc-2642",uc_output:"1f9dc-200d-2642-fe0f",uc_match:"1f9dc-2642-fe0f",uc_greedy:"1f9dc-2642",shortnames:[],category:"people"},":pirate_flag:":{uc_base:"1f3f4-2620",uc_output:"1f3f4-200d-2620-fe0f",uc_match:"1f3f4-2620-fe0f",uc_greedy:"1f3f4-2620",shortnames:[],category:"flags"},":woman_biking:":{uc_base:"1f6b4-2640",uc_output:"1f6b4-200d-2640-fe0f",uc_match:"1f6b4-2640-fe0f",uc_greedy:"1f6b4-2640",shortnames:[],category:"activity"},":woman_bowing:":{uc_base:"1f647-2640",uc_output:"1f647-200d-2640-fe0f",uc_match:"1f647-2640-fe0f",uc_greedy:"1f647-2640",shortnames:[],category:"people"},":woman_cartwheeling:":{uc_base:"1f938-2640",uc_output:"1f938-200d-2640-fe0f",uc_match:"1f938-2640-fe0f",uc_greedy:"1f938-2640",shortnames:[],category:"activity"},":woman_climbing:":{uc_base:"1f9d7-2640",uc_output:"1f9d7-200d-2640-fe0f",uc_match:"1f9d7-2640-fe0f",uc_greedy:"1f9d7-2640",shortnames:[],category:"activity"},":woman_construction_worker:":{uc_base:"1f477-2640",uc_output:"1f477-200d-2640-fe0f",uc_match:"1f477-2640-fe0f",uc_greedy:"1f477-2640",shortnames:[],category:"people"},":woman_elf:":{uc_base:"1f9dd-2640",uc_output:"1f9dd-200d-2640-fe0f",uc_match:"1f9dd-2640-fe0f",uc_greedy:"1f9dd-2640",shortnames:[],category:"people"},":woman_facepalming:":{uc_base:"1f926-2640",uc_output:"1f926-200d-2640-fe0f",uc_match:"1f926-2640-fe0f",uc_greedy:"1f926-2640",shortnames:[],category:"people"},":woman_fairy:":{uc_base:"1f9da-2640",uc_output:"1f9da-200d-2640-fe0f",uc_match:"1f9da-2640-fe0f",uc_greedy:"1f9da-2640",shortnames:[],category:"people"},":woman_frowning:":{uc_base:"1f64d-2640",uc_output:"1f64d-200d-2640-fe0f",uc_match:"1f64d-2640-fe0f",uc_greedy:"1f64d-2640",shortnames:[],category:"people"},":woman_genie:":{uc_base:"1f9de-2640",uc_output:"1f9de-200d-2640-fe0f",uc_match:"1f9de-2640-fe0f",uc_greedy:"1f9de-2640",shortnames:[],category:"people"},":woman_gesturing_no:":{uc_base:"1f645-2640",uc_output:"1f645-200d-2640-fe0f",uc_match:"1f645-2640-fe0f",uc_greedy:"1f645-2640",shortnames:[],category:"people"},":woman_gesturing_ok:":{uc_base:"1f646-2640",uc_output:"1f646-200d-2640-fe0f",uc_match:"1f646-2640-fe0f",uc_greedy:"1f646-2640",shortnames:[],category:"people"},":woman_getting_face_massage:":{uc_base:"1f486-2640",uc_output:"1f486-200d-2640-fe0f",uc_match:"1f486-2640-fe0f",uc_greedy:"1f486-2640",shortnames:[],category:"people"},":woman_getting_haircut:":{uc_base:"1f487-2640",uc_output:"1f487-200d-2640-fe0f",uc_match:"1f487-2640-fe0f",uc_greedy:"1f487-2640",shortnames:[],category:"people"},":woman_guard:":{uc_base:"1f482-2640",uc_output:"1f482-200d-2640-fe0f",uc_match:"1f482-2640-fe0f",uc_greedy:"1f482-2640",shortnames:[],category:"people"},":woman_health_worker:":{uc_base:"1f469-2695",uc_output:"1f469-200d-2695-fe0f",uc_match:"1f469-2695-fe0f",uc_greedy:"1f469-2695",shortnames:[],category:"people"},":woman_in_lotus_position:":{uc_base:"1f9d8-2640",uc_output:"1f9d8-200d-2640-fe0f",uc_match:"1f9d8-2640-fe0f",uc_greedy:"1f9d8-2640",shortnames:[],category:"activity"},":woman_in_steamy_room:":{uc_base:"1f9d6-2640",uc_output:"1f9d6-200d-2640-fe0f",uc_match:"1f9d6-2640-fe0f",uc_greedy:"1f9d6-2640",shortnames:[],category:"people"},":woman_judge:":{uc_base:"1f469-2696",uc_output:"1f469-200d-2696-fe0f",uc_match:"1f469-2696-fe0f",uc_greedy:"1f469-2696",shortnames:[],category:"people"},":woman_juggling:":{uc_base:"1f939-2640",uc_output:"1f939-200d-2640-fe0f",uc_match:"1f939-2640-fe0f",uc_greedy:"1f939-2640",shortnames:[],category:"activity"},":woman_mage:":{uc_base:"1f9d9-2640",uc_output:"1f9d9-200d-2640-fe0f",uc_match:"1f9d9-2640-fe0f",uc_greedy:"1f9d9-2640",shortnames:[],category:"people"},":woman_mountain_biking:":{uc_base:"1f6b5-2640",uc_output:"1f6b5-200d-2640-fe0f",uc_match:"1f6b5-2640-fe0f",uc_greedy:"1f6b5-2640",shortnames:[],category:"activity"},":woman_pilot:":{uc_base:"1f469-2708",uc_output:"1f469-200d-2708-fe0f",uc_match:"1f469-2708-fe0f",uc_greedy:"1f469-2708",shortnames:[],category:"people"},":woman_playing_handball:":{uc_base:"1f93e-2640",uc_output:"1f93e-200d-2640-fe0f",uc_match:"1f93e-2640-fe0f",uc_greedy:"1f93e-2640",shortnames:[],category:"activity"},":woman_playing_water_polo:":{uc_base:"1f93d-2640",uc_output:"1f93d-200d-2640-fe0f",uc_match:"1f93d-2640-fe0f",uc_greedy:"1f93d-2640",shortnames:[],category:"activity"},":woman_police_officer:":{uc_base:"1f46e-2640",uc_output:"1f46e-200d-2640-fe0f",uc_match:"1f46e-2640-fe0f",uc_greedy:"1f46e-2640",shortnames:[],category:"people"},":woman_pouting:":{uc_base:"1f64e-2640",uc_output:"1f64e-200d-2640-fe0f",uc_match:"1f64e-2640-fe0f",uc_greedy:"1f64e-2640",shortnames:[],category:"people"},":woman_raising_hand:":{uc_base:"1f64b-2640",uc_output:"1f64b-200d-2640-fe0f",uc_match:"1f64b-2640-fe0f",uc_greedy:"1f64b-2640",shortnames:[],category:"people"},":woman_rowing_boat:":{uc_base:"1f6a3-2640",uc_output:"1f6a3-200d-2640-fe0f",uc_match:"1f6a3-2640-fe0f",uc_greedy:"1f6a3-2640",shortnames:[],category:"activity"},":woman_running:":{uc_base:"1f3c3-2640",uc_output:"1f3c3-200d-2640-fe0f",uc_match:"1f3c3-2640-fe0f",uc_greedy:"1f3c3-2640",shortnames:[],category:"people"},":woman_shrugging:":{uc_base:"1f937-2640",uc_output:"1f937-200d-2640-fe0f",uc_match:"1f937-2640-fe0f",uc_greedy:"1f937-2640",shortnames:[],category:"people"},":woman_superhero:":{uc_base:"1f9b8-2640",uc_output:"1f9b8-200d-2640-fe0f",uc_match:"1f9b8-2640-fe0f",uc_greedy:"1f9b8-2640",shortnames:[],category:"people"},":woman_supervillain:":{uc_base:"1f9b9-2640",uc_output:"1f9b9-200d-2640-fe0f",uc_match:"1f9b9-2640-fe0f",uc_greedy:"1f9b9-2640",shortnames:[],category:"people"},":woman_surfing:":{uc_base:"1f3c4-2640",uc_output:"1f3c4-200d-2640-fe0f",uc_match:"1f3c4-2640-fe0f",uc_greedy:"1f3c4-2640",shortnames:[],category:"activity"},":woman_swimming:":{uc_base:"1f3ca-2640",uc_output:"1f3ca-200d-2640-fe0f",uc_match:"1f3ca-2640-fe0f",uc_greedy:"1f3ca-2640",shortnames:[],category:"activity"},":woman_tipping_hand:":{uc_base:"1f481-2640",uc_output:"1f481-200d-2640-fe0f",uc_match:"1f481-2640-fe0f",uc_greedy:"1f481-2640",shortnames:[],category:"people"},":woman_vampire:":{uc_base:"1f9db-2640",uc_output:"1f9db-200d-2640-fe0f",uc_match:"1f9db-2640-fe0f",uc_greedy:"1f9db-2640",shortnames:[],category:"people"},":woman_walking:":{uc_base:"1f6b6-2640",uc_output:"1f6b6-200d-2640-fe0f",uc_match:"1f6b6-2640-fe0f",uc_greedy:"1f6b6-2640",shortnames:[],category:"people"},":woman_wearing_turban:":{uc_base:"1f473-2640",uc_output:"1f473-200d-2640-fe0f",uc_match:"1f473-2640-fe0f",uc_greedy:"1f473-2640",shortnames:[],category:"people"},":woman_zombie:":{uc_base:"1f9df-2640",uc_output:"1f9df-200d-2640-fe0f",uc_match:"1f9df-2640-fe0f",uc_greedy:"1f9df-2640",shortnames:[],category:"people"},":women_with_bunny_ears_partying:":{uc_base:"1f46f-2640",uc_output:"1f46f-200d-2640-fe0f",uc_match:"1f46f-2640-fe0f",uc_greedy:"1f46f-2640",shortnames:[],category:"people"},":women_wrestling:":{uc_base:"1f93c-2640",uc_output:"1f93c-200d-2640-fe0f",uc_match:"1f93c-2640-fe0f",uc_greedy:"1f93c-2640",shortnames:[],category:"activity"},":family_man_boy:":{uc_base:"1f468-1f466",uc_output:"1f468-200d-1f466",uc_match:"1f468-1f466",uc_greedy:"1f468-1f466",shortnames:[],category:"people"},":family_man_girl:":{uc_base:"1f468-1f467",uc_output:"1f468-200d-1f467",uc_match:"1f468-1f467",uc_greedy:"1f468-1f467",shortnames:[],category:"people"},":family_woman_boy:":{uc_base:"1f469-1f466",uc_output:"1f469-200d-1f466",uc_match:"1f469-1f466",uc_greedy:"1f469-1f466",shortnames:[],category:"people"},":family_woman_girl:":{uc_base:"1f469-1f467",uc_output:"1f469-200d-1f467",uc_match:"1f469-1f467",uc_greedy:"1f469-1f467",shortnames:[],category:"people"},":man_artist:":{uc_base:"1f468-1f3a8",uc_output:"1f468-200d-1f3a8",uc_match:"1f468-1f3a8",uc_greedy:"1f468-1f3a8",shortnames:[],category:"people"},":man_astronaut:":{uc_base:"1f468-1f680",uc_output:"1f468-200d-1f680",uc_match:"1f468-1f680",uc_greedy:"1f468-1f680",shortnames:[],category:"people"},":man_bald:":{uc_base:"1f468-1f9b2",uc_output:"1f468-200d-1f9b2",uc_match:"1f468-1f9b2",uc_greedy:"1f468-1f9b2",shortnames:[],category:"people"},":man_cook:":{uc_base:"1f468-1f373",uc_output:"1f468-200d-1f373",uc_match:"1f468-1f373",uc_greedy:"1f468-1f373",shortnames:[],category:"people"},":man_curly_haired:":{uc_base:"1f468-1f9b1",uc_output:"1f468-200d-1f9b1",uc_match:"1f468-1f9b1",uc_greedy:"1f468-1f9b1",shortnames:[],category:"people"},":man_factory_worker:":{uc_base:"1f468-1f3ed",uc_output:"1f468-200d-1f3ed",uc_match:"1f468-1f3ed",uc_greedy:"1f468-1f3ed",shortnames:[],category:"people"},":man_farmer:":{uc_base:"1f468-1f33e",uc_output:"1f468-200d-1f33e",uc_match:"1f468-1f33e",uc_greedy:"1f468-1f33e",shortnames:[],category:"people"},":man_firefighter:":{uc_base:"1f468-1f692",uc_output:"1f468-200d-1f692",uc_match:"1f468-1f692",uc_greedy:"1f468-1f692",shortnames:[],category:"people"},":man_mechanic:":{uc_base:"1f468-1f527",uc_output:"1f468-200d-1f527",uc_match:"1f468-1f527",uc_greedy:"1f468-1f527",shortnames:[],category:"people"},":man_office_worker:":{uc_base:"1f468-1f4bc",uc_output:"1f468-200d-1f4bc",uc_match:"1f468-1f4bc",uc_greedy:"1f468-1f4bc",shortnames:[],category:"people"},":man_red_haired:":{uc_base:"1f468-1f9b0",uc_output:"1f468-200d-1f9b0",uc_match:"1f468-1f9b0",uc_greedy:"1f468-1f9b0",shortnames:[],category:"people"},":man_scientist:":{uc_base:"1f468-1f52c",uc_output:"1f468-200d-1f52c",uc_match:"1f468-1f52c",uc_greedy:"1f468-1f52c",shortnames:[],category:"people"},":man_singer:":{uc_base:"1f468-1f3a4",uc_output:"1f468-200d-1f3a4",uc_match:"1f468-1f3a4",uc_greedy:"1f468-1f3a4",shortnames:[],category:"people"},":man_student:":{uc_base:"1f468-1f393",uc_output:"1f468-200d-1f393",uc_match:"1f468-1f393",uc_greedy:"1f468-1f393",shortnames:[],category:"people"},":man_teacher:":{uc_base:"1f468-1f3eb",uc_output:"1f468-200d-1f3eb",uc_match:"1f468-1f3eb",uc_greedy:"1f468-1f3eb",shortnames:[],category:"people"},":man_technologist:":{uc_base:"1f468-1f4bb",uc_output:"1f468-200d-1f4bb",uc_match:"1f468-1f4bb",uc_greedy:"1f468-1f4bb",shortnames:[],category:"people"},":man_white_haired:":{uc_base:"1f468-1f9b3",uc_output:"1f468-200d-1f9b3",uc_match:"1f468-1f9b3",uc_greedy:"1f468-1f9b3",shortnames:[],category:"people"},":woman_artist:":{uc_base:"1f469-1f3a8",uc_output:"1f469-200d-1f3a8",uc_match:"1f469-1f3a8",uc_greedy:"1f469-1f3a8",shortnames:[],category:"people"},":woman_astronaut:":{uc_base:"1f469-1f680",uc_output:"1f469-200d-1f680",uc_match:"1f469-1f680",uc_greedy:"1f469-1f680",shortnames:[],category:"people"},":woman_bald:":{uc_base:"1f469-1f9b2",uc_output:"1f469-200d-1f9b2",uc_match:"1f469-1f9b2",uc_greedy:"1f469-1f9b2",shortnames:[],category:"people"},":woman_cook:":{uc_base:"1f469-1f373",uc_output:"1f469-200d-1f373",uc_match:"1f469-1f373",uc_greedy:"1f469-1f373",shortnames:[],category:"people"},":woman_curly_haired:":{uc_base:"1f469-1f9b1",uc_output:"1f469-200d-1f9b1",uc_match:"1f469-1f9b1",uc_greedy:"1f469-1f9b1",shortnames:[],category:"people"},":woman_factory_worker:":{uc_base:"1f469-1f3ed",uc_output:"1f469-200d-1f3ed",uc_match:"1f469-1f3ed",uc_greedy:"1f469-1f3ed",shortnames:[],category:"people"},":woman_farmer:":{uc_base:"1f469-1f33e",uc_output:"1f469-200d-1f33e",uc_match:"1f469-1f33e",uc_greedy:"1f469-1f33e",shortnames:[],category:"people"},":woman_firefighter:":{uc_base:"1f469-1f692",uc_output:"1f469-200d-1f692",uc_match:"1f469-1f692",uc_greedy:"1f469-1f692",shortnames:[],category:"people"},":woman_mechanic:":{uc_base:"1f469-1f527",uc_output:"1f469-200d-1f527",uc_match:"1f469-1f527",uc_greedy:"1f469-1f527",shortnames:[],category:"people"},":woman_office_worker:":{uc_base:"1f469-1f4bc",uc_output:"1f469-200d-1f4bc",uc_match:"1f469-1f4bc",uc_greedy:"1f469-1f4bc",shortnames:[],category:"people"},":woman_red_haired:":{uc_base:"1f469-1f9b0",uc_output:"1f469-200d-1f9b0",uc_match:"1f469-1f9b0",uc_greedy:"1f469-1f9b0",shortnames:[],category:"people"},":woman_scientist:":{uc_base:"1f469-1f52c",uc_output:"1f469-200d-1f52c",uc_match:"1f469-1f52c",uc_greedy:"1f469-1f52c",shortnames:[],category:"people"},":woman_singer:":{uc_base:"1f469-1f3a4",uc_output:"1f469-200d-1f3a4",uc_match:"1f469-1f3a4",uc_greedy:"1f469-1f3a4",shortnames:[],category:"people"},":woman_student:":{uc_base:"1f469-1f393",uc_output:"1f469-200d-1f393",uc_match:"1f469-1f393",uc_greedy:"1f469-1f393",shortnames:[],category:"people"},":woman_teacher:":{uc_base:"1f469-1f3eb",uc_output:"1f469-200d-1f3eb",uc_match:"1f469-1f3eb",uc_greedy:"1f469-1f3eb",shortnames:[],category:"people"},":woman_technologist:":{uc_base:"1f469-1f4bb",uc_output:"1f469-200d-1f4bb",uc_match:"1f469-1f4bb",uc_greedy:"1f469-1f4bb",shortnames:[],category:"people"},":woman_white_haired:":{uc_base:"1f469-1f9b3",uc_output:"1f469-200d-1f9b3",uc_match:"1f469-1f9b3",uc_greedy:"1f469-1f9b3",shortnames:[],category:"people"},":asterisk:":{uc_base:"002a-20e3",uc_output:"002a-fe0f-20e3",uc_match:"002a-20e3",uc_greedy:"002a-20e3",shortnames:[":keycap_asterisk:"],category:"symbols"},":eight:":{uc_base:"0038-20e3",uc_output:"0038-fe0f-20e3",uc_match:"0038-20e3",uc_greedy:"0038-20e3",shortnames:[],category:"symbols"},":five:":{uc_base:"0035-20e3",uc_output:"0035-fe0f-20e3",uc_match:"0035-20e3",uc_greedy:"0035-20e3",shortnames:[],category:"symbols"},":four:":{uc_base:"0034-20e3",uc_output:"0034-fe0f-20e3",uc_match:"0034-20e3",uc_greedy:"0034-20e3",shortnames:[],category:"symbols"},":hash:":{uc_base:"0023-20e3",uc_output:"0023-fe0f-20e3",uc_match:"0023-20e3",uc_greedy:"0023-20e3",shortnames:[],category:"symbols"},":nine:":{uc_base:"0039-20e3",uc_output:"0039-fe0f-20e3",uc_match:"0039-20e3",uc_greedy:"0039-20e3",shortnames:[],category:"symbols"},":one:":{uc_base:"0031-20e3",uc_output:"0031-fe0f-20e3",uc_match:"0031-20e3",uc_greedy:"0031-20e3",shortnames:[],category:"symbols"},":seven:":{uc_base:"0037-20e3",uc_output:"0037-fe0f-20e3",uc_match:"0037-20e3",uc_greedy:"0037-20e3",shortnames:[],category:"symbols"},":six:":{uc_base:"0036-20e3",uc_output:"0036-fe0f-20e3",uc_match:"0036-20e3",uc_greedy:"0036-20e3",shortnames:[],category:"symbols"},":three:":{uc_base:"0033-20e3",uc_output:"0033-fe0f-20e3",uc_match:"0033-20e3",uc_greedy:"0033-20e3",shortnames:[],category:"symbols"},":two:":{uc_base:"0032-20e3",uc_output:"0032-fe0f-20e3",uc_match:"0032-20e3",uc_greedy:"0032-20e3",shortnames:[],category:"symbols"},":zero:":{uc_base:"0030-20e3",uc_output:"0030-fe0f-20e3",uc_match:"0030-20e3",uc_greedy:"0030-20e3",shortnames:[],category:"symbols"},":adult_tone1:":{uc_base:"1f9d1-1f3fb",uc_output:"1f9d1-1f3fb",uc_match:"1f9d1-1f3fb",uc_greedy:"1f9d1-1f3fb",shortnames:[":adult_light_skin_tone:"],category:"people"},":adult_tone2:":{uc_base:"1f9d1-1f3fc",uc_output:"1f9d1-1f3fc",uc_match:"1f9d1-1f3fc",uc_greedy:"1f9d1-1f3fc",shortnames:[":adult_medium_light_skin_tone:"],category:"people"},":adult_tone3:":{uc_base:"1f9d1-1f3fd",uc_output:"1f9d1-1f3fd",uc_match:"1f9d1-1f3fd",uc_greedy:"1f9d1-1f3fd",shortnames:[":adult_medium_skin_tone:"],category:"people"},":adult_tone4:":{uc_base:"1f9d1-1f3fe",uc_output:"1f9d1-1f3fe",uc_match:"1f9d1-1f3fe",uc_greedy:"1f9d1-1f3fe",shortnames:[":adult_medium_dark_skin_tone:"],category:"people"},":adult_tone5:":{uc_base:"1f9d1-1f3ff",uc_output:"1f9d1-1f3ff",uc_match:"1f9d1-1f3ff",uc_greedy:"1f9d1-1f3ff",shortnames:[":adult_dark_skin_tone:"],category:"people"},":angel_tone1:":{uc_base:"1f47c-1f3fb",uc_output:"1f47c-1f3fb",uc_match:"1f47c-1f3fb",uc_greedy:"1f47c-1f3fb",shortnames:[],category:"people"},":angel_tone2:":{uc_base:"1f47c-1f3fc",uc_output:"1f47c-1f3fc",uc_match:"1f47c-1f3fc",uc_greedy:"1f47c-1f3fc",shortnames:[],category:"people"},":angel_tone3:":{uc_base:"1f47c-1f3fd",uc_output:"1f47c-1f3fd",uc_match:"1f47c-1f3fd",uc_greedy:"1f47c-1f3fd",shortnames:[],category:"people"},":angel_tone4:":{uc_base:"1f47c-1f3fe",uc_output:"1f47c-1f3fe",uc_match:"1f47c-1f3fe",uc_greedy:"1f47c-1f3fe",shortnames:[],category:"people"},":angel_tone5:":{uc_base:"1f47c-1f3ff",uc_output:"1f47c-1f3ff",uc_match:"1f47c-1f3ff",uc_greedy:"1f47c-1f3ff",shortnames:[],category:"people"},":baby_tone1:":{uc_base:"1f476-1f3fb",uc_output:"1f476-1f3fb",uc_match:"1f476-1f3fb",uc_greedy:"1f476-1f3fb",shortnames:[],category:"people"},":baby_tone2:":{uc_base:"1f476-1f3fc",uc_output:"1f476-1f3fc",uc_match:"1f476-1f3fc",uc_greedy:"1f476-1f3fc",shortnames:[],category:"people"},":baby_tone3:":{uc_base:"1f476-1f3fd",uc_output:"1f476-1f3fd",uc_match:"1f476-1f3fd",uc_greedy:"1f476-1f3fd",shortnames:[],category:"people"},":baby_tone4:":{uc_base:"1f476-1f3fe",uc_output:"1f476-1f3fe",uc_match:"1f476-1f3fe",uc_greedy:"1f476-1f3fe",shortnames:[],category:"people"},":baby_tone5:":{uc_base:"1f476-1f3ff",uc_output:"1f476-1f3ff",uc_match:"1f476-1f3ff",uc_greedy:"1f476-1f3ff",shortnames:[],category:"people"},":bath_tone1:":{uc_base:"1f6c0-1f3fb",uc_output:"1f6c0-1f3fb",uc_match:"1f6c0-1f3fb",uc_greedy:"1f6c0-1f3fb",shortnames:[],category:"objects"},":bath_tone2:":{uc_base:"1f6c0-1f3fc",uc_output:"1f6c0-1f3fc",uc_match:"1f6c0-1f3fc",uc_greedy:"1f6c0-1f3fc",shortnames:[],category:"objects"},":bath_tone3:":{uc_base:"1f6c0-1f3fd",uc_output:"1f6c0-1f3fd",uc_match:"1f6c0-1f3fd",uc_greedy:"1f6c0-1f3fd",shortnames:[],category:"objects"},":bath_tone4:":{uc_base:"1f6c0-1f3fe",uc_output:"1f6c0-1f3fe",uc_match:"1f6c0-1f3fe",uc_greedy:"1f6c0-1f3fe",shortnames:[],category:"objects"},":bath_tone5:":{uc_base:"1f6c0-1f3ff",uc_output:"1f6c0-1f3ff",uc_match:"1f6c0-1f3ff",uc_greedy:"1f6c0-1f3ff",shortnames:[],category:"objects"},":bearded_person_tone1:":{uc_base:"1f9d4-1f3fb",uc_output:"1f9d4-1f3fb",uc_match:"1f9d4-1f3fb",uc_greedy:"1f9d4-1f3fb",shortnames:[":bearded_person_light_skin_tone:"],category:"people"},":bearded_person_tone2:":{uc_base:"1f9d4-1f3fc",uc_output:"1f9d4-1f3fc",uc_match:"1f9d4-1f3fc",uc_greedy:"1f9d4-1f3fc",shortnames:[":bearded_person_medium_light_skin_tone:"],category:"people"},":bearded_person_tone3:":{uc_base:"1f9d4-1f3fd",uc_output:"1f9d4-1f3fd",uc_match:"1f9d4-1f3fd",uc_greedy:"1f9d4-1f3fd",shortnames:[":bearded_person_medium_skin_tone:"],category:"people"},":bearded_person_tone4:":{uc_base:"1f9d4-1f3fe",uc_output:"1f9d4-1f3fe",uc_match:"1f9d4-1f3fe",uc_greedy:"1f9d4-1f3fe",shortnames:[":bearded_person_medium_dark_skin_tone:"],category:"people"},":bearded_person_tone5:":{uc_base:"1f9d4-1f3ff",uc_output:"1f9d4-1f3ff",uc_match:"1f9d4-1f3ff",uc_greedy:"1f9d4-1f3ff",shortnames:[":bearded_person_dark_skin_tone:"],category:"people"},":blond_haired_person_tone1:":{uc_base:"1f471-1f3fb",uc_output:"1f471-1f3fb",uc_match:"1f471-1f3fb",uc_greedy:"1f471-1f3fb",shortnames:[":person_with_blond_hair_tone1:"],category:"people"},":blond_haired_person_tone2:":{uc_base:"1f471-1f3fc",uc_output:"1f471-1f3fc",uc_match:"1f471-1f3fc",uc_greedy:"1f471-1f3fc",shortnames:[":person_with_blond_hair_tone2:"],category:"people"},":blond_haired_person_tone3:":{uc_base:"1f471-1f3fd",uc_output:"1f471-1f3fd",uc_match:"1f471-1f3fd",uc_greedy:"1f471-1f3fd",shortnames:[":person_with_blond_hair_tone3:"],category:"people"},":blond_haired_person_tone4:":{uc_base:"1f471-1f3fe",uc_output:"1f471-1f3fe",uc_match:"1f471-1f3fe",uc_greedy:"1f471-1f3fe",shortnames:[":person_with_blond_hair_tone4:"],category:"people"},":blond_haired_person_tone5:":{uc_base:"1f471-1f3ff",uc_output:"1f471-1f3ff",uc_match:"1f471-1f3ff",uc_greedy:"1f471-1f3ff",shortnames:[":person_with_blond_hair_tone5:"],category:"people"},":boy_tone1:":{uc_base:"1f466-1f3fb",uc_output:"1f466-1f3fb",uc_match:"1f466-1f3fb",uc_greedy:"1f466-1f3fb",shortnames:[],category:"people"},":boy_tone2:":{uc_base:"1f466-1f3fc",uc_output:"1f466-1f3fc",uc_match:"1f466-1f3fc",uc_greedy:"1f466-1f3fc",shortnames:[],category:"people"},":boy_tone3:":{uc_base:"1f466-1f3fd",uc_output:"1f466-1f3fd",uc_match:"1f466-1f3fd",uc_greedy:"1f466-1f3fd",shortnames:[],category:"people"},":boy_tone4:":{uc_base:"1f466-1f3fe",uc_output:"1f466-1f3fe",uc_match:"1f466-1f3fe",uc_greedy:"1f466-1f3fe",shortnames:[],category:"people"},":boy_tone5:":{uc_base:"1f466-1f3ff",uc_output:"1f466-1f3ff",uc_match:"1f466-1f3ff",uc_greedy:"1f466-1f3ff",shortnames:[],category:"people"},":breast_feeding_tone1:":{uc_base:"1f931-1f3fb",uc_output:"1f931-1f3fb",uc_match:"1f931-1f3fb",uc_greedy:"1f931-1f3fb",shortnames:[":breast_feeding_light_skin_tone:"],category:"people"},":breast_feeding_tone2:":{uc_base:"1f931-1f3fc",uc_output:"1f931-1f3fc",uc_match:"1f931-1f3fc",uc_greedy:"1f931-1f3fc",shortnames:[":breast_feeding_medium_light_skin_tone:"],category:"people"},":breast_feeding_tone3:":{uc_base:"1f931-1f3fd",uc_output:"1f931-1f3fd",uc_match:"1f931-1f3fd",uc_greedy:"1f931-1f3fd",shortnames:[":breast_feeding_medium_skin_tone:"],category:"people"},":breast_feeding_tone4:":{uc_base:"1f931-1f3fe",uc_output:"1f931-1f3fe",uc_match:"1f931-1f3fe",uc_greedy:"1f931-1f3fe",shortnames:[":breast_feeding_medium_dark_skin_tone:"],category:"people"},":breast_feeding_tone5:":{uc_base:"1f931-1f3ff",uc_output:"1f931-1f3ff",uc_match:"1f931-1f3ff",uc_greedy:"1f931-1f3ff",shortnames:[":breast_feeding_dark_skin_tone:"],category:"people"},":bride_with_veil_tone1:":{uc_base:"1f470-1f3fb",uc_output:"1f470-1f3fb",uc_match:"1f470-1f3fb",uc_greedy:"1f470-1f3fb",shortnames:[],category:"people"},":bride_with_veil_tone2:":{uc_base:"1f470-1f3fc",uc_output:"1f470-1f3fc",uc_match:"1f470-1f3fc",uc_greedy:"1f470-1f3fc",shortnames:[],category:"people"},":bride_with_veil_tone3:":{uc_base:"1f470-1f3fd",uc_output:"1f470-1f3fd",uc_match:"1f470-1f3fd",uc_greedy:"1f470-1f3fd",shortnames:[],category:"people"},":bride_with_veil_tone4:":{uc_base:"1f470-1f3fe",uc_output:"1f470-1f3fe",uc_match:"1f470-1f3fe",uc_greedy:"1f470-1f3fe",shortnames:[],category:"people"},":bride_with_veil_tone5:":{uc_base:"1f470-1f3ff",uc_output:"1f470-1f3ff",uc_match:"1f470-1f3ff",uc_greedy:"1f470-1f3ff",shortnames:[],category:"people"},":call_me_tone1:":{uc_base:"1f919-1f3fb",uc_output:"1f919-1f3fb",uc_match:"1f919-1f3fb",uc_greedy:"1f919-1f3fb",shortnames:[":call_me_hand_tone1:"],category:"people"},":call_me_tone2:":{uc_base:"1f919-1f3fc",uc_output:"1f919-1f3fc",uc_match:"1f919-1f3fc",uc_greedy:"1f919-1f3fc",shortnames:[":call_me_hand_tone2:"],category:"people"},":call_me_tone3:":{uc_base:"1f919-1f3fd",uc_output:"1f919-1f3fd",uc_match:"1f919-1f3fd",uc_greedy:"1f919-1f3fd",shortnames:[":call_me_hand_tone3:"],category:"people"},":call_me_tone4:":{uc_base:"1f919-1f3fe",uc_output:"1f919-1f3fe",uc_match:"1f919-1f3fe",uc_greedy:"1f919-1f3fe",shortnames:[":call_me_hand_tone4:"],category:"people"},":call_me_tone5:":{uc_base:"1f919-1f3ff",uc_output:"1f919-1f3ff",uc_match:"1f919-1f3ff",uc_greedy:"1f919-1f3ff",shortnames:[":call_me_hand_tone5:"],category:"people"},":child_tone1:":{uc_base:"1f9d2-1f3fb",uc_output:"1f9d2-1f3fb",uc_match:"1f9d2-1f3fb",uc_greedy:"1f9d2-1f3fb",shortnames:[":child_light_skin_tone:"],category:"people"},":child_tone2:":{uc_base:"1f9d2-1f3fc",uc_output:"1f9d2-1f3fc",uc_match:"1f9d2-1f3fc",uc_greedy:"1f9d2-1f3fc",shortnames:[":child_medium_light_skin_tone:"],category:"people"},":child_tone3:":{uc_base:"1f9d2-1f3fd",uc_output:"1f9d2-1f3fd",uc_match:"1f9d2-1f3fd",uc_greedy:"1f9d2-1f3fd",shortnames:[":child_medium_skin_tone:"],category:"people"},":child_tone4:":{uc_base:"1f9d2-1f3fe",uc_output:"1f9d2-1f3fe",uc_match:"1f9d2-1f3fe",uc_greedy:"1f9d2-1f3fe",shortnames:[":child_medium_dark_skin_tone:"],category:"people"},":child_tone5:":{uc_base:"1f9d2-1f3ff",uc_output:"1f9d2-1f3ff",uc_match:"1f9d2-1f3ff",uc_greedy:"1f9d2-1f3ff",shortnames:[":child_dark_skin_tone:"],category:"people"},":clap_tone1:":{uc_base:"1f44f-1f3fb",uc_output:"1f44f-1f3fb",uc_match:"1f44f-1f3fb",uc_greedy:"1f44f-1f3fb",shortnames:[],category:"people"},":clap_tone2:":{uc_base:"1f44f-1f3fc",uc_output:"1f44f-1f3fc",uc_match:"1f44f-1f3fc",uc_greedy:"1f44f-1f3fc",shortnames:[],category:"people"},":clap_tone3:":{uc_base:"1f44f-1f3fd",uc_output:"1f44f-1f3fd",uc_match:"1f44f-1f3fd",uc_greedy:"1f44f-1f3fd",shortnames:[],category:"people"},":clap_tone4:":{uc_base:"1f44f-1f3fe",uc_output:"1f44f-1f3fe",uc_match:"1f44f-1f3fe",uc_greedy:"1f44f-1f3fe",shortnames:[],category:"people"},":clap_tone5:":{uc_base:"1f44f-1f3ff",uc_output:"1f44f-1f3ff",uc_match:"1f44f-1f3ff",uc_greedy:"1f44f-1f3ff",shortnames:[],category:"people"},":construction_worker_tone1:":{uc_base:"1f477-1f3fb",uc_output:"1f477-1f3fb",uc_match:"1f477-1f3fb",uc_greedy:"1f477-1f3fb",shortnames:[],category:"people"},":construction_worker_tone2:":{uc_base:"1f477-1f3fc",uc_output:"1f477-1f3fc",uc_match:"1f477-1f3fc",uc_greedy:"1f477-1f3fc",shortnames:[],category:"people"},":construction_worker_tone3:":{uc_base:"1f477-1f3fd",uc_output:"1f477-1f3fd",uc_match:"1f477-1f3fd",uc_greedy:"1f477-1f3fd",shortnames:[],category:"people"},":construction_worker_tone4:":{uc_base:"1f477-1f3fe",uc_output:"1f477-1f3fe",uc_match:"1f477-1f3fe",uc_greedy:"1f477-1f3fe",shortnames:[],category:"people"},":construction_worker_tone5:":{uc_base:"1f477-1f3ff",uc_output:"1f477-1f3ff",uc_match:"1f477-1f3ff",uc_greedy:"1f477-1f3ff",shortnames:[],category:"people"},":dancer_tone1:":{uc_base:"1f483-1f3fb",uc_output:"1f483-1f3fb",uc_match:"1f483-1f3fb",uc_greedy:"1f483-1f3fb",shortnames:[],category:"people"},":dancer_tone2:":{uc_base:"1f483-1f3fc",uc_output:"1f483-1f3fc",uc_match:"1f483-1f3fc",uc_greedy:"1f483-1f3fc",shortnames:[],category:"people"},":dancer_tone3:":{uc_base:"1f483-1f3fd",uc_output:"1f483-1f3fd",uc_match:"1f483-1f3fd",uc_greedy:"1f483-1f3fd",shortnames:[],category:"people"},":dancer_tone4:":{uc_base:"1f483-1f3fe",uc_output:"1f483-1f3fe",uc_match:"1f483-1f3fe",uc_greedy:"1f483-1f3fe",shortnames:[],category:"people"},":dancer_tone5:":{uc_base:"1f483-1f3ff",uc_output:"1f483-1f3ff",uc_match:"1f483-1f3ff",uc_greedy:"1f483-1f3ff",shortnames:[],category:"people"},":detective_tone1:":{uc_base:"1f575-1f3fb",uc_output:"1f575-1f3fb",uc_match:"1f575-fe0f-1f3fb",uc_greedy:"1f575-fe0f-1f3fb",shortnames:[":spy_tone1:",":sleuth_or_spy_tone1:"],category:"people"},":detective_tone2:":{uc_base:"1f575-1f3fc",uc_output:"1f575-1f3fc",uc_match:"1f575-fe0f-1f3fc",uc_greedy:"1f575-fe0f-1f3fc",shortnames:[":spy_tone2:",":sleuth_or_spy_tone2:"],category:"people"},":detective_tone3:":{uc_base:"1f575-1f3fd",uc_output:"1f575-1f3fd",uc_match:"1f575-fe0f-1f3fd",uc_greedy:"1f575-fe0f-1f3fd",shortnames:[":spy_tone3:",":sleuth_or_spy_tone3:"],category:"people"},":detective_tone4:":{uc_base:"1f575-1f3fe",uc_output:"1f575-1f3fe",uc_match:"1f575-fe0f-1f3fe",uc_greedy:"1f575-fe0f-1f3fe",shortnames:[":spy_tone4:",":sleuth_or_spy_tone4:"],category:"people"},":detective_tone5:":{uc_base:"1f575-1f3ff",uc_output:"1f575-1f3ff",uc_match:"1f575-fe0f-1f3ff",uc_greedy:"1f575-fe0f-1f3ff",shortnames:[":spy_tone5:",":sleuth_or_spy_tone5:"],category:"people"},":ear_tone1:":{uc_base:"1f442-1f3fb",uc_output:"1f442-1f3fb",uc_match:"1f442-1f3fb",uc_greedy:"1f442-1f3fb",shortnames:[],category:"people"},":ear_tone2:":{uc_base:"1f442-1f3fc",uc_output:"1f442-1f3fc",uc_match:"1f442-1f3fc",uc_greedy:"1f442-1f3fc",shortnames:[],category:"people"},":ear_tone3:":{uc_base:"1f442-1f3fd",uc_output:"1f442-1f3fd",uc_match:"1f442-1f3fd",uc_greedy:"1f442-1f3fd",shortnames:[],category:"people"},":ear_tone4:":{uc_base:"1f442-1f3fe",uc_output:"1f442-1f3fe",uc_match:"1f442-1f3fe",uc_greedy:"1f442-1f3fe",shortnames:[],category:"people"},":ear_tone5:":{uc_base:"1f442-1f3ff",uc_output:"1f442-1f3ff",uc_match:"1f442-1f3ff",uc_greedy:"1f442-1f3ff",shortnames:[],category:"people"},":elf_tone1:":{uc_base:"1f9dd-1f3fb",uc_output:"1f9dd-1f3fb",uc_match:"1f9dd-1f3fb",uc_greedy:"1f9dd-1f3fb",shortnames:[":elf_light_skin_tone:"],category:"people"},":elf_tone2:":{uc_base:"1f9dd-1f3fc",uc_output:"1f9dd-1f3fc",uc_match:"1f9dd-1f3fc",uc_greedy:"1f9dd-1f3fc",shortnames:[":elf_medium_light_skin_tone:"],category:"people"},":elf_tone3:":{uc_base:"1f9dd-1f3fd",uc_output:"1f9dd-1f3fd",uc_match:"1f9dd-1f3fd",uc_greedy:"1f9dd-1f3fd",shortnames:[":elf_medium_skin_tone:"],category:"people"},":elf_tone4:":{uc_base:"1f9dd-1f3fe",uc_output:"1f9dd-1f3fe",uc_match:"1f9dd-1f3fe",uc_greedy:"1f9dd-1f3fe",shortnames:[":elf_medium_dark_skin_tone:"],category:"people"},":elf_tone5:":{uc_base:"1f9dd-1f3ff",uc_output:"1f9dd-1f3ff",uc_match:"1f9dd-1f3ff",uc_greedy:"1f9dd-1f3ff",shortnames:[":elf_dark_skin_tone:"],category:"people"},":fairy_tone1:":{uc_base:"1f9da-1f3fb",uc_output:"1f9da-1f3fb",uc_match:"1f9da-1f3fb",uc_greedy:"1f9da-1f3fb",shortnames:[":fairy_light_skin_tone:"],category:"people"},":fairy_tone2:":{uc_base:"1f9da-1f3fc",uc_output:"1f9da-1f3fc",uc_match:"1f9da-1f3fc",uc_greedy:"1f9da-1f3fc",shortnames:[":fairy_medium_light_skin_tone:"],category:"people"},":fairy_tone3:":{uc_base:"1f9da-1f3fd",uc_output:"1f9da-1f3fd",uc_match:"1f9da-1f3fd",uc_greedy:"1f9da-1f3fd",shortnames:[":fairy_medium_skin_tone:"],category:"people"},":fairy_tone4:":{uc_base:"1f9da-1f3fe",uc_output:"1f9da-1f3fe",uc_match:"1f9da-1f3fe",uc_greedy:"1f9da-1f3fe",shortnames:[":fairy_medium_dark_skin_tone:"],category:"people"},":fairy_tone5:":{uc_base:"1f9da-1f3ff",uc_output:"1f9da-1f3ff",uc_match:"1f9da-1f3ff",uc_greedy:"1f9da-1f3ff",shortnames:[":fairy_dark_skin_tone:"],category:"people"},":fingers_crossed_tone1:":{uc_base:"1f91e-1f3fb",uc_output:"1f91e-1f3fb",uc_match:"1f91e-1f3fb",uc_greedy:"1f91e-1f3fb",shortnames:[":hand_with_index_and_middle_fingers_crossed_tone1:"],category:"people"},":fingers_crossed_tone2:":{uc_base:"1f91e-1f3fc",uc_output:"1f91e-1f3fc",uc_match:"1f91e-1f3fc",uc_greedy:"1f91e-1f3fc",shortnames:[":hand_with_index_and_middle_fingers_crossed_tone2:"],category:"people"},":fingers_crossed_tone3:":{uc_base:"1f91e-1f3fd",uc_output:"1f91e-1f3fd",uc_match:"1f91e-1f3fd",uc_greedy:"1f91e-1f3fd",shortnames:[":hand_with_index_and_middle_fingers_crossed_tone3:"],category:"people"},":fingers_crossed_tone4:":{uc_base:"1f91e-1f3fe",uc_output:"1f91e-1f3fe",uc_match:"1f91e-1f3fe",uc_greedy:"1f91e-1f3fe",shortnames:[":hand_with_index_and_middle_fingers_crossed_tone4:"],category:"people"},":fingers_crossed_tone5:":{uc_base:"1f91e-1f3ff",uc_output:"1f91e-1f3ff",uc_match:"1f91e-1f3ff",uc_greedy:"1f91e-1f3ff",shortnames:[":hand_with_index_and_middle_fingers_crossed_tone5:"],category:"people"},":flag_ac:":{uc_base:"1f1e6-1f1e8",uc_output:"1f1e6-1f1e8",uc_match:"1f1e6-1f1e8",uc_greedy:"1f1e6-1f1e8",shortnames:[":ac:"],category:"flags"},":flag_ad:":{uc_base:"1f1e6-1f1e9",uc_output:"1f1e6-1f1e9",uc_match:"1f1e6-1f1e9",uc_greedy:"1f1e6-1f1e9",shortnames:[":ad:"],category:"flags"},":flag_ae:":{uc_base:"1f1e6-1f1ea",uc_output:"1f1e6-1f1ea",uc_match:"1f1e6-1f1ea",uc_greedy:"1f1e6-1f1ea",shortnames:[":ae:"],category:"flags"},":flag_af:":{uc_base:"1f1e6-1f1eb",uc_output:"1f1e6-1f1eb",uc_match:"1f1e6-1f1eb",uc_greedy:"1f1e6-1f1eb",shortnames:[":af:"],category:"flags"},":flag_ag:":{uc_base:"1f1e6-1f1ec",uc_output:"1f1e6-1f1ec",uc_match:"1f1e6-1f1ec",uc_greedy:"1f1e6-1f1ec",shortnames:[":ag:"],category:"flags"},":flag_ai:":{uc_base:"1f1e6-1f1ee",uc_output:"1f1e6-1f1ee",uc_match:"1f1e6-1f1ee",uc_greedy:"1f1e6-1f1ee",shortnames:[":ai:"],category:"flags"},":flag_al:":{uc_base:"1f1e6-1f1f1",uc_output:"1f1e6-1f1f1",uc_match:"1f1e6-1f1f1",uc_greedy:"1f1e6-1f1f1",shortnames:[":al:"],category:"flags"},":flag_am:":{uc_base:"1f1e6-1f1f2",uc_output:"1f1e6-1f1f2",uc_match:"1f1e6-1f1f2",uc_greedy:"1f1e6-1f1f2",shortnames:[":am:"],category:"flags"},":flag_ao:":{uc_base:"1f1e6-1f1f4",uc_output:"1f1e6-1f1f4",uc_match:"1f1e6-1f1f4",uc_greedy:"1f1e6-1f1f4",shortnames:[":ao:"],category:"flags"},":flag_aq:":{uc_base:"1f1e6-1f1f6",uc_output:"1f1e6-1f1f6",uc_match:"1f1e6-1f1f6",uc_greedy:"1f1e6-1f1f6",shortnames:[":aq:"],category:"flags"},":flag_ar:":{uc_base:"1f1e6-1f1f7",uc_output:"1f1e6-1f1f7",uc_match:"1f1e6-1f1f7",uc_greedy:"1f1e6-1f1f7",shortnames:[":ar:"],category:"flags"},":flag_as:":{uc_base:"1f1e6-1f1f8",uc_output:"1f1e6-1f1f8",uc_match:"1f1e6-1f1f8",uc_greedy:"1f1e6-1f1f8",shortnames:[":as:"],category:"flags"},":flag_at:":{uc_base:"1f1e6-1f1f9",uc_output:"1f1e6-1f1f9",uc_match:"1f1e6-1f1f9",uc_greedy:"1f1e6-1f1f9",shortnames:[":at:"],category:"flags"},":flag_au:":{uc_base:"1f1e6-1f1fa",uc_output:"1f1e6-1f1fa",uc_match:"1f1e6-1f1fa",uc_greedy:"1f1e6-1f1fa",shortnames:[":au:"],category:"flags"},":flag_aw:":{uc_base:"1f1e6-1f1fc",uc_output:"1f1e6-1f1fc",uc_match:"1f1e6-1f1fc",uc_greedy:"1f1e6-1f1fc",shortnames:[":aw:"],category:"flags"},":flag_ax:":{uc_base:"1f1e6-1f1fd",uc_output:"1f1e6-1f1fd",uc_match:"1f1e6-1f1fd",uc_greedy:"1f1e6-1f1fd",shortnames:[":ax:"],category:"flags"},":flag_az:":{uc_base:"1f1e6-1f1ff",uc_output:"1f1e6-1f1ff",uc_match:"1f1e6-1f1ff",uc_greedy:"1f1e6-1f1ff",shortnames:[":az:"],category:"flags"},":flag_ba:":{uc_base:"1f1e7-1f1e6",uc_output:"1f1e7-1f1e6",uc_match:"1f1e7-1f1e6",uc_greedy:"1f1e7-1f1e6",shortnames:[":ba:"],category:"flags"},":flag_bb:":{uc_base:"1f1e7-1f1e7",uc_output:"1f1e7-1f1e7",uc_match:"1f1e7-1f1e7",uc_greedy:"1f1e7-1f1e7",shortnames:[":bb:"],category:"flags"},":flag_bd:":{uc_base:"1f1e7-1f1e9",uc_output:"1f1e7-1f1e9",uc_match:"1f1e7-1f1e9",uc_greedy:"1f1e7-1f1e9",shortnames:[":bd:"],category:"flags"},":flag_be:":{uc_base:"1f1e7-1f1ea",uc_output:"1f1e7-1f1ea",uc_match:"1f1e7-1f1ea",uc_greedy:"1f1e7-1f1ea",shortnames:[":be:"],category:"flags"},":flag_bf:":{uc_base:"1f1e7-1f1eb",uc_output:"1f1e7-1f1eb",uc_match:"1f1e7-1f1eb",uc_greedy:"1f1e7-1f1eb",shortnames:[":bf:"],category:"flags"},":flag_bg:":{uc_base:"1f1e7-1f1ec",uc_output:"1f1e7-1f1ec",uc_match:"1f1e7-1f1ec",uc_greedy:"1f1e7-1f1ec",shortnames:[":bg:"],category:"flags"},":flag_bh:":{uc_base:"1f1e7-1f1ed",uc_output:"1f1e7-1f1ed",uc_match:"1f1e7-1f1ed",uc_greedy:"1f1e7-1f1ed",shortnames:[":bh:"],category:"flags"},":flag_bi:":{uc_base:"1f1e7-1f1ee",uc_output:"1f1e7-1f1ee",uc_match:"1f1e7-1f1ee",uc_greedy:"1f1e7-1f1ee",shortnames:[":bi:"],category:"flags"},":flag_bj:":{uc_base:"1f1e7-1f1ef",uc_output:"1f1e7-1f1ef",uc_match:"1f1e7-1f1ef",uc_greedy:"1f1e7-1f1ef",shortnames:[":bj:"],category:"flags"},":flag_bl:":{uc_base:"1f1e7-1f1f1",uc_output:"1f1e7-1f1f1",uc_match:"1f1e7-1f1f1",uc_greedy:"1f1e7-1f1f1",shortnames:[":bl:"],category:"flags"},":flag_bm:":{uc_base:"1f1e7-1f1f2",uc_output:"1f1e7-1f1f2",uc_match:"1f1e7-1f1f2",uc_greedy:"1f1e7-1f1f2",shortnames:[":bm:"],category:"flags"},":flag_bn:":{uc_base:"1f1e7-1f1f3",uc_output:"1f1e7-1f1f3",uc_match:"1f1e7-1f1f3",uc_greedy:"1f1e7-1f1f3",shortnames:[":bn:"],category:"flags"},":flag_bo:":{uc_base:"1f1e7-1f1f4",uc_output:"1f1e7-1f1f4",uc_match:"1f1e7-1f1f4",uc_greedy:"1f1e7-1f1f4",shortnames:[":bo:"],category:"flags"},":flag_bq:":{uc_base:"1f1e7-1f1f6",uc_output:"1f1e7-1f1f6",uc_match:"1f1e7-1f1f6",uc_greedy:"1f1e7-1f1f6",shortnames:[":bq:"],category:"flags"},":flag_br:":{uc_base:"1f1e7-1f1f7",uc_output:"1f1e7-1f1f7",uc_match:"1f1e7-1f1f7",uc_greedy:"1f1e7-1f1f7",shortnames:[":br:"],category:"flags"},":flag_bs:":{uc_base:"1f1e7-1f1f8",uc_output:"1f1e7-1f1f8",uc_match:"1f1e7-1f1f8",uc_greedy:"1f1e7-1f1f8",shortnames:[":bs:"],category:"flags"},":flag_bt:":{uc_base:"1f1e7-1f1f9",uc_output:"1f1e7-1f1f9",uc_match:"1f1e7-1f1f9",uc_greedy:"1f1e7-1f1f9",shortnames:[":bt:"],category:"flags"},":flag_bv:":{uc_base:"1f1e7-1f1fb",uc_output:"1f1e7-1f1fb",uc_match:"1f1e7-1f1fb",uc_greedy:"1f1e7-1f1fb",shortnames:[":bv:"],category:"flags"},":flag_bw:":{uc_base:"1f1e7-1f1fc",uc_output:"1f1e7-1f1fc",uc_match:"1f1e7-1f1fc",uc_greedy:"1f1e7-1f1fc",shortnames:[":bw:"],category:"flags"},":flag_by:":{uc_base:"1f1e7-1f1fe",uc_output:"1f1e7-1f1fe",uc_match:"1f1e7-1f1fe",uc_greedy:"1f1e7-1f1fe",shortnames:[":by:"],category:"flags"},":flag_bz:":{uc_base:"1f1e7-1f1ff",uc_output:"1f1e7-1f1ff",uc_match:"1f1e7-1f1ff",uc_greedy:"1f1e7-1f1ff",shortnames:[":bz:"],category:"flags"},":flag_ca:":{uc_base:"1f1e8-1f1e6",uc_output:"1f1e8-1f1e6",uc_match:"1f1e8-1f1e6",uc_greedy:"1f1e8-1f1e6",shortnames:[":ca:"],category:"flags"},":flag_cc:":{uc_base:"1f1e8-1f1e8",uc_output:"1f1e8-1f1e8",uc_match:"1f1e8-1f1e8",uc_greedy:"1f1e8-1f1e8",shortnames:[":cc:"],category:"flags"},":flag_cd:":{uc_base:"1f1e8-1f1e9",uc_output:"1f1e8-1f1e9",uc_match:"1f1e8-1f1e9",uc_greedy:"1f1e8-1f1e9",shortnames:[":congo:"],category:"flags"},":flag_cf:":{uc_base:"1f1e8-1f1eb",uc_output:"1f1e8-1f1eb",uc_match:"1f1e8-1f1eb",uc_greedy:"1f1e8-1f1eb",shortnames:[":cf:"],category:"flags"},":flag_cg:":{uc_base:"1f1e8-1f1ec",uc_output:"1f1e8-1f1ec",uc_match:"1f1e8-1f1ec",uc_greedy:"1f1e8-1f1ec",shortnames:[":cg:"],category:"flags"},":flag_ch:":{uc_base:"1f1e8-1f1ed",uc_output:"1f1e8-1f1ed",uc_match:"1f1e8-1f1ed",uc_greedy:"1f1e8-1f1ed",shortnames:[":ch:"],category:"flags"},":flag_ci:":{uc_base:"1f1e8-1f1ee",uc_output:"1f1e8-1f1ee",uc_match:"1f1e8-1f1ee",uc_greedy:"1f1e8-1f1ee",shortnames:[":ci:"],category:"flags"},":flag_ck:":{uc_base:"1f1e8-1f1f0",uc_output:"1f1e8-1f1f0",uc_match:"1f1e8-1f1f0",uc_greedy:"1f1e8-1f1f0",shortnames:[":ck:"],category:"flags"},":flag_cl:":{uc_base:"1f1e8-1f1f1",uc_output:"1f1e8-1f1f1",uc_match:"1f1e8-1f1f1",uc_greedy:"1f1e8-1f1f1",shortnames:[":chile:"],category:"flags"},":flag_cm:":{uc_base:"1f1e8-1f1f2",uc_output:"1f1e8-1f1f2",uc_match:"1f1e8-1f1f2",uc_greedy:"1f1e8-1f1f2",shortnames:[":cm:"],category:"flags"},":flag_cn:":{uc_base:"1f1e8-1f1f3",uc_output:"1f1e8-1f1f3",uc_match:"1f1e8-1f1f3",uc_greedy:"1f1e8-1f1f3",shortnames:[":cn:"],category:"flags"},":flag_co:":{uc_base:"1f1e8-1f1f4",uc_output:"1f1e8-1f1f4",uc_match:"1f1e8-1f1f4",uc_greedy:"1f1e8-1f1f4",shortnames:[":co:"],category:"flags"},":flag_cp:":{uc_base:"1f1e8-1f1f5",uc_output:"1f1e8-1f1f5",uc_match:"1f1e8-1f1f5",uc_greedy:"1f1e8-1f1f5",shortnames:[":cp:"],category:"flags"},":flag_cr:":{uc_base:"1f1e8-1f1f7",uc_output:"1f1e8-1f1f7",uc_match:"1f1e8-1f1f7",uc_greedy:"1f1e8-1f1f7",shortnames:[":cr:"],category:"flags"},":flag_cu:":{uc_base:"1f1e8-1f1fa",uc_output:"1f1e8-1f1fa",uc_match:"1f1e8-1f1fa",uc_greedy:"1f1e8-1f1fa",shortnames:[":cu:"],category:"flags"},":flag_cv:":{uc_base:"1f1e8-1f1fb",uc_output:"1f1e8-1f1fb",uc_match:"1f1e8-1f1fb",uc_greedy:"1f1e8-1f1fb",shortnames:[":cv:"],category:"flags"},":flag_cw:":{uc_base:"1f1e8-1f1fc",uc_output:"1f1e8-1f1fc",uc_match:"1f1e8-1f1fc",uc_greedy:"1f1e8-1f1fc",shortnames:[":cw:"],category:"flags"},":flag_cx:":{uc_base:"1f1e8-1f1fd",uc_output:"1f1e8-1f1fd",uc_match:"1f1e8-1f1fd",uc_greedy:"1f1e8-1f1fd",shortnames:[":cx:"],category:"flags"},":flag_cy:":{uc_base:"1f1e8-1f1fe",uc_output:"1f1e8-1f1fe",uc_match:"1f1e8-1f1fe",uc_greedy:"1f1e8-1f1fe",shortnames:[":cy:"],category:"flags"},":flag_cz:":{uc_base:"1f1e8-1f1ff",uc_output:"1f1e8-1f1ff",uc_match:"1f1e8-1f1ff",uc_greedy:"1f1e8-1f1ff",shortnames:[":cz:"],category:"flags"},":flag_de:":{uc_base:"1f1e9-1f1ea",uc_output:"1f1e9-1f1ea",uc_match:"1f1e9-1f1ea",uc_greedy:"1f1e9-1f1ea",shortnames:[":de:"],category:"flags"},":flag_dg:":{uc_base:"1f1e9-1f1ec",uc_output:"1f1e9-1f1ec",uc_match:"1f1e9-1f1ec",uc_greedy:"1f1e9-1f1ec",shortnames:[":dg:"],category:"flags"},":flag_dj:":{uc_base:"1f1e9-1f1ef",uc_output:"1f1e9-1f1ef",uc_match:"1f1e9-1f1ef",uc_greedy:"1f1e9-1f1ef",shortnames:[":dj:"],category:"flags"},":flag_dk:":{uc_base:"1f1e9-1f1f0",uc_output:"1f1e9-1f1f0",uc_match:"1f1e9-1f1f0",uc_greedy:"1f1e9-1f1f0",shortnames:[":dk:"],category:"flags"},":flag_dm:":{uc_base:"1f1e9-1f1f2",uc_output:"1f1e9-1f1f2",uc_match:"1f1e9-1f1f2",uc_greedy:"1f1e9-1f1f2",shortnames:[":dm:"],category:"flags"},":flag_do:":{uc_base:"1f1e9-1f1f4",uc_output:"1f1e9-1f1f4",uc_match:"1f1e9-1f1f4",uc_greedy:"1f1e9-1f1f4",shortnames:[":do:"],category:"flags"},":flag_dz:":{uc_base:"1f1e9-1f1ff",uc_output:"1f1e9-1f1ff",uc_match:"1f1e9-1f1ff",uc_greedy:"1f1e9-1f1ff",shortnames:[":dz:"],category:"flags"},":flag_ea:":{uc_base:"1f1ea-1f1e6",uc_output:"1f1ea-1f1e6",uc_match:"1f1ea-1f1e6",uc_greedy:"1f1ea-1f1e6",shortnames:[":ea:"],category:"flags"},":flag_ec:":{uc_base:"1f1ea-1f1e8",uc_output:"1f1ea-1f1e8",uc_match:"1f1ea-1f1e8",uc_greedy:"1f1ea-1f1e8",shortnames:[":ec:"],category:"flags"},":flag_ee:":{uc_base:"1f1ea-1f1ea",uc_output:"1f1ea-1f1ea",uc_match:"1f1ea-1f1ea",uc_greedy:"1f1ea-1f1ea",shortnames:[":ee:"],category:"flags"},":flag_eg:":{uc_base:"1f1ea-1f1ec",uc_output:"1f1ea-1f1ec",uc_match:"1f1ea-1f1ec",uc_greedy:"1f1ea-1f1ec",shortnames:[":eg:"],category:"flags"},":flag_eh:":{uc_base:"1f1ea-1f1ed",uc_output:"1f1ea-1f1ed",uc_match:"1f1ea-1f1ed",uc_greedy:"1f1ea-1f1ed",shortnames:[":eh:"],category:"flags"},":flag_er:":{uc_base:"1f1ea-1f1f7",uc_output:"1f1ea-1f1f7",uc_match:"1f1ea-1f1f7",uc_greedy:"1f1ea-1f1f7",shortnames:[":er:"],category:"flags"},":flag_es:":{uc_base:"1f1ea-1f1f8",uc_output:"1f1ea-1f1f8",uc_match:"1f1ea-1f1f8",uc_greedy:"1f1ea-1f1f8",shortnames:[":es:"],category:"flags"},":flag_et:":{uc_base:"1f1ea-1f1f9",uc_output:"1f1ea-1f1f9",uc_match:"1f1ea-1f1f9",uc_greedy:"1f1ea-1f1f9",shortnames:[":et:"],category:"flags"},":flag_eu:":{uc_base:"1f1ea-1f1fa",uc_output:"1f1ea-1f1fa",uc_match:"1f1ea-1f1fa",uc_greedy:"1f1ea-1f1fa",shortnames:[":eu:"],category:"flags"},":flag_fi:":{uc_base:"1f1eb-1f1ee",uc_output:"1f1eb-1f1ee",uc_match:"1f1eb-1f1ee",uc_greedy:"1f1eb-1f1ee",shortnames:[":fi:"],category:"flags"},":flag_fj:":{uc_base:"1f1eb-1f1ef",uc_output:"1f1eb-1f1ef",uc_match:"1f1eb-1f1ef",uc_greedy:"1f1eb-1f1ef",shortnames:[":fj:"],category:"flags"},":flag_fk:":{uc_base:"1f1eb-1f1f0",uc_output:"1f1eb-1f1f0",uc_match:"1f1eb-1f1f0",uc_greedy:"1f1eb-1f1f0",shortnames:[":fk:"],category:"flags"},":flag_fm:":{uc_base:"1f1eb-1f1f2",uc_output:"1f1eb-1f1f2",uc_match:"1f1eb-1f1f2",uc_greedy:"1f1eb-1f1f2",shortnames:[":fm:"],category:"flags"},":flag_fo:":{uc_base:"1f1eb-1f1f4",uc_output:"1f1eb-1f1f4",uc_match:"1f1eb-1f1f4",uc_greedy:"1f1eb-1f1f4",shortnames:[":fo:"],category:"flags"},":flag_fr:":{uc_base:"1f1eb-1f1f7",uc_output:"1f1eb-1f1f7",uc_match:"1f1eb-1f1f7",uc_greedy:"1f1eb-1f1f7",shortnames:[":fr:"],category:"flags"},":flag_ga:":{uc_base:"1f1ec-1f1e6",uc_output:"1f1ec-1f1e6",uc_match:"1f1ec-1f1e6",uc_greedy:"1f1ec-1f1e6",shortnames:[":ga:"],category:"flags"},":flag_gb:":{uc_base:"1f1ec-1f1e7",uc_output:"1f1ec-1f1e7",uc_match:"1f1ec-1f1e7",uc_greedy:"1f1ec-1f1e7",shortnames:[":gb:"],category:"flags"},":flag_gd:":{uc_base:"1f1ec-1f1e9",uc_output:"1f1ec-1f1e9",uc_match:"1f1ec-1f1e9",uc_greedy:"1f1ec-1f1e9",shortnames:[":gd:"],category:"flags"},":flag_ge:":{uc_base:"1f1ec-1f1ea",uc_output:"1f1ec-1f1ea",uc_match:"1f1ec-1f1ea",uc_greedy:"1f1ec-1f1ea",shortnames:[":ge:"],category:"flags"},":flag_gf:":{uc_base:"1f1ec-1f1eb",uc_output:"1f1ec-1f1eb",uc_match:"1f1ec-1f1eb",uc_greedy:"1f1ec-1f1eb",shortnames:[":gf:"],category:"flags"},":flag_gg:":{uc_base:"1f1ec-1f1ec",uc_output:"1f1ec-1f1ec",uc_match:"1f1ec-1f1ec",uc_greedy:"1f1ec-1f1ec",shortnames:[":gg:"],category:"flags"},":flag_gh:":{uc_base:"1f1ec-1f1ed",uc_output:"1f1ec-1f1ed",uc_match:"1f1ec-1f1ed",uc_greedy:"1f1ec-1f1ed",shortnames:[":gh:"],category:"flags"},":flag_gi:":{uc_base:"1f1ec-1f1ee",uc_output:"1f1ec-1f1ee",uc_match:"1f1ec-1f1ee",uc_greedy:"1f1ec-1f1ee",shortnames:[":gi:"],category:"flags"},":flag_gl:":{uc_base:"1f1ec-1f1f1",uc_output:"1f1ec-1f1f1",uc_match:"1f1ec-1f1f1",uc_greedy:"1f1ec-1f1f1",shortnames:[":gl:"],category:"flags"},":flag_gm:":{uc_base:"1f1ec-1f1f2",uc_output:"1f1ec-1f1f2",uc_match:"1f1ec-1f1f2",uc_greedy:"1f1ec-1f1f2",shortnames:[":gm:"],category:"flags"},":flag_gn:":{uc_base:"1f1ec-1f1f3",uc_output:"1f1ec-1f1f3",uc_match:"1f1ec-1f1f3",uc_greedy:"1f1ec-1f1f3",shortnames:[":gn:"],category:"flags"},":flag_gp:":{uc_base:"1f1ec-1f1f5",uc_output:"1f1ec-1f1f5",uc_match:"1f1ec-1f1f5",uc_greedy:"1f1ec-1f1f5",shortnames:[":gp:"],category:"flags"},":flag_gq:":{uc_base:"1f1ec-1f1f6",uc_output:"1f1ec-1f1f6",uc_match:"1f1ec-1f1f6",uc_greedy:"1f1ec-1f1f6",shortnames:[":gq:"],category:"flags"},":flag_gr:":{uc_base:"1f1ec-1f1f7",uc_output:"1f1ec-1f1f7",uc_match:"1f1ec-1f1f7",uc_greedy:"1f1ec-1f1f7",shortnames:[":gr:"],category:"flags"},":flag_gs:":{uc_base:"1f1ec-1f1f8",uc_output:"1f1ec-1f1f8",uc_match:"1f1ec-1f1f8",uc_greedy:"1f1ec-1f1f8",shortnames:[":gs:"],category:"flags"},":flag_gt:":{uc_base:"1f1ec-1f1f9",uc_output:"1f1ec-1f1f9",uc_match:"1f1ec-1f1f9",uc_greedy:"1f1ec-1f1f9",shortnames:[":gt:"],category:"flags"},":flag_gu:":{uc_base:"1f1ec-1f1fa",uc_output:"1f1ec-1f1fa",uc_match:"1f1ec-1f1fa",uc_greedy:"1f1ec-1f1fa",shortnames:[":gu:"],category:"flags"},":flag_gw:":{uc_base:"1f1ec-1f1fc",uc_output:"1f1ec-1f1fc",uc_match:"1f1ec-1f1fc",uc_greedy:"1f1ec-1f1fc",shortnames:[":gw:"],category:"flags"},":flag_gy:":{uc_base:"1f1ec-1f1fe",uc_output:"1f1ec-1f1fe",uc_match:"1f1ec-1f1fe",uc_greedy:"1f1ec-1f1fe",shortnames:[":gy:"],category:"flags"},":flag_hk:":{uc_base:"1f1ed-1f1f0",uc_output:"1f1ed-1f1f0",uc_match:"1f1ed-1f1f0",uc_greedy:"1f1ed-1f1f0",shortnames:[":hk:"],category:"flags"},":flag_hm:":{uc_base:"1f1ed-1f1f2",uc_output:"1f1ed-1f1f2",uc_match:"1f1ed-1f1f2",uc_greedy:"1f1ed-1f1f2",shortnames:[":hm:"],category:"flags"},":flag_hn:":{uc_base:"1f1ed-1f1f3",uc_output:"1f1ed-1f1f3",uc_match:"1f1ed-1f1f3",uc_greedy:"1f1ed-1f1f3",shortnames:[":hn:"],category:"flags"},":flag_hr:":{uc_base:"1f1ed-1f1f7",uc_output:"1f1ed-1f1f7",uc_match:"1f1ed-1f1f7",uc_greedy:"1f1ed-1f1f7",shortnames:[":hr:"],category:"flags"},":flag_ht:":{uc_base:"1f1ed-1f1f9",uc_output:"1f1ed-1f1f9",uc_match:"1f1ed-1f1f9",uc_greedy:"1f1ed-1f1f9",shortnames:[":ht:"],category:"flags"},":flag_hu:":{uc_base:"1f1ed-1f1fa",uc_output:"1f1ed-1f1fa",uc_match:"1f1ed-1f1fa",uc_greedy:"1f1ed-1f1fa",shortnames:[":hu:"],category:"flags"},":flag_ic:":{uc_base:"1f1ee-1f1e8",uc_output:"1f1ee-1f1e8",uc_match:"1f1ee-1f1e8",uc_greedy:"1f1ee-1f1e8",shortnames:[":ic:"],category:"flags"},":flag_id:":{uc_base:"1f1ee-1f1e9",uc_output:"1f1ee-1f1e9",uc_match:"1f1ee-1f1e9",uc_greedy:"1f1ee-1f1e9",shortnames:[":indonesia:"],category:"flags"},":flag_ie:":{uc_base:"1f1ee-1f1ea",uc_output:"1f1ee-1f1ea",uc_match:"1f1ee-1f1ea",uc_greedy:"1f1ee-1f1ea",shortnames:[":ie:"],category:"flags"},":flag_il:":{uc_base:"1f1ee-1f1f1",uc_output:"1f1ee-1f1f1",uc_match:"1f1ee-1f1f1",uc_greedy:"1f1ee-1f1f1",shortnames:[":il:"],category:"flags"},":flag_im:":{uc_base:"1f1ee-1f1f2",uc_output:"1f1ee-1f1f2",uc_match:"1f1ee-1f1f2",uc_greedy:"1f1ee-1f1f2",shortnames:[":im:"],category:"flags"},":flag_in:":{uc_base:"1f1ee-1f1f3",uc_output:"1f1ee-1f1f3",uc_match:"1f1ee-1f1f3",uc_greedy:"1f1ee-1f1f3",shortnames:[":in:"],category:"flags"},":flag_io:":{uc_base:"1f1ee-1f1f4",uc_output:"1f1ee-1f1f4",uc_match:"1f1ee-1f1f4",uc_greedy:"1f1ee-1f1f4",shortnames:[":io:"],category:"flags"},":flag_iq:":{uc_base:"1f1ee-1f1f6",uc_output:"1f1ee-1f1f6",uc_match:"1f1ee-1f1f6",uc_greedy:"1f1ee-1f1f6",shortnames:[":iq:"],category:"flags"},":flag_ir:":{uc_base:"1f1ee-1f1f7",uc_output:"1f1ee-1f1f7",uc_match:"1f1ee-1f1f7",uc_greedy:"1f1ee-1f1f7",shortnames:[":ir:"],category:"flags"},":flag_is:":{uc_base:"1f1ee-1f1f8",uc_output:"1f1ee-1f1f8",uc_match:"1f1ee-1f1f8",uc_greedy:"1f1ee-1f1f8",shortnames:[":is:"],category:"flags"},":flag_it:":{uc_base:"1f1ee-1f1f9",uc_output:"1f1ee-1f1f9",uc_match:"1f1ee-1f1f9",uc_greedy:"1f1ee-1f1f9",shortnames:[":it:"],category:"flags"},":flag_je:":{uc_base:"1f1ef-1f1ea",uc_output:"1f1ef-1f1ea",uc_match:"1f1ef-1f1ea",uc_greedy:"1f1ef-1f1ea",shortnames:[":je:"],category:"flags"},":flag_jm:":{uc_base:"1f1ef-1f1f2",uc_output:"1f1ef-1f1f2",uc_match:"1f1ef-1f1f2",uc_greedy:"1f1ef-1f1f2",shortnames:[":jm:"],category:"flags"},":flag_jo:":{uc_base:"1f1ef-1f1f4",uc_output:"1f1ef-1f1f4",uc_match:"1f1ef-1f1f4",uc_greedy:"1f1ef-1f1f4",shortnames:[":jo:"],category:"flags"},":flag_jp:":{uc_base:"1f1ef-1f1f5",uc_output:"1f1ef-1f1f5",uc_match:"1f1ef-1f1f5",uc_greedy:"1f1ef-1f1f5",shortnames:[":jp:"],category:"flags"},":flag_ke:":{uc_base:"1f1f0-1f1ea",uc_output:"1f1f0-1f1ea",uc_match:"1f1f0-1f1ea",uc_greedy:"1f1f0-1f1ea",shortnames:[":ke:"],category:"flags"},":flag_kg:":{uc_base:"1f1f0-1f1ec",uc_output:"1f1f0-1f1ec",uc_match:"1f1f0-1f1ec",uc_greedy:"1f1f0-1f1ec",shortnames:[":kg:"],category:"flags"},":flag_kh:":{uc_base:"1f1f0-1f1ed",uc_output:"1f1f0-1f1ed",uc_match:"1f1f0-1f1ed",uc_greedy:"1f1f0-1f1ed",shortnames:[":kh:"],category:"flags"},":flag_ki:":{uc_base:"1f1f0-1f1ee",uc_output:"1f1f0-1f1ee",uc_match:"1f1f0-1f1ee",uc_greedy:"1f1f0-1f1ee",shortnames:[":ki:"],category:"flags"},":flag_km:":{uc_base:"1f1f0-1f1f2",uc_output:"1f1f0-1f1f2",uc_match:"1f1f0-1f1f2",uc_greedy:"1f1f0-1f1f2",shortnames:[":km:"],category:"flags"},":flag_kn:":{uc_base:"1f1f0-1f1f3",uc_output:"1f1f0-1f1f3",uc_match:"1f1f0-1f1f3",uc_greedy:"1f1f0-1f1f3",shortnames:[":kn:"],category:"flags"},":flag_kp:":{uc_base:"1f1f0-1f1f5",uc_output:"1f1f0-1f1f5",uc_match:"1f1f0-1f1f5",uc_greedy:"1f1f0-1f1f5",shortnames:[":kp:"],category:"flags"},":flag_kr:":{uc_base:"1f1f0-1f1f7",uc_output:"1f1f0-1f1f7",uc_match:"1f1f0-1f1f7",uc_greedy:"1f1f0-1f1f7",shortnames:[":kr:"],category:"flags"},":flag_kw:":{uc_base:"1f1f0-1f1fc",uc_output:"1f1f0-1f1fc",uc_match:"1f1f0-1f1fc",uc_greedy:"1f1f0-1f1fc",shortnames:[":kw:"],category:"flags"},":flag_ky:":{uc_base:"1f1f0-1f1fe",uc_output:"1f1f0-1f1fe",uc_match:"1f1f0-1f1fe",uc_greedy:"1f1f0-1f1fe",shortnames:[":ky:"],category:"flags"},":flag_kz:":{uc_base:"1f1f0-1f1ff",uc_output:"1f1f0-1f1ff",uc_match:"1f1f0-1f1ff",uc_greedy:"1f1f0-1f1ff",shortnames:[":kz:"],category:"flags"},":flag_la:":{uc_base:"1f1f1-1f1e6",uc_output:"1f1f1-1f1e6",uc_match:"1f1f1-1f1e6",uc_greedy:"1f1f1-1f1e6",shortnames:[":la:"],category:"flags"},":flag_lb:":{uc_base:"1f1f1-1f1e7",uc_output:"1f1f1-1f1e7",uc_match:"1f1f1-1f1e7",uc_greedy:"1f1f1-1f1e7",shortnames:[":lb:"],category:"flags"},":flag_lc:":{uc_base:"1f1f1-1f1e8",uc_output:"1f1f1-1f1e8",uc_match:"1f1f1-1f1e8",uc_greedy:"1f1f1-1f1e8",shortnames:[":lc:"],category:"flags"},":flag_li:":{uc_base:"1f1f1-1f1ee",uc_output:"1f1f1-1f1ee",uc_match:"1f1f1-1f1ee",uc_greedy:"1f1f1-1f1ee",shortnames:[":li:"],category:"flags"},":flag_lk:":{uc_base:"1f1f1-1f1f0",uc_output:"1f1f1-1f1f0",uc_match:"1f1f1-1f1f0",uc_greedy:"1f1f1-1f1f0",shortnames:[":lk:"],category:"flags"},":flag_lr:":{uc_base:"1f1f1-1f1f7",uc_output:"1f1f1-1f1f7",uc_match:"1f1f1-1f1f7",uc_greedy:"1f1f1-1f1f7",shortnames:[":lr:"],category:"flags"},":flag_ls:":{uc_base:"1f1f1-1f1f8",uc_output:"1f1f1-1f1f8",uc_match:"1f1f1-1f1f8",uc_greedy:"1f1f1-1f1f8",shortnames:[":ls:"],category:"flags"},":flag_lt:":{uc_base:"1f1f1-1f1f9",uc_output:"1f1f1-1f1f9",uc_match:"1f1f1-1f1f9",uc_greedy:"1f1f1-1f1f9",shortnames:[":lt:"],category:"flags"},":flag_lu:":{uc_base:"1f1f1-1f1fa",uc_output:"1f1f1-1f1fa",uc_match:"1f1f1-1f1fa",uc_greedy:"1f1f1-1f1fa",shortnames:[":lu:"],category:"flags"},":flag_lv:":{uc_base:"1f1f1-1f1fb",uc_output:"1f1f1-1f1fb",uc_match:"1f1f1-1f1fb",uc_greedy:"1f1f1-1f1fb",shortnames:[":lv:"],category:"flags"},":flag_ly:":{uc_base:"1f1f1-1f1fe",uc_output:"1f1f1-1f1fe",uc_match:"1f1f1-1f1fe",uc_greedy:"1f1f1-1f1fe",shortnames:[":ly:"],category:"flags"},":flag_ma:":{uc_base:"1f1f2-1f1e6",uc_output:"1f1f2-1f1e6",uc_match:"1f1f2-1f1e6",uc_greedy:"1f1f2-1f1e6",shortnames:[":ma:"],category:"flags"},":flag_mc:":{uc_base:"1f1f2-1f1e8",uc_output:"1f1f2-1f1e8",uc_match:"1f1f2-1f1e8",uc_greedy:"1f1f2-1f1e8",shortnames:[":mc:"],category:"flags"},":flag_md:":{uc_base:"1f1f2-1f1e9",uc_output:"1f1f2-1f1e9",uc_match:"1f1f2-1f1e9",uc_greedy:"1f1f2-1f1e9",shortnames:[":md:"],category:"flags"},":flag_me:":{uc_base:"1f1f2-1f1ea",uc_output:"1f1f2-1f1ea",uc_match:"1f1f2-1f1ea",uc_greedy:"1f1f2-1f1ea",shortnames:[":me:"],category:"flags"},":flag_mf:":{uc_base:"1f1f2-1f1eb",uc_output:"1f1f2-1f1eb",uc_match:"1f1f2-1f1eb",uc_greedy:"1f1f2-1f1eb",shortnames:[":mf:"],category:"flags"},":flag_mg:":{uc_base:"1f1f2-1f1ec",uc_output:"1f1f2-1f1ec",uc_match:"1f1f2-1f1ec",uc_greedy:"1f1f2-1f1ec",shortnames:[":mg:"],category:"flags"},":flag_mh:":{uc_base:"1f1f2-1f1ed",uc_output:"1f1f2-1f1ed",uc_match:"1f1f2-1f1ed",uc_greedy:"1f1f2-1f1ed",shortnames:[":mh:"],category:"flags"},":flag_mk:":{uc_base:"1f1f2-1f1f0",uc_output:"1f1f2-1f1f0",uc_match:"1f1f2-1f1f0",uc_greedy:"1f1f2-1f1f0",shortnames:[":mk:"],category:"flags"},":flag_ml:":{uc_base:"1f1f2-1f1f1",uc_output:"1f1f2-1f1f1",uc_match:"1f1f2-1f1f1",uc_greedy:"1f1f2-1f1f1",shortnames:[":ml:"],category:"flags"},":flag_mm:":{uc_base:"1f1f2-1f1f2",uc_output:"1f1f2-1f1f2",uc_match:"1f1f2-1f1f2",uc_greedy:"1f1f2-1f1f2",shortnames:[":mm:"],category:"flags"},":flag_mn:":{uc_base:"1f1f2-1f1f3",uc_output:"1f1f2-1f1f3",uc_match:"1f1f2-1f1f3",uc_greedy:"1f1f2-1f1f3",shortnames:[":mn:"],category:"flags"},":flag_mo:":{uc_base:"1f1f2-1f1f4",uc_output:"1f1f2-1f1f4",uc_match:"1f1f2-1f1f4",uc_greedy:"1f1f2-1f1f4",shortnames:[":mo:"],category:"flags"},":flag_mp:":{uc_base:"1f1f2-1f1f5",uc_output:"1f1f2-1f1f5",uc_match:"1f1f2-1f1f5",uc_greedy:"1f1f2-1f1f5",shortnames:[":mp:"],category:"flags"},":flag_mq:":{uc_base:"1f1f2-1f1f6",uc_output:"1f1f2-1f1f6",uc_match:"1f1f2-1f1f6",uc_greedy:"1f1f2-1f1f6",shortnames:[":mq:"],category:"flags"},":flag_mr:":{uc_base:"1f1f2-1f1f7",uc_output:"1f1f2-1f1f7",uc_match:"1f1f2-1f1f7",uc_greedy:"1f1f2-1f1f7",shortnames:[":mr:"],category:"flags"},":flag_ms:":{uc_base:"1f1f2-1f1f8",uc_output:"1f1f2-1f1f8",uc_match:"1f1f2-1f1f8",uc_greedy:"1f1f2-1f1f8",shortnames:[":ms:"],category:"flags"},":flag_mt:":{uc_base:"1f1f2-1f1f9",uc_output:"1f1f2-1f1f9",uc_match:"1f1f2-1f1f9",uc_greedy:"1f1f2-1f1f9",shortnames:[":mt:"],category:"flags"},":flag_mu:":{uc_base:"1f1f2-1f1fa",uc_output:"1f1f2-1f1fa",uc_match:"1f1f2-1f1fa",uc_greedy:"1f1f2-1f1fa",shortnames:[":mu:"],category:"flags"},":flag_mv:":{uc_base:"1f1f2-1f1fb",uc_output:"1f1f2-1f1fb",uc_match:"1f1f2-1f1fb",uc_greedy:"1f1f2-1f1fb",shortnames:[":mv:"],category:"flags"},":flag_mw:":{uc_base:"1f1f2-1f1fc",uc_output:"1f1f2-1f1fc",uc_match:"1f1f2-1f1fc",uc_greedy:"1f1f2-1f1fc",shortnames:[":mw:"],category:"flags"},":flag_mx:":{uc_base:"1f1f2-1f1fd",uc_output:"1f1f2-1f1fd",uc_match:"1f1f2-1f1fd",uc_greedy:"1f1f2-1f1fd",shortnames:[":mx:"],category:"flags"},":flag_my:":{uc_base:"1f1f2-1f1fe",uc_output:"1f1f2-1f1fe",uc_match:"1f1f2-1f1fe",uc_greedy:"1f1f2-1f1fe",shortnames:[":my:"],category:"flags"},":flag_mz:":{uc_base:"1f1f2-1f1ff",uc_output:"1f1f2-1f1ff",uc_match:"1f1f2-1f1ff",uc_greedy:"1f1f2-1f1ff",shortnames:[":mz:"],category:"flags"},":flag_na:":{uc_base:"1f1f3-1f1e6",uc_output:"1f1f3-1f1e6",uc_match:"1f1f3-1f1e6",uc_greedy:"1f1f3-1f1e6",shortnames:[":na:"],category:"flags"},":flag_nc:":{uc_base:"1f1f3-1f1e8",uc_output:"1f1f3-1f1e8",uc_match:"1f1f3-1f1e8",uc_greedy:"1f1f3-1f1e8",shortnames:[":nc:"],category:"flags"},":flag_ne:":{uc_base:"1f1f3-1f1ea",uc_output:"1f1f3-1f1ea",uc_match:"1f1f3-1f1ea",uc_greedy:"1f1f3-1f1ea",shortnames:[":ne:"],category:"flags"},":flag_nf:":{uc_base:"1f1f3-1f1eb",uc_output:"1f1f3-1f1eb",uc_match:"1f1f3-1f1eb",uc_greedy:"1f1f3-1f1eb",shortnames:[":nf:"],category:"flags"},":flag_ng:":{uc_base:"1f1f3-1f1ec",uc_output:"1f1f3-1f1ec",uc_match:"1f1f3-1f1ec",uc_greedy:"1f1f3-1f1ec",shortnames:[":nigeria:"],category:"flags"},":flag_ni:":{uc_base:"1f1f3-1f1ee",uc_output:"1f1f3-1f1ee",uc_match:"1f1f3-1f1ee",uc_greedy:"1f1f3-1f1ee",shortnames:[":ni:"],category:"flags"},":flag_nl:":{uc_base:"1f1f3-1f1f1",uc_output:"1f1f3-1f1f1",uc_match:"1f1f3-1f1f1",uc_greedy:"1f1f3-1f1f1",shortnames:[":nl:"],category:"flags"},":flag_no:":{uc_base:"1f1f3-1f1f4",uc_output:"1f1f3-1f1f4",uc_match:"1f1f3-1f1f4",uc_greedy:"1f1f3-1f1f4",shortnames:[":no:"],category:"flags"},":flag_np:":{uc_base:"1f1f3-1f1f5",uc_output:"1f1f3-1f1f5",uc_match:"1f1f3-1f1f5",uc_greedy:"1f1f3-1f1f5",shortnames:[":np:"],category:"flags"},":flag_nr:":{uc_base:"1f1f3-1f1f7",uc_output:"1f1f3-1f1f7",uc_match:"1f1f3-1f1f7",uc_greedy:"1f1f3-1f1f7",shortnames:[":nr:"],category:"flags"},":flag_nu:":{uc_base:"1f1f3-1f1fa",uc_output:"1f1f3-1f1fa",uc_match:"1f1f3-1f1fa",uc_greedy:"1f1f3-1f1fa",shortnames:[":nu:"],category:"flags"},":flag_nz:":{uc_base:"1f1f3-1f1ff",uc_output:"1f1f3-1f1ff",uc_match:"1f1f3-1f1ff",uc_greedy:"1f1f3-1f1ff",shortnames:[":nz:"],category:"flags"},":flag_om:":{uc_base:"1f1f4-1f1f2",uc_output:"1f1f4-1f1f2",uc_match:"1f1f4-1f1f2",uc_greedy:"1f1f4-1f1f2",shortnames:[":om:"],category:"flags"},":flag_pa:":{uc_base:"1f1f5-1f1e6",uc_output:"1f1f5-1f1e6",uc_match:"1f1f5-1f1e6",uc_greedy:"1f1f5-1f1e6",shortnames:[":pa:"],category:"flags"},":flag_pe:":{uc_base:"1f1f5-1f1ea",uc_output:"1f1f5-1f1ea",uc_match:"1f1f5-1f1ea",uc_greedy:"1f1f5-1f1ea",shortnames:[":pe:"],category:"flags"},":flag_pf:":{uc_base:"1f1f5-1f1eb",uc_output:"1f1f5-1f1eb",uc_match:"1f1f5-1f1eb",uc_greedy:"1f1f5-1f1eb",shortnames:[":pf:"],category:"flags"},":flag_pg:":{uc_base:"1f1f5-1f1ec",uc_output:"1f1f5-1f1ec",uc_match:"1f1f5-1f1ec",uc_greedy:"1f1f5-1f1ec",shortnames:[":pg:"],category:"flags"},":flag_ph:":{uc_base:"1f1f5-1f1ed",uc_output:"1f1f5-1f1ed",uc_match:"1f1f5-1f1ed",uc_greedy:"1f1f5-1f1ed",shortnames:[":ph:"],category:"flags"},":flag_pk:":{uc_base:"1f1f5-1f1f0",uc_output:"1f1f5-1f1f0",uc_match:"1f1f5-1f1f0",uc_greedy:"1f1f5-1f1f0",shortnames:[":pk:"],category:"flags"},":flag_pl:":{uc_base:"1f1f5-1f1f1",uc_output:"1f1f5-1f1f1",uc_match:"1f1f5-1f1f1",uc_greedy:"1f1f5-1f1f1",shortnames:[":pl:"],category:"flags"},":flag_pm:":{uc_base:"1f1f5-1f1f2",uc_output:"1f1f5-1f1f2",uc_match:"1f1f5-1f1f2",uc_greedy:"1f1f5-1f1f2",shortnames:[":pm:"],category:"flags"},":flag_pn:":{uc_base:"1f1f5-1f1f3",uc_output:"1f1f5-1f1f3",uc_match:"1f1f5-1f1f3",uc_greedy:"1f1f5-1f1f3",shortnames:[":pn:"],category:"flags"},":flag_pr:":{uc_base:"1f1f5-1f1f7",uc_output:"1f1f5-1f1f7",uc_match:"1f1f5-1f1f7",uc_greedy:"1f1f5-1f1f7",shortnames:[":pr:"],category:"flags"},":flag_ps:":{uc_base:"1f1f5-1f1f8",uc_output:"1f1f5-1f1f8",uc_match:"1f1f5-1f1f8",uc_greedy:"1f1f5-1f1f8",shortnames:[":ps:"],category:"flags"},":flag_pt:":{uc_base:"1f1f5-1f1f9",uc_output:"1f1f5-1f1f9",uc_match:"1f1f5-1f1f9",uc_greedy:"1f1f5-1f1f9",shortnames:[":pt:"],category:"flags"},":flag_pw:":{uc_base:"1f1f5-1f1fc",uc_output:"1f1f5-1f1fc",uc_match:"1f1f5-1f1fc",uc_greedy:"1f1f5-1f1fc",shortnames:[":pw:"],category:"flags"},":flag_py:":{uc_base:"1f1f5-1f1fe",uc_output:"1f1f5-1f1fe",uc_match:"1f1f5-1f1fe",uc_greedy:"1f1f5-1f1fe",shortnames:[":py:"],category:"flags"},":flag_qa:":{uc_base:"1f1f6-1f1e6",uc_output:"1f1f6-1f1e6",uc_match:"1f1f6-1f1e6",uc_greedy:"1f1f6-1f1e6",shortnames:[":qa:"],category:"flags"},":flag_re:":{uc_base:"1f1f7-1f1ea",uc_output:"1f1f7-1f1ea",uc_match:"1f1f7-1f1ea",uc_greedy:"1f1f7-1f1ea",shortnames:[":re:"],category:"flags"},":flag_ro:":{uc_base:"1f1f7-1f1f4",uc_output:"1f1f7-1f1f4",uc_match:"1f1f7-1f1f4",uc_greedy:"1f1f7-1f1f4",shortnames:[":ro:"],category:"flags"},":flag_rs:":{uc_base:"1f1f7-1f1f8",uc_output:"1f1f7-1f1f8",uc_match:"1f1f7-1f1f8",uc_greedy:"1f1f7-1f1f8",shortnames:[":rs:"],category:"flags"},":flag_ru:":{uc_base:"1f1f7-1f1fa",uc_output:"1f1f7-1f1fa",uc_match:"1f1f7-1f1fa",uc_greedy:"1f1f7-1f1fa",shortnames:[":ru:"],category:"flags"},":flag_rw:":{uc_base:"1f1f7-1f1fc",uc_output:"1f1f7-1f1fc",uc_match:"1f1f7-1f1fc",uc_greedy:"1f1f7-1f1fc",shortnames:[":rw:"],category:"flags"},":flag_sa:":{uc_base:"1f1f8-1f1e6",uc_output:"1f1f8-1f1e6",uc_match:"1f1f8-1f1e6",uc_greedy:"1f1f8-1f1e6",shortnames:[":saudiarabia:",":saudi:"],category:"flags"},":flag_sb:":{uc_base:"1f1f8-1f1e7",uc_output:"1f1f8-1f1e7",uc_match:"1f1f8-1f1e7",uc_greedy:"1f1f8-1f1e7",shortnames:[":sb:"],category:"flags"},":flag_sc:":{uc_base:"1f1f8-1f1e8",uc_output:"1f1f8-1f1e8",uc_match:"1f1f8-1f1e8",uc_greedy:"1f1f8-1f1e8",shortnames:[":sc:"],category:"flags"},":flag_sd:":{uc_base:"1f1f8-1f1e9",uc_output:"1f1f8-1f1e9",uc_match:"1f1f8-1f1e9",uc_greedy:"1f1f8-1f1e9",shortnames:[":sd:"],category:"flags"},":flag_se:":{uc_base:"1f1f8-1f1ea",uc_output:"1f1f8-1f1ea",uc_match:"1f1f8-1f1ea",uc_greedy:"1f1f8-1f1ea",shortnames:[":se:"],category:"flags"},":flag_sg:":{uc_base:"1f1f8-1f1ec",uc_output:"1f1f8-1f1ec",uc_match:"1f1f8-1f1ec",uc_greedy:"1f1f8-1f1ec",shortnames:[":sg:"],category:"flags"},":flag_sh:":{uc_base:"1f1f8-1f1ed",uc_output:"1f1f8-1f1ed",uc_match:"1f1f8-1f1ed",uc_greedy:"1f1f8-1f1ed",shortnames:[":sh:"],category:"flags"},":flag_si:":{uc_base:"1f1f8-1f1ee",uc_output:"1f1f8-1f1ee",uc_match:"1f1f8-1f1ee",uc_greedy:"1f1f8-1f1ee",shortnames:[":si:"],category:"flags"},":flag_sj:":{uc_base:"1f1f8-1f1ef",uc_output:"1f1f8-1f1ef",uc_match:"1f1f8-1f1ef",uc_greedy:"1f1f8-1f1ef",shortnames:[":sj:"],category:"flags"},":flag_sk:":{uc_base:"1f1f8-1f1f0",uc_output:"1f1f8-1f1f0",uc_match:"1f1f8-1f1f0",uc_greedy:"1f1f8-1f1f0",shortnames:[":sk:"],category:"flags"},":flag_sl:":{uc_base:"1f1f8-1f1f1",uc_output:"1f1f8-1f1f1",uc_match:"1f1f8-1f1f1",uc_greedy:"1f1f8-1f1f1",shortnames:[":sl:"],category:"flags"},":flag_sm:":{uc_base:"1f1f8-1f1f2",uc_output:"1f1f8-1f1f2",uc_match:"1f1f8-1f1f2",uc_greedy:"1f1f8-1f1f2",shortnames:[":sm:"],category:"flags"},":flag_sn:":{uc_base:"1f1f8-1f1f3",uc_output:"1f1f8-1f1f3",uc_match:"1f1f8-1f1f3",uc_greedy:"1f1f8-1f1f3",shortnames:[":sn:"],category:"flags"},":flag_so:":{uc_base:"1f1f8-1f1f4",uc_output:"1f1f8-1f1f4",uc_match:"1f1f8-1f1f4",uc_greedy:"1f1f8-1f1f4",shortnames:[":so:"],category:"flags"},":flag_sr:":{uc_base:"1f1f8-1f1f7",uc_output:"1f1f8-1f1f7",uc_match:"1f1f8-1f1f7",uc_greedy:"1f1f8-1f1f7",shortnames:[":sr:"],category:"flags"},":flag_ss:":{uc_base:"1f1f8-1f1f8",uc_output:"1f1f8-1f1f8",uc_match:"1f1f8-1f1f8",uc_greedy:"1f1f8-1f1f8",shortnames:[":ss:"],category:"flags"},":flag_st:":{uc_base:"1f1f8-1f1f9",uc_output:"1f1f8-1f1f9",uc_match:"1f1f8-1f1f9",uc_greedy:"1f1f8-1f1f9",shortnames:[":st:"],category:"flags"},":flag_sv:":{uc_base:"1f1f8-1f1fb",uc_output:"1f1f8-1f1fb",uc_match:"1f1f8-1f1fb",uc_greedy:"1f1f8-1f1fb",shortnames:[":sv:"],category:"flags"},":flag_sx:":{uc_base:"1f1f8-1f1fd",uc_output:"1f1f8-1f1fd",uc_match:"1f1f8-1f1fd",uc_greedy:"1f1f8-1f1fd",shortnames:[":sx:"],category:"flags"},":flag_sy:":{uc_base:"1f1f8-1f1fe",uc_output:"1f1f8-1f1fe",uc_match:"1f1f8-1f1fe",uc_greedy:"1f1f8-1f1fe",shortnames:[":sy:"],category:"flags"},":flag_sz:":{uc_base:"1f1f8-1f1ff",uc_output:"1f1f8-1f1ff",uc_match:"1f1f8-1f1ff",uc_greedy:"1f1f8-1f1ff",shortnames:[":sz:"],category:"flags"},":flag_ta:":{uc_base:"1f1f9-1f1e6",uc_output:"1f1f9-1f1e6",uc_match:"1f1f9-1f1e6",uc_greedy:"1f1f9-1f1e6",shortnames:[":ta:"],category:"flags"},":flag_tc:":{uc_base:"1f1f9-1f1e8",uc_output:"1f1f9-1f1e8",uc_match:"1f1f9-1f1e8",uc_greedy:"1f1f9-1f1e8",shortnames:[":tc:"],category:"flags"},":flag_td:":{uc_base:"1f1f9-1f1e9",uc_output:"1f1f9-1f1e9",uc_match:"1f1f9-1f1e9",uc_greedy:"1f1f9-1f1e9",shortnames:[":td:"],category:"flags"},":flag_tf:":{uc_base:"1f1f9-1f1eb",uc_output:"1f1f9-1f1eb",uc_match:"1f1f9-1f1eb",uc_greedy:"1f1f9-1f1eb",shortnames:[":tf:"],category:"flags"},":flag_tg:":{uc_base:"1f1f9-1f1ec",uc_output:"1f1f9-1f1ec",uc_match:"1f1f9-1f1ec",uc_greedy:"1f1f9-1f1ec",shortnames:[":tg:"],category:"flags"},":flag_th:":{uc_base:"1f1f9-1f1ed",uc_output:"1f1f9-1f1ed",uc_match:"1f1f9-1f1ed",uc_greedy:"1f1f9-1f1ed",shortnames:[":th:"],category:"flags"},":flag_tj:":{uc_base:"1f1f9-1f1ef",uc_output:"1f1f9-1f1ef",uc_match:"1f1f9-1f1ef",uc_greedy:"1f1f9-1f1ef",shortnames:[":tj:"],category:"flags"},":flag_tk:":{uc_base:"1f1f9-1f1f0",uc_output:"1f1f9-1f1f0",uc_match:"1f1f9-1f1f0",uc_greedy:"1f1f9-1f1f0",shortnames:[":tk:"],category:"flags"},":flag_tl:":{uc_base:"1f1f9-1f1f1",uc_output:"1f1f9-1f1f1",uc_match:"1f1f9-1f1f1",uc_greedy:"1f1f9-1f1f1",shortnames:[":tl:"],category:"flags"},":flag_tm:":{uc_base:"1f1f9-1f1f2",uc_output:"1f1f9-1f1f2",uc_match:"1f1f9-1f1f2",uc_greedy:"1f1f9-1f1f2",shortnames:[":turkmenistan:"],category:"flags"},":flag_tn:":{uc_base:"1f1f9-1f1f3",uc_output:"1f1f9-1f1f3",uc_match:"1f1f9-1f1f3",uc_greedy:"1f1f9-1f1f3",shortnames:[":tn:"],category:"flags"},":flag_to:":{uc_base:"1f1f9-1f1f4",uc_output:"1f1f9-1f1f4",uc_match:"1f1f9-1f1f4",uc_greedy:"1f1f9-1f1f4",shortnames:[":to:"],category:"flags"},":flag_tr:":{uc_base:"1f1f9-1f1f7",uc_output:"1f1f9-1f1f7",uc_match:"1f1f9-1f1f7",uc_greedy:"1f1f9-1f1f7",shortnames:[":tr:"],category:"flags"},":flag_tt:":{uc_base:"1f1f9-1f1f9",uc_output:"1f1f9-1f1f9",uc_match:"1f1f9-1f1f9",uc_greedy:"1f1f9-1f1f9",shortnames:[":tt:"],category:"flags"},":flag_tv:":{uc_base:"1f1f9-1f1fb",uc_output:"1f1f9-1f1fb",uc_match:"1f1f9-1f1fb",uc_greedy:"1f1f9-1f1fb",shortnames:[":tuvalu:"],category:"flags"},":flag_tw:":{uc_base:"1f1f9-1f1fc",uc_output:"1f1f9-1f1fc",uc_match:"1f1f9-1f1fc",uc_greedy:"1f1f9-1f1fc",shortnames:[":tw:"],category:"flags"},":flag_tz:":{uc_base:"1f1f9-1f1ff",uc_output:"1f1f9-1f1ff",uc_match:"1f1f9-1f1ff",uc_greedy:"1f1f9-1f1ff",shortnames:[":tz:"],category:"flags"},":flag_ua:":{uc_base:"1f1fa-1f1e6",uc_output:"1f1fa-1f1e6",uc_match:"1f1fa-1f1e6",uc_greedy:"1f1fa-1f1e6",shortnames:[":ua:"],category:"flags"},":flag_ug:":{uc_base:"1f1fa-1f1ec",uc_output:"1f1fa-1f1ec",uc_match:"1f1fa-1f1ec",uc_greedy:"1f1fa-1f1ec",shortnames:[":ug:"],category:"flags"},":flag_um:":{uc_base:"1f1fa-1f1f2",uc_output:"1f1fa-1f1f2",uc_match:"1f1fa-1f1f2",uc_greedy:"1f1fa-1f1f2",shortnames:[":um:"],category:"flags"},":flag_us:":{uc_base:"1f1fa-1f1f8",uc_output:"1f1fa-1f1f8",uc_match:"1f1fa-1f1f8",uc_greedy:"1f1fa-1f1f8",shortnames:[":us:"],category:"flags"},":flag_uy:":{uc_base:"1f1fa-1f1fe",uc_output:"1f1fa-1f1fe",uc_match:"1f1fa-1f1fe",uc_greedy:"1f1fa-1f1fe",shortnames:[":uy:"],category:"flags"},":flag_uz:":{uc_base:"1f1fa-1f1ff",uc_output:"1f1fa-1f1ff",uc_match:"1f1fa-1f1ff",uc_greedy:"1f1fa-1f1ff",shortnames:[":uz:"],category:"flags"},":flag_va:":{uc_base:"1f1fb-1f1e6",uc_output:"1f1fb-1f1e6",uc_match:"1f1fb-1f1e6",uc_greedy:"1f1fb-1f1e6",shortnames:[":va:"],category:"flags"},":flag_vc:":{uc_base:"1f1fb-1f1e8",uc_output:"1f1fb-1f1e8",uc_match:"1f1fb-1f1e8",uc_greedy:"1f1fb-1f1e8",shortnames:[":vc:"],category:"flags"},":flag_ve:":{uc_base:"1f1fb-1f1ea",uc_output:"1f1fb-1f1ea",uc_match:"1f1fb-1f1ea",uc_greedy:"1f1fb-1f1ea",shortnames:[":ve:"],category:"flags"},":flag_vg:":{uc_base:"1f1fb-1f1ec",uc_output:"1f1fb-1f1ec",uc_match:"1f1fb-1f1ec",uc_greedy:"1f1fb-1f1ec",shortnames:[":vg:"],category:"flags"},":flag_vi:":{uc_base:"1f1fb-1f1ee",uc_output:"1f1fb-1f1ee",uc_match:"1f1fb-1f1ee",uc_greedy:"1f1fb-1f1ee",shortnames:[":vi:"],category:"flags"},":flag_vn:":{uc_base:"1f1fb-1f1f3",uc_output:"1f1fb-1f1f3",uc_match:"1f1fb-1f1f3",uc_greedy:"1f1fb-1f1f3",shortnames:[":vn:"],category:"flags"},":flag_vu:":{uc_base:"1f1fb-1f1fa",uc_output:"1f1fb-1f1fa",uc_match:"1f1fb-1f1fa",uc_greedy:"1f1fb-1f1fa",shortnames:[":vu:"],category:"flags"},":flag_wf:":{uc_base:"1f1fc-1f1eb",uc_output:"1f1fc-1f1eb",uc_match:"1f1fc-1f1eb",uc_greedy:"1f1fc-1f1eb",shortnames:[":wf:"],category:"flags"},":flag_ws:":{uc_base:"1f1fc-1f1f8",uc_output:"1f1fc-1f1f8",uc_match:"1f1fc-1f1f8",uc_greedy:"1f1fc-1f1f8",shortnames:[":ws:"],category:"flags"},":flag_xk:":{uc_base:"1f1fd-1f1f0",uc_output:"1f1fd-1f1f0",uc_match:"1f1fd-1f1f0",uc_greedy:"1f1fd-1f1f0",shortnames:[":xk:"],category:"flags"},":flag_ye:":{uc_base:"1f1fe-1f1ea",uc_output:"1f1fe-1f1ea",uc_match:"1f1fe-1f1ea",uc_greedy:"1f1fe-1f1ea",shortnames:[":ye:"],category:"flags"},":flag_yt:":{uc_base:"1f1fe-1f1f9",uc_output:"1f1fe-1f1f9",uc_match:"1f1fe-1f1f9",uc_greedy:"1f1fe-1f1f9",shortnames:[":yt:"],category:"flags"},":flag_za:":{uc_base:"1f1ff-1f1e6",uc_output:"1f1ff-1f1e6",uc_match:"1f1ff-1f1e6",uc_greedy:"1f1ff-1f1e6",shortnames:[":za:"],category:"flags"},":flag_zm:":{uc_base:"1f1ff-1f1f2",uc_output:"1f1ff-1f1f2",uc_match:"1f1ff-1f1f2",uc_greedy:"1f1ff-1f1f2",shortnames:[":zm:"],category:"flags"},":flag_zw:":{uc_base:"1f1ff-1f1fc",uc_output:"1f1ff-1f1fc",uc_match:"1f1ff-1f1fc",uc_greedy:"1f1ff-1f1fc",shortnames:[":zw:"],category:"flags"},":foot_tone1:":{uc_base:"1f9b6-1f3fb",uc_output:"1f9b6-1f3fb",uc_match:"1f9b6-1f3fb",uc_greedy:"1f9b6-1f3fb",shortnames:[":foot_light_skin_tone:"],category:"people"},":foot_tone2:":{uc_base:"1f9b6-1f3fc",uc_output:"1f9b6-1f3fc",uc_match:"1f9b6-1f3fc",uc_greedy:"1f9b6-1f3fc",shortnames:[":foot_medium_light_skin_tone:"],category:"people"},":foot_tone3:":{uc_base:"1f9b6-1f3fd",uc_output:"1f9b6-1f3fd",uc_match:"1f9b6-1f3fd",uc_greedy:"1f9b6-1f3fd",shortnames:[":foot_medium_skin_tone:"],category:"people"},":foot_tone4:":{uc_base:"1f9b6-1f3fe",uc_output:"1f9b6-1f3fe",uc_match:"1f9b6-1f3fe",uc_greedy:"1f9b6-1f3fe",shortnames:[":foot_medium_dark_skin_tone:"],category:"people"},":foot_tone5:":{uc_base:"1f9b6-1f3ff",uc_output:"1f9b6-1f3ff",uc_match:"1f9b6-1f3ff",uc_greedy:"1f9b6-1f3ff",shortnames:[":foot_dark_skin_tone:"],category:"people"},":girl_tone1:":{uc_base:"1f467-1f3fb",uc_output:"1f467-1f3fb",uc_match:"1f467-1f3fb",uc_greedy:"1f467-1f3fb",shortnames:[],category:"people"},":girl_tone2:":{uc_base:"1f467-1f3fc",uc_output:"1f467-1f3fc",uc_match:"1f467-1f3fc",uc_greedy:"1f467-1f3fc",shortnames:[],category:"people"},":girl_tone3:":{uc_base:"1f467-1f3fd",uc_output:"1f467-1f3fd",uc_match:"1f467-1f3fd",uc_greedy:"1f467-1f3fd",shortnames:[],category:"people"},":girl_tone4:":{uc_base:"1f467-1f3fe",uc_output:"1f467-1f3fe",uc_match:"1f467-1f3fe",uc_greedy:"1f467-1f3fe",shortnames:[],category:"people"},":girl_tone5:":{uc_base:"1f467-1f3ff",uc_output:"1f467-1f3ff",uc_match:"1f467-1f3ff",uc_greedy:"1f467-1f3ff",shortnames:[],category:"people"},":guard_tone1:":{uc_base:"1f482-1f3fb",uc_output:"1f482-1f3fb",uc_match:"1f482-1f3fb",uc_greedy:"1f482-1f3fb",shortnames:[":guardsman_tone1:"],category:"people"},":guard_tone2:":{uc_base:"1f482-1f3fc",uc_output:"1f482-1f3fc",uc_match:"1f482-1f3fc",uc_greedy:"1f482-1f3fc",shortnames:[":guardsman_tone2:"],category:"people"},":guard_tone3:":{uc_base:"1f482-1f3fd",uc_output:"1f482-1f3fd",uc_match:"1f482-1f3fd",uc_greedy:"1f482-1f3fd",shortnames:[":guardsman_tone3:"],category:"people"},":guard_tone4:":{uc_base:"1f482-1f3fe",uc_output:"1f482-1f3fe",uc_match:"1f482-1f3fe",uc_greedy:"1f482-1f3fe",shortnames:[":guardsman_tone4:"],category:"people"},":guard_tone5:":{uc_base:"1f482-1f3ff",uc_output:"1f482-1f3ff",uc_match:"1f482-1f3ff",uc_greedy:"1f482-1f3ff",shortnames:[":guardsman_tone5:"],category:"people"},":hand_splayed_tone1:":{uc_base:"1f590-1f3fb",uc_output:"1f590-1f3fb",uc_match:"1f590-fe0f-1f3fb",uc_greedy:"1f590-fe0f-1f3fb",shortnames:[":raised_hand_with_fingers_splayed_tone1:"],category:"people"},":hand_splayed_tone2:":{uc_base:"1f590-1f3fc",uc_output:"1f590-1f3fc",uc_match:"1f590-fe0f-1f3fc",uc_greedy:"1f590-fe0f-1f3fc",shortnames:[":raised_hand_with_fingers_splayed_tone2:"],category:"people"},":hand_splayed_tone3:":{uc_base:"1f590-1f3fd",uc_output:"1f590-1f3fd",uc_match:"1f590-fe0f-1f3fd",uc_greedy:"1f590-fe0f-1f3fd",shortnames:[":raised_hand_with_fingers_splayed_tone3:"],category:"people"},":hand_splayed_tone4:":{uc_base:"1f590-1f3fe",uc_output:"1f590-1f3fe",uc_match:"1f590-fe0f-1f3fe",uc_greedy:"1f590-fe0f-1f3fe",shortnames:[":raised_hand_with_fingers_splayed_tone4:"],category:"people"},":hand_splayed_tone5:":{uc_base:"1f590-1f3ff",uc_output:"1f590-1f3ff",uc_match:"1f590-fe0f-1f3ff",uc_greedy:"1f590-fe0f-1f3ff",shortnames:[":raised_hand_with_fingers_splayed_tone5:"],category:"people"},":horse_racing_tone1:":{uc_base:"1f3c7-1f3fb",uc_output:"1f3c7-1f3fb",uc_match:"1f3c7-1f3fb",uc_greedy:"1f3c7-1f3fb",shortnames:[],category:"activity"},":horse_racing_tone2:":{uc_base:"1f3c7-1f3fc",uc_output:"1f3c7-1f3fc",uc_match:"1f3c7-1f3fc",uc_greedy:"1f3c7-1f3fc",shortnames:[],category:"activity"},":horse_racing_tone3:":{uc_base:"1f3c7-1f3fd",uc_output:"1f3c7-1f3fd",uc_match:"1f3c7-1f3fd",uc_greedy:"1f3c7-1f3fd",shortnames:[],category:"activity"},":horse_racing_tone4:":{uc_base:"1f3c7-1f3fe",uc_output:"1f3c7-1f3fe",uc_match:"1f3c7-1f3fe",uc_greedy:"1f3c7-1f3fe",shortnames:[],category:"activity"},":horse_racing_tone5:":{uc_base:"1f3c7-1f3ff",uc_output:"1f3c7-1f3ff",uc_match:"1f3c7-1f3ff",uc_greedy:"1f3c7-1f3ff",shortnames:[],category:"activity"},":left_facing_fist_tone1:":{uc_base:"1f91b-1f3fb",uc_output:"1f91b-1f3fb",uc_match:"1f91b-1f3fb",uc_greedy:"1f91b-1f3fb",shortnames:[":left_fist_tone1:"],category:"people"},":left_facing_fist_tone2:":{uc_base:"1f91b-1f3fc",uc_output:"1f91b-1f3fc",uc_match:"1f91b-1f3fc",uc_greedy:"1f91b-1f3fc",shortnames:[":left_fist_tone2:"],category:"people"},":left_facing_fist_tone3:":{uc_base:"1f91b-1f3fd",uc_output:"1f91b-1f3fd",uc_match:"1f91b-1f3fd",uc_greedy:"1f91b-1f3fd",shortnames:[":left_fist_tone3:"],category:"people"},":left_facing_fist_tone4:":{uc_base:"1f91b-1f3fe",uc_output:"1f91b-1f3fe",uc_match:"1f91b-1f3fe",uc_greedy:"1f91b-1f3fe",shortnames:[":left_fist_tone4:"],category:"people"},":left_facing_fist_tone5:":{uc_base:"1f91b-1f3ff",uc_output:"1f91b-1f3ff",uc_match:"1f91b-1f3ff",uc_greedy:"1f91b-1f3ff",shortnames:[":left_fist_tone5:"],category:"people"},":leg_tone1:":{uc_base:"1f9b5-1f3fb",uc_output:"1f9b5-1f3fb",uc_match:"1f9b5-1f3fb",uc_greedy:"1f9b5-1f3fb",shortnames:[":leg_light_skin_tone:"],category:"people"},":leg_tone2:":{uc_base:"1f9b5-1f3fc",uc_output:"1f9b5-1f3fc",uc_match:"1f9b5-1f3fc",uc_greedy:"1f9b5-1f3fc",shortnames:[":leg_medium_light_skin_tone:"],category:"people"},":leg_tone3:":{uc_base:"1f9b5-1f3fd",uc_output:"1f9b5-1f3fd",uc_match:"1f9b5-1f3fd",uc_greedy:"1f9b5-1f3fd",shortnames:[":leg_medium_skin_tone:"],category:"people"},":leg_tone4:":{uc_base:"1f9b5-1f3fe",uc_output:"1f9b5-1f3fe",uc_match:"1f9b5-1f3fe",uc_greedy:"1f9b5-1f3fe",shortnames:[":leg_medium_dark_skin_tone:"],category:"people"},":leg_tone5:":{uc_base:"1f9b5-1f3ff",uc_output:"1f9b5-1f3ff",uc_match:"1f9b5-1f3ff",uc_greedy:"1f9b5-1f3ff",shortnames:[":leg_dark_skin_tone:"],category:"people"},":levitate_tone1:":{uc_base:"1f574-1f3fb",uc_output:"1f574-1f3fb",uc_match:"1f574-fe0f-1f3fb",uc_greedy:"1f574-fe0f-1f3fb",shortnames:[":man_in_business_suit_levitating_tone1:",":man_in_business_suit_levitating_light_skin_tone:"],category:"people"},":levitate_tone2:":{uc_base:"1f574-1f3fc",uc_output:"1f574-1f3fc",uc_match:"1f574-fe0f-1f3fc",uc_greedy:"1f574-fe0f-1f3fc",shortnames:[":man_in_business_suit_levitating_tone2:",":man_in_business_suit_levitating_medium_light_skin_tone:"],category:"people"},":levitate_tone3:":{uc_base:"1f574-1f3fd",uc_output:"1f574-1f3fd",uc_match:"1f574-fe0f-1f3fd",uc_greedy:"1f574-fe0f-1f3fd",shortnames:[":man_in_business_suit_levitating_tone3:",":man_in_business_suit_levitating_medium_skin_tone:"],category:"people"},":levitate_tone4:":{uc_base:"1f574-1f3fe",uc_output:"1f574-1f3fe",uc_match:"1f574-fe0f-1f3fe",uc_greedy:"1f574-fe0f-1f3fe",shortnames:[":man_in_business_suit_levitating_tone4:",":man_in_business_suit_levitating_medium_dark_skin_tone:"],category:"people"},":levitate_tone5:":{uc_base:"1f574-1f3ff",uc_output:"1f574-1f3ff",uc_match:"1f574-fe0f-1f3ff",uc_greedy:"1f574-fe0f-1f3ff",shortnames:[":man_in_business_suit_levitating_tone5:",":man_in_business_suit_levitating_dark_skin_tone:"],category:"people"},":love_you_gesture_tone1:":{uc_base:"1f91f-1f3fb",uc_output:"1f91f-1f3fb",uc_match:"1f91f-1f3fb",uc_greedy:"1f91f-1f3fb",shortnames:[":love_you_gesture_light_skin_tone:"],category:"people"},":love_you_gesture_tone2:":{uc_base:"1f91f-1f3fc",uc_output:"1f91f-1f3fc",uc_match:"1f91f-1f3fc",uc_greedy:"1f91f-1f3fc",shortnames:[":love_you_gesture_medium_light_skin_tone:"],category:"people"},":love_you_gesture_tone3:":{uc_base:"1f91f-1f3fd",uc_output:"1f91f-1f3fd",uc_match:"1f91f-1f3fd",uc_greedy:"1f91f-1f3fd",shortnames:[":love_you_gesture_medium_skin_tone:"],category:"people"},":love_you_gesture_tone4:":{uc_base:"1f91f-1f3fe",uc_output:"1f91f-1f3fe",uc_match:"1f91f-1f3fe",uc_greedy:"1f91f-1f3fe",shortnames:[":love_you_gesture_medium_dark_skin_tone:"],category:"people"},":love_you_gesture_tone5:":{uc_base:"1f91f-1f3ff",uc_output:"1f91f-1f3ff",uc_match:"1f91f-1f3ff",uc_greedy:"1f91f-1f3ff",shortnames:[":love_you_gesture_dark_skin_tone:"],category:"people"},":mage_tone1:":{uc_base:"1f9d9-1f3fb",uc_output:"1f9d9-1f3fb",uc_match:"1f9d9-1f3fb",uc_greedy:"1f9d9-1f3fb",shortnames:[":mage_light_skin_tone:"],category:"people"},":mage_tone2:":{uc_base:"1f9d9-1f3fc",uc_output:"1f9d9-1f3fc",uc_match:"1f9d9-1f3fc",uc_greedy:"1f9d9-1f3fc",shortnames:[":mage_medium_light_skin_tone:"],category:"people"},":mage_tone3:":{uc_base:"1f9d9-1f3fd",uc_output:"1f9d9-1f3fd",uc_match:"1f9d9-1f3fd",uc_greedy:"1f9d9-1f3fd",shortnames:[":mage_medium_skin_tone:"],category:"people"},":mage_tone4:":{uc_base:"1f9d9-1f3fe",uc_output:"1f9d9-1f3fe",uc_match:"1f9d9-1f3fe",uc_greedy:"1f9d9-1f3fe",shortnames:[":mage_medium_dark_skin_tone:"],category:"people"},":mage_tone5:":{uc_base:"1f9d9-1f3ff",uc_output:"1f9d9-1f3ff",uc_match:"1f9d9-1f3ff",uc_greedy:"1f9d9-1f3ff",shortnames:[":mage_dark_skin_tone:"],category:"people"},":man_dancing_tone1:":{uc_base:"1f57a-1f3fb",uc_output:"1f57a-1f3fb",uc_match:"1f57a-1f3fb",uc_greedy:"1f57a-1f3fb",shortnames:[":male_dancer_tone1:"],category:"people"},":man_dancing_tone2:":{uc_base:"1f57a-1f3fc",uc_output:"1f57a-1f3fc",uc_match:"1f57a-1f3fc",uc_greedy:"1f57a-1f3fc",shortnames:[":male_dancer_tone2:"],category:"people"},":man_dancing_tone3:":{uc_base:"1f57a-1f3fd",uc_output:"1f57a-1f3fd",uc_match:"1f57a-1f3fd",uc_greedy:"1f57a-1f3fd",shortnames:[":male_dancer_tone3:"],category:"people"},":man_dancing_tone4:":{uc_base:"1f57a-1f3fe",uc_output:"1f57a-1f3fe",uc_match:"1f57a-1f3fe",uc_greedy:"1f57a-1f3fe",shortnames:[":male_dancer_tone4:"],category:"people"},":man_dancing_tone5:":{uc_base:"1f57a-1f3ff",uc_output:"1f57a-1f3ff",uc_match:"1f57a-1f3ff",uc_greedy:"1f57a-1f3ff",shortnames:[":male_dancer_tone5:"],category:"people"},":man_in_tuxedo_tone1:":{uc_base:"1f935-1f3fb",uc_output:"1f935-1f3fb",uc_match:"1f935-1f3fb",uc_greedy:"1f935-1f3fb",shortnames:[":tuxedo_tone1:"],category:"people"},":man_in_tuxedo_tone2:":{uc_base:"1f935-1f3fc",uc_output:"1f935-1f3fc",uc_match:"1f935-1f3fc",uc_greedy:"1f935-1f3fc",shortnames:[":tuxedo_tone2:"],category:"people"},":man_in_tuxedo_tone3:":{uc_base:"1f935-1f3fd",uc_output:"1f935-1f3fd",uc_match:"1f935-1f3fd",uc_greedy:"1f935-1f3fd",shortnames:[":tuxedo_tone3:"],category:"people"},":man_in_tuxedo_tone4:":{uc_base:"1f935-1f3fe",uc_output:"1f935-1f3fe",uc_match:"1f935-1f3fe",uc_greedy:"1f935-1f3fe",shortnames:[":tuxedo_tone4:"],category:"people"},":man_in_tuxedo_tone5:":{uc_base:"1f935-1f3ff",uc_output:"1f935-1f3ff",uc_match:"1f935-1f3ff",uc_greedy:"1f935-1f3ff",shortnames:[":tuxedo_tone5:"],category:"people"},":man_tone1:":{uc_base:"1f468-1f3fb",uc_output:"1f468-1f3fb",uc_match:"1f468-1f3fb",uc_greedy:"1f468-1f3fb",shortnames:[],category:"people"},":man_tone2:":{uc_base:"1f468-1f3fc",uc_output:"1f468-1f3fc",uc_match:"1f468-1f3fc",uc_greedy:"1f468-1f3fc",shortnames:[],category:"people"},":man_tone3:":{uc_base:"1f468-1f3fd",uc_output:"1f468-1f3fd",uc_match:"1f468-1f3fd",uc_greedy:"1f468-1f3fd",shortnames:[],category:"people"},":man_tone4:":{uc_base:"1f468-1f3fe",uc_output:"1f468-1f3fe",uc_match:"1f468-1f3fe",uc_greedy:"1f468-1f3fe",shortnames:[],category:"people"},":man_tone5:":{uc_base:"1f468-1f3ff",uc_output:"1f468-1f3ff",uc_match:"1f468-1f3ff",uc_greedy:"1f468-1f3ff",shortnames:[],category:"people"},":man_with_chinese_cap_tone1:":{uc_base:"1f472-1f3fb",uc_output:"1f472-1f3fb",uc_match:"1f472-1f3fb",uc_greedy:"1f472-1f3fb",shortnames:[":man_with_gua_pi_mao_tone1:"],category:"people"},":man_with_chinese_cap_tone2:":{uc_base:"1f472-1f3fc",uc_output:"1f472-1f3fc",uc_match:"1f472-1f3fc",uc_greedy:"1f472-1f3fc",shortnames:[":man_with_gua_pi_mao_tone2:"],category:"people"},":man_with_chinese_cap_tone3:":{uc_base:"1f472-1f3fd",uc_output:"1f472-1f3fd",uc_match:"1f472-1f3fd",uc_greedy:"1f472-1f3fd",shortnames:[":man_with_gua_pi_mao_tone3:"],category:"people"},":man_with_chinese_cap_tone4:":{uc_base:"1f472-1f3fe",uc_output:"1f472-1f3fe",uc_match:"1f472-1f3fe",uc_greedy:"1f472-1f3fe",shortnames:[":man_with_gua_pi_mao_tone4:"],category:"people"},":man_with_chinese_cap_tone5:":{uc_base:"1f472-1f3ff",uc_output:"1f472-1f3ff",uc_match:"1f472-1f3ff",uc_greedy:"1f472-1f3ff",shortnames:[":man_with_gua_pi_mao_tone5:"],category:"people"},":merperson_tone1:":{uc_base:"1f9dc-1f3fb",uc_output:"1f9dc-1f3fb",uc_match:"1f9dc-1f3fb",uc_greedy:"1f9dc-1f3fb",shortnames:[":merperson_light_skin_tone:"],category:"people"},":merperson_tone2:":{uc_base:"1f9dc-1f3fc",uc_output:"1f9dc-1f3fc",uc_match:"1f9dc-1f3fc",uc_greedy:"1f9dc-1f3fc",shortnames:[":merperson_medium_light_skin_tone:"],category:"people"},":merperson_tone3:":{uc_base:"1f9dc-1f3fd",uc_output:"1f9dc-1f3fd",uc_match:"1f9dc-1f3fd",uc_greedy:"1f9dc-1f3fd",shortnames:[":merperson_medium_skin_tone:"],category:"people"},":merperson_tone4:":{uc_base:"1f9dc-1f3fe",uc_output:"1f9dc-1f3fe",uc_match:"1f9dc-1f3fe",uc_greedy:"1f9dc-1f3fe",shortnames:[":merperson_medium_dark_skin_tone:"],category:"people"},":merperson_tone5:":{uc_base:"1f9dc-1f3ff",uc_output:"1f9dc-1f3ff",uc_match:"1f9dc-1f3ff",uc_greedy:"1f9dc-1f3ff",shortnames:[":merperson_dark_skin_tone:"],category:"people"},":metal_tone1:":{uc_base:"1f918-1f3fb",uc_output:"1f918-1f3fb",uc_match:"1f918-1f3fb",uc_greedy:"1f918-1f3fb",shortnames:[":sign_of_the_horns_tone1:"],category:"people"},":metal_tone2:":{uc_base:"1f918-1f3fc",uc_output:"1f918-1f3fc",uc_match:"1f918-1f3fc",uc_greedy:"1f918-1f3fc",shortnames:[":sign_of_the_horns_tone2:"],category:"people"},":metal_tone3:":{uc_base:"1f918-1f3fd",uc_output:"1f918-1f3fd",uc_match:"1f918-1f3fd",uc_greedy:"1f918-1f3fd",shortnames:[":sign_of_the_horns_tone3:"],category:"people"},":metal_tone4:":{uc_base:"1f918-1f3fe",uc_output:"1f918-1f3fe",uc_match:"1f918-1f3fe",uc_greedy:"1f918-1f3fe",shortnames:[":sign_of_the_horns_tone4:"],category:"people"},":metal_tone5:":{uc_base:"1f918-1f3ff",uc_output:"1f918-1f3ff",uc_match:"1f918-1f3ff",uc_greedy:"1f918-1f3ff",shortnames:[":sign_of_the_horns_tone5:"],category:"people"},":middle_finger_tone1:":{uc_base:"1f595-1f3fb",uc_output:"1f595-1f3fb",uc_match:"1f595-1f3fb",uc_greedy:"1f595-1f3fb",shortnames:[":reversed_hand_with_middle_finger_extended_tone1:"],category:"people"},":middle_finger_tone2:":{uc_base:"1f595-1f3fc",uc_output:"1f595-1f3fc",uc_match:"1f595-1f3fc",uc_greedy:"1f595-1f3fc",shortnames:[":reversed_hand_with_middle_finger_extended_tone2:"],category:"people"},":middle_finger_tone3:":{uc_base:"1f595-1f3fd",uc_output:"1f595-1f3fd",uc_match:"1f595-1f3fd",uc_greedy:"1f595-1f3fd",shortnames:[":reversed_hand_with_middle_finger_extended_tone3:"],category:"people"},":middle_finger_tone4:":{uc_base:"1f595-1f3fe",uc_output:"1f595-1f3fe",uc_match:"1f595-1f3fe",uc_greedy:"1f595-1f3fe",shortnames:[":reversed_hand_with_middle_finger_extended_tone4:"],category:"people"},":middle_finger_tone5:":{uc_base:"1f595-1f3ff",uc_output:"1f595-1f3ff",uc_match:"1f595-1f3ff",uc_greedy:"1f595-1f3ff",shortnames:[":reversed_hand_with_middle_finger_extended_tone5:"],category:"people"},":mrs_claus_tone1:":{uc_base:"1f936-1f3fb",uc_output:"1f936-1f3fb",uc_match:"1f936-1f3fb",uc_greedy:"1f936-1f3fb",shortnames:[":mother_christmas_tone1:"],category:"people"},":mrs_claus_tone2:":{uc_base:"1f936-1f3fc",uc_output:"1f936-1f3fc",uc_match:"1f936-1f3fc",uc_greedy:"1f936-1f3fc",shortnames:[":mother_christmas_tone2:"],category:"people"},":mrs_claus_tone3:":{uc_base:"1f936-1f3fd",uc_output:"1f936-1f3fd",uc_match:"1f936-1f3fd",uc_greedy:"1f936-1f3fd",shortnames:[":mother_christmas_tone3:"],category:"people"},":mrs_claus_tone4:":{uc_base:"1f936-1f3fe",uc_output:"1f936-1f3fe",uc_match:"1f936-1f3fe",uc_greedy:"1f936-1f3fe",shortnames:[":mother_christmas_tone4:"],category:"people"},":mrs_claus_tone5:":{uc_base:"1f936-1f3ff",uc_output:"1f936-1f3ff",uc_match:"1f936-1f3ff",uc_greedy:"1f936-1f3ff",shortnames:[":mother_christmas_tone5:"],category:"people"},":muscle_tone1:":{uc_base:"1f4aa-1f3fb",uc_output:"1f4aa-1f3fb",uc_match:"1f4aa-1f3fb",uc_greedy:"1f4aa-1f3fb",shortnames:[],category:"people"},":muscle_tone2:":{uc_base:"1f4aa-1f3fc",uc_output:"1f4aa-1f3fc",uc_match:"1f4aa-1f3fc",uc_greedy:"1f4aa-1f3fc",shortnames:[],category:"people"},":muscle_tone3:":{uc_base:"1f4aa-1f3fd",uc_output:"1f4aa-1f3fd",uc_match:"1f4aa-1f3fd",uc_greedy:"1f4aa-1f3fd",shortnames:[],category:"people"},":muscle_tone4:":{uc_base:"1f4aa-1f3fe",uc_output:"1f4aa-1f3fe",uc_match:"1f4aa-1f3fe",uc_greedy:"1f4aa-1f3fe",shortnames:[],category:"people"},":muscle_tone5:":{uc_base:"1f4aa-1f3ff",uc_output:"1f4aa-1f3ff",uc_match:"1f4aa-1f3ff",uc_greedy:"1f4aa-1f3ff",shortnames:[],category:"people"},":nail_care_tone1:":{uc_base:"1f485-1f3fb",uc_output:"1f485-1f3fb",uc_match:"1f485-1f3fb",uc_greedy:"1f485-1f3fb",shortnames:[],category:"people"},":nail_care_tone2:":{uc_base:"1f485-1f3fc",uc_output:"1f485-1f3fc",uc_match:"1f485-1f3fc",uc_greedy:"1f485-1f3fc",shortnames:[],category:"people"},":nail_care_tone3:":{uc_base:"1f485-1f3fd",uc_output:"1f485-1f3fd",uc_match:"1f485-1f3fd",uc_greedy:"1f485-1f3fd",shortnames:[],category:"people"},":nail_care_tone4:":{uc_base:"1f485-1f3fe",uc_output:"1f485-1f3fe",uc_match:"1f485-1f3fe",uc_greedy:"1f485-1f3fe",shortnames:[],category:"people"},":nail_care_tone5:":{uc_base:"1f485-1f3ff",uc_output:"1f485-1f3ff",uc_match:"1f485-1f3ff",uc_greedy:"1f485-1f3ff",shortnames:[],category:"people"},":nose_tone1:":{uc_base:"1f443-1f3fb",uc_output:"1f443-1f3fb",uc_match:"1f443-1f3fb",uc_greedy:"1f443-1f3fb",shortnames:[],category:"people"},":nose_tone2:":{uc_base:"1f443-1f3fc",uc_output:"1f443-1f3fc",uc_match:"1f443-1f3fc",uc_greedy:"1f443-1f3fc",shortnames:[],category:"people"},":nose_tone3:":{uc_base:"1f443-1f3fd",uc_output:"1f443-1f3fd",uc_match:"1f443-1f3fd",uc_greedy:"1f443-1f3fd",shortnames:[],category:"people"},":nose_tone4:":{uc_base:"1f443-1f3fe",uc_output:"1f443-1f3fe",uc_match:"1f443-1f3fe",uc_greedy:"1f443-1f3fe",shortnames:[],category:"people"},":nose_tone5:":{uc_base:"1f443-1f3ff",uc_output:"1f443-1f3ff",uc_match:"1f443-1f3ff",uc_greedy:"1f443-1f3ff",shortnames:[],category:"people"},":ok_hand_tone1:":{uc_base:"1f44c-1f3fb",uc_output:"1f44c-1f3fb",uc_match:"1f44c-1f3fb",uc_greedy:"1f44c-1f3fb",shortnames:[],category:"people"},":ok_hand_tone2:":{uc_base:"1f44c-1f3fc",uc_output:"1f44c-1f3fc",uc_match:"1f44c-1f3fc",uc_greedy:"1f44c-1f3fc",shortnames:[],category:"people"},":ok_hand_tone3:":{uc_base:"1f44c-1f3fd",uc_output:"1f44c-1f3fd",uc_match:"1f44c-1f3fd",uc_greedy:"1f44c-1f3fd",shortnames:[],category:"people"},":ok_hand_tone4:":{uc_base:"1f44c-1f3fe",uc_output:"1f44c-1f3fe",uc_match:"1f44c-1f3fe",uc_greedy:"1f44c-1f3fe",shortnames:[],category:"people"},":ok_hand_tone5:":{uc_base:"1f44c-1f3ff",uc_output:"1f44c-1f3ff",uc_match:"1f44c-1f3ff",uc_greedy:"1f44c-1f3ff",shortnames:[],category:"people"},":older_adult_tone1:":{uc_base:"1f9d3-1f3fb",uc_output:"1f9d3-1f3fb",uc_match:"1f9d3-1f3fb",uc_greedy:"1f9d3-1f3fb",shortnames:[":older_adult_light_skin_tone:"],category:"people"},":older_adult_tone2:":{uc_base:"1f9d3-1f3fc",uc_output:"1f9d3-1f3fc",uc_match:"1f9d3-1f3fc",uc_greedy:"1f9d3-1f3fc",shortnames:[":older_adult_medium_light_skin_tone:"],category:"people"},":older_adult_tone3:":{uc_base:"1f9d3-1f3fd",uc_output:"1f9d3-1f3fd",uc_match:"1f9d3-1f3fd",uc_greedy:"1f9d3-1f3fd",shortnames:[":older_adult_medium_skin_tone:"],category:"people"},":older_adult_tone4:":{uc_base:"1f9d3-1f3fe",uc_output:"1f9d3-1f3fe",uc_match:"1f9d3-1f3fe",uc_greedy:"1f9d3-1f3fe",shortnames:[":older_adult_medium_dark_skin_tone:"],category:"people"},":older_adult_tone5:":{uc_base:"1f9d3-1f3ff",uc_output:"1f9d3-1f3ff",uc_match:"1f9d3-1f3ff",uc_greedy:"1f9d3-1f3ff",shortnames:[":older_adult_dark_skin_tone:"],category:"people"},":older_man_tone1:":{uc_base:"1f474-1f3fb",uc_output:"1f474-1f3fb",uc_match:"1f474-1f3fb",uc_greedy:"1f474-1f3fb",shortnames:[],category:"people"},":older_man_tone2:":{uc_base:"1f474-1f3fc",uc_output:"1f474-1f3fc",uc_match:"1f474-1f3fc",uc_greedy:"1f474-1f3fc",shortnames:[],category:"people"},":older_man_tone3:":{uc_base:"1f474-1f3fd",uc_output:"1f474-1f3fd",uc_match:"1f474-1f3fd",uc_greedy:"1f474-1f3fd",shortnames:[],category:"people"},":older_man_tone4:":{uc_base:"1f474-1f3fe",uc_output:"1f474-1f3fe",uc_match:"1f474-1f3fe",uc_greedy:"1f474-1f3fe",shortnames:[],category:"people"},":older_man_tone5:":{uc_base:"1f474-1f3ff",uc_output:"1f474-1f3ff",uc_match:"1f474-1f3ff",uc_greedy:"1f474-1f3ff",shortnames:[],category:"people"},":older_woman_tone1:":{uc_base:"1f475-1f3fb",uc_output:"1f475-1f3fb",uc_match:"1f475-1f3fb",uc_greedy:"1f475-1f3fb",shortnames:[":grandma_tone1:"],category:"people"},":older_woman_tone2:":{uc_base:"1f475-1f3fc",uc_output:"1f475-1f3fc",uc_match:"1f475-1f3fc",uc_greedy:"1f475-1f3fc",shortnames:[":grandma_tone2:"],category:"people"},":older_woman_tone3:":{uc_base:"1f475-1f3fd",uc_output:"1f475-1f3fd",uc_match:"1f475-1f3fd",uc_greedy:"1f475-1f3fd",shortnames:[":grandma_tone3:"],category:"people"},":older_woman_tone4:":{uc_base:"1f475-1f3fe",uc_output:"1f475-1f3fe",uc_match:"1f475-1f3fe",uc_greedy:"1f475-1f3fe",shortnames:[":grandma_tone4:"],category:"people"},":older_woman_tone5:":{uc_base:"1f475-1f3ff",uc_output:"1f475-1f3ff",uc_match:"1f475-1f3ff",uc_greedy:"1f475-1f3ff",shortnames:[":grandma_tone5:"],category:"people"},":open_hands_tone1:":{uc_base:"1f450-1f3fb",uc_output:"1f450-1f3fb",uc_match:"1f450-1f3fb",uc_greedy:"1f450-1f3fb",shortnames:[],category:"people"},":open_hands_tone2:":{uc_base:"1f450-1f3fc",uc_output:"1f450-1f3fc",uc_match:"1f450-1f3fc",uc_greedy:"1f450-1f3fc",shortnames:[],category:"people"},":open_hands_tone3:":{uc_base:"1f450-1f3fd",uc_output:"1f450-1f3fd",uc_match:"1f450-1f3fd",uc_greedy:"1f450-1f3fd",shortnames:[],category:"people"},":open_hands_tone4:":{uc_base:"1f450-1f3fe",uc_output:"1f450-1f3fe",uc_match:"1f450-1f3fe",uc_greedy:"1f450-1f3fe",shortnames:[],category:"people"},":open_hands_tone5:":{uc_base:"1f450-1f3ff",uc_output:"1f450-1f3ff",uc_match:"1f450-1f3ff",uc_greedy:"1f450-1f3ff",shortnames:[],category:"people"},":palms_up_together_tone1:":{uc_base:"1f932-1f3fb",uc_output:"1f932-1f3fb",uc_match:"1f932-1f3fb",uc_greedy:"1f932-1f3fb",shortnames:[":palms_up_together_light_skin_tone:"],category:"people"},":palms_up_together_tone2:":{uc_base:"1f932-1f3fc",uc_output:"1f932-1f3fc",uc_match:"1f932-1f3fc",uc_greedy:"1f932-1f3fc",shortnames:[":palms_up_together_medium_light_skin_tone:"],category:"people"},":palms_up_together_tone3:":{uc_base:"1f932-1f3fd",uc_output:"1f932-1f3fd",uc_match:"1f932-1f3fd",uc_greedy:"1f932-1f3fd",shortnames:[":palms_up_together_medium_skin_tone:"],category:"people"},":palms_up_together_tone4:":{uc_base:"1f932-1f3fe",uc_output:"1f932-1f3fe",uc_match:"1f932-1f3fe",uc_greedy:"1f932-1f3fe",shortnames:[":palms_up_together_medium_dark_skin_tone:"],category:"people"},":palms_up_together_tone5:":{uc_base:"1f932-1f3ff",uc_output:"1f932-1f3ff",uc_match:"1f932-1f3ff",uc_greedy:"1f932-1f3ff",shortnames:[":palms_up_together_dark_skin_tone:"],category:"people"},":person_biking_tone1:":{uc_base:"1f6b4-1f3fb",uc_output:"1f6b4-1f3fb",uc_match:"1f6b4-1f3fb",uc_greedy:"1f6b4-1f3fb",shortnames:[":bicyclist_tone1:"],category:"activity"},":person_biking_tone2:":{uc_base:"1f6b4-1f3fc",uc_output:"1f6b4-1f3fc",uc_match:"1f6b4-1f3fc",uc_greedy:"1f6b4-1f3fc",shortnames:[":bicyclist_tone2:"],category:"activity"},":person_biking_tone3:":{uc_base:"1f6b4-1f3fd",uc_output:"1f6b4-1f3fd",uc_match:"1f6b4-1f3fd",uc_greedy:"1f6b4-1f3fd",shortnames:[":bicyclist_tone3:"],category:"activity"},":person_biking_tone4:":{uc_base:"1f6b4-1f3fe",uc_output:"1f6b4-1f3fe",uc_match:"1f6b4-1f3fe",uc_greedy:"1f6b4-1f3fe",shortnames:[":bicyclist_tone4:"],category:"activity"},":person_biking_tone5:":{uc_base:"1f6b4-1f3ff",uc_output:"1f6b4-1f3ff",uc_match:"1f6b4-1f3ff",uc_greedy:"1f6b4-1f3ff",shortnames:[":bicyclist_tone5:"],category:"activity"},":person_bowing_tone1:":{uc_base:"1f647-1f3fb",uc_output:"1f647-1f3fb",uc_match:"1f647-1f3fb",uc_greedy:"1f647-1f3fb",shortnames:[":bow_tone1:"],category:"people"},":person_bowing_tone2:":{uc_base:"1f647-1f3fc",uc_output:"1f647-1f3fc",uc_match:"1f647-1f3fc",uc_greedy:"1f647-1f3fc",shortnames:[":bow_tone2:"],category:"people"},":person_bowing_tone3:":{uc_base:"1f647-1f3fd",uc_output:"1f647-1f3fd",uc_match:"1f647-1f3fd",uc_greedy:"1f647-1f3fd",shortnames:[":bow_tone3:"],category:"people"},":person_bowing_tone4:":{uc_base:"1f647-1f3fe",uc_output:"1f647-1f3fe",uc_match:"1f647-1f3fe",uc_greedy:"1f647-1f3fe",shortnames:[":bow_tone4:"],category:"people"},":person_bowing_tone5:":{uc_base:"1f647-1f3ff",uc_output:"1f647-1f3ff",uc_match:"1f647-1f3ff",uc_greedy:"1f647-1f3ff",shortnames:[":bow_tone5:"],category:"people"},":person_climbing_tone1:":{uc_base:"1f9d7-1f3fb",uc_output:"1f9d7-1f3fb",uc_match:"1f9d7-1f3fb",uc_greedy:"1f9d7-1f3fb",shortnames:[":person_climbing_light_skin_tone:"],category:"activity"},":person_climbing_tone2:":{uc_base:"1f9d7-1f3fc",uc_output:"1f9d7-1f3fc",uc_match:"1f9d7-1f3fc",uc_greedy:"1f9d7-1f3fc",shortnames:[":person_climbing_medium_light_skin_tone:"],category:"activity"},":person_climbing_tone3:":{uc_base:"1f9d7-1f3fd",uc_output:"1f9d7-1f3fd",uc_match:"1f9d7-1f3fd",uc_greedy:"1f9d7-1f3fd",shortnames:[":person_climbing_medium_skin_tone:"],category:"activity"},":person_climbing_tone4:":{uc_base:"1f9d7-1f3fe",uc_output:"1f9d7-1f3fe",uc_match:"1f9d7-1f3fe",uc_greedy:"1f9d7-1f3fe",shortnames:[":person_climbing_medium_dark_skin_tone:"],category:"activity"},":person_climbing_tone5:":{uc_base:"1f9d7-1f3ff",uc_output:"1f9d7-1f3ff",uc_match:"1f9d7-1f3ff",uc_greedy:"1f9d7-1f3ff",shortnames:[":person_climbing_dark_skin_tone:"],category:"activity"},":person_doing_cartwheel_tone1:":{uc_base:"1f938-1f3fb",uc_output:"1f938-1f3fb",uc_match:"1f938-1f3fb",uc_greedy:"1f938-1f3fb",shortnames:[":cartwheel_tone1:"],category:"activity"},":person_doing_cartwheel_tone2:":{uc_base:"1f938-1f3fc",uc_output:"1f938-1f3fc",uc_match:"1f938-1f3fc",uc_greedy:"1f938-1f3fc",shortnames:[":cartwheel_tone2:"],category:"activity"},":person_doing_cartwheel_tone3:":{uc_base:"1f938-1f3fd",uc_output:"1f938-1f3fd",uc_match:"1f938-1f3fd",uc_greedy:"1f938-1f3fd",shortnames:[":cartwheel_tone3:"],category:"activity"},":person_doing_cartwheel_tone4:":{uc_base:"1f938-1f3fe",uc_output:"1f938-1f3fe",uc_match:"1f938-1f3fe",uc_greedy:"1f938-1f3fe",shortnames:[":cartwheel_tone4:"],category:"activity"},":person_doing_cartwheel_tone5:":{uc_base:"1f938-1f3ff",uc_output:"1f938-1f3ff",uc_match:"1f938-1f3ff",uc_greedy:"1f938-1f3ff",shortnames:[":cartwheel_tone5:"],category:"activity"},":person_facepalming_tone1:":{uc_base:"1f926-1f3fb",uc_output:"1f926-1f3fb",uc_match:"1f926-1f3fb",uc_greedy:"1f926-1f3fb",shortnames:[":face_palm_tone1:",":facepalm_tone1:"],category:"people"},":person_facepalming_tone2:":{uc_base:"1f926-1f3fc",uc_output:"1f926-1f3fc",uc_match:"1f926-1f3fc",uc_greedy:"1f926-1f3fc",shortnames:[":face_palm_tone2:",":facepalm_tone2:"],category:"people"},":person_facepalming_tone3:":{uc_base:"1f926-1f3fd",uc_output:"1f926-1f3fd",uc_match:"1f926-1f3fd",uc_greedy:"1f926-1f3fd",shortnames:[":face_palm_tone3:",":facepalm_tone3:"],category:"people"},":person_facepalming_tone4:":{uc_base:"1f926-1f3fe",uc_output:"1f926-1f3fe",uc_match:"1f926-1f3fe",uc_greedy:"1f926-1f3fe",shortnames:[":face_palm_tone4:",":facepalm_tone4:"],category:"people"},":person_facepalming_tone5:":{uc_base:"1f926-1f3ff",uc_output:"1f926-1f3ff",uc_match:"1f926-1f3ff",uc_greedy:"1f926-1f3ff",shortnames:[":face_palm_tone5:",":facepalm_tone5:"],category:"people"},":person_frowning_tone1:":{uc_base:"1f64d-1f3fb",uc_output:"1f64d-1f3fb",uc_match:"1f64d-1f3fb",uc_greedy:"1f64d-1f3fb",shortnames:[],category:"people"},":person_frowning_tone2:":{uc_base:"1f64d-1f3fc",uc_output:"1f64d-1f3fc",uc_match:"1f64d-1f3fc",uc_greedy:"1f64d-1f3fc",shortnames:[],category:"people"},":person_frowning_tone3:":{uc_base:"1f64d-1f3fd",uc_output:"1f64d-1f3fd",uc_match:"1f64d-1f3fd",uc_greedy:"1f64d-1f3fd",shortnames:[],category:"people"},":person_frowning_tone4:":{uc_base:"1f64d-1f3fe",uc_output:"1f64d-1f3fe",uc_match:"1f64d-1f3fe",uc_greedy:"1f64d-1f3fe",shortnames:[],category:"people"},":person_frowning_tone5:":{uc_base:"1f64d-1f3ff",uc_output:"1f64d-1f3ff",uc_match:"1f64d-1f3ff",uc_greedy:"1f64d-1f3ff",shortnames:[],category:"people"},":person_gesturing_no_tone1:":{uc_base:"1f645-1f3fb",uc_output:"1f645-1f3fb",uc_match:"1f645-1f3fb",uc_greedy:"1f645-1f3fb",shortnames:[":no_good_tone1:"],category:"people"},":person_gesturing_no_tone2:":{uc_base:"1f645-1f3fc",uc_output:"1f645-1f3fc",uc_match:"1f645-1f3fc",uc_greedy:"1f645-1f3fc",shortnames:[":no_good_tone2:"],category:"people"},":person_gesturing_no_tone3:":{uc_base:"1f645-1f3fd",uc_output:"1f645-1f3fd",uc_match:"1f645-1f3fd",uc_greedy:"1f645-1f3fd",shortnames:[":no_good_tone3:"],category:"people"},":person_gesturing_no_tone4:":{uc_base:"1f645-1f3fe",uc_output:"1f645-1f3fe",uc_match:"1f645-1f3fe",uc_greedy:"1f645-1f3fe",shortnames:[":no_good_tone4:"],category:"people"},":person_gesturing_no_tone5:":{uc_base:"1f645-1f3ff",uc_output:"1f645-1f3ff",uc_match:"1f645-1f3ff",uc_greedy:"1f645-1f3ff",shortnames:[":no_good_tone5:"],category:"people"},":person_gesturing_ok_tone1:":{uc_base:"1f646-1f3fb",uc_output:"1f646-1f3fb",uc_match:"1f646-1f3fb",uc_greedy:"1f646-1f3fb",shortnames:[":ok_woman_tone1:"],category:"people"},":person_gesturing_ok_tone2:":{uc_base:"1f646-1f3fc",uc_output:"1f646-1f3fc",uc_match:"1f646-1f3fc",uc_greedy:"1f646-1f3fc",shortnames:[":ok_woman_tone2:"],category:"people"},":person_gesturing_ok_tone3:":{uc_base:"1f646-1f3fd",uc_output:"1f646-1f3fd",uc_match:"1f646-1f3fd",uc_greedy:"1f646-1f3fd",shortnames:[":ok_woman_tone3:"],category:"people"},":person_gesturing_ok_tone4:":{uc_base:"1f646-1f3fe",uc_output:"1f646-1f3fe",uc_match:"1f646-1f3fe",uc_greedy:"1f646-1f3fe",shortnames:[":ok_woman_tone4:"],category:"people"},":person_gesturing_ok_tone5:":{uc_base:"1f646-1f3ff",uc_output:"1f646-1f3ff",uc_match:"1f646-1f3ff",uc_greedy:"1f646-1f3ff",shortnames:[":ok_woman_tone5:"],category:"people"},":person_getting_haircut_tone1:":{uc_base:"1f487-1f3fb",uc_output:"1f487-1f3fb",uc_match:"1f487-1f3fb",uc_greedy:"1f487-1f3fb",shortnames:[":haircut_tone1:"],category:"people"},":person_getting_haircut_tone2:":{uc_base:"1f487-1f3fc",uc_output:"1f487-1f3fc",uc_match:"1f487-1f3fc",uc_greedy:"1f487-1f3fc",shortnames:[":haircut_tone2:"],category:"people"},":person_getting_haircut_tone3:":{uc_base:"1f487-1f3fd",uc_output:"1f487-1f3fd",uc_match:"1f487-1f3fd",uc_greedy:"1f487-1f3fd",shortnames:[":haircut_tone3:"],category:"people"},":person_getting_haircut_tone4:":{uc_base:"1f487-1f3fe",uc_output:"1f487-1f3fe",uc_match:"1f487-1f3fe",uc_greedy:"1f487-1f3fe",shortnames:[":haircut_tone4:"],category:"people"},":person_getting_haircut_tone5:":{uc_base:"1f487-1f3ff",uc_output:"1f487-1f3ff",uc_match:"1f487-1f3ff",uc_greedy:"1f487-1f3ff",shortnames:[":haircut_tone5:"],category:"people"},":person_getting_massage_tone1:":{uc_base:"1f486-1f3fb",uc_output:"1f486-1f3fb",uc_match:"1f486-1f3fb",uc_greedy:"1f486-1f3fb",shortnames:[":massage_tone1:"],category:"people"},":person_getting_massage_tone2:":{uc_base:"1f486-1f3fc",uc_output:"1f486-1f3fc",uc_match:"1f486-1f3fc",uc_greedy:"1f486-1f3fc",shortnames:[":massage_tone2:"],category:"people"},":person_getting_massage_tone3:":{uc_base:"1f486-1f3fd",uc_output:"1f486-1f3fd",uc_match:"1f486-1f3fd",uc_greedy:"1f486-1f3fd",shortnames:[":massage_tone3:"],category:"people"},":person_getting_massage_tone4:":{uc_base:"1f486-1f3fe",uc_output:"1f486-1f3fe",uc_match:"1f486-1f3fe",uc_greedy:"1f486-1f3fe",shortnames:[":massage_tone4:"],category:"people"},":person_getting_massage_tone5:":{uc_base:"1f486-1f3ff",uc_output:"1f486-1f3ff",uc_match:"1f486-1f3ff",uc_greedy:"1f486-1f3ff",shortnames:[":massage_tone5:"],category:"people"},":person_golfing_tone1:":{uc_base:"1f3cc-1f3fb",uc_output:"1f3cc-1f3fb",uc_match:"1f3cc-fe0f-1f3fb",uc_greedy:"1f3cc-fe0f-1f3fb",shortnames:[":person_golfing_light_skin_tone:"],category:"activity"},":person_golfing_tone2:":{uc_base:"1f3cc-1f3fc",uc_output:"1f3cc-1f3fc",uc_match:"1f3cc-fe0f-1f3fc",uc_greedy:"1f3cc-fe0f-1f3fc",shortnames:[":person_golfing_medium_light_skin_tone:"],category:"activity"},":person_golfing_tone3:":{uc_base:"1f3cc-1f3fd",uc_output:"1f3cc-1f3fd",uc_match:"1f3cc-fe0f-1f3fd",uc_greedy:"1f3cc-fe0f-1f3fd",shortnames:[":person_golfing_medium_skin_tone:"],category:"activity"},":person_golfing_tone4:":{uc_base:"1f3cc-1f3fe",uc_output:"1f3cc-1f3fe",uc_match:"1f3cc-fe0f-1f3fe",uc_greedy:"1f3cc-fe0f-1f3fe",shortnames:[":person_golfing_medium_dark_skin_tone:"],category:"activity"},":person_golfing_tone5:":{uc_base:"1f3cc-1f3ff",uc_output:"1f3cc-1f3ff",uc_match:"1f3cc-fe0f-1f3ff",uc_greedy:"1f3cc-fe0f-1f3ff",shortnames:[":person_golfing_dark_skin_tone:"],category:"activity"},":person_in_bed_tone1:":{uc_base:"1f6cc-1f3fb",uc_output:"1f6cc-1f3fb",uc_match:"1f6cc-1f3fb",uc_greedy:"1f6cc-1f3fb",shortnames:[":person_in_bed_light_skin_tone:"],category:"objects"},":person_in_bed_tone2:":{uc_base:"1f6cc-1f3fc",uc_output:"1f6cc-1f3fc",uc_match:"1f6cc-1f3fc",uc_greedy:"1f6cc-1f3fc",shortnames:[":person_in_bed_medium_light_skin_tone:"],category:"objects"},":person_in_bed_tone3:":{uc_base:"1f6cc-1f3fd",uc_output:"1f6cc-1f3fd",uc_match:"1f6cc-1f3fd",uc_greedy:"1f6cc-1f3fd",shortnames:[":person_in_bed_medium_skin_tone:"],category:"objects"},":person_in_bed_tone4:":{uc_base:"1f6cc-1f3fe",uc_output:"1f6cc-1f3fe",uc_match:"1f6cc-1f3fe",uc_greedy:"1f6cc-1f3fe",shortnames:[":person_in_bed_medium_dark_skin_tone:"],category:"objects"},":person_in_bed_tone5:":{uc_base:"1f6cc-1f3ff",uc_output:"1f6cc-1f3ff",uc_match:"1f6cc-1f3ff",uc_greedy:"1f6cc-1f3ff",shortnames:[":person_in_bed_dark_skin_tone:"],category:"objects"},":person_in_lotus_position_tone1:":{uc_base:"1f9d8-1f3fb",uc_output:"1f9d8-1f3fb",uc_match:"1f9d8-1f3fb",uc_greedy:"1f9d8-1f3fb",shortnames:[":person_in_lotus_position_light_skin_tone:"],category:"activity"},":person_in_lotus_position_tone2:":{uc_base:"1f9d8-1f3fc",uc_output:"1f9d8-1f3fc",uc_match:"1f9d8-1f3fc",uc_greedy:"1f9d8-1f3fc",shortnames:[":person_in_lotus_position_medium_light_skin_tone:"],category:"activity"},":person_in_lotus_position_tone3:":{uc_base:"1f9d8-1f3fd",uc_output:"1f9d8-1f3fd",uc_match:"1f9d8-1f3fd",uc_greedy:"1f9d8-1f3fd",shortnames:[":person_in_lotus_position_medium_skin_tone:"],category:"activity"},":person_in_lotus_position_tone4:":{uc_base:"1f9d8-1f3fe",uc_output:"1f9d8-1f3fe",uc_match:"1f9d8-1f3fe",uc_greedy:"1f9d8-1f3fe",shortnames:[":person_in_lotus_position_medium_dark_skin_tone:"],category:"activity"},":person_in_lotus_position_tone5:":{uc_base:"1f9d8-1f3ff",uc_output:"1f9d8-1f3ff",uc_match:"1f9d8-1f3ff",uc_greedy:"1f9d8-1f3ff",shortnames:[":person_in_lotus_position_dark_skin_tone:"],category:"activity"},":person_in_steamy_room_tone1:":{uc_base:"1f9d6-1f3fb",uc_output:"1f9d6-1f3fb",uc_match:"1f9d6-1f3fb",uc_greedy:"1f9d6-1f3fb",shortnames:[":person_in_steamy_room_light_skin_tone:"],category:"people"},":person_in_steamy_room_tone2:":{uc_base:"1f9d6-1f3fc",uc_output:"1f9d6-1f3fc",uc_match:"1f9d6-1f3fc",uc_greedy:"1f9d6-1f3fc",shortnames:[":person_in_steamy_room_medium_light_skin_tone:"],category:"people"},":person_in_steamy_room_tone3:":{uc_base:"1f9d6-1f3fd",uc_output:"1f9d6-1f3fd",uc_match:"1f9d6-1f3fd",uc_greedy:"1f9d6-1f3fd",shortnames:[":person_in_steamy_room_medium_skin_tone:"],category:"people"},":person_in_steamy_room_tone4:":{uc_base:"1f9d6-1f3fe",uc_output:"1f9d6-1f3fe",uc_match:"1f9d6-1f3fe",uc_greedy:"1f9d6-1f3fe",shortnames:[":person_in_steamy_room_medium_dark_skin_tone:"],category:"people"},":person_in_steamy_room_tone5:":{uc_base:"1f9d6-1f3ff",uc_output:"1f9d6-1f3ff",uc_match:"1f9d6-1f3ff",uc_greedy:"1f9d6-1f3ff",shortnames:[":person_in_steamy_room_dark_skin_tone:"],category:"people"},":person_juggling_tone1:":{uc_base:"1f939-1f3fb",uc_output:"1f939-1f3fb",uc_match:"1f939-1f3fb",uc_greedy:"1f939-1f3fb",shortnames:[":juggling_tone1:",":juggler_tone1:"],category:"activity"},":person_juggling_tone2:":{uc_base:"1f939-1f3fc",uc_output:"1f939-1f3fc",uc_match:"1f939-1f3fc",uc_greedy:"1f939-1f3fc",shortnames:[":juggling_tone2:",":juggler_tone2:"],category:"activity"},":person_juggling_tone3:":{uc_base:"1f939-1f3fd",uc_output:"1f939-1f3fd",uc_match:"1f939-1f3fd",uc_greedy:"1f939-1f3fd",shortnames:[":juggling_tone3:",":juggler_tone3:"],category:"activity"},":person_juggling_tone4:":{uc_base:"1f939-1f3fe",uc_output:"1f939-1f3fe",uc_match:"1f939-1f3fe",uc_greedy:"1f939-1f3fe",shortnames:[":juggling_tone4:",":juggler_tone4:"],category:"activity"},":person_juggling_tone5:":{uc_base:"1f939-1f3ff",uc_output:"1f939-1f3ff",uc_match:"1f939-1f3ff",uc_greedy:"1f939-1f3ff",shortnames:[":juggling_tone5:",":juggler_tone5:"],category:"activity"},":person_lifting_weights_tone1:":{uc_base:"1f3cb-1f3fb",uc_output:"1f3cb-1f3fb",uc_match:"1f3cb-fe0f-1f3fb",uc_greedy:"1f3cb-fe0f-1f3fb",shortnames:[":lifter_tone1:",":weight_lifter_tone1:"],category:"activity"},":person_lifting_weights_tone2:":{uc_base:"1f3cb-1f3fc",uc_output:"1f3cb-1f3fc",uc_match:"1f3cb-fe0f-1f3fc",uc_greedy:"1f3cb-fe0f-1f3fc",shortnames:[":lifter_tone2:",":weight_lifter_tone2:"],category:"activity"},":person_lifting_weights_tone3:":{uc_base:"1f3cb-1f3fd",uc_output:"1f3cb-1f3fd",uc_match:"1f3cb-fe0f-1f3fd",uc_greedy:"1f3cb-fe0f-1f3fd",shortnames:[":lifter_tone3:",":weight_lifter_tone3:"],category:"activity"},":person_lifting_weights_tone4:":{uc_base:"1f3cb-1f3fe",uc_output:"1f3cb-1f3fe",uc_match:"1f3cb-fe0f-1f3fe",uc_greedy:"1f3cb-fe0f-1f3fe",shortnames:[":lifter_tone4:",":weight_lifter_tone4:"],category:"activity"},":person_lifting_weights_tone5:":{uc_base:"1f3cb-1f3ff",uc_output:"1f3cb-1f3ff",uc_match:"1f3cb-fe0f-1f3ff",uc_greedy:"1f3cb-fe0f-1f3ff",shortnames:[":lifter_tone5:",":weight_lifter_tone5:"],category:"activity"},":person_mountain_biking_tone1:":{uc_base:"1f6b5-1f3fb",uc_output:"1f6b5-1f3fb",uc_match:"1f6b5-1f3fb",uc_greedy:"1f6b5-1f3fb",shortnames:[":mountain_bicyclist_tone1:"],category:"activity"},":person_mountain_biking_tone2:":{uc_base:"1f6b5-1f3fc",uc_output:"1f6b5-1f3fc",uc_match:"1f6b5-1f3fc",uc_greedy:"1f6b5-1f3fc",shortnames:[":mountain_bicyclist_tone2:"],category:"activity"},":person_mountain_biking_tone3:":{uc_base:"1f6b5-1f3fd",uc_output:"1f6b5-1f3fd",uc_match:"1f6b5-1f3fd",uc_greedy:"1f6b5-1f3fd",shortnames:[":mountain_bicyclist_tone3:"],category:"activity"},":person_mountain_biking_tone4:":{uc_base:"1f6b5-1f3fe",uc_output:"1f6b5-1f3fe",uc_match:"1f6b5-1f3fe",uc_greedy:"1f6b5-1f3fe",shortnames:[":mountain_bicyclist_tone4:"],category:"activity"},":person_mountain_biking_tone5:":{uc_base:"1f6b5-1f3ff",uc_output:"1f6b5-1f3ff",uc_match:"1f6b5-1f3ff",uc_greedy:"1f6b5-1f3ff",shortnames:[":mountain_bicyclist_tone5:"],category:"activity"},":person_playing_handball_tone1:":{uc_base:"1f93e-1f3fb",uc_output:"1f93e-1f3fb",uc_match:"1f93e-1f3fb",uc_greedy:"1f93e-1f3fb",shortnames:[":handball_tone1:"],category:"activity"},":person_playing_handball_tone2:":{uc_base:"1f93e-1f3fc",uc_output:"1f93e-1f3fc",uc_match:"1f93e-1f3fc",uc_greedy:"1f93e-1f3fc",shortnames:[":handball_tone2:"],category:"activity"},":person_playing_handball_tone3:":{uc_base:"1f93e-1f3fd",uc_output:"1f93e-1f3fd",uc_match:"1f93e-1f3fd",uc_greedy:"1f93e-1f3fd",shortnames:[":handball_tone3:"],category:"activity"},":person_playing_handball_tone4:":{uc_base:"1f93e-1f3fe",uc_output:"1f93e-1f3fe",uc_match:"1f93e-1f3fe",uc_greedy:"1f93e-1f3fe",shortnames:[":handball_tone4:"],category:"activity"},":person_playing_handball_tone5:":{uc_base:"1f93e-1f3ff",uc_output:"1f93e-1f3ff",uc_match:"1f93e-1f3ff",uc_greedy:"1f93e-1f3ff",shortnames:[":handball_tone5:"],category:"activity"},":person_playing_water_polo_tone1:":{uc_base:"1f93d-1f3fb",uc_output:"1f93d-1f3fb",uc_match:"1f93d-1f3fb",uc_greedy:"1f93d-1f3fb",shortnames:[":water_polo_tone1:"],category:"activity"},":person_playing_water_polo_tone2:":{uc_base:"1f93d-1f3fc",uc_output:"1f93d-1f3fc",uc_match:"1f93d-1f3fc",uc_greedy:"1f93d-1f3fc",shortnames:[":water_polo_tone2:"],category:"activity"},":person_playing_water_polo_tone3:":{uc_base:"1f93d-1f3fd",uc_output:"1f93d-1f3fd",uc_match:"1f93d-1f3fd",uc_greedy:"1f93d-1f3fd",shortnames:[":water_polo_tone3:"],category:"activity"},":person_playing_water_polo_tone4:":{uc_base:"1f93d-1f3fe",uc_output:"1f93d-1f3fe",uc_match:"1f93d-1f3fe",uc_greedy:"1f93d-1f3fe",shortnames:[":water_polo_tone4:"],category:"activity"},":person_playing_water_polo_tone5:":{uc_base:"1f93d-1f3ff",uc_output:"1f93d-1f3ff",uc_match:"1f93d-1f3ff",uc_greedy:"1f93d-1f3ff",shortnames:[":water_polo_tone5:"],category:"activity"},":person_pouting_tone1:":{uc_base:"1f64e-1f3fb",uc_output:"1f64e-1f3fb",uc_match:"1f64e-1f3fb",uc_greedy:"1f64e-1f3fb",shortnames:[":person_with_pouting_face_tone1:"],category:"people"},":person_pouting_tone2:":{uc_base:"1f64e-1f3fc",uc_output:"1f64e-1f3fc",uc_match:"1f64e-1f3fc",uc_greedy:"1f64e-1f3fc",shortnames:[":person_with_pouting_face_tone2:"],category:"people"},":person_pouting_tone3:":{uc_base:"1f64e-1f3fd",uc_output:"1f64e-1f3fd",uc_match:"1f64e-1f3fd",uc_greedy:"1f64e-1f3fd",shortnames:[":person_with_pouting_face_tone3:"],category:"people"},":person_pouting_tone4:":{uc_base:"1f64e-1f3fe",uc_output:"1f64e-1f3fe",uc_match:"1f64e-1f3fe",uc_greedy:"1f64e-1f3fe",shortnames:[":person_with_pouting_face_tone4:"],category:"people"},":person_pouting_tone5:":{uc_base:"1f64e-1f3ff",uc_output:"1f64e-1f3ff",uc_match:"1f64e-1f3ff",uc_greedy:"1f64e-1f3ff",shortnames:[":person_with_pouting_face_tone5:"],category:"people"},":person_raising_hand_tone1:":{uc_base:"1f64b-1f3fb",uc_output:"1f64b-1f3fb",uc_match:"1f64b-1f3fb",uc_greedy:"1f64b-1f3fb",shortnames:[":raising_hand_tone1:"],category:"people"},":person_raising_hand_tone2:":{uc_base:"1f64b-1f3fc",uc_output:"1f64b-1f3fc",uc_match:"1f64b-1f3fc",uc_greedy:"1f64b-1f3fc",shortnames:[":raising_hand_tone2:"],category:"people"},":person_raising_hand_tone3:":{uc_base:"1f64b-1f3fd",uc_output:"1f64b-1f3fd",uc_match:"1f64b-1f3fd",uc_greedy:"1f64b-1f3fd",shortnames:[":raising_hand_tone3:"],category:"people"},":person_raising_hand_tone4:":{uc_base:"1f64b-1f3fe",uc_output:"1f64b-1f3fe",uc_match:"1f64b-1f3fe",uc_greedy:"1f64b-1f3fe",shortnames:[":raising_hand_tone4:"],category:"people"},":person_raising_hand_tone5:":{uc_base:"1f64b-1f3ff",uc_output:"1f64b-1f3ff",uc_match:"1f64b-1f3ff",uc_greedy:"1f64b-1f3ff",shortnames:[":raising_hand_tone5:"],category:"people"},":person_rowing_boat_tone1:":{uc_base:"1f6a3-1f3fb",uc_output:"1f6a3-1f3fb",uc_match:"1f6a3-1f3fb",uc_greedy:"1f6a3-1f3fb",shortnames:[":rowboat_tone1:"],category:"activity"},":person_rowing_boat_tone2:":{uc_base:"1f6a3-1f3fc",uc_output:"1f6a3-1f3fc",uc_match:"1f6a3-1f3fc",uc_greedy:"1f6a3-1f3fc",shortnames:[":rowboat_tone2:"],category:"activity"},":person_rowing_boat_tone3:":{uc_base:"1f6a3-1f3fd",uc_output:"1f6a3-1f3fd",uc_match:"1f6a3-1f3fd",uc_greedy:"1f6a3-1f3fd",shortnames:[":rowboat_tone3:"],category:"activity"},":person_rowing_boat_tone4:":{uc_base:"1f6a3-1f3fe",uc_output:"1f6a3-1f3fe",uc_match:"1f6a3-1f3fe",uc_greedy:"1f6a3-1f3fe",shortnames:[":rowboat_tone4:"],category:"activity"},":person_rowing_boat_tone5:":{uc_base:"1f6a3-1f3ff",uc_output:"1f6a3-1f3ff",uc_match:"1f6a3-1f3ff",uc_greedy:"1f6a3-1f3ff",shortnames:[":rowboat_tone5:"],category:"activity"},":person_running_tone1:":{uc_base:"1f3c3-1f3fb",uc_output:"1f3c3-1f3fb",uc_match:"1f3c3-1f3fb",uc_greedy:"1f3c3-1f3fb",shortnames:[":runner_tone1:"],category:"people"},":person_running_tone2:":{uc_base:"1f3c3-1f3fc",uc_output:"1f3c3-1f3fc",uc_match:"1f3c3-1f3fc",uc_greedy:"1f3c3-1f3fc",shortnames:[":runner_tone2:"],category:"people"},":person_running_tone3:":{uc_base:"1f3c3-1f3fd",uc_output:"1f3c3-1f3fd",uc_match:"1f3c3-1f3fd",uc_greedy:"1f3c3-1f3fd",shortnames:[":runner_tone3:"],category:"people"},":person_running_tone4:":{uc_base:"1f3c3-1f3fe",uc_output:"1f3c3-1f3fe",uc_match:"1f3c3-1f3fe",uc_greedy:"1f3c3-1f3fe",shortnames:[":runner_tone4:"],category:"people"},":person_running_tone5:":{uc_base:"1f3c3-1f3ff",uc_output:"1f3c3-1f3ff",uc_match:"1f3c3-1f3ff",uc_greedy:"1f3c3-1f3ff",shortnames:[":runner_tone5:"],category:"people"},":person_shrugging_tone1:":{uc_base:"1f937-1f3fb",uc_output:"1f937-1f3fb",uc_match:"1f937-1f3fb",uc_greedy:"1f937-1f3fb",shortnames:[":shrug_tone1:"],category:"people"},":person_shrugging_tone2:":{uc_base:"1f937-1f3fc",uc_output:"1f937-1f3fc",uc_match:"1f937-1f3fc",uc_greedy:"1f937-1f3fc",shortnames:[":shrug_tone2:"],category:"people"},":person_shrugging_tone3:":{uc_base:"1f937-1f3fd",uc_output:"1f937-1f3fd",uc_match:"1f937-1f3fd",uc_greedy:"1f937-1f3fd",shortnames:[":shrug_tone3:"],category:"people"},":person_shrugging_tone4:":{uc_base:"1f937-1f3fe",uc_output:"1f937-1f3fe",uc_match:"1f937-1f3fe",uc_greedy:"1f937-1f3fe",shortnames:[":shrug_tone4:"],category:"people"},":person_shrugging_tone5:":{uc_base:"1f937-1f3ff",uc_output:"1f937-1f3ff",uc_match:"1f937-1f3ff",uc_greedy:"1f937-1f3ff",shortnames:[":shrug_tone5:"],category:"people"},":person_surfing_tone1:":{uc_base:"1f3c4-1f3fb",uc_output:"1f3c4-1f3fb",uc_match:"1f3c4-1f3fb",uc_greedy:"1f3c4-1f3fb",shortnames:[":surfer_tone1:"],category:"activity"},":person_surfing_tone2:":{uc_base:"1f3c4-1f3fc",uc_output:"1f3c4-1f3fc",uc_match:"1f3c4-1f3fc",uc_greedy:"1f3c4-1f3fc",shortnames:[":surfer_tone2:"],category:"activity"},":person_surfing_tone3:":{uc_base:"1f3c4-1f3fd",uc_output:"1f3c4-1f3fd",uc_match:"1f3c4-1f3fd",uc_greedy:"1f3c4-1f3fd",shortnames:[":surfer_tone3:"],category:"activity"},":person_surfing_tone4:":{uc_base:"1f3c4-1f3fe",uc_output:"1f3c4-1f3fe",uc_match:"1f3c4-1f3fe",uc_greedy:"1f3c4-1f3fe",shortnames:[":surfer_tone4:"],category:"activity"},":person_surfing_tone5:":{uc_base:"1f3c4-1f3ff",uc_output:"1f3c4-1f3ff",uc_match:"1f3c4-1f3ff",uc_greedy:"1f3c4-1f3ff",shortnames:[":surfer_tone5:"],category:"activity"},":person_swimming_tone1:":{uc_base:"1f3ca-1f3fb",uc_output:"1f3ca-1f3fb",uc_match:"1f3ca-1f3fb",uc_greedy:"1f3ca-1f3fb",shortnames:[":swimmer_tone1:"],category:"activity"},":person_swimming_tone2:":{uc_base:"1f3ca-1f3fc",uc_output:"1f3ca-1f3fc",uc_match:"1f3ca-1f3fc",uc_greedy:"1f3ca-1f3fc",shortnames:[":swimmer_tone2:"],category:"activity"},":person_swimming_tone3:":{uc_base:"1f3ca-1f3fd",uc_output:"1f3ca-1f3fd",uc_match:"1f3ca-1f3fd",uc_greedy:"1f3ca-1f3fd",shortnames:[":swimmer_tone3:"],category:"activity"},":person_swimming_tone4:":{uc_base:"1f3ca-1f3fe",uc_output:"1f3ca-1f3fe",uc_match:"1f3ca-1f3fe",uc_greedy:"1f3ca-1f3fe",shortnames:[":swimmer_tone4:"],category:"activity"},":person_swimming_tone5:":{uc_base:"1f3ca-1f3ff",uc_output:"1f3ca-1f3ff",uc_match:"1f3ca-1f3ff",uc_greedy:"1f3ca-1f3ff",shortnames:[":swimmer_tone5:"],category:"activity"},":person_tipping_hand_tone1:":{uc_base:"1f481-1f3fb",uc_output:"1f481-1f3fb",uc_match:"1f481-1f3fb",uc_greedy:"1f481-1f3fb",shortnames:[":information_desk_person_tone1:"],category:"people"},":person_tipping_hand_tone2:":{uc_base:"1f481-1f3fc",uc_output:"1f481-1f3fc",uc_match:"1f481-1f3fc",uc_greedy:"1f481-1f3fc",shortnames:[":information_desk_person_tone2:"],category:"people"},":person_tipping_hand_tone3:":{uc_base:"1f481-1f3fd",uc_output:"1f481-1f3fd",uc_match:"1f481-1f3fd",uc_greedy:"1f481-1f3fd",shortnames:[":information_desk_person_tone3:"],category:"people"},":person_tipping_hand_tone4:":{uc_base:"1f481-1f3fe",uc_output:"1f481-1f3fe",uc_match:"1f481-1f3fe",uc_greedy:"1f481-1f3fe",shortnames:[":information_desk_person_tone4:"],category:"people"},":person_tipping_hand_tone5:":{uc_base:"1f481-1f3ff",uc_output:"1f481-1f3ff",uc_match:"1f481-1f3ff",uc_greedy:"1f481-1f3ff",shortnames:[":information_desk_person_tone5:"],category:"people"},":person_walking_tone1:":{uc_base:"1f6b6-1f3fb",uc_output:"1f6b6-1f3fb",uc_match:"1f6b6-1f3fb",uc_greedy:"1f6b6-1f3fb",shortnames:[":walking_tone1:"],category:"people"},":person_walking_tone2:":{uc_base:"1f6b6-1f3fc",uc_output:"1f6b6-1f3fc",uc_match:"1f6b6-1f3fc",uc_greedy:"1f6b6-1f3fc",shortnames:[":walking_tone2:"],category:"people"},":person_walking_tone3:":{uc_base:"1f6b6-1f3fd",uc_output:"1f6b6-1f3fd",uc_match:"1f6b6-1f3fd",uc_greedy:"1f6b6-1f3fd",shortnames:[":walking_tone3:"],category:"people"},":person_walking_tone4:":{uc_base:"1f6b6-1f3fe",uc_output:"1f6b6-1f3fe",uc_match:"1f6b6-1f3fe",uc_greedy:"1f6b6-1f3fe",shortnames:[":walking_tone4:"],category:"people"},":person_walking_tone5:":{uc_base:"1f6b6-1f3ff",uc_output:"1f6b6-1f3ff",uc_match:"1f6b6-1f3ff",uc_greedy:"1f6b6-1f3ff",shortnames:[":walking_tone5:"],category:"people"},":person_wearing_turban_tone1:":{uc_base:"1f473-1f3fb",uc_output:"1f473-1f3fb",uc_match:"1f473-1f3fb",uc_greedy:"1f473-1f3fb",shortnames:[":man_with_turban_tone1:"],category:"people"},":person_wearing_turban_tone2:":{uc_base:"1f473-1f3fc",uc_output:"1f473-1f3fc",uc_match:"1f473-1f3fc",uc_greedy:"1f473-1f3fc",shortnames:[":man_with_turban_tone2:"],category:"people"},":person_wearing_turban_tone3:":{uc_base:"1f473-1f3fd",uc_output:"1f473-1f3fd",uc_match:"1f473-1f3fd",uc_greedy:"1f473-1f3fd",shortnames:[":man_with_turban_tone3:"],category:"people"},":person_wearing_turban_tone4:":{uc_base:"1f473-1f3fe",uc_output:"1f473-1f3fe",uc_match:"1f473-1f3fe",uc_greedy:"1f473-1f3fe",shortnames:[":man_with_turban_tone4:"],category:"people"},":person_wearing_turban_tone5:":{uc_base:"1f473-1f3ff",uc_output:"1f473-1f3ff",uc_match:"1f473-1f3ff",uc_greedy:"1f473-1f3ff",shortnames:[":man_with_turban_tone5:"],category:"people"},":point_down_tone1:":{uc_base:"1f447-1f3fb",uc_output:"1f447-1f3fb",uc_match:"1f447-1f3fb",uc_greedy:"1f447-1f3fb",shortnames:[],category:"people"},":point_down_tone2:":{uc_base:"1f447-1f3fc",uc_output:"1f447-1f3fc",uc_match:"1f447-1f3fc",uc_greedy:"1f447-1f3fc",shortnames:[],category:"people"},":point_down_tone3:":{uc_base:"1f447-1f3fd",uc_output:"1f447-1f3fd",uc_match:"1f447-1f3fd",uc_greedy:"1f447-1f3fd",shortnames:[],category:"people"},":point_down_tone4:":{uc_base:"1f447-1f3fe",uc_output:"1f447-1f3fe",uc_match:"1f447-1f3fe",uc_greedy:"1f447-1f3fe",shortnames:[],category:"people"},":point_down_tone5:":{uc_base:"1f447-1f3ff",uc_output:"1f447-1f3ff",uc_match:"1f447-1f3ff",uc_greedy:"1f447-1f3ff",shortnames:[],category:"people"},":point_left_tone1:":{uc_base:"1f448-1f3fb",uc_output:"1f448-1f3fb",uc_match:"1f448-1f3fb",uc_greedy:"1f448-1f3fb",shortnames:[],category:"people"},":point_left_tone2:":{uc_base:"1f448-1f3fc",uc_output:"1f448-1f3fc",uc_match:"1f448-1f3fc",uc_greedy:"1f448-1f3fc",shortnames:[],category:"people"},":point_left_tone3:":{uc_base:"1f448-1f3fd",uc_output:"1f448-1f3fd",uc_match:"1f448-1f3fd",uc_greedy:"1f448-1f3fd",shortnames:[],category:"people"},":point_left_tone4:":{uc_base:"1f448-1f3fe",uc_output:"1f448-1f3fe",uc_match:"1f448-1f3fe",uc_greedy:"1f448-1f3fe",shortnames:[],category:"people"},":point_left_tone5:":{uc_base:"1f448-1f3ff",uc_output:"1f448-1f3ff",uc_match:"1f448-1f3ff",uc_greedy:"1f448-1f3ff",shortnames:[],category:"people"},":point_right_tone1:":{uc_base:"1f449-1f3fb",uc_output:"1f449-1f3fb",uc_match:"1f449-1f3fb",uc_greedy:"1f449-1f3fb",shortnames:[],category:"people"},":point_right_tone2:":{uc_base:"1f449-1f3fc",uc_output:"1f449-1f3fc",uc_match:"1f449-1f3fc",uc_greedy:"1f449-1f3fc",shortnames:[],category:"people"},":point_right_tone3:":{uc_base:"1f449-1f3fd",uc_output:"1f449-1f3fd",uc_match:"1f449-1f3fd",uc_greedy:"1f449-1f3fd",shortnames:[],category:"people"},":point_right_tone4:":{uc_base:"1f449-1f3fe",uc_output:"1f449-1f3fe",uc_match:"1f449-1f3fe",uc_greedy:"1f449-1f3fe",shortnames:[],category:"people"},":point_right_tone5:":{uc_base:"1f449-1f3ff",uc_output:"1f449-1f3ff",uc_match:"1f449-1f3ff",uc_greedy:"1f449-1f3ff",shortnames:[],category:"people"},":point_up_2_tone1:":{uc_base:"1f446-1f3fb",uc_output:"1f446-1f3fb",uc_match:"1f446-1f3fb",uc_greedy:"1f446-1f3fb",shortnames:[],category:"people"},":point_up_2_tone2:":{uc_base:"1f446-1f3fc",uc_output:"1f446-1f3fc",uc_match:"1f446-1f3fc",uc_greedy:"1f446-1f3fc",shortnames:[],category:"people"},":point_up_2_tone3:":{uc_base:"1f446-1f3fd",uc_output:"1f446-1f3fd",uc_match:"1f446-1f3fd",uc_greedy:"1f446-1f3fd",shortnames:[],category:"people"},":point_up_2_tone4:":{uc_base:"1f446-1f3fe",uc_output:"1f446-1f3fe",uc_match:"1f446-1f3fe",uc_greedy:"1f446-1f3fe",shortnames:[],category:"people"},":point_up_2_tone5:":{uc_base:"1f446-1f3ff",uc_output:"1f446-1f3ff",uc_match:"1f446-1f3ff",uc_greedy:"1f446-1f3ff",shortnames:[],category:"people"},":police_officer_tone1:":{uc_base:"1f46e-1f3fb",uc_output:"1f46e-1f3fb",uc_match:"1f46e-1f3fb",uc_greedy:"1f46e-1f3fb",shortnames:[":cop_tone1:"],category:"people"},":police_officer_tone2:":{uc_base:"1f46e-1f3fc",uc_output:"1f46e-1f3fc",uc_match:"1f46e-1f3fc",uc_greedy:"1f46e-1f3fc",shortnames:[":cop_tone2:"],category:"people"},":police_officer_tone3:":{uc_base:"1f46e-1f3fd",uc_output:"1f46e-1f3fd",uc_match:"1f46e-1f3fd",uc_greedy:"1f46e-1f3fd",shortnames:[":cop_tone3:"],category:"people"},":police_officer_tone4:":{uc_base:"1f46e-1f3fe",uc_output:"1f46e-1f3fe",uc_match:"1f46e-1f3fe",uc_greedy:"1f46e-1f3fe",shortnames:[":cop_tone4:"],category:"people"},":police_officer_tone5:":{uc_base:"1f46e-1f3ff",uc_output:"1f46e-1f3ff",uc_match:"1f46e-1f3ff",uc_greedy:"1f46e-1f3ff",shortnames:[":cop_tone5:"],category:"people"},":pray_tone1:":{uc_base:"1f64f-1f3fb",uc_output:"1f64f-1f3fb",uc_match:"1f64f-1f3fb",uc_greedy:"1f64f-1f3fb",shortnames:[],category:"people"},":pray_tone2:":{uc_base:"1f64f-1f3fc",uc_output:"1f64f-1f3fc",uc_match:"1f64f-1f3fc",uc_greedy:"1f64f-1f3fc",shortnames:[],category:"people"},":pray_tone3:":{uc_base:"1f64f-1f3fd",uc_output:"1f64f-1f3fd",uc_match:"1f64f-1f3fd",uc_greedy:"1f64f-1f3fd",shortnames:[],category:"people"},":pray_tone4:":{uc_base:"1f64f-1f3fe",uc_output:"1f64f-1f3fe",uc_match:"1f64f-1f3fe",uc_greedy:"1f64f-1f3fe",shortnames:[],category:"people"},":pray_tone5:":{uc_base:"1f64f-1f3ff",uc_output:"1f64f-1f3ff",uc_match:"1f64f-1f3ff",uc_greedy:"1f64f-1f3ff",shortnames:[],category:"people"},":pregnant_woman_tone1:":{uc_base:"1f930-1f3fb",uc_output:"1f930-1f3fb",uc_match:"1f930-1f3fb",uc_greedy:"1f930-1f3fb",shortnames:[":expecting_woman_tone1:"],category:"people"},":pregnant_woman_tone2:":{uc_base:"1f930-1f3fc",uc_output:"1f930-1f3fc",uc_match:"1f930-1f3fc",uc_greedy:"1f930-1f3fc",shortnames:[":expecting_woman_tone2:"],category:"people"},":pregnant_woman_tone3:":{uc_base:"1f930-1f3fd",uc_output:"1f930-1f3fd",uc_match:"1f930-1f3fd",uc_greedy:"1f930-1f3fd",shortnames:[":expecting_woman_tone3:"],category:"people"},":pregnant_woman_tone4:":{uc_base:"1f930-1f3fe",uc_output:"1f930-1f3fe",uc_match:"1f930-1f3fe",uc_greedy:"1f930-1f3fe",shortnames:[":expecting_woman_tone4:"],category:"people"},":pregnant_woman_tone5:":{uc_base:"1f930-1f3ff",uc_output:"1f930-1f3ff",uc_match:"1f930-1f3ff",uc_greedy:"1f930-1f3ff",shortnames:[":expecting_woman_tone5:"],category:"people"},":prince_tone1:":{uc_base:"1f934-1f3fb",uc_output:"1f934-1f3fb",uc_match:"1f934-1f3fb",uc_greedy:"1f934-1f3fb",shortnames:[],category:"people"},":prince_tone2:":{uc_base:"1f934-1f3fc",uc_output:"1f934-1f3fc",uc_match:"1f934-1f3fc",uc_greedy:"1f934-1f3fc",shortnames:[],category:"people"},":prince_tone3:":{uc_base:"1f934-1f3fd",uc_output:"1f934-1f3fd",uc_match:"1f934-1f3fd",uc_greedy:"1f934-1f3fd",shortnames:[],category:"people"},":prince_tone4:":{uc_base:"1f934-1f3fe",uc_output:"1f934-1f3fe",uc_match:"1f934-1f3fe",uc_greedy:"1f934-1f3fe",shortnames:[],category:"people"},":prince_tone5:":{uc_base:"1f934-1f3ff",uc_output:"1f934-1f3ff",uc_match:"1f934-1f3ff",uc_greedy:"1f934-1f3ff",shortnames:[],category:"people"},":princess_tone1:":{uc_base:"1f478-1f3fb",uc_output:"1f478-1f3fb",uc_match:"1f478-1f3fb",uc_greedy:"1f478-1f3fb",shortnames:[],category:"people"},":princess_tone2:":{uc_base:"1f478-1f3fc",uc_output:"1f478-1f3fc",uc_match:"1f478-1f3fc",uc_greedy:"1f478-1f3fc",shortnames:[],category:"people"},":princess_tone3:":{uc_base:"1f478-1f3fd",uc_output:"1f478-1f3fd",uc_match:"1f478-1f3fd",uc_greedy:"1f478-1f3fd",shortnames:[],category:"people"},":princess_tone4:":{uc_base:"1f478-1f3fe",uc_output:"1f478-1f3fe",uc_match:"1f478-1f3fe",uc_greedy:"1f478-1f3fe",shortnames:[],category:"people"},":princess_tone5:":{uc_base:"1f478-1f3ff",uc_output:"1f478-1f3ff",uc_match:"1f478-1f3ff",uc_greedy:"1f478-1f3ff",shortnames:[],category:"people"},":punch_tone1:":{uc_base:"1f44a-1f3fb",uc_output:"1f44a-1f3fb",uc_match:"1f44a-1f3fb",uc_greedy:"1f44a-1f3fb",shortnames:[],category:"people"},":punch_tone2:":{uc_base:"1f44a-1f3fc",uc_output:"1f44a-1f3fc",uc_match:"1f44a-1f3fc",uc_greedy:"1f44a-1f3fc",shortnames:[],category:"people"},":punch_tone3:":{uc_base:"1f44a-1f3fd",uc_output:"1f44a-1f3fd",uc_match:"1f44a-1f3fd",uc_greedy:"1f44a-1f3fd",shortnames:[],category:"people"},":punch_tone4:":{uc_base:"1f44a-1f3fe",uc_output:"1f44a-1f3fe",uc_match:"1f44a-1f3fe",uc_greedy:"1f44a-1f3fe",shortnames:[],category:"people"},":punch_tone5:":{uc_base:"1f44a-1f3ff",uc_output:"1f44a-1f3ff",uc_match:"1f44a-1f3ff",uc_greedy:"1f44a-1f3ff",shortnames:[],category:"people"},":raised_back_of_hand_tone1:":{uc_base:"1f91a-1f3fb",uc_output:"1f91a-1f3fb",uc_match:"1f91a-1f3fb",uc_greedy:"1f91a-1f3fb",shortnames:[":back_of_hand_tone1:"],category:"people"},":raised_back_of_hand_tone2:":{uc_base:"1f91a-1f3fc",uc_output:"1f91a-1f3fc",uc_match:"1f91a-1f3fc",uc_greedy:"1f91a-1f3fc",shortnames:[":back_of_hand_tone2:"],category:"people"},":raised_back_of_hand_tone3:":{uc_base:"1f91a-1f3fd",uc_output:"1f91a-1f3fd",uc_match:"1f91a-1f3fd",uc_greedy:"1f91a-1f3fd",shortnames:[":back_of_hand_tone3:"],category:"people"},":raised_back_of_hand_tone4:":{uc_base:"1f91a-1f3fe",uc_output:"1f91a-1f3fe",uc_match:"1f91a-1f3fe",uc_greedy:"1f91a-1f3fe",shortnames:[":back_of_hand_tone4:"],category:"people"},":raised_back_of_hand_tone5:":{uc_base:"1f91a-1f3ff",uc_output:"1f91a-1f3ff",uc_match:"1f91a-1f3ff",uc_greedy:"1f91a-1f3ff",shortnames:[":back_of_hand_tone5:"],category:"people"},":raised_hands_tone1:":{uc_base:"1f64c-1f3fb",uc_output:"1f64c-1f3fb",uc_match:"1f64c-1f3fb",uc_greedy:"1f64c-1f3fb",shortnames:[],category:"people"},":raised_hands_tone2:":{uc_base:"1f64c-1f3fc",uc_output:"1f64c-1f3fc",uc_match:"1f64c-1f3fc",uc_greedy:"1f64c-1f3fc",shortnames:[],category:"people"},":raised_hands_tone3:":{uc_base:"1f64c-1f3fd",uc_output:"1f64c-1f3fd",uc_match:"1f64c-1f3fd",uc_greedy:"1f64c-1f3fd",shortnames:[],category:"people"},":raised_hands_tone4:":{uc_base:"1f64c-1f3fe",uc_output:"1f64c-1f3fe",uc_match:"1f64c-1f3fe",uc_greedy:"1f64c-1f3fe",shortnames:[],category:"people"},":raised_hands_tone5:":{uc_base:"1f64c-1f3ff",uc_output:"1f64c-1f3ff",uc_match:"1f64c-1f3ff",uc_greedy:"1f64c-1f3ff",shortnames:[],category:"people"},":right_facing_fist_tone1:":{uc_base:"1f91c-1f3fb",uc_output:"1f91c-1f3fb",uc_match:"1f91c-1f3fb",uc_greedy:"1f91c-1f3fb",shortnames:[":right_fist_tone1:"],category:"people"},":right_facing_fist_tone2:":{uc_base:"1f91c-1f3fc",uc_output:"1f91c-1f3fc",uc_match:"1f91c-1f3fc",uc_greedy:"1f91c-1f3fc",shortnames:[":right_fist_tone2:"],category:"people"},":right_facing_fist_tone3:":{uc_base:"1f91c-1f3fd",uc_output:"1f91c-1f3fd",uc_match:"1f91c-1f3fd",uc_greedy:"1f91c-1f3fd",shortnames:[":right_fist_tone3:"],category:"people"},":right_facing_fist_tone4:":{uc_base:"1f91c-1f3fe",uc_output:"1f91c-1f3fe",uc_match:"1f91c-1f3fe",uc_greedy:"1f91c-1f3fe",shortnames:[":right_fist_tone4:"],category:"people"},":right_facing_fist_tone5:":{uc_base:"1f91c-1f3ff",uc_output:"1f91c-1f3ff",uc_match:"1f91c-1f3ff",uc_greedy:"1f91c-1f3ff",shortnames:[":right_fist_tone5:"],category:"people"},":santa_tone1:":{uc_base:"1f385-1f3fb",uc_output:"1f385-1f3fb",uc_match:"1f385-1f3fb",uc_greedy:"1f385-1f3fb",shortnames:[],category:"people"},":santa_tone2:":{uc_base:"1f385-1f3fc",uc_output:"1f385-1f3fc",uc_match:"1f385-1f3fc",uc_greedy:"1f385-1f3fc",shortnames:[],category:"people"},":santa_tone3:":{uc_base:"1f385-1f3fd",uc_output:"1f385-1f3fd",uc_match:"1f385-1f3fd",uc_greedy:"1f385-1f3fd",shortnames:[],category:"people"},":santa_tone4:":{uc_base:"1f385-1f3fe",uc_output:"1f385-1f3fe",uc_match:"1f385-1f3fe",uc_greedy:"1f385-1f3fe",shortnames:[],category:"people"},":santa_tone5:":{uc_base:"1f385-1f3ff",uc_output:"1f385-1f3ff",uc_match:"1f385-1f3ff",uc_greedy:"1f385-1f3ff",shortnames:[],category:"people"},":selfie_tone1:":{uc_base:"1f933-1f3fb",uc_output:"1f933-1f3fb",uc_match:"1f933-1f3fb",uc_greedy:"1f933-1f3fb",shortnames:[],category:"people"},":selfie_tone2:":{uc_base:"1f933-1f3fc",uc_output:"1f933-1f3fc",uc_match:"1f933-1f3fc",uc_greedy:"1f933-1f3fc",shortnames:[],category:"people"},":selfie_tone3:":{uc_base:"1f933-1f3fd",uc_output:"1f933-1f3fd",uc_match:"1f933-1f3fd",uc_greedy:"1f933-1f3fd",shortnames:[],category:"people"},":selfie_tone4:":{uc_base:"1f933-1f3fe",uc_output:"1f933-1f3fe",uc_match:"1f933-1f3fe",uc_greedy:"1f933-1f3fe",shortnames:[],category:"people"},":selfie_tone5:":{uc_base:"1f933-1f3ff",uc_output:"1f933-1f3ff",uc_match:"1f933-1f3ff",uc_greedy:"1f933-1f3ff",shortnames:[],category:"people"},":snowboarder_tone1:":{uc_base:"1f3c2-1f3fb",uc_output:"1f3c2-1f3fb",uc_match:"1f3c2-1f3fb",uc_greedy:"1f3c2-1f3fb",shortnames:[":snowboarder_light_skin_tone:"],category:"activity"},":snowboarder_tone2:":{uc_base:"1f3c2-1f3fc",uc_output:"1f3c2-1f3fc",uc_match:"1f3c2-1f3fc",uc_greedy:"1f3c2-1f3fc",shortnames:[":snowboarder_medium_light_skin_tone:"],category:"activity"},":snowboarder_tone3:":{uc_base:"1f3c2-1f3fd",uc_output:"1f3c2-1f3fd",uc_match:"1f3c2-1f3fd",uc_greedy:"1f3c2-1f3fd",shortnames:[":snowboarder_medium_skin_tone:"],category:"activity"},":snowboarder_tone4:":{uc_base:"1f3c2-1f3fe",uc_output:"1f3c2-1f3fe",uc_match:"1f3c2-1f3fe",uc_greedy:"1f3c2-1f3fe",shortnames:[":snowboarder_medium_dark_skin_tone:"],category:"activity"},":snowboarder_tone5:":{uc_base:"1f3c2-1f3ff",uc_output:"1f3c2-1f3ff",uc_match:"1f3c2-1f3ff",uc_greedy:"1f3c2-1f3ff",shortnames:[":snowboarder_dark_skin_tone:"],category:"activity"},":superhero_tone1:":{uc_base:"1f9b8-1f3fb",uc_output:"1f9b8-1f3fb",uc_match:"1f9b8-1f3fb",uc_greedy:"1f9b8-1f3fb",shortnames:[":superhero_light_skin_tone:"],category:"people"},":superhero_tone2:":{uc_base:"1f9b8-1f3fc",uc_output:"1f9b8-1f3fc",uc_match:"1f9b8-1f3fc",uc_greedy:"1f9b8-1f3fc",shortnames:[":superhero_medium_light_skin_tone:"],category:"people"},":superhero_tone3:":{uc_base:"1f9b8-1f3fd",uc_output:"1f9b8-1f3fd",uc_match:"1f9b8-1f3fd",uc_greedy:"1f9b8-1f3fd",shortnames:[":superhero_medium_skin_tone:"],category:"people"},":superhero_tone4:":{uc_base:"1f9b8-1f3fe",uc_output:"1f9b8-1f3fe",uc_match:"1f9b8-1f3fe",uc_greedy:"1f9b8-1f3fe",shortnames:[":superhero_medium_dark_skin_tone:"],category:"people"},":superhero_tone5:":{uc_base:"1f9b8-1f3ff",uc_output:"1f9b8-1f3ff",uc_match:"1f9b8-1f3ff",uc_greedy:"1f9b8-1f3ff",shortnames:[":superhero_dark_skin_tone:"],category:"people"},":supervillain_tone1:":{uc_base:"1f9b9-1f3fb",uc_output:"1f9b9-1f3fb",uc_match:"1f9b9-1f3fb",uc_greedy:"1f9b9-1f3fb",shortnames:[":supervillain_light_skin_tone:"],category:"people"},":supervillain_tone2:":{uc_base:"1f9b9-1f3fc",uc_output:"1f9b9-1f3fc",uc_match:"1f9b9-1f3fc",uc_greedy:"1f9b9-1f3fc",shortnames:[":supervillain_medium_light_skin_tone:"],category:"people"},":supervillain_tone3:":{uc_base:"1f9b9-1f3fd",uc_output:"1f9b9-1f3fd",uc_match:"1f9b9-1f3fd",uc_greedy:"1f9b9-1f3fd",shortnames:[":supervillain_medium_skin_tone:"],category:"people"},":supervillain_tone4:":{uc_base:"1f9b9-1f3fe",uc_output:"1f9b9-1f3fe",uc_match:"1f9b9-1f3fe",uc_greedy:"1f9b9-1f3fe",shortnames:[":supervillain_medium_dark_skin_tone:"],category:"people"},":supervillain_tone5:":{uc_base:"1f9b9-1f3ff",uc_output:"1f9b9-1f3ff",uc_match:"1f9b9-1f3ff",uc_greedy:"1f9b9-1f3ff",shortnames:[":supervillain_dark_skin_tone:"],category:"people"},":thumbsdown_tone1:":{uc_base:"1f44e-1f3fb",uc_output:"1f44e-1f3fb",uc_match:"1f44e-1f3fb",uc_greedy:"1f44e-1f3fb",shortnames:[":-1_tone1:",":thumbdown_tone1:"],category:"people"},":thumbsdown_tone2:":{uc_base:"1f44e-1f3fc",uc_output:"1f44e-1f3fc",uc_match:"1f44e-1f3fc",uc_greedy:"1f44e-1f3fc",shortnames:[":-1_tone2:",":thumbdown_tone2:"],category:"people"},":thumbsdown_tone3:":{uc_base:"1f44e-1f3fd",uc_output:"1f44e-1f3fd",uc_match:"1f44e-1f3fd",uc_greedy:"1f44e-1f3fd",shortnames:[":-1_tone3:",":thumbdown_tone3:"],category:"people"},":thumbsdown_tone4:":{uc_base:"1f44e-1f3fe",uc_output:"1f44e-1f3fe",uc_match:"1f44e-1f3fe",uc_greedy:"1f44e-1f3fe",shortnames:[":-1_tone4:",":thumbdown_tone4:"],category:"people"},":thumbsdown_tone5:":{uc_base:"1f44e-1f3ff",uc_output:"1f44e-1f3ff",uc_match:"1f44e-1f3ff",uc_greedy:"1f44e-1f3ff",shortnames:[":-1_tone5:",":thumbdown_tone5:"],category:"people"},":thumbsup_tone1:":{uc_base:"1f44d-1f3fb",uc_output:"1f44d-1f3fb",uc_match:"1f44d-1f3fb",uc_greedy:"1f44d-1f3fb",shortnames:[":+1_tone1:",":thumbup_tone1:"],category:"people"},":thumbsup_tone2:":{uc_base:"1f44d-1f3fc",uc_output:"1f44d-1f3fc",uc_match:"1f44d-1f3fc",uc_greedy:"1f44d-1f3fc",shortnames:[":+1_tone2:",":thumbup_tone2:"],category:"people"},":thumbsup_tone3:":{uc_base:"1f44d-1f3fd",uc_output:"1f44d-1f3fd",uc_match:"1f44d-1f3fd",uc_greedy:"1f44d-1f3fd",shortnames:[":+1_tone3:",":thumbup_tone3:"],category:"people"},":thumbsup_tone4:":{uc_base:"1f44d-1f3fe",uc_output:"1f44d-1f3fe",uc_match:"1f44d-1f3fe",uc_greedy:"1f44d-1f3fe",shortnames:[":+1_tone4:",":thumbup_tone4:"],category:"people"},":thumbsup_tone5:":{uc_base:"1f44d-1f3ff",uc_output:"1f44d-1f3ff",uc_match:"1f44d-1f3ff",uc_greedy:"1f44d-1f3ff",shortnames:[":+1_tone5:",":thumbup_tone5:"],category:"people"},":united_nations:":{uc_base:"1f1fa-1f1f3",uc_output:"1f1fa-1f1f3",uc_match:"1f1fa-1f1f3",uc_greedy:"1f1fa-1f1f3",shortnames:[],category:"flags"},":vampire_tone1:":{uc_base:"1f9db-1f3fb",uc_output:"1f9db-1f3fb",uc_match:"1f9db-1f3fb",uc_greedy:"1f9db-1f3fb",shortnames:[":vampire_light_skin_tone:"],category:"people"},":vampire_tone2:":{uc_base:"1f9db-1f3fc",uc_output:"1f9db-1f3fc",uc_match:"1f9db-1f3fc",uc_greedy:"1f9db-1f3fc",shortnames:[":vampire_medium_light_skin_tone:"],category:"people"},":vampire_tone3:":{uc_base:"1f9db-1f3fd",uc_output:"1f9db-1f3fd",uc_match:"1f9db-1f3fd",uc_greedy:"1f9db-1f3fd",shortnames:[":vampire_medium_skin_tone:"],category:"people"},":vampire_tone4:":{uc_base:"1f9db-1f3fe",uc_output:"1f9db-1f3fe",uc_match:"1f9db-1f3fe",uc_greedy:"1f9db-1f3fe",shortnames:[":vampire_medium_dark_skin_tone:"],category:"people"},":vampire_tone5:":{uc_base:"1f9db-1f3ff",uc_output:"1f9db-1f3ff",uc_match:"1f9db-1f3ff",uc_greedy:"1f9db-1f3ff",shortnames:[":vampire_dark_skin_tone:"],category:"people"},":vulcan_tone1:":{uc_base:"1f596-1f3fb",uc_output:"1f596-1f3fb",uc_match:"1f596-1f3fb",uc_greedy:"1f596-1f3fb",shortnames:[":raised_hand_with_part_between_middle_and_ring_fingers_tone1:"],category:"people"},":vulcan_tone2:":{uc_base:"1f596-1f3fc",uc_output:"1f596-1f3fc",uc_match:"1f596-1f3fc",uc_greedy:"1f596-1f3fc",shortnames:[":raised_hand_with_part_between_middle_and_ring_fingers_tone2:"],category:"people"},":vulcan_tone3:":{uc_base:"1f596-1f3fd",uc_output:"1f596-1f3fd",uc_match:"1f596-1f3fd",uc_greedy:"1f596-1f3fd",shortnames:[":raised_hand_with_part_between_middle_and_ring_fingers_tone3:"],category:"people"},":vulcan_tone4:":{uc_base:"1f596-1f3fe",uc_output:"1f596-1f3fe",uc_match:"1f596-1f3fe",uc_greedy:"1f596-1f3fe",shortnames:[":raised_hand_with_part_between_middle_and_ring_fingers_tone4:"],category:"people"},":vulcan_tone5:":{uc_base:"1f596-1f3ff",uc_output:"1f596-1f3ff",uc_match:"1f596-1f3ff",uc_greedy:"1f596-1f3ff",shortnames:[":raised_hand_with_part_between_middle_and_ring_fingers_tone5:"],category:"people"},":wave_tone1:":{uc_base:"1f44b-1f3fb",uc_output:"1f44b-1f3fb",uc_match:"1f44b-1f3fb",uc_greedy:"1f44b-1f3fb",shortnames:[],category:"people"},":wave_tone2:":{uc_base:"1f44b-1f3fc",uc_output:"1f44b-1f3fc",uc_match:"1f44b-1f3fc",uc_greedy:"1f44b-1f3fc",shortnames:[],category:"people"},":wave_tone3:":{uc_base:"1f44b-1f3fd",uc_output:"1f44b-1f3fd",uc_match:"1f44b-1f3fd",uc_greedy:"1f44b-1f3fd",shortnames:[],category:"people"},":wave_tone4:":{uc_base:"1f44b-1f3fe",uc_output:"1f44b-1f3fe",uc_match:"1f44b-1f3fe",uc_greedy:"1f44b-1f3fe",shortnames:[],category:"people"},":wave_tone5:":{uc_base:"1f44b-1f3ff",uc_output:"1f44b-1f3ff",uc_match:"1f44b-1f3ff",uc_greedy:"1f44b-1f3ff",shortnames:[],category:"people"},":woman_tone1:":{uc_base:"1f469-1f3fb",uc_output:"1f469-1f3fb",uc_match:"1f469-1f3fb",uc_greedy:"1f469-1f3fb",shortnames:[],category:"people"},":woman_tone2:":{uc_base:"1f469-1f3fc",uc_output:"1f469-1f3fc",uc_match:"1f469-1f3fc",uc_greedy:"1f469-1f3fc",shortnames:[],category:"people"},":woman_tone3:":{uc_base:"1f469-1f3fd",uc_output:"1f469-1f3fd",uc_match:"1f469-1f3fd",uc_greedy:"1f469-1f3fd",shortnames:[],category:"people"},":woman_tone4:":{uc_base:"1f469-1f3fe",uc_output:"1f469-1f3fe",uc_match:"1f469-1f3fe",uc_greedy:"1f469-1f3fe",shortnames:[],category:"people"},":woman_tone5:":{uc_base:"1f469-1f3ff",uc_output:"1f469-1f3ff",uc_match:"1f469-1f3ff",uc_greedy:"1f469-1f3ff",shortnames:[],category:"people"},":woman_with_headscarf_tone1:":{uc_base:"1f9d5-1f3fb",uc_output:"1f9d5-1f3fb",uc_match:"1f9d5-1f3fb",uc_greedy:"1f9d5-1f3fb",shortnames:[":woman_with_headscarf_light_skin_tone:"],category:"people"},":woman_with_headscarf_tone2:":{uc_base:"1f9d5-1f3fc",uc_output:"1f9d5-1f3fc",uc_match:"1f9d5-1f3fc",uc_greedy:"1f9d5-1f3fc",shortnames:[":woman_with_headscarf_medium_light_skin_tone:"],category:"people"},":woman_with_headscarf_tone3:":{uc_base:"1f9d5-1f3fd",uc_output:"1f9d5-1f3fd",uc_match:"1f9d5-1f3fd",uc_greedy:"1f9d5-1f3fd",shortnames:[":woman_with_headscarf_medium_skin_tone:"],category:"people"},":woman_with_headscarf_tone4:":{uc_base:"1f9d5-1f3fe",uc_output:"1f9d5-1f3fe",uc_match:"1f9d5-1f3fe",uc_greedy:"1f9d5-1f3fe",shortnames:[":woman_with_headscarf_medium_dark_skin_tone:"],category:"people"},":woman_with_headscarf_tone5:":{uc_base:"1f9d5-1f3ff",uc_output:"1f9d5-1f3ff",uc_match:"1f9d5-1f3ff",uc_greedy:"1f9d5-1f3ff",shortnames:[":woman_with_headscarf_dark_skin_tone:"],category:"people"},":fist_tone1:":{uc_base:"270a-1f3fb",uc_output:"270a-1f3fb",uc_match:"270a-1f3fb",uc_greedy:"270a-1f3fb",shortnames:[],category:"people"},":fist_tone2:":{uc_base:"270a-1f3fc",uc_output:"270a-1f3fc",uc_match:"270a-1f3fc",uc_greedy:"270a-1f3fc",shortnames:[],category:"people"},":fist_tone3:":{uc_base:"270a-1f3fd",uc_output:"270a-1f3fd",uc_match:"270a-1f3fd",uc_greedy:"270a-1f3fd",shortnames:[],category:"people"},":fist_tone4:":{uc_base:"270a-1f3fe",uc_output:"270a-1f3fe",uc_match:"270a-1f3fe",uc_greedy:"270a-1f3fe",shortnames:[],category:"people"},":fist_tone5:":{uc_base:"270a-1f3ff",uc_output:"270a-1f3ff",uc_match:"270a-1f3ff",uc_greedy:"270a-1f3ff",shortnames:[],category:"people"},":person_bouncing_ball_tone1:":{uc_base:"26f9-1f3fb",uc_output:"26f9-1f3fb",uc_match:"26f9-fe0f-1f3fb",uc_greedy:"26f9-fe0f-1f3fb",shortnames:[":basketball_player_tone1:",":person_with_ball_tone1:"],category:"activity"},":person_bouncing_ball_tone2:":{uc_base:"26f9-1f3fc",uc_output:"26f9-1f3fc",uc_match:"26f9-fe0f-1f3fc",uc_greedy:"26f9-fe0f-1f3fc",shortnames:[":basketball_player_tone2:",":person_with_ball_tone2:"],category:"activity"},":person_bouncing_ball_tone3:":{uc_base:"26f9-1f3fd",uc_output:"26f9-1f3fd",uc_match:"26f9-fe0f-1f3fd",uc_greedy:"26f9-fe0f-1f3fd",shortnames:[":basketball_player_tone3:",":person_with_ball_tone3:"],category:"activity"},":person_bouncing_ball_tone4:":{uc_base:"26f9-1f3fe",uc_output:"26f9-1f3fe",uc_match:"26f9-fe0f-1f3fe",uc_greedy:"26f9-fe0f-1f3fe",shortnames:[":basketball_player_tone4:",":person_with_ball_tone4:"],category:"activity"},":person_bouncing_ball_tone5:":{uc_base:"26f9-1f3ff",uc_output:"26f9-1f3ff",uc_match:"26f9-fe0f-1f3ff",uc_greedy:"26f9-fe0f-1f3ff",shortnames:[":basketball_player_tone5:",":person_with_ball_tone5:"],category:"activity"},":point_up_tone1:":{uc_base:"261d-1f3fb",uc_output:"261d-1f3fb",uc_match:"261d-fe0f-1f3fb",uc_greedy:"261d-fe0f-1f3fb",shortnames:[],category:"people"},":point_up_tone2:":{uc_base:"261d-1f3fc",uc_output:"261d-1f3fc",uc_match:"261d-fe0f-1f3fc",uc_greedy:"261d-fe0f-1f3fc",shortnames:[],category:"people"},":point_up_tone3:":{uc_base:"261d-1f3fd",uc_output:"261d-1f3fd",uc_match:"261d-fe0f-1f3fd",uc_greedy:"261d-fe0f-1f3fd",shortnames:[],category:"people"},":point_up_tone4:":{uc_base:"261d-1f3fe",uc_output:"261d-1f3fe",uc_match:"261d-fe0f-1f3fe",uc_greedy:"261d-fe0f-1f3fe",shortnames:[],category:"people"},":point_up_tone5:":{uc_base:"261d-1f3ff",uc_output:"261d-1f3ff",uc_match:"261d-fe0f-1f3ff",uc_greedy:"261d-fe0f-1f3ff",shortnames:[],category:"people"},":raised_hand_tone1:":{uc_base:"270b-1f3fb",uc_output:"270b-1f3fb",uc_match:"270b-1f3fb",uc_greedy:"270b-1f3fb",shortnames:[],category:"people"},":raised_hand_tone2:":{uc_base:"270b-1f3fc",uc_output:"270b-1f3fc",uc_match:"270b-1f3fc",uc_greedy:"270b-1f3fc",shortnames:[],category:"people"},":raised_hand_tone3:":{uc_base:"270b-1f3fd",uc_output:"270b-1f3fd",uc_match:"270b-1f3fd",uc_greedy:"270b-1f3fd",shortnames:[],category:"people"},":raised_hand_tone4:":{uc_base:"270b-1f3fe",uc_output:"270b-1f3fe",uc_match:"270b-1f3fe",uc_greedy:"270b-1f3fe",shortnames:[],category:"people"},":raised_hand_tone5:":{uc_base:"270b-1f3ff",uc_output:"270b-1f3ff",uc_match:"270b-1f3ff",uc_greedy:"270b-1f3ff",shortnames:[],category:"people"},":v_tone1:":{uc_base:"270c-1f3fb",uc_output:"270c-1f3fb",uc_match:"270c-fe0f-1f3fb",uc_greedy:"270c-fe0f-1f3fb",shortnames:[],category:"people"},":v_tone2:":{uc_base:"270c-1f3fc",uc_output:"270c-1f3fc",uc_match:"270c-fe0f-1f3fc",uc_greedy:"270c-fe0f-1f3fc",shortnames:[],category:"people"},":v_tone3:":{uc_base:"270c-1f3fd",uc_output:"270c-1f3fd",uc_match:"270c-fe0f-1f3fd",uc_greedy:"270c-fe0f-1f3fd",shortnames:[],category:"people"},":v_tone4:":{uc_base:"270c-1f3fe",uc_output:"270c-1f3fe",uc_match:"270c-fe0f-1f3fe",uc_greedy:"270c-fe0f-1f3fe",shortnames:[],category:"people"},":v_tone5:":{uc_base:"270c-1f3ff",uc_output:"270c-1f3ff",uc_match:"270c-fe0f-1f3ff",uc_greedy:"270c-fe0f-1f3ff",shortnames:[],category:"people"},":writing_hand_tone1:":{uc_base:"270d-1f3fb",uc_output:"270d-1f3fb",uc_match:"270d-fe0f-1f3fb",uc_greedy:"270d-fe0f-1f3fb",shortnames:[],category:"people"},":writing_hand_tone2:":{uc_base:"270d-1f3fc",uc_output:"270d-1f3fc",uc_match:"270d-fe0f-1f3fc",uc_greedy:"270d-fe0f-1f3fc",shortnames:[],category:"people"},":writing_hand_tone3:":{uc_base:"270d-1f3fd",uc_output:"270d-1f3fd",uc_match:"270d-fe0f-1f3fd",uc_greedy:"270d-fe0f-1f3fd",shortnames:[],category:"people"},":writing_hand_tone4:":{uc_base:"270d-1f3fe",uc_output:"270d-1f3fe",uc_match:"270d-fe0f-1f3fe",uc_greedy:"270d-fe0f-1f3fe",shortnames:[],category:"people"},":writing_hand_tone5:":{uc_base:"270d-1f3ff",uc_output:"270d-1f3ff",uc_match:"270d-fe0f-1f3ff",uc_greedy:"270d-fe0f-1f3ff",shortnames:[],category:"people"},":chess_pawn:":{uc_base:"265f",uc_output:"265f-fe0f",uc_match:"265f",uc_greedy:"265f",shortnames:[],category:"objects"},":infinity:":{uc_base:"267e",uc_output:"267e-fe0f",uc_match:"267e",uc_greedy:"267e",shortnames:[],category:"symbols"},":100:":{uc_base:"1f4af",uc_output:"1f4af",uc_match:"1f4af",uc_greedy:"1f4af",shortnames:[],category:"symbols"},":1234:":{uc_base:"1f522",uc_output:"1f522",uc_match:"1f522",uc_greedy:"1f522",shortnames:[],category:"symbols"},":8ball:":{uc_base:"1f3b1",uc_output:"1f3b1",uc_match:"1f3b1",uc_greedy:"1f3b1",shortnames:[],category:"activity"},":a:":{uc_base:"1f170",uc_output:"1f170",uc_match:"1f170-fe0f",uc_greedy:"1f170-fe0f",shortnames:[],category:"symbols"},":ab:":{uc_base:"1f18e",uc_output:"1f18e",uc_match:"1f18e",uc_greedy:"1f18e",shortnames:[],category:"symbols"},":abacus:":{uc_base:"1f9ee",uc_output:"1f9ee",uc_match:"1f9ee",uc_greedy:"1f9ee",shortnames:[],category:"objects"},":abc:":{uc_base:"1f524",uc_output:"1f524",uc_match:"1f524",uc_greedy:"1f524",shortnames:[],category:"symbols"},":abcd:":{uc_base:"1f521",uc_output:"1f521",uc_match:"1f521",uc_greedy:"1f521",shortnames:[],category:"symbols"},":accept:":{uc_base:"1f251",uc_output:"1f251",uc_match:"1f251",uc_greedy:"1f251",shortnames:[],category:"symbols"},":adult:":{uc_base:"1f9d1",uc_output:"1f9d1",uc_match:"1f9d1",uc_greedy:"1f9d1",shortnames:[],category:"people"},":aerial_tramway:":{uc_base:"1f6a1",uc_output:"1f6a1",uc_match:"1f6a1",uc_greedy:"1f6a1",shortnames:[],category:"travel"},":airplane_arriving:":{uc_base:"1f6ec",uc_output:"1f6ec",uc_match:"1f6ec",uc_greedy:"1f6ec",shortnames:[],category:"travel"},":airplane_departure:":{uc_base:"1f6eb",uc_output:"1f6eb",uc_match:"1f6eb",uc_greedy:"1f6eb",shortnames:[],category:"travel"},":airplane_small:":{uc_base:"1f6e9",uc_output:"1f6e9",uc_match:"1f6e9-fe0f",uc_greedy:"1f6e9-fe0f",shortnames:[":small_airplane:"],category:"travel"},":alien:":{uc_base:"1f47d",uc_output:"1f47d",uc_match:"1f47d-fe0f",uc_greedy:"1f47d-fe0f",shortnames:[],category:"people"},":ambulance:":{uc_base:"1f691",uc_output:"1f691",uc_match:"1f691-fe0f",uc_greedy:"1f691-fe0f",shortnames:[],category:"travel"},":amphora:":{uc_base:"1f3fa",uc_output:"1f3fa",uc_match:"1f3fa",uc_greedy:"1f3fa",shortnames:[],category:"objects"},":angel:":{uc_base:"1f47c",uc_output:"1f47c",uc_match:"1f47c",uc_greedy:"1f47c",shortnames:[],category:"people"},":anger:":{uc_base:"1f4a2",uc_output:"1f4a2",uc_match:"1f4a2",uc_greedy:"1f4a2",shortnames:[],category:"symbols"},":anger_right:":{uc_base:"1f5ef",uc_output:"1f5ef",uc_match:"1f5ef-fe0f",uc_greedy:"1f5ef-fe0f",shortnames:[":right_anger_bubble:"],category:"symbols"},":angry:":{uc_base:"1f620",uc_output:"1f620",uc_match:"1f620",uc_greedy:"1f620",shortnames:[],category:"people"},":anguished:":{uc_base:"1f627",uc_output:"1f627",uc_match:"1f627",uc_greedy:"1f627",shortnames:[],category:"people"},":ant:":{uc_base:"1f41c",uc_output:"1f41c",uc_match:"1f41c",uc_greedy:"1f41c",shortnames:[],category:"nature"},":apple:":{uc_base:"1f34e",uc_output:"1f34e",uc_match:"1f34e",uc_greedy:"1f34e",shortnames:[],category:"food"},":arrow_down_small:":{uc_base:"1f53d",uc_output:"1f53d",uc_match:"1f53d",uc_greedy:"1f53d",shortnames:[],category:"symbols"},":arrow_up_small:":{uc_base:"1f53c",uc_output:"1f53c",uc_match:"1f53c",uc_greedy:"1f53c",shortnames:[],category:"symbols"},":arrows_clockwise:":{uc_base:"1f503",uc_output:"1f503",uc_match:"1f503",uc_greedy:"1f503",shortnames:[],category:"symbols"},":arrows_counterclockwise:":{uc_base:"1f504",uc_output:"1f504",uc_match:"1f504",uc_greedy:"1f504",shortnames:[],category:"symbols"},":art:":{uc_base:"1f3a8",uc_output:"1f3a8",uc_match:"1f3a8",uc_greedy:"1f3a8",shortnames:[],category:"activity"},":articulated_lorry:":{uc_base:"1f69b",uc_output:"1f69b",uc_match:"1f69b",uc_greedy:"1f69b",shortnames:[],category:"travel"},":astonished:":{uc_base:"1f632",uc_output:"1f632",uc_match:"1f632",uc_greedy:"1f632",shortnames:[],category:"people"},":athletic_shoe:":{uc_base:"1f45f",uc_output:"1f45f",uc_match:"1f45f",uc_greedy:"1f45f",shortnames:[],category:"people"},":atm:":{uc_base:"1f3e7",uc_output:"1f3e7",uc_match:"1f3e7",uc_greedy:"1f3e7",shortnames:[],category:"symbols"},":avocado:":{uc_base:"1f951",uc_output:"1f951",uc_match:"1f951",uc_greedy:"1f951",shortnames:[],category:"food"},":b:":{uc_base:"1f171",uc_output:"1f171",uc_match:"1f171-fe0f",uc_greedy:"1f171-fe0f",shortnames:[],category:"symbols"},":baby:":{uc_base:"1f476",uc_output:"1f476",uc_match:"1f476",uc_greedy:"1f476",shortnames:[],category:"people"},":baby_bottle:":{uc_base:"1f37c",uc_output:"1f37c",uc_match:"1f37c",uc_greedy:"1f37c",shortnames:[],category:"food"},":baby_chick:":{uc_base:"1f424",uc_output:"1f424",uc_match:"1f424",uc_greedy:"1f424",shortnames:[],category:"nature"},":baby_symbol:":{uc_base:"1f6bc",uc_output:"1f6bc",uc_match:"1f6bc-fe0f",uc_greedy:"1f6bc-fe0f",shortnames:[],category:"symbols"},":back:":{uc_base:"1f519",uc_output:"1f519",uc_match:"1f519",uc_greedy:"1f519",shortnames:[],category:"symbols"},":bacon:":{uc_base:"1f953",uc_output:"1f953",uc_match:"1f953",uc_greedy:"1f953",shortnames:[],category:"food"},":badger:":{uc_base:"1f9a1",uc_output:"1f9a1",uc_match:"1f9a1",uc_greedy:"1f9a1",shortnames:[],category:"nature"},":badminton:":{uc_base:"1f3f8",uc_output:"1f3f8",uc_match:"1f3f8",uc_greedy:"1f3f8",shortnames:[],category:"activity"},":bagel:":{uc_base:"1f96f",uc_output:"1f96f",uc_match:"1f96f",uc_greedy:"1f96f",shortnames:[],category:"food"},":baggage_claim:":{uc_base:"1f6c4",uc_output:"1f6c4",uc_match:"1f6c4",uc_greedy:"1f6c4",shortnames:[],category:"symbols"},":bald:":{uc_base:"1f9b2",uc_output:"1f9b2",uc_match:"1f9b2",uc_greedy:"1f9b2",shortnames:[],category:"people"},":balloon:":{uc_base:"1f388",uc_output:"1f388",uc_match:"1f388",uc_greedy:"1f388",shortnames:[],category:"objects"},":ballot_box:":{uc_base:"1f5f3",uc_output:"1f5f3",uc_match:"1f5f3-fe0f",uc_greedy:"1f5f3-fe0f",shortnames:[":ballot_box_with_ballot:"],category:"objects"},":bamboo:":{uc_base:"1f38d",uc_output:"1f38d",uc_match:"1f38d",uc_greedy:"1f38d",shortnames:[],category:"nature"},":banana:":{uc_base:"1f34c",uc_output:"1f34c",uc_match:"1f34c",uc_greedy:"1f34c",shortnames:[],category:"food"},":bank:":{uc_base:"1f3e6",uc_output:"1f3e6",uc_match:"1f3e6",uc_greedy:"1f3e6",shortnames:[],category:"travel"},":bar_chart:":{uc_base:"1f4ca",uc_output:"1f4ca",uc_match:"1f4ca",uc_greedy:"1f4ca",shortnames:[],category:"objects"},":barber:":{uc_base:"1f488",uc_output:"1f488",uc_match:"1f488",uc_greedy:"1f488",shortnames:[],category:"objects"},":basket:":{uc_base:"1f9fa",uc_output:"1f9fa",uc_match:"1f9fa",uc_greedy:"1f9fa",shortnames:[],category:"objects"},":basketball:":{uc_base:"1f3c0",uc_output:"1f3c0",uc_match:"1f3c0",uc_greedy:"1f3c0",shortnames:[],category:"activity"},":bat:":{uc_base:"1f987",uc_output:"1f987",uc_match:"1f987",uc_greedy:"1f987",shortnames:[],category:"nature"},":bath:":{uc_base:"1f6c0",uc_output:"1f6c0",uc_match:"1f6c0",uc_greedy:"1f6c0",shortnames:[],category:"objects"},":bathtub:":{uc_base:"1f6c1",uc_output:"1f6c1",uc_match:"1f6c1",uc_greedy:"1f6c1",shortnames:[],category:"objects"},":battery:":{uc_base:"1f50b",uc_output:"1f50b",uc_match:"1f50b",uc_greedy:"1f50b",shortnames:[],category:"objects"},":beach:":{uc_base:"1f3d6",uc_output:"1f3d6",uc_match:"1f3d6-fe0f",uc_greedy:"1f3d6-fe0f",shortnames:[":beach_with_umbrella:"],category:"travel"},":bear:":{uc_base:"1f43b",uc_output:"1f43b",uc_match:"1f43b",uc_greedy:"1f43b",shortnames:[],category:"nature"},":bearded_person:":{uc_base:"1f9d4",uc_output:"1f9d4",uc_match:"1f9d4",uc_greedy:"1f9d4",shortnames:[],category:"people"},":bed:":{uc_base:"1f6cf",uc_output:"1f6cf",uc_match:"1f6cf-fe0f",uc_greedy:"1f6cf-fe0f",shortnames:[],category:"objects"},":bee:":{uc_base:"1f41d",uc_output:"1f41d",uc_match:"1f41d",uc_greedy:"1f41d",shortnames:[],category:"nature"},":beer:":{uc_base:"1f37a",uc_output:"1f37a",uc_match:"1f37a",uc_greedy:"1f37a",shortnames:[],category:"food"},":beers:":{uc_base:"1f37b",uc_output:"1f37b",uc_match:"1f37b",uc_greedy:"1f37b",shortnames:[],category:"food"},":beetle:":{uc_base:"1f41e",uc_output:"1f41e",uc_match:"1f41e",uc_greedy:"1f41e",shortnames:[],category:"nature"},":beginner:":{uc_base:"1f530",uc_output:"1f530",uc_match:"1f530",uc_greedy:"1f530",shortnames:[],category:"symbols"},":bell:":{uc_base:"1f514",uc_output:"1f514",uc_match:"1f514",uc_greedy:"1f514",shortnames:[],category:"symbols"},":bellhop:":{uc_base:"1f6ce",uc_output:"1f6ce",uc_match:"1f6ce-fe0f",uc_greedy:"1f6ce-fe0f",shortnames:[":bellhop_bell:"],category:"objects"},":bento:":{uc_base:"1f371",uc_output:"1f371",uc_match:"1f371",uc_greedy:"1f371",shortnames:[],category:"food"},":bike:":{uc_base:"1f6b2",uc_output:"1f6b2",uc_match:"1f6b2-fe0f",uc_greedy:"1f6b2-fe0f",shortnames:[],category:"travel"},":bikini:":{uc_base:"1f459",uc_output:"1f459",uc_match:"1f459",uc_greedy:"1f459",shortnames:[],category:"people"},":billed_cap:":{uc_base:"1f9e2",uc_output:"1f9e2",uc_match:"1f9e2",uc_greedy:"1f9e2",shortnames:[],category:"people"},":bird:":{uc_base:"1f426",uc_output:"1f426",uc_match:"1f426-fe0f",uc_greedy:"1f426-fe0f",shortnames:[],category:"nature"},":birthday:":{uc_base:"1f382",uc_output:"1f382",uc_match:"1f382",uc_greedy:"1f382",shortnames:[],category:"food"},":black_heart:":{uc_base:"1f5a4",uc_output:"1f5a4",uc_match:"1f5a4",uc_greedy:"1f5a4",shortnames:[],category:"symbols"},":black_joker:":{uc_base:"1f0cf",uc_output:"1f0cf",uc_match:"1f0cf",uc_greedy:"1f0cf",shortnames:[],category:"symbols"},":black_square_button:":{uc_base:"1f532",uc_output:"1f532",uc_match:"1f532",uc_greedy:"1f532",shortnames:[],category:"symbols"},":blond_haired_person:":{uc_base:"1f471",uc_output:"1f471",uc_match:"1f471",uc_greedy:"1f471",shortnames:[":person_with_blond_hair:"],category:"people"},":blossom:":{uc_base:"1f33c",uc_output:"1f33c",uc_match:"1f33c",uc_greedy:"1f33c",shortnames:[],category:"nature"},":blowfish:":{uc_base:"1f421",uc_output:"1f421",uc_match:"1f421",uc_greedy:"1f421",shortnames:[],category:"nature"},":blue_book:":{uc_base:"1f4d8",uc_output:"1f4d8",uc_match:"1f4d8",uc_greedy:"1f4d8",shortnames:[],category:"objects"},":blue_car:":{uc_base:"1f699",uc_output:"1f699",uc_match:"1f699",uc_greedy:"1f699",shortnames:[],category:"travel"},":blue_circle:":{uc_base:"1f535",uc_output:"1f535",uc_match:"1f535",uc_greedy:"1f535",shortnames:[],category:"symbols"},":blue_heart:":{uc_base:"1f499",uc_output:"1f499",uc_match:"1f499",uc_greedy:"1f499",shortnames:[],category:"symbols"},":blush:":{uc_base:"1f60a",uc_output:"1f60a",uc_match:"1f60a",uc_greedy:"1f60a",shortnames:[],category:"people"},":boar:":{uc_base:"1f417",uc_output:"1f417",uc_match:"1f417",uc_greedy:"1f417",shortnames:[],category:"nature"},":bomb:":{uc_base:"1f4a3",uc_output:"1f4a3",uc_match:"1f4a3-fe0f",uc_greedy:"1f4a3-fe0f",shortnames:[],category:"objects"},":bone:":{uc_base:"1f9b4",uc_output:"1f9b4",uc_match:"1f9b4",uc_greedy:"1f9b4",shortnames:[],category:"people"},":book:":{uc_base:"1f4d6",uc_output:"1f4d6",uc_match:"1f4d6",uc_greedy:"1f4d6",shortnames:[],category:"objects"},":bookmark:":{uc_base:"1f516",uc_output:"1f516",uc_match:"1f516",uc_greedy:"1f516",shortnames:[],category:"objects"},":bookmark_tabs:":{uc_base:"1f4d1",uc_output:"1f4d1",uc_match:"1f4d1",uc_greedy:"1f4d1",shortnames:[],category:"objects"},":books:":{uc_base:"1f4da",uc_output:"1f4da",uc_match:"1f4da-fe0f",uc_greedy:"1f4da-fe0f",shortnames:[],category:"objects"},":boom:":{uc_base:"1f4a5",uc_output:"1f4a5",uc_match:"1f4a5",uc_greedy:"1f4a5",shortnames:[],category:"nature"},":boot:":{uc_base:"1f462",uc_output:"1f462",uc_match:"1f462",uc_greedy:"1f462",shortnames:[],category:"people"},":bouquet:":{uc_base:"1f490",uc_output:"1f490",uc_match:"1f490",uc_greedy:"1f490",shortnames:[],category:"nature"},":bow_and_arrow:":{uc_base:"1f3f9",uc_output:"1f3f9",uc_match:"1f3f9",uc_greedy:"1f3f9",shortnames:[":archery:"],category:"activity"},":bowl_with_spoon:":{uc_base:"1f963",uc_output:"1f963",uc_match:"1f963",uc_greedy:"1f963",shortnames:[],category:"food"},":bowling:":{uc_base:"1f3b3",uc_output:"1f3b3",uc_match:"1f3b3",uc_greedy:"1f3b3",shortnames:[],category:"activity"},":boxing_glove:":{uc_base:"1f94a",uc_output:"1f94a",uc_match:"1f94a",uc_greedy:"1f94a",shortnames:[":boxing_gloves:"],category:"activity"},":boy:":{uc_base:"1f466",uc_output:"1f466",uc_match:"1f466",uc_greedy:"1f466",shortnames:[],category:"people"},":brain:":{uc_base:"1f9e0",uc_output:"1f9e0",uc_match:"1f9e0",uc_greedy:"1f9e0",shortnames:[],category:"people"},":bread:":{uc_base:"1f35e",uc_output:"1f35e",uc_match:"1f35e",uc_greedy:"1f35e",shortnames:[],category:"food"},":breast_feeding:":{uc_base:"1f931",uc_output:"1f931",uc_match:"1f931",uc_greedy:"1f931",shortnames:[],category:"people"},":bricks:":{uc_base:"1f9f1",uc_output:"1f9f1",uc_match:"1f9f1",uc_greedy:"1f9f1",shortnames:[],category:"objects"},":bride_with_veil:":{uc_base:"1f470",uc_output:"1f470",uc_match:"1f470",uc_greedy:"1f470",shortnames:[],category:"people"},":bridge_at_night:":{uc_base:"1f309",uc_output:"1f309",uc_match:"1f309",uc_greedy:"1f309",shortnames:[],category:"travel"},":briefcase:":{uc_base:"1f4bc",uc_output:"1f4bc",uc_match:"1f4bc",uc_greedy:"1f4bc",shortnames:[],category:"people"},":broccoli:":{uc_base:"1f966",uc_output:"1f966",uc_match:"1f966",uc_greedy:"1f966",shortnames:[],category:"food"},":broken_heart:":{uc_base:"1f494",uc_output:"1f494",uc_match:"1f494",uc_greedy:"1f494",shortnames:[],category:"symbols"},":broom:":{uc_base:"1f9f9",uc_output:"1f9f9",uc_match:"1f9f9",uc_greedy:"1f9f9",shortnames:[],category:"objects"},":bug:":{uc_base:"1f41b",uc_output:"1f41b",uc_match:"1f41b",uc_greedy:"1f41b",shortnames:[],category:"nature"},":bulb:":{uc_base:"1f4a1",uc_output:"1f4a1",uc_match:"1f4a1",uc_greedy:"1f4a1",shortnames:[],category:"objects"},":bullettrain_front:":{uc_base:"1f685",uc_output:"1f685",uc_match:"1f685",uc_greedy:"1f685",shortnames:[],category:"travel"},":bullettrain_side:":{uc_base:"1f684",uc_output:"1f684",uc_match:"1f684",uc_greedy:"1f684",shortnames:[],category:"travel"},":burrito:":{uc_base:"1f32f",uc_output:"1f32f",uc_match:"1f32f",uc_greedy:"1f32f",shortnames:[],category:"food"},":bus:":{uc_base:"1f68c",uc_output:"1f68c",uc_match:"1f68c",uc_greedy:"1f68c",shortnames:[],category:"travel"},":busstop:":{uc_base:"1f68f",uc_output:"1f68f",uc_match:"1f68f",uc_greedy:"1f68f",shortnames:[],category:"travel"},":bust_in_silhouette:":{uc_base:"1f464",uc_output:"1f464",uc_match:"1f464",uc_greedy:"1f464",shortnames:[],category:"people"},":busts_in_silhouette:":{uc_base:"1f465",uc_output:"1f465",uc_match:"1f465",uc_greedy:"1f465",shortnames:[],category:"people"},":butterfly:":{uc_base:"1f98b",uc_output:"1f98b",uc_match:"1f98b",uc_greedy:"1f98b",shortnames:[],category:"nature"},":cactus:":{uc_base:"1f335",uc_output:"1f335",uc_match:"1f335",uc_greedy:"1f335",shortnames:[],category:"nature"},":cake:":{uc_base:"1f370",uc_output:"1f370",uc_match:"1f370",uc_greedy:"1f370",shortnames:[],category:"food"},":calendar:":{uc_base:"1f4c6",uc_output:"1f4c6",uc_match:"1f4c6",uc_greedy:"1f4c6",shortnames:[],category:"objects"},":calendar_spiral:":{uc_base:"1f5d3",uc_output:"1f5d3",uc_match:"1f5d3-fe0f",uc_greedy:"1f5d3-fe0f",shortnames:[":spiral_calendar_pad:"],category:"objects"},":call_me:":{uc_base:"1f919",uc_output:"1f919",uc_match:"1f919",uc_greedy:"1f919",shortnames:[":call_me_hand:"],category:"people"},":calling:":{uc_base:"1f4f2",uc_output:"1f4f2",uc_match:"1f4f2",uc_greedy:"1f4f2",shortnames:[],category:"objects"},":camel:":{uc_base:"1f42b",uc_output:"1f42b",uc_match:"1f42b",uc_greedy:"1f42b",shortnames:[],category:"nature"},":camera:":{uc_base:"1f4f7",uc_output:"1f4f7",uc_match:"1f4f7-fe0f",uc_greedy:"1f4f7-fe0f",shortnames:[],category:"objects"},":camera_with_flash:":{uc_base:"1f4f8",uc_output:"1f4f8",uc_match:"1f4f8",uc_greedy:"1f4f8",shortnames:[],category:"objects"},":camping:":{uc_base:"1f3d5",uc_output:"1f3d5",uc_match:"1f3d5-fe0f",uc_greedy:"1f3d5-fe0f",shortnames:[],category:"travel"},":candle:":{uc_base:"1f56f",uc_output:"1f56f",uc_match:"1f56f-fe0f",uc_greedy:"1f56f-fe0f",shortnames:[],category:"objects"},":candy:":{uc_base:"1f36c",uc_output:"1f36c",uc_match:"1f36c",uc_greedy:"1f36c",shortnames:[],category:"food"},":canned_food:":{uc_base:"1f96b",uc_output:"1f96b",uc_match:"1f96b",uc_greedy:"1f96b",shortnames:[],category:"food"},":canoe:":{uc_base:"1f6f6",uc_output:"1f6f6",uc_match:"1f6f6",uc_greedy:"1f6f6",shortnames:[":kayak:"],category:"travel"},":capital_abcd:":{uc_base:"1f520",uc_output:"1f520",uc_match:"1f520",uc_greedy:"1f520",shortnames:[],category:"symbols"},":card_box:":{uc_base:"1f5c3",uc_output:"1f5c3",uc_match:"1f5c3-fe0f",uc_greedy:"1f5c3-fe0f",shortnames:[":card_file_box:"],category:"objects"},":card_index:":{uc_base:"1f4c7",uc_output:"1f4c7",uc_match:"1f4c7",uc_greedy:"1f4c7",shortnames:[],category:"objects"},":carousel_horse:":{uc_base:"1f3a0",uc_output:"1f3a0",uc_match:"1f3a0",uc_greedy:"1f3a0",shortnames:[],category:"travel"},":carrot:":{uc_base:"1f955",uc_output:"1f955",uc_match:"1f955",uc_greedy:"1f955",shortnames:[],category:"food"},":cat2:":{uc_base:"1f408",uc_output:"1f408",uc_match:"1f408-fe0f",uc_greedy:"1f408-fe0f",shortnames:[],category:"nature"},":cat:":{uc_base:"1f431",uc_output:"1f431",uc_match:"1f431",uc_greedy:"1f431",shortnames:[],category:"nature"},":cd:":{uc_base:"1f4bf",uc_output:"1f4bf",uc_match:"1f4bf-fe0f",uc_greedy:"1f4bf-fe0f",shortnames:[],category:"objects"},":champagne:":{uc_base:"1f37e",uc_output:"1f37e",uc_match:"1f37e",uc_greedy:"1f37e",shortnames:[":bottle_with_popping_cork:"],category:"food"},":champagne_glass:":{uc_base:"1f942",uc_output:"1f942",uc_match:"1f942",uc_greedy:"1f942",shortnames:[":clinking_glass:"],category:"food"},":chart:":{uc_base:"1f4b9",uc_output:"1f4b9",uc_match:"1f4b9",uc_greedy:"1f4b9",shortnames:[],category:"symbols"},":chart_with_downwards_trend:":{uc_base:"1f4c9",uc_output:"1f4c9",uc_match:"1f4c9",uc_greedy:"1f4c9",shortnames:[],category:"objects"},":chart_with_upwards_trend:":{uc_base:"1f4c8",uc_output:"1f4c8",uc_match:"1f4c8",uc_greedy:"1f4c8",shortnames:[],category:"objects"},":checkered_flag:":{uc_base:"1f3c1",uc_output:"1f3c1",uc_match:"1f3c1",uc_greedy:"1f3c1",shortnames:[],category:"flags"},":cheese:":{uc_base:"1f9c0",uc_output:"1f9c0",uc_match:"1f9c0",uc_greedy:"1f9c0",shortnames:[":cheese_wedge:"],category:"food"},":cherries:":{uc_base:"1f352",uc_output:"1f352",uc_match:"1f352",uc_greedy:"1f352",shortnames:[],category:"food"},":cherry_blossom:":{uc_base:"1f338",uc_output:"1f338",uc_match:"1f338",uc_greedy:"1f338",shortnames:[],category:"nature"},":chestnut:":{uc_base:"1f330",uc_output:"1f330",uc_match:"1f330",uc_greedy:"1f330",shortnames:[],category:"food"},":chicken:":{uc_base:"1f414",uc_output:"1f414",uc_match:"1f414",uc_greedy:"1f414",shortnames:[],category:"nature"},":child:":{uc_base:"1f9d2",uc_output:"1f9d2",uc_match:"1f9d2",uc_greedy:"1f9d2",shortnames:[],category:"people"},":children_crossing:":{uc_base:"1f6b8",uc_output:"1f6b8",uc_match:"1f6b8",uc_greedy:"1f6b8",shortnames:[],category:"symbols"},":chipmunk:":{uc_base:"1f43f",uc_output:"1f43f",uc_match:"1f43f-fe0f",uc_greedy:"1f43f-fe0f",shortnames:[],category:"nature"},":chocolate_bar:":{uc_base:"1f36b",uc_output:"1f36b",uc_match:"1f36b",uc_greedy:"1f36b",shortnames:[],category:"food"},":chopsticks:":{uc_base:"1f962",uc_output:"1f962",uc_match:"1f962",uc_greedy:"1f962",shortnames:[],category:"food"},":christmas_tree:":{uc_base:"1f384",uc_output:"1f384",uc_match:"1f384",uc_greedy:"1f384",shortnames:[],category:"nature"},":cinema:":{uc_base:"1f3a6",uc_output:"1f3a6",uc_match:"1f3a6",uc_greedy:"1f3a6",shortnames:[],category:"symbols"},":circus_tent:":{uc_base:"1f3aa",uc_output:"1f3aa",uc_match:"1f3aa",uc_greedy:"1f3aa",shortnames:[],category:"activity"},":city_dusk:":{uc_base:"1f306",uc_output:"1f306",uc_match:"1f306",uc_greedy:"1f306",shortnames:[],category:"travel"},":city_sunset:":{uc_base:"1f307",uc_output:"1f307",uc_match:"1f307",uc_greedy:"1f307",shortnames:[":city_sunrise:"],category:"travel"},":cityscape:":{uc_base:"1f3d9",uc_output:"1f3d9",uc_match:"1f3d9-fe0f",uc_greedy:"1f3d9-fe0f",shortnames:[],category:"travel"},":cl:":{uc_base:"1f191",uc_output:"1f191",uc_match:"1f191",uc_greedy:"1f191",shortnames:[],category:"symbols"},":clap:":{uc_base:"1f44f",uc_output:"1f44f",uc_match:"1f44f",uc_greedy:"1f44f",shortnames:[],category:"people"},":clapper:":{uc_base:"1f3ac",uc_output:"1f3ac",uc_match:"1f3ac-fe0f",uc_greedy:"1f3ac-fe0f",shortnames:[],category:"activity"},":classical_building:":{uc_base:"1f3db",uc_output:"1f3db",uc_match:"1f3db-fe0f",uc_greedy:"1f3db-fe0f",shortnames:[],category:"travel"},":clipboard:":{uc_base:"1f4cb",uc_output:"1f4cb",uc_match:"1f4cb-fe0f",uc_greedy:"1f4cb-fe0f",shortnames:[],category:"objects"},":clock1030:":{uc_base:"1f565",uc_output:"1f565",uc_match:"1f565-fe0f",uc_greedy:"1f565-fe0f",shortnames:[],category:"symbols"},":clock10:":{uc_base:"1f559",uc_output:"1f559",uc_match:"1f559-fe0f",uc_greedy:"1f559-fe0f",shortnames:[],category:"symbols"},":clock1130:":{uc_base:"1f566",uc_output:"1f566",uc_match:"1f566-fe0f",uc_greedy:"1f566-fe0f",shortnames:[],category:"symbols"},":clock11:":{uc_base:"1f55a",uc_output:"1f55a",uc_match:"1f55a-fe0f",uc_greedy:"1f55a-fe0f",shortnames:[],category:"symbols"},":clock1230:":{uc_base:"1f567",uc_output:"1f567",uc_match:"1f567-fe0f",uc_greedy:"1f567-fe0f",shortnames:[],category:"symbols"},":clock12:":{uc_base:"1f55b",uc_output:"1f55b",uc_match:"1f55b-fe0f",uc_greedy:"1f55b-fe0f",shortnames:[],category:"symbols"},":clock130:":{uc_base:"1f55c",uc_output:"1f55c",uc_match:"1f55c-fe0f",uc_greedy:"1f55c-fe0f",shortnames:[],category:"symbols"},":clock1:":{uc_base:"1f550",uc_output:"1f550",uc_match:"1f550-fe0f",uc_greedy:"1f550-fe0f",shortnames:[],category:"symbols"},":clock230:":{uc_base:"1f55d",uc_output:"1f55d",uc_match:"1f55d-fe0f",uc_greedy:"1f55d-fe0f",shortnames:[],category:"symbols"},":clock2:":{uc_base:"1f551",uc_output:"1f551",uc_match:"1f551-fe0f",uc_greedy:"1f551-fe0f",shortnames:[],category:"symbols"},":clock330:":{uc_base:"1f55e",uc_output:"1f55e",uc_match:"1f55e-fe0f",uc_greedy:"1f55e-fe0f",shortnames:[],category:"symbols"},":clock3:":{uc_base:"1f552",uc_output:"1f552",uc_match:"1f552-fe0f",uc_greedy:"1f552-fe0f",shortnames:[],category:"symbols"},":clock430:":{uc_base:"1f55f",uc_output:"1f55f",uc_match:"1f55f-fe0f",uc_greedy:"1f55f-fe0f",shortnames:[],category:"symbols"},":clock4:":{uc_base:"1f553",uc_output:"1f553",uc_match:"1f553-fe0f",uc_greedy:"1f553-fe0f",shortnames:[],category:"symbols"},":clock530:":{uc_base:"1f560",uc_output:"1f560",uc_match:"1f560-fe0f",uc_greedy:"1f560-fe0f",shortnames:[],category:"symbols"},":clock5:":{uc_base:"1f554",uc_output:"1f554",uc_match:"1f554-fe0f",uc_greedy:"1f554-fe0f",shortnames:[],category:"symbols"},":clock630:":{uc_base:"1f561",uc_output:"1f561",uc_match:"1f561-fe0f",uc_greedy:"1f561-fe0f",shortnames:[],category:"symbols"},":clock6:":{uc_base:"1f555",uc_output:"1f555",uc_match:"1f555-fe0f",uc_greedy:"1f555-fe0f",shortnames:[],category:"symbols"},":clock730:":{uc_base:"1f562",uc_output:"1f562",uc_match:"1f562-fe0f",uc_greedy:"1f562-fe0f",shortnames:[],category:"symbols"},":clock7:":{uc_base:"1f556",uc_output:"1f556",uc_match:"1f556-fe0f",uc_greedy:"1f556-fe0f",shortnames:[],category:"symbols"},":clock830:":{uc_base:"1f563",uc_output:"1f563",uc_match:"1f563-fe0f",uc_greedy:"1f563-fe0f",shortnames:[],category:"symbols"},":clock8:":{uc_base:"1f557",uc_output:"1f557",uc_match:"1f557-fe0f",uc_greedy:"1f557-fe0f",shortnames:[],category:"symbols"},":clock930:":{uc_base:"1f564",uc_output:"1f564",uc_match:"1f564-fe0f",uc_greedy:"1f564-fe0f",shortnames:[],category:"symbols"},":clock9:":{uc_base:"1f558",uc_output:"1f558",uc_match:"1f558-fe0f",uc_greedy:"1f558-fe0f",shortnames:[],category:"symbols"},":clock:":{uc_base:"1f570",uc_output:"1f570",uc_match:"1f570-fe0f",uc_greedy:"1f570-fe0f",shortnames:[":mantlepiece_clock:"],category:"objects"},":closed_book:":{uc_base:"1f4d5",uc_output:"1f4d5",uc_match:"1f4d5",uc_greedy:"1f4d5",shortnames:[],category:"objects"},":closed_lock_with_key:":{uc_base:"1f510",uc_output:"1f510",uc_match:"1f510",uc_greedy:"1f510",shortnames:[],category:"objects"},":closed_umbrella:":{uc_base:"1f302",uc_output:"1f302",uc_match:"1f302",uc_greedy:"1f302",shortnames:[],category:"people"},":cloud_lightning:":{uc_base:"1f329",uc_output:"1f329",uc_match:"1f329-fe0f",uc_greedy:"1f329-fe0f",shortnames:[":cloud_with_lightning:"],category:"nature"},":cloud_rain:":{uc_base:"1f327",uc_output:"1f327",uc_match:"1f327-fe0f",uc_greedy:"1f327-fe0f",shortnames:[":cloud_with_rain:"],category:"nature"},":cloud_snow:":{uc_base:"1f328",uc_output:"1f328",uc_match:"1f328-fe0f",uc_greedy:"1f328-fe0f",shortnames:[":cloud_with_snow:"],category:"nature"},":cloud_tornado:":{uc_base:"1f32a",uc_output:"1f32a",uc_match:"1f32a-fe0f",uc_greedy:"1f32a-fe0f",shortnames:[":cloud_with_tornado:"],category:"nature"},":clown:":{uc_base:"1f921",uc_output:"1f921",uc_match:"1f921",uc_greedy:"1f921",shortnames:[":clown_face:"],category:"people"},":coat:":{uc_base:"1f9e5",uc_output:"1f9e5",uc_match:"1f9e5",uc_greedy:"1f9e5",shortnames:[],category:"people"},":cocktail:":{uc_base:"1f378",uc_output:"1f378",uc_match:"1f378-fe0f",uc_greedy:"1f378-fe0f",shortnames:[],category:"food"},":coconut:":{uc_base:"1f965",uc_output:"1f965",uc_match:"1f965",uc_greedy:"1f965",shortnames:[],category:"food"},":cold_face:":{uc_base:"1f976",uc_output:"1f976",uc_match:"1f976",uc_greedy:"1f976",shortnames:[],category:"people"},":cold_sweat:":{uc_base:"1f630",uc_output:"1f630",uc_match:"1f630",uc_greedy:"1f630",shortnames:[],category:"people"},":compass:":{uc_base:"1f9ed",uc_output:"1f9ed",uc_match:"1f9ed",uc_greedy:"1f9ed",shortnames:[],category:"objects"},":compression:":{uc_base:"1f5dc",uc_output:"1f5dc",uc_match:"1f5dc-fe0f",uc_greedy:"1f5dc-fe0f",shortnames:[],category:"objects"},":computer:":{uc_base:"1f4bb",uc_output:"1f4bb",uc_match:"1f4bb-fe0f",uc_greedy:"1f4bb-fe0f",shortnames:[],category:"objects"},":confetti_ball:":{uc_base:"1f38a",uc_output:"1f38a",uc_match:"1f38a",uc_greedy:"1f38a",shortnames:[],category:"objects"},":confounded:":{uc_base:"1f616",uc_output:"1f616",uc_match:"1f616",uc_greedy:"1f616",shortnames:[],category:"people"},":confused:":{uc_base:"1f615",uc_output:"1f615",uc_match:"1f615",uc_greedy:"1f615",shortnames:[],category:"people"},":construction:":{uc_base:"1f6a7",uc_output:"1f6a7",uc_match:"1f6a7",uc_greedy:"1f6a7",shortnames:[],category:"travel"},":construction_site:":{uc_base:"1f3d7",uc_output:"1f3d7",uc_match:"1f3d7-fe0f",uc_greedy:"1f3d7-fe0f",shortnames:[":building_construction:"],category:"travel"},":construction_worker:":{uc_base:"1f477",uc_output:"1f477",uc_match:"1f477",uc_greedy:"1f477",shortnames:[],category:"people"},":control_knobs:":{uc_base:"1f39b",uc_output:"1f39b",uc_match:"1f39b-fe0f",uc_greedy:"1f39b-fe0f",shortnames:[],category:"objects"},":convenience_store:":{uc_base:"1f3ea",uc_output:"1f3ea",uc_match:"1f3ea",uc_greedy:"1f3ea",shortnames:[],category:"travel"},":cookie:":{uc_base:"1f36a",uc_output:"1f36a",uc_match:"1f36a",uc_greedy:"1f36a",shortnames:[],category:"food"},":cooking:":{uc_base:"1f373",uc_output:"1f373",uc_match:"1f373",uc_greedy:"1f373",shortnames:[],category:"food"},":cool:":{uc_base:"1f192",uc_output:"1f192",uc_match:"1f192",uc_greedy:"1f192",shortnames:[],category:"symbols"},":corn:":{uc_base:"1f33d",uc_output:"1f33d",uc_match:"1f33d",uc_greedy:"1f33d",shortnames:[],category:"food"},":couch:":{uc_base:"1f6cb",uc_output:"1f6cb",uc_match:"1f6cb-fe0f",uc_greedy:"1f6cb-fe0f",shortnames:[":couch_and_lamp:"],category:"objects"},":couple:":{uc_base:"1f46b",uc_output:"1f46b",uc_match:"1f46b",uc_greedy:"1f46b",shortnames:[],category:"people"},":couple_with_heart:":{uc_base:"1f491",uc_output:"1f491",uc_match:"1f491",uc_greedy:"1f491",shortnames:[],category:"people"},":couplekiss:":{uc_base:"1f48f",uc_output:"1f48f",uc_match:"1f48f",uc_greedy:"1f48f",shortnames:[],category:"people"},":cow2:":{uc_base:"1f404",uc_output:"1f404",uc_match:"1f404",uc_greedy:"1f404",shortnames:[],category:"nature"},":cow:":{uc_base:"1f42e",uc_output:"1f42e",uc_match:"1f42e",uc_greedy:"1f42e",shortnames:[],category:"nature"},":cowboy:":{uc_base:"1f920",uc_output:"1f920",uc_match:"1f920",uc_greedy:"1f920",shortnames:[":face_with_cowboy_hat:"],category:"people"},":crab:":{uc_base:"1f980",uc_output:"1f980",uc_match:"1f980",uc_greedy:"1f980",shortnames:[],category:"nature"},":crayon:":{uc_base:"1f58d",uc_output:"1f58d",uc_match:"1f58d-fe0f",uc_greedy:"1f58d-fe0f",shortnames:[":lower_left_crayon:"],category:"objects"},":credit_card:":{uc_base:"1f4b3",uc_output:"1f4b3",uc_match:"1f4b3-fe0f",uc_greedy:"1f4b3-fe0f",shortnames:[],category:"objects"},":crescent_moon:":{uc_base:"1f319",uc_output:"1f319",uc_match:"1f319",uc_greedy:"1f319",shortnames:[],category:"nature"},":cricket:":{uc_base:"1f997",uc_output:"1f997",uc_match:"1f997",uc_greedy:"1f997",shortnames:[],category:"nature"},":cricket_game:":{uc_base:"1f3cf",uc_output:"1f3cf",uc_match:"1f3cf",uc_greedy:"1f3cf",shortnames:[":cricket_bat_ball:"],category:"activity"},":crocodile:":{uc_base:"1f40a",uc_output:"1f40a",uc_match:"1f40a",uc_greedy:"1f40a",shortnames:[],category:"nature"},":croissant:":{uc_base:"1f950",uc_output:"1f950",uc_match:"1f950",uc_greedy:"1f950",shortnames:[],category:"food"},":crossed_flags:":{uc_base:"1f38c",uc_output:"1f38c",uc_match:"1f38c",uc_greedy:"1f38c",shortnames:[],category:"flags"},":crown:":{uc_base:"1f451",uc_output:"1f451",uc_match:"1f451",uc_greedy:"1f451",shortnames:[],category:"people"},":cruise_ship:":{uc_base:"1f6f3",uc_output:"1f6f3",uc_match:"1f6f3-fe0f",uc_greedy:"1f6f3-fe0f",shortnames:[":passenger_ship:"],category:"travel"},":cry:":{uc_base:"1f622",uc_output:"1f622",uc_match:"1f622",uc_greedy:"1f622",shortnames:[],category:"people"},":crying_cat_face:":{uc_base:"1f63f",uc_output:"1f63f",uc_match:"1f63f",uc_greedy:"1f63f",shortnames:[],category:"people"},":crystal_ball:":{uc_base:"1f52e",uc_output:"1f52e",uc_match:"1f52e",uc_greedy:"1f52e",shortnames:[],category:"objects"},":cucumber:":{uc_base:"1f952",uc_output:"1f952",uc_match:"1f952",uc_greedy:"1f952",shortnames:[],category:"food"},":cup_with_straw:":{uc_base:"1f964",uc_output:"1f964",uc_match:"1f964",uc_greedy:"1f964",shortnames:[],category:"food"},":cupcake:":{uc_base:"1f9c1",uc_output:"1f9c1",uc_match:"1f9c1",uc_greedy:"1f9c1",shortnames:[],category:"food"},":cupid:":{uc_base:"1f498",uc_output:"1f498",uc_match:"1f498",uc_greedy:"1f498",shortnames:[],category:"symbols"},":curling_stone:":{uc_base:"1f94c",uc_output:"1f94c",uc_match:"1f94c",uc_greedy:"1f94c",shortnames:[],category:"activity"},":curly_haired:":{uc_base:"1f9b1",uc_output:"1f9b1",uc_match:"1f9b1",uc_greedy:"1f9b1",shortnames:[],category:"people"},":currency_exchange:":{uc_base:"1f4b1",uc_output:"1f4b1",uc_match:"1f4b1",uc_greedy:"1f4b1",shortnames:[],category:"symbols"},":curry:":{uc_base:"1f35b",uc_output:"1f35b",uc_match:"1f35b",uc_greedy:"1f35b",shortnames:[],category:"food"},":custard:":{uc_base:"1f36e",uc_output:"1f36e",uc_match:"1f36e",uc_greedy:"1f36e",shortnames:[":pudding:",":flan:"],category:"food"},":customs:":{uc_base:"1f6c3",uc_output:"1f6c3",uc_match:"1f6c3",uc_greedy:"1f6c3",shortnames:[],category:"symbols"},":cut_of_meat:":{uc_base:"1f969",uc_output:"1f969",uc_match:"1f969",uc_greedy:"1f969",shortnames:[],category:"food"},":cyclone:":{uc_base:"1f300",uc_output:"1f300",uc_match:"1f300",uc_greedy:"1f300",shortnames:[],category:"symbols"},":dagger:":{uc_base:"1f5e1",uc_output:"1f5e1",uc_match:"1f5e1-fe0f",uc_greedy:"1f5e1-fe0f",shortnames:[":dagger_knife:"],category:"objects"},":dancer:":{uc_base:"1f483",uc_output:"1f483",uc_match:"1f483",uc_greedy:"1f483",shortnames:[],category:"people"},":dango:":{uc_base:"1f361",uc_output:"1f361",uc_match:"1f361",uc_greedy:"1f361",shortnames:[],category:"food"},":dark_sunglasses:":{uc_base:"1f576",uc_output:"1f576",uc_match:"1f576-fe0f",uc_greedy:"1f576-fe0f",shortnames:[],category:"people"},":dart:":{uc_base:"1f3af",uc_output:"1f3af",uc_match:"1f3af",uc_greedy:"1f3af",shortnames:[],category:"activity"},":dash:":{uc_base:"1f4a8",uc_output:"1f4a8",uc_match:"1f4a8",uc_greedy:"1f4a8",shortnames:[],category:"nature"},":date:":{uc_base:"1f4c5",uc_output:"1f4c5",uc_match:"1f4c5",uc_greedy:"1f4c5",shortnames:[],category:"objects"},":deciduous_tree:":{uc_base:"1f333",uc_output:"1f333",uc_match:"1f333",uc_greedy:"1f333",shortnames:[],category:"nature"},":deer:":{uc_base:"1f98c",uc_output:"1f98c",uc_match:"1f98c",uc_greedy:"1f98c",shortnames:[],category:"nature"},":department_store:":{uc_base:"1f3ec",uc_output:"1f3ec",uc_match:"1f3ec",uc_greedy:"1f3ec",shortnames:[],category:"travel"},":desert:":{uc_base:"1f3dc",uc_output:"1f3dc",uc_match:"1f3dc-fe0f",uc_greedy:"1f3dc-fe0f",shortnames:[],category:"travel"},":desktop:":{uc_base:"1f5a5",uc_output:"1f5a5",uc_match:"1f5a5-fe0f",uc_greedy:"1f5a5-fe0f",shortnames:[":desktop_computer:"],category:"objects"},":detective:":{uc_base:"1f575",uc_output:"1f575",uc_match:"1f575-fe0f",uc_greedy:"1f575-fe0f",shortnames:[":spy:",":sleuth_or_spy:"],category:"people"},":diamond_shape_with_a_dot_inside:":{uc_base:"1f4a0",uc_output:"1f4a0",uc_match:"1f4a0",uc_greedy:"1f4a0",shortnames:[],category:"symbols"},":disappointed:":{uc_base:"1f61e",uc_output:"1f61e",uc_match:"1f61e",uc_greedy:"1f61e",shortnames:[],category:"people"},":disappointed_relieved:":{uc_base:"1f625",uc_output:"1f625",uc_match:"1f625",uc_greedy:"1f625",shortnames:[],category:"people"},":dividers:":{uc_base:"1f5c2",uc_output:"1f5c2",uc_match:"1f5c2-fe0f",uc_greedy:"1f5c2-fe0f",shortnames:[":card_index_dividers:"],category:"objects"},":dizzy:":{uc_base:"1f4ab",uc_output:"1f4ab",uc_match:"1f4ab",uc_greedy:"1f4ab",shortnames:[],category:"nature"},":dizzy_face:":{uc_base:"1f635",uc_output:"1f635",uc_match:"1f635",uc_greedy:"1f635",shortnames:[],category:"people"},":dna:":{uc_base:"1f9ec",uc_output:"1f9ec",uc_match:"1f9ec",uc_greedy:"1f9ec",shortnames:[],category:"objects"},":do_not_litter:":{uc_base:"1f6af",uc_output:"1f6af",uc_match:"1f6af",uc_greedy:"1f6af",shortnames:[],category:"symbols"},":dog2:":{uc_base:"1f415",uc_output:"1f415",uc_match:"1f415-fe0f",uc_greedy:"1f415-fe0f",shortnames:[],category:"nature"},":dog:":{uc_base:"1f436",uc_output:"1f436",uc_match:"1f436",uc_greedy:"1f436",shortnames:[],category:"nature"},":dollar:":{uc_base:"1f4b5",uc_output:"1f4b5",uc_match:"1f4b5",uc_greedy:"1f4b5",shortnames:[],category:"objects"},":dolls:":{uc_base:"1f38e",uc_output:"1f38e",uc_match:"1f38e",uc_greedy:"1f38e",shortnames:[],category:"objects"},":dolphin:":{uc_base:"1f42c",uc_output:"1f42c",uc_match:"1f42c",uc_greedy:"1f42c",shortnames:[],category:"nature"},":door:":{uc_base:"1f6aa",uc_output:"1f6aa",uc_match:"1f6aa",uc_greedy:"1f6aa",shortnames:[],category:"objects"},":doughnut:":{uc_base:"1f369",uc_output:"1f369",uc_match:"1f369",uc_greedy:"1f369",shortnames:[],category:"food"},":dove:":{uc_base:"1f54a",uc_output:"1f54a",uc_match:"1f54a-fe0f",uc_greedy:"1f54a-fe0f",shortnames:[":dove_of_peace:"],category:"nature"},":dragon:":{uc_base:"1f409",uc_output:"1f409",uc_match:"1f409",uc_greedy:"1f409",shortnames:[],category:"nature"},":dragon_face:":{uc_base:"1f432",uc_output:"1f432",uc_match:"1f432",uc_greedy:"1f432",shortnames:[],category:"nature"},":dress:":{uc_base:"1f457",uc_output:"1f457",uc_match:"1f457",uc_greedy:"1f457",shortnames:[],category:"people"},":dromedary_camel:":{uc_base:"1f42a",uc_output:"1f42a",uc_match:"1f42a",uc_greedy:"1f42a",shortnames:[],category:"nature"},":drooling_face:":{uc_base:"1f924",uc_output:"1f924",uc_match:"1f924",uc_greedy:"1f924",shortnames:[":drool:"],category:"people"},":droplet:":{uc_base:"1f4a7",uc_output:"1f4a7",uc_match:"1f4a7",uc_greedy:"1f4a7",shortnames:[],category:"nature"},":drum:":{uc_base:"1f941",uc_output:"1f941",uc_match:"1f941",uc_greedy:"1f941",shortnames:[":drum_with_drumsticks:"],category:"activity"},":duck:":{uc_base:"1f986",uc_output:"1f986",uc_match:"1f986",uc_greedy:"1f986",shortnames:[],category:"nature"},":dumpling:":{uc_base:"1f95f",uc_output:"1f95f",uc_match:"1f95f",uc_greedy:"1f95f",shortnames:[],category:"food"},":dvd:":{uc_base:"1f4c0",uc_output:"1f4c0",uc_match:"1f4c0",uc_greedy:"1f4c0",shortnames:[],category:"objects"},":e-mail:":{uc_base:"1f4e7",uc_output:"1f4e7",uc_match:"1f4e7",uc_greedy:"1f4e7",shortnames:[":email:"],category:"objects"},":eagle:":{uc_base:"1f985",uc_output:"1f985",uc_match:"1f985",uc_greedy:"1f985",shortnames:[],category:"nature"},":ear:":{uc_base:"1f442",uc_output:"1f442",uc_match:"1f442-fe0f",uc_greedy:"1f442-fe0f",shortnames:[],category:"people"},":ear_of_rice:":{uc_base:"1f33e",uc_output:"1f33e",uc_match:"1f33e",uc_greedy:"1f33e",shortnames:[],category:"nature"},":earth_africa:":{uc_base:"1f30d",uc_output:"1f30d",uc_match:"1f30d-fe0f",uc_greedy:"1f30d-fe0f",shortnames:[],category:"nature"},":earth_americas:":{uc_base:"1f30e",uc_output:"1f30e",uc_match:"1f30e-fe0f",uc_greedy:"1f30e-fe0f",shortnames:[],category:"nature"},":earth_asia:":{uc_base:"1f30f",uc_output:"1f30f",uc_match:"1f30f-fe0f",uc_greedy:"1f30f-fe0f",shortnames:[],category:"nature"},":egg:":{uc_base:"1f95a",uc_output:"1f95a",uc_match:"1f95a",uc_greedy:"1f95a",shortnames:[],category:"food"},":eggplant:":{uc_base:"1f346",uc_output:"1f346",uc_match:"1f346",uc_greedy:"1f346",shortnames:[],category:"food"},":electric_plug:":{uc_base:"1f50c",uc_output:"1f50c",uc_match:"1f50c",uc_greedy:"1f50c",shortnames:[],category:"objects"},":elephant:":{uc_base:"1f418",uc_output:"1f418",uc_match:"1f418",uc_greedy:"1f418",shortnames:[],category:"nature"},":elf:":{uc_base:"1f9dd",uc_output:"1f9dd",uc_match:"1f9dd",uc_greedy:"1f9dd",shortnames:[],category:"people"},":end:":{uc_base:"1f51a",uc_output:"1f51a",uc_match:"1f51a",uc_greedy:"1f51a",shortnames:[],category:"symbols"},":envelope_with_arrow:":{uc_base:"1f4e9",uc_output:"1f4e9",uc_match:"1f4e9",uc_greedy:"1f4e9",shortnames:[],category:"objects"},":euro:":{uc_base:"1f4b6",uc_output:"1f4b6",uc_match:"1f4b6",uc_greedy:"1f4b6",shortnames:[],category:"objects"},":european_castle:":{uc_base:"1f3f0",uc_output:"1f3f0",uc_match:"1f3f0",uc_greedy:"1f3f0",shortnames:[],category:"travel"},":european_post_office:":{uc_base:"1f3e4",uc_output:"1f3e4",uc_match:"1f3e4",uc_greedy:"1f3e4",shortnames:[],category:"travel"},":evergreen_tree:":{uc_base:"1f332",uc_output:"1f332",uc_match:"1f332",uc_greedy:"1f332",shortnames:[],category:"nature"},":exploding_head:":{uc_base:"1f92f",uc_output:"1f92f",uc_match:"1f92f",uc_greedy:"1f92f",shortnames:[],category:"people"},":expressionless:":{uc_base:"1f611",uc_output:"1f611",uc_match:"1f611",uc_greedy:"1f611",shortnames:[],category:"people"},":eye:":{uc_base:"1f441",uc_output:"1f441",uc_match:"1f441-fe0f",uc_greedy:"1f441-fe0f",shortnames:[],category:"people"},":eyeglasses:":{uc_base:"1f453",uc_output:"1f453",uc_match:"1f453-fe0f",uc_greedy:"1f453-fe0f",shortnames:[],category:"people"},":eyes:":{uc_base:"1f440",uc_output:"1f440",uc_match:"1f440",uc_greedy:"1f440",shortnames:[],category:"people"},":face_vomiting:":{uc_base:"1f92e",uc_output:"1f92e",uc_match:"1f92e",uc_greedy:"1f92e",shortnames:[],category:"people"},":face_with_hand_over_mouth:":{uc_base:"1f92d",uc_output:"1f92d",uc_match:"1f92d",uc_greedy:"1f92d",shortnames:[],category:"people"},":face_with_monocle:":{uc_base:"1f9d0",uc_output:"1f9d0",uc_match:"1f9d0",uc_greedy:"1f9d0",shortnames:[],category:"people"},":face_with_raised_eyebrow:":{uc_base:"1f928",uc_output:"1f928",uc_match:"1f928",uc_greedy:"1f928",shortnames:[],category:"people"},":face_with_symbols_over_mouth:":{uc_base:"1f92c",uc_output:"1f92c",uc_match:"1f92c",uc_greedy:"1f92c",shortnames:[],category:"people"},":factory:":{uc_base:"1f3ed",uc_output:"1f3ed",uc_match:"1f3ed-fe0f",uc_greedy:"1f3ed-fe0f",shortnames:[],category:"travel"},":fairy:":{uc_base:"1f9da",uc_output:"1f9da",uc_match:"1f9da",uc_greedy:"1f9da",shortnames:[],category:"people"},":fallen_leaf:":{uc_base:"1f342",uc_output:"1f342",uc_match:"1f342",uc_greedy:"1f342",shortnames:[],category:"nature"},":family:":{uc_base:"1f46a",uc_output:"1f46a",uc_match:"1f46a-fe0f",uc_greedy:"1f46a-fe0f",shortnames:[],category:"people"},":fax:":{uc_base:"1f4e0",uc_output:"1f4e0",uc_match:"1f4e0",uc_greedy:"1f4e0",shortnames:[],category:"objects"},":fearful:":{uc_base:"1f628",uc_output:"1f628",uc_match:"1f628",uc_greedy:"1f628",shortnames:[],category:"people"},":feet:":{uc_base:"1f43e",uc_output:"1f43e",uc_match:"1f43e",uc_greedy:"1f43e",shortnames:[":paw_prints:"],category:"nature"},":ferris_wheel:":{uc_base:"1f3a1",uc_output:"1f3a1",uc_match:"1f3a1",uc_greedy:"1f3a1",shortnames:[],category:"travel"},":field_hockey:":{uc_base:"1f3d1",uc_output:"1f3d1",uc_match:"1f3d1",uc_greedy:"1f3d1",shortnames:[],category:"activity"},":file_cabinet:":{uc_base:"1f5c4",uc_output:"1f5c4",uc_match:"1f5c4-fe0f",uc_greedy:"1f5c4-fe0f",shortnames:[],category:"objects"},":file_folder:":{uc_base:"1f4c1",uc_output:"1f4c1",uc_match:"1f4c1",uc_greedy:"1f4c1",shortnames:[],category:"objects"},":film_frames:":{uc_base:"1f39e",uc_output:"1f39e",uc_match:"1f39e-fe0f",uc_greedy:"1f39e-fe0f",shortnames:[],category:"objects"},":fingers_crossed:":{uc_base:"1f91e",uc_output:"1f91e",uc_match:"1f91e",uc_greedy:"1f91e",shortnames:[":hand_with_index_and_middle_finger_crossed:"],category:"people"},":fire:":{uc_base:"1f525",uc_output:"1f525",uc_match:"1f525",uc_greedy:"1f525",shortnames:[":flame:"],category:"nature"},":fire_engine:":{uc_base:"1f692",uc_output:"1f692",uc_match:"1f692",uc_greedy:"1f692",shortnames:[],category:"travel"},":fire_extinguisher:":{uc_base:"1f9ef",uc_output:"1f9ef",uc_match:"1f9ef",uc_greedy:"1f9ef",shortnames:[],category:"objects"},":firecracker:":{uc_base:"1f9e8",uc_output:"1f9e8",uc_match:"1f9e8",uc_greedy:"1f9e8",shortnames:[],category:"travel"},":fireworks:":{uc_base:"1f386",uc_output:"1f386",uc_match:"1f386",uc_greedy:"1f386",shortnames:[],category:"travel"},":first_place:":{uc_base:"1f947",uc_output:"1f947",uc_match:"1f947",uc_greedy:"1f947",shortnames:[":first_place_medal:"],category:"activity"},":first_quarter_moon:":{uc_base:"1f313",uc_output:"1f313",uc_match:"1f313",uc_greedy:"1f313",shortnames:[],category:"nature"},":first_quarter_moon_with_face:":{uc_base:"1f31b",uc_output:"1f31b",uc_match:"1f31b",uc_greedy:"1f31b",shortnames:[],category:"nature"},":fish:":{uc_base:"1f41f",uc_output:"1f41f",uc_match:"1f41f-fe0f",uc_greedy:"1f41f-fe0f",shortnames:[],category:"nature"},":fish_cake:":{uc_base:"1f365",uc_output:"1f365",uc_match:"1f365",uc_greedy:"1f365",shortnames:[],category:"food"},":fishing_pole_and_fish:":{uc_base:"1f3a3",uc_output:"1f3a3",uc_match:"1f3a3",uc_greedy:"1f3a3",shortnames:[],category:"activity"},":flag_black:":{uc_base:"1f3f4",uc_output:"1f3f4",uc_match:"1f3f4",uc_greedy:"1f3f4",shortnames:[":waving_black_flag:"],category:"flags"},":flag_white:":{uc_base:"1f3f3",uc_output:"1f3f3",uc_match:"1f3f3-fe0f",uc_greedy:"1f3f3-fe0f",shortnames:[":waving_white_flag:"],category:"flags"},":flags:":{uc_base:"1f38f",uc_output:"1f38f",uc_match:"1f38f",uc_greedy:"1f38f",shortnames:[],category:"objects"},":flashlight:":{uc_base:"1f526",uc_output:"1f526",uc_match:"1f526",uc_greedy:"1f526",shortnames:[],category:"objects"},":floppy_disk:":{uc_base:"1f4be",uc_output:"1f4be",uc_match:"1f4be",uc_greedy:"1f4be",shortnames:[],category:"objects"},":flower_playing_cards:":{uc_base:"1f3b4",uc_output:"1f3b4",uc_match:"1f3b4",uc_greedy:"1f3b4",shortnames:[],category:"symbols"},":flushed:":{uc_base:"1f633",uc_output:"1f633",uc_match:"1f633",uc_greedy:"1f633",shortnames:[],category:"people"},":flying_disc:":{uc_base:"1f94f",uc_output:"1f94f",uc_match:"1f94f",uc_greedy:"1f94f",shortnames:[],category:"activity"},":flying_saucer:":{uc_base:"1f6f8",uc_output:"1f6f8",uc_match:"1f6f8",uc_greedy:"1f6f8",shortnames:[],category:"travel"},":fog:":{uc_base:"1f32b",uc_output:"1f32b",uc_match:"1f32b-fe0f",uc_greedy:"1f32b-fe0f",shortnames:[],category:"nature"},":foggy:":{uc_base:"1f301",uc_output:"1f301",uc_match:"1f301",uc_greedy:"1f301",shortnames:[],category:"travel"},":foot:":{uc_base:"1f9b6",uc_output:"1f9b6",uc_match:"1f9b6",uc_greedy:"1f9b6",shortnames:[],category:"people"},":football:":{uc_base:"1f3c8",uc_output:"1f3c8",uc_match:"1f3c8",uc_greedy:"1f3c8",shortnames:[],category:"activity"},":footprints:":{uc_base:"1f463",uc_output:"1f463",uc_match:"1f463",uc_greedy:"1f463",shortnames:[],category:"people"},":fork_and_knife:":{uc_base:"1f374",uc_output:"1f374",uc_match:"1f374",uc_greedy:"1f374",shortnames:[],category:"food"},":fork_knife_plate:":{uc_base:"1f37d",uc_output:"1f37d",uc_match:"1f37d-fe0f",uc_greedy:"1f37d-fe0f",shortnames:[":fork_and_knife_with_plate:"],category:"food"},":fortune_cookie:":{uc_base:"1f960",uc_output:"1f960",uc_match:"1f960",uc_greedy:"1f960",shortnames:[],category:"food"},":four_leaf_clover:":{uc_base:"1f340",uc_output:"1f340",uc_match:"1f340",uc_greedy:"1f340",shortnames:[],category:"nature"},":fox:":{uc_base:"1f98a",uc_output:"1f98a",uc_match:"1f98a",uc_greedy:"1f98a",shortnames:[":fox_face:"],category:"nature"},":frame_photo:":{uc_base:"1f5bc",uc_output:"1f5bc",uc_match:"1f5bc-fe0f",uc_greedy:"1f5bc-fe0f",shortnames:[":frame_with_picture:"],category:"objects"},":free:":{uc_base:"1f193",uc_output:"1f193",uc_match:"1f193",uc_greedy:"1f193",shortnames:[],category:"symbols"},":french_bread:":{uc_base:"1f956",uc_output:"1f956",uc_match:"1f956",uc_greedy:"1f956",shortnames:[":baguette_bread:"],category:"food"},":fried_shrimp:":{uc_base:"1f364",uc_output:"1f364",uc_match:"1f364",uc_greedy:"1f364",shortnames:[],category:"food"},":fries:":{uc_base:"1f35f",uc_output:"1f35f",uc_match:"1f35f",uc_greedy:"1f35f",shortnames:[],category:"food"},":frog:":{uc_base:"1f438",uc_output:"1f438",uc_match:"1f438",uc_greedy:"1f438",shortnames:[],category:"nature"},":frowning:":{uc_base:"1f626",uc_output:"1f626",uc_match:"1f626",uc_greedy:"1f626",shortnames:[],category:"people"},":full_moon:":{uc_base:"1f315",uc_output:"1f315",uc_match:"1f315-fe0f",uc_greedy:"1f315-fe0f",shortnames:[],category:"nature"},":full_moon_with_face:":{uc_base:"1f31d",uc_output:"1f31d",uc_match:"1f31d",uc_greedy:"1f31d",shortnames:[],category:"nature"},":game_die:":{uc_base:"1f3b2",uc_output:"1f3b2",uc_match:"1f3b2",uc_greedy:"1f3b2",shortnames:[],category:"activity"},":gem:":{uc_base:"1f48e",uc_output:"1f48e",uc_match:"1f48e",uc_greedy:"1f48e",shortnames:[],category:"objects"},":genie:":{uc_base:"1f9de",uc_output:"1f9de",uc_match:"1f9de",uc_greedy:"1f9de",shortnames:[],category:"people"},":ghost:":{uc_base:"1f47b",uc_output:"1f47b",uc_match:"1f47b",uc_greedy:"1f47b",shortnames:[],category:"people"},":gift:":{uc_base:"1f381",uc_output:"1f381",uc_match:"1f381",uc_greedy:"1f381",shortnames:[],category:"objects"},":gift_heart:":{uc_base:"1f49d",uc_output:"1f49d",uc_match:"1f49d",uc_greedy:"1f49d",shortnames:[],category:"symbols"},":giraffe:":{uc_base:"1f992",uc_output:"1f992",uc_match:"1f992",uc_greedy:"1f992",shortnames:[],category:"nature"},":girl:":{uc_base:"1f467",uc_output:"1f467",uc_match:"1f467",uc_greedy:"1f467",shortnames:[],category:"people"},":globe_with_meridians:":{uc_base:"1f310",uc_output:"1f310",uc_match:"1f310",uc_greedy:"1f310",shortnames:[],category:"symbols"},":gloves:":{uc_base:"1f9e4",uc_output:"1f9e4",uc_match:"1f9e4",uc_greedy:"1f9e4",shortnames:[],category:"people"},":goal:":{uc_base:"1f945",uc_output:"1f945",uc_match:"1f945",uc_greedy:"1f945",shortnames:[":goal_net:"],category:"activity"},":goat:":{uc_base:"1f410",uc_output:"1f410",uc_match:"1f410",uc_greedy:"1f410",shortnames:[],category:"nature"},":goggles:":{uc_base:"1f97d",uc_output:"1f97d",uc_match:"1f97d",uc_greedy:"1f97d",shortnames:[],category:"people"},":gorilla:":{uc_base:"1f98d",uc_output:"1f98d",uc_match:"1f98d",uc_greedy:"1f98d",shortnames:[],category:"nature"},":grapes:":{uc_base:"1f347",uc_output:"1f347",uc_match:"1f347",uc_greedy:"1f347",shortnames:[],category:"food"},":green_apple:":{uc_base:"1f34f",uc_output:"1f34f",uc_match:"1f34f",uc_greedy:"1f34f",shortnames:[],category:"food"},":green_book:":{uc_base:"1f4d7",uc_output:"1f4d7",uc_match:"1f4d7",uc_greedy:"1f4d7",shortnames:[],category:"objects"},":green_heart:":{uc_base:"1f49a",uc_output:"1f49a",uc_match:"1f49a",uc_greedy:"1f49a",shortnames:[],category:"symbols"},":grimacing:":{uc_base:"1f62c",uc_output:"1f62c",uc_match:"1f62c",uc_greedy:"1f62c",shortnames:[],category:"people"},":grin:":{uc_base:"1f601",uc_output:"1f601",uc_match:"1f601",uc_greedy:"1f601",shortnames:[],category:"people"},":grinning:":{uc_base:"1f600",uc_output:"1f600",uc_match:"1f600",uc_greedy:"1f600",shortnames:[],category:"people"},":guard:":{uc_base:"1f482",uc_output:"1f482",uc_match:"1f482",uc_greedy:"1f482",shortnames:[":guardsman:"],category:"people"},":guitar:":{uc_base:"1f3b8",uc_output:"1f3b8",uc_match:"1f3b8",uc_greedy:"1f3b8",shortnames:[],category:"activity"},":gun:":{uc_base:"1f52b",uc_output:"1f52b",uc_match:"1f52b",uc_greedy:"1f52b",shortnames:[],category:"objects"},":hamburger:":{uc_base:"1f354",uc_output:"1f354",uc_match:"1f354",uc_greedy:"1f354",shortnames:[],category:"food"},":hammer:":{uc_base:"1f528",uc_output:"1f528",uc_match:"1f528",uc_greedy:"1f528",shortnames:[],category:"objects"},":hamster:":{uc_base:"1f439",uc_output:"1f439",uc_match:"1f439",uc_greedy:"1f439",shortnames:[],category:"nature"},":hand_splayed:":{uc_base:"1f590",uc_output:"1f590",uc_match:"1f590-fe0f",uc_greedy:"1f590-fe0f",shortnames:[":raised_hand_with_fingers_splayed:"],category:"people"},":handbag:":{uc_base:"1f45c",uc_output:"1f45c",uc_match:"1f45c",uc_greedy:"1f45c",shortnames:[],category:"people"},":handshake:":{uc_base:"1f91d",uc_output:"1f91d",uc_match:"1f91d",uc_greedy:"1f91d",shortnames:[":shaking_hands:"],category:"people"},":hatched_chick:":{uc_base:"1f425",uc_output:"1f425",uc_match:"1f425",uc_greedy:"1f425",shortnames:[],category:"nature"},":hatching_chick:":{uc_base:"1f423",uc_output:"1f423",uc_match:"1f423",uc_greedy:"1f423",shortnames:[],category:"nature"},":head_bandage:":{uc_base:"1f915",uc_output:"1f915",uc_match:"1f915",uc_greedy:"1f915",shortnames:[":face_with_head_bandage:"],category:"people"},":headphones:":{uc_base:"1f3a7",uc_output:"1f3a7",uc_match:"1f3a7-fe0f",uc_greedy:"1f3a7-fe0f",shortnames:[],category:"activity"},":hear_no_evil:":{uc_base:"1f649",uc_output:"1f649",uc_match:"1f649",uc_greedy:"1f649",shortnames:[],category:"nature"},":heart_decoration:":{uc_base:"1f49f",uc_output:"1f49f",uc_match:"1f49f",uc_greedy:"1f49f",shortnames:[],category:"symbols"},":heart_eyes:":{uc_base:"1f60d",uc_output:"1f60d",uc_match:"1f60d",uc_greedy:"1f60d",shortnames:[],category:"people"},":heart_eyes_cat:":{uc_base:"1f63b",uc_output:"1f63b",uc_match:"1f63b",uc_greedy:"1f63b",shortnames:[],category:"people"},":heartbeat:":{uc_base:"1f493",uc_output:"1f493",uc_match:"1f493",uc_greedy:"1f493",shortnames:[],category:"symbols"},":heartpulse:":{uc_base:"1f497",uc_output:"1f497",uc_match:"1f497",uc_greedy:"1f497",shortnames:[],category:"symbols"},":heavy_dollar_sign:":{uc_base:"1f4b2",uc_output:"1f4b2",uc_match:"1f4b2",uc_greedy:"1f4b2",shortnames:[],category:"symbols"},":hedgehog:":{uc_base:"1f994",uc_output:"1f994",uc_match:"1f994",uc_greedy:"1f994",shortnames:[],category:"nature"},":helicopter:":{uc_base:"1f681",uc_output:"1f681",uc_match:"1f681",uc_greedy:"1f681",shortnames:[],category:"travel"},":herb:":{uc_base:"1f33f",uc_output:"1f33f",uc_match:"1f33f",uc_greedy:"1f33f",shortnames:[],category:"nature"},":hibiscus:":{uc_base:"1f33a",uc_output:"1f33a",uc_match:"1f33a",uc_greedy:"1f33a",shortnames:[],category:"nature"},":high_brightness:":{uc_base:"1f506",uc_output:"1f506",uc_match:"1f506",uc_greedy:"1f506",shortnames:[],category:"symbols"},":high_heel:":{uc_base:"1f460",uc_output:"1f460",uc_match:"1f460",uc_greedy:"1f460",shortnames:[],category:"people"},":hiking_boot:":{uc_base:"1f97e",uc_output:"1f97e",uc_match:"1f97e",uc_greedy:"1f97e",shortnames:[],category:"people"},":hippopotamus:":{uc_base:"1f99b",uc_output:"1f99b",uc_match:"1f99b",uc_greedy:"1f99b",shortnames:[],category:"nature"},":hockey:":{uc_base:"1f3d2",uc_output:"1f3d2",uc_match:"1f3d2",uc_greedy:"1f3d2",shortnames:[],category:"activity"},":hole:":{uc_base:"1f573",uc_output:"1f573",uc_match:"1f573-fe0f",uc_greedy:"1f573-fe0f",shortnames:[],category:"objects"},":homes:":{uc_base:"1f3d8",uc_output:"1f3d8",uc_match:"1f3d8-fe0f",uc_greedy:"1f3d8-fe0f",shortnames:[":house_buildings:"],category:"travel"},":honey_pot:":{uc_base:"1f36f",uc_output:"1f36f",uc_match:"1f36f",uc_greedy:"1f36f",shortnames:[],category:"food"},":horse:":{uc_base:"1f434",uc_output:"1f434",uc_match:"1f434",uc_greedy:"1f434",shortnames:[],category:"nature"},":horse_racing:":{uc_base:"1f3c7",uc_output:"1f3c7",uc_match:"1f3c7",uc_greedy:"1f3c7",shortnames:[],category:"activity"},":hospital:":{uc_base:"1f3e5",uc_output:"1f3e5",uc_match:"1f3e5",uc_greedy:"1f3e5",shortnames:[],category:"travel"},":hot_face:":{uc_base:"1f975",uc_output:"1f975",uc_match:"1f975",uc_greedy:"1f975",shortnames:[],category:"people"},":hot_pepper:":{uc_base:"1f336",uc_output:"1f336",uc_match:"1f336-fe0f",uc_greedy:"1f336-fe0f",shortnames:[],category:"food"},":hotdog:":{uc_base:"1f32d",uc_output:"1f32d",uc_match:"1f32d",uc_greedy:"1f32d",shortnames:[":hot_dog:"],category:"food"},":hotel:":{uc_base:"1f3e8",uc_output:"1f3e8",uc_match:"1f3e8",uc_greedy:"1f3e8",shortnames:[],category:"travel"},":house:":{uc_base:"1f3e0",uc_output:"1f3e0",uc_match:"1f3e0-fe0f",uc_greedy:"1f3e0-fe0f",shortnames:[],category:"travel"},":house_abandoned:":{uc_base:"1f3da",uc_output:"1f3da",uc_match:"1f3da-fe0f",uc_greedy:"1f3da-fe0f",shortnames:[":derelict_house_building:"],category:"travel"},":house_with_garden:":{uc_base:"1f3e1",uc_output:"1f3e1",uc_match:"1f3e1",uc_greedy:"1f3e1",shortnames:[],category:"travel"},":hugging:":{uc_base:"1f917",uc_output:"1f917",uc_match:"1f917",uc_greedy:"1f917",shortnames:[":hugging_face:"],category:"people"},":hushed:":{uc_base:"1f62f",uc_output:"1f62f",uc_match:"1f62f",uc_greedy:"1f62f",shortnames:[],category:"people"},":ice_cream:":{uc_base:"1f368",uc_output:"1f368",uc_match:"1f368",uc_greedy:"1f368",shortnames:[],category:"food"},":icecream:":{uc_base:"1f366",uc_output:"1f366",uc_match:"1f366",uc_greedy:"1f366",shortnames:[],category:"food"},":id:":{uc_base:"1f194",uc_output:"1f194",uc_match:"1f194",uc_greedy:"1f194",shortnames:[],category:"symbols"},":ideograph_advantage:":{uc_base:"1f250",uc_output:"1f250",uc_match:"1f250",uc_greedy:"1f250",shortnames:[],category:"symbols"},":imp:":{uc_base:"1f47f",uc_output:"1f47f",uc_match:"1f47f",uc_greedy:"1f47f",shortnames:[],category:"people"},":inbox_tray:":{uc_base:"1f4e5",uc_output:"1f4e5",uc_match:"1f4e5-fe0f",uc_greedy:"1f4e5-fe0f",shortnames:[],category:"objects"},":incoming_envelope:":{uc_base:"1f4e8",uc_output:"1f4e8",uc_match:"1f4e8",uc_greedy:"1f4e8",shortnames:[],category:"objects"},":innocent:":{uc_base:"1f607",uc_output:"1f607",uc_match:"1f607",uc_greedy:"1f607",shortnames:[],category:"people"},":iphone:":{uc_base:"1f4f1",uc_output:"1f4f1",uc_match:"1f4f1",uc_greedy:"1f4f1",shortnames:[],category:"objects"},":island:":{uc_base:"1f3dd",uc_output:"1f3dd",uc_match:"1f3dd-fe0f",uc_greedy:"1f3dd-fe0f",shortnames:[":desert_island:"],category:"travel"},":izakaya_lantern:":{uc_base:"1f3ee",uc_output:"1f3ee",uc_match:"1f3ee",uc_greedy:"1f3ee",shortnames:[],category:"objects"},":jack_o_lantern:":{uc_base:"1f383",uc_output:"1f383",uc_match:"1f383",uc_greedy:"1f383",shortnames:[],category:"people"},":japan:":{uc_base:"1f5fe",uc_output:"1f5fe",uc_match:"1f5fe",uc_greedy:"1f5fe",shortnames:[],category:"travel"},":japanese_castle:":{uc_base:"1f3ef",uc_output:"1f3ef",uc_match:"1f3ef",uc_greedy:"1f3ef",shortnames:[],category:"travel"},":japanese_goblin:":{uc_base:"1f47a",uc_output:"1f47a",uc_match:"1f47a",uc_greedy:"1f47a",shortnames:[],category:"people"},":japanese_ogre:":{uc_base:"1f479",uc_output:"1f479",uc_match:"1f479",uc_greedy:"1f479",shortnames:[],category:"people"},":jeans:":{uc_base:"1f456",uc_output:"1f456",uc_match:"1f456",uc_greedy:"1f456",shortnames:[],category:"people"},":jigsaw:":{uc_base:"1f9e9",uc_output:"1f9e9",uc_match:"1f9e9",uc_greedy:"1f9e9",shortnames:[],category:"objects"},":joy:":{uc_base:"1f602",uc_output:"1f602",uc_match:"1f602",uc_greedy:"1f602",shortnames:[],category:"people"},":joy_cat:":{uc_base:"1f639",uc_output:"1f639",uc_match:"1f639",uc_greedy:"1f639",shortnames:[],category:"people"},":joystick:":{uc_base:"1f579",uc_output:"1f579",uc_match:"1f579-fe0f",uc_greedy:"1f579-fe0f",shortnames:[],category:"objects"},":kaaba:":{uc_base:"1f54b",uc_output:"1f54b",uc_match:"1f54b",uc_greedy:"1f54b",shortnames:[],category:"travel"},":kangaroo:":{uc_base:"1f998",uc_output:"1f998",uc_match:"1f998",uc_greedy:"1f998",shortnames:[],category:"nature"},":key2:":{uc_base:"1f5dd",uc_output:"1f5dd",uc_match:"1f5dd-fe0f",uc_greedy:"1f5dd",shortnames:[":old_key:"],category:"objects"},":key:":{uc_base:"1f511",uc_output:"1f511",uc_match:"1f511",uc_greedy:"1f511",shortnames:[],category:"objects"},":keycap_ten:":{uc_base:"1f51f",uc_output:"1f51f",uc_match:"1f51f",uc_greedy:"1f51f",shortnames:[],category:"symbols"},":kimono:":{uc_base:"1f458",uc_output:"1f458",uc_match:"1f458",uc_greedy:"1f458",shortnames:[],category:"people"},":kiss:":{uc_base:"1f48b",uc_output:"1f48b",uc_match:"1f48b",uc_greedy:"1f48b",shortnames:[],category:"people"},":kissing:":{uc_base:"1f617",uc_output:"1f617",uc_match:"1f617",uc_greedy:"1f617",shortnames:[],category:"people"},":kissing_cat:":{uc_base:"1f63d",uc_output:"1f63d",uc_match:"1f63d",uc_greedy:"1f63d",shortnames:[],category:"people"},":kissing_closed_eyes:":{uc_base:"1f61a",uc_output:"1f61a",uc_match:"1f61a",uc_greedy:"1f61a",shortnames:[],category:"people"},":kissing_heart:":{uc_base:"1f618",uc_output:"1f618",uc_match:"1f618",uc_greedy:"1f618",shortnames:[],category:"people"},":kissing_smiling_eyes:":{uc_base:"1f619",uc_output:"1f619",uc_match:"1f619",uc_greedy:"1f619",shortnames:[],category:"people"},":kiwi:":{uc_base:"1f95d",uc_output:"1f95d",uc_match:"1f95d",uc_greedy:"1f95d",shortnames:[":kiwifruit:"],category:"food"},":knife:":{uc_base:"1f52a",uc_output:"1f52a",uc_match:"1f52a",uc_greedy:"1f52a",shortnames:[],category:"objects"},":koala:":{uc_base:"1f428",uc_output:"1f428",uc_match:"1f428",uc_greedy:"1f428",shortnames:[],category:"nature"},":koko:":{uc_base:"1f201",uc_output:"1f201",uc_match:"1f201",uc_greedy:"1f201",shortnames:[],category:"symbols"},":lab_coat:":{uc_base:"1f97c",uc_output:"1f97c",uc_match:"1f97c",uc_greedy:"1f97c",shortnames:[],category:"people"},":label:":{uc_base:"1f3f7",uc_output:"1f3f7",uc_match:"1f3f7-fe0f",uc_greedy:"1f3f7-fe0f",shortnames:[],category:"objects"},":lacrosse:":{uc_base:"1f94d",uc_output:"1f94d",uc_match:"1f94d",uc_greedy:"1f94d",shortnames:[],category:"activity"},":large_blue_diamond:":{uc_base:"1f537",uc_output:"1f537",uc_match:"1f537",uc_greedy:"1f537",shortnames:[],category:"symbols"},":large_orange_diamond:":{uc_base:"1f536",uc_output:"1f536",uc_match:"1f536",uc_greedy:"1f536",shortnames:[],category:"symbols"},":last_quarter_moon:":{uc_base:"1f317",uc_output:"1f317",uc_match:"1f317",uc_greedy:"1f317",shortnames:[],category:"nature"},":last_quarter_moon_with_face:":{uc_base:"1f31c",uc_output:"1f31c",uc_match:"1f31c-fe0f",uc_greedy:"1f31c-fe0f",shortnames:[],category:"nature"},":laughing:":{uc_base:"1f606",uc_output:"1f606",uc_match:"1f606",uc_greedy:"1f606",shortnames:[":satisfied:"],category:"people"},":leafy_green:":{uc_base:"1f96c",uc_output:"1f96c",uc_match:"1f96c",uc_greedy:"1f96c",shortnames:[],category:"food"},":leaves:":{uc_base:"1f343",uc_output:"1f343",uc_match:"1f343",uc_greedy:"1f343",shortnames:[],category:"nature"},":ledger:":{uc_base:"1f4d2",uc_output:"1f4d2",uc_match:"1f4d2",uc_greedy:"1f4d2",shortnames:[],category:"objects"},":left_facing_fist:":{uc_base:"1f91b",uc_output:"1f91b",uc_match:"1f91b",uc_greedy:"1f91b",shortnames:[":left_fist:"],category:"people"},":left_luggage:":{uc_base:"1f6c5",uc_output:"1f6c5",uc_match:"1f6c5",uc_greedy:"1f6c5",shortnames:[],category:"symbols"},":leg:":{uc_base:"1f9b5",uc_output:"1f9b5",uc_match:"1f9b5",uc_greedy:"1f9b5",shortnames:[],category:"people"},":lemon:":{uc_base:"1f34b",uc_output:"1f34b",uc_match:"1f34b",uc_greedy:"1f34b",shortnames:[],category:"food"},":leopard:":{uc_base:"1f406",uc_output:"1f406",uc_match:"1f406",uc_greedy:"1f406",shortnames:[],category:"nature"},":level_slider:":{uc_base:"1f39a",uc_output:"1f39a",uc_match:"1f39a-fe0f",uc_greedy:"1f39a-fe0f",shortnames:[],category:"objects"},":levitate:":{uc_base:"1f574",uc_output:"1f574",uc_match:"1f574-fe0f",uc_greedy:"1f574-fe0f",shortnames:[":man_in_business_suit_levitating:"],category:"people"},":light_rail:":{uc_base:"1f688",uc_output:"1f688",uc_match:"1f688",uc_greedy:"1f688",shortnames:[],category:"travel"},":link:":{uc_base:"1f517",uc_output:"1f517",uc_match:"1f517",uc_greedy:"1f517",shortnames:[],category:"objects"},":lion_face:":{uc_base:"1f981",uc_output:"1f981",uc_match:"1f981",uc_greedy:"1f981",shortnames:[":lion:"],category:"nature"},":lips:":{uc_base:"1f444",uc_output:"1f444",uc_match:"1f444",uc_greedy:"1f444",shortnames:[],category:"people"},":lipstick:":{uc_base:"1f484",uc_output:"1f484",uc_match:"1f484",uc_greedy:"1f484",shortnames:[],category:"people"},":lizard:":{uc_base:"1f98e",uc_output:"1f98e",uc_match:"1f98e",uc_greedy:"1f98e",shortnames:[],category:"nature"},":llama:":{uc_base:"1f999",uc_output:"1f999",uc_match:"1f999",uc_greedy:"1f999",shortnames:[],category:"nature"},":lobster:":{uc_base:"1f99e",uc_output:"1f99e",uc_match:"1f99e",uc_greedy:"1f99e",shortnames:[],category:"nature"},":lock:":{uc_base:"1f512",uc_output:"1f512",uc_match:"1f512-fe0f",uc_greedy:"1f512-fe0f",shortnames:[],category:"objects"},":lock_with_ink_pen:":{uc_base:"1f50f",uc_output:"1f50f",uc_match:"1f50f",uc_greedy:"1f50f",shortnames:[],category:"objects"},":lollipop:":{uc_base:"1f36d",uc_output:"1f36d",uc_match:"1f36d",uc_greedy:"1f36d",shortnames:[],category:"food"},":loud_sound:":{uc_base:"1f50a",uc_output:"1f50a",uc_match:"1f50a",uc_greedy:"1f50a",shortnames:[],category:"symbols"},":loudspeaker:":{uc_base:"1f4e2",uc_output:"1f4e2",uc_match:"1f4e2",uc_greedy:"1f4e2",shortnames:[],category:"symbols"},":love_hotel:":{uc_base:"1f3e9",uc_output:"1f3e9",uc_match:"1f3e9",uc_greedy:"1f3e9",shortnames:[],category:"travel"},":love_letter:":{uc_base:"1f48c",uc_output:"1f48c",uc_match:"1f48c",uc_greedy:"1f48c",shortnames:[],category:"objects"},":love_you_gesture:":{uc_base:"1f91f",uc_output:"1f91f",uc_match:"1f91f",uc_greedy:"1f91f",shortnames:[],category:"people"},":low_brightness:":{uc_base:"1f505",uc_output:"1f505",uc_match:"1f505",uc_greedy:"1f505",shortnames:[],category:"symbols"},":luggage:":{uc_base:"1f9f3",uc_output:"1f9f3",uc_match:"1f9f3",uc_greedy:"1f9f3",shortnames:[],category:"travel"},":lying_face:":{uc_base:"1f925",uc_output:"1f925",uc_match:"1f925",uc_greedy:"1f925",shortnames:[":liar:"],category:"people"},":mag:":{uc_base:"1f50d",uc_output:"1f50d",uc_match:"1f50d-fe0f",uc_greedy:"1f50d-fe0f",shortnames:[],category:"objects"},":mag_right:":{uc_base:"1f50e",uc_output:"1f50e",uc_match:"1f50e",uc_greedy:"1f50e",shortnames:[],category:"objects"},":mage:":{uc_base:"1f9d9",uc_output:"1f9d9",uc_match:"1f9d9",uc_greedy:"1f9d9",shortnames:[],category:"people"},":magnet:":{uc_base:"1f9f2",uc_output:"1f9f2",uc_match:"1f9f2",uc_greedy:"1f9f2",shortnames:[],category:"objects"},":mahjong:":{uc_base:"1f004",uc_output:"1f004",uc_match:"1f004-fe0f",uc_greedy:"1f004-fe0f",shortnames:[],category:"symbols"},":mailbox:":{uc_base:"1f4eb",uc_output:"1f4eb",uc_match:"1f4eb-fe0f",uc_greedy:"1f4eb-fe0f",shortnames:[],category:"objects"},":mailbox_closed:":{uc_base:"1f4ea",uc_output:"1f4ea",uc_match:"1f4ea-fe0f",uc_greedy:"1f4ea-fe0f",shortnames:[],category:"objects"},":mailbox_with_mail:":{uc_base:"1f4ec",uc_output:"1f4ec",uc_match:"1f4ec-fe0f",uc_greedy:"1f4ec-fe0f",shortnames:[],category:"objects"},":mailbox_with_no_mail:":{uc_base:"1f4ed",uc_output:"1f4ed",uc_match:"1f4ed-fe0f",uc_greedy:"1f4ed-fe0f",shortnames:[],category:"objects"},":man:":{uc_base:"1f468",uc_output:"1f468",uc_match:"1f468",uc_greedy:"1f468",shortnames:[],category:"people"},":man_dancing:":{uc_base:"1f57a",uc_output:"1f57a",uc_match:"1f57a",uc_greedy:"1f57a",shortnames:[":male_dancer:"],category:"people"},":man_in_tuxedo:":{uc_base:"1f935",uc_output:"1f935",uc_match:"1f935",uc_greedy:"1f935",shortnames:[],category:"people"},":man_with_chinese_cap:":{uc_base:"1f472",uc_output:"1f472",uc_match:"1f472",uc_greedy:"1f472",shortnames:[":man_with_gua_pi_mao:"],category:"people"},":mango:":{uc_base:"1f96d",uc_output:"1f96d",uc_match:"1f96d",uc_greedy:"1f96d",shortnames:[],category:"food"},":mans_shoe:":{uc_base:"1f45e",uc_output:"1f45e",uc_match:"1f45e",uc_greedy:"1f45e",shortnames:[],category:"people"},":map:":{uc_base:"1f5fa",uc_output:"1f5fa",uc_match:"1f5fa-fe0f",uc_greedy:"1f5fa-fe0f",shortnames:[":world_map:"],category:"travel"},":maple_leaf:":{uc_base:"1f341",uc_output:"1f341",uc_match:"1f341",uc_greedy:"1f341",shortnames:[],category:"nature"},":martial_arts_uniform:":{uc_base:"1f94b",uc_output:"1f94b",uc_match:"1f94b",uc_greedy:"1f94b",shortnames:[":karate_uniform:"],category:"activity"},":mask:":{uc_base:"1f637",uc_output:"1f637",uc_match:"1f637",uc_greedy:"1f637",shortnames:[],category:"people"},":meat_on_bone:":{uc_base:"1f356",uc_output:"1f356",uc_match:"1f356",uc_greedy:"1f356",shortnames:[],category:"food"},":medal:":{uc_base:"1f3c5",uc_output:"1f3c5",uc_match:"1f3c5",uc_greedy:"1f3c5",shortnames:[":sports_medal:"],category:"activity"},":mega:":{uc_base:"1f4e3",uc_output:"1f4e3",uc_match:"1f4e3",uc_greedy:"1f4e3",shortnames:[],category:"symbols"},":melon:":{uc_base:"1f348",uc_output:"1f348",uc_match:"1f348",uc_greedy:"1f348",shortnames:[],category:"food"},":menorah:":{uc_base:"1f54e",uc_output:"1f54e",uc_match:"1f54e",uc_greedy:"1f54e",shortnames:[],category:"symbols"},":mens:":{uc_base:"1f6b9",uc_output:"1f6b9",uc_match:"1f6b9-fe0f",uc_greedy:"1f6b9-fe0f",shortnames:[],category:"symbols"},":merperson:":{uc_base:"1f9dc",uc_output:"1f9dc",uc_match:"1f9dc",uc_greedy:"1f9dc",shortnames:[],category:"people"},":metal:":{uc_base:"1f918",uc_output:"1f918",uc_match:"1f918",uc_greedy:"1f918",shortnames:[":sign_of_the_horns:"],category:"people"},":metro:":{uc_base:"1f687",uc_output:"1f687",uc_match:"1f687-fe0f",uc_greedy:"1f687-fe0f",shortnames:[],category:"travel"},":microbe:":{uc_base:"1f9a0",uc_output:"1f9a0",uc_match:"1f9a0",uc_greedy:"1f9a0",shortnames:[],category:"nature"},":microphone2:":{uc_base:"1f399",uc_output:"1f399",uc_match:"1f399-fe0f",uc_greedy:"1f399-fe0f",shortnames:[":studio_microphone:"],category:"objects"},":microphone:":{uc_base:"1f3a4",uc_output:"1f3a4",uc_match:"1f3a4",uc_greedy:"1f3a4",shortnames:[],category:"activity"},":microscope:":{uc_base:"1f52c",uc_output:"1f52c",uc_match:"1f52c",uc_greedy:"1f52c",shortnames:[],category:"objects"},":middle_finger:":{uc_base:"1f595",uc_output:"1f595",uc_match:"1f595",uc_greedy:"1f595",shortnames:[":reversed_hand_with_middle_finger_extended:"],category:"people"},":military_medal:":{uc_base:"1f396",uc_output:"1f396",uc_match:"1f396-fe0f",uc_greedy:"1f396-fe0f",shortnames:[],category:"activity"},":milk:":{uc_base:"1f95b",uc_output:"1f95b",uc_match:"1f95b",uc_greedy:"1f95b",shortnames:[":glass_of_milk:"],category:"food"},":milky_way:":{uc_base:"1f30c",uc_output:"1f30c",uc_match:"1f30c",uc_greedy:"1f30c",shortnames:[],category:"travel"},":minibus:":{uc_base:"1f690",uc_output:"1f690",uc_match:"1f690",uc_greedy:"1f690",shortnames:[],category:"travel"},":minidisc:":{uc_base:"1f4bd",uc_output:"1f4bd",uc_match:"1f4bd",uc_greedy:"1f4bd",shortnames:[],category:"objects"},":mobile_phone_off:":{uc_base:"1f4f4",uc_output:"1f4f4",uc_match:"1f4f4",uc_greedy:"1f4f4",shortnames:[],category:"symbols"},":money_mouth:":{uc_base:"1f911",uc_output:"1f911",uc_match:"1f911",uc_greedy:"1f911",shortnames:[":money_mouth_face:"],category:"people"},":money_with_wings:":{uc_base:"1f4b8",uc_output:"1f4b8",uc_match:"1f4b8",uc_greedy:"1f4b8",shortnames:[],category:"objects"},":moneybag:":{uc_base:"1f4b0",uc_output:"1f4b0",uc_match:"1f4b0-fe0f",uc_greedy:"1f4b0-fe0f",shortnames:[],category:"objects"},":monkey:":{uc_base:"1f412",uc_output:"1f412",uc_match:"1f412",uc_greedy:"1f412",shortnames:[],category:"nature"},":monkey_face:":{uc_base:"1f435",uc_output:"1f435",uc_match:"1f435",uc_greedy:"1f435",shortnames:[],category:"nature"},":monorail:":{uc_base:"1f69d",uc_output:"1f69d",uc_match:"1f69d",uc_greedy:"1f69d",shortnames:[],category:"travel"},":moon_cake:":{uc_base:"1f96e",uc_output:"1f96e",uc_match:"1f96e",uc_greedy:"1f96e",shortnames:[],category:"food"},":mortar_board:":{uc_base:"1f393",uc_output:"1f393",uc_match:"1f393-fe0f",uc_greedy:"1f393-fe0f",shortnames:[],category:"people"},":mosque:":{uc_base:"1f54c",uc_output:"1f54c",uc_match:"1f54c",uc_greedy:"1f54c",shortnames:[],category:"travel"},":mosquito:":{uc_base:"1f99f",uc_output:"1f99f",uc_match:"1f99f",uc_greedy:"1f99f",shortnames:[],category:"nature"},":motor_scooter:":{uc_base:"1f6f5",uc_output:"1f6f5",uc_match:"1f6f5",uc_greedy:"1f6f5",shortnames:[":motorbike:"],category:"travel"},":motorboat:":{uc_base:"1f6e5",uc_output:"1f6e5",uc_match:"1f6e5-fe0f",uc_greedy:"1f6e5-fe0f",shortnames:[],category:"travel"},":motorcycle:":{uc_base:"1f3cd",uc_output:"1f3cd",uc_match:"1f3cd-fe0f",uc_greedy:"1f3cd-fe0f",shortnames:[":racing_motorcycle:"],category:"travel"},":motorway:":{uc_base:"1f6e3",uc_output:"1f6e3",uc_match:"1f6e3-fe0f",uc_greedy:"1f6e3-fe0f",shortnames:[],category:"travel"},":mount_fuji:":{uc_base:"1f5fb",uc_output:"1f5fb",uc_match:"1f5fb",uc_greedy:"1f5fb",shortnames:[],category:"travel"},":mountain_cableway:":{uc_base:"1f6a0",uc_output:"1f6a0",uc_match:"1f6a0",uc_greedy:"1f6a0",shortnames:[],category:"travel"},":mountain_railway:":{uc_base:"1f69e",uc_output:"1f69e",uc_match:"1f69e",uc_greedy:"1f69e",shortnames:[],category:"travel"},":mountain_snow:":{uc_base:"1f3d4",uc_output:"1f3d4",uc_match:"1f3d4-fe0f",uc_greedy:"1f3d4-fe0f",shortnames:[":snow_capped_mountain:"],category:"travel"},":mouse2:":{uc_base:"1f401",uc_output:"1f401",uc_match:"1f401",uc_greedy:"1f401",shortnames:[],category:"nature"},":mouse:":{uc_base:"1f42d",uc_output:"1f42d",uc_match:"1f42d",uc_greedy:"1f42d",shortnames:[],category:"nature"},":mouse_three_button:":{uc_base:"1f5b1",uc_output:"1f5b1",uc_match:"1f5b1-fe0f",uc_greedy:"1f5b1-fe0f",shortnames:[":three_button_mouse:"],category:"objects"},":movie_camera:":{uc_base:"1f3a5",uc_output:"1f3a5",uc_match:"1f3a5",uc_greedy:"1f3a5",shortnames:[],category:"objects"},":moyai:":{uc_base:"1f5ff",uc_output:"1f5ff",uc_match:"1f5ff",uc_greedy:"1f5ff",shortnames:[],category:"travel"},":mrs_claus:":{uc_base:"1f936",uc_output:"1f936",uc_match:"1f936",uc_greedy:"1f936",shortnames:[":mother_christmas:"],category:"people"},":muscle:":{uc_base:"1f4aa",uc_output:"1f4aa",uc_match:"1f4aa",uc_greedy:"1f4aa",shortnames:[],category:"people"},":mushroom:":{uc_base:"1f344",uc_output:"1f344",uc_match:"1f344",uc_greedy:"1f344",shortnames:[],category:"nature"},":musical_keyboard:":{uc_base:"1f3b9",uc_output:"1f3b9",uc_match:"1f3b9",uc_greedy:"1f3b9",shortnames:[],category:"activity"},":musical_note:":{uc_base:"1f3b5",uc_output:"1f3b5",uc_match:"1f3b5",uc_greedy:"1f3b5",shortnames:[],category:"symbols"},":musical_score:":{uc_base:"1f3bc",uc_output:"1f3bc",uc_match:"1f3bc",uc_greedy:"1f3bc",shortnames:[],category:"activity"},":mute:":{uc_base:"1f507",uc_output:"1f507",uc_match:"1f507",uc_greedy:"1f507",shortnames:[],category:"symbols"},":nail_care:":{uc_base:"1f485",uc_output:"1f485",uc_match:"1f485",uc_greedy:"1f485",shortnames:[],category:"people"},":name_badge:":{uc_base:"1f4db",uc_output:"1f4db",uc_match:"1f4db",uc_greedy:"1f4db",shortnames:[],category:"symbols"},":nauseated_face:":{uc_base:"1f922",uc_output:"1f922",uc_match:"1f922",uc_greedy:"1f922",shortnames:[":sick:"],category:"people"},":nazar_amulet:":{uc_base:"1f9ff",uc_output:"1f9ff",uc_match:"1f9ff",uc_greedy:"1f9ff",shortnames:[],category:"objects"},":necktie:":{uc_base:"1f454",uc_output:"1f454",uc_match:"1f454",uc_greedy:"1f454",shortnames:[],category:"people"},":nerd:":{uc_base:"1f913",uc_output:"1f913",uc_match:"1f913",uc_greedy:"1f913",shortnames:[":nerd_face:"],category:"people"},":neutral_face:":{uc_base:"1f610",uc_output:"1f610",uc_match:"1f610-fe0f",uc_greedy:"1f610-fe0f",shortnames:[],category:"people"},":new:":{uc_base:"1f195",uc_output:"1f195",uc_match:"1f195",uc_greedy:"1f195",shortnames:[],category:"symbols"},":new_moon:":{uc_base:"1f311",uc_output:"1f311",uc_match:"1f311",uc_greedy:"1f311",shortnames:[],category:"nature"},":new_moon_with_face:":{uc_base:"1f31a",uc_output:"1f31a",uc_match:"1f31a",uc_greedy:"1f31a",shortnames:[],category:"nature"},":newspaper2:":{uc_base:"1f5de",uc_output:"1f5de",uc_match:"1f5de-fe0f",uc_greedy:"1f5de-fe0f",shortnames:[":rolled_up_newspaper:"],category:"objects"},":newspaper:":{uc_base:"1f4f0",uc_output:"1f4f0",uc_match:"1f4f0",uc_greedy:"1f4f0",shortnames:[],category:"objects"},":ng:":{uc_base:"1f196",uc_output:"1f196",uc_match:"1f196",uc_greedy:"1f196",shortnames:[],category:"symbols"},":night_with_stars:":{uc_base:"1f303",uc_output:"1f303",uc_match:"1f303",uc_greedy:"1f303",shortnames:[],category:"travel"},":no_bell:":{uc_base:"1f515",uc_output:"1f515",uc_match:"1f515",uc_greedy:"1f515",shortnames:[],category:"symbols"},":no_bicycles:":{uc_base:"1f6b3",uc_output:"1f6b3",uc_match:"1f6b3",uc_greedy:"1f6b3",shortnames:[],category:"symbols"},":no_entry_sign:":{uc_base:"1f6ab",uc_output:"1f6ab",uc_match:"1f6ab",uc_greedy:"1f6ab",shortnames:[],category:"symbols"},":no_mobile_phones:":{uc_base:"1f4f5",uc_output:"1f4f5",uc_match:"1f4f5",uc_greedy:"1f4f5",shortnames:[],category:"symbols"},":no_mouth:":{uc_base:"1f636",uc_output:"1f636",uc_match:"1f636",uc_greedy:"1f636",shortnames:[],category:"people"},":no_pedestrians:":{uc_base:"1f6b7",uc_output:"1f6b7",uc_match:"1f6b7",uc_greedy:"1f6b7",shortnames:[],category:"symbols"},":no_smoking:":{uc_base:"1f6ad",uc_output:"1f6ad",uc_match:"1f6ad-fe0f",uc_greedy:"1f6ad-fe0f",shortnames:[],category:"symbols"},":non-potable_water:":{uc_base:"1f6b1",uc_output:"1f6b1",uc_match:"1f6b1",uc_greedy:"1f6b1",shortnames:[],category:"symbols"},":nose:":{uc_base:"1f443",uc_output:"1f443",uc_match:"1f443",uc_greedy:"1f443",shortnames:[],category:"people"},":notebook:":{uc_base:"1f4d3",uc_output:"1f4d3",uc_match:"1f4d3",uc_greedy:"1f4d3",shortnames:[],category:"objects"},":notebook_with_decorative_cover:":{uc_base:"1f4d4",uc_output:"1f4d4",uc_match:"1f4d4",uc_greedy:"1f4d4",shortnames:[],category:"objects"},":notepad_spiral:":{uc_base:"1f5d2",uc_output:"1f5d2",uc_match:"1f5d2-fe0f",uc_greedy:"1f5d2-fe0f",shortnames:[":spiral_note_pad:"],category:"objects"},":notes:":{uc_base:"1f3b6",uc_output:"1f3b6",uc_match:"1f3b6",uc_greedy:"1f3b6",shortnames:[],category:"symbols"},":nut_and_bolt:":{uc_base:"1f529",uc_output:"1f529",uc_match:"1f529",uc_greedy:"1f529",shortnames:[],category:"objects"},":o2:":{uc_base:"1f17e",uc_output:"1f17e",uc_match:"1f17e-fe0f",uc_greedy:"1f17e-fe0f",shortnames:[],category:"symbols"},":ocean:":{uc_base:"1f30a",uc_output:"1f30a",uc_match:"1f30a",uc_greedy:"1f30a",shortnames:[],category:"nature"},":octagonal_sign:":{uc_base:"1f6d1",uc_output:"1f6d1",uc_match:"1f6d1",uc_greedy:"1f6d1",shortnames:[":stop_sign:"],category:"symbols"},":octopus:":{uc_base:"1f419",uc_output:"1f419",uc_match:"1f419",uc_greedy:"1f419",shortnames:[],category:"nature"},":oden:":{uc_base:"1f362",uc_output:"1f362",uc_match:"1f362",uc_greedy:"1f362",shortnames:[],category:"food"},":office:":{uc_base:"1f3e2",uc_output:"1f3e2",uc_match:"1f3e2",uc_greedy:"1f3e2",shortnames:[],category:"travel"},":oil:":{uc_base:"1f6e2",uc_output:"1f6e2",uc_match:"1f6e2-fe0f",uc_greedy:"1f6e2-fe0f",shortnames:[":oil_drum:"],category:"objects"},":ok:":{uc_base:"1f197",uc_output:"1f197",uc_match:"1f197",uc_greedy:"1f197",shortnames:[],category:"symbols"},":ok_hand:":{uc_base:"1f44c",uc_output:"1f44c",uc_match:"1f44c",uc_greedy:"1f44c",shortnames:[],category:"people"},":older_adult:":{uc_base:"1f9d3",uc_output:"1f9d3",uc_match:"1f9d3",uc_greedy:"1f9d3",shortnames:[],category:"people"},":older_man:":{uc_base:"1f474",uc_output:"1f474",uc_match:"1f474",uc_greedy:"1f474",shortnames:[],category:"people"},":older_woman:":{uc_base:"1f475",uc_output:"1f475",uc_match:"1f475",uc_greedy:"1f475",shortnames:[":grandma:"],category:"people"},":om_symbol:":{uc_base:"1f549",uc_output:"1f549",uc_match:"1f549-fe0f",uc_greedy:"1f549",shortnames:[],category:"symbols"},":on:":{uc_base:"1f51b",uc_output:"1f51b",uc_match:"1f51b",uc_greedy:"1f51b",shortnames:[],category:"symbols"},":oncoming_automobile:":{uc_base:"1f698",uc_output:"1f698",uc_match:"1f698-fe0f",uc_greedy:"1f698-fe0f",shortnames:[],category:"travel"},":oncoming_bus:":{uc_base:"1f68d",uc_output:"1f68d",uc_match:"1f68d-fe0f",uc_greedy:"1f68d-fe0f",shortnames:[],category:"travel"},":oncoming_police_car:":{uc_base:"1f694",uc_output:"1f694",uc_match:"1f694-fe0f",uc_greedy:"1f694-fe0f",shortnames:[],category:"travel"},":oncoming_taxi:":{uc_base:"1f696",uc_output:"1f696",uc_match:"1f696",uc_greedy:"1f696",shortnames:[],category:"travel"},":open_file_folder:":{uc_base:"1f4c2",uc_output:"1f4c2",uc_match:"1f4c2",uc_greedy:"1f4c2",shortnames:[],category:"objects"},":open_hands:":{uc_base:"1f450",uc_output:"1f450",uc_match:"1f450",uc_greedy:"1f450",shortnames:[],category:"people"},":open_mouth:":{uc_base:"1f62e",uc_output:"1f62e",uc_match:"1f62e",uc_greedy:"1f62e",shortnames:[],category:"people"},":orange_book:":{uc_base:"1f4d9",uc_output:"1f4d9",uc_match:"1f4d9",uc_greedy:"1f4d9",shortnames:[],category:"objects"},":orange_heart:":{uc_base:"1f9e1",uc_output:"1f9e1",uc_match:"1f9e1",uc_greedy:"1f9e1",shortnames:[],category:"symbols"},":outbox_tray:":{uc_base:"1f4e4",uc_output:"1f4e4",uc_match:"1f4e4-fe0f",uc_greedy:"1f4e4-fe0f",shortnames:[],category:"objects"},":owl:":{uc_base:"1f989",uc_output:"1f989",uc_match:"1f989",uc_greedy:"1f989",shortnames:[],category:"nature"},":ox:":{uc_base:"1f402",uc_output:"1f402",uc_match:"1f402",uc_greedy:"1f402",shortnames:[],category:"nature"},":package:":{uc_base:"1f4e6",uc_output:"1f4e6",uc_match:"1f4e6-fe0f",uc_greedy:"1f4e6-fe0f",shortnames:[],category:"objects"},":page_facing_up:":{uc_base:"1f4c4",uc_output:"1f4c4",uc_match:"1f4c4",uc_greedy:"1f4c4",shortnames:[],category:"objects"},":page_with_curl:":{uc_base:"1f4c3",uc_output:"1f4c3",uc_match:"1f4c3",uc_greedy:"1f4c3",shortnames:[],category:"objects"},":pager:":{uc_base:"1f4df",uc_output:"1f4df",uc_match:"1f4df-fe0f",uc_greedy:"1f4df-fe0f",shortnames:[],category:"objects"},":paintbrush:":{uc_base:"1f58c",uc_output:"1f58c",uc_match:"1f58c-fe0f",uc_greedy:"1f58c-fe0f",shortnames:[":lower_left_paintbrush:"],category:"objects"},":palm_tree:":{uc_base:"1f334",uc_output:"1f334",uc_match:"1f334",uc_greedy:"1f334",shortnames:[],category:"nature"},":palms_up_together:":{uc_base:"1f932",uc_output:"1f932",uc_match:"1f932",uc_greedy:"1f932",shortnames:[],category:"people"},":pancakes:":{uc_base:"1f95e",uc_output:"1f95e",uc_match:"1f95e",uc_greedy:"1f95e",shortnames:[],category:"food"},":panda_face:":{uc_base:"1f43c",uc_output:"1f43c",uc_match:"1f43c",uc_greedy:"1f43c",shortnames:[],category:"nature"},":paperclip:":{uc_base:"1f4ce",uc_output:"1f4ce",uc_match:"1f4ce",uc_greedy:"1f4ce",shortnames:[],category:"objects"},":paperclips:":{uc_base:"1f587",uc_output:"1f587",uc_match:"1f587-fe0f",uc_greedy:"1f587-fe0f",shortnames:[":linked_paperclips:"],category:"objects"},":park:":{uc_base:"1f3de",uc_output:"1f3de",uc_match:"1f3de-fe0f",uc_greedy:"1f3de-fe0f",shortnames:[":national_park:"],category:"travel"},":parking:":{uc_base:"1f17f",uc_output:"1f17f",uc_match:"1f17f-fe0f",uc_greedy:"1f17f-fe0f",shortnames:[],category:"symbols"},":parrot:":{uc_base:"1f99c",uc_output:"1f99c",uc_match:"1f99c",uc_greedy:"1f99c",shortnames:[],category:"nature"},":partying_face:":{uc_base:"1f973",uc_output:"1f973",uc_match:"1f973",uc_greedy:"1f973",shortnames:[],category:"people"},":passport_control:":{uc_base:"1f6c2",uc_output:"1f6c2",uc_match:"1f6c2",uc_greedy:"1f6c2",shortnames:[],category:"symbols"},":peach:":{uc_base:"1f351",uc_output:"1f351",uc_match:"1f351",uc_greedy:"1f351",shortnames:[],category:"food"},":peacock:":{uc_base:"1f99a",uc_output:"1f99a",uc_match:"1f99a",uc_greedy:"1f99a",shortnames:[],category:"nature"},":peanuts:":{uc_base:"1f95c",uc_output:"1f95c",uc_match:"1f95c",uc_greedy:"1f95c",shortnames:[":shelled_peanut:"],category:"food"},":pear:":{uc_base:"1f350",uc_output:"1f350",uc_match:"1f350",uc_greedy:"1f350",shortnames:[],category:"food"},":pen_ballpoint:":{uc_base:"1f58a",uc_output:"1f58a",uc_match:"1f58a-fe0f",uc_greedy:"1f58a-fe0f",shortnames:[":lower_left_ballpoint_pen:"],category:"objects"},":pen_fountain:":{uc_base:"1f58b",uc_output:"1f58b",uc_match:"1f58b-fe0f",uc_greedy:"1f58b-fe0f",shortnames:[":lower_left_fountain_pen:"],category:"objects"},":pencil:":{uc_base:"1f4dd",uc_output:"1f4dd",uc_match:"1f4dd",uc_greedy:"1f4dd",shortnames:[":memo:"],category:"objects"},":penguin:":{uc_base:"1f427",uc_output:"1f427",uc_match:"1f427",uc_greedy:"1f427",shortnames:[],category:"nature"},":pensive:":{uc_base:"1f614",uc_output:"1f614",uc_match:"1f614",uc_greedy:"1f614",shortnames:[],category:"people"},":people_with_bunny_ears_partying:":{uc_base:"1f46f",uc_output:"1f46f",uc_match:"1f46f",uc_greedy:"1f46f",shortnames:[":dancers:"],category:"people"},":people_wrestling:":{uc_base:"1f93c",uc_output:"1f93c",uc_match:"1f93c",uc_greedy:"1f93c",shortnames:[":wrestlers:",":wrestling:"],category:"activity"},":performing_arts:":{uc_base:"1f3ad",uc_output:"1f3ad",uc_match:"1f3ad-fe0f",uc_greedy:"1f3ad-fe0f",shortnames:[],category:"activity"},":persevere:":{uc_base:"1f623",uc_output:"1f623",uc_match:"1f623",uc_greedy:"1f623",shortnames:[],category:"people"},":person_biking:":{uc_base:"1f6b4",uc_output:"1f6b4",uc_match:"1f6b4",uc_greedy:"1f6b4",shortnames:[":bicyclist:"],category:"activity"},":person_bowing:":{uc_base:"1f647",uc_output:"1f647",uc_match:"1f647",uc_greedy:"1f647",shortnames:[":bow:"],category:"people"},":person_climbing:":{uc_base:"1f9d7",uc_output:"1f9d7",uc_match:"1f9d7",uc_greedy:"1f9d7",shortnames:[],category:"activity"},":person_doing_cartwheel:":{uc_base:"1f938",uc_output:"1f938",uc_match:"1f938",uc_greedy:"1f938",shortnames:[":cartwheel:"],category:"activity"},":person_facepalming:":{uc_base:"1f926",uc_output:"1f926",uc_match:"1f926",uc_greedy:"1f926",shortnames:[":face_palm:",":facepalm:"],category:"people"},":person_fencing:":{uc_base:"1f93a",uc_output:"1f93a",uc_match:"1f93a",uc_greedy:"1f93a",shortnames:[":fencer:",":fencing:"],category:"activity"},":person_frowning:":{uc_base:"1f64d",uc_output:"1f64d",uc_match:"1f64d",uc_greedy:"1f64d",shortnames:[],category:"people"},":person_gesturing_no:":{uc_base:"1f645",uc_output:"1f645",uc_match:"1f645",uc_greedy:"1f645",shortnames:[":no_good:"],category:"people"},":person_gesturing_ok:":{uc_base:"1f646",uc_output:"1f646",uc_match:"1f646",uc_greedy:"1f646",shortnames:[":ok_woman:"],category:"people"},":person_getting_haircut:":{uc_base:"1f487",uc_output:"1f487",uc_match:"1f487",uc_greedy:"1f487",shortnames:[":haircut:"],category:"people"},":person_getting_massage:":{uc_base:"1f486",uc_output:"1f486",uc_match:"1f486",uc_greedy:"1f486",shortnames:[":massage:"],category:"people"},":person_golfing:":{uc_base:"1f3cc",uc_output:"1f3cc",uc_match:"1f3cc-fe0f",uc_greedy:"1f3cc-fe0f",shortnames:[":golfer:"],category:"activity"},":person_in_lotus_position:":{uc_base:"1f9d8",uc_output:"1f9d8",uc_match:"1f9d8",uc_greedy:"1f9d8",shortnames:[],category:"activity"},":person_in_steamy_room:":{uc_base:"1f9d6",uc_output:"1f9d6",uc_match:"1f9d6",uc_greedy:"1f9d6",shortnames:[],category:"people"},":person_juggling:":{uc_base:"1f939",uc_output:"1f939",uc_match:"1f939",uc_greedy:"1f939",shortnames:[":juggling:",":juggler:"],category:"activity"},":person_lifting_weights:":{uc_base:"1f3cb",uc_output:"1f3cb",uc_match:"1f3cb-fe0f",uc_greedy:"1f3cb-fe0f",shortnames:[":lifter:",":weight_lifter:"],category:"activity"},":person_mountain_biking:":{uc_base:"1f6b5",uc_output:"1f6b5",uc_match:"1f6b5",uc_greedy:"1f6b5",shortnames:[":mountain_bicyclist:"],category:"activity"},":person_playing_handball:":{uc_base:"1f93e",uc_output:"1f93e",uc_match:"1f93e",uc_greedy:"1f93e",shortnames:[":handball:"],category:"activity"},":person_playing_water_polo:":{uc_base:"1f93d",uc_output:"1f93d",uc_match:"1f93d",uc_greedy:"1f93d",shortnames:[":water_polo:"],category:"activity"},":person_pouting:":{uc_base:"1f64e",uc_output:"1f64e",uc_match:"1f64e",uc_greedy:"1f64e",shortnames:[":person_with_pouting_face:"],category:"people"},":person_raising_hand:":{uc_base:"1f64b",uc_output:"1f64b",uc_match:"1f64b",uc_greedy:"1f64b",shortnames:[":raising_hand:"],category:"people"},":person_rowing_boat:":{uc_base:"1f6a3",uc_output:"1f6a3",uc_match:"1f6a3",uc_greedy:"1f6a3",shortnames:[":rowboat:"],category:"activity"},":person_running:":{uc_base:"1f3c3",uc_output:"1f3c3",uc_match:"1f3c3",uc_greedy:"1f3c3",shortnames:[":runner:"],category:"people"},":person_shrugging:":{uc_base:"1f937",uc_output:"1f937",uc_match:"1f937",uc_greedy:"1f937",shortnames:[":shrug:"],category:"people"},":person_surfing:":{uc_base:"1f3c4",uc_output:"1f3c4",uc_match:"1f3c4-fe0f",uc_greedy:"1f3c4-fe0f",shortnames:[":surfer:"],category:"activity"},":person_swimming:":{uc_base:"1f3ca",uc_output:"1f3ca",uc_match:"1f3ca-fe0f",uc_greedy:"1f3ca-fe0f",shortnames:[":swimmer:"],category:"activity"},":person_tipping_hand:":{uc_base:"1f481",uc_output:"1f481",uc_match:"1f481",uc_greedy:"1f481",shortnames:[":information_desk_person:"],category:"people"},":person_walking:":{uc_base:"1f6b6",uc_output:"1f6b6",uc_match:"1f6b6",uc_greedy:"1f6b6",shortnames:[":walking:"],category:"people"},":person_wearing_turban:":{uc_base:"1f473",uc_output:"1f473",uc_match:"1f473",uc_greedy:"1f473",shortnames:[":man_with_turban:"],category:"people"},":petri_dish:":{uc_base:"1f9eb",uc_output:"1f9eb",uc_match:"1f9eb",uc_greedy:"1f9eb",shortnames:[],category:"objects"},":pie:":{uc_base:"1f967",uc_output:"1f967",uc_match:"1f967",uc_greedy:"1f967",shortnames:[],category:"food"},":pig2:":{uc_base:"1f416",uc_output:"1f416",uc_match:"1f416",uc_greedy:"1f416",shortnames:[],category:"nature"},":pig:":{uc_base:"1f437",uc_output:"1f437",uc_match:"1f437",uc_greedy:"1f437",shortnames:[],category:"nature"},":pig_nose:":{uc_base:"1f43d",uc_output:"1f43d",uc_match:"1f43d",uc_greedy:"1f43d",shortnames:[],category:"nature"},":pill:":{uc_base:"1f48a",uc_output:"1f48a",uc_match:"1f48a",uc_greedy:"1f48a",shortnames:[],category:"objects"},":pineapple:":{uc_base:"1f34d",uc_output:"1f34d",uc_match:"1f34d",uc_greedy:"1f34d",shortnames:[],category:"food"},":ping_pong:":{uc_base:"1f3d3",uc_output:"1f3d3",uc_match:"1f3d3",uc_greedy:"1f3d3",shortnames:[":table_tennis:"],category:"activity"},":pizza:":{uc_base:"1f355",uc_output:"1f355",uc_match:"1f355",uc_greedy:"1f355",shortnames:[],category:"food"},":place_of_worship:":{uc_base:"1f6d0",uc_output:"1f6d0",uc_match:"1f6d0",uc_greedy:"1f6d0",shortnames:[":worship_symbol:"],category:"symbols"},":pleading_face:":{uc_base:"1f97a",uc_output:"1f97a",uc_match:"1f97a",uc_greedy:"1f97a",shortnames:[],category:"people"},":point_down:":{uc_base:"1f447",uc_output:"1f447",uc_match:"1f447-fe0f",uc_greedy:"1f447-fe0f",shortnames:[],category:"people"},":point_left:":{uc_base:"1f448",uc_output:"1f448",uc_match:"1f448-fe0f",uc_greedy:"1f448-fe0f",shortnames:[],category:"people"},":point_right:":{uc_base:"1f449",uc_output:"1f449",uc_match:"1f449-fe0f",uc_greedy:"1f449-fe0f",shortnames:[],category:"people"},":point_up_2:":{uc_base:"1f446",uc_output:"1f446",uc_match:"1f446-fe0f",uc_greedy:"1f446-fe0f",shortnames:[],category:"people"},":police_car:":{uc_base:"1f693",uc_output:"1f693",uc_match:"1f693",uc_greedy:"1f693",shortnames:[],category:"travel"},":police_officer:":{uc_base:"1f46e",uc_output:"1f46e",uc_match:"1f46e",uc_greedy:"1f46e",shortnames:[":cop:"],category:"people"},":poodle:":{uc_base:"1f429",uc_output:"1f429",uc_match:"1f429",uc_greedy:"1f429",shortnames:[],category:"nature"},":poop:":{uc_base:"1f4a9",uc_output:"1f4a9",uc_match:"1f4a9",uc_greedy:"1f4a9",shortnames:[":shit:",":hankey:",":poo:"],category:"people"},":popcorn:":{uc_base:"1f37f",uc_output:"1f37f",uc_match:"1f37f",uc_greedy:"1f37f",shortnames:[],category:"food"},":post_office:":{uc_base:"1f3e3",uc_output:"1f3e3",uc_match:"1f3e3",uc_greedy:"1f3e3",shortnames:[],category:"travel"},":postal_horn:":{uc_base:"1f4ef",uc_output:"1f4ef",uc_match:"1f4ef",uc_greedy:"1f4ef",shortnames:[],category:"objects"},":postbox:":{uc_base:"1f4ee",uc_output:"1f4ee",uc_match:"1f4ee",uc_greedy:"1f4ee",shortnames:[],category:"objects"},":potable_water:":{uc_base:"1f6b0",uc_output:"1f6b0",uc_match:"1f6b0",uc_greedy:"1f6b0",shortnames:[],category:"objects"},":potato:":{uc_base:"1f954",uc_output:"1f954",uc_match:"1f954",uc_greedy:"1f954",shortnames:[],category:"food"},":pouch:":{uc_base:"1f45d",uc_output:"1f45d",uc_match:"1f45d",uc_greedy:"1f45d",shortnames:[],category:"people"},":poultry_leg:":{uc_base:"1f357",uc_output:"1f357",uc_match:"1f357",uc_greedy:"1f357",shortnames:[],category:"food"},":pound:":{uc_base:"1f4b7",uc_output:"1f4b7",uc_match:"1f4b7",uc_greedy:"1f4b7",shortnames:[],category:"objects"},":pouting_cat:":{uc_base:"1f63e",uc_output:"1f63e",uc_match:"1f63e",uc_greedy:"1f63e",shortnames:[],category:"people"},":pray:":{uc_base:"1f64f",uc_output:"1f64f",uc_match:"1f64f",uc_greedy:"1f64f",shortnames:[],category:"people"},":prayer_beads:":{uc_base:"1f4ff",uc_output:"1f4ff",uc_match:"1f4ff",uc_greedy:"1f4ff",shortnames:[],category:"objects"},":pregnant_woman:":{uc_base:"1f930",uc_output:"1f930",uc_match:"1f930",uc_greedy:"1f930",shortnames:[":expecting_woman:"],category:"people"},":pretzel:":{uc_base:"1f968",uc_output:"1f968",uc_match:"1f968",uc_greedy:"1f968",shortnames:[],category:"food"},":prince:":{uc_base:"1f934",uc_output:"1f934",uc_match:"1f934",uc_greedy:"1f934",shortnames:[],category:"people"},":princess:":{uc_base:"1f478",uc_output:"1f478",uc_match:"1f478",uc_greedy:"1f478",shortnames:[],category:"people"},":printer:":{uc_base:"1f5a8",uc_output:"1f5a8",uc_match:"1f5a8-fe0f",uc_greedy:"1f5a8-fe0f",shortnames:[],category:"objects"},":projector:":{uc_base:"1f4fd",uc_output:"1f4fd",uc_match:"1f4fd-fe0f",uc_greedy:"1f4fd-fe0f",shortnames:[":film_projector:"],category:"objects"},":punch:":{uc_base:"1f44a",uc_output:"1f44a",uc_match:"1f44a",uc_greedy:"1f44a",shortnames:[],category:"people"},":purple_heart:":{uc_base:"1f49c",uc_output:"1f49c",uc_match:"1f49c",uc_greedy:"1f49c",shortnames:[],category:"symbols"},":purse:":{uc_base:"1f45b",uc_output:"1f45b",uc_match:"1f45b",uc_greedy:"1f45b",shortnames:[],category:"people"},":pushpin:":{uc_base:"1f4cc",uc_output:"1f4cc",uc_match:"1f4cc",uc_greedy:"1f4cc",shortnames:[],category:"objects"},":put_litter_in_its_place:":{uc_base:"1f6ae",uc_output:"1f6ae",uc_match:"1f6ae",uc_greedy:"1f6ae",shortnames:[],category:"symbols"},":rabbit2:":{uc_base:"1f407",uc_output:"1f407",uc_match:"1f407",uc_greedy:"1f407",shortnames:[],category:"nature"},":rabbit:":{uc_base:"1f430",uc_output:"1f430",uc_match:"1f430",uc_greedy:"1f430",shortnames:[],category:"nature"},":raccoon:":{uc_base:"1f99d",uc_output:"1f99d",uc_match:"1f99d",uc_greedy:"1f99d",shortnames:[],category:"nature"},":race_car:":{uc_base:"1f3ce",uc_output:"1f3ce",uc_match:"1f3ce-fe0f",uc_greedy:"1f3ce-fe0f",shortnames:[":racing_car:"],category:"travel"},":racehorse:":{uc_base:"1f40e",uc_output:"1f40e",uc_match:"1f40e",uc_greedy:"1f40e",shortnames:[],category:"nature"},":radio:":{uc_base:"1f4fb",uc_output:"1f4fb",uc_match:"1f4fb-fe0f",uc_greedy:"1f4fb-fe0f",shortnames:[],category:"objects"},":radio_button:":{uc_base:"1f518",uc_output:"1f518",uc_match:"1f518",uc_greedy:"1f518",shortnames:[],category:"symbols"},":rage:":{uc_base:"1f621",uc_output:"1f621",uc_match:"1f621",uc_greedy:"1f621",shortnames:[],category:"people"},":railway_car:":{uc_base:"1f683",uc_output:"1f683",uc_match:"1f683",uc_greedy:"1f683",shortnames:[],category:"travel"},":railway_track:":{uc_base:"1f6e4",uc_output:"1f6e4",uc_match:"1f6e4-fe0f",uc_greedy:"1f6e4-fe0f",shortnames:[":railroad_track:"],category:"travel"},":rainbow:":{uc_base:"1f308",uc_output:"1f308",uc_match:"1f308",uc_greedy:"1f308",shortnames:[],category:"nature"},":raised_back_of_hand:":{uc_base:"1f91a",uc_output:"1f91a",uc_match:"1f91a",uc_greedy:"1f91a",shortnames:[":back_of_hand:"],category:"people"},":raised_hands:":{uc_base:"1f64c",uc_output:"1f64c",uc_match:"1f64c",uc_greedy:"1f64c",shortnames:[],category:"people"},":ram:":{uc_base:"1f40f",uc_output:"1f40f",uc_match:"1f40f",uc_greedy:"1f40f",shortnames:[],category:"nature"},":ramen:":{uc_base:"1f35c",uc_output:"1f35c",uc_match:"1f35c",uc_greedy:"1f35c",shortnames:[],category:"food"},":rat:":{uc_base:"1f400",uc_output:"1f400",uc_match:"1f400",uc_greedy:"1f400",shortnames:[],category:"nature"},":receipt:":{uc_base:"1f9fe",uc_output:"1f9fe",uc_match:"1f9fe",uc_greedy:"1f9fe",shortnames:[],category:"objects"},":red_car:":{uc_base:"1f697",uc_output:"1f697",uc_match:"1f697",uc_greedy:"1f697",shortnames:[],category:"travel"},":red_circle:":{uc_base:"1f534",uc_output:"1f534",uc_match:"1f534",uc_greedy:"1f534",shortnames:[],category:"symbols"},":red_envelope:":{uc_base:"1f9e7",uc_output:"1f9e7",uc_match:"1f9e7",uc_greedy:"1f9e7",shortnames:[],category:"objects"},":red_haired:":{uc_base:"1f9b0",uc_output:"1f9b0",uc_match:"1f9b0",uc_greedy:"1f9b0",shortnames:[],category:"people"},":regional_indicator_a:":{uc_base:"1f1e6",uc_output:"1f1e6",uc_match:"1f1e6",uc_greedy:"1f1e6",shortnames:[],category:"regional"},":regional_indicator_b:":{uc_base:"1f1e7",uc_output:"1f1e7",uc_match:"1f1e7",uc_greedy:"1f1e7",shortnames:[],category:"regional"},":regional_indicator_c:":{uc_base:"1f1e8",uc_output:"1f1e8",uc_match:"1f1e8",uc_greedy:"1f1e8",shortnames:[],category:"regional"},":regional_indicator_d:":{uc_base:"1f1e9",uc_output:"1f1e9",uc_match:"1f1e9",uc_greedy:"1f1e9",shortnames:[],category:"regional"},":regional_indicator_e:":{uc_base:"1f1ea",uc_output:"1f1ea",uc_match:"1f1ea",uc_greedy:"1f1ea",shortnames:[],category:"regional"},":regional_indicator_f:":{uc_base:"1f1eb",uc_output:"1f1eb",uc_match:"1f1eb",uc_greedy:"1f1eb",shortnames:[],category:"regional"},":regional_indicator_g:":{uc_base:"1f1ec",uc_output:"1f1ec",uc_match:"1f1ec",uc_greedy:"1f1ec",shortnames:[],category:"regional"},":regional_indicator_h:":{uc_base:"1f1ed",uc_output:"1f1ed",uc_match:"1f1ed",uc_greedy:"1f1ed",shortnames:[],category:"regional"},":regional_indicator_i:":{uc_base:"1f1ee",uc_output:"1f1ee",uc_match:"1f1ee",uc_greedy:"1f1ee",shortnames:[],category:"regional"},":regional_indicator_j:":{uc_base:"1f1ef",uc_output:"1f1ef",uc_match:"1f1ef",uc_greedy:"1f1ef",shortnames:[],category:"regional"},":regional_indicator_k:":{uc_base:"1f1f0",uc_output:"1f1f0",uc_match:"1f1f0",uc_greedy:"1f1f0",shortnames:[],category:"regional"},":regional_indicator_l:":{uc_base:"1f1f1",uc_output:"1f1f1",uc_match:"1f1f1",uc_greedy:"1f1f1",shortnames:[],category:"regional"},":regional_indicator_m:":{uc_base:"1f1f2",uc_output:"1f1f2",uc_match:"1f1f2",uc_greedy:"1f1f2",shortnames:[],category:"regional"},":regional_indicator_n:":{uc_base:"1f1f3",uc_output:"1f1f3",uc_match:"1f1f3",uc_greedy:"1f1f3",shortnames:[],category:"regional"},":regional_indicator_o:":{uc_base:"1f1f4",uc_output:"1f1f4",uc_match:"1f1f4",uc_greedy:"1f1f4",shortnames:[],category:"regional"},":regional_indicator_p:":{uc_base:"1f1f5",uc_output:"1f1f5",uc_match:"1f1f5",uc_greedy:"1f1f5",shortnames:[],category:"regional"},":regional_indicator_q:":{uc_base:"1f1f6",uc_output:"1f1f6",uc_match:"1f1f6",uc_greedy:"1f1f6",shortnames:[],category:"regional"},":regional_indicator_r:":{uc_base:"1f1f7",uc_output:"1f1f7",uc_match:"1f1f7",uc_greedy:"1f1f7",shortnames:[],category:"regional"},":regional_indicator_s:":{uc_base:"1f1f8",uc_output:"1f1f8",uc_match:"1f1f8",uc_greedy:"1f1f8",shortnames:[],category:"regional"},":regional_indicator_t:":{uc_base:"1f1f9",uc_output:"1f1f9",uc_match:"1f1f9",uc_greedy:"1f1f9",shortnames:[],category:"regional"},":regional_indicator_u:":{uc_base:"1f1fa",uc_output:"1f1fa",uc_match:"1f1fa",uc_greedy:"1f1fa",shortnames:[],category:"regional"},":regional_indicator_v:":{uc_base:"1f1fb",uc_output:"1f1fb",uc_match:"1f1fb",uc_greedy:"1f1fb",shortnames:[],category:"regional"},":regional_indicator_w:":{uc_base:"1f1fc",uc_output:"1f1fc",uc_match:"1f1fc",uc_greedy:"1f1fc",shortnames:[],category:"regional"},":regional_indicator_x:":{uc_base:"1f1fd",uc_output:"1f1fd",uc_match:"1f1fd",uc_greedy:"1f1fd",shortnames:[],category:"regional"},":regional_indicator_y:":{uc_base:"1f1fe",uc_output:"1f1fe",uc_match:"1f1fe",uc_greedy:"1f1fe",shortnames:[],category:"regional"},":regional_indicator_z:":{uc_base:"1f1ff",uc_output:"1f1ff",uc_match:"1f1ff",uc_greedy:"1f1ff",shortnames:[],category:"regional"},":relieved:":{uc_base:"1f60c",uc_output:"1f60c",uc_match:"1f60c",uc_greedy:"1f60c",shortnames:[],category:"people"},":reminder_ribbon:":{uc_base:"1f397",uc_output:"1f397",uc_match:"1f397-fe0f",uc_greedy:"1f397-fe0f",shortnames:[],category:"activity"},":repeat:":{uc_base:"1f501",uc_output:"1f501",uc_match:"1f501",uc_greedy:"1f501",shortnames:[],category:"symbols"},":repeat_one:":{uc_base:"1f502",uc_output:"1f502",uc_match:"1f502",uc_greedy:"1f502",shortnames:[],category:"symbols"},":restroom:":{uc_base:"1f6bb",uc_output:"1f6bb",uc_match:"1f6bb",uc_greedy:"1f6bb",shortnames:[],category:"symbols"},":revolving_hearts:":{uc_base:"1f49e",uc_output:"1f49e",uc_match:"1f49e",uc_greedy:"1f49e",shortnames:[],category:"symbols"},":rhino:":{uc_base:"1f98f",uc_output:"1f98f",uc_match:"1f98f",uc_greedy:"1f98f",shortnames:[":rhinoceros:"],category:"nature"},":ribbon:":{uc_base:"1f380",uc_output:"1f380",uc_match:"1f380",uc_greedy:"1f380",shortnames:[],category:"objects"},":rice:":{uc_base:"1f35a",uc_output:"1f35a",uc_match:"1f35a",uc_greedy:"1f35a",shortnames:[],category:"food"},":rice_ball:":{uc_base:"1f359",uc_output:"1f359",uc_match:"1f359",uc_greedy:"1f359",shortnames:[],category:"food"},":rice_cracker:":{uc_base:"1f358",uc_output:"1f358",uc_match:"1f358",uc_greedy:"1f358",shortnames:[],category:"food"},":rice_scene:":{uc_base:"1f391",uc_output:"1f391",uc_match:"1f391",uc_greedy:"1f391",shortnames:[],category:"travel"},":right_facing_fist:":{uc_base:"1f91c",uc_output:"1f91c",uc_match:"1f91c",uc_greedy:"1f91c",shortnames:[":right_fist:"],category:"people"},":ring:":{uc_base:"1f48d",uc_output:"1f48d",uc_match:"1f48d",uc_greedy:"1f48d",shortnames:[],category:"people"},":robot:":{uc_base:"1f916",uc_output:"1f916",uc_match:"1f916",uc_greedy:"1f916",shortnames:[":robot_face:"],category:"people"},":rocket:":{uc_base:"1f680",uc_output:"1f680",uc_match:"1f680",uc_greedy:"1f680",shortnames:[],category:"travel"},":rofl:":{uc_base:"1f923",uc_output:"1f923",uc_match:"1f923",uc_greedy:"1f923",shortnames:[":rolling_on_the_floor_laughing:"],category:"people"},":roll_of_paper:":{uc_base:"1f9fb",uc_output:"1f9fb",uc_match:"1f9fb",uc_greedy:"1f9fb",shortnames:[],category:"objects"},":roller_coaster:":{uc_base:"1f3a2",uc_output:"1f3a2",uc_match:"1f3a2",uc_greedy:"1f3a2",shortnames:[],category:"travel"},":rolling_eyes:":{uc_base:"1f644",uc_output:"1f644",uc_match:"1f644",uc_greedy:"1f644",shortnames:[":face_with_rolling_eyes:"],category:"people"},":rooster:":{uc_base:"1f413",uc_output:"1f413",uc_match:"1f413",uc_greedy:"1f413",shortnames:[],category:"nature"},":rose:":{uc_base:"1f339",uc_output:"1f339",uc_match:"1f339",uc_greedy:"1f339",shortnames:[],category:"nature"},":rosette:":{uc_base:"1f3f5",uc_output:"1f3f5",uc_match:"1f3f5-fe0f",uc_greedy:"1f3f5-fe0f",shortnames:[],category:"activity"},":rotating_light:":{uc_base:"1f6a8",uc_output:"1f6a8",uc_match:"1f6a8",uc_greedy:"1f6a8",shortnames:[],category:"travel"},":round_pushpin:":{uc_base:"1f4cd",uc_output:"1f4cd",uc_match:"1f4cd",uc_greedy:"1f4cd",shortnames:[],category:"objects"},":rugby_football:":{uc_base:"1f3c9",uc_output:"1f3c9",uc_match:"1f3c9",uc_greedy:"1f3c9",shortnames:[],category:"activity"},":running_shirt_with_sash:":{uc_base:"1f3bd",uc_output:"1f3bd",uc_match:"1f3bd",uc_greedy:"1f3bd",shortnames:[],category:"activity"},":sa:":{uc_base:"1f202",uc_output:"1f202",uc_match:"1f202-fe0f",uc_greedy:"1f202-fe0f",shortnames:[],category:"symbols"},":safety_pin:":{uc_base:"1f9f7",uc_output:"1f9f7",uc_match:"1f9f7",uc_greedy:"1f9f7",shortnames:[],category:"objects"},":sake:":{uc_base:"1f376",uc_output:"1f376",uc_match:"1f376",uc_greedy:"1f376",shortnames:[],category:"food"},":salad:":{uc_base:"1f957",uc_output:"1f957",uc_match:"1f957",uc_greedy:"1f957",shortnames:[":green_salad:"],category:"food"},":salt:":{uc_base:"1f9c2",uc_output:"1f9c2",uc_match:"1f9c2",uc_greedy:"1f9c2",shortnames:[],category:"food"},":sandal:":{uc_base:"1f461",uc_output:"1f461",uc_match:"1f461",uc_greedy:"1f461",shortnames:[],category:"people"},":sandwich:":{uc_base:"1f96a",uc_output:"1f96a",uc_match:"1f96a",uc_greedy:"1f96a",shortnames:[],category:"food"},":santa:":{uc_base:"1f385",uc_output:"1f385",uc_match:"1f385",uc_greedy:"1f385",shortnames:[],category:"people"},":satellite:":{uc_base:"1f4e1",uc_output:"1f4e1",uc_match:"1f4e1",uc_greedy:"1f4e1",shortnames:[],category:"objects"},":satellite_orbital:":{uc_base:"1f6f0",uc_output:"1f6f0",uc_match:"1f6f0-fe0f",uc_greedy:"1f6f0-fe0f",shortnames:[],category:"travel"},":sauropod:":{uc_base:"1f995",uc_output:"1f995",uc_match:"1f995",uc_greedy:"1f995",shortnames:[],category:"nature"},":saxophone:":{uc_base:"1f3b7",uc_output:"1f3b7",uc_match:"1f3b7",uc_greedy:"1f3b7",shortnames:[],category:"activity"},":scarf:":{uc_base:"1f9e3",uc_output:"1f9e3",uc_match:"1f9e3",uc_greedy:"1f9e3",shortnames:[],category:"people"},":school:":{uc_base:"1f3eb",uc_output:"1f3eb",uc_match:"1f3eb",uc_greedy:"1f3eb",shortnames:[],category:"travel"},":school_satchel:":{uc_base:"1f392",uc_output:"1f392",uc_match:"1f392",uc_greedy:"1f392",shortnames:[],category:"people"},":scooter:":{uc_base:"1f6f4",uc_output:"1f6f4",uc_match:"1f6f4",uc_greedy:"1f6f4",shortnames:[],category:"travel"},":scorpion:":{uc_base:"1f982",uc_output:"1f982",uc_match:"1f982",uc_greedy:"1f982",shortnames:[],category:"nature"},":scream:":{uc_base:"1f631",uc_output:"1f631",uc_match:"1f631",uc_greedy:"1f631",shortnames:[],category:"people"},":scream_cat:":{uc_base:"1f640",uc_output:"1f640",uc_match:"1f640",uc_greedy:"1f640",shortnames:[],category:"people"},":scroll:":{uc_base:"1f4dc",uc_output:"1f4dc",uc_match:"1f4dc",uc_greedy:"1f4dc",shortnames:[],category:"objects"},":seat:":{uc_base:"1f4ba",uc_output:"1f4ba",uc_match:"1f4ba",uc_greedy:"1f4ba",shortnames:[],category:"travel"},":second_place:":{uc_base:"1f948",uc_output:"1f948",uc_match:"1f948",uc_greedy:"1f948",shortnames:[":second_place_medal:"],category:"activity"},":see_no_evil:":{uc_base:"1f648",uc_output:"1f648",uc_match:"1f648",uc_greedy:"1f648",shortnames:[],category:"nature"},":seedling:":{uc_base:"1f331",uc_output:"1f331",uc_match:"1f331",uc_greedy:"1f331",shortnames:[],category:"nature"},":selfie:":{uc_base:"1f933",uc_output:"1f933",uc_match:"1f933",uc_greedy:"1f933",shortnames:[],category:"people"},":shallow_pan_of_food:":{uc_base:"1f958",uc_output:"1f958",uc_match:"1f958",uc_greedy:"1f958",shortnames:[":paella:"],category:"food"},":shark:":{uc_base:"1f988",uc_output:"1f988",uc_match:"1f988",uc_greedy:"1f988",shortnames:[],category:"nature"},":shaved_ice:":{uc_base:"1f367",uc_output:"1f367",uc_match:"1f367",uc_greedy:"1f367",shortnames:[],category:"food"},":sheep:":{uc_base:"1f411",uc_output:"1f411",uc_match:"1f411",uc_greedy:"1f411",shortnames:[],category:"nature"},":shell:":{uc_base:"1f41a",uc_output:"1f41a",uc_match:"1f41a",uc_greedy:"1f41a",shortnames:[],category:"nature"},":shield:":{uc_base:"1f6e1",uc_output:"1f6e1",uc_match:"1f6e1-fe0f",uc_greedy:"1f6e1-fe0f",shortnames:[],category:"objects"},":ship:":{uc_base:"1f6a2",uc_output:"1f6a2",uc_match:"1f6a2",uc_greedy:"1f6a2",shortnames:[],category:"travel"},":shirt:":{uc_base:"1f455",uc_output:"1f455",uc_match:"1f455",uc_greedy:"1f455",shortnames:[],category:"people"},":shopping_bags:":{uc_base:"1f6cd",uc_output:"1f6cd",uc_match:"1f6cd-fe0f",uc_greedy:"1f6cd-fe0f",shortnames:[],category:"objects"},":shopping_cart:":{uc_base:"1f6d2",uc_output:"1f6d2",uc_match:"1f6d2",uc_greedy:"1f6d2",shortnames:[":shopping_trolley:"],category:"objects"},":shower:":{uc_base:"1f6bf",uc_output:"1f6bf",uc_match:"1f6bf",uc_greedy:"1f6bf",shortnames:[],category:"objects"},":shrimp:":{uc_base:"1f990",uc_output:"1f990",uc_match:"1f990",uc_greedy:"1f990",shortnames:[],category:"nature"},":shushing_face:":{uc_base:"1f92b",uc_output:"1f92b",uc_match:"1f92b",uc_greedy:"1f92b",shortnames:[],category:"people"},":signal_strength:":{uc_base:"1f4f6",uc_output:"1f4f6",uc_match:"1f4f6",uc_greedy:"1f4f6",shortnames:[],category:"symbols"},":six_pointed_star:":{uc_base:"1f52f",uc_output:"1f52f",uc_match:"1f52f",uc_greedy:"1f52f",shortnames:[],category:"symbols"},":skateboard:":{uc_base:"1f6f9",uc_output:"1f6f9",uc_match:"1f6f9",uc_greedy:"1f6f9",shortnames:[],category:"activity"},":ski:":{uc_base:"1f3bf",uc_output:"1f3bf",uc_match:"1f3bf",uc_greedy:"1f3bf",shortnames:[],category:"activity"},":skull:":{uc_base:"1f480",uc_output:"1f480",uc_match:"1f480",uc_greedy:"1f480",shortnames:[":skeleton:"],category:"people"},":sled:":{uc_base:"1f6f7",uc_output:"1f6f7",uc_match:"1f6f7",uc_greedy:"1f6f7",shortnames:[],category:"activity"},":sleeping:":{uc_base:"1f634",uc_output:"1f634",uc_match:"1f634",uc_greedy:"1f634",shortnames:[],category:"people"},":sleeping_accommodation:":{uc_base:"1f6cc",uc_output:"1f6cc",uc_match:"1f6cc",uc_greedy:"1f6cc",shortnames:[],category:"objects"},":sleepy:":{uc_base:"1f62a",uc_output:"1f62a",uc_match:"1f62a",uc_greedy:"1f62a",shortnames:[],category:"people"},":slight_frown:":{uc_base:"1f641",uc_output:"1f641",uc_match:"1f641",uc_greedy:"1f641",shortnames:[":slightly_frowning_face:"],category:"people"},":slight_smile:":{uc_base:"1f642",uc_output:"1f642",uc_match:"1f642",uc_greedy:"1f642",shortnames:[":slightly_smiling_face:"],category:"people"},":slot_machine:":{uc_base:"1f3b0",uc_output:"1f3b0",uc_match:"1f3b0",uc_greedy:"1f3b0",shortnames:[],category:"activity"},":small_blue_diamond:":{uc_base:"1f539",uc_output:"1f539",uc_match:"1f539",uc_greedy:"1f539",shortnames:[],category:"symbols"},":small_orange_diamond:":{uc_base:"1f538",uc_output:"1f538",uc_match:"1f538",uc_greedy:"1f538",shortnames:[],category:"symbols"},":small_red_triangle:":{uc_base:"1f53a",uc_output:"1f53a",uc_match:"1f53a",uc_greedy:"1f53a",shortnames:[],category:"symbols"},":small_red_triangle_down:":{uc_base:"1f53b",uc_output:"1f53b",uc_match:"1f53b",uc_greedy:"1f53b",shortnames:[],category:"symbols"},":smile:":{uc_base:"1f604",uc_output:"1f604",uc_match:"1f604",uc_greedy:"1f604",shortnames:[],category:"people"},":smile_cat:":{uc_base:"1f638",uc_output:"1f638",uc_match:"1f638",uc_greedy:"1f638",shortnames:[],category:"people"},":smiley:":{uc_base:"1f603",uc_output:"1f603",uc_match:"1f603",uc_greedy:"1f603",shortnames:[],category:"people"},":smiley_cat:":{uc_base:"1f63a",uc_output:"1f63a",uc_match:"1f63a",uc_greedy:"1f63a",shortnames:[],category:"people"},":smiling_face_with_3_hearts:":{uc_base:"1f970",uc_output:"1f970",uc_match:"1f970",uc_greedy:"1f970",shortnames:[],category:"people"},":smiling_imp:":{uc_base:"1f608",uc_output:"1f608",uc_match:"1f608",uc_greedy:"1f608",shortnames:[],category:"people"},":smirk:":{uc_base:"1f60f",uc_output:"1f60f",uc_match:"1f60f",uc_greedy:"1f60f",shortnames:[],category:"people"},":smirk_cat:":{uc_base:"1f63c",uc_output:"1f63c",uc_match:"1f63c",uc_greedy:"1f63c",shortnames:[],category:"people"},":smoking:":{uc_base:"1f6ac",uc_output:"1f6ac",uc_match:"1f6ac",uc_greedy:"1f6ac",shortnames:[],category:"objects"},":snail:":{uc_base:"1f40c",uc_output:"1f40c",uc_match:"1f40c",uc_greedy:"1f40c",shortnames:[],category:"nature"},":snake:":{uc_base:"1f40d",uc_output:"1f40d",uc_match:"1f40d",uc_greedy:"1f40d",shortnames:[],category:"nature"},":sneezing_face:":{uc_base:"1f927",uc_output:"1f927",uc_match:"1f927",uc_greedy:"1f927",shortnames:[":sneeze:"],category:"people"},":snowboarder:":{uc_base:"1f3c2",uc_output:"1f3c2",uc_match:"1f3c2-fe0f",uc_greedy:"1f3c2-fe0f",shortnames:[],category:"activity"},":soap:":{uc_base:"1f9fc",uc_output:"1f9fc",uc_match:"1f9fc",uc_greedy:"1f9fc",shortnames:[],category:"objects"},":sob:":{uc_base:"1f62d",uc_output:"1f62d",uc_match:"1f62d",uc_greedy:"1f62d",shortnames:[],category:"people"},":socks:":{uc_base:"1f9e6",uc_output:"1f9e6",uc_match:"1f9e6",uc_greedy:"1f9e6",shortnames:[],category:"people"},":softball:":{uc_base:"1f94e",uc_output:"1f94e",uc_match:"1f94e",uc_greedy:"1f94e",shortnames:[],category:"activity"},":soon:":{uc_base:"1f51c",uc_output:"1f51c",uc_match:"1f51c",uc_greedy:"1f51c",shortnames:[],category:"symbols"},":sos:":{uc_base:"1f198",uc_output:"1f198",uc_match:"1f198",uc_greedy:"1f198",shortnames:[],category:"symbols"},":sound:":{uc_base:"1f509",uc_output:"1f509",uc_match:"1f509",uc_greedy:"1f509",shortnames:[],category:"symbols"},":space_invader:":{uc_base:"1f47e",uc_output:"1f47e",uc_match:"1f47e",uc_greedy:"1f47e",shortnames:[],category:"people"},":spaghetti:":{uc_base:"1f35d",uc_output:"1f35d",uc_match:"1f35d",uc_greedy:"1f35d",shortnames:[],category:"food"},":sparkler:":{uc_base:"1f387",uc_output:"1f387",uc_match:"1f387",uc_greedy:"1f387",shortnames:[],category:"travel"},":sparkling_heart:":{uc_base:"1f496",uc_output:"1f496",uc_match:"1f496",uc_greedy:"1f496",shortnames:[],category:"symbols"},":speak_no_evil:":{uc_base:"1f64a",uc_output:"1f64a",uc_match:"1f64a",uc_greedy:"1f64a",shortnames:[],category:"nature"},":speaker:":{uc_base:"1f508",uc_output:"1f508",uc_match:"1f508-fe0f",uc_greedy:"1f508-fe0f",shortnames:[],category:"symbols"},":speaking_head:":{uc_base:"1f5e3",uc_output:"1f5e3",uc_match:"1f5e3-fe0f",uc_greedy:"1f5e3-fe0f",shortnames:[":speaking_head_in_silhouette:"],category:"people"},":speech_balloon:":{uc_base:"1f4ac",uc_output:"1f4ac",uc_match:"1f4ac",uc_greedy:"1f4ac",shortnames:[],category:"symbols"},":speech_left:":{uc_base:"1f5e8",uc_output:"1f5e8",uc_match:"1f5e8-fe0f",uc_greedy:"1f5e8-fe0f",shortnames:[":left_speech_bubble:"],category:"symbols"},":speedboat:":{uc_base:"1f6a4",uc_output:"1f6a4",uc_match:"1f6a4",uc_greedy:"1f6a4",shortnames:[],category:"travel"},":spider:":{uc_base:"1f577",uc_output:"1f577",uc_match:"1f577-fe0f",uc_greedy:"1f577-fe0f",shortnames:[],category:"nature"},":spider_web:":{uc_base:"1f578",uc_output:"1f578",uc_match:"1f578-fe0f",uc_greedy:"1f578-fe0f",shortnames:[],category:"nature"},":sponge:":{uc_base:"1f9fd",uc_output:"1f9fd",uc_match:"1f9fd",uc_greedy:"1f9fd",shortnames:[],category:"objects"},":spoon:":{uc_base:"1f944",uc_output:"1f944",uc_match:"1f944",uc_greedy:"1f944",shortnames:[],category:"food"},":squeeze_bottle:":{uc_base:"1f9f4",uc_output:"1f9f4",uc_match:"1f9f4",uc_greedy:"1f9f4",shortnames:[],category:"objects"},":squid:":{uc_base:"1f991",uc_output:"1f991",uc_match:"1f991",uc_greedy:"1f991",shortnames:[],category:"nature"},":stadium:":{uc_base:"1f3df",uc_output:"1f3df",uc_match:"1f3df-fe0f",uc_greedy:"1f3df-fe0f",shortnames:[],category:"travel"},":star2:":{uc_base:"1f31f",uc_output:"1f31f",uc_match:"1f31f",uc_greedy:"1f31f",shortnames:[],category:"nature"},":star_struck:":{uc_base:"1f929",uc_output:"1f929",uc_match:"1f929",uc_greedy:"1f929",shortnames:[],category:"people"},":stars:":{uc_base:"1f320",uc_output:"1f320",uc_match:"1f320",uc_greedy:"1f320",shortnames:[],category:"travel"},":station:":{uc_base:"1f689",uc_output:"1f689",uc_match:"1f689",uc_greedy:"1f689",shortnames:[],category:"travel"},":statue_of_liberty:":{uc_base:"1f5fd",uc_output:"1f5fd",uc_match:"1f5fd",uc_greedy:"1f5fd",shortnames:[],category:"travel"},":steam_locomotive:":{uc_base:"1f682",uc_output:"1f682",uc_match:"1f682",uc_greedy:"1f682",shortnames:[],category:"travel"},":stew:":{uc_base:"1f372",uc_output:"1f372",uc_match:"1f372",uc_greedy:"1f372",shortnames:[],category:"food"},":straight_ruler:":{uc_base:"1f4cf",uc_output:"1f4cf",uc_match:"1f4cf",uc_greedy:"1f4cf",shortnames:[],category:"objects"},":strawberry:":{uc_base:"1f353",uc_output:"1f353",uc_match:"1f353",uc_greedy:"1f353",shortnames:[],category:"food"},":stuck_out_tongue:":{uc_base:"1f61b",uc_output:"1f61b",uc_match:"1f61b",uc_greedy:"1f61b",shortnames:[],category:"people"},":stuck_out_tongue_closed_eyes:":{uc_base:"1f61d",uc_output:"1f61d",uc_match:"1f61d",uc_greedy:"1f61d",shortnames:[],category:"people"},":stuck_out_tongue_winking_eye:":{uc_base:"1f61c",uc_output:"1f61c",uc_match:"1f61c",uc_greedy:"1f61c",shortnames:[],category:"people"},":stuffed_flatbread:":{uc_base:"1f959",uc_output:"1f959",uc_match:"1f959",uc_greedy:"1f959",shortnames:[":stuffed_pita:"],category:"food"},":sun_with_face:":{uc_base:"1f31e",uc_output:"1f31e",uc_match:"1f31e",uc_greedy:"1f31e",shortnames:[],category:"nature"},":sunflower:":{uc_base:"1f33b",uc_output:"1f33b",uc_match:"1f33b",uc_greedy:"1f33b",shortnames:[],category:"nature"},":sunglasses:":{uc_base:"1f60e",uc_output:"1f60e",uc_match:"1f60e",uc_greedy:"1f60e",shortnames:[],category:"people"},":sunrise:":{uc_base:"1f305",uc_output:"1f305",uc_match:"1f305",uc_greedy:"1f305",shortnames:[],category:"travel"},":sunrise_over_mountains:":{uc_base:"1f304",uc_output:"1f304",uc_match:"1f304",uc_greedy:"1f304",shortnames:[],category:"travel"},":superhero:":{uc_base:"1f9b8",uc_output:"1f9b8",uc_match:"1f9b8",uc_greedy:"1f9b8",shortnames:[],category:"people"},":supervillain:":{uc_base:"1f9b9",uc_output:"1f9b9",uc_match:"1f9b9",uc_greedy:"1f9b9",shortnames:[],category:"people"},":sushi:":{uc_base:"1f363",uc_output:"1f363",uc_match:"1f363",uc_greedy:"1f363",shortnames:[],category:"food"},":suspension_railway:":{uc_base:"1f69f",uc_output:"1f69f",uc_match:"1f69f",uc_greedy:"1f69f",shortnames:[],category:"travel"},":swan:":{uc_base:"1f9a2",uc_output:"1f9a2",uc_match:"1f9a2",uc_greedy:"1f9a2",shortnames:[],category:"nature"},":sweat:":{uc_base:"1f613",uc_output:"1f613",uc_match:"1f613",uc_greedy:"1f613",shortnames:[],category:"people"},":sweat_drops:":{uc_base:"1f4a6",uc_output:"1f4a6",uc_match:"1f4a6",uc_greedy:"1f4a6",shortnames:[],category:"nature"},":sweat_smile:":{uc_base:"1f605",uc_output:"1f605",uc_match:"1f605",uc_greedy:"1f605",shortnames:[],category:"people"},":sweet_potato:":{uc_base:"1f360",uc_output:"1f360",uc_match:"1f360",uc_greedy:"1f360",shortnames:[],category:"food"},":symbols:":{uc_base:"1f523",uc_output:"1f523",uc_match:"1f523",uc_greedy:"1f523",shortnames:[],category:"symbols"},":synagogue:":{uc_base:"1f54d",uc_output:"1f54d",uc_match:"1f54d",uc_greedy:"1f54d",shortnames:[],category:"travel"},":syringe:":{uc_base:"1f489",uc_output:"1f489",uc_match:"1f489",uc_greedy:"1f489",shortnames:[],category:"objects"},":t_rex:":{uc_base:"1f996",uc_output:"1f996",uc_match:"1f996",uc_greedy:"1f996",shortnames:[],category:"nature"},":taco:":{uc_base:"1f32e",uc_output:"1f32e",uc_match:"1f32e",uc_greedy:"1f32e",shortnames:[],category:"food"},":tada:":{uc_base:"1f389",uc_output:"1f389",uc_match:"1f389",uc_greedy:"1f389",shortnames:[],category:"objects"},":takeout_box:":{uc_base:"1f961",uc_output:"1f961",uc_match:"1f961",uc_greedy:"1f961",shortnames:[],category:"food"},":tanabata_tree:":{uc_base:"1f38b",uc_output:"1f38b",uc_match:"1f38b",uc_greedy:"1f38b",shortnames:[],category:"nature"},":tangerine:":{uc_base:"1f34a",uc_output:"1f34a",uc_match:"1f34a",uc_greedy:"1f34a",shortnames:[],category:"food"},":taxi:":{uc_base:"1f695",uc_output:"1f695",uc_match:"1f695",uc_greedy:"1f695",shortnames:[],category:"travel"},":tea:":{uc_base:"1f375",uc_output:"1f375",uc_match:"1f375",uc_greedy:"1f375",shortnames:[],category:"food"},":teddy_bear:":{uc_base:"1f9f8",uc_output:"1f9f8",uc_match:"1f9f8",uc_greedy:"1f9f8",shortnames:[],category:"objects"},":telephone_receiver:":{uc_base:"1f4de",uc_output:"1f4de",uc_match:"1f4de",uc_greedy:"1f4de",shortnames:[],category:"objects"},":telescope:":{uc_base:"1f52d",uc_output:"1f52d",uc_match:"1f52d",uc_greedy:"1f52d",shortnames:[],category:"objects"},":tennis:":{uc_base:"1f3be",uc_output:"1f3be",uc_match:"1f3be",uc_greedy:"1f3be",shortnames:[],category:"activity"},":test_tube:":{uc_base:"1f9ea",uc_output:"1f9ea",uc_match:"1f9ea",uc_greedy:"1f9ea",shortnames:[],category:"objects"},":thermometer:":{uc_base:"1f321",uc_output:"1f321",uc_match:"1f321-fe0f",uc_greedy:"1f321-fe0f",shortnames:[],category:"objects"},":thermometer_face:":{uc_base:"1f912",uc_output:"1f912",uc_match:"1f912",uc_greedy:"1f912",shortnames:[":face_with_thermometer:"],category:"people"},":thinking:":{uc_base:"1f914",uc_output:"1f914",uc_match:"1f914",uc_greedy:"1f914",shortnames:[":thinking_face:"],category:"people"},":third_place:":{uc_base:"1f949",uc_output:"1f949",uc_match:"1f949",uc_greedy:"1f949",shortnames:[":third_place_medal:"],category:"activity"},":thought_balloon:":{uc_base:"1f4ad",uc_output:"1f4ad",uc_match:"1f4ad",uc_greedy:"1f4ad",shortnames:[],category:"symbols"},":thread:":{uc_base:"1f9f5",uc_output:"1f9f5",uc_match:"1f9f5",uc_greedy:"1f9f5",shortnames:[],category:"objects"},":thumbsdown:":{uc_base:"1f44e",uc_output:"1f44e",uc_match:"1f44e-fe0f",uc_greedy:"1f44e-fe0f",shortnames:[":-1:",":thumbdown:"],category:"people"},":thumbsup:":{uc_base:"1f44d",uc_output:"1f44d",uc_match:"1f44d-fe0f",uc_greedy:"1f44d-fe0f",shortnames:[":+1:",":thumbup:"],category:"people"},":ticket:":{uc_base:"1f3ab",uc_output:"1f3ab",uc_match:"1f3ab",uc_greedy:"1f3ab",shortnames:[],category:"activity"},":tickets:":{uc_base:"1f39f",uc_output:"1f39f",uc_match:"1f39f-fe0f",uc_greedy:"1f39f-fe0f",shortnames:[":admission_tickets:"],category:"activity"},":tiger2:":{uc_base:"1f405",uc_output:"1f405",uc_match:"1f405",uc_greedy:"1f405",shortnames:[],category:"nature"},":tiger:":{uc_base:"1f42f",uc_output:"1f42f",uc_match:"1f42f",uc_greedy:"1f42f",shortnames:[],category:"nature"},":tired_face:":{uc_base:"1f62b",uc_output:"1f62b",uc_match:"1f62b",uc_greedy:"1f62b",shortnames:[],category:"people"},":toilet:":{uc_base:"1f6bd",uc_output:"1f6bd",uc_match:"1f6bd",uc_greedy:"1f6bd",shortnames:[],category:"objects"},":tokyo_tower:":{uc_base:"1f5fc",uc_output:"1f5fc",uc_match:"1f5fc",uc_greedy:"1f5fc",shortnames:[],category:"travel"},":tomato:":{uc_base:"1f345",uc_output:"1f345",uc_match:"1f345",uc_greedy:"1f345",shortnames:[],category:"food"},":tone1:":{uc_base:"1f3fb",uc_output:"1f3fb",uc_match:"1f3fb",uc_greedy:"1f3fb",shortnames:[],category:"modifier"},":tone2:":{uc_base:"1f3fc",uc_output:"1f3fc",uc_match:"1f3fc",uc_greedy:"1f3fc",shortnames:[],category:"modifier"},":tone3:":{uc_base:"1f3fd",uc_output:"1f3fd",uc_match:"1f3fd",uc_greedy:"1f3fd",shortnames:[],category:"modifier"},":tone4:":{uc_base:"1f3fe",uc_output:"1f3fe",uc_match:"1f3fe",uc_greedy:"1f3fe",shortnames:[],category:"modifier"},":tone5:":{uc_base:"1f3ff",uc_output:"1f3ff",uc_match:"1f3ff",uc_greedy:"1f3ff",shortnames:[],category:"modifier"},":tongue:":{uc_base:"1f445",uc_output:"1f445",uc_match:"1f445",uc_greedy:"1f445",shortnames:[],category:"people"},":toolbox:":{uc_base:"1f9f0",uc_output:"1f9f0",uc_match:"1f9f0",uc_greedy:"1f9f0",shortnames:[],category:"objects"},":tools:":{uc_base:"1f6e0",uc_output:"1f6e0",uc_match:"1f6e0-fe0f",uc_greedy:"1f6e0-fe0f",shortnames:[":hammer_and_wrench:"],category:"objects"},":tooth:":{uc_base:"1f9b7",uc_output:"1f9b7",uc_match:"1f9b7",uc_greedy:"1f9b7",shortnames:[],category:"people"},":top:":{uc_base:"1f51d",uc_output:"1f51d",uc_match:"1f51d",uc_greedy:"1f51d",shortnames:[],category:"symbols"},":tophat:":{uc_base:"1f3a9",uc_output:"1f3a9",uc_match:"1f3a9",uc_greedy:"1f3a9",shortnames:[],category:"people"},":trackball:":{uc_base:"1f5b2",uc_output:"1f5b2",uc_match:"1f5b2-fe0f",uc_greedy:"1f5b2-fe0f",shortnames:[],category:"objects"},":tractor:":{uc_base:"1f69c",uc_output:"1f69c",uc_match:"1f69c",uc_greedy:"1f69c",shortnames:[],category:"travel"},":traffic_light:":{uc_base:"1f6a5",uc_output:"1f6a5",uc_match:"1f6a5",uc_greedy:"1f6a5",shortnames:[],category:"travel"},":train2:":{uc_base:"1f686",uc_output:"1f686",uc_match:"1f686",uc_greedy:"1f686",shortnames:[],category:"travel"},":train:":{uc_base:"1f68b",uc_output:"1f68b",uc_match:"1f68b",uc_greedy:"1f68b",shortnames:[],category:"travel"},":tram:":{uc_base:"1f68a",uc_output:"1f68a",uc_match:"1f68a",uc_greedy:"1f68a",shortnames:[],category:"travel"},":triangular_flag_on_post:":{uc_base:"1f6a9",uc_output:"1f6a9",uc_match:"1f6a9",uc_greedy:"1f6a9",shortnames:[],category:"flags"},":triangular_ruler:":{uc_base:"1f4d0",uc_output:"1f4d0",uc_match:"1f4d0",uc_greedy:"1f4d0",shortnames:[],category:"objects"},":trident:":{uc_base:"1f531",uc_output:"1f531",uc_match:"1f531",uc_greedy:"1f531",shortnames:[],category:"symbols"},":triumph:":{uc_base:"1f624",uc_output:"1f624",uc_match:"1f624",uc_greedy:"1f624",shortnames:[],category:"people"},":trolleybus:":{uc_base:"1f68e",uc_output:"1f68e",uc_match:"1f68e",uc_greedy:"1f68e",shortnames:[],category:"travel"},":trophy:":{uc_base:"1f3c6",uc_output:"1f3c6",uc_match:"1f3c6-fe0f",uc_greedy:"1f3c6-fe0f",shortnames:[],category:"activity"},":tropical_drink:":{uc_base:"1f379",uc_output:"1f379",uc_match:"1f379",uc_greedy:"1f379",shortnames:[],category:"food"},":tropical_fish:":{uc_base:"1f420",uc_output:"1f420",uc_match:"1f420",uc_greedy:"1f420",shortnames:[],category:"nature"},":truck:":{uc_base:"1f69a",uc_output:"1f69a",uc_match:"1f69a",uc_greedy:"1f69a",shortnames:[],category:"travel"},":trumpet:":{uc_base:"1f3ba",uc_output:"1f3ba",uc_match:"1f3ba",uc_greedy:"1f3ba",shortnames:[],category:"activity"},":tulip:":{uc_base:"1f337",uc_output:"1f337",uc_match:"1f337",uc_greedy:"1f337",shortnames:[],category:"nature"},":tumbler_glass:":{uc_base:"1f943",uc_output:"1f943",uc_match:"1f943",uc_greedy:"1f943",shortnames:[":whisky:"],category:"food"},":turkey:":{uc_base:"1f983",uc_output:"1f983",uc_match:"1f983",uc_greedy:"1f983",shortnames:[],category:"nature"},":turtle:":{uc_base:"1f422",uc_output:"1f422",uc_match:"1f422",uc_greedy:"1f422",shortnames:[],category:"nature"},":tv:":{uc_base:"1f4fa",uc_output:"1f4fa",uc_match:"1f4fa-fe0f",uc_greedy:"1f4fa-fe0f",shortnames:[],category:"objects"},":twisted_rightwards_arrows:":{uc_base:"1f500",uc_output:"1f500",uc_match:"1f500",uc_greedy:"1f500",shortnames:[],category:"symbols"},":two_hearts:":{uc_base:"1f495",uc_output:"1f495",uc_match:"1f495",uc_greedy:"1f495",shortnames:[],category:"symbols"},":two_men_holding_hands:":{uc_base:"1f46c",uc_output:"1f46c",uc_match:"1f46c",uc_greedy:"1f46c",shortnames:[],category:"people"},":two_women_holding_hands:":{uc_base:"1f46d",uc_output:"1f46d",uc_match:"1f46d",uc_greedy:"1f46d",shortnames:[],category:"people"},":u5272:":{uc_base:"1f239",uc_output:"1f239",uc_match:"1f239",uc_greedy:"1f239",shortnames:[],category:"symbols"},":u5408:":{uc_base:"1f234",uc_output:"1f234",uc_match:"1f234",uc_greedy:"1f234",shortnames:[],category:"symbols"},":u55b6:":{uc_base:"1f23a",uc_output:"1f23a",uc_match:"1f23a",uc_greedy:"1f23a",shortnames:[],category:"symbols"},":u6307:":{uc_base:"1f22f",uc_output:"1f22f",uc_match:"1f22f-fe0f",uc_greedy:"1f22f-fe0f",shortnames:[],category:"symbols"},":u6708:":{uc_base:"1f237",uc_output:"1f237",uc_match:"1f237-fe0f",uc_greedy:"1f237-fe0f",shortnames:[],category:"symbols"},":u6709:":{uc_base:"1f236",uc_output:"1f236",uc_match:"1f236",uc_greedy:"1f236",shortnames:[],category:"symbols"},":u6e80:":{uc_base:"1f235",uc_output:"1f235",uc_match:"1f235",uc_greedy:"1f235",shortnames:[],category:"symbols"},":u7121:":{uc_base:"1f21a",uc_output:"1f21a",uc_match:"1f21a-fe0f",uc_greedy:"1f21a-fe0f",shortnames:[],category:"symbols"},":u7533:":{uc_base:"1f238",uc_output:"1f238",uc_match:"1f238",uc_greedy:"1f238",shortnames:[],category:"symbols"},":u7981:":{uc_base:"1f232",uc_output:"1f232",uc_match:"1f232",uc_greedy:"1f232",shortnames:[],category:"symbols"},":u7a7a:":{uc_base:"1f233",uc_output:"1f233",uc_match:"1f233",uc_greedy:"1f233",shortnames:[],category:"symbols"},":unamused:":{uc_base:"1f612",uc_output:"1f612",uc_match:"1f612",uc_greedy:"1f612",shortnames:[],category:"people"},":underage:":{uc_base:"1f51e",uc_output:"1f51e",uc_match:"1f51e",uc_greedy:"1f51e",shortnames:[],category:"symbols"},":unicorn:":{uc_base:"1f984",uc_output:"1f984",uc_match:"1f984",uc_greedy:"1f984",shortnames:[":unicorn_face:"],category:"nature"},":unlock:":{uc_base:"1f513",uc_output:"1f513",uc_match:"1f513-fe0f",uc_greedy:"1f513-fe0f",shortnames:[],category:"objects"},":up:":{uc_base:"1f199",uc_output:"1f199",uc_match:"1f199",uc_greedy:"1f199",shortnames:[],category:"symbols"},":upside_down:":{uc_base:"1f643",uc_output:"1f643",uc_match:"1f643",uc_greedy:"1f643",shortnames:[":upside_down_face:"],category:"people"},":vampire:":{uc_base:"1f9db",uc_output:"1f9db",uc_match:"1f9db",uc_greedy:"1f9db",shortnames:[],category:"people"},":vertical_traffic_light:":{uc_base:"1f6a6",uc_output:"1f6a6",uc_match:"1f6a6",uc_greedy:"1f6a6",shortnames:[],category:"travel"},":vhs:":{uc_base:"1f4fc",uc_output:"1f4fc",uc_match:"1f4fc",uc_greedy:"1f4fc",shortnames:[],category:"objects"},":vibration_mode:":{uc_base:"1f4f3",uc_output:"1f4f3",uc_match:"1f4f3",uc_greedy:"1f4f3",shortnames:[],category:"symbols"},":video_camera:":{uc_base:"1f4f9",uc_output:"1f4f9",uc_match:"1f4f9-fe0f",uc_greedy:"1f4f9-fe0f",shortnames:[],category:"objects"},":video_game:":{uc_base:"1f3ae",uc_output:"1f3ae",uc_match:"1f3ae-fe0f",uc_greedy:"1f3ae-fe0f",shortnames:[],category:"activity"},":violin:":{uc_base:"1f3bb",uc_output:"1f3bb",uc_match:"1f3bb",uc_greedy:"1f3bb",shortnames:[],category:"activity"},":volcano:":{uc_base:"1f30b",uc_output:"1f30b",uc_match:"1f30b",uc_greedy:"1f30b",shortnames:[],category:"travel"},":volleyball:":{uc_base:"1f3d0",uc_output:"1f3d0",uc_match:"1f3d0",uc_greedy:"1f3d0",shortnames:[],category:"activity"},":vs:":{uc_base:"1f19a",uc_output:"1f19a",uc_match:"1f19a",uc_greedy:"1f19a",shortnames:[],category:"symbols"},":vulcan:":{uc_base:"1f596",uc_output:"1f596",uc_match:"1f596",uc_greedy:"1f596",shortnames:[":raised_hand_with_part_between_middle_and_ring_fingers:"],category:"people"},":waning_crescent_moon:":{uc_base:"1f318",uc_output:"1f318",uc_match:"1f318",uc_greedy:"1f318",shortnames:[],category:"nature"},":waning_gibbous_moon:":{uc_base:"1f316",uc_output:"1f316",uc_match:"1f316",uc_greedy:"1f316",shortnames:[],category:"nature"},":wastebasket:":{uc_base:"1f5d1",uc_output:"1f5d1",uc_match:"1f5d1-fe0f",uc_greedy:"1f5d1-fe0f",shortnames:[],category:"objects"},":water_buffalo:":{uc_base:"1f403",uc_output:"1f403",uc_match:"1f403",uc_greedy:"1f403",shortnames:[],category:"nature"},":watermelon:":{uc_base:"1f349",uc_output:"1f349",uc_match:"1f349",uc_greedy:"1f349",shortnames:[],category:"food"},":wave:":{uc_base:"1f44b",uc_output:"1f44b",uc_match:"1f44b",uc_greedy:"1f44b",shortnames:[],category:"people"},":waxing_crescent_moon:":{uc_base:"1f312",uc_output:"1f312",uc_match:"1f312",uc_greedy:"1f312",shortnames:[],category:"nature"},":waxing_gibbous_moon:":{uc_base:"1f314",uc_output:"1f314",uc_match:"1f314",uc_greedy:"1f314",shortnames:[],category:"nature"},":wc:":{uc_base:"1f6be",uc_output:"1f6be",uc_match:"1f6be",uc_greedy:"1f6be",shortnames:[],category:"symbols"},":weary:":{uc_base:"1f629",uc_output:"1f629",uc_match:"1f629",uc_greedy:"1f629",shortnames:[],category:"people"},":wedding:":{uc_base:"1f492",uc_output:"1f492",uc_match:"1f492",uc_greedy:"1f492",shortnames:[],category:"travel"},":whale2:":{uc_base:"1f40b",uc_output:"1f40b",uc_match:"1f40b",uc_greedy:"1f40b",shortnames:[],category:"nature"},":whale:":{uc_base:"1f433",uc_output:"1f433",uc_match:"1f433",uc_greedy:"1f433",shortnames:[],category:"nature"},":white_flower:":{uc_base:"1f4ae",uc_output:"1f4ae",uc_match:"1f4ae",uc_greedy:"1f4ae",shortnames:[],category:"symbols"},":white_haired:":{uc_base:"1f9b3",uc_output:"1f9b3",uc_match:"1f9b3",uc_greedy:"1f9b3",shortnames:[],category:"people"},":white_square_button:":{uc_base:"1f533",uc_output:"1f533",uc_match:"1f533",uc_greedy:"1f533",shortnames:[],category:"symbols"},":white_sun_cloud:":{uc_base:"1f325",uc_output:"1f325",uc_match:"1f325-fe0f",uc_greedy:"1f325-fe0f",shortnames:[":white_sun_behind_cloud:"],category:"nature"},":white_sun_rain_cloud:":{uc_base:"1f326",uc_output:"1f326",uc_match:"1f326-fe0f",uc_greedy:"1f326-fe0f",shortnames:[":white_sun_behind_cloud_with_rain:"],category:"nature"},":white_sun_small_cloud:":{uc_base:"1f324",uc_output:"1f324",uc_match:"1f324-fe0f",uc_greedy:"1f324-fe0f",shortnames:[":white_sun_with_small_cloud:"],category:"nature"},":wilted_rose:":{uc_base:"1f940",uc_output:"1f940",uc_match:"1f940",uc_greedy:"1f940",shortnames:[":wilted_flower:"],category:"nature"},":wind_blowing_face:":{uc_base:"1f32c",uc_output:"1f32c",uc_match:"1f32c-fe0f",uc_greedy:"1f32c-fe0f",shortnames:[],category:"nature"},":wind_chime:":{uc_base:"1f390",uc_output:"1f390",uc_match:"1f390",uc_greedy:"1f390",shortnames:[],category:"objects"},":wine_glass:":{uc_base:"1f377",uc_output:"1f377",uc_match:"1f377",uc_greedy:"1f377",shortnames:[],category:"food"},":wink:":{uc_base:"1f609",uc_output:"1f609",uc_match:"1f609",uc_greedy:"1f609",shortnames:[],category:"people"},":wolf:":{uc_base:"1f43a",uc_output:"1f43a",uc_match:"1f43a",uc_greedy:"1f43a",shortnames:[],category:"nature"},":woman:":{uc_base:"1f469",uc_output:"1f469",uc_match:"1f469",uc_greedy:"1f469",shortnames:[],category:"people"},":woman_with_headscarf:":{uc_base:"1f9d5",uc_output:"1f9d5",uc_match:"1f9d5",uc_greedy:"1f9d5",shortnames:[],category:"people"},":womans_clothes:":{uc_base:"1f45a",uc_output:"1f45a",uc_match:"1f45a",uc_greedy:"1f45a",shortnames:[],category:"people"},":womans_flat_shoe:":{uc_base:"1f97f",uc_output:"1f97f",uc_match:"1f97f",uc_greedy:"1f97f",shortnames:[],category:"people"},":womans_hat:":{uc_base:"1f452",uc_output:"1f452",uc_match:"1f452",uc_greedy:"1f452",shortnames:[],category:"people"},":womens:":{uc_base:"1f6ba",uc_output:"1f6ba",uc_match:"1f6ba-fe0f",uc_greedy:"1f6ba-fe0f",shortnames:[],category:"symbols"},":woozy_face:":{uc_base:"1f974",uc_output:"1f974",uc_match:"1f974",uc_greedy:"1f974",shortnames:[],category:"people"},":worried:":{uc_base:"1f61f",uc_output:"1f61f",uc_match:"1f61f",uc_greedy:"1f61f",shortnames:[],category:"people"},":wrench:":{uc_base:"1f527",uc_output:"1f527",uc_match:"1f527",uc_greedy:"1f527",shortnames:[],category:"objects"},":yarn:":{uc_base:"1f9f6",uc_output:"1f9f6",uc_match:"1f9f6",uc_greedy:"1f9f6",shortnames:[],category:"objects"},":yellow_heart:":{uc_base:"1f49b",uc_output:"1f49b",uc_match:"1f49b",uc_greedy:"1f49b",shortnames:[],category:"symbols"},":yen:":{uc_base:"1f4b4",uc_output:"1f4b4",uc_match:"1f4b4",uc_greedy:"1f4b4",shortnames:[],category:"objects"},":yum:":{uc_base:"1f60b",uc_output:"1f60b",uc_match:"1f60b",uc_greedy:"1f60b",shortnames:[],category:"people"},":zany_face:":{uc_base:"1f92a",uc_output:"1f92a",uc_match:"1f92a",uc_greedy:"1f92a",shortnames:[],category:"people"},":zebra:":{uc_base:"1f993",uc_output:"1f993",uc_match:"1f993",uc_greedy:"1f993",shortnames:[],category:"nature"},":zipper_mouth:":{uc_base:"1f910",uc_output:"1f910",uc_match:"1f910",uc_greedy:"1f910",shortnames:[":zipper_mouth_face:"],category:"people"},":zombie:":{uc_base:"1f9df",uc_output:"1f9df",uc_match:"1f9df",uc_greedy:"1f9df",shortnames:[],category:"people"},":zzz:":{uc_base:"1f4a4",uc_output:"1f4a4",uc_match:"1f4a4",uc_greedy:"1f4a4",shortnames:[],category:"symbols"},":airplane:":{uc_base:"2708",uc_output:"2708",uc_match:"2708-fe0f",uc_greedy:"2708-fe0f",shortnames:[],category:"travel"},":alarm_clock:":{uc_base:"23f0",uc_output:"23f0",uc_match:"23f0",uc_greedy:"23f0",shortnames:[],category:"objects"},":alembic:":{uc_base:"2697",uc_output:"2697",uc_match:"2697-fe0f",uc_greedy:"2697-fe0f",shortnames:[],category:"objects"},":anchor:":{uc_base:"2693",uc_output:"2693",uc_match:"2693-fe0f",uc_greedy:"2693-fe0f",shortnames:[],category:"travel"},":aquarius:":{uc_base:"2652",uc_output:"2652",uc_match:"2652-fe0f",uc_greedy:"2652-fe0f",shortnames:[],category:"symbols"},":aries:":{uc_base:"2648",uc_output:"2648",uc_match:"2648-fe0f",uc_greedy:"2648-fe0f",shortnames:[],category:"symbols"},":arrow_backward:":{uc_base:"25c0",uc_output:"25c0",uc_match:"25c0-fe0f",uc_greedy:"25c0",shortnames:[],category:"symbols"},":arrow_double_down:":{uc_base:"23ec",uc_output:"23ec",uc_match:"23ec",uc_greedy:"23ec",shortnames:[],category:"symbols"},":arrow_double_up:":{uc_base:"23eb",uc_output:"23eb",uc_match:"23eb",uc_greedy:"23eb",shortnames:[],category:"symbols"},":arrow_down:":{uc_base:"2b07",uc_output:"2b07",uc_match:"2b07-fe0f",uc_greedy:"2b07",shortnames:[],category:"symbols"},":arrow_forward:":{uc_base:"25b6",uc_output:"25b6",uc_match:"25b6-fe0f",uc_greedy:"25b6",shortnames:[],category:"symbols"},":arrow_heading_down:":{uc_base:"2935",uc_output:"2935",uc_match:"2935-fe0f",uc_greedy:"2935",shortnames:[],category:"symbols"},":arrow_heading_up:":{uc_base:"2934",uc_output:"2934",uc_match:"2934-fe0f",uc_greedy:"2934",shortnames:[],category:"symbols"},":arrow_left:":{uc_base:"2b05",uc_output:"2b05",uc_match:"2b05-fe0f",uc_greedy:"2b05",shortnames:[],category:"symbols"},":arrow_lower_left:":{uc_base:"2199",uc_output:"2199",uc_match:"2199-fe0f",uc_greedy:"2199",shortnames:[],category:"symbols"},":arrow_lower_right:":{uc_base:"2198",uc_output:"2198",uc_match:"2198-fe0f",uc_greedy:"2198",shortnames:[],category:"symbols"},":arrow_right:":{uc_base:"27a1",uc_output:"27a1",uc_match:"27a1-fe0f",uc_greedy:"27a1",shortnames:[],category:"symbols"},":arrow_right_hook:":{uc_base:"21aa",uc_output:"21aa",uc_match:"21aa-fe0f",uc_greedy:"21aa",shortnames:[],category:"symbols"},":arrow_up:":{uc_base:"2b06",uc_output:"2b06",uc_match:"2b06-fe0f",uc_greedy:"2b06",shortnames:[],category:"symbols"},":arrow_up_down:":{uc_base:"2195",uc_output:"2195",uc_match:"2195-fe0f",uc_greedy:"2195",shortnames:[],category:"symbols"},":arrow_upper_left:":{uc_base:"2196",uc_output:"2196",uc_match:"2196-fe0f",uc_greedy:"2196",shortnames:[],category:"symbols"},":arrow_upper_right:":{uc_base:"2197",uc_output:"2197",uc_match:"2197-fe0f",uc_greedy:"2197",shortnames:[],category:"symbols"},":atom:":{uc_base:"269b",uc_output:"269b",uc_match:"269b-fe0f",uc_greedy:"269b",shortnames:[":atom_symbol:"],category:"symbols"},":ballot_box_with_check:":{uc_base:"2611",uc_output:"2611",uc_match:"2611-fe0f",uc_greedy:"2611",shortnames:[],category:"symbols"},":bangbang:":{uc_base:"203c",uc_output:"203c",uc_match:"203c-fe0f",uc_greedy:"203c",shortnames:[],category:"symbols"},":baseball:":{uc_base:"26be",uc_output:"26be",uc_match:"26be-fe0f",uc_greedy:"26be-fe0f",shortnames:[],category:"activity"},":beach_umbrella:":{uc_base:"26f1",uc_output:"26f1",uc_match:"26f1-fe0f",uc_greedy:"26f1-fe0f",shortnames:[":umbrella_on_ground:"],category:"travel"},":biohazard:":{uc_base:"2623",uc_output:"2623",uc_match:"2623-fe0f",uc_greedy:"2623",shortnames:[":biohazard_sign:"],category:"symbols"},":black_circle:":{uc_base:"26ab",uc_output:"26ab",uc_match:"26ab-fe0f",uc_greedy:"26ab-fe0f",shortnames:[],category:"symbols"},":black_large_square:":{uc_base:"2b1b",uc_output:"2b1b",uc_match:"2b1b-fe0f",uc_greedy:"2b1b-fe0f",shortnames:[],category:"symbols"},":black_medium_small_square:":{uc_base:"25fe",uc_output:"25fe",uc_match:"25fe-fe0f",uc_greedy:"25fe-fe0f",shortnames:[],category:"symbols"},":black_medium_square:":{uc_base:"25fc",uc_output:"25fc",uc_match:"25fc-fe0f",uc_greedy:"25fc",shortnames:[],category:"symbols"},":black_nib:":{uc_base:"2712",uc_output:"2712",uc_match:"2712-fe0f",uc_greedy:"2712-fe0f",shortnames:[],category:"objects"},":black_small_square:":{uc_base:"25aa",uc_output:"25aa",uc_match:"25aa-fe0f",uc_greedy:"25aa",shortnames:[],category:"symbols"},":cancer:":{uc_base:"264b",uc_output:"264b",uc_match:"264b-fe0f",uc_greedy:"264b-fe0f",shortnames:[],category:"symbols"},":capricorn:":{uc_base:"2651",uc_output:"2651",uc_match:"2651-fe0f",uc_greedy:"2651-fe0f",shortnames:[],category:"symbols"},":chains:":{uc_base:"26d3",uc_output:"26d3",uc_match:"26d3-fe0f",uc_greedy:"26d3-fe0f",shortnames:[],category:"objects"},":church:":{uc_base:"26ea",uc_output:"26ea",uc_match:"26ea-fe0f",uc_greedy:"26ea-fe0f",shortnames:[],category:"travel"},":cloud:":{uc_base:"2601",uc_output:"2601",uc_match:"2601-fe0f",uc_greedy:"2601-fe0f",shortnames:[],category:"nature"},":clubs:":{uc_base:"2663",uc_output:"2663",uc_match:"2663-fe0f",uc_greedy:"2663-fe0f",shortnames:[],category:"symbols"},":coffee:":{uc_base:"2615",uc_output:"2615",uc_match:"2615-fe0f",uc_greedy:"2615-fe0f",shortnames:[],category:"food"},":coffin:":{uc_base:"26b0",uc_output:"26b0",uc_match:"26b0-fe0f",uc_greedy:"26b0-fe0f",shortnames:[],category:"objects"},":comet:":{uc_base:"2604",uc_output:"2604",uc_match:"2604-fe0f",uc_greedy:"2604-fe0f",shortnames:[],category:"nature"},":congratulations:":{uc_base:"3297",uc_output:"3297",uc_match:"3297-fe0f",uc_greedy:"3297-fe0f",shortnames:[],category:"symbols"},":cross:":{uc_base:"271d",uc_output:"271d",uc_match:"271d-fe0f",uc_greedy:"271d",shortnames:[":latin_cross:"],category:"symbols"},":crossed_swords:":{uc_base:"2694",uc_output:"2694",uc_match:"2694-fe0f",uc_greedy:"2694-fe0f",shortnames:[],category:"objects"},":curly_loop:":{uc_base:"27b0",uc_output:"27b0",uc_match:"27b0",uc_greedy:"27b0",shortnames:[],category:"symbols"},":diamonds:":{uc_base:"2666",uc_output:"2666",uc_match:"2666-fe0f",uc_greedy:"2666-fe0f",shortnames:[],category:"symbols"},":eight_pointed_black_star:":{uc_base:"2734",uc_output:"2734",uc_match:"2734-fe0f",uc_greedy:"2734-fe0f",shortnames:[],category:"symbols"},":eight_spoked_asterisk:":{uc_base:"2733",uc_output:"2733",uc_match:"2733-fe0f",uc_greedy:"2733-fe0f",shortnames:[],category:"symbols"},":eject:":{uc_base:"23cf",uc_output:"23cf",uc_match:"23cf-fe0f",uc_greedy:"23cf",shortnames:[":eject_symbol:"],category:"symbols"},":envelope:":{uc_base:"2709",uc_output:"2709",uc_match:"2709-fe0f",uc_greedy:"2709-fe0f",shortnames:[],category:"objects"},":exclamation:":{uc_base:"2757",uc_output:"2757",uc_match:"2757-fe0f",uc_greedy:"2757-fe0f",shortnames:[],category:"symbols"},":fast_forward:":{uc_base:"23e9",uc_output:"23e9",uc_match:"23e9-fe0f",uc_greedy:"23e9-fe0f",shortnames:[],category:"symbols"},":female_sign:":{uc_base:"2640",uc_output:"2640",uc_match:"2640-fe0f",uc_greedy:"2640",shortnames:[],category:"symbols"},":ferry:":{uc_base:"26f4",uc_output:"26f4",uc_match:"26f4-fe0f",uc_greedy:"26f4-fe0f",shortnames:[],category:"travel"},":fist:":{uc_base:"270a",uc_output:"270a",uc_match:"270a",uc_greedy:"270a",shortnames:[],category:"people"},":fleur-de-lis:":{uc_base:"269c",uc_output:"269c",uc_match:"269c-fe0f",uc_greedy:"269c-fe0f",shortnames:[],category:"symbols"},":fountain:":{uc_base:"26f2",uc_output:"26f2",uc_match:"26f2-fe0f",uc_greedy:"26f2-fe0f",shortnames:[],category:"travel"},":frowning2:":{uc_base:"2639",uc_output:"2639",uc_match:"2639-fe0f",uc_greedy:"2639-fe0f",shortnames:[":white_frowning_face:"],category:"people"},":fuelpump:":{uc_base:"26fd",uc_output:"26fd",uc_match:"26fd-fe0f",uc_greedy:"26fd-fe0f",shortnames:[],category:"travel"},":gear:":{uc_base:"2699",uc_output:"2699",uc_match:"2699-fe0f",uc_greedy:"2699-fe0f",shortnames:[],category:"objects"},":gemini:":{uc_base:"264a",uc_output:"264a",uc_match:"264a-fe0f",uc_greedy:"264a-fe0f",shortnames:[],category:"symbols"},":golf:":{uc_base:"26f3",uc_output:"26f3",uc_match:"26f3-fe0f",uc_greedy:"26f3-fe0f",shortnames:[],category:"activity"},":grey_exclamation:":{uc_base:"2755",uc_output:"2755",uc_match:"2755",uc_greedy:"2755",shortnames:[],category:"symbols"},":grey_question:":{uc_base:"2754",uc_output:"2754",uc_match:"2754",uc_greedy:"2754",shortnames:[],category:"symbols"},":hammer_pick:":{uc_base:"2692",uc_output:"2692",uc_match:"2692-fe0f",uc_greedy:"2692-fe0f",shortnames:[":hammer_and_pick:"],category:"objects"},":heart:":{uc_base:"2764",uc_output:"2764",uc_match:"2764-fe0f",uc_greedy:"2764-fe0f",shortnames:[],category:"symbols"},":heart_exclamation:":{uc_base:"2763",uc_output:"2763",uc_match:"2763-fe0f",uc_greedy:"2763-fe0f",shortnames:[":heavy_heart_exclamation_mark_ornament:"],category:"symbols"},":hearts:":{uc_base:"2665",uc_output:"2665",uc_match:"2665-fe0f",uc_greedy:"2665-fe0f",shortnames:[],category:"symbols"},":heavy_check_mark:":{uc_base:"2714",uc_output:"2714",uc_match:"2714-fe0f",uc_greedy:"2714",shortnames:[],category:"symbols"},":heavy_division_sign:":{uc_base:"2797",uc_output:"2797",uc_match:"2797",uc_greedy:"2797",shortnames:[],category:"symbols"},":heavy_minus_sign:":{uc_base:"2796",uc_output:"2796",uc_match:"2796",uc_greedy:"2796",shortnames:[],category:"symbols"},":heavy_multiplication_x:":{uc_base:"2716",uc_output:"2716",uc_match:"2716-fe0f",uc_greedy:"2716",shortnames:[],category:"symbols"},":heavy_plus_sign:":{uc_base:"2795",uc_output:"2795",uc_match:"2795",uc_greedy:"2795",shortnames:[],category:"symbols"},":helmet_with_cross:":{uc_base:"26d1",uc_output:"26d1",uc_match:"26d1-fe0f",uc_greedy:"26d1-fe0f",shortnames:[":helmet_with_white_cross:"],category:"people"},":hotsprings:":{uc_base:"2668",uc_output:"2668",uc_match:"2668-fe0f",uc_greedy:"2668-fe0f",shortnames:[],category:"symbols"},":hourglass:":{uc_base:"231b",uc_output:"231b",uc_match:"231b-fe0f",uc_greedy:"231b-fe0f",shortnames:[],category:"objects"},":hourglass_flowing_sand:":{uc_base:"23f3",uc_output:"23f3",uc_match:"23f3-fe0f",uc_greedy:"23f3-fe0f",shortnames:[],category:"objects"},":ice_skate:":{uc_base:"26f8",uc_output:"26f8",uc_match:"26f8-fe0f",uc_greedy:"26f8-fe0f",shortnames:[],category:"activity"},":information_source:":{uc_base:"2139",uc_output:"2139",uc_match:"2139-fe0f",uc_greedy:"2139",shortnames:[],category:"symbols"},":interrobang:":{uc_base:"2049",uc_output:"2049",uc_match:"2049-fe0f",uc_greedy:"2049",shortnames:[],category:"symbols"},":keyboard:":{uc_base:"2328",uc_output:"2328",uc_match:"2328-fe0f",uc_greedy:"2328-fe0f",shortnames:[],category:"objects"},":left_right_arrow:":{uc_base:"2194",uc_output:"2194",uc_match:"2194-fe0f",uc_greedy:"2194",shortnames:[],category:"symbols"},":leftwards_arrow_with_hook:":{uc_base:"21a9",uc_output:"21a9",uc_match:"21a9-fe0f",uc_greedy:"21a9",shortnames:[],category:"symbols"},":leo:":{uc_base:"264c",uc_output:"264c",uc_match:"264c-fe0f",uc_greedy:"264c-fe0f",shortnames:[],category:"symbols"},":libra:":{uc_base:"264e",uc_output:"264e",uc_match:"264e-fe0f",uc_greedy:"264e-fe0f",shortnames:[],category:"symbols"},":loop:":{uc_base:"27bf",uc_output:"27bf",uc_match:"27bf",uc_greedy:"27bf",shortnames:[],category:"symbols"},":m:":{uc_base:"24c2",uc_output:"24c2",uc_match:"24c2-fe0f",uc_greedy:"24c2-fe0f",shortnames:[],category:"symbols"},":male_sign:":{uc_base:"2642",uc_output:"2642",uc_match:"2642-fe0f",uc_greedy:"2642",shortnames:[],category:"symbols"},":medical_symbol:":{uc_base:"2695",uc_output:"2695",uc_match:"2695-fe0f",uc_greedy:"2695",shortnames:[],category:"symbols"},":mountain:":{uc_base:"26f0",uc_output:"26f0",uc_match:"26f0-fe0f",uc_greedy:"26f0-fe0f",shortnames:[],category:"travel"},":negative_squared_cross_mark:":{uc_base:"274e",uc_output:"274e",uc_match:"274e",uc_greedy:"274e",shortnames:[],category:"symbols"},":no_entry:":{uc_base:"26d4",uc_output:"26d4",uc_match:"26d4-fe0f",uc_greedy:"26d4-fe0f",shortnames:[],category:"symbols"},":o:":{uc_base:"2b55",uc_output:"2b55",uc_match:"2b55-fe0f",uc_greedy:"2b55-fe0f",shortnames:[],category:"symbols"},":ophiuchus:":{uc_base:"26ce",uc_output:"26ce",uc_match:"26ce",uc_greedy:"26ce",shortnames:[],category:"symbols"},":orthodox_cross:":{uc_base:"2626",uc_output:"2626",uc_match:"2626-fe0f",uc_greedy:"2626",shortnames:[],category:"symbols"},":part_alternation_mark:":{uc_base:"303d",uc_output:"303d",uc_match:"303d-fe0f",uc_greedy:"303d-fe0f",shortnames:[],category:"symbols"},":partly_sunny:":{uc_base:"26c5",uc_output:"26c5",uc_match:"26c5-fe0f",uc_greedy:"26c5-fe0f",shortnames:[],category:"nature"},":pause_button:":{uc_base:"23f8",uc_output:"23f8",uc_match:"23f8-fe0f",uc_greedy:"23f8",shortnames:[":double_vertical_bar:"],category:"symbols"},":peace:":{uc_base:"262e",uc_output:"262e",uc_match:"262e-fe0f",uc_greedy:"262e",shortnames:[":peace_symbol:"],category:"symbols"},":pencil2:":{uc_base:"270f",uc_output:"270f",uc_match:"270f-fe0f",uc_greedy:"270f-fe0f",shortnames:[],category:"objects"},":person_bouncing_ball:":{uc_base:"26f9",uc_output:"26f9",uc_match:"26f9-fe0f",uc_greedy:"26f9-fe0f",shortnames:[":basketball_player:",":person_with_ball:"],category:"activity"},":pick:":{uc_base:"26cf",uc_output:"26cf",uc_match:"26cf-fe0f",uc_greedy:"26cf-fe0f",shortnames:[],category:"objects"},":pisces:":{uc_base:"2653",uc_output:"2653",uc_match:"2653-fe0f",uc_greedy:"2653-fe0f",shortnames:[],category:"symbols"},":play_pause:":{uc_base:"23ef",uc_output:"23ef",uc_match:"23ef-fe0f",uc_greedy:"23ef",shortnames:[],category:"symbols"},":point_up:":{uc_base:"261d",uc_output:"261d",uc_match:"261d-fe0f",uc_greedy:"261d-fe0f",shortnames:[],category:"people"},":question:":{uc_base:"2753",uc_output:"2753",uc_match:"2753-fe0f",uc_greedy:"2753-fe0f",shortnames:[],category:"symbols"},":radioactive:":{uc_base:"2622",uc_output:"2622",uc_match:"2622-fe0f",uc_greedy:"2622",shortnames:[":radioactive_sign:"],category:"symbols"},":raised_hand:":{uc_base:"270b",uc_output:"270b",uc_match:"270b",uc_greedy:"270b",shortnames:[],category:"people"},":record_button:":{uc_base:"23fa",uc_output:"23fa",uc_match:"23fa-fe0f",uc_greedy:"23fa",shortnames:[],category:"symbols"},":recycle:":{uc_base:"267b",uc_output:"267b",uc_match:"267b-fe0f",uc_greedy:"267b-fe0f",shortnames:[],category:"symbols"},":relaxed:":{uc_base:"263a",uc_output:"263a",uc_match:"263a-fe0f",uc_greedy:"263a-fe0f",shortnames:[],category:"people"},":rewind:":{uc_base:"23ea",uc_output:"23ea",uc_match:"23ea-fe0f",uc_greedy:"23ea-fe0f",shortnames:[],category:"symbols"},":sagittarius:":{uc_base:"2650",uc_output:"2650",uc_match:"2650-fe0f",uc_greedy:"2650-fe0f",shortnames:[],category:"symbols"},":sailboat:":{uc_base:"26f5",uc_output:"26f5",uc_match:"26f5-fe0f",uc_greedy:"26f5-fe0f",shortnames:[],category:"travel"},":scales:":{uc_base:"2696",uc_output:"2696",uc_match:"2696-fe0f",uc_greedy:"2696-fe0f",shortnames:[],category:"objects"},":scissors:":{uc_base:"2702",uc_output:"2702",uc_match:"2702-fe0f",uc_greedy:"2702-fe0f",shortnames:[],category:"objects"},":scorpius:":{uc_base:"264f",uc_output:"264f",uc_match:"264f-fe0f",uc_greedy:"264f-fe0f",shortnames:[],category:"symbols"},":secret:":{uc_base:"3299",uc_output:"3299",uc_match:"3299-fe0f",uc_greedy:"3299-fe0f",shortnames:[],category:"symbols"},":shamrock:":{uc_base:"2618",uc_output:"2618",uc_match:"2618-fe0f",uc_greedy:"2618-fe0f",shortnames:[],category:"nature"},":shinto_shrine:":{uc_base:"26e9",uc_output:"26e9",uc_match:"26e9-fe0f",uc_greedy:"26e9-fe0f",shortnames:[],category:"travel"},":skier:":{uc_base:"26f7",uc_output:"26f7",uc_match:"26f7-fe0f",uc_greedy:"26f7-fe0f",shortnames:[],category:"activity"},":skull_crossbones:":{uc_base:"2620",uc_output:"2620",uc_match:"2620-fe0f",uc_greedy:"2620-fe0f",shortnames:[":skull_and_crossbones:"],category:"people"},":snowflake:":{uc_base:"2744",uc_output:"2744",uc_match:"2744-fe0f",uc_greedy:"2744-fe0f",shortnames:[],category:"nature"},":snowman2:":{uc_base:"2603",uc_output:"2603",uc_match:"2603-fe0f",uc_greedy:"2603-fe0f",shortnames:[],category:"nature"},":snowman:":{uc_base:"26c4",uc_output:"26c4",uc_match:"26c4-fe0f",uc_greedy:"26c4-fe0f",shortnames:[],category:"nature"},":soccer:":{uc_base:"26bd",uc_output:"26bd",uc_match:"26bd-fe0f",uc_greedy:"26bd-fe0f",shortnames:[],category:"activity"},":spades:":{uc_base:"2660",uc_output:"2660",uc_match:"2660-fe0f",uc_greedy:"2660-fe0f",shortnames:[],category:"symbols"},":sparkle:":{uc_base:"2747",uc_output:"2747",uc_match:"2747-fe0f",uc_greedy:"2747-fe0f",shortnames:[],category:"symbols"},":sparkles:":{uc_base:"2728",uc_output:"2728",uc_match:"2728",uc_greedy:"2728",shortnames:[],category:"nature"},":star:":{uc_base:"2b50",uc_output:"2b50",uc_match:"2b50-fe0f",uc_greedy:"2b50-fe0f",shortnames:[],category:"nature"},":star_and_crescent:":{uc_base:"262a",uc_output:"262a",uc_match:"262a-fe0f",uc_greedy:"262a",shortnames:[],category:"symbols"},":star_of_david:":{uc_base:"2721",uc_output:"2721",uc_match:"2721-fe0f",uc_greedy:"2721",shortnames:[],category:"symbols"},":stop_button:":{uc_base:"23f9",uc_output:"23f9",uc_match:"23f9-fe0f",uc_greedy:"23f9",shortnames:[],category:"symbols"},":stopwatch:":{uc_base:"23f1",uc_output:"23f1",uc_match:"23f1-fe0f",uc_greedy:"23f1-fe0f",shortnames:[],category:"objects"},":sunny:":{uc_base:"2600",uc_output:"2600",uc_match:"2600-fe0f",uc_greedy:"2600-fe0f",shortnames:[],category:"nature"},":taurus:":{uc_base:"2649",uc_output:"2649",uc_match:"2649-fe0f",uc_greedy:"2649-fe0f",shortnames:[],category:"symbols"},":telephone:":{uc_base:"260e",uc_output:"260e",uc_match:"260e-fe0f",uc_greedy:"260e-fe0f",shortnames:[],category:"objects"},":tent:":{uc_base:"26fa",uc_output:"26fa",uc_match:"26fa-fe0f",uc_greedy:"26fa-fe0f",shortnames:[],category:"travel"},":thunder_cloud_rain:":{uc_base:"26c8",uc_output:"26c8",uc_match:"26c8-fe0f",uc_greedy:"26c8-fe0f",shortnames:[":thunder_cloud_and_rain:"],category:"nature"},":timer:":{uc_base:"23f2",uc_output:"23f2",uc_match:"23f2-fe0f",uc_greedy:"23f2-fe0f",shortnames:[":timer_clock:"],category:"objects"},":track_next:":{uc_base:"23ed",uc_output:"23ed",uc_match:"23ed-fe0f",uc_greedy:"23ed",shortnames:[":next_track:"],category:"symbols"},":track_previous:":{uc_base:"23ee",uc_output:"23ee",uc_match:"23ee-fe0f",uc_greedy:"23ee",shortnames:[":previous_track:"],category:"symbols"},":umbrella2:":{uc_base:"2602",uc_output:"2602",uc_match:"2602-fe0f",uc_greedy:"2602-fe0f",shortnames:[],category:"nature"},":umbrella:":{uc_base:"2614",uc_output:"2614",uc_match:"2614-fe0f",uc_greedy:"2614-fe0f",shortnames:[],category:"nature"},":urn:":{uc_base:"26b1",uc_output:"26b1",uc_match:"26b1-fe0f",uc_greedy:"26b1-fe0f",shortnames:[":funeral_urn:"],category:"objects"},":v:":{uc_base:"270c",uc_output:"270c",uc_match:"270c-fe0f",uc_greedy:"270c-fe0f",shortnames:[],category:"people"},":virgo:":{uc_base:"264d",uc_output:"264d",uc_match:"264d-fe0f",uc_greedy:"264d-fe0f",shortnames:[],category:"symbols"},":warning:":{uc_base:"26a0",uc_output:"26a0",uc_match:"26a0-fe0f",uc_greedy:"26a0",shortnames:[],category:"symbols"},":watch:":{uc_base:"231a",uc_output:"231a",uc_match:"231a-fe0f",uc_greedy:"231a-fe0f",shortnames:[],category:"objects"},":wavy_dash:":{uc_base:"3030",uc_output:"3030",uc_match:"3030-fe0f",uc_greedy:"3030",shortnames:[],category:"symbols"},":wheel_of_dharma:":{uc_base:"2638",uc_output:"2638",uc_match:"2638-fe0f",uc_greedy:"2638",shortnames:[],category:"symbols"},":wheelchair:":{uc_base:"267f",uc_output:"267f",uc_match:"267f-fe0f",uc_greedy:"267f-fe0f",shortnames:[],category:"symbols"},":white_check_mark:":{uc_base:"2705",uc_output:"2705",uc_match:"2705",uc_greedy:"2705",shortnames:[],category:"symbols"},":white_circle:":{uc_base:"26aa",uc_output:"26aa",uc_match:"26aa-fe0f",uc_greedy:"26aa-fe0f",shortnames:[],category:"symbols"},":white_large_square:":{uc_base:"2b1c",uc_output:"2b1c",uc_match:"2b1c-fe0f",uc_greedy:"2b1c-fe0f",shortnames:[],category:"symbols"},":white_medium_small_square:":{uc_base:"25fd",uc_output:"25fd",uc_match:"25fd-fe0f",uc_greedy:"25fd-fe0f",shortnames:[],category:"symbols"},":white_medium_square:":{uc_base:"25fb",uc_output:"25fb",uc_match:"25fb-fe0f",uc_greedy:"25fb",shortnames:[],category:"symbols"},":white_small_square:":{uc_base:"25ab",uc_output:"25ab",uc_match:"25ab-fe0f",uc_greedy:"25ab",shortnames:[],category:"symbols"},":writing_hand:":{uc_base:"270d",uc_output:"270d",uc_match:"270d-fe0f",uc_greedy:"270d-fe0f",shortnames:[],category:"people"},":x:":{uc_base:"274c",uc_output:"274c",uc_match:"274c",uc_greedy:"274c",shortnames:[],category:"symbols"},":yin_yang:":{uc_base:"262f",uc_output:"262f",uc_match:"262f-fe0f",uc_greedy:"262f",shortnames:[],category:"symbols"},":zap:":{uc_base:"26a1",uc_output:"26a1",uc_match:"26a1-fe0f",uc_greedy:"26a1-fe0f",shortnames:[],category:"nature"}};var t,e=[];for(t in d.emojioneList)if(d.emojioneList.hasOwnProperty(t)&&""!==t){e.push(t.replace(/[+]/g,"\\$&"));for(var n=0;n<d.emojioneList[t].shortnames.length;n++)e.push(d.emojioneList[t].shortnames[n].replace(/[+]/g,"\\$&"))}d.shortnames=e.join("|"),d.jsEscapeMap={"👩\200d❤️\200d💋\200d👩":"1f469-2764-1f48b-1f469","👨\200d❤️\200d💋\200d👨":"1f468-2764-1f48b-1f468","👩\200d❤️\200d💋\200d👨":"1f469-2764-1f48b-1f468","🏴\e0067\e0062\e0065\e006e\e0067\e007f":"1f3f4-e0067-e0062-e0065-e006e-e0067-e007f","🏴\e0067\e0062\e0073\e0063\e0074\e007f":"1f3f4-e0067-e0062-e0073-e0063-e0074-e007f","🏴\e0067\e0062\e0077\e006c\e0073\e007f":"1f3f4-e0067-e0062-e0077-e006c-e0073-e007f","👨\200d👨\200d👦\200d👦":"1f468-1f468-1f466-1f466","👨\200d👨\200d👧\200d👦":"1f468-1f468-1f467-1f466","👨\200d👨\200d👧\200d👧":"1f468-1f468-1f467-1f467","👨\200d👩\200d👦\200d👦":"1f468-1f469-1f466-1f466","👨\200d👩\200d👧\200d👦":"1f468-1f469-1f467-1f466","👨\200d👩\200d👧\200d👧":"1f468-1f469-1f467-1f467","👩\200d👩\200d👦\200d👦":"1f469-1f469-1f466-1f466","👩\200d👩\200d👧\200d👦":"1f469-1f469-1f467-1f466","👩\200d👩\200d👧\200d👧":"1f469-1f469-1f467-1f467","👨\200d\200d💋\200d👨":"1f468-2764-1f48b-1f468","👩\200d\200d💋\200d👨":"1f469-2764-1f48b-1f468","👩\200d\200d💋\200d👩":"1f469-2764-1f48b-1f469","👩\200d❤️\200d👩":"1f469-2764-1f469","👨\200d❤️\200d👨":"1f468-2764-1f468","👩\200d❤️\200d👨":"1f469-2764-1f468","🕵️🏻\200d♀️":"1f575-1f3fb-2640","🕵️🏻\200d♂️":"1f575-1f3fb-2642","🕵️🏼\200d♀️":"1f575-1f3fc-2640","🕵️🏼\200d♂️":"1f575-1f3fc-2642","🕵️🏽\200d♀️":"1f575-1f3fd-2640","🕵️🏽\200d♂️":"1f575-1f3fd-2642","🕵️🏾\200d♀️":"1f575-1f3fe-2640","🕵️🏾\200d♂️":"1f575-1f3fe-2642","🕵️🏿\200d♀️":"1f575-1f3ff-2640","🕵️🏿\200d♂️":"1f575-1f3ff-2642","🏋️🏻\200d♀️":"1f3cb-1f3fb-2640","🏋️🏻\200d♂️":"1f3cb-1f3fb-2642","🏋️🏼\200d♀️":"1f3cb-1f3fc-2640","🏋️🏼\200d♂️":"1f3cb-1f3fc-2642","🏋️🏽\200d♀️":"1f3cb-1f3fd-2640","🏋️🏽\200d♂️":"1f3cb-1f3fd-2642","🏋️🏾\200d♀️":"1f3cb-1f3fe-2640","🏋️🏾\200d♂️":"1f3cb-1f3fe-2642","🏋️🏿\200d♀️":"1f3cb-1f3ff-2640","🏋️🏿\200d♂️":"1f3cb-1f3ff-2642","🏌️🏻\200d♀️":"1f3cc-1f3fb-2640","🏌️🏻\200d♂️":"1f3cc-1f3fb-2642","🏌️🏼\200d♀️":"1f3cc-1f3fc-2640","🏌️🏼\200d♂️":"1f3cc-1f3fc-2642","🏌️🏽\200d♀️":"1f3cc-1f3fd-2640","🏌️🏽\200d♂️":"1f3cc-1f3fd-2642","🏌️🏾\200d♀️":"1f3cc-1f3fe-2640","🏌️🏾\200d♂️":"1f3cc-1f3fe-2642","🏌️🏿\200d♀️":"1f3cc-1f3ff-2640","🏌️🏿\200d♂️":"1f3cc-1f3ff-2642","⛹️🏻\200d♀️":"26f9-1f3fb-2640","⛹️🏻\200d♂️":"26f9-1f3fb-2642","⛹️🏼\200d♀️":"26f9-1f3fc-2640","⛹️🏼\200d♂️":"26f9-1f3fc-2642","⛹️🏽\200d♀️":"26f9-1f3fd-2640","⛹️🏽\200d♂️":"26f9-1f3fd-2642","⛹️🏾\200d♀️":"26f9-1f3fe-2640","⛹️🏾\200d♂️":"26f9-1f3fe-2642","⛹️🏿\200d♀️":"26f9-1f3ff-2640","⛹️🏿\200d♂️":"26f9-1f3ff-2642","👨\200d👨\200d👦":"1f468-1f468-1f466","👨\200d👨\200d👧":"1f468-1f468-1f467","👨\200d👩\200d👧":"1f468-1f469-1f467","👩\200d👩\200d👦":"1f469-1f469-1f466","👩\200d👩\200d👧":"1f469-1f469-1f467","👨\200d👦\200d👦":"1f468-1f466-1f466","👨\200d👧\200d👦":"1f468-1f467-1f466","👩\200d👦\200d👦":"1f469-1f466-1f466","👩\200d👧\200d👦":"1f469-1f467-1f466","👩\200d👧\200d👧":"1f469-1f467-1f467","👨❤️💋👨":"1f468-2764-1f48b-1f468","👨\200d👧\200d👧":"1f468-1f467-1f467","👨\200d👩\200d👦":"1f468-1f469-1f466","👩❤️💋👨":"1f469-2764-1f48b-1f468","👩❤️💋👩":"1f469-2764-1f48b-1f469","👨\200d\200d👨":"1f468-2764-1f468","👩\200d\200d👨":"1f469-2764-1f468","👩\200d\200d👩":"1f469-2764-1f469","👨🏻\200d⚕️":"1f468-1f3fb-2695","👨🏻\200d⚖️":"1f468-1f3fb-2696","👨🏻\200d✈️":"1f468-1f3fb-2708","👨🏼\200d⚕️":"1f468-1f3fc-2695","👨🏼\200d⚖️":"1f468-1f3fc-2696","👨🏼\200d✈️":"1f468-1f3fc-2708","👨🏽\200d⚕️":"1f468-1f3fd-2695","👨🏽\200d⚖️":"1f468-1f3fd-2696","👨🏽\200d✈️":"1f468-1f3fd-2708","👨🏾\200d⚕️":"1f468-1f3fe-2695","👨🏾\200d⚖️":"1f468-1f3fe-2696","👨🏾\200d✈️":"1f468-1f3fe-2708","👨🏿\200d⚕️":"1f468-1f3ff-2695","👨🏿\200d⚖️":"1f468-1f3ff-2696","👨🏿\200d✈️":"1f468-1f3ff-2708","👩🏻\200d⚕️":"1f469-1f3fb-2695","👩🏻\200d⚖️":"1f469-1f3fb-2696","👩🏻\200d✈️":"1f469-1f3fb-2708","👩🏼\200d⚕️":"1f469-1f3fc-2695","👩🏼\200d⚖️":"1f469-1f3fc-2696","👩🏼\200d✈️":"1f469-1f3fc-2708","👩🏽\200d⚕️":"1f469-1f3fd-2695","👩🏽\200d⚖️":"1f469-1f3fd-2696","👩🏽\200d✈️":"1f469-1f3fd-2708","👩🏾\200d⚕️":"1f469-1f3fe-2695","👩🏾\200d⚖️":"1f469-1f3fe-2696","👩🏾\200d✈️":"1f469-1f3fe-2708","👩🏿\200d⚕️":"1f469-1f3ff-2695","👩🏿\200d⚖️":"1f469-1f3ff-2696","👩🏿\200d✈️":"1f469-1f3ff-2708","👮🏻\200d♀️":"1f46e-1f3fb-2640","👮🏻\200d♂️":"1f46e-1f3fb-2642","👮🏼\200d♀️":"1f46e-1f3fc-2640","👮🏼\200d♂️":"1f46e-1f3fc-2642","👮🏽\200d♀️":"1f46e-1f3fd-2640","👮🏽\200d♂️":"1f46e-1f3fd-2642","👮🏾\200d♀️":"1f46e-1f3fe-2640","👮🏾\200d♂️":"1f46e-1f3fe-2642","👮🏿\200d♀️":"1f46e-1f3ff-2640","👮🏿\200d♂️":"1f46e-1f3ff-2642","👱🏻\200d♀️":"1f471-1f3fb-2640","👱🏻\200d♂️":"1f471-1f3fb-2642","👱🏼\200d♀️":"1f471-1f3fc-2640","👱🏼\200d♂️":"1f471-1f3fc-2642","👱🏽\200d♀️":"1f471-1f3fd-2640","👱🏽\200d♂️":"1f471-1f3fd-2642","👱🏾\200d♀️":"1f471-1f3fe-2640","👱🏾\200d♂️":"1f471-1f3fe-2642","👱🏿\200d♀️":"1f471-1f3ff-2640","👱🏿\200d♂️":"1f471-1f3ff-2642","👳🏻\200d♀️":"1f473-1f3fb-2640","👳🏻\200d♂️":"1f473-1f3fb-2642","👳🏼\200d♀️":"1f473-1f3fc-2640","👳🏼\200d♂️":"1f473-1f3fc-2642","👳🏽\200d♀️":"1f473-1f3fd-2640","👳🏽\200d♂️":"1f473-1f3fd-2642","👳🏾\200d♀️":"1f473-1f3fe-2640","👳🏾\200d♂️":"1f473-1f3fe-2642","👳🏿\200d♀️":"1f473-1f3ff-2640","👳🏿\200d♂️":"1f473-1f3ff-2642","👷🏻\200d♀️":"1f477-1f3fb-2640","👷🏻\200d♂️":"1f477-1f3fb-2642","👷🏼\200d♀️":"1f477-1f3fc-2640","👷🏼\200d♂️":"1f477-1f3fc-2642","👷🏽\200d♀️":"1f477-1f3fd-2640","👷🏽\200d♂️":"1f477-1f3fd-2642","👷🏾\200d♀️":"1f477-1f3fe-2640","👷🏾\200d♂️":"1f477-1f3fe-2642","👷🏿\200d♀️":"1f477-1f3ff-2640","👷🏿\200d♂️":"1f477-1f3ff-2642","💂🏻\200d♀️":"1f482-1f3fb-2640","💂🏻\200d♂️":"1f482-1f3fb-2642","💂🏼\200d♀️":"1f482-1f3fc-2640","💂🏼\200d♂️":"1f482-1f3fc-2642","💂🏽\200d♀️":"1f482-1f3fd-2640","💂🏽\200d♂️":"1f482-1f3fd-2642","💂🏾\200d♀️":"1f482-1f3fe-2640","💂🏾\200d♂️":"1f482-1f3fe-2642","💂🏿\200d♀️":"1f482-1f3ff-2640","💂🏿\200d♂️":"1f482-1f3ff-2642","🕵️🏻♀️":"1f575-1f3fb-2640","🕵️🏻♂️":"1f575-1f3fb-2642","🕵️🏼♀️":"1f575-1f3fc-2640","🕵️🏼♂️":"1f575-1f3fc-2642","🕵️🏽♀️":"1f575-1f3fd-2640","🕵️🏽♂️":"1f575-1f3fd-2642","🕵️🏾♀️":"1f575-1f3fe-2640","🕵️🏾♂️":"1f575-1f3fe-2642","🕵️🏿♀️":"1f575-1f3ff-2640","🕵️🏿♂️":"1f575-1f3ff-2642","🏃🏻\200d♀️":"1f3c3-1f3fb-2640","🏃🏻\200d♂️":"1f3c3-1f3fb-2642","🏃🏼\200d♀️":"1f3c3-1f3fc-2640","🏃🏼\200d♂️":"1f3c3-1f3fc-2642","🏃🏽\200d♀️":"1f3c3-1f3fd-2640","🏃🏽\200d♂️":"1f3c3-1f3fd-2642","🏃🏾\200d♀️":"1f3c3-1f3fe-2640","🏃🏾\200d♂️":"1f3c3-1f3fe-2642","🏃🏿\200d♀️":"1f3c3-1f3ff-2640","🏃🏿\200d♂️":"1f3c3-1f3ff-2642","🏄🏻\200d♀️":"1f3c4-1f3fb-2640","🏄🏻\200d♂️":"1f3c4-1f3fb-2642","🏄🏼\200d♀️":"1f3c4-1f3fc-2640","🏄🏼\200d♂️":"1f3c4-1f3fc-2642","🏄🏽\200d♀️":"1f3c4-1f3fd-2640","🏄🏽\200d♂️":"1f3c4-1f3fd-2642","🏄🏾\200d♀️":"1f3c4-1f3fe-2640","🏄🏾\200d♂️":"1f3c4-1f3fe-2642","🏄🏿\200d♀️":"1f3c4-1f3ff-2640","🏄🏿\200d♂️":"1f3c4-1f3ff-2642","🏊🏻\200d♀️":"1f3ca-1f3fb-2640","🏊🏻\200d♂️":"1f3ca-1f3fb-2642","🏊🏼\200d♀️":"1f3ca-1f3fc-2640","🏊🏼\200d♂️":"1f3ca-1f3fc-2642","🏊🏽\200d♀️":"1f3ca-1f3fd-2640","🏊🏽\200d♂️":"1f3ca-1f3fd-2642","🏊🏾\200d♀️":"1f3ca-1f3fe-2640","🏊🏾\200d♂️":"1f3ca-1f3fe-2642","🏊🏿\200d♀️":"1f3ca-1f3ff-2640","🏊🏿\200d♂️":"1f3ca-1f3ff-2642","🏋️🏻♀️":"1f3cb-1f3fb-2640","🏋️🏻♂️":"1f3cb-1f3fb-2642","🏋️🏼♀️":"1f3cb-1f3fc-2640","🏋️🏼♂️":"1f3cb-1f3fc-2642","🏋️🏽♀️":"1f3cb-1f3fd-2640","🏋️🏽♂️":"1f3cb-1f3fd-2642","🏋️🏾♀️":"1f3cb-1f3fe-2640","🏋️🏾♂️":"1f3cb-1f3fe-2642","🏋️🏿♀️":"1f3cb-1f3ff-2640","🏋️🏿♂️":"1f3cb-1f3ff-2642","🏌️🏻♀️":"1f3cc-1f3fb-2640","🏌️🏻♂️":"1f3cc-1f3fb-2642","🏌️🏼♀️":"1f3cc-1f3fc-2640","🏌️🏼♂️":"1f3cc-1f3fc-2642","🏌️🏽♀️":"1f3cc-1f3fd-2640","🏌️🏽♂️":"1f3cc-1f3fd-2642","🏌️🏾♀️":"1f3cc-1f3fe-2640","🏌️🏾♂️":"1f3cc-1f3fe-2642","🏌️🏿♀️":"1f3cc-1f3ff-2640","🏌️🏿♂️":"1f3cc-1f3ff-2642","💆🏻\200d♀️":"1f486-1f3fb-2640","💆🏻\200d♂️":"1f486-1f3fb-2642","💆🏼\200d♀️":"1f486-1f3fc-2640","💆🏼\200d♂️":"1f486-1f3fc-2642","💆🏽\200d♀️":"1f486-1f3fd-2640","💆🏽\200d♂️":"1f486-1f3fd-2642","💆🏾\200d♀️":"1f486-1f3fe-2640","💆🏾\200d♂️":"1f486-1f3fe-2642","💆🏿\200d♀️":"1f486-1f3ff-2640","💆🏿\200d♂️":"1f486-1f3ff-2642","💇🏻\200d♀️":"1f487-1f3fb-2640","💇🏻\200d♂️":"1f487-1f3fb-2642","💇🏼\200d♀️":"1f487-1f3fc-2640","💇🏼\200d♂️":"1f487-1f3fc-2642","💇🏽\200d♀️":"1f487-1f3fd-2640","💇🏽\200d♂️":"1f487-1f3fd-2642","💇🏾\200d♀️":"1f487-1f3fe-2640","💇🏾\200d♂️":"1f487-1f3fe-2642","💇🏿\200d♀️":"1f487-1f3ff-2640","💇🏿\200d♂️":"1f487-1f3ff-2642","🚣🏻\200d♀️":"1f6a3-1f3fb-2640","🚣🏻\200d♂️":"1f6a3-1f3fb-2642","🚣🏼\200d♀️":"1f6a3-1f3fc-2640","🚣🏼\200d♂️":"1f6a3-1f3fc-2642","🚣🏽\200d♀️":"1f6a3-1f3fd-2640","🚣🏽\200d♂️":"1f6a3-1f3fd-2642","🚣🏾\200d♀️":"1f6a3-1f3fe-2640","🚣🏾\200d♂️":"1f6a3-1f3fe-2642","🚣🏿\200d♀️":"1f6a3-1f3ff-2640","🚣🏿\200d♂️":"1f6a3-1f3ff-2642","🚴🏻\200d♀️":"1f6b4-1f3fb-2640","🚴🏻\200d♂️":"1f6b4-1f3fb-2642","🚴🏼\200d♀️":"1f6b4-1f3fc-2640","🚴🏼\200d♂️":"1f6b4-1f3fc-2642","🚴🏽\200d♀️":"1f6b4-1f3fd-2640","🚴🏽\200d♂️":"1f6b4-1f3fd-2642","🚴🏾\200d♀️":"1f6b4-1f3fe-2640","🚴🏾\200d♂️":"1f6b4-1f3fe-2642","🚴🏿\200d♀️":"1f6b4-1f3ff-2640","🚴🏿\200d♂️":"1f6b4-1f3ff-2642","🚵🏻\200d♀️":"1f6b5-1f3fb-2640","🚵🏻\200d♂️":"1f6b5-1f3fb-2642","🚵🏼\200d♀️":"1f6b5-1f3fc-2640","🚵🏼\200d♂️":"1f6b5-1f3fc-2642","🚵🏽\200d♀️":"1f6b5-1f3fd-2640","🚵🏽\200d♂️":"1f6b5-1f3fd-2642","🚵🏾\200d♀️":"1f6b5-1f3fe-2640","🚵🏾\200d♂️":"1f6b5-1f3fe-2642","🚵🏿\200d♀️":"1f6b5-1f3ff-2640","🚵🏿\200d♂️":"1f6b5-1f3ff-2642","🚶🏻\200d♀️":"1f6b6-1f3fb-2640","🚶🏻\200d♂️":"1f6b6-1f3fb-2642","🚶🏼\200d♀️":"1f6b6-1f3fc-2640","🚶🏼\200d♂️":"1f6b6-1f3fc-2642","🚶🏽\200d♀️":"1f6b6-1f3fd-2640","🚶🏽\200d♂️":"1f6b6-1f3fd-2642","🚶🏾\200d♀️":"1f6b6-1f3fe-2640","🚶🏾\200d♂️":"1f6b6-1f3fe-2642","🚶🏿\200d♀️":"1f6b6-1f3ff-2640","🚶🏿\200d♂️":"1f6b6-1f3ff-2642","🤸🏻\200d♀️":"1f938-1f3fb-2640","🤸🏻\200d♂️":"1f938-1f3fb-2642","🤸🏼\200d♀️":"1f938-1f3fc-2640","🤸🏼\200d♂️":"1f938-1f3fc-2642","🤸🏽\200d♀️":"1f938-1f3fd-2640","🤸🏽\200d♂️":"1f938-1f3fd-2642","🤸🏾\200d♀️":"1f938-1f3fe-2640","🤸🏾\200d♂️":"1f938-1f3fe-2642","🤸🏿\200d♀️":"1f938-1f3ff-2640","🤸🏿\200d♂️":"1f938-1f3ff-2642","🤹🏻\200d♀️":"1f939-1f3fb-2640","🤹🏻\200d♂️":"1f939-1f3fb-2642","🤹🏼\200d♀️":"1f939-1f3fc-2640","🤹🏼\200d♂️":"1f939-1f3fc-2642","🤹🏽\200d♀️":"1f939-1f3fd-2640","🤹🏽\200d♂️":"1f939-1f3fd-2642","🤹🏾\200d♀️":"1f939-1f3fe-2640","🤹🏾\200d♂️":"1f939-1f3fe-2642","🤹🏿\200d♀️":"1f939-1f3ff-2640","🤹🏿\200d♂️":"1f939-1f3ff-2642","🤽🏻\200d♀️":"1f93d-1f3fb-2640","🤽🏻\200d♂️":"1f93d-1f3fb-2642","🤽🏼\200d♀️":"1f93d-1f3fc-2640","🤽🏼\200d♂️":"1f93d-1f3fc-2642","🤽🏽\200d♀️":"1f93d-1f3fd-2640","🤽🏽\200d♂️":"1f93d-1f3fd-2642","🤽🏾\200d♀️":"1f93d-1f3fe-2640","🤽🏾\200d♂️":"1f93d-1f3fe-2642","🤽🏿\200d♀️":"1f93d-1f3ff-2640","🤽🏿\200d♂️":"1f93d-1f3ff-2642","🤾🏻\200d♀️":"1f93e-1f3fb-2640","🤾🏻\200d♂️":"1f93e-1f3fb-2642","🤾🏼\200d♀️":"1f93e-1f3fc-2640","🤾🏼\200d♂️":"1f93e-1f3fc-2642","🤾🏽\200d♀️":"1f93e-1f3fd-2640","🤾🏽\200d♂️":"1f93e-1f3fd-2642","🤾🏾\200d♀️":"1f93e-1f3fe-2640","🤾🏾\200d♂️":"1f93e-1f3fe-2642","🤾🏿\200d♀️":"1f93e-1f3ff-2640","🤾🏿\200d♂️":"1f93e-1f3ff-2642","💁🏻\200d♀️":"1f481-1f3fb-2640","💁🏻\200d♂️":"1f481-1f3fb-2642","💁🏼\200d♀️":"1f481-1f3fc-2640","💁🏼\200d♂️":"1f481-1f3fc-2642","💁🏽\200d♀️":"1f481-1f3fd-2640","💁🏽\200d♂️":"1f481-1f3fd-2642","💁🏾\200d♀️":"1f481-1f3fe-2640","💁🏾\200d♂️":"1f481-1f3fe-2642","💁🏿\200d♀️":"1f481-1f3ff-2640","💁🏿\200d♂️":"1f481-1f3ff-2642","🙅🏻\200d♀️":"1f645-1f3fb-2640","🙅🏻\200d♂️":"1f645-1f3fb-2642","🙅🏼\200d♀️":"1f645-1f3fc-2640","🙅🏼\200d♂️":"1f645-1f3fc-2642","🙅🏽\200d♀️":"1f645-1f3fd-2640","🙅🏽\200d♂️":"1f645-1f3fd-2642","🙅🏾\200d♀️":"1f645-1f3fe-2640","🙅🏾\200d♂️":"1f645-1f3fe-2642","🙅🏿\200d♀️":"1f645-1f3ff-2640","🙅🏿\200d♂️":"1f645-1f3ff-2642","🙆🏻\200d♀️":"1f646-1f3fb-2640","🙆🏻\200d♂️":"1f646-1f3fb-2642","🙆🏼\200d♀️":"1f646-1f3fc-2640","🙆🏼\200d♂️":"1f646-1f3fc-2642","🙆🏽\200d♀️":"1f646-1f3fd-2640","🙆🏽\200d♂️":"1f646-1f3fd-2642","🙆🏾\200d♀️":"1f646-1f3fe-2640","🙆🏾\200d♂️":"1f646-1f3fe-2642","🙆🏿\200d♀️":"1f646-1f3ff-2640","🙆🏿\200d♂️":"1f646-1f3ff-2642","🙇🏻\200d♀️":"1f647-1f3fb-2640","🙇🏻\200d♂️":"1f647-1f3fb-2642","🙇🏼\200d♀️":"1f647-1f3fc-2640","🙇🏼\200d♂️":"1f647-1f3fc-2642","🙇🏽\200d♀️":"1f647-1f3fd-2640","🙇🏽\200d♂️":"1f647-1f3fd-2642","🙇🏾\200d♀️":"1f647-1f3fe-2640","🙇🏾\200d♂️":"1f647-1f3fe-2642","🙇🏿\200d♀️":"1f647-1f3ff-2640","🙇🏿\200d♂️":"1f647-1f3ff-2642","🙋🏻\200d♀️":"1f64b-1f3fb-2640","🙋🏻\200d♂️":"1f64b-1f3fb-2642","🙋🏼\200d♀️":"1f64b-1f3fc-2640","🙋🏼\200d♂️":"1f64b-1f3fc-2642","🙋🏽\200d♀️":"1f64b-1f3fd-2640","🙋🏽\200d♂️":"1f64b-1f3fd-2642","🙋🏾\200d♀️":"1f64b-1f3fe-2640","🙋🏾\200d♂️":"1f64b-1f3fe-2642","🙋🏿\200d♀️":"1f64b-1f3ff-2640","🙋🏿\200d♂️":"1f64b-1f3ff-2642","🙍🏻\200d♀️":"1f64d-1f3fb-2640","🙍🏻\200d♂️":"1f64d-1f3fb-2642","🙍🏼\200d♀️":"1f64d-1f3fc-2640","🙍🏼\200d♂️":"1f64d-1f3fc-2642","🙍🏽\200d♀️":"1f64d-1f3fd-2640","🙍🏽\200d♂️":"1f64d-1f3fd-2642","🙍🏾\200d♀️":"1f64d-1f3fe-2640","🙍🏾\200d♂️":"1f64d-1f3fe-2642","🙍🏿\200d♀️":"1f64d-1f3ff-2640","🙍🏿\200d♂️":"1f64d-1f3ff-2642","🙎🏻\200d♀️":"1f64e-1f3fb-2640","🙎🏻\200d♂️":"1f64e-1f3fb-2642","🙎🏼\200d♀️":"1f64e-1f3fc-2640","🙎🏼\200d♂️":"1f64e-1f3fc-2642","🙎🏽\200d♀️":"1f64e-1f3fd-2640","🙎🏽\200d♂️":"1f64e-1f3fd-2642","🙎🏾\200d♀️":"1f64e-1f3fe-2640","🙎🏾\200d♂️":"1f64e-1f3fe-2642","🙎🏿\200d♀️":"1f64e-1f3ff-2640","🙎🏿\200d♂️":"1f64e-1f3ff-2642","🤦🏻\200d♀️":"1f926-1f3fb-2640","🤦🏻\200d♂️":"1f926-1f3fb-2642","🤦🏼\200d♀️":"1f926-1f3fc-2640","🤦🏼\200d♂️":"1f926-1f3fc-2642","🤦🏽\200d♀️":"1f926-1f3fd-2640","🤦🏽\200d♂️":"1f926-1f3fd-2642","🤦🏾\200d♀️":"1f926-1f3fe-2640","🤦🏾\200d♂️":"1f926-1f3fe-2642","🤦🏿\200d♀️":"1f926-1f3ff-2640","🤦🏿\200d♂️":"1f926-1f3ff-2642","🤷🏻\200d♀️":"1f937-1f3fb-2640","🤷🏻\200d♂️":"1f937-1f3fb-2642","🤷🏼\200d♀️":"1f937-1f3fc-2640","🤷🏼\200d♂️":"1f937-1f3fc-2642","🤷🏽\200d♀️":"1f937-1f3fd-2640","🤷🏽\200d♂️":"1f937-1f3fd-2642","🤷🏾\200d♀️":"1f937-1f3fe-2640","🤷🏾\200d♂️":"1f937-1f3fe-2642","🤷🏿\200d♀️":"1f937-1f3ff-2640","🤷🏿\200d♂️":"1f937-1f3ff-2642","👁️\200d🗨️":"1f441-1f5e8","🕵🏻\200d♀️":"1f575-1f3fb-2640","🕵🏻\200d♂️":"1f575-1f3fb-2642","🕵🏼\200d♀️":"1f575-1f3fc-2640","🕵🏼\200d♂️":"1f575-1f3fc-2642","🕵🏽\200d♀️":"1f575-1f3fd-2640","🕵🏽\200d♂️":"1f575-1f3fd-2642","🕵🏾\200d♀️":"1f575-1f3fe-2640","🕵🏾\200d♂️":"1f575-1f3fe-2642","🕵🏿\200d♀️":"1f575-1f3ff-2640","🕵🏿\200d♂️":"1f575-1f3ff-2642","🏋🏻\200d♀️":"1f3cb-1f3fb-2640","🏋🏻\200d♂️":"1f3cb-1f3fb-2642","🏋🏼\200d♀️":"1f3cb-1f3fc-2640","🏋🏼\200d♂️":"1f3cb-1f3fc-2642","🏋🏽\200d♀️":"1f3cb-1f3fd-2640","🏋🏽\200d♂️":"1f3cb-1f3fd-2642","🏋🏾\200d♀️":"1f3cb-1f3fe-2640","🏋🏾\200d♂️":"1f3cb-1f3fe-2642","🏋🏿\200d♀️":"1f3cb-1f3ff-2640","🏋🏿\200d♂️":"1f3cb-1f3ff-2642","🏌🏻\200d♀️":"1f3cc-1f3fb-2640","🏌🏻\200d♂️":"1f3cc-1f3fb-2642","🏌🏼\200d♀️":"1f3cc-1f3fc-2640","🏌🏼\200d♂️":"1f3cc-1f3fc-2642","🏌🏽\200d♀️":"1f3cc-1f3fd-2640","🏌🏽\200d♂️":"1f3cc-1f3fd-2642","🏌🏾\200d♀️":"1f3cc-1f3fe-2640","🏌🏾\200d♂️":"1f3cc-1f3fe-2642","🏌🏿\200d♀️":"1f3cc-1f3ff-2640","🏌🏿\200d♂️":"1f3cc-1f3ff-2642","🧙🏻\200d♀️":"1f9d9-1f3fb-2640","🧙🏻\200d♂️":"1f9d9-1f3fb-2642","🧙🏼\200d♀️":"1f9d9-1f3fc-2640","🧙🏼\200d♂️":"1f9d9-1f3fc-2642","🧙🏽\200d♀️":"1f9d9-1f3fd-2640","🧙🏽\200d♂️":"1f9d9-1f3fd-2642","🧙🏾\200d♀️":"1f9d9-1f3fe-2640","🧙🏾\200d♂️":"1f9d9-1f3fe-2642","🧙🏿\200d♀️":"1f9d9-1f3ff-2640","🧙🏿\200d♂️":"1f9d9-1f3ff-2642","🧚🏻\200d♀️":"1f9da-1f3fb-2640","🧚🏻\200d♂️":"1f9da-1f3fb-2642","🧚🏼\200d♀️":"1f9da-1f3fc-2640","🧚🏼\200d♂️":"1f9da-1f3fc-2642","🧚🏽\200d♀️":"1f9da-1f3fd-2640","🧚🏽\200d♂️":"1f9da-1f3fd-2642","🧚🏾\200d♀️":"1f9da-1f3fe-2640","🧚🏾\200d♂️":"1f9da-1f3fe-2642","🧚🏿\200d♀️":"1f9da-1f3ff-2640","🧚🏿\200d♂️":"1f9da-1f3ff-2642","🧛🏻\200d♀️":"1f9db-1f3fb-2640","🧛🏻\200d♂️":"1f9db-1f3fb-2642","🧛🏼\200d♀️":"1f9db-1f3fc-2640","🧛🏼\200d♂️":"1f9db-1f3fc-2642","🧛🏽\200d♀️":"1f9db-1f3fd-2640","🧛🏽\200d♂️":"1f9db-1f3fd-2642","🧛🏾\200d♀️":"1f9db-1f3fe-2640","🧛🏾\200d♂️":"1f9db-1f3fe-2642","🧛🏿\200d♀️":"1f9db-1f3ff-2640","🧛🏿\200d♂️":"1f9db-1f3ff-2642","🧜🏻\200d♀️":"1f9dc-1f3fb-2640","🧜🏻\200d♂️":"1f9dc-1f3fb-2642","🧜🏼\200d♀️":"1f9dc-1f3fc-2640","🧜🏼\200d♂️":"1f9dc-1f3fc-2642","🧜🏽\200d♀️":"1f9dc-1f3fd-2640","🧜🏽\200d♂️":"1f9dc-1f3fd-2642","🧜🏾\200d♀️":"1f9dc-1f3fe-2640","🧜🏾\200d♂️":"1f9dc-1f3fe-2642","🧜🏿\200d♀️":"1f9dc-1f3ff-2640","🧜🏿\200d♂️":"1f9dc-1f3ff-2642","🧝🏻\200d♀️":"1f9dd-1f3fb-2640","🧝🏻\200d♂️":"1f9dd-1f3fb-2642","🧝🏼\200d♀️":"1f9dd-1f3fc-2640","🧝🏼\200d♂️":"1f9dd-1f3fc-2642","🧝🏽\200d♀️":"1f9dd-1f3fd-2640","🧝🏽\200d♂️":"1f9dd-1f3fd-2642","🧝🏾\200d♀️":"1f9dd-1f3fe-2640","🧝🏾\200d♂️":"1f9dd-1f3fe-2642","🧝🏿\200d♀️":"1f9dd-1f3ff-2640","🧝🏿\200d♂️":"1f9dd-1f3ff-2642","🧖🏻\200d♀️":"1f9d6-1f3fb-2640","🧖🏻\200d♂️":"1f9d6-1f3fb-2642","🧖🏼\200d♀️":"1f9d6-1f3fc-2640","🧖🏼\200d♂️":"1f9d6-1f3fc-2642","🧖🏽\200d♀️":"1f9d6-1f3fd-2640","🧖🏽\200d♂️":"1f9d6-1f3fd-2642","🧖🏾\200d♀️":"1f9d6-1f3fe-2640","🧖🏾\200d♂️":"1f9d6-1f3fe-2642","🧖🏿\200d♀️":"1f9d6-1f3ff-2640","🧖🏿\200d♂️":"1f9d6-1f3ff-2642","🧗🏻\200d♀️":"1f9d7-1f3fb-2640","🧗🏻\200d♂️":"1f9d7-1f3fb-2642","🧗🏼\200d♀️":"1f9d7-1f3fc-2640","🧗🏼\200d♂️":"1f9d7-1f3fc-2642","🧗🏽\200d♀️":"1f9d7-1f3fd-2640","🧗🏽\200d♂️":"1f9d7-1f3fd-2642","🧗🏾\200d♀️":"1f9d7-1f3fe-2640","🧗🏾\200d♂️":"1f9d7-1f3fe-2642","🧗🏿\200d♀️":"1f9d7-1f3ff-2640","🧗🏿\200d♂️":"1f9d7-1f3ff-2642","🧘🏻\200d♀️":"1f9d8-1f3fb-2640","🧘🏻\200d♂️":"1f9d8-1f3fb-2642","🧘🏼\200d♀️":"1f9d8-1f3fc-2640","🧘🏼\200d♂️":"1f9d8-1f3fc-2642","🧘🏽\200d♀️":"1f9d8-1f3fd-2640","🧘🏽\200d♂️":"1f9d8-1f3fd-2642","🧘🏾\200d♀️":"1f9d8-1f3fe-2640","🧘🏾\200d♂️":"1f9d8-1f3fe-2642","🧘🏿\200d♀️":"1f9d8-1f3ff-2640","🧘🏿\200d♂️":"1f9d8-1f3ff-2642","🦸🏻\200d♀️":"1f9b8-1f3fb-2640","🦸🏻\200d♂️":"1f9b8-1f3fb-2642","🦸🏼\200d♀️":"1f9b8-1f3fc-2640","🦸🏼\200d♂️":"1f9b8-1f3fc-2642","🦸🏽\200d♀️":"1f9b8-1f3fd-2640","🦸🏽\200d♂️":"1f9b8-1f3fd-2642","🦸🏾\200d♀️":"1f9b8-1f3fe-2640","🦸🏾\200d♂️":"1f9b8-1f3fe-2642","🦸🏿\200d♀️":"1f9b8-1f3ff-2640","🦸🏿\200d♂️":"1f9b8-1f3ff-2642","🦹🏻\200d♀️":"1f9b9-1f3fb-2640","🦹🏻\200d♂️":"1f9b9-1f3fb-2642","🦹🏼\200d♀️":"1f9b9-1f3fc-2640","🦹🏼\200d♂️":"1f9b9-1f3fc-2642","🦹🏽\200d♀️":"1f9b9-1f3fd-2640","🦹🏽\200d♂️":"1f9b9-1f3fd-2642","🦹🏾\200d♀️":"1f9b9-1f3fe-2640","🦹🏾\200d♂️":"1f9b9-1f3fe-2642","🦹🏿\200d♀️":"1f9b9-1f3ff-2640","🦹🏿\200d♂️":"1f9b9-1f3ff-2642","🕵️\200d♀️":"1f575-2640","🕵️\200d♂️":"1f575-2642","⛹️🏻♀️":"26f9-1f3fb-2640","⛹️🏻♂️":"26f9-1f3fb-2642","⛹️🏼♀️":"26f9-1f3fc-2640","⛹️🏼♂️":"26f9-1f3fc-2642","⛹️🏽♀️":"26f9-1f3fd-2640","⛹️🏽♂️":"26f9-1f3fd-2642","⛹️🏾♀️":"26f9-1f3fe-2640","⛹️🏾♂️":"26f9-1f3fe-2642","⛹️🏿♀️":"26f9-1f3ff-2640","⛹️🏿♂️":"26f9-1f3ff-2642","🏋️\200d♀️":"1f3cb-2640","🏋️\200d♂️":"1f3cb-2642","🏌️\200d♀️":"1f3cc-2640","🏌️\200d♂️":"1f3cc-2642","⛹🏻\200d♀️":"26f9-1f3fb-2640","⛹🏻\200d♂️":"26f9-1f3fb-2642","⛹🏼\200d♀️":"26f9-1f3fc-2640","⛹🏼\200d♂️":"26f9-1f3fc-2642","⛹🏽\200d♀️":"26f9-1f3fd-2640","⛹🏽\200d♂️":"26f9-1f3fd-2642","⛹🏾\200d♀️":"26f9-1f3fe-2640","⛹🏾\200d♂️":"26f9-1f3fe-2642","⛹🏿\200d♀️":"26f9-1f3ff-2640","⛹🏿\200d♂️":"26f9-1f3ff-2642","⛹️\200d♀️":"26f9-2640","⛹️\200d♂️":"26f9-2642","👨👨👦👦":"1f468-1f468-1f466-1f466","👨👨👧👦":"1f468-1f468-1f467-1f466","👨👨👧👧":"1f468-1f468-1f467-1f467","👨👩👦👦":"1f468-1f469-1f466-1f466","👨👩👧👦":"1f468-1f469-1f467-1f466","👨👩👧👧":"1f468-1f469-1f467-1f467","👩👩👦👦":"1f469-1f469-1f466-1f466","👩👩👧👦":"1f469-1f469-1f467-1f466","👩👩👧👧":"1f469-1f469-1f467-1f467","👨🏿\200d💻":"1f468-1f3ff-1f4bb","👨🏾\200d💻":"1f468-1f3fe-1f4bb","👨🏽\200d💻":"1f468-1f3fd-1f4bb","👨🏼\200d💻":"1f468-1f3fc-1f4bb","👨🏻\200d💻":"1f468-1f3fb-1f4bb","👩🏿\200d💻":"1f469-1f3ff-1f4bb","👩🏾\200d💻":"1f469-1f3fe-1f4bb","👩🏽\200d💻":"1f469-1f3fd-1f4bb","👩🏼\200d💻":"1f469-1f3fc-1f4bb","👩🏻\200d💻":"1f469-1f3fb-1f4bb","👨🏿\200d🏫":"1f468-1f3ff-1f3eb","👨🏾\200d🏫":"1f468-1f3fe-1f3eb","👨🏽\200d🏫":"1f468-1f3fd-1f3eb","👨🏼\200d🏫":"1f468-1f3fc-1f3eb","👨🏻\200d🏫":"1f468-1f3fb-1f3eb","👩🏿\200d🏫":"1f469-1f3ff-1f3eb","👩🏾\200d🏫":"1f469-1f3fe-1f3eb","👩🏽\200d🏫":"1f469-1f3fd-1f3eb","👩🏼\200d🏫":"1f469-1f3fc-1f3eb","👩🏻\200d🏫":"1f469-1f3fb-1f3eb","👨🏿\200d🎓":"1f468-1f3ff-1f393","👨🏾\200d🎓":"1f468-1f3fe-1f393","👨🏽\200d🎓":"1f468-1f3fd-1f393","👨🏼\200d🎓":"1f468-1f3fc-1f393","👨🏻\200d🎓":"1f468-1f3fb-1f393","👩🏿\200d🎓":"1f469-1f3ff-1f393","👩🏾\200d🎓":"1f469-1f3fe-1f393","👩🏽\200d🎓":"1f469-1f3fd-1f393","👩🏼\200d🎓":"1f469-1f3fc-1f393","👩🏻\200d🎓":"1f469-1f3fb-1f393","👨🏿\200d🎤":"1f468-1f3ff-1f3a4","👨🏾\200d🎤":"1f468-1f3fe-1f3a4","👨🏽\200d🎤":"1f468-1f3fd-1f3a4","👨🏼\200d🎤":"1f468-1f3fc-1f3a4","👨🏻\200d🎤":"1f468-1f3fb-1f3a4","👩🏿\200d🎤":"1f469-1f3ff-1f3a4","👩🏾\200d🎤":"1f469-1f3fe-1f3a4","👩🏽\200d🎤":"1f469-1f3fd-1f3a4","👩🏼\200d🎤":"1f469-1f3fc-1f3a4","👩🏻\200d🎤":"1f469-1f3fb-1f3a4","👨🏿\200d🔬":"1f468-1f3ff-1f52c","👨🏾\200d🔬":"1f468-1f3fe-1f52c","👨🏽\200d🔬":"1f468-1f3fd-1f52c","👨🏼\200d🔬":"1f468-1f3fc-1f52c","👨🏻\200d🔬":"1f468-1f3fb-1f52c","👩🏿\200d🔬":"1f469-1f3ff-1f52c","👩🏾\200d🔬":"1f469-1f3fe-1f52c","👩🏽\200d🔬":"1f469-1f3fd-1f52c","👩🏼\200d🔬":"1f469-1f3fc-1f52c","👩🏻\200d🔬":"1f469-1f3fb-1f52c","👨🏿\200d💼":"1f468-1f3ff-1f4bc","👨🏾\200d💼":"1f468-1f3fe-1f4bc","👨🏽\200d💼":"1f468-1f3fd-1f4bc","👨🏼\200d💼":"1f468-1f3fc-1f4bc","👨🏻\200d💼":"1f468-1f3fb-1f4bc","👩🏿\200d💼":"1f469-1f3ff-1f4bc","👩🏾\200d💼":"1f469-1f3fe-1f4bc","👩🏽\200d💼":"1f469-1f3fd-1f4bc","👩🏼\200d💼":"1f469-1f3fc-1f4bc","👩🏻\200d💼":"1f469-1f3fb-1f4bc","👨🏿\200d🔧":"1f468-1f3ff-1f527","👨🏾\200d🔧":"1f468-1f3fe-1f527","👨🏽\200d🔧":"1f468-1f3fd-1f527","👨🏼\200d🔧":"1f468-1f3fc-1f527","👨🏻\200d🔧":"1f468-1f3fb-1f527","👩🏿\200d🔧":"1f469-1f3ff-1f527","👩🏾\200d🔧":"1f469-1f3fe-1f527","👩🏽\200d🔧":"1f469-1f3fd-1f527","👩🏼\200d🔧":"1f469-1f3fc-1f527","👩🏻\200d🔧":"1f469-1f3fb-1f527","👨🏿\200d🏭":"1f468-1f3ff-1f3ed","👨🏾\200d🏭":"1f468-1f3fe-1f3ed","👨🏽\200d🏭":"1f468-1f3fd-1f3ed","👨🏼\200d🏭":"1f468-1f3fc-1f3ed","👨🏻\200d🏭":"1f468-1f3fb-1f3ed","👩🏿\200d🏭":"1f469-1f3ff-1f3ed","👩🏾\200d🏭":"1f469-1f3fe-1f3ed","👩🏽\200d🏭":"1f469-1f3fd-1f3ed","👩🏼\200d🏭":"1f469-1f3fc-1f3ed","👩🏻\200d🏭":"1f469-1f3fb-1f3ed","👨🏿\200d🍳":"1f468-1f3ff-1f373","👨🏾\200d🍳":"1f468-1f3fe-1f373","👨🏽\200d🍳":"1f468-1f3fd-1f373","👨🏼\200d🍳":"1f468-1f3fc-1f373","👨🏻\200d🍳":"1f468-1f3fb-1f373","👩🏿\200d🍳":"1f469-1f3ff-1f373","👩🏾\200d🍳":"1f469-1f3fe-1f373","👩🏽\200d🍳":"1f469-1f3fd-1f373","👩🏼\200d🍳":"1f469-1f3fc-1f373","👩🏻\200d🍳":"1f469-1f3fb-1f373","👨🏿\200d🌾":"1f468-1f3ff-1f33e","👨🏾\200d🌾":"1f468-1f3fe-1f33e","👨🏽\200d🌾":"1f468-1f3fd-1f33e","👨🏼\200d🌾":"1f468-1f3fc-1f33e","👨🏻\200d🌾":"1f468-1f3fb-1f33e","👩🏿\200d🌾":"1f469-1f3ff-1f33e","👩🏾\200d🌾":"1f469-1f3fe-1f33e","👩🏽\200d🌾":"1f469-1f3fd-1f33e","👩🏼\200d🌾":"1f469-1f3fc-1f33e","👩🏻\200d🌾":"1f469-1f3fb-1f33e","👨🏻\200d🎨":"1f468-1f3fb-1f3a8","👨🏼\200d🎨":"1f468-1f3fc-1f3a8","👨🏽\200d🎨":"1f468-1f3fd-1f3a8","👨🏾\200d🎨":"1f468-1f3fe-1f3a8","👨🏿\200d🎨":"1f468-1f3ff-1f3a8","👩🏻\200d🎨":"1f469-1f3fb-1f3a8","👩🏼\200d🎨":"1f469-1f3fc-1f3a8","👩🏽\200d🎨":"1f469-1f3fd-1f3a8","👩🏾\200d🎨":"1f469-1f3fe-1f3a8","👩🏿\200d🎨":"1f469-1f3ff-1f3a8","👨🏻\200d🚀":"1f468-1f3fb-1f680","👨🏼\200d🚀":"1f468-1f3fc-1f680","👨🏽\200d🚀":"1f468-1f3fd-1f680","👨🏾\200d🚀":"1f468-1f3fe-1f680","👨🏿\200d🚀":"1f468-1f3ff-1f680","👩🏻\200d🚀":"1f469-1f3fb-1f680","👩🏼\200d🚀":"1f469-1f3fc-1f680","👩🏽\200d🚀":"1f469-1f3fd-1f680","👩🏾\200d🚀":"1f469-1f3fe-1f680","👩🏿\200d🚀":"1f469-1f3ff-1f680","👨🏻\200d🚒":"1f468-1f3fb-1f692","👨🏼\200d🚒":"1f468-1f3fc-1f692","👨🏽\200d🚒":"1f468-1f3fd-1f692","👨🏾\200d🚒":"1f468-1f3fe-1f692","👨🏿\200d🚒":"1f468-1f3ff-1f692","👩🏻\200d🚒":"1f469-1f3fb-1f692","👩🏼\200d🚒":"1f469-1f3fc-1f692","👩🏽\200d🚒":"1f469-1f3fd-1f692","👩🏾\200d🚒":"1f469-1f3fe-1f692","👩🏿\200d🚒":"1f469-1f3ff-1f692","👨🏻\200d🦰":"1f468-1f3fb-1f9b0","👨🏻\200d🦱":"1f468-1f3fb-1f9b1","👨🏻\200d🦲":"1f468-1f3fb-1f9b2","👨🏻\200d🦳":"1f468-1f3fb-1f9b3","👨🏼\200d🦰":"1f468-1f3fc-1f9b0","👨🏼\200d🦱":"1f468-1f3fc-1f9b1","👨🏼\200d🦲":"1f468-1f3fc-1f9b2","👨🏼\200d🦳":"1f468-1f3fc-1f9b3","👨🏽\200d🦰":"1f468-1f3fd-1f9b0","👨🏽\200d🦱":"1f468-1f3fd-1f9b1","👨🏽\200d🦲":"1f468-1f3fd-1f9b2","👨🏽\200d🦳":"1f468-1f3fd-1f9b3","👨🏾\200d🦰":"1f468-1f3fe-1f9b0","👨🏾\200d🦱":"1f468-1f3fe-1f9b1","👨🏾\200d🦲":"1f468-1f3fe-1f9b2","👨🏾\200d🦳":"1f468-1f3fe-1f9b3","👨🏿\200d🦰":"1f468-1f3ff-1f9b0","👨🏿\200d🦱":"1f468-1f3ff-1f9b1","👨🏿\200d🦲":"1f468-1f3ff-1f9b2","👨🏿\200d🦳":"1f468-1f3ff-1f9b3","👩🏻\200d🦰":"1f469-1f3fb-1f9b0","👩🏻\200d🦱":"1f469-1f3fb-1f9b1","👩🏻\200d🦲":"1f469-1f3fb-1f9b2","👩🏻\200d🦳":"1f469-1f3fb-1f9b3","👩🏼\200d🦰":"1f469-1f3fc-1f9b0","👩🏼\200d🦱":"1f469-1f3fc-1f9b1","👩🏼\200d🦲":"1f469-1f3fc-1f9b2","👩🏼\200d🦳":"1f469-1f3fc-1f9b3","👩🏽\200d🦰":"1f469-1f3fd-1f9b0","👩🏽\200d🦱":"1f469-1f3fd-1f9b1","👩🏽\200d🦲":"1f469-1f3fd-1f9b2","👩🏽\200d🦳":"1f469-1f3fd-1f9b3","👩🏾\200d🦰":"1f469-1f3fe-1f9b0","👩🏾\200d🦱":"1f469-1f3fe-1f9b1","👩🏾\200d🦲":"1f469-1f3fe-1f9b2","👩🏾\200d🦳":"1f469-1f3fe-1f9b3","👩🏿\200d🦰":"1f469-1f3ff-1f9b0","👩🏿\200d🦱":"1f469-1f3ff-1f9b1","👩🏿\200d🦲":"1f469-1f3ff-1f9b2","👩🏿\200d🦳":"1f469-1f3ff-1f9b3","🏳️\200d🌈":"1f3f3-1f308","🏌🏻\200d♂":"1f3cc-1f3fb-2642","🏌🏼\200d♂":"1f3cc-1f3fc-2642","🏌🏽\200d♂":"1f3cc-1f3fd-2642","🏌🏾\200d♂":"1f3cc-1f3fe-2642","🏌🏿\200d♂":"1f3cc-1f3ff-2642","🏌🏻\200d♀":"1f3cc-1f3fb-2640","🏌🏼\200d♀":"1f3cc-1f3fc-2640","🏌🏽\200d♀":"1f3cc-1f3fd-2640","🏌🏾\200d♀":"1f3cc-1f3fe-2640","🏌🏿\200d♀":"1f3cc-1f3ff-2640","🤹🏿\200d♂":"1f939-1f3ff-2642","🤹🏾\200d♂":"1f939-1f3fe-2642","🤹🏽\200d♂":"1f939-1f3fd-2642","🤹🏼\200d♂":"1f939-1f3fc-2642","🤹🏻\200d♂":"1f939-1f3fb-2642","🤹🏿\200d♀":"1f939-1f3ff-2640","🤹🏾\200d♀":"1f939-1f3fe-2640","🤹🏽\200d♀":"1f939-1f3fd-2640","🤹🏼\200d♀":"1f939-1f3fc-2640","🤹🏻\200d♀":"1f939-1f3fb-2640","🤾🏿\200d♂":"1f93e-1f3ff-2642","🤾🏾\200d♂":"1f93e-1f3fe-2642","🤾🏽\200d♂":"1f93e-1f3fd-2642","🤾🏼\200d♂":"1f93e-1f3fc-2642","🤾🏻\200d♂":"1f93e-1f3fb-2642","🤾🏿\200d♀":"1f93e-1f3ff-2640","🤾🏾\200d♀":"1f93e-1f3fe-2640","🤾🏽\200d♀":"1f93e-1f3fd-2640","🤾🏼\200d♀":"1f93e-1f3fc-2640","🤾🏻\200d♀":"1f93e-1f3fb-2640","🤽🏿\200d♂":"1f93d-1f3ff-2642","🤽🏾\200d♂":"1f93d-1f3fe-2642","🤽🏽\200d♂":"1f93d-1f3fd-2642","🤽🏼\200d♂":"1f93d-1f3fc-2642","🤽🏻\200d♂":"1f93d-1f3fb-2642","🤽🏿\200d♀":"1f93d-1f3ff-2640","🤽🏾\200d♀":"1f93d-1f3fe-2640","🤽🏽\200d♀":"1f93d-1f3fd-2640","🤽🏼\200d♀":"1f93d-1f3fc-2640","🤽🏻\200d♀":"1f93d-1f3fb-2640","🤸🏿\200d♂":"1f938-1f3ff-2642","🤸🏾\200d♂":"1f938-1f3fe-2642","🤸🏽\200d♂":"1f938-1f3fd-2642","🤸🏼\200d♂":"1f938-1f3fc-2642","🤸🏻\200d♂":"1f938-1f3fb-2642","🤸🏿\200d♀":"1f938-1f3ff-2640","🤸🏾\200d♀":"1f938-1f3fe-2640","🤸🏽\200d♀":"1f938-1f3fd-2640","🤸🏼\200d♀":"1f938-1f3fc-2640","🤸🏻\200d♀":"1f938-1f3fb-2640","🚶🏿\200d♂":"1f6b6-1f3ff-2642","🚶🏾\200d♂":"1f6b6-1f3fe-2642","🚶🏽\200d♂":"1f6b6-1f3fd-2642","🚶🏼\200d♂":"1f6b6-1f3fc-2642","🚶🏻\200d♂":"1f6b6-1f3fb-2642","🚶🏿\200d♀":"1f6b6-1f3ff-2640","🚶🏾\200d♀":"1f6b6-1f3fe-2640","🚶🏽\200d♀":"1f6b6-1f3fd-2640","🚶🏼\200d♀":"1f6b6-1f3fc-2640","🚶🏻\200d♀":"1f6b6-1f3fb-2640","🚵🏿\200d♂":"1f6b5-1f3ff-2642","🚵🏾\200d♂":"1f6b5-1f3fe-2642","🚵🏽\200d♂":"1f6b5-1f3fd-2642","🚵🏼\200d♂":"1f6b5-1f3fc-2642","🚵🏻\200d♂":"1f6b5-1f3fb-2642","🚵🏿\200d♀":"1f6b5-1f3ff-2640","🚵🏾\200d♀":"1f6b5-1f3fe-2640","🚵🏽\200d♀":"1f6b5-1f3fd-2640","🚵🏼\200d♀":"1f6b5-1f3fc-2640","🚵🏻\200d♀":"1f6b5-1f3fb-2640","🚴🏿\200d♂":"1f6b4-1f3ff-2642","🚴🏾\200d♂":"1f6b4-1f3fe-2642","🚴🏽\200d♂":"1f6b4-1f3fd-2642","🚴🏼\200d♂":"1f6b4-1f3fc-2642","🚴🏻\200d♂":"1f6b4-1f3fb-2642","🚴🏿\200d♀":"1f6b4-1f3ff-2640","🚴🏾\200d♀":"1f6b4-1f3fe-2640","🚴🏽\200d♀":"1f6b4-1f3fd-2640","🚴🏼\200d♀":"1f6b4-1f3fc-2640","🚴🏻\200d♀":"1f6b4-1f3fb-2640","🚣🏿\200d♂":"1f6a3-1f3ff-2642","🚣🏾\200d♂":"1f6a3-1f3fe-2642","🚣🏽\200d♂":"1f6a3-1f3fd-2642","🚣🏼\200d♂":"1f6a3-1f3fc-2642","🚣🏻\200d♂":"1f6a3-1f3fb-2642","🚣🏿\200d♀":"1f6a3-1f3ff-2640","🚣🏾\200d♀":"1f6a3-1f3fe-2640","🚣🏽\200d♀":"1f6a3-1f3fd-2640","🚣🏼\200d♀":"1f6a3-1f3fc-2640","🚣🏻\200d♀":"1f6a3-1f3fb-2640","🏋🏿\200d♂":"1f3cb-1f3ff-2642","🏋🏾\200d♂":"1f3cb-1f3fe-2642","🏋🏽\200d♂":"1f3cb-1f3fd-2642","🏋🏼\200d♂":"1f3cb-1f3fc-2642","🏋🏻\200d♂":"1f3cb-1f3fb-2642","🏋🏿\200d♀":"1f3cb-1f3ff-2640","🏋🏾\200d♀":"1f3cb-1f3fe-2640","🏋🏽\200d♀":"1f3cb-1f3fd-2640","🏋🏼\200d♀":"1f3cb-1f3fc-2640","🏋🏻\200d♀":"1f3cb-1f3fb-2640","🏊🏿\200d♂":"1f3ca-1f3ff-2642","🏊🏾\200d♂":"1f3ca-1f3fe-2642","🏊🏽\200d♂":"1f3ca-1f3fd-2642","🏊🏼\200d♂":"1f3ca-1f3fc-2642","🏊🏻\200d♂":"1f3ca-1f3fb-2642","🏊🏿\200d♀":"1f3ca-1f3ff-2640","🏊🏾\200d♀":"1f3ca-1f3fe-2640","🏊🏽\200d♀":"1f3ca-1f3fd-2640","🏊🏼\200d♀":"1f3ca-1f3fc-2640","🏊🏻\200d♀":"1f3ca-1f3fb-2640","🏄🏿\200d♂":"1f3c4-1f3ff-2642","🏄🏾\200d♂":"1f3c4-1f3fe-2642","🏄🏽\200d♂":"1f3c4-1f3fd-2642","🏄🏼\200d♂":"1f3c4-1f3fc-2642","🏄🏻\200d♂":"1f3c4-1f3fb-2642","🏄🏿\200d♀":"1f3c4-1f3ff-2640","🏄🏾\200d♀":"1f3c4-1f3fe-2640","🏄🏽\200d♀":"1f3c4-1f3fd-2640","🏄🏼\200d♀":"1f3c4-1f3fc-2640","🏄🏻\200d♀":"1f3c4-1f3fb-2640","🏃🏿\200d♂":"1f3c3-1f3ff-2642","🏃🏾\200d♂":"1f3c3-1f3fe-2642","🏃🏽\200d♂":"1f3c3-1f3fd-2642","🏃🏼\200d♂":"1f3c3-1f3fc-2642","🏃🏻\200d♂":"1f3c3-1f3fb-2642","🏃🏿\200d♀":"1f3c3-1f3ff-2640","🏃🏾\200d♀":"1f3c3-1f3fe-2640","🏃🏽\200d♀":"1f3c3-1f3fd-2640","🏃🏼\200d♀":"1f3c3-1f3fc-2640","🏃🏻\200d♀":"1f3c3-1f3fb-2640","🤷🏿\200d♂":"1f937-1f3ff-2642","🤷🏾\200d♂":"1f937-1f3fe-2642","🤷🏽\200d♂":"1f937-1f3fd-2642","🤷🏼\200d♂":"1f937-1f3fc-2642","🤷🏻\200d♂":"1f937-1f3fb-2642","🤷🏿\200d♀":"1f937-1f3ff-2640","🤷🏾\200d♀":"1f937-1f3fe-2640","🤷🏽\200d♀":"1f937-1f3fd-2640","🤷🏼\200d♀":"1f937-1f3fc-2640","🤷🏻\200d♀":"1f937-1f3fb-2640","🤦🏿\200d♂":"1f926-1f3ff-2642","🤦🏾\200d♂":"1f926-1f3fe-2642","🤦🏽\200d♂":"1f926-1f3fd-2642","🤦🏼\200d♂":"1f926-1f3fc-2642","🤦🏻\200d♂":"1f926-1f3fb-2642","🤦🏿\200d♀":"1f926-1f3ff-2640","🤦🏾\200d♀":"1f926-1f3fe-2640","🤦🏽\200d♀":"1f926-1f3fd-2640","🤦🏼\200d♀":"1f926-1f3fc-2640","🤦🏻\200d♀":"1f926-1f3fb-2640","🙎🏿\200d♂":"1f64e-1f3ff-2642","🙎🏾\200d♂":"1f64e-1f3fe-2642","🙎🏽\200d♂":"1f64e-1f3fd-2642","🙎🏼\200d♂":"1f64e-1f3fc-2642","🙎🏻\200d♂":"1f64e-1f3fb-2642","🙎🏿\200d♀":"1f64e-1f3ff-2640","🙎🏾\200d♀":"1f64e-1f3fe-2640","🙎🏽\200d♀":"1f64e-1f3fd-2640","🙎🏼\200d♀":"1f64e-1f3fc-2640","🙎🏻\200d♀":"1f64e-1f3fb-2640","🙍🏿\200d♂":"1f64d-1f3ff-2642","🙍🏾\200d♂":"1f64d-1f3fe-2642","🙍🏽\200d♂":"1f64d-1f3fd-2642","🙍🏼\200d♂":"1f64d-1f3fc-2642","🙍🏻\200d♂":"1f64d-1f3fb-2642","🙍🏿\200d♀":"1f64d-1f3ff-2640","🙍🏾\200d♀":"1f64d-1f3fe-2640","🙍🏽\200d♀":"1f64d-1f3fd-2640","🙍🏼\200d♀":"1f64d-1f3fc-2640","🙍🏻\200d♀":"1f64d-1f3fb-2640","🙋🏿\200d♂":"1f64b-1f3ff-2642","🙋🏾\200d♂":"1f64b-1f3fe-2642","🙋🏽\200d♂":"1f64b-1f3fd-2642","🙋🏼\200d♂":"1f64b-1f3fc-2642","🙋🏻\200d♂":"1f64b-1f3fb-2642","🙋🏿\200d♀":"1f64b-1f3ff-2640","🙋🏾\200d♀":"1f64b-1f3fe-2640","🙋🏽\200d♀":"1f64b-1f3fd-2640","🙋🏼\200d♀":"1f64b-1f3fc-2640","🙋🏻\200d♀":"1f64b-1f3fb-2640","🙇🏿\200d♂":"1f647-1f3ff-2642","🙇🏾\200d♂":"1f647-1f3fe-2642","🙇🏽\200d♂":"1f647-1f3fd-2642","🙇🏼\200d♂":"1f647-1f3fc-2642","🙇🏻\200d♂":"1f647-1f3fb-2642","🙇🏿\200d♀":"1f647-1f3ff-2640","🙇🏾\200d♀":"1f647-1f3fe-2640","🙇🏽\200d♀":"1f647-1f3fd-2640","🙇🏼\200d♀":"1f647-1f3fc-2640","🙇🏻\200d♀":"1f647-1f3fb-2640","🙆🏿\200d♂":"1f646-1f3ff-2642","🙆🏾\200d♂":"1f646-1f3fe-2642","🙆🏽\200d♂":"1f646-1f3fd-2642","🙆🏼\200d♂":"1f646-1f3fc-2642","🙆🏻\200d♂":"1f646-1f3fb-2642","🙆🏿\200d♀":"1f646-1f3ff-2640","🙆🏾\200d♀":"1f646-1f3fe-2640","🙆🏽\200d♀":"1f646-1f3fd-2640","🙆🏼\200d♀":"1f646-1f3fc-2640","🙆🏻\200d♀":"1f646-1f3fb-2640","🙅🏿\200d♂":"1f645-1f3ff-2642","🙅🏾\200d♂":"1f645-1f3fe-2642","🙅🏽\200d♂":"1f645-1f3fd-2642","🙅🏼\200d♂":"1f645-1f3fc-2642","🙅🏻\200d♂":"1f645-1f3fb-2642","🙅🏿\200d♀":"1f645-1f3ff-2640","🙅🏾\200d♀":"1f645-1f3fe-2640","🙅🏽\200d♀":"1f645-1f3fd-2640","🙅🏼\200d♀":"1f645-1f3fc-2640","🙅🏻\200d♀":"1f645-1f3fb-2640","💇🏿\200d♂":"1f487-1f3ff-2642","💇🏾\200d♂":"1f487-1f3fe-2642","💇🏽\200d♂":"1f487-1f3fd-2642","💇🏼\200d♂":"1f487-1f3fc-2642","💇🏻\200d♂":"1f487-1f3fb-2642","💇🏿\200d♀":"1f487-1f3ff-2640","💇🏾\200d♀":"1f487-1f3fe-2640","💇🏽\200d♀":"1f487-1f3fd-2640","💇🏼\200d♀":"1f487-1f3fc-2640","💇🏻\200d♀":"1f487-1f3fb-2640","💆🏿\200d♂":"1f486-1f3ff-2642","💆🏾\200d♂":"1f486-1f3fe-2642","💆🏽\200d♂":"1f486-1f3fd-2642","💆🏼\200d♂":"1f486-1f3fc-2642","💆🏻\200d♂":"1f486-1f3fb-2642","💆🏿\200d♀":"1f486-1f3ff-2640","💆🏾\200d♀":"1f486-1f3fe-2640","💆🏽\200d♀":"1f486-1f3fd-2640","💆🏼\200d♀":"1f486-1f3fc-2640","💆🏻\200d♀":"1f486-1f3fb-2640","💁🏿\200d♂":"1f481-1f3ff-2642","💁🏾\200d♂":"1f481-1f3fe-2642","💁🏽\200d♂":"1f481-1f3fd-2642","💁🏼\200d♂":"1f481-1f3fc-2642","💁🏻\200d♂":"1f481-1f3fb-2642","💁🏿\200d♀":"1f481-1f3ff-2640","💁🏾\200d♀":"1f481-1f3fe-2640","💁🏽\200d♀":"1f481-1f3fd-2640","💁🏼\200d♀":"1f481-1f3fc-2640","💁🏻\200d♀":"1f481-1f3fb-2640","👱🏿\200d♂":"1f471-1f3ff-2642","👱🏾\200d♂":"1f471-1f3fe-2642","👱🏽\200d♂":"1f471-1f3fd-2642","👱🏼\200d♂":"1f471-1f3fc-2642","👱🏻\200d♂":"1f471-1f3fb-2642","👱🏿\200d♀":"1f471-1f3ff-2640","👱🏾\200d♀":"1f471-1f3fe-2640","👱🏽\200d♀":"1f471-1f3fd-2640","👱🏼\200d♀":"1f471-1f3fc-2640","👱🏻\200d♀":"1f471-1f3fb-2640","👳🏿\200d♂":"1f473-1f3ff-2642","👳🏾\200d♂":"1f473-1f3fe-2642","👳🏽\200d♂":"1f473-1f3fd-2642","👳🏼\200d♂":"1f473-1f3fc-2642","👳🏻\200d♂":"1f473-1f3fb-2642","👳🏿\200d♀":"1f473-1f3ff-2640","👳🏾\200d♀":"1f473-1f3fe-2640","👳🏽\200d♀":"1f473-1f3fd-2640","👳🏼\200d♀":"1f473-1f3fc-2640","👳🏻\200d♀":"1f473-1f3fb-2640","💂🏿\200d♂":"1f482-1f3ff-2642","💂🏾\200d♂":"1f482-1f3fe-2642","💂🏽\200d♂":"1f482-1f3fd-2642","💂🏼\200d♂":"1f482-1f3fc-2642","💂🏻\200d♂":"1f482-1f3fb-2642","💂🏿\200d♀":"1f482-1f3ff-2640","💂🏾\200d♀":"1f482-1f3fe-2640","💂🏽\200d♀":"1f482-1f3fd-2640","💂🏼\200d♀":"1f482-1f3fc-2640","💂🏻\200d♀":"1f482-1f3fb-2640","🕵🏿\200d♂":"1f575-1f3ff-2642","🕵🏾\200d♂":"1f575-1f3fe-2642","🕵🏽\200d♂":"1f575-1f3fd-2642","🕵🏼\200d♂":"1f575-1f3fc-2642","🕵🏻\200d♂":"1f575-1f3fb-2642","🕵🏿\200d♀":"1f575-1f3ff-2640","🕵🏾\200d♀":"1f575-1f3fe-2640","🕵🏽\200d♀":"1f575-1f3fd-2640","🕵🏼\200d♀":"1f575-1f3fc-2640","🕵🏻\200d♀":"1f575-1f3fb-2640","👷🏿\200d♂":"1f477-1f3ff-2642","👷🏾\200d♂":"1f477-1f3fe-2642","👷🏽\200d♂":"1f477-1f3fd-2642","👷🏼\200d♂":"1f477-1f3fc-2642","👷🏻\200d♂":"1f477-1f3fb-2642","👷🏿\200d♀":"1f477-1f3ff-2640","👷🏾\200d♀":"1f477-1f3fe-2640","👷🏽\200d♀":"1f477-1f3fd-2640","👷🏼\200d♀":"1f477-1f3fc-2640","👷🏻\200d♀":"1f477-1f3fb-2640","👮🏿\200d♂":"1f46e-1f3ff-2642","👮🏾\200d♂":"1f46e-1f3fe-2642","👮🏽\200d♂":"1f46e-1f3fd-2642","👮🏼\200d♂":"1f46e-1f3fc-2642","👮🏻\200d♂":"1f46e-1f3fb-2642","👮🏿\200d♀":"1f46e-1f3ff-2640","👮🏾\200d♀":"1f46e-1f3fe-2640","👮🏽\200d♀":"1f46e-1f3fd-2640","👮🏼\200d♀":"1f46e-1f3fc-2640","👮🏻\200d♀":"1f46e-1f3fb-2640","👨🏿\200d⚕":"1f468-1f3ff-2695","👨🏾\200d⚕":"1f468-1f3fe-2695","👨🏽\200d⚕":"1f468-1f3fd-2695","👨🏼\200d⚕":"1f468-1f3fc-2695","👨🏻\200d⚕":"1f468-1f3fb-2695","👩🏿\200d⚕":"1f469-1f3ff-2695","👩🏾\200d⚕":"1f469-1f3fe-2695","👩🏽\200d⚕":"1f469-1f3fd-2695","👩🏼\200d⚕":"1f469-1f3fc-2695","👩🏻\200d⚕":"1f469-1f3fb-2695","👨🏻\200d⚖":"1f468-1f3fb-2696","👨🏼\200d⚖":"1f468-1f3fc-2696","👨🏽\200d⚖":"1f468-1f3fd-2696","👨🏾\200d⚖":"1f468-1f3fe-2696","👨🏿\200d⚖":"1f468-1f3ff-2696","👩🏻\200d⚖":"1f469-1f3fb-2696","👩🏼\200d⚖":"1f469-1f3fc-2696","👩🏽\200d⚖":"1f469-1f3fd-2696","👩🏾\200d⚖":"1f469-1f3fe-2696","👩🏿\200d⚖":"1f469-1f3ff-2696","👨🏻\200d✈":"1f468-1f3fb-2708","👨🏼\200d✈":"1f468-1f3fc-2708","👨🏽\200d✈":"1f468-1f3fd-2708","👨🏾\200d✈":"1f468-1f3fe-2708","👨🏿\200d✈":"1f468-1f3ff-2708","👩🏻\200d✈":"1f469-1f3fb-2708","👩🏼\200d✈":"1f469-1f3fc-2708","👩🏽\200d✈":"1f469-1f3fd-2708","👩🏾\200d✈":"1f469-1f3fe-2708","👩🏿\200d✈":"1f469-1f3ff-2708","👨❤️👨":"1f468-2764-1f468","👩❤️👨":"1f469-2764-1f468","👩❤️👩":"1f469-2764-1f469","👨🏻⚕️":"1f468-1f3fb-2695","👨🏻⚖️":"1f468-1f3fb-2696","👨🏻✈️":"1f468-1f3fb-2708","👨🏼⚕️":"1f468-1f3fc-2695","👨🏼⚖️":"1f468-1f3fc-2696","👨🏼✈️":"1f468-1f3fc-2708","👨🏽⚕️":"1f468-1f3fd-2695","👨🏽⚖️":"1f468-1f3fd-2696","👨🏽✈️":"1f468-1f3fd-2708","👨🏾⚕️":"1f468-1f3fe-2695","👨🏾⚖️":"1f468-1f3fe-2696","👨🏾✈️":"1f468-1f3fe-2708","👨🏿⚕️":"1f468-1f3ff-2695","👨🏿⚖️":"1f468-1f3ff-2696","👨🏿✈️":"1f468-1f3ff-2708","👩🏻⚕️":"1f469-1f3fb-2695","👩🏻⚖️":"1f469-1f3fb-2696","👩🏻✈️":"1f469-1f3fb-2708","👩🏼⚕️":"1f469-1f3fc-2695","👩🏼⚖️":"1f469-1f3fc-2696","👩🏼✈️":"1f469-1f3fc-2708","👩🏽⚕️":"1f469-1f3fd-2695","👩🏽⚖️":"1f469-1f3fd-2696","👩🏽✈️":"1f469-1f3fd-2708","👩🏾⚕️":"1f469-1f3fe-2695","👩🏾⚖️":"1f469-1f3fe-2696","👩🏾✈️":"1f469-1f3fe-2708","👩🏿⚕️":"1f469-1f3ff-2695","👩🏿⚖️":"1f469-1f3ff-2696","👩🏿✈️":"1f469-1f3ff-2708","👮🏻♀️":"1f46e-1f3fb-2640","👮🏻♂️":"1f46e-1f3fb-2642","👮🏼♀️":"1f46e-1f3fc-2640","👮🏼♂️":"1f46e-1f3fc-2642","👮🏽♀️":"1f46e-1f3fd-2640","👮🏽♂️":"1f46e-1f3fd-2642","👮🏾♀️":"1f46e-1f3fe-2640","👮🏾♂️":"1f46e-1f3fe-2642","👮🏿♀️":"1f46e-1f3ff-2640","👮🏿♂️":"1f46e-1f3ff-2642","👱🏻♀️":"1f471-1f3fb-2640","👱🏻♂️":"1f471-1f3fb-2642","👱🏼♀️":"1f471-1f3fc-2640","👱🏼♂️":"1f471-1f3fc-2642","👱🏽♀️":"1f471-1f3fd-2640","👱🏽♂️":"1f471-1f3fd-2642","👱🏾♀️":"1f471-1f3fe-2640","👱🏾♂️":"1f471-1f3fe-2642","👱🏿♀️":"1f471-1f3ff-2640","👱🏿♂️":"1f471-1f3ff-2642","👳🏻♀️":"1f473-1f3fb-2640","👳🏻♂️":"1f473-1f3fb-2642","👳🏼♀️":"1f473-1f3fc-2640","👳🏼♂️":"1f473-1f3fc-2642","👳🏽♀️":"1f473-1f3fd-2640","👳🏽♂️":"1f473-1f3fd-2642","👳🏾♀️":"1f473-1f3fe-2640","👳🏾♂️":"1f473-1f3fe-2642","👳🏿♀️":"1f473-1f3ff-2640","👳🏿♂️":"1f473-1f3ff-2642","👷🏻♀️":"1f477-1f3fb-2640","👷🏻♂️":"1f477-1f3fb-2642","👷🏼♀️":"1f477-1f3fc-2640","👷🏼♂️":"1f477-1f3fc-2642","👷🏽♀️":"1f477-1f3fd-2640","👷🏽♂️":"1f477-1f3fd-2642","👷🏾♀️":"1f477-1f3fe-2640","👷🏾♂️":"1f477-1f3fe-2642","👷🏿♀️":"1f477-1f3ff-2640","👷🏿♂️":"1f477-1f3ff-2642","💂🏻♀️":"1f482-1f3fb-2640","💂🏻♂️":"1f482-1f3fb-2642","💂🏼♀️":"1f482-1f3fc-2640","💂🏼♂️":"1f482-1f3fc-2642","💂🏽♀️":"1f482-1f3fd-2640","💂🏽♂️":"1f482-1f3fd-2642","💂🏾♀️":"1f482-1f3fe-2640","💂🏾♂️":"1f482-1f3fe-2642","💂🏿♀️":"1f482-1f3ff-2640","💂🏿♂️":"1f482-1f3ff-2642","🏃🏻♀️":"1f3c3-1f3fb-2640","🏃🏻♂️":"1f3c3-1f3fb-2642","🏃🏼♀️":"1f3c3-1f3fc-2640","🏃🏼♂️":"1f3c3-1f3fc-2642","🏃🏽♀️":"1f3c3-1f3fd-2640","🏃🏽♂️":"1f3c3-1f3fd-2642","🏃🏾♀️":"1f3c3-1f3fe-2640","🏃🏾♂️":"1f3c3-1f3fe-2642","🏃🏿♀️":"1f3c3-1f3ff-2640","🏃🏿♂️":"1f3c3-1f3ff-2642","🏄🏻♀️":"1f3c4-1f3fb-2640","🏄🏻♂️":"1f3c4-1f3fb-2642","🏄🏼♀️":"1f3c4-1f3fc-2640","🏄🏼♂️":"1f3c4-1f3fc-2642","🏄🏽♀️":"1f3c4-1f3fd-2640","🏄🏽♂️":"1f3c4-1f3fd-2642","🏄🏾♀️":"1f3c4-1f3fe-2640","🏄🏾♂️":"1f3c4-1f3fe-2642","🏄🏿♀️":"1f3c4-1f3ff-2640","🏄🏿♂️":"1f3c4-1f3ff-2642","🏊🏻♀️":"1f3ca-1f3fb-2640","🏊🏻♂️":"1f3ca-1f3fb-2642","🏊🏼♀️":"1f3ca-1f3fc-2640","🏊🏼♂️":"1f3ca-1f3fc-2642","🏊🏽♀️":"1f3ca-1f3fd-2640","🏊🏽♂️":"1f3ca-1f3fd-2642","🏊🏾♀️":"1f3ca-1f3fe-2640","🏊🏾♂️":"1f3ca-1f3fe-2642","🏊🏿♀️":"1f3ca-1f3ff-2640","🏊🏿♂️":"1f3ca-1f3ff-2642","💆🏻♀️":"1f486-1f3fb-2640","💆🏻♂️":"1f486-1f3fb-2642","💆🏼♀️":"1f486-1f3fc-2640","💆🏼♂️":"1f486-1f3fc-2642","💆🏽♀️":"1f486-1f3fd-2640","💆🏽♂️":"1f486-1f3fd-2642","💆🏾♀️":"1f486-1f3fe-2640","💆🏾♂️":"1f486-1f3fe-2642","💆🏿♀️":"1f486-1f3ff-2640","💆🏿♂️":"1f486-1f3ff-2642","💇🏻♀️":"1f487-1f3fb-2640","💇🏻♂️":"1f487-1f3fb-2642","💇🏼♀️":"1f487-1f3fc-2640","💇🏼♂️":"1f487-1f3fc-2642","💇🏽♀️":"1f487-1f3fd-2640","💇🏽♂️":"1f487-1f3fd-2642","💇🏾♀️":"1f487-1f3fe-2640","💇🏾♂️":"1f487-1f3fe-2642","💇🏿♀️":"1f487-1f3ff-2640","💇🏿♂️":"1f487-1f3ff-2642","🚣🏻♀️":"1f6a3-1f3fb-2640","🚣🏻♂️":"1f6a3-1f3fb-2642","🚣🏼♀️":"1f6a3-1f3fc-2640","🚣🏼♂️":"1f6a3-1f3fc-2642","🚣🏽♀️":"1f6a3-1f3fd-2640","🚣🏽♂️":"1f6a3-1f3fd-2642","🚣🏾♀️":"1f6a3-1f3fe-2640","🚣🏾♂️":"1f6a3-1f3fe-2642","🚣🏿♀️":"1f6a3-1f3ff-2640","🚣🏿♂️":"1f6a3-1f3ff-2642","🚴🏻♀️":"1f6b4-1f3fb-2640","🚴🏻♂️":"1f6b4-1f3fb-2642","🚴🏼♀️":"1f6b4-1f3fc-2640","🚴🏼♂️":"1f6b4-1f3fc-2642","🚴🏽♀️":"1f6b4-1f3fd-2640","🚴🏽♂️":"1f6b4-1f3fd-2642","🚴🏾♀️":"1f6b4-1f3fe-2640","🚴🏾♂️":"1f6b4-1f3fe-2642","🚴🏿♀️":"1f6b4-1f3ff-2640","🚴🏿♂️":"1f6b4-1f3ff-2642","🚵🏻♀️":"1f6b5-1f3fb-2640","🚵🏻♂️":"1f6b5-1f3fb-2642","🚵🏼♀️":"1f6b5-1f3fc-2640","🚵🏼♂️":"1f6b5-1f3fc-2642","🚵🏽♀️":"1f6b5-1f3fd-2640","🚵🏽♂️":"1f6b5-1f3fd-2642","🚵🏾♀️":"1f6b5-1f3fe-2640","🚵🏾♂️":"1f6b5-1f3fe-2642","🚵🏿♀️":"1f6b5-1f3ff-2640","🚵🏿♂️":"1f6b5-1f3ff-2642","🚶🏻♀️":"1f6b6-1f3fb-2640","🚶🏻♂️":"1f6b6-1f3fb-2642","🚶🏼♀️":"1f6b6-1f3fc-2640","🚶🏼♂️":"1f6b6-1f3fc-2642","🚶🏽♀️":"1f6b6-1f3fd-2640","🚶🏽♂️":"1f6b6-1f3fd-2642","🚶🏾♀️":"1f6b6-1f3fe-2640","🚶🏾♂️":"1f6b6-1f3fe-2642","🚶🏿♀️":"1f6b6-1f3ff-2640","🚶🏿♂️":"1f6b6-1f3ff-2642","🤸🏻♀️":"1f938-1f3fb-2640","🤸🏻♂️":"1f938-1f3fb-2642","🤸🏼♀️":"1f938-1f3fc-2640","🤸🏼♂️":"1f938-1f3fc-2642","🤸🏽♀️":"1f938-1f3fd-2640","🤸🏽♂️":"1f938-1f3fd-2642","🤸🏾♀️":"1f938-1f3fe-2640","🤸🏾♂️":"1f938-1f3fe-2642","🤸🏿♀️":"1f938-1f3ff-2640","🤸🏿♂️":"1f938-1f3ff-2642","🤹🏻♀️":"1f939-1f3fb-2640","🤹🏻♂️":"1f939-1f3fb-2642","🤹🏼♀️":"1f939-1f3fc-2640","🤹🏼♂️":"1f939-1f3fc-2642","🤹🏽♀️":"1f939-1f3fd-2640","🤹🏽♂️":"1f939-1f3fd-2642","🤹🏾♀️":"1f939-1f3fe-2640","🤹🏾♂️":"1f939-1f3fe-2642","🤹🏿♀️":"1f939-1f3ff-2640","🤹🏿♂️":"1f939-1f3ff-2642","🤽🏻♀️":"1f93d-1f3fb-2640","🤽🏻♂️":"1f93d-1f3fb-2642","🤽🏼♀️":"1f93d-1f3fc-2640","🤽🏼♂️":"1f93d-1f3fc-2642","🤽🏽♀️":"1f93d-1f3fd-2640","🤽🏽♂️":"1f93d-1f3fd-2642","🤽🏾♀️":"1f93d-1f3fe-2640","🤽🏾♂️":"1f93d-1f3fe-2642","🤽🏿♀️":"1f93d-1f3ff-2640","🤽🏿♂️":"1f93d-1f3ff-2642","🤾🏻♀️":"1f93e-1f3fb-2640","🤾🏻♂️":"1f93e-1f3fb-2642","🤾🏼♀️":"1f93e-1f3fc-2640","🤾🏼♂️":"1f93e-1f3fc-2642","🤾🏽♀️":"1f93e-1f3fd-2640","🤾🏽♂️":"1f93e-1f3fd-2642","🤾🏾♀️":"1f93e-1f3fe-2640","🤾🏾♂️":"1f93e-1f3fe-2642","🤾🏿♀️":"1f93e-1f3ff-2640","🤾🏿♂️":"1f93e-1f3ff-2642","💁🏻♀️":"1f481-1f3fb-2640","💁🏻♂️":"1f481-1f3fb-2642","💁🏼♀️":"1f481-1f3fc-2640","💁🏼♂️":"1f481-1f3fc-2642","💁🏽♀️":"1f481-1f3fd-2640","💁🏽♂️":"1f481-1f3fd-2642","💁🏾♀️":"1f481-1f3fe-2640","💁🏾♂️":"1f481-1f3fe-2642","💁🏿♀️":"1f481-1f3ff-2640","💁🏿♂️":"1f481-1f3ff-2642","🙅🏻♀️":"1f645-1f3fb-2640","🙅🏻♂️":"1f645-1f3fb-2642","🙅🏼♀️":"1f645-1f3fc-2640","🙅🏼♂️":"1f645-1f3fc-2642","🙅🏽♀️":"1f645-1f3fd-2640","🙅🏽♂️":"1f645-1f3fd-2642","🙅🏾♀️":"1f645-1f3fe-2640","🙅🏾♂️":"1f645-1f3fe-2642","🙅🏿♀️":"1f645-1f3ff-2640","🙅🏿♂️":"1f645-1f3ff-2642","🙆🏻♀️":"1f646-1f3fb-2640","🙆🏻♂️":"1f646-1f3fb-2642","🙆🏼♀️":"1f646-1f3fc-2640","🙆🏼♂️":"1f646-1f3fc-2642","🙆🏽♀️":"1f646-1f3fd-2640","🙆🏽♂️":"1f646-1f3fd-2642","🙆🏾♀️":"1f646-1f3fe-2640","🙆🏾♂️":"1f646-1f3fe-2642","🙆🏿♀️":"1f646-1f3ff-2640","🙆🏿♂️":"1f646-1f3ff-2642","🙇🏻♀️":"1f647-1f3fb-2640","🙇🏻♂️":"1f647-1f3fb-2642","🙇🏼♀️":"1f647-1f3fc-2640","🙇🏼♂️":"1f647-1f3fc-2642","🙇🏽♀️":"1f647-1f3fd-2640","🙇🏽♂️":"1f647-1f3fd-2642","🙇🏾♀️":"1f647-1f3fe-2640","🙇🏾♂️":"1f647-1f3fe-2642","🙇🏿♀️":"1f647-1f3ff-2640","🙇🏿♂️":"1f647-1f3ff-2642","🙋🏻♀️":"1f64b-1f3fb-2640","🙋🏻♂️":"1f64b-1f3fb-2642","🙋🏼♀️":"1f64b-1f3fc-2640","🙋🏼♂️":"1f64b-1f3fc-2642","🙋🏽♀️":"1f64b-1f3fd-2640","🙋🏽♂️":"1f64b-1f3fd-2642","🙋🏾♀️":"1f64b-1f3fe-2640","🙋🏾♂️":"1f64b-1f3fe-2642","🙋🏿♀️":"1f64b-1f3ff-2640","🙋🏿♂️":"1f64b-1f3ff-2642","🙍🏻♀️":"1f64d-1f3fb-2640","🙍🏻♂️":"1f64d-1f3fb-2642","🙍🏼♀️":"1f64d-1f3fc-2640","🙍🏼♂️":"1f64d-1f3fc-2642","🙍🏽♀️":"1f64d-1f3fd-2640","🙍🏽♂️":"1f64d-1f3fd-2642","🙍🏾♀️":"1f64d-1f3fe-2640","🙍🏾♂️":"1f64d-1f3fe-2642","🙍🏿♀️":"1f64d-1f3ff-2640","🙍🏿♂️":"1f64d-1f3ff-2642","🙎🏻♀️":"1f64e-1f3fb-2640","🙎🏻♂️":"1f64e-1f3fb-2642","🙎🏼♀️":"1f64e-1f3fc-2640","🙎🏼♂️":"1f64e-1f3fc-2642","🙎🏽♀️":"1f64e-1f3fd-2640","🙎🏽♂️":"1f64e-1f3fd-2642","🙎🏾♀️":"1f64e-1f3fe-2640","🙎🏾♂️":"1f64e-1f3fe-2642","🙎🏿♀️":"1f64e-1f3ff-2640","🙎🏿♂️":"1f64e-1f3ff-2642","🤦🏻♀️":"1f926-1f3fb-2640","🤦🏻♂️":"1f926-1f3fb-2642","🤦🏼♀️":"1f926-1f3fc-2640","🤦🏼♂️":"1f926-1f3fc-2642","🤦🏽♀️":"1f926-1f3fd-2640","🤦🏽♂️":"1f926-1f3fd-2642","🤦🏾♀️":"1f926-1f3fe-2640","🤦🏾♂️":"1f926-1f3fe-2642","🤦🏿♀️":"1f926-1f3ff-2640","🤦🏿♂️":"1f926-1f3ff-2642","🤷🏻♀️":"1f937-1f3fb-2640","🤷🏻♂️":"1f937-1f3fb-2642","🤷🏼♀️":"1f937-1f3fc-2640","🤷🏼♂️":"1f937-1f3fc-2642","🤷🏽♀️":"1f937-1f3fd-2640","🤷🏽♂️":"1f937-1f3fd-2642","🤷🏾♀️":"1f937-1f3fe-2640","🤷🏾♂️":"1f937-1f3fe-2642","🤷🏿♀️":"1f937-1f3ff-2640","🤷🏿♂️":"1f937-1f3ff-2642","👁️🗨️":"1f441-1f5e8","🧙🏻\200d♀":"1f9d9-1f3fb-2640","🧙🏻♀️":"1f9d9-1f3fb-2640","🧙🏻\200d♂":"1f9d9-1f3fb-2642","🧙🏻♂️":"1f9d9-1f3fb-2642","🧙🏼\200d♀":"1f9d9-1f3fc-2640","🧙🏼♀️":"1f9d9-1f3fc-2640","🧙🏼\200d♂":"1f9d9-1f3fc-2642","🧙🏼♂️":"1f9d9-1f3fc-2642","🧙🏽\200d♀":"1f9d9-1f3fd-2640","🧙🏽♀️":"1f9d9-1f3fd-2640","🧙🏽\200d♂":"1f9d9-1f3fd-2642","🧙🏽♂️":"1f9d9-1f3fd-2642","🧙🏾\200d♀":"1f9d9-1f3fe-2640","🧙🏾♀️":"1f9d9-1f3fe-2640","🧙🏾\200d♂":"1f9d9-1f3fe-2642","🧙🏾♂️":"1f9d9-1f3fe-2642","🧙🏿\200d♀":"1f9d9-1f3ff-2640","🧙🏿♀️":"1f9d9-1f3ff-2640","🧙🏿\200d♂":"1f9d9-1f3ff-2642","🧙🏿♂️":"1f9d9-1f3ff-2642","🧚🏻\200d♀":"1f9da-1f3fb-2640","🧚🏻♀️":"1f9da-1f3fb-2640","🧚🏻\200d♂":"1f9da-1f3fb-2642","🧚🏻♂️":"1f9da-1f3fb-2642","🧚🏼\200d♀":"1f9da-1f3fc-2640","🧚🏼♀️":"1f9da-1f3fc-2640","🧚🏼\200d♂":"1f9da-1f3fc-2642","🧚🏼♂️":"1f9da-1f3fc-2642","🧚🏽\200d♀":"1f9da-1f3fd-2640","🧚🏽♀️":"1f9da-1f3fd-2640","🧚🏽\200d♂":"1f9da-1f3fd-2642","🧚🏽♂️":"1f9da-1f3fd-2642","🧚🏾\200d♀":"1f9da-1f3fe-2640","🧚🏾♀️":"1f9da-1f3fe-2640","🧚🏾\200d♂":"1f9da-1f3fe-2642","🧚🏾♂️":"1f9da-1f3fe-2642","🧚🏿\200d♀":"1f9da-1f3ff-2640","🧚🏿♀️":"1f9da-1f3ff-2640","🧚🏿\200d♂":"1f9da-1f3ff-2642","🧚🏿♂️":"1f9da-1f3ff-2642","🧛🏻\200d♀":"1f9db-1f3fb-2640","🧛🏻♀️":"1f9db-1f3fb-2640","🧛🏻\200d♂":"1f9db-1f3fb-2642","🧛🏻♂️":"1f9db-1f3fb-2642","🧛🏼\200d♀":"1f9db-1f3fc-2640","🧛🏼♀️":"1f9db-1f3fc-2640","🧛🏼\200d♂":"1f9db-1f3fc-2642","🧛🏼♂️":"1f9db-1f3fc-2642","🧛🏽\200d♀":"1f9db-1f3fd-2640","🧛🏽♀️":"1f9db-1f3fd-2640","🧛🏽\200d♂":"1f9db-1f3fd-2642","🧛🏽♂️":"1f9db-1f3fd-2642","🧛🏾\200d♀":"1f9db-1f3fe-2640","🧛🏾♀️":"1f9db-1f3fe-2640","🧛🏾\200d♂":"1f9db-1f3fe-2642","🧛🏾♂️":"1f9db-1f3fe-2642","🧛🏿\200d♀":"1f9db-1f3ff-2640","🧛🏿♀️":"1f9db-1f3ff-2640","🧛🏿\200d♂":"1f9db-1f3ff-2642","🧛🏿♂️":"1f9db-1f3ff-2642","🧜🏻\200d♀":"1f9dc-1f3fb-2640","🧜🏻♀️":"1f9dc-1f3fb-2640","🧜🏻\200d♂":"1f9dc-1f3fb-2642","🧜🏻♂️":"1f9dc-1f3fb-2642","🧜🏼\200d♀":"1f9dc-1f3fc-2640","🧜🏼♀️":"1f9dc-1f3fc-2640","🧜🏼\200d♂":"1f9dc-1f3fc-2642","🧜🏼♂️":"1f9dc-1f3fc-2642","🧜🏽\200d♀":"1f9dc-1f3fd-2640","🧜🏽♀️":"1f9dc-1f3fd-2640","🧜🏽\200d♂":"1f9dc-1f3fd-2642","🧜🏽♂️":"1f9dc-1f3fd-2642","🧜🏾\200d♀":"1f9dc-1f3fe-2640","🧜🏾♀️":"1f9dc-1f3fe-2640","🧜🏾\200d♂":"1f9dc-1f3fe-2642","🧜🏾♂️":"1f9dc-1f3fe-2642","🧜🏿\200d♀":"1f9dc-1f3ff-2640","🧜🏿♀️":"1f9dc-1f3ff-2640","🧜🏿\200d♂":"1f9dc-1f3ff-2642","🧜🏿♂️":"1f9dc-1f3ff-2642","🧝🏻\200d♀":"1f9dd-1f3fb-2640","🧝🏻♀️":"1f9dd-1f3fb-2640","🧝🏻\200d♂":"1f9dd-1f3fb-2642","🧝🏻♂️":"1f9dd-1f3fb-2642","🧝🏼\200d♀":"1f9dd-1f3fc-2640","🧝🏼♀️":"1f9dd-1f3fc-2640","🧝🏼\200d♂":"1f9dd-1f3fc-2642","🧝🏼♂️":"1f9dd-1f3fc-2642","🧝🏽\200d♀":"1f9dd-1f3fd-2640","🧝🏽♀️":"1f9dd-1f3fd-2640","🧝🏽\200d♂":"1f9dd-1f3fd-2642","🧝🏽♂️":"1f9dd-1f3fd-2642","🧝🏾\200d♀":"1f9dd-1f3fe-2640","🧝🏾♀️":"1f9dd-1f3fe-2640","🧝🏾\200d♂":"1f9dd-1f3fe-2642","🧝🏾♂️":"1f9dd-1f3fe-2642","🧝🏿\200d♀":"1f9dd-1f3ff-2640","🧝🏿♀️":"1f9dd-1f3ff-2640","🧝🏿\200d♂":"1f9dd-1f3ff-2642","🧝🏿♂️":"1f9dd-1f3ff-2642","🧖🏻\200d♀":"1f9d6-1f3fb-2640","🧖🏻♀️":"1f9d6-1f3fb-2640","🧖🏻\200d♂":"1f9d6-1f3fb-2642","🧖🏻♂️":"1f9d6-1f3fb-2642","🧖🏼\200d♀":"1f9d6-1f3fc-2640","🧖🏼♀️":"1f9d6-1f3fc-2640","🧖🏼\200d♂":"1f9d6-1f3fc-2642","🧖🏼♂️":"1f9d6-1f3fc-2642","🧖🏽\200d♀":"1f9d6-1f3fd-2640","🧖🏽♀️":"1f9d6-1f3fd-2640","🧖🏽\200d♂":"1f9d6-1f3fd-2642","🧖🏽♂️":"1f9d6-1f3fd-2642","🧖🏾\200d♀":"1f9d6-1f3fe-2640","🧖🏾♀️":"1f9d6-1f3fe-2640","🧖🏾\200d♂":"1f9d6-1f3fe-2642","🧖🏾♂️":"1f9d6-1f3fe-2642","🧖🏿\200d♀":"1f9d6-1f3ff-2640","🧖🏿♀️":"1f9d6-1f3ff-2640","🧖🏿\200d♂":"1f9d6-1f3ff-2642","🧖🏿♂️":"1f9d6-1f3ff-2642","🧗🏻\200d♀":"1f9d7-1f3fb-2640","🧗🏻♀️":"1f9d7-1f3fb-2640","🧗🏻\200d♂":"1f9d7-1f3fb-2642","🧗🏻♂️":"1f9d7-1f3fb-2642","🧗🏼\200d♀":"1f9d7-1f3fc-2640","🧗🏼♀️":"1f9d7-1f3fc-2640","🧗🏼\200d♂":"1f9d7-1f3fc-2642","🧗🏼♂️":"1f9d7-1f3fc-2642","🧗🏽\200d♀":"1f9d7-1f3fd-2640","🧗🏽♀️":"1f9d7-1f3fd-2640","🧗🏽\200d♂":"1f9d7-1f3fd-2642","🧗🏽♂️":"1f9d7-1f3fd-2642","🧗🏾\200d♀":"1f9d7-1f3fe-2640","🧗🏾♀️":"1f9d7-1f3fe-2640","🧗🏾\200d♂":"1f9d7-1f3fe-2642","🧗🏾♂️":"1f9d7-1f3fe-2642","🧗🏿\200d♀":"1f9d7-1f3ff-2640","🧗🏿♀️":"1f9d7-1f3ff-2640","🧗🏿\200d♂":"1f9d7-1f3ff-2642","🧗🏿♂️":"1f9d7-1f3ff-2642","🧘🏻\200d♀":"1f9d8-1f3fb-2640","🧘🏻♀️":"1f9d8-1f3fb-2640","🧘🏻\200d♂":"1f9d8-1f3fb-2642","🧘🏻♂️":"1f9d8-1f3fb-2642","🧘🏼\200d♀":"1f9d8-1f3fc-2640","🧘🏼♀️":"1f9d8-1f3fc-2640","🧘🏼\200d♂":"1f9d8-1f3fc-2642","🧘🏼♂️":"1f9d8-1f3fc-2642","🧘🏽\200d♀":"1f9d8-1f3fd-2640","🧘🏽♀️":"1f9d8-1f3fd-2640","🧘🏽\200d♂":"1f9d8-1f3fd-2642","🧘🏽♂️":"1f9d8-1f3fd-2642","🧘🏾\200d♀":"1f9d8-1f3fe-2640","🧘🏾♀️":"1f9d8-1f3fe-2640","🧘🏾\200d♂":"1f9d8-1f3fe-2642","🧘🏾♂️":"1f9d8-1f3fe-2642","🧘🏿\200d♀":"1f9d8-1f3ff-2640","🧘🏿♀️":"1f9d8-1f3ff-2640","🧘🏿\200d♂":"1f9d8-1f3ff-2642","🧘🏿♂️":"1f9d8-1f3ff-2642","👁\200d🗨️":"1f441-1f5e8","👁️\200d🗨":"1f441-1f5e8","🦸🏻\200d♀":"1f9b8-1f3fb-2640","🦸🏻♀️":"1f9b8-1f3fb-2640","🦸🏻\200d♂":"1f9b8-1f3fb-2642","🦸🏻♂️":"1f9b8-1f3fb-2642","🦸🏼\200d♀":"1f9b8-1f3fc-2640","🦸🏼♀️":"1f9b8-1f3fc-2640","🦸🏼\200d♂":"1f9b8-1f3fc-2642","🦸🏼♂️":"1f9b8-1f3fc-2642","🦸🏽\200d♀":"1f9b8-1f3fd-2640","🦸🏽♀️":"1f9b8-1f3fd-2640","🦸🏽\200d♂":"1f9b8-1f3fd-2642","🦸🏽♂️":"1f9b8-1f3fd-2642","🦸🏾\200d♀":"1f9b8-1f3fe-2640","🦸🏾♀️":"1f9b8-1f3fe-2640","🦸🏾\200d♂":"1f9b8-1f3fe-2642","🦸🏾♂️":"1f9b8-1f3fe-2642","🦸🏿\200d♀":"1f9b8-1f3ff-2640","🦸🏿♀️":"1f9b8-1f3ff-2640","🦸🏿\200d♂":"1f9b8-1f3ff-2642","🦸🏿♂️":"1f9b8-1f3ff-2642","🦹🏻\200d♀":"1f9b9-1f3fb-2640","🦹🏻♀️":"1f9b9-1f3fb-2640","🦹🏻\200d♂":"1f9b9-1f3fb-2642","🦹🏻♂️":"1f9b9-1f3fb-2642","🦹🏼\200d♀":"1f9b9-1f3fc-2640","🦹🏼♀️":"1f9b9-1f3fc-2640","🦹🏼\200d♂":"1f9b9-1f3fc-2642","🦹🏼♂️":"1f9b9-1f3fc-2642","🦹🏽\200d♀":"1f9b9-1f3fd-2640","🦹🏽♀️":"1f9b9-1f3fd-2640","🦹🏽\200d♂":"1f9b9-1f3fd-2642","🦹🏽♂️":"1f9b9-1f3fd-2642","🦹🏾\200d♀":"1f9b9-1f3fe-2640","🦹🏾♀️":"1f9b9-1f3fe-2640","🦹🏾\200d♂":"1f9b9-1f3fe-2642","🦹🏾♂️":"1f9b9-1f3fe-2642","🦹🏿\200d♀":"1f9b9-1f3ff-2640","🦹🏿♀️":"1f9b9-1f3ff-2640","🦹🏿\200d♂":"1f9b9-1f3ff-2642","🦹🏿♂️":"1f9b9-1f3ff-2642","⛹🏿\200d♂":"26f9-1f3ff-2642","⛹🏾\200d♂":"26f9-1f3fe-2642","⛹🏽\200d♂":"26f9-1f3fd-2642","⛹🏼\200d♂":"26f9-1f3fc-2642","⛹🏻\200d♂":"26f9-1f3fb-2642","⛹🏿\200d♀":"26f9-1f3ff-2640","⛹🏾\200d♀":"26f9-1f3fe-2640","⛹🏽\200d♀":"26f9-1f3fd-2640","⛹🏼\200d♀":"26f9-1f3fc-2640","⛹🏻\200d♀":"26f9-1f3fb-2640","👨\200d⚕️":"1f468-2695","👨\200d⚖️":"1f468-2696","👨\200d✈️":"1f468-2708","👩\200d⚕️":"1f469-2695","👩\200d⚖️":"1f469-2696","👩\200d✈️":"1f469-2708","👮\200d♀️":"1f46e-2640","👮\200d♂️":"1f46e-2642","👱\200d♀️":"1f471-2640","👱\200d♂️":"1f471-2642","👳\200d♀️":"1f473-2640","👳\200d♂️":"1f473-2642","👷\200d♀️":"1f477-2640","👷\200d♂️":"1f477-2642","💂\200d♀️":"1f482-2640","💂\200d♂️":"1f482-2642","🕵️♀️":"1f575-2640","🕵️♂️":"1f575-2642","🏃\200d♀️":"1f3c3-2640","🏃\200d♂️":"1f3c3-2642","🏄\200d♀️":"1f3c4-2640","🏄\200d♂️":"1f3c4-2642","🏊\200d♀️":"1f3ca-2640","🏊\200d♂️":"1f3ca-2642","🏋️♀️":"1f3cb-2640","🏋️♂️":"1f3cb-2642","🏌️♀️":"1f3cc-2640","🏌️♂️":"1f3cc-2642","👯\200d♀️":"1f46f-2640","👯\200d♂️":"1f46f-2642","💆\200d♀️":"1f486-2640","💆\200d♂️":"1f486-2642","💇\200d♀️":"1f487-2640","💇\200d♂️":"1f487-2642","🚣\200d♀️":"1f6a3-2640","🚣\200d♂️":"1f6a3-2642","🚴\200d♀️":"1f6b4-2640","🚴\200d♂️":"1f6b4-2642","🚵\200d♀️":"1f6b5-2640","🚵\200d♂️":"1f6b5-2642","🚶\200d♀️":"1f6b6-2640","🚶\200d♂️":"1f6b6-2642","🤸\200d♀️":"1f938-2640","🤸\200d♂️":"1f938-2642","🤹\200d♀️":"1f939-2640","🤹\200d♂️":"1f939-2642","🤼\200d♀️":"1f93c-2640","🤼\200d♂️":"1f93c-2642","🤽\200d♀️":"1f93d-2640","🤽\200d♂️":"1f93d-2642","🤾\200d♀️":"1f93e-2640","🤾\200d♂️":"1f93e-2642","💁\200d♀️":"1f481-2640","💁\200d♂️":"1f481-2642","🙅\200d♀️":"1f645-2640","🙅\200d♂️":"1f645-2642","🙆\200d♀️":"1f646-2640","🙆\200d♂️":"1f646-2642","🙇\200d♀️":"1f647-2640","🙇\200d♂️":"1f647-2642","🙋\200d♀️":"1f64b-2640","🙋\200d♂️":"1f64b-2642","🙍\200d♀️":"1f64d-2640","🙍\200d♂️":"1f64d-2642","🙎\200d♀️":"1f64e-2640","🙎\200d♂️":"1f64e-2642","🤦\200d♀️":"1f926-2640","🤦\200d♂️":"1f926-2642","🤷\200d♀️":"1f937-2640","🤷\200d♂️":"1f937-2642","🧙\200d♀️":"1f9d9-2640","🧙\200d♂️":"1f9d9-2642","🧚\200d♀️":"1f9da-2640","🧚\200d♂️":"1f9da-2642","🧛\200d♀️":"1f9db-2640","🧛\200d♂️":"1f9db-2642","🧜\200d♀️":"1f9dc-2640","🧜\200d♂️":"1f9dc-2642","🧝\200d♀️":"1f9dd-2640","🧝\200d♂️":"1f9dd-2642","🧞\200d♀️":"1f9de-2640","🧞\200d♂️":"1f9de-2642","🧟\200d♀️":"1f9df-2640","🧟\200d♂️":"1f9df-2642","🧖\200d♀️":"1f9d6-2640","🧖\200d♂️":"1f9d6-2642","🧗\200d♀️":"1f9d7-2640","🧗\200d♂️":"1f9d7-2642","🧘\200d♀️":"1f9d8-2640","🧘\200d♂️":"1f9d8-2642","🕵\200d♀️":"1f575-2640","🕵️\200d♀":"1f575-2640","🕵\200d♂️":"1f575-2642","🕵️\200d♂":"1f575-2642","🏋\200d♀️":"1f3cb-2640","🏋️\200d♀":"1f3cb-2640","🏋\200d♂️":"1f3cb-2642","🏋️\200d♂":"1f3cb-2642","🏌\200d♀️":"1f3cc-2640","🏌️\200d♀":"1f3cc-2640","🏌\200d♂️":"1f3cc-2642","🏌️\200d♂":"1f3cc-2642","🦸\200d♀️":"1f9b8-2640","🦸\200d♂️":"1f9b8-2642","🦹\200d♀️":"1f9b9-2640","🦹\200d♂️":"1f9b9-2642","🏴\200d☠️":"1f3f4-2620","⛹️♀️":"26f9-2640","⛹️♂️":"26f9-2642","⛹\200d♀️":"26f9-2640","⛹️\200d♀":"26f9-2640","⛹\200d♂️":"26f9-2642","⛹️\200d♂":"26f9-2642","👨👨👦":"1f468-1f468-1f466","👨👨👧":"1f468-1f468-1f467","👨👩👧":"1f468-1f469-1f467","👩👩👦":"1f469-1f469-1f466","👩👩👧":"1f469-1f469-1f467","👨👦👦":"1f468-1f466-1f466","👨👧👦":"1f468-1f467-1f466","👩👦👦":"1f469-1f466-1f466","👩👧👦":"1f469-1f467-1f466","👩👧👧":"1f469-1f467-1f467","👨🏻🎨":"1f468-1f3fb-1f3a8","👨🏼🎨":"1f468-1f3fc-1f3a8","👨🏽🎨":"1f468-1f3fd-1f3a8","👨🏾🎨":"1f468-1f3fe-1f3a8","👨🏿🎨":"1f468-1f3ff-1f3a8","👩🏻🎨":"1f469-1f3fb-1f3a8","👩🏼🎨":"1f469-1f3fc-1f3a8","👩🏽🎨":"1f469-1f3fd-1f3a8","👩🏾🎨":"1f469-1f3fe-1f3a8","👩🏿🎨":"1f469-1f3ff-1f3a8","👨🏻🚀":"1f468-1f3fb-1f680","👨🏼🚀":"1f468-1f3fc-1f680","👨🏽🚀":"1f468-1f3fd-1f680","👨🏾🚀":"1f468-1f3fe-1f680","👨🏿🚀":"1f468-1f3ff-1f680","👩🏻🚀":"1f469-1f3fb-1f680","👩🏼🚀":"1f469-1f3fc-1f680","👩🏽🚀":"1f469-1f3fd-1f680","👩🏾🚀":"1f469-1f3fe-1f680","👩🏿🚀":"1f469-1f3ff-1f680","👨🏻🚒":"1f468-1f3fb-1f692","👨🏼🚒":"1f468-1f3fc-1f692","👨🏽🚒":"1f468-1f3fd-1f692","👨🏾🚒":"1f468-1f3fe-1f692","👨🏿🚒":"1f468-1f3ff-1f692","👩🏻🚒":"1f469-1f3fb-1f692","👩🏼🚒":"1f469-1f3fc-1f692","👩🏽🚒":"1f469-1f3fd-1f692","👩🏾🚒":"1f469-1f3fe-1f692","👩🏿🚒":"1f469-1f3ff-1f692","👨👩👦":"1f468-1f469-1f466","👨👧👧":"1f468-1f467-1f467","👨🏻🌾":"1f468-1f3fb-1f33e","👨🏻🍳":"1f468-1f3fb-1f373","👨🏻🎓":"1f468-1f3fb-1f393","👨🏻🎤":"1f468-1f3fb-1f3a4","👨🏻🏫":"1f468-1f3fb-1f3eb","👨🏻🏭":"1f468-1f3fb-1f3ed","👨🏻💻":"1f468-1f3fb-1f4bb","👨🏻💼":"1f468-1f3fb-1f4bc","👨🏻🔧":"1f468-1f3fb-1f527","👨🏻🔬":"1f468-1f3fb-1f52c","👨🏼🌾":"1f468-1f3fc-1f33e","👨🏼🍳":"1f468-1f3fc-1f373","👨🏼🎓":"1f468-1f3fc-1f393","👨🏼🎤":"1f468-1f3fc-1f3a4","👨🏼🏫":"1f468-1f3fc-1f3eb","👨🏼🏭":"1f468-1f3fc-1f3ed","👨🏼💻":"1f468-1f3fc-1f4bb","👨🏼💼":"1f468-1f3fc-1f4bc","👨🏼🔧":"1f468-1f3fc-1f527","👨🏼🔬":"1f468-1f3fc-1f52c","👨🏽🌾":"1f468-1f3fd-1f33e","👨🏽🍳":"1f468-1f3fd-1f373","👨🏽🎓":"1f468-1f3fd-1f393","👨🏽🎤":"1f468-1f3fd-1f3a4","👨🏽🏫":"1f468-1f3fd-1f3eb","👨🏽🏭":"1f468-1f3fd-1f3ed","👨🏽💻":"1f468-1f3fd-1f4bb","👨🏽💼":"1f468-1f3fd-1f4bc","👨🏽🔧":"1f468-1f3fd-1f527","👨🏽🔬":"1f468-1f3fd-1f52c","👨🏾🌾":"1f468-1f3fe-1f33e","👨🏾🍳":"1f468-1f3fe-1f373","👨🏾🎓":"1f468-1f3fe-1f393","👨🏾🎤":"1f468-1f3fe-1f3a4","👨🏾🏫":"1f468-1f3fe-1f3eb","👨🏾🏭":"1f468-1f3fe-1f3ed","👨🏾💻":"1f468-1f3fe-1f4bb","👨🏾💼":"1f468-1f3fe-1f4bc","👨🏾🔧":"1f468-1f3fe-1f527","👨🏾🔬":"1f468-1f3fe-1f52c","👨🏿🌾":"1f468-1f3ff-1f33e","👨🏿🍳":"1f468-1f3ff-1f373","👨🏿🎓":"1f468-1f3ff-1f393","👨🏿🎤":"1f468-1f3ff-1f3a4","👨🏿🏫":"1f468-1f3ff-1f3eb","👨🏿🏭":"1f468-1f3ff-1f3ed","👨🏿💻":"1f468-1f3ff-1f4bb","👨🏿💼":"1f468-1f3ff-1f4bc","👨🏿🔧":"1f468-1f3ff-1f527","👨🏿🔬":"1f468-1f3ff-1f52c","👩🏻🌾":"1f469-1f3fb-1f33e","👩🏻🍳":"1f469-1f3fb-1f373","👩🏻🎓":"1f469-1f3fb-1f393","👩🏻🎤":"1f469-1f3fb-1f3a4","👩🏻🏫":"1f469-1f3fb-1f3eb","👩🏻🏭":"1f469-1f3fb-1f3ed","👩🏻💻":"1f469-1f3fb-1f4bb","👩🏻💼":"1f469-1f3fb-1f4bc","👩🏻🔧":"1f469-1f3fb-1f527","👩🏻🔬":"1f469-1f3fb-1f52c","👩🏼🌾":"1f469-1f3fc-1f33e","👩🏼🍳":"1f469-1f3fc-1f373","👩🏼🎓":"1f469-1f3fc-1f393","👩🏼🎤":"1f469-1f3fc-1f3a4","👩🏼🏫":"1f469-1f3fc-1f3eb","👩🏼🏭":"1f469-1f3fc-1f3ed","👩🏼💻":"1f469-1f3fc-1f4bb","👩🏼💼":"1f469-1f3fc-1f4bc","👩🏼🔧":"1f469-1f3fc-1f527","👩🏼🔬":"1f469-1f3fc-1f52c","👩🏽🌾":"1f469-1f3fd-1f33e","👩🏽🍳":"1f469-1f3fd-1f373","👩🏽🎓":"1f469-1f3fd-1f393","👩🏽🎤":"1f469-1f3fd-1f3a4","👩🏽🏫":"1f469-1f3fd-1f3eb","👩🏽🏭":"1f469-1f3fd-1f3ed","👩🏽💻":"1f469-1f3fd-1f4bb","👩🏽💼":"1f469-1f3fd-1f4bc","👩🏽🔧":"1f469-1f3fd-1f527","👩🏽🔬":"1f469-1f3fd-1f52c","👩🏾🌾":"1f469-1f3fe-1f33e","👩🏾🍳":"1f469-1f3fe-1f373","👩🏾🎓":"1f469-1f3fe-1f393","👩🏾🎤":"1f469-1f3fe-1f3a4","👩🏾🏫":"1f469-1f3fe-1f3eb","👩🏾🏭":"1f469-1f3fe-1f3ed","👩🏾💻":"1f469-1f3fe-1f4bb","👩🏾💼":"1f469-1f3fe-1f4bc","👩🏾🔧":"1f469-1f3fe-1f527","👩🏾🔬":"1f469-1f3fe-1f52c","👩🏿🌾":"1f469-1f3ff-1f33e","👩🏿🍳":"1f469-1f3ff-1f373","👩🏿🎓":"1f469-1f3ff-1f393","👩🏿🎤":"1f469-1f3ff-1f3a4","👩🏿🏫":"1f469-1f3ff-1f3eb","👩🏿🏭":"1f469-1f3ff-1f3ed","👩🏿💻":"1f469-1f3ff-1f4bb","👩🏿💼":"1f469-1f3ff-1f4bc","👩🏿🔧":"1f469-1f3ff-1f527","👩🏿🔬":"1f469-1f3ff-1f52c","👨🏻🦰":"1f468-1f3fb-1f9b0","👨🏻🦱":"1f468-1f3fb-1f9b1","👨🏻🦲":"1f468-1f3fb-1f9b2","👨🏻🦳":"1f468-1f3fb-1f9b3","👨🏼🦰":"1f468-1f3fc-1f9b0","👨🏼🦱":"1f468-1f3fc-1f9b1","👨🏼🦲":"1f468-1f3fc-1f9b2","👨🏼🦳":"1f468-1f3fc-1f9b3","👨🏽🦰":"1f468-1f3fd-1f9b0","👨🏽🦱":"1f468-1f3fd-1f9b1","👨🏽🦲":"1f468-1f3fd-1f9b2","👨🏽🦳":"1f468-1f3fd-1f9b3","👨🏾🦰":"1f468-1f3fe-1f9b0","👨🏾🦱":"1f468-1f3fe-1f9b1","👨🏾🦲":"1f468-1f3fe-1f9b2","👨🏾🦳":"1f468-1f3fe-1f9b3","👨🏿🦰":"1f468-1f3ff-1f9b0","👨🏿🦱":"1f468-1f3ff-1f9b1","👨🏿🦲":"1f468-1f3ff-1f9b2","👨🏿🦳":"1f468-1f3ff-1f9b3","👩🏻🦰":"1f469-1f3fb-1f9b0","👩🏻🦱":"1f469-1f3fb-1f9b1","👩🏻🦲":"1f469-1f3fb-1f9b2","👩🏻🦳":"1f469-1f3fb-1f9b3","👩🏼🦰":"1f469-1f3fc-1f9b0","👩🏼🦱":"1f469-1f3fc-1f9b1","👩🏼🦲":"1f469-1f3fc-1f9b2","👩🏼🦳":"1f469-1f3fc-1f9b3","👩🏽🦰":"1f469-1f3fd-1f9b0","👩🏽🦱":"1f469-1f3fd-1f9b1","👩🏽🦲":"1f469-1f3fd-1f9b2","👩🏽🦳":"1f469-1f3fd-1f9b3","👩🏾🦰":"1f469-1f3fe-1f9b0","👩🏾🦱":"1f469-1f3fe-1f9b1","👩🏾🦲":"1f469-1f3fe-1f9b2","👩🏾🦳":"1f469-1f3fe-1f9b3","👩🏿🦰":"1f469-1f3ff-1f9b0","👩🏿🦱":"1f469-1f3ff-1f9b1","👩🏿🦲":"1f469-1f3ff-1f9b2","👩🏿🦳":"1f469-1f3ff-1f9b3","👁\200d🗨":"1f441-1f5e8","👨\200d💻":"1f468-1f4bb","👩\200d💻":"1f469-1f4bb","👨\200d🏫":"1f468-1f3eb","👩\200d🏫":"1f469-1f3eb","👨\200d🎓":"1f468-1f393","👩\200d🎓":"1f469-1f393","👨\200d🎤":"1f468-1f3a4","👩\200d🎤":"1f469-1f3a4","👨\200d🔬":"1f468-1f52c","👩\200d🔬":"1f469-1f52c","👨\200d💼":"1f468-1f4bc","👩\200d💼":"1f469-1f4bc","👨\200d🔧":"1f468-1f527","👩\200d🔧":"1f469-1f527","👨\200d🏭":"1f468-1f3ed","👩\200d🏭":"1f469-1f3ed","👨\200d🍳":"1f468-1f373","👩\200d🍳":"1f469-1f373","👨\200d🌾":"1f468-1f33e","👩\200d🌾":"1f469-1f33e","👨\200d👦":"1f468-1f466","👨\200d👧":"1f468-1f467","👩\200d👦":"1f469-1f466","👩\200d👧":"1f469-1f467","👨\200d🎨":"1f468-1f3a8","👩\200d🎨":"1f469-1f3a8","👨\200d🚀":"1f468-1f680","👩\200d🚀":"1f469-1f680","👨\200d🚒":"1f468-1f692","👩\200d🚒":"1f469-1f692","🏋️🏻":"1f3cb-1f3fb","🏋️🏼":"1f3cb-1f3fc","🏋️🏽":"1f3cb-1f3fd","🏋️🏾":"1f3cb-1f3fe","🏋️🏿":"1f3cb-1f3ff","🏌️🏻":"1f3cc-1f3fb","🏌️🏼":"1f3cc-1f3fc","🏌️🏽":"1f3cc-1f3fd","🏌️🏾":"1f3cc-1f3fe","🏌️🏿":"1f3cc-1f3ff","🕴️🏻":"1f574-1f3fb","🕴️🏼":"1f574-1f3fc","🕴️🏽":"1f574-1f3fd","🕴️🏾":"1f574-1f3fe","🕴️🏿":"1f574-1f3ff","🕵️🏻":"1f575-1f3fb","🕵️🏼":"1f575-1f3fc","🕵️🏽":"1f575-1f3fd","🕵️🏾":"1f575-1f3fe","🕵️🏿":"1f575-1f3ff","🖐️🏻":"1f590-1f3fb","🖐️🏼":"1f590-1f3fc","🖐️🏽":"1f590-1f3fd","🖐️🏾":"1f590-1f3fe","🖐️🏿":"1f590-1f3ff","🏳\200d🌈":"1f3f3-1f308","🏳️🌈":"1f3f3-1f308","👨\200d🦰":"1f468-1f9b0","👨\200d🦱":"1f468-1f9b1","👨\200d🦲":"1f468-1f9b2","👨\200d🦳":"1f468-1f9b3","👩\200d🦰":"1f469-1f9b0","👩\200d🦱":"1f469-1f9b1","👩\200d🦲":"1f469-1f9b2","👩\200d🦳":"1f469-1f9b3","👯\200d♂":"1f46f-2642","👯\200d♀":"1f46f-2640","🤼\200d♂":"1f93c-2642","🤼\200d♀":"1f93c-2640","🤹\200d♂":"1f939-2642","🤹\200d♀":"1f939-2640","🤾\200d♂":"1f93e-2642","🤾\200d♀":"1f93e-2640","🤽\200d♂":"1f93d-2642","🤽\200d♀":"1f93d-2640","🤸\200d♂":"1f938-2642","🤸\200d♀":"1f938-2640","🚶\200d♂":"1f6b6-2642","🚶\200d♀":"1f6b6-2640","🚵\200d♂":"1f6b5-2642","🚵\200d♀":"1f6b5-2640","🚴\200d♂":"1f6b4-2642","🚴\200d♀":"1f6b4-2640","🚣\200d♂":"1f6a3-2642","🚣\200d♀":"1f6a3-2640","🏊\200d♂":"1f3ca-2642","🏊\200d♀":"1f3ca-2640","🏄\200d♂":"1f3c4-2642","🏄\200d♀":"1f3c4-2640","🏃\200d♂":"1f3c3-2642","🏃\200d♀":"1f3c3-2640","🤷\200d♂":"1f937-2642","🤷\200d♀":"1f937-2640","🤦\200d♂":"1f926-2642","🤦\200d♀":"1f926-2640","🙎\200d♂":"1f64e-2642","🙎\200d♀":"1f64e-2640","🙍\200d♂":"1f64d-2642","🙍\200d♀":"1f64d-2640","🙋\200d♂":"1f64b-2642","🙋\200d♀":"1f64b-2640","🙇\200d♂":"1f647-2642","🙇\200d♀":"1f647-2640","🙆\200d♂":"1f646-2642","🙆\200d♀":"1f646-2640","🙅\200d♂":"1f645-2642","🙅\200d♀":"1f645-2640","💇\200d♂":"1f487-2642","💇\200d♀":"1f487-2640","💆\200d♂":"1f486-2642","💆\200d♀":"1f486-2640","💁\200d♂":"1f481-2642","💁\200d♀":"1f481-2640","👱\200d♂":"1f471-2642","👱\200d♀":"1f471-2640","👳\200d♂":"1f473-2642","👳\200d♀":"1f473-2640","💂\200d♂":"1f482-2642","💂\200d♀":"1f482-2640","👷\200d♂":"1f477-2642","👷\200d♀":"1f477-2640","👮\200d♂":"1f46e-2642","👮\200d♀":"1f46e-2640","👨\200d⚕":"1f468-2695","👩\200d⚕":"1f469-2695","👨\200d⚖":"1f468-2696","👩\200d⚖":"1f469-2696","👨\200d✈":"1f468-2708","👩\200d✈":"1f469-2708","☝️🏻":"261d-1f3fb","☝️🏼":"261d-1f3fc","☝️🏽":"261d-1f3fd","☝️🏾":"261d-1f3fe","☝️🏿":"261d-1f3ff","⛹️🏻":"26f9-1f3fb","⛹️🏼":"26f9-1f3fc","⛹️🏽":"26f9-1f3fd","⛹️🏾":"26f9-1f3fe","⛹️🏿":"26f9-1f3ff","✌️🏻":"270c-1f3fb","✌️🏼":"270c-1f3fc","✌️🏽":"270c-1f3fd","✌️🏾":"270c-1f3fe","✌️🏿":"270c-1f3ff","✍️🏻":"270d-1f3fb","✍️🏼":"270d-1f3fc","✍️🏽":"270d-1f3fd","✍️🏾":"270d-1f3fe","✍️🏿":"270d-1f3ff","👨⚕️":"1f468-2695","👨⚖️":"1f468-2696","👨✈️":"1f468-2708","👩⚕️":"1f469-2695","👩⚖️":"1f469-2696","👩✈️":"1f469-2708","👮♀️":"1f46e-2640","👮♂️":"1f46e-2642","👱♀️":"1f471-2640","👱♂️":"1f471-2642","👳♀️":"1f473-2640","👳♂️":"1f473-2642","👷♀️":"1f477-2640","👷♂️":"1f477-2642","💂♀️":"1f482-2640","💂♂️":"1f482-2642","🕵\200d♀":"1f575-2640","🕵\200d♂":"1f575-2642","🏃♀️":"1f3c3-2640","🏃♂️":"1f3c3-2642","🏄♀️":"1f3c4-2640","🏄♂️":"1f3c4-2642","🏊♀️":"1f3ca-2640","🏊♂️":"1f3ca-2642","🏋\200d♀":"1f3cb-2640","🏋\200d♂":"1f3cb-2642","🏌\200d♀":"1f3cc-2640","🏌\200d♂":"1f3cc-2642","👯♀️":"1f46f-2640","👯♂️":"1f46f-2642","💆♀️":"1f486-2640","💆♂️":"1f486-2642","💇♀️":"1f487-2640","💇♂️":"1f487-2642","🚣♀️":"1f6a3-2640","🚣♂️":"1f6a3-2642","🚴♀️":"1f6b4-2640","🚴♂️":"1f6b4-2642","🚵♀️":"1f6b5-2640","🚵♂️":"1f6b5-2642","🚶♀️":"1f6b6-2640","🚶♂️":"1f6b6-2642","🤸♀️":"1f938-2640","🤸♂️":"1f938-2642","🤹♀️":"1f939-2640","🤹♂️":"1f939-2642","🤼♀️":"1f93c-2640","🤼♂️":"1f93c-2642","🤽♀️":"1f93d-2640","🤽♂️":"1f93d-2642","🤾♀️":"1f93e-2640","🤾♂️":"1f93e-2642","💁♀️":"1f481-2640","💁♂️":"1f481-2642","🙅♀️":"1f645-2640","🙅♂️":"1f645-2642","🙆♀️":"1f646-2640","🙆♂️":"1f646-2642","🙇♀️":"1f647-2640","🙇♂️":"1f647-2642","🙋♀️":"1f64b-2640","🙋♂️":"1f64b-2642","🙍♀️":"1f64d-2640","🙍♂️":"1f64d-2642","🙎♀️":"1f64e-2640","🙎♂️":"1f64e-2642","🤦♀️":"1f926-2640","🤦♂️":"1f926-2642","🤷♀️":"1f937-2640","🤷♂️":"1f937-2642","🧙\200d♀":"1f9d9-2640","🧙♀️":"1f9d9-2640","🧙\200d♂":"1f9d9-2642","🧙♂️":"1f9d9-2642","🧚\200d♀":"1f9da-2640","🧚♀️":"1f9da-2640","🧚\200d♂":"1f9da-2642","🧚♂️":"1f9da-2642","🧛\200d♀":"1f9db-2640","🧛♀️":"1f9db-2640","🧛\200d♂":"1f9db-2642","🧛♂️":"1f9db-2642","🧜\200d♀":"1f9dc-2640","🧜♀️":"1f9dc-2640","🧜\200d♂":"1f9dc-2642","🧜♂️":"1f9dc-2642","🧝\200d♀":"1f9dd-2640","🧝♀️":"1f9dd-2640","🧝\200d♂":"1f9dd-2642","🧝♂️":"1f9dd-2642","🧞\200d♀":"1f9de-2640","🧞♀️":"1f9de-2640","🧞\200d♂":"1f9de-2642","🧞♂️":"1f9de-2642","🧟\200d♀":"1f9df-2640","🧟♀️":"1f9df-2640","🧟\200d♂":"1f9df-2642","🧟♂️":"1f9df-2642","🧖\200d♀":"1f9d6-2640","🧖♀️":"1f9d6-2640","🧖\200d♂":"1f9d6-2642","🧖♂️":"1f9d6-2642","🧗\200d♀":"1f9d7-2640","🧗♀️":"1f9d7-2640","🧗\200d♂":"1f9d7-2642","🧗♂️":"1f9d7-2642","🧘\200d♀":"1f9d8-2640","🧘♀️":"1f9d8-2640","🧘\200d♂":"1f9d8-2642","🧘♂️":"1f9d8-2642","🦸\200d♀":"1f9b8-2640","🦸♀️":"1f9b8-2640","🦸\200d♂":"1f9b8-2642","🦸♂️":"1f9b8-2642","🦹\200d♀":"1f9b9-2640","🦹♀️":"1f9b9-2640","🦹\200d♂":"1f9b9-2642","🦹♂️":"1f9b9-2642","🏴\200d☠":"1f3f4-2620","🏴☠️":"1f3f4-2620","#️⃣":"0023-20e3","0️⃣":"0030-20e3","1️⃣":"0031-20e3","2️⃣":"0032-20e3","3️⃣":"0033-20e3","4️⃣":"0034-20e3","5️⃣":"0035-20e3","6️⃣":"0036-20e3","7️⃣":"0037-20e3","8️⃣":"0038-20e3","9️⃣":"0039-20e3","*️⃣":"002a-20e3","⛹\200d♀":"26f9-2640","⛹\200d♂":"26f9-2642","🇨🇳":"1f1e8-1f1f3","🇩🇪":"1f1e9-1f1ea","🇪🇸":"1f1ea-1f1f8","🇫🇷":"1f1eb-1f1f7","🇬🇧":"1f1ec-1f1e7","🇮🇹":"1f1ee-1f1f9","🇯🇵":"1f1ef-1f1f5","🇰🇷":"1f1f0-1f1f7","🇺🇸":"1f1fa-1f1f8","🇷🇺":"1f1f7-1f1fa","🤴🏻":"1f934-1f3fb","🤴🏼":"1f934-1f3fc","🤴🏽":"1f934-1f3fd","🤴🏾":"1f934-1f3fe","🤴🏿":"1f934-1f3ff","🤶🏻":"1f936-1f3fb","🤶🏼":"1f936-1f3fc","🤶🏽":"1f936-1f3fd","🤶🏾":"1f936-1f3fe","🤶🏿":"1f936-1f3ff","🤵🏻":"1f935-1f3fb","🤵🏼":"1f935-1f3fc","🤵🏽":"1f935-1f3fd","🤵🏾":"1f935-1f3fe","🤵🏿":"1f935-1f3ff","🤷🏻":"1f937-1f3fb","🤷🏼":"1f937-1f3fc","🤷🏽":"1f937-1f3fd","🤷🏾":"1f937-1f3fe","🤷🏿":"1f937-1f3ff","🤦🏻":"1f926-1f3fb","🤦🏼":"1f926-1f3fc","🤦🏽":"1f926-1f3fd","🤦🏾":"1f926-1f3fe","🤦🏿":"1f926-1f3ff","🤰🏻":"1f930-1f3fb","🤰🏼":"1f930-1f3fc","🤰🏽":"1f930-1f3fd","🤰🏾":"1f930-1f3fe","🤰🏿":"1f930-1f3ff","🕺🏻":"1f57a-1f3fb","🕺🏼":"1f57a-1f3fc","🕺🏽":"1f57a-1f3fd","🕺🏾":"1f57a-1f3fe","🕺🏿":"1f57a-1f3ff","🤳🏻":"1f933-1f3fb","🤳🏼":"1f933-1f3fc","🤳🏽":"1f933-1f3fd","🤳🏾":"1f933-1f3fe","🤳🏿":"1f933-1f3ff","🤞🏻":"1f91e-1f3fb","🤞🏼":"1f91e-1f3fc","🤞🏽":"1f91e-1f3fd","🤞🏾":"1f91e-1f3fe","🤞🏿":"1f91e-1f3ff","🤙🏻":"1f919-1f3fb","🤙🏼":"1f919-1f3fc","🤙🏽":"1f919-1f3fd","🇦🇫":"1f1e6-1f1eb","🇦🇱":"1f1e6-1f1f1","🇩🇿":"1f1e9-1f1ff","🇦🇩":"1f1e6-1f1e9","🇦🇴":"1f1e6-1f1f4","🇦🇬":"1f1e6-1f1ec","🇦🇷":"1f1e6-1f1f7","🇦🇲":"1f1e6-1f1f2","🇦🇺":"1f1e6-1f1fa","🇦🇹":"1f1e6-1f1f9","🇦🇿":"1f1e6-1f1ff","🇧🇸":"1f1e7-1f1f8","🇧🇭":"1f1e7-1f1ed","🇧🇩":"1f1e7-1f1e9","🇧🇧":"1f1e7-1f1e7","🇧🇾":"1f1e7-1f1fe","🇧🇪":"1f1e7-1f1ea","🇧🇿":"1f1e7-1f1ff","🇧🇯":"1f1e7-1f1ef","🇧🇹":"1f1e7-1f1f9","🇧🇴":"1f1e7-1f1f4","🇧🇦":"1f1e7-1f1e6","🇧🇼":"1f1e7-1f1fc","🇧🇷":"1f1e7-1f1f7","🇧🇳":"1f1e7-1f1f3","🇧🇬":"1f1e7-1f1ec","🇧🇫":"1f1e7-1f1eb","🇧🇮":"1f1e7-1f1ee","🇰🇭":"1f1f0-1f1ed","🇨🇲":"1f1e8-1f1f2","🇨🇦":"1f1e8-1f1e6","🇨🇻":"1f1e8-1f1fb","🤙🏾":"1f919-1f3fe","🇨🇫":"1f1e8-1f1eb","🇹🇩":"1f1f9-1f1e9","🇨🇱":"1f1e8-1f1f1","🇨🇴":"1f1e8-1f1f4","🇰🇲":"1f1f0-1f1f2","🇨🇷":"1f1e8-1f1f7","🇨🇮":"1f1e8-1f1ee","🇭🇷":"1f1ed-1f1f7","🇨🇺":"1f1e8-1f1fa","🇨🇾":"1f1e8-1f1fe","🇨🇿":"1f1e8-1f1ff","🤙🏿":"1f919-1f3ff","🇨🇩":"1f1e8-1f1e9","🤛🏻":"1f91b-1f3fb","🇩🇰":"1f1e9-1f1f0","🇩🇯":"1f1e9-1f1ef","🇩🇲":"1f1e9-1f1f2","🇩🇴":"1f1e9-1f1f4","🇹🇱":"1f1f9-1f1f1","🇪🇨":"1f1ea-1f1e8","🇪🇬":"1f1ea-1f1ec","🇸🇻":"1f1f8-1f1fb","🇬🇶":"1f1ec-1f1f6","🇪🇷":"1f1ea-1f1f7","🇪🇪":"1f1ea-1f1ea","🇪🇹":"1f1ea-1f1f9","🤛🏼":"1f91b-1f3fc","🇫🇯":"1f1eb-1f1ef","🇫🇮":"1f1eb-1f1ee","🇬🇦":"1f1ec-1f1e6","🇬🇲":"1f1ec-1f1f2","🇬🇪":"1f1ec-1f1ea","🇬🇭":"1f1ec-1f1ed","🇬🇷":"1f1ec-1f1f7","🇬🇩":"1f1ec-1f1e9","🇬🇹":"1f1ec-1f1f9","🇬🇳":"1f1ec-1f1f3","🇬🇼":"1f1ec-1f1fc","🇬🇾":"1f1ec-1f1fe","🇭🇹":"1f1ed-1f1f9","🇭🇳":"1f1ed-1f1f3","🇭🇺":"1f1ed-1f1fa","🇮🇸":"1f1ee-1f1f8","🇮🇳":"1f1ee-1f1f3","🇮🇩":"1f1ee-1f1e9","🇮🇷":"1f1ee-1f1f7","🇮🇶":"1f1ee-1f1f6","🇮🇪":"1f1ee-1f1ea","🇮🇱":"1f1ee-1f1f1","🇯🇲":"1f1ef-1f1f2","🇯🇴":"1f1ef-1f1f4","🇰🇿":"1f1f0-1f1ff","🇰🇪":"1f1f0-1f1ea","🇰🇮":"1f1f0-1f1ee","🇽🇰":"1f1fd-1f1f0","🇰🇼":"1f1f0-1f1fc","🇰🇬":"1f1f0-1f1ec","🤛🏽":"1f91b-1f3fd","🇱🇦":"1f1f1-1f1e6","🇱🇻":"1f1f1-1f1fb","🇱🇧":"1f1f1-1f1e7","🇱🇸":"1f1f1-1f1f8","🇱🇷":"1f1f1-1f1f7","🇱🇾":"1f1f1-1f1fe","🇱🇮":"1f1f1-1f1ee","🇱🇹":"1f1f1-1f1f9","🇱🇺":"1f1f1-1f1fa","🇲🇰":"1f1f2-1f1f0","🇲🇬":"1f1f2-1f1ec","🇲🇼":"1f1f2-1f1fc","🇲🇾":"1f1f2-1f1fe","🇲🇻":"1f1f2-1f1fb","🇲🇱":"1f1f2-1f1f1","🇲🇹":"1f1f2-1f1f9","🇲🇭":"1f1f2-1f1ed","🇲🇷":"1f1f2-1f1f7","🇲🇺":"1f1f2-1f1fa","🇲🇽":"1f1f2-1f1fd","🇫🇲":"1f1eb-1f1f2","🇲🇩":"1f1f2-1f1e9","🇲🇨":"1f1f2-1f1e8","🇲🇳":"1f1f2-1f1f3","🇲🇪":"1f1f2-1f1ea","🇲🇦":"1f1f2-1f1e6","🇲🇿":"1f1f2-1f1ff","🇲🇲":"1f1f2-1f1f2","🇳🇦":"1f1f3-1f1e6","🇳🇷":"1f1f3-1f1f7","🇳🇵":"1f1f3-1f1f5","🇳🇱":"1f1f3-1f1f1","🇳🇿":"1f1f3-1f1ff","🇳🇮":"1f1f3-1f1ee","🇳🇪":"1f1f3-1f1ea","🇳🇬":"1f1f3-1f1ec","🇰🇵":"1f1f0-1f1f5","🇳🇴":"1f1f3-1f1f4","🇴🇲":"1f1f4-1f1f2","🇵🇰":"1f1f5-1f1f0","🇵🇼":"1f1f5-1f1fc","🇵🇦":"1f1f5-1f1e6","🇵🇬":"1f1f5-1f1ec","🤛🏾":"1f91b-1f3fe","🇵🇾":"1f1f5-1f1fe","🇵🇪":"1f1f5-1f1ea","🇵🇭":"1f1f5-1f1ed","🇵🇱":"1f1f5-1f1f1","🇵🇹":"1f1f5-1f1f9","🇶🇦":"1f1f6-1f1e6","🇹🇼":"1f1f9-1f1fc","🇨🇬":"1f1e8-1f1ec","🇷🇴":"1f1f7-1f1f4","🇷🇼":"1f1f7-1f1fc","🇰🇳":"1f1f0-1f1f3","🇱🇨":"1f1f1-1f1e8","🇻🇨":"1f1fb-1f1e8","🇼🇸":"1f1fc-1f1f8","🇸🇲":"1f1f8-1f1f2","🇸🇹":"1f1f8-1f1f9","🇸🇦":"1f1f8-1f1e6","🤛🏿":"1f91b-1f3ff","🇸🇳":"1f1f8-1f1f3","🇷🇸":"1f1f7-1f1f8","🇸🇨":"1f1f8-1f1e8","🇸🇱":"1f1f8-1f1f1","🇸🇬":"1f1f8-1f1ec","🇸🇰":"1f1f8-1f1f0","🇸🇮":"1f1f8-1f1ee","🇸🇧":"1f1f8-1f1e7","🇸🇴":"1f1f8-1f1f4","🇿🇦":"1f1ff-1f1e6","🇱🇰":"1f1f1-1f1f0","🇸🇩":"1f1f8-1f1e9","🇸🇷":"1f1f8-1f1f7","🇸🇿":"1f1f8-1f1ff","🇸🇪":"1f1f8-1f1ea","🇨🇭":"1f1e8-1f1ed","🇸🇾":"1f1f8-1f1fe","🇹🇯":"1f1f9-1f1ef","🇹🇿":"1f1f9-1f1ff","🇹🇭":"1f1f9-1f1ed","🇹🇬":"1f1f9-1f1ec","🇹🇴":"1f1f9-1f1f4","🇹🇹":"1f1f9-1f1f9","🇹🇳":"1f1f9-1f1f3","🇹🇷":"1f1f9-1f1f7","🇹🇲":"1f1f9-1f1f2","🇹🇻":"1f1f9-1f1fb","🇺🇬":"1f1fa-1f1ec","🇺🇦":"1f1fa-1f1e6","🇦🇪":"1f1e6-1f1ea","🇺🇾":"1f1fa-1f1fe","🇺🇿":"1f1fa-1f1ff","🇻🇺":"1f1fb-1f1fa","🇻🇦":"1f1fb-1f1e6","🇻🇪":"1f1fb-1f1ea","🇻🇳":"1f1fb-1f1f3","🇪🇭":"1f1ea-1f1ed","🤜🏻":"1f91c-1f3fb","🇾🇪":"1f1fe-1f1ea","🇿🇲":"1f1ff-1f1f2","🇿🇼":"1f1ff-1f1fc","🇵🇷":"1f1f5-1f1f7","🇰🇾":"1f1f0-1f1fe","🇧🇲":"1f1e7-1f1f2","🇵🇫":"1f1f5-1f1eb","🇵🇸":"1f1f5-1f1f8","🇳🇨":"1f1f3-1f1e8","🤜🏼":"1f91c-1f3fc","🇸🇭":"1f1f8-1f1ed","🇦🇼":"1f1e6-1f1fc","🇻🇮":"1f1fb-1f1ee","🇭🇰":"1f1ed-1f1f0","🇦🇨":"1f1e6-1f1e8","🇲🇸":"1f1f2-1f1f8","🇬🇺":"1f1ec-1f1fa","🇬🇱":"1f1ec-1f1f1","🇳🇺":"1f1f3-1f1fa","🇼🇫":"1f1fc-1f1eb","🇲🇴":"1f1f2-1f1f4","🤜🏽":"1f91c-1f3fd","🇫🇴":"1f1eb-1f1f4","🇫🇰":"1f1eb-1f1f0","🇯🇪":"1f1ef-1f1ea","🇦🇮":"1f1e6-1f1ee","🇬🇮":"1f1ec-1f1ee","🤜🏾":"1f91c-1f3fe","🤜🏿":"1f91c-1f3ff","🤚🏻":"1f91a-1f3fb","🤚🏼":"1f91a-1f3fc","🤚🏽":"1f91a-1f3fd","🤚🏾":"1f91a-1f3fe","👶🏻":"1f476-1f3fb","👶🏼":"1f476-1f3fc","👶🏽":"1f476-1f3fd","👶🏾":"1f476-1f3fe","👶🏿":"1f476-1f3ff","👦🏻":"1f466-1f3fb","👦🏼":"1f466-1f3fc","👦🏽":"1f466-1f3fd","👦🏾":"1f466-1f3fe","👦🏿":"1f466-1f3ff","👧🏻":"1f467-1f3fb","👧🏼":"1f467-1f3fc","👧🏽":"1f467-1f3fd","👧🏾":"1f467-1f3fe","👧🏿":"1f467-1f3ff","👨🏻":"1f468-1f3fb","👨🏼":"1f468-1f3fc","👨🏽":"1f468-1f3fd","👨🏾":"1f468-1f3fe","👨🏿":"1f468-1f3ff","👩🏻":"1f469-1f3fb","👩🏼":"1f469-1f3fc","👩🏽":"1f469-1f3fd","👩🏾":"1f469-1f3fe","👩🏿":"1f469-1f3ff","👰🏻":"1f470-1f3fb","👰🏼":"1f470-1f3fc","🤚🏿":"1f91a-1f3ff","👰🏽":"1f470-1f3fd","👰🏾":"1f470-1f3fe","👰🏿":"1f470-1f3ff","👱🏻":"1f471-1f3fb","👱🏼":"1f471-1f3fc","👱🏽":"1f471-1f3fd","👱🏾":"1f471-1f3fe","👱🏿":"1f471-1f3ff","👲🏻":"1f472-1f3fb","👲🏼":"1f472-1f3fc","👲🏽":"1f472-1f3fd","👲🏾":"1f472-1f3fe","👲🏿":"1f472-1f3ff","👳🏻":"1f473-1f3fb","👳🏼":"1f473-1f3fc","👳🏽":"1f473-1f3fd","👳🏾":"1f473-1f3fe","👳🏿":"1f473-1f3ff","👴🏻":"1f474-1f3fb","👴🏼":"1f474-1f3fc","👴🏽":"1f474-1f3fd","👴🏾":"1f474-1f3fe","👴🏿":"1f474-1f3ff","👵🏻":"1f475-1f3fb","👵🏼":"1f475-1f3fc","👵🏽":"1f475-1f3fd","👵🏾":"1f475-1f3fe","👵🏿":"1f475-1f3ff","👮🏻":"1f46e-1f3fb","👮🏼":"1f46e-1f3fc","👮🏽":"1f46e-1f3fd","👮🏾":"1f46e-1f3fe","👮🏿":"1f46e-1f3ff","👷🏻":"1f477-1f3fb","👷🏼":"1f477-1f3fc","👷🏽":"1f477-1f3fd","👷🏾":"1f477-1f3fe","👷🏿":"1f477-1f3ff","👸🏻":"1f478-1f3fb","👸🏼":"1f478-1f3fc","👸🏽":"1f478-1f3fd","👸🏾":"1f478-1f3fe","🤸🏻":"1f938-1f3fb","👸🏿":"1f478-1f3ff","💂🏻":"1f482-1f3fb","💂🏼":"1f482-1f3fc","🤸🏼":"1f938-1f3fc","💂🏽":"1f482-1f3fd","💂🏾":"1f482-1f3fe","💂🏿":"1f482-1f3ff","🤸🏽":"1f938-1f3fd","👼🏻":"1f47c-1f3fb","👼🏼":"1f47c-1f3fc","👼🏽":"1f47c-1f3fd","👼🏾":"1f47c-1f3fe","👼🏿":"1f47c-1f3ff","🙇🏻":"1f647-1f3fb","🙇🏼":"1f647-1f3fc","🙇🏽":"1f647-1f3fd","🙇🏾":"1f647-1f3fe","🙇🏿":"1f647-1f3ff","💁🏻":"1f481-1f3fb","💁🏼":"1f481-1f3fc","💁🏽":"1f481-1f3fd","🤸🏾":"1f938-1f3fe","💁🏾":"1f481-1f3fe","💁🏿":"1f481-1f3ff","🙅🏻":"1f645-1f3fb","🤸🏿":"1f938-1f3ff","🙅🏼":"1f645-1f3fc","🙅🏽":"1f645-1f3fd","🙅🏾":"1f645-1f3fe","🙅🏿":"1f645-1f3ff","🙆🏻":"1f646-1f3fb","🙆🏼":"1f646-1f3fc","🙆🏽":"1f646-1f3fd","🙆🏾":"1f646-1f3fe","🙆🏿":"1f646-1f3ff","🙋🏻":"1f64b-1f3fb","🙋🏼":"1f64b-1f3fc","🙋🏽":"1f64b-1f3fd","🙋🏾":"1f64b-1f3fe","🙋🏿":"1f64b-1f3ff","🙎🏻":"1f64e-1f3fb","🙎🏼":"1f64e-1f3fc","🙎🏽":"1f64e-1f3fd","🙎🏾":"1f64e-1f3fe","🙎🏿":"1f64e-1f3ff","🙍🏻":"1f64d-1f3fb","🙍🏼":"1f64d-1f3fc","🙍🏽":"1f64d-1f3fd","🙍🏾":"1f64d-1f3fe","🙍🏿":"1f64d-1f3ff","💆🏻":"1f486-1f3fb","💆🏼":"1f486-1f3fc","💆🏽":"1f486-1f3fd","💆🏾":"1f486-1f3fe","💆🏿":"1f486-1f3ff","💇🏻":"1f487-1f3fb","💇🏼":"1f487-1f3fc","💇🏽":"1f487-1f3fd","💇🏾":"1f487-1f3fe","💇🏿":"1f487-1f3ff","🙌🏻":"1f64c-1f3fb","🙌🏼":"1f64c-1f3fc","🙌🏽":"1f64c-1f3fd","🙌🏾":"1f64c-1f3fe","🙌🏿":"1f64c-1f3ff","👏🏻":"1f44f-1f3fb","👏🏼":"1f44f-1f3fc","👏🏽":"1f44f-1f3fd","🤽🏻":"1f93d-1f3fb","👏🏾":"1f44f-1f3fe","👏🏿":"1f44f-1f3ff","🤽🏼":"1f93d-1f3fc","👂🏻":"1f442-1f3fb","👂🏼":"1f442-1f3fc","👂🏽":"1f442-1f3fd","👂🏾":"1f442-1f3fe","👂🏿":"1f442-1f3ff","👃🏻":"1f443-1f3fb","👃🏼":"1f443-1f3fc","👃🏽":"1f443-1f3fd","👃🏾":"1f443-1f3fe","👃🏿":"1f443-1f3ff","💅🏻":"1f485-1f3fb","💅🏼":"1f485-1f3fc","💅🏽":"1f485-1f3fd","💅🏾":"1f485-1f3fe","💅🏿":"1f485-1f3ff","👋🏻":"1f44b-1f3fb","👋🏼":"1f44b-1f3fc","👋🏽":"1f44b-1f3fd","👋🏾":"1f44b-1f3fe","👋🏿":"1f44b-1f3ff","👍🏻":"1f44d-1f3fb","👍🏼":"1f44d-1f3fc","👍🏽":"1f44d-1f3fd","👍🏾":"1f44d-1f3fe","👍🏿":"1f44d-1f3ff","👎🏻":"1f44e-1f3fb","👎🏼":"1f44e-1f3fc","👎🏽":"1f44e-1f3fd","👎🏾":"1f44e-1f3fe","👎🏿":"1f44e-1f3ff","👆🏻":"1f446-1f3fb","👆🏼":"1f446-1f3fc","👆🏽":"1f446-1f3fd","👆🏾":"1f446-1f3fe","👆🏿":"1f446-1f3ff","👇🏻":"1f447-1f3fb","👇🏼":"1f447-1f3fc","👇🏽":"1f447-1f3fd","👇🏾":"1f447-1f3fe","👇🏿":"1f447-1f3ff","👈🏻":"1f448-1f3fb","👈🏼":"1f448-1f3fc","👈🏽":"1f448-1f3fd","👈🏾":"1f448-1f3fe","👈🏿":"1f448-1f3ff","👉🏻":"1f449-1f3fb","👉🏼":"1f449-1f3fc","👉🏽":"1f449-1f3fd","👉🏾":"1f449-1f3fe","👉🏿":"1f449-1f3ff","👌🏻":"1f44c-1f3fb","👌🏼":"1f44c-1f3fc","🤽🏽":"1f93d-1f3fd","👌🏽":"1f44c-1f3fd","👌🏾":"1f44c-1f3fe","🤽🏾":"1f93d-1f3fe","👌🏿":"1f44c-1f3ff","👊🏻":"1f44a-1f3fb","👊🏼":"1f44a-1f3fc","👊🏽":"1f44a-1f3fd","👊🏾":"1f44a-1f3fe","👊🏿":"1f44a-1f3ff","💪🏻":"1f4aa-1f3fb","💪🏼":"1f4aa-1f3fc","💪🏽":"1f4aa-1f3fd","💪🏾":"1f4aa-1f3fe","💪🏿":"1f4aa-1f3ff","👐🏻":"1f450-1f3fb","👐🏼":"1f450-1f3fc","👐🏽":"1f450-1f3fd","👐🏾":"1f450-1f3fe","👐🏿":"1f450-1f3ff","🙏🏻":"1f64f-1f3fb","🤽🏿":"1f93d-1f3ff","🙏🏼":"1f64f-1f3fc","🙏🏽":"1f64f-1f3fd","🤾🏻":"1f93e-1f3fb","🙏🏾":"1f64f-1f3fe","🙏🏿":"1f64f-1f3ff","🤾🏼":"1f93e-1f3fc","🏃🏻":"1f3c3-1f3fb","🏃🏼":"1f3c3-1f3fc","🏃🏽":"1f3c3-1f3fd","🏃🏾":"1f3c3-1f3fe","🤾🏽":"1f93e-1f3fd","🏃🏿":"1f3c3-1f3ff","🚶🏻":"1f6b6-1f3fb","🚶🏼":"1f6b6-1f3fc","🚶🏽":"1f6b6-1f3fd","🚶🏾":"1f6b6-1f3fe","🚶🏿":"1f6b6-1f3ff","💃🏻":"1f483-1f3fb","🤾🏾":"1f93e-1f3fe","💃🏼":"1f483-1f3fc","💃🏽":"1f483-1f3fd","🤾🏿":"1f93e-1f3ff","💃🏾":"1f483-1f3fe","💃🏿":"1f483-1f3ff","🤹🏻":"1f939-1f3fb","🚣🏻":"1f6a3-1f3fb","🚣🏼":"1f6a3-1f3fc","🚣🏽":"1f6a3-1f3fd","🚣🏾":"1f6a3-1f3fe","🚣🏿":"1f6a3-1f3ff","🏊🏻":"1f3ca-1f3fb","🏊🏼":"1f3ca-1f3fc","🤹🏼":"1f939-1f3fc","🏊🏽":"1f3ca-1f3fd","🏊🏾":"1f3ca-1f3fe","🏊🏿":"1f3ca-1f3ff","🤹🏽":"1f939-1f3fd","🏄🏻":"1f3c4-1f3fb","🏄🏼":"1f3c4-1f3fc","🏄🏽":"1f3c4-1f3fd","🏄🏾":"1f3c4-1f3fe","🏄🏿":"1f3c4-1f3ff","🛀🏻":"1f6c0-1f3fb","🛀🏼":"1f6c0-1f3fc","🤹🏾":"1f939-1f3fe","🛀🏽":"1f6c0-1f3fd","🛀🏾":"1f6c0-1f3fe","🛀🏿":"1f6c0-1f3ff","🤹🏿":"1f939-1f3ff","🚴🏻":"1f6b4-1f3fb","🚴🏼":"1f6b4-1f3fc","🚴🏽":"1f6b4-1f3fd","🚴🏾":"1f6b4-1f3fe","🚴🏿":"1f6b4-1f3ff","🚵🏻":"1f6b5-1f3fb","🚵🏼":"1f6b5-1f3fc","🚵🏽":"1f6b5-1f3fd","🚵🏾":"1f6b5-1f3fe","🚵🏿":"1f6b5-1f3ff","🏇🏻":"1f3c7-1f3fb","🏇🏼":"1f3c7-1f3fc","🏇🏽":"1f3c7-1f3fd","🏇🏾":"1f3c7-1f3fe","🏇🏿":"1f3c7-1f3ff","🖐🏻":"1f590-1f3fb","🖐🏼":"1f590-1f3fc","🖐🏽":"1f590-1f3fd","🖐🏾":"1f590-1f3fe","🖐🏿":"1f590-1f3ff","🖕🏻":"1f595-1f3fb","🖕🏼":"1f595-1f3fc","🖕🏽":"1f595-1f3fd","🖕🏾":"1f595-1f3fe","🖕🏿":"1f595-1f3ff","🖖🏻":"1f596-1f3fb","🖖🏼":"1f596-1f3fc","🖖🏽":"1f596-1f3fd","🖖🏾":"1f596-1f3fe","🖖🏿":"1f596-1f3ff","🎅🏻":"1f385-1f3fb","🎅🏼":"1f385-1f3fc","🎅🏽":"1f385-1f3fd","🎅🏾":"1f385-1f3fe","🎅🏿":"1f385-1f3ff","🤘🏻":"1f918-1f3fb","🤘🏼":"1f918-1f3fc","🤘🏽":"1f918-1f3fd","🤘🏾":"1f918-1f3fe","🤘🏿":"1f918-1f3ff","🏋🏻":"1f3cb-1f3fb","🏋🏼":"1f3cb-1f3fc","🏋🏽":"1f3cb-1f3fd","🏋🏾":"1f3cb-1f3fe","🏋🏿":"1f3cb-1f3ff","🇦🇽":"1f1e6-1f1fd","🇹🇦":"1f1f9-1f1e6","🇮🇴":"1f1ee-1f1f4","🇧🇶":"1f1e7-1f1f6","🇨🇽":"1f1e8-1f1fd","🇨🇨":"1f1e8-1f1e8","🇬🇬":"1f1ec-1f1ec","🇮🇲":"1f1ee-1f1f2","🇾🇹":"1f1fe-1f1f9","🇳🇫":"1f1f3-1f1eb","🇵🇳":"1f1f5-1f1f3","🇧🇱":"1f1e7-1f1f1","🇵🇲":"1f1f5-1f1f2","🇬🇸":"1f1ec-1f1f8","🇹🇰":"1f1f9-1f1f0","🇧🇻":"1f1e7-1f1fb","🇭🇲":"1f1ed-1f1f2","🇸🇯":"1f1f8-1f1ef","🇺🇲":"1f1fa-1f1f2","🇮🇨":"1f1ee-1f1e8","🇪🇦":"1f1ea-1f1e6","🇨🇵":"1f1e8-1f1f5","🇩🇬":"1f1e9-1f1ec","🇦🇸":"1f1e6-1f1f8","🇦🇶":"1f1e6-1f1f6","🇻🇬":"1f1fb-1f1ec","🇨🇰":"1f1e8-1f1f0","🇨🇼":"1f1e8-1f1fc","🇪🇺":"1f1ea-1f1fa","🇬🇫":"1f1ec-1f1eb","🇹🇫":"1f1f9-1f1eb","🇬🇵":"1f1ec-1f1f5","🇲🇶":"1f1f2-1f1f6","🇲🇵":"1f1f2-1f1f5","🇷🇪":"1f1f7-1f1ea","🇸🇽":"1f1f8-1f1fd","🇸🇸":"1f1f8-1f1f8","🇹🇨":"1f1f9-1f1e8","🇲🇫":"1f1f2-1f1eb","🕵🏻":"1f575-1f3fb","🕵🏼":"1f575-1f3fc","🕵🏽":"1f575-1f3fd","🕵🏾":"1f575-1f3fe","🕵🏿":"1f575-1f3ff","🏂🏻":"1f3c2-1f3fb","👨💻":"1f468-1f4bb","👩💻":"1f469-1f4bb","👨🏫":"1f468-1f3eb","👩🏫":"1f469-1f3eb","👨🎓":"1f468-1f393","👩🎓":"1f469-1f393","👨🎤":"1f468-1f3a4","👩🎤":"1f469-1f3a4","👨🔬":"1f468-1f52c","👩🔬":"1f469-1f52c","👨💼":"1f468-1f4bc","👩💼":"1f469-1f4bc","👨🔧":"1f468-1f527","👩🔧":"1f469-1f527","👨🏭":"1f468-1f3ed","👩🏭":"1f469-1f3ed","👨🍳":"1f468-1f373","👩🍳":"1f469-1f373","👨🌾":"1f468-1f33e","👩🌾":"1f469-1f33e","🕴🏻":"1f574-1f3fb","🕴🏼":"1f574-1f3fc","🕴🏽":"1f574-1f3fd","🕴🏾":"1f574-1f3fe","🕴🏿":"1f574-1f3ff","🛌🏻":"1f6cc-1f3fb","🛌🏼":"1f6cc-1f3fc","🛌🏽":"1f6cc-1f3fd","🛌🏾":"1f6cc-1f3fe","🛌🏿":"1f6cc-1f3ff","👨👦":"1f468-1f466","👨👧":"1f468-1f467","👩👦":"1f469-1f466","👩👧":"1f469-1f467","👨🎨":"1f468-1f3a8","👩🎨":"1f469-1f3a8","👨🚀":"1f468-1f680","👩🚀":"1f469-1f680","👨🚒":"1f468-1f692","👩🚒":"1f469-1f692","🇺🇳":"1f1fa-1f1f3","🏂🏼":"1f3c2-1f3fc","🏂🏽":"1f3c2-1f3fd","🏂🏾":"1f3c2-1f3fe","🏂🏿":"1f3c2-1f3ff","🏌🏻":"1f3cc-1f3fb","🏌🏼":"1f3cc-1f3fc","🏌🏽":"1f3cc-1f3fd","🏌🏾":"1f3cc-1f3fe","🏌🏿":"1f3cc-1f3ff","🤟🏻":"1f91f-1f3fb","🤟🏼":"1f91f-1f3fc","🤟🏽":"1f91f-1f3fd","🤟🏾":"1f91f-1f3fe","🤟🏿":"1f91f-1f3ff","🤱🏻":"1f931-1f3fb","🤱🏼":"1f931-1f3fc","🤱🏽":"1f931-1f3fd","🤱🏾":"1f931-1f3fe","🤱🏿":"1f931-1f3ff","🤲🏻":"1f932-1f3fb","🤲🏼":"1f932-1f3fc","🤲🏽":"1f932-1f3fd","🤲🏾":"1f932-1f3fe","🤲🏿":"1f932-1f3ff","🧑🏻":"1f9d1-1f3fb","🧑🏼":"1f9d1-1f3fc","🧑🏽":"1f9d1-1f3fd","🧑🏾":"1f9d1-1f3fe","🧑🏿":"1f9d1-1f3ff","🧒🏻":"1f9d2-1f3fb","🧒🏼":"1f9d2-1f3fc","🧒🏽":"1f9d2-1f3fd","🧒🏾":"1f9d2-1f3fe","🧒🏿":"1f9d2-1f3ff","🧓🏻":"1f9d3-1f3fb","🧓🏼":"1f9d3-1f3fc","🧓🏽":"1f9d3-1f3fd","🧓🏾":"1f9d3-1f3fe","🧓🏿":"1f9d3-1f3ff","🧔🏻":"1f9d4-1f3fb","🧔🏼":"1f9d4-1f3fc","🧔🏽":"1f9d4-1f3fd","🧔🏾":"1f9d4-1f3fe","🧔🏿":"1f9d4-1f3ff","🧕🏻":"1f9d5-1f3fb","🧕🏼":"1f9d5-1f3fc","🧕🏽":"1f9d5-1f3fd","🧕🏾":"1f9d5-1f3fe","🧕🏿":"1f9d5-1f3ff","🧖🏻":"1f9d6-1f3fb","🧖🏼":"1f9d6-1f3fc","🧖🏽":"1f9d6-1f3fd","🧖🏾":"1f9d6-1f3fe","🧖🏿":"1f9d6-1f3ff","🧗🏻":"1f9d7-1f3fb","🧗🏼":"1f9d7-1f3fc","🧗🏽":"1f9d7-1f3fd","🧗🏾":"1f9d7-1f3fe","🧗🏿":"1f9d7-1f3ff","🧘🏻":"1f9d8-1f3fb","🧘🏼":"1f9d8-1f3fc","🧘🏽":"1f9d8-1f3fd","🧘🏾":"1f9d8-1f3fe","🧘🏿":"1f9d8-1f3ff","🧙🏻":"1f9d9-1f3fb","🧙🏼":"1f9d9-1f3fc","🧙🏽":"1f9d9-1f3fd","🧙🏾":"1f9d9-1f3fe","🧙🏿":"1f9d9-1f3ff","🧚🏻":"1f9da-1f3fb","🧚🏼":"1f9da-1f3fc","🧚🏽":"1f9da-1f3fd","🧚🏾":"1f9da-1f3fe","🧚🏿":"1f9da-1f3ff","🧛🏻":"1f9db-1f3fb","🧛🏼":"1f9db-1f3fc","🧛🏽":"1f9db-1f3fd","🧛🏾":"1f9db-1f3fe","🧛🏿":"1f9db-1f3ff","🧜🏻":"1f9dc-1f3fb","🧜🏼":"1f9dc-1f3fc","🧜🏽":"1f9dc-1f3fd","🧜🏾":"1f9dc-1f3fe","🧜🏿":"1f9dc-1f3ff","🧝🏻":"1f9dd-1f3fb","🧝🏼":"1f9dd-1f3fc","🧝🏽":"1f9dd-1f3fd","🧝🏾":"1f9dd-1f3fe","🧝🏿":"1f9dd-1f3ff","🦵🏻":"1f9b5-1f3fb","🦵🏼":"1f9b5-1f3fc","🦵🏽":"1f9b5-1f3fd","🦵🏾":"1f9b5-1f3fe","🦵🏿":"1f9b5-1f3ff","🦶🏻":"1f9b6-1f3fb","🦶🏼":"1f9b6-1f3fc","🦶🏽":"1f9b6-1f3fd","🦶🏾":"1f9b6-1f3fe","🦶🏿":"1f9b6-1f3ff","🦸🏻":"1f9b8-1f3fb","🦸🏼":"1f9b8-1f3fc","🦸🏽":"1f9b8-1f3fd","🦸🏾":"1f9b8-1f3fe","🦸🏿":"1f9b8-1f3ff","🦹🏻":"1f9b9-1f3fb","🦹🏼":"1f9b9-1f3fc","🦹🏽":"1f9b9-1f3fd","🦹🏾":"1f9b9-1f3fe","🦹🏿":"1f9b9-1f3ff","👨🦰":"1f468-1f9b0","👨🦱":"1f468-1f9b1","👨🦲":"1f468-1f9b2","👨🦳":"1f468-1f9b3","👩🦰":"1f469-1f9b0","👩🦱":"1f469-1f9b1","👩🦲":"1f469-1f9b2","👩🦳":"1f469-1f9b3","🅿️":"1f17f","🈂️":"1f202","🈷️":"1f237","🎞️":"1f39e","🎟️":"1f39f","🏋️":"1f3cb","🏌️":"1f3cc","🏍️":"1f3cd","🏎️":"1f3ce","🎖️":"1f396","🎗️":"1f397","🌶️":"1f336","🌧️":"1f327","🌨️":"1f328","🌩️":"1f329","🌪️":"1f32a","🌫️":"1f32b","🌬️":"1f32c","🐿️":"1f43f","🕷️":"1f577","🕸️":"1f578","🌡️":"1f321","🎙️":"1f399","🎚️":"1f39a","🎛️":"1f39b","🏳️":"1f3f3","🏵️":"1f3f5","🏷️":"1f3f7","📽️":"1f4fd","🕉️":"1f549","🕊️":"1f54a","🕯️":"1f56f","🕰️":"1f570","🕳️":"1f573","🕶️":"1f576","🕹️":"1f579","🖇️":"1f587","🖊️":"1f58a","🖋️":"1f58b","🖌️":"1f58c","🖍️":"1f58d","🖥️":"1f5a5","🖨️":"1f5a8","🖲️":"1f5b2","🖼️":"1f5bc","🗂️":"1f5c2","🗃️":"1f5c3","🗄️":"1f5c4","🗑️":"1f5d1","🗒️":"1f5d2","🗓️":"1f5d3","🗜️":"1f5dc","🗝️":"1f5dd","🗞️":"1f5de","🗡️":"1f5e1","🗣️":"1f5e3","🗨️":"1f5e8","🗯️":"1f5ef","🗳️":"1f5f3","🗺️":"1f5fa","🛠️":"1f6e0","🛡️":"1f6e1","🛢️":"1f6e2","🛰️":"1f6f0","🍽️":"1f37d","👁️":"1f441","🕴️":"1f574","🕵️":"1f575","🖐️":"1f590","🏔️":"1f3d4","🏕️":"1f3d5","🏖️":"1f3d6","🏗️":"1f3d7","🏘️":"1f3d8","🏙️":"1f3d9","🏚️":"1f3da","🏛️":"1f3db","🏜️":"1f3dc","🏝️":"1f3dd","🏞️":"1f3de","🏟️":"1f3df","🛋️":"1f6cb","🛍️":"1f6cd","🛎️":"1f6ce","🛏️":"1f6cf","🛣️":"1f6e3","🛤️":"1f6e4","🛥️":"1f6e5","🛩️":"1f6e9","🛳️":"1f6f3","☝🏻":"261d-1f3fb","☝🏼":"261d-1f3fc","☝🏽":"261d-1f3fd","☝🏾":"261d-1f3fe","☝🏿":"261d-1f3ff","✌🏻":"270c-1f3fb","✌🏼":"270c-1f3fc","✌🏽":"270c-1f3fd","✌🏾":"270c-1f3fe","✌🏿":"270c-1f3ff","✊🏻":"270a-1f3fb","✊🏼":"270a-1f3fc","✊🏽":"270a-1f3fd","✊🏾":"270a-1f3fe","✊🏿":"270a-1f3ff","✋🏻":"270b-1f3fb","✋🏼":"270b-1f3fc","✋🏽":"270b-1f3fd","✋🏾":"270b-1f3fe","✋🏿":"270b-1f3ff","✍🏻":"270d-1f3fb","✍🏼":"270d-1f3fc","✍🏽":"270d-1f3fd","✍🏾":"270d-1f3fe","✍🏿":"270d-1f3ff","🌤️":"1f324","🌥️":"1f325","🌦️":"1f326","🖱️":"1f5b1","⛹🏻":"26f9-1f3fb","⛹🏼":"26f9-1f3fc","⛹🏽":"26f9-1f3fd","⛹🏾":"26f9-1f3fe","⛹🏿":"26f9-1f3ff","🅰️":"1f170","🅱️":"1f171","🅾️":"1f17e","🀄️":"1f004","🈚️":"1f21a","🈯️":"1f22f","🌍️":"1f30d","🌎️":"1f30e","🌏️":"1f30f","🌕️":"1f315","🌜️":"1f31c","🍸️":"1f378","🎓️":"1f393","🎧️":"1f3a7","🎬️":"1f3ac","🎭️":"1f3ad","🎮️":"1f3ae","🏂️":"1f3c2","🏄️":"1f3c4","🏆️":"1f3c6","🏊️":"1f3ca","🏠️":"1f3e0","🏭️":"1f3ed","🐈️":"1f408","🐕️":"1f415","🐟️":"1f41f","🐦️":"1f426","👂️":"1f442","👆️":"1f446","👇️":"1f447","👈️":"1f448","👉️":"1f449","👍️":"1f44d","👎️":"1f44e","👓️":"1f453","👪️":"1f46a","👽️":"1f47d","💣️":"1f4a3","💰️":"1f4b0","💳️":"1f4b3","💻️":"1f4bb","💿️":"1f4bf","📋️":"1f4cb","📚️":"1f4da","📟️":"1f4df","📤️":"1f4e4","📥️":"1f4e5","📦️":"1f4e6","📪️":"1f4ea","📫️":"1f4eb","📬️":"1f4ec","📭️":"1f4ed","📷️":"1f4f7","📹️":"1f4f9","📺️":"1f4fa","📻️":"1f4fb","🔈️":"1f508","🔍️":"1f50d","🔒️":"1f512","🔓️":"1f513","🕐️":"1f550","🕑️":"1f551","🕒️":"1f552","🕓️":"1f553","🕔️":"1f554","🕕️":"1f555","🕖️":"1f556","🕗️":"1f557","🕘️":"1f558","🕙️":"1f559","🕚️":"1f55a","🕛️":"1f55b","🕜️":"1f55c","🕝️":"1f55d","🕞️":"1f55e","🕟️":"1f55f","🕠️":"1f560","🕡️":"1f561","🕢️":"1f562","🕣️":"1f563","🕤️":"1f564","🕥️":"1f565","🕦️":"1f566","🕧️":"1f567","😐️":"1f610","🚇️":"1f687","🚍️":"1f68d","🚑️":"1f691","🚔️":"1f694","🚘️":"1f698","🚭️":"1f6ad","🚲️":"1f6b2","🚹️":"1f6b9","🚺️":"1f6ba","🚼️":"1f6bc","#⃣":"0023-20e3","0⃣":"0030-20e3","1⃣":"0031-20e3","2⃣":"0032-20e3","3⃣":"0033-20e3","4⃣":"0034-20e3","5⃣":"0035-20e3","6⃣":"0036-20e3","7⃣":"0037-20e3","8⃣":"0038-20e3","9⃣":"0039-20e3","‼️":"203c","⁉️":"2049","ℹ️":"2139","↔️":"2194","↕️":"2195","↖️":"2196","↗️":"2197","↘️":"2198","↙️":"2199","↩️":"21a9","↪️":"21aa","Ⓜ️":"24c2","▪️":"25aa","▫️":"25ab","▶️":"25b6","◀️":"25c0","◻️":"25fb","◼️":"25fc","☀️":"2600","☁️":"2601","☎️":"260e","☑️":"2611","☝️":"261d","☺️":"263a","♠️":"2660","♣️":"2663","♥️":"2665","♦️":"2666","♨️":"2668","♻️":"267b","⚠️":"26a0","✂️":"2702","✈️":"2708","✉️":"2709","✌️":"270c","✏️":"270f","✒️":"2712","✔️":"2714","✖️":"2716","✳️":"2733","✴️":"2734","❄️":"2744","❇️":"2747","❤️":"2764","➡️":"27a1","⤴️":"2934","⤵️":"2935","⬅️":"2b05","⬆️":"2b06","⬇️":"2b07","〰️":"3030","〽️":"303d","㊗️":"3297","㊙️":"3299","✝️":"271d","⌨️":"2328","✍️":"270d","*⃣":"002a-20e3","⏏️":"23cf","⏭️":"23ed","⏮️":"23ee","⏯️":"23ef","⏱️":"23f1","⏲️":"23f2","⏸️":"23f8","⏹️":"23f9","⏺️":"23fa","☂️":"2602","☃️":"2603","☄️":"2604","☘️":"2618","☠️":"2620","☢️":"2622","☣️":"2623","☦️":"2626","☪️":"262a","☮️":"262e","☯️":"262f","☸️":"2638","☹️":"2639","⚒️":"2692","⚔️":"2694","⚖️":"2696","⚗️":"2697","⚙️":"2699","⚛️":"269b","⚜️":"269c","⚰️":"26b0","⚱️":"26b1","⛈️":"26c8","⛏️":"26cf","⛑️":"26d1","⛓️":"26d3","⛩️":"26e9","⛰️":"26f0","⛱️":"26f1","⛴️":"26f4","⛷️":"26f7","⛸️":"26f8","⛹️":"26f9","✡️":"2721","❣️":"2763","♀️":"2640","♂️":"2642","⚕️":"2695","♟️":"265f","♾️":"267e","⌚️":"231a","⌛️":"231b","⏩️":"23e9","⏪️":"23ea","⏳️":"23f3","◽️":"25fd","◾️":"25fe","☔️":"2614","☕️":"2615","♈️":"2648","♉️":"2649","♊️":"264a","♋️":"264b","♌️":"264c","♍️":"264d","♎️":"264e","♏️":"264f","♐️":"2650","♑️":"2651","♒️":"2652","♓️":"2653","♿️":"267f","⚓️":"2693","⚡️":"26a1","⚪️":"26aa","⚫️":"26ab","⚽️":"26bd","⚾️":"26be","⛄️":"26c4","⛅️":"26c5","⛔️":"26d4","⛪️":"26ea","⛲️":"26f2","⛳️":"26f3","⛵️":"26f5","⛺️":"26fa","⛽️":"26fd","❓️":"2753","❗️":"2757","⬛️":"2b1b","⬜️":"2b1c","⭐️":"2b50","⭕️":"2b55","🥉":"1f949","🥈":"1f948","🥇":"1f947","🤺":"1f93a","🥅":"1f945","🤾":"1f93e","🇿":"1f1ff","🤽":"1f93d","🥋":"1f94b","🥊":"1f94a","🤼":"1f93c","🤹":"1f939","🤸":"1f938","🛶":"1f6f6","🛵":"1f6f5","🛴":"1f6f4","🛒":"1f6d2","🀄":"1f004","🃏":"1f0cf","🅰":"1f170","🅱":"1f171","🅾":"1f17e","🅿":"1f17f","🛑":"1f6d1","🆎":"1f18e","🆑":"1f191","🇾":"1f1fe","🆒":"1f192","🆓":"1f193","🆔":"1f194","🆕":"1f195","🆖":"1f196","🆗":"1f197","🆘":"1f198","🥄":"1f944","🆙":"1f199","🆚":"1f19a","🥂":"1f942","🥃":"1f943","🈁":"1f201","🈂":"1f202","🈚":"1f21a","🈯":"1f22f","🥙":"1f959","🈲":"1f232","🈳":"1f233","🈴":"1f234","🈵":"1f235","🈶":"1f236","🥘":"1f958","🈷":"1f237","🈸":"1f238","🈹":"1f239","🥗":"1f957","🈺":"1f23a","🉐":"1f250","🉑":"1f251","🌀":"1f300","🥖":"1f956","🌁":"1f301","🌂":"1f302","🌃":"1f303","🌄":"1f304","🌅":"1f305","🌆":"1f306","🥕":"1f955","🌇":"1f307","🌈":"1f308","🥔":"1f954","🌉":"1f309","🌊":"1f30a","🌋":"1f30b","🌌":"1f30c","🌏":"1f30f","🌑":"1f311","🥓":"1f953","🌓":"1f313","🌔":"1f314","🌕":"1f315","🌙":"1f319","🌛":"1f31b","🌟":"1f31f","🥒":"1f952","🌠":"1f320","🌰":"1f330","🥑":"1f951","🌱":"1f331","🌴":"1f334","🌵":"1f335","🌷":"1f337","🌸":"1f338","🌹":"1f339","🌺":"1f33a","🌻":"1f33b","🌼":"1f33c","🌽":"1f33d","🥐":"1f950","🌾":"1f33e","🌿":"1f33f","🍀":"1f340","🍁":"1f341","🍂":"1f342","🍃":"1f343","🍄":"1f344","🍅":"1f345","🍆":"1f346","🍇":"1f347","🍈":"1f348","🍉":"1f349","🍊":"1f34a","🥀":"1f940","🍌":"1f34c","🍍":"1f34d","🍎":"1f34e","🍏":"1f34f","🍑":"1f351","🍒":"1f352","🍓":"1f353","🦏":"1f98f","🍔":"1f354","🍕":"1f355","🍖":"1f356","🦎":"1f98e","🍗":"1f357","🍘":"1f358","🍙":"1f359","🦍":"1f98d","🍚":"1f35a","🍛":"1f35b","🦌":"1f98c","🍜":"1f35c","🍝":"1f35d","🍞":"1f35e","🍟":"1f35f","🦋":"1f98b","🍠":"1f360","🍡":"1f361","🦊":"1f98a","🍢":"1f362","🍣":"1f363","🦉":"1f989","🍤":"1f364","🍥":"1f365","🦈":"1f988","🍦":"1f366","🦇":"1f987","🍧":"1f367","🇽":"1f1fd","🍨":"1f368","🦆":"1f986","🍩":"1f369","🦅":"1f985","🍪":"1f36a","🖤":"1f5a4","🍫":"1f36b","🍬":"1f36c","🍭":"1f36d","🍮":"1f36e","🍯":"1f36f","🤞":"1f91e","🍰":"1f370","🍱":"1f371","🍲":"1f372","🤝":"1f91d","🍳":"1f373","🍴":"1f374","🍵":"1f375","🍶":"1f376","🍷":"1f377","🍸":"1f378","🍹":"1f379","🍺":"1f37a","🍻":"1f37b","🎀":"1f380","🎁":"1f381","🎂":"1f382","🎃":"1f383","🤛":"1f91b","🤜":"1f91c","🎄":"1f384","🎅":"1f385","🎆":"1f386","🤚":"1f91a","🎇":"1f387","🎈":"1f388","🎉":"1f389","🎊":"1f38a","🎋":"1f38b","🎌":"1f38c","🤙":"1f919","🎍":"1f38d","🕺":"1f57a","🎎":"1f38e","🤳":"1f933","🎏":"1f38f","🤰":"1f930","🎐":"1f390","🤦":"1f926","🤷":"1f937","🎑":"1f391","🎒":"1f392","🎓":"1f393","🎠":"1f3a0","🎡":"1f3a1","🎢":"1f3a2","🎣":"1f3a3","🎤":"1f3a4","🎥":"1f3a5","🎦":"1f3a6","🎧":"1f3a7","🤶":"1f936","🎨":"1f3a8","🤵":"1f935","🎩":"1f3a9","🎪":"1f3aa","🤴":"1f934","🎫":"1f3ab","🎬":"1f3ac","🎭":"1f3ad","🤧":"1f927","🎮":"1f3ae","🎯":"1f3af","🎰":"1f3b0","🎱":"1f3b1","🎲":"1f3b2","🎳":"1f3b3","🎴":"1f3b4","🤥":"1f925","🎵":"1f3b5","🎶":"1f3b6","🎷":"1f3b7","🤤":"1f924","🎸":"1f3b8","🎹":"1f3b9","🎺":"1f3ba","🤣":"1f923","🎻":"1f3bb","🎼":"1f3bc","🎽":"1f3bd","🤢":"1f922","🎾":"1f3be","🎿":"1f3bf","🏀":"1f3c0","🏁":"1f3c1","🤡":"1f921","🏂":"1f3c2","🏃":"1f3c3","🏄":"1f3c4","🏆":"1f3c6","🏈":"1f3c8","🏊":"1f3ca","🏠":"1f3e0","🏡":"1f3e1","🏢":"1f3e2","🏣":"1f3e3","🏥":"1f3e5","🏦":"1f3e6","🏧":"1f3e7","🏨":"1f3e8","🏩":"1f3e9","🏪":"1f3ea","🏫":"1f3eb","🏬":"1f3ec","🤠":"1f920","🏭":"1f3ed","🏮":"1f3ee","🏯":"1f3ef","🏰":"1f3f0","🐌":"1f40c","🐍":"1f40d","🐎":"1f40e","🐑":"1f411","🐒":"1f412","🐔":"1f414","🐗":"1f417","🐘":"1f418","🐙":"1f419","🐚":"1f41a","🐛":"1f41b","🐜":"1f41c","🐝":"1f41d","🐞":"1f41e","🐟":"1f41f","🐠":"1f420","🐡":"1f421","🐢":"1f422","🐣":"1f423","🐤":"1f424","🐥":"1f425","🐦":"1f426","🐧":"1f427","🐨":"1f428","🐩":"1f429","🐫":"1f42b","🐬":"1f42c","🐭":"1f42d","🐮":"1f42e","🐯":"1f42f","🐰":"1f430","🐱":"1f431","🐲":"1f432","🐳":"1f433","🐴":"1f434","🐵":"1f435","🐶":"1f436","🐷":"1f437","🐸":"1f438","🐹":"1f439","🐺":"1f43a","🐻":"1f43b","🐼":"1f43c","🐽":"1f43d","🐾":"1f43e","👀":"1f440","👂":"1f442","👃":"1f443","👄":"1f444","👅":"1f445","👆":"1f446","👇":"1f447","👈":"1f448","👉":"1f449","👊":"1f44a","👋":"1f44b","👌":"1f44c","👍":"1f44d","👎":"1f44e","👏":"1f44f","👐":"1f450","👑":"1f451","👒":"1f452","👓":"1f453","👔":"1f454","👕":"1f455","👖":"1f456","👗":"1f457","👘":"1f458","👙":"1f459","👚":"1f45a","👛":"1f45b","👜":"1f45c","👝":"1f45d","👞":"1f45e","👟":"1f45f","👠":"1f460","👡":"1f461","👢":"1f462","👣":"1f463","👤":"1f464","👦":"1f466","👧":"1f467","👨":"1f468","👩":"1f469","👪":"1f46a","👫":"1f46b","👮":"1f46e","👯":"1f46f","👰":"1f470","👱":"1f471","👲":"1f472","👳":"1f473","👴":"1f474","👵":"1f475","👶":"1f476","👷":"1f477","👸":"1f478","👹":"1f479","👺":"1f47a","👻":"1f47b","👼":"1f47c","👽":"1f47d","👾":"1f47e","👿":"1f47f","💀":"1f480","📇":"1f4c7","💁":"1f481","💂":"1f482","💃":"1f483","💄":"1f484","💅":"1f485","📒":"1f4d2","💆":"1f486","📓":"1f4d3","💇":"1f487","📔":"1f4d4","💈":"1f488","📕":"1f4d5","💉":"1f489","📖":"1f4d6","💊":"1f48a","📗":"1f4d7","💋":"1f48b","📘":"1f4d8","💌":"1f48c","📙":"1f4d9","💍":"1f48d","📚":"1f4da","💎":"1f48e","📛":"1f4db","💏":"1f48f","📜":"1f4dc","💐":"1f490","📝":"1f4dd","💑":"1f491","📞":"1f4de","💒":"1f492","📟":"1f4df","📠":"1f4e0","💓":"1f493","📡":"1f4e1","📢":"1f4e2","💔":"1f494","📣":"1f4e3","📤":"1f4e4","💕":"1f495","📥":"1f4e5","📦":"1f4e6","💖":"1f496","📧":"1f4e7","📨":"1f4e8","💗":"1f497","📩":"1f4e9","📪":"1f4ea","💘":"1f498","📫":"1f4eb","📮":"1f4ee","💙":"1f499","📰":"1f4f0","📱":"1f4f1","💚":"1f49a","📲":"1f4f2","📳":"1f4f3","💛":"1f49b","📴":"1f4f4","📶":"1f4f6","💜":"1f49c","📷":"1f4f7","📹":"1f4f9","💝":"1f49d","📺":"1f4fa","📻":"1f4fb","💞":"1f49e","📼":"1f4fc","🔃":"1f503","💟":"1f49f","🔊":"1f50a","🔋":"1f50b","💠":"1f4a0","🔌":"1f50c","🔍":"1f50d","💡":"1f4a1","🔎":"1f50e","🔏":"1f50f","💢":"1f4a2","🔐":"1f510","🔑":"1f511","💣":"1f4a3","🔒":"1f512","🔓":"1f513","💤":"1f4a4","🔔":"1f514","🔖":"1f516","💥":"1f4a5","🔗":"1f517","🔘":"1f518","💦":"1f4a6","🔙":"1f519","🔚":"1f51a","💧":"1f4a7","🔛":"1f51b","🔜":"1f51c","💨":"1f4a8","🔝":"1f51d","🔞":"1f51e","💩":"1f4a9","🔟":"1f51f","💪":"1f4aa","🔠":"1f520","🔡":"1f521","💫":"1f4ab","🔢":"1f522","🔣":"1f523","💬":"1f4ac","🔤":"1f524","🔥":"1f525","💮":"1f4ae","🔦":"1f526","🔧":"1f527","💯":"1f4af","🔨":"1f528","🔩":"1f529","💰":"1f4b0","🔪":"1f52a","🔫":"1f52b","💱":"1f4b1","🔮":"1f52e","💲":"1f4b2","🔯":"1f52f","💳":"1f4b3","🔰":"1f530","🔱":"1f531","💴":"1f4b4","🔲":"1f532","🔳":"1f533","💵":"1f4b5","🔴":"1f534","🔵":"1f535","💸":"1f4b8","🔶":"1f536","🔷":"1f537","💹":"1f4b9","🔸":"1f538","🔹":"1f539","💺":"1f4ba","🔺":"1f53a","🔻":"1f53b","💻":"1f4bb","🔼":"1f53c","💼":"1f4bc","🔽":"1f53d","🕐":"1f550","💽":"1f4bd","🕑":"1f551","💾":"1f4be","🕒":"1f552","💿":"1f4bf","🕓":"1f553","📀":"1f4c0","🕔":"1f554","🕕":"1f555","📁":"1f4c1","🕖":"1f556","🕗":"1f557","📂":"1f4c2","🕘":"1f558","🕙":"1f559","📃":"1f4c3","🕚":"1f55a","🕛":"1f55b","📄":"1f4c4","🗻":"1f5fb","🗼":"1f5fc","📅":"1f4c5","🗽":"1f5fd","🗾":"1f5fe","📆":"1f4c6","🗿":"1f5ff","😁":"1f601","😂":"1f602","😃":"1f603","📈":"1f4c8","😄":"1f604","😅":"1f605","📉":"1f4c9","😆":"1f606","😉":"1f609","📊":"1f4ca","😊":"1f60a","😋":"1f60b","📋":"1f4cb","😌":"1f60c","😍":"1f60d","📌":"1f4cc","😏":"1f60f","😒":"1f612","📍":"1f4cd","😓":"1f613","😔":"1f614","📎":"1f4ce","😖":"1f616","😘":"1f618","📏":"1f4cf","😚":"1f61a","😜":"1f61c","📐":"1f4d0","😝":"1f61d","😞":"1f61e","📑":"1f4d1","😠":"1f620","😡":"1f621","😢":"1f622","😣":"1f623","😤":"1f624","😥":"1f625","😨":"1f628","😩":"1f629","😪":"1f62a","😫":"1f62b","😭":"1f62d","😰":"1f630","😱":"1f631","😲":"1f632","😳":"1f633","😵":"1f635","😷":"1f637","😸":"1f638","😹":"1f639","😺":"1f63a","😻":"1f63b","😼":"1f63c","😽":"1f63d","😾":"1f63e","😿":"1f63f","🙀":"1f640","🙅":"1f645","🙆":"1f646","🙇":"1f647","🙈":"1f648","🙉":"1f649","🙊":"1f64a","🙋":"1f64b","🙌":"1f64c","🙍":"1f64d","🙎":"1f64e","🙏":"1f64f","🚀":"1f680","🚃":"1f683","🚄":"1f684","🚅":"1f685","🚇":"1f687","🚉":"1f689","🚌":"1f68c","🚏":"1f68f","🚑":"1f691","🚒":"1f692","🚓":"1f693","🚕":"1f695","🚗":"1f697","🚙":"1f699","🚚":"1f69a","🚢":"1f6a2","🚤":"1f6a4","🚥":"1f6a5","🚧":"1f6a7","🚨":"1f6a8","🚩":"1f6a9","🚪":"1f6aa","🚫":"1f6ab","🚬":"1f6ac","🚭":"1f6ad","🚲":"1f6b2","🚶":"1f6b6","🚹":"1f6b9","🚺":"1f6ba","🚻":"1f6bb","🚼":"1f6bc","🚽":"1f6bd","🚾":"1f6be","🛀":"1f6c0","🤘":"1f918","😀":"1f600","😇":"1f607","😈":"1f608","😎":"1f60e","😐":"1f610","😑":"1f611","😕":"1f615","😗":"1f617","😙":"1f619","😛":"1f61b","😟":"1f61f","😦":"1f626","😧":"1f627","😬":"1f62c","😮":"1f62e","😯":"1f62f","😴":"1f634","😶":"1f636","🚁":"1f681","🚂":"1f682","🚆":"1f686","🚈":"1f688","🚊":"1f68a","🚍":"1f68d","🚎":"1f68e","🚐":"1f690","🚔":"1f694","🚖":"1f696","🚘":"1f698","🚛":"1f69b","🚜":"1f69c","🚝":"1f69d","🚞":"1f69e","🚟":"1f69f","🚠":"1f6a0","🚡":"1f6a1","🚣":"1f6a3","🚦":"1f6a6","🚮":"1f6ae","🚯":"1f6af","🚰":"1f6b0","🚱":"1f6b1","🚳":"1f6b3","🚴":"1f6b4","🚵":"1f6b5","🚷":"1f6b7","🚸":"1f6b8","🚿":"1f6bf","🛁":"1f6c1","🛂":"1f6c2","🛃":"1f6c3","🛄":"1f6c4","🛅":"1f6c5","🌍":"1f30d","🌎":"1f30e","🌐":"1f310","🌒":"1f312","🌖":"1f316","🌗":"1f317","🌘":"1f318","🌚":"1f31a","🌜":"1f31c","🌝":"1f31d","🌞":"1f31e","🌲":"1f332","🌳":"1f333","🍋":"1f34b","🍐":"1f350","🍼":"1f37c","🏇":"1f3c7","🏉":"1f3c9","🏤":"1f3e4","🐀":"1f400","🐁":"1f401","🐂":"1f402","🐃":"1f403","🐄":"1f404","🐅":"1f405","🐆":"1f406","🐇":"1f407","🐈":"1f408","🐉":"1f409","🐊":"1f40a","🐋":"1f40b","🐏":"1f40f","🐐":"1f410","🐓":"1f413","🐕":"1f415","🐖":"1f416","🐪":"1f42a","👥":"1f465","👬":"1f46c","👭":"1f46d","💭":"1f4ad","💶":"1f4b6","💷":"1f4b7","📬":"1f4ec","📭":"1f4ed","📯":"1f4ef","📵":"1f4f5","🔀":"1f500","🔁":"1f501","🔂":"1f502","🔄":"1f504","🔅":"1f505","🔆":"1f506","🔇":"1f507","🔉":"1f509","🔕":"1f515","🔬":"1f52c","🔭":"1f52d","🕜":"1f55c","🕝":"1f55d","🕞":"1f55e","🕟":"1f55f","🕠":"1f560","🕡":"1f561","🕢":"1f562","🕣":"1f563","🕤":"1f564","🕥":"1f565","🕦":"1f566","🕧":"1f567","🔈":"1f508","🚋":"1f68b","🎞":"1f39e","🎟":"1f39f","🏅":"1f3c5","🏋":"1f3cb","🏌":"1f3cc","🏍":"1f3cd","🏎":"1f3ce","🎖":"1f396","🎗":"1f397","🌶":"1f336","🌧":"1f327","🌨":"1f328","🌩":"1f329","🌪":"1f32a","🌫":"1f32b","🌬":"1f32c","🐿":"1f43f","🕷":"1f577","🕸":"1f578","🌡":"1f321","🎙":"1f399","🎚":"1f39a","🎛":"1f39b","🏳":"1f3f3","🏴":"1f3f4","🏵":"1f3f5","🏷":"1f3f7","📸":"1f4f8","📽":"1f4fd","🕊":"1f54a","🕯":"1f56f","🕰":"1f570","🕳":"1f573","🕶":"1f576","🕹":"1f579","🖇":"1f587","🖊":"1f58a","🖋":"1f58b","🖌":"1f58c","🖍":"1f58d","🖥":"1f5a5","🖨":"1f5a8","🖲":"1f5b2","🖼":"1f5bc","🗂":"1f5c2","🗃":"1f5c3","🗄":"1f5c4","🗑":"1f5d1","🗒":"1f5d2","🗓":"1f5d3","🗜":"1f5dc","🗞":"1f5de","🗡":"1f5e1","🗣":"1f5e3","🗨":"1f5e8","🗯":"1f5ef","🗳":"1f5f3","🗺":"1f5fa","🛌":"1f6cc","🛠":"1f6e0","🛡":"1f6e1","🛢":"1f6e2","🛰":"1f6f0","🍽":"1f37d","👁":"1f441","🕴":"1f574","🕵":"1f575","🖐":"1f590","🖕":"1f595","🖖":"1f596","🙁":"1f641","🙂":"1f642","🏔":"1f3d4","🏕":"1f3d5","🏖":"1f3d6","🏗":"1f3d7","🏘":"1f3d8","🏙":"1f3d9","🏚":"1f3da","🏛":"1f3db","🏜":"1f3dc","🏝":"1f3dd","🏞":"1f3de","🏟":"1f3df","🛋":"1f6cb","🛍":"1f6cd","🛎":"1f6ce","🛏":"1f6cf","🛣":"1f6e3","🛤":"1f6e4","🛥":"1f6e5","🛩":"1f6e9","🛫":"1f6eb","🛬":"1f6ec","🛳":"1f6f3","🏻":"1f3fb","🏼":"1f3fc","🏽":"1f3fd","🏾":"1f3fe","🏿":"1f3ff","🌤":"1f324","🌥":"1f325","🌦":"1f326","🖱":"1f5b1","🙃":"1f643","🤑":"1f911","🤓":"1f913","🤗":"1f917","🙄":"1f644","🤔":"1f914","🤐":"1f910","🤒":"1f912","🤕":"1f915","🤖":"1f916","🦁":"1f981","🦄":"1f984","🦂":"1f982","🦀":"1f980","🦃":"1f983","🧀":"1f9c0","🌭":"1f32d","🌮":"1f32e","🌯":"1f32f","🍿":"1f37f","🍾":"1f37e","🏹":"1f3f9","🏺":"1f3fa","🛐":"1f6d0","🕋":"1f54b","🕌":"1f54c","🕍":"1f54d","🕎":"1f54e","📿":"1f4ff","🏏":"1f3cf","🏐":"1f3d0","🏑":"1f3d1","🏒":"1f3d2","🏓":"1f3d3","🏸":"1f3f8","🥁":"1f941","🦐":"1f990","🦑":"1f991","🥚":"1f95a","🥛":"1f95b","🥜":"1f95c","🥝":"1f95d","🥞":"1f95e","🇼":"1f1fc","🇻":"1f1fb","🇺":"1f1fa","🇹":"1f1f9","🇸":"1f1f8","🇷":"1f1f7","🇶":"1f1f6","🇵":"1f1f5","🇴":"1f1f4","🇳":"1f1f3","🇲":"1f1f2","🇱":"1f1f1","🇰":"1f1f0","🇯":"1f1ef","🇮":"1f1ee","🇭":"1f1ed","🇬":"1f1ec","🇫":"1f1eb","🇪":"1f1ea","🇩":"1f1e9","🇨":"1f1e8","🇧":"1f1e7","🇦":"1f1e6","🛷":"1f6f7","🛸":"1f6f8","🤟":"1f91f","🤨":"1f928","🤩":"1f929","🤪":"1f92a","🤫":"1f92b","🤬":"1f92c","🤭":"1f92d","🤮":"1f92e","🤯":"1f92f","🤱":"1f931","🤲":"1f932","🥌":"1f94c","🥟":"1f95f","🥠":"1f960","🥡":"1f961","🥢":"1f962","🥣":"1f963","🥤":"1f964","🥥":"1f965","🥦":"1f966","🥧":"1f967","🥨":"1f968","🥩":"1f969","🥪":"1f96a","🥫":"1f96b","🦒":"1f992","🦓":"1f993","🦔":"1f994","🦕":"1f995","🦖":"1f996","🦗":"1f997","🧐":"1f9d0","🧑":"1f9d1","🧒":"1f9d2","🧓":"1f9d3","🧔":"1f9d4","🧕":"1f9d5","🧖":"1f9d6","🧗":"1f9d7","🧘":"1f9d8","🧙":"1f9d9","🧚":"1f9da","🧛":"1f9db","🧜":"1f9dc","🧝":"1f9dd","🧞":"1f9de","🧟":"1f9df","🧠":"1f9e0","🧡":"1f9e1","🧢":"1f9e2","🧣":"1f9e3","🧤":"1f9e4","🧥":"1f9e5","🧦":"1f9e6","🛹":"1f6f9","🥍":"1f94d","🥎":"1f94e","🥏":"1f94f","🥬":"1f96c","🥭":"1f96d","🥮":"1f96e","🥯":"1f96f","🥰":"1f970","🥳":"1f973","🥴":"1f974","🥵":"1f975","🥶":"1f976","🥺":"1f97a","🥼":"1f97c","🥽":"1f97d","🥾":"1f97e","🥿":"1f97f","🦘":"1f998","🦙":"1f999","🦚":"1f99a","🦛":"1f99b","🦜":"1f99c","🦝":"1f99d","🦞":"1f99e","🦟":"1f99f","🦠":"1f9a0","🦡":"1f9a1","🦢":"1f9a2","🦰":"1f9b0","🦱":"1f9b1","🦲":"1f9b2","🦳":"1f9b3","🦴":"1f9b4","🦵":"1f9b5","🦶":"1f9b6","🦷":"1f9b7","🦸":"1f9b8","🦹":"1f9b9","🧁":"1f9c1","🧂":"1f9c2","🧧":"1f9e7","🧨":"1f9e8","🧩":"1f9e9","🧪":"1f9ea","🧫":"1f9eb","🧬":"1f9ec","🧭":"1f9ed","🧮":"1f9ee","🧯":"1f9ef","🧰":"1f9f0","🧱":"1f9f1","🧲":"1f9f2","🧳":"1f9f3","🧴":"1f9f4","🧵":"1f9f5","🧶":"1f9f6","🧷":"1f9f7","🧸":"1f9f8","🧹":"1f9f9","🧺":"1f9fa","🧻":"1f9fb","🧼":"1f9fc","🧽":"1f9fd","🧾":"1f9fe","🧿":"1f9ff","⌚":"231a","⌛":"231b","⏩":"23e9","⏪":"23ea","⏫":"23eb","⏬":"23ec","⏰":"23f0","⏳":"23f3","Ⓜ":"24c2","◽":"25fd","◾":"25fe","☀":"2600","☁":"2601","☎":"260e","☔":"2614","☕":"2615","☝":"261d","☺":"263a","♈":"2648","♉":"2649","♊":"264a","♋":"264b","♌":"264c","♍":"264d","♎":"264e","♏":"264f","♐":"2650","♑":"2651","♒":"2652","♓":"2653","♠":"2660","♣":"2663","♥":"2665","♦":"2666","♨":"2668","♻":"267b","♿":"267f","⚓":"2693","⚡":"26a1","⚪":"26aa","⚫":"26ab","⚽":"26bd","⚾":"26be","⛄":"26c4","⛅":"26c5","⛎":"26ce","⛔":"26d4","⛪":"26ea","⛲":"26f2","⛳":"26f3","⛵":"26f5","⛺":"26fa","⛽":"26fd","✂":"2702","✅":"2705","✈":"2708","✉":"2709","✊":"270a","✋":"270b","✌":"270c","✏":"270f","✒":"2712","✨":"2728","✳":"2733","✴":"2734","❄":"2744","❇":"2747","❌":"274c","❎":"274e","❓":"2753","❔":"2754","❕":"2755","❗":"2757","❤":"2764","➕":"2795","➖":"2796","➗":"2797","➰":"27b0","⬛":"2b1b","⬜":"2b1c","⭐":"2b50","⭕":"2b55","〽":"303d","㊗":"3297","㊙":"3299","➿":"27bf","⌨":"2328","✍":"270d","⏱":"23f1","⏲":"23f2","☂":"2602","☃":"2603","☄":"2604","☘":"2618","☠":"2620","☹":"2639","⚒":"2692","⚔":"2694","⚖":"2696","⚗":"2697","⚙":"2699","⚜":"269c","⚰":"26b0","⚱":"26b1","⛈":"26c8","⛏":"26cf","⛑":"26d1","⛓":"26d3","⛩":"26e9","⛰":"26f0","⛱":"26f1","⛴":"26f4","⛷":"26f7","⛸":"26f8","⛹":"26f9","❣":"2763","♟":"265f","♾":"267e"},d.jsEscapeMapGreedy={"👩❤💋👩":"1f469-2764-1f48b-1f469","👨❤💋👨":"1f468-2764-1f48b-1f468","👩❤💋👨":"1f469-2764-1f48b-1f468","👩❤👩":"1f469-2764-1f469","👨❤👨":"1f468-2764-1f468","🏌🏻♂":"1f3cc-1f3fb-2642","🏌🏼♂":"1f3cc-1f3fc-2642","🏌🏽♂":"1f3cc-1f3fd-2642","🏌🏾♂":"1f3cc-1f3fe-2642","🏌🏿♂":"1f3cc-1f3ff-2642","🏌🏻♀":"1f3cc-1f3fb-2640","🏌🏼♀":"1f3cc-1f3fc-2640","🏌🏽♀":"1f3cc-1f3fd-2640","🏌🏾♀":"1f3cc-1f3fe-2640","🏌🏿♀":"1f3cc-1f3ff-2640","👨🏻⚖":"1f468-1f3fb-2696","👨🏼⚖":"1f468-1f3fc-2696","👨🏽⚖":"1f468-1f3fd-2696","👨🏾⚖":"1f468-1f3fe-2696","👨🏿⚖":"1f468-1f3ff-2696","👩🏻⚖":"1f469-1f3fb-2696","👩🏼⚖":"1f469-1f3fc-2696","👩🏽⚖":"1f469-1f3fd-2696","👩🏾⚖":"1f469-1f3fe-2696","👩🏿⚖":"1f469-1f3ff-2696","👨🏻✈":"1f468-1f3fb-2708","👨🏼✈":"1f468-1f3fc-2708","👨🏽✈":"1f468-1f3fd-2708","👨🏾✈":"1f468-1f3fe-2708","👨🏿✈":"1f468-1f3ff-2708","👩🏻✈":"1f469-1f3fb-2708","👩🏼✈":"1f469-1f3fc-2708","👩🏽✈":"1f469-1f3fd-2708","👩🏾✈":"1f469-1f3fe-2708","👩🏿✈":"1f469-1f3ff-2708","👩❤👨":"1f469-2764-1f468","👨🏻⚕":"1f468-1f3fb-2695","👨🏼⚕":"1f468-1f3fc-2695","👨🏽⚕":"1f468-1f3fd-2695","👨🏾⚕":"1f468-1f3fe-2695","👨🏿⚕":"1f468-1f3ff-2695","👩🏻⚕":"1f469-1f3fb-2695","👩🏼⚕":"1f469-1f3fc-2695","👩🏽⚕":"1f469-1f3fd-2695","👩🏾⚕":"1f469-1f3fe-2695","👩🏿⚕":"1f469-1f3ff-2695","👮🏻♀":"1f46e-1f3fb-2640","👮🏻♂":"1f46e-1f3fb-2642","👮🏼♀":"1f46e-1f3fc-2640","👮🏼♂":"1f46e-1f3fc-2642","👮🏽♀":"1f46e-1f3fd-2640","👮🏽♂":"1f46e-1f3fd-2642","👮🏾♀":"1f46e-1f3fe-2640","👮🏾♂":"1f46e-1f3fe-2642","👮🏿♀":"1f46e-1f3ff-2640","👮🏿♂":"1f46e-1f3ff-2642","👱🏻♀":"1f471-1f3fb-2640","👱🏻♂":"1f471-1f3fb-2642","👱🏼♀":"1f471-1f3fc-2640","👱🏼♂":"1f471-1f3fc-2642","👱🏽♀":"1f471-1f3fd-2640","👱🏽♂":"1f471-1f3fd-2642","👱🏾♀":"1f471-1f3fe-2640","👱🏾♂":"1f471-1f3fe-2642","👱🏿♀":"1f471-1f3ff-2640","👱🏿♂":"1f471-1f3ff-2642","👳🏻♀":"1f473-1f3fb-2640","👳🏻♂":"1f473-1f3fb-2642","👳🏼♀":"1f473-1f3fc-2640","👳🏼♂":"1f473-1f3fc-2642","👳🏽♀":"1f473-1f3fd-2640","👳🏽♂":"1f473-1f3fd-2642","👳🏾♀":"1f473-1f3fe-2640","👳🏾♂":"1f473-1f3fe-2642","👳🏿♀":"1f473-1f3ff-2640","👳🏿♂":"1f473-1f3ff-2642","👷🏻♀":"1f477-1f3fb-2640","👷🏻♂":"1f477-1f3fb-2642","👷🏼♀":"1f477-1f3fc-2640","👷🏼♂":"1f477-1f3fc-2642","👷🏽♀":"1f477-1f3fd-2640","👷🏽♂":"1f477-1f3fd-2642","👷🏾♀":"1f477-1f3fe-2640","👷🏾♂":"1f477-1f3fe-2642","👷🏿♀":"1f477-1f3ff-2640","👷🏿♂":"1f477-1f3ff-2642","💂🏻♀":"1f482-1f3fb-2640","💂🏻♂":"1f482-1f3fb-2642","💂🏼♀":"1f482-1f3fc-2640","💂🏼♂":"1f482-1f3fc-2642","💂🏽♀":"1f482-1f3fd-2640","💂🏽♂":"1f482-1f3fd-2642","💂🏾♀":"1f482-1f3fe-2640","💂🏾♂":"1f482-1f3fe-2642","💂🏿♀":"1f482-1f3ff-2640","💂🏿♂":"1f482-1f3ff-2642","🕵🏻♀":"1f575-1f3fb-2640","🕵🏻♂":"1f575-1f3fb-2642","🕵🏼♀":"1f575-1f3fc-2640","🕵🏼♂":"1f575-1f3fc-2642","🕵🏽♀":"1f575-1f3fd-2640","🕵🏽♂":"1f575-1f3fd-2642","🕵🏾♀":"1f575-1f3fe-2640","🕵🏾♂":"1f575-1f3fe-2642","🕵🏿♀":"1f575-1f3ff-2640","🕵🏿♂":"1f575-1f3ff-2642","🏃🏻♀":"1f3c3-1f3fb-2640","🏃🏻♂":"1f3c3-1f3fb-2642","🏃🏼♀":"1f3c3-1f3fc-2640","🏃🏼♂":"1f3c3-1f3fc-2642","🏃🏽♀":"1f3c3-1f3fd-2640","🏃🏽♂":"1f3c3-1f3fd-2642","🏃🏾♀":"1f3c3-1f3fe-2640","🏃🏾♂":"1f3c3-1f3fe-2642","🏃🏿♀":"1f3c3-1f3ff-2640","🏃🏿♂":"1f3c3-1f3ff-2642","🏄🏻♀":"1f3c4-1f3fb-2640","🏄🏻♂":"1f3c4-1f3fb-2642","🏄🏼♀":"1f3c4-1f3fc-2640","🏄🏼♂":"1f3c4-1f3fc-2642","🏄🏽♀":"1f3c4-1f3fd-2640","🏄🏽♂":"1f3c4-1f3fd-2642","🏄🏾♀":"1f3c4-1f3fe-2640","🏄🏾♂":"1f3c4-1f3fe-2642","🏄🏿♀":"1f3c4-1f3ff-2640","🏄🏿♂":"1f3c4-1f3ff-2642","🏊🏻♀":"1f3ca-1f3fb-2640","🏊🏻♂":"1f3ca-1f3fb-2642","🏊🏼♀":"1f3ca-1f3fc-2640","🏊🏼♂":"1f3ca-1f3fc-2642","🏊🏽♀":"1f3ca-1f3fd-2640","🏊🏽♂":"1f3ca-1f3fd-2642","🏊🏾♀":"1f3ca-1f3fe-2640","🏊🏾♂":"1f3ca-1f3fe-2642","🏊🏿♀":"1f3ca-1f3ff-2640","🏊🏿♂":"1f3ca-1f3ff-2642","🏋🏻♀":"1f3cb-1f3fb-2640","🏋🏻♂":"1f3cb-1f3fb-2642","🏋🏼♀":"1f3cb-1f3fc-2640","🏋🏼♂":"1f3cb-1f3fc-2642","🏋🏽♀":"1f3cb-1f3fd-2640","🏋🏽♂":"1f3cb-1f3fd-2642","🏋🏾♀":"1f3cb-1f3fe-2640","🏋🏾♂":"1f3cb-1f3fe-2642","🏋🏿♀":"1f3cb-1f3ff-2640","🏋🏿♂":"1f3cb-1f3ff-2642","💆🏻♀":"1f486-1f3fb-2640","💆🏻♂":"1f486-1f3fb-2642","💆🏼♀":"1f486-1f3fc-2640","💆🏼♂":"1f486-1f3fc-2642","💆🏽♀":"1f486-1f3fd-2640","💆🏽♂":"1f486-1f3fd-2642","💆🏾♀":"1f486-1f3fe-2640","💆🏾♂":"1f486-1f3fe-2642","💆🏿♀":"1f486-1f3ff-2640","💆🏿♂":"1f486-1f3ff-2642","💇🏻♀":"1f487-1f3fb-2640","💇🏻♂":"1f487-1f3fb-2642","💇🏼♀":"1f487-1f3fc-2640","💇🏼♂":"1f487-1f3fc-2642","💇🏽♀":"1f487-1f3fd-2640","💇🏽♂":"1f487-1f3fd-2642","💇🏾♀":"1f487-1f3fe-2640","💇🏾♂":"1f487-1f3fe-2642","💇🏿♀":"1f487-1f3ff-2640","💇🏿♂":"1f487-1f3ff-2642","🚣🏻♀":"1f6a3-1f3fb-2640","🚣🏻♂":"1f6a3-1f3fb-2642","🚣🏼♀":"1f6a3-1f3fc-2640","🚣🏼♂":"1f6a3-1f3fc-2642","🚣🏽♀":"1f6a3-1f3fd-2640","🚣🏽♂":"1f6a3-1f3fd-2642","🚣🏾♀":"1f6a3-1f3fe-2640","🚣🏾♂":"1f6a3-1f3fe-2642","🚣🏿♀":"1f6a3-1f3ff-2640","🚣🏿♂":"1f6a3-1f3ff-2642","🚴🏻♀":"1f6b4-1f3fb-2640","🚴🏻♂":"1f6b4-1f3fb-2642","🚴🏼♀":"1f6b4-1f3fc-2640","🚴🏼♂":"1f6b4-1f3fc-2642","🚴🏽♀":"1f6b4-1f3fd-2640","🚴🏽♂":"1f6b4-1f3fd-2642","🚴🏾♀":"1f6b4-1f3fe-2640","🚴🏾♂":"1f6b4-1f3fe-2642","🚴🏿♀":"1f6b4-1f3ff-2640","🚴🏿♂":"1f6b4-1f3ff-2642","🚵🏻♀":"1f6b5-1f3fb-2640","🚵🏻♂":"1f6b5-1f3fb-2642","🚵🏼♀":"1f6b5-1f3fc-2640","🚵🏼♂":"1f6b5-1f3fc-2642","🚵🏽♀":"1f6b5-1f3fd-2640","🚵🏽♂":"1f6b5-1f3fd-2642","🚵🏾♀":"1f6b5-1f3fe-2640","🚵🏾♂":"1f6b5-1f3fe-2642","🚵🏿♀":"1f6b5-1f3ff-2640","🚵🏿♂":"1f6b5-1f3ff-2642","🚶🏻♀":"1f6b6-1f3fb-2640","🚶🏻♂":"1f6b6-1f3fb-2642","🚶🏼♀":"1f6b6-1f3fc-2640","🚶🏼♂":"1f6b6-1f3fc-2642","🚶🏽♀":"1f6b6-1f3fd-2640","🚶🏽♂":"1f6b6-1f3fd-2642","🚶🏾♀":"1f6b6-1f3fe-2640","🚶🏾♂":"1f6b6-1f3fe-2642","🚶🏿♀":"1f6b6-1f3ff-2640","🚶🏿♂":"1f6b6-1f3ff-2642","🤸🏻♀":"1f938-1f3fb-2640","🤸🏻♂":"1f938-1f3fb-2642","🤸🏼♀":"1f938-1f3fc-2640","🤸🏼♂":"1f938-1f3fc-2642","🤸🏽♀":"1f938-1f3fd-2640","🤸🏽♂":"1f938-1f3fd-2642","🤸🏾♀":"1f938-1f3fe-2640","🤸🏾♂":"1f938-1f3fe-2642","🤸🏿♀":"1f938-1f3ff-2640","🤸🏿♂":"1f938-1f3ff-2642","🤹🏻♀":"1f939-1f3fb-2640","🤹🏻♂":"1f939-1f3fb-2642","🤹🏼♀":"1f939-1f3fc-2640","🤹🏼♂":"1f939-1f3fc-2642","🤹🏽♀":"1f939-1f3fd-2640","🤹🏽♂":"1f939-1f3fd-2642","🤹🏾♀":"1f939-1f3fe-2640","🤹🏾♂":"1f939-1f3fe-2642","🤹🏿♀":"1f939-1f3ff-2640","🤹🏿♂":"1f939-1f3ff-2642","🤽🏻♀":"1f93d-1f3fb-2640","🤽🏻♂":"1f93d-1f3fb-2642","🤽🏼♀":"1f93d-1f3fc-2640","🤽🏼♂":"1f93d-1f3fc-2642","🤽🏽♀":"1f93d-1f3fd-2640","🤽🏽♂":"1f93d-1f3fd-2642","🤽🏾♀":"1f93d-1f3fe-2640","🤽🏾♂":"1f93d-1f3fe-2642","🤽🏿♀":"1f93d-1f3ff-2640","🤽🏿♂":"1f93d-1f3ff-2642","🤾🏻♀":"1f93e-1f3fb-2640","🤾🏻♂":"1f93e-1f3fb-2642","🤾🏼♀":"1f93e-1f3fc-2640","🤾🏼♂":"1f93e-1f3fc-2642","🤾🏽♀":"1f93e-1f3fd-2640","🤾🏽♂":"1f93e-1f3fd-2642","🤾🏾♀":"1f93e-1f3fe-2640","🤾🏾♂":"1f93e-1f3fe-2642","🤾🏿♀":"1f93e-1f3ff-2640","🤾🏿♂":"1f93e-1f3ff-2642","💁🏻♀":"1f481-1f3fb-2640","💁🏻♂":"1f481-1f3fb-2642","💁🏼♀":"1f481-1f3fc-2640","💁🏼♂":"1f481-1f3fc-2642","💁🏽♀":"1f481-1f3fd-2640","💁🏽♂":"1f481-1f3fd-2642","💁🏾♀":"1f481-1f3fe-2640","💁🏾♂":"1f481-1f3fe-2642","💁🏿♀":"1f481-1f3ff-2640","💁🏿♂":"1f481-1f3ff-2642","🙅🏻♀":"1f645-1f3fb-2640","🙅🏻♂":"1f645-1f3fb-2642","🙅🏼♀":"1f645-1f3fc-2640","🙅🏼♂":"1f645-1f3fc-2642","🙅🏽♀":"1f645-1f3fd-2640","🙅🏽♂":"1f645-1f3fd-2642","🙅🏾♀":"1f645-1f3fe-2640","🙅🏾♂":"1f645-1f3fe-2642","🙅🏿♀":"1f645-1f3ff-2640","🙅🏿♂":"1f645-1f3ff-2642","🙆🏻♀":"1f646-1f3fb-2640","🙆🏻♂":"1f646-1f3fb-2642","🙆🏼♀":"1f646-1f3fc-2640","🙆🏼♂":"1f646-1f3fc-2642","🙆🏽♀":"1f646-1f3fd-2640","🙆🏽♂":"1f646-1f3fd-2642","🙆🏾♀":"1f646-1f3fe-2640","🙆🏾♂":"1f646-1f3fe-2642","🙆🏿♀":"1f646-1f3ff-2640","🙆🏿♂":"1f646-1f3ff-2642","🙇🏻♀":"1f647-1f3fb-2640","🙇🏻♂":"1f647-1f3fb-2642","🙇🏼♀":"1f647-1f3fc-2640","🙇🏼♂":"1f647-1f3fc-2642","🙇🏽♀":"1f647-1f3fd-2640","🙇🏽♂":"1f647-1f3fd-2642","🙇🏾♀":"1f647-1f3fe-2640","🙇🏾♂":"1f647-1f3fe-2642","🙇🏿♀":"1f647-1f3ff-2640","🙇🏿♂":"1f647-1f3ff-2642","🙋🏻♀":"1f64b-1f3fb-2640","🙋🏻♂":"1f64b-1f3fb-2642","🙋🏼♀":"1f64b-1f3fc-2640","🙋🏼♂":"1f64b-1f3fc-2642","🙋🏽♀":"1f64b-1f3fd-2640","🙋🏽♂":"1f64b-1f3fd-2642","🙋🏾♀":"1f64b-1f3fe-2640","🙋🏾♂":"1f64b-1f3fe-2642","🙋🏿♀":"1f64b-1f3ff-2640","🙋🏿♂":"1f64b-1f3ff-2642","🙍🏻♀":"1f64d-1f3fb-2640","🙍🏻♂":"1f64d-1f3fb-2642","🙍🏼♀":"1f64d-1f3fc-2640","🙍🏼♂":"1f64d-1f3fc-2642","🙍🏽♀":"1f64d-1f3fd-2640","🙍🏽♂":"1f64d-1f3fd-2642","🙍🏾♀":"1f64d-1f3fe-2640","🙍🏾♂":"1f64d-1f3fe-2642","🙍🏿♀":"1f64d-1f3ff-2640","🙍🏿♂":"1f64d-1f3ff-2642","🙎🏻♀":"1f64e-1f3fb-2640","🙎🏻♂":"1f64e-1f3fb-2642","🙎🏼♀":"1f64e-1f3fc-2640","🙎🏼♂":"1f64e-1f3fc-2642","🙎🏽♀":"1f64e-1f3fd-2640","🙎🏽♂":"1f64e-1f3fd-2642","🙎🏾♀":"1f64e-1f3fe-2640","🙎🏾♂":"1f64e-1f3fe-2642","🙎🏿♀":"1f64e-1f3ff-2640","🙎🏿♂":"1f64e-1f3ff-2642","🤦🏻♀":"1f926-1f3fb-2640","🤦🏻♂":"1f926-1f3fb-2642","🤦🏼♀":"1f926-1f3fc-2640","🤦🏼♂":"1f926-1f3fc-2642","🤦🏽♀":"1f926-1f3fd-2640","🤦🏽♂":"1f926-1f3fd-2642","🤦🏾♀":"1f926-1f3fe-2640","🤦🏾♂":"1f926-1f3fe-2642","🤦🏿♀":"1f926-1f3ff-2640","🤦🏿♂":"1f926-1f3ff-2642","🤷🏻♀":"1f937-1f3fb-2640","🤷🏻♂":"1f937-1f3fb-2642","🤷🏼♀":"1f937-1f3fc-2640","🤷🏼♂":"1f937-1f3fc-2642","🤷🏽♀":"1f937-1f3fd-2640","🤷🏽♂":"1f937-1f3fd-2642","🤷🏾♀":"1f937-1f3fe-2640","🤷🏾♂":"1f937-1f3fe-2642","🤷🏿♀":"1f937-1f3ff-2640","🤷🏿♂":"1f937-1f3ff-2642","🧙🏻♀":"1f9d9-1f3fb-2640","🧙🏻♂":"1f9d9-1f3fb-2642","🧙🏼♀":"1f9d9-1f3fc-2640","🧙🏼♂":"1f9d9-1f3fc-2642","🧙🏽♀":"1f9d9-1f3fd-2640","🧙🏽♂":"1f9d9-1f3fd-2642","🧙🏾♀":"1f9d9-1f3fe-2640","🧙🏾♂":"1f9d9-1f3fe-2642","🧙🏿♀":"1f9d9-1f3ff-2640","🧙🏿♂":"1f9d9-1f3ff-2642","🧚🏻♀":"1f9da-1f3fb-2640","🧚🏻♂":"1f9da-1f3fb-2642","🧚🏼♀":"1f9da-1f3fc-2640","🧚🏼♂":"1f9da-1f3fc-2642","🧚🏽♀":"1f9da-1f3fd-2640","🧚🏽♂":"1f9da-1f3fd-2642","🧚🏾♀":"1f9da-1f3fe-2640","🧚🏾♂":"1f9da-1f3fe-2642","🧚🏿♀":"1f9da-1f3ff-2640","🧚🏿♂":"1f9da-1f3ff-2642","🧛🏻♀":"1f9db-1f3fb-2640","🧛🏻♂":"1f9db-1f3fb-2642","🧛🏼♀":"1f9db-1f3fc-2640","🧛🏼♂":"1f9db-1f3fc-2642","🧛🏽♀":"1f9db-1f3fd-2640","🧛🏽♂":"1f9db-1f3fd-2642","🧛🏾♀":"1f9db-1f3fe-2640","🧛🏾♂":"1f9db-1f3fe-2642","🧛🏿♀":"1f9db-1f3ff-2640","🧛🏿♂":"1f9db-1f3ff-2642","🧜🏻♀":"1f9dc-1f3fb-2640","🧜🏻♂":"1f9dc-1f3fb-2642","🧜🏼♀":"1f9dc-1f3fc-2640","🧜🏼♂":"1f9dc-1f3fc-2642","🧜🏽♀":"1f9dc-1f3fd-2640","🧜🏽♂":"1f9dc-1f3fd-2642","🧜🏾♀":"1f9dc-1f3fe-2640","🧜🏾♂":"1f9dc-1f3fe-2642","🧜🏿♀":"1f9dc-1f3ff-2640","🧜🏿♂":"1f9dc-1f3ff-2642","🧝🏻♀":"1f9dd-1f3fb-2640","🧝🏻♂":"1f9dd-1f3fb-2642","🧝🏼♀":"1f9dd-1f3fc-2640","🧝🏼♂":"1f9dd-1f3fc-2642","🧝🏽♀":"1f9dd-1f3fd-2640","🧝🏽♂":"1f9dd-1f3fd-2642","🧝🏾♀":"1f9dd-1f3fe-2640","🧝🏾♂":"1f9dd-1f3fe-2642","🧝🏿♀":"1f9dd-1f3ff-2640","🧝🏿♂":"1f9dd-1f3ff-2642","🧖🏻♀":"1f9d6-1f3fb-2640","🧖🏻♂":"1f9d6-1f3fb-2642","🧖🏼♀":"1f9d6-1f3fc-2640","🧖🏼♂":"1f9d6-1f3fc-2642","🧖🏽♀":"1f9d6-1f3fd-2640","🧖🏽♂":"1f9d6-1f3fd-2642","🧖🏾♀":"1f9d6-1f3fe-2640","🧖🏾♂":"1f9d6-1f3fe-2642","🧖🏿♀":"1f9d6-1f3ff-2640","🧖🏿♂":"1f9d6-1f3ff-2642","🧗🏻♀":"1f9d7-1f3fb-2640","🧗🏻♂":"1f9d7-1f3fb-2642","🧗🏼♀":"1f9d7-1f3fc-2640","🧗🏼♂":"1f9d7-1f3fc-2642","🧗🏽♀":"1f9d7-1f3fd-2640","🧗🏽♂":"1f9d7-1f3fd-2642","🧗🏾♀":"1f9d7-1f3fe-2640","🧗🏾♂":"1f9d7-1f3fe-2642","🧗🏿♀":"1f9d7-1f3ff-2640","🧗🏿♂":"1f9d7-1f3ff-2642","🧘🏻♀":"1f9d8-1f3fb-2640","🧘🏻♂":"1f9d8-1f3fb-2642","🧘🏼♀":"1f9d8-1f3fc-2640","🧘🏼♂":"1f9d8-1f3fc-2642","🧘🏽♀":"1f9d8-1f3fd-2640","🧘🏽♂":"1f9d8-1f3fd-2642","🧘🏾♀":"1f9d8-1f3fe-2640","🧘🏾♂":"1f9d8-1f3fe-2642","🧘🏿♀":"1f9d8-1f3ff-2640","🧘🏿♂":"1f9d8-1f3ff-2642","🦸🏻♀":"1f9b8-1f3fb-2640","🦸🏻♂":"1f9b8-1f3fb-2642","🦸🏼♀":"1f9b8-1f3fc-2640","🦸🏼♂":"1f9b8-1f3fc-2642","🦸🏽♀":"1f9b8-1f3fd-2640","🦸🏽♂":"1f9b8-1f3fd-2642","🦸🏾♀":"1f9b8-1f3fe-2640","🦸🏾♂":"1f9b8-1f3fe-2642","🦸🏿♀":"1f9b8-1f3ff-2640","🦸🏿♂":"1f9b8-1f3ff-2642","🦹🏻♀":"1f9b9-1f3fb-2640","🦹🏻♂":"1f9b9-1f3fb-2642","🦹🏼♀":"1f9b9-1f3fc-2640","🦹🏼♂":"1f9b9-1f3fc-2642","🦹🏽♀":"1f9b9-1f3fd-2640","🦹🏽♂":"1f9b9-1f3fd-2642","🦹🏾♀":"1f9b9-1f3fe-2640","🦹🏾♂":"1f9b9-1f3fe-2642","🦹🏿♀":"1f9b9-1f3ff-2640","🦹🏿♂":"1f9b9-1f3ff-2642","⛹🏻♀":"26f9-1f3fb-2640","⛹🏻♂":"26f9-1f3fb-2642","⛹🏼♀":"26f9-1f3fc-2640","⛹🏼♂":"26f9-1f3fc-2642","⛹🏽♀":"26f9-1f3fd-2640","⛹🏽♂":"26f9-1f3fd-2642","⛹🏾♀":"26f9-1f3fe-2640","⛹🏾♂":"26f9-1f3fe-2642","⛹🏿♀":"26f9-1f3ff-2640","⛹🏿♂":"26f9-1f3ff-2642","🏳🌈":"1f3f3-1f308","👁🗨":"1f441-1f5e8","👯♂":"1f46f-2642","👯♀":"1f46f-2640","🏌♂":"1f3cc-2642","🏌♀":"1f3cc-2640","🤼♂":"1f93c-2642","🤼♀":"1f93c-2640","🤹♂":"1f939-2642","🤹♀":"1f939-2640","🤾♂":"1f93e-2642","🤾♀":"1f93e-2640","🤽♂":"1f93d-2642","🤽♀":"1f93d-2640","🤸♂":"1f938-2642","🤸♀":"1f938-2640","🚶♂":"1f6b6-2642","🚶♀":"1f6b6-2640","🚵♂":"1f6b5-2642","🚵♀":"1f6b5-2640","🚴♂":"1f6b4-2642","🚴♀":"1f6b4-2640","🚣♂":"1f6a3-2642","🚣♀":"1f6a3-2640","🏋♂":"1f3cb-2642","🏋♀":"1f3cb-2640","🏊♂":"1f3ca-2642","🏊♀":"1f3ca-2640","🏄♂":"1f3c4-2642","🏄♀":"1f3c4-2640","🏃♂":"1f3c3-2642","🏃♀":"1f3c3-2640","🤷♂":"1f937-2642","🤷♀":"1f937-2640","🤦♂":"1f926-2642","🤦♀":"1f926-2640","🙎♂":"1f64e-2642","🙎♀":"1f64e-2640","🙍♂":"1f64d-2642","🙍♀":"1f64d-2640","🙋♂":"1f64b-2642","🙋♀":"1f64b-2640","🙇♂":"1f647-2642","🙇♀":"1f647-2640","🙆♂":"1f646-2642","🙆♀":"1f646-2640","🙅♂":"1f645-2642","🙅♀":"1f645-2640","💇♂":"1f487-2642","💇♀":"1f487-2640","💆♂":"1f486-2642","💆♀":"1f486-2640","💁♂":"1f481-2642","💁♀":"1f481-2640","👱♂":"1f471-2642","👱♀":"1f471-2640","👳♂":"1f473-2642","👳♀":"1f473-2640","💂♂":"1f482-2642","💂♀":"1f482-2640","🕵♂":"1f575-2642","🕵♀":"1f575-2640","👷♂":"1f477-2642","👷♀":"1f477-2640","👮♂":"1f46e-2642","👮♀":"1f46e-2640","👨⚕":"1f468-2695","👩⚕":"1f469-2695","👨⚖":"1f468-2696","👩⚖":"1f469-2696","👨✈":"1f468-2708","👩✈":"1f469-2708","🧙♀":"1f9d9-2640","🧙♂":"1f9d9-2642","🧚♀":"1f9da-2640","🧚♂":"1f9da-2642","🧛♀":"1f9db-2640","🧛♂":"1f9db-2642","🧜♀":"1f9dc-2640","🧜♂":"1f9dc-2642","🧝♀":"1f9dd-2640","🧝♂":"1f9dd-2642","🧞♀":"1f9de-2640","🧞♂":"1f9de-2642","🧟♀":"1f9df-2640","🧟♂":"1f9df-2642","🧖♀":"1f9d6-2640","🧖♂":"1f9d6-2642","🧗♀":"1f9d7-2640","🧗♂":"1f9d7-2642","🧘♀":"1f9d8-2640","🧘♂":"1f9d8-2642","🦸♀":"1f9b8-2640","🦸♂":"1f9b8-2642","🦹♀":"1f9b9-2640","🦹♂":"1f9b9-2642","🏴☠":"1f3f4-2620","⛹♂":"26f9-2642","⛹♀":"26f9-2640","🕉":"1f549","🗝":"1f5dd","‼":"203c","⁉":"2049","ℹ":"2139","↔":"2194","↕":"2195","↖":"2196","↗":"2197","↘":"2198","↙":"2199","↩":"21a9","↪":"21aa","▪":"25aa","▫":"25ab","▶":"25b6","◀":"25c0","◻":"25fb","◼":"25fc","☑":"2611","⚠":"26a0","✔":"2714","✖":"2716","➡":"27a1","⤴":"2934","⤵":"2935","⬅":"2b05","⬆":"2b06","⬇":"2b07","〰":"3030","✝":"271d","⏏":"23cf","⏭":"23ed","⏮":"23ee","⏯":"23ef","⏸":"23f8","⏹":"23f9","⏺":"23fa","☢":"2622","☣":"2623","☦":"2626","☪":"262a","☮":"262e","☯":"262f","☸":"2638","⚛":"269b","✡":"2721","♀":"2640","♂":"2642","⚕":"2695"},d.asciiList={"*\\0/*":"1f646","*\\O/*":"1f646","-___-":"1f611",":'-)":"1f602","':-)":"1f605","':-D":"1f605",">:-)":"1f606","':-(":"1f613",">:-(":"1f620",":'-(":"1f622","O:-)":"1f607","0:-3":"1f607","0:-)":"1f607","0;^)":"1f607","O;-)":"1f607","0;-)":"1f607","O:-3":"1f607","-__-":"1f611",":-Þ":"1f61b","</3":"1f494",":')":"1f602",":-D":"1f603","':)":"1f605","'=)":"1f605","':D":"1f605","'=D":"1f605",">:)":"1f606",">;)":"1f606",">=)":"1f606",";-)":"1f609","*-)":"1f609",";-]":"1f609",";^)":"1f609","':(":"1f613","'=(":"1f613",":-*":"1f618",":^*":"1f618",">:P":"1f61c","X-P":"1f61c",">:[":"1f61e",":-(":"1f61e",":-[":"1f61e",">:(":"1f620",":'(":"1f622",";-(":"1f622",">.<":"1f623","#-)":"1f635","%-)":"1f635","X-)":"1f635","\\0/":"1f646","\\O/":"1f646","0:3":"1f607","0:)":"1f607","O:)":"1f607","O=)":"1f607","O:3":"1f607","B-)":"1f60e","8-)":"1f60e","B-D":"1f60e","8-D":"1f60e","-_-":"1f611",">:\\":"1f615",">:/":"1f615",":-/":"1f615",":-.":"1f615",":-P":"1f61b",":Þ":"1f61b",":-b":"1f61b",":-O":"1f62e",O_O:"1f62e",">:O":"1f62e",":-X":"1f636",":-#":"1f636",":-)":"1f642","(y)":"1f44d","<3":"2764",":D":"1f603","=D":"1f603",";)":"1f609","*)":"1f609",";]":"1f609",";D":"1f609",":*":"1f618","=*":"1f618",":(":"1f61e",":[":"1f61e","=(":"1f61e",":@":"1f620",";(":"1f622","D:":"1f628",":$":"1f633","=$":"1f633","#)":"1f635","%)":"1f635","X)":"1f635","B)":"1f60e","8)":"1f60e",":/":"1f615",":\\":"1f615","=/":"1f615","=\\":"1f615",":L":"1f615","=L":"1f615",":P":"1f61b","=P":"1f61b",":b":"1f61b",":O":"1f62e",":X":"1f636",":#":"1f636","=X":"1f636","=#":"1f636",":)":"1f642","=]":"1f642","=)":"1f642",":]":"1f642"},d.asciiRegexp="(\\*\\\\0\\/\\*|\\*\\\\O\\/\\*|\\-___\\-|\\:'\\-\\)|'\\:\\-\\)|'\\:\\-D|\\>\\:\\-\\)|>\\:\\-\\)|'\\:\\-\\(|\\>\\:\\-\\(|>\\:\\-\\(|\\:'\\-\\(|O\\:\\-\\)|0\\:\\-3|0\\:\\-\\)|0;\\^\\)|O;\\-\\)|0;\\-\\)|O\\:\\-3|\\-__\\-|\\:\\-Þ|\\:\\-Þ|\\<\\/3|<\\/3|\\:'\\)|\\:\\-D|'\\:\\)|'\\=\\)|'\\:D|'\\=D|\\>\\:\\)|>\\:\\)|\\>;\\)|>;\\)|\\>\\=\\)|>\\=\\)|;\\-\\)|\\*\\-\\)|;\\-\\]|;\\^\\)|'\\:\\(|'\\=\\(|\\:\\-\\*|\\:\\^\\*|\\>\\:P|>\\:P|X\\-P|\\>\\:\\[|>\\:\\[|\\:\\-\\(|\\:\\-\\[|\\>\\:\\(|>\\:\\(|\\:'\\(|;\\-\\(|\\>\\.\\<|>\\.<|#\\-\\)|%\\-\\)|X\\-\\)|\\\\0\\/|\\\\O\\/|0\\:3|0\\:\\)|O\\:\\)|O\\=\\)|O\\:3|B\\-\\)|8\\-\\)|B\\-D|8\\-D|\\-_\\-|\\>\\:\\\\|>\\:\\\\|\\>\\:\\/|>\\:\\/|\\:\\-\\/|\\:\\-\\.|\\:\\-P|\\:Þ|\\:Þ|\\:\\-b|\\:\\-O|O_O|\\>\\:O|>\\:O|\\:\\-X|\\:\\-#|\\:\\-\\)|\\(y\\)|\\<3|<3|\\:D|\\=D|;\\)|\\*\\)|;\\]|;D|\\:\\*|\\=\\*|\\:\\(|\\:\\[|\\=\\(|\\:@|;\\(|D\\:|\\:\\$|\\=\\$|#\\)|%\\)|X\\)|B\\)|8\\)|\\:\\/|\\:\\\\|\\=\\/|\\=\\\\|\\:L|\\=L|\\:P|\\=P|\\:b|\\:O|\\:X|\\:#|\\=X|\\=#|\\:\\)|\\=\\]|\\=\\)|\\:\\])",d.emojiVersion="4.5",d.emojiSize="32",d.greedyMatch=!1,d.blacklistChars="",d.imagePathPNG="https://cdn.jsdelivr.net/emojione/assets/"+d.emojiVersion+"/png/",d.defaultPathPNG=d.imagePathPNG,d.fileExtension=".png",d.imageTitleTag=!0,d.sprites=!1,d.unicodeAlt=!0,d.ascii=!1,d.riskyMatchAscii=!1,d.regShortNames=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|("+d.shortnames+")","gi"),d.regAscii=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|((\\s|^)"+d.asciiRegexp+"(?=\\s|$|[!,.?]))","gi"),d.regAsciiRisky=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|(()"+d.asciiRegexp+"())","gi"),d.regUnicode=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|(?:🏳)️?\200d?(?:🌈)|(?:👁)️?\200d?(?:🗨)️?|[#-9]️?⃣|(?:(?:🏴)(?:\udb40[\udc60-\udcff]){1,6})|(?:\ud83c[\udde0-\uddff]){2}|(?:(?:\ud83d[\udc68\udc69]))️?(?:\ud83c[\udffa-\udfff])?\200d?(?:[⚕⚖✈]|\ud83c[\udf3e-\udfed]|\ud83d[\udcbb\udcbc\udd27\udd2c\ude80\ude92])|(?:\ud83d[\udc68\udc69]|\ud83e[\uddd0-\udddf])(?:\ud83c[\udffa-\udfff])?\200d?[♀♂⚕⚖✈]?️?|(?:(?:❤|\ud83d[\udc66-\udc69\udc8b])[\200d️]{0,2}){1,3}(?:❤|\ud83d[\udc66-\udc69\udc8b])|(?:(?:❤|\ud83d[\udc66-\udc69\udc8b])️?){2,4}|(?:\ud83d[\udc68\udc69\udc6e\udc71-\udc87\udd75\ude45-\ude4e]|\ud83e[\udd26\udd37]|\ud83c[\udfc3-\udfcc]|\ud83e[\udd38-\udd3e]|\ud83d[\udea3-\udeb6]|⛹|👯)️?(?:\ud83c[\udffb-\udfff])?\200d?[♀♂]?️?|(?:[☝⛹✊-✍]|\ud83c[\udf85-\udfcc]|\ud83d[\udc42-\udcaa\udd74-\udd96\ude45-\ude4f\udea3-\udecc]|\ud83e[\udd18-\udd3e])️?(?:\ud83c[\udffb-\udfff])|(?:[↔-↙↩-↪]️?|[#*]|[〰〽]️?|(?:\ud83c[\udd70-\udd71]|🆎|\ud83c[\udd91-\udd9a])️?|Ⓜ️?|[㊗㊙]️?|(?:\ud83c[\ude01-\ude02]|🈚|🈯|\ud83c[\ude32-\ude3a]|\ud83c[\ude50-\ude51])️?|[‼⁉]️?|[▪-▫▶◀◻-◾]️?|[©®]️?|[™ℹ]️?|🀄️?|[⬅-⬇⬛-⬜⭐⭕]️?|[⌚-⌛⌨⏏⏩-⏳⏸-⏺]️?|🃏|[⤴⤵]️?)|[✀-➿]️?|[\ud800-\udbff][\udc00-\udfff]️?|[☀-⛿]️?|[0-9]️","g"),d.toImage=function(e){return e=d.toShort(e),e=d.shortnameToImage(e),e=d.wipeVS16(e)},d.unicodeToImage=function(e){return e},d.wipeVS16=function(e){var t=d.vs16Regex();return d.replaceAllVS16(e,t)},d.unifyUnicode=function(e){return e=d.toShort(e),e=d.shortnameToUnicode(e)},d.shortnameToAscii=function(e){var t,n=d.objectFlip(d.asciiList);return e=e.replace(d.regShortNames,function(e){return void 0!==e&&""!==e&&e in d.emojioneList?(t=d.emojioneList[e].uc_output,void 0!==n[t]?n[t]:e):e})},d.shortnameToUnicode=function(e){var i;if(e=e.replace(d.regShortNames,function(e){return void 0!==e&&""!==e&&e in d.emojioneList?(i=d.emojioneList[e].uc_output.toUpperCase(),d.emojioneList[e].uc_base,d.convert(i)):e}),d.ascii){var t=d.riskyMatchAscii?d.regAsciiRisky:d.regAscii;e=e.replace(t,function(e,t,n,r){return void 0!==r&&""!==r&&d.unescapeHTML(r)in d.asciiList?(r=d.unescapeHTML(r),i=d.asciiList[r].toUpperCase(),n+d.convert(i)):e})}return e},d.shortnameToImage=function(e){var i,a,n,o,s,c,l,u,f=d.mapUnicodeToShort();if(e=e.replace(d.regShortNames,function(e){if(void 0===e||""===e||-1===d.shortnames.indexOf(e))return e;if(!d.emojioneList[e])for(var t in d.emojioneList)if(d.emojioneList.hasOwnProperty(t)&&""!==t&&-1!==d.emojioneList[t].shortnames.indexOf(e)){e=t;break}return a=d.emojioneList[e].uc_output,n=d.emojioneList[e].uc_base,s=0<=n.indexOf("-1f3f")?"diversity":d.emojioneList[e].category,c=d.imageTitleTag?'title="'+e+'"':"",l="32"==d.spriteSize||"64"==d.spriteSize?d.spriteSize:"32",u=d.defaultPathPNG!==d.imagePathPNG?d.imagePathPNG:d.defaultPathPNG+d.emojiSize+"/",o=d.unicodeAlt?d.convert(a.toUpperCase()):e,d.sprites?'<span class="emojione emojione-'+l+"-"+s+" _"+n+'" '+c+">"+o+"</span>":'<img class="emojione" alt="'+o+'" '+c+' src="'+u+n+d.fileExtension+'"/>'}),d.ascii){var t=d.riskyMatchAscii?d.regAsciiRisky:d.regAscii;e=e.replace(t,function(e,t,n,r){return void 0!==r&&""!==r&&d.unescapeHTML(r)in d.asciiList?(r=d.unescapeHTML(r),a=d.asciiList[r],i=f[a],s=0<=a.indexOf("-1f3f")?"diversity":d.emojioneList[i].category,c=d.imageTitleTag?'title="'+d.escapeHTML(r)+'"':"",l="32"==d.spriteSize||"64"==d.spriteSize?d.spriteSize:"32",u=d.defaultPathPNG!==d.imagePathPNG?d.imagePathPNG:d.defaultPathPNG+d.emojiSize+"/",o=d.unicodeAlt?d.convert(a.toUpperCase()):d.escapeHTML(r),d.sprites?n+'<span class="emojione emojione-'+l+"-"+s+" _"+a+'"  '+c+">"+o+"</span>":n+'<img class="emojione" alt="'+o+'" '+c+' src="'+u+a+d.fileExtension+'"/>'):e})}return e},d.toShort=function(e){var t=d.unicodeCharRegex();return e=d.replaceAll(e,t)},d.convert=function(e){if(-1<e.indexOf("-")){for(var t=[],n=e.split("-"),r=0;r<n.length;r++){var i=parseInt(n[r],16);if(65536<=i&&i<=1114111){var a=Math.floor((i-65536)/1024)+55296,o=(i-65536)%1024+56320;i=String.fromCharCode(a)+String.fromCharCode(o)}else i=String.fromCharCode(i);t.push(i)}return t.join("")}if(65536<=(n=parseInt(e,16))&&n<=1114111){a=Math.floor((n-65536)/1024)+55296,o=(n-65536)%1024+56320;return String.fromCharCode(a)+String.fromCharCode(o)}return String.fromCharCode(n)},d.escapeHTML=function(e){var t={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#039;"};return e.replace(/[&<>"']/g,function(e){return t[e]})},d.unescapeHTML=function(e){var t={"&amp;":"&","&#38;":"&","&#x26;":"&","&lt;":"<","&#60;":"<","&#x3C;":"<","&gt;":">","&#62;":">","&#x3E;":">","&quot;":'"',"&#34;":'"',"&#x22;":'"',"&apos;":"'","&#39;":"'","&#x27;":"'"};return e.replace(/&(?:amp|#38|#x26|lt|#60|#x3C|gt|#62|#x3E|apos|#39|#x27|quot|#34|#x22);/gi,function(e){return t[e]})},d.shortnameConversionMap=function(){var e,t=[];for(e in d.emojioneList)d.emojioneList.hasOwnProperty(e)&&""!==e&&(t[d.convert(d.emojioneList[e].uc_output)]=e);return t},d.unicodeCharRegex=function(){var e=[];for(t in d.emojioneList)d.emojioneList.hasOwnProperty(t)&&""!==t&&e.push(d.convert(d.emojioneList[t].uc_output));return e.join("|")},d.vs16Regex=function(){return d.convert("fe0f")},d.mapEmojioneList=function(e){for(var t in d.emojioneList){if(d.emojioneList.hasOwnProperty(t))e(d.emojioneList[t].uc_base,t)}},d.mapUnicodeToShort=function(){return d.memMapShortToUnicode||(d.memMapShortToUnicode={},d.mapEmojioneList(function(e,t){d.memMapShortToUnicode[e]=t})),d.memMapShortToUnicode},d.memorizeReplacement=function(){if(!d.unicodeReplacementRegEx||!d.memMapShortToUnicodeCharacters){var r=[];d.memMapShortToUnicodeCharacters={},d.mapEmojioneList(function(e,t){var n=d.convert(e);d.memMapShortToUnicodeCharacters[n]=t,r.push(n)}),d.unicodeReplacementRegEx=r.join("|")}},d.mapUnicodeCharactersToShort=function(){return d.memorizeReplacement(),d.memMapShortToUnicodeCharacters},d.objectFlip=function(e){var t,n={};for(t in e)e.hasOwnProperty(t)&&(n[e[t]]=t);return n},d.escapeRegExp=function(e){return e.replace(/[-[\]{}()*+?.,;:&\\^$#\s]/g,"\\$&")},d.replaceAll=function(e,t){var n=d.escapeRegExp(t),r=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|("+n+")","gi");return e.replace(r,function(e,t){return void 0===t||""===t?e:d.shortnameConversionMap()[t]})},d.replaceAllVS16=function(e,t){var n=d.escapeRegExp(t),r=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|("+n+")","gi");return e.replace(r,function(e,t){return void 0===t||""===t?e:""})}}(this.emojione=this.emojione||{}),"object"==typeof module&&(module.exports=this.emojione),function(e){if("function"==typeof define&&define.amd)define(["jquery"],e);else if("object"==typeof module&&module.exports){var t=require("jquery");module.exports=e(t)}else e(jQuery)}(function(e){if(void 0===e)throw new Error("jQuery.textcomplete requires jQuery");var t,u,f,d;return function(a){"use strict";var o=1;a.fn.textcomplete=function(t,n){var i=Array.prototype.slice.call(arguments);return this.each(function(){var e=a(this),r=e.data("textComplete");if(r||(n||(n={}),n._oid=o++,r=new a.fn.textcomplete.Completer(this,n),e.data("textComplete",r)),"string"==typeof t){if(!r)return;i.shift(),r[t].apply(r,i),"destroy"===t&&e.removeData("textComplete")}else a.each(t,function(n){a.each(["header","footer","placement","maxCount"],function(e){var t;n[e]&&(r.option[e]=n[e],t=e+"as a strategy param is deprecated. Use option.",console.warn&&console.warn(t),delete n[e])})}),r.register(a.fn.textcomplete.Strategy.parse(t,{el:this,$el:e}))})}}(e),function(r){"use strict";var i,a,o,s=0;function c(e,t){if(this.$el=r(e),this.id="textcomplete"+s++,this.strategies=[],this.views=[],this.option=r.extend({},c._getDefaults(),t),!(this.$el.is("input[type=text]")||this.$el.is("input[type=search]")||this.$el.is("textarea")||e.isContentEditable||"true"==e.contentEditable))throw new Error("textcomplete must be called on a Textarea or a ContentEditable.");if(e===document.activeElement)this.initialize();else{var n=this;this.$el.one("focus."+this.id,function(){n.initialize()})}}c._getDefaults=function(){return c.DEFAULTS||(c.DEFAULTS={appendTo:r("body"),zIndex:"100"}),c.DEFAULTS},r.extend(c.prototype,{id:null,option:null,strategies:null,adapter:null,dropdown:null,$el:null,initialize:function(){var e,t,n=this.$el.get(0);this.dropdown=new r.fn.textcomplete.Dropdown(n,this,this.option),e=this.option.adapter?this.option.adapter:(t=this.$el.is("textarea")||this.$el.is("input[type=text]")||this.$el.is("input[type=search]")?"number"==typeof n.selectionEnd?"Textarea":"IETextarea":"ContentEditable",r.fn.textcomplete[t]),this.adapter=new e(n,this,this.option)},destroy:function(){this.$el.off("."+this.id),this.adapter&&this.adapter.destroy(),this.dropdown&&this.dropdown.destroy(),this.$el=this.adapter=this.dropdown=null},deactivate:function(){this.dropdown&&this.dropdown.deactivate()},trigger:function(e,t){this.dropdown||this.initialize(),null!=e||(e=this.adapter.getTextFromHeadToCaret());var n=this._extractSearchQuery(e);if(n.length){var r=n[1];if(t&&this._term===r&&""!==r)return;this._term=r,this._search.apply(this,n)}else this._term=null,this.dropdown.deactivate()},fire:function(e){var t=Array.prototype.slice.call(arguments,1);return this.$el.trigger(e,t),this},register:function(e){Array.prototype.push.apply(this.strategies,e)},select:function(e,t,n){this._term=null,this.adapter.select(e,t,n),this.fire("change").fire("textComplete:select",e,t),this.adapter.focus()},_clearAtNext:!0,_term:null,_extractSearchQuery:function(e){for(var t=0;t<this.strategies.length;t++){var n=this.strategies[t],r=n.context(e);if(r||""===r){var i=(s=n.match,"[object Function]"===Object.prototype.toString.call(s)?n.match(e):n.match);o=r,"[object String]"===Object.prototype.toString.call(o)&&(e=r);var a=e.match(i);if(a)return[n,a[n.index],a]}}var o,s;return[]},_search:(i=function(n,r,i,e){var a=this;r.search(i,function(e,t){a.dropdown.shown||a.dropdown.activate(),a._clearAtNext&&(a.dropdown.clear(),a._clearAtNext=!1),a.dropdown.setPosition(a.adapter.getCaretPosition()),a.dropdown.render(a._zip(e,r,i)),t||(n(),a._clearAtNext=!0)},e)},function(){var e=Array.prototype.slice.call(arguments);if(a)o=e;else{a=!0;var n=this;e.unshift(function e(){if(o){var t=o;o=void 0,t.unshift(e),i.apply(n,t)}else a=!1}),i.apply(this,e)}}),_zip:function(e,t,n){return r.map(e,function(e){return{value:e,strategy:t,term:n}})}}),r.fn.textcomplete.Completer=c}(e),function(i){"use strict";var a=i(window),o=function(e,t){var n,r,i=t.strategy.idProperty;for(n=0;n<e.length;n++)if((r=e[n]).strategy===t.strategy)if(i){if(r.value[i]===t.value[i])return!0}else if(r.value===t.value)return!0;return!1},s={};i(document).on("click",function(e){var n=e.originalEvent&&e.originalEvent.keepTextCompleteDropdown;i.each(s,function(e,t){e!==n&&t.deactivate()})});var n={SKIP_DEFAULT:0,KEY_UP:1,KEY_DOWN:2,KEY_ENTER:3,KEY_PAGEUP:4,KEY_PAGEDOWN:5,KEY_ESCAPE:6};function c(e,t,n){this.$el=c.createElement(n),this.completer=t,this.id=t.id+"dropdown",this._data=[],this.$inputEl=i(e),(this.option=n).listPosition&&(this.setPosition=n.listPosition),n.height&&this.$el.height(n.height);var r=this;i.each(["maxCount","placement","footer","header","noResultsMessage","className"],function(e,t){null!=n[t]&&(r[t]=n[t])}),this._bindEvents(e),s[this.id]=this}i.extend(c,{createElement:function(e){var t=e.appendTo;return t instanceof i||(t=i(t)),i("<ul></ul>").addClass("dropdown-menu textcomplete-dropdown").attr("id","textcomplete-dropdown-"+e._oid).css({display:"none",left:0,position:"absolute",zIndex:e.zIndex}).appendTo(t)}}),i.extend(c.prototype,{$el:null,$inputEl:null,completer:null,footer:null,header:null,id:null,maxCount:10,placement:"",shown:!1,data:[],className:"",destroy:function(){this.deactivate(),this.$el.off("."+this.id),this.$inputEl.off("."+this.id),this.clear(),this.$el.remove(),this.$el=this.$inputEl=this.completer=null,delete s[this.id]},render:function(e){var t=this._buildContents(e),n=i.map(this.data,function(e){return e.value});if(this.data.length){var r=e[0].strategy;r.id?this.$el.attr("data-strategy",r.id):this.$el.removeAttr("data-strategy"),this._renderHeader(n),this._renderFooter(n),t&&(this._renderContents(t),this._fitToBottom(),this._fitToRight(),this._activateIndexedItem()),this._setScroll()}else this.noResultsMessage?this._renderNoResultsMessage(n):this.shown&&this.deactivate()},setPosition:function(e){var t="absolute";return this.$inputEl.add(this.$inputEl.parents()).each(function(){return"absolute"!==i(this).css("position")&&("fixed"===i(this).css("position")?(e.top-=a.scrollTop(),e.left-=a.scrollLeft(),!(t="fixed")):void 0)}),this.$el.css(this._applyPlacement(e)),this.$el.css({position:t}),this},clear:function(){this.$el.html(""),this.data=[],this._index=0,this._$header=this._$footer=this._$noResultsMessage=null},activate:function(){return this.shown||(this.clear(),this.$el.show(),this.className&&this.$el.addClass(this.className),this.completer.fire("textComplete:show"),this.shown=!0),this},deactivate:function(){return this.shown&&(this.$el.hide(),this.className&&this.$el.removeClass(this.className),this.completer.fire("textComplete:hide"),this.shown=!1),this},isUp:function(e){return 38===e.keyCode||e.ctrlKey&&80===e.keyCode},isDown:function(e){return 40===e.keyCode||e.ctrlKey&&78===e.keyCode},isEnter:function(e){return!(e.ctrlKey||e.altKey||e.metaKey||e.shiftKey)&&(13===e.keyCode||9===e.keyCode||!0===this.option.completeOnSpace&&32===e.keyCode)},isPageup:function(e){return 33===e.keyCode},isPagedown:function(e){return 34===e.keyCode},isEscape:function(e){return 27===e.keyCode},_data:null,_index:null,_$header:null,_$noResultsMessage:null,_$footer:null,_bindEvents:function(){this.$el.on("mousedown."+this.id,".textcomplete-item",i.proxy(this._onClick,this)),this.$el.on("touchstart."+this.id,".textcomplete-item",i.proxy(this._onClick,this)),this.$el.on("mouseover."+this.id,".textcomplete-item",i.proxy(this._onMouseover,this)),this.$inputEl.on("keydown."+this.id,i.proxy(this._onKeydown,this))},_onClick:function(e){var t=i(e.target);e.preventDefault(),e.originalEvent.keepTextCompleteDropdown=this.id,t.hasClass("textcomplete-item")||(t=t.closest(".textcomplete-item"));var n=this.data[parseInt(t.data("index"),10)];this.completer.select(n.value,n.strategy,e);var r=this;setTimeout(function(){r.deactivate(),"touchstart"===e.type&&r.$inputEl.focus()},0)},_onMouseover:function(e){var t=i(e.target);e.preventDefault(),t.hasClass("textcomplete-item")||(t=t.closest(".textcomplete-item")),this._index=parseInt(t.data("index"),10),this._activateIndexedItem()},_onKeydown:function(e){var t;if(this.shown)switch(i.isFunction(this.option.onKeydown)&&(t=this.option.onKeydown(e,n)),null==t&&(t=this._defaultKeydown(e)),t){case n.KEY_UP:e.preventDefault(),this._up();break;case n.KEY_DOWN:e.preventDefault(),this._down();break;case n.KEY_ENTER:e.preventDefault(),this._enter(e);break;case n.KEY_PAGEUP:e.preventDefault(),this._pageup();break;case n.KEY_PAGEDOWN:e.preventDefault(),this._pagedown();break;case n.KEY_ESCAPE:e.preventDefault(),this.deactivate()}},_defaultKeydown:function(e){return this.isUp(e)?n.KEY_UP:this.isDown(e)?n.KEY_DOWN:this.isEnter(e)?n.KEY_ENTER:this.isPageup(e)?n.KEY_PAGEUP:this.isPagedown(e)?n.KEY_PAGEDOWN:this.isEscape(e)?n.KEY_ESCAPE:void 0},_up:function(){0===this._index?this._index=this.data.length-1:this._index-=1,this._activateIndexedItem(),this._setScroll()},_down:function(){this._index===this.data.length-1?this._index=0:this._index+=1,this._activateIndexedItem(),this._setScroll()},_enter:function(e){var t=this.data[parseInt(this._getActiveElement().data("index"),10)];this.completer.select(t.value,t.strategy,e),this.deactivate()},_pageup:function(){var t=0,n=this._getActiveElement().position().top-this.$el.innerHeight();this.$el.children().each(function(e){if(i(this).position().top+i(this).outerHeight()>n)return t=e,!1}),this._index=t,this._activateIndexedItem(),this._setScroll()},_pagedown:function(){var t=this.data.length-1,n=this._getActiveElement().position().top+this.$el.innerHeight();this.$el.children().each(function(e){if(i(this).position().top>n)return t=e,!1}),this._index=t,this._activateIndexedItem(),this._setScroll()},_activateIndexedItem:function(){this.$el.find(".textcomplete-item.active").removeClass("active"),this._getActiveElement().addClass("active")},_getActiveElement:function(){return this.$el.children(".textcomplete-item:nth("+this._index+")")},_setScroll:function(){var e=this._getActiveElement(),t=e.position().top,n=e.outerHeight(),r=this.$el.innerHeight(),i=this.$el.scrollTop();0===this._index||this._index==this.data.length-1||t<0?this.$el.scrollTop(t+i):r<t+n&&this.$el.scrollTop(t+n+i-r)},_buildContents:function(e){var t,n,r,i="";for(n=0;n<e.length&&this.data.length!==this.maxCount;n++)t=e[n],o(this.data,t)||(r=this.data.length,this.data.push(t),i+='<li class="textcomplete-item" data-index="'+r+'"><a>',i+=t.strategy.template(t.value,t.term),i+="</a></li>");return i},_renderHeader:function(e){if(this.header){this._$header||(this._$header=i('<li class="textcomplete-header"></li>').prependTo(this.$el));var t=i.isFunction(this.header)?this.header(e):this.header;this._$header.html(t)}},_renderFooter:function(e){if(this.footer){this._$footer||(this._$footer=i('<li class="textcomplete-footer"></li>').appendTo(this.$el));var t=i.isFunction(this.footer)?this.footer(e):this.footer;this._$footer.html(t)}},_renderNoResultsMessage:function(e){if(this.noResultsMessage){this._$noResultsMessage||(this._$noResultsMessage=i('<li class="textcomplete-no-results-message"></li>').appendTo(this.$el));var t=i.isFunction(this.noResultsMessage)?this.noResultsMessage(e):this.noResultsMessage;this._$noResultsMessage.html(t)}},_renderContents:function(e){this._$footer?this._$footer.before(e):this.$el.append(e)},_fitToBottom:function(){var e=a.scrollTop()+a.height(),t=this.$el.height();this.$el.position().top+t>e&&this.$el.offset({top:e-t})},_fitToRight:function(){for(var e,t=this.$el.offset().left,n=this.$el.width(),r=a.width()-30;r<t+n&&(this.$el.offset({left:t-30}),!(t<=(e=this.$el.offset().left)));)t=e},_applyPlacement:function(e){return-1!==this.placement.indexOf("top")?e={top:"auto",bottom:this.$el.parent().height()-e.top+e.lineHeight,left:e.left}:(e.bottom="auto",delete e.lineHeight),-1!==this.placement.indexOf("absleft")?e.left=0:-1!==this.placement.indexOf("absright")&&(e.right=0,e.left="auto"),e}}),i.fn.textcomplete.Dropdown=c,i.extend(i.fn.textcomplete,n)}(e),function(t){"use strict";function r(e){var r,i;t.extend(this,e),this.cache&&(this.search=(r=this.search,i={},function(t,n){i[t]?n(i[t]):r.call(this,t,function(e){i[t]=(i[t]||[]).concat(e),n.apply(null,arguments)})}))}r.parse=function(e,n){return t.map(e,function(e){var t=new r(e);return t.el=n.el,t.$el=n.$el,t})},t.extend(r.prototype,{match:null,replace:null,search:null,id:null,cache:!1,context:function(){return!0},index:2,template:function(e){return e},idProperty:null}),t.fn.textcomplete.Strategy=r}(e),function(f){"use strict";var d=Date.now||function(){return(new Date).getTime()};function e(){}f.extend(e.prototype,{id:null,completer:null,el:null,$el:null,option:null,initialize:function(e,t,n){var r,i,a,o,s,c,l,u;this.el=e,this.$el=f(e),this.id=t.id+this.constructor.name,this.completer=t,this.option=n,this.option.debounce&&(this._onKeyup=(r=this._onKeyup,i=this.option.debounce,u=function(){var e=d()-c;e<i?a=setTimeout(u,i-e):(a=null,l=r.apply(s,o),s=o=null)},function(){return s=this,o=arguments,c=d(),a||(a=setTimeout(u,i)),l})),this._bindEvents()},destroy:function(){this.$el.off("."+this.id),this.$el=this.el=this.completer=null},select:function(){throw new Error("Not implemented")},getCaretPosition:function(){var e=this._getCaretRelativePosition(),t=this.$el.offset(),n=this.option.appendTo;if(n){n instanceof f||(n=f(n));var r=n.offsetParent().offset();t.top-=r.top,t.left-=r.left}return e.top+=t.top,e.left+=t.left,e},focus:function(){this.$el.focus()},_bindEvents:function(){this.$el.on("keyup."+this.id,f.proxy(this._onKeyup,this))},_onKeyup:function(e){this._skipSearch(e)||this.completer.trigger(this.getTextFromHeadToCaret(),!0)},_skipSearch:function(e){switch(e.keyCode){case 9:case 13:case 40:case 38:return!0}if(e.ctrlKey)switch(e.keyCode){case 78:case 80:return!0}}}),f.fn.textcomplete.Adapter=e}(e),function(o){"use strict";function e(e,t,n){this.initialize(e,t,n)}o.extend(e.prototype,o.fn.textcomplete.Adapter.prototype,{select:function(e,t,n){var r=this.getTextFromHeadToCaret(),i=this.el.value.substring(this.el.selectionEnd),a=t.replace(e,n);void 0!==a&&(o.isArray(a)&&(i=a[1]+i,a=a[0]),r=r.replace(t.match,a),this.$el.val(r+i),this.el.selectionStart=this.el.selectionEnd=r.length)},getTextFromHeadToCaret:function(){return this.el.value.substring(0,this.el.selectionEnd)},_getCaretRelativePosition:function(){var e=o.fn.textcomplete.getCaretCoordinates(this.el,this.el.selectionStart);return{top:e.top+this._calculateLineHeight()-this.$el.scrollTop(),left:e.left-this.$el.scrollLeft()}},_calculateLineHeight:function(){var e=parseInt(this.$el.css("line-height"),10);if(isNaN(e)){var t=this.el.parentNode,n=document.createElement(this.el.nodeName),r=this.el.style;n.setAttribute("style","margin:0px;padding:0px;font-family:"+r.fontFamily+";font-size:"+r.fontSize),n.innerHTML="test",t.appendChild(n),e=n.clientHeight,t.removeChild(n)}return e}}),o.fn.textcomplete.Textarea=e}(e),function(s){"use strict";function e(e,t,n){this.initialize(e,t,n),s("<span>吶</span>").css({position:"absolute",top:-9999,left:-9999}).insertBefore(e)}s.extend(e.prototype,s.fn.textcomplete.Textarea.prototype,{select:function(e,t,n){var r=this.getTextFromHeadToCaret(),i=this.el.value.substring(r.length),a=t.replace(e,n);if(void 0!==a){s.isArray(a)&&(i=a[1]+i,a=a[0]),r=r.replace(t.match,a),this.$el.val(r+i),this.el.focus();var o=this.el.createTextRange();o.collapse(!0),o.moveEnd("character",r.length),o.moveStart("character",r.length),o.select()}},getTextFromHeadToCaret:function(){this.el.focus();var e=document.selection.createRange();e.moveStart("character",-this.el.value.length);var t=e.text.split("吶");return 1===t.length?t[0]:t[1]}}),s.fn.textcomplete.IETextarea=e}(e),function(p){"use strict";function e(e,t,n){this.initialize(e,t,n)}p.extend(e.prototype,p.fn.textcomplete.Adapter.prototype,{select:function(e,t,n){var r=this.getTextFromHeadToCaret(),i=window.getSelection(),a=i.getRangeAt(0),o=a.cloneRange();o.selectNodeContents(a.startContainer);var s=o.toString().substring(a.startOffset),c=t.replace(e,n);if(void 0!==c){p.isArray(c)&&(s=c[1]+s,c=c[0]),r=r.replace(t.match,c),a.selectNodeContents(a.startContainer),a.deleteContents();var l=document.createElement("div");l.innerHTML=r;var u=document.createElement("div");u.innerHTML=s;for(var f,d,h=document.createDocumentFragment();f=l.firstChild;)d=h.appendChild(f);for(;f=u.firstChild;)h.appendChild(f);a.insertNode(h),a.setStartAfter(d),a.collapse(!0),i.removeAllRanges(),i.addRange(a)}},_getCaretRelativePosition:function(){var e=window.getSelection().getRangeAt(0).cloneRange(),t=document.createElement("span");e.insertNode(t),e.selectNodeContents(t),e.deleteContents();var n=p(t),r=n.offset();return r.left-=this.$el.offset().left,r.top+=n.height()-this.$el.offset().top,r.lineHeight=n.height(),n.remove(),r},getTextFromHeadToCaret:function(){var e=window.getSelection().getRangeAt(0),t=e.cloneRange();return t.selectNodeContents(e.startContainer),t.toString().substring(0,e.startOffset)}}),p.fn.textcomplete.ContentEditable=e}(e),t=e,u=["direction","boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","MozTabSize"],f="undefined"!=typeof window,d=f&&null!=window.mozInnerScreenX,t.fn.textcomplete.getCaretCoordinates=function(e,t,n){if(!f)throw new Error("textarea-caret-position#getCaretCoordinates should only be called in a browser");var r=n&&n.debug||!1;if(r){var i=document.querySelector("#input-textarea-caret-position-mirror-div");i&&i.parentNode.removeChild(i)}var a=document.createElement("div");a.id="input-textarea-caret-position-mirror-div",document.body.appendChild(a);var o=a.style,s=window.getComputedStyle?getComputedStyle(e):e.currentStyle;o.whiteSpace="pre-wrap","INPUT"!==e.nodeName&&(o.wordWrap="break-word"),o.position="absolute",r||(o.visibility="hidden"),u.forEach(function(e){o[e]=s[e]}),d?e.scrollHeight>parseInt(s.height)&&(o.overflowY="scroll"):o.overflow="hidden",a.textContent=e.value.substring(0,t),"INPUT"===e.nodeName&&(a.textContent=a.textContent.replace(/\s/g," "));var c=document.createElement("span");c.textContent=e.value.substring(t)||".",a.appendChild(c);var l={top:c.offsetTop+parseInt(s.borderTopWidth),left:c.offsetLeft+parseInt(s.borderLeftWidth)};return r?c.style.backgroundColor="#aaa":document.body.removeChild(a),l},e}),window="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},document=window.document||{},function(e,t){"function"==typeof require&&"object"==typeof exports&&"object"==typeof module?e(require("jquery")):"function"==typeof define&&define.amd?define(["jquery"],e):e(t.jQuery)}(function(C){"use strict";var r=0,o={},s={},A=window.emojione,i=[];function a(e){A?e():i.push(e)}var S,T,c,x="data:image/gif;base64,R0lGODlhAQABAJH/AP///wAAAMDAwAAAACH5BAEAAAIALAAAAAABAAEAAAICVAEAOw==",l=[].slice,k="emojionearea",E=0,D="&#8203;";function I(n,e,r){var i=!0,t=1;if(e){e=e.toLowerCase();do{var a=1==t?"@"+e:e;o[n.id][a]&&o[n.id][a].length&&C.each(o[n.id][a],function(e,t){return i=!1!==t.apply(n,r||[])})}while(i&&t--)}return i}function P(n,r,i,a){a=a||function(e,t){return C(t.currentTarget)},C.each(i,function(e,t){e=C.isArray(i)?t:e,(s[n.id][t]||(s[n.id][t]=[])).push([r,e,a])})}function u(e,t,n){var r,i=A.imageType;r="svg"==i?A.imagePathSVG:A.imagePathPNG;var a="";n&&(a=n.substr(1,n.length-2).replace(/_/g," ").replace(/\w\S*/g,function(e){return e.charAt(0).toUpperCase()+e.substr(1).toLowerCase()}));var o="";return t.uc_base&&4<E?(o=t.uc_base,t=t.uc_output.toUpperCase()):o=t,e.replace("{name}",n||"").replace("{friendlyName}",a).replace("{img}",r+(E<2?o.toUpperCase():o)+"."+i).replace("{uni}",t).replace("{alt}",A.convert(t))}function M(e,n,r){return e.replace(/:?\+?[\w_\-]+:?/g,function(e){e=":"+e.replace(/:$/,"").replace(/^:/,"")+":";var t=A.emojioneList[e];return t?4<E?u(n,t,e):(3<E&&(t=t.unicode),u(n,t[t.length-1],e)):r?"":e})}function $(e){var t,n;if(window.getSelection){if((t=window.getSelection()).getRangeAt&&t.rangeCount){(n=t.getRangeAt(0)).deleteContents();var r=document.createElement("div");r.innerHTML=e;for(var i,a,o=document.createDocumentFragment();i=r.firstChild;)a=o.appendChild(i);n.insertNode(o),a&&((n=n.cloneRange()).setStartAfter(a),n.collapse(!0),t.removeAllRanges(),t.addRange(n))}}else document.selection&&"Control"!=document.selection.type&&document.selection.createRange().pasteHTML(e)}function f(){return window.emojioneVersion||"3.1.2"}function O(e){return"object"==typeof e}function d(e){var t;return e.cacheBustParam?(t=e.cacheBustParam,O(e.jsEscapeMap)?"?v=1.2.4"===t?"2.0.0":"?v=2.0.1"===t?"2.1.0":"?v=2.1.1"===t?"2.1.1":"?v=2.1.2"===t?"2.1.2":"?v=2.1.3"===t?"2.1.3":"?v=2.1.4"===t?"2.1.4":"2.2.7":"1.5.2"):e.emojiVersion}function h(e){switch(e){case"1.5.2":return 0;case"2.0.0":return 1;case"2.1.0":case"2.1.1":return 2;case"2.1.2":return 3;case"2.1.3":case"2.1.4":case"2.2.7":return 4;case"3.0.1":case"3.0.2":case"3.0.3":case"3.0":return 5;case"3.1.0":case"3.1.1":case"3.1.2":case"3.1":default:return 6}}function n(){if(C.fn.emojioneArea&&C.fn.emojioneArea.defaults)return C.fn.emojioneArea.defaults;var e={attributes:{dir:"ltr",spellcheck:!1,autocomplete:"off",autocorrect:"off",autocapitalize:"off"},search:!0,placeholder:null,emojiPlaceholder:":smiley:",searchPlaceholder:"SEARCH",container:null,hideSource:!0,shortnames:!0,sprite:!0,pickerPosition:"top",filtersPosition:"top",searchPosition:"top",hidePickerOnBlur:!0,buttonTitle:"Use the TAB key to insert emoji faster",tones:!0,tonesStyle:"bullet",inline:null,saveEmojisAs:"unicode",shortcuts:!0,autocomplete:!0,autocompleteTones:!1,standalone:!1,useInternalCDN:!0,imageType:"png",recentEmojis:!0,textcomplete:{maxCount:15,placement:null}},t=h(A?d(A):f());return e.filters=4<t?{tones:{title:"Diversity",emoji:"open_hands raised_hands palms_up_together clap pray thumbsup thumbsdown punch fist left_facing_fist right_facing_fist fingers_crossed v metal love_you_gesture ok_hand point_left point_right point_up_2 point_down point_up raised_hand raised_back_of_hand hand_splayed vulcan wave call_me muscle middle_finger writing_hand selfie nail_care ear nose baby boy girl man woman blond-haired_woman blond-haired_man older_man older_woman man_with_chinese_cap woman_wearing_turban man_wearing_turban woman_police_officer man_police_officer woman_construction_worker man_construction_worker woman_guard man_guard woman_detective man_detective woman_health_worker man_health_worker woman_farmer man_farmer woman_cook man_cook woman_student man_student woman_singer man_singer woman_teacher man_teacher woman_factory_worker man_factory_worker woman_technologist man_technologist woman_office_worker man_office_worker woman_mechanic man_mechanic woman_scientist man_scientist woman_artist man_artist woman_firefighter man_firefighter woman_pilot man_pilot woman_astronaut man_astronaut woman_judge man_judge mrs_claus santa princess prince bride_with_veil man_in_tuxedo angel pregnant_woman breast_feeding woman_bowing man_bowing man_tipping_hand woman_tipping_hand man_gesturing_no woman_gesturing_no man_gesturing_ok woman_gesturing_ok man_raising_hand woman_raising_hand woman_facepalming man_facepalming woman_shrugging man_shrugging man_pouting woman_pouting man_frowning woman_frowning man_getting_haircut woman_getting_haircut man_getting_face_massage woman_getting_face_massage man_in_business_suit_levitating dancer man_dancing woman_walking man_walking woman_running man_running adult child older_adult bearded_person woman_with_headscarf woman_mage man_mage woman_fairy man_fairy woman_vampire man_vampire mermaid merman woman_elf man_elf snowboarder woman_lifting_weights man_lifting_weights woman_cartwheeling man_cartwheeling woman_bouncing_ball man_bouncing_ball woman_playing_handball man_playing_handball woman_golfing man_golfing woman_surfing man_surfing woman_swimming man_swimming woman_playing_water_polo man_playing_water_polo woman_rowing_boat man_rowing_boat horse_racing woman_biking man_biking woman_mountain_biking man_mountain_biking woman_juggling man_juggling woman_in_steamy_room man_in_steamy_room woman_climbing man_climbing woman_in_lotus_position man_in_lotus_position bath person_in_bed"},recent:{icon:"clock3",title:"Recent",emoji:""},smileys_people:{icon:"yum",title:"Smileys & People",emoji:"grinning smiley smile grin laughing sweat_smile joy rofl relaxed blush innocent slight_smile upside_down wink relieved crazy_face star_struck heart_eyes kissing_heart kissing kissing_smiling_eyes kissing_closed_eyes yum stuck_out_tongue_winking_eye stuck_out_tongue_closed_eyes stuck_out_tongue money_mouth hugging nerd sunglasses cowboy smirk unamused disappointed pensive worried face_with_raised_eyebrow face_with_monocle confused slight_frown frowning2 persevere confounded tired_face weary triumph angry rage face_with_symbols_over_mouth no_mouth neutral_face expressionless hushed frowning anguished open_mouth astonished dizzy_face exploding_head flushed scream fearful cold_sweat cry disappointed_relieved drooling_face sob sweat sleepy sleeping rolling_eyes thinking shushing_face face_with_hand_over_mouth lying_face grimacing zipper_mouth face_vomiting nauseated_face sneezing_face mask thermometer_face head_bandage smiling_imp imp japanese_ogre japanese_goblin poop ghost skull skull_crossbones alien space_invader robot jack_o_lantern clown smiley_cat smile_cat joy_cat heart_eyes_cat smirk_cat kissing_cat scream_cat crying_cat_face pouting_cat open_hands raised_hands palms_up_together clap pray handshake thumbsup thumbsdown punch fist left_facing_fist right_facing_fist fingers_crossed v metal love_you_gesture ok_hand point_left point_right point_up_2 point_down point_up raised_hand raised_back_of_hand hand_splayed vulcan wave call_me muscle middle_finger writing_hand selfie nail_care ring lipstick kiss lips tongue ear nose footprints eye eyes speaking_head bust_in_silhouette busts_in_silhouette baby boy girl man woman blond-haired_woman blond_haired_man older_man older_woman man_with_chinese_cap woman_wearing_turban man_wearing_turban woman_police_officer police_officer woman_construction_worker construction_worker woman_guard guard woman_detective detective woman_health_worker man_health_worker woman_farmer man_farmer woman_cook man_cook woman_student man_student woman_singer man_singer woman_teacher man_teacher woman_factory_worker man_factory_worker woman_technologist man_technologist woman_office_worker man_office_worker woman_mechanic man_mechanic woman_scientist man_scientist woman_artist man_artist woman_firefighter man_firefighter woman_pilot man_pilot woman_astronaut man_astronaut woman_judge man_judge mrs_claus santa princess prince bride_with_veil man_in_tuxedo angel pregnant_woman breast_feeding woman_bowing man_bowing woman_tipping_hand man_tipping_hand woman_gesturing_no man_gesturing_no woman_gesturing_ok man_gesturing_ok woman_raising_hand man_raising_hand woman_facepalming man_facepalming woman_shrugging man_shrugging woman_pouting man_pouting woman_frowning man_frowning woman_getting_haircut man_getting_haircut woman_getting_face_massage man_getting_face_massage man_in_business_suit_levitating dancer man_dancing women_with_bunny_ears_partying men_with_bunny_ears_partying woman_walking man_walking woman_running man_running couple two_women_holding_hands two_men_holding_hands couple_with_heart couple_ww couple_mm couplekiss kiss_ww kiss_mm family family_mwg family_mwgb family_mwbb family_mwgg family_wwb family_wwg family_wwgb family_wwbb family_wwgg family_mmb family_mmg family_mmgb family_mmbb family_mmgg family_woman_boy family_woman_girl family_woman_girl_boy family_woman_boy_boy family_woman_girl_girl family_man_boy family_man_girl family_man_girl_boy family_man_boy_boy family_man_girl_girl bearded_person woman_with_headscarf woman_mage man_mage woman_fairy man_fairy woman_vampire man_vampire mermaid merman woman_elf man_elf woman_genie man_genie woman_zombie man_zombie womans_clothes shirt jeans necktie dress bikini kimono high_heel sandal boot mans_shoe athletic_shoe womans_hat tophat mortar_board crown helmet_with_cross school_satchel pouch purse handbag briefcase eyeglasses dark_sunglasses closed_umbrella umbrella2 brain billed_cap scarf gloves coat socks "},animals_nature:{icon:"hamster",title:"Animals & Nature",emoji:"dog cat mouse hamster rabbit fox bear panda_face koala tiger lion_face cow pig pig_nose frog monkey_face see_no_evil hear_no_evil speak_no_evil monkey chicken penguin bird baby_chick hatching_chick hatched_chick duck eagle owl bat wolf boar horse unicorn bee bug butterfly snail shell beetle ant spider spider_web turtle snake lizard scorpion crab squid octopus shrimp tropical_fish fish blowfish dolphin shark whale whale2 crocodile leopard tiger2 water_buffalo ox cow2 deer dromedary_camel camel elephant rhino gorilla racehorse pig2 goat ram sheep dog2 poodle cat2 rooster turkey dove rabbit2 mouse2 rat chipmunk dragon giraffe zebra hedgehog sauropod t_rex cricket dragon_face feet cactus christmas_tree evergreen_tree deciduous_tree palm_tree seedling herb shamrock four_leaf_clover bamboo tanabata_tree leaves fallen_leaf maple_leaf mushroom ear_of_rice bouquet tulip rose wilted_rose sunflower blossom cherry_blossom hibiscus earth_americas earth_africa earth_asia full_moon waning_gibbous_moon last_quarter_moon waning_crescent_moon new_moon waxing_crescent_moon first_quarter_moon waxing_gibbous_moon new_moon_with_face full_moon_with_face sun_with_face first_quarter_moon_with_face last_quarter_moon_with_face crescent_moon dizzy star star2 sparkles zap fire boom comet sunny white_sun_small_cloud partly_sunny white_sun_cloud white_sun_rain_cloud rainbow cloud cloud_rain thunder_cloud_rain cloud_lightning cloud_snow snowman2 snowman snowflake wind_blowing_face dash cloud_tornado fog ocean droplet sweat_drops umbrella "},food_drink:{icon:"pizza",title:"Food & Drink",emoji:"green_apple apple pear tangerine lemon banana watermelon grapes strawberry melon cherries peach pineapple kiwi avocado tomato eggplant cucumber carrot corn hot_pepper potato sweet_potato chestnut peanuts honey_pot croissant bread french_bread cheese egg cooking bacon pancakes fried_shrimp poultry_leg meat_on_bone pizza hotdog hamburger fries stuffed_flatbread taco burrito salad shallow_pan_of_food spaghetti ramen stew fish_cake sushi bento curry rice_ball rice rice_cracker oden dango shaved_ice ice_cream icecream cake birthday custard lollipop candy chocolate_bar popcorn doughnut cookie milk baby_bottle coffee tea sake beer beers champagne_glass wine_glass tumbler_glass cocktail tropical_drink champagne spoon fork_and_knife fork_knife_plate dumpling fortune_cookie takeout_box chopsticks bowl_with_spoon cup_with_straw coconut broccoli pie pretzel cut_of_meat sandwich canned_food"},activity:{icon:"basketball",title:"Activity",emoji:"soccer basketball football baseball tennis volleyball rugby_football 8ball ping_pong badminton goal hockey field_hockey cricket_game golf bow_and_arrow fishing_pole_and_fish boxing_glove martial_arts_uniform ice_skate ski skier snowboarder woman_lifting_weights man_lifting_weights person_fencing women_wrestling men_wrestling woman_cartwheeling man_cartwheeling woman_bouncing_ball man_bouncing_ball woman_playing_handball man_playing_handball woman_golfing man_golfing woman_surfing man_surfing woman_swimming man_swimming woman_playing_water_polo man_playing_water_polo woman_rowing_boat man_rowing_boat horse_racing woman_biking man_biking woman_mountain_biking man_mountain_biking woman_in_steamy_room man_in_steamy_room woman_climbing man_climbing woman_in_lotus_position man_in_lotus_position running_shirt_with_sash medal military_medal first_place second_place third_place trophy rosette reminder_ribbon ticket tickets circus_tent woman_juggling man_juggling performing_arts art clapper microphone headphones musical_score musical_keyboard drum saxophone trumpet guitar violin game_die dart bowling video_game slot_machine sled curling_stone "},travel_places:{icon:"rocket",title:"Travel & Places",emoji:"red_car taxi blue_car bus trolleybus race_car police_car ambulance fire_engine minibus truck articulated_lorry tractor scooter bike motor_scooter motorcycle rotating_light oncoming_police_car oncoming_bus oncoming_automobile oncoming_taxi aerial_tramway mountain_cableway suspension_railway railway_car train mountain_railway monorail bullettrain_side bullettrain_front light_rail steam_locomotive train2 metro tram station helicopter airplane_small airplane airplane_departure airplane_arriving rocket satellite_orbital seat canoe sailboat motorboat speedboat cruise_ship ferry ship anchor construction fuelpump busstop vertical_traffic_light traffic_light map moyai statue_of_liberty fountain tokyo_tower european_castle japanese_castle stadium ferris_wheel roller_coaster carousel_horse beach_umbrella beach island mountain mountain_snow mount_fuji volcano desert camping tent railway_track motorway construction_site factory house house_with_garden homes house_abandoned office department_store post_office european_post_office hospital bank hotel convenience_store school love_hotel wedding classical_building church mosque synagogue kaaba shinto_shrine japan rice_scene park sunrise sunrise_over_mountains stars sparkler fireworks city_sunset city_dusk cityscape night_with_stars milky_way bridge_at_night foggy flying_saucer"},objects:{icon:"bulb",title:"Objects",emoji:"watch iphone calling computer keyboard desktop printer mouse_three_button trackball joystick compression minidisc floppy_disk cd dvd vhs camera camera_with_flash video_camera movie_camera projector film_frames telephone_receiver telephone pager fax tv radio microphone2 level_slider control_knobs stopwatch timer alarm_clock clock hourglass hourglass_flowing_sand satellite battery electric_plug bulb flashlight candle wastebasket oil money_with_wings dollar yen euro pound moneybag credit_card gem scales wrench hammer hammer_pick tools pick nut_and_bolt gear chains gun bomb knife dagger crossed_swords shield smoking coffin urn amphora crystal_ball prayer_beads barber alembic telescope microscope hole pill syringe thermometer toilet potable_water shower bathtub bath bellhop key key2 door couch bed sleeping_accommodation frame_photo shopping_bags shopping_cart gift balloon flags ribbon confetti_ball tada dolls izakaya_lantern wind_chime envelope envelope_with_arrow incoming_envelope e-mail love_letter inbox_tray outbox_tray package label mailbox_closed mailbox mailbox_with_mail mailbox_with_no_mail postbox postal_horn scroll page_with_curl page_facing_up bookmark_tabs bar_chart chart_with_upwards_trend chart_with_downwards_trend notepad_spiral calendar_spiral calendar date card_index card_box ballot_box file_cabinet clipboard file_folder open_file_folder dividers newspaper2 newspaper notebook notebook_with_decorative_cover ledger closed_book green_book blue_book orange_book books book bookmark link paperclip paperclips triangular_ruler straight_ruler pushpin round_pushpin scissors pen_ballpoint pen_fountain black_nib paintbrush crayon pencil pencil2 mag mag_right lock_with_ink_pen closed_lock_with_key lock unlock"},symbols:{icon:"heartpulse",title:"Symbols",emoji:"heart orange_heart yellow_heart green_heart blue_heart purple_heart black_heart broken_heart heart_exclamation two_hearts revolving_hearts heartbeat heartpulse sparkling_heart cupid gift_heart heart_decoration peace cross star_and_crescent om_symbol wheel_of_dharma star_of_david six_pointed_star menorah yin_yang orthodox_cross place_of_worship ophiuchus aries taurus gemini cancer leo virgo libra scorpius sagittarius capricorn aquarius pisces id atom accept radioactive biohazard mobile_phone_off vibration_mode u6709 u7121 u7533 u55b6 u6708 eight_pointed_black_star vs white_flower ideograph_advantage secret congratulations u5408 u6e80 u5272 u7981 a b ab cl o2 sos x o octagonal_sign no_entry name_badge no_entry_sign 100 anger hotsprings no_pedestrians do_not_litter no_bicycles non-potable_water underage no_mobile_phones no_smoking exclamation grey_exclamation question grey_question bangbang interrobang low_brightness high_brightness part_alternation_mark warning children_crossing trident fleur-de-lis beginner recycle white_check_mark u6307 chart sparkle eight_spoked_asterisk negative_squared_cross_mark globe_with_meridians diamond_shape_with_a_dot_inside m cyclone zzz atm wc wheelchair parking u7a7a sa passport_control customs baggage_claim left_luggage mens womens baby_symbol restroom put_litter_in_its_place cinema signal_strength koko symbols information_source abc abcd capital_abcd ng ok up cool new free zero one two three four five six seven eight nine keycap_ten 1234 hash asterisk arrow_forward pause_button play_pause stop_button record_button eject track_next track_previous fast_forward rewind arrow_double_up arrow_double_down arrow_backward arrow_up_small arrow_down_small arrow_right arrow_left arrow_up arrow_down arrow_upper_right arrow_lower_right arrow_lower_left arrow_upper_left arrow_up_down left_right_arrow arrow_right_hook leftwards_arrow_with_hook arrow_heading_up arrow_heading_down twisted_rightwards_arrows repeat repeat_one arrows_counterclockwise arrows_clockwise musical_note notes heavy_plus_sign heavy_minus_sign heavy_division_sign heavy_multiplication_x heavy_dollar_sign currency_exchange tm copyright registered wavy_dash curly_loop loop end back on top soon heavy_check_mark ballot_box_with_check radio_button white_circle black_circle red_circle blue_circle small_red_triangle small_red_triangle_down small_orange_diamond small_blue_diamond large_orange_diamond large_blue_diamond white_square_button black_square_button black_small_square white_small_square black_medium_small_square white_medium_small_square black_medium_square white_medium_square black_large_square white_large_square speaker mute sound loud_sound bell no_bell mega loudspeaker speech_left eye_in_speech_bubble speech_balloon thought_balloon anger_right spades clubs hearts diamonds black_joker flower_playing_cards mahjong clock1 clock2 clock3 clock4 clock5 clock6 clock7 clock8 clock9 clock10 clock11 clock12 clock130 clock230 clock330 clock430 clock530 clock630 clock730 clock830 clock930 clock1030 clock1130 clock1230"},flags:{icon:"flag_gb",title:"Flags",emoji:"flag_white flag_black checkered_flag triangular_flag_on_post rainbow_flag flag_af flag_ax flag_al flag_dz flag_as flag_ad flag_ao flag_ai flag_aq flag_ag flag_ar flag_am flag_aw flag_au flag_at flag_az flag_bs flag_bh flag_bd flag_bb flag_by flag_be flag_bz flag_bj flag_bm flag_bt flag_bo flag_ba flag_bw flag_br flag_io flag_vg flag_bn flag_bg flag_bf flag_bi flag_kh flag_cm flag_ca flag_ic flag_cv flag_bq flag_ky flag_cf flag_td flag_cl flag_cn flag_cx flag_cc flag_co flag_km flag_cg flag_cd flag_ck flag_cr flag_ci flag_hr flag_cu flag_cw flag_cy flag_cz flag_dk flag_dj flag_dm flag_do flag_ec flag_eg flag_sv flag_gq flag_er flag_ee flag_et flag_eu flag_fk flag_fo flag_fj flag_fi flag_fr flag_gf flag_pf flag_tf flag_ga flag_gm flag_ge flag_de flag_gh flag_gi flag_gr flag_gl flag_gd flag_gp flag_gu flag_gt flag_gg flag_gn flag_gw flag_gy flag_ht flag_hn flag_hk flag_hu flag_is flag_in flag_id flag_ir flag_iq flag_ie flag_im flag_il flag_it flag_jm flag_jp crossed_flags flag_je flag_jo flag_kz flag_ke flag_ki flag_xk flag_kw flag_kg flag_la flag_lv flag_lb flag_ls flag_lr flag_ly flag_li flag_lt flag_lu flag_mo flag_mk flag_mg flag_mw flag_my flag_mv flag_ml flag_mt flag_mh flag_mq flag_mr flag_mu flag_yt flag_mx flag_fm flag_md flag_mc flag_mn flag_me flag_ms flag_ma flag_mz flag_mm flag_na flag_nr flag_np flag_nl flag_nc flag_nz flag_ni flag_ne flag_ng flag_nu flag_nf flag_kp flag_mp flag_no flag_om flag_pk flag_pw flag_ps flag_pa flag_pg flag_py flag_pe flag_ph flag_pn flag_pl flag_pt flag_pr flag_qa flag_re flag_ro flag_ru flag_rw flag_ws flag_sm flag_st flag_sa flag_sn flag_rs flag_sc flag_sl flag_sg flag_sx flag_sk flag_si flag_gs flag_sb flag_so flag_za flag_kr flag_ss flag_es flag_lk flag_bl flag_sh flag_kn flag_lc flag_pm flag_vc flag_sd flag_sr flag_sz flag_se flag_ch flag_sy flag_tw flag_tj flag_tz flag_th flag_tl flag_tg flag_tk flag_to flag_tt flag_tn flag_tr flag_tm flag_tc flag_tv flag_vi flag_ug flag_ua flag_ae flag_gb flag_us flag_uy flag_uz flag_vu flag_va flag_ve flag_vn flag_wf flag_eh flag_ye flag_zm flag_zw flag_ac flag_ta flag_bv flag_hm flag_sj flag_um flag_ea flag_cp flag_dg flag_mf united_nations england scotland wales"}}:{tones:{title:"Diversity",emoji:"santa runner surfer swimmer lifter ear nose point_up_2 point_down point_left point_right punch wave ok_hand thumbsup thumbsdown clap open_hands boy girl man woman cop bride_with_veil person_with_blond_hair man_with_gua_pi_mao man_with_turban older_man grandma baby construction_worker princess angel information_desk_person guardsman dancer nail_care massage haircut muscle spy hand_splayed middle_finger vulcan no_good ok_woman bow raising_hand raised_hands person_frowning person_with_pouting_face pray rowboat bicyclist mountain_bicyclist walking bath metal point_up basketball_player fist raised_hand v writing_hand"},recent:{icon:"clock3",title:"Recent",emoji:""},smileys_people:{icon:"yum",title:"Smileys & People",emoji:"grinning grimacing grin joy smiley smile sweat_smile laughing innocent wink blush slight_smile upside_down relaxed yum relieved heart_eyes kissing_heart kissing kissing_smiling_eyes kissing_closed_eyes stuck_out_tongue_winking_eye stuck_out_tongue_closed_eyes stuck_out_tongue money_mouth nerd sunglasses hugging smirk no_mouth neutral_face expressionless unamused rolling_eyes thinking flushed disappointed worried angry rage pensive confused slight_frown frowning2 persevere confounded tired_face weary triumph open_mouth scream fearful cold_sweat hushed frowning anguished cry disappointed_relieved sleepy sweat sob dizzy_face astonished zipper_mouth mask thermometer_face head_bandage sleeping zzz poop smiling_imp imp japanese_ogre japanese_goblin skull ghost alien robot smiley_cat smile_cat joy_cat heart_eyes_cat smirk_cat kissing_cat scream_cat crying_cat_face pouting_cat raised_hands clap wave thumbsup thumbsdown punch fist v ok_hand raised_hand open_hands muscle pray point_up point_up_2 point_down point_left point_right middle_finger hand_splayed metal vulcan writing_hand nail_care lips tongue ear nose eye eyes bust_in_silhouette busts_in_silhouette speaking_head baby boy girl man woman person_with_blond_hair older_man older_woman man_with_gua_pi_mao man_with_turban cop construction_worker guardsman spy santa angel princess bride_with_veil walking runner dancer dancers couple two_men_holding_hands two_women_holding_hands bow information_desk_person no_good ok_woman raising_hand person_with_pouting_face person_frowning haircut massage couple_with_heart couple_ww couple_mm couplekiss kiss_ww kiss_mm family family_mwg family_mwgb family_mwbb family_mwgg family_wwb family_wwg family_wwgb family_wwbb family_wwgg family_mmb family_mmg family_mmgb family_mmbb family_mmgg womans_clothes shirt jeans necktie dress bikini kimono lipstick kiss footprints high_heel sandal boot mans_shoe athletic_shoe womans_hat tophat helmet_with_cross mortar_board crown school_satchel pouch purse handbag briefcase eyeglasses dark_sunglasses ring closed_umbrella"},animals_nature:{icon:"hamster",title:"Animals & Nature",emoji:"dog cat mouse hamster rabbit bear panda_face koala tiger lion_face cow pig pig_nose frog octopus monkey_face see_no_evil hear_no_evil speak_no_evil monkey chicken penguin bird baby_chick hatching_chick hatched_chick wolf boar horse unicorn bee bug snail beetle ant spider scorpion crab snake turtle tropical_fish fish blowfish dolphin whale whale2 crocodile leopard tiger2 water_buffalo ox cow2 dromedary_camel camel elephant goat ram sheep racehorse pig2 rat mouse2 rooster turkey dove dog2 poodle cat2 rabbit2 chipmunk feet dragon dragon_face cactus christmas_tree evergreen_tree deciduous_tree palm_tree seedling herb shamrock four_leaf_clover bamboo tanabata_tree leaves fallen_leaf maple_leaf ear_of_rice hibiscus sunflower rose tulip blossom cherry_blossom bouquet mushroom chestnut jack_o_lantern shell spider_web earth_americas earth_africa earth_asia full_moon waning_gibbous_moon last_quarter_moon waning_crescent_moon new_moon waxing_crescent_moon first_quarter_moon waxing_gibbous_moon new_moon_with_face full_moon_with_face first_quarter_moon_with_face last_quarter_moon_with_face sun_with_face crescent_moon star star2 dizzy sparkles comet sunny white_sun_small_cloud partly_sunny white_sun_cloud white_sun_rain_cloud cloud cloud_rain thunder_cloud_rain cloud_lightning zap fire boom snowflake cloud_snow snowman2 snowman wind_blowing_face dash cloud_tornado fog umbrella2 umbrella droplet sweat_drops ocean"},food_drink:{icon:"pizza",title:"Food & Drink",emoji:"green_apple apple pear tangerine lemon banana watermelon grapes strawberry melon cherries peach pineapple tomato eggplant hot_pepper corn sweet_potato honey_pot bread cheese poultry_leg meat_on_bone fried_shrimp egg hamburger fries hotdog pizza spaghetti taco burrito ramen stew fish_cake sushi bento curry rice_ball rice rice_cracker oden dango shaved_ice ice_cream icecream cake birthday custard candy lollipop chocolate_bar popcorn doughnut cookie beer beers wine_glass cocktail tropical_drink champagne sake tea coffee baby_bottle fork_and_knife fork_knife_plate"},activity:{icon:"basketball",title:"Activity",emoji:"soccer basketball football baseball tennis volleyball rugby_football 8ball golf golfer ping_pong badminton hockey field_hockey cricket ski skier snowboarder ice_skate bow_and_arrow fishing_pole_and_fish rowboat swimmer surfer bath basketball_player lifter bicyclist mountain_bicyclist horse_racing levitate trophy running_shirt_with_sash medal military_medal reminder_ribbon rosette ticket tickets performing_arts art circus_tent microphone headphones musical_score musical_keyboard saxophone trumpet guitar violin clapper video_game space_invader dart game_die slot_machine bowling"},travel_places:{icon:"rocket",title:"Travel & Places",emoji:"red_car taxi blue_car bus trolleybus race_car police_car ambulance fire_engine minibus truck articulated_lorry tractor motorcycle bike rotating_light oncoming_police_car oncoming_bus oncoming_automobile oncoming_taxi aerial_tramway mountain_cableway suspension_railway railway_car train monorail bullettrain_side bullettrain_front light_rail mountain_railway steam_locomotive train2 metro tram station helicopter airplane_small airplane airplane_departure airplane_arriving sailboat motorboat speedboat ferry cruise_ship rocket satellite_orbital seat anchor construction fuelpump busstop vertical_traffic_light traffic_light checkered_flag ship ferris_wheel roller_coaster carousel_horse construction_site foggy tokyo_tower factory fountain rice_scene mountain mountain_snow mount_fuji volcano japan camping tent park motorway railway_track sunrise sunrise_over_mountains desert beach island city_sunset city_dusk cityscape night_with_stars bridge_at_night milky_way stars sparkler fireworks rainbow homes european_castle japanese_castle stadium statue_of_liberty house house_with_garden house_abandoned office department_store post_office european_post_office hospital bank hotel convenience_store school love_hotel wedding classical_building church mosque synagogue kaaba shinto_shrine"},objects:{icon:"bulb",title:"Objects",emoji:"watch iphone calling computer keyboard desktop printer mouse_three_button trackball joystick compression minidisc floppy_disk cd dvd vhs camera camera_with_flash video_camera movie_camera projector film_frames telephone_receiver telephone pager fax tv radio microphone2 level_slider control_knobs stopwatch timer alarm_clock clock hourglass_flowing_sand hourglass satellite battery electric_plug bulb flashlight candle wastebasket oil money_with_wings dollar yen euro pound moneybag credit_card gem scales wrench hammer hammer_pick tools pick nut_and_bolt gear chains gun bomb knife dagger crossed_swords shield smoking skull_crossbones coffin urn amphora crystal_ball prayer_beads barber alembic telescope microscope hole pill syringe thermometer label bookmark toilet shower bathtub key key2 couch sleeping_accommodation bed door bellhop frame_photo map beach_umbrella moyai shopping_bags balloon flags ribbon gift confetti_ball tada dolls wind_chime crossed_flags izakaya_lantern envelope envelope_with_arrow incoming_envelope e-mail love_letter postbox mailbox_closed mailbox mailbox_with_mail mailbox_with_no_mail package postal_horn inbox_tray outbox_tray scroll page_with_curl bookmark_tabs bar_chart chart_with_upwards_trend chart_with_downwards_trend page_facing_up date calendar calendar_spiral card_index card_box ballot_box file_cabinet clipboard notepad_spiral file_folder open_file_folder dividers newspaper2 newspaper notebook closed_book green_book blue_book orange_book notebook_with_decorative_cover ledger books book link paperclip paperclips scissors triangular_ruler straight_ruler pushpin round_pushpin triangular_flag_on_post flag_white flag_black closed_lock_with_key lock unlock lock_with_ink_pen pen_ballpoint pen_fountain black_nib pencil pencil2 crayon paintbrush mag mag_right"},symbols:{icon:"heartpulse",title:"Symbols",emoji:"heart yellow_heart green_heart blue_heart purple_heart broken_heart heart_exclamation two_hearts revolving_hearts heartbeat heartpulse sparkling_heart cupid gift_heart heart_decoration peace cross star_and_crescent om_symbol wheel_of_dharma star_of_david six_pointed_star menorah yin_yang orthodox_cross place_of_worship ophiuchus aries taurus gemini cancer leo virgo libra scorpius sagittarius capricorn aquarius pisces id atom u7a7a u5272 radioactive biohazard mobile_phone_off vibration_mode u6709 u7121 u7533 u55b6 u6708 eight_pointed_black_star vs accept white_flower ideograph_advantage secret congratulations u5408 u6e80 u7981 a b ab cl o2 sos no_entry name_badge no_entry_sign x o anger hotsprings no_pedestrians do_not_litter no_bicycles non-potable_water underage no_mobile_phones exclamation grey_exclamation question grey_question bangbang interrobang 100 low_brightness high_brightness trident fleur-de-lis part_alternation_mark warning children_crossing beginner recycle u6307 chart sparkle eight_spoked_asterisk negative_squared_cross_mark white_check_mark diamond_shape_with_a_dot_inside cyclone loop globe_with_meridians m atm sa passport_control customs baggage_claim left_luggage wheelchair no_smoking wc parking potable_water mens womens baby_symbol restroom put_litter_in_its_place cinema signal_strength koko ng ok up cool new free zero one two three four five six seven eight nine ten 1234 arrow_forward pause_button play_pause stop_button record_button track_next track_previous fast_forward rewind twisted_rightwards_arrows repeat repeat_one arrow_backward arrow_up_small arrow_down_small arrow_double_up arrow_double_down arrow_right arrow_left arrow_up arrow_down arrow_upper_right arrow_lower_right arrow_lower_left arrow_upper_left arrow_up_down left_right_arrow arrows_counterclockwise arrow_right_hook leftwards_arrow_with_hook arrow_heading_up arrow_heading_down hash asterisk information_source abc abcd capital_abcd symbols musical_note notes wavy_dash curly_loop heavy_check_mark arrows_clockwise heavy_plus_sign heavy_minus_sign heavy_division_sign heavy_multiplication_x heavy_dollar_sign currency_exchange copyright registered tm end back on top soon ballot_box_with_check radio_button white_circle black_circle red_circle large_blue_circle small_orange_diamond small_blue_diamond large_orange_diamond large_blue_diamond small_red_triangle black_small_square white_small_square black_large_square white_large_square small_red_triangle_down black_medium_square white_medium_square black_medium_small_square white_medium_small_square black_square_button white_square_button speaker sound loud_sound mute mega loudspeaker bell no_bell black_joker mahjong spades clubs hearts diamonds flower_playing_cards thought_balloon anger_right speech_balloon clock1 clock2 clock3 clock4 clock5 clock6 clock7 clock8 clock9 clock10 clock11 clock12 clock130 clock230 clock330 clock430 clock530 clock630 clock730 clock830 clock930 clock1030 clock1130 clock1230 eye_in_speech_bubble"},flags:{icon:"flag_gb",title:"Flags",emoji:"ac af al dz ad ao ai ag ar am aw au at az bs bh bd bb by be bz bj bm bt bo ba bw br bn bg bf bi cv kh cm ca ky cf td flag_cl cn co km cg flag_cd cr hr cu cy cz dk dj dm do ec eg sv gq er ee et fk fo fj fi fr pf ga gm ge de gh gi gr gl gd gu gt gn gw gy ht hn hk hu is in flag_id ir iq ie il it ci jm jp je jo kz ke ki xk kw kg la lv lb ls lr ly li lt lu mo mk mg mw my mv ml mt mh mr mu mx fm md mc mn me ms ma mz mm na nr np nl nc nz ni ne flag_ng nu kp no om pk pw ps pa pg py pe ph pl pt pr qa ro ru rw sh kn lc vc ws sm st flag_sa sn rs sc sl sg sk si sb so za kr es lk sd sr sz se ch sy tw tj tz th tl tg to tt tn tr flag_tm flag_tm ug ua ae gb us vi uy uz vu va ve vn wf eh ye zm zw re ax ta io bq cx cc gg im yt nf pn bl pm gs tk bv hm sj um ic ea cp dg as aq vg ck cw eu gf tf gp mq mp sx ss tc "}},e}function R(e){var t=n();if(e&&e.filters){var r=t.filters;C.each(e.filters,function(n,e){return!O(e)||C.isEmptyObject(e)?void delete r[n]:void C.each(e,function(e,t){r[n][e]=t})}),e.filters=r}return C.extend({},t,e)}function p(e,n){return e.replace(c,function(e){var t=A[0===E?"jsecapeMap":"jsEscapeMap"];return void 0!==e&&e in t?u(n,t[e]):e})}function N(e,t){return e=e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;").replace(/`/g,"&#x60;").replace(/(?:\r\n|\r|\n)/g,"\n").replace(/(\n+)/g,"<div>$1</div>").replace(/\n/g,"<br/>").replace(/<br\/><\/div>/g,"</div>"),t.shortnames&&(e=A.shortnameToUnicode(e)),p(e,t.emojiTemplate).replace(/\t/g,"&nbsp;&nbsp;&nbsp;&nbsp;").replace(/  /g,"&nbsp;&nbsp;")}function L(e,t){switch(e=e.replace(/&#10;/g,"\n").replace(/&#09;/g,"\t").replace(/<img[^>]*alt="([^"]+)"[^>]*>/gi,"$1").replace(/\n|\r/g,"").replace(/<br[^>]*>/gi,"\n").replace(/(?:<(?:div|p|ol|ul|li|pre|code|object)[^>]*>)+/gi,"<div>").replace(/(?:<\/(?:div|p|ol|ul|li|pre|code|object)>)+/gi,"</div>").replace(/\n<div><\/div>/gi,"\n").replace(/<div><\/div>\n/gi,"\n").replace(/(?:<div>)+<\/div>/gi,"\n").replace(/([^\n])<\/div><div>/gi,"$1\n").replace(/(?:<\/div>)+/gi,"</div>").replace(/([^\n])<\/div>([^\n])/gi,"$1\n$2").replace(/<\/div>/gi,"").replace(/([^\n])<div>/gi,"$1\n").replace(/\n<div>/gi,"\n").replace(/<div>\n/gi,"\n\n").replace(/<(?:[^>]+)?>/g,"").replace(new RegExp(D,"g"),"").replace(/&nbsp;/g," ").replace(/&lt;/g,"<").replace(/&gt;/g,">").replace(/&quot;/g,'"').replace(/&#x27;/g,"'").replace(/&#x60;/g,"`").replace(/&#60;/g,"<").replace(/&#62;/g,">").replace(/&amp;/g,"&"),t.saveEmojisAs){case"image":e=p(e,t.emojiTemplate);break;case"shortname":e=A.toShort(e)}return e}function F(){var e=this.editor[0].offsetWidth-this.editor[0].clientWidth,t=parseInt(this.button.css("marginRight"));t!==e&&(this.button.css({marginRight:e}),this.floatingPicker&&this.picker.css({right:parseInt(this.picker.css("right"))-t+e}))}function G(){if(!this.sprite&&this.lasyEmoji[0]&&this.lasyEmoji.eq(0).is(".lazy-emoji")){var n=this.picker.offset().top,r=n+this.picker.height()+20;this.lasyEmoji.each(function(){var e=C(this),t=e.offset().top;if(n<t&&t<r&&e.attr("src",e.data("src")).removeClass("lazy-emoji"),r<t)return!1}),this.lasyEmoji=this.lasyEmoji.filter(".lazy-emoji")}}function j(e,t){return(t?"":".")+k+(e?"-"+e:"")}function B(e){var n=C("<div/>",O(e)?e:{class:j(e,!0)});return C.each(l.call(arguments).slice(1),function(e,t){C.isFunction(t)&&(t=t.call(n)),t&&C(t).appendTo(n)}),n}function U(){return localStorage.getItem("recent_emojis")||""}function H(e,t){var n=U();if(!e.recent||e.recent!==n||t){if(n.length){var r,i,a=e.scrollArea.is(".skinnable");a||(r=e.scrollArea.scrollTop(),t&&e.recentCategory.show(),i=e.recentCategory.is(":visible")?e.recentCategory.height():0);var o=M(n,e.emojiBtnTemplate,!0).split("|").join("");if(e.recentCategory.children(".emojibtn").remove(),C(o).insertAfter(e.recentCategory.children(".emojionearea-category-title")),e.recentCategory.children(".emojibtn").on("click",function(){e.trigger("emojibtn.click",C(this))}),e.recentFilter.show(),!a){e.recentCategory.show();var s=e.recentCategory.height();i!==s&&e.scrollArea.scrollTop(r+s-i)}}else e.recentFilter.hasClass("active")&&e.recentFilter.removeClass("active").next().addClass("active"),e.recentCategory.hide(),e.recentFilter.hide();e.recent=n}}function m(c,t,a){c.options=a=R(a),c.sprite=a.sprite&&E<3,c.inline=null===a.inline?t.is("INPUT"):a.inline,c.shortnames=a.shortnames,c.saveEmojisAs=a.saveEmojisAs,c.standalone=a.standalone,c.emojiTemplate='<img alt="{alt}" class="emojione'+(c.sprite?'-{uni}" src="'+x+'"/>':'emoji" src="{img}"/>'),c.emojiTemplateAlt=c.sprite?'<i class="emojione-{uni}"/>':'<img class="emojioneemoji" src="{img}"/>',c.emojiBtnTemplate='<i class="emojibtn" role="button" data-name="{name}" title="{friendlyName}">'+c.emojiTemplateAlt+"</i>",c.recentEmojis=a.recentEmojis&&function(){try{return localStorage.setItem("test","test"),localStorage.removeItem("test"),!0}catch(e){return!1}}();var e=a.pickerPosition;c.floatingPicker="top"===e||"bottom"===e,((c.source=t).is(":disabled")||t.is(".disabled"))&&c.disable();var o,n,s,l,u,r,f,d,h,p,i=t.is("TEXTAREA")||t.is("INPUT")?"val":"text",m=B("tones",a.tones?function(){this.addClass(j("tones-"+a.tonesStyle,!0));for(var e=0;e<=5;e++)this.append(C("<i/>",{class:"btn-tone btn-tone-"+e+(e?"":" active"),"data-skin":e,role:"button"}))}:null),g=B({class:k+(c.standalone?" "+k+"-standalone ":" ")+(t.attr("class")||""),role:"application"},o=c.editor=B("editor").attr({contenteditable:!c.standalone,placeholder:a.placeholder||t.data("placeholder")||t.attr("placeholder")||"",tabindex:0}),n=c.button=B("button",B("button-open"),B("button-close")).attr("title",a.buttonTitle),s=c.picker=B("picker",B("wrapper",l=B("filters"),a.search?r=B("search-panel",B("search",a.search?function(){c.search=C("<input/>",{placeholder:a.searchPlaceholder||"",type:"text",class:"search"}),this.append(c.search)}:null),m):null,p=B("scroll-area",a.tones&&!a.search?B("tones-panel",m):null,f=B("emojis-list")))).addClass(j("picker-position-"+a.pickerPosition,!0)).addClass(j("filters-position-"+a.filtersPosition,!0)).addClass(j("search-position-"+a.searchPosition,!0)).addClass("hidden"));a.search&&r.addClass(j("with-search",!0)),c.searchSel=null,o.data(t.data()),C.each(a.attributes,function(e,t){o.attr(e,t)});var _=B("category-block").attr({"data-tone":0}).prependTo(f);if(C.each(a.filters,function(e,t){var n=0;if("recent"!==e||c.recentEmojis){if("tones"!==e)C("<i/>",{class:j("filter",!0)+" "+j("filter-"+e,!0),"data-filter":e,title:t.title}).wrapInner(M(t.icon,c.emojiTemplateAlt)).appendTo(l);else{if(!a.tones)return;n=5}do{var r,i=t.emoji.replace(/[\s,;]+/g,"|");r=0===n?B("category").attr({name:e,"data-tone":n}).appendTo(_):B("category-block").attr({name:e,"data-tone":n}).appendTo(f),0<n&&(r.hide(),i=i.split("|").join("_tone"+n+"|")+"_tone"+n),"recent"===e&&(i=U()),i=M(i,c.sprite?'<i class="emojibtn" role="button" data-name="{name}" title="{friendlyName}"><i class="emojione-{uni}"></i></i>':'<i class="emojibtn" role="button" data-name="{name}" title="{friendlyName}"><img class="emojioneemoji lazy-emoji" data-src="{img}"/></i>',!0).split("|").join(""),r.html(i),C('<div class="emojionearea-category-title"/>').text(t.title).prependTo(r)}while(0<--n)}}),a.filters=null,c.sprite||(c.lasyEmoji=f.find(".lazy-emoji")),(u=l.find(j("filter"))).eq(0).addClass("active"),h=f.find(j("category-block")),d=f.find(j("category")),c.recentFilter=u.filter('[data-filter="recent"]'),c.recentCategory=d.filter("[name=recent]"),c.scrollArea=p,a.container?C(a.container).wrapInner(g):g.insertAfter(t),a.hideSource&&t.hide(),c.setText(t[i]()),t[i](c.getText()),F.apply(c),c.standalone&&!c.getText().length){var b=C(t).data("emoji-placeholder")||a.emojiPlaceholder;c.setText(b),o.addClass("has-placeholder")}P(c,f.find(".emojibtn"),{click:"emojibtn.click"}),P(c,window,{resize:"!resize"}),P(c,m.children(),{click:"tone.click"}),P(c,[s,n],{mousedown:"!mousedown"},o),P(c,n,{click:"button.click"}),P(c,o,{paste:"!paste"},o),P(c,o,["focus","blur"],function(){return!c.stayFocused&&o}),P(c,s,{mousedown:"picker.mousedown",mouseup:"picker.mouseup",click:"picker.click",keyup:"picker.keyup",keydown:"picker.keydown",keypress:"picker.keypress"}),P(c,o,["mousedown","mouseup","click","keyup","keydown","keypress"]),P(c,s.find(".emojionearea-filter"),{click:"filter.click"}),P(c,t,{change:"source.change"}),a.search&&P(c,c.search,{keyup:"search.keypress",focus:"search.focus",blur:"search.blur"});var v=!1;if(p.on("scroll",function(){if(!v&&(G.call(c),p.is(":not(.skinnable)"))){var n=d.eq(0),r=p.offset().top;d.each(function(e,t){return!(10<=C(t).offset().top-r)&&void(n=C(t))});var e=u.filter('[data-filter="'+n.attr("name")+'"]');e[0]&&!e.is(".active")&&(u.removeClass("active"),e.addClass("active"))}}),c.on("@filter.click",function(e){var t=e.is(".active");if(p.is(".skinnable")){if(t)return;m.children().eq(0).click()}v=!0,t||(u.filter(".active").removeClass("active"),e.addClass("active"));var n=d.filter('[name="'+e.data("filter")+'"]').offset().top,r=p.scrollTop(),i=p.offset().top;p.stop().animate({scrollTop:n+r-i-2},200,"swing",function(){G.call(c),v=!1})}).on("@picker.show",function(){c.recentEmojis&&H(c),G.call(c)}).on("@tone.click",function(e){m.children().removeClass("active");var t=e.addClass("active").data("skin");t?(p.addClass("skinnable"),h.hide().filter("[data-tone="+t+"]").show(),u.removeClass("active")):(p.removeClass("skinnable"),h.hide().filter("[data-tone=0]").show(),u.eq(0).click()),G.call(c),a.search&&c.trigger("search.keypress")}).on("@button.click",function(e){e.is(".active")?c.hidePicker():(c.showPicker(),c.searchSel=null)}).on("@!paste",function(o,e){var t=function(e){var t="caret-"+(new Date).getTime(),n=N(e,c);$(n),$('<i id="'+t+'"></i>'),o.scrollTop(s);var r=C("#"+t),i=r.offset().top-o.offset().top,a=o.height();(a<=s+i||i<s)&&o.scrollTop(s+i-2*a/3),r.remove(),c.stayFocused=!1,F.apply(c),I(c,"paste",[o,e,n])};if(e.originalEvent.clipboardData){var n=e.originalEvent.clipboardData.getData("text/plain");return t(n),e.preventDefault?e.preventDefault():e.stop(),e.returnValue=!1,e.stopPropagation(),!1}c.stayFocused=!0,$("<span>"+D+"</span>");var r=S(o[0]),s=o.scrollTop(),i=C("<div/>",{contenteditable:!0}).css({position:"fixed",left:"-999px",width:"1px",height:"1px",top:"20px",overflow:"hidden"}).appendTo(C("BODY")).focus();window.setTimeout(function(){o.focus(),T(o[0],r);var e=L(i.html().replace(/\r\n|\n|\r/g,"<br>"),c);i.remove(),t(e)},200)}).on("@emojibtn.click",function(e){var t,n,r,i;o.removeClass("has-placeholder"),null!==c.searchSel&&(o.focus(),T(o[0],c.searchSel),c.searchSel=null),c.standalone?(o.html(M(e.data("name"),c.emojiTemplate)),c.trigger("blur")):(S(o[0]),$(M(e.data("name"),c.emojiTemplate))),c.recentEmojis&&(t=c,n=e.data("name"),r=U().split("|"),-1!==(i=r.indexOf(n))&&r.splice(i,1),r.unshift(n),9<r.length&&r.pop(),localStorage.setItem("recent_emojis",r.join("|")),H(t)),c.trigger("search.keypress")}).on("@!resize @keyup @emojibtn.click",F).on("@!mousedown",function(e,t){return C(t.target).hasClass("search")?(c.stayFocused=!0,null===c.searchSel&&(c.searchSel=S(e[0]))):(g.is(".focused")||e.trigger("focus"),t.preventDefault()),!1}).on("@change",function(){var e=c.editor.html().replace(/<\/?(?:div|span|p)[^>]*>/gi,"");e.length&&!/^<br[^>]*>$/i.test(e)||c.editor.html(c.content=""),t[i](c.getText())}).on("@source.change",function(){c.setText(t[i]()),I("change")}).on("@focus",function(){g.addClass("focused")}).on("@blur",function(){g.removeClass("focused"),a.hidePickerOnBlur&&c.hidePicker();var e=c.editor.html();c.content!==e?(c.content=e,I(c,"change",[c.editor]),t.trigger("blur").trigger("change")):t.trigger("blur"),a.search&&(c.search.val(""),c.trigger("search.keypress",!0))}),a.search&&c.on("@search.focus",function(){c.stayFocused=!0,c.search.addClass("focused")}).on("@search.keypress",function(e){var r=s.find(".emojionearea-filter"),n=a.tones?m.find("i.active").data("skin"):0,i=c.search.val().replace(/ /g,"_").replace(/"/g,'\\"');i&&i.length?(c.recentFilter.hasClass("active")&&c.recentFilter.removeClass("active").next().addClass("active"),c.recentCategory.hide(),c.recentFilter.hide(),h.each(function(){var e=function(e,t){var n=e.find('.emojibtn[data-name*="'+i+'"]');0===n.length?(e.data("tone")===t&&e.hide(),r.filter('[data-filter="'+e.attr("name")+'"]').hide()):(e.find('.emojibtn:not([data-name*="'+i+'"])').hide(),n.show(),e.data("tone")===t&&e.show(),r.filter('[data-filter="'+e.attr("name")+'"]').show())},t=C(this);0===t.data("tone")?d.filter(':not([name="recent"])').each(function(){e(C(this),0)}):e(t,n)}),v?G.call(c):p.trigger("scroll")):(H(c,!0),h.filter('[data-tone="'+m.find("i.active").data("skin")+'"]:not([name="recent"])').show(),C(".emojibtn",h).show(),r.show(),G.call(c))}).on("@search.blur",function(){c.stayFocused=!1,c.search.removeClass("focused"),c.trigger("blur")}),a.shortcuts&&c.on("@keydown",function(e,t){t.ctrlKey||(9==t.which?(t.preventDefault(),n.click()):27==t.which&&(t.preventDefault(),n.is(".active")&&c.hidePicker()))}),O(a.events)&&!C.isEmptyObject(a.events)&&C.each(a.events,function(e,t){c.on(e.replace(/_/g,"."),t)}),a.autocomplete){var y=function(){var e={maxCount:a.textcomplete.maxCount,placement:a.textcomplete.placement};a.shortcuts&&(e.onKeydown=function(e,t){if(!e.ctrlKey&&13==e.which)return t.KEY_ENTER});var n=C.map(A.emojioneList,function(e,t){return a.autocompleteTones?t:/_tone[12345]/.test(t)?null:t});n.sort(),o.textcomplete([{id:k,match:/\B(:[\-+\w]*)$/,search:function(t,e){e(C.map(n,function(e){return 0===e.indexOf(t)?e:null}))},template:function(e){return M(e,c.emojiTemplate)+" "+e.replace(/:/g,"")},replace:function(e){return M(e,c.emojiTemplate)},cache:!0,index:1}],e),a.textcomplete.placement&&"static"==C(o.data("textComplete").option.appendTo).css("position")&&C(o.data("textComplete").option.appendTo).css("position","relative")},w=function(){if(c.disabled){var e=function(){c.off("enabled",e),y()};c.on("enabled",e)}else y()};C.fn.textcomplete?w():C.ajax({url:"https://cdn.rawgit.com/yuku-t/jquery-textcomplete/v1.3.4/dist/jquery.textcomplete.js",dataType:"script",cache:!0,success:w})}c.inline&&(g.addClass(j("inline",!0)),c.on("@keydown",function(e,t){13==t.which&&t.preventDefault()})),/firefox/i.test(navigator.userAgent)&&document.execCommand("enableObjectResizing",!1,!1),c.isReady=!0,c.trigger("onLoad",o),c.trigger("ready",o)}window.getSelection&&document.createRange?(S=function(e){var t=window.getSelection&&window.getSelection();if(t&&0<t.rangeCount)return t.getRangeAt(0)},T=function(e,t){var n=document.createRange();n.setStart(t.startContainer,t.startOffset),n.setEnd(t.endContainer,t.endOffset),(t=window.getSelection()).removeAllRanges(),t.addRange(n)}):document.selection&&document.body.createTextRange&&(S=function(e){return document.selection.createRange()},T=function(e,t){var n=document.body.createTextRange();n.moveToElementText(e),n.setStart(t.startContanier,t.startOffset),n.setEnd(t.endContainer,t.endOffset),n.select()});var g={defaultBase:"https://cdnjs.cloudflare.com/ajax/libs/emojione/",defaultBase3:"https://cdn.jsdelivr.net/",base:null,isLoading:!1};function _(t){var n=f();if(t=R(t),!g.isLoading)if(!A||h(d(A))<2){var e;g.isLoading=!0,e=5<h(n)?g.defaultBase3+"npm/emojione@"+n:4<h(n)?g.defaultBase3+"emojione/"+n:g.defaultBase+"/"+n,C.ajax({url:e+"/lib/js/emojione.min.js",dataType:"script",cache:!0,success:function(){var e;for(A=window.emojione,n=d(A),e=4<(E=h(n))?(g.base=g.defaultBase3+"emojione/assets/"+n,g.base+"/sprites/emojione-sprite-"+A.emojiSize+".css"):(g.base=g.defaultBase+n+"/assets",g.base+"/sprites/emojione.sprites.css"),t.sprite&&(document.createStyleSheet?document.createStyleSheet(e):C("<link/>",{rel:"stylesheet",href:e}).appendTo("head"));i.length;)i.shift().call();g.isLoading=!1}})}else n=d(A),E=h(n),g.base=4<E?g.defaultBase3+"emojione/assets/"+n:g.defaultBase+n+"/assets";a(function(){var e="";t.useInternalCDN&&(4<E&&(e=A.emojiSize+"/"),A.imagePathPNG=g.base+"/png/"+e,A.imagePathSVG=g.base+"/svg/"+e,A.imagePathSVGSprites=g.base+"/sprites/emojione.sprites.svg",A.imageType=t.imageType),4<h(n)?(c=A.regUnicode,A.imageType=t.imageType||"png"):c=new RegExp("<object[^>]*>.*?</object>|<span[^>]*>.*?</span>|<(?:object|embed|svg|img|div|span|p|a)[^>]*>|("+A.unicodeRegexp+")","gi")})}var t=function(e,t){var n=this;_(t),o[n.id=++r]={},s[n.id]={},a(function(){m(n,e,t)})};t.prototype.on=function(e,n){if(e&&C.isFunction(n)){var r=this;C.each(e.toLowerCase().split(" "),function(e,t){(function(r,i){i=i.replace(/^@/,"");var e=r.id;s[e][i]&&(C.each(s[e][i],function(e,n){C.each(C.isArray(n[0])?n[0]:[n[0]],function(e,t){C(t).on(n[1],function(){var e=l.call(arguments),t=C.isFunction(n[2])?n[2].apply(r,[i].concat(e)):n[2];t&&I(r,i,[t].concat(e))})})}),s[e][i]=null)})(r,t),(o[r.id][t]||(o[r.id][t]=[])).push(n)})}return this},t.prototype.off=function(e,r){if(e){var i=this.id;C.each(e.toLowerCase().replace(/_/g,".").split(" "),function(e,n){o[i][n]&&!/^@/.test(n)&&(r?C.each(o[i][n],function(e,t){t===r&&(o[i][n]=o[i][n].splice(e,1))}):o[i][n]=[])})}return this},t.prototype.trigger=function(){var e=l.call(arguments),t=[this].concat(e.slice(0,1));return t.push(e.slice(1)),I.apply(this,t)},t.prototype.setFocus=function(){var e=this;return a(function(){e.editor.focus()}),e},t.prototype.setText=function(e){var t=this;return a(function(){t.editor.html(N(e,t)),t.content=t.editor.html(),I(t,"change",[t.editor]),F.apply(t)}),t},t.prototype.getText=function(){return L(this.editor.html(),this)},t.prototype.showPicker=function(){var e=this;return e._sh_timer&&window.clearTimeout(e._sh_timer),e.picker.removeClass("hidden"),e._sh_timer=window.setTimeout(function(){e.button.addClass("active")},50),I(e,"picker.show",[e.picker]),e},t.prototype.hidePicker=function(){var e=this;return e._sh_timer&&window.clearTimeout(e._sh_timer),e.button.removeClass("active"),e._sh_timer=window.setTimeout(function(){e.picker.addClass("hidden")},500),I(e,"picker.hide",[e.picker]),e},t.prototype.enable=function(){var t=this,e=function(){t.disabled=!1,t.editor.prop("contenteditable",!0),t.button.show();var e=t[t.standalone?"button":"editor"];e.parent().removeClass("emojionearea-disable"),I(t,"enabled",[e])};return t.isReady?e():t.on("ready",e),t},t.prototype.disable=function(){var t=this;t.disabled=!0;var e=function(){t.editor.prop("contenteditable",!1),t.hidePicker(),t.button.hide();var e=t[t.standalone?"button":"editor"];e.parent().addClass("emojionearea-disable"),I(t,"disabled",[e])};return t.isReady?e():t.on("ready",e),t},C.fn.emojioneArea=function(e){return this.each(function(){return this.emojioneArea||C.data(this,"emojioneArea",this.emojioneArea=new t(C(this),e)),this.emojioneArea})},C.fn.emojioneArea.defaults=n(),C.fn.emojioneAreaText=function(e){e=R(e);var t=this,n={shortnames:!e||void 0===e.shortnames||e.shortnames,emojiTemplate:'<img alt="{alt}" class="emojione'+(e&&e.sprite&&E<3?'-{uni}" src="'+x:'emoji" src="{img}')+'"/>'};return _(e),a(function(){t.each(function(){var e=C(this);return e.hasClass("emojionearea-text")||e.addClass("emojionearea-text").html(N(e.is("TEXTAREA")||e.is("INPUT")?e.val():e.text(),n)),e})}),this}},window),function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).JsSIP=e()}}(function(){return function a(o,s,c){function l(n,e){if(!s[n]){if(!o[n]){var t="function"==typeof require&&require;if(!e&&t)return t(n,!0);if(u)return u(n,!0);var r=new Error("Cannot find module '"+n+"'");throw r.code="MODULE_NOT_FOUND",r}var i=s[n]={exports:{}};o[n][0].call(i.exports,function(e){var t=o[n][1][e];return l(t||e)},i,i.exports,a,o,s,c)}return s[n].exports}for(var u="function"==typeof require&&require,e=0;e<c.length;e++)l(c[e]);return l}({1:[function(e,t,n){"use strict";var c=e("./Utils"),r=e("./Constants"),i=e("./Grammar"),a=e("./URI"),l=e("./Socket"),u=e("./Exceptions");n.settings={authorization_user:null,password:null,realm:null,ha1:null,display_name:null,uri:null,contact_uri:null,instance_id:null,use_preloaded_route:!1,session_timers:!0,session_timers_refresh_method:r.UPDATE,no_answer_timeout:60,register:!0,register_expires:600,registrar_server:null,sockets:null,connection_recovery_max_interval:null,connection_recovery_min_interval:null,via_host:c.createRandomToken(12)+".invalid"};var f={mandatory:{sockets:function(e){var t=[];if(l.isSocket(e))t.push({socket:e});else{if(!Array.isArray(e)||!e.length)return;var n=!0,r=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;Object.prototype.hasOwnProperty.call(s,"socket")&&l.isSocket(s.socket)?t.push(s):l.isSocket(s)&&t.push({socket:s})}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}}return t},uri:function(e){/^sip:/i.test(e)||(e=r.SIP+":"+e);var t=a.parse(e);return t&&t.user?t:void 0}},optional:{authorization_user:function(e){return-1===i.parse('"'+e+'"',"quoted_string")?void 0:e},user_agent:function(e){if("string"==typeof e)return e},connection_recovery_max_interval:function(e){if(c.isDecimal(e)){var t=Number(e);if(0<t)return t}},connection_recovery_min_interval:function(e){if(c.isDecimal(e)){var t=Number(e);if(0<t)return t}},contact_uri:function(e){if("string"==typeof e){var t=i.parse(e,"SIP_URI");if(-1!==t)return t}},display_name:function(e){return-1===i.parse('"'+e+'"',"display_name")?void 0:e},instance_id:function(e){return/^uuid:/i.test(e)&&(e=e.substr(5)),-1===i.parse(e,"uuid")?void 0:e},no_answer_timeout:function(e){if(c.isDecimal(e)){var t=Number(e);if(0<t)return t}},session_timers:function(e){if("boolean"==typeof e)return e},session_timers_refresh_method:function(e){if("string"==typeof e&&((e=e.toUpperCase())===r.INVITE||e===r.UPDATE))return e},password:function(e){return String(e)},realm:function(e){return String(e)},ha1:function(e){return String(e)},register:function(e){if("boolean"==typeof e)return e},register_expires:function(e){if(c.isDecimal(e)){var t=Number(e);if(0<t)return t}},registrar_server:function(e){/^sip:/i.test(e)||(e=r.SIP+":"+e);var t=a.parse(e);return t?t.user?void 0:t:void 0},use_preloaded_route:function(e){if("boolean"==typeof e)return e}}};n.load=function(e,t){for(var n in f.mandatory){if(!t.hasOwnProperty(n))throw new u.ConfigurationError(n);var r=t[n],i=f.mandatory[n](r);if(void 0===i)throw new u.ConfigurationError(n,r);e[n]=i}for(var a in f.optional)if(t.hasOwnProperty(a)){var o=t[a];if(c.isEmpty(o))continue;var s=f.optional[a](o);if(void 0===s)throw new u.ConfigurationError(a,o);e[a]=s}}},{"./Constants":2,"./Exceptions":6,"./Grammar":7,"./Socket":20,"./URI":25,"./Utils":26}],2:[function(e,t,n){"use strict";var r=e("../package.json");t.exports={USER_AGENT:r.title+" "+r.version,SIP:"sip",SIPS:"sips",causes:{CONNECTION_ERROR:"Connection Error",REQUEST_TIMEOUT:"Request Timeout",SIP_FAILURE_CODE:"SIP Failure Code",INTERNAL_ERROR:"Internal Error",BUSY:"Busy",REJECTED:"Rejected",REDIRECTED:"Redirected",UNAVAILABLE:"Unavailable",NOT_FOUND:"Not Found",ADDRESS_INCOMPLETE:"Address Incomplete",INCOMPATIBLE_SDP:"Incompatible SDP",MISSING_SDP:"Missing SDP",AUTHENTICATION_ERROR:"Authentication Error",BYE:"Terminated",WEBRTC_ERROR:"WebRTC Error",CANCELED:"Canceled",NO_ANSWER:"No Answer",EXPIRES:"Expires",NO_ACK:"No ACK",DIALOG_ERROR:"Dialog Error",USER_DENIED_MEDIA_ACCESS:"User Denied Media Access",BAD_MEDIA_DESCRIPTION:"Bad Media Description",RTP_TIMEOUT:"RTP Timeout"},SIP_ERROR_CAUSES:{REDIRECTED:[300,301,302,305,380],BUSY:[486,600],REJECTED:[403,603],NOT_FOUND:[404,604],UNAVAILABLE:[480,410,408,430],ADDRESS_INCOMPLETE:[484,424],INCOMPATIBLE_SDP:[488,606],AUTHENTICATION_ERROR:[401,407]},ACK:"ACK",BYE:"BYE",CANCEL:"CANCEL",INFO:"INFO",INVITE:"INVITE",MESSAGE:"MESSAGE",NOTIFY:"NOTIFY",OPTIONS:"OPTIONS",REGISTER:"REGISTER",REFER:"REFER",UPDATE:"UPDATE",SUBSCRIBE:"SUBSCRIBE",REASON_PHRASE:{100:"Trying",180:"Ringing",181:"Call Is Being Forwarded",182:"Queued",183:"Session Progress",199:"Early Dialog Terminated",200:"OK",202:"Accepted",204:"No Notification",300:"Multiple Choices",301:"Moved Permanently",302:"Moved Temporarily",305:"Use Proxy",380:"Alternative Service",400:"Bad Request",401:"Unauthorized",402:"Payment Required",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",407:"Proxy Authentication Required",408:"Request Timeout",410:"Gone",412:"Conditional Request Failed",413:"Request Entity Too Large",414:"Request-URI Too Long",415:"Unsupported Media Type",416:"Unsupported URI Scheme",417:"Unknown Resource-Priority",420:"Bad Extension",421:"Extension Required",422:"Session Interval Too Small",423:"Interval Too Brief",424:"Bad Location Information",428:"Use Identity Header",429:"Provide Referrer Identity",430:"Flow Failed",433:"Anonymity Disallowed",436:"Bad Identity-Info",437:"Unsupported Certificate",438:"Invalid Identity Header",439:"First Hop Lacks Outbound Support",440:"Max-Breadth Exceeded",469:"Bad Info Package",470:"Consent Needed",478:"Unresolvable Destination",480:"Temporarily Unavailable",481:"Call/Transaction Does Not Exist",482:"Loop Detected",483:"Too Many Hops",484:"Address Incomplete",485:"Ambiguous",486:"Busy Here",487:"Request Terminated",488:"Not Acceptable Here",489:"Bad Event",491:"Request Pending",493:"Undecipherable",494:"Security Agreement Required",500:"JsSIP Internal Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Server Time-out",505:"Version Not Supported",513:"Message Too Large",580:"Precondition Failure",600:"Busy Everywhere",603:"Decline",604:"Does Not Exist Anywhere",606:"Not Acceptable"},ALLOWED_METHODS:"INVITE,ACK,CANCEL,BYE,UPDATE,MESSAGE,OPTIONS,REFER,INFO",ACCEPTED_BODY_TYPES:"application/sdp, application/dtmf-relay",MAX_FORWARDS:69,SESSION_EXPIRES:90,MIN_SESSION_EXPIRES:60}},{"../package.json":51}],3:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var o=e("./SIPMessage"),i=e("./Constants"),s=e("./Transactions"),c=e("./Dialog/RequestSender"),l=e("./Utils"),u=e("debug")("JsSIP:Dialog"),f={STATUS_EARLY:1,STATUS_CONFIRMED:2};t.exports=function(){function a(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:f.STATUS_CONFIRMED;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,a),this._owner=e,this._ua=e._ua,this._uac_pending_reply=!1,this._uas_pending_reply=!1,!t.hasHeader("contact"))return{error:"unable to create a Dialog without Contact header field"};t instanceof o.IncomingResponse&&(r=t.status_code<200?f.STATUS_EARLY:f.STATUS_CONFIRMED);var i=t.parseHeader("contact");"UAS"===n?(this._id={call_id:t.call_id,local_tag:t.to_tag,remote_tag:t.from_tag,toString:function(){return this.call_id+this.local_tag+this.remote_tag}},this._state=r,this._remote_seqnum=t.cseq,this._local_uri=t.parseHeader("to").uri,this._remote_uri=t.parseHeader("from").uri,this._remote_target=i.uri,this._route_set=t.getHeaders("record-route"),this._ack_seqnum=this._remote_seqnum):"UAC"===n&&(this._id={call_id:t.call_id,local_tag:t.from_tag,remote_tag:t.to_tag,toString:function(){return this.call_id+this.local_tag+this.remote_tag}},this._state=r,this._local_seqnum=t.cseq,this._local_uri=t.parseHeader("from").uri,this._remote_uri=t.parseHeader("to").uri,this._remote_target=i.uri,this._route_set=t.getHeaders("record-route").reverse(),this._ack_seqnum=null),this._ua.newDialog(this),u("new "+n+" dialog created with status "+(this._state===f.STATUS_EARLY?"EARLY":"CONFIRMED"))}return r(a,null,[{key:"C",get:function(){return f}}]),r(a,[{key:"update",value:function(e,t){this._state=f.STATUS_CONFIRMED,u("dialog "+this._id.toString()+"  changed to CONFIRMED state"),"UAC"===t&&(this._route_set=e.getHeaders("record-route").reverse())}},{key:"terminate",value:function(){u("dialog "+this._id.toString()+" deleted"),this._ua.destroyDialog(this)}},{key:"sendRequest",value:function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r=l.cloneArray(n.extraHeaders),i=n.eventHandlers||{},a=n.body||null,o=this._createRequest(e,r,a);return i.onAuthenticated=function(){t._local_seqnum+=1},new c(this,o,i).send(),o}},{key:"receiveRequest",value:function(e){this._checkInDialogRequest(e)&&(e.method===i.ACK&&null!==this._ack_seqnum?this._ack_seqnum=null:e.method===i.INVITE&&(this._ack_seqnum=e.cseq),this._owner.receiveRequest(e))}},{key:"_createRequest",value:function(e,t,n){t=l.cloneArray(t),this._local_seqnum||(this._local_seqnum=Math.floor(1e4*Math.random()));var r=e===i.CANCEL||e===i.ACK?this._local_seqnum:this._local_seqnum+=1;return new o.OutgoingRequest(e,this._remote_target,this._ua,{cseq:r,call_id:this._id.call_id,from_uri:this._local_uri,from_tag:this._id.local_tag,to_uri:this._remote_uri,to_tag:this._id.remote_tag,route_set:this._route_set},t,n)}},{key:"_checkInDialogRequest",value:function(t){var n=this;if(this._remote_seqnum)if(t.cseq<this._remote_seqnum){if(t.method!==i.ACK)return t.reply(500),!1;if(null===this._ack_seqnum||t.cseq!==this._ack_seqnum)return!1}else t.cseq>this._remote_seqnum&&(this._remote_seqnum=t.cseq);else this._remote_seqnum=t.cseq;if(t.method===i.INVITE||t.method===i.UPDATE&&t.body){if(!0===this._uac_pending_reply)t.reply(491);else{if(!0===this._uas_pending_reply){var e=1+(10*Math.random()|0);return t.reply(500,null,["Retry-After:"+e]),!1}this._uas_pending_reply=!0;t.server_transaction.on("stateChanged",function e(){t.server_transaction.state!==s.C.STATUS_ACCEPTED&&t.server_transaction.state!==s.C.STATUS_COMPLETED&&t.server_transaction.state!==s.C.STATUS_TERMINATED||(t.server_transaction.removeListener("stateChanged",e),n._uas_pending_reply=!1)})}t.hasHeader("contact")&&t.server_transaction.on("stateChanged",function(){t.server_transaction.state===s.C.STATUS_ACCEPTED&&(n._remote_target=t.parseHeader("contact").uri)})}else t.method===i.NOTIFY&&t.hasHeader("contact")&&t.server_transaction.on("stateChanged",function(){t.server_transaction.state===s.C.STATUS_COMPLETED&&(n._remote_target=t.parseHeader("contact").uri)});return!0}},{key:"id",get:function(){return this._id}},{key:"local_seqnum",get:function(){return this._local_seqnum},set:function(e){this._local_seqnum=e}},{key:"owner",get:function(){return this._owner}},{key:"uac_pending_reply",get:function(){return this._uac_pending_reply},set:function(e){this._uac_pending_reply=e}},{key:"uas_pending_reply",get:function(){return this._uas_pending_reply}}]),a}()},{"./Constants":2,"./Dialog/RequestSender":4,"./SIPMessage":19,"./Transactions":22,"./Utils":26,debug:29}],4:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var a=e("../Constants"),o=e("../Transactions"),s=e("../RTCSession"),c=e("../RequestSender"),l={onRequestTimeout:function(){},onTransportError:function(){},onSuccessResponse:function(){},onErrorResponse:function(){},onAuthenticated:function(){},onDialogError:function(){}};t.exports=function(){function i(e,t,n){for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this._dialog=e,this._ua=e._ua,this._request=t,this._eventHandlers=n,this._reattempt=!1,this._reattemptTimer=null,l)Object.prototype.hasOwnProperty.call(l,r)&&(this._eventHandlers[r]||(this._eventHandlers[r]=l[r]))}return r(i,[{key:"send",value:function(){var t=this,n=new c(this._ua,this._request,{onRequestTimeout:function(){t._eventHandlers.onRequestTimeout()},onTransportError:function(){t._eventHandlers.onTransportError()},onAuthenticated:function(e){t._eventHandlers.onAuthenticated(e)},onReceiveResponse:function(e){t._receiveResponse(e)}});if(n.send(),(this._request.method===a.INVITE||this._request.method===a.UPDATE&&this._request.body)&&n.clientTransaction.state!==o.C.STATUS_TERMINATED){this._dialog.uac_pending_reply=!0;n.clientTransaction.on("stateChanged",function e(){n.clientTransaction.state!==o.C.STATUS_ACCEPTED&&n.clientTransaction.state!==o.C.STATUS_COMPLETED&&n.clientTransaction.state!==o.C.STATUS_TERMINATED||(n.clientTransaction.removeListener("stateChanged",e),t._dialog.uac_pending_reply=!1)})}}},{key:"_receiveResponse",value:function(e){var t=this;408===e.status_code||481===e.status_code?this._eventHandlers.onDialogError(e):e.method===a.INVITE&&491===e.status_code?this._reattempt?200<=e.status_code&&e.status_code<300?this._eventHandlers.onSuccessResponse(e):300<=e.status_code&&this._eventHandlers.onErrorResponse(e):(this._request.cseq.value=this._dialog.local_seqnum+=1,this._reattemptTimer=setTimeout(function(){t._dialog.owner.status!==s.C.STATUS_TERMINATED&&(t._reattempt=!0,t._request_sender.send())},1e3)):200<=e.status_code&&e.status_code<300?this._eventHandlers.onSuccessResponse(e):300<=e.status_code&&this._eventHandlers.onErrorResponse(e)}},{key:"request",get:function(){return this._request}}]),i}()},{"../Constants":2,"../RTCSession":12,"../RequestSender":18,"../Transactions":22}],5:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var c=e("./Utils"),l=e("debug")("JsSIP:DigestAuthentication"),u=e("debug")("JsSIP:ERROR:DigestAuthentication");u.log=console.warn.bind(console),t.exports=function(){function t(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),this._credentials=e,this._cnonce=null,this._nc=0,this._ncHex="00000000",this._algorithm=null,this._realm=null,this._nonce=null,this._opaque=null,this._stale=null,this._qop=null,this._method=null,this._uri=null,this._ha1=null,this._response=null}return r(t,[{key:"get",value:function(e){switch(e){case"realm":return this._realm;case"ha1":return this._ha1;default:return void u('get() | cannot get "%s" parameter',e)}}},{key:"authenticate",value:function(e,t){var n=e.method,r=e.ruri,i=e.body,a=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(this._algorithm=t.algorithm,this._realm=t.realm,this._nonce=t.nonce,this._opaque=t.opaque,this._stale=t.stale,this._algorithm){if("MD5"!==this._algorithm)return u('authenticate() | challenge with Digest algorithm different than "MD5", authentication aborted'),!1}else this._algorithm="MD5";if(!this._nonce)return u("authenticate() | challenge without Digest nonce, authentication aborted"),!1;if(!this._realm)return u("authenticate() | challenge without Digest realm, authentication aborted"),!1;if(!this._credentials.password){if(!this._credentials.ha1)return u("authenticate() | no plain SIP password nor ha1 provided, authentication aborted"),!1;if(this._credentials.realm!==this._realm)return u('authenticate() | no plain SIP password, and stored `realm` does not match the given `realm`, cannot authenticate [stored:"%s", given:"%s"]',this._credentials.realm,this._realm),!1}if(t.qop)if(-1<t.qop.indexOf("auth-int"))this._qop="auth-int";else{if(!(-1<t.qop.indexOf("auth")))return u('authenticate() | challenge without Digest qop different than "auth" or "auth-int", authentication aborted'),!1;this._qop="auth"}else this._qop=null;this._method=n,this._uri=r,this._cnonce=a||c.createRandomToken(12),this._nc+=1;var o=Number(this._nc).toString(16);this._ncHex="00000000".substr(0,8-o.length)+o,4294967296===this._nc&&(this._nc=1,this._ncHex="00000001"),this._credentials.password?this._ha1=c.calculateMD5(this._credentials.username+":"+this._realm+":"+this._credentials.password):this._ha1=this._credentials.ha1;var s=void 0;return"auth"===this._qop?(s=c.calculateMD5(this._method+":"+this._uri),this._response=c.calculateMD5(this._ha1+":"+this._nonce+":"+this._ncHex+":"+this._cnonce+":auth:"+s)):"auth-int"===this._qop?(s=c.calculateMD5(this._method+":"+this._uri+":"+c.calculateMD5(i||"")),this._response=c.calculateMD5(this._ha1+":"+this._nonce+":"+this._ncHex+":"+this._cnonce+":auth-int:"+s)):null===this._qop&&(s=c.calculateMD5(this._method+":"+this._uri),this._response=c.calculateMD5(this._ha1+":"+this._nonce+":"+s)),l("authenticate() | response generated"),!0}},{key:"toString",value:function(){var e=[];if(!this._response)throw new Error("response field does not exist, cannot generate Authorization header");return e.push("algorithm="+this._algorithm),e.push('username="'+this._credentials.username+'"'),e.push('realm="'+this._realm+'"'),e.push('nonce="'+this._nonce+'"'),e.push('uri="'+this._uri+'"'),e.push('response="'+this._response+'"'),this._opaque&&e.push('opaque="'+this._opaque+'"'),this._qop&&(e.push("qop="+this._qop),e.push('cnonce="'+this._cnonce+'"'),e.push("nc="+this._ncHex)),"Digest "+e.join(", ")}}]),t}()},{"./Utils":26,debug:29}],6:[function(e,t,n){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function a(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var r=function(e){function r(e,t){i(this,r);var n=a(this,(r.__proto__||Object.getPrototypeOf(r)).call(this));return n.code=1,n.name="CONFIGURATION_ERROR",n.parameter=e,n.value=t,n.message=n.value?"Invalid value "+JSON.stringify(n.value)+' for parameter "'+n.parameter+'"':"Missing parameter: "+n.parameter,n}return o(r,Error),r}(),s=function(e){function n(e){i(this,n);var t=a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.code=2,t.name="INVALID_STATE_ERROR",t.status=e,t.message="Invalid status: "+e,t}return o(n,Error),n}(),c=function(e){function n(e){i(this,n);var t=a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.code=3,t.name="NOT_SUPPORTED_ERROR",t.message=e,t}return o(n,Error),n}(),l=function(e){function n(e){i(this,n);var t=a(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.code=4,t.name="NOT_READY_ERROR",t.message=e,t}return o(n,Error),n}();t.exports={ConfigurationError:r,InvalidStateError:s,NotSupportedError:c,NotReadyError:l}},{}],7:[function(Hn,e,t){"use strict";e.exports=function(){function Un(e){return'"'+e.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E-\x1F\x80-\uFFFF]/g,escape)+'"'}var e={parse:function(_,c){var e={CRLF:o,DIGIT:l,ALPHA:s,HEXDIG:u,WSP:f,OCTET:n,DQUOTE:d,SP:h,HTAB:p,alphanum:i,reserved:m,unreserved:g,mark:r,escaped:w,LWS:C,SWS:A,HCOLON:S,TEXT_UTF8_TRIM:T,TEXT_UTF8char:x,UTF8_NONASCII:k,UTF8_CONT:E,LHEX:function(){var e;null===(e=l())&&(/^[a-f]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[a-f]")));return e},token:D,token_nodot:I,separators:function(){var e;40===_.charCodeAt(b)?(e="(",b++):(e=null,0===v&&y('"("'));null===e&&(41===_.charCodeAt(b)?(e=")",b++):(e=null,0===v&&y('")"')),null===e&&(60===_.charCodeAt(b)?(e="<",b++):(e=null,0===v&&y('"<"')),null===e&&(62===_.charCodeAt(b)?(e=">",b++):(e=null,0===v&&y('">"')),null===e&&(64===_.charCodeAt(b)?(e="@",b++):(e=null,0===v&&y('"@"')),null===e&&(44===_.charCodeAt(b)?(e=",",b++):(e=null,0===v&&y('","')),null===e&&(59===_.charCodeAt(b)?(e=";",b++):(e=null,0===v&&y('";"')),null===e&&(58===_.charCodeAt(b)?(e=":",b++):(e=null,0===v&&y('":"')),null===e&&(92===_.charCodeAt(b)?(e="\\",b++):(e=null,0===v&&y('"\\\\"')),null===e&&null===(e=d())&&(47===_.charCodeAt(b)?(e="/",b++):(e=null,0===v&&y('"/"')),null===e&&(91===_.charCodeAt(b)?(e="[",b++):(e=null,0===v&&y('"["')),null===e&&(93===_.charCodeAt(b)?(e="]",b++):(e=null,0===v&&y('"]"')),null===e&&(63===_.charCodeAt(b)?(e="?",b++):(e=null,0===v&&y('"?"')),null===e&&(61===_.charCodeAt(b)?(e="=",b++):(e=null,0===v&&y('"="')),null===e&&(123===_.charCodeAt(b)?(e="{",b++):(e=null,0===v&&y('"{"')),null===e&&(125===_.charCodeAt(b)?(e="}",b++):(e=null,0===v&&y('"}"')),null===e&&null===(e=h())&&(e=p()))))))))))))))));return e},word:P,STAR:M,SLASH:$,EQUAL:O,LPAREN:R,RPAREN:N,RAQUOT:L,LAQUOT:F,COMMA:G,SEMI:j,COLON:B,LDQUOT:U,RDQUOT:H,comment:function e(){var t,n,r;var i;i=b;t=R();if(null!==t){for(n=[],null===(r=W())&&null===(r=Y())&&(r=e());null!==r;)n.push(r),null===(r=W())&&null===(r=Y())&&(r=e());null!==n&&null!==(r=N())?t=[t,n,r]:(t=null,b=i)}else t=null,b=i;return t},ctext:W,quoted_string:q,quoted_string_clean:z,qdtext:V,quoted_pair:Y,SIP_URI_noparams:K,SIP_URI:Q,uri_scheme:X,uri_scheme_sips:Z,uri_scheme_sip:J,userinfo:ee,user:te,user_unreserved:ne,password:re,hostport:ie,host:ae,hostname:oe,domainlabel:se,toplabel:ce,IPv6reference:le,IPv6address:ue,h16:fe,ls32:de,IPv4address:he,dec_octet:pe,port:me,uri_parameters:ge,uri_parameter:_e,transport_param:be,user_param:ve,method_param:ye,ttl_param:we,maddr_param:Ce,lr_param:Ae,other_param:Se,pname:Te,pvalue:xe,paramchar:ke,param_unreserved:Ee,headers:De,header:Ie,hname:Pe,hvalue:Me,hnv_unreserved:$e,Request_Response:function(){var e;null===(e=lt())&&(e=Oe());return e},Request_Line:Oe,Request_URI:Re,absoluteURI:Ne,hier_part:Le,net_path:Fe,abs_path:Ge,opaque_part:je,uric:Be,uric_no_slash:Ue,path_segments:He,segment:We,param:qe,pchar:ze,scheme:Ve,authority:Ye,srvr:Ke,reg_name:Qe,query:Xe,SIP_Version:Ze,INVITEm:Je,ACKm:et,OPTIONSm:tt,BYEm:nt,CANCELm:rt,REGISTERm:it,SUBSCRIBEm:at,NOTIFYm:ot,REFERm:st,Method:ct,Status_Line:lt,Status_Code:ut,extension_code:ft,Reason_Phrase:dt,Allow_Events:function(){var e,t,n,r,i,a;if(i=b,null!==(e=Nt())){for(t=[],a=b,null!==(n=G())&&null!==(r=Nt())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=G())&&null!==(r=Nt())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},Call_ID:function(){var e,t,n,r,i,a;i=r=b,null!==(e=P())?(a=b,64===_.charCodeAt(b)?(t="@",b++):(t=null,0===v&&y('"@"')),null!==t&&null!==(n=P())?t=[t,n]:(t=null,b=a),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=i)):(e=null,b=i);null!==e&&(o=r,e=void(Fn=_.substring(b,o)));var o;null===e&&(b=r);return e},Contact:function(){var e,t,n,r,i,a,o;if(i=b,null===(e=M()))if(a=b,null!==(e=ht())){for(t=[],o=b,null!==(n=G())&&null!==(r=ht())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=G())&&null!==(r=ht())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;null!==e&&(e=function(e){var t,n;for(n=Fn.multi_header.length,t=0;t<n;t++)if(null===Fn.multi_header[t].parsed){Fn=null;break}Fn=null!==Fn?Fn.multi_header:-1}());null===e&&(b=i);return e},contact_param:ht,name_addr:pt,display_name:mt,contact_params:gt,c_p_q:_t,c_p_expires:bt,delta_seconds:vt,qvalue:yt,generic_param:wt,gen_value:Ct,Content_Disposition:function(){var e,t,n,r,i,a;if(i=b,null!==(e=At())){for(t=[],a=b,null!==(n=j())&&null!==(r=St())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=j())&&null!==(r=St())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},disp_type:At,disp_param:St,handling_param:Tt,Content_Encoding:function(){var e,t,n,r,i,a;if(i=b,null!==(e=D())){for(t=[],a=b,null!==(n=G())&&null!==(r=D())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=G())&&null!==(r=D())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},Content_Length:function(){var e,t,n;if(n=b,null!==(t=l()))for(e=[];null!==t;)e.push(t),t=l();else e=null;null!==e&&(e=void(Fn=parseInt(e.join(""))));null===e&&(b=n);return e},Content_Type:function(){var e,t;t=b,null!==(e=xt())&&(n=t,e=void(Fn=_.substring(b,n)));var n;null===e&&(b=t);return e},media_type:xt,m_type:kt,discrete_type:Et,composite_type:Dt,extension_token:It,x_token:Pt,m_subtype:Mt,m_parameter:$t,m_value:Ot,CSeq:function(){var e,t,n,r;r=b,null!==(e=Rt())&&null!==(t=C())&&null!==(n=ct())?e=[e,t,n]:(e=null,b=r);return e},CSeq_value:Rt,Expires:function(){var e,t;t=b,null!==(e=vt())&&(e=void(Fn=e));null===e&&(b=t);return e},Event:function(){var e,t,n,r,i,a,o;if(a=i=b,null!==(e=Nt())){for(t=[],o=b,null!==(n=j())&&null!==(r=wt())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=j())&&null!==(r=wt())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;null!==e&&(s=e[0],e=void(Fn.event=s.join("").toLowerCase()));var s;null===e&&(b=i);return e},event_type:Nt,From:function(){var e,t,n,r,i,a,o;a=i=b,null===(e=K())&&(e=pt());if(null!==e){for(t=[],o=b,null!==(n=j())&&null!==(r=Lt())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=j())&&null!==(r=Lt())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;null!==e&&(e=function(e){var t=Fn.tag;try{Fn=new Ln(Fn.uri,Fn.display_name,Fn.params),t&&Fn.setParam("tag",t)}catch(e){Fn=-1}}());null===e&&(b=i);return e},from_param:Lt,tag_param:Ft,Max_Forwards:function(){var e,t,n;if(n=b,null!==(t=l()))for(e=[];null!==t;)e.push(t),t=l();else e=null;null!==e&&(e=void(Fn=parseInt(e.join(""))));null===e&&(b=n);return e},Min_Expires:function(){var e,t;t=b,null!==(e=vt())&&(e=void(Fn=e));null===e&&(b=t);return e},Name_Addr_Header:function(){var e,t,n,r,i,a,o,s,c,l;c=s=b,e=[],t=mt();for(;null!==t;)e.push(t),t=mt();if(null!==e)if(null!==(t=F()))if(null!==(n=Q()))if(null!==(r=L())){for(i=[],l=b,null!==(a=j())&&null!==(o=wt())?a=[a,o]:(a=null,b=l);null!==a;)i.push(a),l=b,null!==(a=j())&&null!==(o=wt())?a=[a,o]:(a=null,b=l);null!==i?e=[e,t,n,r,i]:(e=null,b=c)}else e=null,b=c;else e=null,b=c;else e=null,b=c;else e=null,b=c;null!==e&&(e=function(e){try{Fn=new Ln(Fn.uri,Fn.display_name,Fn.params)}catch(e){Fn=-1}}());null===e&&(b=s);return e},Proxy_Authenticate:function(){return Gt()},challenge:Gt,other_challenge:jt,auth_param:Bt,digest_cln:Ut,realm:Ht,realm_value:Wt,domain:qt,URI:zt,nonce:Vt,nonce_value:Yt,opaque:Kt,stale:Qt,algorithm:Xt,qop_options:Zt,qop_value:Jt,Proxy_Require:function(){var e,t,n,r,i,a;if(i=b,null!==(e=D())){for(t=[],a=b,null!==(n=G())&&null!==(r=D())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=G())&&null!==(r=D())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},Record_Route:function(){var e,t,n,r,i,a,o;if(a=i=b,null!==(e=en())){for(t=[],o=b,null!==(n=G())&&null!==(r=en())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=G())&&null!==(r=en())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;null!==e&&(e=function(e){var t,n;for(n=Fn.multi_header.length,t=0;t<n;t++)if(null===Fn.multi_header[t].parsed){Fn=null;break}Fn=null!==Fn?Fn.multi_header:-1}());null===e&&(b=i);return e},rec_route:en,Reason:function(){var e,t,n,r,i,a,o;a=i=b,"sip"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"SIP"'));null===e&&(e=D());if(null!==e){for(t=[],o=b,null!==(n=j())&&null!==(r=tn())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=j())&&null!==(r=tn())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;null!==e&&(e=function(e,t){if(Fn.protocol=t.toLowerCase(),Fn.params||(Fn.params={}),Fn.params.text&&'"'===Fn.params.text[0]){var n=Fn.params.text;Fn.text=n.substring(1,n.length-1),delete Fn.params.text}}(0,e[0]));null===e&&(b=i);return e},reason_param:tn,reason_cause:nn,Require:function(){var e,t,n,r,i,a;if(i=b,null!==(e=D())){for(t=[],a=b,null!==(n=G())&&null!==(r=D())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=G())&&null!==(r=D())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},Route:function(){var e,t,n,r,i,a;if(i=b,null!==(e=rn())){for(t=[],a=b,null!==(n=G())&&null!==(r=rn())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=G())&&null!==(r=rn())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},route_param:rn,Subscription_State:function(){var e,t,n,r,i,a;if(i=b,null!==(e=an())){for(t=[],a=b,null!==(n=j())&&null!==(r=on())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=j())&&null!==(r=on())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},substate_value:an,subexp_params:on,event_reason_value:sn,Subject:function(){var e;return e=null!==(e=T())?e:""},Supported:function(){var e,t,n,r,i,a;if(i=b,null!==(e=D())){for(t=[],a=b,null!==(n=G())&&null!==(r=D())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=G())&&null!==(r=D())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e=null!==e?e:""},To:function(){var e,t,n,r,i,a,o;a=i=b,null===(e=K())&&(e=pt());if(null!==e){for(t=[],o=b,null!==(n=j())&&null!==(r=cn())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=j())&&null!==(r=cn())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;null!==e&&(e=function(e){var t=Fn.tag;try{Fn=new Ln(Fn.uri,Fn.display_name,Fn.params),t&&Fn.setParam("tag",t)}catch(e){Fn=-1}}());null===e&&(b=i);return e},to_param:cn,Via:function(){var e,t,n,r,i,a;if(i=b,null!==(e=ln())){for(t=[],a=b,null!==(n=G())&&null!==(r=ln())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=G())&&null!==(r=ln())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},via_param:ln,via_params:un,via_ttl:fn,via_maddr:dn,via_received:hn,via_branch:pn,response_port:mn,sent_protocol:gn,protocol_name:_n,transport:bn,sent_by:vn,via_host:yn,via_port:wn,ttl:Cn,WWW_Authenticate:function(){return Gt()},Session_Expires:function(){var e,t,n,r,i,a;if(i=b,null!==(e=An())){for(t=[],a=b,null!==(n=j())&&null!==(r=Sn())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=j())&&null!==(r=Sn())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},s_e_expires:An,s_e_params:Sn,s_e_refresher:Tn,extension_header:function(){var e,t,n,r;r=b,null!==(e=D())&&null!==(t=S())&&null!==(n=xn())?e=[e,t,n]:(e=null,b=r);return e},header_value:xn,message_body:function(){var e,t;e=[],t=n();for(;null!==t;)e.push(t),t=n();return e},uuid_URI:function(){var e,t,n;n=b,"uuid:"===_.substr(b,5)?(e="uuid:",b+=5):(e=null,0===v&&y('"uuid:"'));null!==e&&null!==(t=kn())?e=[e,t]:(e=null,b=n);return e},uuid:kn,hex4:En,hex8:Dn,hex12:In,Refer_To:function(){var e,t,n,r,i,a,o;a=i=b,null===(e=K())&&(e=pt());if(null!==e){for(t=[],o=b,null!==(n=j())&&null!==(r=wt())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=j())&&null!==(r=wt())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;null!==e&&(e=function(e){try{Fn=new Ln(Fn.uri,Fn.display_name,Fn.params)}catch(e){Fn=-1}}());null===e&&(b=i);return e},Replaces:function(){var e,t,n,r,i,a;if(i=b,null!==(e=Pn())){for(t=[],a=b,null!==(n=j())&&null!==(r=Mn())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=j())&&null!==(r=Mn())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e},call_id:Pn,replaces_param:Mn,to_tag:$n,from_tag:On,early_flag:Rn};if(void 0!==c){if(void 0===e[c])throw new Error("Invalid rule name: "+Un(c)+".")}else c="CRLF";var b=0,v=0,a=0,t=[];function y(e){b<a||(a<b&&(a=b,t=[]),t.push(e))}function o(){var e;return"\r\n"===_.substr(b,2)?(e="\r\n",b+=2):(e=null,0===v&&y('"\\r\\n"')),e}function l(){var e;return/^[0-9]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[0-9]")),e}function s(){var e;return/^[a-zA-Z]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[a-zA-Z]")),e}function u(){var e;return/^[0-9a-fA-F]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[0-9a-fA-F]")),e}function f(){var e;return null===(e=h())&&(e=p()),e}function n(){var e;return/^[\0-\xFF]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[\\0-\\xFF]")),e}function d(){var e;return/^["]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y('["]')),e}function h(){var e;return 32===_.charCodeAt(b)?(e=" ",b++):(e=null,0===v&&y('" "')),e}function p(){var e;return 9===_.charCodeAt(b)?(e="\t",b++):(e=null,0===v&&y('"\\t"')),e}function i(){var e;return/^[a-zA-Z0-9]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[a-zA-Z0-9]")),e}function m(){var e;return 59===_.charCodeAt(b)?(e=";",b++):(e=null,0===v&&y('";"')),null===e&&(47===_.charCodeAt(b)?(e="/",b++):(e=null,0===v&&y('"/"')),null===e&&(63===_.charCodeAt(b)?(e="?",b++):(e=null,0===v&&y('"?"')),null===e&&(58===_.charCodeAt(b)?(e=":",b++):(e=null,0===v&&y('":"')),null===e&&(64===_.charCodeAt(b)?(e="@",b++):(e=null,0===v&&y('"@"')),null===e&&(38===_.charCodeAt(b)?(e="&",b++):(e=null,0===v&&y('"&"')),null===e&&(61===_.charCodeAt(b)?(e="=",b++):(e=null,0===v&&y('"="')),null===e&&(43===_.charCodeAt(b)?(e="+",b++):(e=null,0===v&&y('"+"')),null===e&&(36===_.charCodeAt(b)?(e="$",b++):(e=null,0===v&&y('"$"')),null===e&&(44===_.charCodeAt(b)?(e=",",b++):(e=null,0===v&&y('","'))))))))))),e}function g(){var e;return null===(e=i())&&(e=r()),e}function r(){var e;return 45===_.charCodeAt(b)?(e="-",b++):(e=null,0===v&&y('"-"')),null===e&&(95===_.charCodeAt(b)?(e="_",b++):(e=null,0===v&&y('"_"')),null===e&&(46===_.charCodeAt(b)?(e=".",b++):(e=null,0===v&&y('"."')),null===e&&(33===_.charCodeAt(b)?(e="!",b++):(e=null,0===v&&y('"!"')),null===e&&(126===_.charCodeAt(b)?(e="~",b++):(e=null,0===v&&y('"~"')),null===e&&(42===_.charCodeAt(b)?(e="*",b++):(e=null,0===v&&y('"*"')),null===e&&(39===_.charCodeAt(b)?(e="'",b++):(e=null,0===v&&y('"\'"')),null===e&&(40===_.charCodeAt(b)?(e="(",b++):(e=null,0===v&&y('"("')),null===e&&(41===_.charCodeAt(b)?(e=")",b++):(e=null,0===v&&y('")"')))))))))),e}function w(){var e,t,n,r,i;return i=r=b,37===_.charCodeAt(b)?(e="%",b++):(e=null,0===v&&y('"%"')),null!==e&&null!==(t=u())&&null!==(n=u())?e=[e,t,n]:(e=null,b=i),null!==e&&(e=e.join("")),null===e&&(b=r),e}function C(){var e,t,n,r,i,a;for(a=i=r=b,e=[],t=f();null!==t;)e.push(t),t=f();if(null!==e&&null!==(t=o())?e=[e,t]:(e=null,b=a),null!==(e=null!==e?e:"")){if(null!==(n=f()))for(t=[];null!==n;)t.push(n),n=f();else t=null;null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return null!==e&&(e=" "),null===e&&(b=r),e}function A(){var e;return e=null!==(e=C())?e:""}function S(){var e,t,n,r,i;for(i=r=b,e=[],null===(t=h())&&(t=p());null!==t;)e.push(t),null===(t=h())&&(t=p());return null!==e?(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e=":"),null===e&&(b=r),e}function T(){var e,t,n,r,i,a,o,s;if(a=i=b,null!==(t=x()))for(e=[];null!==t;)e.push(t),t=x();else e=null;if(null!==e){for(t=[],o=b,n=[],r=C();null!==r;)n.push(r),r=C();for(null!==n&&null!==(r=x())?n=[n,r]:(n=null,b=o);null!==n;){for(t.push(n),o=b,n=[],r=C();null!==r;)n.push(r),r=C();null!==n&&null!==(r=x())?n=[n,r]:(n=null,b=o)}null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;return null!==e&&(s=i,e=_.substring(b,s)),null===e&&(b=i),e}function x(){var e;return/^[!-~]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[!-~]")),null===e&&(e=k()),e}function k(){var e;return/^[\x80-\uFFFF]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[\\x80-\\uFFFF]")),e}function E(){var e;return/^[\x80-\xBF]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[\\x80-\\xBF]")),e}function D(){var e,t,n,r;if(n=b,null===(t=i())&&(45===_.charCodeAt(b)?(t="-",b++):(t=null,0===v&&y('"-"')),null===t&&(46===_.charCodeAt(b)?(t=".",b++):(t=null,0===v&&y('"."')),null===t&&(33===_.charCodeAt(b)?(t="!",b++):(t=null,0===v&&y('"!"')),null===t&&(37===_.charCodeAt(b)?(t="%",b++):(t=null,0===v&&y('"%"')),null===t&&(42===_.charCodeAt(b)?(t="*",b++):(t=null,0===v&&y('"*"')),null===t&&(95===_.charCodeAt(b)?(t="_",b++):(t=null,0===v&&y('"_"')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')),null===t&&(96===_.charCodeAt(b)?(t="`",b++):(t=null,0===v&&y('"`"')),null===t&&(39===_.charCodeAt(b)?(t="'",b++):(t=null,0===v&&y('"\'"')),null===t&&(126===_.charCodeAt(b)?(t="~",b++):(t=null,0===v&&y('"~"')))))))))))),null!==t)for(e=[];null!==t;)e.push(t),null===(t=i())&&(45===_.charCodeAt(b)?(t="-",b++):(t=null,0===v&&y('"-"')),null===t&&(46===_.charCodeAt(b)?(t=".",b++):(t=null,0===v&&y('"."')),null===t&&(33===_.charCodeAt(b)?(t="!",b++):(t=null,0===v&&y('"!"')),null===t&&(37===_.charCodeAt(b)?(t="%",b++):(t=null,0===v&&y('"%"')),null===t&&(42===_.charCodeAt(b)?(t="*",b++):(t=null,0===v&&y('"*"')),null===t&&(95===_.charCodeAt(b)?(t="_",b++):(t=null,0===v&&y('"_"')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')),null===t&&(96===_.charCodeAt(b)?(t="`",b++):(t=null,0===v&&y('"`"')),null===t&&(39===_.charCodeAt(b)?(t="'",b++):(t=null,0===v&&y('"\'"')),null===t&&(126===_.charCodeAt(b)?(t="~",b++):(t=null,0===v&&y('"~"'))))))))))));else e=null;return null!==e&&(r=n,e=_.substring(b,r)),null===e&&(b=n),e}function I(){var e,t,n,r;if(n=b,null===(t=i())&&(45===_.charCodeAt(b)?(t="-",b++):(t=null,0===v&&y('"-"')),null===t&&(33===_.charCodeAt(b)?(t="!",b++):(t=null,0===v&&y('"!"')),null===t&&(37===_.charCodeAt(b)?(t="%",b++):(t=null,0===v&&y('"%"')),null===t&&(42===_.charCodeAt(b)?(t="*",b++):(t=null,0===v&&y('"*"')),null===t&&(95===_.charCodeAt(b)?(t="_",b++):(t=null,0===v&&y('"_"')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')),null===t&&(96===_.charCodeAt(b)?(t="`",b++):(t=null,0===v&&y('"`"')),null===t&&(39===_.charCodeAt(b)?(t="'",b++):(t=null,0===v&&y('"\'"')),null===t&&(126===_.charCodeAt(b)?(t="~",b++):(t=null,0===v&&y('"~"'))))))))))),null!==t)for(e=[];null!==t;)e.push(t),null===(t=i())&&(45===_.charCodeAt(b)?(t="-",b++):(t=null,0===v&&y('"-"')),null===t&&(33===_.charCodeAt(b)?(t="!",b++):(t=null,0===v&&y('"!"')),null===t&&(37===_.charCodeAt(b)?(t="%",b++):(t=null,0===v&&y('"%"')),null===t&&(42===_.charCodeAt(b)?(t="*",b++):(t=null,0===v&&y('"*"')),null===t&&(95===_.charCodeAt(b)?(t="_",b++):(t=null,0===v&&y('"_"')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')),null===t&&(96===_.charCodeAt(b)?(t="`",b++):(t=null,0===v&&y('"`"')),null===t&&(39===_.charCodeAt(b)?(t="'",b++):(t=null,0===v&&y('"\'"')),null===t&&(126===_.charCodeAt(b)?(t="~",b++):(t=null,0===v&&y('"~"')))))))))));else e=null;return null!==e&&(r=n,e=_.substring(b,r)),null===e&&(b=n),e}function P(){var e,t,n,r;if(n=b,null===(t=i())&&(45===_.charCodeAt(b)?(t="-",b++):(t=null,0===v&&y('"-"')),null===t&&(46===_.charCodeAt(b)?(t=".",b++):(t=null,0===v&&y('"."')),null===t&&(33===_.charCodeAt(b)?(t="!",b++):(t=null,0===v&&y('"!"')),null===t&&(37===_.charCodeAt(b)?(t="%",b++):(t=null,0===v&&y('"%"')),null===t&&(42===_.charCodeAt(b)?(t="*",b++):(t=null,0===v&&y('"*"')),null===t&&(95===_.charCodeAt(b)?(t="_",b++):(t=null,0===v&&y('"_"')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')),null===t&&(96===_.charCodeAt(b)?(t="`",b++):(t=null,0===v&&y('"`"')),null===t&&(39===_.charCodeAt(b)?(t="'",b++):(t=null,0===v&&y('"\'"')),null===t&&(126===_.charCodeAt(b)?(t="~",b++):(t=null,0===v&&y('"~"')),null===t&&(40===_.charCodeAt(b)?(t="(",b++):(t=null,0===v&&y('"("')),null===t&&(41===_.charCodeAt(b)?(t=")",b++):(t=null,0===v&&y('")"')),null===t&&(60===_.charCodeAt(b)?(t="<",b++):(t=null,0===v&&y('"<"')),null===t&&(62===_.charCodeAt(b)?(t=">",b++):(t=null,0===v&&y('">"')),null===t&&(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null===t&&(92===_.charCodeAt(b)?(t="\\",b++):(t=null,0===v&&y('"\\\\"')),null===t&&null===(t=d())&&(47===_.charCodeAt(b)?(t="/",b++):(t=null,0===v&&y('"/"')),null===t&&(91===_.charCodeAt(b)?(t="[",b++):(t=null,0===v&&y('"["')),null===t&&(93===_.charCodeAt(b)?(t="]",b++):(t=null,0===v&&y('"]"')),null===t&&(63===_.charCodeAt(b)?(t="?",b++):(t=null,0===v&&y('"?"')),null===t&&(123===_.charCodeAt(b)?(t="{",b++):(t=null,0===v&&y('"{"')),null===t&&(125===_.charCodeAt(b)?(t="}",b++):(t=null,0===v&&y('"}"')))))))))))))))))))))))),null!==t)for(e=[];null!==t;)e.push(t),null===(t=i())&&(45===_.charCodeAt(b)?(t="-",b++):(t=null,0===v&&y('"-"')),null===t&&(46===_.charCodeAt(b)?(t=".",b++):(t=null,0===v&&y('"."')),null===t&&(33===_.charCodeAt(b)?(t="!",b++):(t=null,0===v&&y('"!"')),null===t&&(37===_.charCodeAt(b)?(t="%",b++):(t=null,0===v&&y('"%"')),null===t&&(42===_.charCodeAt(b)?(t="*",b++):(t=null,0===v&&y('"*"')),null===t&&(95===_.charCodeAt(b)?(t="_",b++):(t=null,0===v&&y('"_"')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')),null===t&&(96===_.charCodeAt(b)?(t="`",b++):(t=null,0===v&&y('"`"')),null===t&&(39===_.charCodeAt(b)?(t="'",b++):(t=null,0===v&&y('"\'"')),null===t&&(126===_.charCodeAt(b)?(t="~",b++):(t=null,0===v&&y('"~"')),null===t&&(40===_.charCodeAt(b)?(t="(",b++):(t=null,0===v&&y('"("')),null===t&&(41===_.charCodeAt(b)?(t=")",b++):(t=null,0===v&&y('")"')),null===t&&(60===_.charCodeAt(b)?(t="<",b++):(t=null,0===v&&y('"<"')),null===t&&(62===_.charCodeAt(b)?(t=">",b++):(t=null,0===v&&y('">"')),null===t&&(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null===t&&(92===_.charCodeAt(b)?(t="\\",b++):(t=null,0===v&&y('"\\\\"')),null===t&&null===(t=d())&&(47===_.charCodeAt(b)?(t="/",b++):(t=null,0===v&&y('"/"')),null===t&&(91===_.charCodeAt(b)?(t="[",b++):(t=null,0===v&&y('"["')),null===t&&(93===_.charCodeAt(b)?(t="]",b++):(t=null,0===v&&y('"]"')),null===t&&(63===_.charCodeAt(b)?(t="?",b++):(t=null,0===v&&y('"?"')),null===t&&(123===_.charCodeAt(b)?(t="{",b++):(t=null,0===v&&y('"{"')),null===t&&(125===_.charCodeAt(b)?(t="}",b++):(t=null,0===v&&y('"}"'))))))))))))))))))))))));else e=null;return null!==e&&(r=n,e=_.substring(b,r)),null===e&&(b=n),e}function M(){var e,t,n,r,i;return i=r=b,null!==(e=A())?(42===_.charCodeAt(b)?(t="*",b++):(t=null,0===v&&y('"*"')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e="*"),null===e&&(b=r),e}function $(){var e,t,n,r,i;return i=r=b,null!==(e=A())?(47===_.charCodeAt(b)?(t="/",b++):(t=null,0===v&&y('"/"')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e="/"),null===e&&(b=r),e}function O(){var e,t,n,r,i;return i=r=b,null!==(e=A())?(61===_.charCodeAt(b)?(t="=",b++):(t=null,0===v&&y('"="')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e="="),null===e&&(b=r),e}function R(){var e,t,n,r,i;return i=r=b,null!==(e=A())?(40===_.charCodeAt(b)?(t="(",b++):(t=null,0===v&&y('"("')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e="("),null===e&&(b=r),e}function N(){var e,t,n,r,i;return i=r=b,null!==(e=A())?(41===_.charCodeAt(b)?(t=")",b++):(t=null,0===v&&y('")"')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e=")"),null===e&&(b=r),e}function L(){var e,t,n,r;return r=n=b,62===_.charCodeAt(b)?(e=">",b++):(e=null,0===v&&y('">"')),null!==e&&null!==(t=A())?e=[e,t]:(e=null,b=r),null!==e&&(e=">"),null===e&&(b=n),e}function F(){var e,t,n,r;return r=n=b,null!==(e=A())?(60===_.charCodeAt(b)?(t="<",b++):(t=null,0===v&&y('"<"')),null!==t?e=[e,t]:(e=null,b=r)):(e=null,b=r),null!==e&&(e="<"),null===e&&(b=n),e}function G(){var e,t,n,r,i;return i=r=b,null!==(e=A())?(44===_.charCodeAt(b)?(t=",",b++):(t=null,0===v&&y('","')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e=","),null===e&&(b=r),e}function j(){var e,t,n,r,i;return i=r=b,null!==(e=A())?(59===_.charCodeAt(b)?(t=";",b++):(t=null,0===v&&y('";"')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e=";"),null===e&&(b=r),e}function B(){var e,t,n,r,i;return i=r=b,null!==(e=A())?(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=A())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(e=":"),null===e&&(b=r),e}function U(){var e,t,n,r;return r=n=b,null!==(e=A())&&null!==(t=d())?e=[e,t]:(e=null,b=r),null!==e&&(e='"'),null===e&&(b=n),e}function H(){var e,t,n,r;return r=n=b,null!==(e=d())&&null!==(t=A())?e=[e,t]:(e=null,b=r),null!==e&&(e='"'),null===e&&(b=n),e}function W(){var e;return/^[!-']/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[!-']")),null===e&&(/^[*-[]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[*-[]")),null===e&&(/^[\]-~]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[\\]-~]")),null===e&&null===(e=k())&&(e=C()))),e}function q(){var e,t,n,r,i,a,o;if(a=i=b,null!==(e=A()))if(null!==(t=d())){for(n=[],null===(r=V())&&(r=Y());null!==r;)n.push(r),null===(r=V())&&(r=Y());null!==n&&null!==(r=d())?e=[e,t,n,r]:(e=null,b=a)}else e=null,b=a;else e=null,b=a;return null!==e&&(o=i,e=_.substring(b,o)),null===e&&(b=i),e}function z(){var e,t,n,r,i,a,o;if(a=i=b,null!==(e=A()))if(null!==(t=d())){for(n=[],null===(r=V())&&(r=Y());null!==r;)n.push(r),null===(r=V())&&(r=Y());null!==n&&null!==(r=d())?e=[e,t,n,r]:(e=null,b=a)}else e=null,b=a;else e=null,b=a;return null!==e&&(o=i,e=_.substring(b-1,o+1)),null===e&&(b=i),e}function V(){var e;return null===(e=C())&&(33===_.charCodeAt(b)?(e="!",b++):(e=null,0===v&&y('"!"')),null===e&&(/^[#-[]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[#-[]")),null===e&&(/^[\]-~]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[\\]-~]")),null===e&&(e=k())))),e}function Y(){var e,t,n;return n=b,92===_.charCodeAt(b)?(e="\\",b++):(e=null,0===v&&y('"\\\\"')),null!==e?(/^[\0-\t]/.test(_.charAt(b))?(t=_.charAt(b),b++):(t=null,0===v&&y("[\\0-\\t]")),null===t&&(/^[\x0B-\f]/.test(_.charAt(b))?(t=_.charAt(b),b++):(t=null,0===v&&y("[\\x0B-\\f]")),null===t&&(/^[\x0E-\7f]/.test(_.charAt(b))?(t=_.charAt(b),b++):(t=null,0===v&&y("[\\x0E-\7f]")))),null!==t?e=[e,t]:(e=null,b=n)):(e=null,b=n),e}function K(){var e,t,n,r,i,a;return a=i=b,null!==(e=X())?(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=null!==(n=ee())?n:"")&&null!==(r=ie())?e=[e,t,n,r]:(e=null,b=a)):(e=null,b=a),null!==e&&(e=function(e){try{Fn.uri=new Nn(Fn.scheme,Fn.user,Fn.host,Fn.port),delete Fn.scheme,delete Fn.user,delete Fn.host,delete Fn.host_type,delete Fn.port}catch(e){Fn=-1}}()),null===e&&(b=i),e}function Q(){var e,t,n,r,i,a,o,s;return s=o=b,null!==(e=X())?(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=null!==(n=ee())?n:"")&&null!==(r=ie())&&null!==(i=ge())&&null!==(a=null!==(a=De())?a:"")?e=[e,t,n,r,i,a]:(e=null,b=s)):(e=null,b=s),null!==e&&(e=function(e){try{Fn.uri=new Nn(Fn.scheme,Fn.user,Fn.host,Fn.port,Fn.uri_params,Fn.uri_headers),delete Fn.scheme,delete Fn.user,delete Fn.host,delete Fn.host_type,delete Fn.port,delete Fn.uri_params,"SIP_URI"===c&&(Fn=Fn.uri)}catch(e){Fn=-1}}()),null===e&&(b=o),e}function X(){var e;return null===(e=Z())&&(e=J()),e}function Z(){var e,t,n;return t=b,"sips"===_.substr(b,4).toLowerCase()?(e=_.substr(b,4),b+=4):(e=null,0===v&&y('"sips"')),null!==e&&(n=e,e=void(Fn.scheme=n.toLowerCase())),null===e&&(b=t),e}function J(){var e,t,n;return t=b,"sip"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"sip"')),null!==e&&(n=e,e=void(Fn.scheme=n.toLowerCase())),null===e&&(b=t),e}function ee(){var e,t,n,r,i,a,o;return i=r=b,null!==(e=te())?(a=b,58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=re())?t=[t,n]:(t=null,b=a),null!==(t=null!==t?t:"")?(64===_.charCodeAt(b)?(n="@",b++):(n=null,0===v&&y('"@"')),null!==n?e=[e,t,n]:(e=null,b=i)):(e=null,b=i)):(e=null,b=i),null!==e&&(o=r,e=void(Fn.user=decodeURIComponent(_.substring(b-1,o)))),null===e&&(b=r),e}function te(){var e,t;if(null===(t=g())&&null===(t=w())&&(t=ne()),null!==t)for(e=[];null!==t;)e.push(t),null===(t=g())&&null===(t=w())&&(t=ne());else e=null;return e}function ne(){var e;return 38===_.charCodeAt(b)?(e="&",b++):(e=null,0===v&&y('"&"')),null===e&&(61===_.charCodeAt(b)?(e="=",b++):(e=null,0===v&&y('"="')),null===e&&(43===_.charCodeAt(b)?(e="+",b++):(e=null,0===v&&y('"+"')),null===e&&(36===_.charCodeAt(b)?(e="$",b++):(e=null,0===v&&y('"$"')),null===e&&(44===_.charCodeAt(b)?(e=",",b++):(e=null,0===v&&y('","')),null===e&&(59===_.charCodeAt(b)?(e=";",b++):(e=null,0===v&&y('";"')),null===e&&(63===_.charCodeAt(b)?(e="?",b++):(e=null,0===v&&y('"?"')),null===e&&(47===_.charCodeAt(b)?(e="/",b++):(e=null,0===v&&y('"/"'))))))))),e}function re(){var e,t,n,r;for(n=b,e=[],null===(t=g())&&null===(t=w())&&(38===_.charCodeAt(b)?(t="&",b++):(t=null,0===v&&y('"&"')),null===t&&(61===_.charCodeAt(b)?(t="=",b++):(t=null,0===v&&y('"="')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')),null===t&&(36===_.charCodeAt(b)?(t="$",b++):(t=null,0===v&&y('"$"')),null===t&&(44===_.charCodeAt(b)?(t=",",b++):(t=null,0===v&&y('","')))))));null!==t;)e.push(t),null===(t=g())&&null===(t=w())&&(38===_.charCodeAt(b)?(t="&",b++):(t=null,0===v&&y('"&"')),null===t&&(61===_.charCodeAt(b)?(t="=",b++):(t=null,0===v&&y('"="')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')),null===t&&(36===_.charCodeAt(b)?(t="$",b++):(t=null,0===v&&y('"$"')),null===t&&(44===_.charCodeAt(b)?(t=",",b++):(t=null,0===v&&y('","')))))));return null!==e&&(r=n,e=void(Fn.password=_.substring(b,r))),null===e&&(b=n),e}function ie(){var e,t,n,r,i;return r=b,null!==(e=ae())?(i=b,58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=me())?t=[t,n]:(t=null,b=i),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=r)):(e=null,b=r),e}function ae(){var e,t,n;return t=b,null===(e=oe())&&null===(e=he())&&(e=le()),null!==e&&(n=t,Fn.host=_.substring(b,n).toLowerCase(),e=Fn.host),null===e&&(b=t),e}function oe(){var e,t,n,r,i,a,o;for(e=[],a=i=r=b,null!==(t=se())?(46===_.charCodeAt(b)?(n=".",b++):(n=null,0===v&&y('"."')),null!==n?t=[t,n]:(t=null,b=a)):(t=null,b=a);null!==t;)e.push(t),a=b,null!==(t=se())?(46===_.charCodeAt(b)?(n=".",b++):(n=null,0===v&&y('"."')),null!==n?t=[t,n]:(t=null,b=a)):(t=null,b=a);return null!==e&&null!==(t=ce())?(46===_.charCodeAt(b)?(n=".",b++):(n=null,0===v&&y('"."')),null!==(n=null!==n?n:"")?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(o=r,Fn.host_type="domain",e=_.substring(b,o)),null===e&&(b=r),e}function se(){var e,t,n,r;if(r=b,null!==(e=i())){for(t=[],null===(n=i())&&(45===_.charCodeAt(b)?(n="-",b++):(n=null,0===v&&y('"-"')),null===n&&(95===_.charCodeAt(b)?(n="_",b++):(n=null,0===v&&y('"_"'))));null!==n;)t.push(n),null===(n=i())&&(45===_.charCodeAt(b)?(n="-",b++):(n=null,0===v&&y('"-"')),null===n&&(95===_.charCodeAt(b)?(n="_",b++):(n=null,0===v&&y('"_"'))));null!==t?e=[e,t]:(e=null,b=r)}else e=null,b=r;return e}function ce(){var e,t,n,r;if(r=b,null!==(e=s())){for(t=[],null===(n=i())&&(45===_.charCodeAt(b)?(n="-",b++):(n=null,0===v&&y('"-"')),null===n&&(95===_.charCodeAt(b)?(n="_",b++):(n=null,0===v&&y('"_"'))));null!==n;)t.push(n),null===(n=i())&&(45===_.charCodeAt(b)?(n="-",b++):(n=null,0===v&&y('"-"')),null===n&&(95===_.charCodeAt(b)?(n="_",b++):(n=null,0===v&&y('"_"'))));null!==t?e=[e,t]:(e=null,b=r)}else e=null,b=r;return e}function le(){var e,t,n,r,i,a;return i=r=b,91===_.charCodeAt(b)?(e="[",b++):(e=null,0===v&&y('"["')),null!==e&&null!==(t=ue())?(93===_.charCodeAt(b)?(n="]",b++):(n=null,0===v&&y('"]"')),null!==n?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(a=r,Fn.host_type="IPv6",e=_.substring(b,a)),null===e&&(b=r),e}function ue(){var e,t,n,r,i,a,o,s,c,l,u,f,d,h,p,m,g;return p=h=b,null!==(e=fe())?(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=fe())?(58===_.charCodeAt(b)?(r=":",b++):(r=null,0===v&&y('":"')),null!==r&&null!==(i=fe())?(58===_.charCodeAt(b)?(a=":",b++):(a=null,0===v&&y('":"')),null!==a&&null!==(o=fe())?(58===_.charCodeAt(b)?(s=":",b++):(s=null,0===v&&y('":"')),null!==s&&null!==(c=fe())?(58===_.charCodeAt(b)?(l=":",b++):(l=null,0===v&&y('":"')),null!==l&&null!==(u=fe())?(58===_.charCodeAt(b)?(f=":",b++):(f=null,0===v&&y('":"')),null!==f&&null!==(d=de())?e=[e,t,n,r,i,a,o,s,c,l,u,f,d]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,"::"===_.substr(b,2)?(e="::",b+=2):(e=null,0===v&&y('"::"')),null!==e&&null!==(t=fe())?(58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?(58===_.charCodeAt(b)?(i=":",b++):(i=null,0===v&&y('":"')),null!==i&&null!==(a=fe())?(58===_.charCodeAt(b)?(o=":",b++):(o=null,0===v&&y('":"')),null!==o&&null!==(s=fe())?(58===_.charCodeAt(b)?(c=":",b++):(c=null,0===v&&y('":"')),null!==c&&null!==(l=fe())?(58===_.charCodeAt(b)?(u=":",b++):(u=null,0===v&&y('":"')),null!==u&&null!==(f=de())?e=[e,t,n,r,i,a,o,s,c,l,u,f]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,"::"===_.substr(b,2)?(e="::",b+=2):(e=null,0===v&&y('"::"')),null!==e&&null!==(t=fe())?(58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?(58===_.charCodeAt(b)?(i=":",b++):(i=null,0===v&&y('":"')),null!==i&&null!==(a=fe())?(58===_.charCodeAt(b)?(o=":",b++):(o=null,0===v&&y('":"')),null!==o&&null!==(s=fe())?(58===_.charCodeAt(b)?(c=":",b++):(c=null,0===v&&y('":"')),null!==c&&null!==(l=de())?e=[e,t,n,r,i,a,o,s,c,l]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,"::"===_.substr(b,2)?(e="::",b+=2):(e=null,0===v&&y('"::"')),null!==e&&null!==(t=fe())?(58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?(58===_.charCodeAt(b)?(i=":",b++):(i=null,0===v&&y('":"')),null!==i&&null!==(a=fe())?(58===_.charCodeAt(b)?(o=":",b++):(o=null,0===v&&y('":"')),null!==o&&null!==(s=de())?e=[e,t,n,r,i,a,o,s]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,"::"===_.substr(b,2)?(e="::",b+=2):(e=null,0===v&&y('"::"')),null!==e&&null!==(t=fe())?(58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?(58===_.charCodeAt(b)?(i=":",b++):(i=null,0===v&&y('":"')),null!==i&&null!==(a=de())?e=[e,t,n,r,i,a]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,"::"===_.substr(b,2)?(e="::",b+=2):(e=null,0===v&&y('"::"')),null!==e&&null!==(t=fe())?(58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=de())?e=[e,t,n,r]:(e=null,b=p)):(e=null,b=p),null===e&&(p=b,"::"===_.substr(b,2)?(e="::",b+=2):(e=null,0===v&&y('"::"')),null!==e&&null!==(t=de())?e=[e,t]:(e=null,b=p),null===e&&(p=b,"::"===_.substr(b,2)?(e="::",b+=2):(e=null,0===v&&y('"::"')),null!==e&&null!==(t=fe())?e=[e,t]:(e=null,b=p),null===e&&(p=b,null!==(e=fe())?("::"===_.substr(b,2)?(t="::",b+=2):(t=null,0===v&&y('"::"')),null!==t&&null!==(n=fe())?(58===_.charCodeAt(b)?(r=":",b++):(r=null,0===v&&y('":"')),null!==r&&null!==(i=fe())?(58===_.charCodeAt(b)?(a=":",b++):(a=null,0===v&&y('":"')),null!==a&&null!==(o=fe())?(58===_.charCodeAt(b)?(s=":",b++):(s=null,0===v&&y('":"')),null!==s&&null!==(c=fe())?(58===_.charCodeAt(b)?(l=":",b++):(l=null,0===v&&y('":"')),null!==l&&null!==(u=de())?e=[e,t,n,r,i,a,o,s,c,l,u]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,null!==(e=fe())?(m=b,58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=fe())?t=[t,n]:(t=null,b=m),null!==(t=null!==t?t:"")?("::"===_.substr(b,2)?(n="::",b+=2):(n=null,0===v&&y('"::"')),null!==n&&null!==(r=fe())?(58===_.charCodeAt(b)?(i=":",b++):(i=null,0===v&&y('":"')),null!==i&&null!==(a=fe())?(58===_.charCodeAt(b)?(o=":",b++):(o=null,0===v&&y('":"')),null!==o&&null!==(s=fe())?(58===_.charCodeAt(b)?(c=":",b++):(c=null,0===v&&y('":"')),null!==c&&null!==(l=de())?e=[e,t,n,r,i,a,o,s,c,l]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,null!==(e=fe())?(m=b,58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=fe())?t=[t,n]:(t=null,b=m),null!==(t=null!==t?t:"")?(m=b,58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?n=[n,r]:(n=null,b=m),null!==(n=null!==n?n:"")?("::"===_.substr(b,2)?(r="::",b+=2):(r=null,0===v&&y('"::"')),null!==r&&null!==(i=fe())?(58===_.charCodeAt(b)?(a=":",b++):(a=null,0===v&&y('":"')),null!==a&&null!==(o=fe())?(58===_.charCodeAt(b)?(s=":",b++):(s=null,0===v&&y('":"')),null!==s&&null!==(c=de())?e=[e,t,n,r,i,a,o,s,c]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,null!==(e=fe())?(m=b,58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=fe())?t=[t,n]:(t=null,b=m),null!==(t=null!==t?t:"")?(m=b,58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?n=[n,r]:(n=null,b=m),null!==(n=null!==n?n:"")?(m=b,58===_.charCodeAt(b)?(r=":",b++):(r=null,0===v&&y('":"')),null!==r&&null!==(i=fe())?r=[r,i]:(r=null,b=m),null!==(r=null!==r?r:"")?("::"===_.substr(b,2)?(i="::",b+=2):(i=null,0===v&&y('"::"')),null!==i&&null!==(a=fe())?(58===_.charCodeAt(b)?(o=":",b++):(o=null,0===v&&y('":"')),null!==o&&null!==(s=de())?e=[e,t,n,r,i,a,o,s]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,null!==(e=fe())?(m=b,58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=fe())?t=[t,n]:(t=null,b=m),null!==(t=null!==t?t:"")?(m=b,58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?n=[n,r]:(n=null,b=m),null!==(n=null!==n?n:"")?(m=b,58===_.charCodeAt(b)?(r=":",b++):(r=null,0===v&&y('":"')),null!==r&&null!==(i=fe())?r=[r,i]:(r=null,b=m),null!==(r=null!==r?r:"")?(m=b,58===_.charCodeAt(b)?(i=":",b++):(i=null,0===v&&y('":"')),null!==i&&null!==(a=fe())?i=[i,a]:(i=null,b=m),null!==(i=null!==i?i:"")?("::"===_.substr(b,2)?(a="::",b+=2):(a=null,0===v&&y('"::"')),null!==a&&null!==(o=de())?e=[e,t,n,r,i,a,o]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,null!==(e=fe())?(m=b,58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=fe())?t=[t,n]:(t=null,b=m),null!==(t=null!==t?t:"")?(m=b,58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?n=[n,r]:(n=null,b=m),null!==(n=null!==n?n:"")?(m=b,58===_.charCodeAt(b)?(r=":",b++):(r=null,0===v&&y('":"')),null!==r&&null!==(i=fe())?r=[r,i]:(r=null,b=m),null!==(r=null!==r?r:"")?(m=b,58===_.charCodeAt(b)?(i=":",b++):(i=null,0===v&&y('":"')),null!==i&&null!==(a=fe())?i=[i,a]:(i=null,b=m),null!==(i=null!==i?i:"")?(m=b,58===_.charCodeAt(b)?(a=":",b++):(a=null,0===v&&y('":"')),null!==a&&null!==(o=fe())?a=[a,o]:(a=null,b=m),null!==(a=null!==a?a:"")?("::"===_.substr(b,2)?(o="::",b+=2):(o=null,0===v&&y('"::"')),null!==o&&null!==(s=fe())?e=[e,t,n,r,i,a,o,s]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p),null===e&&(p=b,null!==(e=fe())?(m=b,58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=fe())?t=[t,n]:(t=null,b=m),null!==(t=null!==t?t:"")?(m=b,58===_.charCodeAt(b)?(n=":",b++):(n=null,0===v&&y('":"')),null!==n&&null!==(r=fe())?n=[n,r]:(n=null,b=m),null!==(n=null!==n?n:"")?(m=b,58===_.charCodeAt(b)?(r=":",b++):(r=null,0===v&&y('":"')),null!==r&&null!==(i=fe())?r=[r,i]:(r=null,b=m),null!==(r=null!==r?r:"")?(m=b,58===_.charCodeAt(b)?(i=":",b++):(i=null,0===v&&y('":"')),null!==i&&null!==(a=fe())?i=[i,a]:(i=null,b=m),null!==(i=null!==i?i:"")?(m=b,58===_.charCodeAt(b)?(a=":",b++):(a=null,0===v&&y('":"')),null!==a&&null!==(o=fe())?a=[a,o]:(a=null,b=m),null!==(a=null!==a?a:"")?(m=b,58===_.charCodeAt(b)?(o=":",b++):(o=null,0===v&&y('":"')),null!==o&&null!==(s=fe())?o=[o,s]:(o=null,b=m),null!==(o=null!==o?o:"")?("::"===_.substr(b,2)?(s="::",b+=2):(s=null,0===v&&y('"::"')),null!==s?e=[e,t,n,r,i,a,o,s]:(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p)):(e=null,b=p))))))))))))))),null!==e&&(g=h,Fn.host_type="IPv6",e=_.substring(b,g)),null===e&&(b=h),e}function fe(){var e,t,n,r,i;return i=b,null!==(e=u())&&null!==(t=null!==(t=u())?t:"")&&null!==(n=null!==(n=u())?n:"")&&null!==(r=null!==(r=u())?r:"")?e=[e,t,n,r]:(e=null,b=i),e}function de(){var e,t,n,r;return r=b,null!==(e=fe())?(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t&&null!==(n=fe())?e=[e,t,n]:(e=null,b=r)):(e=null,b=r),null===e&&(e=he()),e}function he(){var e,t,n,r,i,a,o,s,c,l;return c=s=b,null!==(e=pe())?(46===_.charCodeAt(b)?(t=".",b++):(t=null,0===v&&y('"."')),null!==t&&null!==(n=pe())?(46===_.charCodeAt(b)?(r=".",b++):(r=null,0===v&&y('"."')),null!==r&&null!==(i=pe())?(46===_.charCodeAt(b)?(a=".",b++):(a=null,0===v&&y('"."')),null!==a&&null!==(o=pe())?e=[e,t,n,r,i,a,o]:(e=null,b=c)):(e=null,b=c)):(e=null,b=c)):(e=null,b=c),null!==e&&(l=s,Fn.host_type="IPv4",e=_.substring(b,l)),null===e&&(b=s),e}function pe(){var e,t,n,r;return r=b,"25"===_.substr(b,2)?(e="25",b+=2):(e=null,0===v&&y('"25"')),null!==e?(/^[0-5]/.test(_.charAt(b))?(t=_.charAt(b),b++):(t=null,0===v&&y("[0-5]")),null!==t?e=[e,t]:(e=null,b=r)):(e=null,b=r),null===e&&(r=b,50===_.charCodeAt(b)?(e="2",b++):(e=null,0===v&&y('"2"')),null!==e?(/^[0-4]/.test(_.charAt(b))?(t=_.charAt(b),b++):(t=null,0===v&&y("[0-4]")),null!==t&&null!==(n=l())?e=[e,t,n]:(e=null,b=r)):(e=null,b=r),null===e&&(r=b,49===_.charCodeAt(b)?(e="1",b++):(e=null,0===v&&y('"1"')),null!==e&&null!==(t=l())&&null!==(n=l())?e=[e,t,n]:(e=null,b=r),null===e&&(r=b,/^[1-9]/.test(_.charAt(b))?(e=_.charAt(b),b++):(e=null,0===v&&y("[1-9]")),null!==e&&null!==(t=l())?e=[e,t]:(e=null,b=r),null===e&&(e=l())))),e}function me(){var e,t,n,r,i,a,o,s;return o=a=b,null!==(e=null!==(e=l())?e:"")&&null!==(t=null!==(t=l())?t:"")&&null!==(n=null!==(n=l())?n:"")&&null!==(r=null!==(r=l())?r:"")&&null!==(i=null!==(i=l())?i:"")?e=[e,t,n,r,i]:(e=null,b=o),null!==e&&(s=e,s=parseInt(s.join("")),e=Fn.port=s),null===e&&(b=a),e}function ge(){var e,t,n,r;for(e=[],r=b,59===_.charCodeAt(b)?(t=";",b++):(t=null,0===v&&y('";"')),null!==t&&null!==(n=_e())?t=[t,n]:(t=null,b=r);null!==t;)e.push(t),r=b,59===_.charCodeAt(b)?(t=";",b++):(t=null,0===v&&y('";"')),null!==t&&null!==(n=_e())?t=[t,n]:(t=null,b=r);return e}function _e(){var e;return null===(e=be())&&null===(e=ve())&&null===(e=ye())&&null===(e=we())&&null===(e=Ce())&&null===(e=Ae())&&(e=Se()),e}function be(){var e,t,n,r,i;return r=n=b,"transport="===_.substr(b,10).toLowerCase()?(e=_.substr(b,10),b+=10):(e=null,0===v&&y('"transport="')),null!==e?("udp"===_.substr(b,3).toLowerCase()?(t=_.substr(b,3),b+=3):(t=null,0===v&&y('"udp"')),null===t&&("tcp"===_.substr(b,3).toLowerCase()?(t=_.substr(b,3),b+=3):(t=null,0===v&&y('"tcp"')),null===t&&("sctp"===_.substr(b,4).toLowerCase()?(t=_.substr(b,4),b+=4):(t=null,0===v&&y('"sctp"')),null===t&&("tls"===_.substr(b,3).toLowerCase()?(t=_.substr(b,3),b+=3):(t=null,0===v&&y('"tls"')),null===t&&(t=D())))),null!==t?e=[e,t]:(e=null,b=r)):(e=null,b=r),null!==e&&(i=e[1],Fn.uri_params||(Fn.uri_params={}),e=void(Fn.uri_params.transport=i.toLowerCase())),null===e&&(b=n),e}function ve(){var e,t,n,r,i;return r=n=b,"user="===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"user="')),null!==e?("phone"===_.substr(b,5).toLowerCase()?(t=_.substr(b,5),b+=5):(t=null,0===v&&y('"phone"')),null===t&&("ip"===_.substr(b,2).toLowerCase()?(t=_.substr(b,2),b+=2):(t=null,0===v&&y('"ip"')),null===t&&(t=D())),null!==t?e=[e,t]:(e=null,b=r)):(e=null,b=r),null!==e&&(i=e[1],Fn.uri_params||(Fn.uri_params={}),e=void(Fn.uri_params.user=i.toLowerCase())),null===e&&(b=n),e}function ye(){var e,t,n,r,i;return r=n=b,"method="===_.substr(b,7).toLowerCase()?(e=_.substr(b,7),b+=7):(e=null,0===v&&y('"method="')),null!==e&&null!==(t=ct())?e=[e,t]:(e=null,b=r),null!==e&&(i=e[1],Fn.uri_params||(Fn.uri_params={}),e=void(Fn.uri_params.method=i)),null===e&&(b=n),e}function we(){var e,t,n,r,i;return r=n=b,"ttl="===_.substr(b,4).toLowerCase()?(e=_.substr(b,4),b+=4):(e=null,0===v&&y('"ttl="')),null!==e&&null!==(t=Cn())?e=[e,t]:(e=null,b=r),null!==e&&(i=e[1],Fn.params||(Fn.params={}),e=void(Fn.params.ttl=i)),null===e&&(b=n),e}function Ce(){var e,t,n,r,i;return r=n=b,"maddr="===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"maddr="')),null!==e&&null!==(t=ae())?e=[e,t]:(e=null,b=r),null!==e&&(i=e[1],Fn.uri_params||(Fn.uri_params={}),e=void(Fn.uri_params.maddr=i)),null===e&&(b=n),e}function Ae(){var e,t,n,r,i,a;return i=r=b,"lr"===_.substr(b,2).toLowerCase()?(e=_.substr(b,2),b+=2):(e=null,0===v&&y('"lr"')),null!==e?(a=b,61===_.charCodeAt(b)?(t="=",b++):(t=null,0===v&&y('"="')),null!==t&&null!==(n=D())?t=[t,n]:(t=null,b=a),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=i)):(e=null,b=i),null!==e&&(Fn.uri_params||(Fn.uri_params={}),e=void(Fn.uri_params.lr=void 0)),null===e&&(b=r),e}function Se(){var e,t,n,r,i,a,o,s;return i=r=b,null!==(e=Te())?(a=b,61===_.charCodeAt(b)?(t="=",b++):(t=null,0===v&&y('"="')),null!==t&&null!==(n=xe())?t=[t,n]:(t=null,b=a),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=i)):(e=null,b=i),null!==e&&(o=e[0],s=e[1],Fn.uri_params||(Fn.uri_params={}),s=void 0===s?void 0:s[1],e=void(Fn.uri_params[o.toLowerCase()]=s)),null===e&&(b=r),e}function Te(){var e,t,n;if(n=b,null!==(t=ke()))for(e=[];null!==t;)e.push(t),t=ke();else e=null;return null!==e&&(e=e.join("")),null===e&&(b=n),e}function xe(){var e,t,n;if(n=b,null!==(t=ke()))for(e=[];null!==t;)e.push(t),t=ke();else e=null;return null!==e&&(e=e.join("")),null===e&&(b=n),e}function ke(){var e;return null===(e=Ee())&&null===(e=g())&&(e=w()),e}function Ee(){var e;return 91===_.charCodeAt(b)?(e="[",b++):(e=null,0===v&&y('"["')),null===e&&(93===_.charCodeAt(b)?(e="]",b++):(e=null,0===v&&y('"]"')),null===e&&(47===_.charCodeAt(b)?(e="/",b++):(e=null,0===v&&y('"/"')),null===e&&(58===_.charCodeAt(b)?(e=":",b++):(e=null,0===v&&y('":"')),null===e&&(38===_.charCodeAt(b)?(e="&",b++):(e=null,0===v&&y('"&"')),null===e&&(43===_.charCodeAt(b)?(e="+",b++):(e=null,0===v&&y('"+"')),null===e&&(36===_.charCodeAt(b)?(e="$",b++):(e=null,0===v&&y('"$"')))))))),e}function De(){var e,t,n,r,i,a,o;if(a=b,63===_.charCodeAt(b)?(e="?",b++):(e=null,0===v&&y('"?"')),null!==e)if(null!==(t=Ie())){for(n=[],o=b,38===_.charCodeAt(b)?(r="&",b++):(r=null,0===v&&y('"&"')),null!==r&&null!==(i=Ie())?r=[r,i]:(r=null,b=o);null!==r;)n.push(r),o=b,38===_.charCodeAt(b)?(r="&",b++):(r=null,0===v&&y('"&"')),null!==r&&null!==(i=Ie())?r=[r,i]:(r=null,b=o);null!==n?e=[e,t,n]:(e=null,b=a)}else e=null,b=a;else e=null,b=a;return e}function Ie(){var e,t,n,r,i,a,o;return i=r=b,null!==(e=Pe())?(61===_.charCodeAt(b)?(t="=",b++):(t=null,0===v&&y('"="')),null!==t&&null!==(n=Me())?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(a=e[0],o=e[2],a=a.join("").toLowerCase(),o=o.join(""),Fn.uri_headers||(Fn.uri_headers={}),e=void(Fn.uri_headers[a]?Fn.uri_headers[a].push(o):Fn.uri_headers[a]=[o])),null===e&&(b=r),e}function Pe(){var e,t;if(null===(t=$e())&&null===(t=g())&&(t=w()),null!==t)for(e=[];null!==t;)e.push(t),null===(t=$e())&&null===(t=g())&&(t=w());else e=null;return e}function Me(){var e,t;for(e=[],null===(t=$e())&&null===(t=g())&&(t=w());null!==t;)e.push(t),null===(t=$e())&&null===(t=g())&&(t=w());return e}function $e(){var e;return 91===_.charCodeAt(b)?(e="[",b++):(e=null,0===v&&y('"["')),null===e&&(93===_.charCodeAt(b)?(e="]",b++):(e=null,0===v&&y('"]"')),null===e&&(47===_.charCodeAt(b)?(e="/",b++):(e=null,0===v&&y('"/"')),null===e&&(63===_.charCodeAt(b)?(e="?",b++):(e=null,0===v&&y('"?"')),null===e&&(58===_.charCodeAt(b)?(e=":",b++):(e=null,0===v&&y('":"')),null===e&&(43===_.charCodeAt(b)?(e="+",b++):(e=null,0===v&&y('"+"')),null===e&&(36===_.charCodeAt(b)?(e="$",b++):(e=null,0===v&&y('"$"')))))))),e}function Oe(){var e,t,n,r,i,a;return a=b,null!==(e=ct())&&null!==(t=h())&&null!==(n=Re())&&null!==(r=h())&&null!==(i=Ze())?e=[e,t,n,r,i]:(e=null,b=a),e}function Re(){var e;return null===(e=Q())&&(e=Ne()),e}function Ne(){var e,t,n,r;return r=b,null!==(e=Ve())?(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null!==t?(null===(n=Le())&&(n=je()),null!==n?e=[e,t,n]:(e=null,b=r)):(e=null,b=r)):(e=null,b=r),e}function Le(){var e,t,n,r,i;return r=b,null===(e=Fe())&&(e=Ge()),null!==e?(i=b,63===_.charCodeAt(b)?(t="?",b++):(t=null,0===v&&y('"?"')),null!==t&&null!==(n=Xe())?t=[t,n]:(t=null,b=i),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=r)):(e=null,b=r),e}function Fe(){var e,t,n,r;return r=b,"//"===_.substr(b,2)?(e="//",b+=2):(e=null,0===v&&y('"//"')),null!==e&&null!==(t=Ye())&&null!==(n=null!==(n=Ge())?n:"")?e=[e,t,n]:(e=null,b=r),e}function Ge(){var e,t,n;return n=b,47===_.charCodeAt(b)?(e="/",b++):(e=null,0===v&&y('"/"')),null!==e&&null!==(t=He())?e=[e,t]:(e=null,b=n),e}function je(){var e,t,n,r;if(r=b,null!==(e=Ue())){for(t=[],n=Be();null!==n;)t.push(n),n=Be();null!==t?e=[e,t]:(e=null,b=r)}else e=null,b=r;return e}function Be(){var e;return null===(e=m())&&null===(e=g())&&(e=w()),e}function Ue(){var e;return null===(e=g())&&null===(e=w())&&(59===_.charCodeAt(b)?(e=";",b++):(e=null,0===v&&y('";"')),null===e&&(63===_.charCodeAt(b)?(e="?",b++):(e=null,0===v&&y('"?"')),null===e&&(58===_.charCodeAt(b)?(e=":",b++):(e=null,0===v&&y('":"')),null===e&&(64===_.charCodeAt(b)?(e="@",b++):(e=null,0===v&&y('"@"')),null===e&&(38===_.charCodeAt(b)?(e="&",b++):(e=null,0===v&&y('"&"')),null===e&&(61===_.charCodeAt(b)?(e="=",b++):(e=null,0===v&&y('"="')),null===e&&(43===_.charCodeAt(b)?(e="+",b++):(e=null,0===v&&y('"+"')),null===e&&(36===_.charCodeAt(b)?(e="$",b++):(e=null,0===v&&y('"$"')),null===e&&(44===_.charCodeAt(b)?(e=",",b++):(e=null,0===v&&y('","'))))))))))),e}function He(){var e,t,n,r,i,a;if(i=b,null!==(e=We())){for(t=[],a=b,47===_.charCodeAt(b)?(n="/",b++):(n=null,0===v&&y('"/"')),null!==n&&null!==(r=We())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,47===_.charCodeAt(b)?(n="/",b++):(n=null,0===v&&y('"/"')),null!==n&&null!==(r=We())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e}function We(){var e,t,n,r,i,a;for(i=b,e=[],t=ze();null!==t;)e.push(t),t=ze();if(null!==e){for(t=[],a=b,59===_.charCodeAt(b)?(n=";",b++):(n=null,0===v&&y('";"')),null!==n&&null!==(r=qe())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,59===_.charCodeAt(b)?(n=";",b++):(n=null,0===v&&y('";"')),null!==n&&null!==(r=qe())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e}function qe(){var e,t;for(e=[],t=ze();null!==t;)e.push(t),t=ze();return e}function ze(){var e;return null===(e=g())&&null===(e=w())&&(58===_.charCodeAt(b)?(e=":",b++):(e=null,0===v&&y('":"')),null===e&&(64===_.charCodeAt(b)?(e="@",b++):(e=null,0===v&&y('"@"')),null===e&&(38===_.charCodeAt(b)?(e="&",b++):(e=null,0===v&&y('"&"')),null===e&&(61===_.charCodeAt(b)?(e="=",b++):(e=null,0===v&&y('"="')),null===e&&(43===_.charCodeAt(b)?(e="+",b++):(e=null,0===v&&y('"+"')),null===e&&(36===_.charCodeAt(b)?(e="$",b++):(e=null,0===v&&y('"$"')),null===e&&(44===_.charCodeAt(b)?(e=",",b++):(e=null,0===v&&y('","'))))))))),e}function Ve(){var e,t,n,r,i,a;if(i=r=b,null!==(e=s())){for(t=[],null===(n=s())&&null===(n=l())&&(43===_.charCodeAt(b)?(n="+",b++):(n=null,0===v&&y('"+"')),null===n&&(45===_.charCodeAt(b)?(n="-",b++):(n=null,0===v&&y('"-"')),null===n&&(46===_.charCodeAt(b)?(n=".",b++):(n=null,0===v&&y('"."')))));null!==n;)t.push(n),null===(n=s())&&null===(n=l())&&(43===_.charCodeAt(b)?(n="+",b++):(n=null,0===v&&y('"+"')),null===n&&(45===_.charCodeAt(b)?(n="-",b++):(n=null,0===v&&y('"-"')),null===n&&(46===_.charCodeAt(b)?(n=".",b++):(n=null,0===v&&y('"."')))));null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return null!==e&&(a=r,e=void(Fn.scheme=_.substring(b,a))),null===e&&(b=r),e}function Ye(){var e;return null===(e=Ke())&&(e=Qe()),e}function Ke(){var e,t,n,r;return r=n=b,null!==(e=ee())?(64===_.charCodeAt(b)?(t="@",b++):(t=null,0===v&&y('"@"')),null!==t?e=[e,t]:(e=null,b=r)):(e=null,b=r),null!==(e=null!==e?e:"")&&null!==(t=ie())?e=[e,t]:(e=null,b=n),e=null!==e?e:""}function Qe(){var e,t;if(null===(t=g())&&null===(t=w())&&(36===_.charCodeAt(b)?(t="$",b++):(t=null,0===v&&y('"$"')),null===t&&(44===_.charCodeAt(b)?(t=",",b++):(t=null,0===v&&y('","')),null===t&&(59===_.charCodeAt(b)?(t=";",b++):(t=null,0===v&&y('";"')),null===t&&(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null===t&&(64===_.charCodeAt(b)?(t="@",b++):(t=null,0===v&&y('"@"')),null===t&&(38===_.charCodeAt(b)?(t="&",b++):(t=null,0===v&&y('"&"')),null===t&&(61===_.charCodeAt(b)?(t="=",b++):(t=null,0===v&&y('"="')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"')))))))))),null!==t)for(e=[];null!==t;)e.push(t),null===(t=g())&&null===(t=w())&&(36===_.charCodeAt(b)?(t="$",b++):(t=null,0===v&&y('"$"')),null===t&&(44===_.charCodeAt(b)?(t=",",b++):(t=null,0===v&&y('","')),null===t&&(59===_.charCodeAt(b)?(t=";",b++):(t=null,0===v&&y('";"')),null===t&&(58===_.charCodeAt(b)?(t=":",b++):(t=null,0===v&&y('":"')),null===t&&(64===_.charCodeAt(b)?(t="@",b++):(t=null,0===v&&y('"@"')),null===t&&(38===_.charCodeAt(b)?(t="&",b++):(t=null,0===v&&y('"&"')),null===t&&(61===_.charCodeAt(b)?(t="=",b++):(t=null,0===v&&y('"="')),null===t&&(43===_.charCodeAt(b)?(t="+",b++):(t=null,0===v&&y('"+"'))))))))));else e=null;return e}function Xe(){var e,t;for(e=[],t=Be();null!==t;)e.push(t),t=Be();return e}function Ze(){var e,t,n,r,i,a,o,s,c;if(s=o=b,"sip"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"SIP"')),null!==e)if(47===_.charCodeAt(b)?(t="/",b++):(t=null,0===v&&y('"/"')),null!==t){if(null!==(r=l()))for(n=[];null!==r;)n.push(r),r=l();else n=null;if(null!==n)if(46===_.charCodeAt(b)?(r=".",b++):(r=null,0===v&&y('"."')),null!==r){if(null!==(a=l()))for(i=[];null!==a;)i.push(a),a=l();else i=null;null!==i?e=[e,t,n,r,i]:(e=null,b=s)}else e=null,b=s;else e=null,b=s}else e=null,b=s;else e=null,b=s;return null!==e&&(c=o,e=void(Fn.sip_version=_.substring(b,c))),null===e&&(b=o),e}function Je(){var e;return"INVITE"===_.substr(b,6)?(e="INVITE",b+=6):(e=null,0===v&&y('"INVITE"')),e}function et(){var e;return"ACK"===_.substr(b,3)?(e="ACK",b+=3):(e=null,0===v&&y('"ACK"')),e}function tt(){var e;return"OPTIONS"===_.substr(b,7)?(e="OPTIONS",b+=7):(e=null,0===v&&y('"OPTIONS"')),e}function nt(){var e;return"BYE"===_.substr(b,3)?(e="BYE",b+=3):(e=null,0===v&&y('"BYE"')),e}function rt(){var e;return"CANCEL"===_.substr(b,6)?(e="CANCEL",b+=6):(e=null,0===v&&y('"CANCEL"')),e}function it(){var e;return"REGISTER"===_.substr(b,8)?(e="REGISTER",b+=8):(e=null,0===v&&y('"REGISTER"')),e}function at(){var e;return"SUBSCRIBE"===_.substr(b,9)?(e="SUBSCRIBE",b+=9):(e=null,0===v&&y('"SUBSCRIBE"')),e}function ot(){var e;return"NOTIFY"===_.substr(b,6)?(e="NOTIFY",b+=6):(e=null,0===v&&y('"NOTIFY"')),e}function st(){var e;return"REFER"===_.substr(b,5)?(e="REFER",b+=5):(e=null,0===v&&y('"REFER"')),e}function ct(){var e,t,n;return t=b,null===(e=Je())&&null===(e=et())&&null===(e=tt())&&null===(e=nt())&&null===(e=rt())&&null===(e=it())&&null===(e=at())&&null===(e=ot())&&null===(e=st())&&(e=D()),null!==e&&(n=t,Fn.method=_.substring(b,n),e=Fn.method),null===e&&(b=t),e}function lt(){var e,t,n,r,i,a;return a=b,null!==(e=Ze())&&null!==(t=h())&&null!==(n=ut())&&null!==(r=h())&&null!==(i=dt())?e=[e,t,n,r,i]:(e=null,b=a),e}function ut(){var e,t,n;return t=b,null!==(e=ft())&&(n=e,e=void(Fn.status_code=parseInt(n.join("")))),null===e&&(b=t),e}function ft(){var e,t,n,r;return r=b,null!==(e=l())&&null!==(t=l())&&null!==(n=l())?e=[e,t,n]:(e=null,b=r),e}function dt(){var e,t,n,r;for(n=b,e=[],null===(t=m())&&null===(t=g())&&null===(t=w())&&null===(t=k())&&null===(t=E())&&null===(t=h())&&(t=p());null!==t;)e.push(t),null===(t=m())&&null===(t=g())&&null===(t=w())&&null===(t=k())&&null===(t=E())&&null===(t=h())&&(t=p());return null!==e&&(r=n,e=void(Fn.reason_phrase=_.substring(b,r))),null===e&&(b=n),e}function ht(){var e,t,n,r,i,a,o;if(a=i=b,null===(e=K())&&(e=pt()),null!==e){for(t=[],o=b,null!==(n=j())&&null!==(r=gt())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=j())&&null!==(r=gt())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;return null!==e&&(e=function(e){var t;Fn.multi_header||(Fn.multi_header=[]);try{t=new Ln(Fn.uri,Fn.display_name,Fn.params),delete Fn.uri,delete Fn.display_name,delete Fn.params}catch(e){t=null}Fn.multi_header.push({possition:b,offset:e,parsed:t})}(i)),null===e&&(b=i),e}function pt(){var e,t,n,r,i;return i=b,null!==(e=null!==(e=mt())?e:"")&&null!==(t=F())&&null!==(n=Q())&&null!==(r=L())?e=[e,t,n,r]:(e=null,b=i),e}function mt(){var e,t,n,r,i,a,o,s,c;if(a=i=b,null!==(e=D())){for(t=[],o=b,null!==(n=C())&&null!==(r=D())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=C())&&null!==(r=D())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;return null===e&&(e=q()),null!==e&&(s=i,c=e,'"'===(c=_.substring(b,s).trim())[0]&&(c=c.substring(1,c.length-1)),e=void(Fn.display_name=c)),null===e&&(b=i),e}function gt(){var e;return null===(e=_t())&&null===(e=bt())&&(e=wt()),e}function _t(){var e,t,n,r,i,a;return i=r=b,"q"===_.substr(b,1).toLowerCase()?(e=_.substr(b,1),b++):(e=null,0===v&&y('"q"')),null!==e&&null!==(t=O())&&null!==(n=yt())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],Fn.params||(Fn.params={}),e=void(Fn.params.q=a)),null===e&&(b=r),e}function bt(){var e,t,n,r,i,a;return i=r=b,"expires"===_.substr(b,7).toLowerCase()?(e=_.substr(b,7),b+=7):(e=null,0===v&&y('"expires"')),null!==e&&null!==(t=O())&&null!==(n=vt())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],Fn.params||(Fn.params={}),e=void(Fn.params.expires=a)),null===e&&(b=r),e}function vt(){var e,t,n;if(n=b,null!==(t=l()))for(e=[];null!==t;)e.push(t),t=l();else e=null;return null!==e&&(e=parseInt(e.join(""))),null===e&&(b=n),e}function yt(){var e,t,n,r,i,a,o,s,c;return o=a=b,48===_.charCodeAt(b)?(e="0",b++):(e=null,0===v&&y('"0"')),null!==e?(s=b,46===_.charCodeAt(b)?(t=".",b++):(t=null,0===v&&y('"."')),null!==t&&null!==(n=null!==(n=l())?n:"")&&null!==(r=null!==(r=l())?r:"")&&null!==(i=null!==(i=l())?i:"")?t=[t,n,r,i]:(t=null,b=s),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=o)):(e=null,b=o),null!==e&&(c=a,e=parseFloat(_.substring(b,c))),null===e&&(b=a),e}function wt(){var e,t,n,r,i,a,o,s;return i=r=b,null!==(e=D())?(a=b,null!==(t=O())&&null!==(n=Ct())?t=[t,n]:(t=null,b=a),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=i)):(e=null,b=i),null!==e&&(o=e[0],s=e[1],Fn.params||(Fn.params={}),s=void 0===s?void 0:s[1],e=void(Fn.params[o.toLowerCase()]=s)),null===e&&(b=r),e}function Ct(){var e;return null===(e=D())&&null===(e=ae())&&(e=q()),e}function At(){var e;return"render"===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"render"')),null===e&&("session"===_.substr(b,7).toLowerCase()?(e=_.substr(b,7),b+=7):(e=null,0===v&&y('"session"')),null===e&&("icon"===_.substr(b,4).toLowerCase()?(e=_.substr(b,4),b+=4):(e=null,0===v&&y('"icon"')),null===e&&("alert"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"alert"')),null===e&&(e=D())))),e}function St(){var e;return null===(e=Tt())&&(e=wt()),e}function Tt(){var e,t,n,r;return r=b,"handling"===_.substr(b,8).toLowerCase()?(e=_.substr(b,8),b+=8):(e=null,0===v&&y('"handling"')),null!==e&&null!==(t=O())?("optional"===_.substr(b,8).toLowerCase()?(n=_.substr(b,8),b+=8):(n=null,0===v&&y('"optional"')),null===n&&("required"===_.substr(b,8).toLowerCase()?(n=_.substr(b,8),b+=8):(n=null,0===v&&y('"required"')),null===n&&(n=D())),null!==n?e=[e,t,n]:(e=null,b=r)):(e=null,b=r),e}function xt(){var e,t,n,r,i,a,o,s;if(o=b,null!==(e=kt()))if(null!==(t=$()))if(null!==(n=Mt())){for(r=[],s=b,null!==(i=j())&&null!==(a=$t())?i=[i,a]:(i=null,b=s);null!==i;)r.push(i),s=b,null!==(i=j())&&null!==(a=$t())?i=[i,a]:(i=null,b=s);null!==r?e=[e,t,n,r]:(e=null,b=o)}else e=null,b=o;else e=null,b=o;else e=null,b=o;return e}function kt(){var e;return null===(e=Et())&&(e=Dt()),e}function Et(){var e;return"text"===_.substr(b,4).toLowerCase()?(e=_.substr(b,4),b+=4):(e=null,0===v&&y('"text"')),null===e&&("image"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"image"')),null===e&&("audio"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"audio"')),null===e&&("video"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"video"')),null===e&&("application"===_.substr(b,11).toLowerCase()?(e=_.substr(b,11),b+=11):(e=null,0===v&&y('"application"')),null===e&&(e=It()))))),e}function Dt(){var e;return"message"===_.substr(b,7).toLowerCase()?(e=_.substr(b,7),b+=7):(e=null,0===v&&y('"message"')),null===e&&("multipart"===_.substr(b,9).toLowerCase()?(e=_.substr(b,9),b+=9):(e=null,0===v&&y('"multipart"')),null===e&&(e=It())),e}function It(){var e;return null===(e=D())&&(e=Pt()),e}function Pt(){var e,t,n;return n=b,"x-"===_.substr(b,2).toLowerCase()?(e=_.substr(b,2),b+=2):(e=null,0===v&&y('"x-"')),null!==e&&null!==(t=D())?e=[e,t]:(e=null,b=n),e}function Mt(){var e;return null===(e=It())&&(e=D()),e}function $t(){var e,t,n,r;return r=b,null!==(e=D())&&null!==(t=O())&&null!==(n=Ot())?e=[e,t,n]:(e=null,b=r),e}function Ot(){var e;return null===(e=D())&&(e=q()),e}function Rt(){var e,t,n,r;if(n=b,null!==(t=l()))for(e=[];null!==t;)e.push(t),t=l();else e=null;return null!==e&&(r=e,e=void(Fn.value=parseInt(r.join("")))),null===e&&(b=n),e}function Nt(){var e,t,n,r,i,a;if(i=b,null!==(e=I())){for(t=[],a=b,46===_.charCodeAt(b)?(n=".",b++):(n=null,0===v&&y('"."')),null!==n&&null!==(r=I())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,46===_.charCodeAt(b)?(n=".",b++):(n=null,0===v&&y('"."')),null!==n&&null!==(r=I())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e}function Lt(){var e;return null===(e=Ft())&&(e=wt()),e}function Ft(){var e,t,n,r,i,a;return i=r=b,"tag"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"tag"')),null!==e&&null!==(t=O())&&null!==(n=D())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.tag=a)),null===e&&(b=r),e}function Gt(){var e,t,n,r,i,a,o,s;if(o=b,"digest"===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"Digest"')),null!==e)if(null!==(t=C()))if(null!==(n=Ut())){for(r=[],s=b,null!==(i=G())&&null!==(a=Ut())?i=[i,a]:(i=null,b=s);null!==i;)r.push(i),s=b,null!==(i=G())&&null!==(a=Ut())?i=[i,a]:(i=null,b=s);null!==r?e=[e,t,n,r]:(e=null,b=o)}else e=null,b=o;else e=null,b=o;else e=null,b=o;return null===e&&(e=jt()),e}function jt(){var e,t,n,r,i,a,o,s;if(o=b,null!==(e=D()))if(null!==(t=C()))if(null!==(n=Bt())){for(r=[],s=b,null!==(i=G())&&null!==(a=Bt())?i=[i,a]:(i=null,b=s);null!==i;)r.push(i),s=b,null!==(i=G())&&null!==(a=Bt())?i=[i,a]:(i=null,b=s);null!==r?e=[e,t,n,r]:(e=null,b=o)}else e=null,b=o;else e=null,b=o;else e=null,b=o;return e}function Bt(){var e,t,n,r;return r=b,null!==(e=D())&&null!==(t=O())?(null===(n=D())&&(n=q()),null!==n?e=[e,t,n]:(e=null,b=r)):(e=null,b=r),e}function Ut(){var e;return null===(e=Ht())&&null===(e=qt())&&null===(e=Vt())&&null===(e=Kt())&&null===(e=Qt())&&null===(e=Xt())&&null===(e=Zt())&&(e=Bt()),e}function Ht(){var e,t,n,r;return r=b,"realm"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"realm"')),null!==e&&null!==(t=O())&&null!==(n=Wt())?e=[e,t,n]:(e=null,b=r),e}function Wt(){var e,t,n;return t=b,null!==(e=z())&&(n=e,e=void(Fn.realm=n)),null===e&&(b=t),e}function qt(){var e,t,n,r,i,a,o,s,c;if(s=b,"domain"===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"domain"')),null!==e)if(null!==(t=O()))if(null!==(n=U()))if(null!==(r=zt())){if(i=[],c=b,null!==(o=h()))for(a=[];null!==o;)a.push(o),o=h();else a=null;for(null!==a&&null!==(o=zt())?a=[a,o]:(a=null,b=c);null!==a;){if(i.push(a),c=b,null!==(o=h()))for(a=[];null!==o;)a.push(o),o=h();else a=null;null!==a&&null!==(o=zt())?a=[a,o]:(a=null,b=c)}null!==i&&null!==(a=H())?e=[e,t,n,r,i,a]:(e=null,b=s)}else e=null,b=s;else e=null,b=s;else e=null,b=s;else e=null,b=s;return e}function zt(){var e;return null===(e=Ne())&&(e=Ge()),e}function Vt(){var e,t,n,r;return r=b,"nonce"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"nonce"')),null!==e&&null!==(t=O())&&null!==(n=Yt())?e=[e,t,n]:(e=null,b=r),e}function Yt(){var e,t,n;return t=b,null!==(e=z())&&(n=e,e=void(Fn.nonce=n)),null===e&&(b=t),e}function Kt(){var e,t,n,r,i,a;return i=r=b,"opaque"===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"opaque"')),null!==e&&null!==(t=O())&&null!==(n=z())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.opaque=a)),null===e&&(b=r),e}function Qt(){var e,t,n,r,i;return r=b,"stale"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"stale"')),null!==e&&null!==(t=O())?(i=b,"true"===_.substr(b,4).toLowerCase()?(n=_.substr(b,4),b+=4):(n=null,0===v&&y('"true"')),null!==n&&(n=void(Fn.stale=!0)),null===n&&(b=i),null===n&&(i=b,"false"===_.substr(b,5).toLowerCase()?(n=_.substr(b,5),b+=5):(n=null,0===v&&y('"false"')),null!==n&&(n=void(Fn.stale=!1)),null===n&&(b=i)),null!==n?e=[e,t,n]:(e=null,b=r)):(e=null,b=r),e}function Xt(){var e,t,n,r,i,a;return i=r=b,"algorithm"===_.substr(b,9).toLowerCase()?(e=_.substr(b,9),b+=9):(e=null,0===v&&y('"algorithm"')),null!==e&&null!==(t=O())?("md5"===_.substr(b,3).toLowerCase()?(n=_.substr(b,3),b+=3):(n=null,0===v&&y('"MD5"')),null===n&&("md5-sess"===_.substr(b,8).toLowerCase()?(n=_.substr(b,8),b+=8):(n=null,0===v&&y('"MD5-sess"')),null===n&&(n=D())),null!==n?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.algorithm=a.toUpperCase())),null===e&&(b=r),e}function Zt(){var e,t,n,r,i,a,o,s,c,l;if(s=b,"qop"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"qop"')),null!==e)if(null!==(t=O()))if(null!==(n=U())){if(c=b,null!==(r=Jt())){for(i=[],l=b,44===_.charCodeAt(b)?(a=",",b++):(a=null,0===v&&y('","')),null!==a&&null!==(o=Jt())?a=[a,o]:(a=null,b=l);null!==a;)i.push(a),l=b,44===_.charCodeAt(b)?(a=",",b++):(a=null,0===v&&y('","')),null!==a&&null!==(o=Jt())?a=[a,o]:(a=null,b=l);null!==i?r=[r,i]:(r=null,b=c)}else r=null,b=c;null!==r&&null!==(i=H())?e=[e,t,n,r,i]:(e=null,b=s)}else e=null,b=s;else e=null,b=s;else e=null,b=s;return e}function Jt(){var e,t,n;return t=b,"auth-int"===_.substr(b,8).toLowerCase()?(e=_.substr(b,8),b+=8):(e=null,0===v&&y('"auth-int"')),null===e&&("auth"===_.substr(b,4).toLowerCase()?(e=_.substr(b,4),b+=4):(e=null,0===v&&y('"auth"')),null===e&&(e=D())),null!==e&&(n=e,Fn.qop||(Fn.qop=[]),e=void Fn.qop.push(n.toLowerCase())),null===e&&(b=t),e}function en(){var e,t,n,r,i,a,o;if(a=i=b,null!==(e=pt())){for(t=[],o=b,null!==(n=j())&&null!==(r=wt())?n=[n,r]:(n=null,b=o);null!==n;)t.push(n),o=b,null!==(n=j())&&null!==(r=wt())?n=[n,r]:(n=null,b=o);null!==t?e=[e,t]:(e=null,b=a)}else e=null,b=a;return null!==e&&(e=function(e){var t;Fn.multi_header||(Fn.multi_header=[]);try{t=new Ln(Fn.uri,Fn.display_name,Fn.params),delete Fn.uri,delete Fn.display_name,delete Fn.params}catch(e){t=null}Fn.multi_header.push({possition:b,offset:e,parsed:t})}(i)),null===e&&(b=i),e}function tn(){var e;return null===(e=nn())&&(e=wt()),e}function nn(){var e,t,n,r,i,a,o;if(a=i=b,"cause"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"cause"')),null!==e)if(null!==(t=O())){if(null!==(r=l()))for(n=[];null!==r;)n.push(r),r=l();else n=null;null!==n?e=[e,t,n]:(e=null,b=a)}else e=null,b=a;else e=null,b=a;return null!==e&&(o=e[2],e=void(Fn.cause=parseInt(o.join("")))),null===e&&(b=i),e}function rn(){var e,t,n,r,i,a;if(i=b,null!==(e=pt())){for(t=[],a=b,null!==(n=j())&&null!==(r=wt())?n=[n,r]:(n=null,b=a);null!==n;)t.push(n),a=b,null!==(n=j())&&null!==(r=wt())?n=[n,r]:(n=null,b=a);null!==t?e=[e,t]:(e=null,b=i)}else e=null,b=i;return e}function an(){var e,t,n;return t=b,"active"===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"active"')),null===e&&("pending"===_.substr(b,7).toLowerCase()?(e=_.substr(b,7),b+=7):(e=null,0===v&&y('"pending"')),null===e&&("terminated"===_.substr(b,10).toLowerCase()?(e=_.substr(b,10),b+=10):(e=null,0===v&&y('"terminated"')),null===e&&(e=D()))),null!==e&&(n=t,e=void(Fn.state=_.substring(b,n))),null===e&&(b=t),e}function on(){var e,t,n,r,i,a,o,s;return i=r=b,"reason"===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"reason"')),null!==e&&null!==(t=O())&&null!==(n=sn())?e=[e,t,n]:(e=null,b=i),null!==e&&(e=void(void 0!==(a=e[2])&&(Fn.reason=a))),null===e&&(b=r),null===e&&(i=r=b,"expires"===_.substr(b,7).toLowerCase()?(e=_.substr(b,7),b+=7):(e=null,0===v&&y('"expires"')),null!==e&&null!==(t=O())&&null!==(n=vt())?e=[e,t,n]:(e=null,b=i),null!==e&&(e=void(void 0!==(s=e[2])&&(Fn.expires=s))),null===e&&(b=r),null===e&&(i=r=b,"retry_after"===_.substr(b,11).toLowerCase()?(e=_.substr(b,11),b+=11):(e=null,0===v&&y('"retry_after"')),null!==e&&null!==(t=O())&&null!==(n=vt())?e=[e,t,n]:(e=null,b=i),null!==e&&(e=void(void 0!==(o=e[2])&&(Fn.retry_after=o))),null===e&&(b=r),null===e&&(e=wt()))),e}function sn(){var e;return"deactivated"===_.substr(b,11).toLowerCase()?(e=_.substr(b,11),b+=11):(e=null,0===v&&y('"deactivated"')),null===e&&("probation"===_.substr(b,9).toLowerCase()?(e=_.substr(b,9),b+=9):(e=null,0===v&&y('"probation"')),null===e&&("rejected"===_.substr(b,8).toLowerCase()?(e=_.substr(b,8),b+=8):(e=null,0===v&&y('"rejected"')),null===e&&("timeout"===_.substr(b,7).toLowerCase()?(e=_.substr(b,7),b+=7):(e=null,0===v&&y('"timeout"')),null===e&&("giveup"===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"giveup"')),null===e&&("noresource"===_.substr(b,10).toLowerCase()?(e=_.substr(b,10),b+=10):(e=null,0===v&&y('"noresource"')),null===e&&("invariant"===_.substr(b,9).toLowerCase()?(e=_.substr(b,9),b+=9):(e=null,0===v&&y('"invariant"')),null===e&&(e=D()))))))),e}function cn(){var e;return null===(e=Ft())&&(e=wt()),e}function ln(){var e,t,n,r,i,a,o,s;if(o=b,null!==(e=gn()))if(null!==(t=C()))if(null!==(n=vn())){for(r=[],s=b,null!==(i=j())&&null!==(a=un())?i=[i,a]:(i=null,b=s);null!==i;)r.push(i),s=b,null!==(i=j())&&null!==(a=un())?i=[i,a]:(i=null,b=s);null!==r?e=[e,t,n,r]:(e=null,b=o)}else e=null,b=o;else e=null,b=o;else e=null,b=o;return e}function un(){var e;return null===(e=fn())&&null===(e=dn())&&null===(e=hn())&&null===(e=pn())&&null===(e=mn())&&(e=wt()),e}function fn(){var e,t,n,r,i,a;return i=r=b,"ttl"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"ttl"')),null!==e&&null!==(t=O())&&null!==(n=Cn())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.ttl=a)),null===e&&(b=r),e}function dn(){var e,t,n,r,i,a;return i=r=b,"maddr"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"maddr"')),null!==e&&null!==(t=O())&&null!==(n=ae())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.maddr=a)),null===e&&(b=r),e}function hn(){var e,t,n,r,i,a;return i=r=b,"received"===_.substr(b,8).toLowerCase()?(e=_.substr(b,8),b+=8):(e=null,0===v&&y('"received"')),null!==e&&null!==(t=O())?(null===(n=he())&&(n=ue()),null!==n?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.received=a)),null===e&&(b=r),e}function pn(){var e,t,n,r,i,a;return i=r=b,"branch"===_.substr(b,6).toLowerCase()?(e=_.substr(b,6),b+=6):(e=null,0===v&&y('"branch"')),null!==e&&null!==(t=O())&&null!==(n=D())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.branch=a)),null===e&&(b=r),e}function mn(){var e,t,n,r,i,a,o;if(a=i=b,"rport"===_.substr(b,5).toLowerCase()?(e=_.substr(b,5),b+=5):(e=null,0===v&&y('"rport"')),null!==e){if(o=b,null!==(t=O())){for(n=[],r=l();null!==r;)n.push(r),r=l();null!==n?t=[t,n]:(t=null,b=o)}else t=null,b=o;null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=a)}else e=null,b=a;return null!==e&&(e=void("undefined"!=typeof response_port&&(Fn.rport=response_port.join("")))),null===e&&(b=i),e}function gn(){var e,t,n,r,i,a;return a=b,null!==(e=_n())&&null!==(t=$())&&null!==(n=D())&&null!==(r=$())&&null!==(i=bn())?e=[e,t,n,r,i]:(e=null,b=a),e}function _n(){var e,t,n;return t=b,"sip"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"SIP"')),null===e&&(e=D()),null!==e&&(n=e,e=void(Fn.protocol=n)),null===e&&(b=t),e}function bn(){var e,t,n;return t=b,"udp"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"UDP"')),null===e&&("tcp"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"TCP"')),null===e&&("tls"===_.substr(b,3).toLowerCase()?(e=_.substr(b,3),b+=3):(e=null,0===v&&y('"TLS"')),null===e&&("sctp"===_.substr(b,4).toLowerCase()?(e=_.substr(b,4),b+=4):(e=null,0===v&&y('"SCTP"')),null===e&&(e=D())))),null!==e&&(n=e,e=void(Fn.transport=n)),null===e&&(b=t),e}function vn(){var e,t,n,r,i;return r=b,null!==(e=yn())?(i=b,null!==(t=B())&&null!==(n=wn())?t=[t,n]:(t=null,b=i),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=r)):(e=null,b=r),e}function yn(){var e,t,n;return t=b,null===(e=he())&&null===(e=le())&&(e=oe()),null!==e&&(n=t,e=void(Fn.host=_.substring(b,n))),null===e&&(b=t),e}function wn(){var e,t,n,r,i,a,o,s;return o=a=b,null!==(e=null!==(e=l())?e:"")&&null!==(t=null!==(t=l())?t:"")&&null!==(n=null!==(n=l())?n:"")&&null!==(r=null!==(r=l())?r:"")&&null!==(i=null!==(i=l())?i:"")?e=[e,t,n,r,i]:(e=null,b=o),null!==e&&(s=e,e=void(Fn.port=parseInt(s.join("")))),null===e&&(b=a),e}function Cn(){var e,t,n,r,i;return i=r=b,null!==(e=l())&&null!==(t=null!==(t=l())?t:"")&&null!==(n=null!==(n=l())?n:"")?e=[e,t,n]:(e=null,b=i),null!==e&&(e=parseInt(e.join(""))),null===e&&(b=r),e}function An(){var e,t,n;return t=b,null!==(e=vt())&&(n=e,e=void(Fn.expires=n)),null===e&&(b=t),e}function Sn(){var e;return null===(e=Tn())&&(e=wt()),e}function Tn(){var e,t,n,r,i,a;return i=r=b,"refresher"===_.substr(b,9).toLowerCase()?(e=_.substr(b,9),b+=9):(e=null,0===v&&y('"refresher"')),null!==e&&null!==(t=O())?("uac"===_.substr(b,3).toLowerCase()?(n=_.substr(b,3),b+=3):(n=null,0===v&&y('"uac"')),null===n&&("uas"===_.substr(b,3).toLowerCase()?(n=_.substr(b,3),b+=3):(n=null,0===v&&y('"uas"'))),null!==n?e=[e,t,n]:(e=null,b=i)):(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.refresher=a.toLowerCase())),null===e&&(b=r),e}function xn(){var e,t;for(e=[],null===(t=x())&&null===(t=E())&&(t=C());null!==t;)e.push(t),null===(t=x())&&null===(t=E())&&(t=C());return e}function kn(){var e,t,n,r,i,a,o,s,c,l,u,f;return u=l=b,null!==(e=Dn())?(45===_.charCodeAt(b)?(t="-",b++):(t=null,0===v&&y('"-"')),null!==t&&null!==(n=En())?(45===_.charCodeAt(b)?(r="-",b++):(r=null,0===v&&y('"-"')),null!==r&&null!==(i=En())?(45===_.charCodeAt(b)?(a="-",b++):(a=null,0===v&&y('"-"')),null!==a&&null!==(o=En())?(45===_.charCodeAt(b)?(s="-",b++):(s=null,0===v&&y('"-"')),null!==s&&null!==(c=In())?e=[e,t,n,r,i,a,o,s,c]:(e=null,b=u)):(e=null,b=u)):(e=null,b=u)):(e=null,b=u)):(e=null,b=u),null!==e&&(f=l,e[0],e=void(Fn=_.substring(b+5,f))),null===e&&(b=l),e}function En(){var e,t,n,r,i;return i=b,null!==(e=u())&&null!==(t=u())&&null!==(n=u())&&null!==(r=u())?e=[e,t,n,r]:(e=null,b=i),e}function Dn(){var e,t,n;return n=b,null!==(e=En())&&null!==(t=En())?e=[e,t]:(e=null,b=n),e}function In(){var e,t,n,r;return r=b,null!==(e=En())&&null!==(t=En())&&null!==(n=En())?e=[e,t,n]:(e=null,b=r),e}function Pn(){var e,t,n,r,i,a,o;return i=r=b,null!==(e=P())?(a=b,64===_.charCodeAt(b)?(t="@",b++):(t=null,0===v&&y('"@"')),null!==t&&null!==(n=P())?t=[t,n]:(t=null,b=a),null!==(t=null!==t?t:"")?e=[e,t]:(e=null,b=i)):(e=null,b=i),null!==e&&(o=r,e=void(Fn.call_id=_.substring(b,o))),null===e&&(b=r),e}function Mn(){var e;return null===(e=$n())&&null===(e=On())&&null===(e=Rn())&&(e=wt()),e}function $n(){var e,t,n,r,i,a;return i=r=b,"to-tag"===_.substr(b,6)?(e="to-tag",b+=6):(e=null,0===v&&y('"to-tag"')),null!==e&&null!==(t=O())&&null!==(n=D())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.to_tag=a)),null===e&&(b=r),e}function On(){var e,t,n,r,i,a;return i=r=b,"from-tag"===_.substr(b,8)?(e="from-tag",b+=8):(e=null,0===v&&y('"from-tag"')),null!==e&&null!==(t=O())&&null!==(n=D())?e=[e,t,n]:(e=null,b=i),null!==e&&(a=e[2],e=void(Fn.from_tag=a)),null===e&&(b=r),e}function Rn(){var e,t;return t=b,"early-only"===_.substr(b,10)?(e="early-only",b+=10):(e=null,0===v&&y('"early-only"')),null!==e&&(e=void(Fn.early_only=!0)),null===e&&(b=t),e}var Nn=Hn("./URI"),Ln=Hn("./NameAddrHeader"),Fn={};if(null!==e[c]()&&b===_.length)return Fn;var Gn=Math.max(b,a),jn=Gn<_.length?_.charAt(Gn):null,Bn=function(){for(var e=1,t=1,n=!1,r=0;r<Math.max(b,a);r++){var i=_.charAt(r);n="\n"===i?(n||e++,!(t=1)):"\r"===i||"\u2028"===i||"\u2029"===i?(e++,t=1,!0):(t++,!1)}return{line:e,column:t}}();return new this.SyntaxError(function(e){e.sort();for(var t=null,n=[],r=0;r<e.length;r++)e[r]!==t&&(n.push(e[r]),t=e[r]);return n}(t),jn,Gn,Bn.line,Bn.column),-1},toSource:function(){return this._source},SyntaxError:function(e,t,n,r,i){this.name="SyntaxError",this.expected=e,this.found=t,this.message=function(e,t){var n;switch(e.length){case 0:n="end of input";break;case 1:n=e[0];break;default:n=e.slice(0,e.length-1).join(", ")+" or "+e[e.length-1]}return"Expected "+n+" but "+(t?Un(t):"end of input")+" found."}(e,t),this.offset=n,this.line=r,this.column=i}};return e.SyntaxError.prototype=Error.prototype,e}()},{"./NameAddrHeader":10,"./URI":25}],8:[function(e,t,n){"use strict";var r=e("webrtc-adapter"),i=e("../package.json"),a=e("./Constants"),o=e("./Exceptions"),s=e("./Utils"),c=e("./UA"),l=e("./URI"),u=e("./NameAddrHeader"),f=e("./Grammar"),d=e("./WebSocketInterface");e("debug")("JsSIP")("version %s",i.version),t.exports={C:a,Exceptions:o,Utils:s,UA:c,URI:l,NameAddrHeader:u,WebSocketInterface:d,Grammar:f,debug:e("debug"),adapter:r,get name(){return i.title},get version(){return i.version}}},{"../package.json":51,"./Constants":2,"./Exceptions":6,"./Grammar":7,"./NameAddrHeader":10,"./UA":24,"./URI":25,"./Utils":26,"./WebSocketInterface":27,debug:29,"webrtc-adapter":40}],9:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var i=e("events").EventEmitter,u=e("./Constants"),f=e("./SIPMessage"),d=e("./Utils"),h=e("./RequestSender"),a=e("./Exceptions"),o=e("debug")("JsSIP:Message");t.exports=function(e){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t._ua=e,t._request=null,t._closed=!1,t._direction=null,t._local_identity=null,t._remote_identity=null,t._is_replied=!1,t._data={},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,i),r(n,[{key:"send",value:function(e,t){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},i=e;if(void 0===e||void 0===t)throw new TypeError("Not enough arguments");if(!(e=this._ua.normalizeTarget(e)))throw new TypeError("Invalid target: "+i);var a=d.cloneArray(r.extraHeaders),o=r.eventHandlers||{},s=r.contentType||"text/plain";for(var c in o)Object.prototype.hasOwnProperty.call(o,c)&&this.on(c,o[c]);a.push("Content-Type: "+s),this._request=new f.OutgoingRequest(u.MESSAGE,e,this._ua,null,a),t&&(this._request.body=t);var l=new h(this._ua,this._request,{onRequestTimeout:function(){n._onRequestTimeout()},onTransportError:function(){n._onTransportError()},onReceiveResponse:function(e){n._receiveResponse(e)}});this._newMessage("local",this._request),l.send()}},{key:"init_incoming",value:function(e){this._request=e,this._newMessage("remote",e),this._is_replied||(this._is_replied=!0,e.reply(200)),this._close()}},{key:"accept",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=d.cloneArray(e.extraHeaders),n=e.body;if("incoming"!==this._direction)throw new a.NotSupportedError('"accept" not supported for outgoing Message');if(this._is_replied)throw new Error("incoming Message already replied");this._is_replied=!0,this._request.reply(200,null,t,n)}},{key:"reject",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.status_code||480,n=e.reason_phrase,r=d.cloneArray(e.extraHeaders),i=e.body;if("incoming"!==this._direction)throw new a.NotSupportedError('"reject" not supported for outgoing Message');if(this._is_replied)throw new Error("incoming Message already replied");if(t<300||700<=t)throw new TypeError("Invalid status_code: "+t);this._is_replied=!0,this._request.reply(t,n,r,i)}},{key:"_receiveResponse",value:function(e){if(!this._closed)switch(!0){case/^1[0-9]{2}$/.test(e.status_code):break;case/^2[0-9]{2}$/.test(e.status_code):this._succeeded("remote",e);break;default:var t=d.sipErrorCause(e.status_code);this._failed("remote",e,t)}}},{key:"_onRequestTimeout",value:function(){this._closed||this._failed("system",null,u.causes.REQUEST_TIMEOUT)}},{key:"_onTransportError",value:function(){this._closed||this._failed("system",null,u.causes.CONNECTION_ERROR)}},{key:"_close",value:function(){this._closed=!0,this._ua.destroyMessage(this)}},{key:"_newMessage",value:function(e,t){"remote"===e?(this._direction="incoming",this._local_identity=t.to,this._remote_identity=t.from):"local"===e&&(this._direction="outgoing",this._local_identity=t.from,this._remote_identity=t.to),this._ua.newMessage(this,{originator:e,message:this,request:t})}},{key:"_failed",value:function(e,t,n){o("MESSAGE failed"),this._close(),o('emit "failed"'),this.emit("failed",{originator:e,response:t||null,cause:n})}},{key:"_succeeded",value:function(e,t){o("MESSAGE succeeded"),this._close(),o('emit "succeeded"'),this.emit("succeeded",{originator:e,response:t})}},{key:"direction",get:function(){return this._direction}},{key:"local_identity",get:function(){return this._local_identity}},{key:"remote_identity",get:function(){return this._remote_identity}}]),n}()},{"./Constants":2,"./Exceptions":6,"./RequestSender":18,"./SIPMessage":19,"./Utils":26,debug:29,events:31}],10:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var a=e("./URI"),o=e("./Grammar");t.exports=function(){function i(e,t,n){if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),!(e&&e instanceof a))throw new TypeError('missing or invalid "uri" parameter');for(var r in this._uri=e,this._parameters={},this._display_name=t,n)Object.prototype.hasOwnProperty.call(n,r)&&this.setParam(r,n[r])}return r(i,null,[{key:"parse",value:function(e){return-1!==(e=o.parse(e,"Name_Addr_Header"))?e:void 0}}]),r(i,[{key:"setParam",value:function(e,t){e&&(this._parameters[e.toLowerCase()]=null==t?null:t.toString())}},{key:"getParam",value:function(e){if(e)return this._parameters[e.toLowerCase()]}},{key:"hasParam",value:function(e){if(e)return!!this._parameters.hasOwnProperty(e.toLowerCase())}},{key:"deleteParam",value:function(e){if(e=e.toLowerCase(),this._parameters.hasOwnProperty(e)){var t=this._parameters[e];return delete this._parameters[e],t}}},{key:"clearParams",value:function(){this._parameters={}}},{key:"clone",value:function(){return new i(this._uri.clone(),this._display_name,JSON.parse(JSON.stringify(this._parameters)))}},{key:"toString",value:function(){var e=this._display_name||0===this._display_name?'"'+this._display_name+'" ':"";for(var t in e+="<"+this._uri.toString()+">",this._parameters)Object.prototype.hasOwnProperty.call(this._parameters,t)&&(e+=";"+t,null!==this._parameters[t]&&(e+="="+this._parameters[t]));return e}},{key:"uri",get:function(){return this._uri}},{key:"display_name",get:function(){return this._display_name},set:function(e){this._display_name=0===e?"0":e}}]),i}()},{"./Grammar":7,"./URI":25}],11:[function(e,t,n){"use strict";var y=e("./Grammar"),w=e("./SIPMessage"),l=e("debug")("JsSIP:ERROR:Parser");function u(e,t){var n=t,r=0,i=0;if(e.substring(n,n+2).match(/(^\r\n)/))return-2;for(;0===r;){if(-1===(i=e.indexOf("\r\n",n)))return i;!e.substring(i+2,i+4).match(/(^\r\n)/)&&e.charAt(i+2).match(/(^\s+)/)?n=i+2:r=i}return r}function f(e,t,n,r){var i=void 0,a=t.indexOf(":",n),o=t.substring(n,a).trim(),s=t.substring(a+1,r).trim();switch(o.toLowerCase()){case"via":case"v":e.addHeader("via",s),1===e.getHeaders("via").length?(i=e.parseHeader("Via"))&&(e.via=i,e.via_branch=i.branch):i=0;break;case"from":case"f":e.setHeader("from",s),(i=e.parseHeader("from"))&&(e.from=i,e.from_tag=i.getParam("tag"));break;case"to":case"t":e.setHeader("to",s),(i=e.parseHeader("to"))&&(e.to=i,e.to_tag=i.getParam("tag"));break;case"record-route":if(-1===(i=y.parse(s,"Record_Route")))i=void 0;else{var c=!0,l=!1,u=void 0;try{for(var f,d=i[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){var h=f.value;e.addHeader("record-route",s.substring(h.possition,h.offset)),e.headers["Record-Route"][e.getHeaders("record-route").length-1].parsed=h.parsed}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}}break;case"call-id":case"i":e.setHeader("call-id",s),(i=e.parseHeader("call-id"))&&(e.call_id=s);break;case"contact":case"m":if(-1===(i=y.parse(s,"Contact")))i=void 0;else{var p=!0,m=!1,g=void 0;try{for(var _,b=i[Symbol.iterator]();!(p=(_=b.next()).done);p=!0){var v=_.value;e.addHeader("contact",s.substring(v.possition,v.offset)),e.headers.Contact[e.getHeaders("contact").length-1].parsed=v.parsed}}catch(e){m=!0,g=e}finally{try{!p&&b.return&&b.return()}finally{if(m)throw g}}}break;case"content-length":case"l":e.setHeader("content-length",s),i=e.parseHeader("content-length");break;case"content-type":case"c":e.setHeader("content-type",s),i=e.parseHeader("content-type");break;case"cseq":e.setHeader("cseq",s),(i=e.parseHeader("cseq"))&&(e.cseq=i.value),e instanceof w.IncomingResponse&&(e.method=i.method);break;case"max-forwards":e.setHeader("max-forwards",s),i=e.parseHeader("max-forwards");break;case"www-authenticate":e.setHeader("www-authenticate",s),i=e.parseHeader("www-authenticate");break;case"proxy-authenticate":e.setHeader("proxy-authenticate",s),i=e.parseHeader("proxy-authenticate");break;case"session-expires":case"x":e.setHeader("session-expires",s),(i=e.parseHeader("session-expires"))&&(e.session_expires=i.expires,e.session_expires_refresher=i.refresher);break;case"refer-to":case"r":e.setHeader("refer-to",s),(i=e.parseHeader("refer-to"))&&(e.refer_to=i);break;case"replaces":e.setHeader("replaces",s),(i=e.parseHeader("replaces"))&&(e.replaces=i);break;case"event":case"o":e.setHeader("event",s),(i=e.parseHeader("event"))&&(e.event=i);break;default:e.addHeader(o,s),i=0}return void 0!==i||{error:'error parsing header "'+o+'"'}}l.log=console.warn.bind(console),n.parseMessage=function(e,t){var n=void 0,r=void 0,i=e.indexOf("\r\n");if(-1!==i){var a=e.substring(0,i),o=y.parse(a,"Request_Response");if(-1!==o){o.status_code?((n=new w.IncomingResponse).status_code=o.status_code,n.reason_phrase=o.reason_phrase):((n=new w.IncomingRequest(t)).method=o.method,n.ruri=o.uri),n.data=e;for(var s=i+2;;){if(-2===(i=u(e,s))){r=s+2;break}if(-1===i)return void l("parseMessage() | malformed message");if(!0!==(o=f(n,e,s,i)))return void l("parseMessage() |",o.error);s=i+2}if(n.hasHeader("content-length")){var c=n.getHeader("content-length");n.body=e.substr(r,c)}else n.body=e.substring(r);return n}l('parseMessage() | error parsing first line of SIP message: "'+a+'"')}else l("parseMessage() | no CRLF found, not a SIP message")}},{"./Grammar":7,"./SIPMessage":19,debug:29}],12:[function(e,t,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},i=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var a=e("events").EventEmitter,v=e("sdp-transform"),$=e("./Constants"),O=e("./Exceptions"),l=e("./Transactions"),R=e("./Utils"),s=e("./Timers"),p=e("./SIPMessage"),c=e("./Dialog"),u=e("./RequestSender"),f=e("./RTCSession/DTMF"),d=e("./RTCSession/Info"),h=e("./RTCSession/ReferNotifier"),m=e("./RTCSession/ReferSubscriber"),N=e("debug")("JsSIP:RTCSession"),L=e("debug")("JsSIP:ERROR:RTCSession");L.log=console.warn.bind(console);var F={STATUS_NULL:0,STATUS_INVITE_SENT:1,STATUS_1XX_RECEIVED:2,STATUS_INVITE_RECEIVED:3,STATUS_WAITING_FOR_ANSWER:4,STATUS_ANSWERED:5,STATUS_WAITING_FOR_ACK:6,STATUS_CANCELED:7,STATUS_TERMINATED:8,STATUS_CONFIRMED:9},y=["audio","video"];t.exports=function(e){function o(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,o),N("new");var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));return t._id=null,t._ua=e,t._status=F.STATUS_NULL,t._dialog=null,t._earlyDialogs={},t._contact=null,t._from_tag=null,t._to_tag=null,t._connection=null,t._connectionPromiseQueue=Promise.resolve(),t._request=null,t._is_canceled=!1,t._cancel_reason="",t._is_confirmed=!1,t._late_sdp=!1,t._rtcOfferConstraints=null,t._rtcAnswerConstraints=null,t._localMediaStream=null,t._localMediaStreamLocallyGenerated=!1,t._rtcReady=!0,t._timers={ackTimer:null,expiresTimer:null,invite2xxTimer:null,userNoAnswerTimer:null},t._direction=null,t._local_identity=null,t._remote_identity=null,t._start_time=null,t._end_time=null,t._tones=null,t._audioMuted=!1,t._videoMuted=!1,t._localHold=!1,t._remoteHold=!1,t._sessionTimers={enabled:t._ua.configuration.session_timers,refreshMethod:t._ua.configuration.session_timers_refresh_method,defaultExpires:$.SESSION_EXPIRES,currentExpires:null,running:!1,refresher:!1,timer:null},t._referSubscribers={},t._data={},t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,a),i(o,null,[{key:"C",get:function(){return F}}]),i(o,[{key:"isInProgress",value:function(){switch(this._status){case F.STATUS_NULL:case F.STATUS_INVITE_SENT:case F.STATUS_1XX_RECEIVED:case F.STATUS_INVITE_RECEIVED:case F.STATUS_WAITING_FOR_ANSWER:return!0;default:return!1}}},{key:"isEstablished",value:function(){switch(this._status){case F.STATUS_ANSWERED:case F.STATUS_WAITING_FOR_ACK:case F.STATUS_CONFIRMED:return!0;default:return!1}}},{key:"isEnded",value:function(){switch(this._status){case F.STATUS_CANCELED:case F.STATUS_TERMINATED:return!0;default:return!1}}},{key:"isMuted",value:function(){return{audio:this._audioMuted,video:this._videoMuted}}},{key:"isOnHold",value:function(){return{local:this._localHold,remote:this._remoteHold}}},{key:"connect",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=arguments[2];N("connect()");var r=e,i=t.eventHandlers||{},a=R.cloneArray(t.extraHeaders),o=t.mediaConstraints||{audio:!0,video:!0},s=t.mediaStream||null,c=t.pcConfig||{iceServers:[]},l=t.rtcConstraints||null,u=t.rtcOfferConstraints||null;if(this._rtcOfferConstraints=u,this._rtcAnswerConstraints=t.rtcAnswerConstraints||null,this._data=t.data||this._data,void 0===e)throw new TypeError("Not enough arguments");if(this._status!==F.STATUS_NULL)throw new O.InvalidStateError(this._status);if(!window.RTCPeerConnection)throw new O.NotSupportedError("WebRTC not supported");if(!(e=this._ua.normalizeTarget(e)))throw new TypeError("Invalid target: "+r);for(var f in this._sessionTimers.enabled&&R.isDecimal(t.sessionTimersExpires)&&(t.sessionTimersExpires>=$.MIN_SESSION_EXPIRES?this._sessionTimers.defaultExpires=t.sessionTimersExpires:this._sessionTimers.defaultExpires=$.SESSION_EXPIRES),i)Object.prototype.hasOwnProperty.call(i,f)&&this.on(f,i[f]);this._from_tag=R.newTag();var d=t.anonymous||!1,h={from_tag:this._from_tag};this._contact=this._ua.contact.toString({anonymous:d,outbound:!0}),d&&(h.from_display_name="Anonymous",h.from_uri="sip:anonymous@anonymous.invalid",a.push("P-Preferred-Identity: "+this._ua.configuration.uri.toString()),a.push("Privacy: id")),a.push("Contact: "+this._contact),a.push("Content-Type: application/sdp"),this._sessionTimers.enabled&&a.push("Session-Expires: "+this._sessionTimers.defaultExpires),this._request=new p.InitialOutgoingInviteRequest(e,this._ua,h,a),this._id=this._request.call_id+this._from_tag,this._createRTCConnection(c,l),this._direction="outgoing",this._local_identity=this._request.from,this._remote_identity=this._request.to,n&&n(this),this._newRTCSession("local",this._request),this._sendInitialRequest(o,u,s)}},{key:"init_incoming",value:function(e,t){var n=this;N("init_incoming()");var r=void 0,i=e.getHeader("Content-Type");e.body&&"application/sdp"!==i?e.reply(415):(this._status=F.STATUS_INVITE_RECEIVED,this._from_tag=e.from_tag,this._id=e.call_id+this._from_tag,this._request=e,this._contact=this._ua.contact.toString(),e.hasHeader("expires")&&(r=1e3*e.getHeader("expires")),e.to_tag=R.newTag(),this._createDialog(e,"UAS",!0)?(e.body?this._late_sdp=!1:this._late_sdp=!0,this._status=F.STATUS_WAITING_FOR_ANSWER,this._timers.userNoAnswerTimer=setTimeout(function(){e.reply(408),n._failed("local",null,$.causes.NO_ANSWER)},this._ua.configuration.no_answer_timeout),r&&(this._timers.expiresTimer=setTimeout(function(){n._status===F.STATUS_WAITING_FOR_ANSWER&&(e.reply(487),n._failed("system",null,$.causes.EXPIRES))},r)),this._direction="incoming",this._local_identity=e.to,this._remote_identity=e.from,t&&t(this),this._newRTCSession("remote",e),this._status!==F.STATUS_TERMINATED&&(e.reply(180,null,["Contact: "+this._contact]),this._progress("local",null))):e.reply(500,"Missing Contact header field"))}},{key:"answer",value:function(){var n=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};N("answer()");var r=this._request,t=R.cloneArray(e.extraHeaders),i=e.mediaConstraints||{},a=e.mediaStream||null,o=e.pcConfig||{iceServers:[]},s=e.rtcConstraints||null,c=e.rtcAnswerConstraints||null,l=void 0,u=!1,f=!1,d=!1,h=!1;if(this._rtcAnswerConstraints=c,this._rtcOfferConstraints=e.rtcOfferConstraints||null,this._data=e.data||this._data,"incoming"!==this._direction)throw new O.NotSupportedError('"answer" not supported for outgoing RTCSession');if(this._status!==F.STATUS_WAITING_FOR_ANSWER)throw new O.InvalidStateError(this._status);if(this._sessionTimers.enabled&&R.isDecimal(e.sessionTimersExpires)&&(e.sessionTimersExpires>=$.MIN_SESSION_EXPIRES?this._sessionTimers.defaultExpires=e.sessionTimersExpires:this._sessionTimers.defaultExpires=$.SESSION_EXPIRES),this._status=F.STATUS_ANSWERED,this._createDialog(r,"UAS")){clearTimeout(this._timers.userNoAnswerTimer),t.unshift("Contact: "+this._contact);var p=r.parseSDP();Array.isArray(p.media)||(p.media=[p.media]);var m=!0,g=!1,_=void 0;try{for(var b,v=p.media[Symbol.iterator]();!(m=(b=v.next()).done);m=!0){var y=b.value;"audio"===y.type&&(u=!0,y.direction&&"sendrecv"!==y.direction||(d=!0)),"video"===y.type&&(f=!0,y.direction&&"sendrecv"!==y.direction||(h=!0))}}catch(e){g=!0,_=e}finally{try{!m&&v.return&&v.return()}finally{if(g)throw _}}if(a&&!1===i.audio){l=a.getAudioTracks();var w=!0,C=!1,A=void 0;try{for(var S,T=l[Symbol.iterator]();!(w=(S=T.next()).done);w=!0){var x=S.value;a.removeTrack(x)}}catch(e){C=!0,A=e}finally{try{!w&&T.return&&T.return()}finally{if(C)throw A}}}if(a&&!1===i.video){l=a.getVideoTracks();var k=!0,E=!1,D=void 0;try{for(var I,P=l[Symbol.iterator]();!(k=(I=P.next()).done);k=!0){var M=I.value;a.removeTrack(M)}}catch(e){E=!0,D=e}finally{try{!k&&P.return&&P.return()}finally{if(E)throw D}}}a||void 0!==i.audio||(i.audio=d),a||void 0!==i.video||(i.video=h),a||u||(i.audio=!1),a||f||(i.video=!1),this._createRTCConnection(o,s),Promise.resolve().then(function(){return a||(i.audio||i.video?(n._localMediaStreamLocallyGenerated=!0,navigator.mediaDevices.getUserMedia(i).catch(function(e){if(n._status===F.STATUS_TERMINATED)throw new Error("terminated");throw r.reply(480),n._failed("local",null,$.causes.USER_DENIED_MEDIA_ACCESS),L('emit "getusermediafailed" [error:%o]',e),n.emit("getusermediafailed",e),new Error("getUserMedia() failed")})):void 0)}).then(function(e){if(n._status===F.STATUS_TERMINATED)throw new Error("terminated");(n._localMediaStream=e)&&n._connection.addStream(e)}).then(function(){if(!n._late_sdp){var e={originator:"remote",type:"offer",sdp:r.body};N('emit "sdp"'),n.emit("sdp",e);var t=new RTCSessionDescription({type:"offer",sdp:e.sdp});return n._connectionPromiseQueue=n._connectionPromiseQueue.then(function(){return n._connection.setRemoteDescription(t)}).catch(function(e){throw r.reply(488),n._failed("system",null,$.causes.WEBRTC_ERROR),L('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),n.emit("peerconnection:setremotedescriptionfailed",e),new Error("peerconnection.setRemoteDescription() failed")}),n._connectionPromiseQueue}}).then(function(){if(n._status===F.STATUS_TERMINATED)throw new Error("terminated");return n._connecting(r),n._late_sdp?n._createLocalDescription("offer",n._rtcOfferConstraints).catch(function(){throw r.reply(500),new Error("_createLocalDescription() failed")}):n._createLocalDescription("answer",c).catch(function(){throw r.reply(500),new Error("_createLocalDescription() failed")})}).then(function(e){if(n._status===F.STATUS_TERMINATED)throw new Error("terminated");n._handleSessionTimersInIncomingRequest(r,t),r.reply(200,null,t,e,function(){n._status=F.STATUS_WAITING_FOR_ACK,n._setInvite2xxTimer(r,e),n._setACKTimer(),n._accepted("local")},function(){n._failed("system",null,$.causes.CONNECTION_ERROR)})}).catch(function(e){n._status!==F.STATUS_TERMINATED&&L(e)})}else r.reply(500,"Error creating dialog")}},{key:"terminate",value:function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};N("terminate()");var n=e.cause||$.causes.BYE,r=R.cloneArray(e.extraHeaders),i=e.body,a=void 0,o=e.status_code,s=e.reason_phrase;if(this._status===F.STATUS_TERMINATED)throw new O.InvalidStateError(this._status);switch(this._status){case F.STATUS_NULL:case F.STATUS_INVITE_SENT:case F.STATUS_1XX_RECEIVED:if(N("canceling session"),o&&(o<200||700<=o))throw new TypeError("Invalid status_code: "+o);o&&(a="SIP ;cause="+o+' ;text="'+(s=s||$.REASON_PHRASE[o]||"")+'"'),this._status===F.STATUS_NULL||this._status===F.STATUS_INVITE_SENT?(this._is_canceled=!0,this._cancel_reason=a):this._status===F.STATUS_1XX_RECEIVED&&this._request.cancel(a),this._status=F.STATUS_CANCELED,this._failed("local",null,$.causes.CANCELED);break;case F.STATUS_WAITING_FOR_ANSWER:case F.STATUS_ANSWERED:if(N("rejecting session"),(o=o||480)<300||700<=o)throw new TypeError("Invalid status_code: "+o);this._request.reply(o,s,r,i),this._failed("local",null,$.causes.REJECTED);break;case F.STATUS_WAITING_FOR_ACK:case F.STATUS_CONFIRMED:if(N("terminating session"),s=e.reason_phrase||$.REASON_PHRASE[o]||"",o&&(o<200||700<=o))throw new TypeError("Invalid status_code: "+o);if(o&&r.push("Reason: SIP ;cause="+o+'; text="'+s+'"'),this._status===F.STATUS_WAITING_FOR_ACK&&"incoming"===this._direction&&this._request.server_transaction.state!==l.C.STATUS_TERMINATED){var c=this._dialog;this.receiveRequest=function(e){e.method===$.ACK&&(t.sendRequest($.BYE,{extraHeaders:r,body:i}),c.terminate())},this._request.server_transaction.on("stateChanged",function(){t._request.server_transaction.state===l.C.STATUS_TERMINATED&&(t.sendRequest($.BYE,{extraHeaders:r,body:i}),c.terminate())}),this._ended("local",null,n),this._dialog=c,this._ua.newDialog(c)}else this.sendRequest($.BYE,{extraHeaders:r,body:i}),this._ended("local",null,n)}}},{key:"sendDTMF",value:function(e){var a=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};N("sendDTMF() | tones: %s",e);var o=0,s=a.duration||null,c=a.interToneGap||null;if(void 0===e)throw new TypeError("Not enough arguments");if(this._status!==F.STATUS_CONFIRMED&&this._status!==F.STATUS_WAITING_FOR_ACK)throw new O.InvalidStateError(this._status);if("number"==typeof e&&(e=e.toString()),!e||"string"!=typeof e||!e.match(/^[0-9A-DR#*,]+$/i))throw new TypeError("Invalid tones: "+e);if(s&&!R.isDecimal(s))throw new TypeError("Invalid tone duration: "+s);if(s=s?s<f.C.MIN_DURATION?(N('"duration" value is lower than the minimum allowed, setting it to '+f.C.MIN_DURATION+" milliseconds"),f.C.MIN_DURATION):s>f.C.MAX_DURATION?(N('"duration" value is greater than the maximum allowed, setting it to '+f.C.MAX_DURATION+" milliseconds"),f.C.MAX_DURATION):Math.abs(s):f.C.DEFAULT_DURATION,a.duration=s,c&&!R.isDecimal(c))throw new TypeError("Invalid interToneGap: "+c);c=c?c<f.C.MIN_INTER_TONE_GAP?(N('"interToneGap" value is lower than the minimum allowed, setting it to '+f.C.MIN_INTER_TONE_GAP+" milliseconds"),f.C.MIN_INTER_TONE_GAP):Math.abs(c):f.C.DEFAULT_INTER_TONE_GAP,this._tones?this._tones+=e:(this._tones=e,function e(){var t=this;var n=void 0;if(this._status===F.STATUS_TERMINATED||!this._tones||o>=this._tones.length)return void(this._tones=null);var r=this._tones[o];o+=1;if(","===r)n=2e3;else{var i=new f(this);a.eventHandlers={onFailed:function(){t._tones=null}},i.send(r,a),n=s+c}setTimeout(e.bind(this),n)}.call(this))}},{key:"sendInfo",value:function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(N("sendInfo()"),this._status!==F.STATUS_CONFIRMED&&this._status!==F.STATUS_WAITING_FOR_ACK)throw new O.InvalidStateError(this._status);new d(this).send(e,t,n)}},{key:"mute",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{audio:!0,video:!1};N("mute()");var t=!1,n=!1;!1===this._audioMuted&&e.audio&&(t=!0,this._audioMuted=!0,this._toogleMuteAudio(!0)),!1===this._videoMuted&&e.video&&(n=!0,this._videoMuted=!0,this._toogleMuteVideo(!0)),!0!==t&&!0!==n||this._onmute({audio:t,video:n})}},{key:"unmute",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{audio:!0,video:!0};N("unmute()");var t=!1,n=!1;!0===this._audioMuted&&e.audio&&(t=!0,(this._audioMuted=!1)===this._localHold&&this._toogleMuteAudio(!1)),!0===this._videoMuted&&e.video&&(n=!0,(this._videoMuted=!1)===this._localHold&&this._toogleMuteVideo(!1)),!0!==t&&!0!==n||this._onunmute({audio:t,video:n})}},{key:"hold",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1];if(N("hold()"),this._status!==F.STATUS_WAITING_FOR_ACK&&this._status!==F.STATUS_CONFIRMED)return!1;if(!0===this._localHold)return!1;if(!this._isReadyToReOffer())return!1;this._localHold=!0,this._onhold("local");var r={succeeded:function(){n&&n()},failed:function(){e.terminate({cause:$.causes.WEBRTC_ERROR,status_code:500,reason_phrase:"Hold Failed"})}};return t.useUpdate?this._sendUpdate({sdpOffer:!0,eventHandlers:r,extraHeaders:t.extraHeaders}):this._sendReinvite({eventHandlers:r,extraHeaders:t.extraHeaders}),!0}},{key:"unhold",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1];if(N("unhold()"),this._status!==F.STATUS_WAITING_FOR_ACK&&this._status!==F.STATUS_CONFIRMED)return!1;if(!1===this._localHold)return!1;if(!this._isReadyToReOffer())return!1;this._localHold=!1,this._onunhold("local");var r={succeeded:function(){n&&n()},failed:function(){e.terminate({cause:$.causes.WEBRTC_ERROR,status_code:500,reason_phrase:"Unhold Failed"})}};return t.useUpdate?this._sendUpdate({sdpOffer:!0,eventHandlers:r,extraHeaders:t.extraHeaders}):this._sendReinvite({eventHandlers:r,extraHeaders:t.extraHeaders}),!0}},{key:"renegotiate",value:function(){var e=this,t=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},n=arguments[1];N("renegotiate()");var r=t.rtcOfferConstraints||null;if(this._status!==F.STATUS_WAITING_FOR_ACK&&this._status!==F.STATUS_CONFIRMED)return!1;if(!this._isReadyToReOffer())return!1;var i={succeeded:function(){n&&n()},failed:function(){e.terminate({cause:$.causes.WEBRTC_ERROR,status_code:500,reason_phrase:"Media Renegotiation Failed"})}};return this._setLocalMediaStatus(),t.useUpdate?this._sendUpdate({sdpOffer:!0,eventHandlers:i,rtcOfferConstraints:r,extraHeaders:t.extraHeaders}):this._sendReinvite({eventHandlers:i,rtcOfferConstraints:r,extraHeaders:t.extraHeaders}),!0}},{key:"refer",value:function(e,t){var n=this;N("refer()");var r=e;if(this._status!==F.STATUS_WAITING_FOR_ACK&&this._status!==F.STATUS_CONFIRMED)return!1;if(!(e=this._ua.normalizeTarget(e)))throw new TypeError("Invalid target: "+r);var i=new m(this);i.sendRefer(e,t);var a=i.id;return(this._referSubscribers[a]=i).on("requestFailed",function(){delete n._referSubscribers[a]}),i.on("accepted",function(){delete n._referSubscribers[a]}),i.on("failed",function(){delete n._referSubscribers[a]}),i}},{key:"sendRequest",value:function(e,t){return N("sendRequest()"),this._dialog.sendRequest(e,t)}},{key:"receiveRequest",value:function(e){var t=this;if(N("receiveRequest()"),e.method===$.CANCEL)this._status!==F.STATUS_WAITING_FOR_ANSWER&&this._status!==F.STATUS_ANSWERED||(this._status=F.STATUS_CANCELED,this._request.reply(487),this._failed("remote",e,$.causes.CANCELED));else switch(e.method){case $.ACK:if(this._status!==F.STATUS_WAITING_FOR_ACK)return;if(this._status=F.STATUS_CONFIRMED,clearTimeout(this._timers.ackTimer),clearTimeout(this._timers.invite2xxTimer),this._late_sdp){if(!e.body){this.terminate({cause:$.causes.MISSING_SDP,status_code:400});break}var n={originator:"remote",type:"answer",sdp:e.body};N('emit "sdp"'),this.emit("sdp",n);var r=new RTCSessionDescription({type:"answer",sdp:n.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._connection.setRemoteDescription(r)}).then(function(){t._is_confirmed||t._confirmed("remote",e)}).catch(function(e){t.terminate({cause:$.causes.BAD_MEDIA_DESCRIPTION,status_code:488}),L('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),t.emit("peerconnection:setremotedescriptionfailed",e)})}else this._is_confirmed||this._confirmed("remote",e);break;case $.BYE:this._status===F.STATUS_CONFIRMED?(e.reply(200),this._ended("remote",e,$.causes.BYE)):this._status===F.STATUS_INVITE_RECEIVED?(e.reply(200),this._request.reply(487,"BYE Received"),this._ended("remote",e,$.causes.BYE)):e.reply(403,"Wrong Status");break;case $.INVITE:this._status===F.STATUS_CONFIRMED?e.hasHeader("replaces")?this._receiveReplaces(e):this._receiveReinvite(e):e.reply(403,"Wrong Status");break;case $.INFO:if(this._status===F.STATUS_1XX_RECEIVED||this._status===F.STATUS_WAITING_FOR_ANSWER||this._status===F.STATUS_ANSWERED||this._status===F.STATUS_WAITING_FOR_ACK||this._status===F.STATUS_CONFIRMED){var i=e.getHeader("content-type");i&&i.match(/^application\/dtmf-relay/i)?new f(this).init_incoming(e):void 0!==i?new d(this).init_incoming(e):e.reply(415)}else e.reply(403,"Wrong Status");break;case $.UPDATE:this._status===F.STATUS_CONFIRMED?this._receiveUpdate(e):e.reply(403,"Wrong Status");break;case $.REFER:this._status===F.STATUS_CONFIRMED?this._receiveRefer(e):e.reply(403,"Wrong Status");break;case $.NOTIFY:this._status===F.STATUS_CONFIRMED?this._receiveNotify(e):e.reply(403,"Wrong Status");break;default:e.reply(501)}}},{key:"onTransportError",value:function(){L("onTransportError()"),this._status!==F.STATUS_TERMINATED&&this.terminate({status_code:500,reason_phrase:$.causes.CONNECTION_ERROR,cause:$.causes.CONNECTION_ERROR})}},{key:"onRequestTimeout",value:function(){L("onRequestTimeout()"),this._status!==F.STATUS_TERMINATED&&this.terminate({status_code:408,reason_phrase:$.causes.REQUEST_TIMEOUT,cause:$.causes.REQUEST_TIMEOUT})}},{key:"onDialogError",value:function(){L("onDialogError()"),this._status!==F.STATUS_TERMINATED&&this.terminate({status_code:500,reason_phrase:$.causes.DIALOG_ERROR,cause:$.causes.DIALOG_ERROR})}},{key:"newDTMF",value:function(e){N("newDTMF()"),this.emit("newDTMF",e)}},{key:"newInfo",value:function(e){N("newInfo()"),this.emit("newInfo",e)}},{key:"_isReadyToReOffer",value:function(){return this._rtcReady?this._dialog?!0!==this._dialog.uac_pending_reply&&!0!==this._dialog.uas_pending_reply||(N("_isReadyToReOffer() | there is another INVITE/UPDATE transaction in progress"),!1):(N("_isReadyToReOffer() | session not established yet"),!1):(N("_isReadyToReOffer() | internal WebRTC status not ready"),!1)}},{key:"_close",value:function(){if(N("close()"),this._status!==F.STATUS_TERMINATED){if(this._status=F.STATUS_TERMINATED,this._connection)try{this._connection.close()}catch(e){L("close() | error closing the RTCPeerConnection: %o",e)}for(var e in this._localMediaStream&&this._localMediaStreamLocallyGenerated&&(N("close() | closing local MediaStream"),R.closeMediaStream(this._localMediaStream)),this._timers)Object.prototype.hasOwnProperty.call(this._timers,e)&&clearTimeout(this._timers[e]);for(var t in clearTimeout(this._sessionTimers.timer),this._dialog&&(this._dialog.terminate(),delete this._dialog),this._earlyDialogs)Object.prototype.hasOwnProperty.call(this._earlyDialogs,t)&&(this._earlyDialogs[t].terminate(),delete this._earlyDialogs[t]);for(var n in this._referSubscribers)Object.prototype.hasOwnProperty.call(this._referSubscribers,n)&&delete this._referSubscribers[n];this._ua.destroyRTCSession(this)}}},{key:"_setInvite2xxTimer",value:function(t,n){var r=s.T1;this._timers.invite2xxTimer=setTimeout(function e(){this._status===F.STATUS_WAITING_FOR_ACK&&(t.reply(200,null,["Contact: "+this._contact],n),r<s.T2&&(r*=2)>s.T2&&(r=s.T2),this._timers.invite2xxTimer=setTimeout(e.bind(this),r))}.bind(this),r)}},{key:"_setACKTimer",value:function(){var e=this;this._timers.ackTimer=setTimeout(function(){e._status===F.STATUS_WAITING_FOR_ACK&&(N("no ACK received, terminating the session"),clearTimeout(e._timers.invite2xxTimer),e.sendRequest($.BYE),e._ended("remote",null,$.causes.NO_ACK))},s.TIMER_H)}},{key:"_createRTCConnection",value:function(e,t){var n=this;this._connection=new RTCPeerConnection(e,t),this._connection.addEventListener("iceconnectionstatechange",function(){"failed"===n._connection.iceConnectionState&&n.terminate({cause:$.causes.RTP_TIMEOUT,status_code:408,reason_phrase:$.causes.RTP_TIMEOUT})}),N('emit "peerconnection"'),this.emit("peerconnection",{peerconnection:this._connection})}},{key:"_createLocalDescription",value:function(a,e){var o=this;if(N("createLocalDescription()"),"offer"!==a&&"answer"!==a)throw new Error('createLocalDescription() | invalid type "'+a+'"');var s=this._connection;return this._rtcReady=!1,Promise.resolve().then(function(){return"offer"===a?s.createOffer(e).catch(function(e){return L('emit "peerconnection:createofferfailed" [error:%o]',e),o.emit("peerconnection:createofferfailed",e),Promise.reject(e)}):s.createAnswer(e).catch(function(e){return L('emit "peerconnection:createanswerfailed" [error:%o]',e),o.emit("peerconnection:createanswerfailed",e),Promise.reject(e)})}).then(function(e){return s.setLocalDescription(e).catch(function(e){return o._rtcReady=!0,L('emit "peerconnection:setlocaldescriptionfailed" [error:%o]',e),o.emit("peerconnection:setlocaldescriptionfailed",e),Promise.reject(e)})}).then(function(){if("complete"!==s.iceGatheringState)return new Promise(function(t){var n=!1,r=void 0,i=function(){s.removeEventListener("icecandidate",r),n=!0,o._rtcReady=!0;var e={originator:"local",type:a,sdp:s.localDescription.sdp};N('emit "sdp"'),o.emit("sdp",e),t(e.sdp)};s.addEventListener("icecandidate",r=function(e){var t=e.candidate;t?o.emit("icecandidate",{candidate:t,ready:i}):n||i()})});o._rtcReady=!0;var e={originator:"local",type:a,sdp:s.localDescription.sdp};return N('emit "sdp"'),o.emit("sdp",e),Promise.resolve(e.sdp)})}},{key:"_createDialog",value:function(e,t,n){var r="UAS"===t?e.to_tag:e.from_tag,i="UAS"===t?e.from_tag:e.to_tag,a=e.call_id+r+i,o=this._earlyDialogs[a];if(n)return!!o||((o=new c(this,e,t,c.C.STATUS_EARLY)).error?(N(o.error),this._failed("remote",e,$.causes.INTERNAL_ERROR),!1):(this._earlyDialogs[a]=o,!0));if(this._from_tag=e.from_tag,this._to_tag=e.to_tag,o)return o.update(e,t),this._dialog=o,delete this._earlyDialogs[a],!0;var s=new c(this,e,t);return s.error?(N(s.error),this._failed("remote",e,$.causes.INTERNAL_ERROR),!1):(this._dialog=s,!0)}},{key:"_receiveReinvite",value:function(i){var t=this;N("receiveReinvite()");var e=i.getHeader("Content-Type"),r={request:i,callback:void 0,reject:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};a=!0;var t=e.status_code||403,n=e.reason_phrase||"",r=R.cloneArray(e.extraHeaders);if(this._status!==F.STATUS_CONFIRMED)return!1;if(t<300||700<=t)throw new TypeError("Invalid status_code: "+t);i.reply(t,n,r)}.bind(this)},a=!1;if(this.emit("reinvite",r),!a){if(this._late_sdp=!1,!i.body)return this._late_sdp=!0,void(this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._createLocalDescription("offer",t._rtcOfferConstraints)}).then(function(e){n.call(t,e)}).catch(function(){i.reply(500)}));if("application/sdp"!==e)return N("invalid Content-Type"),void i.reply(415);this._processInDialogSdpOffer(i).then(function(e){t._status!==F.STATUS_TERMINATED&&n.call(t,e)}).catch(function(e){L(e)})}function n(e){var t=this,n=["Contact: "+this._contact];this._handleSessionTimersInIncomingRequest(i,n),this._late_sdp&&(e=this._mangleOffer(e)),i.reply(200,null,n,e,function(){t._status=F.STATUS_WAITING_FOR_ACK,t._setInvite2xxTimer(i,e),t._setACKTimer()}),"function"==typeof r.callback&&r.callback()}}},{key:"_receiveUpdate",value:function(i){var t=this;N("receiveUpdate()");var e=i.getHeader("Content-Type"),n={request:i,callback:void 0,reject:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};a=!0;var t=e.status_code||403,n=e.reason_phrase||"",r=R.cloneArray(e.extraHeaders);if(this._status!==F.STATUS_CONFIRMED)return!1;if(t<300||700<=t)throw new TypeError("Invalid status_code: "+t);i.reply(t,n,r)}.bind(this)},a=!1;if(this.emit("update",n),!a)if(i.body){if("application/sdp"!==e)return N("invalid Content-Type"),void i.reply(415);this._processInDialogSdpOffer(i).then(function(e){t._status!==F.STATUS_TERMINATED&&r.call(t,e)}).catch(function(e){L(e)})}else r.call(this,null);function r(e){var t=["Contact: "+this._contact];this._handleSessionTimersInIncomingRequest(i,t),i.reply(200,null,t,e),"function"==typeof n.callback&&n.callback()}}},{key:"_processInDialogSdpOffer",value:function(t){var n=this;N("_processInDialogSdpOffer()");var e=t.parseSDP(),r=!1,i=!0,a=!1,o=void 0;try{for(var s,c=e.media[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var l=s.value;if(-1!==y.indexOf(l.type)){var u=l.direction||e.direction||"sendrecv";if("sendonly"!==u&&"inactive"!==u){r=!1;break}r=!0}}}catch(e){a=!0,o=e}finally{try{!i&&c.return&&c.return()}finally{if(a)throw o}}var f={originator:"remote",type:"offer",sdp:t.body};N('emit "sdp"'),this.emit("sdp",f);var d=new RTCSessionDescription({type:"offer",sdp:f.sdp});return this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){if(n._status===F.STATUS_TERMINATED)throw new Error("terminated");return n._connection.setRemoteDescription(d).catch(function(e){throw t.reply(488),L('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),n.emit("peerconnection:setremotedescriptionfailed",e),new Error("peerconnection.setRemoteDescription() failed")})}).then(function(){if(n._status===F.STATUS_TERMINATED)throw new Error("terminated");!0===n._remoteHold&&!1===r?(n._remoteHold=!1,n._onunhold("remote")):!1===n._remoteHold&&!0===r&&(n._remoteHold=!0,n._onhold("remote"))}).then(function(){if(n._status===F.STATUS_TERMINATED)throw new Error("terminated");return n._createLocalDescription("answer",n._rtcAnswerConstraints).catch(function(){throw t.reply(500),new Error("_createLocalDescription() failed")})}),this._connectionPromiseQueue}},{key:"_receiveRefer",value:function(i){var n=this;if(N("receiveRefer()"),void 0===r(i.refer_to))return N("no Refer-To header field present in REFER"),void i.reply(400);if(i.refer_to.uri.scheme!==$.SIP)return N("Refer-To header field points to a non-SIP URI scheme"),void i.reply(416);i.reply(202);var a=new h(this,i.cseq);N('emit "refer"'),this.emit("refer",{request:i,accept:function(e,t){(function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(e="function"==typeof e?e:null,this._status!==F.STATUS_WAITING_FOR_ACK&&this._status!==F.STATUS_CONFIRMED)return!1;var n=new o(this._ua);if(n.on("progress",function(e){var t=e.response;a.notify(t.status_code,t.reason_phrase)}),n.on("accepted",function(e){var t=e.response;a.notify(t.status_code,t.reason_phrase)}),n.on("failed",function(e){var t=e.message,n=e.cause;t?a.notify(t.status_code,t.reason_phrase):a.notify(487,n)}),i.refer_to.uri.hasHeader("replaces")){var r=decodeURIComponent(i.refer_to.uri.getHeader("replaces"));t.extraHeaders=R.cloneArray(t.extraHeaders),t.extraHeaders.push("Replaces: "+r)}n.connect(i.refer_to.uri.toAor(),t,e)}).call(n,e,t)},reject:function(){(function(){a.notify(603)}).call(n)}})}},{key:"_receiveNotify",value:function(e){switch(N("receiveNotify()"),void 0===r(e.event)&&e.reply(400),e.event.event){case"refer":var t=void 0,n=void 0;if(e.event.params&&e.event.params.id)t=e.event.params.id,n=this._referSubscribers[t];else{if(1!==Object.keys(this._referSubscribers).length)return void e.reply(400,"Missing event id parameter");n=this._referSubscribers[Object.keys(this._referSubscribers)[0]]}if(!n)return void e.reply(481,"Subscription does not exist");n.receiveNotify(e),e.reply(200);break;default:e.reply(489)}}},{key:"_receiveReplaces",value:function(r){var t=this;N("receiveReplaces()"),this.emit("replaces",{request:r,accept:function(e){(function(e){var t=this;if(this._status!==F.STATUS_WAITING_FOR_ACK&&this._status!==F.STATUS_CONFIRMED)return!1;var n=new o(this._ua);n.on("confirmed",function(){t.terminate()}),n.init_incoming(r,e)}).call(t,e)},reject:function(){(function(){N("Replaced INVITE rejected by the user"),r.reply(486)}).call(t)}})}},{key:"_sendInitialRequest",value:function(e,t,n){var r=this,i=new u(this._ua,this._request,{onRequestTimeout:function(){r.onRequestTimeout()},onTransportError:function(){r.onTransportError()},onAuthenticated:function(e){r._request=e},onReceiveResponse:function(e){r._receiveInviteResponse(e)}});Promise.resolve().then(function(){return n||(e.audio||e.video?(r._localMediaStreamLocallyGenerated=!0,navigator.mediaDevices.getUserMedia(e).catch(function(e){if(r._status===F.STATUS_TERMINATED)throw new Error("terminated");throw r._failed("local",null,$.causes.USER_DENIED_MEDIA_ACCESS),L('emit "getusermediafailed" [error:%o]',e),r.emit("getusermediafailed"),e})):void 0)}).then(function(e){if(r._status===F.STATUS_TERMINATED)throw new Error("terminated");return(r._localMediaStream=e)&&r._connection.addStream(e),r._connecting(r._request),r._createLocalDescription("offer",t).catch(function(e){throw r._failed("local",null,$.causes.WEBRTC_ERROR),e})}).then(function(e){if(r._is_canceled||r._status===F.STATUS_TERMINATED)throw new Error("terminated");r._request.body=e,r._status=F.STATUS_INVITE_SENT,N('emit "sending" [request:%o]',r._request),r.emit("sending",{request:r._request}),i.send()}).catch(function(e){r._status!==F.STATUS_TERMINATED&&L(e)})}},{key:"_receiveInviteResponse",value:function(t){var n=this;if(N("receiveInviteResponse()"),this._dialog&&200<=t.status_code&&t.status_code<=299){if(this._dialog.id.call_id===t.call_id&&this._dialog.id.local_tag===t.from_tag&&this._dialog.id.remote_tag===t.to_tag)return void this.sendRequest($.ACK);var e=new c(this,t,"UAC");return void 0!==e.error?void N(e.error):(this.sendRequest($.ACK),void this.sendRequest($.BYE))}if(this._is_canceled)100<=t.status_code&&t.status_code<200?this._request.cancel(this._cancel_reason):200<=t.status_code&&t.status_code<299&&this._acceptAndTerminate(t);else if(this._status===F.STATUS_INVITE_SENT||this._status===F.STATUS_1XX_RECEIVED)switch(!0){case/^100$/.test(t.status_code):this._status=F.STATUS_1XX_RECEIVED;break;case/^1[0-9]{2}$/.test(t.status_code):if(!t.to_tag){N("1xx response received without to tag");break}if(t.hasHeader("contact")&&!this._createDialog(t,"UAC",!0))break;if(this._status=F.STATUS_1XX_RECEIVED,this._progress("remote",t),!t.body)break;var r={originator:"remote",type:"answer",sdp:t.body};N('emit "sdp"'),this.emit("sdp",r);var i=new RTCSessionDescription({type:"answer",sdp:r.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return n._connection.setRemoteDescription(i)}).catch(function(e){L('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),n.emit("peerconnection:setremotedescriptionfailed",e)});break;case/^2[0-9]{2}$/.test(t.status_code):if(this._status=F.STATUS_CONFIRMED,!t.body){this._acceptAndTerminate(t,400,$.causes.MISSING_SDP),this._failed("remote",t,$.causes.BAD_MEDIA_DESCRIPTION);break}if(!this._createDialog(t,"UAC"))break;var a={originator:"remote",type:"answer",sdp:t.body};N('emit "sdp"'),this.emit("sdp",a);var o=new RTCSessionDescription({type:"answer",sdp:a.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){if("stable"===n._connection.signalingState)return n._connection.createOffer().then(function(e){return n._connection.setLocalDescription(e)}).catch(function(e){n._acceptAndTerminate(t,500,e.toString()),n._failed("local",t,$.causes.WEBRTC_ERROR)})}).then(function(){n._connection.setRemoteDescription(o).then(function(){n._handleSessionTimersInIncomingResponse(t),n._accepted("remote",t),n.sendRequest($.ACK),n._confirmed("local",null)}).catch(function(e){n._acceptAndTerminate(t,488,"Not Acceptable Here"),n._failed("remote",t,$.causes.BAD_MEDIA_DESCRIPTION),L('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),n.emit("peerconnection:setremotedescriptionfailed",e)})});break;default:var s=R.sipErrorCause(t.status_code);this._failed("remote",t,s)}}},{key:"_sendReinvite",value:function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};N("sendReinvite()");var n=R.cloneArray(e.extraHeaders),i=e.eventHandlers||{},r=e.rtcOfferConstraints||this._rtcOfferConstraints||null,a=!1;function o(e){i.failed&&i.failed(e)}n.push("Contact: "+this._contact),n.push("Content-Type: application/sdp"),this._sessionTimers.running&&n.push("Session-Expires: "+this._sessionTimers.currentExpires+";refresher="+(this._sessionTimers.refresher?"uac":"uas")),this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._createLocalDescription("offer",r)}).then(function(e){e=t._mangleOffer(e),t.sendRequest($.INVITE,{extraHeaders:n,body:e,eventHandlers:{onSuccessResponse:function(e){(function(e){var t=this;if(this._status===F.STATUS_TERMINATED)return;if(this.sendRequest($.ACK),a)return;{if(this._handleSessionTimersInIncomingResponse(e),!e.body)return void o.call(this);if("application/sdp"!==e.getHeader("Content-Type"))return void o.call(this)}var n={originator:"remote",type:"answer",sdp:e.body};N('emit "sdp"'),this.emit("sdp",n);var r=new RTCSessionDescription({type:"answer",sdp:n.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._connection.setRemoteDescription(r)}).then(function(){i.succeeded&&i.succeeded(e)}).catch(function(e){o.call(t),L('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),t.emit("peerconnection:setremotedescriptionfailed",e)})}).call(t,e),a=!0},onErrorResponse:function(e){o.call(t,e)},onTransportError:function(){t.onTransportError()},onRequestTimeout:function(){t.onRequestTimeout()},onDialogError:function(){t.onDialogError()}}})}).catch(function(){o()})}},{key:"_sendUpdate",value:function(){var t=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};N("sendUpdate()");var n=R.cloneArray(e.extraHeaders),i=e.eventHandlers||{},r=e.rtcOfferConstraints||this._rtcOfferConstraints||null,a=e.sdpOffer||!1,o=!1;function s(e){var t=this;if(this._status!==F.STATUS_TERMINATED&&!o)if(this._handleSessionTimersInIncomingResponse(e),a){if(!e.body)return void c.call(this);if("application/sdp"!==e.getHeader("Content-Type"))return void c.call(this);var n={originator:"remote",type:"answer",sdp:e.body};N('emit "sdp"'),this.emit("sdp",n);var r=new RTCSessionDescription({type:"answer",sdp:n.sdp});this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._connection.setRemoteDescription(r)}).then(function(){i.succeeded&&i.succeeded(e)}).catch(function(e){c.call(t),L('emit "peerconnection:setremotedescriptionfailed" [error:%o]',e),t.emit("peerconnection:setremotedescriptionfailed",e)})}else i.succeeded&&i.succeeded(e)}function c(e){i.failed&&i.failed(e)}n.push("Contact: "+this._contact),this._sessionTimers.running&&n.push("Session-Expires: "+this._sessionTimers.currentExpires+";refresher="+(this._sessionTimers.refresher?"uac":"uas")),a?(n.push("Content-Type: application/sdp"),this._connectionPromiseQueue=this._connectionPromiseQueue.then(function(){return t._createLocalDescription("offer",r)}).then(function(e){e=t._mangleOffer(e),t.sendRequest($.UPDATE,{extraHeaders:n,body:e,eventHandlers:{onSuccessResponse:function(e){s.call(t,e),o=!0},onErrorResponse:function(e){c.call(t,e)},onTransportError:function(){t.onTransportError()},onRequestTimeout:function(){t.onRequestTimeout()},onDialogError:function(){t.onDialogError()}}})}).catch(function(){c.call(t)})):this.sendRequest($.UPDATE,{extraHeaders:n,eventHandlers:{onSuccessResponse:function(e){s.call(t,e)},onErrorResponse:function(e){c.call(t,e)},onTransportError:function(){t.onTransportError()},onRequestTimeout:function(){t.onRequestTimeout()},onDialogError:function(){t.onDialogError()}}})}},{key:"_acceptAndTerminate",value:function(e,t,n){N("acceptAndTerminate()");var r=[];t&&(n=n||$.REASON_PHRASE[t]||"",r.push("Reason: SIP ;cause="+t+'; text="'+n+'"')),(this._dialog||this._createDialog(e,"UAC"))&&(this.sendRequest($.ACK),this.sendRequest($.BYE,{extraHeaders:r})),this._status=F.STATUS_TERMINATED}},{key:"_mangleOffer",value:function(e){if(!this._localHold&&!this._remoteHold)return e;if(e=v.parse(e),this._localHold&&!this._remoteHold){N("mangleOffer() | me on hold, mangling offer");var t=!0,n=!1,r=void 0;try{for(var i,a=e.media[Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var o=i.value;-1!==y.indexOf(o.type)&&(o.direction?"sendrecv"===o.direction?o.direction="sendonly":"recvonly"===o.direction&&(o.direction="inactive"):o.direction="sendonly")}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}}else if(this._localHold&&this._remoteHold){N("mangleOffer() | both on hold, mangling offer");var s=!0,c=!1,l=void 0;try{for(var u,f=e.media[Symbol.iterator]();!(s=(u=f.next()).done);s=!0){var d=u.value;-1!==y.indexOf(d.type)&&(d.direction="inactive")}}catch(e){c=!0,l=e}finally{try{!s&&f.return&&f.return()}finally{if(c)throw l}}}else if(this._remoteHold){N("mangleOffer() | remote on hold, mangling offer");var h=!0,p=!1,m=void 0;try{for(var g,_=e.media[Symbol.iterator]();!(h=(g=_.next()).done);h=!0){var b=g.value;-1!==y.indexOf(b.type)&&(b.direction?"sendrecv"===b.direction?b.direction="recvonly":"recvonly"===b.direction&&(b.direction="inactive"):b.direction="recvonly")}}catch(e){p=!0,m=e}finally{try{!h&&_.return&&_.return()}finally{if(p)throw m}}}return v.write(e)}},{key:"_setLocalMediaStatus",value:function(){var e=!0,t=!0;(this._localHold||this._remoteHold)&&(t=e=!1),this._audioMuted&&(e=!1),this._videoMuted&&(t=!1),this._toogleMuteAudio(!e),this._toogleMuteVideo(!t)}},{key:"_handleSessionTimersInIncomingRequest",value:function(e,t){if(this._sessionTimers.enabled){var n=void 0;n=e.session_expires&&e.session_expires>=$.MIN_SESSION_EXPIRES?(this._sessionTimers.currentExpires=e.session_expires,e.session_expires_refresher||"uas"):(this._sessionTimers.currentExpires=this._sessionTimers.defaultExpires,"uas"),t.push("Session-Expires: "+this._sessionTimers.currentExpires+";refresher="+n),this._sessionTimers.refresher="uas"===n,this._runSessionTimer()}}},{key:"_handleSessionTimersInIncomingResponse",value:function(e){if(this._sessionTimers.enabled){var t=void 0;t=e.session_expires&&e.session_expires>=$.MIN_SESSION_EXPIRES?(this._sessionTimers.currentExpires=e.session_expires,e.session_expires_refresher||"uac"):(this._sessionTimers.currentExpires=this._sessionTimers.defaultExpires,"uac"),this._sessionTimers.refresher="uac"===t,this._runSessionTimer()}}},{key:"_runSessionTimer",value:function(){var e=this,t=this._sessionTimers.currentExpires;this._sessionTimers.running=!0,clearTimeout(this._sessionTimers.timer),this._sessionTimers.refresher?this._sessionTimers.timer=setTimeout(function(){e._status!==F.STATUS_TERMINATED&&(N("runSessionTimer() | sending session refresh request"),e._sessionTimers.refreshMethod===$.UPDATE?e._sendUpdate():e._sendReinvite())},500*t):this._sessionTimers.timer=setTimeout(function(){e._status!==F.STATUS_TERMINATED&&(L("runSessionTimer() | timer expired, terminating the session"),e.terminate({cause:$.causes.REQUEST_TIMEOUT,status_code:408,reason_phrase:"Session Timer Expired"}))},1100*t)}},{key:"_toogleMuteAudio",value:function(e){var t=this._connection.getLocalStreams(),n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value.getAudioTracks(),c=!0,l=!1,u=void 0;try{for(var f,d=s[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){f.value.enabled=!e}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}}},{key:"_toogleMuteVideo",value:function(e){var t=this._connection.getLocalStreams(),n=!0,r=!1,i=void 0;try{for(var a,o=t[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value.getVideoTracks(),c=!0,l=!1,u=void 0;try{for(var f,d=s[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){f.value.enabled=!e}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}}},{key:"_newRTCSession",value:function(e,t){N("newRTCSession()"),this._ua.newRTCSession(this,{originator:e,session:this,request:t})}},{key:"_connecting",value:function(e){N("session connecting"),N('emit "connecting"'),this.emit("connecting",{request:e})}},{key:"_progress",value:function(e,t){N("session progress"),N('emit "progress"'),this.emit("progress",{originator:e,response:t||null})}},{key:"_accepted",value:function(e,t){N("session accepted"),this._start_time=new Date,N('emit "accepted"'),this.emit("accepted",{originator:e,response:t||null})}},{key:"_confirmed",value:function(e,t){N("session confirmed"),this._is_confirmed=!0,N('emit "confirmed"'),this.emit("confirmed",{originator:e,ack:t||null})}},{key:"_ended",value:function(e,t,n){N("session ended"),this._end_time=new Date,this._close(),N('emit "ended"'),this.emit("ended",{originator:e,message:t||null,cause:n})}},{key:"_failed",value:function(e,t,n){N("session failed"),this._close(),N('emit "failed"'),this.emit("failed",{originator:e,message:t||null,cause:n})}},{key:"_onhold",value:function(e){N("session onhold"),this._setLocalMediaStatus(),N('emit "hold"'),this.emit("hold",{originator:e})}},{key:"_onunhold",value:function(e){N("session onunhold"),this._setLocalMediaStatus(),N('emit "unhold"'),this.emit("unhold",{originator:e})}},{key:"_onmute",value:function(e){var t=e.audio,n=e.video;N("session onmute"),this._setLocalMediaStatus(),N('emit "muted"'),this.emit("muted",{audio:t,video:n})}},{key:"_onunmute",value:function(e){var t=e.audio,n=e.video;N("session onunmute"),this._setLocalMediaStatus(),N('emit "unmuted"'),this.emit("unmuted",{audio:t,video:n})}},{key:"C",get:function(){return F}},{key:"causes",get:function(){return $.causes}},{key:"id",get:function(){return this._id}},{key:"connection",get:function(){return this._connection}},{key:"contact",get:function(){return this._contact}},{key:"direction",get:function(){return this._direction}},{key:"local_identity",get:function(){return this._local_identity}},{key:"remote_identity",get:function(){return this._remote_identity}},{key:"start_time",get:function(){return this._start_time}},{key:"end_time",get:function(){return this._end_time}},{key:"data",get:function(){return this._data},set:function(e){this._data=e}},{key:"status",get:function(){return this._status}}]),o}()},{"./Constants":2,"./Dialog":3,"./Exceptions":6,"./RTCSession/DTMF":13,"./RTCSession/Info":14,"./RTCSession/ReferNotifier":15,"./RTCSession/ReferSubscriber":16,"./RequestSender":18,"./SIPMessage":19,"./Timers":21,"./Transactions":22,"./Utils":26,debug:29,events:31,"sdp-transform":36}],13:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var i=e("events").EventEmitter,a=e("../Constants"),o=e("../Exceptions"),s=e("../Utils"),c=e("debug")("JsSIP:RTCSession:DTMF");e("debug")("JsSIP:ERROR:RTCSession:DTMF").log=console.warn.bind(console);var l={MIN_DURATION:70,MAX_DURATION:6e3,DEFAULT_DURATION:100,MIN_INTER_TONE_GAP:50,DEFAULT_INTER_TONE_GAP:500};t.exports=function(e){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t._session=e,t._direction=null,t._tone=null,t._duration=null,t._request=null,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,i),r(n,[{key:"send",value:function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};if(void 0===e)throw new TypeError("Not enough arguments");if(this._direction="outgoing",this._session.status!==this._session.C.STATUS_CONFIRMED&&this._session.status!==this._session.C.STATUS_WAITING_FOR_ACK)throw new o.InvalidStateError(this._session.status);var r=s.cloneArray(n.extraHeaders);if(this.eventHandlers=n.eventHandlers||{},"string"==typeof e)e=e.toUpperCase();else{if("number"!=typeof e)throw new TypeError("Invalid tone: "+e);e=e.toString()}if(!e.match(/^[0-9A-DR#*]$/))throw new TypeError("Invalid tone: "+e);this._tone=e,this._duration=n.duration,r.push("Content-Type: application/dtmf-relay");var i="Signal="+this._tone+"\r\n";i+="Duration="+this._duration,this._session.newDTMF({originator:"local",dtmf:this,request:this._request}),this._session.sendRequest(a.INFO,{extraHeaders:r,eventHandlers:{onSuccessResponse:function(e){t.emit("succeeded",{originator:"remote",response:e})},onErrorResponse:function(e){t.eventHandlers.onFailed&&t.eventHandlers.onFailed(),t.emit("failed",{originator:"remote",response:e})},onRequestTimeout:function(){t._session.onRequestTimeout()},onTransportError:function(){t._session.onTransportError()},onDialogError:function(){t._session.onDialogError()}},body:i})}},{key:"init_incoming",value:function(e){var t=/^(Signal\s*?=\s*?)([0-9A-D#*]{1})(\s)?.*/,n=/^(Duration\s?=\s?)([0-9]{1,4})(\s)?.*/;if(this._direction="incoming",(this._request=e).reply(200),e.body){var r=e.body.split("\n");1<=r.length&&t.test(r[0])&&(this._tone=r[0].replace(t,"$2")),2<=r.length&&n.test(r[1])&&(this._duration=parseInt(r[1].replace(n,"$2"),10))}this._duration||(this._duration=l.DEFAULT_DURATION),this._tone?this._session.newDTMF({originator:"remote",dtmf:this,request:e}):c("invalid INFO DTMF received, discarded")}},{key:"tone",get:function(){return this._tone}},{key:"duration",get:function(){return this._duration}}]),n}(),t.exports.C=l},{"../Constants":2,"../Exceptions":6,"../Utils":26,debug:29,events:31}],14:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var i=e("events").EventEmitter;e("debug")("JsSIP:ERROR:RTCSession:Info").log=console.warn.bind(console);var a=e("../Constants"),o=e("../Exceptions"),s=e("../Utils");t.exports=function(e){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t._session=e,t._direction=null,t._contentType=null,t._body=null,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,i),r(n,[{key:"send",value:function(e,t){var n=this,r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};if(this._direction="outgoing",void 0===e)throw new TypeError("Not enough arguments");if(this._session.status!==this._session.C.STATUS_CONFIRMED&&this._session.status!==this._session.C.STATUS_WAITING_FOR_ACK)throw new o.InvalidStateError(this._session.status);this._contentType=e,this._body=t;var i=s.cloneArray(r.extraHeaders);i.push("Content-Type: "+e),this._session.newInfo({originator:"local",info:this,request:this.request}),this._session.sendRequest(a.INFO,{extraHeaders:i,eventHandlers:{onSuccessResponse:function(e){n.emit("succeeded",{originator:"remote",response:e})},onErrorResponse:function(e){n.emit("failed",{originator:"remote",response:e})},onTransportError:function(){n._session.onTransportError()},onRequestTimeout:function(){n._session.onRequestTimeout()},onDialogError:function(){n._session.onDialogError()}},body:t})}},{key:"init_incoming",value:function(e){this._direction="incoming",(this.request=e).reply(200),this._contentType=e.getHeader("content-type"),this._body=e.body,this._session.newInfo({originator:"remote",info:this,request:e})}},{key:"contentType",get:function(){return this._contentType}},{key:"body",get:function(){return this._body}}]),n}()},{"../Constants":2,"../Exceptions":6,"../Utils":26,debug:29,events:31}],15:[function(e,t,n){"use strict";var i=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var a=e("../Constants"),o=e("debug")("JsSIP:RTCSession:ReferNotifier"),s="refer",c="message/sipfrag;version=2.0",l=300;t.exports=function(){function r(e,t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,r),this._session=e,this._id=t,this._expires=n||l,this._active=!0,this.notify(100)}return i(r,[{key:"notify",value:function(e,t){if(o("notify()"),!1!==this._active){t=t||a.REASON_PHRASE[e]||"";var n=void 0;n=200<=e?"terminated;reason=noresource":"active;expires="+this._expires,this._session.sendRequest(a.NOTIFY,{extraHeaders:["Event: "+s+";id="+this._id,"Subscription-State: "+n,"Content-Type: "+c],body:"SIP/2.0 "+e+" "+t,eventHandlers:{onErrorResponse:function(){this._active=!1}}})}}}]),r}()},{"../Constants":2,debug:29}],16:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var i=e("events").EventEmitter,l=e("../Constants"),a=e("../Grammar"),u=e("../Utils"),f=e("debug")("JsSIP:RTCSession:ReferSubscriber");t.exports=function(e){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t._id=null,t._session=e,t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,i),r(n,[{key:"sendRefer",value:function(e){var t=this,n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};f("sendRefer()");var r=u.cloneArray(n.extraHeaders),i=n.eventHandlers||{};for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&this.on(a,i[a]);var o=null;n.replaces&&(o=n.replaces._request.call_id,o+=";to-tag="+n.replaces._to_tag,o+=";from-tag="+n.replaces._from_tag,o=encodeURIComponent(o));var s="Refer-To: <"+e+(o?"?Replaces="+o:"")+">";r.push(s),r.push("Contact: "+this._session.contact);var c=this._session.sendRequest(l.REFER,{extraHeaders:r,eventHandlers:{onSuccessResponse:function(e){t._requestSucceeded(e)},onErrorResponse:function(e){t._requestFailed(e,l.causes.REJECTED)},onTransportError:function(){t._requestFailed(null,l.causes.CONNECTION_ERROR)},onRequestTimeout:function(){t._requestFailed(null,l.causes.REQUEST_TIMEOUT)},onDialogError:function(){t._requestFailed(null,l.causes.DIALOG_ERROR)}}});this._id=c.cseq}},{key:"receiveNotify",value:function(e){if(f("receiveNotify()"),e.body){var t=a.parse(e.body.trim(),"Status_Line");if(-1!==t)switch(!0){case/^100$/.test(t.status_code):this.emit("trying",{request:e,status_line:t});break;case/^1[0-9]{2}$/.test(t.status_code):this.emit("progress",{request:e,status_line:t});break;case/^2[0-9]{2}$/.test(t.status_code):this.emit("accepted",{request:e,status_line:t});break;default:this.emit("failed",{request:e,status_line:t})}else f('receiveNotify() | error parsing NOTIFY body: "'+e.body+'"')}}},{key:"_requestSucceeded",value:function(e){f("REFER succeeded"),f('emit "requestSucceeded"'),this.emit("requestSucceeded",{response:e})}},{key:"_requestFailed",value:function(e,t){f("REFER failed"),f('emit "requestFailed"'),this.emit("requestFailed",{response:e||null,cause:t})}},{key:"id",get:function(){return this._id}}]),n}()},{"../Constants":2,"../Grammar":7,"../Utils":26,debug:29,events:31}],17:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var o=e("./Utils"),s=e("./Constants"),i=e("./SIPMessage"),c=e("./RequestSender"),l=e("debug")("JsSIP:Registrator");t.exports=function(){function n(e,t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n);this._ua=e,this._transport=t,this._registrar=e.configuration.registrar_server,this._expires=e.configuration.register_expires,this._call_id=o.createRandomToken(22),this._cseq=0,this._to_uri=e.configuration.uri,this._registrationTimer=null,this._registering=!1,this._registered=!1,this._contact=this._ua.contact.toString(),this._contact+=";+sip.ice",this._extraHeaders=[],this._extraContactParams="",this._contact+=";reg-id=1",this._contact+=';+sip.instance="<urn:uuid:'+this._ua.configuration.instance_id+'>"'}return r(n,[{key:"setExtraHeaders",value:function(e){Array.isArray(e)||(e=[]),this._extraHeaders=e.slice()}},{key:"setExtraContactParams",value:function(e){for(var t in e instanceof Object||(e={}),this._extraContactParams="",e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=e[t];this._extraContactParams+=";"+t,n&&(this._extraContactParams+="="+n)}}},{key:"register",value:function(){var a=this;if(this._registering)l("Register request in progress...");else{var e=this._extraHeaders.slice();e.push("Contact: "+this._contact+";expires="+this._expires+this._extraContactParams),e.push("Expires: "+this._expires);var t=new i.OutgoingRequest(s.REGISTER,this._registrar,this._ua,{to_uri:this._to_uri,call_id:this._call_id,cseq:this._cseq+=1},e),n=new c(this._ua,t,{onRequestTimeout:function(){a._registrationFailure(null,s.causes.REQUEST_TIMEOUT)},onTransportError:function(){a._registrationFailure(null,s.causes.CONNECTION_ERROR)},onAuthenticated:function(){a._cseq+=1},onReceiveResponse:function(e){var t=void 0,n=void 0,r=e.getHeaders("contact").length;if(e.cseq===a._cseq)switch(null!==a._registrationTimer&&(clearTimeout(a._registrationTimer),a._registrationTimer=null),!0){case/^1[0-9]{2}$/.test(e.status_code):break;case/^2[0-9]{2}$/.test(e.status_code):if(a._registering=!1,!r){l("no Contact header in response to REGISTER, response ignored");break}for(;r--;){if((t=e.parseHeader("contact",r)).uri.user===a._ua.contact.uri.user){n=t.getParam("expires");break}t=null}if(!t){l("no Contact header pointing to us, response ignored");break}!n&&e.hasHeader("expires")&&(n=e.getHeader("expires")),n||(n=a._expires),(n=Number(n))<10&&(n=10),a._registrationTimer=setTimeout(function(){a._registrationTimer=null,0===a._ua.listeners("registrationExpiring").length?a.register():a._ua.emit("registrationExpiring")},1e3*n-5e3),t.hasParam("temp-gruu")&&(a._ua.contact.temp_gruu=t.getParam("temp-gruu").replace(/"/g,"")),t.hasParam("pub-gruu")&&(a._ua.contact.pub_gruu=t.getParam("pub-gruu").replace(/"/g,"")),a._registered||(a._registered=!0,a._ua.registered({response:e}));break;case/^423$/.test(e.status_code):e.hasHeader("min-expires")?(a._expires=Number(e.getHeader("min-expires")),a._expires<10&&(a._expires=10),a.register()):(l("423 response received for REGISTER without Min-Expires"),a._registrationFailure(e,s.causes.SIP_FAILURE_CODE));break;default:var i=o.sipErrorCause(e.status_code);a._registrationFailure(e,i)}}});this._registering=!0,n.send()}}},{key:"unregister",value:function(){var n=this,e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};if(this._registered){this._registered=!1,null!==this._registrationTimer&&(clearTimeout(this._registrationTimer),this._registrationTimer=null);var t=this._extraHeaders.slice();e.all?t.push("Contact: *"+this._extraContactParams):t.push("Contact: "+this._contact+";expires=0"+this._extraContactParams),t.push("Expires: 0");var r=new i.OutgoingRequest(s.REGISTER,this._registrar,this._ua,{to_uri:this._to_uri,call_id:this._call_id,cseq:this._cseq+=1},t);new c(this._ua,r,{onRequestTimeout:function(){n._unregistered(null,s.causes.REQUEST_TIMEOUT)},onTransportError:function(){n._unregistered(null,s.causes.CONNECTION_ERROR)},onAuthenticated:function(){n._cseq+=1},onReceiveResponse:function(e){switch(!0){case/^1[0-9]{2}$/.test(e.status_code):break;case/^2[0-9]{2}$/.test(e.status_code):n._unregistered(e);break;default:var t=o.sipErrorCause(e.status_code);n._unregistered(e,t)}}}).send()}else l("already unregistered")}},{key:"close",value:function(){this._registered&&this.unregister()}},{key:"onTransportClosed",value:function(){this._registering=!1,null!==this._registrationTimer&&(clearTimeout(this._registrationTimer),this._registrationTimer=null),this._registered&&(this._registered=!1,this._ua.unregistered({}))}},{key:"_registrationFailure",value:function(e,t){this._registering=!1,this._ua.registrationFailed({response:e||null,cause:t}),this._registered&&(this._registered=!1,this._ua.unregistered({response:e||null,cause:t}))}},{key:"_unregistered",value:function(e,t){this._registering=!1,this._registered=!1,this._ua.unregistered({response:e||null,cause:t||null})}},{key:"registered",get:function(){return this._registered}}]),n}()},{"./Constants":2,"./RequestSender":18,"./SIPMessage":19,"./Utils":26,debug:29}],18:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var a=e("./Constants"),o=e("./DigestAuthentication"),s=e("./Transactions"),c=e("debug")("JsSIP:RequestSender"),l={onRequestTimeout:function(){},onTransportError:function(){},onReceiveResponse:function(){},onAuthenticated:function(){}};t.exports=function(){function i(e,t,n){for(var r in function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,i),this._ua=e,this._eventHandlers=n,this._method=t.method,this._request=t,this._auth=null,this._challenged=!1,this._staled=!1,l)Object.prototype.hasOwnProperty.call(l,r)&&(this._eventHandlers[r]||(this._eventHandlers[r]=l[r]));e.status!==e.C.STATUS_USER_CLOSED||this._method===a.BYE&&this._method===a.ACK||this._eventHandlers.onTransportError()}return r(i,[{key:"send",value:function(){var t=this,e={onRequestTimeout:function(){t._eventHandlers.onRequestTimeout()},onTransportError:function(){t._eventHandlers.onTransportError()},onReceiveResponse:function(e){t._receiveResponse(e)}};switch(this._method){case"INVITE":this.clientTransaction=new s.InviteClientTransaction(this._ua,this._ua.transport,this._request,e);break;case"ACK":this.clientTransaction=new s.AckClientTransaction(this._ua,this._ua.transport,this._request,e);break;default:this.clientTransaction=new s.NonInviteClientTransaction(this._ua,this._ua.transport,this._request,e)}this.clientTransaction.send()}},{key:"_receiveResponse",value:function(e){var t=void 0,n=void 0,r=e.status_code;if(401!==r&&407!==r||null===this._ua.configuration.password&&null===this._ua.configuration.ha1)this._eventHandlers.onReceiveResponse(e);else{if(n=401===e.status_code?(t=e.parseHeader("www-authenticate"),"authorization"):(t=e.parseHeader("proxy-authenticate"),"proxy-authorization"),!t)return c(e.status_code+" with wrong or missing challenge, cannot authenticate"),void this._eventHandlers.onReceiveResponse(e);if(!this._challenged||!this._staled&&!0===t.stale){if(this._auth||(this._auth=new o({username:this._ua.configuration.authorization_user,password:this._ua.configuration.password,realm:this._ua.configuration.realm,ha1:this._ua.configuration.ha1})),!this._auth.authenticate(this._request,t))return void this._eventHandlers.onReceiveResponse(e);this._challenged=!0,this._ua.set("realm",this._auth.get("realm")),this._ua.set("ha1",this._auth.get("ha1")),t.stale&&(this._staled=!0),this._request=this._request.clone(),this._request.cseq+=1,this._request.setHeader("cseq",this._request.cseq+" "+this._method),this._request.setHeader(n,this._auth.toString()),this._eventHandlers.onAuthenticated(this._request),this.send()}else this._eventHandlers.onReceiveResponse(e)}}}]),i}()},{"./Constants":2,"./DigestAuthentication":5,"./Transactions":22,debug:29}],19:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();function s(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var a=e("sdp-transform"),x=e("./Constants"),k=e("./Utils"),d=e("./NameAddrHeader"),o=e("./Grammar"),c=e("debug")("JsSIP:SIPMessage"),l=function(){function u(e,t,n,r,i,a){if(f(this,u),!e||!t||!n)return null;r=r||{},this.ua=n,this.headers={},this.method=e,this.ruri=t,this.body=a,this.extraHeaders=k.cloneArray(i),r.route_set?this.setHeader("route",r.route_set):n.configuration.use_preloaded_route&&this.setHeader("route","<"+n.transport.sip_uri+";lr>"),this.setHeader("via",""),this.setHeader("max-forwards",x.MAX_FORWARDS);var o=r.to_display_name||0===r.to_display_name?'"'+r.to_display_name+'" ':"";o+="<"+(r.to_uri||t)+">",o+=r.to_tag?";tag="+r.to_tag:"",this.to=d.parse(o),this.setHeader("to",o);var s=void 0;s=r.from_display_name||0===r.from_display_name?'"'+r.from_display_name+'" ':n.configuration.display_name?'"'+n.configuration.display_name+'" ':"",s+="<"+(r.from_uri||n.configuration.uri)+">;tag=",s+=r.from_tag||k.newTag(),this.from=d.parse(s),this.setHeader("from",s);var c=r.call_id||n.configuration.jssip_id+k.createRandomToken(15);this.call_id=c,this.setHeader("call-id",c);var l=r.cseq||Math.floor(1e4*Math.random());this.cseq=l,this.setHeader("cseq",l+" "+e)}return r(u,[{key:"setHeader",value:function(e,t){for(var n=new RegExp("^\\s*"+e+"\\s*:","i"),r=0;r<this.extraHeaders.length;r++)n.test(this.extraHeaders[r])&&this.extraHeaders.splice(r,1);this.headers[k.headerize(e)]=Array.isArray(t)?t:[t]}},{key:"getHeader",value:function(e){var t=this.headers[k.headerize(e)];if(t){if(t[0])return t[0]}else{var n=new RegExp("^\\s*"+e+"\\s*:","i"),r=!0,i=!1,a=void 0;try{for(var o,s=this.extraHeaders[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;if(n.test(c))return c.substring(c.indexOf(":")+1).trim()}}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}}}},{key:"getHeaders",value:function(e){var t=this.headers[k.headerize(e)],n=[];if(t){var r=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;n.push(c)}}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}var l=new RegExp("^\\s*"+e+"\\s*:","i"),u=!0,f=!1,d=void 0;try{for(var h,p=this.extraHeaders[Symbol.iterator]();!(u=(h=p.next()).done);u=!0){var m=h.value;l.test(m)&&n.push(m.substring(m.indexOf(":")+1).trim())}}catch(e){f=!0,d=e}finally{try{!u&&p.return&&p.return()}finally{if(f)throw d}}return n}},{key:"hasHeader",value:function(e){if(this.headers[k.headerize(e)])return!0;var t=new RegExp("^\\s*"+e+"\\s*:","i"),n=!0,r=!1,i=void 0;try{for(var a,o=this.extraHeaders[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){var s=a.value;if(t.test(s))return!0}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}return!1}},{key:"parseSDP",value:function(e){return!e&&this.sdp||(this.sdp=a.parse(this.body||"")),this.sdp}},{key:"toString",value:function(){var e=this.method+" "+this.ruri+" SIP/2.0\r\n";for(var t in this.headers)if(Object.prototype.hasOwnProperty.call(this.headers,t)){var n=!0,r=!1,i=void 0;try{for(var a,o=this.headers[t][Symbol.iterator]();!(n=(a=o.next()).done);n=!0){e+=t+": "+a.value+"\r\n"}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}}var s=!0,c=!1,l=void 0;try{for(var u,f=this.extraHeaders[Symbol.iterator]();!(s=(u=f.next()).done);s=!0){e+=u.value.trim()+"\r\n"}}catch(e){c=!0,l=e}finally{try{!s&&f.return&&f.return()}finally{if(c)throw l}}var d=[];switch(this.method){case x.REGISTER:d.push("path","gruu");break;case x.INVITE:this.ua.configuration.session_timers&&d.push("timer"),(this.ua.contact.pub_gruu||this.ua.contact.temp_gruu)&&d.push("gruu"),d.push("ice","replaces");break;case x.UPDATE:this.ua.configuration.session_timers&&d.push("timer"),d.push("ice")}d.push("outbound");var h=this.ua.configuration.user_agent||x.USER_AGENT;(e+="Allow: "+x.ALLOWED_METHODS+"\r\n",e+="Supported: "+d+"\r\n",e+="User-Agent: "+h+"\r\n",this.body)?(e+="Content-Length: "+k.str_utf8_length(this.body)+"\r\n\r\n",e+=this.body):e+="Content-Length: 0\r\n\r\n";return e}},{key:"clone",value:function(){var t=new u(this.method,this.ruri,this.ua);return Object.keys(this.headers).forEach(function(e){t.headers[e]=this.headers[e].slice()},this),t.body=this.body,t.extraHeaders=k.cloneArray(this.extraHeaders),t.to=this.to,t.from=this.from,t.call_id=this.call_id,t.cseq=this.cseq,t}}]),u}(),u=function(e){function o(e,t,n,r,i){f(this,o);var a=s(this,(o.__proto__||Object.getPrototypeOf(o)).call(this,x.INVITE,e,t,n,r,i));return a.transaction=null,a}return i(o,l),r(o,[{key:"cancel",value:function(e){this.transaction.cancel(e)}},{key:"clone",value:function(){var t=new o(this.ruri,this.ua);return Object.keys(this.headers).forEach(function(e){t.headers[e]=this.headers[e].slice()},this),t.body=this.body,t.extraHeaders=k.cloneArray(this.extraHeaders),t.to=this.to,t.from=this.from,t.call_id=this.call_id,t.cseq=this.cseq,t.transaction=this.transaction,t}}]),o}(),h=function(){function e(){f(this,e),this.data=null,this.headers=null,this.method=null,this.via=null,this.via_branch=null,this.call_id=null,this.cseq=null,this.from=null,this.from_tag=null,this.to=null,this.to_tag=null,this.body=null,this.sdp=null}return r(e,[{key:"addHeader",value:function(e,t){var n={raw:t};e=k.headerize(e),this.headers[e]?this.headers[e].push(n):this.headers[e]=[n]}},{key:"getHeader",value:function(e){var t=this.headers[k.headerize(e)];if(t)return t[0]?t[0].raw:void 0}},{key:"getHeaders",value:function(e){var t=this.headers[k.headerize(e)],n=[];if(!t)return[];var r=!0,i=!1,a=void 0;try{for(var o,s=t[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){var c=o.value;n.push(c.raw)}}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}return n}},{key:"hasHeader",value:function(e){return!!this.headers[k.headerize(e)]}},{key:"parseHeader",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:0;if(e=k.headerize(e),this.headers[e]){if(!(t>=this.headers[e].length)){var n=this.headers[e][t],r=n.raw;if(n.parsed)return n.parsed;var i=o.parse(r,e.replace(/-/g,"_"));return-1===i?(this.headers[e].splice(t,1),void c('error parsing "'+e+'" header field with value "'+r+'"')):n.parsed=i}c('not so many "'+e+'" headers present')}else c('header "'+e+'" not present')}},{key:"s",value:function(e,t){return this.parseHeader(e,t)}},{key:"setHeader",value:function(e,t){var n={raw:t};this.headers[k.headerize(e)]=[n]}},{key:"parseSDP",value:function(e){return!e&&this.sdp||(this.sdp=a.parse(this.body||"")),this.sdp}},{key:"toString",value:function(){return this.data}}]),e}(),p=function(e){function n(e){f(this,n);var t=s(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));return t.ua=e,t.headers={},t.ruri=null,t.transport=null,t.server_transaction=null,t}return i(n,h),r(n,[{key:"reply",value:function(e,t,n,r,i,a){var o=[],s=this.getHeader("To");if(t=t||null,!(e=e||null)||e<100||699<e)throw new TypeError("Invalid status_code: "+e);if(t&&"string"!=typeof t&&!(t instanceof String))throw new TypeError("Invalid reason_phrase: "+t);t=t||x.REASON_PHRASE[e]||"",n=k.cloneArray(n);var c="SIP/2.0 "+e+" "+t+"\r\n";if(this.method===x.INVITE&&100<e&&e<=200){var l=this.getHeaders("record-route"),u=!0,f=!1,d=void 0;try{for(var h,p=l[Symbol.iterator]();!(u=(h=p.next()).done);u=!0){c+="Record-Route: "+h.value+"\r\n"}}catch(e){f=!0,d=e}finally{try{!u&&p.return&&p.return()}finally{if(f)throw d}}}var m=this.getHeaders("via"),g=!0,_=!1,b=void 0;try{for(var v,y=m[Symbol.iterator]();!(g=(v=y.next()).done);g=!0){c+="Via: "+v.value+"\r\n"}}catch(e){_=!0,b=e}finally{try{!g&&y.return&&y.return()}finally{if(_)throw b}}!this.to_tag&&100<e?s+=";tag="+k.newTag():this.to_tag&&!this.s("to").hasParam("tag")&&(s+=";tag="+this.to_tag),c+="To: "+s+"\r\n",c+="From: "+this.getHeader("From")+"\r\n",c+="Call-ID: "+this.call_id+"\r\n",c+="CSeq: "+this.cseq+" "+this.method+"\r\n";var w=!0,C=!1,A=void 0;try{for(var S,T=n[Symbol.iterator]();!(w=(S=T.next()).done);w=!0){c+=S.value.trim()+"\r\n"}}catch(e){C=!0,A=e}finally{try{!w&&T.return&&T.return()}finally{if(C)throw A}}switch(this.method){case x.INVITE:this.ua.configuration.session_timers&&o.push("timer"),(this.ua.contact.pub_gruu||this.ua.contact.temp_gruu)&&o.push("gruu"),o.push("ice","replaces");break;case x.UPDATE:this.ua.configuration.session_timers&&o.push("timer"),r&&o.push("ice"),o.push("replaces")}(o.push("outbound"),this.method===x.OPTIONS?(c+="Allow: "+x.ALLOWED_METHODS+"\r\n",c+="Accept: "+x.ACCEPTED_BODY_TYPES+"\r\n"):405===e?c+="Allow: "+x.ALLOWED_METHODS+"\r\n":415===e&&(c+="Accept: "+x.ACCEPTED_BODY_TYPES+"\r\n"),c+="Supported: "+o+"\r\n",r)?(c+="Content-Type: application/sdp\r\n",c+="Content-Length: "+k.str_utf8_length(r)+"\r\n\r\n",c+=r):c+="Content-Length: 0\r\n\r\n";this.server_transaction.receiveResponse(e,c,i,a)}},{key:"reply_sl",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:null,t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:null,n=this.getHeaders("via");if(!e||e<100||699<e)throw new TypeError("Invalid status_code: "+e);if(t&&"string"!=typeof t&&!(t instanceof String))throw new TypeError("Invalid reason_phrase: "+t);var r="SIP/2.0 "+e+" "+(t=t||x.REASON_PHRASE[e]||"")+"\r\n",i=!0,a=!1,o=void 0;try{for(var s,c=n[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){r+="Via: "+s.value+"\r\n"}}catch(e){a=!0,o=e}finally{try{!i&&c.return&&c.return()}finally{if(a)throw o}}var l=this.getHeader("To");!this.to_tag&&100<e?l+=";tag="+k.newTag():this.to_tag&&!this.s("to").hasParam("tag")&&(l+=";tag="+this.to_tag),r+="To: "+l+"\r\n",r+="From: "+this.getHeader("From")+"\r\n",r+="Call-ID: "+this.call_id+"\r\n",r+="CSeq: "+this.cseq+" "+this.method+"\r\n",r+="Content-Length: 0\r\n\r\n",this.transport.send(r)}}]),n}(),m=function(e){function t(){f(this,t);var e=s(this,(t.__proto__||Object.getPrototypeOf(t)).call(this));return e.headers={},e.status_code=null,e.reason_phrase=null,e}return i(t,h),t}();t.exports={OutgoingRequest:l,InitialOutgoingInviteRequest:u,IncomingRequest:p,IncomingResponse:m}},{"./Constants":2,"./Grammar":7,"./NameAddrHeader":10,"./Utils":26,debug:29,"sdp-transform":36}],20:[function(e,t,n){"use strict";var r=e("./Utils"),i=e("./Grammar"),a=e("debug")("JsSIP:ERROR:Socket");a.log=console.warn.bind(console),n.isSocket=function(t){if(Array.isArray(t))return!1;if(void 0===t)return a("undefined JsSIP.Socket instance"),!1;try{if(!r.isString(t.url))throw a("missing or invalid JsSIP.Socket url property"),new Error;if(!r.isString(t.via_transport))throw a("missing or invalid JsSIP.Socket via_transport property"),new Error;if(-1===i.parse(t.sip_uri,"SIP_URI"))throw a("missing or invalid JsSIP.Socket sip_uri property"),new Error}catch(e){return!1}try{["connect","disconnect","send"].forEach(function(e){if(!r.isFunction(t[e]))throw a("missing or invalid JsSIP.Socket method: "+e),new Error})}catch(e){return!1}return!0}},{"./Grammar":7,"./Utils":26,debug:29}],21:[function(e,t,n){"use strict";t.exports={T1:500,T2:4e3,T4:5e3,TIMER_B:32e3,TIMER_D:0,TIMER_F:32e3,TIMER_H:32e3,TIMER_I:0,TIMER_J:0,TIMER_K:0,TIMER_L:32e3,TIMER_M:32e3,PROVISIONAL_RESPONSE_INTERVAL:6e4}},{}],22:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();function s(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function c(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function a(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}var l=e("events").EventEmitter,i=e("./Constants"),u=e("./SIPMessage"),f=e("./Timers"),d=e("debug")("JsSIP:NonInviteClientTransaction"),h=e("debug")("JsSIP:InviteClientTransaction"),p=e("debug")("JsSIP:AckClientTransaction"),o=e("debug")("JsSIP:NonInviteServerTransaction"),m=e("debug")("JsSIP:InviteServerTransaction"),g={STATUS_TRYING:1,STATUS_PROCEEDING:2,STATUS_CALLING:3,STATUS_ACCEPTED:4,STATUS_COMPLETED:5,STATUS_TERMINATED:6,STATUS_CONFIRMED:7,NON_INVITE_CLIENT:"nict",NON_INVITE_SERVER:"nist",INVITE_CLIENT:"ict",INVITE_SERVER:"ist"},_=function(e){function o(e,t,n,r){s(this,o);var i=c(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));i.type=g.NON_INVITE_CLIENT,i.id="z9hG4bK"+Math.floor(1e7*Math.random()),i.ua=e,i.transport=t,i.request=n,i.eventHandlers=r;var a="SIP/2.0/"+t.via_transport;return a+=" "+e.configuration.via_host+";branch="+i.id,i.request.setHeader("via",a),i.ua.newTransaction(i),i}return a(o,l),r(o,[{key:"stateChanged",value:function(e){this.state=e,this.emit("stateChanged")}},{key:"send",value:function(){var e=this;this.stateChanged(g.STATUS_TRYING),this.F=setTimeout(function(){e.timer_F()},f.TIMER_F),this.transport.send(this.request)||this.onTransportError()}},{key:"onTransportError",value:function(){d("transport error occurred, deleting transaction "+this.id),clearTimeout(this.F),clearTimeout(this.K),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this),this.eventHandlers.onTransportError()}},{key:"timer_F",value:function(){d("Timer F expired for transaction "+this.id),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this),this.eventHandlers.onRequestTimeout()}},{key:"timer_K",value:function(){this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"receiveResponse",value:function(e){var t=this,n=e.status_code;if(n<200)switch(this.state){case g.STATUS_TRYING:case g.STATUS_PROCEEDING:this.stateChanged(g.STATUS_PROCEEDING),this.eventHandlers.onReceiveResponse(e)}else switch(this.state){case g.STATUS_TRYING:case g.STATUS_PROCEEDING:this.stateChanged(g.STATUS_COMPLETED),clearTimeout(this.F),408===n?this.eventHandlers.onRequestTimeout():this.eventHandlers.onReceiveResponse(e),this.K=setTimeout(function(){t.timer_K()},f.TIMER_K)}}},{key:"C",get:function(){return g}}]),o}(),b=function(e){function o(e,t,n,r){s(this,o);var i=c(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));i.type=g.INVITE_CLIENT,i.id="z9hG4bK"+Math.floor(1e7*Math.random()),i.ua=e,i.transport=t,i.request=n,i.eventHandlers=r,n.transaction=i;var a="SIP/2.0/"+t.via_transport;return a+=" "+e.configuration.via_host+";branch="+i.id,i.request.setHeader("via",a),i.ua.newTransaction(i),i}return a(o,l),r(o,[{key:"stateChanged",value:function(e){this.state=e,this.emit("stateChanged")}},{key:"send",value:function(){var e=this;this.stateChanged(g.STATUS_CALLING),this.B=setTimeout(function(){e.timer_B()},f.TIMER_B),this.transport.send(this.request)||this.onTransportError()}},{key:"onTransportError",value:function(){clearTimeout(this.B),clearTimeout(this.D),clearTimeout(this.M),this.state!==g.STATUS_ACCEPTED&&(h("transport error occurred, deleting transaction "+this.id),this.eventHandlers.onTransportError()),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"timer_M",value:function(){h("Timer M expired for transaction "+this.id),this.state===g.STATUS_ACCEPTED&&(clearTimeout(this.B),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this))}},{key:"timer_B",value:function(){h("Timer B expired for transaction "+this.id),this.state===g.STATUS_CALLING&&(this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this),this.eventHandlers.onRequestTimeout())}},{key:"timer_D",value:function(){h("Timer D expired for transaction "+this.id),clearTimeout(this.B),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"sendACK",value:function(e){var t=this,n=new u.OutgoingRequest(i.ACK,this.request.ruri,this.ua,{route_set:this.request.getHeader("route"),call_id:this.request.getHeader("call-id"),cseq:this.request.cseq});n.setHeader("from",this.request.getHeader("from")),n.setHeader("via",this.request.getHeader("via")),n.setHeader("to",e.getHeader("to")),this.D=setTimeout(function(){t.timer_D()},f.TIMER_D),this.transport.send(n)}},{key:"cancel",value:function(e){if(this.state===g.STATUS_PROCEEDING){var t=new u.OutgoingRequest(i.CANCEL,this.request.ruri,this.ua,{route_set:this.request.getHeader("route"),call_id:this.request.getHeader("call-id"),cseq:this.request.cseq});t.setHeader("from",this.request.getHeader("from")),t.setHeader("via",this.request.getHeader("via")),t.setHeader("to",this.request.getHeader("to")),e&&t.setHeader("reason",e),this.transport.send(t)}}},{key:"receiveResponse",value:function(e){var t=this,n=e.status_code;if(100<=n&&n<=199)switch(this.state){case g.STATUS_CALLING:this.stateChanged(g.STATUS_PROCEEDING),this.eventHandlers.onReceiveResponse(e);break;case g.STATUS_PROCEEDING:this.eventHandlers.onReceiveResponse(e)}else if(200<=n&&n<=299)switch(this.state){case g.STATUS_CALLING:case g.STATUS_PROCEEDING:this.stateChanged(g.STATUS_ACCEPTED),this.M=setTimeout(function(){t.timer_M()},f.TIMER_M),this.eventHandlers.onReceiveResponse(e);break;case g.STATUS_ACCEPTED:this.eventHandlers.onReceiveResponse(e)}else if(300<=n&&n<=699)switch(this.state){case g.STATUS_CALLING:case g.STATUS_PROCEEDING:this.stateChanged(g.STATUS_COMPLETED),this.sendACK(e),this.eventHandlers.onReceiveResponse(e);break;case g.STATUS_COMPLETED:this.sendACK(e)}}},{key:"C",get:function(){return g}}]),o}(),v=function(e){function o(e,t,n,r){s(this,o);var i=c(this,(o.__proto__||Object.getPrototypeOf(o)).call(this));i.id="z9hG4bK"+Math.floor(1e7*Math.random()),i.transport=t,i.request=n,i.eventHandlers=r;var a="SIP/2.0/"+t.via_transport;return a+=" "+e.configuration.via_host+";branch="+i.id,i.request.setHeader("via",a),i}return a(o,l),r(o,[{key:"send",value:function(){this.transport.send(this.request)||this.onTransportError()}},{key:"onTransportError",value:function(){p("transport error occurred for transaction "+this.id),this.eventHandlers.onTransportError()}},{key:"C",get:function(){return g}}]),o}(),y=function(e){function i(e,t,n){s(this,i);var r=c(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return r.type=g.NON_INVITE_SERVER,r.id=n.via_branch,r.ua=e,r.transport=t,r.request=n,r.last_response="",(n.server_transaction=r).state=g.STATUS_TRYING,e.newTransaction(r),r}return a(i,l),r(i,[{key:"stateChanged",value:function(e){this.state=e,this.emit("stateChanged")}},{key:"timer_J",value:function(){o("Timer J expired for transaction "+this.id),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"onTransportError",value:function(){this.transportError||(this.transportError=!0,o("transport error occurred, deleting transaction "+this.id),clearTimeout(this.J),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this))}},{key:"receiveResponse",value:function(e,t,n,r){var i=this;if(100===e)switch(this.state){case g.STATUS_TRYING:this.stateChanged(g.STATUS_PROCEEDING),this.transport.send(t)||this.onTransportError();break;case g.STATUS_PROCEEDING:this.last_response=t,this.transport.send(t)?n&&n():(this.onTransportError(),r&&r())}else if(200<=e&&e<=699)switch(this.state){case g.STATUS_TRYING:case g.STATUS_PROCEEDING:this.stateChanged(g.STATUS_COMPLETED),this.last_response=t,this.J=setTimeout(function(){i.timer_J()},f.TIMER_J),this.transport.send(t)?n&&n():(this.onTransportError(),r&&r())}}},{key:"C",get:function(){return g}}]),i}(),w=function(e){function i(e,t,n){s(this,i);var r=c(this,(i.__proto__||Object.getPrototypeOf(i)).call(this));return r.type=g.INVITE_SERVER,r.id=n.via_branch,r.ua=e,r.transport=t,r.request=n,r.last_response="",(n.server_transaction=r).state=g.STATUS_PROCEEDING,e.newTransaction(r),r.resendProvisionalTimer=null,n.reply(100),r}return a(i,l),r(i,[{key:"stateChanged",value:function(e){this.state=e,this.emit("stateChanged")}},{key:"timer_H",value:function(){m("Timer H expired for transaction "+this.id),this.state===g.STATUS_COMPLETED&&m("ACK not received, dialog will be terminated"),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this)}},{key:"timer_I",value:function(){this.stateChanged(g.STATUS_TERMINATED)}},{key:"timer_L",value:function(){m("Timer L expired for transaction "+this.id),this.state===g.STATUS_ACCEPTED&&(this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this))}},{key:"onTransportError",value:function(){this.transportError||(this.transportError=!0,m("transport error occurred, deleting transaction "+this.id),null!==this.resendProvisionalTimer&&(clearInterval(this.resendProvisionalTimer),this.resendProvisionalTimer=null),clearTimeout(this.L),clearTimeout(this.H),clearTimeout(this.I),this.stateChanged(g.STATUS_TERMINATED),this.ua.destroyTransaction(this))}},{key:"resend_provisional",value:function(){this.transport.send(this.last_response)||this.onTransportError()}},{key:"receiveResponse",value:function(e,t,n,r){var i=this;if(100<=e&&e<=199)switch(this.state){case g.STATUS_PROCEEDING:this.transport.send(t)||this.onTransportError(),this.last_response=t}if(100<e&&e<=199&&this.state===g.STATUS_PROCEEDING)null===this.resendProvisionalTimer&&(this.resendProvisionalTimer=setInterval(function(){i.resend_provisional()},f.PROVISIONAL_RESPONSE_INTERVAL));else if(200<=e&&e<=299)switch(this.state){case g.STATUS_PROCEEDING:this.stateChanged(g.STATUS_ACCEPTED),this.last_response=t,this.L=setTimeout(function(){i.timer_L()},f.TIMER_L),null!==this.resendProvisionalTimer&&(clearInterval(this.resendProvisionalTimer),this.resendProvisionalTimer=null);case g.STATUS_ACCEPTED:this.transport.send(t)?n&&n():(this.onTransportError(),r&&r())}else if(300<=e&&e<=699)switch(this.state){case g.STATUS_PROCEEDING:null!==this.resendProvisionalTimer&&(clearInterval(this.resendProvisionalTimer),this.resendProvisionalTimer=null),this.transport.send(t)?(this.stateChanged(g.STATUS_COMPLETED),this.H=setTimeout(function(){i.timer_H()},f.TIMER_H),n&&n()):(this.onTransportError(),r&&r())}}},{key:"C",get:function(){return g}}]),i}();t.exports={C:g,NonInviteClientTransaction:_,InviteClientTransaction:b,AckClientTransaction:v,NonInviteServerTransaction:y,InviteServerTransaction:w,checkTransaction:function(e,t){var n=e._transactions,r=void 0;switch(t.method){case i.INVITE:if(r=n.ist[t.via_branch]){switch(r.state){case g.STATUS_PROCEEDING:r.transport.send(r.last_response)}return!0}break;case i.ACK:if(!(r=n.ist[t.via_branch]))return!1;if(r.state===g.STATUS_ACCEPTED)return!1;if(r.state===g.STATUS_COMPLETED)return r.state=g.STATUS_CONFIRMED,r.I=setTimeout(function(){r.timer_I()},f.TIMER_I),!0;break;case i.CANCEL:return(r=n.ist[t.via_branch])?(t.reply_sl(200),r.state!==g.STATUS_PROCEEDING):(t.reply_sl(481),!0);default:if(r=n.nist[t.via_branch]){switch(r.state){case g.STATUS_TRYING:break;case g.STATUS_PROCEEDING:case g.STATUS_COMPLETED:r.transport.send(r.last_response)}return!0}}}}},{"./Constants":2,"./SIPMessage":19,"./Timers":21,debug:29,events:31}],23:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var i=e("./Socket"),a=e("debug")("JsSIP:Transport"),o=e("debug")("JsSIP:ERROR:Transport");o.log=console.warn.bind(console);var s={STATUS_CONNECTED:0,STATUS_CONNECTING:1,STATUS_DISCONNECTED:2,SOCKET_STATUS_READY:0,SOCKET_STATUS_ERROR:1,recovery_options:{min_interval:2,max_interval:30}};t.exports=function(){function n(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:s.recovery_options;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),a("new()"),this.status=s.STATUS_DISCONNECTED,this.socket=null,this.sockets=[],this.recovery_options=t,this.recover_attempts=0,this.recovery_timer=null,this.close_requested=!1,void 0===e)throw new TypeError("Invalid argument. undefined 'sockets' argument");e instanceof Array||(e=[e]),e.forEach(function(e){if(!i.isSocket(e.socket))throw new TypeError("Invalid argument. invalid 'JsSIP.Socket' instance");if(e.weight&&!Number(e.weight))throw new TypeError("Invalid argument. 'weight' attribute is not a number");this.sockets.push({socket:e.socket,weight:e.weight||0,status:s.SOCKET_STATUS_READY})},this),this._getSocket()}return r(n,[{key:"connect",value:function(){a("connect()"),this.isConnected()?a("Transport is already connected"):this.isConnecting()?a("Transport is connecting"):(this.close_requested=!1,this.status=s.STATUS_CONNECTING,this.onconnecting({socket:this.socket,attempts:this.recover_attempts}),this.close_requested||(this.socket.onconnect=this._onConnect.bind(this),this.socket.ondisconnect=this._onDisconnect.bind(this),this.socket.ondata=this._onData.bind(this),this.socket.connect()))}},{key:"disconnect",value:function(){a("close()"),this.close_requested=!0,this.recover_attempts=0,this.status=s.STATUS_DISCONNECTED,null!==this.recovery_timer&&(clearTimeout(this.recovery_timer),this.recovery_timer=null),this.socket.onconnect=function(){},this.socket.ondisconnect=function(){},this.socket.ondata=function(){},this.socket.disconnect(),this.ondisconnect({socket:this.socket,error:!1})}},{key:"send",value:function(e){if(a("send()"),!this.isConnected())return o("unable to send message, transport is not connected"),!1;var t=e.toString();return a("sending message:\n\n"+t+"\n"),this.socket.send(t)}},{key:"isConnected",value:function(){return this.status===s.STATUS_CONNECTED}},{key:"isConnecting",value:function(){return this.status===s.STATUS_CONNECTING}},{key:"_reconnect",value:function(){var e=this;this.recover_attempts+=1;var t=Math.floor(Math.random()*Math.pow(2,this.recover_attempts)+1);t<this.recovery_options.min_interval?t=this.recovery_options.min_interval:t>this.recovery_options.max_interval&&(t=this.recovery_options.max_interval),a("reconnection attempt: "+this.recover_attempts+". next connection attempt in "+t+" seconds"),this.recovery_timer=setTimeout(function(){e.close_requested||e.isConnected()||e.isConnecting()||(e._getSocket(),e.connect())},1e3*t)}},{key:"_getSocket",value:function(){var t=[];if(this.sockets.forEach(function(e){e.status!==s.SOCKET_STATUS_ERROR&&(0===t.length?t.push(e):e.weight>t[0].weight?t=[e]:e.weight===t[0].weight&&t.push(e))}),0===t.length)return this.sockets.forEach(function(e){e.status=s.SOCKET_STATUS_READY}),void this._getSocket();var e=Math.floor(Math.random()*t.length);this.socket=t[e].socket}},{key:"_onConnect",value:function(){this.recover_attempts=0,this.status=s.STATUS_CONNECTED,null!==this.recovery_timer&&(clearTimeout(this.recovery_timer),this.recovery_timer=null),this.onconnect({socket:this})}},{key:"_onDisconnect",value:function(e,t,n){this.status=s.STATUS_DISCONNECTED,this.ondisconnect({socket:this.socket,error:e,code:t,reason:n}),this.close_requested||(this.sockets.forEach(function(e){this.socket===e.socket&&(e.status=s.SOCKET_STATUS_ERROR)},this),this._reconnect(e))}},{key:"_onData",value:function(e){if("\r\n"!==e){if("string"!=typeof e){try{e=String.fromCharCode.apply(null,new Uint8Array(e))}catch(e){return void a("received binary message failed to be converted into string, message discarded")}a("received binary message:\n\n"+e+"\n")}else a("received text message:\n\n"+e+"\n");this.ondata({transport:this,message:e})}else a("received message with CRLF Keep Alive response")}},{key:"via_transport",get:function(){return this.socket.via_transport}},{key:"url",get:function(){return this.socket.url}},{key:"sip_uri",get:function(){return this.socket.sip_uri}}]),n}()},{"./Socket":20,debug:29}],24:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var i=e("events").EventEmitter,o=e("./Constants"),a=e("./Registrator"),s=e("./RTCSession"),c=e("./Message"),l=e("./Transactions"),u=e("./Transport"),f=e("./Utils"),d=e("./Exceptions"),h=e("./URI"),p=e("./Grammar"),m=e("./Parser"),g=e("./SIPMessage"),_=e("./sanityCheck"),b=e("./Config"),v=e("debug")("JsSIP:UA"),y=e("debug")("JsSIP:ERROR:UA");y.log=console.warn.bind(console);var w={STATUS_INIT:0,STATUS_READY:1,STATUS_USER_CLOSED:2,STATUS_NOT_READY:3,CONFIGURATION_ERROR:1,NETWORK_ERROR:2};t.exports=function(e){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),v("new() [configuration:%o]",e);var t=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}(this,(n.__proto__||Object.getPrototypeOf(n)).call(this));if(t._cache={credentials:{}},t._configuration=Object.assign({},b.settings),t._dynConfiguration={},t._dialogs={},t._applicants={},t._sessions={},t._transport=null,t._contact=null,t._status=w.STATUS_INIT,t._error=null,t._transactions={nist:{},nict:{},ist:{},ict:{}},t._data={},t._closeTimer=null,void 0===e)throw new TypeError("Not enough arguments");try{t._loadConfig(e)}catch(e){throw t._status=w.STATUS_NOT_READY,t._error=w.CONFIGURATION_ERROR,e}return t._registrator=new a(t),t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(n,i),r(n,null,[{key:"C",get:function(){return w}}]),r(n,[{key:"start",value:function(){v("start()"),this._status===w.STATUS_INIT?this._transport.connect():this._status===w.STATUS_USER_CLOSED?(v("restarting UA"),null!==this._closeTimer&&(clearTimeout(this._closeTimer),this._closeTimer=null,this._transport.disconnect()),this._status=w.STATUS_INIT,this._transport.connect()):this._status===w.STATUS_READY?v("UA is in READY status, not restarted"):v("ERROR: connection is down, Auto-Recovery system is trying to reconnect"),this._dynConfiguration.register=this._configuration.register}},{key:"register",value:function(){v("register()"),this._dynConfiguration.register=!0,this._registrator.register()}},{key:"unregister",value:function(e){v("unregister()"),this._dynConfiguration.register=!1,this._registrator.unregister(e)}},{key:"registrator",value:function(){return this._registrator}},{key:"isRegistered",value:function(){return this._registrator.registered}},{key:"isConnected",value:function(){return this._transport.isConnected()}},{key:"call",value:function(e,t){v("call()");var n=new s(this);return n.connect(e,t),n}},{key:"sendMessage",value:function(e,t,n){v("sendMessage()");var r=new c(this);return r.send(e,t,n),r}},{key:"terminateSessions",value:function(e){for(var t in v("terminateSessions()"),this._sessions)this._sessions[t].isEnded()||this._sessions[t].terminate(e)}},{key:"stop",value:function(){var e=this;if(v("stop()"),this._dynConfiguration={},this._status!==w.STATUS_USER_CLOSED){this._registrator.close();var t=Object.keys(this._sessions).length;for(var n in this._sessions)if(Object.prototype.hasOwnProperty.call(this._sessions,n)){v("closing session "+n);try{this._sessions[n].terminate()}catch(e){}}for(var r in this._applicants)if(Object.prototype.hasOwnProperty.call(this._applicants,r))try{this._applicants[r].close()}catch(e){}this._status=w.STATUS_USER_CLOSED,0===Object.keys(this._transactions.nict).length+Object.keys(this._transactions.nist).length+Object.keys(this._transactions.ict).length+Object.keys(this._transactions.ist).length&&0===t?this._transport.disconnect():this._closeTimer=setTimeout(function(){e._closeTimer=null,e._transport.disconnect()},2e3)}else v("UA already closed")}},{key:"normalizeTarget",value:function(e){return f.normalizeTarget(e,this._configuration.hostport_params)}},{key:"get",value:function(e){switch(e){case"realm":return this._configuration.realm;case"ha1":return this._configuration.ha1;default:return void y('get() | cannot get "%s" parameter in runtime',e)}}},{key:"set",value:function(e,t){switch(e){case"password":this._configuration.password=String(t);break;case"realm":this._configuration.realm=String(t);break;case"ha1":this._configuration.ha1=String(t),this._configuration.password=null;break;case"display_name":if(-1===p.parse('"'+t+'"',"display_name"))return y('set() | wrong "display_name"'),!1;this._configuration.display_name=t;break;default:return y('set() | cannot set "%s" parameter in runtime',e),!1}return!0}},{key:"newTransaction",value:function(e){this._transactions[e.type][e.id]=e,this.emit("newTransaction",{transaction:e})}},{key:"destroyTransaction",value:function(e){delete this._transactions[e.type][e.id],this.emit("transactionDestroyed",{transaction:e})}},{key:"newDialog",value:function(e){this._dialogs[e.id]=e}},{key:"destroyDialog",value:function(e){delete this._dialogs[e.id]}},{key:"newMessage",value:function(e,t){this._applicants[e]=e,this.emit("newMessage",t)}},{key:"destroyMessage",value:function(e){delete this._applicants[e]}},{key:"newRTCSession",value:function(e,t){this._sessions[e.id]=e,this.emit("newRTCSession",t)}},{key:"destroyRTCSession",value:function(e){delete this._sessions[e.id]}},{key:"registered",value:function(e){this.emit("registered",e)}},{key:"unregistered",value:function(e){this.emit("unregistered",e)}},{key:"registrationFailed",value:function(e){this.emit("registrationFailed",e)}},{key:"receiveRequest",value:function(e){var t=e.method;if(e.ruri.user!==this._configuration.uri.user&&e.ruri.user!==this._contact.uri.user)return v("Request-URI does not point to us"),void(e.method!==o.ACK&&e.reply_sl(404));if(e.ruri.scheme!==o.SIPS){if(!l.checkTransaction(this,e)){if(t===o.INVITE?new l.InviteServerTransaction(this,this._transport,e):t!==o.ACK&&t!==o.CANCEL&&new l.NonInviteServerTransaction(this,this._transport,e),t===o.OPTIONS)e.reply(200);else if(t===o.MESSAGE){if(0===this.listeners("newMessage").length)return void e.reply(405);new c(this).init_incoming(e)}else if(t===o.INVITE&&!e.to_tag&&0===this.listeners("newRTCSession").length)return void e.reply(405);var n=void 0,r=void 0;if(e.to_tag)(n=this._findDialog(e.call_id,e.from_tag,e.to_tag))?n.receiveRequest(e):t===o.NOTIFY?(r=this._findSession(e))?r.receiveRequest(e):(v("received NOTIFY request for a non existent subscription"),e.reply(481,"Subscription does not exist")):t!==o.ACK&&e.reply(481);else switch(t){case o.INVITE:if(window.RTCPeerConnection)if(e.hasHeader("replaces")){var i=e.replaces;(n=this._findDialog(i.call_id,i.from_tag,i.to_tag))?(r=n.owner).isEnded()?e.reply(603):r.receiveRequest(e):e.reply(481)}else(r=new s(this)).init_incoming(e);else y("INVITE received but WebRTC is not supported"),e.reply(488);break;case o.BYE:e.reply(481);break;case o.CANCEL:(r=this._findSession(e))?r.receiveRequest(e):v("received CANCEL request for a non existent session");break;case o.ACK:break;default:e.reply(405)}}}else e.reply_sl(416)}},{key:"_findSession",value:function(e){var t=e.call_id,n=e.from_tag,r=e.to_tag,i=t+n,a=this._sessions[i],o=t+r,s=this._sessions[o];return a||(s||null)}},{key:"_findDialog",value:function(e,t,n){var r=e+t+n,i=this._dialogs[r];return i||(r=e+n+t,(i=this._dialogs[r])||null)}},{key:"_loadConfig",value:function(e){try{b.load(this._configuration,e)}catch(e){throw e}0===this._configuration.display_name&&(this._configuration.display_name="0"),this._configuration.instance_id||(this._configuration.instance_id=f.newUUID()),this._configuration.jssip_id=f.createRandomToken(5);var t=this._configuration.uri.clone();t.user=null,this._configuration.hostport_params=t.toString().replace(/^sip:/i,"");try{this._transport=new u(this._configuration.sockets,{max_interval:this._configuration.connection_recovery_max_interval,min_interval:this._configuration.connection_recovery_min_interval}),this._transport.onconnecting=function(e){this.emit("connecting",e)}.bind(this),this._transport.onconnect=function(e){if(this._status===w.STATUS_USER_CLOSED)return;this._status=w.STATUS_READY,this._error=null,this.emit("connected",e),this._dynConfiguration.register&&this._registrator.register()}.bind(this),this._transport.ondisconnect=function(e){var t=!0,n=!1,r=void 0;try{for(var i,a=["nict","ict","nist","ist"][Symbol.iterator]();!(t=(i=a.next()).done);t=!0){var o=i.value;for(var s in this._transactions[o])Object.prototype.hasOwnProperty.call(this._transactions[o],s)&&this._transactions[o][s].onTransportError()}}catch(e){n=!0,r=e}finally{try{!t&&a.return&&a.return()}finally{if(n)throw r}}this.emit("disconnected",e),this._registrator.onTransportClosed(),this._status!==w.STATUS_USER_CLOSED&&(this._status=w.STATUS_NOT_READY,this._error=w.NETWORK_ERROR)}.bind(this),this._transport.ondata=function(e){var t=e.transport,n=e.message;if(!(n=m.parseMessage(n,this)))return;if(this._status===w.STATUS_USER_CLOSED&&n instanceof g.IncomingRequest)return;if(!_(n,this,t))return;if(n instanceof g.IncomingRequest)n.transport=t,this.receiveRequest(n);else if(n instanceof g.IncomingResponse){var r=void 0;switch(n.method){case o.INVITE:(r=this._transactions.ict[n.via_branch])&&r.receiveResponse(n);break;case o.ACK:break;default:(r=this._transactions.nict[n.via_branch])&&r.receiveResponse(n)}}}.bind(this)}catch(e){throw y(e),new d.ConfigurationError("sockets",this._configuration.sockets)}if(delete this._configuration.sockets,this._configuration.authorization_user||(this._configuration.authorization_user=this._configuration.uri.user),!this._configuration.registrar_server){var n=this._configuration.uri.clone();n.user=null,n.clearParams(),n.clearHeaders(),this._configuration.registrar_server=n}this._configuration.no_answer_timeout*=1e3,this._configuration.contact_uri?this._configuration.via_host=this._configuration.contact_uri.host:this._configuration.contact_uri=new h("sip",f.createRandomToken(8),this._configuration.via_host,null,{transport:"ws"}),this._contact={pub_gruu:null,temp_gruu:null,uri:this._configuration.contact_uri,toString:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=e.anonymous||null,n=e.outbound||null,r="<";return r+=t?this.temp_gruu||"sip:anonymous@anonymous.invalid;transport=ws":this.pub_gruu||this.uri.toString(),!n||(t?this.temp_gruu:this.pub_gruu)||(r+=";ob"),r+=">"}};var r=["password","realm","ha1","display_name","register"];for(var i in this._configuration)Object.prototype.hasOwnProperty.call(this._configuration,i)&&(-1!==r.indexOf(i)?Object.defineProperty(this._configuration,i,{writable:!0,configurable:!1}):Object.defineProperty(this._configuration,i,{writable:!1,configurable:!1}));for(var a in v("configuration parameters after validation:"),this._configuration)if(Object.prototype.hasOwnProperty.call(b.settings,a))switch(a){case"uri":case"registrar_server":v("- "+a+": "+this._configuration[a]);break;case"password":case"ha1":v("- "+a+": NOT SHOWN");break;default:v("- "+a+": "+JSON.stringify(this._configuration[a]))}}},{key:"C",get:function(){return w}},{key:"status",get:function(){return this._status}},{key:"contact",get:function(){return this._contact}},{key:"configuration",get:function(){return this._configuration}},{key:"transport",get:function(){return this._transport}}]),n}()},{"./Config":1,"./Constants":2,"./Exceptions":6,"./Grammar":7,"./Message":9,"./Parser":11,"./RTCSession":12,"./Registrator":17,"./SIPMessage":19,"./Transactions":22,"./Transport":23,"./URI":25,"./Utils":26,"./sanityCheck":28,debug:29,events:31}],25:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var l=e("./Constants"),u=e("./Utils"),i=e("./Grammar");t.exports=function(){function c(e,t,n,r){var i=4<arguments.length&&void 0!==arguments[4]?arguments[4]:{},a=5<arguments.length&&void 0!==arguments[5]?arguments[5]:{};if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,c),!n)throw new TypeError('missing or invalid "host" parameter');for(var o in this._parameters={},this._headers={},this._scheme=e||l.SIP,this._user=t,this._host=n,this._port=r,i)Object.prototype.hasOwnProperty.call(i,o)&&this.setParam(o,i[o]);for(var s in a)Object.prototype.hasOwnProperty.call(a,s)&&this.setHeader(s,a[s])}return r(c,null,[{key:"parse",value:function(e){return-1!==(e=i.parse(e,"SIP_URI"))?e:void 0}}]),r(c,[{key:"setParam",value:function(e,t){e&&(this._parameters[e.toLowerCase()]=null==t?null:t.toString())}},{key:"getParam",value:function(e){if(e)return this._parameters[e.toLowerCase()]}},{key:"hasParam",value:function(e){if(e)return!!this._parameters.hasOwnProperty(e.toLowerCase())}},{key:"deleteParam",value:function(e){if(e=e.toLowerCase(),this._parameters.hasOwnProperty(e)){var t=this._parameters[e];return delete this._parameters[e],t}}},{key:"clearParams",value:function(){this._parameters={}}},{key:"setHeader",value:function(e,t){this._headers[u.headerize(e)]=Array.isArray(t)?t:[t]}},{key:"getHeader",value:function(e){if(e)return this._headers[u.headerize(e)]}},{key:"hasHeader",value:function(e){if(e)return!!this._headers.hasOwnProperty(u.headerize(e))}},{key:"deleteHeader",value:function(e){if(e=u.headerize(e),this._headers.hasOwnProperty(e)){var t=this._headers[e];return delete this._headers[e],t}}},{key:"clearHeaders",value:function(){this._headers={}}},{key:"clone",value:function(){return new c(this._scheme,this._user,this._host,this._port,JSON.parse(JSON.stringify(this._parameters)),JSON.parse(JSON.stringify(this._headers)))}},{key:"toString",value:function(){var e=[],t=this._scheme+":";for(var n in this._user&&(t+=u.escapeUser(this._user)+"@"),t+=this._host,(this._port||0===this._port)&&(t+=":"+this._port),this._parameters)Object.prototype.hasOwnProperty.call(this._parameters,n)&&(t+=";"+n,null!==this._parameters[n]&&(t+="="+this._parameters[n]));for(var r in this._headers)if(Object.prototype.hasOwnProperty.call(this._headers,r)){var i=!0,a=!1,o=void 0;try{for(var s,c=this._headers[r][Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var l=s.value;e.push(r+"="+l)}}catch(e){a=!0,o=e}finally{try{!i&&c.return&&c.return()}finally{if(a)throw o}}}return 0<e.length&&(t+="?"+e.join("&")),t}},{key:"toAor",value:function(e){var t=this._scheme+":";return this._user&&(t+=u.escapeUser(this._user)+"@"),t+=this._host,e&&(this._port||0===this._port)&&(t+=":"+this._port),t}},{key:"scheme",get:function(){return this._scheme},set:function(e){this._scheme=e.toLowerCase()}},{key:"user",get:function(){return this._user},set:function(e){this._user=e}},{key:"host",get:function(){return this._host},set:function(e){this._host=e.toLowerCase()}},{key:"port",get:function(){return this._port},set:function(e){this._port=0===e?e:parseInt(e,10)||null}}]),c}()},{"./Constants":2,"./Grammar":7,"./Utils":26}],26:[function(e,t,n){"use strict";var _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o=e("./Constants"),s=e("./URI"),r=e("./Grammar");n.str_utf8_length=function(e){return unescape(encodeURIComponent(e)).length};var u=n.isFunction=function(e){return void 0!==e&&"[object Function]"===Object.prototype.toString.call(e)};n.isString=function(e){return void 0!==e&&"[object String]"===Object.prototype.toString.call(e)},n.isDecimal=function(e){return!isNaN(e)&&parseFloat(e)===parseInt(e,10)},n.isEmpty=function(e){return null===e||""===e||void 0===e||Array.isArray(e)&&0===e.length||"number"==typeof e&&isNaN(e)},n.hasMethods=function(e){for(var t=arguments.length,n=Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=!0,a=!1,o=void 0;try{for(var s,c=n[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){var l=s.value;if(u(e[l]))return!1}}catch(e){a=!0,o=e}finally{try{!i&&c.return&&c.return()}finally{if(a)throw o}}return!0};var i=n.createRandomToken=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:32,n=void 0,r="";for(n=0;n<e;n++)r+=(Math.random()*t|0).toString(t);return r};n.newTag=function(){return i(10)},n.newUUID=function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})},n.hostType=function(e){if(e)return-1!==(e=r.parse(e,"host"))?e.host_type:void 0};var c=n.escapeUser=function(e){return encodeURIComponent(decodeURIComponent(e)).replace(/%3A/gi,":").replace(/%2B/gi,"+").replace(/%3F/gi,"?").replace(/%2F/gi,"/")};n.normalizeTarget=function(e,t){if(e){if(e instanceof s)return e;if("string"!=typeof e)return;var n=e.split("@"),r=void 0,i=void 0;switch(n.length){case 1:if(!t)return;r=e,i=t;break;case 2:r=n[0],i=n[1];break;default:r=n.slice(0,n.length-1).join("@"),i=n[n.length-1]}r=r.replace(/^(sips?|tel):/i,""),/^[-.()]*\+?[0-9\-.()]+$/.test(r)&&(r=r.replace(/[-.()]/g,"")),e=o.SIP+":"+c(r)+"@"+i;var a;return(a=s.parse(e))?a:void 0}},n.headerize=function(e){var t={"Call-Id":"Call-ID",Cseq:"CSeq","Www-Authenticate":"WWW-Authenticate"},n=e.toLowerCase().replace(/_/g,"-").split("-"),r="",i=n.length,a=void 0;for(a=0;a<i;a++)0!==a&&(r+="-"),r+=n[a].charAt(0).toUpperCase()+n[a].substring(1);return t[r]&&(r=t[r]),r},n.sipErrorCause=function(e){for(var t in o.SIP_ERROR_CAUSES)if(-1!==o.SIP_ERROR_CAUSES[t].indexOf(e))return o.causes[t];return o.causes.SIP_FAILURE_CODE},n.getRandomTestNetIP=function(){return"192.0.2."+(e=1,t=254,Math.floor(Math.random()*(t-e+1)+e));var e,t},n.calculateMD5=function(e){function c(e,t){return e<<t|e>>>32-t}function l(e,t){var n=2147483648&e,r=2147483648&t,i=1073741824&e,a=1073741824&t,o=(1073741823&e)+(1073741823&t);return i&a?2147483648^o^n^r:i|a?1073741824&o?3221225472^o^n^r:1073741824^o^n^r:o^n^r}function t(e,t,n,r,i,a,o){var s;return l(c(e=l(e,l(l((s=t)&n|~s&r,i),o)),a),t)}function n(e,t,n,r,i,a,o){var s;return l(c(e=l(e,l(l(t&(s=r)|n&~s,i),o)),a),t)}function r(e,t,n,r,i,a,o){return l(c(e=l(e,l(l(t^n^r,i),o)),a),t)}function i(e,t,n,r,i,a,o){return l(c(e=l(e,l(l(n^(t|~r),i),o)),a),t)}function a(e){var t="",n="",r=void 0;for(r=0;r<=3;r++)t+=(n="0"+(e>>>8*r&255).toString(16)).substr(n.length-2,2);return t}var o,s=void 0,u=void 0,f=void 0,d=void 0,h=void 0,p=void 0,m=void 0,g=void 0,_=void 0;for(o=function(e){for(var t=void 0,n=e.length,r=n+8,i=16*((r-r%64)/64+1),a=new Array(i-1),o=0,s=0;s<n;)o=s%4*8,a[t=(s-s%4)/4]=a[t]|e.charCodeAt(s)<<o,s++;return o=s%4*8,a[t=(s-s%4)/4]=a[t]|128<<o,a[i-2]=n<<3,a[i-1]=n>>>29,a}(e=function(e){e=e.replace(/\r\n/g,"\n");for(var t="",n=0;n<e.length;n++){var r=e.charCodeAt(n);r<128?t+=String.fromCharCode(r):(127<r&&r<2048?t+=String.fromCharCode(r>>6|192):(t+=String.fromCharCode(r>>12|224),t+=String.fromCharCode(r>>6&63|128)),t+=String.fromCharCode(63&r|128))}return t}(e)),p=1732584193,m=4023233417,g=2562383102,_=271733878,s=0;s<o.length;s+=16)m=i(m=i(m=i(m=i(m=r(m=r(m=r(m=r(m=n(m=n(m=n(m=n(m=t(m=t(m=t(m=t(f=m,g=t(d=g,_=t(h=_,p=t(u=p,m,g,_,o[s+0],7,3614090360),m,g,o[s+1],12,3905402710),p,m,o[s+2],17,606105819),_,p,o[s+3],22,3250441966),g=t(g,_=t(_,p=t(p,m,g,_,o[s+4],7,4118548399),m,g,o[s+5],12,1200080426),p,m,o[s+6],17,2821735955),_,p,o[s+7],22,4249261313),g=t(g,_=t(_,p=t(p,m,g,_,o[s+8],7,1770035416),m,g,o[s+9],12,2336552879),p,m,o[s+10],17,4294925233),_,p,o[s+11],22,2304563134),g=t(g,_=t(_,p=t(p,m,g,_,o[s+12],7,1804603682),m,g,o[s+13],12,4254626195),p,m,o[s+14],17,2792965006),_,p,o[s+15],22,1236535329),g=n(g,_=n(_,p=n(p,m,g,_,o[s+1],5,4129170786),m,g,o[s+6],9,3225465664),p,m,o[s+11],14,643717713),_,p,o[s+0],20,3921069994),g=n(g,_=n(_,p=n(p,m,g,_,o[s+5],5,3593408605),m,g,o[s+10],9,38016083),p,m,o[s+15],14,3634488961),_,p,o[s+4],20,3889429448),g=n(g,_=n(_,p=n(p,m,g,_,o[s+9],5,568446438),m,g,o[s+14],9,3275163606),p,m,o[s+3],14,4107603335),_,p,o[s+8],20,1163531501),g=n(g,_=n(_,p=n(p,m,g,_,o[s+13],5,2850285829),m,g,o[s+2],9,4243563512),p,m,o[s+7],14,1735328473),_,p,o[s+12],20,2368359562),g=r(g,_=r(_,p=r(p,m,g,_,o[s+5],4,4294588738),m,g,o[s+8],11,2272392833),p,m,o[s+11],16,1839030562),_,p,o[s+14],23,4259657740),g=r(g,_=r(_,p=r(p,m,g,_,o[s+1],4,2763975236),m,g,o[s+4],11,1272893353),p,m,o[s+7],16,4139469664),_,p,o[s+10],23,3200236656),g=r(g,_=r(_,p=r(p,m,g,_,o[s+13],4,681279174),m,g,o[s+0],11,3936430074),p,m,o[s+3],16,3572445317),_,p,o[s+6],23,76029189),g=r(g,_=r(_,p=r(p,m,g,_,o[s+9],4,3654602809),m,g,o[s+12],11,3873151461),p,m,o[s+15],16,530742520),_,p,o[s+2],23,3299628645),g=i(g,_=i(_,p=i(p,m,g,_,o[s+0],6,4096336452),m,g,o[s+7],10,1126891415),p,m,o[s+14],15,2878612391),_,p,o[s+5],21,4237533241),g=i(g,_=i(_,p=i(p,m,g,_,o[s+12],6,1700485571),m,g,o[s+3],10,2399980690),p,m,o[s+10],15,4293915773),_,p,o[s+1],21,2240044497),g=i(g,_=i(_,p=i(p,m,g,_,o[s+8],6,1873313359),m,g,o[s+15],10,4264355552),p,m,o[s+6],15,2734768916),_,p,o[s+13],21,1309151649),g=i(g,_=i(_,p=i(p,m,g,_,o[s+4],6,4149444226),m,g,o[s+11],10,3174756917),p,m,o[s+2],15,718787259),_,p,o[s+9],21,3951481745),p=l(p,u),m=l(m,f),g=l(g,d),_=l(_,h);return(a(p)+a(m)+a(g)+a(_)).toLowerCase()},n.closeMediaStream=function(t){if(t)try{var e=void 0;if(t.getTracks){e=t.getTracks();var n=!0,r=!1,i=void 0;try{for(var a,o=e[Symbol.iterator]();!(n=(a=o.next()).done);n=!0){a.value.stop()}}catch(e){r=!0,i=e}finally{try{!n&&o.return&&o.return()}finally{if(r)throw i}}}else{e=t.getAudioTracks();var s=!0,c=!1,l=void 0;try{for(var u,f=e[Symbol.iterator]();!(s=(u=f.next()).done);s=!0){u.value.stop()}}catch(e){c=!0,l=e}finally{try{!s&&f.return&&f.return()}finally{if(c)throw l}}e=t.getVideoTracks();var d=!0,h=!1,p=void 0;try{for(var m,g=e[Symbol.iterator]();!(d=(m=g.next()).done);d=!0){m.value.stop()}}catch(e){h=!0,p=e}finally{try{!d&&g.return&&g.return()}finally{if(h)throw p}}}}catch(e){"function"!=typeof t.stop&&"object"!==_(t.stop)||t.stop()}},n.cloneArray=function(e){return e&&e.slice()||[]}},{"./Constants":2,"./Grammar":7,"./URI":25}],27:[function(e,t,n){"use strict";var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}();var i=e("./Grammar"),a=e("debug")("JsSIP:WebSocketInterface"),o=e("debug")("JsSIP:ERROR:WebSocketInterface");o.log=console.warn.bind(console),t.exports=function(){function n(e){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),a('new() [url:"%s"]',e),this._url=e,this._sip_uri=null,this._via_transport=null,this._ws=null;var t=i.parse(e,"absoluteURI");if(-1===t)throw o("invalid WebSocket URI: "+e),new TypeError("Invalid argument: "+e);if("wss"!==t.scheme&&"ws"!==t.scheme)throw o("invalid WebSocket URI scheme: "+t.scheme),new TypeError("Invalid argument: "+e);this._sip_uri="sip:"+t.host+(t.port?":"+t.port:"")+";transport=ws",this._via_transport=t.scheme.toUpperCase()}return r(n,[{key:"connect",value:function(){if(a("connect()"),this.isConnected())a("WebSocket "+this._url+" is already connected");else if(this.isConnecting())a("WebSocket "+this._url+" is connecting");else{this._ws&&this.disconnect(),a("connecting to WebSocket "+this._url);try{this._ws=new WebSocket(this._url,"sip"),this._ws.binaryType="arraybuffer",this._ws.onopen=this._onOpen.bind(this),this._ws.onclose=this._onClose.bind(this),this._ws.onmessage=this._onMessage.bind(this),this._ws.onerror=this._onError.bind(this)}catch(e){this._onError(e)}}}},{key:"disconnect",value:function(){a("disconnect()"),this._ws&&(this._ws.onopen=function(){},this._ws.onclose=function(){},this._ws.onmessage=function(){},this._ws.onerror=function(){},this._ws.close(),this._ws=null)}},{key:"send",value:function(e){return a("send()"),this.isConnected()?(this._ws.send(e),!0):(o("unable to send message, WebSocket is not open"),!1)}},{key:"isConnected",value:function(){return this._ws&&this._ws.readyState===this._ws.OPEN}},{key:"isConnecting",value:function(){return this._ws&&this._ws.readyState===this._ws.CONNECTING}},{key:"_onOpen",value:function(){a("WebSocket "+this._url+" connected"),this.onconnect()}},{key:"_onClose",value:function(e){var t=e.wasClean,n=e.code,r=e.reason;a("WebSocket "+this._url+" closed"),!1===t&&a("WebSocket abrupt disconnection");var i={socket:this,error:!t,code:n,reason:r};this.ondisconnect(i)}},{key:"_onMessage",value:function(e){var t=e.data;a("received WebSocket message"),this.ondata(t)}},{key:"_onError",value:function(e){o("WebSocket "+this._url+" error: "+e)}},{key:"via_transport",get:function(){return this._via_transport},set:function(e){this._via_transport=e.toUpperCase()}},{key:"sip_uri",get:function(){return this._sip_uri}},{key:"url",get:function(){return this._url}}]),n}()},{"./Grammar":7,debug:29}],28:[function(e,t,n){"use strict";var l=e("./Constants"),b=e("./SIPMessage"),u=e("./Utils"),o=e("debug")("JsSIP:sanityCheck"),v=[function(){var e=!0,t=!1,n=void 0;try{for(var r,i=["from","to","call_id","cseq","via"][Symbol.iterator]();!(e=(r=i.next()).done);e=!0){var a=r.value;if(!C.hasHeader(a))return o("missing mandatory header field : "+a+", dropping the response"),!1}}catch(e){t=!0,n=e}finally{try{!e&&i.return&&i.return()}finally{if(t)throw n}}}],y=[function(){if("sip"!==C.s("to").uri.scheme)return s(416),!1},function(){if(!C.to_tag&&C.call_id.substr(0,5)===A.configuration.jssip_id)return s(482),!1},function(){var e=u.str_utf8_length(C.body),t=C.getHeader("content-length");if(e<t)return s(400),!1},function(){var e=C.from_tag,t=C.call_id,n=C.cseq,r=void 0;if(C.to_tag)return;if(C.method===l.INVITE){if(A._transactions.ist[C.via_branch])return!1;for(var i in A._transactions.ist)if(Object.prototype.hasOwnProperty.call(A._transactions.ist,i)&&(r=A._transactions.ist[i]).request.from_tag===e&&r.request.call_id===t&&r.request.cseq===n)return s(482),!1}else{if(A._transactions.nist[C.via_branch])return!1;for(var a in A._transactions.nist)if(Object.prototype.hasOwnProperty.call(A._transactions.nist,a)&&(r=A._transactions.nist[a]).request.from_tag===e&&r.request.call_id===t&&r.request.cseq===n)return s(482),!1}}],w=[function(){if(1<C.getHeaders("via").length)return o("more than one Via header field present in the response, dropping the response"),!1},function(){var e=u.str_utf8_length(C.body),t=C.getHeader("content-length");if(e<t)return o("message body length is lower than the value in Content-Length header field, dropping the response"),!1}],C=void 0,A=void 0,S=void 0;function s(e){var t=C.getHeaders("via"),n=void 0,r="SIP/2.0 "+e+" "+l.REASON_PHRASE[e]+"\r\n",i=!0,a=!1,o=void 0;try{for(var s,c=t[Symbol.iterator]();!(i=(s=c.next()).done);i=!0){r+="Via: "+s.value+"\r\n"}}catch(e){a=!0,o=e}finally{try{!i&&c.return&&c.return()}finally{if(a)throw o}}n=C.getHeader("To"),C.to_tag||(n+=";tag="+u.newTag()),r+="To: "+n+"\r\n",r+="From: "+C.getHeader("From")+"\r\n",r+="Call-ID: "+C.call_id+"\r\n",r+="CSeq: "+C.cseq+" "+C.method+"\r\n",r+="\r\n",S.send(r)}t.exports=function(e,t,n){C=e,A=t,S=n;var r=!0,i=!1,a=void 0;try{for(var o,s=v[Symbol.iterator]();!(r=(o=s.next()).done);r=!0){if(!1===(0,o.value)())return!1}}catch(e){i=!0,a=e}finally{try{!r&&s.return&&s.return()}finally{if(i)throw a}}if(C instanceof b.IncomingRequest){var c=!0,l=!1,u=void 0;try{for(var f,d=y[Symbol.iterator]();!(c=(f=d.next()).done);c=!0){if(!1===(0,f.value)())return!1}}catch(e){l=!0,u=e}finally{try{!c&&d.return&&d.return()}finally{if(l)throw u}}}else if(C instanceof b.IncomingResponse){var h=!0,p=!1,m=void 0;try{for(var g,_=w[Symbol.iterator]();!(h=(g=_.next()).done);h=!0){if(!1===(0,g.value)())return!1}}catch(e){p=!0,m=e}finally{try{!h&&_.return&&_.return()}finally{if(p)throw m}}}return!0}},{"./Constants":2,"./SIPMessage":19,"./Utils":26,debug:29}],29:[function(n,r,a){(function(t){function e(){var e;try{e=a.storage.debug}catch(e){}return!e&&void 0!==t&&"env"in t&&(e=t.env.DEBUG),e}(a=r.exports=n("./debug")).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},a.formatArgs=function(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+a.humanize(this.diff),!t)return;var n="color: "+this.color;e.splice(1,0,n,"color: inherit");var r=0,i=0;e[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(i=r))}),e.splice(i,0,n)},a.save=function(e){try{null==e?a.storage.removeItem("debug"):a.storage.debug=e}catch(e){}},a.load=e,a.useColors=function(){if("undefined"!=typeof window&&window.process&&"renderer"===window.process.type)return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},a.storage="undefined"!=typeof chrome&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch(e){}}(),a.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],a.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}},a.enable(e())}).call(this,n("_process"))},{"./debug":30,_process:33}],30:[function(e,t,c){function n(e){var r;function s(){if(s.enabled){var i=s,e=+new Date,t=e-(r||e);i.diff=t,i.prev=r,i.curr=e,r=e;for(var a=new Array(arguments.length),n=0;n<a.length;n++)a[n]=arguments[n];a[0]=c.coerce(a[0]),"string"!=typeof a[0]&&a.unshift("%O");var o=0;a[0]=a[0].replace(/%([a-zA-Z%])/g,function(e,t){if("%%"===e)return e;o++;var n=c.formatters[t];if("function"==typeof n){var r=a[o];e=n.call(i,r),a.splice(o,1),o--}return e}),c.formatArgs.call(i,a),(s.log||c.log||console.log.bind(console)).apply(i,a)}}return s.namespace=e,s.enabled=c.enabled(e),s.useColors=c.useColors(),s.color=function(e){var t,n=0;for(t in e)n=(n<<5)-n+e.charCodeAt(t),n|=0;return c.colors[Math.abs(n)%c.colors.length]}(e),s.destroy=i,"function"==typeof c.init&&c.init(s),c.instances.push(s),s}function i(){var e=c.instances.indexOf(this);return-1!==e&&(c.instances.splice(e,1),!0)}(c=t.exports=n.debug=n.default=n).coerce=function(e){return e instanceof Error?e.stack||e.message:e},c.disable=function(){c.enable("")},c.enable=function(e){var t;c.save(e),c.names=[],c.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?c.skips.push(new RegExp("^"+e.substr(1)+"$")):c.names.push(new RegExp("^"+e+"$")));for(t=0;t<c.instances.length;t++){var i=c.instances[t];i.enabled=c.enabled(i.namespace)}},c.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=c.skips.length;t<n;t++)if(c.skips[t].test(e))return!1;for(t=0,n=c.names.length;t<n;t++)if(c.names[t].test(e))return!0;return!1},c.humanize=e("ms"),c.instances=[],c.names=[],c.skips=[],c.formatters={}},{ms:32}],31:[function(e,t,n){function r(){this._events=this._events||{},this._maxListeners=this._maxListeners||void 0}function c(e){return"function"==typeof e}function l(e){return"object"==typeof e&&null!==e}function u(e){return void 0===e}((t.exports=r).EventEmitter=r).prototype._events=void 0,r.prototype._maxListeners=void 0,r.defaultMaxListeners=10,r.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||isNaN(e))throw TypeError("n must be a positive number");return this._maxListeners=e,this},r.prototype.emit=function(e){var t,n,r,i,a,o;if(this._events||(this._events={}),"error"===e&&(!this._events.error||l(this._events.error)&&!this._events.error.length)){if((t=arguments[1])instanceof Error)throw t;var s=new Error('Uncaught, unspecified "error" event. ('+t+")");throw s.context=t,s}if(u(n=this._events[e]))return!1;if(c(n))switch(arguments.length){case 1:n.call(this);break;case 2:n.call(this,arguments[1]);break;case 3:n.call(this,arguments[1],arguments[2]);break;default:i=Array.prototype.slice.call(arguments,1),n.apply(this,i)}else if(l(n))for(i=Array.prototype.slice.call(arguments,1),r=(o=n.slice()).length,a=0;a<r;a++)o[a].apply(this,i);return!0},r.prototype.on=r.prototype.addListener=function(e,t){var n;if(!c(t))throw TypeError("listener must be a function");return this._events||(this._events={}),this._events.newListener&&this.emit("newListener",e,c(t.listener)?t.listener:t),this._events[e]?l(this._events[e])?this._events[e].push(t):this._events[e]=[this._events[e],t]:this._events[e]=t,l(this._events[e])&&!this._events[e].warned&&(n=u(this._maxListeners)?r.defaultMaxListeners:this._maxListeners)&&0<n&&this._events[e].length>n&&(this._events[e].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[e].length),"function"==typeof console.trace&&console.trace()),this},r.prototype.once=function(e,t){if(!c(t))throw TypeError("listener must be a function");var n=!1;function r(){this.removeListener(e,r),n||(n=!0,t.apply(this,arguments))}return r.listener=t,this.on(e,r),this},r.prototype.removeListener=function(e,t){var n,r,i,a;if(!c(t))throw TypeError("listener must be a function");if(!this._events||!this._events[e])return this;if(i=(n=this._events[e]).length,r=-1,n===t||c(n.listener)&&n.listener===t)delete this._events[e],this._events.removeListener&&this.emit("removeListener",e,t);else if(l(n)){for(a=i;0<a--;)if(n[a]===t||n[a].listener&&n[a].listener===t){r=a;break}if(r<0)return this;1===n.length?(n.length=0,delete this._events[e]):n.splice(r,1),this._events.removeListener&&this.emit("removeListener",e,t)}return this},r.prototype.removeAllListeners=function(e){var t,n;if(!this._events)return this;if(!this._events.removeListener)return 0===arguments.length?this._events={}:this._events[e]&&delete this._events[e],this;if(0===arguments.length){for(t in this._events)"removeListener"!==t&&this.removeAllListeners(t);return this.removeAllListeners("removeListener"),this._events={},this}if(c(n=this._events[e]))this.removeListener(e,n);else if(n)for(;n.length;)this.removeListener(e,n[n.length-1]);return delete this._events[e],this},r.prototype.listeners=function(e){return this._events&&this._events[e]?c(this._events[e])?[this._events[e]]:this._events[e].slice():[]},r.prototype.listenerCount=function(e){if(this._events){var t=this._events[e];if(c(t))return 1;if(t)return t.length}return 0},r.listenerCount=function(e,t){return e.listenerCount(t)}},{}],32:[function(e,t,n){function i(e,t,n){if(!(e<t))return e<1.5*t?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}t.exports=function(e,t){t=t||{};var n,r=typeof e;if("string"===r&&0<e.length)return function(e){if(100<(e=String(e)).length)return;var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(e);if(!t)return;var n=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"days":case"day":case"d":return 864e5*n;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*n;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*n;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}(e);if("number"===r&&!1===isNaN(e))return t.long?i(n=e,864e5,"day")||i(n,36e5,"hour")||i(n,6e4,"minute")||i(n,1e3,"second")||n+" ms":function(e){if(864e5<=e)return Math.round(e/864e5)+"d";if(36e5<=e)return Math.round(e/36e5)+"h";if(6e4<=e)return Math.round(e/6e4)+"m";if(1e3<=e)return Math.round(e/1e3)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},{}],33:[function(e,t,n){var r,i,a=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function c(t){if(r===setTimeout)return setTimeout(t,0);if((r===o||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:o}catch(e){r=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var l,u=[],f=!1,d=-1;function h(){f&&l&&(f=!1,l.length?u=l.concat(u):d=-1,u.length&&p())}function p(){if(!f){var e=c(h);f=!0;for(var t=u.length;t;){for(l=u,u=[];++d<t;)l&&l[d].run();d=-1,t=u.length}l=null,f=!1,function(t){if(i===clearTimeout)return clearTimeout(t);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(t);try{i(t)}catch(e){try{return i.call(null,t)}catch(e){return i.call(this,t)}}}(e)}}function m(e,t){this.fun=e,this.array=t}function g(){}a.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];u.push(new m(e,t)),1!==u.length||f||c(p)},m.prototype.run=function(){this.fun.apply(null,this.array)},a.title="browser",a.browser=!0,a.env={},a.argv=[],a.version="",a.versions={},a.on=g,a.addListener=g,a.once=g,a.off=g,a.removeListener=g,a.removeAllListeners=g,a.emit=g,a.prependListener=g,a.prependOnceListener=g,a.listeners=function(e){return[]},a.binding=function(e){throw new Error("process.binding is not supported")},a.cwd=function(){return"/"},a.chdir=function(e){throw new Error("process.chdir is not supported")},a.umask=function(){return 0}},{}],34:[function(e,t,n){"use strict";var N=e("sdp");function c(e,t,n,r,i){var a=N.writeRtpDescription(e.kind,t);if(a+=N.writeIceParameters(e.iceGatherer.getLocalParameters()),a+=N.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":i||"active"),a+="a=mid:"+e.mid+"\r\n",e.rtpSender&&e.rtpReceiver?a+="a=sendrecv\r\n":e.rtpSender?a+="a=sendonly\r\n":e.rtpReceiver?a+="a=recvonly\r\n":a+="a=inactive\r\n",e.rtpSender){var o="msid:"+(r?r.id:"-")+" "+e.rtpSender.track.id+"\r\n";a+="a="+o,a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+o,e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+o,a+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return a+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+N.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(a+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+N.localCName+"\r\n"),a}function p(l,u){var f={codecs:[],headerExtensions:[],fecMechanisms:[]},d=function(e,t){e=parseInt(e,10);for(var n=0;n<t.length;n++)if(t[n].payloadType===e||t[n].preferredPayloadType===e)return t[n]};return l.codecs.forEach(function(n){for(var e=0;e<u.codecs.length;e++){var t=u.codecs[e];if(n.name.toLowerCase()===t.name.toLowerCase()&&n.clockRate===t.clockRate){if("rtx"===n.name.toLowerCase()&&n.parameters&&t.parameters.apt&&(r=n,i=t,a=l.codecs,o=u.codecs,c=s=void 0,s=d(r.parameters.apt,a),c=d(i.parameters.apt,o),!s||!c||s.name.toLowerCase()!==c.name.toLowerCase()))continue;(t=JSON.parse(JSON.stringify(t))).numChannels=Math.min(n.numChannels,t.numChannels),f.codecs.push(t),t.rtcpFeedback=t.rtcpFeedback.filter(function(e){for(var t=0;t<n.rtcpFeedback.length;t++)if(n.rtcpFeedback[t].type===e.type&&n.rtcpFeedback[t].parameter===e.parameter)return!0;return!1});break}}var r,i,a,o,s,c}),l.headerExtensions.forEach(function(e){for(var t=0;t<u.headerExtensions.length;t++){var n=u.headerExtensions[t];if(e.uri===n.uri){f.headerExtensions.push(n);break}}}),f}function a(e,t,n){return-1!=={offer:{setLocalDescription:["stable","have-local-offer"],setRemoteDescription:["stable","have-remote-offer"]},answer:{setLocalDescription:["have-remote-offer","have-local-pranswer"],setRemoteDescription:["have-local-offer","have-remote-pranswer"]}}[t][e].indexOf(n)}function L(e,t){var n=e.getRemoteCandidates().find(function(e){return t.foundation===e.foundation&&t.ip===e.ip&&t.port===e.port&&t.priority===e.priority&&t.protocol===e.protocol&&t.type===e.type});return n||e.addRemoteCandidate(t),!n}function m(e,t){var n=new Error(t);return n.name=e,n}t.exports=function($,O){function R(e,t){t.addTrack(e),t.dispatchEvent(new $.MediaStreamTrackEvent("addtrack",{track:e}))}function i(e,t,n,r){var i=new Event("track");i.track=t,i.receiver=n,i.transceiver={receiver:n},i.streams=r,$.setTimeout(function(){e._dispatchEvent("track",i)})}var r=function(e){var t,r,i,n=this,a=document.createDocumentFragment();if(["addEventListener","removeEventListener","dispatchEvent"].forEach(function(e){n[e]=a[e].bind(a)}),this.canTrickleIceCandidates=null,this.needNegotiation=!1,this.localStreams=[],this.remoteStreams=[],this.localDescription=null,this.remoteDescription=null,this.signalingState="stable",this.iceConnectionState="new",this.iceGatheringState="new",e=JSON.parse(JSON.stringify(e||{})),this.usingBundle="max-bundle"===e.bundlePolicy,"negotiate"===e.rtcpMuxPolicy)throw m("NotSupportedError","rtcpMuxPolicy 'negotiate' is not supported");switch(e.rtcpMuxPolicy||(e.rtcpMuxPolicy="require"),e.iceTransportPolicy){case"all":case"relay":break;default:e.iceTransportPolicy="all"}switch(e.bundlePolicy){case"balanced":case"max-compat":case"max-bundle":break;default:e.bundlePolicy="balanced"}if(e.iceServers=(t=e.iceServers||[],r=O,i=!1,(t=JSON.parse(JSON.stringify(t))).filter(function(e){if(e&&(e.urls||e.url)){var t=e.urls||e.url;e.url&&!e.urls&&console.warn("RTCIceServer.url is deprecated! Use urls instead.");var n="string"==typeof t;return n&&(t=[t]),t=t.filter(function(e){return 0!==e.indexOf("turn:")||-1===e.indexOf("transport=udp")||-1!==e.indexOf("turn:[")||i?0===e.indexOf("stun:")&&14393<=r&&-1===e.indexOf("?transport=udp"):i=!0}),delete e.url,e.urls=n?t[0]:t,!!t.length}})),this._iceGatherers=[],e.iceCandidatePoolSize)for(var o=e.iceCandidatePoolSize;0<o;o--)this._iceGatherers.push(new $.RTCIceGatherer({iceServers:e.iceServers,gatherPolicy:e.iceTransportPolicy}));else e.iceCandidatePoolSize=0;this._config=e,this.transceivers=[],this._sdpSessionId=N.generateSessionId(),this._sdpSessionVersion=0,this._dtlsRole=void 0,this._isClosed=!1};r.prototype.onicecandidate=null,r.prototype.onaddstream=null,r.prototype.ontrack=null,r.prototype.onremovestream=null,r.prototype.onsignalingstatechange=null,r.prototype.oniceconnectionstatechange=null,r.prototype.onicegatheringstatechange=null,r.prototype.onnegotiationneeded=null,r.prototype.ondatachannel=null,r.prototype._dispatchEvent=function(e,t){this._isClosed||(this.dispatchEvent(t),"function"==typeof this["on"+e]&&this["on"+e](t))},r.prototype._emitGatheringStateChange=function(){var e=new Event("icegatheringstatechange");this._dispatchEvent("icegatheringstatechange",e)},r.prototype.getConfiguration=function(){return this._config},r.prototype.getLocalStreams=function(){return this.localStreams},r.prototype.getRemoteStreams=function(){return this.remoteStreams},r.prototype._createTransceiver=function(e){var t=0<this.transceivers.length,n={track:null,iceGatherer:null,iceTransport:null,dtlsTransport:null,localCapabilities:null,remoteCapabilities:null,rtpSender:null,rtpReceiver:null,kind:e,mid:null,sendEncodingParameters:null,recvEncodingParameters:null,stream:null,associatedRemoteMediaStreams:[],wantReceive:!0};if(this.usingBundle&&t)n.iceTransport=this.transceivers[0].iceTransport,n.dtlsTransport=this.transceivers[0].dtlsTransport;else{var r=this._createIceAndDtlsTransports();n.iceTransport=r.iceTransport,n.dtlsTransport=r.dtlsTransport}return this.transceivers.push(n),n},r.prototype.addTrack=function(t,e){if(this._isClosed)throw m("InvalidStateError","Attempted to call addTrack on a closed peerconnection.");var n;if(this.transceivers.find(function(e){return e.track===t}))throw m("InvalidAccessError","Track already exists.");for(var r=0;r<this.transceivers.length;r++)this.transceivers[r].track||this.transceivers[r].kind!==t.kind||(n=this.transceivers[r]);return n||(n=this._createTransceiver(t.kind)),this._maybeFireNegotiationNeeded(),-1===this.localStreams.indexOf(e)&&this.localStreams.push(e),n.track=t,n.stream=e,n.rtpSender=new $.RTCRtpSender(t,n.dtlsTransport),n.rtpSender},r.prototype.addStream=function(t){var n=this;if(15025<=O)t.getTracks().forEach(function(e){n.addTrack(e,t)});else{var r=t.clone();t.getTracks().forEach(function(e,t){var n=r.getTracks()[t];e.addEventListener("enabled",function(e){n.enabled=e.enabled})}),r.getTracks().forEach(function(e){n.addTrack(e,r)})}},r.prototype.removeTrack=function(t){if(this._isClosed)throw m("InvalidStateError","Attempted to call removeTrack on a closed peerconnection.");if(!(t instanceof $.RTCRtpSender))throw new TypeError("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.");var e=this.transceivers.find(function(e){return e.rtpSender===t});if(!e)throw m("InvalidAccessError","Sender was not created by this connection.");var n=e.stream;e.rtpSender.stop(),e.rtpSender=null,e.track=null,e.stream=null,-1===this.transceivers.map(function(e){return e.stream}).indexOf(n)&&-1<this.localStreams.indexOf(n)&&this.localStreams.splice(this.localStreams.indexOf(n),1),this._maybeFireNegotiationNeeded()},r.prototype.removeStream=function(e){var n=this;e.getTracks().forEach(function(t){var e=n.getSenders().find(function(e){return e.track===t});e&&n.removeTrack(e)})},r.prototype.getSenders=function(){return this.transceivers.filter(function(e){return!!e.rtpSender}).map(function(e){return e.rtpSender})},r.prototype.getReceivers=function(){return this.transceivers.filter(function(e){return!!e.rtpReceiver}).map(function(e){return e.rtpReceiver})},r.prototype._createIceGatherer=function(n,e){var r=this;if(e&&0<n)return this.transceivers[0].iceGatherer;if(this._iceGatherers.length)return this._iceGatherers.shift();var i=new $.RTCIceGatherer({iceServers:this._config.iceServers,gatherPolicy:this._config.iceTransportPolicy});return Object.defineProperty(i,"state",{value:"new",writable:!0}),this.transceivers[n].bufferedCandidateEvents=[],this.transceivers[n].bufferCandidates=function(e){var t=!e.candidate||0===Object.keys(e.candidate).length;i.state=t?"completed":"gathering",null!==r.transceivers[n].bufferedCandidateEvents&&r.transceivers[n].bufferedCandidateEvents.push(e)},i.addEventListener("localcandidate",this.transceivers[n].bufferCandidates),i},r.prototype._gather=function(s,c){var l=this,u=this.transceivers[c].iceGatherer;if(!u.onlocalcandidate){var e=this.transceivers[c].bufferedCandidateEvents;this.transceivers[c].bufferedCandidateEvents=null,u.removeEventListener("localcandidate",this.transceivers[c].bufferCandidates),u.onlocalcandidate=function(e){if(!(l.usingBundle&&0<c)){var t=new Event("icecandidate");t.candidate={sdpMid:s,sdpMLineIndex:c};var n=e.candidate,r=!n||0===Object.keys(n).length;if(r)"new"!==u.state&&"gathering"!==u.state||(u.state="completed");else{"new"===u.state&&(u.state="gathering"),n.component=1;var i=N.writeCandidate(n);t.candidate=Object.assign(t.candidate,N.parseCandidate(i)),t.candidate.candidate=i}var a=N.splitSections(l.localDescription.sdp);a[t.candidate.sdpMLineIndex+1]+=r?"a=end-of-candidates\r\n":"a="+t.candidate.candidate+"\r\n",l.localDescription.sdp=a.join("");var o=l.transceivers.every(function(e){return e.iceGatherer&&"completed"===e.iceGatherer.state});"gathering"!==l.iceGatheringState&&(l.iceGatheringState="gathering",l._emitGatheringStateChange()),r||l._dispatchEvent("icecandidate",t),o&&(l._dispatchEvent("icecandidate",new Event("icecandidate")),l.iceGatheringState="complete",l._emitGatheringStateChange())}},$.setTimeout(function(){e.forEach(function(e){u.onlocalcandidate(e)})},0)}},r.prototype._createIceAndDtlsTransports=function(){var e=this,t=new $.RTCIceTransport(null);t.onicestatechange=function(){e._updateConnectionState()};var n=new $.RTCDtlsTransport(t);return n.ondtlsstatechange=function(){e._updateConnectionState()},n.onerror=function(){Object.defineProperty(n,"state",{value:"failed",writable:!0}),e._updateConnectionState()},{iceTransport:t,dtlsTransport:n}},r.prototype._disposeIceAndDtlsTransports=function(e){var t=this.transceivers[e].iceGatherer;t&&(delete t.onlocalcandidate,delete this.transceivers[e].iceGatherer);var n=this.transceivers[e].iceTransport;n&&(delete n.onicestatechange,delete this.transceivers[e].iceTransport);var r=this.transceivers[e].dtlsTransport;r&&(delete r.ondtlsstatechange,delete r.onerror,delete this.transceivers[e].dtlsTransport)},r.prototype._transceive=function(e,t,n){var r=p(e.localCapabilities,e.remoteCapabilities);t&&e.rtpSender&&(r.encodings=e.sendEncodingParameters,r.rtcp={cname:N.localCName,compound:e.rtcpParameters.compound},e.recvEncodingParameters.length&&(r.rtcp.ssrc=e.recvEncodingParameters[0].ssrc),e.rtpSender.send(r)),n&&e.rtpReceiver&&0<r.codecs.length&&("video"===e.kind&&e.recvEncodingParameters&&O<15019&&e.recvEncodingParameters.forEach(function(e){delete e.rtx}),e.recvEncodingParameters.length&&(r.encodings=e.recvEncodingParameters),r.rtcp={compound:e.rtcpParameters.compound},e.rtcpParameters.cname&&(r.rtcp.cname=e.rtcpParameters.cname),e.sendEncodingParameters.length&&(r.rtcp.ssrc=e.sendEncodingParameters[0].ssrc),e.rtpReceiver.receive(r))},r.prototype.setLocalDescription=function(e){var t,f,d=this;if(-1===["offer","answer"].indexOf(e.type))return Promise.reject(m("TypeError",'Unsupported type "'+e.type+'"'));if(!a("setLocalDescription",e.type,d.signalingState)||d._isClosed)return Promise.reject(m("InvalidStateError","Can not set local "+e.type+" in state "+d.signalingState));if("offer"===e.type)t=N.splitSections(e.sdp),f=t.shift(),t.forEach(function(e,t){var n=N.parseRtpParameters(e);d.transceivers[t].localCapabilities=n}),d.transceivers.forEach(function(e,t){d._gather(e.mid,t)});else if("answer"===e.type){t=N.splitSections(d.remoteDescription.sdp),f=t.shift();var h=0<N.matchPrefix(f,"a=ice-lite").length;t.forEach(function(e,t){var n=d.transceivers[t],r=n.iceGatherer,i=n.iceTransport,a=n.dtlsTransport,o=n.localCapabilities,s=n.remoteCapabilities;if(!(N.isRejected(e)&&0===N.matchPrefix(e,"a=bundle-only").length)&&!n.isDatachannel){var c=N.getIceParameters(e,f),l=N.getDtlsParameters(e,f);h&&(l.role="server"),d.usingBundle&&0!==t||(d._gather(n.mid,t),"new"===i.state&&i.start(r,c,h?"controlling":"controlled"),"new"===a.state&&a.start(l));var u=p(o,s);d._transceive(n,0<u.codecs.length,!1)}})}return d.localDescription={type:e.type,sdp:e.sdp},"offer"===e.type?d._updateSignalingState("have-local-offer"):d._updateSignalingState("stable"),Promise.resolve()},r.prototype.setRemoteDescription=function(x){var k=this;if(-1===["offer","answer"].indexOf(x.type))return Promise.reject(m("TypeError",'Unsupported type "'+x.type+'"'));if(!a("setRemoteDescription",x.type,k.signalingState)||k._isClosed)return Promise.reject(m("InvalidStateError","Can not set remote "+x.type+" in state "+k.signalingState));var E={};k.remoteStreams.forEach(function(e){E[e.id]=e});var D=[],e=N.splitSections(x.sdp),I=e.shift(),P=0<N.matchPrefix(I,"a=ice-lite").length,M=0<N.matchPrefix(I,"a=group:BUNDLE ").length;k.usingBundle=M;var t=N.matchPrefix(I,"a=ice-options:")[0];return k.canTrickleIceCandidates=!!t&&0<=t.substr(14).split(" ").indexOf("trickle"),e.forEach(function(e,t){var n=N.splitLines(e),r=N.getKind(e),i=N.isRejected(e)&&0===N.matchPrefix(e,"a=bundle-only").length,a=n[0].substr(2).split(" ")[2],o=N.getDirection(e,I),s=N.parseMsid(e),c=N.getMid(e)||N.generateIdentifier();if("application"!==r||"DTLS/SCTP"!==a){var l,u,f,d,h,p,m,g,_,b,v,y=N.parseRtpParameters(e);i||(b=N.getIceParameters(e,I),(v=N.getDtlsParameters(e,I)).role="client"),m=N.parseRtpEncodingParameters(e);var w=N.parseRtcpParameters(e),C=0<N.matchPrefix(e,"a=end-of-candidates",I).length,A=N.matchPrefix(e,"a=candidate:").map(function(e){return N.parseCandidate(e)}).filter(function(e){return 1===e.component});if(("offer"===x.type||"answer"===x.type)&&!i&&M&&0<t&&k.transceivers[t]&&(k._disposeIceAndDtlsTransports(t),k.transceivers[t].iceGatherer=k.transceivers[0].iceGatherer,k.transceivers[t].iceTransport=k.transceivers[0].iceTransport,k.transceivers[t].dtlsTransport=k.transceivers[0].dtlsTransport,k.transceivers[t].rtpSender&&k.transceivers[t].rtpSender.setTransport(k.transceivers[0].dtlsTransport),k.transceivers[t].rtpReceiver&&k.transceivers[t].rtpReceiver.setTransport(k.transceivers[0].dtlsTransport)),"offer"!==x.type||i)"answer"!==x.type||i||(u=(l=k.transceivers[t]).iceGatherer,f=l.iceTransport,d=l.dtlsTransport,h=l.rtpReceiver,p=l.sendEncodingParameters,g=l.localCapabilities,k.transceivers[t].recvEncodingParameters=m,k.transceivers[t].remoteCapabilities=y,k.transceivers[t].rtcpParameters=w,A.length&&"new"===f.state&&(!P&&!C||M&&0!==t?A.forEach(function(e){L(l.iceTransport,e)}):f.setRemoteCandidates(A)),M&&0!==t||("new"===f.state&&f.start(u,b,"controlling"),"new"===d.state&&d.start(v)),k._transceive(l,"sendrecv"===o||"recvonly"===o,"sendrecv"===o||"sendonly"===o),!h||"sendrecv"!==o&&"sendonly"!==o?delete l.rtpReceiver:(_=h.track,s?(E[s.stream]||(E[s.stream]=new $.MediaStream),R(_,E[s.stream]),D.push([_,h,E[s.stream]])):(E.default||(E.default=new $.MediaStream),R(_,E.default),D.push([_,h,E.default]))));else{(l=k.transceivers[t]||k._createTransceiver(r)).mid=c,l.iceGatherer||(l.iceGatherer=k._createIceGatherer(t,M)),A.length&&"new"===l.iceTransport.state&&(!C||M&&0!==t?A.forEach(function(e){L(l.iceTransport,e)}):l.iceTransport.setRemoteCandidates(A)),g=$.RTCRtpReceiver.getCapabilities(r),O<15019&&(g.codecs=g.codecs.filter(function(e){return"rtx"!==e.name})),p=l.sendEncodingParameters||[{ssrc:1001*(2*t+2)}];var S,T=!1;if("sendrecv"===o||"sendonly"===o){if(T=!l.rtpReceiver,h=l.rtpReceiver||new $.RTCRtpReceiver(l.dtlsTransport,r),T)_=h.track,s&&"-"===s.stream||(S=s?(E[s.stream]||(E[s.stream]=new $.MediaStream,Object.defineProperty(E[s.stream],"id",{get:function(){return s.stream}})),Object.defineProperty(_,"id",{get:function(){return s.track}}),E[s.stream]):(E.default||(E.default=new $.MediaStream),E.default)),S&&(R(_,S),l.associatedRemoteMediaStreams.push(S)),D.push([_,h,S])}else l.rtpReceiver&&l.rtpReceiver.track&&(l.associatedRemoteMediaStreams.forEach(function(e){var t,n,r=e.getTracks().find(function(e){return e.id===l.rtpReceiver.track.id});r&&(t=r,(n=e).removeTrack(t),n.dispatchEvent(new $.MediaStreamTrackEvent("removetrack",{track:t})))}),l.associatedRemoteMediaStreams=[]);l.localCapabilities=g,l.remoteCapabilities=y,l.rtpReceiver=h,l.rtcpParameters=w,l.sendEncodingParameters=p,l.recvEncodingParameters=m,k._transceive(k.transceivers[t],!1,T)}}else k.transceivers[t]={mid:c,isDatachannel:!0}}),void 0===k._dtlsRole&&(k._dtlsRole="offer"===x.type?"active":"passive"),k.remoteDescription={type:x.type,sdp:x.sdp},"offer"===x.type?k._updateSignalingState("have-remote-offer"):k._updateSignalingState("stable"),Object.keys(E).forEach(function(e){var r=E[e];if(r.getTracks().length){if(-1===k.remoteStreams.indexOf(r)){k.remoteStreams.push(r);var t=new Event("addstream");t.stream=r,$.setTimeout(function(){k._dispatchEvent("addstream",t)})}D.forEach(function(e){var t=e[0],n=e[1];r.id===e[2].id&&i(k,t,n,[r])})}}),D.forEach(function(e){e[2]||i(k,e[0],e[1],[])}),$.setTimeout(function(){k&&k.transceivers&&k.transceivers.forEach(function(e){e.iceTransport&&"new"===e.iceTransport.state&&0<e.iceTransport.getRemoteCandidates().length&&(console.warn("Timeout for addRemoteCandidate. Consider sending an end-of-candidates notification"),e.iceTransport.addRemoteCandidate({}))})},4e3),Promise.resolve()},r.prototype.close=function(){this.transceivers.forEach(function(e){e.iceTransport&&e.iceTransport.stop(),e.dtlsTransport&&e.dtlsTransport.stop(),e.rtpSender&&e.rtpSender.stop(),e.rtpReceiver&&e.rtpReceiver.stop()}),this._isClosed=!0,this._updateSignalingState("closed")},r.prototype._updateSignalingState=function(e){this.signalingState=e;var t=new Event("signalingstatechange");this._dispatchEvent("signalingstatechange",t)},r.prototype._maybeFireNegotiationNeeded=function(){var t=this;"stable"===this.signalingState&&!0!==this.needNegotiation&&(this.needNegotiation=!0,$.setTimeout(function(){if(t.needNegotiation){t.needNegotiation=!1;var e=new Event("negotiationneeded");t._dispatchEvent("negotiationneeded",e)}},0))},r.prototype._updateConnectionState=function(){var e,t={new:0,closed:0,connecting:0,checking:0,connected:0,completed:0,disconnected:0,failed:0};if(this.transceivers.forEach(function(e){t[e.iceTransport.state]++,t[e.dtlsTransport.state]++}),t.connected+=t.completed,e="new",0<t.failed?e="failed":0<t.connecting||0<t.checking?e="connecting":0<t.disconnected?e="disconnected":0<t.new?e="new":(0<t.connected||0<t.completed)&&(e="connected"),e!==this.iceConnectionState){this.iceConnectionState=e;var n=new Event("iceconnectionstatechange");this._dispatchEvent("iceconnectionstatechange",n)}},r.prototype.createOffer=function(){var s=this;if(s._isClosed)return Promise.reject(m("InvalidStateError","Can not call createOffer after close"));var t=s.transceivers.filter(function(e){return"audio"===e.kind}).length,n=s.transceivers.filter(function(e){return"video"===e.kind}).length,e=arguments[0];if(e){if(e.mandatory||e.optional)throw new TypeError("Legacy mandatory/optional constraints not supported.");void 0!==e.offerToReceiveAudio&&(t=!0===e.offerToReceiveAudio?1:!1===e.offerToReceiveAudio?0:e.offerToReceiveAudio),void 0!==e.offerToReceiveVideo&&(n=!0===e.offerToReceiveVideo?1:!1===e.offerToReceiveVideo?0:e.offerToReceiveVideo)}for(s.transceivers.forEach(function(e){"audio"===e.kind?--t<0&&(e.wantReceive=!1):"video"===e.kind&&--n<0&&(e.wantReceive=!1)});0<t||0<n;)0<t&&(s._createTransceiver("audio"),t--),0<n&&(s._createTransceiver("video"),n--);var r=N.writeSessionBoilerplate(s._sdpSessionId,s._sdpSessionVersion++);s.transceivers.forEach(function(e,t){var n=e.track,r=e.kind,i=e.mid||N.generateIdentifier();e.mid=i,e.iceGatherer||(e.iceGatherer=s._createIceGatherer(t,s.usingBundle));var a=$.RTCRtpSender.getCapabilities(r);O<15019&&(a.codecs=a.codecs.filter(function(e){return"rtx"!==e.name})),a.codecs.forEach(function(e){"H264"===e.name&&void 0===e.parameters["level-asymmetry-allowed"]&&(e.parameters["level-asymmetry-allowed"]="1")});var o=e.sendEncodingParameters||[{ssrc:1001*(2*t+1)}];n&&15019<=O&&"video"===r&&!o[0].rtx&&(o[0].rtx={ssrc:o[0].ssrc+1}),e.wantReceive&&(e.rtpReceiver=new $.RTCRtpReceiver(e.dtlsTransport,r)),e.localCapabilities=a,e.sendEncodingParameters=o}),"max-compat"!==s._config.bundlePolicy&&(r+="a=group:BUNDLE "+s.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n"),r+="a=ice-options:trickle\r\n",s.transceivers.forEach(function(e,t){r+=c(e,e.localCapabilities,"offer",e.stream,s._dtlsRole),r+="a=rtcp-rsize\r\n",!e.iceGatherer||"new"===s.iceGatheringState||0!==t&&s.usingBundle||(e.iceGatherer.getLocalCandidates().forEach(function(e){e.component=1,r+="a="+N.writeCandidate(e)+"\r\n"}),"completed"===e.iceGatherer.state&&(r+="a=end-of-candidates\r\n"))});var i=new $.RTCSessionDescription({type:"offer",sdp:r});return Promise.resolve(i)},r.prototype.createAnswer=function(){var i=this;if(i._isClosed)return Promise.reject(m("InvalidStateError","Can not call createAnswer after close"));var a=N.writeSessionBoilerplate(i._sdpSessionId,i._sdpSessionVersion++);i.usingBundle&&(a+="a=group:BUNDLE "+i.transceivers.map(function(e){return e.mid}).join(" ")+"\r\n");var o=N.splitSections(i.remoteDescription.sdp).length-1;i.transceivers.forEach(function(e,t){if(!(o<t+1))if(e.isDatachannel)a+="m=application 0 DTLS/SCTP 5000\r\nc=IN IP4 0.0.0.0\r\na=mid:"+e.mid+"\r\n";else{var n;if(e.stream)"audio"===e.kind?n=e.stream.getAudioTracks()[0]:"video"===e.kind&&(n=e.stream.getVideoTracks()[0]),n&&15019<=O&&"video"===e.kind&&!e.sendEncodingParameters[0].rtx&&(e.sendEncodingParameters[0].rtx={ssrc:e.sendEncodingParameters[0].ssrc+1});var r=p(e.localCapabilities,e.remoteCapabilities);!r.codecs.filter(function(e){return"rtx"===e.name.toLowerCase()}).length&&e.sendEncodingParameters[0].rtx&&delete e.sendEncodingParameters[0].rtx,a+=c(e,r,"answer",e.stream,i._dtlsRole),e.rtcpParameters&&e.rtcpParameters.reducedSize&&(a+="a=rtcp-rsize\r\n")}});var e=new $.RTCSessionDescription({type:"answer",sdp:a});return Promise.resolve(e)},r.prototype.addIceCandidate=function(c){var l,u=this;return c&&void 0===c.sdpMLineIndex&&!c.sdpMid?Promise.reject(new TypeError("sdpMLineIndex or sdpMid required")):new Promise(function(e,t){if(!u.remoteDescription)return t(m("InvalidStateError","Can not add ICE candidate without a remote description"));if(c&&""!==c.candidate){var n=c.sdpMLineIndex;if(c.sdpMid)for(var r=0;r<u.transceivers.length;r++)if(u.transceivers[r].mid===c.sdpMid){n=r;break}var i=u.transceivers[n];if(!i)return t(m("OperationError","Can not add ICE candidate"));if(i.isDatachannel)return e();var a=0<Object.keys(c.candidate).length?N.parseCandidate(c.candidate):{};if("tcp"===a.protocol&&(0===a.port||9===a.port))return e();if(a.component&&1!==a.component)return e();if((0===n||0<n&&i.iceTransport!==u.transceivers[0].iceTransport)&&!L(i.iceTransport,a))return t(m("OperationError","Can not add ICE candidate"));var o=c.candidate.trim();0===o.indexOf("a=")&&(o=o.substr(2)),(l=N.splitSections(u.remoteDescription.sdp))[n+1]+="a="+(a.type?o:"end-of-candidates")+"\r\n",u.remoteDescription.sdp=l.join("")}else for(var s=0;s<u.transceivers.length&&(u.transceivers[s].isDatachannel||(u.transceivers[s].iceTransport.addRemoteCandidate({}),(l=N.splitSections(u.remoteDescription.sdp))[s+1]+="a=end-of-candidates\r\n",u.remoteDescription.sdp=l.join(""),!u.usingBundle));s++);e()})},r.prototype.getStats=function(){var n=[];this.transceivers.forEach(function(t){["rtpSender","rtpReceiver","iceGatherer","iceTransport","dtlsTransport"].forEach(function(e){t[e]&&n.push(t[e].getStats())})});return new Promise(function(t){var r=new Map;Promise.all(n).then(function(e){e.forEach(function(n){Object.keys(n).forEach(function(e){var t;n[e].type={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[(t=n[e]).type]||t.type,r.set(e,n[e])})}),t(r)})})};var e=["createOffer","createAnswer"];return e.forEach(function(e){var n=r.prototype[e];r.prototype[e]=function(){var t=arguments;return"function"==typeof t[0]||"function"==typeof t[1]?n.apply(this,[arguments[2]]).then(function(e){"function"==typeof t[0]&&t[0].apply(null,[e])},function(e){"function"==typeof t[1]&&t[1].apply(null,[e])}):n.apply(this,arguments)}}),(e=["setLocalDescription","setRemoteDescription","addIceCandidate"]).forEach(function(e){var n=r.prototype[e];r.prototype[e]=function(){var t=arguments;return"function"==typeof t[1]||"function"==typeof t[2]?n.apply(this,arguments).then(function(){"function"==typeof t[1]&&t[1].apply(null)},function(e){"function"==typeof t[2]&&t[2].apply(null,[e])}):n.apply(this,arguments)}}),["getStats"].forEach(function(e){var t=r.prototype[e];r.prototype[e]=function(){var e=arguments;return"function"==typeof e[1]?t.apply(this,arguments).then(function(){"function"==typeof e[1]&&e[1].apply(null)}):t.apply(this,arguments)}}),r}},{sdp:39}],35:[function(e,t,n){var r=t.exports={v:[{name:"version",reg:/^(\d*)$/}],o:[{name:"origin",reg:/^(\S*) (\d*) (\d*) (\S*) IP(\d) (\S*)/,names:["username","sessionId","sessionVersion","netType","ipVer","address"],format:"%s %s %d %s IP%d %s"}],s:[{name:"name"}],i:[{name:"description"}],u:[{name:"uri"}],e:[{name:"email"}],p:[{name:"phone"}],z:[{name:"timezones"}],r:[{name:"repeats"}],t:[{name:"timing",reg:/^(\d*) (\d*)/,names:["start","stop"],format:"%d %d"}],c:[{name:"connection",reg:/^IN IP(\d) (\S*)/,names:["version","ip"],format:"IN IP%d %s"}],b:[{push:"bandwidth",reg:/^(TIAS|AS|CT|RR|RS):(\d*)/,names:["type","limit"],format:"%s:%s"}],m:[{reg:/^(\w*) (\d*) ([\w\/]*)(?: (.*))?/,names:["type","port","protocol","payloads"],format:"%s %d %s %s"}],a:[{push:"rtp",reg:/^rtpmap:(\d*) ([\w\-\.]*)(?:\s*\/(\d*)(?:\s*\/(\S*))?)?/,names:["payload","codec","rate","encoding"],format:function(e){return e.encoding?"rtpmap:%d %s/%s/%s":e.rate?"rtpmap:%d %s/%s":"rtpmap:%d %s"}},{push:"fmtp",reg:/^fmtp:(\d*) ([\S| ]*)/,names:["payload","config"],format:"fmtp:%d %s"},{name:"control",reg:/^control:(.*)/,format:"control:%s"},{name:"rtcp",reg:/^rtcp:(\d*)(?: (\S*) IP(\d) (\S*))?/,names:["port","netType","ipVer","address"],format:function(e){return null!=e.address?"rtcp:%d %s IP%d %s":"rtcp:%d"}},{push:"rtcpFbTrrInt",reg:/^rtcp-fb:(\*|\d*) trr-int (\d*)/,names:["payload","value"],format:"rtcp-fb:%d trr-int %d"},{push:"rtcpFb",reg:/^rtcp-fb:(\*|\d*) ([\w-_]*)(?: ([\w-_]*))?/,names:["payload","type","subtype"],format:function(e){return null!=e.subtype?"rtcp-fb:%s %s %s":"rtcp-fb:%s %s"}},{push:"ext",reg:/^extmap:(\d+)(?:\/(\w+))? (\S*)(?: (\S*))?/,names:["value","direction","uri","config"],format:function(e){return"extmap:%d"+(e.direction?"/%s":"%v")+" %s"+(e.config?" %s":"")}},{push:"crypto",reg:/^crypto:(\d*) ([\w_]*) (\S*)(?: (\S*))?/,names:["id","suite","config","sessionConfig"],format:function(e){return null!=e.sessionConfig?"crypto:%d %s %s %s":"crypto:%d %s %s"}},{name:"setup",reg:/^setup:(\w*)/,format:"setup:%s"},{name:"mid",reg:/^mid:([^\s]*)/,format:"mid:%s"},{name:"msid",reg:/^msid:(.*)/,format:"msid:%s"},{name:"ptime",reg:/^ptime:(\d*)/,format:"ptime:%d"},{name:"maxptime",reg:/^maxptime:(\d*)/,format:"maxptime:%d"},{name:"direction",reg:/^(sendrecv|recvonly|sendonly|inactive)/},{name:"icelite",reg:/^(ice-lite)/},{name:"iceUfrag",reg:/^ice-ufrag:(\S*)/,format:"ice-ufrag:%s"},{name:"icePwd",reg:/^ice-pwd:(\S*)/,format:"ice-pwd:%s"},{name:"fingerprint",reg:/^fingerprint:(\S*) (\S*)/,names:["type","hash"],format:"fingerprint:%s %s"},{push:"candidates",reg:/^candidate:(\S*) (\d*) (\S*) (\d*) (\S*) (\d*) typ (\S*)(?: raddr (\S*) rport (\d*))?(?: tcptype (\S*))?(?: generation (\d*))?(?: network-id (\d*))?(?: network-cost (\d*))?/,names:["foundation","component","transport","priority","ip","port","type","raddr","rport","tcptype","generation","network-id","network-cost"],format:function(e){var t="candidate:%s %d %s %d %s %d typ %s";return t+=null!=e.raddr?" raddr %s rport %d":"%v%v",t+=null!=e.tcptype?" tcptype %s":"%v",null!=e.generation&&(t+=" generation %d"),t+=null!=e["network-id"]?" network-id %d":"%v",t+=null!=e["network-cost"]?" network-cost %d":"%v"}},{name:"endOfCandidates",reg:/^(end-of-candidates)/},{name:"remoteCandidates",reg:/^remote-candidates:(.*)/,format:"remote-candidates:%s"},{name:"iceOptions",reg:/^ice-options:(\S*)/,format:"ice-options:%s"},{push:"ssrcs",reg:/^ssrc:(\d*) ([\w_-]*)(?::(.*))?/,names:["id","attribute","value"],format:function(e){var t="ssrc:%d";return null!=e.attribute&&(t+=" %s",null!=e.value&&(t+=":%s")),t}},{push:"ssrcGroups",reg:/^ssrc-group:([\x21\x23\x24\x25\x26\x27\x2A\x2B\x2D\x2E\w]*) (.*)/,names:["semantics","ssrcs"],format:"ssrc-group:%s %s"},{name:"msidSemantic",reg:/^msid-semantic:\s?(\w*) (\S*)/,names:["semantic","token"],format:"msid-semantic: %s %s"},{push:"groups",reg:/^group:(\w*) (.*)/,names:["type","mids"],format:"group:%s %s"},{name:"rtcpMux",reg:/^(rtcp-mux)/},{name:"rtcpRsize",reg:/^(rtcp-rsize)/},{name:"sctpmap",reg:/^sctpmap:([\w_\/]*) (\S*)(?: (\S*))?/,names:["sctpmapNumber","app","maxMessageSize"],format:function(e){return null!=e.maxMessageSize?"sctpmap:%s %s %s":"sctpmap:%s %s"}},{name:"xGoogleFlag",reg:/^x-google-flag:([^\s]*)/,format:"x-google-flag:%s"},{push:"rids",reg:/^rid:([\d\w]+) (\w+)(?: ([\S| ]*))?/,names:["id","direction","params"],format:function(e){return e.params?"rid:%s %s %s":"rid:%s %s"}},{push:"imageattrs",reg:new RegExp("^imageattr:(\\d+|\\*)[\\s\\t]+(send|recv)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*)(?:[\\s\\t]+(recv|send)[\\s\\t]+(\\*|\\[\\S+\\](?:[\\s\\t]+\\[\\S+\\])*))?"),names:["pt","dir1","attrs1","dir2","attrs2"],format:function(e){return"imageattr:%s %s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast",reg:new RegExp("^simulcast:(send|recv) ([a-zA-Z0-9\\-_~;,]+)(?:\\s?(send|recv) ([a-zA-Z0-9\\-_~;,]+))?$"),names:["dir1","list1","dir2","list2"],format:function(e){return"simulcast:%s %s"+(e.dir2?" %s %s":"")}},{name:"simulcast_03",reg:/^simulcast:[\s\t]+([\S+\s\t]+)$/,names:["value"],format:"simulcast: %s"},{name:"framerate",reg:/^framerate:(\d+(?:$|\.\d+))/,format:"framerate:%s"},{push:"invalid",names:["value"]}]};Object.keys(r).forEach(function(e){r[e].forEach(function(e){e.reg||(e.reg=/(.*)/),e.format||(e.format="%s")})})},{}],36:[function(e,t,n){var r=e("./parser"),i=e("./writer");n.write=i,n.parse=r.parse,n.parseFmtpConfig=r.parseFmtpConfig,n.parseParams=r.parseParams,n.parsePayloads=r.parsePayloads,n.parseRemoteCandidates=r.parseRemoteCandidates,n.parseImageAttributes=r.parseImageAttributes,n.parseSimulcastStreamList=r.parseSimulcastStreamList},{"./parser":37,"./writer":38}],37:[function(e,t,n){var a=function(e){return String(Number(e))===e?Number(e):e},s=function(e,t,n){var r=e.name&&e.names;e.push&&!t[e.push]?t[e.push]=[]:r&&!t[e.name]&&(t[e.name]={});var i=e.push?{}:r?t[e.name]:t;!function(e,t,n,r){if(r&&!n)t[r]=a(e[1]);else for(var i=0;i<n.length;i+=1)null!=e[i+1]&&(t[n[i]]=a(e[i+1]))}(n.match(e.reg),i,e.names,e.name),e.push&&t[e.push].push(i)},c=e("./grammar"),r=RegExp.prototype.test.bind(/^([a-z])=(.*)/);n.parse=function(e){var t={},a=[],o=t;return e.split(/(\r\n|\r|\n)/).filter(r).forEach(function(e){var t=e[0],n=e.slice(2);"m"===t&&(a.push({rtp:[],fmtp:[]}),o=a[a.length-1]);for(var r=0;r<(c[t]||[]).length;r+=1){var i=c[t][r];if(i.reg.test(n))return s(i,o,n)}}),t.media=a,t};var i=function(e,t){var n=t.split(/=(.+)/,2);return 2===n.length&&(e[n[0]]=a(n[1])),e};n.parseParams=function(e){return e.split(/\;\s?/).reduce(i,{})},n.parseFmtpConfig=n.parseParams,n.parsePayloads=function(e){return e.split(" ").map(Number)},n.parseRemoteCandidates=function(e){for(var t=[],n=e.split(" ").map(a),r=0;r<n.length;r+=3)t.push({component:n[r],ip:n[r+1],port:n[r+2]});return t},n.parseImageAttributes=function(e){return e.split(" ").map(function(e){return e.substring(1,e.length-1).split(",").reduce(i,{})})},n.parseSimulcastStreamList=function(e){return e.split(";").map(function(e){return e.split(",").map(function(e){var t,n=!1;return"~"!==e[0]?t=a(e):(t=a(e.substring(1,e.length)),n=!0),{scid:t,paused:n}})})}},{"./grammar":35}],38:[function(e,t,n){var a=e("./grammar"),o=/%[sdv%]/g,s=function(e,t,n){var r=[e+"="+(t.format instanceof Function?t.format(t.push?n:n[t.name]):t.format)];if(t.names)for(var i=0;i<t.names.length;i+=1){var a=t.names[i];t.name?r.push(n[t.name][a]):r.push(n[t.names[i]])}else r.push(n[t.name]);return function(e){var n=1,r=arguments,i=r.length;return e.replace(o,function(e){if(i<=n)return e;var t=r[n];switch(n+=1,e){case"%%":return"%";case"%s":return String(t);case"%d":return Number(t);case"%v":return""}})}.apply(null,r)},c=["v","o","s","i","u","e","p","c","b","t","r","z","a"],l=["i","c","b","a"];t.exports=function(e,t){t=t||{},null==e.version&&(e.version=0),null==e.name&&(e.name=" "),e.media.forEach(function(e){null==e.payloads&&(e.payloads="")});var n=t.outerOrder||c,r=t.innerOrder||l,i=[];return n.forEach(function(n){a[n].forEach(function(t){t.name in e&&null!=e[t.name]?i.push(s(n,t,e)):t.push in e&&null!=e[t.push]&&e[t.push].forEach(function(e){i.push(s(n,t,e))})})}),e.media.forEach(function(e){i.push(s("m",a.m[0],e)),r.forEach(function(n){a[n].forEach(function(t){t.name in e&&null!=e[t.name]?i.push(s(n,t,e)):t.push in e&&null!=e[t.push]&&e[t.push].forEach(function(e){i.push(s(n,t,e))})})})}),i.join("\r\n")+"\r\n"}},{"./grammar":35}],39:[function(e,t,n){"use strict";var u={generateIdentifier:function(){return Math.random().toString(36).substr(2,10)}};u.localCName=u.generateIdentifier(),u.splitLines=function(e){return e.trim().split("\n").map(function(e){return e.trim()})},u.splitSections=function(e){return e.split("\nm=").map(function(e,t){return(0<t?"m="+e:e).trim()+"\r\n"})},u.matchPrefix=function(e,t){return u.splitLines(e).filter(function(e){return 0===e.indexOf(t)})},u.parseCandidate=function(e){for(var t,n={foundation:(t=0===e.indexOf("a=candidate:")?e.substring(12).split(" "):e.substring(10).split(" "))[0],component:parseInt(t[1],10),protocol:t[2].toLowerCase(),priority:parseInt(t[3],10),ip:t[4],port:parseInt(t[5],10),type:t[7]},r=8;r<t.length;r+=2)switch(t[r]){case"raddr":n.relatedAddress=t[r+1];break;case"rport":n.relatedPort=parseInt(t[r+1],10);break;case"tcptype":n.tcpType=t[r+1];break;case"ufrag":n.ufrag=t[r+1],n.usernameFragment=t[r+1];break;default:n[t[r]]=t[r+1]}return n},u.writeCandidate=function(e){var t=[];t.push(e.foundation),t.push(e.component),t.push(e.protocol.toUpperCase()),t.push(e.priority),t.push(e.ip),t.push(e.port);var n=e.type;return t.push("typ"),t.push(n),"host"!==n&&e.relatedAddress&&e.relatedPort&&(t.push("raddr"),t.push(e.relatedAddress),t.push("rport"),t.push(e.relatedPort)),e.tcpType&&"tcp"===e.protocol.toLowerCase()&&(t.push("tcptype"),t.push(e.tcpType)),e.ufrag&&(t.push("ufrag"),t.push(e.ufrag)),"candidate:"+t.join(" ")},u.parseIceOptions=function(e){return e.substr(14).split(" ")},u.parseRtpMap=function(e){var t=e.substr(9).split(" "),n={payloadType:parseInt(t.shift(),10)};return t=t[0].split("/"),n.name=t[0],n.clockRate=parseInt(t[1],10),n.numChannels=3===t.length?parseInt(t[2],10):1,n},u.writeRtpMap=function(e){var t=e.payloadType;return void 0!==e.preferredPayloadType&&(t=e.preferredPayloadType),"a=rtpmap:"+t+" "+e.name+"/"+e.clockRate+(1!==e.numChannels?"/"+e.numChannels:"")+"\r\n"},u.parseExtmap=function(e){var t=e.substr(9).split(" ");return{id:parseInt(t[0],10),direction:0<t[0].indexOf("/")?t[0].split("/")[1]:"sendrecv",uri:t[1]}},u.writeExtmap=function(e){return"a=extmap:"+(e.id||e.preferredId)+(e.direction&&"sendrecv"!==e.direction?"/"+e.direction:"")+" "+e.uri+"\r\n"},u.parseFmtp=function(e){for(var t,n={},r=e.substr(e.indexOf(" ")+1).split(";"),i=0;i<r.length;i++)n[(t=r[i].trim().split("="))[0].trim()]=t[1];return n},u.writeFmtp=function(t){var e="",n=t.payloadType;if(void 0!==t.preferredPayloadType&&(n=t.preferredPayloadType),t.parameters&&Object.keys(t.parameters).length){var r=[];Object.keys(t.parameters).forEach(function(e){r.push(e+"="+t.parameters[e])}),e+="a=fmtp:"+n+" "+r.join(";")+"\r\n"}return e},u.parseRtcpFb=function(e){var t=e.substr(e.indexOf(" ")+1).split(" ");return{type:t.shift(),parameter:t.join(" ")}},u.writeRtcpFb=function(e){var t="",n=e.payloadType;return void 0!==e.preferredPayloadType&&(n=e.preferredPayloadType),e.rtcpFeedback&&e.rtcpFeedback.length&&e.rtcpFeedback.forEach(function(e){t+="a=rtcp-fb:"+n+" "+e.type+(e.parameter&&e.parameter.length?" "+e.parameter:"")+"\r\n"}),t},u.parseSsrcMedia=function(e){var t=e.indexOf(" "),n={ssrc:parseInt(e.substr(7,t-7),10)},r=e.indexOf(":",t);return-1<r?(n.attribute=e.substr(t+1,r-t-1),n.value=e.substr(r+1)):n.attribute=e.substr(t+1),n},u.getMid=function(e){var t=u.matchPrefix(e,"a=mid:")[0];if(t)return t.substr(6)},u.parseFingerprint=function(e){var t=e.substr(14).split(" ");return{algorithm:t[0].toLowerCase(),value:t[1]}},u.getDtlsParameters=function(e,t){return{role:"auto",fingerprints:u.matchPrefix(e+t,"a=fingerprint:").map(u.parseFingerprint)}},u.writeDtlsParameters=function(e,t){var n="a=setup:"+t+"\r\n";return e.fingerprints.forEach(function(e){n+="a=fingerprint:"+e.algorithm+" "+e.value+"\r\n"}),n},u.getIceParameters=function(e,t){var n=u.splitLines(e);return{usernameFragment:(n=n.concat(u.splitLines(t))).filter(function(e){return 0===e.indexOf("a=ice-ufrag:")})[0].substr(12),password:n.filter(function(e){return 0===e.indexOf("a=ice-pwd:")})[0].substr(10)}},u.writeIceParameters=function(e){return"a=ice-ufrag:"+e.usernameFragment+"\r\na=ice-pwd:"+e.password+"\r\n"},u.parseRtpParameters=function(e){for(var t={codecs:[],headerExtensions:[],fecMechanisms:[],rtcp:[]},n=u.splitLines(e)[0].split(" "),r=3;r<n.length;r++){var i=n[r],a=u.matchPrefix(e,"a=rtpmap:"+i+" ")[0];if(a){var o=u.parseRtpMap(a),s=u.matchPrefix(e,"a=fmtp:"+i+" ");switch(o.parameters=s.length?u.parseFmtp(s[0]):{},o.rtcpFeedback=u.matchPrefix(e,"a=rtcp-fb:"+i+" ").map(u.parseRtcpFb),t.codecs.push(o),o.name.toUpperCase()){case"RED":case"ULPFEC":t.fecMechanisms.push(o.name.toUpperCase())}}}return u.matchPrefix(e,"a=extmap:").forEach(function(e){t.headerExtensions.push(u.parseExtmap(e))}),t},u.writeRtpDescription=function(e,t){var n="";n+="m="+e+" ",n+=0<t.codecs.length?"9":"0",n+=" UDP/TLS/RTP/SAVPF ",n+=t.codecs.map(function(e){return void 0!==e.preferredPayloadType?e.preferredPayloadType:e.payloadType}).join(" ")+"\r\n",n+="c=IN IP4 0.0.0.0\r\n",n+="a=rtcp:9 IN IP4 0.0.0.0\r\n",t.codecs.forEach(function(e){n+=u.writeRtpMap(e),n+=u.writeFmtp(e),n+=u.writeRtcpFb(e)});var r=0;return t.codecs.forEach(function(e){e.maxptime>r&&(r=e.maxptime)}),0<r&&(n+="a=maxptime:"+r+"\r\n"),n+="a=rtcp-mux\r\n",t.headerExtensions.forEach(function(e){n+=u.writeExtmap(e)}),n},u.parseRtpEncodingParameters=function(e){var n,r=[],t=u.parseRtpParameters(e),i=-1!==t.fecMechanisms.indexOf("RED"),a=-1!==t.fecMechanisms.indexOf("ULPFEC"),o=u.matchPrefix(e,"a=ssrc:").map(function(e){return u.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute}),s=0<o.length&&o[0].ssrc,c=u.matchPrefix(e,"a=ssrc-group:FID").map(function(e){var t=e.split(" ");return t.shift(),t.map(function(e){return parseInt(e,10)})});0<c.length&&1<c[0].length&&c[0][0]===s&&(n=c[0][1]),t.codecs.forEach(function(e){if("RTX"===e.name.toUpperCase()&&e.parameters.apt){var t={ssrc:s,codecPayloadType:parseInt(e.parameters.apt,10),rtx:{ssrc:n}};r.push(t),i&&((t=JSON.parse(JSON.stringify(t))).fec={ssrc:n,mechanism:a?"red+ulpfec":"red"},r.push(t))}}),0===r.length&&s&&r.push({ssrc:s});var l=u.matchPrefix(e,"b=");return l.length&&(l=0===l[0].indexOf("b=TIAS:")?parseInt(l[0].substr(7),10):0===l[0].indexOf("b=AS:")?1e3*parseInt(l[0].substr(5),10)*.95-16e3:void 0,r.forEach(function(e){e.maxBitrate=l})),r},u.parseRtcpParameters=function(e){var t={},n=u.matchPrefix(e,"a=ssrc:").map(function(e){return u.parseSsrcMedia(e)}).filter(function(e){return"cname"===e.attribute})[0];n&&(t.cname=n.value,t.ssrc=n.ssrc);var r=u.matchPrefix(e,"a=rtcp-rsize");t.reducedSize=0<r.length,t.compound=0===r.length;var i=u.matchPrefix(e,"a=rtcp-mux");return t.mux=0<i.length,t},u.parseMsid=function(e){var t,n=u.matchPrefix(e,"a=msid:");if(1===n.length)return{stream:(t=n[0].substr(7).split(" "))[0],track:t[1]};var r=u.matchPrefix(e,"a=ssrc:").map(function(e){return u.parseSsrcMedia(e)}).filter(function(e){return"msid"===e.attribute});return 0<r.length?{stream:(t=r[0].value.split(" "))[0],track:t[1]}:void 0},u.generateSessionId=function(){return Math.random().toString().substr(2,21)},u.writeSessionBoilerplate=function(e,t){var n=void 0!==t?t:2;return"v=0\r\no=thisisadapterortc "+(e||u.generateSessionId())+" "+n+" IN IP4 127.0.0.1\r\ns=-\r\nt=0 0\r\n"},u.writeMediaSection=function(e,t,n,r){var i=u.writeRtpDescription(e.kind,t);if(i+=u.writeIceParameters(e.iceGatherer.getLocalParameters()),i+=u.writeDtlsParameters(e.dtlsTransport.getLocalParameters(),"offer"===n?"actpass":"active"),i+="a=mid:"+e.mid+"\r\n",e.direction?i+="a="+e.direction+"\r\n":e.rtpSender&&e.rtpReceiver?i+="a=sendrecv\r\n":e.rtpSender?i+="a=sendonly\r\n":e.rtpReceiver?i+="a=recvonly\r\n":i+="a=inactive\r\n",e.rtpSender){var a="msid:"+r.id+" "+e.rtpSender.track.id+"\r\n";i+="a="+a,i+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" "+a,e.sendEncodingParameters[0].rtx&&(i+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" "+a,i+="a=ssrc-group:FID "+e.sendEncodingParameters[0].ssrc+" "+e.sendEncodingParameters[0].rtx.ssrc+"\r\n")}return i+="a=ssrc:"+e.sendEncodingParameters[0].ssrc+" cname:"+u.localCName+"\r\n",e.rtpSender&&e.sendEncodingParameters[0].rtx&&(i+="a=ssrc:"+e.sendEncodingParameters[0].rtx.ssrc+" cname:"+u.localCName+"\r\n"),i},u.getDirection=function(e,t){for(var n=u.splitLines(e),r=0;r<n.length;r++)switch(n[r]){case"a=sendrecv":case"a=sendonly":case"a=recvonly":case"a=inactive":return n[r].substr(2)}return t?u.getDirection(t):"sendrecv"},u.getKind=function(e){return u.splitLines(e)[0].split(" ")[0].substr(2)},u.isRejected=function(e){return"0"===e.split(" ",2)[1]},u.parseMLine=function(e){var t=u.splitLines(e)[0].split(" ");return{kind:t[0].substr(2),port:parseInt(t[1],10),protocol:t[2],fmt:t.slice(3).join(" ")}},"object"==typeof t&&(t.exports=u)},{}],40:[function(n,r,e){(function(e){"use strict";var t=n("./adapter_factory.js");r.exports=t({window:e.window})}).call(this,"undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./adapter_factory.js":41}],41:[function(h,e,t){"use strict";var p=h("./utils");e.exports=function(e,t){var n=e&&e.window,r={shimChrome:!0,shimFirefox:!0,shimEdge:!0,shimSafari:!0};for(var i in t)hasOwnProperty.call(t,i)&&(r[i]=t[i]);var a=p.log,o=p.detectBrowser(n),s={browserDetails:o,extractVersion:p.extractVersion,disableLog:p.disableLog,disableWarnings:p.disableWarnings},c=h("./chrome/chrome_shim")||null,l=h("./edge/edge_shim")||null,u=h("./firefox/firefox_shim")||null,f=h("./safari/safari_shim")||null,d=h("./common_shim")||null;switch(o.browser){case"chrome":if(!c||!c.shimPeerConnection||!r.shimChrome)return a("Chrome shim is not included in this adapter release."),s;a("adapter.js shimming chrome."),s.browserShim=c,d.shimCreateObjectURL(n),c.shimGetUserMedia(n),c.shimMediaStream(n),c.shimSourceObject(n),c.shimPeerConnection(n),c.shimOnTrack(n),c.shimAddTrackRemoveTrack(n),c.shimGetSendersWithDtmf(n),d.shimRTCIceCandidate(n);break;case"firefox":if(!u||!u.shimPeerConnection||!r.shimFirefox)return a("Firefox shim is not included in this adapter release."),s;a("adapter.js shimming firefox."),s.browserShim=u,d.shimCreateObjectURL(n),u.shimGetUserMedia(n),u.shimSourceObject(n),u.shimPeerConnection(n),u.shimOnTrack(n),u.shimRemoveStream(n),d.shimRTCIceCandidate(n);break;case"edge":if(!l||!l.shimPeerConnection||!r.shimEdge)return a("MS edge shim is not included in this adapter release."),s;a("adapter.js shimming edge."),s.browserShim=l,d.shimCreateObjectURL(n),l.shimGetUserMedia(n),l.shimPeerConnection(n),l.shimReplaceTrack(n);break;case"safari":if(!f||!r.shimSafari)return a("Safari shim is not included in this adapter release."),s;a("adapter.js shimming safari."),s.browserShim=f,d.shimCreateObjectURL(n),f.shimRTCIceServerUrls(n),f.shimCallbacksAPI(n),f.shimLocalStreamsAPI(n),f.shimRemoteStreamsAPI(n),f.shimTrackEventTransceiver(n),f.shimGetUserMedia(n),f.shimCreateOfferLegacy(n),d.shimRTCIceCandidate(n);break;default:a("Unsupported browser!")}return s}},{"./chrome/chrome_shim":42,"./common_shim":44,"./edge/edge_shim":45,"./firefox/firefox_shim":47,"./safari/safari_shim":49,"./utils":50}],42:[function(e,t,n){"use strict";var c=e("../utils.js"),r=c.log;t.exports={shimGetUserMedia:e("./getusermedia"),shimMediaStream:function(e){e.MediaStream=e.MediaStream||e.webkitMediaStream},shimOnTrack:function(a){if("object"==typeof a&&a.RTCPeerConnection&&!("ontrack"in a.RTCPeerConnection.prototype)){Object.defineProperty(a.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&this.removeEventListener("track",this._ontrack),this.addEventListener("track",this._ontrack=e)}});var e=a.RTCPeerConnection.prototype.setRemoteDescription;a.RTCPeerConnection.prototype.setRemoteDescription=function(){var i=this;return i._ontrackpoly||(i._ontrackpoly=function(r){r.stream.addEventListener("addtrack",function(t){var e;e=a.RTCPeerConnection.prototype.getReceivers?i.getReceivers().find(function(e){return e.track&&e.track.id===t.track.id}):{track:t.track};var n=new Event("track");n.track=t.track,n.receiver=e,n.transceiver={receiver:e},n.streams=[r.stream],i.dispatchEvent(n)}),r.stream.getTracks().forEach(function(t){var e;e=a.RTCPeerConnection.prototype.getReceivers?i.getReceivers().find(function(e){return e.track&&e.track.id===t.id}):{track:t};var n=new Event("track");n.track=t,n.receiver=e,n.transceiver={receiver:e},n.streams=[r.stream],i.dispatchEvent(n)})},i.addEventListener("addstream",i._ontrackpoly)),e.apply(i,arguments)}}},shimGetSendersWithDtmf:function(e){if("object"==typeof e&&e.RTCPeerConnection&&!("getSenders"in e.RTCPeerConnection.prototype)&&"createDTMFSender"in e.RTCPeerConnection.prototype){var r=function(e,t){return{track:t,get dtmf(){return void 0===this._dtmf&&("audio"===t.kind?this._dtmf=e.createDTMFSender(t):this._dtmf=null),this._dtmf},_pc:e}};if(!e.RTCPeerConnection.prototype.getSenders){e.RTCPeerConnection.prototype.getSenders=function(){return this._senders=this._senders||[],this._senders.slice()};var i=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,t){var n=i.apply(this,arguments);return n||(n=r(this,e),this._senders.push(n)),n};var n=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(e){n.apply(this,arguments);var t=this._senders.indexOf(e);-1!==t&&this._senders.splice(t,1)}}var a=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var t=this;t._senders=t._senders||[],a.apply(t,[e]),e.getTracks().forEach(function(e){t._senders.push(r(t,e))})};var t=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){var n=this;n._senders=n._senders||[],t.apply(n,[e]),e.getTracks().forEach(function(t){var e=n._senders.find(function(e){return e.track===t});e&&n._senders.splice(n._senders.indexOf(e),1)})}}else if("object"==typeof e&&e.RTCPeerConnection&&"getSenders"in e.RTCPeerConnection.prototype&&"createDTMFSender"in e.RTCPeerConnection.prototype&&e.RTCRtpSender&&!("dtmf"in e.RTCRtpSender.prototype)){var o=e.RTCPeerConnection.prototype.getSenders;e.RTCPeerConnection.prototype.getSenders=function(){var t=this,e=o.apply(t,[]);return e.forEach(function(e){e._pc=t}),e},Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=this._pc.createDTMFSender(this.track):this._dtmf=null),this._dtmf}})}},shimSourceObject:function(e){var n=e&&e.URL;"object"==typeof e&&(!e.HTMLMediaElement||"srcObject"in e.HTMLMediaElement.prototype||Object.defineProperty(e.HTMLMediaElement.prototype,"srcObject",{get:function(){return this._srcObject},set:function(e){var t=this;this._srcObject=e,this.src&&n.revokeObjectURL(this.src),e?(this.src=n.createObjectURL(e),e.addEventListener("addtrack",function(){t.src&&n.revokeObjectURL(t.src),t.src=n.createObjectURL(e)}),e.addEventListener("removetrack",function(){t.src&&n.revokeObjectURL(t.src),t.src=n.createObjectURL(e)})):this.src=""}}))},shimAddTrackRemoveTrackWithNative:function(e){e.RTCPeerConnection.prototype.getLocalStreams=function(){var t=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},Object.keys(this._shimmedLocalStreams).map(function(e){return t._shimmedLocalStreams[e][0]})};var r=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addTrack=function(e,t){if(!t)return r.apply(this,arguments);this._shimmedLocalStreams=this._shimmedLocalStreams||{};var n=r.apply(this,arguments);return this._shimmedLocalStreams[t.id]?-1===this._shimmedLocalStreams[t.id].indexOf(n)&&this._shimmedLocalStreams[t.id].push(n):this._shimmedLocalStreams[t.id]=[t,n],n};var i=e.RTCPeerConnection.prototype.addStream;e.RTCPeerConnection.prototype.addStream=function(e){var n=this;this._shimmedLocalStreams=this._shimmedLocalStreams||{},e.getTracks().forEach(function(t){if(n.getSenders().find(function(e){return e.track===t}))throw new DOMException("Track already exists.","InvalidAccessError")});var t=n.getSenders();i.apply(this,arguments);var r=n.getSenders().filter(function(e){return-1===t.indexOf(e)});this._shimmedLocalStreams[e.id]=[e].concat(r)};var t=e.RTCPeerConnection.prototype.removeStream;e.RTCPeerConnection.prototype.removeStream=function(e){return this._shimmedLocalStreams=this._shimmedLocalStreams||{},delete this._shimmedLocalStreams[e.id],t.apply(this,arguments)};var a=e.RTCPeerConnection.prototype.removeTrack;e.RTCPeerConnection.prototype.removeTrack=function(n){var r=this;return this._shimmedLocalStreams=this._shimmedLocalStreams||{},n&&Object.keys(this._shimmedLocalStreams).forEach(function(e){var t=r._shimmedLocalStreams[e].indexOf(n);-1!==t&&r._shimmedLocalStreams[e].splice(t,1),1===r._shimmedLocalStreams[e].length&&delete r._shimmedLocalStreams[e]}),a.apply(this,arguments)}},shimAddTrackRemoveTrack:function(o){var e=c.detectBrowser(o);if(o.RTCPeerConnection.prototype.addTrack&&65<=e.version)return this.shimAddTrackRemoveTrackWithNative(o);var n=o.RTCPeerConnection.prototype.getLocalStreams;o.RTCPeerConnection.prototype.getLocalStreams=function(){var t=this,e=n.apply(this);return t._reverseStreams=t._reverseStreams||{},e.map(function(e){return t._reverseStreams[e.id]})};var r=o.RTCPeerConnection.prototype.addStream;o.RTCPeerConnection.prototype.addStream=function(e){var n=this;if(n._streams=n._streams||{},n._reverseStreams=n._reverseStreams||{},e.getTracks().forEach(function(t){if(n.getSenders().find(function(e){return e.track===t}))throw new DOMException("Track already exists.","InvalidAccessError")}),!n._reverseStreams[e.id]){var t=new o.MediaStream(e.getTracks());n._streams[e.id]=t,n._reverseStreams[t.id]=e,e=t}r.apply(n,[e])};var i=o.RTCPeerConnection.prototype.removeStream;function a(r,e){var i=e.sdp;return Object.keys(r._reverseStreams||[]).forEach(function(e){var t=r._reverseStreams[e],n=r._streams[t.id];i=i.replace(new RegExp(n.id,"g"),t.id)}),new RTCSessionDescription({type:e.type,sdp:i})}o.RTCPeerConnection.prototype.removeStream=function(e){var t=this;t._streams=t._streams||{},t._reverseStreams=t._reverseStreams||{},i.apply(t,[t._streams[e.id]||e]),delete t._reverseStreams[t._streams[e.id]?t._streams[e.id].id:e.id],delete t._streams[e.id]},o.RTCPeerConnection.prototype.addTrack=function(t,e){var n=this;if("closed"===n.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");var r=[].slice.call(arguments,1);if(1!==r.length||!r[0].getTracks().find(function(e){return e===t}))throw new DOMException("The adapter.js addTrack polyfill only supports a single  stream which is associated with the specified track.","NotSupportedError");if(n.getSenders().find(function(e){return e.track===t}))throw new DOMException("Track already exists.","InvalidAccessError");n._streams=n._streams||{},n._reverseStreams=n._reverseStreams||{};var i=n._streams[e.id];if(i)i.addTrack(t),Promise.resolve().then(function(){n.dispatchEvent(new Event("negotiationneeded"))});else{var a=new o.MediaStream([t]);n._streams[e.id]=a,n._reverseStreams[a.id]=e,n.addStream(a)}return n.getSenders().find(function(e){return e.track===t})},["createOffer","createAnswer"].forEach(function(e){var t=o.RTCPeerConnection.prototype[e];o.RTCPeerConnection.prototype[e]=function(){var n=this,r=arguments;return arguments.length&&"function"==typeof arguments[0]?t.apply(n,[function(e){var t=a(n,e);r[0].apply(null,[t])},function(e){r[1]&&r[1].apply(null,e)},arguments[2]]):t.apply(n,arguments).then(function(e){return a(n,e)})}});var t=o.RTCPeerConnection.prototype.setLocalDescription;o.RTCPeerConnection.prototype.setLocalDescription=function(){var r,e,i;return arguments.length&&arguments[0].type&&(arguments[0]=(r=this,e=arguments[0],i=e.sdp,Object.keys(r._reverseStreams||[]).forEach(function(e){var t=r._reverseStreams[e],n=r._streams[t.id];i=i.replace(new RegExp(t.id,"g"),n.id)}),new RTCSessionDescription({type:e.type,sdp:i}))),t.apply(this,arguments)};var s=Object.getOwnPropertyDescriptor(o.RTCPeerConnection.prototype,"localDescription");Object.defineProperty(o.RTCPeerConnection.prototype,"localDescription",{get:function(){var e=s.get.apply(this);return""===e.type?e:a(this,e)}}),o.RTCPeerConnection.prototype.removeTrack=function(t){var n,r=this;if("closed"===r.signalingState)throw new DOMException("The RTCPeerConnection's signalingState is 'closed'.","InvalidStateError");if(!t._pc)throw new DOMException("Argument 1 of RTCPeerConnection.removeTrack does not implement interface RTCRtpSender.","TypeError");if(!(t._pc===r))throw new DOMException("Sender was not created by this connection.","InvalidAccessError");r._streams=r._streams||{},Object.keys(r._streams).forEach(function(e){r._streams[e].getTracks().find(function(e){return t.track===e})&&(n=r._streams[e])}),n&&(1===n.getTracks().length?r.removeStream(r._reverseStreams[n.id]):n.removeTrack(t.track),r.dispatchEvent(new Event("negotiationneeded")))}},shimPeerConnection:function(n){var e=c.detectBrowser(n);if(n.RTCPeerConnection){var a=n.RTCPeerConnection;n.RTCPeerConnection=function(e,t){if(e&&e.iceServers){for(var n=[],r=0;r<e.iceServers.length;r++){var i=e.iceServers[r];!i.hasOwnProperty("urls")&&i.hasOwnProperty("url")?(c.deprecated("RTCIceServer.url","RTCIceServer.urls"),(i=JSON.parse(JSON.stringify(i))).urls=i.url,n.push(i)):n.push(e.iceServers[r])}e.iceServers=n}return new a(e,t)},n.RTCPeerConnection.prototype=a.prototype,Object.defineProperty(n.RTCPeerConnection,"generateCertificate",{get:function(){return a.generateCertificate}})}else n.RTCPeerConnection=function(e,t){return r("PeerConnection"),e&&e.iceTransportPolicy&&(e.iceTransports=e.iceTransportPolicy),new n.webkitRTCPeerConnection(e,t)},n.RTCPeerConnection.prototype=n.webkitRTCPeerConnection.prototype,n.webkitRTCPeerConnection.generateCertificate&&Object.defineProperty(n.RTCPeerConnection,"generateCertificate",{get:function(){return n.webkitRTCPeerConnection.generateCertificate}});var s=n.RTCPeerConnection.prototype.getStats;n.RTCPeerConnection.prototype.getStats=function(e,t,n){var r=this,i=arguments;if(0<arguments.length&&"function"==typeof e)return s.apply(this,arguments);if(0===s.length&&(0===arguments.length||"function"!=typeof e))return s.apply(this,[]);var a=function(e){var r={};return e.result().forEach(function(t){var n={id:t.id,timestamp:t.timestamp,type:{localcandidate:"local-candidate",remotecandidate:"remote-candidate"}[t.type]||t.type};t.names().forEach(function(e){n[e]=t.stat(e)}),r[n.id]=n}),r},o=function(t){return new Map(Object.keys(t).map(function(e){return[e,t[e]]}))};if(2<=arguments.length){return s.apply(this,[function(e){i[1](o(a(e)))},e])}return new Promise(function(t,e){s.apply(r,[function(e){t(o(a(e)))},e])}).then(t,n)},e.version<51&&["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var i=n.RTCPeerConnection.prototype[e];n.RTCPeerConnection.prototype[e]=function(){var n=arguments,r=this,e=new Promise(function(e,t){i.apply(r,[n[0],e,t])});return n.length<2?e:e.then(function(){n[1].apply(null,[])},function(e){3<=n.length&&n[2].apply(null,[e])})}}),e.version<52&&["createOffer","createAnswer"].forEach(function(e){var i=n.RTCPeerConnection.prototype[e];n.RTCPeerConnection.prototype[e]=function(){var n=this;if(arguments.length<1||1===arguments.length&&"object"==typeof arguments[0]){var r=1===arguments.length?arguments[0]:void 0;return new Promise(function(e,t){i.apply(n,[e,t,r])})}return i.apply(this,arguments)}}),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var t=n.RTCPeerConnection.prototype[e];n.RTCPeerConnection.prototype[e]=function(){return arguments[0]=new("addIceCandidate"===e?n.RTCIceCandidate:n.RTCSessionDescription)(arguments[0]),t.apply(this,arguments)}});var t=n.RTCPeerConnection.prototype.addIceCandidate;n.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?t.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())}}}},{"../utils.js":50,"./getusermedia":43}],43:[function(e,t,n){"use strict";var a=e("../utils.js"),l=a.log;t.exports=function(e){var o=a.detectBrowser(e),s=e&&e.navigator,c=function(i){if("object"!=typeof i||i.mandatory||i.optional)return i;var a={};return Object.keys(i).forEach(function(t){if("require"!==t&&"advanced"!==t&&"mediaSource"!==t){var n="object"==typeof i[t]?i[t]:{ideal:i[t]};void 0!==n.exact&&"number"==typeof n.exact&&(n.min=n.max=n.exact);var r=function(e,t){return e?e+t.charAt(0).toUpperCase()+t.slice(1):"deviceId"===t?"sourceId":t};if(void 0!==n.ideal){a.optional=a.optional||[];var e={};"number"==typeof n.ideal?(e[r("min",t)]=n.ideal,a.optional.push(e),(e={})[r("max",t)]=n.ideal):e[r("",t)]=n.ideal,a.optional.push(e)}void 0!==n.exact&&"number"!=typeof n.exact?(a.mandatory=a.mandatory||{},a.mandatory[r("",t)]=n.exact):["min","max"].forEach(function(e){void 0!==n[e]&&(a.mandatory=a.mandatory||{},a.mandatory[r(e,t)]=n[e])})}}),i.advanced&&(a.optional=(a.optional||[]).concat(i.advanced)),a},r=function(n,r){if(61<=o.version)return r(n);if((n=JSON.parse(JSON.stringify(n)))&&"object"==typeof n.audio){var e=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])};e((n=JSON.parse(JSON.stringify(n))).audio,"autoGainControl","googAutoGainControl"),e(n.audio,"noiseSuppression","googNoiseSuppression"),n.audio=c(n.audio)}if(n&&"object"==typeof n.video){var i=n.video.facingMode;i=i&&("object"==typeof i?i:{ideal:i});var a,t=o.version<66;if(i&&("user"===i.exact||"environment"===i.exact||"user"===i.ideal||"environment"===i.ideal)&&(!s.mediaDevices.getSupportedConstraints||!s.mediaDevices.getSupportedConstraints().facingMode||t))if(delete n.video.facingMode,"environment"===i.exact||"environment"===i.ideal?a=["back","rear"]:"user"!==i.exact&&"user"!==i.ideal||(a=["front"]),a)return s.mediaDevices.enumerateDevices().then(function(e){var t=(e=e.filter(function(e){return"videoinput"===e.kind})).find(function(t){return a.some(function(e){return-1!==t.label.toLowerCase().indexOf(e)})});return!t&&e.length&&-1!==a.indexOf("back")&&(t=e[e.length-1]),t&&(n.video.deviceId=i.exact?{exact:t.deviceId}:{ideal:t.deviceId}),n.video=c(n.video),l("chrome: "+JSON.stringify(n)),r(n)});n.video=c(n.video)}return l("chrome: "+JSON.stringify(n)),r(n)},i=function(e){return{name:{PermissionDeniedError:"NotAllowedError",InvalidStateError:"NotReadableError",DevicesNotFoundError:"NotFoundError",ConstraintNotSatisfiedError:"OverconstrainedError",TrackStartError:"NotReadableError",MediaDeviceFailedDueToShutdown:"NotReadableError",MediaDeviceKillSwitchOn:"NotReadableError"}[e.name]||e.name,message:e.message,constraint:e.constraintName,toString:function(){return this.name+(this.message&&": ")+this.message}}};s.getUserMedia=function(e,t,n){r(e,function(e){s.webkitGetUserMedia(e,t,function(e){n&&n(i(e))})})};var t=function(n){return new Promise(function(e,t){s.getUserMedia(n,e,t)})};if(s.mediaDevices||(s.mediaDevices={getUserMedia:t,enumerateDevices:function(){return new Promise(function(t){var n={audio:"audioinput",video:"videoinput"};return e.MediaStreamTrack.getSources(function(e){t(e.map(function(e){return{label:e.label,kind:n[e.kind],deviceId:e.id,groupId:""}}))})})},getSupportedConstraints:function(){return{deviceId:!0,echoCancellation:!0,facingMode:!0,frameRate:!0,height:!0,width:!0}}}),s.mediaDevices.getUserMedia){var n=s.mediaDevices.getUserMedia.bind(s.mediaDevices);s.mediaDevices.getUserMedia=function(e){return r(e,function(t){return n(t).then(function(e){if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(function(e){e.stop()}),new DOMException("","NotFoundError");return e},function(e){return Promise.reject(i(e))})})}}else s.mediaDevices.getUserMedia=function(e){return t(e)};void 0===s.mediaDevices.addEventListener&&(s.mediaDevices.addEventListener=function(){l("Dummy mediaDevices.addEventListener called.")}),void 0===s.mediaDevices.removeEventListener&&(s.mediaDevices.removeEventListener=function(){l("Dummy mediaDevices.removeEventListener called.")})}},{"../utils.js":50}],44:[function(e,t,n){"use strict";var a=e("sdp"),c=e("./utils");t.exports={shimRTCIceCandidate:function(t){if(!(t.RTCIceCandidate&&"foundation"in t.RTCIceCandidate.prototype)){var i=t.RTCIceCandidate;t.RTCIceCandidate=function(e){"object"==typeof e&&e.candidate&&0===e.candidate.indexOf("a=")&&((e=JSON.parse(JSON.stringify(e))).candidate=e.candidate.substr(2));var t=new i(e),n=a.parseCandidate(e.candidate),r=Object.assign(t,n);return r.toJSON=function(){return{candidate:r.candidate,sdpMid:r.sdpMid,sdpMLineIndex:r.sdpMLineIndex,usernameFragment:r.usernameFragment}},r},function(e,r,i){if(e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype,a=t.addEventListener;t.addEventListener=function(e,t){if(e!==r)return a.apply(this,arguments);var n=function(e){t(i(e))};return this._eventMap=this._eventMap||{},this._eventMap[t]=n,a.apply(this,[e,n])};var o=t.removeEventListener;t.removeEventListener=function(e,t){if(e!==r||!this._eventMap||!this._eventMap[t])return o.apply(this,arguments);var n=this._eventMap[t];return delete this._eventMap[t],o.apply(this,[e,n])},Object.defineProperty(t,"on"+r,{get:function(){return this["_on"+r]},set:function(e){this["_on"+r]&&(this.removeEventListener(r,this["_on"+r]),delete this["_on"+r]),e&&this.addEventListener(r,this["_on"+r]=e)}})}}(t,"icecandidate",function(e){return e.candidate&&Object.defineProperty(e,"candidate",{value:new t.RTCIceCandidate(e.candidate),writable:"false"}),e})}},shimCreateObjectURL:function(e){var t=e&&e.URL;if("object"==typeof e&&e.HTMLMediaElement&&"srcObject"in e.HTMLMediaElement.prototype&&t.createObjectURL&&t.revokeObjectURL){var n=t.createObjectURL.bind(t),r=t.revokeObjectURL.bind(t),i=new Map,a=0;t.createObjectURL=function(e){if("getTracks"in e){var t="polyblob:"+ ++a;return i.set(t,e),c.deprecated("URL.createObjectURL(stream)","elem.srcObject = stream"),t}return n(e)},t.revokeObjectURL=function(e){r(e),i.delete(e)};var o=Object.getOwnPropertyDescriptor(e.HTMLMediaElement.prototype,"src");Object.defineProperty(e.HTMLMediaElement.prototype,"src",{get:function(){return o.get.apply(this)},set:function(e){return this.srcObject=i.get(e)||null,o.set.apply(this,[e])}});var s=e.HTMLMediaElement.prototype.setAttribute;e.HTMLMediaElement.prototype.setAttribute=function(){return 2===arguments.length&&"src"===(""+arguments[0]).toLowerCase()&&(this.srcObject=i.get(arguments[1])||null),s.apply(this,arguments)}}}}},{"./utils":50,sdp:39}],45:[function(e,t,n){"use strict";var r=e("../utils"),i=e("rtcpeerconnection-shim");t.exports={shimGetUserMedia:e("./getusermedia"),shimPeerConnection:function(e){var t=r.detectBrowser(e);if(e.RTCIceGatherer&&(e.RTCIceCandidate||(e.RTCIceCandidate=function(e){return e}),e.RTCSessionDescription||(e.RTCSessionDescription=function(e){return e}),t.version<15025)){var n=Object.getOwnPropertyDescriptor(e.MediaStreamTrack.prototype,"enabled");Object.defineProperty(e.MediaStreamTrack.prototype,"enabled",{set:function(e){n.set.call(this,e);var t=new Event("enabled");t.enabled=e,this.dispatchEvent(t)}})}!e.RTCRtpSender||"dtmf"in e.RTCRtpSender.prototype||Object.defineProperty(e.RTCRtpSender.prototype,"dtmf",{get:function(){return void 0===this._dtmf&&("audio"===this.track.kind?this._dtmf=new e.RTCDtmfSender(this):"video"===this.track.kind&&(this._dtmf=null)),this._dtmf}}),e.RTCPeerConnection=i(e,t.version)},shimReplaceTrack:function(e){!e.RTCRtpSender||"replaceTrack"in e.RTCRtpSender.prototype||(e.RTCRtpSender.prototype.replaceTrack=e.RTCRtpSender.prototype.setTrack)}}},{"../utils":50,"./getusermedia":46,"rtcpeerconnection-shim":34}],46:[function(e,t,n){"use strict";t.exports=function(e){var t=e&&e.navigator,n=t.mediaDevices.getUserMedia.bind(t.mediaDevices);t.mediaDevices.getUserMedia=function(e){return n(e).catch(function(e){return Promise.reject({name:{PermissionDeniedError:"NotAllowedError"}[(t=e).name]||t.name,message:t.message,constraint:t.constraint,toString:function(){return this.name}});var t})}}},{}],47:[function(e,t,n){"use strict";var r=e("../utils");t.exports={shimGetUserMedia:e("./getusermedia"),shimOnTrack:function(e){"object"!=typeof e||!e.RTCPeerConnection||"ontrack"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"ontrack",{get:function(){return this._ontrack},set:function(e){this._ontrack&&(this.removeEventListener("track",this._ontrack),this.removeEventListener("addstream",this._ontrackpoly)),this.addEventListener("track",this._ontrack=e),this.addEventListener("addstream",this._ontrackpoly=function(n){n.stream.getTracks().forEach(function(e){var t=new Event("track");t.track=e,t.receiver={track:e},t.transceiver={receiver:t.receiver},t.streams=[n.stream],this.dispatchEvent(t)}.bind(this))}.bind(this))}}),"object"==typeof e&&e.RTCTrackEvent&&"receiver"in e.RTCTrackEvent.prototype&&!("transceiver"in e.RTCTrackEvent.prototype)&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},shimSourceObject:function(e){"object"==typeof e&&(!e.HTMLMediaElement||"srcObject"in e.HTMLMediaElement.prototype||Object.defineProperty(e.HTMLMediaElement.prototype,"srcObject",{get:function(){return this.mozSrcObject},set:function(e){this.mozSrcObject=e}}))},shimPeerConnection:function(s){var c=r.detectBrowser(s);if("object"==typeof s&&(s.RTCPeerConnection||s.mozRTCPeerConnection)){s.RTCPeerConnection||(s.RTCPeerConnection=function(e,t){if(c.version<38&&e&&e.iceServers){for(var n=[],r=0;r<e.iceServers.length;r++){var i=e.iceServers[r];if(i.hasOwnProperty("urls"))for(var a=0;a<i.urls.length;a++){var o={url:i.urls[a]};0===i.urls[a].indexOf("turn")&&(o.username=i.username,o.credential=i.credential),n.push(o)}else n.push(e.iceServers[r])}e.iceServers=n}return new s.mozRTCPeerConnection(e,t)},s.RTCPeerConnection.prototype=s.mozRTCPeerConnection.prototype,s.mozRTCPeerConnection.generateCertificate&&Object.defineProperty(s.RTCPeerConnection,"generateCertificate",{get:function(){return s.mozRTCPeerConnection.generateCertificate}}),s.RTCSessionDescription=s.mozRTCSessionDescription,s.RTCIceCandidate=s.mozRTCIceCandidate),["setLocalDescription","setRemoteDescription","addIceCandidate"].forEach(function(e){var t=s.RTCPeerConnection.prototype[e];s.RTCPeerConnection.prototype[e]=function(){return arguments[0]=new("addIceCandidate"===e?s.RTCIceCandidate:s.RTCSessionDescription)(arguments[0]),t.apply(this,arguments)}});var e=s.RTCPeerConnection.prototype.addIceCandidate;s.RTCPeerConnection.prototype.addIceCandidate=function(){return arguments[0]?e.apply(this,arguments):(arguments[1]&&arguments[1].apply(null),Promise.resolve())};var a={inboundrtp:"inbound-rtp",outboundrtp:"outbound-rtp",candidatepair:"candidate-pair",localcandidate:"local-candidate",remotecandidate:"remote-candidate"},n=s.RTCPeerConnection.prototype.getStats;s.RTCPeerConnection.prototype.getStats=function(e,i,t){return n.apply(this,[e||null]).then(function(n){var t,r;if(c.version<48&&(t=n,r=new Map,Object.keys(t).forEach(function(e){r.set(e,t[e]),r[e]=t[e]}),n=r),c.version<53&&!i)try{n.forEach(function(e){e.type=a[e.type]||e.type})}catch(e){if("TypeError"!==e.name)throw e;n.forEach(function(e,t){n.set(t,Object.assign({},e,{type:a[e.type]||e.type}))})}return n}).then(i,t)}}},shimRemoveStream:function(e){!e.RTCPeerConnection||"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(t){var n=this;r.deprecated("removeStream","removeTrack"),this.getSenders().forEach(function(e){e.track&&-1!==t.getTracks().indexOf(e.track)&&n.removeTrack(e)})})}}},{"../utils":50,"./getusermedia":48}],48:[function(e,t,n){"use strict";var d=e("../utils"),h=d.log;t.exports=function(e){var i=d.detectBrowser(e),a=e&&e.navigator,t=e&&e.MediaStreamTrack,o=function(e){return{name:{InternalError:"NotReadableError",NotSupportedError:"TypeError",PermissionDeniedError:"NotAllowedError",SecurityError:"NotAllowedError"}[e.name]||e.name,message:{"The operation is insecure.":"The request is not allowed by the user agent or the platform in the current context."}[e.message]||e.message,constraint:e.constraint,toString:function(){return this.name+(this.message&&": ")+this.message}}},r=function(e,t,n){var r=function(r){if("object"!=typeof r||r.require)return r;var i=[];return Object.keys(r).forEach(function(e){if("require"!==e&&"advanced"!==e&&"mediaSource"!==e){var t=r[e]="object"==typeof r[e]?r[e]:{ideal:r[e]};if(void 0===t.min&&void 0===t.max&&void 0===t.exact||i.push(e),void 0!==t.exact&&("number"==typeof t.exact?t.min=t.max=t.exact:r[e]=t.exact,delete t.exact),void 0!==t.ideal){r.advanced=r.advanced||[];var n={};"number"==typeof t.ideal?n[e]={min:t.ideal,max:t.ideal}:n[e]=t.ideal,r.advanced.push(n),delete t.ideal,Object.keys(t).length||delete r[e]}}}),i.length&&(r.require=i),r};return e=JSON.parse(JSON.stringify(e)),i.version<38&&(h("spec: "+JSON.stringify(e)),e.audio&&(e.audio=r(e.audio)),e.video&&(e.video=r(e.video)),h("ff37: "+JSON.stringify(e))),a.mozGetUserMedia(e,t,function(e){n(o(e))})};if(a.mediaDevices||(a.mediaDevices={getUserMedia:function(n){return new Promise(function(e,t){r(n,e,t)})},addEventListener:function(){},removeEventListener:function(){}}),a.mediaDevices.enumerateDevices=a.mediaDevices.enumerateDevices||function(){return new Promise(function(e){e([{kind:"audioinput",deviceId:"default",label:"",groupId:""},{kind:"videoinput",deviceId:"default",label:"",groupId:""}])})},i.version<41){var n=a.mediaDevices.enumerateDevices.bind(a.mediaDevices);a.mediaDevices.enumerateDevices=function(){return n().then(void 0,function(e){if("NotFoundError"===e.name)return[];throw e})}}if(i.version<49){var s=a.mediaDevices.getUserMedia.bind(a.mediaDevices);a.mediaDevices.getUserMedia=function(t){return s(t).then(function(e){if(t.audio&&!e.getAudioTracks().length||t.video&&!e.getVideoTracks().length)throw e.getTracks().forEach(function(e){e.stop()}),new DOMException("The object can not be found here.","NotFoundError");return e},function(e){return Promise.reject(o(e))})}}if(!(55<i.version&&"autoGainControl"in a.mediaDevices.getSupportedConstraints())){var c=function(e,t,n){t in e&&!(n in e)&&(e[n]=e[t],delete e[t])},l=a.mediaDevices.getUserMedia.bind(a.mediaDevices);if(a.mediaDevices.getUserMedia=function(e){return"object"==typeof e&&"object"==typeof e.audio&&(e=JSON.parse(JSON.stringify(e)),c(e.audio,"autoGainControl","mozAutoGainControl"),c(e.audio,"noiseSuppression","mozNoiseSuppression")),l(e)},t&&t.prototype.getSettings){var u=t.prototype.getSettings;t.prototype.getSettings=function(){var e=u.apply(this,arguments);return c(e,"mozAutoGainControl","autoGainControl"),c(e,"mozNoiseSuppression","noiseSuppression"),e}}if(t&&t.prototype.applyConstraints){var f=t.prototype.applyConstraints;t.prototype.applyConstraints=function(e){return"audio"===this.kind&&"object"==typeof e&&(e=JSON.parse(JSON.stringify(e)),c(e,"autoGainControl","mozAutoGainControl"),c(e,"noiseSuppression","mozNoiseSuppression")),f.apply(this,[e])}}}a.getUserMedia=function(e,t,n){if(i.version<44)return r(e,t,n);d.deprecated("navigator.getUserMedia","navigator.mediaDevices.getUserMedia"),a.mediaDevices.getUserMedia(e).then(t,n)}}},{"../utils":50}],49:[function(e,t,n){"use strict";var o=e("../utils");t.exports={shimLocalStreamsAPI:function(e){if("object"==typeof e&&e.RTCPeerConnection){if("getLocalStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getLocalStreams=function(){return this._localStreams||(this._localStreams=[]),this._localStreams}),"getStreamById"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getStreamById=function(t){var n=null;return this._localStreams&&this._localStreams.forEach(function(e){e.id===t&&(n=e)}),this._remoteStreams&&this._remoteStreams.forEach(function(e){e.id===t&&(n=e)}),n}),!("addStream"in e.RTCPeerConnection.prototype)){var r=e.RTCPeerConnection.prototype.addTrack;e.RTCPeerConnection.prototype.addStream=function(t){this._localStreams||(this._localStreams=[]),-1===this._localStreams.indexOf(t)&&this._localStreams.push(t);var n=this;t.getTracks().forEach(function(e){r.call(n,e,t)})},e.RTCPeerConnection.prototype.addTrack=function(e,t){return t&&(this._localStreams?-1===this._localStreams.indexOf(t)&&this._localStreams.push(t):this._localStreams=[t]),r.call(this,e,t)}}"removeStream"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.removeStream=function(e){this._localStreams||(this._localStreams=[]);var t=this._localStreams.indexOf(e);if(-1!==t){this._localStreams.splice(t,1);var n=this,r=e.getTracks();this.getSenders().forEach(function(e){-1!==r.indexOf(e.track)&&n.removeTrack(e)})}})}},shimRemoteStreamsAPI:function(e){"object"==typeof e&&e.RTCPeerConnection&&("getRemoteStreams"in e.RTCPeerConnection.prototype||(e.RTCPeerConnection.prototype.getRemoteStreams=function(){return this._remoteStreams?this._remoteStreams:[]}),"onaddstream"in e.RTCPeerConnection.prototype||Object.defineProperty(e.RTCPeerConnection.prototype,"onaddstream",{get:function(){return this._onaddstream},set:function(e){this._onaddstream&&(this.removeEventListener("addstream",this._onaddstream),this.removeEventListener("track",this._onaddstreampoly)),this.addEventListener("addstream",this._onaddstream=e),this.addEventListener("track",this._onaddstreampoly=function(e){var t=e.streams[0];if(this._remoteStreams||(this._remoteStreams=[]),!(0<=this._remoteStreams.indexOf(t))){this._remoteStreams.push(t);var n=new Event("addstream");n.stream=e.streams[0],this.dispatchEvent(n)}}.bind(this))}}))},shimCallbacksAPI:function(e){if("object"==typeof e&&e.RTCPeerConnection){var t=e.RTCPeerConnection.prototype,i=t.createOffer,a=t.createAnswer,o=t.setLocalDescription,s=t.setRemoteDescription,c=t.addIceCandidate;t.createOffer=function(e,t){var n=2<=arguments.length?arguments[2]:e,r=i.apply(this,[n]);return t?(r.then(e,t),Promise.resolve()):r},t.createAnswer=function(e,t){var n=2<=arguments.length?arguments[2]:e,r=a.apply(this,[n]);return t?(r.then(e,t),Promise.resolve()):r};var n=function(e,t,n){var r=o.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r};t.setLocalDescription=n,n=function(e,t,n){var r=s.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.setRemoteDescription=n,n=function(e,t,n){var r=c.apply(this,[e]);return n?(r.then(t,n),Promise.resolve()):r},t.addIceCandidate=n}},shimGetUserMedia:function(e){var r=e&&e.navigator;r.getUserMedia||(r.webkitGetUserMedia?r.getUserMedia=r.webkitGetUserMedia.bind(r):r.mediaDevices&&r.mediaDevices.getUserMedia&&(r.getUserMedia=function(e,t,n){r.mediaDevices.getUserMedia(e).then(t,n)}.bind(r)))},shimRTCIceServerUrls:function(e){var a=e.RTCPeerConnection;e.RTCPeerConnection=function(e,t){if(e&&e.iceServers){for(var n=[],r=0;r<e.iceServers.length;r++){var i=e.iceServers[r];!i.hasOwnProperty("urls")&&i.hasOwnProperty("url")?(o.deprecated("RTCIceServer.url","RTCIceServer.urls"),(i=JSON.parse(JSON.stringify(i))).urls=i.url,delete i.url,n.push(i)):n.push(e.iceServers[r])}e.iceServers=n}return new a(e,t)},e.RTCPeerConnection.prototype=a.prototype,"generateCertificate"in e.RTCPeerConnection&&Object.defineProperty(e.RTCPeerConnection,"generateCertificate",{get:function(){return a.generateCertificate}})},shimTrackEventTransceiver:function(e){"object"==typeof e&&e.RTCPeerConnection&&"receiver"in e.RTCTrackEvent.prototype&&!e.RTCTransceiver&&Object.defineProperty(e.RTCTrackEvent.prototype,"transceiver",{get:function(){return{receiver:this.receiver}}})},shimCreateOfferLegacy:function(e){var r=e.RTCPeerConnection.prototype.createOffer;e.RTCPeerConnection.prototype.createOffer=function(e){if(e){var t=this.getTransceivers().find(function(e){return e.sender.track&&"audio"===e.sender.track.kind});!1===e.offerToReceiveAudio&&t?"sendrecv"===t.direction?t.setDirection("sendonly"):"recvonly"===t.direction&&t.setDirection("inactive"):!0!==e.offerToReceiveAudio||t||this.addTransceiver("audio");var n=this.getTransceivers().find(function(e){return e.sender.track&&"video"===e.sender.track.kind});!1===e.offerToReceiveVideo&&n?"sendrecv"===n.direction?n.setDirection("sendonly"):"recvonly"===n.direction&&n.setDirection("inactive"):!0!==e.offerToReceiveVideo||n||this.addTransceiver("video")}return r.apply(this,arguments)}}}},{"../utils":50}],50:[function(e,t,n){"use strict";var r=!0,i=!0;function a(e,t,n){var r=e.match(t);return r&&r.length>=n&&parseInt(r[n],10)}t.exports={extractVersion:a,disableLog:function(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(r=e)?"adapter.js logging disabled":"adapter.js logging enabled"},disableWarnings:function(e){return"boolean"!=typeof e?new Error("Argument type: "+typeof e+". Please use a boolean."):(i=!e,"adapter.js deprecation warnings "+(e?"disabled":"enabled"))},log:function(){if("object"==typeof window){if(r)return;"undefined"!=typeof console&&"function"==typeof console.log&&console.log.apply(console,arguments)}},deprecated:function(e,t){i&&console.warn(e+" is deprecated, please use "+t+" instead.")},detectBrowser:function(e){var t=e&&e.navigator,n={browser:null,version:null};if(void 0===e||!e.navigator)return n.browser="Not a browser.",n;if(t.mozGetUserMedia)n.browser="firefox",n.version=a(t.userAgent,/Firefox\/(\d+)\./,1);else if(t.webkitGetUserMedia)if(e.webkitRTCPeerConnection)n.browser="chrome",n.version=a(t.userAgent,/Chrom(e|ium)\/(\d+)\./,2);else{if(!t.userAgent.match(/Version\/(\d+).(\d+)/))return n.browser="Unsupported webkit-based browser with GUM support but no WebRTC support.",n;n.browser="safari",n.version=a(t.userAgent,/AppleWebKit\/(\d+)\./,1)}else if(t.mediaDevices&&t.userAgent.match(/Edge\/(\d+).(\d+)$/))n.browser="edge",n.version=a(t.userAgent,/Edge\/(\d+).(\d+)$/,2);else{if(!t.mediaDevices||!t.userAgent.match(/AppleWebKit\/(\d+)\./))return n.browser="Not a supported browser.",n;n.browser="safari",n.version=a(t.userAgent,/AppleWebKit\/(\d+)\./,1)}return n}}},{}],51:[function(e,t,n){t.exports={name:"jssip",title:"JsSIP",description:"the Javascript SIP library",version:"3.2.11",homepage:"http://jssip.net",author:"José Luis Millán <jmillan@aliax.net> (https://github.com/jmillan)",contributors:["Iñaki Baz Castillo <ibc@aliax.net> (https://github.com/ibc)","Saúl Ibarra Corretgé <saghul@gmail.com> (https://github.com/saghul)"],main:"lib-es5/JsSIP.js",keywords:["sip","websocket","webrtc","node","browser","library"],license:"MIT",repository:{type:"git",url:"https://github.com/versatica/JsSIP.git"},bugs:{url:"https://github.com/versatica/JsSIP/issues"},dependencies:{debug:"^3.1.0",events:"^2.0.0","sdp-transform":"^2.4.1","webrtc-adapter":"^6.1.5"},devDependencies:{"ansi-colors":"^1.1.0","babel-core":"^6.26.0","babel-preset-env":"^1.6.1",browserify:"^16.2.0",eslint:"^4.19.1","fancy-log":"^1.3.2",gulp:"^4.0.0","gulp-babel":"^7.0.1","gulp-eslint":"^4.0.2","gulp-expect-file":"0.0.7","gulp-header":"^2.0.5","gulp-nodeunit-runner":"^0.2.2","gulp-plumber":"^1.2.0","gulp-rename":"^1.2.2","gulp-uglify":"^3.0.0",pegjs:"^0.7.0","vinyl-buffer":"^1.0.1","vinyl-source-stream":"^2.0.0"},scripts:{test:"gulp test",prepublishOnly:"gulp babel"}}},{}]},{},[8])(8)}),function(e,t){function n(i){return{scope:{selectedTemplate:"=",selectedTemplateName:"=",dateStart:"=?",dateEnd:"=?",firstDayOfWeek:"=?",showTemplate:"=?",mdOnSelect:"&",localizationMap:"=?",customTemplates:"=?",disableTemplates:"@",maxRange:"=?",onePanel:"=?",isDisabledDate:"&?",format:"=?"},template:'<div class="md-date-range-picker md-whiteframe-1dp" ng-class="{\'md-date-range-picker__one-panel\':onePanel}"><div layout="column"><div layout="row" layout-margin><div class="md-date-range-picker__calendar-wrapper"><div class="md-date-range-picker__month-year" layout="row" layout-align="center center"><div flex layout="column" layout-align="center center"><span aria-label="Previous Month" class="md-button md-icon-button" event-key="prev"><md-icon md-svg-src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4="></md-icon></span></div><md-select md-container-class="md-date-range-picker__select" md-on-close="updateActiveDate()" ng-model="activeMonth" placeholder="{{::getLocalizationVal(\'Month\')}}" class="md-no-underline"><md-option ng-value="::month.id" ng-repeat="month in months" ng-bind="::month.name"></md-option></md-select><md-select md-container-class="md-date-range-picker__select" md-on-close="updateActiveDate()" ng-model="activeYear" placeholder="{{::getLocalizationVal(\'Year\')}}" class="md-no-underline"><md-option ng-value="::year.id" ng-repeat="year in years" ng-bind="::year.name"></md-option></md-select><div flex layout="column" layout-align="center center" class="hide-gt-sm show-sm show-xs"><span aria-label="Next Month" class="md-icon-button md-button" event-key="next"><md-icon style="transform: rotate(-180deg)" md-svg-src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4="></md-icon></span></div><div flex ng-if="onePanel" layout="column" layout-align="center center" class="hide-sm hide-xs show-gt-sm"><span aria-label="Next Month" class="md-icon-button md-button" event-key="next"><md-icon style="transform: rotate(-180deg)" md-svg-src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4="></md-icon></span></div><div flex ng-if="!onePanel" layout="column" layout-align="center center" class="hide-sm hide-xs show-gt-sm"><span aria-label="Next Month" ng-disabled="true" aria-hidden="true" class="md-icon-button md-button"><md-icon></md-icon></span></div></div><div class="md-date-range-picker__week" style="font-size: 0"><span class="md-date-range-picker__calendar__grid" ng-repeat="day in days">{{::day.name}}</span></div><div class="md-date-range-picker__calendar"><span ng-repeat="date in dates" class="md-date-range-picker__calendar__grid" ng-class="{\'md-date-range-picker__calendar__selected\':inSelectedDateRange(date),\'md-date-range-picker__calendar__start\':isSelectedStartDate(date),\'md-date-range-picker__calendar__end\':isSelectedEndDate(date),\'md-date-range-picker__calendar__not-in-active-month\': !inCurrentMonth(date),\'md-date-range-picker__calendar__today\' : isToday(date),\'md-date-range-picker__calendar__disabled\': !isInMaxRange(date) || isDisabledDate({$date:date})}" event-key="date1" event-param="{{$index}}"><span event-key="date1" event-param="{{$index}}" class="md-date-range-picker__calendar__selection" ng-bind="{{::date.getDate()}}"></span></span></div></div><div ng-show="!onePanel" class="md-date-range-picker__calendar-wrapper hide-sm hide-xs show-gt-sm"><div class="md-date-range-picker__month-year" layout="row" layout-align="center center"><div flex layout="column" layout-align="center center" style="visibility: hidden"><span aria-label="Previous Month" class="md-button md-icon-button" event-key="prev"><md-icon md-svg-src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4="></md-icon></span></div><md-select md-container-class="md-date-range-picker__select" md-on-close="updateActiveDate(true)" ng-model="activeMonth2" placeholder="{{::getLocalizationVal(\'Month\')}}" class="md-no-underline"><md-option ng-value="::month.id" ng-repeat="month in months" ng-bind="::month.name"></md-option></md-select><md-select md-container-class="md-date-range-picker__select" md-on-close="updateActiveDate(true)" ng-model="activeYear2" placeholder="{{::getLocalizationVal(\'Year\')}}" class="md-no-underline"><md-option ng-value="::year.id" ng-repeat="year in years" ng-bind="::year.name"></md-option></md-select><div flex layout="column" layout-align="center center"><span aria-label="Next Month" class="md-icon-button md-button" event-key="next"><md-icon style="transform: rotate(-180deg)" md-svg-src="data:image/svg+xml;base64,PHN2ZyB2ZXJzaW9uPSIxLjEiIHg9IjBweCIgeT0iMHB4IiB2aWV3Qm94PSIwIDAgMjQgMjQiPjxnPjxwb2x5Z29uIHBvaW50cz0iMTUuNCw3LjQgMTQsNiA4LDEyIDE0LDE4IDE1LjQsMTYuNiAxMC44LDEyICIvPjwvZz48L3N2Zz4="></md-icon></span></div></div><div class="md-date-range-picker__week" style="font-size: 0" ng-if="!onePanel"><span class="md-date-range-picker__calendar__grid" ng-repeat="day in days">{{::day.name}}</span></div><div class="md-date-range-picker__calendar"><span ng-repeat="date in dates2" class="md-date-range-picker__calendar__grid" ng-class="{\'md-date-range-picker__calendar__selected\':inSelectedDateRange(date), \'md-date-range-picker__calendar__start\':isSelectedStartDate(date), \'md-date-range-picker__calendar__end\':isSelectedEndDate(date), \'md-date-range-picker__calendar__not-in-active-month\': !inCurrentMonth(date, true), \'md-date-range-picker__calendar__today\' : isToday(date),\'md-date-range-picker__calendar__disabled\': !isInMaxRange(date) || isDisabledDate({$date:date}) }" event-key="date2" event-param="{{$index}}"><span event-key="date2" event-param="{{$index}}" class="md-date-range-picker__calendar__selection" ng-bind="{{::date.getDate()}}"></span></span></div></div></div><div class="md-date-range-picker__templates" ng-if="showTemplate"><div ng-if="!onePanel && !maxRange" class="hide-xs hide-sm show-gt-sm" layout="row" layout-align="center center" layout-wrap><div ng-repeat="(tmpltKey,tmpltName) in selectionTemplate" class="md-button" aria-label="{{::tmpltName}}" ng-class="selectedTemplate === tmpltKey ? \'md-primary md-raised\' : \'\'" event-key="{{tmpltKey}}" ng-bind="::tmpltName" flex="20"></div><div ng-repeat="tmplt in customTemplates" class="md-button" aria-label="{{::tmplt.name}}" ng-class="selectedTemplate === tmplt.name ? \'md-primary md-raised\' : \'\'" ng-click="selectCustomRange(tmplt.name,tmplt)" event-key="Custom Template" ng-bind="::tmplt.name" flex="20"></div></div><div ng-if="!maxRange" ng-class="{\'hide-gt-sm\':!onePanel}" layout="column" layout-padding><md-input-container><label>{{::getLocalizationVal(\'Date Range Template\')}}</label><md-select md-container-class="md-date-range-picker__select" class="md-block" placeholder="{{::getLocalizationVal(\'Custom Date Range\')}}" ng-model="selectedTemplate"><md-option value=""></md-option><md-option ng-repeat="(tmpltKey,tmpltName) in selectionTemplate track by tmpltKey" aria-label="{{::tmpltName}}" ng-click="actionByKey(tmpltKey,null)" ng-bind="::tmpltName" value="{{tmpltKey}}"></md-option><md-option ng-repeat="tmplt in customTemplates" aria-label="{{::tmplt.name}}" ng-click="selectCustomRange(tmplt.name,tmplt)" ng-bind="::tmplt.name" value="{{::tmplt.name}}"></md-option></md-select></md-input-container></div></div></div></div>',controller:"mdDateRangePickerCtrl",link:function(r,e,t,n){r.actionByKey=function(e,t,n){switch(e){case"prev":r.handleClickPrevMonth(n),r.runIfNotInDigest();break;case"next":r.handleClickNextMonth(n),r.runIfNotInDigest();break;case"date1":r.handleClickDate(n,r.dates[t])?r.runIfNotInDigest(r.triggerChange):r.runIfNotInDigest();break;case"date2":r.handleClickDate(n,r.dates2[t])?r.runIfNotInDigest(r.triggerChange):r.runIfNotInDigest();break;case"TD":r.handleClickSelectToday(),r.runIfNotInDigest(r.triggerChange);break;case"YD":r.handleClickSelectYesterday(),r.runIfNotInDigest(r.triggerChange);break;case"TW":r.handleClickSelectThisWeek(),r.runIfNotInDigest(r.triggerChange);break;case"LW":r.handleClickSelectLastWeek(),r.runIfNotInDigest(r.triggerChange);break;case"TM":r.handleClickSelectThisMonth(),r.runIfNotInDigest(r.triggerChange);break;case"LM":r.handleClickSelectLastMonth(),r.runIfNotInDigest(r.triggerChange);break;case"TY":r.handleClickSelectThisYear(),r.runIfNotInDigest(r.triggerChange);break;case"LY":r.handleClickSelectLastYear(),r.runIfNotInDigest(r.triggerChange);break;case"Custom Template":r.runIfNotInDigest(r.triggerChange)}},r.runIfNotInDigest=function(e){null==r.$root||r.$root.$$phase||(r.$apply(),e&&"function"==typeof e&&e())},e.on("click",function(e){var t=e.target.getAttribute("event-key"),n=e.target.getAttribute("event-param");r.actionByKey(t,n,e)}),r.triggerChange=function(e){var t=i.getSelectedDate(r.dateStart,r.dateEnd,r.isDisabledDate,r.maxRange);r.mdOnSelect&&r.mdOnSelect({$dates:t})}}}}function r(c,l){var u={TD:f("Today"),YD:f("Yesterday"),TW:f("This Week"),LW:f("Last Week"),TM:f("This Month"),LM:f("Last Month"),TY:f("This Year"),LY:f("Last Year")},e=1;function f(e){return null!=c.localizationMap&&null!=c.localizationMap[e]?c.localizationMap[e]:e}function d(){return-1!==[void 0,null,"",NaN].indexOf(c.firstDayOfWeek)||-1===[0,1,2,3,4,5,6].indexOf(c.firstDayOfWeek)?e:c.firstDayOfWeek}function n(e){var t,n,r=[],i=(new Date(e.getFullYear(),e.getMonth(),1),new Date(e.getFullYear(),e.getMonth()+1,0)),a=d();for(t=1;t<=i.getDate();t++)r.push(new Date(e.getFullYear(),e.getMonth(),t));for(n=r[0].getDay(),t=0;n!==a;)r.unshift(new Date(e.getFullYear(),e.getMonth(),t)),n=n<=0?6:n-1,t--;for(n=(r[r.length-1].getDay()+1)%7,t=1;n!==a;)r.push(new Date(e.getFullYear(),e.getMonth()+1,t)),n=(n+1)%7,t++;return r}function a(e,t){if(e&&t){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate());return new Date(t.getFullYear(),t.getMonth(),t.getDate())-n}}SELECTION_TEMPLATES_CUSTOM={},c.isMenuContainer=!1,c.days=[],c.label="Date range picker",c.dates=[],c.dates2=[],c.numberOfMonthToDisplay=2,c.today=new Date,c.dateStart&&c.dateStart.setHours(0,0,0,0),c.dateEnd&&c.dateEnd.setHours(23,59,59,999),c.firstDayOfMonth=c.dateStart?new Date(c.dateStart.getFullYear(),c.dateStart.getMonth(),1):Date(c.today.getFullYear(),c.today.getMonth(),1),c.lastDayOfMonth=c.dateStart?new Date(c.dateStart.getFullYear(),c.dateStart.getMonth()+1,0):Date(c.today.getFullYear(),c.today.getMonth()+1,0),c.activeDate=c.dateStart||c.today,c.activeDate2=new Date(c.activeDate.getFullYear(),c.activeDate.getMonth()+1,1),c.activeMonth=c.activeDate.getMonth(),c.activeYear=c.activeDate.getFullYear(),c.activeMonth2=c.activeDate2.getMonth(),c.activeYear2=c.activeDate2.getFullYear(),c.months=[],c.years=[],c.inCurrentMonth=function(e,t){return t?e.getMonth()===c.activeMonth2&&e.getFullYear()===c.activeYear2:e.getMonth()===c.activeMonth&&e.getFullYear()===c.activeYear},c.isToday=function(e){return 0===a(e,new Date)},c.handleClickDate=function(e,t){var n=!1,r=!1;if(0===a(c.dateStart,c.dateEnd)){if(0===a(c.dateStart,t))n=r=!0;else if(!c.isDisabledDate||!c.isDisabledDate({$date:t})){var i=a(c.dateStart,t);0<i?(c.maxRange&&Math.abs(Math.ceil(i/864e5))+1<=c.maxRange||!c.maxRange)&&(c.dateEnd=t,n=r=!0):(c.maxRange&&Math.abs(Math.ceil(i/864e5))+1<=c.maxRange||!c.maxRange)&&(c.dateStart=t,n=r=!0)}}else c.isDisabledDate&&c.isDisabledDate({$date:t})||(c.dateStart=t,c.dateEnd=t,n=!0);n&&(c.selectedTemplate=!1,c.selectedTemplateName=c.selectedDateText());return r},c.inSelectedDateRange=function(e){return!(!c.dateStart||!c.dateEnd)&&(0<=a(c.dateStart,e)&&0<=a(e,c.dateEnd))},c.isSelectedStartDate=function(e){return 0===a(c.dateStart,e)},c.isSelectedEndDate=function(e){return 0===a(c.dateEnd,e)},c.updateActiveDate=function(e){var t=new Date(c.activeYear,c.activeMonth,1),n=new Date(c.activeYear2,c.activeMonth2,1);e?(t=new Date(c.activeYear2,c.activeMonth2-1,1),c.activeYear=t.getFullYear(),c.activeMonth=t.getMonth()):(n=new Date(c.activeYear,c.activeMonth+1,1),c.activeYear2=n.getFullYear(),c.activeMonth2=n.getMonth());c.focusToDate(t)},c.selectedDateText=function(){return c.format&&"function"==typeof c.format?c.format(c.dateStart,c.dateEnd,c.selectedTemplate,c.selectedTemplateName):c.dateStart&&c.dateEnd?c.selectedTemplate?null!=SELECTION_TEMPLATES_CUSTOM&&null!=SELECTION_TEMPLATES_CUSTOM[c.selectedTemplate]?SELECTION_TEMPLATES_CUSTOM[c.selectedTemplate].name:u[c.selectedTemplate]:0===a(c.dateStart,c.dateEnd)?l("date")(c.dateStart,"dd MMM yyyy"):l("date")(c.dateStart,"dd"+(c.dateStart.getMonth()!==c.dateEnd.getMonth()||c.dateStart.getFullYear()!==c.dateEnd.getFullYear()?" MMM":"")+(c.dateStart.getFullYear()!==c.dateEnd.getFullYear()?" yyyy":""))+" - "+l("date")(c.dateEnd,"dd MMM yyyy"):""},c.focusToDate=function(e){var t=new Date(e.getFullYear(),e.getMonth()+1,1);c.activeDate=e,c.activeMonth=e.getMonth(),c.activeYear=e.getFullYear(),c.activeDate2=t,c.activeMonth2=t.getMonth(),c.activeYear2=t.getFullYear(),c.dates=n(e),c.dates2=n(t)},c.handleClickNextMonth=function(e){var t=new Date(c.activeDate.getFullYear(),c.activeDate.getMonth()+1,1);c.focusToDate(t)},c.handleClickPrevMonth=function(e){var t=new Date(c.activeDate.getFullYear(),c.activeDate.getMonth()-1,1);c.focusToDate(t)},c.handleClickSelectToday=function(){var e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate());c.dateStart=t,c.dateEnd=t,c.selectedTemplate="TD",c.selectedTemplateName=c.selectedDateText()},c.handleClickSelectYesterday=function(){var e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate()-1);c.dateStart=t,c.dateEnd=t,c.selectedTemplate="YD",c.selectedTemplateName=c.selectedDateText()},c.handleClickSelectThisWeek=function(){var e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate()),n=new Date(t.getFullYear(),t.getMonth(),t.getDate()-(t.getDay()-d())),r=new Date(t.getFullYear(),t.getMonth(),t.getDate()+(6-t.getDay()+d()));c.dateStart=n,c.dateEnd=r,c.selectedTemplate="TW",c.selectedTemplateName=c.selectedDateText()},c.handleClickSelectLastWeek=function(){var e=new Date,t=new Date(e.getFullYear(),e.getMonth(),e.getDate()-7),n=new Date(t.getFullYear(),t.getMonth(),t.getDate()-(t.getDay()-d())),r=new Date(t.getFullYear(),t.getMonth(),t.getDate()+(6-t.getDay()+d()));c.dateStart=n,c.dateEnd=r,c.selectedTemplate="LW",c.selectedTemplateName=c.selectedDateText()},c.handleClickSelectThisMonth=function(){var e=new Date,t=new Date(e.getFullYear(),e.getMonth(),1),n=new Date(e.getFullYear(),e.getMonth()+1,0);c.dateStart=t,c.dateEnd=n,c.selectedTemplate="TM",c.selectedTemplateName=c.selectedDateText()},c.handleClickSelectLastMonth=function(){var e=new Date,t=new Date(e.getFullYear(),e.getMonth(),0),n=new Date(t.getFullYear(),t.getMonth(),1),r=new Date(t.getFullYear(),t.getMonth()+1,0);c.dateStart=n,c.dateEnd=r,c.selectedTemplate="LM",c.selectedTemplateName=c.selectedDateText()},c.handleClickSelectThisYear=function(){var e=new Date,t=new Date(e.getFullYear(),0,1),n=new Date(e.getFullYear(),11,31);c.dateStart=t,c.dateEnd=n,c.selectedTemplate="TY",c.selectedTemplateName=c.selectedDateText()},c.handleClickSelectLastYear=function(){var e=new Date,t=new Date(e.getFullYear()-1,0,1),n=new Date(e.getFullYear()-1,11,31);c.dateStart=t,c.dateEnd=n,c.selectedTemplate="LY",c.selectedTemplateName=c.selectedDateText()},c.getLocalizationVal=f,c.selectCustomRange=function(e,t){c.dateStart=t.dateStart,c.dateEnd=t.dateEnd,c.selectedTemplate=e,c.selectedTemplateName=c.selectedDateText()},c.isInMaxRange=function(e){if(!c.dateStart)return!0;if(0!==a(c.dateStart,c.dateEnd))return!0;var t=a(c.dateStart,e);return c.maxRange&&Math.abs(Math.ceil(t/864e5))+1<=c.maxRange||!c.maxRange},c.selectionTemplate={},function(){var e,t=0;if(null!=c.customTemplates)for(var n=0;n<c.customTemplates.length;n++)e=c.customTemplates[n],SELECTION_TEMPLATES_CUSTOM[e.name]=e;if(c.selectedTemplate){switch(c.selectedTemplate){case"TD":c.handleClickSelectToday();break;case"YD":c.handleClickSelectYesterday();break;case"TW":c.handleClickSelectThisWeek();break;case"LW":c.handleClickSelectLastWeek();break;case"TM":c.handleClickSelectThisMonth();break;case"LM":c.handleClickSelectLastMonth();break;case"TY":c.handleClickSelectThisYear();break;case"LY":c.handleClickSelectLastYear();break;default:SELECTION_TEMPLATES_CUSTOM&&SELECTION_TEMPLATES_CUSTOM[c.selectedTemplate]&&SELECTION_TEMPLATES_CUSTOM[c.selectedTemplate].dateStart&&SELECTION_TEMPLATES_CUSTOM[c.selectedTemplate].dateEnd&&(c.dateStart=SELECTION_TEMPLATES_CUSTOM[c.selectedTemplate].dateStart,c.dateEnd=SELECTION_TEMPLATES_CUSTOM[c.selectedTemplate].dateEnd),c.selectedTemplateName=c.selectedDateText()}c.updateActiveDate()}else c.selectedTemplate="",c.selectedTemplateName=c.selectedDateText(),c.updateActiveDate();c.$watch("selectedTemplate",function(e,t){e===t||!c.dateStart||c.inCurrentMonth(c.dateStart)||c.inCurrentMonth(c.dateStart,!0)||c.focusToDate(c.dateStart)}),c.$watch("dateStart",function(e,t){e===t||!c.dateStart||c.inCurrentMonth(c.dateStart)||c.inCurrentMonth(c.dateStart,!0)||c.focusToDate(c.dateStart)});var r=new Date(2017,0,1);for(c.days=[],t=0;t<7;t++)r.setDate(t+1+d()),c.days.push({id:t,name:f(l("date")(r,"EEE"))});var i=null;for(c.months=[],t=0;t<12;t++)i=new Date(2017,t,1),c.months.push({id:t,name:f(l("date")(i,"MMMM"))});var a=c.activeYear,o=0;for(c.years=[],o=a-10;o<a+10;o++)c.years.push({id:o,name:f(o)});for(var s in u)u.hasOwnProperty(s)&&(null!=c.disableTemplates&&""!=c.disableTemplates?c.disableTemplates.indexOf(s)<0&&(c.selectionTemplate[s]=u[s]):c.selectionTemplate[s]=u[s])}()}function i(r){this.show=function(e){return r.show({locals:{mdDateRangePickerServiceModel:t.copy(e.model),mdDateRangePickerServiceConfig:t.copy(e)},controller:["$scope","mdDateRangePickerServiceModel","mdDateRangePickerServiceConfig",function(t,e,n){t.model=e||{},t.config=n||{},t.model.selectedTemplateName=t.model.selectedTemplateName||"",t.ok=function(){t.model.dateStart&&t.model.dateStart.setHours(0,0,0,0),t.model.dateEnd&&t.model.dateEnd.setHours(23,59,59,999),r.hide(t.model)},t.cancel=function(){r.cancel()},t.clear=function(){t.model.selectedTemplateName="",t.model.selectedTemplate=null,t.model.dateStart=null,t.model.dateEnd=null},t.handleOnSelect=function(e){"function"==typeof t.config.mdOnSelect&&t.config.mdOnSelect(e),t.config.autoConfirm&&t.ok()},t.getLocalizationVal=function(e){return t.model&&null!=t.model.localizationMap&&null!=t.model.localizationMap[e]?t.model.localizationMap[e]:e},t.model.customTemplates&&console.warn("model.customTemplates will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({customTemplates}) instead"),t.model.localizationMap&&console.warn("model.localizationMap will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({localizationMap}) instead"),t.model.firstDayOfWeek&&console.warn("model.firstDayOfWeek will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({firstDayOfWeek}) instead"),t.model.showTemplate&&console.warn("model.showTemplate will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({showTemplate}) instead"),t.model.maxRange&&console.warn("model.maxRange will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({maxRange}) instead"),t.model.onePanel&&console.warn("model.onePanel will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({onePanel}) instead"),t.model.isDisabledDate&&console.warn("model.isDisabledDate({ $date: $date }) will be removed from model on next rlease, please use root config e.g. $mdDateRangePicker.show({isDisabledDate:($date)=>{}}) instead")}],template:['<md-dialog aria-label="Date Range Picker">','<md-toolbar class="md-primary" layout="row" layout-align="start center">','<md-button aria-label="Date Range Picker" class="md-icon-button" aria-hidden="true" ng-disabled="true">','<md-icon md-svg-icon="data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjRkZGRkZGIiBoZWlnaHQ9IjI0IiB2aWV3Qm94PSIwIDAgMjQgMjQiIHdpZHRoPSIyNCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KICAgIDxwYXRoIGQ9Ik05IDExSDd2Mmgydi0yem00IDBoLTJ2Mmgydi0yem00IDBoLTJ2Mmgydi0yem0yLTdoLTFWMmgtMnYySDhWMkg2djJINWMtMS4xMSAwLTEuOTkuOS0xLjk5IDJMMyAyMGMwIDEuMS44OSAyIDIgMmgxNGMxLjEgMCAyLS45IDItMlY2YzAtMS4xLS45LTItMi0yem0wIDE2SDVWOWgxNHYxMXoiLz4KICAgIDxwYXRoIGQ9Ik0wIDBoMjR2MjRIMHoiIGZpbGw9Im5vbmUiLz4KPC9zdmc+"></md-icon>',"</md-button>",'<span md-truncate class="md-toolbar-tools">{{model.selectedTemplateName}}</span>',"</md-toolbar>","<md-dialog-content>","<md-date-range-picker ",'date-start="model.dateStart" ','date-end="model.dateEnd" ','show-template="config.showTemplate || model.showTemplate" ','selected-template="model.selectedTemplate" ','selected-template-name="model.selectedTemplateName" ','first-day-of-week="config.firstDayOfWeek || model.firstDayOfWeek" ','localization-map="config.localizationMap || model.localizationMap" ','custom-templates="config.customTemplates || model.customTemplates" ','format="config.format" ','disable-templates="{{model.disableTemplates}}" ','md-on-select="handleOnSelect($dates)" ','is-disabled-date="config.isDisabledDate ? config.isDisabledDate($date) : model.isDisabledDate({ $date: $date })" ','max-range="config.maxRange || model.maxRange" ','one-panel="config.onePanel || model.onePanel" ',">","</md-date-range-picker>","</md-dialog-content>",'<md-dialog-actions layout="row" layout-align="end center">','<md-button ng-click="cancel()">{{getLocalizationVal("Cancel")}}</md-button>','<md-button ng-if="!config.autoConfirm" class="md-raised" ng-click="clear()">{{getLocalizationVal("Clear")}}</md-button>','<md-button ng-if="!config.autoConfirm" class="md-raised md-primary" ng-click="ok()">{{getLocalizationVal("Ok")}}</md-button>',"</md-dialog-actions>","</md-dialog>"].join(""),parent:t.element(document.body),multiple:e.multiple,targetEvent:e.targetEvent||document.body,clickOutsideToClose:!0,fullscreen:e.model.fullscreen})},this.getSelectedDate=function(e,t,n,r){var i=[],a=t.getTime(),o=e,s=0,c=e.getFullYear(),l=e.getMonth(),u=e.getDate();for(;o.getTime()<=a&&(n&&!n({$date:o})&&i.push(o),s++,o=new Date(c,l,u+s),!((r||1e4)<s)););return i}}t.module("ngMaterialDateRangePicker",["ngMaterial"]).directive("mdDateRangePicker",n).directive("mdDateRange",function(){return{scope:{ngModel:"=ngModel",autoConfirm:"=autoConfirm",ngDisabled:"=ngDisabled",showTemplate:"=",placeholder:"@",isDisabledDate:"&",localizationMap:"=?",customTemplates:"=?",disableTemplates:"@",mdOnSelect:"&",onePanel:"=?",format:"=?",maxRange:"=?",firstDayOfWeek:"=?"},template:['<md-menu ng-disabled="ngDisabled">','<span class="md-select-value" ng-click="!ngDisabled && (($mdMenu && $mdMenu.open) ? $mdMenu.open($event) : $mdOpenMenu($event))">',"  <span>{{ngModel.selectedTemplateName || placeholder}}</span>",'  <span class="md-select-icon" aria-hidden="true"></span>',"</span>",'<md-menu-content class="md-custom-menu-content" style="max-height: none!important; height: auto!important; padding: 0!important;">','    <span style="text-align: left; padding: 12px 20px 0 20px" disabled>{{ngModel.selectedTemplateName || placeholder}}</span>','    <md-date-range-picker first-day-of-week="firstDayOfWeek" ','     md-on-select="autoConfirm && ok($dates)" ','     date-start="ngModel.dateStart" ','     date-end="ngModel.dateEnd" ','     selected-template="ngModel.selectedTemplate" ','     show-template="showTemplate" ','     localization-map="localizationMap" ','     custom-templates="customTemplates" ','     disable-templates="{{disableTemplates}}" ','     is-disabled-date="isDisabledDate({ $date: $date })" ','     max-range="maxRange" ','     one-panel="onePanel" ','     format="format" ','     selected-template-name="ngModel.selectedTemplateName"></md-date-range-picker>','<p ng-if="!autoConfirm" layout="row" layout-align="end center">','<md-button ng-if="ngModel.showClear" class="md-raised" ng-click="clear()">{{getLocalizationVal("Clear")}}</md-button>','<md-button class="md-raised md-primary" ng-click="ok()">{{getLocalizationVal("Ok")}}</md-button>',"</p>","</md-menu-content>","</md-menu>"].join(""),controller:["$scope","$mdMenu",function(t,n){t.ok=function(e){t.mdOnSelect({$dates:e}),n.hide()},t.clear=function(){t.ngModel.selectedTemplateName="",t.ngModel.selectedTemplate=null,t.ngModel.dateStart=null,t.ngModel.dateEnd=null},t.getLocalizationVal=function(e){return t.ngModel&&null!=t.ngModel.localizationMap&&null!=t.ngModel.localizationMap[e]?t.ngModel.localizationMap[e]:e}}]}}).controller("mdDateRangePickerCtrl",r).service("$mdDateRangePicker",i),n.$inject=["$mdDateRangePicker"],r.$inject=["$scope","$filter"],i.$inject=["$mdDialog"]}(window,angular),function(){var e,t="Fake/5.0 (FakeOS) AppleWebKit/123 (KHTML, like Gecko) Fake/12.3.4567.89 Fake/123.45";if(b="object"==typeof process&&"object"==typeof process.versions&&process.versions.node&&!process.browser){var n=process.versions.node.toString().replace("v","");t="Nodejs/"+n+" (NodeOS) AppleWebKit/"+n+" (KHTML, like Gecko) Nodejs/"+n+" Nodejs/"+n}e="undefined"!=typeof global?global:window,"undefined"==typeof window&&("undefined"==typeof window&&"undefined"!=typeof global&&(global.navigator={userAgent:t,getUserMedia:function(){}},e.window=global),"undefined"==typeof location&&(e.location={protocol:"file:",href:"",hash:""}),"undefined"==typeof screen&&(e.screen={width:0,height:0}));var s=window.navigator;void 0!==s?(void 0!==s.webkitGetUserMedia&&(s.getUserMedia=s.webkitGetUserMedia),void 0!==s.mozGetUserMedia&&(s.getUserMedia=s.mozGetUserMedia)):s={getUserMedia:function(){},userAgent:t};var r=!!/Android|webOS|iPhone|iPad|iPod|BB10|BlackBerry|IEMobile|Opera Mini|Mobile|mobile/i.test(s.userAgent||""),c=!(-1===s.userAgent.indexOf("Edge")||!s.msSaveOrOpenBlob&&!s.msSaveBlob),l=!!window.opera||0<=s.userAgent.indexOf(" OPR/"),u=-1<s.userAgent.toLowerCase().indexOf("firefox")&&"netscape"in window&&/ rv:/.test(s.userAgent),f=/^((?!chrome|android).)*safari/i.test(s.userAgent),d=!!window.chrome&&!l,h="undefined"!=typeof document&&!!document.documentMode&&!c;function i(e,t){var n=0,r=!1,i=window.setInterval(function(){e()&&(window.clearInterval(i),t(r)),50<n++&&(window.clearInterval(i),t(r=!0))},10)}var a={Android:function(){return s.userAgent.match(/Android/i)},BlackBerry:function(){return s.userAgent.match(/BlackBerry|BB10/i)},iOS:function(){return s.userAgent.match(/iPhone|iPad|iPod/i)},Opera:function(){return s.userAgent.match(/Opera Mini/i)},Windows:function(){return s.userAgent.match(/IEMobile/i)},any:function(){return a.Android()||a.BlackBerry()||a.iOS()||a.Opera()||a.Windows()},getOsName:function(){var e="Unknown OS";return a.Android()&&(e="Android"),a.BlackBerry()&&(e="BlackBerry"),a.iOS()&&(e="iOS"),a.Opera()&&(e="Opera Mini"),a.Windows()&&(e="Windows"),e}};var o="Unknown OS",p="Unknown OS Version";var m,g,_=function(){for(var e,t=s.appVersion,n=s.userAgent,r="-",i=[{s:"Chrome OS",r:/CrOS/},{s:"Windows 10",r:/(Windows 10.0|Windows NT 10.0)/},{s:"Windows 8.1",r:/(Windows 8.1|Windows NT 6.3)/},{s:"Windows 8",r:/(Windows 8|Windows NT 6.2)/},{s:"Windows 7",r:/(Windows 7|Windows NT 6.1)/},{s:"Windows Vista",r:/Windows NT 6.0/},{s:"Windows Server 2003",r:/Windows NT 5.2/},{s:"Windows XP",r:/(Windows NT 5.1|Windows XP)/},{s:"Windows 2000",r:/(Windows NT 5.0|Windows 2000)/},{s:"Windows ME",r:/(Win 9x 4.90|Windows ME)/},{s:"Windows 98",r:/(Windows 98|Win98)/},{s:"Windows 95",r:/(Windows 95|Win95|Windows_95)/},{s:"Windows NT 4.0",r:/(Windows NT 4.0|WinNT4.0|WinNT|Windows NT)/},{s:"Windows CE",r:/Windows CE/},{s:"Windows 3.11",r:/Win16/},{s:"Android",r:/Android/},{s:"Open BSD",r:/OpenBSD/},{s:"Sun OS",r:/SunOS/},{s:"Linux",r:/(Linux|X11)/},{s:"iOS",r:/(iPhone|iPad|iPod)/},{s:"Mac OS X",r:/Mac OS X/},{s:"Mac OS",r:/(MacPPC|MacIntel|Mac_PowerPC|Macintosh)/},{s:"QNX",r:/QNX/},{s:"UNIX",r:/UNIX/},{s:"BeOS",r:/BeOS/},{s:"OS/2",r:/OS\/2/},{s:"Search Bot",r:/(nuhk|Googlebot|Yammybot|Openbot|Slurp|MSNBot|Ask Jeeves\/Teoma|ia_archiver)/}],a=0;e=i[a];a++)if(e.r.test(n)){r=e.s;break}var o="-";switch(/Windows/.test(r)&&(/Windows (.*)/.test(r)&&(o=/Windows (.*)/.exec(r)[1]),r="Windows"),r){case"Mac OS X":/Mac OS X (10[\.\_\d]+)/.test(n)&&(o=/Mac OS X (10[\.\_\d]+)/.exec(n)[1]);break;case"Android":/Android ([\.\_\d]+)/.test(n)&&(o=/Android ([\.\_\d]+)/.exec(n)[1]);break;case"iOS":/OS (\d+)_(\d+)_?(\d+)?/.test(n)&&(o=(o=/OS (\d+)_(\d+)_?(\d+)?/.exec(t))[1]+"."+o[2]+"."+(0|o[3]))}return{osName:r,osVersion:o}}();_&&_.osName&&"-"!=_.osName?(o=_.osName,p=_.osVersion):a.any()&&"Android"==(o=a.getOsName())&&(p=!!(g=(m=(m||s.userAgent).toLowerCase()).match(/android\s([0-9\.]*)/))&&g[1]);var b="object"==typeof process&&"object"==typeof process.versions&&process.versions.node;"Unknown OS"===o&&b&&(o="Nodejs",p=process.versions.node.toString().replace("v",""));var v=!1,y=!1;["captureStream","mozCaptureStream","webkitCaptureStream"].forEach(function(e){"undefined"!=typeof document&&"function"==typeof document.createElement&&(!v&&e in document.createElement("canvas")&&(v=!0),!y&&e in document.createElement("video")&&(y=!0))});var w=/^(192\.168\.|169\.254\.|10\.|172\.(1[6-9]|2\d|3[01]))/,C=/([0-9]{1,3}(\.[0-9]{1,3}){3})/,A=/[a-f0-9]{1,4}(:[a-f0-9]{1,4}){7}/;var S=[],T=[],x=[],k=[];s.mediaDevices&&s.mediaDevices.enumerateDevices&&(s.enumerateDevices=function(e){var t=s.mediaDevices.enumerateDevices();t&&t.then?s.mediaDevices.enumerateDevices().then(e).catch(function(){e([])}):e([])});var E=!1;"undefined"!=typeof MediaStreamTrack&&"getSources"in MediaStreamTrack?E=!0:s.mediaDevices&&s.mediaDevices.enumerateDevices&&(E=!0);var D=!1,I=!1,P=!1,M=!1,$=!1;function O(t){if(E)if(!s.enumerateDevices&&window.MediaStreamTrack&&window.MediaStreamTrack.getSources&&(s.enumerateDevices=window.MediaStreamTrack.getSources.bind(window.MediaStreamTrack)),!s.enumerateDevices&&s.enumerateDevices&&(s.enumerateDevices=s.enumerateDevices.bind(s)),s.enumerateDevices){S=[],T=[],x=[],$=M=P=I=D=!(k=[]);var r={};s.enumerateDevices(function(e){S=[],T=[],x=[],k=[],e.forEach(function(e){var t={};for(var n in e)try{"function"!=typeof e[n]&&(t[n]=e[n])}catch(e){}r[t.deviceId+t.label+t.kind]||("audio"===t.kind&&(t.kind="audioinput"),"video"===t.kind&&(t.kind="videoinput"),t.deviceId||(t.deviceId=t.id),t.id||(t.id=t.deviceId),t.label?("videoinput"!==t.kind||$||($=!0),"audioinput"!==t.kind||M||(M=!0)):(t.isCustomLabel=!0,"videoinput"===t.kind?t.label="Camera "+(k.length+1):"audioinput"===t.kind?t.label="Microphone "+(T.length+1):"audiooutput"===t.kind?t.label="Speaker "+(x.length+1):t.label="Please invoke getUserMedia once.",void 0!==R&&R.browser.isChrome&&46<=R.browser.version&&!/^(https:|chrome-extension:)$/g.test(location.protocol||"")&&"undefined"!=typeof document&&"string"==typeof document.domain&&document.domain.search&&-1===document.domain.search(/localhost|127.0./g)&&(t.label="HTTPs is required to get label of this "+t.kind+" device.")),"audioinput"===t.kind&&(D=!0,-1===T.indexOf(t)&&T.push(t)),"audiooutput"===t.kind&&(I=!0,-1===x.indexOf(t)&&x.push(t)),"videoinput"===t.kind&&(P=!0,-1===k.indexOf(t)&&k.push(t)),S.push(t),r[t.deviceId+t.label+t.kind]=t)}),void 0!==R&&(R.MediaDevices=S,R.hasMicrophone=D,R.hasSpeakers=I,R.hasWebcam=P,R.isWebsiteHasWebcamPermissions=$,R.isWebsiteHasMicrophonePermissions=M,R.audioInputDevices=T,R.audioOutputDevices=x,R.videoInputDevices=k),t&&t()})}else t&&t();else t&&t()}var R=window.DetectRTC||{};R.browser=function(){s.appVersion;var e,t,n,r=s.userAgent,i=s.appName,a=""+parseFloat(s.appVersion),o=parseInt(s.appVersion,10);if(l){i="Opera";try{o=(a=s.userAgent.split("OPR/")[1].split(" ")[0]).split(".")[0]}catch(e){a="0.0.0.0",o=0}}else h?(a=0<(t=r.indexOf("rv:"))?r.substring(t+3):(t=r.indexOf("MSIE"),r.substring(t+5)),i="IE"):d?(t=r.indexOf("Chrome"),i="Chrome",a=r.substring(t+7)):f?-1!==r.indexOf("CriOS")?(t=r.indexOf("CriOS"),i="Chrome",a=r.substring(t+6)):-1!==r.indexOf("FxiOS")?(t=r.indexOf("FxiOS"),i="Firefox",a=r.substring(t+6)):(t=r.indexOf("Safari"),i="Safari",a=r.substring(t+7),-1!==(t=r.indexOf("Version"))&&(a=r.substring(t+8)),-1!==s.userAgent.indexOf("Version/")&&(a=s.userAgent.split("Version/")[1].split(" ")[0])):u?(t=r.indexOf("Firefox"),i="Firefox",a=r.substring(t+8)):(e=r.lastIndexOf(" ")+1)<(t=r.lastIndexOf("/"))&&(i=r.substring(e,t),a=r.substring(t+1),i.toLowerCase()===i.toUpperCase()&&(i=s.appName));return c&&(i="Edge",a=s.userAgent.split("Edge/")[1]),-1!==(n=a.search(/[; \)]/))&&(a=a.substring(0,n)),o=parseInt(""+a,10),isNaN(o)&&(a=""+parseFloat(s.appVersion),o=parseInt(s.appVersion,10)),{fullVersion:a,version:o,name:i,isPrivateBrowsing:!1}}(),function(t){var n;try{if(window.webkitRequestFileSystem)window.webkitRequestFileSystem(window.TEMPORARY,1,function(){n=!1},function(e){n=!0});else if(window.indexedDB&&/Firefox/.test(window.navigator.userAgent)){var r;try{(r=window.indexedDB.open("test")).onerror=function(){return!0}}catch(e){n=!0}void 0===n&&i(function(){return"done"===r.readyState},function(e){e||(n=!r.result)})}else if(function(e){var t=e.toLowerCase();if(0===t.indexOf("msie")&&0===t.indexOf("trident"))return!1;var n=/(?:msie|rv:)\s?([\d\.]+)/.exec(t);return!!(n&&10<=parseInt(n[1],10))}(window.navigator.userAgent)){n=!1;try{window.indexedDB||(n=!0)}catch(e){n=!0}}else if(window.localStorage&&/Safari/.test(window.navigator.userAgent)){try{window.localStorage.setItem("test",1)}catch(e){n=!0}void 0===n&&(n=!1,window.localStorage.removeItem("test"))}}catch(e){n=!1}i(function(){return void 0!==n},function(e){t(n)})}(function(e){R.browser.isPrivateBrowsing=!!e}),R.browser["is"+R.browser.name]=!0,R.osName=o,R.osVersion=p;"object"==typeof process&&"object"==typeof process.versions&&process.versions["node-webkit"];var N=!1;["RTCPeerConnection","webkitRTCPeerConnection","mozRTCPeerConnection","RTCIceGatherer"].forEach(function(e){N||e in window&&(N=!0)}),R.isWebRTCSupported=N,R.isORTCSupported="undefined"!=typeof RTCIceGatherer;var L=!1;(R.browser.isChrome&&35<=R.browser.version?L=!0:R.browser.isFirefox&&34<=R.browser.version?L=!0:R.browser.isEdge&&17<=R.browser.version?L=!0:"Android"===R.osName&&R.browser.isChrome&&(L=!0),(s.getDisplayMedia||s.mediaDevices&&s.mediaDevices.getDisplayMedia)&&(L=!0),/^(https:|chrome-extension:)$/g.test(location.protocol||""))||("undefined"!=typeof document&&"string"==typeof document.domain&&document.domain.search&&-1===document.domain.search(/localhost|127.0./g)&&(R.browser.isChrome||R.browser.isEdge||R.browser.isOpera)?L=!1:R.browser.isFirefox&&(L=!1));R.isScreenCapturingSupported=L;var F={isSupported:!1,isCreateMediaStreamSourceSupported:!1};["AudioContext","webkitAudioContext","mozAudioContext","msAudioContext"].forEach(function(e){F.isSupported||e in window&&(F.isSupported=!0,window[e]&&"createMediaStreamSource"in window[e].prototype&&(F.isCreateMediaStreamSourceSupported=!0))}),R.isAudioContextSupported=F.isSupported,R.isCreateMediaStreamSourceSupported=F.isCreateMediaStreamSourceSupported;var G=!1;R.browser.isChrome&&31<R.browser.version&&(G=!0),R.isRtpDataChannelsSupported=G;var j=!1;R.browser.isFirefox&&28<R.browser.version?j=!0:R.browser.isChrome&&25<R.browser.version?j=!0:R.browser.isOpera&&11<=R.browser.version&&(j=!0),R.isSctpDataChannelsSupported=j,R.isMobileDevice=r;var B=!1;s.getUserMedia?B=!0:s.mediaDevices&&s.mediaDevices.getUserMedia&&(B=!0),R.browser.isChrome&&46<=R.browser.version&&!/^(https:|chrome-extension:)$/g.test(location.protocol||"")&&"undefined"!=typeof document&&"string"==typeof document.domain&&document.domain.search&&-1===document.domain.search(/localhost|127.0./g)&&(B="Requires HTTPs"),"Nodejs"===R.osName&&(B=!1),R.isGetUserMediaSupported=B;var U,H,W,q="";screen.width&&(q+=(screen.width?screen.width:"")+" x "+(screen.height?screen.height:""));R.displayResolution=q,R.displayAspectRatio=(U=screen.width,H=screen.height,W=function e(t,n){return 0==n?t:e(n,t%n)}(U,H),U/W/(H/W)).toFixed(2),R.isCanvasSupportsStreamCapturing=v,R.isVideoSupportsStreamCapturing=y,"Chrome"==R.browser.name&&53<=R.browser.version&&(R.isCanvasSupportsStreamCapturing||(R.isCanvasSupportsStreamCapturing="Requires chrome flag: enable-experimental-web-platform-features"),R.isVideoSupportsStreamCapturing||(R.isVideoSupportsStreamCapturing="Requires chrome flag: enable-experimental-web-platform-features")),R.DetectLocalIPAddress=function(t,e){if(R.isWebRTCSupported){var n=!0,r=!0;!function(i,e){if("undefined"!=typeof document&&"function"==typeof document.getElementById){var a={},t=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection;if(!t){var n=document.getElementById("iframe");if(!n)return;var r=n.contentWindow;t=r.RTCPeerConnection||r.mozRTCPeerConnection||r.webkitRTCPeerConnection}if(t){var o=null;"Chrome"===R.browser&&R.browser.version<58&&(o={optional:[{RtpDataChannels:!0}]});var s=new t({iceServers:[{urls:"stun:stun.l.google.com:19302"}]},o);if(e&&(s.addStream?s.addStream(e):s.addTrack&&e.getTracks()[0]&&s.addTrack(e.getTracks()[0],e)),s.onicecandidate=function(e){e.candidate&&e.candidate.candidate?c(e.candidate.candidate):c()},!e)try{s.createDataChannel("sctp",{})}catch(e){}R.isPromisesSupported?s.createOffer().then(function(e){s.setLocalDescription(e).then(l)}):s.createOffer(function(e){s.setLocalDescription(e,l,function(){})},function(){})}}function c(e){if(e){var t=C.exec(e);if(t){var n=t[1],r=e.match(w);void 0===a[n]&&i(n,r,!0),a[n]=!0}}else i()}function l(){var e=s.localDescription.sdp.split("\n");e.forEach(function(e){e&&0===e.indexOf("a=candidate:")&&c(e)})}}(function(e){e?e.match(w)?t("Local: "+e,n=!1,r):e.match(A)?t("Public: "+e,n,r=!1):t("Public: "+e,n,r):t()},e)}},R.isWebSocketsSupported="WebSocket"in window&&2===window.WebSocket.CLOSING,R.isWebSocketsBlocked=!R.isWebSocketsSupported,"Nodejs"===R.osName&&(R.isWebSocketsSupported=!0,R.isWebSocketsBlocked=!1),R.checkWebSocketsSupport=function(t){t=t||function(){};try{var e,n=new WebSocket("wss://echo.websocket.org:443/");n.onopen=function(){R.isWebSocketsBlocked=!1,e=(new Date).getTime(),n.send("ping")},n.onmessage=function(){R.WebsocketLatency=(new Date).getTime()-e+"ms",t(),n.close(),n=null},n.onerror=function(){R.isWebSocketsBlocked=!0,t()}}catch(e){R.isWebSocketsBlocked=!0,t()}},R.load=function(e){O(e=e||function(){})},R.MediaDevices=void 0!==S?S:[],R.hasMicrophone=D,R.hasSpeakers=I,R.hasWebcam=P,R.isWebsiteHasWebcamPermissions=$,R.isWebsiteHasMicrophonePermissions=M,R.audioInputDevices=T,R.audioOutputDevices=x,R.videoInputDevices=k;var z=!1;"undefined"!=typeof document&&"function"==typeof document.createElement&&"setSinkId"in document.createElement("video")&&(z=!0),R.isSetSinkIdSupported=z;var V=!1;R.browser.isFirefox&&"undefined"!=typeof mozRTCPeerConnection?"getSenders"in mozRTCPeerConnection.prototype&&(V=!0):R.browser.isChrome&&"undefined"!=typeof webkitRTCPeerConnection&&"getSenders"in webkitRTCPeerConnection.prototype&&(V=!0),R.isRTPSenderReplaceTracksSupported=V;var Y=!1;R.browser.isFirefox&&38<R.browser.version&&(Y=!0),R.isRemoteStreamProcessingSupported=Y;var K=!1;"undefined"!=typeof MediaStreamTrack&&"applyConstraints"in MediaStreamTrack.prototype&&(K=!0),R.isApplyConstraintsSupported=K;var Q=!1;R.browser.isFirefox&&43<=R.browser.version&&(Q=!0),R.isMultiMonitorScreenCapturingSupported=Q,R.isPromisesSupported=!!("Promise"in window),R.version="1.4.0",void 0===R&&(window.DetectRTC={});var X=window.MediaStream;void 0===X&&"undefined"!=typeof webkitMediaStream&&(X=webkitMediaStream),R.MediaStream=void 0!==X&&"function"==typeof X&&Object.keys(X.prototype),"undefined"!=typeof MediaStreamTrack?R.MediaStreamTrack=Object.keys(MediaStreamTrack.prototype):R.MediaStreamTrack=!1;var Z=window.RTCPeerConnection||window.mozRTCPeerConnection||window.webkitRTCPeerConnection;R.RTCPeerConnection=void 0!==Z&&Object.keys(Z.prototype),window.DetectRTC=R,"undefined"!=typeof module&&(module.exports=R),"function"==typeof define&&define.amd&&define("DetectRTC",[],function(){return R})}(),function(e,t){"use strict";"undefined"!=typeof module&&module.exports?module.exports=t(require("angular")):"function"==typeof define&&define.amd?define(["angular"],t):t(e.angular)}(window,function(e){"use strict";e.module("angucomplete-alt",[]).directive("angucompleteAlt",["$q","$parse","$http","$sce","$timeout","$templateCache","$interpolate",function(U,e,H,W,q,t,i){var n="/angucomplete-alt/index.html";function a(c,e,t,n){var r,a,i,o,l,s,u=e.find("input"),f=3,d=null,h="autocomplete-required",p=null,m=null,g=!1,_=e[0].querySelector(".angucomplete-dropdown"),b=!1,v=null;function y(e,t){e&&("object"==typeof e?(c.searchStr=S(e),A({originalObject:e})):"string"==typeof e&&0<e.length?c.searchStr=e:console&&console.error&&console.error("Tried to set "+(t?"initial":"")+" value of angucomplete to",e,"which is an invalid value"),k(!0))}function w(e){v=null,c.hideResults(e),document.body.removeEventListener("click",w)}function C(e){return e.which?e.which:e.keyCode}function A(e){"function"==typeof c.selectedObject?c.selectedObject(e,c.selectedObjectData):c.selectedObject=e,k(!!e)}function S(t){return c.titleField.split(",").map(function(e){return T(t,e)}).join(" ")}function T(e,t){var n,r;if(t){n=t.split("."),r=e;for(var i=0;i<n.length;i++)r=r[n[i]]}else r=e;return r}function x(e,t){var n,r,i;if(i=new RegExp(t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"i"),e)return e.match&&e.replace||(e=e.toString()),n=(r=e.match(i))?e.replace(i,'<span class="'+c.matchClass+'">'+r[0]+"</span>"):e,W.trustAsHtml(n)}function k(e){c.notEmpty=e,p=c.searchStr,c.fieldRequired&&n&&c.inputName&&n[c.inputName].$setValidity(h,e)}function E(e){!c.overrideSuggestions||c.selectedObject&&c.selectedObject.originalObject===c.searchStr||(e&&e.preventDefault(),q.cancel(d),O(),A({originalObject:c.searchStr}),c.clearSelected&&(c.searchStr=null),L())}function D(){return e[0].querySelectorAll(".angucomplete-row")[c.currentIndex]}function I(e){_.scrollTop=_.scrollTop+e}function P(){if(!c.disableAutocomplete){var e=c.results[c.currentIndex];c.matchClass?u.val(S(e.originalObject)):u.val(e.title)}}function M(i){return function(e,t,n,r){t||n||r||!e.data||(e=e.data),c.searching=!1,j(T(a(e),c.remoteUrlDataField),i)}}function $(e,t,n,r){c.searching=g,t||n||r||(t=e.status),0!==t&&-1!==t&&(c.remoteUrlErrorCallback?c.remoteUrlErrorCallback(e,t,n,r):console&&console.error&&console.error("http error"))}function O(){m&&m.resolve()}function R(e){var t={},n=c.remoteUrl+encodeURIComponent(e);c.remoteUrlRequestFormatter&&(t={params:c.remoteUrlRequestFormatter(e)},n=c.remoteUrl),c.remoteUrlRequestWithCredentials&&(t.withCredentials=!0),O(),m=U.defer(),t.timeout=m.promise,g=!0,H.get(n,t).then(M(e)).catch($).finally(function(){g=!1})}function N(e){O(),m=U.defer(),c.remoteApiHandler(e,m.promise).then(M(e)).catch($)}function L(){c.showDropdown=!1,c.results=[],_&&(_.scrollTop=0)}function F(){c.showDropdown=o,c.currentIndex=c.focusFirst?0:-1,c.results=[]}function G(t){!t||t.length<f||(c.localData?c.$apply(function(){var e;e=void 0!==c.localSearch()?c.localSearch()(t,c.localData):function(e){var t,n,r,i,a=c.searchFields.split(","),o=[];for(void 0!==c.parseInput()&&(e=c.parseInput()(e)),t=0;t<c.localData.length;t++){for(n=!1,r=0;r<a.length;r++)i=T(c.localData[t],a[r])||"",n=n||0<=i.toString().toLowerCase().indexOf(e.toString().toLowerCase());n&&(o[o.length]=c.localData[t])}return o}(t),c.searching=!1,j(e,t)}):c.remoteApiHandler?N(t):R(t))}function j(e,t){var n,r,i,a,o,s;if(e&&0<e.length)for(c.results=[],n=0;n<e.length;n++)c.titleField&&""!==c.titleField&&(a=o=S(e[n])),r="",c.descriptionField&&(r=s=T(e[n],c.descriptionField)),i="",c.imageField&&(i=T(e[n],c.imageField)),c.matchClass&&(o=x(a,t),s=x(r,t)),c.results[c.results.length]={title:o,description:s,image:i,originalObject:e[n]};else c.results=[];c.autoMatch&&1===c.results.length&&function(e,t,n){if(!n)return!1;for(var r in t)if(t[r].toLowerCase()===n.toLowerCase())return c.selectResult(e),!0;return!1}(c.results[0],{title:a,desc:r||""},c.searchStr)?c.showDropdown=!1:0!==c.results.length||l?c.showDropdown=!0:c.showDropdown=!1}function B(){c.localData?(c.searching=!1,j(c.localData,"")):c.remoteApiHandler?(c.searching=!0,N("")):(c.searching=!0,R(""))}e.on("mousedown",function(e){e.target.id?(v=e.target.id)===c.id+"_dropdown"&&document.body.addEventListener("click",w):v=e.target.className}),c.currentIndex=c.focusFirst?0:null,c.searching=!1,i=c.$watch("initialValue",function(e){e&&(i(),y(e,!0))}),c.$watch("fieldRequired",function(e,t){e!==t&&(e?p&&-1!==c.currentIndex?k(!0):k(!1):n[c.inputName].$setValidity(h,!0))}),c.$on("angucomplete-alt:clearInput",function(e,t){t&&t!==c.id||(c.searchStr=null,A(),k(!1),L())}),c.$on("angucomplete-alt:changeInput",function(e,t,n){t&&t===c.id&&y(n)}),c.onFocusHandler=function(){c.focusIn&&c.focusIn(),0!==f||c.searchStr&&0!==c.searchStr.length||(c.currentIndex=c.focusFirst?0:c.currentIndex,c.showDropdown=!0,B())},c.hideResults=function(){v&&(v===c.id+"_dropdown"||0<=v.indexOf("angucomplete"))?v=null:(r=q(function(){L(),c.$apply(function(){c.searchStr&&0<c.searchStr.length&&u.val(c.searchStr)})},200),O(),c.focusOut&&c.focusOut(),c.overrideSuggestions&&c.searchStr&&0<c.searchStr.length&&-1===c.currentIndex&&E())},c.resetHideResults=function(){r&&q.cancel(r)},c.hoverRow=function(e){c.currentIndex=e},c.selectResult=function(e){c.matchClass&&(e.title=S(e.originalObject),e.description=T(e.originalObject,c.descriptionField)),c.clearSelected?c.searchStr=null:c.searchStr=e.title,A(e),L()},c.inputChangeHandler=function(e){return e.length<f?(O(),L()):0===e.length&&0===f&&B(),c.inputChanged&&(e=c.inputChanged(e)),e},c.fieldRequiredClass&&""!==c.fieldRequiredClass&&(h=c.fieldRequiredClass),c.minlength&&""!==c.minlength&&(f=parseInt(c.minlength,10)),c.pause||(c.pause=500),c.clearSelected||(c.clearSelected=!1),c.overrideSuggestions||(c.overrideSuggestions=!1),c.fieldRequired&&n&&(c.initialValue?k(!0):k(!1)),c.inputType=t.type?t.type:"text",c.textSearching=t.textSearching?t.textSearching:"Searching...",c.textNoResults=t.textNoResults?t.textNoResults:"No results found",o="false"!==c.textSearching,l="false"!==c.textNoResults,c.maxlength=t.maxlength?t.maxlength:524288,u.on("keydown",function(e){var t,n,r=C(e),i=null,a=null;13===r&&c.results?(0<=c.currentIndex&&c.currentIndex<c.results.length?(e.preventDefault(),c.selectResult(c.results[c.currentIndex])):(E(e),L()),c.$apply()):40===r&&c.results?(e.preventDefault(),c.currentIndex+1<c.results.length&&c.showDropdown&&(c.$apply(function(){c.currentIndex++,P()}),b&&(i=D(),_.getBoundingClientRect().top+parseInt(getComputedStyle(_).maxHeight,10)<i.getBoundingClientRect().bottom&&I((t=i,n=getComputedStyle(t),t.offsetHeight+parseInt(n.marginTop,10)+parseInt(n.marginBottom,10)))))):38===r&&c.results?(e.preventDefault(),1<=c.currentIndex?(c.$apply(function(){c.currentIndex--,P()}),b&&(a=D().getBoundingClientRect().top-(_.getBoundingClientRect().top+parseInt(getComputedStyle(_).paddingTop,10)))<0&&I(a-1)):0===c.currentIndex&&c.$apply(function(){c.currentIndex=-1,u.val(c.searchStr)})):9===r?c.results&&0<c.results.length&&c.showDropdown?-1===c.currentIndex&&c.overrideSuggestions?E():(-1===c.currentIndex&&(c.currentIndex=0),c.selectResult(c.results[c.currentIndex]),c.$digest()):c.searchStr&&0<c.searchStr.length&&E():27===r&&e.preventDefault()}),u.on("keyup compositionend",function(e){var t=C(e);if(37!==t&&39!==t)if(38===t||13===t)e.preventDefault();else if(40===t)e.preventDefault(),!c.showDropdown&&c.searchStr&&c.searchStr.length>=f&&(F(),c.searching=!0,G(c.searchStr));else if(27===t)L(),c.$apply(function(){u.val(c.searchStr)});else{if(0===f&&!c.searchStr)return;c.searchStr&&""!==c.searchStr?c.searchStr.length>=f&&(F(),d&&q.cancel(d),c.searching=!0,d=q(function(){G(c.searchStr)},c.pause)):c.showDropdown=!1,p&&p!==c.searchStr&&!c.clearSelected&&c.$apply(function(){A()})}}),s="remoteUrlResponseFormatter",a=function(e){return c[s]?c[s](e):e},q(function(){var e=getComputedStyle(_);b=e.maxHeight&&"auto"===e.overflowY})}return t.put(n,'<div class="angucomplete-holder" ng-class="{\'angucomplete-dropdown-visible\': showDropdown}">  <input id="{{id}}_value" name="{{inputName}}" tabindex="{{fieldTabindex}}" ng-class="{\'angucomplete-input-not-empty\': notEmpty}" ng-model="searchStr" ng-disabled="disableInput" type="{{inputType}}" placeholder="{{placeholder}}" maxlength="{{maxlength}}" ng-focus="onFocusHandler()" class="{{inputClass}}" ng-focus="resetHideResults()" ng-blur="hideResults($event)" autocapitalize="off" autocorrect="off" autocomplete="off" ng-change="inputChangeHandler(searchStr)"/>  <div id="{{id}}_dropdown" class="angucomplete-dropdown" ng-show="showDropdown">    <div class="angucomplete-searching" ng-show="searching" ng-bind="textSearching"></div>    <div class="angucomplete-searching" ng-show="!searching && (!results || results.length == 0)" ng-bind="textNoResults"></div>    <div class="angucomplete-row" ng-repeat="result in results" ng-click="selectResult(result)" ng-mouseenter="hoverRow($index)" ng-class="{\'angucomplete-selected-row\': $index == currentIndex}">      <div ng-if="imageField" class="angucomplete-image-holder">        <img ng-if="result.image && result.image != \'\'" ng-src="{{result.image}}" class="angucomplete-image"/>        <div ng-if="!result.image && result.image != \'\'" class="angucomplete-image-default"></div>      </div>      <div class="angucomplete-title" ng-if="matchClass" ng-bind-html="result.title"></div>      <div class="angucomplete-title" ng-if="!matchClass">{{ result.title }}</div>      <div ng-if="matchClass && result.description && result.description != \'\'" class="angucomplete-description" ng-bind-html="result.description"></div>      <div ng-if="!matchClass && result.description && result.description != \'\'" class="angucomplete-description">{{result.description}}</div>    </div>  </div></div>'),{restrict:"EA",require:"^?form",scope:{selectedObject:"=",selectedObjectData:"=",disableInput:"=",initialValue:"=",localData:"=",localSearch:"&",remoteUrlRequestFormatter:"=",remoteUrlRequestWithCredentials:"@",remoteUrlResponseFormatter:"=",remoteUrlErrorCallback:"=",remoteApiHandler:"=",id:"@",type:"@",placeholder:"@",textSearching:"@",textNoResults:"@",remoteUrl:"@",remoteUrlDataField:"@",titleField:"@",descriptionField:"@",imageField:"@",inputClass:"@",pause:"@",searchFields:"@",minlength:"@",matchClass:"@",clearSelected:"@",overrideSuggestions:"@",fieldRequired:"=",fieldRequiredClass:"@",inputChanged:"=",autoMatch:"@",focusOut:"&",focusIn:"&",fieldTabindex:"@",inputName:"@",focusFirst:"@",parseInput:"&",disableAutocomplete:"="},templateUrl:function(e,t){return t.templateUrl||n},compile:function(e){var t=i.startSymbol(),n=i.endSymbol();if("{{"!==t||"}}"!==n){var r=e.html().replace(/\{\{/g,t).replace(/\}\}/g,n);e.html(r)}return a}}}])}),function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t(function(){try{return require("moment")}catch(e){}}()):"function"==typeof define&&define.amd?define(["require"],function(e){return t(function(){try{return e("moment")}catch(e){}}())}):(e=e||self).Chart=t(e.moment)}(this,function(r){"use strict";r=r&&r.hasOwnProperty("default")?r.default:r;var e,u={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},l=(function(e){var l={};for(var t in u)u.hasOwnProperty(t)&&(l[u[t]]=t);var o=e.exports={rgb:{channels:3,labels:"rgb"},hsl:{channels:3,labels:"hsl"},hsv:{channels:3,labels:"hsv"},hwb:{channels:3,labels:"hwb"},cmyk:{channels:4,labels:"cmyk"},xyz:{channels:3,labels:"xyz"},lab:{channels:3,labels:"lab"},lch:{channels:3,labels:"lch"},hex:{channels:1,labels:["hex"]},keyword:{channels:1,labels:["keyword"]},ansi16:{channels:1,labels:["ansi16"]},ansi256:{channels:1,labels:["ansi256"]},hcg:{channels:3,labels:["h","c","g"]},apple:{channels:3,labels:["r16","g16","b16"]},gray:{channels:1,labels:["gray"]}};for(var n in o)if(o.hasOwnProperty(n)){if(!("channels"in o[n]))throw new Error("missing channels property: "+n);if(!("labels"in o[n]))throw new Error("missing channel labels property: "+n);if(o[n].labels.length!==o[n].channels)throw new Error("channel and label counts mismatch: "+n);var r=o[n].channels,i=o[n].labels;delete o[n].channels,delete o[n].labels,Object.defineProperty(o[n],"channels",{value:r}),Object.defineProperty(o[n],"labels",{value:i})}o.rgb.hsl=function(e){var t,n,r=e[0]/255,i=e[1]/255,a=e[2]/255,o=Math.min(r,i,a),s=Math.max(r,i,a),c=s-o;return s===o?t=0:r===s?t=(i-a)/c:i===s?t=2+(a-r)/c:a===s&&(t=4+(r-i)/c),(t=Math.min(60*t,360))<0&&(t+=360),n=(o+s)/2,[t,100*(s===o?0:n<=.5?c/(s+o):c/(2-s-o)),100*n]},o.rgb.hsv=function(e){var t,n,r,i,a,o=e[0]/255,s=e[1]/255,c=e[2]/255,l=Math.max(o,s,c),u=l-Math.min(o,s,c),f=function(e){return(l-e)/6/u+.5};return 0===u?i=a=0:(a=u/l,t=f(o),n=f(s),r=f(c),o===l?i=r-n:s===l?i=1/3+t-r:c===l&&(i=2/3+n-t),i<0?i+=1:1<i&&(i-=1)),[360*i,100*a,100*l]},o.rgb.hwb=function(e){var t=e[0],n=e[1],r=e[2];return[o.rgb.hsl(e)[0],100*(1/255*Math.min(t,Math.min(n,r))),100*(r=1-1/255*Math.max(t,Math.max(n,r)))]},o.rgb.cmyk=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255;return[100*((1-n-(t=Math.min(1-n,1-r,1-i)))/(1-t)||0),100*((1-r-t)/(1-t)||0),100*((1-i-t)/(1-t)||0),100*t]},o.rgb.keyword=function(e){var t=l[e];if(t)return t;var n,r,i,a=1/0;for(var o in u)if(u.hasOwnProperty(o)){var s=u[o],c=(r=e,i=s,Math.pow(r[0]-i[0],2)+Math.pow(r[1]-i[1],2)+Math.pow(r[2]-i[2],2));c<a&&(a=c,n=o)}return n},o.keyword.rgb=function(e){return u[e]},o.rgb.xyz=function(e){var t=e[0]/255,n=e[1]/255,r=e[2]/255;return[100*(.4124*(t=.04045<t?Math.pow((t+.055)/1.055,2.4):t/12.92)+.3576*(n=.04045<n?Math.pow((n+.055)/1.055,2.4):n/12.92)+.1805*(r=.04045<r?Math.pow((r+.055)/1.055,2.4):r/12.92)),100*(.2126*t+.7152*n+.0722*r),100*(.0193*t+.1192*n+.9505*r)]},o.rgb.lab=function(e){var t=o.rgb.xyz(e),n=t[0],r=t[1],i=t[2];return r/=100,i/=108.883,n=.008856<(n/=95.047)?Math.pow(n,1/3):7.787*n+16/116,[116*(r=.008856<r?Math.pow(r,1/3):7.787*r+16/116)-16,500*(n-r),200*(r-(i=.008856<i?Math.pow(i,1/3):7.787*i+16/116))]},o.hsl.rgb=function(e){var t,n,r,i,a,o=e[0]/360,s=e[1]/100,c=e[2]/100;if(0===s)return[a=255*c,a,a];t=2*c-(n=c<.5?c*(1+s):c+s-c*s),i=[0,0,0];for(var l=0;l<3;l++)(r=o+1/3*-(l-1))<0&&r++,1<r&&r--,a=6*r<1?t+6*(n-t)*r:2*r<1?n:3*r<2?t+(n-t)*(2/3-r)*6:t,i[l]=255*a;return i},o.hsl.hsv=function(e){var t=e[0],n=e[1]/100,r=e[2]/100,i=n,a=Math.max(r,.01);return n*=(r*=2)<=1?r:2-r,i*=a<=1?a:2-a,[t,100*(0===r?2*i/(a+i):2*n/(r+n)),100*((r+n)/2)]},o.hsv.rgb=function(e){var t=e[0]/60,n=e[1]/100,r=e[2]/100,i=Math.floor(t)%6,a=t-Math.floor(t),o=255*r*(1-n),s=255*r*(1-n*a),c=255*r*(1-n*(1-a));switch(r*=255,i){case 0:return[r,c,o];case 1:return[s,r,o];case 2:return[o,r,c];case 3:return[o,s,r];case 4:return[c,o,r];case 5:return[r,o,s]}},o.hsv.hsl=function(e){var t,n,r,i=e[0],a=e[1]/100,o=e[2]/100,s=Math.max(o,.01);return r=(2-a)*o,n=a*s,[i,100*(n=(n/=(t=(2-a)*s)<=1?t:2-t)||0),100*(r/=2)]},o.hwb.rgb=function(e){var t,n,r,i,a,o,s,c=e[0]/360,l=e[1]/100,u=e[2]/100,f=l+u;switch(1<f&&(l/=f,u/=f),r=6*c-(t=Math.floor(6*c)),0!=(1&t)&&(r=1-r),i=l+r*((n=1-u)-l),t){default:case 6:case 0:a=n,o=i,s=l;break;case 1:a=i,o=n,s=l;break;case 2:a=l,o=n,s=i;break;case 3:a=l,o=i,s=n;break;case 4:a=i,o=l,s=n;break;case 5:a=n,o=l,s=i}return[255*a,255*o,255*s]},o.cmyk.rgb=function(e){var t=e[0]/100,n=e[1]/100,r=e[2]/100,i=e[3]/100;return[255*(1-Math.min(1,t*(1-i)+i)),255*(1-Math.min(1,n*(1-i)+i)),255*(1-Math.min(1,r*(1-i)+i))]},o.xyz.rgb=function(e){var t,n,r,i=e[0]/100,a=e[1]/100,o=e[2]/100;return n=-.9689*i+1.8758*a+.0415*o,r=.0557*i+-.204*a+1.057*o,t=.0031308<(t=3.2406*i+-1.5372*a+-.4986*o)?1.055*Math.pow(t,1/2.4)-.055:12.92*t,n=.0031308<n?1.055*Math.pow(n,1/2.4)-.055:12.92*n,r=.0031308<r?1.055*Math.pow(r,1/2.4)-.055:12.92*r,[255*(t=Math.min(Math.max(0,t),1)),255*(n=Math.min(Math.max(0,n),1)),255*(r=Math.min(Math.max(0,r),1))]},o.xyz.lab=function(e){var t=e[0],n=e[1],r=e[2];return n/=100,r/=108.883,t=.008856<(t/=95.047)?Math.pow(t,1/3):7.787*t+16/116,[116*(n=.008856<n?Math.pow(n,1/3):7.787*n+16/116)-16,500*(t-n),200*(n-(r=.008856<r?Math.pow(r,1/3):7.787*r+16/116))]},o.lab.xyz=function(e){var t,n,r,i=e[0];t=e[1]/500+(n=(i+16)/116),r=n-e[2]/200;var a=Math.pow(n,3),o=Math.pow(t,3),s=Math.pow(r,3);return n=.008856<a?a:(n-16/116)/7.787,t=.008856<o?o:(t-16/116)/7.787,r=.008856<s?s:(r-16/116)/7.787,[t*=95.047,n*=100,r*=108.883]},o.lab.lch=function(e){var t,n=e[0],r=e[1],i=e[2];return(t=360*Math.atan2(i,r)/2/Math.PI)<0&&(t+=360),[n,Math.sqrt(r*r+i*i),t]},o.lch.lab=function(e){var t,n=e[0],r=e[1];return t=e[2]/360*2*Math.PI,[n,r*Math.cos(t),r*Math.sin(t)]},o.rgb.ansi16=function(e){var t=e[0],n=e[1],r=e[2],i=1 in arguments?arguments[1]:o.rgb.hsv(e)[2];if(0===(i=Math.round(i/50)))return 30;var a=30+(Math.round(r/255)<<2|Math.round(n/255)<<1|Math.round(t/255));return 2===i&&(a+=60),a},o.hsv.ansi16=function(e){return o.rgb.ansi16(o.hsv.rgb(e),e[2])},o.rgb.ansi256=function(e){var t=e[0],n=e[1],r=e[2];return t===n&&n===r?t<8?16:248<t?231:Math.round((t-8)/247*24)+232:16+36*Math.round(t/255*5)+6*Math.round(n/255*5)+Math.round(r/255*5)},o.ansi16.rgb=function(e){var t=e%10;if(0===t||7===t)return 50<e&&(t+=3.5),[t=t/10.5*255,t,t];var n=.5*(1+~~(50<e));return[(1&t)*n*255,(t>>1&1)*n*255,(t>>2&1)*n*255]},o.ansi256.rgb=function(e){if(232<=e){var t=10*(e-232)+8;return[t,t,t]}var n;return e-=16,[Math.floor(e/36)/5*255,Math.floor((n=e%36)/6)/5*255,n%6/5*255]},o.rgb.hex=function(e){var t=(((255&Math.round(e[0]))<<16)+((255&Math.round(e[1]))<<8)+(255&Math.round(e[2]))).toString(16).toUpperCase();return"000000".substring(t.length)+t},o.hex.rgb=function(e){var t=e.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);if(!t)return[0,0,0];var n=t[0];3===t[0].length&&(n=n.split("").map(function(e){return e+e}).join(""));var r=parseInt(n,16);return[r>>16&255,r>>8&255,255&r]},o.rgb.hcg=function(e){var t,n=e[0]/255,r=e[1]/255,i=e[2]/255,a=Math.max(Math.max(n,r),i),o=Math.min(Math.min(n,r),i),s=a-o;return t=s<=0?0:a===n?(r-i)/s%6:a===r?2+(i-n)/s:4+(n-r)/s+4,t/=6,[360*(t%=1),100*s,100*(s<1?o/(1-s):0)]},o.hsl.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=1,i=0;return(r=n<.5?2*t*n:2*t*(1-n))<1&&(i=(n-.5*r)/(1-r)),[e[0],100*r,100*i]},o.hsv.hcg=function(e){var t=e[1]/100,n=e[2]/100,r=t*n,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},o.hcg.rgb=function(e){var t=e[0]/360,n=e[1]/100,r=e[2]/100;if(0===n)return[255*r,255*r,255*r];var i,a=[0,0,0],o=t%1*6,s=o%1,c=1-s;switch(Math.floor(o)){case 0:a[0]=1,a[1]=s,a[2]=0;break;case 1:a[0]=c,a[1]=1,a[2]=0;break;case 2:a[0]=0,a[1]=1,a[2]=s;break;case 3:a[0]=0,a[1]=c,a[2]=1;break;case 4:a[0]=s,a[1]=0,a[2]=1;break;default:a[0]=1,a[1]=0,a[2]=c}return i=(1-n)*r,[255*(n*a[0]+i),255*(n*a[1]+i),255*(n*a[2]+i)]},o.hcg.hsv=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t),r=0;return 0<n&&(r=t/n),[e[0],100*r,100*n]},o.hcg.hsl=function(e){var t=e[1]/100,n=e[2]/100*(1-t)+.5*t,r=0;return 0<n&&n<.5?r=t/(2*n):.5<=n&&n<1&&(r=t/(2*(1-n))),[e[0],100*r,100*n]},o.hcg.hwb=function(e){var t=e[1]/100,n=t+e[2]/100*(1-t);return[e[0],100*(n-t),100*(1-n)]},o.hwb.hcg=function(e){var t=e[1]/100,n=1-e[2]/100,r=n-t,i=0;return r<1&&(i=(n-r)/(1-r)),[e[0],100*r,100*i]},o.apple.rgb=function(e){return[e[0]/65535*255,e[1]/65535*255,e[2]/65535*255]},o.rgb.apple=function(e){return[e[0]/255*65535,e[1]/255*65535,e[2]/255*65535]},o.gray.rgb=function(e){return[e[0]/100*255,e[0]/100*255,e[0]/100*255]},o.gray.hsl=o.gray.hsv=function(e){return[0,0,e[0]]},o.gray.hwb=function(e){return[0,100,e[0]]},o.gray.cmyk=function(e){return[0,0,0,e[0]]},o.gray.lab=function(e){return[e[0],0,0]},o.gray.hex=function(e){var t=255&Math.round(e[0]/100*255),n=((t<<16)+(t<<8)+t).toString(16).toUpperCase();return"000000".substring(n.length)+n},o.rgb.gray=function(e){return[(e[0]+e[1]+e[2])/3/255*100]}}(e={exports:{}},e.exports),e.exports);l.rgb,l.hsl,l.hsv,l.hwb,l.cmyk,l.xyz,l.lab,l.lch,l.hex,l.keyword,l.ansi16,l.ansi256,l.hcg,l.apple,l.gray;function c(e){var t=function(){for(var e={},t=Object.keys(l),n=t.length,r=0;r<n;r++)e[t[r]]={distance:-1,parent:null};return e}(),n=[e];for(t[e].distance=0;n.length;)for(var r=n.pop(),i=Object.keys(l[r]),a=i.length,o=0;o<a;o++){var s=i[o],c=t[s];-1===c.distance&&(c.distance=t[r].distance+1,c.parent=r,n.unshift(s))}return t}function a(t,n){return function(e){return n(t(e))}}function f(e,t){for(var n=[t[e].parent,e],r=l[t[e].parent][e],i=t[e].parent;t[i].parent;)n.unshift(t[i].parent),r=a(l[t[i].parent][i],r),i=t[i].parent;return r.conversion=n,r}var d={};Object.keys(l).forEach(function(o){d[o]={},Object.defineProperty(d[o],"channels",{value:l[o].channels}),Object.defineProperty(d[o],"labels",{value:l[o].labels});var s=function(e){for(var t=c(e),n={},r=Object.keys(t),i=r.length,a=0;a<i;a++){var o=r[a];null!==t[o].parent&&(n[o]=f(o,t))}return n}(o);Object.keys(s).forEach(function(e){var i,t,n,r,a=s[e];d[o][e]=(t=function(e){if(null==e)return e;1<arguments.length&&(e=Array.prototype.slice.call(arguments));var t=i(e);if("object"==typeof t)for(var n=t.length,r=0;r<n;r++)t[r]=Math.round(t[r]);return t},"conversion"in(i=a)&&(t.conversion=i.conversion),t),d[o][e].raw=(r=function(e){return null==e?e:(1<arguments.length&&(e=Array.prototype.slice.call(arguments)),n(e))},"conversion"in(n=a)&&(r.conversion=n.conversion),r)})});var h=d,o={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]},n={getRgba:i,getHsla:s,getRgb:function(e){var t=i(e);return t&&t.slice(0,3)},getHsl:function(e){var t=s(e);return t&&t.slice(0,3)},getHwb:p,getAlpha:function(e){var t=i(e);{if(t)return t[3];if(t=s(e))return t[3];if(t=p(e))return t[3]}},hexString:function(e,t){var t=void 0!==t&&3===e.length?t:e[3];return"#"+v(e[0])+v(e[1])+v(e[2])+(0<=t&&t<1?v(Math.round(255*t)):"")},rgbString:function(e,t){if(t<1||e[3]&&e[3]<1)return m(e,t);return"rgb("+e[0]+", "+e[1]+", "+e[2]+")"},rgbaString:m,percentString:function(e,t){if(t<1||e[3]&&e[3]<1)return g(e,t);var n=Math.round(e[0]/255*100),r=Math.round(e[1]/255*100),i=Math.round(e[2]/255*100);return"rgb("+n+"%, "+r+"%, "+i+"%)"},percentaString:g,hslString:function(e,t){if(t<1||e[3]&&e[3]<1)return _(e,t);return"hsl("+e[0]+", "+e[1]+"%, "+e[2]+"%)"},hslaString:_,hwbString:function(e,t){void 0===t&&(t=void 0!==e[3]?e[3]:1);return"hwb("+e[0]+", "+e[1]+"%, "+e[2]+"%"+(void 0!==t&&1!==t?", "+t:"")+")"},keyword:function(e){return t[e.slice(0,3)]}};function i(e){if(e){var t=[0,0,0],n=1,r=e.match(/^#([a-fA-F0-9]{3,4})$/i),i="";if(r){i=(r=r[1])[3];for(var a=0;a<t.length;a++)t[a]=parseInt(r[a]+r[a],16);i&&(n=Math.round(parseInt(i+i,16)/255*100)/100)}else if(r=e.match(/^#([a-fA-F0-9]{6}([a-fA-F0-9]{2})?)$/i)){i=r[2],r=r[1];for(a=0;a<t.length;a++)t[a]=parseInt(r.slice(2*a,2*a+2),16);i&&(n=Math.round(parseInt(i,16)/255*100)/100)}else if(r=e.match(/^rgba?\(\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*,\s*([+-]?\d+)\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(a=0;a<t.length;a++)t[a]=parseInt(r[a+1]);n=parseFloat(r[4])}else if(r=e.match(/^rgba?\(\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*,\s*([+-]?[\d\.]+)\%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)$/i)){for(a=0;a<t.length;a++)t[a]=Math.round(2.55*parseFloat(r[a+1]));n=parseFloat(r[4])}else if(r=e.match(/(\w+)/)){if("transparent"==r[1])return[0,0,0,0];if(!(t=o[r[1]]))return}for(a=0;a<t.length;a++)t[a]=b(t[a],0,255);return n=n||0==n?b(n,0,1):1,t[3]=n,t}}function s(e){if(e){var t=e.match(/^hsla?\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[b(parseInt(t[1]),0,360),b(parseFloat(t[2]),0,100),b(parseFloat(t[3]),0,100),b(isNaN(n)?1:n,0,1)]}}}function p(e){if(e){var t=e.match(/^hwb\(\s*([+-]?\d+)(?:deg)?\s*,\s*([+-]?[\d\.]+)%\s*,\s*([+-]?[\d\.]+)%\s*(?:,\s*([+-]?[\d\.]+)\s*)?\)/);if(t){var n=parseFloat(t[4]);return[b(parseInt(t[1]),0,360),b(parseFloat(t[2]),0,100),b(parseFloat(t[3]),0,100),b(isNaN(n)?1:n,0,1)]}}}function m(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"rgba("+e[0]+", "+e[1]+", "+e[2]+", "+t+")"}function g(e,t){return"rgba("+Math.round(e[0]/255*100)+"%, "+Math.round(e[1]/255*100)+"%, "+Math.round(e[2]/255*100)+"%, "+(t||e[3]||1)+")"}function _(e,t){return void 0===t&&(t=void 0!==e[3]?e[3]:1),"hsla("+e[0]+", "+e[1]+"%, "+e[2]+"%, "+t+")"}function b(e,t,n){return Math.min(Math.max(t,e),n)}function v(e){var t=e.toString(16).toUpperCase();return t.length<2?"0"+t:t}var t={};for(var y in o)t[o[y]]=y;var w=function(e){return e instanceof w?e:this instanceof w?(this.valid=!1,this.values={rgb:[0,0,0],hsl:[0,0,0],hsv:[0,0,0],hwb:[0,0,0],cmyk:[0,0,0,0],alpha:1},void("string"==typeof e?(t=n.getRgba(e))?this.setValues("rgb",t):(t=n.getHsla(e))?this.setValues("hsl",t):(t=n.getHwb(e))&&this.setValues("hwb",t):"object"==typeof e&&(void 0!==(t=e).r||void 0!==t.red?this.setValues("rgb",t):void 0!==t.l||void 0!==t.lightness?this.setValues("hsl",t):void 0!==t.v||void 0!==t.value?this.setValues("hsv",t):void 0!==t.w||void 0!==t.whiteness?this.setValues("hwb",t):void 0===t.c&&void 0===t.cyan||this.setValues("cmyk",t)))):new w(e);var t};w.prototype={isValid:function(){return this.valid},rgb:function(){return this.setSpace("rgb",arguments)},hsl:function(){return this.setSpace("hsl",arguments)},hsv:function(){return this.setSpace("hsv",arguments)},hwb:function(){return this.setSpace("hwb",arguments)},cmyk:function(){return this.setSpace("cmyk",arguments)},rgbArray:function(){return this.values.rgb},hslArray:function(){return this.values.hsl},hsvArray:function(){return this.values.hsv},hwbArray:function(){var e=this.values;return 1!==e.alpha?e.hwb.concat([e.alpha]):e.hwb},cmykArray:function(){return this.values.cmyk},rgbaArray:function(){var e=this.values;return e.rgb.concat([e.alpha])},hslaArray:function(){var e=this.values;return e.hsl.concat([e.alpha])},alpha:function(e){return void 0===e?this.values.alpha:(this.setValues("alpha",e),this)},red:function(e){return this.setChannel("rgb",0,e)},green:function(e){return this.setChannel("rgb",1,e)},blue:function(e){return this.setChannel("rgb",2,e)},hue:function(e){return e&&(e=(e%=360)<0?360+e:e),this.setChannel("hsl",0,e)},saturation:function(e){return this.setChannel("hsl",1,e)},lightness:function(e){return this.setChannel("hsl",2,e)},saturationv:function(e){return this.setChannel("hsv",1,e)},whiteness:function(e){return this.setChannel("hwb",1,e)},blackness:function(e){return this.setChannel("hwb",2,e)},value:function(e){return this.setChannel("hsv",2,e)},cyan:function(e){return this.setChannel("cmyk",0,e)},magenta:function(e){return this.setChannel("cmyk",1,e)},yellow:function(e){return this.setChannel("cmyk",2,e)},black:function(e){return this.setChannel("cmyk",3,e)},hexString:function(){return n.hexString(this.values.rgb)},rgbString:function(){return n.rgbString(this.values.rgb,this.values.alpha)},rgbaString:function(){return n.rgbaString(this.values.rgb,this.values.alpha)},percentString:function(){return n.percentString(this.values.rgb,this.values.alpha)},hslString:function(){return n.hslString(this.values.hsl,this.values.alpha)},hslaString:function(){return n.hslaString(this.values.hsl,this.values.alpha)},hwbString:function(){return n.hwbString(this.values.hwb,this.values.alpha)},keyword:function(){return n.keyword(this.values.rgb,this.values.alpha)},rgbNumber:function(){var e=this.values.rgb;return e[0]<<16|e[1]<<8|e[2]},luminosity:function(){for(var e=this.values.rgb,t=[],n=0;n<e.length;n++){var r=e[n]/255;t[n]=r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4)}return.2126*t[0]+.7152*t[1]+.0722*t[2]},contrast:function(e){var t=this.luminosity(),n=e.luminosity();return n<t?(t+.05)/(n+.05):(n+.05)/(t+.05)},level:function(e){var t=this.contrast(e);return 7.1<=t?"AAA":4.5<=t?"AA":""},dark:function(){var e=this.values.rgb;return(299*e[0]+587*e[1]+114*e[2])/1e3<128},light:function(){return!this.dark()},negate:function(){for(var e=[],t=0;t<3;t++)e[t]=255-this.values.rgb[t];return this.setValues("rgb",e),this},lighten:function(e){var t=this.values.hsl;return t[2]+=t[2]*e,this.setValues("hsl",t),this},darken:function(e){var t=this.values.hsl;return t[2]-=t[2]*e,this.setValues("hsl",t),this},saturate:function(e){var t=this.values.hsl;return t[1]+=t[1]*e,this.setValues("hsl",t),this},desaturate:function(e){var t=this.values.hsl;return t[1]-=t[1]*e,this.setValues("hsl",t),this},whiten:function(e){var t=this.values.hwb;return t[1]+=t[1]*e,this.setValues("hwb",t),this},blacken:function(e){var t=this.values.hwb;return t[2]+=t[2]*e,this.setValues("hwb",t),this},greyscale:function(){var e=this.values.rgb,t=.3*e[0]+.59*e[1]+.11*e[2];return this.setValues("rgb",[t,t,t]),this},clearer:function(e){var t=this.values.alpha;return this.setValues("alpha",t-t*e),this},opaquer:function(e){var t=this.values.alpha;return this.setValues("alpha",t+t*e),this},rotate:function(e){var t=this.values.hsl,n=(t[0]+e)%360;return t[0]=n<0?360+n:n,this.setValues("hsl",t),this},mix:function(e,t){var n=e,r=void 0===t?.5:t,i=2*r-1,a=this.alpha()-n.alpha(),o=((i*a==-1?i:(i+a)/(1+i*a))+1)/2,s=1-o;return this.rgb(o*this.red()+s*n.red(),o*this.green()+s*n.green(),o*this.blue()+s*n.blue()).alpha(this.alpha()*r+n.alpha()*(1-r))},toJSON:function(){return this.rgb()},clone:function(){var e,t,n=new w,r=this.values,i=n.values;for(var a in r)r.hasOwnProperty(a)&&(e=r[a],"[object Array]"===(t={}.toString.call(e))?i[a]=e.slice(0):"[object Number]"===t?i[a]=e:console.error("unexpected color value:",e));return n}},w.prototype.spaces={rgb:["red","green","blue"],hsl:["hue","saturation","lightness"],hsv:["hue","saturation","value"],hwb:["hue","whiteness","blackness"],cmyk:["cyan","magenta","yellow","black"]},w.prototype.maxes={rgb:[255,255,255],hsl:[360,100,100],hsv:[360,100,100],hwb:[360,100,100],cmyk:[100,100,100,100]},w.prototype.getValues=function(e){for(var t=this.values,n={},r=0;r<e.length;r++)n[e.charAt(r)]=t[e][r];return 1!==t.alpha&&(n.a=t.alpha),n},w.prototype.setValues=function(e,t){var n,r,i=this.values,a=this.spaces,o=this.maxes,s=1;if(this.valid=!0,"alpha"===e)s=t;else if(t.length)i[e]=t.slice(0,e.length),s=t[e.length];else if(void 0!==t[e.charAt(0)]){for(n=0;n<e.length;n++)i[e][n]=t[e.charAt(n)];s=t.a}else if(void 0!==t[a[e][0]]){var c=a[e];for(n=0;n<e.length;n++)i[e][n]=t[c[n]];s=t.alpha}if(i.alpha=Math.max(0,Math.min(1,void 0===s?i.alpha:s)),"alpha"===e)return!1;for(n=0;n<e.length;n++)r=Math.max(0,Math.min(o[e][n],i[e][n])),i[e][n]=Math.round(r);for(var l in a)l!==e&&(i[l]=h[e][l](i[e]));return!0},w.prototype.setSpace=function(e,t){var n=t[0];return void 0===n?this.getValues(e):("number"==typeof n&&(n=Array.prototype.slice.call(t)),this.setValues(e,n),this)},w.prototype.setChannel=function(e,t,n){var r=this.values[e];return void 0===n?r[t]:(n===r[t]||(r[t]=n,this.setValues(e,r)),this)},"undefined"!=typeof window&&(window.Color=w);var C=w;function A(e){return-1===["__proto__","prototype","constructor"].indexOf(e)}var S,T={noop:function(){},uid:(S=0,function(){return S++}),isNullOrUndef:function(e){return null==e},isArray:function(e){if(Array.isArray&&Array.isArray(e))return!0;var t=Object.prototype.toString.call(e);return"[object"===t.substr(0,7)&&"Array]"===t.substr(-6)},isObject:function(e){return null!==e&&"[object Object]"===Object.prototype.toString.call(e)},isFinite:function(e){return("number"==typeof e||e instanceof Number)&&isFinite(e)},valueOrDefault:function(e,t){return void 0===e?t:e},valueAtIndexOrDefault:function(e,t,n){return T.valueOrDefault(T.isArray(e)?e[t]:e,n)},callback:function(e,t,n){if(e&&"function"==typeof e.call)return e.apply(n,t)},each:function(e,t,n,r){var i,a,o;if(T.isArray(e))if(a=e.length,r)for(i=a-1;0<=i;i--)t.call(n,e[i],i);else for(i=0;i<a;i++)t.call(n,e[i],i);else if(T.isObject(e))for(a=(o=Object.keys(e)).length,i=0;i<a;i++)t.call(n,e[o[i]],o[i])},arrayEquals:function(e,t){var n,r,i,a;if(!e||!t||e.length!==t.length)return!1;for(n=0,r=e.length;n<r;++n)if(i=e[n],a=t[n],i instanceof Array&&a instanceof Array){if(!T.arrayEquals(i,a))return!1}else if(i!==a)return!1;return!0},clone:function(e){if(T.isArray(e))return e.map(T.clone);if(T.isObject(e)){for(var t=Object.create(e),n=Object.keys(e),r=n.length,i=0;i<r;++i)t[n[i]]=T.clone(e[n[i]]);return t}return e},_merger:function(e,t,n,r){if(A(e)){var i=t[e],a=n[e];T.isObject(i)&&T.isObject(a)?T.merge(i,a,r):t[e]=T.clone(a)}},_mergerIf:function(e,t,n){if(A(e)){var r=t[e],i=n[e];T.isObject(r)&&T.isObject(i)?T.mergeIf(r,i):t.hasOwnProperty(e)||(t[e]=T.clone(i))}},merge:function(e,t,n){var r,i,a,o,s,c=T.isArray(t)?t:[t],l=c.length;if(!T.isObject(e))return e;for(r=(n=n||{}).merger||T._merger,i=0;i<l;++i)if(t=c[i],T.isObject(t))for(s=0,o=(a=Object.keys(t)).length;s<o;++s)r(a[s],e,t,n);return e},mergeIf:function(e,t){return T.merge(e,t,{merger:T._mergerIf})},extend:Object.assign||function(e){return T.merge(e,[].slice.call(arguments,1),{merger:function(e,t,n){t[e]=n[e]}})},inherits:function(e){var t=this,n=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},r=function(){this.constructor=n};return r.prototype=t.prototype,n.prototype=new r,n.extend=T.inherits,e&&T.extend(n.prototype,e),n.__super__=t.prototype,n},_deprecated:function(e,t,n,r){void 0!==t&&console.warn(e+': "'+n+'" is deprecated. Please use "'+r+'" instead')}},x=T;T.callCallback=T.callback,T.indexOf=function(e,t,n){return Array.prototype.indexOf.call(e,t,n)},T.getValueOrDefault=T.valueOrDefault,T.getValueAtIndexOrDefault=T.valueAtIndexOrDefault;var k={linear:function(e){return e},easeInQuad:function(e){return e*e},easeOutQuad:function(e){return-e*(e-2)},easeInOutQuad:function(e){return(e/=.5)<1?.5*e*e:-.5*(--e*(e-2)-1)},easeInCubic:function(e){return e*e*e},easeOutCubic:function(e){return(e-=1)*e*e+1},easeInOutCubic:function(e){return(e/=.5)<1?.5*e*e*e:.5*((e-=2)*e*e+2)},easeInQuart:function(e){return e*e*e*e},easeOutQuart:function(e){return-((e-=1)*e*e*e-1)},easeInOutQuart:function(e){return(e/=.5)<1?.5*e*e*e*e:-.5*((e-=2)*e*e*e-2)},easeInQuint:function(e){return e*e*e*e*e},easeOutQuint:function(e){return(e-=1)*e*e*e*e+1},easeInOutQuint:function(e){return(e/=.5)<1?.5*e*e*e*e*e:.5*((e-=2)*e*e*e*e+2)},easeInSine:function(e){return 1-Math.cos(e*(Math.PI/2))},easeOutSine:function(e){return Math.sin(e*(Math.PI/2))},easeInOutSine:function(e){return-.5*(Math.cos(Math.PI*e)-1)},easeInExpo:function(e){return 0===e?0:Math.pow(2,10*(e-1))},easeOutExpo:function(e){return 1===e?1:1-Math.pow(2,-10*e)},easeInOutExpo:function(e){return 0===e?0:1===e?1:(e/=.5)<1?.5*Math.pow(2,10*(e-1)):.5*(2-Math.pow(2,-10*--e))},easeInCirc:function(e){return 1<=e?e:-(Math.sqrt(1-e*e)-1)},easeOutCirc:function(e){return Math.sqrt(1-(e-=1)*e)},easeInOutCirc:function(e){return(e/=.5)<1?-.5*(Math.sqrt(1-e*e)-1):.5*(Math.sqrt(1-(e-=2)*e)+1)},easeInElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),t=r<1?(r=1,n/4):n/(2*Math.PI)*Math.asin(1/r),-r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n))},easeOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:1===e?1:(n||(n=.3),t=r<1?(r=1,n/4):n/(2*Math.PI)*Math.asin(1/r),r*Math.pow(2,-10*e)*Math.sin((e-t)*(2*Math.PI)/n)+1)},easeInOutElastic:function(e){var t=1.70158,n=0,r=1;return 0===e?0:2==(e/=.5)?1:(n||(n=.45),t=r<1?(r=1,n/4):n/(2*Math.PI)*Math.asin(1/r),e<1?r*Math.pow(2,10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*-.5:r*Math.pow(2,-10*(e-=1))*Math.sin((e-t)*(2*Math.PI)/n)*.5+1)},easeInBack:function(e){return e*e*(2.70158*e-1.70158)},easeOutBack:function(e){return(e-=1)*e*(2.70158*e+1.70158)+1},easeInOutBack:function(e){var t=1.70158;return(e/=.5)<1?e*e*((1+(t*=1.525))*e-t)*.5:.5*((e-=2)*e*((1+(t*=1.525))*e+t)+2)},easeInBounce:function(e){return 1-k.easeOutBounce(1-e)},easeOutBounce:function(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375},easeInOutBounce:function(e){return e<.5?.5*k.easeInBounce(2*e):.5*k.easeOutBounce(2*e-1)+.5}},E={effects:k};x.easingEffects=k;var D=Math.PI,I=D/180,P=2*D,M=D/2,$=D/4,O=2*D/3,R={clear:function(e){e.ctx.clearRect(0,0,e.width,e.height)},roundedRect:function(e,t,n,r,i,a){if(a){var o=Math.min(a,i/2,r/2),s=t+o,c=n+o,l=t+r-o,u=n+i-o;e.moveTo(t,c),s<l&&c<u?(e.arc(s,c,o,-D,-M),e.arc(l,c,o,-M,0),e.arc(l,u,o,0,M),e.arc(s,u,o,M,D)):s<l?(e.moveTo(s,n),e.arc(l,c,o,-M,M),e.arc(s,c,o,M,D+M)):c<u?(e.arc(s,c,o,-D,0),e.arc(s,u,o,0,D)):e.arc(s,c,o,-D,D),e.closePath(),e.moveTo(t,n)}else e.rect(t,n,r,i)},drawPoint:function(e,t,n,r,i,a){var o,s,c,l,u,f=(a||0)*I;if(t&&"object"==typeof t&&("[object HTMLImageElement]"===(o=t.toString())||"[object HTMLCanvasElement]"===o))return e.save(),e.translate(r,i),e.rotate(f),e.drawImage(t,-t.width/2,-t.height/2,t.width,t.height),void e.restore();if(!(isNaN(n)||n<=0)){switch(e.beginPath(),t){default:e.arc(r,i,n,0,P),e.closePath();break;case"triangle":e.moveTo(r+Math.sin(f)*n,i-Math.cos(f)*n),f+=O,e.lineTo(r+Math.sin(f)*n,i-Math.cos(f)*n),f+=O,e.lineTo(r+Math.sin(f)*n,i-Math.cos(f)*n),e.closePath();break;case"rectRounded":l=n-(u=.516*n),s=Math.cos(f+$)*l,c=Math.sin(f+$)*l,e.arc(r-s,i-c,u,f-D,f-M),e.arc(r+c,i-s,u,f-M,f),e.arc(r+s,i+c,u,f,f+M),e.arc(r-c,i+s,u,f+M,f+D),e.closePath();break;case"rect":if(!a){l=Math.SQRT1_2*n,e.rect(r-l,i-l,2*l,2*l);break}f+=$;case"rectRot":s=Math.cos(f)*n,c=Math.sin(f)*n,e.moveTo(r-s,i-c),e.lineTo(r+c,i-s),e.lineTo(r+s,i+c),e.lineTo(r-c,i+s),e.closePath();break;case"crossRot":f+=$;case"cross":s=Math.cos(f)*n,c=Math.sin(f)*n,e.moveTo(r-s,i-c),e.lineTo(r+s,i+c),e.moveTo(r+c,i-s),e.lineTo(r-c,i+s);break;case"star":s=Math.cos(f)*n,c=Math.sin(f)*n,e.moveTo(r-s,i-c),e.lineTo(r+s,i+c),e.moveTo(r+c,i-s),e.lineTo(r-c,i+s),f+=$,s=Math.cos(f)*n,c=Math.sin(f)*n,e.moveTo(r-s,i-c),e.lineTo(r+s,i+c),e.moveTo(r+c,i-s),e.lineTo(r-c,i+s);break;case"line":s=Math.cos(f)*n,c=Math.sin(f)*n,e.moveTo(r-s,i-c),e.lineTo(r+s,i+c);break;case"dash":e.moveTo(r,i),e.lineTo(r+Math.cos(f)*n,i+Math.sin(f)*n)}e.fill(),e.stroke()}},_isPointInArea:function(e,t){return e.x>t.left-1e-6&&e.x<t.right+1e-6&&e.y>t.top-1e-6&&e.y<t.bottom+1e-6},clipArea:function(e,t){e.save(),e.beginPath(),e.rect(t.left,t.top,t.right-t.left,t.bottom-t.top),e.clip()},unclipArea:function(e){e.restore()},lineTo:function(e,t,n,r){var i=n.steppedLine;if(i){if("middle"===i){var a=(t.x+n.x)/2;e.lineTo(a,r?n.y:t.y),e.lineTo(a,r?t.y:n.y)}else"after"===i&&!r||"after"!==i&&r?e.lineTo(t.x,n.y):e.lineTo(n.x,t.y);e.lineTo(n.x,n.y)}else n.tension?e.bezierCurveTo(r?t.controlPointPreviousX:t.controlPointNextX,r?t.controlPointPreviousY:t.controlPointNextY,r?n.controlPointNextX:n.controlPointPreviousX,r?n.controlPointNextY:n.controlPointPreviousY,n.x,n.y):e.lineTo(n.x,n.y)}},N=R;x.clear=R.clear,x.drawRoundedRectangle=function(e){e.beginPath(),R.roundedRect.apply(R,arguments)};var L={_set:function(e,t){return x.merge(this[e]||(this[e]={}),t)}};L._set("global",{defaultColor:"rgba(0,0,0,0.1)",defaultFontColor:"#666",defaultFontFamily:"'Helvetica Neue', 'Helvetica', 'Arial', sans-serif",defaultFontSize:12,defaultFontStyle:"normal",defaultLineHeight:1.2,showLines:!0});var F=L,G=x.valueOrDefault;var j={toLineHeight:function(e,t){var n=(""+e).match(/^(normal|(\d+(?:\.\d+)?)(px|em|%)?)$/);if(!n||"normal"===n[1])return 1.2*t;switch(e=+n[2],n[3]){case"px":return e;case"%":e/=100}return t*e},toPadding:function(e){var t,n,r,i;return x.isObject(e)?(t=+e.top||0,n=+e.right||0,r=+e.bottom||0,i=+e.left||0):t=n=r=i=+e||0,{top:t,right:n,bottom:r,left:i,height:t+r,width:i+n}},_parseFont:function(e){var t,n=F.global,r=G(e.fontSize,n.defaultFontSize),i={family:G(e.fontFamily,n.defaultFontFamily),lineHeight:x.options.toLineHeight(G(e.lineHeight,n.defaultLineHeight),r),size:r,style:G(e.fontStyle,n.defaultFontStyle),weight:null,string:""};return i.string=!(t=i)||x.isNullOrUndef(t.size)||x.isNullOrUndef(t.family)?null:(t.style?t.style+" ":"")+(t.weight?t.weight+" ":"")+t.size+"px "+t.family,i},resolve:function(e,t,n,r){var i,a,o,s=!0;for(i=0,a=e.length;i<a;++i)if(void 0!==(o=e[i])&&(void 0!==t&&"function"==typeof o&&(o=o(t),s=!1),void 0!==n&&x.isArray(o)&&(o=o[n],s=!1),void 0!==o))return r&&!s&&(r.cacheable=!1),o}},B={_factorize:function(e){var t,n=[],r=Math.sqrt(e);for(t=1;t<r;t++)e%t==0&&(n.push(t),n.push(e/t));return r===(0|r)&&n.push(r),n.sort(function(e,t){return e-t}).pop(),n},log10:Math.log10||function(e){var t=Math.log(e)*Math.LOG10E,n=Math.round(t);return e===Math.pow(10,n)?n:t}},U=B;x.log10=B.log10;var H=x,W=E,q=N,z=j,V=U,Y={getRtlAdapter:function(e,t,n){return e?(r=t,i=n,{x:function(e){return r+r+i-e},setWidth:function(e){i=e},textAlign:function(e){return"center"===e?e:"right"===e?"left":"right"},xPlus:function(e,t){return e-t},leftForLtr:function(e,t){return e-t}}):{x:function(e){return e},setWidth:function(e){},textAlign:function(e){return e},xPlus:function(e,t){return e+t},leftForLtr:function(e,t){return e}};var r,i},overrideTextDirection:function(e,t){var n,r;"ltr"!==t&&"rtl"!==t||(r=[(n=e.canvas.style).getPropertyValue("direction"),n.getPropertyPriority("direction")],n.setProperty("direction",t,"important"),e.prevTextDirection=r)},restoreTextDirection:function(e){var t=e.prevTextDirection;void 0!==t&&(delete e.prevTextDirection,e.canvas.style.setProperty("direction",t[0],t[1]))}};H.easing=W,H.canvas=q,H.options=z,H.math=V,H.rtl=Y;var K=function(e){H.extend(this,e),this.initialize.apply(this,arguments)};H.extend(K.prototype,{_type:void 0,initialize:function(){this.hidden=!1},pivot:function(){return this._view||(this._view=H.extend({},this._model)),this._start={},this},transition:function(e){var t=this._model,n=this._start,r=this._view;return t&&1!==e?(r||(r=this._view={}),n||(n=this._start={}),function(e,t,n,r){var i,a,o,s,c,l,u,f,d,h=Object.keys(n);for(i=0,a=h.length;i<a;++i)if(l=n[o=h[i]],t.hasOwnProperty(o)||(t[o]=l),(s=t[o])!==l&&"_"!==o[0]){if(e.hasOwnProperty(o)||(e[o]=s),(u=typeof l)==typeof(c=e[o]))if("string"===u){if((f=C(c)).valid&&(d=C(l)).valid){t[o]=d.mix(f,r).rgbString();continue}}else if(H.isFinite(c)&&H.isFinite(l)){t[o]=c+(l-c)*r;continue}t[o]=l}}(n,r,t,e)):(this._view=H.extend({},t),this._start=null),this},tooltipPosition:function(){return{x:this._model.x,y:this._model.y}},hasValue:function(){return H.isNumber(this._model.x)&&H.isNumber(this._model.y)}}),K.extend=H.inherits;var Q=K,X=Q.extend({chart:null,currentStep:0,numSteps:60,easing:"",render:null,onAnimationProgress:null,onAnimationComplete:null}),Z=X;Object.defineProperty(X.prototype,"animationObject",{get:function(){return this}}),Object.defineProperty(X.prototype,"chartInstance",{get:function(){return this.chart},set:function(e){this.chart=e}}),F._set("global",{animation:{duration:1e3,easing:"easeOutQuart",onProgress:H.noop,onComplete:H.noop}});var J={animations:[],request:null,addAnimation:function(e,t,n,r){var i,a,o=this.animations;for(t.chart=e,t.startTime=Date.now(),t.duration=n,r||(e.animating=!0),i=0,a=o.length;i<a;++i)if(o[i].chart===e)return void(o[i]=t);o.push(t),1===o.length&&this.requestAnimationFrame()},cancelAnimation:function(t){var e=H.findIndex(this.animations,function(e){return e.chart===t});-1!==e&&(this.animations.splice(e,1),t.animating=!1)},requestAnimationFrame:function(){var e=this;null===e.request&&(e.request=H.requestAnimFrame.call(window,function(){e.request=null,e.startDigest()}))},startDigest:function(){this.advance(),0<this.animations.length&&this.requestAnimationFrame()},advance:function(){for(var e,t,n,r,i=this.animations,a=0;a<i.length;)t=(e=i[a]).chart,n=e.numSteps,r=Math.floor((Date.now()-e.startTime)/e.duration*n)+1,e.currentStep=Math.min(r,n),H.callback(e.render,[t,e],t),H.callback(e.onAnimationProgress,[e],t),e.currentStep>=n?(H.callback(e.onAnimationComplete,[e],t),t.animating=!1,i.splice(a,1)):++a}},ee=H.options.resolve,te=["push","pop","shift","splice","unshift"];function ne(t,e){var n=t._chartjs;if(n){var r=n.listeners,i=r.indexOf(e);-1!==i&&r.splice(i,1),0<r.length||(te.forEach(function(e){delete t[e]}),delete t._chartjs)}}var re=function(e,t){this.initialize(e,t)};H.extend(re.prototype,{datasetElementType:null,dataElementType:null,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth"],_dataElementOptions:["backgroundColor","borderColor","borderWidth","pointStyle"],initialize:function(e,t){this.chart=e,this.index=t,this.linkScales(),this.addElements(),this._type=this.getMeta().type},updateIndex:function(e){this.index=e},linkScales:function(){var e=this.getMeta(),t=this.chart,n=t.scales,r=this.getDataset(),i=t.options.scales;null!==e.xAxisID&&e.xAxisID in n&&!r.xAxisID||(e.xAxisID=r.xAxisID||i.xAxes[0].id),null!==e.yAxisID&&e.yAxisID in n&&!r.yAxisID||(e.yAxisID=r.yAxisID||i.yAxes[0].id)},getDataset:function(){return this.chart.data.datasets[this.index]},getMeta:function(){return this.chart.getDatasetMeta(this.index)},getScaleForId:function(e){return this.chart.scales[e]},_getValueScaleId:function(){return this.getMeta().yAxisID},_getIndexScaleId:function(){return this.getMeta().xAxisID},_getValueScale:function(){return this.getScaleForId(this._getValueScaleId())},_getIndexScale:function(){return this.getScaleForId(this._getIndexScaleId())},reset:function(){this._update(!0)},destroy:function(){this._data&&ne(this._data,this)},createMetaDataset:function(){var e=this.datasetElementType;return e&&new e({_chart:this.chart,_datasetIndex:this.index})},createMetaData:function(e){var t=this.dataElementType;return t&&new t({_chart:this.chart,_datasetIndex:this.index,_index:e})},addElements:function(){var e,t,n=this.getMeta(),r=this.getDataset().data||[],i=n.data;for(e=0,t=r.length;e<t;++e)i[e]=i[e]||this.createMetaData(e);n.dataset=n.dataset||this.createMetaDataset()},addElementAndReset:function(e){var t=this.createMetaData(e);this.getMeta().data.splice(e,0,t),this.updateElement(t,e,!0)},buildOrUpdateElements:function(){var i,e,t=this.getDataset(),n=t.data||(t.data=[]);this._data!==n&&(this._data&&ne(this._data,this),n&&Object.isExtensible(n)&&(e=this,(i=n)._chartjs?i._chartjs.listeners.push(e):(Object.defineProperty(i,"_chartjs",{configurable:!0,enumerable:!1,value:{listeners:[e]}}),te.forEach(function(e){var n="onData"+e.charAt(0).toUpperCase()+e.slice(1),r=i[e];Object.defineProperty(i,e,{configurable:!0,enumerable:!1,value:function(){var t=Array.prototype.slice.call(arguments),e=r.apply(this,t);return H.each(i._chartjs.listeners,function(e){"function"==typeof e[n]&&e[n].apply(e,t)}),e}})}))),this._data=n),this.resyncElements()},_configure:function(){this._config=H.merge(Object.create(null),[this.chart.options.datasets[this._type],this.getDataset()],{merger:function(e,t,n){"_meta"!==e&&"data"!==e&&H._merger(e,t,n)}})},_update:function(e){this._configure(),this._cachedDataOpts=null,this.update(e)},update:H.noop,transition:function(e){for(var t=this.getMeta(),n=t.data||[],r=n.length,i=0;i<r;++i)n[i].transition(e);t.dataset&&t.dataset.transition(e)},draw:function(){var e=this.getMeta(),t=e.data||[],n=t.length,r=0;for(e.dataset&&e.dataset.draw();r<n;++r)t[r].draw()},getStyle:function(e){var t,n=this.getMeta(),r=n.dataset;return this._configure(),!1!==(t=r&&void 0===e?this._resolveDatasetElementOptions(r||{}):(e=e||0,this._resolveDataElementOptions(n.data[e]||{},e))).fill&&null!==t.fill||(t.backgroundColor=t.borderColor),t},_resolveDatasetElementOptions:function(e,t){var n,r,i,a,o=this.chart,s=this._config,c=e.custom||{},l=o.options.elements[this.datasetElementType.prototype._type]||{},u=this._datasetElementOptions,f={},d={chart:o,dataset:this.getDataset(),datasetIndex:this.index,hover:t};for(n=0,r=u.length;n<r;++n)i=u[n],a=t?"hover"+i.charAt(0).toUpperCase()+i.slice(1):i,f[i]=ee([c[a],s[a],l[a]],d);return f},_resolveDataElementOptions:function(e,t){var n=e&&e.custom,r=this._cachedDataOpts;if(r&&!n)return r;var i,a,o,s,c=this.chart,l=this._config,u=c.options.elements[this.dataElementType.prototype._type]||{},f=this._dataElementOptions,d={},h={chart:c,dataIndex:t,dataset:this.getDataset(),datasetIndex:this.index},p={cacheable:!n};if(n=n||{},H.isArray(f))for(a=0,o=f.length;a<o;++a)d[s=f[a]]=ee([n[s],l[s],u[s]],h,t,p);else for(a=0,o=(i=Object.keys(f)).length;a<o;++a)d[s=i[a]]=ee([n[s],l[f[s]],l[s],u[s]],h,t,p);return p.cacheable&&(this._cachedDataOpts=Object.freeze(d)),d},removeHoverStyle:function(e){H.merge(e._model,e.$previousStyle||{}),delete e.$previousStyle},setHoverStyle:function(e){var t=this.chart.data.datasets[e._datasetIndex],n=e._index,r=e.custom||{},i=e._model,a=H.getHoverColor;e.$previousStyle={backgroundColor:i.backgroundColor,borderColor:i.borderColor,borderWidth:i.borderWidth},i.backgroundColor=ee([r.hoverBackgroundColor,t.hoverBackgroundColor,a(i.backgroundColor)],void 0,n),i.borderColor=ee([r.hoverBorderColor,t.hoverBorderColor,a(i.borderColor)],void 0,n),i.borderWidth=ee([r.hoverBorderWidth,t.hoverBorderWidth,i.borderWidth],void 0,n)},_removeDatasetHoverStyle:function(){var e=this.getMeta().dataset;e&&this.removeHoverStyle(e)},_setDatasetHoverStyle:function(){var e,t,n,r,i,a,o=this.getMeta().dataset,s={};if(o){for(a=o._model,i=this._resolveDatasetElementOptions(o,!0),e=0,t=(r=Object.keys(i)).length;e<t;++e)s[n=r[e]]=a[n],a[n]=i[n];o.$previousStyle=s}},resyncElements:function(){var e=this.getMeta(),t=this.getDataset().data,n=e.data.length,r=t.length;r<n?e.data.splice(r,n-r):n<r&&this.insertElements(n,r-n)},insertElements:function(e,t){for(var n=0;n<t;++n)this.addElementAndReset(e+n)},onDataPush:function(){var e=arguments.length;this.insertElements(this.getDataset().data.length-e,e)},onDataPop:function(){this.getMeta().data.pop()},onDataShift:function(){this.getMeta().data.shift()},onDataSplice:function(e,t){this.getMeta().data.splice(e,t),this.insertElements(e,arguments.length-2)},onDataUnshift:function(){this.insertElements(0,arguments.length)}}),re.extend=H.inherits;var ie=re,ae=2*Math.PI;function oe(e,t){var n=t.startAngle,r=t.endAngle,i=t.pixelMargin,a=i/t.outerRadius,o=t.x,s=t.y;e.beginPath(),e.arc(o,s,t.outerRadius,n-a,r+a),t.innerRadius>i?(a=i/t.innerRadius,e.arc(o,s,t.innerRadius-i,r+a,n-a,!0)):e.arc(o,s,i,r+Math.PI/2,n-Math.PI/2),e.closePath(),e.clip()}function se(e,t,n){var r="inner"===t.borderAlign;r?(e.lineWidth=2*t.borderWidth,e.lineJoin="round"):(e.lineWidth=t.borderWidth,e.lineJoin="bevel"),n.fullCircles&&function(e,t,n,r){var i,a=n.endAngle;for(r&&(n.endAngle=n.startAngle+ae,oe(e,n),n.endAngle=a,n.endAngle===n.startAngle&&n.fullCircles&&(n.endAngle+=ae,n.fullCircles--)),e.beginPath(),e.arc(n.x,n.y,n.innerRadius,n.startAngle+ae,n.startAngle,!0),i=0;i<n.fullCircles;++i)e.stroke();for(e.beginPath(),e.arc(n.x,n.y,t.outerRadius,n.startAngle,n.startAngle+ae),i=0;i<n.fullCircles;++i)e.stroke()}(e,t,n,r),r&&oe(e,n),e.beginPath(),e.arc(n.x,n.y,t.outerRadius,n.startAngle,n.endAngle),e.arc(n.x,n.y,n.innerRadius,n.endAngle,n.startAngle,!0),e.closePath(),e.stroke()}F._set("global",{elements:{arc:{backgroundColor:F.global.defaultColor,borderColor:"#fff",borderWidth:2,borderAlign:"center"}}});var ce=Q.extend({_type:"arc",inLabelRange:function(e){var t=this._view;return!!t&&Math.pow(e-t.x,2)<Math.pow(t.radius+t.hoverRadius,2)},inRange:function(e,t){var n=this._view;if(n){for(var r=H.getAngleFromPoint(n,{x:e,y:t}),i=r.angle,a=r.distance,o=n.startAngle,s=n.endAngle;s<o;)s+=ae;for(;s<i;)i-=ae;for(;i<o;)i+=ae;var c=o<=i&&i<=s,l=a>=n.innerRadius&&a<=n.outerRadius;return c&&l}return!1},getCenterPoint:function(){var e=this._view,t=(e.startAngle+e.endAngle)/2,n=(e.innerRadius+e.outerRadius)/2;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},getArea:function(){var e=this._view;return Math.PI*((e.endAngle-e.startAngle)/(2*Math.PI))*(Math.pow(e.outerRadius,2)-Math.pow(e.innerRadius,2))},tooltipPosition:function(){var e=this._view,t=e.startAngle+(e.endAngle-e.startAngle)/2,n=(e.outerRadius-e.innerRadius)/2+e.innerRadius;return{x:e.x+Math.cos(t)*n,y:e.y+Math.sin(t)*n}},draw:function(){var e,t=this._chart.ctx,n=this._view,r="inner"===n.borderAlign?.33:0,i={x:n.x,y:n.y,innerRadius:n.innerRadius,outerRadius:Math.max(n.outerRadius-r,0),pixelMargin:r,startAngle:n.startAngle,endAngle:n.endAngle,fullCircles:Math.floor(n.circumference/ae)};if(t.save(),t.fillStyle=n.backgroundColor,t.strokeStyle=n.borderColor,i.fullCircles){for(i.endAngle=i.startAngle+ae,t.beginPath(),t.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),t.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),t.closePath(),e=0;e<i.fullCircles;++e)t.fill();i.endAngle=i.startAngle+n.circumference%ae}t.beginPath(),t.arc(i.x,i.y,i.outerRadius,i.startAngle,i.endAngle),t.arc(i.x,i.y,i.innerRadius,i.endAngle,i.startAngle,!0),t.closePath(),t.fill(),n.borderWidth&&se(t,n,i),t.restore()}}),le=H.valueOrDefault,ue=F.global.defaultColor;F._set("global",{elements:{line:{tension:.4,backgroundColor:ue,borderWidth:3,borderColor:ue,borderCapStyle:"butt",borderDash:[],borderDashOffset:0,borderJoinStyle:"miter",capBezierPoints:!0,fill:!0}}});var fe=Q.extend({_type:"line",draw:function(){var e,t,n,r=this._view,i=this._chart.ctx,a=r.spanGaps,o=this._children.slice(),s=F.global,c=s.elements.line,l=-1,u=this._loop;if(o.length){if(this._loop){for(e=0;e<o.length;++e)if(t=H.previousItem(o,e),!o[e]._view.skip&&t._view.skip){o=o.slice(e).concat(o.slice(0,e)),u=a;break}u&&o.push(o[0])}for(i.save(),i.lineCap=r.borderCapStyle||c.borderCapStyle,i.setLineDash&&i.setLineDash(r.borderDash||c.borderDash),i.lineDashOffset=le(r.borderDashOffset,c.borderDashOffset),i.lineJoin=r.borderJoinStyle||c.borderJoinStyle,i.lineWidth=le(r.borderWidth,c.borderWidth),i.strokeStyle=r.borderColor||s.defaultColor,i.beginPath(),(n=o[0]._view).skip||(i.moveTo(n.x,n.y),l=0),e=1;e<o.length;++e)n=o[e]._view,t=-1===l?H.previousItem(o,e):o[l],n.skip||(l!==e-1&&!a||-1===l?i.moveTo(n.x,n.y):H.canvas.lineTo(i,t._view,n),l=e);u&&i.closePath(),i.stroke(),i.restore()}}}),de=H.valueOrDefault,he=F.global.defaultColor;function pe(e){var t=this._view;return!!t&&Math.abs(e-t.x)<t.radius+t.hitRadius}F._set("global",{elements:{point:{radius:3,pointStyle:"circle",backgroundColor:he,borderColor:he,borderWidth:1,hitRadius:1,hoverRadius:4,hoverBorderWidth:1}}});var me=Q.extend({_type:"point",inRange:function(e,t){var n=this._view;return!!n&&Math.pow(e-n.x,2)+Math.pow(t-n.y,2)<Math.pow(n.hitRadius+n.radius,2)},inLabelRange:pe,inXRange:pe,inYRange:function(e){var t=this._view;return!!t&&Math.abs(e-t.y)<t.radius+t.hitRadius},getCenterPoint:function(){var e=this._view;return{x:e.x,y:e.y}},getArea:function(){return Math.PI*Math.pow(this._view.radius,2)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y,padding:e.radius+e.borderWidth}},draw:function(e){var t=this._view,n=this._chart.ctx,r=t.pointStyle,i=t.rotation,a=t.radius,o=t.x,s=t.y,c=F.global,l=c.defaultColor;t.skip||(void 0===e||H.canvas._isPointInArea(t,e))&&(n.strokeStyle=t.borderColor||l,n.lineWidth=de(t.borderWidth,c.elements.point.borderWidth),n.fillStyle=t.backgroundColor||l,H.canvas.drawPoint(n,r,a,o,s,i))}}),ge=F.global.defaultColor;function _e(e){return e&&void 0!==e.width}function be(e){var t,n,r,i,a;return i=_e(e)?(a=e.width/2,t=e.x-a,n=e.x+a,r=Math.min(e.y,e.base),Math.max(e.y,e.base)):(a=e.height/2,t=Math.min(e.x,e.base),n=Math.max(e.x,e.base),r=e.y-a,e.y+a),{left:t,top:r,right:n,bottom:i}}function ve(e,t,n){return e===t?n:e===n?t:e}function ye(e,t,n){var r,i,a,o,s,c,l,u=e.borderWidth,f=(i=(r=e).borderSkipped,a={},i&&(r.horizontal?r.base>r.x&&(i=ve(i,"left","right")):r.base<r.y&&(i=ve(i,"bottom","top")),a[i]=!0),a);return H.isObject(u)?(o=+u.top||0,s=+u.right||0,c=+u.bottom||0,l=+u.left||0):o=s=c=l=+u||0,{t:f.top||o<0?0:n<o?n:o,r:f.right||s<0?0:t<s?t:s,b:f.bottom||c<0?0:n<c?n:c,l:f.left||l<0?0:t<l?t:l}}function we(e,t,n){var r=null===t,i=null===n,a=!(!e||r&&i)&&be(e);return a&&(r||t>=a.left&&t<=a.right)&&(i||n>=a.top&&n<=a.bottom)}F._set("global",{elements:{rectangle:{backgroundColor:ge,borderColor:ge,borderSkipped:"bottom",borderWidth:0}}});var Ce=Q.extend({_type:"rectangle",draw:function(){var e,t,n,r,i,a=this._chart.ctx,o=this._view,s=(t=be(e=o),n=t.right-t.left,r=t.bottom-t.top,i=ye(e,n/2,r/2),{outer:{x:t.left,y:t.top,w:n,h:r},inner:{x:t.left+i.l,y:t.top+i.t,w:n-i.l-i.r,h:r-i.t-i.b}}),c=s.outer,l=s.inner;a.fillStyle=o.backgroundColor,a.fillRect(c.x,c.y,c.w,c.h),c.w===l.w&&c.h===l.h||(a.save(),a.beginPath(),a.rect(c.x,c.y,c.w,c.h),a.clip(),a.fillStyle=o.borderColor,a.rect(l.x,l.y,l.w,l.h),a.fill("evenodd"),a.restore())},height:function(){var e=this._view;return e.base-e.y},inRange:function(e,t){return we(this._view,e,t)},inLabelRange:function(e,t){var n=this._view;return _e(n)?we(n,e,null):we(n,null,t)},inXRange:function(e){return we(this._view,e,null)},inYRange:function(e){return we(this._view,null,e)},getCenterPoint:function(){var e,t,n=this._view;return t=_e(n)?(e=n.x,(n.y+n.base)/2):(e=(n.x+n.base)/2,n.y),{x:e,y:t}},getArea:function(){var e=this._view;return _e(e)?e.width*Math.abs(e.y-e.base):e.height*Math.abs(e.x-e.base)},tooltipPosition:function(){var e=this._view;return{x:e.x,y:e.y}}}),Ae={},Se=ce,Te=fe,xe=me,ke=Ce;Ae.Arc=Se,Ae.Line=Te,Ae.Point=xe,Ae.Rectangle=ke;var Ee=H._deprecated,De=H.valueOrDefault;function Ie(e,t,n){var r,i,a=n.barThickness,o=t.stackCount,s=t.pixels[e],c=H.isNullOrUndef(a)?function(e,t){var n,r,i,a,o=e._length;for(i=1,a=t.length;i<a;++i)o=Math.min(o,Math.abs(t[i]-t[i-1]));for(i=0,a=e.getTicks().length;i<a;++i)r=e.getPixelForTick(i),o=0<i?Math.min(o,Math.abs(r-n)):o,n=r;return o}(t.scale,t.pixels):-1;return i=H.isNullOrUndef(a)?(r=c*n.categoryPercentage,n.barPercentage):(r=a*o,1),{chunk:r/o,ratio:i,start:s-r/2}}F._set("bar",{hover:{mode:"label"},scales:{xAxes:[{type:"category",offset:!0,gridLines:{offsetGridLines:!0}}],yAxes:[{type:"linear"}]}}),F._set("global",{datasets:{bar:{categoryPercentage:.8,barPercentage:.9}}});var Pe=ie.extend({dataElementType:Ae.Rectangle,_dataElementOptions:["backgroundColor","borderColor","borderSkipped","borderWidth","barPercentage","barThickness","categoryPercentage","maxBarThickness","minBarLength"],initialize:function(){var e,t;ie.prototype.initialize.apply(this,arguments),(e=this.getMeta()).stack=this.getDataset().stack,e.bar=!0,t=this._getIndexScale().options,Ee("bar chart",t.barPercentage,"scales.[x/y]Axes.barPercentage","dataset.barPercentage"),Ee("bar chart",t.barThickness,"scales.[x/y]Axes.barThickness","dataset.barThickness"),Ee("bar chart",t.categoryPercentage,"scales.[x/y]Axes.categoryPercentage","dataset.categoryPercentage"),Ee("bar chart",this._getValueScale().options.minBarLength,"scales.[x/y]Axes.minBarLength","dataset.minBarLength"),Ee("bar chart",t.maxBarThickness,"scales.[x/y]Axes.maxBarThickness","dataset.maxBarThickness")},update:function(e){var t,n,r=this.getMeta().data;for(this._ruler=this.getRuler(),t=0,n=r.length;t<n;++t)this.updateElement(r[t],t,e)},updateElement:function(e,t,n){var r=this.getMeta(),i=this.getDataset(),a=this._resolveDataElementOptions(e,t);e._xScale=this.getScaleForId(r.xAxisID),e._yScale=this.getScaleForId(r.yAxisID),e._datasetIndex=this.index,e._index=t,e._model={backgroundColor:a.backgroundColor,borderColor:a.borderColor,borderSkipped:a.borderSkipped,borderWidth:a.borderWidth,datasetLabel:i.label,label:this.chart.data.labels[t]},H.isArray(i.data[t])&&(e._model.borderSkipped=null),this._updateElementGeometry(e,t,n,a),e.pivot()},_updateElementGeometry:function(e,t,n,r){var i=e._model,a=this._getValueScale(),o=a.getBasePixel(),s=a.isHorizontal(),c=this._ruler||this.getRuler(),l=this.calculateBarValuePixels(this.index,t,r),u=this.calculateBarIndexPixels(this.index,t,c,r);i.horizontal=s,i.base=n?o:l.base,i.x=s?n?o:l.head:u.center,i.y=s?u.center:n?o:l.head,i.height=s?u.size:void 0,i.width=s?void 0:u.size},_getStacks:function(e){var t,n,r=this._getIndexScale(),i=r._getMatchingVisibleMetas(this._type),a=r.options.stacked,o=i.length,s=[];for(t=0;t<o&&(n=i[t],(!1===a||-1===s.indexOf(n.stack)||void 0===a&&void 0===n.stack)&&s.push(n.stack),n.index!==e);++t);return s},getStackCount:function(){return this._getStacks().length},getStackIndex:function(e,t){var n=this._getStacks(e),r=void 0!==t?n.indexOf(t):-1;return-1===r?n.length-1:r},getRuler:function(){var e,t,n=this._getIndexScale(),r=[];for(e=0,t=this.getMeta().data.length;e<t;++e)r.push(n.getPixelForValue(null,e,this.index));return{pixels:r,start:n._startPixel,end:n._endPixel,stackCount:this.getStackCount(),scale:n}},calculateBarValuePixels:function(e,t,n){var r,i,a,o,s,c,l,u=this.chart,f=this._getValueScale(),d=f.isHorizontal(),h=u.data.datasets,p=f._getMatchingVisibleMetas(this._type),m=f._parseValue(h[e].data[t]),g=n.minBarLength,_=f.options.stacked,b=this.getMeta().stack,v=void 0===m.start?0:0<=m.max&&0<=m.min?m.min:m.max,y=void 0===m.start?m.end:0<=m.max&&0<=m.min?m.max-m.min:m.min-m.max,w=p.length;if(_||void 0===_&&void 0!==b)for(r=0;r<w&&(i=p[r]).index!==e;++r)i.stack===b&&(a=void 0===(l=f._parseValue(h[i.index].data[t])).start?l.end:0<=l.min&&0<=l.max?l.max:l.min,(m.min<0&&a<0||0<=m.max&&0<a)&&(v+=a));return o=f.getPixelForValue(v),c=(s=f.getPixelForValue(v+y))-o,void 0!==g&&Math.abs(c)<g&&(c=g,s=0<=y&&!d||y<0&&d?o-g:o+g),{size:c,base:o,head:s,center:s+c/2}},calculateBarIndexPixels:function(e,t,n,r){var i,a,o,s,c,l,u,f,d,h="flex"===r.barThickness?(i=t,o=r,c=(a=n).pixels,l=c[i],u=0<i?c[i-1]:null,f=i<c.length-1?c[i+1]:null,d=o.categoryPercentage,null===u&&(u=l-(null===f?a.end-a.start:f-l)),null===f&&(f=l+l-u),s=l-(l-Math.min(u,f))/2*d,{chunk:Math.abs(f-u)/2*d/a.stackCount,ratio:o.barPercentage,start:s}):Ie(t,n,r),p=this.getStackIndex(e,this.getMeta().stack),m=h.start+h.chunk*p+h.chunk/2,g=Math.min(De(r.maxBarThickness,1/0),h.chunk*h.ratio);return{base:m-g/2,head:m+g/2,center:m,size:g}},draw:function(){var e=this.chart,t=this._getValueScale(),n=this.getMeta().data,r=this.getDataset(),i=n.length,a=0;for(H.canvas.clipArea(e.ctx,e.chartArea);a<i;++a){var o=t._parseValue(r.data[a]);isNaN(o.min)||isNaN(o.max)||n[a].draw()}H.canvas.unclipArea(e.ctx)},_resolveDataElementOptions:function(){var e=H.extend({},ie.prototype._resolveDataElementOptions.apply(this,arguments)),t=this._getIndexScale().options,n=this._getValueScale().options;return e.barPercentage=De(t.barPercentage,e.barPercentage),e.barThickness=De(t.barThickness,e.barThickness),e.categoryPercentage=De(t.categoryPercentage,e.categoryPercentage),e.maxBarThickness=De(t.maxBarThickness,e.maxBarThickness),e.minBarLength=De(n.minBarLength,e.minBarLength),e}}),Me=H.valueOrDefault,$e=H.options.resolve;F._set("bubble",{hover:{mode:"single"},scales:{xAxes:[{type:"linear",position:"bottom",id:"x-axis-0"}],yAxes:[{type:"linear",position:"left",id:"y-axis-0"}]},tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.datasets[e.datasetIndex].label||"",r=t.datasets[e.datasetIndex].data[e.index];return n+": ("+e.xLabel+", "+e.yLabel+", "+r.r+")"}}}});var Oe=ie.extend({dataElementType:Ae.Point,_dataElementOptions:["backgroundColor","borderColor","borderWidth","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth","hoverRadius","hitRadius","pointStyle","rotation"],update:function(n){var r=this,e=r.getMeta().data;H.each(e,function(e,t){r.updateElement(e,t,n)})},updateElement:function(e,t,n){var r=this.getMeta(),i=e.custom||{},a=this.getScaleForId(r.xAxisID),o=this.getScaleForId(r.yAxisID),s=this._resolveDataElementOptions(e,t),c=this.getDataset().data[t],l=this.index,u=n?a.getPixelForDecimal(.5):a.getPixelForValue("object"==typeof c?c:NaN,t,l),f=n?o.getBasePixel():o.getPixelForValue(c,t,l);e._xScale=a,e._yScale=o,e._options=s,e._datasetIndex=l,e._index=t,e._model={backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderWidth:s.borderWidth,hitRadius:s.hitRadius,pointStyle:s.pointStyle,rotation:s.rotation,radius:n?0:s.radius,skip:i.skip||isNaN(u)||isNaN(f),x:u,y:f},e.pivot()},setHoverStyle:function(e){var t=e._model,n=e._options,r=H.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Me(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Me(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Me(n.hoverBorderWidth,n.borderWidth),t.radius=n.radius+n.hoverRadius},_resolveDataElementOptions:function(e,t){var n=this.chart,r=this.getDataset(),i=e.custom||{},a=r.data[t]||{},o=ie.prototype._resolveDataElementOptions.apply(this,arguments),s={chart:n,dataIndex:t,dataset:r,datasetIndex:this.index};return this._cachedDataOpts===o&&(o=H.extend({},o)),o.radius=$e([i.radius,a.r,this._config.radius,n.options.elements.point.radius],s,t),o}}),Re=H.valueOrDefault,Ne=Math.PI,Le=2*Ne,Fe=Ne/2;F._set("doughnut",{animation:{animateRotate:!0,animateScale:!1},hover:{mode:"single"},legendCallback:function(e){var t,n,r,i=document.createElement("ul"),a=e.data,o=a.datasets,s=a.labels;if(i.setAttribute("class",e.id+"-legend"),o.length)for(n=o[t=0].data.length;t<n;++t)(r=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[t],s[t]&&r.appendChild(document.createTextNode(s[t]));return i.outerHTML},legend:{labels:{generateLabels:function(i){var a=i.data;return a.labels.length&&a.datasets.length?a.labels.map(function(e,t){var n=i.getDatasetMeta(0),r=n.controller.getStyle(t);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(a.datasets[0].data[t])||n.data[t].hidden,index:t}}):[]}},onClick:function(e,t){var n,r,i,a=t.index,o=this.chart;for(n=0,r=(o.data.datasets||[]).length;n<r;++n)(i=o.getDatasetMeta(n)).data[a]&&(i.data[a].hidden=!i.data[a].hidden);o.update()}},cutoutPercentage:50,rotation:-Fe,circumference:Le,tooltips:{callbacks:{title:function(){return""},label:function(e,t){var n=t.labels[e.index],r=": "+t.datasets[e.datasetIndex].data[e.index];return H.isArray(n)?(n=n.slice())[0]+=r:n+=r,n}}}});var Ge=ie.extend({dataElementType:Ae.Arc,linkScales:H.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],getRingIndex:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&++t;return t},update:function(e){var t,n,r,i,a=this,o=a.chart,s=o.chartArea,c=o.options,l=1,u=1,f=0,d=0,h=a.getMeta(),p=h.data,m=c.cutoutPercentage/100||0,g=c.circumference,_=a._getRingWeight(a.index);if(g<Le){var b=c.rotation%Le,v=(b+=Ne<=b?-Le:b<-Ne?Le:0)+g,y=Math.cos(b),w=Math.sin(b),C=Math.cos(v),A=Math.sin(v),S=b<=0&&0<=v||Le<=v,T=b<=Fe&&Fe<=v||Le+Fe<=v,x=b<=-Fe&&-Fe<=v||Ne+Fe<=v,k=b===-Ne||Ne<=v?-1:Math.min(y,y*m,C,C*m),E=x?-1:Math.min(w,w*m,A,A*m),D=S?1:Math.max(y,y*m,C,C*m),I=T?1:Math.max(w,w*m,A,A*m);l=(D-k)/2,u=(I-E)/2,f=-(D+k)/2,d=-(I+E)/2}for(r=0,i=p.length;r<i;++r)p[r]._options=a._resolveDataElementOptions(p[r],r);for(o.borderWidth=a.getMaxBorderWidth(),t=(s.right-s.left-o.borderWidth)/l,n=(s.bottom-s.top-o.borderWidth)/u,o.outerRadius=Math.max(Math.min(t,n)/2,0),o.innerRadius=Math.max(o.outerRadius*m,0),o.radiusLength=(o.outerRadius-o.innerRadius)/(a._getVisibleDatasetWeightTotal()||1),o.offsetX=f*o.outerRadius,o.offsetY=d*o.outerRadius,h.total=a.calculateTotal(),a.outerRadius=o.outerRadius-o.radiusLength*a._getRingWeightOffset(a.index),a.innerRadius=Math.max(a.outerRadius-o.radiusLength*_,0),r=0,i=p.length;r<i;++r)a.updateElement(p[r],r,e)},updateElement:function(e,t,n){var r=this.chart,i=r.chartArea,a=r.options,o=a.animation,s=(i.left+i.right)/2,c=(i.top+i.bottom)/2,l=a.rotation,u=a.rotation,f=this.getDataset(),d=n&&o.animateRotate?0:e.hidden?0:this.calculateCircumference(f.data[t])*(a.circumference/Le),h=n&&o.animateScale?0:this.innerRadius,p=n&&o.animateScale?0:this.outerRadius,m=e._options||{};H.extend(e,{_datasetIndex:this.index,_index:t,_model:{backgroundColor:m.backgroundColor,borderColor:m.borderColor,borderWidth:m.borderWidth,borderAlign:m.borderAlign,x:s+r.offsetX,y:c+r.offsetY,startAngle:l,endAngle:u,circumference:d,outerRadius:p,innerRadius:h,label:H.valueAtIndexOrDefault(f.label,t,r.data.labels[t])}});var g=e._model;n&&o.animateRotate||(g.startAngle=0===t?a.rotation:this.getMeta().data[t-1]._model.endAngle,g.endAngle=g.startAngle+g.circumference),e.pivot()},calculateTotal:function(){var n,r=this.getDataset(),e=this.getMeta(),i=0;return H.each(e.data,function(e,t){n=r.data[t],isNaN(n)||e.hidden||(i+=Math.abs(n))}),i},calculateCircumference:function(e){var t=this.getMeta().total;return 0<t&&!isNaN(e)?Le*(Math.abs(e)/t):0},getMaxBorderWidth:function(e){var t,n,r,i,a,o,s,c,l=0,u=this.chart;if(!e)for(t=0,n=u.data.datasets.length;t<n;++t)if(u.isDatasetVisible(t)){e=(r=u.getDatasetMeta(t)).data,t!==this.index&&(a=r.controller);break}if(!e)return 0;for(t=0,n=e.length;t<n;++t)i=e[t],"inner"!==(o=a?(a._configure(),a._resolveDataElementOptions(i,t)):i._options).borderAlign&&(l=(l=l<(s=o.borderWidth)?s:l)<(c=o.hoverBorderWidth)?c:l);return l},setHoverStyle:function(e){var t=e._model,n=e._options,r=H.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=Re(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Re(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Re(n.hoverBorderWidth,n.borderWidth)},_getRingWeightOffset:function(e){for(var t=0,n=0;n<e;++n)this.chart.isDatasetVisible(n)&&(t+=this._getRingWeight(n));return t},_getRingWeight:function(e){return Math.max(Re(this.chart.data.datasets[e].weight,1),0)},_getVisibleDatasetWeightTotal:function(){return this._getRingWeightOffset(this.chart.data.datasets.length)}});F._set("horizontalBar",{hover:{mode:"index",axis:"y"},scales:{xAxes:[{type:"linear",position:"bottom"}],yAxes:[{type:"category",position:"left",offset:!0,gridLines:{offsetGridLines:!0}}]},elements:{rectangle:{borderSkipped:"left"}},tooltips:{mode:"index",axis:"y"}}),F._set("global",{datasets:{horizontalBar:{categoryPercentage:.8,barPercentage:.9}}});var je=Pe.extend({_getValueScaleId:function(){return this.getMeta().xAxisID},_getIndexScaleId:function(){return this.getMeta().yAxisID}}),Be=H.valueOrDefault,Ue=H.options.resolve,He=H.canvas._isPointInArea;function We(e,t){var n=e&&e.options.ticks||{},r=n.reverse,i=void 0===n.min?t:0,a=void 0===n.max?t:0;return{start:r?a:i,end:r?i:a}}F._set("line",{showLines:!0,spanGaps:!1,hover:{mode:"label"},scales:{xAxes:[{type:"category",id:"x-axis-0"}],yAxes:[{type:"linear",id:"y-axis-0"}]}});var qe=ie.extend({datasetElementType:Ae.Line,dataElementType:Ae.Point,_datasetElementOptions:["backgroundColor","borderCapStyle","borderColor","borderDash","borderDashOffset","borderJoinStyle","borderWidth","cubicInterpolationMode","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},update:function(e){var t,n,r=this,i=r.getMeta(),a=i.dataset,o=i.data||[],s=r.chart.options,c=r._config,l=r._showLine=Be(c.showLine,s.showLines);for(r._xScale=r.getScaleForId(i.xAxisID),r._yScale=r.getScaleForId(i.yAxisID),l&&(void 0!==c.tension&&void 0===c.lineTension&&(c.lineTension=c.tension),a._scale=r._yScale,a._datasetIndex=r.index,a._children=o,a._model=r._resolveDatasetElementOptions(a),a.pivot()),t=0,n=o.length;t<n;++t)r.updateElement(o[t],t,e);for(l&&0!==a._model.tension&&r.updateBezierControlPoints(),t=0,n=o.length;t<n;++t)o[t].pivot()},updateElement:function(e,t,n){var r,i,a=this.getMeta(),o=e.custom||{},s=this.getDataset(),c=this.index,l=s.data[t],u=this._xScale,f=this._yScale,d=a.dataset._model,h=this._resolveDataElementOptions(e,t);r=u.getPixelForValue("object"==typeof l?l:NaN,t,c),i=n?f.getBasePixel():this.calculatePointY(l,t,c),e._xScale=u,e._yScale=f,e._options=h,e._datasetIndex=c,e._index=t,e._model={x:r,y:i,skip:o.skip||isNaN(r)||isNaN(i),radius:h.radius,pointStyle:h.pointStyle,rotation:h.rotation,backgroundColor:h.backgroundColor,borderColor:h.borderColor,borderWidth:h.borderWidth,tension:Be(o.tension,d?d.tension:0),steppedLine:!!d&&d.steppedLine,hitRadius:h.hitRadius}},_resolveDatasetElementOptions:function(e){var t,n,r,i,a,o,s,c,l,u,f,d=this._config,h=e.custom||{},p=this.chart.options,m=p.elements.line,g=ie.prototype._resolveDatasetElementOptions.apply(this,arguments);return g.spanGaps=Be(d.spanGaps,p.spanGaps),g.tension=Be(d.lineTension,m.tension),g.steppedLine=Ue([h.steppedLine,d.steppedLine,m.stepped]),g.clip=(t=Be(d.clip,(o=this._xScale,s=this._yScale,c=g.borderWidth,u=We(o,l=c/2),{top:(f=We(s,l)).end,right:u.end,bottom:f.start,left:u.start})),H.isObject(t)?(n=t.top,r=t.right,i=t.bottom,a=t.left):n=r=i=a=t,{top:n,right:r,bottom:i,left:a}),g},calculatePointY:function(e,t,n){var r,i,a,o,s,c,l,u=this.chart,f=this._yScale,d=0,h=0;if(f.options.stacked){for(s=+f.getRightValue(e),l=(c=u._getSortedVisibleDatasetMetas()).length,r=0;r<l&&(a=c[r]).index!==n;++r)i=u.data.datasets[a.index],"line"===a.type&&a.yAxisID===f.id&&((o=+f.getRightValue(i.data[t]))<0?h+=o||0:d+=o||0);return s<0?f.getPixelForValue(h+s):f.getPixelForValue(d+s)}return f.getPixelForValue(e)},updateBezierControlPoints:function(){var e,t,n,r,i=this.chart,a=this.getMeta(),o=a.dataset._model,s=i.chartArea,c=a.data||[];function l(e,t,n){return Math.max(Math.min(e,n),t)}if(o.spanGaps&&(c=c.filter(function(e){return!e._model.skip})),"monotone"===o.cubicInterpolationMode)H.splineCurveMonotone(c);else for(e=0,t=c.length;e<t;++e)n=c[e]._model,r=H.splineCurve(H.previousItem(c,e)._model,n,H.nextItem(c,e)._model,o.tension),n.controlPointPreviousX=r.previous.x,n.controlPointPreviousY=r.previous.y,n.controlPointNextX=r.next.x,n.controlPointNextY=r.next.y;if(i.options.elements.line.capBezierPoints)for(e=0,t=c.length;e<t;++e)n=c[e]._model,He(n,s)&&(0<e&&He(c[e-1]._model,s)&&(n.controlPointPreviousX=l(n.controlPointPreviousX,s.left,s.right),n.controlPointPreviousY=l(n.controlPointPreviousY,s.top,s.bottom)),e<c.length-1&&He(c[e+1]._model,s)&&(n.controlPointNextX=l(n.controlPointNextX,s.left,s.right),n.controlPointNextY=l(n.controlPointNextY,s.top,s.bottom)))},draw:function(){var e,t=this.chart,n=this.getMeta(),r=n.data||[],i=t.chartArea,a=t.canvas,o=0,s=r.length;for(this._showLine&&(e=n.dataset._model.clip,H.canvas.clipArea(t.ctx,{left:!1===e.left?0:i.left-e.left,right:!1===e.right?a.width:i.right+e.right,top:!1===e.top?0:i.top-e.top,bottom:!1===e.bottom?a.height:i.bottom+e.bottom}),n.dataset.draw(),H.canvas.unclipArea(t.ctx));o<s;++o)r[o].draw(i)},setHoverStyle:function(e){var t=e._model,n=e._options,r=H.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Be(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Be(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Be(n.hoverBorderWidth,n.borderWidth),t.radius=Be(n.hoverRadius,n.radius)}}),ze=H.options.resolve;F._set("polarArea",{scale:{type:"radialLinear",angleLines:{display:!1},gridLines:{circular:!0},pointLabels:{display:!1},ticks:{beginAtZero:!0}},animation:{animateRotate:!0,animateScale:!0},startAngle:-.5*Math.PI,legendCallback:function(e){var t,n,r,i=document.createElement("ul"),a=e.data,o=a.datasets,s=a.labels;if(i.setAttribute("class",e.id+"-legend"),o.length)for(n=o[t=0].data.length;t<n;++t)(r=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=o[0].backgroundColor[t],s[t]&&r.appendChild(document.createTextNode(s[t]));return i.outerHTML},legend:{labels:{generateLabels:function(i){var a=i.data;return a.labels.length&&a.datasets.length?a.labels.map(function(e,t){var n=i.getDatasetMeta(0),r=n.controller.getStyle(t);return{text:e,fillStyle:r.backgroundColor,strokeStyle:r.borderColor,lineWidth:r.borderWidth,hidden:isNaN(a.datasets[0].data[t])||n.data[t].hidden,index:t}}):[]}},onClick:function(e,t){var n,r,i,a=t.index,o=this.chart;for(n=0,r=(o.data.datasets||[]).length;n<r;++n)(i=o.getDatasetMeta(n)).data[a].hidden=!i.data[a].hidden;o.update()}},tooltips:{callbacks:{title:function(){return""},label:function(e,t){return t.labels[e.index]+": "+e.yLabel}}}});var Ve=ie.extend({dataElementType:Ae.Arc,linkScales:H.noop,_dataElementOptions:["backgroundColor","borderColor","borderWidth","borderAlign","hoverBackgroundColor","hoverBorderColor","hoverBorderWidth"],_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var t,n,r,i=this,a=i.getDataset(),o=i.getMeta(),s=i.chart.options.startAngle||0,c=i._starts=[],l=i._angles=[],u=o.data;for(i._updateRadius(),o.count=i.countVisibleElements(),t=0,n=a.data.length;t<n;t++)c[t]=s,r=i._computeAngle(t),s+=l[t]=r;for(t=0,n=u.length;t<n;++t)u[t]._options=i._resolveDataElementOptions(u[t],t),i.updateElement(u[t],t,e)},_updateRadius:function(){var e=this.chart,t=e.chartArea,n=e.options,r=Math.min(t.right-t.left,t.bottom-t.top);e.outerRadius=Math.max(r/2,0),e.innerRadius=Math.max(n.cutoutPercentage?e.outerRadius/100*n.cutoutPercentage:1,0),e.radiusLength=(e.outerRadius-e.innerRadius)/e.getVisibleDatasetCount(),this.outerRadius=e.outerRadius-e.radiusLength*this.index,this.innerRadius=this.outerRadius-e.radiusLength},updateElement:function(e,t,n){var r=this.chart,i=this.getDataset(),a=r.options,o=a.animation,s=r.scale,c=r.data.labels,l=s.xCenter,u=s.yCenter,f=a.startAngle,d=e.hidden?0:s.getDistanceFromCenterForValue(i.data[t]),h=this._starts[t],p=h+(e.hidden?0:this._angles[t]),m=o.animateScale?0:s.getDistanceFromCenterForValue(i.data[t]),g=e._options||{};H.extend(e,{_datasetIndex:this.index,_index:t,_scale:s,_model:{backgroundColor:g.backgroundColor,borderColor:g.borderColor,borderWidth:g.borderWidth,borderAlign:g.borderAlign,x:l,y:u,innerRadius:0,outerRadius:n?m:d,startAngle:n&&o.animateRotate?f:h,endAngle:n&&o.animateRotate?f:p,label:H.valueAtIndexOrDefault(c,t,c[t])}}),e.pivot()},countVisibleElements:function(){var n=this.getDataset(),e=this.getMeta(),r=0;return H.each(e.data,function(e,t){isNaN(n.data[t])||e.hidden||r++}),r},setHoverStyle:function(e){var t=e._model,n=e._options,r=H.getHoverColor,i=H.valueOrDefault;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth},t.backgroundColor=i(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=i(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=i(n.hoverBorderWidth,n.borderWidth)},_computeAngle:function(e){var t=this.getMeta().count,n=this.getDataset(),r=this.getMeta();if(isNaN(n.data[e])||r.data[e].hidden)return 0;var i={chart:this.chart,dataIndex:e,dataset:n,datasetIndex:this.index};return ze([this.chart.options.elements.arc.angle,2*Math.PI/t],i,e)}});F._set("pie",H.clone(F.doughnut)),F._set("pie",{cutoutPercentage:0});var Ye=Ge,Ke=H.valueOrDefault;F._set("radar",{spanGaps:!1,scale:{type:"radialLinear"},elements:{line:{fill:"start",tension:0}}});var Qe=ie.extend({datasetElementType:Ae.Line,dataElementType:Ae.Point,linkScales:H.noop,_datasetElementOptions:["backgroundColor","borderWidth","borderColor","borderCapStyle","borderDash","borderDashOffset","borderJoinStyle","fill"],_dataElementOptions:{backgroundColor:"pointBackgroundColor",borderColor:"pointBorderColor",borderWidth:"pointBorderWidth",hitRadius:"pointHitRadius",hoverBackgroundColor:"pointHoverBackgroundColor",hoverBorderColor:"pointHoverBorderColor",hoverBorderWidth:"pointHoverBorderWidth",hoverRadius:"pointHoverRadius",pointStyle:"pointStyle",radius:"pointRadius",rotation:"pointRotation"},_getIndexScaleId:function(){return this.chart.scale.id},_getValueScaleId:function(){return this.chart.scale.id},update:function(e){var t,n,r=this.getMeta(),i=r.dataset,a=r.data||[],o=this.chart.scale,s=this._config;for(void 0!==s.tension&&void 0===s.lineTension&&(s.lineTension=s.tension),i._scale=o,i._datasetIndex=this.index,i._children=a,i._loop=!0,i._model=this._resolveDatasetElementOptions(i),i.pivot(),t=0,n=a.length;t<n;++t)this.updateElement(a[t],t,e);for(this.updateBezierControlPoints(),t=0,n=a.length;t<n;++t)a[t].pivot()},updateElement:function(e,t,n){var r=e.custom||{},i=this.getDataset(),a=this.chart.scale,o=a.getPointPositionForValue(t,i.data[t]),s=this._resolveDataElementOptions(e,t),c=this.getMeta().dataset._model,l=n?a.xCenter:o.x,u=n?a.yCenter:o.y;e._scale=a,e._options=s,e._datasetIndex=this.index,e._index=t,e._model={x:l,y:u,skip:r.skip||isNaN(l)||isNaN(u),radius:s.radius,pointStyle:s.pointStyle,rotation:s.rotation,backgroundColor:s.backgroundColor,borderColor:s.borderColor,borderWidth:s.borderWidth,tension:Ke(r.tension,c?c.tension:0),hitRadius:s.hitRadius}},_resolveDatasetElementOptions:function(){var e=this._config,t=this.chart.options,n=ie.prototype._resolveDatasetElementOptions.apply(this,arguments);return n.spanGaps=Ke(e.spanGaps,t.spanGaps),n.tension=Ke(e.lineTension,t.elements.line.tension),n},updateBezierControlPoints:function(){var e,t,n,r,i=this.getMeta(),a=this.chart.chartArea,o=i.data||[];function s(e,t,n){return Math.max(Math.min(e,n),t)}for(i.dataset._model.spanGaps&&(o=o.filter(function(e){return!e._model.skip})),e=0,t=o.length;e<t;++e)n=o[e]._model,r=H.splineCurve(H.previousItem(o,e,!0)._model,n,H.nextItem(o,e,!0)._model,n.tension),n.controlPointPreviousX=s(r.previous.x,a.left,a.right),n.controlPointPreviousY=s(r.previous.y,a.top,a.bottom),n.controlPointNextX=s(r.next.x,a.left,a.right),n.controlPointNextY=s(r.next.y,a.top,a.bottom)},setHoverStyle:function(e){var t=e._model,n=e._options,r=H.getHoverColor;e.$previousStyle={backgroundColor:t.backgroundColor,borderColor:t.borderColor,borderWidth:t.borderWidth,radius:t.radius},t.backgroundColor=Ke(n.hoverBackgroundColor,r(n.backgroundColor)),t.borderColor=Ke(n.hoverBorderColor,r(n.borderColor)),t.borderWidth=Ke(n.hoverBorderWidth,n.borderWidth),t.radius=Ke(n.hoverRadius,n.radius)}});F._set("scatter",{hover:{mode:"single"},scales:{xAxes:[{id:"x-axis-1",type:"linear",position:"bottom"}],yAxes:[{id:"y-axis-1",type:"linear",position:"left"}]},tooltips:{callbacks:{title:function(){return""},label:function(e){return"("+e.xLabel+", "+e.yLabel+")"}}}}),F._set("global",{datasets:{scatter:{showLine:!1}}});var Xe={bar:Pe,bubble:Oe,doughnut:Ge,horizontalBar:je,line:qe,polarArea:Ve,pie:Ye,radar:Qe,scatter:qe};function Ze(e,t){return e.native?{x:e.x,y:e.y}:H.getRelativePosition(e,t)}function Je(e,t){var n,r,i,a,o,s,c=e._getSortedVisibleDatasetMetas();for(r=0,a=c.length;r<a;++r)for(i=0,o=(n=c[r].data).length;i<o;++i)(s=n[i])._view.skip||t(s)}function et(e,t){var n=[];return Je(e,function(e){e.inRange(t.x,t.y)&&n.push(e)}),n}function tt(e,r,i,a){var o=Number.POSITIVE_INFINITY,s=[];return Je(e,function(e){if(!i||e.inRange(r.x,r.y)){var t=e.getCenterPoint(),n=a(r,t);n<o?(s=[e],o=n):n===o&&s.push(e)}}),s}function nt(e){var i=-1!==e.indexOf("x"),a=-1!==e.indexOf("y");return function(e,t){var n=i?Math.abs(e.x-t.x):0,r=a?Math.abs(e.y-t.y):0;return Math.sqrt(Math.pow(n,2)+Math.pow(r,2))}}function rt(e,t,n){var r=Ze(t,e);n.axis=n.axis||"x";var i=nt(n.axis),a=n.intersect?et(e,r):tt(e,r,!1,i),o=[];return a.length?(e._getSortedVisibleDatasetMetas().forEach(function(e){var t=e.data[a[0]._index];t&&!t._view.skip&&o.push(t)}),o):[]}var it={modes:{single:function(e,t){var n=Ze(t,e),r=[];return Je(e,function(e){if(e.inRange(n.x,n.y))return r.push(e),r}),r.slice(0,1)},label:rt,index:rt,dataset:function(e,t,n){var r=Ze(t,e);n.axis=n.axis||"xy";var i=nt(n.axis),a=n.intersect?et(e,r):tt(e,r,!1,i);return 0<a.length&&(a=e.getDatasetMeta(a[0]._datasetIndex).data),a},"x-axis":function(e,t){return rt(e,t,{intersect:!1})},point:function(e,t){return et(e,Ze(t,e))},nearest:function(e,t,n){var r=Ze(t,e);n.axis=n.axis||"xy";var i=nt(n.axis);return tt(e,r,n.intersect,i)},x:function(e,t,n){var r=Ze(t,e),i=[],a=!1;return Je(e,function(e){e.inXRange(r.x)&&i.push(e),e.inRange(r.x,r.y)&&(a=!0)}),n.intersect&&!a&&(i=[]),i},y:function(e,t,n){var r=Ze(t,e),i=[],a=!1;return Je(e,function(e){e.inYRange(r.y)&&i.push(e),e.inRange(r.x,r.y)&&(a=!0)}),n.intersect&&!a&&(i=[]),i}}},at=H.extend;function ot(e,t){return H.where(e,function(e){return e.pos===t})}function st(e,i){return e.sort(function(e,t){var n=i?t:e,r=i?e:t;return n.weight===r.weight?n.index-r.index:n.weight-r.weight})}function ct(e,t,n,r){return Math.max(e[n],t[n])+Math.max(e[r],t[r])}function lt(e,t,n){var r,i,a=n.box,o=e.maxPadding;if(n.size&&(e[n.pos]-=n.size),n.size=n.horizontal?a.height:a.width,e[n.pos]+=n.size,a.getPadding){var s=a.getPadding();o.top=Math.max(o.top,s.top),o.left=Math.max(o.left,s.left),o.bottom=Math.max(o.bottom,s.bottom),o.right=Math.max(o.right,s.right)}if(r=t.outerWidth-ct(o,e,"left","right"),i=t.outerHeight-ct(o,e,"top","bottom"),r!==e.w||i!==e.h){e.w=r,e.h=i;var c=n.horizontal?[r,e.w]:[i,e.h];return!(c[0]===c[1]||isNaN(c[0])&&isNaN(c[1]))}}function ut(e,n){var r=n.maxPadding;function t(e){var t={left:0,top:0,right:0,bottom:0};return e.forEach(function(e){t[e]=Math.max(n[e],r[e])}),t}return t(e?["left","right"]:["top","bottom"])}function ft(e,t,n){var r,i,a,o,s,c,l=[];for(r=0,i=e.length;r<i;++r)(o=(a=e[r]).box).update(a.width||t.w,a.height||t.h,ut(a.horizontal,t)),lt(t,n,a)&&(c=!0,l.length&&(s=!0)),o.fullWidth||l.push(a);return s&&ft(l,t,n)||c}function dt(e,t,n){var r,i,a,o,s=n.padding,c=t.x,l=t.y;for(r=0,i=e.length;r<i;++r)o=(a=e[r]).box,a.horizontal?(o.left=o.fullWidth?s.left:t.left,o.right=o.fullWidth?n.outerWidth-s.right:t.left+t.w,o.top=l,o.bottom=l+o.height,o.width=o.right-o.left,l=o.bottom):(o.left=c,o.right=c+o.width,o.top=t.top,o.bottom=t.top+t.h,o.height=o.bottom-o.top,c=o.right);t.x=c,t.y=l}F._set("global",{layout:{padding:{top:0,right:0,bottom:0,left:0}}});var ht,pt={defaults:{},addBox:function(e,t){e.boxes||(e.boxes=[]),t.fullWidth=t.fullWidth||!1,t.position=t.position||"top",t.weight=t.weight||0,t._layers=t._layers||function(){return[{z:0,draw:function(){t.draw.apply(t,arguments)}}]},e.boxes.push(t)},removeBox:function(e,t){var n=e.boxes?e.boxes.indexOf(t):-1;-1!==n&&e.boxes.splice(n,1)},configure:function(e,t,n){for(var r,i=["fullWidth","position","weight"],a=i.length,o=0;o<a;++o)r=i[o],n.hasOwnProperty(r)&&(t[r]=n[r])},update:function(n,e,t){if(n){var r,i,a,o,s,c,l=n.options.layout||{},u=H.options.toPadding(l.padding),f=e-u.width,d=t-u.height,h=(r=n.boxes,i=function(e){var t,n,r,i=[];for(t=0,n=(e||[]).length;t<n;++t)r=e[t],i.push({index:t,box:r,pos:r.position,horizontal:r.isHorizontal(),weight:r.weight});return i}(r),a=st(ot(i,"left"),!0),o=st(ot(i,"right")),s=st(ot(i,"top"),!0),c=st(ot(i,"bottom")),{leftAndTop:a.concat(s),rightAndBottom:o.concat(c),chartArea:ot(i,"chartArea"),vertical:a.concat(o),horizontal:s.concat(c)}),p=h.vertical,m=h.horizontal,g=Object.freeze({outerWidth:e,outerHeight:t,padding:u,availableWidth:f,vBoxMaxWidth:f/2/p.length,hBoxMaxHeight:d/2}),_=at({maxPadding:at({},u),w:f,h:d,x:u.left,y:u.top},u);!function(e,t){var n,r,i;for(n=0,r=e.length;n<r;++n)(i=e[n]).width=i.horizontal?i.box.fullWidth&&t.availableWidth:t.vBoxMaxWidth,i.height=i.horizontal&&t.hBoxMaxHeight}(p.concat(m),g),ft(p,_,g),ft(m,_,g)&&ft(p,_,g),function(n){var r=n.maxPadding;function e(e){var t=Math.max(r[e]-n[e],0);return n[e]+=t,t}n.y+=e("top"),n.x+=e("left"),e("right"),e("bottom")}(_),dt(h.leftAndTop,_,g),_.x+=_.w,_.y+=_.h,dt(h.rightAndBottom,_,g),n.chartArea={left:_.left,top:_.top,right:_.left+_.w,bottom:_.top+_.h},H.each(h.chartArea,function(e){var t=e.box;at(t,n.chartArea),t.update(_.w,_.h)})}}},mt=(ht=Object.freeze({__proto__:null,default:"/*\n * DOM element rendering detection\n * https://davidwalsh.name/detect-node-insertion\n */\n@keyframes chartjs-render-animation {\n\tfrom { opacity: 0.99; }\n\tto { opacity: 1; }\n}\n\n.chartjs-render-monitor {\n\tanimation: chartjs-render-animation 0.001s;\n}\n\n/*\n * DOM element resizing detection\n * https://github.com/marcj/css-element-queries\n */\n.chartjs-size-monitor,\n.chartjs-size-monitor-expand,\n.chartjs-size-monitor-shrink {\n\tposition: absolute;\n\tdirection: ltr;\n\tleft: 0;\n\ttop: 0;\n\tright: 0;\n\tbottom: 0;\n\toverflow: hidden;\n\tpointer-events: none;\n\tvisibility: hidden;\n\tz-index: -1;\n}\n\n.chartjs-size-monitor-expand > div {\n\tposition: absolute;\n\twidth: 1000000px;\n\theight: 1000000px;\n\tleft: 0;\n\ttop: 0;\n}\n\n.chartjs-size-monitor-shrink > div {\n\tposition: absolute;\n\twidth: 200%;\n\theight: 200%;\n\tleft: 0;\n\ttop: 0;\n}\n"}))&&ht.default||ht,gt="$chartjs",_t="chartjs-",bt=_t+"size-monitor",vt=_t+"render-monitor",yt=_t+"render-animation",wt=["animationstart","webkitAnimationStart"],Ct={touchstart:"mousedown",touchmove:"mousemove",touchend:"mouseup",pointerenter:"mouseenter",pointerdown:"mousedown",pointermove:"mousemove",pointerup:"mouseup",pointerleave:"mouseout",pointerout:"mouseout"};function At(e,t){var n=H.getStyle(e,t),r=n&&n.match(/^(\d+)(\.\d+)?px$/);return r?Number(r[1]):void 0}var St=!!function(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("e",null,t)}catch(e){}return e}()&&{passive:!0};function Tt(e,t,n){e.addEventListener(t,n,St)}function xt(e,t,n){e.removeEventListener(t,n,St)}function kt(e,t,n,r,i){return{type:e,chart:t,native:i||null,x:void 0!==n?n:null,y:void 0!==r?r:null}}function Et(e){var t=document.createElement("div");return t.className=e||"",t}function Dt(n,r,i){var e,t,a,o,s,c,l,u,f=n[gt]||(n[gt]={}),d=f.resizer=function(e){var t=Et(bt),n=Et(bt+"-expand"),r=Et(bt+"-shrink");n.appendChild(Et()),r.appendChild(Et()),t.appendChild(n),t.appendChild(r),t._reset=function(){n.scrollLeft=1e6,n.scrollTop=1e6,r.scrollLeft=1e6,r.scrollTop=1e6};var i=function(){t._reset(),e()};return Tt(n,"scroll",i.bind(n,"expand")),Tt(r,"scroll",i.bind(r,"shrink")),t}((a=!(e=function(){if(f.resizer){var e=i.options.maintainAspectRatio&&n.parentNode,t=e?e.clientWidth:0;r(kt("resize",i)),e&&e.clientWidth<t&&i.canvas&&r(kt("resize",i))}}),o=[],function(){o=Array.prototype.slice.call(arguments),t=t||this,a||(a=!0,H.requestAnimFrame.call(window,function(){a=!1,e.apply(t,o)}))}));c=function(){if(f.resizer){var e=n.parentNode;e&&e!==d.parentNode&&e.insertBefore(d,e.firstChild),d._reset()}},l=(s=n)[gt]||(s[gt]={}),u=l.renderProxy=function(e){e.animationName===yt&&c()},H.each(wt,function(e){Tt(s,e,u)}),l.reflow=!!s.offsetParent,s.classList.add(vt)}function It(e){var t,n,r,i=e[gt]||{},a=i.resizer;delete i.resizer,n=(t=e)[gt]||{},(r=n.renderProxy)&&(H.each(wt,function(e){xt(t,e,r)}),delete n.renderProxy),t.classList.remove(vt),a&&a.parentNode&&a.parentNode.removeChild(a)}var Pt={disableCSSInjection:!1,_enabled:"undefined"!=typeof window&&"undefined"!=typeof document,_ensureLoaded:function(e){if(!this.disableCSSInjection){var t=e.getRootNode?e.getRootNode():document;!function(e,t){var n=e[gt]||(e[gt]={});if(!n.containsStyles){n.containsStyles=!0,t="/* Chart.js */\n"+t;var r=document.createElement("style");r.setAttribute("type","text/css"),r.appendChild(document.createTextNode(t)),e.appendChild(r)}}(t.host?t:document.head,mt)}},acquireContext:function(e,t){"string"==typeof e?e=document.getElementById(e):e.length&&(e=e[0]),e&&e.canvas&&(e=e.canvas);var n=e&&e.getContext&&e.getContext("2d");return n&&n.canvas===e?(this._ensureLoaded(e),function(e,t){var n=e.style,r=e.getAttribute("height"),i=e.getAttribute("width");if(e[gt]={initial:{height:r,width:i,style:{display:n.display,height:n.height,width:n.width}}},n.display=n.display||"block",null===i||""===i){var a=At(e,"width");void 0!==a&&(e.width=a)}if(null===r||""===r)if(""===e.style.height)e.height=e.width/(t.options.aspectRatio||2);else{var o=At(e,"height");void 0!==a&&(e.height=o)}}(e,t),n):null},releaseContext:function(e){var n=e.canvas;if(n[gt]){var r=n[gt].initial;["height","width"].forEach(function(e){var t=r[e];H.isNullOrUndef(t)?n.removeAttribute(e):n.setAttribute(e,t)}),H.each(r.style||{},function(e,t){n.style[t]=e}),n.width=n.width,delete n[gt]}},addEventListener:function(a,e,o){var t=a.canvas;if("resize"!==e){var n=o[gt]||(o[gt]={});Tt(t,e,(n.proxies||(n.proxies={}))[a.id+"_"+e]=function(e){var t,n,r,i;o((n=a,r=Ct[(t=e).type]||t.type,i=H.getRelativePosition(t,n),kt(r,n,i.x,i.y,t)))})}else Dt(t,o,a)},removeEventListener:function(e,t,n){var r=e.canvas;if("resize"!==t){var i=((n[gt]||{}).proxies||{})[e.id+"_"+t];i&&xt(r,t,i)}else It(r)}};H.addEvent=Tt,H.removeEvent=xt;var Mt=Pt._enabled?Pt:{acquireContext:function(e){return e&&e.canvas&&(e=e.canvas),e&&e.getContext("2d")||null}},$t=H.extend({initialize:function(){},acquireContext:function(){},releaseContext:function(){},addEventListener:function(){},removeEventListener:function(){}},Mt);F._set("global",{plugins:{}});var Ot={_plugins:[],_cacheId:0,register:function(e){var t=this._plugins;[].concat(e).forEach(function(e){-1===t.indexOf(e)&&t.push(e)}),this._cacheId++},unregister:function(e){var n=this._plugins;[].concat(e).forEach(function(e){var t=n.indexOf(e);-1!==t&&n.splice(t,1)}),this._cacheId++},clear:function(){this._plugins=[],this._cacheId++},count:function(){return this._plugins.length},getAll:function(){return this._plugins},notify:function(e,t,n){var r,i,a,o,s,c=this.descriptors(e),l=c.length;for(r=0;r<l;++r)if("function"==typeof(s=(a=(i=c[r]).plugin)[t])&&((o=[e].concat(n||[])).push(i.options),!1===s.apply(a,o)))return!1;return!0},descriptors:function(e){var t=e.$plugins||(e.$plugins={});if(t.id===this._cacheId)return t.descriptors;var r=[],i=[],n=e&&e.config||{},a=n.options&&n.options.plugins||{};return this._plugins.concat(n.plugins||[]).forEach(function(e){if(-1===r.indexOf(e)){var t=e.id,n=a[t];!1!==n&&(!0===n&&(n=H.clone(F.global.plugins[t])),r.push(e),i.push({plugin:e,options:n||{}}))}}),t.descriptors=i,t.id=this._cacheId,i},_invalidate:function(e){delete e.$plugins}},Rt={constructors:{},defaults:{},registerScaleType:function(e,t,n){this.constructors[e]=t,this.defaults[e]=H.clone(n)},getScaleConstructor:function(e){return this.constructors.hasOwnProperty(e)?this.constructors[e]:void 0},getScaleDefaults:function(e){return this.defaults.hasOwnProperty(e)?H.merge(Object.create(null),[F.scale,this.defaults[e]]):{}},updateScaleDefaults:function(e,t){this.defaults.hasOwnProperty(e)&&(this.defaults[e]=H.extend(this.defaults[e],t))},addScalesToLayout:function(t){H.each(t.scales,function(e){e.fullWidth=e.options.fullWidth,e.position=e.options.position,e.weight=e.options.weight,pt.addBox(t,e)})}},Nt=H.valueOrDefault,Lt=H.rtl.getRtlAdapter;F._set("global",{tooltips:{enabled:!0,custom:null,mode:"nearest",position:"average",intersect:!0,backgroundColor:"rgba(0,0,0,0.8)",titleFontStyle:"bold",titleSpacing:2,titleMarginBottom:6,titleFontColor:"#fff",titleAlign:"left",bodySpacing:2,bodyFontColor:"#fff",bodyAlign:"left",footerFontStyle:"bold",footerSpacing:2,footerMarginTop:6,footerFontColor:"#fff",footerAlign:"left",yPadding:6,xPadding:6,caretPadding:2,caretSize:5,cornerRadius:6,multiKeyBackground:"#fff",displayColors:!0,borderColor:"rgba(0,0,0,0)",borderWidth:0,callbacks:{beforeTitle:H.noop,title:function(e,t){var n="",r=t.labels,i=r?r.length:0;if(0<e.length){var a=e[0];a.label?n=a.label:a.xLabel?n=a.xLabel:0<i&&a.index<i&&(n=r[a.index])}return n},afterTitle:H.noop,beforeBody:H.noop,beforeLabel:H.noop,label:function(e,t){var n=t.datasets[e.datasetIndex].label||"";return n&&(n+=": "),H.isNullOrUndef(e.value)?n+=e.yLabel:n+=e.value,n},labelColor:function(e,t){var n=t.getDatasetMeta(e.datasetIndex).data[e.index]._view;return{borderColor:n.borderColor,backgroundColor:n.backgroundColor}},labelTextColor:function(){return this._options.bodyFontColor},afterLabel:H.noop,afterBody:H.noop,beforeFooter:H.noop,footer:H.noop,afterFooter:H.noop}}});var Ft={average:function(e){if(!e.length)return!1;var t,n,r=0,i=0,a=0;for(t=0,n=e.length;t<n;++t){var o=e[t];if(o&&o.hasValue()){var s=o.tooltipPosition();r+=s.x,i+=s.y,++a}}return{x:r/a,y:i/a}},nearest:function(e,t){var n,r,i,a=t.x,o=t.y,s=Number.POSITIVE_INFINITY;for(n=0,r=e.length;n<r;++n){var c=e[n];if(c&&c.hasValue()){var l=c.getCenterPoint(),u=H.distanceBetweenPoints(t,l);u<s&&(s=u,i=c)}}if(i){var f=i.tooltipPosition();a=f.x,o=f.y}return{x:a,y:o}}};function Gt(e,t){return t&&(H.isArray(t)?Array.prototype.push.apply(e,t):e.push(t)),e}function jt(e){return("string"==typeof e||e instanceof String)&&-1<e.indexOf("\n")?e.split("\n"):e}function Bt(e){var t=F.global;return{xPadding:e.xPadding,yPadding:e.yPadding,xAlign:e.xAlign,yAlign:e.yAlign,rtl:e.rtl,textDirection:e.textDirection,bodyFontColor:e.bodyFontColor,_bodyFontFamily:Nt(e.bodyFontFamily,t.defaultFontFamily),_bodyFontStyle:Nt(e.bodyFontStyle,t.defaultFontStyle),_bodyAlign:e.bodyAlign,bodyFontSize:Nt(e.bodyFontSize,t.defaultFontSize),bodySpacing:e.bodySpacing,titleFontColor:e.titleFontColor,_titleFontFamily:Nt(e.titleFontFamily,t.defaultFontFamily),_titleFontStyle:Nt(e.titleFontStyle,t.defaultFontStyle),titleFontSize:Nt(e.titleFontSize,t.defaultFontSize),_titleAlign:e.titleAlign,titleSpacing:e.titleSpacing,titleMarginBottom:e.titleMarginBottom,footerFontColor:e.footerFontColor,_footerFontFamily:Nt(e.footerFontFamily,t.defaultFontFamily),_footerFontStyle:Nt(e.footerFontStyle,t.defaultFontStyle),footerFontSize:Nt(e.footerFontSize,t.defaultFontSize),_footerAlign:e.footerAlign,footerSpacing:e.footerSpacing,footerMarginTop:e.footerMarginTop,caretSize:e.caretSize,cornerRadius:e.cornerRadius,backgroundColor:e.backgroundColor,opacity:0,legendColorBackground:e.multiKeyBackground,displayColors:e.displayColors,borderColor:e.borderColor,borderWidth:e.borderWidth}}function Ut(e,t){return"center"===t?e.x+e.width/2:"right"===t?e.x+e.width-e.xPadding:e.x+e.xPadding}function Ht(e){return Gt([],jt(e))}var Wt=Q.extend({initialize:function(){this._model=Bt(this._options),this._lastActive=[]},getTitle:function(){var e=this._options.callbacks,t=e.beforeTitle.apply(this,arguments),n=e.title.apply(this,arguments),r=e.afterTitle.apply(this,arguments),i=[];return i=Gt(i=Gt(i=Gt(i,jt(t)),jt(n)),jt(r))},getBeforeBody:function(){return Ht(this._options.callbacks.beforeBody.apply(this,arguments))},getBody:function(e,n){var r=this,i=r._options.callbacks,a=[];return H.each(e,function(e){var t={before:[],lines:[],after:[]};Gt(t.before,jt(i.beforeLabel.call(r,e,n))),Gt(t.lines,i.label.call(r,e,n)),Gt(t.after,jt(i.afterLabel.call(r,e,n))),a.push(t)}),a},getAfterBody:function(){return Ht(this._options.callbacks.afterBody.apply(this,arguments))},getFooter:function(){var e=this._options.callbacks,t=e.beforeFooter.apply(this,arguments),n=e.footer.apply(this,arguments),r=e.afterFooter.apply(this,arguments),i=[];return i=Gt(i=Gt(i=Gt(i,jt(t)),jt(n)),jt(r))},update:function(e){var t,n,r,i,a,o,s,c,l,u,f,d,h,p,m,g,_,b,v,y,w,C,A,S=this,T=S._options,x=S._model,k=S._model=Bt(T),E=S._active,D=S._data,I={xAlign:x.xAlign,yAlign:x.yAlign},P={x:x.x,y:x.y},M={width:x.width,height:x.height},$={x:x.caretX,y:x.caretY};if(E.length){k.opacity=1;var O=[],R=[];$=Ft[T.position].call(S,E,S._eventPosition);var N=[];for(t=0,n=E.length;t<n;++t)N.push((g=E[t],A=C=w=b=_=void 0,_=g._xScale,b=g._yScale||g._scale,v=g._index,y=g._datasetIndex,w=g._chart.getDatasetMeta(y).controller,C=w._getIndexScale(),A=w._getValueScale(),{xLabel:_?_.getLabelForIndex(v,y):"",yLabel:b?b.getLabelForIndex(v,y):"",label:C?""+C.getLabelForIndex(v,y):"",value:A?""+A.getLabelForIndex(v,y):"",index:v,datasetIndex:y,x:g._model.x,y:g._model.y}));T.filter&&(N=N.filter(function(e){return T.filter(e,D)})),T.itemSort&&(N=N.sort(function(e,t){return T.itemSort(e,t,D)})),H.each(N,function(e){O.push(T.callbacks.labelColor.call(S,e,S._chart)),R.push(T.callbacks.labelTextColor.call(S,e,S._chart))}),k.title=S.getTitle(N,D),k.beforeBody=S.getBeforeBody(N,D),k.body=S.getBody(N,D),k.afterBody=S.getAfterBody(N,D),k.footer=S.getFooter(N,D),k.x=$.x,k.y=$.y,k.caretPadding=T.caretPadding,k.labelColors=O,k.labelTextColors=R,k.dataPoints=N,I=function(e,t){var n,r,i,a,o,s=e._model,c=e._chart,l=e._chart.chartArea,u="center",f="center";s.y<t.height?f="top":s.y>c.height-t.height&&(f="bottom");var d=(l.left+l.right)/2,h=(l.top+l.bottom)/2;r="center"===f?(n=function(e){return e<=d},function(e){return d<e}):(n=function(e){return e<=t.width/2},function(e){return e>=c.width-t.width/2}),i=function(e){return e+t.width+s.caretSize+s.caretPadding>c.width},a=function(e){return e-t.width-s.caretSize-s.caretPadding<0},o=function(e){return e<=h?"top":"bottom"},n(s.x)?(u="left",i(s.x)&&(u="center",f=o(s.y))):r(s.x)&&(u="right",a(s.x)&&(u="center",f=o(s.y)));var p=e._options;return{xAlign:p.xAlign?p.xAlign:u,yAlign:p.yAlign?p.yAlign:f}}(this,M=function(e,t){var n=e._chart.ctx,r=2*t.yPadding,i=0,a=t.body,o=a.reduce(function(e,t){return e+t.before.length+t.lines.length+t.after.length},0);o+=t.beforeBody.length+t.afterBody.length;var s=t.title.length,c=t.footer.length,l=t.titleFontSize,u=t.bodyFontSize,f=t.footerFontSize;r+=s*l,r+=s?(s-1)*t.titleSpacing:0,r+=s?t.titleMarginBottom:0,r+=o*u,r+=o?(o-1)*t.bodySpacing:0,r+=c?t.footerMarginTop:0,r+=c*f,r+=c?(c-1)*t.footerSpacing:0;var d=0,h=function(e){i=Math.max(i,n.measureText(e).width+d)};return n.font=H.fontString(l,t._titleFontStyle,t._titleFontFamily),H.each(t.title,h),n.font=H.fontString(u,t._bodyFontStyle,t._bodyFontFamily),H.each(t.beforeBody.concat(t.afterBody),h),d=t.displayColors?u+2:0,H.each(a,function(e){H.each(e.before,h),H.each(e.lines,h),H.each(e.after,h)}),d=0,n.font=H.fontString(f,t._footerFontStyle,t._footerFontFamily),H.each(t.footer,h),{width:i+=2*t.xPadding,height:r}}(this,k)),r=k,i=M,a=I,o=S._chart,s=r.x,c=r.y,l=r.caretSize,u=r.caretPadding,f=r.cornerRadius,d=a.xAlign,h=a.yAlign,p=l+u,m=f+u,"right"===d?s-=i.width:"center"===d&&((s-=i.width/2)+i.width>o.width&&(s=o.width-i.width),s<0&&(s=0)),"top"===h?c+=p:c-="bottom"===h?i.height+p:i.height/2,"center"===h?"left"===d?s+=p:"right"===d&&(s-=p):"left"===d?s-=m:"right"===d&&(s+=m),P={x:s,y:c}}else k.opacity=0;return k.xAlign=I.xAlign,k.yAlign=I.yAlign,k.x=P.x,k.y=P.y,k.width=M.width,k.height=M.height,k.caretX=$.x,k.caretY=$.y,S._model=k,e&&T.custom&&T.custom.call(S,k),S},drawCaret:function(e,t){var n=this._chart.ctx,r=this._view,i=this.getCaretPosition(e,t,r);n.lineTo(i.x1,i.y1),n.lineTo(i.x2,i.y2),n.lineTo(i.x3,i.y3)},getCaretPosition:function(e,t,n){var r,i,a,o,s,c,l=n.caretSize,u=n.cornerRadius,f=n.xAlign,d=n.yAlign,h=e.x,p=e.y,m=t.width,g=t.height;if("center"===d)s=p+g/2,c="left"===f?(i=(r=h)-l,a=r,o=s+l,s-l):(i=(r=h+m)+l,a=r,o=s-l,s+l);else if(a=(r="left"===f?(i=h+u+l)-l:"right"===f?(i=h+m-u-l)-l:(i=n.caretX)-l,i+l),"top"===d)s=(o=p)-l,c=o;else{s=(o=p+g)+l,c=o;var _=a;a=r,r=_}return{x1:r,x2:i,x3:a,y1:o,y2:s,y3:c}},drawTitle:function(e,t,n){var r,i,a,o=t.title,s=o.length;if(s){var c=Lt(t.rtl,t.x,t.width);for(e.x=Ut(t,t._titleAlign),n.textAlign=c.textAlign(t._titleAlign),n.textBaseline="middle",r=t.titleFontSize,i=t.titleSpacing,n.fillStyle=t.titleFontColor,n.font=H.fontString(r,t._titleFontStyle,t._titleFontFamily),a=0;a<s;++a)n.fillText(o[a],c.x(e.x),e.y+r/2),e.y+=r+i,a+1===s&&(e.y+=t.titleMarginBottom-i)}},drawBody:function(t,e,n){var r,i,a,o,s,c,l,u,f=e.bodyFontSize,d=e.bodySpacing,h=e._bodyAlign,p=e.body,m=e.displayColors,g=0,_=m?Ut(e,"left"):0,b=Lt(e.rtl,e.x,e.width),v=function(e){n.fillText(e,b.x(t.x+g),t.y+f/2),t.y+=f+d},y=b.textAlign(h);for(n.textAlign=h,n.textBaseline="middle",n.font=H.fontString(f,e._bodyFontStyle,e._bodyFontFamily),t.x=Ut(e,y),n.fillStyle=e.bodyFontColor,H.each(e.beforeBody,v),g=m&&"right"!==y?"center"===h?f/2+1:f+2:0,s=0,l=p.length;s<l;++s){for(r=p[s],i=e.labelTextColors[s],a=e.labelColors[s],n.fillStyle=i,H.each(r.before,v),c=0,u=(o=r.lines).length;c<u;++c){if(m){var w=b.x(_);n.fillStyle=e.legendColorBackground,n.fillRect(b.leftForLtr(w,f),t.y,f,f),n.lineWidth=1,n.strokeStyle=a.borderColor,n.strokeRect(b.leftForLtr(w,f),t.y,f,f),n.fillStyle=a.backgroundColor,n.fillRect(b.leftForLtr(b.xPlus(w,1),f-2),t.y+1,f-2,f-2),n.fillStyle=i}v(o[c])}H.each(r.after,v)}g=0,H.each(e.afterBody,v),t.y-=d},drawFooter:function(e,t,n){var r,i,a=t.footer,o=a.length;if(o){var s=Lt(t.rtl,t.x,t.width);for(e.x=Ut(t,t._footerAlign),e.y+=t.footerMarginTop,n.textAlign=s.textAlign(t._footerAlign),n.textBaseline="middle",r=t.footerFontSize,n.fillStyle=t.footerFontColor,n.font=H.fontString(r,t._footerFontStyle,t._footerFontFamily),i=0;i<o;++i)n.fillText(a[i],s.x(e.x),e.y+r/2),e.y+=r+t.footerSpacing}},drawBackground:function(e,t,n,r){n.fillStyle=t.backgroundColor,n.strokeStyle=t.borderColor,n.lineWidth=t.borderWidth;var i=t.xAlign,a=t.yAlign,o=e.x,s=e.y,c=r.width,l=r.height,u=t.cornerRadius;n.beginPath(),n.moveTo(o+u,s),"top"===a&&this.drawCaret(e,r),n.lineTo(o+c-u,s),n.quadraticCurveTo(o+c,s,o+c,s+u),"center"===a&&"right"===i&&this.drawCaret(e,r),n.lineTo(o+c,s+l-u),n.quadraticCurveTo(o+c,s+l,o+c-u,s+l),"bottom"===a&&this.drawCaret(e,r),n.lineTo(o+u,s+l),n.quadraticCurveTo(o,s+l,o,s+l-u),"center"===a&&"left"===i&&this.drawCaret(e,r),n.lineTo(o,s+u),n.quadraticCurveTo(o,s,o+u,s),n.closePath(),n.fill(),0<t.borderWidth&&n.stroke()},draw:function(){var e=this._chart.ctx,t=this._view;if(0!==t.opacity){var n={width:t.width,height:t.height},r={x:t.x,y:t.y},i=Math.abs(t.opacity<.001)?0:t.opacity,a=t.title.length||t.beforeBody.length||t.body.length||t.afterBody.length||t.footer.length;this._options.enabled&&a&&(e.save(),e.globalAlpha=i,this.drawBackground(r,t,e,n),r.y+=t.yPadding,H.rtl.overrideTextDirection(e,t.textDirection),this.drawTitle(r,t,e),this.drawBody(r,t,e),this.drawFooter(r,t,e),H.rtl.restoreTextDirection(e,t.textDirection),e.restore())}},handleEvent:function(e){var t,n=this,r=n._options;return n._lastActive=n._lastActive||[],"mouseout"===e.type?n._active=[]:(n._active=n._chart.getElementsAtEventForMode(e,r.mode,r),r.reverse&&n._active.reverse()),(t=!H.arrayEquals(n._active,n._lastActive))&&(n._lastActive=n._active,(r.enabled||r.custom)&&(n._eventPosition={x:e.x,y:e.y},n.update(!0),n.pivot())),t}}),qt=Ft,zt=Wt;zt.positioners=qt;var Vt=H.valueOrDefault;function Yt(){return H.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,r){if("xAxes"===e||"yAxes"===e){var i,a,o,s=n[e].length;for(t[e]||(t[e]=[]),i=0;i<s;++i)o=n[e][i],a=Vt(o.type,"xAxes"===e?"category":"linear"),i>=t[e].length&&t[e].push({}),!t[e][i].type||o.type&&o.type!==t[e][i].type?H.merge(t[e][i],[Rt.getScaleDefaults(a),o]):H.merge(t[e][i],o)}else H._merger(e,t,n,r)}})}function Kt(){return H.merge(Object.create(null),[].slice.call(arguments),{merger:function(e,t,n,r){var i=t[e]||Object.create(null),a=n[e];"scales"===e?t[e]=Yt(i,a):"scale"===e?t[e]=H.merge(i,[Rt.getScaleDefaults(a.type),a]):H._merger(e,t,n,r)}})}function Qt(e,t,n){for(var r,i=function(e){return e.id===r};r=t+n++,0<=H.findIndex(e,i););return r}function Xt(e){return"top"===e||"bottom"===e}function Zt(n,r){return function(e,t){return e[n]===t[n]?e[r]-t[r]:e[n]-t[n]}}F._set("global",{elements:{},events:["mousemove","mouseout","click","touchstart","touchmove"],hover:{onHover:null,mode:"nearest",intersect:!0,animationDuration:400},onClick:null,maintainAspectRatio:!0,responsive:!0,responsiveAnimationDuration:0});var Jt=function(e,t){return this.construct(e,t),this};H.extend(Jt.prototype,{construct:function(e,t){var n,r,i=this;(r=(n=(n=t)||Object.create(null)).data=n.data||{}).datasets=r.datasets||[],r.labels=r.labels||[],n.options=Kt(F.global,F[n.type],n.options||{}),t=n;var a=$t.acquireContext(e,t),o=a&&a.canvas,s=o&&o.height,c=o&&o.width;i.id=H.uid(),i.ctx=a,i.canvas=o,i.config=t,i.width=c,i.height=s,i.aspectRatio=s?c/s:null,i.options=t.options,i._bufferedRender=!1,i._layers=[],(i.chart=i).controller=i,Jt.instances[i.id]=i,Object.defineProperty(i,"data",{get:function(){return i.config.data},set:function(e){i.config.data=e}}),a&&o?(i.initialize(),i.update()):console.error("Failed to create chart: can't acquire context from the given item")},initialize:function(){return Ot.notify(this,"beforeInit"),H.retinaScale(this,this.options.devicePixelRatio),this.bindEvents(),this.options.responsive&&this.resize(!0),this.initToolTip(),Ot.notify(this,"afterInit"),this},clear:function(){return H.canvas.clear(this),this},stop:function(){return J.cancelAnimation(this),this},resize:function(e){var t=this,n=t.options,r=t.canvas,i=n.maintainAspectRatio&&t.aspectRatio||null,a=Math.max(0,Math.floor(H.getMaximumWidth(r))),o=Math.max(0,Math.floor(i?a/i:H.getMaximumHeight(r)));if((t.width!==a||t.height!==o)&&(r.width=t.width=a,r.height=t.height=o,r.style.width=a+"px",r.style.height=o+"px",H.retinaScale(t,n.devicePixelRatio),!e)){var s={width:a,height:o};Ot.notify(t,"resize",[s]),n.onResize&&n.onResize(t,s),t.stop(),t.update({duration:n.responsiveAnimationDuration})}},ensureScalesHaveIDs:function(){var e=this.options,n=e.scales||{},t=e.scale;H.each(n.xAxes,function(e,t){e.id||(e.id=Qt(n.xAxes,"x-axis-",t))}),H.each(n.yAxes,function(e,t){e.id||(e.id=Qt(n.yAxes,"y-axis-",t))}),t&&(t.id=t.id||"scale")},buildOrUpdateScales:function(){var o=this,e=o.options,s=o.scales||{},t=[],c=Object.keys(s).reduce(function(e,t){return e[t]=!1,e},{});e.scales&&(t=t.concat((e.scales.xAxes||[]).map(function(e){return{options:e,dtype:"category",dposition:"bottom"}}),(e.scales.yAxes||[]).map(function(e){return{options:e,dtype:"linear",dposition:"left"}}))),e.scale&&t.push({options:e.scale,dtype:"radialLinear",isDefault:!0,dposition:"chartArea"}),H.each(t,function(e){var t=e.options,n=t.id,r=Vt(t.type,e.dtype);Xt(t.position)!==Xt(e.dposition)&&(t.position=e.dposition),c[n]=!0;var i=null;if(n in s&&s[n].type===r)(i=s[n]).options=t,i.ctx=o.ctx,i.chart=o;else{var a=Rt.getScaleConstructor(r);if(!a)return;i=new a({id:n,type:r,options:t,ctx:o.ctx,chart:o}),s[i.id]=i}i.mergeTicksOptions(),e.isDefault&&(o.scale=i)}),H.each(c,function(e,t){e||delete s[t]}),o.scales=s,Rt.addScalesToLayout(this)},buildOrUpdateControllers:function(){var e,t,n=[],r=this.data.datasets;for(e=0,t=r.length;e<t;e++){var i=r[e],a=this.getDatasetMeta(e),o=i.type||this.config.type;if(a.type&&a.type!==o&&(this.destroyDatasetMeta(e),a=this.getDatasetMeta(e)),a.type=o,a.order=i.order||0,a.index=e,a.controller)a.controller.updateIndex(e),a.controller.linkScales();else{var s=Xe[a.type];if(void 0===s)throw new Error('"'+a.type+'" is not a chart type.');a.controller=new s(this,e),n.push(a.controller)}}return n},resetElements:function(){var n=this;H.each(n.data.datasets,function(e,t){n.getDatasetMeta(t).controller.reset()},n)},reset:function(){this.resetElements(),this.tooltip.initialize()},update:function(e){var t,n,r,i,a=this;if(e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]}),i=(r=a).options,H.each(r.scales,function(e){pt.removeBox(r,e)}),i=Kt(F.global,F[r.config.type],i),r.options=r.config.options=i,r.ensureScalesHaveIDs(),r.buildOrUpdateScales(),r.tooltip._options=i.tooltips,r.tooltip.initialize(),Ot._invalidate(a),!1!==Ot.notify(a,"beforeUpdate")){a.tooltip._data=a.data;var o=a.buildOrUpdateControllers();for(t=0,n=a.data.datasets.length;t<n;t++)a.getDatasetMeta(t).controller.buildOrUpdateElements();a.updateLayout(),a.options.animation&&a.options.animation.duration&&H.each(o,function(e){e.reset()}),a.updateDatasets(),a.tooltip.initialize(),a.lastActive=[],Ot.notify(a,"afterUpdate"),a._layers.sort(Zt("z","_idx")),a._bufferedRender?a._bufferedRequest={duration:e.duration,easing:e.easing,lazy:e.lazy}:a.render(e)}},updateLayout:function(){var t=this;!1!==Ot.notify(t,"beforeLayout")&&(pt.update(this,this.width,this.height),t._layers=[],H.each(t.boxes,function(e){e._configure&&e._configure(),t._layers.push.apply(t._layers,e._layers())},t),t._layers.forEach(function(e,t){e._idx=t}),Ot.notify(t,"afterScaleUpdate"),Ot.notify(t,"afterLayout"))},updateDatasets:function(){if(!1!==Ot.notify(this,"beforeDatasetsUpdate")){for(var e=0,t=this.data.datasets.length;e<t;++e)this.updateDataset(e);Ot.notify(this,"afterDatasetsUpdate")}},updateDataset:function(e){var t=this.getDatasetMeta(e),n={meta:t,index:e};!1!==Ot.notify(this,"beforeDatasetUpdate",[n])&&(t.controller._update(),Ot.notify(this,"afterDatasetUpdate",[n]))},render:function(e){var t=this;e&&"object"==typeof e||(e={duration:e,lazy:arguments[1]});var n=t.options.animation,r=Vt(e.duration,n&&n.duration),i=e.lazy;if(!1!==Ot.notify(t,"beforeRender")){var a=function(e){Ot.notify(t,"afterRender"),H.callback(n&&n.onComplete,[e],t)};if(n&&r){var o=new Z({numSteps:r/16.66,easing:e.easing||n.easing,render:function(e,t){var n=H.easing.effects[t.easing],r=t.currentStep,i=r/t.numSteps;e.draw(n(i),i,r)},onAnimationProgress:n.onProgress,onAnimationComplete:a});J.addAnimation(t,o,r,i)}else t.draw(),a(new Z({numSteps:0,chart:t}));return t}},draw:function(e){var t,n,r=this;if(r.clear(),H.isNullOrUndef(e)&&(e=1),r.transition(e),!(r.width<=0||r.height<=0)&&!1!==Ot.notify(r,"beforeDraw",[e])){for(n=r._layers,t=0;t<n.length&&n[t].z<=0;++t)n[t].draw(r.chartArea);for(r.drawDatasets(e);t<n.length;++t)n[t].draw(r.chartArea);r._drawTooltip(e),Ot.notify(r,"afterDraw",[e])}},transition:function(e){for(var t=0,n=(this.data.datasets||[]).length;t<n;++t)this.isDatasetVisible(t)&&this.getDatasetMeta(t).controller.transition(e);this.tooltip.transition(e)},_getSortedDatasetMetas:function(e){var t,n,r=[];for(t=0,n=(this.data.datasets||[]).length;t<n;++t)e&&!this.isDatasetVisible(t)||r.push(this.getDatasetMeta(t));return r.sort(Zt("order","index")),r},_getSortedVisibleDatasetMetas:function(){return this._getSortedDatasetMetas(!0)},drawDatasets:function(e){var t,n;if(!1!==Ot.notify(this,"beforeDatasetsDraw",[e])){for(n=(t=this._getSortedVisibleDatasetMetas()).length-1;0<=n;--n)this.drawDataset(t[n],e);Ot.notify(this,"afterDatasetsDraw",[e])}},drawDataset:function(e,t){var n={meta:e,index:e.index,easingValue:t};!1!==Ot.notify(this,"beforeDatasetDraw",[n])&&(e.controller.draw(t),Ot.notify(this,"afterDatasetDraw",[n]))},_drawTooltip:function(e){var t=this.tooltip,n={tooltip:t,easingValue:e};!1!==Ot.notify(this,"beforeTooltipDraw",[n])&&(t.draw(),Ot.notify(this,"afterTooltipDraw",[n]))},getElementAtEvent:function(e){return it.modes.single(this,e)},getElementsAtEvent:function(e){return it.modes.label(this,e,{intersect:!0})},getElementsAtXAxis:function(e){return it.modes["x-axis"](this,e,{intersect:!0})},getElementsAtEventForMode:function(e,t,n){var r=it.modes[t];return"function"==typeof r?r(this,e,n):[]},getDatasetAtEvent:function(e){return it.modes.dataset(this,e,{intersect:!0})},getDatasetMeta:function(e){var t=this.data.datasets[e];t._meta||(t._meta={});var n=t._meta[this.id];return n||(n=t._meta[this.id]={type:null,data:[],dataset:null,controller:null,hidden:null,xAxisID:null,yAxisID:null,order:t.order||0,index:e}),n},getVisibleDatasetCount:function(){for(var e=0,t=0,n=this.data.datasets.length;t<n;++t)this.isDatasetVisible(t)&&e++;return e},isDatasetVisible:function(e){var t=this.getDatasetMeta(e);return"boolean"==typeof t.hidden?!t.hidden:!this.data.datasets[e].hidden},generateLegend:function(){return this.options.legendCallback(this)},destroyDatasetMeta:function(e){var t=this.id,n=this.data.datasets[e],r=n._meta&&n._meta[t];r&&(r.controller.destroy(),delete n._meta[t])},destroy:function(){var e,t,n=this,r=n.canvas;for(n.stop(),e=0,t=n.data.datasets.length;e<t;++e)n.destroyDatasetMeta(e);r&&(n.unbindEvents(),H.canvas.clear(n),$t.releaseContext(n.ctx),n.canvas=null,n.ctx=null),Ot.notify(n,"destroy"),delete Jt.instances[n.id]},toBase64Image:function(){return this.canvas.toDataURL.apply(this.canvas,arguments)},initToolTip:function(){this.tooltip=new zt({_chart:this,_chartInstance:this,_data:this.data,_options:this.options.tooltips},this)},bindEvents:function(){var t=this,n=t._listeners={},r=function(){t.eventHandler.apply(t,arguments)};H.each(t.options.events,function(e){$t.addEventListener(t,e,r),n[e]=r}),t.options.responsive&&(r=function(){t.resize()},$t.addEventListener(t,"resize",r),n.resize=r)},unbindEvents:function(){var n=this,e=n._listeners;e&&(delete n._listeners,H.each(e,function(e,t){$t.removeEventListener(n,t,e)}))},updateHoverStyle:function(e,t,n){var r,i,a,o=n?"set":"remove";for(i=0,a=e.length;i<a;++i)(r=e[i])&&this.getDatasetMeta(r._datasetIndex).controller[o+"HoverStyle"](r);"dataset"===t&&this.getDatasetMeta(e[0]._datasetIndex).controller["_"+o+"DatasetHoverStyle"]()},eventHandler:function(e){var t=this,n=t.tooltip;if(!1!==Ot.notify(t,"beforeEvent",[e])){t._bufferedRender=!0,t._bufferedRequest=null;var r=t.handleEvent(e);n&&(r=n._start?n.handleEvent(e):r|n.handleEvent(e)),Ot.notify(t,"afterEvent",[e]);var i=t._bufferedRequest;return i?t.render(i):r&&!t.animating&&(t.stop(),t.render({duration:t.options.hover.animationDuration,lazy:!0})),t._bufferedRender=!1,t._bufferedRequest=null,t}},handleEvent:function(e){var t,n=this,r=n.options||{},i=r.hover;return n.lastActive=n.lastActive||[],"mouseout"===e.type?n.active=[]:n.active=n.getElementsAtEventForMode(e,i.mode,i),H.callback(r.onHover||r.hover.onHover,[e.native,n.active],n),"mouseup"!==e.type&&"click"!==e.type||r.onClick&&r.onClick.call(n,e.native,n.active),n.lastActive.length&&n.updateHoverStyle(n.lastActive,i.mode,!1),n.active.length&&i.mode&&n.updateHoverStyle(n.active,i.mode,!0),t=!H.arrayEquals(n.active,n.lastActive),n.lastActive=n.active,t}}),Jt.instances={};var en=Jt;(Jt.Controller=Jt).types={},H.configMerge=Kt,H.scaleMerge=Yt;function tn(){throw new Error("This method is not implemented: either no adapter can be found or an incomplete integration was provided.")}function nn(e){this.options=e||{}}H.extend(nn.prototype,{formats:tn,parse:tn,format:tn,add:tn,diff:tn,startOf:tn,endOf:tn,_create:function(e){return e}}),nn.override=function(e){H.extend(nn.prototype,e)};var rn={_date:nn},an={formatters:{values:function(e){return H.isArray(e)?e:""+e},linear:function(e,t,n){var r=3<n.length?n[2]-n[1]:n[1]-n[0];1<Math.abs(r)&&e!==Math.floor(e)&&(r=e-Math.floor(e));var i=H.log10(Math.abs(r)),a="";if(0!==e)if(Math.max(Math.abs(n[0]),Math.abs(n[n.length-1]))<1e-4){var o=H.log10(Math.abs(e)),s=Math.floor(o)-Math.floor(i);s=Math.max(Math.min(s,20),0),a=e.toExponential(s)}else{var c=-1*Math.floor(i);c=Math.max(Math.min(c,20),0),a=e.toFixed(c)}else a="0";return a},logarithmic:function(e,t,n){var r=e/Math.pow(10,Math.floor(H.log10(e)));return 0===e?"0":1===r||2===r||5===r||0===t||t===n.length-1?e.toExponential():""}}},on=H.isArray,sn=H.isNullOrUndef,cn=H.valueOrDefault,ln=H.valueAtIndexOrDefault;function un(e,t,n){var r,i=e.getTicks().length,a=Math.min(t,i-1),o=e.getPixelForTick(a),s=e._startPixel,c=e._endPixel;if(!(n&&(r=1===i?Math.max(o-s,c-o):0===t?(e.getPixelForTick(1)-o)/2:(o-e.getPixelForTick(a-1))/2,(o+=a<t?r:-r)<s-1e-6||c+1e-6<o)))return o}function fn(e,t,n,r){var i,a,o,s,c,l,u,f,d,h,p,m,g,_,b,v=n.length,y=[],w=[],C=[],A=0,S=0;for(i=0;i<v;++i){if(s=n[i].label,c=n[i].major?t.major:t.minor,e.font=l=c.string,u=r[l]=r[l]||{data:{},gc:[]},f=c.lineHeight,d=h=0,sn(s)||on(s)){if(on(s))for(a=0,o=s.length;a<o;++a)p=s[a],sn(p)||on(p)||(d=H.measureText(e,u.data,u.gc,d,p),h+=f)}else d=H.measureText(e,u.data,u.gc,d,s),h=f;y.push(d),w.push(h),C.push(f/2),A=Math.max(d,A),S=Math.max(h,S)}function T(e){return{width:y[e]||0,height:w[e]||0,offset:C[e]||0}}return _=r,b=v,H.each(_,function(e){var t,n=e.gc,r=n.length/2;if(b<r){for(t=0;t<r;++t)delete e.data[n[t]];n.splice(0,r)}}),m=y.indexOf(A),g=w.indexOf(S),{first:T(0),last:T(v-1),widest:T(m),highest:T(g)}}function dn(e){return e.drawTicks?e.tickMarkLength:0}function hn(e){var t,n;return e.display?(t=H.options._parseFont(e),n=H.options.toPadding(e.padding),t.lineHeight+n.height):0}function pn(e,t){return H.extend(H.options._parseFont({fontFamily:cn(t.fontFamily,e.fontFamily),fontSize:cn(t.fontSize,e.fontSize),fontStyle:cn(t.fontStyle,e.fontStyle),lineHeight:cn(t.lineHeight,e.lineHeight)}),{color:H.options.resolve([t.fontColor,e.fontColor,F.global.defaultFontColor])})}function mn(e){var t=pn(e,e.minor);return{minor:t,major:e.major.enabled?pn(e,e.major):t}}function gn(e){var t,n,r,i=[];for(n=0,r=e.length;n<r;++n)void 0!==(t=e[n])._index&&i.push(t);return i}function _n(e,t,n,r){var i,a,o,s,c=cn(n,0),l=Math.min(cn(r,e.length),e.length),u=0;for(t=Math.ceil(t),r&&(t=(i=r-n)/Math.floor(i/t)),s=c;s<0;)u++,s=Math.round(c+u*t);for(a=Math.max(c,0);a<l;a++)o=e[a],a===s?(o._index=a,u++,s=Math.round(c+u*t)):delete o.label}F._set("scale",{display:!0,position:"left",offset:!1,gridLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,drawBorder:!0,drawOnChartArea:!0,drawTicks:!0,tickMarkLength:10,zeroLineWidth:1,zeroLineColor:"rgba(0,0,0,0.25)",zeroLineBorderDash:[],zeroLineBorderDashOffset:0,offsetGridLines:!1,borderDash:[],borderDashOffset:0},scaleLabel:{display:!1,labelString:"",padding:{top:4,bottom:4}},ticks:{beginAtZero:!1,minRotation:0,maxRotation:50,mirror:!1,padding:0,reverse:!1,display:!0,autoSkip:!0,autoSkipPadding:0,labelOffset:0,callback:an.formatters.values,minor:{},major:{}}});var bn=Q.extend({zeroLineIndex:0,getPadding:function(){return{left:this.paddingLeft||0,top:this.paddingTop||0,right:this.paddingRight||0,bottom:this.paddingBottom||0}},getTicks:function(){return this._ticks},_getLabels:function(){var e=this.chart.data;return this.options.labels||(this.isHorizontal()?e.xLabels:e.yLabels)||e.labels||[]},mergeTicksOptions:function(){},beforeUpdate:function(){H.callback(this.options.beforeUpdate,[this])},update:function(e,t,n){var r,i,a,o,s,c=this,l=c.options.ticks,u=l.sampleSize;if(c.beforeUpdate(),c.maxWidth=e,c.maxHeight=t,c.margins=H.extend({left:0,right:0,top:0,bottom:0},n),c._ticks=null,c.ticks=null,c._labelSizes=null,c._maxLabelLines=0,c.longestLabelWidth=0,c.longestTextCache=c.longestTextCache||{},c._gridLineItems=null,c._labelItems=null,c.beforeSetDimensions(),c.setDimensions(),c.afterSetDimensions(),c.beforeDataLimits(),c.determineDataLimits(),c.afterDataLimits(),c.beforeBuildTicks(),o=c.buildTicks()||[],(!(o=c.afterBuildTicks(o)||o)||!o.length)&&c.ticks)for(o=[],r=0,i=c.ticks.length;r<i;++r)o.push({value:c.ticks[r],major:!1});return s=u<(c._ticks=o).length,a=c._convertTicksToLabels(s?function(e,t){for(var n=[],r=e.length/t,i=0,a=e.length;i<a;i+=r)n.push(e[Math.floor(i)]);return n}(o,u):o),c._configure(),c.beforeCalculateTickRotation(),c.calculateTickRotation(),c.afterCalculateTickRotation(),c.beforeFit(),c.fit(),c.afterFit(),c._ticksToDraw=l.display&&(l.autoSkip||"auto"===l.source)?c._autoSkip(o):o,s&&(a=c._convertTicksToLabels(c._ticksToDraw)),c.ticks=a,c.afterUpdate(),c.minSize},_configure:function(){var e,t,n=this,r=n.options.ticks.reverse;n.isHorizontal()?(e=n.left,t=n.right):(e=n.top,t=n.bottom,r=!r),n._startPixel=e,n._endPixel=t,n._reversePixels=r,n._length=t-e},afterUpdate:function(){H.callback(this.options.afterUpdate,[this])},beforeSetDimensions:function(){H.callback(this.options.beforeSetDimensions,[this])},setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0},afterSetDimensions:function(){H.callback(this.options.afterSetDimensions,[this])},beforeDataLimits:function(){H.callback(this.options.beforeDataLimits,[this])},determineDataLimits:H.noop,afterDataLimits:function(){H.callback(this.options.afterDataLimits,[this])},beforeBuildTicks:function(){H.callback(this.options.beforeBuildTicks,[this])},buildTicks:H.noop,afterBuildTicks:function(e){return on(e)&&e.length?H.callback(this.options.afterBuildTicks,[this,e]):(this.ticks=H.callback(this.options.afterBuildTicks,[this,this.ticks])||this.ticks,e)},beforeTickToLabelConversion:function(){H.callback(this.options.beforeTickToLabelConversion,[this])},convertTicksToLabels:function(){var e=this.options.ticks;this.ticks=this.ticks.map(e.userCallback||e.callback,this)},afterTickToLabelConversion:function(){H.callback(this.options.afterTickToLabelConversion,[this])},beforeCalculateTickRotation:function(){H.callback(this.options.beforeCalculateTickRotation,[this])},calculateTickRotation:function(){var e,t,n,r,i,a,o,s=this,c=s.options,l=c.ticks,u=s.getTicks().length,f=l.minRotation||0,d=l.maxRotation,h=f;!s._isVisible()||!l.display||d<=f||u<=1||!s.isHorizontal()?s.labelRotation=f:(t=(e=s._getLabelSizes()).widest.width,n=e.highest.height-e.highest.offset,r=Math.min(s.maxWidth,s.chart.width-t),(i=c.offset?s.maxWidth/u:r/(u-1))<t+6&&(i=r/(u-(c.offset?.5:1)),a=s.maxHeight-dn(c.gridLines)-l.padding-hn(c.scaleLabel),o=Math.sqrt(t*t+n*n),h=H.toDegrees(Math.min(Math.asin(Math.min((e.highest.height+6)/i,1)),Math.asin(Math.min(a/o,1))-Math.asin(n/o))),h=Math.max(f,Math.min(d,h))),s.labelRotation=h)},afterCalculateTickRotation:function(){H.callback(this.options.afterCalculateTickRotation,[this])},beforeFit:function(){H.callback(this.options.beforeFit,[this])},fit:function(){var e=this,t=e.minSize={width:0,height:0},n=e.chart,r=e.options,i=r.ticks,a=r.scaleLabel,o=r.gridLines,s=e._isVisible(),c="bottom"===r.position,l=e.isHorizontal();if(l?t.width=e.maxWidth:s&&(t.width=dn(o)+hn(a)),l?s&&(t.height=dn(o)+hn(a)):t.height=e.maxHeight,i.display&&s){var u=mn(i),f=e._getLabelSizes(),d=f.first,h=f.last,p=f.widest,m=f.highest,g=.4*u.minor.lineHeight,_=i.padding;if(l){var b=0!==e.labelRotation,v=H.toRadians(e.labelRotation),y=Math.cos(v),w=Math.sin(v),C=w*p.width+y*(m.height-(b?m.offset:0))+(b?0:g);t.height=Math.min(e.maxHeight,t.height+C+_);var A,S,T=e.getPixelForTick(0)-e.left,x=e.right-e.getPixelForTick(e.getTicks().length-1);S=b?(A=c?y*d.width+w*d.offset:w*(d.height-d.offset),c?w*(h.height-h.offset):y*h.width+w*h.offset):(A=d.width/2,h.width/2),e.paddingLeft=Math.max((A-T)*e.width/(e.width-T),0)+3,e.paddingRight=Math.max((S-x)*e.width/(e.width-x),0)+3}else{var k=i.mirror?0:p.width+_+g;t.width=Math.min(e.maxWidth,t.width+k),e.paddingTop=d.height/2,e.paddingBottom=h.height/2}}e.handleMargins(),l?(e.width=e._length=n.width-e.margins.left-e.margins.right,e.height=t.height):(e.width=t.width,e.height=e._length=n.height-e.margins.top-e.margins.bottom)},handleMargins:function(){var e=this;e.margins&&(e.margins.left=Math.max(e.paddingLeft,e.margins.left),e.margins.top=Math.max(e.paddingTop,e.margins.top),e.margins.right=Math.max(e.paddingRight,e.margins.right),e.margins.bottom=Math.max(e.paddingBottom,e.margins.bottom))},afterFit:function(){H.callback(this.options.afterFit,[this])},isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},isFullWidth:function(){return this.options.fullWidth},getRightValue:function(e){if(sn(e))return NaN;if(("number"==typeof e||e instanceof Number)&&!isFinite(e))return NaN;if(e)if(this.isHorizontal()){if(void 0!==e.x)return this.getRightValue(e.x)}else if(void 0!==e.y)return this.getRightValue(e.y);return e},_convertTicksToLabels:function(e){var t,n,r;for(this.ticks=e.map(function(e){return e.value}),this.beforeTickToLabelConversion(),t=this.convertTicksToLabels(e)||this.ticks,this.afterTickToLabelConversion(),n=0,r=e.length;n<r;++n)e[n].label=t[n];return t},_getLabelSizes:function(){var e=this._labelSizes;return e||(this._labelSizes=e=fn(this.ctx,mn(this.options.ticks),this.getTicks(),this.longestTextCache),this.longestLabelWidth=e.widest.width),e},_parseValue:function(e){var t,n,r,i;return i=on(e)?(t=+this.getRightValue(e[0]),n=+this.getRightValue(e[1]),r=Math.min(t,n),Math.max(t,n)):(t=void 0,r=n=e=+this.getRightValue(e)),{min:r,max:i,start:t,end:n}},_getScaleLabel:function(e){var t=this._parseValue(e);return void 0!==t.start?"["+t.start+", "+t.end+"]":+this.getRightValue(e)},getLabelForIndex:H.noop,getPixelForValue:H.noop,getValueForPixel:H.noop,getPixelForTick:function(e){var t=this.options.offset,n=this._ticks.length,r=1/Math.max(n-(t?0:1),1);return e<0||n-1<e?null:this.getPixelForDecimal(e*r+(t?r/2:0))},getPixelForDecimal:function(e){return this._reversePixels&&(e=1-e),this._startPixel+e*this._length},getDecimalForPixel:function(e){var t=(e-this._startPixel)/this._length;return this._reversePixels?1-t:t},getBasePixel:function(){return this.getPixelForValue(this.getBaseValue())},getBaseValue:function(){var e=this.min,t=this.max;return this.beginAtZero?0:e<0&&t<0?t:0<e&&0<t?e:0},_autoSkip:function(e){var t,n,r,i,a=this.options.ticks,o=this._length,s=a.maxTicksLimit||o/this._tickSize()+1,c=a.major.enabled?function(e){var t,n,r=[];for(t=0,n=e.length;t<n;t++)e[t].major&&r.push(t);return r}(e):[],l=c.length,u=c[0],f=c[l-1];if(s<l)return function(e,t,n){var r,i,a=0,o=t[0];for(n=Math.ceil(n),r=0;r<e.length;r++)i=e[r],r===o?(i._index=r,o=t[++a*n]):delete i.label}(e,c,l/s),gn(e);if(r=function(e,t,n,r){var i,a,o,s,c=function(e){var t,n,r=e.length;if(r<2)return!1;for(n=e[0],t=1;t<r;++t)if(e[t]-e[t-1]!==n)return!1;return n}(e),l=(t.length-1)/r;if(!c)return Math.max(l,1);for(o=0,s=(i=H.math._factorize(c)).length-1;o<s;o++)if(l<(a=i[o]))return a;return Math.max(l,1)}(c,e,0,s),0<l){for(t=0,n=l-1;t<n;t++)_n(e,r,c[t],c[t+1]);return i=1<l?(f-u)/(l-1):null,_n(e,r,H.isNullOrUndef(i)?0:u-i,u),_n(e,r,f,H.isNullOrUndef(i)?e.length:f+i),gn(e)}return _n(e,r),gn(e)},_tickSize:function(){var e=this.options.ticks,t=H.toRadians(this.labelRotation),n=Math.abs(Math.cos(t)),r=Math.abs(Math.sin(t)),i=this._getLabelSizes(),a=e.autoSkipPadding||0,o=i?i.widest.width+a:0,s=i?i.highest.height+a:0;return this.isHorizontal()?o*r<s*n?o/n:s/r:s*r<o*n?s/n:o/r},_isVisible:function(){var e,t,n,r=this.chart,i=this.options.display;if("auto"!==i)return!!i;for(e=0,t=r.data.datasets.length;e<t;++e)if(r.isDatasetVisible(e)&&((n=r.getDatasetMeta(e)).xAxisID===this.id||n.yAxisID===this.id))return!0;return!1},_computeGridLineItems:function(e){var t,n,r,i,a,o,s,c,l,u,f,d,h,p,m,g,_,b=this,v=b.chart,y=b.options,w=y.gridLines,C=y.position,A=w.offsetGridLines,S=b.isHorizontal(),T=b._ticksToDraw,x=T.length+(A?1:0),k=dn(w),E=[],D=w.drawBorder?ln(w.lineWidth,0,0):0,I=D/2,P=H._alignPixel,M=function(e){return P(v,e,D)};for("top"===C?(t=M(b.bottom),s=b.bottom-k,l=t-I,f=M(e.top)+I,h=e.bottom):"bottom"===C?(t=M(b.top),f=e.top,h=M(e.bottom)-I,s=t+I,l=b.top+k):"left"===C?(t=M(b.right),o=b.right-k,c=t-I,u=M(e.left)+I,d=e.right):(t=M(b.left),u=e.left,d=M(e.right)-I,o=t+I,c=b.left+k),n=0;n<x;++n)r=T[n]||{},sn(r.label)&&n<T.length||(_=n===b.zeroLineIndex&&y.offset===A?(p=w.zeroLineWidth,m=w.zeroLineColor,g=w.zeroLineBorderDash||[],w.zeroLineBorderDashOffset||0):(p=ln(w.lineWidth,n,1),m=ln(w.color,n,"rgba(0,0,0,0.1)"),g=w.borderDash||[],w.borderDashOffset||0),void 0!==(i=un(b,r._index||n,A))&&(a=P(v,i,p),S?o=c=u=d=a:s=l=f=h=a,E.push({tx1:o,ty1:s,tx2:c,ty2:l,x1:u,y1:f,x2:d,y2:h,width:p,color:m,borderDash:g,borderDashOffset:_})));return E.ticksLength=x,E.borderValue=t,E},_computeLabelItems:function(){var e,t,n,r,i,a,o,s,c,l,u,f,d=this.options,h=d.ticks,p=d.position,m=h.mirror,g=this.isHorizontal(),_=this._ticksToDraw,b=mn(h),v=h.padding,y=dn(d.gridLines),w=-H.toRadians(this.labelRotation),C=[];for(o="top"===p?(a=this.bottom-y-v,w?"left":"center"):"bottom"===p?(a=this.top+y+v,w?"right":"center"):"left"===p?(i=this.right-(m?0:y)-v,m?"left":"right"):(i=this.left+(m?0:y)+v,m?"right":"left"),e=0,t=_.length;e<t;++e)r=(n=_[e]).label,sn(r)||(s=this.getPixelForTick(n._index||e)+h.labelOffset,l=(c=n.major?b.major:b.minor).lineHeight,u=on(r)?r.length:1,f=g?(i=s,"top"===p?((w?1:.5)-u)*l:(w?0:.5)*l):(a=s,(1-u)*l/2),C.push({x:i,y:a,rotation:w,label:r,font:c,textOffset:f,textAlign:o}));return C},_drawGrid:function(e){var t=this,n=t.options.gridLines;if(n.display){var r,i,a,o,s,c=t.ctx,l=t.chart,u=H._alignPixel,f=n.drawBorder?ln(n.lineWidth,0,0):0,d=t._gridLineItems||(t._gridLineItems=t._computeGridLineItems(e));for(a=0,o=d.length;a<o;++a)r=(s=d[a]).width,i=s.color,r&&i&&(c.save(),c.lineWidth=r,c.strokeStyle=i,c.setLineDash&&(c.setLineDash(s.borderDash),c.lineDashOffset=s.borderDashOffset),c.beginPath(),n.drawTicks&&(c.moveTo(s.tx1,s.ty1),c.lineTo(s.tx2,s.ty2)),n.drawOnChartArea&&(c.moveTo(s.x1,s.y1),c.lineTo(s.x2,s.y2)),c.stroke(),c.restore());if(f){var h,p,m,g,_=f,b=ln(n.lineWidth,d.ticksLength-1,1),v=d.borderValue;t.isHorizontal()?(h=u(l,t.left,_)-_/2,p=u(l,t.right,b)+b/2,m=g=v):(m=u(l,t.top,_)-_/2,g=u(l,t.bottom,b)+b/2,h=p=v),c.lineWidth=f,c.strokeStyle=ln(n.color,0),c.beginPath(),c.moveTo(h,m),c.lineTo(p,g),c.stroke()}}},_drawLabels:function(){if(this.options.ticks.display){var e,t,n,r,i,a,o,s,c=this.ctx,l=this._labelItems||(this._labelItems=this._computeLabelItems());for(e=0,n=l.length;e<n;++e){if(a=(i=l[e]).font,c.save(),c.translate(i.x,i.y),c.rotate(i.rotation),c.font=a.string,c.fillStyle=a.color,c.textBaseline="middle",c.textAlign=i.textAlign,o=i.label,s=i.textOffset,on(o))for(t=0,r=o.length;t<r;++t)c.fillText(""+o[t],0,s),s+=a.lineHeight;else c.fillText(o,0,s);c.restore()}}},_drawTitle:function(){var e=this,t=e.ctx,n=e.options,r=n.scaleLabel;if(r.display){var i,a,o=cn(r.fontColor,F.global.defaultFontColor),s=H.options._parseFont(r),c=H.options.toPadding(r.padding),l=s.lineHeight/2,u=n.position,f=0;if(e.isHorizontal())i=e.left+e.width/2,a="bottom"===u?e.bottom-l-c.bottom:e.top+l+c.top;else{var d="left"===u;i=d?e.left+l+c.top:e.right-l-c.top,a=e.top+e.height/2,f=d?-.5*Math.PI:.5*Math.PI}t.save(),t.translate(i,a),t.rotate(f),t.textAlign="center",t.textBaseline="middle",t.fillStyle=o,t.font=s.string,t.fillText(r.labelString,0,0),t.restore()}},draw:function(e){this._isVisible()&&(this._drawGrid(e),this._drawTitle(),this._drawLabels())},_layers:function(){var e=this,t=e.options,n=t.ticks&&t.ticks.z||0,r=t.gridLines&&t.gridLines.z||0;return e._isVisible()&&n!==r&&e.draw===e._draw?[{z:r,draw:function(){e._drawGrid.apply(e,arguments),e._drawTitle.apply(e,arguments)}},{z:n,draw:function(){e._drawLabels.apply(e,arguments)}}]:[{z:n,draw:function(){e.draw.apply(e,arguments)}}]},_getMatchingVisibleMetas:function(t){var n=this,r=n.isHorizontal();return n.chart._getSortedVisibleDatasetMetas().filter(function(e){return(!t||e.type===t)&&(r?e.xAxisID===n.id:e.yAxisID===n.id)})}});bn.prototype._draw=bn.prototype.draw;var vn=bn,yn=H.isNullOrUndef,wn=vn.extend({determineDataLimits:function(){var e,t=this._getLabels(),n=this.options.ticks,r=n.min,i=n.max,a=0,o=t.length-1;void 0!==r&&0<=(e=t.indexOf(r))&&(a=e),void 0!==i&&0<=(e=t.indexOf(i))&&(o=e),this.minIndex=a,this.maxIndex=o,this.min=t[a],this.max=t[o]},buildTicks:function(){var e=this._getLabels(),t=this.minIndex,n=this.maxIndex;this.ticks=0===t&&n===e.length-1?e:e.slice(t,n+1)},getLabelForIndex:function(e,t){var n=this.chart;return n.getDatasetMeta(t).controller._getValueScaleId()===this.id?this.getRightValue(n.data.datasets[t].data[e]):this._getLabels()[e]},_configure:function(){var e=this.options.offset,t=this.ticks;vn.prototype._configure.call(this),this.isHorizontal()||(this._reversePixels=!this._reversePixels),t&&(this._startValue=this.minIndex-(e?.5:0),this._valueRange=Math.max(t.length-(e?0:1),1))},getPixelForValue:function(e,t,n){var r,i,a;return yn(t)||yn(n)||(e=this.chart.data.datasets[n].data[t]),yn(e)||(r=this.isHorizontal()?e.x:e.y),(void 0!==r||void 0!==e&&isNaN(t))&&(i=this._getLabels(),e=H.valueOrDefault(r,e),t=-1!==(a=i.indexOf(e))?a:t,isNaN(t)&&(t=e)),this.getPixelForDecimal((t-this._startValue)/this._valueRange)},getPixelForTick:function(e){var t=this.ticks;return e<0||e>t.length-1?null:this.getPixelForValue(t[e],e+this.minIndex)},getValueForPixel:function(e){var t=Math.round(this._startValue+this.getDecimalForPixel(e)*this._valueRange);return Math.min(Math.max(t,0),this.ticks.length-1)},getBasePixel:function(){return this.bottom}}),Cn={position:"bottom"};wn._defaults=Cn;var An=H.noop,Sn=H.isNullOrUndef;var Tn=vn.extend({getRightValue:function(e){return"string"==typeof e?+e:vn.prototype.getRightValue.call(this,e)},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;if(t.beginAtZero){var n=H.sign(e.min),r=H.sign(e.max);n<0&&r<0?e.max=0:0<n&&0<r&&(e.min=0)}var i=void 0!==t.min||void 0!==t.suggestedMin,a=void 0!==t.max||void 0!==t.suggestedMax;void 0!==t.min?e.min=t.min:void 0!==t.suggestedMin&&(null===e.min?e.min=t.suggestedMin:e.min=Math.min(e.min,t.suggestedMin)),void 0!==t.max?e.max=t.max:void 0!==t.suggestedMax&&(null===e.max?e.max=t.suggestedMax:e.max=Math.max(e.max,t.suggestedMax)),i!==a&&e.min>=e.max&&(i?e.max=e.min+1:e.min=e.max-1),e.min===e.max&&(e.max++,t.beginAtZero||e.min--)},getTickLimit:function(){var e,t=this.options.ticks,n=t.stepSize,r=t.maxTicksLimit;return n?e=Math.ceil(this.max/n)-Math.floor(this.min/n)+1:(e=this._computeTickLimit(),r=r||11),r&&(e=Math.min(r,e)),e},_computeTickLimit:function(){return Number.POSITIVE_INFINITY},handleDirectionalChanges:An,buildTicks:function(){var e=this,t=e.options.ticks,n=e.getTickLimit(),r={maxTicks:n=Math.max(2,n),min:t.min,max:t.max,precision:t.precision,stepSize:H.valueOrDefault(t.fixedStepSize,t.stepSize)},i=e.ticks=function(e,t){var n,r,i,a,o=[],s=e.stepSize,c=s||1,l=e.maxTicks-1,u=e.min,f=e.max,d=e.precision,h=t.min,p=t.max,m=H.niceNum((p-h)/l/c)*c;if(m<1e-14&&Sn(u)&&Sn(f))return[h,p];l<(a=Math.ceil(p/m)-Math.floor(h/m))&&(m=H.niceNum(a*m/l/c)*c),s||Sn(d)?n=Math.pow(10,H._decimalPlaces(m)):(n=Math.pow(10,d),m=Math.ceil(m*n)/n),r=Math.floor(h/m)*m,i=Math.ceil(p/m)*m,s&&(!Sn(u)&&H.almostWhole(u/m,m/1e3)&&(r=u),!Sn(f)&&H.almostWhole(f/m,m/1e3)&&(i=f)),a=(i-r)/m,a=H.almostEquals(a,Math.round(a),m/1e3)?Math.round(a):Math.ceil(a),r=Math.round(r*n)/n,i=Math.round(i*n)/n,o.push(Sn(u)?r:u);for(var g=1;g<a;++g)o.push(Math.round((r+g*m)*n)/n);return o.push(Sn(f)?i:f),o}(r,e);e.handleDirectionalChanges(),e.max=H.max(i),e.min=H.min(i),t.reverse?(i.reverse(),e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max)},convertTicksToLabels:function(){this.ticksAsNumbers=this.ticks.slice(),this.zeroLineIndex=this.ticks.indexOf(0),vn.prototype.convertTicksToLabels.call(this)},_configure:function(){var e,t=this.getTicks(),n=this.min,r=this.max;vn.prototype._configure.call(this),this.options.offset&&t.length&&(n-=e=(r-n)/Math.max(t.length-1,1)/2,r+=e),this._startValue=n,this._endValue=r,this._valueRange=r-n}}),xn={position:"left",ticks:{callback:an.formatters.linear}};function kn(e,t,n,r){var i,a,o,s,c,l,u=e.options,f=u.stacked,d=(i=t,a=f,s=[(o=n).type,void 0===a&&void 0===o.stack?o.index:"",o.stack].join("."),void 0===i[s]&&(i[s]={pos:[],neg:[]}),i[s]),h=d.pos,p=d.neg,m=r.length;for(c=0;c<m;++c)l=e._parseValue(r[c]),isNaN(l.min)||isNaN(l.max)||n.data[c].hidden||(h[c]=h[c]||0,p[c]=p[c]||0,u.relativePoints?h[c]=100:l.min<0||l.max<0?p[c]+=l.min:h[c]+=l.max)}function En(e,t,n){var r,i,a=n.length;for(r=0;r<a;++r)i=e._parseValue(n[r]),isNaN(i.min)||isNaN(i.max)||t.data[r].hidden||(e.min=Math.min(e.min,i.min),e.max=Math.max(e.max,i.max))}var Dn=Tn.extend({determineDataLimits:function(){var e,t,n,r,i=this,a=i.options,o=i.chart.data.datasets,s=i._getMatchingVisibleMetas(),c=a.stacked,l={},u=s.length;if(i.min=Number.POSITIVE_INFINITY,i.max=Number.NEGATIVE_INFINITY,void 0===c)for(e=0;!c&&e<u;++e)c=void 0!==(t=s[e]).stack;for(e=0;e<u;++e)n=o[(t=s[e]).index].data,c?kn(i,l,t,n):En(i,t,n);H.each(l,function(e){r=e.pos.concat(e.neg),i.min=Math.min(i.min,H.min(r)),i.max=Math.max(i.max,H.max(r))}),i.min=H.isFinite(i.min)&&!isNaN(i.min)?i.min:0,i.max=H.isFinite(i.max)&&!isNaN(i.max)?i.max:1,i.handleTickRangeOptions()},_computeTickLimit:function(){var e;return this.isHorizontal()?Math.ceil(this.width/40):(e=H.options._parseFont(this.options.ticks),Math.ceil(this.height/e.lineHeight))},handleDirectionalChanges:function(){this.isHorizontal()||this.ticks.reverse()},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForValue:function(e){return this.getPixelForDecimal((+this.getRightValue(e)-this._startValue)/this._valueRange)},getValueForPixel:function(e){return this._startValue+this.getDecimalForPixel(e)*this._valueRange},getPixelForTick:function(e){var t=this.ticksAsNumbers;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])}}),In=xn;Dn._defaults=In;var Pn=H.valueOrDefault,Mn=H.math.log10;var $n={position:"left",ticks:{callback:an.formatters.logarithmic}};function On(e,t){return H.isFinite(e)&&0<=e?e:t}var Rn=vn.extend({determineDataLimits:function(){var e,t,n,r,i,a,o=this,s=o.options,c=o.chart,l=c.data.datasets,u=o.isHorizontal();function f(e){return u?e.xAxisID===o.id:e.yAxisID===o.id}o.min=Number.POSITIVE_INFINITY,o.max=Number.NEGATIVE_INFINITY,o.minNotZero=Number.POSITIVE_INFINITY;var d=s.stacked;if(void 0===d)for(e=0;e<l.length;e++)if(t=c.getDatasetMeta(e),c.isDatasetVisible(e)&&f(t)&&void 0!==t.stack){d=!0;break}if(s.stacked||d){var h={};for(e=0;e<l.length;e++){var p=[(t=c.getDatasetMeta(e)).type,void 0===s.stacked&&void 0===t.stack?e:"",t.stack].join(".");if(c.isDatasetVisible(e)&&f(t))for(void 0===h[p]&&(h[p]=[]),i=0,a=(r=l[e].data).length;i<a;i++){var m=h[p];n=o._parseValue(r[i]),isNaN(n.min)||isNaN(n.max)||t.data[i].hidden||n.min<0||n.max<0||(m[i]=m[i]||0,m[i]+=n.max)}}H.each(h,function(e){if(0<e.length){var t=H.min(e),n=H.max(e);o.min=Math.min(o.min,t),o.max=Math.max(o.max,n)}})}else for(e=0;e<l.length;e++)if(t=c.getDatasetMeta(e),c.isDatasetVisible(e)&&f(t))for(i=0,a=(r=l[e].data).length;i<a;i++)n=o._parseValue(r[i]),isNaN(n.min)||isNaN(n.max)||t.data[i].hidden||n.min<0||n.max<0||(o.min=Math.min(n.min,o.min),o.max=Math.max(n.max,o.max),0!==n.min&&(o.minNotZero=Math.min(n.min,o.minNotZero)));o.min=H.isFinite(o.min)?o.min:null,o.max=H.isFinite(o.max)?o.max:null,o.minNotZero=H.isFinite(o.minNotZero)?o.minNotZero:null,this.handleTickRangeOptions()},handleTickRangeOptions:function(){var e=this,t=e.options.ticks;e.min=On(t.min,e.min),e.max=On(t.max,e.max),e.min===e.max&&(0!==e.min&&null!==e.min?(e.min=Math.pow(10,Math.floor(Mn(e.min))-1),e.max=Math.pow(10,Math.floor(Mn(e.max))+1)):(e.min=1,e.max=10)),null===e.min&&(e.min=Math.pow(10,Math.floor(Mn(e.max))-1)),null===e.max&&(e.max=0!==e.min?Math.pow(10,Math.floor(Mn(e.min))+1):10),null===e.minNotZero&&(0<e.min?e.minNotZero=e.min:e.max<1?e.minNotZero=Math.pow(10,Math.floor(Mn(e.max))):e.minNotZero=1)},buildTicks:function(){var e=this,t=e.options.ticks,n=!e.isHorizontal(),r={min:On(t.min),max:On(t.max)},i=e.ticks=function(e,t){var n,r,i=[],a=Pn(e.min,Math.pow(10,Math.floor(Mn(t.min)))),o=Math.floor(Mn(t.max)),s=Math.ceil(t.max/Math.pow(10,o));0===a?(n=Math.floor(Mn(t.minNotZero)),r=Math.floor(t.minNotZero/Math.pow(10,n)),i.push(a),a=r*Math.pow(10,n)):(n=Math.floor(Mn(a)),r=Math.floor(a/Math.pow(10,n)));for(var c=n<0?Math.pow(10,Math.abs(n)):1;i.push(a),10==++r&&(r=1,c=0<=++n?1:c),a=Math.round(r*Math.pow(10,n)*c)/c,n<o||n===o&&r<s;);var l=Pn(e.max,a);return i.push(l),i}(r,e);e.max=H.max(i),e.min=H.min(i),t.reverse?(n=!n,e.start=e.max,e.end=e.min):(e.start=e.min,e.end=e.max),n&&i.reverse()},convertTicksToLabels:function(){this.tickValues=this.ticks.slice(),vn.prototype.convertTicksToLabels.call(this)},getLabelForIndex:function(e,t){return this._getScaleLabel(this.chart.data.datasets[t].data[e])},getPixelForTick:function(e){var t=this.tickValues;return e<0||e>t.length-1?null:this.getPixelForValue(t[e])},_getFirstTickValue:function(e){var t=Math.floor(Mn(e));return Math.floor(e/Math.pow(10,t))*Math.pow(10,t)},_configure:function(){var e=this,t=e.min,n=0;vn.prototype._configure.call(e),0===t&&(t=e._getFirstTickValue(e.minNotZero),n=Pn(e.options.ticks.fontSize,F.global.defaultFontSize)/e._length),e._startValue=Mn(t),e._valueOffset=n,e._valueRange=(Mn(e.max)-Mn(t))/(1-n)},getPixelForValue:function(e){var t=0;return(e=+this.getRightValue(e))>this.min&&0<e&&(t=(Mn(e)-this._startValue)/this._valueRange+this._valueOffset),this.getPixelForDecimal(t)},getValueForPixel:function(e){var t=this.getDecimalForPixel(e);return 0===t&&0===this.min?0:Math.pow(10,this._startValue+(t-this._valueOffset)*this._valueRange)}}),Nn=$n;Rn._defaults=Nn;var Ln=H.valueOrDefault,Fn=H.valueAtIndexOrDefault,Gn=H.options.resolve,jn={display:!0,animate:!0,position:"chartArea",angleLines:{display:!0,color:"rgba(0,0,0,0.1)",lineWidth:1,borderDash:[],borderDashOffset:0},gridLines:{circular:!1},ticks:{showLabelBackdrop:!0,backdropColor:"rgba(255,255,255,0.75)",backdropPaddingY:2,backdropPaddingX:2,callback:an.formatters.linear},pointLabels:{display:!0,fontSize:10,callback:function(e){return e}}};function Bn(e){var t=e.ticks;return t.display&&e.display?Ln(t.fontSize,F.global.defaultFontSize)+2*t.backdropPaddingY:0}function Un(e,t,n,r,i){return e===r||e===i?{start:t-n/2,end:t+n/2}:e<r||i<e?{start:t-n,end:t}:{start:t,end:t+n}}function Hn(e,t,n,r){var i,a,o=n.y+r/2;if(H.isArray(t))for(i=0,a=t.length;i<a;++i)e.fillText(t[i],n.x,o),o+=r;else e.fillText(t,n.x,o)}function Wn(e){return H.isNumber(e)?e:0}var qn=Tn.extend({setDimensions:function(){var e=this;e.width=e.maxWidth,e.height=e.maxHeight,e.paddingTop=Bn(e.options)/2,e.xCenter=Math.floor(e.width/2),e.yCenter=Math.floor((e.height-e.paddingTop)/2),e.drawingArea=Math.min(e.height-e.paddingTop,e.width)/2},determineDataLimits:function(){var i=this,n=i.chart,a=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY;H.each(n.data.datasets,function(e,t){if(n.isDatasetVisible(t)){var r=n.getDatasetMeta(t);H.each(e.data,function(e,t){var n=+i.getRightValue(e);isNaN(n)||r.data[t].hidden||(a=Math.min(n,a),o=Math.max(n,o))})}}),i.min=a===Number.POSITIVE_INFINITY?0:a,i.max=o===Number.NEGATIVE_INFINITY?0:o,i.handleTickRangeOptions()},_computeTickLimit:function(){return Math.ceil(this.drawingArea/Bn(this.options))},convertTicksToLabels:function(){var t=this;Tn.prototype.convertTicksToLabels.call(t),t.pointLabels=t.chart.data.labels.map(function(){var e=H.callback(t.options.pointLabels.callback,arguments,t);return e||0===e?e:""})},getLabelForIndex:function(e,t){return+this.getRightValue(this.chart.data.datasets[t].data[e])},fit:function(){var e=this.options;e.display&&e.pointLabels.display?function(e){var t,n,r,i=H.options._parseFont(e.options.pointLabels),a={l:0,r:e.width,t:0,b:e.height-e.paddingTop},o={};e.ctx.font=i.string,e._pointLabelSizes=[];var s,c,l,u=e.chart.data.labels.length;for(t=0;t<u;t++){r=e.getPointPosition(t,e.drawingArea+5),s=e.ctx,c=i.lineHeight,l=e.pointLabels[t],n=H.isArray(l)?{w:H.longestText(s,s.font,l),h:l.length*c}:{w:s.measureText(l).width,h:c},e._pointLabelSizes[t]=n;var f=e.getIndexAngle(t),d=H.toDegrees(f)%360,h=Un(d,r.x,n.w,0,180),p=Un(d,r.y,n.h,90,270);h.start<a.l&&(a.l=h.start,o.l=f),h.end>a.r&&(a.r=h.end,o.r=f),p.start<a.t&&(a.t=p.start,o.t=f),p.end>a.b&&(a.b=p.end,o.b=f)}e.setReductions(e.drawingArea,a,o)}(this):this.setCenterPoint(0,0,0,0)},setReductions:function(e,t,n){var r=t.l/Math.sin(n.l),i=Math.max(t.r-this.width,0)/Math.sin(n.r),a=-t.t/Math.cos(n.t),o=-Math.max(t.b-(this.height-this.paddingTop),0)/Math.cos(n.b);r=Wn(r),i=Wn(i),a=Wn(a),o=Wn(o),this.drawingArea=Math.min(Math.floor(e-(r+i)/2),Math.floor(e-(a+o)/2)),this.setCenterPoint(r,i,a,o)},setCenterPoint:function(e,t,n,r){var i=this,a=i.width-t-i.drawingArea,o=e+i.drawingArea,s=n+i.drawingArea,c=i.height-i.paddingTop-r-i.drawingArea;i.xCenter=Math.floor((o+a)/2+i.left),i.yCenter=Math.floor((s+c)/2+i.top+i.paddingTop)},getIndexAngle:function(e){var t=this.chart,n=(e*(360/t.data.labels.length)+((t.options||{}).startAngle||0))%360;return(n<0?n+360:n)*Math.PI*2/360},getDistanceFromCenterForValue:function(e){if(H.isNullOrUndef(e))return NaN;var t=this.drawingArea/(this.max-this.min);return this.options.ticks.reverse?(this.max-e)*t:(e-this.min)*t},getPointPosition:function(e,t){var n=this.getIndexAngle(e)-Math.PI/2;return{x:Math.cos(n)*t+this.xCenter,y:Math.sin(n)*t+this.yCenter}},getPointPositionForValue:function(e,t){return this.getPointPosition(e,this.getDistanceFromCenterForValue(t))},getBasePosition:function(e){var t=this.min,n=this.max;return this.getPointPositionForValue(e||0,this.beginAtZero?0:t<0&&n<0?n:0<t&&0<n?t:0)},_drawGrid:function(){var e,n,t,r=this,i=r.ctx,a=r.options,o=a.gridLines,s=a.angleLines,c=Ln(s.lineWidth,o.lineWidth),l=Ln(s.color,o.color);if(a.pointLabels.display&&function(e){var t,n,r,i,a=e.ctx,o=e.options,s=o.pointLabels,c=Bn(o),l=e.getDistanceFromCenterForValue(o.ticks.reverse?e.min:e.max),u=H.options._parseFont(s);a.save(),a.font=u.string,a.textBaseline="middle";for(var f=e.chart.data.labels.length-1;0<=f;f--){var d=0===f?c/2:0,h=e.getPointPosition(f,l+d+5),p=Fn(s.fontColor,f,F.global.defaultFontColor);a.fillStyle=p;var m=e.getIndexAngle(f),g=H.toDegrees(m);a.textAlign=0===(i=g)||180===i?"center":i<180?"left":"right",t=g,n=e._pointLabelSizes[f],r=h,90===t||270===t?r.y-=n.h/2:(270<t||t<90)&&(r.y-=n.h),Hn(a,e.pointLabels[f],h,u.lineHeight)}a.restore()}(r),o.display&&H.each(r.ticks,function(e,t){0!==t&&(n=r.getDistanceFromCenterForValue(r.ticksAsNumbers[t]),function(e,t,n,r){var i,a=e.ctx,o=t.circular,s=e.chart.data.labels.length,c=Fn(t.color,r-1),l=Fn(t.lineWidth,r-1);if((o||s)&&c&&l){if(a.save(),a.strokeStyle=c,a.lineWidth=l,a.setLineDash&&(a.setLineDash(t.borderDash||[]),a.lineDashOffset=t.borderDashOffset||0),a.beginPath(),o)a.arc(e.xCenter,e.yCenter,n,0,2*Math.PI);else{i=e.getPointPosition(0,n),a.moveTo(i.x,i.y);for(var u=1;u<s;u++)i=e.getPointPosition(u,n),a.lineTo(i.x,i.y)}a.closePath(),a.stroke(),a.restore()}}(r,o,n,t))}),s.display&&c&&l){for(i.save(),i.lineWidth=c,i.strokeStyle=l,i.setLineDash&&(i.setLineDash(Gn([s.borderDash,o.borderDash,[]])),i.lineDashOffset=Gn([s.borderDashOffset,o.borderDashOffset,0])),e=r.chart.data.labels.length-1;0<=e;e--)n=r.getDistanceFromCenterForValue(a.ticks.reverse?r.min:r.max),t=r.getPointPosition(e,n),i.beginPath(),i.moveTo(r.xCenter,r.yCenter),i.lineTo(t.x,t.y),i.stroke();i.restore()}},_drawLabels:function(){var n=this,r=n.ctx,i=n.options.ticks;if(i.display){var a,o,e=n.getIndexAngle(0),s=H.options._parseFont(i),c=Ln(i.fontColor,F.global.defaultFontColor);r.save(),r.font=s.string,r.translate(n.xCenter,n.yCenter),r.rotate(e),r.textAlign="center",r.textBaseline="middle",H.each(n.ticks,function(e,t){(0!==t||i.reverse)&&(a=n.getDistanceFromCenterForValue(n.ticksAsNumbers[t]),i.showLabelBackdrop&&(o=r.measureText(e).width,r.fillStyle=i.backdropColor,r.fillRect(-o/2-i.backdropPaddingX,-a-s.size/2-i.backdropPaddingY,o+2*i.backdropPaddingX,s.size+2*i.backdropPaddingY)),r.fillStyle=c,r.fillText(e,0,-a))}),r.restore()}},_drawTitle:H.noop}),zn=jn;qn._defaults=zn;var Vn=H._deprecated,Yn=H.options.resolve,Kn=H.valueOrDefault,Qn=Number.MIN_SAFE_INTEGER||-9007199254740991,Xn=Number.MAX_SAFE_INTEGER||9007199254740991,Zn={millisecond:{common:!0,size:1,steps:1e3},second:{common:!0,size:1e3,steps:60},minute:{common:!0,size:6e4,steps:60},hour:{common:!0,size:36e5,steps:24},day:{common:!0,size:864e5,steps:30},week:{common:!1,size:6048e5,steps:4},month:{common:!0,size:2628e6,steps:12},quarter:{common:!1,size:7884e6,steps:4},year:{common:!0,size:3154e7}},Jn=Object.keys(Zn);function er(e,t){return e-t}function tr(e){return H.valueOrDefault(e.time.min,e.ticks.min)}function nr(e){return H.valueOrDefault(e.time.max,e.ticks.max)}function rr(e,t,n,r){var i=function(e,t,n){for(var r,i,a,o=0,s=e.length-1;0<=o&&o<=s;){if(i=e[(r=o+s>>1)-1]||null,a=e[r],!i)return{lo:null,hi:a};if(a[t]<n)o=r+1;else{if(!(i[t]>n))return{lo:i,hi:a};s=r-1}}return{lo:a,hi:null}}(e,t,n),a=i.lo?i.hi?i.lo:e[e.length-2]:e[0],o=i.lo?i.hi?i.hi:e[e.length-1]:e[1],s=o[t]-a[t],c=s?(n-a[t])/s:0,l=(o[r]-a[r])*c;return a[r]+l}function ir(e,t){var n=e._adapter,r=e.options.time,i=r.parser,a=i||r.format,o=t;return"function"==typeof i&&(o=i(o)),H.isFinite(o)||(o="string"==typeof a?n.parse(o,a):n.parse(o)),null!==o?+o:(i||"function"!=typeof a||(o=a(t),H.isFinite(o)||(o=n.parse(o))),o)}function ar(e,t){if(H.isNullOrUndef(t))return null;var n=e.options.time,r=ir(e,e.getRightValue(t));return null===r||n.round&&(r=+e._adapter.startOf(r,n.round)),r}function or(e,t,n,r){var i,a,o,s=Jn.length;for(i=Jn.indexOf(e);i<s-1;++i)if(o=(a=Zn[Jn[i]]).steps?a.steps:Xn,a.common&&Math.ceil((n-t)/(o*a.size))<=r)return Jn[i];return Jn[s-1]}function sr(e,t,n){var r,i,a=[],o={},s=t.length;for(r=0;r<s;++r)o[i=t[r]]=r,a.push({value:i,major:!1});return 0!==s&&n?function(e,t,n,r){var i,a,o=e._adapter,s=+o.startOf(t[0].value,r),c=t[t.length-1].value;for(i=s;i<=c;i=+o.add(i,1,r))0<=(a=n[i])&&(t[a].major=!0);return t}(e,a,o,n):a}var cr=vn.extend({initialize:function(){this.mergeTicksOptions(),vn.prototype.initialize.call(this)},update:function(){var e=this.options,t=e.time||(e.time={}),n=this._adapter=new rn._date(e.adapters.date);return Vn("time scale",t.format,"time.format","time.parser"),Vn("time scale",t.min,"time.min","ticks.min"),Vn("time scale",t.max,"time.max","ticks.max"),H.mergeIf(t.displayFormats,n.formats()),vn.prototype.update.apply(this,arguments)},getRightValue:function(e){return e&&void 0!==e.t&&(e=e.t),vn.prototype.getRightValue.call(this,e)},determineDataLimits:function(){var e,t,n,r,i,a,o,s=this,c=s.chart,l=s._adapter,u=s.options,f=u.time.unit||"day",d=Xn,h=Qn,p=[],m=[],g=[],_=s._getLabels();for(e=0,n=_.length;e<n;++e)g.push(ar(s,_[e]));for(e=0,n=(c.data.datasets||[]).length;e<n;++e)if(c.isDatasetVisible(e))if(i=c.data.datasets[e].data,H.isObject(i[0]))for(m[e]=[],t=0,r=i.length;t<r;++t)a=ar(s,i[t]),p.push(a),m[e][t]=a;else m[e]=g.slice(0),o||(p=p.concat(g),o=!0);else m[e]=[];g.length&&(d=Math.min(d,g[0]),h=Math.max(h,g[g.length-1])),p.length&&(p=1<n?function(e){var t,n,r,i={},a=[];for(t=0,n=e.length;t<n;++t)i[r=e[t]]||(i[r]=!0,a.push(r));return a}(p).sort(er):p.sort(er),d=Math.min(d,p[0]),h=Math.max(h,p[p.length-1])),d=ar(s,tr(u))||d,h=ar(s,nr(u))||h,d=d===Xn?+l.startOf(Date.now(),f):d,h=h===Qn?+l.endOf(Date.now(),f)+1:h,s.min=Math.min(d,h),s.max=Math.max(d+1,h),s._table=[],s._timestamps={data:p,datasets:m,labels:g}},buildTicks:function(){var e,t,n,r,i,a,o,s,c,l=this,u=l.min,f=l.max,d=l.options,h=d.ticks,p=d.time,m=l._timestamps,g=[],_=l.getLabelCapacity(u),b=h.source,v=d.distribution;for(m="data"===b||"auto"===b&&"series"===v?m.data:"labels"===b?m.labels:function(e,t,n,r){var i,a=e._adapter,o=e.options,s=o.time,c=s.unit||or(s.minUnit,t,n,r),l=Yn([s.stepSize,s.unitStepSize,1]),u="week"===c&&s.isoWeekday,f=t,d=[];if(u&&(f=+a.startOf(f,"isoWeek",u)),f=+a.startOf(f,u?"day":c),a.diff(n,t,c)>1e5*l)throw t+" and "+n+" are too far apart with stepSize of "+l+" "+c;for(i=f;i<n;i=+a.add(i,l,c))d.push(i);return i!==n&&"ticks"!==o.bounds||d.push(i),d}(l,u,f,_),"ticks"===d.bounds&&m.length&&(u=m[0],f=m[m.length-1]),u=ar(l,tr(d))||u,f=ar(l,nr(d))||f,e=0,t=m.length;e<t;++e)u<=(n=m[e])&&n<=f&&g.push(n);return l.min=u,l.max=f,l._unit=p.unit||(h.autoSkip?or(p.minUnit,l.min,l.max,_):function(e,t,n,r,i){var a,o;for(a=Jn.length-1;a>=Jn.indexOf(n);a--)if(o=Jn[a],Zn[o].common&&e._adapter.diff(i,r,o)>=t-1)return o;return Jn[n?Jn.indexOf(n):0]}(l,g.length,p.minUnit,l.min,l.max)),l._majorUnit=h.major.enabled&&"year"!==l._unit?function(e){for(var t=Jn.indexOf(e)+1,n=Jn.length;t<n;++t)if(Zn[Jn[t]].common)return Jn[t]}(l._unit):void 0,l._table=function(e,t,n,r){if("linear"===r||!e.length)return[{time:t,pos:0},{time:n,pos:1}];var i,a,o,s,c,l=[],u=[t];for(i=0,a=e.length;i<a;++i)t<(s=e[i])&&s<n&&u.push(s);for(u.push(n),i=0,a=u.length;i<a;++i)c=u[i+1],o=u[i-1],s=u[i],void 0!==o&&void 0!==c&&Math.round((c+o)/2)===s||l.push({time:s,pos:i/(a-1)});return l}(l._timestamps.data,u,f,v),l._offsets=(r=l._table,i=g,c=s=0,d.offset&&i.length&&(a=rr(r,"time",i[0],"pos"),s=1===i.length?1-a:(rr(r,"time",i[1],"pos")-a)/2,o=rr(r,"time",i[i.length-1],"pos"),c=1===i.length?o:(o-rr(r,"time",i[i.length-2],"pos"))/2),{start:s,end:c,factor:1/(s+1+c)}),h.reverse&&g.reverse(),sr(l,g,l._majorUnit)},getLabelForIndex:function(e,t){var n=this._adapter,r=this.chart.data,i=this.options.time,a=r.labels&&e<r.labels.length?r.labels[e]:"",o=r.datasets[t].data[e];return H.isObject(o)&&(a=this.getRightValue(o)),i.tooltipFormat?n.format(ir(this,a),i.tooltipFormat):"string"==typeof a?a:n.format(ir(this,a),i.displayFormats.datetime)},tickFormatFunction:function(e,t,n,r){var i=this._adapter,a=this.options,o=a.time.displayFormats,s=o[this._unit],c=this._majorUnit,l=o[c],u=n[t],f=a.ticks,d=c&&l&&u&&u.major,h=i.format(e,r||(d?l:s)),p=d?f.major:f.minor,m=Yn([p.callback,p.userCallback,f.callback,f.userCallback]);return m?m(h,t,n):h},convertTicksToLabels:function(e){var t,n,r=[];for(t=0,n=e.length;t<n;++t)r.push(this.tickFormatFunction(e[t].value,t,e));return r},getPixelForOffset:function(e){var t=this._offsets,n=rr(this._table,"time",e,"pos");return this.getPixelForDecimal((t.start+n)*t.factor)},getPixelForValue:function(e,t,n){var r=null;if(void 0!==t&&void 0!==n&&(r=this._timestamps.datasets[n][t]),null===r&&(r=ar(this,e)),null!==r)return this.getPixelForOffset(r)},getPixelForTick:function(e){var t=this.getTicks();return 0<=e&&e<t.length?this.getPixelForOffset(t[e].value):null},getValueForPixel:function(e){var t=this._offsets,n=this.getDecimalForPixel(e)/t.factor-t.end,r=rr(this._table,"pos",n,"time");return this._adapter._create(r)},_getLabelSize:function(e){var t=this.options.ticks,n=this.ctx.measureText(e).width,r=H.toRadians(this.isHorizontal()?t.maxRotation:t.minRotation),i=Math.cos(r),a=Math.sin(r),o=Kn(t.fontSize,F.global.defaultFontSize);return{w:n*i+o*a,h:n*a+o*i}},getLabelWidth:function(e){return this._getLabelSize(e).w},getLabelCapacity:function(e){var t=this.options.time,n=t.displayFormats,r=n[t.unit]||n.millisecond,i=this.tickFormatFunction(e,0,sr(this,[e],this._majorUnit),r),a=this._getLabelSize(i),o=Math.floor(this.isHorizontal()?this.width/a.w:this.height/a.h);return this.options.offset&&o--,0<o?o:1}}),lr={position:"bottom",distribution:"linear",bounds:"data",adapters:{},time:{parser:!1,unit:!1,round:!1,displayFormat:!1,isoWeekday:!1,minUnit:"millisecond",displayFormats:{}},ticks:{autoSkip:!1,source:"auto",major:{enabled:!1}}};cr._defaults=lr;var ur={category:wn,linear:Dn,logarithmic:Rn,radialLinear:qn,time:cr},fr={datetime:"MMM D, YYYY, h:mm:ss a",millisecond:"h:mm:ss.SSS a",second:"h:mm:ss a",minute:"h:mm a",hour:"hA",day:"MMM D",week:"ll",month:"MMM YYYY",quarter:"[Q]Q - YYYY",year:"YYYY"};rn._date.override("function"==typeof r?{_id:"moment",formats:function(){return fr},parse:function(e,t){return"string"==typeof e&&"string"==typeof t?e=r(e,t):e instanceof r||(e=r(e)),e.isValid()?e.valueOf():null},format:function(e,t){return r(e).format(t)},add:function(e,t,n){return r(e).add(t,n).valueOf()},diff:function(e,t,n){return r(e).diff(r(t),n)},startOf:function(e,t,n){return e=r(e),"isoWeek"===t?e.isoWeekday(n).valueOf():e.startOf(t).valueOf()},endOf:function(e,t){return r(e).endOf(t).valueOf()},_create:function(e){return r(e)}}:{}),F._set("global",{plugins:{filler:{propagate:!0}}});var dr={dataset:function(e){var t=e.fill,n=e.chart,r=n.getDatasetMeta(t),i=r&&n.isDatasetVisible(t)&&r.dataset._children||[],a=i.length||0;return a?function(e,t){return t<a&&i[t]._view||null}:null},boundary:function(e){var n=e.boundary,t=n?n.x:null,r=n?n.y:null;return H.isArray(n)?function(e,t){return n[t]}:function(e){return{x:null===t?e.x:t,y:null===r?e.y:r}}}};function hr(e,t,n){var r,i=e._model||{},a=i.fill;if(void 0===a&&(a=!!i.backgroundColor),!1===a||null===a)return!1;if(!0===a)return"origin";if(r=parseFloat(a,10),isFinite(r)&&Math.floor(r)===r)return"-"!==a[0]&&"+"!==a[0]||(r=t+r),!(r===t||r<0||n<=r)&&r;switch(a){case"bottom":return"start";case"top":return"end";case"zero":return"origin";case"origin":case"start":case"end":return a;default:return!1}}function pr(e){return(e.el._scale||{}).getPointPositionForValue?function(e){var t,n,r,i,a,o=e.el._scale,s=o.options,c=o.chart.data.labels.length,l=e.fill,u=[];if(!c)return null;for(t=s.ticks.reverse?o.max:o.min,n=s.ticks.reverse?o.min:o.max,r=o.getPointPositionForValue(0,t),i=0;i<c;++i)a="start"===l||"end"===l?o.getPointPositionForValue(i,"start"===l?t:n):o.getBasePosition(i),s.gridLines.circular&&(a.cx=r.x,a.cy=r.y,a.angle=o.getIndexAngle(i)-Math.PI/2),u.push(a);return u}(e):function(e){var t,n=e.el._model||{},r=e.el._scale||{},i=e.fill,a=null;if(isFinite(i))return null;if("start"===i?a=void 0===n.scaleBottom?r.bottom:n.scaleBottom:"end"===i?a=void 0===n.scaleTop?r.top:n.scaleTop:void 0!==n.scaleZero?a=n.scaleZero:r.getBasePixel&&(a=r.getBasePixel()),null!=a){if(void 0!==a.x&&void 0!==a.y)return a;if(H.isFinite(a))return{x:(t=r.isHorizontal())?a:null,y:t?null:a}}return null}(e)}function mr(e,t,n){var r,i=e[t].fill,a=[t];if(!n)return i;for(;!1!==i&&-1===a.indexOf(i);){if(!isFinite(i))return i;if(!(r=e[i]))return!1;if(r.visible)return i;a.push(i),i=r.fill}return!1}function gr(e){return e&&!e.skip}function _r(e,t,n,r,i){var a,o,s,c;if(r&&i){for(e.moveTo(t[0].x,t[0].y),a=1;a<r;++a)H.canvas.lineTo(e,t[a-1],t[a]);if(void 0===n[0].angle)for(e.lineTo(n[i-1].x,n[i-1].y),a=i-1;0<a;--a)H.canvas.lineTo(e,n[a],n[a-1],!0);else for(o=n[0].cx,s=n[0].cy,c=Math.sqrt(Math.pow(n[0].x-o,2)+Math.pow(n[0].y-s,2)),a=i-1;0<a;--a)e.arc(o,s,c,n[a].angle,n[a-1].angle,!0)}}function br(e,t,n,r,i,a){var o,s,c,l,u,f,d,h,p=t.length,m=r.spanGaps,g=[],_=[],b=0,v=0;for(e.beginPath(),o=0,s=p;o<s;++o)u=n(l=t[c=o%p]._view,c,r),f=gr(l),d=gr(u),a&&void 0===h&&f&&(s=p+(h=o+1)),f&&d?(b=g.push(l),v=_.push(u)):b&&v&&(m?(f&&g.push(l),d&&_.push(u)):(_r(e,g,_,b,v),b=v=0,g=[],_=[]));_r(e,g,_,b,v),e.closePath(),e.fillStyle=i,e.fill()}var vr={id:"filler",afterDatasetsUpdate:function(e,t){var n,r,i,a,o,s,c,l=(e.data.datasets||[]).length,u=t.propagate,f=[];for(r=0;r<l;++r)a=null,(i=(n=e.getDatasetMeta(r)).dataset)&&i._model&&i instanceof Ae.Line&&(a={visible:e.isDatasetVisible(r),fill:hr(i,r,l),chart:e,el:i}),n.$filler=a,f.push(a);for(r=0;r<l;++r)(a=f[r])&&(a.fill=mr(f,r,u),a.boundary=pr(a),a.mapper=(c=void 0,s=(o=a).fill,!(c="dataset")===s?null:(isFinite(s)||(c="boundary"),dr[c](o))))},beforeDatasetsDraw:function(e){var t,n,r,i,a,o,s,c=e._getSortedVisibleDatasetMetas(),l=e.ctx;for(n=c.length-1;0<=n;--n)(t=c[n].$filler)&&t.visible&&(i=(r=t.el)._view,a=r._children||[],o=t.mapper,s=i.backgroundColor||F.global.defaultColor,o&&s&&a.length&&(H.canvas.clipArea(l,e.chartArea),br(l,a,o,i,s,r._loop),H.canvas.unclipArea(l)))}},yr=H.rtl.getRtlAdapter,wr=H.noop,Cr=H.valueOrDefault;function Ar(e,t){return e.usePointStyle&&e.boxWidth>t?t:e.boxWidth}F._set("global",{legend:{display:!0,position:"top",align:"center",fullWidth:!0,reverse:!1,weight:1e3,onClick:function(e,t){var n=t.datasetIndex,r=this.chart,i=r.getDatasetMeta(n);i.hidden=null===i.hidden?!r.data.datasets[n].hidden:null,r.update()},onHover:null,onLeave:null,labels:{boxWidth:40,padding:10,generateLabels:function(n){var r=n.data.datasets,e=n.options.legend||{},i=e.labels&&e.labels.usePointStyle;return n._getSortedDatasetMetas().map(function(e){var t=e.controller.getStyle(i?0:void 0);return{text:r[e.index].label,fillStyle:t.backgroundColor,hidden:!n.isDatasetVisible(e.index),lineCap:t.borderCapStyle,lineDash:t.borderDash,lineDashOffset:t.borderDashOffset,lineJoin:t.borderJoinStyle,lineWidth:t.borderWidth,strokeStyle:t.borderColor,pointStyle:t.pointStyle,rotation:t.rotation,datasetIndex:e.index}},this)}}},legendCallback:function(e){var t,n,r,i=document.createElement("ul"),a=e.data.datasets;for(i.setAttribute("class",e.id+"-legend"),t=0,n=a.length;t<n;t++)(r=i.appendChild(document.createElement("li"))).appendChild(document.createElement("span")).style.backgroundColor=a[t].backgroundColor,a[t].label&&r.appendChild(document.createTextNode(a[t].label));return i.outerHTML}});var Sr=Q.extend({initialize:function(e){H.extend(this,e),this.legendHitBoxes=[],this._hoveredItem=null,this.doughnutMode=!1},beforeUpdate:wr,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:wr,beforeSetDimensions:wr,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:wr,beforeBuildLabels:wr,buildLabels:function(){var t=this,n=t.options.labels||{},e=H.callback(n.generateLabels,[t.chart],t)||[];n.filter&&(e=e.filter(function(e){return n.filter(e,t.chart.data)})),t.options.reverse&&e.reverse(),t.legendItems=e},afterBuildLabels:wr,beforeFit:wr,fit:function(){var e=this,t=e.options,r=t.labels,n=t.display,i=e.ctx,a=H.options._parseFont(r),o=a.size,s=e.legendHitBoxes=[],c=e.minSize,l=e.isHorizontal();if(l?(c.width=e.maxWidth,c.height=n?10:0):(c.width=n?10:0,c.height=e.maxHeight),n){if(i.font=a.string,l){var u=e.lineWidths=[0],f=0;i.textAlign="left",i.textBaseline="middle",H.each(e.legendItems,function(e,t){var n=Ar(r,o)+o/2+i.measureText(e.text).width;(0===t||u[u.length-1]+n+2*r.padding>c.width)&&(f+=o+r.padding,u[u.length-(0<t?0:1)]=0),s[t]={left:0,top:0,width:n,height:o},u[u.length-1]+=n+r.padding}),c.height+=f}else{var d=r.padding,h=e.columnWidths=[],p=e.columnHeights=[],m=r.padding,g=0,_=0;H.each(e.legendItems,function(e,t){var n=Ar(r,o)+o/2+i.measureText(e.text).width;0<t&&_+o+2*d>c.height&&(m+=g+r.padding,h.push(g),p.push(_),_=g=0),g=Math.max(g,n),_+=o+d,s[t]={left:0,top:0,width:n,height:o}}),m+=g,h.push(g),p.push(_),c.width+=m}e.width=c.width,e.height=c.height}else e.width=c.width=e.height=c.height=0},afterFit:wr,isHorizontal:function(){return"top"===this.options.position||"bottom"===this.options.position},draw:function(){var p=this,n=p.options,m=n.labels,e=F.global,g=e.defaultColor,_=e.elements.line,b=p.height,v=p.columnHeights,y=p.width,w=p.lineWidths;if(n.display){var C,A=yr(n.rtl,p.left,p.minSize.width),S=p.ctx,t=Cr(m.fontColor,e.defaultFontColor),r=H.options._parseFont(m),T=r.size;S.textAlign=A.textAlign("left"),S.textBaseline="middle",S.lineWidth=.5,S.strokeStyle=t,S.fillStyle=t,S.font=r.string;var x=Ar(m,T),k=p.legendHitBoxes,E=function(e,t){switch(n.align){case"start":return m.padding;case"end":return e-t;default:return(e-t+m.padding)/2}},D=p.isHorizontal();C=D?{x:p.left+E(y,w[0]),y:p.top+m.padding,line:0}:{x:p.left+m.padding,y:p.top+E(b,v[0]),line:0},H.rtl.overrideTextDirection(p.ctx,n.textDirection);var I=T+m.padding;H.each(p.legendItems,function(e,t){var n=S.measureText(e.text).width,r=x+T/2+n,i=C.x,a=C.y;A.setWidth(p.minSize.width),D?0<t&&i+r+m.padding>p.left+p.minSize.width&&(a=C.y+=I,C.line++,i=C.x=p.left+E(y,w[C.line])):0<t&&a+I>p.top+p.minSize.height&&(i=C.x=i+p.columnWidths[C.line]+m.padding,C.line++,a=C.y=p.top+E(b,v[C.line]));var o,s,c,l,u,f,d,h=A.x(i);!function(e,t,n){if(!(isNaN(x)||x<=0)){S.save();var r=Cr(n.lineWidth,_.borderWidth);if(S.fillStyle=Cr(n.fillStyle,g),S.lineCap=Cr(n.lineCap,_.borderCapStyle),S.lineDashOffset=Cr(n.lineDashOffset,_.borderDashOffset),S.lineJoin=Cr(n.lineJoin,_.borderJoinStyle),S.lineWidth=r,S.strokeStyle=Cr(n.strokeStyle,g),S.setLineDash&&S.setLineDash(Cr(n.lineDash,_.borderDash)),m&&m.usePointStyle){var i=x*Math.SQRT2/2,a=A.xPlus(e,x/2),o=t+T/2;H.canvas.drawPoint(S,n.pointStyle,i,a,o,n.rotation)}else S.fillRect(A.leftForLtr(e,x),t,x,T),0!==r&&S.strokeRect(A.leftForLtr(e,x),t,x,T);S.restore()}}(h,a,e),k[t].left=A.leftForLtr(h,k[t].width),k[t].top=a,o=h,s=a,c=e,l=n,u=T/2,f=A.xPlus(o,x+u),d=s+u,S.fillText(c.text,f,d),c.hidden&&(S.beginPath(),S.lineWidth=2,S.moveTo(f,d),S.lineTo(A.xPlus(f,l),d),S.stroke()),D?C.x+=r+m.padding:C.y+=I}),H.rtl.restoreTextDirection(p.ctx,n.textDirection)}},_getLegendItemAt:function(e,t){var n,r,i;if(e>=this.left&&e<=this.right&&t>=this.top&&t<=this.bottom)for(i=this.legendHitBoxes,n=0;n<i.length;++n)if(e>=(r=i[n]).left&&e<=r.left+r.width&&t>=r.top&&t<=r.top+r.height)return this.legendItems[n];return null},handleEvent:function(e){var t,n=this.options,r="mouseup"===e.type?"click":e.type;if("mousemove"===r){if(!n.onHover&&!n.onLeave)return}else{if("click"!==r)return;if(!n.onClick)return}t=this._getLegendItemAt(e.x,e.y),"click"===r?t&&n.onClick&&n.onClick.call(this,e.native,t):(n.onLeave&&t!==this._hoveredItem&&(this._hoveredItem&&n.onLeave.call(this,e.native,this._hoveredItem),this._hoveredItem=t),n.onHover&&t&&n.onHover.call(this,e.native,t))}});function Tr(e,t){var n=new Sr({ctx:e.ctx,options:t,chart:e});pt.configure(e,n,t),pt.addBox(e,n),e.legend=n}var xr={id:"legend",_element:Sr,beforeInit:function(e){var t=e.options.legend;t&&Tr(e,t)},beforeUpdate:function(e){var t=e.options.legend,n=e.legend;t?(H.mergeIf(t,F.global.legend),n?(pt.configure(e,n,t),n.options=t):Tr(e,t)):n&&(pt.removeBox(e,n),delete e.legend)},afterEvent:function(e,t){var n=e.legend;n&&n.handleEvent(t)}},kr=H.noop;F._set("global",{title:{display:!1,fontStyle:"bold",fullWidth:!0,padding:10,position:"top",text:"",weight:2e3}});var Er=Q.extend({initialize:function(e){H.extend(this,e),this.legendHitBoxes=[]},beforeUpdate:kr,update:function(e,t,n){var r=this;return r.beforeUpdate(),r.maxWidth=e,r.maxHeight=t,r.margins=n,r.beforeSetDimensions(),r.setDimensions(),r.afterSetDimensions(),r.beforeBuildLabels(),r.buildLabels(),r.afterBuildLabels(),r.beforeFit(),r.fit(),r.afterFit(),r.afterUpdate(),r.minSize},afterUpdate:kr,beforeSetDimensions:kr,setDimensions:function(){var e=this;e.isHorizontal()?(e.width=e.maxWidth,e.left=0,e.right=e.width):(e.height=e.maxHeight,e.top=0,e.bottom=e.height),e.paddingLeft=0,e.paddingTop=0,e.paddingRight=0,e.paddingBottom=0,e.minSize={width:0,height:0}},afterSetDimensions:kr,beforeBuildLabels:kr,buildLabels:kr,afterBuildLabels:kr,beforeFit:kr,fit:function(){var e,t=this.options,n=this.minSize={},r=this.isHorizontal();t.display?(e=(H.isArray(t.text)?t.text.length:1)*H.options._parseFont(t).lineHeight+2*t.padding,this.width=n.width=r?this.maxWidth:e,this.height=n.height=r?e:this.maxHeight):this.width=n.width=this.height=n.height=0},afterFit:kr,isHorizontal:function(){var e=this.options.position;return"top"===e||"bottom"===e},draw:function(){var e=this.ctx,t=this.options;if(t.display){var n,r,i,a=H.options._parseFont(t),o=a.lineHeight,s=o/2+t.padding,c=0,l=this.top,u=this.left,f=this.bottom,d=this.right;e.fillStyle=H.valueOrDefault(t.fontColor,F.global.defaultFontColor),e.font=a.string,this.isHorizontal()?(r=u+(d-u)/2,i=l+s,n=d-u):(r="left"===t.position?u+s:d-s,i=l+(f-l)/2,n=f-l,c=Math.PI*("left"===t.position?-.5:.5)),e.save(),e.translate(r,i),e.rotate(c),e.textAlign="center",e.textBaseline="middle";var h=t.text;if(H.isArray(h))for(var p=0,m=0;m<h.length;++m)e.fillText(h[m],0,p,n),p+=o;else e.fillText(h,0,0,n);e.restore()}}});function Dr(e,t){var n=new Er({ctx:e.ctx,options:t,chart:e});pt.configure(e,n,t),pt.addBox(e,n),e.titleBlock=n}var Ir={},Pr=vr,Mr=xr,$r={id:"title",_element:Er,beforeInit:function(e){var t=e.options.title;t&&Dr(e,t)},beforeUpdate:function(e){var t=e.options.title,n=e.titleBlock;t?(H.mergeIf(t,F.global.title),n?(pt.configure(e,n,t),n.options=t):Dr(e,t)):n&&(pt.removeBox(e,n),delete e.titleBlock)}};for(var Or in Ir.filler=Pr,Ir.legend=Mr,Ir.title=$r,en.helpers=H,function(){function u(e,t,n){var r;return"string"==typeof e?(r=parseInt(e,10),-1!==e.indexOf("%")&&(r=r/100*t.parentNode[n])):r=e,r}function f(e){return null!=e&&"none"!==e}function t(e,t,n){var r=document.defaultView,i=H._getParentNode(e),a=r.getComputedStyle(e)[t],o=r.getComputedStyle(i)[t],s=f(a),c=f(o),l=Number.POSITIVE_INFINITY;return s||c?Math.min(s?u(a,e,n):l,c?u(o,i,n):l):"none"}H.where=function(e,t){if(H.isArray(e)&&Array.prototype.filter)return e.filter(t);var n=[];return H.each(e,function(e){t(e)&&n.push(e)}),n},H.findIndex=Array.prototype.findIndex?function(e,t,n){return e.findIndex(t,n)}:function(e,t,n){n=void 0===n?e:n;for(var r=0,i=e.length;r<i;++r)if(t.call(n,e[r],r,e))return r;return-1},H.findNextWhere=function(e,t,n){H.isNullOrUndef(n)&&(n=-1);for(var r=n+1;r<e.length;r++){var i=e[r];if(t(i))return i}},H.findPreviousWhere=function(e,t,n){H.isNullOrUndef(n)&&(n=e.length);for(var r=n-1;0<=r;r--){var i=e[r];if(t(i))return i}},H.isNumber=function(e){return!isNaN(parseFloat(e))&&isFinite(e)},H.almostEquals=function(e,t,n){return Math.abs(e-t)<n},H.almostWhole=function(e,t){var n=Math.round(e);return n-t<=e&&e<=n+t},H.max=function(e){return e.reduce(function(e,t){return isNaN(t)?e:Math.max(e,t)},Number.NEGATIVE_INFINITY)},H.min=function(e){return e.reduce(function(e,t){return isNaN(t)?e:Math.min(e,t)},Number.POSITIVE_INFINITY)},H.sign=Math.sign?function(e){return Math.sign(e)}:function(e){return 0==(e=+e)||isNaN(e)?e:0<e?1:-1},H.toRadians=function(e){return e*(Math.PI/180)},H.toDegrees=function(e){return e*(180/Math.PI)},H._decimalPlaces=function(e){if(H.isFinite(e)){for(var t=1,n=0;Math.round(e*t)/t!==e;)t*=10,n++;return n}},H.getAngleFromPoint=function(e,t){var n=t.x-e.x,r=t.y-e.y,i=Math.sqrt(n*n+r*r),a=Math.atan2(r,n);return a<-.5*Math.PI&&(a+=2*Math.PI),{angle:a,distance:i}},H.distanceBetweenPoints=function(e,t){return Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2))},H.aliasPixel=function(e){return e%2==0?0:.5},H._alignPixel=function(e,t,n){var r=e.currentDevicePixelRatio,i=n/2;return Math.round((t-i)*r)/r+i},H.splineCurve=function(e,t,n,r){var i=e.skip?t:e,a=t,o=n.skip?t:n,s=Math.sqrt(Math.pow(a.x-i.x,2)+Math.pow(a.y-i.y,2)),c=Math.sqrt(Math.pow(o.x-a.x,2)+Math.pow(o.y-a.y,2)),l=s/(s+c),u=c/(s+c),f=r*(l=isNaN(l)?0:l),d=r*(u=isNaN(u)?0:u);return{previous:{x:a.x-f*(o.x-i.x),y:a.y-f*(o.y-i.y)},next:{x:a.x+d*(o.x-i.x),y:a.y+d*(o.y-i.y)}}},H.EPSILON=Number.EPSILON||1e-14,H.splineCurveMonotone=function(e){var t,n,r,i,a,o,s,c,l,u=(e||[]).map(function(e){return{model:e._model,deltaK:0,mK:0}}),f=u.length;for(t=0;t<f;++t)if(!(r=u[t]).model.skip){if(n=0<t?u[t-1]:null,(i=t<f-1?u[t+1]:null)&&!i.model.skip){var d=i.model.x-r.model.x;r.deltaK=0!==d?(i.model.y-r.model.y)/d:0}!n||n.model.skip?r.mK=r.deltaK:!i||i.model.skip?r.mK=n.deltaK:this.sign(n.deltaK)!==this.sign(r.deltaK)?r.mK=0:r.mK=(n.deltaK+r.deltaK)/2}for(t=0;t<f-1;++t)r=u[t],i=u[t+1],r.model.skip||i.model.skip||(H.almostEquals(r.deltaK,0,this.EPSILON)?r.mK=i.mK=0:(a=r.mK/r.deltaK,o=i.mK/r.deltaK,(c=Math.pow(a,2)+Math.pow(o,2))<=9||(s=3/Math.sqrt(c),r.mK=a*s*r.deltaK,i.mK=o*s*r.deltaK)));for(t=0;t<f;++t)(r=u[t]).model.skip||(n=0<t?u[t-1]:null,i=t<f-1?u[t+1]:null,n&&!n.model.skip&&(l=(r.model.x-n.model.x)/3,r.model.controlPointPreviousX=r.model.x-l,r.model.controlPointPreviousY=r.model.y-l*r.mK),i&&!i.model.skip&&(l=(i.model.x-r.model.x)/3,r.model.controlPointNextX=r.model.x+l,r.model.controlPointNextY=r.model.y+l*r.mK))},H.nextItem=function(e,t,n){return n?t>=e.length-1?e[0]:e[t+1]:t>=e.length-1?e[e.length-1]:e[t+1]},H.previousItem=function(e,t,n){return n?t<=0?e[e.length-1]:e[t-1]:t<=0?e[0]:e[t-1]},H.niceNum=function(e,t){var n=Math.floor(H.log10(e)),r=e/Math.pow(10,n);return(t?r<1.5?1:r<3?2:r<7?5:10:r<=1?1:r<=2?2:r<=5?5:10)*Math.pow(10,n)},H.requestAnimFrame="undefined"==typeof window?function(e){e()}:window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame||function(e){return window.setTimeout(e,1e3/60)},H.getRelativePosition=function(e,t){var n,r,i=e.originalEvent||e,a=e.target||e.srcElement,o=a.getBoundingClientRect(),s=i.touches;r=s&&0<s.length?(n=s[0].clientX,s[0].clientY):(n=i.clientX,i.clientY);var c=parseFloat(H.getStyle(a,"padding-left")),l=parseFloat(H.getStyle(a,"padding-top")),u=parseFloat(H.getStyle(a,"padding-right")),f=parseFloat(H.getStyle(a,"padding-bottom")),d=o.right-o.left-c-u,h=o.bottom-o.top-l-f;return{x:n=Math.round((n-o.left-c)/d*a.width/t.currentDevicePixelRatio),y:r=Math.round((r-o.top-l)/h*a.height/t.currentDevicePixelRatio)}},H.getConstraintWidth=function(e){return t(e,"max-width","clientWidth")},H.getConstraintHeight=function(e){return t(e,"max-height","clientHeight")},H._calculatePadding=function(e,t,n){return-1<(t=H.getStyle(e,t)).indexOf("%")?n*parseInt(t,10)/100:parseInt(t,10)},H._getParentNode=function(e){var t=e.parentNode;return t&&"[object ShadowRoot]"===t.toString()&&(t=t.host),t},H.getMaximumWidth=function(e){var t=H._getParentNode(e);if(!t)return e.clientWidth;var n=t.clientWidth,r=n-H._calculatePadding(t,"padding-left",n)-H._calculatePadding(t,"padding-right",n),i=H.getConstraintWidth(e);return isNaN(i)?r:Math.min(r,i)},H.getMaximumHeight=function(e){var t=H._getParentNode(e);if(!t)return e.clientHeight;var n=t.clientHeight,r=n-H._calculatePadding(t,"padding-top",n)-H._calculatePadding(t,"padding-bottom",n),i=H.getConstraintHeight(e);return isNaN(i)?r:Math.min(r,i)},H.getStyle=function(e,t){return e.currentStyle?e.currentStyle[t]:document.defaultView.getComputedStyle(e,null).getPropertyValue(t)},H.retinaScale=function(e,t){var n=e.currentDevicePixelRatio=t||"undefined"!=typeof window&&window.devicePixelRatio||1;if(1!==n){var r=e.canvas,i=e.height,a=e.width;r.height=i*n,r.width=a*n,e.ctx.scale(n,n),r.style.height||r.style.width||(r.style.height=i+"px",r.style.width=a+"px")}},H.fontString=function(e,t,n){return t+" "+e+"px "+n},H.longestText=function(e,t,n,r){var i=(r=r||{}).data=r.data||{},a=r.garbageCollect=r.garbageCollect||[];r.font!==t&&(i=r.data={},a=r.garbageCollect=[],r.font=t),e.font=t;var o,s,c,l,u,f=0,d=n.length;for(o=0;o<d;o++)if(null!=(l=n[o])&&!0!==H.isArray(l))f=H.measureText(e,i,a,f,l);else if(H.isArray(l))for(s=0,c=l.length;s<c;s++)null==(u=l[s])||H.isArray(u)||(f=H.measureText(e,i,a,f,u));var h=a.length/2;if(h>n.length){for(o=0;o<h;o++)delete i[a[o]];a.splice(0,h)}return f},H.measureText=function(e,t,n,r,i){var a=t[i];return a||(a=t[i]=e.measureText(i).width,n.push(i)),r<a&&(r=a),r},H.numberOfLabelLines=function(e){var t=1;return H.each(e,function(e){H.isArray(e)&&e.length>t&&(t=e.length)}),t},H.color=C?function(e){return e instanceof CanvasGradient&&(e=F.global.defaultColor),C(e)}:function(e){return console.error("Color.js not found!"),e},H.getHoverColor=function(e){return e instanceof CanvasPattern||e instanceof CanvasGradient?e:H.color(e).saturate(.5).darken(.1).rgbString()}}(),en._adapters=rn,en.Animation=Z,en.animationService=J,en.controllers=Xe,en.DatasetController=ie,en.defaults=F,en.Element=Q,en.elements=Ae,en.Interaction=it,en.layouts=pt,en.platform=$t,en.plugins=Ot,en.Scale=vn,en.scaleService=Rt,en.Ticks=an,en.Tooltip=zt,en.helpers.each(ur,function(e,t){en.scaleService.registerScaleType(t,e,e._defaults)}),Ir)Ir.hasOwnProperty(Or)&&en.plugins.register(Ir[Or]);en.platform.initialize();var Rr=en;return"undefined"!=typeof window&&(window.Chart=en),(en.Chart=en).Legend=Ir.legend._element,en.Title=Ir.title._element,en.pluginService=en.plugins,en.PluginBase=en.Element.extend({}),en.canvasHelpers=en.helpers.canvas,en.layoutService=en.layouts,en.LinearScaleBase=Tn,en.helpers.each(["Bar","Bubble","Doughnut","Line","PolarArea","Radar","Scatter"],function(n){en[n]=function(e,t){return new en(e,en.helpers.merge(t||{},{type:n.charAt(0).toLowerCase()+n.slice(1)}))}}),Rr}),function(e){"use strict";if("object"==typeof exports)module.exports=e("undefined"!=typeof angular?angular:require("angular"),"undefined"!=typeof Chart?Chart:require("chart.js"));else if("function"==typeof define&&define.amd)define(["angular","chart"],e);else{if("undefined"==typeof angular)throw new Error("AngularJS framework needs to be included, see https://angularjs.org/");if("undefined"==typeof Chart)throw new Error("Chart.js library needs to be included, see http://jtblin.github.io/angular-chart.js/");e(angular,Chart)}}(function(M,$){"use strict";$.defaults.global.multiTooltipTemplate="<%if (datasetLabel){%><%=datasetLabel%>: <%}%><%= value %>",$.defaults.global.tooltips.mode="label",$.defaults.global.elements.line.borderWidth=2,$.defaults.global.elements.rectangle.borderWidth=2,$.defaults.global.legend.display=!1,$.defaults.global.colors=["#97BBCD","#DCDCDC","#F7464A","#46BFBD","#FDB45C","#949FB1","#4D5360"];var c="object"==typeof window.G_vmlCanvasManager&&null!==window.G_vmlCanvasManager&&"function"==typeof window.G_vmlCanvasManager.initElement;return c&&($.defaults.global.animation=!1),M.module("chart.js",[]).provider("ChartJs",function(){var n={responsive:!0},r={Chart:$,getOptions:function(e){var t=e&&n[e]||{};return M.extend({},n,t)}};this.setOptions=function(e,t){t?n[e]=M.merge(n[e]||{},t):(t=e,n=M.merge(n,t)),M.merge(r.Chart.defaults,n)},this.$get=function(){return r}}).factory("ChartJsFactory",["ChartJs","$timeout",function(T,x){return function(a){return{restrict:"CA",scope:{chartGetColor:"=?",chartType:"=",chartData:"=?",chartLabels:"=?",chartOptions:"=?",chartSeries:"=?",chartColors:"=?",chartClick:"=?",chartHover:"=?",chartDatasetOverride:"=?"},link:function(r,i){function e(e,t){if(!s(e)&&!M.equals(e,t)){var n=a||r.chartType;n&&k(n,r,i)}}c&&window.G_vmlCanvasManager.initElement(i[0]),r.$watch("chartData",function(e,t){if(!e||!e.length||Array.isArray(e[0])&&!e[0].length)return void P(r);var n=a||r.chartType;if(!n)return;if(r.chart&&function(e,n){if(e&&n&&e.length&&n.length)return Array.isArray(e[0])?e.length===n.length&&e.every(function(e,t){return e.length===n[t].length}):0<n.reduce(o,0)&&e.length===n.length;return!1}(e,t))return function(n,e){Array.isArray(e.chartData[0])?e.chart.data.datasets.forEach(function(e,t){e.data=n[t]}):e.chart.data.datasets[0].data=n;e.chart.update(),e.$emit("chart-update",e.chart)}(e,r);k(n,r,i)},!0),r.$watch("chartSeries",e,!0),r.$watch("chartLabels",e,!0),r.$watch("chartOptions",e,!0),r.$watch("chartColors",e,!0),r.$watch("chartDatasetOverride",e,!0),r.$watch("chartType",function(e,t){if(s(e))return;if(M.equals(e,t))return;k(e,r,i)},!1),r.$on("$destroy",function(){P(r)}),r.$on("$resize",function(){r.chart&&r.chart.resize()})}}};function k(e,t,n){var r,i,a=(r=e,i=t,M.extend({},T.getOptions(r),i.chartOptions));if((o=t).chartData&&o.chartData.length&&function(e,t,n,r){if(r.responsive&&0===n[0].clientHeight)return x(function(){k(e,t,n)},50,!1),!1;return!0}(e,t,n,a)){var o,s,c=n[0],l=c.getContext("2d");t.chartGetColor="function"==typeof(s=t).chartGetColor?s.chartGetColor:I;var u,f,d,h,p,m,g,_,b,v,y,w,C,A,S=(g=function(e,t){var n=M.copy(t.chartColors||T.getOptions(e).chartColors||$.defaults.global.colors),r=n.length<t.chartData.length;for(;n.length<t.chartData.length;)n.push(t.chartGetColor());r&&(t.chartColors=n);return n.map(D)}(e,m=t),Array.isArray(m.chartData[0])?(_=m.chartLabels,b=m.chartData,v=m.chartSeries||[],y=g,w=m.chartDatasetOverride,{labels:_,datasets:b.map(function(e,t){var n=M.extend({},y[t],{label:v[t],data:e});return w&&w.length>=t&&M.merge(n,w[t]),n})}):(u=m.chartLabels,f=m.chartData,d=g,h=m.chartDatasetOverride,p={labels:u,datasets:[{data:f,backgroundColor:d.map(function(e){return e.pointBackgroundColor}),hoverBackgroundColor:d.map(function(e){return e.backgroundColor})}]},h&&M.merge(p.datasets[0],h),p));P(t),t.chart=new T.Chart(l,{type:e,data:S,options:a}),t.$emit("chart-create",t.chart),A=t,(C=c).onclick=A.chartClick?E(A,"chartClick",!1):M.noop,C.onmousemove=A.chartHover?E(A,"chartHover",!0):M.noop}}function o(e,t){return e+t}function E(a,o,s){var c={point:void 0,points:void 0};return function(e){var t=a.chart.getElementAtEvent||a.chart.getPointAtEvent,n=a.chart.getElementsAtEvent||a.chart.getPointsAtEvent;if(n){var r=n.call(a.chart,e),i=t?t.call(a.chart,e)[0]:void 0;!1!==s&&(M.equals(c.points,r)||M.equals(c.point,i))||(c.point=i,c.points=r,a[o](r,e,i))}}}function D(e){return"string"==typeof e&&"r"===e[0]?r(function(e){var t=e.match(/^rgba?\(([\d,.]+)\)$/);if(!t)throw new Error("Cannot parse rgb value");return(e=t[1].split(",")).map(Number)}(e)):"string"==typeof e&&"#"===e[0]?r((t=e.substr(1),[(n=parseInt(t,16))>>16&255,n>>8&255,255&n])):"object"==typeof e&&null!==e?e:I();var t,n}function I(){var e=[t(0,255),t(0,255),t(0,255)];return r(e)}function r(e){var t=e[3]||1;return{backgroundColor:n(e=e.slice(0,3),.2),pointBackgroundColor:n(e,t),pointHoverBackgroundColor:n(e,.8),borderColor:n(e,t),pointBorderColor:"#fff",pointHoverBorderColor:n(e,t)}}function t(e,t){return Math.floor(Math.random()*(t-e+1))+e}function n(e,t){return c?"rgb("+e.join(",")+")":"rgba("+e.concat(t).join(",")+")"}function s(e){return!e||Array.isArray(e)&&!e.length||"object"==typeof e&&!Object.keys(e).length}function P(e){e.chart&&(e.chart.destroy(),e.$emit("chart-destroy",e.chart))}}]).directive("chartBase",["ChartJsFactory",function(e){return new e}]).directive("chartLine",["ChartJsFactory",function(e){return new e("line")}]).directive("chartBar",["ChartJsFactory",function(e){return new e("bar")}]).directive("chartHorizontalBar",["ChartJsFactory",function(e){return new e("horizontalBar")}]).directive("chartRadar",["ChartJsFactory",function(e){return new e("radar")}]).directive("chartDoughnut",["ChartJsFactory",function(e){return new e("doughnut")}]).directive("chartPie",["ChartJsFactory",function(e){return new e("pie")}]).directive("chartPolarArea",["ChartJsFactory",function(e){return new e("polarArea")}]).directive("chartBubble",["ChartJsFactory",function(e){return new e("bubble")}]).name}),"undefined"==typeof jQuery)throw new Error("Bootstrap's JavaScript requires jQuery");!function(e){"use strict";var t=jQuery.fn.jquery.split(" ")[0].split(".");if(t[0]<2&&t[1]<9||1==t[0]&&9==t[1]&&t[2]<1||3<t[0])throw new Error("Bootstrap's JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4")}(),function(r){"use strict";r.fn.emulateTransitionEnd=function(e){var t=!1,n=this;r(this).one("bsTransitionEnd",function(){t=!0});return setTimeout(function(){t||r(n).trigger(r.support.transition.end)},e),this},r(function(){r.support.transition=function(){var e=document.createElement("bootstrap"),t={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var n in t)if(void 0!==e.style[n])return{end:t[n]};return!1}(),r.support.transition&&(r.event.special.bsTransitionEnd={bindType:r.support.transition.end,delegateType:r.support.transition.end,handle:function(e){if(r(e.target).is(this))return e.handleObj.handler.apply(this,arguments)}})})}(jQuery),function(a){"use strict";var t='[data-dismiss="alert"]',o=function(e){a(e).on("click",t,this.close)};o.VERSION="3.4.1",o.TRANSITION_DURATION=150,o.prototype.close=function(e){var t=a(this),n=t.attr("data-target");n||(n=(n=t.attr("href"))&&n.replace(/.*(?=#[^\s]*$)/,"")),n="#"===n?[]:n;var r=a(document).find(n);function i(){r.detach().trigger("closed.bs.alert").remove()}e&&e.preventDefault(),r.length||(r=t.closest(".alert")),r.trigger(e=a.Event("close.bs.alert")),e.isDefaultPrevented()||(r.removeClass("in"),a.support.transition&&r.hasClass("fade")?r.one("bsTransitionEnd",i).emulateTransitionEnd(o.TRANSITION_DURATION):i())};var e=a.fn.alert;a.fn.alert=function(n){return this.each(function(){var e=a(this),t=e.data("bs.alert");t||e.data("bs.alert",t=new o(this)),"string"==typeof n&&t[n].call(e)})},a.fn.alert.Constructor=o,a.fn.alert.noConflict=function(){return a.fn.alert=e,this},a(document).on("click.bs.alert.data-api",t,o.prototype.close)}(jQuery),function(a){"use strict";var i=function(e,t){this.$element=a(e),this.options=a.extend({},i.DEFAULTS,t),this.isLoading=!1};function n(r){return this.each(function(){var e=a(this),t=e.data("bs.button"),n="object"==typeof r&&r;t||e.data("bs.button",t=new i(this,n)),"toggle"==r?t.toggle():r&&t.setState(r)})}i.VERSION="3.4.1",i.DEFAULTS={loadingText:"loading..."},i.prototype.setState=function(e){var t="disabled",n=this.$element,r=n.is("input")?"val":"html",i=n.data();e+="Text",null==i.resetText&&n.data("resetText",n[r]()),setTimeout(a.proxy(function(){n[r](null==i[e]?this.options[e]:i[e]),"loadingText"==e?(this.isLoading=!0,n.addClass(t).attr(t,t).prop(t,!0)):this.isLoading&&(this.isLoading=!1,n.removeClass(t).removeAttr(t).prop(t,!1))},this),0)},i.prototype.toggle=function(){var e=!0,t=this.$element.closest('[data-toggle="buttons"]');if(t.length){var n=this.$element.find("input");"radio"==n.prop("type")?(n.prop("checked")&&(e=!1),t.find(".active").removeClass("active"),this.$element.addClass("active")):"checkbox"==n.prop("type")&&(n.prop("checked")!==this.$element.hasClass("active")&&(e=!1),this.$element.toggleClass("active")),n.prop("checked",this.$element.hasClass("active")),e&&n.trigger("change")}else this.$element.attr("aria-pressed",!this.$element.hasClass("active")),this.$element.toggleClass("active")};var e=a.fn.button;a.fn.button=n,a.fn.button.Constructor=i,a.fn.button.noConflict=function(){return a.fn.button=e,this},a(document).on("click.bs.button.data-api",'[data-toggle^="button"]',function(e){var t=a(e.target).closest(".btn");n.call(t,"toggle"),a(e.target).is('input[type="radio"], input[type="checkbox"]')||(e.preventDefault(),t.is("input,button")?t.trigger("focus"):t.find("input:visible,button:visible").first().trigger("focus"))}).on("focus.bs.button.data-api blur.bs.button.data-api",'[data-toggle^="button"]',function(e){a(e.target).closest(".btn").toggleClass("focus",/^focus(in)?$/.test(e.type))})}(jQuery),function(f){"use strict";var d=function(e,t){this.$element=f(e),this.$indicators=this.$element.find(".carousel-indicators"),this.options=t,this.paused=null,this.sliding=null,this.interval=null,this.$active=null,this.$items=null,this.options.keyboard&&this.$element.on("keydown.bs.carousel",f.proxy(this.keydown,this)),"hover"==this.options.pause&&!("ontouchstart"in document.documentElement)&&this.$element.on("mouseenter.bs.carousel",f.proxy(this.pause,this)).on("mouseleave.bs.carousel",f.proxy(this.cycle,this))};function s(i){return this.each(function(){var e=f(this),t=e.data("bs.carousel"),n=f.extend({},d.DEFAULTS,e.data(),"object"==typeof i&&i),r="string"==typeof i?i:n.slide;t||e.data("bs.carousel",t=new d(this,n)),"number"==typeof i?t.to(i):r?t[r]():n.interval&&t.pause().cycle()})}d.VERSION="3.4.1",d.TRANSITION_DURATION=600,d.DEFAULTS={interval:5e3,pause:"hover",wrap:!0,keyboard:!0},d.prototype.keydown=function(e){if(!/input|textarea/i.test(e.target.tagName)){switch(e.which){case 37:this.prev();break;case 39:this.next();break;default:return}e.preventDefault()}},d.prototype.cycle=function(e){return e||(this.paused=!1),this.interval&&clearInterval(this.interval),this.options.interval&&!this.paused&&(this.interval=setInterval(f.proxy(this.next,this),this.options.interval)),this},d.prototype.getItemIndex=function(e){return this.$items=e.parent().children(".item"),this.$items.index(e||this.$active)},d.prototype.getItemForDirection=function(e,t){var n=this.getItemIndex(t);if(("prev"==e&&0===n||"next"==e&&n==this.$items.length-1)&&!this.options.wrap)return t;var r=(n+("prev"==e?-1:1))%this.$items.length;return this.$items.eq(r)},d.prototype.to=function(e){var t=this,n=this.getItemIndex(this.$active=this.$element.find(".item.active"));if(!(e>this.$items.length-1||e<0))return this.sliding?this.$element.one("slid.bs.carousel",function(){t.to(e)}):n==e?this.pause().cycle():this.slide(n<e?"next":"prev",this.$items.eq(e))},d.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&f.support.transition&&(this.$element.trigger(f.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},d.prototype.next=function(){if(!this.sliding)return this.slide("next")},d.prototype.prev=function(){if(!this.sliding)return this.slide("prev")},d.prototype.slide=function(e,t){var n=this.$element.find(".item.active"),r=t||this.getItemForDirection(e,n),i=this.interval,a="next"==e?"left":"right",o=this;if(r.hasClass("active"))return this.sliding=!1;var s=r[0],c=f.Event("slide.bs.carousel",{relatedTarget:s,direction:a});if(this.$element.trigger(c),!c.isDefaultPrevented()){if(this.sliding=!0,i&&this.pause(),this.$indicators.length){this.$indicators.find(".active").removeClass("active");var l=f(this.$indicators.children()[this.getItemIndex(r)]);l&&l.addClass("active")}var u=f.Event("slid.bs.carousel",{relatedTarget:s,direction:a});return f.support.transition&&this.$element.hasClass("slide")?(r.addClass(e),"object"==typeof r&&r.length&&r[0].offsetWidth,n.addClass(a),r.addClass(a),n.one("bsTransitionEnd",function(){r.removeClass([e,a].join(" ")).addClass("active"),n.removeClass(["active",a].join(" ")),o.sliding=!1,setTimeout(function(){o.$element.trigger(u)},0)}).emulateTransitionEnd(d.TRANSITION_DURATION)):(n.removeClass("active"),r.addClass("active"),this.sliding=!1,this.$element.trigger(u)),i&&this.cycle(),this}};var e=f.fn.carousel;f.fn.carousel=s,f.fn.carousel.Constructor=d,f.fn.carousel.noConflict=function(){return f.fn.carousel=e,this};var t=function(e){var t=f(this),n=t.attr("href");n&&(n=n.replace(/.*(?=#[^\s]+$)/,""));var r=t.attr("data-target")||n,i=f(document).find(r);if(i.hasClass("carousel")){var a=f.extend({},i.data(),t.data()),o=t.attr("data-slide-to");o&&(a.interval=!1),s.call(i,a),o&&i.data("bs.carousel").to(o),e.preventDefault()}};f(document).on("click.bs.carousel.data-api","[data-slide]",t).on("click.bs.carousel.data-api","[data-slide-to]",t),f(window).on("load",function(){f('[data-ride="carousel"]').each(function(){var e=f(this);s.call(e,e.data())})})}(jQuery),function(o){"use strict";var s=function(e,t){this.$element=o(e),this.options=o.extend({},s.DEFAULTS,t),this.$trigger=o('[data-toggle="collapse"][href="#'+e.id+'"],[data-toggle="collapse"][data-target="#'+e.id+'"]'),this.transitioning=null,this.options.parent?this.$parent=this.getParent():this.addAriaAndCollapsedClass(this.$element,this.$trigger),this.options.toggle&&this.toggle()};function i(e){var t,n=e.attr("data-target")||(t=e.attr("href"))&&t.replace(/.*(?=#[^\s]+$)/,"");return o(document).find(n)}function c(r){return this.each(function(){var e=o(this),t=e.data("bs.collapse"),n=o.extend({},s.DEFAULTS,e.data(),"object"==typeof r&&r);!t&&n.toggle&&/show|hide/.test(r)&&(n.toggle=!1),t||e.data("bs.collapse",t=new s(this,n)),"string"==typeof r&&t[r]()})}s.VERSION="3.4.1",s.TRANSITION_DURATION=350,s.DEFAULTS={toggle:!0},s.prototype.dimension=function(){return this.$element.hasClass("width")?"width":"height"},s.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e,t=this.$parent&&this.$parent.children(".panel").children(".in, .collapsing");if(!(t&&t.length&&(e=t.data("bs.collapse"))&&e.transitioning)){var n=o.Event("show.bs.collapse");if(this.$element.trigger(n),!n.isDefaultPrevented()){t&&t.length&&(c.call(t,"hide"),e||t.data("bs.collapse",null));var r=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[r](0).attr("aria-expanded",!0),this.$trigger.removeClass("collapsed").attr("aria-expanded",!0),this.transitioning=1;var i=function(){this.$element.removeClass("collapsing").addClass("collapse in")[r](""),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!o.support.transition)return i.call(this);var a=o.camelCase(["scroll",r].join("-"));this.$element.one("bsTransitionEnd",o.proxy(i,this)).emulateTransitionEnd(s.TRANSITION_DURATION)[r](this.$element[0][a])}}}},s.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=o.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var t=this.dimension();this.$element[t](this.$element[t]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse in").attr("aria-expanded",!1),this.$trigger.addClass("collapsed").attr("aria-expanded",!1),this.transitioning=1;var n=function(){this.transitioning=0,this.$element.removeClass("collapsing").addClass("collapse").trigger("hidden.bs.collapse")};if(!o.support.transition)return n.call(this);this.$element[t](0).one("bsTransitionEnd",o.proxy(n,this)).emulateTransitionEnd(s.TRANSITION_DURATION)}}},s.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()},s.prototype.getParent=function(){return o(document).find(this.options.parent).find('[data-toggle="collapse"][data-parent="'+this.options.parent+'"]').each(o.proxy(function(e,t){var n=o(t);this.addAriaAndCollapsedClass(i(n),n)},this)).end()},s.prototype.addAriaAndCollapsedClass=function(e,t){var n=e.hasClass("in");e.attr("aria-expanded",n),t.toggleClass("collapsed",!n).attr("aria-expanded",n)};var e=o.fn.collapse;o.fn.collapse=c,o.fn.collapse.Constructor=s,o.fn.collapse.noConflict=function(){return o.fn.collapse=e,this},o(document).on("click.bs.collapse.data-api",'[data-toggle="collapse"]',function(e){var t=o(this);t.attr("data-target")||e.preventDefault();var n=i(t),r=n.data("bs.collapse")?"toggle":t.data();c.call(n,r)})}(jQuery),function(o){"use strict";var s='[data-toggle="dropdown"]',r=function(e){o(e).on("click.bs.dropdown",this.toggle)};function c(e){var t=e.attr("data-target");t||(t=(t=e.attr("href"))&&/#[A-Za-z]/.test(t)&&t.replace(/.*(?=#[^\s]*$)/,""));var n="#"!==t?o(document).find(t):null;return n&&n.length?n:e.parent()}function a(r){r&&3===r.which||(o(".dropdown-backdrop").remove(),o(s).each(function(){var e=o(this),t=c(e),n={relatedTarget:this};t.hasClass("open")&&(r&&"click"==r.type&&/input|textarea/i.test(r.target.tagName)&&o.contains(t[0],r.target)||(t.trigger(r=o.Event("hide.bs.dropdown",n)),r.isDefaultPrevented()||(e.attr("aria-expanded","false"),t.removeClass("open").trigger(o.Event("hidden.bs.dropdown",n)))))}))}r.VERSION="3.4.1",r.prototype.toggle=function(e){var t=o(this);if(!t.is(".disabled, :disabled")){var n=c(t),r=n.hasClass("open");if(a(),!r){"ontouchstart"in document.documentElement&&!n.closest(".navbar-nav").length&&o(document.createElement("div")).addClass("dropdown-backdrop").insertAfter(o(this)).on("click",a);var i={relatedTarget:this};if(n.trigger(e=o.Event("show.bs.dropdown",i)),e.isDefaultPrevented())return;t.trigger("focus").attr("aria-expanded","true"),n.toggleClass("open").trigger(o.Event("shown.bs.dropdown",i))}return!1}},r.prototype.keydown=function(e){if(/(38|40|27|32)/.test(e.which)&&!/input|textarea/i.test(e.target.tagName)){var t=o(this);if(e.preventDefault(),e.stopPropagation(),!t.is(".disabled, :disabled")){var n=c(t),r=n.hasClass("open");if(!r&&27!=e.which||r&&27==e.which)return 27==e.which&&n.find(s).trigger("focus"),t.trigger("click");var i=n.find(".dropdown-menu li:not(.disabled):visible a");if(i.length){var a=i.index(e.target);38==e.which&&0<a&&a--,40==e.which&&a<i.length-1&&a++,~a||(a=0),i.eq(a).trigger("focus")}}}};var e=o.fn.dropdown;o.fn.dropdown=function(n){return this.each(function(){var e=o(this),t=e.data("bs.dropdown");t||e.data("bs.dropdown",t=new r(this)),"string"==typeof n&&t[n].call(e)})},o.fn.dropdown.Constructor=r,o.fn.dropdown.noConflict=function(){return o.fn.dropdown=e,this},o(document).on("click.bs.dropdown.data-api",a).on("click.bs.dropdown.data-api",".dropdown form",function(e){e.stopPropagation()}).on("click.bs.dropdown.data-api",s,r.prototype.toggle).on("keydown.bs.dropdown.data-api",s,r.prototype.keydown).on("keydown.bs.dropdown.data-api",".dropdown-menu",r.prototype.keydown)}(jQuery),function(o){"use strict";var a=function(e,t){this.options=t,this.$body=o(document.body),this.$element=o(e),this.$dialog=this.$element.find(".modal-dialog"),this.$backdrop=null,this.isShown=null,this.originalBodyPad=null,this.scrollbarWidth=0,this.ignoreBackdropClick=!1,this.fixedContent=".navbar-fixed-top, .navbar-fixed-bottom",this.options.remote&&this.$element.find(".modal-content").load(this.options.remote,o.proxy(function(){this.$element.trigger("loaded.bs.modal")},this))};function s(r,i){return this.each(function(){var e=o(this),t=e.data("bs.modal"),n=o.extend({},a.DEFAULTS,e.data(),"object"==typeof r&&r);t||e.data("bs.modal",t=new a(this,n)),"string"==typeof r?t[r](i):n.show&&t.show(i)})}a.VERSION="3.4.1",a.TRANSITION_DURATION=300,a.BACKDROP_TRANSITION_DURATION=150,a.DEFAULTS={backdrop:!0,keyboard:!0,show:!0},a.prototype.toggle=function(e){return this.isShown?this.hide():this.show(e)},a.prototype.show=function(n){var r=this,e=o.Event("show.bs.modal",{relatedTarget:n});this.$element.trigger(e),this.isShown||e.isDefaultPrevented()||(this.isShown=!0,this.checkScrollbar(),this.setScrollbar(),this.$body.addClass("modal-open"),this.escape(),this.resize(),this.$element.on("click.dismiss.bs.modal",'[data-dismiss="modal"]',o.proxy(this.hide,this)),this.$dialog.on("mousedown.dismiss.bs.modal",function(){r.$element.one("mouseup.dismiss.bs.modal",function(e){o(e.target).is(r.$element)&&(r.ignoreBackdropClick=!0)})}),this.backdrop(function(){var e=o.support.transition&&r.$element.hasClass("fade");r.$element.parent().length||r.$element.appendTo(r.$body),r.$element.show().scrollTop(0),r.adjustDialog(),e&&r.$element[0].offsetWidth,r.$element.addClass("in"),r.enforceFocus();var t=o.Event("shown.bs.modal",{relatedTarget:n});e?r.$dialog.one("bsTransitionEnd",function(){r.$element.trigger("focus").trigger(t)}).emulateTransitionEnd(a.TRANSITION_DURATION):r.$element.trigger("focus").trigger(t)}))},a.prototype.hide=function(e){e&&e.preventDefault(),e=o.Event("hide.bs.modal"),this.$element.trigger(e),this.isShown&&!e.isDefaultPrevented()&&(this.isShown=!1,this.escape(),this.resize(),o(document).off("focusin.bs.modal"),this.$element.removeClass("in").off("click.dismiss.bs.modal").off("mouseup.dismiss.bs.modal"),this.$dialog.off("mousedown.dismiss.bs.modal"),o.support.transition&&this.$element.hasClass("fade")?this.$element.one("bsTransitionEnd",o.proxy(this.hideModal,this)).emulateTransitionEnd(a.TRANSITION_DURATION):this.hideModal())},a.prototype.enforceFocus=function(){o(document).off("focusin.bs.modal").on("focusin.bs.modal",o.proxy(function(e){document===e.target||this.$element[0]===e.target||this.$element.has(e.target).length||this.$element.trigger("focus")},this))},a.prototype.escape=function(){this.isShown&&this.options.keyboard?this.$element.on("keydown.dismiss.bs.modal",o.proxy(function(e){27==e.which&&this.hide()},this)):this.isShown||this.$element.off("keydown.dismiss.bs.modal")},a.prototype.resize=function(){this.isShown?o(window).on("resize.bs.modal",o.proxy(this.handleUpdate,this)):o(window).off("resize.bs.modal")},a.prototype.hideModal=function(){var e=this;this.$element.hide(),this.backdrop(function(){e.$body.removeClass("modal-open"),e.resetAdjustments(),e.resetScrollbar(),e.$element.trigger("hidden.bs.modal")})},a.prototype.removeBackdrop=function(){this.$backdrop&&this.$backdrop.remove(),this.$backdrop=null},a.prototype.backdrop=function(e){var t=this,n=this.$element.hasClass("fade")?"fade":"";if(this.isShown&&this.options.backdrop){var r=o.support.transition&&n;if(this.$backdrop=o(document.createElement("div")).addClass("modal-backdrop "+n).appendTo(this.$body),this.$element.on("click.dismiss.bs.modal",o.proxy(function(e){this.ignoreBackdropClick?this.ignoreBackdropClick=!1:e.target===e.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus():this.hide())},this)),r&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;r?this.$backdrop.one("bsTransitionEnd",e).emulateTransitionEnd(a.BACKDROP_TRANSITION_DURATION):e()}else if(!this.isShown&&this.$backdrop){this.$backdrop.removeClass("in");var i=function(){t.removeBackdrop(),e&&e()};o.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one("bsTransitionEnd",i).emulateTransitionEnd(a.BACKDROP_TRANSITION_DURATION):i()}else e&&e()},a.prototype.handleUpdate=function(){this.adjustDialog()},a.prototype.adjustDialog=function(){var e=this.$element[0].scrollHeight>document.documentElement.clientHeight;this.$element.css({paddingLeft:!this.bodyIsOverflowing&&e?this.scrollbarWidth:"",paddingRight:this.bodyIsOverflowing&&!e?this.scrollbarWidth:""})},a.prototype.resetAdjustments=function(){this.$element.css({paddingLeft:"",paddingRight:""})},a.prototype.checkScrollbar=function(){var e=window.innerWidth;if(!e){var t=document.documentElement.getBoundingClientRect();e=t.right-Math.abs(t.left)}this.bodyIsOverflowing=document.body.clientWidth<e,this.scrollbarWidth=this.measureScrollbar()},a.prototype.setScrollbar=function(){var e=parseInt(this.$body.css("padding-right")||0,10);this.originalBodyPad=document.body.style.paddingRight||"";var i=this.scrollbarWidth;this.bodyIsOverflowing&&(this.$body.css("padding-right",e+i),o(this.fixedContent).each(function(e,t){var n=t.style.paddingRight,r=o(t).css("padding-right");o(t).data("padding-right",n).css("padding-right",parseFloat(r)+i+"px")}))},a.prototype.resetScrollbar=function(){this.$body.css("padding-right",this.originalBodyPad),o(this.fixedContent).each(function(e,t){var n=o(t).data("padding-right");o(t).removeData("padding-right"),t.style.paddingRight=n||""})},a.prototype.measureScrollbar=function(){var e=document.createElement("div");e.className="modal-scrollbar-measure",this.$body.append(e);var t=e.offsetWidth-e.clientWidth;return this.$body[0].removeChild(e),t};var e=o.fn.modal;o.fn.modal=s,o.fn.modal.Constructor=a,o.fn.modal.noConflict=function(){return o.fn.modal=e,this},o(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(e){var t=o(this),n=t.attr("href"),r=t.attr("data-target")||n&&n.replace(/.*(?=#[^\s]+$)/,""),i=o(document).find(r),a=i.data("bs.modal")?"toggle":o.extend({remote:!/#/.test(n)&&n},i.data(),t.data());t.is("a")&&e.preventDefault(),i.one("show.bs.modal",function(e){e.isDefaultPrevented()||i.one("hidden.bs.modal",function(){t.is(":visible")&&t.trigger("focus")})}),s.call(i,a,this)})}(jQuery),function(m){"use strict";var r=["sanitize","whiteList","sanitizeFn"],o=["background","cite","href","itemtype","longdesc","poster","src","xlink:href"],e={"*":["class","dir","id","lang","role",/^aria-[\w-]*$/i],a:["target","href","title","rel"],area:[],b:[],br:[],col:[],code:[],div:[],em:[],hr:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],i:[],img:["src","alt","title","width","height"],li:[],ol:[],p:[],pre:[],s:[],small:[],span:[],sub:[],sup:[],strong:[],u:[],ul:[]},s=/^(?:(?:https?|mailto|ftp|tel|file):|[^&:/?#]*(?:[/?#]|$))/gi,c=/^data:(?:image\/(?:bmp|gif|jpeg|jpg|png|tiff|webp)|video\/(?:mpeg|mp4|ogg|webm)|audio\/(?:mp3|oga|ogg|opus));base64,[a-z0-9+/]+=*$/i;function p(e,t){var n=e.nodeName.toLowerCase();if(-1!==m.inArray(n,t))return-1===m.inArray(n,o)||Boolean(e.nodeValue.match(s)||e.nodeValue.match(c));for(var r=m(t).filter(function(e,t){return t instanceof RegExp}),i=0,a=r.length;i<a;i++)if(n.match(r[i]))return!0;return!1}function i(e,t,n){if(0===e.length)return e;if(n&&"function"==typeof n)return n(e);if(!document.implementation||!document.implementation.createHTMLDocument)return e;var r=document.implementation.createHTMLDocument("sanitization");r.body.innerHTML=e;for(var i=m.map(t,function(e,t){return t}),a=m(r.body).find("*"),o=0,s=a.length;o<s;o++){var c=a[o],l=c.nodeName.toLowerCase();if(-1!==m.inArray(l,i))for(var u=m.map(c.attributes,function(e){return e}),f=[].concat(t["*"]||[],t[l]||[]),d=0,h=u.length;d<h;d++)p(u[d],f)||c.removeAttribute(u[d].nodeName);else c.parentNode.removeChild(c)}return r.body.innerHTML}var g=function(e,t){this.type=null,this.options=null,this.enabled=null,this.timeout=null,this.hoverState=null,this.$element=null,this.inState=null,this.init("tooltip",e,t)};g.VERSION="3.4.1",g.TRANSITION_DURATION=150,g.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:!1,container:!1,viewport:{selector:"body",padding:0},sanitize:!0,sanitizeFn:null,whiteList:e},g.prototype.init=function(e,t,n){if(this.enabled=!0,this.type=e,this.$element=m(t),this.options=this.getOptions(n),this.$viewport=this.options.viewport&&m(document).find(m.isFunction(this.options.viewport)?this.options.viewport.call(this,this.$element):this.options.viewport.selector||this.options.viewport),this.inState={click:!1,hover:!1,focus:!1},this.$element[0]instanceof document.constructor&&!this.options.selector)throw new Error("`selector` option must be specified when initializing "+this.type+" on the window.document object!");for(var r=this.options.trigger.split(" "),i=r.length;i--;){var a=r[i];if("click"==a)this.$element.on("click."+this.type,this.options.selector,m.proxy(this.toggle,this));else if("manual"!=a){var o="hover"==a?"mouseenter":"focusin",s="hover"==a?"mouseleave":"focusout";this.$element.on(o+"."+this.type,this.options.selector,m.proxy(this.enter,this)),this.$element.on(s+"."+this.type,this.options.selector,m.proxy(this.leave,this))}}this.options.selector?this._options=m.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},g.prototype.getDefaults=function(){return g.DEFAULTS},g.prototype.getOptions=function(e){var t=this.$element.data();for(var n in t)t.hasOwnProperty(n)&&-1!==m.inArray(n,r)&&delete t[n];return(e=m.extend({},this.getDefaults(),t,e)).delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e.sanitize&&(e.template=i(e.template,e.whiteList,e.sanitizeFn)),e},g.prototype.getDelegateOptions=function(){var n={},r=this.getDefaults();return this._options&&m.each(this._options,function(e,t){r[e]!=t&&(n[e]=t)}),n},g.prototype.enter=function(e){var t=e instanceof this.constructor?e:m(e.currentTarget).data("bs."+this.type);if(t||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),m(e.currentTarget).data("bs."+this.type,t)),e instanceof m.Event&&(t.inState["focusin"==e.type?"focus":"hover"]=!0),t.tip().hasClass("in")||"in"==t.hoverState)t.hoverState="in";else{if(clearTimeout(t.timeout),t.hoverState="in",!t.options.delay||!t.options.delay.show)return t.show();t.timeout=setTimeout(function(){"in"==t.hoverState&&t.show()},t.options.delay.show)}},g.prototype.isInStateTrue=function(){for(var e in this.inState)if(this.inState[e])return!0;return!1},g.prototype.leave=function(e){var t=e instanceof this.constructor?e:m(e.currentTarget).data("bs."+this.type);if(t||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),m(e.currentTarget).data("bs."+this.type,t)),e instanceof m.Event&&(t.inState["focusout"==e.type?"focus":"hover"]=!1),!t.isInStateTrue()){if(clearTimeout(t.timeout),t.hoverState="out",!t.options.delay||!t.options.delay.hide)return t.hide();t.timeout=setTimeout(function(){"out"==t.hoverState&&t.hide()},t.options.delay.hide)}},g.prototype.show=function(){var e=m.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(e);var t=m.contains(this.$element[0].ownerDocument.documentElement,this.$element[0]);if(e.isDefaultPrevented()||!t)return;var n=this,r=this.tip(),i=this.getUID(this.type);this.setContent(),r.attr("id",i),this.$element.attr("aria-describedby",i),this.options.animation&&r.addClass("fade");var a="function"==typeof this.options.placement?this.options.placement.call(this,r[0],this.$element[0]):this.options.placement,o=/\s?auto?\s?/i,s=o.test(a);s&&(a=a.replace(o,"")||"top"),r.detach().css({top:0,left:0,display:"block"}).addClass(a).data("bs."+this.type,this),this.options.container?r.appendTo(m(document).find(this.options.container)):r.insertAfter(this.$element),this.$element.trigger("inserted.bs."+this.type);var c=this.getPosition(),l=r[0].offsetWidth,u=r[0].offsetHeight;if(s){var f=a,d=this.getPosition(this.$viewport);a="bottom"==a&&c.bottom+u>d.bottom?"top":"top"==a&&c.top-u<d.top?"bottom":"right"==a&&c.right+l>d.width?"left":"left"==a&&c.left-l<d.left?"right":a,r.removeClass(f).addClass(a)}var h=this.getCalculatedOffset(a,c,l,u);this.applyPlacement(h,a);var p=function(){var e=n.hoverState;n.$element.trigger("shown.bs."+n.type),n.hoverState=null,"out"==e&&n.leave(n)};m.support.transition&&this.$tip.hasClass("fade")?r.one("bsTransitionEnd",p).emulateTransitionEnd(g.TRANSITION_DURATION):p()}},g.prototype.applyPlacement=function(e,t){var n=this.tip(),r=n[0].offsetWidth,i=n[0].offsetHeight,a=parseInt(n.css("margin-top"),10),o=parseInt(n.css("margin-left"),10);isNaN(a)&&(a=0),isNaN(o)&&(o=0),e.top+=a,e.left+=o,m.offset.setOffset(n[0],m.extend({using:function(e){n.css({top:Math.round(e.top),left:Math.round(e.left)})}},e),0),n.addClass("in");var s=n[0].offsetWidth,c=n[0].offsetHeight;"top"==t&&c!=i&&(e.top=e.top+i-c);var l=this.getViewportAdjustedDelta(t,e,s,c);l.left?e.left+=l.left:e.top+=l.top;var u=/top|bottom/.test(t),f=u?2*l.left-r+s:2*l.top-i+c,d=u?"offsetWidth":"offsetHeight";n.offset(e),this.replaceArrow(f,n[0][d],u)},g.prototype.replaceArrow=function(e,t,n){this.arrow().css(n?"left":"top",50*(1-e/t)+"%").css(n?"top":"left","")},g.prototype.setContent=function(){var e=this.tip(),t=this.getTitle();this.options.html?(this.options.sanitize&&(t=i(t,this.options.whiteList,this.options.sanitizeFn)),e.find(".tooltip-inner").html(t)):e.find(".tooltip-inner").text(t),e.removeClass("fade in top bottom left right")},g.prototype.hide=function(e){var t=this,n=m(this.$tip),r=m.Event("hide.bs."+this.type);function i(){"in"!=t.hoverState&&n.detach(),t.$element&&t.$element.removeAttr("aria-describedby").trigger("hidden.bs."+t.type),e&&e()}if(this.$element.trigger(r),!r.isDefaultPrevented())return n.removeClass("in"),m.support.transition&&n.hasClass("fade")?n.one("bsTransitionEnd",i).emulateTransitionEnd(g.TRANSITION_DURATION):i(),this.hoverState=null,this},g.prototype.fixTitle=function(){var e=this.$element;(e.attr("title")||"string"!=typeof e.attr("data-original-title"))&&e.attr("data-original-title",e.attr("title")||"").attr("title","")},g.prototype.hasContent=function(){return this.getTitle()},g.prototype.getPosition=function(e){var t=(e=e||this.$element)[0],n="BODY"==t.tagName,r=t.getBoundingClientRect();null==r.width&&(r=m.extend({},r,{width:r.right-r.left,height:r.bottom-r.top}));var i=window.SVGElement&&t instanceof window.SVGElement,a=n?{top:0,left:0}:i?null:e.offset(),o={scroll:n?document.documentElement.scrollTop||document.body.scrollTop:e.scrollTop()},s=n?{width:m(window).width(),height:m(window).height()}:null;return m.extend({},r,o,s,a)},g.prototype.getCalculatedOffset=function(e,t,n,r){return"bottom"==e?{top:t.top+t.height,left:t.left+t.width/2-n/2}:"top"==e?{top:t.top-r,left:t.left+t.width/2-n/2}:"left"==e?{top:t.top+t.height/2-r/2,left:t.left-n}:{top:t.top+t.height/2-r/2,left:t.left+t.width}},g.prototype.getViewportAdjustedDelta=function(e,t,n,r){var i={top:0,left:0};if(!this.$viewport)return i;var a=this.options.viewport&&this.options.viewport.padding||0,o=this.getPosition(this.$viewport);if(/right|left/.test(e)){var s=t.top-a-o.scroll,c=t.top+a-o.scroll+r;s<o.top?i.top=o.top-s:c>o.top+o.height&&(i.top=o.top+o.height-c)}else{var l=t.left-a,u=t.left+a+n;l<o.left?i.left=o.left-l:u>o.right&&(i.left=o.left+o.width-u)}return i},g.prototype.getTitle=function(){var e=this.$element,t=this.options;return e.attr("data-original-title")||("function"==typeof t.title?t.title.call(e[0]):t.title)},g.prototype.getUID=function(e){for(;e+=~~(1e6*Math.random()),document.getElementById(e););return e},g.prototype.tip=function(){if(!this.$tip&&(this.$tip=m(this.options.template),1!=this.$tip.length))throw new Error(this.type+" `template` option must consist of exactly 1 top-level element!");return this.$tip},g.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")},g.prototype.enable=function(){this.enabled=!0},g.prototype.disable=function(){this.enabled=!1},g.prototype.toggleEnabled=function(){this.enabled=!this.enabled},g.prototype.toggle=function(e){var t=this;e&&((t=m(e.currentTarget).data("bs."+this.type))||(t=new this.constructor(e.currentTarget,this.getDelegateOptions()),m(e.currentTarget).data("bs."+this.type,t))),e?(t.inState.click=!t.inState.click,t.isInStateTrue()?t.enter(t):t.leave(t)):t.tip().hasClass("in")?t.leave(t):t.enter(t)},g.prototype.destroy=function(){var e=this;clearTimeout(this.timeout),this.hide(function(){e.$element.off("."+e.type).removeData("bs."+e.type),e.$tip&&e.$tip.detach(),e.$tip=null,e.$arrow=null,e.$viewport=null,e.$element=null})},g.prototype.sanitizeHtml=function(e){return i(e,this.options.whiteList,this.options.sanitizeFn)};var t=m.fn.tooltip;m.fn.tooltip=function(r){return this.each(function(){var e=m(this),t=e.data("bs.tooltip"),n="object"==typeof r&&r;!t&&/destroy|hide/.test(r)||(t||e.data("bs.tooltip",t=new g(this,n)),"string"==typeof r&&t[r]())})},m.fn.tooltip.Constructor=g,m.fn.tooltip.noConflict=function(){return m.fn.tooltip=t,this}}(jQuery),function(i){"use strict";var a=function(e,t){this.init("popover",e,t)};if(!i.fn.tooltip)throw new Error("Popover requires tooltip.js");a.VERSION="3.4.1",a.DEFAULTS=i.extend({},i.fn.tooltip.Constructor.DEFAULTS,{placement:"right",trigger:"click",content:"",template:'<div class="popover" role="tooltip"><div class="arrow"></div><h3 class="popover-title"></h3><div class="popover-content"></div></div>'}),((a.prototype=i.extend({},i.fn.tooltip.Constructor.prototype)).constructor=a).prototype.getDefaults=function(){return a.DEFAULTS},a.prototype.setContent=function(){var e=this.tip(),t=this.getTitle(),n=this.getContent();if(this.options.html){var r=typeof n;this.options.sanitize&&(t=this.sanitizeHtml(t),"string"===r&&(n=this.sanitizeHtml(n))),e.find(".popover-title").html(t),e.find(".popover-content").children().detach().end()["string"===r?"html":"append"](n)}else e.find(".popover-title").text(t),e.find(".popover-content").children().detach().end().text(n);e.removeClass("fade top bottom left right in"),e.find(".popover-title").html()||e.find(".popover-title").hide()},a.prototype.hasContent=function(){return this.getTitle()||this.getContent()},a.prototype.getContent=function(){var e=this.$element,t=this.options;return e.attr("data-content")||("function"==typeof t.content?t.content.call(e[0]):t.content)},a.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")};var e=i.fn.popover;i.fn.popover=function(r){return this.each(function(){var e=i(this),t=e.data("bs.popover"),n="object"==typeof r&&r;!t&&/destroy|hide/.test(r)||(t||e.data("bs.popover",t=new a(this,n)),"string"==typeof r&&t[r]())})},i.fn.popover.Constructor=a,i.fn.popover.noConflict=function(){return i.fn.popover=e,this}}(jQuery),function(a){"use strict";function i(e,t){this.$body=a(document.body),this.$scrollElement=a(e).is(document.body)?a(window):a(e),this.options=a.extend({},i.DEFAULTS,t),this.selector=(this.options.target||"")+" .nav li > a",this.offsets=[],this.targets=[],this.activeTarget=null,this.scrollHeight=0,this.$scrollElement.on("scroll.bs.scrollspy",a.proxy(this.process,this)),this.refresh(),this.process()}function t(r){return this.each(function(){var e=a(this),t=e.data("bs.scrollspy"),n="object"==typeof r&&r;t||e.data("bs.scrollspy",t=new i(this,n)),"string"==typeof r&&t[r]()})}i.VERSION="3.4.1",i.DEFAULTS={offset:10},i.prototype.getScrollHeight=function(){return this.$scrollElement[0].scrollHeight||Math.max(this.$body[0].scrollHeight,document.documentElement.scrollHeight)},i.prototype.refresh=function(){var e=this,r="offset",i=0;this.offsets=[],this.targets=[],this.scrollHeight=this.getScrollHeight(),a.isWindow(this.$scrollElement[0])||(r="position",i=this.$scrollElement.scrollTop()),this.$body.find(this.selector).map(function(){var e=a(this),t=e.data("target")||e.attr("href"),n=/^#./.test(t)&&a(t);return n&&n.length&&n.is(":visible")&&[[n[r]().top+i,t]]||null}).sort(function(e,t){return e[0]-t[0]}).each(function(){e.offsets.push(this[0]),e.targets.push(this[1])})},i.prototype.process=function(){var e,t=this.$scrollElement.scrollTop()+this.options.offset,n=this.getScrollHeight(),r=this.options.offset+n-this.$scrollElement.height(),i=this.offsets,a=this.targets,o=this.activeTarget;if(this.scrollHeight!=n&&this.refresh(),r<=t)return o!=(e=a[a.length-1])&&this.activate(e);if(o&&t<i[0])return this.activeTarget=null,this.clear();for(e=i.length;e--;)o!=a[e]&&t>=i[e]&&(void 0===i[e+1]||t<i[e+1])&&this.activate(a[e])},i.prototype.activate=function(e){this.activeTarget=e,this.clear();var t=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',n=a(t).parents("li").addClass("active");n.parent(".dropdown-menu").length&&(n=n.closest("li.dropdown").addClass("active")),n.trigger("activate.bs.scrollspy")},i.prototype.clear=function(){a(this.selector).parentsUntil(this.options.target,".active").removeClass("active")};var e=a.fn.scrollspy;a.fn.scrollspy=t,a.fn.scrollspy.Constructor=i,a.fn.scrollspy.noConflict=function(){return a.fn.scrollspy=e,this},a(window).on("load.bs.scrollspy.data-api",function(){a('[data-spy="scroll"]').each(function(){var e=a(this);t.call(e,e.data())})})}(jQuery),function(s){"use strict";var o=function(e){this.element=s(e)};function t(n){return this.each(function(){var e=s(this),t=e.data("bs.tab");t||e.data("bs.tab",t=new o(this)),"string"==typeof n&&t[n]()})}o.VERSION="3.4.1",o.TRANSITION_DURATION=150,o.prototype.show=function(){var e=this.element,t=e.closest("ul:not(.dropdown-menu)"),n=e.data("target");if(n||(n=(n=e.attr("href"))&&n.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var r=t.find(".active:last a"),i=s.Event("hide.bs.tab",{relatedTarget:e[0]}),a=s.Event("show.bs.tab",{relatedTarget:r[0]});if(r.trigger(i),e.trigger(a),!a.isDefaultPrevented()&&!i.isDefaultPrevented()){var o=s(document).find(n);this.activate(e.closest("li"),t),this.activate(o,o.parent(),function(){r.trigger({type:"hidden.bs.tab",relatedTarget:e[0]}),e.trigger({type:"shown.bs.tab",relatedTarget:r[0]})})}}},o.prototype.activate=function(e,t,n){var r=t.find("> .active"),i=n&&s.support.transition&&(r.length&&r.hasClass("fade")||!!t.find("> .fade").length);function a(){r.removeClass("active").find("> .dropdown-menu > .active").removeClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!1),e.addClass("active").find('[data-toggle="tab"]').attr("aria-expanded",!0),i?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu").length&&e.closest("li.dropdown").addClass("active").end().find('[data-toggle="tab"]').attr("aria-expanded",!0),n&&n()}r.length&&i?r.one("bsTransitionEnd",a).emulateTransitionEnd(o.TRANSITION_DURATION):a(),r.removeClass("in")};var e=s.fn.tab;s.fn.tab=t,s.fn.tab.Constructor=o,s.fn.tab.noConflict=function(){return s.fn.tab=e,this};var n=function(e){e.preventDefault(),t.call(s(this),"show")};s(document).on("click.bs.tab.data-api",'[data-toggle="tab"]',n).on("click.bs.tab.data-api",'[data-toggle="pill"]',n)}(jQuery),function(c){"use strict";var l=function(e,t){this.options=c.extend({},l.DEFAULTS,t);var n=this.options.target===l.DEFAULTS.target?c(this.options.target):c(document).find(this.options.target);this.$target=n.on("scroll.bs.affix.data-api",c.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",c.proxy(this.checkPositionWithEventLoop,this)),this.$element=c(e),this.affixed=null,this.unpin=null,this.pinnedOffset=null,this.checkPosition()};function n(r){return this.each(function(){var e=c(this),t=e.data("bs.affix"),n="object"==typeof r&&r;t||e.data("bs.affix",t=new l(this,n)),"string"==typeof r&&t[r]()})}l.VERSION="3.4.1",l.RESET="affix affix-top affix-bottom",l.DEFAULTS={offset:0,target:window},l.prototype.getState=function(e,t,n,r){var i=this.$target.scrollTop(),a=this.$element.offset(),o=this.$target.height();if(null!=n&&"top"==this.affixed)return i<n&&"top";if("bottom"==this.affixed)return null!=n?!(i+this.unpin<=a.top)&&"bottom":!(i+o<=e-r)&&"bottom";var s=null==this.affixed,c=s?i:a.top;return null!=n&&i<=n?"top":null!=r&&e-r<=c+(s?o:t)&&"bottom"},l.prototype.getPinnedOffset=function(){if(this.pinnedOffset)return this.pinnedOffset;this.$element.removeClass(l.RESET).addClass("affix");var e=this.$target.scrollTop(),t=this.$element.offset();return this.pinnedOffset=t.top-e},l.prototype.checkPositionWithEventLoop=function(){setTimeout(c.proxy(this.checkPosition,this),1)},l.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e=this.$element.height(),t=this.options.offset,n=t.top,r=t.bottom,i=Math.max(c(document).height(),c(document.body).height());"object"!=typeof t&&(r=n=t),"function"==typeof n&&(n=t.top(this.$element)),"function"==typeof r&&(r=t.bottom(this.$element));var a=this.getState(i,e,n,r);if(this.affixed!=a){null!=this.unpin&&this.$element.css("top","");var o="affix"+(a?"-"+a:""),s=c.Event(o+".bs.affix");if(this.$element.trigger(s),s.isDefaultPrevented())return;this.affixed=a,this.unpin="bottom"==a?this.getPinnedOffset():null,this.$element.removeClass(l.RESET).addClass(o).trigger(o.replace("affix","affixed")+".bs.affix")}"bottom"==a&&this.$element.offset({top:i-e-r})}};var e=c.fn.affix;c.fn.affix=n,c.fn.affix.Constructor=l,c.fn.affix.noConflict=function(){return c.fn.affix=e,this},c(window).on("load",function(){c('[data-spy="affix"]').each(function(){var e=c(this),t=e.data();t.offset=t.offset||{},null!=t.offsetBottom&&(t.offset.bottom=t.offsetBottom),null!=t.offsetTop&&(t.offset.top=t.offsetTop),n.call(e,t)})})}(jQuery),"undefined"!=typeof module&&"undefined"!=typeof exports&&module.exports===exports&&(module.exports="monospaced.elastic"),angular.module("monospaced.elastic",[]).constant("msdElasticConfig",{append:""}).directive("msdElastic",["$timeout","$window","msdElasticConfig",function(T,x,k){"use strict";return{require:"ngModel",restrict:"A, C",link:function(a,e,t,n){var o=e[0],s=e;if("TEXTAREA"===o.nodeName&&x.getComputedStyle){s.css({overflow:"hidden","overflow-y":"hidden","word-wrap":"break-word"});var r=o.value;o.value="",o.value=r;var c,l,u=t.msdElastic?t.msdElastic.replace(/\\n/g,"\n"):k.append,i=angular.element(x),f="position: absolute; top: -999px; right: auto; bottom: auto;left: 0; overflow: hidden; -webkit-box-sizing: content-box;-moz-box-sizing: content-box; box-sizing: content-box;min-height: 0 !important; height: 0 !important; padding: 0;word-wrap: break-word; border: 0;",d=angular.element('<textarea aria-hidden="true" tabindex="-1" style="'+f+'"/>').data("elastic",!0),h=d[0],p=getComputedStyle(o),m=p.getPropertyValue("resize"),g="border-box"===p.getPropertyValue("box-sizing")||"border-box"===p.getPropertyValue("-moz-box-sizing")||"border-box"===p.getPropertyValue("-webkit-box-sizing")?{width:parseInt(p.getPropertyValue("border-right-width"),10)+parseInt(p.getPropertyValue("padding-right"),10)+parseInt(p.getPropertyValue("padding-left"),10)+parseInt(p.getPropertyValue("border-left-width"),10),height:parseInt(p.getPropertyValue("border-top-width"),10)+parseInt(p.getPropertyValue("padding-top"),10)+parseInt(p.getPropertyValue("padding-bottom"),10)+parseInt(p.getPropertyValue("border-bottom-width"),10)}:{width:0,height:0},_=parseInt(p.getPropertyValue("min-height"),10),b=parseInt(p.getPropertyValue("height"),10),v=Math.max(_,b)-g.height,y=parseInt(p.getPropertyValue("max-height"),10),w=["font-family","font-size","font-weight","font-style","letter-spacing","line-height","text-transform","word-spacing","text-indent"];s.data("elastic")||(y=y&&0<y?y:9e4,h.parentNode!==document.body&&angular.element(document.body).append(h),s.css({resize:"none"===m||"vertical"===m?"none":"horizontal"}).data("elastic",!0),o.oninput="onpropertychange"in o&&"oninput"in o?o.onkeyup=A:A,i.bind("resize",S),a.$watch(function(){return n.$modelValue},function(e){S()}),a.$on("elastic:adjust",function(){C(),S()}),T(A,0,!1),a.$on("$destroy",function(){d.remove(),i.unbind("resize",S)}))}function C(){var t=f;p=getComputedStyle(c=o),angular.forEach(w,function(e){t+=e+":"+p.getPropertyValue(e)+";"}),h.setAttribute("style",t)}function A(){var e,t,n,r,i;c!==o&&C(),l||(l=!0,h.value=o.value+u,h.style.overflowY=o.style.overflowY,e=""===o.style.height?"auto":parseInt(o.style.height,10),"px"===(t=getComputedStyle(o).getPropertyValue("width")).substr(t.length-2,2)&&(r=parseInt(t,10)-g.width,h.style.width=r+"px"),n=h.scrollHeight,y<n?(n=y,i="scroll"):n<v&&(n=v),n+=g.height,o.style.overflowY=i||"hidden",e!==n&&(a.$emit("elastic:resize",s,e,n),o.style.height=n+"px"),T(function(){l=!1},1,!1))}function S(){l=!1,A()}}}}]),angular.module("ui.bootstrap",["ui.bootstrap.tpls","ui.bootstrap.collapse","ui.bootstrap.tabindex","ui.bootstrap.accordion","ui.bootstrap.alert","ui.bootstrap.buttons","ui.bootstrap.carousel","ui.bootstrap.dateparser","ui.bootstrap.isClass","ui.bootstrap.datepicker","ui.bootstrap.position","ui.bootstrap.datepickerPopup","ui.bootstrap.debounce","ui.bootstrap.multiMap","ui.bootstrap.dropdown","ui.bootstrap.stackedMap","ui.bootstrap.modal","ui.bootstrap.paging","ui.bootstrap.pager","ui.bootstrap.pagination","ui.bootstrap.tooltip","ui.bootstrap.popover","ui.bootstrap.progressbar","ui.bootstrap.rating","ui.bootstrap.tabs","ui.bootstrap.timepicker","ui.bootstrap.typeahead"]),angular.module("ui.bootstrap.tpls",["uib/template/accordion/accordion-group.html","uib/template/accordion/accordion.html","uib/template/alert/alert.html","uib/template/carousel/carousel.html","uib/template/carousel/slide.html","uib/template/datepicker/datepicker.html","uib/template/datepicker/day.html","uib/template/datepicker/month.html","uib/template/datepicker/year.html","uib/template/datepickerPopup/popup.html","uib/template/modal/window.html","uib/template/pager/pager.html","uib/template/pagination/pagination.html","uib/template/tooltip/tooltip-html-popup.html","uib/template/tooltip/tooltip-popup.html","uib/template/tooltip/tooltip-template-popup.html","uib/template/popover/popover-html.html","uib/template/popover/popover-template.html","uib/template/popover/popover.html","uib/template/progressbar/bar.html","uib/template/progressbar/progress.html","uib/template/progressbar/progressbar.html","uib/template/rating/rating.html","uib/template/tabs/tab.html","uib/template/tabs/tabset.html","uib/template/timepicker/timepicker.html","uib/template/typeahead/typeahead-match.html","uib/template/typeahead/typeahead-popup.html"]),angular.module("ui.bootstrap.collapse",[]).directive("uibCollapse",["$animate","$q","$parse","$injector",function(h,p,m,e){var g=e.has("$animateCss")?e.get("$animateCss"):null;return{link:function(t,n,e){var r=m(e.expanding),i=m(e.expanded),a=m(e.collapsing),o=m(e.collapsed),s=!1,c={},l={};function u(e){return s?{width:e.scrollWidth+"px"}:{height:e.scrollHeight+"px"}}function f(){n.removeClass("collapsing").addClass("collapse").css(c),i(t)}function d(){n.css(l),n.removeClass("collapsing").addClass("collapse"),o(t)}!function(){l=(s=!!("horizontal"in e))?(c={width:""},{width:"0"}):(c={height:""},{height:"0"});t.$eval(e.uibCollapse)||n.addClass("in").addClass("collapse").attr("aria-expanded",!0).attr("aria-hidden",!1).css(c)}(),t.$watch(e.uibCollapse,function(e){e?function(){if(!n.hasClass("collapse")&&!n.hasClass("in"))return d();p.resolve(a(t)).then(function(){n.css(u(n[0])).removeClass("collapse").addClass("collapsing").attr("aria-expanded",!1).attr("aria-hidden",!0),g?g(n,{removeClass:"in",to:l}).start().finally(d):h.removeClass(n,"in",{to:l}).then(d)},angular.noop)}():n.hasClass("collapse")&&n.hasClass("in")||p.resolve(r(t)).then(function(){n.removeClass("collapse").addClass("collapsing").attr("aria-expanded",!0).attr("aria-hidden",!1),g?g(n,{addClass:"in",easing:"ease",css:{overflow:"hidden"},to:u(n[0])}).start().finally(f):h.addClass(n,"in",{css:{overflow:"hidden"},to:u(n[0])}).then(f)},angular.noop)})}}}]),angular.module("ui.bootstrap.tabindex",[]).directive("uibTabindexToggle",function(){return{restrict:"A",link:function(e,t,n){n.$observe("disabled",function(e){n.$set("tabindex",e?-1:null)})}}}),angular.module("ui.bootstrap.accordion",["ui.bootstrap.collapse","ui.bootstrap.tabindex"]).constant("uibAccordionConfig",{closeOthers:!0}).controller("UibAccordionController",["$scope","$attrs","uibAccordionConfig",function(e,n,r){this.groups=[],this.closeOthers=function(t){(angular.isDefined(n.closeOthers)?e.$eval(n.closeOthers):r.closeOthers)&&angular.forEach(this.groups,function(e){e!==t&&(e.isOpen=!1)})},this.addGroup=function(t){var n=this;this.groups.push(t),t.$on("$destroy",function(e){n.removeGroup(t)})},this.removeGroup=function(e){var t=this.groups.indexOf(e);-1!==t&&this.groups.splice(t,1)}}]).directive("uibAccordion",function(){return{controller:"UibAccordionController",controllerAs:"accordion",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/accordion/accordion.html"}}}).directive("uibAccordionGroup",function(){return{require:"^uibAccordion",transclude:!0,restrict:"A",templateUrl:function(e,t){return t.templateUrl||"uib/template/accordion/accordion-group.html"},scope:{heading:"@",panelClass:"@?",isOpen:"=?",isDisabled:"=?"},controller:function(){this.setHeading=function(e){this.heading=e}},link:function(t,n,e,r){n.addClass("panel"),r.addGroup(t),t.openClass=e.openClass||"panel-open",t.panelClass=e.panelClass||"panel-default",t.$watch("isOpen",function(e){n.toggleClass(t.openClass,!!e),e&&r.closeOthers(t)}),t.toggleOpen=function(e){t.isDisabled||e&&32!==e.which||(t.isOpen=!t.isOpen)};var i="accordiongroup-"+t.$id+"-"+Math.floor(1e4*Math.random());t.headingId=i+"-tab",t.panelId=i+"-panel"}}}).directive("uibAccordionHeading",function(){return{transclude:!0,template:"",replace:!0,require:"^uibAccordionGroup",link:function(e,t,n,r,i){r.setHeading(i(e,angular.noop))}}}).directive("uibAccordionTransclude",function(){return{require:"^uibAccordionGroup",link:function(e,n,t,r){e.$watch(function(){return r[t.uibAccordionTransclude]},function(e){if(e){var t=angular.element(n[0].querySelector("uib-accordion-header,data-uib-accordion-header,x-uib-accordion-header,uib\\:accordion-header,[uib-accordion-header],[data-uib-accordion-header],[x-uib-accordion-header]"));t.html(""),t.append(e)}})}}}),angular.module("ui.bootstrap.alert",[]).controller("UibAlertController",["$scope","$element","$attrs","$interpolate","$timeout",function(e,t,n,r,i){e.closeable=!!n.close,t.addClass("alert"),n.$set("role","alert"),e.closeable&&t.addClass("alert-dismissible");var a=angular.isDefined(n.dismissOnTimeout)?r(n.dismissOnTimeout)(e.$parent):null;a&&i(function(){e.close()},parseInt(a,10))}]).directive("uibAlert",function(){return{controller:"UibAlertController",controllerAs:"alert",restrict:"A",templateUrl:function(e,t){return t.templateUrl||"uib/template/alert/alert.html"},transclude:!0,scope:{close:"&"}}}),angular.module("ui.bootstrap.buttons",[]).constant("uibButtonConfig",{activeClass:"active",toggleEvent:"click"}).controller("UibButtonsController",["uibButtonConfig",function(e){this.activeClass=e.activeClass||"active",this.toggleEvent=e.toggleEvent||"click"}]).directive("uibBtnRadio",["$parse",function(s){return{require:["uibBtnRadio","ngModel"],controller:"UibButtonsController",controllerAs:"buttons",link:function(t,n,r,e){var i=e[0],a=e[1],o=s(r.uibUncheckable);n.find("input").css({display:"none"}),a.$render=function(){n.toggleClass(i.activeClass,angular.equals(a.$modelValue,t.$eval(r.uibBtnRadio)))},n.on(i.toggleEvent,function(){if(!r.disabled){var e=n.hasClass(i.activeClass);e&&!angular.isDefined(r.uncheckable)||t.$apply(function(){a.$setViewValue(e?null:t.$eval(r.uibBtnRadio)),a.$render()})}}),r.uibUncheckable&&t.$watch(o,function(e){r.$set("uncheckable",e?"":void 0)})}}}]).directive("uibBtnCheckbox",function(){return{require:["uibBtnCheckbox","ngModel"],controller:"UibButtonsController",controllerAs:"button",link:function(n,e,t,r){var i=r[0],a=r[1];function o(){return s(t.btnCheckboxTrue,!0)}function s(e,t){return angular.isDefined(e)?n.$eval(e):t}e.find("input").css({display:"none"}),a.$render=function(){e.toggleClass(i.activeClass,angular.equals(a.$modelValue,o()))},e.on(i.toggleEvent,function(){t.disabled||n.$apply(function(){a.$setViewValue(e.hasClass(i.activeClass)?s(t.btnCheckboxFalse,!1):o()),a.$render()})})}}}),angular.module("ui.bootstrap.carousel",[]).controller("UibCarouselController",["$scope","$element","$interval","$timeout","$animate",function(i,a,t,e,o){var n,r,s=this,c=s.slides=i.slides=[],l="uib-slideDirection",u=i.active,f=!1;function d(e){for(var t=0;t<c.length;t++)c[t].slide.active=t===e}function h(e){for(var t=0;t<c.length;t++)if(c[t].slide===e)return t}function p(){n&&(t.cancel(n),n=null)}function m(){p();var e=+i.interval;!isNaN(e)&&0<e&&(n=t(g,e))}function g(){var e=+i.interval;r&&!isNaN(e)&&0<e&&c.length?i.next():i.pause()}a.addClass("carousel"),s.addSlide=function(e,t){c.push({slide:e,element:t}),c.sort(function(e,t){return+e.slide.index-+t.slide.index}),(e.index===i.active||1===c.length&&!angular.isNumber(i.active))&&(i.$currentTransition&&(i.$currentTransition=null),u=e.index,i.active=e.index,d(u),s.select(c[h(e)]),1===c.length&&i.play())},s.getCurrentIndex=function(){for(var e=0;e<c.length;e++)if(c[e].slide.index===u)return e},s.next=i.next=function(){var e=(s.getCurrentIndex()+1)%c.length;if(0!==e||!i.noWrap())return s.select(c[e],"next");i.pause()},s.prev=i.prev=function(){var e=s.getCurrentIndex()-1<0?c.length-1:s.getCurrentIndex()-1;if(!i.noWrap()||e!==c.length-1)return s.select(c[e],"prev");i.pause()},s.removeSlide=function(e){var t=h(e);c.splice(t,1),0<c.length&&u===t?t>=c.length?(u=c.length-1,d(i.active=u),s.select(c[c.length-1])):(u=t,d(i.active=u),s.select(c[t])):t<u&&(u--,i.active=u),0===c.length&&(u=null,i.active=null)},s.select=i.select=function(e,t){var n=h(e.slide);void 0===t&&(t=n>s.getCurrentIndex()?"next":"prev"),e.slide.index===u||i.$currentTransition||function(e,t,n){if(f)return;if(angular.extend(e,{direction:n}),angular.extend(c[u].slide||{},{direction:n}),o.enabled(a)&&!i.$currentTransition&&c[t].element&&1<s.slides.length){c[t].element.data(l,e.direction);var r=s.getCurrentIndex();angular.isNumber(r)&&c[r].element&&c[r].element.data(l,e.direction),i.$currentTransition=!0,o.on("addClass",c[t].element,function(e,t){"close"===t&&(i.$currentTransition=null,o.off("addClass",e))})}i.active=e.index,u=e.index,d(t),m()}(e.slide,n,t)},i.indexOfSlide=function(e){return+e.slide.index},i.isActive=function(e){return i.active===e.slide.index},i.isPrevDisabled=function(){return 0===i.active&&i.noWrap()},i.isNextDisabled=function(){return i.active===c.length-1&&i.noWrap()},i.pause=function(){i.noPause||(r=!1,p())},i.play=function(){r||(r=!0,m())},a.on("mouseenter",i.pause),a.on("mouseleave",i.play),i.$on("$destroy",function(){f=!0,p()}),i.$watch("noTransition",function(e){o.enabled(a,!e)}),i.$watch("interval",m),i.$watchCollection("slides",function(e){e.length||(i.$currentTransition=null)}),i.$watch("active",function(e){if(angular.isNumber(e)&&u!==e){for(var t=0;t<c.length;t++)if(c[t].slide.index===e){e=t;break}c[e]&&(d(e),s.select(c[e]),u=e)}})}]).directive("uibCarousel",function(){return{transclude:!0,controller:"UibCarouselController",controllerAs:"carousel",restrict:"A",templateUrl:function(e,t){return t.templateUrl||"uib/template/carousel/carousel.html"},scope:{active:"=",interval:"=",noTransition:"=",noPause:"=",noWrap:"&"}}}).directive("uibSlide",["$animate",function(i){return{require:"^uibCarousel",restrict:"A",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/carousel/slide.html"},scope:{actual:"=?",index:"=?"},link:function(e,t,n,r){t.addClass("item"),r.addSlide(e,t),e.$on("$destroy",function(){r.removeSlide(e)}),e.$watch("active",function(e){i[e?"addClass":"removeClass"](t,"active")})}}}]).animation(".item",["$animateCss",function(o){var s="uib-slideDirection";function c(e,t,n){e.removeClass(t),n&&n()}return{beforeAddClass:function(e,t,n){if("active"===t){var r=e.data(s),i="next"===r?"left":"right",a=c.bind(this,e,i+" "+r,n);return e.addClass(r),o(e,{addClass:i}).start().done(a),function(){!0}}n()},beforeRemoveClass:function(e,t,n){if("active"===t){var r="next"===e.data(s)?"left":"right",i=c.bind(this,e,r,n);return o(e,{addClass:r}).start().done(i),function(){!0}}n()}}}]),angular.module("ui.bootstrap.dateparser",[]).service("uibDateParser",["$log","$locale","dateFilter","orderByFilter","filterFilter",function(m,g,n,_,t){var b,v,y=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g;function r(e){return t(v,{key:e},!0)[0]}function a(e,t,n){return function(){return e.substr(t+1,n-t-1)}}function o(e,t){for(var n=e.substr(t),r=0;r<v.length;r++)if(new RegExp("^"+v[r].key).test(n)){var i=v[r];return{endIdx:t+i.key.length,parser:i.formatter}}return{endIdx:t+1,parser:function(){return n.charAt(0)}}}function s(e){return parseInt(e,10)}function i(e,t){e=e.replace(/:/g,"");var n=Date.parse("Jan 01, 1970 00:00:00 "+e)/6e4;return isNaN(n)?t:n}function c(e,t){return(e=new Date(e.getTime())).setMinutes(e.getMinutes()+t),e}function l(e,t,n){n=n?-1:1;var r=e.getTimezoneOffset();return c(e,n*(i(t,r)-r))}this.init=function(){b=g.id,this.parsers={},this.formatters={},v=[{key:"yyyy",regex:"\\d{4}",apply:function(e){this.year=+e},formatter:function(e){var t=new Date;return t.setFullYear(Math.abs(e.getFullYear())),n(t,"yyyy")}},{key:"yy",regex:"\\d{2}",apply:function(e){e=+e,this.year=e<69?e+2e3:e+1900},formatter:function(e){var t=new Date;return t.setFullYear(Math.abs(e.getFullYear())),n(t,"yy")}},{key:"y",regex:"\\d{1,4}",apply:function(e){this.year=+e},formatter:function(e){var t=new Date;return t.setFullYear(Math.abs(e.getFullYear())),n(t,"y")}},{key:"M!",regex:"0?[1-9]|1[0-2]",apply:function(e){this.month=e-1},formatter:function(e){var t=e.getMonth();return/^[0-9]$/.test(t)?n(e,"MM"):n(e,"M")}},{key:"MMMM",regex:g.DATETIME_FORMATS.MONTH.join("|"),apply:function(e){this.month=g.DATETIME_FORMATS.MONTH.indexOf(e)},formatter:function(e){return n(e,"MMMM")}},{key:"MMM",regex:g.DATETIME_FORMATS.SHORTMONTH.join("|"),apply:function(e){this.month=g.DATETIME_FORMATS.SHORTMONTH.indexOf(e)},formatter:function(e){return n(e,"MMM")}},{key:"MM",regex:"0[1-9]|1[0-2]",apply:function(e){this.month=e-1},formatter:function(e){return n(e,"MM")}},{key:"M",regex:"[1-9]|1[0-2]",apply:function(e){this.month=e-1},formatter:function(e){return n(e,"M")}},{key:"d!",regex:"[0-2]?[0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e},formatter:function(e){var t=e.getDate();return/^[1-9]$/.test(t)?n(e,"dd"):n(e,"d")}},{key:"dd",regex:"[0-2][0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e},formatter:function(e){return n(e,"dd")}},{key:"d",regex:"[1-2]?[0-9]{1}|3[0-1]{1}",apply:function(e){this.date=+e},formatter:function(e){return n(e,"d")}},{key:"EEEE",regex:g.DATETIME_FORMATS.DAY.join("|"),formatter:function(e){return n(e,"EEEE")}},{key:"EEE",regex:g.DATETIME_FORMATS.SHORTDAY.join("|"),formatter:function(e){return n(e,"EEE")}},{key:"HH",regex:"(?:0|1)[0-9]|2[0-3]",apply:function(e){this.hours=+e},formatter:function(e){return n(e,"HH")}},{key:"hh",regex:"0[0-9]|1[0-2]",apply:function(e){this.hours=+e},formatter:function(e){return n(e,"hh")}},{key:"H",regex:"1?[0-9]|2[0-3]",apply:function(e){this.hours=+e},formatter:function(e){return n(e,"H")}},{key:"h",regex:"[0-9]|1[0-2]",apply:function(e){this.hours=+e},formatter:function(e){return n(e,"h")}},{key:"mm",regex:"[0-5][0-9]",apply:function(e){this.minutes=+e},formatter:function(e){return n(e,"mm")}},{key:"m",regex:"[0-9]|[1-5][0-9]",apply:function(e){this.minutes=+e},formatter:function(e){return n(e,"m")}},{key:"sss",regex:"[0-9][0-9][0-9]",apply:function(e){this.milliseconds=+e},formatter:function(e){return n(e,"sss")}},{key:"ss",regex:"[0-5][0-9]",apply:function(e){this.seconds=+e},formatter:function(e){return n(e,"ss")}},{key:"s",regex:"[0-9]|[1-5][0-9]",apply:function(e){this.seconds=+e},formatter:function(e){return n(e,"s")}},{key:"a",regex:g.DATETIME_FORMATS.AMPMS.join("|"),apply:function(e){12===this.hours&&(this.hours=0),"PM"===e&&(this.hours+=12)},formatter:function(e){return n(e,"a")}},{key:"Z",regex:"[+-]\\d{4}",apply:function(e){var t=e.match(/([+-])(\d{2})(\d{2})/),n=t[1],r=t[2],i=t[3];this.hours+=s(n+r),this.minutes+=s(n+i)},formatter:function(e){return n(e,"Z")}},{key:"ww",regex:"[0-4][0-9]|5[0-3]",formatter:function(e){return n(e,"ww")}},{key:"w",regex:"[0-9]|[1-4][0-9]|5[0-3]",formatter:function(e){return n(e,"w")}},{key:"GGGG",regex:g.DATETIME_FORMATS.ERANAMES.join("|").replace(/\s/g,"\\s"),formatter:function(e){return n(e,"GGGG")}},{key:"GGG",regex:g.DATETIME_FORMATS.ERAS.join("|"),formatter:function(e){return n(e,"GGG")}},{key:"GG",regex:g.DATETIME_FORMATS.ERAS.join("|"),formatter:function(e){return n(e,"GG")}},{key:"G",regex:g.DATETIME_FORMATS.ERAS.join("|"),formatter:function(e){return n(e,"G")}}],1<=angular.version.major&&4<angular.version.minor&&v.push({key:"LLLL",regex:g.DATETIME_FORMATS.STANDALONEMONTH.join("|"),apply:function(e){this.month=g.DATETIME_FORMATS.STANDALONEMONTH.indexOf(e)},formatter:function(e){return n(e,"LLLL")}})},this.init(),this.getParser=function(e){var t=r(e);return t&&t.apply||null},this.overrideParser=function(e,t){var n=r(e);n&&angular.isFunction(t)&&(this.parsers={},n.apply=t)}.bind(this),this.filter=function(n,e){return angular.isDate(n)&&!isNaN(n)&&e?(e=g.DATETIME_FORMATS[e]||e,g.id!==b&&this.init(),this.formatters[e]||(this.formatters[e]=function(e){for(var t,n,r=[],i=0;i<e.length;)if(angular.isNumber(n)){if("'"===e.charAt(i))(i+1>=e.length||"'"!==e.charAt(i+1))&&(r.push(a(e,n,i)),n=null);else if(i===e.length)for(;n<e.length;)t=o(e,n),r.push(t),n=t.endIdx;i++}else"'"!==e.charAt(i)?(t=o(e,i),r.push(t.parser),i=t.endIdx):(n=i,i++);return r}(e)),this.formatters[e].reduce(function(e,t){return e+t(n)},"")):""},this.parse=function(e,t,n){if(!angular.isString(e)||!t)return e;t=(t=g.DATETIME_FORMATS[t]||t).replace(y,"\\$&"),g.id!==b&&this.init(),this.parsers[t]||(this.parsers[t]=function(i){var a=[],o=i.split(""),e=i.indexOf("'");if(-1<e){var t=!1;i=i.split("");for(var n=e;n<i.length;n++)t?("'"===i[n]&&(n+1<i.length&&"'"===i[n+1]?(i[n+1]="$",o[n+1]=""):(o[n]="",t=!1)),i[n]="$"):"'"===i[n]&&(i[n]="$",t=!(o[n]=""));i=i.join("")}return angular.forEach(v,function(e){var t=i.indexOf(e.key);if(-1<t){i=i.split(""),o[t]="("+e.regex+")",i[t]="$";for(var n=t+1,r=t+e.key.length;n<r;n++)o[n]="",i[n]="$";i=i.join(""),a.push({index:t,key:e.key,apply:e.apply,matcher:e.regex})}}),{regex:new RegExp("^"+o.join("")+"$"),map:_(a,"index")}}(t));var r=this.parsers[t],i=r.regex,a=r.map,o=e.match(i),s=!1;if(o&&o.length){var c,l;c=angular.isDate(n)&&!isNaN(n.getTime())?{year:n.getFullYear(),month:n.getMonth(),date:n.getDate(),hours:n.getHours(),minutes:n.getMinutes(),seconds:n.getSeconds(),milliseconds:n.getMilliseconds()}:(n&&m.warn("dateparser:","baseDate is not a valid date"),{year:1900,month:0,date:1,hours:0,minutes:0,seconds:0,milliseconds:0});for(var u=1,f=o.length;u<f;u++){var d=a[u-1];"Z"===d.matcher&&(s=!0),d.apply&&d.apply.call(c,o[u])}var h=s?Date.prototype.setUTCFullYear:Date.prototype.setFullYear,p=s?Date.prototype.setUTCHours:Date.prototype.setHours;return function(e,t,n){if(n<1)return!1;if(1===t&&28<n)return 29===n&&(e%4==0&&e%100!=0||e%400==0);return 3!==t&&5!==t&&8!==t&&10!==t||n<31}(c.year,c.month,c.date)&&(!angular.isDate(n)||isNaN(n.getTime())||s?(l=new Date(0),h.call(l,c.year,c.month,c.date),p.call(l,c.hours||0,c.minutes||0,c.seconds||0,c.milliseconds||0)):(l=new Date(n),h.call(l,c.year,c.month,c.date),p.call(l,c.hours,c.minutes,c.seconds,c.milliseconds))),l}},this.toTimezone=function(e,t){return e&&t?l(e,t):e},this.fromTimezone=function(e,t){return e&&t?l(e,t,!0):e},this.timezoneToOffset=i,this.addDateMinutes=c,this.convertTimezoneToLocal=l}]),angular.module("ui.bootstrap.isClass",[]).directive("uibIsClass",["$animate",function(u){var o=/^\s*([\s\S]+?)\s+on\s+([\s\S]+?)\s*$/,f=/^\s*([\s\S]+?)\s+for\s+([\s\S]+?)\s*$/;return{restrict:"A",compile:function(e,t){var i=[],s=[],c={},n=t.uibIsClass.match(o),l=n[2],r=n[1].split(",");return function(n,e,t){i.push(n),s.push({scope:n,element:e}),r.forEach(function(e,t){!function(e,t){var n=e.match(f),i=t.$eval(n[1]),r=n[2],a=c[e];if(!a){var o=function(n){var r=null;s.some(function(e){var t=e.scope.$eval(l);if(t===n)return r=e,!0}),a.lastActivated!==r&&(a.lastActivated&&u.removeClass(a.lastActivated.element,i),r&&u.addClass(r.element,i),a.lastActivated=r)};c[e]=a={lastActivated:null,scope:t,watchFn:o,compareWithExp:r,watcher:t.$watch(r,o)}}a.watchFn(t.$eval(r))}(e,n)}),n.$on("$destroy",a)};function a(e){var t=e.targetScope,n=i.indexOf(t);if(i.splice(n,1),s.splice(n,1),i.length){var r=i[0];angular.forEach(c,function(e){e.scope===t&&(e.watcher=r.$watch(e.compareWithExp,e.watchFn),e.scope=r)})}else c={}}}}}]),angular.module("ui.bootstrap.datepicker",["ui.bootstrap.dateparser","ui.bootstrap.isClass"]).value("$datepickerSuppressError",!1).value("$datepickerLiteralWarning",!0).constant("uibDatepickerConfig",{datepickerMode:"day",formatDay:"dd",formatMonth:"MMMM",formatYear:"yyyy",formatDayHeader:"EEE",formatDayTitle:"MMMM yyyy",formatMonthTitle:"yyyy",maxDate:null,maxMode:"year",minDate:null,minMode:"day",monthColumns:3,ngModelOptions:{},shortcutPropagation:!1,showWeeks:!0,yearColumns:5,yearRows:4}).controller("UibDatepickerController",["$scope","$element","$attrs","$parse","$interpolate","$locale","$log","dateFilter","uibDatepickerConfig","$datepickerLiteralWarning","$datepickerSuppressError","uibDateParser",function(o,e,t,n,r,i,a,s,c,l,u,f){var d=this,h={$setViewValue:angular.noop},p={},m=[];e.addClass("uib-datepicker"),t.$set("role","application"),o.datepickerOptions||(o.datepickerOptions={}),this.modes=["day","month","year"],["customClass","dateDisabled","datepickerMode","formatDay","formatDayHeader","formatDayTitle","formatMonth","formatMonthTitle","formatYear","maxDate","maxMode","minDate","minMode","monthColumns","showWeeks","shortcutPropagation","startingDay","yearColumns","yearRows"].forEach(function(t){switch(t){case"customClass":case"dateDisabled":o[t]=o.datepickerOptions[t]||angular.noop;break;case"datepickerMode":o.datepickerMode=angular.isDefined(o.datepickerOptions.datepickerMode)?o.datepickerOptions.datepickerMode:c.datepickerMode;break;case"formatDay":case"formatDayHeader":case"formatDayTitle":case"formatMonth":case"formatMonthTitle":case"formatYear":d[t]=angular.isDefined(o.datepickerOptions[t])?r(o.datepickerOptions[t])(o.$parent):c[t];break;case"monthColumns":case"showWeeks":case"shortcutPropagation":case"yearColumns":case"yearRows":d[t]=angular.isDefined(o.datepickerOptions[t])?o.datepickerOptions[t]:c[t];break;case"startingDay":angular.isDefined(o.datepickerOptions.startingDay)?d.startingDay=o.datepickerOptions.startingDay:angular.isNumber(c.startingDay)?d.startingDay=c.startingDay:d.startingDay=(i.DATETIME_FORMATS.FIRSTDAYOFWEEK+8)%7;break;case"maxDate":case"minDate":o.$watch("datepickerOptions."+t,function(e){e?angular.isDate(e)?d[t]=f.fromTimezone(new Date(e),p.getOption("timezone")):(l&&a.warn("Literal date support has been deprecated, please switch to date object usage"),d[t]=new Date(s(e,"medium"))):d[t]=c[t]?f.fromTimezone(new Date(c[t]),p.getOption("timezone")):null,d.refreshView()});break;case"maxMode":case"minMode":o.datepickerOptions[t]?o.$watch(function(){return o.datepickerOptions[t]},function(e){d[t]=o[t]=angular.isDefined(e)?e:o.datepickerOptions[t],("minMode"===t&&d.modes.indexOf(o.datepickerOptions.datepickerMode)<d.modes.indexOf(d[t])||"maxMode"===t&&d.modes.indexOf(o.datepickerOptions.datepickerMode)>d.modes.indexOf(d[t]))&&(o.datepickerMode=d[t],o.datepickerOptions.datepickerMode=d[t])}):d[t]=o[t]=c[t]||null}}),o.uniqueId="datepicker-"+o.$id+"-"+Math.floor(1e4*Math.random()),o.disabled=angular.isDefined(t.disabled)||!1,angular.isDefined(t.ngDisabled)&&m.push(o.$parent.$watch(t.ngDisabled,function(e){o.disabled=e,d.refreshView()})),o.isActive=function(e){return 0===d.compare(e.date,d.activeDate)&&(o.activeDateId=e.uid,!0)},this.init=function(e){p=function(e){var t;if(angular.version.minor<6)(t=e.$options||o.datepickerOptions.ngModelOptions||c.ngModelOptions||{}).getOption=function(e){return t[e]};else{var n=e.$options.getOption("timezone")||(o.datepickerOptions.ngModelOptions?o.datepickerOptions.ngModelOptions.timezone:null)||(c.ngModelOptions?c.ngModelOptions.timezone:null);t=e.$options.createChild(c.ngModelOptions).createChild(o.datepickerOptions.ngModelOptions).createChild(e.$options).createChild({timezone:n})}return t}(h=e),o.datepickerOptions.initDate?(d.activeDate=f.fromTimezone(o.datepickerOptions.initDate,p.getOption("timezone"))||new Date,o.$watch("datepickerOptions.initDate",function(e){e&&(h.$isEmpty(h.$modelValue)||h.$invalid)&&(d.activeDate=f.fromTimezone(e,p.getOption("timezone")),d.refreshView())})):d.activeDate=new Date;var t=h.$modelValue?new Date(h.$modelValue):new Date;this.activeDate=isNaN(t)?f.fromTimezone(new Date,p.getOption("timezone")):f.fromTimezone(t,p.getOption("timezone")),h.$render=function(){d.render()}},this.render=function(){if(h.$viewValue){var e=new Date(h.$viewValue);!isNaN(e)?this.activeDate=f.fromTimezone(e,p.getOption("timezone")):u||a.error('Datepicker directive: "ng-model" value must be a Date object')}this.refreshView()},this.refreshView=function(){if(this.element){o.selectedDt=null,this._refreshView(),o.activeDt&&(o.activeDateId=o.activeDt.uid);var e=h.$viewValue?new Date(h.$viewValue):null;e=f.fromTimezone(e,p.getOption("timezone")),h.$setValidity("dateDisabled",!e||this.element&&!this.isDisabled(e))}},this.createDateObject=function(e,t){var n=h.$viewValue?new Date(h.$viewValue):null;n=f.fromTimezone(n,p.getOption("timezone"));var r=new Date;r=f.fromTimezone(r,p.getOption("timezone"));var i=this.compare(e,r),a={date:e,label:f.filter(e,t),selected:n&&0===this.compare(e,n),disabled:this.isDisabled(e),past:i<0,current:0===i,future:0<i,customClass:this.customClass(e)||null};return n&&0===this.compare(e,n)&&(o.selectedDt=a),d.activeDate&&0===this.compare(a.date,d.activeDate)&&(o.activeDt=a),a},this.isDisabled=function(e){return o.disabled||this.minDate&&this.compare(e,this.minDate)<0||this.maxDate&&0<this.compare(e,this.maxDate)||o.dateDisabled&&o.dateDisabled({date:e,mode:o.datepickerMode})},this.customClass=function(e){return o.customClass({date:e,mode:o.datepickerMode})},this.split=function(e,t){for(var n=[];0<e.length;)n.push(e.splice(0,t));return n},o.select=function(e){if(o.datepickerMode===d.minMode){var t=h.$viewValue?f.fromTimezone(new Date(h.$viewValue),p.getOption("timezone")):new Date(0,0,0,0,0,0,0);t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t=f.toTimezone(t,p.getOption("timezone")),h.$setViewValue(t),h.$render()}else d.activeDate=e,g(d.modes[d.modes.indexOf(o.datepickerMode)-1]),o.$emit("uib:datepicker.mode");o.$broadcast("uib:datepicker.focus")},o.move=function(e){var t=d.activeDate.getFullYear()+e*(d.step.years||0),n=d.activeDate.getMonth()+e*(d.step.months||0);d.activeDate.setFullYear(t,n,1),d.refreshView()},o.toggleMode=function(e){e=e||1,o.datepickerMode===d.maxMode&&1===e||o.datepickerMode===d.minMode&&-1===e||(g(d.modes[d.modes.indexOf(o.datepickerMode)+e]),o.$emit("uib:datepicker.mode"))},o.keys={13:"enter",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down"};function g(e){o.datepickerMode=e,o.datepickerOptions.datepickerMode=e}o.$on("uib:datepicker.focus",function(){d.element[0].focus()}),o.keydown=function(e){var t=o.keys[e.which];if(t&&!e.shiftKey&&!e.altKey&&!o.disabled)if(e.preventDefault(),d.shortcutPropagation||e.stopPropagation(),"enter"===t||"space"===t){if(d.isDisabled(d.activeDate))return;o.select(d.activeDate)}else!e.ctrlKey||"up"!==t&&"down"!==t?(d.handleKeyDown(t,e),d.refreshView()):o.toggleMode("up"===t?1:-1)},e.on("keydown",function(e){o.$apply(function(){o.keydown(e)})}),o.$on("$destroy",function(){for(;m.length;)m.shift()()})}]).controller("UibDaypickerController",["$scope","$element","dateFilter",function(d,e,h){var n=[31,28,31,30,31,30,31,31,30,31,30,31];function i(e,t){return 1!==t||e%4!=0||e%100==0&&e%400!=0?n[t]:29}function p(e){var t=new Date(e);t.setDate(t.getDate()+4-(t.getDay()||7));var n=t.getTime();return t.setMonth(0),t.setDate(1),Math.floor(Math.round((n-t)/864e5)/7)+1}this.step={months:1},this.element=e,this.init=function(e){angular.extend(e,this),d.showWeeks=e.showWeeks,e.refreshView()},this.getDates=function(e,t){for(var n,r=new Array(t),i=new Date(e),a=0;a<t;)n=new Date(i),r[a++]=n,i.setDate(i.getDate()+1);return r},this._refreshView=function(){var e=this.activeDate.getFullYear(),t=this.activeDate.getMonth(),n=new Date(this.activeDate);n.setFullYear(e,t,1);var r=this.startingDay-n.getDay(),i=0<r?7-r:-r,a=new Date(n);0<i&&a.setDate(1-i);for(var o=this.getDates(a,42),s=0;s<42;s++)o[s]=angular.extend(this.createDateObject(o[s],this.formatDay),{secondary:o[s].getMonth()!==t,uid:d.uniqueId+"-"+s});d.labels=new Array(7);for(var c=0;c<7;c++)d.labels[c]={abbr:h(o[c].date,this.formatDayHeader),full:h(o[c].date,"EEEE")};if(d.title=h(this.activeDate,this.formatDayTitle),d.rows=this.split(o,7),d.showWeeks){d.weekNumbers=[];for(var l=(11-this.startingDay)%7,u=d.rows.length,f=0;f<u;f++)d.weekNumbers.push(p(d.rows[f][l].date))}},this.compare=function(e,t){var n=new Date(e.getFullYear(),e.getMonth(),e.getDate()),r=new Date(t.getFullYear(),t.getMonth(),t.getDate());return n.setFullYear(e.getFullYear()),r.setFullYear(t.getFullYear()),n-r},this.handleKeyDown=function(e,t){var n=this.activeDate.getDate();if("left"===e)n-=1;else if("up"===e)n-=7;else if("right"===e)n+=1;else if("down"===e)n+=7;else if("pageup"===e||"pagedown"===e){var r=this.activeDate.getMonth()+("pageup"===e?-1:1);this.activeDate.setMonth(r,1),n=Math.min(i(this.activeDate.getFullYear(),this.activeDate.getMonth()),n)}else"home"===e?n=1:"end"===e&&(n=i(this.activeDate.getFullYear(),this.activeDate.getMonth()));this.activeDate.setDate(n)}}]).controller("UibMonthpickerController",["$scope","$element","dateFilter",function(i,e,a){this.step={years:1},this.element=e,this.init=function(e){angular.extend(e,this),e.refreshView()},this._refreshView=function(){for(var e,t=new Array(12),n=this.activeDate.getFullYear(),r=0;r<12;r++)(e=new Date(this.activeDate)).setFullYear(n,r,1),t[r]=angular.extend(this.createDateObject(e,this.formatMonth),{uid:i.uniqueId+"-"+r});i.title=a(this.activeDate,this.formatMonthTitle),i.rows=this.split(t,this.monthColumns),i.yearHeaderColspan=3<this.monthColumns?this.monthColumns-2:1},this.compare=function(e,t){var n=new Date(e.getFullYear(),e.getMonth()),r=new Date(t.getFullYear(),t.getMonth());return n.setFullYear(e.getFullYear()),r.setFullYear(t.getFullYear()),n-r},this.handleKeyDown=function(e,t){var n=this.activeDate.getMonth();if("left"===e)n-=1;else if("up"===e)n-=this.monthColumns;else if("right"===e)n+=1;else if("down"===e)n+=this.monthColumns;else if("pageup"===e||"pagedown"===e){var r=this.activeDate.getFullYear()+("pageup"===e?-1:1);this.activeDate.setFullYear(r)}else"home"===e?n=0:"end"===e&&(n=11);this.activeDate.setMonth(n)}}]).controller("UibYearpickerController",["$scope","$element","dateFilter",function(i,e,t){var a,o;function s(e){return parseInt((e-1)/o,10)*o+1}this.element=e,this.yearpickerInit=function(){a=this.yearColumns,o=this.yearRows*a,this.step={years:o}},this._refreshView=function(){for(var e,t=new Array(o),n=0,r=s(this.activeDate.getFullYear());n<o;n++)(e=new Date(this.activeDate)).setFullYear(r+n,0,1),t[n]=angular.extend(this.createDateObject(e,this.formatYear),{uid:i.uniqueId+"-"+n});i.title=[t[0].label,t[o-1].label].join(" - "),i.rows=this.split(t,a),i.columns=a},this.compare=function(e,t){return e.getFullYear()-t.getFullYear()},this.handleKeyDown=function(e,t){var n=this.activeDate.getFullYear();"left"===e?n-=1:"up"===e?n-=a:"right"===e?n+=1:"down"===e?n+=a:"pageup"===e||"pagedown"===e?n+=("pageup"===e?-1:1)*o:"home"===e?n=s(this.activeDate.getFullYear()):"end"===e&&(n=s(this.activeDate.getFullYear())+o-1),this.activeDate.setFullYear(n)}}]).directive("uibDatepicker",function(){return{templateUrl:function(e,t){return t.templateUrl||"uib/template/datepicker/datepicker.html"},scope:{datepickerOptions:"=?"},require:["uibDatepicker","^ngModel"],restrict:"A",controller:"UibDatepickerController",controllerAs:"datepicker",link:function(e,t,n,r){var i=r[0],a=r[1];i.init(a)}}}).directive("uibDaypicker",function(){return{templateUrl:function(e,t){return t.templateUrl||"uib/template/datepicker/day.html"},require:["^uibDatepicker","uibDaypicker"],restrict:"A",controller:"UibDaypickerController",link:function(e,t,n,r){var i=r[0];r[1].init(i)}}}).directive("uibMonthpicker",function(){return{templateUrl:function(e,t){return t.templateUrl||"uib/template/datepicker/month.html"},require:["^uibDatepicker","uibMonthpicker"],restrict:"A",controller:"UibMonthpickerController",link:function(e,t,n,r){var i=r[0];r[1].init(i)}}}).directive("uibYearpicker",function(){return{templateUrl:function(e,t){return t.templateUrl||"uib/template/datepicker/year.html"},require:["^uibDatepicker","uibYearpicker"],restrict:"A",controller:"UibYearpickerController",link:function(e,t,n,r){var i=r[0];angular.extend(i,r[1]),i.yearpickerInit(),i.refreshView()}}}),angular.module("ui.bootstrap.position",[]).factory("$uibPosition",["$document","$window",function(l,p){var r,i,u={normal:/(auto|scroll)/,hidden:/(auto|scroll|hidden)/},m={auto:/\s?auto?\s?/i,primary:/^(top|bottom|left|right)$/,secondary:/^(top|bottom|left|right|center)$/,vertical:/^(top|bottom)$/},o=/(HTML|BODY)/;return{getRawNode:function(e){return e.nodeName?e:e[0]||e},parseStyle:function(e){return e=parseFloat(e),isFinite(e)?e:0},offsetParent:function(e){var t,n=(e=this.getRawNode(e)).offsetParent||l[0].documentElement;for(;n&&n!==l[0].documentElement&&(t=n,"static"===(p.getComputedStyle(t).position||"static"));)n=n.offsetParent;return n||l[0].documentElement},scrollbarWidth:function(e){if(e){if(angular.isUndefined(i)){var t=l.find("body");t.addClass("uib-position-body-scrollbar-measure"),i=p.innerWidth-t[0].clientWidth,i=isFinite(i)?i:0,t.removeClass("uib-position-body-scrollbar-measure")}return i}if(angular.isUndefined(r)){var n=angular.element('<div class="uib-position-scrollbar-measure"></div>');l.find("body").append(n),r=n[0].offsetWidth-n[0].clientWidth,r=isFinite(r)?r:0,n.remove()}return r},scrollbarPadding:function(e){e=this.getRawNode(e);var t=p.getComputedStyle(e),n=this.parseStyle(t.paddingRight),r=this.parseStyle(t.paddingBottom),i=this.scrollParent(e,!1,!0),a=this.scrollbarWidth(o.test(i.tagName));return{scrollbarWidth:a,widthOverflow:i.scrollWidth>i.clientWidth,right:n+a,originalRight:n,heightOverflow:i.scrollHeight>i.clientHeight,bottom:r+a,originalBottom:r}},isScrollable:function(e,t){e=this.getRawNode(e);var n=t?u.hidden:u.normal,r=p.getComputedStyle(e);return n.test(r.overflow+r.overflowY+r.overflowX)},scrollParent:function(e,t,n){e=this.getRawNode(e);var r=t?u.hidden:u.normal,i=l[0].documentElement,a=p.getComputedStyle(e);if(n&&r.test(a.overflow+a.overflowY+a.overflowX))return e;var o="absolute"===a.position,s=e.parentElement||i;if(s===i||"fixed"===a.position)return i;for(;s.parentElement&&s!==i;){var c=p.getComputedStyle(s);if(o&&"static"!==c.position&&(o=!1),!o&&r.test(c.overflow+c.overflowY+c.overflowX))break;s=s.parentElement}return s},position:function(e,t){e=this.getRawNode(e);var n=this.offset(e);if(t){var r=p.getComputedStyle(e);n.top-=this.parseStyle(r.marginTop),n.left-=this.parseStyle(r.marginLeft)}var i=this.offsetParent(e),a={top:0,left:0};return i!==l[0].documentElement&&((a=this.offset(i)).top+=i.clientTop-i.scrollTop,a.left+=i.clientLeft-i.scrollLeft),{width:Math.round(angular.isNumber(n.width)?n.width:e.offsetWidth),height:Math.round(angular.isNumber(n.height)?n.height:e.offsetHeight),top:Math.round(n.top-a.top),left:Math.round(n.left-a.left)}},offset:function(e){var t=(e=this.getRawNode(e)).getBoundingClientRect();return{width:Math.round(angular.isNumber(t.width)?t.width:e.offsetWidth),height:Math.round(angular.isNumber(t.height)?t.height:e.offsetHeight),top:Math.round(t.top+(p.pageYOffset||l[0].documentElement.scrollTop)),left:Math.round(t.left+(p.pageXOffset||l[0].documentElement.scrollLeft))}},viewportOffset:function(e,t,n){n=!1!==n;var r=(e=this.getRawNode(e)).getBoundingClientRect(),i={top:0,left:0,bottom:0,right:0},a=t?l[0].documentElement:this.scrollParent(e),o=a.getBoundingClientRect();if(i.top=o.top+a.clientTop,i.left=o.left+a.clientLeft,a===l[0].documentElement&&(i.top+=p.pageYOffset,i.left+=p.pageXOffset),i.bottom=i.top+a.clientHeight,i.right=i.left+a.clientWidth,n){var s=p.getComputedStyle(a);i.top+=this.parseStyle(s.paddingTop),i.bottom-=this.parseStyle(s.paddingBottom),i.left+=this.parseStyle(s.paddingLeft),i.right-=this.parseStyle(s.paddingRight)}return{top:Math.round(r.top-i.top),bottom:Math.round(i.bottom-r.bottom),left:Math.round(r.left-i.left),right:Math.round(i.right-r.right)}},parsePlacement:function(e){var t=m.auto.test(e);return t&&(e=e.replace(m.auto,"")),(e=e.split("-"))[0]=e[0]||"top",m.primary.test(e[0])||(e[0]="top"),e[1]=e[1]||"center",m.secondary.test(e[1])||(e[1]="center"),e[2]=!!t,e},positionElements:function(e,t,n,r){e=this.getRawNode(e),t=this.getRawNode(t);var i=angular.isDefined(t.offsetWidth)?t.offsetWidth:t.prop("offsetWidth"),a=angular.isDefined(t.offsetHeight)?t.offsetHeight:t.prop("offsetHeight");n=this.parsePlacement(n);var o=r?this.offset(e):this.position(e),s={top:0,left:0,placement:""};if(n[2]){var c=this.viewportOffset(e,r),l=p.getComputedStyle(t),u=i+Math.round(Math.abs(this.parseStyle(l.marginLeft)+this.parseStyle(l.marginRight))),f=a+Math.round(Math.abs(this.parseStyle(l.marginTop)+this.parseStyle(l.marginBottom)));if(n[0]="top"===n[0]&&f>c.top&&f<=c.bottom?"bottom":"bottom"===n[0]&&f>c.bottom&&f<=c.top?"top":"left"===n[0]&&u>c.left&&u<=c.right?"right":"right"===n[0]&&u>c.right&&u<=c.left?"left":n[0],n[1]="top"===n[1]&&f-o.height>c.bottom&&f-o.height<=c.top?"bottom":"bottom"===n[1]&&f-o.height>c.top&&f-o.height<=c.bottom?"top":"left"===n[1]&&u-o.width>c.right&&u-o.width<=c.left?"right":"right"===n[1]&&u-o.width>c.left&&u-o.width<=c.right?"left":n[1],"center"===n[1])if(m.vertical.test(n[0])){var d=o.width/2-i/2;c.left+d<0&&u-o.width<=c.right?n[1]="left":c.right+d<0&&u-o.width<=c.left&&(n[1]="right")}else{var h=o.height/2-f/2;c.top+h<0&&f-o.height<=c.bottom?n[1]="top":c.bottom+h<0&&f-o.height<=c.top&&(n[1]="bottom")}}switch(n[0]){case"top":s.top=o.top-a;break;case"bottom":s.top=o.top+o.height;break;case"left":s.left=o.left-i;break;case"right":s.left=o.left+o.width}switch(n[1]){case"top":s.top=o.top;break;case"bottom":s.top=o.top+o.height-a;break;case"left":s.left=o.left;break;case"right":s.left=o.left+o.width-i;break;case"center":m.vertical.test(n[0])?s.left=o.left+o.width/2-i/2:s.top=o.top+o.height/2-a/2}return s.top=Math.round(s.top),s.left=Math.round(s.left),s.placement="center"===n[1]?n[0]:n[0]+"-"+n[1],s},adjustTop:function(e,t,n,r){if(-1!==e.indexOf("top")&&n!==r)return{top:t.top-r+"px"}},positionArrow:function(e,t){var n=(e=this.getRawNode(e)).querySelector(".tooltip-inner, .popover-inner");if(n){var r=angular.element(n).hasClass("tooltip-inner"),i=r?e.querySelector(".tooltip-arrow"):e.querySelector(".arrow");if(i){var a={top:"",bottom:"",left:"",right:""};if("center"!==(t=this.parsePlacement(t))[1]){var o="border-"+t[0]+"-width",s=p.getComputedStyle(i)[o],c="border-";m.vertical.test(t[0])?c+=t[0]+"-"+t[1]:c+=t[1]+"-"+t[0],c+="-radius";var l=p.getComputedStyle(r?n:e)[c];switch(t[0]){case"top":a.bottom=r?"0":"-"+s;break;case"bottom":a.top=r?"0":"-"+s;break;case"left":a.right=r?"0":"-"+s;break;case"right":a.left=r?"0":"-"+s}a[t[1]]=l,angular.element(i).css(a)}else angular.element(i).css(a)}}}}}]),angular.module("ui.bootstrap.datepickerPopup",["ui.bootstrap.datepicker","ui.bootstrap.position"]).value("$datepickerPopupLiteralWarning",!0).constant("uibDatepickerPopupConfig",{altInputFormats:[],appendToBody:!1,clearText:"Clear",closeOnDateSelection:!0,closeText:"Done",currentText:"Today",datepickerPopup:"yyyy-MM-dd",datepickerPopupTemplateUrl:"uib/template/datepickerPopup/popup.html",datepickerTemplateUrl:"uib/template/datepicker/datepicker.html",html5Types:{date:"yyyy-MM-dd","datetime-local":"yyyy-MM-ddTHH:mm:ss.sss",month:"yyyy-MM"},onOpenFocus:!0,showButtonBar:!0,placement:"auto bottom-left"}).controller("UibDatepickerPopupController",["$scope","$element","$attrs","$compile","$log","$parse","$window","$document","$rootScope","$uibPosition","dateFilter","uibDateParser","uibDatepickerPopupConfig","$timeout","uibDatepickerConfig","$datepickerPopupLiteralWarning",function(i,a,r,t,n,e,o,s,c,l,u,f,d,h,p,m){var g,_,b,v,y,w,C,A,S,T,x,k,E,D=!1,I=[];function P(e){var t=f.parse(e,g,i.date);if(isNaN(t))for(var n=0;n<E.length;n++)if(t=f.parse(e,E[n],i.date),!isNaN(t))return t;return t}function M(e){if(angular.isNumber(e)&&(e=new Date(e)),!e)return null;if(angular.isDate(e)&&!isNaN(e))return e;if(angular.isString(e)){var t=P(e);if(!isNaN(t))return f.toTimezone(t,x.getOption("timezone"))}return x.getOption("allowInvalid")?e:void 0}function $(e,t){var n=e||t;return!r.ngRequired&&!n||(angular.isNumber(n)&&(n=new Date(n)),!n||(!(!angular.isDate(n)||isNaN(n))||!!angular.isString(n)&&!isNaN(P(n))))}function O(e){if(i.isOpen||!i.disabled){var t=k[0],n=a[0].contains(e.target),r=void 0!==t.contains&&t.contains(e.target);!i.isOpen||n||r||i.$apply(function(){i.isOpen=!1})}}function R(e){27===e.which&&i.isOpen?(e.preventDefault(),e.stopPropagation(),i.$apply(function(){i.isOpen=!1}),a[0].focus()):40!==e.which||i.isOpen||(e.preventDefault(),e.stopPropagation(),i.$apply(function(){i.isOpen=!0}))}function N(){if(i.isOpen){var e=angular.element(k[0].querySelector(".uib-datepicker-popup")),t=r.popupPlacement?r.popupPlacement:d.placement,n=l.positionElements(a,e,t,b);e.css({top:n.top+"px",left:n.left+"px"}),e.hasClass("uib-position-measure")&&e.removeClass("uib-position-measure")}}this.init=function(e){if(x=function(e){var t;angular.version.minor<6?(t=angular.isObject(e.$options)?e.$options:{timezone:null}).getOption=function(e){return t[e]}:t=e.$options;return t}(T=e),_=angular.isDefined(r.closeOnDateSelection)?i.$parent.$eval(r.closeOnDateSelection):d.closeOnDateSelection,b=angular.isDefined(r.datepickerAppendToBody)?i.$parent.$eval(r.datepickerAppendToBody):d.appendToBody,v=angular.isDefined(r.onOpenFocus)?i.$parent.$eval(r.onOpenFocus):d.onOpenFocus,y=angular.isDefined(r.datepickerPopupTemplateUrl)?r.datepickerPopupTemplateUrl:d.datepickerPopupTemplateUrl,w=angular.isDefined(r.datepickerTemplateUrl)?r.datepickerTemplateUrl:d.datepickerTemplateUrl,E=angular.isDefined(r.altInputFormats)?i.$parent.$eval(r.altInputFormats):d.altInputFormats,i.showButtonBar=angular.isDefined(r.showButtonBar)?i.$parent.$eval(r.showButtonBar):d.showButtonBar,d.html5Types[r.type]?(g=d.html5Types[r.type],D=!0):(g=r.uibDatepickerPopup||d.datepickerPopup,r.$observe("uibDatepickerPopup",function(e,t){var n=e||d.datepickerPopup;if(n!==g&&(g=n,T.$modelValue=null,!g))throw new Error("uibDatepickerPopup must have a date format specified.")})),!g)throw new Error("uibDatepickerPopup must have a date format specified.");if(D&&r.uibDatepickerPopup)throw new Error("HTML5 date input types do not support custom formats.");(C=angular.element("<div uib-datepicker-popup-wrap><div uib-datepicker></div></div>")).attr({"ng-model":"date","ng-change":"dateSelection(date)","template-url":y}),(A=angular.element(C.children()[0])).attr("template-url",w),i.datepickerOptions||(i.datepickerOptions={}),D&&"month"===r.type&&(i.datepickerOptions.datepickerMode="month",i.datepickerOptions.minMode="month"),A.attr("datepicker-options","datepickerOptions"),D?T.$formatters.push(function(e){return i.date=f.fromTimezone(e,x.getOption("timezone")),e}):(T.$$parserName="date",T.$validators.date=$,T.$parsers.unshift(M),T.$formatters.push(function(e){return T.$isEmpty(e)?i.date=e:(angular.isNumber(e)&&(e=new Date(e)),i.date=f.fromTimezone(e,x.getOption("timezone")),f.filter(i.date,g))})),T.$viewChangeListeners.push(function(){i.date=P(T.$viewValue)}),a.on("keydown",R),k=t(C)(i),C.remove(),b?s.find("body").append(k):a.after(k),i.$on("$destroy",function(){for(!0===i.isOpen&&(c.$$phase||i.$apply(function(){i.isOpen=!1})),k.remove(),a.off("keydown",R),s.off("click",O),S&&S.off("scroll",N),angular.element(o).off("resize",N);I.length;)I.shift()()})},i.getText=function(e){return i[e+"Text"]||d[e+"Text"]},i.isDisabled=function(e){"today"===e&&(e=f.fromTimezone(new Date,x.getOption("timezone")));var t={};return angular.forEach(["minDate","maxDate"],function(e){i.datepickerOptions[e]?angular.isDate(i.datepickerOptions[e])?t[e]=new Date(i.datepickerOptions[e]):(m&&n.warn("Literal date support has been deprecated, please switch to date object usage"),t[e]=new Date(u(i.datepickerOptions[e],"medium"))):t[e]=null}),i.datepickerOptions&&t.minDate&&i.compare(e,t.minDate)<0||t.maxDate&&0<i.compare(e,t.maxDate)},i.compare=function(e,t){return new Date(e.getFullYear(),e.getMonth(),e.getDate())-new Date(t.getFullYear(),t.getMonth(),t.getDate())},i.dateSelection=function(e){i.date=e;var t=i.date?f.filter(i.date,g):null;a.val(t),T.$setViewValue(t),_&&(i.isOpen=!1,a[0].focus())},i.keydown=function(e){27===e.which&&(e.stopPropagation(),i.isOpen=!1,a[0].focus())},i.select=function(e,t){if(t.stopPropagation(),"today"===e){var n=new Date;angular.isDate(i.date)?(e=new Date(i.date)).setFullYear(n.getFullYear(),n.getMonth(),n.getDate()):(e=f.fromTimezone(n,x.getOption("timezone"))).setHours(0,0,0,0)}i.dateSelection(e)},i.close=function(e){e.stopPropagation(),i.isOpen=!1,a[0].focus()},i.disabled=angular.isDefined(r.disabled)||!1,r.ngDisabled&&I.push(i.$parent.$watch(e(r.ngDisabled),function(e){i.disabled=e})),i.$watch("isOpen",function(e){e?i.disabled?i.isOpen=!1:h(function(){N(),v&&i.$broadcast("uib:datepicker.focus"),s.on("click",O);var e=r.popupPlacement?r.popupPlacement:d.placement;b||l.parsePlacement(e)[2]?(S=S||angular.element(l.scrollParent(a)))&&S.on("scroll",N):S=null,angular.element(o).on("resize",N)},0,!1):(s.off("click",O),S&&S.off("scroll",N),angular.element(o).off("resize",N))}),i.$on("uib:datepicker.mode",function(){h(N,0,!1)})}]).directive("uibDatepickerPopup",function(){return{require:["ngModel","uibDatepickerPopup"],controller:"UibDatepickerPopupController",scope:{datepickerOptions:"=?",isOpen:"=?",currentText:"@",clearText:"@",closeText:"@"},link:function(e,t,n,r){var i=r[0];r[1].init(i)}}}).directive("uibDatepickerPopupWrap",function(){return{restrict:"A",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/datepickerPopup/popup.html"}}}),angular.module("ui.bootstrap.debounce",[]).factory("$$debounce",["$timeout",function(a){return function(n,r){var i;return function(){var e=this,t=Array.prototype.slice.call(arguments);i&&a.cancel(i),i=a(function(){n.apply(e,t)},r)}}}]),angular.module("ui.bootstrap.multiMap",[]).factory("$$multiMap",function(){return{createNew:function(){var i={};return{entries:function(){return Object.keys(i).map(function(e){return{key:e,value:i[e]}})},get:function(e){return i[e]},hasKey:function(e){return!!i[e]},keys:function(){return Object.keys(i)},put:function(e,t){i[e]||(i[e]=[]),i[e].push(t)},remove:function(e,t){var n=i[e];if(n){var r=n.indexOf(t);-1!==r&&n.splice(r,1),n.length||delete i[e]}}}}}}),angular.module("ui.bootstrap.dropdown",["ui.bootstrap.multiMap","ui.bootstrap.position"]).constant("uibDropdownConfig",{appendToOpenClass:"uib-dropdown-open",openClass:"open"}).service("uibDropdownService",["$document","$rootScope","$$multiMap",function(a,r,e){var o=null,s=e.createNew();this.isOnlyOpen=function(n,e){var t=s.get(e);if(t&&t.reduce(function(e,t){return t.scope===n?t:e},{}))return 1===t.length;return!1},this.open=function(e,t,n){if(o||a.on("click",c),o&&o!==e&&(o.isOpen=!1),o=e,n){var r=s.get(n);if(r)-1===r.map(function(e){return e.scope}).indexOf(e)&&s.put(n,{scope:e});else s.put(n,{scope:e})}},this.close=function(n,e,t){if(o===n&&(a.off("click",c),a.off("keydown",this.keybindFilter),o=null),t){var r=s.get(t);if(r){var i=r.reduce(function(e,t){return t.scope===n?t:e},{});i&&s.remove(t,i)}}};var c=function(e){if(o&&o.isOpen&&!(e&&"disabled"===o.getAutoClose()||e&&3===e.which)){var t=o.getToggleElement();if(!(e&&t&&t[0].contains(e.target))){var n=o.getDropdownElement();e&&"outsideClick"===o.getAutoClose()&&n&&n[0].contains(e.target)||(o.focusToggleElement(),o.isOpen=!1,r.$$phase||o.$apply())}}};this.keybindFilter=function(e){if(o){var t=o.getDropdownElement(),n=o.getToggleElement(),r=t&&t[0].contains(e.target),i=n&&n[0].contains(e.target);27===e.which?(e.stopPropagation(),o.focusToggleElement(),c()):o.isKeynavEnabled()&&-1!==[38,40].indexOf(e.which)&&o.isOpen&&(r||i)&&(e.preventDefault(),e.stopPropagation(),o.focusDropdownEntry(e.which))}}}]).controller("UibDropdownController",["$scope","$element","$attrs","$parse","uibDropdownConfig","uibDropdownService","$animate","$uibPosition","$document","$compile","$templateRequest",function(g,_,b,v,e,y,w,C,A,S,T){var x,t,k=this,E=g.$new(),D=e.appendToOpenClass,I=e.openClass,P=angular.noop,M=b.onToggle?v(b.onToggle):angular.noop,n=!1,$=A.find("body");function O(){_.append(k.dropdownMenu)}_.addClass("dropdown"),this.init=function(){b.isOpen&&(t=v(b.isOpen),P=t.assign,g.$watch(t,function(e){E.isOpen=!!e})),n=angular.isDefined(b.keyboardNav)},this.toggle=function(e){return E.isOpen=arguments.length?!!e:!E.isOpen,angular.isFunction(P)&&P(E,E.isOpen),E.isOpen},this.isOpen=function(){return E.isOpen},E.getToggleElement=function(){return k.toggleElement},E.getAutoClose=function(){return b.autoClose||"always"},E.getElement=function(){return _},E.isKeynavEnabled=function(){return n},E.focusDropdownEntry=function(e){var t=k.dropdownMenu?angular.element(k.dropdownMenu).find("a"):_.find("ul").eq(0).find("a");switch(e){case 40:angular.isNumber(k.selectedOption)?k.selectedOption=k.selectedOption===t.length-1?k.selectedOption:k.selectedOption+1:k.selectedOption=0;break;case 38:angular.isNumber(k.selectedOption)?k.selectedOption=0===k.selectedOption?0:k.selectedOption-1:k.selectedOption=t.length-1}t[k.selectedOption].focus()},E.getDropdownElement=function(){return k.dropdownMenu},E.focusToggleElement=function(){k.toggleElement&&k.toggleElement[0].focus()},E.$watch("isOpen",function(e,t){var n=null,r=!1;if(angular.isDefined(b.dropdownAppendTo)){var i=v(b.dropdownAppendTo)(E);i&&(n=angular.element(i))}angular.isDefined(b.dropdownAppendToBody)&&(!1!==v(b.dropdownAppendToBody)(E)&&(r=!0));if(r&&!n&&(n=$),n&&k.dropdownMenu&&(e?(n.append(k.dropdownMenu),_.on("$destroy",O)):(_.off("$destroy",O),O())),n&&k.dropdownMenu){var a,o,s,c=C.positionElements(_,k.dropdownMenu,"bottom-left",!0),l=0;if(a={top:c.top+"px",display:e?"block":"none"},(o=k.dropdownMenu.hasClass("dropdown-menu-right"))?(a.left="auto",(s=C.scrollbarPadding(n)).heightOverflow&&s.scrollbarWidth&&(l=s.scrollbarWidth),a.right=window.innerWidth-l-(c.left+_.prop("offsetWidth"))+"px"):(a.left=c.left+"px",a.right="auto"),!r){var u=C.offset(n);a.top=c.top-u.top+"px",o?a.right=window.innerWidth-(c.left-u.left+_.prop("offsetWidth"))+"px":a.left=c.left-u.left+"px"}k.dropdownMenu.css(a)}var f=n||_,d=n?D:I,h=f.hasClass(d),p=y.isOnlyOpen(g,n);h===!e&&w[n?p?"removeClass":"addClass":e?"addClass":"removeClass"](f,d).then(function(){angular.isDefined(e)&&e!==t&&M(g,{open:!!e})});if(e)k.dropdownMenuTemplateUrl?T(k.dropdownMenuTemplateUrl).then(function(e){x=E.$new(),S(e.trim())(x,function(e){var t=e;k.dropdownMenu.replaceWith(t),k.dropdownMenu=t,A.on("keydown",y.keybindFilter)})}):A.on("keydown",y.keybindFilter),E.focusToggleElement(),y.open(E,_,n);else{if(y.close(E,_,n),k.dropdownMenuTemplateUrl){x&&x.$destroy();var m=angular.element('<ul class="dropdown-menu"></ul>');k.dropdownMenu.replaceWith(m),k.dropdownMenu=m}k.selectedOption=null}angular.isFunction(P)&&P(g,e)})}]).directive("uibDropdown",function(){return{controller:"UibDropdownController",link:function(e,t,n,r){r.init()}}}).directive("uibDropdownMenu",function(){return{restrict:"A",require:"?^uibDropdown",link:function(e,t,n,r){if(r&&!angular.isDefined(n.dropdownNested)){t.addClass("dropdown-menu");var i=n.templateUrl;i&&(r.dropdownMenuTemplateUrl=i),r.dropdownMenu||(r.dropdownMenu=t)}}}}).directive("uibDropdownToggle",function(){return{require:"?^uibDropdown",link:function(t,n,r,i){if(i){n.addClass("dropdown-toggle"),i.toggleElement=n;var e=function(e){e.preventDefault(),n.hasClass("disabled")||r.disabled||t.$apply(function(){i.toggle()})};n.on("click",e),n.attr({"aria-haspopup":!0,"aria-expanded":!1}),t.$watch(i.isOpen,function(e){n.attr("aria-expanded",!!e)}),t.$on("$destroy",function(){n.off("click",e)})}}}}),angular.module("ui.bootstrap.stackedMap",[]).factory("$$stackedMap",function(){return{createNew:function(){var r=[];return{add:function(e,t){r.push({key:e,value:t})},get:function(e){for(var t=0;t<r.length;t++)if(e===r[t].key)return r[t]},keys:function(){for(var e=[],t=0;t<r.length;t++)e.push(r[t].key);return e},top:function(){return r[r.length-1]},remove:function(e){for(var t=-1,n=0;n<r.length;n++)if(e===r[n].key){t=n;break}return r.splice(t,1)[0]},removeTop:function(){return r.pop()},length:function(){return r.length}}}}}),angular.module("ui.bootstrap.modal",["ui.bootstrap.multiMap","ui.bootstrap.stackedMap","ui.bootstrap.position"]).provider("$uibResolve",function(){var e=this;this.resolver=null,this.setResolver=function(e){this.resolver=e},this.$get=["$injector","$q",function(a,o){var s=e.resolver?a.get(e.resolver):null;return{resolve:function(e,t,n,r){if(s)return s.resolve(e,t,n,r);var i=[];return angular.forEach(e,function(e){angular.isFunction(e)||angular.isArray(e)?i.push(o.resolve(a.invoke(e))):angular.isString(e)?i.push(o.resolve(a.get(e))):i.push(o.resolve(e))}),o.all(i).then(function(n){var r={},i=0;return angular.forEach(e,function(e,t){r[t]=n[i++]}),r})}}}]}).directive("uibModalBackdrop",["$animate","$injector","$uibModalStack",function(o,e,t){return{restrict:"A",compile:function(e,t){return e.addClass(t.backdropClass),n}};function n(r,i,a){a.modalInClass&&(o.addClass(i,a.modalInClass),r.$on(t.NOW_CLOSING_EVENT,function(e,t){var n=t();r.modalOptions.animation?o.removeClass(i,a.modalInClass).then(n):n()}))}}]).directive("uibModalWindow",["$uibModalStack","$q","$animateCss","$document",function(n,a,o,s){return{scope:{index:"@"},restrict:"A",transclude:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/modal/window.html"},link:function(t,r,i){r.addClass(i.windowTopClass||""),t.size=i.size,t.close=function(e){var t=n.getTop();t&&t.value.backdrop&&"static"!==t.value.backdrop&&e.target===e.currentTarget&&(e.preventDefault(),e.stopPropagation(),n.dismiss(t.key,"backdrop click"))},r.on("click",t.close),t.$isRendered=!0;var e=a.defer();t.$$postDigest(function(){e.resolve()}),e.promise.then(function(){var e=null;i.modalInClass&&(e=o(r,{addClass:i.modalInClass}).start(),t.$on(n.NOW_CLOSING_EVENT,function(e,t){var n=t();o(r,{removeClass:i.modalInClass}).start().then(n)})),a.when(e).then(function(){var e=n.getTop();if(e&&n.modalRendered(e.key),!s[0].activeElement||!r[0].contains(s[0].activeElement)){var t=r[0].querySelector("[autofocus]");t?t.focus():r[0].focus()}})})}}}]).directive("uibModalAnimationClass",function(){return{compile:function(e,t){t.modalAnimation&&e.addClass(t.uibModalAnimationClass)}}}).directive("uibModalTransclude",["$animate",function(a){return{link:function(e,t,n,r,i){i(e.$parent,function(e){t.empty(),a.enter(e,t)})}}}]).factory("$uibModalStack",["$animate","$animateCss","$document","$compile","$rootScope","$q","$$multiMap","$$stackedMap","$uibPosition",function(c,e,l,u,f,o,t,n,d){var h,p,m,g="modal-open",_=n.createNew(),b=t.createNew(),s={NOW_CLOSING_EVENT:"modal.stack.now-closing"},v=0,y=null,w="data-bootstrap-modal-aria-hidden-count",C=/[A-Z]/g;function A(){for(var e=-1,t=_.keys(),n=0;n<t.length;n++)_.get(t[n]).value.backdrop&&(e=n);return-1<e&&e<v&&(e=v),e}function r(n,e){var r=_.get(n).value,i=r.appendTo;_.remove(n),(y=_.top())&&(v=parseInt(y.value.modalDomEl.attr("index"),10)),a(r.modalDomEl,r.modalScope,function(){var e=r.openedClass||g;b.remove(e,n);var t=b.hasKey(e);i.toggleClass(e,t),!t&&m&&m.heightOverflow&&m.scrollbarWidth&&(m.originalRight?i.css({paddingRight:m.originalRight+"px"}):i.css({paddingRight:""}),m=null),S(!0)},r.closedDeferred),function(){if(h&&-1===A()){a(h,p,function(){null}),p=h=void 0}}(),e&&e.focus?e.focus():i.focus&&i.focus()}function S(e){var t;0<_.length()&&(t=_.top().value).modalDomEl.toggleClass(t.windowTopClass||"",e)}function a(t,n,r,i){var e,a=null;return n.$broadcast(s.NOW_CLOSING_EVENT,function(){return e||(e=o.defer(),a=e.promise),function(){e.resolve()}}),o.when(a).then(function e(){if(e.done)return;e.done=!0;c.leave(t).then(function(){r&&r(),t.remove(),i&&i.resolve()});n.$destroy()})}function i(e){if(e.isDefaultPrevented())return e;var t=_.top();if(t)switch(e.which){case 27:t.value.keyboard&&(e.preventDefault(),f.$apply(function(){s.dismiss(t.key,"escape key press")}));break;case 9:var n=s.loadFocusElementList(t),r=!1;e.shiftKey?(s.isFocusInFirstItem(e,n)||s.isModalFocused(e,t))&&(r=s.focusLastFocusableElement(n)):s.isFocusInLastItem(e,n)&&(r=s.focusFirstFocusableElement(n)),r&&(e.preventDefault(),e.stopPropagation())}}function T(e,t,n){return!e.value.modalScope.$broadcast("modal.closing",t,n).defaultPrevented}function x(){Array.prototype.forEach.call(document.querySelectorAll("["+w+"]"),function(e){var t=parseInt(e.getAttribute(w),10)-1;e.setAttribute(w,t),t||(e.removeAttribute(w),e.removeAttribute("aria-hidden"))})}return f.$watch(A,function(e){p&&(p.index=e)}),l.on("keydown",i),f.$on("$destroy",function(){l.off("keydown",i)}),s.open=function(e,t){var n=l[0].activeElement,r=t.openedClass||g;S(!1),y=_.top(),_.add(e,{deferred:t.deferred,renderDeferred:t.renderDeferred,closedDeferred:t.closedDeferred,modalScope:t.scope,backdrop:t.backdrop,keyboard:t.keyboard,openedClass:t.openedClass,windowTopClass:t.windowTopClass,animation:t.animation,appendTo:t.appendTo}),b.put(r,e);var i,a=t.appendTo,o=A();0<=o&&!h&&((p=f.$new(!0)).modalOptions=t,p.index=o,(h=angular.element('<div uib-modal-backdrop="modal-backdrop"></div>')).attr({class:"modal-backdrop","ng-style":"{'z-index': 1040 + (index && 1 || 0) + index*10}","uib-modal-animation-class":"fade","modal-in-class":"in"}),t.backdropClass&&h.addClass(t.backdropClass),t.animation&&h.attr("modal-animation","true"),u(h)(p),c.enter(h,a),d.isScrollable(a)&&(m=d.scrollbarPadding(a)).heightOverflow&&m.scrollbarWidth&&a.css({paddingRight:m.right+"px"})),t.component?(i=document.createElement(t.component.name.replace(C,function(e,t){return(t?"-":"")+e.toLowerCase()})),(i=angular.element(i)).attr({resolve:"$resolve","modal-instance":"$uibModalInstance",close:"$close($value)",dismiss:"$dismiss($value)"})):i=t.content,v=y?parseInt(y.value.modalDomEl.attr("index"),10)+1:0;var s=angular.element('<div uib-modal-window="modal-window"></div>');s.attr({class:"modal","template-url":t.windowTemplateUrl,"window-top-class":t.windowTopClass,role:"dialog","aria-labelledby":t.ariaLabelledBy,"aria-describedby":t.ariaDescribedBy,size:t.size,index:v,animate:"animate","ng-style":"{'z-index': 1050 + $$topModalIndex*10, display: 'block'}",tabindex:-1,"uib-modal-animation-class":"fade","modal-in-class":"in"}).append(i),t.windowClass&&s.addClass(t.windowClass),t.animation&&s.attr("modal-animation","true"),a.addClass(r),t.scope&&(t.scope.$$topModalIndex=v),c.enter(u(s)(t.scope),a),_.top().value.modalDomEl=s,_.top().value.modalOpener=n,function e(t){if(!t||"BODY"===t[0].tagName)return;n(t).forEach(function(e){var t="true"===e.getAttribute("aria-hidden"),n=parseInt(e.getAttribute(w),10);n||(n=t?1:0),e.setAttribute(w,n+1),e.setAttribute("aria-hidden","true")});return e(t.parent());function n(t){var e=t.parent()?t.parent().children():[];return Array.prototype.filter.call(e,function(e){return e!==t[0]})}}(s)},s.close=function(e,t){var n=_.get(e);return x(),n&&T(n,t,!0)?(n.value.modalScope.$$uibDestructionScheduled=!0,n.value.deferred.resolve(t),r(e,n.value.modalOpener),!0):!n},s.dismiss=function(e,t){var n=_.get(e);return x(),n&&T(n,t,!1)?(n.value.modalScope.$$uibDestructionScheduled=!0,n.value.deferred.reject(t),r(e,n.value.modalOpener),!0):!n},s.dismissAll=function(e){for(var t=this.getTop();t&&this.dismiss(t.key,e);)t=this.getTop()},s.getTop=function(){return _.top()},s.modalRendered=function(e){var t=_.get(e);t&&t.value.renderDeferred.resolve()},s.focusFirstFocusableElement=function(e){return 0<e.length&&(e[0].focus(),!0)},s.focusLastFocusableElement=function(e){return 0<e.length&&(e[e.length-1].focus(),!0)},s.isModalFocused=function(e,t){if(e&&t){var n=t.value.modalDomEl;if(n&&n.length)return(e.target||e.srcElement)===n[0]}return!1},s.isFocusInFirstItem=function(e,t){return 0<t.length&&(e.target||e.srcElement)===t[0]},s.isFocusInLastItem=function(e,t){return 0<t.length&&(e.target||e.srcElement)===t[t.length-1]},s.loadFocusElementList=function(e){if(e){var t=e.value.modalDomEl;if(t&&t.length){var n=t[0].querySelectorAll("a[href], area[href], input:not([disabled]):not([tabindex='-1']), button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']), textarea:not([disabled]):not([tabindex='-1']), iframe, object, embed, *[tabindex]:not([tabindex='-1']), *[contenteditable=true]");return n?Array.prototype.filter.call(n,function(e){return!!((t=e).offsetWidth||t.offsetHeight||t.getClientRects().length);var t}):n}}},s}]).provider("$uibModal",function(){var b={options:{animation:!0,backdrop:!0,keyboard:!0},$get:["$rootScope","$q","$document","$templateRequest","$controller","$uibResolve","$uibModalStack",function(m,i,a,o,g,s,_){var e={};var c=null;return e.getPromiseChain=function(){return c},e.open=function(l){var e,t,n,u=i.defer(),f=i.defer(),d=i.defer(),h=i.defer(),p={result:u.promise,opened:f.promise,closed:d.promise,rendered:h.promise,close:function(e){return _.close(p,e)},dismiss:function(e){return _.dismiss(p,e)}};if((l=angular.extend({},b.options,l)).resolve=l.resolve||{},l.appendTo=l.appendTo||a.find("body").eq(0),!l.appendTo.length)throw new Error("appendTo element not found. Make sure that the element passed is in DOM.");if(!l.component&&!l.template&&!l.templateUrl)throw new Error("One of component or template or templateUrl options is required.");function r(){return e}return e=l.component?i.when(s.resolve(l.resolve,{},null,null)):i.all([(t=l,t.template?i.when(t.template):o(angular.isFunction(t.templateUrl)?t.templateUrl():t.templateUrl)),s.resolve(l.resolve,{},null,null)]),n=c=i.all([c]).then(r,r).then(function(a){var e=l.scope||m,o=e.$new();o.$close=p.close,o.$dismiss=p.dismiss,o.$on("$destroy",function(){o.$$uibDestructionScheduled||o.$dismiss("$uibUnscheduledDestruction")});var t,n,r={scope:o,deferred:u,renderDeferred:h,closedDeferred:d,animation:l.animation,backdrop:l.backdrop,keyboard:l.keyboard,backdropClass:l.backdropClass,windowTopClass:l.windowTopClass,windowClass:l.windowClass,windowTemplateUrl:l.windowTemplateUrl,ariaLabelledBy:l.ariaLabelledBy,ariaDescribedBy:l.ariaDescribedBy,size:l.size,openedClass:l.openedClass,appendTo:l.appendTo},i={},s={};function c(n,e,t,r){n.$scope=o,n.$scope.$resolve={},t?n.$scope.$uibModalInstance=p:n.$uibModalInstance=p;var i=e?a[1]:a;angular.forEach(i,function(e,t){r&&(n[t]=e),n.$scope.$resolve[t]=e})}l.component?(c(i,!1,!0,!1),i.name=l.component,r.component=i):l.controller&&(c(s,!0,!1,!0),n=g(l.controller,s,!0,l.controllerAs),l.controllerAs&&l.bindToController&&((t=n.instance).$close=o.$close,t.$dismiss=o.$dismiss,angular.extend(t,{$resolve:s.$scope.$resolve},e)),t=n(),angular.isFunction(t.$onInit)&&t.$onInit()),l.component||(r.content=a[0]),_.open(p,r),f.resolve(!0)},function(e){f.reject(e),u.reject(e)}).finally(function(){c===n&&(c=null)}),p},e}]};return b}),angular.module("ui.bootstrap.paging",[]).factory("uibPaging",["$parse",function(e){return{create:function(n,r,i){n.setNumPages=i.numPages?e(i.numPages).assign:angular.noop,n.ngModelCtrl={$setViewValue:angular.noop},n._watchers=[],n.init=function(e,t){n.ngModelCtrl=e,n.config=t,e.$render=function(){n.render()},i.itemsPerPage?n._watchers.push(r.$parent.$watch(i.itemsPerPage,function(e){n.itemsPerPage=parseInt(e,10),r.totalPages=n.calculateTotalPages(),n.updatePage()})):n.itemsPerPage=t.itemsPerPage,r.$watch("totalItems",function(e,t){(angular.isDefined(e)||e!==t)&&(r.totalPages=n.calculateTotalPages(),n.updatePage())})},n.calculateTotalPages=function(){var e=n.itemsPerPage<1?1:Math.ceil(r.totalItems/n.itemsPerPage);return Math.max(e||0,1)},n.render=function(){r.page=parseInt(n.ngModelCtrl.$viewValue,10)||1},r.selectPage=function(e,t){t&&t.preventDefault(),(!r.ngDisabled||!t)&&r.page!==e&&0<e&&e<=r.totalPages&&(t&&t.target&&t.target.blur(),n.ngModelCtrl.$setViewValue(e),n.ngModelCtrl.$render())},r.getText=function(e){return r[e+"Text"]||n.config[e+"Text"]},r.noPrevious=function(){return 1===r.page},r.noNext=function(){return r.page===r.totalPages},n.updatePage=function(){n.setNumPages(r.$parent,r.totalPages),r.page>r.totalPages?r.selectPage(r.totalPages):n.ngModelCtrl.$render()},r.$on("$destroy",function(){for(;n._watchers.length;)n._watchers.shift()()})}}}]),angular.module("ui.bootstrap.pager",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPagerController",["$scope","$attrs","uibPaging","uibPagerConfig",function(e,t,n,r){e.align=angular.isDefined(t.align)?e.$parent.$eval(t.align):r.align,n.create(this,e,t)}]).constant("uibPagerConfig",{itemsPerPage:10,previousText:"« Previous",nextText:"Next »",align:!0}).directive("uibPager",["uibPagerConfig",function(o){return{scope:{totalItems:"=",previousText:"@",nextText:"@",ngDisabled:"="},require:["uibPager","?ngModel"],restrict:"A",controller:"UibPagerController",controllerAs:"pager",templateUrl:function(e,t){return t.templateUrl||"uib/template/pager/pager.html"},link:function(e,t,n,r){t.addClass("pager");var i=r[0],a=r[1];a&&i.init(a,o)}}}]),angular.module("ui.bootstrap.pagination",["ui.bootstrap.paging","ui.bootstrap.tabindex"]).controller("UibPaginationController",["$scope","$attrs","$parse","uibPaging","uibPaginationConfig",function(t,n,e,r,i){var a=this,p=angular.isDefined(n.maxSize)?t.$parent.$eval(n.maxSize):i.maxSize,m=angular.isDefined(n.rotate)?t.$parent.$eval(n.rotate):i.rotate,g=angular.isDefined(n.forceEllipses)?t.$parent.$eval(n.forceEllipses):i.forceEllipses,_=angular.isDefined(n.boundaryLinkNumbers)?t.$parent.$eval(n.boundaryLinkNumbers):i.boundaryLinkNumbers,b=angular.isDefined(n.pageLabel)?function(e){return t.$parent.$eval(n.pageLabel,{$page:e})}:angular.identity;function v(e,t,n){return{number:e,text:t,active:n}}t.boundaryLinks=angular.isDefined(n.boundaryLinks)?t.$parent.$eval(n.boundaryLinks):i.boundaryLinks,t.directionLinks=angular.isDefined(n.directionLinks)?t.$parent.$eval(n.directionLinks):i.directionLinks,n.$set("role","menu"),r.create(this,t,n),n.maxSize&&a._watchers.push(t.$parent.$watch(e(n.maxSize),function(e){p=parseInt(e,10),a.render()}));var o=this.render;this.render=function(){o(),0<t.page&&t.page<=t.totalPages&&(t.pages=function(e,t){var n=[],r=1,i=t,a=angular.isDefined(p)&&p<t;a&&(m?t<(i=(r=Math.max(e-Math.floor(p/2),1))+p-1)&&(r=(i=t)-p+1):(r=(Math.ceil(e/p)-1)*p+1,i=Math.min(r+p-1,t)));for(var o=r;o<=i;o++){var s=v(o,b(o),o===e);n.push(s)}if(a&&0<p&&(!m||g||_)){if(1<r){if(!_||3<r){var c=v(r-1,"...",!1);n.unshift(c)}if(_){if(3===r){var l=v(2,"2",!1);n.unshift(l)}var u=v(1,"1",!1);n.unshift(u)}}if(i<t){if(!_||i<t-2){var f=v(i+1,"...",!1);n.push(f)}if(_){if(i===t-2){var d=v(t-1,t-1,!1);n.push(d)}var h=v(t,t,!1);n.push(h)}}}return n}(t.page,t.totalPages))}}]).constant("uibPaginationConfig",{itemsPerPage:10,boundaryLinks:!1,boundaryLinkNumbers:!1,directionLinks:!0,firstText:"First",previousText:"Previous",nextText:"Next",lastText:"Last",rotate:!0,forceEllipses:!1}).directive("uibPagination",["$parse","uibPaginationConfig",function(e,o){return{scope:{totalItems:"=",firstText:"@",previousText:"@",nextText:"@",lastText:"@",ngDisabled:"="},require:["uibPagination","?ngModel"],restrict:"A",controller:"UibPaginationController",controllerAs:"pagination",templateUrl:function(e,t){return t.templateUrl||"uib/template/pagination/pagination.html"},link:function(e,t,n,r){t.addClass("pagination");var i=r[0],a=r[1];a&&i.init(a,o)}}}]),angular.module("ui.bootstrap.tooltip",["ui.bootstrap.position","ui.bootstrap.stackedMap"]).provider("$uibTooltip",function(){var s={placement:"top",placementClassPrefix:"",animation:!0,popupDelay:0,popupCloseDelay:0,useContentExp:!1},c={mouseenter:"mouseleave",click:"click",outsideClick:"outsideClick",focus:"blur",none:""},l={};this.options=function(e){angular.extend(l,e)},this.setTriggers=function(e){angular.extend(c,e)},this.$get=["$window","$compile","$timeout","$document","$uibPosition","$interpolate","$rootScope","$parse","$$stackedMap",function(e,a,W,q,z,o,t,V,n){var Y=n.createNew();function r(e){if(27===e.which){var t=Y.top();t&&(t.value.close(),t=null)}}return q.on("keyup",r),t.$on("$destroy",function(){q.off("keyup",r)}),function(j,B,r,U){function H(e){var t=(e||U.trigger||r).split(" "),n=t.map(function(e){return c[e]||e});return{show:t,hide:n}}U=angular.extend({},s,l,U);var e=j.replace(/[A-Z]/g,function(e,t){return(t?"-":"")+e.toLowerCase()}),t=o.startSymbol(),n=o.endSymbol(),i="<div "+e+'-popup uib-title="'+t+"title"+n+'" '+(U.useContentExp?'content-exp="contentExp()" ':'content="'+t+"content"+n+'" ')+'origin-scope="origScope" class="uib-position-measure '+B+'" tooltip-animation-class="fade"uib-tooltip-classes ng-class="{ in: isOpen }" ></div>';return{compile:function(e,t){var G=a(i);return function(r,a,i,e){var o,t,n,s,c,l,u,f,d=!!angular.isDefined(U.appendToBody)&&U.appendToBody,h=H(void 0),p=angular.isDefined(i[B+"Enable"]),m=r.$new(!0),g=!1,_=!!angular.isDefined(i[B+"IsOpen"])&&V(i[B+"IsOpen"]),b=!!U.useContentExp&&V(i[j]),v=[],y=function(){o&&o.html()&&(l||(l=W(function(){var e=z.positionElements(a,o,m.placement,d),n=angular.isDefined(o.offsetHeight)?o.offsetHeight:o.prop("offsetHeight"),r=d?z.offset(a):z.position(a);o.css({top:e.top+"px",left:e.left+"px"});var i=e.placement.split("-");o.hasClass(i[0])||(o.removeClass(f.split("-")[0]),o.addClass(i[0])),o.hasClass(U.placementClassPrefix+e.placement)||(o.removeClass(U.placementClassPrefix+f),o.addClass(U.placementClassPrefix+e.placement)),u=W(function(){var e=angular.isDefined(o.offsetHeight)?o.offsetHeight:o.prop("offsetHeight"),t=z.adjustTop(i,r,n,e);t&&o.css(t),u=null},0,!1),o.hasClass("uib-position-measure")?(z.positionArrow(o,e.placement),o.removeClass("uib-position-measure")):f!==e.placement&&z.positionArrow(o,e.placement),f=e.placement,l=null},0,!1)))};function w(){m.isOpen?A():C()}function C(){p&&!r.$eval(i[B+"Enable"])||(k(),function(){m.title=i[B+"Title"],m.content=b?b(r):i[j];m.popupClass=i[B+"Class"],m.placement=angular.isDefined(i[B+"Placement"])?i[B+"Placement"]:U.placement;var e=z.parsePlacement(m.placement);f=e[1]?e[0]+"-"+e[1]:e[0];var t=parseInt(i[B+"PopupDelay"],10),n=parseInt(i[B+"PopupCloseDelay"],10);m.popupDelay=isNaN(t)?U.popupDelay:t,m.popupCloseDelay=isNaN(n)?U.popupCloseDelay:n}(),m.popupDelay?s||(s=W(S,m.popupDelay,!1)):S())}function A(){T(),m.popupCloseDelay?c||(c=W(x,m.popupCloseDelay,!1)):x()}function S(){if(T(),k(),!m.content)return angular.noop;!function(){if(o)return;t=m.$new(),o=G(t,function(e){d?q.find("body").append(e):a.after(e)}),Y.add(m,{close:x}),function(){v.length=0,b?(v.push(r.$watch(b,function(e){!(m.content=e)&&m.isOpen&&x()})),v.push(t.$watch(function(){g||(g=!0,t.$$postDigest(function(){g=!1,m&&m.isOpen&&y()}))}))):v.push(i.$observe(j,function(e){!(m.content=e)&&m.isOpen?x():y()}));v.push(i.$observe(B+"Title",function(e){m.title=e,m.isOpen&&y()})),v.push(i.$observe(B+"Placement",function(e){m.placement=e||U.placement,m.isOpen&&y()}))}()}(),m.$evalAsync(function(){D(m.isOpen=!0),y()})}function T(){s&&(W.cancel(s),s=null),l&&(W.cancel(l),l=null)}function x(){m&&m.$evalAsync(function(){m&&(D(m.isOpen=!1),m.animation?n||(n=W(E,150,!1)):E())})}function k(){c&&(W.cancel(c),c=null),n&&(W.cancel(n),n=null)}function E(){T(),k(),v.length&&(angular.forEach(v,function(e){e()}),v.length=0),o&&(o.remove(),o=null,u&&W.cancel(u)),Y.remove(m),t&&(t.$destroy(),t=null)}function D(e){_&&angular.isFunction(_.assign)&&_.assign(r,e)}function I(e){m&&m.isOpen&&o&&(a[0].contains(e.target)||o[0].contains(e.target)||A())}function P(e){27===e.which&&A()}m.origScope=r,m.isOpen=!1,m.contentExp=function(){return m.content},i.$observe("disabled",function(e){e&&T(),e&&m.isOpen&&x()}),_&&r.$watch(_,function(e){m&&!e===m.isOpen&&w()});var M,$,O,R=function(){h.show.forEach(function(e){"outsideClick"===e?a.off("click",w):(a.off(e,C),a.off(e,w)),a.off("keypress",P)}),h.hide.forEach(function(e){"outsideClick"===e?q.off("click",I):a.off(e,A)})};M=[],$=[],O=r.$eval(i[B+"Trigger"]),R(),"none"!==(h=angular.isObject(O)?(Object.keys(O).forEach(function(e){M.push(e),$.push(O[e])}),{show:M,hide:$}):H(O)).show&&h.show.forEach(function(e,t){"outsideClick"===e?(a.on("click",w),q.on("click",I)):e===h.hide[t]?a.on(e,w):e&&(a.on(e,C),a.on(h.hide[t],A)),a.on("keypress",P)});var N,L=r.$eval(i[B+"Animation"]);m.animation=angular.isDefined(L)?!!L:U.animation;var F=B+"AppendToBody";N=F in i&&void 0===i[F]||r.$eval(i[F]),d=angular.isDefined(N)?N:d,r.$on("$destroy",function(){R(),E(),m=null})}}}}}]}).directive("uibTooltipTemplateTransclude",["$animate","$sce","$compile","$templateRequest",function(f,r,d,h){return{link:function(e,a,t){var o,n,s,c=e.$eval(t.tooltipTemplateTranscludeScope),l=0,u=function(){n&&(n.remove(),n=null),o&&(o.$destroy(),o=null),s&&(f.leave(s).then(function(){n=null}),n=s,s=null)};e.$watch(r.parseAsResourceUrl(t.uibTooltipTemplateTransclude),function(r){var i=++l;r?(h(r,!0).then(function(e){if(i===l){var t=c.$new(),n=d(e)(t,function(e){u(),f.enter(e,a)});s=n,(o=t).$emit("$includeContentLoaded",r)}},function(){i===l&&(u(),e.$emit("$includeContentError",r))}),e.$emit("$includeContentRequested",r)):u()}),e.$on("$destroy",u)}}}]).directive("uibTooltipClasses",["$uibPosition",function(i){return{restrict:"A",link:function(e,t,n){if(e.placement){var r=i.parsePlacement(e.placement);t.addClass(r[0])}e.popupClass&&t.addClass(e.popupClass),e.animation&&t.addClass(n.tooltipAnimationClass)}}}]).directive("uibTooltipPopup",function(){return{restrict:"A",scope:{content:"@"},templateUrl:"uib/template/tooltip/tooltip-popup.html"}}).directive("uibTooltip",["$uibTooltip",function(e){return e("uibTooltip","tooltip","mouseenter")}]).directive("uibTooltipTemplatePopup",function(){return{restrict:"A",scope:{contentExp:"&",originScope:"&"},templateUrl:"uib/template/tooltip/tooltip-template-popup.html"}}).directive("uibTooltipTemplate",["$uibTooltip",function(e){return e("uibTooltipTemplate","tooltip","mouseenter",{useContentExp:!0})}]).directive("uibTooltipHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&"},templateUrl:"uib/template/tooltip/tooltip-html-popup.html"}}).directive("uibTooltipHtml",["$uibTooltip",function(e){return e("uibTooltipHtml","tooltip","mouseenter",{useContentExp:!0})}]),angular.module("ui.bootstrap.popover",["ui.bootstrap.tooltip"]).directive("uibPopoverTemplatePopup",function(){return{restrict:"A",scope:{uibTitle:"@",contentExp:"&",originScope:"&"},templateUrl:"uib/template/popover/popover-template.html"}}).directive("uibPopoverTemplate",["$uibTooltip",function(e){return e("uibPopoverTemplate","popover","click",{useContentExp:!0})}]).directive("uibPopoverHtmlPopup",function(){return{restrict:"A",scope:{contentExp:"&",uibTitle:"@"},templateUrl:"uib/template/popover/popover-html.html"}}).directive("uibPopoverHtml",["$uibTooltip",function(e){return e("uibPopoverHtml","popover","click",{useContentExp:!0})}]).directive("uibPopoverPopup",function(){return{restrict:"A",scope:{uibTitle:"@",content:"@"},templateUrl:"uib/template/popover/popover.html"}}).directive("uibPopover",["$uibTooltip",function(e){return e("uibPopover","popover","click")}]),angular.module("ui.bootstrap.progressbar",[]).constant("uibProgressConfig",{animate:!0,max:100}).controller("UibProgressController",["$scope","$attrs","uibProgressConfig",function(e,t,n){var r=this,i=angular.isDefined(t.animate)?e.$parent.$eval(t.animate):n.animate;function a(){return angular.isDefined(e.maxParam)?e.maxParam:n.max}this.bars=[],e.max=a(),this.addBar=function(t,e,n){i||e.css({transition:"none"}),this.bars.push(t),t.max=a(),t.title=n&&angular.isDefined(n.title)?n.title:"progressbar",t.$watch("value",function(e){t.recalculatePercentage()}),t.recalculatePercentage=function(){var e=r.bars.reduce(function(e,t){return t.percent=+(100*t.value/t.max).toFixed(2),e+t.percent},0);100<e&&(t.percent-=e-100)},t.$on("$destroy",function(){e=null,r.removeBar(t)})},this.removeBar=function(e){this.bars.splice(this.bars.indexOf(e),1),this.bars.forEach(function(e){e.recalculatePercentage()})},e.$watch("maxParam",function(e){r.bars.forEach(function(e){e.max=a(),e.recalculatePercentage()})})}]).directive("uibProgress",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",require:"uibProgress",scope:{maxParam:"=?max"},templateUrl:"uib/template/progressbar/progress.html"}}).directive("uibBar",function(){return{replace:!0,transclude:!0,require:"^uibProgress",scope:{value:"=",type:"@"},templateUrl:"uib/template/progressbar/bar.html",link:function(e,t,n,r){r.addBar(e,t,n)}}}).directive("uibProgressbar",function(){return{replace:!0,transclude:!0,controller:"UibProgressController",scope:{value:"=",maxParam:"=?max",type:"@"},templateUrl:"uib/template/progressbar/progressbar.html",link:function(e,t,n,r){r.addBar(e,angular.element(t.children()[0]),{title:n.title})}}}),angular.module("ui.bootstrap.rating",[]).constant("uibRatingConfig",{max:5,stateOn:null,stateOff:null,enableReset:!0,titles:["one","two","three","four","five"]}).controller("UibRatingController",["$scope","$attrs","uibRatingConfig",function(r,i,a){var o={$setViewValue:angular.noop},n=this;this.init=function(e){(o=e).$render=this.render,o.$formatters.push(function(e){return angular.isNumber(e)&&e<<0!==e&&(e=Math.round(e)),e}),this.stateOn=angular.isDefined(i.stateOn)?r.$parent.$eval(i.stateOn):a.stateOn,this.stateOff=angular.isDefined(i.stateOff)?r.$parent.$eval(i.stateOff):a.stateOff,this.enableReset=angular.isDefined(i.enableReset)?r.$parent.$eval(i.enableReset):a.enableReset;var t=angular.isDefined(i.titles)?r.$parent.$eval(i.titles):a.titles;this.titles=angular.isArray(t)&&0<t.length?t:a.titles;var n=angular.isDefined(i.ratingStates)?r.$parent.$eval(i.ratingStates):new Array(angular.isDefined(i.max)?r.$parent.$eval(i.max):a.max);r.range=this.buildTemplateObjects(n)},this.buildTemplateObjects=function(e){for(var t=0,n=e.length;t<n;t++)e[t]=angular.extend({index:t},{stateOn:this.stateOn,stateOff:this.stateOff,title:this.getTitle(t)},e[t]);return e},this.getTitle=function(e){return e>=this.titles.length?e+1:this.titles[e]},r.rate=function(e){if(!r.readonly&&0<=e&&e<=r.range.length){var t=n.enableReset&&o.$viewValue===e?0:e;o.$setViewValue(t),o.$render()}},r.enter=function(e){r.readonly||(r.value=e),r.onHover({value:e})},r.reset=function(){r.value=o.$viewValue,r.onLeave()},r.onKeydown=function(e){/(37|38|39|40)/.test(e.which)&&(e.preventDefault(),e.stopPropagation(),r.rate(r.value+(38===e.which||39===e.which?1:-1)))},this.render=function(){r.value=o.$viewValue,r.title=n.getTitle(r.value-1)}}]).directive("uibRating",function(){return{require:["uibRating","ngModel"],restrict:"A",scope:{readonly:"=?readOnly",onHover:"&",onLeave:"&"},controller:"UibRatingController",templateUrl:"uib/template/rating/rating.html",link:function(e,t,n,r){var i=r[0],a=r[1];i.init(a)}}}),angular.module("ui.bootstrap.tabs",[]).controller("UibTabsetController",["$scope",function(e){var a,o,s=this;function c(e){for(var t=0;t<s.tabs.length;t++)if(s.tabs[t].index===e)return t}s.tabs=[],s.select=function(e,t){if(!o){var n=c(a),r=s.tabs[n];if(r){if(r.tab.onDeselect({$event:t,$selectedIndex:e}),t&&t.isDefaultPrevented())return;r.tab.active=!1}var i=s.tabs[e];i?(i.tab.onSelect({$event:t}),i.tab.active=!0,s.active=i.index,a=i.index):!i&&angular.isDefined(a)&&(s.active=null,a=null)}},s.addTab=function(e){if(s.tabs.push({tab:e,index:e.index}),s.tabs.sort(function(e,t){return e.index>t.index?1:e.index<t.index?-1:0}),e.index===s.active||!angular.isDefined(s.active)&&1===s.tabs.length){var t=c(e.index);s.select(t)}},s.removeTab=function(e){for(var t,n=0;n<s.tabs.length;n++)if(s.tabs[n].tab===e){t=n;break}if(s.tabs[t].index===s.active){var r=t===s.tabs.length-1?t-1:t+1%s.tabs.length;s.select(r)}s.tabs.splice(t,1)},e.$watch("tabset.active",function(e){angular.isDefined(e)&&e!==a&&s.select(c(e))}),e.$on("$destroy",function(){o=!0})}]).directive("uibTabset",function(){return{transclude:!0,replace:!0,scope:{},bindToController:{active:"=?",type:"@"},controller:"UibTabsetController",controllerAs:"tabset",templateUrl:function(e,t){return t.templateUrl||"uib/template/tabs/tabset.html"},link:function(e,t,n){e.vertical=!!angular.isDefined(n.vertical)&&e.$parent.$eval(n.vertical),e.justified=!!angular.isDefined(n.justified)&&e.$parent.$eval(n.justified)}}}).directive("uibTab",["$parse",function(a){return{require:"^uibTabset",replace:!0,templateUrl:function(e,t){return t.templateUrl||"uib/template/tabs/tab.html"},transclude:!0,scope:{heading:"@",index:"=?",classes:"@?",onSelect:"&select",onDeselect:"&deselect"},controller:function(){},controllerAs:"tab",link:function(r,e,t,i,n){r.disabled=!1,t.disable&&r.$parent.$watch(a(t.disable),function(e){r.disabled=!!e}),angular.isUndefined(t.index)&&(i.tabs&&i.tabs.length?r.index=Math.max.apply(null,i.tabs.map(function(e){return e.index}))+1:r.index=0),angular.isUndefined(t.classes)&&(r.classes=""),r.select=function(e){if(!r.disabled){for(var t,n=0;n<i.tabs.length;n++)if(i.tabs[n].tab===r){t=n;break}i.select(t,e)}},i.addTab(r),r.$on("$destroy",function(){i.removeTab(r)}),r.$transcludeFn=n}}}]).directive("uibTabHeadingTransclude",function(){return{restrict:"A",require:"^uibTab",link:function(e,t){e.$watch("headingElement",function(e){e&&(t.html(""),t.append(e))})}}}).directive("uibTabContentTransclude",function(){return{restrict:"A",require:"^uibTabset",link:function(e,n,t){var r=e.$eval(t.uibTabContentTransclude).tab;r.$transcludeFn(r.$parent,function(e){angular.forEach(e,function(e){var t;(t=e).tagName&&(t.hasAttribute("uib-tab-heading")||t.hasAttribute("data-uib-tab-heading")||t.hasAttribute("x-uib-tab-heading")||"uib-tab-heading"===t.tagName.toLowerCase()||"data-uib-tab-heading"===t.tagName.toLowerCase()||"x-uib-tab-heading"===t.tagName.toLowerCase()||"uib:tab-heading"===t.tagName.toLowerCase())?r.headingElement=e:n.append(e)})})}}}),angular.module("ui.bootstrap.timepicker",[]).constant("uibTimepickerConfig",{hourStep:1,minuteStep:1,secondStep:1,showMeridian:!0,showSeconds:!1,meridians:null,readonlyInput:!1,mousewheel:!0,arrowkeys:!0,showSpinners:!0,templateUrl:"uib/template/timepicker/timepicker.html"}).controller("UibTimepickerController",["$scope","$element","$attrs","$parse","$log","$locale","uibTimepickerConfig",function(a,e,o,t,n,r,s){var c,l,u,i=new Date,f=[],d={$setViewValue:angular.noop},h=angular.isDefined(o.meridians)?a.$parent.$eval(o.meridians):s.meridians||r.DATETIME_FORMATS.AMPMS,p=!angular.isDefined(o.padHours)||a.$parent.$eval(o.padHours);a.tabindex=angular.isDefined(o.tabindex)?o.tabindex:0,e.removeAttr("tabindex"),this.init=function(e,t){(d=e).$render=this.render,d.$formatters.unshift(function(e){return e?new Date(e):null});var n=t.eq(0),r=t.eq(1),i=t.eq(2);c=n.controller("ngModel"),l=r.controller("ngModel"),u=i.controller("ngModel"),(angular.isDefined(o.mousewheel)?a.$parent.$eval(o.mousewheel):s.mousewheel)&&this.setupMousewheelEvents(n,r,i),(angular.isDefined(o.arrowkeys)?a.$parent.$eval(o.arrowkeys):s.arrowkeys)&&this.setupArrowkeyEvents(n,r,i),a.readonlyInput=angular.isDefined(o.readonlyInput)?a.$parent.$eval(o.readonlyInput):s.readonlyInput,this.setupInputEvents(n,r,i)};var m=s.hourStep;o.hourStep&&f.push(a.$parent.$watch(t(o.hourStep),function(e){m=+e}));var g,_,b=s.minuteStep;o.minuteStep&&f.push(a.$parent.$watch(t(o.minuteStep),function(e){b=+e})),f.push(a.$parent.$watch(t(o.min),function(e){var t=new Date(e);g=isNaN(t)?void 0:t})),f.push(a.$parent.$watch(t(o.max),function(e){var t=new Date(e);_=isNaN(t)?void 0:t}));var v=!1;o.ngDisabled&&f.push(a.$parent.$watch(t(o.ngDisabled),function(e){v=e})),a.noIncrementHours=function(){var e=E(i,60*m);return v||_<e||e<i&&e<g},a.noDecrementHours=function(){var e=E(i,60*-m);return v||e<g||i<e&&_<e},a.noIncrementMinutes=function(){var e=E(i,b);return v||_<e||e<i&&e<g},a.noDecrementMinutes=function(){var e=E(i,-b);return v||e<g||i<e&&_<e},a.noIncrementSeconds=function(){var e=D(i,y);return v||_<e||e<i&&e<g},a.noDecrementSeconds=function(){var e=D(i,-y);return v||e<g||i<e&&_<e},a.noToggleMeridian=function(){return i.getHours()<12?v||E(i,720)>_:v||E(i,-720)<g};var y=s.secondStep;function w(){var e=+a.hours;if((a.showMeridian?0<e&&e<13:0<=e&&e<24)&&""!==a.hours)return a.showMeridian&&(12===e&&(e=0),a.meridian===h[1]&&(e+=12)),e}function C(){var e=+a.minutes;if(0<=e&&e<60&&""!==a.minutes)return e}function A(e,t){return null===e?"":angular.isDefined(e)&&e.toString().length<2&&!t?"0"+e:e.toString()}function S(e){T(),d.$setViewValue(new Date(i)),x(e)}function T(){c&&c.$setValidity("hours",!0),l&&l.$setValidity("minutes",!0),u&&u.$setValidity("seconds",!0),d.$setValidity("time",!0),a.invalidHours=!1,a.invalidMinutes=!1,a.invalidSeconds=!1}function x(e){if(d.$modelValue){var t=i.getHours(),n=i.getMinutes(),r=i.getSeconds();a.showMeridian&&(t=0===t||12===t?12:t%12),a.hours="h"===e?t:A(t,!p),"m"!==e&&(a.minutes=A(n)),a.meridian=i.getHours()<12?h[0]:h[1],"s"!==e&&(a.seconds=A(r)),a.meridian=i.getHours()<12?h[0]:h[1]}else a.hours=null,a.minutes=null,a.seconds=null,a.meridian=h[0]}function k(e){i=D(i,e),S()}function E(e,t){return D(e,60*t)}function D(e,t){var n=new Date(e.getTime()+1e3*t),r=new Date(e);return r.setHours(n.getHours(),n.getMinutes(),n.getSeconds()),r}function I(){return(null===a.hours||""===a.hours)&&(null===a.minutes||""===a.minutes)&&(!a.showSeconds||a.showSeconds&&(null===a.seconds||""===a.seconds))}o.secondStep&&f.push(a.$parent.$watch(t(o.secondStep),function(e){y=+e})),a.showSeconds=s.showSeconds,o.showSeconds&&f.push(a.$parent.$watch(t(o.showSeconds),function(e){a.showSeconds=!!e})),a.showMeridian=s.showMeridian,o.showMeridian&&f.push(a.$parent.$watch(t(o.showMeridian),function(e){if(a.showMeridian=!!e,d.$error.time){var t=w(),n=C();angular.isDefined(t)&&angular.isDefined(n)&&(i.setHours(t),S())}else x()})),this.setupMousewheelEvents=function(e,t,n){var r=function(e){e.originalEvent&&(e=e.originalEvent);var t=e.wheelDelta?e.wheelDelta:-e.deltaY;return e.detail||0<t};e.on("mousewheel wheel",function(e){v||a.$apply(r(e)?a.incrementHours():a.decrementHours()),e.preventDefault()}),t.on("mousewheel wheel",function(e){v||a.$apply(r(e)?a.incrementMinutes():a.decrementMinutes()),e.preventDefault()}),n.on("mousewheel wheel",function(e){v||a.$apply(r(e)?a.incrementSeconds():a.decrementSeconds()),e.preventDefault()})},this.setupArrowkeyEvents=function(e,t,n){e.on("keydown",function(e){v||(38===e.which?(e.preventDefault(),a.incrementHours(),a.$apply()):40===e.which&&(e.preventDefault(),a.decrementHours(),a.$apply()))}),t.on("keydown",function(e){v||(38===e.which?(e.preventDefault(),a.incrementMinutes(),a.$apply()):40===e.which&&(e.preventDefault(),a.decrementMinutes(),a.$apply()))}),n.on("keydown",function(e){v||(38===e.which?(e.preventDefault(),a.incrementSeconds(),a.$apply()):40===e.which&&(e.preventDefault(),a.decrementSeconds(),a.$apply()))})},this.setupInputEvents=function(e,t,n){if(a.readonlyInput)return a.updateHours=angular.noop,a.updateMinutes=angular.noop,void(a.updateSeconds=angular.noop);var r=function(e,t,n){d.$setViewValue(null),d.$setValidity("time",!1),angular.isDefined(e)&&(a.invalidHours=e,c&&c.$setValidity("hours",!1)),angular.isDefined(t)&&(a.invalidMinutes=t,l&&l.$setValidity("minutes",!1)),angular.isDefined(n)&&(a.invalidSeconds=n,u&&u.$setValidity("seconds",!1))};a.updateHours=function(){var e=w(),t=C();d.$setDirty(),angular.isDefined(e)&&angular.isDefined(t)?(i.setHours(e),i.setMinutes(t),i<g||_<i?r(!0):S("h")):r(!0)},e.on("blur",function(e){d.$setTouched(),I()?T():null===a.hours||""===a.hours?r(!0):!a.invalidHours&&a.hours<10&&a.$apply(function(){a.hours=A(a.hours,!p)})}),a.updateMinutes=function(){var e=C(),t=w();d.$setDirty(),angular.isDefined(e)&&angular.isDefined(t)?(i.setHours(t),i.setMinutes(e),i<g||_<i?r(void 0,!0):S("m")):r(void 0,!0)},t.on("blur",function(e){d.$setTouched(),I()?T():null===a.minutes?r(void 0,!0):!a.invalidMinutes&&a.minutes<10&&a.$apply(function(){a.minutes=A(a.minutes)})}),a.updateSeconds=function(){var e,t=0<=(e=+a.seconds)&&e<60?e:void 0;d.$setDirty(),angular.isDefined(t)?(i.setSeconds(t),S("s")):r(void 0,void 0,!0)},n.on("blur",function(e){I()?T():!a.invalidSeconds&&a.seconds<10&&a.$apply(function(){a.seconds=A(a.seconds)})})},this.render=function(){var e=d.$viewValue;isNaN(e)?(d.$setValidity("time",!1),n.error('Timepicker directive: "ng-model" value must be a Date object, a number of milliseconds since 01.01.1970 or a string representing an RFC2822 or ISO 8601 date.')):(e&&(i=e),i<g||_<i?(d.$setValidity("time",!1),a.invalidHours=!0,a.invalidMinutes=!0):T(),x())},a.showSpinners=angular.isDefined(o.showSpinners)?a.$parent.$eval(o.showSpinners):s.showSpinners,a.incrementHours=function(){a.noIncrementHours()||k(60*m*60)},a.decrementHours=function(){a.noDecrementHours()||k(60*-m*60)},a.incrementMinutes=function(){a.noIncrementMinutes()||k(60*b)},a.decrementMinutes=function(){a.noDecrementMinutes()||k(60*-b)},a.incrementSeconds=function(){a.noIncrementSeconds()||k(y)},a.decrementSeconds=function(){a.noDecrementSeconds()||k(-y)},a.toggleMeridian=function(){var e=C(),t=w();a.noToggleMeridian()||(angular.isDefined(e)&&angular.isDefined(t)?k(720*(i.getHours()<12?60:-60)):a.meridian=a.meridian===h[0]?h[1]:h[0])},a.blur=function(){d.$setTouched()},a.$on("$destroy",function(){for(;f.length;)f.shift()()})}]).directive("uibTimepicker",["uibTimepickerConfig",function(n){return{require:["uibTimepicker","?^ngModel"],restrict:"A",controller:"UibTimepickerController",controllerAs:"timepicker",scope:{},templateUrl:function(e,t){return t.templateUrl||n.templateUrl},link:function(e,t,n,r){var i=r[0],a=r[1];a&&i.init(a,t.find("input"))}}}]),angular.module("ui.bootstrap.typeahead",["ui.bootstrap.debounce","ui.bootstrap.position"]).factory("uibTypeaheadParser",["$parse",function(n){var r=/^\s*([\s\S]+?)(?:\s+as\s+([\s\S]+?))?\s+for\s+(?:([\$\w][\$\w\d]*))\s+in\s+([\s\S]+?)$/;return{parse:function(e){var t=e.match(r);if(!t)throw new Error('Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_" but got "'+e+'".');return{itemName:t[3],source:n(t[4]),viewMapper:n(t[2]||t[1]),modelMapper:n(t[1])}}}}]).controller("UibTypeaheadController",["$scope","$element","$attrs","$compile","$parse","$q","$timeout","$document","$window","$rootScope","$$debounce","$uibPosition","uibTypeaheadParser",function(l,u,s,e,t,n,c,r,i,a,f,o,d){var h,p,m=[9,13,27,38,40],g=l.$eval(s.typeaheadMinLength);g||0===g||(g=1),l.$watch(s.typeaheadMinLength,function(e){g=e||0===e?e:1});var _=l.$eval(s.typeaheadWaitMs)||0,b=!1!==l.$eval(s.typeaheadEditable);l.$watch(s.typeaheadEditable,function(e){b=!1!==e});var v,y,w=t(s.typeaheadLoading).assign||angular.noop,C=s.typeaheadShouldSelect?t(s.typeaheadShouldSelect):function(e,t){var n=t.$event;return 13===n.which||9===n.which},A=t(s.typeaheadOnSelect),S=!!angular.isDefined(s.typeaheadSelectOnBlur)&&l.$eval(s.typeaheadSelectOnBlur),T=t(s.typeaheadNoResults).assign||angular.noop,x=s.typeaheadInputFormatter?t(s.typeaheadInputFormatter):void 0,k=!!s.typeaheadAppendToBody&&l.$eval(s.typeaheadAppendToBody),E=s.typeaheadAppendTo?l.$eval(s.typeaheadAppendTo):null,D=!1!==l.$eval(s.typeaheadFocusFirst),I=!!s.typeaheadSelectOnExact&&l.$eval(s.typeaheadSelectOnExact),P=t(s.typeaheadIsOpen).assign||angular.noop,M=l.$eval(s.typeaheadShowHint)||!1,$=t(s.ngModel),O=t(s.ngModel+"($$$p)"),R=d.parse(s.uibTypeahead),N=l.$new(),L=l.$on("$destroy",function(){N.$destroy()});N.$on("$destroy",L);var F,G,j="typeahead-"+N.$id+"-"+Math.floor(1e4*Math.random());u.attr({"aria-autocomplete":"list","aria-expanded":!1,"aria-owns":j}),M&&((F=angular.element("<div></div>")).css("position","relative"),u.after(F),(G=u.clone()).attr("placeholder",""),G.attr("tabindex","-1"),G.val(""),G.css({position:"absolute",top:"0px",left:"0px","border-color":"transparent","box-shadow":"none",opacity:1,background:"none 0% 0% / auto repeat scroll padding-box border-box rgb(255, 255, 255)",color:"#999"}),u.css({position:"relative","vertical-align":"top","background-color":"transparent"}),G.attr("id")&&G.removeAttr("id"),F.append(G),G.after(u));var B=angular.element("<div uib-typeahead-popup></div>");B.attr({id:j,matches:"matches",active:"activeIdx",select:"select(activeIdx, evt)","move-in-progress":"moveInProgress",query:"query",position:"position","assign-is-open":"assignIsOpen(isOpen)",debounce:"debounceUpdate"}),angular.isDefined(s.typeaheadTemplateUrl)&&B.attr("template-url",s.typeaheadTemplateUrl),angular.isDefined(s.typeaheadPopupTemplateUrl)&&B.attr("popup-template-url",s.typeaheadPopupTemplateUrl);var U=function(){N.matches=[],N.activeIdx=-1,u.attr("aria-expanded",!1),M&&G.val("")},H=function(e){return j+"-option-"+e};N.$watch("activeIdx",function(e){e<0?u.removeAttr("aria-activedescendant"):u.attr("aria-activedescendant",H(e))});var W=function(o,s){var c={$viewValue:o};w(l,!0),T(l,!1),n.when(R.source(l,c)).then(function(e){var t,n,r=o===h.$viewValue;if(r&&v)if(e&&0<e.length){N.activeIdx=D?0:-1,T(l,!1);for(var i=N.matches.length=0;i<e.length;i++)c[R.itemName]=e[i],N.matches.push({id:H(i),label:R.viewMapper(N,c),model:e[i]});if(N.query=o,Y(),u.attr("aria-expanded",!0),I&&1===N.matches.length&&(t=o,n=0,N.matches.length>n&&t&&t.toUpperCase()===N.matches[n].label.toUpperCase())&&(angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?f(function(){N.select(0,s)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate.default):N.select(0,s)),M){var a=N.matches[0].label;angular.isString(o)&&0<o.length&&a.slice(0,o.length).toUpperCase()===o.toUpperCase()?G.val(o+a.slice(o.length)):G.val("")}}else U(),T(l,!0);r&&w(l,!1)},function(){U(),w(l,!1),T(l,!0)})};k&&(angular.element(i).on("resize",V),r.find("body").on("scroll",V));var q,z=f(function(){N.matches.length&&Y(),N.moveInProgress=!1},200);function V(){N.moveInProgress||(N.moveInProgress=!0,N.$digest()),z()}function Y(){N.position=k?o.offset(u):o.position(u),N.position.top+=u.prop("offsetHeight")}N.moveInProgress=!1,N.query=void 0;var K=function(){q&&c.cancel(q)};U(),N.assignIsOpen=function(e){P(l,e)},N.select=function(e,t){var n,r,i,a,o={};y=!0,o[R.itemName]=r=N.matches[e].model,n=R.modelMapper(l,o),i=l,a=n,angular.isFunction($(l))&&p.getOption("getterSetter")?O(i,{$$$p:a}):$.assign(i,a),h.$setValidity("editable",!0),h.$setValidity("parse",!0),A(l,{$item:r,$model:n,$label:R.viewMapper(l,o),$event:t}),U(),!1!==N.$eval(s.typeaheadFocusOnSelect)&&c(function(){u[0].focus()},0,!1)},u.on("keydown",function(e){if(0!==N.matches.length&&-1!==m.indexOf(e.which)){var t,n=C(l,{$event:e});if(-1===N.activeIdx&&n||9===e.which&&e.shiftKey)return U(),void N.$digest();switch(e.preventDefault(),e.which){case 27:e.stopPropagation(),U(),l.$digest();break;case 38:N.activeIdx=(0<N.activeIdx?N.activeIdx:N.matches.length)-1,N.$digest(),(t=B[0].querySelectorAll(".uib-typeahead-match")[N.activeIdx]).parentNode.scrollTop=t.offsetTop;break;case 40:N.activeIdx=(N.activeIdx+1)%N.matches.length,N.$digest(),(t=B[0].querySelectorAll(".uib-typeahead-match")[N.activeIdx]).parentNode.scrollTop=t.offsetTop;break;default:n&&N.$apply(function(){angular.isNumber(N.debounceUpdate)||angular.isObject(N.debounceUpdate)?f(function(){N.select(N.activeIdx,e)},angular.isNumber(N.debounceUpdate)?N.debounceUpdate:N.debounceUpdate.default):N.select(N.activeIdx,e)})}}}),u.on("focus",function(e){v=!0,0!==g||h.$viewValue||c(function(){W(h.$viewValue,e)},0)}),u.on("blur",function(e){S&&N.matches.length&&-1!==N.activeIdx&&!y&&(y=!0,N.$apply(function(){angular.isObject(N.debounceUpdate)&&angular.isNumber(N.debounceUpdate.blur)?f(function(){N.select(N.activeIdx,e)},N.debounceUpdate.blur):N.select(N.activeIdx,e)})),!b&&h.$error.editable&&(h.$setViewValue(),N.$apply(function(){h.$setValidity("editable",!0),h.$setValidity("parse",!0)}),u.val("")),y=v=!1});var Q=function(e){u[0]!==e.target&&3!==e.which&&0!==N.matches.length&&(U(),a.$$phase||l.$digest())};r.on("click",Q),l.$on("$destroy",function(){r.off("click",Q),(k||E)&&X.remove(),k&&(angular.element(i).off("resize",V),r.find("body").off("scroll",V)),B.remove(),M&&F.remove()});var X=e(B)(N);k?r.find("body").append(X):E?angular.element(E).eq(0).append(X):u.after(X),this.init=function(e){p=function(e){var t;angular.version.minor<6?(t=e.$options||{}).getOption=function(e){return t[e]}:t=e.$options;return t}(h=e),N.debounceUpdate=t(p.getOption("debounce"))(l),h.$parsers.unshift(function(e){var t;return v=!0,0===g||e&&e.length>=g?0<_?(K(),t=e,q=c(function(){W(t)},_)):W(e):(w(l,!1),K(),U()),b?e:e?void h.$setValidity("editable",!1):(h.$setValidity("editable",!0),null)}),h.$formatters.push(function(e){var t,n={};return b||h.$setValidity("editable",!0),x?(n.$model=e,x(l,n)):(n[R.itemName]=e,t=R.viewMapper(l,n),n[R.itemName]=void 0,t!==R.viewMapper(l,n)?t:e)})}}]).directive("uibTypeahead",function(){return{controller:"UibTypeaheadController",require:["ngModel","uibTypeahead"],link:function(e,t,n,r){r[1].init(r[0])}}}).directive("uibTypeaheadPopup",["$$debounce",function(i){return{scope:{matches:"=",query:"=",active:"=",position:"&",moveInProgress:"=",select:"&",assignIsOpen:"&",debounce:"&"},replace:!0,templateUrl:function(e,t){return t.popupTemplateUrl||"uib/template/typeahead/typeahead-popup.html"},link:function(r,e,t){r.templateUrl=t.templateUrl,r.isOpen=function(){var e=0<r.matches.length;return r.assignIsOpen({isOpen:e}),e},r.isActive=function(e){return r.active===e},r.selectActive=function(e){r.active=e},r.selectMatch=function(e,t){var n=r.debounce();angular.isNumber(n)||angular.isObject(n)?i(function(){r.select({activeIdx:e,evt:t})},angular.isNumber(n)?n:n.default):r.select({activeIdx:e,evt:t})}}}}]).directive("uibTypeaheadMatch",["$templateRequest","$compile","$parse",function(i,a,o){return{scope:{index:"=",match:"=",query:"="},link:function(n,r,e){var t=o(e.templateUrl)(n.$parent)||"uib/template/typeahead/typeahead-match.html";i(t).then(function(e){var t=angular.element(e.trim());r.replaceWith(t),a(t)(n)})}}}]).filter("uibTypeaheadHighlight",["$sce","$injector","$log",function(n,e,r){var i;return i=e.has("$sanitize"),function(e,t){return!i&&/<.*>/g.test(e)&&r.warn("Unsafe use of typeahead please use ngSanitize"),e=t?(""+e).replace(new RegExp(t.replace(/([.?*+^$[\]\\(){}|-])/g,"\\$1"),"gi"),"<strong>$&</strong>"):e,i||(e=n.trustAsHtml(e)),e}}]),angular.module("uib/template/accordion/accordion-group.html",[]).run(["$templateCache",function(e){e.put("uib/template/accordion/accordion-group.html",'<div role="tab" id="{{::headingId}}" aria-selected="{{isOpen}}" class="panel-heading" ng-keypress="toggleOpen($event)">\n  <h4 class="panel-title">\n    <a role="button" data-toggle="collapse" href aria-expanded="{{isOpen}}" aria-controls="{{::panelId}}" tabindex="0" class="accordion-toggle" ng-click="toggleOpen()" uib-accordion-transclude="heading" ng-disabled="isDisabled" uib-tabindex-toggle><span uib-accordion-header ng-class="{\'text-muted\': isDisabled}">{{heading}}</span></a>\n  </h4>\n</div>\n<div id="{{::panelId}}" aria-labelledby="{{::headingId}}" aria-hidden="{{!isOpen}}" role="tabpanel" class="panel-collapse collapse" uib-collapse="!isOpen">\n  <div class="panel-body" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/accordion/accordion.html",[]).run(["$templateCache",function(e){e.put("uib/template/accordion/accordion.html",'<div role="tablist" class="panel-group" ng-transclude></div>')}]),angular.module("uib/template/alert/alert.html",[]).run(["$templateCache",function(e){e.put("uib/template/alert/alert.html",'<button ng-show="closeable" type="button" class="close" ng-click="close({$event: $event})">\n  <span aria-hidden="true">&times;</span>\n  <span class="sr-only">Close</span>\n</button>\n<div ng-transclude></div>\n')}]),angular.module("uib/template/carousel/carousel.html",[]).run(["$templateCache",function(e){e.put("uib/template/carousel/carousel.html",'<div class="carousel-inner" ng-transclude></div>\n<a role="button" href class="left carousel-control" ng-click="prev()" ng-class="{ disabled: isPrevDisabled() }" ng-show="slides.length > 1">\n  <span aria-hidden="true" class="glyphicon glyphicon-chevron-left"></span>\n  <span class="sr-only">previous</span>\n</a>\n<a role="button" href class="right carousel-control" ng-click="next()" ng-class="{ disabled: isNextDisabled() }" ng-show="slides.length > 1">\n  <span aria-hidden="true" class="glyphicon glyphicon-chevron-right"></span>\n  <span class="sr-only">next</span>\n</a>\n<ol class="carousel-indicators" ng-show="slides.length > 1">\n  <li ng-repeat="slide in slides | orderBy:indexOfSlide track by $index" ng-class="{ active: isActive(slide) }" ng-click="select(slide)">\n    <span class="sr-only">slide {{ $index + 1 }} of {{ slides.length }}<span ng-if="isActive(slide)">, currently active</span></span>\n  </li>\n</ol>\n')}]),angular.module("uib/template/carousel/slide.html",[]).run(["$templateCache",function(e){e.put("uib/template/carousel/slide.html",'<div class="text-center" ng-transclude></div>\n')}]),angular.module("uib/template/datepicker/datepicker.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepicker/datepicker.html",'<div ng-switch="datepickerMode">\n  <div uib-daypicker ng-switch-when="day" tabindex="0" class="uib-daypicker"></div>\n  <div uib-monthpicker ng-switch-when="month" tabindex="0" class="uib-monthpicker"></div>\n  <div uib-yearpicker ng-switch-when="year" tabindex="0" class="uib-yearpicker"></div>\n</div>\n')}]),angular.module("uib/template/datepicker/day.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepicker/day.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n      <th colspan="{{::5 + showWeeks}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></button></th>\n    </tr>\n    <tr>\n      <th ng-if="showWeeks" class="text-center"></th>\n      <th ng-repeat="label in ::labels track by $index" class="text-center"><small aria-label="{{::label.full}}">{{::label.abbr}}</small></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr class="uib-weeks" ng-repeat="row in rows track by $index" role="row">\n      <td ng-if="showWeeks" class="text-center h6"><em>{{ weekNumbers[$index] }}</em></td>\n      <td ng-repeat="dt in row" class="uib-day text-center" role="gridcell"\n        id="{{::dt.uid}}"\n        ng-class="::dt.customClass">\n        <button type="button" class="btn btn-default btn-sm"\n          uib-is-class="\n            \'btn-info\' for selectedDt,\n            \'active\' for activeDt\n            on dt"\n          ng-click="select(dt.date)"\n          ng-disabled="::dt.disabled"\n          tabindex="-1"><span ng-class="::{\'text-muted\': dt.secondary, \'text-info\': dt.current}">{{::dt.label}}</span></button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/month.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepicker/month.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n      <th colspan="{{::yearHeaderColspan}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></i></button></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr class="uib-months" ng-repeat="row in rows track by $index" role="row">\n      <td ng-repeat="dt in row" class="uib-month text-center" role="gridcell"\n        id="{{::dt.uid}}"\n        ng-class="::dt.customClass">\n        <button type="button" class="btn btn-default"\n          uib-is-class="\n            \'btn-info\' for selectedDt,\n            \'active\' for activeDt\n            on dt"\n          ng-click="select(dt.date)"\n          ng-disabled="::dt.disabled"\n          tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("uib/template/datepicker/year.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepicker/year.html",'<table role="grid" aria-labelledby="{{::uniqueId}}-title" aria-activedescendant="{{activeDateId}}">\n  <thead>\n    <tr>\n      <th><button type="button" class="btn btn-default btn-sm pull-left uib-left" ng-click="move(-1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-left"></i><span class="sr-only">previous</span></button></th>\n      <th colspan="{{::columns - 2}}"><button id="{{::uniqueId}}-title" role="heading" aria-live="assertive" aria-atomic="true" type="button" class="btn btn-default btn-sm uib-title" ng-click="toggleMode()" ng-disabled="datepickerMode === maxMode" tabindex="-1"><strong>{{title}}</strong></button></th>\n      <th><button type="button" class="btn btn-default btn-sm pull-right uib-right" ng-click="move(1)" tabindex="-1"><i aria-hidden="true" class="glyphicon glyphicon-chevron-right"></i><span class="sr-only">next</span></button></th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr class="uib-years" ng-repeat="row in rows track by $index" role="row">\n      <td ng-repeat="dt in row" class="uib-year text-center" role="gridcell"\n        id="{{::dt.uid}}"\n        ng-class="::dt.customClass">\n        <button type="button" class="btn btn-default"\n          uib-is-class="\n            \'btn-info\' for selectedDt,\n            \'active\' for activeDt\n            on dt"\n          ng-click="select(dt.date)"\n          ng-disabled="::dt.disabled"\n          tabindex="-1"><span ng-class="::{\'text-info\': dt.current}">{{::dt.label}}</span></button>\n      </td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("uib/template/datepickerPopup/popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/datepickerPopup/popup.html",'<ul role="presentation" class="uib-datepicker-popup dropdown-menu uib-position-measure" dropdown-nested ng-if="isOpen" ng-keydown="keydown($event)" ng-click="$event.stopPropagation()">\n  <li ng-transclude></li>\n  <li ng-if="showButtonBar" class="uib-button-bar">\n    <span class="btn-group pull-left">\n      <button type="button" class="btn btn-sm btn-info uib-datepicker-current" ng-click="select(\'today\', $event)" ng-disabled="isDisabled(\'today\')">{{ getText(\'current\') }}</button>\n      <button type="button" class="btn btn-sm btn-danger uib-clear" ng-click="select(null, $event)">{{ getText(\'clear\') }}</button>\n    </span>\n    <button type="button" class="btn btn-sm btn-success pull-right uib-close" ng-click="close($event)">{{ getText(\'close\') }}</button>\n  </li>\n</ul>\n')}]),angular.module("uib/template/modal/window.html",[]).run(["$templateCache",function(e){e.put("uib/template/modal/window.html","<div class=\"modal-dialog {{size ? 'modal-' + size : ''}}\"><div class=\"modal-content\" uib-modal-transclude></div></div>\n")}]),angular.module("uib/template/pager/pager.html",[]).run(["$templateCache",function(e){e.put("uib/template/pager/pager.html",'<li ng-class="{disabled: noPrevious()||ngDisabled, previous: align}"><a href ng-click="selectPage(page - 1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'previous\')}}</a></li>\n<li ng-class="{disabled: noNext()||ngDisabled, next: align}"><a href ng-click="selectPage(page + 1, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'next\')}}</a></li>\n')}]),angular.module("uib/template/pagination/pagination.html",[]).run(["$templateCache",function(e){e.put("uib/template/pagination/pagination.html",'<li role="menuitem" ng-if="::boundaryLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-first"><a href ng-click="selectPage(1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'first\')}}</a></li>\n<li role="menuitem" ng-if="::directionLinks" ng-class="{disabled: noPrevious()||ngDisabled}" class="pagination-prev"><a href ng-click="selectPage(page - 1, $event)" ng-disabled="noPrevious()||ngDisabled" uib-tabindex-toggle>{{::getText(\'previous\')}}</a></li>\n<li role="menuitem" ng-repeat="page in pages track by $index" ng-class="{active: page.active,disabled: ngDisabled&&!page.active}" class="pagination-page"><a href ng-click="selectPage(page.number, $event)" ng-disabled="ngDisabled&&!page.active" uib-tabindex-toggle>{{page.text}}</a></li>\n<li role="menuitem" ng-if="::directionLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-next"><a href ng-click="selectPage(page + 1, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'next\')}}</a></li>\n<li role="menuitem" ng-if="::boundaryLinks" ng-class="{disabled: noNext()||ngDisabled}" class="pagination-last"><a href ng-click="selectPage(totalPages, $event)" ng-disabled="noNext()||ngDisabled" uib-tabindex-toggle>{{::getText(\'last\')}}</a></li>\n')}]),angular.module("uib/template/tooltip/tooltip-html-popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/tooltip/tooltip-html-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner" ng-bind-html="contentExp()"></div>\n')}]),angular.module("uib/template/tooltip/tooltip-popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/tooltip/tooltip-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner" ng-bind="content"></div>\n')}]),angular.module("uib/template/tooltip/tooltip-template-popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/tooltip/tooltip-template-popup.html",'<div class="tooltip-arrow"></div>\n<div class="tooltip-inner"\n  uib-tooltip-template-transclude="contentExp()"\n  tooltip-template-transclude-scope="originScope()"></div>\n')}]),angular.module("uib/template/popover/popover-html.html",[]).run(["$templateCache",function(e){e.put("uib/template/popover/popover-html.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n    <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n    <div class="popover-content" ng-bind-html="contentExp()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover-template.html",[]).run(["$templateCache",function(e){e.put("uib/template/popover/popover-template.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n    <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n    <div class="popover-content"\n      uib-tooltip-template-transclude="contentExp()"\n      tooltip-template-transclude-scope="originScope()"></div>\n</div>\n')}]),angular.module("uib/template/popover/popover.html",[]).run(["$templateCache",function(e){e.put("uib/template/popover/popover.html",'<div class="arrow"></div>\n\n<div class="popover-inner">\n    <h3 class="popover-title" ng-bind="uibTitle" ng-if="uibTitle"></h3>\n    <div class="popover-content" ng-bind="content"></div>\n</div>\n')}]),angular.module("uib/template/progressbar/bar.html",[]).run(["$templateCache",function(e){e.put("uib/template/progressbar/bar.html",'<div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n')}]),angular.module("uib/template/progressbar/progress.html",[]).run(["$templateCache",function(e){e.put("uib/template/progressbar/progress.html",'<div class="progress" ng-transclude aria-labelledby="{{::title}}"></div>')}]),angular.module("uib/template/progressbar/progressbar.html",[]).run(["$templateCache",function(e){e.put("uib/template/progressbar/progressbar.html",'<div class="progress">\n  <div class="progress-bar" ng-class="type && \'progress-bar-\' + type" role="progressbar" aria-valuenow="{{value}}" aria-valuemin="0" aria-valuemax="{{max}}" ng-style="{width: (percent < 100 ? percent : 100) + \'%\'}" aria-valuetext="{{percent | number:0}}%" aria-labelledby="{{::title}}" ng-transclude></div>\n</div>\n')}]),angular.module("uib/template/rating/rating.html",[]).run(["$templateCache",function(e){e.put("uib/template/rating/rating.html",'<span ng-mouseleave="reset()" ng-keydown="onKeydown($event)" tabindex="0" role="slider" aria-valuemin="0" aria-valuemax="{{range.length}}" aria-valuenow="{{value}}" aria-valuetext="{{title}}">\n    <span ng-repeat-start="r in range track by $index" class="sr-only">({{ $index < value ? \'*\' : \' \' }})</span>\n    <i ng-repeat-end ng-mouseenter="enter($index + 1)" ng-click="rate($index + 1)" class="glyphicon" ng-class="$index < value && (r.stateOn || \'glyphicon-star\') || (r.stateOff || \'glyphicon-star-empty\')" ng-attr-title="{{r.title}}"></i>\n</span>\n')}]),angular.module("uib/template/tabs/tab.html",[]).run(["$templateCache",function(e){e.put("uib/template/tabs/tab.html",'<li ng-class="[{active: active, disabled: disabled}, classes]" class="uib-tab nav-item">\n  <a href ng-click="select($event)" class="nav-link" uib-tab-heading-transclude>{{heading}}</a>\n</li>\n')}]),angular.module("uib/template/tabs/tabset.html",[]).run(["$templateCache",function(e){e.put("uib/template/tabs/tabset.html",'<div>\n  <ul class="nav nav-{{tabset.type || \'tabs\'}}" ng-class="{\'nav-stacked\': vertical, \'nav-justified\': justified}" ng-transclude></ul>\n  <div class="tab-content">\n    <div class="tab-pane"\n         ng-repeat="tab in tabset.tabs"\n         ng-class="{active: tabset.active === tab.index}"\n         uib-tab-content-transclude="tab">\n    </div>\n  </div>\n</div>\n')}]),angular.module("uib/template/timepicker/timepicker.html",[]).run(["$templateCache",function(e){e.put("uib/template/timepicker/timepicker.html",'<table class="uib-timepicker">\n  <tbody>\n    <tr class="text-center" ng-show="::showSpinners">\n      <td class="uib-increment hours"><a ng-click="incrementHours()" ng-class="{disabled: noIncrementHours()}" class="btn btn-link" ng-disabled="noIncrementHours()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n      <td>&nbsp;</td>\n      <td class="uib-increment minutes"><a ng-click="incrementMinutes()" ng-class="{disabled: noIncrementMinutes()}" class="btn btn-link" ng-disabled="noIncrementMinutes()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n      <td ng-show="showSeconds">&nbsp;</td>\n      <td ng-show="showSeconds" class="uib-increment seconds"><a ng-click="incrementSeconds()" ng-class="{disabled: noIncrementSeconds()}" class="btn btn-link" ng-disabled="noIncrementSeconds()" tabindex="-1"><span class="glyphicon glyphicon-chevron-up"></span></a></td>\n      <td ng-show="showMeridian"></td>\n    </tr>\n    <tr>\n      <td class="form-group uib-time hours" ng-class="{\'has-error\': invalidHours}">\n        <input type="text" placeholder="HH" ng-model="hours" ng-change="updateHours()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementHours()" ng-blur="blur()">\n      </td>\n      <td class="uib-separator">:</td>\n      <td class="form-group uib-time minutes" ng-class="{\'has-error\': invalidMinutes}">\n        <input type="text" placeholder="MM" ng-model="minutes" ng-change="updateMinutes()" class="form-control text-center" ng-readonly="::readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementMinutes()" ng-blur="blur()">\n      </td>\n      <td ng-show="showSeconds" class="uib-separator">:</td>\n      <td class="form-group uib-time seconds" ng-class="{\'has-error\': invalidSeconds}" ng-show="showSeconds">\n        <input type="text" placeholder="SS" ng-model="seconds" ng-change="updateSeconds()" class="form-control text-center" ng-readonly="readonlyInput" maxlength="2" tabindex="{{::tabindex}}" ng-disabled="noIncrementSeconds()" ng-blur="blur()">\n      </td>\n      <td ng-show="showMeridian" class="uib-time am-pm"><button type="button" ng-class="{disabled: noToggleMeridian()}" class="btn btn-default text-center" ng-click="toggleMeridian()" ng-disabled="noToggleMeridian()" tabindex="{{::tabindex}}">{{meridian}}</button></td>\n    </tr>\n    <tr class="text-center" ng-show="::showSpinners">\n      <td class="uib-decrement hours"><a ng-click="decrementHours()" ng-class="{disabled: noDecrementHours()}" class="btn btn-link" ng-disabled="noDecrementHours()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n      <td>&nbsp;</td>\n      <td class="uib-decrement minutes"><a ng-click="decrementMinutes()" ng-class="{disabled: noDecrementMinutes()}" class="btn btn-link" ng-disabled="noDecrementMinutes()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n      <td ng-show="showSeconds">&nbsp;</td>\n      <td ng-show="showSeconds" class="uib-decrement seconds"><a ng-click="decrementSeconds()" ng-class="{disabled: noDecrementSeconds()}" class="btn btn-link" ng-disabled="noDecrementSeconds()" tabindex="-1"><span class="glyphicon glyphicon-chevron-down"></span></a></td>\n      <td ng-show="showMeridian"></td>\n    </tr>\n  </tbody>\n</table>\n')}]),angular.module("uib/template/typeahead/typeahead-match.html",[]).run(["$templateCache",function(e){e.put("uib/template/typeahead/typeahead-match.html",'<a href\n   tabindex="-1"\n   ng-bind-html="match.label | uibTypeaheadHighlight:query"\n   ng-attr-title="{{match.label}}"></a>\n')}]),angular.module("uib/template/typeahead/typeahead-popup.html",[]).run(["$templateCache",function(e){e.put("uib/template/typeahead/typeahead-popup.html",'<ul class="dropdown-menu" ng-show="isOpen() && !moveInProgress" ng-style="{top: position().top+\'px\', left: position().left+\'px\'}" role="listbox" aria-hidden="{{!isOpen()}}">\n    <li class="uib-typeahead-match" ng-repeat="match in matches track by $index" ng-class="{active: isActive($index) }" ng-mouseenter="selectActive($index)" ng-click="selectMatch($index, $event)" role="option" id="{{::match.id}}">\n        <div uib-typeahead-match index="$index" match="match" query="query" template-url="templateUrl"></div>\n    </li>\n</ul>\n')}]),angular.module("ui.bootstrap.carousel").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibCarouselCss&&angular.element(document).find("head").prepend('<style type="text/css">.ng-animate.item:not(.left):not(.right){-webkit-transition:0s ease-in-out left;transition:0s ease-in-out left}</style>'),angular.$$uibCarouselCss=!0}),angular.module("ui.bootstrap.datepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker .uib-title{width:100%;}.uib-day button,.uib-month button,.uib-year button{min-width:100%;}.uib-left,.uib-right{width:100%}</style>'),angular.$$uibDatepickerCss=!0}),angular.module("ui.bootstrap.position").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibPositionCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-position-measure{display:block !important;visibility:hidden !important;position:absolute !important;top:-9999px !important;left:-9999px !important;}.uib-position-scrollbar-measure{position:absolute !important;top:-9999px !important;width:50px !important;height:50px !important;overflow:scroll !important;}.uib-position-body-scrollbar-measure{overflow:scroll !important;}</style>'),angular.$$uibPositionCss=!0}),angular.module("ui.bootstrap.datepickerPopup").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibDatepickerpopupCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-datepicker-popup.dropdown-menu{display:block;float:none;margin:0;}.uib-button-bar{padding:10px 9px 2px;}</style>'),angular.$$uibDatepickerpopupCss=!0}),angular.module("ui.bootstrap.tooltip").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTooltipCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-tooltip-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-html-popup].tooltip.right-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.top-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-left > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.bottom-right > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.left-bottom > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-top > .tooltip-arrow,[uib-tooltip-template-popup].tooltip.right-bottom > .tooltip-arrow,[uib-popover-popup].popover.top-left > .arrow,[uib-popover-popup].popover.top-right > .arrow,[uib-popover-popup].popover.bottom-left > .arrow,[uib-popover-popup].popover.bottom-right > .arrow,[uib-popover-popup].popover.left-top > .arrow,[uib-popover-popup].popover.left-bottom > .arrow,[uib-popover-popup].popover.right-top > .arrow,[uib-popover-popup].popover.right-bottom > .arrow,[uib-popover-html-popup].popover.top-left > .arrow,[uib-popover-html-popup].popover.top-right > .arrow,[uib-popover-html-popup].popover.bottom-left > .arrow,[uib-popover-html-popup].popover.bottom-right > .arrow,[uib-popover-html-popup].popover.left-top > .arrow,[uib-popover-html-popup].popover.left-bottom > .arrow,[uib-popover-html-popup].popover.right-top > .arrow,[uib-popover-html-popup].popover.right-bottom > .arrow,[uib-popover-template-popup].popover.top-left > .arrow,[uib-popover-template-popup].popover.top-right > .arrow,[uib-popover-template-popup].popover.bottom-left > .arrow,[uib-popover-template-popup].popover.bottom-right > .arrow,[uib-popover-template-popup].popover.left-top > .arrow,[uib-popover-template-popup].popover.left-bottom > .arrow,[uib-popover-template-popup].popover.right-top > .arrow,[uib-popover-template-popup].popover.right-bottom > .arrow{top:auto;bottom:auto;left:auto;right:auto;margin:0;}[uib-popover-popup].popover,[uib-popover-html-popup].popover,[uib-popover-template-popup].popover{display:block !important;}</style>'),angular.$$uibTooltipCss=!0}),angular.module("ui.bootstrap.timepicker").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTimepickerCss&&angular.element(document).find("head").prepend('<style type="text/css">.uib-time input{width:50px;}</style>'),angular.$$uibTimepickerCss=!0}),angular.module("ui.bootstrap.typeahead").run(function(){!angular.$$csp().noInlineStyle&&!angular.$$uibTypeaheadCss&&angular.element(document).find("head").prepend('<style type="text/css">[uib-typeahead-popup].dropdown-menu{display:block;}</style>'),angular.$$uibTypeaheadCss=!0}),angular.module("mwFormUtils",["mwFormUtils.responseUtils"]),angular.module("mwFormUtils.responseUtils",[]).factory("mwFormResponseUtils",function(){var f={},n=["text","textarea","number","date","time","email","range","url","star"];return f.$getObjectByIdMap=function(e,n){var r={};return e&&e.forEach(function(e){var t=e;n&&(t=n(e)),r[e.id]=t}),r},f.$getOfferedAnswerByIdMap=function(e){return f.$getObjectByIdMap(e.offeredAnswers,function(e){return{id:e.id,value:e.value}})},f.$extractResponseForQuestionWithOfferedAnswers=function(e,t){var n=f.$getOfferedAnswerByIdMap(e),r={};return t.selectedAnswers?(r.selectedAnswers=[],t.selectedAnswers.forEach(function(e){r.selectedAnswers.push(n[e])})):t.selectedAnswer&&(r.selectedAnswer=n[t.selectedAnswer]),t.other&&(r.other=t.other),r},f.$extractResponseForPriorityQuestion=function(e,t){var n=[];if(!t.priorityList)return n;var r=f.$getObjectByIdMap(e.priorityList);return t.priorityList.forEach(function(e){var t=r[e.id];n.push({id:t.id,value:t.value,priority:e.priority})}),n},f.$extractResponseForDivisionQuestion=function(e,r){var i=[],a=f.$getObjectByIdMap(e.divisionList);return Object.getOwnPropertyNames(r).forEach(function(e){var t=r[e],n=a[e];n&&i.push({id:n.id,label:n.value,value:t})}),i},f.$extractResponseForGridQuestion=function(i,a){if(!i.grid||!i.grid.rows)return o;if("radio"==i.grid.cellInputType)return f.$extractResponseForRadioGridQuestion(i,a);var o=[];return i.grid.rows.forEach(function(r){i.grid.cols.forEach(function(e){var t={row:{id:r.id,label:r.label},col:{id:e.id,label:e.label},value:null};if(a.hasOwnProperty(r.id)&&a[r.id].hasOwnProperty(e.id)){var n=a[r.id][e.id];"date"==i.grid.cellInputType&&n instanceof Date?t.value=n.toLocaleDateString():"time"==i.grid.cellInputType&&n instanceof Date?t.value=n.toLocaleTimeString():t.value=n}o.push(t)})}),o},f.$extractResponseForRadioGridQuestion=function(e,i){var a=[],o=f.$getObjectByIdMap(e.grid.cols);return e.grid.rows.forEach(function(e){var t=i[e.id],n=null;t&&(n=o[t]);var r={row:{id:e.id,label:e.label},col:null};n&&(r.col={id:n.id,label:n.label}),a.push(r)}),a},f.extractResponse=function(e,t){return-1!==n.indexOf(e.type)?t.answer:"radio"==e.type||"checkbox"==e.type||"select"==e.type?f.$extractResponseForQuestionWithOfferedAnswers(e,t):"grid"==e.type?f.$extractResponseForGridQuestion(e,t):"priority"==e.type?f.$extractResponseForPriorityQuestion(e,t):"division"==e.type?f.$extractResponseForDivisionQuestion(e,t):null},f.mergeFormWithResponse=function(e,r){var t={};return angular.copy(e,t),t.pages.forEach(function(e){e.elements.forEach(function(e){var t=e.question;if(t){var n=r[t.id];n&&(t.response=f.extractResponse(t,n))}})}),t},f.getQuestionList=function(e,n){var r=[];return e.pages.forEach(function(e){e.elements.forEach(function(e){if(e.question){var t=e.question;n&&(t={},angular.copy(e.question,t)),r.push(t)}})}),r},f.getQuestionWithResponseList=function(e,n){var r=[];return f.getQuestionList(e,!0).forEach(function(e){var t=n[e.id];e.response=t?f.extractResponse(e,t):null,r.push(e)}),r},f.$$getHeader=function(e,t,n,r,i){var a="";return i&&((e||0===e)&&(a+=e+"."),null!=n&&(Array.isArray(n)||(n=[n]),n.forEach(function(e){a+=e+"."})),a.length&&(a+=" ")),a+=t,null==r||(Array.isArray(r)||(r=[r]),r.forEach(function(e){a+=" ["+e+"]"})),a},f.getResponseSheetHeaders=function(e,o){var t=["grid","priority","division"],s=[],c=0;return f.getQuestionList(e).forEach(function(i){c++;var a=1;if(-1===t.indexOf(i.type))s.push(f.$$getHeader(c,i.text,null,null,o));else if("grid"==i.type){if(!i.grid)return;"radio"==i.grid.cellInputType?i.grid.rows.forEach(function(e){s.push(f.$$getHeader(c,i.text,a,e.label,o)),a++}):i.grid.rows.forEach(function(n,r){i.grid.cols.forEach(function(e,t){s.push(f.$$getHeader(c,i.text,[r+1,t+1],[n.label,e.label],o)),a++})})}else if("priority"==i.type){if(!i.priorityList)return;i.priorityList.forEach(function(e){s.push(f.$$getHeader(c,i.text,a,e.value,o)),a++})}else if("division"==i.type){if(!i.divisionList)return;i.divisionList.forEach(function(e){s.push(f.$$getHeader(c,i.text,a,e.value,o)),a++})}}),s},f.getResponseSheetRow=function(e,t){var n=[];if(!t)return n;for(var r=f.getQuestionWithResponseList(e,t),i=["radio","checkbox","select","grid","priority","division"],a=0;a<r.length;a++){var o=r[a],s=o.response;if(-1!==i.indexOf(o.type)){if("radio"==o.type||"select"==o.type){if(!s){n.push("");continue}var c="";s.selectedAnswer&&(c=s.selectedAnswer.value),s.other&&(c&&(c+="; "),c+=s.other),n.push(c)}else if("checkbox"==o.type){if(!s||!s.selectedAnswers){n.push("");continue}c="";s.selectedAnswers.forEach(function(e){c&&(c+="; "),c+=e.value}),s.other&&(c&&(c+="; "),c+=s.other),n.push(c)}else if("grid"==o.type){if(!o.grid)continue;if(!s){"radio"==o.grid.cellInputType?o.grid.rows.forEach(function(){n.push("")}):o.grid.rows.forEach(function(){o.grid.cols.forEach(function(){n.push("")})});continue}"radio"==o.grid.cellInputType?s.forEach(function(e){n.push(e.col?e.col.label:"")}):s.forEach(function(e){n.push(e.value)})}else if("priority"==o.type){if(!o.priorityList)continue;var l=f.$getObjectByIdMap(s);o.priorityList.forEach(function(e){var t=l[e.id];t?n.push(t.priority):n.push("")})}else if("division"==o.type){if(!o.divisionList)continue;var u=f.$getObjectByIdMap(s);o.divisionList.forEach(function(e){var t=u[e.id];t?n.push(t.value):n.push("")})}}else n.push(s||"")}return n},f.getResponseSheetRows=function(t,e){return e.map(function(e){return f.getResponseSheetRow(t,e)})},f.getResponseSheet=function(t,e,n){var r=[],i=f.getResponseSheetHeaders(t,n);return r.push(i),e&&(e instanceof Array?e.forEach(function(e){r.push(f.getResponseSheetRow(t,e))}):r.push(f.getResponseSheetRow(t,e))),r},f}),angular.module("mwFormBuilder",["ngSanitize","ng-sortable","pascalprecht.translate"]).config(["$translateProvider",function(e){e.useStaticFilesLoader({prefix:"bower_components/insight-surveys/dist/i18n/",suffix:"/angular-surveys.json"}),e.useSanitizeValueStrategy("sanitize"),e.preferredLanguage("en")}]).filter("ngtranslate",["$parse","$translate",function(a,o){"use strict";var e=function(e,t,n,r){if(!angular.isObject(t)){var i=this||{__SCOPE_IS_NOT_AVAILABLE:"More info at https://github.com/angular/angular.js/commit/8863b9d04c722b278fa93c5d66ad1e578ad6eb1f"};t=a(t)(i)}return o.instant(e,t,n,r)};return o.statefulFilter()&&(e.$stateful=!0),e}]),angular.module("mwFormBuilder").service("mwFormUuid",function(){function e(){return Math.floor(65536*(1+Math.random())).toString(16).substring(1)}this.get=function(){return e()+e()+e()+e()+e()+e()+e()+e()}}).factory("mwFormClone",["mwFormUuid",function(i){var a={},o=[];return a.resetIds=function(e,t){if(t&&(o=[]),!(0<=o.indexOf(e))&&(o.push(e),!e!==Object(e))){if(Array.isArray(e))return void e.forEach(a.resetIds);for(var n in e)e.hasOwnProperty(n)&&a.resetIds(e[n]);if(e.hasOwnProperty("id")){var r=i.get();e.id,e.id=r}}},a.cloneElement=function(e){var t={};return angular.copy(e,t),a.resetIds(t,!0),t},a.clonePage=function(e){var t={};angular.copy(e,t),t.id=i.get();var n=[];if(Array.isArray(e.elements))for(var r=0;r<e.elements.length;r++)n.push(a.cloneElement(e.elements[r]));return t.elements=n,t},a.cloneForm=function(e){var t={};angular.copy(e,t);var n=[];if(Array.isArray(e.pages))for(var r=0;r<e.pages.length;r++)n.push(a.clonePage(e.pages[r]));return t.pages=n,t},a}]),angular.module("mwFormBuilder").directive("mwQuestionPriorityListBuilder",function(){return{replace:!0,restrict:"AE",require:"^mwFormQuestionBuilder",scope:{question:"=",readOnly:"=?",options:"=?"},templateUrl:"mw-question-priority-list-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["mwFormUuid",function(n){var r=this;r.isNewItem={},this.$onInit=function(){r.question.priorityList||(r.question.priorityList=[],r.addNewItem()),r.question.priorityList.sort(function(e,t){return e.orderNo-t.orderNo}),r.itemsSortableConfig={disabled:r.readOnly,ghostClass:"beingDragged",handle:".drag-handle",onEnd:function(e,t){!function(e){if(e)for(var t=0;t<e.length;t++)e[t].orderNo=t+1}(r.question.priorityList)}}},r.addNewItem=function(e){var t={id:n.get(),orderNo:r.question.priorityList.length+1,value:null};e||(r.isNewItem[t.id]=!0),r.question.priorityList.push(t)},r.removeItem=function(e){var t=r.question.priorityList.indexOf(e);-1!=t&&r.question.priorityList.splice(t,1)},r.keyPressedOnInput=function(e,t){delete r.isNewItem[t.id],13===e.which&&(e.preventDefault(),r.addNewItem())},1===angular.version.major&&angular.version.minor<5&&this.$onInit()}],link:function(e,t,n,r){e.ctrl}}}),angular.module("mwFormBuilder").directive("mwQuestionOfferedAnswerListBuilder",function(){return{replace:!0,restrict:"AE",require:"^mwFormQuestionBuilder",scope:{question:"=",formObject:"=",readOnly:"=?",options:"=?",disableOtherAnswer:"=?"},templateUrl:"mw-question-offered-answer-list-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["FormQuestionBuilderId","mwFormUuid",function(e,n){var r=this;this.$onInit=function(){r.config={radio:{},checkbox:{}},r.isNewAnswer={},r.question.offeredAnswers&&r.question.offeredAnswers.sort(function(e,t){return e.orderNo-t.orderNo}),r.offeredAnswersSortableConfig={disabled:r.readOnly,ghostClass:"beingDragged",handle:".drag-handle",onEnd:function(e,t){!function(){if(r.question.offeredAnswers)for(var e=0;e<r.question.offeredAnswers.length;e++)r.question.offeredAnswers[e].orderNo=e+1}()}}},r.addNewOfferedAnswer=function(){var e=r.possiblePageFlow[0],t={id:n.get(),orderNo:r.question.offeredAnswers.length+1,value:null,pageFlow:e};r.isNewAnswer[t.id]=!0,r.question.offeredAnswers.push(t)},r.removeOfferedAnswer=function(e){var t=r.question.offeredAnswers.indexOf(e);-1!=t&&r.question.offeredAnswers.splice(t,1)},r.addCustomAnswer=function(){r.question.otherAnswer=!0},r.removeCustomAnswer=function(){r.question.otherAnswer=!1},r.keyPressedOnInput=function(e,t){delete r.isNewAnswer[t.id],13===e.which&&(e.preventDefault(),r.addNewOfferedAnswer())},1===angular.version.major&&angular.version.minor<5&&this.$onInit()}],link:function(e,t,n,r){e.ctrl.possiblePageFlow=r.possiblePageFlow}}}),angular.module("mwFormBuilder").directive("mwQuestionGridBuilder",function(){return{replace:!0,restrict:"AE",require:"^mwFormQuestionBuilder",scope:{question:"=",formObject:"=",readOnly:"=?",options:"=?"},templateUrl:"mw-question-grid-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["mwFormUuid","MW_GRID_CELL_INPUT_TYPES",function(n,e){function r(e){if(e)for(var t=0;t<e.length;t++){e[t].orderNo=t+1}}function t(e){e.sort(function(e,t){return e.orderNo-t.orderNo})}var i=this;this.$onInit=function(){i.cellInputTypes=e,i.isNewInput={},i.question.grid||(i.question.grid={rows:[],cols:[]},i.addNewRow(),i.addNewCol(!0)),i.question.grid.cellInputType||(i.question.grid.cellInputType=i.cellInputTypes[0]),t(i.question.grid.rows),t(i.question.grid.cols),i.rowsSortableConfig={disabled:i.readOnly,ghostClass:"beingDragged",handle:".drag-handle",onEnd:function(e,t){r(i.question.grid.rows)}},i.colsSortableConfig={disabled:i.readOnly,ghostClass:"beingDragged",handle:".drag-handle",onEnd:function(e,t){r(i.question.grid.cols)}}},i.addNewRow=function(e){var t={id:n.get(),orderNo:i.question.grid.rows.length+1,label:null};e||(i.isNewInput[t.id]=!0),i.question.grid.rows.push(t)},i.addNewCol=function(e){var t={id:n.get(),orderNo:i.question.grid.cols.length+1,label:null};e||(i.isNewInput[t.id]=!0),i.question.grid.cols.push(t)},i.removeRow=function(e){var t=i.question.grid.rows.indexOf(e);-1!=t&&i.question.grid.rows.splice(t,1)},i.removeCol=function(e){var t=i.question.grid.cols.indexOf(e);-1!=t&&i.question.grid.cols.splice(t,1)},i.keyPressedOnInput=function(e,t,n){delete i.isNewInput[t.id],13===e.which&&(e.preventDefault(),"row"==n?i.addNewRow():i.addNewCol())},1===angular.version.major&&angular.version.minor<5&&this.$onInit()}],link:function(e,t,n,r){e.ctrl}}}),angular.module("mwFormBuilder").directive("mwQuestionDivisionBuilder",function(){return{replace:!0,restrict:"AE",require:"^mwFormQuestionBuilder",scope:{question:"=",readOnly:"=?",options:"=?"},templateUrl:"mw-question-division-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["mwFormUuid",function(n){var r=this;r.$onInit=function(){r.isNewItem={},r.question.divisionList||(r.question.divisionList=[],r.addNewItem()),r.question.divisionList.sort(function(e,t){return e.orderNo-t.orderNo}),r.itemsSortableConfig={disabled:r.readOnly,ghostClass:"beingDragged",handle:".drag-handle",onEnd:function(e,t){!function(e){if(e)for(var t=0;t<e.length;t++)e[t].orderNo=t+1}(r.question.divisionList)}}},r.addNewItem=function(e){var t={id:n.get(),orderNo:r.question.divisionList.length+1,value:null};e||(r.isNewItem[t.id]=!0),r.question.divisionList.push(t)},r.removeItem=function(e){var t=r.question.divisionList.indexOf(e);-1!=t&&r.question.divisionList.splice(t,1)},r.keyPressedOnInput=function(e,t){delete r.isNewItem[t.id],13===e.which&&(e.preventDefault(),r.addNewItem())},1===angular.version.major&&angular.version.minor<5&&r.$onInit()}],link:function(e,t,n,r){e.ctrl}}}),angular.module("mwFormBuilder").directive("mwLabel",function(){return{replace:!0,restrict:"AE",scope:{labelKey:"@?",labelText:"@?",labelFor:"@",labelClass:"@",labelTranslateValues:"="},templateUrl:"mw-label.html",controllerAs:"ctrl",bindToController:!0,controller:["mwFormUuid",function(e){}],link:function(e,t,n){}}}),angular.module("mwFormBuilder").factory("FormQuestionBuilderId",function(){var e=0;return{next:function(){return++e}}}).directive("mwFormQuestionBuilder",function(){return{replace:!0,restrict:"AE",require:"^mwFormPageElementBuilder",scope:{question:"=",formObject:"=",onReady:"&",isPreview:"=?",readOnly:"=?"},templateUrl:"mw-form-question-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["$timeout","FormQuestionBuilderId","mwFormBuilderOptions",function(e,t,n){function r(){i.question.offeredAnswers&&i.question.offeredAnswers.forEach(function(e){i.question.pageFlowModifier?e.pageFlow=i.possiblePageFlow[0]:delete e.pageFlow})}var i=this;i.$onInit=function(){i.id=t.next(),i.questionTypes=n.questionTypes,i.formSubmitted=!1,i.question.offeredAnswers&&i.question.offeredAnswers.sort(function(e,t){return e.orderNo-t.orderNo}),i.offeredAnswersSortableConfig={disabled:i.readOnly,ghostClass:"beingDragged",handle:".drag-handle",onEnd:function(e,t){!function(){if(i.question.offeredAnswers)for(var e=0;e<i.question.offeredAnswers.length;e++)i.question.offeredAnswers[e].orderNo=e+1}()}}},i.save=function(){i.formSubmitted=!0,i.form.$valid&&i.onReady()};var a=["radio","checkbox","select"];i.questionTypeChanged=function(){-1!==a.indexOf(i.question.type)&&(i.question.offeredAnswers||(i.question.offeredAnswers=[])),"radio"!=i.question.type&&(r(),e(function(){i.question.pageFlowModifier=!1})),-1===a.indexOf(i.question.type)&&delete i.question.offeredAnswers,"grid"!=i.question.type?delete i.question.grid:i.question.required=!1,"priority"!=i.question.type&&delete i.question.priorityList},i.pageFlowModifierChanged=function(){r()},1===angular.version.major&&angular.version.minor<5&&i.$onInit()}],link:function(e,t,n,r){var i=e.ctrl;i.possiblePageFlow=r.possiblePageFlow,i.options=r.options}}}),angular.module("mwFormBuilder").factory("FormParagraphBuilderId",function(){var e=0;return{next:function(){return++e}}}).directive("mwFormParagraphBuilder",function(){return{replace:!0,restrict:"AE",require:"^mwFormPageElementBuilder",scope:{paragraph:"=",formObject:"=",onReady:"&",isPreview:"=?",readOnly:"=?"},templateUrl:"mw-form-paragraph-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["$timeout","FormParagraphBuilderId",function(e,t){var n=this;n.$onInit=function(){n.id=t.next(),n.formSubmitted=!1},n.save=function(){n.formSubmitted=!0,n.form.$valid&&n.onReady()},1===angular.version.major&&angular.version.minor<5&&n.$onInit()}],link:function(e,t,n,r){e.ctrl}}}),angular.module("mwFormBuilder").directive("mwFormPageElementBuilder",function(){return{replace:!0,restrict:"AE",require:"^mwFormPageBuilder",scope:{pageElement:"=",formObject:"=",isActive:"=",isFirst:"=",isLast:"=",onReady:"&",readOnly:"=?"},templateUrl:"mw-form-page-element-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["mwFormUuid",function(e){var n=this;n.$onInit=function(){"question"==n.pageElement.type?n.pageElement.question||(n.pageElement.question={id:e.get(),text:null,type:null,required:!0}):"image"==n.pageElement.type?n.pageElement.image||(n.pageElement.image={id:e.get(),align:"left"}):"paragraph"==n.pageElement.type&&(n.pageElement.paragraph||(n.pageElement.paragraph={id:e.get(),html:""}))},n.callback=function(e,t){e.preventDefault(),e.stopPropagation(),t.callback&&"function"==typeof t.callback&&t.callback(n.pageElement)},n.filter=function(e){return!(!e.showInOpen&&n.isActive)&&!(!e.showInPreview&&!n.isActive)&&(!e.filter||"function"!=typeof e.filter||e.filter(n.pageElement))},1===angular.version.major&&angular.version.minor<5&&n.$onInit()}],link:function(e,t,n,r){var i=e.ctrl;i.possiblePageFlow=r.possiblePageFlow,i.hoverIn=function(){i.isHovered=!0},i.hoverOut=function(){i.isHovered=!1},i.editElement=function(){r.selectElement(i.pageElement)},i.cloneElement=function(e){e.preventDefault(),e.stopPropagation(),r.cloneElement(i.pageElement)},i.removeElement=function(){r.removeElement(i.pageElement)},i.moveDown=function(){r.moveDownElement(i.pageElement),e.$emit("mwForm.questionUpdate")},i.moveUp=function(){r.moveUpElement(i.pageElement),e.$emit("mwForm.questionUpdate")},i.options=r.options,i.onImageSelection=r.onImageSelection}}}),angular.module("mwFormBuilder").directive("mwFormPageBuilder",["$rootScope",function(t){return{replace:!0,restrict:"AE",require:"^mwFormBuilder",scope:{formPage:"=",formObject:"=",isFirst:"=",isLast:"=",readOnly:"=?"},templateUrl:"mw-form-page-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["$scope","$timeout","mwFormUuid","mwFormClone","mwFormBuilderOptions",function(n,e,i,a,o){function r(){for(var e=0;e<c.formPage.elements.length;e++)c.formPage.elements[e].orderNo=e+1}function s(e,t,n){var r=e[t];e.splice(t,1),e.splice(n,0,r)}var c=this;c.$onInit=function(){c.hoverEdit=!1,c.formPage.namedPage=!!c.formPage.name,c.isFolded=!1,c.formPage.elements.sort(function(e,t){return e.orderNo-t.orderNo}),c.sortableConfig={disabled:c.readOnly,ghostClass:"beingDragged",group:"survey",handle:".inactive",chosenClass:".page-element-list",onEnd:function(e,t){r(),n.$emit("mwForm.questionUpdate")}},c.activeElement=null},c.unfold=function(){c.isFolded=!1},c.fold=function(){c.isFolded=!0},c.pageNameChanged=function(){t.$broadcast("mwForm.pageEvents.pageNameChanged",{page:c.formPage})},c.addElement=function(e){e||(e=o.elementTypes[0]);var t,n,r=(t=e,n=c.formPage.elements.length+1,{id:i.get(),orderNo:n,type:t});c.activeElement=r,c.formPage.elements.push(r)},c.cloneElement=function(e,t){var n=c.formPage.elements.indexOf(e),r=a.cloneElement(e);t&&(c.activeElement=r),c.formPage.elements.splice(n,0,r)},c.removeElement=function(e){var t=c.formPage.elements.indexOf(e);c.formPage.elements.splice(t,1)},c.moveDownElement=function(e){var t=c.formPage.elements.indexOf(e),n=t+1;n<c.formPage.elements.length&&s(c.formPage.elements,t,n),r()},c.moveUpElement=function(e){var t=c.formPage.elements.indexOf(e),n=t-1;0<=n&&s(c.formPage.elements,t,n),r()},c.isElementTypeEnabled=function(e){return-1!==o.elementTypes.indexOf(e)},c.addQuestion=function(){c.addElement("question")},c.addImage=function(){c.addElement("image")},c.addParagraph=function(){c.addElement("paragraph")},c.isElementActive=function(e){return c.activeElement==e},c.selectElement=function(e){c.activeElement=e},c.onElementReady=function(){e(function(){c.activeElement=null})},c.hoverIn=function(){c.hoverEdit=!0},c.hoverOut=function(){c.hoverEdit=!1},c.updateElementsOrderNo=r,1===angular.version.major&&angular.version.minor<5&&c.$onInit()}],link:function(n,e,t,r){var i=n.ctrl;i.possiblePageFlow=r.possiblePageFlow,i.moveDown=function(){r.moveDownPage(i.formPage)},i.moveUp=function(){r.moveUpPage(i.formPage)},i.removePage=function(){r.removePage(i.formPage)},i.addPage=function(){r.addPageAfter(i.formPage)},n.$watch("ctrl.formPage.elements.length",function(e,t){e!=t&&(i.updateElementsOrderNo(),n.$emit("mwForm.questionUpdate"))}),i.options=r.options,i.onImageSelection=r.onImageSelection}}}]),angular.module("mwFormBuilder").factory("FormImageBuilderId",function(){var e=0;return{next:function(){return++e}}}).directive("mwFormImageBuilder",function(){return{replace:!0,restrict:"AE",require:"^mwFormPageElementBuilder",scope:{image:"=",formObject:"=",onReady:"&",isPreview:"=?",readOnly:"=?",onImageSelection:"&"},templateUrl:"mw-form-image-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["$timeout","FormImageBuilderId","mwFormUuid",function(e,t,n){var r=this;r.id=t.next(),r.formSubmitted=!1,r.save=function(){r.formSubmitted=!0,r.form.$valid&&r.onReady()},r.selectImageButtonClicked=function(){r.onImageSelection().then(function(e){r.image.src=e}).catch(function(){})},r.setAlign=function(e){r.image.align=e}}],link:function(e,t,n,r){e.ctrl}}}),angular.module("mwFormBuilder").directive("mwFormConfirmationPageBuilder",function(){return{replace:!0,restrict:"AE",scope:{formObject:"=",readOnly:"=?",defaultMessage:"=?"},templateUrl:"mw-form-confirmation-page-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["$timeout",function(e){var t=this;t.hoverEdit=!1,t.hoverIn=function(){t.hoverEdit=!0},t.hoverOut=function(){t.hoverEdit=!1}}],link:function(e,t,n){}}}),angular.module("mwFormBuilder").directive("mwFormBuilder",["$rootScope",function(l){return{replace:!0,restrict:"AE",scope:{formData:"=",readOnly:"=?",options:"=?",formStatus:"=?",onImageSelection:"&",api:"=?"},templateUrl:"mw-form-builder.html",controllerAs:"ctrl",bindToController:!0,controller:["$scope","mwFormUuid","MW_QUESTION_TYPES","mwFormBuilderOptions",function(e,n,t,r){function i(e){var t=null;return c.possiblePageFlow&&(t=c.possiblePageFlow[0]),{id:n.get(),number:e,name:null,description:null,pageFlow:t,elements:[]}}function a(){var t=1;void 0!==c.formData.pages&&c.formData.pages.forEach(function(e){void 0!==e.elements&&e.elements.forEach(function(e){"question"==e.type&&void 0!==e.question&&(e.question.number=t++)})})}function o(){for(var e=0;e<c.formData.pages.length;e++)c.formData.pages[e].number=e+1;c.updatePageFlow()}function s(e,t,n){var r=e[t];e.splice(t,1),e.splice(n,0,r)}var c=this;c.$onInit=function(){c.currentPage=0,c.formData.pages&&c.formData.pages.length||(c.formData.pages=[],c.formData.pages.push(i(1))),c.options=r.$init(c.options),c.api&&(c.api.reset=function(){for(var e in c.formData)c.formData.hasOwnProperty(e)&&"pages"!=e&&delete c.formData[e];c.formData.pages.length=0,c.formData.pages.push(i(1))}),setTimeout(function(){a()},0),e.$watch("ctrl.formData",function(e,t){a()})},c.numberOfPages=function(){return Math.ceil(c.formData.pages.length/c.options.pageSize)},c.lastPage=function(){c.currentPage=Math.ceil(c.formData.pages.length/c.options.pageSize-1)},c.addPage=function(){c.formData.pages.push(i(c.formData.pages.length+1)),c.lastPage(),l.$broadcast("mwForm.pageEvents.pageAdded")},c.onChangePageSize=function(){c.currentPage>Math.ceil(c.formData.pages.length/c.options.pageSize-1)&&(c.currentPage=Math.ceil(c.formData.pages.length/c.options.pageSize-1))},e.$on("mwForm.questionUpdate",function(){setTimeout(function(){a()},0)}),c.addPageAfter=function(e){var t=c.formData.pages.indexOf(e)+1,n=i(e.number+1);t<c.formData.pages.length?c.formData.pages.splice(t,0,n):c.formData.pages.push(n),o(),a(),l.$broadcast("mwForm.pageEvents.pageAdded")},c.moveDownPage=function(e){var t=c.formData.pages.indexOf(e),n=t+1;n<c.formData.pages.length&&s(c.formData.pages,t,n),o(),a(),l.$broadcast("mwForm.pageEvents.pageMoved")},c.moveUpPage=function(e){var t=c.formData.pages.indexOf(e),n=t-1;0<=n&&s(c.formData.pages,t,n),o(),a(),l.$broadcast("mwForm.pageEvents.pageMoved")},c.removePage=function(e){var t=c.formData.pages.indexOf(e);c.formData.pages.splice(t,1),o(),a(),l.$broadcast("mwForm.pageEvents.pageRemoved"),c.onChangePageSize()},1===angular.version.major&&angular.version.minor<5&&c.$onInit()}],link:function(e,t,n){var r=e.ctrl;r.formStatus&&(r.formStatus.form=r.form),r.possiblePageFlow=[];var i={nextPage:!0,label:"mwForm.pageFlow.goToNextPage"};r.possiblePageFlow.push(i),r.isSamePageFlow=function(e,t){return e.page&&t.page&&e.page.id==t.page.id||e.formSubmit&&t.formSubmit||e.nextPage&&t.nextPage},r.updatePageFlow=function(){r.possiblePageFlow.length=1,r.formData.pages.forEach(function(e){r.possiblePageFlow.push({page:{id:e.id,number:e.number},label:"mwForm.pageFlow.goToPage"})}),r.possiblePageFlow.push({formSubmit:!0,label:"mwForm.pageFlow.submitForm"}),r.formData.pages.forEach(function(e){r.possiblePageFlow.forEach(function(n){e.pageFlow?r.isSamePageFlow(n,e.pageFlow)&&(e.pageFlow=n):e.pageFlow=i,e.elements.forEach(function(e){var t=e.question;t&&t.pageFlowModifier&&t.offeredAnswers.forEach(function(e){e.pageFlow&&r.isSamePageFlow(n,e.pageFlow)&&(e.pageFlow=n)})})})})},e.$watch("ctrl.formData.pages.length",function(e,t){r.updatePageFlow()}),e.$watch("ctrl.currentPage",function(e,t){l.$broadcast("mwForm.pageEvents.pageCurrentChanged",{index:r.currentPage})}),e.$on("mwForm.pageEvents.changePage",function(e,t){void 0!==t.page&&t.page<r.numberOfPages()&&(r.currentPage=t.page)}),e.$on("mwForm.pageEvents.addPage",function(e,t){r.addPage()})}}}]),angular.module("mwFormBuilder").filter("mwStartFrom",function(){return function(e,t){return t=+t,e.slice(t)}}),angular.module("mwFormBuilder").constant("MW_QUESTION_TYPES",["text","textarea","radio","checkbox","select","grid","priority","division","number","date","time","email","range","url","star"]).constant("MW_ELEMENT_TYPES",["question","image","paragraph"]).constant("MW_GRID_CELL_INPUT_TYPES",["radio","checkbox","text","number","date","time"]).factory("mwFormBuilderOptions",["MW_ELEMENT_TYPES","MW_QUESTION_TYPES",function(e,t){function n(e,t){return e?e.map(function(e){return angular.extend({},t,e)}):[]}var r={title:null,icon:null,text:null,callback:null,filter:null,showInOpen:!1,showInPreview:!0,cssClass:""},i={key:null,label:null,selects:[],required:!0},a={elementTypes:e,questionTypes:t,elementButtons:[],pagesSize:[10,25,50,100],pageSize:10,customQuestionSelects:[],customElements:[]},o={$init:function(e){return angular.extend(o,a,e),o.customQuestionSelects=n(o.customQuestionSelects,i),o.elementButtons=n(o.elementButtons,r),o}};return o}]),angular.module("mwFormBuilder").directive("wdFocusMe",["$timeout","$parse",function(i,a){return{link:function(e,t,n){var r=a(n.wdFocusMe);e.$watch(r,function(e){!0===e&&i(function(){t[0].focus()})}),t.bind("blur",function(){i(function(){e.$apply(r.assign(e,!1))})})}}}]).factory("focus",["$timeout","$window",function(e,n){return function(t){e(function(){var e=n.document.getElementById(t);e&&e.focus()})}}]),angular.module("mwFormBuilder").directive("mwConfirmClick",["$window",function(i){return{restrict:"A",link:function(t,e,n){var r=n.wdConfirmClick||"Are you sure?";e.bind("click",function(e){i.confirm(r)&&t.$apply(n.confirmedAction)})}}}]),angular.module("mwFormBuilder").run(["$templateCache",function(e){e.put("mw-form-builder.html",'<div class=mw-form-builder><form name=ctrl.form role=form novalidate><div class=mw-title-page><md-input-container class=md-block><mw-label label-for=formName label-key=mwForm.form.name></mw-label><input type=text class=form-control name=formName id=formName ng-model=ctrl.formData.name ng-readonly=ctrl.readOnly required></md-input-container><md-input-container class=md-block><mw-label label-for=formDescription label-key=mwForm.form.description></mw-label><textarea msd-elastic class=form-control name=formDescription ng-model=ctrl.formData.description id=formDescription ng-readonly=ctrl.readOnly>\n            </textarea></md-input-container></div><div class=form-page-list><mw-form-page-builder ng-repeat="page in ctrl.formData.pages| mwStartFrom:ctrl.currentPage * ctrl.options.pageSize | limitTo:ctrl.options.pageSize" form-page=page form-object=ctrl.formData is-first=$first is-last=$last read-only=ctrl.readOnly></mw-form-page-builder></div><div layout=row layout-align="center center"><div flex-gt-xs=75><div layout=row layout-align="center center"><div flex-gt-xs=50><md-button class="md-icon-button md-raised" ng-disabled="ctrl.currentPage === 0" ng-click="ctrl.currentPage = 0"><i class="fa fa-angle-double-left fa-lg"></i></md-button><md-button class="md-icon-button md-raised" ng-disabled="ctrl.currentPage === 0" ng-click="ctrl.currentPage = ctrl.currentPage - 1"><i class="fa fa-angle-left fa-lg"></i></md-button>{{ctrl.currentPage + 1}}/{{ctrl.numberOfPages()}}<md-button class="md-icon-button md-raised" ng-disabled="ctrl.currentPage >= ctrl.formData.pages.length / ctrl.options.pageSize - 1" ng-click="ctrl.currentPage = ctrl.currentPage + 1"><i class="fa fa-angle-right fa-lg"></i></md-button><md-button class="md-icon-button md-raised" ng-disabled="ctrl.currentPage >= ctrl.formData.pages.length / ctrl.options.pageSize - 1" ng-click=ctrl.lastPage()><i class="fa fa-angle-double-right fa-lg"></i></md-button></div><div flex-gt-xs=18><md-input-container><md-select ng-change=ctrl.onChangePageSize() class=form-control ng-model=ctrl.options.pageSize><md-option ng-repeat="item in ctrl.options.pagesSize" value={{item}}>{{item}}</md-option></md-select></md-input-container></div></div></div><div flex><div layout=row layout-align=end><md-button type=button class="md-raised md-primary" ng-click=ctrl.addPage() ng-if=!ctrl.readOnly><i class="fa fa-plus"></i> <span translate=mwForm.buttons.addPage></span></md-button></div></div></div><mw-form-confirmation-page-builder form-object=ctrl.formData read-only=ctrl.readOnly></mw-form-confirmation-page-builder></form></div>'),e.put("mw-form-confirmation-page-builder.html",'<div class="mw-form-page-builder mw-confirmation-page"><div><div class=mw-page-tab-container><div class=mw-form-page-tab><span class=mw-page-tab-text role=heading translate=mwForm.confirmationPage.title>Strona potwierdzenia</span></div><div class=mw-page-tab-triangle></div></div><div ng-form=ctrl.form role=form novalidate class=form-page-builder-body><div class=form-group><md-input-container class=md-block><mw-label label-for=customConfirmationMessage label-key=mwForm.confirmationPage.customMessage></mw-label><textarea id=customConfirmationMessage msd-elastic class=form-control name=confirmationMessage ng-model=ctrl.formObject.confirmationMessage ng-disabled=ctrl.readOnly></textarea></md-input-container></div></div></div></div>'),e.put("mw-form-image-builder.html",'<div class=mw-form-image-builder-wrapper><div class=mw-form-image-builder ng-class="{\'ng-submitted\':ctrl.formSubmitted}"><div class=image-editor ng-form=ctrl.form ng-if=!ctrl.isPreview><button ng-if=!ctrl.image.src ng-click=ctrl.selectImageButtonClicked() type=button class="btn btn-default" translate=mwForm.image.selectImageButton>Select image</button><div class="image-edition row" ng-if=ctrl.image.src><div class=col-md-12 ng-class="\'align-\'+ctrl.image.align"><img ng-src={{ctrl.image.src}}></div><div class="col-md-12 image-align-control"><div class=btn-group role=group aria-label="Image align"><button type=button class="btn btn-default" ng-class="{\'selected\': ctrl.image.align==\'left\'}" ng-click="ctrl.setAlign(\'left\')"><i class="fa fa-align-left"></i></button> <button type=button class="btn btn-default" ng-class="{\'selected\': ctrl.image.align==\'center\'}" ng-click="ctrl.setAlign(\'center\')"><i class="fa fa-align-center"></i></button> <button type=button class="btn btn-default" ng-class="{\'selected\': ctrl.image.align==\'right\'}" ng-click="ctrl.setAlign(\'right\')"><i class="fa fa-align-right"></i></button></div></div><md-input-container class=md-block><mw-label label-for=image-caption-{{ctrl.id}} label-key=mwForm.image.caption>Image caption</mw-label><input type=text class=form-control name=text ng-attr-id=image-caption-{{ctrl.id}} ng-model=ctrl.image.caption ng-readonly=ctrl.readOnly></md-input-container></div><div ng-if=ctrl.image.src><br><br><md-button class="md-primary md-raised" type=button role=button ng-click=ctrl.save() translate=mwForm.buttons.questionReady>Ready</md-button></div></div><div class=mw-preview ng-if=ctrl.isPreview><figure ng-class="\'align-\'+ctrl.image.align"><img ng-src={{ctrl.image.src}} ng-attr-alt=ctrl.image.caption><figcaption ng-if=ctrl.image.caption>{{ctrl.image.caption}}</figcaption></figure></div></div></div>'),e.put("mw-form-page-builder.html",'<div class=mw-form-page-builder ng-class="{\'page-folded\': ctrl.isFolded}"><div ng-mouseover=ctrl.hoverIn() ng-mouseleave=ctrl.hoverOut()><div class=mw-page-tab-container><div class=mw-form-page-tab><span class=mw-page-tab-text role=heading translate=mwForm.page.tab.heading translate-values="{page: ctrl.formPage.number, allPages:ctrl.formObject.pages.length}">Strona 1 z 3</span> <span class=mw-page-tab-checkbox><label><input type=checkbox ng-model=ctrl.formPage.namedPage ng-disabled=ctrl.readOnly><span class=mw-page-tab-checkbox-text translate=mwForm.page.pageWithNameCheckbox>named</span></label></span></div><div class=mw-page-tab-triangle></div><div class=mw-page-tab-actions ng-switch=ctrl.readOnly><button type=button class=fold-button ng-click=ctrl.fold() ng-attr-title="{{\'mwForm.buttons.fold\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.fold>Fold</span></md-tooltip><i class="fa fa-compress"></i></button> <button type=button class=unfold-button ng-click=ctrl.unfold() ng-attr-title="{{\'mwForm.buttons.unfold\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.unfold>Unfold</span></md-tooltip><i class="fa fa-expand"></i></button> <button type=button class=move-down-button ng-click=ctrl.moveDown() ng-if=!ctrl.isLast ng-switch-when=false ng-attr-title="{{\'mwForm.buttons.moveDown\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.moveDown>Move down</span></md-tooltip><i class="fa fa-chevron-down"></i></button> <button type=button class=move-up-button ng-click=ctrl.moveUp() ng-if=!ctrl.isFirst ng-switch-when=false ng-attr-title="{{\'mwForm.buttons.moveUp\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.moveUp>move Up</span></md-tooltip><i class="fa fa-chevron-up"></i></button> <button type=button class=remove-button mw-confirm-click confirmed-action=ctrl.removePage() ng-switch-when=false ng-attr-title="{{\'mwForm.buttons.removePage\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.removePage>remove Page</span></md-tooltip><i class="fa fa-trash"></i></button></div></div><div ng-form=ctrl.form role=form novalidate class=form-page-builder-body><md-input-container class=md-block ng-if=ctrl.formPage.namedPage><label ng-attr-for=page-name-{{ctrl.formPage.number}} translate=mwForm.page.name>Nazwa strony</label> <input type=text class=form-control name=pageName ng-attr-id=page-name-{{ctrl.formPage.number}} ng-model=ctrl.formPage.name ng-blur=ctrl.pageNameChanged() ng-readonly=ctrl.readOnly></md-input-container><div class=page-element-list ng-sortable=ctrl.sortableConfig ng-model=ctrl.formPage.elements><div class="empty-page-element-list-label form-group" ng-if="!ctrl.formPage.elements || (ctrl.formPage.elements && ctrl.formPage.elements.length === 0)"><span translate=mwForm.page.elements.empty>Brak elementów</span></div><mw-form-page-element-builder ng-repeat="element in ctrl.formPage.elements" page-element=element form-object=ctrl.formObject is-active=ctrl.isElementActive(element) on-ready=ctrl.onElementReady() ng-click=ctrl.selectElement(element) is-first=$first is-last=$last read-only=ctrl.readOnly></mw-form-page-element-builder></div><md-menu ng-if=!ctrl.readOnly><md-button class=md-raised aria-label="{{\'mwForm.buttons.addElement\'|ngtranslate}}" ng-click=$mdOpenMenu($event) translate=mwForm.buttons.addElement>Add element</md-button><md-menu-content width=4><md-menu-item ng-if="ctrl.isElementTypeEnabled(\'question\')"><md-button type=button ng-click=ctrl.addQuestion()><span translate=mwForm.elements.question>Pytanie</span><i class="fa fa-question-circle fa-lg fa-fw" style="margin-left: 10px;"></i></md-button></md-menu-item><md-menu-item ng-if="ctrl.isElementTypeEnabled(\'image\')"><md-button type=button ng-click=ctrl.addImage()><span translate=mwForm.elements.image>Obraz</span><i class="fa fa-picture-o fa-lg fa-fw" style="margin-left: 10px;"></i></md-button></md-menu-item><md-menu-item ng-if="ctrl.isElementTypeEnabled(\'paragraph\')"><md-button type=button ng-click=ctrl.addParagraph()><span translate=mwForm.elements.paragraph>Obraz</span><i class="fa fa-paragraph fa-lg fa-fw" style="margin-left: 10px;"></i></md-button></md-menu-item></md-menu-content></md-menu></div><table cellspacing=0 class=mw-page-bottom-tab-container ng-if=!ctrl.isLast><tr><td class=mw-page-bottom-tab-triangle></td><td class=mw-form-page-bottom-tab><div class="page-flow-select form-inline"><label translate=mwForm.pageFlow.afterPage translate-values={page:ctrl.formPage.number} ng-attr-for=page-flow-select-{{ctrl.formPage.number}}>Po stronie 1</label><select ng-attr-id=page-flow-select-{{ctrl.formPage.number}} ng-options="pageFlow.label|ngtranslate:pageFlow for pageFlow in ctrl.possiblePageFlow" ng-model=ctrl.formPage.pageFlow class=form-control ng-disabled=ctrl.readOnly></select></div></td><td class=mw-page-bottom-tab-actions><button type=button role=button class=btn ng-click=ctrl.addPage() ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.addPage\' | ngtranslate}}"><md-tooltip md-direction=top>{{\'mwForm.buttons.addPage\' | ngtranslate}}</md-tooltip><i class="fa fa-plus"></i></button></td></tr></table></div></div>'),e.put("mw-form-page-element-builder.html",'<div class=mw-form-page-element-builder-wrapper><div class=mw-form-page-element-builder ng-class="{\'active\': ctrl.isActive, \'inactive draggable\': !ctrl.isActive}"><div class=mw-page-element-actions-tab ng-switch=ctrl.isActive&&!ctrl.readOnly><span class=mw-additional-buttons><button type=button ng-click=ctrl.callback($event,button) ng-attr-title="{{button.title | ngtranslate}}" ng-class=button.cssClass class=edit-button aria-label="{{button.title | ngtranslate}}" aria-hidden=false ng-if="ctrl.filter(button) && !ctrl.readOnly" ng-repeat="button in ctrl.options.elementButtons"><md-tooltip md-direction=top><span>{{button.title | ngtranslate}}</span></md-tooltip><i class={{button.icon}}></i> {{button.text}}</button></span> <span ng-switch-when=true><button type=button class=move-down-button ng-click=ctrl.moveDown() ng-if=!ctrl.isLast ng-attr-title="{{\'mwForm.buttons.moveDown\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.moveDown>moveDown</span></md-tooltip><i class="fa fa-chevron-down"></i></button> <button type=button class=move-up-button ng-click=ctrl.moveUp() ng-if=!ctrl.isFirst ng-attr-title="{{\'mwForm.buttons.moveUp\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.moveUp>moveUp</span></md-tooltip><i class="fa fa-chevron-up"></i></button> <button type=button class=remove-button mw-confirm-click confirmed-action=ctrl.removeElement() ng-attr-title="{{\'mwForm.buttons.remove\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.remove>remove</span></md-tooltip><i class="fa fa-trash"></i></button></span> <span ng-switch-when=false><button type=button aria-label="{{\'mwForm.buttons.clone\' | ngtranslate}}" aria-hidden=false class=edit-button ng-click=ctrl.cloneElement($event) ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.clone\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.clone>clone</span></md-tooltip><i class="fa fa-clone"></i></button> <button type=button aria-label="{{\'mwForm.buttons.edit\' | ngtranslate}}" aria-hidden=false class=edit-button ng-click=ctrl.editElement() ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.edit\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.edit>edit</span></md-tooltip><i class="fa fa-pencil"></i></button> <button type=button aria-label="{{\'mwForm.buttons.view\' | ngtranslate}}" aria-hidden=false class=edit-button ng-click=ctrl.editElement() ng-if=ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.view\' | ngtranslate}}"><md-tooltip md-direction=top><span translate=mwForm.buttons.view>view</span></md-tooltip><i class="fa fa-eye"></i></button></span></div><div ng-switch=ctrl.pageElement.type><mw-form-question-builder ng-switch-when=question question=ctrl.pageElement.question form-object=ctrl.formObject on-ready=ctrl.onReady() is-preview=!ctrl.isActive read-only=ctrl.readOnly></mw-form-question-builder><mw-form-image-builder ng-switch-when=image image=ctrl.pageElement.image form-object=ctrl.formObject on-ready=ctrl.onReady() is-preview=!ctrl.isActive read-only=ctrl.readOnly on-image-selection=ctrl.onImageSelection()></mw-form-image-builder><mw-form-paragraph-builder ng-switch-when=paragraph paragraph=ctrl.pageElement.paragraph form-object=ctrl.formObject on-ready=ctrl.onReady() is-preview=!ctrl.isActive read-only=ctrl.readOnly></mw-form-paragraph-builder></div></div></div>'),e.put("mw-form-paragraph-builder.html",'<div class=mw-form-paragraph-builder-wrapper><div class=mw-form-paragraph-builder ng-class="{\'ng-submitted\':ctrl.formSubmitted}"><div class=paragraph-editor ng-form=ctrl.form ng-if=!ctrl.isPreview><md-input-container class=md-block><mw-label label-for=paragraph-textarea-{{ctrl.id}} label-key=mwForm.paragraph.placeholder></mw-label><textarea msd-elastic class="form-control mw-form-paragraph-textarea" ng-model=ctrl.paragraph.html required ng-attr-id=paragraph-textarea-{{ctrl.id}} ng-readonly=ctrl.readOnly></textarea></md-input-container><div layout=row><br><md-button class="md-primary md-raised" type=button role=button ng-click=ctrl.save() translate=mwForm.buttons.questionReady>Ready</md-button></div></div><div class=mw-preview ng-if=ctrl.isPreview><p ng-bind-html=ctrl.paragraph.html></p></div></div></div>'),e.put("mw-form-question-builder.html",'<div class=mw-form-question-builder-wrapper><div class=mw-form-question-builder ng-class="{\'ng-submitted\':ctrl.formSubmitted}"><div ng-form=ctrl.form ng-if=!ctrl.isPreview><div class=form-horizontal><md-input-container class=md-block><mw-label label-for=question-text-{{ctrl.id}} label-key=mwForm.question.text></mw-label><input type=text name=text ng-attr-id=question-text-{{ctrl.id}} ng-model=ctrl.question.text ng-readonly=ctrl.readOnly required></md-input-container><div class=mw-question-type layout=row layout-align="start center"><md-input-container flex-gt-md=30><mw-label label-for=question-type-{{ctrl.id}} label-class="col-sm-2 control-label" label-key=mwForm.question.type></mw-label><md-select ng-attr-id=question-type-{{ctrl.id}} ng-model=ctrl.question.type ng-change=ctrl.questionTypeChanged() ng-disabled=ctrl.readOnly required><md-option ng-repeat="type in ctrl.questionTypes" ng-value=type>{{\'mwForm.question.types.\'+type+\'.name\'|ngtranslate}}</md-option></md-select></md-input-container><div flex flex-offset-gt-md=5><md-checkbox ng-if="ctrl.question.type==\'radio\' || ctrl.question.type==\'select\'" ng-model=ctrl.question.pageFlowModifier ng-change=ctrl.pageFlowModifierChanged() ng-readonly=ctrl.readOnly aria-label="Go to page"><span translate=mwForm.pageFlow.afterQuestionAnswer>Przejdź do strony w oparciu o odpowiedź</span></md-checkbox></div></div><div class="form-group mw-question-type" ng-repeat="select in ctrl.options.customQuestionSelects"><mw-label label-for=question-{{select.key}}-{{ctrl.id}} label-class="col-sm-2 control-label" label-key={{select.label}}></mw-label><div class="col-sm-10 form-inline"><select ng-attr-id=question-{{opt.key}}-{{ctrl.id}} ng-options="opt.label for opt in select.options track by opt.key" ng-model=ctrl.question[select.key] class=form-control ng-disabled=ctrl.readOnly ng-required=select.required></select></div></div></div><div ng-if=ctrl.question.type><div class=mw-form-question-answers-builder ng-switch=ctrl.question.type><div ng-if="ctrl.question.type==\'text\'"><md-input-container class=md-block><input class=form-control type=text disabled value="{{\'mwForm.question.preview.text\'|ngtranslate}}"></md-input-container></div><div ng-switch-when=textarea><md-input-container class=md-block><textarea class=form-control maxlength=150 rows=5 disabled>{{\'mwForm.question.preview.textarea\'|ngtranslate}}</textarea></md-input-container></div><div ng-switch-when=radio><mw-question-offered-answer-list-builder question=ctrl.question form-object=ctrl.formObject read-only=ctrl.readOnly></mw-question-offered-answer-list-builder></div><div ng-switch-when=select><mw-question-offered-answer-list-builder question=ctrl.question form-object=ctrl.formObject read-only=ctrl.readOnly disable-other-answer=true></mw-question-offered-answer-list-builder></div><div ng-switch-when=checkbox><mw-question-offered-answer-list-builder question=ctrl.question form-object=ctrl.formObject read-only=ctrl.readOnly></mw-question-offered-answer-list-builder></div><div ng-switch-when=priority><mw-question-priority-list-builder question=ctrl.question read-only=ctrl.readOnly></mw-question-priority-list-builder></div><div ng-switch-when=number class=form-inline><div class="range-config form-inline"><md-input-container><mw-label label-for=question-number-range-min-{{ctrl.id}} label-key=mwForm.question.number.min></mw-label><input ng-attr-id=question-number-range-min-{{ctrl.id}} class=form-control type=number ng-model=ctrl.question.min max={{ctrl.question.max}} ng-readonly=ctrl.readOnly></md-input-container><md-input-container><mw-label label-for=question-number-range-max-{{ctrl.id}} label-key=mwForm.question.number.max></mw-label><input ng-attr-id=question-number-range-max-{{ctrl.id}} class=form-control type=number min={{ctrl.question.min}} ng-model=ctrl.question.max ng-readonly=ctrl.readOnly></md-input-container></div><br><md-input-container><input class=form-control type=number disabled></md-input-container></div><div ng-switch-when=date class=form-inline><md-input-container><input class=form-control type=date disabled></md-input-container></div><div ng-switch-when=datetime class=form-inline><md-input-container><input class=form-control type=datetime disabled></md-input-container></div><div ng-switch-when=time class=form-inline><md-input-container><input class=form-control type=time disabled></md-input-container></div><div ng-switch-when=email class=form-inline><md-input-container><input class=form-control type=email disabled></md-input-container></div><div ng-switch-when=range><div class="range-config form-inline"><md-input-container><mw-label label-for=question-range-from-{{ctrl.id}} label-key=mwForm.question.range.from></mw-label><input ng-attr-id=question-range-from-{{ctrl.id}} type=number ng-model=ctrl.question.min max={{ctrl.question.max}} ng-readonly=ctrl.readOnly></md-input-container><md-input-container><mw-label label-for=question-range-to-{{ctrl.id}} label-key=mwForm.question.range.to></mw-label><input ng-attr-id=question-range-to-{{ctrl.id}} type=number min={{ctrl.question.min}} ng-model=ctrl.question.max ng-readonly=ctrl.readOnly></md-input-container></div><br><div class=mw-range><md-slider min=ctrl.question.min max=ctrl.question.max type=range disabled></md-slider></div></div><div ng-switch-when=url class=form-inline><input class=form-control type=url disabled></div><div ng-switch-when=star class=form-inline><div class="range-config form-inline"><span translate=mwForm.question.star.no>Number of stars</span> <input class=form-control type=number ng-model=ctrl.question.noStars min=3 max=10 step=1 required ng-readonly=ctrl.readOnly ng-init="ctrl.question.noStars = ctrl.question.noStars || 5"></div></div></div><div class=col-sm-12 ng-if="ctrl.question.type==\'grid\'"><mw-question-grid-builder question=ctrl.question read-only=ctrl.readOnly></mw-question-grid-builder></div><div class=col-sm-12 ng-if="ctrl.question.type==\'division\'"><mw-question-division-builder question=ctrl.question read-only=ctrl.readOnly></mw-question-division-builder></div></div><br><br><div layout=row layout-align="start center"><div flex=20><md-button class="md-primary md-raised" type=button role=button ng-click=ctrl.save() translate=mwForm.buttons.questionReady>Ready</md-button></div><div flex><md-checkbox ng-model=ctrl.question.required ng-disabled=ctrl.readOnly flex><span translate=mwForm.question.required>Required</span></md-checkbox></div></div></div><div class=mw-preview ng-if=ctrl.isPreview><div class=mw-question-text>{{ctrl.question.text}} <span ng-if=ctrl.question.required>*</span></div><div class=question-answers ng-switch=ctrl.question.type><div ng-switch-when=text><md-input-container class=md-block><input class=form-control type=text disabled value="{{\'mwForm.question.preview.text\'|ngtranslate}}"></md-input-container></div><div ng-switch-when=number class=form-inline><md-input-container><input class=form-control type=number disabled></md-input-container></div><div ng-switch-when=date class=form-inline><md-input-container><input class=form-control type=date disabled></md-input-container></div><div ng-switch-when=datetime class=form-inline><md-input-container><input class=form-control type=datetime disabled></md-input-container></div><div ng-switch-when=time class=form-inline><md-input-container><input class=form-control type=time disabled></md-input-container></div><div ng-switch-when=email class=form-inline><md-input-container><input class=form-control type=email disabled></md-input-container></div><div ng-switch-when=range class=mw-range><md-slider min=ctrl.question.min max=ctrl.question.max type=range disabled></md-slider></div><div ng-switch-when=url class=form-inline><md-input-container class=md-block><input class=form-control type=url disabled></md-input-container></div><div ng-switch-when=textarea><md-input-container class=md-block><textarea class=form-control type=text disabled>{{\'mwForm.question.preview.textarea\'|ngtranslate}}</textarea></md-input-container></div><div ng-switch-when=radio><md-radio-group disabled><md-radio-button ng-repeat="answer in ctrl.question.offeredAnswers" aria-label="{{ answer.value }}">{{answer.value}}</md-radio-button><div layout=row layout-align="start center" class=mw-question-other-answer ng-if=ctrl.question.otherAnswer><div><md-radio-button disabled><span translate=mwForm.question.preview.otherAnswer>Inna</span>:</md-radio-button></div><div><md-input-container><input type=text class=form-control disabled></md-input-container></div></div></md-radio-group></div><div ng-switch-when=checkbox><div ng-repeat="answer in ctrl.question.offeredAnswers"><md-checkbox disabled>{{answer.value}}</md-checkbox></div><div layout=row layout-align="start center" class=mw-question-other-answer ng-if=ctrl.question.otherAnswer><div><md-checkbox disabled><span translate=mwForm.question.preview.otherAnswer>Inna</span>:</md-checkbox></div><div><md-input-container><input type=text class=form-control disabled></md-input-container></div></div></div><div ng-switch-when=select><md-input-container><md-select ng-disabled=true ng-model=ctrl.selectAnswerMock><md-option ng-repeat="answer in ctrl.question.offeredAnswers" ng-value=answer.id>{{answer.value}}</md-option></md-select></md-input-container></div><div ng-switch-when=grid><div class=table-responsive><table class="mw-data-table mw-no-border" border=0 cellpadding=5 cellspacing=0><thead><tr><td></td><td ng-repeat="col in ctrl.question.grid.cols"><label>{{col.label}}</label></td></tr></thead><tbody><tr ng-repeat="row in ctrl.question.grid.rows"><td>{{row.label}}</td><td ng-repeat="col in ctrl.question.grid.cols" ng-switch=ctrl.question.grid.cellInputType><md-radio-group ng-switch-when=radio><md-radio-button></md-radio-button></md-radio-group><div ng-switch-when=checkbox><md-checkbox></md-checkbox></div><md-input-container ng-switch-default><input ng-attr-type={{ctrl.question.grid.cellInputType}} disabled ng-class="\'form-control\'"></md-input-container></td></tr></tbody></table></div></div><div class=mw-priority-list ng-switch-when=priority><table><thead><tr><th translate=mwForm.question.priority.sorted>Sorted</th><th translate=mwForm.question.priority.available>Available</th></tr></thead><tbody><tr><td class=mw-ordered-items></td><td class=mw-available-items><div class=mw-item ng-repeat="item in ctrl.question.priorityList">{{::item.value}}</div></td></tr></tbody></table></div><div ng-switch-when=division class=mw-division-list><div class=form-inline style="margin-bottom: 5px" ng-repeat="item in ctrl.question.divisionList"><div class=form-group><label>{{item.value}}</label><md-input-container md-no-float><input type=number class=form-control style="width: 80px"></md-input-container><span>{{ctrl.question.unit}}</span></div></div><div class=form-inline style="margin-bottom: 5px"><div class=form-group><label translate=mwForm.question.division.assignedSumLabel>Przydzielono</label><md-input-container md-no-float><input type=number class="form-control strict-validation" style="width: 80px" readonly value=0></md-input-container><span>{{ctrl.question.unit}} <span translate=mwForm.question.division.fromRequiredLabel>z wymaganych</span> <strong>{{ctrl.question.quantity}}</strong> {{ctrl.question.unit}}</span></div></div></div><div ng-switch-when=star class=stars><span ng-repeat="n in [].constructor(ctrl.question.noStars) track by $index"><i class="fa fa-star star"></i></span></div></div></div></div></div>'),e.put("mw-label.html","<label ng-attr-for={{::ctrl.labelFor}} ng-attr-class={{::ctrl.labelClass}}>{{ctrl.labelKey|ngtranslate:ctrl.labelTranslateValues}}</label>"),e.put("mw-question-division-builder.html",'<div class=mw-question-division-builder><div><div><md-input-container><mw-label label-for=division-quantity-{{ctrl.question.id}} label-class="col-sm-2 control-label" label-key=mwForm.question.division.quantity></mw-label><div class="col-sm-10 col-md-8 form-inline"><input ng-attr-id=division-quantity-{{ctrl.question.id}} type=number ng-model=ctrl.question.quantity required class=form-control min=1 ng-readonly=ctrl.readOnly></div></md-input-container><md-input-container><mw-label label-for=division-unit-{{ctrl.question.id}} label-class="col-sm-2 control-label" label-key=mwForm.question.division.unit></mw-label><div class="col-sm-10 col-md-8 form-inline"><input ng-attr-id=division-unit-{{ctrl.question.id}} type=text ng-model=ctrl.question.unit required class=form-control ng-readonly=ctrl.readOnly></div></md-input-container></div></div><div><div class=question-division-list ng-sortable=ctrl.itemsSortableConfig ng-model=ctrl.question.divisionList role=list><div class=mw-question-division-list-item ng-repeat="item in ctrl.question.divisionList" role=listitem><div class=drag-handle ng-if=!ctrl.readOnly><i class="fa fa-arrows-v fa-lg handle-inner"></i></div><md-input-container><input wd-focus-me=ctrl.isNewItem[item.id] type=text ng-model=item.value ng-keypress=ctrl.keyPressedOnInput($event,item) required class="form-control item-value" ng-readonly=ctrl.readOnly></md-input-container><md-button role=button class="md-raised md-icon-button remove-item-button" ng-click=ctrl.removeItem(item) ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.remove\' | ngtranslate}}"><md-tooltip md-direction=top>{{\'mwForm.buttons.remove\' | ngtranslate}}</md-tooltip><i class="fa fa-times"></i></md-button></div></div><div class="mw-question-division-list-item add-new-item-widget"><div class=drag-handle></div><md-input-container><span ng-click=ctrl.addNewItem() role=button ng-if=!ctrl.readOnly><input type=text required class=form-control value="{{\'mwForm.question.priority.clickToAddItem\'|ngtranslate}}"></span></md-input-container></div></div></div>'),e.put("mw-question-grid-builder.html",'<div class=mw-question-grid-builder><div class=mw-grid-rows-builder><div><div style="margin-top: 20px;" layout=row layout-align="start center"><md-input-container flex-gt-md=30><mw-label label-for=mw-grid-cell-input-type-{{ctrl.question.id}} label-class="col-sm-2 control-label" label-key=mwForm.question.grid.cellInputType></mw-label><md-select ng-attr-id=mw-grid-cell-input-type-{{ctrl.question.id}} ng-model=ctrl.question.grid.cellInputType ng-disabled=ctrl.readOnly required><md-option ng-repeat="opt in ctrl.cellInputTypes" ng-value=opt>{{\'mwForm.question.grid.cellInputTypes.\'+opt|ngtranslate}}</md-option></md-select></md-input-container></div></div><div class=mw-grid-row-list ng-sortable=ctrl.rowsSortableConfig ng-model=ctrl.question.grid.rows role=list><div class="mw-grid-item form-group" ng-repeat="row in ctrl.question.grid.rows" role=listitem layout=row layout-align="start center"><div flex-gt-xs=20><mw-label label-for=mw-grid-row-{{row.id}}-label label-class=col-sm-2 label-key=mwForm.question.grid.rowLabel label-translate-values="{row: row.orderNo}"></mw-label></div><div flex><div class=drag-handle><i class="fa fa-arrows-v fa-lg handle-inner"></i></div><md-input-container><input ng-attr-id=mw-grid-row-{{row.id}}-label wd-focus-me=ctrl.isNewInput[row.id] type=text ng-model=row.label ng-keypress="ctrl.keyPressedOnInput($event,row, \'row\')" required class="form-control mw-item-label-value" ng-readonly=ctrl.readOnly></md-input-container><md-button role=button class="md-raised md-icon-button remove-item-button" ng-click=ctrl.removeRow(row) ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.remove\' | ngtranslate}}"><md-tooltip md-direction=top>{{\'mwForm.buttons.remove\' | ngtranslate}}</md-tooltip><i class="fa fa-times"></i></md-button></div></div></div><div class="mw-grid-item form-group add-new-item-widget" ng-if=!ctrl.readOnly layout=row layout-align="start center"><div flex-gt-xs=20><label translate=mwForm.question.grid.rowLabel translate-values="{row: ctrl.question.grid.rows.length+1}">Etykieta wiersza {{ctrl.question.grid.rows.length+1}}</label></div><div flex><div class=drag-handle></div><span ng-click=ctrl.addNewRow() role=button><md-input-container><input type=text required class=form-control value="{{\'mwForm.question.grid.clickToAddRow\'|ngtranslate}}"></md-input-container></span></div></div></div><div class=row><div class="mw-grid-separator col-sm-9 col-sm-offset-1"></div></div><div class="form-horizontal mw-grid-cols-builder"><div class=mw-grid-col-list ng-sortable=ctrl.colsSortableConfig ng-model=ctrl.question.grid.cols role=list><div class="mw-grid-item form-group" ng-repeat="col in ctrl.question.grid.cols" role=listitem layout=row layout-align="start center"><div flex-gt-xs=20><mw-label label-for=mw-grid-col-{{col.id}}-label label-class="col-sm-2 control-label" label-key=mwForm.question.grid.columnLabel label-translate-values="{col: col.orderNo}"></mw-label></div><div flex><div class=drag-handle><i class="fa fa-arrows-v fa-lg handle-inner"></i></div><md-input-container><input ng-attr-id=mw-grid-col-{{col.id}}-label wd-focus-me=ctrl.isNewInput[col.id] type=text ng-model=col.label ng-keypress="ctrl.keyPressedOnInput($event,col, \'col\')" required class="form-control mw-item-label-value" ng-readonly=ctrl.readOnly></md-input-container><md-button role=button class="md-raised md-icon-button remove-item-button" ng-click=ctrl.removeCol(col) ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.remove\' | ngtranslate}}"><md-tooltip md-direction=top>{{\'mwForm.buttons.remove\' | ngtranslate}}</md-tooltip><i class="fa fa-times"></i></md-button></div></div></div><div class="mw-grid-item form-group add-new-item-widget" ng-if=!ctrl.readOnly layout=row layout-align="start center"><div flex-gt-xs=20><label class="col-sm-2 control-label" translate=mwForm.question.grid.columnLabel translate-values="{col: ctrl.question.grid.cols.length+1}">Etykieta kolumny {{ctrl.question.grid.cols.length+1}}</label></div><div flex><div class=drag-handle></div><span ng-click=ctrl.addNewCol() role=button><md-input-container><input type=text required class=form-control value="{{\'mwForm.question.grid.clickToAddColumn\'|ngtranslate}}"></md-input-container></span></div></div></div></div>'),e.put("mw-question-offered-answer-list-builder.html",'<div class=question-offered-answer-list-builder><div class=question-offered-answer-list ng-sortable=ctrl.offeredAnswersSortableConfig ng-model=ctrl.question.offeredAnswers role=list><div class=mw-question-offered-answer ng-repeat="answer in ctrl.question.offeredAnswers" role=listitem><div class=drag-handle ng-if=!ctrl.readOnly><i class="fa fa-arrows-v fa-lg handle-inner"></i></div><div class=option-type-indicator><i ng-if="ctrl.question.type==\'radio\'" class="fa fa-circle-thin fa-fw"></i> <i ng-if="ctrl.question.type==\'checkbox\'" class="fa fa-square-o fa-fw"></i></div><md-input-container><input wd-focus-me=ctrl.isNewAnswer[answer.id] type=text ng-model=answer.value ng-keypress=ctrl.keyPressedOnInput($event,answer) required class="form-control offered-answer-value" ng-readonly=ctrl.readOnly></md-input-container><md-button role=button class="md-raised md-icon-button remove-item-button" ng-click=ctrl.removeOfferedAnswer(answer) ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.remove\' | ngtranslate}}"><md-tooltip md-direction=top>{{\'mwForm.buttons.remove\' | ngtranslate}}</md-tooltip><i class="fa fa-times"></i></md-button><span ng-if=ctrl.question.pageFlowModifier class=form-inline><md-input-container><md-select ng-model=answer.pageFlow ng-disabled=ctrl.readOnly><md-option ng-value=pageFlow ng-repeat="pageFlow in ctrl.possiblePageFlow">{{ pageFlow.label|ngtranslate:pageFlow }}</md-option></md-select></md-input-container></span></div></div><div class="mw-question-offered-answer add-new-answer-widget" ng-if=!ctrl.readOnly><div class=drag-handle></div><div class=option-type-indicator><i ng-if="ctrl.question.type==\'radio\'" class="fa fa-circle-thin fa-fw"></i> <i ng-if="ctrl.question.type==\'checkbox\'" class="fa fa-square-o fa-fw"></i></div><span ng-click=ctrl.addNewOfferedAnswer() role=button><md-input-container><input type=text class="form-control offered-answer-value" value="{{\'mwForm.question.buttons.addOption\'|ngtranslate}}"></md-input-container></span> <span class=add-custom-answer ng-if="!ctrl.disableOtherAnswer && !ctrl.question.otherAnswer"><span translate=mwForm.question.orLabel>or</span><md-button role=button ng-click=ctrl.addCustomAnswer() translate=mwForm.question.buttons.addOther>Dodaj "Inne"</md-button></span></div><div class="mw-question-offered-answer custom-answer" ng-if=ctrl.question.otherAnswer><div class=drag-handle ng-if=!ctrl.readOnly></div><div class=option-type-indicator><i ng-if="ctrl.question.type==\'radio\'" class="fa fa-circle-thin fa-fw"></i> <i ng-if="ctrl.question.type==\'checkbox\'" class="fa fa-square-o fa-fw"></i></div><label translate=mwForm.question.otherLabel>Inna:</label><md-input-container><input type=text value="{{\'mwForm.question.userAnswer\'|ngtranslate}}" class="form-control offered-answer-value" readonly></md-input-container><md-button type=button role=button class="md-raised md-icon-button remove-item-button" ng-click=ctrl.removeCustomAnswer() ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.remove\' | ngtranslate}}"><md-tooltip md-direction=top>{{\'mwForm.buttons.remove\' | ngtranslate}}</md-tooltip><i class="fa fa-times"></i></md-button></div></div>'),e.put("mw-question-priority-list-builder.html",'<div class=mw-question-priority-list-builder><div class=question-priority-list ng-sortable=ctrl.itemsSortableConfig ng-model=ctrl.question.priorityList role=list><div class=mw-question-priority-list-item ng-repeat="item in ctrl.question.priorityList" role=listitem><div class=drag-handle ng-if=!ctrl.readOnly><i class="fa fa-arrows-v fa-lg handle-inner"></i></div><md-input-container><input wd-focus-me=ctrl.isNewItem[item.id] type=text ng-model=item.value ng-keypress=ctrl.keyPressedOnInput($event,item) required class="form-control item-value" ng-readonly=ctrl.readOnly></md-input-container><md-button role=button class="md-raised md-icon-button remove-item-button" ng-click=ctrl.removeItem(item) ng-if=!ctrl.readOnly ng-attr-title="{{\'mwForm.buttons.remove\' | ngtranslate}}"><md-tooltip md-direction=top>{{\'mwForm.buttons.remove\' | ngtranslate}}</md-tooltip><i class="fa fa-times"></i></md-button></div></div><div class="mw-question-priority-list-item add-new-item-widget"><div class=drag-handle></div><span ng-click=ctrl.addNewItem() role=button><md-input-container><input type=text required class=form-control value="{{\'mwForm.question.priority.clickToAddItem\'|ngtranslate}}"></md-input-container></span></div></div>')}]),angular.module("mwFormViewer",["ngSanitize","ui.bootstrap","ng-sortable","pascalprecht.translate"]).config(["$translateProvider",function(e){e.useStaticFilesLoader({prefix:"bower_components/insight-surveys/dist/i18n/",suffix:"/angular-surveys.json"}),e.useSanitizeValueStrategy("sanitize"),e.preferredLanguage("en")}]).filter("ngtranslate",["$parse","$translate",function(a,o){"use strict";var e=function(e,t,n,r){if(!angular.isObject(t)){var i=this||{__SCOPE_IS_NOT_AVAILABLE:"More info at https://github.com/angular/angular.js/commit/8863b9d04c722b278fa93c5d66ad1e578ad6eb1f"};t=a(t)(i)}return o.instant(e,t,n,r)};return o.statefulFilter()&&(e.$stateful=!0),e}]),angular.module("mwFormViewer").directive("mwPriorityList",function(){return{replace:!0,restrict:"AE",require:"^mwFormQuestion",scope:{question:"=",questionResponse:"=",readOnly:"=?",options:"=?"},templateUrl:"mw-priority-list.html",controllerAs:"ctrl",bindToController:!0,controller:function(){function n(e){if(e)for(var t=0;t<e.length;t++){e[t].priority=t+1}}var r=this;this.$onInit=function(){r.questionResponse.priorityList||(r.questionResponse.priorityList=[]),r.idToItem={},r.questionResponse.priorityList.sort(function(e,t){return e.priority-t.priority}),r.availableItems=[],r.question.priorityList.forEach(function(t){r.idToItem[t.id]=t,r.questionResponse.priorityList.some(function(e){return t.id==e.id})||r.availableItems.push({priority:null,id:t.id})}),r.allItemsOrdered=0==r.availableItems.length||null;var e={disabled:r.readOnly,ghostClass:"beingDragged"};r.orderedConfig=angular.extend({},e,{group:{name:"A",pull:!1,put:["B"]},onEnd:function(e,t){n(r.questionResponse.priorityList)}}),r.availableConfig=angular.extend({},e,{sort:!1,group:{name:"B",pull:["A"],put:!1},onEnd:function(e,t){n(r.questionResponse.priorityList),r.allItemsOrdered=0==r.availableItems.length||null}})},1===angular.version.major&&angular.version.minor<5&&this.$onInit()},link:function(e,t,n,r){e.ctrl.print=r.print}}}),angular.module("mwFormViewer").directive("mwFormViewer",["$rootScope",function(a){return{replace:!0,restrict:"AE",scope:{formData:"=",responseData:"=",templateData:"=?",readOnly:"=?",options:"=?",formStatus:"=?",onSubmit:"&",api:"=?"},templateUrl:"mw-form-viewer.html",controllerAs:"ctrl",bindToController:!0,controller:["$scope","$timeout","$interpolate",function(e,t,n){function r(){var t=1;void 0!==i.formData.pages&&i.formData.pages.forEach(function(e){void 0!==e.elements&&e.elements.forEach(function(e){"question"==e.type&&void 0!==e.question&&(e.question.number=t++)})})}var i=this;i.$onInit=function(){i.defaultOptions={nestedForm:!1,autoStart:!1,disableSubmit:!1},i.options=angular.extend({},i.defaultOptions,i.options),i.submitStatus="NOT_SUBMITTED",i.formSubmitted=!1,i.formData.pages.sort(function(e,t){return e.number-t.number}),i.pageIdToPage={},i.formData.pages.forEach(function(e){i.pageIdToPage[e.id]=e}),i.buttons={prevPage:{visible:!1,disabled:!1},nextPage:{visible:!1,disabled:!1},submitForm:{visible:!1,disabled:!1}},i.resetPages(),i.api&&(i.api.reset=function(){for(var e in i.responseData)i.responseData.hasOwnProperty(e)&&delete i.responseData[e];i.buttons.submitForm.visible=!1,i.buttons.prevPage.visible=!1,i.buttons.nextPage.visible=!1,i.currentPage=null,t(i.resetPages,0)}),setTimeout(function(){r()},0),e.$watch("ctrl.formData",function(e,t){r()})},i.submitForm=function(){i.formSubmitted=!0,i.submitStatus="IN_PROGRESS",i.setCurrentPage(null),i.onSubmit().then(function(){i.submitStatus="SUCCESS"}).catch(function(){i.submitStatus="ERROR"})},i.setCurrentPage=function(e){return(i.currentPage=e)?(i.setDefaultNextPage(),void i.initResponsesForCurrentPage()):(i.buttons.submitForm.visible=!1,i.buttons.prevPage.visible=!1,void(i.buttons.nextPage.visible=!1))},i.setDefaultNextPage=function(){var e=i.formData.pages.indexOf(i.currentPage);if(i.currentPage.isFirst=0==e,i.currentPage.isLast=e==i.formData.pages.length-1,i.buttons.submitForm.visible=i.currentPage.isLast,i.buttons.prevPage.visible=!i.currentPage.isFirst,i.buttons.nextPage.visible=!i.currentPage.isLast,i.currentPage.isLast?i.nextPage=null:i.nextPage=i.formData.pages[e+1],i.currentPage.pageFlow){var t=!1;i.currentPage.pageFlow.formSubmit?t=!(i.nextPage=null):i.currentPage.pageFlow.page?(i.nextPage=i.pageIdToPage[i.currentPage.pageFlow.page.id],i.buttons.nextPage.visible=!0):i.currentPage.isLast&&(t=!(i.nextPage=null)),i.buttons.submitForm.visible=t,i.buttons.nextPage.visible=!t}},i.initResponsesForCurrentPage=function(){i.currentPage.elements.forEach(function(e){var t=e.question;t&&!i.responseData[t.id]&&(i.responseData[t.id]={})})},i.beginResponse=function(){0<i.formData.pages.length&&(i.setCurrentPage(i.formData.pages[0]),a.$broadcast("mwForm.pageEvents.pageCurrentChanged",{currentPage:i.currentPage}))},i.resetPages=function(){i.prevPages=[],i.currentPage=null,i.nextPage=null,i.formSubmitted=!1,i.options.autoStart&&i.beginResponse()},i.goToPrevPage=function(){var e=i.prevPages.pop();i.setCurrentPage(e),i.updateNextPageBasedOnAllAnswers(),a.$broadcast("mwForm.pageEvents.pageCurrentChanged",{currentPage:i.currentPage})},i.goToNextPage=function(){i.prevPages.push(i.currentPage),i.updateNextPageBasedOnAllAnswers(),i.setCurrentPage(i.nextPage),a.$broadcast("mwForm.pageEvents.pageCurrentChanged",{currentPage:i.currentPage})},i.updateNextPageBasedOnAllAnswers=function(){i.currentPage.elements.forEach(function(e){i.updateNextPageBasedOnPageElementAnswers(e)}),i.buttons.submitForm.visible=!i.nextPage,i.buttons.nextPage.visible=!!i.nextPage},i.updateNextPageBasedOnPageElementAnswers=function(e){var t=e.question;t&&t.pageFlowModifier&&t.offeredAnswers.forEach(function(e){e.pageFlow&&i.responseData[t.id].selectedAnswer==e.id&&(e.pageFlow.formSubmit?i.nextPage=null:e.pageFlow.page&&(i.nextPage=i.pageIdToPage[e.pageFlow.page.id]))})},i.onResponseChanged=function(e){i.setDefaultNextPage(),i.updateNextPageBasedOnAllAnswers()},i.print=function(e){return e&&i.templateData?n(e)(i.templateData):e},1===angular.version.major&&angular.version.minor<5&&i.$onInit()}],link:function(e,t,n){var i=e.ctrl;i.formStatus&&(i.formStatus.form=i.form),e.$on("mwForm.pageEvents.changePage",function(e,t){if(void 0!==t.page&&t.page<i.formData.pages.length){i.resetPages();for(var n=0;n<t.page;n++)i.prevPages.push(i.formData.pages[n]);var r=i.formData.pages[t.page];i.setCurrentPage(r),a.$broadcast("mwForm.pageEvents.pageCurrentChanged",{currentPage:r}),i.updateNextPageBasedOnAllAnswers()}})}}}]),angular.module("mwFormViewer").factory("FormQuestionId",function(){var e=0;return{next:function(){return++e}}}).directive("mwFormQuestion",function(){return{replace:!0,restrict:"AE",require:"^mwFormViewer",scope:{question:"=",questionResponse:"=",readOnly:"=?",options:"=?",onResponseChanged:"&?"},templateUrl:"mw-form-question.html",controllerAs:"ctrl",bindToController:!0,controller:["$timeout","FormQuestionId",function(e,t){var n=this;this.$onInit=function(){n.id=t.next(),"radio"==n.question.type?(n.questionResponse.selectedAnswer||(n.questionResponse.selectedAnswer=null),n.questionResponse.other&&(n.isOtherAnswer=!0)):"checkbox"==n.question.type?(n.questionResponse.selectedAnswers&&n.questionResponse.selectedAnswers.length?n.selectedAnswer=!0:n.questionResponse.selectedAnswers=[],n.questionResponse.other&&(n.isOtherAnswer=!0)):"grid"==n.question.type?n.question.grid.cellInputType||(n.question.grid.cellInputType="radio"):"division"==n.question.type?(n.computeDivisionSum=function(){n.divisionSum=0,n.question.divisionList.forEach(function(e){0==n.questionResponse[e.id]||n.questionResponse[e.id]?n.divisionSum+=n.questionResponse[e.id]:(n.questionResponse[e.id]=null,n.divisionSum+=0)})},n.computeDivisionSum()):"date"!=n.question.type&&"datetime"!=n.question.type&&"time"!=n.question.type||n.questionResponse.answer&&(n.questionResponse.answer=new Date(n.questionResponse.answer)),n.isAnswerSelected=!1,n.initialized=!0},n.selectedAnswerChanged=function(){delete n.questionResponse.other,n.isOtherAnswer=!1,n.answerChanged()},n.otherAnswerRadioChanged=function(){n.isOtherAnswer&&(n.questionResponse.selectedAnswer=null),n.answerChanged()},n.otherAnswerCheckboxChanged=function(){n.isOtherAnswer||delete n.questionResponse.other,n.selectedAnswer=!(!n.questionResponse.selectedAnswers.length&&!n.isOtherAnswer)||null,n.answerChanged()},n.toggleSelectedAnswer=function(e){-1===n.questionResponse.selectedAnswers.indexOf(e.id)?n.questionResponse.selectedAnswers.push(e.id):n.questionResponse.selectedAnswers.splice(n.questionResponse.selectedAnswers.indexOf(e.id),1),n.selectedAnswer=!(!n.questionResponse.selectedAnswers.length&&!n.isOtherAnswer)||null,n.answerChanged()},n.answerChanged=function(){n.onResponseChanged&&n.onResponseChanged()},1===angular.version.major&&angular.version.minor<5&&this.$onInit()}],link:function(e,t,n,r){e.ctrl.print=r.print}}}),angular.module("mwFormViewer").directive("mwFormConfirmationPage",function(){return{replace:!0,restrict:"AE",require:"^mwFormViewer",scope:{submitStatus:"=",confirmationMessage:"=",readOnly:"=?"},templateUrl:"mw-form-confirmation-page.html",controllerAs:"ctrl",bindToController:!0,controller:function(){},link:function(e,t,n,r){e.ctrl.print=r.print}}}),angular.module("mwFormViewer").run(["$templateCache",function(e){e.put("mw-form-confirmation-page.html","<div class=mw-form-confirmation-page><div class=mw-confirmation-message ng-if=\"ctrl.submitStatus=='SUCCESS'\"><span ng-if=ctrl.confirmationMessage>{{::ctrl.print(ctrl.confirmationMessage)}}</span> <span ng-if=!ctrl.confirmationMessage translate=mwForm.confirmationPage.defaultMessage>Twoja odpowiedź została zapisana</span></div><div class=mw-error-message ng-if=\"ctrl.submitStatus=='ERROR'\"><span translate=mwForm.confirmationPage.errorMessage>Bład. Twoja odpowiedź nie została zapisana.</span></div><div class=mw-pending-message ng-if=\"ctrl.submitStatus=='IN_PROGRESS'\"><span translate=mwForm.confirmationPage.pendingMessage>Zapisywanie odpowiedzi w trakcie.</span></div></div>"),e.put("mw-form-question.html",'<div class=mw-form-question><div class=mw-question-text>{{::ctrl.print(ctrl.question.text)}} <span ng-if=ctrl.question.required>*</span></div><div class=mw-question-answers ng-switch=ctrl.question.type><div ng-switch-when=text><md-input-container class=md-block md-no-float><input class=form-control type=text ng-model=ctrl.questionResponse.answer placeholder="{{\'mwForm.question.preview.text\'|ngtranslate}}" ng-required=ctrl.question.required ng-readonly=ctrl.readOnly></md-input-container></div><div ng-switch-when=textarea><md-input-container class=md-block md-no-float><textarea msd-elastic class=form-control ng-model=ctrl.questionResponse.answer placeholder="{{\'mwForm.question.preview.textarea\'|ngtranslate}}" ng-required=ctrl.question.required ng-readonly=ctrl.readOnly></textarea></md-input-container></div><div ng-switch-when=radio><md-radio-group ng-model=ctrl.questionResponse.selectedAnswer ng-required="ctrl.question.required &&!ctrl.isOtherAnswer" ng-disabled=ctrl.readOnly ng-change=ctrl.selectedAnswerChanged()><md-radio-button ng-repeat="answer in ctrl.question.offeredAnswers" aria-label="{{ answer.value }}" ng-value=answer.id name=answer-for-question-{{ctrl.question.id}} ng-readonly=ctrl.readOnly>{{::ctrl.print(answer.value)}}</md-radio-button></md-radio-group><md-radio-group ng-model=ctrl.isOtherAnswer ng-change=ctrl.otherAnswerRadioChanged() ng-disabled=ctrl.readOnly ng-readonly=ctrl.readOnly><div layout=row layout-align="start center" class=mw-question-other-answer ng-if=ctrl.question.otherAnswer><div><md-radio-button ng-model=ctrl.isOtherAnswer ng-value=true name=other-answer-for-question-{{ctrl.question.id}} ng-disabled=ctrl.readOnly ng-readonly=ctrl.readOnly><span translate=mwForm.question.preview.otherAnswer>Inna</span>:</md-radio-button></div><div><md-input-container><input type=text name=other-answer-for-question-{{ctrl.question.id}} ng-model=ctrl.questionResponse.other class=form-control ng-disabled="!ctrl.isOtherAnswer || ctrl.readOnly" ng-required=ctrl.isOtherAnswer></md-input-container></div></div></md-radio-group></div><div ng-switch-when=checkbox><div class=checkbox ng-repeat="answer in ::ctrl.question.offeredAnswers" ng-disabled=ctrl.readOnly ng-readonly=ctrl.readOnly><md-checkbox name=answer-for-question-{{ctrl.question.id}} ng-checked="ctrl.questionResponse.selectedAnswers.indexOf(answer.id) != -1" ng-click=ctrl.toggleSelectedAnswer(answer) ng-disabled=ctrl.readOnly ng-readonly=ctrl.readOnly>{{::ctrl.print(answer.value)}}</md-checkbox></div><div layout=row layout-align="start center" class=mw-question-other-answer ng-if=ctrl.question.otherAnswer><md-checkbox name=answer-for-question-{{ctrl.question.id}} ng-model=ctrl.isOtherAnswer ng-change=ctrl.otherAnswerCheckboxChanged() ng-readonly=ctrl.readOnly ng-disabled=ctrl.readOnly><span translate=mwForm.question.preview.otherAnswer>Inna</span>:</md-checkbox><div><md-input-container><input type=text ng-model=ctrl.questionResponse.other name=other-answer-for-question-{{ctrl.question.id}} class=form-control ng-disabled="!ctrl.isOtherAnswer || ctrl.readOnly" ng-required=ctrl.isOtherAnswer></md-input-container></div></div><input type=hidden ng-model=ctrl.selectedAnswer ng-required="ctrl.question.required &&!ctrl.isOtherAnswer"></div><div ng-switch-when=select><md-input-container><md-select ng-disabled=ctrl.readOnly ng-required=ctrl.question.required ng-model=ctrl.questionResponse.selectedAnswer><md-option ng-repeat="answer in ctrl.question.offeredAnswers" ng-value=answer.id>{{::ctrl.print(answer.value)}}</md-option></md-select></md-input-container></div><div ng-switch-when=grid><div><table class="mw-data-table mw-no-border" border=0 cellpadding=5 cellspacing=0><thead><tr><td></td><td ng-repeat="col in ::ctrl.question.grid.cols"><label>{{::ctrl.print(col.label)}}</label></td></tr></thead><tbody><tr ng-repeat="row in ::ctrl.question.grid.rows"><td>{{::ctrl.print(row.label)}}</td><td ng-repeat="col in ctrl.question.grid.cols" ng-switch=ctrl.question.grid.cellInputType><md-radio-group ng-switch-when=radio ng-model=ctrl.questionResponse[row.id] ng-required=ctrl.question.required ng-disabled=ctrl.readOnly><md-radio-button ng-value=col.id name=answer-for-question-{{row.id}} ng-disabled=ctrl.readOnly></md-radio-button></md-radio-group><div ng-switch-when=checkbox><md-checkbox ng-model=ctrl.questionResponse[row.id][col.id] name=answer-for-question-{{row.id}}-{{col.id}} ng-required=ctrl.question.required ng-disabled=ctrl.readOnly></md-checkbox></div><md-input-container ng-switch-default><input ng-attr-type={{ctrl.question.grid.cellInputType}} ng-model=ctrl.questionResponse[row.id][col.id] name=answer-for-question-{{row.id}}-{{col.id}} ng-required=ctrl.question.required ng-disabled=ctrl.readOnly></md-input-container></td></tr></tbody></table></div></div><div ng-switch-when=division class=mw-division-list ng-form=ctrl.divisionForm><div class=form-inline style="margin-bottom: 5px" ng-repeat="item in ctrl.question.divisionList"><div class=form-group><label>{{::ctrl.print(item.value)}}</label><md-input-container md-no-float><input type=number class=form-control ng-model=ctrl.questionResponse[item.id] min=0 max={{ctrl.question.quantity}} required style="width: 80px" ng-change=ctrl.computeDivisionSum() ng-readonly=ctrl.readOnly></md-input-container><span>{{::ctrl.print(ctrl.question.unit)}}</span></div></div><div class=form-inline style="margin-bottom: 5px"><div class=form-group><label translate=mwForm.question.division.assignedSumLabel>Przydzielono</label><md-input-container md-no-float><input type=number class="form-control strict-validation" ng-model=ctrl.divisionSum min={{ctrl.question.quantity}} max={{ctrl.question.quantity}} style="width: 80px" readonly></md-input-container><span>{{ctrl.question.unit}} <span translate=mwForm.question.division.fromRequiredLabel>z wymaganych</span> <strong>{{ctrl.question.quantity}}</strong> {{ctrl.question.unit}} <i ng-show=ctrl.divisionForm.$valid class="fa fa-check" style=color:#008000;></i></span></div></div></div><mw-priority-list ng-switch-when=priority question-response=ctrl.questionResponse question=ctrl.question read-only=ctrl.readOnly></mw-priority-list><div ng-switch-when=number class=form-inline><md-input-container><input class=form-control min={{ctrl.question.min}} max={{ctrl.question.max}} type=number ng-model=ctrl.questionResponse.answer ng-required=ctrl.question.required ng-readonly=ctrl.readOnly></md-input-container></div><div ng-switch-when=date class=form-inline><md-input-container><input class=form-control type=date ng-model=ctrl.questionResponse.answer ng-required=ctrl.question.required ng-readonly=ctrl.readOnly></md-input-container></div><div ng-switch-when=datetime class=form-inline><md-input-container><input class=form-control type=datetime ng-model=ctrl.questionResponse.answer ng-required=ctrl.question.required ng-readonly=ctrl.readOnly></md-input-container></div><div ng-switch-when=time class=form-inline><md-input-container><input class=form-control type=time ng-model=ctrl.questionResponse.answer ng-required=ctrl.question.required ng-readonly=ctrl.readOnly></md-input-container></div><div ng-switch-when=email class=form-inline><md-input-container><input class=form-control type=email ng-model=ctrl.questionResponse.answer ng-required=ctrl.question.required ng-readonly=ctrl.readOnly></md-input-container></div><div ng-switch-when=range class=mw-range><md-slider min={{ctrl.question.min}} max={{ctrl.question.max}} type=range ng-model=ctrl.questionResponse.answer ng-required=ctrl.question.required ng-disabled=ctrl.readOnly></md-slider><strong class=mw-range-value-label>{{ctrl.questionResponse.answer}}</strong></div><div ng-switch-when=url class=form-inline><md-input-container><input class=form-control type=url ng-model=ctrl.questionResponse.answer ng-required=ctrl.question.required ng-readonly=ctrl.readOnly></md-input-container></div><div ng-switch-when=star class=stars><input ng-repeat-start="n in [].constructor(ctrl.question.noStars) track by $index" type=radio id="{{\'star\' + (ctrl.question.noStars - $index)}}" ng-model=ctrl.questionResponse.answer ng-value="{{ctrl.question.noStars - $index}}" ng-required=ctrl.question.required> <label for="{{\'star\' + (ctrl.question.noStars - $index)}}" ng-show=!ctrl.readOnly class=star><i class="fa fa-star"></i></label> <span ng-show=ctrl.readOnly class=star><i class="fa fa-star"></i></span> <span ng-repeat-end class=stars-end></span></div></div></div>'),e.put("mw-form-viewer-content.html",'<div class=mw-form-viewer-content><h1 class=form-title>{{ctrl.formData.name}}</h1><div class=mw-title-page ng-if="!ctrl.currentPage && !ctrl.formSubmitted"><div class=mw-form-description>{{ctrl.formData.description}}</div><md-button type=button class="md-raised begin-response-button" ng-click=ctrl.beginResponse() translate=mwForm.buttons.begin>Rozpocznij</md-button></div><div class=mw-form-page ng-if=ctrl.currentPage><h2 class=mw-page-title ng-if="ctrl.currentPage.namedPage && ctrl.currentPage.name">{{ctrl.currentPage.name}}</h2><div class=mw-form-page-element-list><div class=mw-page-element ng-repeat="pageElement in ctrl.currentPage.elements" ng-switch=pageElement.type><mw-form-question ng-switch-when=question question=pageElement.question question-response=ctrl.responseData[pageElement.question.id] read-only=ctrl.readOnly on-response-changed=ctrl.onResponseChanged(pageElement)></mw-form-question><div class=image-element ng-switch-when=image><figure ng-class="\'align-\'+pageElement.image.align"><img ng-src={{pageElement.image.src}} ng-attr-alt=pageElement.image.caption><figcaption ng-if=pageElement.image.caption>{{pageElement.image.caption}}</figcaption></figure></div><div ng-switch-when=paragraph><p ng-bind-html=::ctrl.print(pageElement.paragraph.html)></p></div></div></div></div><mw-form-confirmation-page ng-if=ctrl.formSubmitted confirmation-message=ctrl.formData.confirmationMessage submit-status=ctrl.submitStatus></mw-form-confirmation-page><div class=mw-form-action-list><md-button type=button ng-if=ctrl.buttons.prevPage.visible class="md-raised prev-page-button" ng-click=ctrl.goToPrevPage()><i class="fa fa-chevron-left"></i> <span translate=mwForm.buttons.back>Wstecz</span></md-button><md-button type=button ng-disabled=ctrl.form.$invalid ng-if=ctrl.buttons.nextPage.visible class="md-raised next-page-button" ng-click=ctrl.goToNextPage()><span translate=mwForm.buttons.next>Dalej</span> <i class="fa fa-chevron-right"></i></md-button><md-button type=submit ng-disabled="ctrl.options.disableSubmit || ctrl.form.$invalid" ng-if="ctrl.buttons.submitForm.visible && !ctrl.readOnly" class="md-raised next-page-button" ng-click=ctrl.submitForm()><span translate=mwForm.buttons.submit>Submit</span></md-button></div></div>'),e.put("mw-form-viewer.html","<div class=mw-form-viewer><form ng-if=!ctrl.options.nestedForm name=ctrl.form role=form novalidate ng-include=\"'mw-form-viewer-content.html'\"></form><div ng-if=ctrl.options.nestedForm ng-form=ctrl.form ng-include=\"'mw-form-viewer-content.html'\"></div></div>"),e.put("mw-priority-list.html",'<div class=mw-priority-list><table><thead><tr><th translate=mwForm.question.priority.sorted>Sorted</th><th translate=mwForm.question.priority.available>Available</th></tr></thead><tbody><tr><td class=mw-ordered-items ng-sortable=ctrl.orderedConfig ng-model=ctrl.questionResponse.priorityList><div class=mw-item ng-repeat="item in ctrl.questionResponse.priorityList"><strong>{{$index+1}}.</strong> {{::ctrl.print(ctrl.idToItem[item.id].value)}}</div></td><td class=mw-available-items ng-sortable=ctrl.availableConfig ng-model=ctrl.availableItems><div class=mw-item ng-repeat="item in ctrl.availableItems">{{::ctrl.print(ctrl.idToItem[item.id].value)}}</div></td></tr></tbody></table><input type=hidden ng-model=ctrl.allItemsOrdered ng-required=ctrl.question.required></div>')}]),function(e,t){"object"==typeof exports&&exports&&"string"!=typeof exports.nodeName?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):(e.Mustache={},t(e.Mustache))}(this,function(w){var t=Object.prototype.toString,C=Array.isArray||function(e){return"[object Array]"===t.call(e)};function l(e){return"function"==typeof e}function A(e){return e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function s(e,t){return null!=e&&"object"==typeof e&&t in e}var r=RegExp.prototype.test;var i=/\S/;function S(e){return t=i,n=e,!r.call(t,n);var t,n}var n={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;","`":"&#x60;","=":"&#x3D;"};var T=/\s*/,x=/\s+/,k=/\s*=/,E=/\s*\}/,D=/#|\^|\/|>|\{|&|=|!/;function I(e){this.string=e,this.tail=e,this.pos=0}function a(e,t){this.view=e,this.cache={".":this.view},this.parent=t}function e(){this.cache={}}I.prototype.eos=function(){return""===this.tail},I.prototype.scan=function(e){var t=this.tail.match(e);if(!t||0!==t.index)return"";var n=t[0];return this.tail=this.tail.substring(n.length),this.pos+=n.length,n},I.prototype.scanUntil=function(e){var t,n=this.tail.search(e);switch(n){case-1:t=this.tail,this.tail="";break;case 0:t="";break;default:t=this.tail.substring(0,n),this.tail=this.tail.substring(n)}return this.pos+=t.length,t},a.prototype.push=function(e){return new a(e,this)},a.prototype.lookup=function(e){var t,n=this.cache;if(n.hasOwnProperty(e))t=n[e];else{for(var r,i,a=this,o=!1;a;){if(0<e.indexOf("."))for(t=a.view,r=e.split("."),i=0;null!=t&&i<r.length;)i===r.length-1&&(o=s(t,r[i])),t=t[r[i++]];else t=a.view[e],o=s(a.view,e);if(o)break;a=a.parent}n[e]=t}return l(t)&&(t=t.call(this.view)),t},e.prototype.clearCache=function(){this.cache={}},e.prototype.parse=function(e,t){var n=this.cache,r=n[e];return null==r&&(r=n[e]=function(e,t){if(!e)return[];var n,r,i,a=[],o=[],s=[],c=!1,l=!1;function u(){if(c&&!l)for(;s.length;)delete o[s.pop()];else s=[];l=c=!1}function f(e){if("string"==typeof e&&(e=e.split(x,2)),!C(e)||2!==e.length)throw new Error("Invalid tags: "+e);n=new RegExp(A(e[0])+"\\s*"),r=new RegExp("\\s*"+A(e[1])),i=new RegExp("\\s*"+A("}"+e[1]))}f(t||w.tags);for(var d,h,p,m,g,_,b=new I(e);!b.eos();){if(d=b.pos,p=b.scanUntil(n))for(var v=0,y=p.length;v<y;++v)S(m=p.charAt(v))?s.push(o.length):l=!0,o.push(["text",m,d,d+1]),d+=1,"\n"===m&&u();if(!b.scan(n))break;if(c=!0,h=b.scan(D)||"name",b.scan(T),"="===h?(p=b.scanUntil(k),b.scan(k),b.scanUntil(r)):"{"===h?(p=b.scanUntil(i),b.scan(E),b.scanUntil(r),h="&"):p=b.scanUntil(r),!b.scan(r))throw new Error("Unclosed tag at "+b.pos);if(g=[h,p,d,b.pos],o.push(g),"#"===h||"^"===h)a.push(g);else if("/"===h){if(!(_=a.pop()))throw new Error('Unopened section "'+p+'" at '+d);if(_[1]!==p)throw new Error('Unclosed section "'+_[1]+'" at '+d)}else"name"===h||"{"===h||"&"===h?l=!0:"="===h&&f(p)}if(_=a.pop())throw new Error('Unclosed section "'+_[1]+'" at '+b.pos);return function(e){for(var t,n=[],r=n,i=[],a=0,o=e.length;a<o;++a)switch((t=e[a])[0]){case"#":case"^":r.push(t),i.push(t),r=t[4]=[];break;case"/":i.pop()[5]=t[2],r=0<i.length?i[i.length-1][4]:n;break;default:r.push(t)}return n}(function(e){for(var t,n,r=[],i=0,a=e.length;i<a;++i)(t=e[i])&&("text"===t[0]&&n&&"text"===n[0]?(n[1]+=t[1],n[3]=t[3]):(r.push(t),n=t));return r}(o))}(e,t)),r},e.prototype.render=function(e,t,n){var r=this.parse(e),i=t instanceof a?t:new a(t);return this.renderTokens(r,i,n,e)},e.prototype.renderTokens=function(e,t,n,r){for(var i,a,o,s="",c=0,l=e.length;c<l;++c)o=void 0,"#"===(a=(i=e[c])[0])?o=this.renderSection(i,t,n,r):"^"===a?o=this.renderInverted(i,t,n,r):">"===a?o=this.renderPartial(i,t,n,r):"&"===a?o=this.unescapedValue(i,t):"name"===a?o=this.escapedValue(i,t):"text"===a&&(o=this.rawValue(i)),void 0!==o&&(s+=o);return s},e.prototype.renderSection=function(e,t,n,r){var i=this,a="",o=t.lookup(e[1]);if(o){if(C(o))for(var s=0,c=o.length;s<c;++s)a+=this.renderTokens(e[4],t.push(o[s]),n,r);else if("object"==typeof o||"string"==typeof o||"number"==typeof o)a+=this.renderTokens(e[4],t.push(o),n,r);else if(l(o)){if("string"!=typeof r)throw new Error("Cannot use higher-order sections without the original template");null!=(o=o.call(t.view,r.slice(e[3],e[5]),function(e){return i.render(e,t,n)}))&&(a+=o)}else a+=this.renderTokens(e[4],t,n,r);return a}},e.prototype.renderInverted=function(e,t,n,r){var i=t.lookup(e[1]);if(!i||C(i)&&0===i.length)return this.renderTokens(e[4],t,n,r)},e.prototype.renderPartial=function(e,t,n){if(n){var r=l(n)?n(e[1]):n[e[1]];return null!=r?this.renderTokens(this.parse(r),t,n,r):void 0}},e.prototype.unescapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return n},e.prototype.escapedValue=function(e,t){var n=t.lookup(e[1]);if(null!=n)return w.escape(n)},e.prototype.rawValue=function(e){return e[1]},w.name="mustache.js",w.version="2.3.2",w.tags=["{{","}}"];var o=new e;return w.clearCache=function(){return o.clearCache()},w.parse=function(e,t){return o.parse(e,t)},w.render=function(e,t,n){if("string"!=typeof e)throw new TypeError('Invalid template! Template should be a "string" but "'+(C(r=e)?"array":typeof r)+'" was given as the first argument for mustache#render(template, view, partials)');var r;return o.render(e,t,n)},w.to_html=function(e,t,n,r){var i=w.render(e,t,n);if(!l(r))return i;r(i)},w.escape=function(e){return String(e).replace(/[&<>"'`=\/]/g,function(e){return n[e]})},w.Scanner=I,w.Context=a,w.Writer=e,w}),function(e,t){if("function"==typeof define&&define.amd)define(["moment"],t);else if("object"==typeof exports)try{module.exports=t(require("moment"))}catch(e){module.exports=t}e&&(e.momentDurationFormatSetup=e.moment?t(e.moment):t)}(this,function(ee){var te=!1,S=!1,ne=!1,T=!1,re="escape years months weeks days hours minutes seconds milliseconds general".split(" "),ie=[{type:"seconds",targets:[{type:"minutes",value:60},{type:"hours",value:3600},{type:"days",value:86400},{type:"weeks",value:604800},{type:"months",value:2678400},{type:"years",value:31536e3}]},{type:"minutes",targets:[{type:"hours",value:60},{type:"days",value:1440},{type:"weeks",value:10080},{type:"months",value:44640},{type:"years",value:525600}]},{type:"hours",targets:[{type:"days",value:24},{type:"weeks",value:168},{type:"months",value:744},{type:"years",value:8760}]},{type:"days",targets:[{type:"weeks",value:7},{type:"months",value:31},{type:"years",value:365}]},{type:"months",targets:[{type:"years",value:12}]}];function ae(e,t){return!(t.length>e.length)&&-1!==e.indexOf(t)}function x(e){for(var t="";e;)t+="0",e-=1;return t}function k(e,t){var n=e+"+"+he(ye(t).sort(),function(e){return e+":"+t[e]}).join(",");return k.cache[n]||(k.cache[n]=Intl.NumberFormat(e,t)),k.cache[n]}function oe(e,t,n){var r,i,a,o=t.useToLocaleString,s=t.useGrouping,c=s&&t.grouping.slice(),l=t.maximumSignificantDigits,u=t.minimumIntegerDigits||1,f=t.fractionDigits||0,d=t.groupingSeparator,h=t.decimalSeparator;if(o&&n){var p={minimumIntegerDigits:u,useGrouping:s};if(f&&(p.maximumFractionDigits=f,p.minimumFractionDigits=f),l&&0<e&&(p.maximumSignificantDigits=l),ne){var m;if(!T)(m=ve({},t)).useGrouping=!1,m.decimalSeparator=".",e=parseFloat(oe(e,m),10);return k(n,p).format(e)}return S||((m=ve({},t)).useGrouping=!1,m.decimalSeparator=".",e=parseFloat(oe(e,m),10)),e.toLocaleString(n,p)}var g=(l?e.toPrecision(l+1):e.toFixed(f+1)).split("e");a=g[1]||"",i=(g=g[0].split("."))[1]||"";var _=(r=g[0]||"").length,b=i.length,v=_+b,y=r+i;(l&&v===l+1||!l&&b===f+1)&&((y=function(e){for(var t=e.split("").reverse(),n=0,r=!0;r&&n<t.length;)n?"9"===t[n]?t[n]="0":(t[n]=(parseInt(t[n],10)+1).toString(),r=!1):(parseInt(t[n],10)<5&&(r=!1),t[n]="0"),n+=1;return r&&t.push("1"),t.reverse().join("")}(y)).length===v+1&&(_+=1),b&&(y=y.slice(0,-1)),r=y.slice(0,_),i=y.slice(_)),l&&(i=i.replace(/0*$/,""));var w=parseInt(a,10);0<w?i=i.length<=w?(r+=i+=x(w-i.length),""):(r+=i.slice(0,w),i.slice(w)):w<0&&(i=x(Math.abs(w)-r.length)+r+i,r="0"),l||((i=i.slice(0,f)).length<f&&(i+=x(f-i.length)),r.length<u&&(r=x(u-r.length)+r));var C,A="";if(s)for(g=r;g.length;)c.length&&(C=c.shift()),A&&(A=d+A),A=g.slice(-C)+A,g=g.slice(0,-C);else A=r;return i&&(A=A+h+i),A}function se(e,t){return e.label.length>t.label.length?-1:e.label.length<t.label.length?1:0}k.cache={};var ce={durationLabelsStandard:{S:"millisecond",SS:"milliseconds",s:"second",ss:"seconds",m:"minute",mm:"minutes",h:"hour",hh:"hours",d:"day",dd:"days",w:"week",ww:"weeks",M:"month",MM:"months",y:"year",yy:"years"},durationLabelsShort:{S:"msec",SS:"msecs",s:"sec",ss:"secs",m:"min",mm:"mins",h:"hr",hh:"hrs",d:"dy",dd:"dys",w:"wk",ww:"wks",M:"mo",MM:"mos",y:"yr",yy:"yrs"},durationTimeTemplates:{HMS:"h:mm:ss",HM:"h:mm",MS:"m:ss"},durationLabelTypes:[{type:"standard",string:"__"},{type:"short",string:"_"}],durationPluralKey:function(e,t,n){return 1===t&&null===n?e:e+e}};function le(e){return"[object Array]"===Object.prototype.toString.call(e)}function ue(e){return"[object Object]"===Object.prototype.toString.call(e)}function fe(e,t){var n,r=0,i=e&&e.length||0;for("function"!=typeof t&&(n=t,t=function(e){return e===n});r<i;){if(t(e[r]))return e[r];r+=1}}function de(e,t){var n=0,r=e.length;if(e&&r)for(;n<r;){if(!1===t(e[n],n))return;n+=1}}function he(e,t){var n=0,r=e.length,i=[];if(!e||!r)return i;for(;n<r;)i[n]=t(e[n],n),n+=1;return i}function pe(e,t){return he(e,function(e){return e[t]})}function me(e){var t=[];return de(e,function(e){e&&t.push(e)}),t}function ge(e){var t=[];return de(e,function(e){fe(t,e)||t.push(e)}),t}function _e(e,n){var r=[];return de(e,function(t){de(n,function(e){t===e&&r.push(t)})}),ge(r)}function be(n,r){var i=[];return de(n,function(e,t){if(!r(e))return i=n.slice(t),!1}),i}function ve(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e}function ye(e){var t=[];for(var n in e)e.hasOwnProperty(n)&&t.push(n);return t}function we(e,t){var n=0,r=e.length;if(!e||!r)return!1;for(;n<r;){if(!0===t(e[n],n))return!0;n+=1}return!1}function e(e){return"3.6"===e(3.55,"en",{useGrouping:!1,minimumIntegerDigits:1,minimumFractionDigits:1,maximumFractionDigits:1})}function t(e){var t=!0;return!!(t=(t=(t=t&&"1"===e(1,"en",{minimumIntegerDigits:1}))&&"01"===e(1,"en",{minimumIntegerDigits:2}))&&"001"===e(1,"en",{minimumIntegerDigits:3}))&&(!!(t=(t=(t=(t=t&&"100"===e(99.99,"en",{maximumFractionDigits:0,minimumFractionDigits:0}))&&"100.0"===e(99.99,"en",{maximumFractionDigits:1,minimumFractionDigits:1}))&&"99.99"===e(99.99,"en",{maximumFractionDigits:2,minimumFractionDigits:2}))&&"99.990"===e(99.99,"en",{maximumFractionDigits:3,minimumFractionDigits:3}))&&(!!(t=(t=(t=(t=(t=t&&"100"===e(99.99,"en",{maximumSignificantDigits:1}))&&"100"===e(99.99,"en",{maximumSignificantDigits:2}))&&"100"===e(99.99,"en",{maximumSignificantDigits:3}))&&"99.99"===e(99.99,"en",{maximumSignificantDigits:4}))&&"99.99"===e(99.99,"en",{maximumSignificantDigits:5}))&&!!(t=(t=t&&"1,000"===e(1e3,"en",{useGrouping:!0}))&&"1000"===e(1e3,"en",{useGrouping:!1}))))}function n(){var n,e=[].slice.call(arguments),r={};if(de(e,function(e,t){if(!t){if(!le(e))throw"Expected array as the first argument to durationsFormat.";n=e}"string"!=typeof e&&"function"!=typeof e?"number"!=typeof e?ue(e)&&ve(r,e):r.precision=e:r.template=e}),!n||!n.length)return[];r.returnMomentTypes=!0;var t,i=he(n,function(e){return e.format(r)}),a=_e(re,ge(pe((t=[],de(i,function(e){t=t.concat(e)}),t),"type"))),o=r.largest;return o&&(a=a.slice(0,o)),r.returnMomentTypes=!1,r.outputTypes=a,he(n,function(e){return e.format(r)})}function r(){var e=[].slice.call(arguments),c=ve({},this.format.defaults),t=this.asMilliseconds(),n=this.asMonths();"function"==typeof this.isValid&&!1===this.isValid()&&(n=t=0);var r=t<0,l=ee.duration(Math.abs(t),"milliseconds"),u=ee.duration(Math.abs(n),"months");de(e,function(e){"string"!=typeof e&&"function"!=typeof e?"number"!=typeof e?ue(e)&&ve(c,e):c.precision=e:c.template=e});var f={years:"y",months:"M",weeks:"w",days:"d",hours:"h",minutes:"m",seconds:"s",milliseconds:"S"},i={escape:/\[(.+?)\]/,years:/\*?[Yy]+/,months:/\*?M+/,weeks:/\*?[Ww]+/,days:/\*?[Dd]+/,hours:/\*?[Hh]+/,minutes:/\*?m+/,seconds:/\*?s+/,milliseconds:/\*?S+/,general:/.+?/};c.types=re;var a=function(t){return fe(re,function(e){return i[e].test(t)})},o=new RegExp(he(re,function(e){return i[e].source}).join("|"),"g");c.duration=this;var s="function"==typeof c.template?c.template.apply(c):c.template,d=c.outputTypes,h=c.returnMomentTypes,p=c.largest,m=[];d||(le(c.stopTrim)&&(c.stopTrim=c.stopTrim.join("")),c.stopTrim&&de(c.stopTrim.match(o),function(e){var t=a(e);"escape"!==t&&"general"!==t&&m.push(t)}));var g=ee.localeData();g||(g={}),de(ye(ce),function(e){"function"!=typeof ce[e]?g["_"+e]||(g["_"+e]=ce[e]):g[e]||(g[e]=ce[e])}),de(ye(g._durationTimeTemplates),function(e){s=s.replace("_"+e+"_",g._durationTimeTemplates[e])});var _=c.userLocale||ee.locale(),b=c.useLeftUnits,v=c.usePlural,y=c.precision,w=c.forceLength,C=c.useGrouping,A=c.trunc,S=c.useSignificantDigits&&0<y,T=S?c.precision:0,x=T,k=c.minValue,E=!1,D=c.maxValue,I=!1,P=c.useToLocaleString,M=c.groupingSeparator,$=c.decimalSeparator,O=c.grouping;P=P&&(te||ne);var R=c.trim;le(R)&&(R=R.join(" ")),null===R&&(p||D||S)&&(R="all"),null!==R&&!0!==R&&"left"!==R&&"right"!==R||(R="large"),!1===R&&(R="");var N=function(e){return e.test(R)},L=/both/,F=/^all|[^sm]all/,G=0<p||we([/large/,L,F],N),j=we([/small/,L,F],N),B=we([/mid/,F],N),U=we([/final/,F],N),H=he(s.match(o),function(e,t){var n=a(e);return"*"===e.slice(0,1)&&(e=e.slice(1),"escape"!==n&&"general"!==n&&m.push(n)),{index:t,length:e.length,text:"",token:"escape"===n?e.replace(i.escape,"$1"):e,type:"escape"===n||"general"===n?null:n}}),W={index:0,length:0,token:"",text:"",type:null},q=[];b&&H.reverse(),de(H,function(e){if(e.type)return(W.type||W.text)&&q.push(W),void(W=e);b?W.text=e.token+W.text:W.text+=e.token}),(W.type||W.text)&&q.push(W),b&&q.reverse();var z=_e(re,ge(me(pe(q,"type"))));if(!z.length)return pe(q,"text").join("");z=he(z,function(t,e){var n,r=e+1===z.length,i=!e;n="years"===t||"months"===t?u.as(t):l.as(t);var a=Math.floor(n),o=n-a,s=fe(q,function(e){return t===e.type});return i&&D&&D<n&&(I=!0),r&&k&&Math.abs(c.duration.as(t))<k&&(E=!0),i&&null===w&&1<s.length&&(w=!0),l.subtract(a,t),u.subtract(a,t),{rawValue:n,wholeValue:a,decimalValue:r?o:0,isSmallest:r,isLargest:i,type:t,tokenLength:s.length}});var V,Y=A?Math.floor:Math.round,K=function(e,t){var n=Math.pow(10,t);return Y(e*n)/n},Q=!1,X=!1,Z=function(e,t){var n={useGrouping:C,groupingSeparator:M,decimalSeparator:$,grouping:O,useToLocaleString:P};return S&&(T<=0?(e.rawValue=0,e.wholeValue=0,e.decimalValue=0):(n.maximumSignificantDigits=T,e.significantDigits=T)),I&&!X&&(e.isLargest?e.wholeValue=D:e.wholeValue=0,e.decimalValue=0),E&&!X&&(e.isSmallest?e.wholeValue=k:e.wholeValue=0,e.decimalValue=0),e.isSmallest||e.significantDigits&&e.significantDigits-e.wholeValue.toString().length<=0?y<0?e.value=K(e.wholeValue,y):0===y?e.value=Y(e.wholeValue+e.decimalValue):S?(e.value=A?K(e.rawValue,T-e.wholeValue.toString().length):e.rawValue,e.wholeValue&&(T-=e.wholeValue.toString().length)):(n.fractionDigits=y,e.value=A?e.wholeValue+K(e.decimalValue,y):e.wholeValue+e.decimalValue):S&&e.wholeValue?(e.value=Math.round(K(e.wholeValue,e.significantDigits-e.wholeValue.toString().length)),T-=e.wholeValue.toString().length):e.value=e.wholeValue,1<e.tokenLength&&(w||Q)&&(n.minimumIntegerDigits=e.tokenLength,X&&n.maximumSignificantDigits<e.tokenLength&&delete n.maximumSignificantDigits),!Q&&(0<e.value||""===R||fe(m,e.type)||fe(d,e.type))&&(Q=!0),e.formattedValue=oe(e.value,n,_),n.useGrouping=!1,n.decimalSeparator=".",e.formattedValueEn=oe(e.value,n,"en"),2===e.tokenLength&&"milliseconds"===e.type&&(e.formattedValueMS=oe(e.value,{minimumIntegerDigits:3,useGrouping:!1},"en").slice(0,2)),e};if(1<(z=me(z=he(z,Z))).length){var J=function(t){return fe(z,function(e){return e.type===t})};de(ie,function(e){var n=J(e.type);n&&de(e.targets,function(e){var t=J(e.type);t&&parseInt(n.formattedValueEn,10)===e.value&&(n.rawValue=0,n.wholeValue=0,n.decimalValue=0,t.rawValue+=1,t.wholeValue+=1,t.decimalValue=0,t.formattedValueEn=t.wholeValue.toString(),X=!0)})})}return X&&(Q=!1,T=x,z=me(z=he(z,Z))),!d||I&&!c.trim?(G&&(z=be(z,function(e){return!e.isSmallest&&!e.wholeValue&&!fe(m,e.type)})),p&&z.length&&(z=z.slice(0,p)),j&&1<z.length&&(V=function(e){return!e.wholeValue&&!fe(m,e.type)&&!e.isLargest},z=be(z.slice().reverse(),V).reverse()),B&&(z=me(z=he(z,function(e,t){return 0<t&&t<z.length-1&&!e.wholeValue?null:e}))),!U||1!==z.length||z[0].wholeValue||!A&&z[0].isSmallest&&z[0].rawValue<k||(z=[])):z=me(z=he(z,function(t){return fe(d,function(e){return t.type===e})?t:null})),h?z:(de(q,function(n){var e=f[n.type],t=fe(z,function(e){return e.type===n.type});if(e&&t){var r=t.formattedValueEn.split(".");r[0]=parseInt(r[0],10),r[1]?r[1]=parseFloat("0."+r[1],10):r[1]=null;var i,a,o,s=g.durationPluralKey(e,r[0],r[1]),c=(i=e,o=[],de(ye(a=g),function(t){if("_durationLabels"===t.slice(0,15)){var n=t.slice(15).toLowerCase();de(ye(a[t]),function(e){e.slice(0,1)===i&&o.push({type:n,key:e,label:a[t][e]})})}}),o),l=!1,u={};de(g._durationLabelTypes,function(t){var e=fe(c,function(e){return e.type===t.type&&e.key===s});e&&(u[e.type]=e.label,ae(n.text,t.string)&&(n.text=n.text.replace(t.string,e.label),l=!0))}),v&&!l&&(c.sort(se),de(c,function(e){return u[e.type]===e.label?!ae(n.text,e.label)&&void 0:ae(n.text,e.label)?(n.text=n.text.replace(e.label,u[e.type]),!1):void 0}))}}),(q=he(q,function(t){if(!t.type)return t.text;var e=fe(z,function(e){return e.type===t.type});if(!e)return"";var n="";return b&&(n+=t.text),(r&&I||!r&&E)&&(n+="< ",E=I=!1),(r&&E||!r&&I)&&(n+="> ",E=I=!1),r&&(0<e.value||""===R||fe(m,e.type)||fe(d,e.type))&&(n+="-",r=!1),"milliseconds"===t.type&&e.formattedValueMS?n+=e.formattedValueMS:n+=e.formattedValue,b||(n+=t.text),n})).join("").replace(/(,| |:|\.)*$/,"").replace(/^(,| |:|\.)*/,""))}function i(){var t=this.duration,e=function(e){return t._data[e]},n=fe(this.types,e),r=function(e,t){for(var n=e.length;n-=1;)if(t(e[n]))return e[n]}(this.types,e);switch(n){case"milliseconds":return"S __";case"seconds":case"minutes":return"*_MS_";case"hours":return"_HMS_";case"days":if(n===r)return"d __";case"weeks":return n===r?"w __":(null===this.trim&&(this.trim="both"),"w __, d __, h __");case"months":if(n===r)return"M __";case"years":return n===r?"y __":(null===this.trim&&(this.trim="both"),"y __, M __, d __");default:return null===this.trim&&(this.trim="both"),"y __, d __, h __, m __, s __"}}function a(e){if(!e)throw"Moment Duration Format init cannot find moment instance.";e.duration.format=n,e.duration.fn.format=r,e.duration.fn.format.defaults={trim:null,stopTrim:null,largest:null,maxValue:null,minValue:null,precision:0,trunc:!1,forceLength:null,userLocale:null,usePlural:!0,useLeftUnits:!1,useGrouping:!0,useSignificantDigits:!1,template:i,useToLocaleString:!0,groupingSeparator:",",decimalSeparator:".",grouping:[3]},e.updateLocale("en",ce)}var o=function(e,t,n){return e.toLocaleString(t,n)};te=function(){try{(0).toLocaleString("i")}catch(e){return"RangeError"===e.name}return!1}()&&t(o),S=te&&e(o);var s=function(e,t,n){if("undefined"!=typeof window&&window&&window.Intl&&window.Intl.NumberFormat)return window.Intl.NumberFormat(t,n).format(e)};return ne=t(s),T=ne&&e(s),a(ee),a}),function(t,o,e){"use strict";if(t&&o){var a=t.navigator.msPointerEnabled;r.prototype={on:function(e,t){e=e.toLowerCase(),this.events.hasOwnProperty(e)||(this.events[e]=[]),this.events[e].push(t)},off:function(e,t){var n,r,i;void 0!==e?(e=e.toLowerCase(),void 0!==t?this.events.hasOwnProperty(e)&&(n=this.events[e],r=t,-1<(i=n.indexOf(r))&&n.splice(i,1)):delete this.events[e]):this.events={}},fire:function(e,t){t=Array.prototype.slice.call(arguments),e=e.toLowerCase();var n=!1;return this.events.hasOwnProperty(e)&&d(this.events[e],function(e){n=!1===e.apply(this,t.slice(1))||n},this),"catchall"!=e&&(t.unshift("catchAll"),n=!1===this.fire.apply(this,t)||n),!n},webkitReadDataTransfer:function(e){var t=this,r=e.dataTransfer.items.length,n=[];function i(e,t){e.relativePath=t.substring(1),n.push(e),o()}function a(e){throw o(),e}function o(){0==--r&&t.addFiles(n,e)}d(e.dataTransfer.items,function(e){var t=e.webkitGetAsEntry();t?t.isFile?i(e.getAsFile(),t.fullPath):function n(t){t.readEntries(function(e){e.length?(r+=e.length,d(e,function(e){if(e.isFile){var t=e.fullPath;e.file(function(e){i(e,t)},a)}else e.isDirectory&&n(e.createReader())}),n(t)):o()},a)}(t.createReader()):o()})},generateUniqueIdentifier:function(e){var t=this.opts.generateUniqueIdentifier;if("function"==typeof t)return t(e);var n=e.relativePath||e.webkitRelativePath||e.fileName||e.name;return e.size+"-"+n.replace(/[^0-9a-zA-Z_-]/gim,"")},uploadNextChunk:function(e){var t=!1;if(this.opts.prioritizeFirstAndLastChunk&&(d(this.files,function(e){return!e.paused&&e.chunks.length&&"pending"===e.chunks[0].status()?(e.chunks[0].send(),!(t=!0)):!e.paused&&1<e.chunks.length&&"pending"===e.chunks[e.chunks.length-1].status()?(e.chunks[e.chunks.length-1].send(),!(t=!0)):void 0}),t))return t;if(d(this.files,function(e){if(e.paused||d(e.chunks,function(e){if("pending"===e.status())return e.send(),!(t=!0)}),t)return!1}),t)return!0;var n=!1;return d(this.files,function(e){if(!e.isComplete())return!(n=!0)}),n||e||u(function(){this.fire("complete")},this),!1},assignBrowse:function(e,r,i,a){e instanceof Element&&(e=[e]),d(e,function(e){var n;"INPUT"===e.tagName&&"file"===e.type?n=e:((n=o.createElement("input")).setAttribute("type","file"),f(n.style,{visibility:"hidden",position:"absolute",width:"1px",height:"1px"}),e.appendChild(n),e.addEventListener("click",function(){n.click()},!1)),this.opts.singleFile||i||n.setAttribute("multiple","multiple"),r&&n.setAttribute("webkitdirectory","webkitdirectory"),d(a,function(e,t){n.setAttribute(t,e)});var t=this;n.addEventListener("change",function(e){e.target.value&&(t.addFiles(e.target.files,e),e.target.value="")},!1)},this)},assignDrop:function(e){void 0===e.length&&(e=[e]),d(e,function(e){e.addEventListener("dragover",this.preventEvent,!1),e.addEventListener("dragenter",this.preventEvent,!1),e.addEventListener("drop",this.onDrop,!1)},this)},unAssignDrop:function(e){void 0===e.length&&(e=[e]),d(e,function(e){e.removeEventListener("dragover",this.preventEvent),e.removeEventListener("dragenter",this.preventEvent),e.removeEventListener("drop",this.onDrop)},this)},isUploading:function(){var t=!1;return d(this.files,function(e){if(e.isUploading())return!(t=!0)}),t},_shouldUploadNext:function(){var t=0,n=!0,r=this.opts.simultaneousUploads;return d(this.files,function(e){d(e.chunks,function(e){if("uploading"===e.status()&&r<=++t)return n=!1})}),n&&t},upload:function(){var e=this._shouldUploadNext();if(!1!==e){this.fire("uploadStart");for(var t=!1,n=1;n<=this.opts.simultaneousUploads-e;n++)t=this.uploadNextChunk(!0)||t;t||u(function(){this.fire("complete")},this)}},resume:function(){d(this.files,function(e){e.isComplete()||e.resume()})},pause:function(){d(this.files,function(e){e.pause()})},cancel:function(){for(var e=this.files.length-1;0<=e;e--)this.files[e].cancel()},progress:function(){var t=0,n=0;return d(this.files,function(e){t+=e.progress()*e.size,n+=e.size}),0<n?t/n:0},addFile:function(e,t){this.addFiles([e],t)},addFiles:function(e,r){var i=[];d(e,function(e){if((!a||a&&0<e.size)&&(e.size%4096!=0||"."!==e.name&&"."!==e.fileName)){var t=this.generateUniqueIdentifier(e);if(this.opts.allowDuplicateUploads||!this.getFromUniqueIdentifier(t)){var n=new s(this,e,t);this.fire("fileAdded",n,r)&&i.push(n)}}},this),this.fire("filesAdded",i,r)&&(d(i,function(e){this.opts.singleFile&&0<this.files.length&&this.removeFile(this.files[0]),this.files.push(e)},this),this.fire("filesSubmitted",i,r))},removeFile:function(e){for(var t=this.files.length-1;0<=t;t--)this.files[t]===e&&(this.files.splice(t,1),e.abort(),this.fire("fileRemoved",e))},getFromUniqueIdentifier:function(t){var n=!1;return d(this.files,function(e){e.uniqueIdentifier===t&&(n=e)}),n},getSize:function(){var t=0;return d(this.files,function(e){t+=e.size}),t},sizeUploaded:function(){var t=0;return d(this.files,function(e){t+=e.sizeUploaded()}),t},timeRemaining:function(){var t=0,n=0;return d(this.files,function(e){e.paused||e.error||(t+=e.size-e.sizeUploaded(),n+=e.averageSpeed)}),t&&!n?Number.POSITIVE_INFINITY:t||n?Math.floor(t/n):0}},s.prototype={measureSpeed:function(){var e=Date.now()-this._lastProgressCallback;if(e){var t=this.flowObj.opts.speedSmoothingFactor,n=this.sizeUploaded();this.currentSpeed=Math.max((n-this._prevUploadedSize)/e*1e3,0),this.averageSpeed=t*this.currentSpeed+(1-t)*this.averageSpeed,this._prevUploadedSize=n}},chunkEvent:function(e,t,n){switch(t){case"progress":if(Date.now()-this._lastProgressCallback<this.flowObj.opts.progressCallbacksInterval)break;this.measureSpeed(),this.flowObj.fire("fileProgress",this,e),this.flowObj.fire("progress"),this._lastProgressCallback=Date.now();break;case"error":this.error=!0,this.abort(!0),this.flowObj.fire("fileError",this,n,e),this.flowObj.fire("error",n,this,e);break;case"success":if(this.error)return;this.measureSpeed(),this.flowObj.fire("fileProgress",this,e),this.flowObj.fire("progress"),this._lastProgressCallback=Date.now(),this.isComplete()&&(this.currentSpeed=0,this.averageSpeed=0,this.flowObj.fire("fileSuccess",this,n,e));break;case"retry":this.flowObj.fire("fileRetry",this,e)}},pause:function(){this.paused=!0,this.abort()},resume:function(){this.paused=!1,this.flowObj.upload()},abort:function(e){this.currentSpeed=0,this.averageSpeed=0;var t=this.chunks;e&&(this.chunks=[]),d(t,function(e){"uploading"===e.status()&&(e.abort(),this.flowObj.uploadNextChunk())},this)},cancel:function(){this.flowObj.removeFile(this)},retry:function(){this.bootstrap(),this.flowObj.upload()},bootstrap:function(){"function"==typeof this.flowObj.opts.initFileFn&&this.flowObj.opts.initFileFn(this),this.abort(!0),this.error=!1,this._prevProgress=0;var e=this.flowObj.opts.forceChunkSize?Math.ceil:Math.floor;this.chunkSize=l(this.flowObj.opts.chunkSize,this);for(var t=Math.max(e(this.size/this.chunkSize),1),n=0;n<t;n++)this.chunks.push(new c(this.flowObj,this,n))},progress:function(){if(this.error)return 1;if(1===this.chunks.length)return this._prevProgress=Math.max(this._prevProgress,this.chunks[0].progress()),this._prevProgress;var t=0;d(this.chunks,function(e){t+=e.progress()*(e.endByte-e.startByte)});var e=t/this.size;return this._prevProgress=Math.max(this._prevProgress,.9999<e?1:e),this._prevProgress},isUploading:function(){var t=!1;return d(this.chunks,function(e){if("uploading"===e.status())return!(t=!0)}),t},isComplete:function(){var n=!1;return d(this.chunks,function(e){var t=e.status();if("pending"===t||"uploading"===t||"reading"===t||1===e.preprocessState||1===e.readState)return!(n=!0)}),!n},sizeUploaded:function(){var t=0;return d(this.chunks,function(e){t+=e.sizeUploaded()}),t},timeRemaining:function(){if(this.paused||this.error)return 0;var e=this.size-this.sizeUploaded();return e&&!this.averageSpeed?Number.POSITIVE_INFINITY:e||this.averageSpeed?Math.floor(e/this.averageSpeed):0},getType:function(){return this.file.type&&this.file.type.split("/")[1]},getExtension:function(){return this.name.substr(2+(~-this.name.lastIndexOf(".")>>>0)).toLowerCase()}},c.prototype={getParams:function(){return{flowChunkNumber:this.offset+1,flowChunkSize:this.chunkSize,flowCurrentChunkSize:this.endByte-this.startByte,flowTotalSize:this.fileObj.size,flowIdentifier:this.fileObj.uniqueIdentifier,flowFilename:this.fileObj.name,flowRelativePath:this.fileObj.relativePath,flowTotalChunks:this.fileObj.chunks.length}},getTarget:function(e,t){return 0==t.length?e:(e.indexOf("?")<0?e+="?":e+="&",e+t.join("&"))},test:function(){this.xhr=new XMLHttpRequest,this.xhr.addEventListener("load",this.testHandler,!1),this.xhr.addEventListener("error",this.testHandler,!1);var e=l(this.flowObj.opts.testMethod,this.fileObj,this),t=this.prepareXhrRequest(e,!0);this.xhr.send(t)},preprocessFinished:function(){this.endByte=this.computeEndByte(),this.preprocessState=2,this.send()},readFinished:function(e){this.readState=2,this.bytes=e,this.send()},send:function(){var e=this.flowObj.opts.preprocess,t=this.flowObj.opts.readFileFn;if("function"==typeof e)switch(this.preprocessState){case 0:return this.preprocessState=1,void e(this);case 1:return}switch(this.readState){case 0:return this.readState=1,void t(this.fileObj,this.startByte,this.endByte,this.fileObj.file.type,this);case 1:return}if(!this.flowObj.opts.testChunks||this.tested){this.loaded=0,this.total=0,this.pendingRetry=!1,this.xhr=new XMLHttpRequest,this.xhr.upload.addEventListener("progress",this.progressHandler,!1),this.xhr.addEventListener("load",this.doneHandler,!1),this.xhr.addEventListener("error",this.doneHandler,!1);var n=l(this.flowObj.opts.uploadMethod,this.fileObj,this),r=this.prepareXhrRequest(n,!1,this.flowObj.opts.method,this.bytes),i=this.flowObj.opts.changeRawDataBeforeSend;"function"==typeof i&&(r=i(this,r)),this.xhr.send(r)}else this.test()},abort:function(){var e=this.xhr;this.xhr=null,e&&e.abort()},status:function(e){return 1===this.readState?"reading":this.pendingRetry||1===this.preprocessState?"uploading":this.xhr?this.xhr.readyState<4?"uploading":-1<this.flowObj.opts.successStatuses.indexOf(this.xhr.status)?"success":-1<this.flowObj.opts.permanentErrors.indexOf(this.xhr.status)||!e&&this.retries>=this.flowObj.opts.maxChunkRetries?"error":(this.abort(),"pending"):"pending"},message:function(){return this.xhr?this.xhr.responseText:""},progress:function(){if(this.pendingRetry)return 0;var e=this.status();return"success"===e||"error"===e?1:"pending"===e?0:0<this.total?this.loaded/this.total:0},sizeUploaded:function(){var e=this.endByte-this.startByte;return"success"!==this.status()&&(e=this.progress()*e),e},prepareXhrRequest:function(e,t,n,r){var i=l(this.flowObj.opts.query,this.fileObj,this,t);i=f(i||{},this.getParams());var a=l(this.flowObj.opts.target,this.fileObj,this,t),o=null;if("GET"===e||"octet"===n){var s=[];d(i,function(e,t){s.push([encodeURIComponent(t),encodeURIComponent(e)].join("="))}),a=this.getTarget(a,s),o=r||null}else o=new FormData,d(i,function(e,t){o.append(t,e)}),void 0!==r&&o.append(this.flowObj.opts.fileParameterName,r,this.filename||this.fileObj.file.name);return this.xhr.open(e,a,!0),this.xhr.withCredentials=this.flowObj.opts.withCredentials,d(l(this.flowObj.opts.headers,this.fileObj,this,t),function(e,t){this.xhr.setRequestHeader(t,e)},this),o}},r.evalOpts=l,r.extend=f,r.each=d,r.FlowFile=s,r.FlowChunk=c,r.version="2.14.1","object"==typeof module&&module&&"object"==typeof module.exports?module.exports=r:(t.Flow=r,"function"==typeof define&&define.amd&&define("flow",[],function(){return r}))}else console.warn("Flowjs needs window and document objects to work");function r(e){if(this.support=!("undefined"==typeof File||"undefined"==typeof Blob||"undefined"==typeof FileList||!Blob.prototype.slice&&!Blob.prototype.webkitSlice&&!Blob.prototype.mozSlice),this.support){this.supportDirectory=/Chrome/.test(t.navigator.userAgent)||/Firefox/.test(t.navigator.userAgent)||/Edge/.test(t.navigator.userAgent),this.files=[],this.defaults={chunkSize:1048576,forceChunkSize:!1,simultaneousUploads:3,singleFile:!1,fileParameterName:"file",progressCallbacksInterval:500,speedSmoothingFactor:.1,query:{},headers:{},withCredentials:!1,preprocess:null,changeRawDataBeforeSend:null,method:"multipart",testMethod:"GET",uploadMethod:"POST",prioritizeFirstAndLastChunk:!1,allowDuplicateUploads:!1,target:"/",testChunks:!0,generateUniqueIdentifier:null,maxChunkRetries:0,chunkRetryInterval:null,permanentErrors:[404,413,415,500,501],successStatuses:[200,201,202],onDropStopPropagation:!1,initFileFn:null,readFileFn:i},this.opts={},this.events={};var n=this;this.onDrop=function(e){n.opts.onDropStopPropagation&&e.stopPropagation(),e.preventDefault();var t=e.dataTransfer;t.items&&t.items[0]&&t.items[0].webkitGetAsEntry?n.webkitReadDataTransfer(e):n.addFiles(t.files,e)},this.preventEvent=function(e){e.preventDefault()},this.opts=r.extend({},this.defaults,e||{})}}function s(e,t,n){this.flowObj=e,this.bytes=null,this.file=t,this.name=t.fileName||t.name,this.size=t.size,this.relativePath=t.relativePath||t.webkitRelativePath||this.name,this.uniqueIdentifier=void 0===n?e.generateUniqueIdentifier(t):n,this.chunkSize=0,this.chunks=[],this.paused=!1,this.error=!1,this.averageSpeed=0,this.currentSpeed=0,this._lastProgressCallback=Date.now(),this._prevUploadedSize=0,this._prevProgress=0,this.bootstrap()}function i(e,t,n,r,i){var a="slice";e.file.slice?a="slice":e.file.mozSlice?a="mozSlice":e.file.webkitSlice&&(a="webkitSlice"),i.readFinished(e.file[a](t,n,r))}function c(e,t,n){this.flowObj=e,this.fileObj=t,this.offset=n,this.tested=!1,this.retries=0,this.pendingRetry=!1,this.preprocessState=0,this.readState=0,this.loaded=0,this.total=0,this.chunkSize=this.fileObj.chunkSize,this.startByte=this.offset*this.chunkSize,this.filename=null,this.computeEndByte=function(){var e=Math.min(this.fileObj.size,(this.offset+1)*this.chunkSize);return this.fileObj.size-e<this.chunkSize&&!this.flowObj.opts.forceChunkSize&&(e=this.fileObj.size),e},this.endByte=this.computeEndByte(),this.xhr=null;var r=this;this.event=function(e,t){(t=Array.prototype.slice.call(arguments)).unshift(r),r.fileObj.chunkEvent.apply(r.fileObj,t)},this.progressHandler=function(e){e.lengthComputable&&(r.loaded=e.loaded,r.total=e.total),r.event("progress",e)},this.testHandler=function(e){var t=r.status(!0);"error"===t?(r.event(t,r.message()),r.flowObj.uploadNextChunk()):"success"===t?(r.tested=!0,r.event(t,r.message()),r.flowObj.uploadNextChunk()):r.fileObj.paused||(r.tested=!0,r.send())},this.doneHandler=function(e){var t=r.status();if("success"===t||"error"===t)delete this.data,r.event(t,r.message()),r.flowObj.uploadNextChunk();else if(!r.fileObj.paused){r.event("retry",r.message()),r.pendingRetry=!0,r.abort(),r.retries++;var n=r.flowObj.opts.chunkRetryInterval;null!==n?setTimeout(function(){r.send()},n):r.send()}}}function l(e,t){return"function"==typeof e&&(t=Array.prototype.slice.call(arguments),e=e.apply(null,t.slice(1))),e}function u(e,t){setTimeout(e.bind(t),0)}function f(n,e){return d(arguments,function(e){e!==n&&d(e,function(e,t){n[t]=e})}),n}function d(e,t,n){var r;if(e)if(void 0!==e.length){for(r=0;r<e.length;r++)if(!1===t.call(n,e[r],r))return}else for(r in e)if(e.hasOwnProperty(r)&&!1===t.call(n,e[r],r))return}}("undefined"!=typeof window&&window,"undefined"!=typeof document&&document),angular.module("flow.provider",[]).provider("flowFactory",function(){"use strict";this.defaults={},this.factory=function(e){return new Flow(e)},this.events=[],this.on=function(e,t){this.events.push([e,t])},this.$get=function(){var n=this.factory,r=this.defaults,i=this.events;return{create:function(e){var t=n(angular.extend({},r,e));return angular.forEach(i,function(e){t.on(e[0],e[1])}),t}}}}),angular.module("flow.init",["flow.provider"]).controller("flowCtrl",["$scope","$attrs","$parse","flowFactory",function(r,e,t,n){var i=angular.extend({},r.$eval(e.flowInit)),a=r.$eval(e.flowObject)||n.create(i),o=function(e){var t=Array.prototype.slice.call(arguments);t.shift();var n=r.$broadcast.apply(r,["flow::"+e,a].concat(t));if({progress:1,filesSubmitted:1,fileSuccess:1,fileError:1,complete:1}[e]&&r.$applyAsync(),n.defaultPrevented)return!1};a.on("catchAll",o),r.$on("$destroy",function(){a.off("catchAll",o)}),r.$flow=a,e.hasOwnProperty("flowName")&&(t(e.flowName).assign(r,a),r.$on("$destroy",function(){t(e.flowName).assign(r)}))}]).directive("flowInit",[function(){return{scope:!0,controller:"flowCtrl"}}]),angular.module("flow.btn",["flow.init"]).directive("flowBtn",[function(){return{restrict:"EA",scope:!1,require:"^flowInit",link:function(e,t,n){var r=n.hasOwnProperty("flowDirectory"),i=n.hasOwnProperty("flowSingleFile"),a=n.hasOwnProperty("flowAttrs")&&e.$eval(n.flowAttrs);e.$flow.assignBrowse(t,r,i,a)}}}]),angular.module("flow.dragEvents",["flow.init"]).directive("flowPreventDrop",function(){return{scope:!1,link:function(e,t,n){t.bind("drop dragover",function(e){e.preventDefault()})}}}).directive("flowDragEnter",["$timeout",function(c){return{scope:!1,link:function(i,e,a){var o,s=!1;e.bind("dragover",function(e){var t,n,r;(n=!1,r=(t=e).dataTransfer||t.originalEvent.dataTransfer,angular.forEach(r&&r.types,function(e){"Files"===e&&(n=!0)}),n)&&(s||(i.$apply(a.flowDragEnter),s=!0),c.cancel(o),e.preventDefault())}),e.bind("dragleave drop",function(e){c.cancel(o),o=c(function(){i.$eval(a.flowDragLeave),o=null,s=!1},100)})}}}]),angular.module("flow.drop",["flow.init"]).directive("flowDrop",function(){return{scope:!1,require:"^flowInit",link:function(t,n,e){function r(){t.$flow.assignDrop(n)}e.flowDropEnabled?t.$watch(e.flowDropEnabled,function(e){e?r():t.$flow.unAssignDrop(n)}):r()}}}),function(s){"use strict";var n=s.module("flow.events",["flow.init"]);s.forEach({fileSuccess:["$file","$message"],fileProgress:["$file"],fileAdded:["$file","$event"],filesAdded:["$files","$event"],filesSubmitted:["$files","$event"],fileRetry:["$file"],fileRemoved:["$file"],fileError:["$file","$message"],uploadStart:[],complete:[],progress:[],error:["$message","$file"]},function(a,e){var t,o="flow"+((t=e).charAt(0).toUpperCase()+t.slice(1));"flowUploadStart"==o&&(o="flowUploadStarted"),n.directive(o,[function(){return{require:"^flowInit",controller:["$scope","$attrs",function(t,i){t.$on("flow::"+e,function(){var n=Array.prototype.slice.call(arguments),e=n.shift();if(t.$flow===n.shift()){var r={};s.forEach(a,function(e,t){r[e]=n[t]}),!1===t.$eval(i[o],r)&&e.preventDefault()}})}]}}])})}(angular),angular.module("flow.img",["flow.init"]).directive("flowImg",[function(){return{scope:!1,require:"^flowInit",link:function(n,e,r){var t=r.flowImg;n.$watch(t,function(e){if(e){var t=new FileReader;t.readAsDataURL(e.file),t.onload=function(e){n.$apply(function(){r.$set("src",e.target.result)})}}})}}}]),angular.module("flow.transfers",["flow.init"]).directive("flowTransfers",[function(){return{scope:!0,require:"^flowInit",link:function(e){e.transfers=e.$flow.files}}}]),angular.module("flow",["flow.provider","flow.init","flow.events","flow.btn","flow.drop","flow.transfers","flow.img","flow.dragEvents"]),function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("$logger",[],t):"object"==typeof exports?exports.$logger=t():e.$logger=t()}(this,function(){return function(n){var r={};function i(e){if(r[e])return r[e].exports;var t=r[e]={exports:{},id:e,loaded:!1};return n[e].call(t.exports,t,t.exports,i),t.loaded=!0,t.exports}return i.m=n,i.c=r,i.p="",i(0)}([function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(1);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})});var i=function(e){{if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t}}(r);t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(2);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})});var i=n(11);Object.keys(i).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return i[e]}})});var a=n(13);Object.keys(a).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return a[e]}})});var o=n(9);Object.keys(o).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return o[e]}})});var s=n(10);Object.keys(s).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return s[e]}})})},function(e,_,t){"use strict";Object.defineProperty(_,"__esModule",{value:!0}),_.track=_.flush=_.tracking=_.buffer=void 0,_.getTransport=function(){return A},_.setTransport=function(e){A=e},_.print=c,_.immediateFlush=n,_.log=i,_.prefix=function(n){return{debug:function(e,t){return i("debug",n+"_"+e,t)},info:function(e,t){return i("info",n+"_"+e,t)},warn:function(e,t){return i("warn",n+"_"+e,t)},error:function(e,t){return i("error",n+"_"+e,t)},track:function(e){return o(e)},flush:function(){return r()}}},_.debug=function(e,t){return i("debug",e,t)},_.info=function(e,t){return i("info",e,t)},_.warn=function(e,t){return i("warn",e,t)},_.error=function(e,t){return i("error",e,t)};var b=t(3),v=t(9),y=t(10),w=_.buffer=[],C=_.tracking=[],A=function(e,t,n){return(0,b.ajax)("post",y.config.uri,e,t,n)};var a=!1;function c(e,t,n){if("undefined"!=typeof window&&window.console&&window.console.log){if(!a)return setTimeout(function(){return c(e,t,n)},1);var r=y.config.logLevel;if(window.LOG_LEVEL&&(r=window.LOG_LEVEL),!(y.logLevels.indexOf(e)>y.logLevels.indexOf(r))){n=n||{};var i=[t];(0,b.isIE)()&&(n=JSON.stringify(n)),i.push(n),(n.error||n.warning)&&i.push("\n\n",n.error||n.warning);try{window.console[e]&&window.console[e].apply?window.console[e].apply(window.console,i):window.console.log&&window.console.log.apply&&window.console.log.apply(window.console,i)}catch(e){}}}}function n(){var e=(0<arguments.length&&void 0!==arguments[0]?arguments[0]:{}).fireAndForget,t=void 0!==e&&e;if("undefined"!=typeof window&&y.config.uri){var n=w.length,r=C.length;if(n||r){var i={},a=v.metaBuilders,o=Array.isArray(a),s=0;for(a=o?a:a[Symbol.iterator]();;){var c;if(o){if(s>=a.length)break;c=a[s++]}else{if((s=a.next()).done)break;c=s.value}var l=c;try{(0,b.extend)(i,l(i),!1)}catch(e){console.error("Error in custom meta builder:",e.stack||e.toString())}}var u={},f=v.headerBuilders,d=Array.isArray(f),h=0;for(f=d?f:f[Symbol.iterator]();;){var p;if(d){if(h>=f.length)break;p=f[h++]}else{if((h=f.next()).done)break;p=h.value}var m=p;try{(0,b.extend)(u,m(u),!1)}catch(e){console.error("Error in custom header builder:",e.stack||e.toString())}}var g=A(u,{events:w,meta:i,tracking:C},{fireAndForget:t});return _.buffer=w=[],_.tracking=C=[],g}}}setTimeout(function(){a=!0},1);var r=(0,b.promiseDebounce)(n,y.config.debounceInterval);function l(e,t,n){w.push({level:e,event:t,payload:n}),-1<y.config.autoLog.indexOf(e)&&r()}function i(e,t,n){if("undefined"!=typeof window){y.config.prefix&&(t=y.config.prefix+"_"+t),"string"==typeof(n=n||{})?n={message:n}:n instanceof Error&&(n={error:n.stack||n.toString()});try{JSON.stringify(n)}catch(e){return}n.timestamp=Date.now();var r=v.payloadBuilders,i=Array.isArray(r),a=0;for(r=i?r:r[Symbol.iterator]();;){var o;if(i){if(a>=r.length)break;o=r[a++]}else{if((a=r.next()).done)break;o=a.value}var s=o;try{(0,b.extend)(n,s(n),!1)}catch(e){console.error("Error in custom payload builder:",e.stack||e.toString())}}y.config.silent||c(e,t,n),w.length===y.config.sizeLimit?l("info","logger_max_buffer_length"):w.length<y.config.sizeLimit&&l(e,t,n)}}function o(e){if("undefined"!=typeof window&&e){try{JSON.stringify(e)}catch(e){return}var t=v.trackingBuilders,n=Array.isArray(t),r=0;for(t=n?t:t[Symbol.iterator]();;){var i;if(n){if(r>=t.length)break;i=t[r++]}else{if((r=t.next()).done)break;i=r.value}var a=i;try{(0,b.extend)(e,a(e),!1)}catch(e){console.error("Error in custom tracking builder:",e.stack||e.toString())}}c("debug","tracking",e),C.push(e)}}_.flush=r,_.track=o},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extend=function(e,t){var n=!(2<arguments.length&&void 0!==arguments[2])||arguments[2];for(var r in e=e||{},t=t||{})t.hasOwnProperty(r)&&(!n&&e.hasOwnProperty(r)||(e[r]=t[r]));return e},t.isSameProtocol=u,t.isSameDomain=f,t.ajax=function(i,a){var o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{},s=3<arguments.length&&void 0!==arguments[3]?arguments[3]:{},e=(4<arguments.length&&void 0!==arguments[4]?arguments[4]:{}).fireAndForget,c=void 0!==e&&e;return new l.ZalgoPromise(function(e){var t=window.XMLHttpRequest||window.ActiveXObject;if(window.XDomainRequest&&!f(a)){if(!u(a))return e();t=window.XDomainRequest}var n=new t("MSXML2.XMLHTTP.3.0");if(n.open(i.toUpperCase(),a,!0),"function"==typeof n.setRequestHeader)for(var r in n.setRequestHeader("X-Requested-With","XMLHttpRequest"),n.setRequestHeader("Content-type","application/json"),o)o.hasOwnProperty(r)&&n.setRequestHeader(r,o[r]);c?e():n.onreadystatechange=function(){3<n.readyState&&e()},n.send(JSON.stringify(s).replace(/&/g,"%26"))})},t.promiseDebounce=function(r,e){var i={};return function(){var n=arguments;return i.timeout&&(clearTimeout(i.timeout),delete i.timeout),i.timeout=setTimeout(function(){var e=i.resolver,t=i.rejector;return delete i.promise,delete i.resolver,delete i.rejector,delete i.timeout,l.ZalgoPromise.resolve().then(function(){return r.apply(null,n)}).then(e,t)},e),i.promise=i.promise||new l.ZalgoPromise(function(e,t){i.resolver=e,i.rejector=t}),i.promise}},t.onWindowReady=function(){return new l.ZalgoPromise(function(e){"undefined"!=typeof document&&"complete"===document.readyState&&e(),window.addEventListener("load",e)})},t.safeInterval=function(t,n){var r=void 0;return function e(){r=setTimeout(function(){t(),e()},n)}(),{cancel:function(){clearTimeout(r)}}},t.uniqueID=function(){var e="0123456789abcdef";return"xxxxxxxxxx".replace(/./g,function(){return e.charAt(Math.floor(Math.random()*e.length))})},t.isIE=function(){return Boolean(window.document.documentMode)};var l=n(4);function u(e){return window.location.protocol===e.split("/")[0]}function f(e){var t=e.match(/https?:\/\/[^/]+/);return!t||t[0]===window.location.protocol+"//"+window.location.host}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=n(5);Object.defineProperty(t,"ZalgoPromise",{enumerable:!0,get:function(){return r.ZalgoPromise}})},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZalgoPromise=void 0;var r=function(){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}return function(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),e}}(),f=n(6),i=n(7),d=n(8);var a=function(){function u(e){var t=this;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),this.resolved=!1,this.rejected=!1,this.errorHandled=!1,this.handlers=[],e){var n=void 0,r=void 0,i=!1,a=!1,o=!1;(0,d.startActive)();try{e(function(e){o?t.resolve(e):(i=!0,n=e)},function(e){o?t.reject(e):(a=!0,r=e)})}catch(e){return(0,d.endActive)(),void this.reject(e)}(0,d.endActive)(),o=!0,i?this.resolve(n):a&&this.reject(r)}}return r(u,[{key:"resolve",value:function(e){if(this.resolved||this.rejected)return this;if((0,f.isPromise)(e))throw new Error("Can not resolve promise with another promise");return this.resolved=!0,this.value=e,this.dispatch(),this}},{key:"reject",value:function(e){var t=this;if(this.resolved||this.rejected)return this;if((0,f.isPromise)(e))throw new Error("Can not reject promise with another promise");if(!e){var n=e&&"function"==typeof e.toString?e.toString():Object.prototype.toString.call(e);e=new Error("Expected reject to be called with Error, got "+n)}return this.rejected=!0,this.error=e,this.errorHandled||setTimeout(function(){t.errorHandled||(0,i.dispatchPossiblyUnhandledError)(e,t)},1),this.dispatch(),this}},{key:"asyncReject",value:function(e){return this.errorHandled=!0,this.reject(e),this}},{key:"dispatch",value:function(){var o=this,e=this.dispatching,s=this.resolved,c=this.rejected,l=this.handlers;if(!e&&(s||c)){this.dispatching=!0,(0,d.startActive)();for(var t=function(e){var t=l[e],n=t.onSuccess,r=t.onError,i=t.promise,a=void 0;if(s)try{a=n?n(o.value):o.value}catch(e){return i.reject(e),"continue"}else if(c){if(!r)return i.reject(o.error),"continue";try{a=r(o.error)}catch(e){return i.reject(e),"continue"}}a instanceof u&&(a.resolved||a.rejected)?(a.resolved?i.resolve(a.value):i.reject(a.error),a.errorHandled=!0):(0,f.isPromise)(a)?a instanceof u&&(a.resolved||a.rejected)?a.resolved?i.resolve(a.value):i.reject(a.error):a.then(function(e){i.resolve(e)},function(e){i.reject(e)}):i.resolve(a)},n=0;n<l.length;n++)t(n);l.length=0,this.dispatching=!1,(0,d.endActive)()}}},{key:"then",value:function(e,t){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.then expected a function for success handler");if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.then expected a function for error handler");var n=new u;return this.handlers.push({promise:n,onSuccess:e,onError:t}),this.errorHandled=!0,this.dispatch(),n}},{key:"catch",value:function(e){return this.then(void 0,e)}},{key:"finally",value:function(t){if(t&&"function"!=typeof t&&!t.call)throw new Error("Promise.finally expected a function");return this.then(function(e){return u.try(t).then(function(){return e})},function(e){return u.try(t).then(function(){throw e})})}},{key:"timeout",value:function(e,t){var n=this;if(this.resolved||this.rejected)return this;var r=setTimeout(function(){n.resolved||n.rejected||n.reject(t||new Error("Promise timed out after "+e+"ms"))},e);return this.then(function(e){return clearTimeout(r),e})}},{key:"toPromise",value:function(){if("undefined"==typeof Promise)throw new TypeError("Could not find Promise");return Promise.resolve(this)}}],[{key:"resolve",value:function(n){return n instanceof u?n:(0,f.isPromise)(n)?new u(function(e,t){return n.then(e,t)}):(new u).resolve(n)}},{key:"reject",value:function(e){return(new u).reject(e)}},{key:"asyncReject",value:function(e){return(new u).asyncReject(e)}},{key:"all",value:function(n){var r=new u,i=n.length,a=[];if(!i)return r.resolve(a),r;for(var e=function(t){var e=n[t];if(e instanceof u){if(e.resolved)return a[t]=e.value,i-=1,"continue"}else if(!(0,f.isPromise)(e))return a[t]=e,i-=1,"continue";u.resolve(e).then(function(e){a[t]=e,0===(i-=1)&&r.resolve(a)},function(e){r.reject(e)})},t=0;t<n.length;t++)e(t);return 0===i&&r.resolve(a),r}},{key:"hash",value:function(e){var n={};return u.all(Object.keys(e).map(function(t){return u.resolve(e[t]).then(function(e){n[t]=e})})).then(function(){return n})}},{key:"map",value:function(e,t){return u.all(e.map(t))}},{key:"onPossiblyUnhandledException",value:function(e){return(0,i.onPossiblyUnhandledException)(e)}},{key:"try",value:function(e,t,n){if(e&&"function"!=typeof e&&!e.call)throw new Error("Promise.try expected a function");var r=void 0;(0,d.startActive)();try{r=e.apply(t,n||[])}catch(e){return(0,d.endActive)(),u.reject(e)}return(0,d.endActive)(),u.resolve(r)}},{key:"delay",value:function(t){return new u(function(e){setTimeout(e,t)})}},{key:"isPromise",value:function(e){return!!(e&&e instanceof u)||(0,f.isPromise)(e)}},{key:"flush",value:function(){return(0,d.awaitActive)(u)}}]),u}();t.ZalgoPromise=a},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=function(e){try{if(!e)return!1;if("undefined"!=typeof Promise&&e instanceof Promise)return!0;if("undefined"!=typeof window&&window.Window&&e instanceof window.Window)return!1;if("undefined"!=typeof window&&window.constructor&&e instanceof window.constructor)return!1;var t={}.toString;if(t){var n=t.call(e);if("[object Window]"===n||"[object global]"===n||"[object DOMWindow]"===n)return!1}if("function"==typeof e.then)return!0}catch(e){return!1}return!1}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dispatchPossiblyUnhandledError=function(e,t){if(-1!==r.indexOf(e))return;r.push(e),setTimeout(function(){throw e},1);for(var n=0;n<i.length;n++)i[n](e,t)},t.onPossiblyUnhandledException=function(e){return i.push(e),{cancel:function(){i.splice(i.indexOf(e),1)}}};var r=[],i=[]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startActive=function(){n+=1},t.endActive=function(){n-=1,i()},t.awaitActive=function(e){var t=r=r||new e;return i(),t};var n=0,r=void 0;function i(){if(!n&&r){var e=r;r=null,e.resolve()}}},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.addPayloadBuilder=function(e){n.push(e)},t.addMetaBuilder=function(e){r.push(e)},t.addTrackingBuilder=function(e){i.push(e)},t.addHeaderBuilder=function(e){a.push(e)};var n=t.payloadBuilders=[],r=t.metaBuilders=[],i=t.trackingBuilders=[],a=t.headerBuilders=[]},function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});t.config={uri:"",prefix:"",initial_state_name:"init",flushInterval:6e5,debounceInterval:10,sizeLimit:300,silent:!1,heartbeat:!0,heartbeatConsoleLog:!0,heartbeatInterval:5e3,heartbeatTooBusy:!1,heartbeatTooBusyThreshold:1e4,logLevel:"warn",autoLog:["warn","error"],logUnload:!0,logPerformance:!0},t.logLevels=["error","warn","info","debug"]},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.init=function(e){if((0,i.extend)(r.config,e||{}),s)return;s=!0,r.config.logPerformance&&(0,a.initPerformance)();r.config.heartbeat&&(0,a.initHeartBeat)();r.config.logUnload&&(window.addEventListener("beforeunload",function(){(0,o.info)("window_beforeunload"),(0,o.immediateFlush)({fireAndForget:!0})}),window.addEventListener("unload",function(){(0,o.info)("window_unload"),(0,o.immediateFlush)({fireAndForget:!0})}));r.config.flushInterval&&setInterval(o.flush,r.config.flushInterval);window.beaverLogQueue&&(window.beaverLogQueue.forEach(function(e){(0,o.log)(e.level,e.event,e)}),delete window.beaverLogQueue)};var r=n(10),i=n(3),a=n(12),o=n(2),s=!1},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reqTimer=t.clientTimer=void 0,t.now=c,t.reqStartElapsed=u,t.initHeartBeat=function(){var r=l(),i=0;(0,s.safeInterval)(function(){if(!(a.config.heartbeatMaxThreshold&&i>a.config.heartbeatMaxThreshold)){i+=1;var e=r.elapsed(),t=e-a.config.heartbeatInterval,n={count:i,elapsed:e};a.config.heartbeatTooBusy&&(n.lag=t)>=a.config.heartbeatTooBusyThreshold&&(0,o.info)("toobusy",n,{noConsole:!a.config.heartbeatConsoleLog}),(0,o.info)("heartbeat",n,{noConsole:!a.config.heartbeatConsoleLog})}},a.config.heartbeatInterval)},t.initPerformance=function(){if(!i)return(0,o.info)("no_performance_data");(0,r.addPayloadBuilder)(function(){var e={};return e.client_elapsed=f.elapsed(),i&&(e.req_elapsed=d.elapsed()),e}),(0,s.onWindowReady)().then(function(){var n={};["connectEnd","connectStart","domComplete","domContentLoadedEventEnd","domContentLoadedEventStart","domInteractive","domLoading","domainLookupEnd","domainLookupStart","fetchStart","loadEventEnd","loadEventStart","navigationStart","redirectEnd","redirectStart","requestStart","responseEnd","responseStart","secureConnectionStart","unloadEventEnd","unloadEventStart"].forEach(function(e){n[e]=parseInt(window.performance.timing[e],10)||0});var r=n.connectEnd-n.navigationStart;n.connectEnd&&Object.keys(n).forEach(function(e){var t=n[e];t&&(0,o.info)("timing_"+e,{client_elapsed:parseInt(t-n.connectEnd-(f.startTime-r),10),req_elapsed:parseInt(t-n.connectEnd,10)})}),(0,o.info)("timing",n),(0,o.info)("memory",window.performance.memory),(0,o.info)("navigation",window.performance.navigation),window.performance.getEntries&&window.performance.getEntries().forEach(function(e){-1<["link","script","img","css"].indexOf(e.initiatorType)&&(0,o.info)(e.initiatorType,e)})})};var a=n(10),o=n(2),r=n(9),s=n(3),i=window&&window.performance&&performance.now&&performance.timing&&performance.timing.connectEnd&&performance.timing.navigationStart&&1e3<Math.abs(performance.now()-Date.now())&&0<performance.now()-(performance.timing.connectEnd-performance.timing.navigationStart);function c(){return i?performance.now():Date.now()}function l(e){return{startTime:e=void 0!==e?e:c(),elapsed:function(){return parseInt(c()-e,10)},reset:function(){e=c()}}}function u(){if(i){var e=window.performance.timing;return parseInt(e.connectEnd-e.navigationStart,10)}}var f=t.clientTimer=l(),d=t.reqTimer=l(u())},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startTransition=d,t.endTransition=h,t.transition=function(e){d(),h(e)};var i=n(12),a=n(2),r=n(9),o=n(3),s=n(10),c=(0,o.uniqueID)(),l=(0,o.uniqueID)(),u=s.config.initial_state_name,f=void 0;function d(){f=(0,i.now)()}function h(e){f=f||(0,i.reqStartElapsed)();var t=(0,i.now)(),n=void 0;void 0!==f&&(n=parseInt(t-f,0));var r="transition_"+u+"_to_"+e;(0,a.info)(r,{duration:n}),(0,a.track)({transition:r,transition_time:n}),(0,a.immediateFlush)(),f=t,u=e,l=(0,o.uniqueID)()}(0,r.addPayloadBuilder)(function(){return{windowID:c,pageID:l}}),(0,r.addMetaBuilder)(function(){return{state:"ui_"+u}})}])});
\ No newline at end of file
index 6833ea8..7547df5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x68c2=['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]','urlForward[body]','exports','VIRTUAL','action','STRING','contactManager','integration','jscripty','browser'];(function(_0x43df41,_0x28c7eb){var _0x1aab78=function(_0x22180f){while(--_0x22180f){_0x43df41['push'](_0x43df41['shift']());}};_0x1aab78(++_0x28c7eb);}(_0x68c2,0x1e8));var _0x268c=function(_0x18f82b,_0x3ea7a0){_0x18f82b=_0x18f82b-0x0;var _0x5d8128=_0x68c2[_0x18f82b];return _0x5d8128;};'use strict';var Sequelize=require('sequelize');module[_0x268c('0x0')]={'name':{'type':Sequelize[_0x268c('0x1')],'get':function(_0x5f2a7b){return this['getDataValue'](_0x268c('0x2'));}},'action':{'type':Sequelize[_0x268c('0x3')],'allowNull':![],'validate':{'isIn':{'args':[[_0x268c('0x4'),_0x268c('0x5'),'motionbar',_0x268c('0x6'),'urlForward',_0x268c('0x7'),'bot',_0x268c('0x8')]],'msg':_0x268c('0x9')}},'comment':_0x268c('0x9')},'data1':{'type':Sequelize['STRING'](0x1000),'comment':_0x268c('0xa')},'data2':{'type':Sequelize[_0x268c('0x3')](0x1000),'comment':'contactManager[autoCreate(0=No,1=Yes)],\x20urlForward[URL],\x20script[type],\x20integration[AccountId],\x20motionbar[TemplateId,URL,WinAppPath],\x20browser[TemplateId,URL]'},'data3':{'type':Sequelize[_0x268c('0x3')](0x1000),'comment':_0x268c('0xb')},'data4':{'type':Sequelize[_0x268c('0x3')](0x1000),'comments':_0x268c('0xc')},'data5':{'type':Sequelize[_0x268c('0x3')](0x1000),'comments':_0x268c('0xd')},'data6':{'type':Sequelize[_0x268c('0x3')],'comments':_0x268c('0xe')},'data7':{'type':Sequelize['TEXT'],'comments':_0x268c('0xf')}};
\ No newline at end of file
+var _0xb1cf=['integration','urlForward','browser','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)]','urlForward[headers],\x20browser[wsindowHeight]','urlForward[body]','sequelize','VIRTUAL','getDataValue','action','STRING','contactManager'];(function(_0x3c7dd2,_0x5b0ade){var _0x138d50=function(_0x2e32ce){while(--_0x2e32ce){_0x3c7dd2['push'](_0x3c7dd2['shift']());}};_0x138d50(++_0x5b0ade);}(_0xb1cf,0x6a));var _0xfb1c=function(_0x3a0c4f,_0x5dd1a3){_0x3a0c4f=_0x3a0c4f-0x0;var _0x247049=_0xb1cf[_0x3a0c4f];return _0x247049;};'use strict';var Sequelize=require(_0xfb1c('0x0'));module['exports']={'name':{'type':Sequelize[_0xfb1c('0x1')],'get':function(_0x14dbda){return this[_0xfb1c('0x2')](_0xfb1c('0x3'));}},'action':{'type':Sequelize[_0xfb1c('0x4')],'allowNull':![],'validate':{'isIn':{'args':[[_0xfb1c('0x5'),_0xfb1c('0x6'),'motionbar','jscripty',_0xfb1c('0x7'),_0xfb1c('0x8'),'bot','script']],'msg':'Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script'}},'comment':'Allowed\x20values:\x20contactManager,\x20integration,\x20motionbar,\x20jscripty,\x20urlForward,\x20browser,\x20bot,\x20script'},'data1':{'type':Sequelize[_0xfb1c('0x4')](0x1000),'comment':_0xfb1c('0x9')},'data2':{'type':Sequelize[_0xfb1c('0x4')](0x1000),'comment':_0xfb1c('0xa')},'data3':{'type':Sequelize['STRING'](0x1000),'comment':_0xfb1c('0xb')},'data4':{'type':Sequelize[_0xfb1c('0x4')](0x1000),'comments':'browser[location(0=NewTab,1=NewWindow,2=MotionTab)],\x20contactManager[autoCreateField]'},'data5':{'type':Sequelize[_0xfb1c('0x4')](0x1000),'comments':'urlForward[timeout],\x20browser[windowWidth],\x20contactManager[ignoreDialerContactId]'},'data6':{'type':Sequelize[_0xfb1c('0x4')],'comments':_0xfb1c('0xc')},'data7':{'type':Sequelize['TEXT'],'comments':_0xfb1c('0xd')}};
\ No newline at end of file
index 7358f9c..124c453 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf526=['count','limit','apply','update','then','error','stack','name','send','body','Action','find','params','destroy','catch','eml-format','rimraf','zip-dir','moment','mustache','path','sox','to-csv','ejs','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','sendStatus','status','end','json','offset','undefined'];(function(_0x10b2f1,_0x46c79d){var _0x1041b2=function(_0x1ca766){while(--_0x1ca766){_0x10b2f1['push'](_0x10b2f1['shift']());}};_0x1041b2(++_0x46c79d);}(_0xf526,0x143));var _0x6f52=function(_0xe91467,_0x21708a){_0xe91467=_0xe91467-0x0;var _0x5a19d8=_0xf526[_0xe91467];return _0x5a19d8;};'use strict';var emlformat=require(_0x6f52('0x0'));var rimraf=require(_0x6f52('0x1'));var zipdir=require(_0x6f52('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x6f52('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x6f52('0x4'));var util=require('util');var path=require(_0x6f52('0x5'));var sox=require(_0x6f52('0x6'));var csv=require(_0x6f52('0x7'));var ejs=require(_0x6f52('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x6f52('0x9'));var crypto=require(_0x6f52('0xa'));var jsforce=require(_0x6f52('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x6f52('0x7'));var querystring=require(_0x6f52('0xc'));var Papa=require(_0x6f52('0xd'));var Redis=require(_0x6f52('0xe'));var authService=require(_0x6f52('0xf'));var qs=require(_0x6f52('0x10'));var as=require(_0x6f52('0x11'));var hardwareService=require(_0x6f52('0x12'));var logger=require(_0x6f52('0x13'))(_0x6f52('0x14'));var utils=require(_0x6f52('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x6f52('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x347e24,_0x4da636){_0x4da636=_0x4da636||0xcc;return function(_0x1892cc){if(_0x1892cc){return _0x347e24[_0x6f52('0x17')](_0x4da636);}return _0x347e24[_0x6f52('0x18')](_0x4da636)[_0x6f52('0x19')]();};}function respondWithResult(_0x2e100e,_0x519859){_0x519859=_0x519859||0xc8;return function(_0x282287){if(_0x282287){return _0x2e100e[_0x6f52('0x18')](_0x519859)[_0x6f52('0x1a')](_0x282287);}};}function respondWithFilteredResult(_0x2e0666,_0x38eeef){return function(_0x6f51d3){if(_0x6f51d3){var _0x5588a6=typeof _0x38eeef[_0x6f52('0x1b')]===_0x6f52('0x1c')&&typeof _0x38eeef['limit']===_0x6f52('0x1c');var _0x328b45=_0x6f51d3['count'];var _0x5da93=_0x5588a6?0x0:_0x38eeef[_0x6f52('0x1b')];var _0x33abca=_0x5588a6?_0x6f51d3[_0x6f52('0x1d')]:_0x38eeef[_0x6f52('0x1b')]+_0x38eeef[_0x6f52('0x1e')];var _0x3b8590;if(_0x33abca>=_0x328b45){_0x33abca=_0x328b45;_0x3b8590=0xc8;}else{_0x3b8590=0xce;}_0x2e0666['status'](_0x3b8590);return _0x2e0666['set']('Content-Range',_0x5da93+'-'+_0x33abca+'/'+_0x328b45)[_0x6f52('0x1a')](_0x6f51d3);}return null;};}function patchUpdates(_0x5ed183){return function(_0x5d65f1){try{jsonpatch[_0x6f52('0x1f')](_0x5d65f1,_0x5ed183,!![]);}catch(_0x769162){return BPromise['reject'](_0x769162);}return _0x5d65f1['save']();};}function saveUpdates(_0x54bf01,_0x4d9911){return function(_0x15a9b1){if(_0x15a9b1){return _0x15a9b1[_0x6f52('0x20')](_0x54bf01)[_0x6f52('0x21')](function(_0x55f9cc){return _0x55f9cc;});}return null;};}function removeEntity(_0x2d6a0e,_0x20eb3c){return function(_0x65bc8f){if(_0x65bc8f){return _0x65bc8f['destroy']()['then'](function(){_0x2d6a0e[_0x6f52('0x18')](0xcc)[_0x6f52('0x19')]();});}};}function handleEntityNotFound(_0x5446fe,_0x61e5ad){return function(_0x43a2b5){if(!_0x43a2b5){_0x5446fe['sendStatus'](0x194);}return _0x43a2b5;};}function handleError(_0x507fb5,_0x11ec08){_0x11ec08=_0x11ec08||0x1f4;return function(_0x5c61fb){logger[_0x6f52('0x22')](_0x5c61fb[_0x6f52('0x23')]);if(_0x5c61fb[_0x6f52('0x24')]){delete _0x5c61fb[_0x6f52('0x24')];}_0x507fb5['status'](_0x11ec08)[_0x6f52('0x25')](_0x5c61fb);};}exports['update']=function(_0x257b20,_0x5a5842){if(_0x257b20[_0x6f52('0x26')]['id']){delete _0x257b20[_0x6f52('0x26')]['id'];}return db[_0x6f52('0x27')][_0x6f52('0x28')]({'where':{'id':_0x257b20[_0x6f52('0x29')]['id']}})[_0x6f52('0x21')](handleEntityNotFound(_0x5a5842,null))[_0x6f52('0x21')](saveUpdates(_0x257b20[_0x6f52('0x26')],null))[_0x6f52('0x21')](respondWithResult(_0x5a5842,null))['catch'](handleError(_0x5a5842,null));};exports[_0x6f52('0x2a')]=function(_0x4ec39f,_0x445ec8){return db[_0x6f52('0x27')][_0x6f52('0x28')]({'where':{'id':_0x4ec39f[_0x6f52('0x29')]['id']}})[_0x6f52('0x21')](handleEntityNotFound(_0x445ec8,null))['then'](removeEntity(_0x445ec8,null))[_0x6f52('0x2b')](handleError(_0x445ec8,null));};
\ No newline at end of file
+var _0xcb00=['end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','body','Action','catch','find','params','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status'];(function(_0x40c1a9,_0x2b26c1){var _0x859fd2=function(_0x153d46){while(--_0x153d46){_0x40c1a9['push'](_0x40c1a9['shift']());}};_0x859fd2(++_0x2b26c1);}(_0xcb00,0x13c));var _0x0cb0=function(_0x58c851,_0x1f3d96){_0x58c851=_0x58c851-0x0;var _0x534d8a=_0xcb00[_0x58c851];return _0x534d8a;};'use strict';var emlformat=require(_0x0cb0('0x0'));var rimraf=require(_0x0cb0('0x1'));var zipdir=require(_0x0cb0('0x2'));var jsonpatch=require(_0x0cb0('0x3'));var rp=require(_0x0cb0('0x4'));var moment=require(_0x0cb0('0x5'));var BPromise=require(_0x0cb0('0x6'));var Mustache=require(_0x0cb0('0x7'));var util=require(_0x0cb0('0x8'));var path=require(_0x0cb0('0x9'));var sox=require(_0x0cb0('0xa'));var csv=require(_0x0cb0('0xb'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0cb0('0xc'));var _=require(_0x0cb0('0xd'));var squel=require(_0x0cb0('0xe'));var crypto=require(_0x0cb0('0xf'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x0cb0('0xb'));var querystring=require('querystring');var Papa=require(_0x0cb0('0x10'));var Redis=require('ioredis');var authService=require(_0x0cb0('0x11'));var qs=require(_0x0cb0('0x12'));var as=require(_0x0cb0('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x0cb0('0x14'))(_0x0cb0('0x15'));var utils=require(_0x0cb0('0x16'));var config=require(_0x0cb0('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x0cb0('0x18'))['db'];function respondWithStatusCode(_0x4832d1,_0x48ccdc){_0x48ccdc=_0x48ccdc||0xcc;return function(_0xf9c379){if(_0xf9c379){return _0x4832d1[_0x0cb0('0x19')](_0x48ccdc);}return _0x4832d1[_0x0cb0('0x1a')](_0x48ccdc)[_0x0cb0('0x1b')]();};}function respondWithResult(_0x29bdb5,_0x7d90d2){_0x7d90d2=_0x7d90d2||0xc8;return function(_0x44720d){if(_0x44720d){return _0x29bdb5[_0x0cb0('0x1a')](_0x7d90d2)[_0x0cb0('0x1c')](_0x44720d);}};}function respondWithFilteredResult(_0x208d81,_0x3b7bcc){return function(_0x5d7590){if(_0x5d7590){var _0x1bee9a=typeof _0x3b7bcc[_0x0cb0('0x1d')]===_0x0cb0('0x1e')&&typeof _0x3b7bcc[_0x0cb0('0x1f')]===_0x0cb0('0x1e');var _0x4a65eb=_0x5d7590[_0x0cb0('0x20')];var _0x1bc89f=_0x1bee9a?0x0:_0x3b7bcc[_0x0cb0('0x1d')];var _0x4e24a7=_0x1bee9a?_0x5d7590[_0x0cb0('0x20')]:_0x3b7bcc['offset']+_0x3b7bcc[_0x0cb0('0x1f')];var _0x533b3c;if(_0x4e24a7>=_0x4a65eb){_0x4e24a7=_0x4a65eb;_0x533b3c=0xc8;}else{_0x533b3c=0xce;}_0x208d81[_0x0cb0('0x1a')](_0x533b3c);return _0x208d81['set'](_0x0cb0('0x21'),_0x1bc89f+'-'+_0x4e24a7+'/'+_0x4a65eb)[_0x0cb0('0x1c')](_0x5d7590);}return null;};}function patchUpdates(_0x5d7345){return function(_0x52fb4a){try{jsonpatch[_0x0cb0('0x22')](_0x52fb4a,_0x5d7345,!![]);}catch(_0x58119a){return BPromise[_0x0cb0('0x23')](_0x58119a);}return _0x52fb4a[_0x0cb0('0x24')]();};}function saveUpdates(_0x4c111e,_0x1848d2){return function(_0x2f1ece){if(_0x2f1ece){return _0x2f1ece[_0x0cb0('0x25')](_0x4c111e)[_0x0cb0('0x26')](function(_0x2da04c){return _0x2da04c;});}return null;};}function removeEntity(_0x5e9e6a,_0x194e73){return function(_0x1beb23){if(_0x1beb23){return _0x1beb23[_0x0cb0('0x27')]()[_0x0cb0('0x26')](function(){_0x5e9e6a['status'](0xcc)[_0x0cb0('0x1b')]();});}};}function handleEntityNotFound(_0x47de6a,_0x259797){return function(_0x1cc582){if(!_0x1cc582){_0x47de6a[_0x0cb0('0x19')](0x194);}return _0x1cc582;};}function handleError(_0x4f44bc,_0x2d364f){_0x2d364f=_0x2d364f||0x1f4;return function(_0x453985){logger[_0x0cb0('0x28')](_0x453985[_0x0cb0('0x29')]);if(_0x453985[_0x0cb0('0x2a')]){delete _0x453985[_0x0cb0('0x2a')];}_0x4f44bc[_0x0cb0('0x1a')](_0x2d364f)[_0x0cb0('0x2b')](_0x453985);};}exports[_0x0cb0('0x25')]=function(_0x5a11ad,_0x1656f4){if(_0x5a11ad[_0x0cb0('0x2c')]['id']){delete _0x5a11ad[_0x0cb0('0x2c')]['id'];}return db[_0x0cb0('0x2d')]['find']({'where':{'id':_0x5a11ad['params']['id']}})[_0x0cb0('0x26')](handleEntityNotFound(_0x1656f4,null))[_0x0cb0('0x26')](saveUpdates(_0x5a11ad[_0x0cb0('0x2c')],null))['then'](respondWithResult(_0x1656f4,null))[_0x0cb0('0x2e')](handleError(_0x1656f4,null));};exports[_0x0cb0('0x27')]=function(_0xee8209,_0x23eccf){return db[_0x0cb0('0x2d')][_0x0cb0('0x2f')]({'where':{'id':_0xee8209[_0x0cb0('0x30')]['id']}})[_0x0cb0('0x26')](handleEntityNotFound(_0x23eccf,null))['then'](removeEntity(_0x23eccf,null))[_0x0cb0('0x2e')](handleError(_0x23eccf,null));};
\ No newline at end of file
index a84e81f..9e7804a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xed60=['util','api','moment','request-promise','path','./action.attributes','exports','Action','tools_actions','lodash'];(function(_0x5227ab,_0x514da4){var _0x3dc702=function(_0x592b15){while(--_0x592b15){_0x5227ab['push'](_0x5227ab['shift']());}};_0x3dc702(++_0x514da4);}(_0xed60,0x81));var _0x0ed6=function(_0x25d126,_0x3294c3){_0x25d126=_0x25d126-0x0;var _0x2c997f=_0xed60[_0x25d126];return _0x2c997f;};'use strict';var _=require(_0x0ed6('0x0'));var util=require(_0x0ed6('0x1'));var logger=require('../../config/logger')(_0x0ed6('0x2'));var moment=require(_0x0ed6('0x3'));var BPromise=require('bluebird');var rp=require(_0x0ed6('0x4'));var fs=require('fs');var path=require(_0x0ed6('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x0ed6('0x6'));module[_0x0ed6('0x7')]=function(_0x453996,_0x12d9da){return _0x453996['define'](_0x0ed6('0x8'),attributes,{'tableName':_0x0ed6('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x92b3=['path','rimraf','../../config/environment','exports','define','Action','tools_actions','util','../../config/logger','api','moment','bluebird'];(function(_0x180089,_0x4f77ba){var _0x44b105=function(_0x59a14d){while(--_0x59a14d){_0x180089['push'](_0x180089['shift']());}};_0x44b105(++_0x4f77ba);}(_0x92b3,0x97));var _0x392b=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x92b3[_0x1facfa];return _0x9ec701;};'use strict';var _=require('lodash');var util=require(_0x392b('0x0'));var logger=require(_0x392b('0x1'))(_0x392b('0x2'));var moment=require(_0x392b('0x3'));var BPromise=require(_0x392b('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x392b('0x5'));var rimraf=require(_0x392b('0x6'));var config=require(_0x392b('0x7'));var attributes=require('./action.attributes');module[_0x392b('0x8')]=function(_0x199ab5,_0x9383d1){return _0x199ab5[_0x392b('0x9')](_0x392b('0xa'),attributes,{'tableName':_0x392b('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 530769d..f529ff5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7217=['stringify','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Action,\x20%s,\x20%s','debug','Action,\x20%s,\x20%s,\x20%s','request\x20sent'];(function(_0x2aecb2,_0x343312){var _0x3ebb80=function(_0x19fab3){while(--_0x19fab3){_0x2aecb2['push'](_0x2aecb2['shift']());}};_0x3ebb80(++_0x343312);}(_0x7217,0x19e));var _0x7721=function(_0x934425,_0x5af72f){_0x934425=_0x934425-0x0;var _0x31d596=_0x7217[_0x934425];return _0x31d596;};'use strict';var _=require(_0x7721('0x0'));var util=require('util');var moment=require(_0x7721('0x1'));var BPromise=require(_0x7721('0x2'));var rs=require(_0x7721('0x3'));var fs=require('fs');var Redis=require(_0x7721('0x4'));var db=require(_0x7721('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x7721('0x6'));var config=require(_0x7721('0x7'));var jayson=require(_0x7721('0x8'));var client=jayson[_0x7721('0x9')][_0x7721('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xf7ff37,_0x18ab6b,_0x21f680){return new BPromise(function(_0x225610,_0x2f99ed){return client[_0x7721('0xb')](_0xf7ff37,_0x21f680)[_0x7721('0xc')](function(_0xfa8835){logger[_0x7721('0xd')](_0x7721('0xe'),_0x18ab6b,'request\x20sent');logger[_0x7721('0xf')](_0x7721('0x10'),_0x18ab6b,_0x7721('0x11'),JSON[_0x7721('0x12')](_0xfa8835));if(_0xfa8835[_0x7721('0x13')]){if(_0xfa8835[_0x7721('0x13')][_0x7721('0x14')]===0x1f4){logger[_0x7721('0x13')]('Action,\x20%s,\x20%s',_0x18ab6b,_0xfa8835[_0x7721('0x13')][_0x7721('0x15')]);return _0x2f99ed(_0xfa8835['error'][_0x7721('0x15')]);}logger[_0x7721('0x13')](_0x7721('0xe'),_0x18ab6b,_0xfa8835[_0x7721('0x13')]['message']);return _0x225610(_0xfa8835[_0x7721('0x13')][_0x7721('0x15')]);}else{logger['info']('Action,\x20%s,\x20%s',_0x18ab6b,'request\x20sent');_0x225610(_0xfa8835[_0x7721('0x16')][_0x7721('0x15')]);}})[_0x7721('0x17')](function(_0x32550d){logger['error'](_0x7721('0xe'),_0x18ab6b,_0x32550d);_0x2f99ed(_0x32550d);});});}
\ No newline at end of file
+var _0x1261=['then','info','Action,\x20%s,\x20%s','request\x20sent','Action,\x20%s,\x20%s,\x20%s','error','code','message','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request'];(function(_0x2679e5,_0x123293){var _0x144631=function(_0xf32687){while(--_0xf32687){_0x2679e5['push'](_0x2679e5['shift']());}};_0x144631(++_0x123293);}(_0x1261,0x144));var _0x1126=function(_0x218ca4,_0x41cc40){_0x218ca4=_0x218ca4-0x0;var _0x1b3ff9=_0x1261[_0x218ca4];return _0x1b3ff9;};'use strict';var _=require('lodash');var util=require(_0x1126('0x0'));var moment=require(_0x1126('0x1'));var BPromise=require(_0x1126('0x2'));var rs=require(_0x1126('0x3'));var fs=require('fs');var Redis=require(_0x1126('0x4'));var db=require(_0x1126('0x5'))['db'];var utils=require(_0x1126('0x6'));var logger=require(_0x1126('0x7'))(_0x1126('0x8'));var config=require(_0x1126('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0x1126('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x907180,_0x4f239c,_0x17e5f0){return new BPromise(function(_0x28772d,_0x245be9){return client[_0x1126('0xb')](_0x907180,_0x17e5f0)[_0x1126('0xc')](function(_0x59cfa1){logger[_0x1126('0xd')](_0x1126('0xe'),_0x4f239c,_0x1126('0xf'));logger['debug'](_0x1126('0x10'),_0x4f239c,'request\x20sent',JSON['stringify'](_0x59cfa1));if(_0x59cfa1[_0x1126('0x11')]){if(_0x59cfa1['error'][_0x1126('0x12')]===0x1f4){logger[_0x1126('0x11')](_0x1126('0xe'),_0x4f239c,_0x59cfa1[_0x1126('0x11')][_0x1126('0x13')]);return _0x245be9(_0x59cfa1[_0x1126('0x11')][_0x1126('0x13')]);}logger[_0x1126('0x11')](_0x1126('0xe'),_0x4f239c,_0x59cfa1['error']['message']);return _0x28772d(_0x59cfa1[_0x1126('0x11')][_0x1126('0x13')]);}else{logger[_0x1126('0xd')]('Action,\x20%s,\x20%s',_0x4f239c,_0x1126('0xf'));_0x28772d(_0x59cfa1['result'][_0x1126('0x13')]);}})[_0x1126('0x14')](function(_0x257b5f){logger['error'](_0x1126('0xe'),_0x4f239c,_0x257b5f);_0x245be9(_0x257b5f);});});}
\ No newline at end of file
index 9cf0cd1..f1e79d2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0740=['delete','isAuthenticated','destroy','exports','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./action.controller','put','/:id','update'];(function(_0x1945a5,_0x50de54){var _0x5817a5=function(_0x2a5a93){while(--_0x2a5a93){_0x1945a5['push'](_0x1945a5['shift']());}};_0x5817a5(++_0x50de54);}(_0x0740,0x112));var _0x0074=function(_0x231304,_0x5e462b){_0x231304=_0x231304-0x0;var _0x377e30=_0x0740[_0x231304];return _0x377e30;};'use strict';var multer=require('multer');var util=require(_0x0074('0x0'));var path=require(_0x0074('0x1'));var timeout=require('connect-timeout');var express=require(_0x0074('0x2'));var router=express[_0x0074('0x3')]();var fs_extra=require(_0x0074('0x4'));var auth=require(_0x0074('0x5'));var interaction=require(_0x0074('0x6'));var config=require('../../config/environment');var controller=require(_0x0074('0x7'));router[_0x0074('0x8')](_0x0074('0x9'),auth['isAuthenticated'](),controller[_0x0074('0xa')]);router[_0x0074('0xb')](_0x0074('0x9'),auth[_0x0074('0xc')](),controller[_0x0074('0xd')]);module[_0x0074('0xe')]=router;
\ No newline at end of file
+var _0x4830=['connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./action.controller','put','/:id','isAuthenticated','delete','destroy','exports','multer','util','path'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x4830,0x85));var _0x0483=function(_0x19cba3,_0x74f784){_0x19cba3=_0x19cba3-0x0;var _0x174b9c=_0x4830[_0x19cba3];return _0x174b9c;};'use strict';var multer=require(_0x0483('0x0'));var util=require(_0x0483('0x1'));var path=require(_0x0483('0x2'));var timeout=require(_0x0483('0x3'));var express=require(_0x0483('0x4'));var router=express[_0x0483('0x5')]();var fs_extra=require(_0x0483('0x6'));var auth=require(_0x0483('0x7'));var interaction=require(_0x0483('0x8'));var config=require(_0x0483('0x9'));var controller=require(_0x0483('0xa'));router[_0x0483('0xb')](_0x0483('0xc'),auth[_0x0483('0xd')](),controller['update']);router[_0x0483('0xe')](_0x0483('0xc'),auth[_0x0483('0xd')](),controller[_0x0483('0xf')]);module[_0x0483('0x10')]=router;
\ No newline at end of file
index c8b6eb7..6e1477d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x207c=['STRING','TEXT','exports'];(function(_0x59aca0,_0x8d0799){var _0x1a650f=function(_0x31c5cd){while(--_0x31c5cd){_0x59aca0['push'](_0x59aca0['shift']());}};_0x1a650f(++_0x8d0799);}(_0x207c,0x1e8));var _0xc207=function(_0x3b3362,_0x202631){_0x3b3362=_0x3b3362-0x0;var _0x223f5b=_0x207c[_0x3b3362];return _0x223f5b;};'use strict';var Sequelize=require('sequelize');module[_0xc207('0x0')]={'name':{'type':Sequelize[_0xc207('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0xc207('0x1')]},'parent':{'type':Sequelize[_0xc207('0x1')]},'table':{'type':Sequelize[_0xc207('0x1')]},'conditions':{'type':Sequelize[_0xc207('0x2')]},'joins':{'type':Sequelize[_0xc207('0x2')]}};
\ No newline at end of file
+var _0xfdbd=['sequelize','exports','STRING','TEXT'];(function(_0x261b8a,_0x553ec4){var _0x3455e8=function(_0xdf10d4){while(--_0xdf10d4){_0x261b8a['push'](_0x261b8a['shift']());}};_0x3455e8(++_0x553ec4);}(_0xfdbd,0xf0));var _0xdfdb=function(_0x22ee0f,_0x22e6d2){_0x22ee0f=_0x22ee0f-0x0;var _0x204696=_0xfdbd[_0x22ee0f];return _0x204696;};'use strict';var Sequelize=require(_0xdfdb('0x0'));module[_0xdfdb('0x1')]={'name':{'type':Sequelize[_0xdfdb('0x2')],'allowNull':![]},'description':{'type':Sequelize[_0xdfdb('0x2')]},'parent':{'type':Sequelize[_0xdfdb('0x2')]},'table':{'type':Sequelize[_0xdfdb('0x2')]},'conditions':{'type':Sequelize[_0xdfdb('0x3')]},'joins':{'type':Sequelize[_0xdfdb('0x3')]}};
\ No newline at end of file
index a9691e6..b1aea0a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe45c=['order','sort','where','filters','filter','VIRTUAL','merge','options','includeAll','include','findAll','rows','params','catch','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Reports','find','userProfileId','autoAssociation','CustomReports','error','body','preview','join','left_join','right_join','COUNT(DISTINCT\x20%s)','MAX(%s)','MIN(%s)','AVG(%s)','GROUP_CONCAT(%s)','SEC_TO_TIME(%s)','DATE(%s)','HOUR(%s)','ROUND(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NOT\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','operator','rules','group','field','condition','value','Sequelize','ValidationErrorItem','AnalyticMetric','keyBy','from','table','MetricId','metric','function','format','replace','groupBy','orderBy','DESC','alias','joins','parse','parentKey','foreignTable','foreignKey','conditions','clone','debug','Limited\x20Query:','toString','sequelize','SELECT','cross_join','SUM(%s)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)','IS\x20NULL','getFields','Please\x20insert\x20at\x20least\x20one\x20field','select','%s.%s\x20=\x20%s.%s','output','web','fullPath','%s-%s.%s','generate','csv','custom','AnalyticExtractedReport','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','Run\x20Query:','child_process','fork','../../components/export/','../../files/reports','countTable','COUNT(*)','QueryTypes','run','runReport','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','dbH','end','status','json','offset','limit','count','set','Content-Range','update','then','destroy','get','UserProfileResource','sendStatus','name','index','map','AnalyticCustomReport','rawAttributes','fieldName','type','key','query','keys','intersection','model','fields','attributes','length','hasOwnProperty'];(function(_0x449b54,_0x3776f3){var _0x32d6b9=function(_0xbce7c4){while(--_0xbce7c4){_0x449b54['push'](_0x449b54['shift']());}};_0x32d6b9(++_0x3776f3);}(_0xe45c,0x6d));var _0xce45=function(_0x4c6a2e,_0xd6b681){_0x4c6a2e=_0x4c6a2e-0x0;var _0x1e5a1a=_0xe45c[_0x4c6a2e];return _0x1e5a1a;};'use strict';var emlformat=require(_0xce45('0x0'));var rimraf=require(_0xce45('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xce45('0x2'));var rp=require(_0xce45('0x3'));var moment=require(_0xce45('0x4'));var BPromise=require(_0xce45('0x5'));var Mustache=require(_0xce45('0x6'));var util=require(_0xce45('0x7'));var path=require(_0xce45('0x8'));var sox=require(_0xce45('0x9'));var csv=require(_0xce45('0xa'));var ejs=require(_0xce45('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xce45('0xc'));var squel=require(_0xce45('0xd'));var crypto=require(_0xce45('0xe'));var jsforce=require(_0xce45('0xf'));var deskjs=require(_0xce45('0x10'));var toCsv=require(_0xce45('0xa'));var querystring=require(_0xce45('0x11'));var Papa=require(_0xce45('0x12'));var Redis=require(_0xce45('0x13'));var authService=require('../../components/auth/service');var qs=require(_0xce45('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xce45('0x15'));var logger=require('../../config/logger')(_0xce45('0x16'));var utils=require(_0xce45('0x17'));var config=require(_0xce45('0x18'));var licenseUtil=require(_0xce45('0x19'));var db=require('../../mysqldb')['db'];var dbH=require(_0xce45('0x1a'))[_0xce45('0x1b')];function respondWithStatusCode(_0x3846bf,_0x5f5917){_0x5f5917=_0x5f5917||0xcc;return function(_0x2798ed){if(_0x2798ed){return _0x3846bf['sendStatus'](_0x5f5917);}return _0x3846bf['status'](_0x5f5917)[_0xce45('0x1c')]();};}function respondWithResult(_0x3dac2a,_0x44dbca){_0x44dbca=_0x44dbca||0xc8;return function(_0xb90750){if(_0xb90750){return _0x3dac2a[_0xce45('0x1d')](_0x44dbca)[_0xce45('0x1e')](_0xb90750);}};}function respondWithFilteredResult(_0x4906f8,_0x34e196){return function(_0xdef3cc){if(_0xdef3cc){var _0x318037=typeof _0x34e196[_0xce45('0x1f')]==='undefined'&&typeof _0x34e196[_0xce45('0x20')]==='undefined';var _0x263393=_0xdef3cc[_0xce45('0x21')];var _0x358c7e=_0x318037?0x0:_0x34e196['offset'];var _0x2fad74=_0x318037?_0xdef3cc[_0xce45('0x21')]:_0x34e196[_0xce45('0x1f')]+_0x34e196[_0xce45('0x20')];var _0x4a24eb;if(_0x2fad74>=_0x263393){_0x2fad74=_0x263393;_0x4a24eb=0xc8;}else{_0x4a24eb=0xce;}_0x4906f8[_0xce45('0x1d')](_0x4a24eb);return _0x4906f8[_0xce45('0x22')](_0xce45('0x23'),_0x358c7e+'-'+_0x2fad74+'/'+_0x263393)['json'](_0xdef3cc);}return null;};}function patchUpdates(_0x3dbdc4){return function(_0x1700f9){try{jsonpatch['apply'](_0x1700f9,_0x3dbdc4,!![]);}catch(_0x523044){return BPromise['reject'](_0x523044);}return _0x1700f9['save']();};}function saveUpdates(_0x35a6bb,_0x1d73d9){return function(_0x24deb6){if(_0x24deb6){return _0x24deb6[_0xce45('0x24')](_0x35a6bb)[_0xce45('0x25')](function(_0x135dae){return _0x135dae;});}return null;};}function removeEntity(_0x60a333,_0x3af291){return function(_0x509795){if(_0x509795){return _0x509795[_0xce45('0x26')]()[_0xce45('0x25')](function(){var _0xc84907=_0x509795[_0xce45('0x27')]({'plain':!![]});var _0x311e8b='CustomReports';return db[_0xce45('0x28')][_0xce45('0x26')]({'where':{'type':_0x311e8b,'resourceId':_0xc84907['id']}})['then'](function(){return _0x509795;});})[_0xce45('0x25')](function(){_0x60a333[_0xce45('0x1d')](0xcc)[_0xce45('0x1c')]();});}};}function handleEntityNotFound(_0x3d0b4f,_0x46cb73){return function(_0x6b4121){if(!_0x6b4121){_0x3d0b4f[_0xce45('0x29')](0x194);}return _0x6b4121;};}function handleError(_0x190ee6,_0x2ccff1){_0x2ccff1=_0x2ccff1||0x1f4;return function(_0x4535ed){logger['error'](_0x4535ed['stack']);if(_0x4535ed[_0xce45('0x2a')]){delete _0x4535ed[_0xce45('0x2a')];}_0x190ee6['status'](_0x2ccff1)['send'](_0x4535ed);};}exports[_0xce45('0x2b')]=function(_0x3ca283,_0x97d1d4){var _0x4d43bf={},_0x3c0a77={},_0x54397c={'count':0x0,'rows':[]};var _0x19612d=_[_0xce45('0x2c')](db[_0xce45('0x2d')][_0xce45('0x2e')],function(_0x1db44d){return{'name':_0x1db44d[_0xce45('0x2f')],'type':_0x1db44d[_0xce45('0x30')][_0xce45('0x31')]};});_0x3c0a77['model']=_[_0xce45('0x2c')](_0x19612d,_0xce45('0x2a'));_0x3c0a77[_0xce45('0x32')]=_[_0xce45('0x33')](_0x3ca283['query']);_0x3c0a77['filters']=_[_0xce45('0x34')](_0x3c0a77[_0xce45('0x35')],_0x3c0a77[_0xce45('0x32')]);_0x4d43bf['attributes']=_[_0xce45('0x34')](_0x3c0a77[_0xce45('0x35')],qs['fields'](_0x3ca283['query'][_0xce45('0x36')]));_0x4d43bf[_0xce45('0x37')]=_0x4d43bf[_0xce45('0x37')][_0xce45('0x38')]?_0x4d43bf[_0xce45('0x37')]:_0x3c0a77['model'];if(!_0x3ca283[_0xce45('0x32')][_0xce45('0x39')]('nolimit')){_0x4d43bf[_0xce45('0x20')]=qs[_0xce45('0x20')](_0x3ca283[_0xce45('0x32')][_0xce45('0x20')]);_0x4d43bf[_0xce45('0x1f')]=qs[_0xce45('0x1f')](_0x3ca283[_0xce45('0x32')][_0xce45('0x1f')]);}_0x4d43bf[_0xce45('0x3a')]=qs[_0xce45('0x3b')](_0x3ca283[_0xce45('0x32')][_0xce45('0x3b')]);_0x4d43bf[_0xce45('0x3c')]=qs[_0xce45('0x3d')](_['pick'](_0x3ca283['query'],_0x3c0a77['filters']),_0x19612d);if(_0x3ca283[_0xce45('0x32')][_0xce45('0x3e')]){_0x4d43bf[_0xce45('0x3c')]=_['merge'](_0x4d43bf[_0xce45('0x3c')],{'$or':_[_0xce45('0x2c')](_0x19612d,function(_0x345267){if(_0x345267[_0xce45('0x30')]!==_0xce45('0x3f')){var _0x2d73dd={};_0x2d73dd[_0x345267[_0xce45('0x2a')]]={'$like':'%'+_0x3ca283[_0xce45('0x32')][_0xce45('0x3e')]+'%'};return _0x2d73dd;}})});}_0x4d43bf=_[_0xce45('0x40')]({},_0x4d43bf,_0x3ca283[_0xce45('0x41')]);var _0x1532c8={'where':_0x4d43bf[_0xce45('0x3c')]};return db['AnalyticCustomReport'][_0xce45('0x21')](_0x1532c8)[_0xce45('0x25')](function(_0x431112){_0x54397c[_0xce45('0x21')]=_0x431112;if(_0x3ca283[_0xce45('0x32')][_0xce45('0x42')]){_0x4d43bf[_0xce45('0x43')]=[{'all':!![]}];}return db['AnalyticCustomReport'][_0xce45('0x44')](_0x4d43bf);})[_0xce45('0x25')](function(_0x5eb2b8){_0x54397c[_0xce45('0x45')]=_0x5eb2b8;return _0x54397c;})[_0xce45('0x25')](respondWithFilteredResult(_0x97d1d4,_0x4d43bf))['catch'](handleError(_0x97d1d4,null));};exports['show']=function(_0x5cd778,_0x484b8f){var _0x4326d2={'raw':![],'where':{'id':_0x5cd778[_0xce45('0x46')]['id']}},_0x246df6={};_0x246df6[_0xce45('0x35')]=_[_0xce45('0x33')](db[_0xce45('0x2d')][_0xce45('0x2e')]);_0x246df6[_0xce45('0x32')]=_[_0xce45('0x33')](_0x5cd778[_0xce45('0x32')]);_0x246df6[_0xce45('0x3d')]=_[_0xce45('0x34')](_0x246df6[_0xce45('0x35')],_0x246df6['query']);_0x4326d2['attributes']=_[_0xce45('0x34')](_0x246df6['model'],qs['fields'](_0x5cd778['query'][_0xce45('0x36')]));_0x4326d2[_0xce45('0x37')]=_0x4326d2['attributes'][_0xce45('0x38')]?_0x4326d2[_0xce45('0x37')]:_0x246df6[_0xce45('0x35')];if(_0x5cd778[_0xce45('0x32')][_0xce45('0x42')]){_0x4326d2['include']=[{'all':!![]}];}_0x4326d2=_['merge']({},_0x4326d2,_0x5cd778[_0xce45('0x41')]);return db[_0xce45('0x2d')]['find'](_0x4326d2)[_0xce45('0x25')](handleEntityNotFound(_0x484b8f,null))['then'](respondWithResult(_0x484b8f,null))[_0xce45('0x47')](handleError(_0x484b8f,null));};exports[_0xce45('0x48')]=function(_0x346f71,_0x5c6688){return db[_0xce45('0x2d')][_0xce45('0x48')](_0x346f71['body'],{})[_0xce45('0x25')](function(_0x221d89){var _0x573771=_0x346f71[_0xce45('0x49')][_0xce45('0x27')]({'plain':!![]});if(!_0x573771)throw new Error(_0xce45('0x4a'));if(_0x573771[_0xce45('0x4b')]==='user'){var _0x648320=_0x221d89[_0xce45('0x27')]({'plain':!![]});var _0x5c3663=_0xce45('0x4c');return db['UserProfileSection'][_0xce45('0x4d')]({'where':{'name':_0x5c3663,'userProfileId':_0x573771[_0xce45('0x4e')]},'raw':!![]})[_0xce45('0x25')](function(_0x72df){if(_0x72df&&_0x72df[_0xce45('0x4f')]===0x0){return db[_0xce45('0x28')][_0xce45('0x48')]({'name':_0x648320[_0xce45('0x2a')],'resourceId':_0x648320['id'],'type':_0xce45('0x50'),'sectionId':_0x72df['id']},{})[_0xce45('0x25')](function(){return _0x221d89;});}else{return _0x221d89;}})[_0xce45('0x47')](function(_0x35cc5a){logger[_0xce45('0x51')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x35cc5a);throw _0x35cc5a;});}return _0x221d89;})[_0xce45('0x25')](respondWithResult(_0x5c6688,0xc9))[_0xce45('0x47')](handleError(_0x5c6688,null));};exports[_0xce45('0x24')]=function(_0x221c46,_0x432a84){if(_0x221c46['body']['id']){delete _0x221c46[_0xce45('0x52')]['id'];}return db[_0xce45('0x2d')][_0xce45('0x4d')]({'where':{'id':_0x221c46[_0xce45('0x46')]['id']}})[_0xce45('0x25')](handleEntityNotFound(_0x432a84,null))['then'](saveUpdates(_0x221c46[_0xce45('0x52')],null))[_0xce45('0x25')](respondWithResult(_0x432a84,null))[_0xce45('0x47')](handleError(_0x432a84,null));};exports['destroy']=function(_0x4e5a05,_0x599bdd){return db[_0xce45('0x2d')][_0xce45('0x4d')]({'where':{'id':_0x4e5a05[_0xce45('0x46')]['id']}})['then'](handleEntityNotFound(_0x599bdd,null))[_0xce45('0x25')](removeEntity(_0x599bdd,null))['catch'](handleError(_0x599bdd,null));};exports[_0xce45('0x53')]=function(_0x51f925,_0x2f6356){var _0x3e3ab6=0xa;var _0x49c032=[_0xce45('0x54'),_0xce45('0x55'),_0xce45('0x56'),'cross_join'];var _0x312ca7={'SUM':'SUM(%s)','COUNT':'COUNT(%s)','COUNT DISTINCT':_0xce45('0x57'),'MAX':_0xce45('0x58'),'MIN':_0xce45('0x59'),'AVG':_0xce45('0x5a'),'GROUP_CONCAT':_0xce45('0x5b'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x4be7c2={'SEC_TO_TIME':_0xce45('0x5c'),'DATE':_0xce45('0x5d'),'HOUR':_0xce45('0x5e'),'ROUND':_0xce45('0x5f'),'UNIX_TIMESTAMP':_0xce45('0x60')};var _0x36bd68=function(_0x1ebcd1){return!_[_0xce45('0x61')](['IS\x20NULL',_0xce45('0x62'),_0xce45('0x63'),_0xce45('0x64')],_0x1ebcd1);};var _0x2f03d3=function(_0x537807){if(!_0x537807||!_0x537807['rules'][_0xce45('0x38')]){return'';}for(var _0x27a925='(',_0x2f885c=0x0;_0x2f885c<_0x537807['rules'][_0xce45('0x38')];_0x2f885c+=0x1){_0x2f885c>0x0&&(_0x27a925+='\x20'+_0x537807[_0xce45('0x65')]+'\x20');_0x27a925+=_0x537807['rules'][_0x2f885c]['group']?_0x2f03d3(_0x537807[_0xce45('0x66')][_0x2f885c][_0xce45('0x67')]):_0x537807['rules'][_0x2f885c][_0xce45('0x68')]+'\x20'+_0x537807[_0xce45('0x66')][_0x2f885c][_0xce45('0x69')]+(_0x36bd68(_0x537807[_0xce45('0x66')][_0x2f885c][_0xce45('0x69')])?'\x20'+_0x537807[_0xce45('0x66')][_0x2f885c][_0xce45('0x6a')]:'');}return _0x27a925+')';};var _0x4c4d63={'where':{'id':_0x51f925[_0xce45('0x46')]['id']}},_0x3e8f22,_0x460871,_0x411342,_0x1dbe16,_0x3ba720;_0x4c4d63=_[_0xce45('0x40')]({},_0x4c4d63,_0x51f925[_0xce45('0x41')]);return db[_0xce45('0x2d')][_0xce45('0x4d')](_0x4c4d63)[_0xce45('0x25')](function(_0x5c484a){if(_0x5c484a){_0x3e8f22=_0x5c484a;return _0x5c484a['getFields']();}return null;})[_0xce45('0x25')](function(_0x1e501e){if(_0x1e501e){if(!_0x1e501e[_0xce45('0x38')]){throw new db[(_0xce45('0x6b'))][(_0xce45('0x6c'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x460871=_0x1e501e;return db[_0xce45('0x6d')][_0xce45('0x44')]({'raw':!![]});}return null;})['then'](function(_0x49c1d4){if(_0x49c1d4){_0x411342=_[_0xce45('0x6e')](_0x49c1d4,'id');var _0x2eb198;var _0x58eb10=squel['select']();_0x58eb10[_0xce45('0x6f')](_0x3e8f22[_0xce45('0x70')]);for(var _0x1dddd2=0x0;_0x1dddd2<_0x460871[_0xce45('0x38')];_0x1dddd2+=0x1){_0x2eb198=_0x460871[_0x1dddd2][_0xce45('0x71')]?_0x411342[_0x460871[_0x1dddd2][_0xce45('0x71')]][_0xce45('0x72')]:_0x460871[_0x1dddd2]['field'];_0x2eb198=_0x460871[_0x1dddd2][_0xce45('0x73')]?_['replace'](_0x312ca7[_0x460871[_0x1dddd2]['function']],'%s',_0x2eb198):_0x2eb198;_0x2eb198=_0x460871[_0x1dddd2][_0xce45('0x74')]?_[_0xce45('0x75')](_0x4be7c2[_0x460871[_0x1dddd2][_0xce45('0x74')]],'%s',_0x2eb198):_0x2eb198;if(_0x460871[_0x1dddd2][_0xce45('0x76')]){_0x58eb10[_0xce45('0x67')](_0x2eb198);}_0x460871[_0x1dddd2][_0xce45('0x77')]&&_0x58eb10[_0xce45('0x3a')](_0x2eb198,_0x460871[_0x1dddd2][_0xce45('0x77')]===_0xce45('0x78')?![]:!![]);_0x58eb10[_0xce45('0x68')](_0x2eb198,_0x460871[_0x1dddd2][_0xce45('0x79')]||_0x2eb198);}if(_0x3e8f22[_0xce45('0x7a')]){_0x3e8f22['joins']=JSON[_0xce45('0x7b')](_0x3e8f22[_0xce45('0x7a')]);for(var _0x22c67a=0x0;_0x22c67a<_0x3e8f22[_0xce45('0x7a')][_0xce45('0x38')];_0x22c67a+=0x1){if(_0x3e8f22['joins'][_0x22c67a]['type']&&_['includes'](_0x49c032,_0x3e8f22[_0xce45('0x7a')][_0x22c67a][_0xce45('0x30')])&&_0x3e8f22[_0xce45('0x7a')][_0x22c67a][_0xce45('0x7c')]&&_0x3e8f22['joins'][_0x22c67a][_0xce45('0x7d')]&&_0x3e8f22[_0xce45('0x7a')][_0x22c67a][_0xce45('0x7e')]){_0x58eb10[_0x3e8f22[_0xce45('0x7a')][_0x22c67a][_0xce45('0x30')]](_0x3e8f22[_0xce45('0x7a')][_0x22c67a][_0xce45('0x7d')],null,util[_0xce45('0x74')]('%s.%s\x20=\x20%s.%s',_0x3e8f22[_0xce45('0x70')],_0x3e8f22[_0xce45('0x7a')][_0x22c67a][_0xce45('0x7c')],_0x3e8f22[_0xce45('0x7a')][_0x22c67a][_0xce45('0x7d')],_0x3e8f22[_0xce45('0x7a')][_0x22c67a][_0xce45('0x7e')]));}}}if(_0x3e8f22['conditions']){_0x3e8f22[_0xce45('0x7f')]=JSON[_0xce45('0x7b')](_0x3e8f22[_0xce45('0x7f')]);_0x58eb10[_0xce45('0x3c')](_0x2f03d3(_0x3e8f22[_0xce45('0x7f')][_0xce45('0x67')]));}_0x3ba720=_0x58eb10[_0xce45('0x80')]();_0x58eb10[_0xce45('0x20')](_0x3e3ab6);_0x58eb10[_0xce45('0x1f')](0x0);logger[_0xce45('0x81')](_0xce45('0x82'),_0x58eb10[_0xce45('0x83')]());return dbH[_0xce45('0x84')][_0xce45('0x32')](_0x58eb10[_0xce45('0x83')](),{'type':dbH[_0xce45('0x84')]['QueryTypes'][_0xce45('0x85')]});}})['then'](respondWithResult(_0x2f6356,null))['catch'](handleError(_0x2f6356,null));};function runReport(_0x307a85,_0x1b868f,_0x381b90){var _0x1d4abb=_0x1b868f[_0xce45('0x2a')];var _0x5b02ed=0xa;var _0x4e8899=[_0xce45('0x54'),_0xce45('0x55'),_0xce45('0x56'),_0xce45('0x86')];var _0x3dc50e={'SUM':_0xce45('0x87'),'COUNT':'COUNT(%s)','COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0xce45('0x58'),'MIN':_0xce45('0x59'),'AVG':_0xce45('0x5a'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':_0xce45('0x88'),'GROUP_CONCAT DESC':_0xce45('0x89')};var _0x3c88e8={'SEC_TO_TIME':_0xce45('0x5c'),'DATE':_0xce45('0x5d'),'HOUR':_0xce45('0x5e'),'ROUND':_0xce45('0x5f'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x38e72a=function(_0x127ddf){return!_[_0xce45('0x61')]([_0xce45('0x8a'),_0xce45('0x62'),_0xce45('0x63'),'IS\x20NOT\x20EMPTY'],_0x127ddf);};var _0x40ed47=function(_0x2ac7d0){if(!_0x2ac7d0||!_0x2ac7d0['rules']['length']){return'';}for(var _0x478c5b='(',_0x1cb6c8=0x0;_0x1cb6c8<_0x2ac7d0['rules'][_0xce45('0x38')];_0x1cb6c8+=0x1){_0x1cb6c8>0x0&&(_0x478c5b+='\x20'+_0x2ac7d0[_0xce45('0x65')]+'\x20');_0x478c5b+=_0x2ac7d0[_0xce45('0x66')][_0x1cb6c8][_0xce45('0x67')]?_0x40ed47(_0x2ac7d0['rules'][_0x1cb6c8][_0xce45('0x67')]):_0x2ac7d0['rules'][_0x1cb6c8][_0xce45('0x68')]+'\x20'+_0x2ac7d0[_0xce45('0x66')][_0x1cb6c8][_0xce45('0x69')]+(_0x38e72a(_0x2ac7d0[_0xce45('0x66')][_0x1cb6c8][_0xce45('0x69')])?'\x20'+_0x2ac7d0['rules'][_0x1cb6c8]['value']:'');}return _0x478c5b+')';};var _0x3f41f7={'where':{'id':_0x307a85['id']}},_0x40e72a,_0x5c4b16,_0x4bbb2e,_0x4d9a76,_0x53718d;_0x3f41f7=_[_0xce45('0x40')]({},_0x3f41f7,_0x381b90);return db[_0xce45('0x2d')]['find'](_0x3f41f7)[_0xce45('0x25')](function(_0x5c7787){if(_0x5c7787){_0x40e72a=_0x5c7787;return _0x5c7787[_0xce45('0x8b')]();}return null;})[_0xce45('0x25')](function(_0x3abd3e){if(_0x3abd3e){if(!_0x3abd3e[_0xce45('0x38')]){throw new db[(_0xce45('0x6b'))][(_0xce45('0x6c'))](_0xce45('0x8c'),0x193);}_0x5c4b16=_0x3abd3e;return db['AnalyticMetric']['findAll']({'raw':!![]});}return null;})[_0xce45('0x25')](function(_0x116389){if(_0x116389){_0x4bbb2e=_[_0xce45('0x6e')](_0x116389,'id');var _0x1f2020;var _0x1f48eb=squel[_0xce45('0x8d')]();_0x1f48eb[_0xce45('0x6f')](_0x40e72a[_0xce45('0x70')]);for(var _0x4bfcf8=0x0;_0x4bfcf8<_0x5c4b16[_0xce45('0x38')];_0x4bfcf8+=0x1){_0x1f2020=_0x5c4b16[_0x4bfcf8][_0xce45('0x71')]?_0x4bbb2e[_0x5c4b16[_0x4bfcf8][_0xce45('0x71')]]['metric']:_0x5c4b16[_0x4bfcf8][_0xce45('0x68')];_0x1f2020=_0x5c4b16[_0x4bfcf8]['function']?_['replace'](_0x3dc50e[_0x5c4b16[_0x4bfcf8][_0xce45('0x73')]],'%s',_0x1f2020):_0x1f2020;_0x1f2020=_0x5c4b16[_0x4bfcf8][_0xce45('0x74')]?_['replace'](_0x3c88e8[_0x5c4b16[_0x4bfcf8][_0xce45('0x74')]],'%s',_0x1f2020):_0x1f2020;if(_0x5c4b16[_0x4bfcf8][_0xce45('0x76')]){_0x1f48eb['group'](_0x1f2020);}_0x5c4b16[_0x4bfcf8][_0xce45('0x77')]&&_0x1f48eb[_0xce45('0x3a')](_0x1f2020,_0x5c4b16[_0x4bfcf8][_0xce45('0x77')]===_0xce45('0x78')?![]:!![]);_0x1f48eb[_0xce45('0x68')](_0x1f2020,_0x5c4b16[_0x4bfcf8]['alias']||_0x1f2020);}if(_0x40e72a[_0xce45('0x7a')]){_0x40e72a[_0xce45('0x7a')]=JSON[_0xce45('0x7b')](_0x40e72a[_0xce45('0x7a')]);for(var _0x4a06aa=0x0;_0x4a06aa<_0x40e72a[_0xce45('0x7a')][_0xce45('0x38')];_0x4a06aa+=0x1){if(_0x40e72a[_0xce45('0x7a')][_0x4a06aa][_0xce45('0x30')]&&_[_0xce45('0x61')](_0x4e8899,_0x40e72a[_0xce45('0x7a')][_0x4a06aa][_0xce45('0x30')])&&_0x40e72a[_0xce45('0x7a')][_0x4a06aa][_0xce45('0x7c')]&&_0x40e72a[_0xce45('0x7a')][_0x4a06aa]['foreignTable']&&_0x40e72a[_0xce45('0x7a')][_0x4a06aa][_0xce45('0x7e')]){_0x1f48eb[_0x40e72a['joins'][_0x4a06aa][_0xce45('0x30')]](_0x40e72a[_0xce45('0x7a')][_0x4a06aa][_0xce45('0x7d')],null,util[_0xce45('0x74')](_0xce45('0x8e'),_0x40e72a[_0xce45('0x70')],_0x40e72a[_0xce45('0x7a')][_0x4a06aa]['parentKey'],_0x40e72a['joins'][_0x4a06aa][_0xce45('0x7d')],_0x40e72a[_0xce45('0x7a')][_0x4a06aa]['foreignKey']));}}}if(_0x40e72a[_0xce45('0x7f')]){_0x40e72a['conditions']=JSON['parse'](_0x40e72a[_0xce45('0x7f')]);_0x1f48eb[_0xce45('0x3c')](_0x40ed47(_0x40e72a[_0xce45('0x7f')][_0xce45('0x67')]));}_0x53718d=_0x1f48eb[_0xce45('0x80')]();_0x1f48eb[_0xce45('0x20')](_0x5b02ed);_0x1f48eb[_0xce45('0x1f')](0x0);return;}})[_0xce45('0x25')](function(){if(_0x1b868f[_0xce45('0x8f')]===_0xce45('0x90')){return null;}var _0x543227=_[_0xce45('0x40')](_0x1b868f,{'name':_0x1b868f[_0xce45('0x91')]||_0x1b868f[_0xce45('0x2a')]||_0x40e72a[_0xce45('0x2a')],'basename':_0x1d4abb,'savename':util[_0xce45('0x74')](_0xce45('0x92'),_0x1b868f[_0xce45('0x2a')]||_0x40e72a[_0xce45('0x2a')],require('randomstring')[_0xce45('0x93')](0x4),_0x1b868f['output']||_0xce45('0x94')),'reportId':_0x40e72a['id'],'reportType':_0xce45('0x95')});return db[_0xce45('0x96')][_0xce45('0x48')](_0x543227,{'raw':!![]});})[_0xce45('0x25')](function(_0x30476e){if(_0x40e72a[_0xce45('0x70')]===_0xce45('0x97')){_0x53718d[_0xce45('0x3c')](_0x40e72a[_0xce45('0x70')]+_0xce45('0x98'),_0x1b868f[_0xce45('0x99')],_0x1b868f[_0xce45('0x9a')]);}else{_0x53718d[_0xce45('0x3c')](_0x40e72a[_0xce45('0x70')]+_0xce45('0x9b'),_0x1b868f[_0xce45('0x99')],_0x1b868f[_0xce45('0x9a')]);}if(_0x30476e){logger[_0xce45('0x9c')](_0xce45('0x9d'),_0x53718d['toString']());require(_0xce45('0x9e'))[_0xce45('0x9f')](path[_0xce45('0x54')](__dirname,_0xce45('0xa0'),_0x30476e[_0xce45('0x8f')]),[_0x30476e['id'],_0x53718d[_0xce45('0x83')](),path[_0xce45('0x54')](__dirname,_0xce45('0xa1'),_0x30476e['savename']),_0x1d4abb]);return _0x30476e;}else{var _0xa977cb=squel['select']();_0xa977cb[_0xce45('0x6f')]('('+_0x53718d[_0xce45('0x83')]()+')',_0xce45('0xa2'));_0xa977cb[_0xce45('0x68')](_0xce45('0xa3'),_0xce45('0x21'));_0x53718d['limit'](_0x1b868f[_0xce45('0x20')]||_0x5b02ed);_0x53718d[_0xce45('0x1f')](_0x1b868f[_0xce45('0x1f')]||0x0);return dbH['sequelize'][_0xce45('0x32')](_0xa977cb[_0xce45('0x83')](),{'type':dbH[_0xce45('0x84')][_0xce45('0xa4')][_0xce45('0x85')]})[_0xce45('0x25')](function(_0x5584b5){if(!_0x5584b5[_0xce45('0x38')]){_0x4d9a76=0x0;}else{_0x4d9a76=_0x5584b5[0x0][_0xce45('0x21')]||0x0;}return dbH[_0xce45('0x84')][_0xce45('0x32')](_0x53718d[_0xce45('0x83')](),{'type':dbH[_0xce45('0x84')][_0xce45('0xa4')][_0xce45('0x85')]});})[_0xce45('0x25')](function(_0x5afae9){return{'rows':_0x5afae9||[],'count':_0x4d9a76};});}});}exports[_0xce45('0xa5')]=function(_0x26719e,_0x4405c0){return runReport(_0x26719e[_0xce45('0x46')],_0x26719e[_0xce45('0x32')],_0x26719e['options'])['then'](respondWithResult(_0x4405c0,null))[_0xce45('0x47')](handleError(_0x4405c0,null));};exports[_0xce45('0xa6')]=runReport;exports[_0xce45('0x32')]=function(_0x2f8ee5,_0x2a31d2){var _0xeaff6c=0xa;var _0x5d3f41=['join',_0xce45('0x55'),_0xce45('0x56'),_0xce45('0x86')];var _0x319098={'SUM':_0xce45('0x87'),'COUNT':'COUNT(%s)','COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0xce45('0x58'),'MIN':'MIN(%s)','AVG':_0xce45('0x5a'),'GROUP_CONCAT':_0xce45('0x5b'),'GROUP_CONCAT ASC':_0xce45('0x88'),'GROUP_CONCAT DESC':_0xce45('0x89')};var _0x13f789={'SEC_TO_TIME':_0xce45('0x5c'),'DATE':'DATE(%s)','HOUR':'HOUR(%s)','ROUND':_0xce45('0x5f'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x26516e=function(_0x179126){return!_[_0xce45('0x61')]([_0xce45('0x8a'),'IS\x20NOT\x20NULL',_0xce45('0x63'),_0xce45('0x64')],_0x179126);};var _0x1e875b=function(_0x29846f){if(!_0x29846f||!_0x29846f['rules'][_0xce45('0x38')]){return'';}for(var _0x53a96c='(',_0x913fd2=0x0;_0x913fd2<_0x29846f['rules'][_0xce45('0x38')];_0x913fd2+=0x1){_0x913fd2>0x0&&(_0x53a96c+='\x20'+_0x29846f[_0xce45('0x65')]+'\x20');_0x53a96c+=_0x29846f[_0xce45('0x66')][_0x913fd2][_0xce45('0x67')]?_0x1e875b(_0x29846f[_0xce45('0x66')][_0x913fd2]['group']):_0x29846f[_0xce45('0x66')][_0x913fd2]['field']+'\x20'+_0x29846f[_0xce45('0x66')][_0x913fd2][_0xce45('0x69')]+(_0x26516e(_0x29846f[_0xce45('0x66')][_0x913fd2][_0xce45('0x69')])?'\x20'+_0x29846f['rules'][_0x913fd2]['value']:'');}return _0x53a96c+')';};var _0x33789b={'where':{'id':_0x2f8ee5['params']['id']}},_0x1a67fb,_0x15bfc5,_0x80a0dc,_0x20f0bf,_0x1bf228;_0x33789b=_[_0xce45('0x40')]({},_0x33789b,_0x2f8ee5['options']);return db[_0xce45('0x2d')][_0xce45('0x4d')](_0x33789b)[_0xce45('0x25')](function(_0x3eb583){if(_0x3eb583){_0x1a67fb=_0x3eb583;return _0x3eb583[_0xce45('0x8b')]();}return null;})[_0xce45('0x25')](function(_0x13201e){if(_0x13201e){if(!_0x13201e[_0xce45('0x38')]){throw new db[(_0xce45('0x6b'))][(_0xce45('0x6c'))]('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x15bfc5=_0x13201e;return db[_0xce45('0x6d')][_0xce45('0x44')]({'raw':!![]});}return null;})[_0xce45('0x25')](function(_0x2650dd){if(_0x2650dd){_0x80a0dc=_[_0xce45('0x6e')](_0x2650dd,'id');var _0x4194d5;var _0x2ee1af=squel[_0xce45('0x8d')]();_0x2ee1af['from'](_0x1a67fb['table']);for(var _0x31e867=0x0;_0x31e867<_0x15bfc5[_0xce45('0x38')];_0x31e867+=0x1){_0x4194d5=_0x15bfc5[_0x31e867]['MetricId']?_0x80a0dc[_0x15bfc5[_0x31e867]['MetricId']][_0xce45('0x72')]:_0x15bfc5[_0x31e867][_0xce45('0x68')];_0x4194d5=_0x15bfc5[_0x31e867][_0xce45('0x73')]?_[_0xce45('0x75')](_0x319098[_0x15bfc5[_0x31e867]['function']],'%s',_0x4194d5):_0x4194d5;_0x4194d5=_0x15bfc5[_0x31e867]['format']?_['replace'](_0x13f789[_0x15bfc5[_0x31e867]['format']],'%s',_0x4194d5):_0x4194d5;if(_0x15bfc5[_0x31e867][_0xce45('0x76')]){_0x2ee1af[_0xce45('0x67')](_0x4194d5);}_0x15bfc5[_0x31e867][_0xce45('0x77')]&&_0x2ee1af['order'](_0x4194d5,_0x15bfc5[_0x31e867][_0xce45('0x77')]===_0xce45('0x78')?![]:!![]);_0x2ee1af['field'](_0x4194d5,_0x15bfc5[_0x31e867][_0xce45('0x79')]||_0x4194d5);}if(_0x1a67fb[_0xce45('0x7a')]){_0x1a67fb['joins']=JSON[_0xce45('0x7b')](_0x1a67fb[_0xce45('0x7a')]);for(var _0x1ae026=0x0;_0x1ae026<_0x1a67fb[_0xce45('0x7a')][_0xce45('0x38')];_0x1ae026+=0x1){if(_0x1a67fb['joins'][_0x1ae026]['type']&&_['includes'](_0x5d3f41,_0x1a67fb[_0xce45('0x7a')][_0x1ae026][_0xce45('0x30')])&&_0x1a67fb[_0xce45('0x7a')][_0x1ae026][_0xce45('0x7c')]&&_0x1a67fb[_0xce45('0x7a')][_0x1ae026]['foreignTable']&&_0x1a67fb[_0xce45('0x7a')][_0x1ae026][_0xce45('0x7e')]){_0x2ee1af[_0x1a67fb[_0xce45('0x7a')][_0x1ae026]['type']](_0x1a67fb[_0xce45('0x7a')][_0x1ae026][_0xce45('0x7d')],null,util[_0xce45('0x74')]('%s.%s\x20=\x20%s.%s',_0x1a67fb[_0xce45('0x70')],_0x1a67fb[_0xce45('0x7a')][_0x1ae026][_0xce45('0x7c')],_0x1a67fb['joins'][_0x1ae026][_0xce45('0x7d')],_0x1a67fb[_0xce45('0x7a')][_0x1ae026]['foreignKey']));}}}if(_0x1a67fb[_0xce45('0x7f')]){_0x1a67fb[_0xce45('0x7f')]=JSON[_0xce45('0x7b')](_0x1a67fb['conditions']);_0x2ee1af['where'](_0x1e875b(_0x1a67fb[_0xce45('0x7f')][_0xce45('0x67')]));}_0x1bf228=_0x2ee1af[_0xce45('0x80')]();_0x2ee1af['limit'](_0xeaff6c);_0x2ee1af[_0xce45('0x1f')](0x0);logger[_0xce45('0x81')](_0xce45('0x82'),_0x2ee1af[_0xce45('0x83')]());return dbH[_0xce45('0x84')][_0xce45('0x32')](_0x2ee1af[_0xce45('0x83')](),{'type':dbH[_0xce45('0x84')][_0xce45('0xa4')]['SELECT']});}})[_0xce45('0x25')](function(){return{'sql':_0x1bf228[_0xce45('0x83')]()};})[_0xce45('0x25')](respondWithResult(_0x2a31d2,null))['catch'](handleError(_0x2a31d2,null));};
\ No newline at end of file
+var _0x9861=['parse','output','web','%s-%s.%s','generate','csv','custom','cdr','.calldate\x20BETWEEN\x20?\x20AND\x20?','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','startDate','Run\x20Query:','child_process','fork','../../components/export/','../../files/reports','savename','countTable','run','runReport','%s.%s\x20=\x20%s.%s','debug','eml-format','rimraf','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/license/util','../../mysqldb','dbH','status','json','offset','undefined','limit','set','Content-Range','apply','update','then','get','UserProfileResource','destroy','sendStatus','error','name','index','map','AnalyticCustomReport','rawAttributes','fieldName','type','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','count','include','findAll','rows','show','params','includeAll','options','catch','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','Reports','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','find','preview','left_join','right_join','cross_join','SUM(%s)','COUNT(%s)','COUNT(DISTINCT\x20%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)','DATE(%s)','HOUR(%s)','UNIX_TIMESTAMP(%s)','includes','IS\x20NULL','IS\x20EMPTY','IS\x20NOT\x20EMPTY','rules','operator','group','condition','value','getFields','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','select','from','table','MetricId','field','function','replace','format','groupBy','orderBy','DESC','alias','joins','parentKey','foreignTable','foreignKey','conditions','clone','Limited\x20Query:','toString','sequelize','QueryTypes','SELECT','join','SEC_TO_TIME(%s)','ROUND(%s)','IS\x20NOT\x20NULL','keyBy','metric'];(function(_0x1a7846,_0x59723e){var _0x48049=function(_0x203ff6){while(--_0x203ff6){_0x1a7846['push'](_0x1a7846['shift']());}};_0x48049(++_0x59723e);}(_0x9861,0x1f1));var _0x1986=function(_0x10700b,_0x48a185){_0x10700b=_0x10700b-0x0;var _0x48df0e=_0x9861[_0x10700b];return _0x48df0e;};'use strict';var emlformat=require(_0x1986('0x0'));var rimraf=require(_0x1986('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x1986('0x2'));var BPromise=require(_0x1986('0x3'));var Mustache=require(_0x1986('0x4'));var util=require(_0x1986('0x5'));var path=require(_0x1986('0x6'));var sox=require(_0x1986('0x7'));var csv=require(_0x1986('0x8'));var ejs=require(_0x1986('0x9'));var fs=require('fs');var fs_extra=require(_0x1986('0xa'));var _=require(_0x1986('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x1986('0xc'));var toCsv=require(_0x1986('0x8'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x1986('0xd'));var authService=require(_0x1986('0xe'));var qs=require(_0x1986('0xf'));var as=require(_0x1986('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x1986('0x11'))(_0x1986('0x12'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x1986('0x13'));var db=require('../../mysqldb')['db'];var dbH=require(_0x1986('0x14'))[_0x1986('0x15')];function respondWithStatusCode(_0x44c427,_0x8e393b){_0x8e393b=_0x8e393b||0xcc;return function(_0x31c291){if(_0x31c291){return _0x44c427['sendStatus'](_0x8e393b);}return _0x44c427[_0x1986('0x16')](_0x8e393b)['end']();};}function respondWithResult(_0x527b89,_0x43aa02){_0x43aa02=_0x43aa02||0xc8;return function(_0xbe1a95){if(_0xbe1a95){return _0x527b89[_0x1986('0x16')](_0x43aa02)[_0x1986('0x17')](_0xbe1a95);}};}function respondWithFilteredResult(_0x4e456a,_0x45d8ff){return function(_0x4f2735){if(_0x4f2735){var _0x3c34f8=typeof _0x45d8ff[_0x1986('0x18')]===_0x1986('0x19')&&typeof _0x45d8ff[_0x1986('0x1a')]===_0x1986('0x19');var _0x985894=_0x4f2735['count'];var _0x192824=_0x3c34f8?0x0:_0x45d8ff['offset'];var _0x529e2c=_0x3c34f8?_0x4f2735['count']:_0x45d8ff[_0x1986('0x18')]+_0x45d8ff[_0x1986('0x1a')];var _0x4c4e8b;if(_0x529e2c>=_0x985894){_0x529e2c=_0x985894;_0x4c4e8b=0xc8;}else{_0x4c4e8b=0xce;}_0x4e456a[_0x1986('0x16')](_0x4c4e8b);return _0x4e456a[_0x1986('0x1b')](_0x1986('0x1c'),_0x192824+'-'+_0x529e2c+'/'+_0x985894)[_0x1986('0x17')](_0x4f2735);}return null;};}function patchUpdates(_0x4716b3){return function(_0x2fdddb){try{jsonpatch[_0x1986('0x1d')](_0x2fdddb,_0x4716b3,!![]);}catch(_0x5961db){return BPromise['reject'](_0x5961db);}return _0x2fdddb['save']();};}function saveUpdates(_0x109555,_0x196cd5){return function(_0x571f11){if(_0x571f11){return _0x571f11[_0x1986('0x1e')](_0x109555)[_0x1986('0x1f')](function(_0x32ab60){return _0x32ab60;});}return null;};}function removeEntity(_0x2065ca,_0x3f4cc0){return function(_0x4d93e4){if(_0x4d93e4){return _0x4d93e4['destroy']()['then'](function(){var _0x530bf4=_0x4d93e4[_0x1986('0x20')]({'plain':!![]});var _0x41173d='CustomReports';return db[_0x1986('0x21')][_0x1986('0x22')]({'where':{'type':_0x41173d,'resourceId':_0x530bf4['id']}})[_0x1986('0x1f')](function(){return _0x4d93e4;});})[_0x1986('0x1f')](function(){_0x2065ca['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x1a29ec,_0x2ada59){return function(_0x5832b4){if(!_0x5832b4){_0x1a29ec[_0x1986('0x23')](0x194);}return _0x5832b4;};}function handleError(_0x13e302,_0x490619){_0x490619=_0x490619||0x1f4;return function(_0x31dca5){logger[_0x1986('0x24')](_0x31dca5['stack']);if(_0x31dca5[_0x1986('0x25')]){delete _0x31dca5[_0x1986('0x25')];}_0x13e302[_0x1986('0x16')](_0x490619)['send'](_0x31dca5);};}exports[_0x1986('0x26')]=function(_0xdce1a5,_0x4a5c4a){var _0x34b2cd={},_0xe30e9d={},_0x46be50={'count':0x0,'rows':[]};var _0x176221=_[_0x1986('0x27')](db[_0x1986('0x28')][_0x1986('0x29')],function(_0x972a83){return{'name':_0x972a83[_0x1986('0x2a')],'type':_0x972a83[_0x1986('0x2b')]['key']};});_0xe30e9d[_0x1986('0x2c')]=_['map'](_0x176221,_0x1986('0x25'));_0xe30e9d[_0x1986('0x2d')]=_[_0x1986('0x2e')](_0xdce1a5[_0x1986('0x2d')]);_0xe30e9d['filters']=_[_0x1986('0x2f')](_0xe30e9d[_0x1986('0x2c')],_0xe30e9d['query']);_0x34b2cd['attributes']=_[_0x1986('0x2f')](_0xe30e9d[_0x1986('0x2c')],qs[_0x1986('0x30')](_0xdce1a5[_0x1986('0x2d')][_0x1986('0x30')]));_0x34b2cd[_0x1986('0x31')]=_0x34b2cd['attributes'][_0x1986('0x32')]?_0x34b2cd[_0x1986('0x31')]:_0xe30e9d[_0x1986('0x2c')];if(!_0xdce1a5['query'][_0x1986('0x33')](_0x1986('0x34'))){_0x34b2cd[_0x1986('0x1a')]=qs[_0x1986('0x1a')](_0xdce1a5[_0x1986('0x2d')][_0x1986('0x1a')]);_0x34b2cd[_0x1986('0x18')]=qs[_0x1986('0x18')](_0xdce1a5[_0x1986('0x2d')][_0x1986('0x18')]);}_0x34b2cd[_0x1986('0x35')]=qs[_0x1986('0x36')](_0xdce1a5[_0x1986('0x2d')]['sort']);_0x34b2cd[_0x1986('0x37')]=qs[_0x1986('0x38')](_[_0x1986('0x39')](_0xdce1a5['query'],_0xe30e9d[_0x1986('0x38')]),_0x176221);if(_0xdce1a5['query'][_0x1986('0x3a')]){_0x34b2cd[_0x1986('0x37')]=_[_0x1986('0x3b')](_0x34b2cd[_0x1986('0x37')],{'$or':_['map'](_0x176221,function(_0x43c978){if(_0x43c978[_0x1986('0x2b')]!=='VIRTUAL'){var _0x139d11={};_0x139d11[_0x43c978['name']]={'$like':'%'+_0xdce1a5[_0x1986('0x2d')]['filter']+'%'};return _0x139d11;}})});}_0x34b2cd=_[_0x1986('0x3b')]({},_0x34b2cd,_0xdce1a5['options']);var _0x148596={'where':_0x34b2cd[_0x1986('0x37')]};return db[_0x1986('0x28')]['count'](_0x148596)[_0x1986('0x1f')](function(_0x4f8394){_0x46be50[_0x1986('0x3c')]=_0x4f8394;if(_0xdce1a5[_0x1986('0x2d')]['includeAll']){_0x34b2cd[_0x1986('0x3d')]=[{'all':!![]}];}return db['AnalyticCustomReport'][_0x1986('0x3e')](_0x34b2cd);})[_0x1986('0x1f')](function(_0xaa62cf){_0x46be50[_0x1986('0x3f')]=_0xaa62cf;return _0x46be50;})[_0x1986('0x1f')](respondWithFilteredResult(_0x4a5c4a,_0x34b2cd))['catch'](handleError(_0x4a5c4a,null));};exports[_0x1986('0x40')]=function(_0xbe1567,_0x528721){var _0x401f5f={'raw':![],'where':{'id':_0xbe1567[_0x1986('0x41')]['id']}},_0x21f964={};_0x21f964[_0x1986('0x2c')]=_[_0x1986('0x2e')](db['AnalyticCustomReport'][_0x1986('0x29')]);_0x21f964[_0x1986('0x2d')]=_[_0x1986('0x2e')](_0xbe1567['query']);_0x21f964[_0x1986('0x38')]=_[_0x1986('0x2f')](_0x21f964['model'],_0x21f964[_0x1986('0x2d')]);_0x401f5f[_0x1986('0x31')]=_['intersection'](_0x21f964[_0x1986('0x2c')],qs[_0x1986('0x30')](_0xbe1567[_0x1986('0x2d')][_0x1986('0x30')]));_0x401f5f[_0x1986('0x31')]=_0x401f5f[_0x1986('0x31')]['length']?_0x401f5f[_0x1986('0x31')]:_0x21f964[_0x1986('0x2c')];if(_0xbe1567[_0x1986('0x2d')][_0x1986('0x42')]){_0x401f5f[_0x1986('0x3d')]=[{'all':!![]}];}_0x401f5f=_['merge']({},_0x401f5f,_0xbe1567[_0x1986('0x43')]);return db[_0x1986('0x28')]['find'](_0x401f5f)['then'](handleEntityNotFound(_0x528721,null))[_0x1986('0x1f')](respondWithResult(_0x528721,null))[_0x1986('0x44')](handleError(_0x528721,null));};exports[_0x1986('0x45')]=function(_0x5627da,_0x296580){return db[_0x1986('0x28')][_0x1986('0x45')](_0x5627da[_0x1986('0x46')],{})[_0x1986('0x1f')](function(_0x3fa67e){var _0x4ae63c=_0x5627da['user'][_0x1986('0x20')]({'plain':!![]});if(!_0x4ae63c)throw new Error(_0x1986('0x47'));if(_0x4ae63c[_0x1986('0x48')]===_0x1986('0x49')){var _0x25662d=_0x3fa67e[_0x1986('0x20')]({'plain':!![]});var _0x9ffd3=_0x1986('0x4a');return db['UserProfileSection']['find']({'where':{'name':_0x9ffd3,'userProfileId':_0x4ae63c['userProfileId']},'raw':!![]})[_0x1986('0x1f')](function(_0x4a8536){if(_0x4a8536&&_0x4a8536[_0x1986('0x4b')]===0x0){return db[_0x1986('0x21')][_0x1986('0x45')]({'name':_0x25662d[_0x1986('0x25')],'resourceId':_0x25662d['id'],'type':'CustomReports','sectionId':_0x4a8536['id']},{})[_0x1986('0x1f')](function(){return _0x3fa67e;});}else{return _0x3fa67e;}})[_0x1986('0x44')](function(_0x3385bc){logger[_0x1986('0x24')](_0x1986('0x4c'),_0x3385bc);throw _0x3385bc;});}return _0x3fa67e;})[_0x1986('0x1f')](respondWithResult(_0x296580,0xc9))['catch'](handleError(_0x296580,null));};exports[_0x1986('0x1e')]=function(_0x570ef8,_0x544a2d){if(_0x570ef8[_0x1986('0x46')]['id']){delete _0x570ef8[_0x1986('0x46')]['id'];}return db[_0x1986('0x28')]['find']({'where':{'id':_0x570ef8[_0x1986('0x41')]['id']}})['then'](handleEntityNotFound(_0x544a2d,null))[_0x1986('0x1f')](saveUpdates(_0x570ef8[_0x1986('0x46')],null))[_0x1986('0x1f')](respondWithResult(_0x544a2d,null))[_0x1986('0x44')](handleError(_0x544a2d,null));};exports[_0x1986('0x22')]=function(_0x2b9d9f,_0x29abe9){return db[_0x1986('0x28')][_0x1986('0x4d')]({'where':{'id':_0x2b9d9f['params']['id']}})[_0x1986('0x1f')](handleEntityNotFound(_0x29abe9,null))[_0x1986('0x1f')](removeEntity(_0x29abe9,null))[_0x1986('0x44')](handleError(_0x29abe9,null));};exports[_0x1986('0x4e')]=function(_0x53feff,_0x3d8df0){var _0x4505db=0xa;var _0x214327=['join',_0x1986('0x4f'),_0x1986('0x50'),_0x1986('0x51')];var _0xcec71f={'SUM':_0x1986('0x52'),'COUNT':_0x1986('0x53'),'COUNT DISTINCT':_0x1986('0x54'),'MAX':_0x1986('0x55'),'MIN':_0x1986('0x56'),'AVG':_0x1986('0x57'),'GROUP_CONCAT':_0x1986('0x58'),'GROUP_CONCAT ASC':_0x1986('0x59'),'GROUP_CONCAT DESC':_0x1986('0x5a')};var _0x1c844f={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0x1986('0x5b'),'HOUR':_0x1986('0x5c'),'ROUND':'ROUND(%s)','UNIX_TIMESTAMP':_0x1986('0x5d')};var _0x5be64d=function(_0x5520a2){return!_[_0x1986('0x5e')]([_0x1986('0x5f'),'IS\x20NOT\x20NULL',_0x1986('0x60'),_0x1986('0x61')],_0x5520a2);};var _0xccbde8=function(_0x95bd27){if(!_0x95bd27||!_0x95bd27[_0x1986('0x62')][_0x1986('0x32')]){return'';}for(var _0xd7b63b='(',_0x5e8408=0x0;_0x5e8408<_0x95bd27[_0x1986('0x62')][_0x1986('0x32')];_0x5e8408+=0x1){_0x5e8408>0x0&&(_0xd7b63b+='\x20'+_0x95bd27[_0x1986('0x63')]+'\x20');_0xd7b63b+=_0x95bd27[_0x1986('0x62')][_0x5e8408][_0x1986('0x64')]?_0xccbde8(_0x95bd27[_0x1986('0x62')][_0x5e8408][_0x1986('0x64')]):_0x95bd27['rules'][_0x5e8408]['field']+'\x20'+_0x95bd27['rules'][_0x5e8408][_0x1986('0x65')]+(_0x5be64d(_0x95bd27[_0x1986('0x62')][_0x5e8408]['condition'])?'\x20'+_0x95bd27[_0x1986('0x62')][_0x5e8408][_0x1986('0x66')]:'');}return _0xd7b63b+')';};var _0x236795={'where':{'id':_0x53feff['params']['id']}},_0x494753,_0x5effef,_0x53294c,_0x5d5a66,_0x5464f8;_0x236795=_[_0x1986('0x3b')]({},_0x236795,_0x53feff['options']);return db[_0x1986('0x28')][_0x1986('0x4d')](_0x236795)[_0x1986('0x1f')](function(_0x3918ad){if(_0x3918ad){_0x494753=_0x3918ad;return _0x3918ad[_0x1986('0x67')]();}return null;})[_0x1986('0x1f')](function(_0x9a9db){if(_0x9a9db){if(!_0x9a9db[_0x1986('0x32')]){throw new db['Sequelize']['ValidationErrorItem'](_0x1986('0x68'),0x193);}_0x5effef=_0x9a9db;return db[_0x1986('0x69')][_0x1986('0x3e')]({'raw':!![]});}return null;})[_0x1986('0x1f')](function(_0x102de5){if(_0x102de5){_0x53294c=_['keyBy'](_0x102de5,'id');var _0x552461;var _0x4bd0dd=squel[_0x1986('0x6a')]();_0x4bd0dd[_0x1986('0x6b')](_0x494753[_0x1986('0x6c')]);for(var _0x37c4ce=0x0;_0x37c4ce<_0x5effef[_0x1986('0x32')];_0x37c4ce+=0x1){_0x552461=_0x5effef[_0x37c4ce]['MetricId']?_0x53294c[_0x5effef[_0x37c4ce][_0x1986('0x6d')]]['metric']:_0x5effef[_0x37c4ce][_0x1986('0x6e')];_0x552461=_0x5effef[_0x37c4ce][_0x1986('0x6f')]?_[_0x1986('0x70')](_0xcec71f[_0x5effef[_0x37c4ce][_0x1986('0x6f')]],'%s',_0x552461):_0x552461;_0x552461=_0x5effef[_0x37c4ce][_0x1986('0x71')]?_[_0x1986('0x70')](_0x1c844f[_0x5effef[_0x37c4ce]['format']],'%s',_0x552461):_0x552461;if(_0x5effef[_0x37c4ce][_0x1986('0x72')]){_0x4bd0dd[_0x1986('0x64')](_0x552461);}_0x5effef[_0x37c4ce][_0x1986('0x73')]&&_0x4bd0dd[_0x1986('0x35')](_0x552461,_0x5effef[_0x37c4ce][_0x1986('0x73')]===_0x1986('0x74')?![]:!![]);_0x4bd0dd[_0x1986('0x6e')](_0x552461,_0x5effef[_0x37c4ce][_0x1986('0x75')]||_0x552461);}if(_0x494753[_0x1986('0x76')]){_0x494753[_0x1986('0x76')]=JSON['parse'](_0x494753[_0x1986('0x76')]);for(var _0x47c8d9=0x0;_0x47c8d9<_0x494753['joins'][_0x1986('0x32')];_0x47c8d9+=0x1){if(_0x494753[_0x1986('0x76')][_0x47c8d9][_0x1986('0x2b')]&&_[_0x1986('0x5e')](_0x214327,_0x494753['joins'][_0x47c8d9][_0x1986('0x2b')])&&_0x494753[_0x1986('0x76')][_0x47c8d9][_0x1986('0x77')]&&_0x494753[_0x1986('0x76')][_0x47c8d9][_0x1986('0x78')]&&_0x494753['joins'][_0x47c8d9][_0x1986('0x79')]){_0x4bd0dd[_0x494753['joins'][_0x47c8d9][_0x1986('0x2b')]](_0x494753[_0x1986('0x76')][_0x47c8d9][_0x1986('0x78')],null,util[_0x1986('0x71')]('%s.%s\x20=\x20%s.%s',_0x494753[_0x1986('0x6c')],_0x494753[_0x1986('0x76')][_0x47c8d9][_0x1986('0x77')],_0x494753[_0x1986('0x76')][_0x47c8d9][_0x1986('0x78')],_0x494753['joins'][_0x47c8d9][_0x1986('0x79')]));}}}if(_0x494753[_0x1986('0x7a')]){_0x494753['conditions']=JSON['parse'](_0x494753['conditions']);_0x4bd0dd['where'](_0xccbde8(_0x494753[_0x1986('0x7a')][_0x1986('0x64')]));}_0x5464f8=_0x4bd0dd[_0x1986('0x7b')]();_0x4bd0dd[_0x1986('0x1a')](_0x4505db);_0x4bd0dd[_0x1986('0x18')](0x0);logger['debug'](_0x1986('0x7c'),_0x4bd0dd[_0x1986('0x7d')]());return dbH[_0x1986('0x7e')][_0x1986('0x2d')](_0x4bd0dd[_0x1986('0x7d')](),{'type':dbH[_0x1986('0x7e')][_0x1986('0x7f')][_0x1986('0x80')]});}})[_0x1986('0x1f')](respondWithResult(_0x3d8df0,null))['catch'](handleError(_0x3d8df0,null));};function runReport(_0x393b2a,_0x294ba5,_0x42302d){var _0xb2827f=_0x294ba5['name'];var _0x4bd264=0xa;var _0x176e87=[_0x1986('0x81'),_0x1986('0x4f'),_0x1986('0x50'),_0x1986('0x51')];var _0x134c1c={'SUM':_0x1986('0x52'),'COUNT':_0x1986('0x53'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0x1986('0x55'),'MIN':'MIN(%s)','AVG':_0x1986('0x57'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':_0x1986('0x59'),'GROUP_CONCAT DESC':_0x1986('0x5a')};var _0x214ab6={'SEC_TO_TIME':_0x1986('0x82'),'DATE':_0x1986('0x5b'),'HOUR':'HOUR(%s)','ROUND':_0x1986('0x83'),'UNIX_TIMESTAMP':_0x1986('0x5d')};var _0x13d33f=function(_0x55fc83){return!_['includes']([_0x1986('0x5f'),_0x1986('0x84'),_0x1986('0x60'),_0x1986('0x61')],_0x55fc83);};var _0x59475d=function(_0x563b82){if(!_0x563b82||!_0x563b82['rules']['length']){return'';}for(var _0x2846af='(',_0x339b69=0x0;_0x339b69<_0x563b82[_0x1986('0x62')][_0x1986('0x32')];_0x339b69+=0x1){_0x339b69>0x0&&(_0x2846af+='\x20'+_0x563b82[_0x1986('0x63')]+'\x20');_0x2846af+=_0x563b82[_0x1986('0x62')][_0x339b69][_0x1986('0x64')]?_0x59475d(_0x563b82['rules'][_0x339b69][_0x1986('0x64')]):_0x563b82[_0x1986('0x62')][_0x339b69]['field']+'\x20'+_0x563b82[_0x1986('0x62')][_0x339b69][_0x1986('0x65')]+(_0x13d33f(_0x563b82[_0x1986('0x62')][_0x339b69]['condition'])?'\x20'+_0x563b82[_0x1986('0x62')][_0x339b69][_0x1986('0x66')]:'');}return _0x2846af+')';};var _0x3c0270={'where':{'id':_0x393b2a['id']}},_0x45b229,_0x215cc8,_0x4d3b77,_0x49f461,_0x2aba06;_0x3c0270=_[_0x1986('0x3b')]({},_0x3c0270,_0x42302d);return db[_0x1986('0x28')][_0x1986('0x4d')](_0x3c0270)[_0x1986('0x1f')](function(_0x15626b){if(_0x15626b){_0x45b229=_0x15626b;return _0x15626b[_0x1986('0x67')]();}return null;})['then'](function(_0x60eabe){if(_0x60eabe){if(!_0x60eabe[_0x1986('0x32')]){throw new db['Sequelize']['ValidationErrorItem']('Please\x20insert\x20at\x20least\x20one\x20field',0x193);}_0x215cc8=_0x60eabe;return db[_0x1986('0x69')][_0x1986('0x3e')]({'raw':!![]});}return null;})['then'](function(_0x4fdb58){if(_0x4fdb58){_0x4d3b77=_[_0x1986('0x85')](_0x4fdb58,'id');var _0x7c4461;var _0x53b79=squel[_0x1986('0x6a')]();_0x53b79['from'](_0x45b229[_0x1986('0x6c')]);for(var _0xd8f3af=0x0;_0xd8f3af<_0x215cc8[_0x1986('0x32')];_0xd8f3af+=0x1){_0x7c4461=_0x215cc8[_0xd8f3af][_0x1986('0x6d')]?_0x4d3b77[_0x215cc8[_0xd8f3af][_0x1986('0x6d')]][_0x1986('0x86')]:_0x215cc8[_0xd8f3af]['field'];_0x7c4461=_0x215cc8[_0xd8f3af][_0x1986('0x6f')]?_['replace'](_0x134c1c[_0x215cc8[_0xd8f3af][_0x1986('0x6f')]],'%s',_0x7c4461):_0x7c4461;_0x7c4461=_0x215cc8[_0xd8f3af]['format']?_[_0x1986('0x70')](_0x214ab6[_0x215cc8[_0xd8f3af][_0x1986('0x71')]],'%s',_0x7c4461):_0x7c4461;if(_0x215cc8[_0xd8f3af][_0x1986('0x72')]){_0x53b79[_0x1986('0x64')](_0x7c4461);}_0x215cc8[_0xd8f3af][_0x1986('0x73')]&&_0x53b79[_0x1986('0x35')](_0x7c4461,_0x215cc8[_0xd8f3af][_0x1986('0x73')]===_0x1986('0x74')?![]:!![]);_0x53b79[_0x1986('0x6e')](_0x7c4461,_0x215cc8[_0xd8f3af][_0x1986('0x75')]||_0x7c4461);}if(_0x45b229['joins']){_0x45b229[_0x1986('0x76')]=JSON['parse'](_0x45b229[_0x1986('0x76')]);for(var _0x38f0f8=0x0;_0x38f0f8<_0x45b229[_0x1986('0x76')][_0x1986('0x32')];_0x38f0f8+=0x1){if(_0x45b229[_0x1986('0x76')][_0x38f0f8][_0x1986('0x2b')]&&_[_0x1986('0x5e')](_0x176e87,_0x45b229[_0x1986('0x76')][_0x38f0f8][_0x1986('0x2b')])&&_0x45b229['joins'][_0x38f0f8][_0x1986('0x77')]&&_0x45b229[_0x1986('0x76')][_0x38f0f8]['foreignTable']&&_0x45b229[_0x1986('0x76')][_0x38f0f8]['foreignKey']){_0x53b79[_0x45b229[_0x1986('0x76')][_0x38f0f8][_0x1986('0x2b')]](_0x45b229[_0x1986('0x76')][_0x38f0f8][_0x1986('0x78')],null,util[_0x1986('0x71')]('%s.%s\x20=\x20%s.%s',_0x45b229[_0x1986('0x6c')],_0x45b229[_0x1986('0x76')][_0x38f0f8][_0x1986('0x77')],_0x45b229[_0x1986('0x76')][_0x38f0f8][_0x1986('0x78')],_0x45b229[_0x1986('0x76')][_0x38f0f8][_0x1986('0x79')]));}}}if(_0x45b229[_0x1986('0x7a')]){_0x45b229['conditions']=JSON[_0x1986('0x87')](_0x45b229['conditions']);_0x53b79['where'](_0x59475d(_0x45b229[_0x1986('0x7a')]['group']));}_0x2aba06=_0x53b79[_0x1986('0x7b')]();_0x53b79['limit'](_0x4bd264);_0x53b79['offset'](0x0);return;}})[_0x1986('0x1f')](function(){if(_0x294ba5[_0x1986('0x88')]===_0x1986('0x89')){return null;}var _0x4e1521=_[_0x1986('0x3b')](_0x294ba5,{'name':_0x294ba5['fullPath']||_0x294ba5[_0x1986('0x25')]||_0x45b229[_0x1986('0x25')],'basename':_0xb2827f,'savename':util[_0x1986('0x71')](_0x1986('0x8a'),_0x294ba5['name']||_0x45b229[_0x1986('0x25')],require('randomstring')[_0x1986('0x8b')](0x4),_0x294ba5['output']||_0x1986('0x8c')),'reportId':_0x45b229['id'],'reportType':_0x1986('0x8d')});return db['AnalyticExtractedReport']['create'](_0x4e1521,{'raw':!![]});})['then'](function(_0x3a91e3){if(_0x45b229['table']===_0x1986('0x8e')){_0x2aba06[_0x1986('0x37')](_0x45b229[_0x1986('0x6c')]+_0x1986('0x8f'),_0x294ba5['startDate'],_0x294ba5[_0x1986('0x90')]);}else{_0x2aba06[_0x1986('0x37')](_0x45b229[_0x1986('0x6c')]+_0x1986('0x91'),_0x294ba5[_0x1986('0x92')],_0x294ba5[_0x1986('0x90')]);}if(_0x3a91e3){logger['info'](_0x1986('0x93'),_0x2aba06['toString']());require(_0x1986('0x94'))[_0x1986('0x95')](path[_0x1986('0x81')](__dirname,_0x1986('0x96'),_0x3a91e3[_0x1986('0x88')]),[_0x3a91e3['id'],_0x2aba06[_0x1986('0x7d')](),path[_0x1986('0x81')](__dirname,_0x1986('0x97'),_0x3a91e3[_0x1986('0x98')]),_0xb2827f]);return _0x3a91e3;}else{var _0x45f007=squel[_0x1986('0x6a')]();_0x45f007[_0x1986('0x6b')]('('+_0x2aba06[_0x1986('0x7d')]()+')',_0x1986('0x99'));_0x45f007['field']('COUNT(*)',_0x1986('0x3c'));_0x2aba06['limit'](_0x294ba5['limit']||_0x4bd264);_0x2aba06[_0x1986('0x18')](_0x294ba5[_0x1986('0x18')]||0x0);return dbH['sequelize'][_0x1986('0x2d')](_0x45f007[_0x1986('0x7d')](),{'type':dbH['sequelize'][_0x1986('0x7f')][_0x1986('0x80')]})[_0x1986('0x1f')](function(_0x23a26d){if(!_0x23a26d[_0x1986('0x32')]){_0x49f461=0x0;}else{_0x49f461=_0x23a26d[0x0][_0x1986('0x3c')]||0x0;}return dbH[_0x1986('0x7e')][_0x1986('0x2d')](_0x2aba06[_0x1986('0x7d')](),{'type':dbH[_0x1986('0x7e')][_0x1986('0x7f')]['SELECT']});})['then'](function(_0x3a9326){return{'rows':_0x3a9326||[],'count':_0x49f461};});}});}exports[_0x1986('0x9a')]=function(_0x5e49cd,_0x336989){return runReport(_0x5e49cd['params'],_0x5e49cd[_0x1986('0x2d')],_0x5e49cd[_0x1986('0x43')])[_0x1986('0x1f')](respondWithResult(_0x336989,null))[_0x1986('0x44')](handleError(_0x336989,null));};exports[_0x1986('0x9b')]=runReport;exports['query']=function(_0x289f44,_0x2abb17){var _0x427436=0xa;var _0x4e5536=[_0x1986('0x81'),'left_join',_0x1986('0x50'),_0x1986('0x51')];var _0x3b5d94={'SUM':_0x1986('0x52'),'COUNT':_0x1986('0x53'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0x1986('0x55'),'MIN':_0x1986('0x56'),'AVG':_0x1986('0x57'),'GROUP_CONCAT':_0x1986('0x58'),'GROUP_CONCAT ASC':_0x1986('0x59'),'GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x484921={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':'DATE(%s)','HOUR':_0x1986('0x5c'),'ROUND':_0x1986('0x83'),'UNIX_TIMESTAMP':'UNIX_TIMESTAMP(%s)'};var _0x5a2fbf=function(_0x436ac7){return!_[_0x1986('0x5e')]([_0x1986('0x5f'),_0x1986('0x84'),_0x1986('0x60'),'IS\x20NOT\x20EMPTY'],_0x436ac7);};var _0x3e3954=function(_0xde0b36){if(!_0xde0b36||!_0xde0b36[_0x1986('0x62')][_0x1986('0x32')]){return'';}for(var _0xa8d027='(',_0x33ceb5=0x0;_0x33ceb5<_0xde0b36[_0x1986('0x62')]['length'];_0x33ceb5+=0x1){_0x33ceb5>0x0&&(_0xa8d027+='\x20'+_0xde0b36['operator']+'\x20');_0xa8d027+=_0xde0b36[_0x1986('0x62')][_0x33ceb5][_0x1986('0x64')]?_0x3e3954(_0xde0b36[_0x1986('0x62')][_0x33ceb5][_0x1986('0x64')]):_0xde0b36['rules'][_0x33ceb5]['field']+'\x20'+_0xde0b36[_0x1986('0x62')][_0x33ceb5][_0x1986('0x65')]+(_0x5a2fbf(_0xde0b36[_0x1986('0x62')][_0x33ceb5][_0x1986('0x65')])?'\x20'+_0xde0b36[_0x1986('0x62')][_0x33ceb5][_0x1986('0x66')]:'');}return _0xa8d027+')';};var _0x1f2bfd={'where':{'id':_0x289f44[_0x1986('0x41')]['id']}},_0x556a57,_0x23f651,_0x1c6829,_0x3904d0,_0x460101;_0x1f2bfd=_[_0x1986('0x3b')]({},_0x1f2bfd,_0x289f44[_0x1986('0x43')]);return db[_0x1986('0x28')]['find'](_0x1f2bfd)[_0x1986('0x1f')](function(_0x49ba23){if(_0x49ba23){_0x556a57=_0x49ba23;return _0x49ba23['getFields']();}return null;})[_0x1986('0x1f')](function(_0x477f69){if(_0x477f69){if(!_0x477f69[_0x1986('0x32')]){throw new db['Sequelize']['ValidationErrorItem'](_0x1986('0x68'),0x193);}_0x23f651=_0x477f69;return db[_0x1986('0x69')][_0x1986('0x3e')]({'raw':!![]});}return null;})[_0x1986('0x1f')](function(_0x32fd04){if(_0x32fd04){_0x1c6829=_['keyBy'](_0x32fd04,'id');var _0x2d42f5;var _0x509b86=squel[_0x1986('0x6a')]();_0x509b86['from'](_0x556a57[_0x1986('0x6c')]);for(var _0x43d860=0x0;_0x43d860<_0x23f651[_0x1986('0x32')];_0x43d860+=0x1){_0x2d42f5=_0x23f651[_0x43d860][_0x1986('0x6d')]?_0x1c6829[_0x23f651[_0x43d860]['MetricId']][_0x1986('0x86')]:_0x23f651[_0x43d860][_0x1986('0x6e')];_0x2d42f5=_0x23f651[_0x43d860]['function']?_[_0x1986('0x70')](_0x3b5d94[_0x23f651[_0x43d860][_0x1986('0x6f')]],'%s',_0x2d42f5):_0x2d42f5;_0x2d42f5=_0x23f651[_0x43d860]['format']?_[_0x1986('0x70')](_0x484921[_0x23f651[_0x43d860]['format']],'%s',_0x2d42f5):_0x2d42f5;if(_0x23f651[_0x43d860][_0x1986('0x72')]){_0x509b86['group'](_0x2d42f5);}_0x23f651[_0x43d860][_0x1986('0x73')]&&_0x509b86[_0x1986('0x35')](_0x2d42f5,_0x23f651[_0x43d860][_0x1986('0x73')]===_0x1986('0x74')?![]:!![]);_0x509b86['field'](_0x2d42f5,_0x23f651[_0x43d860][_0x1986('0x75')]||_0x2d42f5);}if(_0x556a57['joins']){_0x556a57[_0x1986('0x76')]=JSON['parse'](_0x556a57[_0x1986('0x76')]);for(var _0xf03ab=0x0;_0xf03ab<_0x556a57[_0x1986('0x76')][_0x1986('0x32')];_0xf03ab+=0x1){if(_0x556a57[_0x1986('0x76')][_0xf03ab][_0x1986('0x2b')]&&_[_0x1986('0x5e')](_0x4e5536,_0x556a57[_0x1986('0x76')][_0xf03ab]['type'])&&_0x556a57[_0x1986('0x76')][_0xf03ab]['parentKey']&&_0x556a57['joins'][_0xf03ab]['foreignTable']&&_0x556a57[_0x1986('0x76')][_0xf03ab]['foreignKey']){_0x509b86[_0x556a57[_0x1986('0x76')][_0xf03ab][_0x1986('0x2b')]](_0x556a57[_0x1986('0x76')][_0xf03ab][_0x1986('0x78')],null,util[_0x1986('0x71')](_0x1986('0x9c'),_0x556a57['table'],_0x556a57[_0x1986('0x76')][_0xf03ab][_0x1986('0x77')],_0x556a57[_0x1986('0x76')][_0xf03ab][_0x1986('0x78')],_0x556a57[_0x1986('0x76')][_0xf03ab][_0x1986('0x79')]));}}}if(_0x556a57['conditions']){_0x556a57[_0x1986('0x7a')]=JSON['parse'](_0x556a57[_0x1986('0x7a')]);_0x509b86['where'](_0x3e3954(_0x556a57['conditions'][_0x1986('0x64')]));}_0x460101=_0x509b86[_0x1986('0x7b')]();_0x509b86[_0x1986('0x1a')](_0x427436);_0x509b86['offset'](0x0);logger[_0x1986('0x9d')](_0x1986('0x7c'),_0x509b86[_0x1986('0x7d')]());return dbH[_0x1986('0x7e')][_0x1986('0x2d')](_0x509b86[_0x1986('0x7d')](),{'type':dbH['sequelize'][_0x1986('0x7f')][_0x1986('0x80')]});}})[_0x1986('0x1f')](function(){return{'sql':_0x460101['toString']()};})['then'](respondWithResult(_0x2abb17,null))[_0x1986('0x44')](handleError(_0x2abb17,null));};
\ No newline at end of file
index aafc91a..85963c3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4bf3=['./analyticCustomReport.attributes','exports','define','AnalyticCustomReport','analytics_custom_reports','lodash','../../config/logger','path'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x4bf3,0x19d));var _0x34bf=function(_0x2df698,_0x1ec0d2){_0x2df698=_0x2df698-0x0;var _0x178879=_0x4bf3[_0x2df698];return _0x178879;};'use strict';var _=require(_0x34bf('0x0'));var util=require('util');var logger=require(_0x34bf('0x1'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x34bf('0x2'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x34bf('0x3'));module[_0x34bf('0x4')]=function(_0x792727,_0x537791){return _0x792727[_0x34bf('0x5')](_0x34bf('0x6'),attributes,{'tableName':_0x34bf('0x7'),'paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x3cd2=['rimraf','./analyticCustomReport.attributes','analytics_custom_reports','lodash','util','api','bluebird','request-promise','path'];(function(_0x42245d,_0x51758f){var _0x4b211a=function(_0x2634e){while(--_0x2634e){_0x42245d['push'](_0x42245d['shift']());}};_0x4b211a(++_0x51758f);}(_0x3cd2,0x123));var _0x23cd=function(_0x484801,_0x4d274b){_0x484801=_0x484801-0x0;var _0x1b9cab=_0x3cd2[_0x484801];return _0x1b9cab;};'use strict';var _=require(_0x23cd('0x0'));var util=require(_0x23cd('0x1'));var logger=require('../../config/logger')(_0x23cd('0x2'));var moment=require('moment');var BPromise=require(_0x23cd('0x3'));var rp=require(_0x23cd('0x4'));var fs=require('fs');var path=require(_0x23cd('0x5'));var rimraf=require(_0x23cd('0x6'));var config=require('../../config/environment');var attributes=require(_0x23cd('0x7'));module['exports']=function(_0x38e02d,_0x1f8855){return _0x38e02d['define']('AnalyticCustomReport',attributes,{'tableName':_0x23cd('0x8'),'paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 2cab7c2..6db8e31 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfdd4=['http','request','info','debug','AnalyticCustomReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','AnalyticCustomReport,\x20%s,\x20%s','request\x20sent','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x55b481,_0x59cdc1){var _0x2d25a5=function(_0x1936c6){while(--_0x1936c6){_0x55b481['push'](_0x55b481['shift']());}};_0x2d25a5(++_0x59cdc1);}(_0xfdd4,0x1d4));var _0x4fdd=function(_0x3fcc5,_0x5771ad){_0x3fcc5=_0x3fcc5-0x0;var _0x3977fc=_0xfdd4[_0x3fcc5];return _0x3977fc;};'use strict';var _=require(_0x4fdd('0x0'));var util=require(_0x4fdd('0x1'));var moment=require(_0x4fdd('0x2'));var BPromise=require(_0x4fdd('0x3'));var rs=require(_0x4fdd('0x4'));var fs=require('fs');var Redis=require(_0x4fdd('0x5'));var db=require(_0x4fdd('0x6'))['db'];var utils=require(_0x4fdd('0x7'));var logger=require(_0x4fdd('0x8'))(_0x4fdd('0x9'));var config=require(_0x4fdd('0xa'));var jayson=require(_0x4fdd('0xb'));var client=jayson['client'][_0x4fdd('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x5d7059,_0x2156b1,_0x2a0884){return new BPromise(function(_0x1102a6,_0x41ce79){return client[_0x4fdd('0xd')](_0x5d7059,_0x2a0884)['then'](function(_0x49fbf7){logger[_0x4fdd('0xe')]('AnalyticCustomReport,\x20%s,\x20%s',_0x2156b1,'request\x20sent');logger[_0x4fdd('0xf')](_0x4fdd('0x10'),_0x2156b1,'request\x20sent',JSON[_0x4fdd('0x11')](_0x49fbf7));if(_0x49fbf7[_0x4fdd('0x12')]){if(_0x49fbf7[_0x4fdd('0x12')][_0x4fdd('0x13')]===0x1f4){logger[_0x4fdd('0x12')]('AnalyticCustomReport,\x20%s,\x20%s',_0x2156b1,_0x49fbf7[_0x4fdd('0x12')][_0x4fdd('0x14')]);return _0x41ce79(_0x49fbf7[_0x4fdd('0x12')][_0x4fdd('0x14')]);}logger[_0x4fdd('0x12')](_0x4fdd('0x15'),_0x2156b1,_0x49fbf7['error'][_0x4fdd('0x14')]);return _0x1102a6(_0x49fbf7[_0x4fdd('0x12')][_0x4fdd('0x14')]);}else{logger[_0x4fdd('0xe')](_0x4fdd('0x15'),_0x2156b1,_0x4fdd('0x16'));_0x1102a6(_0x49fbf7['result'][_0x4fdd('0x14')]);}})[_0x4fdd('0x17')](function(_0x283996){logger['error'](_0x4fdd('0x15'),_0x2156b1,_0x283996);_0x41ce79(_0x283996);});});}
\ No newline at end of file
+var _0x8530=['error','message','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','AnalyticCustomReport,\x20%s,\x20%s','debug','request\x20sent','stringify'];(function(_0x16aa51,_0x52542d){var _0xb84348=function(_0x2af546){while(--_0x2af546){_0x16aa51['push'](_0x16aa51['shift']());}};_0xb84348(++_0x52542d);}(_0x8530,0x87));var _0x0853=function(_0x344d81,_0x12ee66){_0x344d81=_0x344d81-0x0;var _0x491c16=_0x8530[_0x344d81];return _0x491c16;};'use strict';var _=require(_0x0853('0x0'));var util=require(_0x0853('0x1'));var moment=require(_0x0853('0x2'));var BPromise=require(_0x0853('0x3'));var rs=require(_0x0853('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x0853('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x0853('0x6'))(_0x0853('0x7'));var config=require(_0x0853('0x8'));var jayson=require(_0x0853('0x9'));var client=jayson[_0x0853('0xa')][_0x0853('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3c5718,_0x328fde,_0x237a7d){return new BPromise(function(_0x1da2a7,_0x1ace24){return client[_0x0853('0xc')](_0x3c5718,_0x237a7d)[_0x0853('0xd')](function(_0x4d6df7){logger[_0x0853('0xe')](_0x0853('0xf'),_0x328fde,'request\x20sent');logger[_0x0853('0x10')]('AnalyticCustomReport,\x20%s,\x20%s,\x20%s',_0x328fde,_0x0853('0x11'),JSON[_0x0853('0x12')](_0x4d6df7));if(_0x4d6df7[_0x0853('0x13')]){if(_0x4d6df7[_0x0853('0x13')]['code']===0x1f4){logger['error'](_0x0853('0xf'),_0x328fde,_0x4d6df7[_0x0853('0x13')][_0x0853('0x14')]);return _0x1ace24(_0x4d6df7[_0x0853('0x13')]['message']);}logger[_0x0853('0x13')](_0x0853('0xf'),_0x328fde,_0x4d6df7[_0x0853('0x13')]['message']);return _0x1da2a7(_0x4d6df7['error'][_0x0853('0x14')]);}else{logger['info']('AnalyticCustomReport,\x20%s,\x20%s',_0x328fde,_0x0853('0x11'));_0x1da2a7(_0x4d6df7['result'][_0x0853('0x14')]);}})[_0x0853('0x15')](function(_0x547542){logger[_0x0853('0x13')](_0x0853('0xf'),_0x328fde,_0x547542);_0x1ace24(_0x547542);});});}
\ No newline at end of file
index be4a352..04c7051 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x20b3=['multer','util','connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','get','index','/:id','show','/:id/preview','isAuthenticated','preview','run','/:id/query','query','post','create','put','update','delete','exports'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x20b3,0x159));var _0x320b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x20b3[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0x320b('0x0'));var util=require(_0x320b('0x1'));var path=require('path');var timeout=require(_0x320b('0x2'));var express=require(_0x320b('0x3'));var router=express['Router']();var fs_extra=require(_0x320b('0x4'));var auth=require(_0x320b('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x320b('0x6'));var controller=require('./analyticCustomReport.controller');router[_0x320b('0x7')]('/',auth['isAuthenticated'](),controller[_0x320b('0x8')]);router[_0x320b('0x7')](_0x320b('0x9'),auth['isAuthenticated'](),controller[_0x320b('0xa')]);router[_0x320b('0x7')](_0x320b('0xb'),auth[_0x320b('0xc')](),controller[_0x320b('0xd')]);router[_0x320b('0x7')]('/:id/run',auth['isAuthenticated'](),controller[_0x320b('0xe')]);router[_0x320b('0x7')](_0x320b('0xf'),auth[_0x320b('0xc')](),controller[_0x320b('0x10')]);router[_0x320b('0x11')]('/',auth[_0x320b('0xc')](),controller[_0x320b('0x12')]);router[_0x320b('0x13')](_0x320b('0x9'),auth[_0x320b('0xc')](),controller[_0x320b('0x14')]);router[_0x320b('0x15')](_0x320b('0x9'),auth['isAuthenticated'](),controller['destroy']);module[_0x320b('0x16')]=router;
\ No newline at end of file
+var _0x2654=['./analyticCustomReport.controller','get','isAuthenticated','index','/:id','show','/:id/preview','preview','/:id/run','/:id/query','query','post','put','update','delete','destroy','multer','util','connect-timeout','express','../../components/auth/service','../../config/environment'];(function(_0x5716a4,_0x376355){var _0x5fca0c=function(_0x57b67b){while(--_0x57b67b){_0x5716a4['push'](_0x5716a4['shift']());}};_0x5fca0c(++_0x376355);}(_0x2654,0x1de));var _0x4265=function(_0x489250,_0x5e9468){_0x489250=_0x489250-0x0;var _0x1283e5=_0x2654[_0x489250];return _0x1283e5;};'use strict';var multer=require(_0x4265('0x0'));var util=require(_0x4265('0x1'));var path=require('path');var timeout=require(_0x4265('0x2'));var express=require(_0x4265('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x4265('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x4265('0x5'));var controller=require(_0x4265('0x6'));router[_0x4265('0x7')]('/',auth[_0x4265('0x8')](),controller[_0x4265('0x9')]);router[_0x4265('0x7')](_0x4265('0xa'),auth[_0x4265('0x8')](),controller[_0x4265('0xb')]);router[_0x4265('0x7')](_0x4265('0xc'),auth[_0x4265('0x8')](),controller[_0x4265('0xd')]);router[_0x4265('0x7')](_0x4265('0xe'),auth[_0x4265('0x8')](),controller['run']);router[_0x4265('0x7')](_0x4265('0xf'),auth[_0x4265('0x8')](),controller[_0x4265('0x10')]);router[_0x4265('0x11')]('/',auth['isAuthenticated'](),controller['create']);router[_0x4265('0x12')](_0x4265('0xa'),auth[_0x4265('0x8')](),controller[_0x4265('0x13')]);router[_0x4265('0x14')]('/:id',auth[_0x4265('0x8')](),controller[_0x4265('0x15')]);module['exports']=router;
\ No newline at end of file
index aba0cef..4f3ec99 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5fab=['exports','STRING','TEXT','sequelize'];(function(_0x32874f,_0x2b45c6){var _0x5a89c6=function(_0xce908){while(--_0xce908){_0x32874f['push'](_0x32874f['shift']());}};_0x5a89c6(++_0x2b45c6);}(_0x5fab,0x177));var _0xb5fa=function(_0xcd9ece,_0x33ff67){_0xcd9ece=_0xcd9ece-0x0;var _0x36f54f=_0x5fab[_0xcd9ece];return _0x36f54f;};'use strict';var Sequelize=require(_0xb5fa('0x0'));module[_0xb5fa('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize[_0xb5fa('0x2')]},'parent':{'type':Sequelize[_0xb5fa('0x2')]},'table':{'type':Sequelize[_0xb5fa('0x2')]},'conditions':{'type':Sequelize[_0xb5fa('0x3')]},'joins':{'type':Sequelize[_0xb5fa('0x3')]}};
\ No newline at end of file
+var _0x7c09=['exports','STRING','TEXT'];(function(_0x20dff6,_0x59f029){var _0x291097=function(_0xee329a){while(--_0xee329a){_0x20dff6['push'](_0x20dff6['shift']());}};_0x291097(++_0x59f029);}(_0x7c09,0x102));var _0x97c0=function(_0x548482,_0x1c13f9){_0x548482=_0x548482-0x0;var _0x5eb4f3=_0x7c09[_0x548482];return _0x5eb4f3;};'use strict';var Sequelize=require('sequelize');module[_0x97c0('0x0')]={'name':{'type':Sequelize[_0x97c0('0x1')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'parent':{'type':Sequelize[_0x97c0('0x1')]},'table':{'type':Sequelize[_0x97c0('0x1')]},'conditions':{'type':Sequelize[_0x97c0('0x2')]},'joins':{'type':Sequelize[_0x97c0('0x2')]}};
\ No newline at end of file
index 7ccdb9e..b72d2ff 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x187d=['fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','dbH','sendStatus','status','limit','undefined','count','offset','set','json','save','update','then','get','destroy','error','name','send','map','AnalyticDefaultReport','rawAttributes','fieldName','type','model','keys','filters','intersection','query','fields','attributes','order','sort','filter','where','merge','options','includeAll','rows','catch','include','create','role','user','Reports','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','find','params','preview','left_join','right_join','cross_join','SUM(%s)','COUNT(%s)','COUNT(DISTINCT\x20%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\x20NOT\x20EMPTY','rules','length','group','condition','value','getFields','Sequelize','ValidationErrorItem','Please\x20insert\x20at\x20least\x20one\x20field','findAll','keyBy','from','table','MetricId','metric','replace','format','groupBy','orderBy','field','alias','joins','parse','parentKey','foreignKey','foreignTable','conditions','clone','Limited\x20Query:','toString','sequelize','SELECT','join','IS\x20EMPTY','operator','AnalyticMetric','function','DESC','%s.%s\x20=\x20%s.%s','output','web','fullPath','%s-%s.%s','randomstring','generate','default','AnalyticExtractedReport','startDate','endDate','.createdAt\x20BETWEEN\x20?\x20AND\x20?','info','fork','../../components/export/','savename','select','countTable','QueryTypes','runReport','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','ejs'];(function(_0x5bd78b,_0x393076){var _0xecd930=function(_0x2a0b40){while(--_0x2a0b40){_0x5bd78b['push'](_0x5bd78b['shift']());}};_0xecd930(++_0x393076);}(_0x187d,0x93));var _0xd187=function(_0x29b609,_0x19d388){_0x29b609=_0x29b609-0x0;var _0x54c952=_0x187d[_0x29b609];return _0x54c952;};'use strict';var emlformat=require(_0xd187('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xd187('0x1'));var jsonpatch=require(_0xd187('0x2'));var rp=require(_0xd187('0x3'));var moment=require(_0xd187('0x4'));var BPromise=require(_0xd187('0x5'));var Mustache=require(_0xd187('0x6'));var util=require('util');var path=require(_0xd187('0x7'));var sox=require(_0xd187('0x8'));var csv=require('to-csv');var ejs=require(_0xd187('0x9'));var fs=require('fs');var fs_extra=require(_0xd187('0xa'));var _=require(_0xd187('0xb'));var squel=require(_0xd187('0xc'));var crypto=require(_0xd187('0xd'));var jsforce=require(_0xd187('0xe'));var deskjs=require(_0xd187('0xf'));var toCsv=require(_0xd187('0x10'));var querystring=require('querystring');var Papa=require(_0xd187('0x11'));var Redis=require(_0xd187('0x12'));var authService=require(_0xd187('0x13'));var qs=require(_0xd187('0x14'));var as=require(_0xd187('0x15'));var hardwareService=require(_0xd187('0x16'));var logger=require('../../config/logger')(_0xd187('0x17'));var utils=require(_0xd187('0x18'));var config=require(_0xd187('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0xd187('0x1a'))['db'];var dbH=require(_0xd187('0x1a'))[_0xd187('0x1b')];function respondWithStatusCode(_0x59ee4a,_0x33e3d5){_0x33e3d5=_0x33e3d5||0xcc;return function(_0x18ce42){if(_0x18ce42){return _0x59ee4a[_0xd187('0x1c')](_0x33e3d5);}return _0x59ee4a[_0xd187('0x1d')](_0x33e3d5)['end']();};}function respondWithResult(_0x39a927,_0x2050d5){_0x2050d5=_0x2050d5||0xc8;return function(_0x45ab10){if(_0x45ab10){return _0x39a927[_0xd187('0x1d')](_0x2050d5)['json'](_0x45ab10);}};}function respondWithFilteredResult(_0x245d3e,_0x52a208){return function(_0x5cf218){if(_0x5cf218){var _0x40ed84=typeof _0x52a208['offset']==='undefined'&&typeof _0x52a208[_0xd187('0x1e')]===_0xd187('0x1f');var _0x374fe0=_0x5cf218[_0xd187('0x20')];var _0x21df74=_0x40ed84?0x0:_0x52a208[_0xd187('0x21')];var _0x12b388=_0x40ed84?_0x5cf218[_0xd187('0x20')]:_0x52a208[_0xd187('0x21')]+_0x52a208[_0xd187('0x1e')];var _0x170d5c;if(_0x12b388>=_0x374fe0){_0x12b388=_0x374fe0;_0x170d5c=0xc8;}else{_0x170d5c=0xce;}_0x245d3e[_0xd187('0x1d')](_0x170d5c);return _0x245d3e[_0xd187('0x22')]('Content-Range',_0x21df74+'-'+_0x12b388+'/'+_0x374fe0)[_0xd187('0x23')](_0x5cf218);}return null;};}function patchUpdates(_0x81b988){return function(_0xc5bba5){try{jsonpatch['apply'](_0xc5bba5,_0x81b988,!![]);}catch(_0x5a0360){return BPromise['reject'](_0x5a0360);}return _0xc5bba5[_0xd187('0x24')]();};}function saveUpdates(_0x33741d,_0x249a82){return function(_0x4f62c8){if(_0x4f62c8){return _0x4f62c8[_0xd187('0x25')](_0x33741d)['then'](function(_0x145771){return _0x145771;});}return null;};}function removeEntity(_0x5a7a23,_0x1047f4){return function(_0x54f340){if(_0x54f340){return _0x54f340['destroy']()[_0xd187('0x26')](function(){var _0x4d992b=_0x54f340[_0xd187('0x27')]({'plain':!![]});var _0x598aa4='DefaultReports';return db['UserProfileResource'][_0xd187('0x28')]({'where':{'type':_0x598aa4,'resourceId':_0x4d992b['id']}})[_0xd187('0x26')](function(){return _0x54f340;});})[_0xd187('0x26')](function(){_0x5a7a23[_0xd187('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2a20ed,_0x2875c8){return function(_0x5c8e52){if(!_0x5c8e52){_0x2a20ed[_0xd187('0x1c')](0x194);}return _0x5c8e52;};}function handleError(_0x1c87ee,_0x34febe){_0x34febe=_0x34febe||0x1f4;return function(_0x4c50a5){logger[_0xd187('0x29')](_0x4c50a5['stack']);if(_0x4c50a5[_0xd187('0x2a')]){delete _0x4c50a5[_0xd187('0x2a')];}_0x1c87ee[_0xd187('0x1d')](_0x34febe)[_0xd187('0x2b')](_0x4c50a5);};}exports['index']=function(_0x140e54,_0xb38778){var _0x5bba10={},_0x4cc587={},_0x1a1922={'count':0x0,'rows':[]};var _0x1836cf=_[_0xd187('0x2c')](db[_0xd187('0x2d')][_0xd187('0x2e')],function(_0x2d8843){return{'name':_0x2d8843[_0xd187('0x2f')],'type':_0x2d8843[_0xd187('0x30')]['key']};});_0x4cc587[_0xd187('0x31')]=_[_0xd187('0x2c')](_0x1836cf,_0xd187('0x2a'));_0x4cc587['query']=_[_0xd187('0x32')](_0x140e54['query']);_0x4cc587[_0xd187('0x33')]=_[_0xd187('0x34')](_0x4cc587[_0xd187('0x31')],_0x4cc587['query']);_0x5bba10['attributes']=_[_0xd187('0x34')](_0x4cc587[_0xd187('0x31')],qs['fields'](_0x140e54[_0xd187('0x35')][_0xd187('0x36')]));_0x5bba10[_0xd187('0x37')]=_0x5bba10['attributes']['length']?_0x5bba10[_0xd187('0x37')]:_0x4cc587[_0xd187('0x31')];if(!_0x140e54['query']['hasOwnProperty']('nolimit')){_0x5bba10[_0xd187('0x1e')]=qs['limit'](_0x140e54[_0xd187('0x35')][_0xd187('0x1e')]);_0x5bba10['offset']=qs[_0xd187('0x21')](_0x140e54['query'][_0xd187('0x21')]);}_0x5bba10[_0xd187('0x38')]=qs['sort'](_0x140e54[_0xd187('0x35')][_0xd187('0x39')]);_0x5bba10['where']=qs[_0xd187('0x33')](_['pick'](_0x140e54['query'],_0x4cc587[_0xd187('0x33')]),_0x1836cf);if(_0x140e54[_0xd187('0x35')][_0xd187('0x3a')]){_0x5bba10[_0xd187('0x3b')]=_[_0xd187('0x3c')](_0x5bba10['where'],{'$or':_[_0xd187('0x2c')](_0x1836cf,function(_0xe090ad){if(_0xe090ad[_0xd187('0x30')]!=='VIRTUAL'){var _0x4b121c={};_0x4b121c[_0xe090ad['name']]={'$like':'%'+_0x140e54['query'][_0xd187('0x3a')]+'%'};return _0x4b121c;}})});}_0x5bba10=_[_0xd187('0x3c')]({},_0x5bba10,_0x140e54[_0xd187('0x3d')]);var _0x367303={'where':_0x5bba10[_0xd187('0x3b')]};return db[_0xd187('0x2d')][_0xd187('0x20')](_0x367303)[_0xd187('0x26')](function(_0x526060){_0x1a1922[_0xd187('0x20')]=_0x526060;if(_0x140e54[_0xd187('0x35')][_0xd187('0x3e')]){_0x5bba10['include']=[{'all':!![]}];}return db[_0xd187('0x2d')]['findAll'](_0x5bba10);})[_0xd187('0x26')](function(_0x406d29){_0x1a1922[_0xd187('0x3f')]=_0x406d29;return _0x1a1922;})[_0xd187('0x26')](respondWithFilteredResult(_0xb38778,_0x5bba10))[_0xd187('0x40')](handleError(_0xb38778,null));};exports['show']=function(_0x3f0484,_0x3d9e60){var _0x3215b1={'raw':!![],'where':{'id':_0x3f0484['params']['id']}},_0x3fa19c={};_0x3fa19c[_0xd187('0x31')]=_[_0xd187('0x32')](db['AnalyticDefaultReport'][_0xd187('0x2e')]);_0x3fa19c[_0xd187('0x35')]=_['keys'](_0x3f0484['query']);_0x3fa19c[_0xd187('0x33')]=_[_0xd187('0x34')](_0x3fa19c['model'],_0x3fa19c['query']);_0x3215b1['attributes']=_[_0xd187('0x34')](_0x3fa19c[_0xd187('0x31')],qs[_0xd187('0x36')](_0x3f0484[_0xd187('0x35')][_0xd187('0x36')]));_0x3215b1[_0xd187('0x37')]=_0x3215b1[_0xd187('0x37')]['length']?_0x3215b1[_0xd187('0x37')]:_0x3fa19c[_0xd187('0x31')];if(_0x3f0484[_0xd187('0x35')][_0xd187('0x3e')]){_0x3215b1[_0xd187('0x41')]=[{'all':!![]}];}_0x3215b1=_[_0xd187('0x3c')]({},_0x3215b1,_0x3f0484[_0xd187('0x3d')]);return db[_0xd187('0x2d')]['find'](_0x3215b1)[_0xd187('0x26')](handleEntityNotFound(_0x3d9e60,null))[_0xd187('0x26')](respondWithResult(_0x3d9e60,null))[_0xd187('0x40')](handleError(_0x3d9e60,null));};exports[_0xd187('0x42')]=function(_0x36b99d,_0x5ad646){return db[_0xd187('0x2d')][_0xd187('0x42')](_0x36b99d['body'],{})[_0xd187('0x26')](function(_0xd9635d){var _0x55fac6=_0x36b99d['user']['get']({'plain':!![]});if(!_0x55fac6)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x55fac6[_0xd187('0x43')]===_0xd187('0x44')){var _0x12d448=_0xd9635d[_0xd187('0x27')]({'plain':!![]});var _0x460202=_0xd187('0x45');return db[_0xd187('0x46')]['find']({'where':{'name':_0x460202,'userProfileId':_0x55fac6[_0xd187('0x47')]},'raw':!![]})[_0xd187('0x26')](function(_0x1b12c4){if(_0x1b12c4&&_0x1b12c4[_0xd187('0x48')]===0x0){return db['UserProfileResource'][_0xd187('0x42')]({'name':_0x12d448['name'],'resourceId':_0x12d448['id'],'type':'DefaultReports','sectionId':_0x1b12c4['id']},{})[_0xd187('0x26')](function(){return _0xd9635d;});}else{return _0xd9635d;}})['catch'](function(_0x1a1252){logger[_0xd187('0x29')](_0xd187('0x49'),_0x1a1252);throw _0x1a1252;});}return _0xd9635d;})[_0xd187('0x26')](respondWithResult(_0x5ad646,0xc9))[_0xd187('0x40')](handleError(_0x5ad646,null));};exports[_0xd187('0x25')]=function(_0x3c7ba6,_0x2b4f9d){if(_0x3c7ba6[_0xd187('0x4a')]['id']){delete _0x3c7ba6['body']['id'];}return db[_0xd187('0x2d')][_0xd187('0x4b')]({'where':{'id':_0x3c7ba6['params']['id']}})[_0xd187('0x26')](handleEntityNotFound(_0x2b4f9d,null))[_0xd187('0x26')](saveUpdates(_0x3c7ba6[_0xd187('0x4a')],null))['then'](respondWithResult(_0x2b4f9d,null))[_0xd187('0x40')](handleError(_0x2b4f9d,null));};exports[_0xd187('0x28')]=function(_0x50073d,_0x457da1){return db[_0xd187('0x2d')]['find']({'where':{'id':_0x50073d[_0xd187('0x4c')]['id']}})['then'](handleEntityNotFound(_0x457da1,null))[_0xd187('0x26')](removeEntity(_0x457da1,null))[_0xd187('0x40')](handleError(_0x457da1,null));};exports[_0xd187('0x4d')]=function(_0x508866,_0x100d64){var _0x2265fb=0xa;var _0x1675d9=['join',_0xd187('0x4e'),_0xd187('0x4f'),_0xd187('0x50')];var _0x56b36b={'SUM':_0xd187('0x51'),'COUNT':_0xd187('0x52'),'COUNT DISTINCT':_0xd187('0x53'),'MAX':_0xd187('0x54'),'MIN':_0xd187('0x55'),'AVG':_0xd187('0x56'),'GROUP_CONCAT':_0xd187('0x57'),'GROUP_CONCAT ASC':_0xd187('0x58'),'GROUP_CONCAT DESC':_0xd187('0x59')};var _0x2c7dd9={'SEC_TO_TIME':_0xd187('0x5a'),'DATE':_0xd187('0x5b'),'HOUR':_0xd187('0x5c'),'ROUND':_0xd187('0x5d'),'UNIX_TIMESTAMP':_0xd187('0x5e')};var _0xaff1e6=function(_0x42fb32){return!_[_0xd187('0x5f')]([_0xd187('0x60'),_0xd187('0x61'),'IS\x20EMPTY',_0xd187('0x62')],_0x42fb32);};var _0x48c82d=function(_0x13d118){if(!_0x13d118||!_0x13d118[_0xd187('0x63')][_0xd187('0x64')]){return'';}for(var _0x4225e6='(',_0x51fbdb=0x0;_0x51fbdb<_0x13d118[_0xd187('0x63')][_0xd187('0x64')];_0x51fbdb+=0x1){_0x51fbdb>0x0&&(_0x4225e6+='\x20'+_0x13d118['operator']+'\x20');_0x4225e6+=_0x13d118['rules'][_0x51fbdb][_0xd187('0x65')]?_0x48c82d(_0x13d118[_0xd187('0x63')][_0x51fbdb][_0xd187('0x65')]):_0x13d118[_0xd187('0x63')][_0x51fbdb]['field']+'\x20'+_0x13d118[_0xd187('0x63')][_0x51fbdb]['condition']+(_0xaff1e6(_0x13d118[_0xd187('0x63')][_0x51fbdb][_0xd187('0x66')])?'\x20'+_0x13d118[_0xd187('0x63')][_0x51fbdb][_0xd187('0x67')]:'');}return _0x4225e6+')';};var _0x57cad7={'where':{'id':_0x508866['params']['id']}},_0x2409a8,_0xaea7e0,_0xd12560,_0x9e82c,_0x151f3c;_0x57cad7=_['merge']({},_0x57cad7,_0x508866[_0xd187('0x3d')]);return db[_0xd187('0x2d')][_0xd187('0x4b')](_0x57cad7)[_0xd187('0x26')](function(_0x13e05a){if(_0x13e05a){_0x2409a8=_0x13e05a;return _0x13e05a[_0xd187('0x68')]();}return null;})[_0xd187('0x26')](function(_0x1291cc){if(_0x1291cc){if(!_0x1291cc[_0xd187('0x64')]){throw new db[(_0xd187('0x69'))][(_0xd187('0x6a'))](_0xd187('0x6b'),0x193);}_0xaea7e0=_0x1291cc;return db['AnalyticMetric'][_0xd187('0x6c')]({'raw':!![]});}return null;})[_0xd187('0x26')](function(_0x54e908){if(_0x54e908){_0xd12560=_[_0xd187('0x6d')](_0x54e908,'id');var _0x1a9979;var _0x4bec3e=squel['select']();_0x4bec3e[_0xd187('0x6e')](_0x2409a8[_0xd187('0x6f')]);for(var _0x2ac56f=0x0;_0x2ac56f<_0xaea7e0[_0xd187('0x64')];_0x2ac56f+=0x1){_0x1a9979=_0xaea7e0[_0x2ac56f]['MetricId']?_0xd12560[_0xaea7e0[_0x2ac56f][_0xd187('0x70')]][_0xd187('0x71')]:_0xaea7e0[_0x2ac56f]['field'];_0x1a9979=_0xaea7e0[_0x2ac56f]['function']?_[_0xd187('0x72')](_0x56b36b[_0xaea7e0[_0x2ac56f]['function']],'%s',_0x1a9979):_0x1a9979;_0x1a9979=_0xaea7e0[_0x2ac56f][_0xd187('0x73')]?_[_0xd187('0x72')](_0x2c7dd9[_0xaea7e0[_0x2ac56f]['format']],'%s',_0x1a9979):_0x1a9979;if(_0xaea7e0[_0x2ac56f][_0xd187('0x74')]){_0x4bec3e['group'](_0x1a9979);}_0xaea7e0[_0x2ac56f][_0xd187('0x75')]&&_0x4bec3e['order'](_0x1a9979,_0xaea7e0[_0x2ac56f]['orderBy']==='DESC'?![]:!![]);_0x4bec3e[_0xd187('0x76')](_0x1a9979,_0xaea7e0[_0x2ac56f][_0xd187('0x77')]||_0x1a9979);}if(_0x2409a8[_0xd187('0x78')]){_0x2409a8[_0xd187('0x78')]=JSON[_0xd187('0x79')](_0x2409a8[_0xd187('0x78')]);for(var _0x11858e=0x0;_0x11858e<_0x2409a8[_0xd187('0x78')]['length'];_0x11858e+=0x1){if(_0x2409a8[_0xd187('0x78')][_0x11858e][_0xd187('0x30')]&&_[_0xd187('0x5f')](_0x1675d9,_0x2409a8['joins'][_0x11858e][_0xd187('0x30')])&&_0x2409a8[_0xd187('0x78')][_0x11858e][_0xd187('0x7a')]&&_0x2409a8[_0xd187('0x78')][_0x11858e]['foreignTable']&&_0x2409a8[_0xd187('0x78')][_0x11858e][_0xd187('0x7b')]){_0x4bec3e[_0x2409a8['joins'][_0x11858e][_0xd187('0x30')]](_0x2409a8[_0xd187('0x78')][_0x11858e][_0xd187('0x7c')],null,util[_0xd187('0x73')]('%s.%s\x20=\x20%s.%s',_0x2409a8[_0xd187('0x6f')],_0x2409a8[_0xd187('0x78')][_0x11858e]['parentKey'],_0x2409a8[_0xd187('0x78')][_0x11858e]['foreignTable'],_0x2409a8['joins'][_0x11858e]['foreignKey']));}}}if(_0x2409a8[_0xd187('0x7d')]){_0x2409a8[_0xd187('0x7d')]=JSON[_0xd187('0x79')](_0x2409a8[_0xd187('0x7d')]);_0x4bec3e[_0xd187('0x3b')](_0x48c82d(_0x2409a8[_0xd187('0x7d')]['group']));}_0x151f3c=_0x4bec3e[_0xd187('0x7e')]();_0x4bec3e[_0xd187('0x1e')](_0x2265fb);_0x4bec3e['offset'](0x0);logger['debug'](_0xd187('0x7f'),_0x4bec3e[_0xd187('0x80')]());return dbH[_0xd187('0x81')][_0xd187('0x35')](_0x4bec3e[_0xd187('0x80')](),{'type':dbH[_0xd187('0x81')]['QueryTypes'][_0xd187('0x82')]});}})[_0xd187('0x26')](respondWithResult(_0x100d64,null))[_0xd187('0x40')](handleError(_0x100d64,null));};function runReport(_0xbc650f,_0x1da684,_0x2879ff){var _0x1982cd=_0x1da684[_0xd187('0x2a')];var _0x3d9b2f=0xa;var _0xf31fac=[_0xd187('0x83'),_0xd187('0x4e'),'right_join','cross_join'];var _0x3d7e97={'SUM':_0xd187('0x51'),'COUNT':_0xd187('0x52'),'COUNT DISTINCT':_0xd187('0x53'),'MAX':_0xd187('0x54'),'MIN':_0xd187('0x55'),'AVG':'AVG(%s)','GROUP_CONCAT':_0xd187('0x57'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0xd187('0x59')};var _0x520f86={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0xd187('0x5b'),'HOUR':'HOUR(%s)','ROUND':_0xd187('0x5d'),'UNIX_TIMESTAMP':_0xd187('0x5e')};var _0x1ccb17=function(_0x432995){return!_[_0xd187('0x5f')]([_0xd187('0x60'),_0xd187('0x61'),_0xd187('0x84'),_0xd187('0x62')],_0x432995);};var _0x395e45=function(_0x1e8839){if(!_0x1e8839||!_0x1e8839[_0xd187('0x63')][_0xd187('0x64')]){return'';}for(var _0x2101a3='(',_0x25fc08=0x0;_0x25fc08<_0x1e8839['rules'][_0xd187('0x64')];_0x25fc08+=0x1){_0x25fc08>0x0&&(_0x2101a3+='\x20'+_0x1e8839[_0xd187('0x85')]+'\x20');_0x2101a3+=_0x1e8839[_0xd187('0x63')][_0x25fc08][_0xd187('0x65')]?_0x395e45(_0x1e8839['rules'][_0x25fc08][_0xd187('0x65')]):_0x1e8839[_0xd187('0x63')][_0x25fc08]['field']+'\x20'+_0x1e8839['rules'][_0x25fc08][_0xd187('0x66')]+(_0x1ccb17(_0x1e8839[_0xd187('0x63')][_0x25fc08][_0xd187('0x66')])?'\x20'+_0x1e8839[_0xd187('0x63')][_0x25fc08][_0xd187('0x67')]:'');}return _0x2101a3+')';};var _0x475ea9={'where':{'id':_0xbc650f['id']}},_0x4dd0c7,_0x22900,_0x22424d,_0x5b7870,_0x3244dd;_0x475ea9=_[_0xd187('0x3c')]({},_0x475ea9,_0x2879ff);return db[_0xd187('0x2d')][_0xd187('0x4b')](_0x475ea9)['then'](function(_0x5be1c9){if(_0x5be1c9){_0x4dd0c7=_0x5be1c9;return _0x5be1c9[_0xd187('0x68')]();}return null;})[_0xd187('0x26')](function(_0x1cd0d2){if(_0x1cd0d2){if(!_0x1cd0d2['length']){throw new db[(_0xd187('0x69'))][(_0xd187('0x6a'))](_0xd187('0x6b'),0x193);}_0x22900=_0x1cd0d2;return db[_0xd187('0x86')]['findAll']({'raw':!![]});}return null;})[_0xd187('0x26')](function(_0x4efb9f){if(_0x4efb9f){_0x22424d=_['keyBy'](_0x4efb9f,'id');var _0x4a9310;var _0x54bf98=squel['select']();_0x54bf98['from'](_0x4dd0c7['table']);for(var _0x323311=0x0;_0x323311<_0x22900[_0xd187('0x64')];_0x323311+=0x1){_0x4a9310=_0x22900[_0x323311]['MetricId']?_0x22424d[_0x22900[_0x323311][_0xd187('0x70')]][_0xd187('0x71')]:_0x22900[_0x323311][_0xd187('0x76')];_0x4a9310=_0x22900[_0x323311][_0xd187('0x87')]?_[_0xd187('0x72')](_0x3d7e97[_0x22900[_0x323311]['function']],'%s',_0x4a9310):_0x4a9310;_0x4a9310=_0x22900[_0x323311][_0xd187('0x73')]?_['replace'](_0x520f86[_0x22900[_0x323311][_0xd187('0x73')]],'%s',_0x4a9310):_0x4a9310;if(_0x22900[_0x323311][_0xd187('0x74')]){_0x54bf98[_0xd187('0x65')](_0x4a9310);}_0x22900[_0x323311][_0xd187('0x75')]&&_0x54bf98[_0xd187('0x38')](_0x4a9310,_0x22900[_0x323311][_0xd187('0x75')]===_0xd187('0x88')?![]:!![]);_0x54bf98['field'](_0x4a9310,_0x22900[_0x323311][_0xd187('0x77')]||_0x4a9310);}if(_0x4dd0c7[_0xd187('0x78')]){_0x4dd0c7['joins']=JSON[_0xd187('0x79')](_0x4dd0c7[_0xd187('0x78')]);for(var _0x5df926=0x0;_0x5df926<_0x4dd0c7[_0xd187('0x78')][_0xd187('0x64')];_0x5df926+=0x1){if(_0x4dd0c7[_0xd187('0x78')][_0x5df926][_0xd187('0x30')]&&_[_0xd187('0x5f')](_0xf31fac,_0x4dd0c7[_0xd187('0x78')][_0x5df926][_0xd187('0x30')])&&_0x4dd0c7[_0xd187('0x78')][_0x5df926]['parentKey']&&_0x4dd0c7[_0xd187('0x78')][_0x5df926][_0xd187('0x7c')]&&_0x4dd0c7[_0xd187('0x78')][_0x5df926][_0xd187('0x7b')]){_0x54bf98[_0x4dd0c7[_0xd187('0x78')][_0x5df926][_0xd187('0x30')]](_0x4dd0c7['joins'][_0x5df926]['foreignTable'],null,util[_0xd187('0x73')](_0xd187('0x89'),_0x4dd0c7['table'],_0x4dd0c7[_0xd187('0x78')][_0x5df926][_0xd187('0x7a')],_0x4dd0c7[_0xd187('0x78')][_0x5df926][_0xd187('0x7c')],_0x4dd0c7[_0xd187('0x78')][_0x5df926][_0xd187('0x7b')]));}}}if(_0x4dd0c7['conditions']){_0x4dd0c7[_0xd187('0x7d')]=JSON[_0xd187('0x79')](_0x4dd0c7[_0xd187('0x7d')]);_0x54bf98[_0xd187('0x3b')](_0x395e45(_0x4dd0c7[_0xd187('0x7d')][_0xd187('0x65')]));}_0x3244dd=_0x54bf98[_0xd187('0x7e')]();_0x54bf98[_0xd187('0x1e')](_0x3d9b2f);_0x54bf98[_0xd187('0x21')](0x0);return;}})['then'](function(){if(_0x1da684[_0xd187('0x8a')]===_0xd187('0x8b')){return null;}var _0x25a053=_['merge'](_0x1da684,{'name':_0x1da684[_0xd187('0x8c')]||_0x1da684[_0xd187('0x2a')]||_0x4dd0c7[_0xd187('0x2a')],'basename':_0x1982cd,'savename':util[_0xd187('0x73')](_0xd187('0x8d'),_0x1da684[_0xd187('0x2a')]||_0x4dd0c7['name'],require(_0xd187('0x8e'))[_0xd187('0x8f')](0x4),_0x1da684[_0xd187('0x8a')]||'csv'),'reportId':_0x4dd0c7['id'],'reportType':_0xd187('0x90')});return db[_0xd187('0x91')][_0xd187('0x42')](_0x25a053,{'raw':!![]});})[_0xd187('0x26')](function(_0x12599e){if(_0x4dd0c7[_0xd187('0x6f')]==='cdr'){_0x3244dd[_0xd187('0x3b')](_0x4dd0c7[_0xd187('0x6f')]+'.calldate\x20BETWEEN\x20?\x20AND\x20?',_0x1da684[_0xd187('0x92')],_0x1da684[_0xd187('0x93')]);}else{_0x3244dd['where'](_0x4dd0c7[_0xd187('0x6f')]+_0xd187('0x94'),_0x1da684['startDate'],_0x1da684[_0xd187('0x93')]);}if(_0x12599e){logger[_0xd187('0x95')]('Run\x20Query:',_0x3244dd[_0xd187('0x80')]());require('child_process')[_0xd187('0x96')](path[_0xd187('0x83')](__dirname,_0xd187('0x97'),_0x12599e[_0xd187('0x8a')]),[_0x12599e['id'],_0x3244dd[_0xd187('0x80')](),path['join'](__dirname,'../../files/reports',_0x12599e[_0xd187('0x98')]),_0x1982cd]);return _0x12599e;}else{var _0x2a2c7f=squel[_0xd187('0x99')]();_0x2a2c7f[_0xd187('0x6e')]('('+_0x3244dd[_0xd187('0x80')]()+')',_0xd187('0x9a'));_0x2a2c7f[_0xd187('0x76')]('COUNT(*)',_0xd187('0x20'));_0x3244dd[_0xd187('0x1e')](_0x1da684[_0xd187('0x1e')]||_0x3d9b2f);_0x3244dd[_0xd187('0x21')](_0x1da684[_0xd187('0x21')]||0x0);return dbH[_0xd187('0x81')]['query'](_0x2a2c7f[_0xd187('0x80')](),{'type':dbH[_0xd187('0x81')][_0xd187('0x9b')][_0xd187('0x82')]})[_0xd187('0x26')](function(_0x38a7cd){if(!_0x38a7cd[_0xd187('0x64')]){_0x5b7870=0x0;}else{_0x5b7870=_0x38a7cd[0x0][_0xd187('0x20')]||0x0;}return dbH['sequelize'][_0xd187('0x35')](_0x3244dd['toString'](),{'type':dbH[_0xd187('0x81')][_0xd187('0x9b')]['SELECT']});})[_0xd187('0x26')](function(_0x254e0a){return{'rows':_0x254e0a||[],'count':_0x5b7870};});}});}exports['run']=function(_0x1776c1,_0x497a94){return runReport(_0x1776c1[_0xd187('0x4c')],_0x1776c1['query'],_0x1776c1['options'])[_0xd187('0x26')](respondWithResult(_0x497a94,null))[_0xd187('0x40')](handleError(_0x497a94,null));};exports[_0xd187('0x9c')]=runReport;exports[_0xd187('0x35')]=function(_0x568f72,_0x357526){var _0x13ee40=0xa;var _0x20c269=[_0xd187('0x83'),_0xd187('0x4e'),_0xd187('0x4f'),_0xd187('0x50')];var _0x25ff89={'SUM':_0xd187('0x51'),'COUNT':_0xd187('0x52'),'COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0xd187('0x54'),'MIN':_0xd187('0x55'),'AVG':_0xd187('0x56'),'GROUP_CONCAT':'GROUP_CONCAT(%s)','GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':_0xd187('0x59')};var _0x28798f={'SEC_TO_TIME':_0xd187('0x5a'),'DATE':'DATE(%s)','HOUR':'HOUR(%s)','ROUND':_0xd187('0x5d'),'UNIX_TIMESTAMP':_0xd187('0x5e')};var _0x56fcde=function(_0x37b1b0){return!_[_0xd187('0x5f')]([_0xd187('0x60'),_0xd187('0x61'),'IS\x20EMPTY',_0xd187('0x62')],_0x37b1b0);};var _0x428e6c=function(_0x4524c3){if(!_0x4524c3||!_0x4524c3[_0xd187('0x63')][_0xd187('0x64')]){return'';}for(var _0x3a2937='(',_0xf03f9a=0x0;_0xf03f9a<_0x4524c3['rules'][_0xd187('0x64')];_0xf03f9a+=0x1){_0xf03f9a>0x0&&(_0x3a2937+='\x20'+_0x4524c3['operator']+'\x20');_0x3a2937+=_0x4524c3[_0xd187('0x63')][_0xf03f9a]['group']?_0x428e6c(_0x4524c3[_0xd187('0x63')][_0xf03f9a]['group']):_0x4524c3[_0xd187('0x63')][_0xf03f9a][_0xd187('0x76')]+'\x20'+_0x4524c3[_0xd187('0x63')][_0xf03f9a]['condition']+(_0x56fcde(_0x4524c3[_0xd187('0x63')][_0xf03f9a][_0xd187('0x66')])?'\x20'+_0x4524c3[_0xd187('0x63')][_0xf03f9a][_0xd187('0x67')]:'');}return _0x3a2937+')';};var _0x37405d={'where':{'id':_0x568f72[_0xd187('0x4c')]['id']}},_0xe84f78,_0x12b4a4,_0x3d09a6,_0x5acea7,_0x2a756f;_0x37405d=_[_0xd187('0x3c')]({},_0x37405d,_0x568f72['options']);return db[_0xd187('0x2d')][_0xd187('0x4b')](_0x37405d)[_0xd187('0x26')](function(_0x110af6){if(_0x110af6){_0xe84f78=_0x110af6;return _0x110af6[_0xd187('0x68')]();}return null;})[_0xd187('0x26')](function(_0x2e4db4){if(_0x2e4db4){if(!_0x2e4db4[_0xd187('0x64')]){throw new db[(_0xd187('0x69'))][(_0xd187('0x6a'))](_0xd187('0x6b'),0x193);}_0x12b4a4=_0x2e4db4;return db['AnalyticMetric'][_0xd187('0x6c')]({'raw':!![]});}return null;})[_0xd187('0x26')](function(_0x50d5b8){if(_0x50d5b8){_0x3d09a6=_[_0xd187('0x6d')](_0x50d5b8,'id');var _0x48ef98;var _0x2008e9=squel['select']();_0x2008e9[_0xd187('0x6e')](_0xe84f78[_0xd187('0x6f')]);for(var _0x9b8840=0x0;_0x9b8840<_0x12b4a4[_0xd187('0x64')];_0x9b8840+=0x1){_0x48ef98=_0x12b4a4[_0x9b8840][_0xd187('0x70')]?_0x3d09a6[_0x12b4a4[_0x9b8840]['MetricId']][_0xd187('0x71')]:_0x12b4a4[_0x9b8840][_0xd187('0x76')];_0x48ef98=_0x12b4a4[_0x9b8840][_0xd187('0x87')]?_[_0xd187('0x72')](_0x25ff89[_0x12b4a4[_0x9b8840][_0xd187('0x87')]],'%s',_0x48ef98):_0x48ef98;_0x48ef98=_0x12b4a4[_0x9b8840]['format']?_[_0xd187('0x72')](_0x28798f[_0x12b4a4[_0x9b8840][_0xd187('0x73')]],'%s',_0x48ef98):_0x48ef98;if(_0x12b4a4[_0x9b8840][_0xd187('0x74')]){_0x2008e9['group'](_0x48ef98);}_0x12b4a4[_0x9b8840]['orderBy']&&_0x2008e9[_0xd187('0x38')](_0x48ef98,_0x12b4a4[_0x9b8840][_0xd187('0x75')]===_0xd187('0x88')?![]:!![]);_0x2008e9[_0xd187('0x76')](_0x48ef98,_0x12b4a4[_0x9b8840]['alias']||_0x48ef98);}if(_0xe84f78[_0xd187('0x78')]){_0xe84f78[_0xd187('0x78')]=JSON[_0xd187('0x79')](_0xe84f78[_0xd187('0x78')]);for(var _0x4bff96=0x0;_0x4bff96<_0xe84f78[_0xd187('0x78')]['length'];_0x4bff96+=0x1){if(_0xe84f78[_0xd187('0x78')][_0x4bff96][_0xd187('0x30')]&&_[_0xd187('0x5f')](_0x20c269,_0xe84f78[_0xd187('0x78')][_0x4bff96][_0xd187('0x30')])&&_0xe84f78['joins'][_0x4bff96][_0xd187('0x7a')]&&_0xe84f78[_0xd187('0x78')][_0x4bff96][_0xd187('0x7c')]&&_0xe84f78[_0xd187('0x78')][_0x4bff96]['foreignKey']){_0x2008e9[_0xe84f78[_0xd187('0x78')][_0x4bff96][_0xd187('0x30')]](_0xe84f78[_0xd187('0x78')][_0x4bff96][_0xd187('0x7c')],null,util[_0xd187('0x73')](_0xd187('0x89'),_0xe84f78[_0xd187('0x6f')],_0xe84f78[_0xd187('0x78')][_0x4bff96][_0xd187('0x7a')],_0xe84f78[_0xd187('0x78')][_0x4bff96][_0xd187('0x7c')],_0xe84f78[_0xd187('0x78')][_0x4bff96][_0xd187('0x7b')]));}}}if(_0xe84f78['conditions']){_0xe84f78[_0xd187('0x7d')]=JSON['parse'](_0xe84f78[_0xd187('0x7d')]);_0x2008e9['where'](_0x428e6c(_0xe84f78[_0xd187('0x7d')][_0xd187('0x65')]));}_0x2a756f=_0x2008e9[_0xd187('0x7e')]();_0x2008e9[_0xd187('0x1e')](_0x13ee40);_0x2008e9['offset'](0x0);logger['debug'](_0xd187('0x7f'),_0x2008e9[_0xd187('0x80')]());return dbH[_0xd187('0x81')][_0xd187('0x35')](_0x2008e9[_0xd187('0x80')](),{'type':dbH[_0xd187('0x81')]['QueryTypes']['SELECT']});}})[_0xd187('0x26')](function(){return{'sql':_0x2a756f[_0xd187('0x80')]()};})[_0xd187('0x26')](respondWithResult(_0x357526,null))['catch'](handleError(_0x357526,null));};
\ No newline at end of file
+var _0xdbf5=['includes','IS\x20NULL','IS\x20NOT\x20NULL','IS\x20NOT\x20EMPTY','rules','operator','group','field','condition','value','getFields','Please\x20insert\x20at\x20least\x20one\x20field','AnalyticMetric','keyBy','select','from','MetricId','function','replace','format','groupBy','orderBy','alias','joins','parse','foreignTable','foreignKey','%s.%s\x20=\x20%s.%s','table','parentKey','conditions','debug','Limited\x20Query:','toString','SELECT','cross_join','SUM(%s)','COUNT(%s)','COUNT(DISTINCT\x20%s)','MIN(%s)','IS\x20EMPTY','ValidationErrorItem','metric','DESC','clone','output','fullPath','%s-%s.%s','randomstring','generate','default','AnalyticExtractedReport','cdr','startDate','endDate','info','fork','../../components/export/','../../files/reports','savename','countTable','COUNT(*)','sequelize','QueryTypes','run','Sequelize','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','../../components/parsers/advancedSearch','api','../../config/license/util','../../mysqldb','dbH','end','status','json','limit','undefined','count','set','Content-Range','reject','save','then','destroy','get','DefaultReports','UserProfileResource','sendStatus','error','stack','name','send','index','map','AnalyticDefaultReport','rawAttributes','fieldName','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','offset','order','sort','where','pick','filter','merge','type','VIRTUAL','includeAll','include','findAll','rows','show','params','options','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Reports','UserProfileSection','find','userProfileId','catch','update','join','left_join','right_join','MAX(%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)'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xdbf5,0x18c));var _0x5dbf=function(_0x28300e,_0x2fc7d7){_0x28300e=_0x28300e-0x0;var _0x53f3b1=_0xdbf5[_0x28300e];return _0x53f3b1;};'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'];var dbH=require(_0x5dbf('0x16'))[_0x5dbf('0x17')];function respondWithStatusCode(_0x1453a9,_0x7cb848){_0x7cb848=_0x7cb848||0xcc;return function(_0x14493a){if(_0x14493a){return _0x1453a9['sendStatus'](_0x7cb848);}return _0x1453a9['status'](_0x7cb848)[_0x5dbf('0x18')]();};}function respondWithResult(_0x3480c8,_0x48e7fd){_0x48e7fd=_0x48e7fd||0xc8;return function(_0x19624e){if(_0x19624e){return _0x3480c8[_0x5dbf('0x19')](_0x48e7fd)[_0x5dbf('0x1a')](_0x19624e);}};}function respondWithFilteredResult(_0x2dfa44,_0x181816){return function(_0x472eb9){if(_0x472eb9){var _0x2d32cc=typeof _0x181816['offset']==='undefined'&&typeof _0x181816[_0x5dbf('0x1b')]===_0x5dbf('0x1c');var _0x39c7aa=_0x472eb9[_0x5dbf('0x1d')];var _0x20c2b0=_0x2d32cc?0x0:_0x181816['offset'];var _0x11cd00=_0x2d32cc?_0x472eb9['count']:_0x181816['offset']+_0x181816['limit'];var _0x23d1e7;if(_0x11cd00>=_0x39c7aa){_0x11cd00=_0x39c7aa;_0x23d1e7=0xc8;}else{_0x23d1e7=0xce;}_0x2dfa44[_0x5dbf('0x19')](_0x23d1e7);return _0x2dfa44[_0x5dbf('0x1e')](_0x5dbf('0x1f'),_0x20c2b0+'-'+_0x11cd00+'/'+_0x39c7aa)[_0x5dbf('0x1a')](_0x472eb9);}return null;};}function patchUpdates(_0x5b2518){return function(_0x2764ea){try{jsonpatch['apply'](_0x2764ea,_0x5b2518,!![]);}catch(_0xb68f92){return BPromise[_0x5dbf('0x20')](_0xb68f92);}return _0x2764ea[_0x5dbf('0x21')]();};}function saveUpdates(_0x43a612,_0x3b763c){return function(_0x2f154e){if(_0x2f154e){return _0x2f154e['update'](_0x43a612)[_0x5dbf('0x22')](function(_0x3e3a2d){return _0x3e3a2d;});}return null;};}function removeEntity(_0x2d3e1b,_0x2079fc){return function(_0x2763ec){if(_0x2763ec){return _0x2763ec[_0x5dbf('0x23')]()[_0x5dbf('0x22')](function(){var _0x20ab1b=_0x2763ec[_0x5dbf('0x24')]({'plain':!![]});var _0x15a790=_0x5dbf('0x25');return db[_0x5dbf('0x26')][_0x5dbf('0x23')]({'where':{'type':_0x15a790,'resourceId':_0x20ab1b['id']}})[_0x5dbf('0x22')](function(){return _0x2763ec;});})[_0x5dbf('0x22')](function(){_0x2d3e1b[_0x5dbf('0x19')](0xcc)[_0x5dbf('0x18')]();});}};}function handleEntityNotFound(_0x3f8341,_0x159e61){return function(_0x22ec42){if(!_0x22ec42){_0x3f8341[_0x5dbf('0x27')](0x194);}return _0x22ec42;};}function handleError(_0x471027,_0x21cd00){_0x21cd00=_0x21cd00||0x1f4;return function(_0x5768b7){logger[_0x5dbf('0x28')](_0x5768b7[_0x5dbf('0x29')]);if(_0x5768b7[_0x5dbf('0x2a')]){delete _0x5768b7[_0x5dbf('0x2a')];}_0x471027[_0x5dbf('0x19')](_0x21cd00)[_0x5dbf('0x2b')](_0x5768b7);};}exports[_0x5dbf('0x2c')]=function(_0x31d57a,_0x406ce6){var _0x273b63={},_0x294dd7={},_0x50a307={'count':0x0,'rows':[]};var _0x4c1587=_[_0x5dbf('0x2d')](db[_0x5dbf('0x2e')][_0x5dbf('0x2f')],function(_0x3b73ad){return{'name':_0x3b73ad[_0x5dbf('0x30')],'type':_0x3b73ad['type']['key']};});_0x294dd7[_0x5dbf('0x31')]=_[_0x5dbf('0x2d')](_0x4c1587,'name');_0x294dd7[_0x5dbf('0x32')]=_[_0x5dbf('0x33')](_0x31d57a[_0x5dbf('0x32')]);_0x294dd7[_0x5dbf('0x34')]=_[_0x5dbf('0x35')](_0x294dd7['model'],_0x294dd7[_0x5dbf('0x32')]);_0x273b63[_0x5dbf('0x36')]=_[_0x5dbf('0x35')](_0x294dd7[_0x5dbf('0x31')],qs[_0x5dbf('0x37')](_0x31d57a['query'][_0x5dbf('0x37')]));_0x273b63[_0x5dbf('0x36')]=_0x273b63[_0x5dbf('0x36')][_0x5dbf('0x38')]?_0x273b63['attributes']:_0x294dd7[_0x5dbf('0x31')];if(!_0x31d57a[_0x5dbf('0x32')][_0x5dbf('0x39')](_0x5dbf('0x3a'))){_0x273b63[_0x5dbf('0x1b')]=qs[_0x5dbf('0x1b')](_0x31d57a[_0x5dbf('0x32')][_0x5dbf('0x1b')]);_0x273b63[_0x5dbf('0x3b')]=qs[_0x5dbf('0x3b')](_0x31d57a[_0x5dbf('0x32')]['offset']);}_0x273b63[_0x5dbf('0x3c')]=qs[_0x5dbf('0x3d')](_0x31d57a[_0x5dbf('0x32')]['sort']);_0x273b63[_0x5dbf('0x3e')]=qs[_0x5dbf('0x34')](_[_0x5dbf('0x3f')](_0x31d57a['query'],_0x294dd7[_0x5dbf('0x34')]),_0x4c1587);if(_0x31d57a[_0x5dbf('0x32')][_0x5dbf('0x40')]){_0x273b63['where']=_[_0x5dbf('0x41')](_0x273b63[_0x5dbf('0x3e')],{'$or':_[_0x5dbf('0x2d')](_0x4c1587,function(_0x260c9f){if(_0x260c9f[_0x5dbf('0x42')]!==_0x5dbf('0x43')){var _0x321ae3={};_0x321ae3[_0x260c9f[_0x5dbf('0x2a')]]={'$like':'%'+_0x31d57a['query']['filter']+'%'};return _0x321ae3;}})});}_0x273b63=_['merge']({},_0x273b63,_0x31d57a['options']);var _0x28b28f={'where':_0x273b63[_0x5dbf('0x3e')]};return db['AnalyticDefaultReport'][_0x5dbf('0x1d')](_0x28b28f)[_0x5dbf('0x22')](function(_0x5a60e8){_0x50a307[_0x5dbf('0x1d')]=_0x5a60e8;if(_0x31d57a[_0x5dbf('0x32')][_0x5dbf('0x44')]){_0x273b63[_0x5dbf('0x45')]=[{'all':!![]}];}return db[_0x5dbf('0x2e')][_0x5dbf('0x46')](_0x273b63);})[_0x5dbf('0x22')](function(_0x1c020a){_0x50a307[_0x5dbf('0x47')]=_0x1c020a;return _0x50a307;})[_0x5dbf('0x22')](respondWithFilteredResult(_0x406ce6,_0x273b63))['catch'](handleError(_0x406ce6,null));};exports[_0x5dbf('0x48')]=function(_0x22f958,_0xec1d28){var _0x50880d={'raw':!![],'where':{'id':_0x22f958[_0x5dbf('0x49')]['id']}},_0x16b0ff={};_0x16b0ff[_0x5dbf('0x31')]=_[_0x5dbf('0x33')](db['AnalyticDefaultReport'][_0x5dbf('0x2f')]);_0x16b0ff['query']=_[_0x5dbf('0x33')](_0x22f958[_0x5dbf('0x32')]);_0x16b0ff[_0x5dbf('0x34')]=_[_0x5dbf('0x35')](_0x16b0ff['model'],_0x16b0ff['query']);_0x50880d[_0x5dbf('0x36')]=_[_0x5dbf('0x35')](_0x16b0ff[_0x5dbf('0x31')],qs['fields'](_0x22f958[_0x5dbf('0x32')]['fields']));_0x50880d['attributes']=_0x50880d['attributes']['length']?_0x50880d[_0x5dbf('0x36')]:_0x16b0ff[_0x5dbf('0x31')];if(_0x22f958['query'][_0x5dbf('0x44')]){_0x50880d[_0x5dbf('0x45')]=[{'all':!![]}];}_0x50880d=_['merge']({},_0x50880d,_0x22f958[_0x5dbf('0x4a')]);return db[_0x5dbf('0x2e')]['find'](_0x50880d)[_0x5dbf('0x22')](handleEntityNotFound(_0xec1d28,null))['then'](respondWithResult(_0xec1d28,null))['catch'](handleError(_0xec1d28,null));};exports[_0x5dbf('0x4b')]=function(_0x2a3d30,_0x17a1c0){return db['AnalyticDefaultReport']['create'](_0x2a3d30[_0x5dbf('0x4c')],{})[_0x5dbf('0x22')](function(_0x21f477){var _0x307a00=_0x2a3d30[_0x5dbf('0x4d')][_0x5dbf('0x24')]({'plain':!![]});if(!_0x307a00)throw new Error(_0x5dbf('0x4e'));if(_0x307a00[_0x5dbf('0x4f')]==='user'){var _0x3f38a0=_0x21f477[_0x5dbf('0x24')]({'plain':!![]});var _0x2927a3=_0x5dbf('0x50');return db[_0x5dbf('0x51')][_0x5dbf('0x52')]({'where':{'name':_0x2927a3,'userProfileId':_0x307a00[_0x5dbf('0x53')]},'raw':!![]})['then'](function(_0x1b0b13){if(_0x1b0b13&&_0x1b0b13['autoAssociation']===0x0){return db[_0x5dbf('0x26')][_0x5dbf('0x4b')]({'name':_0x3f38a0[_0x5dbf('0x2a')],'resourceId':_0x3f38a0['id'],'type':_0x5dbf('0x25'),'sectionId':_0x1b0b13['id']},{})[_0x5dbf('0x22')](function(){return _0x21f477;});}else{return _0x21f477;}})[_0x5dbf('0x54')](function(_0x353d0f){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x353d0f);throw _0x353d0f;});}return _0x21f477;})['then'](respondWithResult(_0x17a1c0,0xc9))[_0x5dbf('0x54')](handleError(_0x17a1c0,null));};exports[_0x5dbf('0x55')]=function(_0x36a787,_0x56c8b2){if(_0x36a787['body']['id']){delete _0x36a787[_0x5dbf('0x4c')]['id'];}return db[_0x5dbf('0x2e')][_0x5dbf('0x52')]({'where':{'id':_0x36a787['params']['id']}})[_0x5dbf('0x22')](handleEntityNotFound(_0x56c8b2,null))['then'](saveUpdates(_0x36a787[_0x5dbf('0x4c')],null))[_0x5dbf('0x22')](respondWithResult(_0x56c8b2,null))[_0x5dbf('0x54')](handleError(_0x56c8b2,null));};exports['destroy']=function(_0x55fd51,_0x1b316d){return db[_0x5dbf('0x2e')][_0x5dbf('0x52')]({'where':{'id':_0x55fd51[_0x5dbf('0x49')]['id']}})['then'](handleEntityNotFound(_0x1b316d,null))[_0x5dbf('0x22')](removeEntity(_0x1b316d,null))[_0x5dbf('0x54')](handleError(_0x1b316d,null));};exports['preview']=function(_0x5485f3,_0x19ec03){var _0x14bdb1=0xa;var _0x197e8c=[_0x5dbf('0x56'),_0x5dbf('0x57'),_0x5dbf('0x58'),'cross_join'];var _0x4107f1={'SUM':'SUM(%s)','COUNT':'COUNT(%s)','COUNT DISTINCT':'COUNT(DISTINCT\x20%s)','MAX':_0x5dbf('0x59'),'MIN':'MIN(%s)','AVG':_0x5dbf('0x5a'),'GROUP_CONCAT':_0x5dbf('0x5b'),'GROUP_CONCAT ASC':_0x5dbf('0x5c'),'GROUP_CONCAT DESC':_0x5dbf('0x5d')};var _0x461ffb={'SEC_TO_TIME':_0x5dbf('0x5e'),'DATE':_0x5dbf('0x5f'),'HOUR':_0x5dbf('0x60'),'ROUND':_0x5dbf('0x61'),'UNIX_TIMESTAMP':_0x5dbf('0x62')};var _0x3a84c2=function(_0x2ca889){return!_[_0x5dbf('0x63')]([_0x5dbf('0x64'),_0x5dbf('0x65'),'IS\x20EMPTY',_0x5dbf('0x66')],_0x2ca889);};var _0x553be4=function(_0xb0a9bf){if(!_0xb0a9bf||!_0xb0a9bf[_0x5dbf('0x67')][_0x5dbf('0x38')]){return'';}for(var _0x110224='(',_0x5a975a=0x0;_0x5a975a<_0xb0a9bf[_0x5dbf('0x67')][_0x5dbf('0x38')];_0x5a975a+=0x1){_0x5a975a>0x0&&(_0x110224+='\x20'+_0xb0a9bf[_0x5dbf('0x68')]+'\x20');_0x110224+=_0xb0a9bf[_0x5dbf('0x67')][_0x5a975a][_0x5dbf('0x69')]?_0x553be4(_0xb0a9bf[_0x5dbf('0x67')][_0x5a975a]['group']):_0xb0a9bf[_0x5dbf('0x67')][_0x5a975a][_0x5dbf('0x6a')]+'\x20'+_0xb0a9bf[_0x5dbf('0x67')][_0x5a975a][_0x5dbf('0x6b')]+(_0x3a84c2(_0xb0a9bf[_0x5dbf('0x67')][_0x5a975a][_0x5dbf('0x6b')])?'\x20'+_0xb0a9bf[_0x5dbf('0x67')][_0x5a975a][_0x5dbf('0x6c')]:'');}return _0x110224+')';};var _0x12d69b={'where':{'id':_0x5485f3[_0x5dbf('0x49')]['id']}},_0x3b53da,_0x13c8ab,_0x2997a8,_0x5d7a37,_0x52109d;_0x12d69b=_[_0x5dbf('0x41')]({},_0x12d69b,_0x5485f3[_0x5dbf('0x4a')]);return db[_0x5dbf('0x2e')][_0x5dbf('0x52')](_0x12d69b)[_0x5dbf('0x22')](function(_0x1b42cf){if(_0x1b42cf){_0x3b53da=_0x1b42cf;return _0x1b42cf[_0x5dbf('0x6d')]();}return null;})[_0x5dbf('0x22')](function(_0x57c568){if(_0x57c568){if(!_0x57c568['length']){throw new db['Sequelize']['ValidationErrorItem'](_0x5dbf('0x6e'),0x193);}_0x13c8ab=_0x57c568;return db[_0x5dbf('0x6f')][_0x5dbf('0x46')]({'raw':!![]});}return null;})[_0x5dbf('0x22')](function(_0x29c4d9){if(_0x29c4d9){_0x2997a8=_[_0x5dbf('0x70')](_0x29c4d9,'id');var _0x5331ff;var _0x5bb990=squel[_0x5dbf('0x71')]();_0x5bb990[_0x5dbf('0x72')](_0x3b53da['table']);for(var _0x1728b9=0x0;_0x1728b9<_0x13c8ab[_0x5dbf('0x38')];_0x1728b9+=0x1){_0x5331ff=_0x13c8ab[_0x1728b9][_0x5dbf('0x73')]?_0x2997a8[_0x13c8ab[_0x1728b9][_0x5dbf('0x73')]]['metric']:_0x13c8ab[_0x1728b9][_0x5dbf('0x6a')];_0x5331ff=_0x13c8ab[_0x1728b9][_0x5dbf('0x74')]?_[_0x5dbf('0x75')](_0x4107f1[_0x13c8ab[_0x1728b9][_0x5dbf('0x74')]],'%s',_0x5331ff):_0x5331ff;_0x5331ff=_0x13c8ab[_0x1728b9][_0x5dbf('0x76')]?_['replace'](_0x461ffb[_0x13c8ab[_0x1728b9][_0x5dbf('0x76')]],'%s',_0x5331ff):_0x5331ff;if(_0x13c8ab[_0x1728b9][_0x5dbf('0x77')]){_0x5bb990[_0x5dbf('0x69')](_0x5331ff);}_0x13c8ab[_0x1728b9][_0x5dbf('0x78')]&&_0x5bb990['order'](_0x5331ff,_0x13c8ab[_0x1728b9][_0x5dbf('0x78')]==='DESC'?![]:!![]);_0x5bb990[_0x5dbf('0x6a')](_0x5331ff,_0x13c8ab[_0x1728b9][_0x5dbf('0x79')]||_0x5331ff);}if(_0x3b53da[_0x5dbf('0x7a')]){_0x3b53da['joins']=JSON[_0x5dbf('0x7b')](_0x3b53da[_0x5dbf('0x7a')]);for(var _0x4166ce=0x0;_0x4166ce<_0x3b53da[_0x5dbf('0x7a')]['length'];_0x4166ce+=0x1){if(_0x3b53da[_0x5dbf('0x7a')][_0x4166ce][_0x5dbf('0x42')]&&_[_0x5dbf('0x63')](_0x197e8c,_0x3b53da[_0x5dbf('0x7a')][_0x4166ce][_0x5dbf('0x42')])&&_0x3b53da[_0x5dbf('0x7a')][_0x4166ce]['parentKey']&&_0x3b53da[_0x5dbf('0x7a')][_0x4166ce][_0x5dbf('0x7c')]&&_0x3b53da['joins'][_0x4166ce][_0x5dbf('0x7d')]){_0x5bb990[_0x3b53da[_0x5dbf('0x7a')][_0x4166ce][_0x5dbf('0x42')]](_0x3b53da[_0x5dbf('0x7a')][_0x4166ce][_0x5dbf('0x7c')],null,util[_0x5dbf('0x76')](_0x5dbf('0x7e'),_0x3b53da[_0x5dbf('0x7f')],_0x3b53da[_0x5dbf('0x7a')][_0x4166ce][_0x5dbf('0x80')],_0x3b53da[_0x5dbf('0x7a')][_0x4166ce][_0x5dbf('0x7c')],_0x3b53da[_0x5dbf('0x7a')][_0x4166ce][_0x5dbf('0x7d')]));}}}if(_0x3b53da[_0x5dbf('0x81')]){_0x3b53da[_0x5dbf('0x81')]=JSON['parse'](_0x3b53da[_0x5dbf('0x81')]);_0x5bb990[_0x5dbf('0x3e')](_0x553be4(_0x3b53da[_0x5dbf('0x81')][_0x5dbf('0x69')]));}_0x52109d=_0x5bb990['clone']();_0x5bb990[_0x5dbf('0x1b')](_0x14bdb1);_0x5bb990[_0x5dbf('0x3b')](0x0);logger[_0x5dbf('0x82')](_0x5dbf('0x83'),_0x5bb990[_0x5dbf('0x84')]());return dbH['sequelize'][_0x5dbf('0x32')](_0x5bb990[_0x5dbf('0x84')](),{'type':dbH['sequelize']['QueryTypes'][_0x5dbf('0x85')]});}})[_0x5dbf('0x22')](respondWithResult(_0x19ec03,null))[_0x5dbf('0x54')](handleError(_0x19ec03,null));};function runReport(_0x8ca7de,_0x14b21b,_0x23ec75){var _0x22339b=_0x14b21b['name'];var _0x310078=0xa;var _0x3b01c0=[_0x5dbf('0x56'),_0x5dbf('0x57'),_0x5dbf('0x58'),_0x5dbf('0x86')];var _0x4cceb1={'SUM':_0x5dbf('0x87'),'COUNT':_0x5dbf('0x88'),'COUNT DISTINCT':_0x5dbf('0x89'),'MAX':_0x5dbf('0x59'),'MIN':_0x5dbf('0x8a'),'AVG':'AVG(%s)','GROUP_CONCAT':_0x5dbf('0x5b'),'GROUP_CONCAT ASC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20ASC)','GROUP_CONCAT DESC':'GROUP_CONCAT(%s\x20ORDER\x20BY\x20%s\x20DESC)'};var _0x5924d2={'SEC_TO_TIME':'SEC_TO_TIME(%s)','DATE':_0x5dbf('0x5f'),'HOUR':_0x5dbf('0x60'),'ROUND':_0x5dbf('0x61'),'UNIX_TIMESTAMP':_0x5dbf('0x62')};var _0x4333db=function(_0x4cb92d){return!_['includes']([_0x5dbf('0x64'),'IS\x20NOT\x20NULL',_0x5dbf('0x8b'),_0x5dbf('0x66')],_0x4cb92d);};var _0x541241=function(_0x3c7eaa){if(!_0x3c7eaa||!_0x3c7eaa['rules'][_0x5dbf('0x38')]){return'';}for(var _0x24d90a='(',_0xa3e94f=0x0;_0xa3e94f<_0x3c7eaa[_0x5dbf('0x67')][_0x5dbf('0x38')];_0xa3e94f+=0x1){_0xa3e94f>0x0&&(_0x24d90a+='\x20'+_0x3c7eaa['operator']+'\x20');_0x24d90a+=_0x3c7eaa[_0x5dbf('0x67')][_0xa3e94f][_0x5dbf('0x69')]?_0x541241(_0x3c7eaa[_0x5dbf('0x67')][_0xa3e94f][_0x5dbf('0x69')]):_0x3c7eaa['rules'][_0xa3e94f][_0x5dbf('0x6a')]+'\x20'+_0x3c7eaa[_0x5dbf('0x67')][_0xa3e94f][_0x5dbf('0x6b')]+(_0x4333db(_0x3c7eaa[_0x5dbf('0x67')][_0xa3e94f][_0x5dbf('0x6b')])?'\x20'+_0x3c7eaa[_0x5dbf('0x67')][_0xa3e94f][_0x5dbf('0x6c')]:'');}return _0x24d90a+')';};var _0x334f63={'where':{'id':_0x8ca7de['id']}},_0x5ac29f,_0x533fdd,_0x5bf068,_0x1bd06b,_0x274497;_0x334f63=_['merge']({},_0x334f63,_0x23ec75);return db['AnalyticDefaultReport']['find'](_0x334f63)[_0x5dbf('0x22')](function(_0x20bda9){if(_0x20bda9){_0x5ac29f=_0x20bda9;return _0x20bda9[_0x5dbf('0x6d')]();}return null;})[_0x5dbf('0x22')](function(_0x12757d){if(_0x12757d){if(!_0x12757d[_0x5dbf('0x38')]){throw new db['Sequelize'][(_0x5dbf('0x8c'))](_0x5dbf('0x6e'),0x193);}_0x533fdd=_0x12757d;return db['AnalyticMetric']['findAll']({'raw':!![]});}return null;})[_0x5dbf('0x22')](function(_0x5722b3){if(_0x5722b3){_0x5bf068=_['keyBy'](_0x5722b3,'id');var _0x3a27c4;var _0x3620d2=squel[_0x5dbf('0x71')]();_0x3620d2['from'](_0x5ac29f[_0x5dbf('0x7f')]);for(var _0x447259=0x0;_0x447259<_0x533fdd['length'];_0x447259+=0x1){_0x3a27c4=_0x533fdd[_0x447259][_0x5dbf('0x73')]?_0x5bf068[_0x533fdd[_0x447259][_0x5dbf('0x73')]][_0x5dbf('0x8d')]:_0x533fdd[_0x447259][_0x5dbf('0x6a')];_0x3a27c4=_0x533fdd[_0x447259][_0x5dbf('0x74')]?_[_0x5dbf('0x75')](_0x4cceb1[_0x533fdd[_0x447259][_0x5dbf('0x74')]],'%s',_0x3a27c4):_0x3a27c4;_0x3a27c4=_0x533fdd[_0x447259][_0x5dbf('0x76')]?_['replace'](_0x5924d2[_0x533fdd[_0x447259]['format']],'%s',_0x3a27c4):_0x3a27c4;if(_0x533fdd[_0x447259]['groupBy']){_0x3620d2[_0x5dbf('0x69')](_0x3a27c4);}_0x533fdd[_0x447259][_0x5dbf('0x78')]&&_0x3620d2[_0x5dbf('0x3c')](_0x3a27c4,_0x533fdd[_0x447259][_0x5dbf('0x78')]===_0x5dbf('0x8e')?![]:!![]);_0x3620d2[_0x5dbf('0x6a')](_0x3a27c4,_0x533fdd[_0x447259][_0x5dbf('0x79')]||_0x3a27c4);}if(_0x5ac29f[_0x5dbf('0x7a')]){_0x5ac29f[_0x5dbf('0x7a')]=JSON[_0x5dbf('0x7b')](_0x5ac29f['joins']);for(var _0x2ded2b=0x0;_0x2ded2b<_0x5ac29f[_0x5dbf('0x7a')][_0x5dbf('0x38')];_0x2ded2b+=0x1){if(_0x5ac29f[_0x5dbf('0x7a')][_0x2ded2b][_0x5dbf('0x42')]&&_[_0x5dbf('0x63')](_0x3b01c0,_0x5ac29f[_0x5dbf('0x7a')][_0x2ded2b][_0x5dbf('0x42')])&&_0x5ac29f['joins'][_0x2ded2b]['parentKey']&&_0x5ac29f[_0x5dbf('0x7a')][_0x2ded2b]['foreignTable']&&_0x5ac29f['joins'][_0x2ded2b][_0x5dbf('0x7d')]){_0x3620d2[_0x5ac29f['joins'][_0x2ded2b]['type']](_0x5ac29f['joins'][_0x2ded2b]['foreignTable'],null,util[_0x5dbf('0x76')]('%s.%s\x20=\x20%s.%s',_0x5ac29f[_0x5dbf('0x7f')],_0x5ac29f[_0x5dbf('0x7a')][_0x2ded2b][_0x5dbf('0x80')],_0x5ac29f['joins'][_0x2ded2b][_0x5dbf('0x7c')],_0x5ac29f[_0x5dbf('0x7a')][_0x2ded2b][_0x5dbf('0x7d')]));}}}if(_0x5ac29f['conditions']){_0x5ac29f[_0x5dbf('0x81')]=JSON[_0x5dbf('0x7b')](_0x5ac29f[_0x5dbf('0x81')]);_0x3620d2['where'](_0x541241(_0x5ac29f[_0x5dbf('0x81')][_0x5dbf('0x69')]));}_0x274497=_0x3620d2[_0x5dbf('0x8f')]();_0x3620d2['limit'](_0x310078);_0x3620d2[_0x5dbf('0x3b')](0x0);return;}})[_0x5dbf('0x22')](function(){if(_0x14b21b[_0x5dbf('0x90')]==='web'){return null;}var _0x48a8c5=_['merge'](_0x14b21b,{'name':_0x14b21b[_0x5dbf('0x91')]||_0x14b21b[_0x5dbf('0x2a')]||_0x5ac29f[_0x5dbf('0x2a')],'basename':_0x22339b,'savename':util[_0x5dbf('0x76')](_0x5dbf('0x92'),_0x14b21b[_0x5dbf('0x2a')]||_0x5ac29f['name'],require(_0x5dbf('0x93'))[_0x5dbf('0x94')](0x4),_0x14b21b[_0x5dbf('0x90')]||'csv'),'reportId':_0x5ac29f['id'],'reportType':_0x5dbf('0x95')});return db[_0x5dbf('0x96')][_0x5dbf('0x4b')](_0x48a8c5,{'raw':!![]});})[_0x5dbf('0x22')](function(_0x2afbd4){if(_0x5ac29f[_0x5dbf('0x7f')]===_0x5dbf('0x97')){_0x274497['where'](_0x5ac29f[_0x5dbf('0x7f')]+'.calldate\x20BETWEEN\x20?\x20AND\x20?',_0x14b21b[_0x5dbf('0x98')],_0x14b21b[_0x5dbf('0x99')]);}else{_0x274497[_0x5dbf('0x3e')](_0x5ac29f['table']+'.createdAt\x20BETWEEN\x20?\x20AND\x20?',_0x14b21b['startDate'],_0x14b21b[_0x5dbf('0x99')]);}if(_0x2afbd4){logger[_0x5dbf('0x9a')]('Run\x20Query:',_0x274497[_0x5dbf('0x84')]());require('child_process')[_0x5dbf('0x9b')](path[_0x5dbf('0x56')](__dirname,_0x5dbf('0x9c'),_0x2afbd4['output']),[_0x2afbd4['id'],_0x274497[_0x5dbf('0x84')](),path[_0x5dbf('0x56')](__dirname,_0x5dbf('0x9d'),_0x2afbd4[_0x5dbf('0x9e')]),_0x22339b]);return _0x2afbd4;}else{var _0x4bc5af=squel[_0x5dbf('0x71')]();_0x4bc5af[_0x5dbf('0x72')]('('+_0x274497['toString']()+')',_0x5dbf('0x9f'));_0x4bc5af['field'](_0x5dbf('0xa0'),_0x5dbf('0x1d'));_0x274497[_0x5dbf('0x1b')](_0x14b21b['limit']||_0x310078);_0x274497[_0x5dbf('0x3b')](_0x14b21b[_0x5dbf('0x3b')]||0x0);return dbH[_0x5dbf('0xa1')][_0x5dbf('0x32')](_0x4bc5af[_0x5dbf('0x84')](),{'type':dbH[_0x5dbf('0xa1')]['QueryTypes'][_0x5dbf('0x85')]})['then'](function(_0x6cfb82){if(!_0x6cfb82[_0x5dbf('0x38')]){_0x1bd06b=0x0;}else{_0x1bd06b=_0x6cfb82[0x0][_0x5dbf('0x1d')]||0x0;}return dbH[_0x5dbf('0xa1')][_0x5dbf('0x32')](_0x274497[_0x5dbf('0x84')](),{'type':dbH['sequelize'][_0x5dbf('0xa2')][_0x5dbf('0x85')]});})[_0x5dbf('0x22')](function(_0x4d68f6){return{'rows':_0x4d68f6||[],'count':_0x1bd06b};});}});}exports[_0x5dbf('0xa3')]=function(_0x47ac95,_0x51b241){return runReport(_0x47ac95[_0x5dbf('0x49')],_0x47ac95[_0x5dbf('0x32')],_0x47ac95[_0x5dbf('0x4a')])[_0x5dbf('0x22')](respondWithResult(_0x51b241,null))[_0x5dbf('0x54')](handleError(_0x51b241,null));};exports['runReport']=runReport;exports['query']=function(_0x4f38a0,_0x144300){var _0x1da1e3=0xa;var _0x25e681=[_0x5dbf('0x56'),_0x5dbf('0x57'),_0x5dbf('0x58'),_0x5dbf('0x86')];var _0x236754={'SUM':'SUM(%s)','COUNT':_0x5dbf('0x88'),'COUNT DISTINCT':_0x5dbf('0x89'),'MAX':_0x5dbf('0x59'),'MIN':_0x5dbf('0x8a'),'AVG':_0x5dbf('0x5a'),'GROUP_CONCAT':_0x5dbf('0x5b'),'GROUP_CONCAT ASC':_0x5dbf('0x5c'),'GROUP_CONCAT DESC':_0x5dbf('0x5d')};var _0x191a16={'SEC_TO_TIME':_0x5dbf('0x5e'),'DATE':'DATE(%s)','HOUR':'HOUR(%s)','ROUND':'ROUND(%s)','UNIX_TIMESTAMP':_0x5dbf('0x62')};var _0x51b0df=function(_0x48ea8a){return!_['includes']([_0x5dbf('0x64'),_0x5dbf('0x65'),_0x5dbf('0x8b'),_0x5dbf('0x66')],_0x48ea8a);};var _0x3de263=function(_0x4f8dde){if(!_0x4f8dde||!_0x4f8dde[_0x5dbf('0x67')][_0x5dbf('0x38')]){return'';}for(var _0x19effa='(',_0x29177e=0x0;_0x29177e<_0x4f8dde[_0x5dbf('0x67')]['length'];_0x29177e+=0x1){_0x29177e>0x0&&(_0x19effa+='\x20'+_0x4f8dde[_0x5dbf('0x68')]+'\x20');_0x19effa+=_0x4f8dde[_0x5dbf('0x67')][_0x29177e][_0x5dbf('0x69')]?_0x3de263(_0x4f8dde[_0x5dbf('0x67')][_0x29177e]['group']):_0x4f8dde[_0x5dbf('0x67')][_0x29177e][_0x5dbf('0x6a')]+'\x20'+_0x4f8dde[_0x5dbf('0x67')][_0x29177e][_0x5dbf('0x6b')]+(_0x51b0df(_0x4f8dde[_0x5dbf('0x67')][_0x29177e][_0x5dbf('0x6b')])?'\x20'+_0x4f8dde[_0x5dbf('0x67')][_0x29177e]['value']:'');}return _0x19effa+')';};var _0x4899ac={'where':{'id':_0x4f38a0['params']['id']}},_0x51864c,_0x4562a4,_0x240304,_0x5df275,_0xc588a2;_0x4899ac=_[_0x5dbf('0x41')]({},_0x4899ac,_0x4f38a0['options']);return db[_0x5dbf('0x2e')][_0x5dbf('0x52')](_0x4899ac)[_0x5dbf('0x22')](function(_0x2eafe0){if(_0x2eafe0){_0x51864c=_0x2eafe0;return _0x2eafe0[_0x5dbf('0x6d')]();}return null;})[_0x5dbf('0x22')](function(_0x414859){if(_0x414859){if(!_0x414859['length']){throw new db[(_0x5dbf('0xa4'))][(_0x5dbf('0x8c'))](_0x5dbf('0x6e'),0x193);}_0x4562a4=_0x414859;return db[_0x5dbf('0x6f')][_0x5dbf('0x46')]({'raw':!![]});}return null;})[_0x5dbf('0x22')](function(_0x153401){if(_0x153401){_0x240304=_[_0x5dbf('0x70')](_0x153401,'id');var _0xbe0ca0;var _0x521c72=squel[_0x5dbf('0x71')]();_0x521c72[_0x5dbf('0x72')](_0x51864c[_0x5dbf('0x7f')]);for(var _0x6b4262=0x0;_0x6b4262<_0x4562a4[_0x5dbf('0x38')];_0x6b4262+=0x1){_0xbe0ca0=_0x4562a4[_0x6b4262][_0x5dbf('0x73')]?_0x240304[_0x4562a4[_0x6b4262][_0x5dbf('0x73')]][_0x5dbf('0x8d')]:_0x4562a4[_0x6b4262][_0x5dbf('0x6a')];_0xbe0ca0=_0x4562a4[_0x6b4262][_0x5dbf('0x74')]?_[_0x5dbf('0x75')](_0x236754[_0x4562a4[_0x6b4262][_0x5dbf('0x74')]],'%s',_0xbe0ca0):_0xbe0ca0;_0xbe0ca0=_0x4562a4[_0x6b4262][_0x5dbf('0x76')]?_[_0x5dbf('0x75')](_0x191a16[_0x4562a4[_0x6b4262][_0x5dbf('0x76')]],'%s',_0xbe0ca0):_0xbe0ca0;if(_0x4562a4[_0x6b4262][_0x5dbf('0x77')]){_0x521c72[_0x5dbf('0x69')](_0xbe0ca0);}_0x4562a4[_0x6b4262][_0x5dbf('0x78')]&&_0x521c72[_0x5dbf('0x3c')](_0xbe0ca0,_0x4562a4[_0x6b4262]['orderBy']===_0x5dbf('0x8e')?![]:!![]);_0x521c72['field'](_0xbe0ca0,_0x4562a4[_0x6b4262][_0x5dbf('0x79')]||_0xbe0ca0);}if(_0x51864c['joins']){_0x51864c[_0x5dbf('0x7a')]=JSON['parse'](_0x51864c[_0x5dbf('0x7a')]);for(var _0x417869=0x0;_0x417869<_0x51864c[_0x5dbf('0x7a')]['length'];_0x417869+=0x1){if(_0x51864c[_0x5dbf('0x7a')][_0x417869][_0x5dbf('0x42')]&&_[_0x5dbf('0x63')](_0x25e681,_0x51864c[_0x5dbf('0x7a')][_0x417869][_0x5dbf('0x42')])&&_0x51864c[_0x5dbf('0x7a')][_0x417869][_0x5dbf('0x80')]&&_0x51864c['joins'][_0x417869][_0x5dbf('0x7c')]&&_0x51864c[_0x5dbf('0x7a')][_0x417869]['foreignKey']){_0x521c72[_0x51864c[_0x5dbf('0x7a')][_0x417869]['type']](_0x51864c['joins'][_0x417869][_0x5dbf('0x7c')],null,util[_0x5dbf('0x76')]('%s.%s\x20=\x20%s.%s',_0x51864c[_0x5dbf('0x7f')],_0x51864c['joins'][_0x417869]['parentKey'],_0x51864c[_0x5dbf('0x7a')][_0x417869]['foreignTable'],_0x51864c[_0x5dbf('0x7a')][_0x417869][_0x5dbf('0x7d')]));}}}if(_0x51864c[_0x5dbf('0x81')]){_0x51864c[_0x5dbf('0x81')]=JSON[_0x5dbf('0x7b')](_0x51864c[_0x5dbf('0x81')]);_0x521c72[_0x5dbf('0x3e')](_0x3de263(_0x51864c[_0x5dbf('0x81')][_0x5dbf('0x69')]));}_0xc588a2=_0x521c72[_0x5dbf('0x8f')]();_0x521c72[_0x5dbf('0x1b')](_0x1da1e3);_0x521c72[_0x5dbf('0x3b')](0x0);logger[_0x5dbf('0x82')]('Limited\x20Query:',_0x521c72[_0x5dbf('0x84')]());return dbH[_0x5dbf('0xa1')][_0x5dbf('0x32')](_0x521c72[_0x5dbf('0x84')](),{'type':dbH[_0x5dbf('0xa1')][_0x5dbf('0xa2')]['SELECT']});}})[_0x5dbf('0x22')](function(){return{'sql':_0xc588a2[_0x5dbf('0x84')]()};})[_0x5dbf('0x22')](respondWithResult(_0x144300,null))[_0x5dbf('0x54')](handleError(_0x144300,null));};
\ No newline at end of file
index ab3437c..53819b7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7973=['moment','bluebird','request-promise','rimraf','../../config/environment','./analyticDefaultReport.attributes','exports','define','lodash','util','../../config/logger'];(function(_0x447d73,_0x50f8c7){var _0x343b07=function(_0x467a77){while(--_0x467a77){_0x447d73['push'](_0x447d73['shift']());}};_0x343b07(++_0x50f8c7);}(_0x7973,0x152));var _0x3797=function(_0x554336,_0x5dc9bf){_0x554336=_0x554336-0x0;var _0x372341=_0x7973[_0x554336];return _0x372341;};'use strict';var _=require(_0x3797('0x0'));var util=require(_0x3797('0x1'));var logger=require(_0x3797('0x2'))('api');var moment=require(_0x3797('0x3'));var BPromise=require(_0x3797('0x4'));var rp=require(_0x3797('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3797('0x6'));var config=require(_0x3797('0x7'));var attributes=require(_0x3797('0x8'));module[_0x3797('0x9')]=function(_0x2999e5,_0x25857a){return _0x2999e5[_0x3797('0xa')]('AnalyticDefaultReport',attributes,{'tableName':'analytics_default_reports','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x0c84=['exports','define','AnalyticDefaultReport','analytics_default_reports','util','../../config/logger','api','moment','bluebird','path','../../config/environment','./analyticDefaultReport.attributes'];(function(_0x68c979,_0x431cff){var _0x4f0001=function(_0xa7595d){while(--_0xa7595d){_0x68c979['push'](_0x68c979['shift']());}};_0x4f0001(++_0x431cff);}(_0x0c84,0x16c));var _0x40c8=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0x0c84[_0x4565bf];return _0x5610ba;};'use strict';var _=require('lodash');var util=require(_0x40c8('0x0'));var logger=require(_0x40c8('0x1'))(_0x40c8('0x2'));var moment=require(_0x40c8('0x3'));var BPromise=require(_0x40c8('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x40c8('0x5'));var rimraf=require('rimraf');var config=require(_0x40c8('0x6'));var attributes=require(_0x40c8('0x7'));module[_0x40c8('0x8')]=function(_0x24c7a1,_0x4126b0){return _0x24c7a1[_0x40c8('0x9')](_0x40c8('0xa'),attributes,{'tableName':_0x40c8('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 68cc152..2d05542 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x89f7=['catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','AnalyticDefaultReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result'];(function(_0x379e0f,_0x3eca39){var _0x5959b9=function(_0x1b65d4){while(--_0x1b65d4){_0x379e0f['push'](_0x379e0f['shift']());}};_0x5959b9(++_0x3eca39);}(_0x89f7,0xa9));var _0x789f=function(_0x269c42,_0xeed101){_0x269c42=_0x269c42-0x0;var _0x4dad76=_0x89f7[_0x269c42];return _0x4dad76;};'use strict';var _=require(_0x789f('0x0'));var util=require(_0x789f('0x1'));var moment=require('moment');var BPromise=require(_0x789f('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x789f('0x3'));var db=require(_0x789f('0x4'))['db'];var utils=require(_0x789f('0x5'));var logger=require(_0x789f('0x6'))(_0x789f('0x7'));var config=require(_0x789f('0x8'));var jayson=require(_0x789f('0x9'));var client=jayson[_0x789f('0xa')][_0x789f('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x51838c,_0x4551d2,_0x14d537){return new BPromise(function(_0x316016,_0x47db73){return client[_0x789f('0xc')](_0x51838c,_0x14d537)[_0x789f('0xd')](function(_0x550675){logger[_0x789f('0xe')](_0x789f('0xf'),_0x4551d2,_0x789f('0x10'));logger[_0x789f('0x11')]('AnalyticDefaultReport,\x20%s,\x20%s,\x20%s',_0x4551d2,_0x789f('0x10'),JSON[_0x789f('0x12')](_0x550675));if(_0x550675[_0x789f('0x13')]){if(_0x550675['error'][_0x789f('0x14')]===0x1f4){logger[_0x789f('0x13')]('AnalyticDefaultReport,\x20%s,\x20%s',_0x4551d2,_0x550675[_0x789f('0x13')][_0x789f('0x15')]);return _0x47db73(_0x550675[_0x789f('0x13')]['message']);}logger['error'](_0x789f('0xf'),_0x4551d2,_0x550675[_0x789f('0x13')][_0x789f('0x15')]);return _0x316016(_0x550675[_0x789f('0x13')][_0x789f('0x15')]);}else{logger[_0x789f('0xe')](_0x789f('0xf'),_0x4551d2,_0x789f('0x10'));_0x316016(_0x550675[_0x789f('0x16')][_0x789f('0x15')]);}})[_0x789f('0x17')](function(_0x1c2989){logger['error'](_0x789f('0xf'),_0x4551d2,_0x1c2989);_0x47db73(_0x1c2989);});});}
\ No newline at end of file
+var _0x743c=['code','message','result','catch','lodash','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','AnalyticDefaultReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticDefaultReport,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x3b0fc5,_0x34d617){var _0x44aa86=function(_0x21a067){while(--_0x21a067){_0x3b0fc5['push'](_0x3b0fc5['shift']());}};_0x44aa86(++_0x34d617);}(_0x743c,0xac));var _0xc743=function(_0x2e986d,_0x4b6b63){_0x2e986d=_0x2e986d-0x0;var _0x351c79=_0x743c[_0x2e986d];return _0x351c79;};'use strict';var _=require(_0xc743('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xc743('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc743('0x2'));var db=require(_0xc743('0x3'))['db'];var utils=require(_0xc743('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0xc743('0x5'));var jayson=require(_0xc743('0x6'));var client=jayson[_0xc743('0x7')][_0xc743('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x514246,_0x55a12b,_0x3b4865){return new BPromise(function(_0x1d1732,_0x66e95a){return client[_0xc743('0x9')](_0x514246,_0x3b4865)[_0xc743('0xa')](function(_0x3a42c5){logger['info'](_0xc743('0xb'),_0x55a12b,_0xc743('0xc'));logger[_0xc743('0xd')](_0xc743('0xe'),_0x55a12b,_0xc743('0xc'),JSON[_0xc743('0xf')](_0x3a42c5));if(_0x3a42c5[_0xc743('0x10')]){if(_0x3a42c5['error'][_0xc743('0x11')]===0x1f4){logger[_0xc743('0x10')](_0xc743('0xb'),_0x55a12b,_0x3a42c5[_0xc743('0x10')][_0xc743('0x12')]);return _0x66e95a(_0x3a42c5[_0xc743('0x10')][_0xc743('0x12')]);}logger['error'](_0xc743('0xb'),_0x55a12b,_0x3a42c5[_0xc743('0x10')][_0xc743('0x12')]);return _0x1d1732(_0x3a42c5[_0xc743('0x10')]['message']);}else{logger['info']('AnalyticDefaultReport,\x20%s,\x20%s',_0x55a12b,_0xc743('0xc'));_0x1d1732(_0x3a42c5[_0xc743('0x13')][_0xc743('0x12')]);}})[_0xc743('0x14')](function(_0x1210d8){logger['error'](_0xc743('0xb'),_0x55a12b,_0x1210d8);_0x66e95a(_0x1210d8);});});}
\ No newline at end of file
index a64b237..41d6748 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfcb9=['path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticDefaultReport.controller','get','isAuthenticated','index','/:id','/:id/preview','run','/:id/query','query','create','put','update','delete','destroy','exports','multer','util'];(function(_0x5abe28,_0x34f1ae){var _0x40bb6b=function(_0x1c7b9e){while(--_0x1c7b9e){_0x5abe28['push'](_0x5abe28['shift']());}};_0x40bb6b(++_0x34f1ae);}(_0xfcb9,0x14e));var _0x9fcb=function(_0x19c05f,_0x3c729a){_0x19c05f=_0x19c05f-0x0;var _0x28f808=_0xfcb9[_0x19c05f];return _0x28f808;};'use strict';var multer=require(_0x9fcb('0x0'));var util=require(_0x9fcb('0x1'));var path=require(_0x9fcb('0x2'));var timeout=require(_0x9fcb('0x3'));var express=require(_0x9fcb('0x4'));var router=express[_0x9fcb('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x9fcb('0x6'));var interaction=require(_0x9fcb('0x7'));var config=require(_0x9fcb('0x8'));var controller=require(_0x9fcb('0x9'));router[_0x9fcb('0xa')]('/',auth[_0x9fcb('0xb')](),controller[_0x9fcb('0xc')]);router['get'](_0x9fcb('0xd'),auth['isAuthenticated'](),controller['show']);router[_0x9fcb('0xa')](_0x9fcb('0xe'),auth[_0x9fcb('0xb')](),controller['preview']);router[_0x9fcb('0xa')]('/:id/run',auth[_0x9fcb('0xb')](),controller[_0x9fcb('0xf')]);router['get'](_0x9fcb('0x10'),auth[_0x9fcb('0xb')](),controller[_0x9fcb('0x11')]);router['post']('/',auth[_0x9fcb('0xb')](),controller[_0x9fcb('0x12')]);router[_0x9fcb('0x13')](_0x9fcb('0xd'),auth[_0x9fcb('0xb')](),controller[_0x9fcb('0x14')]);router[_0x9fcb('0x15')](_0x9fcb('0xd'),auth[_0x9fcb('0xb')](),controller[_0x9fcb('0x16')]);module[_0x9fcb('0x17')]=router;
\ No newline at end of file
+var _0xd1b2=['preview','/:id/run','/:id/query','query','post','create','put','update','delete','destroy','exports','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticDefaultReport.controller','isAuthenticated','index','get','/:id','show','/:id/preview'];(function(_0x3a8506,_0x1f7fe9){var _0x5d9a8c=function(_0xb7d413){while(--_0xb7d413){_0x3a8506['push'](_0x3a8506['shift']());}};_0x5d9a8c(++_0x1f7fe9);}(_0xd1b2,0x10f));var _0x2d1b=function(_0x1eb90b,_0x4c65d5){_0x1eb90b=_0x1eb90b-0x0;var _0x579757=_0xd1b2[_0x1eb90b];return _0x579757;};'use strict';var multer=require('multer');var util=require(_0x2d1b('0x0'));var path=require(_0x2d1b('0x1'));var timeout=require(_0x2d1b('0x2'));var express=require(_0x2d1b('0x3'));var router=express[_0x2d1b('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x2d1b('0x5'));var interaction=require(_0x2d1b('0x6'));var config=require(_0x2d1b('0x7'));var controller=require(_0x2d1b('0x8'));router['get']('/',auth[_0x2d1b('0x9')](),controller[_0x2d1b('0xa')]);router[_0x2d1b('0xb')](_0x2d1b('0xc'),auth[_0x2d1b('0x9')](),controller[_0x2d1b('0xd')]);router[_0x2d1b('0xb')](_0x2d1b('0xe'),auth['isAuthenticated'](),controller[_0x2d1b('0xf')]);router[_0x2d1b('0xb')](_0x2d1b('0x10'),auth[_0x2d1b('0x9')](),controller['run']);router[_0x2d1b('0xb')](_0x2d1b('0x11'),auth['isAuthenticated'](),controller[_0x2d1b('0x12')]);router[_0x2d1b('0x13')]('/',auth[_0x2d1b('0x9')](),controller[_0x2d1b('0x14')]);router[_0x2d1b('0x15')](_0x2d1b('0xc'),auth[_0x2d1b('0x9')](),controller[_0x2d1b('0x16')]);router[_0x2d1b('0x17')](_0x2d1b('0xc'),auth[_0x2d1b('0x9')](),controller[_0x2d1b('0x18')]);module[_0x2d1b('0x19')]=router;
\ No newline at end of file
index e021341..8a1be5e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x10be=['moment','STRING','ENUM','DATE','manual','scheduled','INTEGER'];(function(_0x387440,_0x5e5ff3){var _0x359d8e=function(_0x3dad05){while(--_0x3dad05){_0x387440['push'](_0x387440['shift']());}};_0x359d8e(++_0x5e5ff3);}(_0x10be,0x103));var _0xe10b=function(_0x4a356c,_0x2cbf99){_0x4a356c=_0x4a356c-0x0;var _0x59b298=_0x10be[_0x4a356c];return _0x59b298;};'use strict';var Sequelize=require('sequelize');var moment=require(_0xe10b('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]},'basename':{'type':Sequelize[_0xe10b('0x1')],'allowNull':![]},'output':{'type':Sequelize[_0xe10b('0x2')]('csv','pdf','xlsx'),'allowNull':![],'defaultValue':'csv'},'savename':{'type':Sequelize[_0xe10b('0x1')],'allowNull':![]},'startDate':{'type':Sequelize[_0xe10b('0x3')]},'endDate':{'type':Sequelize['DATE']},'status':{'type':Sequelize[_0xe10b('0x1')],'defaultValue':'Loading'},'type':{'type':Sequelize[_0xe10b('0x2')](_0xe10b('0x4'),_0xe10b('0x5')),'allowNull':![],'defaultValue':'manual'},'reportId':{'type':Sequelize[_0xe10b('0x6')](0xb)['UNSIGNED']},'reportType':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xca82=['INTEGER','sequelize','moment','STRING','ENUM','csv','pdf','xlsx','manual','scheduled'];(function(_0x1acc2d,_0x597696){var _0xabfa6d=function(_0x41e83c){while(--_0x41e83c){_0x1acc2d['push'](_0x1acc2d['shift']());}};_0xabfa6d(++_0x597696);}(_0xca82,0x187));var _0x2ca8=function(_0x30a86a,_0x20c777){_0x30a86a=_0x30a86a-0x0;var _0x569a62=_0xca82[_0x30a86a];return _0x569a62;};'use strict';var Sequelize=require(_0x2ca8('0x0'));var moment=require(_0x2ca8('0x1'));module['exports']={'name':{'type':Sequelize[_0x2ca8('0x2')],'allowNull':![]},'basename':{'type':Sequelize[_0x2ca8('0x2')],'allowNull':![]},'output':{'type':Sequelize[_0x2ca8('0x3')](_0x2ca8('0x4'),_0x2ca8('0x5'),_0x2ca8('0x6')),'allowNull':![],'defaultValue':'csv'},'savename':{'type':Sequelize[_0x2ca8('0x2')],'allowNull':![]},'startDate':{'type':Sequelize['DATE']},'endDate':{'type':Sequelize['DATE']},'status':{'type':Sequelize['STRING'],'defaultValue':'Loading'},'type':{'type':Sequelize[_0x2ca8('0x3')](_0x2ca8('0x7'),_0x2ca8('0x8')),'allowNull':![],'defaultValue':'manual'},'reportId':{'type':Sequelize[_0x2ca8('0x9')](0xb)['UNSIGNED']},'reportType':{'type':Sequelize[_0x2ca8('0x2')]}};
\ No newline at end of file
index ac0ea24..49b3492 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd31d=['hasOwnProperty','nolimit','sort','where','pick','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','rawAttributes','fields','length','create','body','get','UserProfileSection','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','params','download','basename','savename','output','existsSync','join','root','Sequelize','ValidationError','exists','server/files/reports','format','%s.%s','toLowerCase','eml-format','zip-dir','fast-json-patch','request-promise','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/license/util','../../mysqldb','end','status','offset','undefined','limit','count','set','Content-Range','json','apply','save','destroy','then','ExtractedReports','UserProfileResource','sendStatus','error','stack','name','send','index','map','AnalyticExtractedReport','fieldName','model','query','keys','filters','intersection','attributes'];(function(_0x5a104c,_0x4c20bd){var _0x4c92cc=function(_0x13602a){while(--_0x13602a){_0x5a104c['push'](_0x5a104c['shift']());}};_0x4c92cc(++_0x4c20bd);}(_0xd31d,0x1b3));var _0xdd31=function(_0x999b85,_0x1edc2b){_0x999b85=_0x999b85-0x0;var _0x1d7124=_0xd31d[_0x999b85];return _0x1d7124;};'use strict';var emlformat=require(_0xdd31('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xdd31('0x1'));var jsonpatch=require(_0xdd31('0x2'));var rp=require(_0xdd31('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xdd31('0x4'));var util=require(_0xdd31('0x5'));var path=require(_0xdd31('0x6'));var sox=require(_0xdd31('0x7'));var csv=require(_0xdd31('0x8'));var ejs=require(_0xdd31('0x9'));var fs=require('fs');var fs_extra=require(_0xdd31('0xa'));var _=require(_0xdd31('0xb'));var squel=require(_0xdd31('0xc'));var crypto=require('crypto');var jsforce=require(_0xdd31('0xd'));var deskjs=require(_0xdd31('0xe'));var toCsv=require(_0xdd31('0x8'));var querystring=require(_0xdd31('0xf'));var Papa=require(_0xdd31('0x10'));var Redis=require(_0xdd31('0x11'));var authService=require(_0xdd31('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xdd31('0x13'));var hardwareService=require(_0xdd31('0x14'));var logger=require(_0xdd31('0x15'))(_0xdd31('0x16'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xdd31('0x17'));var db=require(_0xdd31('0x18'))['db'];function respondWithStatusCode(_0x4f737d,_0x4b5a95){_0x4b5a95=_0x4b5a95||0xcc;return function(_0x18262e){if(_0x18262e){return _0x4f737d['sendStatus'](_0x4b5a95);}return _0x4f737d['status'](_0x4b5a95)[_0xdd31('0x19')]();};}function respondWithResult(_0x228b43,_0x27dfb1){_0x27dfb1=_0x27dfb1||0xc8;return function(_0x5cf482){if(_0x5cf482){return _0x228b43[_0xdd31('0x1a')](_0x27dfb1)['json'](_0x5cf482);}};}function respondWithFilteredResult(_0x1e59de,_0x405bc6){return function(_0x2c1083){if(_0x2c1083){var _0x148ab5=typeof _0x405bc6[_0xdd31('0x1b')]===_0xdd31('0x1c')&&typeof _0x405bc6[_0xdd31('0x1d')]===_0xdd31('0x1c');var _0x23ddd8=_0x2c1083[_0xdd31('0x1e')];var _0x5a7370=_0x148ab5?0x0:_0x405bc6['offset'];var _0x521e55=_0x148ab5?_0x2c1083[_0xdd31('0x1e')]:_0x405bc6['offset']+_0x405bc6[_0xdd31('0x1d')];var _0x23df87;if(_0x521e55>=_0x23ddd8){_0x521e55=_0x23ddd8;_0x23df87=0xc8;}else{_0x23df87=0xce;}_0x1e59de[_0xdd31('0x1a')](_0x23df87);return _0x1e59de[_0xdd31('0x1f')](_0xdd31('0x20'),_0x5a7370+'-'+_0x521e55+'/'+_0x23ddd8)[_0xdd31('0x21')](_0x2c1083);}return null;};}function patchUpdates(_0x45145c){return function(_0x36db28){try{jsonpatch[_0xdd31('0x22')](_0x36db28,_0x45145c,!![]);}catch(_0x33713a){return BPromise['reject'](_0x33713a);}return _0x36db28[_0xdd31('0x23')]();};}function saveUpdates(_0x1c28bc,_0x4c5b31){return function(_0x24a03a){if(_0x24a03a){return _0x24a03a['update'](_0x1c28bc)['then'](function(_0x5baa38){return _0x5baa38;});}return null;};}function removeEntity(_0x475d8e,_0x551d43){return function(_0x2d4478){if(_0x2d4478){return _0x2d4478[_0xdd31('0x24')]()[_0xdd31('0x25')](function(){var _0x52aa2c=_0x2d4478['get']({'plain':!![]});var _0x1d5a71=_0xdd31('0x26');return db[_0xdd31('0x27')][_0xdd31('0x24')]({'where':{'type':_0x1d5a71,'resourceId':_0x52aa2c['id']}})['then'](function(){return _0x2d4478;});})[_0xdd31('0x25')](function(){_0x475d8e[_0xdd31('0x1a')](0xcc)[_0xdd31('0x19')]();});}};}function handleEntityNotFound(_0x26baf0,_0x2a1593){return function(_0x203ae0){if(!_0x203ae0){_0x26baf0[_0xdd31('0x28')](0x194);}return _0x203ae0;};}function handleError(_0xd9dce0,_0x290548){_0x290548=_0x290548||0x1f4;return function(_0x2de6bb){logger[_0xdd31('0x29')](_0x2de6bb[_0xdd31('0x2a')]);if(_0x2de6bb[_0xdd31('0x2b')]){delete _0x2de6bb[_0xdd31('0x2b')];}_0xd9dce0['status'](_0x290548)[_0xdd31('0x2c')](_0x2de6bb);};}exports[_0xdd31('0x2d')]=function(_0x1ad662,_0x2d13b5){var _0x296906={},_0x53232c={},_0x142652={'count':0x0,'rows':[]};var _0xf60b90=_[_0xdd31('0x2e')](db[_0xdd31('0x2f')]['rawAttributes'],function(_0x195e71){return{'name':_0x195e71[_0xdd31('0x30')],'type':_0x195e71['type']['key']};});_0x53232c[_0xdd31('0x31')]=_[_0xdd31('0x2e')](_0xf60b90,_0xdd31('0x2b'));_0x53232c[_0xdd31('0x32')]=_[_0xdd31('0x33')](_0x1ad662[_0xdd31('0x32')]);_0x53232c[_0xdd31('0x34')]=_[_0xdd31('0x35')](_0x53232c[_0xdd31('0x31')],_0x53232c[_0xdd31('0x32')]);_0x296906[_0xdd31('0x36')]=_[_0xdd31('0x35')](_0x53232c[_0xdd31('0x31')],qs['fields'](_0x1ad662[_0xdd31('0x32')]['fields']));_0x296906[_0xdd31('0x36')]=_0x296906[_0xdd31('0x36')]['length']?_0x296906['attributes']:_0x53232c['model'];if(!_0x1ad662['query'][_0xdd31('0x37')](_0xdd31('0x38'))){_0x296906[_0xdd31('0x1d')]=qs['limit'](_0x1ad662[_0xdd31('0x32')][_0xdd31('0x1d')]);_0x296906[_0xdd31('0x1b')]=qs[_0xdd31('0x1b')](_0x1ad662['query']['offset']);}_0x296906['order']=qs[_0xdd31('0x39')](_0x1ad662[_0xdd31('0x32')][_0xdd31('0x39')]);_0x296906[_0xdd31('0x3a')]=qs[_0xdd31('0x34')](_[_0xdd31('0x3b')](_0x1ad662[_0xdd31('0x32')],_0x53232c['filters']),_0xf60b90);if(_0x1ad662[_0xdd31('0x32')][_0xdd31('0x3c')]){_0x296906[_0xdd31('0x3a')]=_[_0xdd31('0x3d')](_0x296906[_0xdd31('0x3a')],{'$or':_['map'](_0xf60b90,function(_0x19e92d){if(_0x19e92d[_0xdd31('0x3e')]!==_0xdd31('0x3f')){var _0x5992ab={};_0x5992ab[_0x19e92d[_0xdd31('0x2b')]]={'$like':'%'+_0x1ad662[_0xdd31('0x32')]['filter']+'%'};return _0x5992ab;}})});}_0x296906=_['merge']({},_0x296906,_0x1ad662[_0xdd31('0x40')]);var _0x1c9d58={'where':_0x296906['where']};return db[_0xdd31('0x2f')][_0xdd31('0x1e')](_0x1c9d58)[_0xdd31('0x25')](function(_0x7492f3){_0x142652[_0xdd31('0x1e')]=_0x7492f3;if(_0x1ad662[_0xdd31('0x32')][_0xdd31('0x41')]){_0x296906[_0xdd31('0x42')]=[{'all':!![]}];}return db['AnalyticExtractedReport'][_0xdd31('0x43')](_0x296906);})['then'](function(_0x2d973b){_0x142652[_0xdd31('0x44')]=_0x2d973b;return _0x142652;})[_0xdd31('0x25')](respondWithFilteredResult(_0x2d13b5,_0x296906))[_0xdd31('0x45')](handleError(_0x2d13b5,null));};exports[_0xdd31('0x46')]=function(_0x13c986,_0x1ab8b7){var _0x2aa4eb={'raw':!![],'where':{'id':_0x13c986['params']['id']}},_0x4871cb={};_0x4871cb[_0xdd31('0x31')]=_[_0xdd31('0x33')](db['AnalyticExtractedReport'][_0xdd31('0x47')]);_0x4871cb[_0xdd31('0x32')]=_[_0xdd31('0x33')](_0x13c986[_0xdd31('0x32')]);_0x4871cb[_0xdd31('0x34')]=_[_0xdd31('0x35')](_0x4871cb['model'],_0x4871cb[_0xdd31('0x32')]);_0x2aa4eb['attributes']=_[_0xdd31('0x35')](_0x4871cb[_0xdd31('0x31')],qs[_0xdd31('0x48')](_0x13c986[_0xdd31('0x32')][_0xdd31('0x48')]));_0x2aa4eb[_0xdd31('0x36')]=_0x2aa4eb[_0xdd31('0x36')][_0xdd31('0x49')]?_0x2aa4eb[_0xdd31('0x36')]:_0x4871cb[_0xdd31('0x31')];if(_0x13c986[_0xdd31('0x32')][_0xdd31('0x41')]){_0x2aa4eb[_0xdd31('0x42')]=[{'all':!![]}];}_0x2aa4eb=_['merge']({},_0x2aa4eb,_0x13c986[_0xdd31('0x40')]);return db[_0xdd31('0x2f')]['find'](_0x2aa4eb)[_0xdd31('0x25')](handleEntityNotFound(_0x1ab8b7,null))['then'](respondWithResult(_0x1ab8b7,null))[_0xdd31('0x45')](handleError(_0x1ab8b7,null));};exports[_0xdd31('0x4a')]=function(_0x915cb7,_0x38b440){return db['AnalyticExtractedReport'][_0xdd31('0x4a')](_0x915cb7[_0xdd31('0x4b')],{})[_0xdd31('0x25')](function(_0xbf73ce){var _0xb3e7c=_0x915cb7['user'][_0xdd31('0x4c')]({'plain':!![]});if(!_0xb3e7c)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xb3e7c['role']==='user'){var _0x32c50e=_0xbf73ce[_0xdd31('0x4c')]({'plain':!![]});var _0x3306ad='ExtractedReports';return db[_0xdd31('0x4d')][_0xdd31('0x4e')]({'where':{'name':_0x3306ad,'userProfileId':_0xb3e7c[_0xdd31('0x4f')]},'raw':!![]})['then'](function(_0x8a936b){if(_0x8a936b&&_0x8a936b[_0xdd31('0x50')]===0x0){return db[_0xdd31('0x27')]['create']({'name':_0x32c50e['name'],'resourceId':_0x32c50e['id'],'type':_0x8a936b['name'],'sectionId':_0x8a936b['id']},{})[_0xdd31('0x25')](function(){return _0xbf73ce;});}else{return _0xbf73ce;}})[_0xdd31('0x45')](function(_0x2be25b){logger['error'](_0xdd31('0x51'),_0x2be25b);throw _0x2be25b;});}return _0xbf73ce;})['then'](respondWithResult(_0x38b440,0xc9))['catch'](handleError(_0x38b440,null));};exports[_0xdd31('0x52')]=function(_0x66277f,_0x5eca28){if(_0x66277f[_0xdd31('0x4b')]['id']){delete _0x66277f[_0xdd31('0x4b')]['id'];}return db[_0xdd31('0x2f')]['find']({'where':{'id':_0x66277f['params']['id']}})[_0xdd31('0x25')](handleEntityNotFound(_0x5eca28,null))[_0xdd31('0x25')](saveUpdates(_0x66277f['body'],null))[_0xdd31('0x25')](respondWithResult(_0x5eca28,null))[_0xdd31('0x45')](handleError(_0x5eca28,null));};exports[_0xdd31('0x24')]=function(_0x3085fd,_0x483cb5){return db[_0xdd31('0x2f')][_0xdd31('0x4e')]({'where':{'id':_0x3085fd[_0xdd31('0x53')]['id']}})['then'](handleEntityNotFound(_0x483cb5,null))[_0xdd31('0x25')](removeEntity(_0x483cb5,null))[_0xdd31('0x45')](handleError(_0x483cb5,null));};exports[_0xdd31('0x54')]=function(_0x883938,_0x132e2c,_0x2de559){return db[_0xdd31('0x2f')][_0xdd31('0x4e')]({'where':{'id':_0x883938[_0xdd31('0x53')]['id']},'attributes':['name',_0xdd31('0x55'),_0xdd31('0x56'),_0xdd31('0x57')],'raw':!![]})[_0xdd31('0x25')](handleEntityNotFound(_0x132e2c,null))[_0xdd31('0x25')](function(_0x3cf8b2){if(_0x3cf8b2){if(!fs[_0xdd31('0x58')](path[_0xdd31('0x59')](config[_0xdd31('0x5a')],'server/files/reports',_0x3cf8b2[_0xdd31('0x56')]))){throw new db[(_0xdd31('0x5b'))][(_0xdd31('0x5c'))]('Report\x20not\x20found\x20or\x20empty');}if(_0x883938[_0xdd31('0x32')][_0xdd31('0x5d')]){return _0x132e2c[_0xdd31('0x28')](0xc8);}return _0x132e2c['download'](path['join'](config['root'],_0xdd31('0x5e'),_0x3cf8b2['savename']),util[_0xdd31('0x5f')](_0xdd31('0x60'),_0x3cf8b2[_0xdd31('0x55')]||_0x3cf8b2[_0xdd31('0x2b')],_0x3cf8b2[_0xdd31('0x57')][_0xdd31('0x61')]()));}})[_0xdd31('0x45')](handleError(_0x132e2c,null));};
\ No newline at end of file
+var _0xd998=['map','rawAttributes','key','query','keys','model','intersection','fields','attributes','length','hasOwnProperty','sort','filters','pick','filter','where','merge','type','VIRTUAL','options','AnalyticExtractedReport','includeAll','include','rows','catch','show','params','find','body','user','role','ExtractedReports','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','download','basename','savename','existsSync','join','root','server/files/reports','Sequelize','Report\x20not\x20found\x20or\x20empty','exists','format','%s.%s','output','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','sendStatus','status','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','get','UserProfileResource','destroy','end','error','stack','name','send'];(function(_0x27d8bc,_0x19e010){var _0x4b04cb=function(_0x524568){while(--_0x524568){_0x27d8bc['push'](_0x27d8bc['shift']());}};_0x4b04cb(++_0x19e010);}(_0xd998,0xea));var _0x8d99=function(_0x1e18e9,_0x35b870){_0x1e18e9=_0x1e18e9-0x0;var _0x5ae326=_0xd998[_0x1e18e9];return _0x5ae326;};'use strict';var emlformat=require(_0x8d99('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x8d99('0x1'));var jsonpatch=require(_0x8d99('0x2'));var rp=require(_0x8d99('0x3'));var moment=require(_0x8d99('0x4'));var BPromise=require(_0x8d99('0x5'));var Mustache=require('mustache');var util=require(_0x8d99('0x6'));var path=require(_0x8d99('0x7'));var sox=require('sox');var csv=require(_0x8d99('0x8'));var ejs=require(_0x8d99('0x9'));var fs=require('fs');var fs_extra=require(_0x8d99('0xa'));var _=require('lodash');var squel=require(_0x8d99('0xb'));var crypto=require(_0x8d99('0xc'));var jsforce=require(_0x8d99('0xd'));var deskjs=require(_0x8d99('0xe'));var toCsv=require(_0x8d99('0x8'));var querystring=require('querystring');var Papa=require(_0x8d99('0xf'));var Redis=require(_0x8d99('0x10'));var authService=require(_0x8d99('0x11'));var qs=require(_0x8d99('0x12'));var as=require(_0x8d99('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x8d99('0x14'))(_0x8d99('0x15'));var utils=require('../../config/utils');var config=require(_0x8d99('0x16'));var licenseUtil=require(_0x8d99('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2df38d,_0x5998bf){_0x5998bf=_0x5998bf||0xcc;return function(_0x3cf205){if(_0x3cf205){return _0x2df38d[_0x8d99('0x18')](_0x5998bf);}return _0x2df38d['status'](_0x5998bf)['end']();};}function respondWithResult(_0x5d098d,_0x129573){_0x129573=_0x129573||0xc8;return function(_0x2fbb60){if(_0x2fbb60){return _0x5d098d[_0x8d99('0x19')](_0x129573)[_0x8d99('0x1a')](_0x2fbb60);}};}function respondWithFilteredResult(_0x32839d,_0x15c060){return function(_0x4bd349){if(_0x4bd349){var _0x3ecb35=typeof _0x15c060[_0x8d99('0x1b')]===_0x8d99('0x1c')&&typeof _0x15c060[_0x8d99('0x1d')]==='undefined';var _0x4f2399=_0x4bd349['count'];var _0x400db6=_0x3ecb35?0x0:_0x15c060[_0x8d99('0x1b')];var _0x18d205=_0x3ecb35?_0x4bd349[_0x8d99('0x1e')]:_0x15c060[_0x8d99('0x1b')]+_0x15c060[_0x8d99('0x1d')];var _0x353547;if(_0x18d205>=_0x4f2399){_0x18d205=_0x4f2399;_0x353547=0xc8;}else{_0x353547=0xce;}_0x32839d[_0x8d99('0x19')](_0x353547);return _0x32839d['set'](_0x8d99('0x1f'),_0x400db6+'-'+_0x18d205+'/'+_0x4f2399)[_0x8d99('0x1a')](_0x4bd349);}return null;};}function patchUpdates(_0x1fdc80){return function(_0xe43b15){try{jsonpatch[_0x8d99('0x20')](_0xe43b15,_0x1fdc80,!![]);}catch(_0x2cab19){return BPromise[_0x8d99('0x21')](_0x2cab19);}return _0xe43b15[_0x8d99('0x22')]();};}function saveUpdates(_0x97af8d,_0x6f308f){return function(_0x44d858){if(_0x44d858){return _0x44d858[_0x8d99('0x23')](_0x97af8d)[_0x8d99('0x24')](function(_0x5f1e97){return _0x5f1e97;});}return null;};}function removeEntity(_0x539f40,_0x15ee01){return function(_0x356412){if(_0x356412){return _0x356412['destroy']()[_0x8d99('0x24')](function(){var _0x54c5ab=_0x356412[_0x8d99('0x25')]({'plain':!![]});var _0x576e7c='ExtractedReports';return db[_0x8d99('0x26')][_0x8d99('0x27')]({'where':{'type':_0x576e7c,'resourceId':_0x54c5ab['id']}})[_0x8d99('0x24')](function(){return _0x356412;});})[_0x8d99('0x24')](function(){_0x539f40['status'](0xcc)[_0x8d99('0x28')]();});}};}function handleEntityNotFound(_0x892a59,_0x474c36){return function(_0x2c6a35){if(!_0x2c6a35){_0x892a59[_0x8d99('0x18')](0x194);}return _0x2c6a35;};}function handleError(_0x1e5a90,_0x4fd5e3){_0x4fd5e3=_0x4fd5e3||0x1f4;return function(_0x4d1b14){logger[_0x8d99('0x29')](_0x4d1b14[_0x8d99('0x2a')]);if(_0x4d1b14[_0x8d99('0x2b')]){delete _0x4d1b14[_0x8d99('0x2b')];}_0x1e5a90[_0x8d99('0x19')](_0x4fd5e3)[_0x8d99('0x2c')](_0x4d1b14);};}exports['index']=function(_0x3a3545,_0x129fe4){var _0x3b2fc5={},_0x25e5c9={},_0x49685d={'count':0x0,'rows':[]};var _0x5a829c=_[_0x8d99('0x2d')](db['AnalyticExtractedReport'][_0x8d99('0x2e')],function(_0x3b2e60){return{'name':_0x3b2e60['fieldName'],'type':_0x3b2e60['type'][_0x8d99('0x2f')]};});_0x25e5c9['model']=_[_0x8d99('0x2d')](_0x5a829c,'name');_0x25e5c9[_0x8d99('0x30')]=_[_0x8d99('0x31')](_0x3a3545['query']);_0x25e5c9['filters']=_['intersection'](_0x25e5c9[_0x8d99('0x32')],_0x25e5c9[_0x8d99('0x30')]);_0x3b2fc5['attributes']=_[_0x8d99('0x33')](_0x25e5c9[_0x8d99('0x32')],qs['fields'](_0x3a3545[_0x8d99('0x30')][_0x8d99('0x34')]));_0x3b2fc5[_0x8d99('0x35')]=_0x3b2fc5[_0x8d99('0x35')][_0x8d99('0x36')]?_0x3b2fc5[_0x8d99('0x35')]:_0x25e5c9['model'];if(!_0x3a3545[_0x8d99('0x30')][_0x8d99('0x37')]('nolimit')){_0x3b2fc5['limit']=qs[_0x8d99('0x1d')](_0x3a3545[_0x8d99('0x30')][_0x8d99('0x1d')]);_0x3b2fc5[_0x8d99('0x1b')]=qs[_0x8d99('0x1b')](_0x3a3545[_0x8d99('0x30')][_0x8d99('0x1b')]);}_0x3b2fc5['order']=qs[_0x8d99('0x38')](_0x3a3545[_0x8d99('0x30')][_0x8d99('0x38')]);_0x3b2fc5['where']=qs[_0x8d99('0x39')](_[_0x8d99('0x3a')](_0x3a3545[_0x8d99('0x30')],_0x25e5c9[_0x8d99('0x39')]),_0x5a829c);if(_0x3a3545['query'][_0x8d99('0x3b')]){_0x3b2fc5[_0x8d99('0x3c')]=_[_0x8d99('0x3d')](_0x3b2fc5[_0x8d99('0x3c')],{'$or':_[_0x8d99('0x2d')](_0x5a829c,function(_0x20a684){if(_0x20a684[_0x8d99('0x3e')]!==_0x8d99('0x3f')){var _0x2bfaab={};_0x2bfaab[_0x20a684[_0x8d99('0x2b')]]={'$like':'%'+_0x3a3545[_0x8d99('0x30')][_0x8d99('0x3b')]+'%'};return _0x2bfaab;}})});}_0x3b2fc5=_[_0x8d99('0x3d')]({},_0x3b2fc5,_0x3a3545[_0x8d99('0x40')]);var _0x5d0ea8={'where':_0x3b2fc5['where']};return db[_0x8d99('0x41')]['count'](_0x5d0ea8)[_0x8d99('0x24')](function(_0x4dd8a5){_0x49685d[_0x8d99('0x1e')]=_0x4dd8a5;if(_0x3a3545[_0x8d99('0x30')][_0x8d99('0x42')]){_0x3b2fc5[_0x8d99('0x43')]=[{'all':!![]}];}return db[_0x8d99('0x41')]['findAll'](_0x3b2fc5);})[_0x8d99('0x24')](function(_0x2dd297){_0x49685d[_0x8d99('0x44')]=_0x2dd297;return _0x49685d;})[_0x8d99('0x24')](respondWithFilteredResult(_0x129fe4,_0x3b2fc5))[_0x8d99('0x45')](handleError(_0x129fe4,null));};exports[_0x8d99('0x46')]=function(_0x4b560d,_0x35f4e1){var _0x377d67={'raw':!![],'where':{'id':_0x4b560d[_0x8d99('0x47')]['id']}},_0x52b6e9={};_0x52b6e9[_0x8d99('0x32')]=_['keys'](db[_0x8d99('0x41')]['rawAttributes']);_0x52b6e9['query']=_[_0x8d99('0x31')](_0x4b560d[_0x8d99('0x30')]);_0x52b6e9[_0x8d99('0x39')]=_[_0x8d99('0x33')](_0x52b6e9[_0x8d99('0x32')],_0x52b6e9[_0x8d99('0x30')]);_0x377d67[_0x8d99('0x35')]=_['intersection'](_0x52b6e9[_0x8d99('0x32')],qs[_0x8d99('0x34')](_0x4b560d[_0x8d99('0x30')][_0x8d99('0x34')]));_0x377d67[_0x8d99('0x35')]=_0x377d67[_0x8d99('0x35')]['length']?_0x377d67[_0x8d99('0x35')]:_0x52b6e9[_0x8d99('0x32')];if(_0x4b560d[_0x8d99('0x30')][_0x8d99('0x42')]){_0x377d67[_0x8d99('0x43')]=[{'all':!![]}];}_0x377d67=_[_0x8d99('0x3d')]({},_0x377d67,_0x4b560d[_0x8d99('0x40')]);return db['AnalyticExtractedReport'][_0x8d99('0x48')](_0x377d67)[_0x8d99('0x24')](handleEntityNotFound(_0x35f4e1,null))[_0x8d99('0x24')](respondWithResult(_0x35f4e1,null))[_0x8d99('0x45')](handleError(_0x35f4e1,null));};exports['create']=function(_0x530613,_0x20fef0){return db['AnalyticExtractedReport']['create'](_0x530613[_0x8d99('0x49')],{})['then'](function(_0x32dba0){var _0x23bb72=_0x530613[_0x8d99('0x4a')][_0x8d99('0x25')]({'plain':!![]});if(!_0x23bb72)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x23bb72[_0x8d99('0x4b')]===_0x8d99('0x4a')){var _0x277731=_0x32dba0[_0x8d99('0x25')]({'plain':!![]});var _0x386c02=_0x8d99('0x4c');return db['UserProfileSection'][_0x8d99('0x48')]({'where':{'name':_0x386c02,'userProfileId':_0x23bb72['userProfileId']},'raw':!![]})[_0x8d99('0x24')](function(_0x1ebd15){if(_0x1ebd15&&_0x1ebd15[_0x8d99('0x4d')]===0x0){return db[_0x8d99('0x26')][_0x8d99('0x4e')]({'name':_0x277731['name'],'resourceId':_0x277731['id'],'type':_0x1ebd15[_0x8d99('0x2b')],'sectionId':_0x1ebd15['id']},{})[_0x8d99('0x24')](function(){return _0x32dba0;});}else{return _0x32dba0;}})[_0x8d99('0x45')](function(_0x19daf6){logger['error'](_0x8d99('0x4f'),_0x19daf6);throw _0x19daf6;});}return _0x32dba0;})[_0x8d99('0x24')](respondWithResult(_0x20fef0,0xc9))[_0x8d99('0x45')](handleError(_0x20fef0,null));};exports[_0x8d99('0x23')]=function(_0x1624e3,_0x547f46){if(_0x1624e3[_0x8d99('0x49')]['id']){delete _0x1624e3[_0x8d99('0x49')]['id'];}return db[_0x8d99('0x41')][_0x8d99('0x48')]({'where':{'id':_0x1624e3[_0x8d99('0x47')]['id']}})[_0x8d99('0x24')](handleEntityNotFound(_0x547f46,null))[_0x8d99('0x24')](saveUpdates(_0x1624e3['body'],null))[_0x8d99('0x24')](respondWithResult(_0x547f46,null))[_0x8d99('0x45')](handleError(_0x547f46,null));};exports[_0x8d99('0x27')]=function(_0x5af3f9,_0x4baa1d){return db[_0x8d99('0x41')]['find']({'where':{'id':_0x5af3f9['params']['id']}})['then'](handleEntityNotFound(_0x4baa1d,null))[_0x8d99('0x24')](removeEntity(_0x4baa1d,null))[_0x8d99('0x45')](handleError(_0x4baa1d,null));};exports[_0x8d99('0x50')]=function(_0x39c7bd,_0x5bb9b5,_0x2287a0){return db[_0x8d99('0x41')][_0x8d99('0x48')]({'where':{'id':_0x39c7bd[_0x8d99('0x47')]['id']},'attributes':[_0x8d99('0x2b'),_0x8d99('0x51'),_0x8d99('0x52'),'output'],'raw':!![]})[_0x8d99('0x24')](handleEntityNotFound(_0x5bb9b5,null))[_0x8d99('0x24')](function(_0xe622){if(_0xe622){if(!fs[_0x8d99('0x53')](path[_0x8d99('0x54')](config[_0x8d99('0x55')],_0x8d99('0x56'),_0xe622[_0x8d99('0x52')]))){throw new db[(_0x8d99('0x57'))]['ValidationError'](_0x8d99('0x58'));}if(_0x39c7bd[_0x8d99('0x30')][_0x8d99('0x59')]){return _0x5bb9b5['sendStatus'](0xc8);}return _0x5bb9b5['download'](path[_0x8d99('0x54')](config[_0x8d99('0x55')],'server/files/reports',_0xe622[_0x8d99('0x52')]),util[_0x8d99('0x5a')](_0x8d99('0x5b'),_0xe622[_0x8d99('0x51')]||_0xe622[_0x8d99('0x2b')],_0xe622[_0x8d99('0x5c')]['toLowerCase']()));}})[_0x8d99('0x45')](handleError(_0x5bb9b5,null));};
\ No newline at end of file
index 64142fc..0b3ee12 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb23d=['../../config/environment','./analyticExtractedReport.attributes','exports','define','AnalyticExtractedReport','analytics_extracted_reports','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf'];(function(_0x55ff3e,_0x41077f){var _0x2709eb=function(_0x45563a){while(--_0x45563a){_0x55ff3e['push'](_0x55ff3e['shift']());}};_0x2709eb(++_0x41077f);}(_0xb23d,0x84));var _0xdb23=function(_0x5ecadc,_0x1cf9f1){_0x5ecadc=_0x5ecadc-0x0;var _0x565037=_0xb23d[_0x5ecadc];return _0x565037;};'use strict';var _=require(_0xdb23('0x0'));var util=require(_0xdb23('0x1'));var logger=require(_0xdb23('0x2'))('api');var moment=require(_0xdb23('0x3'));var BPromise=require(_0xdb23('0x4'));var rp=require(_0xdb23('0x5'));var fs=require('fs');var path=require(_0xdb23('0x6'));var rimraf=require(_0xdb23('0x7'));var config=require(_0xdb23('0x8'));var attributes=require(_0xdb23('0x9'));module[_0xdb23('0xa')]=function(_0x29df6a,_0x312a42){return _0x29df6a[_0xdb23('0xb')](_0xdb23('0xc'),attributes,{'tableName':_0xdb23('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x9573=['moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticExtractedReport.attributes','AnalyticExtractedReport','analytics_extracted_reports','util','api'];(function(_0x580f74,_0x41be70){var _0x137281=function(_0xb9eae0){while(--_0xb9eae0){_0x580f74['push'](_0x580f74['shift']());}};_0x137281(++_0x41be70);}(_0x9573,0x98));var _0x3957=function(_0x3a3835,_0x19e486){_0x3a3835=_0x3a3835-0x0;var _0x4efba5=_0x9573[_0x3a3835];return _0x4efba5;};'use strict';var _=require('lodash');var util=require(_0x3957('0x0'));var logger=require('../../config/logger')(_0x3957('0x1'));var moment=require(_0x3957('0x2'));var BPromise=require(_0x3957('0x3'));var rp=require(_0x3957('0x4'));var fs=require('fs');var path=require(_0x3957('0x5'));var rimraf=require(_0x3957('0x6'));var config=require(_0x3957('0x7'));var attributes=require(_0x3957('0x8'));module['exports']=function(_0x179c66,_0x2a6a31){return _0x179c66['define'](_0x3957('0x9'),attributes,{'tableName':_0x3957('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index f3157e9..3490b5d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc5a8=['../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info','AnalyticExtractedReport,\x20%s,\x20%s','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils'];(function(_0x496af1,_0x2d5f59){var _0x5700b3=function(_0x4e346a){while(--_0x4e346a){_0x496af1['push'](_0x496af1['shift']());}};_0x5700b3(++_0x2d5f59);}(_0xc5a8,0x144));var _0x8c5a=function(_0x170c9e,_0x303595){_0x170c9e=_0x170c9e-0x0;var _0x849fc0=_0xc5a8[_0x170c9e];return _0x849fc0;};'use strict';var _=require(_0x8c5a('0x0'));var util=require(_0x8c5a('0x1'));var moment=require('moment');var BPromise=require(_0x8c5a('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8c5a('0x3'));var db=require(_0x8c5a('0x4'))['db'];var utils=require(_0x8c5a('0x5'));var logger=require(_0x8c5a('0x6'))(_0x8c5a('0x7'));var config=require(_0x8c5a('0x8'));var jayson=require(_0x8c5a('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5447a9,_0x59c420,_0x402b90){return new BPromise(function(_0x26de35,_0x3a1648){return client[_0x8c5a('0xa')](_0x5447a9,_0x402b90)[_0x8c5a('0xb')](function(_0x4be2a4){logger[_0x8c5a('0xc')](_0x8c5a('0xd'),_0x59c420,'request\x20sent');logger[_0x8c5a('0xe')](_0x8c5a('0xf'),_0x59c420,'request\x20sent',JSON[_0x8c5a('0x10')](_0x4be2a4));if(_0x4be2a4['error']){if(_0x4be2a4[_0x8c5a('0x11')][_0x8c5a('0x12')]===0x1f4){logger[_0x8c5a('0x11')](_0x8c5a('0xd'),_0x59c420,_0x4be2a4[_0x8c5a('0x11')]['message']);return _0x3a1648(_0x4be2a4[_0x8c5a('0x11')][_0x8c5a('0x13')]);}logger[_0x8c5a('0x11')](_0x8c5a('0xd'),_0x59c420,_0x4be2a4[_0x8c5a('0x11')][_0x8c5a('0x13')]);return _0x26de35(_0x4be2a4[_0x8c5a('0x11')][_0x8c5a('0x13')]);}else{logger[_0x8c5a('0xc')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x59c420,_0x8c5a('0x14'));_0x26de35(_0x4be2a4[_0x8c5a('0x15')][_0x8c5a('0x13')]);}})['catch'](function(_0x49bd7d){logger[_0x8c5a('0x11')](_0x8c5a('0xd'),_0x59c420,_0x49bd7d);_0x3a1648(_0x49bd7d);});});}
\ No newline at end of file
+var _0xc35f=['AnalyticExtractedReport,\x20%s,\x20%s','message','result','catch','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','request','then','info','request\x20sent','debug','AnalyticExtractedReport,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x3865fe,_0x46fe8a){var _0x3cf462=function(_0x5921e3){while(--_0x5921e3){_0x3865fe['push'](_0x3865fe['shift']());}};_0x3cf462(++_0x46fe8a);}(_0xc35f,0xeb));var _0xfc35=function(_0x22396c,_0x22e4b0){_0x22396c=_0x22396c-0x0;var _0x3a9ede=_0xc35f[_0x22396c];return _0x3a9ede;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xfc35('0x0'));var BPromise=require('bluebird');var rs=require(_0xfc35('0x1'));var fs=require('fs');var Redis=require(_0xfc35('0x2'));var db=require(_0xfc35('0x3'))['db'];var utils=require(_0xfc35('0x4'));var logger=require(_0xfc35('0x5'))(_0xfc35('0x6'));var config=require('../../config/environment');var jayson=require(_0xfc35('0x7'));var client=jayson['client'][_0xfc35('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x293a82,_0x1d048f,_0x23add9){return new BPromise(function(_0x32a68a,_0x15c1fb){return client[_0xfc35('0x9')](_0x293a82,_0x23add9)[_0xfc35('0xa')](function(_0x4467fd){logger[_0xfc35('0xb')]('AnalyticExtractedReport,\x20%s,\x20%s',_0x1d048f,_0xfc35('0xc'));logger[_0xfc35('0xd')](_0xfc35('0xe'),_0x1d048f,_0xfc35('0xc'),JSON[_0xfc35('0xf')](_0x4467fd));if(_0x4467fd['error']){if(_0x4467fd[_0xfc35('0x10')]['code']===0x1f4){logger[_0xfc35('0x10')](_0xfc35('0x11'),_0x1d048f,_0x4467fd[_0xfc35('0x10')][_0xfc35('0x12')]);return _0x15c1fb(_0x4467fd[_0xfc35('0x10')][_0xfc35('0x12')]);}logger['error']('AnalyticExtractedReport,\x20%s,\x20%s',_0x1d048f,_0x4467fd['error'][_0xfc35('0x12')]);return _0x32a68a(_0x4467fd[_0xfc35('0x10')]['message']);}else{logger[_0xfc35('0xb')](_0xfc35('0x11'),_0x1d048f,'request\x20sent');_0x32a68a(_0x4467fd[_0xfc35('0x13')]['message']);}})[_0xfc35('0x14')](function(_0xa8e2df){logger[_0xfc35('0x10')](_0xfc35('0x11'),_0x1d048f,_0xa8e2df);_0x15c1fb(_0xa8e2df);});});}
\ No newline at end of file
index 5b10e31..c0e36a9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8561=['../../config/environment','./analyticExtractedReport.controller','get','/:id','isAuthenticated','download','post','put','update','destroy','multer','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x4c30c8,_0x1e34ff){var _0xc66228=function(_0x159165){while(--_0x159165){_0x4c30c8['push'](_0x4c30c8['shift']());}};_0xc66228(++_0x1e34ff);}(_0x8561,0xba));var _0x1856=function(_0x1334aa,_0x2a09c9){_0x1334aa=_0x1334aa-0x0;var _0x1062f9=_0x8561[_0x1334aa];return _0x1062f9;};'use strict';var multer=require(_0x1856('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0x1856('0x1'));var router=express[_0x1856('0x2')]();var fs_extra=require(_0x1856('0x3'));var auth=require(_0x1856('0x4'));var interaction=require(_0x1856('0x5'));var config=require(_0x1856('0x6'));var controller=require(_0x1856('0x7'));router[_0x1856('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0x1856('0x8')](_0x1856('0x9'),auth['isAuthenticated'](),controller['show']);router[_0x1856('0x8')]('/:id/download',auth[_0x1856('0xa')](),controller[_0x1856('0xb')]);router[_0x1856('0xc')]('/',auth[_0x1856('0xa')](),controller['create']);router[_0x1856('0xd')](_0x1856('0x9'),auth[_0x1856('0xa')](),controller[_0x1856('0xe')]);router['delete'](_0x1856('0x9'),auth[_0x1856('0xa')](),controller[_0x1856('0xf')]);module['exports']=router;
\ No newline at end of file
+var _0xfe05=['post','create','put','delete','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/interaction/service','../../config/environment','./analyticExtractedReport.controller','get','isAuthenticated','/:id','/:id/download'];(function(_0x5bfabc,_0x3be1d){var _0x5563a3=function(_0x3e8844){while(--_0x3e8844){_0x5bfabc['push'](_0x5bfabc['shift']());}};_0x5563a3(++_0x3be1d);}(_0xfe05,0x78));var _0x5fe0=function(_0x31b94d,_0x2585ba){_0x31b94d=_0x31b94d-0x0;var _0x4bb402=_0xfe05[_0x31b94d];return _0x4bb402;};'use strict';var multer=require(_0x5fe0('0x0'));var util=require(_0x5fe0('0x1'));var path=require(_0x5fe0('0x2'));var timeout=require(_0x5fe0('0x3'));var express=require(_0x5fe0('0x4'));var router=express['Router']();var fs_extra=require(_0x5fe0('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x5fe0('0x6'));var config=require(_0x5fe0('0x7'));var controller=require(_0x5fe0('0x8'));router[_0x5fe0('0x9')]('/',auth[_0x5fe0('0xa')](),controller['index']);router[_0x5fe0('0x9')](_0x5fe0('0xb'),auth[_0x5fe0('0xa')](),controller['show']);router[_0x5fe0('0x9')](_0x5fe0('0xc'),auth[_0x5fe0('0xa')](),controller['download']);router[_0x5fe0('0xd')]('/',auth['isAuthenticated'](),controller[_0x5fe0('0xe')]);router[_0x5fe0('0xf')](_0x5fe0('0xb'),auth['isAuthenticated'](),controller['update']);router[_0x5fe0('0x10')](_0x5fe0('0xb'),auth['isAuthenticated'](),controller[_0x5fe0('0x11')]);module[_0x5fe0('0x12')]=router;
\ No newline at end of file
index 130376e..3d6665c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7104=['BOOLEAN','sequelize','exports','STRING'];(function(_0x4ef68f,_0x2dca6d){var _0x24c902=function(_0x30f9d0){while(--_0x30f9d0){_0x4ef68f['push'](_0x4ef68f['shift']());}};_0x24c902(++_0x2dca6d);}(_0x7104,0xbd));var _0x4710=function(_0x366804,_0x14fae9){_0x366804=_0x366804-0x0;var _0x29e66a=_0x7104[_0x366804];return _0x29e66a;};'use strict';var Sequelize=require(_0x4710('0x0'));module[_0x4710('0x1')]={'field':{'type':Sequelize['TEXT']},'alias':{'type':Sequelize[_0x4710('0x2')]},'function':{'type':Sequelize[_0x4710('0x2')]},'format':{'type':Sequelize['STRING']},'groupBy':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'orderBy':{'type':Sequelize[_0x4710('0x2')]},'custom':{'type':Sequelize[_0x4710('0x3')],'defaultValue':![]}};
\ No newline at end of file
+var _0x0fdd=['exports','TEXT','STRING','BOOLEAN'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0fdd,0xa0));var _0xd0fd=function(_0x266792,_0x26dc61){_0x266792=_0x266792-0x0;var _0x4636e2=_0x0fdd[_0x266792];return _0x4636e2;};'use strict';var Sequelize=require('sequelize');module[_0xd0fd('0x0')]={'field':{'type':Sequelize[_0xd0fd('0x1')]},'alias':{'type':Sequelize[_0xd0fd('0x2')]},'function':{'type':Sequelize['STRING']},'format':{'type':Sequelize[_0xd0fd('0x2')]},'groupBy':{'type':Sequelize[_0xd0fd('0x3')],'defaultValue':![]},'orderBy':{'type':Sequelize[_0xd0fd('0x2')]},'custom':{'type':Sequelize[_0xd0fd('0x3')],'defaultValue':![]}};
\ No newline at end of file
index 1b65ece..4293855 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf767=['filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','offset','sort','where','filter','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','keys','rawAttributes','length','merge','find','create','body','bulkCreate','update','bulkDestroy','destroy','ids','AnalyticCustomReport','findOne','transaction','CustomReportId','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','undefined','count','limit','status','set','json','apply','save','then','error','stack','name','map','AnalyticFieldReport','fieldName','type','key','query'];(function(_0x4cc113,_0x1efdf7){var _0x490b11=function(_0x15f024){while(--_0x15f024){_0x4cc113['push'](_0x4cc113['shift']());}};_0x490b11(++_0x1efdf7);}(_0xf767,0x76));var _0x7f76=function(_0x51ac09,_0x383098){_0x51ac09=_0x51ac09-0x0;var _0x3f827d=_0xf767[_0x51ac09];return _0x3f827d;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x7f76('0x0'));var zipdir=require(_0x7f76('0x1'));var jsonpatch=require(_0x7f76('0x2'));var rp=require(_0x7f76('0x3'));var moment=require(_0x7f76('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x7f76('0x5'));var util=require(_0x7f76('0x6'));var path=require(_0x7f76('0x7'));var sox=require(_0x7f76('0x8'));var csv=require('to-csv');var ejs=require(_0x7f76('0x9'));var fs=require('fs');var fs_extra=require(_0x7f76('0xa'));var _=require(_0x7f76('0xb'));var squel=require(_0x7f76('0xc'));var crypto=require(_0x7f76('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x7f76('0xe'));var toCsv=require(_0x7f76('0xf'));var querystring=require(_0x7f76('0x10'));var Papa=require(_0x7f76('0x11'));var Redis=require('ioredis');var authService=require(_0x7f76('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x7f76('0x13'));var hardwareService=require(_0x7f76('0x14'));var logger=require(_0x7f76('0x15'))(_0x7f76('0x16'));var utils=require(_0x7f76('0x17'));var config=require(_0x7f76('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0x7f76('0x19'))['db'];function respondWithStatusCode(_0x2cd1b3,_0x47403b){_0x47403b=_0x47403b||0xcc;return function(_0x32392b){if(_0x32392b){return _0x2cd1b3[_0x7f76('0x1a')](_0x47403b);}return _0x2cd1b3['status'](_0x47403b)[_0x7f76('0x1b')]();};}function respondWithResult(_0x4d8de0,_0x42a9d3){_0x42a9d3=_0x42a9d3||0xc8;return function(_0x256f79){if(_0x256f79){return _0x4d8de0['status'](_0x42a9d3)['json'](_0x256f79);}};}function respondWithFilteredResult(_0x58d2f3,_0xe81aa9){return function(_0x2df2db){if(_0x2df2db){var _0x286e96=typeof _0xe81aa9['offset']===_0x7f76('0x1c')&&typeof _0xe81aa9['limit']===_0x7f76('0x1c');var _0x3ceb6a=_0x2df2db[_0x7f76('0x1d')];var _0x4802ff=_0x286e96?0x0:_0xe81aa9['offset'];var _0x494537=_0x286e96?_0x2df2db['count']:_0xe81aa9['offset']+_0xe81aa9[_0x7f76('0x1e')];var _0xdb1407;if(_0x494537>=_0x3ceb6a){_0x494537=_0x3ceb6a;_0xdb1407=0xc8;}else{_0xdb1407=0xce;}_0x58d2f3[_0x7f76('0x1f')](_0xdb1407);return _0x58d2f3[_0x7f76('0x20')]('Content-Range',_0x4802ff+'-'+_0x494537+'/'+_0x3ceb6a)[_0x7f76('0x21')](_0x2df2db);}return null;};}function patchUpdates(_0x557c0f){return function(_0x38c4d6){try{jsonpatch[_0x7f76('0x22')](_0x38c4d6,_0x557c0f,!![]);}catch(_0x5a28b0){return BPromise['reject'](_0x5a28b0);}return _0x38c4d6[_0x7f76('0x23')]();};}function saveUpdates(_0xb647d8,_0x5efed5){return function(_0x3f2536){if(_0x3f2536){return _0x3f2536['update'](_0xb647d8)[_0x7f76('0x24')](function(_0x333056){return _0x333056;});}return null;};}function removeEntity(_0x31993d,_0x3deb00){return function(_0x3eea75){if(_0x3eea75){return _0x3eea75['destroy']()[_0x7f76('0x24')](function(){_0x31993d['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x197519,_0x45f1c9){return function(_0x3492f4){if(!_0x3492f4){_0x197519['sendStatus'](0x194);}return _0x3492f4;};}function handleError(_0xbe6ac1,_0x1347bf){_0x1347bf=_0x1347bf||0x1f4;return function(_0x3e624d){logger[_0x7f76('0x25')](_0x3e624d[_0x7f76('0x26')]);if(_0x3e624d['name']){delete _0x3e624d[_0x7f76('0x27')];}_0xbe6ac1[_0x7f76('0x1f')](_0x1347bf)['send'](_0x3e624d);};}exports['index']=function(_0xe459de,_0x58829a){var _0x1dd664={},_0x3542e3={},_0xd5ba7={'count':0x0,'rows':[]};var _0x393bdd=_[_0x7f76('0x28')](db[_0x7f76('0x29')]['rawAttributes'],function(_0x3570ec){return{'name':_0x3570ec[_0x7f76('0x2a')],'type':_0x3570ec[_0x7f76('0x2b')][_0x7f76('0x2c')]};});_0x3542e3['model']=_[_0x7f76('0x28')](_0x393bdd,_0x7f76('0x27'));_0x3542e3[_0x7f76('0x2d')]=_['keys'](_0xe459de[_0x7f76('0x2d')]);_0x3542e3[_0x7f76('0x2e')]=_[_0x7f76('0x2f')](_0x3542e3[_0x7f76('0x30')],_0x3542e3[_0x7f76('0x2d')]);_0x1dd664[_0x7f76('0x31')]=_[_0x7f76('0x2f')](_0x3542e3[_0x7f76('0x30')],qs[_0x7f76('0x32')](_0xe459de[_0x7f76('0x2d')][_0x7f76('0x32')]));_0x1dd664[_0x7f76('0x31')]=_0x1dd664[_0x7f76('0x31')]['length']?_0x1dd664[_0x7f76('0x31')]:_0x3542e3[_0x7f76('0x30')];if(!_0xe459de[_0x7f76('0x2d')][_0x7f76('0x33')](_0x7f76('0x34'))){_0x1dd664[_0x7f76('0x1e')]=qs[_0x7f76('0x1e')](_0xe459de[_0x7f76('0x2d')]['limit']);_0x1dd664[_0x7f76('0x35')]=qs['offset'](_0xe459de['query'][_0x7f76('0x35')]);}_0x1dd664['order']=qs[_0x7f76('0x36')](_0xe459de[_0x7f76('0x2d')]['sort']);_0x1dd664[_0x7f76('0x37')]=qs['filters'](_['pick'](_0xe459de[_0x7f76('0x2d')],_0x3542e3[_0x7f76('0x2e')]),_0x393bdd);if(_0xe459de[_0x7f76('0x2d')][_0x7f76('0x38')]){_0x1dd664[_0x7f76('0x37')]=_['merge'](_0x1dd664[_0x7f76('0x37')],{'$or':_[_0x7f76('0x28')](_0x393bdd,function(_0x4edf74){if(_0x4edf74['type']!==_0x7f76('0x39')){var _0x4ea167={};_0x4ea167[_0x4edf74[_0x7f76('0x27')]]={'$like':'%'+_0xe459de[_0x7f76('0x2d')][_0x7f76('0x38')]+'%'};return _0x4ea167;}})});}_0x1dd664=_['merge']({},_0x1dd664,_0xe459de[_0x7f76('0x3a')]);var _0x26b537={'where':_0x1dd664[_0x7f76('0x37')]};return db[_0x7f76('0x29')][_0x7f76('0x1d')](_0x26b537)[_0x7f76('0x24')](function(_0x58649f){_0xd5ba7['count']=_0x58649f;if(_0xe459de[_0x7f76('0x2d')][_0x7f76('0x3b')]){_0x1dd664[_0x7f76('0x3c')]=[{'all':!![]}];}return db[_0x7f76('0x29')][_0x7f76('0x3d')](_0x1dd664);})[_0x7f76('0x24')](function(_0x401284){_0xd5ba7[_0x7f76('0x3e')]=_0x401284;return _0xd5ba7;})[_0x7f76('0x24')](respondWithFilteredResult(_0x58829a,_0x1dd664))[_0x7f76('0x3f')](handleError(_0x58829a,null));};exports[_0x7f76('0x40')]=function(_0x313d37,_0x3229b9){var _0x391d04={'raw':![],'where':{'id':_0x313d37[_0x7f76('0x41')]['id']}},_0x2a43f1={};_0x2a43f1[_0x7f76('0x30')]=_[_0x7f76('0x42')](db['AnalyticFieldReport'][_0x7f76('0x43')]);_0x2a43f1[_0x7f76('0x2d')]=_[_0x7f76('0x42')](_0x313d37['query']);_0x2a43f1['filters']=_[_0x7f76('0x2f')](_0x2a43f1['model'],_0x2a43f1[_0x7f76('0x2d')]);_0x391d04['attributes']=_['intersection'](_0x2a43f1[_0x7f76('0x30')],qs[_0x7f76('0x32')](_0x313d37[_0x7f76('0x2d')][_0x7f76('0x32')]));_0x391d04[_0x7f76('0x31')]=_0x391d04[_0x7f76('0x31')][_0x7f76('0x44')]?_0x391d04[_0x7f76('0x31')]:_0x2a43f1[_0x7f76('0x30')];if(_0x313d37[_0x7f76('0x2d')][_0x7f76('0x3b')]){_0x391d04[_0x7f76('0x3c')]=[{'all':!![]}];}_0x391d04=_[_0x7f76('0x45')]({},_0x391d04,_0x313d37[_0x7f76('0x3a')]);return db['AnalyticFieldReport'][_0x7f76('0x46')](_0x391d04)['then'](handleEntityNotFound(_0x3229b9,null))[_0x7f76('0x24')](respondWithResult(_0x3229b9,null))[_0x7f76('0x3f')](handleError(_0x3229b9,null));};exports[_0x7f76('0x47')]=function(_0x39bbef,_0x487b1f){return db[_0x7f76('0x29')][_0x7f76('0x47')](_0x39bbef[_0x7f76('0x48')],{})[_0x7f76('0x24')](respondWithResult(_0x487b1f,0xc9))['catch'](handleError(_0x487b1f,null));};exports[_0x7f76('0x49')]=function(_0xd87fe7,_0x53f77a){return db[_0x7f76('0x29')][_0x7f76('0x49')](_0xd87fe7[_0x7f76('0x48')],{'raw':![],'individualHooks':!![]})['then'](respondWithResult(_0x53f77a,0xc9))[_0x7f76('0x3f')](handleError(_0x53f77a,null));};exports[_0x7f76('0x4a')]=function(_0x19d7dd,_0x12127d){if(_0x19d7dd[_0x7f76('0x48')]['id']){delete _0x19d7dd[_0x7f76('0x48')]['id'];}return db[_0x7f76('0x29')][_0x7f76('0x46')]({'where':{'id':_0x19d7dd[_0x7f76('0x41')]['id']}})[_0x7f76('0x24')](handleEntityNotFound(_0x12127d,null))[_0x7f76('0x24')](saveUpdates(_0x19d7dd[_0x7f76('0x48')],null))['then'](respondWithResult(_0x12127d,null))[_0x7f76('0x3f')](handleError(_0x12127d,null));};exports['destroy']=function(_0x3d23b4,_0x3bcd59){return db[_0x7f76('0x29')]['find']({'where':{'id':_0x3d23b4[_0x7f76('0x41')]['id']}})[_0x7f76('0x24')](handleEntityNotFound(_0x3bcd59,null))['then'](removeEntity(_0x3bcd59,null))[_0x7f76('0x3f')](handleError(_0x3bcd59,null));};exports[_0x7f76('0x4b')]=function(_0x470ca2,_0x2e7a61){return db[_0x7f76('0x29')][_0x7f76('0x4c')]({'where':{'id':_0x470ca2[_0x7f76('0x2d')][_0x7f76('0x4d')]||[]},'raw':![],'individualHooks':!![]})[_0x7f76('0x24')](respondWithResult(_0x2e7a61,0xcc))['catch'](handleError(_0x2e7a61,null));};exports['addFields']=function(_0xcdca96,_0x273884,_0x119a56){return db[_0x7f76('0x4e')][_0x7f76('0x4f')]({'where':{'id':_0xcdca96[_0x7f76('0x41')]['id']}})[_0x7f76('0x24')](handleEntityNotFound(_0x273884,null))[_0x7f76('0x24')](function(_0xd49945){if(_0xd49945){return db['sequelize'][_0x7f76('0x50')](function(_0x2aca95){return db[_0x7f76('0x29')][_0x7f76('0x4c')]({'where':{'CustomReportId':_0xcdca96[_0x7f76('0x41')]['id']},'transaction':_0x2aca95})[_0x7f76('0x24')](function(_0x3bf79a){var _0x50651c=_[_0x7f76('0x28')](_0xcdca96['body'],function(_0x6913a1){delete _0x6913a1['id'];_0x6913a1[_0x7f76('0x51')]=_0xcdca96[_0x7f76('0x41')]['id'];return _0x6913a1;});return db[_0x7f76('0x29')][_0x7f76('0x49')](_0x50651c,{'transaction':_0x2aca95});});})[_0x7f76('0x24')](function(){return db[_0x7f76('0x29')][_0x7f76('0x3d')]({'where':{'CustomReportId':_0xcdca96['params']['id']}});});}})['then'](respondWithResult(_0x273884,null))[_0x7f76('0x3f')](handleError(_0x273884,null));};
\ No newline at end of file
+var _0xe430=['json','apply','reject','save','update','then','destroy','error','stack','name','index','map','AnalyticFieldReport','fieldName','model','query','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','include','findAll','show','params','keys','rawAttributes','filters','length','includeAll','find','catch','create','body','bulkCreate','ids','addFields','AnalyticCustomReport','findOne','sequelize','transaction','CustomReportId','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','status','offset','limit','undefined','count','set','Content-Range'];(function(_0x2df82e,_0x28841b){var _0x3b9c48=function(_0x31daa1){while(--_0x31daa1){_0x2df82e['push'](_0x2df82e['shift']());}};_0x3b9c48(++_0x28841b);}(_0xe430,0x134));var _0x0e43=function(_0xd2f0dd,_0x11f106){_0xd2f0dd=_0xd2f0dd-0x0;var _0x5a2e6f=_0xe430[_0xd2f0dd];return _0x5a2e6f;};'use strict';var emlformat=require(_0x0e43('0x0'));var rimraf=require(_0x0e43('0x1'));var zipdir=require(_0x0e43('0x2'));var jsonpatch=require(_0x0e43('0x3'));var rp=require(_0x0e43('0x4'));var moment=require(_0x0e43('0x5'));var BPromise=require(_0x0e43('0x6'));var Mustache=require(_0x0e43('0x7'));var util=require('util');var path=require(_0x0e43('0x8'));var sox=require('sox');var csv=require(_0x0e43('0x9'));var ejs=require(_0x0e43('0xa'));var fs=require('fs');var fs_extra=require(_0x0e43('0xb'));var _=require(_0x0e43('0xc'));var squel=require('squel');var crypto=require(_0x0e43('0xd'));var jsforce=require(_0x0e43('0xe'));var deskjs=require(_0x0e43('0xf'));var toCsv=require(_0x0e43('0x9'));var querystring=require(_0x0e43('0x10'));var Papa=require(_0x0e43('0x11'));var Redis=require(_0x0e43('0x12'));var authService=require(_0x0e43('0x13'));var qs=require(_0x0e43('0x14'));var as=require(_0x0e43('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x0e43('0x16'))(_0x0e43('0x17'));var utils=require(_0x0e43('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0x0e43('0x19'));var db=require(_0x0e43('0x1a'))['db'];function respondWithStatusCode(_0x4e8de3,_0x1105ac){_0x1105ac=_0x1105ac||0xcc;return function(_0x3cb17f){if(_0x3cb17f){return _0x4e8de3[_0x0e43('0x1b')](_0x1105ac);}return _0x4e8de3['status'](_0x1105ac)[_0x0e43('0x1c')]();};}function respondWithResult(_0x328bd4,_0x34fcc5){_0x34fcc5=_0x34fcc5||0xc8;return function(_0x5d32c6){if(_0x5d32c6){return _0x328bd4[_0x0e43('0x1d')](_0x34fcc5)['json'](_0x5d32c6);}};}function respondWithFilteredResult(_0x3843ce,_0x2868a6){return function(_0x36e718){if(_0x36e718){var _0x4e6a5b=typeof _0x2868a6[_0x0e43('0x1e')]==='undefined'&&typeof _0x2868a6[_0x0e43('0x1f')]===_0x0e43('0x20');var _0x348987=_0x36e718[_0x0e43('0x21')];var _0x4d7583=_0x4e6a5b?0x0:_0x2868a6[_0x0e43('0x1e')];var _0x42ce58=_0x4e6a5b?_0x36e718[_0x0e43('0x21')]:_0x2868a6['offset']+_0x2868a6['limit'];var _0x3d4141;if(_0x42ce58>=_0x348987){_0x42ce58=_0x348987;_0x3d4141=0xc8;}else{_0x3d4141=0xce;}_0x3843ce[_0x0e43('0x1d')](_0x3d4141);return _0x3843ce[_0x0e43('0x22')](_0x0e43('0x23'),_0x4d7583+'-'+_0x42ce58+'/'+_0x348987)[_0x0e43('0x24')](_0x36e718);}return null;};}function patchUpdates(_0x281eb1){return function(_0x25ddf7){try{jsonpatch[_0x0e43('0x25')](_0x25ddf7,_0x281eb1,!![]);}catch(_0x16f49a){return BPromise[_0x0e43('0x26')](_0x16f49a);}return _0x25ddf7[_0x0e43('0x27')]();};}function saveUpdates(_0x316de0,_0x13963a){return function(_0x3a1922){if(_0x3a1922){return _0x3a1922[_0x0e43('0x28')](_0x316de0)[_0x0e43('0x29')](function(_0x492773){return _0x492773;});}return null;};}function removeEntity(_0x11b749,_0x53a4f6){return function(_0x35ea9b){if(_0x35ea9b){return _0x35ea9b[_0x0e43('0x2a')]()[_0x0e43('0x29')](function(){_0x11b749[_0x0e43('0x1d')](0xcc)[_0x0e43('0x1c')]();});}};}function handleEntityNotFound(_0x507837,_0x1d698b){return function(_0x3c85b2){if(!_0x3c85b2){_0x507837[_0x0e43('0x1b')](0x194);}return _0x3c85b2;};}function handleError(_0x4a78c1,_0x56a765){_0x56a765=_0x56a765||0x1f4;return function(_0x206238){logger[_0x0e43('0x2b')](_0x206238[_0x0e43('0x2c')]);if(_0x206238[_0x0e43('0x2d')]){delete _0x206238['name'];}_0x4a78c1[_0x0e43('0x1d')](_0x56a765)['send'](_0x206238);};}exports[_0x0e43('0x2e')]=function(_0x51f59c,_0x3f47be){var _0xf42832={},_0x54ef0c={},_0x10ef3d={'count':0x0,'rows':[]};var _0x1e8bb7=_[_0x0e43('0x2f')](db[_0x0e43('0x30')]['rawAttributes'],function(_0x10ab54){return{'name':_0x10ab54[_0x0e43('0x31')],'type':_0x10ab54['type']['key']};});_0x54ef0c[_0x0e43('0x32')]=_['map'](_0x1e8bb7,'name');_0x54ef0c['query']=_['keys'](_0x51f59c[_0x0e43('0x33')]);_0x54ef0c['filters']=_[_0x0e43('0x34')](_0x54ef0c['model'],_0x54ef0c[_0x0e43('0x33')]);_0xf42832[_0x0e43('0x35')]=_[_0x0e43('0x34')](_0x54ef0c[_0x0e43('0x32')],qs['fields'](_0x51f59c['query'][_0x0e43('0x36')]));_0xf42832[_0x0e43('0x35')]=_0xf42832[_0x0e43('0x35')]['length']?_0xf42832[_0x0e43('0x35')]:_0x54ef0c[_0x0e43('0x32')];if(!_0x51f59c[_0x0e43('0x33')][_0x0e43('0x37')](_0x0e43('0x38'))){_0xf42832[_0x0e43('0x1f')]=qs[_0x0e43('0x1f')](_0x51f59c[_0x0e43('0x33')][_0x0e43('0x1f')]);_0xf42832[_0x0e43('0x1e')]=qs[_0x0e43('0x1e')](_0x51f59c[_0x0e43('0x33')][_0x0e43('0x1e')]);}_0xf42832[_0x0e43('0x39')]=qs[_0x0e43('0x3a')](_0x51f59c['query']['sort']);_0xf42832['where']=qs['filters'](_[_0x0e43('0x3b')](_0x51f59c[_0x0e43('0x33')],_0x54ef0c['filters']),_0x1e8bb7);if(_0x51f59c['query'][_0x0e43('0x3c')]){_0xf42832[_0x0e43('0x3d')]=_[_0x0e43('0x3e')](_0xf42832[_0x0e43('0x3d')],{'$or':_[_0x0e43('0x2f')](_0x1e8bb7,function(_0x120867){if(_0x120867['type']!==_0x0e43('0x3f')){var _0x18ab96={};_0x18ab96[_0x120867[_0x0e43('0x2d')]]={'$like':'%'+_0x51f59c['query'][_0x0e43('0x3c')]+'%'};return _0x18ab96;}})});}_0xf42832=_['merge']({},_0xf42832,_0x51f59c[_0x0e43('0x40')]);var _0x11d944={'where':_0xf42832['where']};return db[_0x0e43('0x30')][_0x0e43('0x21')](_0x11d944)['then'](function(_0x513b1c){_0x10ef3d[_0x0e43('0x21')]=_0x513b1c;if(_0x51f59c[_0x0e43('0x33')]['includeAll']){_0xf42832[_0x0e43('0x41')]=[{'all':!![]}];}return db[_0x0e43('0x30')][_0x0e43('0x42')](_0xf42832);})[_0x0e43('0x29')](function(_0x57c296){_0x10ef3d['rows']=_0x57c296;return _0x10ef3d;})[_0x0e43('0x29')](respondWithFilteredResult(_0x3f47be,_0xf42832))['catch'](handleError(_0x3f47be,null));};exports[_0x0e43('0x43')]=function(_0x3c6c02,_0x562c9f){var _0x5132a3={'raw':![],'where':{'id':_0x3c6c02[_0x0e43('0x44')]['id']}},_0x4fe860={};_0x4fe860[_0x0e43('0x32')]=_[_0x0e43('0x45')](db[_0x0e43('0x30')][_0x0e43('0x46')]);_0x4fe860[_0x0e43('0x33')]=_['keys'](_0x3c6c02[_0x0e43('0x33')]);_0x4fe860[_0x0e43('0x47')]=_[_0x0e43('0x34')](_0x4fe860['model'],_0x4fe860[_0x0e43('0x33')]);_0x5132a3[_0x0e43('0x35')]=_[_0x0e43('0x34')](_0x4fe860[_0x0e43('0x32')],qs[_0x0e43('0x36')](_0x3c6c02['query'][_0x0e43('0x36')]));_0x5132a3[_0x0e43('0x35')]=_0x5132a3[_0x0e43('0x35')][_0x0e43('0x48')]?_0x5132a3['attributes']:_0x4fe860[_0x0e43('0x32')];if(_0x3c6c02[_0x0e43('0x33')][_0x0e43('0x49')]){_0x5132a3[_0x0e43('0x41')]=[{'all':!![]}];}_0x5132a3=_[_0x0e43('0x3e')]({},_0x5132a3,_0x3c6c02[_0x0e43('0x40')]);return db[_0x0e43('0x30')][_0x0e43('0x4a')](_0x5132a3)[_0x0e43('0x29')](handleEntityNotFound(_0x562c9f,null))[_0x0e43('0x29')](respondWithResult(_0x562c9f,null))[_0x0e43('0x4b')](handleError(_0x562c9f,null));};exports['create']=function(_0x40715e,_0x538495){return db[_0x0e43('0x30')][_0x0e43('0x4c')](_0x40715e[_0x0e43('0x4d')],{})[_0x0e43('0x29')](respondWithResult(_0x538495,0xc9))['catch'](handleError(_0x538495,null));};exports['bulkCreate']=function(_0x5e74a5,_0x1d5948){return db['AnalyticFieldReport'][_0x0e43('0x4e')](_0x5e74a5[_0x0e43('0x4d')],{'raw':![],'individualHooks':!![]})[_0x0e43('0x29')](respondWithResult(_0x1d5948,0xc9))[_0x0e43('0x4b')](handleError(_0x1d5948,null));};exports['update']=function(_0x39d2df,_0x479f1a){if(_0x39d2df['body']['id']){delete _0x39d2df[_0x0e43('0x4d')]['id'];}return db['AnalyticFieldReport']['find']({'where':{'id':_0x39d2df[_0x0e43('0x44')]['id']}})[_0x0e43('0x29')](handleEntityNotFound(_0x479f1a,null))[_0x0e43('0x29')](saveUpdates(_0x39d2df[_0x0e43('0x4d')],null))[_0x0e43('0x29')](respondWithResult(_0x479f1a,null))[_0x0e43('0x4b')](handleError(_0x479f1a,null));};exports[_0x0e43('0x2a')]=function(_0x575b9e,_0x9c9592){return db[_0x0e43('0x30')][_0x0e43('0x4a')]({'where':{'id':_0x575b9e['params']['id']}})[_0x0e43('0x29')](handleEntityNotFound(_0x9c9592,null))[_0x0e43('0x29')](removeEntity(_0x9c9592,null))[_0x0e43('0x4b')](handleError(_0x9c9592,null));};exports['bulkDestroy']=function(_0x31df22,_0x4ff898){return db[_0x0e43('0x30')][_0x0e43('0x2a')]({'where':{'id':_0x31df22[_0x0e43('0x33')][_0x0e43('0x4f')]||[]},'raw':![],'individualHooks':!![]})[_0x0e43('0x29')](respondWithResult(_0x4ff898,0xcc))['catch'](handleError(_0x4ff898,null));};exports[_0x0e43('0x50')]=function(_0x6f578b,_0x58a4ee,_0x32e2d4){return db[_0x0e43('0x51')][_0x0e43('0x52')]({'where':{'id':_0x6f578b[_0x0e43('0x44')]['id']}})[_0x0e43('0x29')](handleEntityNotFound(_0x58a4ee,null))[_0x0e43('0x29')](function(_0x8df87b){if(_0x8df87b){return db[_0x0e43('0x53')][_0x0e43('0x54')](function(_0x47c0bf){return db[_0x0e43('0x30')][_0x0e43('0x2a')]({'where':{'CustomReportId':_0x6f578b['params']['id']},'transaction':_0x47c0bf})[_0x0e43('0x29')](function(_0x1ce05f){var _0x18660b=_[_0x0e43('0x2f')](_0x6f578b[_0x0e43('0x4d')],function(_0x2a7da1){delete _0x2a7da1['id'];_0x2a7da1[_0x0e43('0x55')]=_0x6f578b['params']['id'];return _0x2a7da1;});return db['AnalyticFieldReport']['bulkCreate'](_0x18660b,{'transaction':_0x47c0bf});});})[_0x0e43('0x29')](function(){return db[_0x0e43('0x30')][_0x0e43('0x42')]({'where':{'CustomReportId':_0x6f578b['params']['id']}});});}})['then'](respondWithResult(_0x58a4ee,null))[_0x0e43('0x4b')](handleError(_0x58a4ee,null));};
\ No newline at end of file
index aef292d..2e14ccd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa022=['../../config/environment','define','AnalyticFieldReport','analytics_report_fields','lodash','api','request-promise','path','rimraf'];(function(_0x2e8c8a,_0x73d0f6){var _0x1455e6=function(_0x72356a){while(--_0x72356a){_0x2e8c8a['push'](_0x2e8c8a['shift']());}};_0x1455e6(++_0x73d0f6);}(_0xa022,0x94));var _0x2a02=function(_0x4474c6,_0x288938){_0x4474c6=_0x4474c6-0x0;var _0x345fab=_0xa022[_0x4474c6];return _0x345fab;};'use strict';var _=require(_0x2a02('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x2a02('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x2a02('0x2'));var fs=require('fs');var path=require(_0x2a02('0x3'));var rimraf=require(_0x2a02('0x4'));var config=require(_0x2a02('0x5'));var attributes=require('./analyticFieldReport.attributes');module['exports']=function(_0x16a121,_0x38e6f4){return _0x16a121[_0x2a02('0x6')](_0x2a02('0x7'),attributes,{'tableName':_0x2a02('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xead8=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticFieldReport.attributes','exports','AnalyticFieldReport','analytics_report_fields','lodash','util'];(function(_0x28727f,_0x1391be){var _0x2ef70c=function(_0x9b33fd){while(--_0x9b33fd){_0x28727f['push'](_0x28727f['shift']());}};_0x2ef70c(++_0x1391be);}(_0xead8,0x7c));var _0x8ead=function(_0x492af5,_0xd51471){_0x492af5=_0x492af5-0x0;var _0x59f529=_0xead8[_0x492af5];return _0x59f529;};'use strict';var _=require(_0x8ead('0x0'));var util=require(_0x8ead('0x1'));var logger=require(_0x8ead('0x2'))(_0x8ead('0x3'));var moment=require(_0x8ead('0x4'));var BPromise=require(_0x8ead('0x5'));var rp=require(_0x8ead('0x6'));var fs=require('fs');var path=require(_0x8ead('0x7'));var rimraf=require(_0x8ead('0x8'));var config=require(_0x8ead('0x9'));var attributes=require(_0x8ead('0xa'));module[_0x8ead('0xb')]=function(_0x1abf76,_0x210468){return _0x1abf76['define'](_0x8ead('0xc'),attributes,{'tableName':_0x8ead('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 73b41ea..5c65055 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3b31=['info','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','debug','AnalyticFieldReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','rpc','jayson/promise','client','then'];(function(_0x375522,_0xba9a07){var _0x3de250=function(_0x13bb46){while(--_0x13bb46){_0x375522['push'](_0x375522['shift']());}};_0x3de250(++_0xba9a07);}(_0x3b31,0xfa));var _0x13b3=function(_0x2a2325,_0x3fc0b7){_0x2a2325=_0x2a2325-0x0;var _0x297285=_0x3b31[_0x2a2325];return _0x297285;};'use strict';var _=require(_0x13b3('0x0'));var util=require(_0x13b3('0x1'));var moment=require(_0x13b3('0x2'));var BPromise=require(_0x13b3('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x13b3('0x4'))['db'];var utils=require(_0x13b3('0x5'));var logger=require('../../config/logger')(_0x13b3('0x6'));var config=require('../../config/environment');var jayson=require(_0x13b3('0x7'));var client=jayson[_0x13b3('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x53d0dd,_0x2f0a8d,_0x3f6106){return new BPromise(function(_0x201c82,_0xeaff1a){return client['request'](_0x53d0dd,_0x3f6106)[_0x13b3('0x9')](function(_0x3ab43b){logger[_0x13b3('0xa')](_0x13b3('0xb'),_0x2f0a8d,_0x13b3('0xc'));logger[_0x13b3('0xd')](_0x13b3('0xe'),_0x2f0a8d,_0x13b3('0xc'),JSON[_0x13b3('0xf')](_0x3ab43b));if(_0x3ab43b[_0x13b3('0x10')]){if(_0x3ab43b[_0x13b3('0x10')][_0x13b3('0x11')]===0x1f4){logger[_0x13b3('0x10')](_0x13b3('0xb'),_0x2f0a8d,_0x3ab43b[_0x13b3('0x10')][_0x13b3('0x12')]);return _0xeaff1a(_0x3ab43b['error'][_0x13b3('0x12')]);}logger[_0x13b3('0x10')](_0x13b3('0xb'),_0x2f0a8d,_0x3ab43b['error'][_0x13b3('0x12')]);return _0x201c82(_0x3ab43b[_0x13b3('0x10')][_0x13b3('0x12')]);}else{logger[_0x13b3('0xa')](_0x13b3('0xb'),_0x2f0a8d,_0x13b3('0xc'));_0x201c82(_0x3ab43b['result']['message']);}})[_0x13b3('0x13')](function(_0x4173ac){logger['error'](_0x13b3('0xb'),_0x2f0a8d,_0x4173ac);_0xeaff1a(_0x4173ac);});});}
\ No newline at end of file
+var _0x6fcc=['../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','request','then','info','AnalyticFieldReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash','moment','randomstring','ioredis'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0x6fcc,0x176));var _0xc6fc=function(_0x1254a5,_0x2ba0be){_0x1254a5=_0x1254a5-0x0;var _0x2fbf81=_0x6fcc[_0x1254a5];return _0x2fbf81;};'use strict';var _=require(_0xc6fc('0x0'));var util=require('util');var moment=require(_0xc6fc('0x1'));var BPromise=require('bluebird');var rs=require(_0xc6fc('0x2'));var fs=require('fs');var Redis=require(_0xc6fc('0x3'));var db=require(_0xc6fc('0x4'))['db'];var utils=require(_0xc6fc('0x5'));var logger=require(_0xc6fc('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0xc6fc('0x7'));var client=jayson[_0xc6fc('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x335b9c,_0x1e3f1c,_0x10daaf){return new BPromise(function(_0x528f08,_0x592ef0){return client[_0xc6fc('0x9')](_0x335b9c,_0x10daaf)[_0xc6fc('0xa')](function(_0x2d3741){logger[_0xc6fc('0xb')](_0xc6fc('0xc'),_0x1e3f1c,_0xc6fc('0xd'));logger[_0xc6fc('0xe')]('AnalyticFieldReport,\x20%s,\x20%s,\x20%s',_0x1e3f1c,_0xc6fc('0xd'),JSON[_0xc6fc('0xf')](_0x2d3741));if(_0x2d3741[_0xc6fc('0x10')]){if(_0x2d3741[_0xc6fc('0x10')][_0xc6fc('0x11')]===0x1f4){logger[_0xc6fc('0x10')](_0xc6fc('0xc'),_0x1e3f1c,_0x2d3741[_0xc6fc('0x10')][_0xc6fc('0x12')]);return _0x592ef0(_0x2d3741[_0xc6fc('0x10')]['message']);}logger[_0xc6fc('0x10')]('AnalyticFieldReport,\x20%s,\x20%s',_0x1e3f1c,_0x2d3741[_0xc6fc('0x10')][_0xc6fc('0x12')]);return _0x528f08(_0x2d3741[_0xc6fc('0x10')][_0xc6fc('0x12')]);}else{logger[_0xc6fc('0xb')](_0xc6fc('0xc'),_0x1e3f1c,_0xc6fc('0xd'));_0x528f08(_0x2d3741[_0xc6fc('0x13')][_0xc6fc('0x12')]);}})[_0xc6fc('0x14')](function(_0x27d889){logger[_0xc6fc('0x10')](_0xc6fc('0xc'),_0x1e3f1c,_0x27d889);_0x592ef0(_0x27d889);});});}
\ No newline at end of file
index 068f23f..af476ad 100644 (file)
@@ -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(_0x3bac74,_0x525272){var _0x385d69=function(_0x35e2c3){while(--_0x35e2c3){_0x3bac74['push'](_0x3bac74['shift']());}};_0x385d69(++_0x525272);}(_0xa9e0,0x123));var _0x0a9e=function(_0x18a79d,_0x57bd2c){_0x18a79d=_0x18a79d-0x0;var _0x4f8848=_0xa9e0[_0x18a79d];return _0x4f8848;};'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(_0x3d275d,_0x4a0295){var _0x4b4672=function(_0x5d3654){while(--_0x5d3654){_0x3d275d['push'](_0x3d275d['shift']());}};_0x4b4672(++_0x4a0295);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3e112d,_0x2bb132){_0x3e112d=_0x3e112d-0x0;var _0x531c31=_0xa9e0[_0x3e112d];return _0x531c31;};'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
index 8b52cb8..f0845b5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaa1b=['sequelize','exports','STRING'];(function(_0x56740a,_0x568894){var _0x257144=function(_0x2b8cc5){while(--_0x2b8cc5){_0x56740a['push'](_0x56740a['shift']());}};_0x257144(++_0x568894);}(_0xaa1b,0x123));var _0xbaa1=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xaa1b[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require(_0xbaa1('0x0'));module[_0xbaa1('0x1')]={'name':{'type':Sequelize[_0xbaa1('0x2')],'allowNull':![],'unique':'name'},'table':{'type':Sequelize[_0xbaa1('0x2')]},'metric':{'type':Sequelize['TEXT']},'description':{'type':Sequelize[_0xbaa1('0x2')]}};
\ No newline at end of file
+var _0x6c63=['exports','STRING','name','TEXT','sequelize'];(function(_0x120f46,_0x41f418){var _0x4d8d88=function(_0x1656fd){while(--_0x1656fd){_0x120f46['push'](_0x120f46['shift']());}};_0x4d8d88(++_0x41f418);}(_0x6c63,0x1ee));var _0x36c6=function(_0x1c8fb0,_0x22145e){_0x1c8fb0=_0x1c8fb0-0x0;var _0xcf5da4=_0x6c63[_0x1c8fb0];return _0xcf5da4;};'use strict';var Sequelize=require(_0x36c6('0x0'));module[_0x36c6('0x1')]={'name':{'type':Sequelize[_0x36c6('0x2')],'allowNull':![],'unique':_0x36c6('0x3')},'table':{'type':Sequelize[_0x36c6('0x2')]},'metric':{'type':Sequelize[_0x36c6('0x4')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 7fe5a47..7d7c5b2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x46ed=['where','pick','filter','merge','map','type','options','count','includeAll','include','findAll','rows','params','keys','find','catch','create','body','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','offset','limit','undefined','set','Content-Range','json','apply','reject','update','then','Metrics','UserProfileResource','destroy','error','stack','name','send','index','AnalyticMetric','rawAttributes','fieldName','key','model','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort'];(function(_0x1a7fbe,_0x1d0032){var _0x4a4789=function(_0x11edd6){while(--_0x11edd6){_0x1a7fbe['push'](_0x1a7fbe['shift']());}};_0x4a4789(++_0x1d0032);}(_0x46ed,0x168));var _0xd46e=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0x46ed[_0x59ee6f];return _0x4c0979;};'use strict';var emlformat=require(_0xd46e('0x0'));var rimraf=require(_0xd46e('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xd46e('0x2'));var rp=require(_0xd46e('0x3'));var moment=require(_0xd46e('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xd46e('0x5'));var util=require(_0xd46e('0x6'));var path=require('path');var sox=require(_0xd46e('0x7'));var csv=require(_0xd46e('0x8'));var ejs=require(_0xd46e('0x9'));var fs=require('fs');var fs_extra=require(_0xd46e('0xa'));var _=require(_0xd46e('0xb'));var squel=require(_0xd46e('0xc'));var crypto=require(_0xd46e('0xd'));var jsforce=require(_0xd46e('0xe'));var deskjs=require(_0xd46e('0xf'));var toCsv=require(_0xd46e('0x8'));var querystring=require(_0xd46e('0x10'));var Papa=require('papaparse');var Redis=require(_0xd46e('0x11'));var authService=require(_0xd46e('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xd46e('0x13'));var hardwareService=require(_0xd46e('0x14'));var logger=require(_0xd46e('0x15'))(_0xd46e('0x16'));var utils=require(_0xd46e('0x17'));var config=require(_0xd46e('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0xd46e('0x19'))['db'];function respondWithStatusCode(_0x5bc1da,_0x48550b){_0x48550b=_0x48550b||0xcc;return function(_0xf3048c){if(_0xf3048c){return _0x5bc1da[_0xd46e('0x1a')](_0x48550b);}return _0x5bc1da['status'](_0x48550b)['end']();};}function respondWithResult(_0xacd799,_0x4688ae){_0x4688ae=_0x4688ae||0xc8;return function(_0x1e9aae){if(_0x1e9aae){return _0xacd799[_0xd46e('0x1b')](_0x4688ae)['json'](_0x1e9aae);}};}function respondWithFilteredResult(_0x3b6d25,_0x44a620){return function(_0x417402){if(_0x417402){var _0x3d72ce=typeof _0x44a620[_0xd46e('0x1c')]==='undefined'&&typeof _0x44a620[_0xd46e('0x1d')]===_0xd46e('0x1e');var _0x3583a5=_0x417402['count'];var _0x5ddd04=_0x3d72ce?0x0:_0x44a620[_0xd46e('0x1c')];var _0x1bd574=_0x3d72ce?_0x417402['count']:_0x44a620['offset']+_0x44a620[_0xd46e('0x1d')];var _0x2f2571;if(_0x1bd574>=_0x3583a5){_0x1bd574=_0x3583a5;_0x2f2571=0xc8;}else{_0x2f2571=0xce;}_0x3b6d25[_0xd46e('0x1b')](_0x2f2571);return _0x3b6d25[_0xd46e('0x1f')](_0xd46e('0x20'),_0x5ddd04+'-'+_0x1bd574+'/'+_0x3583a5)[_0xd46e('0x21')](_0x417402);}return null;};}function patchUpdates(_0x3b5fa4){return function(_0x327b7e){try{jsonpatch[_0xd46e('0x22')](_0x327b7e,_0x3b5fa4,!![]);}catch(_0x3c7e91){return BPromise[_0xd46e('0x23')](_0x3c7e91);}return _0x327b7e['save']();};}function saveUpdates(_0x259072,_0x1c83fa){return function(_0x79aa51){if(_0x79aa51){return _0x79aa51[_0xd46e('0x24')](_0x259072)[_0xd46e('0x25')](function(_0xc1af7f){return _0xc1af7f;});}return null;};}function removeEntity(_0x33c2e0,_0x8a1be){return function(_0x62dea5){if(_0x62dea5){return _0x62dea5['destroy']()[_0xd46e('0x25')](function(){var _0x5424e5=_0x62dea5['get']({'plain':!![]});var _0x371054=_0xd46e('0x26');return db[_0xd46e('0x27')][_0xd46e('0x28')]({'where':{'type':_0x371054,'resourceId':_0x5424e5['id']}})[_0xd46e('0x25')](function(){return _0x62dea5;});})[_0xd46e('0x25')](function(){_0x33c2e0[_0xd46e('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x45d789,_0x3c301a){return function(_0xddbce9){if(!_0xddbce9){_0x45d789[_0xd46e('0x1a')](0x194);}return _0xddbce9;};}function handleError(_0x96f15c,_0x16e941){_0x16e941=_0x16e941||0x1f4;return function(_0x58aeef){logger[_0xd46e('0x29')](_0x58aeef[_0xd46e('0x2a')]);if(_0x58aeef[_0xd46e('0x2b')]){delete _0x58aeef[_0xd46e('0x2b')];}_0x96f15c[_0xd46e('0x1b')](_0x16e941)[_0xd46e('0x2c')](_0x58aeef);};}exports[_0xd46e('0x2d')]=function(_0x2c5ec7,_0x18f060){var _0x45ea47={},_0x2ff785={},_0x504324={'count':0x0,'rows':[]};var _0x2f4a1b=_['map'](db[_0xd46e('0x2e')][_0xd46e('0x2f')],function(_0x4f5718){return{'name':_0x4f5718[_0xd46e('0x30')],'type':_0x4f5718['type'][_0xd46e('0x31')]};});_0x2ff785[_0xd46e('0x32')]=_['map'](_0x2f4a1b,_0xd46e('0x2b'));_0x2ff785[_0xd46e('0x33')]=_['keys'](_0x2c5ec7[_0xd46e('0x33')]);_0x2ff785[_0xd46e('0x34')]=_[_0xd46e('0x35')](_0x2ff785['model'],_0x2ff785['query']);_0x45ea47[_0xd46e('0x36')]=_[_0xd46e('0x35')](_0x2ff785[_0xd46e('0x32')],qs[_0xd46e('0x37')](_0x2c5ec7[_0xd46e('0x33')][_0xd46e('0x37')]));_0x45ea47[_0xd46e('0x36')]=_0x45ea47[_0xd46e('0x36')]['length']?_0x45ea47[_0xd46e('0x36')]:_0x2ff785[_0xd46e('0x32')];if(!_0x2c5ec7[_0xd46e('0x33')][_0xd46e('0x38')](_0xd46e('0x39'))){_0x45ea47[_0xd46e('0x1d')]=qs[_0xd46e('0x1d')](_0x2c5ec7['query'][_0xd46e('0x1d')]);_0x45ea47[_0xd46e('0x1c')]=qs['offset'](_0x2c5ec7[_0xd46e('0x33')][_0xd46e('0x1c')]);}_0x45ea47[_0xd46e('0x3a')]=qs[_0xd46e('0x3b')](_0x2c5ec7['query'][_0xd46e('0x3b')]);_0x45ea47[_0xd46e('0x3c')]=qs[_0xd46e('0x34')](_[_0xd46e('0x3d')](_0x2c5ec7[_0xd46e('0x33')],_0x2ff785[_0xd46e('0x34')]),_0x2f4a1b);if(_0x2c5ec7[_0xd46e('0x33')][_0xd46e('0x3e')]){_0x45ea47['where']=_[_0xd46e('0x3f')](_0x45ea47[_0xd46e('0x3c')],{'$or':_[_0xd46e('0x40')](_0x2f4a1b,function(_0x25657a){if(_0x25657a[_0xd46e('0x41')]!=='VIRTUAL'){var _0x964c66={};_0x964c66[_0x25657a['name']]={'$like':'%'+_0x2c5ec7['query']['filter']+'%'};return _0x964c66;}})});}_0x45ea47=_['merge']({},_0x45ea47,_0x2c5ec7[_0xd46e('0x42')]);var _0x54949f={'where':_0x45ea47[_0xd46e('0x3c')]};return db[_0xd46e('0x2e')]['count'](_0x54949f)[_0xd46e('0x25')](function(_0x4114e6){_0x504324[_0xd46e('0x43')]=_0x4114e6;if(_0x2c5ec7[_0xd46e('0x33')][_0xd46e('0x44')]){_0x45ea47[_0xd46e('0x45')]=[{'all':!![]}];}return db[_0xd46e('0x2e')][_0xd46e('0x46')](_0x45ea47);})[_0xd46e('0x25')](function(_0xec367d){_0x504324[_0xd46e('0x47')]=_0xec367d;return _0x504324;})['then'](respondWithFilteredResult(_0x18f060,_0x45ea47))['catch'](handleError(_0x18f060,null));};exports['show']=function(_0x2b4a5a,_0x4e1d94){var _0x168d35={'raw':!![],'where':{'id':_0x2b4a5a[_0xd46e('0x48')]['id']}},_0x272f5f={};_0x272f5f[_0xd46e('0x32')]=_[_0xd46e('0x49')](db[_0xd46e('0x2e')][_0xd46e('0x2f')]);_0x272f5f[_0xd46e('0x33')]=_['keys'](_0x2b4a5a[_0xd46e('0x33')]);_0x272f5f['filters']=_[_0xd46e('0x35')](_0x272f5f[_0xd46e('0x32')],_0x272f5f[_0xd46e('0x33')]);_0x168d35[_0xd46e('0x36')]=_[_0xd46e('0x35')](_0x272f5f['model'],qs[_0xd46e('0x37')](_0x2b4a5a[_0xd46e('0x33')][_0xd46e('0x37')]));_0x168d35[_0xd46e('0x36')]=_0x168d35[_0xd46e('0x36')]['length']?_0x168d35[_0xd46e('0x36')]:_0x272f5f[_0xd46e('0x32')];if(_0x2b4a5a[_0xd46e('0x33')][_0xd46e('0x44')]){_0x168d35[_0xd46e('0x45')]=[{'all':!![]}];}_0x168d35=_['merge']({},_0x168d35,_0x2b4a5a[_0xd46e('0x42')]);return db[_0xd46e('0x2e')][_0xd46e('0x4a')](_0x168d35)[_0xd46e('0x25')](handleEntityNotFound(_0x4e1d94,null))[_0xd46e('0x25')](respondWithResult(_0x4e1d94,null))[_0xd46e('0x4b')](handleError(_0x4e1d94,null));};exports[_0xd46e('0x4c')]=function(_0x440dcc,_0x5188f6){return db[_0xd46e('0x2e')][_0xd46e('0x4c')](_0x440dcc[_0xd46e('0x4d')],{})[_0xd46e('0x25')](function(_0x1f1941){var _0x4e84c8=_0x440dcc['user'][_0xd46e('0x4e')]({'plain':!![]});if(!_0x4e84c8)throw new Error(_0xd46e('0x4f'));if(_0x4e84c8[_0xd46e('0x50')]==='user'){var _0x479711=_0x1f1941[_0xd46e('0x4e')]({'plain':!![]});var _0x9d8638='Metrics';return db[_0xd46e('0x51')][_0xd46e('0x4a')]({'where':{'name':_0x9d8638,'userProfileId':_0x4e84c8[_0xd46e('0x52')]},'raw':!![]})[_0xd46e('0x25')](function(_0x1bd8a5){if(_0x1bd8a5&&_0x1bd8a5[_0xd46e('0x53')]===0x0){return db[_0xd46e('0x27')][_0xd46e('0x4c')]({'name':_0x479711['name'],'resourceId':_0x479711['id'],'type':_0x1bd8a5[_0xd46e('0x2b')],'sectionId':_0x1bd8a5['id']},{})[_0xd46e('0x25')](function(){return _0x1f1941;});}else{return _0x1f1941;}})[_0xd46e('0x4b')](function(_0x63ee74){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x63ee74);throw _0x63ee74;});}return _0x1f1941;})[_0xd46e('0x25')](respondWithResult(_0x5188f6,0xc9))['catch'](handleError(_0x5188f6,null));};exports[_0xd46e('0x24')]=function(_0x2af20b,_0x393cb9){if(_0x2af20b[_0xd46e('0x4d')]['id']){delete _0x2af20b[_0xd46e('0x4d')]['id'];}return db[_0xd46e('0x2e')]['find']({'where':{'id':_0x2af20b[_0xd46e('0x48')]['id']}})[_0xd46e('0x25')](handleEntityNotFound(_0x393cb9,null))[_0xd46e('0x25')](saveUpdates(_0x2af20b['body'],null))[_0xd46e('0x25')](respondWithResult(_0x393cb9,null))[_0xd46e('0x4b')](handleError(_0x393cb9,null));};exports[_0xd46e('0x28')]=function(_0x2042d4,_0x1886e6){return db[_0xd46e('0x2e')][_0xd46e('0x4a')]({'where':{'id':_0x2042d4[_0xd46e('0x48')]['id']}})[_0xd46e('0x25')](handleEntityNotFound(_0x1886e6,null))[_0xd46e('0x25')](removeEntity(_0x1886e6,null))[_0xd46e('0x4b')](handleError(_0x1886e6,null));};
\ No newline at end of file
+var _0x6aa7=['json','apply','reject','save','update','then','destroy','get','Metrics','stack','name','send','index','map','AnalyticMetric','rawAttributes','fieldName','type','model','query','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','include','show','keys','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','find','autoAssociation','UserProfileResource','catch','error','params','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','ejs','lodash','squel','crypto','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','undefined','count','offset','limit','set','Content-Range'];(function(_0x32351e,_0x25d53a){var _0xcc55=function(_0x1ce0dd){while(--_0x1ce0dd){_0x32351e['push'](_0x32351e['shift']());}};_0xcc55(++_0x25d53a);}(_0x6aa7,0x178));var _0x76aa=function(_0x3fc09e,_0x4bdc43){_0x3fc09e=_0x3fc09e-0x0;var _0x15ae32=_0x6aa7[_0x3fc09e];return _0x15ae32;};'use strict';var emlformat=require(_0x76aa('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x76aa('0x1'));var jsonpatch=require(_0x76aa('0x2'));var rp=require(_0x76aa('0x3'));var moment=require(_0x76aa('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x76aa('0x5'));var util=require(_0x76aa('0x6'));var path=require(_0x76aa('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x76aa('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x76aa('0x9'));var squel=require(_0x76aa('0xa'));var crypto=require(_0x76aa('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x76aa('0xc'));var toCsv=require(_0x76aa('0xd'));var querystring=require(_0x76aa('0xe'));var Papa=require('papaparse');var Redis=require(_0x76aa('0xf'));var authService=require(_0x76aa('0x10'));var qs=require(_0x76aa('0x11'));var as=require(_0x76aa('0x12'));var hardwareService=require(_0x76aa('0x13'));var logger=require(_0x76aa('0x14'))(_0x76aa('0x15'));var utils=require(_0x76aa('0x16'));var config=require(_0x76aa('0x17'));var licenseUtil=require(_0x76aa('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x112c39,_0x5df49c){_0x5df49c=_0x5df49c||0xcc;return function(_0x226536){if(_0x226536){return _0x112c39[_0x76aa('0x19')](_0x5df49c);}return _0x112c39[_0x76aa('0x1a')](_0x5df49c)[_0x76aa('0x1b')]();};}function respondWithResult(_0x10432c,_0x4e309f){_0x4e309f=_0x4e309f||0xc8;return function(_0x5f5b59){if(_0x5f5b59){return _0x10432c[_0x76aa('0x1a')](_0x4e309f)['json'](_0x5f5b59);}};}function respondWithFilteredResult(_0x180d92,_0x319bf1){return function(_0x5cf594){if(_0x5cf594){var _0x2111c7=typeof _0x319bf1['offset']===_0x76aa('0x1c')&&typeof _0x319bf1['limit']===_0x76aa('0x1c');var _0x413cf6=_0x5cf594[_0x76aa('0x1d')];var _0x21c16d=_0x2111c7?0x0:_0x319bf1[_0x76aa('0x1e')];var _0x3ead3f=_0x2111c7?_0x5cf594['count']:_0x319bf1['offset']+_0x319bf1[_0x76aa('0x1f')];var _0x454dd3;if(_0x3ead3f>=_0x413cf6){_0x3ead3f=_0x413cf6;_0x454dd3=0xc8;}else{_0x454dd3=0xce;}_0x180d92[_0x76aa('0x1a')](_0x454dd3);return _0x180d92[_0x76aa('0x20')](_0x76aa('0x21'),_0x21c16d+'-'+_0x3ead3f+'/'+_0x413cf6)[_0x76aa('0x22')](_0x5cf594);}return null;};}function patchUpdates(_0x19af92){return function(_0x2eaf48){try{jsonpatch[_0x76aa('0x23')](_0x2eaf48,_0x19af92,!![]);}catch(_0x5990c1){return BPromise[_0x76aa('0x24')](_0x5990c1);}return _0x2eaf48[_0x76aa('0x25')]();};}function saveUpdates(_0x338a6b,_0x5b3f55){return function(_0x41463a){if(_0x41463a){return _0x41463a[_0x76aa('0x26')](_0x338a6b)[_0x76aa('0x27')](function(_0x2bd2c6){return _0x2bd2c6;});}return null;};}function removeEntity(_0x29c50c,_0xc1044c){return function(_0x3cd039){if(_0x3cd039){return _0x3cd039[_0x76aa('0x28')]()[_0x76aa('0x27')](function(){var _0x2cba6d=_0x3cd039[_0x76aa('0x29')]({'plain':!![]});var _0x26b75e=_0x76aa('0x2a');return db['UserProfileResource'][_0x76aa('0x28')]({'where':{'type':_0x26b75e,'resourceId':_0x2cba6d['id']}})[_0x76aa('0x27')](function(){return _0x3cd039;});})[_0x76aa('0x27')](function(){_0x29c50c[_0x76aa('0x1a')](0xcc)[_0x76aa('0x1b')]();});}};}function handleEntityNotFound(_0x2f9316,_0x25a803){return function(_0x282d0a){if(!_0x282d0a){_0x2f9316[_0x76aa('0x19')](0x194);}return _0x282d0a;};}function handleError(_0x1bdc3d,_0x545b06){_0x545b06=_0x545b06||0x1f4;return function(_0x3fcb7f){logger['error'](_0x3fcb7f[_0x76aa('0x2b')]);if(_0x3fcb7f[_0x76aa('0x2c')]){delete _0x3fcb7f[_0x76aa('0x2c')];}_0x1bdc3d[_0x76aa('0x1a')](_0x545b06)[_0x76aa('0x2d')](_0x3fcb7f);};}exports[_0x76aa('0x2e')]=function(_0x2ee0f9,_0x3827ec){var _0x19fd4f={},_0x3ea05a={},_0x5edcd8={'count':0x0,'rows':[]};var _0x430ad6=_[_0x76aa('0x2f')](db[_0x76aa('0x30')][_0x76aa('0x31')],function(_0x458ac3){return{'name':_0x458ac3[_0x76aa('0x32')],'type':_0x458ac3[_0x76aa('0x33')]['key']};});_0x3ea05a[_0x76aa('0x34')]=_[_0x76aa('0x2f')](_0x430ad6,'name');_0x3ea05a[_0x76aa('0x35')]=_['keys'](_0x2ee0f9[_0x76aa('0x35')]);_0x3ea05a['filters']=_[_0x76aa('0x36')](_0x3ea05a['model'],_0x3ea05a['query']);_0x19fd4f[_0x76aa('0x37')]=_[_0x76aa('0x36')](_0x3ea05a[_0x76aa('0x34')],qs[_0x76aa('0x38')](_0x2ee0f9['query']['fields']));_0x19fd4f[_0x76aa('0x37')]=_0x19fd4f[_0x76aa('0x37')][_0x76aa('0x39')]?_0x19fd4f[_0x76aa('0x37')]:_0x3ea05a[_0x76aa('0x34')];if(!_0x2ee0f9['query'][_0x76aa('0x3a')]('nolimit')){_0x19fd4f['limit']=qs[_0x76aa('0x1f')](_0x2ee0f9[_0x76aa('0x35')][_0x76aa('0x1f')]);_0x19fd4f[_0x76aa('0x1e')]=qs['offset'](_0x2ee0f9[_0x76aa('0x35')][_0x76aa('0x1e')]);}_0x19fd4f[_0x76aa('0x3b')]=qs['sort'](_0x2ee0f9[_0x76aa('0x35')][_0x76aa('0x3c')]);_0x19fd4f[_0x76aa('0x3d')]=qs[_0x76aa('0x3e')](_[_0x76aa('0x3f')](_0x2ee0f9[_0x76aa('0x35')],_0x3ea05a[_0x76aa('0x3e')]),_0x430ad6);if(_0x2ee0f9[_0x76aa('0x35')][_0x76aa('0x40')]){_0x19fd4f['where']=_[_0x76aa('0x41')](_0x19fd4f[_0x76aa('0x3d')],{'$or':_[_0x76aa('0x2f')](_0x430ad6,function(_0xa824e8){if(_0xa824e8[_0x76aa('0x33')]!==_0x76aa('0x42')){var _0x572fdb={};_0x572fdb[_0xa824e8['name']]={'$like':'%'+_0x2ee0f9[_0x76aa('0x35')][_0x76aa('0x40')]+'%'};return _0x572fdb;}})});}_0x19fd4f=_[_0x76aa('0x41')]({},_0x19fd4f,_0x2ee0f9[_0x76aa('0x43')]);var _0x50599f={'where':_0x19fd4f[_0x76aa('0x3d')]};return db[_0x76aa('0x30')][_0x76aa('0x1d')](_0x50599f)[_0x76aa('0x27')](function(_0x1138b5){_0x5edcd8['count']=_0x1138b5;if(_0x2ee0f9[_0x76aa('0x35')]['includeAll']){_0x19fd4f[_0x76aa('0x44')]=[{'all':!![]}];}return db['AnalyticMetric']['findAll'](_0x19fd4f);})['then'](function(_0x144f0a){_0x5edcd8['rows']=_0x144f0a;return _0x5edcd8;})['then'](respondWithFilteredResult(_0x3827ec,_0x19fd4f))['catch'](handleError(_0x3827ec,null));};exports[_0x76aa('0x45')]=function(_0x3fd153,_0x116dc5){var _0x2c0744={'raw':!![],'where':{'id':_0x3fd153['params']['id']}},_0x27a52e={};_0x27a52e[_0x76aa('0x34')]=_[_0x76aa('0x46')](db[_0x76aa('0x30')][_0x76aa('0x31')]);_0x27a52e[_0x76aa('0x35')]=_['keys'](_0x3fd153[_0x76aa('0x35')]);_0x27a52e[_0x76aa('0x3e')]=_['intersection'](_0x27a52e[_0x76aa('0x34')],_0x27a52e['query']);_0x2c0744[_0x76aa('0x37')]=_[_0x76aa('0x36')](_0x27a52e[_0x76aa('0x34')],qs[_0x76aa('0x38')](_0x3fd153[_0x76aa('0x35')][_0x76aa('0x38')]));_0x2c0744[_0x76aa('0x37')]=_0x2c0744[_0x76aa('0x37')][_0x76aa('0x39')]?_0x2c0744[_0x76aa('0x37')]:_0x27a52e['model'];if(_0x3fd153[_0x76aa('0x35')]['includeAll']){_0x2c0744[_0x76aa('0x44')]=[{'all':!![]}];}_0x2c0744=_[_0x76aa('0x41')]({},_0x2c0744,_0x3fd153[_0x76aa('0x43')]);return db[_0x76aa('0x30')]['find'](_0x2c0744)['then'](handleEntityNotFound(_0x116dc5,null))[_0x76aa('0x27')](respondWithResult(_0x116dc5,null))['catch'](handleError(_0x116dc5,null));};exports[_0x76aa('0x47')]=function(_0x302a0c,_0x4315b3){return db[_0x76aa('0x30')][_0x76aa('0x47')](_0x302a0c[_0x76aa('0x48')],{})['then'](function(_0x564546){var _0x2fcf8f=_0x302a0c[_0x76aa('0x49')][_0x76aa('0x29')]({'plain':!![]});if(!_0x2fcf8f)throw new Error(_0x76aa('0x4a'));if(_0x2fcf8f[_0x76aa('0x4b')]===_0x76aa('0x49')){var _0x4c52d5=_0x564546[_0x76aa('0x29')]({'plain':!![]});var _0x2d631e=_0x76aa('0x2a');return db['UserProfileSection'][_0x76aa('0x4c')]({'where':{'name':_0x2d631e,'userProfileId':_0x2fcf8f['userProfileId']},'raw':!![]})[_0x76aa('0x27')](function(_0x5e1d84){if(_0x5e1d84&&_0x5e1d84[_0x76aa('0x4d')]===0x0){return db[_0x76aa('0x4e')][_0x76aa('0x47')]({'name':_0x4c52d5[_0x76aa('0x2c')],'resourceId':_0x4c52d5['id'],'type':_0x5e1d84[_0x76aa('0x2c')],'sectionId':_0x5e1d84['id']},{})[_0x76aa('0x27')](function(){return _0x564546;});}else{return _0x564546;}})[_0x76aa('0x4f')](function(_0x4f2c2b){logger[_0x76aa('0x50')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x4f2c2b);throw _0x4f2c2b;});}return _0x564546;})[_0x76aa('0x27')](respondWithResult(_0x4315b3,0xc9))[_0x76aa('0x4f')](handleError(_0x4315b3,null));};exports[_0x76aa('0x26')]=function(_0x53be10,_0x3fa7ec){if(_0x53be10[_0x76aa('0x48')]['id']){delete _0x53be10[_0x76aa('0x48')]['id'];}return db['AnalyticMetric'][_0x76aa('0x4c')]({'where':{'id':_0x53be10[_0x76aa('0x51')]['id']}})[_0x76aa('0x27')](handleEntityNotFound(_0x3fa7ec,null))[_0x76aa('0x27')](saveUpdates(_0x53be10['body'],null))[_0x76aa('0x27')](respondWithResult(_0x3fa7ec,null))[_0x76aa('0x4f')](handleError(_0x3fa7ec,null));};exports[_0x76aa('0x28')]=function(_0x410933,_0x2027f8){return db[_0x76aa('0x30')]['find']({'where':{'id':_0x410933[_0x76aa('0x51')]['id']}})[_0x76aa('0x27')](handleEntityNotFound(_0x2027f8,null))[_0x76aa('0x27')](removeEntity(_0x2027f8,null))[_0x76aa('0x4f')](handleError(_0x2027f8,null));};
\ No newline at end of file
index 91a9e69..41fa11c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x49fe=['request-promise','path','rimraf','../../config/environment','./analyticMetric.attributes','exports','define','AnalyticMetric','analytics_metrics','lodash','moment','bluebird'];(function(_0x30d2a5,_0x13516b){var _0x12f6c6=function(_0x53d40d){while(--_0x53d40d){_0x30d2a5['push'](_0x30d2a5['shift']());}};_0x12f6c6(++_0x13516b);}(_0x49fe,0x75));var _0xe49f=function(_0x53b44c,_0x460abf){_0x53b44c=_0x53b44c-0x0;var _0x42c2b5=_0x49fe[_0x53b44c];return _0x42c2b5;};'use strict';var _=require(_0xe49f('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0xe49f('0x1'));var BPromise=require(_0xe49f('0x2'));var rp=require(_0xe49f('0x3'));var fs=require('fs');var path=require(_0xe49f('0x4'));var rimraf=require(_0xe49f('0x5'));var config=require(_0xe49f('0x6'));var attributes=require(_0xe49f('0x7'));module[_0xe49f('0x8')]=function(_0x3e984c,_0x2f3f9f){return _0x3e984c[_0xe49f('0x9')](_0xe49f('0xa'),attributes,{'tableName':_0xe49f('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xaa48=['analytics_metrics','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticMetric.attributes','exports','define','AnalyticMetric'];(function(_0xba1760,_0x191969){var _0x1f3143=function(_0x5aa807){while(--_0x5aa807){_0xba1760['push'](_0xba1760['shift']());}};_0x1f3143(++_0x191969);}(_0xaa48,0x15a));var _0x8aa4=function(_0x2c444f,_0x2dc2b4){_0x2c444f=_0x2c444f-0x0;var _0x3050ee=_0xaa48[_0x2c444f];return _0x3050ee;};'use strict';var _=require(_0x8aa4('0x0'));var util=require(_0x8aa4('0x1'));var logger=require(_0x8aa4('0x2'))(_0x8aa4('0x3'));var moment=require(_0x8aa4('0x4'));var BPromise=require(_0x8aa4('0x5'));var rp=require(_0x8aa4('0x6'));var fs=require('fs');var path=require(_0x8aa4('0x7'));var rimraf=require(_0x8aa4('0x8'));var config=require(_0x8aa4('0x9'));var attributes=require(_0x8aa4('0xa'));module[_0x8aa4('0xb')]=function(_0x141d8b,_0x14614c){return _0x141d8b[_0x8aa4('0xc')](_0x8aa4('0xd'),attributes,{'tableName':_0x8aa4('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index f2b7872..f0a4aed 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa819=['../../mysqldb','../../config/utils','../../config/environment','client','request','then','request\x20sent','AnalyticMetric,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','AnalyticMetric,\x20%s,\x20%s','result','catch','lodash','util','moment','randomstring','ioredis'];(function(_0x394dd0,_0x372e2f){var _0x25caf5=function(_0x4e7bf5){while(--_0x4e7bf5){_0x394dd0['push'](_0x394dd0['shift']());}};_0x25caf5(++_0x372e2f);}(_0xa819,0x1f3));var _0x9a81=function(_0x4212fa,_0x56d028){_0x4212fa=_0x4212fa-0x0;var _0x2f8bc8=_0xa819[_0x4212fa];return _0x2f8bc8;};'use strict';var _=require(_0x9a81('0x0'));var util=require(_0x9a81('0x1'));var moment=require(_0x9a81('0x2'));var BPromise=require('bluebird');var rs=require(_0x9a81('0x3'));var fs=require('fs');var Redis=require(_0x9a81('0x4'));var db=require(_0x9a81('0x5'))['db'];var utils=require(_0x9a81('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x9a81('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x9a81('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5f1128,_0x3fbe40,_0x528a38){return new BPromise(function(_0x4f121d,_0x4dcf2e){return client[_0x9a81('0x9')](_0x5f1128,_0x528a38)[_0x9a81('0xa')](function(_0x3997e3){logger['info']('AnalyticMetric,\x20%s,\x20%s',_0x3fbe40,_0x9a81('0xb'));logger['debug'](_0x9a81('0xc'),_0x3fbe40,_0x9a81('0xb'),JSON[_0x9a81('0xd')](_0x3997e3));if(_0x3997e3['error']){if(_0x3997e3[_0x9a81('0xe')][_0x9a81('0xf')]===0x1f4){logger[_0x9a81('0xe')]('AnalyticMetric,\x20%s,\x20%s',_0x3fbe40,_0x3997e3['error']['message']);return _0x4dcf2e(_0x3997e3[_0x9a81('0xe')][_0x9a81('0x10')]);}logger[_0x9a81('0xe')]('AnalyticMetric,\x20%s,\x20%s',_0x3fbe40,_0x3997e3[_0x9a81('0xe')]['message']);return _0x4f121d(_0x3997e3[_0x9a81('0xe')][_0x9a81('0x10')]);}else{logger[_0x9a81('0x11')](_0x9a81('0x12'),_0x3fbe40,_0x9a81('0xb'));_0x4f121d(_0x3997e3[_0x9a81('0x13')][_0x9a81('0x10')]);}})[_0x9a81('0x14')](function(_0x3a62b6){logger[_0x9a81('0xe')](_0x9a81('0x12'),_0x3fbe40,_0x3a62b6);_0x4dcf2e(_0x3a62b6);});});}
\ No newline at end of file
+var _0xc5f4=['jayson/promise','client','http','request','then','info','AnalyticMetric,\x20%s,\x20%s','debug','request\x20sent','stringify','error','message','catch','lodash','util','moment','ioredis','../../config/utils','../../config/logger','../../config/environment'];(function(_0x55184b,_0x22ab0b){var _0xc14215=function(_0x1c0ac0){while(--_0x1c0ac0){_0x55184b['push'](_0x55184b['shift']());}};_0xc14215(++_0x22ab0b);}(_0xc5f4,0x14d));var _0x4c5f=function(_0x152ded,_0x45bc3f){_0x152ded=_0x152ded-0x0;var _0x1f15b7=_0xc5f4[_0x152ded];return _0x1f15b7;};'use strict';var _=require(_0x4c5f('0x0'));var util=require(_0x4c5f('0x1'));var moment=require(_0x4c5f('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x4c5f('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x4c5f('0x4'));var logger=require(_0x4c5f('0x5'))('rpc');var config=require(_0x4c5f('0x6'));var jayson=require(_0x4c5f('0x7'));var client=jayson[_0x4c5f('0x8')][_0x4c5f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4eb5f5,_0x5cc92f,_0x145f0e){return new BPromise(function(_0x29a653,_0xaea37c){return client[_0x4c5f('0xa')](_0x4eb5f5,_0x145f0e)[_0x4c5f('0xb')](function(_0x40305d){logger[_0x4c5f('0xc')](_0x4c5f('0xd'),_0x5cc92f,'request\x20sent');logger[_0x4c5f('0xe')]('AnalyticMetric,\x20%s,\x20%s,\x20%s',_0x5cc92f,_0x4c5f('0xf'),JSON[_0x4c5f('0x10')](_0x40305d));if(_0x40305d[_0x4c5f('0x11')]){if(_0x40305d['error']['code']===0x1f4){logger[_0x4c5f('0x11')](_0x4c5f('0xd'),_0x5cc92f,_0x40305d[_0x4c5f('0x11')][_0x4c5f('0x12')]);return _0xaea37c(_0x40305d[_0x4c5f('0x11')][_0x4c5f('0x12')]);}logger[_0x4c5f('0x11')](_0x4c5f('0xd'),_0x5cc92f,_0x40305d['error'][_0x4c5f('0x12')]);return _0x29a653(_0x40305d[_0x4c5f('0x11')][_0x4c5f('0x12')]);}else{logger[_0x4c5f('0xc')](_0x4c5f('0xd'),_0x5cc92f,'request\x20sent');_0x29a653(_0x40305d['result'][_0x4c5f('0x12')]);}})[_0x4c5f('0x13')](function(_0x2d902c){logger['error'](_0x4c5f('0xd'),_0x5cc92f,_0x2d902c);_0xaea37c(_0x2d902c);});});}
\ No newline at end of file
index f1da998..3737f0a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeda8=['../../components/auth/service','../../components/interaction/service','../../config/environment','./analyticMetric.controller','get','isAuthenticated','index','show','post','update','delete','/:id','destroy','multer','util','connect-timeout','express','Router','fs-extra'];(function(_0x58cb73,_0x1472a9){var _0x2f23e9=function(_0x489ff9){while(--_0x489ff9){_0x58cb73['push'](_0x58cb73['shift']());}};_0x2f23e9(++_0x1472a9);}(_0xeda8,0x104));var _0x8eda=function(_0x518f82,_0x533e12){_0x518f82=_0x518f82-0x0;var _0x5d2e09=_0xeda8[_0x518f82];return _0x5d2e09;};'use strict';var multer=require(_0x8eda('0x0'));var util=require(_0x8eda('0x1'));var path=require('path');var timeout=require(_0x8eda('0x2'));var express=require(_0x8eda('0x3'));var router=express[_0x8eda('0x4')]();var fs_extra=require(_0x8eda('0x5'));var auth=require(_0x8eda('0x6'));var interaction=require(_0x8eda('0x7'));var config=require(_0x8eda('0x8'));var controller=require(_0x8eda('0x9'));router[_0x8eda('0xa')]('/',auth[_0x8eda('0xb')](),controller[_0x8eda('0xc')]);router[_0x8eda('0xa')]('/:id',auth[_0x8eda('0xb')](),controller[_0x8eda('0xd')]);router[_0x8eda('0xe')]('/',auth[_0x8eda('0xb')](),controller['create']);router['put']('/:id',auth['isAuthenticated'](),controller[_0x8eda('0xf')]);router[_0x8eda('0x10')](_0x8eda('0x11'),auth['isAuthenticated'](),controller[_0x8eda('0x12')]);module['exports']=router;
\ No newline at end of file
+var _0x1115=['post','create','put','update','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','/:id'];(function(_0x197ed6,_0x420452){var _0x1a6211=function(_0x210db7){while(--_0x210db7){_0x197ed6['push'](_0x197ed6['shift']());}};_0x1a6211(++_0x420452);}(_0x1115,0x1b6));var _0x5111=function(_0x589533,_0x24cdf5){_0x589533=_0x589533-0x0;var _0x13368c=_0x1115[_0x589533];return _0x13368c;};'use strict';var multer=require('multer');var util=require(_0x5111('0x0'));var path=require(_0x5111('0x1'));var timeout=require(_0x5111('0x2'));var express=require(_0x5111('0x3'));var router=express[_0x5111('0x4')]();var fs_extra=require(_0x5111('0x5'));var auth=require(_0x5111('0x6'));var interaction=require(_0x5111('0x7'));var config=require(_0x5111('0x8'));var controller=require('./analyticMetric.controller');router['get']('/',auth[_0x5111('0x9')](),controller[_0x5111('0xa')]);router['get'](_0x5111('0xb'),auth[_0x5111('0x9')](),controller['show']);router[_0x5111('0xc')]('/',auth['isAuthenticated'](),controller[_0x5111('0xd')]);router[_0x5111('0xe')]('/:id',auth['isAuthenticated'](),controller[_0x5111('0xf')]);router['delete'](_0x5111('0xb'),auth['isAuthenticated'](),controller[_0x5111('0x10')]);module[_0x5111('0x11')]=router;
\ No newline at end of file
index c46485a..abac3e1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2c2a=['TEXT','sequelize'];(function(_0x438a37,_0x30e65e){var _0x38b013=function(_0x4dc7ca){while(--_0x4dc7ca){_0x438a37['push'](_0x438a37['shift']());}};_0x38b013(++_0x30e65e);}(_0x2c2a,0x73));var _0xa2c2=function(_0x18ab2a,_0x4debcd){_0x18ab2a=_0x18ab2a-0x0;var _0x16dcee=_0x2c2a[_0x18ab2a];return _0x16dcee;};'use strict';var Sequelize=require(_0xa2c2('0x0'));module['exports']={'tree':{'type':Sequelize[_0xa2c2('0x1')],'allowNull':![]}};
\ No newline at end of file
+var _0x1254=['exports','sequelize'];(function(_0x6503ff,_0x2b169a){var _0x22e638=function(_0x53e4c4){while(--_0x53e4c4){_0x6503ff['push'](_0x6503ff['shift']());}};_0x22e638(++_0x2b169a);}(_0x1254,0x79));var _0x4125=function(_0x1a9bb5,_0x4359a7){_0x1a9bb5=_0x1a9bb5-0x0;var _0x238347=_0x1254[_0x1a9bb5];return _0x238347;};'use strict';var Sequelize=require(_0x4125('0x0'));module[_0x4125('0x1')]={'tree':{'type':Sequelize['TEXT'],'allowNull':![]}};
\ No newline at end of file
index d7fe0d9..08ecbd1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdd67=['offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','then','sendStatus','error','name','send','index','map','AnalyticTreeReport','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','nolimit','order','sort','filters','pick','where','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','params','find','create','body','destroy','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','lodash','squel','crypto','desk.js','to-csv','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','status','end'];(function(_0x10f2ad,_0x256d6){var _0x432110=function(_0x522bb4){while(--_0x522bb4){_0x10f2ad['push'](_0x10f2ad['shift']());}};_0x432110(++_0x256d6);}(_0xdd67,0x106));var _0x7dd6=function(_0x1f8a5d,_0x447149){_0x1f8a5d=_0x1f8a5d-0x0;var _0x2c1e27=_0xdd67[_0x1f8a5d];return _0x2c1e27;};'use strict';var emlformat=require(_0x7dd6('0x0'));var rimraf=require(_0x7dd6('0x1'));var zipdir=require(_0x7dd6('0x2'));var jsonpatch=require(_0x7dd6('0x3'));var rp=require(_0x7dd6('0x4'));var moment=require('moment');var BPromise=require(_0x7dd6('0x5'));var Mustache=require('mustache');var util=require(_0x7dd6('0x6'));var path=require(_0x7dd6('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x7dd6('0x8'));var squel=require(_0x7dd6('0x9'));var crypto=require(_0x7dd6('0xa'));var jsforce=require('jsforce');var deskjs=require(_0x7dd6('0xb'));var toCsv=require(_0x7dd6('0xc'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x7dd6('0xd'));var qs=require('../../components/parsers/qs');var as=require(_0x7dd6('0xe'));var hardwareService=require(_0x7dd6('0xf'));var logger=require('../../config/logger')(_0x7dd6('0x10'));var utils=require(_0x7dd6('0x11'));var config=require(_0x7dd6('0x12'));var licenseUtil=require('../../config/license/util');var db=require(_0x7dd6('0x13'))['db'];function respondWithStatusCode(_0x3d3aef,_0x4b9366){_0x4b9366=_0x4b9366||0xcc;return function(_0x362cd2){if(_0x362cd2){return _0x3d3aef['sendStatus'](_0x4b9366);}return _0x3d3aef[_0x7dd6('0x14')](_0x4b9366)[_0x7dd6('0x15')]();};}function respondWithResult(_0x482a28,_0x424e1d){_0x424e1d=_0x424e1d||0xc8;return function(_0x3ba4aa){if(_0x3ba4aa){return _0x482a28[_0x7dd6('0x14')](_0x424e1d)['json'](_0x3ba4aa);}};}function respondWithFilteredResult(_0xbeabdf,_0x240391){return function(_0x29579b){if(_0x29579b){var _0x49c5d5=typeof _0x240391[_0x7dd6('0x16')]===_0x7dd6('0x17')&&typeof _0x240391[_0x7dd6('0x18')]===_0x7dd6('0x17');var _0x371432=_0x29579b[_0x7dd6('0x19')];var _0x1e42da=_0x49c5d5?0x0:_0x240391[_0x7dd6('0x16')];var _0x1edfa1=_0x49c5d5?_0x29579b[_0x7dd6('0x19')]:_0x240391[_0x7dd6('0x16')]+_0x240391[_0x7dd6('0x18')];var _0x54951e;if(_0x1edfa1>=_0x371432){_0x1edfa1=_0x371432;_0x54951e=0xc8;}else{_0x54951e=0xce;}_0xbeabdf[_0x7dd6('0x14')](_0x54951e);return _0xbeabdf[_0x7dd6('0x1a')](_0x7dd6('0x1b'),_0x1e42da+'-'+_0x1edfa1+'/'+_0x371432)[_0x7dd6('0x1c')](_0x29579b);}return null;};}function patchUpdates(_0x5d84f5){return function(_0xf303f7){try{jsonpatch[_0x7dd6('0x1d')](_0xf303f7,_0x5d84f5,!![]);}catch(_0x56ee64){return BPromise[_0x7dd6('0x1e')](_0x56ee64);}return _0xf303f7[_0x7dd6('0x1f')]();};}function saveUpdates(_0x2bfd34,_0x371545){return function(_0x2fe40e){if(_0x2fe40e){return _0x2fe40e[_0x7dd6('0x20')](_0x2bfd34)['then'](function(_0x11a28b){return _0x11a28b;});}return null;};}function removeEntity(_0x37ca73,_0x51d908){return function(_0x46fc27){if(_0x46fc27){return _0x46fc27['destroy']()[_0x7dd6('0x21')](function(){_0x37ca73[_0x7dd6('0x14')](0xcc)[_0x7dd6('0x15')]();});}};}function handleEntityNotFound(_0x1c9d8b,_0xcd3794){return function(_0x22e53c){if(!_0x22e53c){_0x1c9d8b[_0x7dd6('0x22')](0x194);}return _0x22e53c;};}function handleError(_0x4141f0,_0x348bf6){_0x348bf6=_0x348bf6||0x1f4;return function(_0x116d23){logger[_0x7dd6('0x23')](_0x116d23['stack']);if(_0x116d23[_0x7dd6('0x24')]){delete _0x116d23[_0x7dd6('0x24')];}_0x4141f0[_0x7dd6('0x14')](_0x348bf6)[_0x7dd6('0x25')](_0x116d23);};}exports[_0x7dd6('0x26')]=function(_0x7985e9,_0x4ec647){var _0x34be95={},_0x5ce095={},_0x5590c9={'count':0x0,'rows':[]};var _0x338153=_[_0x7dd6('0x27')](db[_0x7dd6('0x28')][_0x7dd6('0x29')],function(_0x27562e){return{'name':_0x27562e[_0x7dd6('0x2a')],'type':_0x27562e[_0x7dd6('0x2b')][_0x7dd6('0x2c')]};});_0x5ce095[_0x7dd6('0x2d')]=_[_0x7dd6('0x27')](_0x338153,'name');_0x5ce095[_0x7dd6('0x2e')]=_[_0x7dd6('0x2f')](_0x7985e9[_0x7dd6('0x2e')]);_0x5ce095['filters']=_[_0x7dd6('0x30')](_0x5ce095[_0x7dd6('0x2d')],_0x5ce095['query']);_0x34be95[_0x7dd6('0x31')]=_[_0x7dd6('0x30')](_0x5ce095['model'],qs[_0x7dd6('0x32')](_0x7985e9['query']['fields']));_0x34be95[_0x7dd6('0x31')]=_0x34be95[_0x7dd6('0x31')][_0x7dd6('0x33')]?_0x34be95[_0x7dd6('0x31')]:_0x5ce095['model'];if(!_0x7985e9[_0x7dd6('0x2e')]['hasOwnProperty'](_0x7dd6('0x34'))){_0x34be95[_0x7dd6('0x18')]=qs[_0x7dd6('0x18')](_0x7985e9[_0x7dd6('0x2e')][_0x7dd6('0x18')]);_0x34be95[_0x7dd6('0x16')]=qs[_0x7dd6('0x16')](_0x7985e9[_0x7dd6('0x2e')][_0x7dd6('0x16')]);}_0x34be95[_0x7dd6('0x35')]=qs[_0x7dd6('0x36')](_0x7985e9['query']['sort']);_0x34be95['where']=qs[_0x7dd6('0x37')](_[_0x7dd6('0x38')](_0x7985e9[_0x7dd6('0x2e')],_0x5ce095[_0x7dd6('0x37')]),_0x338153);if(_0x7985e9['query']['filter']){_0x34be95[_0x7dd6('0x39')]=_['merge'](_0x34be95[_0x7dd6('0x39')],{'$or':_[_0x7dd6('0x27')](_0x338153,function(_0x46494e){if(_0x46494e[_0x7dd6('0x2b')]!==_0x7dd6('0x3a')){var _0x3de296={};_0x3de296[_0x46494e['name']]={'$like':'%'+_0x7985e9[_0x7dd6('0x2e')]['filter']+'%'};return _0x3de296;}})});}_0x34be95=_[_0x7dd6('0x3b')]({},_0x34be95,_0x7985e9[_0x7dd6('0x3c')]);var _0x318c7e={'where':_0x34be95[_0x7dd6('0x39')]};return db[_0x7dd6('0x28')][_0x7dd6('0x19')](_0x318c7e)[_0x7dd6('0x21')](function(_0x40ea59){_0x5590c9[_0x7dd6('0x19')]=_0x40ea59;if(_0x7985e9['query'][_0x7dd6('0x3d')]){_0x34be95[_0x7dd6('0x3e')]=[{'all':!![]}];}return db[_0x7dd6('0x28')][_0x7dd6('0x3f')](_0x34be95);})[_0x7dd6('0x21')](function(_0x501983){_0x5590c9[_0x7dd6('0x40')]=_0x501983;return _0x5590c9;})['then'](respondWithFilteredResult(_0x4ec647,_0x34be95))[_0x7dd6('0x41')](handleError(_0x4ec647,null));};exports['show']=function(_0x2dc23f,_0x29badd){var _0x18ae43={'raw':!![],'where':{'id':_0x2dc23f[_0x7dd6('0x42')]['id']}},_0x416786={};_0x416786['model']=_[_0x7dd6('0x2f')](db[_0x7dd6('0x28')][_0x7dd6('0x29')]);_0x416786['query']=_[_0x7dd6('0x2f')](_0x2dc23f[_0x7dd6('0x2e')]);_0x416786[_0x7dd6('0x37')]=_[_0x7dd6('0x30')](_0x416786[_0x7dd6('0x2d')],_0x416786[_0x7dd6('0x2e')]);_0x18ae43[_0x7dd6('0x31')]=_[_0x7dd6('0x30')](_0x416786[_0x7dd6('0x2d')],qs[_0x7dd6('0x32')](_0x2dc23f[_0x7dd6('0x2e')]['fields']));_0x18ae43['attributes']=_0x18ae43[_0x7dd6('0x31')]['length']?_0x18ae43[_0x7dd6('0x31')]:_0x416786[_0x7dd6('0x2d')];if(_0x2dc23f[_0x7dd6('0x2e')][_0x7dd6('0x3d')]){_0x18ae43[_0x7dd6('0x3e')]=[{'all':!![]}];}_0x18ae43=_[_0x7dd6('0x3b')]({},_0x18ae43,_0x2dc23f[_0x7dd6('0x3c')]);return db[_0x7dd6('0x28')][_0x7dd6('0x43')](_0x18ae43)[_0x7dd6('0x21')](handleEntityNotFound(_0x29badd,null))['then'](respondWithResult(_0x29badd,null))[_0x7dd6('0x41')](handleError(_0x29badd,null));};exports[_0x7dd6('0x44')]=function(_0x4e8c99,_0x2c310a){return db['AnalyticTreeReport']['create'](_0x4e8c99[_0x7dd6('0x45')],{})[_0x7dd6('0x21')](respondWithResult(_0x2c310a,0xc9))[_0x7dd6('0x41')](handleError(_0x2c310a,null));};exports[_0x7dd6('0x20')]=function(_0x57dddf,_0x2c137c){if(_0x57dddf['body']['id']){delete _0x57dddf[_0x7dd6('0x45')]['id'];}return db[_0x7dd6('0x28')]['find']({'where':{'id':_0x57dddf['params']['id']}})[_0x7dd6('0x21')](handleEntityNotFound(_0x2c137c,null))[_0x7dd6('0x21')](saveUpdates(_0x57dddf[_0x7dd6('0x45')],null))[_0x7dd6('0x21')](respondWithResult(_0x2c137c,null))['catch'](handleError(_0x2c137c,null));};exports[_0x7dd6('0x46')]=function(_0xd87f2,_0x2d6878){return db[_0x7dd6('0x28')][_0x7dd6('0x43')]({'where':{'id':_0xd87f2['params']['id']}})['then'](handleEntityNotFound(_0x2d6878,null))[_0x7dd6('0x21')](removeEntity(_0x2d6878,null))['catch'](handleError(_0x2d6878,null));};
\ No newline at end of file
+var _0xcb8f=['body','find','eml-format','rimraf','request-promise','bluebird','util','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','reject','save','update','destroy','then','error','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','filter','VIRTUAL','merge','AnalyticTreeReport','include','findAll','rows','catch','show','params','includeAll','options','create'];(function(_0x17bdd7,_0xa97743){var _0x2404dc=function(_0xf6727b){while(--_0xf6727b){_0x17bdd7['push'](_0x17bdd7['shift']());}};_0x2404dc(++_0xa97743);}(_0xcb8f,0x136));var _0xfcb8=function(_0x2590f8,_0x5debfc){_0x2590f8=_0x2590f8-0x0;var _0x45685a=_0xcb8f[_0x2590f8];return _0x45685a;};'use strict';var emlformat=require(_0xfcb8('0x0'));var rimraf=require(_0xfcb8('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xfcb8('0x2'));var moment=require('moment');var BPromise=require(_0xfcb8('0x3'));var Mustache=require('mustache');var util=require(_0xfcb8('0x4'));var path=require('path');var sox=require(_0xfcb8('0x5'));var csv=require(_0xfcb8('0x6'));var ejs=require(_0xfcb8('0x7'));var fs=require('fs');var fs_extra=require(_0xfcb8('0x8'));var _=require(_0xfcb8('0x9'));var squel=require('squel');var crypto=require(_0xfcb8('0xa'));var jsforce=require(_0xfcb8('0xb'));var deskjs=require(_0xfcb8('0xc'));var toCsv=require(_0xfcb8('0x6'));var querystring=require(_0xfcb8('0xd'));var Papa=require(_0xfcb8('0xe'));var Redis=require(_0xfcb8('0xf'));var authService=require(_0xfcb8('0x10'));var qs=require(_0xfcb8('0x11'));var as=require(_0xfcb8('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xfcb8('0x13'))(_0xfcb8('0x14'));var utils=require(_0xfcb8('0x15'));var config=require(_0xfcb8('0x16'));var licenseUtil=require(_0xfcb8('0x17'));var db=require(_0xfcb8('0x18'))['db'];function respondWithStatusCode(_0x26a8c4,_0x2edf89){_0x2edf89=_0x2edf89||0xcc;return function(_0x1a032b){if(_0x1a032b){return _0x26a8c4[_0xfcb8('0x19')](_0x2edf89);}return _0x26a8c4[_0xfcb8('0x1a')](_0x2edf89)[_0xfcb8('0x1b')]();};}function respondWithResult(_0x5f21ed,_0x158b44){_0x158b44=_0x158b44||0xc8;return function(_0x17cd21){if(_0x17cd21){return _0x5f21ed[_0xfcb8('0x1a')](_0x158b44)[_0xfcb8('0x1c')](_0x17cd21);}};}function respondWithFilteredResult(_0x4ff8f8,_0x2268d4){return function(_0x4f5067){if(_0x4f5067){var _0xd0f480=typeof _0x2268d4[_0xfcb8('0x1d')]==='undefined'&&typeof _0x2268d4[_0xfcb8('0x1e')]===_0xfcb8('0x1f');var _0x4a4317=_0x4f5067[_0xfcb8('0x20')];var _0xe2f03c=_0xd0f480?0x0:_0x2268d4[_0xfcb8('0x1d')];var _0x25ad4a=_0xd0f480?_0x4f5067[_0xfcb8('0x20')]:_0x2268d4[_0xfcb8('0x1d')]+_0x2268d4[_0xfcb8('0x1e')];var _0x5bd7b9;if(_0x25ad4a>=_0x4a4317){_0x25ad4a=_0x4a4317;_0x5bd7b9=0xc8;}else{_0x5bd7b9=0xce;}_0x4ff8f8[_0xfcb8('0x1a')](_0x5bd7b9);return _0x4ff8f8[_0xfcb8('0x21')](_0xfcb8('0x22'),_0xe2f03c+'-'+_0x25ad4a+'/'+_0x4a4317)['json'](_0x4f5067);}return null;};}function patchUpdates(_0x56d137){return function(_0x51b736){try{jsonpatch['apply'](_0x51b736,_0x56d137,!![]);}catch(_0x37dbea){return BPromise[_0xfcb8('0x23')](_0x37dbea);}return _0x51b736[_0xfcb8('0x24')]();};}function saveUpdates(_0x3a5e23,_0x242d65){return function(_0x3004a1){if(_0x3004a1){return _0x3004a1[_0xfcb8('0x25')](_0x3a5e23)['then'](function(_0x2d04fe){return _0x2d04fe;});}return null;};}function removeEntity(_0x5eb8ac,_0x909109){return function(_0x243d68){if(_0x243d68){return _0x243d68[_0xfcb8('0x26')]()[_0xfcb8('0x27')](function(){_0x5eb8ac[_0xfcb8('0x1a')](0xcc)[_0xfcb8('0x1b')]();});}};}function handleEntityNotFound(_0x500de3,_0x3e2da7){return function(_0x1615a7){if(!_0x1615a7){_0x500de3[_0xfcb8('0x19')](0x194);}return _0x1615a7;};}function handleError(_0x4a56d2,_0xe580d3){_0xe580d3=_0xe580d3||0x1f4;return function(_0x1d9cfe){logger[_0xfcb8('0x28')](_0x1d9cfe['stack']);if(_0x1d9cfe[_0xfcb8('0x29')]){delete _0x1d9cfe[_0xfcb8('0x29')];}_0x4a56d2[_0xfcb8('0x1a')](_0xe580d3)[_0xfcb8('0x2a')](_0x1d9cfe);};}exports[_0xfcb8('0x2b')]=function(_0x5688cf,_0x513739){var _0x258a14={},_0x38ecaf={},_0x279ed6={'count':0x0,'rows':[]};var _0x2c0210=_[_0xfcb8('0x2c')](db['AnalyticTreeReport'][_0xfcb8('0x2d')],function(_0xc33dbb){return{'name':_0xc33dbb[_0xfcb8('0x2e')],'type':_0xc33dbb[_0xfcb8('0x2f')][_0xfcb8('0x30')]};});_0x38ecaf[_0xfcb8('0x31')]=_[_0xfcb8('0x2c')](_0x2c0210,'name');_0x38ecaf[_0xfcb8('0x32')]=_[_0xfcb8('0x33')](_0x5688cf['query']);_0x38ecaf[_0xfcb8('0x34')]=_[_0xfcb8('0x35')](_0x38ecaf['model'],_0x38ecaf[_0xfcb8('0x32')]);_0x258a14[_0xfcb8('0x36')]=_[_0xfcb8('0x35')](_0x38ecaf[_0xfcb8('0x31')],qs[_0xfcb8('0x37')](_0x5688cf[_0xfcb8('0x32')][_0xfcb8('0x37')]));_0x258a14[_0xfcb8('0x36')]=_0x258a14[_0xfcb8('0x36')][_0xfcb8('0x38')]?_0x258a14['attributes']:_0x38ecaf['model'];if(!_0x5688cf[_0xfcb8('0x32')][_0xfcb8('0x39')]('nolimit')){_0x258a14[_0xfcb8('0x1e')]=qs[_0xfcb8('0x1e')](_0x5688cf[_0xfcb8('0x32')]['limit']);_0x258a14[_0xfcb8('0x1d')]=qs[_0xfcb8('0x1d')](_0x5688cf[_0xfcb8('0x32')][_0xfcb8('0x1d')]);}_0x258a14[_0xfcb8('0x3a')]=qs[_0xfcb8('0x3b')](_0x5688cf['query'][_0xfcb8('0x3b')]);_0x258a14[_0xfcb8('0x3c')]=qs['filters'](_[_0xfcb8('0x3d')](_0x5688cf[_0xfcb8('0x32')],_0x38ecaf[_0xfcb8('0x34')]),_0x2c0210);if(_0x5688cf['query'][_0xfcb8('0x3e')]){_0x258a14[_0xfcb8('0x3c')]=_['merge'](_0x258a14[_0xfcb8('0x3c')],{'$or':_[_0xfcb8('0x2c')](_0x2c0210,function(_0x2daa79){if(_0x2daa79['type']!==_0xfcb8('0x3f')){var _0x4f3b7a={};_0x4f3b7a[_0x2daa79[_0xfcb8('0x29')]]={'$like':'%'+_0x5688cf['query'][_0xfcb8('0x3e')]+'%'};return _0x4f3b7a;}})});}_0x258a14=_[_0xfcb8('0x40')]({},_0x258a14,_0x5688cf['options']);var _0x434eb9={'where':_0x258a14[_0xfcb8('0x3c')]};return db[_0xfcb8('0x41')]['count'](_0x434eb9)[_0xfcb8('0x27')](function(_0x4fa2b8){_0x279ed6[_0xfcb8('0x20')]=_0x4fa2b8;if(_0x5688cf['query']['includeAll']){_0x258a14[_0xfcb8('0x42')]=[{'all':!![]}];}return db[_0xfcb8('0x41')][_0xfcb8('0x43')](_0x258a14);})[_0xfcb8('0x27')](function(_0xb7c68a){_0x279ed6[_0xfcb8('0x44')]=_0xb7c68a;return _0x279ed6;})['then'](respondWithFilteredResult(_0x513739,_0x258a14))[_0xfcb8('0x45')](handleError(_0x513739,null));};exports[_0xfcb8('0x46')]=function(_0x3c7744,_0x79676){var _0x3bebdc={'raw':!![],'where':{'id':_0x3c7744[_0xfcb8('0x47')]['id']}},_0x333c22={};_0x333c22['model']=_[_0xfcb8('0x33')](db[_0xfcb8('0x41')]['rawAttributes']);_0x333c22['query']=_['keys'](_0x3c7744[_0xfcb8('0x32')]);_0x333c22[_0xfcb8('0x34')]=_['intersection'](_0x333c22[_0xfcb8('0x31')],_0x333c22[_0xfcb8('0x32')]);_0x3bebdc[_0xfcb8('0x36')]=_[_0xfcb8('0x35')](_0x333c22[_0xfcb8('0x31')],qs[_0xfcb8('0x37')](_0x3c7744['query']['fields']));_0x3bebdc[_0xfcb8('0x36')]=_0x3bebdc[_0xfcb8('0x36')][_0xfcb8('0x38')]?_0x3bebdc[_0xfcb8('0x36')]:_0x333c22[_0xfcb8('0x31')];if(_0x3c7744[_0xfcb8('0x32')][_0xfcb8('0x48')]){_0x3bebdc[_0xfcb8('0x42')]=[{'all':!![]}];}_0x3bebdc=_[_0xfcb8('0x40')]({},_0x3bebdc,_0x3c7744[_0xfcb8('0x49')]);return db[_0xfcb8('0x41')]['find'](_0x3bebdc)['then'](handleEntityNotFound(_0x79676,null))['then'](respondWithResult(_0x79676,null))[_0xfcb8('0x45')](handleError(_0x79676,null));};exports[_0xfcb8('0x4a')]=function(_0x3ca400,_0x397e61){return db[_0xfcb8('0x41')][_0xfcb8('0x4a')](_0x3ca400[_0xfcb8('0x4b')],{})[_0xfcb8('0x27')](respondWithResult(_0x397e61,0xc9))[_0xfcb8('0x45')](handleError(_0x397e61,null));};exports[_0xfcb8('0x25')]=function(_0x12f050,_0x2f6042){if(_0x12f050[_0xfcb8('0x4b')]['id']){delete _0x12f050['body']['id'];}return db[_0xfcb8('0x41')]['find']({'where':{'id':_0x12f050[_0xfcb8('0x47')]['id']}})['then'](handleEntityNotFound(_0x2f6042,null))[_0xfcb8('0x27')](saveUpdates(_0x12f050[_0xfcb8('0x4b')],null))[_0xfcb8('0x27')](respondWithResult(_0x2f6042,null))['catch'](handleError(_0x2f6042,null));};exports[_0xfcb8('0x26')]=function(_0x253716,_0xba2714){return db[_0xfcb8('0x41')][_0xfcb8('0x4c')]({'where':{'id':_0x253716[_0xfcb8('0x47')]['id']}})['then'](handleEntityNotFound(_0xba2714,null))[_0xfcb8('0x27')](removeEntity(_0xba2714,null))[_0xfcb8('0x45')](handleError(_0xba2714,null));};
\ No newline at end of file
index 15b3ef0..7a05ee4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x75e5=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','./analyticTreeReport.attributes','exports','define','analytics_report_trees'];(function(_0x2046dd,_0x40a9ab){var _0x2eb055=function(_0x1c65e8){while(--_0x1c65e8){_0x2046dd['push'](_0x2046dd['shift']());}};_0x2eb055(++_0x40a9ab);}(_0x75e5,0x160));var _0x575e=function(_0x1e182d,_0x4f35c2){_0x1e182d=_0x1e182d-0x0;var _0x5627c6=_0x75e5[_0x1e182d];return _0x5627c6;};'use strict';var _=require(_0x575e('0x0'));var util=require(_0x575e('0x1'));var logger=require(_0x575e('0x2'))(_0x575e('0x3'));var moment=require(_0x575e('0x4'));var BPromise=require(_0x575e('0x5'));var rp=require(_0x575e('0x6'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x575e('0x7'));module[_0x575e('0x8')]=function(_0x13223d,_0x493105){return _0x13223d[_0x575e('0x9')]('AnalyticTreeReport',attributes,{'tableName':_0x575e('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xfa6e=['define','AnalyticTreeReport','analytics_report_trees','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./analyticTreeReport.attributes','exports'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xfa6e,0xc6));var _0xefa6=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xfa6e[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0xefa6('0x0'));var util=require(_0xefa6('0x1'));var logger=require(_0xefa6('0x2'))(_0xefa6('0x3'));var moment=require(_0xefa6('0x4'));var BPromise=require(_0xefa6('0x5'));var rp=require(_0xefa6('0x6'));var fs=require('fs');var path=require(_0xefa6('0x7'));var rimraf=require(_0xefa6('0x8'));var config=require(_0xefa6('0x9'));var attributes=require(_0xefa6('0xa'));module[_0xefa6('0xb')]=function(_0x4ae269,_0xf7b683){return _0x4ae269[_0xefa6('0xc')](_0xefa6('0xd'),attributes,{'tableName':_0xefa6('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index d2ed2f0..a72efaa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['info','AnalyticTreeReport,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x7a54,0x106));var _0x47a5=function(_0x1101d7,_0x409c83){_0x1101d7=_0x1101d7-0x0;var _0x5015cb=_0x7a54[_0x1101d7];return _0x5015cb;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var BPromise=require('bluebird');var rs=require(_0x47a5('0x3'));var fs=require('fs');var Redis=require(_0x47a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x47a5('0x5'));var logger=require(_0x47a5('0x6'))(_0x47a5('0x7'));var config=require(_0x47a5('0x8'));var jayson=require(_0x47a5('0x9'));var client=jayson['client'][_0x47a5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x59199c,_0x343372,_0x30e405){return new BPromise(function(_0x506eda,_0x194fb0){return client['request'](_0x59199c,_0x30e405)['then'](function(_0x582352){logger[_0x47a5('0xb')](_0x47a5('0xc'),_0x343372,'request\x20sent');logger[_0x47a5('0xd')]('AnalyticTreeReport,\x20%s,\x20%s,\x20%s',_0x343372,'request\x20sent',JSON[_0x47a5('0xe')](_0x582352));if(_0x582352[_0x47a5('0xf')]){if(_0x582352[_0x47a5('0xf')][_0x47a5('0x10')]===0x1f4){logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')]['message']);return _0x194fb0(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);return _0x506eda(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}else{logger['info'](_0x47a5('0xc'),_0x343372,_0x47a5('0x12'));_0x506eda(_0x582352[_0x47a5('0x13')][_0x47a5('0x11')]);}})[_0x47a5('0x14')](function(_0x574af6){logger['error'](_0x47a5('0xc'),_0x343372,_0x574af6);_0x194fb0(_0x574af6);});});}
\ No newline at end of file
+var _0xc4aa=['moment','bluebird','randomstring','ioredis','rpc','../../config/environment','jayson/promise','client','http','request','then','AnalyticTreeReport,\x20%s,\x20%s','request\x20sent','debug','error','code','message','info','catch','lodash','util'];(function(_0x458ca4,_0x4bbd3c){var _0x45abc0=function(_0x2e069d){while(--_0x2e069d){_0x458ca4['push'](_0x458ca4['shift']());}};_0x45abc0(++_0x4bbd3c);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x5f1391,_0x19c132){_0x5f1391=_0x5f1391-0x0;var _0x50ebe3=_0xc4aa[_0x5f1391];return _0x50ebe3;};'use strict';var _=require(_0xac4a('0x0'));var util=require(_0xac4a('0x1'));var moment=require(_0xac4a('0x2'));var BPromise=require(_0xac4a('0x3'));var rs=require(_0xac4a('0x4'));var fs=require('fs');var Redis=require(_0xac4a('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xac4a('0x6'));var config=require(_0xac4a('0x7'));var jayson=require(_0xac4a('0x8'));var client=jayson[_0xac4a('0x9')][_0xac4a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x15cd34,_0x3ef77c,_0x10525b){return new BPromise(function(_0x5c6179,_0x5b8339){return client[_0xac4a('0xb')](_0x15cd34,_0x10525b)[_0xac4a('0xc')](function(_0x26ec84){logger['info'](_0xac4a('0xd'),_0x3ef77c,_0xac4a('0xe'));logger[_0xac4a('0xf')]('AnalyticTreeReport,\x20%s,\x20%s,\x20%s',_0x3ef77c,_0xac4a('0xe'),JSON['stringify'](_0x26ec84));if(_0x26ec84[_0xac4a('0x10')]){if(_0x26ec84['error'][_0xac4a('0x11')]===0x1f4){logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x26ec84['error'][_0xac4a('0x12')]);return _0x5b8339(_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);}logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);return _0x5c6179(_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);}else{logger[_0xac4a('0x13')](_0xac4a('0xd'),_0x3ef77c,_0xac4a('0xe'));_0x5c6179(_0x26ec84['result'][_0xac4a('0x12')]);}})[_0xac4a('0x14')](function(_0x23eb66){logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x23eb66);_0x5b8339(_0x23eb66);});});}
\ No newline at end of file
index 4faba83..8eb0c41 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaeca=['path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./analyticTreeReport.controller','isAuthenticated','get','show','create','put','/:id','update','delete','exports'];(function(_0x52660e,_0x4bae6b){var _0x2fd1a3=function(_0x2caaaf){while(--_0x2caaaf){_0x52660e['push'](_0x52660e['shift']());}};_0x2fd1a3(++_0x4bae6b);}(_0xaeca,0x140));var _0xaaec=function(_0x9c0817,_0x50058d){_0x9c0817=_0x9c0817-0x0;var _0x396086=_0xaeca[_0x9c0817];return _0x396086;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xaaec('0x0'));var timeout=require(_0xaaec('0x1'));var express=require(_0xaaec('0x2'));var router=express['Router']();var fs_extra=require(_0xaaec('0x3'));var auth=require(_0xaaec('0x4'));var interaction=require(_0xaaec('0x5'));var config=require('../../config/environment');var controller=require(_0xaaec('0x6'));router['get']('/',auth[_0xaaec('0x7')](),controller['index']);router[_0xaaec('0x8')]('/:id',auth[_0xaaec('0x7')](),controller[_0xaaec('0x9')]);router['post']('/',auth[_0xaaec('0x7')](),controller[_0xaaec('0xa')]);router[_0xaaec('0xb')](_0xaaec('0xc'),auth['isAuthenticated'](),controller[_0xaaec('0xd')]);router[_0xaaec('0xe')](_0xaaec('0xc'),auth[_0xaaec('0x7')](),controller['destroy']);module[_0xaaec('0xf')]=router;
\ No newline at end of file
+var _0x64f6=['get','isAuthenticated','index','/:id','put','update','delete','exports','multer','util','path','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x1741d4,_0xbbafd3){var _0x489fc3=function(_0x10b95f){while(--_0x10b95f){_0x1741d4['push'](_0x1741d4['shift']());}};_0x489fc3(++_0xbbafd3);}(_0x64f6,0xad));var _0x664f=function(_0x2bb269,_0x20ee77){_0x2bb269=_0x2bb269-0x0;var _0x515d7e=_0x64f6[_0x2bb269];return _0x515d7e;};'use strict';var multer=require(_0x664f('0x0'));var util=require(_0x664f('0x1'));var path=require(_0x664f('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0x664f('0x3'));var auth=require(_0x664f('0x4'));var interaction=require(_0x664f('0x5'));var config=require(_0x664f('0x6'));var controller=require('./analyticTreeReport.controller');router[_0x664f('0x7')]('/',auth[_0x664f('0x8')](),controller[_0x664f('0x9')]);router['get'](_0x664f('0xa'),auth[_0x664f('0x8')](),controller['show']);router['post']('/',auth[_0x664f('0x8')](),controller['create']);router[_0x664f('0xb')](_0x664f('0xa'),auth[_0x664f('0x8')](),controller[_0x664f('0xc')]);router[_0x664f('0xd')](_0x664f('0xa'),auth[_0x664f('0x8')](),controller['destroy']);module[_0x664f('0xe')]=router;
\ No newline at end of file
index 6523bbb..53a5749 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2b84=['STRING','sequelize'];(function(_0x22ae7c,_0x1d3152){var _0x286eb5=function(_0x5a641f){while(--_0x5a641f){_0x22ae7c['push'](_0x22ae7c['shift']());}};_0x286eb5(++_0x1d3152);}(_0x2b84,0x105));var _0x42b8=function(_0xf50820,_0x56f041){_0xf50820=_0xf50820-0x0;var _0x2a9b10=_0x2b84[_0xf50820];return _0x2a9b10;};'use strict';var Sequelize=require(_0x42b8('0x0'));module['exports']={'name':{'type':Sequelize[_0x42b8('0x1')]},'basename':{'type':Sequelize[_0x42b8('0x1')]},'type':{'type':Sequelize[_0x42b8('0x1')]}};
\ No newline at end of file
+var _0x6c96=['STRING','sequelize'];(function(_0xc59601,_0x3378f1){var _0x2292f0=function(_0x2e7546){while(--_0x2e7546){_0xc59601['push'](_0xc59601['shift']());}};_0x2292f0(++_0x3378f1);}(_0x6c96,0x1c1));var _0x66c9=function(_0x47c35f,_0x5331ed){_0x47c35f=_0x47c35f-0x0;var _0x5c5773=_0x6c96[_0x47c35f];return _0x5c5773;};'use strict';var Sequelize=require(_0x66c9('0x0'));module['exports']={'name':{'type':Sequelize[_0x66c9('0x1')]},'basename':{'type':Sequelize[_0x66c9('0x1')]},'type':{'type':Sequelize['STRING']}};
\ No newline at end of file
index fcd6fd9..597c051 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbcb8=['include','findAll','rows','catch','show','params','includeAll','find','clone','length','omit','createdAt','body','create','destroy','file','originalname','basename','filename','type','mimetype','download','ChatOfflineMessageId','join','offline-chat/','eml-format','zip-dir','request-promise','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','limit','count','Content-Range','apply','save','update','then','stack','name','map','Attachment','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options'];(function(_0x41064d,_0x4ead45){var _0x23ee30=function(_0x151d50){while(--_0x151d50){_0x41064d['push'](_0x41064d['shift']());}};_0x23ee30(++_0x4ead45);}(_0xbcb8,0x1b8));var _0x8bcb=function(_0x54a73b,_0x1993f2){_0x54a73b=_0x54a73b-0x0;var _0x4ebec2=_0xbcb8[_0x54a73b];return _0x4ebec2;};'use strict';var emlformat=require(_0x8bcb('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x8bcb('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x8bcb('0x2'));var moment=require('moment');var BPromise=require(_0x8bcb('0x3'));var Mustache=require(_0x8bcb('0x4'));var util=require(_0x8bcb('0x5'));var path=require('path');var sox=require(_0x8bcb('0x6'));var csv=require(_0x8bcb('0x7'));var ejs=require(_0x8bcb('0x8'));var fs=require('fs');var fs_extra=require(_0x8bcb('0x9'));var _=require('lodash');var squel=require(_0x8bcb('0xa'));var crypto=require(_0x8bcb('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x8bcb('0xc'));var toCsv=require(_0x8bcb('0x7'));var querystring=require(_0x8bcb('0xd'));var Papa=require('papaparse');var Redis=require(_0x8bcb('0xe'));var authService=require(_0x8bcb('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x8bcb('0x10'));var hardwareService=require(_0x8bcb('0x11'));var logger=require(_0x8bcb('0x12'))(_0x8bcb('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x8bcb('0x14'));var db=require(_0x8bcb('0x15'))['db'];function respondWithStatusCode(_0x49a5e0,_0x393ff9){_0x393ff9=_0x393ff9||0xcc;return function(_0x3bfdbd){if(_0x3bfdbd){return _0x49a5e0[_0x8bcb('0x16')](_0x393ff9);}return _0x49a5e0['status'](_0x393ff9)[_0x8bcb('0x17')]();};}function respondWithResult(_0x226b03,_0x26f2f1){_0x26f2f1=_0x26f2f1||0xc8;return function(_0x46b89a){if(_0x46b89a){return _0x226b03[_0x8bcb('0x18')](_0x26f2f1)[_0x8bcb('0x19')](_0x46b89a);}};}function respondWithFilteredResult(_0x544dd9,_0x4b8858){return function(_0x58801f){if(_0x58801f){var _0x152f56=typeof _0x4b8858[_0x8bcb('0x1a')]==='undefined'&&typeof _0x4b8858[_0x8bcb('0x1b')]==='undefined';var _0x3818eb=_0x58801f[_0x8bcb('0x1c')];var _0x4ed1e8=_0x152f56?0x0:_0x4b8858[_0x8bcb('0x1a')];var _0x221f4f=_0x152f56?_0x58801f[_0x8bcb('0x1c')]:_0x4b8858[_0x8bcb('0x1a')]+_0x4b8858['limit'];var _0x27fad0;if(_0x221f4f>=_0x3818eb){_0x221f4f=_0x3818eb;_0x27fad0=0xc8;}else{_0x27fad0=0xce;}_0x544dd9[_0x8bcb('0x18')](_0x27fad0);return _0x544dd9['set'](_0x8bcb('0x1d'),_0x4ed1e8+'-'+_0x221f4f+'/'+_0x3818eb)['json'](_0x58801f);}return null;};}function patchUpdates(_0x26a2e1){return function(_0x26297a){try{jsonpatch[_0x8bcb('0x1e')](_0x26297a,_0x26a2e1,!![]);}catch(_0xc02234){return BPromise['reject'](_0xc02234);}return _0x26297a[_0x8bcb('0x1f')]();};}function saveUpdates(_0x560cfa,_0x22b2e2){return function(_0x541266){if(_0x541266){return _0x541266[_0x8bcb('0x20')](_0x560cfa)[_0x8bcb('0x21')](function(_0x29ee6a){return _0x29ee6a;});}return null;};}function removeEntity(_0xf25c79,_0x400703){return function(_0x5f1d00){if(_0x5f1d00){return _0x5f1d00['destroy']()[_0x8bcb('0x21')](function(){_0xf25c79[_0x8bcb('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1c128b,_0x315001){return function(_0x4c60c4){if(!_0x4c60c4){_0x1c128b[_0x8bcb('0x16')](0x194);}return _0x4c60c4;};}function handleError(_0x5b2b39,_0x556cb3){_0x556cb3=_0x556cb3||0x1f4;return function(_0x42374b){logger['error'](_0x42374b[_0x8bcb('0x22')]);if(_0x42374b[_0x8bcb('0x23')]){delete _0x42374b[_0x8bcb('0x23')];}_0x5b2b39[_0x8bcb('0x18')](_0x556cb3)['send'](_0x42374b);};}exports['index']=function(_0x18f9de,_0x2b484c){var _0xdab036={},_0x469436={},_0x2dfa22={'count':0x0,'rows':[]};var _0x183fc7=_[_0x8bcb('0x24')](db[_0x8bcb('0x25')][_0x8bcb('0x26')],function(_0x2813da){return{'name':_0x2813da[_0x8bcb('0x27')],'type':_0x2813da['type'][_0x8bcb('0x28')]};});_0x469436[_0x8bcb('0x29')]=_['map'](_0x183fc7,_0x8bcb('0x23'));_0x469436[_0x8bcb('0x2a')]=_[_0x8bcb('0x2b')](_0x18f9de[_0x8bcb('0x2a')]);_0x469436[_0x8bcb('0x2c')]=_[_0x8bcb('0x2d')](_0x469436[_0x8bcb('0x29')],_0x469436['query']);_0xdab036[_0x8bcb('0x2e')]=_['intersection'](_0x469436[_0x8bcb('0x29')],qs[_0x8bcb('0x2f')](_0x18f9de[_0x8bcb('0x2a')][_0x8bcb('0x2f')]));_0xdab036[_0x8bcb('0x2e')]=_0xdab036[_0x8bcb('0x2e')]['length']?_0xdab036[_0x8bcb('0x2e')]:_0x469436['model'];if(!_0x18f9de[_0x8bcb('0x2a')][_0x8bcb('0x30')](_0x8bcb('0x31'))){_0xdab036[_0x8bcb('0x1b')]=qs[_0x8bcb('0x1b')](_0x18f9de['query'][_0x8bcb('0x1b')]);_0xdab036[_0x8bcb('0x1a')]=qs[_0x8bcb('0x1a')](_0x18f9de[_0x8bcb('0x2a')][_0x8bcb('0x1a')]);}_0xdab036[_0x8bcb('0x32')]=qs[_0x8bcb('0x33')](_0x18f9de['query'][_0x8bcb('0x33')]);_0xdab036['where']=qs[_0x8bcb('0x2c')](_[_0x8bcb('0x34')](_0x18f9de[_0x8bcb('0x2a')],_0x469436[_0x8bcb('0x2c')]),_0x183fc7);if(_0x18f9de[_0x8bcb('0x2a')][_0x8bcb('0x35')]){_0xdab036[_0x8bcb('0x36')]=_[_0x8bcb('0x37')](_0xdab036[_0x8bcb('0x36')],{'$or':_[_0x8bcb('0x24')](_0x183fc7,function(_0x476fa8){if(_0x476fa8['type']!==_0x8bcb('0x38')){var _0x57dda7={};_0x57dda7[_0x476fa8[_0x8bcb('0x23')]]={'$like':'%'+_0x18f9de['query'][_0x8bcb('0x35')]+'%'};return _0x57dda7;}})});}_0xdab036=_[_0x8bcb('0x37')]({},_0xdab036,_0x18f9de[_0x8bcb('0x39')]);var _0x56c44c={'where':_0xdab036[_0x8bcb('0x36')]};return db[_0x8bcb('0x25')][_0x8bcb('0x1c')](_0x56c44c)['then'](function(_0x4a2314){_0x2dfa22['count']=_0x4a2314;if(_0x18f9de[_0x8bcb('0x2a')]['includeAll']){_0xdab036[_0x8bcb('0x3a')]=[{'all':!![]}];}return db[_0x8bcb('0x25')][_0x8bcb('0x3b')](_0xdab036);})[_0x8bcb('0x21')](function(_0x583154){_0x2dfa22[_0x8bcb('0x3c')]=_0x583154;return _0x2dfa22;})[_0x8bcb('0x21')](respondWithFilteredResult(_0x2b484c,_0xdab036))[_0x8bcb('0x3d')](handleError(_0x2b484c,null));};exports[_0x8bcb('0x3e')]=function(_0x20848d,_0x2f2805){var _0x16c444={'raw':!![],'where':{'id':_0x20848d[_0x8bcb('0x3f')]['id']}},_0x398b1b={};_0x398b1b[_0x8bcb('0x29')]=_[_0x8bcb('0x2b')](db[_0x8bcb('0x25')][_0x8bcb('0x26')]);_0x398b1b['query']=_[_0x8bcb('0x2b')](_0x20848d[_0x8bcb('0x2a')]);_0x398b1b[_0x8bcb('0x2c')]=_[_0x8bcb('0x2d')](_0x398b1b[_0x8bcb('0x29')],_0x398b1b[_0x8bcb('0x2a')]);_0x16c444[_0x8bcb('0x2e')]=_[_0x8bcb('0x2d')](_0x398b1b[_0x8bcb('0x29')],qs[_0x8bcb('0x2f')](_0x20848d[_0x8bcb('0x2a')][_0x8bcb('0x2f')]));_0x16c444['attributes']=_0x16c444[_0x8bcb('0x2e')]['length']?_0x16c444['attributes']:_0x398b1b[_0x8bcb('0x29')];if(_0x20848d[_0x8bcb('0x2a')][_0x8bcb('0x40')]){_0x16c444[_0x8bcb('0x3a')]=[{'all':!![]}];}_0x16c444=_[_0x8bcb('0x37')]({},_0x16c444,_0x20848d['options']);return db[_0x8bcb('0x25')][_0x8bcb('0x41')](_0x16c444)['then'](handleEntityNotFound(_0x2f2805,null))['then'](respondWithResult(_0x2f2805,null))[_0x8bcb('0x3d')](handleError(_0x2f2805,null));};exports[_0x8bcb('0x42')]=function(_0x5b6ee8,_0x29d03c){var _0x2b2762={'where':{'id':_0x5b6ee8[_0x8bcb('0x3f')]['id']}},_0x438406={};_0x438406['model']=_['keys'](db['Attachment'][_0x8bcb('0x26')]);_0x2b2762['attributes']=_[_0x8bcb('0x2d')](_0x438406[_0x8bcb('0x29')],qs[_0x8bcb('0x2f')](_0x5b6ee8[_0x8bcb('0x2a')][_0x8bcb('0x2f')]));_0x2b2762['attributes']=_0x2b2762[_0x8bcb('0x2e')][_0x8bcb('0x43')]?_0x2b2762[_0x8bcb('0x2e')]:_0x438406['model'];if(_0x5b6ee8[_0x8bcb('0x2a')][_0x8bcb('0x40')]){_0x2b2762[_0x8bcb('0x3a')]=[{'all':!![]}];}_0x2b2762=_[_0x8bcb('0x37')]({},_0x2b2762,_0x5b6ee8[_0x8bcb('0x39')]);return db[_0x8bcb('0x25')][_0x8bcb('0x41')](_0x2b2762)[_0x8bcb('0x21')](handleEntityNotFound(_0x29d03c,null))[_0x8bcb('0x21')](function(_0x46a774){if(_0x46a774){var _0x7d2777=_0x46a774['get']({'plain':!![]});_0x7d2777=qs[_0x8bcb('0x44')](_0x7d2777,['id',_0x8bcb('0x45'),'updatedAt']);_0x5b6ee8[_0x8bcb('0x46')]=_[_0x8bcb('0x44')](_0x5b6ee8[_0x8bcb('0x46')],['id',_0x8bcb('0x45'),'updatedAt']);return db['Attachment'][_0x8bcb('0x47')](_[_0x8bcb('0x37')](_0x7d2777,_0x5b6ee8[_0x8bcb('0x46')]),{'include':_0x5b6ee8[_0x8bcb('0x2a')][_0x8bcb('0x40')]?[{'all':!![]}]:undefined});}})[_0x8bcb('0x21')](respondWithResult(_0x29d03c,0xc9))[_0x8bcb('0x3d')](handleError(_0x29d03c,null));};exports[_0x8bcb('0x20')]=function(_0x5dd5c0,_0x403800){if(_0x5dd5c0[_0x8bcb('0x46')]['id']){delete _0x5dd5c0[_0x8bcb('0x46')]['id'];}return db[_0x8bcb('0x25')][_0x8bcb('0x41')]({'where':{'id':_0x5dd5c0['params']['id']}})[_0x8bcb('0x21')](handleEntityNotFound(_0x403800,null))[_0x8bcb('0x21')](saveUpdates(_0x5dd5c0[_0x8bcb('0x46')],null))[_0x8bcb('0x21')](respondWithResult(_0x403800,null))[_0x8bcb('0x3d')](handleError(_0x403800,null));};exports[_0x8bcb('0x48')]=function(_0x5146ab,_0x780eee){return db[_0x8bcb('0x25')][_0x8bcb('0x41')]({'where':{'id':_0x5146ab[_0x8bcb('0x3f')]['id']}})['then'](handleEntityNotFound(_0x780eee,null))[_0x8bcb('0x21')](removeEntity(_0x780eee,null))[_0x8bcb('0x3d')](handleError(_0x780eee,null));};exports[_0x8bcb('0x47')]=function(_0x4c9e77,_0x37ef0a,_0x237437){_0x4c9e77[_0x8bcb('0x46')]['name']=_0x4c9e77[_0x8bcb('0x49')][_0x8bcb('0x4a')];_0x4c9e77[_0x8bcb('0x46')][_0x8bcb('0x4b')]=_0x4c9e77[_0x8bcb('0x49')][_0x8bcb('0x4c')];_0x4c9e77[_0x8bcb('0x46')][_0x8bcb('0x4d')]=_0x4c9e77['file'][_0x8bcb('0x4e')];return db[_0x8bcb('0x25')][_0x8bcb('0x47')](_0x4c9e77[_0x8bcb('0x46')])[_0x8bcb('0x21')](respondWithResult(_0x37ef0a,0xc9))['catch'](handleError(_0x37ef0a,null));};exports[_0x8bcb('0x4f')]=function(_0x1c732c,_0x3d9d4f,_0x5654c1){return db[_0x8bcb('0x25')]['findOne']({'where':{'id':_0x1c732c[_0x8bcb('0x3f')]['id']},'raw':!![]})[_0x8bcb('0x21')](handleEntityNotFound(_0x3d9d4f,null))['then'](function(_0x57c6b5){if(_0x57c6b5){var _0x2f0a77=_0x57c6b5[_0x8bcb('0x50')]!==null;var _0x34766e=path[_0x8bcb('0x51')](config['root'],'server/files/attachments/');if(_0x2f0a77){_0x34766e=path[_0x8bcb('0x51')](_0x34766e,_0x8bcb('0x52'));}var _0x4fddad=path[_0x8bcb('0x51')](_0x34766e,_0x57c6b5[_0x8bcb('0x4b')]);return _0x3d9d4f[_0x8bcb('0x4f')](_0x4fddad);}})[_0x8bcb('0x3d')](handleError(_0x3d9d4f,null));};
\ No newline at end of file
+var _0x844f=['sort','pick','filters','filter','where','merge','options','includeAll','include','findAll','rows','show','params','rawAttributes','find','catch','clone','get','omit','createdAt','body','create','file','originalname','basename','filename','type','mimetype','download','findOne','ChatOfflineMessageId','join','server/files/attachments/','offline-chat/','rimraf','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','save','update','then','destroy','name','index','map','Attachment','fieldName','key','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','order'];(function(_0x3de4c7,_0x31e5a7){var _0x1ee8ae=function(_0x5f0445){while(--_0x5f0445){_0x3de4c7['push'](_0x3de4c7['shift']());}};_0x1ee8ae(++_0x31e5a7);}(_0x844f,0x18a));var _0xf844=function(_0x265300,_0xeb0366){_0x265300=_0x265300-0x0;var _0x5e2cfc=_0x844f[_0x265300];return _0x5e2cfc;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xf844('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xf844('0x1'));var moment=require(_0xf844('0x2'));var BPromise=require(_0xf844('0x3'));var Mustache=require(_0xf844('0x4'));var util=require(_0xf844('0x5'));var path=require(_0xf844('0x6'));var sox=require(_0xf844('0x7'));var csv=require(_0xf844('0x8'));var ejs=require(_0xf844('0x9'));var fs=require('fs');var fs_extra=require(_0xf844('0xa'));var _=require(_0xf844('0xb'));var squel=require(_0xf844('0xc'));var crypto=require(_0xf844('0xd'));var jsforce=require(_0xf844('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xf844('0xf'));var Redis=require(_0xf844('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xf844('0x11'));var as=require(_0xf844('0x12'));var hardwareService=require(_0xf844('0x13'));var logger=require(_0xf844('0x14'))(_0xf844('0x15'));var utils=require(_0xf844('0x16'));var config=require(_0xf844('0x17'));var licenseUtil=require(_0xf844('0x18'));var db=require(_0xf844('0x19'))['db'];function respondWithStatusCode(_0x5062c2,_0x2b5573){_0x2b5573=_0x2b5573||0xcc;return function(_0x3f5f8d){if(_0x3f5f8d){return _0x5062c2[_0xf844('0x1a')](_0x2b5573);}return _0x5062c2[_0xf844('0x1b')](_0x2b5573)[_0xf844('0x1c')]();};}function respondWithResult(_0x40cb22,_0x2be3b8){_0x2be3b8=_0x2be3b8||0xc8;return function(_0x1ea719){if(_0x1ea719){return _0x40cb22[_0xf844('0x1b')](_0x2be3b8)[_0xf844('0x1d')](_0x1ea719);}};}function respondWithFilteredResult(_0x2611d7,_0x4227dd){return function(_0x4c3403){if(_0x4c3403){var _0x560a90=typeof _0x4227dd[_0xf844('0x1e')]===_0xf844('0x1f')&&typeof _0x4227dd[_0xf844('0x20')]==='undefined';var _0x34f792=_0x4c3403[_0xf844('0x21')];var _0x13fe78=_0x560a90?0x0:_0x4227dd[_0xf844('0x1e')];var _0x2f1619=_0x560a90?_0x4c3403[_0xf844('0x21')]:_0x4227dd[_0xf844('0x1e')]+_0x4227dd['limit'];var _0x39ff62;if(_0x2f1619>=_0x34f792){_0x2f1619=_0x34f792;_0x39ff62=0xc8;}else{_0x39ff62=0xce;}_0x2611d7['status'](_0x39ff62);return _0x2611d7[_0xf844('0x22')]('Content-Range',_0x13fe78+'-'+_0x2f1619+'/'+_0x34f792)[_0xf844('0x1d')](_0x4c3403);}return null;};}function patchUpdates(_0x2166b7){return function(_0x351569){try{jsonpatch[_0xf844('0x23')](_0x351569,_0x2166b7,!![]);}catch(_0x169d11){return BPromise['reject'](_0x169d11);}return _0x351569[_0xf844('0x24')]();};}function saveUpdates(_0xe8daef,_0x59cbec){return function(_0x55724c){if(_0x55724c){return _0x55724c[_0xf844('0x25')](_0xe8daef)[_0xf844('0x26')](function(_0x4ee358){return _0x4ee358;});}return null;};}function removeEntity(_0x4f605b,_0x4082b6){return function(_0x157632){if(_0x157632){return _0x157632[_0xf844('0x27')]()[_0xf844('0x26')](function(){_0x4f605b['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3363ba,_0x18acbf){return function(_0xa98132){if(!_0xa98132){_0x3363ba[_0xf844('0x1a')](0x194);}return _0xa98132;};}function handleError(_0x213acf,_0x18cddb){_0x18cddb=_0x18cddb||0x1f4;return function(_0x26cf05){logger['error'](_0x26cf05['stack']);if(_0x26cf05[_0xf844('0x28')]){delete _0x26cf05['name'];}_0x213acf['status'](_0x18cddb)['send'](_0x26cf05);};}exports[_0xf844('0x29')]=function(_0x337e73,_0x3709c7){var _0x277bd5={},_0x5061da={},_0x3b2b6b={'count':0x0,'rows':[]};var _0x27589d=_[_0xf844('0x2a')](db[_0xf844('0x2b')]['rawAttributes'],function(_0x53ee7d){return{'name':_0x53ee7d[_0xf844('0x2c')],'type':_0x53ee7d['type'][_0xf844('0x2d')]};});_0x5061da[_0xf844('0x2e')]=_[_0xf844('0x2a')](_0x27589d,_0xf844('0x28'));_0x5061da[_0xf844('0x2f')]=_[_0xf844('0x30')](_0x337e73[_0xf844('0x2f')]);_0x5061da['filters']=_['intersection'](_0x5061da[_0xf844('0x2e')],_0x5061da[_0xf844('0x2f')]);_0x277bd5['attributes']=_[_0xf844('0x31')](_0x5061da['model'],qs[_0xf844('0x32')](_0x337e73[_0xf844('0x2f')][_0xf844('0x32')]));_0x277bd5['attributes']=_0x277bd5[_0xf844('0x33')][_0xf844('0x34')]?_0x277bd5['attributes']:_0x5061da[_0xf844('0x2e')];if(!_0x337e73['query'][_0xf844('0x35')](_0xf844('0x36'))){_0x277bd5['limit']=qs[_0xf844('0x20')](_0x337e73[_0xf844('0x2f')][_0xf844('0x20')]);_0x277bd5[_0xf844('0x1e')]=qs[_0xf844('0x1e')](_0x337e73[_0xf844('0x2f')][_0xf844('0x1e')]);}_0x277bd5[_0xf844('0x37')]=qs[_0xf844('0x38')](_0x337e73[_0xf844('0x2f')][_0xf844('0x38')]);_0x277bd5['where']=qs['filters'](_[_0xf844('0x39')](_0x337e73[_0xf844('0x2f')],_0x5061da[_0xf844('0x3a')]),_0x27589d);if(_0x337e73[_0xf844('0x2f')][_0xf844('0x3b')]){_0x277bd5[_0xf844('0x3c')]=_['merge'](_0x277bd5[_0xf844('0x3c')],{'$or':_[_0xf844('0x2a')](_0x27589d,function(_0x21853e){if(_0x21853e['type']!=='VIRTUAL'){var _0x93a7e7={};_0x93a7e7[_0x21853e['name']]={'$like':'%'+_0x337e73[_0xf844('0x2f')]['filter']+'%'};return _0x93a7e7;}})});}_0x277bd5=_[_0xf844('0x3d')]({},_0x277bd5,_0x337e73[_0xf844('0x3e')]);var _0x4e0f17={'where':_0x277bd5[_0xf844('0x3c')]};return db[_0xf844('0x2b')][_0xf844('0x21')](_0x4e0f17)[_0xf844('0x26')](function(_0x366081){_0x3b2b6b[_0xf844('0x21')]=_0x366081;if(_0x337e73[_0xf844('0x2f')][_0xf844('0x3f')]){_0x277bd5[_0xf844('0x40')]=[{'all':!![]}];}return db[_0xf844('0x2b')][_0xf844('0x41')](_0x277bd5);})[_0xf844('0x26')](function(_0x30b373){_0x3b2b6b[_0xf844('0x42')]=_0x30b373;return _0x3b2b6b;})[_0xf844('0x26')](respondWithFilteredResult(_0x3709c7,_0x277bd5))['catch'](handleError(_0x3709c7,null));};exports[_0xf844('0x43')]=function(_0x49e6d6,_0x263267){var _0x2f2044={'raw':!![],'where':{'id':_0x49e6d6[_0xf844('0x44')]['id']}},_0x1a8233={};_0x1a8233[_0xf844('0x2e')]=_[_0xf844('0x30')](db[_0xf844('0x2b')][_0xf844('0x45')]);_0x1a8233['query']=_[_0xf844('0x30')](_0x49e6d6['query']);_0x1a8233[_0xf844('0x3a')]=_[_0xf844('0x31')](_0x1a8233['model'],_0x1a8233[_0xf844('0x2f')]);_0x2f2044[_0xf844('0x33')]=_[_0xf844('0x31')](_0x1a8233[_0xf844('0x2e')],qs[_0xf844('0x32')](_0x49e6d6[_0xf844('0x2f')][_0xf844('0x32')]));_0x2f2044[_0xf844('0x33')]=_0x2f2044[_0xf844('0x33')][_0xf844('0x34')]?_0x2f2044[_0xf844('0x33')]:_0x1a8233[_0xf844('0x2e')];if(_0x49e6d6[_0xf844('0x2f')][_0xf844('0x3f')]){_0x2f2044['include']=[{'all':!![]}];}_0x2f2044=_[_0xf844('0x3d')]({},_0x2f2044,_0x49e6d6[_0xf844('0x3e')]);return db[_0xf844('0x2b')][_0xf844('0x46')](_0x2f2044)[_0xf844('0x26')](handleEntityNotFound(_0x263267,null))['then'](respondWithResult(_0x263267,null))[_0xf844('0x47')](handleError(_0x263267,null));};exports[_0xf844('0x48')]=function(_0x500887,_0x32e598){var _0x50fdae={'where':{'id':_0x500887[_0xf844('0x44')]['id']}},_0x53e45e={};_0x53e45e['model']=_[_0xf844('0x30')](db['Attachment']['rawAttributes']);_0x50fdae[_0xf844('0x33')]=_[_0xf844('0x31')](_0x53e45e['model'],qs['fields'](_0x500887[_0xf844('0x2f')]['fields']));_0x50fdae['attributes']=_0x50fdae[_0xf844('0x33')][_0xf844('0x34')]?_0x50fdae[_0xf844('0x33')]:_0x53e45e[_0xf844('0x2e')];if(_0x500887[_0xf844('0x2f')][_0xf844('0x3f')]){_0x50fdae[_0xf844('0x40')]=[{'all':!![]}];}_0x50fdae=_[_0xf844('0x3d')]({},_0x50fdae,_0x500887[_0xf844('0x3e')]);return db[_0xf844('0x2b')][_0xf844('0x46')](_0x50fdae)['then'](handleEntityNotFound(_0x32e598,null))['then'](function(_0x5680ed){if(_0x5680ed){var _0x278a78=_0x5680ed[_0xf844('0x49')]({'plain':!![]});_0x278a78=qs[_0xf844('0x4a')](_0x278a78,['id',_0xf844('0x4b'),'updatedAt']);_0x500887[_0xf844('0x4c')]=_[_0xf844('0x4a')](_0x500887[_0xf844('0x4c')],['id','createdAt','updatedAt']);return db[_0xf844('0x2b')]['create'](_[_0xf844('0x3d')](_0x278a78,_0x500887[_0xf844('0x4c')]),{'include':_0x500887[_0xf844('0x2f')][_0xf844('0x3f')]?[{'all':!![]}]:undefined});}})['then'](respondWithResult(_0x32e598,0xc9))['catch'](handleError(_0x32e598,null));};exports['update']=function(_0x3e8260,_0x45f6c0){if(_0x3e8260[_0xf844('0x4c')]['id']){delete _0x3e8260[_0xf844('0x4c')]['id'];}return db[_0xf844('0x2b')][_0xf844('0x46')]({'where':{'id':_0x3e8260[_0xf844('0x44')]['id']}})[_0xf844('0x26')](handleEntityNotFound(_0x45f6c0,null))[_0xf844('0x26')](saveUpdates(_0x3e8260[_0xf844('0x4c')],null))[_0xf844('0x26')](respondWithResult(_0x45f6c0,null))['catch'](handleError(_0x45f6c0,null));};exports[_0xf844('0x27')]=function(_0xdc61db,_0x25df1f){return db[_0xf844('0x2b')][_0xf844('0x46')]({'where':{'id':_0xdc61db[_0xf844('0x44')]['id']}})[_0xf844('0x26')](handleEntityNotFound(_0x25df1f,null))[_0xf844('0x26')](removeEntity(_0x25df1f,null))[_0xf844('0x47')](handleError(_0x25df1f,null));};exports[_0xf844('0x4d')]=function(_0x3cfd23,_0x3048ad,_0x2b0e7d){_0x3cfd23[_0xf844('0x4c')][_0xf844('0x28')]=_0x3cfd23[_0xf844('0x4e')][_0xf844('0x4f')];_0x3cfd23[_0xf844('0x4c')][_0xf844('0x50')]=_0x3cfd23['file'][_0xf844('0x51')];_0x3cfd23[_0xf844('0x4c')][_0xf844('0x52')]=_0x3cfd23[_0xf844('0x4e')][_0xf844('0x53')];return db[_0xf844('0x2b')][_0xf844('0x4d')](_0x3cfd23[_0xf844('0x4c')])[_0xf844('0x26')](respondWithResult(_0x3048ad,0xc9))[_0xf844('0x47')](handleError(_0x3048ad,null));};exports[_0xf844('0x54')]=function(_0x86dbe5,_0x110ec5,_0x55101e){return db[_0xf844('0x2b')][_0xf844('0x55')]({'where':{'id':_0x86dbe5['params']['id']},'raw':!![]})[_0xf844('0x26')](handleEntityNotFound(_0x110ec5,null))[_0xf844('0x26')](function(_0xa61bc6){if(_0xa61bc6){var _0x2b8bed=_0xa61bc6[_0xf844('0x56')]!==null;var _0x387c4a=path[_0xf844('0x57')](config['root'],_0xf844('0x58'));if(_0x2b8bed){_0x387c4a=path[_0xf844('0x57')](_0x387c4a,_0xf844('0x59'));}var _0x8b4804=path['join'](_0x387c4a,_0xa61bc6[_0xf844('0x50')]);return _0x110ec5[_0xf844('0x54')](_0x8b4804);}})[_0xf844('0x47')](handleError(_0x110ec5,null));};
\ No newline at end of file
index 18b4db2..a6d433c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa31d=['../../config/environment','./attachment.attributes','exports','define','Attachment','attachments','../../config/logger','api','moment','bluebird','path'];(function(_0x27d958,_0x29ef87){var _0x53e63e=function(_0x4130ec){while(--_0x4130ec){_0x27d958['push'](_0x27d958['shift']());}};_0x53e63e(++_0x29ef87);}(_0xa31d,0x1d4));var _0xda31=function(_0x5d5bcb,_0x25e2ea){_0x5d5bcb=_0x5d5bcb-0x0;var _0x4ea5eb=_0xa31d[_0x5d5bcb];return _0x4ea5eb;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xda31('0x0'))(_0xda31('0x1'));var moment=require(_0xda31('0x2'));var BPromise=require(_0xda31('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xda31('0x4'));var rimraf=require('rimraf');var config=require(_0xda31('0x5'));var attributes=require(_0xda31('0x6'));module[_0xda31('0x7')]=function(_0xe94201,_0x5878e2){return _0xe94201[_0xda31('0x8')](_0xda31('0x9'),attributes,{'tableName':_0xda31('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xfc85=['lodash','util','bluebird','path','rimraf','../../config/environment','exports','define','Attachment'];(function(_0x410327,_0x247739){var _0x210778=function(_0x547357){while(--_0x547357){_0x410327['push'](_0x410327['shift']());}};_0x210778(++_0x247739);}(_0xfc85,0x120));var _0x5fc8=function(_0xfbec2b,_0x221f4a){_0xfbec2b=_0xfbec2b-0x0;var _0x36e4d5=_0xfc85[_0xfbec2b];return _0x36e4d5;};'use strict';var _=require(_0x5fc8('0x0'));var util=require(_0x5fc8('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x5fc8('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x5fc8('0x3'));var rimraf=require(_0x5fc8('0x4'));var config=require(_0x5fc8('0x5'));var attributes=require('./attachment.attributes');module[_0x5fc8('0x6')]=function(_0x1dc111,_0x52e7b6){return _0x1dc111[_0x5fc8('0x7')](_0x5fc8('0x8'),attributes,{'tableName':'attachments','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index bc11a93..bd9d411 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x12fd=['options','raw','debug','stringify','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','info','Attachment,\x20%s,\x20%s,\x20%s','request\x20sent','error','message','Attachment,\x20%s,\x20%s','result','catch','CreateAttachment','Attachment'];(function(_0x4ab11f,_0x22687d){var _0x5e4885=function(_0x50aa){while(--_0x50aa){_0x4ab11f['push'](_0x4ab11f['shift']());}};_0x5e4885(++_0x22687d);}(_0x12fd,0x199));var _0xd12f=function(_0x269979,_0x54a6c3){_0x269979=_0x269979-0x0;var _0x4c45ca=_0x12fd[_0x269979];return _0x4c45ca;};'use strict';var _=require(_0xd12f('0x0'));var util=require(_0xd12f('0x1'));var moment=require(_0xd12f('0x2'));var BPromise=require(_0xd12f('0x3'));var rs=require(_0xd12f('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd12f('0x5'))['db'];var utils=require(_0xd12f('0x6'));var logger=require(_0xd12f('0x7'))(_0xd12f('0x8'));var config=require(_0xd12f('0x9'));var jayson=require(_0xd12f('0xa'));var client=jayson['client'][_0xd12f('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5ca6e6,_0x285abf,_0x193e89){return new BPromise(function(_0x62de68,_0x40aaf8){return client['request'](_0x5ca6e6,_0x193e89)[_0xd12f('0xc')](function(_0x539473){logger[_0xd12f('0xd')]('Attachment,\x20%s,\x20%s',_0x285abf,'request\x20sent');logger['debug'](_0xd12f('0xe'),_0x285abf,_0xd12f('0xf'),JSON['stringify'](_0x539473));if(_0x539473['error']){if(_0x539473['error']['code']===0x1f4){logger[_0xd12f('0x10')]('Attachment,\x20%s,\x20%s',_0x285abf,_0x539473[_0xd12f('0x10')][_0xd12f('0x11')]);return _0x40aaf8(_0x539473['error'][_0xd12f('0x11')]);}logger[_0xd12f('0x10')]('Attachment,\x20%s,\x20%s',_0x285abf,_0x539473['error']['message']);return _0x62de68(_0x539473[_0xd12f('0x10')][_0xd12f('0x11')]);}else{logger[_0xd12f('0xd')](_0xd12f('0x12'),_0x285abf,_0xd12f('0xf'));_0x62de68(_0x539473[_0xd12f('0x13')][_0xd12f('0x11')]);}})[_0xd12f('0x14')](function(_0x4769a2){logger['error']('Attachment,\x20%s,\x20%s',_0x285abf,_0x4769a2);_0x40aaf8(_0x4769a2);});});}exports[_0xd12f('0x15')]=function(_0x45ff4d){var _0x58a653=this;return new Promise(function(_0x14c619,_0x12c884){return db[_0xd12f('0x16')]['create'](_0x45ff4d['body'],{'raw':_0x45ff4d[_0xd12f('0x17')]?_0x45ff4d[_0xd12f('0x17')][_0xd12f('0x18')]===undefined?!![]:![]:!![]})[_0xd12f('0xc')](function(_0x410073){logger[_0xd12f('0xd')]('CreateAttachment',_0x45ff4d);logger[_0xd12f('0x19')](_0xd12f('0x15'),_0x45ff4d,JSON[_0xd12f('0x1a')](_0x410073));_0x14c619(_0x410073);})[_0xd12f('0x14')](function(_0x3a0c41){logger[_0xd12f('0x10')](_0xd12f('0x15'),_0x3a0c41[_0xd12f('0x11')],_0x45ff4d);_0x12c884(_0x58a653[_0xd12f('0x10')](0x1f4,_0x3a0c41[_0xd12f('0x11')]));});});};
\ No newline at end of file
+var _0x6658=['then','info','Attachment,\x20%s,\x20%s','request\x20sent','debug','Attachment,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateAttachment','Attachment','create','body','options','raw','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','http','request'];(function(_0x3016fb,_0x159c85){var _0x2c5a14=function(_0x19247f){while(--_0x19247f){_0x3016fb['push'](_0x3016fb['shift']());}};_0x2c5a14(++_0x159c85);}(_0x6658,0x198));var _0x8665=function(_0x454162,_0x4ecb89){_0x454162=_0x454162-0x0;var _0x245bbc=_0x6658[_0x454162];return _0x245bbc;};'use strict';var _=require(_0x8665('0x0'));var util=require(_0x8665('0x1'));var moment=require(_0x8665('0x2'));var BPromise=require(_0x8665('0x3'));var rs=require(_0x8665('0x4'));var fs=require('fs');var Redis=require(_0x8665('0x5'));var db=require(_0x8665('0x6'))['db'];var utils=require(_0x8665('0x7'));var logger=require('../../config/logger')(_0x8665('0x8'));var config=require(_0x8665('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0x8665('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x290df7,_0x24c89f,_0x242f58){return new BPromise(function(_0xe73687,_0x861e11){return client[_0x8665('0xb')](_0x290df7,_0x242f58)[_0x8665('0xc')](function(_0x5c25bf){logger[_0x8665('0xd')](_0x8665('0xe'),_0x24c89f,_0x8665('0xf'));logger[_0x8665('0x10')](_0x8665('0x11'),_0x24c89f,_0x8665('0xf'),JSON[_0x8665('0x12')](_0x5c25bf));if(_0x5c25bf[_0x8665('0x13')]){if(_0x5c25bf[_0x8665('0x13')][_0x8665('0x14')]===0x1f4){logger[_0x8665('0x13')](_0x8665('0xe'),_0x24c89f,_0x5c25bf[_0x8665('0x13')][_0x8665('0x15')]);return _0x861e11(_0x5c25bf['error'][_0x8665('0x15')]);}logger['error'](_0x8665('0xe'),_0x24c89f,_0x5c25bf[_0x8665('0x13')][_0x8665('0x15')]);return _0xe73687(_0x5c25bf[_0x8665('0x13')][_0x8665('0x15')]);}else{logger[_0x8665('0xd')]('Attachment,\x20%s,\x20%s',_0x24c89f,_0x8665('0xf'));_0xe73687(_0x5c25bf[_0x8665('0x16')]['message']);}})[_0x8665('0x17')](function(_0x53dcb5){logger[_0x8665('0x13')](_0x8665('0xe'),_0x24c89f,_0x53dcb5);_0x861e11(_0x53dcb5);});});}exports[_0x8665('0x18')]=function(_0x50ba7d){var _0x331e01=this;return new Promise(function(_0x235617,_0x5b7984){return db[_0x8665('0x19')][_0x8665('0x1a')](_0x50ba7d[_0x8665('0x1b')],{'raw':_0x50ba7d['options']?_0x50ba7d[_0x8665('0x1c')][_0x8665('0x1d')]===undefined?!![]:![]:!![]})[_0x8665('0xc')](function(_0x549a0a){logger['info']('CreateAttachment',_0x50ba7d);logger[_0x8665('0x10')]('CreateAttachment',_0x50ba7d,JSON[_0x8665('0x12')](_0x549a0a));_0x235617(_0x549a0a);})['catch'](function(_0x34b622){logger['error']('CreateAttachment',_0x34b622[_0x8665('0x15')],_0x50ba7d);_0x5b7984(_0x331e01[_0x8665('0x13')](0x1f4,_0x34b622['message']));});});};
\ No newline at end of file
index 1b184cd..d56a6aa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-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(_0x431c42,_0x336574){var _0x16f9df=function(_0x3956fd){while(--_0x3956fd){_0x431c42['push'](_0x431c42['shift']());}};_0x16f9df(++_0x336574);}(_0xadb5,0xad));var _0x5adb=function(_0x19c2de,_0x5318bd){_0x19c2de=_0x19c2de-0x0;var _0x226c87=_0xadb5[_0x19c2de];return _0x226c87;};'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
+var _0x5f66=['fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','/:id','show','/:id/download','/:id/clone','clone','diskStorage','root','format','%s-%s','now','originalname','replace','post','single','file','create','delete','destroy','exports','util','connect-timeout','express','Router'];(function(_0x1602ef,_0x447aba){var _0x5870ee=function(_0x4d94e7){while(--_0x4d94e7){_0x1602ef['push'](_0x1602ef['shift']());}};_0x5870ee(++_0x447aba);}(_0x5f66,0x1a0));var _0x65f6=function(_0x31e29a,_0x349c9b){_0x31e29a=_0x31e29a-0x0;var _0x32d892=_0x5f66[_0x31e29a];return _0x32d892;};'use strict';var multer=require('multer');var util=require(_0x65f6('0x0'));var path=require('path');var timeout=require(_0x65f6('0x1'));var express=require(_0x65f6('0x2'));var router=express[_0x65f6('0x3')]();var fs_extra=require(_0x65f6('0x4'));var auth=require(_0x65f6('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x65f6('0x6'));var controller=require('./attachment.controller');router[_0x65f6('0x7')]('/',auth[_0x65f6('0x8')](),controller['index']);router['get'](_0x65f6('0x9'),auth[_0x65f6('0x8')](),controller[_0x65f6('0xa')]);router[_0x65f6('0x7')](_0x65f6('0xb'),auth[_0x65f6('0x8')](),controller['download']);router['post'](_0x65f6('0xc'),auth[_0x65f6('0x8')](),controller[_0x65f6('0xd')]);var upload=multer({'storage':multer[_0x65f6('0xe')]({'destination':function(_0x50d26d,_0x41a7fd,_0x571436){_0x571436(null,path['join'](config[_0x65f6('0xf')],'server/files/attachments/'));},'filename':function(_0x419819,_0x4862a5,_0x2f964a){_0x2f964a(null,util[_0x65f6('0x10')](_0x65f6('0x11'),Date[_0x65f6('0x12')](),_0x4862a5[_0x65f6('0x13')][_0x65f6('0x14')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0x65f6('0x15')]('/',upload[_0x65f6('0x16')](_0x65f6('0x17')),controller[_0x65f6('0x18')]);router['put'](_0x65f6('0x9'),auth['isAuthenticated'](),controller['update']);router[_0x65f6('0x19')](_0x65f6('0x9'),auth[_0x65f6('0x8')](),controller[_0x65f6('0x1a')]);module[_0x65f6('0x1b')]=router;
\ No newline at end of file
index 5fbcdd9..e13c549 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbb6b=['url','domain','authenticate','Error\x20authenticate\x20%s:\x20%s','inspect','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','error','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20configured','Setting','adSsoEnabled','blockDuration','then','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20enabled','findOne','name','password','salt','role','blockedAt','online','admin','user','agent','disabled','blocked','add','minutes','clearBlockUser','getLicense','catch','status','send','message','login','ad-login','signToken','use','User','passport-local','Strategy','activedirectory2','bluebird','util','../../mysqldb','../../components/auth/service','../../config/utils','../../config/environment','api','activedirectory'];(function(_0x81dcac,_0x8ff7db){var _0xc7803b=function(_0x499b29){while(--_0x499b29){_0x81dcac['push'](_0x81dcac['shift']());}};_0xc7803b(++_0x8ff7db);}(_0xbb6b,0xea));var _0xbbb6=function(_0x5f5913,_0x2f50d1){_0x5f5913=_0x5f5913-0x0;var _0x377199=_0xbb6b[_0x5f5913];return _0x377199;};'use strict';var passport=require('passport');var LocalStrategy=require(_0xbbb6('0x0'))[_0xbbb6('0x1')];var moment=require('moment');var ActiveDirectory=require(_0xbbb6('0x2'));var BPromise=require(_0xbbb6('0x3'));var util=require(_0xbbb6('0x4'));var db=require(_0xbbb6('0x5'))['db'];var authService=require(_0xbbb6('0x6'));var utils=require(_0xbbb6('0x7'));var config=require(_0xbbb6('0x8'));var logger=require('../../config/logger')(_0xbbb6('0x9'));function isActiveDirectoryConfigured(_0x1b7052){var _0x5e3c3c=![];if(typeof _0x1b7052[_0xbbb6('0xa')]!=='undefined'){_0x5e3c3c=_0x1b7052[_0xbbb6('0xa')]['baseDN']&&_0x1b7052[_0xbbb6('0xa')][_0xbbb6('0xb')]&&_0x1b7052[_0xbbb6('0xa')][_0xbbb6('0xc')];}return _0x5e3c3c;}function adAuthenticate(_0x5cd12d,_0x457fdd,_0x14c0c6){return new BPromise(function(_0x193cc6,_0x162f58){try{var _0x4a1ef3=new ActiveDirectory(_0x5cd12d);_0x4a1ef3[_0xbbb6('0xd')](_0x457fdd,_0x14c0c6,function(_0x15c180,_0x25f9ca){if(_0x15c180){logger['error'](_0xbbb6('0xe'),_0x457fdd,util[_0xbbb6('0xf')](_0x15c180,{'showHidden':![],'depth':null}));_0x162f58(_0xbbb6('0x10'));}else if(!_0x25f9ca){logger['error']('Error\x20authenticate\x20%s:\x20Wrong\x20credentials',_0x457fdd);_0x162f58('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else{_0x193cc6(_0x25f9ca);}});}catch(_0x4b83ca){_0x162f58(_0x4b83ca);}});}function ActiveDirectoryAuthenticate(_0x517bc9,_0x2b3dbc,_0x19a15c,_0x1c12b3){var _0x22a70c,_0x4a4a03;if(!isActiveDirectoryConfigured(config)){logger[_0xbbb6('0x11')](_0xbbb6('0x12'),_0x2b3dbc);return _0x1c12b3(null,![],{'message':_0xbbb6('0x10')});}return db[_0xbbb6('0x13')]['findOne']({'where':{'id':0x1},'attributes':[_0xbbb6('0x14'),_0xbbb6('0x15')],'raw':!![]})[_0xbbb6('0x16')](function(_0xa17a76){_0x22a70c=_0xa17a76;if(!_0x22a70c['adSsoEnabled']){logger[_0xbbb6('0x11')](_0xbbb6('0x17'),_0x2b3dbc);throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}return _0x517bc9[_0xbbb6('0x18')]({'attributes':['id',_0xbbb6('0x19'),_0xbbb6('0x1a'),_0xbbb6('0x1b'),_0xbbb6('0x1c'),'disabled','blocked',_0xbbb6('0x1d'),_0xbbb6('0x1e')],'where':{'name':_0x2b3dbc,'role':{'$or':[_0xbbb6('0x1f'),_0xbbb6('0x20'),_0xbbb6('0x21')]},'adSsoEnabled':!![]}});})[_0xbbb6('0x16')](function(_0x33eaf4){if(!_0x33eaf4||_0x33eaf4&&_0x33eaf4[_0xbbb6('0x19')]!==_0x2b3dbc){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}_0x4a4a03=_0x33eaf4;var _0x269900=_0x4a4a03[_0xbbb6('0x19')]+'@'+config[_0xbbb6('0xa')][_0xbbb6('0xc')];return adAuthenticate(config[_0xbbb6('0xa')],_0x269900,_0x19a15c);})[_0xbbb6('0x16')](function(_0x19dafa){if(_0x4a4a03[_0xbbb6('0x22')]){throw new Error(_0xbbb6('0x10'));}if(_0x22a70c[_0xbbb6('0x15')]>0x0){if(_0x4a4a03[_0xbbb6('0x23')]){if(moment(_0x4a4a03[_0xbbb6('0x1d')])[_0xbbb6('0x24')](_0x22a70c[_0xbbb6('0x15')],_0xbbb6('0x25'))>moment()){throw new Error(_0xbbb6('0x10'));}return utils[_0xbbb6('0x26')](_0x4a4a03,0x0,![],null)[_0xbbb6('0x16')](function(){return utils[_0xbbb6('0x27')](_0x4a4a03);})[_0xbbb6('0x16')](function(){return _0x1c12b3(null,_0x4a4a03);});}else{return utils[_0xbbb6('0x27')](_0x4a4a03)['then'](function(){return _0x1c12b3(null,_0x4a4a03);});}}else{return utils[_0xbbb6('0x27')](_0x4a4a03)['then'](function(){return _0x1c12b3(null,_0x4a4a03);});}})[_0xbbb6('0x28')](function(_0x290fba){return _0x1c12b3(null,![],_0x290fba);});}function handleError(_0x436d86,_0x426852,_0x447acd){return _0x436d86[_0xbbb6('0x29')](_0x426852||0x1f4)[_0xbbb6('0x2a')]({'message':_0x447acd?_0x447acd[_0xbbb6('0x2b')]||_0x447acd:''});}exports[_0xbbb6('0x2c')]=function(_0x3cdf21,_0x396178,_0x2ace40){passport['authenticate'](_0xbbb6('0x2d'),function(_0x4f4c89,_0x3171a0,_0xbf84fc){var _0x237458=_0x4f4c89||_0xbf84fc;if(_0x237458){return handleError(_0x396178,0x191,_0x237458);}if(!_0x3171a0){return handleError(_0x396178,0x194,{'message':'Something\x20went\x20wrong,\x20please\x20try\x20again.'});}else{var _0x4637f8={'payload':{'id':_0x3171a0['id'],'role':_0x3171a0['role']},'options':{'expiresIn':0x15180}};return authService[_0xbbb6('0x2e')](_0x4637f8)[_0xbbb6('0x16')](function(_0x277c33){_0x396178['json']({'id':_0x3171a0['id'],'token':_0x277c33,'statusCall':'','isAlreadyLogged':_0x3171a0[_0xbbb6('0x1e')]});});}})(_0x3cdf21,_0x396178,_0x2ace40);};passport[_0xbbb6('0x2f')](_0xbbb6('0x2d'),new LocalStrategy({'usernameField':_0xbbb6('0x19'),'passwordField':'password'},function(_0x54986b,_0x2af4cb,_0x349613){return ActiveDirectoryAuthenticate(db[_0xbbb6('0x30')],_0x54986b,_0x2af4cb,_0x349613);}));
\ No newline at end of file
+var _0xe485=['url','activedirectory','authenticate','error','inspect','Error\x20authenticate\x20%s:\x20Wrong\x20credentials','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20configured','findOne','adSsoEnabled','Error\x20authenticate\x20%s:\x20Active\x20Directory\x20not\x20enabled','name','password','salt','role','blocked','online','admin','user','agent','then','domain','disabled','blockedAt','add','blockDuration','clearBlockUser','catch','send','message','login','ad-login','Something\x20went\x20wrong,\x20please\x20try\x20again.','signToken','use','User','passport','Strategy','moment','activedirectory2','util','../../mysqldb','../../config/utils','../../config/environment','../../config/logger','api','undefined','baseDN'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xe485,0x114));var _0x5e48=function(_0x4473b6,_0x4630cc){_0x4473b6=_0x4473b6-0x0;var _0x3de8c7=_0xe485[_0x4473b6];return _0x3de8c7;};'use strict';var passport=require(_0x5e48('0x0'));var LocalStrategy=require('passport-local')[_0x5e48('0x1')];var moment=require(_0x5e48('0x2'));var ActiveDirectory=require(_0x5e48('0x3'));var BPromise=require('bluebird');var util=require(_0x5e48('0x4'));var db=require(_0x5e48('0x5'))['db'];var authService=require('../../components/auth/service');var utils=require(_0x5e48('0x6'));var config=require(_0x5e48('0x7'));var logger=require(_0x5e48('0x8'))(_0x5e48('0x9'));function isActiveDirectoryConfigured(_0x2cc5b0){var _0x49006d=![];if(typeof _0x2cc5b0['activedirectory']!==_0x5e48('0xa')){_0x49006d=_0x2cc5b0['activedirectory'][_0x5e48('0xb')]&&_0x2cc5b0['activedirectory'][_0x5e48('0xc')]&&_0x2cc5b0[_0x5e48('0xd')]['domain'];}return _0x49006d;}function adAuthenticate(_0x2ac2f6,_0x2cf654,_0x3fd04e){return new BPromise(function(_0x406075,_0x1a42ff){try{var _0x25ac7f=new ActiveDirectory(_0x2ac2f6);_0x25ac7f[_0x5e48('0xe')](_0x2cf654,_0x3fd04e,function(_0x510d22,_0x2017c2){if(_0x510d22){logger[_0x5e48('0xf')]('Error\x20authenticate\x20%s:\x20%s',_0x2cf654,util[_0x5e48('0x10')](_0x510d22,{'showHidden':![],'depth':null}));_0x1a42ff('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}else if(!_0x2017c2){logger[_0x5e48('0xf')](_0x5e48('0x11'),_0x2cf654);_0x1a42ff(_0x5e48('0x12'));}else{_0x406075(_0x2017c2);}});}catch(_0x2b6f32){_0x1a42ff(_0x2b6f32);}});}function ActiveDirectoryAuthenticate(_0x4a61ae,_0x18176b,_0x5134b5,_0x3e02fe){var _0x8b2e45,_0x15ba1f;if(!isActiveDirectoryConfigured(config)){logger[_0x5e48('0xf')](_0x5e48('0x13'),_0x18176b);return _0x3e02fe(null,![],{'message':_0x5e48('0x12')});}return db['Setting'][_0x5e48('0x14')]({'where':{'id':0x1},'attributes':['adSsoEnabled','blockDuration'],'raw':!![]})['then'](function(_0x627d9){_0x8b2e45=_0x627d9;if(!_0x8b2e45[_0x5e48('0x15')]){logger[_0x5e48('0xf')](_0x5e48('0x16'),_0x18176b);throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}return _0x4a61ae[_0x5e48('0x14')]({'attributes':['id',_0x5e48('0x17'),_0x5e48('0x18'),_0x5e48('0x19'),_0x5e48('0x1a'),'disabled',_0x5e48('0x1b'),'blockedAt',_0x5e48('0x1c')],'where':{'name':_0x18176b,'role':{'$or':[_0x5e48('0x1d'),_0x5e48('0x1e'),_0x5e48('0x1f')]},'adSsoEnabled':!![]}});})[_0x5e48('0x20')](function(_0x4f46b1){if(!_0x4f46b1||_0x4f46b1&&_0x4f46b1['name']!==_0x18176b){throw new Error(_0x5e48('0x12'));}_0x15ba1f=_0x4f46b1;var _0x3cc894=_0x15ba1f[_0x5e48('0x17')]+'@'+config[_0x5e48('0xd')][_0x5e48('0x21')];return adAuthenticate(config[_0x5e48('0xd')],_0x3cc894,_0x5134b5);})[_0x5e48('0x20')](function(_0x2e5342){if(_0x15ba1f[_0x5e48('0x22')]){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}if(_0x8b2e45['blockDuration']>0x0){if(_0x15ba1f[_0x5e48('0x1b')]){if(moment(_0x15ba1f[_0x5e48('0x23')])[_0x5e48('0x24')](_0x8b2e45[_0x5e48('0x25')],'minutes')>moment()){throw new Error('Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.');}return utils[_0x5e48('0x26')](_0x15ba1f,0x0,![],null)[_0x5e48('0x20')](function(){return utils['getLicense'](_0x15ba1f);})[_0x5e48('0x20')](function(){return _0x3e02fe(null,_0x15ba1f);});}else{return utils['getLicense'](_0x15ba1f)['then'](function(){return _0x3e02fe(null,_0x15ba1f);});}}else{return utils['getLicense'](_0x15ba1f)[_0x5e48('0x20')](function(){return _0x3e02fe(null,_0x15ba1f);});}})[_0x5e48('0x27')](function(_0x53868e){return _0x3e02fe(null,![],_0x53868e);});}function handleError(_0x5d2d3c,_0x50b3da,_0x470667){return _0x5d2d3c['status'](_0x50b3da||0x1f4)[_0x5e48('0x28')]({'message':_0x470667?_0x470667[_0x5e48('0x29')]||_0x470667:''});}exports[_0x5e48('0x2a')]=function(_0x4ecbd9,_0x4c4c8d,_0x29b7cf){passport[_0x5e48('0xe')](_0x5e48('0x2b'),function(_0x2bd6d2,_0x3eb3bc,_0x1f09f4){var _0x135215=_0x2bd6d2||_0x1f09f4;if(_0x135215){return handleError(_0x4c4c8d,0x191,_0x135215);}if(!_0x3eb3bc){return handleError(_0x4c4c8d,0x194,{'message':_0x5e48('0x2c')});}else{var _0x593476={'payload':{'id':_0x3eb3bc['id'],'role':_0x3eb3bc[_0x5e48('0x1a')]},'options':{'expiresIn':0x15180}};return authService[_0x5e48('0x2d')](_0x593476)[_0x5e48('0x20')](function(_0x14787f){_0x4c4c8d['json']({'id':_0x3eb3bc['id'],'token':_0x14787f,'statusCall':'','isAlreadyLogged':_0x3eb3bc[_0x5e48('0x1c')]});});}})(_0x4ecbd9,_0x4c4c8d,_0x29b7cf);};passport[_0x5e48('0x2e')](_0x5e48('0x2b'),new LocalStrategy({'usernameField':_0x5e48('0x17'),'passwordField':'password'},function(_0x2037ef,_0x516417,_0x193052){return ActiveDirectoryAuthenticate(db[_0x5e48('0x2f')],_0x2037ef,_0x516417,_0x193052);}));
\ No newline at end of file
index f2674aa..663385d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x20b5=['./authActiveDirectory.controller','post','login','exports','express'];(function(_0x5ad771,_0x34186f){var _0x5b5dce=function(_0x5ad0fb){while(--_0x5ad0fb){_0x5ad771['push'](_0x5ad771['shift']());}};_0x5b5dce(++_0x34186f);}(_0x20b5,0x13a));var _0x520b=function(_0x21cb42,_0x4a9d87){_0x21cb42=_0x21cb42-0x0;var _0x4d847b=_0x20b5[_0x21cb42];return _0x4d847b;};'use strict';var express=require(_0x520b('0x0'));var router=express['Router']();var controller=require(_0x520b('0x1'));router[_0x520b('0x2')]('/',controller[_0x520b('0x3')]);module[_0x520b('0x4')]=router;
\ No newline at end of file
+var _0xfcaf=['Router','./authActiveDirectory.controller','post','login','exports','express'];(function(_0x4b2863,_0x494899){var _0x567d67=function(_0x751f03){while(--_0x751f03){_0x4b2863['push'](_0x4b2863['shift']());}};_0x567d67(++_0x494899);}(_0xfcaf,0x125));var _0xffca=function(_0x46e363,_0x45d7e2){_0x46e363=_0x46e363-0x0;var _0x3fb059=_0xfcaf[_0x46e363];return _0x3fb059;};'use strict';var express=require(_0xffca('0x0'));var router=express[_0xffca('0x1')]();var controller=require(_0xffca('0x2'));router[_0xffca('0x3')]('/',controller[_0xffca('0x4')]);module[_0xffca('0x5')]=router;
\ No newline at end of file
index 579f05f..28fa29e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['blockedAt','add','minutes','clearBlockUser','getLicense','catch','lodash','passport','passport-google-oauth20','moment','../../mysqldb','../../config/utils','login','authenticate','google','/login','email','use','secret','callbackURL','findOne','allowedLoginAttempts','blockDuration','then','User','find','map','value','admin','user','agent','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'];(function(_0x4b2863,_0x494899){var _0x567d67=function(_0x751f03){while(--_0x751f03){_0x4b2863['push'](_0x4b2863['shift']());}};_0x567d67(++_0x494899);}(_0x7a54,0x106));var _0x47a5=function(_0x389dc6,_0x1d2f0b){_0x389dc6=_0x389dc6-0x0;var _0x59a020=_0x7a54[_0x389dc6];return _0x59a020;};'use strict';var _=require(_0x47a5('0x0'));var passport=require(_0x47a5('0x1'));var GoogleStrategy=require(_0x47a5('0x2'))['Strategy'];var moment=require(_0x47a5('0x3'));var db=require(_0x47a5('0x4'))['db'];var config=require('../../config/environment');var utils=require(_0x47a5('0x5'));exports[_0x47a5('0x6')]=passport[_0x47a5('0x7')](_0x47a5('0x8'),{'failureRedirect':_0x47a5('0x9'),'scope':['profile',_0x47a5('0xa')],'session':![]});exports['callback']=passport[_0x47a5('0x7')](_0x47a5('0x8'),{'failureRedirect':'/login','session':![]});passport[_0x47a5('0xb')](new GoogleStrategy({'clientID':config['google']?config['google']['clientID']:'id','clientSecret':config[_0x47a5('0x8')]?config[_0x47a5('0x8')]['clientSecret']:_0x47a5('0xc'),'callbackURL':config['google']?config['google'][_0x47a5('0xd')]:''},function(_0x69e4d4,_0x2f399b,_0x250fad,_0xd612dd){var _0xd308b8,_0x1eae59;return db['Setting'][_0x47a5('0xe')]({'where':{'id':0x1},'attributes':[_0x47a5('0xf'),_0x47a5('0x10')],'raw':!![]})[_0x47a5('0x11')](function(_0x139f25){_0xd308b8=_0x139f25;return db[_0x47a5('0x12')][_0x47a5('0x13')]({'where':{'email':_[_0x47a5('0x14')](_0x250fad['emails'],_0x47a5('0x15')),'role':{'$or':[_0x47a5('0x16'),_0x47a5('0x17'),_0x47a5('0x18')]}}});})[_0x47a5('0x11')](function(_0x574af6){_0x1eae59=_0x574af6;if(_0x1eae59){if(_0x1eae59['disabled']){return _0xd612dd(_0x47a5('0x19'));}else if(_0xd308b8['blockDuration']>0x0){if(_0x1eae59['blocked']){if(moment(_0x1eae59[_0x47a5('0x1a')])[_0x47a5('0x1b')](_0xd308b8[_0x47a5('0x10')],_0x47a5('0x1c'))>moment()){return _0xd612dd(_0x47a5('0x19'));}else{return utils[_0x47a5('0x1d')](_0x1eae59,0x0,![],null)[_0x47a5('0x11')](function(){return utils[_0x47a5('0x1e')](_0x1eae59);})[_0x47a5('0x11')](function(){return _0xd612dd(null,_0x1eae59);});}}else{return utils['getLicense'](_0x1eae59)[_0x47a5('0x11')](function(){return _0xd612dd(null,_0x1eae59);});}}else{return utils[_0x47a5('0x1e')](_0x1eae59)['then'](function(){return _0xd612dd(null,_0x1eae59);});}}return _0xd612dd(_0x47a5('0x19'));})[_0x47a5('0x1f')](function(_0x36874d){_0xd612dd(_0x36874d);});}));
\ No newline at end of file
+var _0x7a54=['blockedAt','add','minutes','clearBlockUser','getLicense','catch','lodash','passport','passport-google-oauth20','moment','../../mysqldb','../../config/utils','login','authenticate','google','/login','email','use','secret','callbackURL','findOne','allowedLoginAttempts','blockDuration','then','User','find','map','value','admin','user','agent','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'];(function(_0x2aec52,_0x59d962){var _0x3b8835=function(_0x3e2604){while(--_0x3e2604){_0x2aec52['push'](_0x2aec52['shift']());}};_0x3b8835(++_0x59d962);}(_0x7a54,0x106));var _0x47a5=function(_0x253337,_0x1f1a74){_0x253337=_0x253337-0x0;var _0x543785=_0x7a54[_0x253337];return _0x543785;};'use strict';var _=require(_0x47a5('0x0'));var passport=require(_0x47a5('0x1'));var GoogleStrategy=require(_0x47a5('0x2'))['Strategy'];var moment=require(_0x47a5('0x3'));var db=require(_0x47a5('0x4'))['db'];var config=require('../../config/environment');var utils=require(_0x47a5('0x5'));exports[_0x47a5('0x6')]=passport[_0x47a5('0x7')](_0x47a5('0x8'),{'failureRedirect':_0x47a5('0x9'),'scope':['profile',_0x47a5('0xa')],'session':![]});exports['callback']=passport[_0x47a5('0x7')](_0x47a5('0x8'),{'failureRedirect':'/login','session':![]});passport[_0x47a5('0xb')](new GoogleStrategy({'clientID':config['google']?config['google']['clientID']:'id','clientSecret':config[_0x47a5('0x8')]?config[_0x47a5('0x8')]['clientSecret']:_0x47a5('0xc'),'callbackURL':config['google']?config['google'][_0x47a5('0xd')]:''},function(_0x69e4d4,_0x2f399b,_0x250fad,_0xd612dd){var _0xd308b8,_0x1eae59;return db['Setting'][_0x47a5('0xe')]({'where':{'id':0x1},'attributes':[_0x47a5('0xf'),_0x47a5('0x10')],'raw':!![]})[_0x47a5('0x11')](function(_0x139f25){_0xd308b8=_0x139f25;return db[_0x47a5('0x12')][_0x47a5('0x13')]({'where':{'email':_[_0x47a5('0x14')](_0x250fad['emails'],_0x47a5('0x15')),'role':{'$or':[_0x47a5('0x16'),_0x47a5('0x17'),_0x47a5('0x18')]}}});})[_0x47a5('0x11')](function(_0x574af6){_0x1eae59=_0x574af6;if(_0x1eae59){if(_0x1eae59['disabled']){return _0xd612dd(_0x47a5('0x19'));}else if(_0xd308b8['blockDuration']>0x0){if(_0x1eae59['blocked']){if(moment(_0x1eae59[_0x47a5('0x1a')])[_0x47a5('0x1b')](_0xd308b8[_0x47a5('0x10')],_0x47a5('0x1c'))>moment()){return _0xd612dd(_0x47a5('0x19'));}else{return utils[_0x47a5('0x1d')](_0x1eae59,0x0,![],null)[_0x47a5('0x11')](function(){return utils[_0x47a5('0x1e')](_0x1eae59);})[_0x47a5('0x11')](function(){return _0xd612dd(null,_0x1eae59);});}}else{return utils['getLicense'](_0x1eae59)[_0x47a5('0x11')](function(){return _0xd612dd(null,_0x1eae59);});}}else{return utils[_0x47a5('0x1e')](_0x1eae59)['then'](function(){return _0xd612dd(null,_0x1eae59);});}}return _0xd612dd(_0x47a5('0x19'));})[_0x47a5('0x1f')](function(_0x36874d){_0xd612dd(_0x36874d);});}));
\ No newline at end of file
index 1bf1f3a..1ecca44 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x80ea=['express','passport','Router','./authGoogle.controller','../user/user.controller.js','../../components/auth/service','get','login','/callback','callback','isMiddleware','setTokenCookie'];(function(_0x1ec25a,_0x4e81ca){var _0x55855f=function(_0x3b7aba){while(--_0x3b7aba){_0x1ec25a['push'](_0x1ec25a['shift']());}};_0x55855f(++_0x4e81ca);}(_0x80ea,0x15c));var _0xa80e=function(_0x59734a,_0x40a9b4){_0x59734a=_0x59734a-0x0;var _0xc5bdb4=_0x80ea[_0x59734a];return _0xc5bdb4;};'use strict';var express=require(_0xa80e('0x0'));var passport=require(_0xa80e('0x1'));var router=express[_0xa80e('0x2')]();var controller=require(_0xa80e('0x3'));var userController=require(_0xa80e('0x4'));var authService=require(_0xa80e('0x5'));router[_0xa80e('0x6')]('/',controller[_0xa80e('0x7')]);router[_0xa80e('0x6')](_0xa80e('0x8'),controller[_0xa80e('0x9')],authService[_0xa80e('0xa')],userController[_0xa80e('0x7')],authService[_0xa80e('0xb')]);module['exports']=router;
\ No newline at end of file
+var _0x854e=['login','/callback','isMiddleware','setTokenCookie','exports','express','passport','Router','./authGoogle.controller','../user/user.controller.js','../../components/auth/service','get'];(function(_0x6552bc,_0x3ac19e){var _0x39011b=function(_0x2a1c78){while(--_0x2a1c78){_0x6552bc['push'](_0x6552bc['shift']());}};_0x39011b(++_0x3ac19e);}(_0x854e,0xdd));var _0xe854=function(_0x2e36a8,_0x4adb6e){_0x2e36a8=_0x2e36a8-0x0;var _0x74aaa2=_0x854e[_0x2e36a8];return _0x74aaa2;};'use strict';var express=require(_0xe854('0x0'));var passport=require(_0xe854('0x1'));var router=express[_0xe854('0x2')]();var controller=require(_0xe854('0x3'));var userController=require(_0xe854('0x4'));var authService=require(_0xe854('0x5'));router[_0xe854('0x6')]('/',controller[_0xe854('0x7')]);router[_0xe854('0x6')](_0xe854('0x8'),controller['callback'],authService[_0xe854('0x9')],userController['login'],authService[_0xe854('0xa')]);module[_0xe854('0xb')]=router;
\ No newline at end of file
index 0a1f6a7..8963901 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9a44=['now','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','params','token','securePassword','enforcePasswordHistory','passwordHistoryLimit','validatePasswordPattern','previousPasswords','validatePasswordHistory','password','save','status','Password\x20reset!','use','local-login','passport-local','Strategy','jayson/promise','randomstring','moment','../../mysqldb','../../components/auth/service','../../config/utils','client','http','Setting','findOne','allowedLoginAttempts','blockDuration','name','salt','role','disabled','blocked','loginAttempts','user','agent','then','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','authenticate','blockedAt','add','minutes','clearBlockUser','getLicense','MailAccount','find','email','MailServerOut','Smtp','CloudProvider','getSmtpOptions','format','\x22%s\x22\x20<%s>','request','SendMail','error','message','stringify','send','login','signToken','online','forgot','body','Email\x20parameter\x20is\x20missing','generate','trim','toLowerCase','User','The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.','The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.','resetPasswordExpires'];(function(_0x3e3780,_0x4b826e){var _0x338739=function(_0x80cd87){while(--_0x80cd87){_0x3e3780['push'](_0x3e3780['shift']());}};_0x338739(++_0x4b826e);}(_0x9a44,0x106));var _0x49a4=function(_0x32bbf1,_0x56976f){_0x32bbf1=_0x32bbf1-0x0;var _0x57c25b=_0x9a44[_0x32bbf1];return _0x57c25b;};'use strict';var util=require('util');var passport=require('passport');var LocalStrategy=require(_0x49a4('0x0'))[_0x49a4('0x1')];var jayson=require(_0x49a4('0x2'));var _=require('lodash');var rs=require(_0x49a4('0x3'));var moment=require(_0x49a4('0x4'));var db=require(_0x49a4('0x5'))['db'];var authService=require(_0x49a4('0x6'));var utils=require(_0x49a4('0x7'));var client=jayson[_0x49a4('0x8')][_0x49a4('0x9')]({'port':0x232b});function localAuthenticate(_0x11842c,_0x452566,_0x40e3c9,_0x3b5d8a){var _0x3c24d4,_0x3aeb3d;return db[_0x49a4('0xa')][_0x49a4('0xb')]({'where':{'id':0x1},'attributes':[_0x49a4('0xc'),_0x49a4('0xd')],'raw':!![]})['then'](function(_0xbb51a5){_0x3c24d4=_0xbb51a5;return _0x11842c[_0x49a4('0xb')]({'attributes':['id',_0x49a4('0xe'),'password',_0x49a4('0xf'),_0x49a4('0x10'),_0x49a4('0x11'),_0x49a4('0x12'),'blockedAt',_0x49a4('0x13')],'where':{'name':_0x452566,'role':{'$or':['admin',_0x49a4('0x14'),_0x49a4('0x15')]}}});})[_0x49a4('0x16')](function(_0x169785){if(!_0x169785||_0x169785&&_0x169785[_0x49a4('0xe')]!==_0x452566){throw new Error(_0x49a4('0x17'));}else{_0x3aeb3d=_0x169785;return _0x3aeb3d;}})['then'](function(){_0x3aeb3d[_0x49a4('0x18')](_0x40e3c9,function(_0x36787c,_0x2422df){var _0x54d47e=_0x3aeb3d[_0x49a4('0x13')]+0x1;if(_0x36787c){return _0x3b5d8a(_0x36787c);}else if(!_0x2422df){if(_0x3aeb3d[_0x49a4('0x11')]){return _0x3b5d8a(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else if(_0x3c24d4[_0x49a4('0xc')]>0x0){if(_0x3aeb3d[_0x49a4('0x12')]){if(_0x3c24d4[_0x49a4('0xd')]>0x0){if(moment(_0x3aeb3d[_0x49a4('0x19')])[_0x49a4('0x1a')](_0x3c24d4[_0x49a4('0xd')],_0x49a4('0x1b'))>moment()){return _0x3b5d8a(null,![],{'message':_0x49a4('0x17')});}else{return utils[_0x49a4('0x1c')](_0x3aeb3d,_0x54d47e,![],null)[_0x49a4('0x16')](function(){return _0x3b5d8a(null,![],{'message':_0x49a4('0x17')});});}}else{return _0x3b5d8a(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{if(_0x54d47e>=_0x3c24d4[_0x49a4('0xc')]){return utils[_0x49a4('0x1c')](_0x3aeb3d,0x0,!![],moment())['then'](function(){return _0x3b5d8a(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});});}else{return utils[_0x49a4('0x1c')](_0x3aeb3d,_0x54d47e,![],null)['then'](function(){return _0x3b5d8a(null,![],{'message':_0x49a4('0x17')});});}}}else{return _0x3b5d8a(null,![],{'message':_0x49a4('0x17')});}}else{if(_0x3aeb3d['disabled']){return _0x3b5d8a(null,![],{'message':_0x49a4('0x17')});}else if(_0x3c24d4[_0x49a4('0xc')]>0x0){if(_0x3aeb3d[_0x49a4('0x12')]){if(_0x3c24d4['blockDuration']>0x0){if(moment(_0x3aeb3d[_0x49a4('0x19')])[_0x49a4('0x1a')](_0x3c24d4[_0x49a4('0xd')],_0x49a4('0x1b'))>moment()){return _0x3b5d8a(null,![],{'message':_0x49a4('0x17')});}else{return utils[_0x49a4('0x1c')](_0x3aeb3d,0x0,![],null)[_0x49a4('0x16')](function(){return utils[_0x49a4('0x1d')](_0x3aeb3d);})[_0x49a4('0x16')](function(){return _0x3b5d8a(null,_0x3aeb3d);});}}else{return _0x3b5d8a(null,![],{'message':_0x49a4('0x17')});}}else{return utils[_0x49a4('0x1c')](_0x3aeb3d,0x0,![],null)['then'](function(){return utils[_0x49a4('0x1d')](_0x3aeb3d);})[_0x49a4('0x16')](function(){return _0x3b5d8a(null,_0x3aeb3d);})['catch'](function(_0x3e7224){return _0x3b5d8a(null,![],_0x3e7224);});}}else{if(_0x3aeb3d[_0x49a4('0x12')]){return _0x3b5d8a(null,![],{'message':_0x49a4('0x17')});}else{return utils['getLicense'](_0x3aeb3d)[_0x49a4('0x16')](function(){return _0x3b5d8a(null,_0x3aeb3d);});}}}});})['catch'](function(_0xa61fbc){return _0x3b5d8a(null,![],_0xa61fbc);});}function sendServiceMail(_0x3116a4){return db[_0x49a4('0x1e')][_0x49a4('0x1f')]({'where':{'service':!![]},'attributes':['id',_0x49a4('0xe'),_0x49a4('0x20')],'include':[{'model':db[_0x49a4('0x21')],'as':_0x49a4('0x22'),'include':[{'model':db[_0x49a4('0x23')],'as':_0x49a4('0x23')}]}]})[_0x49a4('0x16')](function(_0x4200b1){if(!_0x4200b1){throw new Error('Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!');}var _0x1d51ef=_0x4200b1[_0x49a4('0x24')]();var _0x2bd4ff={'account':_0x1d51ef,'message':_['merge']({'from':util[_0x49a4('0x25')](_0x49a4('0x26'),_0x4200b1['name'],_0x4200b1[_0x49a4('0x20')]||_0x4200b1[_0x49a4('0x22')]['user'])},_0x3116a4)};return client[_0x49a4('0x27')](_0x49a4('0x28'),_0x2bd4ff);})[_0x49a4('0x16')](function(_0x6caf7e){if(_0x6caf7e['error']){throw new Error(util[_0x49a4('0x25')]('SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!',_0x6caf7e[_0x49a4('0x29')][_0x49a4('0x2a')]||JSON[_0x49a4('0x2b')](_0x6caf7e[_0x49a4('0x29')])));}return!![];});}function handleError(_0x1d6366,_0x152fec,_0x12246b){return _0x1d6366['status'](_0x152fec||0x1f4)[_0x49a4('0x2c')]({'message':_0x12246b?_0x12246b['message']||_0x12246b:''});}exports[_0x49a4('0x2d')]=function(_0x2122ee,_0x2f8c5b,_0x5753b4){passport[_0x49a4('0x18')]('local-login',function(_0x19faaf,_0xc5f366,_0x305886){var _0x480a4=_0x19faaf||_0x305886;if(_0x480a4){return handleError(_0x2f8c5b,0x191,_0x480a4);}if(!_0xc5f366){return handleError(_0x2f8c5b,0x194,{'message':'Something\x20went\x20wrong,\x20please\x20try\x20again.'});}else{var _0x3a219d={'payload':{'id':_0xc5f366['id'],'role':_0xc5f366[_0x49a4('0x10')]},'options':{'expiresIn':0x15180}};return authService[_0x49a4('0x2e')](_0x3a219d)['then'](function(_0x2b8a88){_0x2f8c5b['json']({'id':_0xc5f366['id'],'token':_0x2b8a88,'statusCall':'','isAlreadyLogged':_0xc5f366[_0x49a4('0x2f')]});});}})(_0x2122ee,_0x2f8c5b,_0x5753b4);};exports[_0x49a4('0x30')]=function(_0x82646b,_0x1ac5a1){if(!_0x82646b[_0x49a4('0x31')][_0x49a4('0x20')]){return handleError(_0x1ac5a1,0x1f4,{'message':_0x49a4('0x32')});}var _0x3c5c88=rs[_0x49a4('0x33')]();_0x82646b[_0x49a4('0x31')][_0x49a4('0x20')]=_0x82646b['body'][_0x49a4('0x20')][_0x49a4('0x34')]()[_0x49a4('0x35')]();var _0x2d4292;return db[_0x49a4('0xa')][_0x49a4('0xb')]({'where':{'id':0x1},'attributes':[_0x49a4('0xc'),_0x49a4('0xd')],'raw':!![]})['then'](function(_0x3cf8e4){_0x2d4292=_0x3cf8e4;return db[_0x49a4('0x36')][_0x49a4('0x1f')]({'where':{'email':_0x82646b[_0x49a4('0x31')][_0x49a4('0x20')]}});})[_0x49a4('0x16')](function(_0x4f2616){if(!_0x4f2616){throw new Error('This\x20email\x20is\x20not\x20registered.');}if(_0x4f2616[_0x49a4('0x11')]){throw new Error(_0x49a4('0x37'));}if(_0x4f2616[_0x49a4('0x12')]){if(moment(_0x4f2616['blockedAt'])[_0x49a4('0x1a')](_0x2d4292[_0x49a4('0xd')],_0x49a4('0x1b'))>moment()){throw new Error(_0x49a4('0x38'));}else{_0x4f2616[_0x49a4('0x12')]=![];_0x4f2616['blockedAt']=null;}}_0x4f2616['resetPasswordToken']=_0x3c5c88;_0x4f2616[_0x49a4('0x39')]=Date[_0x49a4('0x3a')]()+0x36ee80;return _0x4f2616['save']();})['then'](function(){return sendServiceMail({'to':_0x82646b[_0x49a4('0x31')][_0x49a4('0x20')],'subject':_0x49a4('0x3b'),'text':_0x49a4('0x3c')+_0x49a4('0x3d')+_0x49a4('0x3e')+_0x82646b['headers'][_0x49a4('0x3f')]+_0x49a4('0x40')+_0x3c5c88+'\x0a\x0a'+_0x49a4('0x41')});})[_0x49a4('0x16')](function(){_0x1ac5a1['status'](0xc8)[_0x49a4('0x2c')]({'message':'Reset\x20Email\x20sent!'});})['catch'](function(_0x33e910){return handleError(_0x1ac5a1,0x1f4,_0x33e910);});};exports['reset']=function(_0x102c0b,_0x2bdb50){return db[_0x49a4('0x36')][_0x49a4('0x1f')]({'where':{'resetPasswordToken':_0x102c0b[_0x49a4('0x42')][_0x49a4('0x43')],'resetPasswordExpires':{'$gt':Date[_0x49a4('0x3a')]()}}})['then'](function(_0x50ae3a){if(!_0x50ae3a){throw new Error('Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.');}return db[_0x49a4('0xa')][_0x49a4('0xb')]({'attributes':['id',_0x49a4('0x44'),_0x49a4('0x45'),_0x49a4('0x46')]})[_0x49a4('0x16')](function(_0x3344e0){if(_0x3344e0[_0x49a4('0x44')])authService[_0x49a4('0x47')](_0x102c0b[_0x49a4('0x31')]['password']);if(!_0x3344e0[_0x49a4('0x45')]||!_0x50ae3a[_0x49a4('0x48')])return _0x50ae3a;authService[_0x49a4('0x49')](_0x102c0b[_0x49a4('0x31')][_0x49a4('0x4a')],_0x50ae3a[_0x49a4('0x48')],_0x3344e0[_0x49a4('0x46')]);return _0x50ae3a;})[_0x49a4('0x16')](function(){_0x50ae3a[_0x49a4('0x4a')]=_0x102c0b[_0x49a4('0x31')][_0x49a4('0x4a')];_0x50ae3a['resetPasswordToken']=null;_0x50ae3a[_0x49a4('0x39')]=null;return _0x50ae3a[_0x49a4('0x4b')]();});})['then'](function(){_0x2bdb50[_0x49a4('0x4c')](0xc8)[_0x49a4('0x2c')]({'message':_0x49a4('0x4d')});})['catch'](function(_0x19b11f){return handleError(_0x2bdb50,0x1f4,_0x19b11f);});};passport[_0x49a4('0x4e')](_0x49a4('0x4f'),new LocalStrategy({'usernameField':'name','passwordField':_0x49a4('0x4a')},function(_0x5dac02,_0x29c6bd,_0x1d83cc){return localAuthenticate(db['User'],_0x5dac02,_0x29c6bd,_0x1d83cc);}));
\ No newline at end of file
+var _0xbf94=['body','email','Email\x20parameter\x20is\x20missing','generate','trim','User','This\x20email\x20is\x20not\x20registered.','The\x20user\x20is\x20blocked.\x20Please\x20contact\x20the\x20administrator.','resetPasswordToken','resetPasswordExpires','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://','headers','host','reset','params','token','now','Password\x20reset\x20token\x20is\x20invalid\x20or\x20has\x20expired.','securePassword','enforcePasswordHistory','passwordHistoryLimit','validatePasswordPattern','password','previousPasswords','status','send','Password\x20reset!','use','util','passport','Strategy','jayson/promise','lodash','randomstring','moment','../../components/auth/service','../../config/utils','http','Setting','findOne','allowedLoginAttempts','blockDuration','then','salt','role','blocked','blockedAt','user','name','Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.','authenticate','loginAttempts','disabled','minutes','clearBlockUser','add','getLicense','catch','MailAccount','find','MailServerOut','Smtp','CloudProvider','getSmtpOptions','merge','format','\x22%s\x22\x20<%s>','request','SendMail','error','SendMail\x20error:\x20%s.\x20Please\x20contact\x20your\x20Administrator!','message','local-login','signToken','json','online'];(function(_0xf9b20f,_0x23866c){var _0x3c99d6=function(_0x4215ec){while(--_0x4215ec){_0xf9b20f['push'](_0xf9b20f['shift']());}};_0x3c99d6(++_0x23866c);}(_0xbf94,0x1b0));var _0x4bf9=function(_0xf5b449,_0x5e8938){_0xf5b449=_0xf5b449-0x0;var _0x4d13cb=_0xbf94[_0xf5b449];return _0x4d13cb;};'use strict';var util=require(_0x4bf9('0x0'));var passport=require(_0x4bf9('0x1'));var LocalStrategy=require('passport-local')[_0x4bf9('0x2')];var jayson=require(_0x4bf9('0x3'));var _=require(_0x4bf9('0x4'));var rs=require(_0x4bf9('0x5'));var moment=require(_0x4bf9('0x6'));var db=require('../../mysqldb')['db'];var authService=require(_0x4bf9('0x7'));var utils=require(_0x4bf9('0x8'));var client=jayson['client'][_0x4bf9('0x9')]({'port':0x232b});function localAuthenticate(_0x217c16,_0x340bcc,_0x3c80d4,_0x589210){var _0x581324,_0x2505bd;return db[_0x4bf9('0xa')][_0x4bf9('0xb')]({'where':{'id':0x1},'attributes':[_0x4bf9('0xc'),_0x4bf9('0xd')],'raw':!![]})[_0x4bf9('0xe')](function(_0x37d1d1){_0x581324=_0x37d1d1;return _0x217c16[_0x4bf9('0xb')]({'attributes':['id','name','password',_0x4bf9('0xf'),_0x4bf9('0x10'),'disabled',_0x4bf9('0x11'),_0x4bf9('0x12'),'loginAttempts'],'where':{'name':_0x340bcc,'role':{'$or':['admin',_0x4bf9('0x13'),'agent']}}});})['then'](function(_0xbebdcb){if(!_0xbebdcb||_0xbebdcb&&_0xbebdcb[_0x4bf9('0x14')]!==_0x340bcc){throw new Error(_0x4bf9('0x15'));}else{_0x2505bd=_0xbebdcb;return _0x2505bd;}})[_0x4bf9('0xe')](function(){_0x2505bd[_0x4bf9('0x16')](_0x3c80d4,function(_0x4ed5ca,_0x24a20a){var _0x50f078=_0x2505bd[_0x4bf9('0x17')]+0x1;if(_0x4ed5ca){return _0x589210(_0x4ed5ca);}else if(!_0x24a20a){if(_0x2505bd[_0x4bf9('0x18')]){return _0x589210(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}else if(_0x581324[_0x4bf9('0xc')]>0x0){if(_0x2505bd[_0x4bf9('0x11')]){if(_0x581324[_0x4bf9('0xd')]>0x0){if(moment(_0x2505bd[_0x4bf9('0x12')])['add'](_0x581324['blockDuration'],_0x4bf9('0x19'))>moment()){return _0x589210(null,![],{'message':_0x4bf9('0x15')});}else{return utils['clearBlockUser'](_0x2505bd,_0x50f078,![],null)['then'](function(){return _0x589210(null,![],{'message':_0x4bf9('0x15')});});}}else{return _0x589210(null,![],{'message':_0x4bf9('0x15')});}}else{if(_0x50f078>=_0x581324[_0x4bf9('0xc')]){return utils[_0x4bf9('0x1a')](_0x2505bd,0x0,!![],moment())[_0x4bf9('0xe')](function(){return _0x589210(null,![],{'message':_0x4bf9('0x15')});});}else{return utils[_0x4bf9('0x1a')](_0x2505bd,_0x50f078,![],null)[_0x4bf9('0xe')](function(){return _0x589210(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});});}}}else{return _0x589210(null,![],{'message':_0x4bf9('0x15')});}}else{if(_0x2505bd['disabled']){return _0x589210(null,![],{'message':_0x4bf9('0x15')});}else if(_0x581324[_0x4bf9('0xc')]>0x0){if(_0x2505bd[_0x4bf9('0x11')]){if(_0x581324['blockDuration']>0x0){if(moment(_0x2505bd[_0x4bf9('0x12')])[_0x4bf9('0x1b')](_0x581324[_0x4bf9('0xd')],_0x4bf9('0x19'))>moment()){return _0x589210(null,![],{'message':_0x4bf9('0x15')});}else{return utils[_0x4bf9('0x1a')](_0x2505bd,0x0,![],null)[_0x4bf9('0xe')](function(){return utils[_0x4bf9('0x1c')](_0x2505bd);})[_0x4bf9('0xe')](function(){return _0x589210(null,_0x2505bd);});}}else{return _0x589210(null,![],{'message':'Incorrect\x20username\x20and/or\x20password.\x20Please\x20retry\x20again\x20or\x20contact\x20the\x20administrator.'});}}else{return utils[_0x4bf9('0x1a')](_0x2505bd,0x0,![],null)[_0x4bf9('0xe')](function(){return utils[_0x4bf9('0x1c')](_0x2505bd);})[_0x4bf9('0xe')](function(){return _0x589210(null,_0x2505bd);})[_0x4bf9('0x1d')](function(_0x727e6b){return _0x589210(null,![],_0x727e6b);});}}else{if(_0x2505bd[_0x4bf9('0x11')]){return _0x589210(null,![],{'message':_0x4bf9('0x15')});}else{return utils[_0x4bf9('0x1c')](_0x2505bd)[_0x4bf9('0xe')](function(){return _0x589210(null,_0x2505bd);});}}}});})['catch'](function(_0x41b957){return _0x589210(null,![],_0x41b957);});}function sendServiceMail(_0xe0467e){return db[_0x4bf9('0x1e')][_0x4bf9('0x1f')]({'where':{'service':!![]},'attributes':['id',_0x4bf9('0x14'),'email'],'include':[{'model':db[_0x4bf9('0x20')],'as':_0x4bf9('0x21'),'include':[{'model':db[_0x4bf9('0x22')],'as':_0x4bf9('0x22')}]}]})[_0x4bf9('0xe')](function(_0x3eccdb){if(!_0x3eccdb){throw new Error('Unable\x20to\x20find\x20a\x20configured\x20SMTP\x20service!');}var _0x5d4fb1=_0x3eccdb[_0x4bf9('0x23')]();var _0x4520d0={'account':_0x5d4fb1,'message':_[_0x4bf9('0x24')]({'from':util[_0x4bf9('0x25')](_0x4bf9('0x26'),_0x3eccdb[_0x4bf9('0x14')],_0x3eccdb['email']||_0x3eccdb['Smtp'][_0x4bf9('0x13')])},_0xe0467e)};return client[_0x4bf9('0x27')](_0x4bf9('0x28'),_0x4520d0);})[_0x4bf9('0xe')](function(_0x2333d4){if(_0x2333d4[_0x4bf9('0x29')]){throw new Error(util[_0x4bf9('0x25')](_0x4bf9('0x2a'),_0x2333d4[_0x4bf9('0x29')][_0x4bf9('0x2b')]||JSON['stringify'](_0x2333d4[_0x4bf9('0x29')])));}return!![];});}function handleError(_0x28c3eb,_0x537842,_0x1edd6f){return _0x28c3eb['status'](_0x537842||0x1f4)['send']({'message':_0x1edd6f?_0x1edd6f['message']||_0x1edd6f:''});}exports['login']=function(_0x10f446,_0x35db7e,_0x306c28){passport[_0x4bf9('0x16')](_0x4bf9('0x2c'),function(_0x3c341d,_0x282fbf,_0x2c43de){var _0x20ed21=_0x3c341d||_0x2c43de;if(_0x20ed21){return handleError(_0x35db7e,0x191,_0x20ed21);}if(!_0x282fbf){return handleError(_0x35db7e,0x194,{'message':'Something\x20went\x20wrong,\x20please\x20try\x20again.'});}else{var _0x5a6b24={'payload':{'id':_0x282fbf['id'],'role':_0x282fbf['role']},'options':{'expiresIn':0x15180}};return authService[_0x4bf9('0x2d')](_0x5a6b24)[_0x4bf9('0xe')](function(_0x13a112){_0x35db7e[_0x4bf9('0x2e')]({'id':_0x282fbf['id'],'token':_0x13a112,'statusCall':'','isAlreadyLogged':_0x282fbf[_0x4bf9('0x2f')]});});}})(_0x10f446,_0x35db7e,_0x306c28);};exports['forgot']=function(_0x3bb6b,_0x513c34){if(!_0x3bb6b[_0x4bf9('0x30')][_0x4bf9('0x31')]){return handleError(_0x513c34,0x1f4,{'message':_0x4bf9('0x32')});}var _0x280c64=rs[_0x4bf9('0x33')]();_0x3bb6b['body'][_0x4bf9('0x31')]=_0x3bb6b[_0x4bf9('0x30')][_0x4bf9('0x31')][_0x4bf9('0x34')]()['toLowerCase']();var _0x3fcea2;return db['Setting'][_0x4bf9('0xb')]({'where':{'id':0x1},'attributes':[_0x4bf9('0xc'),_0x4bf9('0xd')],'raw':!![]})['then'](function(_0x1c49c1){_0x3fcea2=_0x1c49c1;return db[_0x4bf9('0x35')][_0x4bf9('0x1f')]({'where':{'email':_0x3bb6b[_0x4bf9('0x30')][_0x4bf9('0x31')]}});})[_0x4bf9('0xe')](function(_0x356feb){if(!_0x356feb){throw new Error(_0x4bf9('0x36'));}if(_0x356feb[_0x4bf9('0x18')]){throw new Error('The\x20user\x20is\x20disabled.\x20Please\x20contact\x20the\x20administrator.');}if(_0x356feb['blocked']){if(moment(_0x356feb[_0x4bf9('0x12')])[_0x4bf9('0x1b')](_0x3fcea2[_0x4bf9('0xd')],_0x4bf9('0x19'))>moment()){throw new Error(_0x4bf9('0x37'));}else{_0x356feb[_0x4bf9('0x11')]=![];_0x356feb['blockedAt']=null;}}_0x356feb[_0x4bf9('0x38')]=_0x280c64;_0x356feb[_0x4bf9('0x39')]=Date['now']()+0x36ee80;return _0x356feb[_0x4bf9('0x3a')]();})[_0x4bf9('0xe')](function(){return sendServiceMail({'to':_0x3bb6b['body'][_0x4bf9('0x31')],'subject':_0x4bf9('0x3b'),'text':_0x4bf9('0x3c')+_0x4bf9('0x3d')+_0x4bf9('0x3e')+_0x3bb6b[_0x4bf9('0x3f')][_0x4bf9('0x40')]+'/reset/'+_0x280c64+'\x0a\x0a'+'If\x20you\x20did\x20not\x20request\x20this,\x20please\x20ignore\x20this\x20email\x20and\x20your\x20password\x20will\x20remain\x20unchanged.\x0a'});})[_0x4bf9('0xe')](function(){_0x513c34['status'](0xc8)['send']({'message':'Reset\x20Email\x20sent!'});})[_0x4bf9('0x1d')](function(_0x15862b){return handleError(_0x513c34,0x1f4,_0x15862b);});};exports[_0x4bf9('0x41')]=function(_0x57a97a,_0xa248db){return db['User'][_0x4bf9('0x1f')]({'where':{'resetPasswordToken':_0x57a97a[_0x4bf9('0x42')][_0x4bf9('0x43')],'resetPasswordExpires':{'$gt':Date[_0x4bf9('0x44')]()}}})['then'](function(_0x38f6e3){if(!_0x38f6e3){throw new Error(_0x4bf9('0x45'));}return db[_0x4bf9('0xa')][_0x4bf9('0xb')]({'attributes':['id',_0x4bf9('0x46'),_0x4bf9('0x47'),_0x4bf9('0x48')]})[_0x4bf9('0xe')](function(_0x5cfa8d){if(_0x5cfa8d[_0x4bf9('0x46')])authService[_0x4bf9('0x49')](_0x57a97a[_0x4bf9('0x30')][_0x4bf9('0x4a')]);if(!_0x5cfa8d['enforcePasswordHistory']||!_0x38f6e3[_0x4bf9('0x4b')])return _0x38f6e3;authService['validatePasswordHistory'](_0x57a97a[_0x4bf9('0x30')]['password'],_0x38f6e3[_0x4bf9('0x4b')],_0x5cfa8d[_0x4bf9('0x48')]);return _0x38f6e3;})[_0x4bf9('0xe')](function(){_0x38f6e3[_0x4bf9('0x4a')]=_0x57a97a[_0x4bf9('0x30')][_0x4bf9('0x4a')];_0x38f6e3[_0x4bf9('0x38')]=null;_0x38f6e3['resetPasswordExpires']=null;return _0x38f6e3[_0x4bf9('0x3a')]();});})[_0x4bf9('0xe')](function(){_0xa248db[_0x4bf9('0x4c')](0xc8)[_0x4bf9('0x4d')]({'message':_0x4bf9('0x4e')});})[_0x4bf9('0x1d')](function(_0x2478e7){return handleError(_0xa248db,0x1f4,_0x2478e7);});};passport[_0x4bf9('0x4f')](_0x4bf9('0x2c'),new LocalStrategy({'usernameField':_0x4bf9('0x14'),'passwordField':_0x4bf9('0x4a')},function(_0xdc9ef5,_0x597297,_0x8a7872){return localAuthenticate(db['User'],_0xdc9ef5,_0x597297,_0x8a7872);}));
\ No newline at end of file
index 46dca26..69106e3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8ff5=['Router','./authLocal.controller','post','/forgot','/reset/:token','reset','express'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x8ff5,0xd1));var _0x58ff=function(_0x5d6456,_0x58ecc7){_0x5d6456=_0x5d6456-0x0;var _0x4d66c1=_0x8ff5[_0x5d6456];return _0x4d66c1;};'use strict';var express=require(_0x58ff('0x0'));var router=express[_0x58ff('0x1')]();var controller=require(_0x58ff('0x2'));router[_0x58ff('0x3')]('/',controller['login']);router[_0x58ff('0x3')](_0x58ff('0x4'),controller['forgot']);router['post'](_0x58ff('0x5'),controller[_0x58ff('0x6')]);module['exports']=router;
\ No newline at end of file
+var _0x58ea=['exports','post','/forgot','/reset/:token'];(function(_0x11f0e3,_0x5170bc){var _0x2892e8=function(_0x3292b2){while(--_0x3292b2){_0x11f0e3['push'](_0x11f0e3['shift']());}};_0x2892e8(++_0x5170bc);}(_0x58ea,0x12d));var _0xa58e=function(_0x451347,_0x196f7c){_0x451347=_0x451347-0x0;var _0x1d53a1=_0x58ea[_0x451347];return _0x1d53a1;};'use strict';var express=require('express');var router=express['Router']();var controller=require('./authLocal.controller');router['post']('/',controller['login']);router[_0xa58e('0x0')](_0xa58e('0x1'),controller['forgot']);router[_0xa58e('0x0')](_0xa58e('0x2'),controller['reset']);module[_0xa58e('0x3')]=router;
\ No newline at end of file
index 03dbb26..50bca9f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8b80=['sequelize','exports','STRING','BOOLEAN','INTEGER'];(function(_0x44a895,_0x4d65a2){var _0x591a86=function(_0x2468b8){while(--_0x2468b8){_0x44a895['push'](_0x44a895['shift']());}};_0x591a86(++_0x4d65a2);}(_0x8b80,0x73));var _0x08b8=function(_0x307bf6,_0x55bdd5){_0x307bf6=_0x307bf6-0x0;var _0x2878fc=_0x8b80[_0x307bf6];return _0x2878fc;};'use strict';var Sequelize=require(_0x08b8('0x0'));module[_0x08b8('0x1')]={'name':{'type':Sequelize[_0x08b8('0x2')],'allowNull':![]},'channel':{'type':Sequelize[_0x08b8('0x2')]},'description':{'type':Sequelize['STRING']},'status':{'type':Sequelize[_0x08b8('0x3')],'defaultValue':![]},'timeout':{'type':Sequelize[_0x08b8('0x4')],'defaultValue':0xa}};
\ No newline at end of file
+var _0x80c1=['sequelize','exports','STRING'];(function(_0x347662,_0x2d97b8){var _0x19b722=function(_0x419573){while(--_0x419573){_0x347662['push'](_0x347662['shift']());}};_0x19b722(++_0x2d97b8);}(_0x80c1,0x1e3));var _0x180c=function(_0x58309a,_0x593226){_0x58309a=_0x58309a-0x0;var _0x598182=_0x80c1[_0x58309a];return _0x598182;};'use strict';var Sequelize=require(_0x180c('0x0'));module[_0x180c('0x1')]={'name':{'type':Sequelize[_0x180c('0x2')],'allowNull':![]},'channel':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x180c('0x2')]},'status':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'timeout':{'type':Sequelize['INTEGER'],'defaultValue':0xa}};
\ No newline at end of file
index 211b836..4dc0430 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5262=['../../config/logger','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','set','Content-Range','apply','reject','save','destroy','then','error','stack','name','index','map','Automation','type','key','query','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filters','filter','merge','VIRTUAL','options','count','include','findAll','rows','catch','show','params','rawAttributes','keys','create','body','find','addConditions','omit','ids','getConditions','Condition','order','Action','addActions','getActions','findOne','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware'];(function(_0xadf939,_0x482184){var _0x232c43=function(_0x26c854){while(--_0x26c854){_0xadf939['push'](_0xadf939['shift']());}};_0x232c43(++_0x482184);}(_0x5262,0x90));var _0x2526=function(_0x66b6fc,_0x53d699){_0x66b6fc=_0x66b6fc-0x0;var _0xec117d=_0x5262[_0x66b6fc];return _0xec117d;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x2526('0x0'));var jsonpatch=require(_0x2526('0x1'));var rp=require(_0x2526('0x2'));var moment=require(_0x2526('0x3'));var BPromise=require(_0x2526('0x4'));var Mustache=require(_0x2526('0x5'));var util=require(_0x2526('0x6'));var path=require(_0x2526('0x7'));var sox=require(_0x2526('0x8'));var csv=require(_0x2526('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x2526('0xa'));var _=require(_0x2526('0xb'));var squel=require('squel');var crypto=require(_0x2526('0xc'));var jsforce=require(_0x2526('0xd'));var deskjs=require(_0x2526('0xe'));var toCsv=require(_0x2526('0x9'));var querystring=require(_0x2526('0xf'));var Papa=require(_0x2526('0x10'));var Redis=require(_0x2526('0x11'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x2526('0x12'));var hardwareService=require(_0x2526('0x13'));var logger=require(_0x2526('0x14'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x2526('0x15'))['db'];function respondWithStatusCode(_0x3f3e8b,_0x29b96b){_0x29b96b=_0x29b96b||0xcc;return function(_0x1f596e){if(_0x1f596e){return _0x3f3e8b[_0x2526('0x16')](_0x29b96b);}return _0x3f3e8b['status'](_0x29b96b)[_0x2526('0x17')]();};}function respondWithResult(_0x5978ec,_0x313d73){_0x313d73=_0x313d73||0xc8;return function(_0x275c1d){if(_0x275c1d){return _0x5978ec[_0x2526('0x18')](_0x313d73)[_0x2526('0x19')](_0x275c1d);}};}function respondWithFilteredResult(_0x11eb92,_0x535816){return function(_0x38a2fe){if(_0x38a2fe){var _0x526693=typeof _0x535816[_0x2526('0x1a')]===_0x2526('0x1b')&&typeof _0x535816['limit']==='undefined';var _0x2ff929=_0x38a2fe['count'];var _0x57d312=_0x526693?0x0:_0x535816[_0x2526('0x1a')];var _0x15f2ad=_0x526693?_0x38a2fe['count']:_0x535816[_0x2526('0x1a')]+_0x535816[_0x2526('0x1c')];var _0x5091af;if(_0x15f2ad>=_0x2ff929){_0x15f2ad=_0x2ff929;_0x5091af=0xc8;}else{_0x5091af=0xce;}_0x11eb92[_0x2526('0x18')](_0x5091af);return _0x11eb92[_0x2526('0x1d')](_0x2526('0x1e'),_0x57d312+'-'+_0x15f2ad+'/'+_0x2ff929)[_0x2526('0x19')](_0x38a2fe);}return null;};}function patchUpdates(_0x4d8ac4){return function(_0x252867){try{jsonpatch[_0x2526('0x1f')](_0x252867,_0x4d8ac4,!![]);}catch(_0x372279){return BPromise[_0x2526('0x20')](_0x372279);}return _0x252867[_0x2526('0x21')]();};}function saveUpdates(_0x8aaa91,_0x281de1){return function(_0x2839d5){if(_0x2839d5){return _0x2839d5['update'](_0x8aaa91)['then'](function(_0x5bf480){return _0x5bf480;});}return null;};}function removeEntity(_0x5378b6,_0x2b570b){return function(_0x335012){if(_0x335012){return _0x335012[_0x2526('0x22')]()[_0x2526('0x23')](function(){_0x5378b6[_0x2526('0x18')](0xcc)[_0x2526('0x17')]();});}};}function handleEntityNotFound(_0x53831c,_0x355fda){return function(_0x36f7f0){if(!_0x36f7f0){_0x53831c['sendStatus'](0x194);}return _0x36f7f0;};}function handleError(_0x3c163f,_0x5afb85){_0x5afb85=_0x5afb85||0x1f4;return function(_0x527b4d){logger[_0x2526('0x24')](_0x527b4d[_0x2526('0x25')]);if(_0x527b4d[_0x2526('0x26')]){delete _0x527b4d[_0x2526('0x26')];}_0x3c163f['status'](_0x5afb85)['send'](_0x527b4d);};}exports[_0x2526('0x27')]=function(_0x2eb4d9,_0x5177cf){var _0x2af91d={},_0xd154dc={},_0x5aa9b2={'count':0x0,'rows':[]};var _0x37f29c=_[_0x2526('0x28')](db[_0x2526('0x29')]['rawAttributes'],function(_0x6c9e90){return{'name':_0x6c9e90['fieldName'],'type':_0x6c9e90[_0x2526('0x2a')][_0x2526('0x2b')]};});_0xd154dc['model']=_[_0x2526('0x28')](_0x37f29c,_0x2526('0x26'));_0xd154dc[_0x2526('0x2c')]=_['keys'](_0x2eb4d9[_0x2526('0x2c')]);_0xd154dc['filters']=_[_0x2526('0x2d')](_0xd154dc[_0x2526('0x2e')],_0xd154dc[_0x2526('0x2c')]);_0x2af91d[_0x2526('0x2f')]=_['intersection'](_0xd154dc['model'],qs[_0x2526('0x30')](_0x2eb4d9[_0x2526('0x2c')]['fields']));_0x2af91d[_0x2526('0x2f')]=_0x2af91d[_0x2526('0x2f')][_0x2526('0x31')]?_0x2af91d[_0x2526('0x2f')]:_0xd154dc['model'];if(!_0x2eb4d9[_0x2526('0x2c')][_0x2526('0x32')](_0x2526('0x33'))){_0x2af91d[_0x2526('0x1c')]=qs[_0x2526('0x1c')](_0x2eb4d9[_0x2526('0x2c')]['limit']);_0x2af91d[_0x2526('0x1a')]=qs[_0x2526('0x1a')](_0x2eb4d9[_0x2526('0x2c')][_0x2526('0x1a')]);}_0x2af91d['order']=qs[_0x2526('0x34')](_0x2eb4d9['query']['sort']);_0x2af91d[_0x2526('0x35')]=qs['filters'](_[_0x2526('0x36')](_0x2eb4d9['query'],_0xd154dc[_0x2526('0x37')]),_0x37f29c);if(_0x2eb4d9[_0x2526('0x2c')][_0x2526('0x38')]){_0x2af91d[_0x2526('0x35')]=_[_0x2526('0x39')](_0x2af91d[_0x2526('0x35')],{'$or':_[_0x2526('0x28')](_0x37f29c,function(_0x191ace){if(_0x191ace[_0x2526('0x2a')]!==_0x2526('0x3a')){var _0x984980={};_0x984980[_0x191ace['name']]={'$like':'%'+_0x2eb4d9[_0x2526('0x2c')][_0x2526('0x38')]+'%'};return _0x984980;}})});}_0x2af91d=_[_0x2526('0x39')]({},_0x2af91d,_0x2eb4d9[_0x2526('0x3b')]);var _0x27cf41={'where':_0x2af91d[_0x2526('0x35')]};return db['Automation'][_0x2526('0x3c')](_0x27cf41)[_0x2526('0x23')](function(_0x56ca2f){_0x5aa9b2[_0x2526('0x3c')]=_0x56ca2f;if(_0x2eb4d9['query']['includeAll']){_0x2af91d[_0x2526('0x3d')]=[{'all':!![]}];}return db[_0x2526('0x29')][_0x2526('0x3e')](_0x2af91d);})[_0x2526('0x23')](function(_0x253a92){_0x5aa9b2[_0x2526('0x3f')]=_0x253a92;return _0x5aa9b2;})['then'](respondWithFilteredResult(_0x5177cf,_0x2af91d))[_0x2526('0x40')](handleError(_0x5177cf,null));};exports[_0x2526('0x41')]=function(_0x56a927,_0x15651e){var _0x5f327a={'raw':![],'where':{'id':_0x56a927[_0x2526('0x42')]['id']}},_0x156e03={};_0x156e03[_0x2526('0x2e')]=_['keys'](db['Automation'][_0x2526('0x43')]);_0x156e03[_0x2526('0x2c')]=_[_0x2526('0x44')](_0x56a927[_0x2526('0x2c')]);_0x156e03[_0x2526('0x37')]=_['intersection'](_0x156e03[_0x2526('0x2e')],_0x156e03[_0x2526('0x2c')]);_0x5f327a[_0x2526('0x2f')]=_['intersection'](_0x156e03['model'],qs[_0x2526('0x30')](_0x56a927[_0x2526('0x2c')][_0x2526('0x30')]));_0x5f327a[_0x2526('0x2f')]=_0x5f327a[_0x2526('0x2f')][_0x2526('0x31')]?_0x5f327a[_0x2526('0x2f')]:_0x156e03[_0x2526('0x2e')];if(_0x56a927['query']['includeAll']){_0x5f327a['include']=[{'all':!![]}];}_0x5f327a=_['merge']({},_0x5f327a,_0x56a927[_0x2526('0x3b')]);return db[_0x2526('0x29')]['find'](_0x5f327a)[_0x2526('0x23')](handleEntityNotFound(_0x15651e,null))[_0x2526('0x23')](respondWithResult(_0x15651e,null))[_0x2526('0x40')](handleError(_0x15651e,null));};exports[_0x2526('0x45')]=function(_0x4c2e97,_0x36420e){return db[_0x2526('0x29')][_0x2526('0x45')](_0x4c2e97[_0x2526('0x46')],{})[_0x2526('0x23')](respondWithResult(_0x36420e,0xc9))[_0x2526('0x40')](handleError(_0x36420e,null));};exports['update']=function(_0x4170f6,_0x25e616){if(_0x4170f6['body']['id']){delete _0x4170f6['body']['id'];}return db[_0x2526('0x29')][_0x2526('0x47')]({'where':{'id':_0x4170f6[_0x2526('0x42')]['id']}})[_0x2526('0x23')](handleEntityNotFound(_0x25e616,null))['then'](saveUpdates(_0x4170f6[_0x2526('0x46')],null))[_0x2526('0x23')](respondWithResult(_0x25e616,null))['catch'](handleError(_0x25e616,null));};exports['destroy']=function(_0x123ec8,_0x2dd703){return db['Automation']['find']({'where':{'id':_0x123ec8[_0x2526('0x42')]['id']}})[_0x2526('0x23')](handleEntityNotFound(_0x2dd703,null))[_0x2526('0x23')](removeEntity(_0x2dd703,null))[_0x2526('0x40')](handleError(_0x2dd703,null));};exports[_0x2526('0x48')]=function(_0x3214d6,_0x207370,_0x3818f7){return db['Condition'][_0x2526('0x47')]({'where':{'id':_0x3214d6[_0x2526('0x42')]['id']}})[_0x2526('0x23')](handleEntityNotFound(_0x207370,null))[_0x2526('0x23')](function(_0xa2f0a3){if(_0xa2f0a3){return _0xa2f0a3[_0x2526('0x48')](_0x3214d6[_0x2526('0x46')]['ids'],_[_0x2526('0x49')](_0x3214d6[_0x2526('0x46')],[_0x2526('0x4a'),'id'])||{});}})[_0x2526('0x23')](respondWithResult(_0x207370,null))[_0x2526('0x40')](handleError(_0x207370,null));};exports[_0x2526('0x4b')]=function(_0x51b7fc,_0x55fd31,_0x2f9334){var _0x5e91a4={};var _0x22e193={};var _0x455512;var _0x2847ab;return db[_0x2526('0x29')]['findOne']({'where':{'id':_0x51b7fc['params']['id']}})['then'](handleEntityNotFound(_0x55fd31,null))['then'](function(_0x2e6f2b){if(_0x2e6f2b){_0x455512=_0x2e6f2b;_0x22e193[_0x2526('0x2e')]=_[_0x2526('0x44')](db[_0x2526('0x4c')][_0x2526('0x43')]);_0x22e193[_0x2526('0x2c')]=_[_0x2526('0x44')](_0x51b7fc[_0x2526('0x2c')]);_0x22e193[_0x2526('0x37')]=_[_0x2526('0x2d')](_0x22e193[_0x2526('0x2e')],_0x22e193[_0x2526('0x2c')]);_0x5e91a4[_0x2526('0x2f')]=_[_0x2526('0x2d')](_0x22e193[_0x2526('0x2e')],qs[_0x2526('0x30')](_0x51b7fc[_0x2526('0x2c')][_0x2526('0x30')]));_0x5e91a4[_0x2526('0x2f')]=_0x5e91a4[_0x2526('0x2f')][_0x2526('0x31')]?_0x5e91a4[_0x2526('0x2f')]:_0x22e193['model'];_0x5e91a4[_0x2526('0x4d')]=qs[_0x2526('0x34')](_0x51b7fc[_0x2526('0x2c')][_0x2526('0x34')]);_0x5e91a4['where']=qs[_0x2526('0x37')](_[_0x2526('0x36')](_0x51b7fc[_0x2526('0x2c')],_0x22e193['filters']));if(_0x51b7fc['query'][_0x2526('0x38')]){_0x5e91a4[_0x2526('0x35')]=_['merge'](_0x5e91a4[_0x2526('0x35')],{'$or':_[_0x2526('0x28')](_0x5e91a4['attributes'],function(_0x177869){var _0x58c9db={};_0x58c9db[_0x177869]={'$like':'%'+_0x51b7fc[_0x2526('0x2c')][_0x2526('0x38')]+'%'};return _0x58c9db;})});}_0x5e91a4=_[_0x2526('0x39')]({},_0x5e91a4,_0x51b7fc['options']);return _0x455512['getConditions'](_0x5e91a4);}})[_0x2526('0x23')](function(_0x4edc5d){if(_0x4edc5d){_0x2847ab=_0x4edc5d['length'];if(!_0x51b7fc['query'][_0x2526('0x32')](_0x2526('0x33'))){_0x5e91a4['limit']=qs['limit'](_0x51b7fc['query'][_0x2526('0x1c')]);_0x5e91a4['offset']=qs[_0x2526('0x1a')](_0x51b7fc[_0x2526('0x2c')]['offset']);}return _0x455512[_0x2526('0x4b')](_0x5e91a4);}})['then'](function(_0x169ab8){if(_0x169ab8){return _0x169ab8?{'count':_0x2847ab,'rows':_0x169ab8}:null;}})[_0x2526('0x23')](respondWithResult(_0x55fd31,null))[_0x2526('0x40')](handleError(_0x55fd31,null));};exports['addActions']=function(_0x14dbbb,_0x2afd48,_0x49e2c0){return db[_0x2526('0x4e')][_0x2526('0x47')]({'where':{'id':_0x14dbbb['params']['id']}})[_0x2526('0x23')](handleEntityNotFound(_0x2afd48,null))[_0x2526('0x23')](function(_0x1c3481){if(_0x1c3481){return _0x1c3481[_0x2526('0x4f')](_0x14dbbb[_0x2526('0x46')][_0x2526('0x4a')],_[_0x2526('0x49')](_0x14dbbb['body'],['ids','id'])||{});}})[_0x2526('0x23')](respondWithResult(_0x2afd48,null))['catch'](handleError(_0x2afd48,null));};exports[_0x2526('0x50')]=function(_0x569075,_0x332c61,_0x4e2b31){var _0x17cb16={};var _0x1b84f3={};var _0x76f6bf;var _0x1976bd;return db[_0x2526('0x29')][_0x2526('0x51')]({'where':{'id':_0x569075[_0x2526('0x42')]['id']}})[_0x2526('0x23')](handleEntityNotFound(_0x332c61,null))['then'](function(_0x3ac2dc){if(_0x3ac2dc){_0x76f6bf=_0x3ac2dc;_0x1b84f3['model']=_['keys'](db[_0x2526('0x4e')][_0x2526('0x43')]);_0x1b84f3[_0x2526('0x2c')]=_[_0x2526('0x44')](_0x569075[_0x2526('0x2c')]);_0x1b84f3[_0x2526('0x37')]=_[_0x2526('0x2d')](_0x1b84f3[_0x2526('0x2e')],_0x1b84f3[_0x2526('0x2c')]);_0x17cb16[_0x2526('0x2f')]=_[_0x2526('0x2d')](_0x1b84f3[_0x2526('0x2e')],qs[_0x2526('0x30')](_0x569075[_0x2526('0x2c')][_0x2526('0x30')]));_0x17cb16[_0x2526('0x2f')]=_0x17cb16[_0x2526('0x2f')][_0x2526('0x31')]?_0x17cb16[_0x2526('0x2f')]:_0x1b84f3[_0x2526('0x2e')];_0x17cb16['order']=qs['sort'](_0x569075['query'][_0x2526('0x34')]);_0x17cb16['where']=qs[_0x2526('0x37')](_['pick'](_0x569075[_0x2526('0x2c')],_0x1b84f3[_0x2526('0x37')]));if(_0x569075[_0x2526('0x2c')]['filter']){_0x17cb16['where']=_['merge'](_0x17cb16[_0x2526('0x35')],{'$or':_['map'](_0x17cb16[_0x2526('0x2f')],function(_0x3f52b5){var _0x3c79d5={};_0x3c79d5[_0x3f52b5]={'$like':'%'+_0x569075[_0x2526('0x2c')][_0x2526('0x38')]+'%'};return _0x3c79d5;})});}_0x17cb16=_[_0x2526('0x39')]({},_0x17cb16,_0x569075[_0x2526('0x3b')]);return _0x76f6bf[_0x2526('0x50')](_0x17cb16);}})[_0x2526('0x23')](function(_0x72e26f){if(_0x72e26f){_0x1976bd=_0x72e26f[_0x2526('0x31')];if(!_0x569075[_0x2526('0x2c')][_0x2526('0x32')](_0x2526('0x33'))){_0x17cb16[_0x2526('0x1c')]=qs[_0x2526('0x1c')](_0x569075[_0x2526('0x2c')][_0x2526('0x1c')]);_0x17cb16[_0x2526('0x1a')]=qs[_0x2526('0x1a')](_0x569075['query']['offset']);}return _0x76f6bf['getActions'](_0x17cb16);}})[_0x2526('0x23')](function(_0x3e72d2){if(_0x3e72d2){return _0x3e72d2?{'count':_0x1976bd,'rows':_0x3e72d2}:null;}})[_0x2526('0x23')](respondWithResult(_0x332c61,null))['catch'](handleError(_0x332c61,null));};
\ No newline at end of file
+var _0xca6a=['lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','limit','undefined','count','Content-Range','reject','save','update','then','destroy','error','name','send','index','map','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','where','merge','filter','Automation','include','findAll','rows','catch','show','params','rawAttributes','includeAll','options','find','create','body','Condition','addConditions','ids','omit','findOne','pick','getConditions','addActions','getActions','Action','hasOwnProperty','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra'];(function(_0xa25862,_0x27f1a4){var _0x5b9b0a=function(_0x300346){while(--_0x300346){_0xa25862['push'](_0xa25862['shift']());}};_0x5b9b0a(++_0x27f1a4);}(_0xca6a,0x194));var _0xaca6=function(_0x2dadb9,_0x42cfe6){_0x2dadb9=_0x2dadb9-0x0;var _0x2f0097=_0xca6a[_0x2dadb9];return _0x2f0097;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xaca6('0x0'));var rp=require(_0xaca6('0x1'));var moment=require(_0xaca6('0x2'));var BPromise=require(_0xaca6('0x3'));var Mustache=require(_0xaca6('0x4'));var util=require(_0xaca6('0x5'));var path=require(_0xaca6('0x6'));var sox=require(_0xaca6('0x7'));var csv=require(_0xaca6('0x8'));var ejs=require(_0xaca6('0x9'));var fs=require('fs');var fs_extra=require(_0xaca6('0xa'));var _=require(_0xaca6('0xb'));var squel=require(_0xaca6('0xc'));var crypto=require(_0xaca6('0xd'));var jsforce=require(_0xaca6('0xe'));var deskjs=require(_0xaca6('0xf'));var toCsv=require('to-csv');var querystring=require(_0xaca6('0x10'));var Papa=require(_0xaca6('0x11'));var Redis=require('ioredis');var authService=require(_0xaca6('0x12'));var qs=require(_0xaca6('0x13'));var as=require(_0xaca6('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0xaca6('0x15'));var config=require(_0xaca6('0x16'));var licenseUtil=require(_0xaca6('0x17'));var db=require(_0xaca6('0x18'))['db'];function respondWithStatusCode(_0x375289,_0x3f9cc7){_0x3f9cc7=_0x3f9cc7||0xcc;return function(_0x2a6b18){if(_0x2a6b18){return _0x375289[_0xaca6('0x19')](_0x3f9cc7);}return _0x375289[_0xaca6('0x1a')](_0x3f9cc7)[_0xaca6('0x1b')]();};}function respondWithResult(_0xe45ccc,_0x13666c){_0x13666c=_0x13666c||0xc8;return function(_0x1013ed){if(_0x1013ed){return _0xe45ccc[_0xaca6('0x1a')](_0x13666c)['json'](_0x1013ed);}};}function respondWithFilteredResult(_0x244e5d,_0x4c8ac9){return function(_0x2acf7d){if(_0x2acf7d){var _0x4cc31d=typeof _0x4c8ac9[_0xaca6('0x1c')]==='undefined'&&typeof _0x4c8ac9[_0xaca6('0x1d')]===_0xaca6('0x1e');var _0xc79974=_0x2acf7d['count'];var _0x11dcb3=_0x4cc31d?0x0:_0x4c8ac9[_0xaca6('0x1c')];var _0x18a0ca=_0x4cc31d?_0x2acf7d[_0xaca6('0x1f')]:_0x4c8ac9['offset']+_0x4c8ac9[_0xaca6('0x1d')];var _0x3d74db;if(_0x18a0ca>=_0xc79974){_0x18a0ca=_0xc79974;_0x3d74db=0xc8;}else{_0x3d74db=0xce;}_0x244e5d[_0xaca6('0x1a')](_0x3d74db);return _0x244e5d['set'](_0xaca6('0x20'),_0x11dcb3+'-'+_0x18a0ca+'/'+_0xc79974)['json'](_0x2acf7d);}return null;};}function patchUpdates(_0xac8ea1){return function(_0x21d4bb){try{jsonpatch['apply'](_0x21d4bb,_0xac8ea1,!![]);}catch(_0x2cc5c6){return BPromise[_0xaca6('0x21')](_0x2cc5c6);}return _0x21d4bb[_0xaca6('0x22')]();};}function saveUpdates(_0x22ec0e,_0x463187){return function(_0x40110a){if(_0x40110a){return _0x40110a[_0xaca6('0x23')](_0x22ec0e)[_0xaca6('0x24')](function(_0x56a03a){return _0x56a03a;});}return null;};}function removeEntity(_0x263aa7,_0x337235){return function(_0x5d80e9){if(_0x5d80e9){return _0x5d80e9[_0xaca6('0x25')]()[_0xaca6('0x24')](function(){_0x263aa7['status'](0xcc)[_0xaca6('0x1b')]();});}};}function handleEntityNotFound(_0x3d6133,_0x191a07){return function(_0x3996b2){if(!_0x3996b2){_0x3d6133['sendStatus'](0x194);}return _0x3996b2;};}function handleError(_0x629db,_0x3ff653){_0x3ff653=_0x3ff653||0x1f4;return function(_0x545a62){logger[_0xaca6('0x26')](_0x545a62['stack']);if(_0x545a62[_0xaca6('0x27')]){delete _0x545a62[_0xaca6('0x27')];}_0x629db[_0xaca6('0x1a')](_0x3ff653)[_0xaca6('0x28')](_0x545a62);};}exports[_0xaca6('0x29')]=function(_0x2b99a8,_0x3be9d2){var _0x41ac73={},_0x589e8b={},_0x33dc6f={'count':0x0,'rows':[]};var _0xc70d1=_[_0xaca6('0x2a')](db['Automation']['rawAttributes'],function(_0x10167b){return{'name':_0x10167b[_0xaca6('0x2b')],'type':_0x10167b['type'][_0xaca6('0x2c')]};});_0x589e8b[_0xaca6('0x2d')]=_['map'](_0xc70d1,_0xaca6('0x27'));_0x589e8b[_0xaca6('0x2e')]=_[_0xaca6('0x2f')](_0x2b99a8[_0xaca6('0x2e')]);_0x589e8b[_0xaca6('0x30')]=_[_0xaca6('0x31')](_0x589e8b[_0xaca6('0x2d')],_0x589e8b[_0xaca6('0x2e')]);_0x41ac73[_0xaca6('0x32')]=_[_0xaca6('0x31')](_0x589e8b[_0xaca6('0x2d')],qs[_0xaca6('0x33')](_0x2b99a8[_0xaca6('0x2e')][_0xaca6('0x33')]));_0x41ac73[_0xaca6('0x32')]=_0x41ac73[_0xaca6('0x32')][_0xaca6('0x34')]?_0x41ac73[_0xaca6('0x32')]:_0x589e8b[_0xaca6('0x2d')];if(!_0x2b99a8[_0xaca6('0x2e')]['hasOwnProperty'](_0xaca6('0x35'))){_0x41ac73['limit']=qs[_0xaca6('0x1d')](_0x2b99a8[_0xaca6('0x2e')][_0xaca6('0x1d')]);_0x41ac73[_0xaca6('0x1c')]=qs[_0xaca6('0x1c')](_0x2b99a8[_0xaca6('0x2e')][_0xaca6('0x1c')]);}_0x41ac73[_0xaca6('0x36')]=qs[_0xaca6('0x37')](_0x2b99a8['query'][_0xaca6('0x37')]);_0x41ac73[_0xaca6('0x38')]=qs[_0xaca6('0x30')](_['pick'](_0x2b99a8[_0xaca6('0x2e')],_0x589e8b['filters']),_0xc70d1);if(_0x2b99a8[_0xaca6('0x2e')]['filter']){_0x41ac73['where']=_[_0xaca6('0x39')](_0x41ac73[_0xaca6('0x38')],{'$or':_[_0xaca6('0x2a')](_0xc70d1,function(_0x434e91){if(_0x434e91['type']!=='VIRTUAL'){var _0x4ce815={};_0x4ce815[_0x434e91[_0xaca6('0x27')]]={'$like':'%'+_0x2b99a8[_0xaca6('0x2e')][_0xaca6('0x3a')]+'%'};return _0x4ce815;}})});}_0x41ac73=_['merge']({},_0x41ac73,_0x2b99a8['options']);var _0x56ad87={'where':_0x41ac73[_0xaca6('0x38')]};return db[_0xaca6('0x3b')][_0xaca6('0x1f')](_0x56ad87)['then'](function(_0x4cf499){_0x33dc6f[_0xaca6('0x1f')]=_0x4cf499;if(_0x2b99a8[_0xaca6('0x2e')]['includeAll']){_0x41ac73[_0xaca6('0x3c')]=[{'all':!![]}];}return db[_0xaca6('0x3b')][_0xaca6('0x3d')](_0x41ac73);})['then'](function(_0x380005){_0x33dc6f[_0xaca6('0x3e')]=_0x380005;return _0x33dc6f;})[_0xaca6('0x24')](respondWithFilteredResult(_0x3be9d2,_0x41ac73))[_0xaca6('0x3f')](handleError(_0x3be9d2,null));};exports[_0xaca6('0x40')]=function(_0x58a77f,_0x206a73){var _0x3e3fc8={'raw':![],'where':{'id':_0x58a77f[_0xaca6('0x41')]['id']}},_0x2f0f8f={};_0x2f0f8f[_0xaca6('0x2d')]=_[_0xaca6('0x2f')](db[_0xaca6('0x3b')][_0xaca6('0x42')]);_0x2f0f8f[_0xaca6('0x2e')]=_[_0xaca6('0x2f')](_0x58a77f[_0xaca6('0x2e')]);_0x2f0f8f[_0xaca6('0x30')]=_['intersection'](_0x2f0f8f[_0xaca6('0x2d')],_0x2f0f8f['query']);_0x3e3fc8[_0xaca6('0x32')]=_[_0xaca6('0x31')](_0x2f0f8f[_0xaca6('0x2d')],qs[_0xaca6('0x33')](_0x58a77f[_0xaca6('0x2e')]['fields']));_0x3e3fc8['attributes']=_0x3e3fc8[_0xaca6('0x32')][_0xaca6('0x34')]?_0x3e3fc8[_0xaca6('0x32')]:_0x2f0f8f[_0xaca6('0x2d')];if(_0x58a77f[_0xaca6('0x2e')][_0xaca6('0x43')]){_0x3e3fc8[_0xaca6('0x3c')]=[{'all':!![]}];}_0x3e3fc8=_['merge']({},_0x3e3fc8,_0x58a77f[_0xaca6('0x44')]);return db[_0xaca6('0x3b')][_0xaca6('0x45')](_0x3e3fc8)[_0xaca6('0x24')](handleEntityNotFound(_0x206a73,null))[_0xaca6('0x24')](respondWithResult(_0x206a73,null))[_0xaca6('0x3f')](handleError(_0x206a73,null));};exports[_0xaca6('0x46')]=function(_0xe54ef4,_0x44dda2){return db[_0xaca6('0x3b')][_0xaca6('0x46')](_0xe54ef4[_0xaca6('0x47')],{})['then'](respondWithResult(_0x44dda2,0xc9))['catch'](handleError(_0x44dda2,null));};exports['update']=function(_0x54a1e2,_0x1a9728){if(_0x54a1e2['body']['id']){delete _0x54a1e2[_0xaca6('0x47')]['id'];}return db[_0xaca6('0x3b')][_0xaca6('0x45')]({'where':{'id':_0x54a1e2['params']['id']}})[_0xaca6('0x24')](handleEntityNotFound(_0x1a9728,null))[_0xaca6('0x24')](saveUpdates(_0x54a1e2[_0xaca6('0x47')],null))[_0xaca6('0x24')](respondWithResult(_0x1a9728,null))[_0xaca6('0x3f')](handleError(_0x1a9728,null));};exports['destroy']=function(_0x318422,_0x46d0fb){return db[_0xaca6('0x3b')][_0xaca6('0x45')]({'where':{'id':_0x318422[_0xaca6('0x41')]['id']}})[_0xaca6('0x24')](handleEntityNotFound(_0x46d0fb,null))[_0xaca6('0x24')](removeEntity(_0x46d0fb,null))[_0xaca6('0x3f')](handleError(_0x46d0fb,null));};exports['addConditions']=function(_0x357313,_0x3ff5d3,_0x269751){return db[_0xaca6('0x48')]['find']({'where':{'id':_0x357313[_0xaca6('0x41')]['id']}})['then'](handleEntityNotFound(_0x3ff5d3,null))[_0xaca6('0x24')](function(_0x35ff2c){if(_0x35ff2c){return _0x35ff2c[_0xaca6('0x49')](_0x357313['body'][_0xaca6('0x4a')],_[_0xaca6('0x4b')](_0x357313[_0xaca6('0x47')],[_0xaca6('0x4a'),'id'])||{});}})[_0xaca6('0x24')](respondWithResult(_0x3ff5d3,null))[_0xaca6('0x3f')](handleError(_0x3ff5d3,null));};exports['getConditions']=function(_0x4269ce,_0x118c9b,_0x1a6fac){var _0x4eb01b={};var _0x3c575c={};var _0xe1a5b4;var _0x2f3f08;return db[_0xaca6('0x3b')][_0xaca6('0x4c')]({'where':{'id':_0x4269ce[_0xaca6('0x41')]['id']}})[_0xaca6('0x24')](handleEntityNotFound(_0x118c9b,null))[_0xaca6('0x24')](function(_0x3cada7){if(_0x3cada7){_0xe1a5b4=_0x3cada7;_0x3c575c['model']=_['keys'](db[_0xaca6('0x48')][_0xaca6('0x42')]);_0x3c575c[_0xaca6('0x2e')]=_['keys'](_0x4269ce[_0xaca6('0x2e')]);_0x3c575c[_0xaca6('0x30')]=_[_0xaca6('0x31')](_0x3c575c[_0xaca6('0x2d')],_0x3c575c[_0xaca6('0x2e')]);_0x4eb01b[_0xaca6('0x32')]=_['intersection'](_0x3c575c[_0xaca6('0x2d')],qs[_0xaca6('0x33')](_0x4269ce[_0xaca6('0x2e')][_0xaca6('0x33')]));_0x4eb01b[_0xaca6('0x32')]=_0x4eb01b[_0xaca6('0x32')][_0xaca6('0x34')]?_0x4eb01b[_0xaca6('0x32')]:_0x3c575c[_0xaca6('0x2d')];_0x4eb01b[_0xaca6('0x36')]=qs[_0xaca6('0x37')](_0x4269ce['query'][_0xaca6('0x37')]);_0x4eb01b['where']=qs[_0xaca6('0x30')](_[_0xaca6('0x4d')](_0x4269ce[_0xaca6('0x2e')],_0x3c575c[_0xaca6('0x30')]));if(_0x4269ce[_0xaca6('0x2e')]['filter']){_0x4eb01b['where']=_[_0xaca6('0x39')](_0x4eb01b['where'],{'$or':_[_0xaca6('0x2a')](_0x4eb01b['attributes'],function(_0x1e9026){var _0x231628={};_0x231628[_0x1e9026]={'$like':'%'+_0x4269ce[_0xaca6('0x2e')]['filter']+'%'};return _0x231628;})});}_0x4eb01b=_[_0xaca6('0x39')]({},_0x4eb01b,_0x4269ce[_0xaca6('0x44')]);return _0xe1a5b4['getConditions'](_0x4eb01b);}})[_0xaca6('0x24')](function(_0x3d6691){if(_0x3d6691){_0x2f3f08=_0x3d6691[_0xaca6('0x34')];if(!_0x4269ce[_0xaca6('0x2e')]['hasOwnProperty'](_0xaca6('0x35'))){_0x4eb01b['limit']=qs[_0xaca6('0x1d')](_0x4269ce['query'][_0xaca6('0x1d')]);_0x4eb01b['offset']=qs[_0xaca6('0x1c')](_0x4269ce[_0xaca6('0x2e')][_0xaca6('0x1c')]);}return _0xe1a5b4[_0xaca6('0x4e')](_0x4eb01b);}})[_0xaca6('0x24')](function(_0x43353c){if(_0x43353c){return _0x43353c?{'count':_0x2f3f08,'rows':_0x43353c}:null;}})[_0xaca6('0x24')](respondWithResult(_0x118c9b,null))[_0xaca6('0x3f')](handleError(_0x118c9b,null));};exports[_0xaca6('0x4f')]=function(_0x5169f5,_0x5ccbd7,_0x88df54){return db['Action'][_0xaca6('0x45')]({'where':{'id':_0x5169f5[_0xaca6('0x41')]['id']}})[_0xaca6('0x24')](handleEntityNotFound(_0x5ccbd7,null))[_0xaca6('0x24')](function(_0x2b0382){if(_0x2b0382){return _0x2b0382[_0xaca6('0x4f')](_0x5169f5[_0xaca6('0x47')][_0xaca6('0x4a')],_['omit'](_0x5169f5[_0xaca6('0x47')],['ids','id'])||{});}})[_0xaca6('0x24')](respondWithResult(_0x5ccbd7,null))['catch'](handleError(_0x5ccbd7,null));};exports[_0xaca6('0x50')]=function(_0x5edd39,_0x69645a,_0x13aca3){var _0x17d6b0={};var _0x30add2={};var _0x1a417e;var _0x5a0180;return db['Automation'][_0xaca6('0x4c')]({'where':{'id':_0x5edd39[_0xaca6('0x41')]['id']}})[_0xaca6('0x24')](handleEntityNotFound(_0x69645a,null))[_0xaca6('0x24')](function(_0x5a3362){if(_0x5a3362){_0x1a417e=_0x5a3362;_0x30add2[_0xaca6('0x2d')]=_[_0xaca6('0x2f')](db[_0xaca6('0x51')][_0xaca6('0x42')]);_0x30add2['query']=_['keys'](_0x5edd39[_0xaca6('0x2e')]);_0x30add2[_0xaca6('0x30')]=_['intersection'](_0x30add2['model'],_0x30add2[_0xaca6('0x2e')]);_0x17d6b0[_0xaca6('0x32')]=_[_0xaca6('0x31')](_0x30add2[_0xaca6('0x2d')],qs[_0xaca6('0x33')](_0x5edd39[_0xaca6('0x2e')][_0xaca6('0x33')]));_0x17d6b0[_0xaca6('0x32')]=_0x17d6b0[_0xaca6('0x32')][_0xaca6('0x34')]?_0x17d6b0['attributes']:_0x30add2[_0xaca6('0x2d')];_0x17d6b0['order']=qs[_0xaca6('0x37')](_0x5edd39['query'][_0xaca6('0x37')]);_0x17d6b0[_0xaca6('0x38')]=qs['filters'](_[_0xaca6('0x4d')](_0x5edd39[_0xaca6('0x2e')],_0x30add2[_0xaca6('0x30')]));if(_0x5edd39[_0xaca6('0x2e')][_0xaca6('0x3a')]){_0x17d6b0[_0xaca6('0x38')]=_[_0xaca6('0x39')](_0x17d6b0[_0xaca6('0x38')],{'$or':_['map'](_0x17d6b0[_0xaca6('0x32')],function(_0x263916){var _0x474300={};_0x474300[_0x263916]={'$like':'%'+_0x5edd39[_0xaca6('0x2e')][_0xaca6('0x3a')]+'%'};return _0x474300;})});}_0x17d6b0=_['merge']({},_0x17d6b0,_0x5edd39[_0xaca6('0x44')]);return _0x1a417e[_0xaca6('0x50')](_0x17d6b0);}})[_0xaca6('0x24')](function(_0x2a238f){if(_0x2a238f){_0x5a0180=_0x2a238f['length'];if(!_0x5edd39[_0xaca6('0x2e')][_0xaca6('0x52')](_0xaca6('0x35'))){_0x17d6b0['limit']=qs[_0xaca6('0x1d')](_0x5edd39[_0xaca6('0x2e')][_0xaca6('0x1d')]);_0x17d6b0[_0xaca6('0x1c')]=qs['offset'](_0x5edd39[_0xaca6('0x2e')][_0xaca6('0x1c')]);}return _0x1a417e[_0xaca6('0x50')](_0x17d6b0);}})['then'](function(_0x5e01db){if(_0x5e01db){return _0x5e01db?{'count':_0x5a0180,'rows':_0x5e01db}:null;}})['then'](respondWithResult(_0x69645a,null))[_0xaca6('0x3f')](handleError(_0x69645a,null));};
\ No newline at end of file
index 68a370b..e01288d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5b38=['rimraf','../../config/environment','./automation.attributes','define','Automation','util','../../config/logger','api','moment','bluebird'];(function(_0x4a8b2a,_0x5639ac){var _0x412976=function(_0x28dac1){while(--_0x28dac1){_0x4a8b2a['push'](_0x4a8b2a['shift']());}};_0x412976(++_0x5639ac);}(_0x5b38,0x73));var _0x85b3=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x5b38[_0xbca1b1];return _0x4e1686;};'use strict';var _=require('lodash');var util=require(_0x85b3('0x0'));var logger=require(_0x85b3('0x1'))(_0x85b3('0x2'));var moment=require(_0x85b3('0x3'));var BPromise=require(_0x85b3('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x85b3('0x5'));var config=require(_0x85b3('0x6'));var attributes=require(_0x85b3('0x7'));module['exports']=function(_0x5a581a,_0x44766d){return _0x5a581a[_0x85b3('0x8')](_0x85b3('0x9'),attributes,{'tableName':'tools_automations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x26a1=['../../config/environment','./automation.attributes','define','util','../../config/logger','bluebird','request-promise','path','rimraf'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x26a1,0xf6));var _0x126a=function(_0x1d9aa0,_0x272488){_0x1d9aa0=_0x1d9aa0-0x0;var _0x226868=_0x26a1[_0x1d9aa0];return _0x226868;};'use strict';var _=require('lodash');var util=require(_0x126a('0x0'));var logger=require(_0x126a('0x1'))('api');var moment=require('moment');var BPromise=require(_0x126a('0x2'));var rp=require(_0x126a('0x3'));var fs=require('fs');var path=require(_0x126a('0x4'));var rimraf=require(_0x126a('0x5'));var config=require(_0x126a('0x6'));var attributes=require(_0x126a('0x7'));module['exports']=function(_0x18c0c3,_0x1f279d){return _0x18c0c3[_0x126a('0x8')]('Automation',attributes,{'tableName':'tools_automations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index f00c761..856e97d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5f2f=['lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','info','Automation,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch'];(function(_0x17edef,_0x3a08b1){var _0x8fb2e9=function(_0x1b7143){while(--_0x1b7143){_0x17edef['push'](_0x17edef['shift']());}};_0x8fb2e9(++_0x3a08b1);}(_0x5f2f,0x73));var _0xf5f2=function(_0x50a200,_0x107e3b){_0x50a200=_0x50a200-0x0;var _0x209610=_0x5f2f[_0x50a200];return _0x209610;};'use strict';var _=require(_0xf5f2('0x0'));var util=require(_0xf5f2('0x1'));var moment=require(_0xf5f2('0x2'));var BPromise=require(_0xf5f2('0x3'));var rs=require(_0xf5f2('0x4'));var fs=require('fs');var Redis=require(_0xf5f2('0x5'));var db=require(_0xf5f2('0x6'))['db'];var utils=require(_0xf5f2('0x7'));var logger=require('../../config/logger')('rpc');var config=require(_0xf5f2('0x8'));var jayson=require(_0xf5f2('0x9'));var client=jayson[_0xf5f2('0xa')][_0xf5f2('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3133bc,_0x473100,_0x5907aa){return new BPromise(function(_0x466882,_0x46cd9c){return client[_0xf5f2('0xc')](_0x3133bc,_0x5907aa)['then'](function(_0x375da4){logger[_0xf5f2('0xd')](_0xf5f2('0xe'),_0x473100,'request\x20sent');logger[_0xf5f2('0xf')]('Automation,\x20%s,\x20%s,\x20%s',_0x473100,'request\x20sent',JSON[_0xf5f2('0x10')](_0x375da4));if(_0x375da4[_0xf5f2('0x11')]){if(_0x375da4['error'][_0xf5f2('0x12')]===0x1f4){logger[_0xf5f2('0x11')](_0xf5f2('0xe'),_0x473100,_0x375da4[_0xf5f2('0x11')][_0xf5f2('0x13')]);return _0x46cd9c(_0x375da4[_0xf5f2('0x11')]['message']);}logger[_0xf5f2('0x11')](_0xf5f2('0xe'),_0x473100,_0x375da4[_0xf5f2('0x11')][_0xf5f2('0x13')]);return _0x466882(_0x375da4[_0xf5f2('0x11')]['message']);}else{logger[_0xf5f2('0xd')](_0xf5f2('0xe'),_0x473100,_0xf5f2('0x14'));_0x466882(_0x375da4[_0xf5f2('0x15')][_0xf5f2('0x13')]);}})[_0xf5f2('0x16')](function(_0xdb61b3){logger[_0xf5f2('0x11')](_0xf5f2('0xe'),_0x473100,_0xdb61b3);_0x46cd9c(_0xdb61b3);});});}
\ No newline at end of file
+var _0x1e82=['Automation,\x20%s,\x20%s','request\x20sent','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','client','http','request','info'];(function(_0x70b86,_0x11358c){var _0x45953b=function(_0x436304){while(--_0x436304){_0x70b86['push'](_0x70b86['shift']());}};_0x45953b(++_0x11358c);}(_0x1e82,0x8b));var _0x21e8=function(_0x687fa6,_0x2ccb8a){_0x687fa6=_0x687fa6-0x0;var _0x2d07e2=_0x1e82[_0x687fa6];return _0x2d07e2;};'use strict';var _=require(_0x21e8('0x0'));var util=require(_0x21e8('0x1'));var moment=require(_0x21e8('0x2'));var BPromise=require(_0x21e8('0x3'));var rs=require(_0x21e8('0x4'));var fs=require('fs');var Redis=require(_0x21e8('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x21e8('0x6'));var logger=require(_0x21e8('0x7'))('rpc');var config=require(_0x21e8('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x21e8('0x9')][_0x21e8('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x38c3d0,_0x22cbd4,_0x47b3b3){return new BPromise(function(_0x45e5c1,_0x3754c9){return client[_0x21e8('0xb')](_0x38c3d0,_0x47b3b3)['then'](function(_0x31b6c2){logger[_0x21e8('0xc')](_0x21e8('0xd'),_0x22cbd4,_0x21e8('0xe'));logger['debug']('Automation,\x20%s,\x20%s,\x20%s',_0x22cbd4,_0x21e8('0xe'),JSON['stringify'](_0x31b6c2));if(_0x31b6c2[_0x21e8('0xf')]){if(_0x31b6c2[_0x21e8('0xf')]['code']===0x1f4){logger[_0x21e8('0xf')]('Automation,\x20%s,\x20%s',_0x22cbd4,_0x31b6c2[_0x21e8('0xf')][_0x21e8('0x10')]);return _0x3754c9(_0x31b6c2[_0x21e8('0xf')]['message']);}logger[_0x21e8('0xf')]('Automation,\x20%s,\x20%s',_0x22cbd4,_0x31b6c2[_0x21e8('0xf')][_0x21e8('0x10')]);return _0x45e5c1(_0x31b6c2[_0x21e8('0xf')]['message']);}else{logger['info'](_0x21e8('0xd'),_0x22cbd4,_0x21e8('0xe'));_0x45e5c1(_0x31b6c2[_0x21e8('0x11')][_0x21e8('0x10')]);}})[_0x21e8('0x12')](function(_0x13da4f){logger[_0x21e8('0xf')](_0x21e8('0xd'),_0x22cbd4,_0x13da4f);_0x3754c9(_0x13da4f);});});}
\ No newline at end of file
index b334699..ee75b64 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6b19=['show','/:id/conditions','getConditions','/:id/actions','getActions','post','put','/:id','update','delete','destroy','exports','multer','util','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./automation.controller','isAuthenticated','get'];(function(_0x2ee8b2,_0x26a81a){var _0x5de665=function(_0x73b664){while(--_0x73b664){_0x2ee8b2['push'](_0x2ee8b2['shift']());}};_0x5de665(++_0x26a81a);}(_0x6b19,0xe8));var _0x96b1=function(_0x573a82,_0x4939d2){_0x573a82=_0x573a82-0x0;var _0x5bf900=_0x6b19[_0x573a82];return _0x5bf900;};'use strict';var multer=require(_0x96b1('0x0'));var util=require(_0x96b1('0x1'));var path=require('path');var timeout=require(_0x96b1('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x96b1('0x3'));var auth=require(_0x96b1('0x4'));var interaction=require(_0x96b1('0x5'));var config=require(_0x96b1('0x6'));var controller=require(_0x96b1('0x7'));router['get']('/',auth[_0x96b1('0x8')](),controller['index']);router[_0x96b1('0x9')]('/:id',auth['isAuthenticated'](),controller[_0x96b1('0xa')]);router['get'](_0x96b1('0xb'),auth['isAuthenticated'](),controller[_0x96b1('0xc')]);router[_0x96b1('0x9')](_0x96b1('0xd'),auth[_0x96b1('0x8')](),controller[_0x96b1('0xe')]);router[_0x96b1('0xf')]('/',auth[_0x96b1('0x8')](),controller['create']);router['post'](_0x96b1('0xb'),auth['isAuthenticated'](),controller['addConditions']);router[_0x96b1('0xf')](_0x96b1('0xd'),auth[_0x96b1('0x8')](),controller['addActions']);router[_0x96b1('0x10')](_0x96b1('0x11'),auth[_0x96b1('0x8')](),controller[_0x96b1('0x12')]);router[_0x96b1('0x13')]('/:id',auth[_0x96b1('0x8')](),controller[_0x96b1('0x14')]);module[_0x96b1('0x15')]=router;
\ No newline at end of file
+var _0xa9bb=['/:id','show','/:id/conditions','getActions','post','create','addConditions','addActions','update','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./automation.controller','get','isAuthenticated','index'];(function(_0x257495,_0x18269b){var _0x3849aa=function(_0x1ca94e){while(--_0x1ca94e){_0x257495['push'](_0x257495['shift']());}};_0x3849aa(++_0x18269b);}(_0xa9bb,0x1bc));var _0xba9b=function(_0x176329,_0x568c84){_0x176329=_0x176329-0x0;var _0x31997c=_0xa9bb[_0x176329];return _0x31997c;};'use strict';var multer=require('multer');var util=require(_0xba9b('0x0'));var path=require(_0xba9b('0x1'));var timeout=require(_0xba9b('0x2'));var express=require(_0xba9b('0x3'));var router=express[_0xba9b('0x4')]();var fs_extra=require(_0xba9b('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xba9b('0x6'));var config=require(_0xba9b('0x7'));var controller=require(_0xba9b('0x8'));router[_0xba9b('0x9')]('/',auth[_0xba9b('0xa')](),controller[_0xba9b('0xb')]);router[_0xba9b('0x9')](_0xba9b('0xc'),auth[_0xba9b('0xa')](),controller[_0xba9b('0xd')]);router[_0xba9b('0x9')](_0xba9b('0xe'),auth[_0xba9b('0xa')](),controller['getConditions']);router[_0xba9b('0x9')]('/:id/actions',auth[_0xba9b('0xa')](),controller[_0xba9b('0xf')]);router[_0xba9b('0x10')]('/',auth[_0xba9b('0xa')](),controller[_0xba9b('0x11')]);router[_0xba9b('0x10')](_0xba9b('0xe'),auth[_0xba9b('0xa')](),controller[_0xba9b('0x12')]);router['post']('/:id/actions',auth[_0xba9b('0xa')](),controller[_0xba9b('0x13')]);router['put']('/:id',auth[_0xba9b('0xa')](),controller[_0xba9b('0x14')]);router[_0xba9b('0x15')]('/:id',auth[_0xba9b('0xa')](),controller[_0xba9b('0x16')]);module[_0xba9b('0x17')]=router;
\ No newline at end of file
index 6450aee..ae1f5d2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x784c=['#Machine\x20Retry\x20(min:1,\x20max:999)','#AgentReject\x20Retry\x20(min:1,\x20max:999)','AgentReject\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','sequelize','exports','STRING','ENUM','ivr','BOOLEAN','Active/Disactive\x20Campaign','INTEGER','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)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','never','onlyIfOpen','always','Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Min\x20Word\x20Length','#AMD\x20Between\x20Words\x20Silence','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','DESC','ASC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)','#Drop\x20Retry\x20(min:1,\x20max:999)','Drop\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#Abandoned\x20Retry\x20(min:1,\x20max:999)'];(function(_0x359186,_0x110e27){var _0xb83111=function(_0x1d80c3){while(--_0x1d80c3){_0x359186['push'](_0x359186['shift']());}};_0xb83111(++_0x110e27);}(_0x784c,0x78));var _0xc784=function(_0x3b5f06,_0x42190e){_0x3b5f06=_0x3b5f06-0x0;var _0x46afd5=_0x784c[_0x3b5f06];return _0x46afd5;};'use strict';var Sequelize=require(_0xc784('0x0'));module[_0xc784('0x1')]={'name':{'type':Sequelize[_0xc784('0x2')],'unique':'name','allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize[_0xc784('0x3')]('ivr'),'allowNull':![],'defaultValue':_0xc784('0x4')},'description':{'type':Sequelize[_0xc784('0x2')]},'active':{'type':Sequelize[_0xc784('0x5')],'defaultValue':0x0,'comment':_0xc784('0x6')},'limitCalls':{'type':Sequelize[_0xc784('0x7')](0x4)[_0xc784('0x8')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':'Max\x20200\x20calls.'},'dialOriginateCallerIdName':{'type':Sequelize['STRING']},'dialOriginateCallerIdNumber':{'type':Sequelize[_0xc784('0x2')]},'dialOriginateTimeout':{'type':Sequelize[_0xc784('0x7')](0x3)[_0xc784('0x8')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0xc784('0x9')},'dialCongestionMaxRetry':{'type':Sequelize[_0xc784('0x7')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xc784('0xa')},'dialCongestionRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0xc784('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xc784('0xb')},'dialBusyMaxRetry':{'type':Sequelize[_0xc784('0x7')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xc784('0xc')},'dialBusyRetryFrequency':{'type':Sequelize[_0xc784('0x7')](0x5)[_0xc784('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xc784('0xd')},'dialNoAnswerMaxRetry':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x3,'comment':_0xc784('0xe')},'dialNoAnswerRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0xc784('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xc784('0xf')},'dialGlobalMaxRetry':{'type':Sequelize[_0xc784('0x7')](0x3)[_0xc784('0x8')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0xc784('0x10')},'dialTimezone':{'type':Sequelize[_0xc784('0x2')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0xc784('0x2')],'defaultValue':_0xc784('0x11')},'dialCheckDuplicateType':{'type':Sequelize[_0xc784('0x3')]('always',_0xc784('0x12'),_0xc784('0x13')),'defaultValue':_0xc784('0x14')},'dialAMDActive':{'type':Sequelize[_0xc784('0x5')],'defaultValue':0x0,'comment':_0xc784('0x15')},'dialAMDInitialSilence':{'type':Sequelize[_0xc784('0x7')](0x9)[_0xc784('0x8')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0xc784('0x16')},'dialAMDGreeting':{'type':Sequelize[_0xc784('0x7')](0x9)['UNSIGNED'],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0xc784('0x17')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0xc784('0x7')](0x9)[_0xc784('0x8')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0xc784('0x18')},'dialAMDTotalAnalysisTime':{'type':Sequelize['INTEGER'](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':'#AMD\x20Total\x20Analysis\x20Time'},'dialAMDMinWordLength':{'type':Sequelize[_0xc784('0x7')](0x9)[_0xc784('0x8')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0xc784('0x19')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0xc784('0x7')](0x9)[_0xc784('0x8')],'defaultValue':0x32,'validate':{'min':0x0},'comment':_0xc784('0x1a')},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0xc784('0x7')](0x9)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x0},'comment':'#AMD\x20Maximum\x20Number\x20Of\x20Words'},'dialAMDSilenceThreshold':{'type':Sequelize[_0xc784('0x7')](0x5)[_0xc784('0x8')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0xc784('0x1b')},'dialAMDMaximumWordLength':{'type':Sequelize[_0xc784('0x7')](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0xc784('0x1c')},'dialOrderByScheduledAt':{'type':Sequelize[_0xc784('0x3')](_0xc784('0x1d'),_0xc784('0x1e')),'defaultValue':_0xc784('0x1d')},'dialPrefix':{'type':Sequelize['STRING'],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0xc784('0x7')](0x3)[_0xc784('0x8')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0xc784('0x1f')},'dialCutDigit':{'type':Sequelize[_0xc784('0x7')](0x3)[_0xc784('0x8')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':'Cut\x20Digit\x20(min:1,\x20max:15)'},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0xc784('0x7')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xc784('0x20')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0xc784('0x7')](0x5)[_0xc784('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialDropMaxRetry':{'type':Sequelize[_0xc784('0x7')](0x3)[_0xc784('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xc784('0x21')},'dialDropRetryFrequency':{'type':Sequelize[_0xc784('0x7')](0x5)[_0xc784('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xc784('0x22')},'dialAbandonedMaxRetry':{'type':Sequelize[_0xc784('0x7')](0x3)[_0xc784('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xc784('0x23')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0xc784('0x7')](0x5)[_0xc784('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Abandoned\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialMachineMaxRetry':{'type':Sequelize[_0xc784('0x7')](0x3)[_0xc784('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xc784('0x24')},'dialMachineRetryFrequency':{'type':Sequelize[_0xc784('0x7')](0x5)[_0xc784('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Machine\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialAgentRejectMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0xc784('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0xc784('0x25')},'dialAgentRejectRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0xc784('0x8')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0xc784('0x26')}};
\ No newline at end of file
+var _0x81d4=['#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','ASC','STRING','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\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)','sequelize','exports','ENUM','ivr','BOOLEAN','Active/Disactive\x20Campaign','INTEGER','UNSIGNED','Max\x20200\x20calls.','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)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','always','onlyIfOpen','Active/Disactive\x20AMD'];(function(_0x2642cb,_0x4b917f){var _0xe6e41=function(_0x281676){while(--_0x281676){_0x2642cb['push'](_0x2642cb['shift']());}};_0xe6e41(++_0x4b917f);}(_0x81d4,0xa7));var _0x481d=function(_0x4b2e96,_0x1db27a){_0x4b2e96=_0x4b2e96-0x0;var _0x974cb8=_0x81d4[_0x4b2e96];return _0x974cb8;};'use strict';var Sequelize=require(_0x481d('0x0'));module[_0x481d('0x1')]={'name':{'type':Sequelize['STRING'],'unique':'name','allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'type':{'type':Sequelize[_0x481d('0x2')](_0x481d('0x3')),'allowNull':![],'defaultValue':'ivr'},'description':{'type':Sequelize['STRING']},'active':{'type':Sequelize[_0x481d('0x4')],'defaultValue':0x0,'comment':_0x481d('0x5')},'limitCalls':{'type':Sequelize[_0x481d('0x6')](0x4)[_0x481d('0x7')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0xc8},'comment':_0x481d('0x8')},'dialOriginateCallerIdName':{'type':Sequelize['STRING']},'dialOriginateCallerIdNumber':{'type':Sequelize['STRING']},'dialOriginateTimeout':{'type':Sequelize[_0x481d('0x6')](0x3)[_0x481d('0x7')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x481d('0x9')},'dialCongestionMaxRetry':{'type':Sequelize[_0x481d('0x6')](0x3)[_0x481d('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x481d('0xa')},'dialCongestionRetryFrequency':{'type':Sequelize[_0x481d('0x6')](0x5)[_0x481d('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x481d('0xb')},'dialBusyMaxRetry':{'type':Sequelize[_0x481d('0x6')](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x481d('0xc')},'dialBusyRetryFrequency':{'type':Sequelize[_0x481d('0x6')](0x5)[_0x481d('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x481d('0x6')](0x3)[_0x481d('0x7')],'defaultValue':0x3,'comment':'#NoAnswer\x20Retry\x20(min:1,\x20max:999)'},'dialNoAnswerRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x481d('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialGlobalMaxRetry':{'type':Sequelize[_0x481d('0x6')](0x3)['UNSIGNED'],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0x481d('0xd')},'dialTimezone':{'type':Sequelize['STRING'],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize['STRING'],'defaultValue':_0x481d('0xe')},'dialCheckDuplicateType':{'type':Sequelize[_0x481d('0x2')](_0x481d('0xf'),'never',_0x481d('0x10')),'defaultValue':_0x481d('0xf')},'dialAMDActive':{'type':Sequelize[_0x481d('0x4')],'defaultValue':0x0,'comment':_0x481d('0x11')},'dialAMDInitialSilence':{'type':Sequelize[_0x481d('0x6')](0x9)[_0x481d('0x7')],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x481d('0x12')},'dialAMDGreeting':{'type':Sequelize['INTEGER'](0x9)['UNSIGNED'],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x481d('0x13')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x481d('0x6')](0x9)[_0x481d('0x7')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x481d('0x14')},'dialAMDTotalAnalysisTime':{'type':Sequelize['INTEGER'](0x9)[_0x481d('0x7')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x481d('0x15')},'dialAMDMinWordLength':{'type':Sequelize[_0x481d('0x6')](0x9)[_0x481d('0x7')],'defaultValue':0x64,'validate':{'min':0x0},'comment':'#AMD\x20Min\x20Word\x20Length'},'dialAMDBetweenWordsSilence':{'type':Sequelize['INTEGER'](0x9)[_0x481d('0x7')],'defaultValue':0x32,'validate':{'min':0x0},'comment':'#AMD\x20Between\x20Words\x20Silence'},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x481d('0x6')](0x9)[_0x481d('0x7')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x481d('0x16')},'dialAMDSilenceThreshold':{'type':Sequelize[_0x481d('0x6')](0x5)[_0x481d('0x7')],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x481d('0x17')},'dialAMDMaximumWordLength':{'type':Sequelize[_0x481d('0x6')](0x9)['UNSIGNED'],'defaultValue':0x1388,'validate':{'min':0x0},'comment':'#AMD\x20Maximum\x20Word\x20Length'},'dialOrderByScheduledAt':{'type':Sequelize[_0x481d('0x2')]('DESC',_0x481d('0x18')),'defaultValue':'DESC'},'dialPrefix':{'type':Sequelize[_0x481d('0x19')],'defaultValue':null},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize['INTEGER'](0x3)[_0x481d('0x7')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x481d('0x1a')},'dialCutDigit':{'type':Sequelize['INTEGER'](0x3)[_0x481d('0x7')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x481d('0x1b')},'dialNoSuchNumberMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x481d('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x481d('0x1c')},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x481d('0x6')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x481d('0x1d')},'dialDropMaxRetry':{'type':Sequelize[_0x481d('0x6')](0x3)[_0x481d('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Drop\x20Retry\x20(min:1,\x20max:999)'},'dialDropRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x481d('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x481d('0x1e')},'dialAbandonedMaxRetry':{'type':Sequelize[_0x481d('0x6')](0x3)[_0x481d('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x481d('0x1f')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0x481d('0x6')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x481d('0x20')},'dialMachineMaxRetry':{'type':Sequelize[_0x481d('0x6')](0x3)[_0x481d('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x481d('0x21')},'dialMachineRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x481d('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x481d('0x22')},'dialAgentRejectMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x481d('0x7')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x481d('0x23')},'dialAgentRejectRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x481d('0x7')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x481d('0x24')}};
\ No newline at end of file
index b1017a4..b909ad0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0431=['path','sox','to-csv','ejs','lodash','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','status','end','json','offset','undefined','limit','set','Content-Range','apply','reject','save','update','destroy','then','get','sendStatus','error','stack','name','send','index','map','Campaign','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','count','includeAll','include','findAll','rows','catch','params','options','find','create','body','user','role','IvrCampaigns','userProfileId','autoAssociation','UserProfileResource','clone','createdAt','updatedAt','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','getHoppers','CmHopper','CampaignId','getHopperHistories','findOne','CmHopperHistory','getHopperFinals','CmHopperFinal','getHopperBlacks','CmHopperBlack','getLists','CmList','format','ids','omit','dialCheckDuplicateType','insert','into','cm_hopper','phone','scheduledAt','ContactId','ListId','select','field','NOW()','CmListId','toString','from','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','CampaignId\x20=\x20?','COALESCE(phone,\x27\x27)','onlyIfOpen','fromQuery','OrderBy','h.id','ci.item','ci.OrderBY','cm_contact_has_items','join','h.CampaignId=?','h.createdAt\x20=\x20?','push','sequelize','all','removeLists','getBlackLists','addBlackLists','YYYY-MM-DD\x20HH:mm:ss','spread','cm_hopper_black','removeBlackLists','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache'];(function(_0x5d1b3c,_0x41945e){var _0x45176a=function(_0x3a3789){while(--_0x3a3789){_0x5d1b3c['push'](_0x5d1b3c['shift']());}};_0x45176a(++_0x41945e);}(_0x0431,0x11d));var _0x1043=function(_0x57486e,_0x32283b){_0x57486e=_0x57486e-0x0;var _0x5f110b=_0x0431[_0x57486e];return _0x5f110b;};'use strict';var emlformat=require(_0x1043('0x0'));var rimraf=require(_0x1043('0x1'));var zipdir=require(_0x1043('0x2'));var jsonpatch=require(_0x1043('0x3'));var rp=require(_0x1043('0x4'));var moment=require('moment');var BPromise=require(_0x1043('0x5'));var Mustache=require(_0x1043('0x6'));var util=require('util');var path=require(_0x1043('0x7'));var sox=require(_0x1043('0x8'));var csv=require(_0x1043('0x9'));var ejs=require(_0x1043('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x1043('0xb'));var squel=require('squel');var crypto=require(_0x1043('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x1043('0xd'));var toCsv=require('to-csv');var querystring=require(_0x1043('0xe'));var Papa=require(_0x1043('0xf'));var Redis=require(_0x1043('0x10'));var authService=require(_0x1043('0x11'));var qs=require(_0x1043('0x12'));var as=require(_0x1043('0x13'));var hardwareService=require(_0x1043('0x14'));var logger=require(_0x1043('0x15'))('api');var utils=require(_0x1043('0x16'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x1043('0x17'))['db'];function respondWithStatusCode(_0x17676f,_0x1f5d6a){_0x1f5d6a=_0x1f5d6a||0xcc;return function(_0x42a054){if(_0x42a054){return _0x17676f['sendStatus'](_0x1f5d6a);}return _0x17676f[_0x1043('0x18')](_0x1f5d6a)[_0x1043('0x19')]();};}function respondWithResult(_0x58408b,_0x55f143){_0x55f143=_0x55f143||0xc8;return function(_0x5759fe){if(_0x5759fe){return _0x58408b[_0x1043('0x18')](_0x55f143)[_0x1043('0x1a')](_0x5759fe);}};}function respondWithFilteredResult(_0xbdf462,_0x4255a7){return function(_0x2bb5ca){if(_0x2bb5ca){var _0x12535a=typeof _0x4255a7[_0x1043('0x1b')]===_0x1043('0x1c')&&typeof _0x4255a7[_0x1043('0x1d')]==='undefined';var _0x4a1b59=_0x2bb5ca['count'];var _0x16510a=_0x12535a?0x0:_0x4255a7[_0x1043('0x1b')];var _0x1a58e0=_0x12535a?_0x2bb5ca['count']:_0x4255a7[_0x1043('0x1b')]+_0x4255a7['limit'];var _0x284725;if(_0x1a58e0>=_0x4a1b59){_0x1a58e0=_0x4a1b59;_0x284725=0xc8;}else{_0x284725=0xce;}_0xbdf462[_0x1043('0x18')](_0x284725);return _0xbdf462[_0x1043('0x1e')](_0x1043('0x1f'),_0x16510a+'-'+_0x1a58e0+'/'+_0x4a1b59)[_0x1043('0x1a')](_0x2bb5ca);}return null;};}function patchUpdates(_0x5dbf75){return function(_0x490fba){try{jsonpatch[_0x1043('0x20')](_0x490fba,_0x5dbf75,!![]);}catch(_0x1fc51c){return BPromise[_0x1043('0x21')](_0x1fc51c);}return _0x490fba[_0x1043('0x22')]();};}function saveUpdates(_0x57e612,_0x3f53b8){return function(_0x484180){if(_0x484180){return _0x484180[_0x1043('0x23')](_0x57e612)['then'](function(_0x128941){return _0x128941;});}return null;};}function removeEntity(_0xedc199,_0x2853d4){return function(_0xdfc1d6){if(_0xdfc1d6){return _0xdfc1d6[_0x1043('0x24')]()[_0x1043('0x25')](function(){var _0x568ae0=_0xdfc1d6[_0x1043('0x26')]({'plain':!![]});var _0x46edf4='IvrCampaigns';return db['UserProfileResource'][_0x1043('0x24')]({'where':{'type':_0x46edf4,'resourceId':_0x568ae0['id']}})['then'](function(){return _0xdfc1d6;});})[_0x1043('0x25')](function(){_0xedc199[_0x1043('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2453ed,_0x36590b){return function(_0xb9b548){if(!_0xb9b548){_0x2453ed[_0x1043('0x27')](0x194);}return _0xb9b548;};}function handleError(_0x15adf3,_0x286e5e){_0x286e5e=_0x286e5e||0x1f4;return function(_0x3d5426){logger[_0x1043('0x28')](_0x3d5426[_0x1043('0x29')]);if(_0x3d5426[_0x1043('0x2a')]){delete _0x3d5426[_0x1043('0x2a')];}_0x15adf3[_0x1043('0x18')](_0x286e5e)[_0x1043('0x2b')](_0x3d5426);};}exports[_0x1043('0x2c')]=function(_0x1fe638,_0x20fd56){var _0x5496ea={},_0x5de70c={},_0x1865e5={'count':0x0,'rows':[]};var _0x4624ae=_[_0x1043('0x2d')](db[_0x1043('0x2e')][_0x1043('0x2f')],function(_0xe51897){return{'name':_0xe51897[_0x1043('0x30')],'type':_0xe51897[_0x1043('0x31')][_0x1043('0x32')]};});_0x5de70c[_0x1043('0x33')]=_[_0x1043('0x2d')](_0x4624ae,_0x1043('0x2a'));_0x5de70c[_0x1043('0x34')]=_[_0x1043('0x35')](_0x1fe638[_0x1043('0x34')]);_0x5de70c[_0x1043('0x36')]=_[_0x1043('0x37')](_0x5de70c[_0x1043('0x33')],_0x5de70c[_0x1043('0x34')]);_0x5496ea[_0x1043('0x38')]=_['intersection'](_0x5de70c[_0x1043('0x33')],qs[_0x1043('0x39')](_0x1fe638[_0x1043('0x34')][_0x1043('0x39')]));_0x5496ea[_0x1043('0x38')]=_0x5496ea[_0x1043('0x38')][_0x1043('0x3a')]?_0x5496ea['attributes']:_0x5de70c['model'];if(!_0x1fe638['query'][_0x1043('0x3b')](_0x1043('0x3c'))){_0x5496ea[_0x1043('0x1d')]=qs['limit'](_0x1fe638[_0x1043('0x34')][_0x1043('0x1d')]);_0x5496ea[_0x1043('0x1b')]=qs[_0x1043('0x1b')](_0x1fe638[_0x1043('0x34')]['offset']);}_0x5496ea[_0x1043('0x3d')]=qs[_0x1043('0x3e')](_0x1fe638[_0x1043('0x34')]['sort']);_0x5496ea[_0x1043('0x3f')]=qs[_0x1043('0x36')](_[_0x1043('0x40')](_0x1fe638[_0x1043('0x34')],_0x5de70c[_0x1043('0x36')]),_0x4624ae);if(_0x1fe638[_0x1043('0x34')][_0x1043('0x41')]){_0x5496ea[_0x1043('0x3f')]=_[_0x1043('0x42')](_0x5496ea[_0x1043('0x3f')],{'$or':_[_0x1043('0x2d')](_0x4624ae,function(_0x28cfad){if(_0x28cfad[_0x1043('0x31')]!=='VIRTUAL'){var _0x2b502e={};_0x2b502e[_0x28cfad[_0x1043('0x2a')]]={'$like':'%'+_0x1fe638[_0x1043('0x34')][_0x1043('0x41')]+'%'};return _0x2b502e;}})});}_0x5496ea=_['merge']({},_0x5496ea,_0x1fe638['options']);var _0x44aaa9={'where':_0x5496ea['where']};return db[_0x1043('0x2e')]['count'](_0x44aaa9)[_0x1043('0x25')](function(_0x39d04a){_0x1865e5[_0x1043('0x43')]=_0x39d04a;if(_0x1fe638[_0x1043('0x34')][_0x1043('0x44')]){_0x5496ea[_0x1043('0x45')]=[{'all':!![]}];}return db['Campaign'][_0x1043('0x46')](_0x5496ea);})['then'](function(_0x4c5cfb){_0x1865e5[_0x1043('0x47')]=_0x4c5cfb;return _0x1865e5;})['then'](respondWithFilteredResult(_0x20fd56,_0x5496ea))[_0x1043('0x48')](handleError(_0x20fd56,null));};exports['show']=function(_0x354d30,_0x293fc2){var _0x497c18={'raw':![],'where':{'id':_0x354d30[_0x1043('0x49')]['id']}},_0x445d79={};_0x445d79[_0x1043('0x33')]=_[_0x1043('0x35')](db[_0x1043('0x2e')][_0x1043('0x2f')]);_0x445d79[_0x1043('0x34')]=_[_0x1043('0x35')](_0x354d30[_0x1043('0x34')]);_0x445d79['filters']=_[_0x1043('0x37')](_0x445d79['model'],_0x445d79['query']);_0x497c18['attributes']=_['intersection'](_0x445d79[_0x1043('0x33')],qs[_0x1043('0x39')](_0x354d30[_0x1043('0x34')]['fields']));_0x497c18[_0x1043('0x38')]=_0x497c18[_0x1043('0x38')]['length']?_0x497c18[_0x1043('0x38')]:_0x445d79[_0x1043('0x33')];if(_0x354d30[_0x1043('0x34')][_0x1043('0x44')]){_0x497c18[_0x1043('0x45')]=[{'all':!![]}];}_0x497c18=_[_0x1043('0x42')]({},_0x497c18,_0x354d30[_0x1043('0x4a')]);return db[_0x1043('0x2e')][_0x1043('0x4b')](_0x497c18)['then'](handleEntityNotFound(_0x293fc2,null))[_0x1043('0x25')](respondWithResult(_0x293fc2,null))[_0x1043('0x48')](handleError(_0x293fc2,null));};exports[_0x1043('0x4c')]=function(_0x3db714,_0x133ee7){return db['Campaign'][_0x1043('0x4c')](_0x3db714[_0x1043('0x4d')],{})[_0x1043('0x25')](function(_0x580fd1){var _0x2ec7dc=_0x3db714[_0x1043('0x4e')][_0x1043('0x26')]({'plain':!![]});if(!_0x2ec7dc)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2ec7dc[_0x1043('0x4f')]===_0x1043('0x4e')){var _0x19b65b=_0x580fd1[_0x1043('0x26')]({'plain':!![]});var _0x144820=_0x1043('0x50');return db['UserProfileSection'][_0x1043('0x4b')]({'where':{'name':_0x144820,'userProfileId':_0x2ec7dc[_0x1043('0x51')]},'raw':!![]})[_0x1043('0x25')](function(_0x216d71){if(_0x216d71&&_0x216d71[_0x1043('0x52')]===0x0){return db[_0x1043('0x53')][_0x1043('0x4c')]({'name':_0x19b65b[_0x1043('0x2a')],'resourceId':_0x19b65b['id'],'type':_0x216d71[_0x1043('0x2a')],'sectionId':_0x216d71['id']},{})[_0x1043('0x25')](function(){return _0x580fd1;});}else{return _0x580fd1;}})[_0x1043('0x48')](function(_0x50ec41){logger[_0x1043('0x28')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x50ec41);throw _0x50ec41;});}return _0x580fd1;})[_0x1043('0x25')](respondWithResult(_0x133ee7,0xc9))[_0x1043('0x48')](handleError(_0x133ee7,null));};exports[_0x1043('0x54')]=function(_0x3909d3,_0x4aff90){var _0x4bcd21={'where':{'id':_0x3909d3[_0x1043('0x49')]['id']}},_0x1e5d49={};_0x1e5d49[_0x1043('0x33')]=_[_0x1043('0x35')](db[_0x1043('0x2e')][_0x1043('0x2f')]);_0x4bcd21['attributes']=_[_0x1043('0x37')](_0x1e5d49[_0x1043('0x33')],qs[_0x1043('0x39')](_0x3909d3[_0x1043('0x34')][_0x1043('0x39')]));_0x4bcd21[_0x1043('0x38')]=_0x4bcd21[_0x1043('0x38')][_0x1043('0x3a')]?_0x4bcd21['attributes']:_0x1e5d49['model'];if(_0x3909d3[_0x1043('0x34')][_0x1043('0x44')]){_0x4bcd21[_0x1043('0x45')]=[{'all':!![]}];}_0x4bcd21=_[_0x1043('0x42')]({},_0x4bcd21,_0x3909d3[_0x1043('0x4a')]);return db[_0x1043('0x2e')][_0x1043('0x4b')](_0x4bcd21)[_0x1043('0x25')](handleEntityNotFound(_0x4aff90,null))[_0x1043('0x25')](function(_0x5464b0){if(_0x5464b0){var _0x1bac61=_0x5464b0['get']({'plain':!![]});_0x1bac61=qs['omit'](_0x1bac61,['id',_0x1043('0x55'),_0x1043('0x56')]);_0x3909d3['body']=_['omit'](_0x3909d3[_0x1043('0x4d')],['id','createdAt',_0x1043('0x56')]);return db[_0x1043('0x2e')][_0x1043('0x4c')](_[_0x1043('0x42')](_0x1bac61,_0x3909d3[_0x1043('0x4d')]),{'include':_0x3909d3[_0x1043('0x34')][_0x1043('0x44')]?[{'all':!![]}]:undefined})[_0x1043('0x25')](function(_0x3b6f4e){var _0x1d1997=_0x3909d3[_0x1043('0x4e')][_0x1043('0x26')]({'plain':!![]});if(!_0x1d1997)throw new Error(_0x1043('0x57'));if(_0x1d1997[_0x1043('0x4f')]===_0x1043('0x4e')){var _0x352504=_0x3b6f4e[_0x1043('0x26')]({'plain':!![]});var _0x354ff0=_0x1043('0x50');return db[_0x1043('0x58')][_0x1043('0x4b')]({'where':{'name':_0x354ff0,'userProfileId':_0x1d1997['userProfileId']},'raw':!![]})['then'](function(_0x1ed4ba){if(_0x1ed4ba&&_0x1ed4ba['autoAssociation']===0x0){return db[_0x1043('0x53')][_0x1043('0x4c')]({'name':_0x352504[_0x1043('0x2a')],'resourceId':_0x352504['id'],'type':_0x1ed4ba[_0x1043('0x2a')],'sectionId':_0x1ed4ba['id']},{})[_0x1043('0x25')](function(){return _0x3b6f4e;});}else{return _0x3b6f4e;}})[_0x1043('0x48')](function(_0x3801d7){logger[_0x1043('0x28')](_0x1043('0x59'),_0x3801d7);throw _0x3801d7;});}return _0x3b6f4e;});}})[_0x1043('0x25')](respondWithResult(_0x4aff90,0xc9))[_0x1043('0x48')](handleError(_0x4aff90,null));};exports['update']=function(_0x34e449,_0x246eaf){if(_0x34e449[_0x1043('0x4d')]['id']){delete _0x34e449['body']['id'];}return db[_0x1043('0x2e')]['find']({'where':{'id':_0x34e449[_0x1043('0x49')]['id']}})['then'](handleEntityNotFound(_0x246eaf,null))[_0x1043('0x25')](saveUpdates(_0x34e449[_0x1043('0x4d')],null))[_0x1043('0x25')](respondWithResult(_0x246eaf,null))[_0x1043('0x48')](handleError(_0x246eaf,null));};exports[_0x1043('0x24')]=function(_0x533fe7,_0x2980fb){return db[_0x1043('0x2e')][_0x1043('0x4b')]({'where':{'id':_0x533fe7[_0x1043('0x49')]['id']}})[_0x1043('0x25')](handleEntityNotFound(_0x2980fb,null))[_0x1043('0x25')](removeEntity(_0x2980fb,null))[_0x1043('0x48')](handleError(_0x2980fb,null));};exports[_0x1043('0x5a')]=function(_0x437126,_0x5e959e,_0x36c5ae){var _0x5a14d5={'raw':!![],'where':{}};var _0x47028f={};var _0x2142c4={'count':0x0,'rows':[]};return db['Campaign']['findOne']({'where':{'id':_0x437126[_0x1043('0x49')]['id']}})['then'](handleEntityNotFound(_0x5e959e,null))[_0x1043('0x25')](function(_0x41719a){if(_0x41719a){_0x47028f[_0x1043('0x33')]=_['keys'](db[_0x1043('0x5b')][_0x1043('0x2f')]);_0x47028f[_0x1043('0x34')]=_['keys'](_0x437126[_0x1043('0x34')]);_0x47028f['filters']=_[_0x1043('0x37')](_0x47028f[_0x1043('0x33')],_0x47028f[_0x1043('0x34')]);_0x5a14d5[_0x1043('0x38')]=_[_0x1043('0x37')](_0x47028f['model'],qs[_0x1043('0x39')](_0x437126['query'][_0x1043('0x39')]));_0x5a14d5['attributes']=_0x5a14d5[_0x1043('0x38')][_0x1043('0x3a')]?_0x5a14d5[_0x1043('0x38')]:_0x47028f['model'];if(!_0x437126[_0x1043('0x34')]['hasOwnProperty'](_0x1043('0x3c'))){_0x5a14d5['limit']=qs['limit'](_0x437126[_0x1043('0x34')][_0x1043('0x1d')]);_0x5a14d5['offset']=qs[_0x1043('0x1b')](_0x437126[_0x1043('0x34')][_0x1043('0x1b')]);}_0x5a14d5[_0x1043('0x3d')]=qs[_0x1043('0x3e')](_0x437126[_0x1043('0x34')]['sort']);_0x5a14d5[_0x1043('0x3f')]=qs[_0x1043('0x36')](_['pick'](_0x437126[_0x1043('0x34')],_0x47028f[_0x1043('0x36')]));_0x5a14d5['where'][_0x1043('0x5c')]=_0x41719a['id'];if(_0x437126[_0x1043('0x34')][_0x1043('0x41')]){_0x5a14d5[_0x1043('0x3f')]=_[_0x1043('0x42')](_0x5a14d5[_0x1043('0x3f')],{'$or':_[_0x1043('0x2d')](_0x5a14d5['attributes'],function(_0xe110d){var _0xec60dc={};_0xec60dc[_0xe110d]={'$like':'%'+_0x437126[_0x1043('0x34')][_0x1043('0x41')]+'%'};return _0xec60dc;})});}_0x5a14d5=_[_0x1043('0x42')]({},_0x5a14d5,_0x437126[_0x1043('0x4a')]);return db[_0x1043('0x5b')][_0x1043('0x43')]({'where':_0x5a14d5['where']})[_0x1043('0x25')](function(_0x15aef0){_0x2142c4[_0x1043('0x43')]=_0x15aef0;if(_0x437126[_0x1043('0x34')][_0x1043('0x44')]){_0x5a14d5[_0x1043('0x45')]=[{'all':!![]}];}return db[_0x1043('0x5b')][_0x1043('0x46')](_0x5a14d5);})[_0x1043('0x25')](function(_0x5d4afb){_0x2142c4[_0x1043('0x47')]=_0x5d4afb;return _0x2142c4;});}})[_0x1043('0x25')](respondWithFilteredResult(_0x5e959e,_0x5a14d5))[_0x1043('0x48')](handleError(_0x5e959e,null));};exports[_0x1043('0x5d')]=function(_0x4f31d1,_0x5b33b0,_0x205fcc){var _0x1a276e={'raw':!![],'where':{}};var _0x9123bd={};var _0x78a6f2={'count':0x0,'rows':[]};return db[_0x1043('0x2e')][_0x1043('0x5e')]({'where':{'id':_0x4f31d1[_0x1043('0x49')]['id']}})[_0x1043('0x25')](handleEntityNotFound(_0x5b33b0,null))[_0x1043('0x25')](function(_0x31fec4){if(_0x31fec4){_0x9123bd[_0x1043('0x33')]=_[_0x1043('0x35')](db[_0x1043('0x5f')][_0x1043('0x2f')]);_0x9123bd[_0x1043('0x34')]=_[_0x1043('0x35')](_0x4f31d1[_0x1043('0x34')]);_0x9123bd['filters']=_[_0x1043('0x37')](_0x9123bd[_0x1043('0x33')],_0x9123bd[_0x1043('0x34')]);_0x1a276e['attributes']=_[_0x1043('0x37')](_0x9123bd['model'],qs[_0x1043('0x39')](_0x4f31d1[_0x1043('0x34')]['fields']));_0x1a276e[_0x1043('0x38')]=_0x1a276e[_0x1043('0x38')][_0x1043('0x3a')]?_0x1a276e[_0x1043('0x38')]:_0x9123bd[_0x1043('0x33')];if(!_0x4f31d1[_0x1043('0x34')][_0x1043('0x3b')](_0x1043('0x3c'))){_0x1a276e['limit']=qs['limit'](_0x4f31d1[_0x1043('0x34')][_0x1043('0x1d')]);_0x1a276e[_0x1043('0x1b')]=qs['offset'](_0x4f31d1[_0x1043('0x34')][_0x1043('0x1b')]);}_0x1a276e[_0x1043('0x3d')]=qs[_0x1043('0x3e')](_0x4f31d1[_0x1043('0x34')]['sort']);_0x1a276e['where']=qs[_0x1043('0x36')](_[_0x1043('0x40')](_0x4f31d1[_0x1043('0x34')],_0x9123bd[_0x1043('0x36')]));_0x1a276e['where'][_0x1043('0x5c')]=_0x31fec4['id'];if(_0x4f31d1[_0x1043('0x34')][_0x1043('0x41')]){_0x1a276e['where']=_['merge'](_0x1a276e[_0x1043('0x3f')],{'$or':_[_0x1043('0x2d')](_0x1a276e[_0x1043('0x38')],function(_0x21f9ac){var _0x5b2f49={};_0x5b2f49[_0x21f9ac]={'$like':'%'+_0x4f31d1[_0x1043('0x34')]['filter']+'%'};return _0x5b2f49;})});}_0x1a276e=_[_0x1043('0x42')]({},_0x1a276e,_0x4f31d1[_0x1043('0x4a')]);return db['CmHopperHistory'][_0x1043('0x43')]({'where':_0x1a276e['where']})[_0x1043('0x25')](function(_0x4151f6){_0x78a6f2[_0x1043('0x43')]=_0x4151f6;if(_0x4f31d1[_0x1043('0x34')][_0x1043('0x44')]){_0x1a276e['include']=[{'all':!![]}];}return db[_0x1043('0x5f')][_0x1043('0x46')](_0x1a276e);})['then'](function(_0x266d46){_0x78a6f2['rows']=_0x266d46;return _0x78a6f2;});}})[_0x1043('0x25')](respondWithFilteredResult(_0x5b33b0,_0x1a276e))[_0x1043('0x48')](handleError(_0x5b33b0,null));};exports[_0x1043('0x60')]=function(_0x27bfbe,_0x1b168f,_0x54c80c){var _0x171913={'raw':!![],'where':{}};var _0x488344={};var _0x1f5e07={'count':0x0,'rows':[]};return db['Campaign'][_0x1043('0x5e')]({'where':{'id':_0x27bfbe[_0x1043('0x49')]['id']}})[_0x1043('0x25')](handleEntityNotFound(_0x1b168f,null))[_0x1043('0x25')](function(_0x155792){if(_0x155792){_0x488344['model']=_[_0x1043('0x35')](db[_0x1043('0x61')][_0x1043('0x2f')]);_0x488344[_0x1043('0x34')]=_[_0x1043('0x35')](_0x27bfbe[_0x1043('0x34')]);_0x488344[_0x1043('0x36')]=_['intersection'](_0x488344[_0x1043('0x33')],_0x488344[_0x1043('0x34')]);_0x171913[_0x1043('0x38')]=_[_0x1043('0x37')](_0x488344[_0x1043('0x33')],qs[_0x1043('0x39')](_0x27bfbe['query'][_0x1043('0x39')]));_0x171913[_0x1043('0x38')]=_0x171913['attributes'][_0x1043('0x3a')]?_0x171913[_0x1043('0x38')]:_0x488344[_0x1043('0x33')];if(!_0x27bfbe[_0x1043('0x34')][_0x1043('0x3b')](_0x1043('0x3c'))){_0x171913['limit']=qs[_0x1043('0x1d')](_0x27bfbe[_0x1043('0x34')]['limit']);_0x171913[_0x1043('0x1b')]=qs[_0x1043('0x1b')](_0x27bfbe[_0x1043('0x34')]['offset']);}_0x171913[_0x1043('0x3d')]=qs[_0x1043('0x3e')](_0x27bfbe['query'][_0x1043('0x3e')]);_0x171913[_0x1043('0x3f')]=qs['filters'](_[_0x1043('0x40')](_0x27bfbe[_0x1043('0x34')],_0x488344[_0x1043('0x36')]));_0x171913['where']['CampaignId']=_0x155792['id'];if(_0x27bfbe[_0x1043('0x34')]['filter']){_0x171913[_0x1043('0x3f')]=_[_0x1043('0x42')](_0x171913['where'],{'$or':_[_0x1043('0x2d')](_0x171913[_0x1043('0x38')],function(_0x20eeba){var _0x40f3d0={};_0x40f3d0[_0x20eeba]={'$like':'%'+_0x27bfbe[_0x1043('0x34')][_0x1043('0x41')]+'%'};return _0x40f3d0;})});}_0x171913=_[_0x1043('0x42')]({},_0x171913,_0x27bfbe[_0x1043('0x4a')]);return db[_0x1043('0x61')][_0x1043('0x43')]({'where':_0x171913[_0x1043('0x3f')]})[_0x1043('0x25')](function(_0x1a3546){_0x1f5e07[_0x1043('0x43')]=_0x1a3546;if(_0x27bfbe['query'][_0x1043('0x44')]){_0x171913[_0x1043('0x45')]=[{'all':!![]}];}return db[_0x1043('0x61')][_0x1043('0x46')](_0x171913);})['then'](function(_0x41f51b){_0x1f5e07[_0x1043('0x47')]=_0x41f51b;return _0x1f5e07;});}})[_0x1043('0x25')](respondWithFilteredResult(_0x1b168f,_0x171913))['catch'](handleError(_0x1b168f,null));};exports[_0x1043('0x62')]=function(_0x2cb8c0,_0x4a886b,_0x364732){var _0x11524d={'raw':!![],'where':{}};var _0xb85a7e={};var _0x1e733f={'count':0x0,'rows':[]};return db[_0x1043('0x2e')]['findOne']({'where':{'id':_0x2cb8c0[_0x1043('0x49')]['id']}})[_0x1043('0x25')](handleEntityNotFound(_0x4a886b,null))[_0x1043('0x25')](function(_0x9ae26c){if(_0x9ae26c){_0xb85a7e[_0x1043('0x33')]=_['keys'](db[_0x1043('0x63')][_0x1043('0x2f')]);_0xb85a7e[_0x1043('0x34')]=_[_0x1043('0x35')](_0x2cb8c0['query']);_0xb85a7e[_0x1043('0x36')]=_[_0x1043('0x37')](_0xb85a7e[_0x1043('0x33')],_0xb85a7e[_0x1043('0x34')]);_0x11524d['attributes']=_[_0x1043('0x37')](_0xb85a7e[_0x1043('0x33')],qs[_0x1043('0x39')](_0x2cb8c0[_0x1043('0x34')][_0x1043('0x39')]));_0x11524d['attributes']=_0x11524d[_0x1043('0x38')][_0x1043('0x3a')]?_0x11524d[_0x1043('0x38')]:_0xb85a7e[_0x1043('0x33')];if(!_0x2cb8c0[_0x1043('0x34')][_0x1043('0x3b')](_0x1043('0x3c'))){_0x11524d['limit']=qs[_0x1043('0x1d')](_0x2cb8c0['query']['limit']);_0x11524d[_0x1043('0x1b')]=qs[_0x1043('0x1b')](_0x2cb8c0['query'][_0x1043('0x1b')]);}_0x11524d[_0x1043('0x3d')]=qs[_0x1043('0x3e')](_0x2cb8c0[_0x1043('0x34')][_0x1043('0x3e')]);_0x11524d[_0x1043('0x3f')]=qs[_0x1043('0x36')](_['pick'](_0x2cb8c0[_0x1043('0x34')],_0xb85a7e[_0x1043('0x36')]));_0x11524d['where'][_0x1043('0x5c')]=_0x9ae26c['id'];if(_0x2cb8c0[_0x1043('0x34')][_0x1043('0x41')]){_0x11524d[_0x1043('0x3f')]=_[_0x1043('0x42')](_0x11524d[_0x1043('0x3f')],{'$or':_[_0x1043('0x2d')](_0x11524d[_0x1043('0x38')],function(_0x36b51e){var _0xb1846d={};_0xb1846d[_0x36b51e]={'$like':'%'+_0x2cb8c0[_0x1043('0x34')][_0x1043('0x41')]+'%'};return _0xb1846d;})});}_0x11524d=_[_0x1043('0x42')]({},_0x11524d,_0x2cb8c0[_0x1043('0x4a')]);return db[_0x1043('0x63')][_0x1043('0x43')]({'where':_0x11524d[_0x1043('0x3f')]})[_0x1043('0x25')](function(_0x2d31bb){_0x1e733f[_0x1043('0x43')]=_0x2d31bb;if(_0x2cb8c0[_0x1043('0x34')][_0x1043('0x44')]){_0x11524d['include']=[{'all':!![]}];}return db[_0x1043('0x63')][_0x1043('0x46')](_0x11524d);})[_0x1043('0x25')](function(_0x59f790){_0x1e733f['rows']=_0x59f790;return _0x1e733f;});}})[_0x1043('0x25')](respondWithFilteredResult(_0x4a886b,_0x11524d))[_0x1043('0x48')](handleError(_0x4a886b,null));};exports[_0x1043('0x64')]=function(_0x5810a8,_0x5dd452,_0x3a14d0){var _0x34e251={};var _0x462b93={};var _0x27a43d;var _0x49095c;return db[_0x1043('0x2e')]['findOne']({'where':{'id':_0x5810a8[_0x1043('0x49')]['id']}})[_0x1043('0x25')](handleEntityNotFound(_0x5dd452,null))[_0x1043('0x25')](function(_0x324db7){if(_0x324db7){_0x27a43d=_0x324db7;_0x462b93[_0x1043('0x33')]=_['keys'](db[_0x1043('0x65')][_0x1043('0x2f')]);_0x462b93['query']=_[_0x1043('0x35')](_0x5810a8['query']);_0x462b93[_0x1043('0x36')]=_[_0x1043('0x37')](_0x462b93['model'],_0x462b93['query']);_0x34e251['attributes']=_['intersection'](_0x462b93[_0x1043('0x33')],qs[_0x1043('0x39')](_0x5810a8[_0x1043('0x34')][_0x1043('0x39')]));_0x34e251['attributes']=_0x34e251['attributes'][_0x1043('0x3a')]?_0x34e251[_0x1043('0x38')]:_0x462b93[_0x1043('0x33')];_0x34e251[_0x1043('0x3d')]=qs['sort'](_0x5810a8[_0x1043('0x34')][_0x1043('0x3e')]);_0x34e251[_0x1043('0x3f')]=qs['filters'](_[_0x1043('0x40')](_0x5810a8[_0x1043('0x34')],_0x462b93[_0x1043('0x36')]));if(_0x5810a8[_0x1043('0x34')][_0x1043('0x41')]){_0x34e251[_0x1043('0x3f')]=_['merge'](_0x34e251[_0x1043('0x3f')],{'$or':_[_0x1043('0x2d')](_0x34e251['attributes'],function(_0x2c5305){var _0x5de97a={};_0x5de97a[_0x2c5305]={'$like':'%'+_0x5810a8[_0x1043('0x34')][_0x1043('0x41')]+'%'};return _0x5de97a;})});}_0x34e251=_['merge']({},_0x34e251,_0x5810a8[_0x1043('0x4a')]);return _0x27a43d['getLists'](_0x34e251);}})[_0x1043('0x25')](function(_0x2d4b7a){if(_0x2d4b7a){_0x49095c=_0x2d4b7a[_0x1043('0x3a')];if(!_0x5810a8[_0x1043('0x34')][_0x1043('0x3b')](_0x1043('0x3c'))){_0x34e251[_0x1043('0x1d')]=qs[_0x1043('0x1d')](_0x5810a8[_0x1043('0x34')]['limit']);_0x34e251[_0x1043('0x1b')]=qs[_0x1043('0x1b')](_0x5810a8[_0x1043('0x34')][_0x1043('0x1b')]);}return _0x27a43d[_0x1043('0x64')](_0x34e251);}})[_0x1043('0x25')](function(_0x18a916){if(_0x18a916){return _0x18a916?{'count':_0x49095c,'rows':_0x18a916}:null;}})[_0x1043('0x25')](respondWithResult(_0x5dd452,null))['catch'](handleError(_0x5dd452,null));};exports['addLists']=function(_0x3d14df,_0x6b20ab,_0x2eb4d9){var _0x28c8f4,_0x3956c6;var _0xbba138=[];var _0x451194=moment()[_0x1043('0x66')]('YYYY-MM-DD\x20HH:mm:ss');return db[_0x1043('0x2e')][_0x1043('0x4b')]({'where':{'id':_0x3d14df['params']['id']}})[_0x1043('0x25')](handleEntityNotFound(_0x6b20ab,null))['then'](function(_0x10e01c){if(_0x10e01c){_0x3956c6=_0x10e01c;return _0x10e01c['addLists'](_0x3d14df['body'][_0x1043('0x67')],_[_0x1043('0x68')](_0x3d14df[_0x1043('0x4d')],[_0x1043('0x67'),'id'])||{});}return null;})['spread'](function(_0x27c71f){var _0x57dbb0;var _0x18e31b;_0x28c8f4=_0x27c71f||[];var _0x177289=[];if(_0x27c71f){for(var _0x4739fc=0x0;_0x4739fc<_0x27c71f[_0x1043('0x3a')];_0x4739fc+=0x1){var _0x6cfbf7=_0x27c71f[_0x4739fc][_0x1043('0x26')]({'plain':!![]});_0x3956c6[_0x1043('0x69')]=_0x3d14df[_0x1043('0x4d')][_0x1043('0x69')]?_0x3d14df[_0x1043('0x4d')]['dialCheckDuplicateType']:_0x3956c6[_0x1043('0x69')];switch(_0x3956c6['dialCheckDuplicateType']){case'always':_0x57dbb0=squel[_0x1043('0x6a')]()[_0x1043('0x6b')](_0x1043('0x6c'))['fromQuery']([_0x1043('0x6d'),_0x1043('0x6e'),_0x1043('0x6f'),_0x1043('0x70'),_0x1043('0x5c'),'createdAt','updatedAt'],squel[_0x1043('0x71')]()[_0x1043('0x72')]('phone',_0x1043('0x6d'))[_0x1043('0x72')](_0x1043('0x73'),_0x1043('0x6e'))['field']('id',_0x1043('0x6f'))[_0x1043('0x72')](_0x6cfbf7[_0x1043('0x74')]['toString'](),_0x1043('0x70'))[_0x1043('0x72')](_0x3d14df[_0x1043('0x49')]['id'][_0x1043('0x75')](),_0x1043('0x5c'))['field']('\x27'+_0x451194+'\x27',_0x1043('0x55'))['field']('\x27'+_0x451194+'\x27',_0x1043('0x56'))[_0x1043('0x76')](_0x1043('0x77'))[_0x1043('0x3f')](_0x1043('0x78'))['where'](_0x1043('0x79'),_0x6cfbf7[_0x1043('0x74')][_0x1043('0x75')]())['where'](_0x1043('0x7a'))[_0x1043('0x3f')](_0x1043('0x7b'),squel[_0x1043('0x71')]()[_0x1043('0x72')]('COALESCE(calleridnum,\x27\x27)')[_0x1043('0x76')]('cm_hopper_final')[_0x1043('0x3f')](_0x1043('0x7c'),_0x3d14df[_0x1043('0x49')]['id'][_0x1043('0x75')]()))['where']('phone\x20NOT\x20IN\x20(?)',squel[_0x1043('0x71')]()[_0x1043('0x72')](_0x1043('0x7d'))['from'](_0x1043('0x6c'))[_0x1043('0x3f')](_0x1043('0x7c'),_0x3d14df[_0x1043('0x49')]['id']['toString']())))[_0x1043('0x75')]();break;case _0x1043('0x7e'):_0x57dbb0=squel[_0x1043('0x6a')]()[_0x1043('0x6b')](_0x1043('0x6c'))[_0x1043('0x7f')]([_0x1043('0x6d'),_0x1043('0x6e'),'ContactId','ListId',_0x1043('0x5c'),_0x1043('0x55'),_0x1043('0x56')],squel[_0x1043('0x71')]()[_0x1043('0x72')](_0x1043('0x6d'),_0x1043('0x6d'))['field'](_0x1043('0x73'),_0x1043('0x6e'))['field']('id',_0x1043('0x6f'))[_0x1043('0x72')](_0x6cfbf7['CmListId'][_0x1043('0x75')](),'ListId')[_0x1043('0x72')](_0x3d14df[_0x1043('0x49')]['id']['toString'](),_0x1043('0x5c'))['field']('\x27'+_0x451194+'\x27','createdAt')[_0x1043('0x72')]('\x27'+_0x451194+'\x27',_0x1043('0x56'))[_0x1043('0x76')]('cm_contacts')[_0x1043('0x3f')](_0x1043('0x78'))[_0x1043('0x3f')](_0x1043('0x79'),_0x6cfbf7[_0x1043('0x74')][_0x1043('0x75')]())['where'](_0x1043('0x7a'))[_0x1043('0x3f')](_0x1043('0x7b'),squel[_0x1043('0x71')]()[_0x1043('0x72')](_0x1043('0x7d'))[_0x1043('0x76')](_0x1043('0x6c'))[_0x1043('0x3f')](_0x1043('0x7c'),_0x3d14df[_0x1043('0x49')]['id'][_0x1043('0x75')]())))[_0x1043('0x75')]();break;default:_0x57dbb0=squel[_0x1043('0x6a')]()[_0x1043('0x6b')](_0x1043('0x6c'))[_0x1043('0x7f')]([_0x1043('0x6d'),_0x1043('0x6e'),_0x1043('0x6f'),_0x1043('0x70'),_0x1043('0x5c'),'createdAt',_0x1043('0x56')],squel[_0x1043('0x71')]()[_0x1043('0x72')](_0x1043('0x6d'),_0x1043('0x6d'))[_0x1043('0x72')](_0x1043('0x73'),'scheduledAt')[_0x1043('0x72')]('id',_0x1043('0x6f'))[_0x1043('0x72')](_0x6cfbf7[_0x1043('0x74')]['toString'](),_0x1043('0x70'))[_0x1043('0x72')](_0x3d14df[_0x1043('0x49')]['id'][_0x1043('0x75')](),_0x1043('0x5c'))['field']('\x27'+_0x451194+'\x27',_0x1043('0x55'))[_0x1043('0x72')]('\x27'+_0x451194+'\x27',_0x1043('0x56'))['from'](_0x1043('0x77'))['where']('deletedAt\x20IS\x20NULL')['where'](_0x1043('0x79'),_0x6cfbf7[_0x1043('0x74')][_0x1043('0x75')]())[_0x1043('0x3f')](_0x1043('0x7a')))['toString']();}_0x18e31b=squel['insert']()[_0x1043('0x6b')]('cm_hopper_additional_phones')[_0x1043('0x7f')](['cmHopperId','scheduledAt',_0x1043('0x6d'),_0x1043('0x80'),_0x1043('0x55'),_0x1043('0x56')],squel[_0x1043('0x71')]()[_0x1043('0x72')](_0x1043('0x81'),'id')[_0x1043('0x72')](_0x1043('0x73'),_0x1043('0x6e'))[_0x1043('0x72')](_0x1043('0x82'),_0x1043('0x6d'))[_0x1043('0x72')](_0x1043('0x83'),_0x1043('0x80'))[_0x1043('0x72')]('\x27'+_0x451194+'\x27',_0x1043('0x55'))[_0x1043('0x72')]('\x27'+_0x451194+'\x27','updatedAt')['from'](_0x1043('0x84'),'ci')[_0x1043('0x85')](_0x1043('0x6c'),'h','h.ContactId\x20=\x20ci.CmContactId')[_0x1043('0x3f')]('h.ListId\x20=\x20?',_0x6cfbf7[_0x1043('0x74')]['toString']())['where'](_0x1043('0x86'),_0x3d14df['params']['id'][_0x1043('0x75')]())[_0x1043('0x3f')](_0x1043('0x87'),_0x451194))[_0x1043('0x75')]();_0x177289[_0x1043('0x88')](db[_0x1043('0x89')]['query'](_0x57dbb0));_0xbba138[_0x1043('0x88')](db['sequelize'][_0x1043('0x34')](_0x18e31b));}return BPromise[_0x1043('0x8a')](_0x177289);}})[_0x1043('0x25')](function(){return BPromise[_0x1043('0x8a')](_0xbba138);})['then'](function(){return _0x28c8f4;})[_0x1043('0x25')](respondWithResult(_0x6b20ab,null))[_0x1043('0x48')](handleError(_0x6b20ab,null));};exports[_0x1043('0x8b')]=function(_0x3cfd0e,_0x577fa0,_0x3636cd){return db[_0x1043('0x2e')][_0x1043('0x4b')]({'where':{'id':_0x3cfd0e[_0x1043('0x49')]['id']}})['then'](handleEntityNotFound(_0x577fa0,null))['then'](function(_0x43da65){if(_0x43da65){return _0x43da65[_0x1043('0x8b')](_0x3cfd0e['query']['ids']);}})[_0x1043('0x25')](function(_0x1cc171){if(_0x1cc171){return db[_0x1043('0x5b')]['destroy']({'where':{'ListId':_0x3cfd0e['query'][_0x1043('0x67')],'CampaignId':_0x3cfd0e[_0x1043('0x49')]['id']}})[_0x1043('0x25')](function(){return _0x1cc171;});}})['then'](respondWithStatusCode(_0x577fa0,null))[_0x1043('0x48')](handleError(_0x577fa0,null));};exports['getBlackLists']=function(_0x5a2f4a,_0x1ab0ab,_0x48a81a){var _0x3b608a={};var _0x3dc52e={};var _0x291b60;var _0x383afa;return db['Campaign'][_0x1043('0x5e')]({'where':{'id':_0x5a2f4a[_0x1043('0x49')]['id']}})['then'](handleEntityNotFound(_0x1ab0ab,null))[_0x1043('0x25')](function(_0x5d6336){if(_0x5d6336){_0x291b60=_0x5d6336;_0x3dc52e[_0x1043('0x33')]=_[_0x1043('0x35')](db[_0x1043('0x65')][_0x1043('0x2f')]);_0x3dc52e[_0x1043('0x34')]=_[_0x1043('0x35')](_0x5a2f4a[_0x1043('0x34')]);_0x3dc52e[_0x1043('0x36')]=_[_0x1043('0x37')](_0x3dc52e[_0x1043('0x33')],_0x3dc52e[_0x1043('0x34')]);_0x3b608a['attributes']=_['intersection'](_0x3dc52e['model'],qs['fields'](_0x5a2f4a['query'][_0x1043('0x39')]));_0x3b608a[_0x1043('0x38')]=_0x3b608a[_0x1043('0x38')][_0x1043('0x3a')]?_0x3b608a[_0x1043('0x38')]:_0x3dc52e['model'];_0x3b608a['order']=qs[_0x1043('0x3e')](_0x5a2f4a[_0x1043('0x34')]['sort']);_0x3b608a[_0x1043('0x3f')]=qs[_0x1043('0x36')](_['pick'](_0x5a2f4a[_0x1043('0x34')],_0x3dc52e[_0x1043('0x36')]));if(_0x5a2f4a[_0x1043('0x34')]['filter']){_0x3b608a[_0x1043('0x3f')]=_[_0x1043('0x42')](_0x3b608a[_0x1043('0x3f')],{'$or':_[_0x1043('0x2d')](_0x3b608a[_0x1043('0x38')],function(_0x14f895){var _0x493d29={};_0x493d29[_0x14f895]={'$like':'%'+_0x5a2f4a[_0x1043('0x34')]['filter']+'%'};return _0x493d29;})});}_0x3b608a=_['merge']({},_0x3b608a,_0x5a2f4a[_0x1043('0x4a')]);return _0x291b60['getBlackLists'](_0x3b608a);}})['then'](function(_0x9d61fe){if(_0x9d61fe){_0x383afa=_0x9d61fe[_0x1043('0x3a')];if(!_0x5a2f4a[_0x1043('0x34')][_0x1043('0x3b')](_0x1043('0x3c'))){_0x3b608a[_0x1043('0x1d')]=qs[_0x1043('0x1d')](_0x5a2f4a[_0x1043('0x34')][_0x1043('0x1d')]);_0x3b608a[_0x1043('0x1b')]=qs[_0x1043('0x1b')](_0x5a2f4a[_0x1043('0x34')][_0x1043('0x1b')]);}return _0x291b60[_0x1043('0x8c')](_0x3b608a);}})['then'](function(_0x4bbc07){if(_0x4bbc07){return _0x4bbc07?{'count':_0x383afa,'rows':_0x4bbc07}:null;}})[_0x1043('0x25')](respondWithResult(_0x1ab0ab,null))[_0x1043('0x48')](handleError(_0x1ab0ab,null));};exports[_0x1043('0x8d')]=function(_0x2f8a3e,_0x55a387,_0x488548){var _0x139132,_0x93844f;var _0x39c1cc=[];var _0x3b5e9=moment()[_0x1043('0x66')](_0x1043('0x8e'));return db[_0x1043('0x2e')][_0x1043('0x4b')]({'where':{'id':_0x2f8a3e[_0x1043('0x49')]['id']}})[_0x1043('0x25')](handleEntityNotFound(_0x55a387,null))[_0x1043('0x25')](function(_0x243f71){if(_0x243f71){_0x93844f=_0x243f71;return _0x243f71[_0x1043('0x8d')](_0x2f8a3e[_0x1043('0x4d')][_0x1043('0x67')],_[_0x1043('0x68')](_0x2f8a3e['body'],[_0x1043('0x67'),'id'])||{});}return null;})[_0x1043('0x8f')](function(_0x3480db){var _0x21b642;var _0x966ea4;_0x139132=_0x3480db||[];var _0x48528c=[];if(_0x3480db){for(var _0x59ca22=0x0;_0x59ca22<_0x3480db[_0x1043('0x3a')];_0x59ca22+=0x1){var _0x4375af=_0x3480db[_0x59ca22][_0x1043('0x26')]({'plain':!![]});_0x21b642=squel[_0x1043('0x6a')]()[_0x1043('0x6b')](_0x1043('0x90'))[_0x1043('0x7f')](['phone',_0x1043('0x6f'),_0x1043('0x70'),_0x1043('0x5c'),'createdAt',_0x1043('0x56')],squel[_0x1043('0x71')]()[_0x1043('0x72')](_0x1043('0x6d'),_0x1043('0x6d'))[_0x1043('0x72')]('id',_0x1043('0x6f'))['field'](_0x4375af[_0x1043('0x74')][_0x1043('0x75')](),'ListId')[_0x1043('0x72')](_0x2f8a3e[_0x1043('0x49')]['id'][_0x1043('0x75')](),_0x1043('0x5c'))[_0x1043('0x72')]('NOW()','createdAt')[_0x1043('0x72')]('NOW()','updatedAt')[_0x1043('0x76')]('cm_contacts')[_0x1043('0x3f')]('deletedAt\x20IS\x20NULL')[_0x1043('0x3f')]('ListId\x20=\x20?',_0x4375af[_0x1043('0x74')][_0x1043('0x75')]())[_0x1043('0x3f')](_0x1043('0x7a')))[_0x1043('0x75')]();_0x48528c['push'](db[_0x1043('0x89')][_0x1043('0x34')](_0x21b642));}return BPromise[_0x1043('0x8a')](_0x48528c);}})['then'](function(){return _0x139132;})[_0x1043('0x25')](respondWithResult(_0x55a387,null))[_0x1043('0x48')](handleError(_0x55a387,null));};exports[_0x1043('0x91')]=function(_0x36008d,_0x3dbaf3,_0x1fb8df){return db[_0x1043('0x2e')][_0x1043('0x4b')]({'where':{'id':_0x36008d[_0x1043('0x49')]['id']}})[_0x1043('0x25')](handleEntityNotFound(_0x3dbaf3,null))[_0x1043('0x25')](function(_0xe93e0c){if(_0xe93e0c){return _0xe93e0c['removeBlackLists'](_0x36008d[_0x1043('0x34')]['ids']);}})[_0x1043('0x25')](function(_0xff50d2){if(_0xff50d2){return db['CmHopperBlack'][_0x1043('0x24')]({'where':{'ListId':_0x36008d[_0x1043('0x34')]['ids'],'CampaignId':_0x36008d[_0x1043('0x49')]['id']}})[_0x1043('0x25')](function(){return _0xff50d2;});}})[_0x1043('0x25')](respondWithStatusCode(_0x3dbaf3,null))[_0x1043('0x48')](handleError(_0x3dbaf3,null));};
\ No newline at end of file
+var _0xaf23=['request-promise','bluebird','mustache','path','to-csv','lodash','squel','crypto','jsforce','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','offset','undefined','limit','count','Content-Range','json','apply','save','then','destroy','get','IvrCampaigns','UserProfileResource','error','name','send','index','map','Campaign','type','key','model','keys','filters','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','rows','show','includeAll','find','catch','create','body','user','role','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','params','rawAttributes','omit','createdAt','updatedAt','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','update','getHoppers','CmHopper','getHopperHistories','findOne','CmHopperHistory','CampaignId','getHopperFinals','CmHopperFinal','CmHopperBlack','getLists','CmList','addLists','format','YYYY-MM-DD\x20HH:mm:ss','ids','spread','dialCheckDuplicateType','always','insert','into','cm_hopper','fromQuery','phone','scheduledAt','ContactId','ListId','select','NOW()','field','CmListId','toString','from','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','COALESCE(phone,\x27\x27)','onlyIfOpen','CampaignId\x20=\x20?','cm_hopper_additional_phones','cmHopperId','OrderBy','ci.item','ci.OrderBY','h.ContactId\x20=\x20ci.CmContactId','h.ListId\x20=\x20?','h.createdAt\x20=\x20?','push','sequelize','all','removeLists','getBlackLists','addBlackLists','removeBlackLists','zip-dir','fast-json-patch'];(function(_0x5b8155,_0x51c636){var _0x1d6f07=function(_0x206950){while(--_0x206950){_0x5b8155['push'](_0x5b8155['shift']());}};_0x1d6f07(++_0x51c636);}(_0xaf23,0x11a));var _0x3af2=function(_0x151321,_0x437d1a){_0x151321=_0x151321-0x0;var _0x152cb6=_0xaf23[_0x151321];return _0x152cb6;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x3af2('0x0'));var jsonpatch=require(_0x3af2('0x1'));var rp=require(_0x3af2('0x2'));var moment=require('moment');var BPromise=require(_0x3af2('0x3'));var Mustache=require(_0x3af2('0x4'));var util=require('util');var path=require(_0x3af2('0x5'));var sox=require('sox');var csv=require(_0x3af2('0x6'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x3af2('0x7'));var squel=require(_0x3af2('0x8'));var crypto=require(_0x3af2('0x9'));var jsforce=require(_0x3af2('0xa'));var deskjs=require('desk.js');var toCsv=require(_0x3af2('0x6'));var querystring=require('querystring');var Papa=require(_0x3af2('0xb'));var Redis=require('ioredis');var authService=require(_0x3af2('0xc'));var qs=require(_0x3af2('0xd'));var as=require(_0x3af2('0xe'));var hardwareService=require(_0x3af2('0xf'));var logger=require(_0x3af2('0x10'))(_0x3af2('0x11'));var utils=require(_0x3af2('0x12'));var config=require(_0x3af2('0x13'));var licenseUtil=require(_0x3af2('0x14'));var db=require(_0x3af2('0x15'))['db'];function respondWithStatusCode(_0x5d1640,_0x34dd34){_0x34dd34=_0x34dd34||0xcc;return function(_0x308943){if(_0x308943){return _0x5d1640[_0x3af2('0x16')](_0x34dd34);}return _0x5d1640['status'](_0x34dd34)['end']();};}function respondWithResult(_0x76ecd9,_0x2ed531){_0x2ed531=_0x2ed531||0xc8;return function(_0x3f5667){if(_0x3f5667){return _0x76ecd9[_0x3af2('0x17')](_0x2ed531)['json'](_0x3f5667);}};}function respondWithFilteredResult(_0x17400e,_0x11f086){return function(_0x821374){if(_0x821374){var _0x5a8f5f=typeof _0x11f086[_0x3af2('0x18')]===_0x3af2('0x19')&&typeof _0x11f086[_0x3af2('0x1a')]===_0x3af2('0x19');var _0x57ced3=_0x821374['count'];var _0x3303b3=_0x5a8f5f?0x0:_0x11f086[_0x3af2('0x18')];var _0x4c2c56=_0x5a8f5f?_0x821374[_0x3af2('0x1b')]:_0x11f086[_0x3af2('0x18')]+_0x11f086[_0x3af2('0x1a')];var _0x294f89;if(_0x4c2c56>=_0x57ced3){_0x4c2c56=_0x57ced3;_0x294f89=0xc8;}else{_0x294f89=0xce;}_0x17400e['status'](_0x294f89);return _0x17400e['set'](_0x3af2('0x1c'),_0x3303b3+'-'+_0x4c2c56+'/'+_0x57ced3)[_0x3af2('0x1d')](_0x821374);}return null;};}function patchUpdates(_0x14ab6f){return function(_0x27a7ad){try{jsonpatch[_0x3af2('0x1e')](_0x27a7ad,_0x14ab6f,!![]);}catch(_0x54c6ce){return BPromise['reject'](_0x54c6ce);}return _0x27a7ad[_0x3af2('0x1f')]();};}function saveUpdates(_0x43f8e1,_0x1c1a21){return function(_0x1f10d9){if(_0x1f10d9){return _0x1f10d9['update'](_0x43f8e1)[_0x3af2('0x20')](function(_0x2f2776){return _0x2f2776;});}return null;};}function removeEntity(_0x24535b,_0x1487ec){return function(_0x5248cc){if(_0x5248cc){return _0x5248cc[_0x3af2('0x21')]()[_0x3af2('0x20')](function(){var _0x49a09b=_0x5248cc[_0x3af2('0x22')]({'plain':!![]});var _0x394218=_0x3af2('0x23');return db[_0x3af2('0x24')][_0x3af2('0x21')]({'where':{'type':_0x394218,'resourceId':_0x49a09b['id']}})[_0x3af2('0x20')](function(){return _0x5248cc;});})[_0x3af2('0x20')](function(){_0x24535b[_0x3af2('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0xe07fa,_0x5a0a90){return function(_0x24aa22){if(!_0x24aa22){_0xe07fa[_0x3af2('0x16')](0x194);}return _0x24aa22;};}function handleError(_0x4923fa,_0x204fff){_0x204fff=_0x204fff||0x1f4;return function(_0x54318b){logger[_0x3af2('0x25')](_0x54318b['stack']);if(_0x54318b[_0x3af2('0x26')]){delete _0x54318b[_0x3af2('0x26')];}_0x4923fa[_0x3af2('0x17')](_0x204fff)[_0x3af2('0x27')](_0x54318b);};}exports[_0x3af2('0x28')]=function(_0x2a347a,_0x344413){var _0x1a981c={},_0xfcd2a8={},_0x2fcc14={'count':0x0,'rows':[]};var _0x575b6f=_[_0x3af2('0x29')](db[_0x3af2('0x2a')]['rawAttributes'],function(_0x50821e){return{'name':_0x50821e['fieldName'],'type':_0x50821e[_0x3af2('0x2b')][_0x3af2('0x2c')]};});_0xfcd2a8[_0x3af2('0x2d')]=_[_0x3af2('0x29')](_0x575b6f,'name');_0xfcd2a8['query']=_[_0x3af2('0x2e')](_0x2a347a['query']);_0xfcd2a8[_0x3af2('0x2f')]=_[_0x3af2('0x30')](_0xfcd2a8[_0x3af2('0x2d')],_0xfcd2a8[_0x3af2('0x31')]);_0x1a981c[_0x3af2('0x32')]=_['intersection'](_0xfcd2a8[_0x3af2('0x2d')],qs['fields'](_0x2a347a[_0x3af2('0x31')][_0x3af2('0x33')]));_0x1a981c[_0x3af2('0x32')]=_0x1a981c[_0x3af2('0x32')][_0x3af2('0x34')]?_0x1a981c['attributes']:_0xfcd2a8[_0x3af2('0x2d')];if(!_0x2a347a[_0x3af2('0x31')][_0x3af2('0x35')](_0x3af2('0x36'))){_0x1a981c[_0x3af2('0x1a')]=qs[_0x3af2('0x1a')](_0x2a347a[_0x3af2('0x31')]['limit']);_0x1a981c[_0x3af2('0x18')]=qs['offset'](_0x2a347a[_0x3af2('0x31')][_0x3af2('0x18')]);}_0x1a981c[_0x3af2('0x37')]=qs['sort'](_0x2a347a['query'][_0x3af2('0x38')]);_0x1a981c[_0x3af2('0x39')]=qs['filters'](_[_0x3af2('0x3a')](_0x2a347a['query'],_0xfcd2a8[_0x3af2('0x2f')]),_0x575b6f);if(_0x2a347a['query'][_0x3af2('0x3b')]){_0x1a981c['where']=_[_0x3af2('0x3c')](_0x1a981c[_0x3af2('0x39')],{'$or':_[_0x3af2('0x29')](_0x575b6f,function(_0xebce14){if(_0xebce14[_0x3af2('0x2b')]!==_0x3af2('0x3d')){var _0x4987db={};_0x4987db[_0xebce14[_0x3af2('0x26')]]={'$like':'%'+_0x2a347a['query'][_0x3af2('0x3b')]+'%'};return _0x4987db;}})});}_0x1a981c=_['merge']({},_0x1a981c,_0x2a347a[_0x3af2('0x3e')]);var _0x389f9a={'where':_0x1a981c[_0x3af2('0x39')]};return db[_0x3af2('0x2a')]['count'](_0x389f9a)[_0x3af2('0x20')](function(_0x517714){_0x2fcc14[_0x3af2('0x1b')]=_0x517714;if(_0x2a347a[_0x3af2('0x31')]['includeAll']){_0x1a981c[_0x3af2('0x3f')]=[{'all':!![]}];}return db[_0x3af2('0x2a')][_0x3af2('0x40')](_0x1a981c);})[_0x3af2('0x20')](function(_0x3780e9){_0x2fcc14[_0x3af2('0x41')]=_0x3780e9;return _0x2fcc14;})[_0x3af2('0x20')](respondWithFilteredResult(_0x344413,_0x1a981c))['catch'](handleError(_0x344413,null));};exports[_0x3af2('0x42')]=function(_0x33a438,_0x4a7afd){var _0xd38c78={'raw':![],'where':{'id':_0x33a438['params']['id']}},_0x192108={};_0x192108[_0x3af2('0x2d')]=_[_0x3af2('0x2e')](db[_0x3af2('0x2a')]['rawAttributes']);_0x192108[_0x3af2('0x31')]=_[_0x3af2('0x2e')](_0x33a438[_0x3af2('0x31')]);_0x192108['filters']=_[_0x3af2('0x30')](_0x192108[_0x3af2('0x2d')],_0x192108['query']);_0xd38c78[_0x3af2('0x32')]=_[_0x3af2('0x30')](_0x192108[_0x3af2('0x2d')],qs[_0x3af2('0x33')](_0x33a438[_0x3af2('0x31')][_0x3af2('0x33')]));_0xd38c78[_0x3af2('0x32')]=_0xd38c78[_0x3af2('0x32')][_0x3af2('0x34')]?_0xd38c78[_0x3af2('0x32')]:_0x192108[_0x3af2('0x2d')];if(_0x33a438[_0x3af2('0x31')][_0x3af2('0x43')]){_0xd38c78[_0x3af2('0x3f')]=[{'all':!![]}];}_0xd38c78=_['merge']({},_0xd38c78,_0x33a438['options']);return db[_0x3af2('0x2a')][_0x3af2('0x44')](_0xd38c78)[_0x3af2('0x20')](handleEntityNotFound(_0x4a7afd,null))['then'](respondWithResult(_0x4a7afd,null))[_0x3af2('0x45')](handleError(_0x4a7afd,null));};exports[_0x3af2('0x46')]=function(_0x7a549,_0x52a0f9){return db[_0x3af2('0x2a')]['create'](_0x7a549[_0x3af2('0x47')],{})[_0x3af2('0x20')](function(_0x13cc1a){var _0x3da7ba=_0x7a549[_0x3af2('0x48')]['get']({'plain':!![]});if(!_0x3da7ba)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x3da7ba[_0x3af2('0x49')]===_0x3af2('0x48')){var _0x34f9b7=_0x13cc1a[_0x3af2('0x22')]({'plain':!![]});var _0x5a66a8=_0x3af2('0x23');return db['UserProfileSection']['find']({'where':{'name':_0x5a66a8,'userProfileId':_0x3da7ba['userProfileId']},'raw':!![]})[_0x3af2('0x20')](function(_0xf72d98){if(_0xf72d98&&_0xf72d98[_0x3af2('0x4a')]===0x0){return db[_0x3af2('0x24')][_0x3af2('0x46')]({'name':_0x34f9b7['name'],'resourceId':_0x34f9b7['id'],'type':_0xf72d98[_0x3af2('0x26')],'sectionId':_0xf72d98['id']},{})[_0x3af2('0x20')](function(){return _0x13cc1a;});}else{return _0x13cc1a;}})[_0x3af2('0x45')](function(_0x1f132b){logger[_0x3af2('0x25')](_0x3af2('0x4b'),_0x1f132b);throw _0x1f132b;});}return _0x13cc1a;})[_0x3af2('0x20')](respondWithResult(_0x52a0f9,0xc9))[_0x3af2('0x45')](handleError(_0x52a0f9,null));};exports[_0x3af2('0x4c')]=function(_0x38f960,_0xe71c98){var _0x9e6bfa={'where':{'id':_0x38f960[_0x3af2('0x4d')]['id']}},_0x521007={};_0x521007['model']=_[_0x3af2('0x2e')](db[_0x3af2('0x2a')][_0x3af2('0x4e')]);_0x9e6bfa[_0x3af2('0x32')]=_['intersection'](_0x521007[_0x3af2('0x2d')],qs['fields'](_0x38f960[_0x3af2('0x31')][_0x3af2('0x33')]));_0x9e6bfa[_0x3af2('0x32')]=_0x9e6bfa['attributes'][_0x3af2('0x34')]?_0x9e6bfa[_0x3af2('0x32')]:_0x521007['model'];if(_0x38f960['query'][_0x3af2('0x43')]){_0x9e6bfa[_0x3af2('0x3f')]=[{'all':!![]}];}_0x9e6bfa=_[_0x3af2('0x3c')]({},_0x9e6bfa,_0x38f960[_0x3af2('0x3e')]);return db['Campaign']['find'](_0x9e6bfa)[_0x3af2('0x20')](handleEntityNotFound(_0xe71c98,null))[_0x3af2('0x20')](function(_0x42e8a1){if(_0x42e8a1){var _0x55bf78=_0x42e8a1[_0x3af2('0x22')]({'plain':!![]});_0x55bf78=qs[_0x3af2('0x4f')](_0x55bf78,['id',_0x3af2('0x50'),'updatedAt']);_0x38f960['body']=_[_0x3af2('0x4f')](_0x38f960[_0x3af2('0x47')],['id',_0x3af2('0x50'),_0x3af2('0x51')]);return db['Campaign'][_0x3af2('0x46')](_['merge'](_0x55bf78,_0x38f960[_0x3af2('0x47')]),{'include':_0x38f960[_0x3af2('0x31')][_0x3af2('0x43')]?[{'all':!![]}]:undefined})[_0x3af2('0x20')](function(_0x35faee){var _0x47b563=_0x38f960[_0x3af2('0x48')][_0x3af2('0x22')]({'plain':!![]});if(!_0x47b563)throw new Error(_0x3af2('0x52'));if(_0x47b563['role']===_0x3af2('0x48')){var _0x131f90=_0x35faee[_0x3af2('0x22')]({'plain':!![]});var _0x16c9c9=_0x3af2('0x23');return db[_0x3af2('0x53')]['find']({'where':{'name':_0x16c9c9,'userProfileId':_0x47b563[_0x3af2('0x54')]},'raw':!![]})['then'](function(_0x55c9e5){if(_0x55c9e5&&_0x55c9e5[_0x3af2('0x4a')]===0x0){return db[_0x3af2('0x24')]['create']({'name':_0x131f90[_0x3af2('0x26')],'resourceId':_0x131f90['id'],'type':_0x55c9e5['name'],'sectionId':_0x55c9e5['id']},{})[_0x3af2('0x20')](function(){return _0x35faee;});}else{return _0x35faee;}})['catch'](function(_0x5eefd1){logger['error'](_0x3af2('0x4b'),_0x5eefd1);throw _0x5eefd1;});}return _0x35faee;});}})[_0x3af2('0x20')](respondWithResult(_0xe71c98,0xc9))[_0x3af2('0x45')](handleError(_0xe71c98,null));};exports[_0x3af2('0x55')]=function(_0xd62e18,_0x5a342c){if(_0xd62e18['body']['id']){delete _0xd62e18['body']['id'];}return db[_0x3af2('0x2a')][_0x3af2('0x44')]({'where':{'id':_0xd62e18[_0x3af2('0x4d')]['id']}})[_0x3af2('0x20')](handleEntityNotFound(_0x5a342c,null))[_0x3af2('0x20')](saveUpdates(_0xd62e18['body'],null))[_0x3af2('0x20')](respondWithResult(_0x5a342c,null))[_0x3af2('0x45')](handleError(_0x5a342c,null));};exports[_0x3af2('0x21')]=function(_0x3804a3,_0x4e77c5){return db[_0x3af2('0x2a')][_0x3af2('0x44')]({'where':{'id':_0x3804a3['params']['id']}})['then'](handleEntityNotFound(_0x4e77c5,null))[_0x3af2('0x20')](removeEntity(_0x4e77c5,null))[_0x3af2('0x45')](handleError(_0x4e77c5,null));};exports[_0x3af2('0x56')]=function(_0x301eff,_0x438cbd,_0x4df66c){var _0x3a47c1={'raw':!![],'where':{}};var _0x2f5942={};var _0x18f6cc={'count':0x0,'rows':[]};return db[_0x3af2('0x2a')]['findOne']({'where':{'id':_0x301eff['params']['id']}})[_0x3af2('0x20')](handleEntityNotFound(_0x438cbd,null))[_0x3af2('0x20')](function(_0x494573){if(_0x494573){_0x2f5942['model']=_['keys'](db[_0x3af2('0x57')][_0x3af2('0x4e')]);_0x2f5942['query']=_[_0x3af2('0x2e')](_0x301eff[_0x3af2('0x31')]);_0x2f5942[_0x3af2('0x2f')]=_[_0x3af2('0x30')](_0x2f5942[_0x3af2('0x2d')],_0x2f5942[_0x3af2('0x31')]);_0x3a47c1[_0x3af2('0x32')]=_[_0x3af2('0x30')](_0x2f5942[_0x3af2('0x2d')],qs['fields'](_0x301eff['query'][_0x3af2('0x33')]));_0x3a47c1[_0x3af2('0x32')]=_0x3a47c1[_0x3af2('0x32')][_0x3af2('0x34')]?_0x3a47c1[_0x3af2('0x32')]:_0x2f5942[_0x3af2('0x2d')];if(!_0x301eff[_0x3af2('0x31')]['hasOwnProperty'](_0x3af2('0x36'))){_0x3a47c1['limit']=qs[_0x3af2('0x1a')](_0x301eff[_0x3af2('0x31')]['limit']);_0x3a47c1[_0x3af2('0x18')]=qs['offset'](_0x301eff[_0x3af2('0x31')][_0x3af2('0x18')]);}_0x3a47c1['order']=qs[_0x3af2('0x38')](_0x301eff[_0x3af2('0x31')][_0x3af2('0x38')]);_0x3a47c1[_0x3af2('0x39')]=qs['filters'](_[_0x3af2('0x3a')](_0x301eff[_0x3af2('0x31')],_0x2f5942[_0x3af2('0x2f')]));_0x3a47c1[_0x3af2('0x39')]['CampaignId']=_0x494573['id'];if(_0x301eff[_0x3af2('0x31')]['filter']){_0x3a47c1[_0x3af2('0x39')]=_['merge'](_0x3a47c1[_0x3af2('0x39')],{'$or':_[_0x3af2('0x29')](_0x3a47c1[_0x3af2('0x32')],function(_0x33663d){var _0x9794c2={};_0x9794c2[_0x33663d]={'$like':'%'+_0x301eff['query']['filter']+'%'};return _0x9794c2;})});}_0x3a47c1=_[_0x3af2('0x3c')]({},_0x3a47c1,_0x301eff[_0x3af2('0x3e')]);return db['CmHopper']['count']({'where':_0x3a47c1[_0x3af2('0x39')]})[_0x3af2('0x20')](function(_0x487c8c){_0x18f6cc[_0x3af2('0x1b')]=_0x487c8c;if(_0x301eff[_0x3af2('0x31')][_0x3af2('0x43')]){_0x3a47c1[_0x3af2('0x3f')]=[{'all':!![]}];}return db[_0x3af2('0x57')][_0x3af2('0x40')](_0x3a47c1);})[_0x3af2('0x20')](function(_0xd1fc9d){_0x18f6cc[_0x3af2('0x41')]=_0xd1fc9d;return _0x18f6cc;});}})[_0x3af2('0x20')](respondWithFilteredResult(_0x438cbd,_0x3a47c1))[_0x3af2('0x45')](handleError(_0x438cbd,null));};exports[_0x3af2('0x58')]=function(_0xd0ae5d,_0x5c875b,_0x597902){var _0x1871ba={'raw':!![],'where':{}};var _0x258fa6={};var _0x12ba5a={'count':0x0,'rows':[]};return db[_0x3af2('0x2a')][_0x3af2('0x59')]({'where':{'id':_0xd0ae5d['params']['id']}})[_0x3af2('0x20')](handleEntityNotFound(_0x5c875b,null))[_0x3af2('0x20')](function(_0x557938){if(_0x557938){_0x258fa6['model']=_[_0x3af2('0x2e')](db[_0x3af2('0x5a')][_0x3af2('0x4e')]);_0x258fa6['query']=_[_0x3af2('0x2e')](_0xd0ae5d['query']);_0x258fa6[_0x3af2('0x2f')]=_[_0x3af2('0x30')](_0x258fa6[_0x3af2('0x2d')],_0x258fa6[_0x3af2('0x31')]);_0x1871ba[_0x3af2('0x32')]=_[_0x3af2('0x30')](_0x258fa6[_0x3af2('0x2d')],qs[_0x3af2('0x33')](_0xd0ae5d[_0x3af2('0x31')][_0x3af2('0x33')]));_0x1871ba[_0x3af2('0x32')]=_0x1871ba['attributes'][_0x3af2('0x34')]?_0x1871ba[_0x3af2('0x32')]:_0x258fa6[_0x3af2('0x2d')];if(!_0xd0ae5d[_0x3af2('0x31')][_0x3af2('0x35')](_0x3af2('0x36'))){_0x1871ba[_0x3af2('0x1a')]=qs['limit'](_0xd0ae5d['query'][_0x3af2('0x1a')]);_0x1871ba['offset']=qs[_0x3af2('0x18')](_0xd0ae5d['query']['offset']);}_0x1871ba[_0x3af2('0x37')]=qs['sort'](_0xd0ae5d[_0x3af2('0x31')][_0x3af2('0x38')]);_0x1871ba['where']=qs[_0x3af2('0x2f')](_[_0x3af2('0x3a')](_0xd0ae5d[_0x3af2('0x31')],_0x258fa6[_0x3af2('0x2f')]));_0x1871ba['where'][_0x3af2('0x5b')]=_0x557938['id'];if(_0xd0ae5d[_0x3af2('0x31')]['filter']){_0x1871ba['where']=_[_0x3af2('0x3c')](_0x1871ba[_0x3af2('0x39')],{'$or':_[_0x3af2('0x29')](_0x1871ba[_0x3af2('0x32')],function(_0x418cf7){var _0x263226={};_0x263226[_0x418cf7]={'$like':'%'+_0xd0ae5d['query'][_0x3af2('0x3b')]+'%'};return _0x263226;})});}_0x1871ba=_[_0x3af2('0x3c')]({},_0x1871ba,_0xd0ae5d[_0x3af2('0x3e')]);return db[_0x3af2('0x5a')][_0x3af2('0x1b')]({'where':_0x1871ba[_0x3af2('0x39')]})[_0x3af2('0x20')](function(_0x5b5873){_0x12ba5a[_0x3af2('0x1b')]=_0x5b5873;if(_0xd0ae5d[_0x3af2('0x31')][_0x3af2('0x43')]){_0x1871ba[_0x3af2('0x3f')]=[{'all':!![]}];}return db['CmHopperHistory'][_0x3af2('0x40')](_0x1871ba);})[_0x3af2('0x20')](function(_0x2999d7){_0x12ba5a[_0x3af2('0x41')]=_0x2999d7;return _0x12ba5a;});}})[_0x3af2('0x20')](respondWithFilteredResult(_0x5c875b,_0x1871ba))[_0x3af2('0x45')](handleError(_0x5c875b,null));};exports[_0x3af2('0x5c')]=function(_0x419028,_0x2776cd,_0x47b7f0){var _0x283dcc={'raw':!![],'where':{}};var _0x250e0d={};var _0x1cdea2={'count':0x0,'rows':[]};return db[_0x3af2('0x2a')][_0x3af2('0x59')]({'where':{'id':_0x419028['params']['id']}})[_0x3af2('0x20')](handleEntityNotFound(_0x2776cd,null))[_0x3af2('0x20')](function(_0x5a429c){if(_0x5a429c){_0x250e0d[_0x3af2('0x2d')]=_[_0x3af2('0x2e')](db[_0x3af2('0x5d')]['rawAttributes']);_0x250e0d[_0x3af2('0x31')]=_['keys'](_0x419028['query']);_0x250e0d['filters']=_[_0x3af2('0x30')](_0x250e0d[_0x3af2('0x2d')],_0x250e0d[_0x3af2('0x31')]);_0x283dcc[_0x3af2('0x32')]=_['intersection'](_0x250e0d['model'],qs[_0x3af2('0x33')](_0x419028[_0x3af2('0x31')][_0x3af2('0x33')]));_0x283dcc[_0x3af2('0x32')]=_0x283dcc['attributes'][_0x3af2('0x34')]?_0x283dcc[_0x3af2('0x32')]:_0x250e0d['model'];if(!_0x419028['query'][_0x3af2('0x35')](_0x3af2('0x36'))){_0x283dcc[_0x3af2('0x1a')]=qs[_0x3af2('0x1a')](_0x419028[_0x3af2('0x31')]['limit']);_0x283dcc[_0x3af2('0x18')]=qs[_0x3af2('0x18')](_0x419028[_0x3af2('0x31')][_0x3af2('0x18')]);}_0x283dcc[_0x3af2('0x37')]=qs[_0x3af2('0x38')](_0x419028[_0x3af2('0x31')]['sort']);_0x283dcc[_0x3af2('0x39')]=qs[_0x3af2('0x2f')](_[_0x3af2('0x3a')](_0x419028[_0x3af2('0x31')],_0x250e0d[_0x3af2('0x2f')]));_0x283dcc['where'][_0x3af2('0x5b')]=_0x5a429c['id'];if(_0x419028[_0x3af2('0x31')][_0x3af2('0x3b')]){_0x283dcc[_0x3af2('0x39')]=_[_0x3af2('0x3c')](_0x283dcc[_0x3af2('0x39')],{'$or':_['map'](_0x283dcc['attributes'],function(_0x42d577){var _0x58efd2={};_0x58efd2[_0x42d577]={'$like':'%'+_0x419028[_0x3af2('0x31')][_0x3af2('0x3b')]+'%'};return _0x58efd2;})});}_0x283dcc=_[_0x3af2('0x3c')]({},_0x283dcc,_0x419028[_0x3af2('0x3e')]);return db[_0x3af2('0x5d')]['count']({'where':_0x283dcc[_0x3af2('0x39')]})[_0x3af2('0x20')](function(_0x565953){_0x1cdea2[_0x3af2('0x1b')]=_0x565953;if(_0x419028[_0x3af2('0x31')][_0x3af2('0x43')]){_0x283dcc[_0x3af2('0x3f')]=[{'all':!![]}];}return db[_0x3af2('0x5d')]['findAll'](_0x283dcc);})[_0x3af2('0x20')](function(_0x27b6f2){_0x1cdea2[_0x3af2('0x41')]=_0x27b6f2;return _0x1cdea2;});}})[_0x3af2('0x20')](respondWithFilteredResult(_0x2776cd,_0x283dcc))['catch'](handleError(_0x2776cd,null));};exports['getHopperBlacks']=function(_0x5a9ac2,_0x371b1c,_0x45a02c){var _0x3cde5e={'raw':!![],'where':{}};var _0x615c47={};var _0x1b98d4={'count':0x0,'rows':[]};return db[_0x3af2('0x2a')]['findOne']({'where':{'id':_0x5a9ac2[_0x3af2('0x4d')]['id']}})[_0x3af2('0x20')](handleEntityNotFound(_0x371b1c,null))[_0x3af2('0x20')](function(_0x40bb47){if(_0x40bb47){_0x615c47[_0x3af2('0x2d')]=_[_0x3af2('0x2e')](db[_0x3af2('0x5e')][_0x3af2('0x4e')]);_0x615c47[_0x3af2('0x31')]=_[_0x3af2('0x2e')](_0x5a9ac2['query']);_0x615c47[_0x3af2('0x2f')]=_[_0x3af2('0x30')](_0x615c47['model'],_0x615c47[_0x3af2('0x31')]);_0x3cde5e[_0x3af2('0x32')]=_['intersection'](_0x615c47[_0x3af2('0x2d')],qs['fields'](_0x5a9ac2[_0x3af2('0x31')]['fields']));_0x3cde5e[_0x3af2('0x32')]=_0x3cde5e[_0x3af2('0x32')][_0x3af2('0x34')]?_0x3cde5e[_0x3af2('0x32')]:_0x615c47[_0x3af2('0x2d')];if(!_0x5a9ac2['query'][_0x3af2('0x35')](_0x3af2('0x36'))){_0x3cde5e[_0x3af2('0x1a')]=qs['limit'](_0x5a9ac2[_0x3af2('0x31')]['limit']);_0x3cde5e[_0x3af2('0x18')]=qs[_0x3af2('0x18')](_0x5a9ac2[_0x3af2('0x31')][_0x3af2('0x18')]);}_0x3cde5e[_0x3af2('0x37')]=qs[_0x3af2('0x38')](_0x5a9ac2[_0x3af2('0x31')][_0x3af2('0x38')]);_0x3cde5e['where']=qs['filters'](_['pick'](_0x5a9ac2['query'],_0x615c47[_0x3af2('0x2f')]));_0x3cde5e[_0x3af2('0x39')]['CampaignId']=_0x40bb47['id'];if(_0x5a9ac2[_0x3af2('0x31')]['filter']){_0x3cde5e[_0x3af2('0x39')]=_[_0x3af2('0x3c')](_0x3cde5e[_0x3af2('0x39')],{'$or':_['map'](_0x3cde5e[_0x3af2('0x32')],function(_0x2b0355){var _0x47fb9e={};_0x47fb9e[_0x2b0355]={'$like':'%'+_0x5a9ac2[_0x3af2('0x31')][_0x3af2('0x3b')]+'%'};return _0x47fb9e;})});}_0x3cde5e=_[_0x3af2('0x3c')]({},_0x3cde5e,_0x5a9ac2[_0x3af2('0x3e')]);return db[_0x3af2('0x5e')]['count']({'where':_0x3cde5e[_0x3af2('0x39')]})['then'](function(_0x2b8275){_0x1b98d4['count']=_0x2b8275;if(_0x5a9ac2['query'][_0x3af2('0x43')]){_0x3cde5e[_0x3af2('0x3f')]=[{'all':!![]}];}return db[_0x3af2('0x5e')]['findAll'](_0x3cde5e);})[_0x3af2('0x20')](function(_0x47769){_0x1b98d4[_0x3af2('0x41')]=_0x47769;return _0x1b98d4;});}})[_0x3af2('0x20')](respondWithFilteredResult(_0x371b1c,_0x3cde5e))['catch'](handleError(_0x371b1c,null));};exports[_0x3af2('0x5f')]=function(_0x570044,_0x12bcf0,_0x56db97){var _0x50668b={};var _0x546314={};var _0x592c71;var _0x30dc02;return db[_0x3af2('0x2a')]['findOne']({'where':{'id':_0x570044[_0x3af2('0x4d')]['id']}})[_0x3af2('0x20')](handleEntityNotFound(_0x12bcf0,null))['then'](function(_0x136c87){if(_0x136c87){_0x592c71=_0x136c87;_0x546314[_0x3af2('0x2d')]=_[_0x3af2('0x2e')](db[_0x3af2('0x60')][_0x3af2('0x4e')]);_0x546314[_0x3af2('0x31')]=_['keys'](_0x570044['query']);_0x546314[_0x3af2('0x2f')]=_[_0x3af2('0x30')](_0x546314[_0x3af2('0x2d')],_0x546314[_0x3af2('0x31')]);_0x50668b[_0x3af2('0x32')]=_['intersection'](_0x546314[_0x3af2('0x2d')],qs[_0x3af2('0x33')](_0x570044[_0x3af2('0x31')]['fields']));_0x50668b[_0x3af2('0x32')]=_0x50668b['attributes'][_0x3af2('0x34')]?_0x50668b[_0x3af2('0x32')]:_0x546314[_0x3af2('0x2d')];_0x50668b[_0x3af2('0x37')]=qs['sort'](_0x570044['query'][_0x3af2('0x38')]);_0x50668b[_0x3af2('0x39')]=qs[_0x3af2('0x2f')](_[_0x3af2('0x3a')](_0x570044[_0x3af2('0x31')],_0x546314[_0x3af2('0x2f')]));if(_0x570044[_0x3af2('0x31')][_0x3af2('0x3b')]){_0x50668b[_0x3af2('0x39')]=_[_0x3af2('0x3c')](_0x50668b[_0x3af2('0x39')],{'$or':_[_0x3af2('0x29')](_0x50668b[_0x3af2('0x32')],function(_0x12954d){var _0x362952={};_0x362952[_0x12954d]={'$like':'%'+_0x570044[_0x3af2('0x31')][_0x3af2('0x3b')]+'%'};return _0x362952;})});}_0x50668b=_[_0x3af2('0x3c')]({},_0x50668b,_0x570044[_0x3af2('0x3e')]);return _0x592c71[_0x3af2('0x5f')](_0x50668b);}})[_0x3af2('0x20')](function(_0x463813){if(_0x463813){_0x30dc02=_0x463813['length'];if(!_0x570044['query'][_0x3af2('0x35')](_0x3af2('0x36'))){_0x50668b[_0x3af2('0x1a')]=qs[_0x3af2('0x1a')](_0x570044[_0x3af2('0x31')][_0x3af2('0x1a')]);_0x50668b[_0x3af2('0x18')]=qs[_0x3af2('0x18')](_0x570044[_0x3af2('0x31')]['offset']);}return _0x592c71[_0x3af2('0x5f')](_0x50668b);}})['then'](function(_0x2a4526){if(_0x2a4526){return _0x2a4526?{'count':_0x30dc02,'rows':_0x2a4526}:null;}})['then'](respondWithResult(_0x12bcf0,null))[_0x3af2('0x45')](handleError(_0x12bcf0,null));};exports[_0x3af2('0x61')]=function(_0x2e816f,_0x1bb59,_0x1ee672){var _0x3e9e61,_0x37b7fb;var _0x53dd4d=[];var _0xb78ed=moment()[_0x3af2('0x62')](_0x3af2('0x63'));return db[_0x3af2('0x2a')]['find']({'where':{'id':_0x2e816f[_0x3af2('0x4d')]['id']}})['then'](handleEntityNotFound(_0x1bb59,null))[_0x3af2('0x20')](function(_0x3778cd){if(_0x3778cd){_0x37b7fb=_0x3778cd;return _0x3778cd[_0x3af2('0x61')](_0x2e816f['body'][_0x3af2('0x64')],_[_0x3af2('0x4f')](_0x2e816f[_0x3af2('0x47')],[_0x3af2('0x64'),'id'])||{});}return null;})[_0x3af2('0x65')](function(_0x174428){var _0x29f839;var _0x2ae748;_0x3e9e61=_0x174428||[];var _0x4c924a=[];if(_0x174428){for(var _0x4ba6bb=0x0;_0x4ba6bb<_0x174428['length'];_0x4ba6bb+=0x1){var _0x3880d1=_0x174428[_0x4ba6bb][_0x3af2('0x22')]({'plain':!![]});_0x37b7fb[_0x3af2('0x66')]=_0x2e816f[_0x3af2('0x47')][_0x3af2('0x66')]?_0x2e816f[_0x3af2('0x47')][_0x3af2('0x66')]:_0x37b7fb[_0x3af2('0x66')];switch(_0x37b7fb[_0x3af2('0x66')]){case _0x3af2('0x67'):_0x29f839=squel[_0x3af2('0x68')]()[_0x3af2('0x69')](_0x3af2('0x6a'))[_0x3af2('0x6b')]([_0x3af2('0x6c'),_0x3af2('0x6d'),_0x3af2('0x6e'),_0x3af2('0x6f'),_0x3af2('0x5b'),'createdAt',_0x3af2('0x51')],squel[_0x3af2('0x70')]()['field']('phone',_0x3af2('0x6c'))['field'](_0x3af2('0x71'),_0x3af2('0x6d'))[_0x3af2('0x72')]('id',_0x3af2('0x6e'))['field'](_0x3880d1[_0x3af2('0x73')][_0x3af2('0x74')](),_0x3af2('0x6f'))['field'](_0x2e816f[_0x3af2('0x4d')]['id'][_0x3af2('0x74')](),_0x3af2('0x5b'))[_0x3af2('0x72')]('\x27'+_0xb78ed+'\x27',_0x3af2('0x50'))['field']('\x27'+_0xb78ed+'\x27','updatedAt')[_0x3af2('0x75')](_0x3af2('0x76'))['where'](_0x3af2('0x77'))['where'](_0x3af2('0x78'),_0x3880d1[_0x3af2('0x73')][_0x3af2('0x74')]())['where'](_0x3af2('0x79'))[_0x3af2('0x39')](_0x3af2('0x7a'),squel[_0x3af2('0x70')]()[_0x3af2('0x72')](_0x3af2('0x7b'))[_0x3af2('0x75')]('cm_hopper_final')[_0x3af2('0x39')]('CampaignId\x20=\x20?',_0x2e816f[_0x3af2('0x4d')]['id'][_0x3af2('0x74')]()))['where'](_0x3af2('0x7a'),squel[_0x3af2('0x70')]()[_0x3af2('0x72')](_0x3af2('0x7c'))[_0x3af2('0x75')](_0x3af2('0x6a'))[_0x3af2('0x39')]('CampaignId\x20=\x20?',_0x2e816f['params']['id'][_0x3af2('0x74')]())))[_0x3af2('0x74')]();break;case _0x3af2('0x7d'):_0x29f839=squel[_0x3af2('0x68')]()['into'](_0x3af2('0x6a'))[_0x3af2('0x6b')]([_0x3af2('0x6c'),_0x3af2('0x6d'),_0x3af2('0x6e'),_0x3af2('0x6f'),'CampaignId',_0x3af2('0x50'),_0x3af2('0x51')],squel['select']()['field']('phone',_0x3af2('0x6c'))[_0x3af2('0x72')]('NOW()',_0x3af2('0x6d'))[_0x3af2('0x72')]('id',_0x3af2('0x6e'))[_0x3af2('0x72')](_0x3880d1[_0x3af2('0x73')][_0x3af2('0x74')](),_0x3af2('0x6f'))[_0x3af2('0x72')](_0x2e816f[_0x3af2('0x4d')]['id'][_0x3af2('0x74')](),'CampaignId')[_0x3af2('0x72')]('\x27'+_0xb78ed+'\x27','createdAt')[_0x3af2('0x72')]('\x27'+_0xb78ed+'\x27',_0x3af2('0x51'))['from'](_0x3af2('0x76'))[_0x3af2('0x39')]('deletedAt\x20IS\x20NULL')[_0x3af2('0x39')](_0x3af2('0x78'),_0x3880d1[_0x3af2('0x73')][_0x3af2('0x74')]())[_0x3af2('0x39')]('phone\x20IS\x20NOT\x20NULL')[_0x3af2('0x39')](_0x3af2('0x7a'),squel[_0x3af2('0x70')]()['field']('COALESCE(phone,\x27\x27)')[_0x3af2('0x75')]('cm_hopper')['where'](_0x3af2('0x7e'),_0x2e816f[_0x3af2('0x4d')]['id'][_0x3af2('0x74')]())))[_0x3af2('0x74')]();break;default:_0x29f839=squel[_0x3af2('0x68')]()['into'](_0x3af2('0x6a'))['fromQuery']([_0x3af2('0x6c'),_0x3af2('0x6d'),'ContactId',_0x3af2('0x6f'),_0x3af2('0x5b'),_0x3af2('0x50'),_0x3af2('0x51')],squel[_0x3af2('0x70')]()[_0x3af2('0x72')](_0x3af2('0x6c'),_0x3af2('0x6c'))[_0x3af2('0x72')](_0x3af2('0x71'),_0x3af2('0x6d'))[_0x3af2('0x72')]('id',_0x3af2('0x6e'))[_0x3af2('0x72')](_0x3880d1[_0x3af2('0x73')]['toString'](),_0x3af2('0x6f'))[_0x3af2('0x72')](_0x2e816f[_0x3af2('0x4d')]['id'][_0x3af2('0x74')](),'CampaignId')['field']('\x27'+_0xb78ed+'\x27',_0x3af2('0x50'))[_0x3af2('0x72')]('\x27'+_0xb78ed+'\x27',_0x3af2('0x51'))[_0x3af2('0x75')](_0x3af2('0x76'))['where']('deletedAt\x20IS\x20NULL')['where'](_0x3af2('0x78'),_0x3880d1[_0x3af2('0x73')][_0x3af2('0x74')]())[_0x3af2('0x39')](_0x3af2('0x79')))[_0x3af2('0x74')]();}_0x2ae748=squel['insert']()['into'](_0x3af2('0x7f'))[_0x3af2('0x6b')]([_0x3af2('0x80'),_0x3af2('0x6d'),_0x3af2('0x6c'),_0x3af2('0x81'),'createdAt',_0x3af2('0x51')],squel[_0x3af2('0x70')]()[_0x3af2('0x72')]('h.id','id')['field']('NOW()',_0x3af2('0x6d'))[_0x3af2('0x72')](_0x3af2('0x82'),_0x3af2('0x6c'))[_0x3af2('0x72')](_0x3af2('0x83'),_0x3af2('0x81'))[_0x3af2('0x72')]('\x27'+_0xb78ed+'\x27',_0x3af2('0x50'))[_0x3af2('0x72')]('\x27'+_0xb78ed+'\x27',_0x3af2('0x51'))[_0x3af2('0x75')]('cm_contact_has_items','ci')['join'](_0x3af2('0x6a'),'h',_0x3af2('0x84'))[_0x3af2('0x39')](_0x3af2('0x85'),_0x3880d1['CmListId'][_0x3af2('0x74')]())[_0x3af2('0x39')]('h.CampaignId=?',_0x2e816f[_0x3af2('0x4d')]['id'][_0x3af2('0x74')]())[_0x3af2('0x39')](_0x3af2('0x86'),_0xb78ed))[_0x3af2('0x74')]();_0x4c924a[_0x3af2('0x87')](db[_0x3af2('0x88')][_0x3af2('0x31')](_0x29f839));_0x53dd4d[_0x3af2('0x87')](db[_0x3af2('0x88')][_0x3af2('0x31')](_0x2ae748));}return BPromise[_0x3af2('0x89')](_0x4c924a);}})['then'](function(){return BPromise['all'](_0x53dd4d);})[_0x3af2('0x20')](function(){return _0x3e9e61;})['then'](respondWithResult(_0x1bb59,null))[_0x3af2('0x45')](handleError(_0x1bb59,null));};exports['removeLists']=function(_0x11f98c,_0xb0bb71,_0x41c1fa){return db[_0x3af2('0x2a')][_0x3af2('0x44')]({'where':{'id':_0x11f98c[_0x3af2('0x4d')]['id']}})[_0x3af2('0x20')](handleEntityNotFound(_0xb0bb71,null))[_0x3af2('0x20')](function(_0x141512){if(_0x141512){return _0x141512[_0x3af2('0x8a')](_0x11f98c[_0x3af2('0x31')][_0x3af2('0x64')]);}})['then'](function(_0x56fb5c){if(_0x56fb5c){return db['CmHopper'][_0x3af2('0x21')]({'where':{'ListId':_0x11f98c[_0x3af2('0x31')]['ids'],'CampaignId':_0x11f98c[_0x3af2('0x4d')]['id']}})['then'](function(){return _0x56fb5c;});}})[_0x3af2('0x20')](respondWithStatusCode(_0xb0bb71,null))[_0x3af2('0x45')](handleError(_0xb0bb71,null));};exports['getBlackLists']=function(_0x16cd27,_0x4ab66a,_0x2793fd){var _0x29dd53={};var _0x4733ca={};var _0x238b75;var _0x35a144;return db['Campaign'][_0x3af2('0x59')]({'where':{'id':_0x16cd27[_0x3af2('0x4d')]['id']}})['then'](handleEntityNotFound(_0x4ab66a,null))[_0x3af2('0x20')](function(_0x10f97d){if(_0x10f97d){_0x238b75=_0x10f97d;_0x4733ca['model']=_[_0x3af2('0x2e')](db[_0x3af2('0x60')][_0x3af2('0x4e')]);_0x4733ca['query']=_[_0x3af2('0x2e')](_0x16cd27[_0x3af2('0x31')]);_0x4733ca[_0x3af2('0x2f')]=_[_0x3af2('0x30')](_0x4733ca[_0x3af2('0x2d')],_0x4733ca['query']);_0x29dd53[_0x3af2('0x32')]=_[_0x3af2('0x30')](_0x4733ca[_0x3af2('0x2d')],qs[_0x3af2('0x33')](_0x16cd27[_0x3af2('0x31')][_0x3af2('0x33')]));_0x29dd53[_0x3af2('0x32')]=_0x29dd53[_0x3af2('0x32')]['length']?_0x29dd53[_0x3af2('0x32')]:_0x4733ca[_0x3af2('0x2d')];_0x29dd53['order']=qs[_0x3af2('0x38')](_0x16cd27[_0x3af2('0x31')][_0x3af2('0x38')]);_0x29dd53['where']=qs[_0x3af2('0x2f')](_['pick'](_0x16cd27[_0x3af2('0x31')],_0x4733ca[_0x3af2('0x2f')]));if(_0x16cd27[_0x3af2('0x31')][_0x3af2('0x3b')]){_0x29dd53[_0x3af2('0x39')]=_[_0x3af2('0x3c')](_0x29dd53[_0x3af2('0x39')],{'$or':_[_0x3af2('0x29')](_0x29dd53['attributes'],function(_0x52eba6){var _0x5bedd2={};_0x5bedd2[_0x52eba6]={'$like':'%'+_0x16cd27['query'][_0x3af2('0x3b')]+'%'};return _0x5bedd2;})});}_0x29dd53=_['merge']({},_0x29dd53,_0x16cd27['options']);return _0x238b75['getBlackLists'](_0x29dd53);}})['then'](function(_0xc6016){if(_0xc6016){_0x35a144=_0xc6016[_0x3af2('0x34')];if(!_0x16cd27[_0x3af2('0x31')][_0x3af2('0x35')](_0x3af2('0x36'))){_0x29dd53[_0x3af2('0x1a')]=qs[_0x3af2('0x1a')](_0x16cd27[_0x3af2('0x31')]['limit']);_0x29dd53[_0x3af2('0x18')]=qs['offset'](_0x16cd27['query'][_0x3af2('0x18')]);}return _0x238b75[_0x3af2('0x8b')](_0x29dd53);}})[_0x3af2('0x20')](function(_0x3f4374){if(_0x3f4374){return _0x3f4374?{'count':_0x35a144,'rows':_0x3f4374}:null;}})[_0x3af2('0x20')](respondWithResult(_0x4ab66a,null))[_0x3af2('0x45')](handleError(_0x4ab66a,null));};exports[_0x3af2('0x8c')]=function(_0x5ee024,_0x594b7f,_0x390ef1){var _0x2acaa7,_0x4c7c79;var _0x286ee5=[];var _0x36fd1c=moment()[_0x3af2('0x62')](_0x3af2('0x63'));return db[_0x3af2('0x2a')][_0x3af2('0x44')]({'where':{'id':_0x5ee024[_0x3af2('0x4d')]['id']}})[_0x3af2('0x20')](handleEntityNotFound(_0x594b7f,null))[_0x3af2('0x20')](function(_0x28aa8e){if(_0x28aa8e){_0x4c7c79=_0x28aa8e;return _0x28aa8e[_0x3af2('0x8c')](_0x5ee024[_0x3af2('0x47')]['ids'],_[_0x3af2('0x4f')](_0x5ee024[_0x3af2('0x47')],[_0x3af2('0x64'),'id'])||{});}return null;})[_0x3af2('0x65')](function(_0x3363f8){var _0x15891e;var _0x4dd8eb;_0x2acaa7=_0x3363f8||[];var _0x7aed82=[];if(_0x3363f8){for(var _0x191f91=0x0;_0x191f91<_0x3363f8[_0x3af2('0x34')];_0x191f91+=0x1){var _0x2b5e27=_0x3363f8[_0x191f91]['get']({'plain':!![]});_0x15891e=squel[_0x3af2('0x68')]()[_0x3af2('0x69')]('cm_hopper_black')[_0x3af2('0x6b')]([_0x3af2('0x6c'),_0x3af2('0x6e'),_0x3af2('0x6f'),_0x3af2('0x5b'),_0x3af2('0x50'),'updatedAt'],squel[_0x3af2('0x70')]()[_0x3af2('0x72')](_0x3af2('0x6c'),'phone')[_0x3af2('0x72')]('id',_0x3af2('0x6e'))[_0x3af2('0x72')](_0x2b5e27[_0x3af2('0x73')][_0x3af2('0x74')](),_0x3af2('0x6f'))[_0x3af2('0x72')](_0x5ee024[_0x3af2('0x4d')]['id']['toString'](),_0x3af2('0x5b'))[_0x3af2('0x72')](_0x3af2('0x71'),_0x3af2('0x50'))[_0x3af2('0x72')]('NOW()','updatedAt')[_0x3af2('0x75')]('cm_contacts')[_0x3af2('0x39')](_0x3af2('0x77'))[_0x3af2('0x39')](_0x3af2('0x78'),_0x2b5e27['CmListId']['toString']())[_0x3af2('0x39')](_0x3af2('0x79')))[_0x3af2('0x74')]();_0x7aed82[_0x3af2('0x87')](db[_0x3af2('0x88')][_0x3af2('0x31')](_0x15891e));}return BPromise['all'](_0x7aed82);}})[_0x3af2('0x20')](function(){return _0x2acaa7;})['then'](respondWithResult(_0x594b7f,null))[_0x3af2('0x45')](handleError(_0x594b7f,null));};exports['removeBlackLists']=function(_0x38365a,_0x5db0fc,_0x8f4fee){return db['Campaign'][_0x3af2('0x44')]({'where':{'id':_0x38365a[_0x3af2('0x4d')]['id']}})['then'](handleEntityNotFound(_0x5db0fc,null))[_0x3af2('0x20')](function(_0x172c91){if(_0x172c91){return _0x172c91[_0x3af2('0x8d')](_0x38365a['query']['ids']);}})['then'](function(_0x4c7d20){if(_0x4c7d20){return db[_0x3af2('0x5e')][_0x3af2('0x21')]({'where':{'ListId':_0x38365a[_0x3af2('0x31')][_0x3af2('0x64')],'CampaignId':_0x38365a[_0x3af2('0x4d')]['id']}})[_0x3af2('0x20')](function(){return _0x4c7d20;});}})['then'](respondWithStatusCode(_0x5db0fc,null))['catch'](handleError(_0x5db0fc,null));};
\ No newline at end of file
index cd23c8c..3e8ae0c 100644 (file)
@@ -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(_0x9dfc10,_0x19c2d5){var _0x4f938a=function(_0x12b1e5){while(--_0x12b1e5){_0x9dfc10['push'](_0x9dfc10['shift']());}};_0x4f938a(++_0x19c2d5);}(_0x7a54,0x106));var _0x47a5=function(_0x471a69,_0x58574c){_0x471a69=_0x471a69-0x0;var _0x5dbe66=_0x7a54[_0x471a69];return _0x5dbe66;};'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(_0x2f45ea,_0x15c656){var _0x485a84=function(_0x4a1fe3){while(--_0x4a1fe3){_0x2f45ea['push'](_0x2f45ea['shift']());}};_0x485a84(++_0x15c656);}(_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
index 9b835e5..fd35680 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe58a=['message','info','result','catch','GetCampaign','findAll','options','raw','where','include','map','attributes','model','stringify','lodash','util','moment','randomstring','../../config/utils','../../config/environment','client','http','request','then','Campaign,\x20%s,\x20%s','request\x20sent','debug','Campaign,\x20%s,\x20%s,\x20%s','error'];(function(_0x5b013e,_0x5065a3){var _0x55cda8=function(_0x463012){while(--_0x463012){_0x5b013e['push'](_0x5b013e['shift']());}};_0x55cda8(++_0x5065a3);}(_0xe58a,0x9f));var _0xae58=function(_0x462538,_0x4ae77f){_0x462538=_0x462538-0x0;var _0x19612e=_0xe58a[_0x462538];return _0x19612e;};'use strict';var _=require(_0xae58('0x0'));var util=require(_0xae58('0x1'));var moment=require(_0xae58('0x2'));var BPromise=require('bluebird');var rs=require(_0xae58('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xae58('0x4'));var logger=require('../../config/logger')('rpc');var config=require(_0xae58('0x5'));var jayson=require('jayson/promise');var client=jayson[_0xae58('0x6')][_0xae58('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x2bd284,_0x2003b6,_0x703a03){return new BPromise(function(_0x7cb067,_0x20b26a){return client[_0xae58('0x8')](_0x2bd284,_0x703a03)[_0xae58('0x9')](function(_0x21d6f1){logger['info'](_0xae58('0xa'),_0x2003b6,_0xae58('0xb'));logger[_0xae58('0xc')](_0xae58('0xd'),_0x2003b6,_0xae58('0xb'),JSON['stringify'](_0x21d6f1));if(_0x21d6f1[_0xae58('0xe')]){if(_0x21d6f1[_0xae58('0xe')]['code']===0x1f4){logger[_0xae58('0xe')]('Campaign,\x20%s,\x20%s',_0x2003b6,_0x21d6f1[_0xae58('0xe')][_0xae58('0xf')]);return _0x20b26a(_0x21d6f1[_0xae58('0xe')][_0xae58('0xf')]);}logger['error'](_0xae58('0xa'),_0x2003b6,_0x21d6f1['error']['message']);return _0x7cb067(_0x21d6f1[_0xae58('0xe')][_0xae58('0xf')]);}else{logger[_0xae58('0x10')](_0xae58('0xa'),_0x2003b6,'request\x20sent');_0x7cb067(_0x21d6f1[_0xae58('0x11')][_0xae58('0xf')]);}})[_0xae58('0x12')](function(_0x2b3d7b){logger['error']('Campaign,\x20%s,\x20%s',_0x2003b6,_0x2b3d7b);_0x20b26a(_0x2b3d7b);});});}exports[_0xae58('0x13')]=function(_0x3d9b06){var _0x45a26b=this;return new Promise(function(_0x252488,_0x2e051c){return db['Campaign'][_0xae58('0x14')]({'raw':_0x3d9b06[_0xae58('0x15')]?_0x3d9b06[_0xae58('0x15')][_0xae58('0x16')]===undefined?!![]:![]:!![],'where':_0x3d9b06[_0xae58('0x15')]?_0x3d9b06[_0xae58('0x15')][_0xae58('0x17')]||null:null,'attributes':_0x3d9b06[_0xae58('0x15')]?_0x3d9b06[_0xae58('0x15')]['attributes']||null:null,'limit':_0x3d9b06['options']?_0x3d9b06[_0xae58('0x15')]['limit']||null:null,'include':_0x3d9b06[_0xae58('0x15')]?_0x3d9b06['options'][_0xae58('0x18')]?_[_0xae58('0x19')](_0x3d9b06[_0xae58('0x15')][_0xae58('0x18')],function(_0x41d2f2){return{'model':db[_0x41d2f2['model']],'as':_0x41d2f2['as'],'attributes':_0x41d2f2[_0xae58('0x1a')],'include':_0x41d2f2[_0xae58('0x18')]?_[_0xae58('0x19')](_0x41d2f2[_0xae58('0x18')],function(_0x557b6e){return{'model':db[_0x557b6e[_0xae58('0x1b')]],'as':_0x557b6e['as'],'attributes':_0x557b6e['attributes'],'include':_0x557b6e['include']?_[_0xae58('0x19')](_0x557b6e['include'],function(_0x2c3876){return{'model':db[_0x2c3876['model']],'as':_0x2c3876['as'],'attributes':_0x2c3876[_0xae58('0x1a')]};}):[]};}):[]};}):[]:[]})[_0xae58('0x9')](function(_0x4474e8){logger['info']('GetCampaign',_0x3d9b06);logger['debug']('GetCampaign',_0x3d9b06,JSON[_0xae58('0x1c')](_0x4474e8));_0x252488(_0x4474e8);})['catch'](function(_0x551755){logger[_0xae58('0xe')](_0xae58('0x13'),_0x551755[_0xae58('0xf')],_0x3d9b06);_0x2e051c(_0x45a26b[_0xae58('0xe')](0x1f4,_0x551755[_0xae58('0xf')]));});});};
\ No newline at end of file
+var _0xf021=['randomstring','../../mysqldb','../../config/logger','rpc','client','then','request\x20sent','debug','Campaign,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','Campaign,\x20%s,\x20%s','result','catch','Campaign','findAll','options','where','attributes','limit','include','map','model','GetCampaign','lodash','util','moment','bluebird'];(function(_0x4ec10b,_0x8e72c0){var _0x2dd0fd=function(_0x22b9ad){while(--_0x22b9ad){_0x4ec10b['push'](_0x4ec10b['shift']());}};_0x2dd0fd(++_0x8e72c0);}(_0xf021,0x18f));var _0x1f02=function(_0x155a36,_0x4bf39){_0x155a36=_0x155a36-0x0;var _0x3c99d0=_0xf021[_0x155a36];return _0x3c99d0;};'use strict';var _=require(_0x1f02('0x0'));var util=require(_0x1f02('0x1'));var moment=require(_0x1f02('0x2'));var BPromise=require(_0x1f02('0x3'));var rs=require(_0x1f02('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1f02('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x1f02('0x6'))(_0x1f02('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x1f02('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x383d0b,_0x257d6a,_0x2a6c50){return new BPromise(function(_0x4193d2,_0x1f1cec){return client['request'](_0x383d0b,_0x2a6c50)[_0x1f02('0x9')](function(_0x5dc295){logger['info']('Campaign,\x20%s,\x20%s',_0x257d6a,_0x1f02('0xa'));logger[_0x1f02('0xb')](_0x1f02('0xc'),_0x257d6a,_0x1f02('0xa'),JSON[_0x1f02('0xd')](_0x5dc295));if(_0x5dc295['error']){if(_0x5dc295[_0x1f02('0xe')][_0x1f02('0xf')]===0x1f4){logger[_0x1f02('0xe')]('Campaign,\x20%s,\x20%s',_0x257d6a,_0x5dc295[_0x1f02('0xe')][_0x1f02('0x10')]);return _0x1f1cec(_0x5dc295[_0x1f02('0xe')]['message']);}logger['error']('Campaign,\x20%s,\x20%s',_0x257d6a,_0x5dc295[_0x1f02('0xe')][_0x1f02('0x10')]);return _0x4193d2(_0x5dc295[_0x1f02('0xe')][_0x1f02('0x10')]);}else{logger[_0x1f02('0x11')](_0x1f02('0x12'),_0x257d6a,_0x1f02('0xa'));_0x4193d2(_0x5dc295[_0x1f02('0x13')]['message']);}})[_0x1f02('0x14')](function(_0x5cca16){logger['error']('Campaign,\x20%s,\x20%s',_0x257d6a,_0x5cca16);_0x1f1cec(_0x5cca16);});});}exports['GetCampaign']=function(_0x4d1e4f){var _0x2cd7db=this;return new Promise(function(_0x3033a2,_0x5f1f30){return db[_0x1f02('0x15')][_0x1f02('0x16')]({'raw':_0x4d1e4f[_0x1f02('0x17')]?_0x4d1e4f[_0x1f02('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x4d1e4f['options']?_0x4d1e4f[_0x1f02('0x17')][_0x1f02('0x18')]||null:null,'attributes':_0x4d1e4f['options']?_0x4d1e4f['options'][_0x1f02('0x19')]||null:null,'limit':_0x4d1e4f[_0x1f02('0x17')]?_0x4d1e4f[_0x1f02('0x17')][_0x1f02('0x1a')]||null:null,'include':_0x4d1e4f['options']?_0x4d1e4f[_0x1f02('0x17')][_0x1f02('0x1b')]?_[_0x1f02('0x1c')](_0x4d1e4f[_0x1f02('0x17')][_0x1f02('0x1b')],function(_0x134398){return{'model':db[_0x134398[_0x1f02('0x1d')]],'as':_0x134398['as'],'attributes':_0x134398['attributes'],'include':_0x134398[_0x1f02('0x1b')]?_[_0x1f02('0x1c')](_0x134398['include'],function(_0x25a8d1){return{'model':db[_0x25a8d1[_0x1f02('0x1d')]],'as':_0x25a8d1['as'],'attributes':_0x25a8d1['attributes'],'include':_0x25a8d1['include']?_[_0x1f02('0x1c')](_0x25a8d1[_0x1f02('0x1b')],function(_0x3c3fda){return{'model':db[_0x3c3fda[_0x1f02('0x1d')]],'as':_0x3c3fda['as'],'attributes':_0x3c3fda[_0x1f02('0x19')]};}):[]};}):[]};}):[]:[]})[_0x1f02('0x9')](function(_0x297cf4){logger['info']('GetCampaign',_0x4d1e4f);logger['debug'](_0x1f02('0x1e'),_0x4d1e4f,JSON[_0x1f02('0xd')](_0x297cf4));_0x3033a2(_0x297cf4);})[_0x1f02('0x14')](function(_0x496afd){logger['error'](_0x1f02('0x1e'),_0x496afd[_0x1f02('0x10')],_0x4d1e4f);_0x5f1f30(_0x2cd7db[_0x1f02('0xe')](0x1f4,_0x496afd[_0x1f02('0x10')]));});});};
\ No newline at end of file
index b1eacb5..cad3bed 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x42c8=['update','delete','destroy','removeLists','removeBlackLists','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','./campaign.controller','get','index','/:id/hoppers','isAuthenticated','getHoppers','getHopperHistories','/:id/hopper_finals','getHopperFinals','/:id/hopper_black','/:id/lists','getLists','/:id/blacklists','getBlackLists','post','/:id/clone','clone','addBlackLists','put','/:id'];(function(_0xba5e92,_0x38a184){var _0x43c82a=function(_0x4e628e){while(--_0x4e628e){_0xba5e92['push'](_0xba5e92['shift']());}};_0x43c82a(++_0x38a184);}(_0x42c8,0x116));var _0x842c=function(_0x3f78b0,_0x3e102f){_0x3f78b0=_0x3f78b0-0x0;var _0x226432=_0x42c8[_0x3f78b0];return _0x226432;};'use strict';var multer=require(_0x842c('0x0'));var util=require(_0x842c('0x1'));var path=require(_0x842c('0x2'));var timeout=require(_0x842c('0x3'));var express=require(_0x842c('0x4'));var router=express['Router']();var fs_extra=require(_0x842c('0x5'));var auth=require(_0x842c('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x842c('0x7'));var controller=require(_0x842c('0x8'));router[_0x842c('0x9')]('/',auth['isAuthenticated'](),controller[_0x842c('0xa')]);router[_0x842c('0x9')]('/:id',auth['isAuthenticated'](),controller['show']);router['get'](_0x842c('0xb'),auth[_0x842c('0xc')](),controller[_0x842c('0xd')]);router[_0x842c('0x9')]('/:id/hopper_histories',auth[_0x842c('0xc')](),controller[_0x842c('0xe')]);router[_0x842c('0x9')](_0x842c('0xf'),auth[_0x842c('0xc')](),controller[_0x842c('0x10')]);router[_0x842c('0x9')](_0x842c('0x11'),auth[_0x842c('0xc')](),controller['getHopperBlacks']);router[_0x842c('0x9')](_0x842c('0x12'),auth[_0x842c('0xc')](),controller[_0x842c('0x13')]);router['get'](_0x842c('0x14'),auth['isAuthenticated'](),controller[_0x842c('0x15')]);router[_0x842c('0x16')]('/',auth['isAuthenticated'](),controller['create']);router['post'](_0x842c('0x17'),auth[_0x842c('0xc')](),controller[_0x842c('0x18')]);router[_0x842c('0x16')](_0x842c('0x12'),auth[_0x842c('0xc')](),controller['addLists']);router[_0x842c('0x16')](_0x842c('0x14'),auth[_0x842c('0xc')](),controller[_0x842c('0x19')]);router[_0x842c('0x1a')](_0x842c('0x1b'),auth[_0x842c('0xc')](),controller[_0x842c('0x1c')]);router[_0x842c('0x1d')]('/:id',auth[_0x842c('0xc')](),controller[_0x842c('0x1e')]);router[_0x842c('0x1d')](_0x842c('0x12'),auth[_0x842c('0xc')](),controller[_0x842c('0x1f')]);router[_0x842c('0x1d')]('/:id/blacklists',auth['isAuthenticated'](),controller[_0x842c('0x20')]);module[_0x842c('0x21')]=router;
\ No newline at end of file
+var _0xaced=['multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','/:id','isAuthenticated','show','getHoppers','/:id/hopper_histories','getHopperHistories','/:id/hopper_finals','/:id/hopper_black','/:id/lists','getLists','/:id/blacklists','getBlackLists','post','create','/:id/clone','clone','addLists','put','update','delete','removeLists','removeBlackLists','exports'];(function(_0x2dc5cb,_0xed18ba){var _0x671bf3=function(_0x104071){while(--_0x104071){_0x2dc5cb['push'](_0x2dc5cb['shift']());}};_0x671bf3(++_0xed18ba);}(_0xaced,0x18c));var _0xdace=function(_0x5d78b0,_0x28ae16){_0x5d78b0=_0x5d78b0-0x0;var _0x91ec7b=_0xaced[_0x5d78b0];return _0x91ec7b;};'use strict';var multer=require(_0xdace('0x0'));var util=require(_0xdace('0x1'));var path=require(_0xdace('0x2'));var timeout=require(_0xdace('0x3'));var express=require(_0xdace('0x4'));var router=express['Router']();var fs_extra=require(_0xdace('0x5'));var auth=require(_0xdace('0x6'));var interaction=require(_0xdace('0x7'));var config=require(_0xdace('0x8'));var controller=require('./campaign.controller');router[_0xdace('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0xdace('0x9')](_0xdace('0xa'),auth[_0xdace('0xb')](),controller[_0xdace('0xc')]);router['get']('/:id/hoppers',auth[_0xdace('0xb')](),controller[_0xdace('0xd')]);router[_0xdace('0x9')](_0xdace('0xe'),auth['isAuthenticated'](),controller[_0xdace('0xf')]);router[_0xdace('0x9')](_0xdace('0x10'),auth[_0xdace('0xb')](),controller['getHopperFinals']);router[_0xdace('0x9')](_0xdace('0x11'),auth['isAuthenticated'](),controller['getHopperBlacks']);router['get'](_0xdace('0x12'),auth['isAuthenticated'](),controller[_0xdace('0x13')]);router[_0xdace('0x9')](_0xdace('0x14'),auth[_0xdace('0xb')](),controller[_0xdace('0x15')]);router[_0xdace('0x16')]('/',auth['isAuthenticated'](),controller[_0xdace('0x17')]);router['post'](_0xdace('0x18'),auth[_0xdace('0xb')](),controller[_0xdace('0x19')]);router[_0xdace('0x16')](_0xdace('0x12'),auth[_0xdace('0xb')](),controller[_0xdace('0x1a')]);router[_0xdace('0x16')]('/:id/blacklists',auth['isAuthenticated'](),controller['addBlackLists']);router[_0xdace('0x1b')]('/:id',auth[_0xdace('0xb')](),controller[_0xdace('0x1c')]);router[_0xdace('0x1d')](_0xdace('0xa'),auth[_0xdace('0xb')](),controller['destroy']);router['delete'](_0xdace('0x12'),auth[_0xdace('0xb')](),controller[_0xdace('0x1e')]);router[_0xdace('0x1d')]('/:id/blacklists',auth['isAuthenticated'](),controller[_0xdace('0x1f')]);module[_0xdace('0x20')]=router;
\ No newline at end of file
index a7d0a38..17733a1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2206=['TEXT','medium','VIRTUAL','getDataValue','key','sequelize','STRING'];(function(_0x264d4d,_0x118fb5){var _0xc917e2=function(_0x21b9dc){while(--_0x21b9dc){_0x264d4d['push'](_0x264d4d['shift']());}};_0xc917e2(++_0x118fb5);}(_0x2206,0x194));var _0x6220=function(_0xad0beb,_0x5880da){_0xad0beb=_0xad0beb-0x0;var _0x27ec66=_0x2206[_0xad0beb];return _0x27ec66;};'use strict';var Sequelize=require(_0x6220('0x0'));module['exports']={'key':{'type':Sequelize[_0x6220('0x1')],'allowNull':![]},'value':{'type':Sequelize[_0x6220('0x2')],'length':_0x6220('0x3'),'allowNull':![]},'description':{'type':Sequelize[_0x6220('0x1')]},'name':{'type':Sequelize[_0x6220('0x4')],'get':function(){return this[_0x6220('0x5')](_0x6220('0x6'));}}};
\ No newline at end of file
+var _0x9cdb=['exports','STRING','TEXT','medium','VIRTUAL','getDataValue','key','sequelize'];(function(_0x3b9d5f,_0x2e9039){var _0x39924e=function(_0x5752ee){while(--_0x5752ee){_0x3b9d5f['push'](_0x3b9d5f['shift']());}};_0x39924e(++_0x2e9039);}(_0x9cdb,0x11f));var _0xb9cd=function(_0x45dc60,_0x5b6ac7){_0x45dc60=_0x45dc60-0x0;var _0x3765ba=_0x9cdb[_0x45dc60];return _0x3765ba;};'use strict';var Sequelize=require(_0xb9cd('0x0'));module[_0xb9cd('0x1')]={'key':{'type':Sequelize[_0xb9cd('0x2')],'allowNull':![]},'value':{'type':Sequelize[_0xb9cd('0x3')],'length':_0xb9cd('0x4'),'allowNull':![]},'description':{'type':Sequelize[_0xb9cd('0x2')]},'name':{'type':Sequelize[_0xb9cd('0x5')],'get':function(){return this[_0xb9cd('0x6')](_0xb9cd('0x7'));}}};
\ No newline at end of file
index c5cecb8..4dcdf66 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x79c6=['Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','undefined','limit','count','offset','set','json','reject','save','update','then','destroy','CannedAnswers','UserProfileResource','end','error','stack','name','index','map','CannedAnswer','rawAttributes','fieldName','type','query','keys','filters','model','attributes','intersection','fields','length','hasOwnProperty','pick','filter','merge','where','options','includeAll','include','findAll','rows','catch','show','find','body','params','create','key','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','Sequelize','ValidationError','The\x20inserted\x20key\x20already\x20exists.','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection'];(function(_0x208193,_0x530321){var _0x57cd36=function(_0x57d9f4){while(--_0x57d9f4){_0x208193['push'](_0x208193['shift']());}};_0x57cd36(++_0x530321);}(_0x79c6,0xb1));var _0x679c=function(_0x411017,_0x4a8117){_0x411017=_0x411017-0x0;var _0x2adeea=_0x79c6[_0x411017];return _0x2adeea;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x679c('0x0'));var zipdir=require(_0x679c('0x1'));var jsonpatch=require(_0x679c('0x2'));var rp=require(_0x679c('0x3'));var moment=require('moment');var BPromise=require(_0x679c('0x4'));var Mustache=require(_0x679c('0x5'));var util=require(_0x679c('0x6'));var path=require('path');var sox=require(_0x679c('0x7'));var csv=require(_0x679c('0x8'));var ejs=require(_0x679c('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x679c('0xa'));var squel=require(_0x679c('0xb'));var crypto=require(_0x679c('0xc'));var jsforce=require(_0x679c('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x679c('0x8'));var querystring=require(_0x679c('0xe'));var Papa=require(_0x679c('0xf'));var Redis=require(_0x679c('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x679c('0x11'));var as=require(_0x679c('0x12'));var hardwareService=require(_0x679c('0x13'));var logger=require(_0x679c('0x14'))(_0x679c('0x15'));var utils=require(_0x679c('0x16'));var config=require(_0x679c('0x17'));var licenseUtil=require(_0x679c('0x18'));var db=require(_0x679c('0x19'))['db'];function respondWithStatusCode(_0x1c2e04,_0x5da738){_0x5da738=_0x5da738||0xcc;return function(_0x47f311){if(_0x47f311){return _0x1c2e04[_0x679c('0x1a')](_0x5da738);}return _0x1c2e04[_0x679c('0x1b')](_0x5da738)['end']();};}function respondWithResult(_0x37e06e,_0x1430e0){_0x1430e0=_0x1430e0||0xc8;return function(_0x30df63){if(_0x30df63){return _0x37e06e[_0x679c('0x1b')](_0x1430e0)['json'](_0x30df63);}};}function respondWithFilteredResult(_0xf15701,_0x478bb4){return function(_0x582c60){if(_0x582c60){var _0x2bc10e=typeof _0x478bb4['offset']===_0x679c('0x1c')&&typeof _0x478bb4[_0x679c('0x1d')]===_0x679c('0x1c');var _0x24a65a=_0x582c60[_0x679c('0x1e')];var _0x24f946=_0x2bc10e?0x0:_0x478bb4[_0x679c('0x1f')];var _0x508bcf=_0x2bc10e?_0x582c60[_0x679c('0x1e')]:_0x478bb4[_0x679c('0x1f')]+_0x478bb4['limit'];var _0x3e9447;if(_0x508bcf>=_0x24a65a){_0x508bcf=_0x24a65a;_0x3e9447=0xc8;}else{_0x3e9447=0xce;}_0xf15701[_0x679c('0x1b')](_0x3e9447);return _0xf15701[_0x679c('0x20')]('Content-Range',_0x24f946+'-'+_0x508bcf+'/'+_0x24a65a)[_0x679c('0x21')](_0x582c60);}return null;};}function patchUpdates(_0x10b14c){return function(_0x2cc76c){try{jsonpatch['apply'](_0x2cc76c,_0x10b14c,!![]);}catch(_0x457b4d){return BPromise[_0x679c('0x22')](_0x457b4d);}return _0x2cc76c[_0x679c('0x23')]();};}function saveUpdates(_0x421f9c,_0x319c56){return function(_0x2ac9fa){if(_0x2ac9fa){return _0x2ac9fa[_0x679c('0x24')](_0x421f9c)[_0x679c('0x25')](function(_0x11771e){return _0x11771e;});}return null;};}function removeEntity(_0x5aec84,_0x38625c){return function(_0x4e3490){if(_0x4e3490){return _0x4e3490[_0x679c('0x26')]()[_0x679c('0x25')](function(){var _0x3240be=_0x4e3490['get']({'plain':!![]});var _0x299189=_0x679c('0x27');return db[_0x679c('0x28')][_0x679c('0x26')]({'where':{'type':_0x299189,'resourceId':_0x3240be['id']}})[_0x679c('0x25')](function(){return _0x4e3490;});})[_0x679c('0x25')](function(){_0x5aec84[_0x679c('0x1b')](0xcc)[_0x679c('0x29')]();});}};}function handleEntityNotFound(_0x53726e,_0x555a3c){return function(_0x4fe758){if(!_0x4fe758){_0x53726e['sendStatus'](0x194);}return _0x4fe758;};}function handleError(_0x356f69,_0x5f3866){_0x5f3866=_0x5f3866||0x1f4;return function(_0x59a3a8){logger[_0x679c('0x2a')](_0x59a3a8[_0x679c('0x2b')]);if(_0x59a3a8[_0x679c('0x2c')]){delete _0x59a3a8[_0x679c('0x2c')];}_0x356f69[_0x679c('0x1b')](_0x5f3866)['send'](_0x59a3a8);};}exports[_0x679c('0x2d')]=function(_0x18316c,_0x5229e9){var _0x1db4b7={},_0x3838d8={},_0x53a758={'count':0x0,'rows':[]};var _0x4d9734=_[_0x679c('0x2e')](db[_0x679c('0x2f')][_0x679c('0x30')],function(_0x15ff78){return{'name':_0x15ff78[_0x679c('0x31')],'type':_0x15ff78[_0x679c('0x32')]['key']};});_0x3838d8['model']=_['map'](_0x4d9734,_0x679c('0x2c'));_0x3838d8[_0x679c('0x33')]=_[_0x679c('0x34')](_0x18316c[_0x679c('0x33')]);_0x3838d8[_0x679c('0x35')]=_['intersection'](_0x3838d8[_0x679c('0x36')],_0x3838d8[_0x679c('0x33')]);_0x1db4b7[_0x679c('0x37')]=_[_0x679c('0x38')](_0x3838d8[_0x679c('0x36')],qs[_0x679c('0x39')](_0x18316c[_0x679c('0x33')][_0x679c('0x39')]));_0x1db4b7[_0x679c('0x37')]=_0x1db4b7[_0x679c('0x37')][_0x679c('0x3a')]?_0x1db4b7['attributes']:_0x3838d8[_0x679c('0x36')];if(!_0x18316c['query'][_0x679c('0x3b')]('nolimit')){_0x1db4b7[_0x679c('0x1d')]=qs[_0x679c('0x1d')](_0x18316c[_0x679c('0x33')]['limit']);_0x1db4b7[_0x679c('0x1f')]=qs[_0x679c('0x1f')](_0x18316c[_0x679c('0x33')]['offset']);}_0x1db4b7['order']=qs['sort'](_0x18316c[_0x679c('0x33')]['sort']);_0x1db4b7['where']=qs[_0x679c('0x35')](_[_0x679c('0x3c')](_0x18316c[_0x679c('0x33')],_0x3838d8['filters']),_0x4d9734);if(_0x18316c['query'][_0x679c('0x3d')]){_0x1db4b7['where']=_[_0x679c('0x3e')](_0x1db4b7[_0x679c('0x3f')],{'$or':[{'key':{'$like':'%'+_0x18316c[_0x679c('0x33')][_0x679c('0x3d')]+'%'}},{'value':{'$like':'%'+_0x18316c['query']['filter']+'%'}}]});}_0x1db4b7=_[_0x679c('0x3e')]({},_0x1db4b7,_0x18316c[_0x679c('0x40')]);var _0x1fb9d5={'where':_0x1db4b7['where']};return db['CannedAnswer'][_0x679c('0x1e')](_0x1fb9d5)[_0x679c('0x25')](function(_0x461adc){_0x53a758['count']=_0x461adc;if(_0x18316c[_0x679c('0x33')][_0x679c('0x41')]){_0x1db4b7[_0x679c('0x42')]=[{'all':!![]}];}return db[_0x679c('0x2f')][_0x679c('0x43')](_0x1db4b7);})[_0x679c('0x25')](function(_0x109425){_0x53a758[_0x679c('0x44')]=_0x109425;return _0x53a758;})[_0x679c('0x25')](respondWithFilteredResult(_0x5229e9,_0x1db4b7))[_0x679c('0x45')](handleError(_0x5229e9,null));};exports[_0x679c('0x46')]=function(_0x5c127f,_0x9a0277){var _0x5864a8={'raw':!![],'where':{'id':_0x5c127f['params']['id']}},_0x41676c={};_0x41676c[_0x679c('0x36')]=_['keys'](db[_0x679c('0x2f')][_0x679c('0x30')]);_0x41676c[_0x679c('0x33')]=_[_0x679c('0x34')](_0x5c127f[_0x679c('0x33')]);_0x41676c[_0x679c('0x35')]=_[_0x679c('0x38')](_0x41676c[_0x679c('0x36')],_0x41676c[_0x679c('0x33')]);_0x5864a8['attributes']=_['intersection'](_0x41676c[_0x679c('0x36')],qs[_0x679c('0x39')](_0x5c127f[_0x679c('0x33')][_0x679c('0x39')]));_0x5864a8[_0x679c('0x37')]=_0x5864a8[_0x679c('0x37')][_0x679c('0x3a')]?_0x5864a8[_0x679c('0x37')]:_0x41676c[_0x679c('0x36')];if(_0x5c127f[_0x679c('0x33')]['includeAll']){_0x5864a8[_0x679c('0x42')]=[{'all':!![]}];}_0x5864a8=_['merge']({},_0x5864a8,_0x5c127f[_0x679c('0x40')]);return db[_0x679c('0x2f')][_0x679c('0x47')](_0x5864a8)[_0x679c('0x25')](handleEntityNotFound(_0x9a0277,null))[_0x679c('0x25')](respondWithResult(_0x9a0277,null))[_0x679c('0x45')](handleError(_0x9a0277,null));};exports[_0x679c('0x24')]=function(_0x4ae4da,_0x441775){if(_0x4ae4da['body']['id']){delete _0x4ae4da[_0x679c('0x48')]['id'];}return db['CannedAnswer'][_0x679c('0x47')]({'where':{'id':_0x4ae4da[_0x679c('0x49')]['id']}})[_0x679c('0x25')](handleEntityNotFound(_0x441775,null))[_0x679c('0x25')](saveUpdates(_0x4ae4da[_0x679c('0x48')],null))[_0x679c('0x25')](respondWithResult(_0x441775,null))['catch'](handleError(_0x441775,null));};exports['destroy']=function(_0x394855,_0x34f60f){return db[_0x679c('0x2f')]['find']({'where':{'id':_0x394855[_0x679c('0x49')]['id']}})['then'](handleEntityNotFound(_0x34f60f,null))[_0x679c('0x25')](removeEntity(_0x34f60f,null))[_0x679c('0x45')](handleError(_0x34f60f,null));};exports[_0x679c('0x4a')]=function(_0x56324f,_0x1b8b12){var _0x353097={'key':_0x56324f[_0x679c('0x48')][_0x679c('0x4b')]};if(_0x56324f[_0x679c('0x48')][_0x679c('0x4c')]){_0x353097['MailAccountId']=_0x56324f[_0x679c('0x48')][_0x679c('0x4c')];}else if(_0x56324f[_0x679c('0x48')][_0x679c('0x4d')]){_0x353097[_0x679c('0x4d')]=_0x56324f[_0x679c('0x48')][_0x679c('0x4d')];}else if(_0x56324f[_0x679c('0x48')]['OpenchannelAccountId']){_0x353097[_0x679c('0x4e')]=_0x56324f[_0x679c('0x48')][_0x679c('0x4e')];}else if(_0x56324f[_0x679c('0x48')]['ChatWebsiteId']){_0x353097[_0x679c('0x4f')]=_0x56324f[_0x679c('0x48')][_0x679c('0x4f')];}return db['CannedAnswer']['find']({'where':_0x353097})[_0x679c('0x25')](function(_0x236501){if(_0x236501){throw new db[(_0x679c('0x50'))][(_0x679c('0x51'))](_0x679c('0x52'));}return db[_0x679c('0x2f')][_0x679c('0x4a')](_0x56324f[_0x679c('0x48')]);})[_0x679c('0x25')](function(_0x16e963){var _0x351b5b=_0x56324f[_0x679c('0x53')][_0x679c('0x54')]({'plain':!![]});if(!_0x351b5b)throw new Error(_0x679c('0x55'));if(_0x351b5b['role']===_0x679c('0x53')){var _0x4d3d4d=_0x16e963[_0x679c('0x54')]({'plain':!![]});return db[_0x679c('0x56')][_0x679c('0x47')]({'where':{'name':_0x679c('0x27'),'userProfileId':_0x351b5b['userProfileId']},'raw':!![]})['then'](function(_0x2501e4){if(_0x2501e4&&_0x2501e4['autoAssociation']===0x0){return db[_0x679c('0x28')][_0x679c('0x4a')]({'name':_0x4d3d4d[_0x679c('0x2c')],'resourceId':_0x4d3d4d['id'],'type':_0x2501e4[_0x679c('0x2c')],'sectionId':_0x2501e4['id']},{})[_0x679c('0x25')](function(){return _0x16e963;});}else{return _0x16e963;}})[_0x679c('0x45')](function(_0x4cd9c5){logger[_0x679c('0x2a')](_0x679c('0x57'),_0x4cd9c5);throw _0x4cd9c5;});}return _0x16e963;})[_0x679c('0x25')](respondWithResult(_0x1b8b12,0xc9))['catch'](handleError(_0x1b8b12,null));};
\ No newline at end of file
+var _0xf5f4=['user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','ejs','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','apply','save','then','destroy','get','CannedAnswers','end','error','stack','name','send','index','map','CannedAnswer','fieldName','type','key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','pick','where','filter','merge','options','includeAll','include','show','params','keys','rawAttributes','find','catch','update','body','MailAccountId','SmsAccountId','OpenchannelAccountId','ChatWebsiteId','Sequelize','ValidationError','The\x20inserted\x20key\x20already\x20exists.','create'];(function(_0x18e3a1,_0xd51faa){var _0x69b4a1=function(_0x2509a8){while(--_0x2509a8){_0x18e3a1['push'](_0x18e3a1['shift']());}};_0x69b4a1(++_0xd51faa);}(_0xf5f4,0xb2));var _0x4f5f=function(_0x1ef09c,_0x3ddecb){_0x1ef09c=_0x1ef09c-0x0;var _0x838ef4=_0xf5f4[_0x1ef09c];return _0x838ef4;};'use strict';var emlformat=require(_0x4f5f('0x0'));var rimraf=require(_0x4f5f('0x1'));var zipdir=require(_0x4f5f('0x2'));var jsonpatch=require(_0x4f5f('0x3'));var rp=require('request-promise');var moment=require(_0x4f5f('0x4'));var BPromise=require(_0x4f5f('0x5'));var Mustache=require(_0x4f5f('0x6'));var util=require(_0x4f5f('0x7'));var path=require(_0x4f5f('0x8'));var sox=require(_0x4f5f('0x9'));var csv=require('to-csv');var ejs=require(_0x4f5f('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x4f5f('0xb'));var squel=require('squel');var crypto=require(_0x4f5f('0xc'));var jsforce=require(_0x4f5f('0xd'));var deskjs=require(_0x4f5f('0xe'));var toCsv=require('to-csv');var querystring=require(_0x4f5f('0xf'));var Papa=require('papaparse');var Redis=require(_0x4f5f('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x4f5f('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x4f5f('0x12'));var utils=require(_0x4f5f('0x13'));var config=require(_0x4f5f('0x14'));var licenseUtil=require(_0x4f5f('0x15'));var db=require(_0x4f5f('0x16'))['db'];function respondWithStatusCode(_0x3f57c8,_0xafe2f1){_0xafe2f1=_0xafe2f1||0xcc;return function(_0x58a33a){if(_0x58a33a){return _0x3f57c8[_0x4f5f('0x17')](_0xafe2f1);}return _0x3f57c8['status'](_0xafe2f1)['end']();};}function respondWithResult(_0x23aa63,_0x461334){_0x461334=_0x461334||0xc8;return function(_0x2f7570){if(_0x2f7570){return _0x23aa63[_0x4f5f('0x18')](_0x461334)[_0x4f5f('0x19')](_0x2f7570);}};}function respondWithFilteredResult(_0x1df0a0,_0x396cad){return function(_0x4bda25){if(_0x4bda25){var _0x20d48f=typeof _0x396cad[_0x4f5f('0x1a')]===_0x4f5f('0x1b')&&typeof _0x396cad[_0x4f5f('0x1c')]===_0x4f5f('0x1b');var _0x423279=_0x4bda25[_0x4f5f('0x1d')];var _0x3defc6=_0x20d48f?0x0:_0x396cad[_0x4f5f('0x1a')];var _0x57e12d=_0x20d48f?_0x4bda25['count']:_0x396cad[_0x4f5f('0x1a')]+_0x396cad[_0x4f5f('0x1c')];var _0x7f5696;if(_0x57e12d>=_0x423279){_0x57e12d=_0x423279;_0x7f5696=0xc8;}else{_0x7f5696=0xce;}_0x1df0a0['status'](_0x7f5696);return _0x1df0a0[_0x4f5f('0x1e')]('Content-Range',_0x3defc6+'-'+_0x57e12d+'/'+_0x423279)[_0x4f5f('0x19')](_0x4bda25);}return null;};}function patchUpdates(_0x142b3c){return function(_0x1e6ceb){try{jsonpatch[_0x4f5f('0x1f')](_0x1e6ceb,_0x142b3c,!![]);}catch(_0x24bf02){return BPromise['reject'](_0x24bf02);}return _0x1e6ceb[_0x4f5f('0x20')]();};}function saveUpdates(_0x2b1d35,_0x49ec15){return function(_0x354895){if(_0x354895){return _0x354895['update'](_0x2b1d35)[_0x4f5f('0x21')](function(_0x451a98){return _0x451a98;});}return null;};}function removeEntity(_0x302938,_0x5f42ac){return function(_0x1e79de){if(_0x1e79de){return _0x1e79de[_0x4f5f('0x22')]()['then'](function(){var _0x4b64d3=_0x1e79de[_0x4f5f('0x23')]({'plain':!![]});var _0x1a2758=_0x4f5f('0x24');return db['UserProfileResource']['destroy']({'where':{'type':_0x1a2758,'resourceId':_0x4b64d3['id']}})[_0x4f5f('0x21')](function(){return _0x1e79de;});})['then'](function(){_0x302938[_0x4f5f('0x18')](0xcc)[_0x4f5f('0x25')]();});}};}function handleEntityNotFound(_0x349da6,_0x11166c){return function(_0x596e79){if(!_0x596e79){_0x349da6[_0x4f5f('0x17')](0x194);}return _0x596e79;};}function handleError(_0x1643fe,_0x3afd6d){_0x3afd6d=_0x3afd6d||0x1f4;return function(_0x5a3c4a){logger[_0x4f5f('0x26')](_0x5a3c4a[_0x4f5f('0x27')]);if(_0x5a3c4a[_0x4f5f('0x28')]){delete _0x5a3c4a['name'];}_0x1643fe['status'](_0x3afd6d)[_0x4f5f('0x29')](_0x5a3c4a);};}exports[_0x4f5f('0x2a')]=function(_0x353cf9,_0x127457){var _0x271cbf={},_0x4f4e15={},_0x353d3a={'count':0x0,'rows':[]};var _0x45abaf=_[_0x4f5f('0x2b')](db[_0x4f5f('0x2c')]['rawAttributes'],function(_0x5c9742){return{'name':_0x5c9742[_0x4f5f('0x2d')],'type':_0x5c9742[_0x4f5f('0x2e')][_0x4f5f('0x2f')]};});_0x4f4e15[_0x4f5f('0x30')]=_['map'](_0x45abaf,'name');_0x4f4e15[_0x4f5f('0x31')]=_['keys'](_0x353cf9[_0x4f5f('0x31')]);_0x4f4e15[_0x4f5f('0x32')]=_[_0x4f5f('0x33')](_0x4f4e15[_0x4f5f('0x30')],_0x4f4e15[_0x4f5f('0x31')]);_0x271cbf['attributes']=_['intersection'](_0x4f4e15[_0x4f5f('0x30')],qs[_0x4f5f('0x34')](_0x353cf9[_0x4f5f('0x31')]['fields']));_0x271cbf[_0x4f5f('0x35')]=_0x271cbf['attributes'][_0x4f5f('0x36')]?_0x271cbf[_0x4f5f('0x35')]:_0x4f4e15[_0x4f5f('0x30')];if(!_0x353cf9[_0x4f5f('0x31')][_0x4f5f('0x37')](_0x4f5f('0x38'))){_0x271cbf['limit']=qs[_0x4f5f('0x1c')](_0x353cf9[_0x4f5f('0x31')][_0x4f5f('0x1c')]);_0x271cbf[_0x4f5f('0x1a')]=qs[_0x4f5f('0x1a')](_0x353cf9[_0x4f5f('0x31')][_0x4f5f('0x1a')]);}_0x271cbf['order']=qs['sort'](_0x353cf9['query']['sort']);_0x271cbf['where']=qs[_0x4f5f('0x32')](_[_0x4f5f('0x39')](_0x353cf9[_0x4f5f('0x31')],_0x4f4e15[_0x4f5f('0x32')]),_0x45abaf);if(_0x353cf9[_0x4f5f('0x31')]['filter']){_0x271cbf[_0x4f5f('0x3a')]=_['merge'](_0x271cbf['where'],{'$or':[{'key':{'$like':'%'+_0x353cf9[_0x4f5f('0x31')][_0x4f5f('0x3b')]+'%'}},{'value':{'$like':'%'+_0x353cf9[_0x4f5f('0x31')][_0x4f5f('0x3b')]+'%'}}]});}_0x271cbf=_[_0x4f5f('0x3c')]({},_0x271cbf,_0x353cf9[_0x4f5f('0x3d')]);var _0x123582={'where':_0x271cbf[_0x4f5f('0x3a')]};return db[_0x4f5f('0x2c')][_0x4f5f('0x1d')](_0x123582)[_0x4f5f('0x21')](function(_0xa63246){_0x353d3a[_0x4f5f('0x1d')]=_0xa63246;if(_0x353cf9[_0x4f5f('0x31')][_0x4f5f('0x3e')]){_0x271cbf[_0x4f5f('0x3f')]=[{'all':!![]}];}return db[_0x4f5f('0x2c')]['findAll'](_0x271cbf);})[_0x4f5f('0x21')](function(_0x2549a6){_0x353d3a['rows']=_0x2549a6;return _0x353d3a;})[_0x4f5f('0x21')](respondWithFilteredResult(_0x127457,_0x271cbf))['catch'](handleError(_0x127457,null));};exports[_0x4f5f('0x40')]=function(_0xbc6b59,_0x3d66ce){var _0x23385a={'raw':!![],'where':{'id':_0xbc6b59[_0x4f5f('0x41')]['id']}},_0x16ae3d={};_0x16ae3d[_0x4f5f('0x30')]=_[_0x4f5f('0x42')](db['CannedAnswer'][_0x4f5f('0x43')]);_0x16ae3d[_0x4f5f('0x31')]=_[_0x4f5f('0x42')](_0xbc6b59[_0x4f5f('0x31')]);_0x16ae3d[_0x4f5f('0x32')]=_[_0x4f5f('0x33')](_0x16ae3d[_0x4f5f('0x30')],_0x16ae3d[_0x4f5f('0x31')]);_0x23385a['attributes']=_[_0x4f5f('0x33')](_0x16ae3d[_0x4f5f('0x30')],qs[_0x4f5f('0x34')](_0xbc6b59[_0x4f5f('0x31')][_0x4f5f('0x34')]));_0x23385a[_0x4f5f('0x35')]=_0x23385a['attributes'][_0x4f5f('0x36')]?_0x23385a['attributes']:_0x16ae3d['model'];if(_0xbc6b59[_0x4f5f('0x31')][_0x4f5f('0x3e')]){_0x23385a[_0x4f5f('0x3f')]=[{'all':!![]}];}_0x23385a=_['merge']({},_0x23385a,_0xbc6b59['options']);return db['CannedAnswer'][_0x4f5f('0x44')](_0x23385a)[_0x4f5f('0x21')](handleEntityNotFound(_0x3d66ce,null))[_0x4f5f('0x21')](respondWithResult(_0x3d66ce,null))[_0x4f5f('0x45')](handleError(_0x3d66ce,null));};exports[_0x4f5f('0x46')]=function(_0x1a729f,_0x2bfa3d){if(_0x1a729f[_0x4f5f('0x47')]['id']){delete _0x1a729f[_0x4f5f('0x47')]['id'];}return db[_0x4f5f('0x2c')][_0x4f5f('0x44')]({'where':{'id':_0x1a729f[_0x4f5f('0x41')]['id']}})[_0x4f5f('0x21')](handleEntityNotFound(_0x2bfa3d,null))['then'](saveUpdates(_0x1a729f['body'],null))['then'](respondWithResult(_0x2bfa3d,null))['catch'](handleError(_0x2bfa3d,null));};exports[_0x4f5f('0x22')]=function(_0x14e2a3,_0x166fc6){return db['CannedAnswer'][_0x4f5f('0x44')]({'where':{'id':_0x14e2a3['params']['id']}})[_0x4f5f('0x21')](handleEntityNotFound(_0x166fc6,null))[_0x4f5f('0x21')](removeEntity(_0x166fc6,null))[_0x4f5f('0x45')](handleError(_0x166fc6,null));};exports['create']=function(_0x1d5d62,_0x1662f2){var _0x3d84eb={'key':_0x1d5d62['body'][_0x4f5f('0x2f')]};if(_0x1d5d62[_0x4f5f('0x47')]['MailAccountId']){_0x3d84eb['MailAccountId']=_0x1d5d62[_0x4f5f('0x47')][_0x4f5f('0x48')];}else if(_0x1d5d62[_0x4f5f('0x47')][_0x4f5f('0x49')]){_0x3d84eb['SmsAccountId']=_0x1d5d62['body']['SmsAccountId'];}else if(_0x1d5d62['body'][_0x4f5f('0x4a')]){_0x3d84eb[_0x4f5f('0x4a')]=_0x1d5d62[_0x4f5f('0x47')][_0x4f5f('0x4a')];}else if(_0x1d5d62[_0x4f5f('0x47')][_0x4f5f('0x4b')]){_0x3d84eb[_0x4f5f('0x4b')]=_0x1d5d62[_0x4f5f('0x47')][_0x4f5f('0x4b')];}return db[_0x4f5f('0x2c')][_0x4f5f('0x44')]({'where':_0x3d84eb})['then'](function(_0x32cc3b){if(_0x32cc3b){throw new db[(_0x4f5f('0x4c'))][(_0x4f5f('0x4d'))](_0x4f5f('0x4e'));}return db[_0x4f5f('0x2c')][_0x4f5f('0x4f')](_0x1d5d62[_0x4f5f('0x47')]);})[_0x4f5f('0x21')](function(_0x122811){var _0x2d8d1d=_0x1d5d62[_0x4f5f('0x50')][_0x4f5f('0x23')]({'plain':!![]});if(!_0x2d8d1d)throw new Error(_0x4f5f('0x51'));if(_0x2d8d1d[_0x4f5f('0x52')]===_0x4f5f('0x50')){var _0x5d0bc2=_0x122811[_0x4f5f('0x23')]({'plain':!![]});return db[_0x4f5f('0x53')]['find']({'where':{'name':_0x4f5f('0x24'),'userProfileId':_0x2d8d1d['userProfileId']},'raw':!![]})[_0x4f5f('0x21')](function(_0x35a7de){if(_0x35a7de&&_0x35a7de[_0x4f5f('0x54')]===0x0){return db['UserProfileResource'][_0x4f5f('0x4f')]({'name':_0x5d0bc2[_0x4f5f('0x28')],'resourceId':_0x5d0bc2['id'],'type':_0x35a7de[_0x4f5f('0x28')],'sectionId':_0x35a7de['id']},{})['then'](function(){return _0x122811;});}else{return _0x122811;}})[_0x4f5f('0x45')](function(_0x4b437a){logger[_0x4f5f('0x26')](_0x4f5f('0x55'),_0x4b437a);throw _0x4b437a;});}return _0x122811;})[_0x4f5f('0x21')](respondWithResult(_0x1662f2,0xc9))[_0x4f5f('0x45')](handleError(_0x1662f2,null));};
\ No newline at end of file
index f744545..738b93c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbefe=['util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./cannedAnswer.attributes','define','tools_canned_answers','utf8mb4'];(function(_0x3d8088,_0x59af8b){var _0x1705a6=function(_0x44ef7b){while(--_0x44ef7b){_0x3d8088['push'](_0x3d8088['shift']());}};_0x1705a6(++_0x59af8b);}(_0xbefe,0x168));var _0xebef=function(_0x166b97,_0x2833d5){_0x166b97=_0x166b97-0x0;var _0x4d3c9a=_0xbefe[_0x166b97];return _0x4d3c9a;};'use strict';var _=require('lodash');var util=require(_0xebef('0x0'));var logger=require('../../config/logger')(_0xebef('0x1'));var moment=require(_0xebef('0x2'));var BPromise=require(_0xebef('0x3'));var rp=require(_0xebef('0x4'));var fs=require('fs');var path=require(_0xebef('0x5'));var rimraf=require(_0xebef('0x6'));var config=require(_0xebef('0x7'));var attributes=require(_0xebef('0x8'));module['exports']=function(_0x3fe404,_0x39de80){return _0x3fe404[_0xebef('0x9')]('CannedAnswer',attributes,{'tableName':_0xebef('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xebef('0xb'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0xaef4=['util','../../config/logger','moment','bluebird','request-promise','path','../../config/environment','./cannedAnswer.attributes','define','CannedAnswer','tools_canned_answers','utf8mb4','utf8mb4_unicode_ci','lodash'];(function(_0x5c351c,_0x2046d8){var _0x26f3b3=function(_0x47ac18){while(--_0x47ac18){_0x5c351c['push'](_0x5c351c['shift']());}};_0x26f3b3(++_0x2046d8);}(_0xaef4,0xfb));var _0x4aef=function(_0x449882,_0x501eda){_0x449882=_0x449882-0x0;var _0x446149=_0xaef4[_0x449882];return _0x446149;};'use strict';var _=require(_0x4aef('0x0'));var util=require(_0x4aef('0x1'));var logger=require(_0x4aef('0x2'))('api');var moment=require(_0x4aef('0x3'));var BPromise=require(_0x4aef('0x4'));var rp=require(_0x4aef('0x5'));var fs=require('fs');var path=require(_0x4aef('0x6'));var rimraf=require('rimraf');var config=require(_0x4aef('0x7'));var attributes=require(_0x4aef('0x8'));module['exports']=function(_0x9e0364,_0x4f63de){return _0x9e0364[_0x4aef('0x9')](_0x4aef('0xa'),attributes,{'tableName':_0x4aef('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x4aef('0xc'),'collate':_0x4aef('0xd')});};
\ No newline at end of file
index 6950705..1e435b1 100644 (file)
@@ -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(_0x3b1821,_0x5e44c9){var _0x655316=function(_0x367a6d){while(--_0x367a6d){_0x3b1821['push'](_0x3b1821['shift']());}};_0x655316(++_0x5e44c9);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5b78e8,_0x55096b){_0x5b78e8=_0x5b78e8-0x0;var _0xf2c321=_0xa9e0[_0x5b78e8];return _0xf2c321;};'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(_0x26e7ca,_0x480535){var _0xa1fe3d=function(_0xf9530c){while(--_0xf9530c){_0x26e7ca['push'](_0x26e7ca['shift']());}};_0xa1fe3d(++_0x480535);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3c2a69,_0x4c8b41){_0x3c2a69=_0x3c2a69-0x0;var _0x596bc8=_0xa9e0[_0x3c2a69];return _0x596bc8;};'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
index 09a5497..27e051c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9242=['/:id','show','post','create','put','update','delete','exports','multer','util','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./cannedAnswer.controller','isAuthenticated','index','get'];(function(_0x48f80a,_0x3bb5d4){var _0x1327fb=function(_0x46293e){while(--_0x46293e){_0x48f80a['push'](_0x48f80a['shift']());}};_0x1327fb(++_0x3bb5d4);}(_0x9242,0x1d0));var _0x2924=function(_0x4b7b69,_0x3ab075){_0x4b7b69=_0x4b7b69-0x0;var _0x173b4c=_0x9242[_0x4b7b69];return _0x173b4c;};'use strict';var multer=require(_0x2924('0x0'));var util=require(_0x2924('0x1'));var path=require(_0x2924('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x2924('0x3')]();var fs_extra=require(_0x2924('0x4'));var auth=require(_0x2924('0x5'));var interaction=require(_0x2924('0x6'));var config=require('../../config/environment');var controller=require(_0x2924('0x7'));router['get']('/',auth[_0x2924('0x8')](),controller[_0x2924('0x9')]);router[_0x2924('0xa')](_0x2924('0xb'),auth[_0x2924('0x8')](),controller[_0x2924('0xc')]);router[_0x2924('0xd')]('/',auth[_0x2924('0x8')](),controller[_0x2924('0xe')]);router[_0x2924('0xf')](_0x2924('0xb'),auth['isAuthenticated'](),controller[_0x2924('0x10')]);router[_0x2924('0x11')](_0x2924('0xb'),auth[_0x2924('0x8')](),controller['destroy']);module[_0x2924('0x12')]=router;
\ No newline at end of file
+var _0xde80=['destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cannedAnswer.controller','isAuthenticated','index','/:id','show','create','update','delete'];(function(_0x5ba5e3,_0x5dd00d){var _0x293e9a=function(_0x44b40b){while(--_0x44b40b){_0x5ba5e3['push'](_0x5ba5e3['shift']());}};_0x293e9a(++_0x5dd00d);}(_0xde80,0x1ca));var _0x0de8=function(_0x8f6fa5,_0x320980){_0x8f6fa5=_0x8f6fa5-0x0;var _0x2e1201=_0xde80[_0x8f6fa5];return _0x2e1201;};'use strict';var multer=require(_0x0de8('0x0'));var util=require(_0x0de8('0x1'));var path=require(_0x0de8('0x2'));var timeout=require(_0x0de8('0x3'));var express=require('express');var router=express[_0x0de8('0x4')]();var fs_extra=require(_0x0de8('0x5'));var auth=require(_0x0de8('0x6'));var interaction=require(_0x0de8('0x7'));var config=require(_0x0de8('0x8'));var controller=require(_0x0de8('0x9'));router['get']('/',auth[_0x0de8('0xa')](),controller[_0x0de8('0xb')]);router['get'](_0x0de8('0xc'),auth['isAuthenticated'](),controller[_0x0de8('0xd')]);router['post']('/',auth[_0x0de8('0xa')](),controller[_0x0de8('0xe')]);router['put'](_0x0de8('0xc'),auth[_0x0de8('0xa')](),controller[_0x0de8('0xf')]);router[_0x0de8('0x10')]('/:id',auth[_0x0de8('0xa')](),controller[_0x0de8('0x11')]);module[_0x0de8('0x12')]=router;
\ No newline at end of file
index 29663d5..b69af11 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xec81=['INTEGER','exports','1970-01-01\x2000:00:01','STRING'];(function(_0x5f42f1,_0x956be5){var _0x5534ee=function(_0x532333){while(--_0x532333){_0x5f42f1['push'](_0x5f42f1['shift']());}};_0x5534ee(++_0x956be5);}(_0xec81,0x71));var _0x1ec8=function(_0x36d45b,_0x417426){_0x36d45b=_0x36d45b-0x0;var _0x3dc01c=_0xec81[_0x36d45b];return _0x3dc01c;};'use strict';var Sequelize=require('sequelize');module[_0x1ec8('0x0')]={'calldate':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':_0x1ec8('0x1')},'clid':{'type':Sequelize['STRING']},'src':{'type':Sequelize[_0x1ec8('0x2')]},'dst':{'type':Sequelize[_0x1ec8('0x2')]},'dcontext':{'type':Sequelize[_0x1ec8('0x2')]},'channel':{'type':Sequelize[_0x1ec8('0x2')]},'dstchannel':{'type':Sequelize[_0x1ec8('0x2')]},'lastapp':{'type':Sequelize[_0x1ec8('0x2')]},'lastdata':{'type':Sequelize[_0x1ec8('0x2')]},'duration':{'type':Sequelize[_0x1ec8('0x3')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize[_0x1ec8('0x2')]},'amaflags':{'type':Sequelize[_0x1ec8('0x3')],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize['STRING']},'userfield':{'type':Sequelize[_0x1ec8('0x2')]},'uniqueid':{'type':Sequelize[_0x1ec8('0x2')]},'linkedid':{'type':Sequelize['STRING']},'sequence':{'type':Sequelize[_0x1ec8('0x2')]},'peeraccount':{'type':Sequelize[_0x1ec8('0x2')]},'type':{'type':Sequelize[_0x1ec8('0x2')]},'tag':{'type':Sequelize[_0x1ec8('0x2')]}};
\ No newline at end of file
+var _0x66f4=['INTEGER','exports','STRING'];(function(_0x27c192,_0x2a13c2){var _0x6e788d=function(_0x19ca31){while(--_0x19ca31){_0x27c192['push'](_0x27c192['shift']());}};_0x6e788d(++_0x2a13c2);}(_0x66f4,0x7f));var _0x466f=function(_0xb90630,_0xbaa470){_0xb90630=_0xb90630-0x0;var _0x296c55=_0x66f4[_0xb90630];return _0x296c55;};'use strict';var Sequelize=require('sequelize');module[_0x466f('0x0')]={'calldate':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':'1970-01-01\x2000:00:01'},'clid':{'type':Sequelize[_0x466f('0x1')]},'src':{'type':Sequelize[_0x466f('0x1')]},'dst':{'type':Sequelize[_0x466f('0x1')]},'dcontext':{'type':Sequelize['STRING']},'channel':{'type':Sequelize['STRING']},'dstchannel':{'type':Sequelize[_0x466f('0x1')]},'lastapp':{'type':Sequelize['STRING']},'lastdata':{'type':Sequelize['STRING']},'duration':{'type':Sequelize[_0x466f('0x2')],'allowNull':![],'defaultValue':0x0},'billsec':{'type':Sequelize[_0x466f('0x2')],'allowNull':![],'defaultValue':0x0},'disposition':{'type':Sequelize[_0x466f('0x1')]},'amaflags':{'type':Sequelize[_0x466f('0x2')],'allowNull':![],'defaultValue':0x0},'accountcode':{'type':Sequelize['STRING']},'userfield':{'type':Sequelize[_0x466f('0x1')]},'uniqueid':{'type':Sequelize[_0x466f('0x1')]},'linkedid':{'type':Sequelize['STRING']},'sequence':{'type':Sequelize['STRING']},'peeraccount':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x466f('0x1')]},'tag':{'type':Sequelize[_0x466f('0x1')]}};
\ No newline at end of file
index 9184faa..63b08b2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9206=['crypto','jsforce','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','end','status','offset','undefined','limit','count','set','Content-Range','json','apply','reject','save','update','then','error','stack','name','send','index','Cdr','fieldName','key','model','map','keys','intersection','query','attributes','fields','hasOwnProperty','nolimit','sort','where','filters','filter','merge','type','VIRTUAL','options','findAll','catch','show','params','length','includeAll','include','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','util','path','ejs','lodash','squel'];(function(_0x51684f,_0x4f2d0d){var _0x3480ff=function(_0x58dda5){while(--_0x58dda5){_0x51684f['push'](_0x51684f['shift']());}};_0x3480ff(++_0x4f2d0d);}(_0x9206,0x176));var _0x6920=function(_0x1b2bad,_0x390b93){_0x1b2bad=_0x1b2bad-0x0;var _0x1c83ed=_0x9206[_0x1b2bad];return _0x1c83ed;};'use strict';var emlformat=require(_0x6920('0x0'));var rimraf=require(_0x6920('0x1'));var zipdir=require(_0x6920('0x2'));var jsonpatch=require(_0x6920('0x3'));var rp=require(_0x6920('0x4'));var moment=require(_0x6920('0x5'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x6920('0x6'));var path=require(_0x6920('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x6920('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x6920('0x9'));var squel=require(_0x6920('0xa'));var crypto=require(_0x6920('0xb'));var jsforce=require(_0x6920('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x6920('0xd'));var Papa=require(_0x6920('0xe'));var Redis=require(_0x6920('0xf'));var authService=require(_0x6920('0x10'));var qs=require(_0x6920('0x11'));var as=require(_0x6920('0x12'));var hardwareService=require(_0x6920('0x13'));var logger=require(_0x6920('0x14'))(_0x6920('0x15'));var utils=require(_0x6920('0x16'));var config=require(_0x6920('0x17'));var licenseUtil=require(_0x6920('0x18'));var db=require(_0x6920('0x19'))['db'];function respondWithStatusCode(_0x5ad438,_0x4f8430){_0x4f8430=_0x4f8430||0xcc;return function(_0x31730c){if(_0x31730c){return _0x5ad438[_0x6920('0x1a')](_0x4f8430);}return _0x5ad438['status'](_0x4f8430)[_0x6920('0x1b')]();};}function respondWithResult(_0xfa2823,_0x18140a){_0x18140a=_0x18140a||0xc8;return function(_0x2c3a35){if(_0x2c3a35){return _0xfa2823[_0x6920('0x1c')](_0x18140a)['json'](_0x2c3a35);}};}function respondWithFilteredResult(_0x338e5f,_0x20cdfb){return function(_0x15d8af){if(_0x15d8af){var _0xa64034=typeof _0x20cdfb[_0x6920('0x1d')]===_0x6920('0x1e')&&typeof _0x20cdfb[_0x6920('0x1f')]===_0x6920('0x1e');var _0x11ce91=_0x15d8af[_0x6920('0x20')];var _0x462500=_0xa64034?0x0:_0x20cdfb[_0x6920('0x1d')];var _0xc6e86b=_0xa64034?_0x15d8af[_0x6920('0x20')]:_0x20cdfb[_0x6920('0x1d')]+_0x20cdfb['limit'];var _0x3a0c0c;if(_0xc6e86b>=_0x11ce91){_0xc6e86b=_0x11ce91;_0x3a0c0c=0xc8;}else{_0x3a0c0c=0xce;}_0x338e5f[_0x6920('0x1c')](_0x3a0c0c);return _0x338e5f[_0x6920('0x21')](_0x6920('0x22'),_0x462500+'-'+_0xc6e86b+'/'+_0x11ce91)[_0x6920('0x23')](_0x15d8af);}return null;};}function patchUpdates(_0x16cb96){return function(_0x2cce0b){try{jsonpatch[_0x6920('0x24')](_0x2cce0b,_0x16cb96,!![]);}catch(_0xaf93ba){return BPromise[_0x6920('0x25')](_0xaf93ba);}return _0x2cce0b[_0x6920('0x26')]();};}function saveUpdates(_0x39013e,_0x1df372){return function(_0x2dd788){if(_0x2dd788){return _0x2dd788[_0x6920('0x27')](_0x39013e)[_0x6920('0x28')](function(_0x1ae686){return _0x1ae686;});}return null;};}function removeEntity(_0x3a6e48,_0xa8f55){return function(_0x258986){if(_0x258986){return _0x258986['destroy']()[_0x6920('0x28')](function(){_0x3a6e48['status'](0xcc)[_0x6920('0x1b')]();});}};}function handleEntityNotFound(_0x4dd08b,_0x72316a){return function(_0x32a6ae){if(!_0x32a6ae){_0x4dd08b[_0x6920('0x1a')](0x194);}return _0x32a6ae;};}function handleError(_0xd069c,_0x5868e1){_0x5868e1=_0x5868e1||0x1f4;return function(_0x1cab00){logger[_0x6920('0x29')](_0x1cab00[_0x6920('0x2a')]);if(_0x1cab00[_0x6920('0x2b')]){delete _0x1cab00[_0x6920('0x2b')];}_0xd069c[_0x6920('0x1c')](_0x5868e1)[_0x6920('0x2c')](_0x1cab00);};}exports[_0x6920('0x2d')]=function(_0x400894,_0x2f5ce8){var _0x6860c7={},_0x2b2cd9={},_0x548fbc={'count':0x0,'rows':[]};var _0x182f1b=_['map'](db[_0x6920('0x2e')]['rawAttributes'],function(_0x31aa90){return{'name':_0x31aa90[_0x6920('0x2f')],'type':_0x31aa90['type'][_0x6920('0x30')]};});_0x2b2cd9[_0x6920('0x31')]=_[_0x6920('0x32')](_0x182f1b,'name');_0x2b2cd9['query']=_[_0x6920('0x33')](_0x400894['query']);_0x2b2cd9['filters']=_[_0x6920('0x34')](_0x2b2cd9[_0x6920('0x31')],_0x2b2cd9[_0x6920('0x35')]);_0x6860c7[_0x6920('0x36')]=_[_0x6920('0x34')](_0x2b2cd9[_0x6920('0x31')],qs[_0x6920('0x37')](_0x400894['query'][_0x6920('0x37')]));_0x6860c7['attributes']=_0x6860c7[_0x6920('0x36')]['length']?_0x6860c7['attributes']:_0x2b2cd9[_0x6920('0x31')];if(!_0x400894[_0x6920('0x35')][_0x6920('0x38')](_0x6920('0x39'))){_0x6860c7[_0x6920('0x1f')]=qs[_0x6920('0x1f')](_0x400894[_0x6920('0x35')][_0x6920('0x1f')]);_0x6860c7[_0x6920('0x1d')]=qs[_0x6920('0x1d')](_0x400894[_0x6920('0x35')][_0x6920('0x1d')]);}_0x6860c7['order']=qs[_0x6920('0x3a')](_0x400894['query'][_0x6920('0x3a')]);_0x6860c7[_0x6920('0x3b')]=qs[_0x6920('0x3c')](_['pick'](_0x400894[_0x6920('0x35')],_0x2b2cd9[_0x6920('0x3c')]),_0x182f1b);if(_0x400894[_0x6920('0x35')][_0x6920('0x3d')]){_0x6860c7['where']=_[_0x6920('0x3e')](_0x6860c7[_0x6920('0x3b')],{'$or':_['map'](_0x182f1b,function(_0x49be52){if(_0x49be52[_0x6920('0x3f')]!==_0x6920('0x40')){var _0x56ca8f={};_0x56ca8f[_0x49be52[_0x6920('0x2b')]]={'$like':'%'+_0x400894[_0x6920('0x35')]['filter']+'%'};return _0x56ca8f;}})});}_0x6860c7=_['merge']({},_0x6860c7,_0x400894[_0x6920('0x41')]);var _0x1f0c5f={'where':_0x6860c7[_0x6920('0x3b')]};return db[_0x6920('0x2e')][_0x6920('0x20')](_0x1f0c5f)['then'](function(_0x58f0e8){_0x548fbc['count']=_0x58f0e8;if(_0x400894[_0x6920('0x35')]['includeAll']){_0x6860c7['include']=[{'all':!![]}];}return db[_0x6920('0x2e')][_0x6920('0x42')](_0x6860c7);})['then'](function(_0x3aad11){_0x548fbc['rows']=_0x3aad11;return _0x548fbc;})[_0x6920('0x28')](respondWithFilteredResult(_0x2f5ce8,_0x6860c7))[_0x6920('0x43')](handleError(_0x2f5ce8,null));};exports[_0x6920('0x44')]=function(_0x1b3ebb,_0x3a994d){var _0x55d7b5={'raw':!![],'where':{'id':_0x1b3ebb[_0x6920('0x45')]['id']}},_0x4dfa0c={};_0x4dfa0c['model']=_['keys'](db['Cdr']['rawAttributes']);_0x4dfa0c[_0x6920('0x35')]=_[_0x6920('0x33')](_0x1b3ebb[_0x6920('0x35')]);_0x4dfa0c['filters']=_[_0x6920('0x34')](_0x4dfa0c[_0x6920('0x31')],_0x4dfa0c[_0x6920('0x35')]);_0x55d7b5[_0x6920('0x36')]=_[_0x6920('0x34')](_0x4dfa0c[_0x6920('0x31')],qs['fields'](_0x1b3ebb[_0x6920('0x35')][_0x6920('0x37')]));_0x55d7b5[_0x6920('0x36')]=_0x55d7b5[_0x6920('0x36')][_0x6920('0x46')]?_0x55d7b5[_0x6920('0x36')]:_0x4dfa0c[_0x6920('0x31')];if(_0x1b3ebb[_0x6920('0x35')][_0x6920('0x47')]){_0x55d7b5[_0x6920('0x48')]=[{'all':!![]}];}_0x55d7b5=_[_0x6920('0x3e')]({},_0x55d7b5,_0x1b3ebb[_0x6920('0x41')]);return db['Cdr'][_0x6920('0x49')](_0x55d7b5)[_0x6920('0x28')](handleEntityNotFound(_0x3a994d,null))['then'](respondWithResult(_0x3a994d,null))['catch'](handleError(_0x3a994d,null));};exports[_0x6920('0x4a')]=function(_0x3c231e,_0x20fab4){return db[_0x6920('0x2e')][_0x6920('0x4a')](_0x3c231e['body'],{})[_0x6920('0x28')](respondWithResult(_0x20fab4,0xc9))[_0x6920('0x43')](handleError(_0x20fab4,null));};exports[_0x6920('0x27')]=function(_0x51b12d,_0x4d1c79){if(_0x51b12d[_0x6920('0x4b')]['id']){delete _0x51b12d[_0x6920('0x4b')]['id'];}return db[_0x6920('0x2e')][_0x6920('0x49')]({'where':{'id':_0x51b12d['params']['id']}})[_0x6920('0x28')](handleEntityNotFound(_0x4d1c79,null))[_0x6920('0x28')](saveUpdates(_0x51b12d[_0x6920('0x4b')],null))[_0x6920('0x28')](respondWithResult(_0x4d1c79,null))[_0x6920('0x43')](handleError(_0x4d1c79,null));};exports['destroy']=function(_0x1c0dd9,_0x3fe81d){return db[_0x6920('0x2e')][_0x6920('0x49')]({'where':{'id':_0x1c0dd9[_0x6920('0x45')]['id']}})[_0x6920('0x28')](handleEntityNotFound(_0x3fe81d,null))[_0x6920('0x28')](removeEntity(_0x3fe81d,null))[_0x6920('0x43')](handleError(_0x3fe81d,null));};exports[_0x6920('0x4c')]=function(_0x1c6bba,_0x492a02){return db[_0x6920('0x2e')][_0x6920('0x4c')]()[_0x6920('0x28')](respondWithResult(_0x492a02,null))[_0x6920('0x43')](handleError(_0x492a02,null));};
\ No newline at end of file
+var _0x3fa4=['model','query','keys','filters','attributes','fields','nolimit','order','sort','where','pick','filter','merge','options','includeAll','include','catch','intersection','length','find','create','body','params','describe','eml-format','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','offset','undefined','limit','count','set','Content-Range','apply','reject','update','then','error','stack','name','send','index','map','Cdr','rawAttributes','fieldName','type','key'];(function(_0x2204dd,_0x185cc1){var _0x2911a0=function(_0xf6de05){while(--_0xf6de05){_0x2204dd['push'](_0x2204dd['shift']());}};_0x2911a0(++_0x185cc1);}(_0x3fa4,0xf0));var _0x43fa=function(_0x659961,_0x258530){_0x659961=_0x659961-0x0;var _0xa0f7f7=_0x3fa4[_0x659961];return _0xa0f7f7;};'use strict';var emlformat=require(_0x43fa('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x43fa('0x1'));var moment=require(_0x43fa('0x2'));var BPromise=require(_0x43fa('0x3'));var Mustache=require(_0x43fa('0x4'));var util=require(_0x43fa('0x5'));var path=require(_0x43fa('0x6'));var sox=require(_0x43fa('0x7'));var csv=require('to-csv');var ejs=require(_0x43fa('0x8'));var fs=require('fs');var fs_extra=require(_0x43fa('0x9'));var _=require(_0x43fa('0xa'));var squel=require('squel');var crypto=require(_0x43fa('0xb'));var jsforce=require(_0x43fa('0xc'));var deskjs=require(_0x43fa('0xd'));var toCsv=require('to-csv');var querystring=require(_0x43fa('0xe'));var Papa=require(_0x43fa('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x43fa('0x10'));var as=require(_0x43fa('0x11'));var hardwareService=require(_0x43fa('0x12'));var logger=require(_0x43fa('0x13'))(_0x43fa('0x14'));var utils=require('../../config/utils');var config=require(_0x43fa('0x15'));var licenseUtil=require(_0x43fa('0x16'));var db=require(_0x43fa('0x17'))['db'];function respondWithStatusCode(_0x582ec2,_0xfbf89e){_0xfbf89e=_0xfbf89e||0xcc;return function(_0x4353c1){if(_0x4353c1){return _0x582ec2[_0x43fa('0x18')](_0xfbf89e);}return _0x582ec2['status'](_0xfbf89e)[_0x43fa('0x19')]();};}function respondWithResult(_0x4bb4b0,_0x5bc292){_0x5bc292=_0x5bc292||0xc8;return function(_0x4fba54){if(_0x4fba54){return _0x4bb4b0[_0x43fa('0x1a')](_0x5bc292)['json'](_0x4fba54);}};}function respondWithFilteredResult(_0x1a898a,_0x12ae9e){return function(_0x4a07b5){if(_0x4a07b5){var _0x27b87f=typeof _0x12ae9e[_0x43fa('0x1b')]===_0x43fa('0x1c')&&typeof _0x12ae9e[_0x43fa('0x1d')]===_0x43fa('0x1c');var _0x53c04c=_0x4a07b5['count'];var _0x479d81=_0x27b87f?0x0:_0x12ae9e[_0x43fa('0x1b')];var _0x29b8aa=_0x27b87f?_0x4a07b5[_0x43fa('0x1e')]:_0x12ae9e[_0x43fa('0x1b')]+_0x12ae9e[_0x43fa('0x1d')];var _0x15e594;if(_0x29b8aa>=_0x53c04c){_0x29b8aa=_0x53c04c;_0x15e594=0xc8;}else{_0x15e594=0xce;}_0x1a898a[_0x43fa('0x1a')](_0x15e594);return _0x1a898a[_0x43fa('0x1f')](_0x43fa('0x20'),_0x479d81+'-'+_0x29b8aa+'/'+_0x53c04c)['json'](_0x4a07b5);}return null;};}function patchUpdates(_0xfd8d3){return function(_0x551528){try{jsonpatch[_0x43fa('0x21')](_0x551528,_0xfd8d3,!![]);}catch(_0x319cfd){return BPromise[_0x43fa('0x22')](_0x319cfd);}return _0x551528['save']();};}function saveUpdates(_0x2c6075,_0x3c78fb){return function(_0x2db3dd){if(_0x2db3dd){return _0x2db3dd[_0x43fa('0x23')](_0x2c6075)[_0x43fa('0x24')](function(_0x1d3328){return _0x1d3328;});}return null;};}function removeEntity(_0x3b8cb9,_0x241948){return function(_0x427426){if(_0x427426){return _0x427426['destroy']()['then'](function(){_0x3b8cb9[_0x43fa('0x1a')](0xcc)[_0x43fa('0x19')]();});}};}function handleEntityNotFound(_0x28f695,_0x78f105){return function(_0x40969a){if(!_0x40969a){_0x28f695[_0x43fa('0x18')](0x194);}return _0x40969a;};}function handleError(_0x5014fb,_0x4f6101){_0x4f6101=_0x4f6101||0x1f4;return function(_0x1fa077){logger[_0x43fa('0x25')](_0x1fa077[_0x43fa('0x26')]);if(_0x1fa077[_0x43fa('0x27')]){delete _0x1fa077['name'];}_0x5014fb[_0x43fa('0x1a')](_0x4f6101)[_0x43fa('0x28')](_0x1fa077);};}exports[_0x43fa('0x29')]=function(_0x186249,_0x4d6c8c){var _0x3d5abd={},_0x44fdef={},_0x398c44={'count':0x0,'rows':[]};var _0x28b833=_[_0x43fa('0x2a')](db[_0x43fa('0x2b')][_0x43fa('0x2c')],function(_0x41a3cf){return{'name':_0x41a3cf[_0x43fa('0x2d')],'type':_0x41a3cf[_0x43fa('0x2e')][_0x43fa('0x2f')]};});_0x44fdef[_0x43fa('0x30')]=_['map'](_0x28b833,'name');_0x44fdef[_0x43fa('0x31')]=_[_0x43fa('0x32')](_0x186249[_0x43fa('0x31')]);_0x44fdef[_0x43fa('0x33')]=_['intersection'](_0x44fdef[_0x43fa('0x30')],_0x44fdef[_0x43fa('0x31')]);_0x3d5abd[_0x43fa('0x34')]=_['intersection'](_0x44fdef[_0x43fa('0x30')],qs[_0x43fa('0x35')](_0x186249[_0x43fa('0x31')][_0x43fa('0x35')]));_0x3d5abd['attributes']=_0x3d5abd[_0x43fa('0x34')]['length']?_0x3d5abd[_0x43fa('0x34')]:_0x44fdef[_0x43fa('0x30')];if(!_0x186249[_0x43fa('0x31')]['hasOwnProperty'](_0x43fa('0x36'))){_0x3d5abd['limit']=qs['limit'](_0x186249[_0x43fa('0x31')][_0x43fa('0x1d')]);_0x3d5abd[_0x43fa('0x1b')]=qs['offset'](_0x186249[_0x43fa('0x31')][_0x43fa('0x1b')]);}_0x3d5abd[_0x43fa('0x37')]=qs[_0x43fa('0x38')](_0x186249[_0x43fa('0x31')]['sort']);_0x3d5abd[_0x43fa('0x39')]=qs[_0x43fa('0x33')](_[_0x43fa('0x3a')](_0x186249[_0x43fa('0x31')],_0x44fdef['filters']),_0x28b833);if(_0x186249['query'][_0x43fa('0x3b')]){_0x3d5abd[_0x43fa('0x39')]=_[_0x43fa('0x3c')](_0x3d5abd[_0x43fa('0x39')],{'$or':_[_0x43fa('0x2a')](_0x28b833,function(_0x595d49){if(_0x595d49[_0x43fa('0x2e')]!=='VIRTUAL'){var _0x4cb1bd={};_0x4cb1bd[_0x595d49[_0x43fa('0x27')]]={'$like':'%'+_0x186249['query'][_0x43fa('0x3b')]+'%'};return _0x4cb1bd;}})});}_0x3d5abd=_[_0x43fa('0x3c')]({},_0x3d5abd,_0x186249[_0x43fa('0x3d')]);var _0x17403c={'where':_0x3d5abd['where']};return db['Cdr']['count'](_0x17403c)[_0x43fa('0x24')](function(_0x15ef49){_0x398c44['count']=_0x15ef49;if(_0x186249[_0x43fa('0x31')][_0x43fa('0x3e')]){_0x3d5abd[_0x43fa('0x3f')]=[{'all':!![]}];}return db[_0x43fa('0x2b')]['findAll'](_0x3d5abd);})[_0x43fa('0x24')](function(_0x23e156){_0x398c44['rows']=_0x23e156;return _0x398c44;})['then'](respondWithFilteredResult(_0x4d6c8c,_0x3d5abd))[_0x43fa('0x40')](handleError(_0x4d6c8c,null));};exports['show']=function(_0x3a6d39,_0x137ef){var _0x5cef1e={'raw':!![],'where':{'id':_0x3a6d39['params']['id']}},_0x4735d1={};_0x4735d1[_0x43fa('0x30')]=_[_0x43fa('0x32')](db[_0x43fa('0x2b')]['rawAttributes']);_0x4735d1[_0x43fa('0x31')]=_[_0x43fa('0x32')](_0x3a6d39[_0x43fa('0x31')]);_0x4735d1[_0x43fa('0x33')]=_[_0x43fa('0x41')](_0x4735d1[_0x43fa('0x30')],_0x4735d1['query']);_0x5cef1e[_0x43fa('0x34')]=_['intersection'](_0x4735d1[_0x43fa('0x30')],qs['fields'](_0x3a6d39[_0x43fa('0x31')][_0x43fa('0x35')]));_0x5cef1e[_0x43fa('0x34')]=_0x5cef1e[_0x43fa('0x34')][_0x43fa('0x42')]?_0x5cef1e['attributes']:_0x4735d1[_0x43fa('0x30')];if(_0x3a6d39['query']['includeAll']){_0x5cef1e['include']=[{'all':!![]}];}_0x5cef1e=_[_0x43fa('0x3c')]({},_0x5cef1e,_0x3a6d39[_0x43fa('0x3d')]);return db[_0x43fa('0x2b')][_0x43fa('0x43')](_0x5cef1e)[_0x43fa('0x24')](handleEntityNotFound(_0x137ef,null))['then'](respondWithResult(_0x137ef,null))[_0x43fa('0x40')](handleError(_0x137ef,null));};exports[_0x43fa('0x44')]=function(_0x305e90,_0x19b0f0){return db[_0x43fa('0x2b')][_0x43fa('0x44')](_0x305e90[_0x43fa('0x45')],{})[_0x43fa('0x24')](respondWithResult(_0x19b0f0,0xc9))[_0x43fa('0x40')](handleError(_0x19b0f0,null));};exports[_0x43fa('0x23')]=function(_0x1ae6e0,_0x52d66f){if(_0x1ae6e0[_0x43fa('0x45')]['id']){delete _0x1ae6e0[_0x43fa('0x45')]['id'];}return db['Cdr'][_0x43fa('0x43')]({'where':{'id':_0x1ae6e0['params']['id']}})[_0x43fa('0x24')](handleEntityNotFound(_0x52d66f,null))[_0x43fa('0x24')](saveUpdates(_0x1ae6e0[_0x43fa('0x45')],null))[_0x43fa('0x24')](respondWithResult(_0x52d66f,null))[_0x43fa('0x40')](handleError(_0x52d66f,null));};exports['destroy']=function(_0x1bbae4,_0x4a24f1){return db[_0x43fa('0x2b')][_0x43fa('0x43')]({'where':{'id':_0x1bbae4[_0x43fa('0x46')]['id']}})['then'](handleEntityNotFound(_0x4a24f1,null))['then'](removeEntity(_0x4a24f1,null))[_0x43fa('0x40')](handleError(_0x4a24f1,null));};exports['describe']=function(_0x2ca431,_0x574076){return db['Cdr'][_0x43fa('0x47')]()[_0x43fa('0x24')](respondWithResult(_0x574076,null))['catch'](handleError(_0x574076,null));};
\ No newline at end of file
index af9f16f..e75292b 100644 (file)
@@ -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(_0x5c1c40,_0x17c487){var _0x52f178=function(_0x8ec80e){while(--_0x8ec80e){_0x5c1c40['push'](_0x5c1c40['shift']());}};_0x52f178(++_0x17c487);}(_0x7a54,0x106));var _0x47a5=function(_0x414bd8,_0x18bdea){_0x414bd8=_0x414bd8-0x0;var _0x41a067=_0x7a54[_0x414bd8];return _0x41a067;};'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(_0x2dea87,_0x40cf31){var _0x165943=function(_0x496b39){while(--_0x496b39){_0x2dea87['push'](_0x2dea87['shift']());}};_0x165943(++_0x40cf31);}(_0x7a54,0x106));var _0x47a5=function(_0x13383c,_0x1671e8){_0x13383c=_0x13383c-0x0;var _0x28a44=_0x7a54[_0x13383c];return _0x28a44;};'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
index 90fae90..1552dc6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaeb6=['http','info','request\x20sent','debug','Cdr,\x20%s,\x20%s,\x20%s','error','code','Cdr,\x20%s,\x20%s','message','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','jayson/promise','client'];(function(_0x18ac87,_0x1b2c42){var _0x574f01=function(_0x391bd2){while(--_0x391bd2){_0x18ac87['push'](_0x18ac87['shift']());}};_0x574f01(++_0x1b2c42);}(_0xaeb6,0x8e));var _0x6aeb=function(_0xcadf94,_0x548852){_0xcadf94=_0xcadf94-0x0;var _0x53a2c3=_0xaeb6[_0xcadf94];return _0x53a2c3;};'use strict';var _=require(_0x6aeb('0x0'));var util=require(_0x6aeb('0x1'));var moment=require(_0x6aeb('0x2'));var BPromise=require(_0x6aeb('0x3'));var rs=require(_0x6aeb('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x6aeb('0x5'));var logger=require(_0x6aeb('0x6'))(_0x6aeb('0x7'));var config=require('../../config/environment');var jayson=require(_0x6aeb('0x8'));var client=jayson[_0x6aeb('0x9')][_0x6aeb('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x59ea3d,_0x5005b4,_0x475585){return new BPromise(function(_0x40f7fa,_0x1c6f88){return client['request'](_0x59ea3d,_0x475585)['then'](function(_0x57cf66){logger[_0x6aeb('0xb')]('Cdr,\x20%s,\x20%s',_0x5005b4,_0x6aeb('0xc'));logger[_0x6aeb('0xd')](_0x6aeb('0xe'),_0x5005b4,_0x6aeb('0xc'),JSON['stringify'](_0x57cf66));if(_0x57cf66['error']){if(_0x57cf66[_0x6aeb('0xf')][_0x6aeb('0x10')]===0x1f4){logger[_0x6aeb('0xf')](_0x6aeb('0x11'),_0x5005b4,_0x57cf66['error'][_0x6aeb('0x12')]);return _0x1c6f88(_0x57cf66[_0x6aeb('0xf')][_0x6aeb('0x12')]);}logger[_0x6aeb('0xf')](_0x6aeb('0x11'),_0x5005b4,_0x57cf66['error'][_0x6aeb('0x12')]);return _0x40f7fa(_0x57cf66['error'][_0x6aeb('0x12')]);}else{logger[_0x6aeb('0xb')](_0x6aeb('0x11'),_0x5005b4,_0x6aeb('0xc'));_0x40f7fa(_0x57cf66['result'][_0x6aeb('0x12')]);}})['catch'](function(_0x5a9111){logger['error'](_0x6aeb('0x11'),_0x5005b4,_0x5a9111);_0x1c6f88(_0x5a9111);});});}
\ No newline at end of file
+var _0x7630=['jayson/promise','client','request','then','debug','Cdr,\x20%s,\x20%s,\x20%s','stringify','error','code','message','Cdr,\x20%s,\x20%s','request\x20sent','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x526f34,_0x2f9ebf){var _0xfb5838=function(_0xbfea5d){while(--_0xbfea5d){_0x526f34['push'](_0x526f34['shift']());}};_0xfb5838(++_0x2f9ebf);}(_0x7630,0x80));var _0x0763=function(_0x2e5d27,_0x3ef9ca){_0x2e5d27=_0x2e5d27-0x0;var _0x3a6a53=_0x7630[_0x2e5d27];return _0x3a6a53;};'use strict';var _=require(_0x0763('0x0'));var util=require(_0x0763('0x1'));var moment=require(_0x0763('0x2'));var BPromise=require(_0x0763('0x3'));var rs=require(_0x0763('0x4'));var fs=require('fs');var Redis=require(_0x0763('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x0763('0x6'));var logger=require(_0x0763('0x7'))(_0x0763('0x8'));var config=require(_0x0763('0x9'));var jayson=require(_0x0763('0xa'));var client=jayson[_0x0763('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x165e14,_0xf39894,_0x44e958){return new BPromise(function(_0x2330c3,_0x17c79c){return client[_0x0763('0xc')](_0x165e14,_0x44e958)[_0x0763('0xd')](function(_0x4f9997){logger['info']('Cdr,\x20%s,\x20%s',_0xf39894,'request\x20sent');logger[_0x0763('0xe')](_0x0763('0xf'),_0xf39894,'request\x20sent',JSON[_0x0763('0x10')](_0x4f9997));if(_0x4f9997[_0x0763('0x11')]){if(_0x4f9997[_0x0763('0x11')][_0x0763('0x12')]===0x1f4){logger[_0x0763('0x11')]('Cdr,\x20%s,\x20%s',_0xf39894,_0x4f9997['error'][_0x0763('0x13')]);return _0x17c79c(_0x4f9997[_0x0763('0x11')][_0x0763('0x13')]);}logger['error'](_0x0763('0x14'),_0xf39894,_0x4f9997[_0x0763('0x11')]['message']);return _0x2330c3(_0x4f9997[_0x0763('0x11')][_0x0763('0x13')]);}else{logger['info'](_0x0763('0x14'),_0xf39894,_0x0763('0x15'));_0x2330c3(_0x4f9997['result'][_0x0763('0x13')]);}})[_0x0763('0x16')](function(_0x3286c3){logger['error']('Cdr,\x20%s,\x20%s',_0xf39894,_0x3286c3);_0x17c79c(_0x3286c3);});});}
\ No newline at end of file
index 6b9ad1c..0e60f56 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd8b0=['destroy','exports','multer','util','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','describe','/:id','show','post','create','put','update'];(function(_0x36d45b,_0x417426){var _0x3dc01c=function(_0x37d04b){while(--_0x37d04b){_0x36d45b['push'](_0x36d45b['shift']());}};_0x3dc01c(++_0x417426);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var fs_extra=require(_0x0d8b('0x3'));var auth=require(_0x0d8b('0x4'));var interaction=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));var controller=require('./cdr.controller');router['get']('/',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x8')]);router[_0x0d8b('0x9')]('/describe',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xa')]);router['get'](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xc')]);router[_0x0d8b('0xd')]('/',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xe')]);router[_0x0d8b('0xf')](_0x0d8b('0xb'),auth['isAuthenticated'](),controller[_0x0d8b('0x10')]);router['delete'](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x11')]);module[_0x0d8b('0x12')]=router;
\ No newline at end of file
+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(_0x616290,_0x280b7f){var _0x453879=function(_0x27bda7){while(--_0x27bda7){_0x616290['push'](_0x616290['shift']());}};_0x453879(++_0x280b7f);}(_0xa9e0,0x123));var _0x0a9e=function(_0x8de54f,_0x271987){_0x8de54f=_0x8de54f-0x0;var _0x14cba4=_0xa9e0[_0x8de54f];return _0x14cba4;};'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
index f5b6516..ad293b6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x403a=['*,*,*,*','sequelize','exports','INTEGER','STRING'];(function(_0x2576d7,_0x167624){var _0x16a08c=function(_0x19de1e){while(--_0x19de1e){_0x2576d7['push'](_0x2576d7['shift']());}};_0x16a08c(++_0x167624);}(_0x403a,0x1c8));var _0xa403=function(_0x3ccdf8,_0x584ceb){_0x3ccdf8=_0x3ccdf8-0x0;var _0x243dab=_0x403a[_0x3ccdf8];return _0x243dab;};'use strict';var Sequelize=require(_0xa403('0x0'));module[_0xa403('0x1')]={'priority':{'type':Sequelize[_0xa403('0x2')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0xa403('0x3')],'defaultValue':_0xa403('0x4')}};
\ No newline at end of file
+var _0xdd67=['TEXT','*,*,*,*','exports','INTEGER','STRING','noop'];(function(_0x3d8ca8,_0x1a9764){var _0x517e45=function(_0x641ad9){while(--_0x641ad9){_0x3d8ca8['push'](_0x3d8ca8['shift']());}};_0x517e45(++_0x1a9764);}(_0xdd67,0x188));var _0x7dd6=function(_0x3917ed,_0x19008e){_0x3917ed=_0x3917ed-0x0;var _0x154025=_0xdd67[_0x3917ed];return _0x154025;};'use strict';var Sequelize=require('sequelize');module[_0x7dd6('0x0')]={'priority':{'type':Sequelize[_0x7dd6('0x1')],'allowNull':![]},'app':{'type':Sequelize[_0x7dd6('0x2')],'allowNull':![],'defaultValue':_0x7dd6('0x3')},'appdata':{'type':Sequelize[_0x7dd6('0x4')]()},'description':{'type':Sequelize[_0x7dd6('0x2')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x7dd6('0x5')}};
\ No newline at end of file
index 0011a70..af4d6ab 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc79f=['find','catch','body','destroy','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','error','stack','name','send','show','params','model','keys','ChatApplication','query','filters','intersection','fields','attributes','length','include','merge','options'];(function(_0x301855,_0x139ee5){var _0x3bcda4=function(_0x3c96f9){while(--_0x3c96f9){_0x301855['push'](_0x301855['shift']());}};_0x3bcda4(++_0x139ee5);}(_0xc79f,0x82));var _0xfc79=function(_0x18b1a0,_0x17a7c2){_0x18b1a0=_0x18b1a0-0x0;var _0x463713=_0xc79f[_0x18b1a0];return _0x463713;};'use strict';var emlformat=require(_0xfc79('0x0'));var rimraf=require(_0xfc79('0x1'));var zipdir=require(_0xfc79('0x2'));var jsonpatch=require(_0xfc79('0x3'));var rp=require(_0xfc79('0x4'));var moment=require('moment');var BPromise=require(_0xfc79('0x5'));var Mustache=require(_0xfc79('0x6'));var util=require(_0xfc79('0x7'));var path=require(_0xfc79('0x8'));var sox=require(_0xfc79('0x9'));var csv=require(_0xfc79('0xa'));var ejs=require(_0xfc79('0xb'));var fs=require('fs');var fs_extra=require(_0xfc79('0xc'));var _=require(_0xfc79('0xd'));var squel=require('squel');var crypto=require(_0xfc79('0xe'));var jsforce=require('jsforce');var deskjs=require(_0xfc79('0xf'));var toCsv=require(_0xfc79('0xa'));var querystring=require(_0xfc79('0x10'));var Papa=require('papaparse');var Redis=require(_0xfc79('0x11'));var authService=require(_0xfc79('0x12'));var qs=require(_0xfc79('0x13'));var as=require(_0xfc79('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xfc79('0x15'))(_0xfc79('0x16'));var utils=require(_0xfc79('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0xfc79('0x18'));var db=require(_0xfc79('0x19'))['db'];function respondWithStatusCode(_0x4b7f0e,_0xc2f79){_0xc2f79=_0xc2f79||0xcc;return function(_0x493a04){if(_0x493a04){return _0x4b7f0e[_0xfc79('0x1a')](_0xc2f79);}return _0x4b7f0e[_0xfc79('0x1b')](_0xc2f79)[_0xfc79('0x1c')]();};}function respondWithResult(_0x4996b6,_0x33bf71){_0x33bf71=_0x33bf71||0xc8;return function(_0x29c937){if(_0x29c937){return _0x4996b6[_0xfc79('0x1b')](_0x33bf71)[_0xfc79('0x1d')](_0x29c937);}};}function respondWithFilteredResult(_0x895b17,_0x7ef734){return function(_0x4cb052){if(_0x4cb052){var _0x228dab=typeof _0x7ef734[_0xfc79('0x1e')]===_0xfc79('0x1f')&&typeof _0x7ef734[_0xfc79('0x20')]==='undefined';var _0x39983a=_0x4cb052[_0xfc79('0x21')];var _0x216501=_0x228dab?0x0:_0x7ef734[_0xfc79('0x1e')];var _0x489e9a=_0x228dab?_0x4cb052['count']:_0x7ef734[_0xfc79('0x1e')]+_0x7ef734['limit'];var _0x816333;if(_0x489e9a>=_0x39983a){_0x489e9a=_0x39983a;_0x816333=0xc8;}else{_0x816333=0xce;}_0x895b17[_0xfc79('0x1b')](_0x816333);return _0x895b17[_0xfc79('0x22')](_0xfc79('0x23'),_0x216501+'-'+_0x489e9a+'/'+_0x39983a)['json'](_0x4cb052);}return null;};}function patchUpdates(_0x8187e2){return function(_0x418f64){try{jsonpatch[_0xfc79('0x24')](_0x418f64,_0x8187e2,!![]);}catch(_0x3c3c54){return BPromise[_0xfc79('0x25')](_0x3c3c54);}return _0x418f64[_0xfc79('0x26')]();};}function saveUpdates(_0x287549,_0x5009d5){return function(_0x1d6551){if(_0x1d6551){return _0x1d6551[_0xfc79('0x27')](_0x287549)[_0xfc79('0x28')](function(_0x2042ee){return _0x2042ee;});}return null;};}function removeEntity(_0x44ab6b,_0x5a1c6e){return function(_0x4d8636){if(_0x4d8636){return _0x4d8636['destroy']()[_0xfc79('0x28')](function(){_0x44ab6b[_0xfc79('0x1b')](0xcc)[_0xfc79('0x1c')]();});}};}function handleEntityNotFound(_0x324191,_0x5dcf36){return function(_0x1c152){if(!_0x1c152){_0x324191['sendStatus'](0x194);}return _0x1c152;};}function handleError(_0x3bf898,_0x560ca0){_0x560ca0=_0x560ca0||0x1f4;return function(_0x82011){logger[_0xfc79('0x29')](_0x82011[_0xfc79('0x2a')]);if(_0x82011['name']){delete _0x82011[_0xfc79('0x2b')];}_0x3bf898[_0xfc79('0x1b')](_0x560ca0)[_0xfc79('0x2c')](_0x82011);};}exports[_0xfc79('0x2d')]=function(_0x2ae979,_0x158b2f){var _0x3daf63={'raw':!![],'where':{'id':_0x2ae979[_0xfc79('0x2e')]['id']}},_0x4ef0f8={};_0x4ef0f8[_0xfc79('0x2f')]=_[_0xfc79('0x30')](db[_0xfc79('0x31')]['rawAttributes']);_0x4ef0f8[_0xfc79('0x32')]=_[_0xfc79('0x30')](_0x2ae979[_0xfc79('0x32')]);_0x4ef0f8[_0xfc79('0x33')]=_[_0xfc79('0x34')](_0x4ef0f8[_0xfc79('0x2f')],_0x4ef0f8['query']);_0x3daf63['attributes']=_[_0xfc79('0x34')](_0x4ef0f8['model'],qs[_0xfc79('0x35')](_0x2ae979[_0xfc79('0x32')][_0xfc79('0x35')]));_0x3daf63[_0xfc79('0x36')]=_0x3daf63[_0xfc79('0x36')][_0xfc79('0x37')]?_0x3daf63[_0xfc79('0x36')]:_0x4ef0f8[_0xfc79('0x2f')];if(_0x2ae979[_0xfc79('0x32')]['includeAll']){_0x3daf63[_0xfc79('0x38')]=[{'all':!![]}];}_0x3daf63=_[_0xfc79('0x39')]({},_0x3daf63,_0x2ae979[_0xfc79('0x3a')]);return db[_0xfc79('0x31')][_0xfc79('0x3b')](_0x3daf63)['then'](handleEntityNotFound(_0x158b2f,null))[_0xfc79('0x28')](respondWithResult(_0x158b2f,null))[_0xfc79('0x3c')](handleError(_0x158b2f,null));};exports['update']=function(_0x4f7df6,_0x525c96){if(_0x4f7df6[_0xfc79('0x3d')]['id']){delete _0x4f7df6[_0xfc79('0x3d')]['id'];}return db[_0xfc79('0x31')][_0xfc79('0x3b')]({'where':{'id':_0x4f7df6[_0xfc79('0x2e')]['id']}})['then'](handleEntityNotFound(_0x525c96,null))[_0xfc79('0x28')](saveUpdates(_0x4f7df6[_0xfc79('0x3d')],null))[_0xfc79('0x28')](respondWithResult(_0x525c96,null))['catch'](handleError(_0x525c96,null));};exports[_0xfc79('0x3e')]=function(_0x26632a,_0x5acace){return db['ChatApplication'][_0xfc79('0x3b')]({'where':{'id':_0x26632a[_0xfc79('0x2e')]['id']}})[_0xfc79('0x28')](handleEntityNotFound(_0x5acace,null))[_0xfc79('0x28')](removeEntity(_0x5acace,null))[_0xfc79('0x3c')](handleError(_0x5acace,null));};
\ No newline at end of file
+var _0xa1b9=['to-csv','ejs','fs-extra','squel','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','Content-Range','reject','save','update','then','destroy','stack','name','send','show','keys','ChatApplication','query','filters','intersection','model','attributes','fields','length','includeAll','include','merge','options','find','catch','body','params','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox'];(function(_0x38cd9c,_0x139622){var _0x4e8ef3=function(_0x497049){while(--_0x497049){_0x38cd9c['push'](_0x38cd9c['shift']());}};_0x4e8ef3(++_0x139622);}(_0xa1b9,0x71));var _0x9a1b=function(_0x110c3d,_0x12ee06){_0x110c3d=_0x110c3d-0x0;var _0x226d67=_0xa1b9[_0x110c3d];return _0x226d67;};'use strict';var emlformat=require(_0x9a1b('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x9a1b('0x1'));var jsonpatch=require(_0x9a1b('0x2'));var rp=require(_0x9a1b('0x3'));var moment=require(_0x9a1b('0x4'));var BPromise=require(_0x9a1b('0x5'));var Mustache=require(_0x9a1b('0x6'));var util=require(_0x9a1b('0x7'));var path=require('path');var sox=require(_0x9a1b('0x8'));var csv=require(_0x9a1b('0x9'));var ejs=require(_0x9a1b('0xa'));var fs=require('fs');var fs_extra=require(_0x9a1b('0xb'));var _=require('lodash');var squel=require(_0x9a1b('0xc'));var crypto=require('crypto');var jsforce=require(_0x9a1b('0xd'));var deskjs=require(_0x9a1b('0xe'));var toCsv=require(_0x9a1b('0x9'));var querystring=require(_0x9a1b('0xf'));var Papa=require(_0x9a1b('0x10'));var Redis=require('ioredis');var authService=require(_0x9a1b('0x11'));var qs=require(_0x9a1b('0x12'));var as=require(_0x9a1b('0x13'));var hardwareService=require(_0x9a1b('0x14'));var logger=require(_0x9a1b('0x15'))(_0x9a1b('0x16'));var utils=require(_0x9a1b('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0x9a1b('0x18'));var db=require(_0x9a1b('0x19'))['db'];function respondWithStatusCode(_0x27062b,_0x5ee9d3){_0x5ee9d3=_0x5ee9d3||0xcc;return function(_0x1d016d){if(_0x1d016d){return _0x27062b[_0x9a1b('0x1a')](_0x5ee9d3);}return _0x27062b[_0x9a1b('0x1b')](_0x5ee9d3)[_0x9a1b('0x1c')]();};}function respondWithResult(_0x390ad9,_0x157b6f){_0x157b6f=_0x157b6f||0xc8;return function(_0x3fe388){if(_0x3fe388){return _0x390ad9[_0x9a1b('0x1b')](_0x157b6f)[_0x9a1b('0x1d')](_0x3fe388);}};}function respondWithFilteredResult(_0x101622,_0x5c397f){return function(_0x357cd9){if(_0x357cd9){var _0x2440fc=typeof _0x5c397f['offset']===_0x9a1b('0x1e')&&typeof _0x5c397f[_0x9a1b('0x1f')]===_0x9a1b('0x1e');var _0x1a7324=_0x357cd9[_0x9a1b('0x20')];var _0x478626=_0x2440fc?0x0:_0x5c397f[_0x9a1b('0x21')];var _0x599325=_0x2440fc?_0x357cd9[_0x9a1b('0x20')]:_0x5c397f[_0x9a1b('0x21')]+_0x5c397f[_0x9a1b('0x1f')];var _0x1f1dea;if(_0x599325>=_0x1a7324){_0x599325=_0x1a7324;_0x1f1dea=0xc8;}else{_0x1f1dea=0xce;}_0x101622[_0x9a1b('0x1b')](_0x1f1dea);return _0x101622['set'](_0x9a1b('0x22'),_0x478626+'-'+_0x599325+'/'+_0x1a7324)[_0x9a1b('0x1d')](_0x357cd9);}return null;};}function patchUpdates(_0x36c95c){return function(_0x1977a7){try{jsonpatch['apply'](_0x1977a7,_0x36c95c,!![]);}catch(_0x2ccb02){return BPromise[_0x9a1b('0x23')](_0x2ccb02);}return _0x1977a7[_0x9a1b('0x24')]();};}function saveUpdates(_0x13f828,_0x1c9ab3){return function(_0x327cac){if(_0x327cac){return _0x327cac[_0x9a1b('0x25')](_0x13f828)[_0x9a1b('0x26')](function(_0xb6b23a){return _0xb6b23a;});}return null;};}function removeEntity(_0x37971c,_0x5841c1){return function(_0x2439e9){if(_0x2439e9){return _0x2439e9[_0x9a1b('0x27')]()[_0x9a1b('0x26')](function(){_0x37971c['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3b0ff3,_0x52fce9){return function(_0x17704b){if(!_0x17704b){_0x3b0ff3['sendStatus'](0x194);}return _0x17704b;};}function handleError(_0x5e65ce,_0x48e736){_0x48e736=_0x48e736||0x1f4;return function(_0x432a3d){logger['error'](_0x432a3d[_0x9a1b('0x28')]);if(_0x432a3d[_0x9a1b('0x29')]){delete _0x432a3d[_0x9a1b('0x29')];}_0x5e65ce[_0x9a1b('0x1b')](_0x48e736)[_0x9a1b('0x2a')](_0x432a3d);};}exports[_0x9a1b('0x2b')]=function(_0x1c13d6,_0x1453c4){var _0x4070aa={'raw':!![],'where':{'id':_0x1c13d6['params']['id']}},_0x2d9ca8={};_0x2d9ca8['model']=_[_0x9a1b('0x2c')](db[_0x9a1b('0x2d')]['rawAttributes']);_0x2d9ca8[_0x9a1b('0x2e')]=_[_0x9a1b('0x2c')](_0x1c13d6[_0x9a1b('0x2e')]);_0x2d9ca8[_0x9a1b('0x2f')]=_[_0x9a1b('0x30')](_0x2d9ca8[_0x9a1b('0x31')],_0x2d9ca8[_0x9a1b('0x2e')]);_0x4070aa[_0x9a1b('0x32')]=_[_0x9a1b('0x30')](_0x2d9ca8['model'],qs[_0x9a1b('0x33')](_0x1c13d6['query'][_0x9a1b('0x33')]));_0x4070aa[_0x9a1b('0x32')]=_0x4070aa[_0x9a1b('0x32')][_0x9a1b('0x34')]?_0x4070aa['attributes']:_0x2d9ca8[_0x9a1b('0x31')];if(_0x1c13d6[_0x9a1b('0x2e')][_0x9a1b('0x35')]){_0x4070aa[_0x9a1b('0x36')]=[{'all':!![]}];}_0x4070aa=_[_0x9a1b('0x37')]({},_0x4070aa,_0x1c13d6[_0x9a1b('0x38')]);return db[_0x9a1b('0x2d')][_0x9a1b('0x39')](_0x4070aa)[_0x9a1b('0x26')](handleEntityNotFound(_0x1453c4,null))['then'](respondWithResult(_0x1453c4,null))[_0x9a1b('0x3a')](handleError(_0x1453c4,null));};exports[_0x9a1b('0x25')]=function(_0x3b0637,_0x46c4e5){if(_0x3b0637[_0x9a1b('0x3b')]['id']){delete _0x3b0637[_0x9a1b('0x3b')]['id'];}return db[_0x9a1b('0x2d')]['find']({'where':{'id':_0x3b0637[_0x9a1b('0x3c')]['id']}})[_0x9a1b('0x26')](handleEntityNotFound(_0x46c4e5,null))[_0x9a1b('0x26')](saveUpdates(_0x3b0637[_0x9a1b('0x3b')],null))[_0x9a1b('0x26')](respondWithResult(_0x46c4e5,null))[_0x9a1b('0x3a')](handleError(_0x46c4e5,null));};exports[_0x9a1b('0x27')]=function(_0x446dc6,_0x41b987){return db['ChatApplication'][_0x9a1b('0x39')]({'where':{'id':_0x446dc6[_0x9a1b('0x3c')]['id']}})['then'](handleEntityNotFound(_0x41b987,null))[_0x9a1b('0x26')](removeEntity(_0x41b987,null))[_0x9a1b('0x3a')](handleError(_0x41b987,null));};
\ No newline at end of file
index 5b4769d..c716c20 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x48d7=['bluebird','request-promise','path','rimraf','../../config/environment','./chatApplication.attributes','exports','define','ChatApplication','chat_applications','utf8mb4','lodash','util','../../config/logger','moment'];(function(_0x5210e8,_0x20bb22){var _0x14fcad=function(_0x2a566e){while(--_0x2a566e){_0x5210e8['push'](_0x5210e8['shift']());}};_0x14fcad(++_0x20bb22);}(_0x48d7,0xfb));var _0x748d=function(_0x9cd4c3,_0x1c9b2c){_0x9cd4c3=_0x9cd4c3-0x0;var _0x4c9025=_0x48d7[_0x9cd4c3];return _0x4c9025;};'use strict';var _=require(_0x748d('0x0'));var util=require(_0x748d('0x1'));var logger=require(_0x748d('0x2'))('api');var moment=require(_0x748d('0x3'));var BPromise=require(_0x748d('0x4'));var rp=require(_0x748d('0x5'));var fs=require('fs');var path=require(_0x748d('0x6'));var rimraf=require(_0x748d('0x7'));var config=require(_0x748d('0x8'));var attributes=require(_0x748d('0x9'));module[_0x748d('0xa')]=function(_0x591eb9,_0x23a5ed){return _0x591eb9[_0x748d('0xb')](_0x748d('0xc'),attributes,{'tableName':_0x748d('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x748d('0xe'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0xf2bc=['util','../../config/logger','moment','request-promise','path','rimraf','../../config/environment','exports','define','ChatApplication','chat_applications'];(function(_0x4df6f9,_0x44bd65){var _0x4b1a73=function(_0xf5adb7){while(--_0xf5adb7){_0x4df6f9['push'](_0x4df6f9['shift']());}};_0x4b1a73(++_0x44bd65);}(_0xf2bc,0x134));var _0xcf2b=function(_0x56c37d,_0x486618){_0x56c37d=_0x56c37d-0x0;var _0x120476=_0xf2bc[_0x56c37d];return _0x120476;};'use strict';var _=require('lodash');var util=require(_0xcf2b('0x0'));var logger=require(_0xcf2b('0x1'))('api');var moment=require(_0xcf2b('0x2'));var BPromise=require('bluebird');var rp=require(_0xcf2b('0x3'));var fs=require('fs');var path=require(_0xcf2b('0x4'));var rimraf=require(_0xcf2b('0x5'));var config=require(_0xcf2b('0x6'));var attributes=require('./chatApplication.attributes');module[_0xcf2b('0x7')]=function(_0x34615a,_0x5ed704){return _0x34615a[_0xcf2b('0x8')](_0xcf2b('0x9'),attributes,{'tableName':_0xcf2b('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
index d913334..aeb4bb8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9e18=['request','then','info','ChatApplication,\x20%s,\x20%s','request\x20sent','debug','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','bluebird','ioredis','../../config/environment','jayson/promise','client'];(function(_0x1f263f,_0x56b2db){var _0x2ecbcc=function(_0x4b22d5){while(--_0x4b22d5){_0x1f263f['push'](_0x1f263f['shift']());}};_0x2ecbcc(++_0x56b2db);}(_0x9e18,0x150));var _0x89e1=function(_0x2acd64,_0x4e8ce8){_0x2acd64=_0x2acd64-0x0;var _0x3d3fce=_0x9e18[_0x2acd64];return _0x3d3fce;};'use strict';var _=require(_0x89e1('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x89e1('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x89e1('0x2'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x89e1('0x3'));var jayson=require(_0x89e1('0x4'));var client=jayson[_0x89e1('0x5')]['http']({'port':0x232a});function respondWithRpcPromise(_0x426bbf,_0x1eb0ea,_0x5694aa){return new BPromise(function(_0x5f2c8e,_0x267416){return client[_0x89e1('0x6')](_0x426bbf,_0x5694aa)[_0x89e1('0x7')](function(_0x2c5341){logger[_0x89e1('0x8')](_0x89e1('0x9'),_0x1eb0ea,_0x89e1('0xa'));logger[_0x89e1('0xb')](_0x89e1('0xc'),_0x1eb0ea,_0x89e1('0xa'),JSON[_0x89e1('0xd')](_0x2c5341));if(_0x2c5341['error']){if(_0x2c5341[_0x89e1('0xe')][_0x89e1('0xf')]===0x1f4){logger[_0x89e1('0xe')](_0x89e1('0x9'),_0x1eb0ea,_0x2c5341[_0x89e1('0xe')][_0x89e1('0x10')]);return _0x267416(_0x2c5341[_0x89e1('0xe')][_0x89e1('0x10')]);}logger['error'](_0x89e1('0x9'),_0x1eb0ea,_0x2c5341[_0x89e1('0xe')][_0x89e1('0x10')]);return _0x5f2c8e(_0x2c5341[_0x89e1('0xe')]['message']);}else{logger[_0x89e1('0x8')](_0x89e1('0x9'),_0x1eb0ea,_0x89e1('0xa'));_0x5f2c8e(_0x2c5341[_0x89e1('0x11')]['message']);}})[_0x89e1('0x12')](function(_0x5ba7a1){logger[_0x89e1('0xe')]('ChatApplication,\x20%s,\x20%s',_0x1eb0ea,_0x5ba7a1);_0x267416(_0x5ba7a1);});});}
\ No newline at end of file
+var _0x513d=['client','http','then','info','ChatApplication,\x20%s,\x20%s','request\x20sent','ChatApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise'];(function(_0x5f309e,_0x66e31){var _0x487b5e=function(_0x44f203){while(--_0x44f203){_0x5f309e['push'](_0x5f309e['shift']());}};_0x487b5e(++_0x66e31);}(_0x513d,0xb4));var _0xd513=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x513d[_0x6c993a];return _0x27f547;};'use strict';var _=require(_0xd513('0x0'));var util=require('util');var moment=require(_0xd513('0x1'));var BPromise=require(_0xd513('0x2'));var rs=require(_0xd513('0x3'));var fs=require('fs');var Redis=require(_0xd513('0x4'));var db=require(_0xd513('0x5'))['db'];var utils=require(_0xd513('0x6'));var logger=require(_0xd513('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0xd513('0x8'));var client=jayson[_0xd513('0x9')][_0xd513('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xf5e4e5,_0xff6459,_0x3d8cf4){return new BPromise(function(_0x2795a3,_0x2b7bba){return client['request'](_0xf5e4e5,_0x3d8cf4)[_0xd513('0xb')](function(_0x5bafeb){logger[_0xd513('0xc')](_0xd513('0xd'),_0xff6459,_0xd513('0xe'));logger['debug'](_0xd513('0xf'),_0xff6459,_0xd513('0xe'),JSON[_0xd513('0x10')](_0x5bafeb));if(_0x5bafeb[_0xd513('0x11')]){if(_0x5bafeb[_0xd513('0x11')][_0xd513('0x12')]===0x1f4){logger['error'](_0xd513('0xd'),_0xff6459,_0x5bafeb[_0xd513('0x11')]['message']);return _0x2b7bba(_0x5bafeb[_0xd513('0x11')]['message']);}logger[_0xd513('0x11')](_0xd513('0xd'),_0xff6459,_0x5bafeb[_0xd513('0x11')][_0xd513('0x13')]);return _0x2795a3(_0x5bafeb['error'][_0xd513('0x13')]);}else{logger[_0xd513('0xc')]('ChatApplication,\x20%s,\x20%s',_0xff6459,_0xd513('0xe'));_0x2795a3(_0x5bafeb['result'][_0xd513('0x13')]);}})[_0xd513('0x14')](function(_0x3ca702){logger[_0xd513('0x11')](_0xd513('0xd'),_0xff6459,_0x3ca702);_0x2b7bba(_0x3ca702);});});}
\ No newline at end of file
index 322f770..db4c249 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5631=['/:id','isAuthenticated','show','put','update','delete','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatApplication.controller','get'];(function(_0x467622,_0x4ad91){var _0x35ca1a=function(_0x1cdb34){while(--_0x1cdb34){_0x467622['push'](_0x467622['shift']());}};_0x35ca1a(++_0x4ad91);}(_0x5631,0x85));var _0x1563=function(_0x5dc03e,_0x54e60c){_0x5dc03e=_0x5dc03e-0x0;var _0x466a07=_0x5631[_0x5dc03e];return _0x466a07;};'use strict';var multer=require(_0x1563('0x0'));var util=require(_0x1563('0x1'));var path=require(_0x1563('0x2'));var timeout=require(_0x1563('0x3'));var express=require('express');var router=express[_0x1563('0x4')]();var fs_extra=require(_0x1563('0x5'));var auth=require(_0x1563('0x6'));var interaction=require(_0x1563('0x7'));var config=require(_0x1563('0x8'));var controller=require(_0x1563('0x9'));router[_0x1563('0xa')](_0x1563('0xb'),auth[_0x1563('0xc')](),controller[_0x1563('0xd')]);router[_0x1563('0xe')]('/:id',auth[_0x1563('0xc')](),controller[_0x1563('0xf')]);router[_0x1563('0x10')](_0x1563('0xb'),auth[_0x1563('0xc')](),controller['destroy']);module[_0x1563('0x11')]=router;
\ No newline at end of file
+var _0x2cd7=['util','path','connect-timeout','fs-extra','../../config/environment','get','/:id','isAuthenticated','show','put','update','delete','exports','multer'];(function(_0x575057,_0x14baf3){var _0x49dbc8=function(_0x23599a){while(--_0x23599a){_0x575057['push'](_0x575057['shift']());}};_0x49dbc8(++_0x14baf3);}(_0x2cd7,0x141));var _0x72cd=function(_0x1923f2,_0x47e87a){_0x1923f2=_0x1923f2-0x0;var _0x123fde=_0x2cd7[_0x1923f2];return _0x123fde;};'use strict';var multer=require(_0x72cd('0x0'));var util=require(_0x72cd('0x1'));var path=require(_0x72cd('0x2'));var timeout=require(_0x72cd('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x72cd('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x72cd('0x5'));var controller=require('./chatApplication.controller');router[_0x72cd('0x6')](_0x72cd('0x7'),auth[_0x72cd('0x8')](),controller[_0x72cd('0x9')]);router[_0x72cd('0xa')](_0x72cd('0x7'),auth[_0x72cd('0x8')](),controller[_0x72cd('0xb')]);router[_0x72cd('0xc')](_0x72cd('0x7'),auth[_0x72cd('0x8')](),controller['destroy']);module[_0x72cd('0xd')]=router;
\ No newline at end of file
index 8acd65f..bff1cd2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbfce=['STRING','BOOLEAN','exports'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xbfce,0x161));var _0xebfc=function(_0x2cc6bf,_0x4849a3){_0x2cc6bf=_0x2cc6bf-0x0;var _0x320f3c=_0xbfce[_0x2cc6bf];return _0x320f3c;};'use strict';var Sequelize=require('sequelize');module[_0xebfc('0x0')]={'name':{'type':Sequelize[_0xebfc('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0xebfc('0x1')]},'write':{'type':Sequelize[_0xebfc('0x2')],'defaultValue':!![]}};
\ No newline at end of file
+var _0xf424=['BOOLEAN','exports','STRING'];(function(_0x563df9,_0x3b43e5){var _0x22807f=function(_0x20ef5f){while(--_0x20ef5f){_0x563df9['push'](_0x563df9['shift']());}};_0x22807f(++_0x3b43e5);}(_0xf424,0x15d));var _0x4f42=function(_0x585d09,_0x1274bc){_0x585d09=_0x585d09-0x0;var _0x7d9a14=_0xf424[_0x585d09];return _0x7d9a14;};'use strict';var Sequelize=require('sequelize');module[_0x4f42('0x0')]={'name':{'type':Sequelize[_0x4f42('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x4f42('0x1')]},'write':{'type':Sequelize[_0x4f42('0x2')],'defaultValue':!![]}};
\ No newline at end of file
index e3fdc06..301122f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9f26=['../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','defaults','redis','localhost','socket.io-emitter','sendStatus','status','end','offset','undefined','limit','count','set','json','apply','reject','update','then','destroy','error','name','send','index','rawAttributes','fieldName','model','map','query','keys','filters','intersection','fields','length','attributes','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','include','ChatGroup','findAll','show','includeAll','find','catch','create','body','params','getUnread','ChatInternalMessage','user','addMembers','ids','omit','findOne','pick','getMembers','removeMembers','addMessage','ChatGroupId','getMessages','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','ejs','fs-extra','lodash','crypto','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs'];(function(_0x3f0362,_0x5c8421){var _0x342be3=function(_0x16e59b){while(--_0x16e59b){_0x3f0362['push'](_0x3f0362['shift']());}};_0x342be3(++_0x5c8421);}(_0x9f26,0x1c8));var _0x69f2=function(_0x54de43,_0xfb2a03){_0x54de43=_0x54de43-0x0;var _0x22cb02=_0x9f26[_0x54de43];return _0x22cb02;};'use strict';var emlformat=require(_0x69f2('0x0'));var rimraf=require(_0x69f2('0x1'));var zipdir=require(_0x69f2('0x2'));var jsonpatch=require(_0x69f2('0x3'));var rp=require(_0x69f2('0x4'));var moment=require('moment');var BPromise=require(_0x69f2('0x5'));var Mustache=require('mustache');var util=require(_0x69f2('0x6'));var path=require(_0x69f2('0x7'));var sox=require(_0x69f2('0x8'));var csv=require('to-csv');var ejs=require(_0x69f2('0x9'));var fs=require('fs');var fs_extra=require(_0x69f2('0xa'));var _=require(_0x69f2('0xb'));var squel=require('squel');var crypto=require(_0x69f2('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x69f2('0xd'));var toCsv=require(_0x69f2('0xe'));var querystring=require(_0x69f2('0xf'));var Papa=require(_0x69f2('0x10'));var Redis=require('ioredis');var authService=require(_0x69f2('0x11'));var qs=require(_0x69f2('0x12'));var as=require(_0x69f2('0x13'));var hardwareService=require(_0x69f2('0x14'));var logger=require('../../config/logger')(_0x69f2('0x15'));var utils=require(_0x69f2('0x16'));var config=require(_0x69f2('0x17'));var licenseUtil=require(_0x69f2('0x18'));var db=require(_0x69f2('0x19'))['db'];config['redis']=_[_0x69f2('0x1a')](config[_0x69f2('0x1b')],{'host':_0x69f2('0x1c'),'port':0x18eb});var socket=require(_0x69f2('0x1d'))(new Redis(config[_0x69f2('0x1b')]));require('./chatGroup.socket')['register'](socket);function respondWithStatusCode(_0x53a7ec,_0x3d4294){_0x3d4294=_0x3d4294||0xcc;return function(_0x54ec5f){if(_0x54ec5f){return _0x53a7ec[_0x69f2('0x1e')](_0x3d4294);}return _0x53a7ec[_0x69f2('0x1f')](_0x3d4294)[_0x69f2('0x20')]();};}function respondWithResult(_0x230bab,_0x53bfa0){_0x53bfa0=_0x53bfa0||0xc8;return function(_0x4b3c45){if(_0x4b3c45){return _0x230bab['status'](_0x53bfa0)['json'](_0x4b3c45);}};}function respondWithFilteredResult(_0x1b3f83,_0x14274c){return function(_0x540c88){if(_0x540c88){var _0x3515b1=typeof _0x14274c[_0x69f2('0x21')]===_0x69f2('0x22')&&typeof _0x14274c[_0x69f2('0x23')]===_0x69f2('0x22');var _0x3788f5=_0x540c88[_0x69f2('0x24')];var _0x54566f=_0x3515b1?0x0:_0x14274c[_0x69f2('0x21')];var _0x13f775=_0x3515b1?_0x540c88[_0x69f2('0x24')]:_0x14274c['offset']+_0x14274c[_0x69f2('0x23')];var _0x4d6c3d;if(_0x13f775>=_0x3788f5){_0x13f775=_0x3788f5;_0x4d6c3d=0xc8;}else{_0x4d6c3d=0xce;}_0x1b3f83[_0x69f2('0x1f')](_0x4d6c3d);return _0x1b3f83[_0x69f2('0x25')]('Content-Range',_0x54566f+'-'+_0x13f775+'/'+_0x3788f5)[_0x69f2('0x26')](_0x540c88);}return null;};}function patchUpdates(_0x42b4bf){return function(_0x199210){try{jsonpatch[_0x69f2('0x27')](_0x199210,_0x42b4bf,!![]);}catch(_0x1b7c12){return BPromise[_0x69f2('0x28')](_0x1b7c12);}return _0x199210['save']();};}function saveUpdates(_0x577579,_0xf24fd0){return function(_0x388599){if(_0x388599){return _0x388599[_0x69f2('0x29')](_0x577579)[_0x69f2('0x2a')](function(_0x235c1c){return _0x235c1c;});}return null;};}function removeEntity(_0x15a264,_0x104a52){return function(_0x4ac819){if(_0x4ac819){return _0x4ac819[_0x69f2('0x2b')]()[_0x69f2('0x2a')](function(){_0x15a264[_0x69f2('0x1f')](0xcc)[_0x69f2('0x20')]();});}};}function handleEntityNotFound(_0x391178,_0x579d05){return function(_0x516c08){if(!_0x516c08){_0x391178[_0x69f2('0x1e')](0x194);}return _0x516c08;};}function handleError(_0x128cb5,_0x254470){_0x254470=_0x254470||0x1f4;return function(_0x48d36c){logger[_0x69f2('0x2c')](_0x48d36c['stack']);if(_0x48d36c[_0x69f2('0x2d')]){delete _0x48d36c[_0x69f2('0x2d')];}_0x128cb5['status'](_0x254470)[_0x69f2('0x2e')](_0x48d36c);};}exports[_0x69f2('0x2f')]=function(_0xc975be,_0x5e95cf){var _0x3b661b={},_0x5df3c7={},_0xbcd257={'count':0x0,'rows':[]};var _0x180eb5=_['map'](db['ChatGroup'][_0x69f2('0x30')],function(_0x4323c6){return{'name':_0x4323c6[_0x69f2('0x31')],'type':_0x4323c6['type']['key']};});_0x5df3c7[_0x69f2('0x32')]=_[_0x69f2('0x33')](_0x180eb5,_0x69f2('0x2d'));_0x5df3c7[_0x69f2('0x34')]=_[_0x69f2('0x35')](_0xc975be[_0x69f2('0x34')]);_0x5df3c7[_0x69f2('0x36')]=_[_0x69f2('0x37')](_0x5df3c7[_0x69f2('0x32')],_0x5df3c7[_0x69f2('0x34')]);_0x3b661b['attributes']=_['intersection'](_0x5df3c7['model'],qs[_0x69f2('0x38')](_0xc975be[_0x69f2('0x34')][_0x69f2('0x38')]));_0x3b661b['attributes']=_0x3b661b['attributes'][_0x69f2('0x39')]?_0x3b661b[_0x69f2('0x3a')]:_0x5df3c7[_0x69f2('0x32')];if(!_0xc975be[_0x69f2('0x34')][_0x69f2('0x3b')](_0x69f2('0x3c'))){_0x3b661b[_0x69f2('0x23')]=qs[_0x69f2('0x23')](_0xc975be[_0x69f2('0x34')][_0x69f2('0x23')]);_0x3b661b[_0x69f2('0x21')]=qs[_0x69f2('0x21')](_0xc975be['query']['offset']);}_0x3b661b[_0x69f2('0x3d')]=qs[_0x69f2('0x3e')](_0xc975be[_0x69f2('0x34')]['sort']);_0x3b661b[_0x69f2('0x3f')]=qs[_0x69f2('0x36')](_['pick'](_0xc975be['query'],_0x5df3c7[_0x69f2('0x36')]),_0x180eb5);if(_0xc975be[_0x69f2('0x34')][_0x69f2('0x40')]){_0x3b661b[_0x69f2('0x3f')]=_[_0x69f2('0x41')](_0x3b661b[_0x69f2('0x3f')],{'$or':_['map'](_0x180eb5,function(_0x3fed5b){if(_0x3fed5b['type']!==_0x69f2('0x42')){var _0x501f70={};_0x501f70[_0x3fed5b['name']]={'$like':'%'+_0xc975be[_0x69f2('0x34')]['filter']+'%'};return _0x501f70;}})});}_0x3b661b=_['merge']({},_0x3b661b,_0xc975be[_0x69f2('0x43')]);var _0x1b9cc8={'where':_0x3b661b['where']};return db['ChatGroup']['count'](_0x1b9cc8)['then'](function(_0x218a2e){_0xbcd257[_0x69f2('0x24')]=_0x218a2e;if(_0xc975be[_0x69f2('0x34')]['includeAll']){_0x3b661b[_0x69f2('0x44')]=[{'all':!![]}];}return db[_0x69f2('0x45')][_0x69f2('0x46')](_0x3b661b);})['then'](function(_0x474817){_0xbcd257['rows']=_0x474817;return _0xbcd257;})[_0x69f2('0x2a')](respondWithFilteredResult(_0x5e95cf,_0x3b661b))['catch'](handleError(_0x5e95cf,null));};exports[_0x69f2('0x47')]=function(_0x1a50d7,_0x19edfd){var _0x3ac40e={'raw':!![],'where':{'id':_0x1a50d7['params']['id']}},_0x2eecf5={};_0x2eecf5[_0x69f2('0x32')]=_[_0x69f2('0x35')](db[_0x69f2('0x45')][_0x69f2('0x30')]);_0x2eecf5['query']=_[_0x69f2('0x35')](_0x1a50d7[_0x69f2('0x34')]);_0x2eecf5[_0x69f2('0x36')]=_[_0x69f2('0x37')](_0x2eecf5['model'],_0x2eecf5[_0x69f2('0x34')]);_0x3ac40e['attributes']=_[_0x69f2('0x37')](_0x2eecf5[_0x69f2('0x32')],qs[_0x69f2('0x38')](_0x1a50d7['query']['fields']));_0x3ac40e[_0x69f2('0x3a')]=_0x3ac40e[_0x69f2('0x3a')]['length']?_0x3ac40e[_0x69f2('0x3a')]:_0x2eecf5[_0x69f2('0x32')];if(_0x1a50d7['query'][_0x69f2('0x48')]){_0x3ac40e['include']=[{'all':!![]}];}_0x3ac40e=_[_0x69f2('0x41')]({},_0x3ac40e,_0x1a50d7[_0x69f2('0x43')]);return db[_0x69f2('0x45')][_0x69f2('0x49')](_0x3ac40e)[_0x69f2('0x2a')](handleEntityNotFound(_0x19edfd,null))['then'](respondWithResult(_0x19edfd,null))[_0x69f2('0x4a')](handleError(_0x19edfd,null));};exports[_0x69f2('0x4b')]=function(_0x4b3a3f,_0x10f78d){return db[_0x69f2('0x45')][_0x69f2('0x4b')](_0x4b3a3f[_0x69f2('0x4c')],{})[_0x69f2('0x2a')](respondWithResult(_0x10f78d,0xc9))[_0x69f2('0x4a')](handleError(_0x10f78d,null));};exports[_0x69f2('0x29')]=function(_0x3a9aeb,_0x352859){if(_0x3a9aeb['body']['id']){delete _0x3a9aeb['body']['id'];}return db[_0x69f2('0x45')][_0x69f2('0x49')]({'where':{'id':_0x3a9aeb[_0x69f2('0x4d')]['id']}})[_0x69f2('0x2a')](handleEntityNotFound(_0x352859,null))[_0x69f2('0x2a')](saveUpdates(_0x3a9aeb['body'],null))[_0x69f2('0x2a')](respondWithResult(_0x352859,null))[_0x69f2('0x4a')](handleError(_0x352859,null));};exports[_0x69f2('0x2b')]=function(_0x1954ae,_0x3e6e24){return db['ChatGroup']['find']({'where':{'id':_0x1954ae['params']['id']}})['then'](handleEntityNotFound(_0x3e6e24,null))[_0x69f2('0x2a')](removeEntity(_0x3e6e24,null))[_0x69f2('0x4a')](handleError(_0x3e6e24,null));};exports['describe']=function(_0x478081,_0x11cee9){return db['ChatGroup']['describe']()[_0x69f2('0x2a')](respondWithResult(_0x11cee9,null))[_0x69f2('0x4a')](handleError(_0x11cee9,null));};exports[_0x69f2('0x4e')]=function(_0x5f3781,_0x5cccf9,_0x181196){return db[_0x69f2('0x4f')][_0x69f2('0x24')]({'where':{'ChatGroupId':_0x5f3781[_0x69f2('0x4d')]['id'],'ToId':_0x5f3781[_0x69f2('0x50')]['id'],'read':![]}})[_0x69f2('0x2a')](function(_0x20a1b5){return{'id':_['toInteger'](_0x5f3781[_0x69f2('0x4d')]['id']),'count':_0x20a1b5};})[_0x69f2('0x2a')](respondWithResult(_0x5cccf9,null))['catch'](handleError(_0x5cccf9,null));};exports[_0x69f2('0x51')]=function(_0x17396f,_0xa3cf38,_0x53456e){return db['ChatGroup'][_0x69f2('0x49')]({'where':{'id':_0x17396f[_0x69f2('0x4d')]['id']}})[_0x69f2('0x2a')](handleEntityNotFound(_0xa3cf38,null))[_0x69f2('0x2a')](function(_0x565b1c){if(_0x565b1c){return _0x565b1c[_0x69f2('0x51')](_0x17396f[_0x69f2('0x4c')][_0x69f2('0x52')],_[_0x69f2('0x53')](_0x17396f[_0x69f2('0x4c')],[_0x69f2('0x52'),'id'])||{});}})[_0x69f2('0x2a')](respondWithResult(_0xa3cf38,null))[_0x69f2('0x4a')](handleError(_0xa3cf38,null));};exports['getMembers']=function(_0x5af4a0,_0x27e064,_0x2e5b2b){var _0x23ad22={};var _0x245914={};var _0x4aa498;var _0x3eb553;return db[_0x69f2('0x45')][_0x69f2('0x54')]({'where':{'id':_0x5af4a0[_0x69f2('0x4d')]['id']}})[_0x69f2('0x2a')](handleEntityNotFound(_0x27e064,null))['then'](function(_0xe8e18e){if(_0xe8e18e){_0x4aa498=_0xe8e18e;_0x245914[_0x69f2('0x32')]=_[_0x69f2('0x35')](db['User'][_0x69f2('0x30')]);_0x245914['query']=_[_0x69f2('0x35')](_0x5af4a0[_0x69f2('0x34')]);_0x245914[_0x69f2('0x36')]=_[_0x69f2('0x37')](_0x245914[_0x69f2('0x32')],_0x245914[_0x69f2('0x34')]);_0x23ad22['attributes']=_[_0x69f2('0x37')](_0x245914[_0x69f2('0x32')],qs['fields'](_0x5af4a0[_0x69f2('0x34')][_0x69f2('0x38')]));_0x23ad22[_0x69f2('0x3a')]=_0x23ad22[_0x69f2('0x3a')][_0x69f2('0x39')]?_0x23ad22[_0x69f2('0x3a')]:_0x245914['model'];_0x23ad22[_0x69f2('0x3d')]=qs[_0x69f2('0x3e')](_0x5af4a0[_0x69f2('0x34')][_0x69f2('0x3e')]);_0x23ad22[_0x69f2('0x3f')]=qs[_0x69f2('0x36')](_[_0x69f2('0x55')](_0x5af4a0[_0x69f2('0x34')],_0x245914[_0x69f2('0x36')]));if(_0x5af4a0[_0x69f2('0x34')][_0x69f2('0x40')]){_0x23ad22[_0x69f2('0x3f')]=_['merge'](_0x23ad22[_0x69f2('0x3f')],{'$or':_['map'](_0x23ad22['attributes'],function(_0x96ecc9){var _0x5dabde={};_0x5dabde[_0x96ecc9]={'$like':'%'+_0x5af4a0[_0x69f2('0x34')][_0x69f2('0x40')]+'%'};return _0x5dabde;})});}_0x23ad22=_[_0x69f2('0x41')]({},_0x23ad22,_0x5af4a0[_0x69f2('0x43')]);return _0x4aa498[_0x69f2('0x56')](_0x23ad22);}})[_0x69f2('0x2a')](function(_0x1bd8fb){if(_0x1bd8fb){_0x3eb553=_0x1bd8fb['length'];if(!_0x5af4a0[_0x69f2('0x34')][_0x69f2('0x3b')](_0x69f2('0x3c'))){_0x23ad22['limit']=qs[_0x69f2('0x23')](_0x5af4a0['query']['limit']);_0x23ad22['offset']=qs[_0x69f2('0x21')](_0x5af4a0[_0x69f2('0x34')][_0x69f2('0x21')]);}return _0x4aa498[_0x69f2('0x56')](_0x23ad22);}})[_0x69f2('0x2a')](function(_0x3ce000){if(_0x3ce000){return _0x3ce000?{'count':_0x3eb553,'rows':_0x3ce000}:null;}})[_0x69f2('0x2a')](respondWithResult(_0x27e064,null))['catch'](handleError(_0x27e064,null));};exports[_0x69f2('0x57')]=function(_0x1861c4,_0x3d7821,_0x2549fe){return db[_0x69f2('0x45')][_0x69f2('0x49')]({'where':{'id':_0x1861c4[_0x69f2('0x4d')]['id']}})[_0x69f2('0x2a')](handleEntityNotFound(_0x3d7821,null))[_0x69f2('0x2a')](function(_0x8aeaff){if(_0x8aeaff){return _0x8aeaff[_0x69f2('0x57')](_0x1861c4[_0x69f2('0x34')][_0x69f2('0x52')]);}})[_0x69f2('0x2a')](respondWithStatusCode(_0x3d7821,null))[_0x69f2('0x4a')](handleError(_0x3d7821,null));};exports[_0x69f2('0x58')]=function(_0x5058a2,_0x50fdd8,_0x41325e){if(_0x5058a2[_0x69f2('0x4c')]['id']){delete _0x5058a2[_0x69f2('0x4c')]['id'];}return db[_0x69f2('0x45')][_0x69f2('0x49')]({'where':{'id':_0x5058a2[_0x69f2('0x4d')]['id']}})[_0x69f2('0x2a')](handleEntityNotFound(_0x50fdd8,null))[_0x69f2('0x2a')](function(_0x1526b5){if(_0x1526b5){_0x5058a2['body'][_0x69f2('0x59')]=_0x1526b5['id'];return db[_0x69f2('0x4f')][_0x69f2('0x4b')](_0x5058a2[_0x69f2('0x4c')]);}})[_0x69f2('0x2a')](respondWithResult(_0x50fdd8,null))[_0x69f2('0x4a')](handleError(_0x50fdd8,null));};exports[_0x69f2('0x5a')]=function(_0x18d021,_0x577d3f,_0x17d308){var _0x9f1da3={};var _0x154f76={};var _0x21b472;var _0x7928fa;return db[_0x69f2('0x45')][_0x69f2('0x54')]({'where':{'id':_0x18d021[_0x69f2('0x4d')]['id']}})[_0x69f2('0x2a')](handleEntityNotFound(_0x577d3f,null))[_0x69f2('0x2a')](function(_0x2e9ba7){if(_0x2e9ba7){_0x21b472=_0x2e9ba7;_0x154f76[_0x69f2('0x32')]=_['keys'](db[_0x69f2('0x4f')][_0x69f2('0x30')]);_0x154f76[_0x69f2('0x34')]=_[_0x69f2('0x35')](_0x18d021[_0x69f2('0x34')]);_0x154f76[_0x69f2('0x36')]=_[_0x69f2('0x37')](_0x154f76[_0x69f2('0x32')],_0x154f76[_0x69f2('0x34')]);_0x9f1da3['attributes']=_[_0x69f2('0x37')](_0x154f76[_0x69f2('0x32')],qs[_0x69f2('0x38')](_0x18d021['query']['fields']));_0x9f1da3[_0x69f2('0x3a')]=_0x9f1da3[_0x69f2('0x3a')]['length']?_0x9f1da3[_0x69f2('0x3a')]:_0x154f76['model'];_0x9f1da3[_0x69f2('0x3d')]=qs[_0x69f2('0x3e')](_0x18d021['query']['sort']);_0x9f1da3[_0x69f2('0x3f')]=qs['filters'](_[_0x69f2('0x55')](_0x18d021[_0x69f2('0x34')],_0x154f76[_0x69f2('0x36')]));if(_0x18d021['query'][_0x69f2('0x40')]){_0x9f1da3[_0x69f2('0x3f')]=_['merge'](_0x9f1da3['where'],{'$or':_[_0x69f2('0x33')](_0x9f1da3[_0x69f2('0x3a')],function(_0x27dce2){var _0x4672de={};_0x4672de[_0x27dce2]={'$like':'%'+_0x18d021[_0x69f2('0x34')]['filter']+'%'};return _0x4672de;})});}if(_0x18d021[_0x69f2('0x34')][_0x69f2('0x5b')]){var _0x284fa8=_0x18d021[_0x69f2('0x34')][_0x69f2('0x5b')][_0x69f2('0x5c')](',');var _0x164da8={};_0x164da8[_0x284fa8[0x0]]={'$gte':moment(_0x284fa8[0x1])[_0x69f2('0x5d')](_0x69f2('0x5e'))};_0x9f1da3[_0x69f2('0x3f')]=_[_0x69f2('0x41')](_0x9f1da3[_0x69f2('0x3f')],_0x164da8);}_0x9f1da3=_[_0x69f2('0x41')]({},_0x9f1da3,_0x18d021[_0x69f2('0x43')]);return _0x21b472[_0x69f2('0x5a')](_0x9f1da3);}})[_0x69f2('0x2a')](function(_0x5aa13e){if(_0x5aa13e){_0x7928fa=_0x5aa13e[_0x69f2('0x39')];if(!_0x18d021[_0x69f2('0x34')][_0x69f2('0x3b')](_0x69f2('0x3c'))){_0x9f1da3[_0x69f2('0x23')]=qs[_0x69f2('0x23')](_0x18d021[_0x69f2('0x34')]['limit']);_0x9f1da3[_0x69f2('0x21')]=qs['offset'](_0x18d021['query'][_0x69f2('0x21')]);}return _0x21b472[_0x69f2('0x5a')](_0x9f1da3);}})['then'](function(_0x2f0bc4){if(_0x2f0bc4){return _0x2f0bc4?{'count':_0x7928fa,'rows':_0x2f0bc4}:null;}})[_0x69f2('0x2a')](respondWithResult(_0x577d3f,null))[_0x69f2('0x4a')](handleError(_0x577d3f,null));};
\ No newline at end of file
+var _0x388a=['format','getMessages','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/environment','../../config/license/util','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./chatGroup.socket','register','status','json','offset','limit','undefined','count','Content-Range','reject','save','update','then','destroy','end','sendStatus','error','name','send','map','ChatGroup','fieldName','type','model','keys','intersection','attributes','fields','query','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','options','include','rows','catch','rawAttributes','includeAll','create','body','find','params','describe','getUnread','user','toInteger','addMembers','ids','omit','findOne','User','length','getMembers','removeMembers','ChatGroupId','ChatInternalMessage','$gte','split'];(function(_0x508b21,_0x44aaf5){var _0x5cdc61=function(_0x3ba63d){while(--_0x3ba63d){_0x508b21['push'](_0x508b21['shift']());}};_0x5cdc61(++_0x44aaf5);}(_0x388a,0x1d3));var _0xa388=function(_0x14700a,_0x150952){_0x14700a=_0x14700a-0x0;var _0x1e6155=_0x388a[_0x14700a];return _0x1e6155;};'use strict';var emlformat=require(_0xa388('0x0'));var rimraf=require(_0xa388('0x1'));var zipdir=require(_0xa388('0x2'));var jsonpatch=require(_0xa388('0x3'));var rp=require(_0xa388('0x4'));var moment=require('moment');var BPromise=require(_0xa388('0x5'));var Mustache=require(_0xa388('0x6'));var util=require('util');var path=require('path');var sox=require(_0xa388('0x7'));var csv=require(_0xa388('0x8'));var ejs=require(_0xa388('0x9'));var fs=require('fs');var fs_extra=require(_0xa388('0xa'));var _=require(_0xa388('0xb'));var squel=require(_0xa388('0xc'));var crypto=require(_0xa388('0xd'));var jsforce=require('jsforce');var deskjs=require(_0xa388('0xe'));var toCsv=require(_0xa388('0x8'));var querystring=require(_0xa388('0xf'));var Papa=require('papaparse');var Redis=require(_0xa388('0x10'));var authService=require(_0xa388('0x11'));var qs=require(_0xa388('0x12'));var as=require(_0xa388('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0xa388('0x14'));var licenseUtil=require(_0xa388('0x15'));var db=require(_0xa388('0x16'))['db'];config['redis']=_[_0xa388('0x17')](config[_0xa388('0x18')],{'host':_0xa388('0x19'),'port':0x18eb});var socket=require(_0xa388('0x1a'))(new Redis(config['redis']));require(_0xa388('0x1b'))[_0xa388('0x1c')](socket);function respondWithStatusCode(_0x3b5e5e,_0x1cd3ea){_0x1cd3ea=_0x1cd3ea||0xcc;return function(_0x57f7cd){if(_0x57f7cd){return _0x3b5e5e['sendStatus'](_0x1cd3ea);}return _0x3b5e5e[_0xa388('0x1d')](_0x1cd3ea)['end']();};}function respondWithResult(_0x483803,_0x249bec){_0x249bec=_0x249bec||0xc8;return function(_0x297e40){if(_0x297e40){return _0x483803[_0xa388('0x1d')](_0x249bec)[_0xa388('0x1e')](_0x297e40);}};}function respondWithFilteredResult(_0x377455,_0x46b64a){return function(_0x3da9b2){if(_0x3da9b2){var _0x4a60f7=typeof _0x46b64a[_0xa388('0x1f')]==='undefined'&&typeof _0x46b64a[_0xa388('0x20')]===_0xa388('0x21');var _0x1a05cb=_0x3da9b2[_0xa388('0x22')];var _0x5a8ee8=_0x4a60f7?0x0:_0x46b64a[_0xa388('0x1f')];var _0x8aef43=_0x4a60f7?_0x3da9b2[_0xa388('0x22')]:_0x46b64a[_0xa388('0x1f')]+_0x46b64a['limit'];var _0x54096a;if(_0x8aef43>=_0x1a05cb){_0x8aef43=_0x1a05cb;_0x54096a=0xc8;}else{_0x54096a=0xce;}_0x377455[_0xa388('0x1d')](_0x54096a);return _0x377455['set'](_0xa388('0x23'),_0x5a8ee8+'-'+_0x8aef43+'/'+_0x1a05cb)['json'](_0x3da9b2);}return null;};}function patchUpdates(_0x509e87){return function(_0x347f04){try{jsonpatch['apply'](_0x347f04,_0x509e87,!![]);}catch(_0x3e4cca){return BPromise[_0xa388('0x24')](_0x3e4cca);}return _0x347f04[_0xa388('0x25')]();};}function saveUpdates(_0x2fc963,_0x14beac){return function(_0x270443){if(_0x270443){return _0x270443[_0xa388('0x26')](_0x2fc963)[_0xa388('0x27')](function(_0x31eed6){return _0x31eed6;});}return null;};}function removeEntity(_0x25ac6d,_0xa345c7){return function(_0x28ebfe){if(_0x28ebfe){return _0x28ebfe[_0xa388('0x28')]()[_0xa388('0x27')](function(){_0x25ac6d[_0xa388('0x1d')](0xcc)[_0xa388('0x29')]();});}};}function handleEntityNotFound(_0x347c32,_0x368bd5){return function(_0x374670){if(!_0x374670){_0x347c32[_0xa388('0x2a')](0x194);}return _0x374670;};}function handleError(_0x1c36f5,_0x408670){_0x408670=_0x408670||0x1f4;return function(_0x549e1c){logger[_0xa388('0x2b')](_0x549e1c['stack']);if(_0x549e1c['name']){delete _0x549e1c[_0xa388('0x2c')];}_0x1c36f5[_0xa388('0x1d')](_0x408670)[_0xa388('0x2d')](_0x549e1c);};}exports['index']=function(_0x5c02d0,_0x4e967a){var _0x2f0727={},_0x2c1808={},_0x44a574={'count':0x0,'rows':[]};var _0x3a2add=_[_0xa388('0x2e')](db[_0xa388('0x2f')]['rawAttributes'],function(_0x3cb5fc){return{'name':_0x3cb5fc[_0xa388('0x30')],'type':_0x3cb5fc[_0xa388('0x31')]['key']};});_0x2c1808[_0xa388('0x32')]=_[_0xa388('0x2e')](_0x3a2add,_0xa388('0x2c'));_0x2c1808['query']=_[_0xa388('0x33')](_0x5c02d0['query']);_0x2c1808['filters']=_[_0xa388('0x34')](_0x2c1808[_0xa388('0x32')],_0x2c1808['query']);_0x2f0727[_0xa388('0x35')]=_[_0xa388('0x34')](_0x2c1808[_0xa388('0x32')],qs[_0xa388('0x36')](_0x5c02d0[_0xa388('0x37')]['fields']));_0x2f0727[_0xa388('0x35')]=_0x2f0727['attributes']['length']?_0x2f0727[_0xa388('0x35')]:_0x2c1808['model'];if(!_0x5c02d0[_0xa388('0x37')][_0xa388('0x38')](_0xa388('0x39'))){_0x2f0727['limit']=qs[_0xa388('0x20')](_0x5c02d0['query'][_0xa388('0x20')]);_0x2f0727[_0xa388('0x1f')]=qs[_0xa388('0x1f')](_0x5c02d0[_0xa388('0x37')][_0xa388('0x1f')]);}_0x2f0727[_0xa388('0x3a')]=qs['sort'](_0x5c02d0[_0xa388('0x37')][_0xa388('0x3b')]);_0x2f0727[_0xa388('0x3c')]=qs[_0xa388('0x3d')](_[_0xa388('0x3e')](_0x5c02d0['query'],_0x2c1808[_0xa388('0x3d')]),_0x3a2add);if(_0x5c02d0[_0xa388('0x37')][_0xa388('0x3f')]){_0x2f0727[_0xa388('0x3c')]=_[_0xa388('0x40')](_0x2f0727[_0xa388('0x3c')],{'$or':_[_0xa388('0x2e')](_0x3a2add,function(_0x2c8e84){if(_0x2c8e84['type']!=='VIRTUAL'){var _0x4f933e={};_0x4f933e[_0x2c8e84['name']]={'$like':'%'+_0x5c02d0[_0xa388('0x37')]['filter']+'%'};return _0x4f933e;}})});}_0x2f0727=_[_0xa388('0x40')]({},_0x2f0727,_0x5c02d0[_0xa388('0x41')]);var _0x56382a={'where':_0x2f0727['where']};return db[_0xa388('0x2f')]['count'](_0x56382a)['then'](function(_0x1775bb){_0x44a574[_0xa388('0x22')]=_0x1775bb;if(_0x5c02d0[_0xa388('0x37')]['includeAll']){_0x2f0727[_0xa388('0x42')]=[{'all':!![]}];}return db[_0xa388('0x2f')]['findAll'](_0x2f0727);})['then'](function(_0x203b5d){_0x44a574[_0xa388('0x43')]=_0x203b5d;return _0x44a574;})['then'](respondWithFilteredResult(_0x4e967a,_0x2f0727))[_0xa388('0x44')](handleError(_0x4e967a,null));};exports['show']=function(_0x39b2b1,_0x538e90){var _0x1779d8={'raw':!![],'where':{'id':_0x39b2b1['params']['id']}},_0x2ae844={};_0x2ae844['model']=_[_0xa388('0x33')](db[_0xa388('0x2f')][_0xa388('0x45')]);_0x2ae844[_0xa388('0x37')]=_[_0xa388('0x33')](_0x39b2b1['query']);_0x2ae844[_0xa388('0x3d')]=_[_0xa388('0x34')](_0x2ae844[_0xa388('0x32')],_0x2ae844['query']);_0x1779d8[_0xa388('0x35')]=_[_0xa388('0x34')](_0x2ae844[_0xa388('0x32')],qs[_0xa388('0x36')](_0x39b2b1[_0xa388('0x37')][_0xa388('0x36')]));_0x1779d8[_0xa388('0x35')]=_0x1779d8['attributes']['length']?_0x1779d8[_0xa388('0x35')]:_0x2ae844[_0xa388('0x32')];if(_0x39b2b1[_0xa388('0x37')][_0xa388('0x46')]){_0x1779d8[_0xa388('0x42')]=[{'all':!![]}];}_0x1779d8=_[_0xa388('0x40')]({},_0x1779d8,_0x39b2b1['options']);return db['ChatGroup']['find'](_0x1779d8)[_0xa388('0x27')](handleEntityNotFound(_0x538e90,null))[_0xa388('0x27')](respondWithResult(_0x538e90,null))[_0xa388('0x44')](handleError(_0x538e90,null));};exports[_0xa388('0x47')]=function(_0x2c5ba6,_0x471d2d){return db[_0xa388('0x2f')][_0xa388('0x47')](_0x2c5ba6['body'],{})[_0xa388('0x27')](respondWithResult(_0x471d2d,0xc9))[_0xa388('0x44')](handleError(_0x471d2d,null));};exports[_0xa388('0x26')]=function(_0x159bde,_0x34f47c){if(_0x159bde['body']['id']){delete _0x159bde[_0xa388('0x48')]['id'];}return db['ChatGroup'][_0xa388('0x49')]({'where':{'id':_0x159bde[_0xa388('0x4a')]['id']}})[_0xa388('0x27')](handleEntityNotFound(_0x34f47c,null))[_0xa388('0x27')](saveUpdates(_0x159bde[_0xa388('0x48')],null))[_0xa388('0x27')](respondWithResult(_0x34f47c,null))[_0xa388('0x44')](handleError(_0x34f47c,null));};exports[_0xa388('0x28')]=function(_0x32b4d5,_0x3759e0){return db[_0xa388('0x2f')][_0xa388('0x49')]({'where':{'id':_0x32b4d5[_0xa388('0x4a')]['id']}})['then'](handleEntityNotFound(_0x3759e0,null))[_0xa388('0x27')](removeEntity(_0x3759e0,null))[_0xa388('0x44')](handleError(_0x3759e0,null));};exports[_0xa388('0x4b')]=function(_0x5101fc,_0x411dac){return db[_0xa388('0x2f')][_0xa388('0x4b')]()[_0xa388('0x27')](respondWithResult(_0x411dac,null))[_0xa388('0x44')](handleError(_0x411dac,null));};exports[_0xa388('0x4c')]=function(_0x199577,_0xc69b71,_0x4a8523){return db['ChatInternalMessage'][_0xa388('0x22')]({'where':{'ChatGroupId':_0x199577['params']['id'],'ToId':_0x199577[_0xa388('0x4d')]['id'],'read':![]}})[_0xa388('0x27')](function(_0x3eeb03){return{'id':_[_0xa388('0x4e')](_0x199577[_0xa388('0x4a')]['id']),'count':_0x3eeb03};})[_0xa388('0x27')](respondWithResult(_0xc69b71,null))['catch'](handleError(_0xc69b71,null));};exports[_0xa388('0x4f')]=function(_0x53e1f6,_0x53b4ab,_0x5acd71){return db['ChatGroup'][_0xa388('0x49')]({'where':{'id':_0x53e1f6[_0xa388('0x4a')]['id']}})['then'](handleEntityNotFound(_0x53b4ab,null))[_0xa388('0x27')](function(_0x4517a5){if(_0x4517a5){return _0x4517a5[_0xa388('0x4f')](_0x53e1f6[_0xa388('0x48')][_0xa388('0x50')],_[_0xa388('0x51')](_0x53e1f6[_0xa388('0x48')],['ids','id'])||{});}})['then'](respondWithResult(_0x53b4ab,null))['catch'](handleError(_0x53b4ab,null));};exports['getMembers']=function(_0x3cc146,_0x484dc1,_0x165348){var _0x27bbeb={};var _0x2981c5={};var _0x3839f2;var _0x4523fa;return db[_0xa388('0x2f')][_0xa388('0x52')]({'where':{'id':_0x3cc146[_0xa388('0x4a')]['id']}})[_0xa388('0x27')](handleEntityNotFound(_0x484dc1,null))[_0xa388('0x27')](function(_0x2475a3){if(_0x2475a3){_0x3839f2=_0x2475a3;_0x2981c5[_0xa388('0x32')]=_[_0xa388('0x33')](db[_0xa388('0x53')]['rawAttributes']);_0x2981c5[_0xa388('0x37')]=_['keys'](_0x3cc146['query']);_0x2981c5['filters']=_[_0xa388('0x34')](_0x2981c5['model'],_0x2981c5[_0xa388('0x37')]);_0x27bbeb[_0xa388('0x35')]=_[_0xa388('0x34')](_0x2981c5[_0xa388('0x32')],qs[_0xa388('0x36')](_0x3cc146[_0xa388('0x37')][_0xa388('0x36')]));_0x27bbeb[_0xa388('0x35')]=_0x27bbeb[_0xa388('0x35')][_0xa388('0x54')]?_0x27bbeb['attributes']:_0x2981c5[_0xa388('0x32')];_0x27bbeb[_0xa388('0x3a')]=qs['sort'](_0x3cc146['query']['sort']);_0x27bbeb[_0xa388('0x3c')]=qs[_0xa388('0x3d')](_[_0xa388('0x3e')](_0x3cc146[_0xa388('0x37')],_0x2981c5[_0xa388('0x3d')]));if(_0x3cc146[_0xa388('0x37')][_0xa388('0x3f')]){_0x27bbeb[_0xa388('0x3c')]=_[_0xa388('0x40')](_0x27bbeb[_0xa388('0x3c')],{'$or':_[_0xa388('0x2e')](_0x27bbeb[_0xa388('0x35')],function(_0x4b1707){var _0xfa6859={};_0xfa6859[_0x4b1707]={'$like':'%'+_0x3cc146['query']['filter']+'%'};return _0xfa6859;})});}_0x27bbeb=_[_0xa388('0x40')]({},_0x27bbeb,_0x3cc146[_0xa388('0x41')]);return _0x3839f2[_0xa388('0x55')](_0x27bbeb);}})[_0xa388('0x27')](function(_0x23bc98){if(_0x23bc98){_0x4523fa=_0x23bc98[_0xa388('0x54')];if(!_0x3cc146[_0xa388('0x37')][_0xa388('0x38')]('nolimit')){_0x27bbeb[_0xa388('0x20')]=qs[_0xa388('0x20')](_0x3cc146[_0xa388('0x37')]['limit']);_0x27bbeb['offset']=qs[_0xa388('0x1f')](_0x3cc146[_0xa388('0x37')][_0xa388('0x1f')]);}return _0x3839f2['getMembers'](_0x27bbeb);}})[_0xa388('0x27')](function(_0x21daa1){if(_0x21daa1){return _0x21daa1?{'count':_0x4523fa,'rows':_0x21daa1}:null;}})[_0xa388('0x27')](respondWithResult(_0x484dc1,null))['catch'](handleError(_0x484dc1,null));};exports[_0xa388('0x56')]=function(_0x5e72fe,_0x3051e0,_0x4c6331){return db[_0xa388('0x2f')][_0xa388('0x49')]({'where':{'id':_0x5e72fe[_0xa388('0x4a')]['id']}})[_0xa388('0x27')](handleEntityNotFound(_0x3051e0,null))[_0xa388('0x27')](function(_0x1da61b){if(_0x1da61b){return _0x1da61b[_0xa388('0x56')](_0x5e72fe[_0xa388('0x37')][_0xa388('0x50')]);}})[_0xa388('0x27')](respondWithStatusCode(_0x3051e0,null))['catch'](handleError(_0x3051e0,null));};exports['addMessage']=function(_0x420d7f,_0x3e8e61,_0x39396f){if(_0x420d7f[_0xa388('0x48')]['id']){delete _0x420d7f[_0xa388('0x48')]['id'];}return db[_0xa388('0x2f')][_0xa388('0x49')]({'where':{'id':_0x420d7f[_0xa388('0x4a')]['id']}})[_0xa388('0x27')](handleEntityNotFound(_0x3e8e61,null))[_0xa388('0x27')](function(_0x358c01){if(_0x358c01){_0x420d7f['body'][_0xa388('0x57')]=_0x358c01['id'];return db[_0xa388('0x58')][_0xa388('0x47')](_0x420d7f[_0xa388('0x48')]);}})['then'](respondWithResult(_0x3e8e61,null))[_0xa388('0x44')](handleError(_0x3e8e61,null));};exports['getMessages']=function(_0x5c5bfd,_0x4239f6,_0x359cc7){var _0x9b57b7={};var _0x163ae1={};var _0x444ca3;var _0x3ef598;return db[_0xa388('0x2f')][_0xa388('0x52')]({'where':{'id':_0x5c5bfd[_0xa388('0x4a')]['id']}})[_0xa388('0x27')](handleEntityNotFound(_0x4239f6,null))['then'](function(_0x46fc14){if(_0x46fc14){_0x444ca3=_0x46fc14;_0x163ae1[_0xa388('0x32')]=_['keys'](db[_0xa388('0x58')][_0xa388('0x45')]);_0x163ae1[_0xa388('0x37')]=_['keys'](_0x5c5bfd[_0xa388('0x37')]);_0x163ae1[_0xa388('0x3d')]=_['intersection'](_0x163ae1['model'],_0x163ae1['query']);_0x9b57b7[_0xa388('0x35')]=_[_0xa388('0x34')](_0x163ae1['model'],qs[_0xa388('0x36')](_0x5c5bfd[_0xa388('0x37')][_0xa388('0x36')]));_0x9b57b7[_0xa388('0x35')]=_0x9b57b7[_0xa388('0x35')][_0xa388('0x54')]?_0x9b57b7[_0xa388('0x35')]:_0x163ae1[_0xa388('0x32')];_0x9b57b7[_0xa388('0x3a')]=qs[_0xa388('0x3b')](_0x5c5bfd[_0xa388('0x37')][_0xa388('0x3b')]);_0x9b57b7[_0xa388('0x3c')]=qs[_0xa388('0x3d')](_[_0xa388('0x3e')](_0x5c5bfd[_0xa388('0x37')],_0x163ae1['filters']));if(_0x5c5bfd[_0xa388('0x37')][_0xa388('0x3f')]){_0x9b57b7[_0xa388('0x3c')]=_[_0xa388('0x40')](_0x9b57b7[_0xa388('0x3c')],{'$or':_[_0xa388('0x2e')](_0x9b57b7[_0xa388('0x35')],function(_0x338604){var _0xf9435a={};_0xf9435a[_0x338604]={'$like':'%'+_0x5c5bfd[_0xa388('0x37')][_0xa388('0x3f')]+'%'};return _0xf9435a;})});}if(_0x5c5bfd['query'][_0xa388('0x59')]){var _0xd4e99=_0x5c5bfd['query'][_0xa388('0x59')][_0xa388('0x5a')](',');var _0x457bac={};_0x457bac[_0xd4e99[0x0]]={'$gte':moment(_0xd4e99[0x1])[_0xa388('0x5b')]('YYYY-MM-DD\x20HH:mm:ss')};_0x9b57b7[_0xa388('0x3c')]=_[_0xa388('0x40')](_0x9b57b7[_0xa388('0x3c')],_0x457bac);}_0x9b57b7=_[_0xa388('0x40')]({},_0x9b57b7,_0x5c5bfd[_0xa388('0x41')]);return _0x444ca3[_0xa388('0x5c')](_0x9b57b7);}})[_0xa388('0x27')](function(_0x295dff){if(_0x295dff){_0x3ef598=_0x295dff[_0xa388('0x54')];if(!_0x5c5bfd[_0xa388('0x37')][_0xa388('0x38')](_0xa388('0x39'))){_0x9b57b7[_0xa388('0x20')]=qs['limit'](_0x5c5bfd[_0xa388('0x37')][_0xa388('0x20')]);_0x9b57b7[_0xa388('0x1f')]=qs[_0xa388('0x1f')](_0x5c5bfd[_0xa388('0x37')][_0xa388('0x1f')]);}return _0x444ca3[_0xa388('0x5c')](_0x9b57b7);}})[_0xa388('0x27')](function(_0xd0e5a9){if(_0xd0e5a9){return _0xd0e5a9?{'count':_0x3ef598,'rows':_0xd0e5a9}:null;}})[_0xa388('0x27')](respondWithResult(_0x4239f6,null))[_0xa388('0x44')](handleError(_0x4239f6,null));};
\ No newline at end of file
index e941341..9f95b50 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf628=['exports','events','../../mysqldb','ChatGroup','setMaxListeners','emit','hasOwnProperty'];(function(_0x48fa79,_0x5d6937){var _0x19cf49=function(_0x1f46ff){while(--_0x1f46ff){_0x48fa79['push'](_0x48fa79['shift']());}};_0x19cf49(++_0x5d6937);}(_0xf628,0x7f));var _0x8f62=function(_0x2a7503,_0x56ae52){_0x2a7503=_0x2a7503-0x0;var _0x348f22=_0xf628[_0x2a7503];return _0x348f22;};'use strict';var EventEmitter=require(_0x8f62('0x0'));var ChatGroup=require(_0x8f62('0x1'))['db'][_0x8f62('0x2')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0x8f62('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x393c04){return function(_0x18593f,_0x1706d2,_0x2377a5){ChatGroupEvents[_0x8f62('0x4')](_0x393c04+':'+_0x18593f['id'],_0x18593f);ChatGroupEvents['emit'](_0x393c04,_0x18593f);_0x2377a5(null);};}for(var e in events){if(events[_0x8f62('0x5')](e)){var event=events[e];ChatGroup['hook'](e,emitEvent(event));}}module[_0x8f62('0x6')]=ChatGroupEvents;
\ No newline at end of file
+var _0x4e47=['setMaxListeners','save','update','remove','emit','hook','exports','ChatGroup'];(function(_0x260054,_0x2ba4d1){var _0x1b5d6d=function(_0x31c2b7){while(--_0x31c2b7){_0x260054['push'](_0x260054['shift']());}};_0x1b5d6d(++_0x2ba4d1);}(_0x4e47,0x17f));var _0x74e4=function(_0x2b4d34,_0x3c2f3b){_0x2b4d34=_0x2b4d34-0x0;var _0x30f287=_0x4e47[_0x2b4d34];return _0x30f287;};'use strict';var EventEmitter=require('events');var ChatGroup=require('../../mysqldb')['db'][_0x74e4('0x0')];var ChatGroupEvents=new EventEmitter();ChatGroupEvents[_0x74e4('0x1')](0x0);var events={'afterCreate':_0x74e4('0x2'),'afterUpdate':_0x74e4('0x3'),'afterDestroy':_0x74e4('0x4')};function emitEvent(_0x239ba1){return function(_0xd2cf98,_0x452a4f,_0x5d03b8){ChatGroupEvents[_0x74e4('0x5')](_0x239ba1+':'+_0xd2cf98['id'],_0xd2cf98);ChatGroupEvents[_0x74e4('0x5')](_0x239ba1,_0xd2cf98);_0x5d03b8(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatGroup[_0x74e4('0x6')](e,emitEvent(event));}}module[_0x74e4('0x7')]=ChatGroupEvents;
\ No newline at end of file
index 9e54f48..5990036 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xff9b=['bluebird','path','rimraf','../../config/environment','./chatGroup.attributes','exports','define','ChatGroup','lodash','util','../../config/logger','api','moment'];(function(_0x3342a1,_0x1db16d){var _0x3bb43b=function(_0x16b48c){while(--_0x16b48c){_0x3342a1['push'](_0x3342a1['shift']());}};_0x3bb43b(++_0x1db16d);}(_0xff9b,0x19b));var _0xbff9=function(_0x8f0755,_0x9b2637){_0x8f0755=_0x8f0755-0x0;var _0x2b2997=_0xff9b[_0x8f0755];return _0x2b2997;};'use strict';var _=require(_0xbff9('0x0'));var util=require(_0xbff9('0x1'));var logger=require(_0xbff9('0x2'))(_0xbff9('0x3'));var moment=require(_0xbff9('0x4'));var BPromise=require(_0xbff9('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xbff9('0x6'));var rimraf=require(_0xbff9('0x7'));var config=require(_0xbff9('0x8'));var attributes=require(_0xbff9('0x9'));module[_0xbff9('0xa')]=function(_0x54eb18,_0x1721e0){return _0x54eb18[_0xbff9('0xb')](_0xbff9('0xc'),attributes,{'tableName':'chat_groups','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4608=['lodash','api','moment','bluebird','request-promise','rimraf','exports','chat_groups'];(function(_0x4ba3de,_0x44d777){var _0x32c87a=function(_0x13eb81){while(--_0x13eb81){_0x4ba3de['push'](_0x4ba3de['shift']());}};_0x32c87a(++_0x44d777);}(_0x4608,0xb0));var _0x8460=function(_0x497c82,_0x1a9e1f){_0x497c82=_0x497c82-0x0;var _0x334e0f=_0x4608[_0x497c82];return _0x334e0f;};'use strict';var _=require(_0x8460('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x8460('0x1'));var moment=require(_0x8460('0x2'));var BPromise=require(_0x8460('0x3'));var rp=require(_0x8460('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x8460('0x5'));var config=require('../../config/environment');var attributes=require('./chatGroup.attributes');module[_0x8460('0x6')]=function(_0x33c6e5,_0x59da3b){return _0x33c6e5['define']('ChatGroup',attributes,{'tableName':_0x8460('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 6e41ca1..83c47c4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3821=['./chatGroup.socket','register','request','then','info','ChatGroup,\x20%s,\x20%s','request\x20sent','debug','ChatGroup,\x20%s,\x20%s,\x20%s','error','message','result','catch','lodash','bluebird','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter'];(function(_0x58fa61,_0xc86740){var _0x1cc982=function(_0x2cb267){while(--_0x2cb267){_0x58fa61['push'](_0x58fa61['shift']());}};_0x1cc982(++_0xc86740);}(_0x3821,0xf7));var _0x1382=function(_0x2d3c35,_0x17c395){_0x2d3c35=_0x2d3c35-0x0;var _0x3ac24f=_0x3821[_0x2d3c35];return _0x3ac24f;};'use strict';var _=require(_0x1382('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x1382('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1382('0x2'))['db'];var utils=require('../../config/utils');var logger=require(_0x1382('0x3'))(_0x1382('0x4'));var config=require(_0x1382('0x5'));var jayson=require(_0x1382('0x6'));var client=jayson[_0x1382('0x7')][_0x1382('0x8')]({'port':0x232a});config[_0x1382('0x9')]=_[_0x1382('0xa')](config[_0x1382('0x9')],{'host':_0x1382('0xb'),'port':0x18eb});var socket=require(_0x1382('0xc'))(new Redis(config['redis']));require(_0x1382('0xd'))[_0x1382('0xe')](socket);function respondWithRpcPromise(_0xe113ee,_0x525121,_0x3bf460){return new BPromise(function(_0x1fe6dc,_0x25272a){return client[_0x1382('0xf')](_0xe113ee,_0x3bf460)[_0x1382('0x10')](function(_0x30f40f){logger[_0x1382('0x11')](_0x1382('0x12'),_0x525121,_0x1382('0x13'));logger[_0x1382('0x14')](_0x1382('0x15'),_0x525121,'request\x20sent',JSON['stringify'](_0x30f40f));if(_0x30f40f[_0x1382('0x16')]){if(_0x30f40f[_0x1382('0x16')]['code']===0x1f4){logger[_0x1382('0x16')]('ChatGroup,\x20%s,\x20%s',_0x525121,_0x30f40f[_0x1382('0x16')]['message']);return _0x25272a(_0x30f40f[_0x1382('0x16')][_0x1382('0x17')]);}logger[_0x1382('0x16')](_0x1382('0x12'),_0x525121,_0x30f40f[_0x1382('0x16')][_0x1382('0x17')]);return _0x1fe6dc(_0x30f40f[_0x1382('0x16')][_0x1382('0x17')]);}else{logger[_0x1382('0x11')](_0x1382('0x12'),_0x525121,_0x1382('0x13'));_0x1fe6dc(_0x30f40f[_0x1382('0x18')]['message']);}})[_0x1382('0x19')](function(_0x37f030){logger[_0x1382('0x16')](_0x1382('0x12'),_0x525121,_0x37f030);_0x25272a(_0x37f030);});});}
\ No newline at end of file
+var _0x35e2=['ChatGroup,\x20%s,\x20%s','request\x20sent','debug','ChatGroup,\x20%s,\x20%s,\x20%s','stringify','error','message','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','register','request','then','info'];(function(_0x213ea2,_0x4a4405){var _0x579151=function(_0x4e723f){while(--_0x4e723f){_0x213ea2['push'](_0x213ea2['shift']());}};_0x579151(++_0x4a4405);}(_0x35e2,0x1ed));var _0x235e=function(_0xdea41a,_0x552987){_0xdea41a=_0xdea41a-0x0;var _0x15d0d8=_0x35e2[_0xdea41a];return _0x15d0d8;};'use strict';var _=require(_0x235e('0x0'));var util=require('util');var moment=require(_0x235e('0x1'));var BPromise=require(_0x235e('0x2'));var rs=require(_0x235e('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x235e('0x4'))['db'];var utils=require(_0x235e('0x5'));var logger=require(_0x235e('0x6'))(_0x235e('0x7'));var config=require(_0x235e('0x8'));var jayson=require(_0x235e('0x9'));var client=jayson[_0x235e('0xa')][_0x235e('0xb')]({'port':0x232a});config[_0x235e('0xc')]=_[_0x235e('0xd')](config[_0x235e('0xc')],{'host':_0x235e('0xe'),'port':0x18eb});var socket=require(_0x235e('0xf'))(new Redis(config['redis']));require('./chatGroup.socket')[_0x235e('0x10')](socket);function respondWithRpcPromise(_0x41f1c8,_0x4a3ec7,_0x40dc4d){return new BPromise(function(_0x22a10d,_0x247da6){return client[_0x235e('0x11')](_0x41f1c8,_0x40dc4d)[_0x235e('0x12')](function(_0x1a85f6){logger[_0x235e('0x13')](_0x235e('0x14'),_0x4a3ec7,_0x235e('0x15'));logger[_0x235e('0x16')](_0x235e('0x17'),_0x4a3ec7,_0x235e('0x15'),JSON[_0x235e('0x18')](_0x1a85f6));if(_0x1a85f6[_0x235e('0x19')]){if(_0x1a85f6['error']['code']===0x1f4){logger[_0x235e('0x19')](_0x235e('0x14'),_0x4a3ec7,_0x1a85f6[_0x235e('0x19')][_0x235e('0x1a')]);return _0x247da6(_0x1a85f6[_0x235e('0x19')][_0x235e('0x1a')]);}logger['error']('ChatGroup,\x20%s,\x20%s',_0x4a3ec7,_0x1a85f6[_0x235e('0x19')][_0x235e('0x1a')]);return _0x22a10d(_0x1a85f6[_0x235e('0x19')][_0x235e('0x1a')]);}else{logger[_0x235e('0x13')](_0x235e('0x14'),_0x4a3ec7,_0x235e('0x15'));_0x22a10d(_0x1a85f6['result'][_0x235e('0x1a')]);}})['catch'](function(_0x3b4ce9){logger[_0x235e('0x19')](_0x235e('0x14'),_0x4a3ec7,_0x3b4ce9);_0x247da6(_0x3b4ce9);});});}
\ No newline at end of file
index 111efe4..c5e3cf2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe93e=['emit','length','./chatGroup.events','save','remove','update'];(function(_0x568af0,_0x5520fa){var _0x5979ae=function(_0x4ab544){while(--_0x4ab544){_0x568af0['push'](_0x568af0['shift']());}};_0x5979ae(++_0x5520fa);}(_0xe93e,0x8c));var _0xee93=function(_0x449166,_0x35d5c7){_0x449166=_0x449166-0x0;var _0x37916d=_0xe93e[_0x449166];return _0x37916d;};'use strict';var ChatGroupEvents=require(_0xee93('0x0'));var events=[_0xee93('0x1'),_0xee93('0x2'),_0xee93('0x3')];function createListener(_0x176c28,_0x1e5c96){return function(_0x91d4cb){_0x1e5c96[_0xee93('0x4')](_0x176c28,_0x91d4cb);};}function removeListener(_0x3fda59,_0x3a106c){return function(){ChatGroupEvents['removeListener'](_0x3fda59,_0x3a106c);};}exports['register']=function(_0xa5bf2e){for(var _0x359c47=0x0,_0x1b10ce=events[_0xee93('0x5')];_0x359c47<_0x1b10ce;_0x359c47++){var _0x126002=events[_0x359c47];var _0x6de3bb=createListener('chatGroup:'+_0x126002,_0xa5bf2e);ChatGroupEvents['on'](_0x126002,_0x6de3bb);}};
\ No newline at end of file
+var _0xe124=['chatGroup:','save','remove','update','emit','removeListener','register','length'];(function(_0x3e7e57,_0x83cf4a){var _0x111008=function(_0xfdd188){while(--_0xfdd188){_0x3e7e57['push'](_0x3e7e57['shift']());}};_0x111008(++_0x83cf4a);}(_0xe124,0x81));var _0x4e12=function(_0x2f87c0,_0x291f45){_0x2f87c0=_0x2f87c0-0x0;var _0x400576=_0xe124[_0x2f87c0];return _0x400576;};'use strict';var ChatGroupEvents=require('./chatGroup.events');var events=[_0x4e12('0x0'),_0x4e12('0x1'),_0x4e12('0x2')];function createListener(_0x4c6edc,_0x110e17){return function(_0x5e255a){_0x110e17[_0x4e12('0x3')](_0x4c6edc,_0x5e255a);};}function removeListener(_0x11c669,_0x406129){return function(){ChatGroupEvents[_0x4e12('0x4')](_0x11c669,_0x406129);};}exports[_0x4e12('0x5')]=function(_0x3705c5){for(var _0x2b0ea7=0x0,_0x27f2c0=events[_0x4e12('0x6')];_0x2b0ea7<_0x27f2c0;_0x2b0ea7++){var _0x261621=events[_0x2b0ea7];var _0x73b2d6=createListener(_0x4e12('0x7')+_0x261621,_0x3705c5);ChatGroupEvents['on'](_0x261621,_0x73b2d6);}};
\ No newline at end of file
index 861d4ed..d8ab793 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8fbc=['fs-extra','../../components/auth/service','../../config/environment','./chatGroup.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/unread','getMembers','/:id/messages','getMessages','post','addMessage','put','update','delete','destroy','removeMembers','exports','multer','path','connect-timeout','express','Router'];(function(_0x47e70a,_0x1c3714){var _0x3a9900=function(_0x19ec6a){while(--_0x19ec6a){_0x47e70a['push'](_0x47e70a['shift']());}};_0x3a9900(++_0x1c3714);}(_0x8fbc,0x6b));var _0xc8fb=function(_0x3bff3c,_0x5e2ec6){_0x3bff3c=_0x3bff3c-0x0;var _0x82d3dd=_0x8fbc[_0x3bff3c];return _0x82d3dd;};'use strict';var multer=require(_0xc8fb('0x0'));var util=require('util');var path=require(_0xc8fb('0x1'));var timeout=require(_0xc8fb('0x2'));var express=require(_0xc8fb('0x3'));var router=express[_0xc8fb('0x4')]();var fs_extra=require(_0xc8fb('0x5'));var auth=require(_0xc8fb('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xc8fb('0x7'));var controller=require(_0xc8fb('0x8'));router[_0xc8fb('0x9')]('/',auth[_0xc8fb('0xa')](),controller[_0xc8fb('0xb')]);router[_0xc8fb('0x9')](_0xc8fb('0xc'),auth[_0xc8fb('0xa')](),controller[_0xc8fb('0xd')]);router[_0xc8fb('0x9')](_0xc8fb('0xe'),auth['isAuthenticated'](),controller[_0xc8fb('0xf')]);router[_0xc8fb('0x9')](_0xc8fb('0x10'),auth['isAuthenticated'](),controller['getUnread']);router[_0xc8fb('0x9')]('/:id/members',auth[_0xc8fb('0xa')](),controller[_0xc8fb('0x11')]);router[_0xc8fb('0x9')](_0xc8fb('0x12'),auth[_0xc8fb('0xa')](),controller[_0xc8fb('0x13')]);router['post']('/',auth[_0xc8fb('0xa')](),controller['create']);router[_0xc8fb('0x14')]('/:id/members',auth[_0xc8fb('0xa')](),controller['addMembers']);router[_0xc8fb('0x14')]('/:id/messages',auth[_0xc8fb('0xa')](),controller[_0xc8fb('0x15')]);router[_0xc8fb('0x16')](_0xc8fb('0xe'),auth[_0xc8fb('0xa')](),controller[_0xc8fb('0x17')]);router[_0xc8fb('0x18')](_0xc8fb('0xe'),auth[_0xc8fb('0xa')](),controller[_0xc8fb('0x19')]);router[_0xc8fb('0x18')]('/:id/members',auth[_0xc8fb('0xa')](),controller[_0xc8fb('0x1a')]);module[_0xc8fb('0x1b')]=router;
\ No newline at end of file
+var _0x0704=['create','addMembers','/:id/messages','addMessage','put','update','destroy','delete','multer','path','connect-timeout','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/:id','show','getUnread','/:id/members','getMessages','post'];(function(_0x2416e8,_0x3343fb){var _0x3c56a4=function(_0x2b840a){while(--_0x2b840a){_0x2416e8['push'](_0x2416e8['shift']());}};_0x3c56a4(++_0x3343fb);}(_0x0704,0xa9));var _0x4070=function(_0x25b78d,_0x347586){_0x25b78d=_0x25b78d-0x0;var _0x3d04f5=_0x0704[_0x25b78d];return _0x3d04f5;};'use strict';var multer=require(_0x4070('0x0'));var util=require('util');var path=require(_0x4070('0x1'));var timeout=require(_0x4070('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x4070('0x3'));var auth=require(_0x4070('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x4070('0x5'));var controller=require('./chatGroup.controller');router[_0x4070('0x6')]('/',auth[_0x4070('0x7')](),controller[_0x4070('0x8')]);router['get']('/describe',auth[_0x4070('0x7')](),controller['describe']);router[_0x4070('0x6')](_0x4070('0x9'),auth[_0x4070('0x7')](),controller[_0x4070('0xa')]);router[_0x4070('0x6')]('/:id/unread',auth[_0x4070('0x7')](),controller[_0x4070('0xb')]);router[_0x4070('0x6')](_0x4070('0xc'),auth[_0x4070('0x7')](),controller['getMembers']);router[_0x4070('0x6')]('/:id/messages',auth[_0x4070('0x7')](),controller[_0x4070('0xd')]);router[_0x4070('0xe')]('/',auth[_0x4070('0x7')](),controller[_0x4070('0xf')]);router[_0x4070('0xe')]('/:id/members',auth[_0x4070('0x7')](),controller[_0x4070('0x10')]);router[_0x4070('0xe')](_0x4070('0x11'),auth[_0x4070('0x7')](),controller[_0x4070('0x12')]);router[_0x4070('0x13')](_0x4070('0x9'),auth[_0x4070('0x7')](),controller[_0x4070('0x14')]);router['delete'](_0x4070('0x9'),auth[_0x4070('0x7')](),controller[_0x4070('0x15')]);router[_0x4070('0x16')](_0x4070('0xc'),auth[_0x4070('0x7')](),controller['removeMembers']);module['exports']=router;
\ No newline at end of file
index e4f7558..b358cea 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x959c=['thumb','TEXT','DATE','STRING','long','out','sequelize','BOOLEAN','INTEGER','ENUM','star'];(function(_0x367361,_0x311488){var _0x195d2d=function(_0x2b20a4){while(--_0x2b20a4){_0x367361['push'](_0x367361['shift']());}};_0x195d2d(++_0x311488);}(_0x959c,0x1be));var _0xc959=function(_0x29aa41,_0x512deb){_0x29aa41=_0x29aa41-0x0;var _0x3947d6=_0x959c[_0x29aa41];return _0x3947d6;};'use strict';var Sequelize=require(_0xc959('0x0'));module['exports']={'closed':{'type':Sequelize[_0xc959('0x1')],'defaultValue':![]},'ratingValue':{'type':Sequelize[_0xc959('0x2')]},'ratingType':{'type':Sequelize[_0xc959('0x3')](_0xc959('0x4'),_0xc959('0x5')),'defaultValue':_0xc959('0x4')},'ratingMessage':{'type':Sequelize[_0xc959('0x6')]},'pathTranscript':{'type':Sequelize[_0xc959('0x6')]},'mailTranscript':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize[_0xc959('0x7')]},'disposition':{'type':Sequelize[_0xc959('0x8')]},'secondDisposition':{'type':Sequelize[_0xc959('0x8')]},'thirdDisposition':{'type':Sequelize[_0xc959('0x8')]},'note':{'type':Sequelize[_0xc959('0x8')]},'browserName':{'type':Sequelize[_0xc959('0x8')]},'browserVersion':{'type':Sequelize[_0xc959('0x8')]},'osName':{'type':Sequelize[_0xc959('0x8')]},'osVersion':{'type':Sequelize['STRING']},'deviceModel':{'type':Sequelize[_0xc959('0x8')]},'deviceVendor':{'type':Sequelize[_0xc959('0x8')]},'deviceType':{'type':Sequelize['STRING']},'referer':{'type':Sequelize[_0xc959('0x6')]},'customerIp':{'type':Sequelize[_0xc959('0x8')]},'formData':{'type':Sequelize[_0xc959('0x6')](_0xc959('0x9'))},'read1stAt':{'type':Sequelize[_0xc959('0x7')]},'lastMsgAt':{'type':Sequelize[_0xc959('0x7')]},'lastMsgDirection':{'type':Sequelize[_0xc959('0x3')]('in',_0xc959('0xa')),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize[_0xc959('0x8')]},'customerPort':{'type':Sequelize[_0xc959('0x8')]},'vidaooSessionId':{'type':Sequelize[_0xc959('0x6')]},'autoreplyExecuted':{'type':Sequelize[_0xc959('0x1')],'defaultValue':![]},'queueId':{'type':Sequelize[_0xc959('0x2')]}};
\ No newline at end of file
+var _0x7c9e=['exports','BOOLEAN','INTEGER','star','thumb','TEXT','STRING','DATE','ENUM','out','sequelize'];(function(_0x2710a1,_0x7844a0){var _0x1bd388=function(_0x2d08cd){while(--_0x2d08cd){_0x2710a1['push'](_0x2710a1['shift']());}};_0x1bd388(++_0x7844a0);}(_0x7c9e,0x1a1));var _0xe7c9=function(_0x2fc379,_0x1084e0){_0x2fc379=_0x2fc379-0x0;var _0x4b1b25=_0x7c9e[_0x2fc379];return _0x4b1b25;};'use strict';var Sequelize=require(_0xe7c9('0x0'));module[_0xe7c9('0x1')]={'closed':{'type':Sequelize[_0xe7c9('0x2')],'defaultValue':![]},'ratingValue':{'type':Sequelize[_0xe7c9('0x3')]},'ratingType':{'type':Sequelize['ENUM'](_0xe7c9('0x4'),_0xe7c9('0x5')),'defaultValue':'star'},'ratingMessage':{'type':Sequelize[_0xe7c9('0x6')]},'pathTranscript':{'type':Sequelize[_0xe7c9('0x6')]},'mailTranscript':{'type':Sequelize[_0xe7c9('0x7')],'validate':{'isEmail':!![]}},'closedAt':{'type':Sequelize[_0xe7c9('0x8')]},'disposition':{'type':Sequelize[_0xe7c9('0x7')]},'secondDisposition':{'type':Sequelize[_0xe7c9('0x7')]},'thirdDisposition':{'type':Sequelize[_0xe7c9('0x7')]},'note':{'type':Sequelize[_0xe7c9('0x7')]},'browserName':{'type':Sequelize[_0xe7c9('0x7')]},'browserVersion':{'type':Sequelize['STRING']},'osName':{'type':Sequelize[_0xe7c9('0x7')]},'osVersion':{'type':Sequelize[_0xe7c9('0x7')]},'deviceModel':{'type':Sequelize[_0xe7c9('0x7')]},'deviceVendor':{'type':Sequelize[_0xe7c9('0x7')]},'deviceType':{'type':Sequelize[_0xe7c9('0x7')]},'referer':{'type':Sequelize['TEXT']},'customerIp':{'type':Sequelize[_0xe7c9('0x7')]},'formData':{'type':Sequelize[_0xe7c9('0x6')]('long')},'read1stAt':{'type':Sequelize[_0xe7c9('0x8')]},'lastMsgAt':{'type':Sequelize[_0xe7c9('0x8')]},'lastMsgDirection':{'type':Sequelize[_0xe7c9('0x9')]('in',_0xe7c9('0xa')),'defaultValue':'in','allowNull':![]},'closeReason':{'type':Sequelize[_0xe7c9('0x7')]},'customerPort':{'type':Sequelize['STRING']},'vidaooSessionId':{'type':Sequelize[_0xe7c9('0x6')]},'autoreplyExecuted':{'type':Sequelize[_0xe7c9('0x2')],'defaultValue':![]},'queueId':{'type':Sequelize[_0xe7c9('0x3')]}};
\ No newline at end of file
index 867c93f..53809f2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe3ef=['api','../../config/environment','../../mysqldb','defaults','localhost','redis','./chatInteraction.socket','register','jayson/promise','client','http','request','info','request\x20sent','debug','stringify','error','code','ChatInteraction,\x20%s,\x20%s','message','catch','sendStatus','status','end','undefined','limit','count','offset','set','Content-Range','json','update','then','destroy','stack','name','merge','body','account','index','map','ChatInteraction','fieldName','type','key','getOptions','findAll','chat','query','user','show','params','rawAttributes','keys','model','intersection','attributes','length','options','find','create','describe','createVidaooSession','findOne','ChatWebsite','vidaooApiKey','vidaooTopic','vidaooNote','vidaooMetadata','vidaooEscalation','fullname','email','contact','https://api-vidaoo.xcally.com/api/v1/meetings','isNull','parse','metadata','Sequelize','ValidationError','Error\x20in\x20conversion\x20vidaooMetadata','Error\x20in\x20Vidaoo\x20configuration','join_url','out','ChatMessage','Unable\x20to\x20create\x20Vidaoo\x20session','customUpdate','CmContact','abandonInteraction,\x20%s,\x20%s,\x20%s','abandon','entity\x20not\x20found','UserId','Interaction\x20already\x20assigned','closed','disposition','AbandonInteraction','file','originalname','basename','filename','mimetype','Attachment','attachmentDownload','Unauthorized','ChatOfflineMessageId','join','root','server/files/attachments/','offline-chat/','download','close','mailTranscript','server/files/chat/upload/','transcript-%s.txt','now','pathTranscript','Messages','User','ContactId','format','%s%d','agentAlias','System','customer','Visitor','agentIdentifier','website_alias','agent_alias','alias','agent_fullname','secret','MailAccount','MailServerOut','Smtp','CloudProvider','sendMail','\x22%s\x22\x20<%s>','Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a','addMessage','ids','omit','getMessages','filters','fields','where','pick','ChatInteractionId','filter','$gte','split','YYYY-MM-DD\x20HH:mm:ss','includeAll','include','getMyMessages','hasOwnProperty','nolimit','order','sort','includeAgent','push','rows','addTags','Tag','color','emit','removeTags','files','server','transcript-%d-%s.zip','attachments','createdAt','read','Account','Owner','get','Chat','N.A.','closedAt','toString','browserName','osName','referer','customerIp','customerPort','tail','existsSync','createReadStream','pipe','createWriteStream','direction','firstName','Contact','value','renderFile','views','downloadInteraction.ejs','transcript-','.pdf','createPdfFromHTML','unlinkSync','zip-dir','moment','bluebird','mustache','ejs','lodash','../../components/interaction/service','../../components/export/pdf','../../config/logger'];(function(_0x4e0022,_0x1253da){var _0x597a15=function(_0x1238b6){while(--_0x1238b6){_0x4e0022['push'](_0x4e0022['shift']());}};_0x597a15(++_0x1253da);}(_0xe3ef,0xc7));var _0xfe3e=function(_0x4c749f,_0x5ddc3c){_0x4c749f=_0x4c749f-0x0;var _0x388d3b=_0xe3ef[_0x4c749f];return _0x388d3b;};'use strict';var rimraf=require('rimraf');var zipdir=require(_0xfe3e('0x0'));var rp=require('request-promise');var moment=require(_0xfe3e('0x1'));var BPromise=require(_0xfe3e('0x2'));var Mustache=require(_0xfe3e('0x3'));var util=require('util');var path=require('path');var ejs=require(_0xfe3e('0x4'));var fs=require('fs');var _=require(_0xfe3e('0x5'));var Redis=require('ioredis');var interaction=require(_0xfe3e('0x6'));var qs=require('../../components/parsers/qs');var pdf=require(_0xfe3e('0x7'));var logger=require(_0xfe3e('0x8'))(_0xfe3e('0x9'));var config=require(_0xfe3e('0xa'));var db=require(_0xfe3e('0xb'))['db'];config['redis']=_[_0xfe3e('0xc')](config['redis'],{'host':_0xfe3e('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xfe3e('0xe')]));require(_0xfe3e('0xf'))[_0xfe3e('0x10')](socket);var jayson=require(_0xfe3e('0x11'));var client=jayson[_0xfe3e('0x12')][_0xfe3e('0x13')]({'port':0x232b});var client9004=jayson[_0xfe3e('0x12')][_0xfe3e('0x13')]({'port':0x232c});function respondWithRpcPromise(_0x5fe883,_0x557f63,_0x1a0d27,_0x5303cc){return new BPromise(function(_0x5aa0a4,_0x222d0d){var _0x5554a1=_0x5303cc||client;return _0x5554a1[_0xfe3e('0x14')](_0x5fe883,_0x1a0d27)['then'](function(_0x3bae61){logger[_0xfe3e('0x15')]('ChatInteraction,\x20%s,\x20%s',_0x557f63,_0xfe3e('0x16'));logger[_0xfe3e('0x17')]('ChatInteraction,\x20%s,\x20%s,\x20%s',_0x557f63,_0xfe3e('0x16'),JSON[_0xfe3e('0x18')](_0x3bae61));if(_0x3bae61[_0xfe3e('0x19')]){if(_0x3bae61[_0xfe3e('0x19')][_0xfe3e('0x1a')]===0x1f4){logger[_0xfe3e('0x19')](_0xfe3e('0x1b'),_0x557f63,_0x3bae61[_0xfe3e('0x19')][_0xfe3e('0x1c')]);return _0x222d0d(_0x3bae61[_0xfe3e('0x19')][_0xfe3e('0x1c')]);}logger[_0xfe3e('0x19')]('ChatInteraction,\x20%s,\x20%s',_0x557f63,_0x3bae61[_0xfe3e('0x19')][_0xfe3e('0x1c')]);return _0x5aa0a4(_0x3bae61['error'][_0xfe3e('0x1c')]);}else{logger[_0xfe3e('0x15')](_0xfe3e('0x1b'),_0x557f63,_0xfe3e('0x16'));_0x5aa0a4(_0x3bae61['result'][_0xfe3e('0x1c')]);}})[_0xfe3e('0x1d')](function(_0x38e872){logger[_0xfe3e('0x19')](_0xfe3e('0x1b'),_0x557f63,_0x38e872);_0x222d0d(_0x38e872);});});}function respondWithStatusCode(_0x281621,_0x50c6eb){_0x50c6eb=_0x50c6eb||0xcc;return function(_0xee7cde){if(_0xee7cde){return _0x281621[_0xfe3e('0x1e')](_0x50c6eb);}return _0x281621[_0xfe3e('0x1f')](_0x50c6eb)[_0xfe3e('0x20')]();};}function respondWithResult(_0x2a6fac,_0x254a5a){_0x254a5a=_0x254a5a||0xc8;return function(_0x2272f8){if(_0x2272f8){return _0x2a6fac[_0xfe3e('0x1f')](_0x254a5a)['json'](_0x2272f8);}};}function respondWithFilteredResult(_0x51b6b1,_0x5be731){return function(_0x5de796){if(_0x5de796){var _0x308fec=typeof _0x5be731['offset']===_0xfe3e('0x21')&&typeof _0x5be731[_0xfe3e('0x22')]===_0xfe3e('0x21');var _0xef8938=_0x5de796[_0xfe3e('0x23')];var _0x443283=_0x308fec?0x0:_0x5be731[_0xfe3e('0x24')];var _0x38ef37=_0x308fec?_0x5de796[_0xfe3e('0x23')]:_0x5be731['offset']+_0x5be731['limit'];var _0x394fd5;if(_0x38ef37>=_0xef8938){_0x38ef37=_0xef8938;_0x394fd5=0xc8;}else{_0x394fd5=0xce;}_0x51b6b1[_0xfe3e('0x1f')](_0x394fd5);return _0x51b6b1[_0xfe3e('0x25')](_0xfe3e('0x26'),_0x443283+'-'+_0x38ef37+'/'+_0xef8938)[_0xfe3e('0x27')](_0x5de796);}return null;};}function saveUpdates(_0xce871){return function(_0x4b6528){if(_0x4b6528){return _0x4b6528[_0xfe3e('0x28')](_0xce871)[_0xfe3e('0x29')](function(_0x20d155){return _0x20d155;});}return null;};}function removeEntity(_0x5a8b24){return function(_0x2557ca){if(_0x2557ca){return _0x2557ca[_0xfe3e('0x2a')]()[_0xfe3e('0x29')](function(){_0x5a8b24['status'](0xcc)[_0xfe3e('0x20')]();});}};}function handleEntityNotFound(_0x5533b9){return function(_0x4f3713){if(!_0x4f3713){_0x5533b9['sendStatus'](0x194);}return _0x4f3713;};}function handleError(_0x313488,_0x262cd9){_0x262cd9=_0x262cd9||0x1f4;return function(_0x47e290){logger['error'](_0x47e290[_0xfe3e('0x2b')]);if(_0x47e290[_0xfe3e('0x2c')]){delete _0x47e290['name'];}_0x313488[_0xfe3e('0x1f')](_0x262cd9)['send'](_0x47e290);};}function getMustacheRender(_0x231bbb,_0x227ddf){return Mustache['render'](_0x231bbb,_[_0xfe3e('0x2d')](_0x227ddf[_0xfe3e('0x2e')],{'contact':_0x227ddf['contact'],'message':_0x227ddf[_0xfe3e('0x1c')],'agent':_0x227ddf['agent'],'interaction':_0x227ddf['interaction'],'account':_0x227ddf[_0xfe3e('0x2f')]}))||'';}exports[_0xfe3e('0x30')]=function(_0x474756,_0x4e8264){var _0x468a7b={};var _0x5c0352=_[_0xfe3e('0x31')](db[_0xfe3e('0x32')]['rawAttributes'],function(_0xcef69c){return{'name':_0xcef69c[_0xfe3e('0x33')],'type':_0xcef69c[_0xfe3e('0x34')][_0xfe3e('0x35')]};});_0x468a7b=qs[_0xfe3e('0x36')](_0x5c0352,_0x474756);return interaction[_0xfe3e('0x37')](_0xfe3e('0x38'),_0x474756[_0xfe3e('0x39')],_0x474756[_0xfe3e('0x3a')],_0x468a7b,_0x5c0352)[_0xfe3e('0x29')](respondWithFilteredResult(_0x4e8264,_0x468a7b))[_0xfe3e('0x1d')](handleError(_0x4e8264,null));};exports[_0xfe3e('0x3b')]=function(_0x1efc8b,_0x529921){var _0x2473e0={'raw':![],'where':{'id':_0x1efc8b[_0xfe3e('0x3c')]['id']}},_0x3e4a1d={};_0x3e4a1d['model']=_['keys'](db[_0xfe3e('0x32')][_0xfe3e('0x3d')]);_0x3e4a1d[_0xfe3e('0x39')]=_[_0xfe3e('0x3e')](_0x1efc8b[_0xfe3e('0x39')]);_0x3e4a1d['filters']=_['intersection'](_0x3e4a1d[_0xfe3e('0x3f')],_0x3e4a1d[_0xfe3e('0x39')]);_0x2473e0['attributes']=_[_0xfe3e('0x40')](_0x3e4a1d[_0xfe3e('0x3f')],qs['fields'](_0x1efc8b['query']['fields']));_0x2473e0['attributes']=_0x2473e0[_0xfe3e('0x41')][_0xfe3e('0x42')]?_0x2473e0['attributes']:_0x3e4a1d[_0xfe3e('0x3f')];if(_0x1efc8b['query']['includeAll']){_0x2473e0['include']=[{'all':!![]}];}_0x2473e0=_[_0xfe3e('0x2d')]({},_0x2473e0,_0x1efc8b[_0xfe3e('0x43')]);return db['ChatInteraction'][_0xfe3e('0x44')](_0x2473e0)[_0xfe3e('0x29')](handleEntityNotFound(_0x529921,null))[_0xfe3e('0x29')](respondWithResult(_0x529921,null))[_0xfe3e('0x1d')](handleError(_0x529921,null));};exports[_0xfe3e('0x45')]=function(_0x335178,_0x38d37e){return db[_0xfe3e('0x32')][_0xfe3e('0x45')](_0x335178[_0xfe3e('0x2e')],{})['then'](respondWithResult(_0x38d37e,0xc9))[_0xfe3e('0x1d')](handleError(_0x38d37e,null));};exports['update']=function(_0x408147,_0x587ca4){if(_0x408147['body']['id']){delete _0x408147['body']['id'];}return db['ChatInteraction'][_0xfe3e('0x44')]({'where':{'id':_0x408147[_0xfe3e('0x3c')]['id']}})[_0xfe3e('0x29')](handleEntityNotFound(_0x587ca4,null))['then'](saveUpdates(_0x408147['body'],null))['then'](respondWithResult(_0x587ca4,null))[_0xfe3e('0x1d')](handleError(_0x587ca4,null));};exports[_0xfe3e('0x2a')]=function(_0x28245a,_0x34a830){return db[_0xfe3e('0x32')][_0xfe3e('0x44')]({'where':{'id':_0x28245a['params']['id']}})[_0xfe3e('0x29')](handleEntityNotFound(_0x34a830,null))['then'](removeEntity(_0x34a830,null))[_0xfe3e('0x1d')](handleError(_0x34a830,null));};exports[_0xfe3e('0x46')]=function(_0x3a00c5,_0x684ca8){return db[_0xfe3e('0x32')]['describe']()[_0xfe3e('0x29')](respondWithResult(_0x684ca8,null))[_0xfe3e('0x1d')](handleError(_0x684ca8,null));};exports[_0xfe3e('0x47')]=function(_0x5c5cb0,_0x5ab735){var _0x2e5e78=_0x5c5cb0['params']['id'];var _0x39a8ab;var _0x244ffe;var _0x2e554b;return db['ChatInteraction'][_0xfe3e('0x48')]({'where':{'id':_0x2e5e78}})[_0xfe3e('0x29')](function(_0x57d076){_0x39a8ab=_0x57d076;return db[_0xfe3e('0x49')][_0xfe3e('0x48')]({'where':{'id':_0x57d076['ChatWebsiteId']},'attributes':['id',_0xfe3e('0x4a'),'vidaooEscalation',_0xfe3e('0x4b'),_0xfe3e('0x4c'),_0xfe3e('0x4d')],'raw':!![]});})['then'](function(_0x17aad0){if(_0x17aad0&&_0x17aad0['vidaooApiKey']&&_0x17aad0[_0xfe3e('0x4e')]){_0x244ffe=_0x17aad0;var _0x59d116={'interaction':{'id':_0x2e5e78},'agent':{'id':_0x5c5cb0[_0xfe3e('0x3a')]['id'],'name':_0x5c5cb0[_0xfe3e('0x3a')][_0xfe3e('0x2c')],'fullname':_0x5c5cb0[_0xfe3e('0x3a')][_0xfe3e('0x4f')],'email':_0x5c5cb0['user'][_0xfe3e('0x50')]},'contact':_0x5c5cb0[_0xfe3e('0x2e')][_0xfe3e('0x51')],'account':_0x5c5cb0['body'][_0xfe3e('0x2f')]};var _0x37793e={'rejectUnauthorized':![],'method':'POST','url':_0xfe3e('0x52'),'headers':{'X-APIKEY':_0x17aad0['vidaooApiKey']},'body':{'duration':null,'scheduledAt':null,'participants':[_0x5c5cb0[_0xfe3e('0x3a')][_0xfe3e('0x50')]],'buttons':null,'topic':_0x244ffe[_0xfe3e('0x4b')],'note':_[_0xfe3e('0x53')](_0x244ffe[_0xfe3e('0x4c')])?null:getMustacheRender(_0x244ffe[_0xfe3e('0x4c')],_0x59d116),'metadata':null},'redirect':'follow','json':!![]};try{if(!_[_0xfe3e('0x53')](_0x244ffe['vidaooMetadata'])){var _0x485a8d=getMustacheRender(_0x244ffe[_0xfe3e('0x4d')],_0x59d116);var _0x518d57=JSON[_0xfe3e('0x54')](_0x485a8d);_0x37793e[_0xfe3e('0x2e')][_0xfe3e('0x55')]=_0x518d57;}}catch(_0x3dea80){throw new db[(_0xfe3e('0x56'))][(_0xfe3e('0x57'))](_0xfe3e('0x58'));}return rp(_0x37793e);}else{throw new db[(_0xfe3e('0x56'))][(_0xfe3e('0x57'))](_0xfe3e('0x59'));}})[_0xfe3e('0x29')](function(_0x7e57a8){_0x2e554b=_0x7e57a8;if(_0x2e554b['id']){var _0x5a9ed7={'body':_0x2e554b[_0xfe3e('0x5a')],'ChatWebsiteId':_0x244ffe['id'],'ChatInteractionId':_0x39a8ab['id'],'direction':_0xfe3e('0x5b'),'UserId':_0x5c5cb0['user']['id']};return db[_0xfe3e('0x5c')][_0xfe3e('0x45')](_0x5a9ed7,{});}else{throw new db[(_0xfe3e('0x56'))][(_0xfe3e('0x57'))](_0xfe3e('0x5d'));}})['then'](function(){return _0x39a8ab['updateAttributes']({'vidaooSessionId':_0x2e554b['id']});})[_0xfe3e('0x29')](respondWithResult(_0x5ab735,null))[_0xfe3e('0x1d')](handleError(_0x5ab735,null));};exports[_0xfe3e('0x5e')]=function(_0x23426a,_0x2d40dd){if(_0x23426a[_0xfe3e('0x2e')]['id']){delete _0x23426a[_0xfe3e('0x2e')]['id'];}return db[_0xfe3e('0x32')][_0xfe3e('0x44')]({'where':{'id':_0x23426a[_0xfe3e('0x3c')]['id']},'include':[{'model':db[_0xfe3e('0x5f')],'as':'Contact'}]})['then'](handleEntityNotFound(_0x2d40dd,null))[_0xfe3e('0x29')](saveUpdates(_0x23426a['body'],null))[_0xfe3e('0x29')](respondWithResult(_0x2d40dd,null))[_0xfe3e('0x1d')](handleError(_0x2d40dd,null));};exports['abandon']=function(_0x4150f7,_0x4361cd){if(_0x4150f7['body']['id']){delete _0x4150f7[_0xfe3e('0x2e')]['id'];}return db['ChatInteraction']['find']({'where':{'id':_0x4150f7['params']['id']}})[_0xfe3e('0x29')](function(_0x1b8c34){if(!_0x1b8c34){logger[_0xfe3e('0x19')](_0xfe3e('0x60'),_0xfe3e('0x61'),0x194,_0xfe3e('0x62'));_0x4361cd[_0xfe3e('0x1e')](0x194);}else{if(_0x1b8c34[_0xfe3e('0x63')]){throw new db[(_0xfe3e('0x56'))][(_0xfe3e('0x57'))](_0xfe3e('0x64'));}}return _0x1b8c34;})[_0xfe3e('0x29')](function(_0xad91e4){if(_0xad91e4){return _0xad91e4[_0xfe3e('0x28')]({'closed':_0x4150f7[_0xfe3e('0x2e')][_0xfe3e('0x65')],'disposition':_0x4150f7[_0xfe3e('0x2e')][_0xfe3e('0x66')]})[_0xfe3e('0x29')](function(_0x4540d0){return _0x4540d0;});}})['then'](function(){return respondWithRpcPromise(_0xfe3e('0x67'),'abandon',_0x4150f7[_0xfe3e('0x2e')],client9004);})[_0xfe3e('0x29')](respondWithResult(_0x4361cd,null))['catch'](handleError(_0x4361cd,null));};exports['attachmentUpload']=function(_0x5db298,_0x127a8e){_0x5db298[_0xfe3e('0x2e')][_0xfe3e('0x2c')]=_0x5db298[_0xfe3e('0x68')][_0xfe3e('0x69')];_0x5db298[_0xfe3e('0x2e')][_0xfe3e('0x6a')]=_0x5db298['file'][_0xfe3e('0x6b')];_0x5db298[_0xfe3e('0x2e')]['type']=_0x5db298[_0xfe3e('0x68')][_0xfe3e('0x6c')];return db[_0xfe3e('0x6d')][_0xfe3e('0x45')](_0x5db298[_0xfe3e('0x2e')])[_0xfe3e('0x29')](respondWithResult(_0x127a8e,0xc9))[_0xfe3e('0x1d')](handleError(_0x127a8e,null));};exports[_0xfe3e('0x6e')]=function(_0x1ec1c6,_0x55ec8b){return db[_0xfe3e('0x32')]['findOne']({'where':{'id':_0x1ec1c6[_0xfe3e('0x3c')]['id']},'raw':!![]})[_0xfe3e('0x29')](handleEntityNotFound(_0x55ec8b,null))['then'](function(_0x53aaf0){if(_0x53aaf0){if(_0x53aaf0[_0xfe3e('0x65')]){return _0x55ec8b[_0xfe3e('0x1f')](0x193)['json']({'status':0x193,'message':_0xfe3e('0x6f')});}return db[_0xfe3e('0x6d')][_0xfe3e('0x48')]({'where':{'id':_0x1ec1c6[_0xfe3e('0x39')]['attachId']},'raw':!![]})[_0xfe3e('0x29')](handleEntityNotFound(_0x55ec8b,null));}})['then'](function(_0x1523a0){if(_0x1523a0){var _0x41ecc8=_0x1523a0[_0xfe3e('0x70')]!==null;var _0x403520=path[_0xfe3e('0x71')](config[_0xfe3e('0x72')],_0xfe3e('0x73'));if(_0x41ecc8){_0x403520=path[_0xfe3e('0x71')](_0x403520,_0xfe3e('0x74'));}var _0xbfdf47=path[_0xfe3e('0x71')](_0x403520,_0x1523a0[_0xfe3e('0x6a')]);return _0x55ec8b[_0xfe3e('0x75')](_0xbfdf47);}})['catch'](handleError(_0x55ec8b,null));};exports[_0xfe3e('0x76')]=function(_0x40e83d,_0x18f2ae){var _0x154176=null;var _0x7bc754=null;var _0x5e3c50=null;if(_0x40e83d[_0xfe3e('0x2e')]['id']){delete _0x40e83d[_0xfe3e('0x2e')]['id'];}if(_0x40e83d['body'][_0xfe3e('0x77')]){_0x5e3c50=path['join'](config[_0xfe3e('0x72')],_0xfe3e('0x78'),util['format'](_0xfe3e('0x79'),Date[_0xfe3e('0x7a')]()));_0x40e83d[_0xfe3e('0x2e')][_0xfe3e('0x7b')]=_0x5e3c50;}return db[_0xfe3e('0x32')][_0xfe3e('0x44')]({'where':{'id':_0x40e83d['params']['id']},'include':[{'model':db[_0xfe3e('0x5c')],'as':_0xfe3e('0x7c'),'include':[{'model':db[_0xfe3e('0x7d')],'as':_0xfe3e('0x7d')}]}]})[_0xfe3e('0x29')](handleEntityNotFound(_0x18f2ae,null))[_0xfe3e('0x29')](saveUpdates(_0x40e83d[_0xfe3e('0x2e')],null))[_0xfe3e('0x29')](function(_0x5e4296){if(_0x5e4296){_0x154176=_0x5e4296;return db[_0xfe3e('0x49')][_0xfe3e('0x44')]({'where':{'id':_0x154176['ChatWebsiteId']}});}})['then'](function(_0x2fef79){if(_0x2fef79){_0x7bc754=_0x2fef79;return db[_0xfe3e('0x5f')][_0xfe3e('0x44')]({'where':{'id':_0x154176[_0xfe3e('0x7e')]}});}})[_0xfe3e('0x29')](function(_0xbb36df){if(_0xbb36df){if(_0x5e3c50){var _0x33d135=null;for(var _0xfd2edc=0x1;_0xfd2edc<_0x154176[_0xfe3e('0x7c')][_0xfe3e('0x42')];++_0xfd2edc){_0x33d135=_0x154176[_0xfe3e('0x7c')][_0xfd2edc];var _0x54a0c7=_0x33d135['UserId']?util[_0xfe3e('0x7f')](_0xfe3e('0x80'),_0x7bc754[_0xfe3e('0x81')],_0x33d135[_0xfe3e('0x63')]):_0xfe3e('0x82');var _0x4922c9=_0x40e83d[_0xfe3e('0x2e')][_0xfe3e('0x83')]||util[_0xfe3e('0x7f')]('%s%d',_0xfe3e('0x84'),_0x33d135[_0xfe3e('0x7e')]);switch(_0x7bc754[_0xfe3e('0x85')]){case _0xfe3e('0x86'):_0x54a0c7=_0x33d135[_0xfe3e('0x63')]?util['format'](_0xfe3e('0x80'),_0x7bc754[_0xfe3e('0x81')],_0x33d135['UserId']):_0xfe3e('0x82');break;case _0xfe3e('0x87'):_0x54a0c7=_0x33d135[_0xfe3e('0x63')]?_0x33d135['User'][_0xfe3e('0x88')]||_0x33d135[_0xfe3e('0x7d')][_0xfe3e('0x4f')]:'System';break;case _0xfe3e('0x89'):_0x54a0c7=_0x33d135[_0xfe3e('0x63')]?_0x33d135[_0xfe3e('0x7d')][_0xfe3e('0x4f')]:'System';break;default:_0x54a0c7=_0x33d135[_0xfe3e('0x63')]?util[_0xfe3e('0x7f')]('%s%d',_0x7bc754[_0xfe3e('0x81')],_0x33d135[_0xfe3e('0x63')]):_0xfe3e('0x82');}var _0x14a7a1=util[_0xfe3e('0x7f')]('[%s]\x20%s:\x20%s\x0a',moment(_0x33d135['createdAt'])['format']('MM/DD/YYYY\x20HH:mm:ss'),_0x33d135['direction']==='in'?_0x4922c9:_0x54a0c7,_0x33d135['body']);if(!_0x33d135[_0xfe3e('0x8a')]){fs['appendFileSync'](_0x5e3c50,_0x14a7a1);}}return db[_0xfe3e('0x8b')][_0xfe3e('0x48')]({'where':{'service':!![]},'include':[{'model':db[_0xfe3e('0x8c')],'as':_0xfe3e('0x8d'),'raw':!![],'include':[{'model':db[_0xfe3e('0x8e')],'as':_0xfe3e('0x8e'),'raw':!![]}]}]});}}})[_0xfe3e('0x29')](function(_0x11d67a){if(!_0x11d67a||!_0x11d67a[_0xfe3e('0x8d')]||!_0x40e83d['body'])return _0x154176;var _0x4db447=_0x11d67a['getSmtpOptions']();return respondWithRpcPromise('SendMail',_0xfe3e('0x8f'),{'account':_0x4db447,'message':{'from':util[_0xfe3e('0x7f')](_0xfe3e('0x90'),_0x11d67a[_0xfe3e('0x2c')],_0x11d67a['email']||_0x11d67a['Smtp']['user']),'to':_0x40e83d[_0xfe3e('0x2e')][_0xfe3e('0x77')],'subject':'Mail\x20Transcript','text':util[_0xfe3e('0x7f')](_0xfe3e('0x91'),_0x40e83d[_0xfe3e('0x2e')][_0xfe3e('0x77')]),'attachments':[{'path':_0x5e3c50}]}})['then'](function(){return _0x154176;})[_0xfe3e('0x1d')](function(_0x4054d5){logger[_0xfe3e('0x19')](_0x4054d5);});})[_0xfe3e('0x29')](respondWithStatusCode(_0x18f2ae,0xc8))[_0xfe3e('0x1d')](handleError(_0x18f2ae,null));};exports[_0xfe3e('0x92')]=function(_0x3acfc2,_0x222645){return db['ChatMessage'][_0xfe3e('0x44')]({'where':{'id':_0x3acfc2[_0xfe3e('0x3c')]['id']}})['then'](handleEntityNotFound(_0x222645,null))[_0xfe3e('0x29')](function(_0x238335){if(_0x238335){return _0x238335[_0xfe3e('0x92')](_0x3acfc2[_0xfe3e('0x2e')][_0xfe3e('0x93')],_[_0xfe3e('0x94')](_0x3acfc2['body'],[_0xfe3e('0x93'),'id'])||{});}})[_0xfe3e('0x29')](respondWithResult(_0x222645,null))[_0xfe3e('0x1d')](handleError(_0x222645,null));};exports[_0xfe3e('0x95')]=function(_0x5a5796,_0x43ba0f){var _0x163e0c={'raw':![],'where':{}};var _0x14678f={};var _0x28a2fc={'count':0x0,'rows':[]};return db[_0xfe3e('0x32')][_0xfe3e('0x48')]({'where':{'id':_0x5a5796[_0xfe3e('0x3c')]['id']}})[_0xfe3e('0x29')](handleEntityNotFound(_0x43ba0f,null))[_0xfe3e('0x29')](function(_0x215e0d){if(_0x215e0d){_0x14678f[_0xfe3e('0x3f')]=_[_0xfe3e('0x3e')](db[_0xfe3e('0x5c')][_0xfe3e('0x3d')]);_0x14678f[_0xfe3e('0x39')]=_[_0xfe3e('0x3e')](_0x5a5796['query']);_0x14678f[_0xfe3e('0x96')]=_[_0xfe3e('0x40')](_0x14678f['model'],_0x14678f[_0xfe3e('0x39')]);_0x163e0c[_0xfe3e('0x41')]=_['intersection'](_0x14678f[_0xfe3e('0x3f')],qs[_0xfe3e('0x97')](_0x5a5796['query'][_0xfe3e('0x97')]));_0x163e0c['attributes']=_0x163e0c[_0xfe3e('0x41')][_0xfe3e('0x42')]?_0x163e0c[_0xfe3e('0x41')]:_0x14678f['model'];if(!_0x5a5796[_0xfe3e('0x39')]['hasOwnProperty']('nolimit')){_0x163e0c[_0xfe3e('0x22')]=qs[_0xfe3e('0x22')](_0x5a5796[_0xfe3e('0x39')][_0xfe3e('0x22')]);_0x163e0c[_0xfe3e('0x24')]=qs[_0xfe3e('0x24')](_0x5a5796[_0xfe3e('0x39')][_0xfe3e('0x24')]);}_0x163e0c['order']=qs['sort'](_0x5a5796[_0xfe3e('0x39')]['sort']);_0x163e0c[_0xfe3e('0x98')]=qs[_0xfe3e('0x96')](_[_0xfe3e('0x99')](_0x5a5796[_0xfe3e('0x39')],_0x14678f['filters']));_0x163e0c[_0xfe3e('0x98')][_0xfe3e('0x9a')]=_0x215e0d['id'];if(_0x5a5796[_0xfe3e('0x39')][_0xfe3e('0x9b')]){_0x163e0c[_0xfe3e('0x98')]=_['merge'](_0x163e0c[_0xfe3e('0x98')],{'$or':_[_0xfe3e('0x31')](_0x163e0c[_0xfe3e('0x41')],function(_0x21c772){var _0x287b87={};_0x287b87[_0x21c772]={'$like':'%'+_0x5a5796[_0xfe3e('0x39')]['filter']+'%'};return _0x287b87;})});}if(_0x5a5796[_0xfe3e('0x39')][_0xfe3e('0x9c')]){var _0x501f31=_0x5a5796[_0xfe3e('0x39')]['$gte'][_0xfe3e('0x9d')](',');var _0x5eb9f3={};_0x5eb9f3[_0x501f31[0x0]]={'$gte':moment(_0x501f31[0x1])[_0xfe3e('0x7f')](_0xfe3e('0x9e'))};_0x163e0c[_0xfe3e('0x98')]=_[_0xfe3e('0x2d')](_0x163e0c[_0xfe3e('0x98')],_0x5eb9f3);}_0x163e0c=_[_0xfe3e('0x2d')]({},_0x163e0c,_0x5a5796[_0xfe3e('0x43')]);return db[_0xfe3e('0x5c')]['count']({'where':_0x163e0c[_0xfe3e('0x98')]})[_0xfe3e('0x29')](function(_0x1d90b4){_0x28a2fc['count']=_0x1d90b4;if(_0x5a5796[_0xfe3e('0x39')][_0xfe3e('0x9f')]){_0x163e0c[_0xfe3e('0xa0')]=[{'all':!![]}];}return db['ChatMessage'][_0xfe3e('0x37')](_0x163e0c);})[_0xfe3e('0x29')](function(_0x47c3c5){_0x28a2fc['rows']=_0x47c3c5;return _0x28a2fc;});}})['then'](respondWithFilteredResult(_0x43ba0f,_0x163e0c))['catch'](handleError(_0x43ba0f,null));};exports[_0xfe3e('0xa1')]=function(_0x11403a,_0x24782e){var _0x36fe44={'where':{}},_0x14d791={},_0x4ff548={'count':0x0,'rows':[]};return db[_0xfe3e('0x32')][_0xfe3e('0x48')]({'where':{'id':_0x11403a['params']['id']}})[_0xfe3e('0x29')](handleEntityNotFound(_0x24782e,null))[_0xfe3e('0x29')](function(_0xac14c){if(_0xac14c){_0x14d791['model']=_[_0xfe3e('0x3e')](db[_0xfe3e('0x5c')][_0xfe3e('0x3d')]);_0x14d791[_0xfe3e('0x39')]=_[_0xfe3e('0x3e')](_0x11403a[_0xfe3e('0x39')]);_0x14d791[_0xfe3e('0x96')]=_[_0xfe3e('0x40')](_0x14d791[_0xfe3e('0x3f')],_0x14d791['query']);_0x36fe44[_0xfe3e('0x41')]=_[_0xfe3e('0x40')](_0x14d791[_0xfe3e('0x3f')],qs[_0xfe3e('0x97')](_0x11403a[_0xfe3e('0x39')][_0xfe3e('0x97')]));_0x36fe44[_0xfe3e('0x41')]=_0x36fe44[_0xfe3e('0x41')][_0xfe3e('0x42')]?_0x36fe44[_0xfe3e('0x41')]:_0x14d791[_0xfe3e('0x3f')];if(!_0x11403a[_0xfe3e('0x39')][_0xfe3e('0xa2')](_0xfe3e('0xa3'))){_0x36fe44[_0xfe3e('0x22')]=qs[_0xfe3e('0x22')](_0x11403a['query'][_0xfe3e('0x22')]);_0x36fe44[_0xfe3e('0x24')]=qs[_0xfe3e('0x24')](_0x11403a[_0xfe3e('0x39')][_0xfe3e('0x24')]);}_0x36fe44[_0xfe3e('0xa4')]=qs['sort'](_0x11403a[_0xfe3e('0x39')][_0xfe3e('0xa5')]);_0x36fe44[_0xfe3e('0x98')]=qs[_0xfe3e('0x96')](_[_0xfe3e('0x99')](_0x11403a[_0xfe3e('0x39')],_0x14d791[_0xfe3e('0x96')]));_0x36fe44['where'][_0xfe3e('0x9a')]=_0xac14c['id'];if(_0x11403a[_0xfe3e('0x39')]['filter']){_0x36fe44['where']=_[_0xfe3e('0x2d')](_0x36fe44['where'],{'$or':_[_0xfe3e('0x31')](_0x36fe44['attributes'],function(_0x5a9d3a){var _0x60c60e={};_0x60c60e[_0x5a9d3a]={'$like':'%'+_0x11403a['query']['filter']+'%'};return _0x60c60e;})});}_0x36fe44[_0xfe3e('0x98')][_0xfe3e('0x8a')]=![];if(_0x11403a[_0xfe3e('0x39')]['id']){_0x36fe44[_0xfe3e('0x98')]['id']={'$gt':_0x11403a[_0xfe3e('0x39')]['id']};}_0x36fe44=_['merge']({},_0x36fe44,_0x11403a[_0xfe3e('0x43')]);return db[_0xfe3e('0x5c')][_0xfe3e('0x23')]({'where':_0x36fe44[_0xfe3e('0x98')]})[_0xfe3e('0x29')](function(_0x2155b1){_0x4ff548['count']=_0x2155b1;_0x36fe44[_0xfe3e('0xa0')]=[];if(_0x11403a[_0xfe3e('0x39')][_0xfe3e('0xa6')]){_0x36fe44[_0xfe3e('0xa0')][_0xfe3e('0xa7')]({'model':db['User'],'as':_0xfe3e('0x7d'),'attributes':['id',_0xfe3e('0x4f'),'alias']});}if(_0x11403a[_0xfe3e('0x39')][_0xfe3e('0x9f')]){_0x36fe44[_0xfe3e('0xa0')]=[{'all':!![]}];}return db[_0xfe3e('0x5c')]['findAll'](_0x36fe44);})['then'](function(_0x4b536a){_0x4ff548[_0xfe3e('0xa8')]=_0x4b536a;return _0x4ff548;});}})[_0xfe3e('0x29')](respondWithFilteredResult(_0x24782e,_0x36fe44))['catch'](handleError(_0x24782e,null));};exports[_0xfe3e('0xa9')]=function(_0x587fc6,_0x2157ac){return db['ChatInteraction'][_0xfe3e('0x44')]({'where':{'id':_0x587fc6[_0xfe3e('0x3c')]['id']}})[_0xfe3e('0x29')](handleEntityNotFound(_0x2157ac,null))['then'](function(_0xef12c8){if(_0xef12c8){return _0xef12c8['setTags'](_0x587fc6[_0xfe3e('0x2e')][_0xfe3e('0x93')],_[_0xfe3e('0x94')](_0x587fc6[_0xfe3e('0x2e')],[_0xfe3e('0x93'),'id'])||{})['spread'](function(){return db[_0xfe3e('0xaa')]['findAll']({'attributes':['id',_0xfe3e('0x2c'),_0xfe3e('0xab')],'where':{'id':_0x587fc6['body'][_0xfe3e('0x93')]}});})[_0xfe3e('0x29')](function(_0x1995f4){socket[_0xfe3e('0xac')]('chatInteractionTags:save',{'id':Number(_0x587fc6[_0xfe3e('0x3c')]['id']),'tags':_0x1995f4||[]});return{'id':Number(_0x587fc6['params']['id']),'tags':_0x1995f4||[]};});}})[_0xfe3e('0x29')](respondWithResult(_0x2157ac,null))[_0xfe3e('0x1d')](handleError(_0x2157ac,null));};exports['removeTags']=function(_0x4c2bef,_0x22763e){return db[_0xfe3e('0x32')][_0xfe3e('0x44')]({'where':{'id':_0x4c2bef['params']['id']}})[_0xfe3e('0x29')](handleEntityNotFound(_0x22763e,null))['then'](function(_0x6e9a59){if(_0x6e9a59){return _0x6e9a59[_0xfe3e('0xad')](_0x4c2bef[_0xfe3e('0x39')][_0xfe3e('0x93')]);}})[_0xfe3e('0x29')](respondWithStatusCode(_0x22763e,null))[_0xfe3e('0x1d')](handleError(_0x22763e,null));};exports['download']=function(_0x43135f,_0xa23212){var _0xaafedc=moment()['unix']()['toString']();var _0x59146c=path[_0xfe3e('0x71')](config[_0xfe3e('0x72')],'server',_0xfe3e('0xae'),'tmp');var _0x1134d2=path[_0xfe3e('0x71')](config[_0xfe3e('0x72')],_0xfe3e('0xaf'),_0xfe3e('0xae'),'attachments');var _0x3b7cde=path[_0xfe3e('0x71')](_0x59146c,_0xaafedc);var _0x196918=util[_0xfe3e('0x7f')](_0xfe3e('0xb0'),_0x43135f[_0xfe3e('0x3c')]['id'],_0xaafedc);var _0x213bee=path[_0xfe3e('0x71')](_0x59146c,_0x196918);var _0x4469a6=[];_0x4469a6[_0xfe3e('0xa7')]({'model':db[_0xfe3e('0x7d')],'as':_0xfe3e('0x7d'),'attributes':['id','fullname'],'raw':!![]});_0x4469a6['push']({'model':db['CmContact'],'as':'Contact','attributes':['id','firstName','lastName'],'raw':!![]});if(_0x43135f[_0xfe3e('0x39')][_0xfe3e('0xb1')]){_0x4469a6[_0xfe3e('0xa7')]({'model':db['Attachment'],'as':_0xfe3e('0x6d'),'raw':!![]});}var _0x22dbf9=[{'model':db['ChatMessage'],'as':_0xfe3e('0x7c'),'attributes':['id',_0xfe3e('0x2e'),_0xfe3e('0xb2'),'direction','secret',_0xfe3e('0xb3')],'include':_0x4469a6}];_0x22dbf9[_0xfe3e('0xa7')]({'model':db[_0xfe3e('0x49')],'as':_0xfe3e('0xb4'),'attributes':['id',_0xfe3e('0x2c')]});_0x22dbf9[_0xfe3e('0xa7')]({'model':db[_0xfe3e('0x7d')],'as':_0xfe3e('0xb5'),'attributes':['id',_0xfe3e('0x4f')]});return db[_0xfe3e('0x32')][_0xfe3e('0x44')]({'where':{'id':_0x43135f[_0xfe3e('0x3c')]['id']},'include':_0x22dbf9})[_0xfe3e('0x29')](handleEntityNotFound(_0xa23212,null))[_0xfe3e('0x29')](function(_0x2a4a26){if(_0x2a4a26){var _0x297fa8=_0x2a4a26[_0xfe3e('0xb6')]({'plain':!![]});fs['mkdirSync'](_0x3b7cde);var _0x17a6e7={'channel':_0xfe3e('0xb7'),'account':_0x297fa8[_0xfe3e('0xb4')][_0xfe3e('0x2c')],'agent':_0x297fa8[_0xfe3e('0xb5')]?_0x297fa8[_0xfe3e('0xb5')][_0xfe3e('0x4f')]:_0xfe3e('0xb8'),'createdAt':moment(_0x297fa8[_0xfe3e('0xb2')])[_0xfe3e('0x7f')](_0xfe3e('0x9e'))['toString'](),'closedAt':_0x297fa8[_0xfe3e('0x65')]?moment(_0x297fa8[_0xfe3e('0xb9')])[_0xfe3e('0x7f')](_0xfe3e('0x9e'))[_0xfe3e('0xba')]():'','disposition':_0x297fa8['disposition'],'chatInfo':{'browser':_0x297fa8[_0xfe3e('0xbb')],'os':_0x297fa8[_0xfe3e('0xbc')],'referer':_0x297fa8[_0xfe3e('0xbd')],'customerIp':_0x297fa8[_0xfe3e('0xbe')],'customerPort':_0x297fa8[_0xfe3e('0xbf')]?_0x297fa8[_0xfe3e('0xbf')]:_0xfe3e('0xb8')},'messages':_(_0x297fa8[_0xfe3e('0x7c')])[_0xfe3e('0xc0')]()[_0xfe3e('0x9b')]({'secret':![]})[_0xfe3e('0x31')](function(_0x3038c1){if(_0x3038c1['Attachment']){var _0x1c074d=path[_0xfe3e('0x71')](_0x1134d2,_0x3038c1[_0xfe3e('0x6d')][_0xfe3e('0x6a')]);if(fs[_0xfe3e('0xc1')](_0x1c074d)){fs[_0xfe3e('0xc2')](_0x1c074d)[_0xfe3e('0xc3')](fs[_0xfe3e('0xc4')](path[_0xfe3e('0x71')](_0x3b7cde,_0x3038c1[_0xfe3e('0x6d')][_0xfe3e('0x6a')])));}}return{'date':moment(_0x3038c1[_0xfe3e('0xb2')])[_0xfe3e('0x7f')](_0xfe3e('0x9e'))[_0xfe3e('0xba')](),'sender':_0x3038c1[_0xfe3e('0xc5')]===_0xfe3e('0x5b')?_0x3038c1[_0xfe3e('0x7d')]?_0x3038c1[_0xfe3e('0x7d')][_0xfe3e('0x4f')]:_0xfe3e('0x82'):_0x3038c1['Contact'][_0xfe3e('0xc6')]+(_0x3038c1[_0xfe3e('0xc7')]['lastName']?'\x20'+_0x3038c1[_0xfe3e('0xc7')]['lastName']:''),'body':_0x3038c1[_0xfe3e('0x6d')]?_0x3038c1[_0xfe3e('0x6d')][_0xfe3e('0x6a')]:_0x3038c1[_0xfe3e('0x2e')],'direction':_0x3038c1[_0xfe3e('0xc5')]===_0xfe3e('0x5b')?'A':'C','secret':_0x3038c1['secret'],'read':_0x3038c1[_0xfe3e('0xb3')],'attachment':_0x3038c1[_0xfe3e('0x6d')]};})[_0xfe3e('0xc8')]()};return ejs[_0xfe3e('0xc9')](path['join'](config[_0xfe3e('0x72')],'server',_0xfe3e('0xca'),_0xfe3e('0xcb')),{'interaction':_0x17a6e7})[_0xfe3e('0x29')](function(_0x24f604){var _0x584a61=path['join'](_0x3b7cde,_0xfe3e('0xcc')+_0x297fa8['id']+'-'+_0xaafedc+_0xfe3e('0xcd'));var _0x5e0c8c={'path':_0x584a61,'channel':_0xfe3e('0xb7'),'interactionId':_0x297fa8['id']};return pdf[_0xfe3e('0xce')](_0x24f604,_0x5e0c8c);})[_0xfe3e('0x29')](function(){return new Promise(function(_0x236fc7,_0x37bb37){zipdir(_0x3b7cde,{'saveTo':_0x213bee},function(_0x3587d5,_0x4ba6f1){if(_0x3587d5)return _0x37bb37(_0x3587d5);return _0x236fc7(_0x4ba6f1);});})[_0xfe3e('0x29')](function(){return new BPromise(function(_0x206760,_0x39bc8c){rimraf(_0x3b7cde,function(_0x36a3cd){if(_0x36a3cd)_0x39bc8c(_0x36a3cd);return _0x206760();});});})['then'](function(){return _0xa23212['download'](_0x213bee,_0x196918,function(_0x1a09ea){if(_0x1a09ea){logger[_0xfe3e('0x19')]('err',_0x1a09ea);}else{fs[_0xfe3e('0xcf')](_0x213bee);}});});});}else{return _0xa23212[_0xfe3e('0x1e')](0xc8);}})['catch'](handleError(_0xa23212,null));};
\ No newline at end of file
+var _0x5c3c=['ContactId','agentAlias','System','customer','format','%s%d','agentIdentifier','alias','agent_fullname','[%s]\x20%s:\x20%s\x0a','MM/DD/YYYY\x20HH:mm:ss','direction','secret','appendFileSync','MailServerOut','Smtp','CloudProvider','getSmtpOptions','SendMail','\x22%s\x22\x20<%s>','Mail\x20Transcript','Hi\x20%s,\x20attached\x20you\x20can\x20find\x20your\x20transcript\x20file.\x20\x0a\x0aRegards.\x20\x0a\x0a','addMessage','ids','omit','getMessages','intersection','hasOwnProperty','nolimit','order','sort','where','pick','ChatInteractionId','filter','$gte','split','YYYY-MM-DD\x20HH:mm:ss','rows','getMyMessages','include','includeAgent','push','User','spread','Tag','color','emit','removeTags','unix','toString','server','files','tmp','Contact','lastName','attachments','createdAt','ChatWebsite','Account','Owner','mkdirSync','N.A.','customerPort','tail','existsSync','createReadStream','pipe','firstName','read','value','renderFile','downloadInteraction.ejs','transcript-','.pdf','createPdfFromHTML','err','unlinkSync','request-promise','moment','mustache','util','path','ejs','lodash','ioredis','../../components/interaction/service','../../components/export/pdf','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','socket.io-emitter','./chatInteraction.socket','register','jayson/promise','client','http','request','then','info','request\x20sent','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','ChatInteraction,\x20%s,\x20%s','result','catch','sendStatus','status','undefined','limit','count','offset','set','Content-Range','json','destroy','stack','name','render','merge','body','interaction','account','map','ChatInteraction','rawAttributes','fieldName','key','findAll','chat','user','show','params','model','keys','query','filters','attributes','fields','length','includeAll','options','find','create','update','describe','createVidaooSession','findOne','vidaooApiKey','vidaooEscalation','vidaooNote','vidaooMetadata','fullname','email','contact','POST','https://api-vidaoo.xcally.com/api/v1/meetings','vidaooTopic','follow','isNull','metadata','Sequelize','ValidationError','Error\x20in\x20conversion\x20vidaooMetadata','Error\x20in\x20Vidaoo\x20configuration','join_url','out','ChatMessage','Unable\x20to\x20create\x20Vidaoo\x20session','updateAttributes','customUpdate','CmContact','abandon','abandonInteraction,\x20%s,\x20%s,\x20%s','UserId','Interaction\x20already\x20assigned','disposition','AbandonInteraction','file','type','attachmentDownload','closed','Unauthorized','Attachment','attachId','ChatOfflineMessageId','join','root','server/files/attachments/','offline-chat/','basename','download','close','mailTranscript','pathTranscript','Messages'];(function(_0x140c4d,_0x35ead0){var _0x229255=function(_0x58f2b4){while(--_0x58f2b4){_0x140c4d['push'](_0x140c4d['shift']());}};_0x229255(++_0x35ead0);}(_0x5c3c,0x118));var _0xc5c3=function(_0x2a6809,_0x44edde){_0x2a6809=_0x2a6809-0x0;var _0x11c371=_0x5c3c[_0x2a6809];return _0x11c371;};'use strict';var rimraf=require('rimraf');var zipdir=require('zip-dir');var rp=require(_0xc5c3('0x0'));var moment=require(_0xc5c3('0x1'));var BPromise=require('bluebird');var Mustache=require(_0xc5c3('0x2'));var util=require(_0xc5c3('0x3'));var path=require(_0xc5c3('0x4'));var ejs=require(_0xc5c3('0x5'));var fs=require('fs');var _=require(_0xc5c3('0x6'));var Redis=require(_0xc5c3('0x7'));var interaction=require(_0xc5c3('0x8'));var qs=require('../../components/parsers/qs');var pdf=require(_0xc5c3('0x9'));var logger=require(_0xc5c3('0xa'))(_0xc5c3('0xb'));var config=require(_0xc5c3('0xc'));var db=require(_0xc5c3('0xd'))['db'];config[_0xc5c3('0xe')]=_[_0xc5c3('0xf')](config[_0xc5c3('0xe')],{'host':'localhost','port':0x18eb});var socket=require(_0xc5c3('0x10'))(new Redis(config[_0xc5c3('0xe')]));require(_0xc5c3('0x11'))[_0xc5c3('0x12')](socket);var jayson=require(_0xc5c3('0x13'));var client=jayson[_0xc5c3('0x14')][_0xc5c3('0x15')]({'port':0x232b});var client9004=jayson['client']['http']({'port':0x232c});function respondWithRpcPromise(_0x1187e1,_0x28eeeb,_0x501dc1,_0x50ca75){return new BPromise(function(_0x4c1b74,_0x5c63c9){var _0x57f88e=_0x50ca75||client;return _0x57f88e[_0xc5c3('0x16')](_0x1187e1,_0x501dc1)[_0xc5c3('0x17')](function(_0x57f372){logger[_0xc5c3('0x18')]('ChatInteraction,\x20%s,\x20%s',_0x28eeeb,_0xc5c3('0x19'));logger['debug'](_0xc5c3('0x1a'),_0x28eeeb,_0xc5c3('0x19'),JSON[_0xc5c3('0x1b')](_0x57f372));if(_0x57f372[_0xc5c3('0x1c')]){if(_0x57f372[_0xc5c3('0x1c')][_0xc5c3('0x1d')]===0x1f4){logger[_0xc5c3('0x1c')]('ChatInteraction,\x20%s,\x20%s',_0x28eeeb,_0x57f372['error'][_0xc5c3('0x1e')]);return _0x5c63c9(_0x57f372[_0xc5c3('0x1c')][_0xc5c3('0x1e')]);}logger['error'](_0xc5c3('0x1f'),_0x28eeeb,_0x57f372[_0xc5c3('0x1c')]['message']);return _0x4c1b74(_0x57f372['error'][_0xc5c3('0x1e')]);}else{logger[_0xc5c3('0x18')](_0xc5c3('0x1f'),_0x28eeeb,_0xc5c3('0x19'));_0x4c1b74(_0x57f372[_0xc5c3('0x20')][_0xc5c3('0x1e')]);}})[_0xc5c3('0x21')](function(_0x20c83e){logger[_0xc5c3('0x1c')](_0xc5c3('0x1f'),_0x28eeeb,_0x20c83e);_0x5c63c9(_0x20c83e);});});}function respondWithStatusCode(_0xdf93a0,_0x2f2048){_0x2f2048=_0x2f2048||0xcc;return function(_0x2a18ad){if(_0x2a18ad){return _0xdf93a0[_0xc5c3('0x22')](_0x2f2048);}return _0xdf93a0[_0xc5c3('0x23')](_0x2f2048)['end']();};}function respondWithResult(_0xaeeabb,_0x5c260){_0x5c260=_0x5c260||0xc8;return function(_0x2d7776){if(_0x2d7776){return _0xaeeabb['status'](_0x5c260)['json'](_0x2d7776);}};}function respondWithFilteredResult(_0x599883,_0x53eddd){return function(_0x3b2b82){if(_0x3b2b82){var _0x2ee69a=typeof _0x53eddd['offset']===_0xc5c3('0x24')&&typeof _0x53eddd[_0xc5c3('0x25')]==='undefined';var _0x203d96=_0x3b2b82[_0xc5c3('0x26')];var _0x36a703=_0x2ee69a?0x0:_0x53eddd[_0xc5c3('0x27')];var _0x248859=_0x2ee69a?_0x3b2b82[_0xc5c3('0x26')]:_0x53eddd[_0xc5c3('0x27')]+_0x53eddd[_0xc5c3('0x25')];var _0x17d120;if(_0x248859>=_0x203d96){_0x248859=_0x203d96;_0x17d120=0xc8;}else{_0x17d120=0xce;}_0x599883[_0xc5c3('0x23')](_0x17d120);return _0x599883[_0xc5c3('0x28')](_0xc5c3('0x29'),_0x36a703+'-'+_0x248859+'/'+_0x203d96)[_0xc5c3('0x2a')](_0x3b2b82);}return null;};}function saveUpdates(_0x4f710c){return function(_0x4758be){if(_0x4758be){return _0x4758be['update'](_0x4f710c)['then'](function(_0x207506){return _0x207506;});}return null;};}function removeEntity(_0x3c4d24){return function(_0x212bfd){if(_0x212bfd){return _0x212bfd[_0xc5c3('0x2b')]()[_0xc5c3('0x17')](function(){_0x3c4d24['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x34f685){return function(_0x1e0acd){if(!_0x1e0acd){_0x34f685[_0xc5c3('0x22')](0x194);}return _0x1e0acd;};}function handleError(_0x3ed779,_0x341da8){_0x341da8=_0x341da8||0x1f4;return function(_0x3167de){logger[_0xc5c3('0x1c')](_0x3167de[_0xc5c3('0x2c')]);if(_0x3167de[_0xc5c3('0x2d')]){delete _0x3167de[_0xc5c3('0x2d')];}_0x3ed779[_0xc5c3('0x23')](_0x341da8)['send'](_0x3167de);};}function getMustacheRender(_0x2e8bb3,_0x5c4e42){return Mustache[_0xc5c3('0x2e')](_0x2e8bb3,_[_0xc5c3('0x2f')](_0x5c4e42[_0xc5c3('0x30')],{'contact':_0x5c4e42['contact'],'message':_0x5c4e42['message'],'agent':_0x5c4e42['agent'],'interaction':_0x5c4e42[_0xc5c3('0x31')],'account':_0x5c4e42[_0xc5c3('0x32')]}))||'';}exports['index']=function(_0x5bff72,_0x59b4d4){var _0x142104={};var _0x642520=_[_0xc5c3('0x33')](db[_0xc5c3('0x34')][_0xc5c3('0x35')],function(_0x3fc046){return{'name':_0x3fc046[_0xc5c3('0x36')],'type':_0x3fc046['type'][_0xc5c3('0x37')]};});_0x142104=qs['getOptions'](_0x642520,_0x5bff72);return interaction[_0xc5c3('0x38')](_0xc5c3('0x39'),_0x5bff72['query'],_0x5bff72[_0xc5c3('0x3a')],_0x142104,_0x642520)[_0xc5c3('0x17')](respondWithFilteredResult(_0x59b4d4,_0x142104))[_0xc5c3('0x21')](handleError(_0x59b4d4,null));};exports[_0xc5c3('0x3b')]=function(_0xbd3f62,_0x439c29){var _0x47a1cc={'raw':![],'where':{'id':_0xbd3f62[_0xc5c3('0x3c')]['id']}},_0x151ebd={};_0x151ebd[_0xc5c3('0x3d')]=_[_0xc5c3('0x3e')](db[_0xc5c3('0x34')][_0xc5c3('0x35')]);_0x151ebd[_0xc5c3('0x3f')]=_[_0xc5c3('0x3e')](_0xbd3f62[_0xc5c3('0x3f')]);_0x151ebd[_0xc5c3('0x40')]=_['intersection'](_0x151ebd[_0xc5c3('0x3d')],_0x151ebd['query']);_0x47a1cc[_0xc5c3('0x41')]=_['intersection'](_0x151ebd[_0xc5c3('0x3d')],qs[_0xc5c3('0x42')](_0xbd3f62[_0xc5c3('0x3f')][_0xc5c3('0x42')]));_0x47a1cc[_0xc5c3('0x41')]=_0x47a1cc[_0xc5c3('0x41')][_0xc5c3('0x43')]?_0x47a1cc[_0xc5c3('0x41')]:_0x151ebd[_0xc5c3('0x3d')];if(_0xbd3f62[_0xc5c3('0x3f')][_0xc5c3('0x44')]){_0x47a1cc['include']=[{'all':!![]}];}_0x47a1cc=_[_0xc5c3('0x2f')]({},_0x47a1cc,_0xbd3f62[_0xc5c3('0x45')]);return db[_0xc5c3('0x34')][_0xc5c3('0x46')](_0x47a1cc)[_0xc5c3('0x17')](handleEntityNotFound(_0x439c29,null))[_0xc5c3('0x17')](respondWithResult(_0x439c29,null))[_0xc5c3('0x21')](handleError(_0x439c29,null));};exports[_0xc5c3('0x47')]=function(_0x4e6187,_0x55b07b){return db[_0xc5c3('0x34')]['create'](_0x4e6187[_0xc5c3('0x30')],{})[_0xc5c3('0x17')](respondWithResult(_0x55b07b,0xc9))[_0xc5c3('0x21')](handleError(_0x55b07b,null));};exports[_0xc5c3('0x48')]=function(_0x27a92e,_0x30bd71){if(_0x27a92e[_0xc5c3('0x30')]['id']){delete _0x27a92e[_0xc5c3('0x30')]['id'];}return db[_0xc5c3('0x34')]['find']({'where':{'id':_0x27a92e[_0xc5c3('0x3c')]['id']}})[_0xc5c3('0x17')](handleEntityNotFound(_0x30bd71,null))[_0xc5c3('0x17')](saveUpdates(_0x27a92e[_0xc5c3('0x30')],null))[_0xc5c3('0x17')](respondWithResult(_0x30bd71,null))[_0xc5c3('0x21')](handleError(_0x30bd71,null));};exports[_0xc5c3('0x2b')]=function(_0x41c481,_0x41a822){return db['ChatInteraction'][_0xc5c3('0x46')]({'where':{'id':_0x41c481[_0xc5c3('0x3c')]['id']}})['then'](handleEntityNotFound(_0x41a822,null))['then'](removeEntity(_0x41a822,null))[_0xc5c3('0x21')](handleError(_0x41a822,null));};exports[_0xc5c3('0x49')]=function(_0x200fa2,_0x115f5a){return db[_0xc5c3('0x34')][_0xc5c3('0x49')]()['then'](respondWithResult(_0x115f5a,null))[_0xc5c3('0x21')](handleError(_0x115f5a,null));};exports[_0xc5c3('0x4a')]=function(_0xaecb7e,_0xb7bbe9){var _0x7e5151=_0xaecb7e['params']['id'];var _0x2eba88;var _0x196273;var _0x4cc500;return db['ChatInteraction'][_0xc5c3('0x4b')]({'where':{'id':_0x7e5151}})[_0xc5c3('0x17')](function(_0x1566a6){_0x2eba88=_0x1566a6;return db['ChatWebsite'][_0xc5c3('0x4b')]({'where':{'id':_0x1566a6['ChatWebsiteId']},'attributes':['id',_0xc5c3('0x4c'),_0xc5c3('0x4d'),'vidaooTopic',_0xc5c3('0x4e'),_0xc5c3('0x4f')],'raw':!![]});})['then'](function(_0x211177){if(_0x211177&&_0x211177[_0xc5c3('0x4c')]&&_0x211177[_0xc5c3('0x4d')]){_0x196273=_0x211177;var _0x447783={'interaction':{'id':_0x7e5151},'agent':{'id':_0xaecb7e[_0xc5c3('0x3a')]['id'],'name':_0xaecb7e['user'][_0xc5c3('0x2d')],'fullname':_0xaecb7e[_0xc5c3('0x3a')][_0xc5c3('0x50')],'email':_0xaecb7e['user'][_0xc5c3('0x51')]},'contact':_0xaecb7e[_0xc5c3('0x30')][_0xc5c3('0x52')],'account':_0xaecb7e['body'][_0xc5c3('0x32')]};var _0x5c16cc={'rejectUnauthorized':![],'method':_0xc5c3('0x53'),'url':_0xc5c3('0x54'),'headers':{'X-APIKEY':_0x211177['vidaooApiKey']},'body':{'duration':null,'scheduledAt':null,'participants':[_0xaecb7e[_0xc5c3('0x3a')][_0xc5c3('0x51')]],'buttons':null,'topic':_0x196273[_0xc5c3('0x55')],'note':_['isNull'](_0x196273['vidaooNote'])?null:getMustacheRender(_0x196273[_0xc5c3('0x4e')],_0x447783),'metadata':null},'redirect':_0xc5c3('0x56'),'json':!![]};try{if(!_[_0xc5c3('0x57')](_0x196273['vidaooMetadata'])){var _0x56f3a8=getMustacheRender(_0x196273[_0xc5c3('0x4f')],_0x447783);var _0x3463c4=JSON['parse'](_0x56f3a8);_0x5c16cc[_0xc5c3('0x30')][_0xc5c3('0x58')]=_0x3463c4;}}catch(_0x31c14d){throw new db[(_0xc5c3('0x59'))][(_0xc5c3('0x5a'))](_0xc5c3('0x5b'));}return rp(_0x5c16cc);}else{throw new db[(_0xc5c3('0x59'))]['ValidationError'](_0xc5c3('0x5c'));}})[_0xc5c3('0x17')](function(_0x49c049){_0x4cc500=_0x49c049;if(_0x4cc500['id']){var _0x16a0bc={'body':_0x4cc500[_0xc5c3('0x5d')],'ChatWebsiteId':_0x196273['id'],'ChatInteractionId':_0x2eba88['id'],'direction':_0xc5c3('0x5e'),'UserId':_0xaecb7e[_0xc5c3('0x3a')]['id']};return db[_0xc5c3('0x5f')]['create'](_0x16a0bc,{});}else{throw new db[(_0xc5c3('0x59'))]['ValidationError'](_0xc5c3('0x60'));}})[_0xc5c3('0x17')](function(){return _0x2eba88[_0xc5c3('0x61')]({'vidaooSessionId':_0x4cc500['id']});})[_0xc5c3('0x17')](respondWithResult(_0xb7bbe9,null))['catch'](handleError(_0xb7bbe9,null));};exports[_0xc5c3('0x62')]=function(_0xe3238f,_0x45a50c){if(_0xe3238f[_0xc5c3('0x30')]['id']){delete _0xe3238f[_0xc5c3('0x30')]['id'];}return db[_0xc5c3('0x34')][_0xc5c3('0x46')]({'where':{'id':_0xe3238f[_0xc5c3('0x3c')]['id']},'include':[{'model':db[_0xc5c3('0x63')],'as':'Contact'}]})[_0xc5c3('0x17')](handleEntityNotFound(_0x45a50c,null))['then'](saveUpdates(_0xe3238f[_0xc5c3('0x30')],null))[_0xc5c3('0x17')](respondWithResult(_0x45a50c,null))[_0xc5c3('0x21')](handleError(_0x45a50c,null));};exports[_0xc5c3('0x64')]=function(_0x119d00,_0x125bb7){if(_0x119d00[_0xc5c3('0x30')]['id']){delete _0x119d00['body']['id'];}return db[_0xc5c3('0x34')]['find']({'where':{'id':_0x119d00['params']['id']}})[_0xc5c3('0x17')](function(_0x4f7631){if(!_0x4f7631){logger[_0xc5c3('0x1c')](_0xc5c3('0x65'),_0xc5c3('0x64'),0x194,'entity\x20not\x20found');_0x125bb7[_0xc5c3('0x22')](0x194);}else{if(_0x4f7631[_0xc5c3('0x66')]){throw new db['Sequelize'][(_0xc5c3('0x5a'))](_0xc5c3('0x67'));}}return _0x4f7631;})[_0xc5c3('0x17')](function(_0x116af5){if(_0x116af5){return _0x116af5[_0xc5c3('0x48')]({'closed':_0x119d00[_0xc5c3('0x30')]['closed'],'disposition':_0x119d00[_0xc5c3('0x30')][_0xc5c3('0x68')]})['then'](function(_0x4c1530){return _0x4c1530;});}})[_0xc5c3('0x17')](function(){return respondWithRpcPromise(_0xc5c3('0x69'),'abandon',_0x119d00[_0xc5c3('0x30')],client9004);})[_0xc5c3('0x17')](respondWithResult(_0x125bb7,null))[_0xc5c3('0x21')](handleError(_0x125bb7,null));};exports['attachmentUpload']=function(_0x41b88b,_0x2f43cd){_0x41b88b[_0xc5c3('0x30')][_0xc5c3('0x2d')]=_0x41b88b[_0xc5c3('0x6a')]['originalname'];_0x41b88b[_0xc5c3('0x30')]['basename']=_0x41b88b['file']['filename'];_0x41b88b[_0xc5c3('0x30')][_0xc5c3('0x6b')]=_0x41b88b[_0xc5c3('0x6a')]['mimetype'];return db['Attachment'][_0xc5c3('0x47')](_0x41b88b[_0xc5c3('0x30')])[_0xc5c3('0x17')](respondWithResult(_0x2f43cd,0xc9))['catch'](handleError(_0x2f43cd,null));};exports[_0xc5c3('0x6c')]=function(_0x515652,_0x1b18c8){return db[_0xc5c3('0x34')][_0xc5c3('0x4b')]({'where':{'id':_0x515652[_0xc5c3('0x3c')]['id']},'raw':!![]})[_0xc5c3('0x17')](handleEntityNotFound(_0x1b18c8,null))['then'](function(_0x42cbd0){if(_0x42cbd0){if(_0x42cbd0[_0xc5c3('0x6d')]){return _0x1b18c8[_0xc5c3('0x23')](0x193)[_0xc5c3('0x2a')]({'status':0x193,'message':_0xc5c3('0x6e')});}return db[_0xc5c3('0x6f')]['findOne']({'where':{'id':_0x515652[_0xc5c3('0x3f')][_0xc5c3('0x70')]},'raw':!![]})[_0xc5c3('0x17')](handleEntityNotFound(_0x1b18c8,null));}})[_0xc5c3('0x17')](function(_0x4b89d0){if(_0x4b89d0){var _0x15e771=_0x4b89d0[_0xc5c3('0x71')]!==null;var _0x1a72ec=path[_0xc5c3('0x72')](config[_0xc5c3('0x73')],_0xc5c3('0x74'));if(_0x15e771){_0x1a72ec=path[_0xc5c3('0x72')](_0x1a72ec,_0xc5c3('0x75'));}var _0x13abd7=path[_0xc5c3('0x72')](_0x1a72ec,_0x4b89d0[_0xc5c3('0x76')]);return _0x1b18c8[_0xc5c3('0x77')](_0x13abd7);}})[_0xc5c3('0x21')](handleError(_0x1b18c8,null));};exports[_0xc5c3('0x78')]=function(_0xfe7b7c,_0x62503){var _0x22214a=null;var _0xc26b1e=null;var _0xc599cd=null;if(_0xfe7b7c[_0xc5c3('0x30')]['id']){delete _0xfe7b7c['body']['id'];}if(_0xfe7b7c['body'][_0xc5c3('0x79')]){_0xc599cd=path[_0xc5c3('0x72')](config[_0xc5c3('0x73')],'server/files/chat/upload/',util['format']('transcript-%s.txt',Date['now']()));_0xfe7b7c[_0xc5c3('0x30')][_0xc5c3('0x7a')]=_0xc599cd;}return db[_0xc5c3('0x34')][_0xc5c3('0x46')]({'where':{'id':_0xfe7b7c[_0xc5c3('0x3c')]['id']},'include':[{'model':db[_0xc5c3('0x5f')],'as':_0xc5c3('0x7b'),'include':[{'model':db['User'],'as':'User'}]}]})[_0xc5c3('0x17')](handleEntityNotFound(_0x62503,null))[_0xc5c3('0x17')](saveUpdates(_0xfe7b7c[_0xc5c3('0x30')],null))[_0xc5c3('0x17')](function(_0x22f98a){if(_0x22f98a){_0x22214a=_0x22f98a;return db['ChatWebsite'][_0xc5c3('0x46')]({'where':{'id':_0x22214a['ChatWebsiteId']}});}})[_0xc5c3('0x17')](function(_0x46c60d){if(_0x46c60d){_0xc26b1e=_0x46c60d;return db['CmContact'][_0xc5c3('0x46')]({'where':{'id':_0x22214a[_0xc5c3('0x7c')]}});}})[_0xc5c3('0x17')](function(_0x19c2ab){if(_0x19c2ab){if(_0xc599cd){var _0x36f25d=null;for(var _0x484920=0x1;_0x484920<_0x22214a['Messages']['length'];++_0x484920){_0x36f25d=_0x22214a['Messages'][_0x484920];var _0x3ff376=_0x36f25d[_0xc5c3('0x66')]?util['format']('%s%d',_0xc26b1e[_0xc5c3('0x7d')],_0x36f25d['UserId']):_0xc5c3('0x7e');var _0x202d0f=_0xfe7b7c['body'][_0xc5c3('0x7f')]||util[_0xc5c3('0x80')](_0xc5c3('0x81'),'Visitor',_0x36f25d[_0xc5c3('0x7c')]);switch(_0xc26b1e[_0xc5c3('0x82')]){case'website_alias':_0x3ff376=_0x36f25d[_0xc5c3('0x66')]?util[_0xc5c3('0x80')]('%s%d',_0xc26b1e[_0xc5c3('0x7d')],_0x36f25d['UserId']):'System';break;case'agent_alias':_0x3ff376=_0x36f25d[_0xc5c3('0x66')]?_0x36f25d['User'][_0xc5c3('0x83')]||_0x36f25d['User'][_0xc5c3('0x50')]:'System';break;case _0xc5c3('0x84'):_0x3ff376=_0x36f25d[_0xc5c3('0x66')]?_0x36f25d['User']['fullname']:_0xc5c3('0x7e');break;default:_0x3ff376=_0x36f25d[_0xc5c3('0x66')]?util[_0xc5c3('0x80')](_0xc5c3('0x81'),_0xc26b1e[_0xc5c3('0x7d')],_0x36f25d['UserId']):_0xc5c3('0x7e');}var _0x5d0a42=util[_0xc5c3('0x80')](_0xc5c3('0x85'),moment(_0x36f25d['createdAt'])[_0xc5c3('0x80')](_0xc5c3('0x86')),_0x36f25d[_0xc5c3('0x87')]==='in'?_0x202d0f:_0x3ff376,_0x36f25d[_0xc5c3('0x30')]);if(!_0x36f25d[_0xc5c3('0x88')]){fs[_0xc5c3('0x89')](_0xc599cd,_0x5d0a42);}}return db['MailAccount'][_0xc5c3('0x4b')]({'where':{'service':!![]},'include':[{'model':db[_0xc5c3('0x8a')],'as':_0xc5c3('0x8b'),'raw':!![],'include':[{'model':db[_0xc5c3('0x8c')],'as':'CloudProvider','raw':!![]}]}]});}}})[_0xc5c3('0x17')](function(_0x3f0a05){if(!_0x3f0a05||!_0x3f0a05[_0xc5c3('0x8b')]||!_0xfe7b7c[_0xc5c3('0x30')])return _0x22214a;var _0xc171f4=_0x3f0a05[_0xc5c3('0x8d')]();return respondWithRpcPromise(_0xc5c3('0x8e'),'sendMail',{'account':_0xc171f4,'message':{'from':util['format'](_0xc5c3('0x8f'),_0x3f0a05['name'],_0x3f0a05['email']||_0x3f0a05['Smtp'][_0xc5c3('0x3a')]),'to':_0xfe7b7c[_0xc5c3('0x30')][_0xc5c3('0x79')],'subject':_0xc5c3('0x90'),'text':util['format'](_0xc5c3('0x91'),_0xfe7b7c['body']['mailTranscript']),'attachments':[{'path':_0xc599cd}]}})['then'](function(){return _0x22214a;})['catch'](function(_0x509d6c){logger['error'](_0x509d6c);});})[_0xc5c3('0x17')](respondWithStatusCode(_0x62503,0xc8))[_0xc5c3('0x21')](handleError(_0x62503,null));};exports[_0xc5c3('0x92')]=function(_0x29d344,_0x4189bd){return db['ChatMessage'][_0xc5c3('0x46')]({'where':{'id':_0x29d344[_0xc5c3('0x3c')]['id']}})[_0xc5c3('0x17')](handleEntityNotFound(_0x4189bd,null))[_0xc5c3('0x17')](function(_0x47e7b6){if(_0x47e7b6){return _0x47e7b6[_0xc5c3('0x92')](_0x29d344[_0xc5c3('0x30')][_0xc5c3('0x93')],_[_0xc5c3('0x94')](_0x29d344[_0xc5c3('0x30')],[_0xc5c3('0x93'),'id'])||{});}})[_0xc5c3('0x17')](respondWithResult(_0x4189bd,null))['catch'](handleError(_0x4189bd,null));};exports[_0xc5c3('0x95')]=function(_0x1fbcfb,_0x9a3955){var _0x3ac1b9={'raw':![],'where':{}};var _0x42c7fc={};var _0x3b1e64={'count':0x0,'rows':[]};return db[_0xc5c3('0x34')][_0xc5c3('0x4b')]({'where':{'id':_0x1fbcfb[_0xc5c3('0x3c')]['id']}})[_0xc5c3('0x17')](handleEntityNotFound(_0x9a3955,null))['then'](function(_0x335b85){if(_0x335b85){_0x42c7fc[_0xc5c3('0x3d')]=_[_0xc5c3('0x3e')](db[_0xc5c3('0x5f')][_0xc5c3('0x35')]);_0x42c7fc['query']=_[_0xc5c3('0x3e')](_0x1fbcfb[_0xc5c3('0x3f')]);_0x42c7fc[_0xc5c3('0x40')]=_[_0xc5c3('0x96')](_0x42c7fc[_0xc5c3('0x3d')],_0x42c7fc[_0xc5c3('0x3f')]);_0x3ac1b9[_0xc5c3('0x41')]=_[_0xc5c3('0x96')](_0x42c7fc[_0xc5c3('0x3d')],qs[_0xc5c3('0x42')](_0x1fbcfb['query'][_0xc5c3('0x42')]));_0x3ac1b9['attributes']=_0x3ac1b9[_0xc5c3('0x41')]['length']?_0x3ac1b9['attributes']:_0x42c7fc[_0xc5c3('0x3d')];if(!_0x1fbcfb[_0xc5c3('0x3f')][_0xc5c3('0x97')](_0xc5c3('0x98'))){_0x3ac1b9[_0xc5c3('0x25')]=qs['limit'](_0x1fbcfb[_0xc5c3('0x3f')][_0xc5c3('0x25')]);_0x3ac1b9['offset']=qs['offset'](_0x1fbcfb['query']['offset']);}_0x3ac1b9[_0xc5c3('0x99')]=qs[_0xc5c3('0x9a')](_0x1fbcfb[_0xc5c3('0x3f')][_0xc5c3('0x9a')]);_0x3ac1b9[_0xc5c3('0x9b')]=qs[_0xc5c3('0x40')](_[_0xc5c3('0x9c')](_0x1fbcfb[_0xc5c3('0x3f')],_0x42c7fc[_0xc5c3('0x40')]));_0x3ac1b9[_0xc5c3('0x9b')][_0xc5c3('0x9d')]=_0x335b85['id'];if(_0x1fbcfb[_0xc5c3('0x3f')][_0xc5c3('0x9e')]){_0x3ac1b9[_0xc5c3('0x9b')]=_[_0xc5c3('0x2f')](_0x3ac1b9['where'],{'$or':_[_0xc5c3('0x33')](_0x3ac1b9[_0xc5c3('0x41')],function(_0x310c0c){var _0x3d0d01={};_0x3d0d01[_0x310c0c]={'$like':'%'+_0x1fbcfb[_0xc5c3('0x3f')][_0xc5c3('0x9e')]+'%'};return _0x3d0d01;})});}if(_0x1fbcfb[_0xc5c3('0x3f')]['$gte']){var _0x1ac92b=_0x1fbcfb[_0xc5c3('0x3f')][_0xc5c3('0x9f')][_0xc5c3('0xa0')](',');var _0x2674cb={};_0x2674cb[_0x1ac92b[0x0]]={'$gte':moment(_0x1ac92b[0x1])['format'](_0xc5c3('0xa1'))};_0x3ac1b9[_0xc5c3('0x9b')]=_[_0xc5c3('0x2f')](_0x3ac1b9[_0xc5c3('0x9b')],_0x2674cb);}_0x3ac1b9=_[_0xc5c3('0x2f')]({},_0x3ac1b9,_0x1fbcfb[_0xc5c3('0x45')]);return db['ChatMessage'][_0xc5c3('0x26')]({'where':_0x3ac1b9[_0xc5c3('0x9b')]})['then'](function(_0x1c8443){_0x3b1e64[_0xc5c3('0x26')]=_0x1c8443;if(_0x1fbcfb[_0xc5c3('0x3f')]['includeAll']){_0x3ac1b9['include']=[{'all':!![]}];}return db['ChatMessage']['findAll'](_0x3ac1b9);})[_0xc5c3('0x17')](function(_0x32c108){_0x3b1e64[_0xc5c3('0xa2')]=_0x32c108;return _0x3b1e64;});}})['then'](respondWithFilteredResult(_0x9a3955,_0x3ac1b9))[_0xc5c3('0x21')](handleError(_0x9a3955,null));};exports[_0xc5c3('0xa3')]=function(_0x17cb0c,_0x2074e9){var _0x2f19b8={'where':{}},_0x4320d3={},_0x371161={'count':0x0,'rows':[]};return db[_0xc5c3('0x34')][_0xc5c3('0x4b')]({'where':{'id':_0x17cb0c[_0xc5c3('0x3c')]['id']}})[_0xc5c3('0x17')](handleEntityNotFound(_0x2074e9,null))[_0xc5c3('0x17')](function(_0x118393){if(_0x118393){_0x4320d3['model']=_[_0xc5c3('0x3e')](db[_0xc5c3('0x5f')][_0xc5c3('0x35')]);_0x4320d3[_0xc5c3('0x3f')]=_[_0xc5c3('0x3e')](_0x17cb0c['query']);_0x4320d3['filters']=_[_0xc5c3('0x96')](_0x4320d3[_0xc5c3('0x3d')],_0x4320d3[_0xc5c3('0x3f')]);_0x2f19b8['attributes']=_[_0xc5c3('0x96')](_0x4320d3['model'],qs[_0xc5c3('0x42')](_0x17cb0c[_0xc5c3('0x3f')]['fields']));_0x2f19b8[_0xc5c3('0x41')]=_0x2f19b8['attributes'][_0xc5c3('0x43')]?_0x2f19b8[_0xc5c3('0x41')]:_0x4320d3['model'];if(!_0x17cb0c[_0xc5c3('0x3f')]['hasOwnProperty'](_0xc5c3('0x98'))){_0x2f19b8['limit']=qs[_0xc5c3('0x25')](_0x17cb0c[_0xc5c3('0x3f')]['limit']);_0x2f19b8[_0xc5c3('0x27')]=qs[_0xc5c3('0x27')](_0x17cb0c['query'][_0xc5c3('0x27')]);}_0x2f19b8[_0xc5c3('0x99')]=qs[_0xc5c3('0x9a')](_0x17cb0c[_0xc5c3('0x3f')][_0xc5c3('0x9a')]);_0x2f19b8[_0xc5c3('0x9b')]=qs[_0xc5c3('0x40')](_[_0xc5c3('0x9c')](_0x17cb0c[_0xc5c3('0x3f')],_0x4320d3[_0xc5c3('0x40')]));_0x2f19b8[_0xc5c3('0x9b')][_0xc5c3('0x9d')]=_0x118393['id'];if(_0x17cb0c[_0xc5c3('0x3f')]['filter']){_0x2f19b8['where']=_[_0xc5c3('0x2f')](_0x2f19b8[_0xc5c3('0x9b')],{'$or':_[_0xc5c3('0x33')](_0x2f19b8[_0xc5c3('0x41')],function(_0x32377d){var _0x233643={};_0x233643[_0x32377d]={'$like':'%'+_0x17cb0c[_0xc5c3('0x3f')][_0xc5c3('0x9e')]+'%'};return _0x233643;})});}_0x2f19b8[_0xc5c3('0x9b')][_0xc5c3('0x88')]=![];if(_0x17cb0c[_0xc5c3('0x3f')]['id']){_0x2f19b8[_0xc5c3('0x9b')]['id']={'$gt':_0x17cb0c['query']['id']};}_0x2f19b8=_[_0xc5c3('0x2f')]({},_0x2f19b8,_0x17cb0c['options']);return db[_0xc5c3('0x5f')][_0xc5c3('0x26')]({'where':_0x2f19b8[_0xc5c3('0x9b')]})['then'](function(_0x352d2f){_0x371161[_0xc5c3('0x26')]=_0x352d2f;_0x2f19b8[_0xc5c3('0xa4')]=[];if(_0x17cb0c[_0xc5c3('0x3f')][_0xc5c3('0xa5')]){_0x2f19b8[_0xc5c3('0xa4')][_0xc5c3('0xa6')]({'model':db[_0xc5c3('0xa7')],'as':_0xc5c3('0xa7'),'attributes':['id',_0xc5c3('0x50'),_0xc5c3('0x83')]});}if(_0x17cb0c['query'][_0xc5c3('0x44')]){_0x2f19b8[_0xc5c3('0xa4')]=[{'all':!![]}];}return db[_0xc5c3('0x5f')][_0xc5c3('0x38')](_0x2f19b8);})[_0xc5c3('0x17')](function(_0x5ec128){_0x371161[_0xc5c3('0xa2')]=_0x5ec128;return _0x371161;});}})[_0xc5c3('0x17')](respondWithFilteredResult(_0x2074e9,_0x2f19b8))[_0xc5c3('0x21')](handleError(_0x2074e9,null));};exports['addTags']=function(_0x4ee192,_0x33b492){return db[_0xc5c3('0x34')][_0xc5c3('0x46')]({'where':{'id':_0x4ee192[_0xc5c3('0x3c')]['id']}})[_0xc5c3('0x17')](handleEntityNotFound(_0x33b492,null))[_0xc5c3('0x17')](function(_0x58e5c9){if(_0x58e5c9){return _0x58e5c9['setTags'](_0x4ee192[_0xc5c3('0x30')]['ids'],_[_0xc5c3('0x94')](_0x4ee192[_0xc5c3('0x30')],[_0xc5c3('0x93'),'id'])||{})[_0xc5c3('0xa8')](function(){return db[_0xc5c3('0xa9')][_0xc5c3('0x38')]({'attributes':['id',_0xc5c3('0x2d'),_0xc5c3('0xaa')],'where':{'id':_0x4ee192[_0xc5c3('0x30')][_0xc5c3('0x93')]}});})[_0xc5c3('0x17')](function(_0x34d60f){socket[_0xc5c3('0xab')]('chatInteractionTags:save',{'id':Number(_0x4ee192['params']['id']),'tags':_0x34d60f||[]});return{'id':Number(_0x4ee192[_0xc5c3('0x3c')]['id']),'tags':_0x34d60f||[]};});}})[_0xc5c3('0x17')](respondWithResult(_0x33b492,null))[_0xc5c3('0x21')](handleError(_0x33b492,null));};exports[_0xc5c3('0xac')]=function(_0x851091,_0x54e9ce){return db[_0xc5c3('0x34')]['find']({'where':{'id':_0x851091[_0xc5c3('0x3c')]['id']}})[_0xc5c3('0x17')](handleEntityNotFound(_0x54e9ce,null))[_0xc5c3('0x17')](function(_0x55232c){if(_0x55232c){return _0x55232c[_0xc5c3('0xac')](_0x851091[_0xc5c3('0x3f')][_0xc5c3('0x93')]);}})[_0xc5c3('0x17')](respondWithStatusCode(_0x54e9ce,null))[_0xc5c3('0x21')](handleError(_0x54e9ce,null));};exports[_0xc5c3('0x77')]=function(_0x42fef7,_0xf492ff){var _0xd9de79=moment()[_0xc5c3('0xad')]()[_0xc5c3('0xae')]();var _0x409b27=path[_0xc5c3('0x72')](config[_0xc5c3('0x73')],_0xc5c3('0xaf'),_0xc5c3('0xb0'),_0xc5c3('0xb1'));var _0x19ce94=path[_0xc5c3('0x72')](config[_0xc5c3('0x73')],_0xc5c3('0xaf'),_0xc5c3('0xb0'),'attachments');var _0x55247a=path[_0xc5c3('0x72')](_0x409b27,_0xd9de79);var _0x428b4e=util['format']('transcript-%d-%s.zip',_0x42fef7[_0xc5c3('0x3c')]['id'],_0xd9de79);var _0x529187=path['join'](_0x409b27,_0x428b4e);var _0x346842=[];_0x346842[_0xc5c3('0xa6')]({'model':db['User'],'as':'User','attributes':['id',_0xc5c3('0x50')],'raw':!![]});_0x346842[_0xc5c3('0xa6')]({'model':db[_0xc5c3('0x63')],'as':_0xc5c3('0xb2'),'attributes':['id','firstName',_0xc5c3('0xb3')],'raw':!![]});if(_0x42fef7[_0xc5c3('0x3f')][_0xc5c3('0xb4')]){_0x346842['push']({'model':db[_0xc5c3('0x6f')],'as':'Attachment','raw':!![]});}var _0x9b2bb8=[{'model':db[_0xc5c3('0x5f')],'as':_0xc5c3('0x7b'),'attributes':['id',_0xc5c3('0x30'),_0xc5c3('0xb5'),'direction','secret','read'],'include':_0x346842}];_0x9b2bb8[_0xc5c3('0xa6')]({'model':db[_0xc5c3('0xb6')],'as':_0xc5c3('0xb7'),'attributes':['id','name']});_0x9b2bb8[_0xc5c3('0xa6')]({'model':db[_0xc5c3('0xa7')],'as':_0xc5c3('0xb8'),'attributes':['id',_0xc5c3('0x50')]});return db[_0xc5c3('0x34')][_0xc5c3('0x46')]({'where':{'id':_0x42fef7[_0xc5c3('0x3c')]['id']},'include':_0x9b2bb8})[_0xc5c3('0x17')](handleEntityNotFound(_0xf492ff,null))[_0xc5c3('0x17')](function(_0x485b52){if(_0x485b52){var _0x5d39eb=_0x485b52['get']({'plain':!![]});fs[_0xc5c3('0xb9')](_0x55247a);var _0x29e62f={'channel':'Chat','account':_0x5d39eb['Account'][_0xc5c3('0x2d')],'agent':_0x5d39eb[_0xc5c3('0xb8')]?_0x5d39eb[_0xc5c3('0xb8')][_0xc5c3('0x50')]:_0xc5c3('0xba'),'createdAt':moment(_0x5d39eb[_0xc5c3('0xb5')])[_0xc5c3('0x80')]('YYYY-MM-DD\x20HH:mm:ss')[_0xc5c3('0xae')](),'closedAt':_0x5d39eb[_0xc5c3('0x6d')]?moment(_0x5d39eb['closedAt'])[_0xc5c3('0x80')](_0xc5c3('0xa1'))[_0xc5c3('0xae')]():'','disposition':_0x5d39eb[_0xc5c3('0x68')],'chatInfo':{'browser':_0x5d39eb['browserName'],'os':_0x5d39eb['osName'],'referer':_0x5d39eb['referer'],'customerIp':_0x5d39eb['customerIp'],'customerPort':_0x5d39eb[_0xc5c3('0xbb')]?_0x5d39eb['customerPort']:_0xc5c3('0xba')},'messages':_(_0x5d39eb[_0xc5c3('0x7b')])[_0xc5c3('0xbc')]()[_0xc5c3('0x9e')]({'secret':![]})[_0xc5c3('0x33')](function(_0x1986a1){if(_0x1986a1['Attachment']){var _0x13bac0=path[_0xc5c3('0x72')](_0x19ce94,_0x1986a1[_0xc5c3('0x6f')][_0xc5c3('0x76')]);if(fs[_0xc5c3('0xbd')](_0x13bac0)){fs[_0xc5c3('0xbe')](_0x13bac0)[_0xc5c3('0xbf')](fs['createWriteStream'](path[_0xc5c3('0x72')](_0x55247a,_0x1986a1[_0xc5c3('0x6f')]['basename'])));}}return{'date':moment(_0x1986a1[_0xc5c3('0xb5')])['format'](_0xc5c3('0xa1'))[_0xc5c3('0xae')](),'sender':_0x1986a1[_0xc5c3('0x87')]==='out'?_0x1986a1[_0xc5c3('0xa7')]?_0x1986a1[_0xc5c3('0xa7')][_0xc5c3('0x50')]:_0xc5c3('0x7e'):_0x1986a1['Contact'][_0xc5c3('0xc0')]+(_0x1986a1[_0xc5c3('0xb2')][_0xc5c3('0xb3')]?'\x20'+_0x1986a1['Contact'][_0xc5c3('0xb3')]:''),'body':_0x1986a1[_0xc5c3('0x6f')]?_0x1986a1[_0xc5c3('0x6f')][_0xc5c3('0x76')]:_0x1986a1['body'],'direction':_0x1986a1['direction']===_0xc5c3('0x5e')?'A':'C','secret':_0x1986a1[_0xc5c3('0x88')],'read':_0x1986a1[_0xc5c3('0xc1')],'attachment':_0x1986a1[_0xc5c3('0x6f')]};})[_0xc5c3('0xc2')]()};return ejs[_0xc5c3('0xc3')](path['join'](config[_0xc5c3('0x73')],_0xc5c3('0xaf'),'views',_0xc5c3('0xc4')),{'interaction':_0x29e62f})[_0xc5c3('0x17')](function(_0x33ea45){var _0x4be354=path[_0xc5c3('0x72')](_0x55247a,_0xc5c3('0xc5')+_0x5d39eb['id']+'-'+_0xd9de79+_0xc5c3('0xc6'));var _0x21df1={'path':_0x4be354,'channel':'Chat','interactionId':_0x5d39eb['id']};return pdf[_0xc5c3('0xc7')](_0x33ea45,_0x21df1);})[_0xc5c3('0x17')](function(){return new Promise(function(_0x546c2b,_0x256302){zipdir(_0x55247a,{'saveTo':_0x529187},function(_0x554308,_0x7a5063){if(_0x554308)return _0x256302(_0x554308);return _0x546c2b(_0x7a5063);});})[_0xc5c3('0x17')](function(){return new BPromise(function(_0x3af260,_0x366a14){rimraf(_0x55247a,function(_0x8899ff){if(_0x8899ff)_0x366a14(_0x8899ff);return _0x3af260();});});})[_0xc5c3('0x17')](function(){return _0xf492ff[_0xc5c3('0x77')](_0x529187,_0x428b4e,function(_0x58d3f9){if(_0x58d3f9){logger['error'](_0xc5c3('0xc8'),_0x58d3f9);}else{fs[_0xc5c3('0xc9')](_0x529187);}});});});}else{return _0xf492ff[_0xc5c3('0x22')](0xc8);}})[_0xc5c3('0x21')](handleError(_0xf492ff,null));};
\ No newline at end of file
index 89c3e61..4c4b2ff 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd879=['exports','events','../../mysqldb','ChatInteraction','setMaxListeners','save','remove','getUsers','setDataValue','map','findAll','then','unreadMessages','length','emit','catch','hasOwnProperty'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0xd879,0x122));var _0x9d87=function(_0x579bc4,_0x19f3a2){_0x579bc4=_0x579bc4-0x0;var _0x2505dc=_0xd879[_0x579bc4];return _0x2505dc;};'use strict';var EventEmitter=require(_0x9d87('0x0'));var ChatInteraction=require(_0x9d87('0x1'))['db'][_0x9d87('0x2')];var ChatMessage=require(_0x9d87('0x1'))['db']['ChatMessage'];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents[_0x9d87('0x3')](0x0);var events={'afterCreate':_0x9d87('0x4'),'afterUpdate':'update','afterDestroy':_0x9d87('0x5')};function emitEvent(_0x57d916){return function(_0x551a75,_0x3d0b5c,_0x476a7d){_0x551a75[_0x9d87('0x6')]({'attributes':['id'],'raw':!![]})['then'](function(_0x4c2bb8){_0x551a75[_0x9d87('0x7')]('Users',_0x4c2bb8[_0x9d87('0x8')](function(_0x3e7a1b){return{'id':_0x3e7a1b['id']};}));return ChatMessage[_0x9d87('0x9')]({'where':{'ChatInteractionId':_0x551a75['id'],'direction':'in','read':![]},'raw':!![]});})[_0x9d87('0xa')](function(_0x3c209d){_0x551a75[_0x9d87('0x7')](_0x9d87('0xb'),_0x3c209d[_0x9d87('0xc')]);ChatInteractionEvents[_0x9d87('0xd')](_0x57d916+':'+_0x551a75['id'],_0x551a75);ChatInteractionEvents[_0x9d87('0xd')](_0x57d916,_0x551a75);_0x476a7d(null);})[_0x9d87('0xe')](_0x476a7d(null));};}for(var e in events){if(events[_0x9d87('0xf')](e)){var event=events[e];ChatInteraction['hook'](e,emitEvent(event));}}module[_0x9d87('0x10')]=ChatInteractionEvents;
\ No newline at end of file
+var _0xba3f=['ChatInteraction','../../mysqldb','ChatMessage','setMaxListeners','save','update','remove','getUsers','Users','map','findAll','then','unreadMessages','emit','catch','hook','exports','events'];(function(_0x2a4249,_0xae8e83){var _0x4242b7=function(_0x560164){while(--_0x560164){_0x2a4249['push'](_0x2a4249['shift']());}};_0x4242b7(++_0xae8e83);}(_0xba3f,0x1e5));var _0xfba3=function(_0x4ac955,_0x213752){_0x4ac955=_0x4ac955-0x0;var _0xe5f809=_0xba3f[_0x4ac955];return _0xe5f809;};'use strict';var EventEmitter=require(_0xfba3('0x0'));var ChatInteraction=require('../../mysqldb')['db'][_0xfba3('0x1')];var ChatMessage=require(_0xfba3('0x2'))['db'][_0xfba3('0x3')];var ChatInteractionEvents=new EventEmitter();ChatInteractionEvents[_0xfba3('0x4')](0x0);var events={'afterCreate':_0xfba3('0x5'),'afterUpdate':_0xfba3('0x6'),'afterDestroy':_0xfba3('0x7')};function emitEvent(_0x370081){return function(_0x18ab8d,_0x3b67c9,_0x1893d4){_0x18ab8d[_0xfba3('0x8')]({'attributes':['id'],'raw':!![]})['then'](function(_0x49e323){_0x18ab8d['setDataValue'](_0xfba3('0x9'),_0x49e323[_0xfba3('0xa')](function(_0x2d4775){return{'id':_0x2d4775['id']};}));return ChatMessage[_0xfba3('0xb')]({'where':{'ChatInteractionId':_0x18ab8d['id'],'direction':'in','read':![]},'raw':!![]});})[_0xfba3('0xc')](function(_0x475735){_0x18ab8d['setDataValue'](_0xfba3('0xd'),_0x475735['length']);ChatInteractionEvents['emit'](_0x370081+':'+_0x18ab8d['id'],_0x18ab8d);ChatInteractionEvents[_0xfba3('0xe')](_0x370081,_0x18ab8d);_0x1893d4(null);})[_0xfba3('0xf')](_0x1893d4(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatInteraction[_0xfba3('0x10')](e,emitEvent(event));}}module[_0xfba3('0x11')]=ChatInteractionEvents;
\ No newline at end of file
index 66ad7a7..6ee2012 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x078a=['./chatInteraction.attributes','define','ChatInteraction','chat_interactions','closed','format','YYYY-MM-DD\x20HH:mm:ss','utf8mb4','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment'];(function(_0x26b5ff,_0x92009a){var _0x58603e=function(_0x4454ff){while(--_0x4454ff){_0x26b5ff['push'](_0x26b5ff['shift']());}};_0x58603e(++_0x92009a);}(_0x078a,0x1d8));var _0xa078=function(_0x1e50b6,_0x15b74d){_0x1e50b6=_0x1e50b6-0x0;var _0xc4dcb3=_0x078a[_0x1e50b6];return _0xc4dcb3;};'use strict';var _=require('lodash');var util=require(_0xa078('0x0'));var logger=require(_0xa078('0x1'))(_0xa078('0x2'));var moment=require(_0xa078('0x3'));var BPromise=require('bluebird');var rp=require(_0xa078('0x4'));var fs=require('fs');var path=require(_0xa078('0x5'));var rimraf=require(_0xa078('0x6'));var config=require(_0xa078('0x7'));var attributes=require(_0xa078('0x8'));module['exports']=function(_0x548053,_0x4dbcab){return _0x548053[_0xa078('0x9')](_0xa078('0xa'),attributes,{'tableName':_0xa078('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4eeb21,_0xa5d146,_0x33cd9d){if(_0x4eeb21['changed'](_0xa078('0xc'))){_0x4eeb21['closedAt']=moment()[_0xa078('0xd')](_0xa078('0xe'));}_0x33cd9d(null,_0x4eeb21);}},'charset':_0xa078('0xf'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x81eb=['format','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./chatInteraction.attributes','exports','ChatInteraction','changed','closed'];(function(_0x19d350,_0x3c843f){var _0x3bfc8d=function(_0xd89003){while(--_0xd89003){_0x19d350['push'](_0x19d350['shift']());}};_0x3bfc8d(++_0x3c843f);}(_0x81eb,0x91));var _0xb81e=function(_0x4646ed,_0x207e40){_0x4646ed=_0x4646ed-0x0;var _0x3b2b1a=_0x81eb[_0x4646ed];return _0x3b2b1a;};'use strict';var _=require(_0xb81e('0x0'));var util=require(_0xb81e('0x1'));var logger=require(_0xb81e('0x2'))(_0xb81e('0x3'));var moment=require(_0xb81e('0x4'));var BPromise=require(_0xb81e('0x5'));var rp=require(_0xb81e('0x6'));var fs=require('fs');var path=require(_0xb81e('0x7'));var rimraf=require(_0xb81e('0x8'));var config=require(_0xb81e('0x9'));var attributes=require(_0xb81e('0xa'));module[_0xb81e('0xb')]=function(_0x4bc44a,_0x16cc12){return _0x4bc44a['define'](_0xb81e('0xc'),attributes,{'tableName':'chat_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x5c4309,_0x42a955,_0x14136c){if(_0x5c4309[_0xb81e('0xd')](_0xb81e('0xe'))){_0x5c4309['closedAt']=moment()[_0xb81e('0xf')]('YYYY-MM-DD\x20HH:mm:ss');}_0x14136c(null,_0x5c4309);}},'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
index 550c596..ae224f2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x55db=['options','where','attributes','limit','then','debug','ChatInteraction','find','addTags','body','ids','spread','AddTags','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','./chatInteraction.socket','register','request','info','ChatInteraction,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','UpdateChatInteraction','update','raw'];(function(_0x10356a,_0x526f4a){var _0x38d1e8=function(_0xcf1c17){while(--_0xcf1c17){_0x10356a['push'](_0x10356a['shift']());}};_0x38d1e8(++_0x526f4a);}(_0x55db,0x13a));var _0xb55d=function(_0xc2c13a,_0x1070d3){_0xc2c13a=_0xc2c13a-0x0;var _0x2b8e2f=_0x55db[_0xc2c13a];return _0x2b8e2f;};'use strict';var _=require('lodash');var util=require(_0xb55d('0x0'));var moment=require(_0xb55d('0x1'));var BPromise=require(_0xb55d('0x2'));var rs=require(_0xb55d('0x3'));var fs=require('fs');var Redis=require(_0xb55d('0x4'));var db=require(_0xb55d('0x5'))['db'];var utils=require(_0xb55d('0x6'));var logger=require(_0xb55d('0x7'))('rpc');var config=require(_0xb55d('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xb55d('0x9')][_0xb55d('0xa')]({'port':0x232a});config[_0xb55d('0xb')]=_[_0xb55d('0xc')](config['redis'],{'host':_0xb55d('0xd'),'port':0x18eb});var socket=require(_0xb55d('0xe'))(new Redis(config[_0xb55d('0xb')]));require(_0xb55d('0xf'))[_0xb55d('0x10')](socket);function respondWithRpcPromise(_0x174ef1,_0x3473c8,_0x28bf54){return new BPromise(function(_0x463d3,_0xd8f113){return client[_0xb55d('0x11')](_0x174ef1,_0x28bf54)['then'](function(_0x3d0f73){logger[_0xb55d('0x12')](_0xb55d('0x13'),_0x3473c8,_0xb55d('0x14'));logger['debug']('ChatInteraction,\x20%s,\x20%s,\x20%s',_0x3473c8,'request\x20sent',JSON[_0xb55d('0x15')](_0x3d0f73));if(_0x3d0f73[_0xb55d('0x16')]){if(_0x3d0f73[_0xb55d('0x16')][_0xb55d('0x17')]===0x1f4){logger[_0xb55d('0x16')](_0xb55d('0x13'),_0x3473c8,_0x3d0f73[_0xb55d('0x16')][_0xb55d('0x18')]);return _0xd8f113(_0x3d0f73[_0xb55d('0x16')][_0xb55d('0x18')]);}logger[_0xb55d('0x16')]('ChatInteraction,\x20%s,\x20%s',_0x3473c8,_0x3d0f73[_0xb55d('0x16')][_0xb55d('0x18')]);return _0x463d3(_0x3d0f73[_0xb55d('0x16')][_0xb55d('0x18')]);}else{logger['info'](_0xb55d('0x13'),_0x3473c8,'request\x20sent');_0x463d3(_0x3d0f73[_0xb55d('0x19')]['message']);}})[_0xb55d('0x1a')](function(_0x331cd3){logger[_0xb55d('0x16')](_0xb55d('0x13'),_0x3473c8,_0x331cd3);_0xd8f113(_0x331cd3);});});}exports[_0xb55d('0x1b')]=function(_0x48477b){var _0x29d60f=this;return new Promise(function(_0xb5adbd,_0x297a9a){return db['ChatInteraction'][_0xb55d('0x1c')](_0x48477b['body'],{'raw':_0x48477b['options']?_0x48477b['options'][_0xb55d('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x48477b[_0xb55d('0x1e')]?_0x48477b[_0xb55d('0x1e')][_0xb55d('0x1f')]||null:null,'attributes':_0x48477b[_0xb55d('0x1e')]?_0x48477b[_0xb55d('0x1e')][_0xb55d('0x20')]||null:null,'limit':_0x48477b[_0xb55d('0x1e')]?_0x48477b['options'][_0xb55d('0x21')]||null:null})[_0xb55d('0x22')](function(_0x2b9d12){logger[_0xb55d('0x12')](_0xb55d('0x1b'),_0x48477b);logger[_0xb55d('0x23')](_0xb55d('0x1b'),_0x48477b,JSON[_0xb55d('0x15')](_0x2b9d12));_0xb5adbd(_0x2b9d12);})[_0xb55d('0x1a')](function(_0x25e963){logger['error'](_0xb55d('0x1b'),_0x25e963[_0xb55d('0x18')],_0x48477b);_0x297a9a(_0x29d60f[_0xb55d('0x16')](0x1f4,_0x25e963[_0xb55d('0x18')]));});});};exports['AddTagsToChatInteraction']=function(_0x23ce21){return new Promise(function(_0x5a74fb,_0x2ae814){return db[_0xb55d('0x24')][_0xb55d('0x25')]({'where':_0x23ce21[_0xb55d('0x1e')]?_0x23ce21[_0xb55d('0x1e')][_0xb55d('0x1f')]||null:null})[_0xb55d('0x22')](function(_0x15a4e4){if(_0x15a4e4){return _0x15a4e4[_0xb55d('0x26')](_0x23ce21[_0xb55d('0x27')][_0xb55d('0x28')],_['omit'](_0x23ce21[_0xb55d('0x27')],[_0xb55d('0x28'),'id'])||{});}})[_0xb55d('0x29')](function(_0x1525ec){logger[_0xb55d('0x12')](_0xb55d('0x2a'),_0x23ce21);logger['debug'](_0xb55d('0x2a'),_0x23ce21,JSON[_0xb55d('0x15')](_0x1525ec));_0x5a74fb(_0x1525ec);})['catch'](function(_0x5a6115){logger[_0xb55d('0x16')](_0xb55d('0x2a'),_0x5a6115[_0xb55d('0x18')],_0x23ce21);_0x2ae814(_this['error'](0x1f4,_0x5a6115['message']));});});};
\ No newline at end of file
+var _0x71be=['addTags','omit','AddTags','lodash','util','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','redis','localhost','socket.io-emitter','./chatInteraction.socket','register','request','then','info','ChatInteraction,\x20%s,\x20%s','request\x20sent','debug','ChatInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','update','body','options','raw','attributes','UpdateChatInteraction','AddTagsToChatInteraction','find','where'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x71be,0x17f));var _0xe71b=function(_0x1cfa0d,_0x4391f2){_0x1cfa0d=_0x1cfa0d-0x0;var _0xe33279=_0x71be[_0x1cfa0d];return _0xe33279;};'use strict';var _=require(_0xe71b('0x0'));var util=require(_0xe71b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xe71b('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe71b('0x3'))['db'];var utils=require(_0xe71b('0x4'));var logger=require(_0xe71b('0x5'))(_0xe71b('0x6'));var config=require('../../config/environment');var jayson=require(_0xe71b('0x7'));var client=jayson[_0xe71b('0x8')]['http']({'port':0x232a});config[_0xe71b('0x9')]=_['defaults'](config[_0xe71b('0x9')],{'host':_0xe71b('0xa'),'port':0x18eb});var socket=require(_0xe71b('0xb'))(new Redis(config[_0xe71b('0x9')]));require(_0xe71b('0xc'))[_0xe71b('0xd')](socket);function respondWithRpcPromise(_0x2794ba,_0x142ef8,_0x57edda){return new BPromise(function(_0x46c000,_0x4a3be1){return client[_0xe71b('0xe')](_0x2794ba,_0x57edda)[_0xe71b('0xf')](function(_0x31858b){logger[_0xe71b('0x10')](_0xe71b('0x11'),_0x142ef8,_0xe71b('0x12'));logger[_0xe71b('0x13')](_0xe71b('0x14'),_0x142ef8,'request\x20sent',JSON[_0xe71b('0x15')](_0x31858b));if(_0x31858b['error']){if(_0x31858b[_0xe71b('0x16')][_0xe71b('0x17')]===0x1f4){logger[_0xe71b('0x16')]('ChatInteraction,\x20%s,\x20%s',_0x142ef8,_0x31858b['error']['message']);return _0x4a3be1(_0x31858b[_0xe71b('0x16')][_0xe71b('0x18')]);}logger[_0xe71b('0x16')]('ChatInteraction,\x20%s,\x20%s',_0x142ef8,_0x31858b[_0xe71b('0x16')]['message']);return _0x46c000(_0x31858b['error']['message']);}else{logger['info'](_0xe71b('0x11'),_0x142ef8,_0xe71b('0x12'));_0x46c000(_0x31858b['result'][_0xe71b('0x18')]);}})[_0xe71b('0x19')](function(_0x422a6c){logger[_0xe71b('0x16')](_0xe71b('0x11'),_0x142ef8,_0x422a6c);_0x4a3be1(_0x422a6c);});});}exports['UpdateChatInteraction']=function(_0x38a9ba){var _0x2da49d=this;return new Promise(function(_0x1a00f0,_0xcbde4b){return db['ChatInteraction'][_0xe71b('0x1a')](_0x38a9ba[_0xe71b('0x1b')],{'raw':_0x38a9ba[_0xe71b('0x1c')]?_0x38a9ba['options'][_0xe71b('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x38a9ba['options']?_0x38a9ba[_0xe71b('0x1c')]['where']||null:null,'attributes':_0x38a9ba['options']?_0x38a9ba['options'][_0xe71b('0x1e')]||null:null,'limit':_0x38a9ba[_0xe71b('0x1c')]?_0x38a9ba['options']['limit']||null:null})['then'](function(_0x5c7fdd){logger[_0xe71b('0x10')](_0xe71b('0x1f'),_0x38a9ba);logger[_0xe71b('0x13')](_0xe71b('0x1f'),_0x38a9ba,JSON[_0xe71b('0x15')](_0x5c7fdd));_0x1a00f0(_0x5c7fdd);})[_0xe71b('0x19')](function(_0x5748eb){logger[_0xe71b('0x16')]('UpdateChatInteraction',_0x5748eb['message'],_0x38a9ba);_0xcbde4b(_0x2da49d[_0xe71b('0x16')](0x1f4,_0x5748eb['message']));});});};exports[_0xe71b('0x20')]=function(_0x11b37c){return new Promise(function(_0x560aaa,_0x481a53){return db['ChatInteraction'][_0xe71b('0x21')]({'where':_0x11b37c[_0xe71b('0x1c')]?_0x11b37c[_0xe71b('0x1c')][_0xe71b('0x22')]||null:null})['then'](function(_0xf40616){if(_0xf40616){return _0xf40616[_0xe71b('0x23')](_0x11b37c['body']['ids'],_[_0xe71b('0x24')](_0x11b37c[_0xe71b('0x1b')],['ids','id'])||{});}})['spread'](function(_0x348bf9){logger[_0xe71b('0x10')](_0xe71b('0x25'),_0x11b37c);logger[_0xe71b('0x13')](_0xe71b('0x25'),_0x11b37c,JSON[_0xe71b('0x15')](_0x348bf9));_0x560aaa(_0x348bf9);})[_0xe71b('0x19')](function(_0x300cef){logger[_0xe71b('0x16')](_0xe71b('0x25'),_0x300cef[_0xe71b('0x18')],_0x11b37c);_0x481a53(_this[_0xe71b('0x16')](0x1f4,_0x300cef[_0xe71b('0x18')]));});});};
\ No newline at end of file
index 4e20283..07a6dec 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb27d=['update','emit','removeListener','length','chatInteraction:','./chatInteraction.events','save','remove'];(function(_0x41d1b5,_0x1bad55){var _0x2ee95c=function(_0x254b00){while(--_0x254b00){_0x41d1b5['push'](_0x41d1b5['shift']());}};_0x2ee95c(++_0x1bad55);}(_0xb27d,0xe5));var _0xdb27=function(_0x17d9e3,_0x1f969c){_0x17d9e3=_0x17d9e3-0x0;var _0x14192d=_0xb27d[_0x17d9e3];return _0x14192d;};'use strict';var ChatInteractionEvents=require(_0xdb27('0x0'));var events=[_0xdb27('0x1'),_0xdb27('0x2'),_0xdb27('0x3')];function createListener(_0x5f0cf3,_0x19c801){return function(_0x99d137){_0x19c801[_0xdb27('0x4')](_0x5f0cf3,_0x99d137);};}function removeListener(_0x206206,_0x202669){return function(){ChatInteractionEvents[_0xdb27('0x5')](_0x206206,_0x202669);};}exports['register']=function(_0x4ce81b){for(var _0x98c60=0x0,_0x589465=events[_0xdb27('0x6')];_0x98c60<_0x589465;_0x98c60++){var _0x1b944c=events[_0x98c60];var _0x2772ad=createListener(_0xdb27('0x7')+_0x1b944c,_0x4ce81b);ChatInteractionEvents['on'](_0x1b944c,_0x2772ad);}};
\ No newline at end of file
+var _0xb33f=['chatInteraction:','./chatInteraction.events','save','emit','removeListener','register'];(function(_0xfffa3c,_0x421a7f){var _0x332ce4=function(_0x3006a2){while(--_0x3006a2){_0xfffa3c['push'](_0xfffa3c['shift']());}};_0x332ce4(++_0x421a7f);}(_0xb33f,0x169));var _0xfb33=function(_0xbba988,_0x81e842){_0xbba988=_0xbba988-0x0;var _0x2f9b8b=_0xb33f[_0xbba988];return _0x2f9b8b;};'use strict';var ChatInteractionEvents=require(_0xfb33('0x0'));var events=[_0xfb33('0x1'),'remove','update'];function createListener(_0x55ded3,_0x52186c){return function(_0x5cf4a6){_0x52186c[_0xfb33('0x2')](_0x55ded3,_0x5cf4a6);};}function removeListener(_0x2cc437,_0x27ebe0){return function(){ChatInteractionEvents[_0xfb33('0x3')](_0x2cc437,_0x27ebe0);};}exports[_0xfb33('0x4')]=function(_0x309369){for(var _0x25e560=0x0,_0x56b07c=events['length'];_0x25e560<_0x56b07c;_0x25e560++){var _0x453ae3=events[_0x25e560];var _0x3d7a67=createListener(_0xfb33('0x5')+_0x453ae3,_0x309369);ChatInteractionEvents['on'](_0x453ae3,_0x3d7a67);}};
\ No newline at end of file
index 987a6bc..6d49c65 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5e62=['isChatInteractionAuthorized','show','/:id/attachment_download','attachmentDownload','/:id/messages','getMessages','/:id/download','download','post','create','diskStorage','server/files/attachments/','%s-%s','now','replace','/:id/attachment_upload','file','attachmentUpload','addMessage','/:id/tags','tracked','chat','chatinteraction:addtags','chatinteraction:update','put','/:id/custom_update','customUpdate','/:id/abandon','abandon','/:id/close','close','delete','destroy','removeTags','exports','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/describe','describe','/:id'];(function(_0xd6fcb5,_0x526523){var _0x278ac7=function(_0x3a9512){while(--_0x3a9512){_0xd6fcb5['push'](_0xd6fcb5['shift']());}};_0x278ac7(++_0x526523);}(_0x5e62,0x1d3));var _0x25e6=function(_0x4b055c,_0x4b870b){_0x4b055c=_0x4b055c-0x0;var _0x4b62bb=_0x5e62[_0x4b055c];return _0x4b62bb;};'use strict';var multer=require('multer');var util=require(_0x25e6('0x0'));var path=require(_0x25e6('0x1'));var timeout=require(_0x25e6('0x2'));var express=require(_0x25e6('0x3'));var router=express['Router']();var fs_extra=require(_0x25e6('0x4'));var auth=require(_0x25e6('0x5'));var interaction=require(_0x25e6('0x6'));var config=require(_0x25e6('0x7'));var controller=require('./chatInteraction.controller');router[_0x25e6('0x8')]('/',auth[_0x25e6('0x9')](),controller['index']);router[_0x25e6('0x8')](_0x25e6('0xa'),auth[_0x25e6('0x9')](),controller[_0x25e6('0xb')]);router[_0x25e6('0x8')](_0x25e6('0xc'),auth[_0x25e6('0xd')](),controller[_0x25e6('0xe')]);router[_0x25e6('0x8')](_0x25e6('0xf'),auth[_0x25e6('0xd')](),controller[_0x25e6('0x10')]);router[_0x25e6('0x8')](_0x25e6('0x11'),auth[_0x25e6('0x9')](),controller[_0x25e6('0x12')]);router[_0x25e6('0x8')]('/:id/my_messages',auth['isChatInteractionAuthorized'](),controller['getMyMessages']);router[_0x25e6('0x8')](_0x25e6('0x13'),auth[_0x25e6('0x9')](),controller[_0x25e6('0x14')]);router[_0x25e6('0x15')]('/',auth[_0x25e6('0x9')](),controller[_0x25e6('0x16')]);router[_0x25e6('0x15')]('/:id/vidaoo',auth[_0x25e6('0x9')](),controller['createVidaooSession']);var upload=multer({'storage':multer[_0x25e6('0x17')]({'destination':function(_0x153def,_0x22d19a,_0x263060){_0x263060(null,path['join'](config['root'],_0x25e6('0x18')));},'filename':function(_0x418134,_0x23260b,_0x4a3908){_0x4a3908(null,util['format'](_0x25e6('0x19'),Date[_0x25e6('0x1a')](),_0x23260b['originalname'][_0x25e6('0x1b')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router['post'](_0x25e6('0x1c'),upload['single'](_0x25e6('0x1d')),controller[_0x25e6('0x1e')]);router['post'](_0x25e6('0x11'),auth[_0x25e6('0xd')](),controller[_0x25e6('0x1f')]);router[_0x25e6('0x15')](_0x25e6('0x20'),auth['isAuthenticated'](),interaction[_0x25e6('0x21')](_0x25e6('0x22'),_0x25e6('0x23')),controller['addTags']);router['put'](_0x25e6('0xc'),auth[_0x25e6('0x9')](),interaction[_0x25e6('0x21')]('chat',_0x25e6('0x24')),controller['update']);router[_0x25e6('0x25')](_0x25e6('0x26'),controller[_0x25e6('0x27')]);router['put'](_0x25e6('0x28'),auth[_0x25e6('0xd')](),controller[_0x25e6('0x29')]);router[_0x25e6('0x25')](_0x25e6('0x2a'),controller[_0x25e6('0x2b')]);router[_0x25e6('0x2c')](_0x25e6('0xc'),auth[_0x25e6('0x9')](),interaction[_0x25e6('0x21')](_0x25e6('0x22'),'chatinteraction:destroy'),controller[_0x25e6('0x2d')]);router[_0x25e6('0x2c')](_0x25e6('0x20'),auth[_0x25e6('0x9')](),controller[_0x25e6('0x2e')]);module[_0x25e6('0x2f')]=router;
\ No newline at end of file
+var _0x09ad=['download','post','create','/:id/vidaoo','createVidaooSession','diskStorage','server/files/attachments/','format','%s-%s','now','originalname','replace','/:id/attachment_upload','single','file','addMessage','/:id/tags','tracked','chatinteraction:addtags','addTags','/:id','chatinteraction:update','update','put','/:id/custom_update','/:id/abandon','/:id/close','close','delete','chat','destroy','exports','connect-timeout','Router','fs-extra','../../components/auth/service','./chatInteraction.controller','get','isAuthenticated','index','/describe','isChatInteractionAuthorized','show','/:id/attachment_download','attachmentDownload','/:id/messages','/:id/my_messages','getMyMessages','/:id/download'];(function(_0x3daf1a,_0x3094ea){var _0x28210d=function(_0x29e615){while(--_0x29e615){_0x3daf1a['push'](_0x3daf1a['shift']());}};_0x28210d(++_0x3094ea);}(_0x09ad,0x1d9));var _0xd09a=function(_0x1b6984,_0x49a66b){_0x1b6984=_0x1b6984-0x0;var _0x199a4a=_0x09ad[_0x1b6984];return _0x199a4a;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0xd09a('0x0'));var express=require('express');var router=express[_0xd09a('0x1')]();var fs_extra=require(_0xd09a('0x2'));var auth=require(_0xd09a('0x3'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xd09a('0x4'));router[_0xd09a('0x5')]('/',auth[_0xd09a('0x6')](),controller[_0xd09a('0x7')]);router[_0xd09a('0x5')](_0xd09a('0x8'),auth[_0xd09a('0x6')](),controller['describe']);router['get']('/:id',auth[_0xd09a('0x9')](),controller[_0xd09a('0xa')]);router[_0xd09a('0x5')](_0xd09a('0xb'),auth['isChatInteractionAuthorized'](),controller[_0xd09a('0xc')]);router[_0xd09a('0x5')](_0xd09a('0xd'),auth['isAuthenticated'](),controller['getMessages']);router[_0xd09a('0x5')](_0xd09a('0xe'),auth[_0xd09a('0x9')](),controller[_0xd09a('0xf')]);router[_0xd09a('0x5')](_0xd09a('0x10'),auth[_0xd09a('0x6')](),controller[_0xd09a('0x11')]);router[_0xd09a('0x12')]('/',auth[_0xd09a('0x6')](),controller[_0xd09a('0x13')]);router[_0xd09a('0x12')](_0xd09a('0x14'),auth[_0xd09a('0x6')](),controller[_0xd09a('0x15')]);var upload=multer({'storage':multer[_0xd09a('0x16')]({'destination':function(_0x3daa9f,_0x44ec81,_0x11b113){_0x11b113(null,path['join'](config['root'],_0xd09a('0x17')));},'filename':function(_0x247b6e,_0x5546cf,_0x4cc60f){_0x4cc60f(null,util[_0xd09a('0x18')](_0xd09a('0x19'),Date[_0xd09a('0x1a')](),_0x5546cf[_0xd09a('0x1b')][_0xd09a('0x1c')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-')));}})});router[_0xd09a('0x12')](_0xd09a('0x1d'),upload[_0xd09a('0x1e')](_0xd09a('0x1f')),controller['attachmentUpload']);router[_0xd09a('0x12')]('/:id/messages',auth['isChatInteractionAuthorized'](),controller[_0xd09a('0x20')]);router[_0xd09a('0x12')](_0xd09a('0x21'),auth[_0xd09a('0x6')](),interaction[_0xd09a('0x22')]('chat',_0xd09a('0x23')),controller[_0xd09a('0x24')]);router['put'](_0xd09a('0x25'),auth[_0xd09a('0x6')](),interaction[_0xd09a('0x22')]('chat',_0xd09a('0x26')),controller[_0xd09a('0x27')]);router[_0xd09a('0x28')](_0xd09a('0x29'),controller['customUpdate']);router['put'](_0xd09a('0x2a'),auth[_0xd09a('0x9')](),controller['abandon']);router[_0xd09a('0x28')](_0xd09a('0x2b'),controller[_0xd09a('0x2c')]);router[_0xd09a('0x2d')](_0xd09a('0x25'),auth[_0xd09a('0x6')](),interaction['tracked'](_0xd09a('0x2e'),'chatinteraction:destroy'),controller[_0xd09a('0x2f')]);router[_0xd09a('0x2d')](_0xd09a('0x21'),auth[_0xd09a('0x6')](),controller['removeTags']);module[_0xd09a('0x30')]=router;
\ No newline at end of file
index d415e3f..ce73035 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1662=['medium','BOOLEAN','INTEGER','sequelize','exports','TEXT'];(function(_0x1762b4,_0x33d836){var _0x29beda=function(_0x31c2fa){while(--_0x31c2fa){_0x1762b4['push'](_0x1762b4['shift']());}};_0x29beda(++_0x33d836);}(_0x1662,0x189));var _0x2166=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x1662[_0x4b369d];return _0x571a98;};'use strict';var Sequelize=require(_0x2166('0x0'));module[_0x2166('0x1')]={'body':{'type':Sequelize[_0x2166('0x2')](_0x2166('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0x2166('0x4')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0x2166('0x5')]}};
\ No newline at end of file
+var _0xa7f0=['INTEGER','exports','BOOLEAN'];(function(_0x449c5c,_0x5f33f5){var _0x2fac5a=function(_0x434491){while(--_0x434491){_0x449c5c['push'](_0x449c5c['shift']());}};_0x2fac5a(++_0x5f33f5);}(_0xa7f0,0x1cc));var _0x0a7f=function(_0x310dbc,_0xc25dc6){_0x310dbc=_0x310dbc-0x0;var _0x1991a1=_0xa7f0[_0x310dbc];return _0x1991a1;};'use strict';var Sequelize=require('sequelize');module[_0x0a7f('0x0')]={'body':{'type':Sequelize['TEXT']('medium'),'allowNull':![]},'read':{'type':Sequelize[_0x0a7f('0x1')],'defaultValue':![]},'ChatInternalMessageId':{'type':Sequelize[_0x0a7f('0x2')]}};
\ No newline at end of file
index 0d5ec5c..5ccd103 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1d9f=['findAll','rows','catch','show','params','keys','options','find','create','body','describe','get','messages','lastMessageAt','lastMessage','format','getUsers','agent','admin','fullname','role','userpic','online','lastLoginAt','showWebBar','-online','VoiceQueue','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','Agents','autoAssociation','isEmpty','resourceId','push','createdAt','FromId','ToId','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','sox','fs-extra','lodash','squel','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','defaults','redis','socket.io-emitter','./chatInternalMessage.socket','register','sendStatus','status','end','undefined','limit','count','offset','json','apply','save','update','then','destroy','name','send','index','map','ChatInternalMessage','fieldName','type','model','filters','intersection','attributes','query','fields','length','nolimit','order','sort','where','pick','filter','merge','include'];(function(_0x28f0b6,_0x290a14){var _0x44156e=function(_0x4e57de){while(--_0x4e57de){_0x28f0b6['push'](_0x28f0b6['shift']());}};_0x44156e(++_0x290a14);}(_0x1d9f,0x158));var _0xf1d9=function(_0x51b474,_0x152542){_0x51b474=_0x51b474-0x0;var _0x29e5ea=_0x1d9f[_0x51b474];return _0x29e5ea;};'use strict';var emlformat=require(_0xf1d9('0x0'));var rimraf=require(_0xf1d9('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xf1d9('0x2'));var rp=require('request-promise');var moment=require(_0xf1d9('0x3'));var BPromise=require(_0xf1d9('0x4'));var Mustache=require(_0xf1d9('0x5'));var util=require(_0xf1d9('0x6'));var path=require(_0xf1d9('0x7'));var sox=require(_0xf1d9('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xf1d9('0x9'));var _=require(_0xf1d9('0xa'));var squel=require(_0xf1d9('0xb'));var crypto=require('crypto');var jsforce=require(_0xf1d9('0xc'));var deskjs=require(_0xf1d9('0xd'));var toCsv=require(_0xf1d9('0xe'));var querystring=require(_0xf1d9('0xf'));var Papa=require(_0xf1d9('0x10'));var Redis=require(_0xf1d9('0x11'));var authService=require(_0xf1d9('0x12'));var qs=require(_0xf1d9('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xf1d9('0x14'));var logger=require('../../config/logger')(_0xf1d9('0x15'));var utils=require(_0xf1d9('0x16'));var config=require(_0xf1d9('0x17'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];config['redis']=_[_0xf1d9('0x18')](config[_0xf1d9('0x19')],{'host':'localhost','port':0x18eb});var socket=require(_0xf1d9('0x1a'))(new Redis(config['redis']));require(_0xf1d9('0x1b'))[_0xf1d9('0x1c')](socket);function respondWithStatusCode(_0x81621d,_0x43b8b4){_0x43b8b4=_0x43b8b4||0xcc;return function(_0x1a321d){if(_0x1a321d){return _0x81621d[_0xf1d9('0x1d')](_0x43b8b4);}return _0x81621d[_0xf1d9('0x1e')](_0x43b8b4)[_0xf1d9('0x1f')]();};}function respondWithResult(_0x1e32e9,_0x40a1dd){_0x40a1dd=_0x40a1dd||0xc8;return function(_0x23a7d5){if(_0x23a7d5){return _0x1e32e9[_0xf1d9('0x1e')](_0x40a1dd)['json'](_0x23a7d5);}};}function respondWithFilteredResult(_0x4e311f,_0x27ed00){return function(_0xfa6be1){if(_0xfa6be1){var _0x50530c=typeof _0x27ed00['offset']===_0xf1d9('0x20')&&typeof _0x27ed00[_0xf1d9('0x21')]===_0xf1d9('0x20');var _0x521558=_0xfa6be1[_0xf1d9('0x22')];var _0x1e1a78=_0x50530c?0x0:_0x27ed00[_0xf1d9('0x23')];var _0x52fc28=_0x50530c?_0xfa6be1['count']:_0x27ed00[_0xf1d9('0x23')]+_0x27ed00[_0xf1d9('0x21')];var _0x26776f;if(_0x52fc28>=_0x521558){_0x52fc28=_0x521558;_0x26776f=0xc8;}else{_0x26776f=0xce;}_0x4e311f['status'](_0x26776f);return _0x4e311f['set']('Content-Range',_0x1e1a78+'-'+_0x52fc28+'/'+_0x521558)[_0xf1d9('0x24')](_0xfa6be1);}return null;};}function patchUpdates(_0x95dec8){return function(_0x2c1d5e){try{jsonpatch[_0xf1d9('0x25')](_0x2c1d5e,_0x95dec8,!![]);}catch(_0x2a8fb2){return BPromise['reject'](_0x2a8fb2);}return _0x2c1d5e[_0xf1d9('0x26')]();};}function saveUpdates(_0x383a4b,_0x1a3b7a){return function(_0x20a3dc){if(_0x20a3dc){return _0x20a3dc[_0xf1d9('0x27')](_0x383a4b)[_0xf1d9('0x28')](function(_0x247bdc){return _0x247bdc;});}return null;};}function removeEntity(_0x1062c4,_0x109bbd){return function(_0x1c4d86){if(_0x1c4d86){return _0x1c4d86[_0xf1d9('0x29')]()[_0xf1d9('0x28')](function(){_0x1062c4[_0xf1d9('0x1e')](0xcc)['end']();});}};}function handleEntityNotFound(_0xe56a90,_0x5b4c77){return function(_0x26b643){if(!_0x26b643){_0xe56a90[_0xf1d9('0x1d')](0x194);}return _0x26b643;};}function handleError(_0x455500,_0x1eea39){_0x1eea39=_0x1eea39||0x1f4;return function(_0x144e68){logger['error'](_0x144e68['stack']);if(_0x144e68[_0xf1d9('0x2a')]){delete _0x144e68['name'];}_0x455500[_0xf1d9('0x1e')](_0x1eea39)[_0xf1d9('0x2b')](_0x144e68);};}exports[_0xf1d9('0x2c')]=function(_0x159f78,_0x14fbfd){var _0xb63ef2={},_0x52ecf7={},_0x476c4f={'count':0x0,'rows':[]};var _0xc0ccd2=_[_0xf1d9('0x2d')](db[_0xf1d9('0x2e')]['rawAttributes'],function(_0xfcc87b){return{'name':_0xfcc87b[_0xf1d9('0x2f')],'type':_0xfcc87b[_0xf1d9('0x30')]['key']};});_0x52ecf7[_0xf1d9('0x31')]=_[_0xf1d9('0x2d')](_0xc0ccd2,_0xf1d9('0x2a'));_0x52ecf7['query']=_['keys'](_0x159f78['query']);_0x52ecf7[_0xf1d9('0x32')]=_[_0xf1d9('0x33')](_0x52ecf7[_0xf1d9('0x31')],_0x52ecf7['query']);_0xb63ef2[_0xf1d9('0x34')]=_[_0xf1d9('0x33')](_0x52ecf7['model'],qs['fields'](_0x159f78[_0xf1d9('0x35')][_0xf1d9('0x36')]));_0xb63ef2['attributes']=_0xb63ef2[_0xf1d9('0x34')][_0xf1d9('0x37')]?_0xb63ef2[_0xf1d9('0x34')]:_0x52ecf7[_0xf1d9('0x31')];if(!_0x159f78[_0xf1d9('0x35')]['hasOwnProperty'](_0xf1d9('0x38'))){_0xb63ef2['limit']=qs[_0xf1d9('0x21')](_0x159f78[_0xf1d9('0x35')][_0xf1d9('0x21')]);_0xb63ef2[_0xf1d9('0x23')]=qs[_0xf1d9('0x23')](_0x159f78[_0xf1d9('0x35')][_0xf1d9('0x23')]);}_0xb63ef2[_0xf1d9('0x39')]=qs['sort'](_0x159f78['query'][_0xf1d9('0x3a')]);_0xb63ef2[_0xf1d9('0x3b')]=qs[_0xf1d9('0x32')](_[_0xf1d9('0x3c')](_0x159f78['query'],_0x52ecf7['filters']),_0xc0ccd2);if(_0x159f78['query'][_0xf1d9('0x3d')]){_0xb63ef2['where']=_[_0xf1d9('0x3e')](_0xb63ef2['where'],{'$or':_[_0xf1d9('0x2d')](_0xc0ccd2,function(_0x549efb){if(_0x549efb[_0xf1d9('0x30')]!=='VIRTUAL'){var _0x19f13b={};_0x19f13b[_0x549efb['name']]={'$like':'%'+_0x159f78['query'][_0xf1d9('0x3d')]+'%'};return _0x19f13b;}})});}_0xb63ef2=_[_0xf1d9('0x3e')]({},_0xb63ef2,_0x159f78['options']);var _0x4f1940={'where':_0xb63ef2[_0xf1d9('0x3b')]};return db['ChatInternalMessage']['count'](_0x4f1940)[_0xf1d9('0x28')](function(_0x53d4ae){_0x476c4f[_0xf1d9('0x22')]=_0x53d4ae;if(_0x159f78[_0xf1d9('0x35')]['includeAll']){_0xb63ef2[_0xf1d9('0x3f')]=[{'all':!![]}];}return db[_0xf1d9('0x2e')][_0xf1d9('0x40')](_0xb63ef2);})[_0xf1d9('0x28')](function(_0x48ae84){_0x476c4f[_0xf1d9('0x41')]=_0x48ae84;return _0x476c4f;})[_0xf1d9('0x28')](respondWithFilteredResult(_0x14fbfd,_0xb63ef2))[_0xf1d9('0x42')](handleError(_0x14fbfd,null));};exports[_0xf1d9('0x43')]=function(_0x49575d,_0xb010dc){var _0x30e6f8={'raw':!![],'where':{'id':_0x49575d[_0xf1d9('0x44')]['id']}},_0x44fca0={};_0x44fca0['model']=_[_0xf1d9('0x45')](db[_0xf1d9('0x2e')]['rawAttributes']);_0x44fca0[_0xf1d9('0x35')]=_['keys'](_0x49575d['query']);_0x44fca0[_0xf1d9('0x32')]=_[_0xf1d9('0x33')](_0x44fca0[_0xf1d9('0x31')],_0x44fca0[_0xf1d9('0x35')]);_0x30e6f8['attributes']=_['intersection'](_0x44fca0['model'],qs[_0xf1d9('0x36')](_0x49575d[_0xf1d9('0x35')]['fields']));_0x30e6f8['attributes']=_0x30e6f8[_0xf1d9('0x34')]['length']?_0x30e6f8[_0xf1d9('0x34')]:_0x44fca0[_0xf1d9('0x31')];if(_0x49575d[_0xf1d9('0x35')]['includeAll']){_0x30e6f8[_0xf1d9('0x3f')]=[{'all':!![]}];}_0x30e6f8=_['merge']({},_0x30e6f8,_0x49575d[_0xf1d9('0x46')]);return db[_0xf1d9('0x2e')][_0xf1d9('0x47')](_0x30e6f8)[_0xf1d9('0x28')](handleEntityNotFound(_0xb010dc,null))[_0xf1d9('0x28')](respondWithResult(_0xb010dc,null))['catch'](handleError(_0xb010dc,null));};exports[_0xf1d9('0x48')]=function(_0x5b88e9,_0x1fdfcd){return db['ChatInternalMessage'][_0xf1d9('0x48')](_0x5b88e9[_0xf1d9('0x49')],{})[_0xf1d9('0x28')](respondWithResult(_0x1fdfcd,0xc9))[_0xf1d9('0x42')](handleError(_0x1fdfcd,null));};exports[_0xf1d9('0x27')]=function(_0x5e9404,_0x26787a){if(_0x5e9404[_0xf1d9('0x49')]['id']){delete _0x5e9404['body']['id'];}return db['ChatInternalMessage'][_0xf1d9('0x47')]({'where':{'id':_0x5e9404[_0xf1d9('0x44')]['id']}})[_0xf1d9('0x28')](handleEntityNotFound(_0x26787a,null))['then'](saveUpdates(_0x5e9404['body'],null))[_0xf1d9('0x28')](respondWithResult(_0x26787a,null))[_0xf1d9('0x42')](handleError(_0x26787a,null));};exports['destroy']=function(_0x399acc,_0x4b16fc){return db['ChatInternalMessage'][_0xf1d9('0x47')]({'where':{'id':_0x399acc[_0xf1d9('0x44')]['id']}})[_0xf1d9('0x28')](handleEntityNotFound(_0x4b16fc,null))[_0xf1d9('0x28')](removeEntity(_0x4b16fc,null))[_0xf1d9('0x42')](handleError(_0x4b16fc,null));};exports[_0xf1d9('0x4a')]=function(_0x4659b9,_0x5e9d91){return db[_0xf1d9('0x2e')]['describe']()[_0xf1d9('0x28')](respondWithResult(_0x5e9d91,null))[_0xf1d9('0x42')](handleError(_0x5e9d91,null));};function wrapUser(_0x34b0cc){return function(_0x2b0c97){var _0x521281=_0x34b0cc[_0xf1d9('0x4b')]({'plain':!![]});_0x521281[_0xf1d9('0x4c')]=[];if(_0x2b0c97){_0x521281[_0xf1d9('0x4d')]=_0x2b0c97['createdAt'];_0x521281[_0xf1d9('0x4e')]=_0x2b0c97;}else{_0x521281['lastMessageAt']=moment(0x0)[_0xf1d9('0x4f')]('YYYY-MM-DD\x20HH:mm:ss');_0x521281[_0xf1d9('0x4e')]={};}return _0x521281;};}exports[_0xf1d9('0x50')]=function(_0x2e8fab,_0x215487,_0x3250cc){var _0x20b4c5=[];return db['User'][_0xf1d9('0x40')]({'where':{'role':[_0xf1d9('0x51'),_0xf1d9('0x52'),'user']},'attributes':['id',_0xf1d9('0x53'),'name',_0xf1d9('0x54'),_0xf1d9('0x55'),'internal',_0xf1d9('0x56'),_0xf1d9('0x57'),'allowmessenger',_0xf1d9('0x58')],'order':qs[_0xf1d9('0x3a')](_0xf1d9('0x59')),'include':[{'model':db[_0xf1d9('0x5a')],'as':'VoiceQueues','attributes':['id',_0xf1d9('0x2a'),'type'],'through':{'attributes':[]}}]})['then'](function(_0x3e41fc){if(_0x3e41fc){var _0x381c96=_0x2e8fab['user'][_0xf1d9('0x4b')]({'plain':!![]});if(!_0x381c96)throw new Error(_0xf1d9('0x5b'));if(_0x381c96[_0xf1d9('0x54')]===_0xf1d9('0x5c')){return db[_0xf1d9('0x5d')]['find']({'where':{'name':_0xf1d9('0x5e'),'userProfileId':_0x381c96['userProfileId']},'raw':!![]})['then'](function(_0x17e5d7){if(_0x17e5d7){if(_0x17e5d7[_0xf1d9('0x5f')]===0x0){return db['UserProfileResource'][_0xf1d9('0x40')]({'where':{'sectionId':_0x17e5d7['id']},'raw':!![]})[_0xf1d9('0x28')](function(_0x1862a3){var _0x3f392e=[];if(_[_0xf1d9('0x60')](_0x1862a3)){_0x3f392e=_['filter'](_0x3e41fc,function(_0x4e8235){if(_0x4e8235[_0xf1d9('0x54')]!==_0xf1d9('0x51')){return _0x4e8235;}});return _0x3f392e;}else{for(var _0x31e0d7=0x0;_0x31e0d7<_0x3e41fc[_0xf1d9('0x37')];_0x31e0d7++){var _0xccf4a2=_0x3e41fc[_0x31e0d7];if(_0xccf4a2['role']===_0xf1d9('0x51')){var _0x3bf39b=_['find'](_0x1862a3,function(_0x1e6cbd){return _0x1e6cbd[_0xf1d9('0x61')]===_0xccf4a2['id'];});if(_0x3bf39b)_0x3f392e[_0xf1d9('0x62')](_0xccf4a2);}else{_0x3f392e[_0xf1d9('0x62')](_0xccf4a2);}}return _0x3f392e;}});}else{return _0x3e41fc;}}else{var _0x1d96ae=_['filter'](_0x3e41fc,function(_0x233261){if(_0x233261[_0xf1d9('0x54')]!==_0xf1d9('0x51')){return _0x233261;}});return _0x1d96ae;}});}else{return _0x3e41fc;}}})[_0xf1d9('0x28')](function(_0x46b61e){var _0x278622=[];if(_0x46b61e){_0x20b4c5=_0x46b61e;for(var _0x24d7df=0x0;_0x24d7df<_0x46b61e[_0xf1d9('0x37')];_0x24d7df+=0x1){_0x20b4c5[_0x24d7df][_0xf1d9('0x4c')]=[];_0x278622['push'](db[_0xf1d9('0x2e')]['find']({'where':{'FromId':[_0x2e8fab['user']['id'],_0x46b61e[_0x24d7df]['id']],'ToId':[_0x2e8fab['user']['id'],_0x46b61e[_0x24d7df]['id']],'ChatGroupId':null},'attributes':['id',_0xf1d9('0x63'),_0xf1d9('0x64'),_0xf1d9('0x65'),'read','body'],'order':qs[_0xf1d9('0x3a')]('-createdAt'),'limit':0x1,'offset':0x0,'raw':!![]})[_0xf1d9('0x28')](wrapUser(_0x46b61e[_0x24d7df])));}return BPromise['all'](_0x278622);}return[];})[_0xf1d9('0x28')](function(_0x111997){return{'rows':_0x111997,'count':_0x111997[_0xf1d9('0x37')]};})[_0xf1d9('0x28')](respondWithResult(_0x215487,null))[_0xf1d9('0x42')](handleError(_0x215487,null));};
\ No newline at end of file
+var _0x7e70=['-createdAt','all','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','fs-extra','lodash','jsforce','to-csv','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./chatInternalMessage.socket','register','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','update','then','stack','name','send','map','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','type','VIRTUAL','filter','merge','options','ChatInternalMessage','include','findAll','catch','show','find','create','body','describe','get','createdAt','lastMessage','lastMessageAt','format','User','agent','admin','user','role','userpic','internal','online','lastLoginAt','showWebBar','-online','VoiceQueues','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','Agents','userProfileId','autoAssociation','UserProfileResource','push','messages','FromId','read'];(function(_0x59a001,_0x31e2f){var _0x2a5b72=function(_0x883ed8){while(--_0x883ed8){_0x59a001['push'](_0x59a001['shift']());}};_0x2a5b72(++_0x31e2f);}(_0x7e70,0x67));var _0x07e7=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x7e70[_0x14add3];return _0x4a174f;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x07e7('0x0'));var jsonpatch=require(_0x07e7('0x1'));var rp=require(_0x07e7('0x2'));var moment=require(_0x07e7('0x3'));var BPromise=require(_0x07e7('0x4'));var Mustache=require(_0x07e7('0x5'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x07e7('0x6'));var _=require(_0x07e7('0x7'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x07e7('0x8'));var deskjs=require('desk.js');var toCsv=require(_0x07e7('0x9'));var querystring=require(_0x07e7('0xa'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x07e7('0xb'));var qs=require(_0x07e7('0xc'));var as=require(_0x07e7('0xd'));var hardwareService=require(_0x07e7('0xe'));var logger=require(_0x07e7('0xf'))(_0x07e7('0x10'));var utils=require('../../config/utils');var config=require(_0x07e7('0x11'));var licenseUtil=require(_0x07e7('0x12'));var db=require(_0x07e7('0x13'))['db'];config[_0x07e7('0x14')]=_[_0x07e7('0x15')](config[_0x07e7('0x14')],{'host':_0x07e7('0x16'),'port':0x18eb});var socket=require(_0x07e7('0x17'))(new Redis(config[_0x07e7('0x14')]));require(_0x07e7('0x18'))[_0x07e7('0x19')](socket);function respondWithStatusCode(_0x353214,_0x4be42f){_0x4be42f=_0x4be42f||0xcc;return function(_0x1e45d3){if(_0x1e45d3){return _0x353214[_0x07e7('0x1a')](_0x4be42f);}return _0x353214[_0x07e7('0x1b')](_0x4be42f)[_0x07e7('0x1c')]();};}function respondWithResult(_0x1f7baf,_0x2ed6f1){_0x2ed6f1=_0x2ed6f1||0xc8;return function(_0x2fcb18){if(_0x2fcb18){return _0x1f7baf[_0x07e7('0x1b')](_0x2ed6f1)[_0x07e7('0x1d')](_0x2fcb18);}};}function respondWithFilteredResult(_0x846ce6,_0x8aabb3){return function(_0x307abb){if(_0x307abb){var _0x40002f=typeof _0x8aabb3[_0x07e7('0x1e')]===_0x07e7('0x1f')&&typeof _0x8aabb3[_0x07e7('0x20')]===_0x07e7('0x1f');var _0x2bf162=_0x307abb[_0x07e7('0x21')];var _0x2583e=_0x40002f?0x0:_0x8aabb3['offset'];var _0x5df345=_0x40002f?_0x307abb[_0x07e7('0x21')]:_0x8aabb3['offset']+_0x8aabb3[_0x07e7('0x20')];var _0x2b2ea6;if(_0x5df345>=_0x2bf162){_0x5df345=_0x2bf162;_0x2b2ea6=0xc8;}else{_0x2b2ea6=0xce;}_0x846ce6[_0x07e7('0x1b')](_0x2b2ea6);return _0x846ce6[_0x07e7('0x22')](_0x07e7('0x23'),_0x2583e+'-'+_0x5df345+'/'+_0x2bf162)[_0x07e7('0x1d')](_0x307abb);}return null;};}function patchUpdates(_0x5c532b){return function(_0x32d2a9){try{jsonpatch['apply'](_0x32d2a9,_0x5c532b,!![]);}catch(_0x5abf13){return BPromise[_0x07e7('0x24')](_0x5abf13);}return _0x32d2a9['save']();};}function saveUpdates(_0x4f6824,_0x1bd0cb){return function(_0x506e8e){if(_0x506e8e){return _0x506e8e[_0x07e7('0x25')](_0x4f6824)[_0x07e7('0x26')](function(_0x511010){return _0x511010;});}return null;};}function removeEntity(_0x1e8006,_0xd6104a){return function(_0x283b40){if(_0x283b40){return _0x283b40['destroy']()[_0x07e7('0x26')](function(){_0x1e8006[_0x07e7('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x14fc69,_0x33c6e8){return function(_0x532015){if(!_0x532015){_0x14fc69[_0x07e7('0x1a')](0x194);}return _0x532015;};}function handleError(_0x1b00cc,_0x5c04a3){_0x5c04a3=_0x5c04a3||0x1f4;return function(_0x12cc65){logger['error'](_0x12cc65[_0x07e7('0x27')]);if(_0x12cc65['name']){delete _0x12cc65[_0x07e7('0x28')];}_0x1b00cc[_0x07e7('0x1b')](_0x5c04a3)[_0x07e7('0x29')](_0x12cc65);};}exports['index']=function(_0x174ec7,_0x4e69cb){var _0x22d9c8={},_0x43243f={},_0x5e5ca5={'count':0x0,'rows':[]};var _0x3ef98b=_[_0x07e7('0x2a')](db['ChatInternalMessage']['rawAttributes'],function(_0x1c4691){return{'name':_0x1c4691[_0x07e7('0x2b')],'type':_0x1c4691['type'][_0x07e7('0x2c')]};});_0x43243f[_0x07e7('0x2d')]=_['map'](_0x3ef98b,_0x07e7('0x28'));_0x43243f[_0x07e7('0x2e')]=_[_0x07e7('0x2f')](_0x174ec7[_0x07e7('0x2e')]);_0x43243f[_0x07e7('0x30')]=_[_0x07e7('0x31')](_0x43243f[_0x07e7('0x2d')],_0x43243f['query']);_0x22d9c8[_0x07e7('0x32')]=_[_0x07e7('0x31')](_0x43243f[_0x07e7('0x2d')],qs['fields'](_0x174ec7[_0x07e7('0x2e')][_0x07e7('0x33')]));_0x22d9c8[_0x07e7('0x32')]=_0x22d9c8[_0x07e7('0x32')][_0x07e7('0x34')]?_0x22d9c8[_0x07e7('0x32')]:_0x43243f['model'];if(!_0x174ec7[_0x07e7('0x2e')][_0x07e7('0x35')](_0x07e7('0x36'))){_0x22d9c8[_0x07e7('0x20')]=qs[_0x07e7('0x20')](_0x174ec7[_0x07e7('0x2e')][_0x07e7('0x20')]);_0x22d9c8[_0x07e7('0x1e')]=qs[_0x07e7('0x1e')](_0x174ec7[_0x07e7('0x2e')][_0x07e7('0x1e')]);}_0x22d9c8[_0x07e7('0x37')]=qs[_0x07e7('0x38')](_0x174ec7[_0x07e7('0x2e')][_0x07e7('0x38')]);_0x22d9c8[_0x07e7('0x39')]=qs[_0x07e7('0x30')](_['pick'](_0x174ec7[_0x07e7('0x2e')],_0x43243f['filters']),_0x3ef98b);if(_0x174ec7[_0x07e7('0x2e')]['filter']){_0x22d9c8[_0x07e7('0x39')]=_['merge'](_0x22d9c8[_0x07e7('0x39')],{'$or':_['map'](_0x3ef98b,function(_0x313b53){if(_0x313b53[_0x07e7('0x3a')]!==_0x07e7('0x3b')){var _0x3632fe={};_0x3632fe[_0x313b53['name']]={'$like':'%'+_0x174ec7[_0x07e7('0x2e')][_0x07e7('0x3c')]+'%'};return _0x3632fe;}})});}_0x22d9c8=_[_0x07e7('0x3d')]({},_0x22d9c8,_0x174ec7[_0x07e7('0x3e')]);var _0x9a7544={'where':_0x22d9c8[_0x07e7('0x39')]};return db[_0x07e7('0x3f')][_0x07e7('0x21')](_0x9a7544)['then'](function(_0xf330bf){_0x5e5ca5[_0x07e7('0x21')]=_0xf330bf;if(_0x174ec7[_0x07e7('0x2e')]['includeAll']){_0x22d9c8[_0x07e7('0x40')]=[{'all':!![]}];}return db[_0x07e7('0x3f')][_0x07e7('0x41')](_0x22d9c8);})[_0x07e7('0x26')](function(_0x1ea58d){_0x5e5ca5['rows']=_0x1ea58d;return _0x5e5ca5;})[_0x07e7('0x26')](respondWithFilteredResult(_0x4e69cb,_0x22d9c8))[_0x07e7('0x42')](handleError(_0x4e69cb,null));};exports[_0x07e7('0x43')]=function(_0x200ed2,_0x1e9502){var _0x1693cc={'raw':!![],'where':{'id':_0x200ed2['params']['id']}},_0xc957d7={};_0xc957d7[_0x07e7('0x2d')]=_[_0x07e7('0x2f')](db[_0x07e7('0x3f')]['rawAttributes']);_0xc957d7['query']=_[_0x07e7('0x2f')](_0x200ed2[_0x07e7('0x2e')]);_0xc957d7[_0x07e7('0x30')]=_[_0x07e7('0x31')](_0xc957d7[_0x07e7('0x2d')],_0xc957d7[_0x07e7('0x2e')]);_0x1693cc[_0x07e7('0x32')]=_['intersection'](_0xc957d7[_0x07e7('0x2d')],qs['fields'](_0x200ed2[_0x07e7('0x2e')][_0x07e7('0x33')]));_0x1693cc[_0x07e7('0x32')]=_0x1693cc[_0x07e7('0x32')][_0x07e7('0x34')]?_0x1693cc[_0x07e7('0x32')]:_0xc957d7[_0x07e7('0x2d')];if(_0x200ed2['query']['includeAll']){_0x1693cc[_0x07e7('0x40')]=[{'all':!![]}];}_0x1693cc=_['merge']({},_0x1693cc,_0x200ed2['options']);return db[_0x07e7('0x3f')][_0x07e7('0x44')](_0x1693cc)['then'](handleEntityNotFound(_0x1e9502,null))['then'](respondWithResult(_0x1e9502,null))[_0x07e7('0x42')](handleError(_0x1e9502,null));};exports[_0x07e7('0x45')]=function(_0x25b8fe,_0x116a1f){return db[_0x07e7('0x3f')][_0x07e7('0x45')](_0x25b8fe['body'],{})[_0x07e7('0x26')](respondWithResult(_0x116a1f,0xc9))[_0x07e7('0x42')](handleError(_0x116a1f,null));};exports[_0x07e7('0x25')]=function(_0x18df76,_0x1a6051){if(_0x18df76[_0x07e7('0x46')]['id']){delete _0x18df76[_0x07e7('0x46')]['id'];}return db[_0x07e7('0x3f')][_0x07e7('0x44')]({'where':{'id':_0x18df76['params']['id']}})[_0x07e7('0x26')](handleEntityNotFound(_0x1a6051,null))['then'](saveUpdates(_0x18df76[_0x07e7('0x46')],null))[_0x07e7('0x26')](respondWithResult(_0x1a6051,null))['catch'](handleError(_0x1a6051,null));};exports['destroy']=function(_0x3ff2f4,_0x8794de){return db[_0x07e7('0x3f')][_0x07e7('0x44')]({'where':{'id':_0x3ff2f4['params']['id']}})['then'](handleEntityNotFound(_0x8794de,null))[_0x07e7('0x26')](removeEntity(_0x8794de,null))[_0x07e7('0x42')](handleError(_0x8794de,null));};exports[_0x07e7('0x47')]=function(_0x17a64e,_0x59bf82){return db[_0x07e7('0x3f')][_0x07e7('0x47')]()['then'](respondWithResult(_0x59bf82,null))[_0x07e7('0x42')](handleError(_0x59bf82,null));};function wrapUser(_0x91c5fc){return function(_0x2d3c1c){var _0x444cd4=_0x91c5fc[_0x07e7('0x48')]({'plain':!![]});_0x444cd4['messages']=[];if(_0x2d3c1c){_0x444cd4['lastMessageAt']=_0x2d3c1c[_0x07e7('0x49')];_0x444cd4[_0x07e7('0x4a')]=_0x2d3c1c;}else{_0x444cd4[_0x07e7('0x4b')]=moment(0x0)[_0x07e7('0x4c')]('YYYY-MM-DD\x20HH:mm:ss');_0x444cd4[_0x07e7('0x4a')]={};}return _0x444cd4;};}exports['getUsers']=function(_0x4d75aa,_0x49e13b,_0x5d6143){var _0x118dac=[];return db[_0x07e7('0x4d')][_0x07e7('0x41')]({'where':{'role':[_0x07e7('0x4e'),_0x07e7('0x4f'),_0x07e7('0x50')]},'attributes':['id','fullname',_0x07e7('0x28'),_0x07e7('0x51'),_0x07e7('0x52'),_0x07e7('0x53'),_0x07e7('0x54'),_0x07e7('0x55'),'allowmessenger',_0x07e7('0x56')],'order':qs['sort'](_0x07e7('0x57')),'include':[{'model':db['VoiceQueue'],'as':_0x07e7('0x58'),'attributes':['id',_0x07e7('0x28'),_0x07e7('0x3a')],'through':{'attributes':[]}}]})[_0x07e7('0x26')](function(_0x28bc48){if(_0x28bc48){var _0x19a5bc=_0x4d75aa['user'][_0x07e7('0x48')]({'plain':!![]});if(!_0x19a5bc)throw new Error(_0x07e7('0x59'));if(_0x19a5bc[_0x07e7('0x51')]===_0x07e7('0x50')){return db[_0x07e7('0x5a')][_0x07e7('0x44')]({'where':{'name':_0x07e7('0x5b'),'userProfileId':_0x19a5bc[_0x07e7('0x5c')]},'raw':!![]})['then'](function(_0x12ff0f){if(_0x12ff0f){if(_0x12ff0f[_0x07e7('0x5d')]===0x0){return db[_0x07e7('0x5e')][_0x07e7('0x41')]({'where':{'sectionId':_0x12ff0f['id']},'raw':!![]})[_0x07e7('0x26')](function(_0x451209){var _0x37a8c7=[];if(_['isEmpty'](_0x451209)){_0x37a8c7=_[_0x07e7('0x3c')](_0x28bc48,function(_0x238815){if(_0x238815['role']!==_0x07e7('0x4e')){return _0x238815;}});return _0x37a8c7;}else{for(var _0x3e7de1=0x0;_0x3e7de1<_0x28bc48[_0x07e7('0x34')];_0x3e7de1++){var _0x3460f1=_0x28bc48[_0x3e7de1];if(_0x3460f1[_0x07e7('0x51')]===_0x07e7('0x4e')){var _0x58e66c=_[_0x07e7('0x44')](_0x451209,function(_0x523ef0){return _0x523ef0['resourceId']===_0x3460f1['id'];});if(_0x58e66c)_0x37a8c7['push'](_0x3460f1);}else{_0x37a8c7[_0x07e7('0x5f')](_0x3460f1);}}return _0x37a8c7;}});}else{return _0x28bc48;}}else{var _0x21b7b3=_[_0x07e7('0x3c')](_0x28bc48,function(_0x4885ee){if(_0x4885ee[_0x07e7('0x51')]!=='agent'){return _0x4885ee;}});return _0x21b7b3;}});}else{return _0x28bc48;}}})[_0x07e7('0x26')](function(_0x5ed745){var _0x15c026=[];if(_0x5ed745){_0x118dac=_0x5ed745;for(var _0x234c74=0x0;_0x234c74<_0x5ed745[_0x07e7('0x34')];_0x234c74+=0x1){_0x118dac[_0x234c74][_0x07e7('0x60')]=[];_0x15c026['push'](db[_0x07e7('0x3f')][_0x07e7('0x44')]({'where':{'FromId':[_0x4d75aa[_0x07e7('0x50')]['id'],_0x5ed745[_0x234c74]['id']],'ToId':[_0x4d75aa[_0x07e7('0x50')]['id'],_0x5ed745[_0x234c74]['id']],'ChatGroupId':null},'attributes':['id',_0x07e7('0x49'),_0x07e7('0x61'),'ToId',_0x07e7('0x62'),'body'],'order':qs[_0x07e7('0x38')](_0x07e7('0x63')),'limit':0x1,'offset':0x0,'raw':!![]})[_0x07e7('0x26')](wrapUser(_0x5ed745[_0x234c74])));}return BPromise[_0x07e7('0x64')](_0x15c026);}return[];})[_0x07e7('0x26')](function(_0x24f91c){return{'rows':_0x24f91c,'count':_0x24f91c['length']};})[_0x07e7('0x26')](respondWithResult(_0x49e13b,null))[_0x07e7('0x42')](handleError(_0x49e13b,null));};
\ No newline at end of file
index 8fb92c2..619d98b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2a19=['emit','hasOwnProperty','hook','exports','events','../../mysqldb','save','update','remove'];(function(_0x2b6600,_0x24c497){var _0x912ee2=function(_0x5d6484){while(--_0x5d6484){_0x2b6600['push'](_0x2b6600['shift']());}};_0x912ee2(++_0x24c497);}(_0x2a19,0x199));var _0x92a1=function(_0x3344ad,_0xac7b45){_0x3344ad=_0x3344ad-0x0;var _0x469f58=_0x2a19[_0x3344ad];return _0x469f58;};'use strict';var EventEmitter=require(_0x92a1('0x0'));var ChatInternalMessage=require(_0x92a1('0x1'))['db']['ChatInternalMessage'];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x92a1('0x2'),'afterUpdate':_0x92a1('0x3'),'afterDestroy':_0x92a1('0x4')};function emitEvent(_0x356e40){return function(_0x315f01,_0x38ba73,_0x53eda1){ChatInternalMessageEvents[_0x92a1('0x5')](_0x356e40+':'+_0x315f01['id'],_0x315f01);ChatInternalMessageEvents[_0x92a1('0x5')](_0x356e40,_0x315f01);_0x53eda1(null);};}for(var e in events){if(events[_0x92a1('0x6')](e)){var event=events[e];ChatInternalMessage[_0x92a1('0x7')](e,emitEvent(event));}}module[_0x92a1('0x8')]=ChatInternalMessageEvents;
\ No newline at end of file
+var _0x50e4=['hasOwnProperty','hook','exports','events','../../mysqldb','save','update','remove','emit'];(function(_0x129071,_0x360dba){var _0x4edaab=function(_0x12c4b8){while(--_0x12c4b8){_0x129071['push'](_0x129071['shift']());}};_0x4edaab(++_0x360dba);}(_0x50e4,0x1c5));var _0x450e=function(_0x1d1779,_0x284147){_0x1d1779=_0x1d1779-0x0;var _0x2377e9=_0x50e4[_0x1d1779];return _0x2377e9;};'use strict';var EventEmitter=require(_0x450e('0x0'));var ChatInternalMessage=require(_0x450e('0x1'))['db']['ChatInternalMessage'];var ChatInternalMessageEvents=new EventEmitter();ChatInternalMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x450e('0x2'),'afterUpdate':_0x450e('0x3'),'afterDestroy':_0x450e('0x4')};function emitEvent(_0x884f61){return function(_0x51cd35,_0x448c96,_0x5a0981){ChatInternalMessageEvents[_0x450e('0x5')](_0x884f61+':'+_0x51cd35['id'],_0x51cd35);ChatInternalMessageEvents[_0x450e('0x5')](_0x884f61,_0x51cd35);_0x5a0981(null);};}for(var e in events){if(events[_0x450e('0x6')](e)){var event=events[e];ChatInternalMessage[_0x450e('0x7')](e,emitEvent(event));}}module[_0x450e('0x8')]=ChatInternalMessageEvents;
\ No newline at end of file
index de1b44f..d903a95 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9a2e=['lodash','util','../../config/logger','api','path','rimraf','../../config/environment','./chatInternalMessage.attributes','ChatInternalMessage','utf8mb4'];(function(_0x56fd4c,_0x5a753c){var _0x5a3d36=function(_0x3f4be8){while(--_0x3f4be8){_0x56fd4c['push'](_0x56fd4c['shift']());}};_0x5a3d36(++_0x5a753c);}(_0x9a2e,0x17c));var _0xe9a2=function(_0x1b2ea9,_0x3bd1e1){_0x1b2ea9=_0x1b2ea9-0x0;var _0x5df608=_0x9a2e[_0x1b2ea9];return _0x5df608;};'use strict';var _=require(_0xe9a2('0x0'));var util=require(_0xe9a2('0x1'));var logger=require(_0xe9a2('0x2'))(_0xe9a2('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xe9a2('0x4'));var rimraf=require(_0xe9a2('0x5'));var config=require(_0xe9a2('0x6'));var attributes=require(_0xe9a2('0x7'));module['exports']=function(_0x2c366c,_0x4d8839){return _0x2c366c['define'](_0xe9a2('0x8'),attributes,{'tableName':'chat_internal_messages','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xe9a2('0x9'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0xc35a=['../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./chatInternalMessage.attributes','exports','define','ChatInternalMessage','chat_internal_messages','utf8mb4','utf8mb4_unicode_ci'];(function(_0x14022a,_0x4ca101){var _0x12b439=function(_0x9f5f11){while(--_0x9f5f11){_0x14022a['push'](_0x14022a['shift']());}};_0x12b439(++_0x4ca101);}(_0xc35a,0x1c0));var _0xac35=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0xc35a[_0x5b644e];return _0x49c6bf;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xac35('0x0'))(_0xac35('0x1'));var moment=require(_0xac35('0x2'));var BPromise=require(_0xac35('0x3'));var rp=require(_0xac35('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xac35('0x5'));var config=require(_0xac35('0x6'));var attributes=require(_0xac35('0x7'));module[_0xac35('0x8')]=function(_0x49943a,_0x3642e6){return _0x49943a[_0xac35('0x9')](_0xac35('0xa'),attributes,{'tableName':_0xac35('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xac35('0xc'),'collate':_0xac35('0xd')});};
\ No newline at end of file
index e0f8490..e0dab78 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0795=['code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','./chatInternalMessage.socket','register','request','then','info','ChatInternalMessage,\x20%s,\x20%s','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x3b23df,_0xe519ca){var _0x44ec02=function(_0x39a318){while(--_0x39a318){_0x3b23df['push'](_0x3b23df['shift']());}};_0x44ec02(++_0xe519ca);}(_0x0795,0x14e));var _0x5079=function(_0x4ddaba,_0x17ea5f){_0x4ddaba=_0x4ddaba-0x0;var _0x8512c5=_0x0795[_0x4ddaba];return _0x8512c5;};'use strict';var _=require(_0x5079('0x0'));var util=require(_0x5079('0x1'));var moment=require(_0x5079('0x2'));var BPromise=require(_0x5079('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5079('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x5079('0x5'));var logger=require(_0x5079('0x6'))(_0x5079('0x7'));var config=require(_0x5079('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x5079('0x9')][_0x5079('0xa')]({'port':0x232a});config[_0x5079('0xb')]=_[_0x5079('0xc')](config[_0x5079('0xb')],{'host':_0x5079('0xd'),'port':0x18eb});var socket=require(_0x5079('0xe'))(new Redis(config[_0x5079('0xb')]));require(_0x5079('0xf'))[_0x5079('0x10')](socket);function respondWithRpcPromise(_0x4f7e88,_0x1bf964,_0x347506){return new BPromise(function(_0x139e2d,_0x3ec287){return client[_0x5079('0x11')](_0x4f7e88,_0x347506)[_0x5079('0x12')](function(_0x2bae3a){logger[_0x5079('0x13')](_0x5079('0x14'),_0x1bf964,_0x5079('0x15'));logger[_0x5079('0x16')](_0x5079('0x17'),_0x1bf964,_0x5079('0x15'),JSON[_0x5079('0x18')](_0x2bae3a));if(_0x2bae3a[_0x5079('0x19')]){if(_0x2bae3a[_0x5079('0x19')][_0x5079('0x1a')]===0x1f4){logger[_0x5079('0x19')](_0x5079('0x14'),_0x1bf964,_0x2bae3a[_0x5079('0x19')][_0x5079('0x1b')]);return _0x3ec287(_0x2bae3a[_0x5079('0x19')]['message']);}logger[_0x5079('0x19')](_0x5079('0x14'),_0x1bf964,_0x2bae3a[_0x5079('0x19')][_0x5079('0x1b')]);return _0x139e2d(_0x2bae3a[_0x5079('0x19')][_0x5079('0x1b')]);}else{logger[_0x5079('0x13')](_0x5079('0x14'),_0x1bf964,'request\x20sent');_0x139e2d(_0x2bae3a[_0x5079('0x1c')]['message']);}})[_0x5079('0x1d')](function(_0x4c6fff){logger[_0x5079('0x19')](_0x5079('0x14'),_0x1bf964,_0x4c6fff);_0x3ec287(_0x4c6fff);});});}
\ No newline at end of file
+var _0xf864=['catch','lodash','moment','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','./chatInternalMessage.socket','register','request','request\x20sent','debug','ChatInternalMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','ChatInternalMessage,\x20%s,\x20%s','message','result'];(function(_0x30d5f8,_0x39ef3f){var _0x1c05da=function(_0x5437ef){while(--_0x5437ef){_0x30d5f8['push'](_0x30d5f8['shift']());}};_0x1c05da(++_0x39ef3f);}(_0xf864,0x11f));var _0x4f86=function(_0x4acde9,_0x2f2a6b){_0x4acde9=_0x4acde9-0x0;var _0x9d771d=_0xf864[_0x4acde9];return _0x9d771d;};'use strict';var _=require(_0x4f86('0x0'));var util=require('util');var moment=require(_0x4f86('0x1'));var BPromise=require(_0x4f86('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x4f86('0x3'));var logger=require(_0x4f86('0x4'))(_0x4f86('0x5'));var config=require(_0x4f86('0x6'));var jayson=require(_0x4f86('0x7'));var client=jayson[_0x4f86('0x8')][_0x4f86('0x9')]({'port':0x232a});config[_0x4f86('0xa')]=_[_0x4f86('0xb')](config['redis'],{'host':_0x4f86('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x4f86('0xa')]));require(_0x4f86('0xd'))[_0x4f86('0xe')](socket);function respondWithRpcPromise(_0x1ef1e9,_0x1026cb,_0x332584){return new BPromise(function(_0x9cdb82,_0x2220d5){return client[_0x4f86('0xf')](_0x1ef1e9,_0x332584)['then'](function(_0x1a0f57){logger['info']('ChatInternalMessage,\x20%s,\x20%s',_0x1026cb,_0x4f86('0x10'));logger[_0x4f86('0x11')](_0x4f86('0x12'),_0x1026cb,_0x4f86('0x10'),JSON[_0x4f86('0x13')](_0x1a0f57));if(_0x1a0f57['error']){if(_0x1a0f57[_0x4f86('0x14')][_0x4f86('0x15')]===0x1f4){logger['error'](_0x4f86('0x16'),_0x1026cb,_0x1a0f57[_0x4f86('0x14')][_0x4f86('0x17')]);return _0x2220d5(_0x1a0f57[_0x4f86('0x14')][_0x4f86('0x17')]);}logger[_0x4f86('0x14')]('ChatInternalMessage,\x20%s,\x20%s',_0x1026cb,_0x1a0f57['error'][_0x4f86('0x17')]);return _0x9cdb82(_0x1a0f57[_0x4f86('0x14')][_0x4f86('0x17')]);}else{logger['info'](_0x4f86('0x16'),_0x1026cb,_0x4f86('0x10'));_0x9cdb82(_0x1a0f57[_0x4f86('0x18')]['message']);}})[_0x4f86('0x19')](function(_0x1a102a){logger[_0x4f86('0x14')]('ChatInternalMessage,\x20%s,\x20%s',_0x1026cb,_0x1a102a);_0x2220d5(_0x1a102a);});});}
\ No newline at end of file
index 6b30e31..6fd357c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb14e=['length','chatInternalMessage:','./chatInternalMessage.events','remove','update','emit','removeListener','register'];(function(_0x48d6c2,_0x1ce5d2){var _0x39eeb1=function(_0xa992a7){while(--_0xa992a7){_0x48d6c2['push'](_0x48d6c2['shift']());}};_0x39eeb1(++_0x1ce5d2);}(_0xb14e,0x15a));var _0xeb14=function(_0x342bd9,_0x172771){_0x342bd9=_0x342bd9-0x0;var _0x43705a=_0xb14e[_0x342bd9];return _0x43705a;};'use strict';var ChatInternalMessageEvents=require(_0xeb14('0x0'));var events=['save',_0xeb14('0x1'),_0xeb14('0x2')];function createListener(_0x3a204b,_0x58bcb2){return function(_0x232c62){_0x58bcb2[_0xeb14('0x3')](_0x3a204b,_0x232c62);};}function removeListener(_0x3e19d8,_0x56a566){return function(){ChatInternalMessageEvents[_0xeb14('0x4')](_0x3e19d8,_0x56a566);};}exports[_0xeb14('0x5')]=function(_0x1fa7a1){for(var _0x35255c=0x0,_0xd8e2dc=events[_0xeb14('0x6')];_0x35255c<_0xd8e2dc;_0x35255c++){var _0x477b3c=events[_0x35255c];var _0x34ae4e=createListener(_0xeb14('0x7')+_0x477b3c,_0x1fa7a1);ChatInternalMessageEvents['on'](_0x477b3c,_0x34ae4e);}};
\ No newline at end of file
+var _0x3e90=['removeListener','register','length','chatInternalMessage:','./chatInternalMessage.events','save','remove','emit'];(function(_0x241430,_0x3de3a0){var _0x18cb73=function(_0x572768){while(--_0x572768){_0x241430['push'](_0x241430['shift']());}};_0x18cb73(++_0x3de3a0);}(_0x3e90,0xfc));var _0x03e9=function(_0x4d1ac9,_0x37e63a){_0x4d1ac9=_0x4d1ac9-0x0;var _0x41c2d9=_0x3e90[_0x4d1ac9];return _0x41c2d9;};'use strict';var ChatInternalMessageEvents=require(_0x03e9('0x0'));var events=[_0x03e9('0x1'),_0x03e9('0x2'),'update'];function createListener(_0x7eb69d,_0x5edda9){return function(_0x517534){_0x5edda9[_0x03e9('0x3')](_0x7eb69d,_0x517534);};}function removeListener(_0xa4e773,_0x553f11){return function(){ChatInternalMessageEvents[_0x03e9('0x4')](_0xa4e773,_0x553f11);};}exports[_0x03e9('0x5')]=function(_0x4af048){for(var _0x584db7=0x0,_0x1ddb10=events[_0x03e9('0x6')];_0x584db7<_0x1ddb10;_0x584db7++){var _0x4dc786=events[_0x584db7];var _0x3524f4=createListener(_0x03e9('0x7')+_0x4dc786,_0x4af048);ChatInternalMessageEvents['on'](_0x4dc786,_0x3524f4);}};
\ No newline at end of file
index c3ac1e3..fc07fba 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc14d=['isAuthenticated','describe','getUsers','/:id','create','put','update','delete','destroy','exports','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatInternalMessage.controller','get'];(function(_0x518f54,_0x44f1bc){var _0x18667b=function(_0x4add60){while(--_0x4add60){_0x518f54['push'](_0x518f54['shift']());}};_0x18667b(++_0x44f1bc);}(_0xc14d,0x1ea));var _0xdc14=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xc14d[_0x20a584];return _0x4b41a8;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xdc14('0x0'));var timeout=require(_0xdc14('0x1'));var express=require(_0xdc14('0x2'));var router=express[_0xdc14('0x3')]();var fs_extra=require(_0xdc14('0x4'));var auth=require(_0xdc14('0x5'));var interaction=require(_0xdc14('0x6'));var config=require(_0xdc14('0x7'));var controller=require(_0xdc14('0x8'));router[_0xdc14('0x9')]('/',auth[_0xdc14('0xa')](),controller['index']);router[_0xdc14('0x9')]('/describe',auth[_0xdc14('0xa')](),controller[_0xdc14('0xb')]);router[_0xdc14('0x9')]('/users',auth[_0xdc14('0xa')](),controller[_0xdc14('0xc')]);router[_0xdc14('0x9')](_0xdc14('0xd'),auth['isAuthenticated'](),controller['show']);router['post']('/',auth[_0xdc14('0xa')](),controller[_0xdc14('0xe')]);router[_0xdc14('0xf')]('/:id',controller[_0xdc14('0x10')]);router[_0xdc14('0x11')](_0xdc14('0xd'),auth['isAuthenticated'](),controller[_0xdc14('0x12')]);module[_0xdc14('0x13')]=router;
\ No newline at end of file
+var _0xd605=['update','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./chatInternalMessage.controller','get','isAuthenticated','index','/describe','describe','/users','getUsers','show','post','put'];(function(_0x2e6006,_0x314c29){var _0x701665=function(_0x219014){while(--_0x219014){_0x2e6006['push'](_0x2e6006['shift']());}};_0x701665(++_0x314c29);}(_0xd605,0x117));var _0x5d60=function(_0x2bbc90,_0x1e6a76){_0x2bbc90=_0x2bbc90-0x0;var _0x2a1aec=_0xd605[_0x2bbc90];return _0x2a1aec;};'use strict';var multer=require(_0x5d60('0x0'));var util=require(_0x5d60('0x1'));var path=require(_0x5d60('0x2'));var timeout=require(_0x5d60('0x3'));var express=require(_0x5d60('0x4'));var router=express[_0x5d60('0x5')]();var fs_extra=require(_0x5d60('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x5d60('0x7'));var config=require(_0x5d60('0x8'));var controller=require(_0x5d60('0x9'));router[_0x5d60('0xa')]('/',auth[_0x5d60('0xb')](),controller[_0x5d60('0xc')]);router[_0x5d60('0xa')](_0x5d60('0xd'),auth['isAuthenticated'](),controller[_0x5d60('0xe')]);router[_0x5d60('0xa')](_0x5d60('0xf'),auth['isAuthenticated'](),controller[_0x5d60('0x10')]);router[_0x5d60('0xa')]('/:id',auth['isAuthenticated'](),controller[_0x5d60('0x11')]);router[_0x5d60('0x12')]('/',auth[_0x5d60('0xb')](),controller['create']);router[_0x5d60('0x13')]('/:id',controller[_0x5d60('0x14')]);router['delete']('/:id',auth[_0x5d60('0xb')](),controller[_0x5d60('0x15')]);module[_0x5d60('0x16')]=router;
\ No newline at end of file
index 9f6e92f..8035da9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7916=['out','STRING','sequelize','TEXT','medium','BOOLEAN','ENUM'];(function(_0x69c0c2,_0x2af0bf){var _0x3422f6=function(_0x283e41){while(--_0x283e41){_0x69c0c2['push'](_0x69c0c2['shift']());}};_0x3422f6(++_0x2af0bf);}(_0x7916,0x128));var _0x6791=function(_0x43c23b,_0x136f62){_0x43c23b=_0x43c23b-0x0;var _0x3c1613=_0x7916[_0x43c23b];return _0x3c1613;};'use strict';var Sequelize=require(_0x6791('0x0'));module['exports']={'body':{'type':Sequelize[_0x6791('0x1')](_0x6791('0x2')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'secret':{'type':Sequelize[_0x6791('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0x6791('0x4')]('in',_0x6791('0x5')),'defaultValue':_0x6791('0x5'),'allowNull':![]},'readAt':{'type':Sequelize['DATE']},'providerName':{'type':Sequelize[_0x6791('0x6')]},'providerResponse':{'type':Sequelize['TEXT']}};
\ No newline at end of file
+var _0xd523=['medium','BOOLEAN','ENUM','out','DATE','STRING','sequelize','exports','TEXT'];(function(_0x1a858a,_0x2ab7a6){var _0x307d43=function(_0x41ad91){while(--_0x41ad91){_0x1a858a['push'](_0x1a858a['shift']());}};_0x307d43(++_0x2ab7a6);}(_0xd523,0x153));var _0x3d52=function(_0x4336fc,_0x1ddb83){_0x4336fc=_0x4336fc-0x0;var _0x54c6d8=_0xd523[_0x4336fc];return _0x54c6d8;};'use strict';var Sequelize=require(_0x3d52('0x0'));module[_0x3d52('0x1')]={'body':{'type':Sequelize[_0x3d52('0x2')](_0x3d52('0x3')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'secret':{'type':Sequelize[_0x3d52('0x4')],'defaultValue':![]},'direction':{'type':Sequelize[_0x3d52('0x5')]('in',_0x3d52('0x6')),'defaultValue':'out','allowNull':![]},'readAt':{'type':Sequelize[_0x3d52('0x7')]},'providerName':{'type':Sequelize[_0x3d52('0x8')]},'providerResponse':{'type':Sequelize[_0x3d52('0x2')]}};
\ No newline at end of file
index 4b44ab1..acde294 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x06ec=['ChatMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','sendStatus','end','json','offset','undefined','limit','status','set','Content-Range','apply','reject','update','then','stack','name','send','index','map','rawAttributes','fieldName','key','model','query','keys','attributes','intersection','fields','length','nolimit','order','sort','filters','pick','filter','where','merge','VIRTUAL','options','ChatMessage','count','includeAll','include','findAll','rows','catch','params','create','body','find','destroy','describe','accept','chat','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','get','ChatInteraction','ChatInteractionId','interaction','[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','stringify','null','AcceptMessage','acceptMessage','ContactId','sequelize','Sequelize','QueryTypes','SELECT','fullname','email','internal','manual','interface','SIP/%s','channel','motionChannel','event','EventManager','parse','formData','chat-interactions','[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','RejectMessage','rejectMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','rejectmessage','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','to-csv','ejs','fs-extra','squel','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','socket.io-emitter','register','jayson/promise','client','http','info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x8ba19a,_0x1d2b2b){var _0x2bd8b4=function(_0xee823f){while(--_0xee823f){_0x8ba19a['push'](_0x8ba19a['shift']());}};_0x2bd8b4(++_0x1d2b2b);}(_0x06ec,0xe4));var _0xc06e=function(_0x5d3bc5,_0xd57ce){_0x5d3bc5=_0x5d3bc5-0x0;var _0x2f1d26=_0x06ec[_0x5d3bc5];return _0x2f1d26;};'use strict';var emlformat=require(_0xc06e('0x0'));var rimraf=require(_0xc06e('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xc06e('0x2'));var rp=require('request-promise');var moment=require(_0xc06e('0x3'));var BPromise=require(_0xc06e('0x4'));var Mustache=require(_0xc06e('0x5'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0xc06e('0x6'));var ejs=require(_0xc06e('0x7'));var fs=require('fs');var fs_extra=require(_0xc06e('0x8'));var _=require('lodash');var squel=require(_0xc06e('0x9'));var crypto=require('crypto');var jsforce=require(_0xc06e('0xa'));var deskjs=require('desk.js');var toCsv=require(_0xc06e('0x6'));var querystring=require(_0xc06e('0xb'));var Papa=require('papaparse');var Redis=require(_0xc06e('0xc'));var authService=require(_0xc06e('0xd'));var qs=require(_0xc06e('0xe'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc06e('0xf'));var logger=require(_0xc06e('0x10'))(_0xc06e('0x11'));var utils=require(_0xc06e('0x12'));var config=require(_0xc06e('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0xc06e('0x14'))['db'];config[_0xc06e('0x15')]=_[_0xc06e('0x16')](config[_0xc06e('0x15')],{'host':'localhost','port':0x18eb});var socket=require(_0xc06e('0x17'))(new Redis(config[_0xc06e('0x15')]));require('./chatMessage.socket')[_0xc06e('0x18')](socket);var jayson=require(_0xc06e('0x19'));var client=jayson[_0xc06e('0x1a')]['http']({'port':0x232c});var client9002=jayson['client'][_0xc06e('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x2add23,_0x4fe60f,_0x36131a,_0x6645d8){return new BPromise(function(_0x3c0462,_0x501deb){var _0x1bb750=_0x6645d8||client;return _0x1bb750['request'](_0x2add23,_0x36131a)['then'](function(_0x26c31a){logger[_0xc06e('0x1c')](_0xc06e('0x1d'),_0x4fe60f,_0xc06e('0x1e'));logger[_0xc06e('0x1f')](_0xc06e('0x20'),_0x4fe60f,_0xc06e('0x1e'),JSON['stringify'](_0x26c31a));if(_0x26c31a[_0xc06e('0x21')]){if(_0x26c31a[_0xc06e('0x21')][_0xc06e('0x22')]===0x1f4){logger[_0xc06e('0x21')](_0xc06e('0x1d'),_0x4fe60f,_0x26c31a[_0xc06e('0x21')]['message']);return _0x501deb(_0x26c31a['error'][_0xc06e('0x23')]);}logger[_0xc06e('0x21')](_0xc06e('0x1d'),_0x4fe60f,_0x26c31a[_0xc06e('0x21')][_0xc06e('0x23')]);return _0x3c0462(_0x26c31a[_0xc06e('0x21')][_0xc06e('0x23')]);}else{logger[_0xc06e('0x1c')]('ChatMessage,\x20%s,\x20%s',_0x4fe60f,_0xc06e('0x1e'));_0x3c0462(_0x26c31a[_0xc06e('0x24')][_0xc06e('0x23')]);}})['catch'](function(_0x200ecc){logger[_0xc06e('0x21')](_0xc06e('0x1d'),_0x4fe60f,_0x200ecc);_0x501deb(_0x200ecc);});});}function respondWithStatusCode(_0x4aab55,_0x61f5dc){_0x61f5dc=_0x61f5dc||0xcc;return function(_0x5df05d){if(_0x5df05d){return _0x4aab55[_0xc06e('0x25')](_0x61f5dc);}return _0x4aab55['status'](_0x61f5dc)[_0xc06e('0x26')]();};}function respondWithResult(_0x5bf39d,_0x185e5c){_0x185e5c=_0x185e5c||0xc8;return function(_0x4a5c20){if(_0x4a5c20){return _0x5bf39d['status'](_0x185e5c)[_0xc06e('0x27')](_0x4a5c20);}};}function respondWithFilteredResult(_0x39040d,_0x4306ea){return function(_0x40176f){if(_0x40176f){var _0x4579e2=typeof _0x4306ea[_0xc06e('0x28')]===_0xc06e('0x29')&&typeof _0x4306ea[_0xc06e('0x2a')]===_0xc06e('0x29');var _0x8a0b58=_0x40176f['count'];var _0x446da7=_0x4579e2?0x0:_0x4306ea['offset'];var _0xd0e78d=_0x4579e2?_0x40176f['count']:_0x4306ea[_0xc06e('0x28')]+_0x4306ea[_0xc06e('0x2a')];var _0x2aaef6;if(_0xd0e78d>=_0x8a0b58){_0xd0e78d=_0x8a0b58;_0x2aaef6=0xc8;}else{_0x2aaef6=0xce;}_0x39040d[_0xc06e('0x2b')](_0x2aaef6);return _0x39040d[_0xc06e('0x2c')](_0xc06e('0x2d'),_0x446da7+'-'+_0xd0e78d+'/'+_0x8a0b58)[_0xc06e('0x27')](_0x40176f);}return null;};}function patchUpdates(_0x18814f){return function(_0x1d59ae){try{jsonpatch[_0xc06e('0x2e')](_0x1d59ae,_0x18814f,!![]);}catch(_0x19b355){return BPromise[_0xc06e('0x2f')](_0x19b355);}return _0x1d59ae['save']();};}function saveUpdates(_0x556ce9,_0xcd8028){return function(_0x53dabc){if(_0x53dabc){return _0x53dabc[_0xc06e('0x30')](_0x556ce9)[_0xc06e('0x31')](function(_0x68b0a5){return _0x68b0a5;});}return null;};}function removeEntity(_0x5c28c7,_0x24b451){return function(_0x282a03){if(_0x282a03){return _0x282a03['destroy']()[_0xc06e('0x31')](function(){_0x5c28c7[_0xc06e('0x2b')](0xcc)[_0xc06e('0x26')]();});}};}function handleEntityNotFound(_0x5d677d,_0x5a9702){return function(_0x3f04e4){if(!_0x3f04e4){_0x5d677d[_0xc06e('0x25')](0x194);}return _0x3f04e4;};}function handleError(_0x57b79d,_0x317080){_0x317080=_0x317080||0x1f4;return function(_0x53b855){logger[_0xc06e('0x21')](_0x53b855[_0xc06e('0x32')]);if(_0x53b855[_0xc06e('0x33')]){delete _0x53b855[_0xc06e('0x33')];}_0x57b79d[_0xc06e('0x2b')](_0x317080)[_0xc06e('0x34')](_0x53b855);};}exports[_0xc06e('0x35')]=function(_0x33182f,_0x17498d){var _0x5e0793={},_0x2e10ef={},_0x2a70a6={'count':0x0,'rows':[]};var _0x16b021=_[_0xc06e('0x36')](db['ChatMessage'][_0xc06e('0x37')],function(_0x45bcc3){return{'name':_0x45bcc3[_0xc06e('0x38')],'type':_0x45bcc3['type'][_0xc06e('0x39')]};});_0x2e10ef[_0xc06e('0x3a')]=_[_0xc06e('0x36')](_0x16b021,'name');_0x2e10ef[_0xc06e('0x3b')]=_[_0xc06e('0x3c')](_0x33182f[_0xc06e('0x3b')]);_0x2e10ef['filters']=_['intersection'](_0x2e10ef[_0xc06e('0x3a')],_0x2e10ef[_0xc06e('0x3b')]);_0x5e0793[_0xc06e('0x3d')]=_[_0xc06e('0x3e')](_0x2e10ef['model'],qs[_0xc06e('0x3f')](_0x33182f['query'][_0xc06e('0x3f')]));_0x5e0793['attributes']=_0x5e0793['attributes'][_0xc06e('0x40')]?_0x5e0793[_0xc06e('0x3d')]:_0x2e10ef['model'];if(!_0x33182f[_0xc06e('0x3b')]['hasOwnProperty'](_0xc06e('0x41'))){_0x5e0793['limit']=qs['limit'](_0x33182f[_0xc06e('0x3b')][_0xc06e('0x2a')]);_0x5e0793[_0xc06e('0x28')]=qs[_0xc06e('0x28')](_0x33182f[_0xc06e('0x3b')]['offset']);}_0x5e0793[_0xc06e('0x42')]=qs['sort'](_0x33182f[_0xc06e('0x3b')][_0xc06e('0x43')]);_0x5e0793['where']=qs[_0xc06e('0x44')](_[_0xc06e('0x45')](_0x33182f[_0xc06e('0x3b')],_0x2e10ef[_0xc06e('0x44')]),_0x16b021);if(_0x33182f[_0xc06e('0x3b')][_0xc06e('0x46')]){_0x5e0793[_0xc06e('0x47')]=_[_0xc06e('0x48')](_0x5e0793[_0xc06e('0x47')],{'$or':_['map'](_0x16b021,function(_0x2971a7){if(_0x2971a7['type']!==_0xc06e('0x49')){var _0x3f7146={};_0x3f7146[_0x2971a7['name']]={'$like':'%'+_0x33182f[_0xc06e('0x3b')][_0xc06e('0x46')]+'%'};return _0x3f7146;}})});}_0x5e0793=_[_0xc06e('0x48')]({},_0x5e0793,_0x33182f[_0xc06e('0x4a')]);var _0x4c26f9={'where':_0x5e0793['where']};return db[_0xc06e('0x4b')][_0xc06e('0x4c')](_0x4c26f9)[_0xc06e('0x31')](function(_0x1045bb){_0x2a70a6[_0xc06e('0x4c')]=_0x1045bb;if(_0x33182f['query'][_0xc06e('0x4d')]){_0x5e0793[_0xc06e('0x4e')]=[{'all':!![]}];}return db[_0xc06e('0x4b')][_0xc06e('0x4f')](_0x5e0793);})[_0xc06e('0x31')](function(_0x805c8b){_0x2a70a6[_0xc06e('0x50')]=_0x805c8b;return _0x2a70a6;})['then'](respondWithFilteredResult(_0x17498d,_0x5e0793))[_0xc06e('0x51')](handleError(_0x17498d,null));};exports['show']=function(_0x3bd50b,_0x45d284){var _0x5b0bbd={'raw':!![],'where':{'id':_0x3bd50b[_0xc06e('0x52')]['id']}},_0x11048f={};_0x11048f[_0xc06e('0x3a')]=_[_0xc06e('0x3c')](db[_0xc06e('0x4b')][_0xc06e('0x37')]);_0x11048f[_0xc06e('0x3b')]=_[_0xc06e('0x3c')](_0x3bd50b[_0xc06e('0x3b')]);_0x11048f['filters']=_[_0xc06e('0x3e')](_0x11048f['model'],_0x11048f[_0xc06e('0x3b')]);_0x5b0bbd['attributes']=_['intersection'](_0x11048f[_0xc06e('0x3a')],qs['fields'](_0x3bd50b['query'][_0xc06e('0x3f')]));_0x5b0bbd[_0xc06e('0x3d')]=_0x5b0bbd[_0xc06e('0x3d')]['length']?_0x5b0bbd[_0xc06e('0x3d')]:_0x11048f[_0xc06e('0x3a')];if(_0x3bd50b['query'][_0xc06e('0x4d')]){_0x5b0bbd[_0xc06e('0x4e')]=[{'all':!![]}];}_0x5b0bbd=_['merge']({},_0x5b0bbd,_0x3bd50b['options']);return db[_0xc06e('0x4b')]['find'](_0x5b0bbd)['then'](handleEntityNotFound(_0x45d284,null))['then'](respondWithResult(_0x45d284,null))[_0xc06e('0x51')](handleError(_0x45d284,null));};exports[_0xc06e('0x53')]=function(_0x5d607f,_0x4aebab){return db['ChatMessage'][_0xc06e('0x53')](_0x5d607f[_0xc06e('0x54')],{})[_0xc06e('0x31')](respondWithResult(_0x4aebab,0xc9))['catch'](handleError(_0x4aebab,null));};exports[_0xc06e('0x30')]=function(_0x323373,_0x60b164){if(_0x323373[_0xc06e('0x54')]['id']){delete _0x323373['body']['id'];}return db[_0xc06e('0x4b')][_0xc06e('0x55')]({'where':{'id':_0x323373[_0xc06e('0x52')]['id']}})[_0xc06e('0x31')](handleEntityNotFound(_0x60b164,null))[_0xc06e('0x31')](saveUpdates(_0x323373[_0xc06e('0x54')],null))[_0xc06e('0x31')](respondWithResult(_0x60b164,null))[_0xc06e('0x51')](handleError(_0x60b164,null));};exports[_0xc06e('0x56')]=function(_0x1e05a9,_0x431b83){return db[_0xc06e('0x4b')][_0xc06e('0x55')]({'where':{'id':_0x1e05a9[_0xc06e('0x52')]['id']}})['then'](handleEntityNotFound(_0x431b83,null))[_0xc06e('0x31')](removeEntity(_0x431b83,null))[_0xc06e('0x51')](handleError(_0x431b83,null));};exports[_0xc06e('0x57')]=function(_0x50d341,_0x2ae4c5){return db[_0xc06e('0x4b')][_0xc06e('0x57')]()[_0xc06e('0x31')](respondWithResult(_0x2ae4c5,null))[_0xc06e('0x51')](handleError(_0x2ae4c5,null));};var interaction_log=require(_0xc06e('0x10'))('chat-interactions');exports[_0xc06e('0x58')]=function(_0x2b9a47,_0x2b87f8,_0x288ee4){var _0x432154={'agent':{},'channel':_0xc06e('0x59')};if(_0x2b9a47['body']['id']){delete _0x2b9a47[_0xc06e('0x54')]['id'];}_0x2b9a47[_0xc06e('0x54')][_0xc06e('0x5a')]=!![];_0x2b9a47[_0xc06e('0x54')][_0xc06e('0x5b')]=moment()[_0xc06e('0x5c')](_0xc06e('0x5d'));_0x2b9a47['body'][_0xc06e('0x5e')]=_0x2b9a47[_0xc06e('0x54')][_0xc06e('0x5e')]||_0x2b9a47[_0xc06e('0x5f')]['id'];_0x432154[_0xc06e('0x60')]['id']=_0x2b9a47['body']['UserId'];return db[_0xc06e('0x4b')][_0xc06e('0x55')]({'where':{'id':_0x2b9a47[_0xc06e('0x52')]['id'],'UserId':null}})[_0xc06e('0x31')](handleEntityNotFound(_0x2b87f8,null))[_0xc06e('0x31')](saveUpdates(_0x2b9a47[_0xc06e('0x54')],null))['then'](function(_0x4c691e){if(_0x4c691e){_0x432154[_0xc06e('0x23')]=_0x4c691e[_0xc06e('0x61')]({'plain':!![]});return db[_0xc06e('0x62')]['find']({'where':{'id':_0x4c691e[_0xc06e('0x63')]}});}return null;})[_0xc06e('0x31')](handleEntityNotFound(_0x2b87f8,null))[_0xc06e('0x31')](function(_0x585434){if(_0x585434){return _0x585434[_0xc06e('0x30')]({'UserId':_0x2b9a47[_0xc06e('0x54')][_0xc06e('0x5e')],'read1stAt':_['isNil'](_0x585434['read1stAt'])?moment()[_0xc06e('0x5c')](_0xc06e('0x5d')):undefined});}return null;})[_0xc06e('0x31')](function(_0x29c6df){if(_0x29c6df){_0x432154[_0xc06e('0x64')]=_0x29c6df[_0xc06e('0x61')]({'plain':!![]});interaction_log[_0xc06e('0x1c')](_0xc06e('0x65'),_0x2b9a47[_0xc06e('0x5f')]['id'],_0x2b9a47[_0xc06e('0x5f')][_0xc06e('0x33')],_0x2b9a47['user'][_0xc06e('0x66')],_0x432154[_0xc06e('0x64')]['id'],_0x2b9a47[_0xc06e('0x54')]?JSON[_0xc06e('0x67')](_0x2b9a47[_0xc06e('0x54')]):_0xc06e('0x68'));return respondWithRpcPromise(_0xc06e('0x69'),_0xc06e('0x6a'),_0x432154);}return null;})[_0xc06e('0x31')](function(_0x3ecb17){var _0x34aa0e='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x3ecb17[_0xc06e('0x23')][_0xc06e('0x6b')];return db[_0xc06e('0x6c')][_0xc06e('0x3b')](_0x34aa0e,{'type':db[_0xc06e('0x6d')][_0xc06e('0x6e')][_0xc06e('0x6f')],'raw':!![]})['then'](function(_0xca8334){return _0xca8334;});})[_0xc06e('0x31')](function(_0x2cc4de){if(_0x2cc4de){_0x432154['message']['contact']=_0x2cc4de[0x0];if(!_0x2b9a47[_0xc06e('0x54')][_0xc06e('0x5e')])return;return db['User'][_0xc06e('0x55')]({'where':{'id':_0x2b9a47['body'][_0xc06e('0x5e')],'role':'agent'},'attributes':['id',_0xc06e('0x33'),_0xc06e('0x70'),_0xc06e('0x71'),_0xc06e('0x72')],'raw':!![]});}return null;})[_0xc06e('0x31')](function(_0x4e6613){if(!_0x4e6613)return null;_0x432154['message'][_0xc06e('0x60')]=_0x4e6613;return _0x432154;})[_0xc06e('0x31')](function(_0x5db2f5){if(_0x5db2f5){if(_0x2b9a47[_0xc06e('0x54')][_0xc06e('0x73')]){_0x432154['message'][_0xc06e('0x74')]=util['format'](_0xc06e('0x75'),_0x2b9a47['user']['name']);_0x432154['message'][_0xc06e('0x76')]=_0x432154[_0xc06e('0x76')];_0x432154[_0xc06e('0x23')][_0xc06e('0x77')]=_0x432154[_0xc06e('0x76')];_0x432154[_0xc06e('0x23')][_0xc06e('0x78')]=_0xc06e('0x58');return respondWithRpcPromise('EventManager',_0xc06e('0x79'),{'event':'acceptmessage','message':_[_0xc06e('0x48')](_0x432154[_0xc06e('0x23')],JSON[_0xc06e('0x7a')](_0x432154[_0xc06e('0x64')][_0xc06e('0x7b')]))},client9002)[_0xc06e('0x31')](function(){return _0x432154;});}return _0x432154;}return null;})[_0xc06e('0x31')](respondWithResult(_0x2b87f8,null))['catch'](handleError(_0x2b87f8,null));};var interaction_log=require(_0xc06e('0x10'))(_0xc06e('0x7c'));exports[_0xc06e('0x2f')]=function(_0xf66806,_0x3adc15,_0x1b9312){var _0x1927e1={'agent':{},'channel':_0xc06e('0x59')};if(_0xf66806['body']['id']){delete _0xf66806['body']['id'];}_0xf66806[_0xc06e('0x54')][_0xc06e('0x5e')]=_0xf66806[_0xc06e('0x54')][_0xc06e('0x5e')]||_0xf66806['user']['id'];_0x1927e1[_0xc06e('0x60')]['id']=_0xf66806[_0xc06e('0x54')]['UserId'];return db[_0xc06e('0x4b')][_0xc06e('0x55')]({'where':{'id':_0xf66806[_0xc06e('0x52')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x3adc15,null))[_0xc06e('0x31')](function(_0x15ff44){if(_0x15ff44){_0x1927e1[_0xc06e('0x23')]=_0x15ff44[_0xc06e('0x61')]({'plain':!![]});return db[_0xc06e('0x62')]['find']({'where':{'id':_0x15ff44[_0xc06e('0x63')]}});}return null;})['then'](handleEntityNotFound(_0x3adc15,null))[_0xc06e('0x31')](function(_0x5bcf0c){if(_0x5bcf0c){_0x1927e1[_0xc06e('0x64')]=_0x5bcf0c[_0xc06e('0x61')]({'plain':!![]});interaction_log['info'](_0xc06e('0x7d'),_0xf66806[_0xc06e('0x5f')]['id'],_0xf66806[_0xc06e('0x5f')][_0xc06e('0x33')],_0xf66806[_0xc06e('0x5f')]['role'],_0x1927e1[_0xc06e('0x64')]['id'],_0xf66806['body']?JSON[_0xc06e('0x67')](_0xf66806['body']):_0xc06e('0x68'));return respondWithRpcPromise(_0xc06e('0x7e'),_0xc06e('0x7f'),_0x1927e1);}return null;})[_0xc06e('0x31')](function(_0x5d981e){var _0x13125c=_0xc06e('0x80')+_0x5d981e[_0xc06e('0x23')][_0xc06e('0x6b')];return db['sequelize']['query'](_0x13125c,{'type':db[_0xc06e('0x6d')]['QueryTypes'][_0xc06e('0x6f')],'raw':!![]})[_0xc06e('0x31')](function(_0x4aa11e){return _0x4aa11e;});})[_0xc06e('0x31')](function(_0x91765f){if(_0x91765f){_0x1927e1[_0xc06e('0x23')]['contact']=_0x91765f[0x0];if(!_0xf66806[_0xc06e('0x54')]['UserId'])return;return db['User'][_0xc06e('0x55')]({'where':{'id':_0xf66806[_0xc06e('0x54')][_0xc06e('0x5e')],'role':_0xc06e('0x60')},'attributes':['id',_0xc06e('0x33'),_0xc06e('0x70'),'email',_0xc06e('0x72')],'raw':!![]});}return null;})['then'](function(_0x3f6540){if(!_0x3f6540)return null;_0x1927e1['message']['agent']=_0x3f6540;return _0x1927e1;})['then'](function(_0x1a9d8d){if(_0x1a9d8d){_0x1a9d8d[_0xc06e('0x23')][_0xc06e('0x74')]=util[_0xc06e('0x5c')](_0xc06e('0x75'),_0xf66806[_0xc06e('0x5f')][_0xc06e('0x33')]);_0x1a9d8d[_0xc06e('0x23')][_0xc06e('0x76')]=_0x1927e1['channel'];_0x1a9d8d[_0xc06e('0x23')][_0xc06e('0x77')]=_0x1927e1[_0xc06e('0x76')];_0x1a9d8d['message'][_0xc06e('0x78')]=_0xc06e('0x2f');respondWithRpcPromise(_0xc06e('0x79'),_0xc06e('0x79'),{'event':_0xc06e('0x81'),'message':_[_0xc06e('0x48')](_0x1927e1[_0xc06e('0x23')],JSON[_0xc06e('0x7a')](_0x1927e1[_0xc06e('0x64')][_0xc06e('0x7b')]))},client9002);return _0x1927e1;}return null;})[_0xc06e('0x31')](respondWithResult(_0x3adc15,null))['catch'](handleError(_0x3adc15,null));};
\ No newline at end of file
+var _0x1583=['Content-Range','save','update','destroy','stack','name','send','map','rawAttributes','type','key','model','query','keys','filters','intersection','fields','length','attributes','hasOwnProperty','nolimit','order','where','pick','filter','merge','options','includeAll','include','ChatMessage','findAll','rows','show','params','find','create','body','describe','chat-interactions','accept','chat','read','readAt','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','get','ChatInteraction','ChatInteractionId','isNil','format','interaction','[CHATMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','stringify','AcceptMessage','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','sequelize','Sequelize','QueryTypes','contact','email','manual','interface','SIP/%s','channel','motionChannel','EventManager','acceptmessage','reject','[CHATMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','null','RejectMessage','rejectMessage','ContactId','User','fullname','internal','event','rejectmessage','parse','rimraf','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','squel','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','defaults','redis','localhost','./chatMessage.socket','register','client','http','request','then','info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug','ChatMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','sendStatus','status','end','json','offset','limit','undefined','count','set'];(function(_0x564975,_0xfd42e){var _0x3dc18f=function(_0x46b2b5){while(--_0x46b2b5){_0x564975['push'](_0x564975['shift']());}};_0x3dc18f(++_0xfd42e);}(_0x1583,0x1e8));var _0x3158=function(_0x4a89df,_0x180ff4){_0x4a89df=_0x4a89df-0x0;var _0x13fef8=_0x1583[_0x4a89df];return _0x13fef8;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x3158('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x3158('0x1'));var BPromise=require(_0x3158('0x2'));var Mustache=require(_0x3158('0x3'));var util=require(_0x3158('0x4'));var path=require(_0x3158('0x5'));var sox=require(_0x3158('0x6'));var csv=require('to-csv');var ejs=require(_0x3158('0x7'));var fs=require('fs');var fs_extra=require(_0x3158('0x8'));var _=require('lodash');var squel=require(_0x3158('0x9'));var crypto=require('crypto');var jsforce=require(_0x3158('0xa'));var deskjs=require(_0x3158('0xb'));var toCsv=require(_0x3158('0xc'));var querystring=require(_0x3158('0xd'));var Papa=require(_0x3158('0xe'));var Redis=require(_0x3158('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x3158('0x10'));var as=require(_0x3158('0x11'));var hardwareService=require(_0x3158('0x12'));var logger=require(_0x3158('0x13'))(_0x3158('0x14'));var utils=require(_0x3158('0x15'));var config=require(_0x3158('0x16'));var licenseUtil=require(_0x3158('0x17'));var db=require('../../mysqldb')['db'];config['redis']=_[_0x3158('0x18')](config[_0x3158('0x19')],{'host':_0x3158('0x1a'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x3158('0x19')]));require(_0x3158('0x1b'))[_0x3158('0x1c')](socket);var jayson=require('jayson/promise');var client=jayson[_0x3158('0x1d')][_0x3158('0x1e')]({'port':0x232c});var client9002=jayson[_0x3158('0x1d')][_0x3158('0x1e')]({'port':0x232a});function respondWithRpcPromise(_0x45da6a,_0x5d49b8,_0x4a4d53,_0x25582b){return new BPromise(function(_0x3c8f96,_0x527005){var _0x263dc9=_0x25582b||client;return _0x263dc9[_0x3158('0x1f')](_0x45da6a,_0x4a4d53)[_0x3158('0x20')](function(_0x40afaf){logger[_0x3158('0x21')](_0x3158('0x22'),_0x5d49b8,_0x3158('0x23'));logger[_0x3158('0x24')](_0x3158('0x25'),_0x5d49b8,_0x3158('0x23'),JSON['stringify'](_0x40afaf));if(_0x40afaf[_0x3158('0x26')]){if(_0x40afaf[_0x3158('0x26')][_0x3158('0x27')]===0x1f4){logger['error'](_0x3158('0x22'),_0x5d49b8,_0x40afaf['error'][_0x3158('0x28')]);return _0x527005(_0x40afaf['error'][_0x3158('0x28')]);}logger[_0x3158('0x26')](_0x3158('0x22'),_0x5d49b8,_0x40afaf[_0x3158('0x26')][_0x3158('0x28')]);return _0x3c8f96(_0x40afaf['error'][_0x3158('0x28')]);}else{logger[_0x3158('0x21')](_0x3158('0x22'),_0x5d49b8,_0x3158('0x23'));_0x3c8f96(_0x40afaf[_0x3158('0x29')][_0x3158('0x28')]);}})[_0x3158('0x2a')](function(_0x343c21){logger[_0x3158('0x26')](_0x3158('0x22'),_0x5d49b8,_0x343c21);_0x527005(_0x343c21);});});}function respondWithStatusCode(_0x399b42,_0x373021){_0x373021=_0x373021||0xcc;return function(_0x4b3841){if(_0x4b3841){return _0x399b42[_0x3158('0x2b')](_0x373021);}return _0x399b42[_0x3158('0x2c')](_0x373021)[_0x3158('0x2d')]();};}function respondWithResult(_0x140b11,_0x5d719b){_0x5d719b=_0x5d719b||0xc8;return function(_0x47f261){if(_0x47f261){return _0x140b11['status'](_0x5d719b)[_0x3158('0x2e')](_0x47f261);}};}function respondWithFilteredResult(_0x3183e6,_0x492db4){return function(_0xbecda8){if(_0xbecda8){var _0x550099=typeof _0x492db4[_0x3158('0x2f')]==='undefined'&&typeof _0x492db4[_0x3158('0x30')]===_0x3158('0x31');var _0x4a684d=_0xbecda8[_0x3158('0x32')];var _0x22b31c=_0x550099?0x0:_0x492db4[_0x3158('0x2f')];var _0xd63395=_0x550099?_0xbecda8[_0x3158('0x32')]:_0x492db4[_0x3158('0x2f')]+_0x492db4[_0x3158('0x30')];var _0x40c55f;if(_0xd63395>=_0x4a684d){_0xd63395=_0x4a684d;_0x40c55f=0xc8;}else{_0x40c55f=0xce;}_0x3183e6[_0x3158('0x2c')](_0x40c55f);return _0x3183e6[_0x3158('0x33')](_0x3158('0x34'),_0x22b31c+'-'+_0xd63395+'/'+_0x4a684d)['json'](_0xbecda8);}return null;};}function patchUpdates(_0x886538){return function(_0x55a22a){try{jsonpatch['apply'](_0x55a22a,_0x886538,!![]);}catch(_0x4b4058){return BPromise['reject'](_0x4b4058);}return _0x55a22a[_0x3158('0x35')]();};}function saveUpdates(_0x46274c,_0xa1e748){return function(_0x51031e){if(_0x51031e){return _0x51031e[_0x3158('0x36')](_0x46274c)['then'](function(_0x7933b){return _0x7933b;});}return null;};}function removeEntity(_0x40d6c8,_0x52d57c){return function(_0xfd7b00){if(_0xfd7b00){return _0xfd7b00[_0x3158('0x37')]()[_0x3158('0x20')](function(){_0x40d6c8['status'](0xcc)[_0x3158('0x2d')]();});}};}function handleEntityNotFound(_0x280286,_0x186eea){return function(_0x6649a9){if(!_0x6649a9){_0x280286['sendStatus'](0x194);}return _0x6649a9;};}function handleError(_0x4dae01,_0x4e4fd9){_0x4e4fd9=_0x4e4fd9||0x1f4;return function(_0x18f15f){logger[_0x3158('0x26')](_0x18f15f[_0x3158('0x38')]);if(_0x18f15f['name']){delete _0x18f15f[_0x3158('0x39')];}_0x4dae01[_0x3158('0x2c')](_0x4e4fd9)[_0x3158('0x3a')](_0x18f15f);};}exports['index']=function(_0x195908,_0x43c001){var _0x2f490d={},_0x1ecba8={},_0x51ca5b={'count':0x0,'rows':[]};var _0x34b1e2=_[_0x3158('0x3b')](db['ChatMessage'][_0x3158('0x3c')],function(_0x4f860d){return{'name':_0x4f860d['fieldName'],'type':_0x4f860d[_0x3158('0x3d')][_0x3158('0x3e')]};});_0x1ecba8[_0x3158('0x3f')]=_[_0x3158('0x3b')](_0x34b1e2,_0x3158('0x39'));_0x1ecba8[_0x3158('0x40')]=_[_0x3158('0x41')](_0x195908[_0x3158('0x40')]);_0x1ecba8[_0x3158('0x42')]=_[_0x3158('0x43')](_0x1ecba8[_0x3158('0x3f')],_0x1ecba8[_0x3158('0x40')]);_0x2f490d['attributes']=_[_0x3158('0x43')](_0x1ecba8['model'],qs[_0x3158('0x44')](_0x195908['query']['fields']));_0x2f490d['attributes']=_0x2f490d['attributes'][_0x3158('0x45')]?_0x2f490d[_0x3158('0x46')]:_0x1ecba8[_0x3158('0x3f')];if(!_0x195908['query'][_0x3158('0x47')](_0x3158('0x48'))){_0x2f490d[_0x3158('0x30')]=qs[_0x3158('0x30')](_0x195908[_0x3158('0x40')][_0x3158('0x30')]);_0x2f490d['offset']=qs[_0x3158('0x2f')](_0x195908[_0x3158('0x40')][_0x3158('0x2f')]);}_0x2f490d[_0x3158('0x49')]=qs['sort'](_0x195908[_0x3158('0x40')]['sort']);_0x2f490d[_0x3158('0x4a')]=qs[_0x3158('0x42')](_[_0x3158('0x4b')](_0x195908[_0x3158('0x40')],_0x1ecba8[_0x3158('0x42')]),_0x34b1e2);if(_0x195908[_0x3158('0x40')][_0x3158('0x4c')]){_0x2f490d['where']=_[_0x3158('0x4d')](_0x2f490d[_0x3158('0x4a')],{'$or':_[_0x3158('0x3b')](_0x34b1e2,function(_0x3c7e92){if(_0x3c7e92[_0x3158('0x3d')]!=='VIRTUAL'){var _0x288b3f={};_0x288b3f[_0x3c7e92[_0x3158('0x39')]]={'$like':'%'+_0x195908[_0x3158('0x40')]['filter']+'%'};return _0x288b3f;}})});}_0x2f490d=_[_0x3158('0x4d')]({},_0x2f490d,_0x195908[_0x3158('0x4e')]);var _0x23f987={'where':_0x2f490d[_0x3158('0x4a')]};return db['ChatMessage'][_0x3158('0x32')](_0x23f987)[_0x3158('0x20')](function(_0x4ad1a3){_0x51ca5b[_0x3158('0x32')]=_0x4ad1a3;if(_0x195908[_0x3158('0x40')][_0x3158('0x4f')]){_0x2f490d[_0x3158('0x50')]=[{'all':!![]}];}return db[_0x3158('0x51')][_0x3158('0x52')](_0x2f490d);})[_0x3158('0x20')](function(_0x1efc26){_0x51ca5b[_0x3158('0x53')]=_0x1efc26;return _0x51ca5b;})['then'](respondWithFilteredResult(_0x43c001,_0x2f490d))['catch'](handleError(_0x43c001,null));};exports[_0x3158('0x54')]=function(_0x5ce949,_0x12ff44){var _0x20c2e4={'raw':!![],'where':{'id':_0x5ce949[_0x3158('0x55')]['id']}},_0x32bc6e={};_0x32bc6e['model']=_[_0x3158('0x41')](db['ChatMessage']['rawAttributes']);_0x32bc6e['query']=_[_0x3158('0x41')](_0x5ce949[_0x3158('0x40')]);_0x32bc6e[_0x3158('0x42')]=_[_0x3158('0x43')](_0x32bc6e[_0x3158('0x3f')],_0x32bc6e[_0x3158('0x40')]);_0x20c2e4['attributes']=_[_0x3158('0x43')](_0x32bc6e['model'],qs[_0x3158('0x44')](_0x5ce949[_0x3158('0x40')][_0x3158('0x44')]));_0x20c2e4[_0x3158('0x46')]=_0x20c2e4[_0x3158('0x46')][_0x3158('0x45')]?_0x20c2e4[_0x3158('0x46')]:_0x32bc6e['model'];if(_0x5ce949[_0x3158('0x40')]['includeAll']){_0x20c2e4[_0x3158('0x50')]=[{'all':!![]}];}_0x20c2e4=_[_0x3158('0x4d')]({},_0x20c2e4,_0x5ce949[_0x3158('0x4e')]);return db['ChatMessage'][_0x3158('0x56')](_0x20c2e4)['then'](handleEntityNotFound(_0x12ff44,null))[_0x3158('0x20')](respondWithResult(_0x12ff44,null))[_0x3158('0x2a')](handleError(_0x12ff44,null));};exports[_0x3158('0x57')]=function(_0x1cdeb6,_0x26a4c1){return db[_0x3158('0x51')][_0x3158('0x57')](_0x1cdeb6[_0x3158('0x58')],{})['then'](respondWithResult(_0x26a4c1,0xc9))['catch'](handleError(_0x26a4c1,null));};exports['update']=function(_0xa44873,_0x493383){if(_0xa44873['body']['id']){delete _0xa44873[_0x3158('0x58')]['id'];}return db['ChatMessage'][_0x3158('0x56')]({'where':{'id':_0xa44873['params']['id']}})[_0x3158('0x20')](handleEntityNotFound(_0x493383,null))['then'](saveUpdates(_0xa44873[_0x3158('0x58')],null))['then'](respondWithResult(_0x493383,null))[_0x3158('0x2a')](handleError(_0x493383,null));};exports[_0x3158('0x37')]=function(_0x2723a9,_0x1de65d){return db[_0x3158('0x51')][_0x3158('0x56')]({'where':{'id':_0x2723a9['params']['id']}})['then'](handleEntityNotFound(_0x1de65d,null))['then'](removeEntity(_0x1de65d,null))['catch'](handleError(_0x1de65d,null));};exports['describe']=function(_0xa808d6,_0x282d2a){return db[_0x3158('0x51')][_0x3158('0x59')]()[_0x3158('0x20')](respondWithResult(_0x282d2a,null))[_0x3158('0x2a')](handleError(_0x282d2a,null));};var interaction_log=require(_0x3158('0x13'))(_0x3158('0x5a'));exports[_0x3158('0x5b')]=function(_0x163d4d,_0x5ee45f,_0x1d9d8a){var _0x2a17d5={'agent':{},'channel':_0x3158('0x5c')};if(_0x163d4d[_0x3158('0x58')]['id']){delete _0x163d4d[_0x3158('0x58')]['id'];}_0x163d4d[_0x3158('0x58')][_0x3158('0x5d')]=!![];_0x163d4d[_0x3158('0x58')][_0x3158('0x5e')]=moment()['format'](_0x3158('0x5f'));_0x163d4d[_0x3158('0x58')][_0x3158('0x60')]=_0x163d4d['body'][_0x3158('0x60')]||_0x163d4d[_0x3158('0x61')]['id'];_0x2a17d5[_0x3158('0x62')]['id']=_0x163d4d[_0x3158('0x58')][_0x3158('0x60')];return db[_0x3158('0x51')]['find']({'where':{'id':_0x163d4d[_0x3158('0x55')]['id'],'UserId':null}})[_0x3158('0x20')](handleEntityNotFound(_0x5ee45f,null))[_0x3158('0x20')](saveUpdates(_0x163d4d[_0x3158('0x58')],null))[_0x3158('0x20')](function(_0x106574){if(_0x106574){_0x2a17d5['message']=_0x106574[_0x3158('0x63')]({'plain':!![]});return db[_0x3158('0x64')][_0x3158('0x56')]({'where':{'id':_0x106574[_0x3158('0x65')]}});}return null;})[_0x3158('0x20')](handleEntityNotFound(_0x5ee45f,null))['then'](function(_0x251394){if(_0x251394){return _0x251394[_0x3158('0x36')]({'UserId':_0x163d4d['body'][_0x3158('0x60')],'read1stAt':_[_0x3158('0x66')](_0x251394['read1stAt'])?moment()[_0x3158('0x67')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0x3158('0x20')](function(_0x3c4198){if(_0x3c4198){_0x2a17d5[_0x3158('0x68')]=_0x3c4198[_0x3158('0x63')]({'plain':!![]});interaction_log['info'](_0x3158('0x69'),_0x163d4d[_0x3158('0x61')]['id'],_0x163d4d[_0x3158('0x61')]['name'],_0x163d4d[_0x3158('0x61')][_0x3158('0x6a')],_0x2a17d5[_0x3158('0x68')]['id'],_0x163d4d[_0x3158('0x58')]?JSON[_0x3158('0x6b')](_0x163d4d[_0x3158('0x58')]):'null');return respondWithRpcPromise(_0x3158('0x6c'),_0x3158('0x6d'),_0x2a17d5);}return null;})[_0x3158('0x20')](function(_0x2bcefb){var _0x56dd87=_0x3158('0x6e')+_0x2bcefb[_0x3158('0x28')]['ContactId'];return db[_0x3158('0x6f')][_0x3158('0x40')](_0x56dd87,{'type':db[_0x3158('0x70')][_0x3158('0x71')]['SELECT'],'raw':!![]})['then'](function(_0x5d9f9f){return _0x5d9f9f;});})['then'](function(_0x25df30){if(_0x25df30){_0x2a17d5[_0x3158('0x28')][_0x3158('0x72')]=_0x25df30[0x0];if(!_0x163d4d[_0x3158('0x58')]['UserId'])return;return db['User']['find']({'where':{'id':_0x163d4d[_0x3158('0x58')][_0x3158('0x60')],'role':_0x3158('0x62')},'attributes':['id','name','fullname',_0x3158('0x73'),'internal'],'raw':!![]});}return null;})[_0x3158('0x20')](function(_0x549ccf){if(!_0x549ccf)return null;_0x2a17d5['message'][_0x3158('0x62')]=_0x549ccf;return _0x2a17d5;})[_0x3158('0x20')](function(_0x366206){if(_0x366206){if(_0x163d4d[_0x3158('0x58')][_0x3158('0x74')]){_0x2a17d5[_0x3158('0x28')][_0x3158('0x75')]=util[_0x3158('0x67')](_0x3158('0x76'),_0x163d4d[_0x3158('0x61')][_0x3158('0x39')]);_0x2a17d5[_0x3158('0x28')][_0x3158('0x77')]=_0x2a17d5[_0x3158('0x77')];_0x2a17d5[_0x3158('0x28')][_0x3158('0x78')]=_0x2a17d5[_0x3158('0x77')];_0x2a17d5[_0x3158('0x28')]['event']=_0x3158('0x5b');return respondWithRpcPromise(_0x3158('0x79'),_0x3158('0x79'),{'event':_0x3158('0x7a'),'message':_[_0x3158('0x4d')](_0x2a17d5[_0x3158('0x28')],JSON['parse'](_0x2a17d5[_0x3158('0x68')]['formData']))},client9002)['then'](function(){return _0x2a17d5;});}return _0x2a17d5;}return null;})[_0x3158('0x20')](respondWithResult(_0x5ee45f,null))[_0x3158('0x2a')](handleError(_0x5ee45f,null));};var interaction_log=require(_0x3158('0x13'))(_0x3158('0x5a'));exports[_0x3158('0x7b')]=function(_0x1abd6b,_0x45211d,_0x1cba8b){var _0x29a322={'agent':{},'channel':_0x3158('0x5c')};if(_0x1abd6b[_0x3158('0x58')]['id']){delete _0x1abd6b['body']['id'];}_0x1abd6b[_0x3158('0x58')][_0x3158('0x60')]=_0x1abd6b[_0x3158('0x58')][_0x3158('0x60')]||_0x1abd6b[_0x3158('0x61')]['id'];_0x29a322[_0x3158('0x62')]['id']=_0x1abd6b[_0x3158('0x58')]['UserId'];return db[_0x3158('0x51')]['find']({'where':{'id':_0x1abd6b['params']['id'],'UserId':null}})['then'](handleEntityNotFound(_0x45211d,null))[_0x3158('0x20')](function(_0x11134d){if(_0x11134d){_0x29a322['message']=_0x11134d['get']({'plain':!![]});return db[_0x3158('0x64')][_0x3158('0x56')]({'where':{'id':_0x11134d[_0x3158('0x65')]}});}return null;})[_0x3158('0x20')](handleEntityNotFound(_0x45211d,null))['then'](function(_0x57f851){if(_0x57f851){_0x29a322[_0x3158('0x68')]=_0x57f851[_0x3158('0x63')]({'plain':!![]});interaction_log[_0x3158('0x21')](_0x3158('0x7c'),_0x1abd6b[_0x3158('0x61')]['id'],_0x1abd6b[_0x3158('0x61')][_0x3158('0x39')],_0x1abd6b['user'][_0x3158('0x6a')],_0x29a322[_0x3158('0x68')]['id'],_0x1abd6b['body']?JSON[_0x3158('0x6b')](_0x1abd6b[_0x3158('0x58')]):_0x3158('0x7d'));return respondWithRpcPromise(_0x3158('0x7e'),_0x3158('0x7f'),_0x29a322);}return null;})[_0x3158('0x20')](function(_0x46bf4f){var _0x8812b3=_0x3158('0x6e')+_0x46bf4f[_0x3158('0x28')][_0x3158('0x80')];return db[_0x3158('0x6f')][_0x3158('0x40')](_0x8812b3,{'type':db[_0x3158('0x70')][_0x3158('0x71')]['SELECT'],'raw':!![]})[_0x3158('0x20')](function(_0xfb0695){return _0xfb0695;});})['then'](function(_0x32c180){if(_0x32c180){_0x29a322['message'][_0x3158('0x72')]=_0x32c180[0x0];if(!_0x1abd6b[_0x3158('0x58')]['UserId'])return;return db[_0x3158('0x81')][_0x3158('0x56')]({'where':{'id':_0x1abd6b[_0x3158('0x58')][_0x3158('0x60')],'role':_0x3158('0x62')},'attributes':['id','name',_0x3158('0x82'),_0x3158('0x73'),_0x3158('0x83')],'raw':!![]});}return null;})[_0x3158('0x20')](function(_0x7a56e){if(!_0x7a56e)return null;_0x29a322[_0x3158('0x28')][_0x3158('0x62')]=_0x7a56e;return _0x29a322;})[_0x3158('0x20')](function(_0x3b6fc2){if(_0x3b6fc2){_0x3b6fc2[_0x3158('0x28')]['interface']=util[_0x3158('0x67')]('SIP/%s',_0x1abd6b[_0x3158('0x61')][_0x3158('0x39')]);_0x3b6fc2[_0x3158('0x28')]['channel']=_0x29a322['channel'];_0x3b6fc2['message'][_0x3158('0x78')]=_0x29a322[_0x3158('0x77')];_0x3b6fc2['message'][_0x3158('0x84')]=_0x3158('0x7b');respondWithRpcPromise('EventManager',_0x3158('0x79'),{'event':_0x3158('0x85'),'message':_[_0x3158('0x4d')](_0x29a322[_0x3158('0x28')],JSON[_0x3158('0x86')](_0x29a322[_0x3158('0x68')]['formData']))},client9002);return _0x29a322;}return null;})[_0x3158('0x20')](respondWithResult(_0x45211d,null))[_0x3158('0x2a')](handleError(_0x45211d,null));};
\ No newline at end of file
index c36cc67..94144d4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa816=['hasOwnProperty','hook','events','../../mysqldb','save','update','remove','emit'];(function(_0x32de42,_0xc16852){var _0x1eba0f=function(_0x246d99){while(--_0x246d99){_0x32de42['push'](_0x32de42['shift']());}};_0x1eba0f(++_0xc16852);}(_0xa816,0x17a));var _0x6a81=function(_0x39e283,_0x247e6b){_0x39e283=_0x39e283-0x0;var _0x7de89f=_0xa816[_0x39e283];return _0x7de89f;};'use strict';var EventEmitter=require(_0x6a81('0x0'));var ChatMessage=require(_0x6a81('0x1'))['db']['ChatMessage'];var ChatMessageEvents=new EventEmitter();ChatMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x6a81('0x2'),'afterUpdate':_0x6a81('0x3'),'afterDestroy':_0x6a81('0x4')};function emitEvent(_0x2cc762){return function(_0x5087d1,_0x2ce908,_0x25b962){ChatMessageEvents[_0x6a81('0x5')](_0x2cc762+':'+_0x5087d1['id'],_0x5087d1);ChatMessageEvents[_0x6a81('0x5')](_0x2cc762,_0x5087d1);_0x25b962(null);};}for(var e in events){if(events[_0x6a81('0x6')](e)){var event=events[e];ChatMessage[_0x6a81('0x7')](e,emitEvent(event));}}module['exports']=ChatMessageEvents;
\ No newline at end of file
+var _0x4de3=['remove','emit','hook','exports','events','../../mysqldb','ChatMessage','setMaxListeners','save','update'];(function(_0x50579e,_0x418d31){var _0x567618=function(_0x9dc1ca){while(--_0x9dc1ca){_0x50579e['push'](_0x50579e['shift']());}};_0x567618(++_0x418d31);}(_0x4de3,0x1d0));var _0x34de=function(_0x3ba338,_0xeef784){_0x3ba338=_0x3ba338-0x0;var _0xf3b7ec=_0x4de3[_0x3ba338];return _0xf3b7ec;};'use strict';var EventEmitter=require(_0x34de('0x0'));var ChatMessage=require(_0x34de('0x1'))['db'][_0x34de('0x2')];var ChatMessageEvents=new EventEmitter();ChatMessageEvents[_0x34de('0x3')](0x0);var events={'afterCreate':_0x34de('0x4'),'afterUpdate':_0x34de('0x5'),'afterDestroy':_0x34de('0x6')};function emitEvent(_0x2e2299){return function(_0xb32b2f,_0xfa734d,_0x5eeaee){ChatMessageEvents[_0x34de('0x7')](_0x2e2299+':'+_0xb32b2f['id'],_0xb32b2f);ChatMessageEvents[_0x34de('0x7')](_0x2e2299,_0xb32b2f);_0x5eeaee(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatMessage[_0x34de('0x8')](e,emitEvent(event));}}module[_0x34de('0x9')]=ChatMessageEvents;
\ No newline at end of file
index 2724080..b308ae7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6b38=['../../config/environment','./chatMessage.attributes','exports','fti_chat_messages','body','FULLTEXT','get','direction','out','secret','isNil','UserId','ChatInteraction','ChatInteractionId','update','createdAt','toLowerCase','catch','utf8mb4','utf8mb4_unicode_ci','lodash','util','moment','bluebird','request-promise','path','rimraf'];(function(_0x3710eb,_0x4c8a29){var _0x4106e0=function(_0xa45fc9){while(--_0xa45fc9){_0x3710eb['push'](_0x3710eb['shift']());}};_0x4106e0(++_0x4c8a29);}(_0x6b38,0x65));var _0x86b3=function(_0xa6dc22,_0x1bdca9){_0xa6dc22=_0xa6dc22-0x0;var _0x31eca1=_0x6b38[_0xa6dc22];return _0x31eca1;};'use strict';var _=require(_0x86b3('0x0'));var util=require(_0x86b3('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x86b3('0x2'));var BPromise=require(_0x86b3('0x3'));var rp=require(_0x86b3('0x4'));var fs=require('fs');var path=require(_0x86b3('0x5'));var rimraf=require(_0x86b3('0x6'));var config=require(_0x86b3('0x7'));var attributes=require(_0x86b3('0x8'));module[_0x86b3('0x9')]=function(_0x243be1,_0x337125){return _0x243be1['define']('ChatMessage',attributes,{'tableName':'chat_messages','paranoid':![],'indexes':[{'name':_0x86b3('0xa'),'fields':[_0x86b3('0xb')],'type':_0x86b3('0xc')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x32f261,_0x38342e,_0x911903){var _0x35afb5=_0x243be1['models'];var _0x4abfad=_0x32f261[_0x86b3('0xd')]({'plain':!![]});if(_0x4abfad[_0x86b3('0xe')]['toLowerCase']()==='in'||_0x4abfad[_0x86b3('0xe')]['toLowerCase']()===_0x86b3('0xf')&&!_0x4abfad[_0x86b3('0x10')]&&!_[_0x86b3('0x11')](_0x4abfad[_0x86b3('0x12')])){_0x35afb5[_0x86b3('0x13')]['findOne']({'where':{'id':_0x4abfad[_0x86b3('0x14')]}})['then'](function(_0x514e90){if(_0x514e90){_0x514e90[_0x86b3('0x15')]({'lastMsgAt':_0x4abfad[_0x86b3('0x16')],'lastMsgDirection':_0x4abfad[_0x86b3('0xe')][_0x86b3('0x17')]()});}})[_0x86b3('0x18')](function(_0x11b1da){console['error'](_0x11b1da);});}_0x911903();}},'charset':_0x86b3('0x19'),'collate':_0x86b3('0x1a')});};
\ No newline at end of file
+var _0x9ac5=['createdAt','catch','error','utf8mb4','utf8mb4_unicode_ci','lodash','api','moment','request-promise','path','rimraf','../../config/environment','./chatMessage.attributes','define','ChatMessage','chat_messages','fti_chat_messages','body','FULLTEXT','toLowerCase','direction','secret','isNil','findOne','ChatInteractionId','then','update'];(function(_0x45e224,_0x46be44){var _0x5d7c1a=function(_0x3f2aa7){while(--_0x3f2aa7){_0x45e224['push'](_0x45e224['shift']());}};_0x5d7c1a(++_0x46be44);}(_0x9ac5,0xdd));var _0x59ac=function(_0x473260,_0x1f8cbb){_0x473260=_0x473260-0x0;var _0x1e4f8e=_0x9ac5[_0x473260];return _0x1e4f8e;};'use strict';var _=require(_0x59ac('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x59ac('0x1'));var moment=require(_0x59ac('0x2'));var BPromise=require('bluebird');var rp=require(_0x59ac('0x3'));var fs=require('fs');var path=require(_0x59ac('0x4'));var rimraf=require(_0x59ac('0x5'));var config=require(_0x59ac('0x6'));var attributes=require(_0x59ac('0x7'));module['exports']=function(_0x5ddf93,_0x54dc93){return _0x5ddf93[_0x59ac('0x8')](_0x59ac('0x9'),attributes,{'tableName':_0x59ac('0xa'),'paranoid':![],'indexes':[{'name':_0x59ac('0xb'),'fields':[_0x59ac('0xc')],'type':_0x59ac('0xd')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x5751c5,_0x89f343,_0x3df8da){var _0x59fca4=_0x5ddf93['models'];var _0x18c033=_0x5751c5['get']({'plain':!![]});if(_0x18c033['direction'][_0x59ac('0xe')]()==='in'||_0x18c033[_0x59ac('0xf')][_0x59ac('0xe')]()==='out'&&!_0x18c033[_0x59ac('0x10')]&&!_[_0x59ac('0x11')](_0x18c033['UserId'])){_0x59fca4['ChatInteraction'][_0x59ac('0x12')]({'where':{'id':_0x18c033[_0x59ac('0x13')]}})[_0x59ac('0x14')](function(_0x53b70a){if(_0x53b70a){_0x53b70a[_0x59ac('0x15')]({'lastMsgAt':_0x18c033[_0x59ac('0x16')],'lastMsgDirection':_0x18c033[_0x59ac('0xf')][_0x59ac('0xe')]()});}})[_0x59ac('0x17')](function(_0x1af180){console[_0x59ac('0x18')](_0x1af180);});}_0x3df8da();}},'charset':_0x59ac('0x19'),'collate':_0x59ac('0x1a')});};
\ No newline at end of file
index 2aae441..e364ebb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5d99=['error','message','result','catch','CreateChatMessage','ChatMessage','create','body','options','stringify','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','redis','localhost','socket.io-emitter','./chatMessage.socket','register','then','info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug','ChatMessage,\x20%s,\x20%s,\x20%s'];(function(_0x3f553b,_0x49a9c2){var _0x183c4e=function(_0x873b22){while(--_0x873b22){_0x3f553b['push'](_0x3f553b['shift']());}};_0x183c4e(++_0x49a9c2);}(_0x5d99,0x1b7));var _0x95d9=function(_0x256d6a,_0x2f002f){_0x256d6a=_0x256d6a-0x0;var _0x460058=_0x5d99[_0x256d6a];return _0x460058;};'use strict';var _=require(_0x95d9('0x0'));var util=require(_0x95d9('0x1'));var moment=require(_0x95d9('0x2'));var BPromise=require(_0x95d9('0x3'));var rs=require(_0x95d9('0x4'));var fs=require('fs');var Redis=require(_0x95d9('0x5'));var db=require(_0x95d9('0x6'))['db'];var utils=require(_0x95d9('0x7'));var logger=require(_0x95d9('0x8'))(_0x95d9('0x9'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x95d9('0xa')][_0x95d9('0xb')]({'port':0x232a});config[_0x95d9('0xc')]=_['defaults'](config['redis'],{'host':_0x95d9('0xd'),'port':0x18eb});var socket=require(_0x95d9('0xe'))(new Redis(config['redis']));require(_0x95d9('0xf'))[_0x95d9('0x10')](socket);function respondWithRpcPromise(_0x32ed58,_0x5d5ceb,_0x626bb7){return new BPromise(function(_0x19214c,_0x563ae1){return client['request'](_0x32ed58,_0x626bb7)[_0x95d9('0x11')](function(_0x36d167){logger[_0x95d9('0x12')](_0x95d9('0x13'),_0x5d5ceb,_0x95d9('0x14'));logger[_0x95d9('0x15')](_0x95d9('0x16'),_0x5d5ceb,_0x95d9('0x14'),JSON['stringify'](_0x36d167));if(_0x36d167[_0x95d9('0x17')]){if(_0x36d167[_0x95d9('0x17')]['code']===0x1f4){logger[_0x95d9('0x17')](_0x95d9('0x13'),_0x5d5ceb,_0x36d167[_0x95d9('0x17')][_0x95d9('0x18')]);return _0x563ae1(_0x36d167[_0x95d9('0x17')]['message']);}logger[_0x95d9('0x17')](_0x95d9('0x13'),_0x5d5ceb,_0x36d167[_0x95d9('0x17')]['message']);return _0x19214c(_0x36d167[_0x95d9('0x17')][_0x95d9('0x18')]);}else{logger[_0x95d9('0x12')](_0x95d9('0x13'),_0x5d5ceb,_0x95d9('0x14'));_0x19214c(_0x36d167[_0x95d9('0x19')][_0x95d9('0x18')]);}})[_0x95d9('0x1a')](function(_0x57c94e){logger[_0x95d9('0x17')]('ChatMessage,\x20%s,\x20%s',_0x5d5ceb,_0x57c94e);_0x563ae1(_0x57c94e);});});}exports[_0x95d9('0x1b')]=function(_0x14f4f0){var _0x5e9052=this;return new Promise(function(_0x35aa6c,_0x171791){return db[_0x95d9('0x1c')][_0x95d9('0x1d')](_0x14f4f0[_0x95d9('0x1e')],{'raw':_0x14f4f0['options']?_0x14f4f0[_0x95d9('0x1f')]['raw']===undefined?!![]:![]:!![]})[_0x95d9('0x11')](function(_0x20b81d){logger[_0x95d9('0x12')](_0x95d9('0x1b'),_0x14f4f0);logger[_0x95d9('0x15')]('CreateChatMessage',_0x14f4f0,JSON[_0x95d9('0x20')](_0x20b81d));_0x35aa6c(_0x20b81d);})[_0x95d9('0x1a')](function(_0x36b5bf){logger[_0x95d9('0x17')]('CreateChatMessage',_0x36b5bf[_0x95d9('0x18')],_0x14f4f0);_0x171791(_0x5e9052[_0x95d9('0x17')](0x1f4,_0x36b5bf['message']));});});};
\ No newline at end of file
+var _0x2f66=['../../config/utils','rpc','../../config/environment','client','http','redis','defaults','localhost','request','then','info','ChatMessage,\x20%s,\x20%s','request\x20sent','debug','ChatMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','CreateChatMessage','ChatMessage','options','raw','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x2f66,0x1ea));var _0x62f6=function(_0x44d9e8,_0x2f0bc2){_0x44d9e8=_0x44d9e8-0x0;var _0x64816e=_0x2f66[_0x44d9e8];return _0x64816e;};'use strict';var _=require(_0x62f6('0x0'));var util=require(_0x62f6('0x1'));var moment=require(_0x62f6('0x2'));var BPromise=require(_0x62f6('0x3'));var rs=require(_0x62f6('0x4'));var fs=require('fs');var Redis=require(_0x62f6('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x62f6('0x6'));var logger=require('../../config/logger')(_0x62f6('0x7'));var config=require(_0x62f6('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x62f6('0x9')][_0x62f6('0xa')]({'port':0x232a});config[_0x62f6('0xb')]=_[_0x62f6('0xc')](config[_0x62f6('0xb')],{'host':_0x62f6('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./chatMessage.socket')['register'](socket);function respondWithRpcPromise(_0x135d80,_0x4fda36,_0x23e57c){return new BPromise(function(_0x1181b2,_0x37fbb5){return client[_0x62f6('0xe')](_0x135d80,_0x23e57c)[_0x62f6('0xf')](function(_0x563d0e){logger[_0x62f6('0x10')](_0x62f6('0x11'),_0x4fda36,_0x62f6('0x12'));logger[_0x62f6('0x13')](_0x62f6('0x14'),_0x4fda36,_0x62f6('0x12'),JSON[_0x62f6('0x15')](_0x563d0e));if(_0x563d0e['error']){if(_0x563d0e[_0x62f6('0x16')][_0x62f6('0x17')]===0x1f4){logger[_0x62f6('0x16')](_0x62f6('0x11'),_0x4fda36,_0x563d0e['error'][_0x62f6('0x18')]);return _0x37fbb5(_0x563d0e[_0x62f6('0x16')][_0x62f6('0x18')]);}logger['error'](_0x62f6('0x11'),_0x4fda36,_0x563d0e['error'][_0x62f6('0x18')]);return _0x1181b2(_0x563d0e[_0x62f6('0x16')][_0x62f6('0x18')]);}else{logger[_0x62f6('0x10')](_0x62f6('0x11'),_0x4fda36,_0x62f6('0x12'));_0x1181b2(_0x563d0e[_0x62f6('0x19')][_0x62f6('0x18')]);}})['catch'](function(_0x355575){logger['error']('ChatMessage,\x20%s,\x20%s',_0x4fda36,_0x355575);_0x37fbb5(_0x355575);});});}exports[_0x62f6('0x1a')]=function(_0x275e8d){var _0x30fa8b=this;return new Promise(function(_0x89dd9e,_0x38bff2){return db[_0x62f6('0x1b')]['create'](_0x275e8d['body'],{'raw':_0x275e8d[_0x62f6('0x1c')]?_0x275e8d['options'][_0x62f6('0x1d')]===undefined?!![]:![]:!![]})[_0x62f6('0xf')](function(_0x20d784){logger[_0x62f6('0x10')](_0x62f6('0x1a'),_0x275e8d);logger['debug']('CreateChatMessage',_0x275e8d,JSON[_0x62f6('0x15')](_0x20d784));_0x89dd9e(_0x20d784);})[_0x62f6('0x1e')](function(_0x2369e7){logger['error']('CreateChatMessage',_0x2369e7[_0x62f6('0x18')],_0x275e8d);_0x38bff2(_0x30fa8b['error'](0x1f4,_0x2369e7['message']));});});};
\ No newline at end of file
index a8594e0..4a8c54f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeb0d=['removeListener','register','./chatMessage.events','emit'];(function(_0x41a93b,_0x2fc19d){var _0x220a7e=function(_0x5ecb05){while(--_0x5ecb05){_0x41a93b['push'](_0x41a93b['shift']());}};_0x220a7e(++_0x2fc19d);}(_0xeb0d,0xe2));var _0xdeb0=function(_0x4d9ae7,_0x216573){_0x4d9ae7=_0x4d9ae7-0x0;var _0xc4e2bb=_0xeb0d[_0x4d9ae7];return _0xc4e2bb;};'use strict';var ChatMessageEvents=require(_0xdeb0('0x0'));var events=['save','remove','update'];function createListener(_0x256ce4,_0x430873){return function(_0x538fc2){_0x430873[_0xdeb0('0x1')](_0x256ce4,_0x538fc2);};}function removeListener(_0x36367c,_0xd8dd51){return function(){ChatMessageEvents[_0xdeb0('0x2')](_0x36367c,_0xd8dd51);};}exports[_0xdeb0('0x3')]=function(_0x13d486){for(var _0xc48108=0x0,_0x27ebaa=events['length'];_0xc48108<_0x27ebaa;_0xc48108++){var _0x28a1a4=events[_0xc48108];var _0x16b36b=createListener('chatMessage:'+_0x28a1a4,_0x13d486);ChatMessageEvents['on'](_0x28a1a4,_0x16b36b);}};
\ No newline at end of file
+var _0xc474=['removeListener','register','length','chatMessage:','./chatMessage.events','save','remove','emit'];(function(_0x248011,_0x360f48){var _0x33eaa7=function(_0x17b801){while(--_0x17b801){_0x248011['push'](_0x248011['shift']());}};_0x33eaa7(++_0x360f48);}(_0xc474,0xfc));var _0x4c47=function(_0x413feb,_0x10477f){_0x413feb=_0x413feb-0x0;var _0x40ee88=_0xc474[_0x413feb];return _0x40ee88;};'use strict';var ChatMessageEvents=require(_0x4c47('0x0'));var events=[_0x4c47('0x1'),_0x4c47('0x2'),'update'];function createListener(_0x29e5bf,_0x15bc09){return function(_0x1703cd){_0x15bc09[_0x4c47('0x3')](_0x29e5bf,_0x1703cd);};}function removeListener(_0x2b2443,_0x40b979){return function(){ChatMessageEvents[_0x4c47('0x4')](_0x2b2443,_0x40b979);};}exports[_0x4c47('0x5')]=function(_0x58db78){for(var _0x5aaf0e=0x0,_0x6aeef8=events[_0x4c47('0x6')];_0x5aaf0e<_0x6aeef8;_0x5aaf0e++){var _0x275a64=events[_0x5aaf0e];var _0x35a093=createListener(_0x4c47('0x7')+_0x275a64,_0x58db78);ChatMessageEvents['on'](_0x275a64,_0x35a093);}};
\ No newline at end of file
index b9356f3..a0b00ea 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3c71=['../../components/auth/service','../../components/interaction/service','../../config/environment','./chatMessage.controller','get','isAuthenticated','index','/:id','show','post','tracked','create','put','/:id/accept','accept','delete','destroy','util','path','fs-extra'];(function(_0x47bd60,_0x22f024){var _0x523729=function(_0x9b333a){while(--_0x9b333a){_0x47bd60['push'](_0x47bd60['shift']());}};_0x523729(++_0x22f024);}(_0x3c71,0x165));var _0x13c7=function(_0x399dc3,_0x1916c8){_0x399dc3=_0x399dc3-0x0;var _0x1b0ade=_0x3c71[_0x399dc3];return _0x1b0ade;};'use strict';var multer=require('multer');var util=require(_0x13c7('0x0'));var path=require(_0x13c7('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0x13c7('0x2'));var auth=require(_0x13c7('0x3'));var interaction=require(_0x13c7('0x4'));var config=require(_0x13c7('0x5'));var controller=require(_0x13c7('0x6'));router[_0x13c7('0x7')]('/',auth[_0x13c7('0x8')](),controller[_0x13c7('0x9')]);router[_0x13c7('0x7')]('/describe',auth[_0x13c7('0x8')](),controller['describe']);router['get'](_0x13c7('0xa'),auth['isAuthenticated'](),controller[_0x13c7('0xb')]);router[_0x13c7('0xc')]('/',auth[_0x13c7('0x8')](),interaction[_0x13c7('0xd')]('chat','chatmessage:create'),controller[_0x13c7('0xe')]);router['put']('/:id',controller['update']);router[_0x13c7('0xf')](_0x13c7('0x10'),auth[_0x13c7('0x8')](),controller[_0x13c7('0x11')]);router[_0x13c7('0xf')]('/:id/reject',auth['isAuthenticated'](),controller['reject']);router[_0x13c7('0x12')](_0x13c7('0xa'),auth[_0x13c7('0x8')](),controller[_0x13c7('0x13')]);module['exports']=router;
\ No newline at end of file
+var _0xf775=['create','put','/:id','/:id/accept','accept','reject','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatMessage.controller','get','isAuthenticated','/describe','describe','show','post','tracked','chat','chatmessage:create'];(function(_0x1103c4,_0x562d1d){var _0x1c19ab=function(_0x10e254){while(--_0x10e254){_0x1103c4['push'](_0x1103c4['shift']());}};_0x1c19ab(++_0x562d1d);}(_0xf775,0x1ee));var _0x5f77=function(_0x5db1e8,_0x1e03b2){_0x5db1e8=_0x5db1e8-0x0;var _0x140383=_0xf775[_0x5db1e8];return _0x140383;};'use strict';var multer=require(_0x5f77('0x0'));var util=require('util');var path=require(_0x5f77('0x1'));var timeout=require(_0x5f77('0x2'));var express=require(_0x5f77('0x3'));var router=express[_0x5f77('0x4')]();var fs_extra=require(_0x5f77('0x5'));var auth=require(_0x5f77('0x6'));var interaction=require(_0x5f77('0x7'));var config=require(_0x5f77('0x8'));var controller=require(_0x5f77('0x9'));router[_0x5f77('0xa')]('/',auth[_0x5f77('0xb')](),controller['index']);router['get'](_0x5f77('0xc'),auth[_0x5f77('0xb')](),controller[_0x5f77('0xd')]);router[_0x5f77('0xa')]('/:id',auth[_0x5f77('0xb')](),controller[_0x5f77('0xe')]);router[_0x5f77('0xf')]('/',auth[_0x5f77('0xb')](),interaction[_0x5f77('0x10')](_0x5f77('0x11'),_0x5f77('0x12')),controller[_0x5f77('0x13')]);router[_0x5f77('0x14')](_0x5f77('0x15'),controller['update']);router['put'](_0x5f77('0x16'),auth[_0x5f77('0xb')](),controller[_0x5f77('0x17')]);router[_0x5f77('0x14')]('/:id/reject',auth['isAuthenticated'](),controller[_0x5f77('0x18')]);router['delete'](_0x5f77('0x15'),auth[_0x5f77('0xb')](),controller[_0x5f77('0x19')]);module[_0x5f77('0x1a')]=router;
\ No newline at end of file
index 094e4a5..2a5700c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0b0e=['medium','sequelize','TEXT'];(function(_0x178e48,_0x3c9509){var _0x440d7e=function(_0xc2f8a0){while(--_0xc2f8a0){_0x178e48['push'](_0x178e48['shift']());}};_0x440d7e(++_0x3c9509);}(_0x0b0e,0x187));var _0xe0b0=function(_0x406fbb,_0x1093e5){_0x406fbb=_0x406fbb-0x0;var _0x8e921d=_0x0b0e[_0x406fbb];return _0x8e921d;};'use strict';var Sequelize=require(_0xe0b0('0x0'));module['exports']={'body':{'type':Sequelize[_0xe0b0('0x1')]('medium'),'allowNull':![]},'plainBody':{'type':Sequelize[_0xe0b0('0x1')](_0xe0b0('0x2')),'allowNull':![]}};
\ No newline at end of file
+var _0x5f66=['medium','TEXT','exports'];(function(_0x135bb5,_0x417a28){var _0x4eef70=function(_0x9e29bd){while(--_0x9e29bd){_0x135bb5['push'](_0x135bb5['shift']());}};_0x4eef70(++_0x417a28);}(_0x5f66,0x1a0));var _0x65f6=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0x5f66[_0x2f5ac5];return _0x37c9a8;};'use strict';var Sequelize=require('sequelize');module[_0x65f6('0x0')]={'body':{'type':Sequelize['TEXT'](_0x65f6('0x1')),'allowNull':![]},'plainBody':{'type':Sequelize[_0x65f6('0x2')](_0x65f6('0x1')),'allowNull':![]}};
\ No newline at end of file
index 2569b05..4f01d23 100644 (file)
@@ -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(_0x2763f2,_0x416af8){var _0x3ef471=function(_0x288aa2){while(--_0x288aa2){_0x2763f2['push'](_0x2763f2['shift']());}};_0x3ef471(++_0x416af8);}(_0x7a54,0x106));var _0x47a5=function(_0x24fe80,_0x2dfff4){_0x24fe80=_0x24fe80-0x0;var _0x1cfa9a=_0x7a54[_0x24fe80];return _0x1cfa9a;};'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(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x7a54,0x106));var _0x47a5=function(_0x32a3f2,_0xc81d9){_0x32a3f2=_0x32a3f2-0x0;var _0x2c27b6=_0x7a54[_0x32a3f2];return _0x2c27b6;};'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
index 96f5dca..4ff361b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7fd5=['events','../../mysqldb','ChatOfflineMessage','setMaxListeners','save','update','emit','hasOwnProperty','hook','exports'];(function(_0x5595ab,_0x1ff695){var _0x5402e5=function(_0x242514){while(--_0x242514){_0x5595ab['push'](_0x5595ab['shift']());}};_0x5402e5(++_0x1ff695);}(_0x7fd5,0xa0));var _0x57fd=function(_0x455b35,_0x5d2b5e){_0x455b35=_0x455b35-0x0;var _0x1fc095=_0x7fd5[_0x455b35];return _0x1fc095;};'use strict';var EventEmitter=require(_0x57fd('0x0'));var ChatOfflineMessage=require(_0x57fd('0x1'))['db'][_0x57fd('0x2')];var ChatOfflineMessageEvents=new EventEmitter();ChatOfflineMessageEvents[_0x57fd('0x3')](0x0);var events={'afterCreate':_0x57fd('0x4'),'afterUpdate':_0x57fd('0x5'),'afterDestroy':'remove'};function emitEvent(_0x1c7ceb){return function(_0x312cb8,_0x6572cc,_0x3d08f7){ChatOfflineMessageEvents[_0x57fd('0x6')](_0x1c7ceb+':'+_0x312cb8['id'],_0x312cb8);ChatOfflineMessageEvents[_0x57fd('0x6')](_0x1c7ceb,_0x312cb8);_0x3d08f7(null);};}for(var e in events){if(events[_0x57fd('0x7')](e)){var event=events[e];ChatOfflineMessage[_0x57fd('0x8')](e,emitEvent(event));}}module[_0x57fd('0x9')]=ChatOfflineMessageEvents;
\ No newline at end of file
+var _0xeb24=['events','../../mysqldb','ChatOfflineMessage','setMaxListeners','save','remove','emit','hasOwnProperty','hook'];(function(_0x1c06a4,_0x35340d){var _0x2f19fb=function(_0x5b66cd){while(--_0x5b66cd){_0x1c06a4['push'](_0x1c06a4['shift']());}};_0x2f19fb(++_0x35340d);}(_0xeb24,0xd8));var _0x4eb2=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0xeb24[_0x3ab51d];return _0x29a04e;};'use strict';var EventEmitter=require(_0x4eb2('0x0'));var ChatOfflineMessage=require(_0x4eb2('0x1'))['db'][_0x4eb2('0x2')];var ChatOfflineMessageEvents=new EventEmitter();ChatOfflineMessageEvents[_0x4eb2('0x3')](0x0);var events={'afterCreate':_0x4eb2('0x4'),'afterUpdate':'update','afterDestroy':_0x4eb2('0x5')};function emitEvent(_0x24bb04){return function(_0x59bb67,_0x4d1d51,_0x1938e9){ChatOfflineMessageEvents[_0x4eb2('0x6')](_0x24bb04+':'+_0x59bb67['id'],_0x59bb67);ChatOfflineMessageEvents[_0x4eb2('0x6')](_0x24bb04,_0x59bb67);_0x1938e9(null);};}for(var e in events){if(events[_0x4eb2('0x7')](e)){var event=events[e];ChatOfflineMessage[_0x4eb2('0x8')](e,emitEvent(event));}}module['exports']=ChatOfflineMessageEvents;
\ No newline at end of file
index 1623841..ba40302 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc5da=['./chatOfflineMessage.attributes','exports','define','utf8mb4_unicode_ci'];(function(_0x5bf78a,_0x380699){var _0x457c8e=function(_0x2355e9){while(--_0x2355e9){_0x5bf78a['push'](_0x5bf78a['shift']());}};_0x457c8e(++_0x380699);}(_0xc5da,0x100));var _0xac5d=function(_0x5d9322,_0x11069c){_0x5d9322=_0x5d9322-0x0;var _0x3c616c=_0xc5da[_0x5d9322];return _0x3c616c;};'use strict';var attributes=require(_0xac5d('0x0'));module[_0xac5d('0x1')]=function(_0x3b7468){return _0x3b7468[_0xac5d('0x2')]('ChatOfflineMessage',attributes,{'tableName':'chat_offline_messages','paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0xac5d('0x3')});};
\ No newline at end of file
+var _0x75de=['utf8mb4','utf8mb4_unicode_ci','./chatOfflineMessage.attributes','define','ChatOfflineMessage','chat_offline_messages'];(function(_0x75f869,_0x3690d6){var _0x10af8b=function(_0x22d3ff){while(--_0x22d3ff){_0x75f869['push'](_0x75f869['shift']());}};_0x10af8b(++_0x3690d6);}(_0x75de,0xe6));var _0xe75d=function(_0x13b294,_0x26b5e8){_0x13b294=_0x13b294-0x0;var _0x46c2a4=_0x75de[_0x13b294];return _0x46c2a4;};'use strict';var attributes=require(_0xe75d('0x0'));module['exports']=function(_0x11a0d2){return _0x11a0d2[_0xe75d('0x1')](_0xe75d('0x2'),attributes,{'tableName':_0xe75d('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xe75d('0x4'),'collate':_0xe75d('0x5')});};
\ No newline at end of file
index 88f8508..4e5bda2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3787=['request','then','info','ChatOfflineMessage,\x20%s,\x20%s','debug','ChatOfflineMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','catch','util','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x283864,_0x405a20){var _0x3f7482=function(_0x22cd1b){while(--_0x22cd1b){_0x283864['push'](_0x283864['shift']());}};_0x3f7482(++_0x405a20);}(_0x3787,0xd3));var _0x7378=function(_0x5761b6,_0x417a7b){_0x5761b6=_0x5761b6-0x0;var _0x2ce497=_0x3787[_0x5761b6];return _0x2ce497;};'use strict';var _=require('lodash');var util=require(_0x7378('0x0'));var moment=require('moment');var BPromise=require(_0x7378('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x7378('0x2'));var logger=require(_0x7378('0x3'))(_0x7378('0x4'));var config=require(_0x7378('0x5'));var jayson=require(_0x7378('0x6'));var client=jayson[_0x7378('0x7')][_0x7378('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3ff022,_0x295076,_0x4324c5){return new BPromise(function(_0x33e391,_0x397bf9){return client[_0x7378('0x9')](_0x3ff022,_0x4324c5)[_0x7378('0xa')](function(_0x258b54){logger[_0x7378('0xb')](_0x7378('0xc'),_0x295076,'request\x20sent');logger[_0x7378('0xd')](_0x7378('0xe'),_0x295076,'request\x20sent',JSON[_0x7378('0xf')](_0x258b54));if(_0x258b54[_0x7378('0x10')]){if(_0x258b54[_0x7378('0x10')][_0x7378('0x11')]===0x1f4){logger[_0x7378('0x10')]('ChatOfflineMessage,\x20%s,\x20%s',_0x295076,_0x258b54['error']['message']);return _0x397bf9(_0x258b54[_0x7378('0x10')][_0x7378('0x12')]);}logger['error'](_0x7378('0xc'),_0x295076,_0x258b54[_0x7378('0x10')]['message']);return _0x33e391(_0x258b54[_0x7378('0x10')]['message']);}else{logger[_0x7378('0xb')](_0x7378('0xc'),_0x295076,_0x7378('0x13'));_0x33e391(_0x258b54[_0x7378('0x14')][_0x7378('0x12')]);}})[_0x7378('0x15')](function(_0x582ca4){logger['error'](_0x7378('0xc'),_0x295076,_0x582ca4);_0x397bf9(_0x582ca4);});});}
\ No newline at end of file
+var _0xc651=['http','request','then','info','ChatOfflineMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xc651,0x16a));var _0x1c65=function(_0x49c39b,_0x42d688){_0x49c39b=_0x49c39b-0x0;var _0xf1067f=_0xc651[_0x49c39b];return _0xf1067f;};'use strict';var _=require(_0x1c65('0x0'));var util=require(_0x1c65('0x1'));var moment=require(_0x1c65('0x2'));var BPromise=require(_0x1c65('0x3'));var rs=require(_0x1c65('0x4'));var fs=require('fs');var Redis=require(_0x1c65('0x5'));var db=require(_0x1c65('0x6'))['db'];var utils=require(_0x1c65('0x7'));var logger=require(_0x1c65('0x8'))(_0x1c65('0x9'));var config=require(_0x1c65('0xa'));var jayson=require(_0x1c65('0xb'));var client=jayson[_0x1c65('0xc')][_0x1c65('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x43d02d,_0x192e55,_0x3c8d3d){return new BPromise(function(_0x22b414,_0x106d60){return client[_0x1c65('0xe')](_0x43d02d,_0x3c8d3d)[_0x1c65('0xf')](function(_0x390514){logger[_0x1c65('0x10')](_0x1c65('0x11'),_0x192e55,_0x1c65('0x12'));logger[_0x1c65('0x13')]('ChatOfflineMessage,\x20%s,\x20%s,\x20%s',_0x192e55,_0x1c65('0x12'),JSON[_0x1c65('0x14')](_0x390514));if(_0x390514['error']){if(_0x390514[_0x1c65('0x15')]['code']===0x1f4){logger[_0x1c65('0x15')](_0x1c65('0x11'),_0x192e55,_0x390514[_0x1c65('0x15')][_0x1c65('0x16')]);return _0x106d60(_0x390514['error'][_0x1c65('0x16')]);}logger[_0x1c65('0x15')](_0x1c65('0x11'),_0x192e55,_0x390514[_0x1c65('0x15')]['message']);return _0x22b414(_0x390514[_0x1c65('0x15')][_0x1c65('0x16')]);}else{logger['info'](_0x1c65('0x11'),_0x192e55,_0x1c65('0x12'));_0x22b414(_0x390514[_0x1c65('0x17')][_0x1c65('0x16')]);}})[_0x1c65('0x18')](function(_0x2879b5){logger[_0x1c65('0x15')](_0x1c65('0x11'),_0x192e55,_0x2879b5);_0x106d60(_0x2879b5);});});}
\ No newline at end of file
index 289e2e6..37c237e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x90e1=['/:id','post','put','exports','multer','util','connect-timeout','Router','fs-extra','../../components/auth/service','../../config/environment','./chatOfflineMessage.controller','get','isAuthenticated','describe'];(function(_0x2fd442,_0x2fe25e){var _0x2d7ae7=function(_0x3ce907){while(--_0x3ce907){_0x2fd442['push'](_0x2fd442['shift']());}};_0x2d7ae7(++_0x2fe25e);}(_0x90e1,0x8b));var _0x190e=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0x90e1[_0x42cae2];return _0x5f256f;};'use strict';var multer=require(_0x190e('0x0'));var util=require(_0x190e('0x1'));var path=require('path');var timeout=require(_0x190e('0x2'));var express=require('express');var router=express[_0x190e('0x3')]();var fs_extra=require(_0x190e('0x4'));var auth=require(_0x190e('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x190e('0x6'));var controller=require(_0x190e('0x7'));router[_0x190e('0x8')]('/',auth[_0x190e('0x9')](),controller['index']);router[_0x190e('0x8')]('/describe',auth[_0x190e('0x9')](),controller[_0x190e('0xa')]);router[_0x190e('0x8')](_0x190e('0xb'),auth[_0x190e('0x9')](),controller['show']);router[_0x190e('0xc')]('/',auth[_0x190e('0x9')](),controller['create']);router[_0x190e('0xd')]('/:id',auth[_0x190e('0x9')](),controller['update']);router['delete']('/:id',auth[_0x190e('0x9')](),controller['destroy']);module[_0x190e('0xe')]=router;
\ No newline at end of file
+var _0xbcf0=['describe','post','create','/:id','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./chatOfflineMessage.controller','get','index','/describe','isAuthenticated'];(function(_0x3bf83f,_0x181cac){var _0x22c4a9=function(_0xb3ff0d){while(--_0xb3ff0d){_0x3bf83f['push'](_0x3bf83f['shift']());}};_0x22c4a9(++_0x181cac);}(_0xbcf0,0x71));var _0x0bcf=function(_0x50007c,_0x1cbf11){_0x50007c=_0x50007c-0x0;var _0x5c1ec7=_0xbcf0[_0x50007c];return _0x5c1ec7;};'use strict';var multer=require(_0x0bcf('0x0'));var util=require(_0x0bcf('0x1'));var path=require(_0x0bcf('0x2'));var timeout=require(_0x0bcf('0x3'));var express=require(_0x0bcf('0x4'));var router=express[_0x0bcf('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x0bcf('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x0bcf('0x7'));var controller=require(_0x0bcf('0x8'));router[_0x0bcf('0x9')]('/',auth['isAuthenticated'](),controller[_0x0bcf('0xa')]);router['get'](_0x0bcf('0xb'),auth[_0x0bcf('0xc')](),controller[_0x0bcf('0xd')]);router[_0x0bcf('0x9')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0x0bcf('0xe')]('/',auth[_0x0bcf('0xc')](),controller[_0x0bcf('0xf')]);router['put'](_0x0bcf('0x10'),auth[_0x0bcf('0xc')](),controller[_0x0bcf('0x11')]);router[_0x0bcf('0x12')](_0x0bcf('0x10'),auth['isAuthenticated'](),controller[_0x0bcf('0x13')]);module[_0x0bcf('0x14')]=router;
\ No newline at end of file
index 7279fb7..f4bebcc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2a7e=['INTEGER','sequelize','exports','ENUM','mouseOver','STRING'];(function(_0x12e9af,_0x56a602){var _0x3fbb38=function(_0x41303d){while(--_0x41303d){_0x12e9af['push'](_0x12e9af['shift']());}};_0x3fbb38(++_0x56a602);}(_0x2a7e,0xf7));var _0xe2a7=function(_0x3c35fe,_0x3d6f11){_0x3c35fe=_0x3c35fe-0x0;var _0x546e20=_0x2a7e[_0x3c35fe];return _0x546e20;};'use strict';var Sequelize=require(_0xe2a7('0x0'));module[_0xe2a7('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0xe2a7('0x2')](_0xe2a7('0x3'),'timeout'),'defaultValue':_0xe2a7('0x3')},'selector':{'type':Sequelize[_0xe2a7('0x4')]},'timeout':{'type':Sequelize[_0xe2a7('0x5')]}};
\ No newline at end of file
+var _0x9387=['sequelize','STRING','ENUM','mouseOver','timeout','INTEGER'];(function(_0x29afe3,_0x166eb4){var _0x4ce435=function(_0x476014){while(--_0x476014){_0x29afe3['push'](_0x29afe3['shift']());}};_0x4ce435(++_0x166eb4);}(_0x9387,0xae));var _0x7938=function(_0x2cd054,_0x1e643f){_0x2cd054=_0x2cd054-0x0;var _0x1c5ce5=_0x9387[_0x2cd054];return _0x1c5ce5;};'use strict';var Sequelize=require(_0x7938('0x0'));module['exports']={'name':{'type':Sequelize[_0x7938('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0x7938('0x2')](_0x7938('0x3'),_0x7938('0x4')),'defaultValue':'mouseOver'},'selector':{'type':Sequelize[_0x7938('0x1')]},'timeout':{'type':Sequelize[_0x7938('0x5')]}};
\ No newline at end of file
index 3b1c922..3669a2d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0a9f=['papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','status','end','json','undefined','count','offset','limit','set','Content-Range','apply','save','update','then','destroy','error','stack','name','send','show','rawAttributes','query','keys','filters','model','intersection','fields','attributes','include','merge','options','ChatProactiveAction','find','catch','create','body','params','rimraf','zip-dir','moment','mustache','ejs','fs-extra','squel','jsforce','desk.js','querystring'];(function(_0x9dfc10,_0x19c2d5){var _0x4f938a=function(_0x12b1e5){while(--_0x12b1e5){_0x9dfc10['push'](_0x9dfc10['shift']());}};_0x4f938a(++_0x19c2d5);}(_0x0a9f,0x64));var _0xf0a9=function(_0xde9959,_0x415b88){_0xde9959=_0xde9959-0x0;var _0x24d9d5=_0x0a9f[_0xde9959];return _0x24d9d5;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xf0a9('0x0'));var zipdir=require(_0xf0a9('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xf0a9('0x2'));var BPromise=require('bluebird');var Mustache=require(_0xf0a9('0x3'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xf0a9('0x4'));var fs=require('fs');var fs_extra=require(_0xf0a9('0x5'));var _=require('lodash');var squel=require(_0xf0a9('0x6'));var crypto=require('crypto');var jsforce=require(_0xf0a9('0x7'));var deskjs=require(_0xf0a9('0x8'));var toCsv=require('to-csv');var querystring=require(_0xf0a9('0x9'));var Papa=require(_0xf0a9('0xa'));var Redis=require(_0xf0a9('0xb'));var authService=require('../../components/auth/service');var qs=require(_0xf0a9('0xc'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xf0a9('0xd'));var logger=require(_0xf0a9('0xe'))(_0xf0a9('0xf'));var utils=require(_0xf0a9('0x10'));var config=require('../../config/environment');var licenseUtil=require(_0xf0a9('0x11'));var db=require(_0xf0a9('0x12'))['db'];function respondWithStatusCode(_0x6a469e,_0xde853){_0xde853=_0xde853||0xcc;return function(_0x4c8877){if(_0x4c8877){return _0x6a469e['sendStatus'](_0xde853);}return _0x6a469e[_0xf0a9('0x13')](_0xde853)[_0xf0a9('0x14')]();};}function respondWithResult(_0xe27d7e,_0x24c3c9){_0x24c3c9=_0x24c3c9||0xc8;return function(_0x437a3b){if(_0x437a3b){return _0xe27d7e[_0xf0a9('0x13')](_0x24c3c9)[_0xf0a9('0x15')](_0x437a3b);}};}function respondWithFilteredResult(_0x48cffd,_0x18e6ce){return function(_0x4bb2f2){if(_0x4bb2f2){var _0x373ba8=typeof _0x18e6ce['offset']===_0xf0a9('0x16')&&typeof _0x18e6ce['limit']===_0xf0a9('0x16');var _0x43b7f3=_0x4bb2f2[_0xf0a9('0x17')];var _0xf9f800=_0x373ba8?0x0:_0x18e6ce[_0xf0a9('0x18')];var _0x37ddab=_0x373ba8?_0x4bb2f2[_0xf0a9('0x17')]:_0x18e6ce[_0xf0a9('0x18')]+_0x18e6ce[_0xf0a9('0x19')];var _0x4ecb10;if(_0x37ddab>=_0x43b7f3){_0x37ddab=_0x43b7f3;_0x4ecb10=0xc8;}else{_0x4ecb10=0xce;}_0x48cffd[_0xf0a9('0x13')](_0x4ecb10);return _0x48cffd[_0xf0a9('0x1a')](_0xf0a9('0x1b'),_0xf9f800+'-'+_0x37ddab+'/'+_0x43b7f3)['json'](_0x4bb2f2);}return null;};}function patchUpdates(_0x42e7f3){return function(_0x5c26c1){try{jsonpatch[_0xf0a9('0x1c')](_0x5c26c1,_0x42e7f3,!![]);}catch(_0x2f57e7){return BPromise['reject'](_0x2f57e7);}return _0x5c26c1[_0xf0a9('0x1d')]();};}function saveUpdates(_0x1707c2,_0xad2291){return function(_0x52b3cf){if(_0x52b3cf){return _0x52b3cf[_0xf0a9('0x1e')](_0x1707c2)[_0xf0a9('0x1f')](function(_0x132203){return _0x132203;});}return null;};}function removeEntity(_0x453307,_0x3f1013){return function(_0x41c958){if(_0x41c958){return _0x41c958[_0xf0a9('0x20')]()['then'](function(){_0x453307['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3f39a3,_0x23ed63){return function(_0x1064cf){if(!_0x1064cf){_0x3f39a3['sendStatus'](0x194);}return _0x1064cf;};}function handleError(_0x3b1377,_0x12133f){_0x12133f=_0x12133f||0x1f4;return function(_0x1d93d2){logger[_0xf0a9('0x21')](_0x1d93d2[_0xf0a9('0x22')]);if(_0x1d93d2[_0xf0a9('0x23')]){delete _0x1d93d2['name'];}_0x3b1377[_0xf0a9('0x13')](_0x12133f)[_0xf0a9('0x24')](_0x1d93d2);};}exports[_0xf0a9('0x25')]=function(_0x1f24a2,_0x153a4e){var _0x4834e0={'raw':!![],'where':{'id':_0x1f24a2['params']['id']}},_0x1c2fef={};_0x1c2fef['model']=_['keys'](db['ChatProactiveAction'][_0xf0a9('0x26')]);_0x1c2fef[_0xf0a9('0x27')]=_[_0xf0a9('0x28')](_0x1f24a2['query']);_0x1c2fef[_0xf0a9('0x29')]=_['intersection'](_0x1c2fef[_0xf0a9('0x2a')],_0x1c2fef[_0xf0a9('0x27')]);_0x4834e0['attributes']=_[_0xf0a9('0x2b')](_0x1c2fef[_0xf0a9('0x2a')],qs[_0xf0a9('0x2c')](_0x1f24a2[_0xf0a9('0x27')][_0xf0a9('0x2c')]));_0x4834e0[_0xf0a9('0x2d')]=_0x4834e0['attributes']['length']?_0x4834e0['attributes']:_0x1c2fef['model'];if(_0x1f24a2[_0xf0a9('0x27')]['includeAll']){_0x4834e0[_0xf0a9('0x2e')]=[{'all':!![]}];}_0x4834e0=_[_0xf0a9('0x2f')]({},_0x4834e0,_0x1f24a2[_0xf0a9('0x30')]);return db[_0xf0a9('0x31')][_0xf0a9('0x32')](_0x4834e0)['then'](handleEntityNotFound(_0x153a4e,null))[_0xf0a9('0x1f')](respondWithResult(_0x153a4e,null))[_0xf0a9('0x33')](handleError(_0x153a4e,null));};exports[_0xf0a9('0x34')]=function(_0x573d27,_0x19e297){return db['ChatProactiveAction'][_0xf0a9('0x34')](_0x573d27[_0xf0a9('0x35')],{})[_0xf0a9('0x1f')](respondWithResult(_0x19e297,0xc9))[_0xf0a9('0x33')](handleError(_0x19e297,null));};exports[_0xf0a9('0x1e')]=function(_0x12e4ba,_0x538ebe){if(_0x12e4ba[_0xf0a9('0x35')]['id']){delete _0x12e4ba['body']['id'];}return db[_0xf0a9('0x31')][_0xf0a9('0x32')]({'where':{'id':_0x12e4ba[_0xf0a9('0x36')]['id']}})[_0xf0a9('0x1f')](handleEntityNotFound(_0x538ebe,null))[_0xf0a9('0x1f')](saveUpdates(_0x12e4ba[_0xf0a9('0x35')],null))[_0xf0a9('0x1f')](respondWithResult(_0x538ebe,null))[_0xf0a9('0x33')](handleError(_0x538ebe,null));};exports['destroy']=function(_0x5826c2,_0x42c072){return db['ChatProactiveAction'][_0xf0a9('0x32')]({'where':{'id':_0x5826c2[_0xf0a9('0x36')]['id']}})[_0xf0a9('0x1f')](handleEntityNotFound(_0x42c072,null))['then'](removeEntity(_0x42c072,null))[_0xf0a9('0x33')](handleError(_0x42c072,null));};
\ No newline at end of file
+var _0xe7de=['../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','reject','save','update','then','destroy','error','stack','name','show','params','model','ChatProactiveAction','rawAttributes','query','keys','intersection','attributes','fields','length','includeAll','include','catch','create','body','find','eml-format','rimraf','zip-dir','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service'];(function(_0x7c9f82,_0x987708){var _0x1a72ac=function(_0x246d59){while(--_0x246d59){_0x7c9f82['push'](_0x7c9f82['shift']());}};_0x1a72ac(++_0x987708);}(_0xe7de,0x165));var _0xee7d=function(_0x37dbb5,_0x90a90c){_0x37dbb5=_0x37dbb5-0x0;var _0x1b9829=_0xe7de[_0x37dbb5];return _0x1b9829;};'use strict';var emlformat=require(_0xee7d('0x0'));var rimraf=require(_0xee7d('0x1'));var zipdir=require(_0xee7d('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xee7d('0x3'));var BPromise=require(_0xee7d('0x4'));var Mustache=require(_0xee7d('0x5'));var util=require(_0xee7d('0x6'));var path=require(_0xee7d('0x7'));var sox=require(_0xee7d('0x8'));var csv=require(_0xee7d('0x9'));var ejs=require(_0xee7d('0xa'));var fs=require('fs');var fs_extra=require(_0xee7d('0xb'));var _=require(_0xee7d('0xc'));var squel=require(_0xee7d('0xd'));var crypto=require(_0xee7d('0xe'));var jsforce=require(_0xee7d('0xf'));var deskjs=require(_0xee7d('0x10'));var toCsv=require('to-csv');var querystring=require(_0xee7d('0x11'));var Papa=require(_0xee7d('0x12'));var Redis=require(_0xee7d('0x13'));var authService=require(_0xee7d('0x14'));var qs=require(_0xee7d('0x15'));var as=require(_0xee7d('0x16'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xee7d('0x17'))('api');var utils=require(_0xee7d('0x18'));var config=require(_0xee7d('0x19'));var licenseUtil=require(_0xee7d('0x1a'));var db=require(_0xee7d('0x1b'))['db'];function respondWithStatusCode(_0xdfb04b,_0xb4c933){_0xb4c933=_0xb4c933||0xcc;return function(_0x3e9daa){if(_0x3e9daa){return _0xdfb04b[_0xee7d('0x1c')](_0xb4c933);}return _0xdfb04b[_0xee7d('0x1d')](_0xb4c933)[_0xee7d('0x1e')]();};}function respondWithResult(_0x41ca24,_0x47eb16){_0x47eb16=_0x47eb16||0xc8;return function(_0x4bfdab){if(_0x4bfdab){return _0x41ca24[_0xee7d('0x1d')](_0x47eb16)[_0xee7d('0x1f')](_0x4bfdab);}};}function respondWithFilteredResult(_0x4ab8a6,_0x1211a1){return function(_0x1a2976){if(_0x1a2976){var _0x1dc47c=typeof _0x1211a1['offset']===_0xee7d('0x20')&&typeof _0x1211a1[_0xee7d('0x21')]===_0xee7d('0x20');var _0x62d1ec=_0x1a2976[_0xee7d('0x22')];var _0x25f3e0=_0x1dc47c?0x0:_0x1211a1['offset'];var _0x152dd6=_0x1dc47c?_0x1a2976[_0xee7d('0x22')]:_0x1211a1[_0xee7d('0x23')]+_0x1211a1['limit'];var _0x277738;if(_0x152dd6>=_0x62d1ec){_0x152dd6=_0x62d1ec;_0x277738=0xc8;}else{_0x277738=0xce;}_0x4ab8a6['status'](_0x277738);return _0x4ab8a6[_0xee7d('0x24')](_0xee7d('0x25'),_0x25f3e0+'-'+_0x152dd6+'/'+_0x62d1ec)[_0xee7d('0x1f')](_0x1a2976);}return null;};}function patchUpdates(_0x4f6445){return function(_0x113a05){try{jsonpatch['apply'](_0x113a05,_0x4f6445,!![]);}catch(_0x20aeaa){return BPromise[_0xee7d('0x26')](_0x20aeaa);}return _0x113a05[_0xee7d('0x27')]();};}function saveUpdates(_0xed4f9f,_0x52eaf4){return function(_0x32ad6e){if(_0x32ad6e){return _0x32ad6e[_0xee7d('0x28')](_0xed4f9f)[_0xee7d('0x29')](function(_0x136a7b){return _0x136a7b;});}return null;};}function removeEntity(_0x33613a,_0x4d0efb){return function(_0x172850){if(_0x172850){return _0x172850[_0xee7d('0x2a')]()[_0xee7d('0x29')](function(){_0x33613a['status'](0xcc)[_0xee7d('0x1e')]();});}};}function handleEntityNotFound(_0x293382,_0x379de9){return function(_0x576d56){if(!_0x576d56){_0x293382[_0xee7d('0x1c')](0x194);}return _0x576d56;};}function handleError(_0x38e6a6,_0x4532cb){_0x4532cb=_0x4532cb||0x1f4;return function(_0x2b9482){logger[_0xee7d('0x2b')](_0x2b9482[_0xee7d('0x2c')]);if(_0x2b9482[_0xee7d('0x2d')]){delete _0x2b9482[_0xee7d('0x2d')];}_0x38e6a6[_0xee7d('0x1d')](_0x4532cb)['send'](_0x2b9482);};}exports[_0xee7d('0x2e')]=function(_0x4e1bf5,_0x5ca947){var _0x2a5b06={'raw':!![],'where':{'id':_0x4e1bf5[_0xee7d('0x2f')]['id']}},_0x4d4ff0={};_0x4d4ff0[_0xee7d('0x30')]=_['keys'](db[_0xee7d('0x31')][_0xee7d('0x32')]);_0x4d4ff0[_0xee7d('0x33')]=_[_0xee7d('0x34')](_0x4e1bf5[_0xee7d('0x33')]);_0x4d4ff0['filters']=_[_0xee7d('0x35')](_0x4d4ff0[_0xee7d('0x30')],_0x4d4ff0[_0xee7d('0x33')]);_0x2a5b06[_0xee7d('0x36')]=_[_0xee7d('0x35')](_0x4d4ff0[_0xee7d('0x30')],qs[_0xee7d('0x37')](_0x4e1bf5[_0xee7d('0x33')]['fields']));_0x2a5b06[_0xee7d('0x36')]=_0x2a5b06[_0xee7d('0x36')][_0xee7d('0x38')]?_0x2a5b06['attributes']:_0x4d4ff0[_0xee7d('0x30')];if(_0x4e1bf5['query'][_0xee7d('0x39')]){_0x2a5b06[_0xee7d('0x3a')]=[{'all':!![]}];}_0x2a5b06=_['merge']({},_0x2a5b06,_0x4e1bf5['options']);return db[_0xee7d('0x31')]['find'](_0x2a5b06)[_0xee7d('0x29')](handleEntityNotFound(_0x5ca947,null))[_0xee7d('0x29')](respondWithResult(_0x5ca947,null))[_0xee7d('0x3b')](handleError(_0x5ca947,null));};exports[_0xee7d('0x3c')]=function(_0x140e4a,_0x53de17){return db['ChatProactiveAction'][_0xee7d('0x3c')](_0x140e4a['body'],{})[_0xee7d('0x29')](respondWithResult(_0x53de17,0xc9))[_0xee7d('0x3b')](handleError(_0x53de17,null));};exports[_0xee7d('0x28')]=function(_0x1decf2,_0xf7ed45){if(_0x1decf2[_0xee7d('0x3d')]['id']){delete _0x1decf2[_0xee7d('0x3d')]['id'];}return db[_0xee7d('0x31')][_0xee7d('0x3e')]({'where':{'id':_0x1decf2[_0xee7d('0x2f')]['id']}})[_0xee7d('0x29')](handleEntityNotFound(_0xf7ed45,null))[_0xee7d('0x29')](saveUpdates(_0x1decf2['body'],null))[_0xee7d('0x29')](respondWithResult(_0xf7ed45,null))['catch'](handleError(_0xf7ed45,null));};exports[_0xee7d('0x2a')]=function(_0x4a6a5f,_0x13f7d2){return db['ChatProactiveAction'][_0xee7d('0x3e')]({'where':{'id':_0x4a6a5f[_0xee7d('0x2f')]['id']}})[_0xee7d('0x29')](handleEntityNotFound(_0x13f7d2,null))['then'](removeEntity(_0x13f7d2,null))[_0xee7d('0x3b')](handleError(_0x13f7d2,null));};
\ No newline at end of file
index e24bb74..c21c4b8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8eac=['../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./chatProactiveAction.attributes','exports','define','ChatProactiveAction','chat_proactive_actions','lodash','util'];(function(_0x4e676e,_0x2a7c6d){var _0x336a3c=function(_0x4767c4){while(--_0x4767c4){_0x4e676e['push'](_0x4e676e['shift']());}};_0x336a3c(++_0x2a7c6d);}(_0x8eac,0x1cc));var _0xc8ea=function(_0x15f8ad,_0x5275c3){_0x15f8ad=_0x15f8ad-0x0;var _0xc0238a=_0x8eac[_0x15f8ad];return _0xc0238a;};'use strict';var _=require(_0xc8ea('0x0'));var util=require(_0xc8ea('0x1'));var logger=require(_0xc8ea('0x2'))(_0xc8ea('0x3'));var moment=require('moment');var BPromise=require(_0xc8ea('0x4'));var rp=require(_0xc8ea('0x5'));var fs=require('fs');var path=require(_0xc8ea('0x6'));var rimraf=require(_0xc8ea('0x7'));var config=require(_0xc8ea('0x8'));var attributes=require(_0xc8ea('0x9'));module[_0xc8ea('0xa')]=function(_0x48691f,_0x4e4fe0){return _0x48691f[_0xc8ea('0xb')](_0xc8ea('0xc'),attributes,{'tableName':_0xc8ea('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xcd4f=['define','ChatProactiveAction','chat_proactive_actions','lodash','moment','bluebird','request-promise','rimraf','../../config/environment','./chatProactiveAction.attributes','exports'];(function(_0x44e322,_0x17d909){var _0x486a1a=function(_0x35ea09){while(--_0x35ea09){_0x44e322['push'](_0x44e322['shift']());}};_0x486a1a(++_0x17d909);}(_0xcd4f,0x9d));var _0xfcd4=function(_0x282b6d,_0x22a326){_0x282b6d=_0x282b6d-0x0;var _0x4a797e=_0xcd4f[_0x282b6d];return _0x4a797e;};'use strict';var _=require(_0xfcd4('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0xfcd4('0x1'));var BPromise=require(_0xfcd4('0x2'));var rp=require(_0xfcd4('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xfcd4('0x4'));var config=require(_0xfcd4('0x5'));var attributes=require(_0xfcd4('0x6'));module[_0xfcd4('0x7')]=function(_0x44ca6e,_0x378cac){return _0x44ca6e[_0xfcd4('0x8')](_0xfcd4('0x9'),attributes,{'tableName':_0xfcd4('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 785888e..33befa2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1be9=['debug','code','error','message','ChatProactiveAction,\x20%s,\x20%s','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','then','info','request\x20sent'];(function(_0x1f5f63,_0x14ace2){var _0xab31fa=function(_0x4a067b){while(--_0x4a067b){_0x1f5f63['push'](_0x1f5f63['shift']());}};_0xab31fa(++_0x14ace2);}(_0x1be9,0xa1));var _0x91be=function(_0x4c12ec,_0x2e9103){_0x4c12ec=_0x4c12ec-0x0;var _0x3ae42c=_0x1be9[_0x4c12ec];return _0x3ae42c;};'use strict';var _=require(_0x91be('0x0'));var util=require(_0x91be('0x1'));var moment=require(_0x91be('0x2'));var BPromise=require(_0x91be('0x3'));var rs=require(_0x91be('0x4'));var fs=require('fs');var Redis=require(_0x91be('0x5'));var db=require(_0x91be('0x6'))['db'];var utils=require(_0x91be('0x7'));var logger=require(_0x91be('0x8'))('rpc');var config=require(_0x91be('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x91be('0xa')][_0x91be('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x18d3ab,_0x120de1,_0x4ade76){return new BPromise(function(_0x3f67ca,_0x5308e8){return client['request'](_0x18d3ab,_0x4ade76)[_0x91be('0xc')](function(_0x464cc4){logger[_0x91be('0xd')]('ChatProactiveAction,\x20%s,\x20%s',_0x120de1,_0x91be('0xe'));logger[_0x91be('0xf')]('ChatProactiveAction,\x20%s,\x20%s,\x20%s',_0x120de1,'request\x20sent',JSON['stringify'](_0x464cc4));if(_0x464cc4['error']){if(_0x464cc4['error'][_0x91be('0x10')]===0x1f4){logger[_0x91be('0x11')]('ChatProactiveAction,\x20%s,\x20%s',_0x120de1,_0x464cc4[_0x91be('0x11')][_0x91be('0x12')]);return _0x5308e8(_0x464cc4[_0x91be('0x11')][_0x91be('0x12')]);}logger[_0x91be('0x11')](_0x91be('0x13'),_0x120de1,_0x464cc4[_0x91be('0x11')]['message']);return _0x3f67ca(_0x464cc4['error'][_0x91be('0x12')]);}else{logger[_0x91be('0xd')](_0x91be('0x13'),_0x120de1,'request\x20sent');_0x3f67ca(_0x464cc4[_0x91be('0x14')][_0x91be('0x12')]);}})[_0x91be('0x15')](function(_0x1d2592){logger['error'](_0x91be('0x13'),_0x120de1,_0x1d2592);_0x5308e8(_0x1d2592);});});}
\ No newline at end of file
+var _0x9ac9=['util','moment','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','then','info','ChatProactiveAction,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','lodash'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x9ac9,0x18b));var _0x99ac=function(_0x28b321,_0x528c3d){_0x28b321=_0x28b321-0x0;var _0x4de923=_0x9ac9[_0x28b321];return _0x4de923;};'use strict';var _=require(_0x99ac('0x0'));var util=require(_0x99ac('0x1'));var moment=require(_0x99ac('0x2'));var BPromise=require('bluebird');var rs=require(_0x99ac('0x3'));var fs=require('fs');var Redis=require(_0x99ac('0x4'));var db=require(_0x99ac('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x99ac('0x6'));var config=require(_0x99ac('0x7'));var jayson=require(_0x99ac('0x8'));var client=jayson[_0x99ac('0x9')][_0x99ac('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1776ca,_0x58f8a9,_0x3a0059){return new BPromise(function(_0x2c9ba9,_0x557982){return client['request'](_0x1776ca,_0x3a0059)[_0x99ac('0xb')](function(_0x426c76){logger[_0x99ac('0xc')](_0x99ac('0xd'),_0x58f8a9,_0x99ac('0xe'));logger[_0x99ac('0xf')]('ChatProactiveAction,\x20%s,\x20%s,\x20%s',_0x58f8a9,_0x99ac('0xe'),JSON[_0x99ac('0x10')](_0x426c76));if(_0x426c76['error']){if(_0x426c76[_0x99ac('0x11')][_0x99ac('0x12')]===0x1f4){logger[_0x99ac('0x11')](_0x99ac('0xd'),_0x58f8a9,_0x426c76[_0x99ac('0x11')][_0x99ac('0x13')]);return _0x557982(_0x426c76[_0x99ac('0x11')]['message']);}logger[_0x99ac('0x11')](_0x99ac('0xd'),_0x58f8a9,_0x426c76[_0x99ac('0x11')][_0x99ac('0x13')]);return _0x2c9ba9(_0x426c76[_0x99ac('0x11')][_0x99ac('0x13')]);}else{logger[_0x99ac('0xc')]('ChatProactiveAction,\x20%s,\x20%s',_0x58f8a9,'request\x20sent');_0x2c9ba9(_0x426c76[_0x99ac('0x14')]['message']);}})[_0x99ac('0x15')](function(_0x485257){logger['error']('ChatProactiveAction,\x20%s,\x20%s',_0x58f8a9,_0x485257);_0x557982(_0x485257);});});}
\ No newline at end of file
index df31e8f..7e855d0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x46ed=['multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./chatProactiveAction.controller','get','/:id','isAuthenticated','show','post','create','put','delete','destroy','exports'];(function(_0x14d042,_0x19eaea){var _0x28f422=function(_0x351c7c){while(--_0x351c7c){_0x14d042['push'](_0x14d042['shift']());}};_0x28f422(++_0x19eaea);}(_0x46ed,0x168));var _0xd46e=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0x46ed[_0x57b54c];return _0x59cc19;};'use strict';var multer=require(_0xd46e('0x0'));var util=require(_0xd46e('0x1'));var path=require('path');var timeout=require(_0xd46e('0x2'));var express=require(_0xd46e('0x3'));var router=express[_0xd46e('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xd46e('0x5'));var interaction=require(_0xd46e('0x6'));var config=require('../../config/environment');var controller=require(_0xd46e('0x7'));router[_0xd46e('0x8')](_0xd46e('0x9'),auth[_0xd46e('0xa')](),controller[_0xd46e('0xb')]);router[_0xd46e('0xc')]('/',auth[_0xd46e('0xa')](),controller[_0xd46e('0xd')]);router[_0xd46e('0xe')](_0xd46e('0x9'),auth[_0xd46e('0xa')](),controller['update']);router[_0xd46e('0xf')](_0xd46e('0x9'),auth['isAuthenticated'](),controller[_0xd46e('0x10')]);module[_0xd46e('0x11')]=router;
\ No newline at end of file
+var _0xb4c7=['update','delete','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./chatProactiveAction.controller','/:id','isAuthenticated','show','create'];(function(_0x2d364e,_0x301c5e){var _0x1b9312=function(_0x1b05bb){while(--_0x1b05bb){_0x2d364e['push'](_0x2d364e['shift']());}};_0x1b9312(++_0x301c5e);}(_0xb4c7,0x1ea));var _0x7b4c=function(_0x426572,_0x350da0){_0x426572=_0x426572-0x0;var _0x1d8ece=_0xb4c7[_0x426572];return _0x1d8ece;};'use strict';var multer=require(_0x7b4c('0x0'));var util=require(_0x7b4c('0x1'));var path=require(_0x7b4c('0x2'));var timeout=require(_0x7b4c('0x3'));var express=require(_0x7b4c('0x4'));var router=express['Router']();var fs_extra=require(_0x7b4c('0x5'));var auth=require(_0x7b4c('0x6'));var interaction=require(_0x7b4c('0x7'));var config=require(_0x7b4c('0x8'));var controller=require(_0x7b4c('0x9'));router['get'](_0x7b4c('0xa'),auth[_0x7b4c('0xb')](),controller[_0x7b4c('0xc')]);router['post']('/',auth[_0x7b4c('0xb')](),controller[_0x7b4c('0xd')]);router['put'](_0x7b4c('0xa'),auth[_0x7b4c('0xb')](),controller[_0x7b4c('0xe')]);router[_0x7b4c('0xf')](_0x7b4c('0xa'),auth[_0x7b4c('0xb')](),controller[_0x7b4c('0x10')]);module[_0x7b4c('0x11')]=router;
\ No newline at end of file
index 7966310..240921c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x81e5=['name','ENUM','rrmemory','beepall','roundrobin','STRING'];(function(_0x4bdddd,_0x1a8526){var _0x35f76c=function(_0x389f2a){while(--_0x389f2a){_0x4bdddd['push'](_0x4bdddd['shift']());}};_0x35f76c(++_0x1a8526);}(_0x81e5,0x1f1));var _0x581e=function(_0x4cda62,_0x2e4792){_0x4cda62=_0x4cda62-0x0;var _0x26a668=_0x81e5[_0x4cda62];return _0x26a668;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x581e('0x0')],'unique':_0x581e('0x1'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x581e('0x2')](_0x581e('0x3'),_0x581e('0x4'),_0x581e('0x5'))}};
\ No newline at end of file
+var _0x02c4=['STRING','name','INTEGER','ENUM','beepall','roundrobin','sequelize','exports'];(function(_0x5d2e60,_0xa8a270){var _0xc02ae8=function(_0x22817b){while(--_0x22817b){_0x5d2e60['push'](_0x5d2e60['shift']());}};_0xc02ae8(++_0xa8a270);}(_0x02c4,0xf6));var _0x402c=function(_0x2aa68a,_0x413c7d){_0x2aa68a=_0x2aa68a-0x0;var _0xc11d64=_0x02c4[_0x2aa68a];return _0xc11d64;};'use strict';var Sequelize=require(_0x402c('0x0'));module[_0x402c('0x1')]={'name':{'type':Sequelize[_0x402c('0x2')],'unique':_0x402c('0x3'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x402c('0x2')]},'timeout':{'type':Sequelize[_0x402c('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x402c('0x5')]('rrmemory',_0x402c('0x6'),_0x402c('0x7'))}};
\ No newline at end of file
index 6664fa4..b147e10 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x046a=['every','TeamId','includes','all','compact','value','isEmpty','forEach','emit','userChatQueue:remove','addAgents','spread','removeAgents','getAgents','bluebird','util','lodash','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','socket.io-emitter','./chatQueue.socket','register','status','limit','undefined','count','offset','set','Content-Range','json','update','then','destroy','get','ChatQueues','UserProfileResource','end','error','name','index','ChatQueue','rawAttributes','fieldName','type','key','getOptions','where','include','query','rows','catch','show','params','model','keys','filters','intersection','attributes','length','includeAll','merge','options','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','getMembers','UserChatQueue','fields','hasOwnProperty','order','sort','pick','filter','map','User','findAndCountAll','UserId','agent','chatPause','updatedAt','%s/%s','createdAt','getTeams','findOne','Team','nolimit','addTeams','Agents','online','voicePause','interface','sequelize','transaction','userChatQueue:save','removeTeams','findAll','ids','select','field','from','team_has_chat_queues','ut.TeamId\x20=\x20tq.TeamId','clone','ut.UserId\x20=\x20?','push','QueryTypes','SELECT'];(function(_0x2eb30f,_0x1b8d1d){var _0x27873c=function(_0x18a46d){while(--_0x18a46d){_0x2eb30f['push'](_0x2eb30f['shift']());}};_0x27873c(++_0x1b8d1d);}(_0x046a,0xfe));var _0xa046=function(_0x484e36,_0x4482d8){_0x484e36=_0x484e36-0x0;var _0xafc85d=_0x046a[_0x484e36];return _0xafc85d;};'use strict';var BPromise=require(_0xa046('0x0'));var util=require(_0xa046('0x1'));var _=require(_0xa046('0x2'));var squel=require('squel');var Redis=require(_0xa046('0x3'));var qs=require(_0xa046('0x4'));var logger=require(_0xa046('0x5'))(_0xa046('0x6'));var config=require(_0xa046('0x7'));var db=require(_0xa046('0x8'))['db'];config[_0xa046('0x9')]=_[_0xa046('0xa')](config[_0xa046('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0xa046('0xb'))(new Redis(config[_0xa046('0x9')]));require(_0xa046('0xc'))[_0xa046('0xd')](socket);function respondWithStatusCode(_0x38d05f,_0x5a10ff){_0x5a10ff=_0x5a10ff||0xcc;return function(_0x4f486f){if(_0x4f486f){return _0x38d05f['sendStatus'](_0x5a10ff);}return _0x38d05f[_0xa046('0xe')](_0x5a10ff)['end']();};}function respondWithResult(_0x352f5e,_0x3c9db0){_0x3c9db0=_0x3c9db0||0xc8;return function(_0x3fc0e9){if(_0x3fc0e9){return _0x352f5e[_0xa046('0xe')](_0x3c9db0)['json'](_0x3fc0e9);}};}function respondWithFilteredResult(_0x28037f,_0x18b441){return function(_0x4697bc){if(_0x4697bc){var _0x1600fc=typeof _0x18b441['offset']==='undefined'&&typeof _0x18b441[_0xa046('0xf')]===_0xa046('0x10');var _0x5c0d14=_0x4697bc['count'];var _0x2fc4a6=_0x1600fc?0x0:_0x18b441['offset'];var _0x154ed0=_0x1600fc?_0x4697bc[_0xa046('0x11')]:_0x18b441[_0xa046('0x12')]+_0x18b441[_0xa046('0xf')];var _0x1bb694;if(_0x154ed0>=_0x5c0d14){_0x154ed0=_0x5c0d14;_0x1bb694=0xc8;}else{_0x1bb694=0xce;}_0x28037f[_0xa046('0xe')](_0x1bb694);return _0x28037f[_0xa046('0x13')](_0xa046('0x14'),_0x2fc4a6+'-'+_0x154ed0+'/'+_0x5c0d14)[_0xa046('0x15')](_0x4697bc);}return null;};}function saveUpdates(_0x57e898){return function(_0x25241d){if(_0x25241d){return _0x25241d[_0xa046('0x16')](_0x57e898)[_0xa046('0x17')](function(_0x347a80){return _0x347a80;});}return null;};}function removeEntity(_0x20cd98){return function(_0x8983af){if(_0x8983af){return _0x8983af[_0xa046('0x18')]()[_0xa046('0x17')](function(){var _0x35c57b=_0x8983af[_0xa046('0x19')]({'plain':!![]});var _0x5d2831=_0xa046('0x1a');return db[_0xa046('0x1b')][_0xa046('0x18')]({'where':{'type':_0x5d2831,'resourceId':_0x35c57b['id']}})[_0xa046('0x17')](function(){return _0x8983af;});})[_0xa046('0x17')](function(){_0x20cd98[_0xa046('0xe')](0xcc)[_0xa046('0x1c')]();});}};}function handleEntityNotFound(_0x21e13c){return function(_0x62819f){if(!_0x62819f){_0x21e13c['sendStatus'](0x194);}return _0x62819f;};}function handleError(_0x516f27,_0x17d99d){_0x17d99d=_0x17d99d||0x1f4;return function(_0x189534){logger[_0xa046('0x1d')](_0x189534['stack']);if(_0x189534[_0xa046('0x1e')]){delete _0x189534[_0xa046('0x1e')];}_0x516f27[_0xa046('0xe')](_0x17d99d)['send'](_0x189534);};}exports[_0xa046('0x1f')]=function(_0x183ffa,_0x487b26){var _0x29c85c={};var _0x299bcd={'count':0x0,'rows':[]};var _0x1ec6ea=_['map'](db[_0xa046('0x20')][_0xa046('0x21')],function(_0x52eba3){return{'name':_0x52eba3[_0xa046('0x22')],'type':_0x52eba3[_0xa046('0x23')][_0xa046('0x24')]};});_0x29c85c=qs[_0xa046('0x25')](_0x1ec6ea,_0x183ffa);var _0xfdf29f={'where':_0x29c85c[_0xa046('0x26')]};return db[_0xa046('0x20')][_0xa046('0x11')](_0xfdf29f)['then'](function(_0xe01259){_0x299bcd[_0xa046('0x11')]=_0xe01259;_0x29c85c[_0xa046('0x27')]=qs[_0xa046('0x27')](_0x183ffa[_0xa046('0x28')]);return db[_0xa046('0x20')]['findAll'](_0x29c85c);})[_0xa046('0x17')](function(_0x3dcd76){_0x299bcd[_0xa046('0x29')]=_0x3dcd76;return _0x299bcd;})[_0xa046('0x17')](respondWithFilteredResult(_0x487b26,_0x29c85c))[_0xa046('0x2a')](handleError(_0x487b26,null));};exports[_0xa046('0x2b')]=function(_0x378670,_0x2014e4){var _0x4ac7b0={'raw':!![],'where':{'id':_0x378670[_0xa046('0x2c')]['id']}},_0x8f36e7={};_0x8f36e7[_0xa046('0x2d')]=_[_0xa046('0x2e')](db[_0xa046('0x20')][_0xa046('0x21')]);_0x8f36e7['query']=_[_0xa046('0x2e')](_0x378670[_0xa046('0x28')]);_0x8f36e7[_0xa046('0x2f')]=_[_0xa046('0x30')](_0x8f36e7[_0xa046('0x2d')],_0x8f36e7[_0xa046('0x28')]);_0x4ac7b0['attributes']=_[_0xa046('0x30')](_0x8f36e7[_0xa046('0x2d')],qs['fields'](_0x378670[_0xa046('0x28')]['fields']));_0x4ac7b0['attributes']=_0x4ac7b0[_0xa046('0x31')][_0xa046('0x32')]?_0x4ac7b0[_0xa046('0x31')]:_0x8f36e7[_0xa046('0x2d')];if(_0x378670[_0xa046('0x28')][_0xa046('0x33')]){_0x4ac7b0[_0xa046('0x27')]=[{'all':!![]}];}_0x4ac7b0=_[_0xa046('0x34')]({},_0x4ac7b0,_0x378670[_0xa046('0x35')]);return db[_0xa046('0x20')][_0xa046('0x36')](_0x4ac7b0)[_0xa046('0x17')](handleEntityNotFound(_0x2014e4,null))[_0xa046('0x17')](respondWithResult(_0x2014e4,null))['catch'](handleError(_0x2014e4,null));};exports[_0xa046('0x37')]=function(_0x26b3c2,_0x3a7d6f){return db['ChatQueue']['create'](_0x26b3c2['body'],{})[_0xa046('0x17')](function(_0x4ecb09){var _0x101e0=_0x26b3c2[_0xa046('0x38')][_0xa046('0x19')]({'plain':!![]});if(!_0x101e0)throw new Error(_0xa046('0x39'));if(_0x101e0[_0xa046('0x3a')]==='user'){var _0x5f5caa=_0x4ecb09['get']({'plain':!![]});var _0x6bf7a0=_0xa046('0x1a');return db[_0xa046('0x3b')][_0xa046('0x36')]({'where':{'name':_0x6bf7a0,'userProfileId':_0x101e0['userProfileId']},'raw':!![]})[_0xa046('0x17')](function(_0xa4a48){if(_0xa4a48&&_0xa4a48[_0xa046('0x3c')]===0x0){return db[_0xa046('0x1b')][_0xa046('0x37')]({'name':_0x5f5caa[_0xa046('0x1e')],'resourceId':_0x5f5caa['id'],'type':_0xa4a48['name'],'sectionId':_0xa4a48['id']},{})['then'](function(){return _0x4ecb09;});}else{return _0x4ecb09;}})[_0xa046('0x2a')](function(_0x4f52a1){logger[_0xa046('0x1d')](_0xa046('0x3d'),_0x4f52a1);throw _0x4f52a1;});}return _0x4ecb09;})['then'](respondWithResult(_0x3a7d6f,0xc9))[_0xa046('0x2a')](handleError(_0x3a7d6f,null));};exports[_0xa046('0x16')]=function(_0x13faab,_0x30ff03){if(_0x13faab['body']['id']){delete _0x13faab[_0xa046('0x3e')]['id'];}return db[_0xa046('0x20')][_0xa046('0x36')]({'where':{'id':_0x13faab[_0xa046('0x2c')]['id']}})[_0xa046('0x17')](handleEntityNotFound(_0x30ff03,null))[_0xa046('0x17')](saveUpdates(_0x13faab[_0xa046('0x3e')],null))[_0xa046('0x17')](respondWithResult(_0x30ff03,null))[_0xa046('0x2a')](handleError(_0x30ff03,null));};exports['destroy']=function(_0x5604cc,_0x2254e3){return db[_0xa046('0x20')][_0xa046('0x36')]({'where':{'id':_0x5604cc[_0xa046('0x2c')]['id']}})[_0xa046('0x17')](handleEntityNotFound(_0x2254e3,null))['then'](removeEntity(_0x2254e3,null))[_0xa046('0x2a')](handleError(_0x2254e3,null));};exports['describe']=function(_0x3715f9,_0x392de2){return db[_0xa046('0x20')][_0xa046('0x3f')]()[_0xa046('0x17')](respondWithResult(_0x392de2,null))['catch'](handleError(_0x392de2,null));};exports[_0xa046('0x40')]=function(_0x4562b5,_0x524f43){var _0x1dc2b9={'raw':!![],'where':{}},_0x43ed73={},_0x2fbaa3;return db[_0xa046('0x20')]['findOne']({'where':{'id':_0x4562b5[_0xa046('0x2c')]['id']}})[_0xa046('0x17')](handleEntityNotFound(_0x524f43,null))[_0xa046('0x17')](function(_0x2cda3b){if(_0x2cda3b){_0x2fbaa3=_0x2cda3b[_0xa046('0x19')]({'plain':!![]});_0x43ed73[_0xa046('0x2d')]=_[_0xa046('0x2e')](db[_0xa046('0x41')]['rawAttributes']);_0x43ed73[_0xa046('0x28')]=_[_0xa046('0x2e')](_0x4562b5['query']);_0x43ed73['filters']=_[_0xa046('0x30')](_0x43ed73[_0xa046('0x2d')],_0x43ed73['query']);_0x1dc2b9[_0xa046('0x31')]=_['intersection'](_0x43ed73[_0xa046('0x2d')],qs['fields'](_0x4562b5[_0xa046('0x28')][_0xa046('0x42')]));_0x1dc2b9[_0xa046('0x31')]=_0x1dc2b9[_0xa046('0x31')][_0xa046('0x32')]?_0x1dc2b9['attributes']:_0x43ed73['model'];if(!_0x4562b5[_0xa046('0x28')][_0xa046('0x43')]('nolimit')){_0x1dc2b9[_0xa046('0xf')]=qs[_0xa046('0xf')](_0x4562b5[_0xa046('0x28')][_0xa046('0xf')]);_0x1dc2b9[_0xa046('0x12')]=qs['offset'](_0x4562b5[_0xa046('0x28')]['offset']);}_0x1dc2b9[_0xa046('0x44')]=qs['sort'](_0x4562b5['query'][_0xa046('0x45')]);_0x1dc2b9[_0xa046('0x26')]=qs[_0xa046('0x2f')](_[_0xa046('0x46')](_0x4562b5[_0xa046('0x28')],_0x43ed73[_0xa046('0x2f')]));_0x1dc2b9['where']['ChatQueueId']=_0x2cda3b['id'];if(_0x4562b5[_0xa046('0x28')][_0xa046('0x47')]){_0x1dc2b9[_0xa046('0x26')]=_[_0xa046('0x34')](_0x1dc2b9[_0xa046('0x26')],{'$or':_[_0xa046('0x48')](_0x1dc2b9[_0xa046('0x31')],function(_0xdd64e3){var _0x6a8ffa={};_0x6a8ffa[_0xdd64e3]={'$like':'%'+_0x4562b5[_0xa046('0x28')][_0xa046('0x47')]+'%'};return _0x6a8ffa;})});}_0x1dc2b9=_[_0xa046('0x34')]({},_0x1dc2b9,_0x4562b5['options']);return db['UserChatQueue']['findAll'](_0x1dc2b9);}})[_0xa046('0x17')](function(_0x5c5d82){if(_0x5c5d82){return db[_0xa046('0x49')][_0xa046('0x4a')]({'where':{'id':_[_0xa046('0x48')](_0x5c5d82,_0xa046('0x4b')),'role':_0xa046('0x4c')},'attributes':['id','name',_0xa046('0x4d'),_0xa046('0x4e'),'createdAt']});}})[_0xa046('0x17')](function(_0x516380){if(_0x516380){return{'count':_0x516380[_0xa046('0x11')],'rows':_[_0xa046('0x48')](_0x516380[_0xa046('0x29')],function(_0x373717){return{'membername':_0x373717[_0xa046('0x1e')],'UserId':_0x373717['id'],'queue_name':_0x2fbaa3['name'],'ChatQueueId':_0x2fbaa3['id'],'interface':util['format'](_0xa046('0x4f'),'SIP',_0x373717['name']),'penalty':0x0,'paused':_0x373717[_0xa046('0x4d')],'createdAt':_0x373717[_0xa046('0x50')],'updatedAt':_0x373717[_0xa046('0x4e')]};})};}else{return{'count':0x0,'rows':[]};}})[_0xa046('0x17')](respondWithFilteredResult(_0x524f43,_0x1dc2b9))[_0xa046('0x2a')](handleError(_0x524f43,null));};exports[_0xa046('0x51')]=function(_0x166e4f,_0x4be41b){var _0x37cedf={};var _0x2dc520={};var _0x898bdb;var _0x3f0c23;return db[_0xa046('0x20')][_0xa046('0x52')]({'where':{'id':_0x166e4f[_0xa046('0x2c')]['id']}})['then'](handleEntityNotFound(_0x4be41b,null))[_0xa046('0x17')](function(_0xf2680f){if(_0xf2680f){_0x898bdb=_0xf2680f;_0x2dc520[_0xa046('0x2d')]=_[_0xa046('0x2e')](db[_0xa046('0x53')][_0xa046('0x21')]);_0x2dc520['query']=_[_0xa046('0x2e')](_0x166e4f[_0xa046('0x28')]);_0x2dc520[_0xa046('0x2f')]=_['intersection'](_0x2dc520['model'],_0x2dc520['query']);_0x37cedf[_0xa046('0x31')]=_[_0xa046('0x30')](_0x2dc520[_0xa046('0x2d')],qs['fields'](_0x166e4f[_0xa046('0x28')][_0xa046('0x42')]));_0x37cedf[_0xa046('0x31')]=_0x37cedf[_0xa046('0x31')][_0xa046('0x32')]?_0x37cedf['attributes']:_0x2dc520['model'];_0x37cedf[_0xa046('0x44')]=qs['sort'](_0x166e4f[_0xa046('0x28')][_0xa046('0x45')]);_0x37cedf[_0xa046('0x26')]=qs[_0xa046('0x2f')](_[_0xa046('0x46')](_0x166e4f['query'],_0x2dc520[_0xa046('0x2f')]));if(_0x166e4f['query'][_0xa046('0x47')]){_0x37cedf[_0xa046('0x26')]=_['merge'](_0x37cedf[_0xa046('0x26')],{'$or':_[_0xa046('0x48')](_0x37cedf[_0xa046('0x31')],function(_0x43252a){var _0x5aca92={};_0x5aca92[_0x43252a]={'$like':'%'+_0x166e4f[_0xa046('0x28')][_0xa046('0x47')]+'%'};return _0x5aca92;})});}_0x37cedf=_[_0xa046('0x34')]({},_0x37cedf,_0x166e4f[_0xa046('0x35')]);return _0x898bdb[_0xa046('0x51')](_0x37cedf);}})[_0xa046('0x17')](function(_0x3edcb7){if(_0x3edcb7){_0x3f0c23=_0x3edcb7[_0xa046('0x32')];if(!_0x166e4f[_0xa046('0x28')][_0xa046('0x43')](_0xa046('0x54'))){_0x37cedf[_0xa046('0xf')]=qs[_0xa046('0xf')](_0x166e4f[_0xa046('0x28')]['limit']);_0x37cedf[_0xa046('0x12')]=qs[_0xa046('0x12')](_0x166e4f[_0xa046('0x28')][_0xa046('0x12')]);}return _0x898bdb[_0xa046('0x51')](_0x37cedf);}})[_0xa046('0x17')](function(_0x3bda14){if(_0x3bda14){return _0x3bda14?{'count':_0x3f0c23,'rows':_0x3bda14}:null;}})[_0xa046('0x17')](respondWithResult(_0x4be41b,null))[_0xa046('0x2a')](handleError(_0x4be41b,null));};exports[_0xa046('0x55')]=function(_0x434543,_0x157b91){var _0x3674b9=_0x434543['body']['ids'];return db[_0xa046('0x53')]['findAll']({'where':{'id':_0x3674b9},'attributes':['id'],'include':[{'model':db[_0xa046('0x49')],'as':_0xa046('0x56'),'attributes':['id',_0xa046('0x1e'),_0xa046('0x57'),_0xa046('0x58'),_0xa046('0x59')],'raw':!![]}]})[_0xa046('0x17')](function(_0x38403d){if(_0x38403d){var _0x2f60a5=_['flatMap'](_0x38403d,function(_0x329120){var _0x4feedc=_0x329120['get']({'plain':!![]});return _0x4feedc[_0xa046('0x56')];});return db[_0xa046('0x20')][_0xa046('0x36')]({'where':{'id':_0x434543[_0xa046('0x2c')]['id']}})[_0xa046('0x17')](function(_0x20be1b){return db[_0xa046('0x5a')][_0xa046('0x5b')](function(_0x4b5115){return _0x20be1b[_0xa046('0x55')](_0x3674b9,{'transaction':_0x4b5115})[_0xa046('0x17')](function(){return BPromise['each'](_0x2f60a5,function(_0x1b2f66){return db[_0xa046('0x41')]['findOrCreate']({'where':{'UserId':_0x1b2f66['id'],'ChatQueueId':_0x434543['params']['id']},'transaction':_0x4b5115});});})[_0xa046('0x17')](function(){_0x2f60a5['forEach'](function(_0x58642f){socket['emit'](_0xa046('0x5c'),{'UserId':_0x58642f['id'],'ChatQueueId':_0x20be1b['id']});});});});});}})[_0xa046('0x17')](respondWithStatusCode(_0x157b91,null))[_0xa046('0x2a')](handleError(_0x157b91,null));};exports[_0xa046('0x5d')]=function(_0x1d68c9,_0x42deaa){return db['Team'][_0xa046('0x5e')]({'where':{'id':_0x1d68c9['query'][_0xa046('0x5f')]},'attributes':['id'],'include':[{'model':db[_0xa046('0x49')],'as':_0xa046('0x56'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x42deaa,null))[_0xa046('0x17')](function(_0x34ad9f){var _0x3c0b9b=_[_0xa046('0x48')](_0x34ad9f,'id');var _0x29276a=[];var _0x14a733=[];var _0x529e67=squel[_0xa046('0x60')]();_0x529e67[_0xa046('0x61')]('tq.TeamId')[_0xa046('0x62')](_0xa046('0x63'),'tq')['join']('user_has_teams','ut',_0xa046('0x64'))[_0xa046('0x26')]('ChatQueueId\x20=\x20?',_0x1d68c9['params']['id']);for(var _0xd3fd5f=0x0;_0xd3fd5f<_0x34ad9f['length'];_0xd3fd5f+=0x1){let _0x316ef8=_0x34ad9f[_0xd3fd5f];for(var _0x1d5534=0x0;_0x1d5534<_0x316ef8['Agents'][_0xa046('0x32')];_0x1d5534+=0x1){let _0x23d373=_0x316ef8['Agents'][_0x1d5534];var _0x2016b9=_0x529e67[_0xa046('0x65')]();_0x2016b9[_0xa046('0x26')](_0xa046('0x66'),_0x23d373['id']);_0x14a733[_0xa046('0x67')](db[_0xa046('0x5a')]['query'](_0x2016b9['toString'](),{'type':db[_0xa046('0x5a')][_0xa046('0x68')][_0xa046('0x69')]})[_0xa046('0x17')](function(_0x1f1ea9){if(_0x1f1ea9['length']===0x1){return _0x23d373['id'];}else{var _0x422561=_[_0xa046('0x6a')](_['map'](_0x1f1ea9,_0xa046('0x6b')),function(_0x83af2d){return _[_0xa046('0x6c')](_0x3c0b9b,_0x83af2d);});if(_0x422561){return _0x23d373['id'];}}}));}}return BPromise[_0xa046('0x6d')](_0x14a733)['then'](function(_0x148f88){_0x29276a=_(_0x29276a)['union'](_0x148f88)[_0xa046('0x6e')]()[_0xa046('0x6f')]();return db[_0xa046('0x20')][_0xa046('0x36')]({'where':{'id':_0x1d68c9[_0xa046('0x2c')]['id']}})[_0xa046('0x17')](function(_0x307843){return db[_0xa046('0x5a')][_0xa046('0x5b')](function(_0x5d113a){return _0x307843[_0xa046('0x5d')](_0x1d68c9[_0xa046('0x28')]['ids'],{'transaction':_0x5d113a})[_0xa046('0x17')](function(){if(!_[_0xa046('0x70')](_0x29276a)){return _0x307843['removeAgents'](_0x29276a,{'transaction':_0x5d113a});}})[_0xa046('0x17')](function(){_0x29276a[_0xa046('0x71')](function(_0x158d78){socket[_0xa046('0x72')](_0xa046('0x73'),{'UserId':_0x158d78,'ChatQueueId':_0x307843['id']});});});});});});})[_0xa046('0x17')](respondWithStatusCode(_0x42deaa,null))[_0xa046('0x2a')](handleError(_0x42deaa,null));};exports[_0xa046('0x74')]=function(_0x2e9422,_0x4908e0){return db[_0xa046('0x20')]['find']({'where':{'id':_0x2e9422['params']['id']}})[_0xa046('0x17')](handleEntityNotFound(_0x4908e0,null))[_0xa046('0x17')](function(_0x5f451d){if(_0x5f451d){return _0x5f451d['addAgents'](_0x2e9422[_0xa046('0x3e')][_0xa046('0x5f')],_['omit'](_0x2e9422[_0xa046('0x3e')],['ids','id'])||{})[_0xa046('0x75')](function(_0x3d77fa){for(var _0x237931=0x0;_0x237931<_0x2e9422[_0xa046('0x3e')][_0xa046('0x5f')][_0xa046('0x32')];_0x237931+=0x1){socket[_0xa046('0x72')](_0xa046('0x5c'),{'UserId':Number(_0x2e9422['body'][_0xa046('0x5f')][_0x237931]),'ChatQueueId':Number(_0x2e9422['params']['id'])});}return _0x3d77fa;});}})[_0xa046('0x17')](respondWithResult(_0x4908e0,null))[_0xa046('0x2a')](handleError(_0x4908e0,null));};exports[_0xa046('0x76')]=function(_0x8168aa,_0x3f8fdb){return db['ChatQueue'][_0xa046('0x36')]({'where':{'id':_0x8168aa[_0xa046('0x2c')]['id']}})[_0xa046('0x17')](handleEntityNotFound(_0x3f8fdb,null))[_0xa046('0x17')](function(_0x4f6677){if(_0x4f6677){return _0x4f6677['removeAgents'](_0x8168aa['query'][_0xa046('0x5f')])[_0xa046('0x17')](function(){if(_['isArray'](_0x8168aa[_0xa046('0x28')][_0xa046('0x5f')])){for(var _0x1c33bc=0x0;_0x1c33bc<_0x8168aa['query'][_0xa046('0x5f')][_0xa046('0x32')];_0x1c33bc+=0x1){socket['emit']('userChatQueue:remove',{'UserId':Number(_0x8168aa[_0xa046('0x28')][_0xa046('0x5f')][_0x1c33bc]),'ChatQueueId':Number(_0x8168aa[_0xa046('0x2c')]['id'])});}}else{socket[_0xa046('0x72')]('userChatQueue:remove',{'UserId':Number(_0x8168aa[_0xa046('0x28')][_0xa046('0x5f')]),'ChatQueueId':Number(_0x8168aa['params']['id'])});}});}})[_0xa046('0x17')](respondWithStatusCode(_0x3f8fdb,null))[_0xa046('0x2a')](handleError(_0x3f8fdb,null));};exports[_0xa046('0x77')]=function(_0x7e127f,_0x245686){var _0x518f0e={};var _0x4121ac={};var _0x29dc02;var _0x45f25d;return db[_0xa046('0x20')][_0xa046('0x52')]({'where':{'id':_0x7e127f[_0xa046('0x2c')]['id']}})[_0xa046('0x17')](handleEntityNotFound(_0x245686,null))[_0xa046('0x17')](function(_0x3cb517){if(_0x3cb517){_0x29dc02=_0x3cb517;_0x4121ac[_0xa046('0x2d')]=_[_0xa046('0x2e')](db[_0xa046('0x49')][_0xa046('0x21')]);_0x4121ac[_0xa046('0x28')]=_[_0xa046('0x2e')](_0x7e127f[_0xa046('0x28')]);_0x4121ac[_0xa046('0x2f')]=_[_0xa046('0x30')](_0x4121ac[_0xa046('0x2d')],_0x4121ac[_0xa046('0x28')]);_0x518f0e[_0xa046('0x31')]=_[_0xa046('0x30')](_0x4121ac['model'],qs[_0xa046('0x42')](_0x7e127f[_0xa046('0x28')][_0xa046('0x42')]));_0x518f0e['attributes']=_0x518f0e[_0xa046('0x31')][_0xa046('0x32')]?_0x518f0e[_0xa046('0x31')]:_0x4121ac[_0xa046('0x2d')];_0x518f0e[_0xa046('0x44')]=qs[_0xa046('0x45')](_0x7e127f[_0xa046('0x28')][_0xa046('0x45')]);_0x518f0e[_0xa046('0x26')]=qs['filters'](_['pick'](_0x7e127f['query'],_0x4121ac[_0xa046('0x2f')]));if(_0x7e127f[_0xa046('0x28')]['filter']){_0x518f0e['where']=_['merge'](_0x518f0e['where'],{'$or':_['map'](_0x518f0e['attributes'],function(_0xbd8525){var _0x2e694d={};_0x2e694d[_0xbd8525]={'$like':'%'+_0x7e127f[_0xa046('0x28')][_0xa046('0x47')]+'%'};return _0x2e694d;})});}_0x518f0e=_['merge']({},_0x518f0e,_0x7e127f[_0xa046('0x35')]);return _0x29dc02[_0xa046('0x77')](_0x518f0e);}})[_0xa046('0x17')](function(_0x12904b){if(_0x12904b){_0x45f25d=_0x12904b[_0xa046('0x32')];if(!_0x7e127f[_0xa046('0x28')][_0xa046('0x43')]('nolimit')){_0x518f0e[_0xa046('0xf')]=qs[_0xa046('0xf')](_0x7e127f['query']['limit']);_0x518f0e['offset']=qs[_0xa046('0x12')](_0x7e127f[_0xa046('0x28')][_0xa046('0x12')]);}return _0x29dc02['getAgents'](_0x518f0e);}})[_0xa046('0x17')](function(_0x52bca1){if(_0x52bca1){return _0x52bca1?{'count':_0x45f25d,'rows':_0x52bca1}:null;}})[_0xa046('0x17')](respondWithResult(_0x245686,null))[_0xa046('0x2a')](handleError(_0x245686,null));};
\ No newline at end of file
+var _0x703d=['socket.io-emitter','./chatQueue.socket','end','json','offset','undefined','count','limit','status','set','Content-Range','then','destroy','ChatQueues','UserProfileResource','sendStatus','error','stack','name','send','index','map','ChatQueue','rawAttributes','fieldName','key','getOptions','where','include','findAll','rows','show','params','keys','query','intersection','attributes','fields','length','model','includeAll','merge','catch','create','body','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','find','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','getMembers','findOne','UserChatQueue','filters','nolimit','order','sort','pick','filter','options','User','findAndCountAll','UserId','agent','chatPause','createdAt','format','SIP','updatedAt','getTeams','Team','hasOwnProperty','addTeams','ids','Agents','online','voicePause','flatMap','sequelize','transaction','each','findOrCreate','forEach','emit','userChatQueue:save','removeTeams','select','tq.TeamId','team_has_chat_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','ChatQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','SELECT','all','value','userChatQueue:remove','addAgents','omit','removeAgents','getAgents','bluebird','util','lodash','../../config/logger','../../config/environment','../../mysqldb','redis','defaults'];(function(_0x3648e7,_0x408571){var _0x282a09=function(_0x26cee0){while(--_0x26cee0){_0x3648e7['push'](_0x3648e7['shift']());}};_0x282a09(++_0x408571);}(_0x703d,0x1bc));var _0xd703=function(_0x4b846c,_0x1b0065){_0x4b846c=_0x4b846c-0x0;var _0x2dfa6f=_0x703d[_0x4b846c];return _0x2dfa6f;};'use strict';var BPromise=require(_0xd703('0x0'));var util=require(_0xd703('0x1'));var _=require(_0xd703('0x2'));var squel=require('squel');var Redis=require('ioredis');var qs=require('../../components/parsers/qs');var logger=require(_0xd703('0x3'))('api');var config=require(_0xd703('0x4'));var db=require(_0xd703('0x5'))['db'];config[_0xd703('0x6')]=_[_0xd703('0x7')](config[_0xd703('0x6')],{'host':'localhost','port':0x18eb});var socket=require(_0xd703('0x8'))(new Redis(config[_0xd703('0x6')]));require(_0xd703('0x9'))['register'](socket);function respondWithStatusCode(_0x41e369,_0x370f45){_0x370f45=_0x370f45||0xcc;return function(_0x4c37fb){if(_0x4c37fb){return _0x41e369['sendStatus'](_0x370f45);}return _0x41e369['status'](_0x370f45)[_0xd703('0xa')]();};}function respondWithResult(_0x211aa9,_0x3ca0a1){_0x3ca0a1=_0x3ca0a1||0xc8;return function(_0x29b863){if(_0x29b863){return _0x211aa9['status'](_0x3ca0a1)[_0xd703('0xb')](_0x29b863);}};}function respondWithFilteredResult(_0x2ffbcb,_0x2e5e67){return function(_0x19b2f9){if(_0x19b2f9){var _0x5ef5ab=typeof _0x2e5e67[_0xd703('0xc')]===_0xd703('0xd')&&typeof _0x2e5e67['limit']==='undefined';var _0xca1659=_0x19b2f9[_0xd703('0xe')];var _0x5333b3=_0x5ef5ab?0x0:_0x2e5e67[_0xd703('0xc')];var _0x268c99=_0x5ef5ab?_0x19b2f9['count']:_0x2e5e67[_0xd703('0xc')]+_0x2e5e67[_0xd703('0xf')];var _0x170410;if(_0x268c99>=_0xca1659){_0x268c99=_0xca1659;_0x170410=0xc8;}else{_0x170410=0xce;}_0x2ffbcb[_0xd703('0x10')](_0x170410);return _0x2ffbcb[_0xd703('0x11')](_0xd703('0x12'),_0x5333b3+'-'+_0x268c99+'/'+_0xca1659)[_0xd703('0xb')](_0x19b2f9);}return null;};}function saveUpdates(_0x5a2263){return function(_0x5057ac){if(_0x5057ac){return _0x5057ac['update'](_0x5a2263)[_0xd703('0x13')](function(_0x5b3e09){return _0x5b3e09;});}return null;};}function removeEntity(_0x500033){return function(_0x7ad222){if(_0x7ad222){return _0x7ad222[_0xd703('0x14')]()[_0xd703('0x13')](function(){var _0x366d95=_0x7ad222['get']({'plain':!![]});var _0x333afd=_0xd703('0x15');return db[_0xd703('0x16')][_0xd703('0x14')]({'where':{'type':_0x333afd,'resourceId':_0x366d95['id']}})['then'](function(){return _0x7ad222;});})['then'](function(){_0x500033[_0xd703('0x10')](0xcc)[_0xd703('0xa')]();});}};}function handleEntityNotFound(_0x2d0a4a){return function(_0x3b5334){if(!_0x3b5334){_0x2d0a4a[_0xd703('0x17')](0x194);}return _0x3b5334;};}function handleError(_0x26e733,_0x53fc79){_0x53fc79=_0x53fc79||0x1f4;return function(_0x3de2b2){logger[_0xd703('0x18')](_0x3de2b2[_0xd703('0x19')]);if(_0x3de2b2[_0xd703('0x1a')]){delete _0x3de2b2[_0xd703('0x1a')];}_0x26e733[_0xd703('0x10')](_0x53fc79)[_0xd703('0x1b')](_0x3de2b2);};}exports[_0xd703('0x1c')]=function(_0x40896f,_0x17d5f9){var _0x14525d={};var _0x2c13e4={'count':0x0,'rows':[]};var _0x1153f0=_[_0xd703('0x1d')](db[_0xd703('0x1e')][_0xd703('0x1f')],function(_0x58b093){return{'name':_0x58b093[_0xd703('0x20')],'type':_0x58b093['type'][_0xd703('0x21')]};});_0x14525d=qs[_0xd703('0x22')](_0x1153f0,_0x40896f);var _0x5cfd02={'where':_0x14525d[_0xd703('0x23')]};return db['ChatQueue'][_0xd703('0xe')](_0x5cfd02)[_0xd703('0x13')](function(_0x5ca50c){_0x2c13e4[_0xd703('0xe')]=_0x5ca50c;_0x14525d[_0xd703('0x24')]=qs[_0xd703('0x24')](_0x40896f['query']);return db[_0xd703('0x1e')][_0xd703('0x25')](_0x14525d);})[_0xd703('0x13')](function(_0x5ef11c){_0x2c13e4[_0xd703('0x26')]=_0x5ef11c;return _0x2c13e4;})[_0xd703('0x13')](respondWithFilteredResult(_0x17d5f9,_0x14525d))['catch'](handleError(_0x17d5f9,null));};exports[_0xd703('0x27')]=function(_0x5e6949,_0x1bf996){var _0x567587={'raw':!![],'where':{'id':_0x5e6949[_0xd703('0x28')]['id']}},_0x5bf031={};_0x5bf031['model']=_[_0xd703('0x29')](db[_0xd703('0x1e')][_0xd703('0x1f')]);_0x5bf031[_0xd703('0x2a')]=_['keys'](_0x5e6949[_0xd703('0x2a')]);_0x5bf031['filters']=_[_0xd703('0x2b')](_0x5bf031['model'],_0x5bf031[_0xd703('0x2a')]);_0x567587[_0xd703('0x2c')]=_[_0xd703('0x2b')](_0x5bf031['model'],qs[_0xd703('0x2d')](_0x5e6949[_0xd703('0x2a')][_0xd703('0x2d')]));_0x567587[_0xd703('0x2c')]=_0x567587['attributes'][_0xd703('0x2e')]?_0x567587[_0xd703('0x2c')]:_0x5bf031[_0xd703('0x2f')];if(_0x5e6949[_0xd703('0x2a')][_0xd703('0x30')]){_0x567587[_0xd703('0x24')]=[{'all':!![]}];}_0x567587=_[_0xd703('0x31')]({},_0x567587,_0x5e6949['options']);return db['ChatQueue']['find'](_0x567587)[_0xd703('0x13')](handleEntityNotFound(_0x1bf996,null))[_0xd703('0x13')](respondWithResult(_0x1bf996,null))[_0xd703('0x32')](handleError(_0x1bf996,null));};exports[_0xd703('0x33')]=function(_0x1d3933,_0x315b97){return db[_0xd703('0x1e')][_0xd703('0x33')](_0x1d3933[_0xd703('0x34')],{})['then'](function(_0x3aa5fe){var _0xc10a5=_0x1d3933['user'][_0xd703('0x35')]({'plain':!![]});if(!_0xc10a5)throw new Error(_0xd703('0x36'));if(_0xc10a5[_0xd703('0x37')]==='user'){var _0x128bc7=_0x3aa5fe['get']({'plain':!![]});var _0x191b52='ChatQueues';return db['UserProfileSection'][_0xd703('0x38')]({'where':{'name':_0x191b52,'userProfileId':_0xc10a5['userProfileId']},'raw':!![]})[_0xd703('0x13')](function(_0x208857){if(_0x208857&&_0x208857[_0xd703('0x39')]===0x0){return db['UserProfileResource'][_0xd703('0x33')]({'name':_0x128bc7[_0xd703('0x1a')],'resourceId':_0x128bc7['id'],'type':_0x208857[_0xd703('0x1a')],'sectionId':_0x208857['id']},{})[_0xd703('0x13')](function(){return _0x3aa5fe;});}else{return _0x3aa5fe;}})[_0xd703('0x32')](function(_0x5b5e69){logger[_0xd703('0x18')](_0xd703('0x3a'),_0x5b5e69);throw _0x5b5e69;});}return _0x3aa5fe;})[_0xd703('0x13')](respondWithResult(_0x315b97,0xc9))[_0xd703('0x32')](handleError(_0x315b97,null));};exports['update']=function(_0x3c7047,_0x394cc0){if(_0x3c7047['body']['id']){delete _0x3c7047[_0xd703('0x34')]['id'];}return db[_0xd703('0x1e')][_0xd703('0x38')]({'where':{'id':_0x3c7047[_0xd703('0x28')]['id']}})[_0xd703('0x13')](handleEntityNotFound(_0x394cc0,null))['then'](saveUpdates(_0x3c7047[_0xd703('0x34')],null))[_0xd703('0x13')](respondWithResult(_0x394cc0,null))[_0xd703('0x32')](handleError(_0x394cc0,null));};exports[_0xd703('0x14')]=function(_0x3719fb,_0xabc8eb){return db['ChatQueue']['find']({'where':{'id':_0x3719fb[_0xd703('0x28')]['id']}})[_0xd703('0x13')](handleEntityNotFound(_0xabc8eb,null))[_0xd703('0x13')](removeEntity(_0xabc8eb,null))['catch'](handleError(_0xabc8eb,null));};exports[_0xd703('0x3b')]=function(_0x2d4cb9,_0x41bf46){return db[_0xd703('0x1e')]['describe']()['then'](respondWithResult(_0x41bf46,null))[_0xd703('0x32')](handleError(_0x41bf46,null));};exports[_0xd703('0x3c')]=function(_0x4a8cda,_0x1d19cf){var _0x52885f={'raw':!![],'where':{}},_0x5c9eee={},_0x156288;return db[_0xd703('0x1e')][_0xd703('0x3d')]({'where':{'id':_0x4a8cda[_0xd703('0x28')]['id']}})['then'](handleEntityNotFound(_0x1d19cf,null))[_0xd703('0x13')](function(_0x1e1fcd){if(_0x1e1fcd){_0x156288=_0x1e1fcd[_0xd703('0x35')]({'plain':!![]});_0x5c9eee[_0xd703('0x2f')]=_[_0xd703('0x29')](db[_0xd703('0x3e')][_0xd703('0x1f')]);_0x5c9eee[_0xd703('0x2a')]=_[_0xd703('0x29')](_0x4a8cda[_0xd703('0x2a')]);_0x5c9eee[_0xd703('0x3f')]=_[_0xd703('0x2b')](_0x5c9eee[_0xd703('0x2f')],_0x5c9eee[_0xd703('0x2a')]);_0x52885f[_0xd703('0x2c')]=_[_0xd703('0x2b')](_0x5c9eee[_0xd703('0x2f')],qs[_0xd703('0x2d')](_0x4a8cda[_0xd703('0x2a')]['fields']));_0x52885f[_0xd703('0x2c')]=_0x52885f[_0xd703('0x2c')]['length']?_0x52885f[_0xd703('0x2c')]:_0x5c9eee['model'];if(!_0x4a8cda['query']['hasOwnProperty'](_0xd703('0x40'))){_0x52885f['limit']=qs[_0xd703('0xf')](_0x4a8cda['query']['limit']);_0x52885f['offset']=qs['offset'](_0x4a8cda['query'][_0xd703('0xc')]);}_0x52885f[_0xd703('0x41')]=qs[_0xd703('0x42')](_0x4a8cda[_0xd703('0x2a')][_0xd703('0x42')]);_0x52885f[_0xd703('0x23')]=qs[_0xd703('0x3f')](_[_0xd703('0x43')](_0x4a8cda[_0xd703('0x2a')],_0x5c9eee[_0xd703('0x3f')]));_0x52885f['where']['ChatQueueId']=_0x1e1fcd['id'];if(_0x4a8cda['query']['filter']){_0x52885f[_0xd703('0x23')]=_[_0xd703('0x31')](_0x52885f['where'],{'$or':_[_0xd703('0x1d')](_0x52885f[_0xd703('0x2c')],function(_0x5be779){var _0x292cb8={};_0x292cb8[_0x5be779]={'$like':'%'+_0x4a8cda[_0xd703('0x2a')][_0xd703('0x44')]+'%'};return _0x292cb8;})});}_0x52885f=_[_0xd703('0x31')]({},_0x52885f,_0x4a8cda[_0xd703('0x45')]);return db['UserChatQueue'][_0xd703('0x25')](_0x52885f);}})[_0xd703('0x13')](function(_0x3b79ea){if(_0x3b79ea){return db[_0xd703('0x46')][_0xd703('0x47')]({'where':{'id':_[_0xd703('0x1d')](_0x3b79ea,_0xd703('0x48')),'role':_0xd703('0x49')},'attributes':['id',_0xd703('0x1a'),_0xd703('0x4a'),'updatedAt',_0xd703('0x4b')]});}})[_0xd703('0x13')](function(_0x2149cd){if(_0x2149cd){return{'count':_0x2149cd[_0xd703('0xe')],'rows':_[_0xd703('0x1d')](_0x2149cd['rows'],function(_0x42816f){return{'membername':_0x42816f[_0xd703('0x1a')],'UserId':_0x42816f['id'],'queue_name':_0x156288[_0xd703('0x1a')],'ChatQueueId':_0x156288['id'],'interface':util[_0xd703('0x4c')]('%s/%s',_0xd703('0x4d'),_0x42816f['name']),'penalty':0x0,'paused':_0x42816f[_0xd703('0x4a')],'createdAt':_0x42816f[_0xd703('0x4b')],'updatedAt':_0x42816f[_0xd703('0x4e')]};})};}else{return{'count':0x0,'rows':[]};}})[_0xd703('0x13')](respondWithFilteredResult(_0x1d19cf,_0x52885f))['catch'](handleError(_0x1d19cf,null));};exports[_0xd703('0x4f')]=function(_0x6ea950,_0x3aede3){var _0xb8e50c={};var _0x39ed3a={};var _0x41e393;var _0x1ff3fe;return db[_0xd703('0x1e')][_0xd703('0x3d')]({'where':{'id':_0x6ea950['params']['id']}})['then'](handleEntityNotFound(_0x3aede3,null))['then'](function(_0x3884f3){if(_0x3884f3){_0x41e393=_0x3884f3;_0x39ed3a[_0xd703('0x2f')]=_[_0xd703('0x29')](db[_0xd703('0x50')][_0xd703('0x1f')]);_0x39ed3a[_0xd703('0x2a')]=_[_0xd703('0x29')](_0x6ea950[_0xd703('0x2a')]);_0x39ed3a[_0xd703('0x3f')]=_[_0xd703('0x2b')](_0x39ed3a[_0xd703('0x2f')],_0x39ed3a[_0xd703('0x2a')]);_0xb8e50c['attributes']=_['intersection'](_0x39ed3a['model'],qs[_0xd703('0x2d')](_0x6ea950[_0xd703('0x2a')][_0xd703('0x2d')]));_0xb8e50c['attributes']=_0xb8e50c['attributes'][_0xd703('0x2e')]?_0xb8e50c[_0xd703('0x2c')]:_0x39ed3a[_0xd703('0x2f')];_0xb8e50c[_0xd703('0x41')]=qs[_0xd703('0x42')](_0x6ea950[_0xd703('0x2a')]['sort']);_0xb8e50c[_0xd703('0x23')]=qs[_0xd703('0x3f')](_[_0xd703('0x43')](_0x6ea950[_0xd703('0x2a')],_0x39ed3a[_0xd703('0x3f')]));if(_0x6ea950[_0xd703('0x2a')][_0xd703('0x44')]){_0xb8e50c[_0xd703('0x23')]=_[_0xd703('0x31')](_0xb8e50c[_0xd703('0x23')],{'$or':_[_0xd703('0x1d')](_0xb8e50c[_0xd703('0x2c')],function(_0x569a50){var _0x20c67c={};_0x20c67c[_0x569a50]={'$like':'%'+_0x6ea950['query'][_0xd703('0x44')]+'%'};return _0x20c67c;})});}_0xb8e50c=_[_0xd703('0x31')]({},_0xb8e50c,_0x6ea950[_0xd703('0x45')]);return _0x41e393[_0xd703('0x4f')](_0xb8e50c);}})['then'](function(_0x9d4050){if(_0x9d4050){_0x1ff3fe=_0x9d4050[_0xd703('0x2e')];if(!_0x6ea950[_0xd703('0x2a')][_0xd703('0x51')](_0xd703('0x40'))){_0xb8e50c['limit']=qs[_0xd703('0xf')](_0x6ea950[_0xd703('0x2a')][_0xd703('0xf')]);_0xb8e50c[_0xd703('0xc')]=qs[_0xd703('0xc')](_0x6ea950['query'][_0xd703('0xc')]);}return _0x41e393[_0xd703('0x4f')](_0xb8e50c);}})[_0xd703('0x13')](function(_0x8ae2fb){if(_0x8ae2fb){return _0x8ae2fb?{'count':_0x1ff3fe,'rows':_0x8ae2fb}:null;}})[_0xd703('0x13')](respondWithResult(_0x3aede3,null))['catch'](handleError(_0x3aede3,null));};exports[_0xd703('0x52')]=function(_0x2ed0d0,_0x1a0f47){var _0x5d9dbe=_0x2ed0d0['body'][_0xd703('0x53')];return db[_0xd703('0x50')]['findAll']({'where':{'id':_0x5d9dbe},'attributes':['id'],'include':[{'model':db['User'],'as':_0xd703('0x54'),'attributes':['id',_0xd703('0x1a'),_0xd703('0x55'),_0xd703('0x56'),'interface'],'raw':!![]}]})[_0xd703('0x13')](function(_0x152d5b){if(_0x152d5b){var _0x143063=_[_0xd703('0x57')](_0x152d5b,function(_0x2d4a5f){var _0x44c1cb=_0x2d4a5f[_0xd703('0x35')]({'plain':!![]});return _0x44c1cb[_0xd703('0x54')];});return db[_0xd703('0x1e')][_0xd703('0x38')]({'where':{'id':_0x2ed0d0['params']['id']}})[_0xd703('0x13')](function(_0x2c70c3){return db[_0xd703('0x58')][_0xd703('0x59')](function(_0x25ec62){return _0x2c70c3[_0xd703('0x52')](_0x5d9dbe,{'transaction':_0x25ec62})[_0xd703('0x13')](function(){return BPromise[_0xd703('0x5a')](_0x143063,function(_0x1c5551){return db[_0xd703('0x3e')][_0xd703('0x5b')]({'where':{'UserId':_0x1c5551['id'],'ChatQueueId':_0x2ed0d0['params']['id']},'transaction':_0x25ec62});});})[_0xd703('0x13')](function(){_0x143063[_0xd703('0x5c')](function(_0x2d871c){socket[_0xd703('0x5d')](_0xd703('0x5e'),{'UserId':_0x2d871c['id'],'ChatQueueId':_0x2c70c3['id']});});});});});}})[_0xd703('0x13')](respondWithStatusCode(_0x1a0f47,null))[_0xd703('0x32')](handleError(_0x1a0f47,null));};exports[_0xd703('0x5f')]=function(_0x294b3f,_0x508835){return db[_0xd703('0x50')][_0xd703('0x25')]({'where':{'id':_0x294b3f['query'][_0xd703('0x53')]},'attributes':['id'],'include':[{'model':db[_0xd703('0x46')],'as':_0xd703('0x54'),'attributes':['id'],'raw':!![]}]})[_0xd703('0x13')](handleEntityNotFound(_0x508835,null))[_0xd703('0x13')](function(_0x503628){var _0x1b6223=_[_0xd703('0x1d')](_0x503628,'id');var _0x4a6f83=[];var _0x574262=[];var _0x492604=squel[_0xd703('0x60')]();_0x492604['field'](_0xd703('0x61'))['from'](_0xd703('0x62'),'tq')[_0xd703('0x63')](_0xd703('0x64'),'ut',_0xd703('0x65'))[_0xd703('0x23')](_0xd703('0x66'),_0x294b3f[_0xd703('0x28')]['id']);for(var _0x18f55e=0x0;_0x18f55e<_0x503628['length'];_0x18f55e+=0x1){let _0x38d4d6=_0x503628[_0x18f55e];for(var _0x44a5cf=0x0;_0x44a5cf<_0x38d4d6[_0xd703('0x54')][_0xd703('0x2e')];_0x44a5cf+=0x1){let _0x1b9ab5=_0x38d4d6[_0xd703('0x54')][_0x44a5cf];var _0x71b5be=_0x492604[_0xd703('0x67')]();_0x71b5be[_0xd703('0x23')](_0xd703('0x68'),_0x1b9ab5['id']);_0x574262['push'](db['sequelize']['query'](_0x71b5be['toString'](),{'type':db['sequelize']['QueryTypes'][_0xd703('0x69')]})[_0xd703('0x13')](function(_0xfae1c4){if(_0xfae1c4['length']===0x1){return _0x1b9ab5['id'];}else{var _0x1c0045=_['every'](_[_0xd703('0x1d')](_0xfae1c4,'TeamId'),function(_0x4679de){return _['includes'](_0x1b6223,_0x4679de);});if(_0x1c0045){return _0x1b9ab5['id'];}}}));}}return BPromise[_0xd703('0x6a')](_0x574262)[_0xd703('0x13')](function(_0x1cd00b){_0x4a6f83=_(_0x4a6f83)['union'](_0x1cd00b)['compact']()[_0xd703('0x6b')]();return db[_0xd703('0x1e')][_0xd703('0x38')]({'where':{'id':_0x294b3f[_0xd703('0x28')]['id']}})['then'](function(_0x44fe52){return db[_0xd703('0x58')][_0xd703('0x59')](function(_0x5a34bd){return _0x44fe52['removeTeams'](_0x294b3f[_0xd703('0x2a')][_0xd703('0x53')],{'transaction':_0x5a34bd})[_0xd703('0x13')](function(){if(!_['isEmpty'](_0x4a6f83)){return _0x44fe52['removeAgents'](_0x4a6f83,{'transaction':_0x5a34bd});}})[_0xd703('0x13')](function(){_0x4a6f83[_0xd703('0x5c')](function(_0x42273a){socket[_0xd703('0x5d')](_0xd703('0x6c'),{'UserId':_0x42273a,'ChatQueueId':_0x44fe52['id']});});});});});});})[_0xd703('0x13')](respondWithStatusCode(_0x508835,null))['catch'](handleError(_0x508835,null));};exports[_0xd703('0x6d')]=function(_0x4645e9,_0x30402f){return db[_0xd703('0x1e')][_0xd703('0x38')]({'where':{'id':_0x4645e9[_0xd703('0x28')]['id']}})[_0xd703('0x13')](handleEntityNotFound(_0x30402f,null))[_0xd703('0x13')](function(_0x562d26){if(_0x562d26){return _0x562d26['addAgents'](_0x4645e9[_0xd703('0x34')][_0xd703('0x53')],_[_0xd703('0x6e')](_0x4645e9['body'],[_0xd703('0x53'),'id'])||{})['spread'](function(_0x1d6569){for(var _0xd4dffe=0x0;_0xd4dffe<_0x4645e9[_0xd703('0x34')][_0xd703('0x53')][_0xd703('0x2e')];_0xd4dffe+=0x1){socket['emit'](_0xd703('0x5e'),{'UserId':Number(_0x4645e9[_0xd703('0x34')][_0xd703('0x53')][_0xd4dffe]),'ChatQueueId':Number(_0x4645e9[_0xd703('0x28')]['id'])});}return _0x1d6569;});}})[_0xd703('0x13')](respondWithResult(_0x30402f,null))[_0xd703('0x32')](handleError(_0x30402f,null));};exports[_0xd703('0x6f')]=function(_0x8e2584,_0x3602c2){return db[_0xd703('0x1e')][_0xd703('0x38')]({'where':{'id':_0x8e2584[_0xd703('0x28')]['id']}})[_0xd703('0x13')](handleEntityNotFound(_0x3602c2,null))[_0xd703('0x13')](function(_0x17c183){if(_0x17c183){return _0x17c183[_0xd703('0x6f')](_0x8e2584[_0xd703('0x2a')][_0xd703('0x53')])['then'](function(){if(_['isArray'](_0x8e2584[_0xd703('0x2a')]['ids'])){for(var _0x1afee5=0x0;_0x1afee5<_0x8e2584[_0xd703('0x2a')][_0xd703('0x53')][_0xd703('0x2e')];_0x1afee5+=0x1){socket[_0xd703('0x5d')](_0xd703('0x6c'),{'UserId':Number(_0x8e2584[_0xd703('0x2a')][_0xd703('0x53')][_0x1afee5]),'ChatQueueId':Number(_0x8e2584['params']['id'])});}}else{socket[_0xd703('0x5d')](_0xd703('0x6c'),{'UserId':Number(_0x8e2584[_0xd703('0x2a')][_0xd703('0x53')]),'ChatQueueId':Number(_0x8e2584[_0xd703('0x28')]['id'])});}});}})[_0xd703('0x13')](respondWithStatusCode(_0x3602c2,null))[_0xd703('0x32')](handleError(_0x3602c2,null));};exports['getAgents']=function(_0x3d7bb6,_0x4bad90){var _0x1a5942={};var _0x2d7df4={};var _0x3e654b;var _0x1a87af;return db['ChatQueue']['findOne']({'where':{'id':_0x3d7bb6[_0xd703('0x28')]['id']}})['then'](handleEntityNotFound(_0x4bad90,null))[_0xd703('0x13')](function(_0x379806){if(_0x379806){_0x3e654b=_0x379806;_0x2d7df4['model']=_['keys'](db[_0xd703('0x46')][_0xd703('0x1f')]);_0x2d7df4[_0xd703('0x2a')]=_['keys'](_0x3d7bb6[_0xd703('0x2a')]);_0x2d7df4[_0xd703('0x3f')]=_[_0xd703('0x2b')](_0x2d7df4[_0xd703('0x2f')],_0x2d7df4[_0xd703('0x2a')]);_0x1a5942[_0xd703('0x2c')]=_[_0xd703('0x2b')](_0x2d7df4[_0xd703('0x2f')],qs[_0xd703('0x2d')](_0x3d7bb6[_0xd703('0x2a')]['fields']));_0x1a5942[_0xd703('0x2c')]=_0x1a5942[_0xd703('0x2c')][_0xd703('0x2e')]?_0x1a5942[_0xd703('0x2c')]:_0x2d7df4[_0xd703('0x2f')];_0x1a5942[_0xd703('0x41')]=qs[_0xd703('0x42')](_0x3d7bb6[_0xd703('0x2a')]['sort']);_0x1a5942['where']=qs[_0xd703('0x3f')](_[_0xd703('0x43')](_0x3d7bb6['query'],_0x2d7df4[_0xd703('0x3f')]));if(_0x3d7bb6['query'][_0xd703('0x44')]){_0x1a5942[_0xd703('0x23')]=_[_0xd703('0x31')](_0x1a5942[_0xd703('0x23')],{'$or':_[_0xd703('0x1d')](_0x1a5942[_0xd703('0x2c')],function(_0x5e4427){var _0x37bccb={};_0x37bccb[_0x5e4427]={'$like':'%'+_0x3d7bb6[_0xd703('0x2a')][_0xd703('0x44')]+'%'};return _0x37bccb;})});}_0x1a5942=_[_0xd703('0x31')]({},_0x1a5942,_0x3d7bb6['options']);return _0x3e654b[_0xd703('0x70')](_0x1a5942);}})['then'](function(_0x222fe8){if(_0x222fe8){_0x1a87af=_0x222fe8[_0xd703('0x2e')];if(!_0x3d7bb6[_0xd703('0x2a')]['hasOwnProperty'](_0xd703('0x40'))){_0x1a5942[_0xd703('0xf')]=qs[_0xd703('0xf')](_0x3d7bb6['query'][_0xd703('0xf')]);_0x1a5942[_0xd703('0xc')]=qs['offset'](_0x3d7bb6['query'][_0xd703('0xc')]);}return _0x3e654b[_0xd703('0x70')](_0x1a5942);}})['then'](function(_0x261f25){if(_0x261f25){return _0x261f25?{'count':_0x1a87af,'rows':_0x261f25}:null;}})[_0xd703('0x13')](respondWithResult(_0x4bad90,null))['catch'](handleError(_0x4bad90,null));};
\ No newline at end of file
index 2d2f05f..10ef9d7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfa54=['ChatQueue','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xfa54,0x98));var _0x4fa5=function(_0x2be8c2,_0x14a4b5){_0x2be8c2=_0x2be8c2-0x0;var _0x97f531=_0xfa54[_0x2be8c2];return _0x97f531;};'use strict';var EventEmitter=require(_0x4fa5('0x0'));var ChatQueue=require(_0x4fa5('0x1'))['db'][_0x4fa5('0x2')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents[_0x4fa5('0x3')](0x0);var events={'afterCreate':_0x4fa5('0x4'),'afterUpdate':_0x4fa5('0x5'),'afterDestroy':_0x4fa5('0x6')};function emitEvent(_0x384cfd){return function(_0x28eafe,_0x279534,_0x380e9f){ChatQueueEvents[_0x4fa5('0x7')](_0x384cfd+':'+_0x28eafe['id'],_0x28eafe);ChatQueueEvents[_0x4fa5('0x7')](_0x384cfd,_0x28eafe);_0x380e9f(null);};}for(var e in events){if(events[_0x4fa5('0x8')](e)){var event=events[e];ChatQueue[_0x4fa5('0x9')](e,emitEvent(event));}}module[_0x4fa5('0xa')]=ChatQueueEvents;
\ No newline at end of file
+var _0x5e4c=['update','remove','emit','hook','exports','../../mysqldb','ChatQueue','save'];(function(_0x2179f1,_0x21c653){var _0x176ec9=function(_0x4c4a4c){while(--_0x4c4a4c){_0x2179f1['push'](_0x2179f1['shift']());}};_0x176ec9(++_0x21c653);}(_0x5e4c,0x95));var _0xc5e4=function(_0x3bb445,_0x429745){_0x3bb445=_0x3bb445-0x0;var _0x5b520f=_0x5e4c[_0x3bb445];return _0x5b520f;};'use strict';var EventEmitter=require('events');var ChatQueue=require(_0xc5e4('0x0'))['db'][_0xc5e4('0x1')];var ChatQueueEvents=new EventEmitter();ChatQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xc5e4('0x2'),'afterUpdate':_0xc5e4('0x3'),'afterDestroy':_0xc5e4('0x4')};function emitEvent(_0x113467){return function(_0x2dc992,_0x458e00,_0x37afc2){ChatQueueEvents[_0xc5e4('0x5')](_0x113467+':'+_0x2dc992['id'],_0x2dc992);ChatQueueEvents['emit'](_0x113467,_0x2dc992);_0x37afc2(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];ChatQueue[_0xc5e4('0x6')](e,emitEvent(event));}}module[_0xc5e4('0x7')]=ChatQueueEvents;
\ No newline at end of file
index a9c0be8..fc1bfb5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8e0e=['bluebird','request-promise','path','./chatQueue.attributes','exports','define','ChatQueue','chat_queues','util','../../config/logger','moment'];(function(_0xa22e9f,_0x5cd275){var _0x1d9a64=function(_0x1be759){while(--_0x1be759){_0xa22e9f['push'](_0xa22e9f['shift']());}};_0x1d9a64(++_0x5cd275);}(_0x8e0e,0x17e));var _0xe8e0=function(_0x30c8c7,_0x455188){_0x30c8c7=_0x30c8c7-0x0;var _0x55f32d=_0x8e0e[_0x30c8c7];return _0x55f32d;};'use strict';var _=require('lodash');var util=require(_0xe8e0('0x0'));var logger=require(_0xe8e0('0x1'))('api');var moment=require(_0xe8e0('0x2'));var BPromise=require(_0xe8e0('0x3'));var rp=require(_0xe8e0('0x4'));var fs=require('fs');var path=require(_0xe8e0('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xe8e0('0x6'));module[_0xe8e0('0x7')]=function(_0x2b4d7e,_0x520017){return _0x2b4d7e[_0xe8e0('0x8')](_0xe8e0('0x9'),attributes,{'tableName':_0xe8e0('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc58f=['moment','bluebird','path','rimraf','../../config/environment','./chatQueue.attributes','exports','define','ChatQueue','chat_queues','lodash','util','../../config/logger','api'];(function(_0x5d9867,_0x5e9030){var _0x7d2118=function(_0x2e5149){while(--_0x2e5149){_0x5d9867['push'](_0x5d9867['shift']());}};_0x7d2118(++_0x5e9030);}(_0xc58f,0xb2));var _0xfc58=function(_0x28e28b,_0x340c0f){_0x28e28b=_0x28e28b-0x0;var _0x40a4e1=_0xc58f[_0x28e28b];return _0x40a4e1;};'use strict';var _=require(_0xfc58('0x0'));var util=require(_0xfc58('0x1'));var logger=require(_0xfc58('0x2'))(_0xfc58('0x3'));var moment=require(_0xfc58('0x4'));var BPromise=require(_0xfc58('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xfc58('0x6'));var rimraf=require(_0xfc58('0x7'));var config=require(_0xfc58('0x8'));var attributes=require(_0xfc58('0x9'));module[_0xfc58('0xa')]=function(_0x4274f1,_0x52db8b){return _0x4274f1[_0xfc58('0xb')](_0xfc58('0xc'),attributes,{'tableName':_0xfc58('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 785adcd..0cfd7a6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x74fd=['info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetChatQueue','ChatQueue','options','raw','where','attributes','limit','include','map','model','ShowChatQueue','find','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','redis','localhost','socket.io-emitter','./chatQueue.socket','request','then'];(function(_0x52c6bf,_0x29c95b){var _0x37fea0=function(_0xb23096){while(--_0xb23096){_0x52c6bf['push'](_0x52c6bf['shift']());}};_0x37fea0(++_0x29c95b);}(_0x74fd,0x8f));var _0xd74f=function(_0x31a576,_0x424419){_0x31a576=_0x31a576-0x0;var _0x30b1d3=_0x74fd[_0x31a576];return _0x30b1d3;};'use strict';var _=require(_0xd74f('0x0'));var util=require('util');var moment=require(_0xd74f('0x1'));var BPromise=require(_0xd74f('0x2'));var rs=require(_0xd74f('0x3'));var fs=require('fs');var Redis=require(_0xd74f('0x4'));var db=require(_0xd74f('0x5'))['db'];var utils=require(_0xd74f('0x6'));var logger=require(_0xd74f('0x7'))(_0xd74f('0x8'));var config=require(_0xd74f('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0xd74f('0xa')]({'port':0x232a});config[_0xd74f('0xb')]=_['defaults'](config[_0xd74f('0xb')],{'host':_0xd74f('0xc'),'port':0x18eb});var socket=require(_0xd74f('0xd'))(new Redis(config[_0xd74f('0xb')]));require(_0xd74f('0xe'))['register'](socket);function respondWithRpcPromise(_0x50f801,_0x33150f,_0x58836e){return new BPromise(function(_0x50790b,_0x39552d){return client[_0xd74f('0xf')](_0x50f801,_0x58836e)[_0xd74f('0x10')](function(_0x176773){logger[_0xd74f('0x11')](_0xd74f('0x12'),_0x33150f,_0xd74f('0x13'));logger[_0xd74f('0x14')](_0xd74f('0x15'),_0x33150f,'request\x20sent',JSON[_0xd74f('0x16')](_0x176773));if(_0x176773[_0xd74f('0x17')]){if(_0x176773[_0xd74f('0x17')][_0xd74f('0x18')]===0x1f4){logger[_0xd74f('0x17')]('ChatQueue,\x20%s,\x20%s',_0x33150f,_0x176773[_0xd74f('0x17')][_0xd74f('0x19')]);return _0x39552d(_0x176773[_0xd74f('0x17')]['message']);}logger[_0xd74f('0x17')](_0xd74f('0x12'),_0x33150f,_0x176773['error'][_0xd74f('0x19')]);return _0x50790b(_0x176773[_0xd74f('0x17')][_0xd74f('0x19')]);}else{logger[_0xd74f('0x11')](_0xd74f('0x12'),_0x33150f,_0xd74f('0x13'));_0x50790b(_0x176773[_0xd74f('0x1a')]['message']);}})[_0xd74f('0x1b')](function(_0x43ede4){logger['error'](_0xd74f('0x12'),_0x33150f,_0x43ede4);_0x39552d(_0x43ede4);});});}exports[_0xd74f('0x1c')]=function(_0x36377a){var _0x5b2746=this;return new Promise(function(_0x554b8f,_0x586a75){return db[_0xd74f('0x1d')]['findAll']({'raw':_0x36377a['options']?_0x36377a[_0xd74f('0x1e')][_0xd74f('0x1f')]===undefined?!![]:![]:!![],'where':_0x36377a['options']?_0x36377a[_0xd74f('0x1e')][_0xd74f('0x20')]||null:null,'attributes':_0x36377a['options']?_0x36377a['options'][_0xd74f('0x21')]||null:null,'limit':_0x36377a[_0xd74f('0x1e')]?_0x36377a[_0xd74f('0x1e')][_0xd74f('0x22')]||null:null,'include':_0x36377a[_0xd74f('0x1e')]?_0x36377a[_0xd74f('0x1e')][_0xd74f('0x23')]?_[_0xd74f('0x24')](_0x36377a[_0xd74f('0x1e')][_0xd74f('0x23')],function(_0x1abb89){return{'model':db[_0x1abb89[_0xd74f('0x25')]],'as':_0x1abb89['as'],'attributes':_0x1abb89[_0xd74f('0x21')],'include':_0x1abb89[_0xd74f('0x23')]?_[_0xd74f('0x24')](_0x1abb89['include'],function(_0x4ea720){return{'model':db[_0x4ea720['model']],'as':_0x4ea720['as'],'attributes':_0x4ea720[_0xd74f('0x21')],'include':_0x4ea720[_0xd74f('0x23')]?_[_0xd74f('0x24')](_0x4ea720[_0xd74f('0x23')],function(_0x175c36){return{'model':db[_0x175c36[_0xd74f('0x25')]],'as':_0x175c36['as'],'attributes':_0x175c36[_0xd74f('0x21')]};}):[]};}):[]};}):[]:[]})[_0xd74f('0x10')](function(_0x33d02e){logger[_0xd74f('0x11')](_0xd74f('0x1c'),_0x36377a);logger['debug'](_0xd74f('0x1c'),_0x36377a,JSON[_0xd74f('0x16')](_0x33d02e));_0x554b8f(_0x33d02e);})[_0xd74f('0x1b')](function(_0x29af0c){logger[_0xd74f('0x17')]('GetChatQueue',_0x29af0c[_0xd74f('0x19')],_0x36377a);_0x586a75(_0x5b2746[_0xd74f('0x17')](0x1f4,_0x29af0c[_0xd74f('0x19')]));});});};exports[_0xd74f('0x26')]=function(_0x306c1f){var _0x34b074=this;return new Promise(function(_0x16ef8c,_0x572535){return db[_0xd74f('0x1d')][_0xd74f('0x27')]({'raw':_0x306c1f[_0xd74f('0x1e')]?_0x306c1f[_0xd74f('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x306c1f['options']?_0x306c1f[_0xd74f('0x1e')][_0xd74f('0x20')]||null:null,'attributes':_0x306c1f[_0xd74f('0x1e')]?_0x306c1f[_0xd74f('0x1e')][_0xd74f('0x21')]||null:null,'include':_0x306c1f['options']?_0x306c1f[_0xd74f('0x1e')]['include']?_[_0xd74f('0x24')](_0x306c1f['options']['include'],function(_0x2f8a33){return{'model':db[_0x2f8a33[_0xd74f('0x25')]],'as':_0x2f8a33['as'],'attributes':_0x2f8a33[_0xd74f('0x21')],'include':_0x2f8a33['include']?_[_0xd74f('0x24')](_0x2f8a33[_0xd74f('0x23')],function(_0x126ac9){return{'model':db[_0x126ac9[_0xd74f('0x25')]],'as':_0x126ac9['as'],'attributes':_0x126ac9[_0xd74f('0x21')],'include':_0x126ac9[_0xd74f('0x23')]?_[_0xd74f('0x24')](_0x126ac9[_0xd74f('0x23')],function(_0x23fa3f){return{'model':db[_0x23fa3f[_0xd74f('0x25')]],'as':_0x23fa3f['as'],'attributes':_0x23fa3f[_0xd74f('0x21')]};}):[]};}):[]};}):[]:[]})[_0xd74f('0x10')](function(_0x218fe5){logger[_0xd74f('0x11')](_0xd74f('0x26'),_0x306c1f);logger[_0xd74f('0x14')]('ShowChatQueue',_0x306c1f,JSON[_0xd74f('0x16')](_0x218fe5));_0x16ef8c(_0x218fe5);})[_0xd74f('0x1b')](function(_0x25a801){logger[_0xd74f('0x17')](_0xd74f('0x26'),_0x25a801[_0xd74f('0x19')],_0x306c1f);_0x572535(_0x34b074[_0xd74f('0x17')](0x1f4,_0x25a801[_0xd74f('0x19')]));});});};
\ No newline at end of file
+var _0xb0d4=['redis','defaults','localhost','socket.io-emitter','register','request','info','ChatQueue,\x20%s,\x20%s','request\x20sent','debug','ChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetChatQueue','ChatQueue','findAll','options','raw','attributes','include','model','map','ShowChatQueue','find','where','then','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http'];(function(_0x32d9fe,_0x213473){var _0x1b8f8e=function(_0x39c16c){while(--_0x39c16c){_0x32d9fe['push'](_0x32d9fe['shift']());}};_0x1b8f8e(++_0x213473);}(_0xb0d4,0x1e1));var _0x4b0d=function(_0xd2b2de,_0xdd507a){_0xd2b2de=_0xd2b2de-0x0;var _0x5026a0=_0xb0d4[_0xd2b2de];return _0x5026a0;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x4b0d('0x0'));var BPromise=require(_0x4b0d('0x1'));var rs=require(_0x4b0d('0x2'));var fs=require('fs');var Redis=require(_0x4b0d('0x3'));var db=require(_0x4b0d('0x4'))['db'];var utils=require(_0x4b0d('0x5'));var logger=require(_0x4b0d('0x6'))('rpc');var config=require(_0x4b0d('0x7'));var jayson=require(_0x4b0d('0x8'));var client=jayson[_0x4b0d('0x9')][_0x4b0d('0xa')]({'port':0x232a});config[_0x4b0d('0xb')]=_[_0x4b0d('0xc')](config[_0x4b0d('0xb')],{'host':_0x4b0d('0xd'),'port':0x18eb});var socket=require(_0x4b0d('0xe'))(new Redis(config[_0x4b0d('0xb')]));require('./chatQueue.socket')[_0x4b0d('0xf')](socket);function respondWithRpcPromise(_0x5f4d47,_0x148a89,_0x3743d6){return new BPromise(function(_0x5e851f,_0x318b69){return client[_0x4b0d('0x10')](_0x5f4d47,_0x3743d6)['then'](function(_0xcf4bf5){logger[_0x4b0d('0x11')](_0x4b0d('0x12'),_0x148a89,_0x4b0d('0x13'));logger[_0x4b0d('0x14')](_0x4b0d('0x15'),_0x148a89,'request\x20sent',JSON[_0x4b0d('0x16')](_0xcf4bf5));if(_0xcf4bf5[_0x4b0d('0x17')]){if(_0xcf4bf5['error'][_0x4b0d('0x18')]===0x1f4){logger[_0x4b0d('0x17')](_0x4b0d('0x12'),_0x148a89,_0xcf4bf5[_0x4b0d('0x17')][_0x4b0d('0x19')]);return _0x318b69(_0xcf4bf5['error']['message']);}logger['error'](_0x4b0d('0x12'),_0x148a89,_0xcf4bf5['error'][_0x4b0d('0x19')]);return _0x5e851f(_0xcf4bf5[_0x4b0d('0x17')][_0x4b0d('0x19')]);}else{logger['info']('ChatQueue,\x20%s,\x20%s',_0x148a89,_0x4b0d('0x13'));_0x5e851f(_0xcf4bf5[_0x4b0d('0x1a')]['message']);}})[_0x4b0d('0x1b')](function(_0x487ab4){logger[_0x4b0d('0x17')](_0x4b0d('0x12'),_0x148a89,_0x487ab4);_0x318b69(_0x487ab4);});});}exports[_0x4b0d('0x1c')]=function(_0x2bd70f){var _0x34154f=this;return new Promise(function(_0x136eef,_0x227c25){return db[_0x4b0d('0x1d')][_0x4b0d('0x1e')]({'raw':_0x2bd70f[_0x4b0d('0x1f')]?_0x2bd70f[_0x4b0d('0x1f')][_0x4b0d('0x20')]===undefined?!![]:![]:!![],'where':_0x2bd70f['options']?_0x2bd70f['options']['where']||null:null,'attributes':_0x2bd70f[_0x4b0d('0x1f')]?_0x2bd70f[_0x4b0d('0x1f')][_0x4b0d('0x21')]||null:null,'limit':_0x2bd70f[_0x4b0d('0x1f')]?_0x2bd70f[_0x4b0d('0x1f')]['limit']||null:null,'include':_0x2bd70f['options']?_0x2bd70f[_0x4b0d('0x1f')][_0x4b0d('0x22')]?_['map'](_0x2bd70f[_0x4b0d('0x1f')][_0x4b0d('0x22')],function(_0x168243){return{'model':db[_0x168243[_0x4b0d('0x23')]],'as':_0x168243['as'],'attributes':_0x168243['attributes'],'include':_0x168243[_0x4b0d('0x22')]?_[_0x4b0d('0x24')](_0x168243['include'],function(_0x3a8ffc){return{'model':db[_0x3a8ffc[_0x4b0d('0x23')]],'as':_0x3a8ffc['as'],'attributes':_0x3a8ffc[_0x4b0d('0x21')],'include':_0x3a8ffc[_0x4b0d('0x22')]?_[_0x4b0d('0x24')](_0x3a8ffc[_0x4b0d('0x22')],function(_0x1a4ca4){return{'model':db[_0x1a4ca4['model']],'as':_0x1a4ca4['as'],'attributes':_0x1a4ca4[_0x4b0d('0x21')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x33a570){logger[_0x4b0d('0x11')]('GetChatQueue',_0x2bd70f);logger[_0x4b0d('0x14')]('GetChatQueue',_0x2bd70f,JSON[_0x4b0d('0x16')](_0x33a570));_0x136eef(_0x33a570);})[_0x4b0d('0x1b')](function(_0x33d94b){logger[_0x4b0d('0x17')](_0x4b0d('0x1c'),_0x33d94b['message'],_0x2bd70f);_0x227c25(_0x34154f[_0x4b0d('0x17')](0x1f4,_0x33d94b[_0x4b0d('0x19')]));});});};exports[_0x4b0d('0x25')]=function(_0x451e4d){var _0x109fc6=this;return new Promise(function(_0x1e9eef,_0x4904ef){return db[_0x4b0d('0x1d')][_0x4b0d('0x26')]({'raw':_0x451e4d[_0x4b0d('0x1f')]?_0x451e4d['options'][_0x4b0d('0x20')]===undefined?!![]:![]:!![],'where':_0x451e4d[_0x4b0d('0x1f')]?_0x451e4d['options'][_0x4b0d('0x27')]||null:null,'attributes':_0x451e4d[_0x4b0d('0x1f')]?_0x451e4d[_0x4b0d('0x1f')][_0x4b0d('0x21')]||null:null,'include':_0x451e4d['options']?_0x451e4d[_0x4b0d('0x1f')][_0x4b0d('0x22')]?_[_0x4b0d('0x24')](_0x451e4d['options'][_0x4b0d('0x22')],function(_0x4b9bed){return{'model':db[_0x4b9bed[_0x4b0d('0x23')]],'as':_0x4b9bed['as'],'attributes':_0x4b9bed[_0x4b0d('0x21')],'include':_0x4b9bed[_0x4b0d('0x22')]?_[_0x4b0d('0x24')](_0x4b9bed[_0x4b0d('0x22')],function(_0x4cd53b){return{'model':db[_0x4cd53b[_0x4b0d('0x23')]],'as':_0x4cd53b['as'],'attributes':_0x4cd53b[_0x4b0d('0x21')],'include':_0x4cd53b[_0x4b0d('0x22')]?_[_0x4b0d('0x24')](_0x4cd53b[_0x4b0d('0x22')],function(_0x3e71e4){return{'model':db[_0x3e71e4[_0x4b0d('0x23')]],'as':_0x3e71e4['as'],'attributes':_0x3e71e4[_0x4b0d('0x21')]};}):[]};}):[]};}):[]:[]})[_0x4b0d('0x28')](function(_0x3c7c4c){logger['info'](_0x4b0d('0x25'),_0x451e4d);logger[_0x4b0d('0x14')](_0x4b0d('0x25'),_0x451e4d,JSON['stringify'](_0x3c7c4c));_0x1e9eef(_0x3c7c4c);})[_0x4b0d('0x1b')](function(_0x487be2){logger[_0x4b0d('0x17')](_0x4b0d('0x25'),_0x487be2['message'],_0x451e4d);_0x4904ef(_0x109fc6[_0x4b0d('0x17')](0x1f4,_0x487be2['message']));});});};
\ No newline at end of file
index c91fa93..6fdd7a8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x84ab=['update','emit','removeListener','register','length','chatQueue:','./chatQueue.events','save','remove'];(function(_0x5728ba,_0x4259e2){var _0x529a3a=function(_0x36a810){while(--_0x36a810){_0x5728ba['push'](_0x5728ba['shift']());}};_0x529a3a(++_0x4259e2);}(_0x84ab,0x12f));var _0xb84a=function(_0x2eb5bc,_0x4634c6){_0x2eb5bc=_0x2eb5bc-0x0;var _0x51c7b1=_0x84ab[_0x2eb5bc];return _0x51c7b1;};'use strict';var ChatQueueEvents=require(_0xb84a('0x0'));var events=[_0xb84a('0x1'),_0xb84a('0x2'),_0xb84a('0x3')];function createListener(_0x473c3,_0x512f13){return function(_0xc83587){_0x512f13[_0xb84a('0x4')](_0x473c3,_0xc83587);};}function removeListener(_0x47b8e3,_0x9d3a00){return function(){ChatQueueEvents[_0xb84a('0x5')](_0x47b8e3,_0x9d3a00);};}exports[_0xb84a('0x6')]=function(_0x5b9def){for(var _0x521a64=0x0,_0x4dc496=events[_0xb84a('0x7')];_0x521a64<_0x4dc496;_0x521a64++){var _0x4fac4d=events[_0x521a64];var _0x3e9086=createListener(_0xb84a('0x8')+_0x4fac4d,_0x5b9def);ChatQueueEvents['on'](_0x4fac4d,_0x3e9086);}};
\ No newline at end of file
+var _0x55e0=['emit','removeListener','register','chatQueue:','./chatQueue.events','save','remove','update'];(function(_0x5a7f64,_0x347d57){var _0x3d30f1=function(_0x4bd1d6){while(--_0x4bd1d6){_0x5a7f64['push'](_0x5a7f64['shift']());}};_0x3d30f1(++_0x347d57);}(_0x55e0,0xdc));var _0x055e=function(_0x15cfa2,_0x23b1e1){_0x15cfa2=_0x15cfa2-0x0;var _0x2b04f2=_0x55e0[_0x15cfa2];return _0x2b04f2;};'use strict';var ChatQueueEvents=require(_0x055e('0x0'));var events=[_0x055e('0x1'),_0x055e('0x2'),_0x055e('0x3')];function createListener(_0x5b82b9,_0x578882){return function(_0x3a2ee6){_0x578882[_0x055e('0x4')](_0x5b82b9,_0x3a2ee6);};}function removeListener(_0x33cd7b,_0x2773e4){return function(){ChatQueueEvents[_0x055e('0x5')](_0x33cd7b,_0x2773e4);};}exports[_0x055e('0x6')]=function(_0x490ee1){for(var _0x5239f6=0x0,_0x4384ff=events['length'];_0x5239f6<_0x4384ff;_0x5239f6++){var _0x8e7824=events[_0x5239f6];var _0x3c4cf=createListener(_0x055e('0x7')+_0x8e7824,_0x490ee1);ChatQueueEvents['on'](_0x8e7824,_0x3c4cf);}};
\ No newline at end of file
index 3681bd4..fde7086 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9957=['connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./chatQueue.controller','get','isAuthenticated','index','/describe','describe','show','/:id/members','getMembers','getTeams','/:id/users','getAgents','post','create','addTeams','addAgents','put','/:id','delete','destroy','/:id/teams','removeTeams','multer','util','path'];(function(_0x384b0a,_0x4aff7c){var _0x10a10b=function(_0x4ef092){while(--_0x4ef092){_0x384b0a['push'](_0x384b0a['shift']());}};_0x10a10b(++_0x4aff7c);}(_0x9957,0x93));var _0x7995=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0x9957[_0x4cf98e];return _0x1623ac;};'use strict';var multer=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var path=require(_0x7995('0x2'));var timeout=require(_0x7995('0x3'));var express=require('express');var router=express[_0x7995('0x4')]();var fs_extra=require(_0x7995('0x5'));var auth=require(_0x7995('0x6'));var interaction=require(_0x7995('0x7'));var config=require('../../config/environment');var controller=require(_0x7995('0x8'));router[_0x7995('0x9')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0xb')]);router[_0x7995('0x9')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0xd')]);router[_0x7995('0x9')]('/:id',auth[_0x7995('0xa')](),controller[_0x7995('0xe')]);router[_0x7995('0x9')](_0x7995('0xf'),auth[_0x7995('0xa')](),controller[_0x7995('0x10')]);router[_0x7995('0x9')]('/:id/teams',auth[_0x7995('0xa')](),controller[_0x7995('0x11')]);router['get'](_0x7995('0x12'),auth[_0x7995('0xa')](),controller[_0x7995('0x13')]);router[_0x7995('0x14')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0x15')]);router[_0x7995('0x14')]('/:id/teams',auth['isAuthenticated'](),controller[_0x7995('0x16')]);router[_0x7995('0x14')](_0x7995('0x12'),auth[_0x7995('0xa')](),controller[_0x7995('0x17')]);router[_0x7995('0x18')](_0x7995('0x19'),auth[_0x7995('0xa')](),controller['update']);router[_0x7995('0x1a')]('/:id',auth[_0x7995('0xa')](),controller[_0x7995('0x1b')]);router[_0x7995('0x1a')](_0x7995('0x1c'),auth[_0x7995('0xa')](),controller[_0x7995('0x1d')]);router['delete']('/:id/users',auth[_0x7995('0xa')](),controller['removeAgents']);module['exports']=router;
\ No newline at end of file
+var _0x3e74=['../../config/environment','./chatQueue.controller','get','isAuthenticated','index','/describe','describe','/:id','show','getMembers','/:id/teams','getTeams','getAgents','post','addTeams','addAgents','put','delete','removeTeams','/:id/users','removeAgents','exports','multer','path','connect-timeout','express','../../components/auth/service'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0x3e74,0x175));var _0x43e7=function(_0x1103df,_0x2cbaae){_0x1103df=_0x1103df-0x0;var _0x240409=_0x3e74[_0x1103df];return _0x240409;};'use strict';var multer=require(_0x43e7('0x0'));var util=require('util');var path=require(_0x43e7('0x1'));var timeout=require(_0x43e7('0x2'));var express=require(_0x43e7('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x43e7('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x43e7('0x5'));var controller=require(_0x43e7('0x6'));router[_0x43e7('0x7')]('/',auth[_0x43e7('0x8')](),controller[_0x43e7('0x9')]);router['get'](_0x43e7('0xa'),auth[_0x43e7('0x8')](),controller[_0x43e7('0xb')]);router[_0x43e7('0x7')](_0x43e7('0xc'),auth['isAuthenticated'](),controller[_0x43e7('0xd')]);router['get']('/:id/members',auth[_0x43e7('0x8')](),controller[_0x43e7('0xe')]);router['get'](_0x43e7('0xf'),auth['isAuthenticated'](),controller[_0x43e7('0x10')]);router[_0x43e7('0x7')]('/:id/users',auth[_0x43e7('0x8')](),controller[_0x43e7('0x11')]);router[_0x43e7('0x12')]('/',auth[_0x43e7('0x8')](),controller['create']);router['post'](_0x43e7('0xf'),auth[_0x43e7('0x8')](),controller[_0x43e7('0x13')]);router['post']('/:id/users',auth[_0x43e7('0x8')](),controller[_0x43e7('0x14')]);router[_0x43e7('0x15')](_0x43e7('0xc'),auth['isAuthenticated'](),controller['update']);router[_0x43e7('0x16')](_0x43e7('0xc'),auth[_0x43e7('0x8')](),controller['destroy']);router['delete'](_0x43e7('0xf'),auth[_0x43e7('0x8')](),controller[_0x43e7('0x17')]);router[_0x43e7('0x16')](_0x43e7('0x18'),auth[_0x43e7('0x8')](),controller[_0x43e7('0x19')]);module[_0x43e7('0x1a')]=router;
\ No newline at end of file
index e4bb90e..219f772 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3691=['moment','sequelize','STRING','DATE'];(function(_0x1d9aa0,_0x272488){var _0x226868=function(_0x17127c){while(--_0x17127c){_0x1d9aa0['push'](_0x1d9aa0['shift']());}};_0x226868(++_0x272488);}(_0x3691,0xac));var _0x1369=function(_0x1789e7,_0x4b22c1){_0x1789e7=_0x1789e7-0x0;var _0x4daf76=_0x3691[_0x1789e7];return _0x4daf76;};'use strict';var moment=require(_0x1369('0x0'));var Sequelize=require(_0x1369('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0x1369('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0x1369('0x2')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x1369('0x3')]},'acceptAt':{'type':Sequelize[_0x1369('0x3')]},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize[_0x1369('0x2')]}};
\ No newline at end of file
+var _0xc0f9=['DATE','moment','sequelize','exports','STRING'];(function(_0x58999b,_0xea4695){var _0x5efc3a=function(_0x98de31){while(--_0x98de31){_0x58999b['push'](_0x58999b['shift']());}};_0x5efc3a(++_0xea4695);}(_0xc0f9,0x119));var _0x9c0f=function(_0x1b5a05,_0x2c80de){_0x1b5a05=_0x1b5a05-0x0;var _0x347931=_0xc0f9[_0x1b5a05];return _0x347931;};'use strict';var moment=require(_0x9c0f('0x0'));var Sequelize=require(_0x9c0f('0x1'));module[_0x9c0f('0x2')]={'uniqueid':{'type':Sequelize[_0x9c0f('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0x9c0f('0x3')]},'joinAt':{'type':Sequelize[_0x9c0f('0x4')]},'leaveAt':{'type':Sequelize[_0x9c0f('0x4')]},'acceptAt':{'type':Sequelize[_0x9c0f('0x4')]},'exitAt':{'type':Sequelize[_0x9c0f('0x4')]},'reason':{'type':Sequelize['STRING']}};
\ No newline at end of file
index de56218..dd0dcaa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb1ad=['rows','catch','show','params','find','create','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','destroy','stack','name','send','index','ChatQueueReport','rawAttributes','type','key','model','map','query','keys','intersection','attributes','fields','length','order','sort','pick','filters','filter','where','merge','options','then','includeAll','include'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xb1ad,0x184));var _0xdb1a=function(_0x24259d,_0x64a194){_0x24259d=_0x24259d-0x0;var _0x5a701=_0xb1ad[_0x24259d];return _0x5a701;};'use strict';var emlformat=require(_0xdb1a('0x0'));var rimraf=require(_0xdb1a('0x1'));var zipdir=require(_0xdb1a('0x2'));var jsonpatch=require(_0xdb1a('0x3'));var rp=require(_0xdb1a('0x4'));var moment=require(_0xdb1a('0x5'));var BPromise=require('bluebird');var Mustache=require(_0xdb1a('0x6'));var util=require(_0xdb1a('0x7'));var path=require(_0xdb1a('0x8'));var sox=require(_0xdb1a('0x9'));var csv=require(_0xdb1a('0xa'));var ejs=require(_0xdb1a('0xb'));var fs=require('fs');var fs_extra=require(_0xdb1a('0xc'));var _=require(_0xdb1a('0xd'));var squel=require(_0xdb1a('0xe'));var crypto=require(_0xdb1a('0xf'));var jsforce=require(_0xdb1a('0x10'));var deskjs=require(_0xdb1a('0x11'));var toCsv=require(_0xdb1a('0xa'));var querystring=require(_0xdb1a('0x12'));var Papa=require(_0xdb1a('0x13'));var Redis=require('ioredis');var authService=require(_0xdb1a('0x14'));var qs=require(_0xdb1a('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xdb1a('0x16'));var utils=require(_0xdb1a('0x17'));var config=require(_0xdb1a('0x18'));var licenseUtil=require(_0xdb1a('0x19'));var db=require(_0xdb1a('0x1a'))['db'];function respondWithStatusCode(_0x31ccd3,_0x3ca28b){_0x3ca28b=_0x3ca28b||0xcc;return function(_0x1c40c8){if(_0x1c40c8){return _0x31ccd3[_0xdb1a('0x1b')](_0x3ca28b);}return _0x31ccd3[_0xdb1a('0x1c')](_0x3ca28b)[_0xdb1a('0x1d')]();};}function respondWithResult(_0x1d69dd,_0x857c00){_0x857c00=_0x857c00||0xc8;return function(_0x5aa761){if(_0x5aa761){return _0x1d69dd[_0xdb1a('0x1c')](_0x857c00)[_0xdb1a('0x1e')](_0x5aa761);}};}function respondWithFilteredResult(_0x112be1,_0x4bdec7){return function(_0x28dfe9){if(_0x28dfe9){var _0x504d92=typeof _0x4bdec7[_0xdb1a('0x1f')]===_0xdb1a('0x20')&&typeof _0x4bdec7[_0xdb1a('0x21')]==='undefined';var _0x9ffb77=_0x28dfe9[_0xdb1a('0x22')];var _0x268ce8=_0x504d92?0x0:_0x4bdec7['offset'];var _0xe3780b=_0x504d92?_0x28dfe9[_0xdb1a('0x22')]:_0x4bdec7[_0xdb1a('0x1f')]+_0x4bdec7[_0xdb1a('0x21')];var _0x37e10c;if(_0xe3780b>=_0x9ffb77){_0xe3780b=_0x9ffb77;_0x37e10c=0xc8;}else{_0x37e10c=0xce;}_0x112be1[_0xdb1a('0x1c')](_0x37e10c);return _0x112be1['set'](_0xdb1a('0x23'),_0x268ce8+'-'+_0xe3780b+'/'+_0x9ffb77)[_0xdb1a('0x1e')](_0x28dfe9);}return null;};}function patchUpdates(_0x386e32){return function(_0x37b776){try{jsonpatch[_0xdb1a('0x24')](_0x37b776,_0x386e32,!![]);}catch(_0x400397){return BPromise[_0xdb1a('0x25')](_0x400397);}return _0x37b776[_0xdb1a('0x26')]();};}function saveUpdates(_0x3a9b3a,_0xc92d26){return function(_0x4d1d09){if(_0x4d1d09){return _0x4d1d09[_0xdb1a('0x27')](_0x3a9b3a)['then'](function(_0x28ccfe){return _0x28ccfe;});}return null;};}function removeEntity(_0x2cc1aa,_0x3d07fc){return function(_0x5d3d24){if(_0x5d3d24){return _0x5d3d24[_0xdb1a('0x28')]()['then'](function(){_0x2cc1aa[_0xdb1a('0x1c')](0xcc)[_0xdb1a('0x1d')]();});}};}function handleEntityNotFound(_0x22c95e,_0x157c6a){return function(_0xaa6f2e){if(!_0xaa6f2e){_0x22c95e[_0xdb1a('0x1b')](0x194);}return _0xaa6f2e;};}function handleError(_0x22c260,_0x2e814e){_0x2e814e=_0x2e814e||0x1f4;return function(_0x5c963b){logger['error'](_0x5c963b[_0xdb1a('0x29')]);if(_0x5c963b[_0xdb1a('0x2a')]){delete _0x5c963b[_0xdb1a('0x2a')];}_0x22c260[_0xdb1a('0x1c')](_0x2e814e)[_0xdb1a('0x2b')](_0x5c963b);};}exports[_0xdb1a('0x2c')]=function(_0x5d1514,_0x3ec2f6){var _0x51f0ff={},_0x5a67c4={},_0xbfa09f={'count':0x0,'rows':[]};var _0x51a26d=_['map'](db[_0xdb1a('0x2d')][_0xdb1a('0x2e')],function(_0x46d019){return{'name':_0x46d019['fieldName'],'type':_0x46d019[_0xdb1a('0x2f')][_0xdb1a('0x30')]};});_0x5a67c4[_0xdb1a('0x31')]=_[_0xdb1a('0x32')](_0x51a26d,'name');_0x5a67c4[_0xdb1a('0x33')]=_[_0xdb1a('0x34')](_0x5d1514[_0xdb1a('0x33')]);_0x5a67c4['filters']=_[_0xdb1a('0x35')](_0x5a67c4[_0xdb1a('0x31')],_0x5a67c4[_0xdb1a('0x33')]);_0x51f0ff[_0xdb1a('0x36')]=_['intersection'](_0x5a67c4['model'],qs['fields'](_0x5d1514[_0xdb1a('0x33')][_0xdb1a('0x37')]));_0x51f0ff['attributes']=_0x51f0ff[_0xdb1a('0x36')][_0xdb1a('0x38')]?_0x51f0ff[_0xdb1a('0x36')]:_0x5a67c4[_0xdb1a('0x31')];if(!_0x5d1514[_0xdb1a('0x33')]['hasOwnProperty']('nolimit')){_0x51f0ff['limit']=qs[_0xdb1a('0x21')](_0x5d1514['query']['limit']);_0x51f0ff[_0xdb1a('0x1f')]=qs[_0xdb1a('0x1f')](_0x5d1514['query'][_0xdb1a('0x1f')]);}_0x51f0ff[_0xdb1a('0x39')]=qs[_0xdb1a('0x3a')](_0x5d1514[_0xdb1a('0x33')][_0xdb1a('0x3a')]);_0x51f0ff['where']=qs['filters'](_[_0xdb1a('0x3b')](_0x5d1514[_0xdb1a('0x33')],_0x5a67c4[_0xdb1a('0x3c')]),_0x51a26d);if(_0x5d1514[_0xdb1a('0x33')][_0xdb1a('0x3d')]){_0x51f0ff[_0xdb1a('0x3e')]=_[_0xdb1a('0x3f')](_0x51f0ff['where'],{'$or':_[_0xdb1a('0x32')](_0x51a26d,function(_0x5ba671){if(_0x5ba671['type']!=='VIRTUAL'){var _0x4a4366={};_0x4a4366[_0x5ba671[_0xdb1a('0x2a')]]={'$like':'%'+_0x5d1514[_0xdb1a('0x33')][_0xdb1a('0x3d')]+'%'};return _0x4a4366;}})});}_0x51f0ff=_[_0xdb1a('0x3f')]({},_0x51f0ff,_0x5d1514[_0xdb1a('0x40')]);var _0x5f535d={'where':_0x51f0ff[_0xdb1a('0x3e')]};return db[_0xdb1a('0x2d')][_0xdb1a('0x22')](_0x5f535d)[_0xdb1a('0x41')](function(_0xcffe52){_0xbfa09f[_0xdb1a('0x22')]=_0xcffe52;if(_0x5d1514[_0xdb1a('0x33')][_0xdb1a('0x42')]){_0x51f0ff[_0xdb1a('0x43')]=[{'all':!![]}];}return db[_0xdb1a('0x2d')]['findAll'](_0x51f0ff);})['then'](function(_0x43e27a){_0xbfa09f[_0xdb1a('0x44')]=_0x43e27a;return _0xbfa09f;})[_0xdb1a('0x41')](respondWithFilteredResult(_0x3ec2f6,_0x51f0ff))[_0xdb1a('0x45')](handleError(_0x3ec2f6,null));};exports[_0xdb1a('0x46')]=function(_0x4572d,_0x149fd6){var _0xad79f2={'raw':!![],'where':{'id':_0x4572d[_0xdb1a('0x47')]['id']}},_0xcb156c={};_0xcb156c[_0xdb1a('0x31')]=_[_0xdb1a('0x34')](db[_0xdb1a('0x2d')]['rawAttributes']);_0xcb156c[_0xdb1a('0x33')]=_[_0xdb1a('0x34')](_0x4572d[_0xdb1a('0x33')]);_0xcb156c[_0xdb1a('0x3c')]=_[_0xdb1a('0x35')](_0xcb156c[_0xdb1a('0x31')],_0xcb156c[_0xdb1a('0x33')]);_0xad79f2['attributes']=_['intersection'](_0xcb156c['model'],qs[_0xdb1a('0x37')](_0x4572d[_0xdb1a('0x33')]['fields']));_0xad79f2[_0xdb1a('0x36')]=_0xad79f2[_0xdb1a('0x36')]['length']?_0xad79f2['attributes']:_0xcb156c[_0xdb1a('0x31')];if(_0x4572d[_0xdb1a('0x33')]['includeAll']){_0xad79f2[_0xdb1a('0x43')]=[{'all':!![]}];}_0xad79f2=_[_0xdb1a('0x3f')]({},_0xad79f2,_0x4572d[_0xdb1a('0x40')]);return db['ChatQueueReport'][_0xdb1a('0x48')](_0xad79f2)[_0xdb1a('0x41')](handleEntityNotFound(_0x149fd6,null))[_0xdb1a('0x41')](respondWithResult(_0x149fd6,null))[_0xdb1a('0x45')](handleError(_0x149fd6,null));};exports['create']=function(_0x37aa5e,_0x452aa8){return db[_0xdb1a('0x2d')][_0xdb1a('0x49')](_0x37aa5e['body'],{})[_0xdb1a('0x41')](respondWithResult(_0x452aa8,0xc9))[_0xdb1a('0x45')](handleError(_0x452aa8,null));};exports[_0xdb1a('0x27')]=function(_0x367b1f,_0x40b193){if(_0x367b1f[_0xdb1a('0x4a')]['id']){delete _0x367b1f[_0xdb1a('0x4a')]['id'];}return db[_0xdb1a('0x2d')][_0xdb1a('0x48')]({'where':{'id':_0x367b1f[_0xdb1a('0x47')]['id']}})['then'](handleEntityNotFound(_0x40b193,null))['then'](saveUpdates(_0x367b1f['body'],null))[_0xdb1a('0x41')](respondWithResult(_0x40b193,null))[_0xdb1a('0x45')](handleError(_0x40b193,null));};exports[_0xdb1a('0x28')]=function(_0x3b018c,_0x32faa7){return db[_0xdb1a('0x2d')][_0xdb1a('0x48')]({'where':{'id':_0x3b018c['params']['id']}})['then'](handleEntityNotFound(_0x32faa7,null))['then'](removeEntity(_0x32faa7,null))['catch'](handleError(_0x32faa7,null));};exports[_0xdb1a('0x4b')]=function(_0x1f6115,_0x5663f1){return db['ChatQueueReport']['describe']()[_0xdb1a('0x41')](respondWithResult(_0x5663f1,null))[_0xdb1a('0x45')](handleError(_0x5663f1,null));};
\ No newline at end of file
+var _0x7524=['../../mysqldb','sendStatus','status','json','undefined','limit','offset','count','set','Content-Range','apply','reject','save','update','then','destroy','end','stack','name','send','index','map','ChatQueueReport','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','rows','params','find','catch','create','body','describe','rimraf','zip-dir','request-promise','moment','util','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util'];(function(_0x2aea9e,_0x1f587f){var _0x430b92=function(_0x416c37){while(--_0x416c37){_0x2aea9e['push'](_0x2aea9e['shift']());}};_0x430b92(++_0x1f587f);}(_0x7524,0xce));var _0x4752=function(_0x21b77f,_0x5654b0){_0x21b77f=_0x21b77f-0x0;var _0x175712=_0x7524[_0x21b77f];return _0x175712;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x4752('0x0'));var zipdir=require(_0x4752('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x4752('0x2'));var moment=require(_0x4752('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x4752('0x4'));var path=require('path');var sox=require(_0x4752('0x5'));var csv=require(_0x4752('0x6'));var ejs=require(_0x4752('0x7'));var fs=require('fs');var fs_extra=require(_0x4752('0x8'));var _=require(_0x4752('0x9'));var squel=require('squel');var crypto=require(_0x4752('0xa'));var jsforce=require(_0x4752('0xb'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x4752('0xc'));var Papa=require(_0x4752('0xd'));var Redis=require(_0x4752('0xe'));var authService=require(_0x4752('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x4752('0x10'));var hardwareService=require(_0x4752('0x11'));var logger=require(_0x4752('0x12'))(_0x4752('0x13'));var utils=require(_0x4752('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0x4752('0x15'));var db=require(_0x4752('0x16'))['db'];function respondWithStatusCode(_0x404e5a,_0x2724dd){_0x2724dd=_0x2724dd||0xcc;return function(_0xe6023b){if(_0xe6023b){return _0x404e5a[_0x4752('0x17')](_0x2724dd);}return _0x404e5a[_0x4752('0x18')](_0x2724dd)['end']();};}function respondWithResult(_0xefacbb,_0x479a02){_0x479a02=_0x479a02||0xc8;return function(_0x38e6bb){if(_0x38e6bb){return _0xefacbb[_0x4752('0x18')](_0x479a02)[_0x4752('0x19')](_0x38e6bb);}};}function respondWithFilteredResult(_0x17a8b8,_0x2e53e4){return function(_0x33131a){if(_0x33131a){var _0x410f88=typeof _0x2e53e4['offset']===_0x4752('0x1a')&&typeof _0x2e53e4[_0x4752('0x1b')]==='undefined';var _0x2b80b7=_0x33131a['count'];var _0x1429f4=_0x410f88?0x0:_0x2e53e4[_0x4752('0x1c')];var _0x516f3e=_0x410f88?_0x33131a[_0x4752('0x1d')]:_0x2e53e4['offset']+_0x2e53e4['limit'];var _0x285688;if(_0x516f3e>=_0x2b80b7){_0x516f3e=_0x2b80b7;_0x285688=0xc8;}else{_0x285688=0xce;}_0x17a8b8[_0x4752('0x18')](_0x285688);return _0x17a8b8[_0x4752('0x1e')](_0x4752('0x1f'),_0x1429f4+'-'+_0x516f3e+'/'+_0x2b80b7)[_0x4752('0x19')](_0x33131a);}return null;};}function patchUpdates(_0x3142b){return function(_0x55c67c){try{jsonpatch[_0x4752('0x20')](_0x55c67c,_0x3142b,!![]);}catch(_0x2d2f9e){return BPromise[_0x4752('0x21')](_0x2d2f9e);}return _0x55c67c[_0x4752('0x22')]();};}function saveUpdates(_0x3facf5,_0xaa95a4){return function(_0x593c2d){if(_0x593c2d){return _0x593c2d[_0x4752('0x23')](_0x3facf5)[_0x4752('0x24')](function(_0x54a0bd){return _0x54a0bd;});}return null;};}function removeEntity(_0x11725c,_0x403005){return function(_0x1e4e86){if(_0x1e4e86){return _0x1e4e86[_0x4752('0x25')]()[_0x4752('0x24')](function(){_0x11725c[_0x4752('0x18')](0xcc)[_0x4752('0x26')]();});}};}function handleEntityNotFound(_0x45c557,_0xca8dd1){return function(_0x2c259a){if(!_0x2c259a){_0x45c557['sendStatus'](0x194);}return _0x2c259a;};}function handleError(_0x113cd5,_0x560df8){_0x560df8=_0x560df8||0x1f4;return function(_0x4b2635){logger['error'](_0x4b2635[_0x4752('0x27')]);if(_0x4b2635[_0x4752('0x28')]){delete _0x4b2635[_0x4752('0x28')];}_0x113cd5[_0x4752('0x18')](_0x560df8)[_0x4752('0x29')](_0x4b2635);};}exports[_0x4752('0x2a')]=function(_0xd27309,_0x1dbba0){var _0x486c11={},_0x5745c0={},_0x2e0811={'count':0x0,'rows':[]};var _0x2c3d6d=_[_0x4752('0x2b')](db[_0x4752('0x2c')][_0x4752('0x2d')],function(_0xf8c5f9){return{'name':_0xf8c5f9[_0x4752('0x2e')],'type':_0xf8c5f9[_0x4752('0x2f')][_0x4752('0x30')]};});_0x5745c0[_0x4752('0x31')]=_[_0x4752('0x2b')](_0x2c3d6d,_0x4752('0x28'));_0x5745c0[_0x4752('0x32')]=_[_0x4752('0x33')](_0xd27309[_0x4752('0x32')]);_0x5745c0[_0x4752('0x34')]=_['intersection'](_0x5745c0['model'],_0x5745c0[_0x4752('0x32')]);_0x486c11[_0x4752('0x35')]=_[_0x4752('0x36')](_0x5745c0[_0x4752('0x31')],qs[_0x4752('0x37')](_0xd27309[_0x4752('0x32')][_0x4752('0x37')]));_0x486c11[_0x4752('0x35')]=_0x486c11[_0x4752('0x35')][_0x4752('0x38')]?_0x486c11['attributes']:_0x5745c0[_0x4752('0x31')];if(!_0xd27309['query'][_0x4752('0x39')](_0x4752('0x3a'))){_0x486c11[_0x4752('0x1b')]=qs[_0x4752('0x1b')](_0xd27309[_0x4752('0x32')]['limit']);_0x486c11[_0x4752('0x1c')]=qs['offset'](_0xd27309[_0x4752('0x32')][_0x4752('0x1c')]);}_0x486c11[_0x4752('0x3b')]=qs[_0x4752('0x3c')](_0xd27309[_0x4752('0x32')][_0x4752('0x3c')]);_0x486c11[_0x4752('0x3d')]=qs[_0x4752('0x34')](_[_0x4752('0x3e')](_0xd27309[_0x4752('0x32')],_0x5745c0['filters']),_0x2c3d6d);if(_0xd27309[_0x4752('0x32')][_0x4752('0x3f')]){_0x486c11[_0x4752('0x3d')]=_[_0x4752('0x40')](_0x486c11[_0x4752('0x3d')],{'$or':_[_0x4752('0x2b')](_0x2c3d6d,function(_0x317547){if(_0x317547[_0x4752('0x2f')]!=='VIRTUAL'){var _0x2f6928={};_0x2f6928[_0x317547['name']]={'$like':'%'+_0xd27309[_0x4752('0x32')][_0x4752('0x3f')]+'%'};return _0x2f6928;}})});}_0x486c11=_[_0x4752('0x40')]({},_0x486c11,_0xd27309[_0x4752('0x41')]);var _0x5e32c4={'where':_0x486c11['where']};return db['ChatQueueReport']['count'](_0x5e32c4)[_0x4752('0x24')](function(_0x81303e){_0x2e0811['count']=_0x81303e;if(_0xd27309[_0x4752('0x32')][_0x4752('0x42')]){_0x486c11[_0x4752('0x43')]=[{'all':!![]}];}return db['ChatQueueReport'][_0x4752('0x44')](_0x486c11);})[_0x4752('0x24')](function(_0x1ad9d2){_0x2e0811[_0x4752('0x45')]=_0x1ad9d2;return _0x2e0811;})[_0x4752('0x24')](respondWithFilteredResult(_0x1dbba0,_0x486c11))['catch'](handleError(_0x1dbba0,null));};exports['show']=function(_0x3fdbff,_0x31cef5){var _0x828534={'raw':!![],'where':{'id':_0x3fdbff[_0x4752('0x46')]['id']}},_0x222f82={};_0x222f82[_0x4752('0x31')]=_[_0x4752('0x33')](db[_0x4752('0x2c')][_0x4752('0x2d')]);_0x222f82[_0x4752('0x32')]=_[_0x4752('0x33')](_0x3fdbff[_0x4752('0x32')]);_0x222f82['filters']=_[_0x4752('0x36')](_0x222f82['model'],_0x222f82[_0x4752('0x32')]);_0x828534[_0x4752('0x35')]=_['intersection'](_0x222f82[_0x4752('0x31')],qs[_0x4752('0x37')](_0x3fdbff[_0x4752('0x32')][_0x4752('0x37')]));_0x828534[_0x4752('0x35')]=_0x828534[_0x4752('0x35')]['length']?_0x828534[_0x4752('0x35')]:_0x222f82[_0x4752('0x31')];if(_0x3fdbff[_0x4752('0x32')][_0x4752('0x42')]){_0x828534[_0x4752('0x43')]=[{'all':!![]}];}_0x828534=_[_0x4752('0x40')]({},_0x828534,_0x3fdbff['options']);return db[_0x4752('0x2c')][_0x4752('0x47')](_0x828534)[_0x4752('0x24')](handleEntityNotFound(_0x31cef5,null))[_0x4752('0x24')](respondWithResult(_0x31cef5,null))[_0x4752('0x48')](handleError(_0x31cef5,null));};exports[_0x4752('0x49')]=function(_0x47d096,_0x335912){return db['ChatQueueReport']['create'](_0x47d096[_0x4752('0x4a')],{})[_0x4752('0x24')](respondWithResult(_0x335912,0xc9))[_0x4752('0x48')](handleError(_0x335912,null));};exports['update']=function(_0x1a92c6,_0x1ebb03){if(_0x1a92c6['body']['id']){delete _0x1a92c6[_0x4752('0x4a')]['id'];}return db[_0x4752('0x2c')][_0x4752('0x47')]({'where':{'id':_0x1a92c6['params']['id']}})[_0x4752('0x24')](handleEntityNotFound(_0x1ebb03,null))[_0x4752('0x24')](saveUpdates(_0x1a92c6[_0x4752('0x4a')],null))[_0x4752('0x24')](respondWithResult(_0x1ebb03,null))[_0x4752('0x48')](handleError(_0x1ebb03,null));};exports[_0x4752('0x25')]=function(_0x54389f,_0x3b7db0){return db['ChatQueueReport'][_0x4752('0x47')]({'where':{'id':_0x54389f[_0x4752('0x46')]['id']}})['then'](handleEntityNotFound(_0x3b7db0,null))['then'](removeEntity(_0x3b7db0,null))['catch'](handleError(_0x3b7db0,null));};exports['describe']=function(_0x4cf5ac,_0x3ebf27){return db[_0x4752('0x2c')][_0x4752('0x4b')]()[_0x4752('0x24')](respondWithResult(_0x3ebf27,null))['catch'](handleError(_0x3ebf27,null));};
\ No newline at end of file
index 0165b75..24f9788 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0713=['../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./chatQueueReport.attributes','exports','define','ChatQueueReport','report_chat_queue','uniqueid'];(function(_0x2dbcef,_0x1cfecb){var _0x5a90ea=function(_0x189054){while(--_0x189054){_0x2dbcef['push'](_0x2dbcef['shift']());}};_0x5a90ea(++_0x1cfecb);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x3071('0x0'))(_0x3071('0x1'));var moment=require(_0x3071('0x2'));var BPromise=require(_0x3071('0x3'));var rp=require(_0x3071('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));var attributes=require(_0x3071('0x7'));module[_0x3071('0x8')]=function(_0xabd7b6,_0x41cf76){return _0xabd7b6[_0x3071('0x9')](_0x3071('0xa'),attributes,{'tableName':_0x3071('0xb'),'paranoid':![],'indexes':[{'name':_0x3071('0xc'),'fields':[_0x3071('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xb7e7=['../../config/logger','moment','request-promise','rimraf','../../config/environment','./chatQueueReport.attributes','define','ChatQueueReport','uniqueid','lodash'];(function(_0x230d6d,_0x32fcdc){var _0x3e36a2=function(_0x35a9ae){while(--_0x35a9ae){_0x230d6d['push'](_0x230d6d['shift']());}};_0x3e36a2(++_0x32fcdc);}(_0xb7e7,0x121));var _0x7b7e=function(_0x1ccdf7,_0x215d5a){_0x1ccdf7=_0x1ccdf7-0x0;var _0x52a0ae=_0xb7e7[_0x1ccdf7];return _0x52a0ae;};'use strict';var _=require(_0x7b7e('0x0'));var util=require('util');var logger=require(_0x7b7e('0x1'))('api');var moment=require(_0x7b7e('0x2'));var BPromise=require('bluebird');var rp=require(_0x7b7e('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x7b7e('0x4'));var config=require(_0x7b7e('0x5'));var attributes=require(_0x7b7e('0x6'));module['exports']=function(_0x53ed64,_0x333fa4){return _0x53ed64[_0x7b7e('0x7')](_0x7b7e('0x8'),attributes,{'tableName':'report_chat_queue','paranoid':![],'indexes':[{'name':_0x7b7e('0x9'),'fields':[_0x7b7e('0x9')]}],'timestamps':!![]});};
\ No newline at end of file
index 6d6f7eb..f4cefe0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x895d=['ChatQueueReport','create','body','options','raw','CreateChatQueueReport','UpdateChatQueueReport','update','attributes','limit','stringify','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','ChatQueueReport,\x20%s,\x20%s','request\x20sent','debug','ChatQueueReport,\x20%s,\x20%s,\x20%s','error','message','result','catch'];(function(_0x4cf87e,_0x31894e){var _0x42e41e=function(_0x515278){while(--_0x515278){_0x4cf87e['push'](_0x4cf87e['shift']());}};_0x42e41e(++_0x31894e);}(_0x895d,0x181));var _0xd895=function(_0x1b8241,_0x3a359e){_0x1b8241=_0x1b8241-0x0;var _0x22ac33=_0x895d[_0x1b8241];return _0x22ac33;};'use strict';var _=require(_0xd895('0x0'));var util=require(_0xd895('0x1'));var moment=require(_0xd895('0x2'));var BPromise=require('bluebird');var rs=require(_0xd895('0x3'));var fs=require('fs');var Redis=require(_0xd895('0x4'));var db=require(_0xd895('0x5'))['db'];var utils=require(_0xd895('0x6'));var logger=require(_0xd895('0x7'))(_0xd895('0x8'));var config=require('../../config/environment');var jayson=require(_0xd895('0x9'));var client=jayson[_0xd895('0xa')][_0xd895('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x6a3e2c,_0x13bffa,_0x9048bb){return new BPromise(function(_0x2199b2,_0x31769f){return client[_0xd895('0xc')](_0x6a3e2c,_0x9048bb)[_0xd895('0xd')](function(_0x557bfb){logger[_0xd895('0xe')](_0xd895('0xf'),_0x13bffa,_0xd895('0x10'));logger[_0xd895('0x11')](_0xd895('0x12'),_0x13bffa,_0xd895('0x10'),JSON['stringify'](_0x557bfb));if(_0x557bfb[_0xd895('0x13')]){if(_0x557bfb['error']['code']===0x1f4){logger[_0xd895('0x13')](_0xd895('0xf'),_0x13bffa,_0x557bfb[_0xd895('0x13')][_0xd895('0x14')]);return _0x31769f(_0x557bfb[_0xd895('0x13')][_0xd895('0x14')]);}logger['error']('ChatQueueReport,\x20%s,\x20%s',_0x13bffa,_0x557bfb[_0xd895('0x13')]['message']);return _0x2199b2(_0x557bfb['error'][_0xd895('0x14')]);}else{logger[_0xd895('0xe')]('ChatQueueReport,\x20%s,\x20%s',_0x13bffa,_0xd895('0x10'));_0x2199b2(_0x557bfb[_0xd895('0x15')]['message']);}})[_0xd895('0x16')](function(_0x4d7147){logger[_0xd895('0x13')](_0xd895('0xf'),_0x13bffa,_0x4d7147);_0x31769f(_0x4d7147);});});}exports['CreateChatQueueReport']=function(_0x26258f){var _0x12a3e2=this;return new Promise(function(_0x1c07bb,_0x44462b){return db[_0xd895('0x17')][_0xd895('0x18')](_0x26258f[_0xd895('0x19')],{'raw':_0x26258f[_0xd895('0x1a')]?_0x26258f[_0xd895('0x1a')][_0xd895('0x1b')]===undefined?!![]:![]:!![]})[_0xd895('0xd')](function(_0xfe7c0){logger[_0xd895('0xe')]('CreateChatQueueReport',_0x26258f);logger[_0xd895('0x11')](_0xd895('0x1c'),_0x26258f,JSON['stringify'](_0xfe7c0));_0x1c07bb(_0xfe7c0);})[_0xd895('0x16')](function(_0x2078ff){logger[_0xd895('0x13')]('CreateChatQueueReport',_0x2078ff[_0xd895('0x14')],_0x26258f);_0x44462b(_0x12a3e2[_0xd895('0x13')](0x1f4,_0x2078ff[_0xd895('0x14')]));});});};exports[_0xd895('0x1d')]=function(_0x13eddb){var _0x3f7d17=this;return new Promise(function(_0x36b4ef,_0x29f01a){return db['ChatQueueReport'][_0xd895('0x1e')](_0x13eddb['body'],{'raw':_0x13eddb[_0xd895('0x1a')]?_0x13eddb[_0xd895('0x1a')][_0xd895('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x13eddb[_0xd895('0x1a')]?_0x13eddb[_0xd895('0x1a')]['where']||null:null,'attributes':_0x13eddb[_0xd895('0x1a')]?_0x13eddb[_0xd895('0x1a')][_0xd895('0x1f')]||null:null,'limit':_0x13eddb['options']?_0x13eddb[_0xd895('0x1a')][_0xd895('0x20')]||null:null})[_0xd895('0xd')](function(_0x1286d7){logger[_0xd895('0xe')](_0xd895('0x1d'),_0x13eddb);logger['debug'](_0xd895('0x1d'),_0x13eddb,JSON[_0xd895('0x21')](_0x1286d7));_0x36b4ef(_0x1286d7);})[_0xd895('0x16')](function(_0x1b96bf){logger['error'](_0xd895('0x1d'),_0x1b96bf[_0xd895('0x14')],_0x13eddb);_0x29f01a(_0x3f7d17[_0xd895('0x13')](0x1f4,_0x1b96bf['message']));});});};
\ No newline at end of file
+var _0x0738=['body','options','then','debug','UpdateChatQueueReport','ChatQueueReport','update','raw','where','attributes','limit','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','info','ChatQueueReport,\x20%s,\x20%s','request\x20sent','ChatQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateChatQueueReport','create'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x0738,0x1d2));var _0x8073=function(_0x51ab33,_0x71a8a8){_0x51ab33=_0x51ab33-0x0;var _0x5e1298=_0x0738[_0x51ab33];return _0x5e1298;};'use strict';var _=require(_0x8073('0x0'));var util=require(_0x8073('0x1'));var moment=require(_0x8073('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8073('0x3'));var db=require(_0x8073('0x4'))['db'];var utils=require(_0x8073('0x5'));var logger=require(_0x8073('0x6'))(_0x8073('0x7'));var config=require(_0x8073('0x8'));var jayson=require(_0x8073('0x9'));var client=jayson[_0x8073('0xa')][_0x8073('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x129331,_0xe6b2bf,_0x475d00){return new BPromise(function(_0x75e4c3,_0x13d5d5){return client['request'](_0x129331,_0x475d00)['then'](function(_0x247788){logger[_0x8073('0xc')](_0x8073('0xd'),_0xe6b2bf,_0x8073('0xe'));logger['debug'](_0x8073('0xf'),_0xe6b2bf,_0x8073('0xe'),JSON[_0x8073('0x10')](_0x247788));if(_0x247788[_0x8073('0x11')]){if(_0x247788[_0x8073('0x11')][_0x8073('0x12')]===0x1f4){logger[_0x8073('0x11')](_0x8073('0xd'),_0xe6b2bf,_0x247788[_0x8073('0x11')]['message']);return _0x13d5d5(_0x247788[_0x8073('0x11')][_0x8073('0x13')]);}logger[_0x8073('0x11')](_0x8073('0xd'),_0xe6b2bf,_0x247788[_0x8073('0x11')][_0x8073('0x13')]);return _0x75e4c3(_0x247788[_0x8073('0x11')][_0x8073('0x13')]);}else{logger[_0x8073('0xc')](_0x8073('0xd'),_0xe6b2bf,'request\x20sent');_0x75e4c3(_0x247788[_0x8073('0x14')][_0x8073('0x13')]);}})[_0x8073('0x15')](function(_0x1fbc72){logger[_0x8073('0x11')](_0x8073('0xd'),_0xe6b2bf,_0x1fbc72);_0x13d5d5(_0x1fbc72);});});}exports[_0x8073('0x16')]=function(_0x148502){var _0x4d07ef=this;return new Promise(function(_0x16ba69,_0x340649){return db['ChatQueueReport'][_0x8073('0x17')](_0x148502[_0x8073('0x18')],{'raw':_0x148502[_0x8073('0x19')]?_0x148502['options']['raw']===undefined?!![]:![]:!![]})[_0x8073('0x1a')](function(_0x49c546){logger['info']('CreateChatQueueReport',_0x148502);logger[_0x8073('0x1b')](_0x8073('0x16'),_0x148502,JSON[_0x8073('0x10')](_0x49c546));_0x16ba69(_0x49c546);})['catch'](function(_0x28f43a){logger['error']('CreateChatQueueReport',_0x28f43a['message'],_0x148502);_0x340649(_0x4d07ef[_0x8073('0x11')](0x1f4,_0x28f43a[_0x8073('0x13')]));});});};exports[_0x8073('0x1c')]=function(_0x441649){var _0x3e4c60=this;return new Promise(function(_0xa4d73,_0x25d7ef){return db[_0x8073('0x1d')][_0x8073('0x1e')](_0x441649[_0x8073('0x18')],{'raw':_0x441649['options']?_0x441649[_0x8073('0x19')][_0x8073('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x441649['options']?_0x441649[_0x8073('0x19')][_0x8073('0x20')]||null:null,'attributes':_0x441649[_0x8073('0x19')]?_0x441649[_0x8073('0x19')][_0x8073('0x21')]||null:null,'limit':_0x441649[_0x8073('0x19')]?_0x441649['options'][_0x8073('0x22')]||null:null})[_0x8073('0x1a')](function(_0x2f1387){logger[_0x8073('0xc')](_0x8073('0x1c'),_0x441649);logger['debug'](_0x8073('0x1c'),_0x441649,JSON[_0x8073('0x10')](_0x2f1387));_0xa4d73(_0x2f1387);})['catch'](function(_0x4265f4){logger[_0x8073('0x11')](_0x8073('0x1c'),_0x4265f4[_0x8073('0x13')],_0x441649);_0x25d7ef(_0x3e4c60['error'](0x1f4,_0x4265f4['message']));});});};
\ No newline at end of file
index 1aecc18..317bba7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x889f=['multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./chatQueueReport.controller','get','isAuthenticated','index','/describe','describe','/:id','post','create','put','update','delete'];(function(_0x2cfb48,_0x24b83b){var _0xc4594f=function(_0x3bc089){while(--_0x3bc089){_0x2cfb48['push'](_0x2cfb48['shift']());}};_0xc4594f(++_0x24b83b);}(_0x889f,0x10a));var _0xf889=function(_0x1780f8,_0x11ba93){_0x1780f8=_0x1780f8-0x0;var _0x33a410=_0x889f[_0x1780f8];return _0x33a410;};'use strict';var multer=require(_0xf889('0x0'));var util=require('util');var path=require(_0xf889('0x1'));var timeout=require(_0xf889('0x2'));var express=require('express');var router=express[_0xf889('0x3')]();var fs_extra=require(_0xf889('0x4'));var auth=require(_0xf889('0x5'));var interaction=require(_0xf889('0x6'));var config=require('../../config/environment');var controller=require(_0xf889('0x7'));router[_0xf889('0x8')]('/',auth[_0xf889('0x9')](),controller[_0xf889('0xa')]);router['get'](_0xf889('0xb'),auth['isAuthenticated'](),controller[_0xf889('0xc')]);router[_0xf889('0x8')](_0xf889('0xd'),auth[_0xf889('0x9')](),controller['show']);router[_0xf889('0xe')]('/',auth[_0xf889('0x9')](),controller[_0xf889('0xf')]);router[_0xf889('0x10')]('/:id',auth['isAuthenticated'](),controller[_0xf889('0x11')]);router[_0xf889('0x12')](_0xf889('0xd'),auth[_0xf889('0x9')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x9d5d=['get','/describe','describe','/:id','isAuthenticated','show','post','create','update','exports','multer','util','path','connect-timeout','../../components/auth/service','../../config/environment','./chatQueueReport.controller'];(function(_0x16098b,_0x47a450){var _0x59002=function(_0x2abc24){while(--_0x2abc24){_0x16098b['push'](_0x16098b['shift']());}};_0x59002(++_0x47a450);}(_0x9d5d,0x13c));var _0xd9d5=function(_0x18f48e,_0x49efe5){_0x18f48e=_0x18f48e-0x0;var _0x30d921=_0x9d5d[_0x18f48e];return _0x30d921;};'use strict';var multer=require(_0xd9d5('0x0'));var util=require(_0xd9d5('0x1'));var path=require(_0xd9d5('0x2'));var timeout=require(_0xd9d5('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xd9d5('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xd9d5('0x5'));var controller=require(_0xd9d5('0x6'));router[_0xd9d5('0x7')]('/',auth['isAuthenticated'](),controller['index']);router[_0xd9d5('0x7')](_0xd9d5('0x8'),auth['isAuthenticated'](),controller[_0xd9d5('0x9')]);router[_0xd9d5('0x7')](_0xd9d5('0xa'),auth[_0xd9d5('0xb')](),controller[_0xd9d5('0xc')]);router[_0xd9d5('0xd')]('/',auth[_0xd9d5('0xb')](),controller[_0xd9d5('0xe')]);router['put']('/:id',auth[_0xd9d5('0xb')](),controller[_0xd9d5('0xf')]);router['delete']('/:id',auth[_0xd9d5('0xb')](),controller['destroy']);module[_0xd9d5('0x10')]=router;
\ No newline at end of file
index 34fbdc7..098079a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x008c=['ENUM','agent','queue','DATE','NOW','moment','sequelize','exports','STRING'];(function(_0x45dd0e,_0x28e603){var _0x50e5ca=function(_0x46a412){while(--_0x46a412){_0x45dd0e['push'](_0x45dd0e['shift']());}};_0x50e5ca(++_0x28e603);}(_0x008c,0x188));var _0xc008=function(_0x31cdf3,_0x4f2183){_0x31cdf3=_0x31cdf3-0x0;var _0x5623f8=_0x008c[_0x31cdf3];return _0x5623f8;};'use strict';var moment=require(_0xc008('0x0'));var Sequelize=require(_0xc008('0x1'));module[_0xc008('0x2')]={'uniqueid':{'type':Sequelize[_0xc008('0x3')],'allowNull':![]},'type':{'type':Sequelize[_0xc008('0x4')]('account',_0xc008('0x5'),_0xc008('0x6')),'allowNull':![],'defaultValue':_0xc008('0x6')},'transferredAt':{'type':Sequelize[_0xc008('0x7')],'allowNull':![],'defaultValue':Sequelize[_0xc008('0x8')]}};
\ No newline at end of file
+var _0x54ef=['agent','queue','DATE','NOW','moment','sequelize','exports','ENUM','account'];(function(_0x4c1f1f,_0x3aa18d){var _0x4f9e3c=function(_0x1a94cb){while(--_0x1a94cb){_0x4c1f1f['push'](_0x4c1f1f['shift']());}};_0x4f9e3c(++_0x3aa18d);}(_0x54ef,0x112));var _0xf54e=function(_0x19448e,_0x4c1c00){_0x19448e=_0x19448e-0x0;var _0x3d2c2b=_0x54ef[_0x19448e];return _0x3d2c2b;};'use strict';var moment=require(_0xf54e('0x0'));var Sequelize=require(_0xf54e('0x1'));module[_0xf54e('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0xf54e('0x3')](_0xf54e('0x4'),_0xf54e('0x5'),_0xf54e('0x6')),'allowNull':![],'defaultValue':_0xf54e('0x6')},'transferredAt':{'type':Sequelize[_0xf54e('0x7')],'allowNull':![],'defaultValue':Sequelize[_0xf54e('0x8')]}};
\ No newline at end of file
index ea81b95..710f3a8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x378c=['ChatTransferReport','rawAttributes','type','key','model','query','filters','intersection','fields','attributes','nolimit','sort','pick','filter','where','merge','options','includeAll','include','findAll','rows','catch','show','params','keys','find','create','body','describe','fast-json-patch','request-promise','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','update','then','destroy','error','stack','name','send','index','map'];(function(_0x478612,_0x2d5b1f){var _0x878115=function(_0x1b6f8a){while(--_0x1b6f8a){_0x478612['push'](_0x478612['shift']());}};_0x878115(++_0x2d5b1f);}(_0x378c,0x1c1));var _0xc378=function(_0x24f31b,_0x44b8f3){_0x24f31b=_0x24f31b-0x0;var _0x488401=_0x378c[_0x24f31b];return _0x488401;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xc378('0x0'));var rp=require(_0xc378('0x1'));var moment=require('moment');var BPromise=require(_0xc378('0x2'));var Mustache=require(_0xc378('0x3'));var util=require('util');var path=require(_0xc378('0x4'));var sox=require(_0xc378('0x5'));var csv=require(_0xc378('0x6'));var ejs=require(_0xc378('0x7'));var fs=require('fs');var fs_extra=require(_0xc378('0x8'));var _=require('lodash');var squel=require(_0xc378('0x9'));var crypto=require(_0xc378('0xa'));var jsforce=require(_0xc378('0xb'));var deskjs=require('desk.js');var toCsv=require(_0xc378('0x6'));var querystring=require(_0xc378('0xc'));var Papa=require('papaparse');var Redis=require(_0xc378('0xd'));var authService=require(_0xc378('0xe'));var qs=require('../../components/parsers/qs');var as=require(_0xc378('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xc378('0x10'))(_0xc378('0x11'));var utils=require('../../config/utils');var config=require(_0xc378('0x12'));var licenseUtil=require(_0xc378('0x13'));var db=require(_0xc378('0x14'))['db'];function respondWithStatusCode(_0x2053ce,_0x96861b){_0x96861b=_0x96861b||0xcc;return function(_0x3a51f8){if(_0x3a51f8){return _0x2053ce[_0xc378('0x15')](_0x96861b);}return _0x2053ce[_0xc378('0x16')](_0x96861b)[_0xc378('0x17')]();};}function respondWithResult(_0x4575f0,_0x2ec00d){_0x2ec00d=_0x2ec00d||0xc8;return function(_0x4cd841){if(_0x4cd841){return _0x4575f0[_0xc378('0x16')](_0x2ec00d)[_0xc378('0x18')](_0x4cd841);}};}function respondWithFilteredResult(_0x37e2bd,_0x35c1a6){return function(_0x463384){if(_0x463384){var _0x120f64=typeof _0x35c1a6[_0xc378('0x19')]===_0xc378('0x1a')&&typeof _0x35c1a6[_0xc378('0x1b')]===_0xc378('0x1a');var _0x21a6c6=_0x463384[_0xc378('0x1c')];var _0x18f6ed=_0x120f64?0x0:_0x35c1a6['offset'];var _0xa2ee27=_0x120f64?_0x463384[_0xc378('0x1c')]:_0x35c1a6['offset']+_0x35c1a6[_0xc378('0x1b')];var _0x4f1c8b;if(_0xa2ee27>=_0x21a6c6){_0xa2ee27=_0x21a6c6;_0x4f1c8b=0xc8;}else{_0x4f1c8b=0xce;}_0x37e2bd[_0xc378('0x16')](_0x4f1c8b);return _0x37e2bd[_0xc378('0x1d')](_0xc378('0x1e'),_0x18f6ed+'-'+_0xa2ee27+'/'+_0x21a6c6)['json'](_0x463384);}return null;};}function patchUpdates(_0x44a2c6){return function(_0x48d624){try{jsonpatch[_0xc378('0x1f')](_0x48d624,_0x44a2c6,!![]);}catch(_0x14a6ae){return BPromise['reject'](_0x14a6ae);}return _0x48d624['save']();};}function saveUpdates(_0x1a78e2,_0x23236c){return function(_0x4d3a05){if(_0x4d3a05){return _0x4d3a05[_0xc378('0x20')](_0x1a78e2)[_0xc378('0x21')](function(_0x54c32c){return _0x54c32c;});}return null;};}function removeEntity(_0x45092a,_0x264b99){return function(_0x355c59){if(_0x355c59){return _0x355c59[_0xc378('0x22')]()[_0xc378('0x21')](function(){_0x45092a['status'](0xcc)[_0xc378('0x17')]();});}};}function handleEntityNotFound(_0x3944cf,_0x4bf6de){return function(_0x4095f4){if(!_0x4095f4){_0x3944cf[_0xc378('0x15')](0x194);}return _0x4095f4;};}function handleError(_0x322688,_0x44130d){_0x44130d=_0x44130d||0x1f4;return function(_0x2b18e3){logger[_0xc378('0x23')](_0x2b18e3[_0xc378('0x24')]);if(_0x2b18e3['name']){delete _0x2b18e3[_0xc378('0x25')];}_0x322688['status'](_0x44130d)[_0xc378('0x26')](_0x2b18e3);};}exports[_0xc378('0x27')]=function(_0x49b9d4,_0x1a01e4){var _0xf3ecdf={},_0x3455b4={},_0x2be6ea={'count':0x0,'rows':[]};var _0x1b9a5=_[_0xc378('0x28')](db[_0xc378('0x29')][_0xc378('0x2a')],function(_0x1bd4c6){return{'name':_0x1bd4c6['fieldName'],'type':_0x1bd4c6[_0xc378('0x2b')][_0xc378('0x2c')]};});_0x3455b4[_0xc378('0x2d')]=_['map'](_0x1b9a5,'name');_0x3455b4[_0xc378('0x2e')]=_['keys'](_0x49b9d4[_0xc378('0x2e')]);_0x3455b4[_0xc378('0x2f')]=_[_0xc378('0x30')](_0x3455b4['model'],_0x3455b4[_0xc378('0x2e')]);_0xf3ecdf['attributes']=_['intersection'](_0x3455b4[_0xc378('0x2d')],qs['fields'](_0x49b9d4['query'][_0xc378('0x31')]));_0xf3ecdf[_0xc378('0x32')]=_0xf3ecdf[_0xc378('0x32')]['length']?_0xf3ecdf[_0xc378('0x32')]:_0x3455b4[_0xc378('0x2d')];if(!_0x49b9d4['query']['hasOwnProperty'](_0xc378('0x33'))){_0xf3ecdf[_0xc378('0x1b')]=qs[_0xc378('0x1b')](_0x49b9d4['query'][_0xc378('0x1b')]);_0xf3ecdf[_0xc378('0x19')]=qs[_0xc378('0x19')](_0x49b9d4['query'][_0xc378('0x19')]);}_0xf3ecdf['order']=qs['sort'](_0x49b9d4['query'][_0xc378('0x34')]);_0xf3ecdf['where']=qs[_0xc378('0x2f')](_[_0xc378('0x35')](_0x49b9d4[_0xc378('0x2e')],_0x3455b4['filters']),_0x1b9a5);if(_0x49b9d4[_0xc378('0x2e')][_0xc378('0x36')]){_0xf3ecdf[_0xc378('0x37')]=_[_0xc378('0x38')](_0xf3ecdf[_0xc378('0x37')],{'$or':_[_0xc378('0x28')](_0x1b9a5,function(_0x43dc6){if(_0x43dc6[_0xc378('0x2b')]!=='VIRTUAL'){var _0x15987f={};_0x15987f[_0x43dc6[_0xc378('0x25')]]={'$like':'%'+_0x49b9d4[_0xc378('0x2e')]['filter']+'%'};return _0x15987f;}})});}_0xf3ecdf=_[_0xc378('0x38')]({},_0xf3ecdf,_0x49b9d4[_0xc378('0x39')]);var _0x1027d2={'where':_0xf3ecdf[_0xc378('0x37')]};return db[_0xc378('0x29')]['count'](_0x1027d2)[_0xc378('0x21')](function(_0x16b1aa){_0x2be6ea[_0xc378('0x1c')]=_0x16b1aa;if(_0x49b9d4[_0xc378('0x2e')][_0xc378('0x3a')]){_0xf3ecdf[_0xc378('0x3b')]=[{'all':!![]}];}return db['ChatTransferReport'][_0xc378('0x3c')](_0xf3ecdf);})[_0xc378('0x21')](function(_0x21e6f8){_0x2be6ea[_0xc378('0x3d')]=_0x21e6f8;return _0x2be6ea;})[_0xc378('0x21')](respondWithFilteredResult(_0x1a01e4,_0xf3ecdf))[_0xc378('0x3e')](handleError(_0x1a01e4,null));};exports[_0xc378('0x3f')]=function(_0x1956a0,_0x2849b7){var _0x50acd6={'raw':!![],'where':{'id':_0x1956a0[_0xc378('0x40')]['id']}},_0x47436c={};_0x47436c['model']=_['keys'](db[_0xc378('0x29')][_0xc378('0x2a')]);_0x47436c[_0xc378('0x2e')]=_[_0xc378('0x41')](_0x1956a0['query']);_0x47436c[_0xc378('0x2f')]=_['intersection'](_0x47436c[_0xc378('0x2d')],_0x47436c['query']);_0x50acd6[_0xc378('0x32')]=_[_0xc378('0x30')](_0x47436c[_0xc378('0x2d')],qs[_0xc378('0x31')](_0x1956a0[_0xc378('0x2e')][_0xc378('0x31')]));_0x50acd6['attributes']=_0x50acd6[_0xc378('0x32')]['length']?_0x50acd6[_0xc378('0x32')]:_0x47436c[_0xc378('0x2d')];if(_0x1956a0[_0xc378('0x2e')][_0xc378('0x3a')]){_0x50acd6[_0xc378('0x3b')]=[{'all':!![]}];}_0x50acd6=_['merge']({},_0x50acd6,_0x1956a0[_0xc378('0x39')]);return db[_0xc378('0x29')][_0xc378('0x42')](_0x50acd6)[_0xc378('0x21')](handleEntityNotFound(_0x2849b7,null))[_0xc378('0x21')](respondWithResult(_0x2849b7,null))['catch'](handleError(_0x2849b7,null));};exports[_0xc378('0x43')]=function(_0x3f1020,_0x5d8a2e){return db['ChatTransferReport'][_0xc378('0x43')](_0x3f1020[_0xc378('0x44')],{})[_0xc378('0x21')](respondWithResult(_0x5d8a2e,0xc9))['catch'](handleError(_0x5d8a2e,null));};exports['update']=function(_0x49aea3,_0x58f45f){if(_0x49aea3[_0xc378('0x44')]['id']){delete _0x49aea3[_0xc378('0x44')]['id'];}return db['ChatTransferReport'][_0xc378('0x42')]({'where':{'id':_0x49aea3[_0xc378('0x40')]['id']}})['then'](handleEntityNotFound(_0x58f45f,null))[_0xc378('0x21')](saveUpdates(_0x49aea3[_0xc378('0x44')],null))[_0xc378('0x21')](respondWithResult(_0x58f45f,null))[_0xc378('0x3e')](handleError(_0x58f45f,null));};exports[_0xc378('0x22')]=function(_0x46a7d9,_0x5b4ae9){return db[_0xc378('0x29')]['find']({'where':{'id':_0x46a7d9[_0xc378('0x40')]['id']}})['then'](handleEntityNotFound(_0x5b4ae9,null))['then'](removeEntity(_0x5b4ae9,null))[_0xc378('0x3e')](handleError(_0x5b4ae9,null));};exports[_0xc378('0x45')]=function(_0x546682,_0x577fd8){return db['ChatTransferReport'][_0xc378('0x45')]()[_0xc378('0x21')](respondWithResult(_0x577fd8,null))['catch'](handleError(_0x577fd8,null));};
\ No newline at end of file
+var _0xc459=['name','send','index','ChatTransferReport','rawAttributes','fieldName','type','key','map','query','filters','intersection','model','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','findAll','params','keys','fields','includeAll','options','catch','create','body','find','describe','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','ejs','fs-extra','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','status','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','then','destroy','end','sendStatus','stack'];(function(_0x2af9c2,_0x5a930e){var _0x1a5276=function(_0x4fd323){while(--_0x4fd323){_0x2af9c2['push'](_0x2af9c2['shift']());}};_0x1a5276(++_0x5a930e);}(_0xc459,0x6d));var _0x9c45=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc459[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x9c45('0x0'));var zipdir=require(_0x9c45('0x1'));var jsonpatch=require(_0x9c45('0x2'));var rp=require(_0x9c45('0x3'));var moment=require(_0x9c45('0x4'));var BPromise=require(_0x9c45('0x5'));var Mustache=require(_0x9c45('0x6'));var util=require(_0x9c45('0x7'));var path=require('path');var sox=require(_0x9c45('0x8'));var csv=require('to-csv');var ejs=require(_0x9c45('0x9'));var fs=require('fs');var fs_extra=require(_0x9c45('0xa'));var _=require(_0x9c45('0xb'));var squel=require(_0x9c45('0xc'));var crypto=require(_0x9c45('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x9c45('0xe'));var Papa=require(_0x9c45('0xf'));var Redis=require(_0x9c45('0x10'));var authService=require(_0x9c45('0x11'));var qs=require(_0x9c45('0x12'));var as=require(_0x9c45('0x13'));var hardwareService=require(_0x9c45('0x14'));var logger=require(_0x9c45('0x15'))('api');var utils=require('../../config/utils');var config=require(_0x9c45('0x16'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x24315b,_0x4cf5d8){_0x4cf5d8=_0x4cf5d8||0xcc;return function(_0x2b7ca8){if(_0x2b7ca8){return _0x24315b['sendStatus'](_0x4cf5d8);}return _0x24315b[_0x9c45('0x17')](_0x4cf5d8)['end']();};}function respondWithResult(_0x165c6f,_0x4dcf6a){_0x4dcf6a=_0x4dcf6a||0xc8;return function(_0xb39a90){if(_0xb39a90){return _0x165c6f[_0x9c45('0x17')](_0x4dcf6a)[_0x9c45('0x18')](_0xb39a90);}};}function respondWithFilteredResult(_0x2367f7,_0x5532df){return function(_0x45fca0){if(_0x45fca0){var _0x5a8ee3=typeof _0x5532df[_0x9c45('0x19')]==='undefined'&&typeof _0x5532df[_0x9c45('0x1a')]===_0x9c45('0x1b');var _0xf39528=_0x45fca0[_0x9c45('0x1c')];var _0x1286f3=_0x5a8ee3?0x0:_0x5532df[_0x9c45('0x19')];var _0x156ef0=_0x5a8ee3?_0x45fca0['count']:_0x5532df[_0x9c45('0x19')]+_0x5532df[_0x9c45('0x1a')];var _0x3c85c2;if(_0x156ef0>=_0xf39528){_0x156ef0=_0xf39528;_0x3c85c2=0xc8;}else{_0x3c85c2=0xce;}_0x2367f7[_0x9c45('0x17')](_0x3c85c2);return _0x2367f7[_0x9c45('0x1d')](_0x9c45('0x1e'),_0x1286f3+'-'+_0x156ef0+'/'+_0xf39528)[_0x9c45('0x18')](_0x45fca0);}return null;};}function patchUpdates(_0x5efb66){return function(_0x3e1ac1){try{jsonpatch[_0x9c45('0x1f')](_0x3e1ac1,_0x5efb66,!![]);}catch(_0x4ad94f){return BPromise[_0x9c45('0x20')](_0x4ad94f);}return _0x3e1ac1[_0x9c45('0x21')]();};}function saveUpdates(_0x4dc774,_0x3d6854){return function(_0x2e472a){if(_0x2e472a){return _0x2e472a['update'](_0x4dc774)[_0x9c45('0x22')](function(_0x47ef33){return _0x47ef33;});}return null;};}function removeEntity(_0x37ce88,_0x36ba25){return function(_0x1b94bb){if(_0x1b94bb){return _0x1b94bb[_0x9c45('0x23')]()[_0x9c45('0x22')](function(){_0x37ce88[_0x9c45('0x17')](0xcc)[_0x9c45('0x24')]();});}};}function handleEntityNotFound(_0x5353d4,_0x324dde){return function(_0x517603){if(!_0x517603){_0x5353d4[_0x9c45('0x25')](0x194);}return _0x517603;};}function handleError(_0x3b0567,_0x33ac4a){_0x33ac4a=_0x33ac4a||0x1f4;return function(_0x31fc81){logger['error'](_0x31fc81[_0x9c45('0x26')]);if(_0x31fc81[_0x9c45('0x27')]){delete _0x31fc81[_0x9c45('0x27')];}_0x3b0567[_0x9c45('0x17')](_0x33ac4a)[_0x9c45('0x28')](_0x31fc81);};}exports[_0x9c45('0x29')]=function(_0x316886,_0xdd3e95){var _0x2a4d7a={},_0x23e3c8={},_0x3e4e08={'count':0x0,'rows':[]};var _0x464609=_['map'](db[_0x9c45('0x2a')][_0x9c45('0x2b')],function(_0x74f56b){return{'name':_0x74f56b[_0x9c45('0x2c')],'type':_0x74f56b[_0x9c45('0x2d')][_0x9c45('0x2e')]};});_0x23e3c8['model']=_[_0x9c45('0x2f')](_0x464609,_0x9c45('0x27'));_0x23e3c8[_0x9c45('0x30')]=_['keys'](_0x316886[_0x9c45('0x30')]);_0x23e3c8[_0x9c45('0x31')]=_[_0x9c45('0x32')](_0x23e3c8[_0x9c45('0x33')],_0x23e3c8['query']);_0x2a4d7a[_0x9c45('0x34')]=_['intersection'](_0x23e3c8['model'],qs['fields'](_0x316886[_0x9c45('0x30')]['fields']));_0x2a4d7a[_0x9c45('0x34')]=_0x2a4d7a[_0x9c45('0x34')][_0x9c45('0x35')]?_0x2a4d7a[_0x9c45('0x34')]:_0x23e3c8[_0x9c45('0x33')];if(!_0x316886[_0x9c45('0x30')][_0x9c45('0x36')](_0x9c45('0x37'))){_0x2a4d7a[_0x9c45('0x1a')]=qs[_0x9c45('0x1a')](_0x316886['query'][_0x9c45('0x1a')]);_0x2a4d7a['offset']=qs[_0x9c45('0x19')](_0x316886[_0x9c45('0x30')][_0x9c45('0x19')]);}_0x2a4d7a[_0x9c45('0x38')]=qs[_0x9c45('0x39')](_0x316886[_0x9c45('0x30')][_0x9c45('0x39')]);_0x2a4d7a[_0x9c45('0x3a')]=qs[_0x9c45('0x31')](_[_0x9c45('0x3b')](_0x316886[_0x9c45('0x30')],_0x23e3c8[_0x9c45('0x31')]),_0x464609);if(_0x316886[_0x9c45('0x30')][_0x9c45('0x3c')]){_0x2a4d7a['where']=_['merge'](_0x2a4d7a[_0x9c45('0x3a')],{'$or':_[_0x9c45('0x2f')](_0x464609,function(_0x4a31ff){if(_0x4a31ff[_0x9c45('0x2d')]!==_0x9c45('0x3d')){var _0x2b7422={};_0x2b7422[_0x4a31ff[_0x9c45('0x27')]]={'$like':'%'+_0x316886[_0x9c45('0x30')]['filter']+'%'};return _0x2b7422;}})});}_0x2a4d7a=_[_0x9c45('0x3e')]({},_0x2a4d7a,_0x316886['options']);var _0x1d5fbb={'where':_0x2a4d7a[_0x9c45('0x3a')]};return db['ChatTransferReport'][_0x9c45('0x1c')](_0x1d5fbb)['then'](function(_0x467cf){_0x3e4e08[_0x9c45('0x1c')]=_0x467cf;if(_0x316886['query']['includeAll']){_0x2a4d7a['include']=[{'all':!![]}];}return db[_0x9c45('0x2a')][_0x9c45('0x3f')](_0x2a4d7a);})[_0x9c45('0x22')](function(_0x80e06d){_0x3e4e08['rows']=_0x80e06d;return _0x3e4e08;})[_0x9c45('0x22')](respondWithFilteredResult(_0xdd3e95,_0x2a4d7a))['catch'](handleError(_0xdd3e95,null));};exports['show']=function(_0x39c87d,_0x6ad2d5){var _0x3051be={'raw':!![],'where':{'id':_0x39c87d[_0x9c45('0x40')]['id']}},_0x10e15a={};_0x10e15a[_0x9c45('0x33')]=_['keys'](db[_0x9c45('0x2a')][_0x9c45('0x2b')]);_0x10e15a['query']=_[_0x9c45('0x41')](_0x39c87d[_0x9c45('0x30')]);_0x10e15a[_0x9c45('0x31')]=_[_0x9c45('0x32')](_0x10e15a[_0x9c45('0x33')],_0x10e15a[_0x9c45('0x30')]);_0x3051be[_0x9c45('0x34')]=_[_0x9c45('0x32')](_0x10e15a[_0x9c45('0x33')],qs[_0x9c45('0x42')](_0x39c87d[_0x9c45('0x30')][_0x9c45('0x42')]));_0x3051be[_0x9c45('0x34')]=_0x3051be[_0x9c45('0x34')]['length']?_0x3051be[_0x9c45('0x34')]:_0x10e15a['model'];if(_0x39c87d[_0x9c45('0x30')][_0x9c45('0x43')]){_0x3051be['include']=[{'all':!![]}];}_0x3051be=_[_0x9c45('0x3e')]({},_0x3051be,_0x39c87d[_0x9c45('0x44')]);return db[_0x9c45('0x2a')]['find'](_0x3051be)[_0x9c45('0x22')](handleEntityNotFound(_0x6ad2d5,null))[_0x9c45('0x22')](respondWithResult(_0x6ad2d5,null))[_0x9c45('0x45')](handleError(_0x6ad2d5,null));};exports[_0x9c45('0x46')]=function(_0x2c59ce,_0x3005c5){return db['ChatTransferReport'][_0x9c45('0x46')](_0x2c59ce[_0x9c45('0x47')],{})['then'](respondWithResult(_0x3005c5,0xc9))[_0x9c45('0x45')](handleError(_0x3005c5,null));};exports['update']=function(_0x5b8ee2,_0x46e664){if(_0x5b8ee2[_0x9c45('0x47')]['id']){delete _0x5b8ee2[_0x9c45('0x47')]['id'];}return db[_0x9c45('0x2a')][_0x9c45('0x48')]({'where':{'id':_0x5b8ee2[_0x9c45('0x40')]['id']}})[_0x9c45('0x22')](handleEntityNotFound(_0x46e664,null))[_0x9c45('0x22')](saveUpdates(_0x5b8ee2[_0x9c45('0x47')],null))['then'](respondWithResult(_0x46e664,null))[_0x9c45('0x45')](handleError(_0x46e664,null));};exports['destroy']=function(_0x108d27,_0x3970f4){return db[_0x9c45('0x2a')][_0x9c45('0x48')]({'where':{'id':_0x108d27[_0x9c45('0x40')]['id']}})[_0x9c45('0x22')](handleEntityNotFound(_0x3970f4,null))[_0x9c45('0x22')](removeEntity(_0x3970f4,null))[_0x9c45('0x45')](handleError(_0x3970f4,null));};exports[_0x9c45('0x49')]=function(_0x1d9262,_0x1e12cc){return db[_0x9c45('0x2a')][_0x9c45('0x49')]()['then'](respondWithResult(_0x1e12cc,null))[_0x9c45('0x45')](handleError(_0x1e12cc,null));};
\ No newline at end of file
index ea09b73..8945c85 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x132f=['exports','ChatTransferReport','uniqueid','lodash','util','../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment','./chatTransferReport.attributes'];(function(_0x71dc07,_0x20d016){var _0x3eaf59=function(_0x44971a){while(--_0x44971a){_0x71dc07['push'](_0x71dc07['shift']());}};_0x3eaf59(++_0x20d016);}(_0x132f,0x9f));var _0xf132=function(_0x2feb53,_0x264ef7){_0x2feb53=_0x2feb53-0x0;var _0x5700ee=_0x132f[_0x2feb53];return _0x5700ee;};'use strict';var _=require(_0xf132('0x0'));var util=require(_0xf132('0x1'));var logger=require(_0xf132('0x2'))('api');var moment=require(_0xf132('0x3'));var BPromise=require(_0xf132('0x4'));var rp=require(_0xf132('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xf132('0x6'));var config=require(_0xf132('0x7'));var attributes=require(_0xf132('0x8'));module[_0xf132('0x9')]=function(_0x4409e6,_0x276b08){return _0x4409e6['define'](_0xf132('0xa'),attributes,{'tableName':'report_chat_transfer','paranoid':![],'indexes':[{'name':_0xf132('0xb'),'fields':[_0xf132('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xab35=['path','../../config/environment','./chatTransferReport.attributes','exports','define','ChatTransferReport','report_chat_transfer','lodash','util','../../config/logger','moment','request-promise'];(function(_0x21899c,_0x4c0d98){var _0x5e895e=function(_0x5d6df9){while(--_0x5d6df9){_0x21899c['push'](_0x21899c['shift']());}};_0x5e895e(++_0x4c0d98);}(_0xab35,0x1db));var _0x5ab3=function(_0x2543d6,_0x3a5e78){_0x2543d6=_0x2543d6-0x0;var _0x55213c=_0xab35[_0x2543d6];return _0x55213c;};'use strict';var _=require(_0x5ab3('0x0'));var util=require(_0x5ab3('0x1'));var logger=require(_0x5ab3('0x2'))('api');var moment=require(_0x5ab3('0x3'));var BPromise=require('bluebird');var rp=require(_0x5ab3('0x4'));var fs=require('fs');var path=require(_0x5ab3('0x5'));var rimraf=require('rimraf');var config=require(_0x5ab3('0x6'));var attributes=require(_0x5ab3('0x7'));module[_0x5ab3('0x8')]=function(_0x3cdb70,_0x5594dd){return _0x3cdb70[_0x5ab3('0x9')](_0x5ab3('0xa'),attributes,{'tableName':_0x5ab3('0xb'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
index d15c84e..9f6d25d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x57a2=['http','request','info','request\x20sent','debug','ChatTransferReport,\x20%s,\x20%s,\x20%s','error','ChatTransferReport,\x20%s,\x20%s','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x26e727,_0x3e65be){var _0x563800=function(_0xbcf999){while(--_0xbcf999){_0x26e727['push'](_0x26e727['shift']());}};_0x563800(++_0x3e65be);}(_0x57a2,0x197));var _0x257a=function(_0x1a41a9,_0x5023b3){_0x1a41a9=_0x1a41a9-0x0;var _0xad981f=_0x57a2[_0x1a41a9];return _0xad981f;};'use strict';var _=require(_0x257a('0x0'));var util=require(_0x257a('0x1'));var moment=require('moment');var BPromise=require(_0x257a('0x2'));var rs=require(_0x257a('0x3'));var fs=require('fs');var Redis=require(_0x257a('0x4'));var db=require(_0x257a('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x257a('0x6'))(_0x257a('0x7'));var config=require(_0x257a('0x8'));var jayson=require(_0x257a('0x9'));var client=jayson[_0x257a('0xa')][_0x257a('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x369c43,_0x37b823,_0x2db3a5){return new BPromise(function(_0x1421b2,_0x4a86db){return client[_0x257a('0xc')](_0x369c43,_0x2db3a5)['then'](function(_0x17bc86){logger[_0x257a('0xd')]('ChatTransferReport,\x20%s,\x20%s',_0x37b823,_0x257a('0xe'));logger[_0x257a('0xf')](_0x257a('0x10'),_0x37b823,'request\x20sent',JSON['stringify'](_0x17bc86));if(_0x17bc86[_0x257a('0x11')]){if(_0x17bc86[_0x257a('0x11')]['code']===0x1f4){logger[_0x257a('0x11')](_0x257a('0x12'),_0x37b823,_0x17bc86[_0x257a('0x11')][_0x257a('0x13')]);return _0x4a86db(_0x17bc86['error'][_0x257a('0x13')]);}logger[_0x257a('0x11')]('ChatTransferReport,\x20%s,\x20%s',_0x37b823,_0x17bc86['error'][_0x257a('0x13')]);return _0x1421b2(_0x17bc86[_0x257a('0x11')][_0x257a('0x13')]);}else{logger[_0x257a('0xd')](_0x257a('0x12'),_0x37b823,_0x257a('0xe'));_0x1421b2(_0x17bc86[_0x257a('0x14')][_0x257a('0x13')]);}})[_0x257a('0x15')](function(_0x272354){logger['error']('ChatTransferReport,\x20%s,\x20%s',_0x37b823,_0x272354);_0x4a86db(_0x272354);});});}
\ No newline at end of file
+var _0x64af=['error','code','message','result','catch','ChatTransferReport,\x20%s,\x20%s','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','then','info','request\x20sent','debug','stringify'];(function(_0x5bf2b3,_0xfcd364){var _0x5e8a9b=function(_0x43546b){while(--_0x43546b){_0x5bf2b3['push'](_0x5bf2b3['shift']());}};_0x5e8a9b(++_0xfcd364);}(_0x64af,0x1aa));var _0xf64a=function(_0x12130b,_0x1e5d98){_0x12130b=_0x12130b-0x0;var _0x398370=_0x64af[_0x12130b];return _0x398370;};'use strict';var _=require(_0xf64a('0x0'));var util=require(_0xf64a('0x1'));var moment=require('moment');var BPromise=require(_0xf64a('0x2'));var rs=require(_0xf64a('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf64a('0x4'))['db'];var utils=require(_0xf64a('0x5'));var logger=require(_0xf64a('0x6'))(_0xf64a('0x7'));var config=require('../../config/environment');var jayson=require(_0xf64a('0x8'));var client=jayson['client'][_0xf64a('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x253e9b,_0x553af0,_0x25c002){return new BPromise(function(_0x5ebab4,_0x5713b9){return client['request'](_0x253e9b,_0x25c002)[_0xf64a('0xa')](function(_0x14c47c){logger[_0xf64a('0xb')]('ChatTransferReport,\x20%s,\x20%s',_0x553af0,_0xf64a('0xc'));logger[_0xf64a('0xd')]('ChatTransferReport,\x20%s,\x20%s,\x20%s',_0x553af0,_0xf64a('0xc'),JSON[_0xf64a('0xe')](_0x14c47c));if(_0x14c47c[_0xf64a('0xf')]){if(_0x14c47c[_0xf64a('0xf')][_0xf64a('0x10')]===0x1f4){logger[_0xf64a('0xf')]('ChatTransferReport,\x20%s,\x20%s',_0x553af0,_0x14c47c[_0xf64a('0xf')]['message']);return _0x5713b9(_0x14c47c[_0xf64a('0xf')][_0xf64a('0x11')]);}logger['error']('ChatTransferReport,\x20%s,\x20%s',_0x553af0,_0x14c47c[_0xf64a('0xf')]['message']);return _0x5ebab4(_0x14c47c['error'][_0xf64a('0x11')]);}else{logger['info']('ChatTransferReport,\x20%s,\x20%s',_0x553af0,_0xf64a('0xc'));_0x5ebab4(_0x14c47c[_0xf64a('0x12')][_0xf64a('0x11')]);}})[_0xf64a('0x13')](function(_0x5bfe4f){logger[_0xf64a('0xf')](_0xf64a('0x14'),_0x553af0,_0x5bfe4f);_0x5713b9(_0x5bfe4f);});});}
\ No newline at end of file
index cfe25c5..8c9077b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb989=['Router','fs-extra','../../components/auth/service','../../config/environment','./chatTransferReport.controller','get','index','/describe','isAuthenticated','describe','create','delete','/:id','multer','util','path','connect-timeout','express'];(function(_0x3078f2,_0x2a9c32){var _0x797e2=function(_0x23012b){while(--_0x23012b){_0x3078f2['push'](_0x3078f2['shift']());}};_0x797e2(++_0x2a9c32);}(_0xb989,0x11b));var _0x9b98=function(_0x868b7c,_0xfa438b){_0x868b7c=_0x868b7c-0x0;var _0x21683c=_0xb989[_0x868b7c];return _0x21683c;};'use strict';var multer=require(_0x9b98('0x0'));var util=require(_0x9b98('0x1'));var path=require(_0x9b98('0x2'));var timeout=require(_0x9b98('0x3'));var express=require(_0x9b98('0x4'));var router=express[_0x9b98('0x5')]();var fs_extra=require(_0x9b98('0x6'));var auth=require(_0x9b98('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0x9b98('0x8'));var controller=require(_0x9b98('0x9'));router[_0x9b98('0xa')]('/',auth['isAuthenticated'](),controller[_0x9b98('0xb')]);router['get'](_0x9b98('0xc'),auth[_0x9b98('0xd')](),controller[_0x9b98('0xe')]);router['get']('/:id',auth[_0x9b98('0xd')](),controller['show']);router['post']('/',auth[_0x9b98('0xd')](),controller[_0x9b98('0xf')]);router['put']('/:id',auth['isAuthenticated'](),controller['update']);router[_0x9b98('0x10')](_0x9b98('0x11'),auth[_0x9b98('0xd')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x5e61=['../../components/auth/service','../../config/environment','./chatTransferReport.controller','isAuthenticated','index','/describe','get','/:id','show','post','create','put','update','delete','destroy','exports','multer','util','Router','fs-extra'];(function(_0xbce261,_0x5bf87e){var _0x23848f=function(_0x582169){while(--_0x582169){_0xbce261['push'](_0xbce261['shift']());}};_0x23848f(++_0x5bf87e);}(_0x5e61,0x114));var _0x15e6=function(_0x305052,_0x472254){_0x305052=_0x305052-0x0;var _0x33b40d=_0x5e61[_0x305052];return _0x33b40d;};'use strict';var multer=require(_0x15e6('0x0'));var util=require(_0x15e6('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x15e6('0x2')]();var fs_extra=require(_0x15e6('0x3'));var auth=require(_0x15e6('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x15e6('0x5'));var controller=require(_0x15e6('0x6'));router['get']('/',auth[_0x15e6('0x7')](),controller[_0x15e6('0x8')]);router['get'](_0x15e6('0x9'),auth[_0x15e6('0x7')](),controller['describe']);router[_0x15e6('0xa')](_0x15e6('0xb'),auth[_0x15e6('0x7')](),controller[_0x15e6('0xc')]);router[_0x15e6('0xd')]('/',auth['isAuthenticated'](),controller[_0x15e6('0xe')]);router[_0x15e6('0xf')](_0x15e6('0xb'),auth[_0x15e6('0x7')](),controller[_0x15e6('0x10')]);router[_0x15e6('0x11')](_0x15e6('0xb'),auth['isAuthenticated'](),controller[_0x15e6('0x12')]);module[_0x15e6('0x13')]=router;
\ No newline at end of file
index 2164854..23e4c65 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x42b4=['TEXT','Form\x20properly\x20submitted','Note','Type\x20a\x20message','Thanks\x20you\x20for\x20your\x20time!','Skip','Feedback','ENUM','star','thumb','input','name','text','getDataValue','onlineForm','parse','setDataValue','stringify','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.','Your\x20request\x20has\x20not\x20been\x20processed.','Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}','website_alias','INTEGER','bottom_right','alternate','#fafafa','System','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','Generated\x20by\x20XCALLY\x20Motion','Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}','exports','STRING','address','email','Agent','#011F6A','#ffffff','BOOLEAN','rounded','squared','We\x20are\x20here!','Chat','Send','Contact\x20us'];(function(_0x3e138d,_0x2ca788){var _0x434945=function(_0x340d21){while(--_0x340d21){_0x3e138d['push'](_0x3e138d['shift']());}};_0x434945(++_0x2ca788);}(_0x42b4,0xf1));var _0x442b=function(_0x3c7335,_0x86f232){_0x3c7335=_0x3c7335-0x0;var _0x4c15a7=_0x42b4[_0x3c7335];return _0x4c15a7;};'use strict';var Sequelize=require('sequelize');var rs=require('randomstring');module[_0x442b('0x0')]={'name':{'type':Sequelize[_0x442b('0x1')],'allowNull':![]},'address':{'type':Sequelize[_0x442b('0x1')],'allowNull':![],'unique':_0x442b('0x2')},'description':{'type':Sequelize[_0x442b('0x1')]},'mapKey':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0x3')},'mapKeyOffline':{'type':Sequelize[_0x442b('0x1')],'defaultValue':'email'},'key':{'type':Sequelize['STRING'],'allowNull':![]},'agentAlias':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0x4')},'customerAlias':{'type':Sequelize[_0x442b('0x1')],'defaultValue':'Me'},'color':{'type':Sequelize[_0x442b('0x1')],'allowNull':![],'defaultValue':_0x442b('0x5'),'validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0x442b('0x1')],'allowNull':![],'defaultValue':_0x442b('0x5'),'validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x442b('0x6'),'validate':{'notEmpty':!![]}},'textButtonColor':{'type':Sequelize[_0x442b('0x1')],'allowNull':![],'defaultValue':'#ffffff','validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize['INTEGER'],'defaultValue':0xf},'remote':{'type':Sequelize['STRING']},'animation':{'type':Sequelize[_0x442b('0x7')],'defaultValue':!![]},'header_shape':{'type':Sequelize['ENUM'](_0x442b('0x8'),_0x442b('0x9')),'defaultValue':'rounded'},'header_online':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0xa')},'start_chat_button':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0xb')},'offline_chat_button':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0xc')},'header_offline':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0xd')},'download_transcript':{'type':Sequelize[_0x442b('0x7')],'defaultValue':!![]},'timeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'whiteLabel':{'type':Sequelize[_0x442b('0x1')],'defaultValue':'Powered\x20by\x20xCALLY'},'defaultWhiteLabel':{'type':Sequelize[_0x442b('0x7')],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0x442b('0xe')]},'closingQuestion':{'type':Sequelize['STRING'],'defaultValue':'Do\x20you\x20want\x20to\x20close\x20the\x20interaction?'},'formSubmitSuccessMessage':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0xf')},'formSubmitFailureMessage':{'type':Sequelize[_0x442b('0x1')],'defaultValue':'Form\x20submission\x20error'},'noteTitle':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0x10')},'placeholderMessage':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0x11')},'closingMessage':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0x12')},'closingMessageButton':{'type':Sequelize[_0x442b('0x1')],'defaultValue':'Send'},'skipMessageButton':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0x13')},'conditionAgreement':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableRating':{'type':Sequelize[_0x442b('0x7')],'defaultValue':![]},'enableFeedback':{'type':Sequelize[_0x442b('0x7')],'defaultValue':![]},'enableSendButton':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'feedbackTitle':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0x14')},'ratingType':{'type':Sequelize[_0x442b('0x15')](_0x442b('0x16'),_0x442b('0x17')),'defaultValue':_0x442b('0x16')},'ratingStarsNumber':{'type':Sequelize['INTEGER'],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0x442b('0xe')],'defaultValue':function(){return JSON['stringify']({'items':[{'type':_0x442b('0x18'),'variable':null,'config':{'placeholder':_0x442b('0x19'),'type':_0x442b('0x1a'),'required':!![]},'props':{'title':'name','helpText':''}},{'type':_0x442b('0x18'),'props':{'title':_0x442b('0x3'),'helpText':''},'config':{'required':!![],'placeholder':_0x442b('0x3'),'type':_0x442b('0x3')},'variable':null}],'fromKey':0x1});},'get':function(){return this[_0x442b('0x1b')](_0x442b('0x1c'))?JSON[_0x442b('0x1d')](this['getDataValue']('onlineForm')):{};},'set':function(_0x14f0c7){return this[_0x442b('0x1e')](_0x442b('0x1c'),JSON[_0x442b('0x1f')](_0x14f0c7));}},'offlineForm':{'type':Sequelize[_0x442b('0xe')],'defaultValue':function(){return JSON[_0x442b('0x1f')]({'items':[{'type':'input','props':{'title':_0x442b('0x3'),'helpText':''},'config':{'required':!![],'placeholder':'email','type':_0x442b('0x3')},'variable':null},{'type':'textarea','config':{'placeholder':_0x442b('0x20')},'props':{'title':_0x442b('0x20'),'helpText':_0x442b('0x21')}}],'fromKey':0x0});},'get':function(){return this[_0x442b('0x1b')](_0x442b('0x22'))?JSON[_0x442b('0x1d')](this[_0x442b('0x1b')](_0x442b('0x22'))):{};},'set':function(_0x4eed8e){return this[_0x442b('0x1e')]('offlineForm',JSON[_0x442b('0x1f')](_0x4eed8e));}},'token':{'type':Sequelize[_0x442b('0x1')],'defaultValue':function(){return rs[_0x442b('0x23')]();}},'autoclose':{'type':Sequelize[_0x442b('0x7')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0x442b('0x7')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0x442b('0x1')]},'forwardOffline':{'type':Sequelize[_0x442b('0x7')],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize[_0x442b('0x1')]},'waitingTitle':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0x24')},'waitingMessage':{'type':Sequelize['STRING'],'defaultValue':_0x442b('0x25')},'offlineMessageSubject':{'type':Sequelize[_0x442b('0x1')],'defaultValue':'New\x20offline\x20message\x20from\x20websiteName'},'offlineMessageBody':{'type':Sequelize[_0x442b('0x1')],'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[_0x442b('0x1')],'defaultValue':_0x442b('0x26')},'skipUnmanaged':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0x13')},'sendUnmanaged':{'type':Sequelize['STRING'],'defaultValue':_0x442b('0xc')},'enableCustomerAttachment':{'type':Sequelize[_0x442b('0x7')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize[_0x442b('0x7')],'defaultValue':![]},'agentAvatar':{'type':Sequelize[_0x442b('0xe')]},'showAgentAvatar':{'type':Sequelize[_0x442b('0x7')],'defaultValue':![]},'timezone':{'type':Sequelize[_0x442b('0x1')]},'notificationTemplate':{'type':Sequelize[_0x442b('0xe')],'defaultValue':function(){return _0x442b('0x27');}},'notificationSound':{'type':Sequelize[_0x442b('0x7')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0x442b('0x7')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0x28')},'waitForTheAssignedAgent':{'type':Sequelize[_0x442b('0x29')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x442b('0x29')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0x2a')},'verticalAlignment':{'type':Sequelize[_0x442b('0x29')],'defaultValue':0x1e},'labelText':{'type':Sequelize[_0x442b('0x1')],'defaultValue':'CHAT'},'messagesAlignment':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0x2b')},'defaultTitle':{'type':Sequelize[_0x442b('0x1')]},'customerAvatar':{'type':Sequelize[_0x442b('0xe')]},'showCustomerAvatar':{'type':Sequelize[_0x442b('0x7')],'defaultValue':![]},'messageFontSize':{'type':Sequelize[_0x442b('0x29')],'defaultValue':0xc},'backgroundColor':{'type':Sequelize[_0x442b('0x1')],'allowNull':![],'defaultValue':_0x442b('0x2c'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize[_0x442b('0x7')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x442b('0x29')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x442b('0x7')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x442b('0x29')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize[_0x442b('0x1')],'defaultValue':_0x442b('0x2d')},'systemAvatar':{'type':Sequelize[_0x442b('0xe')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0x442b('0x29')],'comment':_0x442b('0x2e')},'mandatoryDisposition':{'type':Sequelize[_0x442b('0x7')],'defaultValue':![],'comment':_0x442b('0x2f'),'set':function(_0x551dc1){if(!_0x551dc1)this['setDataValue'](_0x442b('0x30'),null);this[_0x442b('0x1e')]('mandatoryDisposition',_0x551dc1);}},'vidaooEscalation':{'type':Sequelize[_0x442b('0x7')],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize[_0x442b('0x1')]},'vidaooTopic':{'type':Sequelize[_0x442b('0x1')],'allowNull':![],'defaultValue':_0x442b('0x31')},'vidaooNote':{'type':Sequelize['STRING'],'defaultValue':function(){return _0x442b('0x32');}},'vidaooMetadata':{'type':Sequelize[_0x442b('0xe')],'defaultValue':null},'openNewInteraction':{'type':Sequelize[_0x442b('0x7')],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize[_0x442b('0xe')]}};
\ No newline at end of file
+var _0x6eb9=['Type\x20a\x20message','Thanks\x20you\x20for\x20your\x20time!','Skip','Feedback','star','thumb','stringify','name','input','getDataValue','onlineForm','parse','setDataValue','textarea','Comments','offlineForm','generate','All\x20of\x20our\x20agents\x20are\x20busy\x20at\x20this\x20time.\x20Your\x20chat\x20is\x20very\x20important\x20to\x20us.','New\x20offline\x20message\x20from\x20websiteName','Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}','bottom_right','CHAT','alternate','#fafafa','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','mandatoryDisposition','Generated\x20by\x20XCALLY\x20Motion','randomstring','exports','STRING','email','Agent','#011F6A','#ffffff','INTEGER','ENUM','squared','We\x20are\x20here!','Chat','Send','BOOLEAN','Powered\x20by\x20xCALLY','TEXT','Do\x20you\x20want\x20to\x20close\x20the\x20interaction?','Form\x20properly\x20submitted'];(function(_0x4953da,_0x5adaca){var _0x2d3780=function(_0x458f36){while(--_0x458f36){_0x4953da['push'](_0x4953da['shift']());}};_0x2d3780(++_0x5adaca);}(_0x6eb9,0x1ba));var _0x96eb=function(_0x3b3127,_0x51cdc5){_0x3b3127=_0x3b3127-0x0;var _0x19c58f=_0x6eb9[_0x3b3127];return _0x19c58f;};'use strict';var Sequelize=require('sequelize');var rs=require(_0x96eb('0x0'));module[_0x96eb('0x1')]={'name':{'type':Sequelize[_0x96eb('0x2')],'allowNull':![]},'address':{'type':Sequelize[_0x96eb('0x2')],'allowNull':![],'unique':'address'},'description':{'type':Sequelize['STRING']},'mapKey':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':_0x96eb('0x3')},'mapKeyOffline':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':_0x96eb('0x3')},'key':{'type':Sequelize[_0x96eb('0x2')],'allowNull':![]},'agentAlias':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':_0x96eb('0x4')},'customerAlias':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':'Me'},'color':{'type':Sequelize[_0x96eb('0x2')],'allowNull':![],'defaultValue':_0x96eb('0x5'),'validate':{'notEmpty':!![]}},'color_button':{'type':Sequelize[_0x96eb('0x2')],'allowNull':![],'defaultValue':_0x96eb('0x5'),'validate':{'notEmpty':!![]}},'textColor':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x96eb('0x6'),'validate':{'notEmpty':!![]}},'textButtonColor':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'#ffffff','validate':{'notEmpty':!![]}},'fontSize':{'type':Sequelize[_0x96eb('0x7')],'defaultValue':0xf},'remote':{'type':Sequelize[_0x96eb('0x2')]},'animation':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'header_shape':{'type':Sequelize[_0x96eb('0x8')]('rounded',_0x96eb('0x9')),'defaultValue':'rounded'},'header_online':{'type':Sequelize['STRING'],'defaultValue':_0x96eb('0xa')},'start_chat_button':{'type':Sequelize['STRING'],'defaultValue':_0x96eb('0xb')},'offline_chat_button':{'type':Sequelize['STRING'],'defaultValue':_0x96eb('0xc')},'header_offline':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':'Contact\x20us'},'download_transcript':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':!![]},'timeout':{'type':Sequelize[_0x96eb('0x7')],'defaultValue':0x0},'whiteLabel':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':_0x96eb('0xe')},'defaultWhiteLabel':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':!![]},'sitepic':{'type':Sequelize[_0x96eb('0xf')]},'closingQuestion':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':_0x96eb('0x10')},'formSubmitSuccessMessage':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':_0x96eb('0x11')},'formSubmitFailureMessage':{'type':Sequelize['STRING'],'defaultValue':'Form\x20submission\x20error'},'noteTitle':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':'Note'},'placeholderMessage':{'type':Sequelize['STRING'],'defaultValue':_0x96eb('0x12')},'closingMessage':{'type':Sequelize['STRING'],'defaultValue':_0x96eb('0x13')},'closingMessageButton':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':_0x96eb('0xc')},'skipMessageButton':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':_0x96eb('0x14')},'conditionAgreement':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':![]},'enableRating':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':![]},'enableFeedback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'enableSendButton':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':![]},'feedbackTitle':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':_0x96eb('0x15')},'ratingType':{'type':Sequelize[_0x96eb('0x8')](_0x96eb('0x16'),_0x96eb('0x17')),'defaultValue':'star'},'ratingStarsNumber':{'type':Sequelize[_0x96eb('0x7')],'defaultValue':0x5},'onlineForm':{'type':Sequelize[_0x96eb('0xf')],'defaultValue':function(){return JSON[_0x96eb('0x18')]({'items':[{'type':'input','variable':null,'config':{'placeholder':_0x96eb('0x19'),'type':'text','required':!![]},'props':{'title':_0x96eb('0x19'),'helpText':''}},{'type':_0x96eb('0x1a'),'props':{'title':'email','helpText':''},'config':{'required':!![],'placeholder':'email','type':_0x96eb('0x3')},'variable':null}],'fromKey':0x1});},'get':function(){return this[_0x96eb('0x1b')](_0x96eb('0x1c'))?JSON[_0x96eb('0x1d')](this[_0x96eb('0x1b')](_0x96eb('0x1c'))):{};},'set':function(_0x311683){return this[_0x96eb('0x1e')]('onlineForm',JSON[_0x96eb('0x18')](_0x311683));}},'offlineForm':{'type':Sequelize[_0x96eb('0xf')],'defaultValue':function(){return JSON[_0x96eb('0x18')]({'items':[{'type':'input','props':{'title':'email','helpText':''},'config':{'required':!![],'placeholder':'email','type':_0x96eb('0x3')},'variable':null},{'type':_0x96eb('0x1f'),'config':{'placeholder':'Comments'},'props':{'title':_0x96eb('0x20'),'helpText':'Leave\x20your\x20comments'}}],'fromKey':0x0});},'get':function(){return this[_0x96eb('0x1b')](_0x96eb('0x21'))?JSON[_0x96eb('0x1d')](this[_0x96eb('0x1b')](_0x96eb('0x21'))):{};},'set':function(_0xd3b968){return this[_0x96eb('0x1e')](_0x96eb('0x21'),JSON['stringify'](_0xd3b968));}},'token':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':function(){return rs[_0x96eb('0x22')]();}},'autoclose':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':!![]},'enableCustomerWriting':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':![]},'forwardTranscript':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':![]},'forwardTranscriptMessage':{'type':Sequelize[_0x96eb('0x2')]},'forwardOffline':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'forwardOfflineAddress':{'type':Sequelize['STRING']},'waitingTitle':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':_0x96eb('0x23')},'waitingMessage':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':'Please\x20hold\x20and\x20we\x20will\x20answer\x20your\x20request\x20as\x20soon\x20as\x20possible.'},'offlineMessageSubject':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':_0x96eb('0x24')},'offlineMessageBody':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':'You\x20received\x20a\x20new\x20offline\x20message\x20from\x20websiteName.\x20Here\x20you\x20can\x20find\x20the\x20details\x20of\x20the\x20request:'},'enableUnmanagedNote':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':!![]},'unmanagedMessage':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':'Your\x20request\x20has\x20not\x20been\x20processed.'},'skipUnmanaged':{'type':Sequelize['STRING'],'defaultValue':_0x96eb('0x14')},'sendUnmanaged':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':_0x96eb('0xc')},'enableCustomerAttachment':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':![]},'enableCustomerCheckmarks':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':![]},'agentAvatar':{'type':Sequelize[_0x96eb('0xf')]},'showAgentAvatar':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':![]},'timezone':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize[_0x96eb('0xf')],'defaultValue':function(){return _0x96eb('0x25');}},'notificationSound':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':![]},'hideWhenOffline':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':![]},'agentIdentifier':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':'website_alias'},'waitForTheAssignedAgent':{'type':Sequelize[_0x96eb('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x96eb('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'alignment':{'type':Sequelize['STRING'],'defaultValue':_0x96eb('0x26')},'verticalAlignment':{'type':Sequelize['INTEGER'],'defaultValue':0x1e},'labelText':{'type':Sequelize['STRING'],'defaultValue':_0x96eb('0x27')},'messagesAlignment':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':_0x96eb('0x28')},'defaultTitle':{'type':Sequelize[_0x96eb('0x2')]},'customerAvatar':{'type':Sequelize[_0x96eb('0xf')]},'showCustomerAvatar':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':![]},'messageFontSize':{'type':Sequelize['INTEGER'],'defaultValue':0xc},'backgroundColor':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x96eb('0x29'),'validate':{'notEmpty':!![]}},'queueTransfer':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x96eb('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x96eb('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'systemAlias':{'type':Sequelize['STRING'],'defaultValue':'System'},'systemAvatar':{'type':Sequelize['TEXT']},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0x96eb('0x2a'),'set':function(_0x28c526){if(!_0x28c526)this['setDataValue'](_0x96eb('0x2b'),null);this[_0x96eb('0x1e')](_0x96eb('0x2c'),_0x28c526);}},'vidaooEscalation':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':![]},'vidaooApiKey':{'type':Sequelize[_0x96eb('0x2')]},'vidaooTopic':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x96eb('0x2d')},'vidaooNote':{'type':Sequelize[_0x96eb('0x2')],'defaultValue':function(){return'Meeting\x20generated\x20for\x20interaction\x20#{{interaction.id}}\x20by\x20{{agent.name}}';}},'vidaooMetadata':{'type':Sequelize['TEXT'],'defaultValue':null},'openNewInteraction':{'type':Sequelize[_0x96eb('0xd')],'defaultValue':![],'allowNull':!![]},'subjectOffline':{'type':Sequelize[_0x96eb('0xf')]}};
\ No newline at end of file
index bf612a9..cec4a57 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe010=['bulkCreate','MailServerOut','Smtp','CloudProvider','forwardOffline','SendMail','sendMail','\x22%s\x22\x20<%s>','forwardOfflineAddress','MailAccountId','subjectOffline','toPairsIn','email','Chat','NotifyMailAccount','notifyMail','Could\x20not\x20remove\x20attachment\x20file','addInteraction','omit','getInteractions','Contact','fullname','internal','Tags','color','tag','getSnippet','virtual','License','chatLicenseExceeded','ifTime','server/files/chat/iframe.ejs','URL','address','origin','3.8.1','remote','x-real-ip','replace','render','alignment','verticalAlignment','labelText','textColor','textButtonColor','color_button','backgroundColor','hideWhenOffline','IntervalId','addApplications','transaction','sequelize','READ_COMMITTED','findAndCountAll','finally','getApplications','addProactiveActions','chatProactiveAction','getProactiveActions','getFields','onlineForm','items','fromKey','ChatOfflineMessage','Attachments','addAgents','emit','userChatWebsite:save','removeAgents','isArray','userChatWebsite:remove','getAgents','mustache','path','ejs','fs-extra','lodash','querystring','html-to-text','ioredis','jayson/promise','url','../../config/logger','api','../../errors/api','APIBadRequestError','APINotFoundError','APIOutOfIntervalError','handleError','../../mysqldb','redis','localhost','socket.io-emitter','./chatWebsite.socket','register','client','http','request','info','ChatWebsite,\x20%s,\x20%s','debug','stringify','error','message','request\x20sent','result','catch','sendStatus','end','json','undefined','limit','count','offset','status','set','Content-Range','update','then','destroy','ChatWebsites','stack','name','send','user-agent-parser','setUA','getResult','customerIp','x-forwarded-for','split','firstName','lastName','x-real-port','referer','browser','version','unknown','format','%s\x20%s','device','model','vendor','%s\x20%s\x20%s','index','mandatoryDispositionPause','map','ChatWebsite','rawAttributes','fieldName','type','key','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','includeAll','findAll','rows','show','params','Pause','include','options','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','ChatWebsiteId','Disposition','getDispositions','findOne','removeDispositions','addAnswer','CannedAnswer','getAnswers','removeAnswers','ids','addLogo','sitepic','file','addAvatar','agentAvatar','filename','addCustomerAvatar','customerAvatar','addSystemAvatar','systemAvatar','getLogo','root','server/files/images/logos/default_logo.svg','../../config/license/util','getLicense','custom','isNil','existsSync','join','server/files/images/logos/','download','getAvatar','server/files/images/avatars/default_avatar.png','server/files/images/avatars/','getCustomerAvatar','server/files/images/avatars/customer_avatar.png','showCustomerAvatar','server/files/images/avatars/system_avatar.png','notify','from','From\x20is\x20mandatory','mapKey','MapKey\x20is\x20mandatory','isEmpty','CmContact','No\x20available\x20attributes','createdAt','updatedAt','CompanyId','ListId','includes','List','Contacts','DESC','ChatApplication','Applications','Interval','Intervals','interval','Chat\x20Website\x20with\x20id\x20%s\x20not\x20found','timezone','list','priority','asc','account','contact','headers','threadId','ChatInteraction','closed','Writing\x20on\x20closed\x20interaction','externalUrl','ContactId','interaction','messageId','created','autoclose','applications','push','close','unmanaged','*,*,*,*','ChatMessage','AttachmentId','UserId','User','unshift','agent','waitForTheAssignedAgent','forcedOwnership','queueId','queue','waitForTheAssignedQueue','Start','startRouting','EventManager','files','Sequelize','no\x20available\x20attributes','difference','ValidationError','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKeyOffline','mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','MailAccount','findOrCreate','spread','readFileSync','server/files/templates/chatOfflineMessage.ejs','utf8','toPairs','offlineMessageBody','fromString','originalname','mimetype','server','attachments','offline-chat','openNewInteraction','Attachment'];(function(_0x4e4984,_0x10d93e){var _0x1a807e=function(_0x4381cc){while(--_0x4381cc){_0x4e4984['push'](_0x4e4984['shift']());}};_0x1a807e(++_0x10d93e);}(_0xe010,0x17e));var _0x0e01=function(_0x3bd928,_0x441fec){_0x3bd928=_0x3bd928-0x0;var _0x4cc090=_0xe010[_0x3bd928];return _0x4cc090;};'use strict';var Mustache=require(_0x0e01('0x0'));var util=require('util');var path=require(_0x0e01('0x1'));var ejs=require(_0x0e01('0x2'));var fs=require('fs');var fs_extra=require(_0x0e01('0x3'));var _=require(_0x0e01('0x4'));var querystring=require(_0x0e01('0x5'));var htmlToText=require(_0x0e01('0x6'));var Redis=require(_0x0e01('0x7'));var jayson=require(_0x0e01('0x8'));var url=require(_0x0e01('0x9'));var qs=require('../../components/parsers/qs');var logger=require(_0x0e01('0xa'))(_0x0e01('0xb'));var config=require('../../config/environment');var APIBadRequestError=require(_0x0e01('0xc'))[_0x0e01('0xd')];var APINotFoundError=require('../../errors/api')[_0x0e01('0xe')];var APIOutOfIntervalError=require(_0x0e01('0xc'))[_0x0e01('0xf')];var APIHandleError=require('../../errors/api')[_0x0e01('0x10')];var APIConflictError=require(_0x0e01('0xc'))['APIConflictError'];var db=require(_0x0e01('0x11'))['db'];config[_0x0e01('0x12')]=_['defaults'](config['redis'],{'host':_0x0e01('0x13'),'port':0x18eb});var socket=require(_0x0e01('0x14'))(new Redis(config[_0x0e01('0x12')]));require(_0x0e01('0x15'))[_0x0e01('0x16')](socket);var client=jayson[_0x0e01('0x17')][_0x0e01('0x18')]({'port':0x232c});var client9002=jayson[_0x0e01('0x17')][_0x0e01('0x18')]({'port':0x232a});var client9003=jayson[_0x0e01('0x17')][_0x0e01('0x18')]({'port':0x232b});var client9001=jayson[_0x0e01('0x17')][_0x0e01('0x18')]({'port':0x2329});function respondWithRpcPromise(_0x230fbe,_0x147262,_0x440452,_0x286870){return new Promise(function(_0x51d333,_0xc9b6ad){var _0x553df6=_0x286870||client;return _0x553df6[_0x0e01('0x19')](_0x230fbe,_0x440452)['then'](function(_0x50fa55){logger[_0x0e01('0x1a')](_0x0e01('0x1b'),_0x147262,'request\x20sent');logger[_0x0e01('0x1c')]('ChatWebsite,\x20%s,\x20%s,\x20%s',_0x147262,'request\x20sent',JSON[_0x0e01('0x1d')](_0x50fa55));if(_0x50fa55[_0x0e01('0x1e')]){if(_0x50fa55[_0x0e01('0x1e')]['code']===0x1f4){logger['error']('ChatWebsite,\x20%s,\x20%s',_0x147262,_0x50fa55[_0x0e01('0x1e')]['message']);return _0xc9b6ad(_0x50fa55['error'][_0x0e01('0x1f')]);}logger[_0x0e01('0x1e')](_0x0e01('0x1b'),_0x147262,_0x50fa55[_0x0e01('0x1e')]['message']);return _0x51d333(_0x50fa55[_0x0e01('0x1e')][_0x0e01('0x1f')]);}else{logger[_0x0e01('0x1a')](_0x0e01('0x1b'),_0x147262,_0x0e01('0x20'));_0x51d333(_0x50fa55[_0x0e01('0x21')][_0x0e01('0x1f')]);}})[_0x0e01('0x22')](function(_0x3e7d79){logger[_0x0e01('0x1e')](_0x0e01('0x1b'),_0x147262,_0x3e7d79);_0xc9b6ad(_0x3e7d79);});});}function respondWithStatusCode(_0x36e44e,_0x202dae){_0x202dae=_0x202dae||0xcc;return function(_0x17520a){if(_0x17520a){return _0x36e44e[_0x0e01('0x23')](_0x202dae);}return _0x36e44e['status'](_0x202dae)[_0x0e01('0x24')]();};}function respondWithResult(_0x10a318,_0x34a9b1){_0x34a9b1=_0x34a9b1||0xc8;return function(_0x58edb4){if(_0x58edb4){return _0x10a318['status'](_0x34a9b1)[_0x0e01('0x25')](_0x58edb4);}};}function respondWithFilteredResult(_0x850d92,_0x3f9a2a){return function(_0x4c2c83){if(_0x4c2c83){var _0x58ba68=typeof _0x3f9a2a['offset']===_0x0e01('0x26')&&typeof _0x3f9a2a[_0x0e01('0x27')]===_0x0e01('0x26');var _0xae2ef1=_0x4c2c83[_0x0e01('0x28')];var _0x42a7c7=_0x58ba68?0x0:_0x3f9a2a['offset'];var _0x4c8779=_0x58ba68?_0x4c2c83[_0x0e01('0x28')]:_0x3f9a2a[_0x0e01('0x29')]+_0x3f9a2a['limit'];var _0x312991;if(_0x4c8779>=_0xae2ef1){_0x4c8779=_0xae2ef1;_0x312991=0xc8;}else{_0x312991=0xce;}_0x850d92[_0x0e01('0x2a')](_0x312991);return _0x850d92[_0x0e01('0x2b')](_0x0e01('0x2c'),_0x42a7c7+'-'+_0x4c8779+'/'+_0xae2ef1)[_0x0e01('0x25')](_0x4c2c83);}return null;};}function saveUpdates(_0x12e501){return function(_0x14e144){if(_0x14e144){return _0x14e144[_0x0e01('0x2d')](_0x12e501)[_0x0e01('0x2e')](function(_0x4bb437){return _0x4bb437;});}return null;};}function removeEntity(_0x4e5378){return function(_0x19e563){if(_0x19e563){return _0x19e563[_0x0e01('0x2f')]()['then'](function(){var _0x38b4b3=_0x19e563['get']({'plain':!![]});var _0x5ab4ae=_0x0e01('0x30');return db['UserProfileResource'][_0x0e01('0x2f')]({'where':{'type':_0x5ab4ae,'resourceId':_0x38b4b3['id']}})[_0x0e01('0x2e')](function(){return _0x19e563;});})['then'](function(){_0x4e5378['status'](0xcc)[_0x0e01('0x24')]();});}};}function handleEntityNotFound(_0x57999e){return function(_0x40187c){if(!_0x40187c){_0x57999e[_0x0e01('0x23')](0x194);}return _0x40187c;};}function handleError(_0x9940d6,_0x50fc43){_0x50fc43=_0x50fc43||0x1f4;return function(_0x373f3a){logger[_0x0e01('0x1e')](_0x373f3a[_0x0e01('0x31')]);if(_0x373f3a[_0x0e01('0x32')]){delete _0x373f3a[_0x0e01('0x32')];}_0x9940d6['status'](_0x50fc43)[_0x0e01('0x33')](_0x373f3a);};}function createInteractionObject(_0x51a8a6,_0x57e59e,_0x345e0a,_0x4dbe21){var _0x486d7c=require(_0x0e01('0x34'));var _0x3b8ffc=new _0x486d7c();var _0x26cced=_0x3b8ffc[_0x0e01('0x35')](_0x345e0a['user-agent'])[_0x0e01('0x36')]();var _0x318ccf=_0x57e59e[_0x0e01('0x37')];if(_0x345e0a['cf-connecting-ip']){_0x318ccf=_0x345e0a['cf-connecting-ip'];}else if(_0x345e0a[_0x0e01('0x38')]){_0x318ccf=_['first'](_0x345e0a[_0x0e01('0x38')][_0x0e01('0x39')](','));}return{'ContactId':_0x4dbe21['id'],'ChatWebsiteId':_0x51a8a6,'from':(_0x4dbe21[_0x0e01('0x3a')]||'')+'\x20'+(_0x4dbe21[_0x0e01('0x3b')]||''),'customerIp':_0x318ccf,'customerPort':_0x345e0a[_0x0e01('0x3c')]?_0x345e0a['x-real-port']:null,'referer':_0x57e59e[_0x0e01('0x3d')],'browserName':_0x26cced[_0x0e01('0x3e')][_0x0e01('0x32')]&&_0x26cced[_0x0e01('0x3e')]['version']?util['format']('%s\x20%s',_0x26cced[_0x0e01('0x3e')][_0x0e01('0x32')],_0x26cced['browser'][_0x0e01('0x3f')]):_0x0e01('0x40'),'browserVersion':_0x26cced[_0x0e01('0x3e')][_0x0e01('0x3f')]||_0x0e01('0x40'),'osName':util[_0x0e01('0x41')](_0x0e01('0x42'),_0x26cced['os'][_0x0e01('0x32')],_0x26cced['os'][_0x0e01('0x3f')]),'osVersion':_0x26cced['os'][_0x0e01('0x3f')],'deviceModel':_0x26cced[_0x0e01('0x43')][_0x0e01('0x44')]&&_0x26cced[_0x0e01('0x43')][_0x0e01('0x45')]?util[_0x0e01('0x41')](_0x0e01('0x46'),_0x26cced[_0x0e01('0x43')][_0x0e01('0x44')],_0x26cced['device']['vendor'],_0x26cced[_0x0e01('0x43')]['type']):null,'deviceVendor':_0x26cced[_0x0e01('0x43')][_0x0e01('0x45')],'deviceType':_0x26cced['device']['type'],'formData':JSON[_0x0e01('0x1d')](_0x57e59e)};}exports[_0x0e01('0x47')]=function(_0x21691b,_0xe85206){var _0x3ab9c2={'include':[{'model':db['Pause'],'as':_0x0e01('0x48')}]},_0x2d47ee={},_0x4c81b3={'count':0x0,'rows':[]};var _0x3626ea=_[_0x0e01('0x49')](db[_0x0e01('0x4a')][_0x0e01('0x4b')],function(_0x479f5b){return{'name':_0x479f5b[_0x0e01('0x4c')],'type':_0x479f5b[_0x0e01('0x4d')][_0x0e01('0x4e')]};});_0x2d47ee[_0x0e01('0x44')]=_[_0x0e01('0x49')](_0x3626ea,_0x0e01('0x32'));_0x2d47ee[_0x0e01('0x4f')]=_[_0x0e01('0x50')](_0x21691b['query']);_0x2d47ee[_0x0e01('0x51')]=_[_0x0e01('0x52')](_0x2d47ee[_0x0e01('0x44')],_0x2d47ee[_0x0e01('0x4f')]);_0x3ab9c2[_0x0e01('0x53')]=_[_0x0e01('0x52')](_0x2d47ee['model'],qs[_0x0e01('0x54')](_0x21691b['query'][_0x0e01('0x54')]));_0x3ab9c2[_0x0e01('0x53')]=_0x3ab9c2['attributes'][_0x0e01('0x55')]?_0x3ab9c2[_0x0e01('0x53')]:_0x2d47ee['model'];if(!_0x21691b[_0x0e01('0x4f')][_0x0e01('0x56')](_0x0e01('0x57'))){_0x3ab9c2['limit']=qs[_0x0e01('0x27')](_0x21691b[_0x0e01('0x4f')][_0x0e01('0x27')]);_0x3ab9c2[_0x0e01('0x29')]=qs[_0x0e01('0x29')](_0x21691b[_0x0e01('0x4f')][_0x0e01('0x29')]);}_0x3ab9c2[_0x0e01('0x58')]=qs[_0x0e01('0x59')](_0x21691b[_0x0e01('0x4f')][_0x0e01('0x59')]);_0x3ab9c2[_0x0e01('0x5a')]=qs['filters'](_[_0x0e01('0x5b')](_0x21691b[_0x0e01('0x4f')],_0x2d47ee['filters']),_0x3626ea);if(_0x21691b['query']['filter']){_0x3ab9c2[_0x0e01('0x5a')]=_[_0x0e01('0x5c')](_0x3ab9c2[_0x0e01('0x5a')],{'$or':_[_0x0e01('0x49')](_0x3626ea,function(_0x5bf1ec){if(_0x5bf1ec['type']!==_0x0e01('0x5d')){var _0x2cb385={};_0x2cb385[_0x5bf1ec[_0x0e01('0x32')]]={'$like':'%'+_0x21691b[_0x0e01('0x4f')][_0x0e01('0x5e')]+'%'};return _0x2cb385;}})});}_0x3ab9c2=_[_0x0e01('0x5c')]({},_0x3ab9c2,_0x21691b['options']);var _0x273927={'where':_0x3ab9c2[_0x0e01('0x5a')]};return db[_0x0e01('0x4a')]['count'](_0x273927)[_0x0e01('0x2e')](function(_0x559377){_0x4c81b3[_0x0e01('0x28')]=_0x559377;if(_0x21691b['query'][_0x0e01('0x5f')]){_0x3ab9c2['include']=[{'all':!![]}];}return db[_0x0e01('0x4a')][_0x0e01('0x60')](_0x3ab9c2);})[_0x0e01('0x2e')](function(_0x36ef94){_0x4c81b3[_0x0e01('0x61')]=_0x36ef94;return _0x4c81b3;})['then'](respondWithFilteredResult(_0xe85206,_0x3ab9c2))['catch'](handleError(_0xe85206,null));};exports[_0x0e01('0x62')]=function(_0x5338b1,_0x94d3d1){var _0x4672ec={'raw':![],'where':{'id':_0x5338b1[_0x0e01('0x63')]['id']},'include':[{'model':db[_0x0e01('0x64')],'as':_0x0e01('0x48')}]},_0x19bda3={};_0x19bda3['model']=_[_0x0e01('0x50')](db['ChatWebsite'][_0x0e01('0x4b')]);_0x19bda3[_0x0e01('0x4f')]=_[_0x0e01('0x50')](_0x5338b1[_0x0e01('0x4f')]);_0x19bda3[_0x0e01('0x51')]=_['intersection'](_0x19bda3[_0x0e01('0x44')],_0x19bda3[_0x0e01('0x4f')]);_0x4672ec[_0x0e01('0x53')]=_['intersection'](_0x19bda3[_0x0e01('0x44')],qs[_0x0e01('0x54')](_0x5338b1[_0x0e01('0x4f')][_0x0e01('0x54')]));_0x4672ec[_0x0e01('0x53')]=_0x4672ec[_0x0e01('0x53')][_0x0e01('0x55')]?_0x4672ec[_0x0e01('0x53')]:_0x19bda3[_0x0e01('0x44')];if(_0x5338b1[_0x0e01('0x4f')][_0x0e01('0x5f')]){_0x4672ec[_0x0e01('0x65')]=[{'all':!![]}];}_0x4672ec=_['merge']({},_0x4672ec,_0x5338b1[_0x0e01('0x66')]);return db[_0x0e01('0x4a')][_0x0e01('0x67')](_0x4672ec)[_0x0e01('0x2e')](handleEntityNotFound(_0x94d3d1,null))[_0x0e01('0x2e')](respondWithResult(_0x94d3d1,null))[_0x0e01('0x22')](handleError(_0x94d3d1,null));};exports[_0x0e01('0x68')]=function(_0x56e062,_0x58c63c){return db[_0x0e01('0x4a')][_0x0e01('0x68')](_0x56e062[_0x0e01('0x69')],{})['then'](function(_0x3fe595){var _0x4a7f15=_0x56e062[_0x0e01('0x6a')][_0x0e01('0x6b')]({'plain':!![]});if(!_0x4a7f15)throw new Error(_0x0e01('0x6c'));if(_0x4a7f15[_0x0e01('0x6d')]===_0x0e01('0x6a')){var _0x2d7419=_0x3fe595[_0x0e01('0x6b')]({'plain':!![]});var _0x1201ab=_0x0e01('0x30');return db[_0x0e01('0x6e')][_0x0e01('0x67')]({'where':{'name':_0x1201ab,'userProfileId':_0x4a7f15[_0x0e01('0x6f')]},'raw':!![]})[_0x0e01('0x2e')](function(_0x5df421){if(_0x5df421&&_0x5df421[_0x0e01('0x70')]===0x0){return db['UserProfileResource'][_0x0e01('0x68')]({'name':_0x2d7419['name'],'resourceId':_0x2d7419['id'],'type':_0x5df421[_0x0e01('0x32')],'sectionId':_0x5df421['id']},{})['then'](function(){return _0x3fe595;});}else{return _0x3fe595;}})[_0x0e01('0x22')](function(_0x34ac10){logger[_0x0e01('0x1e')](_0x0e01('0x71'),_0x34ac10);throw _0x34ac10;});}return _0x3fe595;})[_0x0e01('0x2e')](respondWithResult(_0x58c63c,0xc9))['catch'](handleError(_0x58c63c,null));};exports[_0x0e01('0x2d')]=function(_0x25c567,_0xe5f731){if(_0x25c567[_0x0e01('0x69')]['id']){delete _0x25c567[_0x0e01('0x69')]['id'];}return db[_0x0e01('0x4a')][_0x0e01('0x67')]({'where':{'id':_0x25c567[_0x0e01('0x63')]['id']},'include':[{'model':db[_0x0e01('0x64')],'as':_0x0e01('0x48')}]})['then'](handleEntityNotFound(_0xe5f731,null))['then'](saveUpdates(_0x25c567['body'],null))[_0x0e01('0x2e')](respondWithResult(_0xe5f731,null))['catch'](handleError(_0xe5f731,null));};exports['destroy']=function(_0x438b41,_0x5cbd2f){return db['ChatWebsite'][_0x0e01('0x67')]({'where':{'id':_0x438b41['params']['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0x5cbd2f,null))['then'](removeEntity(_0x5cbd2f,null))[_0x0e01('0x22')](handleError(_0x5cbd2f,null));};exports[_0x0e01('0x72')]=function(_0x385b6e,_0x1e6d14){return db[_0x0e01('0x4a')][_0x0e01('0x72')]()[_0x0e01('0x2e')](respondWithResult(_0x1e6d14,null))['catch'](handleError(_0x1e6d14,null));};exports[_0x0e01('0x73')]=function(_0x231a85,_0x1cae16){if(_0x231a85[_0x0e01('0x69')]['id']){delete _0x231a85[_0x0e01('0x69')]['id'];}return db[_0x0e01('0x4a')][_0x0e01('0x67')]({'where':{'id':_0x231a85[_0x0e01('0x63')]['id']}})['then'](handleEntityNotFound(_0x1cae16,null))['then'](function(_0x46b488){if(_0x46b488){_0x231a85['body'][_0x0e01('0x74')]=_0x46b488['id'];return db[_0x0e01('0x75')][_0x0e01('0x68')](_0x231a85['body']);}})['then'](respondWithResult(_0x1cae16,null))[_0x0e01('0x22')](handleError(_0x1cae16,null));};exports[_0x0e01('0x76')]=function(_0xf0ebe7,_0x292237){var _0x1d5c5c={'raw':![],'where':{}};var _0x533d8e={};var _0x59d331={'count':0x0,'rows':[]};return db[_0x0e01('0x4a')][_0x0e01('0x77')]({'where':{'id':_0xf0ebe7[_0x0e01('0x63')]['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0x292237,null))['then'](function(_0x5b28c3){if(_0x5b28c3){_0x533d8e[_0x0e01('0x44')]=_['keys'](db['Disposition'][_0x0e01('0x4b')]);_0x533d8e[_0x0e01('0x4f')]=_[_0x0e01('0x50')](_0xf0ebe7[_0x0e01('0x4f')]);_0x533d8e[_0x0e01('0x51')]=_[_0x0e01('0x52')](_0x533d8e[_0x0e01('0x44')],_0x533d8e[_0x0e01('0x4f')]);_0x1d5c5c['attributes']=_[_0x0e01('0x52')](_0x533d8e[_0x0e01('0x44')],qs[_0x0e01('0x54')](_0xf0ebe7[_0x0e01('0x4f')][_0x0e01('0x54')]));_0x1d5c5c[_0x0e01('0x53')]=_0x1d5c5c[_0x0e01('0x53')][_0x0e01('0x55')]?_0x1d5c5c[_0x0e01('0x53')]:_0x533d8e[_0x0e01('0x44')];if(!_0xf0ebe7[_0x0e01('0x4f')][_0x0e01('0x56')]('nolimit')){_0x1d5c5c[_0x0e01('0x27')]=qs[_0x0e01('0x27')](_0xf0ebe7['query'][_0x0e01('0x27')]);_0x1d5c5c[_0x0e01('0x29')]=qs['offset'](_0xf0ebe7[_0x0e01('0x4f')][_0x0e01('0x29')]);}_0x1d5c5c[_0x0e01('0x58')]=qs['sort'](_0xf0ebe7[_0x0e01('0x4f')][_0x0e01('0x59')]);_0x1d5c5c[_0x0e01('0x5a')]=qs[_0x0e01('0x51')](_['pick'](_0xf0ebe7['query'],_0x533d8e[_0x0e01('0x51')]));_0x1d5c5c['where']['ChatWebsiteId']=_0x5b28c3['id'];if(_0xf0ebe7[_0x0e01('0x4f')]['filter']){_0x1d5c5c[_0x0e01('0x5a')]=_[_0x0e01('0x5c')](_0x1d5c5c[_0x0e01('0x5a')],{'$or':_['map'](_0x1d5c5c['attributes'],function(_0x2718a0){var _0xb587d9={};_0xb587d9[_0x2718a0]={'$like':'%'+_0xf0ebe7[_0x0e01('0x4f')]['filter']+'%'};return _0xb587d9;})});}_0x1d5c5c=_[_0x0e01('0x5c')]({},_0x1d5c5c,_0xf0ebe7['options']);return db['Disposition'][_0x0e01('0x28')]({'where':_0x1d5c5c[_0x0e01('0x5a')]})[_0x0e01('0x2e')](function(_0x3e3fda){_0x59d331[_0x0e01('0x28')]=_0x3e3fda;if(_0xf0ebe7['query'][_0x0e01('0x5f')]){_0x1d5c5c[_0x0e01('0x65')]=[{'all':!![]}];}return db[_0x0e01('0x75')][_0x0e01('0x60')](_0x1d5c5c);})[_0x0e01('0x2e')](function(_0x533e0a){_0x59d331[_0x0e01('0x61')]=_0x533e0a;return _0x59d331;});}})[_0x0e01('0x2e')](respondWithFilteredResult(_0x292237,_0x1d5c5c))[_0x0e01('0x22')](handleError(_0x292237,null));};exports[_0x0e01('0x78')]=function(_0x3f2709,_0x5dfd31){return db['ChatWebsite'][_0x0e01('0x67')]({'where':{'id':_0x3f2709[_0x0e01('0x63')]['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0x5dfd31,null))[_0x0e01('0x2e')](function(_0x22797a){if(_0x22797a){return _0x22797a[_0x0e01('0x78')](_0x3f2709['query']['ids']);}})['then'](respondWithStatusCode(_0x5dfd31,null))[_0x0e01('0x22')](handleError(_0x5dfd31,null));};exports[_0x0e01('0x79')]=function(_0x4a3008,_0x3a3755){if(_0x4a3008[_0x0e01('0x69')]['id']){delete _0x4a3008[_0x0e01('0x69')]['id'];}return db[_0x0e01('0x4a')][_0x0e01('0x67')]({'where':{'id':_0x4a3008[_0x0e01('0x63')]['id']}})['then'](handleEntityNotFound(_0x3a3755,null))[_0x0e01('0x2e')](function(_0x283f9a){if(_0x283f9a){_0x4a3008[_0x0e01('0x69')]['ChatWebsiteId']=_0x283f9a['id'];return db[_0x0e01('0x7a')][_0x0e01('0x68')](_0x4a3008[_0x0e01('0x69')]);}})[_0x0e01('0x2e')](respondWithResult(_0x3a3755,null))['catch'](handleError(_0x3a3755,null));};exports[_0x0e01('0x7b')]=function(_0x500e51,_0x5b52cc){var _0x3e3ee9={'raw':![],'where':{}};var _0x2ef18f={};var _0x57df16={'count':0x0,'rows':[]};return db[_0x0e01('0x4a')][_0x0e01('0x77')]({'where':{'id':_0x500e51[_0x0e01('0x63')]['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0x5b52cc,null))['then'](function(_0x23bddc){if(_0x23bddc){_0x2ef18f['model']=_[_0x0e01('0x50')](db['CannedAnswer'][_0x0e01('0x4b')]);_0x2ef18f['query']=_['keys'](_0x500e51[_0x0e01('0x4f')]);_0x2ef18f[_0x0e01('0x51')]=_['intersection'](_0x2ef18f[_0x0e01('0x44')],_0x2ef18f[_0x0e01('0x4f')]);_0x3e3ee9[_0x0e01('0x53')]=_['intersection'](_0x2ef18f[_0x0e01('0x44')],qs['fields'](_0x500e51[_0x0e01('0x4f')][_0x0e01('0x54')]));_0x3e3ee9[_0x0e01('0x53')]=_0x3e3ee9[_0x0e01('0x53')][_0x0e01('0x55')]?_0x3e3ee9[_0x0e01('0x53')]:_0x2ef18f[_0x0e01('0x44')];if(!_0x500e51[_0x0e01('0x4f')][_0x0e01('0x56')](_0x0e01('0x57'))){_0x3e3ee9[_0x0e01('0x27')]=qs[_0x0e01('0x27')](_0x500e51[_0x0e01('0x4f')][_0x0e01('0x27')]);_0x3e3ee9[_0x0e01('0x29')]=qs[_0x0e01('0x29')](_0x500e51['query'][_0x0e01('0x29')]);}_0x3e3ee9[_0x0e01('0x58')]=qs[_0x0e01('0x59')](_0x500e51[_0x0e01('0x4f')][_0x0e01('0x59')]);_0x3e3ee9[_0x0e01('0x5a')]=qs[_0x0e01('0x51')](_['pick'](_0x500e51[_0x0e01('0x4f')],_0x2ef18f['filters']));_0x3e3ee9[_0x0e01('0x5a')][_0x0e01('0x74')]=_0x23bddc['id'];if(_0x500e51[_0x0e01('0x4f')]['filter']){_0x3e3ee9['where']=_[_0x0e01('0x5c')](_0x3e3ee9[_0x0e01('0x5a')],{'$or':_[_0x0e01('0x49')](_0x3e3ee9[_0x0e01('0x53')],function(_0x33c11a){var _0x35a5c2={};_0x35a5c2[_0x33c11a]={'$like':'%'+_0x500e51[_0x0e01('0x4f')]['filter']+'%'};return _0x35a5c2;})});}_0x3e3ee9=_[_0x0e01('0x5c')]({},_0x3e3ee9,_0x500e51[_0x0e01('0x66')]);return db[_0x0e01('0x7a')][_0x0e01('0x28')]({'where':_0x3e3ee9[_0x0e01('0x5a')]})['then'](function(_0x595206){_0x57df16['count']=_0x595206;if(_0x500e51[_0x0e01('0x4f')][_0x0e01('0x5f')]){_0x3e3ee9[_0x0e01('0x65')]=[{'all':!![]}];}return db[_0x0e01('0x7a')][_0x0e01('0x60')](_0x3e3ee9);})[_0x0e01('0x2e')](function(_0x371d71){_0x57df16[_0x0e01('0x61')]=_0x371d71;return _0x57df16;});}})[_0x0e01('0x2e')](respondWithFilteredResult(_0x5b52cc,_0x3e3ee9))[_0x0e01('0x22')](handleError(_0x5b52cc,null));};exports['removeAnswers']=function(_0x4d2626,_0x355f0c){return db[_0x0e01('0x4a')]['find']({'where':{'id':_0x4d2626[_0x0e01('0x63')]['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0x355f0c,null))['then'](function(_0x5da911){if(_0x5da911){return _0x5da911[_0x0e01('0x7c')](_0x4d2626[_0x0e01('0x4f')][_0x0e01('0x7d')]);}})[_0x0e01('0x2e')](respondWithStatusCode(_0x355f0c,null))[_0x0e01('0x22')](handleError(_0x355f0c,null));};exports[_0x0e01('0x7e')]=function(_0x5ab31c,_0x22c43e){_0x5ab31c['body'][_0x0e01('0x7f')]=_0x5ab31c[_0x0e01('0x80')]['filename'];return db['ChatWebsite']['find']({'where':{'id':_0x5ab31c[_0x0e01('0x63')]['id']}})['then'](handleEntityNotFound(_0x22c43e,null))['then'](saveUpdates(_0x5ab31c[_0x0e01('0x69')],null))['then'](respondWithResult(_0x22c43e,null))[_0x0e01('0x22')](handleError(_0x22c43e,null));};exports[_0x0e01('0x81')]=function(_0x4702a0,_0x1db996){_0x4702a0['body'][_0x0e01('0x82')]=_0x4702a0[_0x0e01('0x80')][_0x0e01('0x83')];return db['ChatWebsite'][_0x0e01('0x67')]({'where':{'id':_0x4702a0[_0x0e01('0x63')]['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0x1db996,null))[_0x0e01('0x2e')](saveUpdates(_0x4702a0[_0x0e01('0x69')],null))[_0x0e01('0x2e')](respondWithResult(_0x1db996,null))[_0x0e01('0x22')](handleError(_0x1db996,null));};exports[_0x0e01('0x84')]=function(_0x159329,_0x3a1493){_0x159329[_0x0e01('0x69')][_0x0e01('0x85')]=_0x159329[_0x0e01('0x80')][_0x0e01('0x83')];return db[_0x0e01('0x4a')][_0x0e01('0x67')]({'where':{'id':_0x159329['params']['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0x3a1493,null))[_0x0e01('0x2e')](saveUpdates(_0x159329[_0x0e01('0x69')],null))[_0x0e01('0x2e')](respondWithResult(_0x3a1493,null))[_0x0e01('0x22')](handleError(_0x3a1493,null));};exports[_0x0e01('0x86')]=function(_0x30911d,_0x1d64bf){_0x30911d[_0x0e01('0x69')][_0x0e01('0x87')]=_0x30911d['file'][_0x0e01('0x83')];return db[_0x0e01('0x4a')][_0x0e01('0x67')]({'where':{'id':_0x30911d[_0x0e01('0x63')]['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0x1d64bf,null))['then'](saveUpdates(_0x30911d['body'],null))[_0x0e01('0x2e')](respondWithResult(_0x1d64bf,null))[_0x0e01('0x22')](handleError(_0x1d64bf,null));};exports[_0x0e01('0x88')]=function(_0x2872fa,_0x511769){var _0x1513b9=path['join'](config[_0x0e01('0x89')],_0x0e01('0x8a'));var _0x300a22={'where':{'id':_0x2872fa[_0x0e01('0x63')]['id']},'attributes':['id','sitepic'],'raw':!![]};var _0x300717=![];return require(_0x0e01('0x8b'))[_0x0e01('0x8c')]()[_0x0e01('0x2e')](function(_0x231da0){if(_0x231da0){_0x300717=_0x231da0[_0x0e01('0x8d')];}})['then'](function(){return db[_0x0e01('0x4a')]['find'](_0x300a22);})[_0x0e01('0x2e')](handleEntityNotFound(_0x511769,null))[_0x0e01('0x2e')](function(_0x11ec22){if(_0x11ec22){if(!_[_0x0e01('0x8e')](_0x11ec22['sitepic'])){if(fs[_0x0e01('0x8f')](path[_0x0e01('0x90')](config['root'],_0x0e01('0x91'),_0x11ec22[_0x0e01('0x7f')]))&&_0x300717){_0x1513b9=path[_0x0e01('0x90')](config[_0x0e01('0x89')],_0x0e01('0x91'),_0x11ec22[_0x0e01('0x7f')]);}}return _0x511769[_0x0e01('0x92')](_0x1513b9);}})[_0x0e01('0x22')](handleError(_0x511769,null));};exports[_0x0e01('0x93')]=function(_0x517c53,_0x3b5fef){var _0x4ca1bd=path[_0x0e01('0x90')](config[_0x0e01('0x89')],_0x0e01('0x94'));var _0x59c53d={'where':{'id':_0x517c53[_0x0e01('0x63')]['id']},'attributes':['id',_0x0e01('0x82')],'raw':!![]};return db[_0x0e01('0x4a')][_0x0e01('0x67')](_0x59c53d)[_0x0e01('0x2e')](handleEntityNotFound(_0x3b5fef,null))[_0x0e01('0x2e')](function(_0x15b433){if(_0x15b433){if(!_[_0x0e01('0x8e')](_0x15b433[_0x0e01('0x82')])){if(fs[_0x0e01('0x8f')](path[_0x0e01('0x90')](config[_0x0e01('0x89')],_0x0e01('0x95'),_0x15b433[_0x0e01('0x82')]))){_0x4ca1bd=path[_0x0e01('0x90')](config[_0x0e01('0x89')],_0x0e01('0x95'),_0x15b433['agentAvatar']);}}return _0x3b5fef[_0x0e01('0x92')](_0x4ca1bd);}})[_0x0e01('0x22')](handleError(_0x3b5fef,null));};exports[_0x0e01('0x96')]=function(_0x388c90,_0x53ac47){var _0x4b55ea=path['join'](config[_0x0e01('0x89')],_0x0e01('0x97'));var _0x532cef={'where':{'id':_0x388c90[_0x0e01('0x63')]['id']},'attributes':['id',_0x0e01('0x85'),_0x0e01('0x98')],'raw':!![]};return db['ChatWebsite'][_0x0e01('0x67')](_0x532cef)[_0x0e01('0x2e')](handleEntityNotFound(_0x53ac47,null))[_0x0e01('0x2e')](function(_0x63d11){if(_0x63d11){if(!_[_0x0e01('0x8e')](_0x63d11['customerAvatar'])){if(fs[_0x0e01('0x8f')](path[_0x0e01('0x90')](config[_0x0e01('0x89')],_0x0e01('0x95'),_0x63d11[_0x0e01('0x85')]))&&_0x63d11[_0x0e01('0x98')]){_0x4b55ea=path[_0x0e01('0x90')](config[_0x0e01('0x89')],'server/files/images/avatars/',_0x63d11['customerAvatar']);}}return _0x53ac47[_0x0e01('0x92')](_0x4b55ea);}})[_0x0e01('0x22')](handleError(_0x53ac47,null));};exports['getSystemAvatar']=function(_0xce57ae,_0x3e728c){var _0x8c0725=path['join'](config[_0x0e01('0x89')],_0x0e01('0x99'));var _0x5befc7={'where':{'id':_0xce57ae['params']['id']},'attributes':['id',_0x0e01('0x87')],'raw':!![]};return db['ChatWebsite']['find'](_0x5befc7)['then'](handleEntityNotFound(_0x3e728c,null))[_0x0e01('0x2e')](function(_0xf5c0db){if(_0xf5c0db){if(!_['isNil'](_0xf5c0db['systemAvatar'])){if(fs[_0x0e01('0x8f')](path[_0x0e01('0x90')](config['root'],'server/files/images/avatars/',_0xf5c0db[_0x0e01('0x87')]))){_0x8c0725=path[_0x0e01('0x90')](config[_0x0e01('0x89')],'server/files/images/avatars/',_0xf5c0db['systemAvatar']);}}return _0x3e728c[_0x0e01('0x92')](_0x8c0725);}})[_0x0e01('0x22')](handleError(_0x3e728c,null));};exports[_0x0e01('0x9a')]=function(_0x1542ec,_0x2f1f68){var _0x1c8b75={'body':_0x1542ec[_0x0e01('0x69')],'channel':'chat'};var _0x2f159c=[];var _0x2b78a8=[];var _0x3a0e58={};var _0x3bce1c=![];if(_0x1542ec[_0x0e01('0x69')]['id']){delete _0x1542ec[_0x0e01('0x69')]['id'];}if(_[_0x0e01('0x8e')](_0x1542ec['body'][_0x0e01('0x9b')])){throw new APIBadRequestError(_0x0e01('0x9c'));}if(_['isNil'](_0x1542ec[_0x0e01('0x69')][_0x0e01('0x9d')])){throw new APIBadRequestError(_0x0e01('0x9e'));}if(_[_0x0e01('0x9f')](_0x1542ec['body'][_0x0e01('0x69')])){throw new APIBadRequestError('Body\x20is\x20mandatory');}return db[_0x0e01('0xa0')][_0x0e01('0x72')]()['then'](function(_0x537f8e){if(!_0x537f8e){throw new Error(_0x0e01('0xa1'));}_0x2f159c=Object[_0x0e01('0x50')](_0x537f8e)[_0x0e01('0x5e')](function(_0x157755){return![_0x0e01('0xa2'),'updatedAt']['includes'](_0x157755);});_0x2b78a8=Object['keys'](_0x537f8e)[_0x0e01('0x5e')](function(_0x540747){return![_0x0e01('0xa2'),_0x0e01('0xa3'),_0x0e01('0xa4'),_0x0e01('0xa5')][_0x0e01('0xa6')](_0x540747);});if(!_[_0x0e01('0xa6')](_0x2b78a8,_0x1542ec[_0x0e01('0x69')][_0x0e01('0x9d')])){throw new APIBadRequestError('Invalid\x20MapKey\x20parameter.\x20Allowed\x20values:\x20'+_0x2b78a8[_0x0e01('0x90')](',\x20'));}_0x3a0e58[_0x1542ec[_0x0e01('0x69')][_0x0e01('0x9d')]]=_0x1542ec['body'][_0x0e01('0x9b')];})[_0x0e01('0x2e')](function(){return db['ChatWebsite'][_0x0e01('0x67')]({'where':{'id':_0x1542ec[_0x0e01('0x63')]['id']},'include':[{'model':db['CmList'],'as':_0x0e01('0xa7'),'include':[{'model':db[_0x0e01('0xa0')],'as':_0x0e01('0xa8'),'where':_0x3a0e58,'limit':0x1,'order':[['updatedAt',_0x0e01('0xa9')]]}]},{'model':db[_0x0e01('0xaa')],'as':_0x0e01('0xab')},{'model':db[_0x0e01('0xac')],'as':_0x0e01('0xac'),'include':[{'model':db['Interval'],'as':_0x0e01('0xad'),'attributes':['id',_0x0e01('0xae')],'raw':!![]}]}]});})['then'](function(_0x1a39b2){if(!_0x1a39b2){throw new APINotFoundError(util[_0x0e01('0x41')](_0x0e01('0xaf'),_0x1542ec[_0x0e01('0x63')]['id']));}var _0x36b271=_0x1a39b2[_0x0e01('0xac')];if(_0x36b271){var _0x3835ed=_0x1a39b2[_0x0e01('0xb0')]||undefined;return _0x36b271['ifTime'](_0x3835ed)['then'](function(_0x49de0c){if(!_0x49de0c){throw new APIOutOfIntervalError();}return _0x1a39b2;});}else{return _0x1a39b2;}})[_0x0e01('0x2e')](function(_0x4474ac){if(!_0x4474ac[_0x0e01('0xa7')]){return;}_0x1c8b75['account']=_0x4474ac;_0x1c8b75[_0x0e01('0xb1')]=_0x4474ac[_0x0e01('0xa7')];_0x1c8b75['applications']=_['orderBy'](_0x4474ac[_0x0e01('0xab')],[_0x0e01('0xb2')],[_0x0e01('0xb3')]);if(_0x1c8b75['account'][_0x0e01('0xab')]){delete _0x1c8b75['account'][_0x0e01('0xab')];}if(_0x1c8b75[_0x0e01('0xb4')][_0x0e01('0xa7')]&&_0x1c8b75[_0x0e01('0xb4')][_0x0e01('0xa7')][_0x0e01('0xa8')][_0x0e01('0x55')]){return _0x1c8b75[_0x0e01('0xb4')]['List']['Contacts'][0x0];}var _0x4dfcd7=_['defaults'](_0x1542ec[_0x0e01('0x69')],{'firstName':_0x1542ec['body']['from'],'ListId':_0x4474ac[_0x0e01('0xa5')]});_0x4dfcd7[_0x1542ec['body'][_0x0e01('0x9d')]]=_0x1542ec[_0x0e01('0x69')]['from'];return db[_0x0e01('0xa0')][_0x0e01('0x68')](_0x4dfcd7,{'fields':_0x2f159c,'raw':!![]});})[_0x0e01('0x2e')](function(_0x61da63){_0x1c8b75[_0x0e01('0xb5')]=_0x61da63;var _0x42f238=createInteractionObject(_0x1542ec[_0x0e01('0x63')]['id'],_0x1542ec['body'],_0x1542ec[_0x0e01('0xb6')],_0x61da63);var _0x4d8410={'ChatWebsiteId':_0x1542ec[_0x0e01('0x63')]['id']};if(_0x1542ec[_0x0e01('0x69')][_0x0e01('0xb7')]){_0x4d8410[_0x0e01('0xb7')]=_0x1542ec[_0x0e01('0x69')]['threadId'];_0x4d8410['closed']=![];return db[_0x0e01('0xb8')][_0x0e01('0x67')]({'where':_0x4d8410})[_0x0e01('0x2e')](function(_0x531d43){var _0x4c6c10=_0x1542ec[_0x0e01('0x69')][_0x0e01('0x37')]&&_0x1542ec[_0x0e01('0x69')][_0x0e01('0x3d')];if(_0x531d43){_0x3bce1c=!![];return _0x531d43;}else if(!_0x4c6c10&&_0x531d43&&_0x531d43[_0x0e01('0xb9')]){throw new APIConflictError(_0x0e01('0xba'));}_0x42f238['threadId']=_0x1542ec['body']['threadId'];_0x42f238['externalUrl']=_0x1542ec[_0x0e01('0x69')][_0x0e01('0xbb')];return db[_0x0e01('0xb8')][_0x0e01('0x68')](_0x42f238);});}_0x4d8410[_0x0e01('0xbc')]=_0x61da63['id'];if(_0x1542ec['body'][_0x0e01('0xbd')]&&_0x1542ec[_0x0e01('0x69')][_0x0e01('0xbd')]['id']){_0x4d8410['id']=_0x1542ec[_0x0e01('0x69')][_0x0e01('0xbd')]['id'];return db[_0x0e01('0xb8')][_0x0e01('0x67')]({'where':_0x4d8410})[_0x0e01('0x2e')](function(_0x3e17c4){var _0x370c88=_0x1542ec[_0x0e01('0x69')][_0x0e01('0x37')]&&_0x1542ec[_0x0e01('0x69')][_0x0e01('0x3d')];if(!_0x370c88&&_0x3e17c4&&_0x3e17c4['closed']){throw new APIConflictError(_0x0e01('0xba'));}else if(_0x3e17c4){_0x3bce1c=!![];return _0x3e17c4;}else{return db[_0x0e01('0xb8')]['create'](_0x42f238);}});}return db['ChatInteraction'][_0x0e01('0x68')](_0x42f238);})[_0x0e01('0x2e')](function(_0x39a775){if(!_0x3bce1c){return _0x39a775;}var _0x303df3={'from':(_0x1c8b75[_0x0e01('0xb5')][_0x0e01('0x3a')]||'')+'\x20'+(_0x1c8b75[_0x0e01('0xb5')][_0x0e01('0x3b')]||'')};if(_0x1542ec[_0x0e01('0x69')]['threadId']&&_0x1542ec[_0x0e01('0x69')][_0x0e01('0xbe')]&&_0x1542ec[_0x0e01('0x69')]['threadId']!=_0x1542ec[_0x0e01('0x69')][_0x0e01('0xbe')]){_0x303df3['threadId']=_0x1542ec[_0x0e01('0x69')]['messageId'];}return _0x39a775[_0x0e01('0x2d')](_0x303df3);})[_0x0e01('0x2e')](function(_0x5867ce){_0x1c8b75[_0x0e01('0xbd')]=_0x5867ce[_0x0e01('0x6b')]({'plain':!![]});_0x1c8b75[_0x0e01('0xbd')][_0x0e01('0xbf')]=!_0x3bce1c;if(_0x1c8b75[_0x0e01('0xbd')][_0x0e01('0xbf')]){if(_0x1c8b75[_0x0e01('0xb4')][_0x0e01('0xc0')]){_0x1c8b75[_0x0e01('0xc1')][_0x0e01('0xc2')]({'id':0x0,'priority':_0x1c8b75[_0x0e01('0xc1')][_0x0e01('0x55')]+0x1,'app':_0x0e01('0xc3'),'appdata':_0x0e01('0xc4'),'interval':_0x0e01('0xc5')});}}return db[_0x0e01('0xc6')][_0x0e01('0x68')]({'body':_0x1542ec[_0x0e01('0x69')][_0x0e01('0x69')],'ChatWebsiteId':_0x1542ec[_0x0e01('0x63')]['id'],'ChatInteractionId':_0x5867ce['id'],'direction':'in','ContactId':_0x1c8b75['contact']['id'],'AttachmentId':_0x1542ec[_0x0e01('0x69')][_0x0e01('0xc7')]});})[_0x0e01('0x2e')](function(_0x515ef0){_0x1c8b75['message']=_0x515ef0;if(!_0x1c8b75[_0x0e01('0xbd')][_0x0e01('0xc8')]){return;}return db[_0x0e01('0xc9')][_0x0e01('0x67')]({'attributes':['id',_0x0e01('0x32')],'where':{'id':_0x1c8b75[_0x0e01('0xbd')][_0x0e01('0xc8')]}});})[_0x0e01('0x2e')](function(_0x29a864){if(_0x29a864){_0x1c8b75[_0x0e01('0xc1')][_0x0e01('0xca')]({'id':0x0,'priority':0x0,'app':_0x0e01('0xcb'),'appdata':_0x29a864[_0x0e01('0x32')]+','+(_0x1c8b75[_0x0e01('0xb4')][_0x0e01('0xcc')]||0xa),'interval':_0x0e01('0xc5')});_0x1c8b75[_0x0e01('0xcd')]=!![];}if(!_0x1c8b75[_0x0e01('0xbd')][_0x0e01('0xce')]){return;}return db['ChatQueue'][_0x0e01('0x67')]({'attributes':['id','name'],'where':{'id':_0x1c8b75[_0x0e01('0xbd')][_0x0e01('0xce')]}});})[_0x0e01('0x2e')](function(_0x4d047c){if(_0x4d047c){_0x1c8b75[_0x0e01('0xc1')]['unshift']({'id':0x0,'priority':0x1,'app':_0x0e01('0xcf'),'appdata':_0x4d047c[_0x0e01('0x32')]+','+(_0x1c8b75[_0x0e01('0xb4')][_0x0e01('0xd0')]||0x12c),'interval':_0x0e01('0xc5')});}return respondWithRpcPromise(_0x0e01('0xd1'),_0x0e01('0xd2'),_0x1c8b75);})[_0x0e01('0x2e')](function(_0x3cb79e){respondWithRpcPromise(_0x0e01('0xd3'),_0x0e01('0xd3'),{'event':_0x0e01('0x9a'),'message':_0x3cb79e},client9002);return _0x3cb79e;})[_0x0e01('0x2e')](respondWithResult(_0x2f1f68,null))[_0x0e01('0x22')](APIHandleError(_0x2f1f68));};exports['offline']=function(_0x2259e8,_0x3b38fe){var _0x5c38df,_0x28a346,_0x3ab3c8;var _0x342822=[];var _0x120039={};var _0x424eb2=_0x2259e8[_0x0e01('0xd4')]||[];var _0xb35ed=[];var _0x3a1aee;return db[_0x0e01('0xa0')]['describe']()['then'](function(_0x47318e){if(!_0x47318e){throw new db[(_0x0e01('0xd5'))]['ValidationError'](_0x0e01('0xd6'));}_0x342822=_[_0x0e01('0xd7')](_[_0x0e01('0x50')](_0x47318e),[_0x0e01('0xa2'),_0x0e01('0xa3'),_0x0e01('0xa4'),_0x0e01('0xa5')]);if(_0x2259e8['body']['id']){delete _0x2259e8['body']['id'];}if(_[_0x0e01('0x8e')](_0x2259e8['body'][_0x0e01('0x9b')])){throw _0x3b38fe[_0x0e01('0x2a')](0x1f4)[_0x0e01('0x33')](new db[(_0x0e01('0xd5'))][(_0x0e01('0xd8'))](_0x0e01('0xd9')));}if(_[_0x0e01('0x8e')](_0x2259e8[_0x0e01('0x69')]['body'])||_0x2259e8[_0x0e01('0x69')][_0x0e01('0x69')]===''){throw _0x3b38fe[_0x0e01('0x2a')](0x1f4)[_0x0e01('0x33')](new db['Sequelize'][(_0x0e01('0xd8'))](_0x0e01('0xda')));}if(_[_0x0e01('0x8e')](_0x2259e8[_0x0e01('0x69')][_0x0e01('0xdb')])){throw _0x3b38fe[_0x0e01('0x2a')](0x1f4)['send'](new db['Sequelize'][(_0x0e01('0xd8'))]('mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x342822));}if(!_[_0x0e01('0xa6')](_0x342822,_0x2259e8['body'][_0x0e01('0xdb')])){throw _0x3b38fe[_0x0e01('0x2a')](0x1f4)[_0x0e01('0x33')](new db[(_0x0e01('0xd5'))][(_0x0e01('0xd8'))](_0x0e01('0xdc')+_0x342822));}_0x120039[_0x2259e8[_0x0e01('0x69')][_0x0e01('0xdb')]]=_0x2259e8[_0x0e01('0x69')]['from'];})['then'](function(){return db['ChatWebsite']['find']({'where':{'id':_0x2259e8['params']['id']},'include':[{'model':db[_0x0e01('0xdd')],'as':_0x0e01('0xa7')},{'model':db[_0x0e01('0xde')],'as':_0x0e01('0xde')}]});})[_0x0e01('0x2e')](handleEntityNotFound(_0x3b38fe,null))[_0x0e01('0x2e')](function(_0x51ad27){if(_0x51ad27&&_0x51ad27[_0x0e01('0xa7')]){_0x28a346=_0x51ad27;var _0xbfcd02=_['defaults'](_0x2259e8[_0x0e01('0x69')],{'firstName':_0x2259e8[_0x0e01('0x69')][_0x0e01('0x9b')],'phone':_0x2259e8[_0x0e01('0x69')][_0x0e01('0x9b')],'ListId':_0x51ad27[_0x0e01('0xa5')]});_0xbfcd02[_0x2259e8[_0x0e01('0x69')]['mapKeyOffline']]=_0x2259e8['body'][_0x0e01('0x9b')];return db[_0x0e01('0xa0')][_0x0e01('0xdf')]({'where':_0x120039,'defaults':_0xbfcd02});}})[_0x0e01('0xe0')](function(_0x8f9f19){if(_0x8f9f19){_0x3ab3c8=_0x8f9f19;var _0x4e0de3=fs[_0x0e01('0xe1')](path[_0x0e01('0x90')](config['root'],_0x0e01('0xe2')),_0x0e01('0xe3'));var _0x553a1a=ejs['render'](_0x4e0de3,{'body':_[_0x0e01('0xe4')](_0x2259e8[_0x0e01('0x69')]['body']),'bodyTitle':_0x28a346[_0x0e01('0xe5')]});return db['ChatOfflineMessage'][_0x0e01('0x68')]({'body':_0x553a1a,'plainBody':htmlToText[_0x0e01('0xe6')](_0x553a1a),'ContactId':_0x8f9f19['id'],'ChatWebsiteId':_0x28a346['id']});}})[_0x0e01('0x2e')](function(_0x3b5914){_0x3a1aee=_0x3b5914;if(_0x424eb2[_0x0e01('0x55')]){var _0x12c56f=_0x424eb2['map'](function(_0x1d64c4){return{'name':_0x1d64c4[_0x0e01('0xe7')],'basename':_0x1d64c4[_0x0e01('0x83')],'type':_0x1d64c4[_0x0e01('0xe8')],'ChatOfflineMessageId':_0x3b5914['id']};});_0xb35ed=_0x12c56f[_0x0e01('0x49')](_0x2c3656=>{var _0x255aee={'filename':_0x2c3656['name'],'path':path[_0x0e01('0x90')](config[_0x0e01('0x89')],_0x0e01('0xe9'),'files',_0x0e01('0xea'),_0x0e01('0xeb'),_0x2c3656['basename'])};return _0x255aee;});if(!_0x28a346[_0x0e01('0xec')]){return db['sequelize']['transaction'](function(_0x40f0b5){return db[_0x0e01('0xed')][_0x0e01('0xee')](_0x12c56f,{'transaction':_0x40f0b5});});}}})[_0x0e01('0x2e')](function(){if(_0x3a1aee){_0x5c38df=_0x3a1aee;return db['MailAccount'][_0x0e01('0x77')]({'where':{'service':!![]},'include':[{'model':db[_0x0e01('0xef')],'as':_0x0e01('0xf0'),'raw':!![],'include':[{'model':db[_0x0e01('0xf1')],'as':_0x0e01('0xf1'),'raw':!![]}]}]});}})[_0x0e01('0x2e')](function(_0x29bac2){if(_0x29bac2&&_0x29bac2[_0x0e01('0xf0')]&&_0x28a346[_0x0e01('0xf2')]&&_0x28a346['forwardOfflineAddress']){var _0x194cf7=_0x29bac2['getSmtpOptions']();return respondWithRpcPromise(_0x0e01('0xf3'),_0x0e01('0xf4'),{'account':_0x194cf7,'message':{'from':util[_0x0e01('0x41')](_0x0e01('0xf5'),_0x29bac2[_0x0e01('0x32')],_0x29bac2['email']||_0x29bac2['Smtp'][_0x0e01('0x6a')]),'to':_0x28a346[_0x0e01('0xf6')],'subject':_0x28a346['offlineMessageSubject'],'html':_0x5c38df['body'],'attachments':_0xb35ed}},client9003)[_0x0e01('0x2e')](function(){return _0x5c38df;})[_0x0e01('0x22')](function(_0x720b50){logger[_0x0e01('0x1e')](_0x720b50);});}})[_0x0e01('0x2e')](function(){if(_0x28a346&&_0x28a346['openNewInteraction']&&_0x28a346[_0x0e01('0xf7')]){var _0x49a007=[];if(_0x424eb2[_0x0e01('0x55')]){_0x49a007=_0x424eb2[_0x0e01('0x49')](function(_0x17e0bc){return{'name':_0x17e0bc[_0x0e01('0xe7')],'basename':_0x17e0bc[_0x0e01('0x83')],'type':_0x17e0bc[_0x0e01('0xe8')],'ChatOfflineMessageId':_0x3a1aee['id']};});}var _0x50fd4a;if(!_['isNil'](_0x28a346[_0x0e01('0xf8')])){var _0x426ebc=_[_0x0e01('0x49')](_0x2259e8[_0x0e01('0x69')],function(_0x3f70ef){return _0x3f70ef;});var _0x4453c6=_[_0x0e01('0xf9')](_0x426ebc)[0x0];var _0x50a327=_['mapValues'](_0x4453c6,function(_0x546d41){return _0x546d41;});_0x50fd4a=_0x50a327[0x1][_0x28a346['subjectOffline']];}var _0x3ffb9e={'from':_0x3ab3c8[_0x0e01('0xfa')],'firstName':_0x3ab3c8['firstName'],'lastName':_0x3ab3c8[_0x0e01('0x3b')],'mapKey':'email','message':{'from':_0x3ab3c8[_0x0e01('0xfa')],'to':_0x28a346[_0x0e01('0xde')][_0x0e01('0xfa')],'cc':'','subject':_[_0x0e01('0x8e')](_0x50fd4a)?_0x28a346['offlineMessageSubject']:_0x50fd4a,'messageId':'','sentAt':new Date(),'attach':_0x49a007[_0x0e01('0x55')],'attachments':_0x49a007,'originChannel':_0x0e01('0xfb'),'ChatWebsiteId':_0x28a346['id'],'ChatOfflineMessageId':_0x5c38df['id'],'originTo':_0x28a346[_0x0e01('0xde')][_0x0e01('0xfa')]},'body':_0x5c38df[_0x0e01('0x69')]};var _0x10aeb9={'account':{'id':_0x28a346['MailAccountId']},'body':_0x3ffb9e,'log':_0x0e01('0xfc')};return respondWithRpcPromise(_0x0e01('0xfc'),_0x0e01('0xfd'),_0x10aeb9,client9001)[_0x0e01('0x2e')](function(){return _0x5c38df;})['catch'](function(_0x4ab220){logger['error'](_0x4ab220);});}return;})[_0x0e01('0x2e')](function(){if(_0x5c38df){return _0x5c38df;}})['then'](respondWithResult(_0x3b38fe,null))[_0x0e01('0x22')](function(){for(var _0x209f0f of _0x424eb2){var _0xd5a53a=path[_0x0e01('0x90')](config[_0x0e01('0x89')],_0x0e01('0xe9'),_0x0e01('0xd4'),_0x0e01('0xea'),'offline-chat',_0x209f0f[_0x0e01('0x83')]);fs_extra['remove'](_0xd5a53a)['catch'](function(_0x5dbbb3){logger[_0x0e01('0x1e')](_0x0e01('0xfe'),_0xd5a53a,_0x5dbbb3);});}});};exports[_0x0e01('0xff')]=function(_0x4f854d,_0x1e5447){return db['ChatInteraction'][_0x0e01('0x67')]({'where':{'id':_0x4f854d[_0x0e01('0x63')]['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0x1e5447,null))['then'](function(_0x4a21bf){if(_0x4a21bf){return _0x4a21bf['addInteraction'](_0x4f854d[_0x0e01('0x69')][_0x0e01('0x7d')],_[_0x0e01('0x100')](_0x4f854d[_0x0e01('0x69')],['ids','id'])||{});}})[_0x0e01('0x2e')](respondWithResult(_0x1e5447,null))['catch'](handleError(_0x1e5447,null));};exports[_0x0e01('0x101')]=function(_0x21dbaf,_0xcd491f){var _0x10c383={'raw':![],'where':{}};var _0x2f915f={};var _0x228458={'count':0x0,'rows':[]};return db['ChatWebsite'][_0x0e01('0x77')]({'where':{'id':_0x21dbaf[_0x0e01('0x63')]['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0xcd491f,null))[_0x0e01('0x2e')](function(_0x4c7e4c){if(_0x4c7e4c){_0x2f915f[_0x0e01('0x44')]=_['keys'](db['ChatInteraction'][_0x0e01('0x4b')]);_0x2f915f[_0x0e01('0x4f')]=_['keys'](_0x21dbaf['query']);_0x2f915f['filters']=_[_0x0e01('0x52')](_0x2f915f[_0x0e01('0x44')],_0x2f915f[_0x0e01('0x4f')]);_0x10c383['attributes']=_['intersection'](_0x2f915f[_0x0e01('0x44')],qs[_0x0e01('0x54')](_0x21dbaf[_0x0e01('0x4f')][_0x0e01('0x54')]));_0x10c383[_0x0e01('0x53')]=_0x10c383[_0x0e01('0x53')]['length']?_0x10c383['attributes']:_0x2f915f['model'];if(!_0x21dbaf[_0x0e01('0x4f')]['hasOwnProperty'](_0x0e01('0x57'))){_0x10c383[_0x0e01('0x27')]=qs[_0x0e01('0x27')](_0x21dbaf[_0x0e01('0x4f')]['limit']);_0x10c383['offset']=qs[_0x0e01('0x29')](_0x21dbaf['query'][_0x0e01('0x29')]);}_0x10c383[_0x0e01('0x58')]=qs['sort'](_0x21dbaf[_0x0e01('0x4f')][_0x0e01('0x59')]);_0x10c383['where']=qs['filters'](_['pick'](_0x21dbaf[_0x0e01('0x4f')],_0x2f915f[_0x0e01('0x51')]));_0x10c383[_0x0e01('0x5a')][_0x0e01('0x74')]=_0x4c7e4c['id'];if(_0x21dbaf[_0x0e01('0x4f')][_0x0e01('0x5e')]){_0x10c383[_0x0e01('0x5a')]=_['merge'](_0x10c383[_0x0e01('0x5a')],{'$or':_[_0x0e01('0x49')](_0x10c383[_0x0e01('0x53')],function(_0x1544f4){var _0x5cc5ae={};_0x5cc5ae[_0x1544f4]={'$like':'%'+_0x21dbaf[_0x0e01('0x4f')][_0x0e01('0x5e')]+'%'};return _0x5cc5ae;})});}_0x10c383=_[_0x0e01('0x5c')]({},_0x10c383,_0x21dbaf['options']);return db['ChatInteraction'][_0x0e01('0x28')]({'where':_0x10c383[_0x0e01('0x5a')]})[_0x0e01('0x2e')](function(_0x363774){_0x228458[_0x0e01('0x28')]=_0x363774;if(_0x21dbaf['query']['includeAll']){_0x10c383[_0x0e01('0x65')]=[{'model':db[_0x0e01('0xa0')],'as':_0x0e01('0x102'),'required':![]},{'model':db[_0x0e01('0xc9')],'as':'Owner','attributes':[_0x0e01('0x32'),_0x0e01('0x103'),_0x0e01('0x104')],'required':![]},{'model':db['Tag'],'as':_0x0e01('0x105'),'attributes':['id','name',_0x0e01('0x106')],'where':_0x21dbaf[_0x0e01('0x4f')][_0x0e01('0x107')]?{'id':_0x21dbaf[_0x0e01('0x4f')][_0x0e01('0x107')]}:undefined,'required':_0x21dbaf[_0x0e01('0x4f')][_0x0e01('0x107')]?!![]:![]}];}return db['ChatInteraction'][_0x0e01('0x60')](_0x10c383);})[_0x0e01('0x2e')](function(_0xec1b8f){_0x228458[_0x0e01('0x61')]=_0xec1b8f;return _0x228458;});}})['then'](respondWithFilteredResult(_0xcd491f,_0x10c383))[_0x0e01('0x22')](handleError(_0xcd491f,null));};exports[_0x0e01('0x108')]=function(_0x4a0a61,_0x5689a6){var _0x1acee1=0x0;var _0x27debb=0x0;var _0x21259c=![];var _0x51a7b7;var _0x43422e;return db[_0x0e01('0x4a')]['find']({'where':{'id':_0x4a0a61['params']['id']},'include':[{'model':db[_0x0e01('0xac')],'as':_0x0e01('0xac'),'include':[{'model':db[_0x0e01('0xac')],'as':'Intervals','attributes':['id',_0x0e01('0xae')]}]}]})[_0x0e01('0x2e')](handleEntityNotFound(_0x5689a6,null))['then'](function(_0xd94483){if(_0xd94483){_0x51a7b7=_0xd94483;return _0xd94483['getProactiveActions']({'raw':!![]});}})[_0x0e01('0x2e')](function(_0x25abbb){if(_0x51a7b7){if(_0x25abbb){_0x43422e=_0x25abbb;}}return require(_0x0e01('0x8b'))[_0x0e01('0x8c')]();})[_0x0e01('0x2e')](function(_0x584da2){if(_0x584da2){_0x27debb=_0x584da2[_0x0e01('0x109')];_0x21259c=_0x584da2[_0x0e01('0x8d')];}})[_0x0e01('0x2e')](function(){return db[_0x0e01('0xb8')][_0x0e01('0x28')]({'where':{'closed':![]}});})[_0x0e01('0x2e')](function(_0x3176c8){_0x1acee1=_0x3176c8;if(_0x27debb&&_0x3176c8>_0x27debb){return db[_0x0e01('0x10a')]['findOne']({'where':{'id':0x1}})['then'](function(_0xef932d){if(_0xef932d){_0xef932d['increment'](_0x0e01('0x10b'));}});}})['then'](function(){var _0x461f87=_0x51a7b7[_0x0e01('0xac')];var _0x3ceac1=_0x51a7b7['timezone']||undefined;return _0x461f87?_0x461f87[_0x0e01('0x10c')](_0x3ceac1):!![];})['then'](function(_0x318d7b){var _0x1891d4=fs[_0x0e01('0xe1')](path['join'](config['root'],_0x0e01('0x10d')),'utf8');var _0x224454=new url[(_0x0e01('0x10e'))](_0x51a7b7[_0x0e01('0x10f')])[_0x0e01('0x110')];var _0x5eacb3=_0x0e01('0x111');var _0x4a2055=![];var _0xbf9c1a={'chatVersion':_0x5eacb3,'chatWebsiteAddressOrigin':_0x224454,'remote':_0x51a7b7[_0x0e01('0x112')],'query':querystring[_0x0e01('0x1d')](_[_0x0e01('0x5c')](_0x51a7b7['get']({'plain':!![]}),{'customerIp':_0x4a0a61[_0x0e01('0xb6')][_0x0e01('0x38')]||_0x4a0a61[_0x0e01('0xb6')][_0x0e01('0x113')]||_0x4a0a61['connection']['remoteAddress']||_0x4a0a61['ip'],'referer':_0x4a0a61[_0x0e01('0xb6')][_0x0e01('0x3d')],'openedInteractions':_0x1acee1,'maxInteractions':_0x27debb,'virtual':_0x21259c[_0x0e01('0x109')],'online':_0x318d7b,'custom':_0x21259c}))[_0x0e01('0x114')](/'/g,'\x5c\x27')};_0x5689a6[_0x0e01('0x33')](ejs[_0x0e01('0x115')](Mustache[_0x0e01('0x115')](_0x1891d4,_0xbf9c1a),{'proactiveActions':_0x43422e,'alignment':_0x51a7b7[_0x0e01('0x116')],'verticalAlignment':_0x51a7b7[_0x0e01('0x117')],'div_color':_0x51a7b7[_0x0e01('0x106')],'labelText':_0x51a7b7[_0x0e01('0x118')],'text_color':_0x51a7b7[_0x0e01('0x119')],'text_button_color':_0x51a7b7[_0x0e01('0x11a')],'button_color':_0x51a7b7[_0x0e01('0x11b')],'background_color':_0x51a7b7[_0x0e01('0x11c')],'hideWhenOffline':_0x51a7b7[_0x0e01('0x11d')],'intervalId':_0x51a7b7[_0x0e01('0x11e')],'isDevelopment':_0x4a2055,'chatVersion':_0x5eacb3}));})[_0x0e01('0x22')](handleError(_0x5689a6,null));};exports[_0x0e01('0x11f')]=function(_0xd56f79,_0x184a97){var _0x10d262=_0xd56f79['params']['id'];var _0x33b152=_0xd56f79[_0x0e01('0x69')];var _0x4be811=0xc8;var _0x40308f=null;return db['sequelize'][_0x0e01('0x120')]({'isolationLevel':db[_0x0e01('0x121')]['Transaction']['ISOLATION_LEVELS'][_0x0e01('0x122')]},function(_0x5e9f3f){return db[_0x0e01('0x4a')][_0x0e01('0x77')]({'where':{'id':_0x10d262},'transaction':_0x5e9f3f})['then'](function(_0x55a74e){if(_0x55a74e){return db[_0x0e01('0xaa')][_0x0e01('0x2f')]({'where':{'ChatWebsiteId':_0x10d262},'transaction':_0x5e9f3f})['then'](function(){var _0x5d1d60=_[_0x0e01('0x49')](_0x33b152,function(_0x563d3b){_0x563d3b[_0x0e01('0x74')]=_0x10d262;return _0x563d3b;});return db['ChatApplication'][_0x0e01('0xee')](_0x5d1d60,{'transaction':_0x5e9f3f});});}else{_0x4be811=0x194;_0x40308f=[];}});})[_0x0e01('0x2e')](function(){if(_0x4be811!==0x194){return db[_0x0e01('0xaa')][_0x0e01('0x123')]({'where':{'ChatWebsiteId':_0x10d262},'order':_0x0e01('0xb2')})[_0x0e01('0x2e')](function(_0x207219){_0x40308f=_0x207219;});}})[_0x0e01('0x22')](function(_0xd4e859){_0x4be811=0x1f4;logger[_0x0e01('0x1e')](_0xd4e859[_0x0e01('0x31')]);if(_0xd4e859[_0x0e01('0x32')]){delete _0xd4e859['name'];}_0x40308f=_0xd4e859;})[_0x0e01('0x124')](function(){if(_0x40308f===null){_0x184a97[_0x0e01('0x23')](_0x4be811);}else{if(_0x4be811===0x1f4){_0x184a97[_0x0e01('0x2a')](_0x4be811)['send'](_0x40308f);}else{_0x184a97[_0x0e01('0x2a')](_0x4be811)[_0x0e01('0x25')](_0x40308f);}}});};exports[_0x0e01('0x125')]=function(_0x2f7a1b,_0xc00ff3){var _0x12ea8d={};var _0x3de799={};var _0x9e4d48;var _0x2add87;return db[_0x0e01('0x4a')][_0x0e01('0x77')]({'where':{'id':_0x2f7a1b[_0x0e01('0x63')]['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0xc00ff3,null))[_0x0e01('0x2e')](function(_0x5807c3){if(_0x5807c3){_0x9e4d48=_0x5807c3;_0x3de799[_0x0e01('0x44')]=_[_0x0e01('0x50')](db[_0x0e01('0xaa')][_0x0e01('0x4b')]);_0x3de799['query']=_[_0x0e01('0x50')](_0x2f7a1b[_0x0e01('0x4f')]);_0x3de799[_0x0e01('0x51')]=_[_0x0e01('0x52')](_0x3de799[_0x0e01('0x44')],_0x3de799[_0x0e01('0x4f')]);_0x12ea8d[_0x0e01('0x53')]=_[_0x0e01('0x52')](_0x3de799[_0x0e01('0x44')],qs[_0x0e01('0x54')](_0x2f7a1b[_0x0e01('0x4f')][_0x0e01('0x54')]));_0x12ea8d['attributes']=_0x12ea8d[_0x0e01('0x53')][_0x0e01('0x55')]?_0x12ea8d[_0x0e01('0x53')]:_0x3de799[_0x0e01('0x44')];_0x12ea8d[_0x0e01('0x58')]=qs['sort'](_0x2f7a1b[_0x0e01('0x4f')][_0x0e01('0x59')]);_0x12ea8d[_0x0e01('0x5a')]=qs[_0x0e01('0x51')](_[_0x0e01('0x5b')](_0x2f7a1b[_0x0e01('0x4f')],_0x3de799[_0x0e01('0x51')]));if(_0x2f7a1b[_0x0e01('0x4f')][_0x0e01('0x5e')]){_0x12ea8d[_0x0e01('0x5a')]=_[_0x0e01('0x5c')](_0x12ea8d['where'],{'$or':_['map'](_0x12ea8d[_0x0e01('0x53')],function(_0x484684){var _0x3428d2={};_0x3428d2[_0x484684]={'$like':'%'+_0x2f7a1b[_0x0e01('0x4f')][_0x0e01('0x5e')]+'%'};return _0x3428d2;})});}_0x12ea8d=_[_0x0e01('0x5c')]({},_0x12ea8d,_0x2f7a1b[_0x0e01('0x66')]);return _0x9e4d48['getApplications'](_0x12ea8d);}})[_0x0e01('0x2e')](function(_0x1d83ed){if(_0x1d83ed){_0x2add87=_0x1d83ed[_0x0e01('0x55')];if(!_0x2f7a1b[_0x0e01('0x4f')][_0x0e01('0x56')](_0x0e01('0x57'))){_0x12ea8d['limit']=qs['limit'](_0x2f7a1b['query'][_0x0e01('0x27')]);_0x12ea8d[_0x0e01('0x29')]=qs[_0x0e01('0x29')](_0x2f7a1b[_0x0e01('0x4f')][_0x0e01('0x29')]);}return _0x9e4d48['getApplications'](_0x12ea8d);}})[_0x0e01('0x2e')](function(_0x5f46e4){if(_0x5f46e4){return _0x5f46e4?{'count':_0x2add87,'rows':_0x5f46e4}:null;}})['then'](respondWithResult(_0xc00ff3,null))[_0x0e01('0x22')](handleError(_0xc00ff3,null));};exports[_0x0e01('0x126')]=function(_0x9fc065,_0x190231){return db[_0x0e01('0x127')]['find']({'where':{'id':_0x9fc065[_0x0e01('0x63')]['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0x190231,null))[_0x0e01('0x2e')](function(_0x1db44d){if(_0x1db44d){return _0x1db44d[_0x0e01('0x126')](_0x9fc065[_0x0e01('0x69')][_0x0e01('0x7d')],_[_0x0e01('0x100')](_0x9fc065[_0x0e01('0x69')],[_0x0e01('0x7d'),'id'])||{});}})[_0x0e01('0x2e')](respondWithResult(_0x190231,null))[_0x0e01('0x22')](handleError(_0x190231,null));};exports[_0x0e01('0x128')]=function(_0x59458b,_0x77166a){var _0x28d08c={};var _0x2bb16b={};var _0x5d9818;var _0x2b676e;return db[_0x0e01('0x4a')][_0x0e01('0x77')]({'where':{'id':_0x59458b[_0x0e01('0x63')]['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0x77166a,null))[_0x0e01('0x2e')](function(_0xe37e4b){if(_0xe37e4b){_0x5d9818=_0xe37e4b;_0x2bb16b['model']=_[_0x0e01('0x50')](db['ChatProactiveAction'][_0x0e01('0x4b')]);_0x2bb16b['query']=_[_0x0e01('0x50')](_0x59458b[_0x0e01('0x4f')]);_0x2bb16b[_0x0e01('0x51')]=_[_0x0e01('0x52')](_0x2bb16b['model'],_0x2bb16b[_0x0e01('0x4f')]);_0x28d08c[_0x0e01('0x53')]=_[_0x0e01('0x52')](_0x2bb16b[_0x0e01('0x44')],qs[_0x0e01('0x54')](_0x59458b[_0x0e01('0x4f')][_0x0e01('0x54')]));_0x28d08c[_0x0e01('0x53')]=_0x28d08c[_0x0e01('0x53')]['length']?_0x28d08c['attributes']:_0x2bb16b[_0x0e01('0x44')];_0x28d08c[_0x0e01('0x58')]=qs[_0x0e01('0x59')](_0x59458b[_0x0e01('0x4f')][_0x0e01('0x59')]);_0x28d08c['where']=qs[_0x0e01('0x51')](_[_0x0e01('0x5b')](_0x59458b[_0x0e01('0x4f')],_0x2bb16b[_0x0e01('0x51')]));if(_0x59458b['query'][_0x0e01('0x5e')]){_0x28d08c[_0x0e01('0x5a')]=_[_0x0e01('0x5c')](_0x28d08c['where'],{'$or':_[_0x0e01('0x49')](_0x28d08c[_0x0e01('0x53')],function(_0x36278b){var _0x136b8f={};_0x136b8f[_0x36278b]={'$like':'%'+_0x59458b[_0x0e01('0x4f')][_0x0e01('0x5e')]+'%'};return _0x136b8f;})});}_0x28d08c=_[_0x0e01('0x5c')]({},_0x28d08c,_0x59458b[_0x0e01('0x66')]);return _0x5d9818[_0x0e01('0x128')](_0x28d08c);}})[_0x0e01('0x2e')](function(_0x5f20da){if(_0x5f20da){_0x2b676e=_0x5f20da['length'];if(!_0x59458b[_0x0e01('0x4f')][_0x0e01('0x56')](_0x0e01('0x57'))){_0x28d08c['limit']=qs[_0x0e01('0x27')](_0x59458b[_0x0e01('0x4f')][_0x0e01('0x27')]);_0x28d08c[_0x0e01('0x29')]=qs[_0x0e01('0x29')](_0x59458b[_0x0e01('0x4f')][_0x0e01('0x29')]);}return _0x5d9818['getProactiveActions'](_0x28d08c);}})[_0x0e01('0x2e')](function(_0x4fde59){if(_0x4fde59){return _0x4fde59?{'count':_0x2b676e,'rows':_0x4fde59}:null;}})[_0x0e01('0x2e')](respondWithResult(_0x77166a,null))[_0x0e01('0x22')](handleError(_0x77166a,null));};exports[_0x0e01('0x129')]=function(_0x3e21e4,_0x147498){var _0x15794b=_0x3e21e4[_0x0e01('0x4f')]['online']==='false'?'offlineForm':_0x0e01('0x12a');return db[_0x0e01('0x4a')][_0x0e01('0x67')]({'attributes':['id',_0x15794b],'where':{'id':_0x3e21e4[_0x0e01('0x63')]['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0x147498,null))[_0x0e01('0x2e')](function(_0x39eeb2){if(_0x39eeb2){var _0x10e0e4=_0x39eeb2[_0x15794b];var _0x26dfc0=_0x10e0e4&&_0x10e0e4[_0x0e01('0x12b')]?_0x10e0e4[_0x0e01('0x12b')]:[];_0x147498[_0x0e01('0x33')]({'fromKey':_['isNil'](_0x10e0e4['fromKey'])?undefined:_0x10e0e4[_0x0e01('0x12c')],'count':_0x26dfc0[_0x0e01('0x55')],'rows':_0x26dfc0});}})[_0x0e01('0x22')](handleError(_0x147498,null));};exports['getOfflineMessages']=function(_0x1df46f,_0x2188a6){var _0x426ba7={'raw':![],'where':{}};var _0x55c83a={};var _0xec52de={'count':0x0,'rows':[]};return db[_0x0e01('0x4a')]['findOne']({'where':{'id':_0x1df46f[_0x0e01('0x63')]['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0x2188a6,null))[_0x0e01('0x2e')](function(_0x1b1ab3){if(_0x1b1ab3){_0x55c83a[_0x0e01('0x44')]=_[_0x0e01('0x50')](db[_0x0e01('0x12d')][_0x0e01('0x4b')]);_0x55c83a['query']=_['keys'](_0x1df46f['query']);_0x55c83a['filters']=_[_0x0e01('0x52')](_0x55c83a['model'],_0x55c83a['query']);_0x426ba7[_0x0e01('0x53')]=_[_0x0e01('0x52')](_0x55c83a[_0x0e01('0x44')],qs[_0x0e01('0x54')](_0x1df46f[_0x0e01('0x4f')][_0x0e01('0x54')]));_0x426ba7[_0x0e01('0x53')]=_0x426ba7[_0x0e01('0x53')][_0x0e01('0x55')]?_0x426ba7[_0x0e01('0x53')]:_0x55c83a[_0x0e01('0x44')];if(!_0x1df46f[_0x0e01('0x4f')][_0x0e01('0x56')](_0x0e01('0x57'))){_0x426ba7[_0x0e01('0x27')]=qs['limit'](_0x1df46f[_0x0e01('0x4f')]['limit']);_0x426ba7['offset']=qs[_0x0e01('0x29')](_0x1df46f[_0x0e01('0x4f')]['offset']);}_0x426ba7[_0x0e01('0x58')]=qs[_0x0e01('0x59')](_0x1df46f[_0x0e01('0x4f')]['sort']);_0x426ba7[_0x0e01('0x5a')]=qs['filters'](_['pick'](_0x1df46f[_0x0e01('0x4f')],_0x55c83a['filters']));_0x426ba7[_0x0e01('0x5a')][_0x0e01('0x74')]=_0x1b1ab3['id'];if(_0x1df46f['query']['filter']){_0x426ba7['where']=_[_0x0e01('0x5c')](_0x426ba7[_0x0e01('0x5a')],{'$or':_[_0x0e01('0x49')](_0x426ba7[_0x0e01('0x53')],function(_0x48d45e){var _0x2eddbd={};_0x2eddbd[_0x48d45e]={'$like':'%'+_0x1df46f[_0x0e01('0x4f')][_0x0e01('0x5e')]+'%'};return _0x2eddbd;})});}_0x426ba7=_[_0x0e01('0x5c')]({},_0x426ba7,_0x1df46f[_0x0e01('0x66')]);return db[_0x0e01('0x12d')][_0x0e01('0x28')]({'where':_0x426ba7[_0x0e01('0x5a')]})[_0x0e01('0x2e')](function(_0x1dd2c5){_0xec52de[_0x0e01('0x28')]=_0x1dd2c5;if(_0x1df46f[_0x0e01('0x4f')][_0x0e01('0x5f')]){_0x426ba7['include']=[{'all':!![]}];}else{_0x426ba7[_0x0e01('0x65')]=[{'model':db[_0x0e01('0xa0')],'as':_0x0e01('0x102'),'required':![]},{'model':db[_0x0e01('0xed')],'as':_0x0e01('0x12e'),'required':![]}];}return db[_0x0e01('0x12d')]['findAll'](_0x426ba7);})[_0x0e01('0x2e')](function(_0x47111b){_0xec52de[_0x0e01('0x61')]=_0x47111b;return _0xec52de;});}})[_0x0e01('0x2e')](respondWithFilteredResult(_0x2188a6,_0x426ba7))[_0x0e01('0x22')](handleError(_0x2188a6,null));};exports['addAgents']=function(_0x293a01,_0xcc5410){return db[_0x0e01('0x4a')]['find']({'where':{'id':_0x293a01[_0x0e01('0x63')]['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0xcc5410,null))[_0x0e01('0x2e')](function(_0x490f21){if(_0x490f21){return _0x490f21[_0x0e01('0x12f')](_0x293a01[_0x0e01('0x69')][_0x0e01('0x7d')],_[_0x0e01('0x100')](_0x293a01[_0x0e01('0x69')],[_0x0e01('0x7d'),'id'])||{})[_0x0e01('0xe0')](function(_0x5341e5){for(var _0x509188=0x0;_0x509188<_0x293a01[_0x0e01('0x69')][_0x0e01('0x7d')][_0x0e01('0x55')];_0x509188+=0x1){socket[_0x0e01('0x130')](_0x0e01('0x131'),{'UserId':Number(_0x293a01[_0x0e01('0x69')][_0x0e01('0x7d')][_0x509188]),'ChatWebsiteId':Number(_0x293a01[_0x0e01('0x63')]['id'])});}return _0x5341e5;});}})['then'](respondWithResult(_0xcc5410,null))[_0x0e01('0x22')](handleError(_0xcc5410,null));};exports[_0x0e01('0x132')]=function(_0x3369fb,_0x45b77b){return db[_0x0e01('0x4a')][_0x0e01('0x67')]({'where':{'id':_0x3369fb[_0x0e01('0x63')]['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0x45b77b,null))['then'](function(_0x38e681){if(_0x38e681){return _0x38e681[_0x0e01('0x132')](_0x3369fb[_0x0e01('0x4f')][_0x0e01('0x7d')])[_0x0e01('0x2e')](function(){if(_[_0x0e01('0x133')](_0x3369fb[_0x0e01('0x4f')][_0x0e01('0x7d')])){for(var _0x440029=0x0;_0x440029<_0x3369fb['query']['ids']['length'];_0x440029+=0x1){socket[_0x0e01('0x130')](_0x0e01('0x134'),{'UserId':Number(_0x3369fb[_0x0e01('0x4f')][_0x0e01('0x7d')][_0x440029]),'ChatWebsiteId':Number(_0x3369fb['params']['id'])});}}else{socket[_0x0e01('0x130')]('userChatWebsite:remove',{'UserId':Number(_0x3369fb[_0x0e01('0x4f')][_0x0e01('0x7d')]),'ChatWebsiteId':Number(_0x3369fb[_0x0e01('0x63')]['id'])});}});}})[_0x0e01('0x2e')](respondWithStatusCode(_0x45b77b,null))[_0x0e01('0x22')](handleError(_0x45b77b,null));};exports[_0x0e01('0x135')]=function(_0x3648c1,_0x3e4a50){var _0x3cddfe={};var _0x507085={};var _0x5736d3;var _0x1f7818;return db[_0x0e01('0x4a')][_0x0e01('0x77')]({'where':{'id':_0x3648c1[_0x0e01('0x63')]['id']}})[_0x0e01('0x2e')](handleEntityNotFound(_0x3e4a50,null))['then'](function(_0x782c6a){if(_0x782c6a){_0x5736d3=_0x782c6a;_0x507085[_0x0e01('0x44')]=_['keys'](db[_0x0e01('0xc9')][_0x0e01('0x4b')]);_0x507085[_0x0e01('0x4f')]=_[_0x0e01('0x50')](_0x3648c1[_0x0e01('0x4f')]);_0x507085[_0x0e01('0x51')]=_[_0x0e01('0x52')](_0x507085[_0x0e01('0x44')],_0x507085[_0x0e01('0x4f')]);_0x3cddfe[_0x0e01('0x53')]=_['intersection'](_0x507085['model'],qs['fields'](_0x3648c1['query'][_0x0e01('0x54')]));_0x3cddfe[_0x0e01('0x53')]=_0x3cddfe[_0x0e01('0x53')][_0x0e01('0x55')]?_0x3cddfe[_0x0e01('0x53')]:_0x507085[_0x0e01('0x44')];_0x3cddfe[_0x0e01('0x58')]=qs[_0x0e01('0x59')](_0x3648c1[_0x0e01('0x4f')][_0x0e01('0x59')]);_0x3cddfe[_0x0e01('0x5a')]=qs[_0x0e01('0x51')](_[_0x0e01('0x5b')](_0x3648c1[_0x0e01('0x4f')],_0x507085[_0x0e01('0x51')]));if(_0x3648c1[_0x0e01('0x4f')][_0x0e01('0x5e')]){_0x3cddfe[_0x0e01('0x5a')]=_[_0x0e01('0x5c')](_0x3cddfe[_0x0e01('0x5a')],{'$or':_['map'](_0x3cddfe['attributes'],function(_0x513f9b){var _0x5c7ca2={};_0x5c7ca2[_0x513f9b]={'$like':'%'+_0x3648c1[_0x0e01('0x4f')]['filter']+'%'};return _0x5c7ca2;})});}_0x3cddfe=_[_0x0e01('0x5c')]({},_0x3cddfe,_0x3648c1['options']);return _0x5736d3[_0x0e01('0x135')](_0x3cddfe);}})[_0x0e01('0x2e')](function(_0x2b8f70){if(_0x2b8f70){_0x1f7818=_0x2b8f70['length'];if(!_0x3648c1[_0x0e01('0x4f')][_0x0e01('0x56')](_0x0e01('0x57'))){_0x3cddfe[_0x0e01('0x27')]=qs['limit'](_0x3648c1['query'][_0x0e01('0x27')]);_0x3cddfe[_0x0e01('0x29')]=qs[_0x0e01('0x29')](_0x3648c1[_0x0e01('0x4f')]['offset']);}return _0x5736d3[_0x0e01('0x135')](_0x3cddfe);}})[_0x0e01('0x2e')](function(_0x5abf73){if(_0x5abf73){return _0x5abf73?{'count':_0x1f7818,'rows':_0x5abf73}:null;}})[_0x0e01('0x2e')](respondWithResult(_0x3e4a50,null))['catch'](handleError(_0x3e4a50,null));};
\ No newline at end of file
+var _0xe74a=['find','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','describe','ChatWebsiteId','Disposition','getDispositions','findOne','nolimit','order','pick','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','removeAnswers','addLogo','sitepic','file','filename','addAvatar','agentAvatar','addCustomerAvatar','customerAvatar','addSystemAvatar','systemAvatar','join','root','server/files/images/logos/default_logo.svg','../../config/license/util','getLicense','custom','isNil','existsSync','server/files/images/logos/','download','getAvatar','server/files/images/avatars/default_avatar.png','server/files/images/avatars/','server/files/images/avatars/customer_avatar.png','showCustomerAvatar','server/files/images/avatars/system_avatar.png','notify','chat','MapKey\x20is\x20mandatory','isEmpty','No\x20available\x20attributes','createdAt','updatedAt','includes','CompanyId','mapKey','CmList','List','Contacts','ChatApplication','Applications','Interval','Intervals','interval','timezone','ifTime','account','list','applications','priority','asc','from','ListId','CmContact','contact','headers','threadId','closed','ChatInteraction','Writing\x20on\x20closed\x20interaction','externalUrl','ContactId','interaction','firstName','messageId','created','autoclose','push','close','unmanaged','*,*,*,*','ChatMessage','AttachmentId','UserId','User','agent','waitForTheAssignedAgent','forcedOwnership','queueId','ChatQueue','queue','waitForTheAssignedQueue','Start','EventManager','files','ValidationError','difference','send','Sequelize','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKeyOffline','mapKeyOffline\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','MailAccount','findOrCreate','spread','readFileSync','server/files/templates/chatOfflineMessage.ejs','utf8','render','offlineMessageBody','fromString','originalname','mimetype','offline-chat','basename','openNewInteraction','sequelize','Attachment','Smtp','CloudProvider','forwardOffline','forwardOfflineAddress','getSmtpOptions','sendMail','\x22%s\x22\x20<%s>','email','subjectOffline','toPairsIn','mapValues','offlineMessageSubject','Chat','MailAccountId','NotifyMailAccount','notifyMail','server','attachments','remove','Could\x20not\x20remove\x20attachment\x20file','addInteraction','omit','getInteractions','Owner','fullname','internal','Tag','Tags','color','tag','getSnippet','getProactiveActions','virtual','License','increment','server/files/chat/iframe.ejs','URL','address','origin','3.8.1','remote','x-real-ip','connection','remoteAddress','replace','alignment','labelText','textButtonColor','color_button','backgroundColor','IntervalId','transaction','ISOLATION_LEVELS','bulkCreate','findAndCountAll','stack','finally','getApplications','addProactiveActions','chatProactiveAction','online','offlineForm','onlineForm','items','fromKey','ChatOfflineMessage','Contact','Attachments','addAgents','emit','userChatWebsite:save','removeAgents','isArray','userChatWebsite:remove','getAgents','util','path','ejs','fs-extra','lodash','html-to-text','ioredis','jayson/promise','url','../../components/parsers/qs','../../config/logger','../../config/environment','../../errors/api','APIBadRequestError','APINotFoundError','APIOutOfIntervalError','APIConflictError','../../mysqldb','defaults','redis','localhost','socket.io-emitter','register','client','http','request','then','ChatWebsite,\x20%s,\x20%s','request\x20sent','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','sendStatus','status','end','json','limit','undefined','offset','count','set','update','destroy','get','ChatWebsites','name','user-agent-parser','setUA','getResult','customerIp','cf-connecting-ip','first','x-forwarded-for','split','lastName','x-real-port','referer','browser','format','%s\x20%s','version','unknown','device','%s\x20%s\x20%s','model','vendor','type','index','Pause','map','ChatWebsite','rawAttributes','fieldName','key','query','keys','filters','intersection','attributes','fields','hasOwnProperty','sort','where','filter','VIRTUAL','merge','includeAll','include','findAll','rows','catch','show','mandatoryDispositionPause','length','options','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection'];(function(_0x4d61fc,_0x4d0593){var _0x5f1852=function(_0x4877ae){while(--_0x4877ae){_0x4d61fc['push'](_0x4d61fc['shift']());}};_0x5f1852(++_0x4d0593);}(_0xe74a,0xcc));var _0xae74=function(_0x25b8b1,_0xe0b951){_0x25b8b1=_0x25b8b1-0x0;var _0x2d04f7=_0xe74a[_0x25b8b1];return _0x2d04f7;};'use strict';var Mustache=require('mustache');var util=require(_0xae74('0x0'));var path=require(_0xae74('0x1'));var ejs=require(_0xae74('0x2'));var fs=require('fs');var fs_extra=require(_0xae74('0x3'));var _=require(_0xae74('0x4'));var querystring=require('querystring');var htmlToText=require(_0xae74('0x5'));var Redis=require(_0xae74('0x6'));var jayson=require(_0xae74('0x7'));var url=require(_0xae74('0x8'));var qs=require(_0xae74('0x9'));var logger=require(_0xae74('0xa'))('api');var config=require(_0xae74('0xb'));var APIBadRequestError=require(_0xae74('0xc'))[_0xae74('0xd')];var APINotFoundError=require(_0xae74('0xc'))[_0xae74('0xe')];var APIOutOfIntervalError=require(_0xae74('0xc'))[_0xae74('0xf')];var APIHandleError=require(_0xae74('0xc'))['handleError'];var APIConflictError=require(_0xae74('0xc'))[_0xae74('0x10')];var db=require(_0xae74('0x11'))['db'];config['redis']=_[_0xae74('0x12')](config[_0xae74('0x13')],{'host':_0xae74('0x14'),'port':0x18eb});var socket=require(_0xae74('0x15'))(new Redis(config['redis']));require('./chatWebsite.socket')[_0xae74('0x16')](socket);var client=jayson[_0xae74('0x17')][_0xae74('0x18')]({'port':0x232c});var client9002=jayson['client'][_0xae74('0x18')]({'port':0x232a});var client9003=jayson[_0xae74('0x17')][_0xae74('0x18')]({'port':0x232b});var client9001=jayson[_0xae74('0x17')][_0xae74('0x18')]({'port':0x2329});function respondWithRpcPromise(_0x457a90,_0x50cd59,_0x295a41,_0x2b5133){return new Promise(function(_0x1962ee,_0x148dae){var _0x1550ad=_0x2b5133||client;return _0x1550ad[_0xae74('0x19')](_0x457a90,_0x295a41)[_0xae74('0x1a')](function(_0x23108d){logger['info'](_0xae74('0x1b'),_0x50cd59,_0xae74('0x1c'));logger[_0xae74('0x1d')](_0xae74('0x1e'),_0x50cd59,_0xae74('0x1c'),JSON[_0xae74('0x1f')](_0x23108d));if(_0x23108d[_0xae74('0x20')]){if(_0x23108d[_0xae74('0x20')][_0xae74('0x21')]===0x1f4){logger[_0xae74('0x20')]('ChatWebsite,\x20%s,\x20%s',_0x50cd59,_0x23108d[_0xae74('0x20')][_0xae74('0x22')]);return _0x148dae(_0x23108d['error']['message']);}logger[_0xae74('0x20')](_0xae74('0x1b'),_0x50cd59,_0x23108d[_0xae74('0x20')][_0xae74('0x22')]);return _0x1962ee(_0x23108d[_0xae74('0x20')][_0xae74('0x22')]);}else{logger[_0xae74('0x23')](_0xae74('0x1b'),_0x50cd59,_0xae74('0x1c'));_0x1962ee(_0x23108d[_0xae74('0x24')]['message']);}})['catch'](function(_0x469c96){logger[_0xae74('0x20')](_0xae74('0x1b'),_0x50cd59,_0x469c96);_0x148dae(_0x469c96);});});}function respondWithStatusCode(_0x323d15,_0x3b07b6){_0x3b07b6=_0x3b07b6||0xcc;return function(_0x32f750){if(_0x32f750){return _0x323d15[_0xae74('0x25')](_0x3b07b6);}return _0x323d15[_0xae74('0x26')](_0x3b07b6)[_0xae74('0x27')]();};}function respondWithResult(_0x265ce0,_0x4d1b06){_0x4d1b06=_0x4d1b06||0xc8;return function(_0x5e4401){if(_0x5e4401){return _0x265ce0[_0xae74('0x26')](_0x4d1b06)[_0xae74('0x28')](_0x5e4401);}};}function respondWithFilteredResult(_0xdf143e,_0x4c442f){return function(_0x1b48d7){if(_0x1b48d7){var _0x627882=typeof _0x4c442f['offset']==='undefined'&&typeof _0x4c442f[_0xae74('0x29')]===_0xae74('0x2a');var _0x1b9346=_0x1b48d7['count'];var _0x268f96=_0x627882?0x0:_0x4c442f[_0xae74('0x2b')];var _0x416eba=_0x627882?_0x1b48d7[_0xae74('0x2c')]:_0x4c442f[_0xae74('0x2b')]+_0x4c442f['limit'];var _0x4d70b2;if(_0x416eba>=_0x1b9346){_0x416eba=_0x1b9346;_0x4d70b2=0xc8;}else{_0x4d70b2=0xce;}_0xdf143e[_0xae74('0x26')](_0x4d70b2);return _0xdf143e[_0xae74('0x2d')]('Content-Range',_0x268f96+'-'+_0x416eba+'/'+_0x1b9346)[_0xae74('0x28')](_0x1b48d7);}return null;};}function saveUpdates(_0x11c8e5){return function(_0x47eb03){if(_0x47eb03){return _0x47eb03[_0xae74('0x2e')](_0x11c8e5)['then'](function(_0x42edc8){return _0x42edc8;});}return null;};}function removeEntity(_0x170ab6){return function(_0x1f1681){if(_0x1f1681){return _0x1f1681[_0xae74('0x2f')]()[_0xae74('0x1a')](function(){var _0x20d774=_0x1f1681[_0xae74('0x30')]({'plain':!![]});var _0x47d3ff=_0xae74('0x31');return db['UserProfileResource'][_0xae74('0x2f')]({'where':{'type':_0x47d3ff,'resourceId':_0x20d774['id']}})['then'](function(){return _0x1f1681;});})[_0xae74('0x1a')](function(){_0x170ab6['status'](0xcc)[_0xae74('0x27')]();});}};}function handleEntityNotFound(_0x52f79a){return function(_0x5728c9){if(!_0x5728c9){_0x52f79a[_0xae74('0x25')](0x194);}return _0x5728c9;};}function handleError(_0x4f6579,_0x3a556f){_0x3a556f=_0x3a556f||0x1f4;return function(_0x3f1b2b){logger[_0xae74('0x20')](_0x3f1b2b['stack']);if(_0x3f1b2b[_0xae74('0x32')]){delete _0x3f1b2b[_0xae74('0x32')];}_0x4f6579['status'](_0x3a556f)['send'](_0x3f1b2b);};}function createInteractionObject(_0x9ee076,_0xb59f35,_0x1cda59,_0x124df8){var _0x38fb68=require(_0xae74('0x33'));var _0x2f6d28=new _0x38fb68();var _0x1c4cba=_0x2f6d28[_0xae74('0x34')](_0x1cda59['user-agent'])[_0xae74('0x35')]();var _0x50c1ec=_0xb59f35[_0xae74('0x36')];if(_0x1cda59['cf-connecting-ip']){_0x50c1ec=_0x1cda59[_0xae74('0x37')];}else if(_0x1cda59['x-forwarded-for']){_0x50c1ec=_[_0xae74('0x38')](_0x1cda59[_0xae74('0x39')][_0xae74('0x3a')](','));}return{'ContactId':_0x124df8['id'],'ChatWebsiteId':_0x9ee076,'from':(_0x124df8['firstName']||'')+'\x20'+(_0x124df8[_0xae74('0x3b')]||''),'customerIp':_0x50c1ec,'customerPort':_0x1cda59[_0xae74('0x3c')]?_0x1cda59[_0xae74('0x3c')]:null,'referer':_0xb59f35[_0xae74('0x3d')],'browserName':_0x1c4cba[_0xae74('0x3e')][_0xae74('0x32')]&&_0x1c4cba[_0xae74('0x3e')]['version']?util[_0xae74('0x3f')](_0xae74('0x40'),_0x1c4cba[_0xae74('0x3e')][_0xae74('0x32')],_0x1c4cba[_0xae74('0x3e')][_0xae74('0x41')]):'unknown','browserVersion':_0x1c4cba[_0xae74('0x3e')][_0xae74('0x41')]||_0xae74('0x42'),'osName':util[_0xae74('0x3f')]('%s\x20%s',_0x1c4cba['os']['name'],_0x1c4cba['os'][_0xae74('0x41')]),'osVersion':_0x1c4cba['os'][_0xae74('0x41')],'deviceModel':_0x1c4cba[_0xae74('0x43')]['model']&&_0x1c4cba[_0xae74('0x43')]['vendor']?util['format'](_0xae74('0x44'),_0x1c4cba[_0xae74('0x43')][_0xae74('0x45')],_0x1c4cba[_0xae74('0x43')][_0xae74('0x46')],_0x1c4cba[_0xae74('0x43')][_0xae74('0x47')]):null,'deviceVendor':_0x1c4cba[_0xae74('0x43')][_0xae74('0x46')],'deviceType':_0x1c4cba[_0xae74('0x43')]['type'],'formData':JSON[_0xae74('0x1f')](_0xb59f35)};}exports[_0xae74('0x48')]=function(_0x39a5ec,_0x55e506){var _0x31c4c7={'include':[{'model':db[_0xae74('0x49')],'as':'mandatoryDispositionPause'}]},_0x3d03bc={},_0x35907e={'count':0x0,'rows':[]};var _0x131a09=_[_0xae74('0x4a')](db[_0xae74('0x4b')][_0xae74('0x4c')],function(_0x2044d7){return{'name':_0x2044d7[_0xae74('0x4d')],'type':_0x2044d7[_0xae74('0x47')][_0xae74('0x4e')]};});_0x3d03bc['model']=_[_0xae74('0x4a')](_0x131a09,'name');_0x3d03bc[_0xae74('0x4f')]=_[_0xae74('0x50')](_0x39a5ec['query']);_0x3d03bc[_0xae74('0x51')]=_[_0xae74('0x52')](_0x3d03bc[_0xae74('0x45')],_0x3d03bc[_0xae74('0x4f')]);_0x31c4c7[_0xae74('0x53')]=_[_0xae74('0x52')](_0x3d03bc[_0xae74('0x45')],qs[_0xae74('0x54')](_0x39a5ec[_0xae74('0x4f')][_0xae74('0x54')]));_0x31c4c7[_0xae74('0x53')]=_0x31c4c7[_0xae74('0x53')]['length']?_0x31c4c7['attributes']:_0x3d03bc[_0xae74('0x45')];if(!_0x39a5ec[_0xae74('0x4f')][_0xae74('0x55')]('nolimit')){_0x31c4c7[_0xae74('0x29')]=qs[_0xae74('0x29')](_0x39a5ec[_0xae74('0x4f')]['limit']);_0x31c4c7[_0xae74('0x2b')]=qs[_0xae74('0x2b')](_0x39a5ec[_0xae74('0x4f')][_0xae74('0x2b')]);}_0x31c4c7['order']=qs[_0xae74('0x56')](_0x39a5ec[_0xae74('0x4f')][_0xae74('0x56')]);_0x31c4c7[_0xae74('0x57')]=qs[_0xae74('0x51')](_['pick'](_0x39a5ec[_0xae74('0x4f')],_0x3d03bc[_0xae74('0x51')]),_0x131a09);if(_0x39a5ec[_0xae74('0x4f')][_0xae74('0x58')]){_0x31c4c7['where']=_['merge'](_0x31c4c7[_0xae74('0x57')],{'$or':_[_0xae74('0x4a')](_0x131a09,function(_0x41ccc9){if(_0x41ccc9[_0xae74('0x47')]!==_0xae74('0x59')){var _0x1e510a={};_0x1e510a[_0x41ccc9['name']]={'$like':'%'+_0x39a5ec[_0xae74('0x4f')]['filter']+'%'};return _0x1e510a;}})});}_0x31c4c7=_[_0xae74('0x5a')]({},_0x31c4c7,_0x39a5ec['options']);var _0x20d268={'where':_0x31c4c7[_0xae74('0x57')]};return db[_0xae74('0x4b')][_0xae74('0x2c')](_0x20d268)['then'](function(_0x2b72d9){_0x35907e[_0xae74('0x2c')]=_0x2b72d9;if(_0x39a5ec['query'][_0xae74('0x5b')]){_0x31c4c7[_0xae74('0x5c')]=[{'all':!![]}];}return db[_0xae74('0x4b')][_0xae74('0x5d')](_0x31c4c7);})[_0xae74('0x1a')](function(_0x391e18){_0x35907e[_0xae74('0x5e')]=_0x391e18;return _0x35907e;})[_0xae74('0x1a')](respondWithFilteredResult(_0x55e506,_0x31c4c7))[_0xae74('0x5f')](handleError(_0x55e506,null));};exports[_0xae74('0x60')]=function(_0x2b87f2,_0x5a2f42){var _0x5e0c9a={'raw':![],'where':{'id':_0x2b87f2['params']['id']},'include':[{'model':db[_0xae74('0x49')],'as':_0xae74('0x61')}]},_0x5156ae={};_0x5156ae[_0xae74('0x45')]=_[_0xae74('0x50')](db[_0xae74('0x4b')][_0xae74('0x4c')]);_0x5156ae[_0xae74('0x4f')]=_[_0xae74('0x50')](_0x2b87f2[_0xae74('0x4f')]);_0x5156ae[_0xae74('0x51')]=_['intersection'](_0x5156ae[_0xae74('0x45')],_0x5156ae[_0xae74('0x4f')]);_0x5e0c9a[_0xae74('0x53')]=_[_0xae74('0x52')](_0x5156ae[_0xae74('0x45')],qs['fields'](_0x2b87f2[_0xae74('0x4f')]['fields']));_0x5e0c9a[_0xae74('0x53')]=_0x5e0c9a['attributes'][_0xae74('0x62')]?_0x5e0c9a[_0xae74('0x53')]:_0x5156ae[_0xae74('0x45')];if(_0x2b87f2[_0xae74('0x4f')][_0xae74('0x5b')]){_0x5e0c9a[_0xae74('0x5c')]=[{'all':!![]}];}_0x5e0c9a=_[_0xae74('0x5a')]({},_0x5e0c9a,_0x2b87f2[_0xae74('0x63')]);return db['ChatWebsite']['find'](_0x5e0c9a)[_0xae74('0x1a')](handleEntityNotFound(_0x5a2f42,null))['then'](respondWithResult(_0x5a2f42,null))[_0xae74('0x5f')](handleError(_0x5a2f42,null));};exports[_0xae74('0x64')]=function(_0x321f07,_0xebf918){return db['ChatWebsite'][_0xae74('0x64')](_0x321f07[_0xae74('0x65')],{})['then'](function(_0x198b23){var _0x29927a=_0x321f07[_0xae74('0x66')][_0xae74('0x30')]({'plain':!![]});if(!_0x29927a)throw new Error(_0xae74('0x67'));if(_0x29927a[_0xae74('0x68')]===_0xae74('0x66')){var _0x5c4d2f=_0x198b23[_0xae74('0x30')]({'plain':!![]});var _0x3cc7ab=_0xae74('0x31');return db[_0xae74('0x69')][_0xae74('0x6a')]({'where':{'name':_0x3cc7ab,'userProfileId':_0x29927a[_0xae74('0x6b')]},'raw':!![]})[_0xae74('0x1a')](function(_0x1d81bc){if(_0x1d81bc&&_0x1d81bc[_0xae74('0x6c')]===0x0){return db[_0xae74('0x6d')][_0xae74('0x64')]({'name':_0x5c4d2f[_0xae74('0x32')],'resourceId':_0x5c4d2f['id'],'type':_0x1d81bc[_0xae74('0x32')],'sectionId':_0x1d81bc['id']},{})['then'](function(){return _0x198b23;});}else{return _0x198b23;}})[_0xae74('0x5f')](function(_0x3987aa){logger[_0xae74('0x20')](_0xae74('0x6e'),_0x3987aa);throw _0x3987aa;});}return _0x198b23;})[_0xae74('0x1a')](respondWithResult(_0xebf918,0xc9))[_0xae74('0x5f')](handleError(_0xebf918,null));};exports[_0xae74('0x2e')]=function(_0x4fa017,_0xa0e302){if(_0x4fa017['body']['id']){delete _0x4fa017['body']['id'];}return db[_0xae74('0x4b')]['find']({'where':{'id':_0x4fa017[_0xae74('0x6f')]['id']},'include':[{'model':db[_0xae74('0x49')],'as':_0xae74('0x61')}]})[_0xae74('0x1a')](handleEntityNotFound(_0xa0e302,null))['then'](saveUpdates(_0x4fa017['body'],null))['then'](respondWithResult(_0xa0e302,null))['catch'](handleError(_0xa0e302,null));};exports[_0xae74('0x2f')]=function(_0x448b9e,_0x415513){return db[_0xae74('0x4b')][_0xae74('0x6a')]({'where':{'id':_0x448b9e['params']['id']}})['then'](handleEntityNotFound(_0x415513,null))['then'](removeEntity(_0x415513,null))[_0xae74('0x5f')](handleError(_0x415513,null));};exports[_0xae74('0x70')]=function(_0x350841,_0x329b22){return db[_0xae74('0x4b')][_0xae74('0x70')]()[_0xae74('0x1a')](respondWithResult(_0x329b22,null))[_0xae74('0x5f')](handleError(_0x329b22,null));};exports['addDisposition']=function(_0x40e0a3,_0x16ed5c){if(_0x40e0a3[_0xae74('0x65')]['id']){delete _0x40e0a3[_0xae74('0x65')]['id'];}return db[_0xae74('0x4b')][_0xae74('0x6a')]({'where':{'id':_0x40e0a3[_0xae74('0x6f')]['id']}})['then'](handleEntityNotFound(_0x16ed5c,null))[_0xae74('0x1a')](function(_0x45084d){if(_0x45084d){_0x40e0a3[_0xae74('0x65')][_0xae74('0x71')]=_0x45084d['id'];return db[_0xae74('0x72')][_0xae74('0x64')](_0x40e0a3['body']);}})['then'](respondWithResult(_0x16ed5c,null))[_0xae74('0x5f')](handleError(_0x16ed5c,null));};exports[_0xae74('0x73')]=function(_0x1cefe4,_0x17b6ac){var _0x3ca005={'raw':![],'where':{}};var _0x34d9ab={};var _0x586e6b={'count':0x0,'rows':[]};return db[_0xae74('0x4b')][_0xae74('0x74')]({'where':{'id':_0x1cefe4[_0xae74('0x6f')]['id']}})[_0xae74('0x1a')](handleEntityNotFound(_0x17b6ac,null))[_0xae74('0x1a')](function(_0x289274){if(_0x289274){_0x34d9ab[_0xae74('0x45')]=_['keys'](db[_0xae74('0x72')]['rawAttributes']);_0x34d9ab[_0xae74('0x4f')]=_[_0xae74('0x50')](_0x1cefe4[_0xae74('0x4f')]);_0x34d9ab[_0xae74('0x51')]=_[_0xae74('0x52')](_0x34d9ab[_0xae74('0x45')],_0x34d9ab[_0xae74('0x4f')]);_0x3ca005[_0xae74('0x53')]=_[_0xae74('0x52')](_0x34d9ab[_0xae74('0x45')],qs[_0xae74('0x54')](_0x1cefe4[_0xae74('0x4f')][_0xae74('0x54')]));_0x3ca005[_0xae74('0x53')]=_0x3ca005[_0xae74('0x53')]['length']?_0x3ca005[_0xae74('0x53')]:_0x34d9ab['model'];if(!_0x1cefe4[_0xae74('0x4f')][_0xae74('0x55')](_0xae74('0x75'))){_0x3ca005['limit']=qs[_0xae74('0x29')](_0x1cefe4[_0xae74('0x4f')][_0xae74('0x29')]);_0x3ca005[_0xae74('0x2b')]=qs['offset'](_0x1cefe4[_0xae74('0x4f')][_0xae74('0x2b')]);}_0x3ca005[_0xae74('0x76')]=qs['sort'](_0x1cefe4[_0xae74('0x4f')][_0xae74('0x56')]);_0x3ca005[_0xae74('0x57')]=qs[_0xae74('0x51')](_[_0xae74('0x77')](_0x1cefe4[_0xae74('0x4f')],_0x34d9ab[_0xae74('0x51')]));_0x3ca005[_0xae74('0x57')][_0xae74('0x71')]=_0x289274['id'];if(_0x1cefe4[_0xae74('0x4f')]['filter']){_0x3ca005['where']=_[_0xae74('0x5a')](_0x3ca005[_0xae74('0x57')],{'$or':_[_0xae74('0x4a')](_0x3ca005[_0xae74('0x53')],function(_0x28cfbd){var _0x55195a={};_0x55195a[_0x28cfbd]={'$like':'%'+_0x1cefe4[_0xae74('0x4f')][_0xae74('0x58')]+'%'};return _0x55195a;})});}_0x3ca005=_[_0xae74('0x5a')]({},_0x3ca005,_0x1cefe4['options']);return db['Disposition'][_0xae74('0x2c')]({'where':_0x3ca005[_0xae74('0x57')]})['then'](function(_0x48d6f6){_0x586e6b['count']=_0x48d6f6;if(_0x1cefe4['query'][_0xae74('0x5b')]){_0x3ca005[_0xae74('0x5c')]=[{'all':!![]}];}return db[_0xae74('0x72')][_0xae74('0x5d')](_0x3ca005);})['then'](function(_0x34446f){_0x586e6b[_0xae74('0x5e')]=_0x34446f;return _0x586e6b;});}})['then'](respondWithFilteredResult(_0x17b6ac,_0x3ca005))[_0xae74('0x5f')](handleError(_0x17b6ac,null));};exports[_0xae74('0x78')]=function(_0x170a40,_0x557d0e){return db[_0xae74('0x4b')][_0xae74('0x6a')]({'where':{'id':_0x170a40['params']['id']}})[_0xae74('0x1a')](handleEntityNotFound(_0x557d0e,null))[_0xae74('0x1a')](function(_0x11f915){if(_0x11f915){return _0x11f915['removeDispositions'](_0x170a40[_0xae74('0x4f')][_0xae74('0x79')]);}})[_0xae74('0x1a')](respondWithStatusCode(_0x557d0e,null))[_0xae74('0x5f')](handleError(_0x557d0e,null));};exports[_0xae74('0x7a')]=function(_0x41a36a,_0x14f630){if(_0x41a36a['body']['id']){delete _0x41a36a[_0xae74('0x65')]['id'];}return db[_0xae74('0x4b')]['find']({'where':{'id':_0x41a36a[_0xae74('0x6f')]['id']}})[_0xae74('0x1a')](handleEntityNotFound(_0x14f630,null))[_0xae74('0x1a')](function(_0x111161){if(_0x111161){_0x41a36a[_0xae74('0x65')]['ChatWebsiteId']=_0x111161['id'];return db[_0xae74('0x7b')][_0xae74('0x64')](_0x41a36a[_0xae74('0x65')]);}})[_0xae74('0x1a')](respondWithResult(_0x14f630,null))[_0xae74('0x5f')](handleError(_0x14f630,null));};exports[_0xae74('0x7c')]=function(_0x1b9059,_0x513bb1){var _0x47e9c9={'raw':![],'where':{}};var _0x5ccc48={};var _0x798cb6={'count':0x0,'rows':[]};return db[_0xae74('0x4b')]['findOne']({'where':{'id':_0x1b9059[_0xae74('0x6f')]['id']}})[_0xae74('0x1a')](handleEntityNotFound(_0x513bb1,null))[_0xae74('0x1a')](function(_0x4a85a0){if(_0x4a85a0){_0x5ccc48['model']=_['keys'](db['CannedAnswer']['rawAttributes']);_0x5ccc48[_0xae74('0x4f')]=_[_0xae74('0x50')](_0x1b9059['query']);_0x5ccc48[_0xae74('0x51')]=_[_0xae74('0x52')](_0x5ccc48[_0xae74('0x45')],_0x5ccc48[_0xae74('0x4f')]);_0x47e9c9[_0xae74('0x53')]=_[_0xae74('0x52')](_0x5ccc48[_0xae74('0x45')],qs['fields'](_0x1b9059[_0xae74('0x4f')][_0xae74('0x54')]));_0x47e9c9[_0xae74('0x53')]=_0x47e9c9['attributes'][_0xae74('0x62')]?_0x47e9c9[_0xae74('0x53')]:_0x5ccc48[_0xae74('0x45')];if(!_0x1b9059[_0xae74('0x4f')][_0xae74('0x55')](_0xae74('0x75'))){_0x47e9c9['limit']=qs[_0xae74('0x29')](_0x1b9059[_0xae74('0x4f')][_0xae74('0x29')]);_0x47e9c9['offset']=qs[_0xae74('0x2b')](_0x1b9059[_0xae74('0x4f')][_0xae74('0x2b')]);}_0x47e9c9['order']=qs[_0xae74('0x56')](_0x1b9059[_0xae74('0x4f')]['sort']);_0x47e9c9[_0xae74('0x57')]=qs[_0xae74('0x51')](_[_0xae74('0x77')](_0x1b9059[_0xae74('0x4f')],_0x5ccc48[_0xae74('0x51')]));_0x47e9c9[_0xae74('0x57')][_0xae74('0x71')]=_0x4a85a0['id'];if(_0x1b9059[_0xae74('0x4f')][_0xae74('0x58')]){_0x47e9c9[_0xae74('0x57')]=_[_0xae74('0x5a')](_0x47e9c9[_0xae74('0x57')],{'$or':_[_0xae74('0x4a')](_0x47e9c9[_0xae74('0x53')],function(_0x319cf7){var _0x1d314f={};_0x1d314f[_0x319cf7]={'$like':'%'+_0x1b9059[_0xae74('0x4f')][_0xae74('0x58')]+'%'};return _0x1d314f;})});}_0x47e9c9=_['merge']({},_0x47e9c9,_0x1b9059[_0xae74('0x63')]);return db[_0xae74('0x7b')][_0xae74('0x2c')]({'where':_0x47e9c9[_0xae74('0x57')]})[_0xae74('0x1a')](function(_0x48a83c){_0x798cb6['count']=_0x48a83c;if(_0x1b9059[_0xae74('0x4f')][_0xae74('0x5b')]){_0x47e9c9[_0xae74('0x5c')]=[{'all':!![]}];}return db[_0xae74('0x7b')][_0xae74('0x5d')](_0x47e9c9);})[_0xae74('0x1a')](function(_0x145f97){_0x798cb6[_0xae74('0x5e')]=_0x145f97;return _0x798cb6;});}})[_0xae74('0x1a')](respondWithFilteredResult(_0x513bb1,_0x47e9c9))[_0xae74('0x5f')](handleError(_0x513bb1,null));};exports[_0xae74('0x7d')]=function(_0x4549fc,_0x2dec6b){return db[_0xae74('0x4b')][_0xae74('0x6a')]({'where':{'id':_0x4549fc['params']['id']}})[_0xae74('0x1a')](handleEntityNotFound(_0x2dec6b,null))[_0xae74('0x1a')](function(_0x1161bd){if(_0x1161bd){return _0x1161bd[_0xae74('0x7d')](_0x4549fc['query'][_0xae74('0x79')]);}})[_0xae74('0x1a')](respondWithStatusCode(_0x2dec6b,null))[_0xae74('0x5f')](handleError(_0x2dec6b,null));};exports[_0xae74('0x7e')]=function(_0x72466a,_0x2f534d){_0x72466a['body'][_0xae74('0x7f')]=_0x72466a[_0xae74('0x80')][_0xae74('0x81')];return db[_0xae74('0x4b')][_0xae74('0x6a')]({'where':{'id':_0x72466a[_0xae74('0x6f')]['id']}})['then'](handleEntityNotFound(_0x2f534d,null))[_0xae74('0x1a')](saveUpdates(_0x72466a[_0xae74('0x65')],null))[_0xae74('0x1a')](respondWithResult(_0x2f534d,null))[_0xae74('0x5f')](handleError(_0x2f534d,null));};exports[_0xae74('0x82')]=function(_0x359538,_0x34b76e){_0x359538[_0xae74('0x65')][_0xae74('0x83')]=_0x359538[_0xae74('0x80')][_0xae74('0x81')];return db[_0xae74('0x4b')][_0xae74('0x6a')]({'where':{'id':_0x359538['params']['id']}})[_0xae74('0x1a')](handleEntityNotFound(_0x34b76e,null))[_0xae74('0x1a')](saveUpdates(_0x359538[_0xae74('0x65')],null))[_0xae74('0x1a')](respondWithResult(_0x34b76e,null))[_0xae74('0x5f')](handleError(_0x34b76e,null));};exports[_0xae74('0x84')]=function(_0xbd8a7f,_0x57d619){_0xbd8a7f[_0xae74('0x65')][_0xae74('0x85')]=_0xbd8a7f[_0xae74('0x80')][_0xae74('0x81')];return db[_0xae74('0x4b')]['find']({'where':{'id':_0xbd8a7f[_0xae74('0x6f')]['id']}})['then'](handleEntityNotFound(_0x57d619,null))['then'](saveUpdates(_0xbd8a7f[_0xae74('0x65')],null))[_0xae74('0x1a')](respondWithResult(_0x57d619,null))[_0xae74('0x5f')](handleError(_0x57d619,null));};exports[_0xae74('0x86')]=function(_0x1a01ca,_0x326a76){_0x1a01ca[_0xae74('0x65')][_0xae74('0x87')]=_0x1a01ca[_0xae74('0x80')][_0xae74('0x81')];return db['ChatWebsite'][_0xae74('0x6a')]({'where':{'id':_0x1a01ca[_0xae74('0x6f')]['id']}})[_0xae74('0x1a')](handleEntityNotFound(_0x326a76,null))['then'](saveUpdates(_0x1a01ca[_0xae74('0x65')],null))[_0xae74('0x1a')](respondWithResult(_0x326a76,null))[_0xae74('0x5f')](handleError(_0x326a76,null));};exports['getLogo']=function(_0x33eea9,_0x77f068){var _0x57b4cc=path[_0xae74('0x88')](config[_0xae74('0x89')],_0xae74('0x8a'));var _0x18f51d={'where':{'id':_0x33eea9['params']['id']},'attributes':['id',_0xae74('0x7f')],'raw':!![]};var _0x1cf4b9=![];return require(_0xae74('0x8b'))[_0xae74('0x8c')]()['then'](function(_0x2e01cd){if(_0x2e01cd){_0x1cf4b9=_0x2e01cd[_0xae74('0x8d')];}})['then'](function(){return db[_0xae74('0x4b')][_0xae74('0x6a')](_0x18f51d);})[_0xae74('0x1a')](handleEntityNotFound(_0x77f068,null))['then'](function(_0x334ac2){if(_0x334ac2){if(!_[_0xae74('0x8e')](_0x334ac2[_0xae74('0x7f')])){if(fs[_0xae74('0x8f')](path['join'](config[_0xae74('0x89')],_0xae74('0x90'),_0x334ac2['sitepic']))&&_0x1cf4b9){_0x57b4cc=path['join'](config['root'],_0xae74('0x90'),_0x334ac2['sitepic']);}}return _0x77f068[_0xae74('0x91')](_0x57b4cc);}})[_0xae74('0x5f')](handleError(_0x77f068,null));};exports[_0xae74('0x92')]=function(_0x5ea494,_0x25ab80){var _0x449afc=path[_0xae74('0x88')](config[_0xae74('0x89')],_0xae74('0x93'));var _0x3b4224={'where':{'id':_0x5ea494[_0xae74('0x6f')]['id']},'attributes':['id',_0xae74('0x83')],'raw':!![]};return db[_0xae74('0x4b')][_0xae74('0x6a')](_0x3b4224)[_0xae74('0x1a')](handleEntityNotFound(_0x25ab80,null))['then'](function(_0x32d452){if(_0x32d452){if(!_[_0xae74('0x8e')](_0x32d452[_0xae74('0x83')])){if(fs[_0xae74('0x8f')](path[_0xae74('0x88')](config[_0xae74('0x89')],'server/files/images/avatars/',_0x32d452['agentAvatar']))){_0x449afc=path[_0xae74('0x88')](config[_0xae74('0x89')],_0xae74('0x94'),_0x32d452[_0xae74('0x83')]);}}return _0x25ab80['download'](_0x449afc);}})[_0xae74('0x5f')](handleError(_0x25ab80,null));};exports['getCustomerAvatar']=function(_0x4589b0,_0x3179e2){var _0x4f2c23=path[_0xae74('0x88')](config[_0xae74('0x89')],_0xae74('0x95'));var _0x4b621c={'where':{'id':_0x4589b0['params']['id']},'attributes':['id','customerAvatar','showCustomerAvatar'],'raw':!![]};return db[_0xae74('0x4b')][_0xae74('0x6a')](_0x4b621c)[_0xae74('0x1a')](handleEntityNotFound(_0x3179e2,null))[_0xae74('0x1a')](function(_0x44d20b){if(_0x44d20b){if(!_[_0xae74('0x8e')](_0x44d20b[_0xae74('0x85')])){if(fs[_0xae74('0x8f')](path['join'](config[_0xae74('0x89')],_0xae74('0x94'),_0x44d20b[_0xae74('0x85')]))&&_0x44d20b[_0xae74('0x96')]){_0x4f2c23=path['join'](config[_0xae74('0x89')],'server/files/images/avatars/',_0x44d20b[_0xae74('0x85')]);}}return _0x3179e2[_0xae74('0x91')](_0x4f2c23);}})[_0xae74('0x5f')](handleError(_0x3179e2,null));};exports['getSystemAvatar']=function(_0x2ab85b,_0x5d01a6){var _0x3624e9=path['join'](config[_0xae74('0x89')],_0xae74('0x97'));var _0x2214a2={'where':{'id':_0x2ab85b[_0xae74('0x6f')]['id']},'attributes':['id',_0xae74('0x87')],'raw':!![]};return db[_0xae74('0x4b')]['find'](_0x2214a2)['then'](handleEntityNotFound(_0x5d01a6,null))['then'](function(_0x247496){if(_0x247496){if(!_[_0xae74('0x8e')](_0x247496[_0xae74('0x87')])){if(fs['existsSync'](path[_0xae74('0x88')](config['root'],_0xae74('0x94'),_0x247496[_0xae74('0x87')]))){_0x3624e9=path['join'](config[_0xae74('0x89')],_0xae74('0x94'),_0x247496[_0xae74('0x87')]);}}return _0x5d01a6[_0xae74('0x91')](_0x3624e9);}})[_0xae74('0x5f')](handleError(_0x5d01a6,null));};exports[_0xae74('0x98')]=function(_0x4b9faa,_0x1ec753){var _0x455532={'body':_0x4b9faa[_0xae74('0x65')],'channel':_0xae74('0x99')};var _0x40238d=[];var _0x511669=[];var _0x380769={};var _0x59e419=![];if(_0x4b9faa[_0xae74('0x65')]['id']){delete _0x4b9faa[_0xae74('0x65')]['id'];}if(_[_0xae74('0x8e')](_0x4b9faa['body']['from'])){throw new APIBadRequestError('From\x20is\x20mandatory');}if(_[_0xae74('0x8e')](_0x4b9faa[_0xae74('0x65')]['mapKey'])){throw new APIBadRequestError(_0xae74('0x9a'));}if(_[_0xae74('0x9b')](_0x4b9faa[_0xae74('0x65')][_0xae74('0x65')])){throw new APIBadRequestError('Body\x20is\x20mandatory');}return db['CmContact'][_0xae74('0x70')]()[_0xae74('0x1a')](function(_0x581fa4){if(!_0x581fa4){throw new Error(_0xae74('0x9c'));}_0x40238d=Object[_0xae74('0x50')](_0x581fa4)[_0xae74('0x58')](function(_0x5b5b9a){return![_0xae74('0x9d'),_0xae74('0x9e')][_0xae74('0x9f')](_0x5b5b9a);});_0x511669=Object[_0xae74('0x50')](_0x581fa4)[_0xae74('0x58')](function(_0x567c6b){return!['createdAt',_0xae74('0x9e'),_0xae74('0xa0'),'ListId'][_0xae74('0x9f')](_0x567c6b);});if(!_[_0xae74('0x9f')](_0x511669,_0x4b9faa['body'][_0xae74('0xa1')])){throw new APIBadRequestError('Invalid\x20MapKey\x20parameter.\x20Allowed\x20values:\x20'+_0x511669[_0xae74('0x88')](',\x20'));}_0x380769[_0x4b9faa[_0xae74('0x65')][_0xae74('0xa1')]]=_0x4b9faa[_0xae74('0x65')]['from'];})[_0xae74('0x1a')](function(){return db['ChatWebsite'][_0xae74('0x6a')]({'where':{'id':_0x4b9faa[_0xae74('0x6f')]['id']},'include':[{'model':db[_0xae74('0xa2')],'as':_0xae74('0xa3'),'include':[{'model':db['CmContact'],'as':_0xae74('0xa4'),'where':_0x380769,'limit':0x1,'order':[[_0xae74('0x9e'),'DESC']]}]},{'model':db[_0xae74('0xa5')],'as':_0xae74('0xa6')},{'model':db['Interval'],'as':_0xae74('0xa7'),'include':[{'model':db[_0xae74('0xa7')],'as':_0xae74('0xa8'),'attributes':['id',_0xae74('0xa9')],'raw':!![]}]}]});})[_0xae74('0x1a')](function(_0x4cce7d){if(!_0x4cce7d){throw new APINotFoundError(util[_0xae74('0x3f')]('Chat\x20Website\x20with\x20id\x20%s\x20not\x20found',_0x4b9faa['params']['id']));}var _0x309bc9=_0x4cce7d['Interval'];if(_0x309bc9){var _0x55f0c0=_0x4cce7d[_0xae74('0xaa')]||undefined;return _0x309bc9[_0xae74('0xab')](_0x55f0c0)[_0xae74('0x1a')](function(_0x36516f){if(!_0x36516f){throw new APIOutOfIntervalError();}return _0x4cce7d;});}else{return _0x4cce7d;}})[_0xae74('0x1a')](function(_0x36e193){if(!_0x36e193['List']){return;}_0x455532[_0xae74('0xac')]=_0x36e193;_0x455532[_0xae74('0xad')]=_0x36e193[_0xae74('0xa3')];_0x455532[_0xae74('0xae')]=_['orderBy'](_0x36e193[_0xae74('0xa6')],[_0xae74('0xaf')],[_0xae74('0xb0')]);if(_0x455532[_0xae74('0xac')]['Applications']){delete _0x455532[_0xae74('0xac')][_0xae74('0xa6')];}if(_0x455532[_0xae74('0xac')][_0xae74('0xa3')]&&_0x455532['account'][_0xae74('0xa3')][_0xae74('0xa4')][_0xae74('0x62')]){return _0x455532['account'][_0xae74('0xa3')][_0xae74('0xa4')][0x0];}var _0x5b19e7=_[_0xae74('0x12')](_0x4b9faa['body'],{'firstName':_0x4b9faa['body'][_0xae74('0xb1')],'ListId':_0x36e193[_0xae74('0xb2')]});_0x5b19e7[_0x4b9faa[_0xae74('0x65')]['mapKey']]=_0x4b9faa[_0xae74('0x65')][_0xae74('0xb1')];return db[_0xae74('0xb3')][_0xae74('0x64')](_0x5b19e7,{'fields':_0x40238d,'raw':!![]});})['then'](function(_0x2241f4){_0x455532[_0xae74('0xb4')]=_0x2241f4;var _0x2f1727=createInteractionObject(_0x4b9faa[_0xae74('0x6f')]['id'],_0x4b9faa[_0xae74('0x65')],_0x4b9faa[_0xae74('0xb5')],_0x2241f4);var _0x2dac8a={'ChatWebsiteId':_0x4b9faa['params']['id']};if(_0x4b9faa[_0xae74('0x65')][_0xae74('0xb6')]){_0x2dac8a[_0xae74('0xb6')]=_0x4b9faa[_0xae74('0x65')][_0xae74('0xb6')];_0x2dac8a[_0xae74('0xb7')]=![];return db[_0xae74('0xb8')][_0xae74('0x6a')]({'where':_0x2dac8a})['then'](function(_0x242a37){var _0x5ebcfd=_0x4b9faa[_0xae74('0x65')][_0xae74('0x36')]&&_0x4b9faa[_0xae74('0x65')][_0xae74('0x3d')];if(_0x242a37){_0x59e419=!![];return _0x242a37;}else if(!_0x5ebcfd&&_0x242a37&&_0x242a37['closed']){throw new APIConflictError(_0xae74('0xb9'));}_0x2f1727['threadId']=_0x4b9faa[_0xae74('0x65')][_0xae74('0xb6')];_0x2f1727[_0xae74('0xba')]=_0x4b9faa[_0xae74('0x65')][_0xae74('0xba')];return db[_0xae74('0xb8')][_0xae74('0x64')](_0x2f1727);});}_0x2dac8a[_0xae74('0xbb')]=_0x2241f4['id'];if(_0x4b9faa[_0xae74('0x65')]['interaction']&&_0x4b9faa['body'][_0xae74('0xbc')]['id']){_0x2dac8a['id']=_0x4b9faa['body']['interaction']['id'];return db[_0xae74('0xb8')]['find']({'where':_0x2dac8a})['then'](function(_0x3180f6){var _0x1c47a5=_0x4b9faa[_0xae74('0x65')]['customerIp']&&_0x4b9faa['body'][_0xae74('0x3d')];if(!_0x1c47a5&&_0x3180f6&&_0x3180f6[_0xae74('0xb7')]){throw new APIConflictError(_0xae74('0xb9'));}else if(_0x3180f6){_0x59e419=!![];return _0x3180f6;}else{return db[_0xae74('0xb8')][_0xae74('0x64')](_0x2f1727);}});}return db['ChatInteraction'][_0xae74('0x64')](_0x2f1727);})[_0xae74('0x1a')](function(_0x29d9e4){if(!_0x59e419){return _0x29d9e4;}var _0x8c9b8b={'from':(_0x455532[_0xae74('0xb4')][_0xae74('0xbd')]||'')+'\x20'+(_0x455532[_0xae74('0xb4')][_0xae74('0x3b')]||'')};if(_0x4b9faa[_0xae74('0x65')]['threadId']&&_0x4b9faa[_0xae74('0x65')]['messageId']&&_0x4b9faa['body'][_0xae74('0xb6')]!=_0x4b9faa[_0xae74('0x65')]['messageId']){_0x8c9b8b[_0xae74('0xb6')]=_0x4b9faa[_0xae74('0x65')][_0xae74('0xbe')];}return _0x29d9e4['update'](_0x8c9b8b);})[_0xae74('0x1a')](function(_0x2e497a){_0x455532['interaction']=_0x2e497a['get']({'plain':!![]});_0x455532[_0xae74('0xbc')][_0xae74('0xbf')]=!_0x59e419;if(_0x455532[_0xae74('0xbc')]['created']){if(_0x455532[_0xae74('0xac')][_0xae74('0xc0')]){_0x455532[_0xae74('0xae')][_0xae74('0xc1')]({'id':0x0,'priority':_0x455532[_0xae74('0xae')][_0xae74('0x62')]+0x1,'app':_0xae74('0xc2'),'appdata':_0xae74('0xc3'),'interval':_0xae74('0xc4')});}}return db[_0xae74('0xc5')][_0xae74('0x64')]({'body':_0x4b9faa[_0xae74('0x65')][_0xae74('0x65')],'ChatWebsiteId':_0x4b9faa[_0xae74('0x6f')]['id'],'ChatInteractionId':_0x2e497a['id'],'direction':'in','ContactId':_0x455532[_0xae74('0xb4')]['id'],'AttachmentId':_0x4b9faa[_0xae74('0x65')][_0xae74('0xc6')]});})[_0xae74('0x1a')](function(_0x14bace){_0x455532['message']=_0x14bace;if(!_0x455532[_0xae74('0xbc')][_0xae74('0xc7')]){return;}return db[_0xae74('0xc8')][_0xae74('0x6a')]({'attributes':['id',_0xae74('0x32')],'where':{'id':_0x455532['interaction'][_0xae74('0xc7')]}});})[_0xae74('0x1a')](function(_0x23a851){if(_0x23a851){_0x455532[_0xae74('0xae')]['unshift']({'id':0x0,'priority':0x0,'app':_0xae74('0xc9'),'appdata':_0x23a851[_0xae74('0x32')]+','+(_0x455532['account'][_0xae74('0xca')]||0xa),'interval':_0xae74('0xc4')});_0x455532[_0xae74('0xcb')]=!![];}if(!_0x455532[_0xae74('0xbc')][_0xae74('0xcc')]){return;}return db[_0xae74('0xcd')]['find']({'attributes':['id',_0xae74('0x32')],'where':{'id':_0x455532[_0xae74('0xbc')][_0xae74('0xcc')]}});})[_0xae74('0x1a')](function(_0x379da8){if(_0x379da8){_0x455532[_0xae74('0xae')]['unshift']({'id':0x0,'priority':0x1,'app':_0xae74('0xce'),'appdata':_0x379da8[_0xae74('0x32')]+','+(_0x455532['account'][_0xae74('0xcf')]||0x12c),'interval':_0xae74('0xc4')});}return respondWithRpcPromise(_0xae74('0xd0'),'startRouting',_0x455532);})[_0xae74('0x1a')](function(_0x29cabb){respondWithRpcPromise(_0xae74('0xd1'),_0xae74('0xd1'),{'event':'notify','message':_0x29cabb},client9002);return _0x29cabb;})[_0xae74('0x1a')](respondWithResult(_0x1ec753,null))[_0xae74('0x5f')](APIHandleError(_0x1ec753));};exports['offline']=function(_0x12b743,_0x287f4e){var _0x59fd0e,_0x30e5b4,_0x3914d8;var _0x512a12=[];var _0x27111c={};var _0x2aa8f1=_0x12b743[_0xae74('0xd2')]||[];var _0x1c291b=[];var _0x5d96b3;return db['CmContact']['describe']()[_0xae74('0x1a')](function(_0x2a8769){if(!_0x2a8769){throw new db['Sequelize'][(_0xae74('0xd3'))]('no\x20available\x20attributes');}_0x512a12=_[_0xae74('0xd4')](_[_0xae74('0x50')](_0x2a8769),[_0xae74('0x9d'),'updatedAt',_0xae74('0xa0'),'ListId']);if(_0x12b743['body']['id']){delete _0x12b743[_0xae74('0x65')]['id'];}if(_[_0xae74('0x8e')](_0x12b743[_0xae74('0x65')][_0xae74('0xb1')])){throw _0x287f4e[_0xae74('0x26')](0x1f4)[_0xae74('0xd5')](new db[(_0xae74('0xd6'))][(_0xae74('0xd3'))](_0xae74('0xd7')));}if(_[_0xae74('0x8e')](_0x12b743['body']['body'])||_0x12b743[_0xae74('0x65')][_0xae74('0x65')]===''){throw _0x287f4e['status'](0x1f4)[_0xae74('0xd5')](new db[(_0xae74('0xd6'))]['ValidationError'](_0xae74('0xd8')));}if(_[_0xae74('0x8e')](_0x12b743[_0xae74('0x65')][_0xae74('0xd9')])){throw _0x287f4e[_0xae74('0x26')](0x1f4)[_0xae74('0xd5')](new db[(_0xae74('0xd6'))][(_0xae74('0xd3'))](_0xae74('0xda')+_0x512a12));}if(!_['includes'](_0x512a12,_0x12b743['body']['mapKeyOffline'])){throw _0x287f4e[_0xae74('0x26')](0x1f4)[_0xae74('0xd5')](new db[(_0xae74('0xd6'))][(_0xae74('0xd3'))]('mapKeyOffline\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x512a12));}_0x27111c[_0x12b743[_0xae74('0x65')][_0xae74('0xd9')]]=_0x12b743[_0xae74('0x65')]['from'];})[_0xae74('0x1a')](function(){return db[_0xae74('0x4b')][_0xae74('0x6a')]({'where':{'id':_0x12b743['params']['id']},'include':[{'model':db[_0xae74('0xa2')],'as':_0xae74('0xa3')},{'model':db[_0xae74('0xdb')],'as':_0xae74('0xdb')}]});})['then'](handleEntityNotFound(_0x287f4e,null))[_0xae74('0x1a')](function(_0x28b24c){if(_0x28b24c&&_0x28b24c['List']){_0x30e5b4=_0x28b24c;var _0x34c879=_['defaults'](_0x12b743['body'],{'firstName':_0x12b743[_0xae74('0x65')]['from'],'phone':_0x12b743[_0xae74('0x65')][_0xae74('0xb1')],'ListId':_0x28b24c[_0xae74('0xb2')]});_0x34c879[_0x12b743['body'][_0xae74('0xd9')]]=_0x12b743['body'][_0xae74('0xb1')];return db['CmContact'][_0xae74('0xdc')]({'where':_0x27111c,'defaults':_0x34c879});}})[_0xae74('0xdd')](function(_0x9fc67f){if(_0x9fc67f){_0x3914d8=_0x9fc67f;var _0x2409e8=fs[_0xae74('0xde')](path[_0xae74('0x88')](config[_0xae74('0x89')],_0xae74('0xdf')),_0xae74('0xe0'));var _0x100e6d=ejs[_0xae74('0xe1')](_0x2409e8,{'body':_['toPairs'](_0x12b743[_0xae74('0x65')][_0xae74('0x65')]),'bodyTitle':_0x30e5b4[_0xae74('0xe2')]});return db['ChatOfflineMessage']['create']({'body':_0x100e6d,'plainBody':htmlToText[_0xae74('0xe3')](_0x100e6d),'ContactId':_0x9fc67f['id'],'ChatWebsiteId':_0x30e5b4['id']});}})[_0xae74('0x1a')](function(_0x4633be){_0x5d96b3=_0x4633be;if(_0x2aa8f1['length']){var _0x2a4ba6=_0x2aa8f1['map'](function(_0x567430){return{'name':_0x567430[_0xae74('0xe4')],'basename':_0x567430['filename'],'type':_0x567430[_0xae74('0xe5')],'ChatOfflineMessageId':_0x4633be['id']};});_0x1c291b=_0x2a4ba6[_0xae74('0x4a')](_0x4c93d5=>{var _0x35496e={'filename':_0x4c93d5[_0xae74('0x32')],'path':path[_0xae74('0x88')](config['root'],'server','files','attachments',_0xae74('0xe6'),_0x4c93d5[_0xae74('0xe7')])};return _0x35496e;});if(!_0x30e5b4[_0xae74('0xe8')]){return db[_0xae74('0xe9')]['transaction'](function(_0x260b36){return db[_0xae74('0xea')]['bulkCreate'](_0x2a4ba6,{'transaction':_0x260b36});});}}})[_0xae74('0x1a')](function(){if(_0x5d96b3){_0x59fd0e=_0x5d96b3;return db[_0xae74('0xdb')][_0xae74('0x74')]({'where':{'service':!![]},'include':[{'model':db['MailServerOut'],'as':_0xae74('0xeb'),'raw':!![],'include':[{'model':db[_0xae74('0xec')],'as':'CloudProvider','raw':!![]}]}]});}})['then'](function(_0x1f12c8){if(_0x1f12c8&&_0x1f12c8[_0xae74('0xeb')]&&_0x30e5b4[_0xae74('0xed')]&&_0x30e5b4[_0xae74('0xee')]){var _0x237c71=_0x1f12c8[_0xae74('0xef')]();return respondWithRpcPromise('SendMail',_0xae74('0xf0'),{'account':_0x237c71,'message':{'from':util[_0xae74('0x3f')](_0xae74('0xf1'),_0x1f12c8['name'],_0x1f12c8[_0xae74('0xf2')]||_0x1f12c8[_0xae74('0xeb')][_0xae74('0x66')]),'to':_0x30e5b4[_0xae74('0xee')],'subject':_0x30e5b4['offlineMessageSubject'],'html':_0x59fd0e[_0xae74('0x65')],'attachments':_0x1c291b}},client9003)['then'](function(){return _0x59fd0e;})[_0xae74('0x5f')](function(_0x5c5c62){logger[_0xae74('0x20')](_0x5c5c62);});}})['then'](function(){if(_0x30e5b4&&_0x30e5b4['openNewInteraction']&&_0x30e5b4['MailAccountId']){var _0x243641=[];if(_0x2aa8f1[_0xae74('0x62')]){_0x243641=_0x2aa8f1[_0xae74('0x4a')](function(_0x14e30e){return{'name':_0x14e30e['originalname'],'basename':_0x14e30e[_0xae74('0x81')],'type':_0x14e30e['mimetype'],'ChatOfflineMessageId':_0x5d96b3['id']};});}var _0x4c6df1;if(!_[_0xae74('0x8e')](_0x30e5b4[_0xae74('0xf3')])){var _0x17a381=_['map'](_0x12b743['body'],function(_0x54798d){return _0x54798d;});var _0xcb2242=_[_0xae74('0xf4')](_0x17a381)[0x0];var _0xbac381=_[_0xae74('0xf5')](_0xcb2242,function(_0xa7c81f){return _0xa7c81f;});_0x4c6df1=_0xbac381[0x1][_0x30e5b4[_0xae74('0xf3')]];}var _0x382e8b={'from':_0x3914d8[_0xae74('0xf2')],'firstName':_0x3914d8['firstName'],'lastName':_0x3914d8[_0xae74('0x3b')],'mapKey':_0xae74('0xf2'),'message':{'from':_0x3914d8[_0xae74('0xf2')],'to':_0x30e5b4[_0xae74('0xdb')][_0xae74('0xf2')],'cc':'','subject':_[_0xae74('0x8e')](_0x4c6df1)?_0x30e5b4[_0xae74('0xf6')]:_0x4c6df1,'messageId':'','sentAt':new Date(),'attach':_0x243641['length'],'attachments':_0x243641,'originChannel':_0xae74('0xf7'),'ChatWebsiteId':_0x30e5b4['id'],'ChatOfflineMessageId':_0x59fd0e['id'],'originTo':_0x30e5b4['MailAccount'][_0xae74('0xf2')]},'body':_0x59fd0e[_0xae74('0x65')]};var _0x2a26a5={'account':{'id':_0x30e5b4[_0xae74('0xf8')]},'body':_0x382e8b,'log':_0xae74('0xf9')};return respondWithRpcPromise(_0xae74('0xf9'),_0xae74('0xfa'),_0x2a26a5,client9001)[_0xae74('0x1a')](function(){return _0x59fd0e;})[_0xae74('0x5f')](function(_0x31938c){logger[_0xae74('0x20')](_0x31938c);});}return;})[_0xae74('0x1a')](function(){if(_0x59fd0e){return _0x59fd0e;}})[_0xae74('0x1a')](respondWithResult(_0x287f4e,null))['catch'](function(){for(var _0x5db03b of _0x2aa8f1){var _0x4cebd8=path[_0xae74('0x88')](config[_0xae74('0x89')],_0xae74('0xfb'),'files',_0xae74('0xfc'),_0xae74('0xe6'),_0x5db03b[_0xae74('0x81')]);fs_extra[_0xae74('0xfd')](_0x4cebd8)['catch'](function(_0x577fb7){logger[_0xae74('0x20')](_0xae74('0xfe'),_0x4cebd8,_0x577fb7);});}});};exports[_0xae74('0xff')]=function(_0x130421,_0x519e3d){return db[_0xae74('0xb8')][_0xae74('0x6a')]({'where':{'id':_0x130421[_0xae74('0x6f')]['id']}})[_0xae74('0x1a')](handleEntityNotFound(_0x519e3d,null))[_0xae74('0x1a')](function(_0x24c8ab){if(_0x24c8ab){return _0x24c8ab[_0xae74('0xff')](_0x130421[_0xae74('0x65')][_0xae74('0x79')],_[_0xae74('0x100')](_0x130421['body'],[_0xae74('0x79'),'id'])||{});}})[_0xae74('0x1a')](respondWithResult(_0x519e3d,null))[_0xae74('0x5f')](handleError(_0x519e3d,null));};exports[_0xae74('0x101')]=function(_0x4c2a28,_0x486f4f){var _0x243813={'raw':![],'where':{}};var _0x203220={};var _0x5001bd={'count':0x0,'rows':[]};return db['ChatWebsite']['findOne']({'where':{'id':_0x4c2a28[_0xae74('0x6f')]['id']}})['then'](handleEntityNotFound(_0x486f4f,null))['then'](function(_0x5b37fe){if(_0x5b37fe){_0x203220['model']=_[_0xae74('0x50')](db[_0xae74('0xb8')]['rawAttributes']);_0x203220[_0xae74('0x4f')]=_[_0xae74('0x50')](_0x4c2a28[_0xae74('0x4f')]);_0x203220[_0xae74('0x51')]=_[_0xae74('0x52')](_0x203220[_0xae74('0x45')],_0x203220[_0xae74('0x4f')]);_0x243813[_0xae74('0x53')]=_[_0xae74('0x52')](_0x203220['model'],qs[_0xae74('0x54')](_0x4c2a28[_0xae74('0x4f')][_0xae74('0x54')]));_0x243813[_0xae74('0x53')]=_0x243813[_0xae74('0x53')][_0xae74('0x62')]?_0x243813['attributes']:_0x203220[_0xae74('0x45')];if(!_0x4c2a28[_0xae74('0x4f')][_0xae74('0x55')]('nolimit')){_0x243813[_0xae74('0x29')]=qs['limit'](_0x4c2a28[_0xae74('0x4f')][_0xae74('0x29')]);_0x243813['offset']=qs['offset'](_0x4c2a28[_0xae74('0x4f')][_0xae74('0x2b')]);}_0x243813[_0xae74('0x76')]=qs[_0xae74('0x56')](_0x4c2a28[_0xae74('0x4f')][_0xae74('0x56')]);_0x243813[_0xae74('0x57')]=qs[_0xae74('0x51')](_[_0xae74('0x77')](_0x4c2a28[_0xae74('0x4f')],_0x203220[_0xae74('0x51')]));_0x243813[_0xae74('0x57')][_0xae74('0x71')]=_0x5b37fe['id'];if(_0x4c2a28[_0xae74('0x4f')]['filter']){_0x243813[_0xae74('0x57')]=_['merge'](_0x243813[_0xae74('0x57')],{'$or':_['map'](_0x243813[_0xae74('0x53')],function(_0x127f76){var _0x478e26={};_0x478e26[_0x127f76]={'$like':'%'+_0x4c2a28[_0xae74('0x4f')][_0xae74('0x58')]+'%'};return _0x478e26;})});}_0x243813=_[_0xae74('0x5a')]({},_0x243813,_0x4c2a28[_0xae74('0x63')]);return db['ChatInteraction'][_0xae74('0x2c')]({'where':_0x243813[_0xae74('0x57')]})['then'](function(_0x33f421){_0x5001bd[_0xae74('0x2c')]=_0x33f421;if(_0x4c2a28['query']['includeAll']){_0x243813[_0xae74('0x5c')]=[{'model':db[_0xae74('0xb3')],'as':'Contact','required':![]},{'model':db[_0xae74('0xc8')],'as':_0xae74('0x102'),'attributes':[_0xae74('0x32'),_0xae74('0x103'),_0xae74('0x104')],'required':![]},{'model':db[_0xae74('0x105')],'as':_0xae74('0x106'),'attributes':['id','name',_0xae74('0x107')],'where':_0x4c2a28[_0xae74('0x4f')][_0xae74('0x108')]?{'id':_0x4c2a28[_0xae74('0x4f')][_0xae74('0x108')]}:undefined,'required':_0x4c2a28[_0xae74('0x4f')]['tag']?!![]:![]}];}return db['ChatInteraction'][_0xae74('0x5d')](_0x243813);})[_0xae74('0x1a')](function(_0x262bdb){_0x5001bd['rows']=_0x262bdb;return _0x5001bd;});}})[_0xae74('0x1a')](respondWithFilteredResult(_0x486f4f,_0x243813))[_0xae74('0x5f')](handleError(_0x486f4f,null));};exports[_0xae74('0x109')]=function(_0x4539b8,_0x1197fe){var _0x5920ea=0x0;var _0xf304a3=0x0;var _0x32d22b=![];var _0x4fb15e;var _0x13b4a7;return db['ChatWebsite'][_0xae74('0x6a')]({'where':{'id':_0x4539b8[_0xae74('0x6f')]['id']},'include':[{'model':db[_0xae74('0xa7')],'as':_0xae74('0xa7'),'include':[{'model':db[_0xae74('0xa7')],'as':_0xae74('0xa8'),'attributes':['id',_0xae74('0xa9')]}]}]})[_0xae74('0x1a')](handleEntityNotFound(_0x1197fe,null))['then'](function(_0x2c46d1){if(_0x2c46d1){_0x4fb15e=_0x2c46d1;return _0x2c46d1[_0xae74('0x10a')]({'raw':!![]});}})[_0xae74('0x1a')](function(_0x140122){if(_0x4fb15e){if(_0x140122){_0x13b4a7=_0x140122;}}return require(_0xae74('0x8b'))[_0xae74('0x8c')]();})[_0xae74('0x1a')](function(_0x5f4fd5){if(_0x5f4fd5){_0xf304a3=_0x5f4fd5[_0xae74('0x10b')];_0x32d22b=_0x5f4fd5[_0xae74('0x8d')];}})[_0xae74('0x1a')](function(){return db[_0xae74('0xb8')]['count']({'where':{'closed':![]}});})[_0xae74('0x1a')](function(_0x2f9572){_0x5920ea=_0x2f9572;if(_0xf304a3&&_0x2f9572>_0xf304a3){return db[_0xae74('0x10c')]['findOne']({'where':{'id':0x1}})['then'](function(_0x5555ea){if(_0x5555ea){_0x5555ea[_0xae74('0x10d')]('chatLicenseExceeded');}});}})[_0xae74('0x1a')](function(){var _0x517b9c=_0x4fb15e['Interval'];var _0x48f74d=_0x4fb15e[_0xae74('0xaa')]||undefined;return _0x517b9c?_0x517b9c[_0xae74('0xab')](_0x48f74d):!![];})[_0xae74('0x1a')](function(_0x2bc9f3){var _0x4dd62c=fs[_0xae74('0xde')](path['join'](config[_0xae74('0x89')],_0xae74('0x10e')),_0xae74('0xe0'));var _0x4f9beb=new url[(_0xae74('0x10f'))](_0x4fb15e[_0xae74('0x110')])[_0xae74('0x111')];var _0x4fde0d=_0xae74('0x112');var _0x4543fe=![];var _0x36f01b={'chatVersion':_0x4fde0d,'chatWebsiteAddressOrigin':_0x4f9beb,'remote':_0x4fb15e[_0xae74('0x113')],'query':querystring['stringify'](_[_0xae74('0x5a')](_0x4fb15e[_0xae74('0x30')]({'plain':!![]}),{'customerIp':_0x4539b8[_0xae74('0xb5')][_0xae74('0x39')]||_0x4539b8[_0xae74('0xb5')][_0xae74('0x114')]||_0x4539b8[_0xae74('0x115')][_0xae74('0x116')]||_0x4539b8['ip'],'referer':_0x4539b8['headers'][_0xae74('0x3d')],'openedInteractions':_0x5920ea,'maxInteractions':_0xf304a3,'virtual':_0x32d22b['virtual'],'online':_0x2bc9f3,'custom':_0x32d22b}))[_0xae74('0x117')](/'/g,'\x5c\x27')};_0x1197fe[_0xae74('0xd5')](ejs['render'](Mustache[_0xae74('0xe1')](_0x4dd62c,_0x36f01b),{'proactiveActions':_0x13b4a7,'alignment':_0x4fb15e[_0xae74('0x118')],'verticalAlignment':_0x4fb15e['verticalAlignment'],'div_color':_0x4fb15e[_0xae74('0x107')],'labelText':_0x4fb15e[_0xae74('0x119')],'text_color':_0x4fb15e['textColor'],'text_button_color':_0x4fb15e[_0xae74('0x11a')],'button_color':_0x4fb15e[_0xae74('0x11b')],'background_color':_0x4fb15e[_0xae74('0x11c')],'hideWhenOffline':_0x4fb15e['hideWhenOffline'],'intervalId':_0x4fb15e[_0xae74('0x11d')],'isDevelopment':_0x4543fe,'chatVersion':_0x4fde0d}));})[_0xae74('0x5f')](handleError(_0x1197fe,null));};exports['addApplications']=function(_0x2ac04b,_0x82425a){var _0x5f21dd=_0x2ac04b[_0xae74('0x6f')]['id'];var _0x3a3429=_0x2ac04b[_0xae74('0x65')];var _0x287fbd=0xc8;var _0x495bb3=null;return db[_0xae74('0xe9')][_0xae74('0x11e')]({'isolationLevel':db[_0xae74('0xe9')]['Transaction'][_0xae74('0x11f')]['READ_COMMITTED']},function(_0x4df064){return db['ChatWebsite']['findOne']({'where':{'id':_0x5f21dd},'transaction':_0x4df064})[_0xae74('0x1a')](function(_0x594ba1){if(_0x594ba1){return db[_0xae74('0xa5')][_0xae74('0x2f')]({'where':{'ChatWebsiteId':_0x5f21dd},'transaction':_0x4df064})[_0xae74('0x1a')](function(){var _0x32612f=_[_0xae74('0x4a')](_0x3a3429,function(_0x49b82a){_0x49b82a[_0xae74('0x71')]=_0x5f21dd;return _0x49b82a;});return db['ChatApplication'][_0xae74('0x120')](_0x32612f,{'transaction':_0x4df064});});}else{_0x287fbd=0x194;_0x495bb3=[];}});})['then'](function(){if(_0x287fbd!==0x194){return db['ChatApplication'][_0xae74('0x121')]({'where':{'ChatWebsiteId':_0x5f21dd},'order':_0xae74('0xaf')})[_0xae74('0x1a')](function(_0x24158c){_0x495bb3=_0x24158c;});}})[_0xae74('0x5f')](function(_0x14bbd7){_0x287fbd=0x1f4;logger[_0xae74('0x20')](_0x14bbd7[_0xae74('0x122')]);if(_0x14bbd7[_0xae74('0x32')]){delete _0x14bbd7[_0xae74('0x32')];}_0x495bb3=_0x14bbd7;})[_0xae74('0x123')](function(){if(_0x495bb3===null){_0x82425a[_0xae74('0x25')](_0x287fbd);}else{if(_0x287fbd===0x1f4){_0x82425a['status'](_0x287fbd)[_0xae74('0xd5')](_0x495bb3);}else{_0x82425a[_0xae74('0x26')](_0x287fbd)[_0xae74('0x28')](_0x495bb3);}}});};exports[_0xae74('0x124')]=function(_0x24336c,_0x45b809){var _0x2259dc={};var _0x397578={};var _0x356b05;var _0x2de15e;return db[_0xae74('0x4b')]['findOne']({'where':{'id':_0x24336c[_0xae74('0x6f')]['id']}})['then'](handleEntityNotFound(_0x45b809,null))[_0xae74('0x1a')](function(_0xe0010d){if(_0xe0010d){_0x356b05=_0xe0010d;_0x397578[_0xae74('0x45')]=_[_0xae74('0x50')](db['ChatApplication']['rawAttributes']);_0x397578[_0xae74('0x4f')]=_[_0xae74('0x50')](_0x24336c[_0xae74('0x4f')]);_0x397578[_0xae74('0x51')]=_['intersection'](_0x397578[_0xae74('0x45')],_0x397578[_0xae74('0x4f')]);_0x2259dc['attributes']=_[_0xae74('0x52')](_0x397578[_0xae74('0x45')],qs[_0xae74('0x54')](_0x24336c[_0xae74('0x4f')][_0xae74('0x54')]));_0x2259dc['attributes']=_0x2259dc[_0xae74('0x53')][_0xae74('0x62')]?_0x2259dc['attributes']:_0x397578['model'];_0x2259dc[_0xae74('0x76')]=qs[_0xae74('0x56')](_0x24336c[_0xae74('0x4f')][_0xae74('0x56')]);_0x2259dc[_0xae74('0x57')]=qs[_0xae74('0x51')](_[_0xae74('0x77')](_0x24336c[_0xae74('0x4f')],_0x397578[_0xae74('0x51')]));if(_0x24336c[_0xae74('0x4f')]['filter']){_0x2259dc[_0xae74('0x57')]=_[_0xae74('0x5a')](_0x2259dc[_0xae74('0x57')],{'$or':_[_0xae74('0x4a')](_0x2259dc['attributes'],function(_0x525870){var _0x3743e6={};_0x3743e6[_0x525870]={'$like':'%'+_0x24336c[_0xae74('0x4f')]['filter']+'%'};return _0x3743e6;})});}_0x2259dc=_[_0xae74('0x5a')]({},_0x2259dc,_0x24336c['options']);return _0x356b05[_0xae74('0x124')](_0x2259dc);}})[_0xae74('0x1a')](function(_0x21532c){if(_0x21532c){_0x2de15e=_0x21532c[_0xae74('0x62')];if(!_0x24336c['query'][_0xae74('0x55')](_0xae74('0x75'))){_0x2259dc[_0xae74('0x29')]=qs[_0xae74('0x29')](_0x24336c[_0xae74('0x4f')][_0xae74('0x29')]);_0x2259dc[_0xae74('0x2b')]=qs[_0xae74('0x2b')](_0x24336c[_0xae74('0x4f')][_0xae74('0x2b')]);}return _0x356b05['getApplications'](_0x2259dc);}})['then'](function(_0x34b822){if(_0x34b822){return _0x34b822?{'count':_0x2de15e,'rows':_0x34b822}:null;}})[_0xae74('0x1a')](respondWithResult(_0x45b809,null))[_0xae74('0x5f')](handleError(_0x45b809,null));};exports[_0xae74('0x125')]=function(_0x319004,_0x2faa7b){return db[_0xae74('0x126')][_0xae74('0x6a')]({'where':{'id':_0x319004[_0xae74('0x6f')]['id']}})[_0xae74('0x1a')](handleEntityNotFound(_0x2faa7b,null))[_0xae74('0x1a')](function(_0x286467){if(_0x286467){return _0x286467[_0xae74('0x125')](_0x319004[_0xae74('0x65')][_0xae74('0x79')],_[_0xae74('0x100')](_0x319004[_0xae74('0x65')],[_0xae74('0x79'),'id'])||{});}})['then'](respondWithResult(_0x2faa7b,null))[_0xae74('0x5f')](handleError(_0x2faa7b,null));};exports['getProactiveActions']=function(_0x5dccdd,_0x5af48c){var _0x3169ec={};var _0x1e1b41={};var _0x3533b4;var _0x261039;return db[_0xae74('0x4b')][_0xae74('0x74')]({'where':{'id':_0x5dccdd[_0xae74('0x6f')]['id']}})['then'](handleEntityNotFound(_0x5af48c,null))[_0xae74('0x1a')](function(_0x2081ca){if(_0x2081ca){_0x3533b4=_0x2081ca;_0x1e1b41[_0xae74('0x45')]=_[_0xae74('0x50')](db['ChatProactiveAction'][_0xae74('0x4c')]);_0x1e1b41[_0xae74('0x4f')]=_[_0xae74('0x50')](_0x5dccdd[_0xae74('0x4f')]);_0x1e1b41[_0xae74('0x51')]=_[_0xae74('0x52')](_0x1e1b41['model'],_0x1e1b41[_0xae74('0x4f')]);_0x3169ec['attributes']=_[_0xae74('0x52')](_0x1e1b41['model'],qs[_0xae74('0x54')](_0x5dccdd[_0xae74('0x4f')][_0xae74('0x54')]));_0x3169ec['attributes']=_0x3169ec[_0xae74('0x53')][_0xae74('0x62')]?_0x3169ec[_0xae74('0x53')]:_0x1e1b41[_0xae74('0x45')];_0x3169ec['order']=qs[_0xae74('0x56')](_0x5dccdd[_0xae74('0x4f')]['sort']);_0x3169ec[_0xae74('0x57')]=qs[_0xae74('0x51')](_[_0xae74('0x77')](_0x5dccdd[_0xae74('0x4f')],_0x1e1b41[_0xae74('0x51')]));if(_0x5dccdd[_0xae74('0x4f')][_0xae74('0x58')]){_0x3169ec['where']=_[_0xae74('0x5a')](_0x3169ec[_0xae74('0x57')],{'$or':_[_0xae74('0x4a')](_0x3169ec['attributes'],function(_0x225d58){var _0x3deb23={};_0x3deb23[_0x225d58]={'$like':'%'+_0x5dccdd[_0xae74('0x4f')]['filter']+'%'};return _0x3deb23;})});}_0x3169ec=_['merge']({},_0x3169ec,_0x5dccdd[_0xae74('0x63')]);return _0x3533b4['getProactiveActions'](_0x3169ec);}})['then'](function(_0x40ae23){if(_0x40ae23){_0x261039=_0x40ae23[_0xae74('0x62')];if(!_0x5dccdd[_0xae74('0x4f')][_0xae74('0x55')]('nolimit')){_0x3169ec['limit']=qs[_0xae74('0x29')](_0x5dccdd['query'][_0xae74('0x29')]);_0x3169ec[_0xae74('0x2b')]=qs[_0xae74('0x2b')](_0x5dccdd['query']['offset']);}return _0x3533b4['getProactiveActions'](_0x3169ec);}})[_0xae74('0x1a')](function(_0x5bc3fa){if(_0x5bc3fa){return _0x5bc3fa?{'count':_0x261039,'rows':_0x5bc3fa}:null;}})[_0xae74('0x1a')](respondWithResult(_0x5af48c,null))[_0xae74('0x5f')](handleError(_0x5af48c,null));};exports['getFields']=function(_0x4b3f0a,_0x566200){var _0x52dc85=_0x4b3f0a[_0xae74('0x4f')][_0xae74('0x127')]==='false'?_0xae74('0x128'):_0xae74('0x129');return db[_0xae74('0x4b')][_0xae74('0x6a')]({'attributes':['id',_0x52dc85],'where':{'id':_0x4b3f0a[_0xae74('0x6f')]['id']}})[_0xae74('0x1a')](handleEntityNotFound(_0x566200,null))[_0xae74('0x1a')](function(_0x5d9cc9){if(_0x5d9cc9){var _0x1e2699=_0x5d9cc9[_0x52dc85];var _0x58a0a8=_0x1e2699&&_0x1e2699[_0xae74('0x12a')]?_0x1e2699[_0xae74('0x12a')]:[];_0x566200[_0xae74('0xd5')]({'fromKey':_[_0xae74('0x8e')](_0x1e2699[_0xae74('0x12b')])?undefined:_0x1e2699['fromKey'],'count':_0x58a0a8[_0xae74('0x62')],'rows':_0x58a0a8});}})[_0xae74('0x5f')](handleError(_0x566200,null));};exports['getOfflineMessages']=function(_0x350f94,_0x266b20){var _0x2ded7e={'raw':![],'where':{}};var _0x339aff={};var _0x1d1c39={'count':0x0,'rows':[]};return db[_0xae74('0x4b')]['findOne']({'where':{'id':_0x350f94[_0xae74('0x6f')]['id']}})[_0xae74('0x1a')](handleEntityNotFound(_0x266b20,null))[_0xae74('0x1a')](function(_0x5ba1a9){if(_0x5ba1a9){_0x339aff[_0xae74('0x45')]=_['keys'](db['ChatOfflineMessage'][_0xae74('0x4c')]);_0x339aff['query']=_[_0xae74('0x50')](_0x350f94[_0xae74('0x4f')]);_0x339aff[_0xae74('0x51')]=_['intersection'](_0x339aff[_0xae74('0x45')],_0x339aff[_0xae74('0x4f')]);_0x2ded7e[_0xae74('0x53')]=_[_0xae74('0x52')](_0x339aff[_0xae74('0x45')],qs[_0xae74('0x54')](_0x350f94[_0xae74('0x4f')][_0xae74('0x54')]));_0x2ded7e[_0xae74('0x53')]=_0x2ded7e['attributes'][_0xae74('0x62')]?_0x2ded7e[_0xae74('0x53')]:_0x339aff[_0xae74('0x45')];if(!_0x350f94[_0xae74('0x4f')][_0xae74('0x55')](_0xae74('0x75'))){_0x2ded7e[_0xae74('0x29')]=qs[_0xae74('0x29')](_0x350f94['query']['limit']);_0x2ded7e[_0xae74('0x2b')]=qs[_0xae74('0x2b')](_0x350f94[_0xae74('0x4f')][_0xae74('0x2b')]);}_0x2ded7e['order']=qs[_0xae74('0x56')](_0x350f94['query']['sort']);_0x2ded7e[_0xae74('0x57')]=qs[_0xae74('0x51')](_[_0xae74('0x77')](_0x350f94[_0xae74('0x4f')],_0x339aff[_0xae74('0x51')]));_0x2ded7e[_0xae74('0x57')][_0xae74('0x71')]=_0x5ba1a9['id'];if(_0x350f94[_0xae74('0x4f')][_0xae74('0x58')]){_0x2ded7e[_0xae74('0x57')]=_[_0xae74('0x5a')](_0x2ded7e[_0xae74('0x57')],{'$or':_[_0xae74('0x4a')](_0x2ded7e['attributes'],function(_0x573a2a){var _0x4caca3={};_0x4caca3[_0x573a2a]={'$like':'%'+_0x350f94[_0xae74('0x4f')][_0xae74('0x58')]+'%'};return _0x4caca3;})});}_0x2ded7e=_[_0xae74('0x5a')]({},_0x2ded7e,_0x350f94[_0xae74('0x63')]);return db[_0xae74('0x12c')]['count']({'where':_0x2ded7e['where']})[_0xae74('0x1a')](function(_0x1b99a6){_0x1d1c39[_0xae74('0x2c')]=_0x1b99a6;if(_0x350f94[_0xae74('0x4f')][_0xae74('0x5b')]){_0x2ded7e[_0xae74('0x5c')]=[{'all':!![]}];}else{_0x2ded7e[_0xae74('0x5c')]=[{'model':db[_0xae74('0xb3')],'as':_0xae74('0x12d'),'required':![]},{'model':db['Attachment'],'as':_0xae74('0x12e'),'required':![]}];}return db[_0xae74('0x12c')][_0xae74('0x5d')](_0x2ded7e);})[_0xae74('0x1a')](function(_0x224092){_0x1d1c39['rows']=_0x224092;return _0x1d1c39;});}})[_0xae74('0x1a')](respondWithFilteredResult(_0x266b20,_0x2ded7e))[_0xae74('0x5f')](handleError(_0x266b20,null));};exports['addAgents']=function(_0x17406e,_0xb4dce2){return db[_0xae74('0x4b')][_0xae74('0x6a')]({'where':{'id':_0x17406e['params']['id']}})[_0xae74('0x1a')](handleEntityNotFound(_0xb4dce2,null))[_0xae74('0x1a')](function(_0x1a2756){if(_0x1a2756){return _0x1a2756[_0xae74('0x12f')](_0x17406e[_0xae74('0x65')]['ids'],_[_0xae74('0x100')](_0x17406e[_0xae74('0x65')],[_0xae74('0x79'),'id'])||{})[_0xae74('0xdd')](function(_0x1de58f){for(var _0x41b959=0x0;_0x41b959<_0x17406e[_0xae74('0x65')][_0xae74('0x79')][_0xae74('0x62')];_0x41b959+=0x1){socket[_0xae74('0x130')](_0xae74('0x131'),{'UserId':Number(_0x17406e[_0xae74('0x65')][_0xae74('0x79')][_0x41b959]),'ChatWebsiteId':Number(_0x17406e[_0xae74('0x6f')]['id'])});}return _0x1de58f;});}})[_0xae74('0x1a')](respondWithResult(_0xb4dce2,null))[_0xae74('0x5f')](handleError(_0xb4dce2,null));};exports[_0xae74('0x132')]=function(_0x14f1eb,_0x320e80){return db[_0xae74('0x4b')][_0xae74('0x6a')]({'where':{'id':_0x14f1eb[_0xae74('0x6f')]['id']}})[_0xae74('0x1a')](handleEntityNotFound(_0x320e80,null))[_0xae74('0x1a')](function(_0x33c053){if(_0x33c053){return _0x33c053['removeAgents'](_0x14f1eb['query'][_0xae74('0x79')])[_0xae74('0x1a')](function(){if(_[_0xae74('0x133')](_0x14f1eb[_0xae74('0x4f')][_0xae74('0x79')])){for(var _0x294d0e=0x0;_0x294d0e<_0x14f1eb[_0xae74('0x4f')][_0xae74('0x79')][_0xae74('0x62')];_0x294d0e+=0x1){socket['emit'](_0xae74('0x134'),{'UserId':Number(_0x14f1eb['query'][_0xae74('0x79')][_0x294d0e]),'ChatWebsiteId':Number(_0x14f1eb['params']['id'])});}}else{socket['emit'](_0xae74('0x134'),{'UserId':Number(_0x14f1eb['query'][_0xae74('0x79')]),'ChatWebsiteId':Number(_0x14f1eb[_0xae74('0x6f')]['id'])});}});}})[_0xae74('0x1a')](respondWithStatusCode(_0x320e80,null))['catch'](handleError(_0x320e80,null));};exports[_0xae74('0x135')]=function(_0x1de629,_0x13eb28){var _0x2d72fa={};var _0x1c7f83={};var _0x5637d7;var _0x5df077;return db[_0xae74('0x4b')][_0xae74('0x74')]({'where':{'id':_0x1de629[_0xae74('0x6f')]['id']}})[_0xae74('0x1a')](handleEntityNotFound(_0x13eb28,null))[_0xae74('0x1a')](function(_0x3d362c){if(_0x3d362c){_0x5637d7=_0x3d362c;_0x1c7f83[_0xae74('0x45')]=_[_0xae74('0x50')](db[_0xae74('0xc8')][_0xae74('0x4c')]);_0x1c7f83['query']=_[_0xae74('0x50')](_0x1de629[_0xae74('0x4f')]);_0x1c7f83['filters']=_[_0xae74('0x52')](_0x1c7f83[_0xae74('0x45')],_0x1c7f83['query']);_0x2d72fa['attributes']=_[_0xae74('0x52')](_0x1c7f83['model'],qs[_0xae74('0x54')](_0x1de629[_0xae74('0x4f')][_0xae74('0x54')]));_0x2d72fa[_0xae74('0x53')]=_0x2d72fa[_0xae74('0x53')][_0xae74('0x62')]?_0x2d72fa['attributes']:_0x1c7f83['model'];_0x2d72fa[_0xae74('0x76')]=qs[_0xae74('0x56')](_0x1de629[_0xae74('0x4f')][_0xae74('0x56')]);_0x2d72fa[_0xae74('0x57')]=qs[_0xae74('0x51')](_[_0xae74('0x77')](_0x1de629['query'],_0x1c7f83[_0xae74('0x51')]));if(_0x1de629['query']['filter']){_0x2d72fa[_0xae74('0x57')]=_[_0xae74('0x5a')](_0x2d72fa[_0xae74('0x57')],{'$or':_[_0xae74('0x4a')](_0x2d72fa[_0xae74('0x53')],function(_0x57399a){var _0x3b0e75={};_0x3b0e75[_0x57399a]={'$like':'%'+_0x1de629[_0xae74('0x4f')]['filter']+'%'};return _0x3b0e75;})});}_0x2d72fa=_[_0xae74('0x5a')]({},_0x2d72fa,_0x1de629[_0xae74('0x63')]);return _0x5637d7[_0xae74('0x135')](_0x2d72fa);}})[_0xae74('0x1a')](function(_0x2924fa){if(_0x2924fa){_0x5df077=_0x2924fa[_0xae74('0x62')];if(!_0x1de629[_0xae74('0x4f')][_0xae74('0x55')](_0xae74('0x75'))){_0x2d72fa[_0xae74('0x29')]=qs[_0xae74('0x29')](_0x1de629[_0xae74('0x4f')][_0xae74('0x29')]);_0x2d72fa[_0xae74('0x2b')]=qs[_0xae74('0x2b')](_0x1de629[_0xae74('0x4f')]['offset']);}return _0x5637d7[_0xae74('0x135')](_0x2d72fa);}})['then'](function(_0x36b6ed){if(_0x36b6ed){return _0x36b6ed?{'count':_0x5df077,'rows':_0x36b6ed}:null;}})[_0xae74('0x1a')](respondWithResult(_0x13eb28,null))[_0xae74('0x5f')](handleError(_0x13eb28,null));};
\ No newline at end of file
index 68c9b26..dcd60f6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbed7=['ChatWebsite','setMaxListeners','save','remove','emit','hasOwnProperty','hook','events','../../mysqldb'];(function(_0xc50658,_0x49657a){var _0x5cb377=function(_0x4e941c){while(--_0x4e941c){_0xc50658['push'](_0xc50658['shift']());}};_0x5cb377(++_0x49657a);}(_0xbed7,0x14b));var _0x7bed=function(_0x4c5b06,_0x5657d4){_0x4c5b06=_0x4c5b06-0x0;var _0x2d17c8=_0xbed7[_0x4c5b06];return _0x2d17c8;};'use strict';var EventEmitter=require(_0x7bed('0x0'));var ChatWebsite=require(_0x7bed('0x1'))['db'][_0x7bed('0x2')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0x7bed('0x3')](0x0);var events={'afterCreate':_0x7bed('0x4'),'afterUpdate':'update','afterDestroy':_0x7bed('0x5')};function emitEvent(_0x208dc6){return function(_0x1da710,_0x18c2c7,_0x2e683a){ChatWebsiteEvents[_0x7bed('0x6')](_0x208dc6+':'+_0x1da710['id'],_0x1da710);ChatWebsiteEvents[_0x7bed('0x6')](_0x208dc6,_0x1da710);_0x2e683a(null);};}for(var e in events){if(events[_0x7bed('0x7')](e)){var event=events[e];ChatWebsite[_0x7bed('0x8')](e,emitEvent(event));}}module['exports']=ChatWebsiteEvents;
\ No newline at end of file
+var _0x12c9=['ChatWebsite','setMaxListeners','save','remove','hasOwnProperty','hook','exports','events','../../mysqldb'];(function(_0x34145e,_0x689e31){var _0x27ed04=function(_0x297fc7){while(--_0x297fc7){_0x34145e['push'](_0x34145e['shift']());}};_0x27ed04(++_0x689e31);}(_0x12c9,0x1c9));var _0x912c=function(_0x38859b,_0x3f19f6){_0x38859b=_0x38859b-0x0;var _0x169c75=_0x12c9[_0x38859b];return _0x169c75;};'use strict';var EventEmitter=require(_0x912c('0x0'));var ChatWebsite=require(_0x912c('0x1'))['db'][_0x912c('0x2')];var ChatWebsiteEvents=new EventEmitter();ChatWebsiteEvents[_0x912c('0x3')](0x0);var events={'afterCreate':_0x912c('0x4'),'afterUpdate':'update','afterDestroy':_0x912c('0x5')};function emitEvent(_0xcb7adc){return function(_0x2c8059,_0x298dcc,_0x1732a0){ChatWebsiteEvents['emit'](_0xcb7adc+':'+_0x2c8059['id'],_0x2c8059);ChatWebsiteEvents['emit'](_0xcb7adc,_0x2c8059);_0x1732a0(null);};}for(var e in events){if(events[_0x912c('0x6')](e)){var event=events[e];ChatWebsite[_0x912c('0x7')](e,emitEvent(event));}}module[_0x912c('0x8')]=ChatWebsiteEvents;
\ No newline at end of file
index 321ee5c..9d21e99 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbbbd=['rimraf','define','ChatWebsite','lodash','../../config/logger','api','moment','bluebird','path'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xbbbd,0x9c));var _0xdbbb=function(_0x2d2c16,_0x4e88b6){_0x2d2c16=_0x2d2c16-0x0;var _0x53f2fb=_0xbbbd[_0x2d2c16];return _0x53f2fb;};'use strict';var _=require(_0xdbbb('0x0'));var util=require('util');var logger=require(_0xdbbb('0x1'))(_0xdbbb('0x2'));var moment=require(_0xdbbb('0x3'));var BPromise=require(_0xdbbb('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xdbbb('0x5'));var rimraf=require(_0xdbbb('0x6'));var config=require('../../config/environment');var attributes=require('./chatWebsite.attributes');module['exports']=function(_0x55e8f4,_0x562e8b){return _0x55e8f4[_0xdbbb('0x7')](_0xdbbb('0x8'),attributes,{'tableName':'chat_websites','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xff5a=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','exports','define','util'];(function(_0x2ead29,_0x137342){var _0xe45568=function(_0x1d3e4d){while(--_0x1d3e4d){_0x2ead29['push'](_0x2ead29['shift']());}};_0xe45568(++_0x137342);}(_0xff5a,0x10d));var _0xaff5=function(_0x4dbce0,_0x414a7e){_0x4dbce0=_0x4dbce0-0x0;var _0x5b166c=_0xff5a[_0x4dbce0];return _0x5b166c;};'use strict';var _=require('lodash');var util=require(_0xaff5('0x0'));var logger=require(_0xaff5('0x1'))(_0xaff5('0x2'));var moment=require(_0xaff5('0x3'));var BPromise=require(_0xaff5('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xaff5('0x5'));var rimraf=require(_0xaff5('0x6'));var config=require(_0xaff5('0x7'));var attributes=require('./chatWebsite.attributes');module[_0xaff5('0x8')]=function(_0x382207,_0x43cedf){return _0x382207[_0xaff5('0x9')]('ChatWebsite',attributes,{'tableName':'chat_websites','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index d0f85ed..beefa24 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd8e9=['message','request\x20sent','result','catch','lodash','util','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','http','localhost','socket.io-emitter','redis','register','request','then','info','ChatWebsite,\x20%s,\x20%s','debug','ChatWebsite,\x20%s,\x20%s,\x20%s','error'];(function(_0x5e6ea3,_0x9addd2){var _0x4048b5=function(_0x9092e4){while(--_0x9092e4){_0x5e6ea3['push'](_0x5e6ea3['shift']());}};_0x4048b5(++_0x9addd2);}(_0xd8e9,0x77));var _0x9d8e=function(_0x57a88d,_0x888f7){_0x57a88d=_0x57a88d-0x0;var _0x2883ce=_0xd8e9[_0x57a88d];return _0x2883ce;};'use strict';var _=require(_0x9d8e('0x0'));var util=require(_0x9d8e('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9d8e('0x2'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x9d8e('0x3'))(_0x9d8e('0x4'));var config=require(_0x9d8e('0x5'));var jayson=require(_0x9d8e('0x6'));var client=jayson['client'][_0x9d8e('0x7')]({'port':0x232a});config['redis']=_['defaults'](config['redis'],{'host':_0x9d8e('0x8'),'port':0x18eb});var socket=require(_0x9d8e('0x9'))(new Redis(config[_0x9d8e('0xa')]));require('./chatWebsite.socket')[_0x9d8e('0xb')](socket);function respondWithRpcPromise(_0x545c97,_0xa8f46b,_0x22e045){return new BPromise(function(_0x1f619b,_0x42dc4f){return client[_0x9d8e('0xc')](_0x545c97,_0x22e045)[_0x9d8e('0xd')](function(_0x2c9fb5){logger[_0x9d8e('0xe')](_0x9d8e('0xf'),_0xa8f46b,'request\x20sent');logger[_0x9d8e('0x10')](_0x9d8e('0x11'),_0xa8f46b,'request\x20sent',JSON['stringify'](_0x2c9fb5));if(_0x2c9fb5[_0x9d8e('0x12')]){if(_0x2c9fb5[_0x9d8e('0x12')]['code']===0x1f4){logger['error'](_0x9d8e('0xf'),_0xa8f46b,_0x2c9fb5[_0x9d8e('0x12')][_0x9d8e('0x13')]);return _0x42dc4f(_0x2c9fb5['error'][_0x9d8e('0x13')]);}logger[_0x9d8e('0x12')]('ChatWebsite,\x20%s,\x20%s',_0xa8f46b,_0x2c9fb5[_0x9d8e('0x12')][_0x9d8e('0x13')]);return _0x1f619b(_0x2c9fb5['error'][_0x9d8e('0x13')]);}else{logger['info'](_0x9d8e('0xf'),_0xa8f46b,_0x9d8e('0x14'));_0x1f619b(_0x2c9fb5[_0x9d8e('0x15')][_0x9d8e('0x13')]);}})[_0x9d8e('0x16')](function(_0x13f6db){logger[_0x9d8e('0x12')]('ChatWebsite,\x20%s,\x20%s',_0xa8f46b,_0x13f6db);_0x42dc4f(_0x13f6db);});});}
\ No newline at end of file
+var _0xb281=['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','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./chatWebsite.socket','then'];(function(_0x30ae5e,_0x391fc4){var _0x1f2e93=function(_0x60307d){while(--_0x60307d){_0x30ae5e['push'](_0x30ae5e['shift']());}};_0x1f2e93(++_0x391fc4);}(_0xb281,0x177));var _0x1b28=function(_0x412324,_0x4c66d9){_0x412324=_0x412324-0x0;var _0x3b7bfe=_0xb281[_0x412324];return _0x3b7bfe;};'use strict';var _=require(_0x1b28('0x0'));var util=require(_0x1b28('0x1'));var moment=require(_0x1b28('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x1b28('0x3'));var logger=require(_0x1b28('0x4'))(_0x1b28('0x5'));var config=require('../../config/environment');var jayson=require(_0x1b28('0x6'));var client=jayson[_0x1b28('0x7')][_0x1b28('0x8')]({'port':0x232a});config[_0x1b28('0x9')]=_[_0x1b28('0xa')](config[_0x1b28('0x9')],{'host':_0x1b28('0xb'),'port':0x18eb});var socket=require(_0x1b28('0xc'))(new Redis(config['redis']));require(_0x1b28('0xd'))['register'](socket);function respondWithRpcPromise(_0x46fd8f,_0x300270,_0x51920e){return new BPromise(function(_0x1eb5a3,_0x5cea24){return client['request'](_0x46fd8f,_0x51920e)[_0x1b28('0xe')](function(_0x4d2b0d){logger[_0x1b28('0xf')](_0x1b28('0x10'),_0x300270,_0x1b28('0x11'));logger[_0x1b28('0x12')](_0x1b28('0x13'),_0x300270,_0x1b28('0x11'),JSON[_0x1b28('0x14')](_0x4d2b0d));if(_0x4d2b0d[_0x1b28('0x15')]){if(_0x4d2b0d[_0x1b28('0x15')][_0x1b28('0x16')]===0x1f4){logger[_0x1b28('0x15')](_0x1b28('0x10'),_0x300270,_0x4d2b0d[_0x1b28('0x15')][_0x1b28('0x17')]);return _0x5cea24(_0x4d2b0d[_0x1b28('0x15')]['message']);}logger[_0x1b28('0x15')]('ChatWebsite,\x20%s,\x20%s',_0x300270,_0x4d2b0d[_0x1b28('0x15')][_0x1b28('0x17')]);return _0x1eb5a3(_0x4d2b0d[_0x1b28('0x15')][_0x1b28('0x17')]);}else{logger[_0x1b28('0xf')]('ChatWebsite,\x20%s,\x20%s',_0x300270,'request\x20sent');_0x1eb5a3(_0x4d2b0d[_0x1b28('0x18')]['message']);}})[_0x1b28('0x19')](function(_0x119dd4){logger[_0x1b28('0x15')]('ChatWebsite,\x20%s,\x20%s',_0x300270,_0x119dd4);_0x5cea24(_0x119dd4);});});}
\ No newline at end of file
index f501230..19a01d5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x03a2=['length','chatWebsite:','./chatWebsite.events','save','remove','update','removeListener','register'];(function(_0x107dd5,_0x30d9ad){var _0x2e1593=function(_0xf6ed27){while(--_0xf6ed27){_0x107dd5['push'](_0x107dd5['shift']());}};_0x2e1593(++_0x30d9ad);}(_0x03a2,0x162));var _0x203a=function(_0x20171f,_0x3d4540){_0x20171f=_0x20171f-0x0;var _0x203015=_0x03a2[_0x20171f];return _0x203015;};'use strict';var ChatWebsiteEvents=require(_0x203a('0x0'));var events=[_0x203a('0x1'),_0x203a('0x2'),_0x203a('0x3')];function createListener(_0x56e59a,_0x20f55b){return function(_0xcac4b4){_0x20f55b['emit'](_0x56e59a,_0xcac4b4);};}function removeListener(_0x26d420,_0x228144){return function(){ChatWebsiteEvents[_0x203a('0x4')](_0x26d420,_0x228144);};}exports[_0x203a('0x5')]=function(_0x31b769){for(var _0x131a09=0x0,_0x5c1748=events[_0x203a('0x6')];_0x131a09<_0x5c1748;_0x131a09++){var _0x3799cd=events[_0x131a09];var _0x174b2f=createListener(_0x203a('0x7')+_0x3799cd,_0x31b769);ChatWebsiteEvents['on'](_0x3799cd,_0x174b2f);}};
\ No newline at end of file
+var _0x02c3=['./chatWebsite.events','save','emit','removeListener','register','chatWebsite:'];(function(_0x56951d,_0x3f44d7){var _0x34b8ef=function(_0xa06d52){while(--_0xa06d52){_0x56951d['push'](_0x56951d['shift']());}};_0x34b8ef(++_0x3f44d7);}(_0x02c3,0xb4));var _0x302c=function(_0x5d5f94,_0x431a4e){_0x5d5f94=_0x5d5f94-0x0;var _0x185540=_0x02c3[_0x5d5f94];return _0x185540;};'use strict';var ChatWebsiteEvents=require(_0x302c('0x0'));var events=[_0x302c('0x1'),'remove','update'];function createListener(_0x2d1f48,_0x2f4656){return function(_0x2f53c5){_0x2f4656[_0x302c('0x2')](_0x2d1f48,_0x2f53c5);};}function removeListener(_0x377fc7,_0x62285e){return function(){ChatWebsiteEvents[_0x302c('0x3')](_0x377fc7,_0x62285e);};}exports[_0x302c('0x4')]=function(_0x44d8b9){for(var _0x74e606=0x0,_0x1db92c=events['length'];_0x74e606<_0x1db92c;_0x74e606++){var _0x330ec3=events[_0x74e606];var _0x5587d3=createListener(_0x302c('0x5')+_0x330ec3,_0x44d8b9);ChatWebsiteEvents['on'](_0x330ec3,_0x5587d3);}};
\ No newline at end of file
index c7ed104..5814840 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdceb=['delete','removeAgents','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/describe','/:id','show','/:id/dispositions','getDispositions','/:id/canned_answers','/:id/logo','getLogo','/:id/avatar','getAvatar','/:id/customer_avatar','getCustomerAvatar','/:id/system_avatar','getSystemAvatar','/:id/snippet','getSnippet','getApplications','/:id/proactive_actions','getProactiveActions','/:id/fields','getFields','getOfflineMessages','/:id/users','getAgents','post','create','addDisposition','diskStorage','format','%s-%s','now','originalname','single','file','addLogo','join','root','server/files/images/avatars/','addCustomerAvatar','addSystemAvatar','notify','attachments','offline-chat','ensureDir','replace','/:id/offline','offline','/:id/interactions','addInteraction','addApplications','addProactiveActions','addAgents','put','update'];(function(_0x18f5f3,_0x4c952c){var _0x332ef1=function(_0x3c7e0b){while(--_0x3c7e0b){_0x18f5f3['push'](_0x18f5f3['shift']());}};_0x332ef1(++_0x4c952c);}(_0xdceb,0x15c));var _0xbdce=function(_0x278562,_0x2f9204){_0x278562=_0x278562-0x0;var _0x480af8=_0xdceb[_0x278562];return _0x480af8;};'use strict';var multer=require(_0xbdce('0x0'));var util=require(_0xbdce('0x1'));var path=require(_0xbdce('0x2'));var timeout=require(_0xbdce('0x3'));var express=require(_0xbdce('0x4'));var router=express[_0xbdce('0x5')]();var fs_extra=require(_0xbdce('0x6'));var auth=require(_0xbdce('0x7'));var interaction=require(_0xbdce('0x8'));var config=require('../../config/environment');var controller=require('./chatWebsite.controller');router[_0xbdce('0x9')]('/',auth[_0xbdce('0xa')](),controller[_0xbdce('0xb')]);router['get'](_0xbdce('0xc'),auth[_0xbdce('0xa')](),controller['describe']);router[_0xbdce('0x9')](_0xbdce('0xd'),auth[_0xbdce('0xa')](),controller[_0xbdce('0xe')]);router[_0xbdce('0x9')](_0xbdce('0xf'),auth[_0xbdce('0xa')](),controller[_0xbdce('0x10')]);router[_0xbdce('0x9')](_0xbdce('0x11'),auth[_0xbdce('0xa')](),controller['getAnswers']);router['get'](_0xbdce('0x12'),controller[_0xbdce('0x13')]);router[_0xbdce('0x9')](_0xbdce('0x14'),controller[_0xbdce('0x15')]);router['get'](_0xbdce('0x16'),controller[_0xbdce('0x17')]);router[_0xbdce('0x9')](_0xbdce('0x18'),controller[_0xbdce('0x19')]);router[_0xbdce('0x9')]('/:id/interactions',auth[_0xbdce('0xa')](),controller['getInteractions']);router[_0xbdce('0x9')](_0xbdce('0x1a'),controller[_0xbdce('0x1b')]);router[_0xbdce('0x9')]('/:id/applications',auth['isAuthenticated'](),controller[_0xbdce('0x1c')]);router['get'](_0xbdce('0x1d'),auth['isAuthenticated'](),controller[_0xbdce('0x1e')]);router['get'](_0xbdce('0x1f'),controller[_0xbdce('0x20')]);router[_0xbdce('0x9')]('/:id/offline_messages',auth['isAuthenticated'](),controller[_0xbdce('0x21')]);router[_0xbdce('0x9')](_0xbdce('0x22'),auth[_0xbdce('0xa')](),controller[_0xbdce('0x23')]);router[_0xbdce('0x24')]('/',auth[_0xbdce('0xa')](),controller[_0xbdce('0x25')]);router['post'](_0xbdce('0xf'),auth['isAuthenticated'](),controller[_0xbdce('0x26')]);router[_0xbdce('0x24')](_0xbdce('0x11'),auth[_0xbdce('0xa')](),controller['addAnswer']);var upload=multer({'storage':multer[_0xbdce('0x27')]({'destination':function(_0x11533d,_0x1dbb1c,_0x3dac33){_0x3dac33(null,path['join'](config['root'],'server/files/images/logos/'));},'filename':function(_0x35870e,_0x4e8d55,_0x3628fa){_0x3628fa(null,util[_0xbdce('0x28')](_0xbdce('0x29'),Date[_0xbdce('0x2a')](),_0x4e8d55[_0xbdce('0x2b')]));}})});router[_0xbdce('0x24')](_0xbdce('0x12'),upload[_0xbdce('0x2c')](_0xbdce('0x2d')),controller[_0xbdce('0x2e')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x587a95,_0x2a47d6,_0x3d1233){_0x3d1233(null,path[_0xbdce('0x2f')](config[_0xbdce('0x30')],'server/files/images/avatars/'));},'filename':function(_0x28d630,_0x14dd46,_0x5d16d6){_0x5d16d6(null,util[_0xbdce('0x28')](_0xbdce('0x29'),Date[_0xbdce('0x2a')](),_0x14dd46[_0xbdce('0x2b')]));}})});router[_0xbdce('0x24')](_0xbdce('0x14'),upload[_0xbdce('0x2c')](_0xbdce('0x2d')),controller['addAvatar']);var upload=multer({'storage':multer[_0xbdce('0x27')]({'destination':function(_0x277d58,_0x364860,_0x451149){_0x451149(null,path[_0xbdce('0x2f')](config[_0xbdce('0x30')],_0xbdce('0x31')));},'filename':function(_0x2b2781,_0x5977e4,_0xaf3259){_0xaf3259(null,util[_0xbdce('0x28')]('%s-%s',Date[_0xbdce('0x2a')](),_0x5977e4[_0xbdce('0x2b')]));}})});router[_0xbdce('0x24')](_0xbdce('0x16'),upload['single'](_0xbdce('0x2d')),controller[_0xbdce('0x32')]);var upload=multer({'storage':multer[_0xbdce('0x27')]({'destination':function(_0x5445d8,_0x48fcfd,_0x356f20){_0x356f20(null,path[_0xbdce('0x2f')](config[_0xbdce('0x30')],_0xbdce('0x31')));},'filename':function(_0x571375,_0xf159d4,_0x53bbb0){_0x53bbb0(null,util[_0xbdce('0x28')]('%s-%s',Date['now'](),_0xf159d4[_0xbdce('0x2b')]));}})});router[_0xbdce('0x24')]('/:id/system_avatar',upload[_0xbdce('0x2c')](_0xbdce('0x2d')),controller[_0xbdce('0x33')]);router[_0xbdce('0x24')]('/:id/notify',controller[_0xbdce('0x34')]);const offlineUploadMulter=multer({'storage':multer[_0xbdce('0x27')]({'destination':function(_0x574f90,_0x10bd7d,_0x40acd5){const _0x8d7fcd=path['join'](config[_0xbdce('0x30')],'server/files',_0xbdce('0x35'),_0xbdce('0x36'));fs_extra[_0xbdce('0x37')](_0x8d7fcd,function(){_0x40acd5(null,_0x8d7fcd);});},'filename':function(_0x22063b,_0x4e4cf6,_0x67ba78){const _0x5ad81f=_0x4e4cf6[_0xbdce('0x2b')]['replace'](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x10b8bc=path['extname'](_0x5ad81f);const _0x55c99a=Date[_0xbdce('0x2a')]()+'-'+_0x5ad81f[_0xbdce('0x38')](_0x10b8bc,'')+_0x10b8bc;_0x67ba78(null,_0x55c99a);}})});router[_0xbdce('0x24')](_0xbdce('0x39'),offlineUploadMulter['any'](),controller[_0xbdce('0x3a')]);router[_0xbdce('0x24')](_0xbdce('0x3b'),auth[_0xbdce('0xa')](),controller[_0xbdce('0x3c')]);router[_0xbdce('0x24')]('/:id/applications',auth[_0xbdce('0xa')](),controller[_0xbdce('0x3d')]);router[_0xbdce('0x24')](_0xbdce('0x1d'),auth[_0xbdce('0xa')](),controller[_0xbdce('0x3e')]);router[_0xbdce('0x24')](_0xbdce('0x22'),auth[_0xbdce('0xa')](),controller[_0xbdce('0x3f')]);router[_0xbdce('0x40')](_0xbdce('0xd'),auth['isAuthenticated'](),controller[_0xbdce('0x41')]);router[_0xbdce('0x42')](_0xbdce('0xd'),auth[_0xbdce('0xa')](),controller['destroy']);router[_0xbdce('0x42')](_0xbdce('0xf'),auth['isAuthenticated'](),controller['removeDispositions']);router[_0xbdce('0x42')](_0xbdce('0x11'),auth[_0xbdce('0xa')](),controller['removeAnswers']);router[_0xbdce('0x42')]('/:id/users',auth['isAuthenticated'](),controller[_0xbdce('0x43')]);module[_0xbdce('0x44')]=router;
\ No newline at end of file
+var _0x28a6=['connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/describe','/:id','show','getDispositions','/:id/canned_answers','getAnswers','/:id/logo','getLogo','/:id/avatar','/:id/customer_avatar','getCustomerAvatar','/:id/system_avatar','getSystemAvatar','getInteractions','/:id/snippet','getSnippet','/:id/applications','getApplications','/:id/proactive_actions','/:id/fields','getFields','/:id/offline_messages','getOfflineMessages','/:id/users','getAgents','post','create','/:id/dispositions','addDisposition','addAnswer','diskStorage','join','root','server/files/images/logos/','format','now','originalname','file','addLogo','server/files/images/avatars/','%s-%s','addAvatar','single','addSystemAvatar','notify','server/files','attachments','offline-chat','replace','extname','any','offline','addInteraction','addProactiveActions','addAgents','put','update','delete','removeDispositions','removeAnswers','exports','multer','path'];(function(_0x358eef,_0x32e338){var _0x8ed2af=function(_0x5e26c1){while(--_0x5e26c1){_0x358eef['push'](_0x358eef['shift']());}};_0x8ed2af(++_0x32e338);}(_0x28a6,0xd3));var _0x628a=function(_0x31ced5,_0x5d5415){_0x31ced5=_0x31ced5-0x0;var _0x10d9e5=_0x28a6[_0x31ced5];return _0x10d9e5;};'use strict';var multer=require(_0x628a('0x0'));var util=require('util');var path=require(_0x628a('0x1'));var timeout=require(_0x628a('0x2'));var express=require('express');var router=express[_0x628a('0x3')]();var fs_extra=require(_0x628a('0x4'));var auth=require(_0x628a('0x5'));var interaction=require(_0x628a('0x6'));var config=require(_0x628a('0x7'));var controller=require('./chatWebsite.controller');router[_0x628a('0x8')]('/',auth[_0x628a('0x9')](),controller['index']);router[_0x628a('0x8')](_0x628a('0xa'),auth[_0x628a('0x9')](),controller['describe']);router[_0x628a('0x8')](_0x628a('0xb'),auth[_0x628a('0x9')](),controller[_0x628a('0xc')]);router['get']('/:id/dispositions',auth[_0x628a('0x9')](),controller[_0x628a('0xd')]);router['get'](_0x628a('0xe'),auth[_0x628a('0x9')](),controller[_0x628a('0xf')]);router[_0x628a('0x8')](_0x628a('0x10'),controller[_0x628a('0x11')]);router[_0x628a('0x8')](_0x628a('0x12'),controller['getAvatar']);router['get'](_0x628a('0x13'),controller[_0x628a('0x14')]);router[_0x628a('0x8')](_0x628a('0x15'),controller[_0x628a('0x16')]);router[_0x628a('0x8')]('/:id/interactions',auth[_0x628a('0x9')](),controller[_0x628a('0x17')]);router[_0x628a('0x8')](_0x628a('0x18'),controller[_0x628a('0x19')]);router[_0x628a('0x8')](_0x628a('0x1a'),auth[_0x628a('0x9')](),controller[_0x628a('0x1b')]);router['get'](_0x628a('0x1c'),auth['isAuthenticated'](),controller['getProactiveActions']);router[_0x628a('0x8')](_0x628a('0x1d'),controller[_0x628a('0x1e')]);router['get'](_0x628a('0x1f'),auth[_0x628a('0x9')](),controller[_0x628a('0x20')]);router['get'](_0x628a('0x21'),auth[_0x628a('0x9')](),controller[_0x628a('0x22')]);router[_0x628a('0x23')]('/',auth[_0x628a('0x9')](),controller[_0x628a('0x24')]);router[_0x628a('0x23')](_0x628a('0x25'),auth[_0x628a('0x9')](),controller[_0x628a('0x26')]);router[_0x628a('0x23')]('/:id/canned_answers',auth[_0x628a('0x9')](),controller[_0x628a('0x27')]);var upload=multer({'storage':multer[_0x628a('0x28')]({'destination':function(_0x44895b,_0x5cc5b5,_0x1a963a){_0x1a963a(null,path[_0x628a('0x29')](config[_0x628a('0x2a')],_0x628a('0x2b')));},'filename':function(_0x90453e,_0x5ec9f5,_0x3eb08f){_0x3eb08f(null,util[_0x628a('0x2c')]('%s-%s',Date[_0x628a('0x2d')](),_0x5ec9f5[_0x628a('0x2e')]));}})});router['post'](_0x628a('0x10'),upload['single'](_0x628a('0x2f')),controller[_0x628a('0x30')]);var upload=multer({'storage':multer[_0x628a('0x28')]({'destination':function(_0x5c4c58,_0x1a246c,_0x251cc1){_0x251cc1(null,path[_0x628a('0x29')](config[_0x628a('0x2a')],_0x628a('0x31')));},'filename':function(_0x49c42d,_0x143258,_0xaa0f0c){_0xaa0f0c(null,util['format'](_0x628a('0x32'),Date[_0x628a('0x2d')](),_0x143258[_0x628a('0x2e')]));}})});router[_0x628a('0x23')](_0x628a('0x12'),upload['single'](_0x628a('0x2f')),controller[_0x628a('0x33')]);var upload=multer({'storage':multer[_0x628a('0x28')]({'destination':function(_0x2d5858,_0x124755,_0x3ea988){_0x3ea988(null,path['join'](config['root'],'server/files/images/avatars/'));},'filename':function(_0x40587a,_0x1bca9f,_0x421dfa){_0x421dfa(null,util[_0x628a('0x2c')]('%s-%s',Date[_0x628a('0x2d')](),_0x1bca9f[_0x628a('0x2e')]));}})});router[_0x628a('0x23')](_0x628a('0x13'),upload[_0x628a('0x34')](_0x628a('0x2f')),controller['addCustomerAvatar']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0xa9222d,_0x5c5544,_0x9c90ff){_0x9c90ff(null,path['join'](config[_0x628a('0x2a')],_0x628a('0x31')));},'filename':function(_0x1d134a,_0x9ee8bc,_0x5e4a32){_0x5e4a32(null,util[_0x628a('0x2c')](_0x628a('0x32'),Date[_0x628a('0x2d')](),_0x9ee8bc[_0x628a('0x2e')]));}})});router[_0x628a('0x23')]('/:id/system_avatar',upload[_0x628a('0x34')](_0x628a('0x2f')),controller[_0x628a('0x35')]);router['post']('/:id/notify',controller[_0x628a('0x36')]);const offlineUploadMulter=multer({'storage':multer[_0x628a('0x28')]({'destination':function(_0x16d1fc,_0x406b06,_0x4c4d77){const _0x336e57=path[_0x628a('0x29')](config[_0x628a('0x2a')],_0x628a('0x37'),_0x628a('0x38'),_0x628a('0x39'));fs_extra['ensureDir'](_0x336e57,function(){_0x4c4d77(null,_0x336e57);});},'filename':function(_0xba7e13,_0x5bcf58,_0x6f33e2){const _0x123804=_0x5bcf58['originalname'][_0x628a('0x3a')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');const _0x2db184=path[_0x628a('0x3b')](_0x123804);const _0x164394=Date[_0x628a('0x2d')]()+'-'+_0x123804[_0x628a('0x3a')](_0x2db184,'')+_0x2db184;_0x6f33e2(null,_0x164394);}})});router['post']('/:id/offline',offlineUploadMulter[_0x628a('0x3c')](),controller[_0x628a('0x3d')]);router[_0x628a('0x23')]('/:id/interactions',auth[_0x628a('0x9')](),controller[_0x628a('0x3e')]);router[_0x628a('0x23')](_0x628a('0x1a'),auth['isAuthenticated'](),controller['addApplications']);router[_0x628a('0x23')](_0x628a('0x1c'),auth[_0x628a('0x9')](),controller[_0x628a('0x3f')]);router[_0x628a('0x23')](_0x628a('0x21'),auth[_0x628a('0x9')](),controller[_0x628a('0x40')]);router[_0x628a('0x41')](_0x628a('0xb'),auth[_0x628a('0x9')](),controller[_0x628a('0x42')]);router[_0x628a('0x43')](_0x628a('0xb'),auth[_0x628a('0x9')](),controller['destroy']);router['delete'](_0x628a('0x25'),auth[_0x628a('0x9')](),controller[_0x628a('0x44')]);router['delete'](_0x628a('0xe'),auth[_0x628a('0x9')](),controller[_0x628a('0x45')]);router[_0x628a('0x43')](_0x628a('0x21'),auth['isAuthenticated'](),controller['removeAgents']);module[_0x628a('0x46')]=router;
\ No newline at end of file
index 373052d..c5171ad 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7786=['exports','beaver-logger/server','../components/auth/service','Router','env','get','client-side-logger','Client-Side\x20logger\x20not\x20found!','expressEndpoint','use','isAuthenticated'];(function(_0x50ff3a,_0x69be64){var _0x23fa9f=function(_0x1e88f1){while(--_0x1e88f1){_0x50ff3a['push'](_0x50ff3a['shift']());}};_0x23fa9f(++_0x69be64);}(_0x7786,0x156));var _0x6778=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7786[_0x3dd15e];return _0x231fd0;};var beaverLogger=require(_0x6778('0x0'));var express=require('express');var auth=require(_0x6778('0x1'));var config=require('../config/environment');var router=express[_0x6778('0x2')]();var isProduction=config[_0x6778('0x3')]==='production'||![];function clientSideLogs(_0x327667,_0xbc3888,_0x4197b2){var _0x19828b=_0x327667['app'][_0x6778('0x4')](_0x6778('0x5'));if(!_0x19828b){throw new Error(_0x6778('0x6'));}return beaverLogger[_0x6778('0x7')]({'uri':'/client-logs','logger':_0x19828b,'enableCors':!isProduction})(_0x327667,_0xbc3888,_0x4197b2);}router[_0x6778('0x8')](auth[_0x6778('0x9')](),clientSideLogs);module[_0x6778('0xa')]=router;
\ No newline at end of file
+var _0xc4d3=['exports','beaver-logger/server','express','../components/auth/service','../config/environment','env','production','app','get','client-side-logger','Client-Side\x20logger\x20not\x20found!','expressEndpoint','/client-logs','isAuthenticated'];(function(_0x533d4d,_0x10b512){var _0x584b19=function(_0x32b525){while(--_0x32b525){_0x533d4d['push'](_0x533d4d['shift']());}};_0x584b19(++_0x10b512);}(_0xc4d3,0x1b3));var _0x3c4d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc4d3[_0x3dd15e];return _0x231fd0;};var beaverLogger=require(_0x3c4d('0x0'));var express=require(_0x3c4d('0x1'));var auth=require(_0x3c4d('0x2'));var config=require(_0x3c4d('0x3'));var router=express['Router']();var isProduction=config[_0x3c4d('0x4')]===_0x3c4d('0x5')||![];function clientSideLogs(_0x3dfb84,_0x502f12,_0x1b769b){var _0x38beb0=_0x3dfb84[_0x3c4d('0x6')][_0x3c4d('0x7')](_0x3c4d('0x8'));if(!_0x38beb0){throw new Error(_0x3c4d('0x9'));}return beaverLogger[_0x3c4d('0xa')]({'uri':_0x3c4d('0xb'),'logger':_0x38beb0,'enableCors':!isProduction})(_0x3dfb84,_0x502f12,_0x1b769b);}router['use'](auth[_0x3c4d('0xc')](),clientSideLogs);module[_0x3c4d('0xd')]=router;
\ No newline at end of file
index f005525..4726259 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xca21=['STRING','ENUM','Google','MicrosoftAzure','MicrosoftAzure\x20=>\x20client_id','MicrosoftAzure\x20=>\x20tenant','MicrosoftAzure\x20=>\x20client_secret','MicrosoftAzure\x20=>\x20redirect_uri','TEXT','MicrosoftAzure\x20=>\x20access_token','MicrosoftAzure\x20=>\x20refresh_token','MicrosoftAzure\x20=>\x20Dynamics365\x20=>\x20remote_uri','exports'];(function(_0x459335,_0x2e95dd){var _0x50f00b=function(_0x5ccdaf){while(--_0x5ccdaf){_0x459335['push'](_0x459335['shift']());}};_0x50f00b(++_0x2e95dd);}(_0xca21,0x110));var _0x1ca2=function(_0x319b4d,_0xb0fd0c){_0x319b4d=_0x319b4d-0x0;var _0x1168dd=_0xca21[_0x319b4d];return _0x1168dd;};'use strict';var Sequelize=require('sequelize');module[_0x1ca2('0x0')]={'name':{'type':Sequelize[_0x1ca2('0x1')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize[_0x1ca2('0x2')]('AmazonAWS',_0x1ca2('0x3'),_0x1ca2('0x4')),'allowNull':![],'validate':{'notEmpty':!![]}},'type':{'type':Sequelize['ENUM']('Outlook365','Dynamics365')},'data1':{'type':Sequelize[_0x1ca2('0x1')],'comment':_0x1ca2('0x5')},'data2':{'type':Sequelize[_0x1ca2('0x1')],'comment':_0x1ca2('0x6')},'data3':{'type':Sequelize[_0x1ca2('0x1')],'comment':_0x1ca2('0x7')},'data4':{'type':Sequelize[_0x1ca2('0x1')],'comment':_0x1ca2('0x8')},'data5':{'type':Sequelize[_0x1ca2('0x9')],'comment':_0x1ca2('0xa')},'data6':{'type':Sequelize[_0x1ca2('0x9')],'comment':_0x1ca2('0xb')},'data7':{'type':Sequelize['TEXT'],'comment':_0x1ca2('0xc')}};
\ No newline at end of file
+var _0x3879=['Google','MicrosoftAzure','Outlook365','MicrosoftAzure\x20=>\x20tenant','MicrosoftAzure\x20=>\x20client_secret','MicrosoftAzure\x20=>\x20redirect_uri','TEXT','MicrosoftAzure\x20=>\x20access_token','MicrosoftAzure\x20=>\x20refresh_token','MicrosoftAzure\x20=>\x20Dynamics365\x20=>\x20remote_uri','sequelize','exports','STRING','ENUM','AmazonAWS'];(function(_0x30d1be,_0x92eeb3){var _0x26aa17=function(_0x34b038){while(--_0x34b038){_0x30d1be['push'](_0x30d1be['shift']());}};_0x26aa17(++_0x92eeb3);}(_0x3879,0xfa));var _0x9387=function(_0x33ec7e,_0x2c62ee){_0x33ec7e=_0x33ec7e-0x0;var _0x1dac17=_0x3879[_0x33ec7e];return _0x1dac17;};'use strict';var Sequelize=require(_0x9387('0x0'));module[_0x9387('0x1')]={'name':{'type':Sequelize[_0x9387('0x2')],'allowNull':![],'validate':{'notEmpty':!![]}},'service':{'type':Sequelize[_0x9387('0x3')](_0x9387('0x4'),_0x9387('0x5'),_0x9387('0x6')),'allowNull':![],'validate':{'notEmpty':!![]}},'type':{'type':Sequelize[_0x9387('0x3')](_0x9387('0x7'),'Dynamics365')},'data1':{'type':Sequelize[_0x9387('0x2')],'comment':'MicrosoftAzure\x20=>\x20client_id'},'data2':{'type':Sequelize['STRING'],'comment':_0x9387('0x8')},'data3':{'type':Sequelize[_0x9387('0x2')],'comment':_0x9387('0x9')},'data4':{'type':Sequelize[_0x9387('0x2')],'comment':_0x9387('0xa')},'data5':{'type':Sequelize[_0x9387('0xb')],'comment':_0x9387('0xc')},'data6':{'type':Sequelize[_0x9387('0xb')],'comment':_0x9387('0xd')},'data7':{'type':Sequelize[_0x9387('0xb')],'comment':_0x9387('0xe')}};
\ No newline at end of file
index 209c880..e626032 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8a7e=['includes','join','encryptString','oauth2MicrosoftAuthorize','findOne','generateMicrosoftAuthorizationUrl','user','oauth2MicrosoftCallback','get','state','Invalid\x20state\x20parameter','parse','from','base64','toString','ascii','isValidIdToken','id_token','oauth2Claims','Unable\x20to\x20validate\x20id_token','getOauth2MicrosoftAccessToken','code','data5','access_token','refresh_token','data6','emit','microsoftAuthorization:success','Invalid\x20authentication\x20state\x20parameter','message','Authentication\x20failed\x20for\x20cloud\x20provider\x20#%s,\x20err:%s','stringify','lodash','../../components/parsers/qs','../../config/environment','../../config/logger','api','../../mysqldb','redis','localhost','socket.io-emitter','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','update','then','destroy','error','stack','send','padEnd','slice','index','CloudProvider','fieldName','type','key','model','map','name','query','keys','intersection','attributes','fields','length','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','service','MicrosoftAzure','data3','show','params','rawAttributes','find','decryptString','catch','create','body','Name\x20parameter\x20not\x20specified','Service\x20parameter\x20not\x20specified','values'];(function(_0x10fce2,_0x590d31){var _0xb1a34a=function(_0x51d0cd){while(--_0x51d0cd){_0x10fce2['push'](_0x10fce2['shift']());}};_0xb1a34a(++_0x590d31);}(_0x8a7e,0xe4));var _0xe8a7=function(_0x15732d,_0x16ea2e){_0x15732d=_0x15732d-0x0;var _0x510ad8=_0x8a7e[_0x15732d];return _0x510ad8;};'use strict';var _=require(_0xe8a7('0x0'));var Redis=require('ioredis');var qs=require(_0xe8a7('0x1'));var encryptor=require('../../components/encryptor');var config=require(_0xe8a7('0x2'));var logger=require(_0xe8a7('0x3'))(_0xe8a7('0x4'));var db=require(_0xe8a7('0x5'))['db'];var oauth=require('./cloudProvider.oauth');config['redis']=_['defaults'](config[_0xe8a7('0x6')],{'host':_0xe8a7('0x7'),'port':0x18eb});var socket=require(_0xe8a7('0x8'))(new Redis(config['redis']));var redis=new Redis(config[_0xe8a7('0x6')]);function respondWithStatusCode(_0x1a7b6b,_0x2a17ed){_0x2a17ed=_0x2a17ed||0xcc;return function(_0x4e46ec){if(_0x4e46ec){return _0x1a7b6b[_0xe8a7('0x9')](_0x2a17ed);}return _0x1a7b6b[_0xe8a7('0xa')](_0x2a17ed)[_0xe8a7('0xb')]();};}function respondWithResult(_0x138f2e,_0x759f8d){_0x759f8d=_0x759f8d||0xc8;return function(_0x516ef8){if(_0x516ef8){return _0x138f2e[_0xe8a7('0xa')](_0x759f8d)['json'](_0x516ef8);}};}function respondWithFilteredResult(_0x46cf21,_0x19f448){return function(_0x1f69ee){if(_0x1f69ee){var _0xa98fb=typeof _0x19f448[_0xe8a7('0xc')]===_0xe8a7('0xd')&&typeof _0x19f448[_0xe8a7('0xe')]==='undefined';var _0xabfd43=_0x1f69ee[_0xe8a7('0xf')];var _0x18cd0a=_0xa98fb?0x0:_0x19f448[_0xe8a7('0xc')];var _0x197677=_0xa98fb?_0x1f69ee[_0xe8a7('0xf')]:_0x19f448[_0xe8a7('0xc')]+_0x19f448[_0xe8a7('0xe')];var _0xaf1bc7;if(_0x197677>=_0xabfd43){_0x197677=_0xabfd43;_0xaf1bc7=0xc8;}else{_0xaf1bc7=0xce;}_0x46cf21['status'](_0xaf1bc7);return _0x46cf21[_0xe8a7('0x10')](_0xe8a7('0x11'),_0x18cd0a+'-'+_0x197677+'/'+_0xabfd43)[_0xe8a7('0x12')](_0x1f69ee);}return null;};}function saveUpdates(_0x482bc4){return function(_0x52baec){if(_0x52baec){return _0x52baec[_0xe8a7('0x13')](_0x482bc4)[_0xe8a7('0x14')](function(_0x2e9844){return _0x2e9844;});}return null;};}function removeEntity(_0x35ac49){return function(_0x461db6){if(_0x461db6){return _0x461db6[_0xe8a7('0x15')]()[_0xe8a7('0x14')](function(){_0x35ac49['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3d27db){return function(_0x2e5e3e){if(!_0x2e5e3e){_0x3d27db[_0xe8a7('0x9')](0x194);}return _0x2e5e3e;};}function handleError(_0x1810b1,_0x3c6a97){_0x3c6a97=_0x3c6a97||0x1f4;return function(_0x3f180c){logger[_0xe8a7('0x16')](_0x3f180c[_0xe8a7('0x17')]);if(_0x3f180c['name']){delete _0x3f180c['name'];}_0x1810b1[_0xe8a7('0xa')](_0x3c6a97)[_0xe8a7('0x18')](_0x3f180c);};}function maskClientSecret(_0x32bf1a){return _[_0xe8a7('0x19')](_0x32bf1a[_0xe8a7('0x1a')](0x0,0x3),0x14,'*');}exports[_0xe8a7('0x1b')]=function(_0x486315,_0x23ab0a){var _0x2b5fe1={},_0x471434={},_0x7adc89={'count':0x0,'rows':[]};var _0x2f1d32=_['map'](db[_0xe8a7('0x1c')]['rawAttributes'],function(_0x294e41){return{'name':_0x294e41[_0xe8a7('0x1d')],'type':_0x294e41[_0xe8a7('0x1e')][_0xe8a7('0x1f')]};});_0x471434[_0xe8a7('0x20')]=_[_0xe8a7('0x21')](_0x2f1d32,_0xe8a7('0x22'));_0x471434[_0xe8a7('0x23')]=_[_0xe8a7('0x24')](_0x486315['query']);_0x471434['filters']=_[_0xe8a7('0x25')](_0x471434['model'],_0x471434[_0xe8a7('0x23')]);_0x2b5fe1[_0xe8a7('0x26')]=_[_0xe8a7('0x25')](_0x471434[_0xe8a7('0x20')],qs[_0xe8a7('0x27')](_0x486315[_0xe8a7('0x23')][_0xe8a7('0x27')]));_0x2b5fe1[_0xe8a7('0x26')]=_0x2b5fe1[_0xe8a7('0x26')][_0xe8a7('0x28')]?_0x2b5fe1[_0xe8a7('0x26')]:_0x471434[_0xe8a7('0x20')];if(!_0x486315['query']['hasOwnProperty']('nolimit')){_0x2b5fe1[_0xe8a7('0xe')]=qs[_0xe8a7('0xe')](_0x486315['query'][_0xe8a7('0xe')]);_0x2b5fe1[_0xe8a7('0xc')]=qs[_0xe8a7('0xc')](_0x486315[_0xe8a7('0x23')][_0xe8a7('0xc')]);}_0x2b5fe1['order']=qs[_0xe8a7('0x29')](_0x486315['query']['sort']);_0x2b5fe1[_0xe8a7('0x2a')]=qs[_0xe8a7('0x2b')](_[_0xe8a7('0x2c')](_0x486315['query'],_0x471434['filters']),_0x2f1d32);if(_0x486315[_0xe8a7('0x23')][_0xe8a7('0x2d')]){_0x2b5fe1[_0xe8a7('0x2a')]=_[_0xe8a7('0x2e')](_0x2b5fe1['where'],{'$or':_[_0xe8a7('0x21')](_0x2f1d32,function(_0x4b72c9){if(_0x4b72c9[_0xe8a7('0x1e')]!==_0xe8a7('0x2f')){var _0x455457={};_0x455457[_0x4b72c9[_0xe8a7('0x22')]]={'$like':'%'+_0x486315['query'][_0xe8a7('0x2d')]+'%'};return _0x455457;}})});}_0x2b5fe1=_[_0xe8a7('0x2e')]({},_0x2b5fe1,_0x486315[_0xe8a7('0x30')]);var _0x84dd05={'where':_0x2b5fe1['where']};return db[_0xe8a7('0x1c')][_0xe8a7('0xf')](_0x84dd05)[_0xe8a7('0x14')](function(_0x3efc82){_0x7adc89['count']=_0x3efc82;if(_0x486315['query'][_0xe8a7('0x31')]){_0x2b5fe1[_0xe8a7('0x32')]=[{'all':!![]}];}return db[_0xe8a7('0x1c')][_0xe8a7('0x33')](_0x2b5fe1);})['then'](function(_0x515e21){_0x7adc89['rows']=_[_0xe8a7('0x21')](_0x515e21,function(_0x495fed){if(_0x495fed[_0xe8a7('0x34')]===_0xe8a7('0x35')){var _0x3a3e42=encryptor['decryptString'](_0x495fed[_0xe8a7('0x36')]);_0x495fed[_0xe8a7('0x36')]=maskClientSecret(_0x3a3e42);}return _0x495fed;});return _0x7adc89;})[_0xe8a7('0x14')](respondWithFilteredResult(_0x23ab0a,_0x2b5fe1))['catch'](handleError(_0x23ab0a,null));};exports[_0xe8a7('0x37')]=function(_0x5e9ddb,_0xf3ff04){var _0xd9d34e={'raw':!![],'where':{'id':_0x5e9ddb[_0xe8a7('0x38')]['id']}},_0x114cc0={};_0x114cc0[_0xe8a7('0x20')]=_['keys'](db[_0xe8a7('0x1c')][_0xe8a7('0x39')]);_0x114cc0[_0xe8a7('0x23')]=_[_0xe8a7('0x24')](_0x5e9ddb[_0xe8a7('0x23')]);_0x114cc0[_0xe8a7('0x2b')]=_[_0xe8a7('0x25')](_0x114cc0['model'],_0x114cc0[_0xe8a7('0x23')]);_0xd9d34e[_0xe8a7('0x26')]=_[_0xe8a7('0x25')](_0x114cc0[_0xe8a7('0x20')],qs[_0xe8a7('0x27')](_0x5e9ddb[_0xe8a7('0x23')]['fields']));_0xd9d34e[_0xe8a7('0x26')]=_0xd9d34e[_0xe8a7('0x26')][_0xe8a7('0x28')]?_0xd9d34e[_0xe8a7('0x26')]:_0x114cc0[_0xe8a7('0x20')];if(_0x5e9ddb['query'][_0xe8a7('0x31')]){_0xd9d34e[_0xe8a7('0x32')]=[{'all':!![]}];}_0xd9d34e=_['merge']({},_0xd9d34e,_0x5e9ddb[_0xe8a7('0x30')]);return db[_0xe8a7('0x1c')][_0xe8a7('0x3a')](_0xd9d34e)['then'](handleEntityNotFound(_0xf3ff04,null))['then'](function(_0x6ca37){if(_0x6ca37[_0xe8a7('0x34')]===_0xe8a7('0x35')){var _0x3e83ef=encryptor[_0xe8a7('0x3b')](_0x6ca37[_0xe8a7('0x36')]);_0x6ca37[_0xe8a7('0x36')]=maskClientSecret(_0x3e83ef);}return _0x6ca37;})[_0xe8a7('0x14')](respondWithResult(_0xf3ff04,null))[_0xe8a7('0x3c')](handleError(_0xf3ff04,null));};exports[_0xe8a7('0x3d')]=function(_0x27846d,_0x22712c){if(!_0x27846d[_0xe8a7('0x3e')]['name'])throw new Error(_0xe8a7('0x3f'));if(!_0x27846d[_0xe8a7('0x3e')][_0xe8a7('0x34')])throw new Error(_0xe8a7('0x40'));var _0x499a39=db[_0xe8a7('0x1c')][_0xe8a7('0x39')][_0xe8a7('0x34')][_0xe8a7('0x41')];if(!_0x499a39[_0xe8a7('0x42')](_0x27846d['body']['service']))throw new Error('Invalid\x20service\x20parameter.\x20Allowed\x20values:\x20'+_0x499a39[_0xe8a7('0x43')](',\x20'));if(_0x27846d['body'][_0xe8a7('0x34')]===_0xe8a7('0x35')&&_0x27846d[_0xe8a7('0x3e')][_0xe8a7('0x36')]){_0x27846d[_0xe8a7('0x3e')]['data3']=encryptor[_0xe8a7('0x44')](_0x27846d['body']['data3']);}return db[_0xe8a7('0x1c')][_0xe8a7('0x3d')](_0x27846d['body'],{})[_0xe8a7('0x14')](respondWithResult(_0x22712c,0xc9))['catch'](handleError(_0x22712c,null));};exports[_0xe8a7('0x13')]=function(_0x198d83,_0x44ba59){if(_0x198d83[_0xe8a7('0x3e')]['id']){delete _0x198d83[_0xe8a7('0x3e')]['id'];}return db['CloudProvider']['find']({'where':{'id':_0x198d83[_0xe8a7('0x38')]['id']}})[_0xe8a7('0x14')](handleEntityNotFound(_0x44ba59,null))['then'](function(_0x3c4ec1){if(_0x3c4ec1[_0xe8a7('0x34')]==='MicrosoftAzure'&&_0x198d83[_0xe8a7('0x3e')]['data3']){_0x198d83['body'][_0xe8a7('0x36')]=encryptor[_0xe8a7('0x44')](_0x198d83[_0xe8a7('0x3e')][_0xe8a7('0x36')]);}return _0x3c4ec1;})[_0xe8a7('0x14')](saveUpdates(_0x198d83[_0xe8a7('0x3e')],null))[_0xe8a7('0x14')](respondWithResult(_0x44ba59,null))[_0xe8a7('0x3c')](handleError(_0x44ba59,null));};exports['destroy']=function(_0x57b57f,_0x559439){return db['CloudProvider'][_0xe8a7('0x3a')]({'where':{'id':_0x57b57f[_0xe8a7('0x38')]['id']}})[_0xe8a7('0x14')](handleEntityNotFound(_0x559439,null))[_0xe8a7('0x14')](removeEntity(_0x559439,null))[_0xe8a7('0x3c')](handleError(_0x559439,null));};exports[_0xe8a7('0x45')]=function(_0xc5953a,_0x3d9e1f){return db['CloudProvider'][_0xe8a7('0x46')]({'where':{'id':_0xc5953a[_0xe8a7('0x38')]['id']},'raw':!![]})[_0xe8a7('0x14')](function(_0x3dad17){if(!_0x3dad17)return _0x3d9e1f[_0xe8a7('0x9')](0x194);return{'url':oauth[_0xe8a7('0x47')](_0x3dad17,_0xc5953a[_0xe8a7('0x48')]['id'])};})['then'](respondWithResult(_0x3d9e1f,null))[_0xe8a7('0x3c')](handleError(_0x3d9e1f,null));};exports[_0xe8a7('0x49')]=function(_0x2f229d,_0x502551){var _0x1b149f=_0x2f229d[_0xe8a7('0x3e')];var _0x356e9c;var _0x24ca61;if(_0x1b149f[_0xe8a7('0x16')])throw _0x1b149f;redis[_0xe8a7('0x4a')](_0x1b149f[_0xe8a7('0x4b')])[_0xe8a7('0x14')](function(_0x11b8c1){if(!_0x11b8c1)throw new Error(_0xe8a7('0x4c'));_0x356e9c=JSON[_0xe8a7('0x4d')](_0x11b8c1);var _0x16f679=Buffer[_0xe8a7('0x4e')](_0x1b149f[_0xe8a7('0x4b')],_0xe8a7('0x4f'))[_0xe8a7('0x50')](_0xe8a7('0x51'));_0x24ca61=JSON[_0xe8a7('0x4d')](_0x16f679);if(!oauth[_0xe8a7('0x52')](_0x1b149f[_0xe8a7('0x53')],_0x356e9c[_0xe8a7('0x54')]))throw new Error(_0xe8a7('0x55'));redis['del'](_0x1b149f['state']);return oauth[_0xe8a7('0x56')](_0x1b149f[_0xe8a7('0x57')],_0x356e9c);})['then'](function(_0x194367){_0x356e9c[_0xe8a7('0x58')]=_0x194367[_0xe8a7('0x59')];_0x356e9c['data6']=_0x194367[_0xe8a7('0x5a')];return db[_0xe8a7('0x1c')]['update']({'data5':_0x356e9c[_0xe8a7('0x58')],'data6':_0x356e9c[_0xe8a7('0x5b')]},{'where':{'id':_0x356e9c['id']}});})[_0xe8a7('0x14')](function(){oauth['startRefreshInterval'](_0x356e9c);socket[_0xe8a7('0x5c')](_0xe8a7('0x5d'),{'id':_0x24ca61['id']});return;})[_0xe8a7('0x14')](respondWithStatusCode(_0x502551,null))['catch'](function(_0x58f87d){if(_0x24ca61){socket[_0xe8a7('0x5c')]('microsoftAuthorization:error',{'id':_0x24ca61['id']});}if(!_0x356e9c){logger['error'](_0xe8a7('0x5e'),_0x58f87d);return _0x502551[_0xe8a7('0xa')](0x1f4)[_0xe8a7('0x18')](_0x58f87d[_0xe8a7('0x5f')]);}logger[_0xe8a7('0x16')](_0xe8a7('0x60'),_0x356e9c['id'],JSON[_0xe8a7('0x61')](_0x58f87d));});};
\ No newline at end of file
+var _0x1b65=['Invalid\x20authentication\x20state\x20parameter','message','stringify','ioredis','../../components/parsers/qs','../../components/encryptor','../../config/environment','api','../../mysqldb','./cloudProvider.oauth','defaults','redis','localhost','socket.io-emitter','status','end','json','offset','undefined','limit','count','Content-Range','then','destroy','sendStatus','error','stack','name','slice','index','map','CloudProvider','rawAttributes','fieldName','type','key','model','keys','filters','intersection','attributes','fields','query','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','service','MicrosoftAzure','decryptString','data3','catch','show','params','find','create','body','Name\x20parameter\x20not\x20specified','values','Invalid\x20service\x20parameter.\x20Allowed\x20values:\x20','join','encryptString','update','oauth2MicrosoftAuthorize','findOne','user','oauth2MicrosoftCallback','state','Invalid\x20state\x20parameter','parse','from','base64','toString','ascii','isValidIdToken','id_token','oauth2Claims','Unable\x20to\x20validate\x20id_token','del','getOauth2MicrosoftAccessToken','code','data5','data6','refresh_token','startRefreshInterval','emit','microsoftAuthorization:success','microsoftAuthorization:error'];(function(_0x96d8bb,_0x59e193){var _0x296ef2=function(_0x1735cc){while(--_0x1735cc){_0x96d8bb['push'](_0x96d8bb['shift']());}};_0x296ef2(++_0x59e193);}(_0x1b65,0x66));var _0x51b6=function(_0x46ad9e,_0x203184){_0x46ad9e=_0x46ad9e-0x0;var _0x5727cb=_0x1b65[_0x46ad9e];return _0x5727cb;};'use strict';var _=require('lodash');var Redis=require(_0x51b6('0x0'));var qs=require(_0x51b6('0x1'));var encryptor=require(_0x51b6('0x2'));var config=require(_0x51b6('0x3'));var logger=require('../../config/logger')(_0x51b6('0x4'));var db=require(_0x51b6('0x5'))['db'];var oauth=require(_0x51b6('0x6'));config['redis']=_[_0x51b6('0x7')](config[_0x51b6('0x8')],{'host':_0x51b6('0x9'),'port':0x18eb});var socket=require(_0x51b6('0xa'))(new Redis(config[_0x51b6('0x8')]));var redis=new Redis(config[_0x51b6('0x8')]);function respondWithStatusCode(_0x450285,_0x2fad95){_0x2fad95=_0x2fad95||0xcc;return function(_0x118054){if(_0x118054){return _0x450285['sendStatus'](_0x2fad95);}return _0x450285[_0x51b6('0xb')](_0x2fad95)[_0x51b6('0xc')]();};}function respondWithResult(_0x4144ce,_0x4dd8a9){_0x4dd8a9=_0x4dd8a9||0xc8;return function(_0x2d5c35){if(_0x2d5c35){return _0x4144ce[_0x51b6('0xb')](_0x4dd8a9)[_0x51b6('0xd')](_0x2d5c35);}};}function respondWithFilteredResult(_0x35e1d0,_0x54917f){return function(_0x233556){if(_0x233556){var _0x5a448b=typeof _0x54917f[_0x51b6('0xe')]===_0x51b6('0xf')&&typeof _0x54917f[_0x51b6('0x10')]==='undefined';var _0x38ba32=_0x233556[_0x51b6('0x11')];var _0xd6eec2=_0x5a448b?0x0:_0x54917f['offset'];var _0x117cbd=_0x5a448b?_0x233556[_0x51b6('0x11')]:_0x54917f[_0x51b6('0xe')]+_0x54917f[_0x51b6('0x10')];var _0x1f7c48;if(_0x117cbd>=_0x38ba32){_0x117cbd=_0x38ba32;_0x1f7c48=0xc8;}else{_0x1f7c48=0xce;}_0x35e1d0['status'](_0x1f7c48);return _0x35e1d0['set'](_0x51b6('0x12'),_0xd6eec2+'-'+_0x117cbd+'/'+_0x38ba32)['json'](_0x233556);}return null;};}function saveUpdates(_0x3f22ec){return function(_0x5107be){if(_0x5107be){return _0x5107be['update'](_0x3f22ec)[_0x51b6('0x13')](function(_0x8461da){return _0x8461da;});}return null;};}function removeEntity(_0x322975){return function(_0x33b6ed){if(_0x33b6ed){return _0x33b6ed[_0x51b6('0x14')]()[_0x51b6('0x13')](function(){_0x322975[_0x51b6('0xb')](0xcc)['end']();});}};}function handleEntityNotFound(_0x16d0bd){return function(_0x383f8f){if(!_0x383f8f){_0x16d0bd[_0x51b6('0x15')](0x194);}return _0x383f8f;};}function handleError(_0x4e6a6d,_0x9c21c1){_0x9c21c1=_0x9c21c1||0x1f4;return function(_0x4c8616){logger[_0x51b6('0x16')](_0x4c8616[_0x51b6('0x17')]);if(_0x4c8616[_0x51b6('0x18')]){delete _0x4c8616[_0x51b6('0x18')];}_0x4e6a6d['status'](_0x9c21c1)['send'](_0x4c8616);};}function maskClientSecret(_0x316afe){return _['padEnd'](_0x316afe[_0x51b6('0x19')](0x0,0x3),0x14,'*');}exports[_0x51b6('0x1a')]=function(_0x4ad645,_0x36ad42){var _0x449352={},_0x1b9310={},_0x2e455e={'count':0x0,'rows':[]};var _0x4f96e4=_[_0x51b6('0x1b')](db[_0x51b6('0x1c')][_0x51b6('0x1d')],function(_0x3c523a){return{'name':_0x3c523a[_0x51b6('0x1e')],'type':_0x3c523a[_0x51b6('0x1f')][_0x51b6('0x20')]};});_0x1b9310[_0x51b6('0x21')]=_[_0x51b6('0x1b')](_0x4f96e4,_0x51b6('0x18'));_0x1b9310['query']=_[_0x51b6('0x22')](_0x4ad645['query']);_0x1b9310[_0x51b6('0x23')]=_[_0x51b6('0x24')](_0x1b9310[_0x51b6('0x21')],_0x1b9310['query']);_0x449352[_0x51b6('0x25')]=_[_0x51b6('0x24')](_0x1b9310[_0x51b6('0x21')],qs[_0x51b6('0x26')](_0x4ad645[_0x51b6('0x27')]['fields']));_0x449352[_0x51b6('0x25')]=_0x449352[_0x51b6('0x25')][_0x51b6('0x28')]?_0x449352[_0x51b6('0x25')]:_0x1b9310[_0x51b6('0x21')];if(!_0x4ad645[_0x51b6('0x27')][_0x51b6('0x29')](_0x51b6('0x2a'))){_0x449352[_0x51b6('0x10')]=qs[_0x51b6('0x10')](_0x4ad645[_0x51b6('0x27')][_0x51b6('0x10')]);_0x449352[_0x51b6('0xe')]=qs[_0x51b6('0xe')](_0x4ad645[_0x51b6('0x27')][_0x51b6('0xe')]);}_0x449352[_0x51b6('0x2b')]=qs[_0x51b6('0x2c')](_0x4ad645[_0x51b6('0x27')][_0x51b6('0x2c')]);_0x449352[_0x51b6('0x2d')]=qs[_0x51b6('0x23')](_[_0x51b6('0x2e')](_0x4ad645['query'],_0x1b9310[_0x51b6('0x23')]),_0x4f96e4);if(_0x4ad645[_0x51b6('0x27')][_0x51b6('0x2f')]){_0x449352['where']=_[_0x51b6('0x30')](_0x449352[_0x51b6('0x2d')],{'$or':_[_0x51b6('0x1b')](_0x4f96e4,function(_0x54f82e){if(_0x54f82e[_0x51b6('0x1f')]!==_0x51b6('0x31')){var _0x5e3424={};_0x5e3424[_0x54f82e[_0x51b6('0x18')]]={'$like':'%'+_0x4ad645[_0x51b6('0x27')]['filter']+'%'};return _0x5e3424;}})});}_0x449352=_[_0x51b6('0x30')]({},_0x449352,_0x4ad645[_0x51b6('0x32')]);var _0x10198e={'where':_0x449352[_0x51b6('0x2d')]};return db['CloudProvider'][_0x51b6('0x11')](_0x10198e)['then'](function(_0x121c06){_0x2e455e[_0x51b6('0x11')]=_0x121c06;if(_0x4ad645[_0x51b6('0x27')][_0x51b6('0x33')]){_0x449352[_0x51b6('0x34')]=[{'all':!![]}];}return db[_0x51b6('0x1c')][_0x51b6('0x35')](_0x449352);})[_0x51b6('0x13')](function(_0x4e3bef){_0x2e455e[_0x51b6('0x36')]=_['map'](_0x4e3bef,function(_0x2de5ca){if(_0x2de5ca[_0x51b6('0x37')]===_0x51b6('0x38')){var _0xd177b8=encryptor[_0x51b6('0x39')](_0x2de5ca[_0x51b6('0x3a')]);_0x2de5ca[_0x51b6('0x3a')]=maskClientSecret(_0xd177b8);}return _0x2de5ca;});return _0x2e455e;})[_0x51b6('0x13')](respondWithFilteredResult(_0x36ad42,_0x449352))[_0x51b6('0x3b')](handleError(_0x36ad42,null));};exports[_0x51b6('0x3c')]=function(_0x3a3837,_0x416dcf){var _0x30c7ca={'raw':!![],'where':{'id':_0x3a3837[_0x51b6('0x3d')]['id']}},_0x4d22ef={};_0x4d22ef[_0x51b6('0x21')]=_[_0x51b6('0x22')](db['CloudProvider']['rawAttributes']);_0x4d22ef[_0x51b6('0x27')]=_[_0x51b6('0x22')](_0x3a3837['query']);_0x4d22ef[_0x51b6('0x23')]=_[_0x51b6('0x24')](_0x4d22ef[_0x51b6('0x21')],_0x4d22ef[_0x51b6('0x27')]);_0x30c7ca[_0x51b6('0x25')]=_[_0x51b6('0x24')](_0x4d22ef[_0x51b6('0x21')],qs[_0x51b6('0x26')](_0x3a3837[_0x51b6('0x27')][_0x51b6('0x26')]));_0x30c7ca[_0x51b6('0x25')]=_0x30c7ca['attributes'][_0x51b6('0x28')]?_0x30c7ca[_0x51b6('0x25')]:_0x4d22ef[_0x51b6('0x21')];if(_0x3a3837['query'][_0x51b6('0x33')]){_0x30c7ca['include']=[{'all':!![]}];}_0x30c7ca=_['merge']({},_0x30c7ca,_0x3a3837['options']);return db['CloudProvider'][_0x51b6('0x3e')](_0x30c7ca)[_0x51b6('0x13')](handleEntityNotFound(_0x416dcf,null))[_0x51b6('0x13')](function(_0x9b1236){if(_0x9b1236['service']===_0x51b6('0x38')){var _0x460206=encryptor[_0x51b6('0x39')](_0x9b1236['data3']);_0x9b1236[_0x51b6('0x3a')]=maskClientSecret(_0x460206);}return _0x9b1236;})[_0x51b6('0x13')](respondWithResult(_0x416dcf,null))[_0x51b6('0x3b')](handleError(_0x416dcf,null));};exports[_0x51b6('0x3f')]=function(_0xbd2775,_0x38ec68){if(!_0xbd2775[_0x51b6('0x40')][_0x51b6('0x18')])throw new Error(_0x51b6('0x41'));if(!_0xbd2775[_0x51b6('0x40')]['service'])throw new Error('Service\x20parameter\x20not\x20specified');var _0x4c35ec=db[_0x51b6('0x1c')][_0x51b6('0x1d')][_0x51b6('0x37')][_0x51b6('0x42')];if(!_0x4c35ec['includes'](_0xbd2775[_0x51b6('0x40')][_0x51b6('0x37')]))throw new Error(_0x51b6('0x43')+_0x4c35ec[_0x51b6('0x44')](',\x20'));if(_0xbd2775[_0x51b6('0x40')][_0x51b6('0x37')]===_0x51b6('0x38')&&_0xbd2775[_0x51b6('0x40')][_0x51b6('0x3a')]){_0xbd2775[_0x51b6('0x40')][_0x51b6('0x3a')]=encryptor[_0x51b6('0x45')](_0xbd2775[_0x51b6('0x40')][_0x51b6('0x3a')]);}return db[_0x51b6('0x1c')]['create'](_0xbd2775['body'],{})[_0x51b6('0x13')](respondWithResult(_0x38ec68,0xc9))['catch'](handleError(_0x38ec68,null));};exports[_0x51b6('0x46')]=function(_0x21d4ad,_0x35d9bf){if(_0x21d4ad[_0x51b6('0x40')]['id']){delete _0x21d4ad[_0x51b6('0x40')]['id'];}return db[_0x51b6('0x1c')]['find']({'where':{'id':_0x21d4ad['params']['id']}})['then'](handleEntityNotFound(_0x35d9bf,null))['then'](function(_0x50cce1){if(_0x50cce1['service']===_0x51b6('0x38')&&_0x21d4ad[_0x51b6('0x40')][_0x51b6('0x3a')]){_0x21d4ad[_0x51b6('0x40')][_0x51b6('0x3a')]=encryptor[_0x51b6('0x45')](_0x21d4ad[_0x51b6('0x40')]['data3']);}return _0x50cce1;})[_0x51b6('0x13')](saveUpdates(_0x21d4ad['body'],null))[_0x51b6('0x13')](respondWithResult(_0x35d9bf,null))[_0x51b6('0x3b')](handleError(_0x35d9bf,null));};exports['destroy']=function(_0x58e5c9,_0x9f5e18){return db['CloudProvider'][_0x51b6('0x3e')]({'where':{'id':_0x58e5c9['params']['id']}})[_0x51b6('0x13')](handleEntityNotFound(_0x9f5e18,null))[_0x51b6('0x13')](removeEntity(_0x9f5e18,null))['catch'](handleError(_0x9f5e18,null));};exports[_0x51b6('0x47')]=function(_0xba466a,_0x94cffa){return db[_0x51b6('0x1c')][_0x51b6('0x48')]({'where':{'id':_0xba466a['params']['id']},'raw':!![]})[_0x51b6('0x13')](function(_0x3715bf){if(!_0x3715bf)return _0x94cffa[_0x51b6('0x15')](0x194);return{'url':oauth['generateMicrosoftAuthorizationUrl'](_0x3715bf,_0xba466a[_0x51b6('0x49')]['id'])};})['then'](respondWithResult(_0x94cffa,null))[_0x51b6('0x3b')](handleError(_0x94cffa,null));};exports[_0x51b6('0x4a')]=function(_0x5f4dbb,_0x45bfe9){var _0x5e22e4=_0x5f4dbb[_0x51b6('0x40')];var _0xcdfa57;var _0x47075b;if(_0x5e22e4[_0x51b6('0x16')])throw _0x5e22e4;redis['get'](_0x5e22e4[_0x51b6('0x4b')])[_0x51b6('0x13')](function(_0x383af2){if(!_0x383af2)throw new Error(_0x51b6('0x4c'));_0xcdfa57=JSON[_0x51b6('0x4d')](_0x383af2);var _0x29eb97=Buffer[_0x51b6('0x4e')](_0x5e22e4[_0x51b6('0x4b')],_0x51b6('0x4f'))[_0x51b6('0x50')](_0x51b6('0x51'));_0x47075b=JSON['parse'](_0x29eb97);if(!oauth[_0x51b6('0x52')](_0x5e22e4[_0x51b6('0x53')],_0xcdfa57[_0x51b6('0x54')]))throw new Error(_0x51b6('0x55'));redis[_0x51b6('0x56')](_0x5e22e4['state']);return oauth[_0x51b6('0x57')](_0x5e22e4[_0x51b6('0x58')],_0xcdfa57);})[_0x51b6('0x13')](function(_0x548ada){_0xcdfa57[_0x51b6('0x59')]=_0x548ada['access_token'];_0xcdfa57[_0x51b6('0x5a')]=_0x548ada[_0x51b6('0x5b')];return db['CloudProvider'][_0x51b6('0x46')]({'data5':_0xcdfa57[_0x51b6('0x59')],'data6':_0xcdfa57['data6']},{'where':{'id':_0xcdfa57['id']}});})['then'](function(){oauth[_0x51b6('0x5c')](_0xcdfa57);socket[_0x51b6('0x5d')](_0x51b6('0x5e'),{'id':_0x47075b['id']});return;})[_0x51b6('0x13')](respondWithStatusCode(_0x45bfe9,null))[_0x51b6('0x3b')](function(_0x5456ea){if(_0x47075b){socket[_0x51b6('0x5d')](_0x51b6('0x5f'),{'id':_0x47075b['id']});}if(!_0xcdfa57){logger[_0x51b6('0x16')](_0x51b6('0x60'),_0x5456ea);return _0x45bfe9[_0x51b6('0xb')](0x1f4)['send'](_0x5456ea[_0x51b6('0x61')]);}logger[_0x51b6('0x16')]('Authentication\x20failed\x20for\x20cloud\x20provider\x20#%s,\x20err:%s',_0xcdfa57['id'],JSON[_0x51b6('0x62')](_0x5456ea));});};
\ No newline at end of file
index e188ca5..4d2b4cd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfe0f=['request-promise','path','rimraf','exports','define','CloudProvider','cloud_providers','lodash','util','../../config/logger','api','bluebird'];(function(_0x4a058f,_0x2a556e){var _0x20a69e=function(_0x43fd6d){while(--_0x43fd6d){_0x4a058f['push'](_0x4a058f['shift']());}};_0x20a69e(++_0x2a556e);}(_0xfe0f,0x73));var _0xffe0=function(_0x393572,_0x29dfad){_0x393572=_0x393572-0x0;var _0x147e07=_0xfe0f[_0x393572];return _0x147e07;};'use strict';var _=require(_0xffe0('0x0'));var util=require(_0xffe0('0x1'));var logger=require(_0xffe0('0x2'))(_0xffe0('0x3'));var moment=require('moment');var BPromise=require(_0xffe0('0x4'));var rp=require(_0xffe0('0x5'));var fs=require('fs');var path=require(_0xffe0('0x6'));var rimraf=require(_0xffe0('0x7'));var config=require('../../config/environment');var attributes=require('./cloudProvider.attributes');module[_0xffe0('0x8')]=function(_0x4d5c1d,_0x34dda2){return _0x4d5c1d[_0xffe0('0x9')](_0xffe0('0xa'),attributes,{'tableName':_0xffe0('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x00ad=['moment','bluebird','rimraf','../../config/environment','./cloudProvider.attributes','exports','define','CloudProvider','cloud_providers','lodash','util','api'];(function(_0x55eb57,_0x1011e2){var _0x55ca29=function(_0xad5a1d){while(--_0xad5a1d){_0x55eb57['push'](_0x55eb57['shift']());}};_0x55ca29(++_0x1011e2);}(_0x00ad,0x105));var _0xd00a=function(_0x311c35,_0x534915){_0x311c35=_0x311c35-0x0;var _0x5cc50c=_0x00ad[_0x311c35];return _0x5cc50c;};'use strict';var _=require(_0xd00a('0x0'));var util=require(_0xd00a('0x1'));var logger=require('../../config/logger')(_0xd00a('0x2'));var moment=require(_0xd00a('0x3'));var BPromise=require(_0xd00a('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xd00a('0x5'));var config=require(_0xd00a('0x6'));var attributes=require(_0xd00a('0x7'));module[_0xd00a('0x8')]=function(_0x5a18ed,_0x238601){return _0x5a18ed[_0xd00a('0x9')](_0xd00a('0xa'),attributes,{'tableName':_0xd00a('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 3b73183..23d6a2f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa8ec=['map','type','Dynamics365','push','/.default','join','replace','data2','id_token','from','stringify','toString','randomBytes','hex','client_id','data1','response_type','data4','scope','state','nonce','prompt','key','set','iss','aud','audience','isAfter','unix','exp','resolve','findOne','then','data3','POST','{TENANT_ID}','data5','access_token','data6','refresh_token','CloudProvider','update','catch','authorization_code','decryptString','intervals','bind','findAll','all','inspect','error','[CLOUD_PROVIDER]\x20Error\x20while\x20refreshing\x20the\x20tokens\x20after\x20service\x20restart\x20error:%s','exports','lodash','crypto','jsonwebtoken','moment','ioredis','request-promise','../../components/encryptor','redis','defaults','localhost','https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0','profile','email','offline_access','https://outlook.office365.com/IMAP.AccessAsUser.All','https://outlook.office.com/POP.AccessAsUser.All','https://outlook.office.com/SMTP.Send','openid','/authorize','/token'];(function(_0x26fa43,_0x30a86c){var _0x81ca8d=function(_0x65bfd2){while(--_0x65bfd2){_0x26fa43['push'](_0x26fa43['shift']());}};_0x81ca8d(++_0x30a86c);}(_0xa8ec,0xc7));var _0xca8e=function(_0x263a74,_0xc31414){_0x263a74=_0x263a74-0x0;var _0x2aa86c=_0xa8ec[_0x263a74];return _0x2aa86c;};'use strict';var _=require(_0xca8e('0x0'));var crypto=require(_0xca8e('0x1'));var jwt=require(_0xca8e('0x2'));var moment=require(_0xca8e('0x3'));var Redis=require(_0xca8e('0x4'));var rp=require(_0xca8e('0x5'));var util=require('util');var encryptor=require(_0xca8e('0x6'));var config=require('../../config/environment');var logger=require('../../config/logger')('api');var schedule=require('../../config/schedule/cloud-provider');var db=require('../../mysqldb')['db'];config[_0xca8e('0x7')]=_[_0xca8e('0x8')](config[_0xca8e('0x7')],{'host':_0xca8e('0x9'),'port':0x18eb});var redis=new Redis(config['redis']);var MICROSOFT_AUTH_URL=_0xca8e('0xa');var AZURE_AUTH_SCOPES={'Outlook365':['openid',_0xca8e('0xb'),_0xca8e('0xc'),_0xca8e('0xd'),_0xca8e('0xe'),_0xca8e('0xf'),_0xca8e('0x10')],'Dynamics365':[_0xca8e('0x11'),_0xca8e('0xd')]};var MICROSOFT_AUTH_ENDPOINT=_0xca8e('0x12');var MICROSOFT_TOKEN_ENDPOINT=_0xca8e('0x13');var OAUTH_REFRESH_INTERVAL=0xfa;function getAuthorizationScopes(_0x1c27a7){var _0x3ad394=_[_0xca8e('0x14')](AZURE_AUTH_SCOPES[_0x1c27a7[_0xca8e('0x15')]]);if(_0x1c27a7[_0xca8e('0x15')]===_0xca8e('0x16'))_0x3ad394[_0xca8e('0x17')](_0x1c27a7['data7']+_0xca8e('0x18'));return _0x3ad394[_0xca8e('0x19')]('\x20');}function getAccessTokenScope(_0x47184b){if(_0x47184b[_0xca8e('0x15')]==='Outlook365')return'https://outlook.office365.com/IMAP.AccessAsUser.All';if(_0x47184b[_0xca8e('0x15')]===_0xca8e('0x16'))return _0x47184b['data7']+'/.default';}function generateMicrosoftAuthorizationUrl(_0x52068a,_0x3cebef){var _0x5adcce=MICROSOFT_AUTH_URL[_0xca8e('0x1a')]('{TENANT_ID}',_0x52068a[_0xca8e('0x1b')]);var _0x52a1d7=['code',_0xca8e('0x1c')];var _0x39f073=Buffer[_0xca8e('0x1d')](JSON[_0xca8e('0x1e')]({'id':_0x3cebef}))[_0xca8e('0x1f')]('base64');var _0x546ca1=crypto[_0xca8e('0x20')](0x10)['toString'](_0xca8e('0x21'));var _0xbba71b=getAuthorizationScopes(_0x52068a);var _0x48c817=[{'key':_0xca8e('0x22'),'value':_0x52068a[_0xca8e('0x23')]},{'key':_0xca8e('0x24'),'value':encodeURIComponent(_0x52a1d7[_0xca8e('0x19')]('\x20'))},{'key':'redirect_uri','value':_0x52068a[_0xca8e('0x25')]},{'key':'response_mode','value':'form_post'},{'key':_0xca8e('0x26'),'value':encodeURIComponent(_0xbba71b)},{'key':_0xca8e('0x27'),'value':_0x39f073},{'key':_0xca8e('0x28'),'value':_0x546ca1},{'key':_0xca8e('0x29'),'value':'login'}];var _0x597bf8=_0x5adcce+MICROSOFT_AUTH_ENDPOINT+'?'+_[_0xca8e('0x14')](_0x48c817,function(_0x53fa94){return _0x53fa94[_0xca8e('0x2a')]+'='+_0x53fa94['value'];})[_0xca8e('0x19')]('&');_0x52068a['oauth2Claims']={'issuer':_0x5adcce[_0xca8e('0x1a')]('oauth2/',''),'audience':_0x52068a[_0xca8e('0x23')],'state':_0x39f073,'nonce':_0x546ca1};redis[_0xca8e('0x2b')](_0x39f073,JSON['stringify'](_0x52068a));return _0x597bf8;}function isValidIdToken(_0x274752,_0x2d3ad9){try{var _0x978b1=jwt['decode'](_0x274752,{'complete':!![]});var _0x2df582=_0x978b1['payload'];if(_0x2df582[_0xca8e('0x2c')]!==_0x2d3ad9['issuer'])return![];if(_0x2df582[_0xca8e('0x2d')]!==_0x2d3ad9[_0xca8e('0x2e')])return![];if(_0x2df582[_0xca8e('0x28')]!==_0x2d3ad9[_0xca8e('0x28')])return![];if(moment()[_0xca8e('0x2f')](moment[_0xca8e('0x30')](_0x2df582[_0xca8e('0x31')])))return![];return!![];}catch(_0x49c103){throw _0x49c103;}}function refreshOauth2MicrosoftAccessToken(_0x2344ce){return Promise[_0xca8e('0x32')]()['then'](function(){if(_0x2344ce['data3'])return _0x2344ce;return db['CloudProvider'][_0xca8e('0x33')]({'where':{'id':_0x2344ce['id']},'raw':!![]});})[_0xca8e('0x34')](function(_0x183cba){var _0x227538={'grant_type':'refresh_token','refresh_token':_0x183cba['data6'],'scope':getAccessTokenScope(_0x183cba),'redirect_uri':_0x183cba[_0xca8e('0x25')],'client_id':_0x183cba[_0xca8e('0x23')],'client_secret':encryptor['decryptString'](_0x183cba[_0xca8e('0x35')])};var _0x4d8c1b={'method':_0xca8e('0x36'),'uri':MICROSOFT_AUTH_URL[_0xca8e('0x1a')](_0xca8e('0x37'),_0x183cba[_0xca8e('0x1b')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x227538,'json':!![]};return rp(_0x4d8c1b);})[_0xca8e('0x34')](function(_0x5b883d){_0x2344ce[_0xca8e('0x38')]=_0x5b883d[_0xca8e('0x39')];_0x2344ce[_0xca8e('0x3a')]=_0x5b883d[_0xca8e('0x3b')];return db[_0xca8e('0x3c')][_0xca8e('0x3d')]({'data5':_0x2344ce[_0xca8e('0x38')],'data6':_0x2344ce[_0xca8e('0x3a')]},{'where':{'id':_0x2344ce['id']}});})[_0xca8e('0x34')](function(){return _0x2344ce;})[_0xca8e('0x3e')](function(_0x553468){logger['error']('Failed\x20to\x20refresh\x20access\x20token\x20for\x20cloud\x20provider\x20#%s,\x20-\x20err:%s',_0x2344ce['id'],_0x553468);});}function getOauth2MicrosoftAccessToken(_0x1c69ed,_0x36a22f){var _0x3851ad={'grant_type':_0xca8e('0x3f'),'code':_0x1c69ed,'scope':getAccessTokenScope(_0x36a22f),'redirect_uri':_0x36a22f[_0xca8e('0x25')],'client_id':_0x36a22f[_0xca8e('0x23')],'client_secret':encryptor[_0xca8e('0x40')](_0x36a22f[_0xca8e('0x35')])};var _0x4515e9={'method':'POST','uri':MICROSOFT_AUTH_URL['replace']('{TENANT_ID}',_0x36a22f[_0xca8e('0x1b')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x3851ad,'json':!![]};return rp(_0x4515e9);}function startRefreshInterval(_0x171560){var _0x253044=schedule[_0xca8e('0x41')];if(_0x253044[_0x171560['id']])clearInterval(_0x253044[_0x171560['id']]);_0x253044[_0x171560['id']]=setInterval(refreshOauth2MicrosoftAccessToken[_0xca8e('0x42')](this,{'id':_0x171560['id']}),OAUTH_REFRESH_INTERVAL*0x3e8);schedule[_0xca8e('0x41')]=_0x253044;}function startAllRefreshIntervals(){return db[_0xca8e('0x3c')][_0xca8e('0x43')]({'where':{'data6':{'$ne':null}},'raw':!![]})[_0xca8e('0x34')](function(_0x2f07c0){var _0x3a0928=_0x2f07c0[_0xca8e('0x14')](function(_0x1d835a){return refreshOauth2MicrosoftAccessToken(_0x1d835a)[_0xca8e('0x34')](function(_0x8d49d0){startRefreshInterval(_0x8d49d0);});});return Promise[_0xca8e('0x44')](_0x3a0928);})['catch'](function(_0x8a77df){var _0x1f24d7=_0x8a77df?util[_0xca8e('0x45')](_0x8a77df,{'showHidden':![],'depth':null}):'';logger[_0xca8e('0x46')](_0xca8e('0x47'),_0x1f24d7);});}module[_0xca8e('0x48')]={'generateMicrosoftAuthorizationUrl':generateMicrosoftAuthorizationUrl,'getOauth2MicrosoftAccessToken':getOauth2MicrosoftAccessToken,'isValidIdToken':isValidIdToken,'startAllRefreshIntervals':startAllRefreshIntervals,'refreshOauth2MicrosoftAccessToken':refreshOauth2MicrosoftAccessToken,'startRefreshInterval':startRefreshInterval};
\ No newline at end of file
+var _0x5367=['../../mysqldb','redis','defaults','https://login.microsoftonline.com/{TENANT_ID}/oauth2/v2.0','openid','profile','email','https://outlook.office.com/POP.AccessAsUser.All','offline_access','/authorize','map','type','Dynamics365','data7','/.default','join','Outlook365','https://outlook.office365.com/IMAP.AccessAsUser.All','replace','{TENANT_ID}','data2','code','id_token','stringify','toString','base64','randomBytes','data1','response_type','redirect_uri','data4','response_mode','form_post','scope','state','nonce','prompt','login','key','value','oauth2Claims','oauth2/','set','payload','issuer','aud','audience','isAfter','unix','exp','resolve','then','data3','refresh_token','data6','decryptString','POST','data5','access_token','CloudProvider','catch','error','Failed\x20to\x20refresh\x20access\x20token\x20for\x20cloud\x20provider\x20#%s,\x20-\x20err:%s','authorization_code','intervals','bind','all','inspect','[CLOUD_PROVIDER]\x20Error\x20while\x20refreshing\x20the\x20tokens\x20after\x20service\x20restart\x20error:%s','exports','lodash','crypto','jsonwebtoken','util','../../components/encryptor','../../config/environment','api'];(function(_0x25e7cb,_0x3579b7){var _0x375d92=function(_0xe8cf3b){while(--_0xe8cf3b){_0x25e7cb['push'](_0x25e7cb['shift']());}};_0x375d92(++_0x3579b7);}(_0x5367,0xe0));var _0x7536=function(_0x4d1bee,_0xc46ad5){_0x4d1bee=_0x4d1bee-0x0;var _0x262dfc=_0x5367[_0x4d1bee];return _0x262dfc;};'use strict';var _=require(_0x7536('0x0'));var crypto=require(_0x7536('0x1'));var jwt=require(_0x7536('0x2'));var moment=require('moment');var Redis=require('ioredis');var rp=require('request-promise');var util=require(_0x7536('0x3'));var encryptor=require(_0x7536('0x4'));var config=require(_0x7536('0x5'));var logger=require('../../config/logger')(_0x7536('0x6'));var schedule=require('../../config/schedule/cloud-provider');var db=require(_0x7536('0x7'))['db'];config[_0x7536('0x8')]=_[_0x7536('0x9')](config[_0x7536('0x8')],{'host':'localhost','port':0x18eb});var redis=new Redis(config[_0x7536('0x8')]);var MICROSOFT_AUTH_URL=_0x7536('0xa');var AZURE_AUTH_SCOPES={'Outlook365':[_0x7536('0xb'),_0x7536('0xc'),_0x7536('0xd'),'offline_access','https://outlook.office365.com/IMAP.AccessAsUser.All',_0x7536('0xe'),'https://outlook.office.com/SMTP.Send'],'Dynamics365':['openid',_0x7536('0xf')]};var MICROSOFT_AUTH_ENDPOINT=_0x7536('0x10');var MICROSOFT_TOKEN_ENDPOINT='/token';var OAUTH_REFRESH_INTERVAL=0xfa;function getAuthorizationScopes(_0x140c4a){var _0x455863=_[_0x7536('0x11')](AZURE_AUTH_SCOPES[_0x140c4a[_0x7536('0x12')]]);if(_0x140c4a['type']===_0x7536('0x13'))_0x455863['push'](_0x140c4a[_0x7536('0x14')]+_0x7536('0x15'));return _0x455863[_0x7536('0x16')]('\x20');}function getAccessTokenScope(_0x5ab38d){if(_0x5ab38d[_0x7536('0x12')]===_0x7536('0x17'))return _0x7536('0x18');if(_0x5ab38d[_0x7536('0x12')]===_0x7536('0x13'))return _0x5ab38d[_0x7536('0x14')]+_0x7536('0x15');}function generateMicrosoftAuthorizationUrl(_0x18a3fe,_0x3880cd){var _0x18b2b6=MICROSOFT_AUTH_URL[_0x7536('0x19')](_0x7536('0x1a'),_0x18a3fe[_0x7536('0x1b')]);var _0x360159=[_0x7536('0x1c'),_0x7536('0x1d')];var _0x178111=Buffer['from'](JSON[_0x7536('0x1e')]({'id':_0x3880cd}))[_0x7536('0x1f')](_0x7536('0x20'));var _0xf74e14=crypto[_0x7536('0x21')](0x10)[_0x7536('0x1f')]('hex');var _0x4953fd=getAuthorizationScopes(_0x18a3fe);var _0x5857df=[{'key':'client_id','value':_0x18a3fe[_0x7536('0x22')]},{'key':_0x7536('0x23'),'value':encodeURIComponent(_0x360159[_0x7536('0x16')]('\x20'))},{'key':_0x7536('0x24'),'value':_0x18a3fe[_0x7536('0x25')]},{'key':_0x7536('0x26'),'value':_0x7536('0x27')},{'key':_0x7536('0x28'),'value':encodeURIComponent(_0x4953fd)},{'key':_0x7536('0x29'),'value':_0x178111},{'key':_0x7536('0x2a'),'value':_0xf74e14},{'key':_0x7536('0x2b'),'value':_0x7536('0x2c')}];var _0x267108=_0x18b2b6+MICROSOFT_AUTH_ENDPOINT+'?'+_['map'](_0x5857df,function(_0x45f87d){return _0x45f87d[_0x7536('0x2d')]+'='+_0x45f87d[_0x7536('0x2e')];})['join']('&');_0x18a3fe[_0x7536('0x2f')]={'issuer':_0x18b2b6['replace'](_0x7536('0x30'),''),'audience':_0x18a3fe[_0x7536('0x22')],'state':_0x178111,'nonce':_0xf74e14};redis[_0x7536('0x31')](_0x178111,JSON['stringify'](_0x18a3fe));return _0x267108;}function isValidIdToken(_0x576f6e,_0x2e0d33){try{var _0x4677e5=jwt['decode'](_0x576f6e,{'complete':!![]});var _0x4981a2=_0x4677e5[_0x7536('0x32')];if(_0x4981a2['iss']!==_0x2e0d33[_0x7536('0x33')])return![];if(_0x4981a2[_0x7536('0x34')]!==_0x2e0d33[_0x7536('0x35')])return![];if(_0x4981a2[_0x7536('0x2a')]!==_0x2e0d33[_0x7536('0x2a')])return![];if(moment()[_0x7536('0x36')](moment[_0x7536('0x37')](_0x4981a2[_0x7536('0x38')])))return![];return!![];}catch(_0x2c9640){throw _0x2c9640;}}function refreshOauth2MicrosoftAccessToken(_0x4f9315){return Promise[_0x7536('0x39')]()[_0x7536('0x3a')](function(){if(_0x4f9315[_0x7536('0x3b')])return _0x4f9315;return db['CloudProvider']['findOne']({'where':{'id':_0x4f9315['id']},'raw':!![]});})[_0x7536('0x3a')](function(_0x42e4ae){var _0x33093b={'grant_type':_0x7536('0x3c'),'refresh_token':_0x42e4ae[_0x7536('0x3d')],'scope':getAccessTokenScope(_0x42e4ae),'redirect_uri':_0x42e4ae[_0x7536('0x25')],'client_id':_0x42e4ae[_0x7536('0x22')],'client_secret':encryptor[_0x7536('0x3e')](_0x42e4ae[_0x7536('0x3b')])};var _0xe91d57={'method':_0x7536('0x3f'),'uri':MICROSOFT_AUTH_URL[_0x7536('0x19')](_0x7536('0x1a'),_0x42e4ae[_0x7536('0x1b')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x33093b,'json':!![]};return rp(_0xe91d57);})['then'](function(_0x536158){_0x4f9315[_0x7536('0x40')]=_0x536158[_0x7536('0x41')];_0x4f9315[_0x7536('0x3d')]=_0x536158[_0x7536('0x3c')];return db[_0x7536('0x42')]['update']({'data5':_0x4f9315[_0x7536('0x40')],'data6':_0x4f9315['data6']},{'where':{'id':_0x4f9315['id']}});})[_0x7536('0x3a')](function(){return _0x4f9315;})[_0x7536('0x43')](function(_0x31c22d){logger[_0x7536('0x44')](_0x7536('0x45'),_0x4f9315['id'],_0x31c22d);});}function getOauth2MicrosoftAccessToken(_0x3b17c0,_0x225d06){var _0x586ccb={'grant_type':_0x7536('0x46'),'code':_0x3b17c0,'scope':getAccessTokenScope(_0x225d06),'redirect_uri':_0x225d06[_0x7536('0x25')],'client_id':_0x225d06[_0x7536('0x22')],'client_secret':encryptor['decryptString'](_0x225d06['data3'])};var _0x418751={'method':_0x7536('0x3f'),'uri':MICROSOFT_AUTH_URL[_0x7536('0x19')](_0x7536('0x1a'),_0x225d06[_0x7536('0x1b')])+MICROSOFT_TOKEN_ENDPOINT,'form':_0x586ccb,'json':!![]};return rp(_0x418751);}function startRefreshInterval(_0x46de05){var _0xdb399c=schedule[_0x7536('0x47')];if(_0xdb399c[_0x46de05['id']])clearInterval(_0xdb399c[_0x46de05['id']]);_0xdb399c[_0x46de05['id']]=setInterval(refreshOauth2MicrosoftAccessToken[_0x7536('0x48')](this,{'id':_0x46de05['id']}),OAUTH_REFRESH_INTERVAL*0x3e8);schedule[_0x7536('0x47')]=_0xdb399c;}function startAllRefreshIntervals(){return db[_0x7536('0x42')]['findAll']({'where':{'data6':{'$ne':null}},'raw':!![]})[_0x7536('0x3a')](function(_0x211c4a){var _0x38a128=_0x211c4a[_0x7536('0x11')](function(_0x31c822){return refreshOauth2MicrosoftAccessToken(_0x31c822)['then'](function(_0x5827c2){startRefreshInterval(_0x5827c2);});});return Promise[_0x7536('0x49')](_0x38a128);})[_0x7536('0x43')](function(_0x319d34){var _0x2e80b1=_0x319d34?util[_0x7536('0x4a')](_0x319d34,{'showHidden':![],'depth':null}):'';logger['error'](_0x7536('0x4b'),_0x2e80b1);});}module[_0x7536('0x4c')]={'generateMicrosoftAuthorizationUrl':generateMicrosoftAuthorizationUrl,'getOauth2MicrosoftAccessToken':getOauth2MicrosoftAccessToken,'isValidIdToken':isValidIdToken,'startAllRefreshIntervals':startAllRefreshIntervals,'refreshOauth2MicrosoftAccessToken':refreshOauth2MicrosoftAccessToken,'startRefreshInterval':startRefreshInterval};
\ No newline at end of file
index 687322e..81a66e1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcac3=['message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','CloudProvider,\x20%s,\x20%s','debug','CloudProvider,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0x4c525c,_0x4668a1){var _0x14a634=function(_0x467b4b){while(--_0x467b4b){_0x4c525c['push'](_0x4c525c['shift']());}};_0x14a634(++_0x4668a1);}(_0xcac3,0x193));var _0x3cac=function(_0x12156e,_0x550b21){_0x12156e=_0x12156e-0x0;var _0x55ada7=_0xcac3[_0x12156e];return _0x55ada7;};'use strict';var _=require('lodash');var util=require(_0x3cac('0x0'));var moment=require(_0x3cac('0x1'));var BPromise=require(_0x3cac('0x2'));var rs=require(_0x3cac('0x3'));var fs=require('fs');var Redis=require(_0x3cac('0x4'));var db=require(_0x3cac('0x5'))['db'];var utils=require(_0x3cac('0x6'));var logger=require(_0x3cac('0x7'))(_0x3cac('0x8'));var config=require(_0x3cac('0x9'));var jayson=require(_0x3cac('0xa'));var client=jayson[_0x3cac('0xb')][_0x3cac('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x1e2560,_0x14562c,_0x21365c){return new BPromise(function(_0x13c1b9,_0x55670d){return client[_0x3cac('0xd')](_0x1e2560,_0x21365c)[_0x3cac('0xe')](function(_0x3bcbed){logger[_0x3cac('0xf')](_0x3cac('0x10'),_0x14562c,'request\x20sent');logger[_0x3cac('0x11')](_0x3cac('0x12'),_0x14562c,_0x3cac('0x13'),JSON[_0x3cac('0x14')](_0x3bcbed));if(_0x3bcbed[_0x3cac('0x15')]){if(_0x3bcbed['error']['code']===0x1f4){logger[_0x3cac('0x15')](_0x3cac('0x10'),_0x14562c,_0x3bcbed[_0x3cac('0x15')][_0x3cac('0x16')]);return _0x55670d(_0x3bcbed[_0x3cac('0x15')][_0x3cac('0x16')]);}logger[_0x3cac('0x15')]('CloudProvider,\x20%s,\x20%s',_0x14562c,_0x3bcbed[_0x3cac('0x15')][_0x3cac('0x16')]);return _0x13c1b9(_0x3bcbed[_0x3cac('0x15')][_0x3cac('0x16')]);}else{logger[_0x3cac('0xf')](_0x3cac('0x10'),_0x14562c,_0x3cac('0x13'));_0x13c1b9(_0x3bcbed[_0x3cac('0x17')][_0x3cac('0x16')]);}})[_0x3cac('0x18')](function(_0x4173ca){logger[_0x3cac('0x15')](_0x3cac('0x10'),_0x14562c,_0x4173ca);_0x55670d(_0x4173ca);});});}
\ No newline at end of file
+var _0x1681=['../../config/environment','jayson/promise','http','request','info','request\x20sent','debug','stringify','error','code','message','CloudProvider,\x20%s,\x20%s','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x1681,0x12c));var _0x1168=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x1681[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x1168('0x0'));var BPromise=require(_0x1168('0x1'));var rs=require(_0x1168('0x2'));var fs=require('fs');var Redis=require(_0x1168('0x3'));var db=require(_0x1168('0x4'))['db'];var utils=require(_0x1168('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x1168('0x6'));var jayson=require(_0x1168('0x7'));var client=jayson['client'][_0x1168('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x1d0634,_0x5e6752,_0x27309b){return new BPromise(function(_0x53baca,_0x262f80){return client[_0x1168('0x9')](_0x1d0634,_0x27309b)['then'](function(_0x38096f){logger[_0x1168('0xa')]('CloudProvider,\x20%s,\x20%s',_0x5e6752,_0x1168('0xb'));logger[_0x1168('0xc')]('CloudProvider,\x20%s,\x20%s,\x20%s',_0x5e6752,'request\x20sent',JSON[_0x1168('0xd')](_0x38096f));if(_0x38096f[_0x1168('0xe')]){if(_0x38096f[_0x1168('0xe')][_0x1168('0xf')]===0x1f4){logger[_0x1168('0xe')]('CloudProvider,\x20%s,\x20%s',_0x5e6752,_0x38096f[_0x1168('0xe')][_0x1168('0x10')]);return _0x262f80(_0x38096f[_0x1168('0xe')][_0x1168('0x10')]);}logger[_0x1168('0xe')]('CloudProvider,\x20%s,\x20%s',_0x5e6752,_0x38096f[_0x1168('0xe')]['message']);return _0x53baca(_0x38096f[_0x1168('0xe')][_0x1168('0x10')]);}else{logger['info'](_0x1168('0x11'),_0x5e6752,_0x1168('0xb'));_0x53baca(_0x38096f['result'][_0x1168('0x10')]);}})['catch'](function(_0x45e07e){logger[_0x1168('0xe')]('CloudProvider,\x20%s,\x20%s',_0x5e6752,_0x45e07e);_0x262f80(_0x45e07e);});});}
\ No newline at end of file
index 78e452f..5ae29c3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['isAuthenticated','/:id','show','post','create','delete','/:id/oauth2/microsoft/authorize/','oauth2MicrosoftAuthorize','oauth2MicrosoftCallback','exports','express','Router','../../components/auth/service','get'];(function(_0x4fc9e6,_0xc51915){var _0x551d28=function(_0x1a603b){while(--_0x1a603b){_0x4fc9e6['push'](_0x4fc9e6['shift']());}};_0x551d28(++_0xc51915);}(_0x7a54,0x106));var _0x47a5=function(_0x85abec,_0x4c1b3b){_0x85abec=_0x85abec-0x0;var _0x17cdf9=_0x7a54[_0x85abec];return _0x17cdf9;};'use strict';var express=require(_0x47a5('0x0'));var router=express[_0x47a5('0x1')]();var auth=require(_0x47a5('0x2'));var controller=require('./cloudProvider.controller');router[_0x47a5('0x3')]('/',auth[_0x47a5('0x4')](),controller['index']);router[_0x47a5('0x3')](_0x47a5('0x5'),auth[_0x47a5('0x4')](),controller[_0x47a5('0x6')]);router[_0x47a5('0x7')]('/',auth['isAuthenticated'](),controller[_0x47a5('0x8')]);router['put'](_0x47a5('0x5'),auth[_0x47a5('0x4')](),controller['update']);router[_0x47a5('0x9')]('/:id',auth['isAuthenticated'](),controller['destroy']);router[_0x47a5('0x3')](_0x47a5('0xa'),auth['isAuthenticated'](),controller[_0x47a5('0xb')]);router['post']('/oauth2/microsoft/callback',controller[_0x47a5('0xc')]);module[_0x47a5('0xd')]=router;
\ No newline at end of file
+var _0xadb5=['put','update','delete','destroy','/:id/oauth2/microsoft/authorize/','/oauth2/microsoft/callback','oauth2MicrosoftCallback','exports','Router','./cloudProvider.controller','get','isAuthenticated','/:id','post','create'];(function(_0xee2847,_0x5e5235){var _0x29bb86=function(_0x2de703){while(--_0x2de703){_0xee2847['push'](_0xee2847['shift']());}};_0x29bb86(++_0x5e5235);}(_0xadb5,0xad));var _0x5adb=function(_0xcdbb76,_0x30bd05){_0xcdbb76=_0xcdbb76-0x0;var _0x2e6fdb=_0xadb5[_0xcdbb76];return _0x2e6fdb;};'use strict';var express=require('express');var router=express[_0x5adb('0x0')]();var auth=require('../../components/auth/service');var controller=require(_0x5adb('0x1'));router[_0x5adb('0x2')]('/',auth[_0x5adb('0x3')](),controller['index']);router[_0x5adb('0x2')](_0x5adb('0x4'),auth[_0x5adb('0x3')](),controller['show']);router[_0x5adb('0x5')]('/',auth[_0x5adb('0x3')](),controller[_0x5adb('0x6')]);router[_0x5adb('0x7')](_0x5adb('0x4'),auth[_0x5adb('0x3')](),controller[_0x5adb('0x8')]);router[_0x5adb('0x9')](_0x5adb('0x4'),auth[_0x5adb('0x3')](),controller[_0x5adb('0xa')]);router[_0x5adb('0x2')](_0x5adb('0xb'),auth[_0x5adb('0x3')](),controller['oauth2MicrosoftAuthorize']);router['post'](_0x5adb('0xc'),controller[_0x5adb('0xd')]);module[_0x5adb('0xe')]=router;
\ No newline at end of file
index f74bda9..3ed5a16 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8225=['sequelize','exports','STRING'];(function(_0x595852,_0x27d446){var _0x245346=function(_0xce6edd){while(--_0xce6edd){_0x595852['push'](_0x595852['shift']());}};_0x245346(++_0x27d446);}(_0x8225,0x87));var _0x5822=function(_0x19f8b6,_0x2b4e8c){_0x19f8b6=_0x19f8b6-0x0;var _0x213ebc=_0x8225[_0x19f8b6];return _0x213ebc;};'use strict';var Sequelize=require(_0x5822('0x0'));module[_0x5822('0x1')]={'name':{'type':Sequelize['STRING'],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize['STRING']},'companyId':{'type':Sequelize[_0x5822('0x2')]},'website':{'type':Sequelize[_0x5822('0x2')]},'phone':{'type':Sequelize[_0x5822('0x2')]},'fax':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x5822('0x2')]},'street':{'type':Sequelize[_0x5822('0x2')]},'postalCode':{'type':Sequelize[_0x5822('0x2')]},'city':{'type':Sequelize[_0x5822('0x2')]},'country':{'type':Sequelize[_0x5822('0x2')]},'email':{'type':Sequelize[_0x5822('0x2')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize[_0x5822('0x2')]},'sStreet':{'type':Sequelize[_0x5822('0x2')]},'sPostalCode':{'type':Sequelize[_0x5822('0x2')]},'sCity':{'type':Sequelize[_0x5822('0x2')]},'sCountry':{'type':Sequelize[_0x5822('0x2')]},'description':{'type':Sequelize[_0x5822('0x2')]}};
\ No newline at end of file
+var _0x1be3=['sequelize','STRING'];(function(_0x58af69,_0x35708f){var _0x298ad5=function(_0x413a13){while(--_0x413a13){_0x58af69['push'](_0x58af69['shift']());}};_0x298ad5(++_0x35708f);}(_0x1be3,0x13c));var _0x31be=function(_0x56cc0e,_0x48430b){_0x56cc0e=_0x56cc0e-0x0;var _0xecc2d1=_0x1be3[_0x56cc0e];return _0xecc2d1;};'use strict';var Sequelize=require(_0x31be('0x0'));module['exports']={'name':{'type':Sequelize[_0x31be('0x1')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'vat':{'type':Sequelize[_0x31be('0x1')]},'companyId':{'type':Sequelize[_0x31be('0x1')]},'website':{'type':Sequelize['STRING']},'phone':{'type':Sequelize['STRING']},'fax':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x31be('0x1')]},'street':{'type':Sequelize[_0x31be('0x1')]},'postalCode':{'type':Sequelize[_0x31be('0x1')]},'city':{'type':Sequelize['STRING']},'country':{'type':Sequelize[_0x31be('0x1')]},'email':{'type':Sequelize[_0x31be('0x1')],'validate':{'isEmail':!![]}},'emailDomain':{'type':Sequelize[_0x31be('0x1')]},'sStreet':{'type':Sequelize['STRING']},'sPostalCode':{'type':Sequelize[_0x31be('0x1')]},'sCity':{'type':Sequelize[_0x31be('0x1')]},'sCountry':{'type':Sequelize[_0x31be('0x1')]},'description':{'type':Sequelize[_0x31be('0x1')]}};
\ No newline at end of file
index d3ff73c..f44ffac 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x167b=['apply','save','update','then','destroy','get','UserProfileResource','name','send','index','describe','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','map','options','CmCompany','includeAll','include','findAll','rows','catch','show','params','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Companies','UserProfileSection','find','userProfileId','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','CmContact','addContacts','ids','getContacts','findOne','rawAttributes','order','eml-format','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range'];(function(_0x5c110c,_0x58d08b){var _0x485822=function(_0xb98557){while(--_0xb98557){_0x5c110c['push'](_0x5c110c['shift']());}};_0x485822(++_0x58d08b);}(_0x167b,0x196));var _0xb167=function(_0x597f41,_0x1922f6){_0x597f41=_0x597f41-0x0;var _0x3cdbc1=_0x167b[_0x597f41];return _0x3cdbc1;};'use strict';var emlformat=require(_0xb167('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xb167('0x1'));var rp=require(_0xb167('0x2'));var moment=require(_0xb167('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xb167('0x4'));var util=require(_0xb167('0x5'));var path=require(_0xb167('0x6'));var sox=require(_0xb167('0x7'));var csv=require(_0xb167('0x8'));var ejs=require(_0xb167('0x9'));var fs=require('fs');var fs_extra=require(_0xb167('0xa'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xb167('0xb'));var jsforce=require(_0xb167('0xc'));var deskjs=require(_0xb167('0xd'));var toCsv=require('to-csv');var querystring=require(_0xb167('0xe'));var Papa=require(_0xb167('0xf'));var Redis=require(_0xb167('0x10'));var authService=require(_0xb167('0x11'));var qs=require(_0xb167('0x12'));var as=require(_0xb167('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xb167('0x14'))(_0xb167('0x15'));var utils=require('../../config/utils');var config=require(_0xb167('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0xb167('0x17'))['db'];function respondWithStatusCode(_0x1ab865,_0x4c904c){_0x4c904c=_0x4c904c||0xcc;return function(_0x2ea3c2){if(_0x2ea3c2){return _0x1ab865[_0xb167('0x18')](_0x4c904c);}return _0x1ab865[_0xb167('0x19')](_0x4c904c)[_0xb167('0x1a')]();};}function respondWithResult(_0x4a4284,_0x402263){_0x402263=_0x402263||0xc8;return function(_0x35246d){if(_0x35246d){return _0x4a4284['status'](_0x402263)[_0xb167('0x1b')](_0x35246d);}};}function respondWithFilteredResult(_0x51c7ae,_0x229f3d){return function(_0x156854){if(_0x156854){var _0x566b00=typeof _0x229f3d['offset']===_0xb167('0x1c')&&typeof _0x229f3d[_0xb167('0x1d')]===_0xb167('0x1c');var _0x1f10fa=_0x156854[_0xb167('0x1e')];var _0x151146=_0x566b00?0x0:_0x229f3d[_0xb167('0x1f')];var _0x550c90=_0x566b00?_0x156854[_0xb167('0x1e')]:_0x229f3d[_0xb167('0x1f')]+_0x229f3d['limit'];var _0x9ab4e1;if(_0x550c90>=_0x1f10fa){_0x550c90=_0x1f10fa;_0x9ab4e1=0xc8;}else{_0x9ab4e1=0xce;}_0x51c7ae[_0xb167('0x19')](_0x9ab4e1);return _0x51c7ae[_0xb167('0x20')](_0xb167('0x21'),_0x151146+'-'+_0x550c90+'/'+_0x1f10fa)[_0xb167('0x1b')](_0x156854);}return null;};}function patchUpdates(_0x3bff61){return function(_0x24d65a){try{jsonpatch[_0xb167('0x22')](_0x24d65a,_0x3bff61,!![]);}catch(_0x197972){return BPromise['reject'](_0x197972);}return _0x24d65a[_0xb167('0x23')]();};}function saveUpdates(_0x4489a4,_0x4d2cf2){return function(_0x528cae){if(_0x528cae){return _0x528cae[_0xb167('0x24')](_0x4489a4)[_0xb167('0x25')](function(_0x59d1a6){return _0x59d1a6;});}return null;};}function removeEntity(_0x595a75,_0x57f310){return function(_0x14c3f2){if(_0x14c3f2){return _0x14c3f2[_0xb167('0x26')]()[_0xb167('0x25')](function(){var _0x3d3777=_0x14c3f2[_0xb167('0x27')]({'plain':!![]});var _0x1cabaa='Companies';return db[_0xb167('0x28')][_0xb167('0x26')]({'where':{'type':_0x1cabaa,'resourceId':_0x3d3777['id']}})['then'](function(){return _0x14c3f2;});})[_0xb167('0x25')](function(){_0x595a75[_0xb167('0x19')](0xcc)[_0xb167('0x1a')]();});}};}function handleEntityNotFound(_0x529733,_0xb19774){return function(_0x241b82){if(!_0x241b82){_0x529733[_0xb167('0x18')](0x194);}return _0x241b82;};}function handleError(_0x3a977a,_0x504c06){_0x504c06=_0x504c06||0x1f4;return function(_0x52b590){logger['error'](_0x52b590['stack']);if(_0x52b590[_0xb167('0x29')]){delete _0x52b590[_0xb167('0x29')];}_0x3a977a['status'](_0x504c06)[_0xb167('0x2a')](_0x52b590);};}exports[_0xb167('0x2b')]=function(_0x2b6889,_0x79f71e){var _0x5e44b3={},_0xfa25d1={},_0x491dd4={'count':0x0,'rows':[]};return db['CmCompany'][_0xb167('0x2c')]()[_0xb167('0x25')](function(_0x44c384){_0xfa25d1[_0xb167('0x2d')]=_[_0xb167('0x2e')](_0x44c384);_0xfa25d1[_0xb167('0x2f')]=_[_0xb167('0x2e')](_0x2b6889[_0xb167('0x2f')]);_0xfa25d1[_0xb167('0x30')]=_[_0xb167('0x31')](_0xfa25d1[_0xb167('0x2d')],_0xfa25d1[_0xb167('0x2f')]);_0x5e44b3['attributes']=_[_0xb167('0x31')](_0xfa25d1[_0xb167('0x2d')],qs[_0xb167('0x32')](_0x2b6889['query'][_0xb167('0x32')]));_0x5e44b3[_0xb167('0x33')]=_0x5e44b3[_0xb167('0x33')][_0xb167('0x34')]?_0x5e44b3[_0xb167('0x33')]:_0xfa25d1[_0xb167('0x2d')];if(!_0x2b6889['query'][_0xb167('0x35')](_0xb167('0x36'))){_0x5e44b3[_0xb167('0x1d')]=qs[_0xb167('0x1d')](_0x2b6889[_0xb167('0x2f')]['limit']);_0x5e44b3[_0xb167('0x1f')]=qs[_0xb167('0x1f')](_0x2b6889[_0xb167('0x2f')][_0xb167('0x1f')]);}_0x5e44b3['order']=qs[_0xb167('0x37')](_0x2b6889['query'][_0xb167('0x37')]);_0x5e44b3[_0xb167('0x38')]=qs['filters'](_[_0xb167('0x39')](_0x2b6889[_0xb167('0x2f')],_0xfa25d1[_0xb167('0x30')]),_0x44c384);if(_0x2b6889['query'][_0xb167('0x3a')]){_0x5e44b3[_0xb167('0x38')]=_[_0xb167('0x3b')](_0x5e44b3[_0xb167('0x38')],{'$or':_[_0xb167('0x3c')](_0x5e44b3[_0xb167('0x33')],function(_0x1e7091){var _0x134ef0={};_0x134ef0[_0x1e7091]={'$like':'%'+_0x2b6889['query'][_0xb167('0x3a')]+'%'};return _0x134ef0;})});}_0x5e44b3=_[_0xb167('0x3b')]({},_0x5e44b3,_0x2b6889[_0xb167('0x3d')]);var _0xbdc696={'where':_0x5e44b3[_0xb167('0x38')]};return db[_0xb167('0x3e')][_0xb167('0x1e')](_0xbdc696)['then'](function(_0x578d9d){_0x491dd4[_0xb167('0x1e')]=_0x578d9d;if(_0x2b6889[_0xb167('0x2f')][_0xb167('0x3f')]){_0x5e44b3[_0xb167('0x40')]=[{'all':!![]}];}return db[_0xb167('0x3e')][_0xb167('0x41')](_0x5e44b3);})['then'](function(_0x50d266){_0x491dd4[_0xb167('0x42')]=_0x50d266;return _0x491dd4;})[_0xb167('0x25')](respondWithFilteredResult(_0x79f71e,_0x5e44b3))[_0xb167('0x43')](handleError(_0x79f71e,null));})['catch'](handleError(_0x79f71e,null));};exports[_0xb167('0x44')]=function(_0x303356,_0xd5bc5d){var _0x6090f={'raw':![],'where':{'id':_0x303356[_0xb167('0x45')]['id']}},_0x593c04={};_0x593c04['model']=_[_0xb167('0x2e')](db[_0xb167('0x3e')]['rawAttributes']);_0x593c04[_0xb167('0x2f')]=_[_0xb167('0x2e')](_0x303356[_0xb167('0x2f')]);_0x593c04[_0xb167('0x30')]=_[_0xb167('0x31')](_0x593c04[_0xb167('0x2d')],_0x593c04[_0xb167('0x2f')]);_0x6090f[_0xb167('0x33')]=_[_0xb167('0x31')](_0x593c04[_0xb167('0x2d')],qs[_0xb167('0x32')](_0x303356['query']['fields']));_0x6090f[_0xb167('0x33')]=_0x6090f[_0xb167('0x33')][_0xb167('0x34')]?_0x6090f[_0xb167('0x33')]:_0x593c04[_0xb167('0x2d')];if(_0x303356[_0xb167('0x2f')][_0xb167('0x3f')]){_0x6090f[_0xb167('0x40')]=[{'all':!![]}];}_0x6090f=_[_0xb167('0x3b')]({},_0x6090f,_0x303356['options']);return db[_0xb167('0x3e')]['find'](_0x6090f)[_0xb167('0x25')](handleEntityNotFound(_0xd5bc5d,null))[_0xb167('0x25')](respondWithResult(_0xd5bc5d,null))[_0xb167('0x43')](handleError(_0xd5bc5d,null));};exports[_0xb167('0x46')]=function(_0x44140b,_0x5bb196){return db[_0xb167('0x3e')]['create'](_0x44140b[_0xb167('0x47')],{})['then'](function(_0x410987){var _0x2ec6e9=_0x44140b[_0xb167('0x48')][_0xb167('0x27')]({'plain':!![]});if(!_0x2ec6e9)throw new Error(_0xb167('0x49'));if(_0x2ec6e9[_0xb167('0x4a')]===_0xb167('0x48')){var _0x23f17c=_0x410987[_0xb167('0x27')]({'plain':!![]});var _0x111ca8=_0xb167('0x4b');return db[_0xb167('0x4c')][_0xb167('0x4d')]({'where':{'name':_0x111ca8,'userProfileId':_0x2ec6e9[_0xb167('0x4e')]},'raw':!![]})['then'](function(_0x410db1){if(_0x410db1&&_0x410db1['autoAssociation']===0x0){return db['UserProfileResource'][_0xb167('0x46')]({'name':_0x23f17c['name'],'resourceId':_0x23f17c['id'],'type':_0x410db1[_0xb167('0x29')],'sectionId':_0x410db1['id']},{})[_0xb167('0x25')](function(){return _0x410987;});}else{return _0x410987;}})[_0xb167('0x43')](function(_0x369e49){logger[_0xb167('0x4f')](_0xb167('0x50'),_0x369e49);throw _0x369e49;});}return _0x410987;})['then'](respondWithResult(_0x5bb196,0xc9))['catch'](handleError(_0x5bb196,null));};exports[_0xb167('0x24')]=function(_0x12fa18,_0x44ba2f){if(_0x12fa18[_0xb167('0x47')]['id']){delete _0x12fa18[_0xb167('0x47')]['id'];}return db[_0xb167('0x3e')][_0xb167('0x4d')]({'where':{'id':_0x12fa18['params']['id']}})[_0xb167('0x25')](handleEntityNotFound(_0x44ba2f,null))[_0xb167('0x25')](saveUpdates(_0x12fa18[_0xb167('0x47')],null))['then'](respondWithResult(_0x44ba2f,null))[_0xb167('0x43')](handleError(_0x44ba2f,null));};exports[_0xb167('0x26')]=function(_0x4f6faa,_0x4873fa){return db[_0xb167('0x3e')][_0xb167('0x4d')]({'where':{'id':_0x4f6faa['params']['id']}})[_0xb167('0x25')](handleEntityNotFound(_0x4873fa,null))[_0xb167('0x25')](removeEntity(_0x4873fa,null))[_0xb167('0x43')](handleError(_0x4873fa,null));};exports['describe']=function(_0x5f4579,_0x345dc9){return db['CmCompany']['describe']()[_0xb167('0x25')](respondWithResult(_0x345dc9,null))['catch'](handleError(_0x345dc9,null));};exports['addContacts']=function(_0x417bc2,_0x2af850,_0x181a04){return db[_0xb167('0x51')]['find']({'where':{'id':_0x417bc2[_0xb167('0x45')]['id']}})[_0xb167('0x25')](handleEntityNotFound(_0x2af850,null))[_0xb167('0x25')](function(_0x2a9e52){if(_0x2a9e52){return _0x2a9e52[_0xb167('0x52')](_0x417bc2[_0xb167('0x47')][_0xb167('0x53')],_['omit'](_0x417bc2[_0xb167('0x47')],[_0xb167('0x53'),'id'])||{});}})[_0xb167('0x25')](respondWithResult(_0x2af850,null))[_0xb167('0x43')](handleError(_0x2af850,null));};exports[_0xb167('0x54')]=function(_0x5b936f,_0x1106b3,_0x2d65c9){var _0x21cd99={};var _0x4ec1d5={};var _0x215b4e;var _0x573184;return db[_0xb167('0x3e')][_0xb167('0x55')]({'where':{'id':_0x5b936f[_0xb167('0x45')]['id']}})['then'](handleEntityNotFound(_0x1106b3,null))[_0xb167('0x25')](function(_0x1c6c27){if(_0x1c6c27){_0x215b4e=_0x1c6c27;_0x4ec1d5[_0xb167('0x2d')]=_[_0xb167('0x2e')](db[_0xb167('0x51')][_0xb167('0x56')]);_0x4ec1d5[_0xb167('0x2f')]=_['keys'](_0x5b936f[_0xb167('0x2f')]);_0x4ec1d5['filters']=_['intersection'](_0x4ec1d5['model'],_0x4ec1d5[_0xb167('0x2f')]);_0x21cd99[_0xb167('0x33')]=_[_0xb167('0x31')](_0x4ec1d5['model'],qs[_0xb167('0x32')](_0x5b936f[_0xb167('0x2f')][_0xb167('0x32')]));_0x21cd99[_0xb167('0x33')]=_0x21cd99['attributes'][_0xb167('0x34')]?_0x21cd99['attributes']:_0x4ec1d5['model'];_0x21cd99[_0xb167('0x57')]=qs[_0xb167('0x37')](_0x5b936f[_0xb167('0x2f')][_0xb167('0x37')]);_0x21cd99[_0xb167('0x38')]=qs[_0xb167('0x30')](_['pick'](_0x5b936f[_0xb167('0x2f')],_0x4ec1d5[_0xb167('0x30')]));if(_0x5b936f[_0xb167('0x2f')]['filter']){_0x21cd99[_0xb167('0x38')]=_[_0xb167('0x3b')](_0x21cd99['where'],{'$or':_['map'](_0x21cd99['attributes'],function(_0x4a5569){var _0x12325f={};_0x12325f[_0x4a5569]={'$like':'%'+_0x5b936f[_0xb167('0x2f')][_0xb167('0x3a')]+'%'};return _0x12325f;})});}_0x21cd99=_[_0xb167('0x3b')]({},_0x21cd99,_0x5b936f[_0xb167('0x3d')]);return _0x215b4e[_0xb167('0x54')](_0x21cd99);}})[_0xb167('0x25')](function(_0x430f57){if(_0x430f57){_0x573184=_0x430f57[_0xb167('0x34')];if(!_0x5b936f[_0xb167('0x2f')][_0xb167('0x35')](_0xb167('0x36'))){_0x21cd99[_0xb167('0x1d')]=qs[_0xb167('0x1d')](_0x5b936f[_0xb167('0x2f')][_0xb167('0x1d')]);_0x21cd99[_0xb167('0x1f')]=qs['offset'](_0x5b936f[_0xb167('0x2f')][_0xb167('0x1f')]);}return _0x215b4e[_0xb167('0x54')](_0x21cd99);}})[_0xb167('0x25')](function(_0x34008a){if(_0x34008a){return _0x34008a?{'count':_0x573184,'rows':_0x34008a}:null;}})['then'](respondWithResult(_0x1106b3,null))[_0xb167('0x43')](handleError(_0x1106b3,null));};
\ No newline at end of file
+var _0xa260=['find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','addContacts','omit','ids','CmContact','pick','options','getContacts','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','sox','to-csv','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','json','offset','undefined','limit','count','set','Content-Range','save','update','destroy','then','get','Companies','UserProfileResource','sendStatus','stack','name','status','index','CmCompany','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','merge','map','filter','includeAll','include','rows','catch','show','params','rawAttributes'];(function(_0x420b24,_0x382adc){var _0x4da552=function(_0x4e1623){while(--_0x4e1623){_0x420b24['push'](_0x420b24['shift']());}};_0x4da552(++_0x382adc);}(_0xa260,0x16d));var _0x0a26=function(_0xd7ab6,_0x345707){_0xd7ab6=_0xd7ab6-0x0;var _0x176d05=_0xa260[_0xd7ab6];return _0x176d05;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x0a26('0x0'));var zipdir=require(_0x0a26('0x1'));var jsonpatch=require(_0x0a26('0x2'));var rp=require(_0x0a26('0x3'));var moment=require('moment');var BPromise=require(_0x0a26('0x4'));var Mustache=require(_0x0a26('0x5'));var util=require(_0x0a26('0x6'));var path=require('path');var sox=require(_0x0a26('0x7'));var csv=require(_0x0a26('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0a26('0x9'));var _=require(_0x0a26('0xa'));var squel=require(_0x0a26('0xb'));var crypto=require(_0x0a26('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x0a26('0xd'));var toCsv=require('to-csv');var querystring=require(_0x0a26('0xe'));var Papa=require(_0x0a26('0xf'));var Redis=require(_0x0a26('0x10'));var authService=require(_0x0a26('0x11'));var qs=require(_0x0a26('0x12'));var as=require(_0x0a26('0x13'));var hardwareService=require(_0x0a26('0x14'));var logger=require(_0x0a26('0x15'))('api');var utils=require(_0x0a26('0x16'));var config=require(_0x0a26('0x17'));var licenseUtil=require(_0x0a26('0x18'));var db=require(_0x0a26('0x19'))['db'];function respondWithStatusCode(_0x5b2717,_0x13004c){_0x13004c=_0x13004c||0xcc;return function(_0x53f7af){if(_0x53f7af){return _0x5b2717['sendStatus'](_0x13004c);}return _0x5b2717['status'](_0x13004c)[_0x0a26('0x1a')]();};}function respondWithResult(_0x1a8cef,_0x21129e){_0x21129e=_0x21129e||0xc8;return function(_0x2b9840){if(_0x2b9840){return _0x1a8cef['status'](_0x21129e)[_0x0a26('0x1b')](_0x2b9840);}};}function respondWithFilteredResult(_0x486cf5,_0x30bc47){return function(_0x81a4e9){if(_0x81a4e9){var _0x789d87=typeof _0x30bc47[_0x0a26('0x1c')]===_0x0a26('0x1d')&&typeof _0x30bc47[_0x0a26('0x1e')]===_0x0a26('0x1d');var _0x512854=_0x81a4e9[_0x0a26('0x1f')];var _0x186a10=_0x789d87?0x0:_0x30bc47[_0x0a26('0x1c')];var _0x3c2688=_0x789d87?_0x81a4e9[_0x0a26('0x1f')]:_0x30bc47[_0x0a26('0x1c')]+_0x30bc47[_0x0a26('0x1e')];var _0x4d3cae;if(_0x3c2688>=_0x512854){_0x3c2688=_0x512854;_0x4d3cae=0xc8;}else{_0x4d3cae=0xce;}_0x486cf5['status'](_0x4d3cae);return _0x486cf5[_0x0a26('0x20')](_0x0a26('0x21'),_0x186a10+'-'+_0x3c2688+'/'+_0x512854)[_0x0a26('0x1b')](_0x81a4e9);}return null;};}function patchUpdates(_0x3cdddd){return function(_0x4e8f90){try{jsonpatch['apply'](_0x4e8f90,_0x3cdddd,!![]);}catch(_0x554dc7){return BPromise['reject'](_0x554dc7);}return _0x4e8f90[_0x0a26('0x22')]();};}function saveUpdates(_0x194e58,_0x24fb7f){return function(_0x12914e){if(_0x12914e){return _0x12914e[_0x0a26('0x23')](_0x194e58)['then'](function(_0x5a3eb2){return _0x5a3eb2;});}return null;};}function removeEntity(_0xcb6a9d,_0x4b113f){return function(_0x511c61){if(_0x511c61){return _0x511c61[_0x0a26('0x24')]()[_0x0a26('0x25')](function(){var _0xc1cb1e=_0x511c61[_0x0a26('0x26')]({'plain':!![]});var _0x1e76a8=_0x0a26('0x27');return db[_0x0a26('0x28')]['destroy']({'where':{'type':_0x1e76a8,'resourceId':_0xc1cb1e['id']}})[_0x0a26('0x25')](function(){return _0x511c61;});})['then'](function(){_0xcb6a9d['status'](0xcc)[_0x0a26('0x1a')]();});}};}function handleEntityNotFound(_0x1c41c4,_0x189b3d){return function(_0x66a96d){if(!_0x66a96d){_0x1c41c4[_0x0a26('0x29')](0x194);}return _0x66a96d;};}function handleError(_0x53bcb3,_0x5a95d7){_0x5a95d7=_0x5a95d7||0x1f4;return function(_0x845bfe){logger['error'](_0x845bfe[_0x0a26('0x2a')]);if(_0x845bfe[_0x0a26('0x2b')]){delete _0x845bfe['name'];}_0x53bcb3[_0x0a26('0x2c')](_0x5a95d7)['send'](_0x845bfe);};}exports[_0x0a26('0x2d')]=function(_0x2bd007,_0x5c5e6a){var _0x304912={},_0x4d1bf7={},_0x33fc1c={'count':0x0,'rows':[]};return db[_0x0a26('0x2e')]['describe']()[_0x0a26('0x25')](function(_0x56bf02){_0x4d1bf7['model']=_[_0x0a26('0x2f')](_0x56bf02);_0x4d1bf7['query']=_[_0x0a26('0x2f')](_0x2bd007[_0x0a26('0x30')]);_0x4d1bf7[_0x0a26('0x31')]=_[_0x0a26('0x32')](_0x4d1bf7[_0x0a26('0x33')],_0x4d1bf7[_0x0a26('0x30')]);_0x304912[_0x0a26('0x34')]=_[_0x0a26('0x32')](_0x4d1bf7[_0x0a26('0x33')],qs['fields'](_0x2bd007[_0x0a26('0x30')][_0x0a26('0x35')]));_0x304912[_0x0a26('0x34')]=_0x304912[_0x0a26('0x34')][_0x0a26('0x36')]?_0x304912['attributes']:_0x4d1bf7[_0x0a26('0x33')];if(!_0x2bd007[_0x0a26('0x30')][_0x0a26('0x37')](_0x0a26('0x38'))){_0x304912[_0x0a26('0x1e')]=qs['limit'](_0x2bd007[_0x0a26('0x30')][_0x0a26('0x1e')]);_0x304912['offset']=qs[_0x0a26('0x1c')](_0x2bd007[_0x0a26('0x30')]['offset']);}_0x304912[_0x0a26('0x39')]=qs[_0x0a26('0x3a')](_0x2bd007[_0x0a26('0x30')][_0x0a26('0x3a')]);_0x304912[_0x0a26('0x3b')]=qs[_0x0a26('0x31')](_['pick'](_0x2bd007[_0x0a26('0x30')],_0x4d1bf7['filters']),_0x56bf02);if(_0x2bd007[_0x0a26('0x30')]['filter']){_0x304912[_0x0a26('0x3b')]=_[_0x0a26('0x3c')](_0x304912[_0x0a26('0x3b')],{'$or':_[_0x0a26('0x3d')](_0x304912[_0x0a26('0x34')],function(_0xeef75d){var _0x58904c={};_0x58904c[_0xeef75d]={'$like':'%'+_0x2bd007[_0x0a26('0x30')][_0x0a26('0x3e')]+'%'};return _0x58904c;})});}_0x304912=_['merge']({},_0x304912,_0x2bd007['options']);var _0x1d4d95={'where':_0x304912['where']};return db[_0x0a26('0x2e')]['count'](_0x1d4d95)[_0x0a26('0x25')](function(_0x3bb194){_0x33fc1c[_0x0a26('0x1f')]=_0x3bb194;if(_0x2bd007['query'][_0x0a26('0x3f')]){_0x304912[_0x0a26('0x40')]=[{'all':!![]}];}return db[_0x0a26('0x2e')]['findAll'](_0x304912);})['then'](function(_0x5d3735){_0x33fc1c[_0x0a26('0x41')]=_0x5d3735;return _0x33fc1c;})['then'](respondWithFilteredResult(_0x5c5e6a,_0x304912))[_0x0a26('0x42')](handleError(_0x5c5e6a,null));})[_0x0a26('0x42')](handleError(_0x5c5e6a,null));};exports[_0x0a26('0x43')]=function(_0x2e872e,_0x26cb94){var _0x169c30={'raw':![],'where':{'id':_0x2e872e[_0x0a26('0x44')]['id']}},_0x372f2a={};_0x372f2a[_0x0a26('0x33')]=_[_0x0a26('0x2f')](db[_0x0a26('0x2e')][_0x0a26('0x45')]);_0x372f2a[_0x0a26('0x30')]=_[_0x0a26('0x2f')](_0x2e872e[_0x0a26('0x30')]);_0x372f2a[_0x0a26('0x31')]=_[_0x0a26('0x32')](_0x372f2a['model'],_0x372f2a[_0x0a26('0x30')]);_0x169c30['attributes']=_['intersection'](_0x372f2a['model'],qs[_0x0a26('0x35')](_0x2e872e[_0x0a26('0x30')][_0x0a26('0x35')]));_0x169c30['attributes']=_0x169c30[_0x0a26('0x34')][_0x0a26('0x36')]?_0x169c30['attributes']:_0x372f2a[_0x0a26('0x33')];if(_0x2e872e[_0x0a26('0x30')][_0x0a26('0x3f')]){_0x169c30[_0x0a26('0x40')]=[{'all':!![]}];}_0x169c30=_[_0x0a26('0x3c')]({},_0x169c30,_0x2e872e['options']);return db[_0x0a26('0x2e')][_0x0a26('0x46')](_0x169c30)[_0x0a26('0x25')](handleEntityNotFound(_0x26cb94,null))[_0x0a26('0x25')](respondWithResult(_0x26cb94,null))[_0x0a26('0x42')](handleError(_0x26cb94,null));};exports[_0x0a26('0x47')]=function(_0x546f9c,_0x35ec24){return db['CmCompany'][_0x0a26('0x47')](_0x546f9c['body'],{})['then'](function(_0x3647e9){var _0x432284=_0x546f9c[_0x0a26('0x48')][_0x0a26('0x26')]({'plain':!![]});if(!_0x432284)throw new Error(_0x0a26('0x49'));if(_0x432284['role']===_0x0a26('0x48')){var _0x2c8689=_0x3647e9[_0x0a26('0x26')]({'plain':!![]});var _0xded0ab=_0x0a26('0x27');return db[_0x0a26('0x4a')][_0x0a26('0x46')]({'where':{'name':_0xded0ab,'userProfileId':_0x432284[_0x0a26('0x4b')]},'raw':!![]})[_0x0a26('0x25')](function(_0x5d3b34){if(_0x5d3b34&&_0x5d3b34[_0x0a26('0x4c')]===0x0){return db[_0x0a26('0x28')][_0x0a26('0x47')]({'name':_0x2c8689[_0x0a26('0x2b')],'resourceId':_0x2c8689['id'],'type':_0x5d3b34['name'],'sectionId':_0x5d3b34['id']},{})[_0x0a26('0x25')](function(){return _0x3647e9;});}else{return _0x3647e9;}})['catch'](function(_0x3204b4){logger['error'](_0x0a26('0x4d'),_0x3204b4);throw _0x3204b4;});}return _0x3647e9;})['then'](respondWithResult(_0x35ec24,0xc9))[_0x0a26('0x42')](handleError(_0x35ec24,null));};exports['update']=function(_0x1195c2,_0x3d1219){if(_0x1195c2['body']['id']){delete _0x1195c2[_0x0a26('0x4e')]['id'];}return db[_0x0a26('0x2e')][_0x0a26('0x46')]({'where':{'id':_0x1195c2[_0x0a26('0x44')]['id']}})['then'](handleEntityNotFound(_0x3d1219,null))['then'](saveUpdates(_0x1195c2[_0x0a26('0x4e')],null))[_0x0a26('0x25')](respondWithResult(_0x3d1219,null))['catch'](handleError(_0x3d1219,null));};exports[_0x0a26('0x24')]=function(_0x5e0172,_0x281e27){return db['CmCompany'][_0x0a26('0x46')]({'where':{'id':_0x5e0172['params']['id']}})['then'](handleEntityNotFound(_0x281e27,null))[_0x0a26('0x25')](removeEntity(_0x281e27,null))[_0x0a26('0x42')](handleError(_0x281e27,null));};exports[_0x0a26('0x4f')]=function(_0x5ef76d,_0x11b755){return db[_0x0a26('0x2e')][_0x0a26('0x4f')]()[_0x0a26('0x25')](respondWithResult(_0x11b755,null))['catch'](handleError(_0x11b755,null));};exports['addContacts']=function(_0x5701b3,_0x290972,_0x2cae9a){return db['CmContact'][_0x0a26('0x46')]({'where':{'id':_0x5701b3[_0x0a26('0x44')]['id']}})[_0x0a26('0x25')](handleEntityNotFound(_0x290972,null))[_0x0a26('0x25')](function(_0xc6fb5c){if(_0xc6fb5c){return _0xc6fb5c[_0x0a26('0x50')](_0x5701b3[_0x0a26('0x4e')]['ids'],_[_0x0a26('0x51')](_0x5701b3['body'],[_0x0a26('0x52'),'id'])||{});}})['then'](respondWithResult(_0x290972,null))[_0x0a26('0x42')](handleError(_0x290972,null));};exports['getContacts']=function(_0x3aba58,_0x1b5cca,_0x2dfb95){var _0x3f0b51={};var _0x4671c8={};var _0x15b9e7;var _0x484acb;return db['CmCompany']['findOne']({'where':{'id':_0x3aba58[_0x0a26('0x44')]['id']}})[_0x0a26('0x25')](handleEntityNotFound(_0x1b5cca,null))[_0x0a26('0x25')](function(_0x48559f){if(_0x48559f){_0x15b9e7=_0x48559f;_0x4671c8[_0x0a26('0x33')]=_[_0x0a26('0x2f')](db[_0x0a26('0x53')]['rawAttributes']);_0x4671c8['query']=_[_0x0a26('0x2f')](_0x3aba58[_0x0a26('0x30')]);_0x4671c8[_0x0a26('0x31')]=_[_0x0a26('0x32')](_0x4671c8[_0x0a26('0x33')],_0x4671c8['query']);_0x3f0b51[_0x0a26('0x34')]=_[_0x0a26('0x32')](_0x4671c8['model'],qs[_0x0a26('0x35')](_0x3aba58[_0x0a26('0x30')][_0x0a26('0x35')]));_0x3f0b51[_0x0a26('0x34')]=_0x3f0b51[_0x0a26('0x34')][_0x0a26('0x36')]?_0x3f0b51[_0x0a26('0x34')]:_0x4671c8[_0x0a26('0x33')];_0x3f0b51[_0x0a26('0x39')]=qs[_0x0a26('0x3a')](_0x3aba58[_0x0a26('0x30')]['sort']);_0x3f0b51[_0x0a26('0x3b')]=qs[_0x0a26('0x31')](_[_0x0a26('0x54')](_0x3aba58[_0x0a26('0x30')],_0x4671c8[_0x0a26('0x31')]));if(_0x3aba58[_0x0a26('0x30')]['filter']){_0x3f0b51[_0x0a26('0x3b')]=_[_0x0a26('0x3c')](_0x3f0b51[_0x0a26('0x3b')],{'$or':_[_0x0a26('0x3d')](_0x3f0b51[_0x0a26('0x34')],function(_0x6feca8){var _0x1b60d7={};_0x1b60d7[_0x6feca8]={'$like':'%'+_0x3aba58['query'][_0x0a26('0x3e')]+'%'};return _0x1b60d7;})});}_0x3f0b51=_[_0x0a26('0x3c')]({},_0x3f0b51,_0x3aba58[_0x0a26('0x55')]);return _0x15b9e7[_0x0a26('0x56')](_0x3f0b51);}})['then'](function(_0x1208a4){if(_0x1208a4){_0x484acb=_0x1208a4[_0x0a26('0x36')];if(!_0x3aba58[_0x0a26('0x30')][_0x0a26('0x37')](_0x0a26('0x38'))){_0x3f0b51[_0x0a26('0x1e')]=qs[_0x0a26('0x1e')](_0x3aba58[_0x0a26('0x30')][_0x0a26('0x1e')]);_0x3f0b51[_0x0a26('0x1c')]=qs[_0x0a26('0x1c')](_0x3aba58[_0x0a26('0x30')]['offset']);}return _0x15b9e7[_0x0a26('0x56')](_0x3f0b51);}})[_0x0a26('0x25')](function(_0xb644b5){if(_0xb644b5){return _0xb644b5?{'count':_0x484acb,'rows':_0xb644b5}:null;}})[_0x0a26('0x25')](respondWithResult(_0x1b5cca,null))['catch'](handleError(_0x1b5cca,null));};
\ No newline at end of file
index 226ddf5..ce1e254 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x766c=['cm_companies','lodash','util','api','bluebird','request-promise','path','rimraf','../../config/environment','./cmCompany.attributes','exports','CmCompany'];(function(_0xcf5436,_0x4632c3){var _0xc4f5c8=function(_0x567528){while(--_0x567528){_0xcf5436['push'](_0xcf5436['shift']());}};_0xc4f5c8(++_0x4632c3);}(_0x766c,0xfd));var _0xc766=function(_0x363b9c,_0x175500){_0x363b9c=_0x363b9c-0x0;var _0x2a8edd=_0x766c[_0x363b9c];return _0x2a8edd;};'use strict';var _=require(_0xc766('0x0'));var util=require(_0xc766('0x1'));var logger=require('../../config/logger')(_0xc766('0x2'));var moment=require('moment');var BPromise=require(_0xc766('0x3'));var rp=require(_0xc766('0x4'));var fs=require('fs');var path=require(_0xc766('0x5'));var rimraf=require(_0xc766('0x6'));var config=require(_0xc766('0x7'));var attributes=require(_0xc766('0x8'));module[_0xc766('0x9')]=function(_0x5aea45,_0x5f23a0){return _0x5aea45['define'](_0xc766('0xa'),attributes,{'tableName':_0xc766('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x3d1f=['../../config/environment','./cmCompany.attributes','define','cm_companies','lodash','api','moment','request-promise','path','rimraf'];(function(_0x30e913,_0x126626){var _0x3b02ac=function(_0x2efe93){while(--_0x2efe93){_0x30e913['push'](_0x30e913['shift']());}};_0x3b02ac(++_0x126626);}(_0x3d1f,0x176));var _0xf3d1=function(_0x2b90b8,_0x2d2fa4){_0x2b90b8=_0x2b90b8-0x0;var _0x3b2fe9=_0x3d1f[_0x2b90b8];return _0x3b2fe9;};'use strict';var _=require(_0xf3d1('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xf3d1('0x1'));var moment=require(_0xf3d1('0x2'));var BPromise=require('bluebird');var rp=require(_0xf3d1('0x3'));var fs=require('fs');var path=require(_0xf3d1('0x4'));var rimraf=require(_0xf3d1('0x5'));var config=require(_0xf3d1('0x6'));var attributes=require(_0xf3d1('0x7'));module['exports']=function(_0x38a4d1,_0x3b0c8c){return _0x38a4d1[_0xf3d1('0x8')]('CmCompany',attributes,{'tableName':_0xf3d1('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index c5a12e8..2258509 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x525d=['catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','CmCompany,\x20%s,\x20%s','request\x20sent','debug','CmCompany,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x525d,0x1c3));var _0xd525=function(_0x28ea42,_0x19a083){_0x28ea42=_0x28ea42-0x0;var _0x17318d=_0x525d[_0x28ea42];return _0x17318d;};'use strict';var _=require(_0xd525('0x0'));var util=require('util');var moment=require(_0xd525('0x1'));var BPromise=require('bluebird');var rs=require(_0xd525('0x2'));var fs=require('fs');var Redis=require(_0xd525('0x3'));var db=require(_0xd525('0x4'))['db'];var utils=require(_0xd525('0x5'));var logger=require(_0xd525('0x6'))(_0xd525('0x7'));var config=require(_0xd525('0x8'));var jayson=require(_0xd525('0x9'));var client=jayson[_0xd525('0xa')][_0xd525('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x284b3f,_0x4297c2,_0x4c94b0){return new BPromise(function(_0x4dc26b,_0x4277c9){return client[_0xd525('0xc')](_0x284b3f,_0x4c94b0)[_0xd525('0xd')](function(_0x48962f){logger[_0xd525('0xe')](_0xd525('0xf'),_0x4297c2,_0xd525('0x10'));logger[_0xd525('0x11')](_0xd525('0x12'),_0x4297c2,_0xd525('0x10'),JSON[_0xd525('0x13')](_0x48962f));if(_0x48962f[_0xd525('0x14')]){if(_0x48962f[_0xd525('0x14')][_0xd525('0x15')]===0x1f4){logger[_0xd525('0x14')](_0xd525('0xf'),_0x4297c2,_0x48962f['error'][_0xd525('0x16')]);return _0x4277c9(_0x48962f[_0xd525('0x14')][_0xd525('0x16')]);}logger[_0xd525('0x14')](_0xd525('0xf'),_0x4297c2,_0x48962f['error'][_0xd525('0x16')]);return _0x4dc26b(_0x48962f[_0xd525('0x14')][_0xd525('0x16')]);}else{logger['info'](_0xd525('0xf'),_0x4297c2,'request\x20sent');_0x4dc26b(_0x48962f[_0xd525('0x17')][_0xd525('0x16')]);}})[_0xd525('0x18')](function(_0x1dc629){logger[_0xd525('0x14')](_0xd525('0xf'),_0x4297c2,_0x1dc629);_0x4277c9(_0x1dc629);});});}
\ No newline at end of file
+var _0x69d5=['request\x20sent','debug','stringify','error','code','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','CmCompany,\x20%s,\x20%s'];(function(_0x240c87,_0x50d230){var _0x9e99d8=function(_0x17c4df){while(--_0x17c4df){_0x240c87['push'](_0x240c87['shift']());}};_0x9e99d8(++_0x50d230);}(_0x69d5,0xb7));var _0x569d=function(_0x53e2e1,_0x2d5806){_0x53e2e1=_0x53e2e1-0x0;var _0x5bbafb=_0x69d5[_0x53e2e1];return _0x5bbafb;};'use strict';var _=require(_0x569d('0x0'));var util=require(_0x569d('0x1'));var moment=require('moment');var BPromise=require(_0x569d('0x2'));var rs=require(_0x569d('0x3'));var fs=require('fs');var Redis=require(_0x569d('0x4'));var db=require(_0x569d('0x5'))['db'];var utils=require(_0x569d('0x6'));var logger=require(_0x569d('0x7'))(_0x569d('0x8'));var config=require(_0x569d('0x9'));var jayson=require(_0x569d('0xa'));var client=jayson[_0x569d('0xb')][_0x569d('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x221c29,_0x330a50,_0x4ced10){return new BPromise(function(_0x21547e,_0x445954){return client[_0x569d('0xd')](_0x221c29,_0x4ced10)[_0x569d('0xe')](function(_0x27a97f){logger[_0x569d('0xf')](_0x569d('0x10'),_0x330a50,_0x569d('0x11'));logger[_0x569d('0x12')]('CmCompany,\x20%s,\x20%s,\x20%s',_0x330a50,'request\x20sent',JSON[_0x569d('0x13')](_0x27a97f));if(_0x27a97f[_0x569d('0x14')]){if(_0x27a97f['error'][_0x569d('0x15')]===0x1f4){logger[_0x569d('0x14')]('CmCompany,\x20%s,\x20%s',_0x330a50,_0x27a97f[_0x569d('0x14')][_0x569d('0x16')]);return _0x445954(_0x27a97f['error']['message']);}logger[_0x569d('0x14')]('CmCompany,\x20%s,\x20%s',_0x330a50,_0x27a97f[_0x569d('0x14')][_0x569d('0x16')]);return _0x21547e(_0x27a97f[_0x569d('0x14')][_0x569d('0x16')]);}else{logger[_0x569d('0xf')](_0x569d('0x10'),_0x330a50,_0x569d('0x11'));_0x21547e(_0x27a97f[_0x569d('0x17')][_0x569d('0x16')]);}})[_0x569d('0x18')](function(_0x540e93){logger[_0x569d('0x14')](_0x569d('0x10'),_0x330a50,_0x540e93);_0x445954(_0x540e93);});});}
\ No newline at end of file
index e01ac7c..52fa532 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0e4f=['destroy','exports','multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmCompany.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/contacts','getContacts','post','addContacts','put','update','delete'];(function(_0x585d81,_0xf6d74f){var _0x1aca0d=function(_0x3782d3){while(--_0x3782d3){_0x585d81['push'](_0x585d81['shift']());}};_0x1aca0d(++_0xf6d74f);}(_0x0e4f,0xca));var _0xf0e4=function(_0x5f0cd9,_0x2a7359){_0x5f0cd9=_0x5f0cd9-0x0;var _0x4f9c59=_0x0e4f[_0x5f0cd9];return _0x4f9c59;};'use strict';var multer=require(_0xf0e4('0x0'));var util=require('util');var path=require(_0xf0e4('0x1'));var timeout=require(_0xf0e4('0x2'));var express=require('express');var router=express[_0xf0e4('0x3')]();var fs_extra=require(_0xf0e4('0x4'));var auth=require(_0xf0e4('0x5'));var interaction=require(_0xf0e4('0x6'));var config=require(_0xf0e4('0x7'));var controller=require(_0xf0e4('0x8'));router[_0xf0e4('0x9')]('/',auth[_0xf0e4('0xa')](),controller[_0xf0e4('0xb')]);router[_0xf0e4('0x9')](_0xf0e4('0xc'),auth[_0xf0e4('0xa')](),controller[_0xf0e4('0xd')]);router[_0xf0e4('0x9')](_0xf0e4('0xe'),auth[_0xf0e4('0xa')](),controller[_0xf0e4('0xf')]);router[_0xf0e4('0x9')](_0xf0e4('0x10'),auth['isAuthenticated'](),controller[_0xf0e4('0x11')]);router[_0xf0e4('0x12')]('/',auth[_0xf0e4('0xa')](),controller['create']);router[_0xf0e4('0x12')]('/:id/contacts',auth['isAuthenticated'](),controller[_0xf0e4('0x13')]);router[_0xf0e4('0x14')](_0xf0e4('0xe'),auth[_0xf0e4('0xa')](),controller[_0xf0e4('0x15')]);router[_0xf0e4('0x16')](_0xf0e4('0xe'),auth[_0xf0e4('0xa')](),controller[_0xf0e4('0x17')]);module[_0xf0e4('0x18')]=router;
\ No newline at end of file
+var _0x6b80=['index','/describe','describe','isAuthenticated','show','/:id/contacts','getContacts','post','create','addContacts','put','/:id','update','delete','exports','multer','util','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmCompany.controller','get'];(function(_0x49f8c2,_0x5166b7){var _0x3e63ec=function(_0x575c26){while(--_0x575c26){_0x49f8c2['push'](_0x49f8c2['shift']());}};_0x3e63ec(++_0x5166b7);}(_0x6b80,0x177));var _0x06b8=function(_0x35e54a,_0x46953a){_0x35e54a=_0x35e54a-0x0;var _0x35c2b0=_0x6b80[_0x35e54a];return _0x35c2b0;};'use strict';var multer=require(_0x06b8('0x0'));var util=require(_0x06b8('0x1'));var path=require('path');var timeout=require(_0x06b8('0x2'));var express=require('express');var router=express[_0x06b8('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x06b8('0x4'));var interaction=require(_0x06b8('0x5'));var config=require(_0x06b8('0x6'));var controller=require(_0x06b8('0x7'));router[_0x06b8('0x8')]('/',auth['isAuthenticated'](),controller[_0x06b8('0x9')]);router[_0x06b8('0x8')](_0x06b8('0xa'),auth['isAuthenticated'](),controller[_0x06b8('0xb')]);router[_0x06b8('0x8')]('/:id',auth[_0x06b8('0xc')](),controller[_0x06b8('0xd')]);router[_0x06b8('0x8')](_0x06b8('0xe'),auth[_0x06b8('0xc')](),controller[_0x06b8('0xf')]);router[_0x06b8('0x10')]('/',auth[_0x06b8('0xc')](),controller[_0x06b8('0x11')]);router[_0x06b8('0x10')]('/:id/contacts',auth[_0x06b8('0xc')](),controller[_0x06b8('0x12')]);router[_0x06b8('0x13')](_0x06b8('0x14'),auth[_0x06b8('0xc')](),controller[_0x06b8('0x15')]);router[_0x06b8('0x16')]('/:id',auth[_0x06b8('0xc')](),controller['destroy']);module[_0x06b8('0x17')]=router;
\ No newline at end of file
index 75e702f..9b09850 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x241b=['STRING','TEXT','INTEGER','UNSIGNED','DATE','NOW','lodash','sequelize','exports'];(function(_0x5b7b6a,_0x4928a0){var _0x40aa78=function(_0x142851){while(--_0x142851){_0x5b7b6a['push'](_0x5b7b6a['shift']());}};_0x40aa78(++_0x4928a0);}(_0x241b,0x165));var _0xb241=function(_0x2c6665,_0x506b4b){_0x2c6665=_0x2c6665-0x0;var _0x3cf7a4=_0x241b[_0x2c6665];return _0x3cf7a4;};'use strict';var _=require(_0xb241('0x0'));var Sequelize=require(_0xb241('0x1'));module[_0xb241('0x2')]={'firstName':{'type':Sequelize['STRING'],'allowNull':![]},'lastName':{'type':Sequelize[_0xb241('0x3')]},'street':{'type':Sequelize[_0xb241('0x3')]},'postalCode':{'type':Sequelize[_0xb241('0x3')]},'city':{'type':Sequelize['STRING']},'country':{'type':Sequelize[_0xb241('0x3')]},'dateOfBirth':{'type':Sequelize[_0xb241('0x3')]},'description':{'type':Sequelize[_0xb241('0x4')]},'phone':{'type':Sequelize[_0xb241('0x3')]},'mobile':{'type':Sequelize['STRING']},'fax':{'type':Sequelize[_0xb241('0x3')]},'email':{'type':Sequelize[_0xb241('0x3')]},'url':{'type':Sequelize[_0xb241('0x3')]},'facebook':{'type':Sequelize['STRING']},'fb_data':{'type':Sequelize['STRING']},'twitter':{'type':Sequelize[_0xb241('0x3')]},'skype':{'type':Sequelize[_0xb241('0x3')]},'teams':{'type':Sequelize[_0xb241('0x3')]},'viber':{'type':Sequelize[_0xb241('0x3')]},'line':{'type':Sequelize[_0xb241('0x3')]},'wechat':{'type':Sequelize[_0xb241('0x3')]},'telegram':{'type':Sequelize[_0xb241('0x3')]},'UserId':{'type':Sequelize[_0xb241('0x5')]},'AdditionalPhones':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0xb241('0x5')](0x2)[_0xb241('0x6')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0xb241('0x7')],'defaultValue':Sequelize[_0xb241('0x8')]},'dialTimezone':{'type':Sequelize['STRING']},'utcOffset':{'type':Sequelize[_0xb241('0x5')]}};
\ No newline at end of file
+var _0x7e87=['DATE','NOW','lodash','exports','STRING','TEXT','INTEGER'];(function(_0x231795,_0x5a2a61){var _0x265c4f=function(_0x26d1d3){while(--_0x26d1d3){_0x231795['push'](_0x231795['shift']());}};_0x265c4f(++_0x5a2a61);}(_0x7e87,0xa3));var _0x77e8=function(_0x20c8d0,_0x218a35){_0x20c8d0=_0x20c8d0-0x0;var _0x37d967=_0x7e87[_0x20c8d0];return _0x37d967;};'use strict';var _=require(_0x77e8('0x0'));var Sequelize=require('sequelize');module[_0x77e8('0x1')]={'firstName':{'type':Sequelize[_0x77e8('0x2')],'allowNull':![]},'lastName':{'type':Sequelize[_0x77e8('0x2')]},'street':{'type':Sequelize[_0x77e8('0x2')]},'postalCode':{'type':Sequelize['STRING']},'city':{'type':Sequelize[_0x77e8('0x2')]},'country':{'type':Sequelize['STRING']},'dateOfBirth':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x77e8('0x3')]},'phone':{'type':Sequelize[_0x77e8('0x2')]},'mobile':{'type':Sequelize[_0x77e8('0x2')]},'fax':{'type':Sequelize['STRING']},'email':{'type':Sequelize[_0x77e8('0x2')]},'url':{'type':Sequelize[_0x77e8('0x2')]},'facebook':{'type':Sequelize[_0x77e8('0x2')]},'fb_data':{'type':Sequelize['STRING']},'twitter':{'type':Sequelize[_0x77e8('0x2')]},'skype':{'type':Sequelize['STRING']},'teams':{'type':Sequelize['STRING']},'viber':{'type':Sequelize[_0x77e8('0x2')]},'line':{'type':Sequelize[_0x77e8('0x2')]},'wechat':{'type':Sequelize[_0x77e8('0x2')]},'telegram':{'type':Sequelize['STRING']},'UserId':{'type':Sequelize[_0x77e8('0x4')]},'AdditionalPhones':{'type':Sequelize['STRING']},'priority':{'type':Sequelize['INTEGER'](0x2)['UNSIGNED'],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'scheduledat':{'type':Sequelize[_0x77e8('0x5')],'defaultValue':Sequelize[_0x77e8('0x6')]},'dialTimezone':{'type':Sequelize[_0x77e8('0x2')]},'utcOffset':{'type':Sequelize[_0x77e8('0x4')]}};
\ No newline at end of file
index f25a82c..e2a146d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2e0b=['MailMessage','SmsInteraction','SmsMessage','FaxInteraction','CmContactHasItem','CmHopperFinal','VoiceCallReport','ChatQueueReport','FaxQueueReport','MailQueueReport','OpenchannelQueueReport','SmsQueueReport','JscriptySessionReport','WhatsappQueueReport','create','isNil','dialTimezone','timezones','utcOffset','bulkCreate','each','duplicates','where','$or','push','ListId','findOrCreate','spread','hasOwnProperty','additionalPhones','contact','all','show','Tag','Tags','color','tag','Phones','ContactItemType','ItemType','sequelize','Phones.OrderBy','omit','map','cf_%d','$and','pickBy','format','isEmpty','table','cm_contacts','setFields','id\x20=\x20?','toParam','text','values','phone','getTags','findOne','filters','intersection','attributes','fields','model','order','sort','pick','filter','options','nolimit','limit','setTags','ids','setAdditionalPhones','OrderBy','item_types','items','ItemTypeId','description','contact\x20phone\x20exists','PHONE','CmHopperAdditionalPhone','item','literal','`ItemType`.OrderBy','CmHopperId','ItemType.OrderBy','getAdditionalPhones','duplicateAdditionalPhones','fromContactId','toContactId','rescheduleAdditionalPhones','hopperId','getHoppers','rawAttributes','ContactId','include','rows','getHopperHistories','CmHopperHistory','includeAll','getHopperFinals','uploadCsv','No\x20ListId\x20specified','binding_keys','No\x20association\x20keys\x20specified!','No\x20association\x20values\x20specified!','socket_timestamp','Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed','split','binding_values','Incorrect\x20binding\x20parameters\x20passed!','No\x20phone\x20column\x20specified','firstName','No\x20firstName\x20column\x20specified','join','root','server/files/tmp','filename','chmodSync','child_process','fork','../../components/import/cm/csv','CompanyId','File\x20uploaded\x20correctly!','createReadStream','parse','meta','import','User','agent','binding','../../components/import/cm/csv2','stringify','message','start\x20child\x20process\x20correctly!','pid','exit','error\x20child\x20process','importUpdates','getJourney','mail','chat','sms','openchannel','fax','voice','-createdAt','resolve','channel','includes','toLowerCase','Invalid\x20channel','range','isValid','Invalid\x20date\x20for\x20range\x20from\x20filter','Invalid\x20createdAt\x20filter','uniqueid','source','destination','callerid','starttime','endtime','duration','note','createdAt','userDisposition','userSecondDisposition','userThirdDisposition','UserId','fullname','alias','findAndCountAll','startCase','Website','closed','closedAt','disposition','secondDisposition','thirdDisposition','Account','key','DESC','browserName','customerIp','customerPort','osName','ratingMessage','ratingType','ratingValue','subject','substatus','externalUrl','Interaction','Owner','flatten','sortBy','reverse','value','slice','bluebird','util','path','ioredis','../../components/contacts','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../config/environment/shared','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./cmContact.socket','register','status','undefined','offset','count','set','json','update','then','destroy','error','stack','name','send','describe','getOptions','query','user','catch','CmContact','find','params','tags','keys','cf_','columnName','displayName','CmCustomField','findAll','length','custom','type','info','Custom\x20field\x20%s\x20not\x20found\x20on\x20cm_contacts\x20table','forEach','merge','body','from','get','mergeWith','isArray','[CmContact][merge]\x20to\x20%s\x20from\x20%s','CmHopper','[CmContact][merge][destroy][CmHopper],\x20%s','CmHopperBlack','[CmContact][merge][destroy][CmHopperBlack],\x20%s','ChatOfflineMessage','MailInteraction'];(function(_0x4828f3,_0x5774b6){var _0x8a2a6=function(_0x5d82dd){while(--_0x5d82dd){_0x4828f3['push'](_0x4828f3['shift']());}};_0x8a2a6(++_0x5774b6);}(_0x2e0b,0xc8));var _0xb2e0=function(_0x243cca,_0x514c2d){_0x243cca=_0x243cca-0x0;var _0xf94771=_0x2e0b[_0x243cca];return _0xf94771;};'use strict';var moment=require('moment');var BPromise=require(_0xb2e0('0x0'));var util=require(_0xb2e0('0x1'));var path=require(_0xb2e0('0x2'));var fs=require('fs');var _=require('lodash');var squel=require('squel');var Papa=require('papaparse');var Redis=require(_0xb2e0('0x3'));var contacts=require(_0xb2e0('0x4'));var qs=require(_0xb2e0('0x5'));var logger=require(_0xb2e0('0x6'))(_0xb2e0('0x7'));var config=require(_0xb2e0('0x8'));var shared=require(_0xb2e0('0x9'));var db=require(_0xb2e0('0xa'))['db'];config['redis']=_[_0xb2e0('0xb')](config[_0xb2e0('0xc')],{'host':_0xb2e0('0xd'),'port':0x18eb});var socket=require(_0xb2e0('0xe'))(new Redis(config[_0xb2e0('0xc')]));require(_0xb2e0('0xf'))[_0xb2e0('0x10')](socket);function respondWithResult(_0x403c3b,_0x38431e){_0x38431e=_0x38431e||0xc8;return function(_0x48d827){if(_0x48d827){return _0x403c3b[_0xb2e0('0x11')](_0x38431e)['json'](_0x48d827);}};}function respondWithFilteredResult(_0x1dd361,_0x4d193b){return function(_0x15dc3f){if(_0x15dc3f){var _0x443a6c=typeof _0x4d193b['offset']==='undefined'&&typeof _0x4d193b['limit']===_0xb2e0('0x12');var _0x501f5e=_0x15dc3f['count'];var _0x25a0a4=_0x443a6c?0x0:_0x4d193b[_0xb2e0('0x13')];var _0x4073a0=_0x443a6c?_0x15dc3f[_0xb2e0('0x14')]:_0x4d193b[_0xb2e0('0x13')]+_0x4d193b['limit'];var _0x3b35f0;if(_0x4073a0>=_0x501f5e){_0x4073a0=_0x501f5e;_0x3b35f0=0xc8;}else{_0x3b35f0=0xce;}_0x1dd361[_0xb2e0('0x11')](_0x3b35f0);return _0x1dd361[_0xb2e0('0x15')]('Content-Range',_0x25a0a4+'-'+_0x4073a0+'/'+_0x501f5e)[_0xb2e0('0x16')](_0x15dc3f);}return null;};}function saveUpdates(_0x3c2e3f){return function(_0x3cbeea){if(_0x3cbeea){return _0x3cbeea[_0xb2e0('0x17')](_0x3c2e3f)[_0xb2e0('0x18')](function(_0x1c6228){return _0x1c6228;});}return null;};}function removeEntity(_0x491c3d){return function(_0xaa3c25){if(_0xaa3c25){return _0xaa3c25[_0xb2e0('0x19')]()[_0xb2e0('0x18')](function(){_0x491c3d[_0xb2e0('0x11')](0xcc)['end']();});}};}function handleEntityNotFound(_0xdbe8e7){return function(_0x530991){if(!_0x530991){_0xdbe8e7['sendStatus'](0x194);}return _0x530991;};}function handleError(_0x3caf19,_0x3eb989){_0x3eb989=_0x3eb989||0x1f4;return function(_0x2f4bee){logger[_0xb2e0('0x1a')](_0x2f4bee[_0xb2e0('0x1b')]);if(_0x2f4bee[_0xb2e0('0x1c')]){delete _0x2f4bee['name'];}_0x3caf19[_0xb2e0('0x11')](_0x3eb989)[_0xb2e0('0x1d')](_0x2f4bee);};}exports['index']=function(_0x407aae,_0x1fadce){var _0xd15daf={};return contacts[_0xb2e0('0x1e')]()[_0xb2e0('0x18')](function(_0xb931bd){_0xd15daf=qs[_0xb2e0('0x1f')](_0xb931bd,_0x407aae);return contacts['findAll'](_0x407aae[_0xb2e0('0x20')],_0x407aae[_0xb2e0('0x21')],_0xd15daf,_0xb931bd);})[_0xb2e0('0x18')](respondWithFilteredResult(_0x1fadce,_0xd15daf))[_0xb2e0('0x22')](handleError(_0x1fadce,null));};exports[_0xb2e0('0x19')]=function(_0x54a678,_0x58e7e5){return db[_0xb2e0('0x23')][_0xb2e0('0x24')]({'where':{'id':_0x54a678[_0xb2e0('0x25')]['id']}})['then'](handleEntityNotFound(_0x58e7e5,null))[_0xb2e0('0x18')](removeEntity(_0x58e7e5,null))[_0xb2e0('0x22')](handleError(_0x58e7e5,null));};exports[_0xb2e0('0x1e')]=function(_0xa1e3a8,_0x42890e){return db[_0xb2e0('0x23')][_0xb2e0('0x1e')]()[_0xb2e0('0x18')](function(_0x407e15){delete _0x407e15[_0xb2e0('0x26')];for(var _0x3e8e85=0x0;_0x3e8e85<Object[_0xb2e0('0x27')](_0x407e15)['length'];_0x3e8e85++){var _0x220056=Object['keys'](_0x407e15)[_0x3e8e85];if(!_['startsWith'](_0x220056,_0xb2e0('0x28'))){_0x407e15[_0x220056][_0xb2e0('0x29')]=_0x220056;_0x407e15[_0x220056][_0xb2e0('0x2a')]=_0x220056;}}return _0x407e15;})['then'](function(_0x4c1f43){var _0x216d93={'where':Boolean(_0xa1e3a8[_0xb2e0('0x20')]['analytics'])===!![]?undefined:{'$or':[{'ListId':_0xa1e3a8['query']['id']},{'ListId':null}]},'raw':!![]};return db[_0xb2e0('0x2b')][_0xb2e0('0x2c')](_0x216d93)[_0xb2e0('0x18')](function(_0x562642){for(var _0x2b8e15=0x0;_0x2b8e15<_0x562642[_0xb2e0('0x2d')];_0x2b8e15++){var _0x1f6915=_0xb2e0('0x28')+_0x562642[_0x2b8e15]['id'];if(_0x4c1f43[_0x1f6915]){_0x4c1f43[_0x1f6915][_0xb2e0('0x29')]=_0x1f6915;_0x4c1f43[_0x1f6915][_0xb2e0('0x2a')]=_0x562642[_0x2b8e15]['alias'];_0x4c1f43[_0x1f6915][_0xb2e0('0x2e')]={'type':_0x562642[_0x2b8e15][_0xb2e0('0x2f')],'values':_0x562642[_0x2b8e15]['values']};}else{logger[_0xb2e0('0x30')](_0xb2e0('0x31'),_0x1f6915);}}Object[_0xb2e0('0x27')](_0x4c1f43)[_0xb2e0('0x32')](function(_0x4048e5){if(!_0x4c1f43[_0x4048e5]['hasOwnProperty']('columnName')){delete _0x4c1f43[_0x4048e5];}});return _0x4c1f43;});})[_0xb2e0('0x18')](respondWithResult(_0x42890e,null))[_0xb2e0('0x22')](handleError(_0x42890e,null));};exports[_0xb2e0('0x33')]=function(_0x391900,_0x223c8c){var _0x4652d9;var _0x3a0076;var _0xb7ee0c;if(_0x391900['body']['id']){delete _0x391900['body']['id'];}return db[_0xb2e0('0x23')][_0xb2e0('0x2c')]({'where':{'id':[_0x391900[_0xb2e0('0x34')]['to'],_0x391900[_0xb2e0('0x34')][_0xb2e0('0x35')]]}})[_0xb2e0('0x18')](function(_0x3da7b7){if(_0x3da7b7){if(_0x3da7b7[_0xb2e0('0x2d')]!==0x2){return null;}_0x3da7b7[0x0]=_0x3da7b7[0x0]['get']({'plain':!![]});_0x3da7b7[0x1]=_0x3da7b7[0x1][_0xb2e0('0x36')]({'plain':!![]});delete _0x3da7b7[0x0]['id'];delete _0x3da7b7[0x1]['id'];return _[_0xb2e0('0x37')](_0x3da7b7[0x0],_0x3da7b7[0x1],function(_0x3b9b25,_0x43b2f8){if(Array[_0xb2e0('0x38')](_0x43b2f8)&&!_0x43b2f8['length']){return _0x3b9b25;}else if(!_0x43b2f8){return _0x3b9b25;}});}})[_0xb2e0('0x18')](handleEntityNotFound(_0x223c8c,null))[_0xb2e0('0x18')](function(_0x517621){if(_0x517621){if(_0x517621['tags']&&_[_0xb2e0('0x38')](_0x517621[_0xb2e0('0x26')])){_0x517621[_0xb2e0('0x26')]=_0x517621['tags']['join']();}logger[_0xb2e0('0x30')](_0xb2e0('0x39'),_0x391900['body']['to'],_0x391900[_0xb2e0('0x34')]['from']);return db[_0xb2e0('0x3a')][_0xb2e0('0x19')]({'where':{'ContactId':[_0x391900[_0xb2e0('0x34')]['to'],_0x391900[_0xb2e0('0x34')]['from']]}})[_0xb2e0('0x18')](function(_0x3b2752){logger[_0xb2e0('0x30')](_0xb2e0('0x3b'),_0x3b2752);return db[_0xb2e0('0x3c')][_0xb2e0('0x19')]({'where':{'ContactId':[_0x391900[_0xb2e0('0x34')]['to'],_0x391900[_0xb2e0('0x34')]['from']]}})[_0xb2e0('0x18')](function(_0x28a8fc){logger['info'](_0xb2e0('0x3d'),_0x28a8fc);return db[_0xb2e0('0x23')]['create'](_0x517621);});});}})[_0xb2e0('0x18')](function(_0x39dd9e){if(_0x39dd9e){_0x4652d9=_0x39dd9e;_0x3a0076={'ContactId':_0x4652d9['id']};_0xb7ee0c={'where':{'ContactId':[_0x391900[_0xb2e0('0x34')]['to'],_0x391900[_0xb2e0('0x34')][_0xb2e0('0x35')]]}};return db['ChatInteraction'][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})['then'](function(){if(_0x4652d9){return db['ChatMessage'][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})['then'](function(){if(_0x4652d9){return db[_0xb2e0('0x3e')][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db[_0xb2e0('0x3f')][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db[_0xb2e0('0x40')][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})['then'](function(){if(_0x4652d9){return db[_0xb2e0('0x3f')][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db[_0xb2e0('0x40')]['update'](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db[_0xb2e0('0x41')]['update'](_0x3a0076,_0xb7ee0c);}})['then'](function(){if(_0x4652d9){return db[_0xb2e0('0x42')]['update'](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db[_0xb2e0('0x43')]['update'](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db['FaxMessage'][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db['OpenchannelInteraction'][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db['OpenchannelMessage'][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db[_0xb2e0('0x44')][_0xb2e0('0x17')]({'CmContactId':_0x4652d9['id']},{'where':{'CmContactId':[_0x391900['body']['to'],_0x391900[_0xb2e0('0x34')][_0xb2e0('0x35')]]}});}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db[_0xb2e0('0x45')]['update'](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db['CmHopperHistory'][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db['ReportAgentPreview'][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db[_0xb2e0('0x46')][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})['then'](function(){if(_0x4652d9){return db[_0xb2e0('0x47')]['update'](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db[_0xb2e0('0x48')][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db[_0xb2e0('0x49')][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db[_0xb2e0('0x4a')][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db[_0xb2e0('0x4b')][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db[_0xb2e0('0x4c')]['update'](_0x3a0076,_0xb7ee0c);}})['then'](function(){if(_0x4652d9){return db['WhatsappInteraction']['update'](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db['WhatsappMessage'][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db[_0xb2e0('0x4d')][_0xb2e0('0x17')](_0x3a0076,_0xb7ee0c);}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return db[_0xb2e0('0x23')][_0xb2e0('0x19')]({'where':{'id':[_0x391900[_0xb2e0('0x34')]['to'],_0x391900['body'][_0xb2e0('0x35')]]}});}})[_0xb2e0('0x18')](function(){if(_0x4652d9){return _0x4652d9;}})[_0xb2e0('0x18')](respondWithResult(_0x223c8c,null))[_0xb2e0('0x22')](handleError(_0x223c8c,null));};exports[_0xb2e0('0x4e')]=function(_0x25c6cc,_0x400f91){return db['CmContact'][_0xb2e0('0x1e')]()['then'](function(_0x21c642){if(_0x25c6cc[_0xb2e0('0x34')][_0xb2e0('0x26')]&&_[_0xb2e0('0x38')](_0x25c6cc[_0xb2e0('0x34')][_0xb2e0('0x26')])){if(_0x25c6cc[_0xb2e0('0x34')][_0xb2e0('0x26')]['length']){_0x25c6cc[_0xb2e0('0x34')]['tags']=_0x25c6cc[_0xb2e0('0x34')][_0xb2e0('0x26')]['join'](';')+';';}else{_0x25c6cc[_0xb2e0('0x34')]['tags']=null;}}else{_0x25c6cc[_0xb2e0('0x34')][_0xb2e0('0x26')]=null;}if(!_[_0xb2e0('0x4f')](_0x25c6cc[_0xb2e0('0x34')][_0xb2e0('0x50')])){var _0x490ae0=_0x25c6cc['body']['dialTimezone'];if(!_['isNil'](shared[_0xb2e0('0x51')][_0x490ae0]))_0x25c6cc[_0xb2e0('0x34')]['utcOffset']=shared[_0xb2e0('0x51')][_0x490ae0][_0xb2e0('0x52')];}return db['CmContact'][_0xb2e0('0x4e')](_0x25c6cc[_0xb2e0('0x34')],{'fields':_[_0xb2e0('0x27')](_0x21c642),'raw':!![]});})[_0xb2e0('0x18')](function(_0x39557a){if(_0x25c6cc[_0xb2e0('0x34')]['additionalPhones']){return insertAdditionalPhones(_0x39557a,_0x25c6cc['body']['additionalPhones']);}else{return _0x39557a;}})['then'](respondWithResult(_0x400f91,0xc9))[_0xb2e0('0x22')](handleError(_0x400f91,null));};exports[_0xb2e0('0x53')]=function(_0x51890f,_0x56d6c0){var _0x2b6092=0x0;var _0x1d5b7e=0x0;var _0x201775=0x0;var _0x56bd11=[];return db[_0xb2e0('0x23')][_0xb2e0('0x1e')]()[_0xb2e0('0x18')](function(_0x3a9ff4){return BPromise[_0xb2e0('0x54')](_0x51890f[_0xb2e0('0x34')],function(_0x4fb602){var _0x5a1dce={'where':{'$or':[]},'defaults':_0x4fb602,'fields':_[_0xb2e0('0x27')](_0x3a9ff4),'raw':!![]};if(_0x4fb602[_0xb2e0('0x55')]){for(var _0x5f57f2=0x0;_0x5f57f2<_0x4fb602[_0xb2e0('0x55')][_0xb2e0('0x2d')];_0x5f57f2++){var _0x5e4213={};_0x5e4213[_0x4fb602['duplicates'][_0x5f57f2]]=_0x4fb602[_0x4fb602[_0xb2e0('0x55')][_0x5f57f2]];_0x5a1dce[_0xb2e0('0x56')][_0xb2e0('0x57')][_0xb2e0('0x58')](_0x5e4213);}_0x5a1dce[_0xb2e0('0x56')][_0xb2e0('0x59')]=_0x4fb602[_0xb2e0('0x59')];}return db[_0xb2e0('0x23')][_0xb2e0('0x5a')](_0x5a1dce)[_0xb2e0('0x5b')](function(_0x475e24,_0x104b9e){if(_0x104b9e){if(_0x4fb602[_0xb2e0('0x5c')](_0xb2e0('0x5d'))){_0x56bd11[_0xb2e0('0x58')]({'contact':_0x475e24,'additionalPhones':_0x4fb602['additionalPhones']});}_0x2b6092++;}else{_0x201775++;}})[_0xb2e0('0x22')](function(){_0x1d5b7e++;});});})[_0xb2e0('0x18')](function(_0x44bdfe){if(_0x44bdfe){if(_0x56bd11[_0xb2e0('0x2d')]>0x0){return new Promise(function(_0x323ace){var _0x3a2feb=[];for(var _0xb0e7c8=0x0;_0xb0e7c8<_0x56bd11[_0xb2e0('0x2d')];_0xb0e7c8++){_0x3a2feb[_0xb2e0('0x58')](insertAdditionalPhones(_0x56bd11[_0xb0e7c8][_0xb2e0('0x5e')],_0x56bd11[_0xb0e7c8][_0xb2e0('0x5d')]));}Promise[_0xb2e0('0x5f')](_0x3a2feb)[_0xb2e0('0x18')](function(){_0x323ace(0x1);});})[_0xb2e0('0x18')](function(){return{'success':_0x2b6092,'failure':_0x1d5b7e,'duplicates':_0x201775};});}else{return{'success':_0x2b6092,'failure':_0x1d5b7e,'duplicates':_0x201775};}}})[_0xb2e0('0x18')](respondWithResult(_0x56d6c0,0xc9))[_0xb2e0('0x22')](handleError(_0x56d6c0,null));};exports[_0xb2e0('0x60')]=function(_0x493258,_0x4fb72f){var _0x283854;return db[_0xb2e0('0x23')][_0xb2e0('0x1e')]()['then'](function(_0x33b9af){return db[_0xb2e0('0x23')][_0xb2e0('0x24')]({'where':{'id':_0x493258[_0xb2e0('0x25')]['id']},'include':[{'model':db[_0xb2e0('0x61')],'as':_0xb2e0('0x62'),'attributes':['id','name',_0xb2e0('0x63')],'required':_0x493258[_0xb2e0('0x20')][_0xb2e0('0x64')]?!![]:![]},{'model':db[_0xb2e0('0x44')],'as':_0xb2e0('0x65'),'where':{'CmContactId':_0x493258[_0xb2e0('0x25')]['id']},'required':![],'include':[{'model':db[_0xb2e0('0x66')],'as':_0xb2e0('0x67')}]}],'order':[db[_0xb2e0('0x68')]['literal'](_0xb2e0('0x69'))],'attributes':_[_0xb2e0('0x27')](_0x33b9af)});})[_0xb2e0('0x18')](function(_0x3c0688){if(!_['isNil'](_0x3c0688)){_0x283854=_0x3c0688[_0xb2e0('0x36')]({'plain':!![]});var _0x298cc9={'where':{'$and':[{'ListId':{'$ne':null}}]}};if(_0x3c0688&&_0x3c0688[_0xb2e0('0x59')]){if(_0x3c0688['ListId']){_0x298cc9[_0xb2e0('0x56')]['$and'][_0xb2e0('0x58')]({'ListId':{'$ne':_0x3c0688['ListId']}});}}return db['CmCustomField'][_0xb2e0('0x2c')](_0x298cc9);}})['then'](function(_0x206371){if(!_[_0xb2e0('0x4f')](_0x206371)){return _[_0xb2e0('0x6a')](_0x283854,_[_0xb2e0('0x6b')](_0x206371,function(_0x44ec32){return util['format'](_0xb2e0('0x6c'),_0x44ec32['id']);}));}})[_0xb2e0('0x18')](handleEntityNotFound(_0x4fb72f,null))[_0xb2e0('0x18')](respondWithResult(_0x4fb72f,null))[_0xb2e0('0x22')](handleError(_0x4fb72f,null));};exports[_0xb2e0('0x17')]=function(_0x553946,_0x5cc164){var _0x5ca3d0;if(_0x553946[_0xb2e0('0x34')]['id']){delete _0x553946[_0xb2e0('0x34')]['id'];}if(!_[_0xb2e0('0x4f')](_0x553946['body'][_0xb2e0('0x50')])){var _0x4e6e8f=_0x553946[_0xb2e0('0x34')]['dialTimezone'];if(!_[_0xb2e0('0x4f')](shared[_0xb2e0('0x51')][_0x4e6e8f]))_0x553946[_0xb2e0('0x34')][_0xb2e0('0x52')]=shared[_0xb2e0('0x51')][_0x4e6e8f]['utcOffset'];}return db['CmContact'][_0xb2e0('0x24')]({'where':{'id':_0x553946[_0xb2e0('0x25')]['id']}})[_0xb2e0('0x18')](handleEntityNotFound(_0x5cc164,null))[_0xb2e0('0x18')](saveUpdates(_0x553946[_0xb2e0('0x34')],null))['then'](function(_0x15f028){_0x5ca3d0=_0x15f028;var _0x70f369={'where':{'$and':[{'ListId':{'$ne':null}}]}};if(_0x15f028&&_0x15f028[_0xb2e0('0x59')]){if(_0x15f028[_0xb2e0('0x59')]){_0x70f369[_0xb2e0('0x56')][_0xb2e0('0x6d')][_0xb2e0('0x58')]({'ListId':{'$ne':_0x15f028[_0xb2e0('0x59')]}});}}return db['CmCustomField']['findAll'](_0x70f369);})[_0xb2e0('0x18')](function(_0x22747f){if(_0x22747f){return _[_0xb2e0('0x6a')](_[_0xb2e0('0x6e')](_0x553946['body'],function(_0x470ab6,_0x7e7064){return _['startsWith'](_0x7e7064,'cf_');}),_['map'](_0x22747f,function(_0xe63336){return util[_0xb2e0('0x6f')](_0xb2e0('0x6c'),_0xe63336['id']);}));}})['then'](function(_0x2ed2f7){if(_0x2ed2f7&&!_[_0xb2e0('0x70')](_0x2ed2f7)){var _0x220e2f=squel[_0xb2e0('0x17')]()[_0xb2e0('0x71')](_0xb2e0('0x72'))[_0xb2e0('0x73')](_0x2ed2f7)['where'](_0xb2e0('0x74'),_0x553946[_0xb2e0('0x25')]['id'])[_0xb2e0('0x75')]();return db[_0xb2e0('0x68')]['query'](_0x220e2f[_0xb2e0('0x76')],{'replacements':_0x220e2f[_0xb2e0('0x77')]});}})[_0xb2e0('0x18')](function(){if(_0x553946[_0xb2e0('0x34')][_0xb2e0('0x78')]&&_0x5ca3d0){return db[_0xb2e0('0x3a')]['update']({'phone':_0x553946[_0xb2e0('0x34')][_0xb2e0('0x78')],'OrderBy':0x0},{'where':{'ContactId':_0x5ca3d0['id']}});}})[_0xb2e0('0x18')](function(){return _0x5ca3d0;})[_0xb2e0('0x18')](respondWithResult(_0x5cc164,null))['catch'](handleError(_0x5cc164,null));};exports[_0xb2e0('0x79')]=function(_0x47361c,_0x1a99f5){var _0x3bf51c={};var _0x12bdc9={};var _0x3f45f8;var _0x4c22d5;return db[_0xb2e0('0x23')][_0xb2e0('0x7a')]({'where':{'id':_0x47361c[_0xb2e0('0x25')]['id']}})[_0xb2e0('0x18')](handleEntityNotFound(_0x1a99f5,null))[_0xb2e0('0x18')](function(_0x4a662a){if(_0x4a662a){_0x3f45f8=_0x4a662a;_0x12bdc9['model']=_['keys'](db[_0xb2e0('0x61')]['rawAttributes']);_0x12bdc9[_0xb2e0('0x20')]=_['keys'](_0x47361c[_0xb2e0('0x20')]);_0x12bdc9[_0xb2e0('0x7b')]=_[_0xb2e0('0x7c')](_0x12bdc9['model'],_0x12bdc9[_0xb2e0('0x20')]);_0x3bf51c[_0xb2e0('0x7d')]=_['intersection'](_0x12bdc9['model'],qs[_0xb2e0('0x7e')](_0x47361c['query'][_0xb2e0('0x7e')]));_0x3bf51c[_0xb2e0('0x7d')]=_0x3bf51c[_0xb2e0('0x7d')]['length']?_0x3bf51c[_0xb2e0('0x7d')]:_0x12bdc9[_0xb2e0('0x7f')];_0x3bf51c[_0xb2e0('0x80')]=qs[_0xb2e0('0x81')](_0x47361c[_0xb2e0('0x20')][_0xb2e0('0x81')]);_0x3bf51c[_0xb2e0('0x56')]=qs[_0xb2e0('0x7b')](_[_0xb2e0('0x82')](_0x47361c[_0xb2e0('0x20')],_0x12bdc9[_0xb2e0('0x7b')]));if(_0x47361c[_0xb2e0('0x20')][_0xb2e0('0x83')]){_0x3bf51c['where']=_[_0xb2e0('0x33')](_0x3bf51c[_0xb2e0('0x56')],{'$or':_[_0xb2e0('0x6b')](_0x3bf51c[_0xb2e0('0x7d')],function(_0x6fe8a2){var _0x1b4bbf={};_0x1b4bbf[_0x6fe8a2]={'$like':'%'+_0x47361c['query'][_0xb2e0('0x83')]+'%'};return _0x1b4bbf;})});}_0x3bf51c=_[_0xb2e0('0x33')]({},_0x3bf51c,_0x47361c[_0xb2e0('0x84')]);return _0x3f45f8['getTags'](_0x3bf51c);}})[_0xb2e0('0x18')](function(_0x4a561c){if(_0x4a561c){_0x4c22d5=_0x4a561c[_0xb2e0('0x2d')];if(!_0x47361c[_0xb2e0('0x20')][_0xb2e0('0x5c')](_0xb2e0('0x85'))){_0x3bf51c[_0xb2e0('0x86')]=qs['limit'](_0x47361c[_0xb2e0('0x20')][_0xb2e0('0x86')]);_0x3bf51c[_0xb2e0('0x13')]=qs[_0xb2e0('0x13')](_0x47361c['query'][_0xb2e0('0x13')]);}return _0x3f45f8[_0xb2e0('0x79')](_0x3bf51c);}})[_0xb2e0('0x18')](function(_0x57e928){if(_0x57e928){return _0x57e928?{'count':_0x4c22d5,'rows':_0x57e928}:null;}})['then'](respondWithResult(_0x1a99f5,null))[_0xb2e0('0x22')](handleError(_0x1a99f5,null));};exports[_0xb2e0('0x87')]=function(_0x51f62d,_0x282a96){if(_0x51f62d[_0xb2e0('0x34')]['id']){delete _0x51f62d['body']['id'];}return db['CmContact'][_0xb2e0('0x7a')]({'where':{'id':_0x51f62d[_0xb2e0('0x25')]['id']}})['then'](handleEntityNotFound(_0x282a96,null))[_0xb2e0('0x18')](function(_0x78ac77){if(_0x78ac77){return _0x78ac77[_0xb2e0('0x87')](_0x51f62d[_0xb2e0('0x34')][_0xb2e0('0x88')]||[]);}return null;})[_0xb2e0('0x18')](respondWithResult(_0x282a96,null))[_0xb2e0('0x22')](handleError(_0x282a96,null));};exports[_0xb2e0('0x89')]=function(_0x26be4c,_0xe577e4){var _0x2b82b2=[];_0x2b82b2['push'](addAdditionalPhones(_0x26be4c[_0xb2e0('0x34')]));Promise[_0xb2e0('0x5f')](_0x2b82b2)[_0xb2e0('0x18')](function(){_0x2b82b2=[];_0x2b82b2[_0xb2e0('0x58')](deleteCmHopperPhones(_0x26be4c[_0xb2e0('0x34')]['id']));_0x2b82b2[_0xb2e0('0x58')](addCmHopperPhones(_0x26be4c[_0xb2e0('0x34')]['id']));Promise[_0xb2e0('0x5f')](_0x2b82b2)[_0xb2e0('0x18')](function(){return[0x1];})[_0xb2e0('0x18')](respondWithResult(_0xe577e4,null));});};function addAdditionalPhones(_0x2c9521){var _0x4ed9a3;return new Promise(function(_0x3ddef8){return db[_0xb2e0('0x44')]['destroy']({'where':{'CmContactId':_0x2c9521['id']}})['then'](function(){db['ContactItemType']['findAll']({'raw':!![],'attributes':['id',_0xb2e0('0x8a')]})['then'](function(_0x1d03eb){var _0x2917c3=[];for(var _0x1493b6=0x0;_0x1493b6<_0x2c9521['items'][_0xb2e0('0x2d')];_0x1493b6++){var _0x51a29e=_0x2c9521['item_types']?_[_0xb2e0('0x4f')](_0x2c9521['item_types'][_0x1493b6])?'':_0x2c9521[_0xb2e0('0x8b')][_0x1493b6]:_0x2c9521[_0xb2e0('0x8c')][_0x1493b6][_0xb2e0('0x8d')]?_0x2c9521[_0xb2e0('0x8c')][_0x1493b6]['ItemTypeId']:'';var _0x5d64d2=_[_0xb2e0('0x4f')](_0x2c9521[_0xb2e0('0x8c')][_0x1493b6][_0xb2e0('0x8e')])?'':_0x2c9521[_0xb2e0('0x8c')][_0x1493b6][_0xb2e0('0x8e')];var _0x498931=_0x51a29e+':'+_0x2c9521['items'][_0x1493b6][_0xb2e0('0x78')]+'§'+_0x5d64d2;if(_[_0xb2e0('0x4f')](_0x4ed9a3))_0x4ed9a3=_0x498931;else _0x4ed9a3+=';'+_0x498931;var _0xe3b543=null;var _0x5d0fc2=null;if(_0x2c9521['item_types']){if(!_[_0xb2e0('0x4f')](_0x2c9521[_0xb2e0('0x8b')][_0x1493b6])){_0x5d0fc2=_[_0xb2e0('0x24')](_0x1d03eb,function(_0x3b9bd7){return _0x3b9bd7['id']===_0x2c9521[_0xb2e0('0x8b')][_0x1493b6];});if(!_[_0xb2e0('0x4f')](_0x5d0fc2)){_0xe3b543=_0x5d0fc2['OrderBy'];}}}else{if(!_[_0xb2e0('0x4f')](_0x2c9521[_0xb2e0('0x8c')][_0x1493b6])){_0x5d0fc2=_['find'](_0x1d03eb,function(_0x328032){return _0x328032['id']===_0x2c9521[_0xb2e0('0x8c')][_0x1493b6][_0xb2e0('0x8d')];});if(!_[_0xb2e0('0x4f')](_0x5d0fc2)){_0xe3b543=_0x1493b6;}}}if(_[_0xb2e0('0x4f')](_0xe3b543)){_0xe3b543=0x64;}_0x2917c3[_0xb2e0('0x58')](addAdditionalPhone(_0x2c9521['id'],_0x2c9521[_0xb2e0('0x8c')][_0x1493b6][_0xb2e0('0x78')],_0x2c9521[_0xb2e0('0x8b')]?_['isNil'](_0x2c9521['item_types'][_0x1493b6])?null:_0x2c9521[_0xb2e0('0x8b')][_0x1493b6]:_0x2c9521[_0xb2e0('0x8c')][_0x1493b6]['ItemTypeId']?_0x2c9521[_0xb2e0('0x8c')][_0x1493b6][_0xb2e0('0x8d')]:null,_0xe3b543,_0x5d64d2));}Promise[_0xb2e0('0x5f')](_0x2917c3)['then'](function(){db[_0xb2e0('0x23')]['update']({'AdditionalPhones':_0x4ed9a3},{'where':{'id':_0x2c9521['id']}})[_0xb2e0('0x18')](function(){_0x3ddef8(0x1);});});});});});}function addAdditionalPhone(_0x5daa9c,_0x17683a,_0x23b447,_0x3d698e,_0x34d7e0){return db[_0xb2e0('0x44')]['find']({'where':{'CmContactId':_0x5daa9c,'item':_0x17683a}})[_0xb2e0('0x18')](function(_0x2fd95f){if(_0x2fd95f)logger[_0xb2e0('0x30')](_0xb2e0('0x8f'),_0x2fd95f);else{db[_0xb2e0('0x44')][_0xb2e0('0x4e')]({'CmContactId':_0x5daa9c,'item':_0x17683a,'ItemTypeId':_0x23b447,'OrderBy':_0x3d698e,'ItemClass':_0xb2e0('0x90'),'description':_0x34d7e0});}});}function deleteCmHopperPhones(_0x2558eb){return new Promise(function(_0x5a9e31){return db[_0xb2e0('0x3a')][_0xb2e0('0x2c')]({'raw':!![],'attributes':['id'],'where':{'ContactId':_0x2558eb}})['then'](function(_0x1fc90f){db[_0xb2e0('0x91')][_0xb2e0('0x19')]({'where':{'CmHopperId':{'$in':_[_0xb2e0('0x6b')](_0x1fc90f,'id')}}});})['then'](function(){_0x5a9e31(0x1);});});}function addCmHopperPhones(_0xd51bf5){return new Promise(function(_0x3b2213){return db[_0xb2e0('0x3a')][_0xb2e0('0x2c')]({'raw':!![],'attributes':['id'],'where':{'ContactId':_0xd51bf5}})[_0xb2e0('0x18')](function(_0x26a9ed){var _0x580083=[];_[_0xb2e0('0x6b')](_0x26a9ed,function(_0x2ec758){_0x580083[_0xb2e0('0x58')](createCmHopperPhone(_0xd51bf5,_0x2ec758['id']));});Promise['all'](_0x580083)[_0xb2e0('0x18')](function(){_0x3b2213(0x1);});});});}function createCmHopperPhone(_0x50ca0d,_0x119f92){return new Promise(function(_0x160975){db[_0xb2e0('0x44')][_0xb2e0('0x2c')]({'raw':!![],'attributes':[_0xb2e0('0x92'),'OrderBy'],'where':{'CmContactId':_0x50ca0d,'ItemClass':_0xb2e0('0x90')},'include':[{'model':db[_0xb2e0('0x66')],'attributes':['OrderBy'],'as':_0xb2e0('0x67')}],'order':[_0xb2e0('0x8a'),db[_0xb2e0('0x68')][_0xb2e0('0x93')](_0xb2e0('0x94'))]})[_0xb2e0('0x18')](function(_0x59a0cd){var _0x5db98c=0x1;var _0x5221a0=_[_0xb2e0('0x6b')](_0x59a0cd,function(_0x20094a){_0x20094a[_0xb2e0('0x95')]=_0x119f92;_0x20094a['phone']=_0x20094a[_0xb2e0('0x92')];_0x20094a[_0xb2e0('0x8a')]=_0x5db98c;delete _0x20094a[_0xb2e0('0x96')];_0x5db98c=_0x5db98c+0x1;return _0x20094a;});return db[_0xb2e0('0x91')][_0xb2e0('0x53')](_0x5221a0,{});})[_0xb2e0('0x18')](function(){_0x160975(0x1);});});}function insertAdditionalPhones(_0x4e8cf9,_0x121c2c){return new Promise(function(_0x2395e5){var _0x42f073=[];for(var _0x739298=0x0;_0x739298<_0x121c2c[_0xb2e0('0x2d')];_0x739298++){var _0xcc2e0c=_0x121c2c[_0x739298];_0x42f073[_0xb2e0('0x58')](parseContactItemType(_0xcc2e0c));}Promise[_0xb2e0('0x5f')](_0x42f073)[_0xb2e0('0x18')](function(){var _0x28c4d8={'id':_0x4e8cf9['id'],'items':_0x121c2c};return addAdditionalPhones(_0x28c4d8)[_0xb2e0('0x18')](function(){return addCmHopperPhones(_0x4e8cf9['id']);});})['then'](function(){_0x2395e5(_0x4e8cf9);});});}function parseContactItemType(_0x2f1227){return new Promise(function(_0x427a24){if(_0x2f1227[_0xb2e0('0x5c')]('ItemTypeId')){_0x427a24(_0x2f1227);}else{return db[_0xb2e0('0x66')][_0xb2e0('0x24')]({'where':{'name':_0x2f1227[_0xb2e0('0x67')]}})[_0xb2e0('0x18')](function(_0x3ecb53){if(_[_0xb2e0('0x4f')](_0x3ecb53))_0x2f1227['ItemTypeId']=null;else _0x2f1227[_0xb2e0('0x8d')]=_0x3ecb53['id'];_0x427a24(_0x2f1227);});}});}exports[_0xb2e0('0x97')]=function(_0x2d50c4,_0x4c48fe){return db[_0xb2e0('0x44')][_0xb2e0('0x2c')]({'raw':!![],'where':{'CmContactId':_0x2d50c4[_0xb2e0('0x25')]['id'],'ItemClass':'PHONE'},'include':[{'model':db[_0xb2e0('0x66')],'as':'ItemType'}],'order':[[_0xb2e0('0x8a')],[db['sequelize']['literal'](_0xb2e0('0x94'))]]})[_0xb2e0('0x18')](function(_0x1ab45b){return _0x1ab45b;})[_0xb2e0('0x18')](respondWithResult(_0x4c48fe,null))[_0xb2e0('0x22')](handleError(_0x4c48fe,null));};exports[_0xb2e0('0x98')]=function(_0x2550f6,_0x2ef3f5){return db[_0xb2e0('0x44')][_0xb2e0('0x2c')]({'raw':!![],'where':{'CmContactId':_0x2550f6[_0xb2e0('0x34')][_0xb2e0('0x99')]}})[_0xb2e0('0x18')](function(_0x5f396a){var _0x4a6426=_[_0xb2e0('0x6b')](_0x5f396a,function(_0x592ce0){_0x592ce0['CmContactId']=_0x2550f6[_0xb2e0('0x34')][_0xb2e0('0x9a')];return _0x592ce0;});return db[_0xb2e0('0x44')][_0xb2e0('0x53')](_0x4a6426,{});})['then'](function(){return addCmHopperPhones(_0x2550f6[_0xb2e0('0x34')][_0xb2e0('0x9a')]);})[_0xb2e0('0x18')](function(){return['ok'];})[_0xb2e0('0x18')](respondWithResult(_0x2ef3f5,null))['catch'](handleError(_0x2ef3f5,null));};exports[_0xb2e0('0x9b')]=function(_0x586adf,_0x4d3301){var _0x57757f=[];_0x57757f[_0xb2e0('0x58')](createCmHopperPhone(_0x586adf[_0xb2e0('0x34')]['id'],_0x586adf[_0xb2e0('0x34')][_0xb2e0('0x9c')]));Promise['all'](_0x57757f)[_0xb2e0('0x18')](function(){return[0x1];})['then'](respondWithResult(_0x4d3301,null));};exports[_0xb2e0('0x9d')]=function(_0xd275dd,_0x4ac9d7){var _0x256bb3={'raw':![],'where':{}};var _0x8c8fd4={};var _0x47bf0e={'count':0x0,'rows':[]};return db[_0xb2e0('0x23')][_0xb2e0('0x7a')]({'where':{'id':_0xd275dd['params']['id']}})[_0xb2e0('0x18')](handleEntityNotFound(_0x4ac9d7,null))['then'](function(_0x4e65c8){if(_0x4e65c8){_0x8c8fd4['model']=_[_0xb2e0('0x27')](db[_0xb2e0('0x3a')][_0xb2e0('0x9e')]);_0x8c8fd4[_0xb2e0('0x20')]=_[_0xb2e0('0x27')](_0xd275dd['query']);_0x8c8fd4['filters']=_['intersection'](_0x8c8fd4[_0xb2e0('0x7f')],_0x8c8fd4['query']);_0x256bb3[_0xb2e0('0x7d')]=_[_0xb2e0('0x7c')](_0x8c8fd4[_0xb2e0('0x7f')],qs[_0xb2e0('0x7e')](_0xd275dd[_0xb2e0('0x20')][_0xb2e0('0x7e')]));_0x256bb3[_0xb2e0('0x7d')]=_0x256bb3['attributes'][_0xb2e0('0x2d')]?_0x256bb3['attributes']:_0x8c8fd4[_0xb2e0('0x7f')];if(!_0xd275dd[_0xb2e0('0x20')][_0xb2e0('0x5c')](_0xb2e0('0x85'))){_0x256bb3[_0xb2e0('0x86')]=qs[_0xb2e0('0x86')](_0xd275dd[_0xb2e0('0x20')][_0xb2e0('0x86')]);_0x256bb3[_0xb2e0('0x13')]=qs[_0xb2e0('0x13')](_0xd275dd[_0xb2e0('0x20')]['offset']);}_0x256bb3['order']=qs[_0xb2e0('0x81')](_0xd275dd[_0xb2e0('0x20')][_0xb2e0('0x81')]);_0x256bb3[_0xb2e0('0x56')]=qs['filters'](_[_0xb2e0('0x82')](_0xd275dd[_0xb2e0('0x20')],_0x8c8fd4[_0xb2e0('0x7b')]));_0x256bb3[_0xb2e0('0x56')][_0xb2e0('0x9f')]=_0x4e65c8['id'];if(_0xd275dd[_0xb2e0('0x20')][_0xb2e0('0x83')]){_0x256bb3['where']=_[_0xb2e0('0x33')](_0x256bb3[_0xb2e0('0x56')],{'$or':_[_0xb2e0('0x6b')](_0x256bb3[_0xb2e0('0x7d')],function(_0x4205cf){var _0x5d5eb4={};_0x5d5eb4[_0x4205cf]={'$like':'%'+_0xd275dd[_0xb2e0('0x20')][_0xb2e0('0x83')]+'%'};return _0x5d5eb4;})});}_0x256bb3=_['merge']({},_0x256bb3,_0xd275dd['options']);return db[_0xb2e0('0x3a')][_0xb2e0('0x14')]({'where':_0x256bb3[_0xb2e0('0x56')]})['then'](function(_0x29c087){_0x47bf0e['count']=_0x29c087;if(_0xd275dd[_0xb2e0('0x20')]['includeAll']){_0x256bb3[_0xb2e0('0xa0')]=[{'all':!![]}];}return db['CmHopper'][_0xb2e0('0x2c')](_0x256bb3);})['then'](function(_0x71b21e){_0x47bf0e[_0xb2e0('0xa1')]=_0x71b21e;return _0x47bf0e;});}})[_0xb2e0('0x18')](respondWithFilteredResult(_0x4ac9d7,_0x256bb3))[_0xb2e0('0x22')](handleError(_0x4ac9d7,null));};exports[_0xb2e0('0xa2')]=function(_0x26abc3,_0x532a01){var _0x388b0a={'raw':!![],'where':{}};var _0x254abd={};var _0x4bfc6d={'count':0x0,'rows':[]};return db[_0xb2e0('0x23')][_0xb2e0('0x7a')]({'where':{'id':_0x26abc3[_0xb2e0('0x25')]['id']}})['then'](handleEntityNotFound(_0x532a01,null))['then'](function(_0x2d1ca0){if(_0x2d1ca0){_0x254abd[_0xb2e0('0x7f')]=_['keys'](db['CmHopperHistory'][_0xb2e0('0x9e')]);_0x254abd[_0xb2e0('0x20')]=_['keys'](_0x26abc3['query']);_0x254abd[_0xb2e0('0x7b')]=_[_0xb2e0('0x7c')](_0x254abd[_0xb2e0('0x7f')],_0x254abd['query']);_0x388b0a[_0xb2e0('0x7d')]=_[_0xb2e0('0x7c')](_0x254abd[_0xb2e0('0x7f')],qs['fields'](_0x26abc3[_0xb2e0('0x20')][_0xb2e0('0x7e')]));_0x388b0a[_0xb2e0('0x7d')]=_0x388b0a['attributes'][_0xb2e0('0x2d')]?_0x388b0a['attributes']:_0x254abd[_0xb2e0('0x7f')];if(!_0x26abc3[_0xb2e0('0x20')]['hasOwnProperty']('nolimit')){_0x388b0a['limit']=qs[_0xb2e0('0x86')](_0x26abc3[_0xb2e0('0x20')][_0xb2e0('0x86')]);_0x388b0a[_0xb2e0('0x13')]=qs[_0xb2e0('0x13')](_0x26abc3[_0xb2e0('0x20')][_0xb2e0('0x13')]);}_0x388b0a[_0xb2e0('0x80')]=qs[_0xb2e0('0x81')](_0x26abc3[_0xb2e0('0x20')][_0xb2e0('0x81')]);_0x388b0a[_0xb2e0('0x56')]=qs[_0xb2e0('0x7b')](_[_0xb2e0('0x82')](_0x26abc3['query'],_0x254abd[_0xb2e0('0x7b')]));_0x388b0a[_0xb2e0('0x56')][_0xb2e0('0x9f')]=_0x2d1ca0['id'];if(_0x26abc3[_0xb2e0('0x20')][_0xb2e0('0x83')]){_0x388b0a[_0xb2e0('0x56')]=_[_0xb2e0('0x33')](_0x388b0a[_0xb2e0('0x56')],{'$or':_[_0xb2e0('0x6b')](_0x388b0a['attributes'],function(_0x742cd7){var _0x329c0b={};_0x329c0b[_0x742cd7]={'$like':'%'+_0x26abc3[_0xb2e0('0x20')][_0xb2e0('0x83')]+'%'};return _0x329c0b;})});}_0x388b0a=_[_0xb2e0('0x33')]({},_0x388b0a,_0x26abc3[_0xb2e0('0x84')]);return db[_0xb2e0('0xa3')][_0xb2e0('0x14')]({'where':_0x388b0a[_0xb2e0('0x56')]})[_0xb2e0('0x18')](function(_0x10d88f){_0x4bfc6d['count']=_0x10d88f;if(_0x26abc3['query'][_0xb2e0('0xa4')]){_0x388b0a[_0xb2e0('0xa0')]=[{'all':!![]}];}return db['CmHopperHistory'][_0xb2e0('0x2c')](_0x388b0a);})[_0xb2e0('0x18')](function(_0x26775f){_0x4bfc6d[_0xb2e0('0xa1')]=_0x26775f;return _0x4bfc6d;});}})[_0xb2e0('0x18')](respondWithFilteredResult(_0x532a01,_0x388b0a))[_0xb2e0('0x22')](handleError(_0x532a01,null));};exports[_0xb2e0('0xa5')]=function(_0x785be2,_0x174d54){var _0x34f14e={'raw':!![],'where':{}};var _0x429855={};var _0x426e12={'count':0x0,'rows':[]};return db[_0xb2e0('0x23')][_0xb2e0('0x7a')]({'where':{'id':_0x785be2[_0xb2e0('0x25')]['id']}})[_0xb2e0('0x18')](handleEntityNotFound(_0x174d54,null))[_0xb2e0('0x18')](function(_0xf5bac7){if(_0xf5bac7){_0x429855[_0xb2e0('0x7f')]=_[_0xb2e0('0x27')](db[_0xb2e0('0x45')]['rawAttributes']);_0x429855[_0xb2e0('0x20')]=_['keys'](_0x785be2[_0xb2e0('0x20')]);_0x429855[_0xb2e0('0x7b')]=_[_0xb2e0('0x7c')](_0x429855[_0xb2e0('0x7f')],_0x429855[_0xb2e0('0x20')]);_0x34f14e[_0xb2e0('0x7d')]=_[_0xb2e0('0x7c')](_0x429855[_0xb2e0('0x7f')],qs[_0xb2e0('0x7e')](_0x785be2[_0xb2e0('0x20')][_0xb2e0('0x7e')]));_0x34f14e[_0xb2e0('0x7d')]=_0x34f14e[_0xb2e0('0x7d')]['length']?_0x34f14e['attributes']:_0x429855['model'];if(!_0x785be2['query'][_0xb2e0('0x5c')](_0xb2e0('0x85'))){_0x34f14e[_0xb2e0('0x86')]=qs[_0xb2e0('0x86')](_0x785be2['query']['limit']);_0x34f14e[_0xb2e0('0x13')]=qs[_0xb2e0('0x13')](_0x785be2[_0xb2e0('0x20')][_0xb2e0('0x13')]);}_0x34f14e[_0xb2e0('0x80')]=qs['sort'](_0x785be2[_0xb2e0('0x20')][_0xb2e0('0x81')]);_0x34f14e[_0xb2e0('0x56')]=qs['filters'](_['pick'](_0x785be2[_0xb2e0('0x20')],_0x429855['filters']));_0x34f14e['where'][_0xb2e0('0x9f')]=_0xf5bac7['id'];if(_0x785be2[_0xb2e0('0x20')][_0xb2e0('0x83')]){_0x34f14e[_0xb2e0('0x56')]=_['merge'](_0x34f14e[_0xb2e0('0x56')],{'$or':_[_0xb2e0('0x6b')](_0x34f14e[_0xb2e0('0x7d')],function(_0x33ec5c){var _0x26de0b={};_0x26de0b[_0x33ec5c]={'$like':'%'+_0x785be2[_0xb2e0('0x20')]['filter']+'%'};return _0x26de0b;})});}_0x34f14e=_['merge']({},_0x34f14e,_0x785be2[_0xb2e0('0x84')]);return db['CmHopperFinal'][_0xb2e0('0x14')]({'where':_0x34f14e[_0xb2e0('0x56')]})[_0xb2e0('0x18')](function(_0x1dc8e3){_0x426e12[_0xb2e0('0x14')]=_0x1dc8e3;if(_0x785be2[_0xb2e0('0x20')][_0xb2e0('0xa4')]){_0x34f14e[_0xb2e0('0xa0')]=[{'all':!![]}];}return db[_0xb2e0('0x45')][_0xb2e0('0x2c')](_0x34f14e);})['then'](function(_0x268a50){_0x426e12['rows']=_0x268a50;return _0x426e12;});}})[_0xb2e0('0x18')](respondWithFilteredResult(_0x174d54,_0x34f14e))[_0xb2e0('0x22')](handleError(_0x174d54,null));};exports['getJscriptySessions']=function(_0x3b7d42,_0x3234e6){var _0x286f1e={'raw':!![],'where':{}};var _0x5a0271={};var _0x504959={'count':0x0,'rows':[]};return db[_0xb2e0('0x23')][_0xb2e0('0x7a')]({'where':{'id':_0x3b7d42['params']['id']}})[_0xb2e0('0x18')](handleEntityNotFound(_0x3234e6,null))[_0xb2e0('0x18')](function(_0x5c749d){if(_0x5c749d){_0x5a0271['model']=_[_0xb2e0('0x27')](db[_0xb2e0('0x4c')]['rawAttributes']);_0x5a0271['query']=_[_0xb2e0('0x27')](_0x3b7d42['query']);_0x5a0271[_0xb2e0('0x7b')]=_['intersection'](_0x5a0271[_0xb2e0('0x7f')],_0x5a0271[_0xb2e0('0x20')]);_0x286f1e['attributes']=_[_0xb2e0('0x7c')](_0x5a0271[_0xb2e0('0x7f')],qs['fields'](_0x3b7d42[_0xb2e0('0x20')][_0xb2e0('0x7e')]));_0x286f1e[_0xb2e0('0x7d')]=_0x286f1e[_0xb2e0('0x7d')][_0xb2e0('0x2d')]?_0x286f1e[_0xb2e0('0x7d')]:_0x5a0271[_0xb2e0('0x7f')];if(!_0x3b7d42[_0xb2e0('0x20')][_0xb2e0('0x5c')]('nolimit')){_0x286f1e[_0xb2e0('0x86')]=qs['limit'](_0x3b7d42[_0xb2e0('0x20')]['limit']);_0x286f1e[_0xb2e0('0x13')]=qs[_0xb2e0('0x13')](_0x3b7d42[_0xb2e0('0x20')]['offset']);}_0x286f1e[_0xb2e0('0x80')]=qs[_0xb2e0('0x81')](_0x3b7d42['query'][_0xb2e0('0x81')]);_0x286f1e['where']=qs[_0xb2e0('0x7b')](_['pick'](_0x3b7d42[_0xb2e0('0x20')],_0x5a0271[_0xb2e0('0x7b')]));_0x286f1e[_0xb2e0('0x56')][_0xb2e0('0x9f')]=_0x5c749d['id'];if(_0x3b7d42[_0xb2e0('0x20')][_0xb2e0('0x83')]){_0x286f1e[_0xb2e0('0x56')]=_[_0xb2e0('0x33')](_0x286f1e[_0xb2e0('0x56')],{'$or':_[_0xb2e0('0x6b')](_0x286f1e[_0xb2e0('0x7d')],function(_0x2d7d06){var _0x466f8a={};_0x466f8a[_0x2d7d06]={'$like':'%'+_0x3b7d42[_0xb2e0('0x20')][_0xb2e0('0x83')]+'%'};return _0x466f8a;})});}_0x286f1e=_['merge']({},_0x286f1e,_0x3b7d42[_0xb2e0('0x84')]);return db['JscriptySessionReport'][_0xb2e0('0x14')]({'where':_0x286f1e['where']})['then'](function(_0x49ee8b){_0x504959[_0xb2e0('0x14')]=_0x49ee8b;if(_0x3b7d42[_0xb2e0('0x20')][_0xb2e0('0xa4')]){_0x286f1e['include']=[{'all':!![]}];}return db['JscriptySessionReport'][_0xb2e0('0x2c')](_0x286f1e);})[_0xb2e0('0x18')](function(_0xa2e6f4){_0x504959[_0xb2e0('0xa1')]=_0xa2e6f4;return _0x504959;});}})[_0xb2e0('0x18')](respondWithFilteredResult(_0x3234e6,_0x286f1e))[_0xb2e0('0x22')](handleError(_0x3234e6,null));};exports[_0xb2e0('0xa6')]=function(_0x3ae10d,_0x2656ac){try{if(!_0x3ae10d[_0xb2e0('0x34')][_0xb2e0('0x59')]){throw new Error(_0xb2e0('0xa7'));}if(!_0x3ae10d[_0xb2e0('0x34')][_0xb2e0('0xa8')]){throw new Error(_0xb2e0('0xa9'));}if(!_0x3ae10d[_0xb2e0('0x34')]['binding_values']){throw new Error(_0xb2e0('0xaa'));}if(!_0x3ae10d[_0xb2e0('0x34')][_0xb2e0('0xab')]){throw new Error(_0xb2e0('0xac'));}var _0x48c238=_0x3ae10d[_0xb2e0('0x34')]['binding_keys'][_0xb2e0('0xad')](',');var _0x1d0075=_0x3ae10d[_0xb2e0('0x34')][_0xb2e0('0xae')][_0xb2e0('0xad')](',');if(!_0x48c238['length']||!_0x1d0075[_0xb2e0('0x2d')]||_0x48c238[_0xb2e0('0x2d')]!==_0x1d0075[_0xb2e0('0x2d')]){throw new Error(_0xb2e0('0xaf'));}_0x3ae10d[_0xb2e0('0x34')][_0xb2e0('0x7e')]=_['zipObject'](_0x48c238,_0x1d0075);if(!_0x3ae10d['body']['fields'][_0xb2e0('0x78')]){throw new Error(_0xb2e0('0xb0'));}if(!_0x3ae10d['body']['fields'][_0xb2e0('0xb1')]){throw new Error(_0xb2e0('0xb2'));}var _0x57ccfe=path[_0xb2e0('0xb3')](config[_0xb2e0('0xb4')],_0xb2e0('0xb5'),_0x3ae10d['file'][_0xb2e0('0xb6')]);fs[_0xb2e0('0xb7')](_0x57ccfe,parseInt('0777',0x8));var _0xd1a1d6=require(_0xb2e0('0xb8'))[_0xb2e0('0xb9')](path[_0xb2e0('0xb3')](__dirname,_0xb2e0('0xba')),[_0x57ccfe,_0x3ae10d[_0xb2e0('0x34')]['binding_keys'],_0x3ae10d['body'][_0xb2e0('0xae')],_0x3ae10d[_0xb2e0('0x34')]['ListId'],_0x3ae10d[_0xb2e0('0x34')][_0xb2e0('0xbb')],_0x3ae10d[_0xb2e0('0x34')]['duplicates'],_0x3ae10d[_0xb2e0('0x34')][_0xb2e0('0xab')]]);return _0x2656ac[_0xb2e0('0x11')](0xc8)[_0xb2e0('0x16')]({'message':_0xb2e0('0xbc'),'pid':_0xd1a1d6['pid']});}catch(_0x55e260){return _0x2656ac[_0xb2e0('0x11')](0x1f4)[_0xb2e0('0x1d')](_0x55e260);}};exports['upload']=function(_0x31d3d7,_0x8ecd5f){var _0xaabfb2=fs[_0xb2e0('0xbd')](_0x31d3d7['file'][_0xb2e0('0x2')]);Papa[_0xb2e0('0xbe')](_0xaabfb2,{'header':!![],'skipEmptyLines':!![],'preview':0x1,'complete':function(_0x171523){return _0x8ecd5f[_0xb2e0('0x11')](0xc8)[_0xb2e0('0x16')]({'file':_0x31d3d7['file'],'fields':_0x171523[_0xb2e0('0xbf')]['fields']});}});};exports[_0xb2e0('0xc0')]=function(_0x165a2b,_0x1e52f0){return db[_0xb2e0('0xc1')][_0xb2e0('0x2c')]({'raw':!![],'attributes':['id'],'where':{'role':_0xb2e0('0xc2')}})['then'](function(_0x57cd65){var _0x1d344c=![];if(!_0x165a2b['body'][_0xb2e0('0x59')]){throw new Error(_0xb2e0('0xa7'));}if(!_0x165a2b[_0xb2e0('0x34')][_0xb2e0('0xc3')][_0xb2e0('0x78')]){throw new Error(_0xb2e0('0xb0'));}if(!_0x165a2b['body']['binding'][_0xb2e0('0xb1')]){throw new Error(_0xb2e0('0xb2'));}if(!_0x165a2b['body'][_0xb2e0('0xab')]){throw new Error('Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed');}var _0x2b5dad=require(_0xb2e0('0xb8'))[_0xb2e0('0xb9')](path['join'](__dirname,_0xb2e0('0xc4')),[_0x165a2b[_0xb2e0('0x25')]['id'],JSON[_0xb2e0('0xc5')](_0x165a2b['body']),JSON['stringify'](_0x57cd65)]);_0x2b5dad['on'](_0xb2e0('0xc6'),function(){_0x1d344c=!![];return _0x1e52f0[_0xb2e0('0x11')](0xc8)[_0xb2e0('0x16')]({'message':_0xb2e0('0xc7'),'pid':_0x2b5dad[_0xb2e0('0xc8')]});});_0x2b5dad['on'](_0xb2e0('0xc9'),function(_0x5e6403){if(_0x5e6403&&!_0x1d344c){return _0x1e52f0[_0xb2e0('0x11')](0x1f4)['json']({'message':_0xb2e0('0xca'),'pid':_0x2b5dad['pid']});}});})[_0xb2e0('0x22')](handleError(_0x1e52f0,null));};exports[_0xb2e0('0xcb')]=function(_0x32398d,_0x54052f){return db[_0xb2e0('0xc1')][_0xb2e0('0x2c')]({'raw':!![],'attributes':['id'],'where':{'role':_0xb2e0('0xc2')}})[_0xb2e0('0x18')](function(_0xcdc326){var _0x5d03b2=![];if(!_0x32398d['body'][_0xb2e0('0x59')]){throw new Error('No\x20ListId\x20specified');}if(!_0x32398d[_0xb2e0('0x34')]['binding'][_0xb2e0('0x78')]){throw new Error('No\x20phone\x20column\x20specified');}if(!_0x32398d[_0xb2e0('0x34')][_0xb2e0('0xc3')]['firstName']){throw new Error(_0xb2e0('0xb2'));}if(!_0x32398d[_0xb2e0('0x34')][_0xb2e0('0xab')]){throw new Error(_0xb2e0('0xac'));}var _0x4ab722=require(_0xb2e0('0xb8'))['fork'](path[_0xb2e0('0xb3')](__dirname,'../../components/import/cm/csvUpdates'),[_0x32398d['params']['id'],JSON[_0xb2e0('0xc5')](_0x32398d[_0xb2e0('0x34')]),JSON[_0xb2e0('0xc5')](_0xcdc326)]);_0x4ab722['on'](_0xb2e0('0xc6'),function(){_0x5d03b2=!![];return _0x54052f[_0xb2e0('0x11')](0xc8)[_0xb2e0('0x16')]({'message':_0xb2e0('0xc7'),'pid':_0x4ab722['pid']});});_0x4ab722['on'](_0xb2e0('0xc9'),function(_0x5bb97a){if(_0x5bb97a&&!_0x5d03b2){return _0x54052f[_0xb2e0('0x11')](0x1f4)[_0xb2e0('0x16')]({'message':_0xb2e0('0xca'),'pid':_0x4ab722[_0xb2e0('0xc8')]});}});})['catch'](handleError(_0x54052f,null));};exports[_0xb2e0('0xcc')]=function(_0xca365a,_0x62a073){var _0x1adbc9=[_0xb2e0('0xcd'),_0xb2e0('0xce'),_0xb2e0('0xcf'),_0xb2e0('0xd0'),_0xb2e0('0xd1'),'whatsapp',_0xb2e0('0xd2')];var _0x3392e5={'offset':0x0,'order':qs[_0xb2e0('0x81')](_0xb2e0('0xd3'))},_0x191ee3={'count':0x0,'rows':[]};Promise[_0xb2e0('0xd4')]()[_0xb2e0('0x18')](function(){if(_0xca365a[_0xb2e0('0x20')][_0xb2e0('0xd5')]){if(!_[_0xb2e0('0xd6')](_0x1adbc9,_0xca365a[_0xb2e0('0x20')][_0xb2e0('0xd5')][_0xb2e0('0xd7')]())){throw new Error(_0xb2e0('0xd8'));}_0x1adbc9=[_0xca365a[_0xb2e0('0x20')][_0xb2e0('0xd5')][_0xb2e0('0xd7')]()];}if(_0xca365a[_0xb2e0('0x20')][_0xb2e0('0xd9')]){try{var _0x5696c1=JSON['parse'](_0xca365a[_0xb2e0('0x20')][_0xb2e0('0xd9')]);if(!moment(_0x5696c1[_0xb2e0('0x35')])[_0xb2e0('0xda')]()){throw new Error(_0xb2e0('0xdb'));}if(!moment(_0x5696c1['to'])[_0xb2e0('0xda')]()){throw new Error('Invalid\x20date\x20for\x20range\x20to\x20filter');}}catch(_0xb3af0b){throw new Error(_0xb2e0('0xdc'));}}if(!_0xca365a[_0xb2e0('0x20')]['hasOwnProperty'](_0xb2e0('0x85'))){_0x3392e5['limit']=qs[_0xb2e0('0x86')](_0xca365a[_0xb2e0('0x20')]['limit']||0xa);_0x3392e5['offset']=qs[_0xb2e0('0x13')](_0xca365a[_0xb2e0('0x20')][_0xb2e0('0x13')]);}var _0x5aaba0=_0x1adbc9[_0xb2e0('0x6b')](function(_0x59c452){if(_0x59c452===_0xb2e0('0xd2')){var _0x5941f3={'attributes':['id',_0xb2e0('0xdd'),_0xb2e0('0x2f'),_0xb2e0('0xde'),_0xb2e0('0xdf'),_0xb2e0('0xe0'),_0xb2e0('0xe1'),_0xb2e0('0xe2'),_0xb2e0('0xe3'),_0xb2e0('0xe4'),_0xb2e0('0xe5'),_0xb2e0('0xe6'),_0xb2e0('0xe7'),_0xb2e0('0xe8'),_0xb2e0('0xe9')],'where':{'ContactId':_0xca365a[_0xb2e0('0x25')]['id']},'include':[{'model':db[_0xb2e0('0xc1')],'as':_0xb2e0('0xc1'),'attributes':['id',_0xb2e0('0x1c'),_0xb2e0('0xea'),_0xb2e0('0xeb')]}],'order':[[_0xb2e0('0xe5'),'DESC']]};if(_0xca365a['query'][_0xb2e0('0xd9')]){_0x5941f3[_0xb2e0('0x56')][_0xb2e0('0xe5')]={'$gte':_0x5696c1[_0xb2e0('0x35')],'$lte':_0x5696c1['to']};}return db[_0xb2e0('0x46')][_0xb2e0('0xec')](_0x5941f3)['then'](function(_0x1ecef5){_0x191ee3['count']+=_0x1ecef5[_0xb2e0('0x14')];return _[_0xb2e0('0x6b')](_0x1ecef5[_0xb2e0('0xa1')],function(_0x4e32c7){var _0x1baf31=_0x4e32c7[_0xb2e0('0x36')]({'plain':!![]});_0x1baf31[_0xb2e0('0xd5')]=_0x59c452;if(_0x1baf31[_0xb2e0('0xc1')]){_0x1baf31[_0xb2e0('0xc1')]={'id':_0x1baf31[_0xb2e0('0xc1')]['id'],'name':_0x1baf31[_0xb2e0('0xc1')][_0xb2e0('0x1c')],'fullname':_0x1baf31['User'][_0xb2e0('0xea')],'alias':_0x1baf31['User'][_0xb2e0('0xeb')]};}return _0x1baf31;});});}else{var _0x556521=_[_0xb2e0('0xed')](_0x59c452)+(_0x59c452===_0xb2e0('0xce')?_0xb2e0('0xee'):'Account');var _0x56f277={'attributes':['id',_0xb2e0('0xef'),_0xb2e0('0xf0'),_0xb2e0('0xe5'),_0xb2e0('0xe4'),_0xb2e0('0xf1'),_0xb2e0('0xf2'),_0xb2e0('0xf3'),_0xb2e0('0xe9'),_0x556521+'Id'],'where':{'ContactId':_0xca365a[_0xb2e0('0x25')]['id']},'include':[{'model':db[_0x556521],'as':_0xb2e0('0xf4'),'attributes':['id',_0xb2e0('0x1c'),_0xb2e0('0xf5')]},{'model':db[_0xb2e0('0xc1')],'as':'Owner','attributes':['id',_0xb2e0('0x1c'),_0xb2e0('0xea')]},{'model':db[_0xb2e0('0x61')],'as':_0xb2e0('0x62'),'attributes':['id',_0xb2e0('0x1c'),_0xb2e0('0x63')],'through':{'attributes':[]}}],'order':[[_0xb2e0('0xe5'),_0xb2e0('0xf6')]]};if(_0xca365a[_0xb2e0('0x20')]['range']){_0x56f277[_0xb2e0('0x56')]['createdAt']={'$gte':_0x5696c1[_0xb2e0('0x35')],'$lte':_0x5696c1['to']};}switch(_0x59c452){case'chat':_0x56f277[_0xb2e0('0x7d')]['push'](_0xb2e0('0xf7'),_0xb2e0('0xf8'),_0xb2e0('0xf9'),'deviceModel',_0xb2e0('0xfa'),_0xb2e0('0xfb'),_0xb2e0('0xfc'),_0xb2e0('0xfd'),'referer');break;case _0xb2e0('0xcd'):_0x56f277[_0xb2e0('0x7d')]['push'](_0xb2e0('0xfe'),_0xb2e0('0xff'));break;case _0xb2e0('0xd0'):_0x56f277[_0xb2e0('0x7d')]['push'](_0xb2e0('0x100'),'threadId');break;}return db[_[_0xb2e0('0xed')](_0x59c452)+_0xb2e0('0x101')][_0xb2e0('0xec')](_0x56f277)[_0xb2e0('0x18')](function(_0x32ee4e){_0x191ee3[_0xb2e0('0x14')]+=_0x32ee4e[_0xb2e0('0x14')];return _['map'](_0x32ee4e['rows'],function(_0x258e7f){var _0x2bc281=_0x258e7f[_0xb2e0('0x36')]({'plain':!![]});_0x2bc281[_0xb2e0('0xd5')]=_0x59c452;if(_0x2bc281[_0xb2e0('0x102')]){_0x2bc281[_0xb2e0('0x102')]={'id':_0x2bc281[_0xb2e0('0x102')]['id'],'name':_0x2bc281[_0xb2e0('0x102')]['name'],'fullname':_0x2bc281[_0xb2e0('0x102')]['fullname']};}return _0x2bc281;});});}});return Promise[_0xb2e0('0x5f')](_0x5aaba0);})[_0xb2e0('0x18')](function(_0x24caea){return _(_0x24caea)[_0xb2e0('0x103')]()[_0xb2e0('0x104')](_0xb2e0('0xe5'))[_0xb2e0('0x105')]()[_0xb2e0('0x106')]();})[_0xb2e0('0x18')](function(_0x1baddf){_0x191ee3[_0xb2e0('0xa1')]=_0x3392e5[_0xb2e0('0x86')]?_0x1baddf[_0xb2e0('0x107')](_0x3392e5['offset'],_0x3392e5['offset']+_0x3392e5['limit']):_0x1baddf;return _0x191ee3;})['then'](respondWithFilteredResult(_0x62a073,_0x3392e5))[_0xb2e0('0x22')](handleError(_0x62a073,null));};
\ No newline at end of file
+var _0x2689=['MailInteraction','SmsInteraction','SmsMessage','FaxMessage','OpenchannelInteraction','CmContactHasItem','CmHopperFinal','CmHopperHistory','VoiceCallReport','ChatQueueReport','FaxQueueReport','MailQueueReport','JscriptySessionReport','WhatsappInteraction','WhatsappMessage','WhatsappQueueReport','isNil','dialTimezone','timezones','utcOffset','additionalPhones','bulkCreate','duplicates','where','$or','push','ListId','spread','contact','all','show','Tags','color','tag','Phones','ItemType','sequelize','literal','format','cf_%d','$and','omit','pickBy','map','isEmpty','table','cm_contacts','setFields','toParam','text','phone','model','Tag','filters','intersection','fields','attributes','order','sort','filter','getTags','nolimit','setTags','findOne','OrderBy','items','item_types','ItemTypeId','description','contact\x20phone\x20exists','PHONE','CmHopperAdditionalPhone','ContactItemType','CmHopperId','item','ItemType.OrderBy','getAdditionalPhones','`ItemType`.OrderBy','duplicateAdditionalPhones','fromContactId','CmContactId','toContactId','rescheduleAdditionalPhones','rawAttributes','pick','include','getHopperHistories','includeAll','rows','getHopperFinals','ContactId','options','getJscriptySessions','uploadCsv','No\x20ListId\x20specified','binding_keys','No\x20association\x20keys\x20specified!','binding_values','No\x20association\x20values\x20specified!','socket_timestamp','split','zipObject','No\x20phone\x20column\x20specified','firstName','No\x20firstName\x20column\x20specified','root','server/files/tmp','filename','0777','child_process','fork','../../components/import/cm/csv','CompanyId','File\x20uploaded\x20correctly!','createReadStream','file','meta','User','agent','binding','../../components/import/cm/csv2','stringify','message','pid','exit','error\x20child\x20process','importUpdates','../../components/import/cm/csvUpdates','start\x20child\x20process\x20correctly!','getJourney','mail','chat','sms','fax','whatsapp','voice','-createdAt','resolve','channel','includes','toLowerCase','parse','isValid','Invalid\x20date\x20for\x20range\x20to\x20filter','uniqueid','type','source','destination','callerid','starttime','endtime','createdAt','userDisposition','userSecondDisposition','UserId','range','findAndCountAll','fullname','startCase','Website','Account','closed','closedAt','note','disposition','secondDisposition','thirdDisposition','key','Owner','DESC','browserName','customerIp','customerPort','deviceModel','osName','ratingValue','subject','substatus','openchannel','threadId','Interaction','flatten','reverse','slice','moment','bluebird','util','path','lodash','squel','papaparse','ioredis','../../components/contacts','../../config/logger','../../config/environment/shared','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./cmContact.socket','register','json','offset','undefined','limit','count','status','set','Content-Range','then','destroy','error','stack','name','send','index','getOptions','findAll','query','user','catch','find','params','describe','keys','length','startsWith','cf_','columnName','displayName','analytics','CmCustomField','alias','custom','values','info','Custom\x20field\x20%s\x20not\x20found\x20on\x20cm_contacts\x20table','forEach','hasOwnProperty','merge','body','CmContact','get','mergeWith','isArray','tags','join','[CmContact][merge]\x20to\x20%s\x20from\x20%s','from','CmHopper','[CmContact][merge][destroy][CmHopper],\x20%s','CmHopperBlack','create','ChatMessage','update','ChatOfflineMessage','MailMessage'];(function(_0x2fbbbf,_0x12ea46){var _0x2a9d83=function(_0x1e2ad8){while(--_0x1e2ad8){_0x2fbbbf['push'](_0x2fbbbf['shift']());}};_0x2a9d83(++_0x12ea46);}(_0x2689,0xb8));var _0x9268=function(_0x305a4f,_0x4a73ba){_0x305a4f=_0x305a4f-0x0;var _0x4bf541=_0x2689[_0x305a4f];return _0x4bf541;};'use strict';var moment=require(_0x9268('0x0'));var BPromise=require(_0x9268('0x1'));var util=require(_0x9268('0x2'));var path=require(_0x9268('0x3'));var fs=require('fs');var _=require(_0x9268('0x4'));var squel=require(_0x9268('0x5'));var Papa=require(_0x9268('0x6'));var Redis=require(_0x9268('0x7'));var contacts=require(_0x9268('0x8'));var qs=require('../../components/parsers/qs');var logger=require(_0x9268('0x9'))('api');var config=require('../../config/environment');var shared=require(_0x9268('0xa'));var db=require(_0x9268('0xb'))['db'];config[_0x9268('0xc')]=_[_0x9268('0xd')](config[_0x9268('0xc')],{'host':_0x9268('0xe'),'port':0x18eb});var socket=require(_0x9268('0xf'))(new Redis(config[_0x9268('0xc')]));require(_0x9268('0x10'))[_0x9268('0x11')](socket);function respondWithResult(_0x4a380d,_0x26ec81){_0x26ec81=_0x26ec81||0xc8;return function(_0xd4b06e){if(_0xd4b06e){return _0x4a380d['status'](_0x26ec81)[_0x9268('0x12')](_0xd4b06e);}};}function respondWithFilteredResult(_0x1419d9,_0x65c628){return function(_0x24c90a){if(_0x24c90a){var _0x257958=typeof _0x65c628[_0x9268('0x13')]===_0x9268('0x14')&&typeof _0x65c628[_0x9268('0x15')]===_0x9268('0x14');var _0x3db36f=_0x24c90a[_0x9268('0x16')];var _0x37c009=_0x257958?0x0:_0x65c628[_0x9268('0x13')];var _0x6a2721=_0x257958?_0x24c90a['count']:_0x65c628[_0x9268('0x13')]+_0x65c628['limit'];var _0x54ed42;if(_0x6a2721>=_0x3db36f){_0x6a2721=_0x3db36f;_0x54ed42=0xc8;}else{_0x54ed42=0xce;}_0x1419d9[_0x9268('0x17')](_0x54ed42);return _0x1419d9[_0x9268('0x18')](_0x9268('0x19'),_0x37c009+'-'+_0x6a2721+'/'+_0x3db36f)[_0x9268('0x12')](_0x24c90a);}return null;};}function saveUpdates(_0x384019){return function(_0x336eea){if(_0x336eea){return _0x336eea['update'](_0x384019)[_0x9268('0x1a')](function(_0x4882cf){return _0x4882cf;});}return null;};}function removeEntity(_0x249662){return function(_0x176de2){if(_0x176de2){return _0x176de2[_0x9268('0x1b')]()[_0x9268('0x1a')](function(){_0x249662[_0x9268('0x17')](0xcc)['end']();});}};}function handleEntityNotFound(_0x41ac4d){return function(_0x245bee){if(!_0x245bee){_0x41ac4d['sendStatus'](0x194);}return _0x245bee;};}function handleError(_0x16ab48,_0x1ac363){_0x1ac363=_0x1ac363||0x1f4;return function(_0x12e1c9){logger[_0x9268('0x1c')](_0x12e1c9[_0x9268('0x1d')]);if(_0x12e1c9['name']){delete _0x12e1c9[_0x9268('0x1e')];}_0x16ab48[_0x9268('0x17')](_0x1ac363)[_0x9268('0x1f')](_0x12e1c9);};}exports[_0x9268('0x20')]=function(_0x1e5547,_0x1abe53){var _0x3c27eb={};return contacts['describe']()[_0x9268('0x1a')](function(_0x2734d7){_0x3c27eb=qs[_0x9268('0x21')](_0x2734d7,_0x1e5547);return contacts[_0x9268('0x22')](_0x1e5547[_0x9268('0x23')],_0x1e5547[_0x9268('0x24')],_0x3c27eb,_0x2734d7);})[_0x9268('0x1a')](respondWithFilteredResult(_0x1abe53,_0x3c27eb))[_0x9268('0x25')](handleError(_0x1abe53,null));};exports[_0x9268('0x1b')]=function(_0x4ef6ce,_0x11c19e){return db['CmContact'][_0x9268('0x26')]({'where':{'id':_0x4ef6ce[_0x9268('0x27')]['id']}})['then'](handleEntityNotFound(_0x11c19e,null))[_0x9268('0x1a')](removeEntity(_0x11c19e,null))[_0x9268('0x25')](handleError(_0x11c19e,null));};exports['describe']=function(_0x1c58bb,_0x59ffc9){return db['CmContact'][_0x9268('0x28')]()[_0x9268('0x1a')](function(_0x2d27eb){delete _0x2d27eb['tags'];for(var _0x2fcb31=0x0;_0x2fcb31<Object[_0x9268('0x29')](_0x2d27eb)[_0x9268('0x2a')];_0x2fcb31++){var _0x1983ae=Object['keys'](_0x2d27eb)[_0x2fcb31];if(!_[_0x9268('0x2b')](_0x1983ae,_0x9268('0x2c'))){_0x2d27eb[_0x1983ae][_0x9268('0x2d')]=_0x1983ae;_0x2d27eb[_0x1983ae][_0x9268('0x2e')]=_0x1983ae;}}return _0x2d27eb;})[_0x9268('0x1a')](function(_0x4c2d80){var _0x24ae7b={'where':Boolean(_0x1c58bb[_0x9268('0x23')][_0x9268('0x2f')])===!![]?undefined:{'$or':[{'ListId':_0x1c58bb[_0x9268('0x23')]['id']},{'ListId':null}]},'raw':!![]};return db[_0x9268('0x30')][_0x9268('0x22')](_0x24ae7b)[_0x9268('0x1a')](function(_0x31a423){for(var _0x2b57c0=0x0;_0x2b57c0<_0x31a423[_0x9268('0x2a')];_0x2b57c0++){var _0x21a3eb=_0x9268('0x2c')+_0x31a423[_0x2b57c0]['id'];if(_0x4c2d80[_0x21a3eb]){_0x4c2d80[_0x21a3eb]['columnName']=_0x21a3eb;_0x4c2d80[_0x21a3eb][_0x9268('0x2e')]=_0x31a423[_0x2b57c0][_0x9268('0x31')];_0x4c2d80[_0x21a3eb][_0x9268('0x32')]={'type':_0x31a423[_0x2b57c0]['type'],'values':_0x31a423[_0x2b57c0][_0x9268('0x33')]};}else{logger[_0x9268('0x34')](_0x9268('0x35'),_0x21a3eb);}}Object[_0x9268('0x29')](_0x4c2d80)[_0x9268('0x36')](function(_0x47bf33){if(!_0x4c2d80[_0x47bf33][_0x9268('0x37')](_0x9268('0x2d'))){delete _0x4c2d80[_0x47bf33];}});return _0x4c2d80;});})[_0x9268('0x1a')](respondWithResult(_0x59ffc9,null))[_0x9268('0x25')](handleError(_0x59ffc9,null));};exports[_0x9268('0x38')]=function(_0x5c0032,_0x4c7ff6){var _0x3efc8c;var _0x44cad3;var _0x37cc8b;if(_0x5c0032[_0x9268('0x39')]['id']){delete _0x5c0032[_0x9268('0x39')]['id'];}return db[_0x9268('0x3a')][_0x9268('0x22')]({'where':{'id':[_0x5c0032[_0x9268('0x39')]['to'],_0x5c0032[_0x9268('0x39')]['from']]}})[_0x9268('0x1a')](function(_0x242157){if(_0x242157){if(_0x242157[_0x9268('0x2a')]!==0x2){return null;}_0x242157[0x0]=_0x242157[0x0][_0x9268('0x3b')]({'plain':!![]});_0x242157[0x1]=_0x242157[0x1][_0x9268('0x3b')]({'plain':!![]});delete _0x242157[0x0]['id'];delete _0x242157[0x1]['id'];return _[_0x9268('0x3c')](_0x242157[0x0],_0x242157[0x1],function(_0x2f01c3,_0x3199fa){if(Array[_0x9268('0x3d')](_0x3199fa)&&!_0x3199fa['length']){return _0x2f01c3;}else if(!_0x3199fa){return _0x2f01c3;}});}})[_0x9268('0x1a')](handleEntityNotFound(_0x4c7ff6,null))['then'](function(_0x31edbd){if(_0x31edbd){if(_0x31edbd[_0x9268('0x3e')]&&_[_0x9268('0x3d')](_0x31edbd[_0x9268('0x3e')])){_0x31edbd['tags']=_0x31edbd['tags'][_0x9268('0x3f')]();}logger['info'](_0x9268('0x40'),_0x5c0032[_0x9268('0x39')]['to'],_0x5c0032['body'][_0x9268('0x41')]);return db[_0x9268('0x42')][_0x9268('0x1b')]({'where':{'ContactId':[_0x5c0032[_0x9268('0x39')]['to'],_0x5c0032['body']['from']]}})['then'](function(_0x498780){logger[_0x9268('0x34')](_0x9268('0x43'),_0x498780);return db[_0x9268('0x44')][_0x9268('0x1b')]({'where':{'ContactId':[_0x5c0032[_0x9268('0x39')]['to'],_0x5c0032[_0x9268('0x39')]['from']]}})[_0x9268('0x1a')](function(_0xdca203){logger[_0x9268('0x34')]('[CmContact][merge][destroy][CmHopperBlack],\x20%s',_0xdca203);return db[_0x9268('0x3a')][_0x9268('0x45')](_0x31edbd);});});}})['then'](function(_0x2a2ffc){if(_0x2a2ffc){_0x3efc8c=_0x2a2ffc;_0x44cad3={'ContactId':_0x3efc8c['id']};_0x37cc8b={'where':{'ContactId':[_0x5c0032[_0x9268('0x39')]['to'],_0x5c0032[_0x9268('0x39')][_0x9268('0x41')]]}};return db['ChatInteraction']['update'](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x46')][_0x9268('0x47')](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x48')]['update'](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db['MailInteraction'][_0x9268('0x47')](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x49')][_0x9268('0x47')](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x4a')][_0x9268('0x47')](_0x44cad3,_0x37cc8b);}})['then'](function(){if(_0x3efc8c){return db[_0x9268('0x49')]['update'](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x4b')][_0x9268('0x47')](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x4c')][_0x9268('0x47')](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db['FaxInteraction']['update'](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x4d')]['update'](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x4e')][_0x9268('0x47')](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db['OpenchannelMessage'][_0x9268('0x47')](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x4f')]['update']({'CmContactId':_0x3efc8c['id']},{'where':{'CmContactId':[_0x5c0032['body']['to'],_0x5c0032[_0x9268('0x39')]['from']]}});}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x50')]['update'](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x51')]['update'](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db['ReportAgentPreview'][_0x9268('0x47')](_0x44cad3,_0x37cc8b);}})['then'](function(){if(_0x3efc8c){return db[_0x9268('0x52')][_0x9268('0x47')](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x53')][_0x9268('0x47')](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x54')]['update'](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x55')][_0x9268('0x47')](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db['OpenchannelQueueReport'][_0x9268('0x47')](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db['SmsQueueReport']['update'](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x56')][_0x9268('0x47')](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x57')]['update'](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x58')][_0x9268('0x47')](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x59')]['update'](_0x44cad3,_0x37cc8b);}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return db[_0x9268('0x3a')]['destroy']({'where':{'id':[_0x5c0032[_0x9268('0x39')]['to'],_0x5c0032[_0x9268('0x39')][_0x9268('0x41')]]}});}})[_0x9268('0x1a')](function(){if(_0x3efc8c){return _0x3efc8c;}})[_0x9268('0x1a')](respondWithResult(_0x4c7ff6,null))[_0x9268('0x25')](handleError(_0x4c7ff6,null));};exports['create']=function(_0xa2bc7a,_0x3cad51){return db['CmContact'][_0x9268('0x28')]()[_0x9268('0x1a')](function(_0x80d0c9){if(_0xa2bc7a[_0x9268('0x39')][_0x9268('0x3e')]&&_[_0x9268('0x3d')](_0xa2bc7a[_0x9268('0x39')][_0x9268('0x3e')])){if(_0xa2bc7a['body'][_0x9268('0x3e')]['length']){_0xa2bc7a[_0x9268('0x39')][_0x9268('0x3e')]=_0xa2bc7a['body'][_0x9268('0x3e')][_0x9268('0x3f')](';')+';';}else{_0xa2bc7a['body'][_0x9268('0x3e')]=null;}}else{_0xa2bc7a['body'][_0x9268('0x3e')]=null;}if(!_[_0x9268('0x5a')](_0xa2bc7a[_0x9268('0x39')][_0x9268('0x5b')])){var _0x29fd70=_0xa2bc7a[_0x9268('0x39')]['dialTimezone'];if(!_['isNil'](shared[_0x9268('0x5c')][_0x29fd70]))_0xa2bc7a[_0x9268('0x39')][_0x9268('0x5d')]=shared[_0x9268('0x5c')][_0x29fd70][_0x9268('0x5d')];}return db['CmContact'][_0x9268('0x45')](_0xa2bc7a[_0x9268('0x39')],{'fields':_['keys'](_0x80d0c9),'raw':!![]});})[_0x9268('0x1a')](function(_0x127359){if(_0xa2bc7a[_0x9268('0x39')][_0x9268('0x5e')]){return insertAdditionalPhones(_0x127359,_0xa2bc7a[_0x9268('0x39')][_0x9268('0x5e')]);}else{return _0x127359;}})['then'](respondWithResult(_0x3cad51,0xc9))[_0x9268('0x25')](handleError(_0x3cad51,null));};exports[_0x9268('0x5f')]=function(_0x102b22,_0x2a40f7){var _0x5e44c7=0x0;var _0x48539a=0x0;var _0x5f5a34=0x0;var _0x6d9034=[];return db['CmContact']['describe']()['then'](function(_0x31b3ca){return BPromise['each'](_0x102b22['body'],function(_0x1d0df9){var _0x1b4a40={'where':{'$or':[]},'defaults':_0x1d0df9,'fields':_[_0x9268('0x29')](_0x31b3ca),'raw':!![]};if(_0x1d0df9[_0x9268('0x60')]){for(var _0x1bdac5=0x0;_0x1bdac5<_0x1d0df9[_0x9268('0x60')][_0x9268('0x2a')];_0x1bdac5++){var _0x285959={};_0x285959[_0x1d0df9['duplicates'][_0x1bdac5]]=_0x1d0df9[_0x1d0df9[_0x9268('0x60')][_0x1bdac5]];_0x1b4a40[_0x9268('0x61')][_0x9268('0x62')][_0x9268('0x63')](_0x285959);}_0x1b4a40['where'][_0x9268('0x64')]=_0x1d0df9[_0x9268('0x64')];}return db[_0x9268('0x3a')]['findOrCreate'](_0x1b4a40)[_0x9268('0x65')](function(_0x53b761,_0x4c96b2){if(_0x4c96b2){if(_0x1d0df9[_0x9268('0x37')]('additionalPhones')){_0x6d9034['push']({'contact':_0x53b761,'additionalPhones':_0x1d0df9[_0x9268('0x5e')]});}_0x5e44c7++;}else{_0x5f5a34++;}})[_0x9268('0x25')](function(){_0x48539a++;});});})['then'](function(_0x5502ce){if(_0x5502ce){if(_0x6d9034[_0x9268('0x2a')]>0x0){return new Promise(function(_0x57968e){var _0x2fede7=[];for(var _0x44f9c2=0x0;_0x44f9c2<_0x6d9034['length'];_0x44f9c2++){_0x2fede7[_0x9268('0x63')](insertAdditionalPhones(_0x6d9034[_0x44f9c2][_0x9268('0x66')],_0x6d9034[_0x44f9c2]['additionalPhones']));}Promise[_0x9268('0x67')](_0x2fede7)['then'](function(){_0x57968e(0x1);});})['then'](function(){return{'success':_0x5e44c7,'failure':_0x48539a,'duplicates':_0x5f5a34};});}else{return{'success':_0x5e44c7,'failure':_0x48539a,'duplicates':_0x5f5a34};}}})[_0x9268('0x1a')](respondWithResult(_0x2a40f7,0xc9))[_0x9268('0x25')](handleError(_0x2a40f7,null));};exports[_0x9268('0x68')]=function(_0x10ffb5,_0x372793){var _0x13831e;return db[_0x9268('0x3a')][_0x9268('0x28')]()[_0x9268('0x1a')](function(_0x2ae87d){return db['CmContact'][_0x9268('0x26')]({'where':{'id':_0x10ffb5[_0x9268('0x27')]['id']},'include':[{'model':db['Tag'],'as':_0x9268('0x69'),'attributes':['id',_0x9268('0x1e'),_0x9268('0x6a')],'required':_0x10ffb5[_0x9268('0x23')][_0x9268('0x6b')]?!![]:![]},{'model':db[_0x9268('0x4f')],'as':_0x9268('0x6c'),'where':{'CmContactId':_0x10ffb5[_0x9268('0x27')]['id']},'required':![],'include':[{'model':db['ContactItemType'],'as':_0x9268('0x6d')}]}],'order':[db[_0x9268('0x6e')][_0x9268('0x6f')]('Phones.OrderBy')],'attributes':_[_0x9268('0x29')](_0x2ae87d)});})[_0x9268('0x1a')](function(_0x43f09b){if(!_[_0x9268('0x5a')](_0x43f09b)){_0x13831e=_0x43f09b[_0x9268('0x3b')]({'plain':!![]});var _0x257aa7={'where':{'$and':[{'ListId':{'$ne':null}}]}};if(_0x43f09b&&_0x43f09b[_0x9268('0x64')]){if(_0x43f09b[_0x9268('0x64')]){_0x257aa7['where']['$and'][_0x9268('0x63')]({'ListId':{'$ne':_0x43f09b[_0x9268('0x64')]}});}}return db[_0x9268('0x30')]['findAll'](_0x257aa7);}})[_0x9268('0x1a')](function(_0x604a18){if(!_[_0x9268('0x5a')](_0x604a18)){return _['omit'](_0x13831e,_['map'](_0x604a18,function(_0xfaa1f0){return util[_0x9268('0x70')](_0x9268('0x71'),_0xfaa1f0['id']);}));}})[_0x9268('0x1a')](handleEntityNotFound(_0x372793,null))['then'](respondWithResult(_0x372793,null))[_0x9268('0x25')](handleError(_0x372793,null));};exports['update']=function(_0x3d94ae,_0x186ce3){var _0x586cd6;if(_0x3d94ae['body']['id']){delete _0x3d94ae[_0x9268('0x39')]['id'];}if(!_[_0x9268('0x5a')](_0x3d94ae[_0x9268('0x39')][_0x9268('0x5b')])){var _0x96643d=_0x3d94ae[_0x9268('0x39')][_0x9268('0x5b')];if(!_[_0x9268('0x5a')](shared[_0x9268('0x5c')][_0x96643d]))_0x3d94ae[_0x9268('0x39')]['utcOffset']=shared[_0x9268('0x5c')][_0x96643d]['utcOffset'];}return db[_0x9268('0x3a')][_0x9268('0x26')]({'where':{'id':_0x3d94ae[_0x9268('0x27')]['id']}})[_0x9268('0x1a')](handleEntityNotFound(_0x186ce3,null))[_0x9268('0x1a')](saveUpdates(_0x3d94ae[_0x9268('0x39')],null))[_0x9268('0x1a')](function(_0x318ffe){_0x586cd6=_0x318ffe;var _0x33aba3={'where':{'$and':[{'ListId':{'$ne':null}}]}};if(_0x318ffe&&_0x318ffe['ListId']){if(_0x318ffe[_0x9268('0x64')]){_0x33aba3[_0x9268('0x61')][_0x9268('0x72')][_0x9268('0x63')]({'ListId':{'$ne':_0x318ffe['ListId']}});}}return db['CmCustomField'][_0x9268('0x22')](_0x33aba3);})[_0x9268('0x1a')](function(_0x447e66){if(_0x447e66){return _[_0x9268('0x73')](_[_0x9268('0x74')](_0x3d94ae[_0x9268('0x39')],function(_0x54487d,_0x3b19dd){return _[_0x9268('0x2b')](_0x3b19dd,'cf_');}),_[_0x9268('0x75')](_0x447e66,function(_0x86123d){return util['format'](_0x9268('0x71'),_0x86123d['id']);}));}})[_0x9268('0x1a')](function(_0x5e790b){if(_0x5e790b&&!_[_0x9268('0x76')](_0x5e790b)){var _0x4bdaaf=squel['update']()[_0x9268('0x77')](_0x9268('0x78'))[_0x9268('0x79')](_0x5e790b)[_0x9268('0x61')]('id\x20=\x20?',_0x3d94ae[_0x9268('0x27')]['id'])[_0x9268('0x7a')]();return db[_0x9268('0x6e')][_0x9268('0x23')](_0x4bdaaf[_0x9268('0x7b')],{'replacements':_0x4bdaaf[_0x9268('0x33')]});}})[_0x9268('0x1a')](function(){if(_0x3d94ae[_0x9268('0x39')]['phone']&&_0x586cd6){return db[_0x9268('0x42')][_0x9268('0x47')]({'phone':_0x3d94ae[_0x9268('0x39')][_0x9268('0x7c')],'OrderBy':0x0},{'where':{'ContactId':_0x586cd6['id']}});}})[_0x9268('0x1a')](function(){return _0x586cd6;})[_0x9268('0x1a')](respondWithResult(_0x186ce3,null))[_0x9268('0x25')](handleError(_0x186ce3,null));};exports['getTags']=function(_0x417d44,_0x288407){var _0x345c97={};var _0x4a9eec={};var _0x45a341;var _0x3f22dd;return db['CmContact']['findOne']({'where':{'id':_0x417d44[_0x9268('0x27')]['id']}})['then'](handleEntityNotFound(_0x288407,null))[_0x9268('0x1a')](function(_0x4a26ad){if(_0x4a26ad){_0x45a341=_0x4a26ad;_0x4a9eec[_0x9268('0x7d')]=_[_0x9268('0x29')](db[_0x9268('0x7e')]['rawAttributes']);_0x4a9eec[_0x9268('0x23')]=_['keys'](_0x417d44[_0x9268('0x23')]);_0x4a9eec[_0x9268('0x7f')]=_[_0x9268('0x80')](_0x4a9eec[_0x9268('0x7d')],_0x4a9eec[_0x9268('0x23')]);_0x345c97['attributes']=_[_0x9268('0x80')](_0x4a9eec['model'],qs[_0x9268('0x81')](_0x417d44[_0x9268('0x23')]['fields']));_0x345c97[_0x9268('0x82')]=_0x345c97[_0x9268('0x82')][_0x9268('0x2a')]?_0x345c97[_0x9268('0x82')]:_0x4a9eec[_0x9268('0x7d')];_0x345c97[_0x9268('0x83')]=qs[_0x9268('0x84')](_0x417d44[_0x9268('0x23')][_0x9268('0x84')]);_0x345c97['where']=qs[_0x9268('0x7f')](_['pick'](_0x417d44[_0x9268('0x23')],_0x4a9eec[_0x9268('0x7f')]));if(_0x417d44[_0x9268('0x23')][_0x9268('0x85')]){_0x345c97[_0x9268('0x61')]=_[_0x9268('0x38')](_0x345c97[_0x9268('0x61')],{'$or':_[_0x9268('0x75')](_0x345c97[_0x9268('0x82')],function(_0x1bee80){var _0x502074={};_0x502074[_0x1bee80]={'$like':'%'+_0x417d44[_0x9268('0x23')][_0x9268('0x85')]+'%'};return _0x502074;})});}_0x345c97=_['merge']({},_0x345c97,_0x417d44['options']);return _0x45a341[_0x9268('0x86')](_0x345c97);}})['then'](function(_0x345a16){if(_0x345a16){_0x3f22dd=_0x345a16[_0x9268('0x2a')];if(!_0x417d44[_0x9268('0x23')][_0x9268('0x37')](_0x9268('0x87'))){_0x345c97['limit']=qs[_0x9268('0x15')](_0x417d44[_0x9268('0x23')][_0x9268('0x15')]);_0x345c97[_0x9268('0x13')]=qs[_0x9268('0x13')](_0x417d44['query'][_0x9268('0x13')]);}return _0x45a341['getTags'](_0x345c97);}})[_0x9268('0x1a')](function(_0x54683b){if(_0x54683b){return _0x54683b?{'count':_0x3f22dd,'rows':_0x54683b}:null;}})[_0x9268('0x1a')](respondWithResult(_0x288407,null))[_0x9268('0x25')](handleError(_0x288407,null));};exports[_0x9268('0x88')]=function(_0x166a7d,_0x4a4d8d){if(_0x166a7d['body']['id']){delete _0x166a7d['body']['id'];}return db[_0x9268('0x3a')][_0x9268('0x89')]({'where':{'id':_0x166a7d['params']['id']}})[_0x9268('0x1a')](handleEntityNotFound(_0x4a4d8d,null))['then'](function(_0x302445){if(_0x302445){return _0x302445[_0x9268('0x88')](_0x166a7d[_0x9268('0x39')]['ids']||[]);}return null;})[_0x9268('0x1a')](respondWithResult(_0x4a4d8d,null))[_0x9268('0x25')](handleError(_0x4a4d8d,null));};exports['setAdditionalPhones']=function(_0x5a8951,_0x55288c){var _0x2d1a9f=[];_0x2d1a9f[_0x9268('0x63')](addAdditionalPhones(_0x5a8951['body']));Promise['all'](_0x2d1a9f)[_0x9268('0x1a')](function(){_0x2d1a9f=[];_0x2d1a9f[_0x9268('0x63')](deleteCmHopperPhones(_0x5a8951['body']['id']));_0x2d1a9f['push'](addCmHopperPhones(_0x5a8951['body']['id']));Promise[_0x9268('0x67')](_0x2d1a9f)[_0x9268('0x1a')](function(){return[0x1];})['then'](respondWithResult(_0x55288c,null));});};function addAdditionalPhones(_0x4e4894){var _0x348bd1;return new Promise(function(_0x32cceb){return db['CmContactHasItem'][_0x9268('0x1b')]({'where':{'CmContactId':_0x4e4894['id']}})[_0x9268('0x1a')](function(){db['ContactItemType']['findAll']({'raw':!![],'attributes':['id',_0x9268('0x8a')]})[_0x9268('0x1a')](function(_0x2d5e52){var _0x577e5d=[];for(var _0x319579=0x0;_0x319579<_0x4e4894[_0x9268('0x8b')][_0x9268('0x2a')];_0x319579++){var _0x2c75d2=_0x4e4894['item_types']?_[_0x9268('0x5a')](_0x4e4894[_0x9268('0x8c')][_0x319579])?'':_0x4e4894['item_types'][_0x319579]:_0x4e4894[_0x9268('0x8b')][_0x319579][_0x9268('0x8d')]?_0x4e4894[_0x9268('0x8b')][_0x319579][_0x9268('0x8d')]:'';var _0x3442f0=_[_0x9268('0x5a')](_0x4e4894['items'][_0x319579][_0x9268('0x8e')])?'':_0x4e4894[_0x9268('0x8b')][_0x319579]['description'];var _0x30ae9d=_0x2c75d2+':'+_0x4e4894['items'][_0x319579]['phone']+'§'+_0x3442f0;if(_[_0x9268('0x5a')](_0x348bd1))_0x348bd1=_0x30ae9d;else _0x348bd1+=';'+_0x30ae9d;var _0x3a2d92=null;var _0x1d2324=null;if(_0x4e4894[_0x9268('0x8c')]){if(!_[_0x9268('0x5a')](_0x4e4894['item_types'][_0x319579])){_0x1d2324=_['find'](_0x2d5e52,function(_0x565338){return _0x565338['id']===_0x4e4894[_0x9268('0x8c')][_0x319579];});if(!_['isNil'](_0x1d2324)){_0x3a2d92=_0x1d2324['OrderBy'];}}}else{if(!_[_0x9268('0x5a')](_0x4e4894[_0x9268('0x8b')][_0x319579])){_0x1d2324=_[_0x9268('0x26')](_0x2d5e52,function(_0x3d12f7){return _0x3d12f7['id']===_0x4e4894['items'][_0x319579]['ItemTypeId'];});if(!_[_0x9268('0x5a')](_0x1d2324)){_0x3a2d92=_0x319579;}}}if(_[_0x9268('0x5a')](_0x3a2d92)){_0x3a2d92=0x64;}_0x577e5d['push'](addAdditionalPhone(_0x4e4894['id'],_0x4e4894[_0x9268('0x8b')][_0x319579][_0x9268('0x7c')],_0x4e4894[_0x9268('0x8c')]?_['isNil'](_0x4e4894[_0x9268('0x8c')][_0x319579])?null:_0x4e4894[_0x9268('0x8c')][_0x319579]:_0x4e4894['items'][_0x319579][_0x9268('0x8d')]?_0x4e4894[_0x9268('0x8b')][_0x319579][_0x9268('0x8d')]:null,_0x3a2d92,_0x3442f0));}Promise[_0x9268('0x67')](_0x577e5d)[_0x9268('0x1a')](function(){db[_0x9268('0x3a')][_0x9268('0x47')]({'AdditionalPhones':_0x348bd1},{'where':{'id':_0x4e4894['id']}})[_0x9268('0x1a')](function(){_0x32cceb(0x1);});});});});});}function addAdditionalPhone(_0x4995a5,_0x345148,_0x2127b7,_0x4c0e3e,_0x5a5c84){return db[_0x9268('0x4f')][_0x9268('0x26')]({'where':{'CmContactId':_0x4995a5,'item':_0x345148}})['then'](function(_0x4c273f){if(_0x4c273f)logger[_0x9268('0x34')](_0x9268('0x8f'),_0x4c273f);else{db['CmContactHasItem']['create']({'CmContactId':_0x4995a5,'item':_0x345148,'ItemTypeId':_0x2127b7,'OrderBy':_0x4c0e3e,'ItemClass':_0x9268('0x90'),'description':_0x5a5c84});}});}function deleteCmHopperPhones(_0x2fc0b7){return new Promise(function(_0x4e58e9){return db[_0x9268('0x42')][_0x9268('0x22')]({'raw':!![],'attributes':['id'],'where':{'ContactId':_0x2fc0b7}})[_0x9268('0x1a')](function(_0x1ce15d){db[_0x9268('0x91')][_0x9268('0x1b')]({'where':{'CmHopperId':{'$in':_[_0x9268('0x75')](_0x1ce15d,'id')}}});})[_0x9268('0x1a')](function(){_0x4e58e9(0x1);});});}function addCmHopperPhones(_0x1f5e17){return new Promise(function(_0x3dcd59){return db['CmHopper'][_0x9268('0x22')]({'raw':!![],'attributes':['id'],'where':{'ContactId':_0x1f5e17}})[_0x9268('0x1a')](function(_0x4b1dc1){var _0x59427f=[];_[_0x9268('0x75')](_0x4b1dc1,function(_0x37a221){_0x59427f[_0x9268('0x63')](createCmHopperPhone(_0x1f5e17,_0x37a221['id']));});Promise[_0x9268('0x67')](_0x59427f)[_0x9268('0x1a')](function(){_0x3dcd59(0x1);});});});}function createCmHopperPhone(_0x1b2246,_0x18fe96){return new Promise(function(_0x2451e5){db['CmContactHasItem']['findAll']({'raw':!![],'attributes':['item',_0x9268('0x8a')],'where':{'CmContactId':_0x1b2246,'ItemClass':_0x9268('0x90')},'include':[{'model':db[_0x9268('0x92')],'attributes':[_0x9268('0x8a')],'as':_0x9268('0x6d')}],'order':[_0x9268('0x8a'),db[_0x9268('0x6e')][_0x9268('0x6f')]('`ItemType`.OrderBy')]})[_0x9268('0x1a')](function(_0x421a51){var _0x221c2c=0x1;var _0x3e90c0=_[_0x9268('0x75')](_0x421a51,function(_0x3ae8fb){_0x3ae8fb[_0x9268('0x93')]=_0x18fe96;_0x3ae8fb[_0x9268('0x7c')]=_0x3ae8fb[_0x9268('0x94')];_0x3ae8fb['OrderBy']=_0x221c2c;delete _0x3ae8fb[_0x9268('0x95')];_0x221c2c=_0x221c2c+0x1;return _0x3ae8fb;});return db[_0x9268('0x91')][_0x9268('0x5f')](_0x3e90c0,{});})['then'](function(){_0x2451e5(0x1);});});}function insertAdditionalPhones(_0x51a78a,_0x53805b){return new Promise(function(_0x2ebbeb){var _0x21e8e8=[];for(var _0x293f69=0x0;_0x293f69<_0x53805b[_0x9268('0x2a')];_0x293f69++){var _0x10d0c6=_0x53805b[_0x293f69];_0x21e8e8[_0x9268('0x63')](parseContactItemType(_0x10d0c6));}Promise[_0x9268('0x67')](_0x21e8e8)['then'](function(){var _0x2cac5c={'id':_0x51a78a['id'],'items':_0x53805b};return addAdditionalPhones(_0x2cac5c)['then'](function(){return addCmHopperPhones(_0x51a78a['id']);});})[_0x9268('0x1a')](function(){_0x2ebbeb(_0x51a78a);});});}function parseContactItemType(_0x1fb976){return new Promise(function(_0xb5025d){if(_0x1fb976[_0x9268('0x37')]('ItemTypeId')){_0xb5025d(_0x1fb976);}else{return db[_0x9268('0x92')][_0x9268('0x26')]({'where':{'name':_0x1fb976[_0x9268('0x6d')]}})[_0x9268('0x1a')](function(_0x298bf3){if(_[_0x9268('0x5a')](_0x298bf3))_0x1fb976[_0x9268('0x8d')]=null;else _0x1fb976[_0x9268('0x8d')]=_0x298bf3['id'];_0xb5025d(_0x1fb976);});}});}exports[_0x9268('0x96')]=function(_0x420de5,_0x26e425){return db[_0x9268('0x4f')]['findAll']({'raw':!![],'where':{'CmContactId':_0x420de5[_0x9268('0x27')]['id'],'ItemClass':'PHONE'},'include':[{'model':db[_0x9268('0x92')],'as':_0x9268('0x6d')}],'order':[[_0x9268('0x8a')],[db['sequelize'][_0x9268('0x6f')](_0x9268('0x97'))]]})[_0x9268('0x1a')](function(_0x332e6e){return _0x332e6e;})[_0x9268('0x1a')](respondWithResult(_0x26e425,null))[_0x9268('0x25')](handleError(_0x26e425,null));};exports[_0x9268('0x98')]=function(_0x559fc1,_0x485233){return db['CmContactHasItem'][_0x9268('0x22')]({'raw':!![],'where':{'CmContactId':_0x559fc1['body'][_0x9268('0x99')]}})[_0x9268('0x1a')](function(_0x25193e){var _0x482db0=_['map'](_0x25193e,function(_0x4851f7){_0x4851f7[_0x9268('0x9a')]=_0x559fc1['body'][_0x9268('0x9b')];return _0x4851f7;});return db[_0x9268('0x4f')][_0x9268('0x5f')](_0x482db0,{});})[_0x9268('0x1a')](function(){return addCmHopperPhones(_0x559fc1[_0x9268('0x39')][_0x9268('0x9b')]);})['then'](function(){return['ok'];})[_0x9268('0x1a')](respondWithResult(_0x485233,null))[_0x9268('0x25')](handleError(_0x485233,null));};exports[_0x9268('0x9c')]=function(_0xd538f9,_0x43a27a){var _0x5aacaa=[];_0x5aacaa[_0x9268('0x63')](createCmHopperPhone(_0xd538f9['body']['id'],_0xd538f9[_0x9268('0x39')]['hopperId']));Promise[_0x9268('0x67')](_0x5aacaa)[_0x9268('0x1a')](function(){return[0x1];})['then'](respondWithResult(_0x43a27a,null));};exports['getHoppers']=function(_0x21a9c6,_0x4dd1cf){var _0x485c4a={'raw':![],'where':{}};var _0x59075d={};var _0x3a5052={'count':0x0,'rows':[]};return db[_0x9268('0x3a')]['findOne']({'where':{'id':_0x21a9c6['params']['id']}})[_0x9268('0x1a')](handleEntityNotFound(_0x4dd1cf,null))['then'](function(_0x54f648){if(_0x54f648){_0x59075d['model']=_[_0x9268('0x29')](db[_0x9268('0x42')][_0x9268('0x9d')]);_0x59075d[_0x9268('0x23')]=_[_0x9268('0x29')](_0x21a9c6[_0x9268('0x23')]);_0x59075d[_0x9268('0x7f')]=_[_0x9268('0x80')](_0x59075d['model'],_0x59075d['query']);_0x485c4a[_0x9268('0x82')]=_[_0x9268('0x80')](_0x59075d['model'],qs[_0x9268('0x81')](_0x21a9c6[_0x9268('0x23')][_0x9268('0x81')]));_0x485c4a[_0x9268('0x82')]=_0x485c4a[_0x9268('0x82')][_0x9268('0x2a')]?_0x485c4a[_0x9268('0x82')]:_0x59075d[_0x9268('0x7d')];if(!_0x21a9c6[_0x9268('0x23')][_0x9268('0x37')](_0x9268('0x87'))){_0x485c4a['limit']=qs['limit'](_0x21a9c6['query'][_0x9268('0x15')]);_0x485c4a[_0x9268('0x13')]=qs[_0x9268('0x13')](_0x21a9c6[_0x9268('0x23')][_0x9268('0x13')]);}_0x485c4a[_0x9268('0x83')]=qs[_0x9268('0x84')](_0x21a9c6[_0x9268('0x23')]['sort']);_0x485c4a[_0x9268('0x61')]=qs[_0x9268('0x7f')](_[_0x9268('0x9e')](_0x21a9c6[_0x9268('0x23')],_0x59075d[_0x9268('0x7f')]));_0x485c4a['where']['ContactId']=_0x54f648['id'];if(_0x21a9c6[_0x9268('0x23')]['filter']){_0x485c4a[_0x9268('0x61')]=_[_0x9268('0x38')](_0x485c4a[_0x9268('0x61')],{'$or':_[_0x9268('0x75')](_0x485c4a['attributes'],function(_0x3de097){var _0x2f5426={};_0x2f5426[_0x3de097]={'$like':'%'+_0x21a9c6['query']['filter']+'%'};return _0x2f5426;})});}_0x485c4a=_[_0x9268('0x38')]({},_0x485c4a,_0x21a9c6['options']);return db[_0x9268('0x42')][_0x9268('0x16')]({'where':_0x485c4a[_0x9268('0x61')]})[_0x9268('0x1a')](function(_0xeea32){_0x3a5052[_0x9268('0x16')]=_0xeea32;if(_0x21a9c6[_0x9268('0x23')]['includeAll']){_0x485c4a[_0x9268('0x9f')]=[{'all':!![]}];}return db['CmHopper']['findAll'](_0x485c4a);})[_0x9268('0x1a')](function(_0x2be8e5){_0x3a5052['rows']=_0x2be8e5;return _0x3a5052;});}})['then'](respondWithFilteredResult(_0x4dd1cf,_0x485c4a))[_0x9268('0x25')](handleError(_0x4dd1cf,null));};exports[_0x9268('0xa0')]=function(_0xd6d291,_0xecd1ce){var _0xa9d1bc={'raw':!![],'where':{}};var _0x54ea90={};var _0x53fcd1={'count':0x0,'rows':[]};return db['CmContact']['findOne']({'where':{'id':_0xd6d291[_0x9268('0x27')]['id']}})[_0x9268('0x1a')](handleEntityNotFound(_0xecd1ce,null))[_0x9268('0x1a')](function(_0x5cfc4c){if(_0x5cfc4c){_0x54ea90['model']=_[_0x9268('0x29')](db[_0x9268('0x51')][_0x9268('0x9d')]);_0x54ea90[_0x9268('0x23')]=_[_0x9268('0x29')](_0xd6d291[_0x9268('0x23')]);_0x54ea90[_0x9268('0x7f')]=_[_0x9268('0x80')](_0x54ea90[_0x9268('0x7d')],_0x54ea90['query']);_0xa9d1bc[_0x9268('0x82')]=_[_0x9268('0x80')](_0x54ea90[_0x9268('0x7d')],qs[_0x9268('0x81')](_0xd6d291[_0x9268('0x23')][_0x9268('0x81')]));_0xa9d1bc['attributes']=_0xa9d1bc[_0x9268('0x82')][_0x9268('0x2a')]?_0xa9d1bc['attributes']:_0x54ea90[_0x9268('0x7d')];if(!_0xd6d291[_0x9268('0x23')]['hasOwnProperty']('nolimit')){_0xa9d1bc['limit']=qs[_0x9268('0x15')](_0xd6d291[_0x9268('0x23')]['limit']);_0xa9d1bc['offset']=qs[_0x9268('0x13')](_0xd6d291[_0x9268('0x23')][_0x9268('0x13')]);}_0xa9d1bc[_0x9268('0x83')]=qs[_0x9268('0x84')](_0xd6d291[_0x9268('0x23')][_0x9268('0x84')]);_0xa9d1bc[_0x9268('0x61')]=qs['filters'](_[_0x9268('0x9e')](_0xd6d291[_0x9268('0x23')],_0x54ea90[_0x9268('0x7f')]));_0xa9d1bc[_0x9268('0x61')]['ContactId']=_0x5cfc4c['id'];if(_0xd6d291[_0x9268('0x23')][_0x9268('0x85')]){_0xa9d1bc['where']=_['merge'](_0xa9d1bc[_0x9268('0x61')],{'$or':_[_0x9268('0x75')](_0xa9d1bc[_0x9268('0x82')],function(_0x71fff5){var _0x18c315={};_0x18c315[_0x71fff5]={'$like':'%'+_0xd6d291['query'][_0x9268('0x85')]+'%'};return _0x18c315;})});}_0xa9d1bc=_[_0x9268('0x38')]({},_0xa9d1bc,_0xd6d291['options']);return db[_0x9268('0x51')]['count']({'where':_0xa9d1bc[_0x9268('0x61')]})[_0x9268('0x1a')](function(_0x510435){_0x53fcd1[_0x9268('0x16')]=_0x510435;if(_0xd6d291[_0x9268('0x23')][_0x9268('0xa1')]){_0xa9d1bc[_0x9268('0x9f')]=[{'all':!![]}];}return db[_0x9268('0x51')][_0x9268('0x22')](_0xa9d1bc);})[_0x9268('0x1a')](function(_0x54df5f){_0x53fcd1[_0x9268('0xa2')]=_0x54df5f;return _0x53fcd1;});}})[_0x9268('0x1a')](respondWithFilteredResult(_0xecd1ce,_0xa9d1bc))[_0x9268('0x25')](handleError(_0xecd1ce,null));};exports[_0x9268('0xa3')]=function(_0x2dd589,_0x4ab31b){var _0x4ad450={'raw':!![],'where':{}};var _0x57175d={};var _0x433a60={'count':0x0,'rows':[]};return db[_0x9268('0x3a')][_0x9268('0x89')]({'where':{'id':_0x2dd589[_0x9268('0x27')]['id']}})['then'](handleEntityNotFound(_0x4ab31b,null))['then'](function(_0x8189fd){if(_0x8189fd){_0x57175d['model']=_[_0x9268('0x29')](db['CmHopperFinal'][_0x9268('0x9d')]);_0x57175d['query']=_['keys'](_0x2dd589[_0x9268('0x23')]);_0x57175d[_0x9268('0x7f')]=_[_0x9268('0x80')](_0x57175d['model'],_0x57175d['query']);_0x4ad450['attributes']=_[_0x9268('0x80')](_0x57175d['model'],qs[_0x9268('0x81')](_0x2dd589[_0x9268('0x23')]['fields']));_0x4ad450[_0x9268('0x82')]=_0x4ad450[_0x9268('0x82')][_0x9268('0x2a')]?_0x4ad450['attributes']:_0x57175d[_0x9268('0x7d')];if(!_0x2dd589[_0x9268('0x23')]['hasOwnProperty']('nolimit')){_0x4ad450['limit']=qs[_0x9268('0x15')](_0x2dd589[_0x9268('0x23')][_0x9268('0x15')]);_0x4ad450[_0x9268('0x13')]=qs[_0x9268('0x13')](_0x2dd589[_0x9268('0x23')][_0x9268('0x13')]);}_0x4ad450['order']=qs['sort'](_0x2dd589[_0x9268('0x23')]['sort']);_0x4ad450[_0x9268('0x61')]=qs['filters'](_[_0x9268('0x9e')](_0x2dd589[_0x9268('0x23')],_0x57175d[_0x9268('0x7f')]));_0x4ad450[_0x9268('0x61')][_0x9268('0xa4')]=_0x8189fd['id'];if(_0x2dd589[_0x9268('0x23')]['filter']){_0x4ad450[_0x9268('0x61')]=_['merge'](_0x4ad450[_0x9268('0x61')],{'$or':_[_0x9268('0x75')](_0x4ad450[_0x9268('0x82')],function(_0x3cff2e){var _0x1500ec={};_0x1500ec[_0x3cff2e]={'$like':'%'+_0x2dd589[_0x9268('0x23')][_0x9268('0x85')]+'%'};return _0x1500ec;})});}_0x4ad450=_[_0x9268('0x38')]({},_0x4ad450,_0x2dd589[_0x9268('0xa5')]);return db[_0x9268('0x50')][_0x9268('0x16')]({'where':_0x4ad450['where']})['then'](function(_0x5bb6bf){_0x433a60['count']=_0x5bb6bf;if(_0x2dd589[_0x9268('0x23')][_0x9268('0xa1')]){_0x4ad450[_0x9268('0x9f')]=[{'all':!![]}];}return db[_0x9268('0x50')][_0x9268('0x22')](_0x4ad450);})[_0x9268('0x1a')](function(_0x267e4c){_0x433a60[_0x9268('0xa2')]=_0x267e4c;return _0x433a60;});}})[_0x9268('0x1a')](respondWithFilteredResult(_0x4ab31b,_0x4ad450))[_0x9268('0x25')](handleError(_0x4ab31b,null));};exports[_0x9268('0xa6')]=function(_0x27a061,_0x3d3e31){var _0xb07852={'raw':!![],'where':{}};var _0x4d152b={};var _0x1f10aa={'count':0x0,'rows':[]};return db[_0x9268('0x3a')][_0x9268('0x89')]({'where':{'id':_0x27a061[_0x9268('0x27')]['id']}})[_0x9268('0x1a')](handleEntityNotFound(_0x3d3e31,null))[_0x9268('0x1a')](function(_0x497867){if(_0x497867){_0x4d152b[_0x9268('0x7d')]=_[_0x9268('0x29')](db[_0x9268('0x56')]['rawAttributes']);_0x4d152b[_0x9268('0x23')]=_[_0x9268('0x29')](_0x27a061['query']);_0x4d152b[_0x9268('0x7f')]=_[_0x9268('0x80')](_0x4d152b[_0x9268('0x7d')],_0x4d152b[_0x9268('0x23')]);_0xb07852[_0x9268('0x82')]=_['intersection'](_0x4d152b['model'],qs['fields'](_0x27a061[_0x9268('0x23')][_0x9268('0x81')]));_0xb07852[_0x9268('0x82')]=_0xb07852['attributes']['length']?_0xb07852[_0x9268('0x82')]:_0x4d152b[_0x9268('0x7d')];if(!_0x27a061['query']['hasOwnProperty'](_0x9268('0x87'))){_0xb07852[_0x9268('0x15')]=qs[_0x9268('0x15')](_0x27a061[_0x9268('0x23')][_0x9268('0x15')]);_0xb07852[_0x9268('0x13')]=qs['offset'](_0x27a061[_0x9268('0x23')][_0x9268('0x13')]);}_0xb07852[_0x9268('0x83')]=qs[_0x9268('0x84')](_0x27a061[_0x9268('0x23')][_0x9268('0x84')]);_0xb07852[_0x9268('0x61')]=qs[_0x9268('0x7f')](_[_0x9268('0x9e')](_0x27a061['query'],_0x4d152b[_0x9268('0x7f')]));_0xb07852[_0x9268('0x61')][_0x9268('0xa4')]=_0x497867['id'];if(_0x27a061[_0x9268('0x23')][_0x9268('0x85')]){_0xb07852[_0x9268('0x61')]=_[_0x9268('0x38')](_0xb07852[_0x9268('0x61')],{'$or':_[_0x9268('0x75')](_0xb07852['attributes'],function(_0x38b3d2){var _0x8f5d8={};_0x8f5d8[_0x38b3d2]={'$like':'%'+_0x27a061[_0x9268('0x23')][_0x9268('0x85')]+'%'};return _0x8f5d8;})});}_0xb07852=_[_0x9268('0x38')]({},_0xb07852,_0x27a061[_0x9268('0xa5')]);return db['JscriptySessionReport'][_0x9268('0x16')]({'where':_0xb07852['where']})[_0x9268('0x1a')](function(_0x480eea){_0x1f10aa[_0x9268('0x16')]=_0x480eea;if(_0x27a061['query'][_0x9268('0xa1')]){_0xb07852[_0x9268('0x9f')]=[{'all':!![]}];}return db[_0x9268('0x56')][_0x9268('0x22')](_0xb07852);})[_0x9268('0x1a')](function(_0x16fff5){_0x1f10aa[_0x9268('0xa2')]=_0x16fff5;return _0x1f10aa;});}})['then'](respondWithFilteredResult(_0x3d3e31,_0xb07852))[_0x9268('0x25')](handleError(_0x3d3e31,null));};exports[_0x9268('0xa7')]=function(_0x1f292f,_0x2b9ffe){try{if(!_0x1f292f[_0x9268('0x39')][_0x9268('0x64')]){throw new Error(_0x9268('0xa8'));}if(!_0x1f292f[_0x9268('0x39')][_0x9268('0xa9')]){throw new Error(_0x9268('0xaa'));}if(!_0x1f292f['body'][_0x9268('0xab')]){throw new Error(_0x9268('0xac'));}if(!_0x1f292f[_0x9268('0x39')][_0x9268('0xad')]){throw new Error('Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed');}var _0x5b7e30=_0x1f292f[_0x9268('0x39')][_0x9268('0xa9')][_0x9268('0xae')](',');var _0x43b47a=_0x1f292f[_0x9268('0x39')]['binding_values'][_0x9268('0xae')](',');if(!_0x5b7e30['length']||!_0x43b47a[_0x9268('0x2a')]||_0x5b7e30['length']!==_0x43b47a[_0x9268('0x2a')]){throw new Error('Incorrect\x20binding\x20parameters\x20passed!');}_0x1f292f[_0x9268('0x39')]['fields']=_[_0x9268('0xaf')](_0x5b7e30,_0x43b47a);if(!_0x1f292f[_0x9268('0x39')][_0x9268('0x81')]['phone']){throw new Error(_0x9268('0xb0'));}if(!_0x1f292f['body'][_0x9268('0x81')][_0x9268('0xb1')]){throw new Error(_0x9268('0xb2'));}var _0x5259f7=path[_0x9268('0x3f')](config[_0x9268('0xb3')],_0x9268('0xb4'),_0x1f292f['file'][_0x9268('0xb5')]);fs['chmodSync'](_0x5259f7,parseInt(_0x9268('0xb6'),0x8));var _0x290fbd=require(_0x9268('0xb7'))[_0x9268('0xb8')](path[_0x9268('0x3f')](__dirname,_0x9268('0xb9')),[_0x5259f7,_0x1f292f[_0x9268('0x39')][_0x9268('0xa9')],_0x1f292f[_0x9268('0x39')][_0x9268('0xab')],_0x1f292f[_0x9268('0x39')]['ListId'],_0x1f292f[_0x9268('0x39')][_0x9268('0xba')],_0x1f292f['body'][_0x9268('0x60')],_0x1f292f[_0x9268('0x39')][_0x9268('0xad')]]);return _0x2b9ffe[_0x9268('0x17')](0xc8)[_0x9268('0x12')]({'message':_0x9268('0xbb'),'pid':_0x290fbd['pid']});}catch(_0x11f022){return _0x2b9ffe['status'](0x1f4)[_0x9268('0x1f')](_0x11f022);}};exports['upload']=function(_0x30d748,_0x1cc7fb){var _0x28316f=fs[_0x9268('0xbc')](_0x30d748['file'][_0x9268('0x3')]);Papa['parse'](_0x28316f,{'header':!![],'skipEmptyLines':!![],'preview':0x1,'complete':function(_0x57c946){return _0x1cc7fb[_0x9268('0x17')](0xc8)[_0x9268('0x12')]({'file':_0x30d748[_0x9268('0xbd')],'fields':_0x57c946[_0x9268('0xbe')][_0x9268('0x81')]});}});};exports['import']=function(_0x33e6f1,_0x31f59d){return db[_0x9268('0xbf')][_0x9268('0x22')]({'raw':!![],'attributes':['id'],'where':{'role':_0x9268('0xc0')}})[_0x9268('0x1a')](function(_0x1efca1){var _0x34d574=![];if(!_0x33e6f1['body']['ListId']){throw new Error('No\x20ListId\x20specified');}if(!_0x33e6f1[_0x9268('0x39')]['binding'][_0x9268('0x7c')]){throw new Error(_0x9268('0xb0'));}if(!_0x33e6f1[_0x9268('0x39')][_0x9268('0xc1')][_0x9268('0xb1')]){throw new Error(_0x9268('0xb2'));}if(!_0x33e6f1[_0x9268('0x39')]['socket_timestamp']){throw new Error('Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed');}var _0x5d75a2=require(_0x9268('0xb7'))[_0x9268('0xb8')](path['join'](__dirname,_0x9268('0xc2')),[_0x33e6f1[_0x9268('0x27')]['id'],JSON[_0x9268('0xc3')](_0x33e6f1[_0x9268('0x39')]),JSON[_0x9268('0xc3')](_0x1efca1)]);_0x5d75a2['on'](_0x9268('0xc4'),function(){_0x34d574=!![];return _0x31f59d[_0x9268('0x17')](0xc8)[_0x9268('0x12')]({'message':'start\x20child\x20process\x20correctly!','pid':_0x5d75a2[_0x9268('0xc5')]});});_0x5d75a2['on'](_0x9268('0xc6'),function(_0x33d2ad){if(_0x33d2ad&&!_0x34d574){return _0x31f59d[_0x9268('0x17')](0x1f4)['json']({'message':_0x9268('0xc7'),'pid':_0x5d75a2[_0x9268('0xc5')]});}});})[_0x9268('0x25')](handleError(_0x31f59d,null));};exports[_0x9268('0xc8')]=function(_0x40d35,_0x4746f4){return db[_0x9268('0xbf')]['findAll']({'raw':!![],'attributes':['id'],'where':{'role':_0x9268('0xc0')}})[_0x9268('0x1a')](function(_0x513291){var _0x2f512b=![];if(!_0x40d35['body'][_0x9268('0x64')]){throw new Error('No\x20ListId\x20specified');}if(!_0x40d35[_0x9268('0x39')][_0x9268('0xc1')][_0x9268('0x7c')]){throw new Error(_0x9268('0xb0'));}if(!_0x40d35['body'][_0x9268('0xc1')][_0x9268('0xb1')]){throw new Error(_0x9268('0xb2'));}if(!_0x40d35[_0x9268('0x39')]['socket_timestamp']){throw new Error('Unable\x20to\x20synchronize\x20socket,\x20no\x20timestamp\x20passed');}var _0x1ae9ac=require('child_process')[_0x9268('0xb8')](path[_0x9268('0x3f')](__dirname,_0x9268('0xc9')),[_0x40d35[_0x9268('0x27')]['id'],JSON[_0x9268('0xc3')](_0x40d35[_0x9268('0x39')]),JSON[_0x9268('0xc3')](_0x513291)]);_0x1ae9ac['on'](_0x9268('0xc4'),function(){_0x2f512b=!![];return _0x4746f4[_0x9268('0x17')](0xc8)[_0x9268('0x12')]({'message':_0x9268('0xca'),'pid':_0x1ae9ac[_0x9268('0xc5')]});});_0x1ae9ac['on']('exit',function(_0x3a8649){if(_0x3a8649&&!_0x2f512b){return _0x4746f4[_0x9268('0x17')](0x1f4)['json']({'message':_0x9268('0xc7'),'pid':_0x1ae9ac[_0x9268('0xc5')]});}});})[_0x9268('0x25')](handleError(_0x4746f4,null));};exports[_0x9268('0xcb')]=function(_0x257e3b,_0x13e703){var _0x24f792=[_0x9268('0xcc'),_0x9268('0xcd'),_0x9268('0xce'),'openchannel',_0x9268('0xcf'),_0x9268('0xd0'),_0x9268('0xd1')];var _0x4b3435={'offset':0x0,'order':qs['sort'](_0x9268('0xd2'))},_0x4c2f66={'count':0x0,'rows':[]};Promise[_0x9268('0xd3')]()[_0x9268('0x1a')](function(){if(_0x257e3b[_0x9268('0x23')][_0x9268('0xd4')]){if(!_[_0x9268('0xd5')](_0x24f792,_0x257e3b[_0x9268('0x23')][_0x9268('0xd4')][_0x9268('0xd6')]())){throw new Error('Invalid\x20channel');}_0x24f792=[_0x257e3b[_0x9268('0x23')][_0x9268('0xd4')][_0x9268('0xd6')]()];}if(_0x257e3b[_0x9268('0x23')]['range']){try{var _0x1f26bd=JSON[_0x9268('0xd7')](_0x257e3b[_0x9268('0x23')]['range']);if(!moment(_0x1f26bd[_0x9268('0x41')])[_0x9268('0xd8')]()){throw new Error('Invalid\x20date\x20for\x20range\x20from\x20filter');}if(!moment(_0x1f26bd['to'])[_0x9268('0xd8')]()){throw new Error(_0x9268('0xd9'));}}catch(_0x1e3f07){throw new Error('Invalid\x20createdAt\x20filter');}}if(!_0x257e3b[_0x9268('0x23')][_0x9268('0x37')](_0x9268('0x87'))){_0x4b3435['limit']=qs[_0x9268('0x15')](_0x257e3b[_0x9268('0x23')]['limit']||0xa);_0x4b3435['offset']=qs[_0x9268('0x13')](_0x257e3b['query'][_0x9268('0x13')]);}var _0x346c94=_0x24f792[_0x9268('0x75')](function(_0x4157c7){if(_0x4157c7===_0x9268('0xd1')){var _0x16735a={'attributes':['id',_0x9268('0xda'),_0x9268('0xdb'),_0x9268('0xdc'),_0x9268('0xdd'),_0x9268('0xde'),_0x9268('0xdf'),_0x9268('0xe0'),'duration','note',_0x9268('0xe1'),_0x9268('0xe2'),_0x9268('0xe3'),'userThirdDisposition',_0x9268('0xe4')],'where':{'ContactId':_0x257e3b[_0x9268('0x27')]['id']},'include':[{'model':db[_0x9268('0xbf')],'as':_0x9268('0xbf'),'attributes':['id',_0x9268('0x1e'),'fullname',_0x9268('0x31')]}],'order':[[_0x9268('0xe1'),'DESC']]};if(_0x257e3b['query'][_0x9268('0xe5')]){_0x16735a[_0x9268('0x61')]['createdAt']={'$gte':_0x1f26bd['from'],'$lte':_0x1f26bd['to']};}return db['VoiceCallReport'][_0x9268('0xe6')](_0x16735a)[_0x9268('0x1a')](function(_0x473cf7){_0x4c2f66['count']+=_0x473cf7[_0x9268('0x16')];return _[_0x9268('0x75')](_0x473cf7[_0x9268('0xa2')],function(_0x5d38b5){var _0x4244cd=_0x5d38b5[_0x9268('0x3b')]({'plain':!![]});_0x4244cd[_0x9268('0xd4')]=_0x4157c7;if(_0x4244cd['User']){_0x4244cd['User']={'id':_0x4244cd[_0x9268('0xbf')]['id'],'name':_0x4244cd['User'][_0x9268('0x1e')],'fullname':_0x4244cd['User'][_0x9268('0xe7')],'alias':_0x4244cd[_0x9268('0xbf')]['alias']};}return _0x4244cd;});});}else{var _0x19e63c=_[_0x9268('0xe8')](_0x4157c7)+(_0x4157c7==='chat'?_0x9268('0xe9'):_0x9268('0xea'));var _0x23cb33={'attributes':['id',_0x9268('0xeb'),_0x9268('0xec'),_0x9268('0xe1'),_0x9268('0xed'),_0x9268('0xee'),_0x9268('0xef'),_0x9268('0xf0'),'UserId',_0x19e63c+'Id'],'where':{'ContactId':_0x257e3b['params']['id']},'include':[{'model':db[_0x19e63c],'as':_0x9268('0xea'),'attributes':['id','name',_0x9268('0xf1')]},{'model':db['User'],'as':_0x9268('0xf2'),'attributes':['id',_0x9268('0x1e'),_0x9268('0xe7')]},{'model':db['Tag'],'as':'Tags','attributes':['id',_0x9268('0x1e'),_0x9268('0x6a')],'through':{'attributes':[]}}],'order':[[_0x9268('0xe1'),_0x9268('0xf3')]]};if(_0x257e3b[_0x9268('0x23')][_0x9268('0xe5')]){_0x23cb33[_0x9268('0x61')][_0x9268('0xe1')]={'$gte':_0x1f26bd[_0x9268('0x41')],'$lte':_0x1f26bd['to']};}switch(_0x4157c7){case _0x9268('0xcd'):_0x23cb33['attributes'][_0x9268('0x63')](_0x9268('0xf4'),_0x9268('0xf5'),_0x9268('0xf6'),_0x9268('0xf7'),_0x9268('0xf8'),'ratingMessage','ratingType',_0x9268('0xf9'),'referer');break;case _0x9268('0xcc'):_0x23cb33[_0x9268('0x82')][_0x9268('0x63')](_0x9268('0xfa'),_0x9268('0xfb'));break;case _0x9268('0xfc'):_0x23cb33[_0x9268('0x82')][_0x9268('0x63')]('externalUrl',_0x9268('0xfd'));break;}return db[_[_0x9268('0xe8')](_0x4157c7)+_0x9268('0xfe')][_0x9268('0xe6')](_0x23cb33)['then'](function(_0x4345c9){_0x4c2f66[_0x9268('0x16')]+=_0x4345c9[_0x9268('0x16')];return _[_0x9268('0x75')](_0x4345c9[_0x9268('0xa2')],function(_0x1e01d6){var _0x157c06=_0x1e01d6[_0x9268('0x3b')]({'plain':!![]});_0x157c06[_0x9268('0xd4')]=_0x4157c7;if(_0x157c06[_0x9268('0xf2')]){_0x157c06[_0x9268('0xf2')]={'id':_0x157c06[_0x9268('0xf2')]['id'],'name':_0x157c06[_0x9268('0xf2')][_0x9268('0x1e')],'fullname':_0x157c06[_0x9268('0xf2')][_0x9268('0xe7')]};}return _0x157c06;});});}});return Promise['all'](_0x346c94);})['then'](function(_0x48c4d2){return _(_0x48c4d2)[_0x9268('0xff')]()['sortBy'](_0x9268('0xe1'))[_0x9268('0x100')]()['value']();})['then'](function(_0x427062){_0x4c2f66[_0x9268('0xa2')]=_0x4b3435[_0x9268('0x15')]?_0x427062[_0x9268('0x101')](_0x4b3435[_0x9268('0x13')],_0x4b3435[_0x9268('0x13')]+_0x4b3435[_0x9268('0x15')]):_0x427062;return _0x4c2f66;})[_0x9268('0x1a')](respondWithFilteredResult(_0x13e703,_0x4b3435))[_0x9268('0x25')](handleError(_0x13e703,null));};
\ No newline at end of file
index 95c1d7c..ac98184 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7c41=['emit','hasOwnProperty','hook','exports','../../mysqldb','CmContact','setMaxListeners','save','update','remove'];(function(_0x14ad7c,_0x42aa77){var _0x3928cc=function(_0x1e6f70){while(--_0x1e6f70){_0x14ad7c['push'](_0x14ad7c['shift']());}};_0x3928cc(++_0x42aa77);}(_0x7c41,0x180));var _0x17c4=function(_0x1f57a8,_0xf93936){_0x1f57a8=_0x1f57a8-0x0;var _0x4353ed=_0x7c41[_0x1f57a8];return _0x4353ed;};'use strict';var EventEmitter=require('events');var CmContact=require(_0x17c4('0x0'))['db'][_0x17c4('0x1')];var CmContactEvents=new EventEmitter();CmContactEvents[_0x17c4('0x2')](0x0);var events={'afterCreate':_0x17c4('0x3'),'afterUpdate':_0x17c4('0x4'),'afterDestroy':_0x17c4('0x5')};function emitEvent(_0x20e1ef){return function(_0x218509,_0x3f9ccd,_0x5dcc8a){CmContactEvents[_0x17c4('0x6')](_0x20e1ef+':'+_0x218509['id'],_0x218509);CmContactEvents[_0x17c4('0x6')](_0x20e1ef,_0x218509);_0x5dcc8a(null);};}for(var e in events){if(events[_0x17c4('0x7')](e)){var event=events[e];CmContact[_0x17c4('0x8')](e,emitEvent(event));}}module[_0x17c4('0x9')]=CmContactEvents;
\ No newline at end of file
+var _0x72db=['emit','hook','events','../../mysqldb','CmContact','save','update'];(function(_0x2a3511,_0x5acdb3){var _0x5b4744=function(_0x8a9ee4){while(--_0x8a9ee4){_0x2a3511['push'](_0x2a3511['shift']());}};_0x5b4744(++_0x5acdb3);}(_0x72db,0x12f));var _0xb72d=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x72db[_0x14add3];return _0x4a174f;};'use strict';var EventEmitter=require(_0xb72d('0x0'));var CmContact=require(_0xb72d('0x1'))['db'][_0xb72d('0x2')];var CmContactEvents=new EventEmitter();CmContactEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xb72d('0x3'),'afterUpdate':_0xb72d('0x4'),'afterDestroy':'remove'};function emitEvent(_0x55c1be){return function(_0x23fb34,_0x10b42b,_0x268e16){CmContactEvents[_0xb72d('0x5')](_0x55c1be+':'+_0x23fb34['id'],_0x23fb34);CmContactEvents[_0xb72d('0x5')](_0x55c1be,_0x23fb34);_0x268e16(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];CmContact[_0xb72d('0x6')](e,emitEvent(event));}}module['exports']=CmContactEvents;
\ No newline at end of file
index cb39e36..eb06d35 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa3a6=['[CmContact][afterDestroy][Succesfull]','[CmContact][afterDestroy][Error]','lodash','util','../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment','../../config/environment/shared','./cmContact.attributes','exports','define','CmContact','cm_contacts','phone','firstName','lastName','mobile','fax','email','FULLTEXT','utf8mb4','utf8mb4_unicode_ci','error','cmContact','afterCreate','scheduledat','format','isNil','dialTimezone','findOne','then','timezones','utcOffset','add','minutes','YYYY-MM-DD\x20HH:mm:ss','ret','CmHopper','cmContact,\x20afterCreate\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20onlyIfOpen,\x20exist\x20in\x20hopper\x20VoiceQueue\x20','create','ListId','priority','callbackUniqueid','catch','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopper\x20VoiceQueue\x20','CmHopperFinal','cmContact,\x20afterCreate,\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopperFinal\x20VoiceQueue\x20','inspect','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20onlyIfOpen,\x20exist\x20in\x20hopper\x20Campaign\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopper\x20Campaign\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopperFinal\x20Campaign\x20','VoiceQueue','findAll','outbound','dialCheckDuplicateType','length','always','onlyIfOpen','CmList','BlackLists','get','CmHopperBlack','message','Lists','Campaign','cmContact,\x20%s,\x20%s','List\x20not\x20found','models','destroy','ContactId','VoiceQueueId','CampaignId','push','all','info'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa3a6,0xf2));var _0x6a3a=function(_0x1abe22,_0x417502){_0x1abe22=_0x1abe22-0x0;var _0x568db1=_0xa3a6[_0x1abe22];return _0x568db1;};'use strict';var _=require(_0x6a3a('0x0'));var util=require(_0x6a3a('0x1'));var logger=require(_0x6a3a('0x2'))('api');var moment=require(_0x6a3a('0x3'));var BPromise=require(_0x6a3a('0x4'));var rp=require(_0x6a3a('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x6a3a('0x6'));var config=require(_0x6a3a('0x7'));var shared=require(_0x6a3a('0x8'));var attributes=require(_0x6a3a('0x9'));module[_0x6a3a('0xa')]=function(_0x26c7c6,_0x56e446){return _0x26c7c6[_0x6a3a('0xb')](_0x6a3a('0xc'),attributes,{'tableName':_0x6a3a('0xd'),'paranoid':!![],'indexes':[{'name':_0x6a3a('0xe'),'fields':['phone']},{'name':'fti_cm_contacts','fields':[_0x6a3a('0xf'),_0x6a3a('0x10'),_0x6a3a('0xe'),_0x6a3a('0x11'),_0x6a3a('0x12'),_0x6a3a('0x13')],'type':_0x6a3a('0x14')}],'timestamps':!![],'charset':_0x6a3a('0x15'),'collate':_0x6a3a('0x16'),'hooks':{'afterCreate':function(_0x1e28e7,_0x5a49b4,_0x109aa7){var _0x2547d0=_0x26c7c6['models'];var _0x339603=_0x1e28e7['get']({'plain':!![]});function _0x1d3ea5(){return function(_0x274f58){logger[_0x6a3a('0x17')](_0x6a3a('0x18'),_0x6a3a('0x19'),util['inspect'](_0x274f58,{'showHidden':![],'depth':null}));};}function _0x4a7df4(_0x48b5ab,_0x2d1317){var _0x6a09a1=_0x2d1317[_0x6a3a('0x1a')]?_0x2d1317[_0x6a3a('0x1a')]:moment()[_0x6a3a('0x1b')]('YYYY-MM-DD\x20HH:mm:ss');return new BPromise(function(_0x534dad,_0x1a354a){if(_[_0x6a3a('0x1c')](_0x2d1317[_0x6a3a('0x1d')])){_0x534dad({'ret':_0x6a09a1});}else{_0x2547d0['VoiceQueue'][_0x6a3a('0x1e')]({'where':{'id':_0x48b5ab['id']}})[_0x6a3a('0x1f')](function(_0x5ac412){if(!_[_0x6a3a('0x1c')](_0x5ac412)){var _0x3f7597=_0x5ac412['dialTimezone'];if(!_[_0x6a3a('0x1c')](_0x3f7597)){var _0x3707dc=shared[_0x6a3a('0x20')];var _0x302b45=_0x3707dc[_0x3f7597];var _0x48722b=_0x3707dc[_0x2d1317[_0x6a3a('0x1d')]];if(!_[_0x6a3a('0x1c')](_0x302b45)&&!_[_0x6a3a('0x1c')](_0x48722b)){var _0x362614=_0x302b45[_0x6a3a('0x21')]-_0x48722b[_0x6a3a('0x21')];_0x6a09a1=_0x2d1317[_0x6a3a('0x1a')]?_0x2d1317[_0x6a3a('0x1a')]:moment();var _0x8133c6=moment(_0x6a09a1)[_0x6a3a('0x22')](_0x362614,_0x6a3a('0x23'));_0x534dad({'ret':_0x8133c6[_0x6a3a('0x1b')](_0x6a3a('0x24'))});}else _0x534dad({'ret':_0x6a09a1});}else _0x534dad({'ret':_0x6a09a1});}else{_0x534dad({'ret':_0x6a09a1});}});}});return 0xa;}var _0x9b3673=function(_0x1d354e){return new BPromise(function(_0x44c3dc,_0x31028e){_0x4a7df4(_0x1d354e,_0x339603)[_0x6a3a('0x1f')](function(_0xd9cef9){_0x339603[_0x6a3a('0x1a')]=_0xd9cef9[_0x6a3a('0x25')];_0x2547d0[_0x6a3a('0x26')][_0x6a3a('0x1e')]({'where':{'phone':_0x339603[_0x6a3a('0xe')],'VoiceQueueId':_0x1d354e['id']}})[_0x6a3a('0x1f')](function(_0x55d004){if(!_['isNil'](_0x55d004)){throw new Error(_0x6a3a('0x27')+_0x339603[_0x6a3a('0xe')]+_0x6a3a('0x28')+_0x1d354e['id']);}return _0x2547d0['CmHopper'][_0x6a3a('0x29')]({'phone':_0x339603[_0x6a3a('0xe')],'ContactId':_0x339603['id'],'ListId':_0x339603[_0x6a3a('0x2a')],'priority':_0x339603[_0x6a3a('0x2b')]?_0x339603['priority']:0x2,'scheduledat':_0x339603[_0x6a3a('0x1a')]?_0x339603[_0x6a3a('0x1a')]:moment()[_0x6a3a('0x1b')](_0x6a3a('0x24')),'callback':_0x339603[_0x6a3a('0x2c')]?!![]:![],'callbackuniqueid':_0x339603[_0x6a3a('0x2c')]?_0x339603['callbackUniqueid']:undefined,'callbackat':_0x339603[_0x6a3a('0x2c')]?moment()[_0x6a3a('0x1b')](_0x6a3a('0x24')):undefined,'VoiceQueueId':_0x1d354e['id']});})[_0x6a3a('0x2d')](function(_0x39395f){_0x31028e(_0x39395f);});});});};var _0x5db065=function(_0x3923a4){return new BPromise(function(_0x19c850,_0x60dcc6){_0x4a7df4(_0x3923a4,_0x339603)['then'](function(_0x1f3893){_0x339603[_0x6a3a('0x1a')]=_0x1f3893[_0x6a3a('0x25')];_0x2547d0['CmHopper'][_0x6a3a('0x1e')]({'where':{'phone':_0x339603[_0x6a3a('0xe')],'VoiceQueueId':_0x3923a4['id']}})[_0x6a3a('0x1f')](function(_0x1a144b){if(!_[_0x6a3a('0x1c')](_0x1a144b)){throw new Error(_0x6a3a('0x27')+_0x339603[_0x6a3a('0xe')]+_0x6a3a('0x2e')+_0x3923a4['id']);}return _0x2547d0[_0x6a3a('0x2f')][_0x6a3a('0x1e')]({'where':{'calleridnum':_0x339603[_0x6a3a('0xe')],'VoiceQueueId':_0x3923a4['id']}});})['then'](function(_0x203c65){if(!_[_0x6a3a('0x1c')](_0x203c65)){throw new Error(_0x6a3a('0x30')+_0x339603[_0x6a3a('0xe')]+_0x6a3a('0x31')+_0x3923a4['id']);}return _0x2547d0[_0x6a3a('0x26')]['create']({'phone':_0x339603[_0x6a3a('0xe')],'ContactId':_0x339603['id'],'ListId':_0x339603[_0x6a3a('0x2a')],'priority':_0x339603[_0x6a3a('0x2b')]?_0x339603[_0x6a3a('0x2b')]:0x2,'scheduledat':_0x339603['scheduledat']?_0x339603[_0x6a3a('0x1a')]:moment()[_0x6a3a('0x1b')](_0x6a3a('0x24')),'callback':_0x339603[_0x6a3a('0x2c')]?!![]:![],'callbackuniqueid':_0x339603[_0x6a3a('0x2c')]?_0x339603['callbackUniqueid']:undefined,'callbackat':_0x339603['callbackUniqueid']?moment()[_0x6a3a('0x1b')](_0x6a3a('0x24')):undefined,'VoiceQueueId':_0x3923a4['id']});})['catch'](function(_0x2d5e42){_0x60dcc6(_0x2d5e42);});});});};function _0x48ed39(){return function(_0x45c41d){logger[_0x6a3a('0x17')]('cmContact','afterCreate',util[_0x6a3a('0x32')](_0x45c41d,{'showHidden':![],'depth':null}));};}function _0x17b614(_0x343639,_0x35b6d9){var _0x2bca09=_0x35b6d9[_0x6a3a('0x1a')]?_0x35b6d9['scheduledat']:moment()['format']('YYYY-MM-DD\x20HH:mm:ss');return new BPromise(function(_0x482387,_0x2bb0ff){if(_[_0x6a3a('0x1c')](_0x35b6d9['dialTimezone'])){_0x482387({'ret':_0x2bca09});}else{_0x2547d0['Campaign'][_0x6a3a('0x1e')]({'where':{'id':_0x343639['id']}})[_0x6a3a('0x1f')](function(_0x5a8a36){if(!_[_0x6a3a('0x1c')](_0x5a8a36)){var _0xc3ad00=_0x5a8a36[_0x6a3a('0x1d')];if(!_['isNil'](_0xc3ad00)){var _0x297adb=shared[_0x6a3a('0x20')];var _0xf8d632=_0x297adb[_0xc3ad00];var _0x42729f=_0x297adb[_0x35b6d9['dialTimezone']];if(!_['isNil'](_0xf8d632)&&!_[_0x6a3a('0x1c')](_0x42729f)){var _0x797676=_0xf8d632[_0x6a3a('0x21')]-_0x42729f[_0x6a3a('0x21')];_0x2bca09=_0x35b6d9['scheduledat']?_0x35b6d9[_0x6a3a('0x1a')]:moment();var _0x54799d=moment(_0x2bca09)['add'](_0x797676,_0x6a3a('0x23'));_0x482387({'ret':_0x54799d[_0x6a3a('0x1b')](_0x6a3a('0x24'))});}else _0x482387({'ret':_0x2bca09});}else _0x482387({'ret':_0x2bca09});}else{_0x482387({'ret':_0x2bca09});}});}});return 0xa;}var _0x4de8d1=function(_0x210bb2){return new BPromise(function(_0x115cc2,_0x5ecdf2){_0x17b614(_0x210bb2,_0x339603)[_0x6a3a('0x1f')](function(_0x266d57){_0x339603[_0x6a3a('0x1a')]=_0x266d57[_0x6a3a('0x25')];_0x2547d0[_0x6a3a('0x26')]['findOne']({'where':{'phone':_0x339603[_0x6a3a('0xe')],'CampaignId':_0x210bb2['id']}})[_0x6a3a('0x1f')](function(_0x1d5cb6){if(!_[_0x6a3a('0x1c')](_0x1d5cb6)){throw new Error(_0x6a3a('0x27')+_0x339603[_0x6a3a('0xe')]+_0x6a3a('0x33')+_0x210bb2['id']);}return _0x2547d0[_0x6a3a('0x26')][_0x6a3a('0x29')]({'phone':_0x339603[_0x6a3a('0xe')],'ContactId':_0x339603['id'],'ListId':_0x339603[_0x6a3a('0x2a')],'priority':_0x339603['priority']?_0x339603[_0x6a3a('0x2b')]:0x2,'scheduledat':_0x339603[_0x6a3a('0x1a')]?_0x339603[_0x6a3a('0x1a')]:moment()[_0x6a3a('0x1b')](_0x6a3a('0x24')),'callback':_0x339603[_0x6a3a('0x2c')]?!![]:![],'callbackuniqueid':_0x339603[_0x6a3a('0x2c')]?_0x339603[_0x6a3a('0x2c')]:undefined,'callbackat':_0x339603['callbackUniqueid']?moment()[_0x6a3a('0x1b')](_0x6a3a('0x24')):undefined,'CampaignId':_0x210bb2['id']});})[_0x6a3a('0x2d')](function(_0x2b200d){_0x5ecdf2(_0x2b200d);});});});};var _0x4e337d=function(_0x5b520e){return new BPromise(function(_0x4ca518,_0x70d000){_0x17b614(_0x5b520e,_0x339603)['then'](function(_0x455214){_0x339603['scheduledat']=_0x455214[_0x6a3a('0x25')];_0x2547d0[_0x6a3a('0x26')][_0x6a3a('0x1e')]({'where':{'phone':_0x339603[_0x6a3a('0xe')],'CampaignId':_0x5b520e['id']}})[_0x6a3a('0x1f')](function(_0x39be50){if(!_['isNil'](_0x39be50)){throw new Error(_0x6a3a('0x27')+_0x339603[_0x6a3a('0xe')]+_0x6a3a('0x34')+_0x5b520e['id']);}return _0x2547d0['CmHopperFinal'][_0x6a3a('0x1e')]({'where':{'calleridnum':_0x339603[_0x6a3a('0xe')],'CampaignId':_0x5b520e['id']}});})[_0x6a3a('0x1f')](function(_0x142659){if(!_[_0x6a3a('0x1c')](_0x142659)){throw new Error('cmContact,\x20afterCreate,\x20'+_0x339603[_0x6a3a('0xe')]+_0x6a3a('0x35')+_0x5b520e['id']);}return _0x2547d0[_0x6a3a('0x26')][_0x6a3a('0x29')]({'phone':_0x339603['phone'],'ContactId':_0x339603['id'],'ListId':_0x339603[_0x6a3a('0x2a')],'priority':_0x339603[_0x6a3a('0x2b')]?_0x339603[_0x6a3a('0x2b')]:0x2,'scheduledat':_0x339603['scheduledat']?_0x339603[_0x6a3a('0x1a')]:moment()[_0x6a3a('0x1b')](_0x6a3a('0x24')),'callback':_0x339603['callbackUniqueid']?!![]:![],'callbackuniqueid':_0x339603['callbackUniqueid']?_0x339603[_0x6a3a('0x2c')]:undefined,'callbackat':_0x339603[_0x6a3a('0x2c')]?moment()[_0x6a3a('0x1b')](_0x6a3a('0x24')):undefined,'CampaignId':_0x5b520e['id']});})[_0x6a3a('0x2d')](function(_0xc9729a){_0x70d000(_0xc9729a);});});});};if(_0x339603['ListId']){_0x2547d0[_0x6a3a('0x36')][_0x6a3a('0x37')]({'where':{'type':_0x6a3a('0x38')},'attributes':['id',_0x6a3a('0x39'),'dialTimezone'],'include':[{'model':_0x2547d0['CmList'],'as':'Lists','where':{'id':_0x339603['ListId']}}]})[_0x6a3a('0x1f')](function(_0x1ae648){if(_0x1ae648){var _0x32efda=[];for(var _0x4a79b4=0x0,_0x19a4d3;_0x4a79b4<_0x1ae648[_0x6a3a('0x3a')];_0x4a79b4+=0x1){_0x19a4d3=_0x1ae648[_0x4a79b4]['get']({'plain':!![]});switch(_0x19a4d3[_0x6a3a('0x39')]){case _0x6a3a('0x3b'):_0x5db065(_0x19a4d3)[_0x6a3a('0x2d')](_0x1d3ea5());break;case _0x6a3a('0x3c'):_0x9b3673(_0x19a4d3)['catch'](_0x1d3ea5());break;default:_0x17b614(_0x19a4d3,_0x339603)[_0x6a3a('0x1f')](function(_0x5b8caa){_0x339603[_0x6a3a('0x1a')]=_0x5b8caa[_0x6a3a('0x25')];_0x2547d0[_0x6a3a('0x26')][_0x6a3a('0x29')]({'phone':_0x339603[_0x6a3a('0xe')],'ContactId':_0x339603['id'],'ListId':_0x339603[_0x6a3a('0x2a')],'scheduledat':_0x339603['scheduledat']?_0x339603[_0x6a3a('0x1a')]:moment()[_0x6a3a('0x1b')](_0x6a3a('0x24')),'priority':_0x339603['priority']?_0x339603[_0x6a3a('0x2b')]:0x2,'callback':_0x339603[_0x6a3a('0x2c')]?!![]:![],'callbackuniqueid':_0x339603[_0x6a3a('0x2c')]?_0x339603[_0x6a3a('0x2c')]:undefined,'callbackat':_0x339603['callbackUniqueid']?moment()[_0x6a3a('0x1b')]('YYYY-MM-DD\x20HH:mm:ss'):undefined,'VoiceQueueId':_0x19a4d3['id']})[_0x6a3a('0x2d')](_0x1d3ea5());});}}}})['then'](function(){return _0x2547d0[_0x6a3a('0x36')][_0x6a3a('0x37')]({'where':{'type':_0x6a3a('0x38')},'attributes':['id'],'include':[{'model':_0x2547d0[_0x6a3a('0x3d')],'as':_0x6a3a('0x3e'),'where':{'id':_0x339603[_0x6a3a('0x2a')]}}]})[_0x6a3a('0x1f')](function(_0x538363){if(_0x538363){var _0x55867d=[];for(var _0x45aa8a=0x0,_0x295cf6;_0x45aa8a<_0x538363[_0x6a3a('0x3a')];_0x45aa8a+=0x1){_0x295cf6=_0x538363[_0x45aa8a][_0x6a3a('0x3f')]({'plain':!![]});_0x2547d0[_0x6a3a('0x40')][_0x6a3a('0x29')]({'phone':_0x339603[_0x6a3a('0xe')],'ContactId':_0x339603['id'],'ListId':_0x339603[_0x6a3a('0x2a')],'VoiceQueueId':_0x295cf6['id']})[_0x6a3a('0x2d')](function(_0x1d613f){logger['error']('cmContact,\x20%s,\x20%s',_0x6a3a('0x19'),_0x1d613f[_0x6a3a('0x41')]);});}}});})['then'](function(){return _0x2547d0['Campaign'][_0x6a3a('0x37')]({'attributes':['id',_0x6a3a('0x39'),_0x6a3a('0x1d')],'include':[{'model':_0x2547d0[_0x6a3a('0x3d')],'as':_0x6a3a('0x42'),'where':{'id':_0x339603[_0x6a3a('0x2a')]}}]})[_0x6a3a('0x1f')](function(_0x1649d2){if(_0x1649d2){var _0x2bbcbe=[];for(var _0x3171ee=0x0,_0x78f19c;_0x3171ee<_0x1649d2[_0x6a3a('0x3a')];_0x3171ee+=0x1){_0x78f19c=_0x1649d2[_0x3171ee][_0x6a3a('0x3f')]({'plain':!![]});switch(_0x78f19c[_0x6a3a('0x39')]){case _0x6a3a('0x3b'):_0x4e337d(_0x78f19c)[_0x6a3a('0x2d')](_0x48ed39());break;case _0x6a3a('0x3c'):_0x4de8d1(_0x78f19c)[_0x6a3a('0x2d')](_0x48ed39());break;default:_0x2547d0[_0x6a3a('0x26')][_0x6a3a('0x29')]({'phone':_0x339603[_0x6a3a('0xe')],'ContactId':_0x339603['id'],'ListId':_0x339603['ListId'],'scheduledat':_0x339603[_0x6a3a('0x1a')]?_0x339603[_0x6a3a('0x1a')]:moment()[_0x6a3a('0x1b')](_0x6a3a('0x24')),'priority':_0x339603[_0x6a3a('0x2b')]?_0x339603[_0x6a3a('0x2b')]:0x2,'callback':_0x339603[_0x6a3a('0x2c')]?!![]:![],'callbackuniqueid':_0x339603['callbackUniqueid']?_0x339603[_0x6a3a('0x2c')]:undefined,'callbackat':_0x339603[_0x6a3a('0x2c')]?moment()['format'](_0x6a3a('0x24')):undefined,'CampaignId':_0x78f19c['id']})[_0x6a3a('0x2d')](_0x48ed39());}}}});})[_0x6a3a('0x1f')](function(){return _0x2547d0[_0x6a3a('0x43')][_0x6a3a('0x37')]({'attributes':['id'],'include':[{'model':_0x2547d0[_0x6a3a('0x3d')],'as':_0x6a3a('0x3e'),'where':{'id':_0x339603[_0x6a3a('0x2a')]}}]})[_0x6a3a('0x1f')](function(_0x14437d){if(_0x14437d){var _0x2e1e52=[];for(var _0x4234c4=0x0,_0x3e6c9d;_0x4234c4<_0x14437d['length'];_0x4234c4+=0x1){_0x3e6c9d=_0x14437d[_0x4234c4][_0x6a3a('0x3f')]({'plain':!![]});_0x2547d0[_0x6a3a('0x40')][_0x6a3a('0x29')]({'phone':_0x339603[_0x6a3a('0xe')],'ContactId':_0x339603['id'],'ListId':_0x339603[_0x6a3a('0x2a')],'CampaignId':_0x3e6c9d['id']})[_0x6a3a('0x2d')](function(_0x3c81e7){logger[_0x6a3a('0x17')](_0x6a3a('0x44'),_0x6a3a('0x19'),_0x3c81e7['message']);});}}});})[_0x6a3a('0x1f')](function(){_0x109aa7();})[_0x6a3a('0x2d')](function(_0xbd06a1){logger[_0x6a3a('0x17')](_0x6a3a('0x44'),_0x6a3a('0x19'),_0xbd06a1['message']);_0x109aa7(_0xbd06a1);});}else{_0x109aa7(new Error(_0x6a3a('0x45')));}},'afterDestroy':function(_0x3a1f4a,_0x5d3500,_0x3b1bd2){var _0x9cc17e=_0x26c7c6[_0x6a3a('0x46')];var _0x21594d=_0x3a1f4a[_0x6a3a('0x3f')]({'plain':!![]});return _0x9cc17e[_0x6a3a('0x26')][_0x6a3a('0x37')]({'raw':!![],'where':{'ListId':_0x21594d[_0x6a3a('0x2a')],'ContactId':_0x21594d['id']}})[_0x6a3a('0x1f')](function(_0x51a4ed){if(!_['isEmpty'](_0x51a4ed)){var _0x1cad73=[];for(var _0x1c3a61=0x0;_0x1c3a61<_0x51a4ed[_0x6a3a('0x3a')];_0x1c3a61+=0x1){var _0x45bb81=_0x9cc17e[_0x6a3a('0x26')][_0x6a3a('0x47')]({'where':{'ListId':_0x51a4ed[_0x1c3a61][_0x6a3a('0x2a')],'ContactId':_0x51a4ed[_0x1c3a61][_0x6a3a('0x48')],'VoiceQueueId':_0x51a4ed[_0x1c3a61][_0x6a3a('0x49')],'CampaignId':_0x51a4ed[_0x1c3a61][_0x6a3a('0x4a')]}});_0x1cad73[_0x6a3a('0x4b')](_0x45bb81);}return BPromise[_0x6a3a('0x4c')](_0x1cad73);}})[_0x6a3a('0x1f')](function(_0x19ed2b){logger[_0x6a3a('0x4d')](_0x6a3a('0x4e'),util[_0x6a3a('0x32')](_0x19ed2b,{'showHidden':![],'depth':null}));_0x3b1bd2();})[_0x6a3a('0x2d')](function(_0x1eb0ac){logger['error'](_0x6a3a('0x4f'),util[_0x6a3a('0x32')](_0x1eb0ac,{'showHidden':![],'depth':null}));_0x3b1bd2(_0x1eb0ac);});}}});};
\ No newline at end of file
+var _0xcac8=['utf8mb4_unicode_ci','models','error','cmContact','afterCreate','inspect','scheduledat','format','YYYY-MM-DD\x20HH:mm:ss','VoiceQueue','isNil','dialTimezone','timezones','utcOffset','minutes','ret','CmHopper','findOne','cmContact,\x20afterCreate\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20onlyIfOpen,\x20exist\x20in\x20hopper\x20VoiceQueue\x20','ListId','priority','callbackUniqueid','catch','then','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopper\x20VoiceQueue\x20','CmHopperFinal','cmContact,\x20afterCreate,\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopperFinal\x20VoiceQueue\x20','create','Campaign','add','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20onlyIfOpen,\x20exist\x20in\x20hopper\x20Campaign\x20','\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopper\x20Campaign\x20','findAll','outbound','Lists','length','get','always','onlyIfOpen','CmList','BlackLists','cmContact,\x20%s,\x20%s','message','dialCheckDuplicateType','CmHopperBlack','List\x20not\x20found','isEmpty','ContactId','VoiceQueueId','CampaignId','all','info','[CmContact][afterDestroy][Succesfull]','[CmContact][afterDestroy][Error]','util','../../config/logger','api','moment','bluebird','../../config/environment','./cmContact.attributes','exports','define','CmContact','phone','firstName','lastName','fax','email','FULLTEXT'];(function(_0x4e0560,_0x2841c4){var _0x1b34df=function(_0x241842){while(--_0x241842){_0x4e0560['push'](_0x4e0560['shift']());}};_0x1b34df(++_0x2841c4);}(_0xcac8,0x1a0));var _0x8cac=function(_0x37d0f7,_0x41f91a){_0x37d0f7=_0x37d0f7-0x0;var _0x820b84=_0xcac8[_0x37d0f7];return _0x820b84;};'use strict';var _=require('lodash');var util=require(_0x8cac('0x0'));var logger=require(_0x8cac('0x1'))(_0x8cac('0x2'));var moment=require(_0x8cac('0x3'));var BPromise=require(_0x8cac('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x8cac('0x5'));var shared=require('../../config/environment/shared');var attributes=require(_0x8cac('0x6'));module[_0x8cac('0x7')]=function(_0x111f2b,_0x50517a){return _0x111f2b[_0x8cac('0x8')](_0x8cac('0x9'),attributes,{'tableName':'cm_contacts','paranoid':!![],'indexes':[{'name':'phone','fields':[_0x8cac('0xa')]},{'name':'fti_cm_contacts','fields':[_0x8cac('0xb'),_0x8cac('0xc'),_0x8cac('0xa'),'mobile',_0x8cac('0xd'),_0x8cac('0xe')],'type':_0x8cac('0xf')}],'timestamps':!![],'charset':'utf8mb4','collate':_0x8cac('0x10'),'hooks':{'afterCreate':function(_0x46698d,_0x5f337f,_0x4bb680){var _0x33fa3f=_0x111f2b[_0x8cac('0x11')];var _0x5f49fc=_0x46698d['get']({'plain':!![]});function _0xe959d8(){return function(_0x33ce26){logger[_0x8cac('0x12')](_0x8cac('0x13'),_0x8cac('0x14'),util[_0x8cac('0x15')](_0x33ce26,{'showHidden':![],'depth':null}));};}function _0x2859ea(_0x469d45,_0x2773d2){var _0x7b9314=_0x2773d2[_0x8cac('0x16')]?_0x2773d2['scheduledat']:moment()[_0x8cac('0x17')](_0x8cac('0x18'));return new BPromise(function(_0x37ae20,_0x56335e){if(_['isNil'](_0x2773d2['dialTimezone'])){_0x37ae20({'ret':_0x7b9314});}else{_0x33fa3f[_0x8cac('0x19')]['findOne']({'where':{'id':_0x469d45['id']}})['then'](function(_0x2853d4){if(!_[_0x8cac('0x1a')](_0x2853d4)){var _0x48857b=_0x2853d4[_0x8cac('0x1b')];if(!_[_0x8cac('0x1a')](_0x48857b)){var _0x5f588a=shared[_0x8cac('0x1c')];var _0x48516e=_0x5f588a[_0x48857b];var _0x22b10a=_0x5f588a[_0x2773d2['dialTimezone']];if(!_[_0x8cac('0x1a')](_0x48516e)&&!_[_0x8cac('0x1a')](_0x22b10a)){var _0x2bd154=_0x48516e[_0x8cac('0x1d')]-_0x22b10a[_0x8cac('0x1d')];_0x7b9314=_0x2773d2['scheduledat']?_0x2773d2[_0x8cac('0x16')]:moment();var _0xd20369=moment(_0x7b9314)['add'](_0x2bd154,_0x8cac('0x1e'));_0x37ae20({'ret':_0xd20369[_0x8cac('0x17')](_0x8cac('0x18'))});}else _0x37ae20({'ret':_0x7b9314});}else _0x37ae20({'ret':_0x7b9314});}else{_0x37ae20({'ret':_0x7b9314});}});}});return 0xa;}var _0x258aea=function(_0x55c82a){return new BPromise(function(_0x537dcb,_0x3b3811){_0x2859ea(_0x55c82a,_0x5f49fc)['then'](function(_0x430132){_0x5f49fc['scheduledat']=_0x430132[_0x8cac('0x1f')];_0x33fa3f[_0x8cac('0x20')][_0x8cac('0x21')]({'where':{'phone':_0x5f49fc['phone'],'VoiceQueueId':_0x55c82a['id']}})['then'](function(_0x478969){if(!_['isNil'](_0x478969)){throw new Error(_0x8cac('0x22')+_0x5f49fc[_0x8cac('0xa')]+_0x8cac('0x23')+_0x55c82a['id']);}return _0x33fa3f[_0x8cac('0x20')]['create']({'phone':_0x5f49fc[_0x8cac('0xa')],'ContactId':_0x5f49fc['id'],'ListId':_0x5f49fc[_0x8cac('0x24')],'priority':_0x5f49fc[_0x8cac('0x25')]?_0x5f49fc[_0x8cac('0x25')]:0x2,'scheduledat':_0x5f49fc[_0x8cac('0x16')]?_0x5f49fc[_0x8cac('0x16')]:moment()[_0x8cac('0x17')]('YYYY-MM-DD\x20HH:mm:ss'),'callback':_0x5f49fc[_0x8cac('0x26')]?!![]:![],'callbackuniqueid':_0x5f49fc[_0x8cac('0x26')]?_0x5f49fc['callbackUniqueid']:undefined,'callbackat':_0x5f49fc[_0x8cac('0x26')]?moment()[_0x8cac('0x17')](_0x8cac('0x18')):undefined,'VoiceQueueId':_0x55c82a['id']});})[_0x8cac('0x27')](function(_0x34ed37){_0x3b3811(_0x34ed37);});});});};var _0x32ec35=function(_0x30f88b){return new BPromise(function(_0x291df3,_0x5a9d00){_0x2859ea(_0x30f88b,_0x5f49fc)[_0x8cac('0x28')](function(_0x2abf1a){_0x5f49fc[_0x8cac('0x16')]=_0x2abf1a[_0x8cac('0x1f')];_0x33fa3f['CmHopper'][_0x8cac('0x21')]({'where':{'phone':_0x5f49fc[_0x8cac('0xa')],'VoiceQueueId':_0x30f88b['id']}})[_0x8cac('0x28')](function(_0x2cc49b){if(!_[_0x8cac('0x1a')](_0x2cc49b)){throw new Error(_0x8cac('0x22')+_0x5f49fc[_0x8cac('0xa')]+_0x8cac('0x29')+_0x30f88b['id']);}return _0x33fa3f[_0x8cac('0x2a')][_0x8cac('0x21')]({'where':{'calleridnum':_0x5f49fc['phone'],'VoiceQueueId':_0x30f88b['id']}});})[_0x8cac('0x28')](function(_0x154f97){if(!_[_0x8cac('0x1a')](_0x154f97)){throw new Error(_0x8cac('0x2b')+_0x5f49fc[_0x8cac('0xa')]+_0x8cac('0x2c')+_0x30f88b['id']);}return _0x33fa3f['CmHopper'][_0x8cac('0x2d')]({'phone':_0x5f49fc['phone'],'ContactId':_0x5f49fc['id'],'ListId':_0x5f49fc[_0x8cac('0x24')],'priority':_0x5f49fc[_0x8cac('0x25')]?_0x5f49fc[_0x8cac('0x25')]:0x2,'scheduledat':_0x5f49fc['scheduledat']?_0x5f49fc['scheduledat']:moment()['format'](_0x8cac('0x18')),'callback':_0x5f49fc[_0x8cac('0x26')]?!![]:![],'callbackuniqueid':_0x5f49fc['callbackUniqueid']?_0x5f49fc[_0x8cac('0x26')]:undefined,'callbackat':_0x5f49fc[_0x8cac('0x26')]?moment()[_0x8cac('0x17')](_0x8cac('0x18')):undefined,'VoiceQueueId':_0x30f88b['id']});})['catch'](function(_0x334f44){_0x5a9d00(_0x334f44);});});});};function _0x2f24be(){return function(_0x5469b1){logger[_0x8cac('0x12')](_0x8cac('0x13'),_0x8cac('0x14'),util[_0x8cac('0x15')](_0x5469b1,{'showHidden':![],'depth':null}));};}function _0x5ae2de(_0x46ed9b,_0xae855f){var _0x2e7b42=_0xae855f[_0x8cac('0x16')]?_0xae855f['scheduledat']:moment()[_0x8cac('0x17')](_0x8cac('0x18'));return new BPromise(function(_0x54a81f,_0x42c8ca){if(_[_0x8cac('0x1a')](_0xae855f['dialTimezone'])){_0x54a81f({'ret':_0x2e7b42});}else{_0x33fa3f[_0x8cac('0x2e')][_0x8cac('0x21')]({'where':{'id':_0x46ed9b['id']}})[_0x8cac('0x28')](function(_0x199e1e){if(!_[_0x8cac('0x1a')](_0x199e1e)){var _0x163845=_0x199e1e['dialTimezone'];if(!_['isNil'](_0x163845)){var _0x1a411a=shared[_0x8cac('0x1c')];var _0x22342f=_0x1a411a[_0x163845];var _0x42a1a4=_0x1a411a[_0xae855f[_0x8cac('0x1b')]];if(!_[_0x8cac('0x1a')](_0x22342f)&&!_[_0x8cac('0x1a')](_0x42a1a4)){var _0x3e00bb=_0x22342f[_0x8cac('0x1d')]-_0x42a1a4[_0x8cac('0x1d')];_0x2e7b42=_0xae855f[_0x8cac('0x16')]?_0xae855f[_0x8cac('0x16')]:moment();var _0x2c4b9e=moment(_0x2e7b42)[_0x8cac('0x2f')](_0x3e00bb,_0x8cac('0x1e'));_0x54a81f({'ret':_0x2c4b9e[_0x8cac('0x17')]('YYYY-MM-DD\x20HH:mm:ss')});}else _0x54a81f({'ret':_0x2e7b42});}else _0x54a81f({'ret':_0x2e7b42});}else{_0x54a81f({'ret':_0x2e7b42});}});}});return 0xa;}var _0x352303=function(_0x5b9251){return new BPromise(function(_0x2bd4d6,_0x3df253){_0x5ae2de(_0x5b9251,_0x5f49fc)[_0x8cac('0x28')](function(_0x6f0510){_0x5f49fc['scheduledat']=_0x6f0510[_0x8cac('0x1f')];_0x33fa3f['CmHopper']['findOne']({'where':{'phone':_0x5f49fc['phone'],'CampaignId':_0x5b9251['id']}})[_0x8cac('0x28')](function(_0x55369b){if(!_[_0x8cac('0x1a')](_0x55369b)){throw new Error('cmContact,\x20afterCreate\x20'+_0x5f49fc['phone']+_0x8cac('0x30')+_0x5b9251['id']);}return _0x33fa3f[_0x8cac('0x20')][_0x8cac('0x2d')]({'phone':_0x5f49fc['phone'],'ContactId':_0x5f49fc['id'],'ListId':_0x5f49fc[_0x8cac('0x24')],'priority':_0x5f49fc['priority']?_0x5f49fc[_0x8cac('0x25')]:0x2,'scheduledat':_0x5f49fc[_0x8cac('0x16')]?_0x5f49fc[_0x8cac('0x16')]:moment()[_0x8cac('0x17')]('YYYY-MM-DD\x20HH:mm:ss'),'callback':_0x5f49fc[_0x8cac('0x26')]?!![]:![],'callbackuniqueid':_0x5f49fc['callbackUniqueid']?_0x5f49fc[_0x8cac('0x26')]:undefined,'callbackat':_0x5f49fc['callbackUniqueid']?moment()['format'](_0x8cac('0x18')):undefined,'CampaignId':_0x5b9251['id']});})[_0x8cac('0x27')](function(_0xc66b74){_0x3df253(_0xc66b74);});});});};var _0x5e63e3=function(_0x22ea74){return new BPromise(function(_0x3cca63,_0x19217e){_0x5ae2de(_0x22ea74,_0x5f49fc)[_0x8cac('0x28')](function(_0x27b4b3){_0x5f49fc['scheduledat']=_0x27b4b3['ret'];_0x33fa3f['CmHopper']['findOne']({'where':{'phone':_0x5f49fc['phone'],'CampaignId':_0x22ea74['id']}})['then'](function(_0x5c91f7){if(!_[_0x8cac('0x1a')](_0x5c91f7)){throw new Error('cmContact,\x20afterCreate\x20'+_0x5f49fc[_0x8cac('0xa')]+_0x8cac('0x31')+_0x22ea74['id']);}return _0x33fa3f[_0x8cac('0x2a')]['findOne']({'where':{'calleridnum':_0x5f49fc[_0x8cac('0xa')],'CampaignId':_0x22ea74['id']}});})['then'](function(_0x3ea0a9){if(!_['isNil'](_0x3ea0a9)){throw new Error(_0x8cac('0x2b')+_0x5f49fc['phone']+'\x20contact\x20not\x20insert\x20in\x20hopper,\x20check\x20duplicate\x20always,\x20exist\x20in\x20hopperFinal\x20Campaign\x20'+_0x22ea74['id']);}return _0x33fa3f[_0x8cac('0x20')][_0x8cac('0x2d')]({'phone':_0x5f49fc[_0x8cac('0xa')],'ContactId':_0x5f49fc['id'],'ListId':_0x5f49fc['ListId'],'priority':_0x5f49fc[_0x8cac('0x25')]?_0x5f49fc[_0x8cac('0x25')]:0x2,'scheduledat':_0x5f49fc[_0x8cac('0x16')]?_0x5f49fc[_0x8cac('0x16')]:moment()[_0x8cac('0x17')](_0x8cac('0x18')),'callback':_0x5f49fc['callbackUniqueid']?!![]:![],'callbackuniqueid':_0x5f49fc['callbackUniqueid']?_0x5f49fc[_0x8cac('0x26')]:undefined,'callbackat':_0x5f49fc[_0x8cac('0x26')]?moment()[_0x8cac('0x17')](_0x8cac('0x18')):undefined,'CampaignId':_0x22ea74['id']});})[_0x8cac('0x27')](function(_0x2498af){_0x19217e(_0x2498af);});});});};if(_0x5f49fc[_0x8cac('0x24')]){_0x33fa3f[_0x8cac('0x19')][_0x8cac('0x32')]({'where':{'type':_0x8cac('0x33')},'attributes':['id','dialCheckDuplicateType',_0x8cac('0x1b')],'include':[{'model':_0x33fa3f['CmList'],'as':_0x8cac('0x34'),'where':{'id':_0x5f49fc[_0x8cac('0x24')]}}]})['then'](function(_0x4cd5e0){if(_0x4cd5e0){var _0x26cfb6=[];for(var _0x5298bf=0x0,_0x1e36f7;_0x5298bf<_0x4cd5e0[_0x8cac('0x35')];_0x5298bf+=0x1){_0x1e36f7=_0x4cd5e0[_0x5298bf][_0x8cac('0x36')]({'plain':!![]});switch(_0x1e36f7['dialCheckDuplicateType']){case _0x8cac('0x37'):_0x32ec35(_0x1e36f7)[_0x8cac('0x27')](_0xe959d8());break;case _0x8cac('0x38'):_0x258aea(_0x1e36f7)['catch'](_0xe959d8());break;default:_0x5ae2de(_0x1e36f7,_0x5f49fc)[_0x8cac('0x28')](function(_0x2e8e0f){_0x5f49fc['scheduledat']=_0x2e8e0f[_0x8cac('0x1f')];_0x33fa3f[_0x8cac('0x20')][_0x8cac('0x2d')]({'phone':_0x5f49fc[_0x8cac('0xa')],'ContactId':_0x5f49fc['id'],'ListId':_0x5f49fc['ListId'],'scheduledat':_0x5f49fc['scheduledat']?_0x5f49fc[_0x8cac('0x16')]:moment()[_0x8cac('0x17')]('YYYY-MM-DD\x20HH:mm:ss'),'priority':_0x5f49fc[_0x8cac('0x25')]?_0x5f49fc[_0x8cac('0x25')]:0x2,'callback':_0x5f49fc[_0x8cac('0x26')]?!![]:![],'callbackuniqueid':_0x5f49fc['callbackUniqueid']?_0x5f49fc[_0x8cac('0x26')]:undefined,'callbackat':_0x5f49fc[_0x8cac('0x26')]?moment()[_0x8cac('0x17')](_0x8cac('0x18')):undefined,'VoiceQueueId':_0x1e36f7['id']})[_0x8cac('0x27')](_0xe959d8());});}}}})[_0x8cac('0x28')](function(){return _0x33fa3f[_0x8cac('0x19')][_0x8cac('0x32')]({'where':{'type':_0x8cac('0x33')},'attributes':['id'],'include':[{'model':_0x33fa3f[_0x8cac('0x39')],'as':_0x8cac('0x3a'),'where':{'id':_0x5f49fc[_0x8cac('0x24')]}}]})[_0x8cac('0x28')](function(_0x1fef70){if(_0x1fef70){var _0x2d4bf5=[];for(var _0x338122=0x0,_0x58de88;_0x338122<_0x1fef70[_0x8cac('0x35')];_0x338122+=0x1){_0x58de88=_0x1fef70[_0x338122][_0x8cac('0x36')]({'plain':!![]});_0x33fa3f['CmHopperBlack'][_0x8cac('0x2d')]({'phone':_0x5f49fc[_0x8cac('0xa')],'ContactId':_0x5f49fc['id'],'ListId':_0x5f49fc[_0x8cac('0x24')],'VoiceQueueId':_0x58de88['id']})[_0x8cac('0x27')](function(_0x3571ce){logger[_0x8cac('0x12')](_0x8cac('0x3b'),'afterCreate',_0x3571ce[_0x8cac('0x3c')]);});}}});})[_0x8cac('0x28')](function(){return _0x33fa3f['Campaign']['findAll']({'attributes':['id','dialCheckDuplicateType',_0x8cac('0x1b')],'include':[{'model':_0x33fa3f['CmList'],'as':_0x8cac('0x34'),'where':{'id':_0x5f49fc['ListId']}}]})[_0x8cac('0x28')](function(_0x267aea){if(_0x267aea){var _0x557afd=[];for(var _0x5e953f=0x0,_0x25fd06;_0x5e953f<_0x267aea[_0x8cac('0x35')];_0x5e953f+=0x1){_0x25fd06=_0x267aea[_0x5e953f][_0x8cac('0x36')]({'plain':!![]});switch(_0x25fd06[_0x8cac('0x3d')]){case _0x8cac('0x37'):_0x5e63e3(_0x25fd06)[_0x8cac('0x27')](_0x2f24be());break;case _0x8cac('0x38'):_0x352303(_0x25fd06)[_0x8cac('0x27')](_0x2f24be());break;default:_0x33fa3f[_0x8cac('0x20')][_0x8cac('0x2d')]({'phone':_0x5f49fc[_0x8cac('0xa')],'ContactId':_0x5f49fc['id'],'ListId':_0x5f49fc[_0x8cac('0x24')],'scheduledat':_0x5f49fc[_0x8cac('0x16')]?_0x5f49fc[_0x8cac('0x16')]:moment()[_0x8cac('0x17')](_0x8cac('0x18')),'priority':_0x5f49fc[_0x8cac('0x25')]?_0x5f49fc[_0x8cac('0x25')]:0x2,'callback':_0x5f49fc[_0x8cac('0x26')]?!![]:![],'callbackuniqueid':_0x5f49fc[_0x8cac('0x26')]?_0x5f49fc[_0x8cac('0x26')]:undefined,'callbackat':_0x5f49fc[_0x8cac('0x26')]?moment()[_0x8cac('0x17')](_0x8cac('0x18')):undefined,'CampaignId':_0x25fd06['id']})[_0x8cac('0x27')](_0x2f24be());}}}});})[_0x8cac('0x28')](function(){return _0x33fa3f[_0x8cac('0x2e')]['findAll']({'attributes':['id'],'include':[{'model':_0x33fa3f[_0x8cac('0x39')],'as':_0x8cac('0x3a'),'where':{'id':_0x5f49fc[_0x8cac('0x24')]}}]})['then'](function(_0x3079c1){if(_0x3079c1){var _0x149129=[];for(var _0x375c2d=0x0,_0x5d04b5;_0x375c2d<_0x3079c1[_0x8cac('0x35')];_0x375c2d+=0x1){_0x5d04b5=_0x3079c1[_0x375c2d][_0x8cac('0x36')]({'plain':!![]});_0x33fa3f[_0x8cac('0x3e')]['create']({'phone':_0x5f49fc['phone'],'ContactId':_0x5f49fc['id'],'ListId':_0x5f49fc['ListId'],'CampaignId':_0x5d04b5['id']})[_0x8cac('0x27')](function(_0x36bba4){logger[_0x8cac('0x12')]('cmContact,\x20%s,\x20%s',_0x8cac('0x14'),_0x36bba4[_0x8cac('0x3c')]);});}}});})[_0x8cac('0x28')](function(){_0x4bb680();})[_0x8cac('0x27')](function(_0x1b20f4){logger[_0x8cac('0x12')](_0x8cac('0x3b'),'afterCreate',_0x1b20f4[_0x8cac('0x3c')]);_0x4bb680(_0x1b20f4);});}else{_0x4bb680(new Error(_0x8cac('0x3f')));}},'afterDestroy':function(_0x35666d,_0x1a310e,_0x27b5b0){var _0x470698=_0x111f2b[_0x8cac('0x11')];var _0x29ee01=_0x35666d['get']({'plain':!![]});return _0x470698[_0x8cac('0x20')][_0x8cac('0x32')]({'raw':!![],'where':{'ListId':_0x29ee01['ListId'],'ContactId':_0x29ee01['id']}})[_0x8cac('0x28')](function(_0x225fa0){if(!_[_0x8cac('0x40')](_0x225fa0)){var _0x3e4aa6=[];for(var _0x47890f=0x0;_0x47890f<_0x225fa0['length'];_0x47890f+=0x1){var _0x568e9c=_0x470698[_0x8cac('0x20')]['destroy']({'where':{'ListId':_0x225fa0[_0x47890f][_0x8cac('0x24')],'ContactId':_0x225fa0[_0x47890f][_0x8cac('0x41')],'VoiceQueueId':_0x225fa0[_0x47890f][_0x8cac('0x42')],'CampaignId':_0x225fa0[_0x47890f][_0x8cac('0x43')]}});_0x3e4aa6['push'](_0x568e9c);}return BPromise[_0x8cac('0x44')](_0x3e4aa6);}})[_0x8cac('0x28')](function(_0x2ccb0d){logger[_0x8cac('0x45')](_0x8cac('0x46'),util[_0x8cac('0x15')](_0x2ccb0d,{'showHidden':![],'depth':null}));_0x27b5b0();})[_0x8cac('0x27')](function(_0x2845d2){logger[_0x8cac('0x12')](_0x8cac('0x47'),util[_0x8cac('0x15')](_0x2845d2,{'showHidden':![],'depth':null}));_0x27b5b0(_0x2845d2);});}}});};
\ No newline at end of file
index 700df60..c01c833 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9957=['include','model','length','CmContactHasItem','find','ListId','Contact','isNil','CmContactId','CmContact','catch','CreateCmContact','create','body','keys','startsWith','cf_','table','cm_contacts','set','where','id\x20=\x20?','toString','sequelize','query','lodash','util','moment','bluebird','ioredis','squel','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','./cmContact.socket','register','request','then','info','CmContact,\x20%s,\x20%s','request\x20sent','debug','CmContact,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','GetCmContact','findAll','options','raw','attributes','limit','map'];(function(_0x4ea3da,_0x1635b0){var _0x5289b5=function(_0xafffa2){while(--_0xafffa2){_0x4ea3da['push'](_0x4ea3da['shift']());}};_0x5289b5(++_0x1635b0);}(_0x9957,0x93));var _0x7995=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x9957[_0xbca1b1];return _0x4e1686;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var moment=require(_0x7995('0x2'));var BPromise=require(_0x7995('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7995('0x4'));var squel=require(_0x7995('0x5'));var db=require(_0x7995('0x6'))['db'];var utils=require(_0x7995('0x7'));var logger=require('../../config/logger')(_0x7995('0x8'));var config=require(_0x7995('0x9'));var jayson=require(_0x7995('0xa'));var client=jayson[_0x7995('0xb')][_0x7995('0xc')]({'port':0x232a});config[_0x7995('0xd')]=_['defaults'](config[_0x7995('0xd')],{'host':_0x7995('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x7995('0xd')]));require(_0x7995('0xf'))[_0x7995('0x10')](socket);function respondWithRpcPromise(_0x35b5fe,_0x3c1d19,_0x1e400a){return new BPromise(function(_0x341672,_0x524f7b){return client[_0x7995('0x11')](_0x35b5fe,_0x1e400a)[_0x7995('0x12')](function(_0x581f22){logger[_0x7995('0x13')](_0x7995('0x14'),_0x3c1d19,_0x7995('0x15'));logger[_0x7995('0x16')](_0x7995('0x17'),_0x3c1d19,_0x7995('0x15'),JSON[_0x7995('0x18')](_0x581f22));if(_0x581f22['error']){if(_0x581f22['error'][_0x7995('0x19')]===0x1f4){logger[_0x7995('0x1a')](_0x7995('0x14'),_0x3c1d19,_0x581f22[_0x7995('0x1a')][_0x7995('0x1b')]);return _0x524f7b(_0x581f22[_0x7995('0x1a')][_0x7995('0x1b')]);}logger[_0x7995('0x1a')]('CmContact,\x20%s,\x20%s',_0x3c1d19,_0x581f22[_0x7995('0x1a')]['message']);return _0x341672(_0x581f22[_0x7995('0x1a')][_0x7995('0x1b')]);}else{logger[_0x7995('0x13')](_0x7995('0x14'),_0x3c1d19,_0x7995('0x15'));_0x341672(_0x581f22[_0x7995('0x1c')]['message']);}})['catch'](function(_0x2536c8){logger['error']('CmContact,\x20%s,\x20%s',_0x3c1d19,_0x2536c8);_0x524f7b(_0x2536c8);});});}exports[_0x7995('0x1d')]=function(_0x3d463e){var _0x4cbe10=this;return new Promise(function(_0x3a9b54,_0x51f276){return db['CmContact'][_0x7995('0x1e')]({'raw':_0x3d463e[_0x7995('0x1f')]?_0x3d463e[_0x7995('0x1f')][_0x7995('0x20')]===undefined?!![]:![]:!![],'where':_0x3d463e[_0x7995('0x1f')]?_0x3d463e[_0x7995('0x1f')]['where']||null:null,'attributes':_0x3d463e[_0x7995('0x1f')]?_0x3d463e[_0x7995('0x1f')][_0x7995('0x21')]||null:null,'limit':_0x3d463e[_0x7995('0x1f')]?_0x3d463e[_0x7995('0x1f')][_0x7995('0x22')]||null:null,'include':_0x3d463e[_0x7995('0x1f')]?_0x3d463e[_0x7995('0x1f')]['include']?_[_0x7995('0x23')](_0x3d463e[_0x7995('0x1f')][_0x7995('0x24')],function(_0x268ce7){return{'model':db[_0x268ce7[_0x7995('0x25')]],'as':_0x268ce7['as'],'attributes':_0x268ce7[_0x7995('0x21')],'include':_0x268ce7['include']?_[_0x7995('0x23')](_0x268ce7['include'],function(_0x229742){return{'model':db[_0x229742[_0x7995('0x25')]],'as':_0x229742['as'],'attributes':_0x229742[_0x7995('0x21')],'include':_0x229742[_0x7995('0x24')]?_[_0x7995('0x23')](_0x229742['include'],function(_0x9b2a15){return{'model':db[_0x9b2a15['model']],'as':_0x9b2a15['as'],'attributes':_0x9b2a15[_0x7995('0x21')]};}):[]};}):[]};}):[]:[]})[_0x7995('0x12')](function(_0x4253e5){logger['info']('GetCmContact',_0x3d463e);logger['debug'](_0x7995('0x1d'),_0x3d463e,JSON[_0x7995('0x18')](_0x4253e5));if(_0x4253e5[_0x7995('0x26')]==0x0){return db[_0x7995('0x27')][_0x7995('0x28')]({'raw':!![],'where':{'item':_0x3d463e[_0x7995('0x1f')]['phone']},'include':[{'model':db['CmContact'],'where':{'ListId':_0x3d463e[_0x7995('0x1f')]['where'][_0x7995('0x29')],'deletedAt':{'$eq':null}},'as':_0x7995('0x2a')}]})[_0x7995('0x12')](function(_0x1e9fa4){if(_[_0x7995('0x2b')](_0x1e9fa4)){_0x3a9b54(_0x4253e5);}else{var _0x510841=_0x1e9fa4[_0x7995('0x2c')];return db[_0x7995('0x2d')]['findAll']({'raw':!![],'where':{'id':_0x510841},'attributes':_0x3d463e['options']?_0x3d463e['options'][_0x7995('0x21')]||null:null})[_0x7995('0x12')](function(_0x4a176f){_0x3a9b54(_0x4a176f);});}});}else{_0x3a9b54(_0x4253e5);}})[_0x7995('0x2e')](function(_0x51b95d){logger[_0x7995('0x1a')](_0x7995('0x1d'),_0x51b95d[_0x7995('0x1b')],_0x3d463e);_0x51f276(_0x4cbe10['error'](0x1f4,_0x51b95d['message']));});});};exports[_0x7995('0x2f')]=function(_0x5e67fe){var _0x5d2428=this;return new Promise(function(_0x3e99cd,_0xe328b1){return db['CmContact'][_0x7995('0x30')](_0x5e67fe[_0x7995('0x31')],{'raw':_0x5e67fe[_0x7995('0x1f')]?_0x5e67fe[_0x7995('0x1f')][_0x7995('0x20')]===undefined?!![]:![]:!![]})['then'](function(_0x2d4285){var _0x242713;for(var _0xf612e6=0x0;_0xf612e6<Object[_0x7995('0x32')](_0x5e67fe['body'])[_0x7995('0x26')];_0xf612e6++){var _0x235df7=Object[_0x7995('0x32')](_0x5e67fe[_0x7995('0x31')])[_0xf612e6];if(_0x235df7[_0x7995('0x33')](_0x7995('0x34'))){_0x242713=squel['update']()[_0x7995('0x35')](_0x7995('0x36'))[_0x7995('0x37')](_0x235df7,_0x5e67fe[_0x7995('0x31')][_0x235df7])[_0x7995('0x38')](_0x7995('0x39'),_0x2d4285['id'])[_0x7995('0x3a')]();break;}}if(!_0x242713)return _0x2d4285;return db[_0x7995('0x3b')][_0x7995('0x3c')](_0x242713)[_0x7995('0x12')](function(){return _0x2d4285;});})[_0x7995('0x12')](function(_0x270d52){logger[_0x7995('0x13')]('CreateCmContact',_0x5e67fe);logger['debug'](_0x7995('0x2f'),_0x5e67fe,JSON[_0x7995('0x18')](_0x270d52));_0x3e99cd(_0x270d52);})['catch'](function(_0x4b0855){logger[_0x7995('0x1a')]('CreateCmContact',_0x4b0855['message'],_0x5e67fe);_0xe328b1(_0x5d2428[_0x7995('0x1a')](0x1f4,_0x4b0855[_0x7995('0x1b')]));});});};
\ No newline at end of file
+var _0x9957=['include','model','length','CmContactHasItem','find','ListId','Contact','isNil','CmContactId','CmContact','catch','CreateCmContact','create','body','keys','startsWith','cf_','table','cm_contacts','set','where','id\x20=\x20?','toString','sequelize','query','lodash','util','moment','bluebird','ioredis','squel','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','./cmContact.socket','register','request','then','info','CmContact,\x20%s,\x20%s','request\x20sent','debug','CmContact,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','GetCmContact','findAll','options','raw','attributes','limit','map'];(function(_0x4a56e1,_0x5222e1){var _0x46c676=function(_0x31a111){while(--_0x31a111){_0x4a56e1['push'](_0x4a56e1['shift']());}};_0x46c676(++_0x5222e1);}(_0x9957,0x93));var _0x7995=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x9957[_0x501510];return _0x1e6ee5;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var moment=require(_0x7995('0x2'));var BPromise=require(_0x7995('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7995('0x4'));var squel=require(_0x7995('0x5'));var db=require(_0x7995('0x6'))['db'];var utils=require(_0x7995('0x7'));var logger=require('../../config/logger')(_0x7995('0x8'));var config=require(_0x7995('0x9'));var jayson=require(_0x7995('0xa'));var client=jayson[_0x7995('0xb')][_0x7995('0xc')]({'port':0x232a});config[_0x7995('0xd')]=_['defaults'](config[_0x7995('0xd')],{'host':_0x7995('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x7995('0xd')]));require(_0x7995('0xf'))[_0x7995('0x10')](socket);function respondWithRpcPromise(_0x35b5fe,_0x3c1d19,_0x1e400a){return new BPromise(function(_0x341672,_0x524f7b){return client[_0x7995('0x11')](_0x35b5fe,_0x1e400a)[_0x7995('0x12')](function(_0x581f22){logger[_0x7995('0x13')](_0x7995('0x14'),_0x3c1d19,_0x7995('0x15'));logger[_0x7995('0x16')](_0x7995('0x17'),_0x3c1d19,_0x7995('0x15'),JSON[_0x7995('0x18')](_0x581f22));if(_0x581f22['error']){if(_0x581f22['error'][_0x7995('0x19')]===0x1f4){logger[_0x7995('0x1a')](_0x7995('0x14'),_0x3c1d19,_0x581f22[_0x7995('0x1a')][_0x7995('0x1b')]);return _0x524f7b(_0x581f22[_0x7995('0x1a')][_0x7995('0x1b')]);}logger[_0x7995('0x1a')]('CmContact,\x20%s,\x20%s',_0x3c1d19,_0x581f22[_0x7995('0x1a')]['message']);return _0x341672(_0x581f22[_0x7995('0x1a')][_0x7995('0x1b')]);}else{logger[_0x7995('0x13')](_0x7995('0x14'),_0x3c1d19,_0x7995('0x15'));_0x341672(_0x581f22[_0x7995('0x1c')]['message']);}})['catch'](function(_0x2536c8){logger['error']('CmContact,\x20%s,\x20%s',_0x3c1d19,_0x2536c8);_0x524f7b(_0x2536c8);});});}exports[_0x7995('0x1d')]=function(_0x3d463e){var _0x4cbe10=this;return new Promise(function(_0x3a9b54,_0x51f276){return db['CmContact'][_0x7995('0x1e')]({'raw':_0x3d463e[_0x7995('0x1f')]?_0x3d463e[_0x7995('0x1f')][_0x7995('0x20')]===undefined?!![]:![]:!![],'where':_0x3d463e[_0x7995('0x1f')]?_0x3d463e[_0x7995('0x1f')]['where']||null:null,'attributes':_0x3d463e[_0x7995('0x1f')]?_0x3d463e[_0x7995('0x1f')][_0x7995('0x21')]||null:null,'limit':_0x3d463e[_0x7995('0x1f')]?_0x3d463e[_0x7995('0x1f')][_0x7995('0x22')]||null:null,'include':_0x3d463e[_0x7995('0x1f')]?_0x3d463e[_0x7995('0x1f')]['include']?_[_0x7995('0x23')](_0x3d463e[_0x7995('0x1f')][_0x7995('0x24')],function(_0x268ce7){return{'model':db[_0x268ce7[_0x7995('0x25')]],'as':_0x268ce7['as'],'attributes':_0x268ce7[_0x7995('0x21')],'include':_0x268ce7['include']?_[_0x7995('0x23')](_0x268ce7['include'],function(_0x229742){return{'model':db[_0x229742[_0x7995('0x25')]],'as':_0x229742['as'],'attributes':_0x229742[_0x7995('0x21')],'include':_0x229742[_0x7995('0x24')]?_[_0x7995('0x23')](_0x229742['include'],function(_0x9b2a15){return{'model':db[_0x9b2a15['model']],'as':_0x9b2a15['as'],'attributes':_0x9b2a15[_0x7995('0x21')]};}):[]};}):[]};}):[]:[]})[_0x7995('0x12')](function(_0x4253e5){logger['info']('GetCmContact',_0x3d463e);logger['debug'](_0x7995('0x1d'),_0x3d463e,JSON[_0x7995('0x18')](_0x4253e5));if(_0x4253e5[_0x7995('0x26')]==0x0){return db[_0x7995('0x27')][_0x7995('0x28')]({'raw':!![],'where':{'item':_0x3d463e[_0x7995('0x1f')]['phone']},'include':[{'model':db['CmContact'],'where':{'ListId':_0x3d463e[_0x7995('0x1f')]['where'][_0x7995('0x29')],'deletedAt':{'$eq':null}},'as':_0x7995('0x2a')}]})[_0x7995('0x12')](function(_0x1e9fa4){if(_[_0x7995('0x2b')](_0x1e9fa4)){_0x3a9b54(_0x4253e5);}else{var _0x510841=_0x1e9fa4[_0x7995('0x2c')];return db[_0x7995('0x2d')]['findAll']({'raw':!![],'where':{'id':_0x510841},'attributes':_0x3d463e['options']?_0x3d463e['options'][_0x7995('0x21')]||null:null})[_0x7995('0x12')](function(_0x4a176f){_0x3a9b54(_0x4a176f);});}});}else{_0x3a9b54(_0x4253e5);}})[_0x7995('0x2e')](function(_0x51b95d){logger[_0x7995('0x1a')](_0x7995('0x1d'),_0x51b95d[_0x7995('0x1b')],_0x3d463e);_0x51f276(_0x4cbe10['error'](0x1f4,_0x51b95d['message']));});});};exports[_0x7995('0x2f')]=function(_0x5e67fe){var _0x5d2428=this;return new Promise(function(_0x3e99cd,_0xe328b1){return db['CmContact'][_0x7995('0x30')](_0x5e67fe[_0x7995('0x31')],{'raw':_0x5e67fe[_0x7995('0x1f')]?_0x5e67fe[_0x7995('0x1f')][_0x7995('0x20')]===undefined?!![]:![]:!![]})['then'](function(_0x2d4285){var _0x242713;for(var _0xf612e6=0x0;_0xf612e6<Object[_0x7995('0x32')](_0x5e67fe['body'])[_0x7995('0x26')];_0xf612e6++){var _0x235df7=Object[_0x7995('0x32')](_0x5e67fe[_0x7995('0x31')])[_0xf612e6];if(_0x235df7[_0x7995('0x33')](_0x7995('0x34'))){_0x242713=squel['update']()[_0x7995('0x35')](_0x7995('0x36'))[_0x7995('0x37')](_0x235df7,_0x5e67fe[_0x7995('0x31')][_0x235df7])[_0x7995('0x38')](_0x7995('0x39'),_0x2d4285['id'])[_0x7995('0x3a')]();break;}}if(!_0x242713)return _0x2d4285;return db[_0x7995('0x3b')][_0x7995('0x3c')](_0x242713)[_0x7995('0x12')](function(){return _0x2d4285;});})[_0x7995('0x12')](function(_0x270d52){logger[_0x7995('0x13')]('CreateCmContact',_0x5e67fe);logger['debug'](_0x7995('0x2f'),_0x5e67fe,JSON[_0x7995('0x18')](_0x270d52));_0x3e99cd(_0x270d52);})['catch'](function(_0x4b0855){logger[_0x7995('0x1a')]('CreateCmContact',_0x4b0855['message'],_0x5e67fe);_0xe328b1(_0x5d2428[_0x7995('0x1a')](0x1f4,_0x4b0855[_0x7995('0x1b')]));});});};
\ No newline at end of file
index 0b0c4c1..db5980d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['register','length','cmContact:','./cmContact.events','save','remove','emit','removeListener'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xa9e0,0x123));var _0x0a9e=function(_0x8de54f,_0x271987){_0x8de54f=_0x8de54f-0x0;var _0x14cba4=_0xa9e0[_0x8de54f];return _0x14cba4;};'use strict';var CmContactEvents=require(_0x0a9e('0x0'));var events=[_0x0a9e('0x1'),_0x0a9e('0x2'),'update'];function createListener(_0x550fbc,_0x18d5c9){return function(_0x4ce2f1){_0x18d5c9[_0x0a9e('0x3')](_0x550fbc,_0x4ce2f1);};}function removeListener(_0x432180,_0x2ab90b){return function(){CmContactEvents[_0x0a9e('0x4')](_0x432180,_0x2ab90b);};}exports[_0x0a9e('0x5')]=function(_0x57b080){for(var _0x219af0=0x0,_0x441e3a=events[_0x0a9e('0x6')];_0x219af0<_0x441e3a;_0x219af0++){var _0x5f41ea=events[_0x219af0];var _0x503809=createListener(_0x0a9e('0x7')+_0x5f41ea,_0x57b080);CmContactEvents['on'](_0x5f41ea,_0x503809);}};
\ No newline at end of file
+var _0xa9e0=['register','length','cmContact:','./cmContact.events','save','remove','emit','removeListener'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0xa9e0[_0x4cf98e];return _0x1623ac;};'use strict';var CmContactEvents=require(_0x0a9e('0x0'));var events=[_0x0a9e('0x1'),_0x0a9e('0x2'),'update'];function createListener(_0x550fbc,_0x18d5c9){return function(_0x4ce2f1){_0x18d5c9[_0x0a9e('0x3')](_0x550fbc,_0x4ce2f1);};}function removeListener(_0x432180,_0x2ab90b){return function(){CmContactEvents[_0x0a9e('0x4')](_0x432180,_0x2ab90b);};}exports[_0x0a9e('0x5')]=function(_0x57b080){for(var _0x219af0=0x0,_0x441e3a=events[_0x0a9e('0x6')];_0x219af0<_0x441e3a;_0x219af0++){var _0x5f41ea=events[_0x219af0];var _0x503809=createListener(_0x0a9e('0x7')+_0x5f41ea,_0x57b080);CmContactEvents['on'](_0x5f41ea,_0x503809);}};
\ No newline at end of file
index ab37d8b..6526f70 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['basename','extname','now','/csv','single','file','uploadCsv','%s-%s%s','upload','/upload/:id','import','put','/:id','update','destroy','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmContact.controller','get','index','/describe','show','/:id/tags','isAuthenticated','getTags','/:id/hoppers','getHoppers','/:id/hopper_histories','/:id/hopper_finals','getHopperFinals','/:id/jscripty_sessions','getJscriptySessions','/:id/journey','getJourney','post','create','/create_many','bulkCreate','setTags','setAdditionalPhones','/:id/duplicateAdditionalPhones','/:id/rescheduleAdditionalPhones','rescheduleAdditionalPhones','join','root','server/files/tmp','originalname','replace','format'];(function(_0x2216de,_0x220d22){var _0x8df3f1=function(_0x104c99){while(--_0x104c99){_0x2216de['push'](_0x2216de['shift']());}};_0x8df3f1(++_0x220d22);}(_0xa9e0,0x123));var _0x0a9e=function(_0x30ae5e,_0x391fc4){_0x30ae5e=_0x30ae5e-0x0;var _0x1f2e93=_0xa9e0[_0x30ae5e];return _0x1f2e93;};'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('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0x8')]('/:id/phones',auth['isAuthenticated'](),controller['getAdditionalPhones']);router['get'](_0x0a9e('0xf'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x8')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller['getHopperHistories']);router[_0x0a9e('0x8')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router[_0x0a9e('0x8')](_0x0a9e('0x14'),auth['isAuthenticated'](),controller[_0x0a9e('0x15')]);router['get'](_0x0a9e('0x16'),auth['isAuthenticated'](),controller[_0x0a9e('0x17')]);router[_0x0a9e('0x18')]('/merge',auth[_0x0a9e('0xd')](),controller['merge']);router[_0x0a9e('0x18')]('/',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x19')]);router[_0x0a9e('0x18')](_0x0a9e('0x1a'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1b')]);router[_0x0a9e('0x18')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1c')]);router[_0x0a9e('0x18')]('/:id/phones',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1d')]);router['post'](_0x0a9e('0x1e'),auth['isAuthenticated'](),controller['duplicateAdditionalPhones']);router[_0x0a9e('0x18')](_0x0a9e('0x1f'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x20')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0xfb6e48,_0x2fb0e4,_0x3b45bc){_0x3b45bc(null,path[_0x0a9e('0x21')](config[_0x0a9e('0x22')],_0x0a9e('0x23')));},'filename':function(_0x16b1ca,_0x5ea472,_0x59181e){_0x5ea472[_0x0a9e('0x24')]=_0x5ea472[_0x0a9e('0x24')][_0x0a9e('0x25')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x59181e(null,util[_0x0a9e('0x26')]('%s-%s%s',path[_0x0a9e('0x27')](_0x5ea472['originalname'],path[_0x0a9e('0x28')](_0x5ea472['originalname'])),Date[_0x0a9e('0x29')](),path[_0x0a9e('0x28')](_0x5ea472[_0x0a9e('0x24')])));}})});router[_0x0a9e('0x18')](_0x0a9e('0x2a'),upload[_0x0a9e('0x2b')](_0x0a9e('0x2c')),controller[_0x0a9e('0x2d')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x3652a7,_0x468813,_0x2b1f27){_0x2b1f27(null,path[_0x0a9e('0x21')](config['root'],_0x0a9e('0x23')));},'filename':function(_0x40e7a3,_0x1843b2,_0x824a4f){_0x1843b2[_0x0a9e('0x24')]=_0x1843b2[_0x0a9e('0x24')][_0x0a9e('0x25')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x824a4f(null,util[_0x0a9e('0x26')](_0x0a9e('0x2e'),path['basename'](_0x1843b2[_0x0a9e('0x24')],path['extname'](_0x1843b2[_0x0a9e('0x24')])),Date[_0x0a9e('0x29')](),path[_0x0a9e('0x28')](_0x1843b2[_0x0a9e('0x24')])));}})});router[_0x0a9e('0x18')]('/upload',upload[_0x0a9e('0x2b')](_0x0a9e('0x2c')),controller[_0x0a9e('0x2f')]);router[_0x0a9e('0x18')](_0x0a9e('0x30'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x31')]);router[_0x0a9e('0x18')]('/uploadUpdates/:id',auth[_0x0a9e('0xd')](),controller['importUpdates']);router[_0x0a9e('0x32')](_0x0a9e('0x33'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x34')]);router['delete'](_0x0a9e('0x33'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x35')]);module[_0x0a9e('0x36')]=router;
\ No newline at end of file
+var _0xa9e0=['basename','extname','now','/csv','single','file','uploadCsv','%s-%s%s','upload','/upload/:id','import','put','/:id','update','destroy','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmContact.controller','get','index','/describe','show','/:id/tags','isAuthenticated','getTags','/:id/hoppers','getHoppers','/:id/hopper_histories','/:id/hopper_finals','getHopperFinals','/:id/jscripty_sessions','getJscriptySessions','/:id/journey','getJourney','post','create','/create_many','bulkCreate','setTags','setAdditionalPhones','/:id/duplicateAdditionalPhones','/:id/rescheduleAdditionalPhones','rescheduleAdditionalPhones','join','root','server/files/tmp','originalname','replace','format'];(function(_0x455234,_0x31f93a){var _0x164a45=function(_0x3b8f19){while(--_0x3b8f19){_0x455234['push'](_0x455234['shift']());}};_0x164a45(++_0x31f93a);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3054be,_0x1bdc8b){_0x3054be=_0x3054be-0x0;var _0x3df150=_0xa9e0[_0x3054be];return _0x3df150;};'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('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0x8')]('/:id/phones',auth['isAuthenticated'](),controller['getAdditionalPhones']);router['get'](_0x0a9e('0xf'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x8')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller['getHopperHistories']);router[_0x0a9e('0x8')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router[_0x0a9e('0x8')](_0x0a9e('0x14'),auth['isAuthenticated'](),controller[_0x0a9e('0x15')]);router['get'](_0x0a9e('0x16'),auth['isAuthenticated'](),controller[_0x0a9e('0x17')]);router[_0x0a9e('0x18')]('/merge',auth[_0x0a9e('0xd')](),controller['merge']);router[_0x0a9e('0x18')]('/',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x19')]);router[_0x0a9e('0x18')](_0x0a9e('0x1a'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1b')]);router[_0x0a9e('0x18')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1c')]);router[_0x0a9e('0x18')]('/:id/phones',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1d')]);router['post'](_0x0a9e('0x1e'),auth['isAuthenticated'](),controller['duplicateAdditionalPhones']);router[_0x0a9e('0x18')](_0x0a9e('0x1f'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x20')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0xfb6e48,_0x2fb0e4,_0x3b45bc){_0x3b45bc(null,path[_0x0a9e('0x21')](config[_0x0a9e('0x22')],_0x0a9e('0x23')));},'filename':function(_0x16b1ca,_0x5ea472,_0x59181e){_0x5ea472[_0x0a9e('0x24')]=_0x5ea472[_0x0a9e('0x24')][_0x0a9e('0x25')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x59181e(null,util[_0x0a9e('0x26')]('%s-%s%s',path[_0x0a9e('0x27')](_0x5ea472['originalname'],path[_0x0a9e('0x28')](_0x5ea472['originalname'])),Date[_0x0a9e('0x29')](),path[_0x0a9e('0x28')](_0x5ea472[_0x0a9e('0x24')])));}})});router[_0x0a9e('0x18')](_0x0a9e('0x2a'),upload[_0x0a9e('0x2b')](_0x0a9e('0x2c')),controller[_0x0a9e('0x2d')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x3652a7,_0x468813,_0x2b1f27){_0x2b1f27(null,path[_0x0a9e('0x21')](config['root'],_0x0a9e('0x23')));},'filename':function(_0x40e7a3,_0x1843b2,_0x824a4f){_0x1843b2[_0x0a9e('0x24')]=_0x1843b2[_0x0a9e('0x24')][_0x0a9e('0x25')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x824a4f(null,util[_0x0a9e('0x26')](_0x0a9e('0x2e'),path['basename'](_0x1843b2[_0x0a9e('0x24')],path['extname'](_0x1843b2[_0x0a9e('0x24')])),Date[_0x0a9e('0x29')](),path[_0x0a9e('0x28')](_0x1843b2[_0x0a9e('0x24')])));}})});router[_0x0a9e('0x18')]('/upload',upload[_0x0a9e('0x2b')](_0x0a9e('0x2c')),controller[_0x0a9e('0x2f')]);router[_0x0a9e('0x18')](_0x0a9e('0x30'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x31')]);router[_0x0a9e('0x18')]('/uploadUpdates/:id',auth[_0x0a9e('0xd')](),controller['importUpdates']);router[_0x0a9e('0x32')](_0x0a9e('0x33'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x34')]);router['delete'](_0x0a9e('0x33'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x35')]);module[_0x0a9e('0x36')]=router;
\ No newline at end of file
index 9e8556c..515ca13 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8f7d=['PHONE','sequelize','exports','STRING'];(function(_0x49c317,_0x2d866d){var _0x1cb158=function(_0x28fbb4){while(--_0x28fbb4){_0x49c317['push'](_0x49c317['shift']());}};_0x1cb158(++_0x2d866d);}(_0x8f7d,0xf5));var _0xd8f7=function(_0x8282fe,_0x27cc62){_0x8282fe=_0x8282fe-0x0;var _0x48ab18=_0x8f7d[_0x8282fe];return _0x48ab18;};'use strict';var Sequelize=require(_0xd8f7('0x0'));module[_0xd8f7('0x1')]={'CmContactId':{'type':Sequelize['INTEGER'],'primaryKey':!![]},'item':{'type':Sequelize[_0xd8f7('0x2')],'defaultValue':'','primaryKey':!![]},'ItemTypeId':{'type':Sequelize['INTEGER'],'defaultValue':null},'ItemClass':{'type':Sequelize['STRING'],'defaultValue':_0xd8f7('0x3')},'OrderBy':{'type':Sequelize['INTEGER'],'defaultValue':null},'description':{'type':Sequelize[_0xd8f7('0x2')],'defaultValue':null}};
\ No newline at end of file
+var _0x5825=['sequelize','exports','INTEGER','STRING'];(function(_0x54b4d8,_0x5f0a35){var _0x1e87dd=function(_0x4374b4){while(--_0x4374b4){_0x54b4d8['push'](_0x54b4d8['shift']());}};_0x1e87dd(++_0x5f0a35);}(_0x5825,0x78));var _0x5582=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x5825[_0x321bb2];return _0x9c12ed;};'use strict';var Sequelize=require(_0x5582('0x0'));module[_0x5582('0x1')]={'CmContactId':{'type':Sequelize[_0x5582('0x2')],'primaryKey':!![]},'item':{'type':Sequelize[_0x5582('0x3')],'defaultValue':'','primaryKey':!![]},'ItemTypeId':{'type':Sequelize['INTEGER'],'defaultValue':null},'ItemClass':{'type':Sequelize[_0x5582('0x3')],'defaultValue':'PHONE'},'OrderBy':{'type':Sequelize[_0x5582('0x2')],'defaultValue':null},'description':{'type':Sequelize[_0x5582('0x3')],'defaultValue':null}};
\ No newline at end of file
index d12efb3..14c6828 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x69d0=['../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','status','end','json','offset','limit','count','set','Content-Range','apply','reject','save','then','destroy','get','CmContactHasItems','UserProfileResource','error','stack','name','map','CmContactHasItem','rawAttributes','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filter','merge','type','VIRTUAL','options','include','findAll','rows','show','params','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis'];(function(_0x395776,_0x44fc08){var _0x5ba3db=function(_0x1f73da){while(--_0x1f73da){_0x395776['push'](_0x395776['shift']());}};_0x5ba3db(++_0x44fc08);}(_0x69d0,0x127));var _0x069d=function(_0x14459e,_0x6ade13){_0x14459e=_0x14459e-0x0;var _0xbdf0da=_0x69d0[_0x14459e];return _0xbdf0da;};'use strict';var emlformat=require(_0x069d('0x0'));var rimraf=require(_0x069d('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x069d('0x2'));var rp=require(_0x069d('0x3'));var moment=require('moment');var BPromise=require(_0x069d('0x4'));var Mustache=require(_0x069d('0x5'));var util=require('util');var path=require(_0x069d('0x6'));var sox=require(_0x069d('0x7'));var csv=require(_0x069d('0x8'));var ejs=require(_0x069d('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x069d('0xa'));var squel=require(_0x069d('0xb'));var crypto=require(_0x069d('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x069d('0xd'));var toCsv=require(_0x069d('0x8'));var querystring=require(_0x069d('0xe'));var Papa=require(_0x069d('0xf'));var Redis=require(_0x069d('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x069d('0x11'));var hardwareService=require(_0x069d('0x12'));var logger=require(_0x069d('0x13'))(_0x069d('0x14'));var utils=require(_0x069d('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x069d('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x117c52,_0x591bc3){_0x591bc3=_0x591bc3||0xcc;return function(_0x3b98c6){if(_0x3b98c6){return _0x117c52['sendStatus'](_0x591bc3);}return _0x117c52[_0x069d('0x17')](_0x591bc3)[_0x069d('0x18')]();};}function respondWithResult(_0x4e0caf,_0x24b1f7){_0x24b1f7=_0x24b1f7||0xc8;return function(_0xa8a81c){if(_0xa8a81c){return _0x4e0caf[_0x069d('0x17')](_0x24b1f7)[_0x069d('0x19')](_0xa8a81c);}};}function respondWithFilteredResult(_0x195902,_0x50a0ca){return function(_0x10ffc1){if(_0x10ffc1){var _0x4c30cb=typeof _0x50a0ca[_0x069d('0x1a')]==='undefined'&&typeof _0x50a0ca[_0x069d('0x1b')]==='undefined';var _0x544d6f=_0x10ffc1[_0x069d('0x1c')];var _0x3ee43b=_0x4c30cb?0x0:_0x50a0ca[_0x069d('0x1a')];var _0x571dcd=_0x4c30cb?_0x10ffc1[_0x069d('0x1c')]:_0x50a0ca[_0x069d('0x1a')]+_0x50a0ca['limit'];var _0x9398f2;if(_0x571dcd>=_0x544d6f){_0x571dcd=_0x544d6f;_0x9398f2=0xc8;}else{_0x9398f2=0xce;}_0x195902['status'](_0x9398f2);return _0x195902[_0x069d('0x1d')](_0x069d('0x1e'),_0x3ee43b+'-'+_0x571dcd+'/'+_0x544d6f)[_0x069d('0x19')](_0x10ffc1);}return null;};}function patchUpdates(_0x2c04b1){return function(_0x346eac){try{jsonpatch[_0x069d('0x1f')](_0x346eac,_0x2c04b1,!![]);}catch(_0x5aca17){return BPromise[_0x069d('0x20')](_0x5aca17);}return _0x346eac[_0x069d('0x21')]();};}function saveUpdates(_0x5472a6,_0x54d4ce){return function(_0x5baa55){if(_0x5baa55){return _0x5baa55['update'](_0x5472a6)[_0x069d('0x22')](function(_0x155cea){return _0x155cea;});}return null;};}function removeEntity(_0x5924ba,_0x3594c8){return function(_0x4f9bb7){if(_0x4f9bb7){return _0x4f9bb7[_0x069d('0x23')]()['then'](function(){var _0x3fb0dc=_0x4f9bb7[_0x069d('0x24')]({'plain':!![]});var _0x9dde13=_0x069d('0x25');return db[_0x069d('0x26')][_0x069d('0x23')]({'where':{'type':_0x9dde13,'resourceId':_0x3fb0dc['id']}})[_0x069d('0x22')](function(){return _0x4f9bb7;});})['then'](function(){_0x5924ba[_0x069d('0x17')](0xcc)[_0x069d('0x18')]();});}};}function handleEntityNotFound(_0x48958f,_0x52bc99){return function(_0x154f7e){if(!_0x154f7e){_0x48958f['sendStatus'](0x194);}return _0x154f7e;};}function handleError(_0x445e21,_0x179f7e){_0x179f7e=_0x179f7e||0x1f4;return function(_0x2b8026){logger[_0x069d('0x27')](_0x2b8026[_0x069d('0x28')]);if(_0x2b8026[_0x069d('0x29')]){delete _0x2b8026[_0x069d('0x29')];}_0x445e21[_0x069d('0x17')](_0x179f7e)['send'](_0x2b8026);};}exports['index']=function(_0x2f7f13,_0x48cd19){var _0x266af1={},_0xc36ec4={},_0x13809c={'count':0x0,'rows':[]};var _0x25cce6=_[_0x069d('0x2a')](db[_0x069d('0x2b')][_0x069d('0x2c')],function(_0x44e41c){return{'name':_0x44e41c['fieldName'],'type':_0x44e41c['type'][_0x069d('0x2d')]};});_0xc36ec4[_0x069d('0x2e')]=_[_0x069d('0x2a')](_0x25cce6,_0x069d('0x29'));_0xc36ec4[_0x069d('0x2f')]=_[_0x069d('0x30')](_0x2f7f13[_0x069d('0x2f')]);_0xc36ec4[_0x069d('0x31')]=_[_0x069d('0x32')](_0xc36ec4[_0x069d('0x2e')],_0xc36ec4[_0x069d('0x2f')]);_0x266af1[_0x069d('0x33')]=_['intersection'](_0xc36ec4[_0x069d('0x2e')],qs[_0x069d('0x34')](_0x2f7f13[_0x069d('0x2f')][_0x069d('0x34')]));_0x266af1['attributes']=_0x266af1[_0x069d('0x33')][_0x069d('0x35')]?_0x266af1['attributes']:_0xc36ec4['model'];if(!_0x2f7f13[_0x069d('0x2f')][_0x069d('0x36')]('nolimit')){_0x266af1[_0x069d('0x1b')]=qs['limit'](_0x2f7f13['query'][_0x069d('0x1b')]);_0x266af1[_0x069d('0x1a')]=qs[_0x069d('0x1a')](_0x2f7f13[_0x069d('0x2f')]['offset']);}_0x266af1[_0x069d('0x37')]=qs[_0x069d('0x38')](_0x2f7f13['query'][_0x069d('0x38')]);_0x266af1[_0x069d('0x39')]=qs['filters'](_['pick'](_0x2f7f13['query'],_0xc36ec4[_0x069d('0x31')]),_0x25cce6);if(_0x2f7f13[_0x069d('0x2f')][_0x069d('0x3a')]){_0x266af1[_0x069d('0x39')]=_[_0x069d('0x3b')](_0x266af1['where'],{'$or':_[_0x069d('0x2a')](_0x25cce6,function(_0x2f8c08){if(_0x2f8c08[_0x069d('0x3c')]!==_0x069d('0x3d')){var _0x16fb90={};_0x16fb90[_0x2f8c08['name']]={'$like':'%'+_0x2f7f13[_0x069d('0x2f')][_0x069d('0x3a')]+'%'};return _0x16fb90;}})});}_0x266af1=_[_0x069d('0x3b')]({},_0x266af1,_0x2f7f13[_0x069d('0x3e')]);var _0x58392d={'where':_0x266af1[_0x069d('0x39')]};return db[_0x069d('0x2b')][_0x069d('0x1c')](_0x58392d)['then'](function(_0x538ac2){_0x13809c['count']=_0x538ac2;if(_0x2f7f13[_0x069d('0x2f')]['includeAll']){_0x266af1[_0x069d('0x3f')]=[{'all':!![]}];}return db[_0x069d('0x2b')][_0x069d('0x40')](_0x266af1);})['then'](function(_0x3a292d){_0x13809c[_0x069d('0x41')]=_0x3a292d;return _0x13809c;})['then'](respondWithFilteredResult(_0x48cd19,_0x266af1))['catch'](handleError(_0x48cd19,null));};exports[_0x069d('0x42')]=function(_0x4e9b68,_0x588b21){var _0x45fc3f={'raw':!![],'where':{'id':_0x4e9b68[_0x069d('0x43')]['id']}},_0x58d10d={};_0x58d10d[_0x069d('0x2e')]=_['keys'](db[_0x069d('0x2b')][_0x069d('0x2c')]);_0x58d10d[_0x069d('0x2f')]=_[_0x069d('0x30')](_0x4e9b68[_0x069d('0x2f')]);_0x58d10d['filters']=_['intersection'](_0x58d10d[_0x069d('0x2e')],_0x58d10d[_0x069d('0x2f')]);_0x45fc3f['attributes']=_['intersection'](_0x58d10d[_0x069d('0x2e')],qs['fields'](_0x4e9b68[_0x069d('0x2f')][_0x069d('0x34')]));_0x45fc3f[_0x069d('0x33')]=_0x45fc3f[_0x069d('0x33')][_0x069d('0x35')]?_0x45fc3f[_0x069d('0x33')]:_0x58d10d[_0x069d('0x2e')];if(_0x4e9b68[_0x069d('0x2f')]['includeAll']){_0x45fc3f[_0x069d('0x3f')]=[{'all':!![]}];}_0x45fc3f=_[_0x069d('0x3b')]({},_0x45fc3f,_0x4e9b68[_0x069d('0x3e')]);return db['CmContactHasItem'][_0x069d('0x44')](_0x45fc3f)['then'](handleEntityNotFound(_0x588b21,null))[_0x069d('0x22')](respondWithResult(_0x588b21,null))[_0x069d('0x45')](handleError(_0x588b21,null));};exports[_0x069d('0x46')]=function(_0x4eff8d,_0x47bd92){return db[_0x069d('0x2b')]['create'](_0x4eff8d[_0x069d('0x47')],{})[_0x069d('0x22')](function(_0x47536f){var _0x411cf9=_0x4eff8d[_0x069d('0x48')][_0x069d('0x24')]({'plain':!![]});if(!_0x411cf9)throw new Error(_0x069d('0x49'));if(_0x411cf9[_0x069d('0x4a')]===_0x069d('0x48')){var _0x5a76a0=_0x47536f[_0x069d('0x24')]({'plain':!![]});var _0x1a654c=_0x069d('0x25');return db[_0x069d('0x4b')][_0x069d('0x44')]({'where':{'name':_0x1a654c,'userProfileId':_0x411cf9[_0x069d('0x4c')]},'raw':!![]})[_0x069d('0x22')](function(_0x1f71ea){if(_0x1f71ea&&_0x1f71ea['autoAssociation']===0x0){return db['UserProfileResource'][_0x069d('0x46')]({'name':_0x5a76a0[_0x069d('0x29')],'resourceId':_0x5a76a0['id'],'type':_0x1f71ea[_0x069d('0x29')],'sectionId':_0x1f71ea['id']},{})[_0x069d('0x22')](function(){return _0x47536f;});}else{return _0x47536f;}})[_0x069d('0x45')](function(_0x24bdfd){logger[_0x069d('0x27')](_0x069d('0x4d'),_0x24bdfd);throw _0x24bdfd;});}return _0x47536f;})['then'](respondWithResult(_0x47bd92,0xc9))[_0x069d('0x45')](handleError(_0x47bd92,null));};exports['update']=function(_0x56ed47,_0x1f4e5c){if(_0x56ed47[_0x069d('0x47')]['id']){delete _0x56ed47[_0x069d('0x47')]['id'];}return db[_0x069d('0x2b')][_0x069d('0x44')]({'where':{'id':_0x56ed47['params']['id']}})[_0x069d('0x22')](handleEntityNotFound(_0x1f4e5c,null))[_0x069d('0x22')](saveUpdates(_0x56ed47['body'],null))['then'](respondWithResult(_0x1f4e5c,null))[_0x069d('0x45')](handleError(_0x1f4e5c,null));};exports['destroy']=function(_0x27ca1d,_0x2b07ca){return db[_0x069d('0x2b')][_0x069d('0x44')]({'where':{'id':_0x27ca1d['params']['id']}})[_0x069d('0x22')](handleEntityNotFound(_0x2b07ca,null))[_0x069d('0x22')](removeEntity(_0x2b07ca,null))[_0x069d('0x45')](handleError(_0x2b07ca,null));};
\ No newline at end of file
+var _0x9c88=['Content-Range','apply','reject','update','then','get','destroy','error','name','index','map','CmContactHasItem','rawAttributes','type','key','model','query','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','rows','catch','show','params','keys','length','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','CmContactHasItems','UserProfileSection','autoAssociation','UserProfileResource','body','eml-format','rimraf','fast-json-patch','moment','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','status','json','offset','undefined','limit','count'];(function(_0x48ed3a,_0xd90d91){var _0x527f33=function(_0x1c5e5c){while(--_0x1c5e5c){_0x48ed3a['push'](_0x48ed3a['shift']());}};_0x527f33(++_0xd90d91);}(_0x9c88,0xd1));var _0x89c8=function(_0x2d36a6,_0x2f8cd0){_0x2d36a6=_0x2d36a6-0x0;var _0x59cec0=_0x9c88[_0x2d36a6];return _0x59cec0;};'use strict';var emlformat=require(_0x89c8('0x0'));var rimraf=require(_0x89c8('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x89c8('0x2'));var rp=require('request-promise');var moment=require(_0x89c8('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x89c8('0x4'));var util=require(_0x89c8('0x5'));var path=require(_0x89c8('0x6'));var sox=require(_0x89c8('0x7'));var csv=require(_0x89c8('0x8'));var ejs=require(_0x89c8('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x89c8('0xa'));var squel=require(_0x89c8('0xb'));var crypto=require(_0x89c8('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x89c8('0xd'));var Papa=require(_0x89c8('0xe'));var Redis=require(_0x89c8('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x89c8('0x10'));var hardwareService=require(_0x89c8('0x11'));var logger=require(_0x89c8('0x12'))(_0x89c8('0x13'));var utils=require(_0x89c8('0x14'));var config=require(_0x89c8('0x15'));var licenseUtil=require(_0x89c8('0x16'));var db=require(_0x89c8('0x17'))['db'];function respondWithStatusCode(_0x3b9a57,_0x427ca3){_0x427ca3=_0x427ca3||0xcc;return function(_0x20b682){if(_0x20b682){return _0x3b9a57['sendStatus'](_0x427ca3);}return _0x3b9a57['status'](_0x427ca3)[_0x89c8('0x18')]();};}function respondWithResult(_0x1596b0,_0x3604a4){_0x3604a4=_0x3604a4||0xc8;return function(_0x157afc){if(_0x157afc){return _0x1596b0[_0x89c8('0x19')](_0x3604a4)[_0x89c8('0x1a')](_0x157afc);}};}function respondWithFilteredResult(_0xe175a8,_0x4a7308){return function(_0x33cf31){if(_0x33cf31){var _0x2ae99d=typeof _0x4a7308[_0x89c8('0x1b')]===_0x89c8('0x1c')&&typeof _0x4a7308[_0x89c8('0x1d')]===_0x89c8('0x1c');var _0x24bca8=_0x33cf31[_0x89c8('0x1e')];var _0x15a702=_0x2ae99d?0x0:_0x4a7308[_0x89c8('0x1b')];var _0xada0b2=_0x2ae99d?_0x33cf31[_0x89c8('0x1e')]:_0x4a7308[_0x89c8('0x1b')]+_0x4a7308[_0x89c8('0x1d')];var _0x4e6683;if(_0xada0b2>=_0x24bca8){_0xada0b2=_0x24bca8;_0x4e6683=0xc8;}else{_0x4e6683=0xce;}_0xe175a8['status'](_0x4e6683);return _0xe175a8['set'](_0x89c8('0x1f'),_0x15a702+'-'+_0xada0b2+'/'+_0x24bca8)['json'](_0x33cf31);}return null;};}function patchUpdates(_0x21bc2f){return function(_0x485881){try{jsonpatch[_0x89c8('0x20')](_0x485881,_0x21bc2f,!![]);}catch(_0x2007ba){return BPromise[_0x89c8('0x21')](_0x2007ba);}return _0x485881['save']();};}function saveUpdates(_0x154ea9,_0x44c938){return function(_0x31c5b6){if(_0x31c5b6){return _0x31c5b6[_0x89c8('0x22')](_0x154ea9)[_0x89c8('0x23')](function(_0x5ddc71){return _0x5ddc71;});}return null;};}function removeEntity(_0x35b720,_0x4cc53c){return function(_0x2ff0cd){if(_0x2ff0cd){return _0x2ff0cd['destroy']()[_0x89c8('0x23')](function(){var _0x5b6edb=_0x2ff0cd[_0x89c8('0x24')]({'plain':!![]});var _0x50058c='CmContactHasItems';return db['UserProfileResource'][_0x89c8('0x25')]({'where':{'type':_0x50058c,'resourceId':_0x5b6edb['id']}})['then'](function(){return _0x2ff0cd;});})[_0x89c8('0x23')](function(){_0x35b720[_0x89c8('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1fbdd4,_0x3d5258){return function(_0x4f4e9f){if(!_0x4f4e9f){_0x1fbdd4['sendStatus'](0x194);}return _0x4f4e9f;};}function handleError(_0x4c5ba9,_0x1caedb){_0x1caedb=_0x1caedb||0x1f4;return function(_0x453d97){logger[_0x89c8('0x26')](_0x453d97['stack']);if(_0x453d97['name']){delete _0x453d97[_0x89c8('0x27')];}_0x4c5ba9[_0x89c8('0x19')](_0x1caedb)['send'](_0x453d97);};}exports[_0x89c8('0x28')]=function(_0x25bd11,_0x52f081){var _0x3f61d3={},_0x4098da={},_0xe1bd9c={'count':0x0,'rows':[]};var _0x2e9c21=_[_0x89c8('0x29')](db[_0x89c8('0x2a')][_0x89c8('0x2b')],function(_0x32ebce){return{'name':_0x32ebce['fieldName'],'type':_0x32ebce[_0x89c8('0x2c')][_0x89c8('0x2d')]};});_0x4098da[_0x89c8('0x2e')]=_['map'](_0x2e9c21,_0x89c8('0x27'));_0x4098da['query']=_['keys'](_0x25bd11[_0x89c8('0x2f')]);_0x4098da[_0x89c8('0x30')]=_[_0x89c8('0x31')](_0x4098da[_0x89c8('0x2e')],_0x4098da[_0x89c8('0x2f')]);_0x3f61d3['attributes']=_['intersection'](_0x4098da['model'],qs[_0x89c8('0x32')](_0x25bd11[_0x89c8('0x2f')]['fields']));_0x3f61d3[_0x89c8('0x33')]=_0x3f61d3[_0x89c8('0x33')]['length']?_0x3f61d3[_0x89c8('0x33')]:_0x4098da['model'];if(!_0x25bd11[_0x89c8('0x2f')][_0x89c8('0x34')](_0x89c8('0x35'))){_0x3f61d3[_0x89c8('0x1d')]=qs[_0x89c8('0x1d')](_0x25bd11['query']['limit']);_0x3f61d3[_0x89c8('0x1b')]=qs[_0x89c8('0x1b')](_0x25bd11[_0x89c8('0x2f')][_0x89c8('0x1b')]);}_0x3f61d3[_0x89c8('0x36')]=qs[_0x89c8('0x37')](_0x25bd11[_0x89c8('0x2f')]['sort']);_0x3f61d3[_0x89c8('0x38')]=qs[_0x89c8('0x30')](_[_0x89c8('0x39')](_0x25bd11[_0x89c8('0x2f')],_0x4098da[_0x89c8('0x30')]),_0x2e9c21);if(_0x25bd11['query'][_0x89c8('0x3a')]){_0x3f61d3[_0x89c8('0x38')]=_['merge'](_0x3f61d3[_0x89c8('0x38')],{'$or':_['map'](_0x2e9c21,function(_0x4d5924){if(_0x4d5924[_0x89c8('0x2c')]!=='VIRTUAL'){var _0x461b7b={};_0x461b7b[_0x4d5924['name']]={'$like':'%'+_0x25bd11[_0x89c8('0x2f')]['filter']+'%'};return _0x461b7b;}})});}_0x3f61d3=_[_0x89c8('0x3b')]({},_0x3f61d3,_0x25bd11[_0x89c8('0x3c')]);var _0x2385a6={'where':_0x3f61d3[_0x89c8('0x38')]};return db[_0x89c8('0x2a')][_0x89c8('0x1e')](_0x2385a6)['then'](function(_0x2aa079){_0xe1bd9c[_0x89c8('0x1e')]=_0x2aa079;if(_0x25bd11[_0x89c8('0x2f')][_0x89c8('0x3d')]){_0x3f61d3[_0x89c8('0x3e')]=[{'all':!![]}];}return db[_0x89c8('0x2a')][_0x89c8('0x3f')](_0x3f61d3);})[_0x89c8('0x23')](function(_0x7ff405){_0xe1bd9c[_0x89c8('0x40')]=_0x7ff405;return _0xe1bd9c;})['then'](respondWithFilteredResult(_0x52f081,_0x3f61d3))[_0x89c8('0x41')](handleError(_0x52f081,null));};exports[_0x89c8('0x42')]=function(_0x5012ef,_0x4945f6){var _0x1fb4e0={'raw':!![],'where':{'id':_0x5012ef[_0x89c8('0x43')]['id']}},_0x47b0bc={};_0x47b0bc[_0x89c8('0x2e')]=_[_0x89c8('0x44')](db[_0x89c8('0x2a')][_0x89c8('0x2b')]);_0x47b0bc[_0x89c8('0x2f')]=_[_0x89c8('0x44')](_0x5012ef[_0x89c8('0x2f')]);_0x47b0bc[_0x89c8('0x30')]=_['intersection'](_0x47b0bc[_0x89c8('0x2e')],_0x47b0bc[_0x89c8('0x2f')]);_0x1fb4e0[_0x89c8('0x33')]=_['intersection'](_0x47b0bc[_0x89c8('0x2e')],qs[_0x89c8('0x32')](_0x5012ef['query'][_0x89c8('0x32')]));_0x1fb4e0[_0x89c8('0x33')]=_0x1fb4e0[_0x89c8('0x33')][_0x89c8('0x45')]?_0x1fb4e0[_0x89c8('0x33')]:_0x47b0bc['model'];if(_0x5012ef[_0x89c8('0x2f')]['includeAll']){_0x1fb4e0[_0x89c8('0x3e')]=[{'all':!![]}];}_0x1fb4e0=_[_0x89c8('0x3b')]({},_0x1fb4e0,_0x5012ef['options']);return db[_0x89c8('0x2a')][_0x89c8('0x46')](_0x1fb4e0)[_0x89c8('0x23')](handleEntityNotFound(_0x4945f6,null))[_0x89c8('0x23')](respondWithResult(_0x4945f6,null))[_0x89c8('0x41')](handleError(_0x4945f6,null));};exports[_0x89c8('0x47')]=function(_0x2b1863,_0x4de047){return db[_0x89c8('0x2a')][_0x89c8('0x47')](_0x2b1863['body'],{})[_0x89c8('0x23')](function(_0x28bf56){var _0x2414da=_0x2b1863[_0x89c8('0x48')]['get']({'plain':!![]});if(!_0x2414da)throw new Error(_0x89c8('0x49'));if(_0x2414da[_0x89c8('0x4a')]==='user'){var _0x4b0ecc=_0x28bf56[_0x89c8('0x24')]({'plain':!![]});var _0xb8428f=_0x89c8('0x4b');return db[_0x89c8('0x4c')][_0x89c8('0x46')]({'where':{'name':_0xb8428f,'userProfileId':_0x2414da['userProfileId']},'raw':!![]})[_0x89c8('0x23')](function(_0x5587ed){if(_0x5587ed&&_0x5587ed[_0x89c8('0x4d')]===0x0){return db[_0x89c8('0x4e')][_0x89c8('0x47')]({'name':_0x4b0ecc[_0x89c8('0x27')],'resourceId':_0x4b0ecc['id'],'type':_0x5587ed['name'],'sectionId':_0x5587ed['id']},{})[_0x89c8('0x23')](function(){return _0x28bf56;});}else{return _0x28bf56;}})[_0x89c8('0x41')](function(_0x34dadd){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x34dadd);throw _0x34dadd;});}return _0x28bf56;})[_0x89c8('0x23')](respondWithResult(_0x4de047,0xc9))['catch'](handleError(_0x4de047,null));};exports['update']=function(_0x26533c,_0x25cbd2){if(_0x26533c[_0x89c8('0x4f')]['id']){delete _0x26533c[_0x89c8('0x4f')]['id'];}return db[_0x89c8('0x2a')][_0x89c8('0x46')]({'where':{'id':_0x26533c[_0x89c8('0x43')]['id']}})['then'](handleEntityNotFound(_0x25cbd2,null))[_0x89c8('0x23')](saveUpdates(_0x26533c[_0x89c8('0x4f')],null))[_0x89c8('0x23')](respondWithResult(_0x25cbd2,null))[_0x89c8('0x41')](handleError(_0x25cbd2,null));};exports[_0x89c8('0x25')]=function(_0x255fcd,_0x578a86){return db[_0x89c8('0x2a')][_0x89c8('0x46')]({'where':{'id':_0x255fcd[_0x89c8('0x43')]['id']}})[_0x89c8('0x23')](handleEntityNotFound(_0x578a86,null))[_0x89c8('0x23')](removeEntity(_0x578a86,null))['catch'](handleError(_0x578a86,null));};
\ No newline at end of file
index 3dc0ba1..25cfed6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4050=['cm_contact_has_items','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./cmContactHasItem.attributes','exports','CmContactHasItem'];(function(_0x521328,_0x208c88){var _0x45f832=function(_0x2d8ecb){while(--_0x2d8ecb){_0x521328['push'](_0x521328['shift']());}};_0x45f832(++_0x208c88);}(_0x4050,0x160));var _0x0405=function(_0x1e3c16,_0x372caa){_0x1e3c16=_0x1e3c16-0x0;var _0x47a0c9=_0x4050[_0x1e3c16];return _0x47a0c9;};'use strict';var _=require(_0x0405('0x0'));var util=require(_0x0405('0x1'));var logger=require(_0x0405('0x2'))(_0x0405('0x3'));var moment=require(_0x0405('0x4'));var BPromise=require('bluebird');var rp=require(_0x0405('0x5'));var fs=require('fs');var path=require(_0x0405('0x6'));var rimraf=require(_0x0405('0x7'));var config=require(_0x0405('0x8'));var attributes=require(_0x0405('0x9'));module[_0x0405('0xa')]=function(_0x54ea31,_0x576ff0){return _0x54ea31['define'](_0x0405('0xb'),attributes,{'tableName':_0x0405('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xd90a=['exports','cm_contact_has_items','lodash','util','../../config/logger','api','moment','request-promise','rimraf','../../config/environment','./cmContactHasItem.attributes'];(function(_0x1ad0ba,_0x122b20){var _0x4a6065=function(_0x3daead){while(--_0x3daead){_0x1ad0ba['push'](_0x1ad0ba['shift']());}};_0x4a6065(++_0x122b20);}(_0xd90a,0x1c5));var _0xad90=function(_0x4b7bad,_0x135acf){_0x4b7bad=_0x4b7bad-0x0;var _0x4da111=_0xd90a[_0x4b7bad];return _0x4da111;};'use strict';var _=require(_0xad90('0x0'));var util=require(_0xad90('0x1'));var logger=require(_0xad90('0x2'))(_0xad90('0x3'));var moment=require(_0xad90('0x4'));var BPromise=require('bluebird');var rp=require(_0xad90('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xad90('0x6'));var config=require(_0xad90('0x7'));var attributes=require(_0xad90('0x8'));module[_0xad90('0x9')]=function(_0x8ce7dc,_0x236550){return _0x8ce7dc['define']('CmContactHasItem',attributes,{'tableName':_0xad90('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 4cfc8e5..d9bf0b0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe1b9=['then','info','CmContactHasItem,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','http'];(function(_0x18bb67,_0x5eff3d){var _0x149f9a=function(_0x1b890c){while(--_0x1b890c){_0x18bb67['push'](_0x18bb67['shift']());}};_0x149f9a(++_0x5eff3d);}(_0xe1b9,0xdc));var _0x9e1b=function(_0x11005e,_0x20c3d2){_0x11005e=_0x11005e-0x0;var _0x29338f=_0xe1b9[_0x11005e];return _0x29338f;};'use strict';var _=require(_0x9e1b('0x0'));var util=require(_0x9e1b('0x1'));var moment=require(_0x9e1b('0x2'));var BPromise=require(_0x9e1b('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9e1b('0x4'));var db=require(_0x9e1b('0x5'))['db'];var utils=require(_0x9e1b('0x6'));var logger=require(_0x9e1b('0x7'))('rpc');var config=require(_0x9e1b('0x8'));var jayson=require(_0x9e1b('0x9'));var client=jayson['client'][_0x9e1b('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xde0f71,_0x3e15ff,_0x5ac60f){return new BPromise(function(_0x53715e,_0x526699){return client['request'](_0xde0f71,_0x5ac60f)[_0x9e1b('0xb')](function(_0x38e7db){logger[_0x9e1b('0xc')](_0x9e1b('0xd'),_0x3e15ff,_0x9e1b('0xe'));logger[_0x9e1b('0xf')]('CmContactHasItem,\x20%s,\x20%s,\x20%s',_0x3e15ff,_0x9e1b('0xe'),JSON[_0x9e1b('0x10')](_0x38e7db));if(_0x38e7db[_0x9e1b('0x11')]){if(_0x38e7db[_0x9e1b('0x11')][_0x9e1b('0x12')]===0x1f4){logger[_0x9e1b('0x11')]('CmContactHasItem,\x20%s,\x20%s',_0x3e15ff,_0x38e7db[_0x9e1b('0x11')]['message']);return _0x526699(_0x38e7db[_0x9e1b('0x11')][_0x9e1b('0x13')]);}logger['error'](_0x9e1b('0xd'),_0x3e15ff,_0x38e7db[_0x9e1b('0x11')]['message']);return _0x53715e(_0x38e7db[_0x9e1b('0x11')]['message']);}else{logger[_0x9e1b('0xc')](_0x9e1b('0xd'),_0x3e15ff,_0x9e1b('0xe'));_0x53715e(_0x38e7db[_0x9e1b('0x14')][_0x9e1b('0x13')]);}})['catch'](function(_0x114b84){logger['error'](_0x9e1b('0xd'),_0x3e15ff,_0x114b84);_0x526699(_0x114b84);});});}
\ No newline at end of file
+var _0x124c=['then','info','CmContactHasItem,\x20%s,\x20%s,\x20%s','stringify','error','code','CmContactHasItem,\x20%s,\x20%s','message','request\x20sent','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x330bc7,_0x448e0a){var _0x4db2ab=function(_0x441b07){while(--_0x441b07){_0x330bc7['push'](_0x330bc7['shift']());}};_0x4db2ab(++_0x448e0a);}(_0x124c,0x66));var _0xc124=function(_0x3e0c99,_0x366270){_0x3e0c99=_0x3e0c99-0x0;var _0x2ae22d=_0x124c[_0x3e0c99];return _0x2ae22d;};'use strict';var _=require(_0xc124('0x0'));var util=require(_0xc124('0x1'));var moment=require(_0xc124('0x2'));var BPromise=require(_0xc124('0x3'));var rs=require(_0xc124('0x4'));var fs=require('fs');var Redis=require(_0xc124('0x5'));var db=require(_0xc124('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xc124('0x7'))(_0xc124('0x8'));var config=require(_0xc124('0x9'));var jayson=require(_0xc124('0xa'));var client=jayson[_0xc124('0xb')][_0xc124('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x1f3be6,_0x252fa9,_0x3da5c7){return new BPromise(function(_0x3cd15d,_0x3b7a36){return client['request'](_0x1f3be6,_0x3da5c7)[_0xc124('0xd')](function(_0x10541c){logger[_0xc124('0xe')]('CmContactHasItem,\x20%s,\x20%s',_0x252fa9,'request\x20sent');logger['debug'](_0xc124('0xf'),_0x252fa9,'request\x20sent',JSON[_0xc124('0x10')](_0x10541c));if(_0x10541c[_0xc124('0x11')]){if(_0x10541c[_0xc124('0x11')][_0xc124('0x12')]===0x1f4){logger[_0xc124('0x11')](_0xc124('0x13'),_0x252fa9,_0x10541c[_0xc124('0x11')][_0xc124('0x14')]);return _0x3b7a36(_0x10541c[_0xc124('0x11')][_0xc124('0x14')]);}logger[_0xc124('0x11')](_0xc124('0x13'),_0x252fa9,_0x10541c[_0xc124('0x11')][_0xc124('0x14')]);return _0x3cd15d(_0x10541c[_0xc124('0x11')][_0xc124('0x14')]);}else{logger[_0xc124('0xe')](_0xc124('0x13'),_0x252fa9,_0xc124('0x15'));_0x3cd15d(_0x10541c['result'][_0xc124('0x14')]);}})[_0xc124('0x16')](function(_0xd1a61d){logger[_0xc124('0x11')](_0xc124('0x13'),_0x252fa9,_0xd1a61d);_0x3b7a36(_0xd1a61d);});});}
\ No newline at end of file
index 5d6f128..4d6b84c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbc11=['/:id','show','post','create','put','update','delete','destroy','exports','multer','util','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./cmContactHasItem.controller','get','isAuthenticated','index'];(function(_0x172747,_0x1732bd){var _0x509692=function(_0x448c56){while(--_0x448c56){_0x172747['push'](_0x172747['shift']());}};_0x509692(++_0x1732bd);}(_0xbc11,0x185));var _0x1bc1=function(_0xaddc52,_0x102147){_0xaddc52=_0xaddc52-0x0;var _0x17aea9=_0xbc11[_0xaddc52];return _0x17aea9;};'use strict';var multer=require(_0x1bc1('0x0'));var util=require(_0x1bc1('0x1'));var path=require(_0x1bc1('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x1bc1('0x3')]();var fs_extra=require(_0x1bc1('0x4'));var auth=require(_0x1bc1('0x5'));var interaction=require(_0x1bc1('0x6'));var config=require('../../config/environment');var controller=require(_0x1bc1('0x7'));router[_0x1bc1('0x8')]('/',auth[_0x1bc1('0x9')](),controller[_0x1bc1('0xa')]);router[_0x1bc1('0x8')](_0x1bc1('0xb'),auth[_0x1bc1('0x9')](),controller[_0x1bc1('0xc')]);router[_0x1bc1('0xd')]('/',auth['isAuthenticated'](),controller[_0x1bc1('0xe')]);router[_0x1bc1('0xf')](_0x1bc1('0xb'),auth[_0x1bc1('0x9')](),controller[_0x1bc1('0x10')]);router[_0x1bc1('0x11')](_0x1bc1('0xb'),auth[_0x1bc1('0x9')](),controller[_0x1bc1('0x12')]);module[_0x1bc1('0x13')]=router;
\ No newline at end of file
+var _0x8b4c=['multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','create','put','update','delete','destroy'];(function(_0x22d2f4,_0x6da5e5){var _0x29c4c1=function(_0x1d6864){while(--_0x1d6864){_0x22d2f4['push'](_0x22d2f4['shift']());}};_0x29c4c1(++_0x6da5e5);}(_0x8b4c,0x120));var _0xc8b4=function(_0x490502,_0x5359cc){_0x490502=_0x490502-0x0;var _0x28ccbf=_0x8b4c[_0x490502];return _0x28ccbf;};'use strict';var multer=require(_0xc8b4('0x0'));var util=require('util');var path=require(_0xc8b4('0x1'));var timeout=require(_0xc8b4('0x2'));var express=require('express');var router=express[_0xc8b4('0x3')]();var fs_extra=require(_0xc8b4('0x4'));var auth=require(_0xc8b4('0x5'));var interaction=require(_0xc8b4('0x6'));var config=require(_0xc8b4('0x7'));var controller=require('./cmContactHasItem.controller');router[_0xc8b4('0x8')]('/',auth[_0xc8b4('0x9')](),controller[_0xc8b4('0xa')]);router[_0xc8b4('0x8')](_0xc8b4('0xb'),auth[_0xc8b4('0x9')](),controller[_0xc8b4('0xc')]);router['post']('/',auth[_0xc8b4('0x9')](),controller[_0xc8b4('0xd')]);router[_0xc8b4('0xe')](_0xc8b4('0xb'),auth['isAuthenticated'](),controller[_0xc8b4('0xf')]);router[_0xc8b4('0x10')](_0xc8b4('0xb'),auth['isAuthenticated'](),controller[_0xc8b4('0x11')]);module['exports']=router;
\ No newline at end of file
index 20291fa..ba7ef3a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd363=['exports','getDataValue','alias','setDataValue','name','STRING','TEXT','long','type','select','parse','values','isArray','stringify','BOOLEAN','ENUM','voice','sequelize'];(function(_0x2a6572,_0x15f9b4){var _0x12ceae=function(_0x13d510){while(--_0x13d510){_0x2a6572['push'](_0x2a6572['shift']());}};_0x12ceae(++_0x15f9b4);}(_0xd363,0x6b));var _0x3d36=function(_0x237bf7,_0xb851fc){_0x237bf7=_0x237bf7-0x0;var _0x5928ba=_0xd363[_0x237bf7];return _0x5928ba;};'use strict';var Sequelize=require(_0x3d36('0x0'));var _=require('lodash');module[_0x3d36('0x1')]={'name':{'type':Sequelize['VIRTUAL'],'get':function(_0x3849e9){return this[_0x3d36('0x2')](_0x3d36('0x3'));}},'alias':{'type':Sequelize['STRING'],'allowNull':![],'set':function(_0x1bebb3){this[_0x3d36('0x4')](_0x3d36('0x3'),_0x1bebb3?_0x1bebb3:this['getDataValue'](_0x3d36('0x5')));}},'type':{'type':Sequelize[_0x3d36('0x6')],'allowNull':![]},'values':{'type':Sequelize[_0x3d36('0x7')](_0x3d36('0x8')),'get':function(){if(this[_0x3d36('0x2')](_0x3d36('0x9'))===_0x3d36('0xa')){return JSON[_0x3d36('0xb')](this[_0x3d36('0x2')]('values'));}else{return this[_0x3d36('0x2')](_0x3d36('0xc'));}},'set':function(_0x23fefc){if(Array[_0x3d36('0xd')](_0x23fefc)){this[_0x3d36('0x4')](_0x3d36('0xc'),JSON[_0x3d36('0xe')](_0x23fefc));}else{this[_0x3d36('0x4')]('values',_0x23fefc);}}},'required':{'type':Sequelize[_0x3d36('0xf')],'defaultValue':![]},'clickToAction':{'type':Sequelize[_0x3d36('0xf')],'defaultValue':![]},'actionType':{'type':Sequelize[_0x3d36('0x10')](_0x3d36('0x11'))}};
\ No newline at end of file
+var _0xc17a=['ENUM','voice','sequelize','exports','getDataValue','alias','setDataValue','name','STRING','TEXT','long','type','select','values','isArray','stringify','BOOLEAN'];(function(_0x153843,_0x2771e7){var _0x4dffe1=function(_0x824238){while(--_0x824238){_0x153843['push'](_0x153843['shift']());}};_0x4dffe1(++_0x2771e7);}(_0xc17a,0x123));var _0xac17=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xc17a[_0x122ef9];return _0x42fba0;};'use strict';var Sequelize=require(_0xac17('0x0'));var _=require('lodash');module[_0xac17('0x1')]={'name':{'type':Sequelize['VIRTUAL'],'get':function(_0x52a463){return this[_0xac17('0x2')](_0xac17('0x3'));}},'alias':{'type':Sequelize['STRING'],'allowNull':![],'set':function(_0x48f33c){this[_0xac17('0x4')](_0xac17('0x3'),_0x48f33c?_0x48f33c:this['getDataValue'](_0xac17('0x5')));}},'type':{'type':Sequelize[_0xac17('0x6')],'allowNull':![]},'values':{'type':Sequelize[_0xac17('0x7')](_0xac17('0x8')),'get':function(){if(this[_0xac17('0x2')](_0xac17('0x9'))===_0xac17('0xa')){return JSON['parse'](this['getDataValue']('values'));}else{return this[_0xac17('0x2')](_0xac17('0xb'));}},'set':function(_0x1cc322){if(Array[_0xac17('0xc')](_0x1cc322)){this['setDataValue'](_0xac17('0xb'),JSON[_0xac17('0xd')](_0x1cc322));}else{this[_0xac17('0x4')](_0xac17('0xb'),_0x1cc322);}}},'required':{'type':Sequelize[_0xac17('0xe')],'defaultValue':![]},'clickToAction':{'type':Sequelize[_0xac17('0xe')],'defaultValue':![]},'actionType':{'type':Sequelize[_0xac17('0xf')](_0xac17('0x10'))}};
\ No newline at end of file
index 2fca5e6..c6c89cd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd3e1=['query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','filter','includeAll','include','rows','catch','params','options','find','body','sequelize','create','TEXT','text','number','INTEGER','switch','Sequelize','BOOLEAN','queryInterface','addColumn','cm_contacts','format','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','offset','undefined','limit','count','set','json','apply','save','update','destroy','then','error','name','send','map','CmCustomField','rawAttributes','fieldName','type','key','model','keys'];(function(_0x49d683,_0x4699ac){var _0x161524=function(_0x3ad382){while(--_0x3ad382){_0x49d683['push'](_0x49d683['shift']());}};_0x161524(++_0x4699ac);}(_0xd3e1,0x7a));var _0x1d3e=function(_0x59dbf2,_0x267a4b){_0x59dbf2=_0x59dbf2-0x0;var _0xb353da=_0xd3e1[_0x59dbf2];return _0xb353da;};'use strict';var emlformat=require(_0x1d3e('0x0'));var rimraf=require(_0x1d3e('0x1'));var zipdir=require(_0x1d3e('0x2'));var jsonpatch=require(_0x1d3e('0x3'));var rp=require(_0x1d3e('0x4'));var moment=require(_0x1d3e('0x5'));var BPromise=require(_0x1d3e('0x6'));var Mustache=require(_0x1d3e('0x7'));var util=require(_0x1d3e('0x8'));var path=require(_0x1d3e('0x9'));var sox=require(_0x1d3e('0xa'));var csv=require(_0x1d3e('0xb'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x1d3e('0xc'));var _=require(_0x1d3e('0xd'));var squel=require(_0x1d3e('0xe'));var crypto=require(_0x1d3e('0xf'));var jsforce=require(_0x1d3e('0x10'));var deskjs=require('desk.js');var toCsv=require(_0x1d3e('0xb'));var querystring=require('querystring');var Papa=require(_0x1d3e('0x11'));var Redis=require(_0x1d3e('0x12'));var authService=require(_0x1d3e('0x13'));var qs=require(_0x1d3e('0x14'));var as=require(_0x1d3e('0x15'));var hardwareService=require(_0x1d3e('0x16'));var logger=require('../../config/logger')(_0x1d3e('0x17'));var utils=require(_0x1d3e('0x18'));var config=require(_0x1d3e('0x19'));var licenseUtil=require(_0x1d3e('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x8b3a9b,_0x2015ab){_0x2015ab=_0x2015ab||0xcc;return function(_0x44557d){if(_0x44557d){return _0x8b3a9b[_0x1d3e('0x1b')](_0x2015ab);}return _0x8b3a9b[_0x1d3e('0x1c')](_0x2015ab)[_0x1d3e('0x1d')]();};}function respondWithResult(_0x19587f,_0x36d48f){_0x36d48f=_0x36d48f||0xc8;return function(_0x531f62){if(_0x531f62){return _0x19587f[_0x1d3e('0x1c')](_0x36d48f)['json'](_0x531f62);}};}function respondWithFilteredResult(_0x18920d,_0x36d6fe){return function(_0x13ac49){if(_0x13ac49){var _0x3fdafe=typeof _0x36d6fe[_0x1d3e('0x1e')]===_0x1d3e('0x1f')&&typeof _0x36d6fe[_0x1d3e('0x20')]===_0x1d3e('0x1f');var _0x5ede62=_0x13ac49[_0x1d3e('0x21')];var _0x5ba2cc=_0x3fdafe?0x0:_0x36d6fe[_0x1d3e('0x1e')];var _0x15752c=_0x3fdafe?_0x13ac49[_0x1d3e('0x21')]:_0x36d6fe['offset']+_0x36d6fe['limit'];var _0x5f0c83;if(_0x15752c>=_0x5ede62){_0x15752c=_0x5ede62;_0x5f0c83=0xc8;}else{_0x5f0c83=0xce;}_0x18920d['status'](_0x5f0c83);return _0x18920d[_0x1d3e('0x22')]('Content-Range',_0x5ba2cc+'-'+_0x15752c+'/'+_0x5ede62)[_0x1d3e('0x23')](_0x13ac49);}return null;};}function patchUpdates(_0x32e063){return function(_0x11494a){try{jsonpatch[_0x1d3e('0x24')](_0x11494a,_0x32e063,!![]);}catch(_0x3fbb04){return BPromise['reject'](_0x3fbb04);}return _0x11494a[_0x1d3e('0x25')]();};}function saveUpdates(_0x456ade,_0x30224b){return function(_0x60e0e3){if(_0x60e0e3){return _0x60e0e3[_0x1d3e('0x26')](_0x456ade)['then'](function(_0x45ed24){return _0x45ed24;});}return null;};}function removeEntity(_0x106062,_0x44b3f9){return function(_0x105ba9){if(_0x105ba9){return _0x105ba9[_0x1d3e('0x27')]()[_0x1d3e('0x28')](function(){_0x106062['status'](0xcc)[_0x1d3e('0x1d')]();});}};}function handleEntityNotFound(_0x4d73e3,_0x3e1753){return function(_0x4e5e63){if(!_0x4e5e63){_0x4d73e3['sendStatus'](0x194);}return _0x4e5e63;};}function handleError(_0x4ca3dc,_0xac0b31){_0xac0b31=_0xac0b31||0x1f4;return function(_0x3f5f5e){logger[_0x1d3e('0x29')](_0x3f5f5e['stack']);if(_0x3f5f5e[_0x1d3e('0x2a')]){delete _0x3f5f5e[_0x1d3e('0x2a')];}_0x4ca3dc[_0x1d3e('0x1c')](_0xac0b31)[_0x1d3e('0x2b')](_0x3f5f5e);};}exports['index']=function(_0x4637ff,_0x291ed5){var _0x5a83ff={},_0x592c55={},_0x3261b0={'count':0x0,'rows':[]};var _0x4d0cfc=_[_0x1d3e('0x2c')](db[_0x1d3e('0x2d')][_0x1d3e('0x2e')],function(_0xca33c){return{'name':_0xca33c[_0x1d3e('0x2f')],'type':_0xca33c[_0x1d3e('0x30')][_0x1d3e('0x31')]};});_0x592c55[_0x1d3e('0x32')]=_['differenceBy'](_[_0x1d3e('0x2c')](_0x4d0cfc,_0x1d3e('0x2a')),[_0x1d3e('0x2a')]);_0x592c55['query']=_[_0x1d3e('0x33')](_0x4637ff[_0x1d3e('0x34')]);_0x592c55[_0x1d3e('0x35')]=_['intersection'](_0x592c55[_0x1d3e('0x32')],_0x592c55['query']);_0x5a83ff[_0x1d3e('0x36')]=_[_0x1d3e('0x37')](_0x592c55[_0x1d3e('0x32')],qs[_0x1d3e('0x38')](_0x4637ff[_0x1d3e('0x34')][_0x1d3e('0x38')]));_0x5a83ff[_0x1d3e('0x36')]=_0x5a83ff[_0x1d3e('0x36')][_0x1d3e('0x39')]?_0x5a83ff['attributes']:_0x592c55[_0x1d3e('0x32')];if(!_0x4637ff[_0x1d3e('0x34')][_0x1d3e('0x3a')](_0x1d3e('0x3b'))){_0x5a83ff[_0x1d3e('0x20')]=qs['limit'](_0x4637ff['query'][_0x1d3e('0x20')]);_0x5a83ff[_0x1d3e('0x1e')]=qs[_0x1d3e('0x1e')](_0x4637ff[_0x1d3e('0x34')][_0x1d3e('0x1e')]);}_0x5a83ff[_0x1d3e('0x3c')]=qs[_0x1d3e('0x3d')](_0x4637ff[_0x1d3e('0x34')][_0x1d3e('0x3d')]);_0x5a83ff[_0x1d3e('0x3e')]=qs['filters'](_[_0x1d3e('0x3f')](_0x4637ff['query'],_0x592c55['filters']),_0x4d0cfc);if(_0x4637ff[_0x1d3e('0x34')]['filter']){_0x5a83ff[_0x1d3e('0x3e')]=_[_0x1d3e('0x40')](_0x5a83ff[_0x1d3e('0x3e')],{'$or':_['map'](_0x4d0cfc,function(_0x2b53bf){if(_0x2b53bf['type']!=='VIRTUAL'){var _0x42baee={};_0x42baee[_0x2b53bf['name']]={'$like':'%'+_0x4637ff[_0x1d3e('0x34')][_0x1d3e('0x41')]+'%'};return _0x42baee;}})});}_0x5a83ff=_[_0x1d3e('0x40')]({},_0x5a83ff,_0x4637ff['options']);var _0x5a7b88={'where':_0x5a83ff[_0x1d3e('0x3e')]};return db[_0x1d3e('0x2d')][_0x1d3e('0x21')](_0x5a7b88)[_0x1d3e('0x28')](function(_0x10a1c9){_0x3261b0[_0x1d3e('0x21')]=_0x10a1c9;if(_0x4637ff[_0x1d3e('0x34')][_0x1d3e('0x42')]){_0x5a83ff[_0x1d3e('0x43')]=[{'all':!![]}];}return db['CmCustomField']['findAll'](_0x5a83ff);})[_0x1d3e('0x28')](function(_0x4bf5b3){_0x3261b0[_0x1d3e('0x44')]=_0x4bf5b3;return _0x3261b0;})[_0x1d3e('0x28')](respondWithFilteredResult(_0x291ed5,_0x5a83ff))[_0x1d3e('0x45')](handleError(_0x291ed5,null));};exports['show']=function(_0x1e9362,_0x40d128){var _0x5e0107={'raw':!![],'where':{'id':_0x1e9362[_0x1d3e('0x46')]['id']}},_0x3f2a8a={};_0x3f2a8a[_0x1d3e('0x32')]=_[_0x1d3e('0x33')](db[_0x1d3e('0x2d')][_0x1d3e('0x2e')]);_0x3f2a8a[_0x1d3e('0x34')]=_['keys'](_0x1e9362[_0x1d3e('0x34')]);_0x3f2a8a[_0x1d3e('0x35')]=_[_0x1d3e('0x37')](_0x3f2a8a[_0x1d3e('0x32')],_0x3f2a8a[_0x1d3e('0x34')]);_0x5e0107[_0x1d3e('0x36')]=_[_0x1d3e('0x37')](_0x3f2a8a['model'],qs[_0x1d3e('0x38')](_0x1e9362[_0x1d3e('0x34')][_0x1d3e('0x38')]));_0x5e0107['attributes']=_0x5e0107[_0x1d3e('0x36')][_0x1d3e('0x39')]?_0x5e0107['attributes']:_0x3f2a8a['model'];if(_0x1e9362[_0x1d3e('0x34')][_0x1d3e('0x42')]){_0x5e0107[_0x1d3e('0x43')]=[{'all':!![]}];}_0x5e0107=_[_0x1d3e('0x40')]({},_0x5e0107,_0x1e9362[_0x1d3e('0x47')]);return db['CmCustomField'][_0x1d3e('0x48')](_0x5e0107)[_0x1d3e('0x28')](handleEntityNotFound(_0x40d128,null))[_0x1d3e('0x28')](respondWithResult(_0x40d128,null))['catch'](handleError(_0x40d128,null));};exports[_0x1d3e('0x26')]=function(_0x45bea9,_0x9c3f50){if(_0x45bea9['body']['id']){delete _0x45bea9[_0x1d3e('0x49')]['id'];}return db[_0x1d3e('0x2d')][_0x1d3e('0x48')]({'where':{'id':_0x45bea9['params']['id']}})[_0x1d3e('0x28')](handleEntityNotFound(_0x9c3f50,null))[_0x1d3e('0x28')](saveUpdates(_0x45bea9[_0x1d3e('0x49')],null))['then'](respondWithResult(_0x9c3f50,null))[_0x1d3e('0x45')](handleError(_0x9c3f50,null));};exports[_0x1d3e('0x27')]=function(_0x3669ef,_0x4d0c2d){return db[_0x1d3e('0x2d')][_0x1d3e('0x48')]({'where':{'id':_0x3669ef['params']['id']}})[_0x1d3e('0x28')](handleEntityNotFound(_0x4d0c2d,null))[_0x1d3e('0x28')](removeEntity(_0x4d0c2d,null))[_0x1d3e('0x45')](handleError(_0x4d0c2d,null));};exports['create']=function(_0x594b9a,_0x20ad26){var _0xf2593c;return db[_0x1d3e('0x4a')]['transaction'](function(_0x3ecee9){return db[_0x1d3e('0x2d')][_0x1d3e('0x4b')](_0x594b9a[_0x1d3e('0x49')],{'transaction':_0x3ecee9})[_0x1d3e('0x28')](function(_0x99f1e3){_0xf2593c=_0x99f1e3;var _0x1dac13={'type':db['Sequelize'][_0x1d3e('0x4c')],'transaction':_0x3ecee9};switch(_0x594b9a[_0x1d3e('0x49')]['type']){case _0x1d3e('0x4d'):_0x1dac13['type']=db['Sequelize'][_0x1d3e('0x4c')];break;case _0x1d3e('0x4e'):_0x1dac13[_0x1d3e('0x30')]=db['Sequelize'][_0x1d3e('0x4f')];break;case _0x1d3e('0x50'):_0x1dac13['type']=db[_0x1d3e('0x51')][_0x1d3e('0x52')];_0x1dac13['defaultValue']=![];break;default:}return db['sequelize'][_0x1d3e('0x53')][_0x1d3e('0x54')](_0x1d3e('0x55'),util[_0x1d3e('0x56')]('cf_%d',_0xf2593c['id']),_0x1dac13);})[_0x1d3e('0x28')](function(){return _0xf2593c;});})[_0x1d3e('0x28')](respondWithResult(_0x20ad26,0xc9))[_0x1d3e('0x45')](handleError(_0x20ad26,null));};
\ No newline at end of file
+var _0x6dce=['offset','limit','undefined','count','apply','reject','update','then','destroy','error','stack','name','map','CmCustomField','fieldName','type','keys','query','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filters','where','VIRTUAL','filter','merge','options','include','findAll','rows','catch','show','rawAttributes','includeAll','body','find','params','sequelize','create','TEXT','text','Sequelize','number','INTEGER','switch','defaultValue','queryInterface','addColumn','cm_contacts','format','cf_%d','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','sendStatus','status','end','json'];(function(_0x3f2ae8,_0x1e8db2){var _0x1f3159=function(_0x107f51){while(--_0x107f51){_0x3f2ae8['push'](_0x3f2ae8['shift']());}};_0x1f3159(++_0x1e8db2);}(_0x6dce,0xe7));var _0xe6dc=function(_0x2c71f4,_0x4525d4){_0x2c71f4=_0x2c71f4-0x0;var _0x4565dd=_0x6dce[_0x2c71f4];return _0x4565dd;};'use strict';var emlformat=require(_0xe6dc('0x0'));var rimraf=require(_0xe6dc('0x1'));var zipdir=require(_0xe6dc('0x2'));var jsonpatch=require(_0xe6dc('0x3'));var rp=require(_0xe6dc('0x4'));var moment=require(_0xe6dc('0x5'));var BPromise=require(_0xe6dc('0x6'));var Mustache=require(_0xe6dc('0x7'));var util=require(_0xe6dc('0x8'));var path=require(_0xe6dc('0x9'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xe6dc('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xe6dc('0xb'));var squel=require(_0xe6dc('0xc'));var crypto=require(_0xe6dc('0xd'));var jsforce=require(_0xe6dc('0xe'));var deskjs=require(_0xe6dc('0xf'));var toCsv=require(_0xe6dc('0x10'));var querystring=require('querystring');var Papa=require(_0xe6dc('0x11'));var Redis=require(_0xe6dc('0x12'));var authService=require(_0xe6dc('0x13'));var qs=require(_0xe6dc('0x14'));var as=require(_0xe6dc('0x15'));var hardwareService=require(_0xe6dc('0x16'));var logger=require('../../config/logger')(_0xe6dc('0x17'));var utils=require(_0xe6dc('0x18'));var config=require(_0xe6dc('0x19'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3c2c47,_0x4e1731){_0x4e1731=_0x4e1731||0xcc;return function(_0x276396){if(_0x276396){return _0x3c2c47[_0xe6dc('0x1a')](_0x4e1731);}return _0x3c2c47[_0xe6dc('0x1b')](_0x4e1731)[_0xe6dc('0x1c')]();};}function respondWithResult(_0x2dc656,_0x3f424b){_0x3f424b=_0x3f424b||0xc8;return function(_0x3aa173){if(_0x3aa173){return _0x2dc656[_0xe6dc('0x1b')](_0x3f424b)[_0xe6dc('0x1d')](_0x3aa173);}};}function respondWithFilteredResult(_0x35686e,_0x3cad25){return function(_0x291c0b){if(_0x291c0b){var _0x5bd04d=typeof _0x3cad25[_0xe6dc('0x1e')]==='undefined'&&typeof _0x3cad25[_0xe6dc('0x1f')]===_0xe6dc('0x20');var _0x51506b=_0x291c0b[_0xe6dc('0x21')];var _0x3119dc=_0x5bd04d?0x0:_0x3cad25['offset'];var _0x309541=_0x5bd04d?_0x291c0b[_0xe6dc('0x21')]:_0x3cad25[_0xe6dc('0x1e')]+_0x3cad25[_0xe6dc('0x1f')];var _0xdf9699;if(_0x309541>=_0x51506b){_0x309541=_0x51506b;_0xdf9699=0xc8;}else{_0xdf9699=0xce;}_0x35686e[_0xe6dc('0x1b')](_0xdf9699);return _0x35686e['set']('Content-Range',_0x3119dc+'-'+_0x309541+'/'+_0x51506b)[_0xe6dc('0x1d')](_0x291c0b);}return null;};}function patchUpdates(_0x4c0d13){return function(_0x19bf79){try{jsonpatch[_0xe6dc('0x22')](_0x19bf79,_0x4c0d13,!![]);}catch(_0x55aed1){return BPromise[_0xe6dc('0x23')](_0x55aed1);}return _0x19bf79['save']();};}function saveUpdates(_0x165b28,_0xe93266){return function(_0x158fe5){if(_0x158fe5){return _0x158fe5[_0xe6dc('0x24')](_0x165b28)[_0xe6dc('0x25')](function(_0x5ab36b){return _0x5ab36b;});}return null;};}function removeEntity(_0x3e736a,_0x4f8cd1){return function(_0x38c468){if(_0x38c468){return _0x38c468[_0xe6dc('0x26')]()[_0xe6dc('0x25')](function(){_0x3e736a[_0xe6dc('0x1b')](0xcc)[_0xe6dc('0x1c')]();});}};}function handleEntityNotFound(_0x5b15c3,_0x1b5243){return function(_0x574241){if(!_0x574241){_0x5b15c3[_0xe6dc('0x1a')](0x194);}return _0x574241;};}function handleError(_0x1f5c95,_0x4284dd){_0x4284dd=_0x4284dd||0x1f4;return function(_0x164f8e){logger[_0xe6dc('0x27')](_0x164f8e[_0xe6dc('0x28')]);if(_0x164f8e[_0xe6dc('0x29')]){delete _0x164f8e[_0xe6dc('0x29')];}_0x1f5c95[_0xe6dc('0x1b')](_0x4284dd)['send'](_0x164f8e);};}exports['index']=function(_0x2a63a8,_0x5eb3a4){var _0x7e841d={},_0x5c40af={},_0x17b0bf={'count':0x0,'rows':[]};var _0x4af582=_[_0xe6dc('0x2a')](db[_0xe6dc('0x2b')]['rawAttributes'],function(_0x3c810d){return{'name':_0x3c810d[_0xe6dc('0x2c')],'type':_0x3c810d[_0xe6dc('0x2d')]['key']};});_0x5c40af['model']=_['differenceBy'](_[_0xe6dc('0x2a')](_0x4af582,'name'),[_0xe6dc('0x29')]);_0x5c40af['query']=_[_0xe6dc('0x2e')](_0x2a63a8[_0xe6dc('0x2f')]);_0x5c40af['filters']=_[_0xe6dc('0x30')](_0x5c40af[_0xe6dc('0x31')],_0x5c40af['query']);_0x7e841d[_0xe6dc('0x32')]=_[_0xe6dc('0x30')](_0x5c40af[_0xe6dc('0x31')],qs[_0xe6dc('0x33')](_0x2a63a8[_0xe6dc('0x2f')][_0xe6dc('0x33')]));_0x7e841d[_0xe6dc('0x32')]=_0x7e841d[_0xe6dc('0x32')][_0xe6dc('0x34')]?_0x7e841d[_0xe6dc('0x32')]:_0x5c40af['model'];if(!_0x2a63a8[_0xe6dc('0x2f')][_0xe6dc('0x35')](_0xe6dc('0x36'))){_0x7e841d[_0xe6dc('0x1f')]=qs[_0xe6dc('0x1f')](_0x2a63a8['query'][_0xe6dc('0x1f')]);_0x7e841d[_0xe6dc('0x1e')]=qs[_0xe6dc('0x1e')](_0x2a63a8[_0xe6dc('0x2f')][_0xe6dc('0x1e')]);}_0x7e841d[_0xe6dc('0x37')]=qs['sort'](_0x2a63a8[_0xe6dc('0x2f')][_0xe6dc('0x38')]);_0x7e841d['where']=qs[_0xe6dc('0x39')](_['pick'](_0x2a63a8[_0xe6dc('0x2f')],_0x5c40af[_0xe6dc('0x39')]),_0x4af582);if(_0x2a63a8['query']['filter']){_0x7e841d[_0xe6dc('0x3a')]=_['merge'](_0x7e841d[_0xe6dc('0x3a')],{'$or':_[_0xe6dc('0x2a')](_0x4af582,function(_0xe8c36){if(_0xe8c36[_0xe6dc('0x2d')]!==_0xe6dc('0x3b')){var _0x5f1579={};_0x5f1579[_0xe8c36[_0xe6dc('0x29')]]={'$like':'%'+_0x2a63a8['query'][_0xe6dc('0x3c')]+'%'};return _0x5f1579;}})});}_0x7e841d=_[_0xe6dc('0x3d')]({},_0x7e841d,_0x2a63a8[_0xe6dc('0x3e')]);var _0x691534={'where':_0x7e841d[_0xe6dc('0x3a')]};return db['CmCustomField'][_0xe6dc('0x21')](_0x691534)[_0xe6dc('0x25')](function(_0x16d132){_0x17b0bf[_0xe6dc('0x21')]=_0x16d132;if(_0x2a63a8[_0xe6dc('0x2f')]['includeAll']){_0x7e841d[_0xe6dc('0x3f')]=[{'all':!![]}];}return db[_0xe6dc('0x2b')][_0xe6dc('0x40')](_0x7e841d);})[_0xe6dc('0x25')](function(_0x194d32){_0x17b0bf[_0xe6dc('0x41')]=_0x194d32;return _0x17b0bf;})[_0xe6dc('0x25')](respondWithFilteredResult(_0x5eb3a4,_0x7e841d))[_0xe6dc('0x42')](handleError(_0x5eb3a4,null));};exports[_0xe6dc('0x43')]=function(_0x6d92ef,_0x384de4){var _0x517e0f={'raw':!![],'where':{'id':_0x6d92ef['params']['id']}},_0x3e7a07={};_0x3e7a07[_0xe6dc('0x31')]=_[_0xe6dc('0x2e')](db[_0xe6dc('0x2b')][_0xe6dc('0x44')]);_0x3e7a07[_0xe6dc('0x2f')]=_['keys'](_0x6d92ef[_0xe6dc('0x2f')]);_0x3e7a07[_0xe6dc('0x39')]=_[_0xe6dc('0x30')](_0x3e7a07['model'],_0x3e7a07['query']);_0x517e0f[_0xe6dc('0x32')]=_['intersection'](_0x3e7a07[_0xe6dc('0x31')],qs[_0xe6dc('0x33')](_0x6d92ef[_0xe6dc('0x2f')][_0xe6dc('0x33')]));_0x517e0f[_0xe6dc('0x32')]=_0x517e0f[_0xe6dc('0x32')][_0xe6dc('0x34')]?_0x517e0f[_0xe6dc('0x32')]:_0x3e7a07[_0xe6dc('0x31')];if(_0x6d92ef[_0xe6dc('0x2f')][_0xe6dc('0x45')]){_0x517e0f[_0xe6dc('0x3f')]=[{'all':!![]}];}_0x517e0f=_[_0xe6dc('0x3d')]({},_0x517e0f,_0x6d92ef['options']);return db[_0xe6dc('0x2b')]['find'](_0x517e0f)[_0xe6dc('0x25')](handleEntityNotFound(_0x384de4,null))['then'](respondWithResult(_0x384de4,null))[_0xe6dc('0x42')](handleError(_0x384de4,null));};exports[_0xe6dc('0x24')]=function(_0x279bde,_0x371a6c){if(_0x279bde['body']['id']){delete _0x279bde[_0xe6dc('0x46')]['id'];}return db[_0xe6dc('0x2b')][_0xe6dc('0x47')]({'where':{'id':_0x279bde[_0xe6dc('0x48')]['id']}})['then'](handleEntityNotFound(_0x371a6c,null))[_0xe6dc('0x25')](saveUpdates(_0x279bde[_0xe6dc('0x46')],null))['then'](respondWithResult(_0x371a6c,null))[_0xe6dc('0x42')](handleError(_0x371a6c,null));};exports[_0xe6dc('0x26')]=function(_0x279b80,_0x31f74f){return db[_0xe6dc('0x2b')][_0xe6dc('0x47')]({'where':{'id':_0x279b80[_0xe6dc('0x48')]['id']}})[_0xe6dc('0x25')](handleEntityNotFound(_0x31f74f,null))[_0xe6dc('0x25')](removeEntity(_0x31f74f,null))[_0xe6dc('0x42')](handleError(_0x31f74f,null));};exports['create']=function(_0x4e47e1,_0x5b030c){var _0x1a2317;return db[_0xe6dc('0x49')]['transaction'](function(_0x4b2f59){return db[_0xe6dc('0x2b')][_0xe6dc('0x4a')](_0x4e47e1[_0xe6dc('0x46')],{'transaction':_0x4b2f59})[_0xe6dc('0x25')](function(_0x532732){_0x1a2317=_0x532732;var _0x1e0697={'type':db['Sequelize'][_0xe6dc('0x4b')],'transaction':_0x4b2f59};switch(_0x4e47e1[_0xe6dc('0x46')][_0xe6dc('0x2d')]){case _0xe6dc('0x4c'):_0x1e0697[_0xe6dc('0x2d')]=db[_0xe6dc('0x4d')][_0xe6dc('0x4b')];break;case _0xe6dc('0x4e'):_0x1e0697[_0xe6dc('0x2d')]=db[_0xe6dc('0x4d')][_0xe6dc('0x4f')];break;case _0xe6dc('0x50'):_0x1e0697['type']=db[_0xe6dc('0x4d')]['BOOLEAN'];_0x1e0697[_0xe6dc('0x51')]=![];break;default:}return db[_0xe6dc('0x49')][_0xe6dc('0x52')][_0xe6dc('0x53')](_0xe6dc('0x54'),util[_0xe6dc('0x55')](_0xe6dc('0x56'),_0x1a2317['id']),_0x1e0697);})[_0xe6dc('0x25')](function(){return _0x1a2317;});})[_0xe6dc('0x25')](respondWithResult(_0x5b030c,0xc9))[_0xe6dc('0x42')](handleError(_0x5b030c,null));};
\ No newline at end of file
index ffcc881..f2fc4c1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x66ec=['bluebird','request-promise','path','rimraf','../../config/environment','exports','define','CmCustomField','cm_custom_fields','util','../../config/logger','api'];(function(_0x1c169a,_0x37a2fa){var _0x4be19d=function(_0x1e8d6d){while(--_0x1e8d6d){_0x1c169a['push'](_0x1c169a['shift']());}};_0x4be19d(++_0x37a2fa);}(_0x66ec,0x17d));var _0xc66e=function(_0x1e7b16,_0x4607a1){_0x1e7b16=_0x1e7b16-0x0;var _0x37fadc=_0x66ec[_0x1e7b16];return _0x37fadc;};'use strict';var _=require('lodash');var util=require(_0xc66e('0x0'));var logger=require(_0xc66e('0x1'))(_0xc66e('0x2'));var moment=require('moment');var BPromise=require(_0xc66e('0x3'));var rp=require(_0xc66e('0x4'));var fs=require('fs');var path=require(_0xc66e('0x5'));var rimraf=require(_0xc66e('0x6'));var config=require(_0xc66e('0x7'));var attributes=require('./cmCustomField.attributes');module[_0xc66e('0x8')]=function(_0x38306a,_0x369063){return _0x38306a[_0xc66e('0x9')](_0xc66e('0xa'),attributes,{'tableName':_0xc66e('0xb'),'paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x3144=['exports','CmCustomField','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./cmCustomField.attributes'];(function(_0x4e1234,_0x36d85e){var _0x439630=function(_0x31870e){while(--_0x31870e){_0x4e1234['push'](_0x4e1234['shift']());}};_0x439630(++_0x36d85e);}(_0x3144,0x8e));var _0x4314=function(_0x3966c7,_0x3ba255){_0x3966c7=_0x3966c7-0x0;var _0x4779ff=_0x3144[_0x3966c7];return _0x4779ff;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x4314('0x0'))(_0x4314('0x1'));var moment=require(_0x4314('0x2'));var BPromise=require(_0x4314('0x3'));var rp=require(_0x4314('0x4'));var fs=require('fs');var path=require(_0x4314('0x5'));var rimraf=require(_0x4314('0x6'));var config=require('../../config/environment');var attributes=require(_0x4314('0x7'));module[_0x4314('0x8')]=function(_0x584ed4,_0x4d3097){return _0x584ed4['define'](_0x4314('0x9'),attributes,{'tableName':'cm_custom_fields','paranoid':!![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index c8d4496..f9b5f24 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x71d8=['result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','info','CmCustomField,\x20%s,\x20%s','debug','CmCustomField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message'];(function(_0x41068c,_0x54fac1){var _0x4ef366=function(_0x4496fc){while(--_0x4496fc){_0x41068c['push'](_0x41068c['shift']());}};_0x4ef366(++_0x54fac1);}(_0x71d8,0xb0));var _0x871d=function(_0x1bd75c,_0x1e96d9){_0x1bd75c=_0x1bd75c-0x0;var _0x584207=_0x71d8[_0x1bd75c];return _0x584207;};'use strict';var _=require(_0x871d('0x0'));var util=require(_0x871d('0x1'));var moment=require(_0x871d('0x2'));var BPromise=require(_0x871d('0x3'));var rs=require(_0x871d('0x4'));var fs=require('fs');var Redis=require(_0x871d('0x5'));var db=require(_0x871d('0x6'))['db'];var utils=require(_0x871d('0x7'));var logger=require(_0x871d('0x8'))(_0x871d('0x9'));var config=require(_0x871d('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x871d('0xb')][_0x871d('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x2519d6,_0x394493,_0x1df5c3){return new BPromise(function(_0x4a2736,_0x1ef665){return client[_0x871d('0xd')](_0x2519d6,_0x1df5c3)[_0x871d('0xe')](function(_0x281fb0){logger[_0x871d('0xf')](_0x871d('0x10'),_0x394493,'request\x20sent');logger[_0x871d('0x11')](_0x871d('0x12'),_0x394493,_0x871d('0x13'),JSON[_0x871d('0x14')](_0x281fb0));if(_0x281fb0[_0x871d('0x15')]){if(_0x281fb0[_0x871d('0x15')][_0x871d('0x16')]===0x1f4){logger[_0x871d('0x15')](_0x871d('0x10'),_0x394493,_0x281fb0[_0x871d('0x15')]['message']);return _0x1ef665(_0x281fb0[_0x871d('0x15')][_0x871d('0x17')]);}logger['error'](_0x871d('0x10'),_0x394493,_0x281fb0[_0x871d('0x15')][_0x871d('0x17')]);return _0x4a2736(_0x281fb0['error'][_0x871d('0x17')]);}else{logger[_0x871d('0xf')](_0x871d('0x10'),_0x394493,_0x871d('0x13'));_0x4a2736(_0x281fb0[_0x871d('0x18')][_0x871d('0x17')]);}})['catch'](function(_0x733525){logger['error'](_0x871d('0x10'),_0x394493,_0x733525);_0x1ef665(_0x733525);});});}
\ No newline at end of file
+var _0x0f09=['CmCustomField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','CmCustomField,\x20%s,\x20%s','lodash','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent'];(function(_0x36ad8c,_0x2f6eb5){var _0x55e041=function(_0x30c86d){while(--_0x30c86d){_0x36ad8c['push'](_0x36ad8c['shift']());}};_0x55e041(++_0x2f6eb5);}(_0x0f09,0x10a));var _0x90f0=function(_0x4b055c,_0x4b870b){_0x4b055c=_0x4b055c-0x0;var _0x4b62bb=_0x0f09[_0x4b055c];return _0x4b62bb;};'use strict';var _=require(_0x90f0('0x0'));var util=require('util');var moment=require(_0x90f0('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x90f0('0x2'));var db=require(_0x90f0('0x3'))['db'];var utils=require(_0x90f0('0x4'));var logger=require(_0x90f0('0x5'))('rpc');var config=require(_0x90f0('0x6'));var jayson=require(_0x90f0('0x7'));var client=jayson[_0x90f0('0x8')][_0x90f0('0x9')]({'port':0x232a});function respondWithRpcPromise(_0xbd33bc,_0x1198fc,_0x54ce17){return new BPromise(function(_0x5fb0cc,_0x2a4e87){return client[_0x90f0('0xa')](_0xbd33bc,_0x54ce17)[_0x90f0('0xb')](function(_0x2e1401){logger[_0x90f0('0xc')]('CmCustomField,\x20%s,\x20%s',_0x1198fc,_0x90f0('0xd'));logger['debug'](_0x90f0('0xe'),_0x1198fc,_0x90f0('0xd'),JSON[_0x90f0('0xf')](_0x2e1401));if(_0x2e1401[_0x90f0('0x10')]){if(_0x2e1401[_0x90f0('0x10')][_0x90f0('0x11')]===0x1f4){logger[_0x90f0('0x10')]('CmCustomField,\x20%s,\x20%s',_0x1198fc,_0x2e1401[_0x90f0('0x10')][_0x90f0('0x12')]);return _0x2a4e87(_0x2e1401[_0x90f0('0x10')][_0x90f0('0x12')]);}logger[_0x90f0('0x10')](_0x90f0('0x13'),_0x1198fc,_0x2e1401[_0x90f0('0x10')][_0x90f0('0x12')]);return _0x5fb0cc(_0x2e1401[_0x90f0('0x10')][_0x90f0('0x12')]);}else{logger[_0x90f0('0xc')](_0x90f0('0x13'),_0x1198fc,_0x90f0('0xd'));_0x5fb0cc(_0x2e1401['result'][_0x90f0('0x12')]);}})['catch'](function(_0x110a88){logger[_0x90f0('0x10')](_0x90f0('0x13'),_0x1198fc,_0x110a88);_0x2a4e87(_0x110a88);});});}
\ No newline at end of file
index 5d20a4c..0bdf824 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa267=['delete','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmCustomField.controller','get','index','/:id','show','post','isAuthenticated','update'];(function(_0x456442,_0x4e5522){var _0x55dfb8=function(_0x512e80){while(--_0x512e80){_0x456442['push'](_0x456442['shift']());}};_0x55dfb8(++_0x4e5522);}(_0xa267,0xcb));var _0x7a26=function(_0x537e48,_0x200301){_0x537e48=_0x537e48-0x0;var _0x14bc5e=_0xa267[_0x537e48];return _0x14bc5e;};'use strict';var multer=require(_0x7a26('0x0'));var util=require(_0x7a26('0x1'));var path=require(_0x7a26('0x2'));var timeout=require('connect-timeout');var express=require(_0x7a26('0x3'));var router=express[_0x7a26('0x4')]();var fs_extra=require(_0x7a26('0x5'));var auth=require(_0x7a26('0x6'));var interaction=require(_0x7a26('0x7'));var config=require(_0x7a26('0x8'));var controller=require(_0x7a26('0x9'));router[_0x7a26('0xa')]('/',auth['isAuthenticated'](),controller[_0x7a26('0xb')]);router[_0x7a26('0xa')](_0x7a26('0xc'),auth['isAuthenticated'](),controller[_0x7a26('0xd')]);router[_0x7a26('0xe')]('/',auth[_0x7a26('0xf')](),controller['create']);router['put'](_0x7a26('0xc'),auth[_0x7a26('0xf')](),controller[_0x7a26('0x10')]);router[_0x7a26('0x11')](_0x7a26('0xc'),auth[_0x7a26('0xf')](),controller[_0x7a26('0x12')]);module[_0x7a26('0x13')]=router;
\ No newline at end of file
+var _0x0845=['./cmCustomField.controller','get','isAuthenticated','show','post','put','/:id','delete','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x341eca,_0x3b58aa){var _0x18c18a=function(_0x148874){while(--_0x148874){_0x341eca['push'](_0x341eca['shift']());}};_0x18c18a(++_0x3b58aa);}(_0x0845,0x125));var _0x5084=function(_0x91cb11,_0x43b479){_0x91cb11=_0x91cb11-0x0;var _0x198397=_0x0845[_0x91cb11];return _0x198397;};'use strict';var multer=require(_0x5084('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x5084('0x1'));var express=require(_0x5084('0x2'));var router=express[_0x5084('0x3')]();var fs_extra=require(_0x5084('0x4'));var auth=require(_0x5084('0x5'));var interaction=require(_0x5084('0x6'));var config=require('../../config/environment');var controller=require(_0x5084('0x7'));router[_0x5084('0x8')]('/',auth[_0x5084('0x9')](),controller['index']);router['get']('/:id',auth[_0x5084('0x9')](),controller[_0x5084('0xa')]);router[_0x5084('0xb')]('/',auth['isAuthenticated'](),controller['create']);router[_0x5084('0xc')](_0x5084('0xd'),auth[_0x5084('0x9')](),controller['update']);router[_0x5084('0xe')](_0x5084('0xd'),auth[_0x5084('0x9')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
index 5ea6136..08a85c2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9276=['YYYY-MM-DD\x20HH:mm:ss','INTEGER','UNSIGNED','BOOLEAN','contactListQueue','sequelize','STRING','DATE'];(function(_0x4d0d85,_0x3250d3){var _0x290a74=function(_0x4762db){while(--_0x4762db){_0x4d0d85['push'](_0x4d0d85['shift']());}};_0x290a74(++_0x3250d3);}(_0x9276,0x7d));var _0x6927=function(_0x5d4ed9,_0x321ad9){_0x5d4ed9=_0x5d4ed9-0x0;var _0x46184a=_0x9276[_0x5d4ed9];return _0x46184a;};'use strict';var moment=require('moment');var Sequelize=require(_0x6927('0x0'));module['exports']={'phone':{'type':Sequelize[_0x6927('0x1')],'allowNull':![]},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'scheduledat':{'type':Sequelize[_0x6927('0x2')],'defaultValue':moment()['format'](_0x6927('0x3'))},'countbusyretry':{'type':Sequelize[_0x6927('0x4')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x6927('0x4')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x6927('0x4')],'defaultValue':0x0},'callback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x6927('0x1')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x6927('0x2')]},'priority':{'type':Sequelize['INTEGER'](0x2)[_0x6927('0x5')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'recallme':{'type':Sequelize[_0x6927('0x6')],'defaultValue':![]},'ContactId':{'type':Sequelize[_0x6927('0x4')],'unique':_0x6927('0x7')},'ListId':{'type':Sequelize[_0x6927('0x4')],'unique':'contactListQueue'},'UserId':{'type':Sequelize['INTEGER']},'VoiceQueueId':{'type':Sequelize[_0x6927('0x4')],'unique':_0x6927('0x7')},'CampaignId':{'type':Sequelize[_0x6927('0x4')]},'countnosuchnumberretry':{'type':Sequelize[_0x6927('0x4')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x6927('0x4')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x6927('0x4')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x6927('0x4')],'defaultValue':0x0},'OrderBy':{'type':Sequelize['INTEGER'],'allowNull':!![],'defaultValue':0x0},'dialTimezone':{'type':Sequelize[_0x6927('0x1')]},'recallmeNotifiedDate':{'type':Sequelize[_0x6927('0x2')],'allowNull':!![],'defaultValue':null}};
\ No newline at end of file
+var _0x4d56=['contactListQueue','moment','sequelize','exports','STRING','format','INTEGER','DATE','UNSIGNED'];(function(_0x3120dd,_0x2602f7){var _0x377850=function(_0x35d6cc){while(--_0x35d6cc){_0x3120dd['push'](_0x3120dd['shift']());}};_0x377850(++_0x2602f7);}(_0x4d56,0x76));var _0x64d5=function(_0x2422be,_0x35efad){_0x2422be=_0x2422be-0x0;var _0x48ef89=_0x4d56[_0x2422be];return _0x48ef89;};'use strict';var moment=require(_0x64d5('0x0'));var Sequelize=require(_0x64d5('0x1'));module[_0x64d5('0x2')]={'phone':{'type':Sequelize[_0x64d5('0x3')],'allowNull':![]},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'scheduledat':{'type':Sequelize['DATE'],'defaultValue':moment()[_0x64d5('0x4')]('YYYY-MM-DD\x20HH:mm:ss')},'countbusyretry':{'type':Sequelize[_0x64d5('0x5')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x64d5('0x5')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x64d5('0x5')],'defaultValue':0x0},'callback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x64d5('0x3')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x64d5('0x6')]},'priority':{'type':Sequelize['INTEGER'](0x2)[_0x64d5('0x7')],'defaultValue':0x2,'validate':{'min':0x0,'max':0x4}},'recallme':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'ContactId':{'type':Sequelize[_0x64d5('0x5')],'unique':_0x64d5('0x8')},'ListId':{'type':Sequelize[_0x64d5('0x5')],'unique':_0x64d5('0x8')},'UserId':{'type':Sequelize[_0x64d5('0x5')]},'VoiceQueueId':{'type':Sequelize[_0x64d5('0x5')],'unique':_0x64d5('0x8')},'CampaignId':{'type':Sequelize[_0x64d5('0x5')]},'countnosuchnumberretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x64d5('0x5')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x64d5('0x5')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x64d5('0x5')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x64d5('0x5')],'defaultValue':0x0},'OrderBy':{'type':Sequelize[_0x64d5('0x5')],'allowNull':!![],'defaultValue':0x0},'dialTimezone':{'type':Sequelize[_0x64d5('0x3')]},'recallmeNotifiedDate':{'type':Sequelize[_0x64d5('0x6')],'allowNull':!![],'defaultValue':null}};
\ No newline at end of file
index ff38d51..cc4cb97 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7bae=['format','YYYY-MM-DD\x20HH:mm:ss','phone','campaigntype','queue','ivr','ContactId','firstName','lastName','isNil','calleridname','finally','CmHopperFinal','CmHopperAdditionalPhone','end','getPreview','CmContact','getVoiceQueues','outbound','dialOrderByScheduledAt','dialPreviewAutoRecallMe','value','direction','prev','isEmpty','hopperIds','ASC','scheduledAt','sequelize','literal','COALESCE(CmHopper.UserId,\x200)\x20ASC','priority','findOne','scheduledat','recallme','Contact','CmCompany','Company','CmList','List','VoiceQueue','Queue','dialActive','getPreviewRecall','LOCK','UPDATE','preview','isNumber','CmHopper,\x20%s,\x20%s,\x20%s','getOpenContacts','entity\x20not\x20found','getTimezones','timezones','push','utcOffset','../../components/parsers/qs','../../config/logger','../../config/environment','status','json','offset','undefined','limit','count','set','update','then','sendStatus','error','index','map','CmHopper','fieldName','type','key','name','keys','query','filters','intersection','model','concat','$and','$lte','$between','$notBetween','$in','$notIn','$like','$notLike','$iLike','$notILike','$overlap','$contained','$any','attributes','fields','hasOwnProperty','order','sort','pick','filter','merge','where','VIRTUAL','options','include','findAll','rows','catch','show','params','rawAttributes','length','includeAll','find','create','body','describe','destroy','VoiceQueueId','CampaignId','omit','dataValues','updatedAt','state','statedesc','campaign','user','deletedat'];(function(_0x41c381,_0x1176bd){var _0x427981=function(_0x508843){while(--_0x508843){_0x41c381['push'](_0x41c381['shift']());}};_0x427981(++_0x1176bd);}(_0x7bae,0x13b));var _0xe7ba=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7bae[_0x3dd15e];return _0x231fd0;};'use strict';var moment=require('moment');var _=require('lodash');var qs=require(_0xe7ba('0x0'));var logger=require(_0xe7ba('0x1'))('api');var shared=require(_0xe7ba('0x2'));var db=require('../../mysqldb')['db'];function respondWithResult(_0x120efa,_0x10908b){_0x10908b=_0x10908b||0xc8;return function(_0x166acb){if(_0x166acb){return _0x120efa[_0xe7ba('0x3')](_0x10908b)[_0xe7ba('0x4')](_0x166acb);}};}function respondWithFilteredResult(_0xfd3a22,_0x2d31df){return function(_0x3c5e59){if(_0x3c5e59){var _0x10b307=typeof _0x2d31df[_0xe7ba('0x5')]===_0xe7ba('0x6')&&typeof _0x2d31df[_0xe7ba('0x7')]===_0xe7ba('0x6');var _0x1b2693=_0x3c5e59['count'];var _0x3df8bf=_0x10b307?0x0:_0x2d31df[_0xe7ba('0x5')];var _0x375ebb=_0x10b307?_0x3c5e59[_0xe7ba('0x8')]:_0x2d31df[_0xe7ba('0x5')]+_0x2d31df[_0xe7ba('0x7')];var _0x99a86f;if(_0x375ebb>=_0x1b2693){_0x375ebb=_0x1b2693;_0x99a86f=0xc8;}else{_0x99a86f=0xce;}_0xfd3a22[_0xe7ba('0x3')](_0x99a86f);return _0xfd3a22[_0xe7ba('0x9')]('Content-Range',_0x3df8bf+'-'+_0x375ebb+'/'+_0x1b2693)[_0xe7ba('0x4')](_0x3c5e59);}return null;};}function saveUpdates(_0x588c8b,_0x602b1){return function(_0x45229c){if(_0x45229c){return _0x45229c[_0xe7ba('0xa')](_0x588c8b)[_0xe7ba('0xb')](function(_0x15d018){return _0x15d018;});}return null;};}function handleEntityNotFound(_0x41369f,_0x561dbb){return function(_0x561c48){if(!_0x561c48){_0x41369f[_0xe7ba('0xc')](0x194);}return _0x561c48;};}function handleError(_0x7ba72a,_0x359f6f){_0x359f6f=_0x359f6f||0x1f4;return function(_0x5d1d03){logger[_0xe7ba('0xd')](_0x5d1d03['stack']);if(_0x5d1d03['name']){delete _0x5d1d03['name'];}_0x7ba72a[_0xe7ba('0x3')](_0x359f6f)['send'](_0x5d1d03);};}exports[_0xe7ba('0xe')]=function(_0x4888d9,_0x4e3021){var _0x5a82b5={},_0x3f326a={},_0x30086c={'count':0x0,'rows':[]};var _0x39ca38=_[_0xe7ba('0xf')](db[_0xe7ba('0x10')]['rawAttributes'],function(_0x149c62){return{'name':_0x149c62[_0xe7ba('0x11')],'type':_0x149c62[_0xe7ba('0x12')][_0xe7ba('0x13')]};});_0x3f326a['model']=_[_0xe7ba('0xf')](_0x39ca38,_0xe7ba('0x14'));_0x3f326a['query']=_[_0xe7ba('0x15')](_0x4888d9[_0xe7ba('0x16')]);_0x3f326a[_0xe7ba('0x17')]=_[_0xe7ba('0x18')](_0x3f326a[_0xe7ba('0x19')],_0x3f326a[_0xe7ba('0x16')]);_0x3f326a[_0xe7ba('0x17')]=_[_0xe7ba('0x1a')](_0x3f326a[_0xe7ba('0x17')],[_0xe7ba('0x1b'),'$or','$gt','$gte','$lt',_0xe7ba('0x1c'),'$ne','$eq','$not',_0xe7ba('0x1d'),_0xe7ba('0x1e'),_0xe7ba('0x1f'),_0xe7ba('0x20'),_0xe7ba('0x21'),_0xe7ba('0x22'),_0xe7ba('0x23'),_0xe7ba('0x24'),'$like',_0xe7ba('0x25'),'$contains',_0xe7ba('0x26'),_0xe7ba('0x27')]);_0x5a82b5[_0xe7ba('0x28')]=_['intersection'](_0x3f326a['model'],qs[_0xe7ba('0x29')](_0x4888d9[_0xe7ba('0x16')][_0xe7ba('0x29')]));_0x5a82b5[_0xe7ba('0x28')]=_0x5a82b5[_0xe7ba('0x28')]['length']?_0x5a82b5[_0xe7ba('0x28')]:_0x3f326a[_0xe7ba('0x19')];if(!_0x4888d9['query'][_0xe7ba('0x2a')]('nolimit')){_0x5a82b5['limit']=qs[_0xe7ba('0x7')](_0x4888d9[_0xe7ba('0x16')][_0xe7ba('0x7')]);_0x5a82b5['offset']=qs[_0xe7ba('0x5')](_0x4888d9['query'][_0xe7ba('0x5')]);}_0x5a82b5[_0xe7ba('0x2b')]=qs[_0xe7ba('0x2c')](_0x4888d9[_0xe7ba('0x16')][_0xe7ba('0x2c')]);_0x5a82b5['where']=qs[_0xe7ba('0x17')](_[_0xe7ba('0x2d')](_0x4888d9['query'],_0x3f326a[_0xe7ba('0x17')]),_0x39ca38);if(_0x4888d9[_0xe7ba('0x16')][_0xe7ba('0x2e')]){_0x5a82b5['where']=_[_0xe7ba('0x2f')](_0x5a82b5[_0xe7ba('0x30')],{'$or':_['map'](_0x39ca38,function(_0x3e850e){if(_0x3e850e[_0xe7ba('0x12')]!==_0xe7ba('0x31')){var _0x4c1325={};_0x4c1325[_0x3e850e[_0xe7ba('0x14')]]={'$like':'%'+_0x4888d9[_0xe7ba('0x16')]['filter']+'%'};return _0x4c1325;}})});}_0x5a82b5=_[_0xe7ba('0x2f')]({},_0x5a82b5,_0x4888d9[_0xe7ba('0x32')]);var _0x8a5776={'where':_0x5a82b5['where']};return db['CmHopper'][_0xe7ba('0x8')](_0x8a5776)[_0xe7ba('0xb')](function(_0x58d2a){_0x30086c[_0xe7ba('0x8')]=_0x58d2a;if(_0x4888d9[_0xe7ba('0x16')]['includeAll']){_0x5a82b5[_0xe7ba('0x33')]=[{'all':!![]}];}return db[_0xe7ba('0x10')][_0xe7ba('0x34')](_0x5a82b5);})[_0xe7ba('0xb')](function(_0x5e9619){_0x30086c[_0xe7ba('0x35')]=_0x5e9619;return _0x30086c;})[_0xe7ba('0xb')](respondWithFilteredResult(_0x4e3021,_0x5a82b5))[_0xe7ba('0x36')](handleError(_0x4e3021,null));};exports[_0xe7ba('0x37')]=function(_0x35a5f3,_0x3793c6){var _0x124cc4={'raw':!![],'where':{'id':_0x35a5f3[_0xe7ba('0x38')]['id']}},_0x4e22f3={};_0x4e22f3[_0xe7ba('0x19')]=_[_0xe7ba('0x15')](db[_0xe7ba('0x10')][_0xe7ba('0x39')]);_0x4e22f3[_0xe7ba('0x16')]=_[_0xe7ba('0x15')](_0x35a5f3[_0xe7ba('0x16')]);_0x4e22f3[_0xe7ba('0x17')]=_['intersection'](_0x4e22f3[_0xe7ba('0x19')],_0x4e22f3[_0xe7ba('0x16')]);_0x124cc4['attributes']=_['intersection'](_0x4e22f3[_0xe7ba('0x19')],qs[_0xe7ba('0x29')](_0x35a5f3[_0xe7ba('0x16')]['fields']));_0x124cc4[_0xe7ba('0x28')]=_0x124cc4[_0xe7ba('0x28')][_0xe7ba('0x3a')]?_0x124cc4[_0xe7ba('0x28')]:_0x4e22f3[_0xe7ba('0x19')];if(_0x35a5f3['query'][_0xe7ba('0x3b')]){_0x124cc4['include']=[{'all':!![]}];}_0x124cc4=_[_0xe7ba('0x2f')]({},_0x124cc4,_0x35a5f3[_0xe7ba('0x32')]);return db[_0xe7ba('0x10')][_0xe7ba('0x3c')](_0x124cc4)[_0xe7ba('0xb')](handleEntityNotFound(_0x3793c6,null))[_0xe7ba('0xb')](respondWithResult(_0x3793c6,null))[_0xe7ba('0x36')](handleError(_0x3793c6,null));};exports[_0xe7ba('0x3d')]=function(_0x51e6f1,_0x42f4c3){return db[_0xe7ba('0x10')][_0xe7ba('0x3d')](_0x51e6f1[_0xe7ba('0x3e')],{})[_0xe7ba('0xb')](respondWithResult(_0x42f4c3,0xc9))[_0xe7ba('0x36')](handleError(_0x42f4c3,null));};exports[_0xe7ba('0xa')]=function(_0x2c54ac,_0x45f49a){if(_0x2c54ac[_0xe7ba('0x3e')]['id']){delete _0x2c54ac['body']['id'];}return db[_0xe7ba('0x10')]['find']({'where':{'id':_0x2c54ac[_0xe7ba('0x38')]['id']}})[_0xe7ba('0xb')](handleEntityNotFound(_0x45f49a,null))[_0xe7ba('0xb')](saveUpdates(_0x2c54ac[_0xe7ba('0x3e')],null))[_0xe7ba('0xb')](respondWithResult(_0x45f49a,null))[_0xe7ba('0x36')](handleError(_0x45f49a,null));};exports['describe']=function(_0x271592,_0x1cc668){return db[_0xe7ba('0x10')][_0xe7ba('0x3f')]()[_0xe7ba('0xb')](respondWithResult(_0x1cc668,null))[_0xe7ba('0x36')](handleError(_0x1cc668,null));};exports[_0xe7ba('0x40')]=function(_0x266ace,_0x272cb9){var _0x1189bd;var _0xbe2a32=_0x266ace['params']['id'];return db[_0xe7ba('0x10')][_0xe7ba('0x3c')]({'where':{'id':_0x266ace[_0xe7ba('0x38')]['id']}})[_0xe7ba('0xb')](handleEntityNotFound(_0x272cb9,null))[_0xe7ba('0xb')](function(_0x1fd246){if(_0x1fd246){return _0x1fd246['destroy']()[_0xe7ba('0xb')](function(_0x3ee828){return _0x3ee828;});}})['then'](function(_0x330ebd){_0x1189bd=_0x330ebd;if(_0x330ebd){if(_0x330ebd[_0xe7ba('0x41')]||_0x330ebd[_0xe7ba('0x42')]){return db[_0x330ebd[_0xe7ba('0x41')]?'VoiceQueue':'Campaign'][_0xe7ba('0x3c')]({'where':{'id':_0x330ebd[_0xe7ba('0x41')]?_0x330ebd[_0xe7ba('0x41')]:_0x330ebd['CampaignId']},'attributes':['id',_0xe7ba('0x14')],'raw':!![]});}}})[_0xe7ba('0xb')](function(_0x377877){var _0x45bcbd={};if(_0x377877){_[_0xe7ba('0x2f')](_0x45bcbd,_[_0xe7ba('0x43')](_0x1189bd[_0xe7ba('0x44')],['createdAt',_0xe7ba('0x45'),'id']));_0x45bcbd[_0xe7ba('0x46')]=0x15;_0x45bcbd[_0xe7ba('0x47')]='deleted';_0x45bcbd[_0xe7ba('0x48')]=_0x377877[_0xe7ba('0x14')];_0x45bcbd['membername']=_0x266ace[_0xe7ba('0x49')][_0xe7ba('0x14')];_0x45bcbd['UserId']=_0x266ace[_0xe7ba('0x49')]['id'];_0x45bcbd['deleted']=!![];_0x45bcbd[_0xe7ba('0x4a')]=moment()[_0xe7ba('0x4b')](_0xe7ba('0x4c'));_0x45bcbd['calleridnum']=_0x1189bd[_0xe7ba('0x4d')];_0x45bcbd[_0xe7ba('0x4e')]=_0x1189bd[_0xe7ba('0x41')]?_0xe7ba('0x4f'):_0xe7ba('0x50');return db['CmContact'][_0xe7ba('0x3c')]({'where':{'id':_0x45bcbd[_0xe7ba('0x51')]},'attributes':[_0xe7ba('0x52'),_0xe7ba('0x53')]})[_0xe7ba('0xb')](function(_0x50aecc){if(!_[_0xe7ba('0x54')](_0x272cb9)&&!_[_0xe7ba('0x54')](_0x50aecc[_0xe7ba('0x52')])){_0x45bcbd[_0xe7ba('0x55')]=_0x50aecc['firstName'];if(!_[_0xe7ba('0x54')](_0x50aecc[_0xe7ba('0x53')])){_0x45bcbd[_0xe7ba('0x55')]+='\x20'+_0x50aecc[_0xe7ba('0x53')];}}})[_0xe7ba('0x56')](function(){return db[_0xe7ba('0x57')]['create'](_0x45bcbd);});}})[_0xe7ba('0xb')](function(_0x103762){return db[_0xe7ba('0x58')]['destroy']({'where':{'CmHopperId':_0xbe2a32}});})[_0xe7ba('0xb')](function(){return _0x272cb9[_0xe7ba('0x3')](0xcc)[_0xe7ba('0x59')]();})[_0xe7ba('0x36')](handleError(_0x272cb9,null));};exports[_0xe7ba('0x5a')]=function(_0x162d7f,_0x3a7bfb){var _0x3351d5=[];return db[_0xe7ba('0x5b')][_0xe7ba('0x3f')]()[_0xe7ba('0xb')](function(_0x27422d){_0x3351d5=_['keys'](_0x27422d);return _0x162d7f[_0xe7ba('0x49')][_0xe7ba('0x5c')]({'where':{'type':_0xe7ba('0x5d'),'dialActive':!![],'dialMethod':'preview'},'attributes':['id',_0xe7ba('0x5e'),'dialPreviewAutoRecallMe'],'raw':!![]});})[_0xe7ba('0xb')](function(_0x194dff){if(_0x194dff&&_0x194dff[_0xe7ba('0x3a')]){return db['sequelize']['transaction'](function(_0x46d06e){var _0x2812af={'active':![],'recallme':![],'scheduledAt':{'$lte':moment()[_0xe7ba('0x4b')]('YYYY-MM-DD\x20HH:mm:ss')},'VoiceQueueId':{'$in':_[_0xe7ba('0xf')](_0x194dff,'id')},'$or':[{'UserId':null},{'UserId':_0x162d7f[_0xe7ba('0x49')]['id']}]};var _0x3fe82a={'active':![],'recallme':!![],'VoiceQueueId':{'$in':_(_0x194dff)[_0xe7ba('0x2e')]([_0xe7ba('0x5f'),0x0])['map']('id')[_0xe7ba('0x60')]()},'$or':[{'UserId':null},{'UserId':_0x162d7f[_0xe7ba('0x49')]['id']}]};var _0x70ce9c={'$or':[_0x2812af,_0x3fe82a]};var _0x50cc8b=[];if(_0x162d7f[_0xe7ba('0x3e')][_0xe7ba('0x61')]&&_0x162d7f[_0xe7ba('0x3e')][_0xe7ba('0x61')]===_0xe7ba('0x62')){if(!_[_0xe7ba('0x63')](_0x162d7f[_0xe7ba('0x3e')][_0xe7ba('0x64')])){_0x70ce9c['id']={'$in':_0x162d7f[_0xe7ba('0x3e')][_0xe7ba('0x64')]};}_0x50cc8b=[['priority',_0xe7ba('0x65')],[_0xe7ba('0x66'),_0x194dff[0x0][_0xe7ba('0x5e')]===_0xe7ba('0x65')?'DESC':'ASC'],db[_0xe7ba('0x67')][_0xe7ba('0x68')](_0xe7ba('0x69')),['id','DESC']];}else{if(!_['isEmpty'](_0x162d7f['body'][_0xe7ba('0x64')])){_0x70ce9c['id']={'$notIn':_0x162d7f[_0xe7ba('0x3e')]['hopperIds']};}_0x50cc8b=[[_0xe7ba('0x6a'),'DESC'],[_0xe7ba('0x66'),_0x194dff[0x0]['dialOrderByScheduledAt']],db[_0xe7ba('0x67')]['literal']('COALESCE(CmHopper.UserId,\x200)\x20DESC'),['id',_0xe7ba('0x65')]];}return db[_0xe7ba('0x10')][_0xe7ba('0x6b')]({'attributes':['id',_0xe7ba('0x6c'),_0xe7ba('0x4d'),_0xe7ba('0x6d')],'where':_0x70ce9c,'order':_0x50cc8b,'transaction':_0x46d06e,'lock':_0x46d06e['LOCK']['UPDATE'],'include':[{'model':db[_0xe7ba('0x5b')],'as':_0xe7ba('0x6e'),'attributes':_0x3351d5,'include':[{'model':db[_0xe7ba('0x6f')],'as':_0xe7ba('0x70'),'attributes':['id',_0xe7ba('0x14')]}]},{'model':db[_0xe7ba('0x71')],'as':_0xe7ba('0x72'),'attributes':['id',_0xe7ba('0x14')]},{'model':db[_0xe7ba('0x73')],'as':_0xe7ba('0x74'),'attributes':['id',_0xe7ba('0x14'),_0xe7ba('0x75')]}]})[_0xe7ba('0xb')](function(_0x2e31df){if(_0x2e31df){return _0x2e31df[_0xe7ba('0xa')]({'UserId':_0x162d7f['user']['id']},{'transaction':_0x46d06e});}});});}})[_0xe7ba('0xb')](handleEntityNotFound(_0x3a7bfb,null))[_0xe7ba('0xb')](respondWithResult(_0x3a7bfb,null))[_0xe7ba('0x36')](handleError(_0x3a7bfb,null));};exports[_0xe7ba('0x76')]=function(_0x1f149c,_0x3ff0e6,_0x2471c8){var _0x11ca03=[];var _0x2044db=_0x1f149c[_0xe7ba('0x38')]['id'];var _0x418831=_0x1f149c[_0xe7ba('0x49')]['id'];return db['CmContact'][_0xe7ba('0x3f')]()['then'](function(_0x27a939){_0x11ca03=_[_0xe7ba('0x15')](_0x27a939);return db[_0xe7ba('0x67')]['transaction'](function(_0x156b66){const _0x40eb35={'id':_0x2044db};return db[_0xe7ba('0x10')][_0xe7ba('0x6b')]({'attributes':['id','scheduledat',_0xe7ba('0x6d')],'where':_0x40eb35,'transaction':_0x156b66,'lock':_0x156b66[_0xe7ba('0x77')][_0xe7ba('0x78')],'include':[{'model':db[_0xe7ba('0x5b')],'as':'Contact','attributes':_0x11ca03,'include':[{'model':db[_0xe7ba('0x6f')],'as':_0xe7ba('0x70'),'attributes':['id',_0xe7ba('0x14')]}]},{'model':db[_0xe7ba('0x71')],'as':_0xe7ba('0x72'),'attributes':['id','name']},{'model':db['VoiceQueue'],'as':'Queue','attributes':['id',_0xe7ba('0x14'),_0xe7ba('0x75')]}]})[_0xe7ba('0xb')](function(_0x27e7a5){if(_0x27e7a5){return _0x27e7a5[_0xe7ba('0xa')]({'UserId':_0x418831},{'transaction':_0x156b66});}});});})[_0xe7ba('0xb')](handleEntityNotFound(_0x3ff0e6,null))['then'](respondWithResult(_0x3ff0e6,null))[_0xe7ba('0x36')](handleError(_0x3ff0e6,null));};exports['getOpenContacts']=function(_0x439c96,_0x2e3e28){return _0x439c96[_0xe7ba('0x49')][_0xe7ba('0x5c')]({'where':{'type':_0xe7ba('0x5d'),'dialActive':!![],'dialMethod':_0xe7ba('0x79')},'attributes':['id'],'raw':!![]})['then'](function(_0x44563b){if(_0x44563b&&_0x44563b[_0xe7ba('0x3a')]){return db[_0xe7ba('0x10')][_0xe7ba('0x8')]({'where':{'active':![],'recallme':![],'scheduledAt':{'$lte':moment()[_0xe7ba('0x4b')]('YYYY-MM-DD\x20HH:mm:ss')},'VoiceQueueId':{'$in':_[_0xe7ba('0xf')](_0x44563b,'id')},'$or':[{'UserId':null},{'UserId':_0x439c96['user']['id']}]}});}return 0x0;})[_0xe7ba('0xb')](function(_0x157686){if(!_[_0xe7ba('0x54')](_0x157686)&&_[_0xe7ba('0x7a')](_0x157686)){return _0x2e3e28[_0xe7ba('0x3')](0xc8)[_0xe7ba('0x4')]({'contacts':_0x157686});}else{logger[_0xe7ba('0xd')](_0xe7ba('0x7b'),_0xe7ba('0x7c'),0x194,_0xe7ba('0x7d'));_0x2e3e28[_0xe7ba('0xc')](0x194);}})[_0xe7ba('0x36')](handleError(_0x2e3e28,null));};exports[_0xe7ba('0x7e')]=function(_0x167996,_0x3129e5){var _0x27eb0e=shared[_0xe7ba('0x7f')];var _0x158615=[];_[_0xe7ba('0xf')](_0x27eb0e,function(_0x1b39b7){_0x158615[_0xe7ba('0x80')]({'id':_0x1b39b7[_0xe7ba('0x14')],'name':_0x1b39b7[_0xe7ba('0x14')],'utcOffset':_0x1b39b7[_0xe7ba('0x81')]});});return _0x3129e5[_0xe7ba('0x3')](0xc8)['json']({'tz':_0x158615});};exports['getTimezone']=function(_0x5889b9,_0xaccf6e){var _0x2ecfac=shared['timezones'];var _0x5ad36f={};if(!_[_0xe7ba('0x54')](_0x2ecfac[_0x5889b9[_0xe7ba('0x3e')]['id']]))_0x5ad36f=_0x2ecfac[_0x5889b9['body']['id']];return _0xaccf6e[_0xe7ba('0x3')](0xc8)['json'](_0x5ad36f);};
\ No newline at end of file
+var _0x6f47=['VoiceQueue','Campaign','CampaignId','omit','dataValues','createdAt','updatedAt','statedesc','deleted','campaign','user','UserId','format','YYYY-MM-DD\x20HH:mm:ss','calleridnum','campaigntype','queue','ContactId','isNil','firstName','calleridname','lastName','CmHopperFinal','create','end','getPreview','getVoiceQueues','outbound','dialOrderByScheduledAt','dialPreviewAutoRecallMe','sequelize','transaction','value','body','direction','prev','isEmpty','priority','ASC','scheduledAt','DESC','literal','COALESCE(CmHopper.UserId,\x200)\x20ASC','hopperIds','COALESCE(CmHopper.UserId,\x200)\x20DESC','findOne','scheduledat','phone','recallme','LOCK','UPDATE','Contact','CmCompany','Company','List','dialActive','getPreviewRecall','CmContact','CmList','getOpenContacts','preview','isNumber','CmHopper,\x20%s,\x20%s,\x20%s','entity\x20not\x20found','sendStatus','getTimezones','timezones','push','getTimezone','lodash','../../components/parsers/qs','api','../../mysqldb','status','json','undefined','limit','count','set','Content-Range','update','error','stack','name','send','index','map','CmHopper','rawAttributes','fieldName','type','model','query','keys','filters','concat','$and','$or','$lt','$ne','$notBetween','$in','$notIn','$like','$notLike','$iLike','$any','attributes','intersection','length','nolimit','offset','order','sort','filter','where','VIRTUAL','merge','options','then','includeAll','include','show','params','fields','find','catch','describe','destroy','VoiceQueueId'];(function(_0x4ab3b8,_0x1d5595){var _0x4416d8=function(_0x3f3945){while(--_0x3f3945){_0x4ab3b8['push'](_0x4ab3b8['shift']());}};_0x4416d8(++_0x1d5595);}(_0x6f47,0xc7));var _0x76f4=function(_0x2faddb,_0xc18b78){_0x2faddb=_0x2faddb-0x0;var _0x273c05=_0x6f47[_0x2faddb];return _0x273c05;};'use strict';var moment=require('moment');var _=require(_0x76f4('0x0'));var qs=require(_0x76f4('0x1'));var logger=require('../../config/logger')(_0x76f4('0x2'));var shared=require('../../config/environment');var db=require(_0x76f4('0x3'))['db'];function respondWithResult(_0x47d3e1,_0xe214ad){_0xe214ad=_0xe214ad||0xc8;return function(_0xc5dddc){if(_0xc5dddc){return _0x47d3e1[_0x76f4('0x4')](_0xe214ad)[_0x76f4('0x5')](_0xc5dddc);}};}function respondWithFilteredResult(_0x5754ca,_0x35602f){return function(_0xfc2405){if(_0xfc2405){var _0x2176a7=typeof _0x35602f['offset']===_0x76f4('0x6')&&typeof _0x35602f[_0x76f4('0x7')]===_0x76f4('0x6');var _0xf9b468=_0xfc2405[_0x76f4('0x8')];var _0x4c6b5c=_0x2176a7?0x0:_0x35602f['offset'];var _0x3347ef=_0x2176a7?_0xfc2405[_0x76f4('0x8')]:_0x35602f['offset']+_0x35602f['limit'];var _0x3d8554;if(_0x3347ef>=_0xf9b468){_0x3347ef=_0xf9b468;_0x3d8554=0xc8;}else{_0x3d8554=0xce;}_0x5754ca[_0x76f4('0x4')](_0x3d8554);return _0x5754ca[_0x76f4('0x9')](_0x76f4('0xa'),_0x4c6b5c+'-'+_0x3347ef+'/'+_0xf9b468)[_0x76f4('0x5')](_0xfc2405);}return null;};}function saveUpdates(_0xafd21e,_0xf7e347){return function(_0x3ec740){if(_0x3ec740){return _0x3ec740[_0x76f4('0xb')](_0xafd21e)['then'](function(_0x41ba00){return _0x41ba00;});}return null;};}function handleEntityNotFound(_0x30dabf,_0x5da1ff){return function(_0x4b6021){if(!_0x4b6021){_0x30dabf['sendStatus'](0x194);}return _0x4b6021;};}function handleError(_0x1d7755,_0x3dd240){_0x3dd240=_0x3dd240||0x1f4;return function(_0x979946){logger[_0x76f4('0xc')](_0x979946[_0x76f4('0xd')]);if(_0x979946[_0x76f4('0xe')]){delete _0x979946[_0x76f4('0xe')];}_0x1d7755[_0x76f4('0x4')](_0x3dd240)[_0x76f4('0xf')](_0x979946);};}exports[_0x76f4('0x10')]=function(_0x672960,_0x2d4bd1){var _0x214bef={},_0x38450e={},_0x17625e={'count':0x0,'rows':[]};var _0x397360=_[_0x76f4('0x11')](db[_0x76f4('0x12')][_0x76f4('0x13')],function(_0x35b406){return{'name':_0x35b406[_0x76f4('0x14')],'type':_0x35b406[_0x76f4('0x15')]['key']};});_0x38450e[_0x76f4('0x16')]=_['map'](_0x397360,_0x76f4('0xe'));_0x38450e[_0x76f4('0x17')]=_[_0x76f4('0x18')](_0x672960['query']);_0x38450e['filters']=_['intersection'](_0x38450e[_0x76f4('0x16')],_0x38450e[_0x76f4('0x17')]);_0x38450e[_0x76f4('0x19')]=_[_0x76f4('0x1a')](_0x38450e[_0x76f4('0x19')],[_0x76f4('0x1b'),_0x76f4('0x1c'),'$gt','$gte',_0x76f4('0x1d'),'$lte',_0x76f4('0x1e'),'$eq','$not','$between',_0x76f4('0x1f'),_0x76f4('0x20'),_0x76f4('0x21'),_0x76f4('0x22'),_0x76f4('0x23'),_0x76f4('0x24'),'$notILike',_0x76f4('0x22'),'$overlap','$contains','$contained',_0x76f4('0x25')]);_0x214bef[_0x76f4('0x26')]=_[_0x76f4('0x27')](_0x38450e[_0x76f4('0x16')],qs['fields'](_0x672960[_0x76f4('0x17')]['fields']));_0x214bef[_0x76f4('0x26')]=_0x214bef[_0x76f4('0x26')][_0x76f4('0x28')]?_0x214bef[_0x76f4('0x26')]:_0x38450e[_0x76f4('0x16')];if(!_0x672960['query']['hasOwnProperty'](_0x76f4('0x29'))){_0x214bef[_0x76f4('0x7')]=qs[_0x76f4('0x7')](_0x672960[_0x76f4('0x17')][_0x76f4('0x7')]);_0x214bef[_0x76f4('0x2a')]=qs[_0x76f4('0x2a')](_0x672960[_0x76f4('0x17')][_0x76f4('0x2a')]);}_0x214bef[_0x76f4('0x2b')]=qs[_0x76f4('0x2c')](_0x672960[_0x76f4('0x17')]['sort']);_0x214bef['where']=qs['filters'](_['pick'](_0x672960[_0x76f4('0x17')],_0x38450e[_0x76f4('0x19')]),_0x397360);if(_0x672960[_0x76f4('0x17')][_0x76f4('0x2d')]){_0x214bef[_0x76f4('0x2e')]=_['merge'](_0x214bef[_0x76f4('0x2e')],{'$or':_[_0x76f4('0x11')](_0x397360,function(_0x37a233){if(_0x37a233[_0x76f4('0x15')]!==_0x76f4('0x2f')){var _0x23278f={};_0x23278f[_0x37a233[_0x76f4('0xe')]]={'$like':'%'+_0x672960[_0x76f4('0x17')][_0x76f4('0x2d')]+'%'};return _0x23278f;}})});}_0x214bef=_[_0x76f4('0x30')]({},_0x214bef,_0x672960[_0x76f4('0x31')]);var _0x244607={'where':_0x214bef[_0x76f4('0x2e')]};return db[_0x76f4('0x12')][_0x76f4('0x8')](_0x244607)[_0x76f4('0x32')](function(_0x3308e3){_0x17625e[_0x76f4('0x8')]=_0x3308e3;if(_0x672960['query'][_0x76f4('0x33')]){_0x214bef[_0x76f4('0x34')]=[{'all':!![]}];}return db[_0x76f4('0x12')]['findAll'](_0x214bef);})['then'](function(_0x237fba){_0x17625e['rows']=_0x237fba;return _0x17625e;})[_0x76f4('0x32')](respondWithFilteredResult(_0x2d4bd1,_0x214bef))['catch'](handleError(_0x2d4bd1,null));};exports[_0x76f4('0x35')]=function(_0x16f36d,_0x312243){var _0x378675={'raw':!![],'where':{'id':_0x16f36d[_0x76f4('0x36')]['id']}},_0x2c0b76={};_0x2c0b76[_0x76f4('0x16')]=_[_0x76f4('0x18')](db[_0x76f4('0x12')][_0x76f4('0x13')]);_0x2c0b76['query']=_['keys'](_0x16f36d[_0x76f4('0x17')]);_0x2c0b76[_0x76f4('0x19')]=_[_0x76f4('0x27')](_0x2c0b76[_0x76f4('0x16')],_0x2c0b76[_0x76f4('0x17')]);_0x378675[_0x76f4('0x26')]=_[_0x76f4('0x27')](_0x2c0b76[_0x76f4('0x16')],qs[_0x76f4('0x37')](_0x16f36d['query'][_0x76f4('0x37')]));_0x378675[_0x76f4('0x26')]=_0x378675['attributes']['length']?_0x378675[_0x76f4('0x26')]:_0x2c0b76[_0x76f4('0x16')];if(_0x16f36d[_0x76f4('0x17')][_0x76f4('0x33')]){_0x378675[_0x76f4('0x34')]=[{'all':!![]}];}_0x378675=_['merge']({},_0x378675,_0x16f36d[_0x76f4('0x31')]);return db[_0x76f4('0x12')][_0x76f4('0x38')](_0x378675)[_0x76f4('0x32')](handleEntityNotFound(_0x312243,null))[_0x76f4('0x32')](respondWithResult(_0x312243,null))[_0x76f4('0x39')](handleError(_0x312243,null));};exports['create']=function(_0x317c91,_0x2795db){return db[_0x76f4('0x12')]['create'](_0x317c91['body'],{})[_0x76f4('0x32')](respondWithResult(_0x2795db,0xc9))[_0x76f4('0x39')](handleError(_0x2795db,null));};exports[_0x76f4('0xb')]=function(_0x2bea6d,_0x36fa03){if(_0x2bea6d['body']['id']){delete _0x2bea6d['body']['id'];}return db[_0x76f4('0x12')]['find']({'where':{'id':_0x2bea6d[_0x76f4('0x36')]['id']}})[_0x76f4('0x32')](handleEntityNotFound(_0x36fa03,null))['then'](saveUpdates(_0x2bea6d['body'],null))[_0x76f4('0x32')](respondWithResult(_0x36fa03,null))[_0x76f4('0x39')](handleError(_0x36fa03,null));};exports[_0x76f4('0x3a')]=function(_0x217d3a,_0x55e4cc){return db[_0x76f4('0x12')][_0x76f4('0x3a')]()[_0x76f4('0x32')](respondWithResult(_0x55e4cc,null))['catch'](handleError(_0x55e4cc,null));};exports[_0x76f4('0x3b')]=function(_0x6bbcf2,_0x535eca){var _0x56d905;var _0x4ab620=_0x6bbcf2[_0x76f4('0x36')]['id'];return db[_0x76f4('0x12')][_0x76f4('0x38')]({'where':{'id':_0x6bbcf2[_0x76f4('0x36')]['id']}})['then'](handleEntityNotFound(_0x535eca,null))[_0x76f4('0x32')](function(_0x597de5){if(_0x597de5){return _0x597de5[_0x76f4('0x3b')]()[_0x76f4('0x32')](function(_0x270baf){return _0x270baf;});}})['then'](function(_0x312319){_0x56d905=_0x312319;if(_0x312319){if(_0x312319[_0x76f4('0x3c')]||_0x312319['CampaignId']){return db[_0x312319[_0x76f4('0x3c')]?_0x76f4('0x3d'):_0x76f4('0x3e')][_0x76f4('0x38')]({'where':{'id':_0x312319[_0x76f4('0x3c')]?_0x312319['VoiceQueueId']:_0x312319[_0x76f4('0x3f')]},'attributes':['id','name'],'raw':!![]});}}})[_0x76f4('0x32')](function(_0x38dc69){var _0x154ba={};if(_0x38dc69){_['merge'](_0x154ba,_[_0x76f4('0x40')](_0x56d905[_0x76f4('0x41')],[_0x76f4('0x42'),_0x76f4('0x43'),'id']));_0x154ba['state']=0x15;_0x154ba[_0x76f4('0x44')]=_0x76f4('0x45');_0x154ba[_0x76f4('0x46')]=_0x38dc69[_0x76f4('0xe')];_0x154ba['membername']=_0x6bbcf2[_0x76f4('0x47')]['name'];_0x154ba[_0x76f4('0x48')]=_0x6bbcf2[_0x76f4('0x47')]['id'];_0x154ba['deleted']=!![];_0x154ba['deletedat']=moment()[_0x76f4('0x49')](_0x76f4('0x4a'));_0x154ba[_0x76f4('0x4b')]=_0x56d905['phone'];_0x154ba[_0x76f4('0x4c')]=_0x56d905[_0x76f4('0x3c')]?_0x76f4('0x4d'):'ivr';return db['CmContact'][_0x76f4('0x38')]({'where':{'id':_0x154ba[_0x76f4('0x4e')]},'attributes':['firstName','lastName']})[_0x76f4('0x32')](function(_0x34a5d1){if(!_[_0x76f4('0x4f')](_0x535eca)&&!_[_0x76f4('0x4f')](_0x34a5d1[_0x76f4('0x50')])){_0x154ba[_0x76f4('0x51')]=_0x34a5d1[_0x76f4('0x50')];if(!_[_0x76f4('0x4f')](_0x34a5d1[_0x76f4('0x52')])){_0x154ba['calleridname']+='\x20'+_0x34a5d1['lastName'];}}})['finally'](function(){return db[_0x76f4('0x53')][_0x76f4('0x54')](_0x154ba);});}})[_0x76f4('0x32')](function(_0x3b6c16){return db['CmHopperAdditionalPhone']['destroy']({'where':{'CmHopperId':_0x4ab620}});})[_0x76f4('0x32')](function(){return _0x535eca['status'](0xcc)[_0x76f4('0x55')]();})['catch'](handleError(_0x535eca,null));};exports[_0x76f4('0x56')]=function(_0x25e510,_0x3984d3){var _0x3317a4=[];return db['CmContact'][_0x76f4('0x3a')]()[_0x76f4('0x32')](function(_0x22a0cc){_0x3317a4=_[_0x76f4('0x18')](_0x22a0cc);return _0x25e510[_0x76f4('0x47')][_0x76f4('0x57')]({'where':{'type':_0x76f4('0x58'),'dialActive':!![],'dialMethod':'preview'},'attributes':['id',_0x76f4('0x59'),_0x76f4('0x5a')],'raw':!![]});})[_0x76f4('0x32')](function(_0x320a87){if(_0x320a87&&_0x320a87[_0x76f4('0x28')]){return db[_0x76f4('0x5b')][_0x76f4('0x5c')](function(_0x551d38){var _0x5724c3={'active':![],'recallme':![],'scheduledAt':{'$lte':moment()['format'](_0x76f4('0x4a'))},'VoiceQueueId':{'$in':_[_0x76f4('0x11')](_0x320a87,'id')},'$or':[{'UserId':null},{'UserId':_0x25e510[_0x76f4('0x47')]['id']}]};var _0x5f0dc2={'active':![],'recallme':!![],'VoiceQueueId':{'$in':_(_0x320a87)[_0x76f4('0x2d')](['dialPreviewAutoRecallMe',0x0])[_0x76f4('0x11')]('id')[_0x76f4('0x5d')]()},'$or':[{'UserId':null},{'UserId':_0x25e510['user']['id']}]};var _0xda0ac2={'$or':[_0x5724c3,_0x5f0dc2]};var _0x37b7f7=[];if(_0x25e510[_0x76f4('0x5e')][_0x76f4('0x5f')]&&_0x25e510[_0x76f4('0x5e')][_0x76f4('0x5f')]===_0x76f4('0x60')){if(!_[_0x76f4('0x61')](_0x25e510[_0x76f4('0x5e')]['hopperIds'])){_0xda0ac2['id']={'$in':_0x25e510[_0x76f4('0x5e')]['hopperIds']};}_0x37b7f7=[[_0x76f4('0x62'),_0x76f4('0x63')],[_0x76f4('0x64'),_0x320a87[0x0][_0x76f4('0x59')]===_0x76f4('0x63')?_0x76f4('0x65'):_0x76f4('0x63')],db[_0x76f4('0x5b')][_0x76f4('0x66')](_0x76f4('0x67')),['id','DESC']];}else{if(!_[_0x76f4('0x61')](_0x25e510[_0x76f4('0x5e')]['hopperIds'])){_0xda0ac2['id']={'$notIn':_0x25e510[_0x76f4('0x5e')][_0x76f4('0x68')]};}_0x37b7f7=[[_0x76f4('0x62'),'DESC'],[_0x76f4('0x64'),_0x320a87[0x0][_0x76f4('0x59')]],db[_0x76f4('0x5b')]['literal'](_0x76f4('0x69')),['id',_0x76f4('0x63')]];}return db[_0x76f4('0x12')][_0x76f4('0x6a')]({'attributes':['id',_0x76f4('0x6b'),_0x76f4('0x6c'),_0x76f4('0x6d')],'where':_0xda0ac2,'order':_0x37b7f7,'transaction':_0x551d38,'lock':_0x551d38[_0x76f4('0x6e')][_0x76f4('0x6f')],'include':[{'model':db['CmContact'],'as':_0x76f4('0x70'),'attributes':_0x3317a4,'include':[{'model':db[_0x76f4('0x71')],'as':_0x76f4('0x72'),'attributes':['id',_0x76f4('0xe')]}]},{'model':db['CmList'],'as':_0x76f4('0x73'),'attributes':['id',_0x76f4('0xe')]},{'model':db[_0x76f4('0x3d')],'as':'Queue','attributes':['id',_0x76f4('0xe'),_0x76f4('0x74')]}]})[_0x76f4('0x32')](function(_0x99fbd6){if(_0x99fbd6){return _0x99fbd6[_0x76f4('0xb')]({'UserId':_0x25e510['user']['id']},{'transaction':_0x551d38});}});});}})[_0x76f4('0x32')](handleEntityNotFound(_0x3984d3,null))['then'](respondWithResult(_0x3984d3,null))[_0x76f4('0x39')](handleError(_0x3984d3,null));};exports[_0x76f4('0x75')]=function(_0x5e6df9,_0x53cb70,_0x58251e){var _0x3aa958=[];var _0x462f3e=_0x5e6df9[_0x76f4('0x36')]['id'];var _0x3e2a07=_0x5e6df9[_0x76f4('0x47')]['id'];return db[_0x76f4('0x76')]['describe']()[_0x76f4('0x32')](function(_0x1bb9b3){_0x3aa958=_[_0x76f4('0x18')](_0x1bb9b3);return db[_0x76f4('0x5b')][_0x76f4('0x5c')](function(_0x1c8973){const _0x307060={'id':_0x462f3e};return db[_0x76f4('0x12')]['findOne']({'attributes':['id',_0x76f4('0x6b'),'recallme'],'where':_0x307060,'transaction':_0x1c8973,'lock':_0x1c8973[_0x76f4('0x6e')][_0x76f4('0x6f')],'include':[{'model':db[_0x76f4('0x76')],'as':_0x76f4('0x70'),'attributes':_0x3aa958,'include':[{'model':db[_0x76f4('0x71')],'as':_0x76f4('0x72'),'attributes':['id',_0x76f4('0xe')]}]},{'model':db[_0x76f4('0x77')],'as':'List','attributes':['id',_0x76f4('0xe')]},{'model':db['VoiceQueue'],'as':'Queue','attributes':['id','name',_0x76f4('0x74')]}]})[_0x76f4('0x32')](function(_0x279040){if(_0x279040){return _0x279040[_0x76f4('0xb')]({'UserId':_0x3e2a07},{'transaction':_0x1c8973});}});});})['then'](handleEntityNotFound(_0x53cb70,null))[_0x76f4('0x32')](respondWithResult(_0x53cb70,null))[_0x76f4('0x39')](handleError(_0x53cb70,null));};exports[_0x76f4('0x78')]=function(_0x5f5c24,_0x12f16e){return _0x5f5c24[_0x76f4('0x47')][_0x76f4('0x57')]({'where':{'type':_0x76f4('0x58'),'dialActive':!![],'dialMethod':_0x76f4('0x79')},'attributes':['id'],'raw':!![]})[_0x76f4('0x32')](function(_0x3b5e15){if(_0x3b5e15&&_0x3b5e15['length']){return db[_0x76f4('0x12')][_0x76f4('0x8')]({'where':{'active':![],'recallme':![],'scheduledAt':{'$lte':moment()['format'](_0x76f4('0x4a'))},'VoiceQueueId':{'$in':_[_0x76f4('0x11')](_0x3b5e15,'id')},'$or':[{'UserId':null},{'UserId':_0x5f5c24[_0x76f4('0x47')]['id']}]}});}return 0x0;})[_0x76f4('0x32')](function(_0x36d95c){if(!_[_0x76f4('0x4f')](_0x36d95c)&&_[_0x76f4('0x7a')](_0x36d95c)){return _0x12f16e[_0x76f4('0x4')](0xc8)[_0x76f4('0x5')]({'contacts':_0x36d95c});}else{logger['error'](_0x76f4('0x7b'),_0x76f4('0x78'),0x194,_0x76f4('0x7c'));_0x12f16e[_0x76f4('0x7d')](0x194);}})['catch'](handleError(_0x12f16e,null));};exports[_0x76f4('0x7e')]=function(_0x5df706,_0x420281){var _0x4a7a98=shared[_0x76f4('0x7f')];var _0x7380f=[];_['map'](_0x4a7a98,function(_0x5a3239){_0x7380f[_0x76f4('0x80')]({'id':_0x5a3239[_0x76f4('0xe')],'name':_0x5a3239[_0x76f4('0xe')],'utcOffset':_0x5a3239['utcOffset']});});return _0x420281['status'](0xc8)[_0x76f4('0x5')]({'tz':_0x7380f});};exports[_0x76f4('0x81')]=function(_0x52453,_0x36ab57){var _0x291b87=shared[_0x76f4('0x7f')];var _0x98a269={};if(!_[_0x76f4('0x4f')](_0x291b87[_0x52453['body']['id']]))_0x98a269=_0x291b87[_0x52453['body']['id']];return _0x36ab57[_0x76f4('0x4')](0xc8)[_0x76f4('0x5')](_0x98a269);};
\ No newline at end of file
index 9dce861..a0720e6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd8fb=['util','../../config/logger','api','path','rimraf','./cmHopper.attributes','exports','CmHopper','scheduledat','priority','lodash'];(function(_0x30fa5d,_0x517548){var _0x416307=function(_0x23a932){while(--_0x23a932){_0x30fa5d['push'](_0x30fa5d['shift']());}};_0x416307(++_0x517548);}(_0xd8fb,0x99));var _0xbd8f=function(_0x530586,_0x819012){_0x530586=_0x530586-0x0;var _0x53df94=_0xd8fb[_0x530586];return _0x53df94;};'use strict';var _=require(_0xbd8f('0x0'));var util=require(_0xbd8f('0x1'));var logger=require(_0xbd8f('0x2'))(_0xbd8f('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xbd8f('0x4'));var rimraf=require(_0xbd8f('0x5'));var config=require('../../config/environment');var attributes=require(_0xbd8f('0x6'));module[_0xbd8f('0x7')]=function(_0x5543b2,_0x33d541){return _0x5543b2['define'](_0xbd8f('0x8'),attributes,{'tableName':'cm_hopper','paranoid':![],'indexes':[{'name':_0xbd8f('0x9'),'fields':[_0xbd8f('0x9')]},{'name':'phone','fields':['phone']},{'name':_0xbd8f('0xa'),'fields':[_0xbd8f('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xeff8=['lodash','util','api','moment','bluebird','path','rimraf','../../config/environment','./cmHopper.attributes','define','CmHopper','scheduledat','phone'];(function(_0x480f48,_0x141be5){var _0x52674a=function(_0x4681ce){while(--_0x4681ce){_0x480f48['push'](_0x480f48['shift']());}};_0x52674a(++_0x141be5);}(_0xeff8,0x186));var _0x8eff=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xeff8[_0xa464c9];return _0x3d73c4;};'use strict';var _=require(_0x8eff('0x0'));var util=require(_0x8eff('0x1'));var logger=require('../../config/logger')(_0x8eff('0x2'));var moment=require(_0x8eff('0x3'));var BPromise=require(_0x8eff('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x8eff('0x5'));var rimraf=require(_0x8eff('0x6'));var config=require(_0x8eff('0x7'));var attributes=require(_0x8eff('0x8'));module['exports']=function(_0x469641,_0xb54063){return _0x469641[_0x8eff('0x9')](_0x8eff('0xa'),attributes,{'tableName':'cm_hopper','paranoid':![],'indexes':[{'name':_0x8eff('0xb'),'fields':[_0x8eff('0xb')]},{'name':_0x8eff('0xc'),'fields':[_0x8eff('0xc')]},{'name':'priority','fields':['priority']}],'timestamps':!![]});};
\ No newline at end of file
index 00cfbf0..038717b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x596e=['where','limit','include','map','model','attributes','info','GetCmHopper','debug','stringify','error','message','ShowCmHopper','then','catch','CreateCmHopper','create','UpdateCmHopper','update','body','DestroyCmHopper','CmContact','describe','UPDATE','Contact','keys','User','Agent','name','voicePause','length','UserId','includes','push','all','GetContactDialer','GetContactDialer\x20hopperId\x20[%s]\x20-\x20contactId\x20[%s]\x20-\x20active\x20status\x20[%s]','dataValues','active','sequelize','CmHopperFinal','MoveContactManagedDialer\x20hopper\x20options\x20[%s]\x20active\x20status\x20[%s]','destroy','MoveContactManagedDialer','CountReScheduled','COUNT','`scheduledat`\x20>=\x20','format','\x22%s\x22','YYYY-MM-DD\x20HH:mm:ss','\x20,\x201,\x20null','contactsRescheduled','GetContactRecallMe','transaction','LOCK','GetContactByPhone','findOne','phone','dialTimezone','DESC','getContactByPhone','ResetActiveCalls','voiceQueueIds','interval','availableAgentsIds','literal','NOW()\x20+\x20INTERVAL\x20','\x20MINUTE','NOW()','CmList','CmHopperHandlePreviewRecallNotifications','util','bluebird','rpc','CmHopper','findAll','options','raw'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0x596e,0xe3));var _0xe596=function(_0x29101b,_0x346451){_0x29101b=_0x29101b-0x0;var _0x519a3d=_0x596e[_0x29101b];return _0x519a3d;};'use strict';var _=require('lodash');var util=require(_0xe596('0x0'));var moment=require('moment');var BPromise=require(_0xe596('0x1'));var db=require('../../mysqldb')['db'];var logger=require('../../config/logger')(_0xe596('0x2'));exports['GetCmHopper']=function(_0x5da0d0){var _0x3c59ff=this;return new Promise(function(_0x143b77,_0x4d4de8){return db[_0xe596('0x3')][_0xe596('0x4')]({'raw':_0x5da0d0[_0xe596('0x5')]?_0x5da0d0['options'][_0xe596('0x6')]===undefined?!![]:![]:!![],'where':_0x5da0d0[_0xe596('0x5')]?_0x5da0d0['options'][_0xe596('0x7')]||null:null,'attributes':_0x5da0d0['options']?_0x5da0d0[_0xe596('0x5')]['attributes']||null:null,'limit':_0x5da0d0[_0xe596('0x5')]?_0x5da0d0[_0xe596('0x5')][_0xe596('0x8')]||null:null,'include':_0x5da0d0[_0xe596('0x5')]?_0x5da0d0[_0xe596('0x5')][_0xe596('0x9')]?_[_0xe596('0xa')](_0x5da0d0[_0xe596('0x5')][_0xe596('0x9')],function(_0x312021){return{'model':db[_0x312021[_0xe596('0xb')]],'as':_0x312021['as'],'attributes':_0x312021[_0xe596('0xc')],'include':_0x312021[_0xe596('0x9')]?_['map'](_0x312021[_0xe596('0x9')],function(_0x3f51c5){return{'model':db[_0x3f51c5[_0xe596('0xb')]],'as':_0x3f51c5['as'],'attributes':_0x3f51c5['attributes'],'include':_0x3f51c5[_0xe596('0x9')]?_[_0xe596('0xa')](_0x3f51c5[_0xe596('0x9')],function(_0x53cd01){return{'model':db[_0x53cd01[_0xe596('0xb')]],'as':_0x53cd01['as'],'attributes':_0x53cd01[_0xe596('0xc')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2ec166){logger[_0xe596('0xd')](_0xe596('0xe'),_0x5da0d0);logger[_0xe596('0xf')](_0xe596('0xe'),_0x5da0d0,JSON[_0xe596('0x10')](_0x2ec166));_0x143b77(_0x2ec166);})['catch'](function(_0x332122){logger[_0xe596('0x11')](_0xe596('0xe'),_0x332122[_0xe596('0x12')],_0x5da0d0);_0x4d4de8(_0x3c59ff[_0xe596('0x11')](0x1f4,_0x332122['message']));});});};exports[_0xe596('0x13')]=function(_0x373c){var _0x5a48d7=this;return new Promise(function(_0x2a807b,_0x2eea22){return db['CmHopper']['find']({'raw':_0x373c[_0xe596('0x5')]?_0x373c[_0xe596('0x5')][_0xe596('0x6')]===undefined?!![]:![]:!![],'where':_0x373c[_0xe596('0x5')]?_0x373c[_0xe596('0x5')][_0xe596('0x7')]||null:null,'attributes':_0x373c[_0xe596('0x5')]?_0x373c[_0xe596('0x5')]['attributes']||null:null,'include':_0x373c['options']?_0x373c[_0xe596('0x5')][_0xe596('0x9')]?_[_0xe596('0xa')](_0x373c[_0xe596('0x5')][_0xe596('0x9')],function(_0x33c79e){return{'model':db[_0x33c79e[_0xe596('0xb')]],'as':_0x33c79e['as'],'attributes':_0x33c79e[_0xe596('0xc')],'include':_0x33c79e['include']?_[_0xe596('0xa')](_0x33c79e[_0xe596('0x9')],function(_0x4f227d){return{'model':db[_0x4f227d[_0xe596('0xb')]],'as':_0x4f227d['as'],'attributes':_0x4f227d[_0xe596('0xc')],'include':_0x4f227d[_0xe596('0x9')]?_[_0xe596('0xa')](_0x4f227d['include'],function(_0x38b12f){return{'model':db[_0x38b12f[_0xe596('0xb')]],'as':_0x38b12f['as'],'attributes':_0x38b12f[_0xe596('0xc')]};}):[]};}):[]};}):[]:[]})[_0xe596('0x14')](function(_0x7beb42){logger['info'](_0xe596('0x13'),_0x373c);logger[_0xe596('0xf')](_0xe596('0x13'),_0x373c,JSON[_0xe596('0x10')](_0x7beb42));_0x2a807b(_0x7beb42);})[_0xe596('0x15')](function(_0x28d876){logger['error']('ShowCmHopper',_0x28d876[_0xe596('0x12')],_0x373c);_0x2eea22(_0x5a48d7['error'](0x1f4,_0x28d876[_0xe596('0x12')]));});});};exports[_0xe596('0x16')]=function(_0x5d32e9){var _0x1bdea4=this;return new Promise(function(_0x26733c,_0x407d97){return db['CmHopper'][_0xe596('0x17')](_0x5d32e9['body'],{'raw':_0x5d32e9[_0xe596('0x5')]?_0x5d32e9[_0xe596('0x5')]['raw']===undefined?!![]:![]:!![]})[_0xe596('0x14')](function(_0x5df704){logger[_0xe596('0xd')](_0xe596('0x16'),_0x5d32e9);logger['debug'](_0xe596('0x16'),_0x5d32e9,JSON[_0xe596('0x10')](_0x5df704));_0x26733c(_0x5df704);})['catch'](function(_0x53082e){logger[_0xe596('0x11')](_0xe596('0x16'),_0x53082e[_0xe596('0x12')],_0x5d32e9);_0x407d97(_0x1bdea4[_0xe596('0x11')](0x1f4,_0x53082e['message']));});});};exports[_0xe596('0x18')]=function(_0x5724a5){var _0x28aed3=this;return new Promise(function(_0x19ec60,_0x546422){return db['CmHopper'][_0xe596('0x19')](_0x5724a5[_0xe596('0x1a')],{'raw':_0x5724a5['options']?_0x5724a5['options'][_0xe596('0x6')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x5724a5[_0xe596('0x5')]?_0x5724a5[_0xe596('0x5')][_0xe596('0x7')]||null:null,'attributes':_0x5724a5[_0xe596('0x5')]?_0x5724a5['options'][_0xe596('0xc')]||null:null,'limit':_0x5724a5[_0xe596('0x5')]?_0x5724a5[_0xe596('0x5')][_0xe596('0x8')]||null:null})[_0xe596('0x14')](function(_0x154a4d){logger[_0xe596('0xd')](_0xe596('0x18'),_0x5724a5);logger[_0xe596('0xd')]('UpdateCmHopper\x20hopper\x20options\x20[%s]\x20active\x20status\x20[%s]',JSON[_0xe596('0x10')](_0x5724a5['options'][_0xe596('0x7')]),_0x5724a5['body']['active']);logger[_0xe596('0xf')]('UpdateCmHopper',_0x5724a5,JSON[_0xe596('0x10')](_0x154a4d));_0x19ec60(_0x154a4d);})['catch'](function(_0x2f6b50){logger[_0xe596('0x11')]('UpdateCmHopper',_0x2f6b50[_0xe596('0x12')],_0x5724a5);_0x546422(_0x28aed3['error'](0x1f4,_0x2f6b50[_0xe596('0x12')]));});});};exports[_0xe596('0x1b')]=function(_0x332d3a){var _0x176076=this;return new Promise(function(_0xe0468,_0x22a405){return db[_0xe596('0x3')]['destroy']({'where':_0x332d3a[_0xe596('0x5')]?_0x332d3a['options'][_0xe596('0x7')]||null:null})[_0xe596('0x14')](function(_0x21783e){logger[_0xe596('0xd')](_0xe596('0x1b'),_0x332d3a);logger[_0xe596('0xf')]('DestroyCmHopper',_0x332d3a,JSON[_0xe596('0x10')](_0x21783e));_0xe0468(_0x21783e);})[_0xe596('0x15')](function(_0x792704){logger['error']('DestroyCmHopper',_0x792704['message'],_0x332d3a);_0x22a405(_0x176076[_0xe596('0x11')](0x1f4,_0x792704[_0xe596('0x12')]));});});};exports['GetContactDialer']=function(_0x86941){var _0x4a13c0=this;return new Promise(function(_0x466f23,_0x1b5db3){return db[_0xe596('0x1c')][_0xe596('0x1d')]()[_0xe596('0x14')](function(_0x1202d1){return db['sequelize']['transaction'](function(_0x2eab01){return db[_0xe596('0x3')][_0xe596('0x4')]({'where':_0x86941[_0xe596('0x5')]?_0x86941[_0xe596('0x5')]['where']||null:null,'attributes':_0x86941[_0xe596('0x5')]?_0x86941['options'][_0xe596('0xc')]||null:null,'limit':_0x86941[_0xe596('0x5')]?_0x86941[_0xe596('0x5')][_0xe596('0x8')]||null:null,'order':_0x86941[_0xe596('0x5')]?_0x86941[_0xe596('0x5')]['order']||null:null,'transaction':_0x2eab01,'lock':_0x2eab01['LOCK'][_0xe596('0x1e')],'include':[{'model':db[_0xe596('0x1c')],'as':_0xe596('0x1f'),'attributes':_[_0xe596('0x20')](_0x1202d1)},{'model':db[_0xe596('0x21')],'as':_0xe596('0x22'),'attributes':['id',_0xe596('0x23'),_0xe596('0x24')]}]})['then'](function(_0x29cff3){var _0x273c04=[];var _0x495dd0=[];for(var _0x54336b=0x0;_0x54336b<_0x29cff3[_0xe596('0x25')];_0x54336b+=0x1){var _0x53de6b=_0x29cff3[_0x54336b][_0xe596('0x26')];if(_0x53de6b===null){_0x273c04['push'](_0x29cff3[_0x54336b]['update'](_0x86941[_0xe596('0x1a')],{'transaction':_0x2eab01}));}else if(!_0x495dd0[_0xe596('0x27')](_0x53de6b)){_0x495dd0[_0xe596('0x28')](_0x53de6b);_0x273c04[_0xe596('0x28')](_0x29cff3[_0x54336b][_0xe596('0x19')](_0x86941[_0xe596('0x1a')],{'transaction':_0x2eab01}));}}return BPromise[_0xe596('0x29')](_0x273c04);});})[_0xe596('0x14')](function(_0x160cb0){logger[_0xe596('0xd')](_0xe596('0x2a'),_0x86941);if(_0x160cb0[_0xe596('0x25')]>0x0){logger[_0xe596('0xd')](_0xe596('0x2b'),_0x160cb0[0x0]['dataValues']['id'],_0x160cb0[0x0][_0xe596('0x2c')]['ContactId'],_0x160cb0[0x0][_0xe596('0x2c')][_0xe596('0x2d')]);}logger[_0xe596('0xf')](_0xe596('0x2a'),_0x86941,JSON['stringify'](_0x160cb0));_0x466f23(_0x160cb0);})[_0xe596('0x15')](function(_0x291a1c){logger[_0xe596('0x11')](_0xe596('0x2a'),_0x291a1c['message'],_0x86941);_0x1b5db3(_0x4a13c0[_0xe596('0x11')](0x1f4,_0x291a1c[_0xe596('0x12')]));});});});};exports['MoveContactManagedDialer']=function(_0x415b1f){var _0x194731=this;return new Promise(function(_0x64aa80,_0x202709){return db[_0xe596('0x2e')]['transaction'](function(_0x38ae94){return db[_0xe596('0x2f')][_0xe596('0x17')](_0x415b1f[_0xe596('0x1a')],{'raw':_0x415b1f[_0xe596('0x5')]?_0x415b1f[_0xe596('0x5')][_0xe596('0x6')]===undefined?!![]:![]:!![],'transaction':_0x38ae94})[_0xe596('0x14')](function(){logger['info'](_0xe596('0x30'),JSON[_0xe596('0x10')](_0x415b1f[_0xe596('0x5')][_0xe596('0x7')]),_0x415b1f[_0xe596('0x5')]['where'][_0xe596('0x2d')]);return db[_0xe596('0x3')][_0xe596('0x31')]({'where':_0x415b1f['options']?_0x415b1f[_0xe596('0x5')][_0xe596('0x7')]||null:null,'transaction':_0x38ae94});});})['then'](function(_0x3b762e){logger[_0xe596('0xd')](_0xe596('0x32'),_0x415b1f);logger[_0xe596('0xf')](_0xe596('0x32'),_0x415b1f,JSON[_0xe596('0x10')](_0x3b762e));_0x64aa80(_0x3b762e);})[_0xe596('0x15')](function(_0x20452a){logger[_0xe596('0x11')](_0xe596('0x32'),_0x20452a[_0xe596('0x12')],_0x415b1f);_0x202709(_0x194731['error'](0x1f4,_0x20452a['message']));});});};exports[_0xe596('0x33')]=function(_0x517ded){var _0x5a8eb3=this;return new Promise(function(_0x37be7d,_0x33f1c2){return db['CmHopper'][_0xe596('0x4')]({'raw':_0x517ded[_0xe596('0x5')]?_0x517ded['options'][_0xe596('0x6')]===undefined?!![]:![]:!![],'where':_0x517ded[_0xe596('0x5')]?_0x517ded[_0xe596('0x5')][_0xe596('0x7')]||null:null,'attributes':[[db[_0xe596('0x2e')]['fn'](_0xe596('0x34'),db[_0xe596('0x2e')]['fn']('IF',db[_0xe596('0x2e')]['literal'](_0xe596('0x35')+util[_0xe596('0x36')](_0xe596('0x37'),moment()['format'](_0xe596('0x38')))+_0xe596('0x39')))),_0xe596('0x3a')]]})[_0xe596('0x14')](function(_0x17131b){logger['info'](_0xe596('0x33'),_0x517ded);logger[_0xe596('0xf')](_0xe596('0x33'),_0x517ded,JSON[_0xe596('0x10')](_0x17131b));_0x37be7d(_0x17131b);})[_0xe596('0x15')](function(_0x42dd07){logger[_0xe596('0x11')](_0xe596('0x33'),_0x42dd07['message'],_0x517ded);_0x33f1c2(_0x5a8eb3[_0xe596('0x11')](0x1f4,_0x42dd07[_0xe596('0x12')]));});});};exports[_0xe596('0x3b')]=function(_0x2659ad){var _0x178a13=this;return new Promise(function(_0x58f0fe,_0x371a0e){return db[_0xe596('0x1c')][_0xe596('0x1d')]()[_0xe596('0x14')](function(){return db[_0xe596('0x2e')][_0xe596('0x3c')](function(_0x5d430d){return db[_0xe596('0x3')][_0xe596('0x4')]({'where':_0x2659ad[_0xe596('0x5')]?_0x2659ad['options'][_0xe596('0x7')]||null:null,'attributes':_0x2659ad[_0xe596('0x5')]?_0x2659ad[_0xe596('0x5')]['attributes']||null:null,'limit':0x1,'order':_0x2659ad[_0xe596('0x5')]?_0x2659ad[_0xe596('0x5')]['order']||null:null,'group':db[_0xe596('0x3')]['UserId'],'transaction':_0x5d430d,'lock':_0x5d430d[_0xe596('0x3d')][_0xe596('0x1e')],'include':_0x2659ad[_0xe596('0x5')]?_0x2659ad[_0xe596('0x5')][_0xe596('0x9')]?_['map'](_0x2659ad[_0xe596('0x5')][_0xe596('0x9')],function(_0x4c9c8e){return{'model':db[_0x4c9c8e[_0xe596('0xb')]],'as':_0x4c9c8e['as'],'attributes':_0x4c9c8e[_0xe596('0xc')],'include':_0x4c9c8e[_0xe596('0x9')]?_[_0xe596('0xa')](_0x4c9c8e['include'],function(_0x20382a){return{'model':db[_0x20382a[_0xe596('0xb')]],'as':_0x20382a['as'],'attributes':_0x20382a[_0xe596('0xc')],'include':_0x20382a[_0xe596('0x9')]?_[_0xe596('0xa')](_0x20382a[_0xe596('0x9')],function(_0x1ed299){return{'model':db[_0x1ed299[_0xe596('0xb')]],'as':_0x1ed299['as'],'attributes':_0x1ed299[_0xe596('0xc')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1b7d0c){var _0x4e4c14=[];for(var _0xc2e809=0x0;_0xc2e809<_0x1b7d0c[_0xe596('0x25')];_0xc2e809+=0x1){_0x4e4c14['push'](_0x1b7d0c[_0xc2e809][_0xe596('0x19')](_0x2659ad[_0xe596('0x1a')],{'transaction':_0x5d430d}));}return BPromise['all'](_0x4e4c14);});})[_0xe596('0x14')](function(_0x431e75){logger[_0xe596('0xd')]('GetContactRecallMe',_0x2659ad);logger[_0xe596('0xf')](_0xe596('0x3b'),_0x2659ad,JSON[_0xe596('0x10')](_0x431e75));_0x58f0fe(_0x431e75);})[_0xe596('0x15')](function(_0xe3490f){logger[_0xe596('0x11')](_0xe596('0x3b'),_0xe3490f['message'],_0x2659ad);_0x371a0e(_0x178a13[_0xe596('0x11')](0x1f4,_0xe3490f[_0xe596('0x12')]));});});});};exports['GetCmHopperPreview']=function(_0x50c1b6){var _0x45b27f=this;return new Promise(function(_0x203b17,_0x52a795){db[_0xe596('0x1c')]['describe']()[_0xe596('0x14')](function(_0x3f14ca){return db[_0xe596('0x3')][_0xe596('0x4')]({'raw':_0x50c1b6[_0xe596('0x5')]?_0x50c1b6['options'][_0xe596('0x6')]===undefined?!![]:![]:!![],'where':_0x50c1b6[_0xe596('0x5')]?_0x50c1b6['options']['where']||null:null,'attributes':_0x50c1b6[_0xe596('0x5')]?_0x50c1b6[_0xe596('0x5')][_0xe596('0xc')]||null:null,'limit':_0x50c1b6[_0xe596('0x5')]?_0x50c1b6[_0xe596('0x5')][_0xe596('0x8')]||null:null,'include':_0x50c1b6[_0xe596('0x5')]?_0x50c1b6[_0xe596('0x5')][_0xe596('0x9')]?_['map'](_0x50c1b6[_0xe596('0x5')]['include'],function(_0x559a1a){return{'model':db[_0x559a1a['model']],'as':_0x559a1a['as'],'attributes':_0x559a1a['as']===_0xe596('0x1f')?_[_0xe596('0x20')](_0x3f14ca):_0x559a1a[_0xe596('0xc')],'include':_0x559a1a[_0xe596('0x9')]?_[_0xe596('0xa')](_0x559a1a[_0xe596('0x9')],function(_0x3a5911){return{'model':db[_0x3a5911[_0xe596('0xb')]],'as':_0x3a5911['as'],'attributes':_0x3a5911[_0xe596('0xc')],'include':_0x3a5911[_0xe596('0x9')]?_['map'](_0x3a5911[_0xe596('0x9')],function(_0x52b940){return{'model':db[_0x52b940[_0xe596('0xb')]],'as':_0x52b940['as'],'attributes':_0x52b940[_0xe596('0xc')]};}):[]};}):[]};}):[]:[]})[_0xe596('0x14')](function(_0x1efb12){logger[_0xe596('0xd')](_0xe596('0xe'),_0x50c1b6);logger[_0xe596('0xf')]('GetCmHopper',_0x50c1b6,JSON[_0xe596('0x10')](_0x1efb12));_0x203b17(_0x1efb12);})[_0xe596('0x15')](function(_0x4a140c){logger[_0xe596('0x11')](_0xe596('0xe'),_0x4a140c[_0xe596('0x12')],_0x50c1b6);_0x52a795(_0x45b27f[_0xe596('0x11')](0x1f4,_0x4a140c[_0xe596('0x12')]));});});});};exports[_0xe596('0x3e')]=function(_0x3f06a8){var _0x235562=this;return new Promise(function(_0x3f05d9,_0x43567c){return db[_0xe596('0x1c')][_0xe596('0x3f')]({'raw':!![],'where':{'phone':_0x3f06a8[_0xe596('0x5')][_0xe596('0x7')][_0xe596('0x40')]},'attributes':['id',_0xe596('0x41')],'order':[['id',_0xe596('0x42')]]})[_0xe596('0x14')](function(_0x2c49b9){logger[_0xe596('0xd')](_0xe596('0x43'),_0x3f06a8);logger['debug']('getContactByPhone',_0x3f06a8,JSON[_0xe596('0x10')](_0x2c49b9));_0x3f05d9(_0x2c49b9);})[_0xe596('0x15')](function(_0x795f32){logger[_0xe596('0x11')](_0xe596('0x43'),_0x795f32[_0xe596('0x12')],_0x3f06a8);_0x43567c(_0x235562[_0xe596('0x11')](0x1f4,_0x795f32['message']));});});};exports[_0xe596('0x44')]=function(_0x424553){var _0x5ba688=this;return new Promise(function(_0x463650,_0x47e6a6){return db[_0xe596('0x2e')][_0xe596('0x3c')](function(_0x130c04){var _0x5bf945=_0x424553[_0xe596('0x5')]&&_0x424553[_0xe596('0x5')][_0xe596('0x7')]?_0x424553[_0xe596('0x5')]['where']:{};return db[_0xe596('0x3')][_0xe596('0x19')](_0x424553[_0xe596('0x1a')],{'where':_0x5bf945,'transaction':_0x130c04})[_0xe596('0x14')](function(_0x2aea3f){logger[_0xe596('0xd')](_0xe596('0x44'),_0x424553);logger[_0xe596('0xf')](_0xe596('0x44'),_0x424553,JSON[_0xe596('0x10')](_0x2aea3f));_0x463650(_0x2aea3f);})[_0xe596('0x15')](function(_0x2d0f8d){logger[_0xe596('0x11')](_0xe596('0x44'),_0x2d0f8d[_0xe596('0x12')],_0x424553);_0x47e6a6(_0x5ba688[_0xe596('0x11')](0x1f4,_0x2d0f8d[_0xe596('0x12')]));});});});};exports['CmHopperHandlePreviewRecallNotifications']=function(_0x349ee6){var _0x23f2db=this;var _0x433ba3=_0x349ee6[_0xe596('0x1a')]['where'][_0xe596('0x45')];var _0x560457=_0x349ee6[_0xe596('0x1a')][_0xe596('0x7')][_0xe596('0x46')];var _0x2f016b=_0x349ee6[_0xe596('0x1a')]['where'][_0xe596('0x47')];return new Promise(function(_0x210cd2,_0xe19a65){return db[_0xe596('0x3')][_0xe596('0x4')]({'where':{'voiceQueueId':{'$in':_0x433ba3},'recallme':0x1,'active':0x0,'recallmeNotifiedDate':{'$eq':null},'scheduledat':{'$and':{'$lte':db[_0xe596('0x2e')][_0xe596('0x48')](_0xe596('0x49')+_0x560457+_0xe596('0x4a')),'$gt':db[_0xe596('0x2e')][_0xe596('0x48')](_0xe596('0x4b'))}},'UserId':{'$in':_0x2f016b}},'include':[{'model':db[_0xe596('0x1c')],'as':_0xe596('0x1f')},{'model':db[_0xe596('0x21')],'as':'Agent','attributes':['id','name','voicePause']},{'model':db[_0xe596('0x4c')],'as':'List'}]})['then'](function(_0x21e65d){if(_0x21e65d[_0xe596('0x25')]>0x0){return db[_0xe596('0x2e')][_0xe596('0x3c')](function(_0x2e291c){return db['CmHopper']['update']({'recallmeNotifiedDate':db[_0xe596('0x2e')][_0xe596('0x48')](_0xe596('0x4b'))},{'where':{'id':{'$in':_[_0xe596('0xa')](_0x21e65d,'id')}},'transaction':_0x2e291c})[_0xe596('0x14')](function(){_0x210cd2(_0x21e65d);})[_0xe596('0x15')](function(_0x3c01ee){logger[_0xe596('0x11')](_0xe596('0x4d'),_0x3c01ee['message'],_0x349ee6);_0xe19a65(_0x23f2db[_0xe596('0x11')](0x1f4,_0x3c01ee['message']));});})[_0xe596('0x15')](function(_0x19fc68){logger[_0xe596('0x11')](_0xe596('0x4d'),_0x19fc68[_0xe596('0x12')],_0x349ee6);_0xe19a65(_0x23f2db[_0xe596('0x11')](0x1f4,_0x19fc68['message']));});}else{_0x210cd2(_0x21e65d);}});});};
\ No newline at end of file
+var _0x92d7=['findAll','options','raw','where','attributes','limit','include','model','map','info','debug','message','error','ShowCmHopper','CmHopper','find','then','catch','create','body','CreateCmHopper','stringify','UpdateCmHopper','update','UpdateCmHopper\x20hopper\x20options\x20[%s]\x20active\x20status\x20[%s]','DestroyCmHopper','GetContactDialer','describe','sequelize','transaction','order','LOCK','UPDATE','CmContact','keys','User','name','voicePause','length','UserId','push','includes','all','GetContactDialer\x20hopperId\x20[%s]\x20-\x20contactId\x20[%s]\x20-\x20active\x20status\x20[%s]','dataValues','MoveContactManagedDialer','CmHopperFinal','MoveContactManagedDialer\x20hopper\x20options\x20[%s]\x20active\x20status\x20[%s]','active','destroy','CountReScheduled','format','\x20,\x201,\x20null','GetContactRecallMe','GetCmHopperPreview','Contact','findOne','phone','dialTimezone','DESC','getContactByPhone','ResetActiveCalls','CmHopperHandlePreviewRecallNotifications','voiceQueueIds','interval','availableAgentsIds','literal','NOW()\x20+\x20INTERVAL\x20','\x20MINUTE','Agent','lodash','util','bluebird','../../mysqldb','rpc','GetCmHopper'];(function(_0x46e369,_0x5b73ec){var _0x58fbba=function(_0x13bde2){while(--_0x13bde2){_0x46e369['push'](_0x46e369['shift']());}};_0x58fbba(++_0x5b73ec);}(_0x92d7,0x12a));var _0x792d=function(_0x16a1d5,_0x885088){_0x16a1d5=_0x16a1d5-0x0;var _0x2f0f26=_0x92d7[_0x16a1d5];return _0x2f0f26;};'use strict';var _=require(_0x792d('0x0'));var util=require(_0x792d('0x1'));var moment=require('moment');var BPromise=require(_0x792d('0x2'));var db=require(_0x792d('0x3'))['db'];var logger=require('../../config/logger')(_0x792d('0x4'));exports[_0x792d('0x5')]=function(_0x41b2e8){var _0xaa7a37=this;return new Promise(function(_0x1b6910,_0x13b8af){return db['CmHopper'][_0x792d('0x6')]({'raw':_0x41b2e8[_0x792d('0x7')]?_0x41b2e8['options'][_0x792d('0x8')]===undefined?!![]:![]:!![],'where':_0x41b2e8[_0x792d('0x7')]?_0x41b2e8[_0x792d('0x7')][_0x792d('0x9')]||null:null,'attributes':_0x41b2e8[_0x792d('0x7')]?_0x41b2e8[_0x792d('0x7')][_0x792d('0xa')]||null:null,'limit':_0x41b2e8['options']?_0x41b2e8[_0x792d('0x7')][_0x792d('0xb')]||null:null,'include':_0x41b2e8['options']?_0x41b2e8[_0x792d('0x7')][_0x792d('0xc')]?_['map'](_0x41b2e8['options'][_0x792d('0xc')],function(_0x33f5e2){return{'model':db[_0x33f5e2[_0x792d('0xd')]],'as':_0x33f5e2['as'],'attributes':_0x33f5e2[_0x792d('0xa')],'include':_0x33f5e2['include']?_[_0x792d('0xe')](_0x33f5e2['include'],function(_0x196bd8){return{'model':db[_0x196bd8[_0x792d('0xd')]],'as':_0x196bd8['as'],'attributes':_0x196bd8[_0x792d('0xa')],'include':_0x196bd8[_0x792d('0xc')]?_[_0x792d('0xe')](_0x196bd8[_0x792d('0xc')],function(_0x5c4ce6){return{'model':db[_0x5c4ce6[_0x792d('0xd')]],'as':_0x5c4ce6['as'],'attributes':_0x5c4ce6[_0x792d('0xa')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x206be5){logger[_0x792d('0xf')](_0x792d('0x5'),_0x41b2e8);logger[_0x792d('0x10')](_0x792d('0x5'),_0x41b2e8,JSON['stringify'](_0x206be5));_0x1b6910(_0x206be5);})['catch'](function(_0x4a0d42){logger['error'](_0x792d('0x5'),_0x4a0d42[_0x792d('0x11')],_0x41b2e8);_0x13b8af(_0xaa7a37[_0x792d('0x12')](0x1f4,_0x4a0d42['message']));});});};exports[_0x792d('0x13')]=function(_0x43de90){var _0x413161=this;return new Promise(function(_0x26529f,_0x25317d){return db[_0x792d('0x14')][_0x792d('0x15')]({'raw':_0x43de90[_0x792d('0x7')]?_0x43de90[_0x792d('0x7')][_0x792d('0x8')]===undefined?!![]:![]:!![],'where':_0x43de90['options']?_0x43de90['options'][_0x792d('0x9')]||null:null,'attributes':_0x43de90['options']?_0x43de90[_0x792d('0x7')][_0x792d('0xa')]||null:null,'include':_0x43de90[_0x792d('0x7')]?_0x43de90[_0x792d('0x7')][_0x792d('0xc')]?_[_0x792d('0xe')](_0x43de90[_0x792d('0x7')][_0x792d('0xc')],function(_0x10c6b3){return{'model':db[_0x10c6b3[_0x792d('0xd')]],'as':_0x10c6b3['as'],'attributes':_0x10c6b3[_0x792d('0xa')],'include':_0x10c6b3['include']?_['map'](_0x10c6b3[_0x792d('0xc')],function(_0x1011f9){return{'model':db[_0x1011f9[_0x792d('0xd')]],'as':_0x1011f9['as'],'attributes':_0x1011f9[_0x792d('0xa')],'include':_0x1011f9[_0x792d('0xc')]?_['map'](_0x1011f9['include'],function(_0xe70291){return{'model':db[_0xe70291['model']],'as':_0xe70291['as'],'attributes':_0xe70291[_0x792d('0xa')]};}):[]};}):[]};}):[]:[]})[_0x792d('0x16')](function(_0x1ef07b){logger[_0x792d('0xf')]('ShowCmHopper',_0x43de90);logger['debug'](_0x792d('0x13'),_0x43de90,JSON['stringify'](_0x1ef07b));_0x26529f(_0x1ef07b);})[_0x792d('0x17')](function(_0x3c3b09){logger[_0x792d('0x12')](_0x792d('0x13'),_0x3c3b09[_0x792d('0x11')],_0x43de90);_0x25317d(_0x413161['error'](0x1f4,_0x3c3b09['message']));});});};exports['CreateCmHopper']=function(_0x414dd3){var _0x127cc1=this;return new Promise(function(_0x1c4818,_0x5a1ed4){return db[_0x792d('0x14')][_0x792d('0x18')](_0x414dd3[_0x792d('0x19')],{'raw':_0x414dd3[_0x792d('0x7')]?_0x414dd3['options']['raw']===undefined?!![]:![]:!![]})[_0x792d('0x16')](function(_0xdcd18a){logger[_0x792d('0xf')](_0x792d('0x1a'),_0x414dd3);logger[_0x792d('0x10')](_0x792d('0x1a'),_0x414dd3,JSON[_0x792d('0x1b')](_0xdcd18a));_0x1c4818(_0xdcd18a);})[_0x792d('0x17')](function(_0x3831c6){logger[_0x792d('0x12')](_0x792d('0x1a'),_0x3831c6[_0x792d('0x11')],_0x414dd3);_0x5a1ed4(_0x127cc1['error'](0x1f4,_0x3831c6['message']));});});};exports[_0x792d('0x1c')]=function(_0x2110ea){var _0xa83355=this;return new Promise(function(_0x314716,_0x16410b){return db[_0x792d('0x14')][_0x792d('0x1d')](_0x2110ea[_0x792d('0x19')],{'raw':_0x2110ea[_0x792d('0x7')]?_0x2110ea[_0x792d('0x7')][_0x792d('0x8')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2110ea['options']?_0x2110ea[_0x792d('0x7')][_0x792d('0x9')]||null:null,'attributes':_0x2110ea[_0x792d('0x7')]?_0x2110ea[_0x792d('0x7')][_0x792d('0xa')]||null:null,'limit':_0x2110ea[_0x792d('0x7')]?_0x2110ea[_0x792d('0x7')][_0x792d('0xb')]||null:null})[_0x792d('0x16')](function(_0x2f3674){logger[_0x792d('0xf')]('UpdateCmHopper',_0x2110ea);logger[_0x792d('0xf')](_0x792d('0x1e'),JSON['stringify'](_0x2110ea['options'][_0x792d('0x9')]),_0x2110ea['body']['active']);logger[_0x792d('0x10')]('UpdateCmHopper',_0x2110ea,JSON[_0x792d('0x1b')](_0x2f3674));_0x314716(_0x2f3674);})['catch'](function(_0x20ea85){logger[_0x792d('0x12')]('UpdateCmHopper',_0x20ea85[_0x792d('0x11')],_0x2110ea);_0x16410b(_0xa83355[_0x792d('0x12')](0x1f4,_0x20ea85[_0x792d('0x11')]));});});};exports[_0x792d('0x1f')]=function(_0x52b076){var _0x218af4=this;return new Promise(function(_0x1bc0ec,_0x2902dc){return db[_0x792d('0x14')]['destroy']({'where':_0x52b076['options']?_0x52b076['options'][_0x792d('0x9')]||null:null})[_0x792d('0x16')](function(_0x34ef98){logger[_0x792d('0xf')](_0x792d('0x1f'),_0x52b076);logger[_0x792d('0x10')](_0x792d('0x1f'),_0x52b076,JSON[_0x792d('0x1b')](_0x34ef98));_0x1bc0ec(_0x34ef98);})[_0x792d('0x17')](function(_0x44df3d){logger[_0x792d('0x12')](_0x792d('0x1f'),_0x44df3d[_0x792d('0x11')],_0x52b076);_0x2902dc(_0x218af4[_0x792d('0x12')](0x1f4,_0x44df3d[_0x792d('0x11')]));});});};exports[_0x792d('0x20')]=function(_0x233fa6){var _0x5ed0e4=this;return new Promise(function(_0xacc1e7,_0x14b87b){return db['CmContact'][_0x792d('0x21')]()[_0x792d('0x16')](function(_0x281734){return db[_0x792d('0x22')][_0x792d('0x23')](function(_0x1ed320){return db[_0x792d('0x14')][_0x792d('0x6')]({'where':_0x233fa6[_0x792d('0x7')]?_0x233fa6['options'][_0x792d('0x9')]||null:null,'attributes':_0x233fa6[_0x792d('0x7')]?_0x233fa6[_0x792d('0x7')][_0x792d('0xa')]||null:null,'limit':_0x233fa6[_0x792d('0x7')]?_0x233fa6[_0x792d('0x7')][_0x792d('0xb')]||null:null,'order':_0x233fa6[_0x792d('0x7')]?_0x233fa6[_0x792d('0x7')][_0x792d('0x24')]||null:null,'transaction':_0x1ed320,'lock':_0x1ed320[_0x792d('0x25')][_0x792d('0x26')],'include':[{'model':db[_0x792d('0x27')],'as':'Contact','attributes':_[_0x792d('0x28')](_0x281734)},{'model':db[_0x792d('0x29')],'as':'Agent','attributes':['id',_0x792d('0x2a'),_0x792d('0x2b')]}]})['then'](function(_0x484f8b){var _0x2b2b61=[];var _0x3e7948=[];for(var _0x35f256=0x0;_0x35f256<_0x484f8b[_0x792d('0x2c')];_0x35f256+=0x1){var _0x5d5498=_0x484f8b[_0x35f256][_0x792d('0x2d')];if(_0x5d5498===null){_0x2b2b61[_0x792d('0x2e')](_0x484f8b[_0x35f256]['update'](_0x233fa6[_0x792d('0x19')],{'transaction':_0x1ed320}));}else if(!_0x3e7948[_0x792d('0x2f')](_0x5d5498)){_0x3e7948['push'](_0x5d5498);_0x2b2b61[_0x792d('0x2e')](_0x484f8b[_0x35f256]['update'](_0x233fa6['body'],{'transaction':_0x1ed320}));}}return BPromise[_0x792d('0x30')](_0x2b2b61);});})[_0x792d('0x16')](function(_0x3b70e3){logger[_0x792d('0xf')]('GetContactDialer',_0x233fa6);if(_0x3b70e3[_0x792d('0x2c')]>0x0){logger[_0x792d('0xf')](_0x792d('0x31'),_0x3b70e3[0x0]['dataValues']['id'],_0x3b70e3[0x0][_0x792d('0x32')]['ContactId'],_0x3b70e3[0x0]['dataValues']['active']);}logger[_0x792d('0x10')](_0x792d('0x20'),_0x233fa6,JSON[_0x792d('0x1b')](_0x3b70e3));_0xacc1e7(_0x3b70e3);})['catch'](function(_0x1075c2){logger['error'](_0x792d('0x20'),_0x1075c2[_0x792d('0x11')],_0x233fa6);_0x14b87b(_0x5ed0e4[_0x792d('0x12')](0x1f4,_0x1075c2['message']));});});});};exports[_0x792d('0x33')]=function(_0x4e1bb1){var _0x406b43=this;return new Promise(function(_0x43b52f,_0x3e0988){return db[_0x792d('0x22')][_0x792d('0x23')](function(_0x3ab2b4){return db[_0x792d('0x34')][_0x792d('0x18')](_0x4e1bb1[_0x792d('0x19')],{'raw':_0x4e1bb1['options']?_0x4e1bb1[_0x792d('0x7')][_0x792d('0x8')]===undefined?!![]:![]:!![],'transaction':_0x3ab2b4})['then'](function(){logger['info'](_0x792d('0x35'),JSON[_0x792d('0x1b')](_0x4e1bb1[_0x792d('0x7')]['where']),_0x4e1bb1['options'][_0x792d('0x9')][_0x792d('0x36')]);return db[_0x792d('0x14')][_0x792d('0x37')]({'where':_0x4e1bb1[_0x792d('0x7')]?_0x4e1bb1[_0x792d('0x7')]['where']||null:null,'transaction':_0x3ab2b4});});})[_0x792d('0x16')](function(_0x25ec64){logger[_0x792d('0xf')](_0x792d('0x33'),_0x4e1bb1);logger[_0x792d('0x10')](_0x792d('0x33'),_0x4e1bb1,JSON['stringify'](_0x25ec64));_0x43b52f(_0x25ec64);})[_0x792d('0x17')](function(_0x407095){logger[_0x792d('0x12')](_0x792d('0x33'),_0x407095['message'],_0x4e1bb1);_0x3e0988(_0x406b43[_0x792d('0x12')](0x1f4,_0x407095['message']));});});};exports[_0x792d('0x38')]=function(_0x553679){var _0x56e4ce=this;return new Promise(function(_0x526ec8,_0x184245){return db[_0x792d('0x14')][_0x792d('0x6')]({'raw':_0x553679['options']?_0x553679[_0x792d('0x7')][_0x792d('0x8')]===undefined?!![]:![]:!![],'where':_0x553679[_0x792d('0x7')]?_0x553679[_0x792d('0x7')][_0x792d('0x9')]||null:null,'attributes':[[db['sequelize']['fn']('COUNT',db[_0x792d('0x22')]['fn']('IF',db[_0x792d('0x22')]['literal']('`scheduledat`\x20>=\x20'+util[_0x792d('0x39')]('\x22%s\x22',moment()[_0x792d('0x39')]('YYYY-MM-DD\x20HH:mm:ss'))+_0x792d('0x3a')))),'contactsRescheduled']]})[_0x792d('0x16')](function(_0x143465){logger[_0x792d('0xf')](_0x792d('0x38'),_0x553679);logger[_0x792d('0x10')](_0x792d('0x38'),_0x553679,JSON[_0x792d('0x1b')](_0x143465));_0x526ec8(_0x143465);})[_0x792d('0x17')](function(_0x45480c){logger[_0x792d('0x12')](_0x792d('0x38'),_0x45480c['message'],_0x553679);_0x184245(_0x56e4ce[_0x792d('0x12')](0x1f4,_0x45480c[_0x792d('0x11')]));});});};exports[_0x792d('0x3b')]=function(_0x19ce0c){var _0x1063b6=this;return new Promise(function(_0x3ffff2,_0x2238d7){return db[_0x792d('0x27')][_0x792d('0x21')]()[_0x792d('0x16')](function(){return db[_0x792d('0x22')][_0x792d('0x23')](function(_0x50a394){return db[_0x792d('0x14')]['findAll']({'where':_0x19ce0c[_0x792d('0x7')]?_0x19ce0c[_0x792d('0x7')][_0x792d('0x9')]||null:null,'attributes':_0x19ce0c[_0x792d('0x7')]?_0x19ce0c[_0x792d('0x7')][_0x792d('0xa')]||null:null,'limit':0x1,'order':_0x19ce0c['options']?_0x19ce0c[_0x792d('0x7')][_0x792d('0x24')]||null:null,'group':db[_0x792d('0x14')][_0x792d('0x2d')],'transaction':_0x50a394,'lock':_0x50a394[_0x792d('0x25')][_0x792d('0x26')],'include':_0x19ce0c[_0x792d('0x7')]?_0x19ce0c[_0x792d('0x7')]['include']?_[_0x792d('0xe')](_0x19ce0c[_0x792d('0x7')]['include'],function(_0x3e634a){return{'model':db[_0x3e634a['model']],'as':_0x3e634a['as'],'attributes':_0x3e634a[_0x792d('0xa')],'include':_0x3e634a[_0x792d('0xc')]?_[_0x792d('0xe')](_0x3e634a[_0x792d('0xc')],function(_0x3fe55b){return{'model':db[_0x3fe55b[_0x792d('0xd')]],'as':_0x3fe55b['as'],'attributes':_0x3fe55b['attributes'],'include':_0x3fe55b[_0x792d('0xc')]?_['map'](_0x3fe55b['include'],function(_0xf070d){return{'model':db[_0xf070d[_0x792d('0xd')]],'as':_0xf070d['as'],'attributes':_0xf070d[_0x792d('0xa')]};}):[]};}):[]};}):[]:[]})[_0x792d('0x16')](function(_0x195047){var _0x386e1a=[];for(var _0x159e46=0x0;_0x159e46<_0x195047[_0x792d('0x2c')];_0x159e46+=0x1){_0x386e1a[_0x792d('0x2e')](_0x195047[_0x159e46]['update'](_0x19ce0c[_0x792d('0x19')],{'transaction':_0x50a394}));}return BPromise[_0x792d('0x30')](_0x386e1a);});})[_0x792d('0x16')](function(_0x10bbf8){logger[_0x792d('0xf')](_0x792d('0x3b'),_0x19ce0c);logger['debug'](_0x792d('0x3b'),_0x19ce0c,JSON[_0x792d('0x1b')](_0x10bbf8));_0x3ffff2(_0x10bbf8);})[_0x792d('0x17')](function(_0x5ec648){logger['error']('GetContactRecallMe',_0x5ec648[_0x792d('0x11')],_0x19ce0c);_0x2238d7(_0x1063b6[_0x792d('0x12')](0x1f4,_0x5ec648[_0x792d('0x11')]));});});});};exports[_0x792d('0x3c')]=function(_0x178bf4){var _0x1e22d8=this;return new Promise(function(_0x189e5f,_0x26a8c3){db['CmContact']['describe']()[_0x792d('0x16')](function(_0xe3493e){return db[_0x792d('0x14')][_0x792d('0x6')]({'raw':_0x178bf4[_0x792d('0x7')]?_0x178bf4[_0x792d('0x7')][_0x792d('0x8')]===undefined?!![]:![]:!![],'where':_0x178bf4['options']?_0x178bf4[_0x792d('0x7')]['where']||null:null,'attributes':_0x178bf4[_0x792d('0x7')]?_0x178bf4['options']['attributes']||null:null,'limit':_0x178bf4['options']?_0x178bf4[_0x792d('0x7')]['limit']||null:null,'include':_0x178bf4[_0x792d('0x7')]?_0x178bf4['options']['include']?_[_0x792d('0xe')](_0x178bf4['options'][_0x792d('0xc')],function(_0x3f733a){return{'model':db[_0x3f733a[_0x792d('0xd')]],'as':_0x3f733a['as'],'attributes':_0x3f733a['as']===_0x792d('0x3d')?_['keys'](_0xe3493e):_0x3f733a[_0x792d('0xa')],'include':_0x3f733a['include']?_['map'](_0x3f733a[_0x792d('0xc')],function(_0x5eda51){return{'model':db[_0x5eda51[_0x792d('0xd')]],'as':_0x5eda51['as'],'attributes':_0x5eda51[_0x792d('0xa')],'include':_0x5eda51[_0x792d('0xc')]?_[_0x792d('0xe')](_0x5eda51[_0x792d('0xc')],function(_0x6352c7){return{'model':db[_0x6352c7[_0x792d('0xd')]],'as':_0x6352c7['as'],'attributes':_0x6352c7[_0x792d('0xa')]};}):[]};}):[]};}):[]:[]})[_0x792d('0x16')](function(_0x49498e){logger[_0x792d('0xf')](_0x792d('0x5'),_0x178bf4);logger[_0x792d('0x10')](_0x792d('0x5'),_0x178bf4,JSON[_0x792d('0x1b')](_0x49498e));_0x189e5f(_0x49498e);})[_0x792d('0x17')](function(_0x4fe9ce){logger['error'](_0x792d('0x5'),_0x4fe9ce[_0x792d('0x11')],_0x178bf4);_0x26a8c3(_0x1e22d8[_0x792d('0x12')](0x1f4,_0x4fe9ce[_0x792d('0x11')]));});});});};exports['GetContactByPhone']=function(_0x372c8d){var _0x53e03e=this;return new Promise(function(_0xb6fc20,_0x15040c){return db[_0x792d('0x27')][_0x792d('0x3e')]({'raw':!![],'where':{'phone':_0x372c8d[_0x792d('0x7')][_0x792d('0x9')][_0x792d('0x3f')]},'attributes':['id',_0x792d('0x40')],'order':[['id',_0x792d('0x41')]]})[_0x792d('0x16')](function(_0x184b96){logger['info']('getContactByPhone',_0x372c8d);logger[_0x792d('0x10')](_0x792d('0x42'),_0x372c8d,JSON['stringify'](_0x184b96));_0xb6fc20(_0x184b96);})['catch'](function(_0x2b9432){logger['error'](_0x792d('0x42'),_0x2b9432[_0x792d('0x11')],_0x372c8d);_0x15040c(_0x53e03e[_0x792d('0x12')](0x1f4,_0x2b9432['message']));});});};exports['ResetActiveCalls']=function(_0x44a24e){var _0x199e1d=this;return new Promise(function(_0x3eb3b5,_0x2ae679){return db[_0x792d('0x22')][_0x792d('0x23')](function(_0x4a5102){var _0x388de8=_0x44a24e[_0x792d('0x7')]&&_0x44a24e[_0x792d('0x7')][_0x792d('0x9')]?_0x44a24e['options'][_0x792d('0x9')]:{};return db['CmHopper'][_0x792d('0x1d')](_0x44a24e[_0x792d('0x19')],{'where':_0x388de8,'transaction':_0x4a5102})[_0x792d('0x16')](function(_0x36fd06){logger[_0x792d('0xf')](_0x792d('0x43'),_0x44a24e);logger[_0x792d('0x10')](_0x792d('0x43'),_0x44a24e,JSON[_0x792d('0x1b')](_0x36fd06));_0x3eb3b5(_0x36fd06);})[_0x792d('0x17')](function(_0x5dbc24){logger[_0x792d('0x12')](_0x792d('0x43'),_0x5dbc24[_0x792d('0x11')],_0x44a24e);_0x2ae679(_0x199e1d[_0x792d('0x12')](0x1f4,_0x5dbc24['message']));});});});};exports[_0x792d('0x44')]=function(_0xc060d){var _0x147c56=this;var _0x4a18ca=_0xc060d[_0x792d('0x19')][_0x792d('0x9')][_0x792d('0x45')];var _0x21b0dc=_0xc060d[_0x792d('0x19')]['where'][_0x792d('0x46')];var _0x2277f6=_0xc060d['body']['where'][_0x792d('0x47')];return new Promise(function(_0x2d6641,_0x1a5111){return db[_0x792d('0x14')]['findAll']({'where':{'voiceQueueId':{'$in':_0x4a18ca},'recallme':0x1,'active':0x0,'recallmeNotifiedDate':{'$eq':null},'scheduledat':{'$and':{'$lte':db[_0x792d('0x22')][_0x792d('0x48')](_0x792d('0x49')+_0x21b0dc+_0x792d('0x4a')),'$gt':db[_0x792d('0x22')]['literal']('NOW()')}},'UserId':{'$in':_0x2277f6}},'include':[{'model':db[_0x792d('0x27')],'as':_0x792d('0x3d')},{'model':db[_0x792d('0x29')],'as':_0x792d('0x4b'),'attributes':['id','name','voicePause']},{'model':db['CmList'],'as':'List'}]})[_0x792d('0x16')](function(_0x2ff85a){if(_0x2ff85a['length']>0x0){return db['sequelize'][_0x792d('0x23')](function(_0x342930){return db[_0x792d('0x14')][_0x792d('0x1d')]({'recallmeNotifiedDate':db['sequelize'][_0x792d('0x48')]('NOW()')},{'where':{'id':{'$in':_[_0x792d('0xe')](_0x2ff85a,'id')}},'transaction':_0x342930})[_0x792d('0x16')](function(){_0x2d6641(_0x2ff85a);})[_0x792d('0x17')](function(_0x3671f0){logger[_0x792d('0x12')](_0x792d('0x44'),_0x3671f0[_0x792d('0x11')],_0xc060d);_0x1a5111(_0x147c56[_0x792d('0x12')](0x1f4,_0x3671f0[_0x792d('0x11')]));});})['catch'](function(_0x599437){logger[_0x792d('0x12')](_0x792d('0x44'),_0x599437[_0x792d('0x11')],_0xc060d);_0x1a5111(_0x147c56['error'](0x1f4,_0x599437[_0x792d('0x11')]));});}else{_0x2d6641(_0x2ff85a);}});});};
\ No newline at end of file
index 921725e..fdd8de5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0edf=['getTimezone','put','update','delete','destroy','exports','express','Router','../../components/auth/service','./cmHopper.controller','get','isAuthenticated','index','/describe','describe','/opencontacts','/timezones','/:id','/:id/previewrecall','getPreviewRecall','post','create','/preview','/timezone'];(function(_0x54ce59,_0x9ed087){var _0x3e2cbc=function(_0x5e3fcf){while(--_0x5e3fcf){_0x54ce59['push'](_0x54ce59['shift']());}};_0x3e2cbc(++_0x9ed087);}(_0x0edf,0x1e6));var _0xf0ed=function(_0x15bc81,_0x4d4f77){_0x15bc81=_0x15bc81-0x0;var _0x59440e=_0x0edf[_0x15bc81];return _0x59440e;};'use strict';var express=require(_0xf0ed('0x0'));var router=express[_0xf0ed('0x1')]();var auth=require(_0xf0ed('0x2'));var controller=require(_0xf0ed('0x3'));router[_0xf0ed('0x4')]('/',auth[_0xf0ed('0x5')](),controller[_0xf0ed('0x6')]);router[_0xf0ed('0x4')](_0xf0ed('0x7'),auth['isAuthenticated'](),controller[_0xf0ed('0x8')]);router[_0xf0ed('0x4')](_0xf0ed('0x9'),auth[_0xf0ed('0x5')](),controller['getOpenContacts']);router[_0xf0ed('0x4')](_0xf0ed('0xa'),auth['isAuthenticated'](),controller['getTimezones']);router['get'](_0xf0ed('0xb'),auth['isAuthenticated'](),controller['show']);router[_0xf0ed('0x4')](_0xf0ed('0xc'),auth[_0xf0ed('0x5')](),controller[_0xf0ed('0xd')]);router[_0xf0ed('0xe')]('/',auth[_0xf0ed('0x5')](),controller[_0xf0ed('0xf')]);router['post'](_0xf0ed('0x10'),auth[_0xf0ed('0x5')](),controller['getPreview']);router[_0xf0ed('0xe')](_0xf0ed('0x11'),auth[_0xf0ed('0x5')](),controller[_0xf0ed('0x12')]);router[_0xf0ed('0x13')](_0xf0ed('0xb'),auth[_0xf0ed('0x5')](),controller[_0xf0ed('0x14')]);router[_0xf0ed('0x15')](_0xf0ed('0xb'),auth[_0xf0ed('0x5')](),controller[_0xf0ed('0x16')]);module[_0xf0ed('0x17')]=router;
\ No newline at end of file
+var _0x5d9a=['express','get','isAuthenticated','index','/describe','describe','getOpenContacts','/timezones','getTimezones','/:id','show','/:id/previewrecall','getPreviewRecall','create','post','/preview','getPreview','/timezone','getTimezone','update','exports'];(function(_0x56948b,_0x2bb78f){var _0x34e02e=function(_0x36c33d){while(--_0x36c33d){_0x56948b['push'](_0x56948b['shift']());}};_0x34e02e(++_0x2bb78f);}(_0x5d9a,0xfc));var _0xa5d9=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x5d9a[_0x2dafbe];return _0x58a45a;};'use strict';var express=require(_0xa5d9('0x0'));var router=express['Router']();var auth=require('../../components/auth/service');var controller=require('./cmHopper.controller');router[_0xa5d9('0x1')]('/',auth[_0xa5d9('0x2')](),controller[_0xa5d9('0x3')]);router[_0xa5d9('0x1')](_0xa5d9('0x4'),auth[_0xa5d9('0x2')](),controller[_0xa5d9('0x5')]);router[_0xa5d9('0x1')]('/opencontacts',auth[_0xa5d9('0x2')](),controller[_0xa5d9('0x6')]);router[_0xa5d9('0x1')](_0xa5d9('0x7'),auth['isAuthenticated'](),controller[_0xa5d9('0x8')]);router['get'](_0xa5d9('0x9'),auth[_0xa5d9('0x2')](),controller[_0xa5d9('0xa')]);router[_0xa5d9('0x1')](_0xa5d9('0xb'),auth[_0xa5d9('0x2')](),controller[_0xa5d9('0xc')]);router['post']('/',auth[_0xa5d9('0x2')](),controller[_0xa5d9('0xd')]);router[_0xa5d9('0xe')](_0xa5d9('0xf'),auth['isAuthenticated'](),controller[_0xa5d9('0x10')]);router[_0xa5d9('0xe')](_0xa5d9('0x11'),auth['isAuthenticated'](),controller[_0xa5d9('0x12')]);router['put'](_0xa5d9('0x9'),auth['isAuthenticated'](),controller[_0xa5d9('0x13')]);router['delete'](_0xa5d9('0x9'),auth[_0xa5d9('0x2')](),controller['destroy']);module[_0xa5d9('0x14')]=router;
\ No newline at end of file
index c4a5fba..a275322 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xba7f=['YYYY-MM-DD\x20HH:mm:ss','moment','sequelize','INTEGER','STRING','DATE','format'];(function(_0x1ee5ef,_0x38d42b){var _0x448ab8=function(_0x508932){while(--_0x508932){_0x1ee5ef['push'](_0x1ee5ef['shift']());}};_0x448ab8(++_0x38d42b);}(_0xba7f,0xf6));var _0xfba7=function(_0x1c1fa8,_0x4e7944){_0x1c1fa8=_0x1c1fa8-0x0;var _0x50564a=_0xba7f[_0x1c1fa8];return _0x50564a;};'use strict';var moment=require(_0xfba7('0x0'));var Sequelize=require(_0xfba7('0x1'));module['exports']={'CmHopperId':{'type':Sequelize[_0xfba7('0x2')]},'phone':{'type':Sequelize[_0xfba7('0x3')],'allowNull':![]},'OrderBy':{'type':Sequelize[_0xfba7('0x2')],'defaultValue':0x0},'scheduledat':{'type':Sequelize[_0xfba7('0x4')],'defaultValue':moment()[_0xfba7('0x5')](_0xfba7('0x6'))},'countbusyretry':{'type':Sequelize[_0xfba7('0x2')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0xfba7('0x2')],'defaultValue':0x0},'countnosuchnumberretry':{'type':Sequelize[_0xfba7('0x2')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0xfba7('0x2')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0xfba7('0x2')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0xfba7('0x2')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x0836=['YYYY-MM-DD\x20HH:mm:ss','sequelize','exports','INTEGER','DATE','format'];(function(_0xa148b7,_0x2f3eb2){var _0x51efd3=function(_0x34bcec){while(--_0x34bcec){_0xa148b7['push'](_0xa148b7['shift']());}};_0x51efd3(++_0x2f3eb2);}(_0x0836,0x1e1));var _0x6083=function(_0x30e414,_0x4c5a98){_0x30e414=_0x30e414-0x0;var _0x195833=_0x0836[_0x30e414];return _0x195833;};'use strict';var moment=require('moment');var Sequelize=require(_0x6083('0x0'));module[_0x6083('0x1')]={'CmHopperId':{'type':Sequelize['INTEGER']},'phone':{'type':Sequelize['STRING'],'allowNull':![]},'OrderBy':{'type':Sequelize[_0x6083('0x2')],'defaultValue':0x0},'scheduledat':{'type':Sequelize[_0x6083('0x3')],'defaultValue':moment()[_0x6083('0x4')](_0x6083('0x5'))},'countbusyretry':{'type':Sequelize[_0x6083('0x2')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x6083('0x2')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x6083('0x2')],'defaultValue':0x0},'countnosuchnumberretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countdropretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x6083('0x2')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x6083('0x2')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0}};
\ No newline at end of file
index ee81f5a..038046e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8db6=['path','sox','ejs','fs-extra','squel','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','json','offset','undefined','limit','count','status','Content-Range','apply','reject','update','then','destroy','get','CmHopperAdditionalPhones','UserProfileResource','error','stack','name','send','map','CmHopperAdditionalPhone','rawAttributes','type','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','include','findAll','rows','catch','show','params','length','includeAll','body','user','role','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util'];(function(_0x39b813,_0x4d3ff2){var _0x1a7b8a=function(_0x451345){while(--_0x451345){_0x39b813['push'](_0x39b813['shift']());}};_0x1a7b8a(++_0x4d3ff2);}(_0x8db6,0xeb));var _0x68db=function(_0x22f8ab,_0x15d8ff){_0x22f8ab=_0x22f8ab-0x0;var _0x2a70e5=_0x8db6[_0x22f8ab];return _0x2a70e5;};'use strict';var emlformat=require(_0x68db('0x0'));var rimraf=require(_0x68db('0x1'));var zipdir=require(_0x68db('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x68db('0x3'));var moment=require(_0x68db('0x4'));var BPromise=require(_0x68db('0x5'));var Mustache=require(_0x68db('0x6'));var util=require(_0x68db('0x7'));var path=require(_0x68db('0x8'));var sox=require(_0x68db('0x9'));var csv=require('to-csv');var ejs=require(_0x68db('0xa'));var fs=require('fs');var fs_extra=require(_0x68db('0xb'));var _=require('lodash');var squel=require(_0x68db('0xc'));var crypto=require(_0x68db('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x68db('0xe'));var Papa=require(_0x68db('0xf'));var Redis=require(_0x68db('0x10'));var authService=require(_0x68db('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x68db('0x12'));var hardwareService=require(_0x68db('0x13'));var logger=require(_0x68db('0x14'))(_0x68db('0x15'));var utils=require(_0x68db('0x16'));var config=require(_0x68db('0x17'));var licenseUtil=require(_0x68db('0x18'));var db=require(_0x68db('0x19'))['db'];function respondWithStatusCode(_0x81bab8,_0x43e2a5){_0x43e2a5=_0x43e2a5||0xcc;return function(_0x418120){if(_0x418120){return _0x81bab8[_0x68db('0x1a')](_0x43e2a5);}return _0x81bab8['status'](_0x43e2a5)[_0x68db('0x1b')]();};}function respondWithResult(_0x56ba0e,_0x31b5e2){_0x31b5e2=_0x31b5e2||0xc8;return function(_0xc4c051){if(_0xc4c051){return _0x56ba0e['status'](_0x31b5e2)[_0x68db('0x1c')](_0xc4c051);}};}function respondWithFilteredResult(_0x2f5f03,_0x4540d7){return function(_0x2aad9d){if(_0x2aad9d){var _0x2720fc=typeof _0x4540d7[_0x68db('0x1d')]===_0x68db('0x1e')&&typeof _0x4540d7[_0x68db('0x1f')]==='undefined';var _0x173f3b=_0x2aad9d[_0x68db('0x20')];var _0x510634=_0x2720fc?0x0:_0x4540d7[_0x68db('0x1d')];var _0x51f201=_0x2720fc?_0x2aad9d[_0x68db('0x20')]:_0x4540d7['offset']+_0x4540d7[_0x68db('0x1f')];var _0x363261;if(_0x51f201>=_0x173f3b){_0x51f201=_0x173f3b;_0x363261=0xc8;}else{_0x363261=0xce;}_0x2f5f03[_0x68db('0x21')](_0x363261);return _0x2f5f03['set'](_0x68db('0x22'),_0x510634+'-'+_0x51f201+'/'+_0x173f3b)['json'](_0x2aad9d);}return null;};}function patchUpdates(_0x56a719){return function(_0x47c4e3){try{jsonpatch[_0x68db('0x23')](_0x47c4e3,_0x56a719,!![]);}catch(_0x463c1f){return BPromise[_0x68db('0x24')](_0x463c1f);}return _0x47c4e3['save']();};}function saveUpdates(_0x39b72d,_0x38f5a9){return function(_0xbbd238){if(_0xbbd238){return _0xbbd238[_0x68db('0x25')](_0x39b72d)[_0x68db('0x26')](function(_0x415056){return _0x415056;});}return null;};}function removeEntity(_0xc27d4c,_0x32ad0b){return function(_0x121b07){if(_0x121b07){return _0x121b07[_0x68db('0x27')]()[_0x68db('0x26')](function(){var _0x54b45b=_0x121b07[_0x68db('0x28')]({'plain':!![]});var _0x103087=_0x68db('0x29');return db[_0x68db('0x2a')][_0x68db('0x27')]({'where':{'type':_0x103087,'resourceId':_0x54b45b['id']}})['then'](function(){return _0x121b07;});})[_0x68db('0x26')](function(){_0xc27d4c[_0x68db('0x21')](0xcc)['end']();});}};}function handleEntityNotFound(_0xad0d1b,_0x4f2b16){return function(_0x4426c9){if(!_0x4426c9){_0xad0d1b[_0x68db('0x1a')](0x194);}return _0x4426c9;};}function handleError(_0xab00e9,_0x40754c){_0x40754c=_0x40754c||0x1f4;return function(_0x2c87ef){logger[_0x68db('0x2b')](_0x2c87ef[_0x68db('0x2c')]);if(_0x2c87ef[_0x68db('0x2d')]){delete _0x2c87ef[_0x68db('0x2d')];}_0xab00e9[_0x68db('0x21')](_0x40754c)[_0x68db('0x2e')](_0x2c87ef);};}exports['index']=function(_0x5163a6,_0x28c482){var _0x53041e={},_0x6a6b7e={},_0x1d654b={'count':0x0,'rows':[]};var _0x1c50f7=_[_0x68db('0x2f')](db[_0x68db('0x30')][_0x68db('0x31')],function(_0x16f43f){return{'name':_0x16f43f['fieldName'],'type':_0x16f43f[_0x68db('0x32')]['key']};});_0x6a6b7e[_0x68db('0x33')]=_[_0x68db('0x2f')](_0x1c50f7,'name');_0x6a6b7e[_0x68db('0x34')]=_[_0x68db('0x35')](_0x5163a6[_0x68db('0x34')]);_0x6a6b7e[_0x68db('0x36')]=_[_0x68db('0x37')](_0x6a6b7e[_0x68db('0x33')],_0x6a6b7e[_0x68db('0x34')]);_0x53041e[_0x68db('0x38')]=_[_0x68db('0x37')](_0x6a6b7e[_0x68db('0x33')],qs[_0x68db('0x39')](_0x5163a6[_0x68db('0x34')]['fields']));_0x53041e[_0x68db('0x38')]=_0x53041e['attributes']['length']?_0x53041e[_0x68db('0x38')]:_0x6a6b7e['model'];if(!_0x5163a6[_0x68db('0x34')][_0x68db('0x3a')](_0x68db('0x3b'))){_0x53041e[_0x68db('0x1f')]=qs[_0x68db('0x1f')](_0x5163a6[_0x68db('0x34')][_0x68db('0x1f')]);_0x53041e[_0x68db('0x1d')]=qs[_0x68db('0x1d')](_0x5163a6[_0x68db('0x34')][_0x68db('0x1d')]);}_0x53041e['order']=qs[_0x68db('0x3c')](_0x5163a6[_0x68db('0x34')][_0x68db('0x3c')]);_0x53041e[_0x68db('0x3d')]=qs[_0x68db('0x36')](_[_0x68db('0x3e')](_0x5163a6[_0x68db('0x34')],_0x6a6b7e[_0x68db('0x36')]),_0x1c50f7);if(_0x5163a6[_0x68db('0x34')][_0x68db('0x3f')]){_0x53041e[_0x68db('0x3d')]=_[_0x68db('0x40')](_0x53041e[_0x68db('0x3d')],{'$or':_['map'](_0x1c50f7,function(_0x57005e){if(_0x57005e[_0x68db('0x32')]!==_0x68db('0x41')){var _0x5ed191={};_0x5ed191[_0x57005e[_0x68db('0x2d')]]={'$like':'%'+_0x5163a6[_0x68db('0x34')][_0x68db('0x3f')]+'%'};return _0x5ed191;}})});}_0x53041e=_[_0x68db('0x40')]({},_0x53041e,_0x5163a6['options']);var _0x1181f7={'where':_0x53041e['where']};return db[_0x68db('0x30')][_0x68db('0x20')](_0x1181f7)['then'](function(_0x444be6){_0x1d654b[_0x68db('0x20')]=_0x444be6;if(_0x5163a6[_0x68db('0x34')]['includeAll']){_0x53041e[_0x68db('0x42')]=[{'all':!![]}];}return db[_0x68db('0x30')][_0x68db('0x43')](_0x53041e);})['then'](function(_0x2dd10f){_0x1d654b[_0x68db('0x44')]=_0x2dd10f;return _0x1d654b;})[_0x68db('0x26')](respondWithFilteredResult(_0x28c482,_0x53041e))[_0x68db('0x45')](handleError(_0x28c482,null));};exports[_0x68db('0x46')]=function(_0x388fea,_0x481dab){var _0x55f771={'raw':!![],'where':{'id':_0x388fea[_0x68db('0x47')]['id']}},_0x196f48={};_0x196f48[_0x68db('0x33')]=_[_0x68db('0x35')](db['CmHopperAdditionalPhone'][_0x68db('0x31')]);_0x196f48[_0x68db('0x34')]=_['keys'](_0x388fea[_0x68db('0x34')]);_0x196f48['filters']=_[_0x68db('0x37')](_0x196f48[_0x68db('0x33')],_0x196f48[_0x68db('0x34')]);_0x55f771[_0x68db('0x38')]=_['intersection'](_0x196f48[_0x68db('0x33')],qs[_0x68db('0x39')](_0x388fea['query'][_0x68db('0x39')]));_0x55f771[_0x68db('0x38')]=_0x55f771[_0x68db('0x38')][_0x68db('0x48')]?_0x55f771[_0x68db('0x38')]:_0x196f48[_0x68db('0x33')];if(_0x388fea['query'][_0x68db('0x49')]){_0x55f771['include']=[{'all':!![]}];}_0x55f771=_[_0x68db('0x40')]({},_0x55f771,_0x388fea['options']);return db[_0x68db('0x30')]['find'](_0x55f771)['then'](handleEntityNotFound(_0x481dab,null))[_0x68db('0x26')](respondWithResult(_0x481dab,null))[_0x68db('0x45')](handleError(_0x481dab,null));};exports['create']=function(_0x55153f,_0x2fdc66){return db[_0x68db('0x30')]['create'](_0x55153f[_0x68db('0x4a')],{})[_0x68db('0x26')](function(_0x118a8c){var _0x59cebe=_0x55153f[_0x68db('0x4b')][_0x68db('0x28')]({'plain':!![]});if(!_0x59cebe)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x59cebe[_0x68db('0x4c')]===_0x68db('0x4b')){var _0x406aac=_0x118a8c[_0x68db('0x28')]({'plain':!![]});var _0x2176a3=_0x68db('0x29');return db['UserProfileSection'][_0x68db('0x4d')]({'where':{'name':_0x2176a3,'userProfileId':_0x59cebe[_0x68db('0x4e')]},'raw':!![]})['then'](function(_0x43526f){if(_0x43526f&&_0x43526f[_0x68db('0x4f')]===0x0){return db[_0x68db('0x2a')]['create']({'name':_0x406aac['name'],'resourceId':_0x406aac['id'],'type':_0x43526f[_0x68db('0x2d')],'sectionId':_0x43526f['id']},{})[_0x68db('0x26')](function(){return _0x118a8c;});}else{return _0x118a8c;}})[_0x68db('0x45')](function(_0x2546d2){logger['error'](_0x68db('0x50'),_0x2546d2);throw _0x2546d2;});}return _0x118a8c;})[_0x68db('0x26')](respondWithResult(_0x2fdc66,0xc9))[_0x68db('0x45')](handleError(_0x2fdc66,null));};exports['update']=function(_0x47820a,_0x241d0a){if(_0x47820a['body']['id']){delete _0x47820a[_0x68db('0x4a')]['id'];}return db[_0x68db('0x30')]['find']({'where':{'id':_0x47820a[_0x68db('0x47')]['id']}})[_0x68db('0x26')](handleEntityNotFound(_0x241d0a,null))['then'](saveUpdates(_0x47820a[_0x68db('0x4a')],null))[_0x68db('0x26')](respondWithResult(_0x241d0a,null))['catch'](handleError(_0x241d0a,null));};exports[_0x68db('0x27')]=function(_0x42ebc7,_0x48d146){return db[_0x68db('0x30')][_0x68db('0x4d')]({'where':{'id':_0x42ebc7['params']['id']}})[_0x68db('0x26')](handleEntityNotFound(_0x48d146,null))['then'](removeEntity(_0x48d146,null))['catch'](handleError(_0x48d146,null));};
\ No newline at end of file
+var _0x756f=['catch','create','user','get','role','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','eml-format','rimraf','zip-dir','fast-json-patch','bluebird','mustache','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','end','json','offset','undefined','count','limit','Content-Range','reject','save','then','destroy','CmHopperAdditionalPhones','UserProfileResource','status','sendStatus','stack','name','send','index','type','key','model','map','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','filter','options','CmHopperAdditionalPhone','includeAll','include','findAll','show','params','rawAttributes','find'];(function(_0x2a74a6,_0x10592f){var _0xc2e34a=function(_0x8497c9){while(--_0x8497c9){_0x2a74a6['push'](_0x2a74a6['shift']());}};_0xc2e34a(++_0x10592f);}(_0x756f,0x14f));var _0xf756=function(_0x2c7303,_0x1078d0){_0x2c7303=_0x2c7303-0x0;var _0x13e564=_0x756f[_0x2c7303];return _0x13e564;};'use strict';var emlformat=require(_0xf756('0x0'));var rimraf=require(_0xf756('0x1'));var zipdir=require(_0xf756('0x2'));var jsonpatch=require(_0xf756('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xf756('0x4'));var Mustache=require(_0xf756('0x5'));var util=require('util');var path=require('path');var sox=require(_0xf756('0x6'));var csv=require(_0xf756('0x7'));var ejs=require(_0xf756('0x8'));var fs=require('fs');var fs_extra=require(_0xf756('0x9'));var _=require(_0xf756('0xa'));var squel=require('squel');var crypto=require(_0xf756('0xb'));var jsforce=require(_0xf756('0xc'));var deskjs=require(_0xf756('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xf756('0xe'));var Redis=require(_0xf756('0xf'));var authService=require('../../components/auth/service');var qs=require(_0xf756('0x10'));var as=require(_0xf756('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xf756('0x12'))(_0xf756('0x13'));var utils=require(_0xf756('0x14'));var config=require(_0xf756('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0xf756('0x16'))['db'];function respondWithStatusCode(_0x985c7b,_0x57520a){_0x57520a=_0x57520a||0xcc;return function(_0x52572a){if(_0x52572a){return _0x985c7b['sendStatus'](_0x57520a);}return _0x985c7b['status'](_0x57520a)[_0xf756('0x17')]();};}function respondWithResult(_0x7c8ed3,_0xcfa6b0){_0xcfa6b0=_0xcfa6b0||0xc8;return function(_0x127b9b){if(_0x127b9b){return _0x7c8ed3['status'](_0xcfa6b0)[_0xf756('0x18')](_0x127b9b);}};}function respondWithFilteredResult(_0x233631,_0x174a84){return function(_0x21560c){if(_0x21560c){var _0x109550=typeof _0x174a84[_0xf756('0x19')]===_0xf756('0x1a')&&typeof _0x174a84['limit']==='undefined';var _0x2fdec0=_0x21560c[_0xf756('0x1b')];var _0x4e29b9=_0x109550?0x0:_0x174a84[_0xf756('0x19')];var _0x43bdd8=_0x109550?_0x21560c[_0xf756('0x1b')]:_0x174a84[_0xf756('0x19')]+_0x174a84[_0xf756('0x1c')];var _0x5d1a47;if(_0x43bdd8>=_0x2fdec0){_0x43bdd8=_0x2fdec0;_0x5d1a47=0xc8;}else{_0x5d1a47=0xce;}_0x233631['status'](_0x5d1a47);return _0x233631['set'](_0xf756('0x1d'),_0x4e29b9+'-'+_0x43bdd8+'/'+_0x2fdec0)[_0xf756('0x18')](_0x21560c);}return null;};}function patchUpdates(_0x1ea5bd){return function(_0x16679d){try{jsonpatch['apply'](_0x16679d,_0x1ea5bd,!![]);}catch(_0x59b17b){return BPromise[_0xf756('0x1e')](_0x59b17b);}return _0x16679d[_0xf756('0x1f')]();};}function saveUpdates(_0x14ba61,_0x703605){return function(_0x3b1c35){if(_0x3b1c35){return _0x3b1c35['update'](_0x14ba61)[_0xf756('0x20')](function(_0x4a0055){return _0x4a0055;});}return null;};}function removeEntity(_0x7d754e,_0x159ef9){return function(_0x1be4f9){if(_0x1be4f9){return _0x1be4f9[_0xf756('0x21')]()['then'](function(){var _0xd9bfcd=_0x1be4f9['get']({'plain':!![]});var _0x23edbf=_0xf756('0x22');return db[_0xf756('0x23')]['destroy']({'where':{'type':_0x23edbf,'resourceId':_0xd9bfcd['id']}})[_0xf756('0x20')](function(){return _0x1be4f9;});})['then'](function(){_0x7d754e[_0xf756('0x24')](0xcc)[_0xf756('0x17')]();});}};}function handleEntityNotFound(_0x94d546,_0x173ca8){return function(_0x5c392c){if(!_0x5c392c){_0x94d546[_0xf756('0x25')](0x194);}return _0x5c392c;};}function handleError(_0x14ec29,_0x4fd50a){_0x4fd50a=_0x4fd50a||0x1f4;return function(_0x19a4da){logger['error'](_0x19a4da[_0xf756('0x26')]);if(_0x19a4da[_0xf756('0x27')]){delete _0x19a4da['name'];}_0x14ec29[_0xf756('0x24')](_0x4fd50a)[_0xf756('0x28')](_0x19a4da);};}exports[_0xf756('0x29')]=function(_0x53d5fe,_0x122d56){var _0x113969={},_0x14bd0e={},_0x3f8804={'count':0x0,'rows':[]};var _0x1c54b3=_['map'](db['CmHopperAdditionalPhone']['rawAttributes'],function(_0x352757){return{'name':_0x352757['fieldName'],'type':_0x352757[_0xf756('0x2a')][_0xf756('0x2b')]};});_0x14bd0e[_0xf756('0x2c')]=_[_0xf756('0x2d')](_0x1c54b3,_0xf756('0x27'));_0x14bd0e[_0xf756('0x2e')]=_[_0xf756('0x2f')](_0x53d5fe['query']);_0x14bd0e[_0xf756('0x30')]=_['intersection'](_0x14bd0e[_0xf756('0x2c')],_0x14bd0e[_0xf756('0x2e')]);_0x113969[_0xf756('0x31')]=_[_0xf756('0x32')](_0x14bd0e[_0xf756('0x2c')],qs[_0xf756('0x33')](_0x53d5fe['query']['fields']));_0x113969['attributes']=_0x113969['attributes'][_0xf756('0x34')]?_0x113969[_0xf756('0x31')]:_0x14bd0e[_0xf756('0x2c')];if(!_0x53d5fe['query'][_0xf756('0x35')](_0xf756('0x36'))){_0x113969['limit']=qs['limit'](_0x53d5fe['query'][_0xf756('0x1c')]);_0x113969['offset']=qs['offset'](_0x53d5fe[_0xf756('0x2e')][_0xf756('0x19')]);}_0x113969[_0xf756('0x37')]=qs[_0xf756('0x38')](_0x53d5fe[_0xf756('0x2e')]['sort']);_0x113969[_0xf756('0x39')]=qs[_0xf756('0x30')](_[_0xf756('0x3a')](_0x53d5fe[_0xf756('0x2e')],_0x14bd0e['filters']),_0x1c54b3);if(_0x53d5fe['query']['filter']){_0x113969[_0xf756('0x39')]=_[_0xf756('0x3b')](_0x113969[_0xf756('0x39')],{'$or':_[_0xf756('0x2d')](_0x1c54b3,function(_0x25ef9e){if(_0x25ef9e[_0xf756('0x2a')]!=='VIRTUAL'){var _0x4883ad={};_0x4883ad[_0x25ef9e[_0xf756('0x27')]]={'$like':'%'+_0x53d5fe['query'][_0xf756('0x3c')]+'%'};return _0x4883ad;}})});}_0x113969=_[_0xf756('0x3b')]({},_0x113969,_0x53d5fe[_0xf756('0x3d')]);var _0x41ae0d={'where':_0x113969[_0xf756('0x39')]};return db[_0xf756('0x3e')][_0xf756('0x1b')](_0x41ae0d)[_0xf756('0x20')](function(_0x450fde){_0x3f8804[_0xf756('0x1b')]=_0x450fde;if(_0x53d5fe[_0xf756('0x2e')][_0xf756('0x3f')]){_0x113969[_0xf756('0x40')]=[{'all':!![]}];}return db[_0xf756('0x3e')][_0xf756('0x41')](_0x113969);})[_0xf756('0x20')](function(_0x3d3f7d){_0x3f8804['rows']=_0x3d3f7d;return _0x3f8804;})['then'](respondWithFilteredResult(_0x122d56,_0x113969))['catch'](handleError(_0x122d56,null));};exports[_0xf756('0x42')]=function(_0x5d2709,_0x5aad95){var _0x48c905={'raw':!![],'where':{'id':_0x5d2709[_0xf756('0x43')]['id']}},_0x4bab46={};_0x4bab46[_0xf756('0x2c')]=_['keys'](db['CmHopperAdditionalPhone'][_0xf756('0x44')]);_0x4bab46[_0xf756('0x2e')]=_[_0xf756('0x2f')](_0x5d2709['query']);_0x4bab46[_0xf756('0x30')]=_[_0xf756('0x32')](_0x4bab46['model'],_0x4bab46[_0xf756('0x2e')]);_0x48c905[_0xf756('0x31')]=_[_0xf756('0x32')](_0x4bab46[_0xf756('0x2c')],qs['fields'](_0x5d2709['query'][_0xf756('0x33')]));_0x48c905['attributes']=_0x48c905[_0xf756('0x31')][_0xf756('0x34')]?_0x48c905['attributes']:_0x4bab46[_0xf756('0x2c')];if(_0x5d2709['query'][_0xf756('0x3f')]){_0x48c905[_0xf756('0x40')]=[{'all':!![]}];}_0x48c905=_['merge']({},_0x48c905,_0x5d2709['options']);return db[_0xf756('0x3e')][_0xf756('0x45')](_0x48c905)[_0xf756('0x20')](handleEntityNotFound(_0x5aad95,null))[_0xf756('0x20')](respondWithResult(_0x5aad95,null))[_0xf756('0x46')](handleError(_0x5aad95,null));};exports[_0xf756('0x47')]=function(_0x4d40bf,_0x251d72){return db[_0xf756('0x3e')]['create'](_0x4d40bf['body'],{})[_0xf756('0x20')](function(_0x385aba){var _0x2f8106=_0x4d40bf[_0xf756('0x48')][_0xf756('0x49')]({'plain':!![]});if(!_0x2f8106)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x2f8106[_0xf756('0x4a')]==='user'){var _0x258af4=_0x385aba[_0xf756('0x49')]({'plain':!![]});var _0x452fb0='CmHopperAdditionalPhones';return db['UserProfileSection']['find']({'where':{'name':_0x452fb0,'userProfileId':_0x2f8106[_0xf756('0x4b')]},'raw':!![]})[_0xf756('0x20')](function(_0x122c76){if(_0x122c76&&_0x122c76[_0xf756('0x4c')]===0x0){return db['UserProfileResource'][_0xf756('0x47')]({'name':_0x258af4[_0xf756('0x27')],'resourceId':_0x258af4['id'],'type':_0x122c76['name'],'sectionId':_0x122c76['id']},{})['then'](function(){return _0x385aba;});}else{return _0x385aba;}})[_0xf756('0x46')](function(_0x37a3f6){logger[_0xf756('0x4d')](_0xf756('0x4e'),_0x37a3f6);throw _0x37a3f6;});}return _0x385aba;})[_0xf756('0x20')](respondWithResult(_0x251d72,0xc9))[_0xf756('0x46')](handleError(_0x251d72,null));};exports[_0xf756('0x4f')]=function(_0x4937f5,_0x200776){if(_0x4937f5[_0xf756('0x50')]['id']){delete _0x4937f5['body']['id'];}return db['CmHopperAdditionalPhone'][_0xf756('0x45')]({'where':{'id':_0x4937f5[_0xf756('0x43')]['id']}})['then'](handleEntityNotFound(_0x200776,null))[_0xf756('0x20')](saveUpdates(_0x4937f5['body'],null))[_0xf756('0x20')](respondWithResult(_0x200776,null))[_0xf756('0x46')](handleError(_0x200776,null));};exports[_0xf756('0x21')]=function(_0x53a736,_0x5c272f){return db[_0xf756('0x3e')]['find']({'where':{'id':_0x53a736['params']['id']}})[_0xf756('0x20')](handleEntityNotFound(_0x5c272f,null))[_0xf756('0x20')](removeEntity(_0x5c272f,null))[_0xf756('0x46')](handleError(_0x5c272f,null));};
\ No newline at end of file
index 2eeefd8..ab50f10 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb1ae=['exports','define','cm_hopper_additional_phones','lodash','api','moment','bluebird','rimraf','./cmHopperAdditionalPhone.attributes'];(function(_0x573ae1,_0x11b4cc){var _0x48b9f9=function(_0x13f570){while(--_0x13f570){_0x573ae1['push'](_0x573ae1['shift']());}};_0x48b9f9(++_0x11b4cc);}(_0xb1ae,0x1bc));var _0xeb1a=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xb1ae[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0xeb1a('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xeb1a('0x1'));var moment=require(_0xeb1a('0x2'));var BPromise=require(_0xeb1a('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xeb1a('0x4'));var config=require('../../config/environment');var attributes=require(_0xeb1a('0x5'));module[_0xeb1a('0x6')]=function(_0x44e30f,_0x3b1206){return _0x44e30f[_0xeb1a('0x7')]('CmHopperAdditionalPhone',attributes,{'tableName':_0xeb1a('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc635=['define','CmHopperAdditionalPhone','cm_hopper_additional_phones','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment'];(function(_0x395723,_0x1553a2){var _0x9b7073=function(_0x3ec8e8){while(--_0x3ec8e8){_0x395723['push'](_0x395723['shift']());}};_0x9b7073(++_0x1553a2);}(_0xc635,0x1b3));var _0x5c63=function(_0x4b1a63,_0x16a0ca){_0x4b1a63=_0x4b1a63-0x0;var _0x5c7412=_0xc635[_0x4b1a63];return _0x5c7412;};'use strict';var _=require(_0x5c63('0x0'));var util=require(_0x5c63('0x1'));var logger=require(_0x5c63('0x2'))(_0x5c63('0x3'));var moment=require(_0x5c63('0x4'));var BPromise=require('bluebird');var rp=require(_0x5c63('0x5'));var fs=require('fs');var path=require(_0x5c63('0x6'));var rimraf=require(_0x5c63('0x7'));var config=require(_0x5c63('0x8'));var attributes=require('./cmHopperAdditionalPhone.attributes');module['exports']=function(_0x549ce4,_0x548c56){return _0x549ce4[_0x5c63('0x9')](_0x5c63('0xa'),attributes,{'tableName':_0x5c63('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 368bedb..74b4a6f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1042=['updatedAt','transaction','update','activateAdditionalPhone','IncrementPreviewCounters','field','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','CmHopperAdditionalPhone,\x20%s,\x20%s,\x20%s','stringify','error','code','CmHopperAdditionalPhone,\x20%s,\x20%s','message','result','VerifyAdditionalPhones','CmHopper','body','VoiceQueueId','CampaignId','CmHopperAdditionalPhone','findOne','OrderBy','countbusyretry','countcongestionretry','countdropretry','countmachineretry','countagentrejectretry','entity','dialGlobalMaxRetry','ASC','countnosuchnumberretry','countabandonedretry','catch','SwapAdditionalPhones','duration','waitTime','isNil','scheduledat','add','minutes','phone','countnoanswerretry','createdAt'];(function(_0x8de54f,_0x271987){var _0x14cba4=function(_0x58ed41){while(--_0x58ed41){_0x8de54f['push'](_0x8de54f['shift']());}};_0x14cba4(++_0x271987);}(_0x1042,0x1de));var _0x2104=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x1042[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x2104('0x0'));var util=require(_0x2104('0x1'));var moment=require(_0x2104('0x2'));var BPromise=require(_0x2104('0x3'));var rs=require(_0x2104('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x2104('0x5'));var logger=require(_0x2104('0x6'))(_0x2104('0x7'));var config=require(_0x2104('0x8'));var jayson=require(_0x2104('0x9'));var client=jayson[_0x2104('0xa')][_0x2104('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x18b491,_0x543b64,_0x397603){return new BPromise(function(_0x1f6927,_0x5897da){return client[_0x2104('0xc')](_0x18b491,_0x397603)[_0x2104('0xd')](function(_0x16f93f){logger[_0x2104('0xe')]('CmHopperAdditionalPhone,\x20%s,\x20%s',_0x543b64,_0x2104('0xf'));logger[_0x2104('0x10')](_0x2104('0x11'),_0x543b64,_0x2104('0xf'),JSON[_0x2104('0x12')](_0x16f93f));if(_0x16f93f['error']){if(_0x16f93f[_0x2104('0x13')][_0x2104('0x14')]===0x1f4){logger[_0x2104('0x13')]('CmHopperAdditionalPhone,\x20%s,\x20%s',_0x543b64,_0x16f93f[_0x2104('0x13')]['message']);return _0x5897da(_0x16f93f[_0x2104('0x13')]['message']);}logger[_0x2104('0x13')](_0x2104('0x15'),_0x543b64,_0x16f93f[_0x2104('0x13')]['message']);return _0x1f6927(_0x16f93f[_0x2104('0x13')][_0x2104('0x16')]);}else{logger[_0x2104('0xe')]('CmHopperAdditionalPhone,\x20%s,\x20%s',_0x543b64,_0x2104('0xf'));_0x1f6927(_0x16f93f[_0x2104('0x17')][_0x2104('0x16')]);}})['catch'](function(_0x3fea9b){logger[_0x2104('0x13')](_0x2104('0x15'),_0x543b64,_0x3fea9b);_0x5897da(_0x3fea9b);});});}exports[_0x2104('0x18')]=function(_0x39258d){var _0x4b5319=this;return new Promise(function(_0x10e9c7,_0x43130c){return db[_0x2104('0x19')]['findOne']({'raw':!![],'where':{'ContactId':_0x39258d[_0x2104('0x1a')]['ContactId'],'ListId':_0x39258d[_0x2104('0x1a')]['ListId'],'VoiceQueueId':_0x39258d[_0x2104('0x1a')][_0x2104('0x1b')]===undefined?null:_0x39258d[_0x2104('0x1a')]['VoiceQueueId'],'CampaignId':_0x39258d[_0x2104('0x1a')][_0x2104('0x1c')]===undefined?null:_0x39258d['body'][_0x2104('0x1c')]}})[_0x2104('0xd')](function(_0x571e0e){if(_0x571e0e!=null){return db[_0x2104('0x1d')][_0x2104('0x1e')]({'raw':!![],'where':{'CmHopperId':_0x571e0e['id'],'OrderBy':{'$gt':_0x571e0e[_0x2104('0x1f')]}},'order':[[_0x2104('0x1f'),'ASC']]})[_0x2104('0xd')](function(_0x10045b){var _0x189773=0x0;if(_0x10045b){if(_0x10045b[_0x2104('0x20')]+_0x10045b[_0x2104('0x21')]+_0x10045b['countnoanswerretry']+_0x10045b['countnosuchnumberretry']+_0x10045b[_0x2104('0x22')]+_0x10045b['countabandonedretry']+_0x10045b[_0x2104('0x23')]+_0x10045b[_0x2104('0x24')]<_0x39258d[_0x2104('0x25')][_0x2104('0x26')])_0x189773=0x1;_0x10e9c7({'additional':_0x189773});}else{return db[_0x2104('0x1d')][_0x2104('0x1e')]({'raw':!![],'where':{'CmHopperId':_0x571e0e['id']},'order':[[_0x2104('0x1f'),_0x2104('0x27')]]})[_0x2104('0xd')](function(_0x6a1897){var _0x525723=0x0;if(_0x6a1897){if(_0x6a1897[_0x2104('0x20')]+_0x6a1897[_0x2104('0x21')]+_0x6a1897['countnoanswerretry']+_0x6a1897[_0x2104('0x28')]+_0x6a1897[_0x2104('0x22')]+_0x6a1897[_0x2104('0x29')]+_0x6a1897['countmachineretry']+_0x6a1897[_0x2104('0x24')]<_0x39258d[_0x2104('0x25')]['dialGlobalMaxRetry'])_0x525723=0x1;_0x10e9c7({'additional':_0x525723});}else{_0x10e9c7({'additional':0x0});}})[_0x2104('0x2a')](function(_0xa4018e){logger['error'](_0x2104('0x18'),_0xa4018e['message']);_0x43130c(_0x4b5319[_0x2104('0x13')](0x1f4,_0xa4018e[_0x2104('0x16')]));});}})[_0x2104('0x2a')](function(_0x2b23af){logger[_0x2104('0x13')]('VerifyAdditionalPhones',_0x2b23af[_0x2104('0x16')]);_0x43130c(_0x4b5319['error'](0x1f4,_0x2b23af[_0x2104('0x16')]));});}else _0x10e9c7({'additional':0x0});});});};exports[_0x2104('0x2b')]=function(_0x824d80){var _0x35335e=this;return new Promise(function(_0x128804,_0xd7f39a){return db[_0x2104('0x19')][_0x2104('0x1e')]({'raw':!![],'where':{'ContactId':_0x824d80[_0x2104('0x1a')]['ContactId'],'ListId':_0x824d80[_0x2104('0x1a')]['ListId'],'VoiceQueueId':_0x824d80[_0x2104('0x1a')][_0x2104('0x1b')]===undefined?null:_0x824d80[_0x2104('0x1a')]['VoiceQueueId'],'CampaignId':_0x824d80[_0x2104('0x1a')]['CampaignId']===undefined?null:_0x824d80['body'][_0x2104('0x1c')]}})['then'](function(_0x433371){if(_0x433371!=null){return db['CmHopperAdditionalPhone']['findOne']({'raw':!![],'where':{'CmHopperId':_0x433371['id'],'OrderBy':{'$gte':_0x433371[_0x2104('0x1f')]}},'order':[['OrderBy',_0x2104('0x27')]]})[_0x2104('0xd')](function(_0x475e59){if(_0x475e59)return activateAdditionalPhone(_0x433371,_0x824d80[_0x2104('0x1a')],_0x475e59,_0x824d80['duration'],_0x824d80['waitTime'])[_0x2104('0xd')](function(_0x12b419){_0x128804(_0x12b419);});else{return db['CmHopperAdditionalPhone'][_0x2104('0x1e')]({'raw':!![],'where':{'CmHopperId':_0x433371['id']},'order':[['OrderBy',_0x2104('0x27')]]})[_0x2104('0xd')](function(_0x40ab90){if(_0x40ab90)return activateAdditionalPhone(_0x433371,_0x824d80[_0x2104('0x1a')],_0x40ab90,_0x824d80[_0x2104('0x2c')],_0x824d80[_0x2104('0x2d')])[_0x2104('0xd')](function(_0x38bb51){_0x128804(_0x38bb51);});else{_0x128804({'id':_0x433371['id'],'phone':''});}})[_0x2104('0x2a')](function(_0x28a4d8){logger[_0x2104('0x13')](_0x2104('0x18'),_0x28a4d8['message']);_0xd7f39a(_0x35335e[_0x2104('0x13')](0x1f4,_0x28a4d8['message']));});}})[_0x2104('0x2a')](function(_0x32e3ac){logger[_0x2104('0x13')](_0x2104('0x18'),_0x32e3ac[_0x2104('0x16')]);_0xd7f39a(_0x35335e[_0x2104('0x13')](0x1f4,_0x32e3ac[_0x2104('0x16')]));});}else _0x128804(0x1);});});};function activateAdditionalPhone(_0x28ffe7,_0x5cbe64,_0x32798e,_0x35b919,_0x4c412b){return new Promise(function(_0x3cbfa8,_0x15615e){var _0x89327e;if(_[_0x2104('0x2e')](_0x32798e['scheduledat'])){_0x32798e[_0x2104('0x2f')]=moment();}if(moment()>moment(_0x32798e[_0x2104('0x2f')])){_0x89327e=moment()[_0x2104('0x30')](_0x4c412b||0x3,_0x2104('0x31'));}else{if(_0x32798e[_0x2104('0x1f')]==0x0){_0x89327e=moment(_0x32798e['scheduledat']);}else{_0x89327e=moment()[_0x2104('0x30')](_0x4c412b||0x3,_0x2104('0x31'));}}if(_[_0x2104('0x2e')](_0x89327e)){_0x89327e=moment()[_0x2104('0x30')](_0x4c412b||0x3,_0x2104('0x31'));}var _0x5ab0c9={'phone':_0x28ffe7[_0x2104('0x32')],'active':0x0,'OrderBy':_[_0x2104('0x2e')](_0x28ffe7[_0x2104('0x1f')])?0x0:_0x28ffe7[_0x2104('0x1f')],'scheduledat':moment()['add'](_0x35b919||0x1,'minutes'),'countbusyretry':_0x5cbe64[_0x2104('0x20')],'countcongestionretry':_0x5cbe64[_0x2104('0x21')],'countnoanswerretry':_0x5cbe64[_0x2104('0x33')],'countnosuchnumberretry':_0x5cbe64[_0x2104('0x28')],'countdropretry':_0x5cbe64[_0x2104('0x22')],'countabandonedretry':_0x5cbe64['countabandonedretry'],'countmachineretry':_0x5cbe64[_0x2104('0x23')],'countagentrejectretry':_0x5cbe64['countagentrejectretry'],'createdAt':_0x5cbe64[_0x2104('0x34')],'updatedAt':_0x5cbe64[_0x2104('0x35')]};var _0x2ce3f8={'CmHopperId':_0x28ffe7['id'],'phone':_0x32798e['phone'],'active':0x0,'OrderBy':_['isNil'](_0x32798e[_0x2104('0x1f')])?0x0:_0x32798e[_0x2104('0x1f')],'scheduledat':_0x89327e,'countbusyretry':_0x32798e[_0x2104('0x20')],'countcongestionretry':_0x32798e['countcongestionretry'],'countnoanswerretry':_0x32798e['countnoanswerretry'],'countnosuchnumberretry':_0x32798e['countnosuchnumberretry'],'countdropretry':_0x32798e['countdropretry'],'countabandonedretry':_0x32798e[_0x2104('0x29')],'countmachineretry':_0x32798e[_0x2104('0x23')],'countagentrejectretry':_0x32798e[_0x2104('0x24')],'createdAt':_0x32798e['createdAt'],'updatedAt':_0x32798e[_0x2104('0x35')]};return db['sequelize'][_0x2104('0x36')](function(_0x5db048){return db['CmHopperAdditionalPhone'][_0x2104('0x37')](_0x5ab0c9,{'where':{'id':_0x32798e['id']}},{'transaction':_0x5db048})['then'](function(){return db[_0x2104('0x19')][_0x2104('0x37')](_0x2ce3f8,{'where':{'id':_0x28ffe7['id']}},{'transaction':_0x5db048});});})[_0x2104('0xd')](function(_0x393c63){_0x3cbfa8({'id':_0x28ffe7['id'],'phone':_0x32798e['phone']});})[_0x2104('0x2a')](function(_0x2d51a2){logger[_0x2104('0x13')](_0x2104('0x38'),_0x2d51a2['message']);_0x15615e({'error':_0x2d51a2[_0x2104('0x16')]});});});}exports[_0x2104('0x39')]=function(_0x4fc5d8){var _0x1caf57=this;return new Promise(function(_0x5cc000,_0x3e159f){return db[_0x2104('0x19')][_0x2104('0x37')](_0x4fc5d8['body'][_0x2104('0x3a')],{'where':{'id':_0x4fc5d8[_0x2104('0x1a')]['id']}})['then'](function(_0x160926){_0x5cc000(_0x160926);})[_0x2104('0x2a')](function(_0x57992b){logger[_0x2104('0x13')](_0x2104('0x39'),_0x57992b['message']);_0x3e159f(_0x1caf57[_0x2104('0x13')](0x1f4,_0x57992b[_0x2104('0x16')]));});});};
\ No newline at end of file
+var _0xfcb9=['countnoanswerretry','countnosuchnumberretry','countabandonedretry','countmachineretry','entity','dialGlobalMaxRetry','countdropretry','countagentrejectretry','CmHopper','ListId','duration','waitTime','isNil','scheduledat','add','minutes','phone','updatedAt','createdAt','transaction','IncrementPreviewCounters','lodash','util','bluebird','randomstring','../../config/logger','rpc','jayson/promise','client','http','request','then','info','CmHopperAdditionalPhone,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','catch','VerifyAdditionalPhones','findOne','ContactId','body','VoiceQueueId','CampaignId','CmHopperAdditionalPhone','OrderBy','ASC','countbusyretry','countcongestionretry'];(function(_0x33032e,_0x31411a){var _0x13316b=function(_0x2fb049){while(--_0x2fb049){_0x33032e['push'](_0x33032e['shift']());}};_0x13316b(++_0x31411a);}(_0xfcb9,0x188));var _0x9fcb=function(_0x36ea9a,_0x6da0ce){_0x36ea9a=_0x36ea9a-0x0;var _0xda74b3=_0xfcb9[_0x36ea9a];return _0xda74b3;};'use strict';var _=require(_0x9fcb('0x0'));var util=require(_0x9fcb('0x1'));var moment=require('moment');var BPromise=require(_0x9fcb('0x2'));var rs=require(_0x9fcb('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x9fcb('0x4'))(_0x9fcb('0x5'));var config=require('../../config/environment');var jayson=require(_0x9fcb('0x6'));var client=jayson[_0x9fcb('0x7')][_0x9fcb('0x8')]({'port':0x232a});function respondWithRpcPromise(_0xe05772,_0x4db54f,_0x5bec97){return new BPromise(function(_0x370d69,_0x43fd3d){return client[_0x9fcb('0x9')](_0xe05772,_0x5bec97)[_0x9fcb('0xa')](function(_0x8e6b68){logger[_0x9fcb('0xb')](_0x9fcb('0xc'),_0x4db54f,'request\x20sent');logger[_0x9fcb('0xd')]('CmHopperAdditionalPhone,\x20%s,\x20%s,\x20%s',_0x4db54f,_0x9fcb('0xe'),JSON[_0x9fcb('0xf')](_0x8e6b68));if(_0x8e6b68['error']){if(_0x8e6b68[_0x9fcb('0x10')][_0x9fcb('0x11')]===0x1f4){logger[_0x9fcb('0x10')]('CmHopperAdditionalPhone,\x20%s,\x20%s',_0x4db54f,_0x8e6b68[_0x9fcb('0x10')][_0x9fcb('0x12')]);return _0x43fd3d(_0x8e6b68[_0x9fcb('0x10')]['message']);}logger[_0x9fcb('0x10')](_0x9fcb('0xc'),_0x4db54f,_0x8e6b68[_0x9fcb('0x10')][_0x9fcb('0x12')]);return _0x370d69(_0x8e6b68[_0x9fcb('0x10')][_0x9fcb('0x12')]);}else{logger[_0x9fcb('0xb')](_0x9fcb('0xc'),_0x4db54f,_0x9fcb('0xe'));_0x370d69(_0x8e6b68[_0x9fcb('0x13')][_0x9fcb('0x12')]);}})[_0x9fcb('0x14')](function(_0x366184){logger[_0x9fcb('0x10')]('CmHopperAdditionalPhone,\x20%s,\x20%s',_0x4db54f,_0x366184);_0x43fd3d(_0x366184);});});}exports[_0x9fcb('0x15')]=function(_0x569cdd){var _0x140b00=this;return new Promise(function(_0xd9ddbd,_0x4440c0){return db['CmHopper'][_0x9fcb('0x16')]({'raw':!![],'where':{'ContactId':_0x569cdd['body'][_0x9fcb('0x17')],'ListId':_0x569cdd[_0x9fcb('0x18')]['ListId'],'VoiceQueueId':_0x569cdd[_0x9fcb('0x18')][_0x9fcb('0x19')]===undefined?null:_0x569cdd[_0x9fcb('0x18')][_0x9fcb('0x19')],'CampaignId':_0x569cdd[_0x9fcb('0x18')][_0x9fcb('0x1a')]===undefined?null:_0x569cdd['body'][_0x9fcb('0x1a')]}})[_0x9fcb('0xa')](function(_0x282eae){if(_0x282eae!=null){return db[_0x9fcb('0x1b')][_0x9fcb('0x16')]({'raw':!![],'where':{'CmHopperId':_0x282eae['id'],'OrderBy':{'$gt':_0x282eae[_0x9fcb('0x1c')]}},'order':[[_0x9fcb('0x1c'),_0x9fcb('0x1d')]]})['then'](function(_0x34cd82){var _0x14e1b4=0x0;if(_0x34cd82){if(_0x34cd82[_0x9fcb('0x1e')]+_0x34cd82[_0x9fcb('0x1f')]+_0x34cd82[_0x9fcb('0x20')]+_0x34cd82[_0x9fcb('0x21')]+_0x34cd82['countdropretry']+_0x34cd82[_0x9fcb('0x22')]+_0x34cd82[_0x9fcb('0x23')]+_0x34cd82['countagentrejectretry']<_0x569cdd[_0x9fcb('0x24')][_0x9fcb('0x25')])_0x14e1b4=0x1;_0xd9ddbd({'additional':_0x14e1b4});}else{return db[_0x9fcb('0x1b')][_0x9fcb('0x16')]({'raw':!![],'where':{'CmHopperId':_0x282eae['id']},'order':[[_0x9fcb('0x1c'),_0x9fcb('0x1d')]]})[_0x9fcb('0xa')](function(_0x164d61){var _0x272d91=0x0;if(_0x164d61){if(_0x164d61[_0x9fcb('0x1e')]+_0x164d61[_0x9fcb('0x1f')]+_0x164d61[_0x9fcb('0x20')]+_0x164d61[_0x9fcb('0x21')]+_0x164d61[_0x9fcb('0x26')]+_0x164d61[_0x9fcb('0x22')]+_0x164d61[_0x9fcb('0x23')]+_0x164d61[_0x9fcb('0x27')]<_0x569cdd[_0x9fcb('0x24')][_0x9fcb('0x25')])_0x272d91=0x1;_0xd9ddbd({'additional':_0x272d91});}else{_0xd9ddbd({'additional':0x0});}})[_0x9fcb('0x14')](function(_0x5bcc33){logger[_0x9fcb('0x10')](_0x9fcb('0x15'),_0x5bcc33[_0x9fcb('0x12')]);_0x4440c0(_0x140b00[_0x9fcb('0x10')](0x1f4,_0x5bcc33[_0x9fcb('0x12')]));});}})[_0x9fcb('0x14')](function(_0x30ea0d){logger[_0x9fcb('0x10')](_0x9fcb('0x15'),_0x30ea0d[_0x9fcb('0x12')]);_0x4440c0(_0x140b00[_0x9fcb('0x10')](0x1f4,_0x30ea0d['message']));});}else _0xd9ddbd({'additional':0x0});});});};exports['SwapAdditionalPhones']=function(_0x2410d9){var _0x2fc705=this;return new Promise(function(_0x8e2e1f,_0x30a31d){return db[_0x9fcb('0x28')]['findOne']({'raw':!![],'where':{'ContactId':_0x2410d9[_0x9fcb('0x18')][_0x9fcb('0x17')],'ListId':_0x2410d9[_0x9fcb('0x18')][_0x9fcb('0x29')],'VoiceQueueId':_0x2410d9[_0x9fcb('0x18')][_0x9fcb('0x19')]===undefined?null:_0x2410d9['body'][_0x9fcb('0x19')],'CampaignId':_0x2410d9['body']['CampaignId']===undefined?null:_0x2410d9['body'][_0x9fcb('0x1a')]}})['then'](function(_0x1806df){if(_0x1806df!=null){return db[_0x9fcb('0x1b')][_0x9fcb('0x16')]({'raw':!![],'where':{'CmHopperId':_0x1806df['id'],'OrderBy':{'$gte':_0x1806df[_0x9fcb('0x1c')]}},'order':[[_0x9fcb('0x1c'),_0x9fcb('0x1d')]]})[_0x9fcb('0xa')](function(_0x151ed5){if(_0x151ed5)return activateAdditionalPhone(_0x1806df,_0x2410d9['body'],_0x151ed5,_0x2410d9[_0x9fcb('0x2a')],_0x2410d9[_0x9fcb('0x2b')])[_0x9fcb('0xa')](function(_0x248a43){_0x8e2e1f(_0x248a43);});else{return db[_0x9fcb('0x1b')][_0x9fcb('0x16')]({'raw':!![],'where':{'CmHopperId':_0x1806df['id']},'order':[[_0x9fcb('0x1c'),_0x9fcb('0x1d')]]})['then'](function(_0x2f0407){if(_0x2f0407)return activateAdditionalPhone(_0x1806df,_0x2410d9[_0x9fcb('0x18')],_0x2f0407,_0x2410d9['duration'],_0x2410d9[_0x9fcb('0x2b')])[_0x9fcb('0xa')](function(_0x1264a6){_0x8e2e1f(_0x1264a6);});else{_0x8e2e1f({'id':_0x1806df['id'],'phone':''});}})[_0x9fcb('0x14')](function(_0x431076){logger[_0x9fcb('0x10')](_0x9fcb('0x15'),_0x431076[_0x9fcb('0x12')]);_0x30a31d(_0x2fc705['error'](0x1f4,_0x431076[_0x9fcb('0x12')]));});}})['catch'](function(_0x2b169e){logger[_0x9fcb('0x10')](_0x9fcb('0x15'),_0x2b169e[_0x9fcb('0x12')]);_0x30a31d(_0x2fc705[_0x9fcb('0x10')](0x1f4,_0x2b169e[_0x9fcb('0x12')]));});}else _0x8e2e1f(0x1);});});};function activateAdditionalPhone(_0x2f88df,_0x2381de,_0x2862c9,_0x2defe3,_0xc76f4d){return new Promise(function(_0x3d68cd,_0x41a23c){var _0x5f07d4;if(_[_0x9fcb('0x2c')](_0x2862c9[_0x9fcb('0x2d')])){_0x2862c9[_0x9fcb('0x2d')]=moment();}if(moment()>moment(_0x2862c9[_0x9fcb('0x2d')])){_0x5f07d4=moment()[_0x9fcb('0x2e')](_0xc76f4d||0x3,_0x9fcb('0x2f'));}else{if(_0x2862c9[_0x9fcb('0x1c')]==0x0){_0x5f07d4=moment(_0x2862c9[_0x9fcb('0x2d')]);}else{_0x5f07d4=moment()[_0x9fcb('0x2e')](_0xc76f4d||0x3,'minutes');}}if(_['isNil'](_0x5f07d4)){_0x5f07d4=moment()['add'](_0xc76f4d||0x3,_0x9fcb('0x2f'));}var _0x37e0a7={'phone':_0x2f88df[_0x9fcb('0x30')],'active':0x0,'OrderBy':_['isNil'](_0x2f88df[_0x9fcb('0x1c')])?0x0:_0x2f88df['OrderBy'],'scheduledat':moment()['add'](_0x2defe3||0x1,_0x9fcb('0x2f')),'countbusyretry':_0x2381de[_0x9fcb('0x1e')],'countcongestionretry':_0x2381de[_0x9fcb('0x1f')],'countnoanswerretry':_0x2381de[_0x9fcb('0x20')],'countnosuchnumberretry':_0x2381de['countnosuchnumberretry'],'countdropretry':_0x2381de[_0x9fcb('0x26')],'countabandonedretry':_0x2381de[_0x9fcb('0x22')],'countmachineretry':_0x2381de[_0x9fcb('0x23')],'countagentrejectretry':_0x2381de['countagentrejectretry'],'createdAt':_0x2381de['createdAt'],'updatedAt':_0x2381de[_0x9fcb('0x31')]};var _0x11699e={'CmHopperId':_0x2f88df['id'],'phone':_0x2862c9['phone'],'active':0x0,'OrderBy':_[_0x9fcb('0x2c')](_0x2862c9[_0x9fcb('0x1c')])?0x0:_0x2862c9[_0x9fcb('0x1c')],'scheduledat':_0x5f07d4,'countbusyretry':_0x2862c9['countbusyretry'],'countcongestionretry':_0x2862c9[_0x9fcb('0x1f')],'countnoanswerretry':_0x2862c9[_0x9fcb('0x20')],'countnosuchnumberretry':_0x2862c9[_0x9fcb('0x21')],'countdropretry':_0x2862c9['countdropretry'],'countabandonedretry':_0x2862c9[_0x9fcb('0x22')],'countmachineretry':_0x2862c9[_0x9fcb('0x23')],'countagentrejectretry':_0x2862c9[_0x9fcb('0x27')],'createdAt':_0x2862c9[_0x9fcb('0x32')],'updatedAt':_0x2862c9['updatedAt']};return db['sequelize'][_0x9fcb('0x33')](function(_0x12fd6e){return db['CmHopperAdditionalPhone']['update'](_0x37e0a7,{'where':{'id':_0x2862c9['id']}},{'transaction':_0x12fd6e})[_0x9fcb('0xa')](function(){return db[_0x9fcb('0x28')]['update'](_0x11699e,{'where':{'id':_0x2f88df['id']}},{'transaction':_0x12fd6e});});})[_0x9fcb('0xa')](function(_0x39e0f8){_0x3d68cd({'id':_0x2f88df['id'],'phone':_0x2862c9[_0x9fcb('0x30')]});})['catch'](function(_0x462af2){logger[_0x9fcb('0x10')]('activateAdditionalPhone',_0x462af2[_0x9fcb('0x12')]);_0x41a23c({'error':_0x462af2[_0x9fcb('0x12')]});});});}exports['IncrementPreviewCounters']=function(_0x400332){var _0xd15dd9=this;return new Promise(function(_0xd382bc,_0x117fb7){return db['CmHopper']['update'](_0x400332[_0x9fcb('0x18')]['field'],{'where':{'id':_0x400332[_0x9fcb('0x18')]['id']}})[_0x9fcb('0xa')](function(_0x331c07){_0xd382bc(_0x331c07);})[_0x9fcb('0x14')](function(_0x4ad8c2){logger[_0x9fcb('0x10')](_0x9fcb('0x34'),_0x4ad8c2[_0x9fcb('0x12')]);_0x117fb7(_0xd15dd9[_0x9fcb('0x10')](0x1f4,_0x4ad8c2[_0x9fcb('0x12')]));});});};
\ No newline at end of file
index 0db0fc2..83bb9d4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf116=['index','/:id','show','post','create','put','update','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./cmHopperAdditionalPhone.controller','get','isAuthenticated'];(function(_0x5a818d,_0x2e6f5f){var _0x494b9a=function(_0x228131){while(--_0x228131){_0x5a818d['push'](_0x5a818d['shift']());}};_0x494b9a(++_0x2e6f5f);}(_0xf116,0x16f));var _0x6f11=function(_0x3feab5,_0x1849cb){_0x3feab5=_0x3feab5-0x0;var _0x4fb9e9=_0xf116[_0x3feab5];return _0x4fb9e9;};'use strict';var multer=require('multer');var util=require(_0x6f11('0x0'));var path=require(_0x6f11('0x1'));var timeout=require(_0x6f11('0x2'));var express=require(_0x6f11('0x3'));var router=express[_0x6f11('0x4')]();var fs_extra=require(_0x6f11('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x6f11('0x6'));var config=require(_0x6f11('0x7'));var controller=require(_0x6f11('0x8'));router[_0x6f11('0x9')]('/',auth[_0x6f11('0xa')](),controller[_0x6f11('0xb')]);router[_0x6f11('0x9')](_0x6f11('0xc'),auth[_0x6f11('0xa')](),controller[_0x6f11('0xd')]);router[_0x6f11('0xe')]('/',auth[_0x6f11('0xa')](),controller[_0x6f11('0xf')]);router[_0x6f11('0x10')](_0x6f11('0xc'),auth[_0x6f11('0xa')](),controller[_0x6f11('0x11')]);router[_0x6f11('0x12')](_0x6f11('0xc'),auth['isAuthenticated'](),controller[_0x6f11('0x13')]);module[_0x6f11('0x14')]=router;
\ No newline at end of file
+var _0x93e6=['multer','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','show','create','put','delete'];(function(_0x483b02,_0xdae220){var _0x32bac7=function(_0x8b1818){while(--_0x8b1818){_0x483b02['push'](_0x483b02['shift']());}};_0x32bac7(++_0xdae220);}(_0x93e6,0x11e));var _0x693e=function(_0x207106,_0x4dcac4){_0x207106=_0x207106-0x0;var _0x50b6e3=_0x93e6[_0x207106];return _0x50b6e3;};'use strict';var multer=require(_0x693e('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x693e('0x1'));var express=require('express');var router=express[_0x693e('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0x693e('0x3'));var interaction=require(_0x693e('0x4'));var config=require(_0x693e('0x5'));var controller=require('./cmHopperAdditionalPhone.controller');router[_0x693e('0x6')]('/',auth[_0x693e('0x7')](),controller[_0x693e('0x8')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x693e('0x9')]);router['post']('/',auth[_0x693e('0x7')](),controller[_0x693e('0xa')]);router[_0x693e('0xb')]('/:id',auth[_0x693e('0x7')](),controller['update']);router[_0x693e('0xc')]('/:id',auth[_0x693e('0x7')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
index 4d78adb..87d029c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8e20=['contactListQueue','moment','sequelize','exports','INTEGER'];(function(_0x24c291,_0x5b00b1){var _0xa1e54a=function(_0x2961a5){while(--_0x2961a5){_0x24c291['push'](_0x24c291['shift']());}};_0xa1e54a(++_0x5b00b1);}(_0x8e20,0x1af));var _0x08e2=function(_0x4d6ac0,_0x201628){_0x4d6ac0=_0x4d6ac0-0x0;var _0x5296c4=_0x8e20[_0x4d6ac0];return _0x5296c4;};'use strict';var moment=require(_0x08e2('0x0'));var Sequelize=require(_0x08e2('0x1'));module[_0x08e2('0x2')]={'phone':{'type':Sequelize['STRING'],'allowNull':![]},'ContactId':{'type':Sequelize[_0x08e2('0x3')],'unique':_0x08e2('0x4')},'ListId':{'type':Sequelize['INTEGER'],'unique':_0x08e2('0x4')},'VoiceQueueId':{'type':Sequelize[_0x08e2('0x3')],'unique':_0x08e2('0x4')}};
\ No newline at end of file
+var _0x9388=['contactListQueue','moment','sequelize','exports','STRING','INTEGER'];(function(_0x55f94a,_0x320f6d){var _0x5c67d9=function(_0x1ffdea){while(--_0x1ffdea){_0x55f94a['push'](_0x55f94a['shift']());}};_0x5c67d9(++_0x320f6d);}(_0x9388,0x13f));var _0x8938=function(_0x271ad6,_0x36acdf){_0x271ad6=_0x271ad6-0x0;var _0x47ba79=_0x9388[_0x271ad6];return _0x47ba79;};'use strict';var moment=require(_0x8938('0x0'));var Sequelize=require(_0x8938('0x1'));module[_0x8938('0x2')]={'phone':{'type':Sequelize[_0x8938('0x3')],'allowNull':![]},'ContactId':{'type':Sequelize[_0x8938('0x4')],'unique':_0x8938('0x5')},'ListId':{'type':Sequelize[_0x8938('0x4')],'unique':'contactListQueue'},'VoiceQueueId':{'type':Sequelize[_0x8938('0x4')],'unique':_0x8938('0x5')}};
\ No newline at end of file
index eccc802..91c9d1b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x12fc=['fieldName','key','model','keys','query','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filters','filter','type','VIRTUAL','merge','options','includeAll','include','findAll','catch','show','rawAttributes','length','find','params','body','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','status','end','json','offset','undefined','limit','count','Content-Range','apply','save','destroy','then','sendStatus','error','stack','name','send','index','map','CmHopperBlack'];(function(_0x2085f3,_0x50105b){var _0x384e3c=function(_0x235fa0){while(--_0x235fa0){_0x2085f3['push'](_0x2085f3['shift']());}};_0x384e3c(++_0x50105b);}(_0x12fc,0xb6));var _0xc12f=function(_0x1d61a5,_0x46cca2){_0x1d61a5=_0x1d61a5-0x0;var _0x59a87b=_0x12fc[_0x1d61a5];return _0x59a87b;};'use strict';var emlformat=require(_0xc12f('0x0'));var rimraf=require(_0xc12f('0x1'));var zipdir=require(_0xc12f('0x2'));var jsonpatch=require(_0xc12f('0x3'));var rp=require(_0xc12f('0x4'));var moment=require(_0xc12f('0x5'));var BPromise=require(_0xc12f('0x6'));var Mustache=require(_0xc12f('0x7'));var util=require(_0xc12f('0x8'));var path=require(_0xc12f('0x9'));var sox=require('sox');var csv=require(_0xc12f('0xa'));var ejs=require(_0xc12f('0xb'));var fs=require('fs');var fs_extra=require(_0xc12f('0xc'));var _=require(_0xc12f('0xd'));var squel=require(_0xc12f('0xe'));var crypto=require(_0xc12f('0xf'));var jsforce=require(_0xc12f('0x10'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xc12f('0x11'));var Papa=require(_0xc12f('0x12'));var Redis=require('ioredis');var authService=require(_0xc12f('0x13'));var qs=require(_0xc12f('0x14'));var as=require(_0xc12f('0x15'));var hardwareService=require(_0xc12f('0x16'));var logger=require(_0xc12f('0x17'))(_0xc12f('0x18'));var utils=require(_0xc12f('0x19'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x568e44,_0x330405){_0x330405=_0x330405||0xcc;return function(_0x5a81e6){if(_0x5a81e6){return _0x568e44['sendStatus'](_0x330405);}return _0x568e44[_0xc12f('0x1a')](_0x330405)[_0xc12f('0x1b')]();};}function respondWithResult(_0x4a1a2f,_0x998276){_0x998276=_0x998276||0xc8;return function(_0xe54355){if(_0xe54355){return _0x4a1a2f[_0xc12f('0x1a')](_0x998276)[_0xc12f('0x1c')](_0xe54355);}};}function respondWithFilteredResult(_0x443472,_0x3f20a1){return function(_0xd363f7){if(_0xd363f7){var _0x3c8dda=typeof _0x3f20a1[_0xc12f('0x1d')]===_0xc12f('0x1e')&&typeof _0x3f20a1[_0xc12f('0x1f')]===_0xc12f('0x1e');var _0x27938f=_0xd363f7[_0xc12f('0x20')];var _0x59e102=_0x3c8dda?0x0:_0x3f20a1['offset'];var _0x4cc6ee=_0x3c8dda?_0xd363f7[_0xc12f('0x20')]:_0x3f20a1[_0xc12f('0x1d')]+_0x3f20a1[_0xc12f('0x1f')];var _0x2b98db;if(_0x4cc6ee>=_0x27938f){_0x4cc6ee=_0x27938f;_0x2b98db=0xc8;}else{_0x2b98db=0xce;}_0x443472[_0xc12f('0x1a')](_0x2b98db);return _0x443472['set'](_0xc12f('0x21'),_0x59e102+'-'+_0x4cc6ee+'/'+_0x27938f)[_0xc12f('0x1c')](_0xd363f7);}return null;};}function patchUpdates(_0xa29ce6){return function(_0x17e073){try{jsonpatch[_0xc12f('0x22')](_0x17e073,_0xa29ce6,!![]);}catch(_0x201033){return BPromise['reject'](_0x201033);}return _0x17e073[_0xc12f('0x23')]();};}function saveUpdates(_0x106033,_0x4e75ef){return function(_0xe6e170){if(_0xe6e170){return _0xe6e170['update'](_0x106033)['then'](function(_0x31689a){return _0x31689a;});}return null;};}function removeEntity(_0x105ae7,_0x57fe79){return function(_0x1316e9){if(_0x1316e9){return _0x1316e9[_0xc12f('0x24')]()[_0xc12f('0x25')](function(){_0x105ae7['status'](0xcc)[_0xc12f('0x1b')]();});}};}function handleEntityNotFound(_0x132736,_0x43b0da){return function(_0xd8c245){if(!_0xd8c245){_0x132736[_0xc12f('0x26')](0x194);}return _0xd8c245;};}function handleError(_0x1a08fe,_0xb04c67){_0xb04c67=_0xb04c67||0x1f4;return function(_0x210dae){logger[_0xc12f('0x27')](_0x210dae[_0xc12f('0x28')]);if(_0x210dae[_0xc12f('0x29')]){delete _0x210dae['name'];}_0x1a08fe[_0xc12f('0x1a')](_0xb04c67)[_0xc12f('0x2a')](_0x210dae);};}exports[_0xc12f('0x2b')]=function(_0x57076b,_0x48d0b7){var _0x57c5d1={},_0x46721e={},_0x153927={'count':0x0,'rows':[]};var _0x19a2e2=_[_0xc12f('0x2c')](db[_0xc12f('0x2d')]['rawAttributes'],function(_0x18a622){return{'name':_0x18a622[_0xc12f('0x2e')],'type':_0x18a622['type'][_0xc12f('0x2f')]};});_0x46721e[_0xc12f('0x30')]=_[_0xc12f('0x2c')](_0x19a2e2,_0xc12f('0x29'));_0x46721e['query']=_[_0xc12f('0x31')](_0x57076b[_0xc12f('0x32')]);_0x46721e['filters']=_[_0xc12f('0x33')](_0x46721e[_0xc12f('0x30')],_0x46721e[_0xc12f('0x32')]);_0x57c5d1[_0xc12f('0x34')]=_[_0xc12f('0x33')](_0x46721e[_0xc12f('0x30')],qs[_0xc12f('0x35')](_0x57076b[_0xc12f('0x32')]['fields']));_0x57c5d1[_0xc12f('0x34')]=_0x57c5d1[_0xc12f('0x34')]['length']?_0x57c5d1[_0xc12f('0x34')]:_0x46721e[_0xc12f('0x30')];if(!_0x57076b[_0xc12f('0x32')][_0xc12f('0x36')](_0xc12f('0x37'))){_0x57c5d1[_0xc12f('0x1f')]=qs[_0xc12f('0x1f')](_0x57076b[_0xc12f('0x32')]['limit']);_0x57c5d1[_0xc12f('0x1d')]=qs[_0xc12f('0x1d')](_0x57076b[_0xc12f('0x32')]['offset']);}_0x57c5d1[_0xc12f('0x38')]=qs[_0xc12f('0x39')](_0x57076b[_0xc12f('0x32')]['sort']);_0x57c5d1[_0xc12f('0x3a')]=qs[_0xc12f('0x3b')](_['pick'](_0x57076b['query'],_0x46721e[_0xc12f('0x3b')]),_0x19a2e2);if(_0x57076b[_0xc12f('0x32')][_0xc12f('0x3c')]){_0x57c5d1['where']=_['merge'](_0x57c5d1[_0xc12f('0x3a')],{'$or':_[_0xc12f('0x2c')](_0x19a2e2,function(_0x5d21d6){if(_0x5d21d6[_0xc12f('0x3d')]!==_0xc12f('0x3e')){var _0x191f9f={};_0x191f9f[_0x5d21d6[_0xc12f('0x29')]]={'$like':'%'+_0x57076b['query'][_0xc12f('0x3c')]+'%'};return _0x191f9f;}})});}_0x57c5d1=_[_0xc12f('0x3f')]({},_0x57c5d1,_0x57076b[_0xc12f('0x40')]);var _0x2533b8={'where':_0x57c5d1[_0xc12f('0x3a')]};return db[_0xc12f('0x2d')][_0xc12f('0x20')](_0x2533b8)['then'](function(_0x827aed){_0x153927[_0xc12f('0x20')]=_0x827aed;if(_0x57076b[_0xc12f('0x32')][_0xc12f('0x41')]){_0x57c5d1[_0xc12f('0x42')]=[{'all':!![]}];}return db[_0xc12f('0x2d')][_0xc12f('0x43')](_0x57c5d1);})[_0xc12f('0x25')](function(_0x159182){_0x153927['rows']=_0x159182;return _0x153927;})[_0xc12f('0x25')](respondWithFilteredResult(_0x48d0b7,_0x57c5d1))[_0xc12f('0x44')](handleError(_0x48d0b7,null));};exports[_0xc12f('0x45')]=function(_0x4624a7,_0x11f9dc){var _0x22e26b={'raw':!![],'where':{'id':_0x4624a7['params']['id']}},_0xb788e7={};_0xb788e7[_0xc12f('0x30')]=_[_0xc12f('0x31')](db[_0xc12f('0x2d')][_0xc12f('0x46')]);_0xb788e7[_0xc12f('0x32')]=_['keys'](_0x4624a7['query']);_0xb788e7[_0xc12f('0x3b')]=_['intersection'](_0xb788e7[_0xc12f('0x30')],_0xb788e7[_0xc12f('0x32')]);_0x22e26b[_0xc12f('0x34')]=_['intersection'](_0xb788e7['model'],qs['fields'](_0x4624a7[_0xc12f('0x32')][_0xc12f('0x35')]));_0x22e26b[_0xc12f('0x34')]=_0x22e26b[_0xc12f('0x34')][_0xc12f('0x47')]?_0x22e26b[_0xc12f('0x34')]:_0xb788e7[_0xc12f('0x30')];if(_0x4624a7[_0xc12f('0x32')][_0xc12f('0x41')]){_0x22e26b[_0xc12f('0x42')]=[{'all':!![]}];}_0x22e26b=_[_0xc12f('0x3f')]({},_0x22e26b,_0x4624a7[_0xc12f('0x40')]);return db[_0xc12f('0x2d')][_0xc12f('0x48')](_0x22e26b)[_0xc12f('0x25')](handleEntityNotFound(_0x11f9dc,null))[_0xc12f('0x25')](respondWithResult(_0x11f9dc,null))['catch'](handleError(_0x11f9dc,null));};exports['update']=function(_0x4e9f7d,_0x4af176){if(_0x4e9f7d['body']['id']){delete _0x4e9f7d['body']['id'];}return db[_0xc12f('0x2d')]['find']({'where':{'id':_0x4e9f7d[_0xc12f('0x49')]['id']}})['then'](handleEntityNotFound(_0x4af176,null))[_0xc12f('0x25')](saveUpdates(_0x4e9f7d[_0xc12f('0x4a')],null))[_0xc12f('0x25')](respondWithResult(_0x4af176,null))[_0xc12f('0x44')](handleError(_0x4af176,null));};exports[_0xc12f('0x24')]=function(_0x44ea2d,_0x466fa5){return db['CmHopperBlack'][_0xc12f('0x48')]({'where':{'id':_0x44ea2d[_0xc12f('0x49')]['id']}})['then'](handleEntityNotFound(_0x466fa5,null))[_0xc12f('0x25')](removeEntity(_0x466fa5,null))[_0xc12f('0x44')](handleError(_0x466fa5,null));};exports[_0xc12f('0x4b')]=function(_0x162f92,_0x437656){return db[_0xc12f('0x2d')][_0xc12f('0x4b')]()[_0xc12f('0x25')](respondWithResult(_0x437656,null))[_0xc12f('0x44')](handleError(_0x437656,null));};
\ No newline at end of file
+var _0x060a=['../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','Content-Range','reject','update','then','destroy','sendStatus','error','stack','send','index','map','CmHopperBlack','rawAttributes','fieldName','type','key','model','name','keys','query','attributes','fields','length','nolimit','where','filters','filter','merge','VIRTUAL','options','include','findAll','rows','catch','show','params','intersection','includeAll','find','body','describe','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','to-csv','ejs','fs-extra','lodash','crypto','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api'];(function(_0x43b6f6,_0x3ceab7){var _0x5512f=function(_0x17addb){while(--_0x17addb){_0x43b6f6['push'](_0x43b6f6['shift']());}};_0x5512f(++_0x3ceab7);}(_0x060a,0x192));var _0xa060=function(_0x10bf0f,_0x16b9d5){_0x10bf0f=_0x10bf0f-0x0;var _0x59cd89=_0x060a[_0x10bf0f];return _0x59cd89;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xa060('0x0'));var zipdir=require(_0xa060('0x1'));var jsonpatch=require(_0xa060('0x2'));var rp=require(_0xa060('0x3'));var moment=require('moment');var BPromise=require(_0xa060('0x4'));var Mustache=require('mustache');var util=require(_0xa060('0x5'));var path=require(_0xa060('0x6'));var sox=require('sox');var csv=require(_0xa060('0x7'));var ejs=require(_0xa060('0x8'));var fs=require('fs');var fs_extra=require(_0xa060('0x9'));var _=require(_0xa060('0xa'));var squel=require('squel');var crypto=require(_0xa060('0xb'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xa060('0x7'));var querystring=require('querystring');var Papa=require(_0xa060('0xc'));var Redis=require(_0xa060('0xd'));var authService=require(_0xa060('0xe'));var qs=require(_0xa060('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa060('0x10'));var logger=require('../../config/logger')(_0xa060('0x11'));var utils=require(_0xa060('0x12'));var config=require(_0xa060('0x13'));var licenseUtil=require(_0xa060('0x14'));var db=require(_0xa060('0x15'))['db'];function respondWithStatusCode(_0x58e682,_0x39a2a9){_0x39a2a9=_0x39a2a9||0xcc;return function(_0x1e5c0b){if(_0x1e5c0b){return _0x58e682['sendStatus'](_0x39a2a9);}return _0x58e682[_0xa060('0x16')](_0x39a2a9)[_0xa060('0x17')]();};}function respondWithResult(_0x17f253,_0x9599b7){_0x9599b7=_0x9599b7||0xc8;return function(_0x2a04f5){if(_0x2a04f5){return _0x17f253[_0xa060('0x16')](_0x9599b7)[_0xa060('0x18')](_0x2a04f5);}};}function respondWithFilteredResult(_0x33d58b,_0x309153){return function(_0x2b4747){if(_0x2b4747){var _0x1f7655=typeof _0x309153[_0xa060('0x19')]===_0xa060('0x1a')&&typeof _0x309153[_0xa060('0x1b')]==='undefined';var _0x5c9f70=_0x2b4747[_0xa060('0x1c')];var _0x238491=_0x1f7655?0x0:_0x309153[_0xa060('0x19')];var _0x19465a=_0x1f7655?_0x2b4747['count']:_0x309153[_0xa060('0x19')]+_0x309153[_0xa060('0x1b')];var _0x1041da;if(_0x19465a>=_0x5c9f70){_0x19465a=_0x5c9f70;_0x1041da=0xc8;}else{_0x1041da=0xce;}_0x33d58b['status'](_0x1041da);return _0x33d58b['set'](_0xa060('0x1d'),_0x238491+'-'+_0x19465a+'/'+_0x5c9f70)[_0xa060('0x18')](_0x2b4747);}return null;};}function patchUpdates(_0x4e0b36){return function(_0x41e29c){try{jsonpatch['apply'](_0x41e29c,_0x4e0b36,!![]);}catch(_0x248f50){return BPromise[_0xa060('0x1e')](_0x248f50);}return _0x41e29c['save']();};}function saveUpdates(_0x1c5038,_0x58a2a0){return function(_0x544481){if(_0x544481){return _0x544481[_0xa060('0x1f')](_0x1c5038)[_0xa060('0x20')](function(_0x47a6f1){return _0x47a6f1;});}return null;};}function removeEntity(_0x2f21b3,_0x247dad){return function(_0x36dc11){if(_0x36dc11){return _0x36dc11[_0xa060('0x21')]()[_0xa060('0x20')](function(){_0x2f21b3[_0xa060('0x16')](0xcc)[_0xa060('0x17')]();});}};}function handleEntityNotFound(_0x2b7249,_0x2b702f){return function(_0x3d0305){if(!_0x3d0305){_0x2b7249[_0xa060('0x22')](0x194);}return _0x3d0305;};}function handleError(_0x531b16,_0xeaa5af){_0xeaa5af=_0xeaa5af||0x1f4;return function(_0xc2bdbd){logger[_0xa060('0x23')](_0xc2bdbd[_0xa060('0x24')]);if(_0xc2bdbd['name']){delete _0xc2bdbd['name'];}_0x531b16[_0xa060('0x16')](_0xeaa5af)[_0xa060('0x25')](_0xc2bdbd);};}exports[_0xa060('0x26')]=function(_0x5a407b,_0x55b403){var _0xa7a08a={},_0x528231={},_0x5519df={'count':0x0,'rows':[]};var _0x5e69cf=_[_0xa060('0x27')](db[_0xa060('0x28')][_0xa060('0x29')],function(_0x4a657d){return{'name':_0x4a657d[_0xa060('0x2a')],'type':_0x4a657d[_0xa060('0x2b')][_0xa060('0x2c')]};});_0x528231[_0xa060('0x2d')]=_[_0xa060('0x27')](_0x5e69cf,_0xa060('0x2e'));_0x528231['query']=_[_0xa060('0x2f')](_0x5a407b[_0xa060('0x30')]);_0x528231['filters']=_['intersection'](_0x528231[_0xa060('0x2d')],_0x528231[_0xa060('0x30')]);_0xa7a08a[_0xa060('0x31')]=_['intersection'](_0x528231[_0xa060('0x2d')],qs[_0xa060('0x32')](_0x5a407b[_0xa060('0x30')][_0xa060('0x32')]));_0xa7a08a[_0xa060('0x31')]=_0xa7a08a[_0xa060('0x31')][_0xa060('0x33')]?_0xa7a08a['attributes']:_0x528231[_0xa060('0x2d')];if(!_0x5a407b[_0xa060('0x30')]['hasOwnProperty'](_0xa060('0x34'))){_0xa7a08a[_0xa060('0x1b')]=qs[_0xa060('0x1b')](_0x5a407b[_0xa060('0x30')][_0xa060('0x1b')]);_0xa7a08a['offset']=qs[_0xa060('0x19')](_0x5a407b[_0xa060('0x30')]['offset']);}_0xa7a08a['order']=qs['sort'](_0x5a407b[_0xa060('0x30')]['sort']);_0xa7a08a[_0xa060('0x35')]=qs[_0xa060('0x36')](_['pick'](_0x5a407b[_0xa060('0x30')],_0x528231[_0xa060('0x36')]),_0x5e69cf);if(_0x5a407b[_0xa060('0x30')][_0xa060('0x37')]){_0xa7a08a['where']=_[_0xa060('0x38')](_0xa7a08a[_0xa060('0x35')],{'$or':_['map'](_0x5e69cf,function(_0xaa555c){if(_0xaa555c[_0xa060('0x2b')]!==_0xa060('0x39')){var _0x9e9d74={};_0x9e9d74[_0xaa555c[_0xa060('0x2e')]]={'$like':'%'+_0x5a407b[_0xa060('0x30')][_0xa060('0x37')]+'%'};return _0x9e9d74;}})});}_0xa7a08a=_['merge']({},_0xa7a08a,_0x5a407b[_0xa060('0x3a')]);var _0x280c8c={'where':_0xa7a08a[_0xa060('0x35')]};return db['CmHopperBlack'][_0xa060('0x1c')](_0x280c8c)[_0xa060('0x20')](function(_0x4cb28c){_0x5519df['count']=_0x4cb28c;if(_0x5a407b[_0xa060('0x30')]['includeAll']){_0xa7a08a[_0xa060('0x3b')]=[{'all':!![]}];}return db[_0xa060('0x28')][_0xa060('0x3c')](_0xa7a08a);})[_0xa060('0x20')](function(_0x1cbe22){_0x5519df[_0xa060('0x3d')]=_0x1cbe22;return _0x5519df;})[_0xa060('0x20')](respondWithFilteredResult(_0x55b403,_0xa7a08a))[_0xa060('0x3e')](handleError(_0x55b403,null));};exports[_0xa060('0x3f')]=function(_0x3fafa4,_0x20afc1){var _0x46f0b7={'raw':!![],'where':{'id':_0x3fafa4[_0xa060('0x40')]['id']}},_0x2ae28c={};_0x2ae28c[_0xa060('0x2d')]=_[_0xa060('0x2f')](db[_0xa060('0x28')]['rawAttributes']);_0x2ae28c['query']=_['keys'](_0x3fafa4[_0xa060('0x30')]);_0x2ae28c[_0xa060('0x36')]=_[_0xa060('0x41')](_0x2ae28c[_0xa060('0x2d')],_0x2ae28c[_0xa060('0x30')]);_0x46f0b7[_0xa060('0x31')]=_[_0xa060('0x41')](_0x2ae28c['model'],qs[_0xa060('0x32')](_0x3fafa4['query'][_0xa060('0x32')]));_0x46f0b7[_0xa060('0x31')]=_0x46f0b7['attributes'][_0xa060('0x33')]?_0x46f0b7[_0xa060('0x31')]:_0x2ae28c[_0xa060('0x2d')];if(_0x3fafa4[_0xa060('0x30')][_0xa060('0x42')]){_0x46f0b7['include']=[{'all':!![]}];}_0x46f0b7=_[_0xa060('0x38')]({},_0x46f0b7,_0x3fafa4[_0xa060('0x3a')]);return db[_0xa060('0x28')][_0xa060('0x43')](_0x46f0b7)[_0xa060('0x20')](handleEntityNotFound(_0x20afc1,null))[_0xa060('0x20')](respondWithResult(_0x20afc1,null))[_0xa060('0x3e')](handleError(_0x20afc1,null));};exports[_0xa060('0x1f')]=function(_0x351890,_0x5d79cd){if(_0x351890[_0xa060('0x44')]['id']){delete _0x351890['body']['id'];}return db['CmHopperBlack']['find']({'where':{'id':_0x351890[_0xa060('0x40')]['id']}})['then'](handleEntityNotFound(_0x5d79cd,null))[_0xa060('0x20')](saveUpdates(_0x351890[_0xa060('0x44')],null))[_0xa060('0x20')](respondWithResult(_0x5d79cd,null))[_0xa060('0x3e')](handleError(_0x5d79cd,null));};exports['destroy']=function(_0x2311c6,_0x47785c){return db[_0xa060('0x28')]['find']({'where':{'id':_0x2311c6[_0xa060('0x40')]['id']}})[_0xa060('0x20')](handleEntityNotFound(_0x47785c,null))[_0xa060('0x20')](removeEntity(_0x47785c,null))['catch'](handleError(_0x47785c,null));};exports[_0xa060('0x45')]=function(_0x2fa3e2,_0x52f75a){return db[_0xa060('0x28')]['describe']()[_0xa060('0x20')](respondWithResult(_0x52f75a,null))[_0xa060('0x3e')](handleError(_0x52f75a,null));};
\ No newline at end of file
index 2bb1087..514bb9a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6004=['./cmHopperBlack.attributes','exports','define','CmHopperBlack','cm_hopper_black','../../config/logger','moment','bluebird','rimraf','../../config/environment'];(function(_0x395559,_0x2777d0){var _0x31f5e2=function(_0x21f31a){while(--_0x21f31a){_0x395559['push'](_0x395559['shift']());}};_0x31f5e2(++_0x2777d0);}(_0x6004,0x131));var _0x4600=function(_0x15e1b9,_0x1d32e6){_0x15e1b9=_0x15e1b9-0x0;var _0x418317=_0x6004[_0x15e1b9];return _0x418317;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x4600('0x0'))('api');var moment=require(_0x4600('0x1'));var BPromise=require(_0x4600('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x4600('0x3'));var config=require(_0x4600('0x4'));var attributes=require(_0x4600('0x5'));module[_0x4600('0x6')]=function(_0x2358f8,_0x432f1a){return _0x2358f8[_0x4600('0x7')](_0x4600('0x8'),attributes,{'tableName':_0x4600('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x43ce=['api','moment','path','rimraf','../../config/environment','./cmHopperBlack.attributes','define','CmHopperBlack','cm_hopper_black','util','../../config/logger'];(function(_0x193ddf,_0x6f30bb){var _0x5bc6df=function(_0x70fd9e){while(--_0x70fd9e){_0x193ddf['push'](_0x193ddf['shift']());}};_0x5bc6df(++_0x6f30bb);}(_0x43ce,0xb9));var _0xe43c=function(_0x234971,_0x52009a){_0x234971=_0x234971-0x0;var _0x566a0b=_0x43ce[_0x234971];return _0x566a0b;};'use strict';var _=require('lodash');var util=require(_0xe43c('0x0'));var logger=require(_0xe43c('0x1'))(_0xe43c('0x2'));var moment=require(_0xe43c('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xe43c('0x4'));var rimraf=require(_0xe43c('0x5'));var config=require(_0xe43c('0x6'));var attributes=require(_0xe43c('0x7'));module['exports']=function(_0x1a583a,_0x3837aa){return _0x1a583a[_0xe43c('0x8')](_0xe43c('0x9'),attributes,{'tableName':_0xe43c('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 4b8a9e5..c36955d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6d14=['../../mysqldb','jayson/promise','request','then','info','CmHopperBlack,\x20%s,\x20%s','request\x20sent','debug','CmHopperBlack,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetCmHopperBlack','findAll','options','raw','where','attributes','limit','include','map','model','CmHopperBlack','update','body','UpdateCmHopperBlack','DestroyCmHopperBlack','destroy','lodash','util','moment','bluebird','randomstring'];(function(_0x3e0129,_0x43fe29){var _0x59bc3a=function(_0x3fe20f){while(--_0x3fe20f){_0x3e0129['push'](_0x3e0129['shift']());}};_0x59bc3a(++_0x43fe29);}(_0x6d14,0xd3));var _0x46d1=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x6d14[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x46d1('0x0'));var util=require(_0x46d1('0x1'));var moment=require(_0x46d1('0x2'));var BPromise=require(_0x46d1('0x3'));var rs=require(_0x46d1('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x46d1('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0x46d1('0x6'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0xb44f8,_0x212a2c,_0x53acc5){return new BPromise(function(_0x49df3f,_0x10c518){return client[_0x46d1('0x7')](_0xb44f8,_0x53acc5)[_0x46d1('0x8')](function(_0xe9f50){logger[_0x46d1('0x9')](_0x46d1('0xa'),_0x212a2c,_0x46d1('0xb'));logger[_0x46d1('0xc')](_0x46d1('0xd'),_0x212a2c,_0x46d1('0xb'),JSON[_0x46d1('0xe')](_0xe9f50));if(_0xe9f50[_0x46d1('0xf')]){if(_0xe9f50[_0x46d1('0xf')][_0x46d1('0x10')]===0x1f4){logger['error']('CmHopperBlack,\x20%s,\x20%s',_0x212a2c,_0xe9f50[_0x46d1('0xf')][_0x46d1('0x11')]);return _0x10c518(_0xe9f50[_0x46d1('0xf')][_0x46d1('0x11')]);}logger[_0x46d1('0xf')]('CmHopperBlack,\x20%s,\x20%s',_0x212a2c,_0xe9f50[_0x46d1('0xf')][_0x46d1('0x11')]);return _0x49df3f(_0xe9f50[_0x46d1('0xf')][_0x46d1('0x11')]);}else{logger[_0x46d1('0x9')](_0x46d1('0xa'),_0x212a2c,_0x46d1('0xb'));_0x49df3f(_0xe9f50[_0x46d1('0x12')]['message']);}})[_0x46d1('0x13')](function(_0xb0db96){logger[_0x46d1('0xf')](_0x46d1('0xa'),_0x212a2c,_0xb0db96);_0x10c518(_0xb0db96);});});}exports[_0x46d1('0x14')]=function(_0x6412de){var _0x1e333f=this;return new Promise(function(_0x1a8da9,_0x222406){return db['CmHopperBlack'][_0x46d1('0x15')]({'raw':_0x6412de[_0x46d1('0x16')]?_0x6412de[_0x46d1('0x16')][_0x46d1('0x17')]===undefined?!![]:![]:!![],'where':_0x6412de['options']?_0x6412de[_0x46d1('0x16')][_0x46d1('0x18')]||null:null,'attributes':_0x6412de['options']?_0x6412de[_0x46d1('0x16')][_0x46d1('0x19')]||null:null,'limit':_0x6412de[_0x46d1('0x16')]?_0x6412de['options'][_0x46d1('0x1a')]||null:null,'include':_0x6412de[_0x46d1('0x16')]?_0x6412de[_0x46d1('0x16')][_0x46d1('0x1b')]?_[_0x46d1('0x1c')](_0x6412de[_0x46d1('0x16')][_0x46d1('0x1b')],function(_0x22a5d1){return{'model':db[_0x22a5d1[_0x46d1('0x1d')]],'as':_0x22a5d1['as'],'attributes':_0x22a5d1[_0x46d1('0x19')],'include':_0x22a5d1[_0x46d1('0x1b')]?_[_0x46d1('0x1c')](_0x22a5d1['include'],function(_0x9935c5){return{'model':db[_0x9935c5[_0x46d1('0x1d')]],'as':_0x9935c5['as'],'attributes':_0x9935c5[_0x46d1('0x19')],'include':_0x9935c5[_0x46d1('0x1b')]?_[_0x46d1('0x1c')](_0x9935c5[_0x46d1('0x1b')],function(_0x4675da){return{'model':db[_0x4675da[_0x46d1('0x1d')]],'as':_0x4675da['as'],'attributes':_0x4675da[_0x46d1('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2c5c33){logger[_0x46d1('0x9')](_0x46d1('0x14'),_0x6412de);logger[_0x46d1('0xc')](_0x46d1('0x14'),_0x6412de,JSON['stringify'](_0x2c5c33));_0x1a8da9(_0x2c5c33);})[_0x46d1('0x13')](function(_0x5ce077){logger['error'](_0x46d1('0x14'),_0x5ce077['message'],_0x6412de);_0x222406(_0x1e333f[_0x46d1('0xf')](0x1f4,_0x5ce077[_0x46d1('0x11')]));});});};exports['UpdateCmHopperBlack']=function(_0x38e87b){var _0x5e1d44=this;return new Promise(function(_0xdfcbad,_0x1f2ee5){return db[_0x46d1('0x1e')][_0x46d1('0x1f')](_0x38e87b[_0x46d1('0x20')],{'raw':_0x38e87b[_0x46d1('0x16')]?_0x38e87b[_0x46d1('0x16')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x38e87b[_0x46d1('0x16')]?_0x38e87b[_0x46d1('0x16')]['where']||null:null,'attributes':_0x38e87b[_0x46d1('0x16')]?_0x38e87b['options'][_0x46d1('0x19')]||null:null,'limit':_0x38e87b['options']?_0x38e87b['options'][_0x46d1('0x1a')]||null:null})['then'](function(_0x18718a){logger['info']('UpdateCmHopperBlack',_0x38e87b);logger[_0x46d1('0xc')]('UpdateCmHopperBlack',_0x38e87b,JSON[_0x46d1('0xe')](_0x18718a));_0xdfcbad(_0x18718a);})[_0x46d1('0x13')](function(_0x1f3e1e){logger[_0x46d1('0xf')](_0x46d1('0x21'),_0x1f3e1e[_0x46d1('0x11')],_0x38e87b);_0x1f2ee5(_0x5e1d44[_0x46d1('0xf')](0x1f4,_0x1f3e1e[_0x46d1('0x11')]));});});};exports[_0x46d1('0x22')]=function(_0x43004c){var _0x3f71ce=this;return new Promise(function(_0x2b81ee,_0x540823){return db['CmHopperBlack'][_0x46d1('0x23')]({'where':_0x43004c[_0x46d1('0x16')]?_0x43004c[_0x46d1('0x16')][_0x46d1('0x18')]||null:null})[_0x46d1('0x8')](function(_0xd6e873){logger[_0x46d1('0x9')](_0x46d1('0x22'),_0x43004c);logger['debug'](_0x46d1('0x22'),_0x43004c,JSON['stringify'](_0xd6e873));_0x2b81ee(_0xd6e873);})[_0x46d1('0x13')](function(_0x470683){logger[_0x46d1('0xf')](_0x46d1('0x22'),_0x470683[_0x46d1('0x11')],_0x43004c);_0x540823(_0x3f71ce[_0x46d1('0xf')](0x1f4,_0x470683[_0x46d1('0x11')]));});});};
\ No newline at end of file
+var _0xa3dc=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','request','then','info','CmHopperBlack,\x20%s,\x20%s','request\x20sent','debug','CmHopperBlack,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','CmHopperBlack','findAll','options','raw','attributes','include','map','model','GetCmHopperBlack','UpdateCmHopperBlack','update','body','limit','destroy','where','DestroyCmHopperBlack','lodash'];(function(_0x2481c7,_0x2c6bcc){var _0x174f3b=function(_0x17326d){while(--_0x17326d){_0x2481c7['push'](_0x2481c7['shift']());}};_0x174f3b(++_0x2c6bcc);}(_0xa3dc,0x1ed));var _0xca3d=function(_0x1fed31,_0x1a2daf){_0x1fed31=_0x1fed31-0x0;var _0x1b412d=_0xa3dc[_0x1fed31];return _0x1b412d;};'use strict';var _=require(_0xca3d('0x0'));var util=require(_0xca3d('0x1'));var moment=require(_0xca3d('0x2'));var BPromise=require(_0xca3d('0x3'));var rs=require(_0xca3d('0x4'));var fs=require('fs');var Redis=require(_0xca3d('0x5'));var db=require(_0xca3d('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xca3d('0x7'))(_0xca3d('0x8'));var config=require('../../config/environment');var jayson=require(_0xca3d('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x1ff64e,_0x3ad66a,_0x402af5){return new BPromise(function(_0x43407e,_0x1de9ac){return client[_0xca3d('0xa')](_0x1ff64e,_0x402af5)[_0xca3d('0xb')](function(_0x1c28f3){logger[_0xca3d('0xc')](_0xca3d('0xd'),_0x3ad66a,_0xca3d('0xe'));logger[_0xca3d('0xf')](_0xca3d('0x10'),_0x3ad66a,_0xca3d('0xe'),JSON[_0xca3d('0x11')](_0x1c28f3));if(_0x1c28f3[_0xca3d('0x12')]){if(_0x1c28f3[_0xca3d('0x12')]['code']===0x1f4){logger[_0xca3d('0x12')](_0xca3d('0xd'),_0x3ad66a,_0x1c28f3[_0xca3d('0x12')][_0xca3d('0x13')]);return _0x1de9ac(_0x1c28f3[_0xca3d('0x12')][_0xca3d('0x13')]);}logger['error'](_0xca3d('0xd'),_0x3ad66a,_0x1c28f3[_0xca3d('0x12')][_0xca3d('0x13')]);return _0x43407e(_0x1c28f3['error']['message']);}else{logger[_0xca3d('0xc')]('CmHopperBlack,\x20%s,\x20%s',_0x3ad66a,_0xca3d('0xe'));_0x43407e(_0x1c28f3[_0xca3d('0x14')]['message']);}})[_0xca3d('0x15')](function(_0x5974c2){logger[_0xca3d('0x12')]('CmHopperBlack,\x20%s,\x20%s',_0x3ad66a,_0x5974c2);_0x1de9ac(_0x5974c2);});});}exports['GetCmHopperBlack']=function(_0x2bec64){var _0x15a942=this;return new Promise(function(_0x40efd3,_0x4fa36f){return db[_0xca3d('0x16')][_0xca3d('0x17')]({'raw':_0x2bec64[_0xca3d('0x18')]?_0x2bec64[_0xca3d('0x18')][_0xca3d('0x19')]===undefined?!![]:![]:!![],'where':_0x2bec64[_0xca3d('0x18')]?_0x2bec64[_0xca3d('0x18')]['where']||null:null,'attributes':_0x2bec64['options']?_0x2bec64[_0xca3d('0x18')][_0xca3d('0x1a')]||null:null,'limit':_0x2bec64['options']?_0x2bec64['options']['limit']||null:null,'include':_0x2bec64[_0xca3d('0x18')]?_0x2bec64[_0xca3d('0x18')][_0xca3d('0x1b')]?_[_0xca3d('0x1c')](_0x2bec64[_0xca3d('0x18')][_0xca3d('0x1b')],function(_0xc73de4){return{'model':db[_0xc73de4[_0xca3d('0x1d')]],'as':_0xc73de4['as'],'attributes':_0xc73de4[_0xca3d('0x1a')],'include':_0xc73de4[_0xca3d('0x1b')]?_[_0xca3d('0x1c')](_0xc73de4['include'],function(_0x26348f){return{'model':db[_0x26348f[_0xca3d('0x1d')]],'as':_0x26348f['as'],'attributes':_0x26348f[_0xca3d('0x1a')],'include':_0x26348f[_0xca3d('0x1b')]?_['map'](_0x26348f[_0xca3d('0x1b')],function(_0x136a63){return{'model':db[_0x136a63[_0xca3d('0x1d')]],'as':_0x136a63['as'],'attributes':_0x136a63[_0xca3d('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x10d3d3){logger[_0xca3d('0xc')](_0xca3d('0x1e'),_0x2bec64);logger[_0xca3d('0xf')](_0xca3d('0x1e'),_0x2bec64,JSON[_0xca3d('0x11')](_0x10d3d3));_0x40efd3(_0x10d3d3);})[_0xca3d('0x15')](function(_0xd40e8){logger[_0xca3d('0x12')](_0xca3d('0x1e'),_0xd40e8[_0xca3d('0x13')],_0x2bec64);_0x4fa36f(_0x15a942[_0xca3d('0x12')](0x1f4,_0xd40e8[_0xca3d('0x13')]));});});};exports[_0xca3d('0x1f')]=function(_0x37f4bd){var _0x37aa79=this;return new Promise(function(_0x3b797c,_0x1757db){return db['CmHopperBlack'][_0xca3d('0x20')](_0x37f4bd[_0xca3d('0x21')],{'raw':_0x37f4bd[_0xca3d('0x18')]?_0x37f4bd[_0xca3d('0x18')][_0xca3d('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x37f4bd[_0xca3d('0x18')]?_0x37f4bd[_0xca3d('0x18')]['where']||null:null,'attributes':_0x37f4bd[_0xca3d('0x18')]?_0x37f4bd['options'][_0xca3d('0x1a')]||null:null,'limit':_0x37f4bd['options']?_0x37f4bd[_0xca3d('0x18')][_0xca3d('0x22')]||null:null})[_0xca3d('0xb')](function(_0x2b1294){logger[_0xca3d('0xc')](_0xca3d('0x1f'),_0x37f4bd);logger[_0xca3d('0xf')](_0xca3d('0x1f'),_0x37f4bd,JSON['stringify'](_0x2b1294));_0x3b797c(_0x2b1294);})[_0xca3d('0x15')](function(_0x226270){logger['error'](_0xca3d('0x1f'),_0x226270[_0xca3d('0x13')],_0x37f4bd);_0x1757db(_0x37aa79[_0xca3d('0x12')](0x1f4,_0x226270['message']));});});};exports['DestroyCmHopperBlack']=function(_0x4f2f7a){var _0x1dd21e=this;return new Promise(function(_0x3188ef,_0x120722){return db[_0xca3d('0x16')][_0xca3d('0x23')]({'where':_0x4f2f7a[_0xca3d('0x18')]?_0x4f2f7a['options'][_0xca3d('0x24')]||null:null})[_0xca3d('0xb')](function(_0x300484){logger[_0xca3d('0xc')](_0xca3d('0x25'),_0x4f2f7a);logger['debug'](_0xca3d('0x25'),_0x4f2f7a,JSON[_0xca3d('0x11')](_0x300484));_0x3188ef(_0x300484);})['catch'](function(_0x22ab6c){logger['error'](_0xca3d('0x25'),_0x22ab6c[_0xca3d('0x13')],_0x4f2f7a);_0x120722(_0x1dd21e['error'](0x1f4,_0x22ab6c[_0xca3d('0x13')]));});});};
\ No newline at end of file
index 7a66e3e..6b6cf8d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2542=['multer','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmHopperBlack.controller','get','index','/describe','isAuthenticated','describe','/:id','show','put','update','delete'];(function(_0x38d2b1,_0x2778b3){var _0x38a5d0=function(_0x330cc1){while(--_0x330cc1){_0x38d2b1['push'](_0x38d2b1['shift']());}};_0x38a5d0(++_0x2778b3);}(_0x2542,0x169));var _0x2254=function(_0x1d1739,_0x3a10b7){_0x1d1739=_0x1d1739-0x0;var _0x38ad95=_0x2542[_0x1d1739];return _0x38ad95;};'use strict';var multer=require(_0x2254('0x0'));var util=require(_0x2254('0x1'));var path=require(_0x2254('0x2'));var timeout=require(_0x2254('0x3'));var express=require('express');var router=express[_0x2254('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x2254('0x5'));var interaction=require(_0x2254('0x6'));var config=require(_0x2254('0x7'));var controller=require(_0x2254('0x8'));router[_0x2254('0x9')]('/',auth['isAuthenticated'](),controller[_0x2254('0xa')]);router[_0x2254('0x9')](_0x2254('0xb'),auth[_0x2254('0xc')](),controller[_0x2254('0xd')]);router[_0x2254('0x9')](_0x2254('0xe'),auth[_0x2254('0xc')](),controller[_0x2254('0xf')]);router[_0x2254('0x10')](_0x2254('0xe'),auth['isAuthenticated'](),controller[_0x2254('0x11')]);router[_0x2254('0x12')](_0x2254('0xe'),auth[_0x2254('0xc')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0xafb9=['express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','index','isAuthenticated','describe','show','put','/:id','destroy','exports','multer','util','path','connect-timeout'];(function(_0x48d6aa,_0xa16c32){var _0xcda4c8=function(_0x1b1632){while(--_0x1b1632){_0x48d6aa['push'](_0x48d6aa['shift']());}};_0xcda4c8(++_0xa16c32);}(_0xafb9,0x68));var _0x9afb=function(_0x39aefb,_0x4912db){_0x39aefb=_0x39aefb-0x0;var _0x31ac69=_0xafb9[_0x39aefb];return _0x31ac69;};'use strict';var multer=require(_0x9afb('0x0'));var util=require(_0x9afb('0x1'));var path=require(_0x9afb('0x2'));var timeout=require(_0x9afb('0x3'));var express=require(_0x9afb('0x4'));var router=express[_0x9afb('0x5')]();var fs_extra=require(_0x9afb('0x6'));var auth=require(_0x9afb('0x7'));var interaction=require(_0x9afb('0x8'));var config=require('../../config/environment');var controller=require('./cmHopperBlack.controller');router[_0x9afb('0x9')]('/',auth['isAuthenticated'](),controller[_0x9afb('0xa')]);router['get']('/describe',auth[_0x9afb('0xb')](),controller[_0x9afb('0xc')]);router[_0x9afb('0x9')]('/:id',auth[_0x9afb('0xb')](),controller[_0x9afb('0xd')]);router[_0x9afb('0xe')](_0x9afb('0xf'),auth[_0x9afb('0xb')](),controller['update']);router['delete'](_0x9afb('0xf'),auth[_0x9afb('0xb')](),controller[_0x9afb('0x10')]);module[_0x9afb('0x11')]=router;
\ No newline at end of file
index 876912d..3cf4881 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf733=['getDataValue','endtime','followuptime','diff','BOOLEAN','sequelize','moment','INTEGER','STRING','DATE'];(function(_0x2b88c5,_0x494b55){var _0x1e9b91=function(_0x4df4a0){while(--_0x4df4a0){_0x2b88c5['push'](_0x2b88c5['shift']());}};_0x1e9b91(++_0x494b55);}(_0xf733,0xaf));var _0x3f73=function(_0x413426,_0x4f7814){_0x413426=_0x413426-0x0;var _0x5576e2=_0xf733[_0x413426];return _0x5576e2;};'use strict';var Sequelize=require(_0x3f73('0x0'));var moment=require(_0x3f73('0x1'));module['exports']={'state':{'type':Sequelize[_0x3f73('0x2')](0x2)},'statedesc':{'type':Sequelize[_0x3f73('0x3')]},'scheduledat':{'type':Sequelize[_0x3f73('0x4')]},'countbusyretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x3f73('0x2')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x3f73('0x2')],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0x3f73('0x2')],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0x3f73('0x3')]},'originatecalleridnum':{'type':Sequelize[_0x3f73('0x3')]},'originatecalleridname':{'type':Sequelize[_0x3f73('0x3')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x3f73('0x3')]},'starttime':{'type':Sequelize[_0x3f73('0x4')]},'responsetime':{'type':Sequelize[_0x3f73('0x4')]},'answertime':{'type':Sequelize[_0x3f73('0x4')]},'droptime':{'type':Sequelize[_0x3f73('0x4')]},'endtime':{'type':Sequelize[_0x3f73('0x4')]},'ringtime':{'type':Sequelize[_0x3f73('0x2')],'defaultValue':0x0},'holdtime':{'type':Sequelize[_0x3f73('0x2')],'defaultValue':0x0},'talktime':{'type':Sequelize[_0x3f73('0x2')],'defaultValue':0x0},'followuptime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0x3f73('0x3')]},'campaign':{'type':Sequelize['STRING']},'campaigntype':{'type':Sequelize[_0x3f73('0x3')]},'membername':{'type':Sequelize[_0x3f73('0x3')]},'reason':{'type':Sequelize[_0x3f73('0x3')]},'disposition':{'type':Sequelize[_0x3f73('0x3')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize['STRING']},'dispositionat':{'type':Sequelize[_0x3f73('0x4')],'set':function(_0x2cdef3){var _0xd4c149=this[_0x3f73('0x5')](_0x3f73('0x6'));if(_0xd4c149&&_0x2cdef3){this['setDataValue'](_0x3f73('0x7'),moment(_0x2cdef3)[_0x3f73('0x8')](moment(_0xd4c149),'seconds'));}}},'amd':{'type':Sequelize[_0x3f73('0x9')],'defaultValue':![]},'fax':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'blacklist':{'type':Sequelize[_0x3f73('0x9')],'defaultValue':![]},'rescheduled':{'type':Sequelize[_0x3f73('0x9')],'defaultValue':![]},'rescheduledat':{'type':Sequelize[_0x3f73('0x4')]},'callback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize['STRING'],'defaultValue':null},'callbackat':{'type':Sequelize['DATE']},'deleted':{'type':Sequelize[_0x3f73('0x3')],'defaultValue':null},'deletedat':{'type':Sequelize['DATE']},'recallme':{'type':Sequelize[_0x3f73('0x9')],'defaultValue':![]},'agiafterat':{'type':Sequelize[_0x3f73('0x4')]},'countnosuchnumberretry':{'type':Sequelize[_0x3f73('0x2')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x3f73('0x2')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0x3f73('0x2')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x3f73('0x2')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x3f73('0x2')],'defaultValue':0x0}};
\ No newline at end of file
+var _0xca7b=['diff','seconds','BOOLEAN','moment','exports','INTEGER','STRING','DATE','getDataValue','setDataValue'];(function(_0x213065,_0x3afd09){var _0x50a790=function(_0x5705dd){while(--_0x5705dd){_0x213065['push'](_0x213065['shift']());}};_0x50a790(++_0x3afd09);}(_0xca7b,0x16b));var _0xbca7=function(_0x36ae89,_0x4a3819){_0x36ae89=_0x36ae89-0x0;var _0x3ca164=_0xca7b[_0x36ae89];return _0x3ca164;};'use strict';var Sequelize=require('sequelize');var moment=require(_0xbca7('0x0'));module[_0xbca7('0x1')]={'state':{'type':Sequelize[_0xbca7('0x2')](0x2)},'statedesc':{'type':Sequelize[_0xbca7('0x3')]},'scheduledat':{'type':Sequelize[_0xbca7('0x4')]},'countbusyretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0xbca7('0x2')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countglobal':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0xbca7('0x3')]},'originatecalleridnum':{'type':Sequelize[_0xbca7('0x3')]},'originatecalleridname':{'type':Sequelize[_0xbca7('0x3')]},'calleridnum':{'type':Sequelize[_0xbca7('0x3')]},'calleridname':{'type':Sequelize[_0xbca7('0x3')]},'starttime':{'type':Sequelize['DATE']},'responsetime':{'type':Sequelize[_0xbca7('0x4')]},'answertime':{'type':Sequelize[_0xbca7('0x4')]},'droptime':{'type':Sequelize[_0xbca7('0x4')]},'endtime':{'type':Sequelize['DATE']},'ringtime':{'type':Sequelize[_0xbca7('0x2')],'defaultValue':0x0},'holdtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'talktime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'followuptime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0xbca7('0x3')]},'campaign':{'type':Sequelize['STRING']},'campaigntype':{'type':Sequelize[_0xbca7('0x3')]},'membername':{'type':Sequelize[_0xbca7('0x3')]},'reason':{'type':Sequelize[_0xbca7('0x3')]},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize[_0xbca7('0x3')]},'thirdDisposition':{'type':Sequelize['STRING']},'dispositionat':{'type':Sequelize[_0xbca7('0x4')],'set':function(_0x4e768f){var _0x45e6c0=this[_0xbca7('0x5')]('endtime');if(_0x45e6c0&&_0x4e768f){this[_0xbca7('0x6')]('followuptime',moment(_0x4e768f)[_0xbca7('0x7')](moment(_0x45e6c0),_0xbca7('0x8')));}}},'amd':{'type':Sequelize[_0xbca7('0x9')],'defaultValue':![]},'fax':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'blacklist':{'type':Sequelize[_0xbca7('0x9')],'defaultValue':![]},'rescheduled':{'type':Sequelize[_0xbca7('0x9')],'defaultValue':![]},'rescheduledat':{'type':Sequelize[_0xbca7('0x4')]},'callback':{'type':Sequelize[_0xbca7('0x9')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize['STRING'],'defaultValue':null},'callbackat':{'type':Sequelize[_0xbca7('0x4')]},'deleted':{'type':Sequelize['STRING'],'defaultValue':null},'deletedat':{'type':Sequelize['DATE']},'recallme':{'type':Sequelize[_0xbca7('0x9')],'defaultValue':![]},'agiafterat':{'type':Sequelize[_0xbca7('0x4')]},'countnosuchnumberretry':{'type':Sequelize[_0xbca7('0x2')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0xbca7('0x2')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0xbca7('0x2')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0xbca7('0x2')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0xbca7('0x2')],'defaultValue':0x0}};
\ No newline at end of file
index 013cb92..7df022f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x33af=['end','status','json','undefined','limit','count','offset','set','Content-Range','apply','reject','update','then','destroy','stack','name','send','index','map','CmHopperFinal','rawAttributes','fieldName','type','key','query','keys','filters','intersection','model','attributes','fields','order','sort','where','merge','VIRTUAL','filter','includeAll','findAll','rows','catch','show','params','length','include','describe','body','uniqueid','find','countContactsQueueCampaignHopperFinal','COUNT','sequelize','`state`\x20=\x200,\x201,\x20null','noSuchContacts','literal','`state`\x20=\x203,\x201,\x20null','`state`\x20=\x205,\x201,\x20null','busyContacts','congestionContacts','`state`\x20=\x2010\x20,\x201,\x20null','`state`\x20=\x2022,\x201,\x20null','reCallContacts','`state`\x20=\x2019,\x201,\x20null','countContactsIvrCampaignHopperFinal','noAnswerContacts','`state`\x20=\x208,\x201,\x20null','dropContacts','`state`\x20=\x2011\x20,\x201,\x20null','abandonedContacts','answeringMachine','moveContactsQueueCampaignHopperFinal','cm_hopper','phone','scheduledAt','ContactId','ListId','VoiceQueueId','select','field','ANY_VALUE(calleridnum)','NOW()','ANY_VALUE(ContactId)','ANY_VALUE(VoiceQueueId)','createdAt','updatedAt','from','cm_hopper_final','VoiceQueueId\x20=\x20?','toString','state\x20=\x20?','state','calleridnum\x20IS\x20NOT\x20NULL','calleridnum\x20NOT\x20IN\x20(?)','calleridnum','state\x20=\x204','group','moveContactsIvrCampaignHopperFinal','insert','fromQuery','CampaignId','ANY_VALUE(ListId)','CampaignId\x20=\x20?','checkContactHopper','CmHopper','findOne','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb'];(function(_0x1a0ad9,_0x47dc23){var _0x457565=function(_0x1fd327){while(--_0x1fd327){_0x1a0ad9['push'](_0x1a0ad9['shift']());}};_0x457565(++_0x47dc23);}(_0x33af,0xec));var _0xf33a=function(_0x4cefc3,_0x23f291){_0x4cefc3=_0x4cefc3-0x0;var _0x1cc779=_0x33af[_0x4cefc3];return _0x1cc779;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xf33a('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xf33a('0x1'));var rp=require(_0xf33a('0x2'));var moment=require(_0xf33a('0x3'));var BPromise=require(_0xf33a('0x4'));var Mustache=require(_0xf33a('0x5'));var util=require(_0xf33a('0x6'));var path=require('path');var sox=require(_0xf33a('0x7'));var csv=require(_0xf33a('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xf33a('0x9'));var _=require(_0xf33a('0xa'));var squel=require(_0xf33a('0xb'));var crypto=require(_0xf33a('0xc'));var jsforce=require(_0xf33a('0xd'));var deskjs=require(_0xf33a('0xe'));var toCsv=require('to-csv');var querystring=require(_0xf33a('0xf'));var Papa=require(_0xf33a('0x10'));var Redis=require(_0xf33a('0x11'));var authService=require(_0xf33a('0x12'));var qs=require(_0xf33a('0x13'));var as=require(_0xf33a('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xf33a('0x15'));var utils=require(_0xf33a('0x16'));var config=require(_0xf33a('0x17'));var licenseUtil=require(_0xf33a('0x18'));var db=require(_0xf33a('0x19'))['db'];function respondWithStatusCode(_0x5959c9,_0x9f87bc){_0x9f87bc=_0x9f87bc||0xcc;return function(_0x21b80e){if(_0x21b80e){return _0x5959c9['sendStatus'](_0x9f87bc);}return _0x5959c9['status'](_0x9f87bc)[_0xf33a('0x1a')]();};}function respondWithResult(_0x1b3bf0,_0x17043){_0x17043=_0x17043||0xc8;return function(_0x153bda){if(_0x153bda){return _0x1b3bf0[_0xf33a('0x1b')](_0x17043)[_0xf33a('0x1c')](_0x153bda);}};}function respondWithFilteredResult(_0x45e311,_0x1f2b1b){return function(_0x507cb9){if(_0x507cb9){var _0x441f59=typeof _0x1f2b1b['offset']===_0xf33a('0x1d')&&typeof _0x1f2b1b[_0xf33a('0x1e')]==='undefined';var _0x37e76c=_0x507cb9[_0xf33a('0x1f')];var _0x524109=_0x441f59?0x0:_0x1f2b1b[_0xf33a('0x20')];var _0x23d9e2=_0x441f59?_0x507cb9[_0xf33a('0x1f')]:_0x1f2b1b[_0xf33a('0x20')]+_0x1f2b1b['limit'];var _0x11efa0;if(_0x23d9e2>=_0x37e76c){_0x23d9e2=_0x37e76c;_0x11efa0=0xc8;}else{_0x11efa0=0xce;}_0x45e311[_0xf33a('0x1b')](_0x11efa0);return _0x45e311[_0xf33a('0x21')](_0xf33a('0x22'),_0x524109+'-'+_0x23d9e2+'/'+_0x37e76c)[_0xf33a('0x1c')](_0x507cb9);}return null;};}function patchUpdates(_0x6cdf7b){return function(_0x19986f){try{jsonpatch[_0xf33a('0x23')](_0x19986f,_0x6cdf7b,!![]);}catch(_0x19055e){return BPromise[_0xf33a('0x24')](_0x19055e);}return _0x19986f['save']();};}function saveUpdates(_0x3854b4,_0x272e60){return function(_0x1bf9bc){if(_0x1bf9bc){return _0x1bf9bc[_0xf33a('0x25')](_0x3854b4)[_0xf33a('0x26')](function(_0x51d3fd){return _0x51d3fd;});}return null;};}function removeEntity(_0x44654c,_0x5882ba){return function(_0x492986){if(_0x492986){return _0x492986[_0xf33a('0x27')]()[_0xf33a('0x26')](function(){_0x44654c[_0xf33a('0x1b')](0xcc)[_0xf33a('0x1a')]();});}};}function handleEntityNotFound(_0x4b9801,_0x57cb1d){return function(_0x393005){if(!_0x393005){_0x4b9801['sendStatus'](0x194);}return _0x393005;};}function handleError(_0x4af24a,_0x16ef31){_0x16ef31=_0x16ef31||0x1f4;return function(_0x5f0a53){logger['error'](_0x5f0a53[_0xf33a('0x28')]);if(_0x5f0a53['name']){delete _0x5f0a53[_0xf33a('0x29')];}_0x4af24a['status'](_0x16ef31)[_0xf33a('0x2a')](_0x5f0a53);};}exports[_0xf33a('0x2b')]=function(_0x469741,_0x729fca){var _0x4552c9={},_0x3068a9={},_0x1d19ee={'count':0x0,'rows':[]};var _0x1246ff=_[_0xf33a('0x2c')](db[_0xf33a('0x2d')][_0xf33a('0x2e')],function(_0x8f8ddc){return{'name':_0x8f8ddc[_0xf33a('0x2f')],'type':_0x8f8ddc[_0xf33a('0x30')][_0xf33a('0x31')]};});_0x3068a9['model']=_[_0xf33a('0x2c')](_0x1246ff,_0xf33a('0x29'));_0x3068a9[_0xf33a('0x32')]=_[_0xf33a('0x33')](_0x469741['query']);_0x3068a9[_0xf33a('0x34')]=_[_0xf33a('0x35')](_0x3068a9[_0xf33a('0x36')],_0x3068a9[_0xf33a('0x32')]);_0x4552c9[_0xf33a('0x37')]=_[_0xf33a('0x35')](_0x3068a9['model'],qs[_0xf33a('0x38')](_0x469741[_0xf33a('0x32')][_0xf33a('0x38')]));_0x4552c9[_0xf33a('0x37')]=_0x4552c9[_0xf33a('0x37')]['length']?_0x4552c9['attributes']:_0x3068a9[_0xf33a('0x36')];if(!_0x469741['query']['hasOwnProperty']('nolimit')){_0x4552c9[_0xf33a('0x1e')]=qs[_0xf33a('0x1e')](_0x469741['query'][_0xf33a('0x1e')]);_0x4552c9['offset']=qs[_0xf33a('0x20')](_0x469741[_0xf33a('0x32')][_0xf33a('0x20')]);}_0x4552c9[_0xf33a('0x39')]=qs[_0xf33a('0x3a')](_0x469741[_0xf33a('0x32')]['sort']);_0x4552c9[_0xf33a('0x3b')]=qs[_0xf33a('0x34')](_['pick'](_0x469741[_0xf33a('0x32')],_0x3068a9[_0xf33a('0x34')]),_0x1246ff);if(_0x469741[_0xf33a('0x32')]['filter']){_0x4552c9[_0xf33a('0x3b')]=_[_0xf33a('0x3c')](_0x4552c9[_0xf33a('0x3b')],{'$or':_[_0xf33a('0x2c')](_0x1246ff,function(_0x3ec562){if(_0x3ec562[_0xf33a('0x30')]!==_0xf33a('0x3d')){var _0x128baf={};_0x128baf[_0x3ec562[_0xf33a('0x29')]]={'$like':'%'+_0x469741['query'][_0xf33a('0x3e')]+'%'};return _0x128baf;}})});}_0x4552c9=_[_0xf33a('0x3c')]({},_0x4552c9,_0x469741['options']);var _0x1e8800={'where':_0x4552c9['where']};return db['CmHopperFinal'][_0xf33a('0x1f')](_0x1e8800)[_0xf33a('0x26')](function(_0x4dada1){_0x1d19ee[_0xf33a('0x1f')]=_0x4dada1;if(_0x469741[_0xf33a('0x32')][_0xf33a('0x3f')]){_0x4552c9['include']=[{'all':!![]}];}return db[_0xf33a('0x2d')][_0xf33a('0x40')](_0x4552c9);})['then'](function(_0x1e9748){_0x1d19ee[_0xf33a('0x41')]=_0x1e9748;return _0x1d19ee;})[_0xf33a('0x26')](respondWithFilteredResult(_0x729fca,_0x4552c9))[_0xf33a('0x42')](handleError(_0x729fca,null));};exports[_0xf33a('0x43')]=function(_0x5044f9,_0x45ae15){var _0x1722e5={'raw':!![],'where':{'id':_0x5044f9[_0xf33a('0x44')]['id']}},_0x2325eb={};_0x2325eb[_0xf33a('0x36')]=_['keys'](db[_0xf33a('0x2d')][_0xf33a('0x2e')]);_0x2325eb[_0xf33a('0x32')]=_['keys'](_0x5044f9[_0xf33a('0x32')]);_0x2325eb[_0xf33a('0x34')]=_[_0xf33a('0x35')](_0x2325eb[_0xf33a('0x36')],_0x2325eb[_0xf33a('0x32')]);_0x1722e5[_0xf33a('0x37')]=_['intersection'](_0x2325eb[_0xf33a('0x36')],qs[_0xf33a('0x38')](_0x5044f9[_0xf33a('0x32')][_0xf33a('0x38')]));_0x1722e5[_0xf33a('0x37')]=_0x1722e5['attributes'][_0xf33a('0x45')]?_0x1722e5[_0xf33a('0x37')]:_0x2325eb[_0xf33a('0x36')];if(_0x5044f9['query'][_0xf33a('0x3f')]){_0x1722e5[_0xf33a('0x46')]=[{'all':!![]}];}_0x1722e5=_['merge']({},_0x1722e5,_0x5044f9['options']);return db[_0xf33a('0x2d')]['find'](_0x1722e5)[_0xf33a('0x26')](handleEntityNotFound(_0x45ae15,null))[_0xf33a('0x26')](respondWithResult(_0x45ae15,null))[_0xf33a('0x42')](handleError(_0x45ae15,null));};exports[_0xf33a('0x47')]=function(_0xecc82f,_0x1a98f9){return db[_0xf33a('0x2d')][_0xf33a('0x47')]()[_0xf33a('0x26')](respondWithResult(_0x1a98f9,null))[_0xf33a('0x42')](handleError(_0x1a98f9,null));};exports[_0xf33a('0x25')]=function(_0x4107b1,_0x190a2b){if(_0x4107b1[_0xf33a('0x48')][_0xf33a('0x49')]){delete _0x4107b1[_0xf33a('0x48')][_0xf33a('0x49')];}return db[_0xf33a('0x2d')][_0xf33a('0x4a')]({'where':{'uniqueid':_0x4107b1[_0xf33a('0x44')]['id']}})[_0xf33a('0x26')](handleEntityNotFound(_0x190a2b,null))[_0xf33a('0x26')](saveUpdates(_0x4107b1[_0xf33a('0x48')],null))[_0xf33a('0x26')](respondWithResult(_0x190a2b,null))[_0xf33a('0x42')](handleError(_0x190a2b,null));};exports[_0xf33a('0x4b')]=function(_0x3bab07,_0x1f7d8c,_0x57815c){return db['CmHopperFinal'][_0xf33a('0x40')]({'raw':![],'where':{'VoiceQueueId':_0x3bab07[_0xf33a('0x44')]['id']},'attributes':[[db['sequelize']['fn'](_0xf33a('0x4c'),db[_0xf33a('0x4d')]['fn']('IF',db[_0xf33a('0x4d')]['literal'](_0xf33a('0x4e')))),_0xf33a('0x4f')],[db[_0xf33a('0x4d')]['fn']('COUNT',db[_0xf33a('0x4d')]['fn']('IF',db['sequelize'][_0xf33a('0x50')](_0xf33a('0x51')))),'noAnswerContacts'],[db['sequelize']['fn'](_0xf33a('0x4c'),db[_0xf33a('0x4d')]['fn']('IF',db[_0xf33a('0x4d')]['literal'](_0xf33a('0x52')))),_0xf33a('0x53')],[db[_0xf33a('0x4d')]['fn'](_0xf33a('0x4c'),db[_0xf33a('0x4d')]['fn']('IF',db[_0xf33a('0x4d')][_0xf33a('0x50')]('`state`\x20=\x208,\x201,\x20null'))),_0xf33a('0x54')],[db['sequelize']['fn']('COUNT',db['sequelize']['fn']('IF',db[_0xf33a('0x4d')][_0xf33a('0x50')](_0xf33a('0x55')))),'dropContacts'],[db[_0xf33a('0x4d')]['fn'](_0xf33a('0x4c'),db[_0xf33a('0x4d')]['fn']('IF',db[_0xf33a('0x4d')][_0xf33a('0x50')]('`state`\x20=\x2011\x20,\x201,\x20null'))),'abandonedContacts'],[db['sequelize']['fn'](_0xf33a('0x4c'),db['sequelize']['fn']('IF',db[_0xf33a('0x4d')][_0xf33a('0x50')](_0xf33a('0x56')))),_0xf33a('0x57')],[db[_0xf33a('0x4d')]['fn'](_0xf33a('0x4c'),db['sequelize']['fn']('IF',db[_0xf33a('0x4d')][_0xf33a('0x50')](_0xf33a('0x58')))),'answeringMachine']]})[_0xf33a('0x26')](handleEntityNotFound(_0x1f7d8c,null))[_0xf33a('0x26')](respondWithResult(_0x1f7d8c,null))[_0xf33a('0x42')](handleError(_0x1f7d8c,null));};exports[_0xf33a('0x59')]=function(_0x2f1fef,_0x129229,_0x473484){return db[_0xf33a('0x2d')][_0xf33a('0x40')]({'raw':![],'where':{'CampaignId':_0x2f1fef[_0xf33a('0x44')]['id']},'attributes':[[db[_0xf33a('0x4d')]['fn'](_0xf33a('0x4c'),db[_0xf33a('0x4d')]['fn']('IF',db[_0xf33a('0x4d')]['literal']('`state`\x20=\x200,\x201,\x20null'))),_0xf33a('0x4f')],[db[_0xf33a('0x4d')]['fn'](_0xf33a('0x4c'),db[_0xf33a('0x4d')]['fn']('IF',db[_0xf33a('0x4d')][_0xf33a('0x50')](_0xf33a('0x51')))),_0xf33a('0x5a')],[db[_0xf33a('0x4d')]['fn'](_0xf33a('0x4c'),db[_0xf33a('0x4d')]['fn']('IF',db['sequelize'][_0xf33a('0x50')](_0xf33a('0x52')))),_0xf33a('0x53')],[db[_0xf33a('0x4d')]['fn'](_0xf33a('0x4c'),db[_0xf33a('0x4d')]['fn']('IF',db[_0xf33a('0x4d')][_0xf33a('0x50')](_0xf33a('0x5b')))),'congestionContacts'],[db[_0xf33a('0x4d')]['fn'](_0xf33a('0x4c'),db['sequelize']['fn']('IF',db[_0xf33a('0x4d')][_0xf33a('0x50')](_0xf33a('0x55')))),_0xf33a('0x5c')],[db[_0xf33a('0x4d')]['fn'](_0xf33a('0x4c'),db['sequelize']['fn']('IF',db[_0xf33a('0x4d')][_0xf33a('0x50')](_0xf33a('0x5d')))),_0xf33a('0x5e')],[db[_0xf33a('0x4d')]['fn'](_0xf33a('0x4c'),db[_0xf33a('0x4d')]['fn']('IF',db['sequelize'][_0xf33a('0x50')](_0xf33a('0x56')))),'reCallContacts'],[db['sequelize']['fn']('COUNT',db[_0xf33a('0x4d')]['fn']('IF',db[_0xf33a('0x4d')][_0xf33a('0x50')](_0xf33a('0x58')))),_0xf33a('0x5f')]]})[_0xf33a('0x26')](handleEntityNotFound(_0x129229,null))[_0xf33a('0x26')](respondWithResult(_0x129229,null))[_0xf33a('0x42')](handleError(_0x129229,null));};exports[_0xf33a('0x60')]=function(_0x3bebca,_0x40bb02,_0x10a271){return db['VoiceQueue'][_0xf33a('0x4a')]({'where':{'id':_0x3bebca['params']['id']}})['then'](handleEntityNotFound(_0x40bb02,null))[_0xf33a('0x26')](function(_0x25cc49){var _0x132764;if(_0x25cc49){_0x132764=squel['insert']()['into'](_0xf33a('0x61'))['fromQuery']([_0xf33a('0x62'),_0xf33a('0x63'),_0xf33a('0x64'),_0xf33a('0x65'),_0xf33a('0x66'),'createdAt','updatedAt'],squel[_0xf33a('0x67')]()[_0xf33a('0x68')](_0xf33a('0x69'),_0xf33a('0x62'))['field'](_0xf33a('0x6a'),_0xf33a('0x63'))['field'](_0xf33a('0x6b'),_0xf33a('0x64'))[_0xf33a('0x68')]('ANY_VALUE(ListId)',_0xf33a('0x65'))[_0xf33a('0x68')](_0xf33a('0x6c'),_0xf33a('0x66'))['field'](_0xf33a('0x6a'),_0xf33a('0x6d'))[_0xf33a('0x68')]('NOW()',_0xf33a('0x6e'))[_0xf33a('0x6f')](_0xf33a('0x70'))[_0xf33a('0x3b')](_0xf33a('0x71'),_0x3bebca[_0xf33a('0x44')]['id'][_0xf33a('0x72')]())[_0xf33a('0x3b')](_0xf33a('0x73'),_0x3bebca[_0xf33a('0x48')][_0xf33a('0x74')][_0xf33a('0x72')]())[_0xf33a('0x3b')](_0xf33a('0x75'))[_0xf33a('0x3b')]('calleridnum\x20NOT\x20IN\x20(?)',squel[_0xf33a('0x67')]()[_0xf33a('0x68')](_0xf33a('0x62'))[_0xf33a('0x6f')](_0xf33a('0x61'))[_0xf33a('0x3b')](_0xf33a('0x71'),_0x3bebca[_0xf33a('0x44')]['id'][_0xf33a('0x72')]()))[_0xf33a('0x3b')](_0xf33a('0x76'),squel[_0xf33a('0x67')]()[_0xf33a('0x68')](_0xf33a('0x77'))['from'](_0xf33a('0x70'))[_0xf33a('0x3b')](_0xf33a('0x71'),_0x3bebca[_0xf33a('0x44')]['id']['toString']())[_0xf33a('0x3b')](_0xf33a('0x78')))[_0xf33a('0x79')](_0xf33a('0x64')))[_0xf33a('0x72')]();return db[_0xf33a('0x4d')][_0xf33a('0x32')](_0x132764);}return[];})[_0xf33a('0x26')](respondWithResult(_0x40bb02,null))['catch'](handleError(_0x40bb02,null));};exports[_0xf33a('0x7a')]=function(_0x1dfb59,_0x9c0b99,_0x17b2fa){return db['Campaign']['find']({'where':{'id':_0x1dfb59[_0xf33a('0x44')]['id']}})['then'](handleEntityNotFound(_0x9c0b99,null))[_0xf33a('0x26')](function(_0x1595b7){var _0x3d8dbe;if(_0x1595b7){_0x3d8dbe=squel[_0xf33a('0x7b')]()['into']('cm_hopper')[_0xf33a('0x7c')](['phone',_0xf33a('0x63'),_0xf33a('0x64'),_0xf33a('0x65'),_0xf33a('0x7d'),_0xf33a('0x6d'),_0xf33a('0x6e')],squel[_0xf33a('0x67')]()[_0xf33a('0x68')](_0xf33a('0x69'),_0xf33a('0x62'))[_0xf33a('0x68')](_0xf33a('0x6a'),_0xf33a('0x63'))[_0xf33a('0x68')](_0xf33a('0x6b'),_0xf33a('0x64'))['field'](_0xf33a('0x7e'),'ListId')[_0xf33a('0x68')]('ANY_VALUE(CampaignId)','CampaignId')['field'](_0xf33a('0x6a'),_0xf33a('0x6d'))['field'](_0xf33a('0x6a'),_0xf33a('0x6e'))[_0xf33a('0x6f')](_0xf33a('0x70'))[_0xf33a('0x3b')](_0xf33a('0x7f'),_0x1dfb59['params']['id'][_0xf33a('0x72')]())[_0xf33a('0x3b')]('state\x20=\x20?',_0x1dfb59[_0xf33a('0x48')][_0xf33a('0x74')][_0xf33a('0x72')]())['where'](_0xf33a('0x75'))[_0xf33a('0x3b')](_0xf33a('0x76'),squel[_0xf33a('0x67')]()[_0xf33a('0x68')]('phone')[_0xf33a('0x6f')](_0xf33a('0x61'))[_0xf33a('0x3b')](_0xf33a('0x7f'),_0x1dfb59[_0xf33a('0x44')]['id']['toString']()))[_0xf33a('0x3b')](_0xf33a('0x76'),squel[_0xf33a('0x67')]()[_0xf33a('0x68')](_0xf33a('0x77'))['from'](_0xf33a('0x70'))['where']('CampaignId\x20=\x20?',_0x1dfb59[_0xf33a('0x44')]['id']['toString']())[_0xf33a('0x3b')](_0xf33a('0x78')))['group'](_0xf33a('0x64')))[_0xf33a('0x72')]();return db[_0xf33a('0x4d')][_0xf33a('0x32')](_0x3d8dbe);}return[];})[_0xf33a('0x26')](respondWithResult(_0x9c0b99,null))[_0xf33a('0x42')](handleError(_0x9c0b99,null));};exports[_0xf33a('0x80')]=function(_0x4abd84,_0x1205d1,_0x1d83a0){return db[_0xf33a('0x81')][_0xf33a('0x82')]({'where':{'VoiceQueueId':_0x4abd84['body'][_0xf33a('0x66')],'CampaignId':_0x4abd84['body'][_0xf33a('0x7d')],'ContactId':_0x4abd84[_0xf33a('0x48')][_0xf33a('0x64')]}})[_0xf33a('0x26')](handleEntityNotFound(_0x1205d1,null))[_0xf33a('0x26')](function(_0x49c40a){if(_0x49c40a){return _0x49c40a;}return null;})[_0xf33a('0x26')](respondWithResult(_0x1205d1,null))[_0xf33a('0x42')](handleError(_0x1205d1,null));};
\ No newline at end of file
+var _0x4c60=['include','findAll','rows','catch','show','includeAll','find','describe','update','uniqueid','body','params','countContactsQueueCampaignHopperFinal','sequelize','COUNT','literal','`state`\x20=\x200,\x201,\x20null','noSuchContacts','`state`\x20=\x203,\x201,\x20null','noAnswerContacts','`state`\x20=\x205,\x201,\x20null','busyContacts','dropContacts','`state`\x20=\x2011\x20,\x201,\x20null','abandonedContacts','`state`\x20=\x2022,\x201,\x20null','reCallContacts','`state`\x20=\x2019,\x201,\x20null','countContactsIvrCampaignHopperFinal','congestionContacts','`state`\x20=\x2010\x20,\x201,\x20null','answeringMachine','VoiceQueue','into','cm_hopper','phone','scheduledAt','ContactId','ListId','VoiceQueueId','createdAt','updatedAt','select','field','ANY_VALUE(calleridnum)','NOW()','ANY_VALUE(ContactId)','ANY_VALUE(ListId)','ANY_VALUE(VoiceQueueId)','from','cm_hopper_final','VoiceQueueId\x20=\x20?','toString','state','calleridnum\x20NOT\x20IN\x20(?)','state\x20=\x204','group','moveContactsIvrCampaignHopperFinal','insert','fromQuery','CampaignId','ANY_VALUE(CampaignId)','CampaignId\x20=\x20?','calleridnum\x20IS\x20NOT\x20NULL','calleridnum','CmHopper','findOne','eml-format','rimraf','zip-dir','fast-json-patch','moment','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','Content-Range','apply','reject','then','destroy','end','error','stack','name','index','map','CmHopperFinal','rawAttributes','key','keys','query','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','VIRTUAL','merge','options'];(function(_0x41cd34,_0x32cd0c){var _0x1273e8=function(_0x34f4f6){while(--_0x34f4f6){_0x41cd34['push'](_0x41cd34['shift']());}};_0x1273e8(++_0x32cd0c);}(_0x4c60,0xc1));var _0x04c6=function(_0x36336d,_0x57742b){_0x36336d=_0x36336d-0x0;var _0xdc6130=_0x4c60[_0x36336d];return _0xdc6130;};'use strict';var emlformat=require(_0x04c6('0x0'));var rimraf=require(_0x04c6('0x1'));var zipdir=require(_0x04c6('0x2'));var jsonpatch=require(_0x04c6('0x3'));var rp=require('request-promise');var moment=require(_0x04c6('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0x04c6('0x5'));var csv=require(_0x04c6('0x6'));var ejs=require(_0x04c6('0x7'));var fs=require('fs');var fs_extra=require(_0x04c6('0x8'));var _=require(_0x04c6('0x9'));var squel=require(_0x04c6('0xa'));var crypto=require(_0x04c6('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x04c6('0xc'));var toCsv=require(_0x04c6('0x6'));var querystring=require(_0x04c6('0xd'));var Papa=require(_0x04c6('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x04c6('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x04c6('0x10'))(_0x04c6('0x11'));var utils=require('../../config/utils');var config=require(_0x04c6('0x12'));var licenseUtil=require(_0x04c6('0x13'));var db=require(_0x04c6('0x14'))['db'];function respondWithStatusCode(_0x4e5e6,_0x52cdcf){_0x52cdcf=_0x52cdcf||0xcc;return function(_0x257a0a){if(_0x257a0a){return _0x4e5e6[_0x04c6('0x15')](_0x52cdcf);}return _0x4e5e6[_0x04c6('0x16')](_0x52cdcf)['end']();};}function respondWithResult(_0x12d1c5,_0x15cbe0){_0x15cbe0=_0x15cbe0||0xc8;return function(_0x28632e){if(_0x28632e){return _0x12d1c5[_0x04c6('0x16')](_0x15cbe0)[_0x04c6('0x17')](_0x28632e);}};}function respondWithFilteredResult(_0x19a26f,_0x1cd963){return function(_0x3d46a9){if(_0x3d46a9){var _0x5a5a66=typeof _0x1cd963[_0x04c6('0x18')]===_0x04c6('0x19')&&typeof _0x1cd963[_0x04c6('0x1a')]===_0x04c6('0x19');var _0x43596a=_0x3d46a9[_0x04c6('0x1b')];var _0x21674a=_0x5a5a66?0x0:_0x1cd963[_0x04c6('0x18')];var _0x47f400=_0x5a5a66?_0x3d46a9[_0x04c6('0x1b')]:_0x1cd963[_0x04c6('0x18')]+_0x1cd963[_0x04c6('0x1a')];var _0x558b43;if(_0x47f400>=_0x43596a){_0x47f400=_0x43596a;_0x558b43=0xc8;}else{_0x558b43=0xce;}_0x19a26f['status'](_0x558b43);return _0x19a26f['set'](_0x04c6('0x1c'),_0x21674a+'-'+_0x47f400+'/'+_0x43596a)[_0x04c6('0x17')](_0x3d46a9);}return null;};}function patchUpdates(_0x50dd61){return function(_0x5a5e9e){try{jsonpatch[_0x04c6('0x1d')](_0x5a5e9e,_0x50dd61,!![]);}catch(_0x2eed94){return BPromise[_0x04c6('0x1e')](_0x2eed94);}return _0x5a5e9e['save']();};}function saveUpdates(_0x33a0f7,_0x13f2dc){return function(_0x9d41f8){if(_0x9d41f8){return _0x9d41f8['update'](_0x33a0f7)[_0x04c6('0x1f')](function(_0x41e29f){return _0x41e29f;});}return null;};}function removeEntity(_0x562491,_0x54a8b0){return function(_0x4c8d72){if(_0x4c8d72){return _0x4c8d72[_0x04c6('0x20')]()[_0x04c6('0x1f')](function(){_0x562491[_0x04c6('0x16')](0xcc)[_0x04c6('0x21')]();});}};}function handleEntityNotFound(_0x3e1328,_0x52e5f5){return function(_0x562952){if(!_0x562952){_0x3e1328[_0x04c6('0x15')](0x194);}return _0x562952;};}function handleError(_0x2ab1d2,_0x9acfa){_0x9acfa=_0x9acfa||0x1f4;return function(_0x3233d7){logger[_0x04c6('0x22')](_0x3233d7[_0x04c6('0x23')]);if(_0x3233d7['name']){delete _0x3233d7[_0x04c6('0x24')];}_0x2ab1d2[_0x04c6('0x16')](_0x9acfa)['send'](_0x3233d7);};}exports[_0x04c6('0x25')]=function(_0x1cd16a,_0x5f1331){var _0x5c9003={},_0x115d84={},_0x3a6d92={'count':0x0,'rows':[]};var _0x2a191f=_[_0x04c6('0x26')](db[_0x04c6('0x27')][_0x04c6('0x28')],function(_0x49c4ed){return{'name':_0x49c4ed['fieldName'],'type':_0x49c4ed['type'][_0x04c6('0x29')]};});_0x115d84['model']=_[_0x04c6('0x26')](_0x2a191f,_0x04c6('0x24'));_0x115d84['query']=_[_0x04c6('0x2a')](_0x1cd16a[_0x04c6('0x2b')]);_0x115d84[_0x04c6('0x2c')]=_[_0x04c6('0x2d')](_0x115d84['model'],_0x115d84[_0x04c6('0x2b')]);_0x5c9003[_0x04c6('0x2e')]=_[_0x04c6('0x2d')](_0x115d84[_0x04c6('0x2f')],qs[_0x04c6('0x30')](_0x1cd16a[_0x04c6('0x2b')][_0x04c6('0x30')]));_0x5c9003[_0x04c6('0x2e')]=_0x5c9003[_0x04c6('0x2e')][_0x04c6('0x31')]?_0x5c9003[_0x04c6('0x2e')]:_0x115d84[_0x04c6('0x2f')];if(!_0x1cd16a[_0x04c6('0x2b')][_0x04c6('0x32')](_0x04c6('0x33'))){_0x5c9003['limit']=qs[_0x04c6('0x1a')](_0x1cd16a[_0x04c6('0x2b')][_0x04c6('0x1a')]);_0x5c9003[_0x04c6('0x18')]=qs['offset'](_0x1cd16a[_0x04c6('0x2b')][_0x04c6('0x18')]);}_0x5c9003['order']=qs['sort'](_0x1cd16a['query'][_0x04c6('0x34')]);_0x5c9003[_0x04c6('0x35')]=qs['filters'](_[_0x04c6('0x36')](_0x1cd16a['query'],_0x115d84[_0x04c6('0x2c')]),_0x2a191f);if(_0x1cd16a[_0x04c6('0x2b')][_0x04c6('0x37')]){_0x5c9003[_0x04c6('0x35')]=_['merge'](_0x5c9003['where'],{'$or':_[_0x04c6('0x26')](_0x2a191f,function(_0x3a9a3b){if(_0x3a9a3b['type']!==_0x04c6('0x38')){var _0x5ce4b0={};_0x5ce4b0[_0x3a9a3b['name']]={'$like':'%'+_0x1cd16a[_0x04c6('0x2b')]['filter']+'%'};return _0x5ce4b0;}})});}_0x5c9003=_[_0x04c6('0x39')]({},_0x5c9003,_0x1cd16a[_0x04c6('0x3a')]);var _0x59ca18={'where':_0x5c9003[_0x04c6('0x35')]};return db['CmHopperFinal'][_0x04c6('0x1b')](_0x59ca18)[_0x04c6('0x1f')](function(_0x2d83eb){_0x3a6d92[_0x04c6('0x1b')]=_0x2d83eb;if(_0x1cd16a[_0x04c6('0x2b')]['includeAll']){_0x5c9003[_0x04c6('0x3b')]=[{'all':!![]}];}return db['CmHopperFinal'][_0x04c6('0x3c')](_0x5c9003);})['then'](function(_0x1f7ead){_0x3a6d92[_0x04c6('0x3d')]=_0x1f7ead;return _0x3a6d92;})[_0x04c6('0x1f')](respondWithFilteredResult(_0x5f1331,_0x5c9003))[_0x04c6('0x3e')](handleError(_0x5f1331,null));};exports[_0x04c6('0x3f')]=function(_0x2cdf34,_0x40477f){var _0x4a3c45={'raw':!![],'where':{'id':_0x2cdf34['params']['id']}},_0xdfdc34={};_0xdfdc34[_0x04c6('0x2f')]=_['keys'](db['CmHopperFinal'][_0x04c6('0x28')]);_0xdfdc34['query']=_[_0x04c6('0x2a')](_0x2cdf34[_0x04c6('0x2b')]);_0xdfdc34[_0x04c6('0x2c')]=_['intersection'](_0xdfdc34[_0x04c6('0x2f')],_0xdfdc34[_0x04c6('0x2b')]);_0x4a3c45[_0x04c6('0x2e')]=_[_0x04c6('0x2d')](_0xdfdc34[_0x04c6('0x2f')],qs[_0x04c6('0x30')](_0x2cdf34[_0x04c6('0x2b')]['fields']));_0x4a3c45['attributes']=_0x4a3c45[_0x04c6('0x2e')][_0x04c6('0x31')]?_0x4a3c45[_0x04c6('0x2e')]:_0xdfdc34['model'];if(_0x2cdf34[_0x04c6('0x2b')][_0x04c6('0x40')]){_0x4a3c45[_0x04c6('0x3b')]=[{'all':!![]}];}_0x4a3c45=_['merge']({},_0x4a3c45,_0x2cdf34['options']);return db['CmHopperFinal'][_0x04c6('0x41')](_0x4a3c45)[_0x04c6('0x1f')](handleEntityNotFound(_0x40477f,null))['then'](respondWithResult(_0x40477f,null))[_0x04c6('0x3e')](handleError(_0x40477f,null));};exports[_0x04c6('0x42')]=function(_0x2bd045,_0x4ef366){return db[_0x04c6('0x27')][_0x04c6('0x42')]()['then'](respondWithResult(_0x4ef366,null))[_0x04c6('0x3e')](handleError(_0x4ef366,null));};exports[_0x04c6('0x43')]=function(_0x2472ed,_0xee2822){if(_0x2472ed['body'][_0x04c6('0x44')]){delete _0x2472ed[_0x04c6('0x45')][_0x04c6('0x44')];}return db[_0x04c6('0x27')]['find']({'where':{'uniqueid':_0x2472ed[_0x04c6('0x46')]['id']}})[_0x04c6('0x1f')](handleEntityNotFound(_0xee2822,null))[_0x04c6('0x1f')](saveUpdates(_0x2472ed[_0x04c6('0x45')],null))['then'](respondWithResult(_0xee2822,null))[_0x04c6('0x3e')](handleError(_0xee2822,null));};exports[_0x04c6('0x47')]=function(_0x15ec61,_0x489361,_0x3119f0){return db[_0x04c6('0x27')][_0x04c6('0x3c')]({'raw':![],'where':{'VoiceQueueId':_0x15ec61[_0x04c6('0x46')]['id']},'attributes':[[db[_0x04c6('0x48')]['fn'](_0x04c6('0x49'),db[_0x04c6('0x48')]['fn']('IF',db[_0x04c6('0x48')][_0x04c6('0x4a')](_0x04c6('0x4b')))),_0x04c6('0x4c')],[db[_0x04c6('0x48')]['fn'](_0x04c6('0x49'),db['sequelize']['fn']('IF',db[_0x04c6('0x48')][_0x04c6('0x4a')](_0x04c6('0x4d')))),_0x04c6('0x4e')],[db[_0x04c6('0x48')]['fn']('COUNT',db[_0x04c6('0x48')]['fn']('IF',db[_0x04c6('0x48')][_0x04c6('0x4a')](_0x04c6('0x4f')))),_0x04c6('0x50')],[db[_0x04c6('0x48')]['fn'](_0x04c6('0x49'),db[_0x04c6('0x48')]['fn']('IF',db[_0x04c6('0x48')][_0x04c6('0x4a')]('`state`\x20=\x208,\x201,\x20null'))),'congestionContacts'],[db['sequelize']['fn']('COUNT',db[_0x04c6('0x48')]['fn']('IF',db['sequelize'][_0x04c6('0x4a')]('`state`\x20=\x2010\x20,\x201,\x20null'))),_0x04c6('0x51')],[db[_0x04c6('0x48')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x04c6('0x48')][_0x04c6('0x4a')](_0x04c6('0x52')))),_0x04c6('0x53')],[db['sequelize']['fn'](_0x04c6('0x49'),db[_0x04c6('0x48')]['fn']('IF',db[_0x04c6('0x48')][_0x04c6('0x4a')](_0x04c6('0x54')))),_0x04c6('0x55')],[db[_0x04c6('0x48')]['fn']('COUNT',db[_0x04c6('0x48')]['fn']('IF',db['sequelize'][_0x04c6('0x4a')](_0x04c6('0x56')))),'answeringMachine']]})[_0x04c6('0x1f')](handleEntityNotFound(_0x489361,null))[_0x04c6('0x1f')](respondWithResult(_0x489361,null))[_0x04c6('0x3e')](handleError(_0x489361,null));};exports[_0x04c6('0x57')]=function(_0x28299e,_0x5b536f,_0xf073a8){return db[_0x04c6('0x27')]['findAll']({'raw':![],'where':{'CampaignId':_0x28299e[_0x04c6('0x46')]['id']},'attributes':[[db['sequelize']['fn'](_0x04c6('0x49'),db[_0x04c6('0x48')]['fn']('IF',db['sequelize']['literal'](_0x04c6('0x4b')))),'noSuchContacts'],[db[_0x04c6('0x48')]['fn'](_0x04c6('0x49'),db['sequelize']['fn']('IF',db[_0x04c6('0x48')][_0x04c6('0x4a')](_0x04c6('0x4d')))),_0x04c6('0x4e')],[db[_0x04c6('0x48')]['fn'](_0x04c6('0x49'),db[_0x04c6('0x48')]['fn']('IF',db[_0x04c6('0x48')][_0x04c6('0x4a')](_0x04c6('0x4f')))),_0x04c6('0x50')],[db['sequelize']['fn'](_0x04c6('0x49'),db[_0x04c6('0x48')]['fn']('IF',db[_0x04c6('0x48')][_0x04c6('0x4a')]('`state`\x20=\x208,\x201,\x20null'))),_0x04c6('0x58')],[db[_0x04c6('0x48')]['fn'](_0x04c6('0x49'),db['sequelize']['fn']('IF',db['sequelize'][_0x04c6('0x4a')](_0x04c6('0x59')))),_0x04c6('0x51')],[db[_0x04c6('0x48')]['fn'](_0x04c6('0x49'),db[_0x04c6('0x48')]['fn']('IF',db['sequelize'][_0x04c6('0x4a')](_0x04c6('0x52')))),_0x04c6('0x53')],[db['sequelize']['fn']('COUNT',db[_0x04c6('0x48')]['fn']('IF',db[_0x04c6('0x48')][_0x04c6('0x4a')](_0x04c6('0x54')))),'reCallContacts'],[db[_0x04c6('0x48')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x04c6('0x48')][_0x04c6('0x4a')](_0x04c6('0x56')))),_0x04c6('0x5a')]]})[_0x04c6('0x1f')](handleEntityNotFound(_0x5b536f,null))[_0x04c6('0x1f')](respondWithResult(_0x5b536f,null))[_0x04c6('0x3e')](handleError(_0x5b536f,null));};exports['moveContactsQueueCampaignHopperFinal']=function(_0x31cc93,_0x1b6242,_0x1f5b9a){return db[_0x04c6('0x5b')][_0x04c6('0x41')]({'where':{'id':_0x31cc93['params']['id']}})['then'](handleEntityNotFound(_0x1b6242,null))[_0x04c6('0x1f')](function(_0x598941){var _0x2df63b;if(_0x598941){_0x2df63b=squel['insert']()[_0x04c6('0x5c')](_0x04c6('0x5d'))['fromQuery']([_0x04c6('0x5e'),_0x04c6('0x5f'),_0x04c6('0x60'),_0x04c6('0x61'),_0x04c6('0x62'),_0x04c6('0x63'),_0x04c6('0x64')],squel[_0x04c6('0x65')]()[_0x04c6('0x66')](_0x04c6('0x67'),_0x04c6('0x5e'))[_0x04c6('0x66')](_0x04c6('0x68'),'scheduledAt')[_0x04c6('0x66')](_0x04c6('0x69'),'ContactId')[_0x04c6('0x66')](_0x04c6('0x6a'),_0x04c6('0x61'))[_0x04c6('0x66')](_0x04c6('0x6b'),'VoiceQueueId')[_0x04c6('0x66')]('NOW()',_0x04c6('0x63'))['field'](_0x04c6('0x68'),_0x04c6('0x64'))[_0x04c6('0x6c')](_0x04c6('0x6d'))[_0x04c6('0x35')](_0x04c6('0x6e'),_0x31cc93[_0x04c6('0x46')]['id'][_0x04c6('0x6f')]())[_0x04c6('0x35')]('state\x20=\x20?',_0x31cc93[_0x04c6('0x45')][_0x04c6('0x70')]['toString']())[_0x04c6('0x35')]('calleridnum\x20IS\x20NOT\x20NULL')[_0x04c6('0x35')](_0x04c6('0x71'),squel['select']()[_0x04c6('0x66')](_0x04c6('0x5e'))['from'](_0x04c6('0x5d'))[_0x04c6('0x35')]('VoiceQueueId\x20=\x20?',_0x31cc93[_0x04c6('0x46')]['id'][_0x04c6('0x6f')]()))['where'](_0x04c6('0x71'),squel[_0x04c6('0x65')]()['field']('calleridnum')['from'](_0x04c6('0x6d'))[_0x04c6('0x35')](_0x04c6('0x6e'),_0x31cc93[_0x04c6('0x46')]['id'][_0x04c6('0x6f')]())['where'](_0x04c6('0x72')))[_0x04c6('0x73')](_0x04c6('0x60')))[_0x04c6('0x6f')]();return db[_0x04c6('0x48')][_0x04c6('0x2b')](_0x2df63b);}return[];})[_0x04c6('0x1f')](respondWithResult(_0x1b6242,null))['catch'](handleError(_0x1b6242,null));};exports[_0x04c6('0x74')]=function(_0x4f258c,_0x202761,_0x480c74){return db['Campaign'][_0x04c6('0x41')]({'where':{'id':_0x4f258c['params']['id']}})[_0x04c6('0x1f')](handleEntityNotFound(_0x202761,null))[_0x04c6('0x1f')](function(_0x174de6){var _0x425d01;if(_0x174de6){_0x425d01=squel[_0x04c6('0x75')]()['into']('cm_hopper')[_0x04c6('0x76')]([_0x04c6('0x5e'),_0x04c6('0x5f'),_0x04c6('0x60'),_0x04c6('0x61'),_0x04c6('0x77'),'createdAt',_0x04c6('0x64')],squel['select']()['field'](_0x04c6('0x67'),_0x04c6('0x5e'))[_0x04c6('0x66')](_0x04c6('0x68'),_0x04c6('0x5f'))[_0x04c6('0x66')](_0x04c6('0x69'),_0x04c6('0x60'))[_0x04c6('0x66')](_0x04c6('0x6a'),_0x04c6('0x61'))['field'](_0x04c6('0x78'),'CampaignId')['field'](_0x04c6('0x68'),_0x04c6('0x63'))[_0x04c6('0x66')](_0x04c6('0x68'),_0x04c6('0x64'))[_0x04c6('0x6c')](_0x04c6('0x6d'))[_0x04c6('0x35')](_0x04c6('0x79'),_0x4f258c[_0x04c6('0x46')]['id'][_0x04c6('0x6f')]())['where']('state\x20=\x20?',_0x4f258c[_0x04c6('0x45')][_0x04c6('0x70')]['toString']())[_0x04c6('0x35')](_0x04c6('0x7a'))['where'](_0x04c6('0x71'),squel[_0x04c6('0x65')]()[_0x04c6('0x66')](_0x04c6('0x5e'))[_0x04c6('0x6c')](_0x04c6('0x5d'))[_0x04c6('0x35')](_0x04c6('0x79'),_0x4f258c['params']['id'][_0x04c6('0x6f')]()))['where'](_0x04c6('0x71'),squel[_0x04c6('0x65')]()[_0x04c6('0x66')](_0x04c6('0x7b'))[_0x04c6('0x6c')](_0x04c6('0x6d'))['where'](_0x04c6('0x79'),_0x4f258c[_0x04c6('0x46')]['id'][_0x04c6('0x6f')]())['where']('state\x20=\x204'))['group'](_0x04c6('0x60')))[_0x04c6('0x6f')]();return db['sequelize'][_0x04c6('0x2b')](_0x425d01);}return[];})[_0x04c6('0x1f')](respondWithResult(_0x202761,null))[_0x04c6('0x3e')](handleError(_0x202761,null));};exports['checkContactHopper']=function(_0x343c1f,_0x485457,_0x1c0c74){return db[_0x04c6('0x7c')][_0x04c6('0x7d')]({'where':{'VoiceQueueId':_0x343c1f['body']['VoiceQueueId'],'CampaignId':_0x343c1f[_0x04c6('0x45')][_0x04c6('0x77')],'ContactId':_0x343c1f[_0x04c6('0x45')][_0x04c6('0x60')]}})['then'](handleEntityNotFound(_0x485457,null))['then'](function(_0x3e12a4){if(_0x3e12a4){return _0x3e12a4;}return null;})[_0x04c6('0x1f')](respondWithResult(_0x485457,null))[_0x04c6('0x3e')](handleError(_0x485457,null));};
\ No newline at end of file
index 7ecfb69..eba0f32 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcf5f=['define','CmHopperFinal','cm_hopper_final','uniqueid','lodash','util','../../config/logger','api','bluebird','path','rimraf','../../config/environment','./cmHopperFinal.attributes'];(function(_0x1aa816,_0x149b14){var _0x4b696a=function(_0x3864ac){while(--_0x3864ac){_0x1aa816['push'](_0x1aa816['shift']());}};_0x4b696a(++_0x149b14);}(_0xcf5f,0xad));var _0xfcf5=function(_0x21087c,_0x48d89f){_0x21087c=_0x21087c-0x0;var _0x3cadfe=_0xcf5f[_0x21087c];return _0x3cadfe;};'use strict';var _=require(_0xfcf5('0x0'));var util=require(_0xfcf5('0x1'));var logger=require(_0xfcf5('0x2'))(_0xfcf5('0x3'));var moment=require('moment');var BPromise=require(_0xfcf5('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xfcf5('0x5'));var rimraf=require(_0xfcf5('0x6'));var config=require(_0xfcf5('0x7'));var attributes=require(_0xfcf5('0x8'));module['exports']=function(_0x42b028,_0x36f535){return _0x42b028[_0xfcf5('0x9')](_0xfcf5('0xa'),attributes,{'tableName':_0xfcf5('0xb'),'paranoid':![],'indexes':[{'name':'calleridnum','fields':['calleridnum']},{'name':_0xfcf5('0xc'),'fields':[_0xfcf5('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xd02e=['moment','bluebird','path','rimraf','../../config/environment','./cmHopperFinal.attributes','exports','define','cm_hopper_final','calleridnum','uniqueid','lodash','util','../../config/logger'];(function(_0x2d7e17,_0x4d5677){var _0x4299d8=function(_0x56e3bd){while(--_0x56e3bd){_0x2d7e17['push'](_0x2d7e17['shift']());}};_0x4299d8(++_0x4d5677);}(_0xd02e,0x1cb));var _0xed02=function(_0x4658bb,_0x31f608){_0x4658bb=_0x4658bb-0x0;var _0x33110b=_0xd02e[_0x4658bb];return _0x33110b;};'use strict';var _=require(_0xed02('0x0'));var util=require(_0xed02('0x1'));var logger=require(_0xed02('0x2'))('api');var moment=require(_0xed02('0x3'));var BPromise=require(_0xed02('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xed02('0x5'));var rimraf=require(_0xed02('0x6'));var config=require(_0xed02('0x7'));var attributes=require(_0xed02('0x8'));module[_0xed02('0x9')]=function(_0x4f9bbf,_0x5a89c1){return _0x4f9bbf[_0xed02('0xa')]('CmHopperFinal',attributes,{'tableName':_0xed02('0xb'),'paranoid':![],'indexes':[{'name':_0xed02('0xc'),'fields':['calleridnum']},{'name':_0xed02('0xd'),'fields':[_0xed02('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
index 5bb6043..af5be47 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['../../config/environment','jayson/promise','http','info','CmHopperFinal,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','CmHopperFinal','create','body','options','raw','CreateCmHopperFinal','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc'];(function(_0x3c9051,_0x144cfc){var _0x1181d6=function(_0x53369b){while(--_0x53369b){_0x3c9051['push'](_0x3c9051['shift']());}};_0x1181d6(++_0x144cfc);}(_0x7a54,0x106));var _0x47a5=function(_0x21af63,_0x16119a){_0x21af63=_0x21af63-0x0;var _0x4054b2=_0x7a54[_0x21af63];return _0x4054b2;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var BPromise=require('bluebird');var rs=require(_0x47a5('0x3'));var fs=require('fs');var Redis=require(_0x47a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x47a5('0x5'));var logger=require(_0x47a5('0x6'))(_0x47a5('0x7'));var config=require(_0x47a5('0x8'));var jayson=require(_0x47a5('0x9'));var client=jayson['client'][_0x47a5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x59199c,_0x343372,_0x30e405){return new BPromise(function(_0x506eda,_0x194fb0){return client['request'](_0x59199c,_0x30e405)['then'](function(_0x582352){logger[_0x47a5('0xb')](_0x47a5('0xc'),_0x343372,'request\x20sent');logger[_0x47a5('0xd')]('CmHopperFinal,\x20%s,\x20%s,\x20%s',_0x343372,'request\x20sent',JSON[_0x47a5('0xe')](_0x582352));if(_0x582352[_0x47a5('0xf')]){if(_0x582352[_0x47a5('0xf')][_0x47a5('0x10')]===0x1f4){logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')]['message']);return _0x194fb0(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);return _0x506eda(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}else{logger['info'](_0x47a5('0xc'),_0x343372,_0x47a5('0x12'));_0x506eda(_0x582352[_0x47a5('0x13')][_0x47a5('0x11')]);}})[_0x47a5('0x14')](function(_0x574af6){logger['error'](_0x47a5('0xc'),_0x343372,_0x574af6);_0x194fb0(_0x574af6);});});}exports['CreateCmHopperFinal']=function(_0x5247fd){var _0x423a81=this;return new Promise(function(_0xaf70a6,_0x2ce454){return db[_0x47a5('0x15')][_0x47a5('0x16')](_0x5247fd[_0x47a5('0x17')],{'raw':_0x5247fd[_0x47a5('0x18')]?_0x5247fd[_0x47a5('0x18')][_0x47a5('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x1570bc){logger[_0x47a5('0xb')]('CreateCmHopperFinal',_0x5247fd);logger[_0x47a5('0xd')](_0x47a5('0x1a'),_0x5247fd,JSON[_0x47a5('0xe')](_0x1570bc));_0xaf70a6(_0x1570bc);})['catch'](function(_0xb8ae6c){logger[_0x47a5('0xf')](_0x47a5('0x1a'),_0xb8ae6c[_0x47a5('0x11')],_0x5247fd);_0x2ce454(_0x423a81['error'](0x1f4,_0xb8ae6c[_0x47a5('0x11')]));});});};
\ No newline at end of file
+var _0x7a54=['../../config/environment','jayson/promise','http','info','CmHopperFinal,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','CmHopperFinal','create','body','options','raw','CreateCmHopperFinal','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc'];(function(_0x8204e0,_0x4f96fe){var _0x1b1921=function(_0x3566db){while(--_0x3566db){_0x8204e0['push'](_0x8204e0['shift']());}};_0x1b1921(++_0x4f96fe);}(_0x7a54,0x106));var _0x47a5=function(_0x500d0a,_0x46bcb6){_0x500d0a=_0x500d0a-0x0;var _0x6c262b=_0x7a54[_0x500d0a];return _0x6c262b;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var BPromise=require('bluebird');var rs=require(_0x47a5('0x3'));var fs=require('fs');var Redis=require(_0x47a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x47a5('0x5'));var logger=require(_0x47a5('0x6'))(_0x47a5('0x7'));var config=require(_0x47a5('0x8'));var jayson=require(_0x47a5('0x9'));var client=jayson['client'][_0x47a5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x59199c,_0x343372,_0x30e405){return new BPromise(function(_0x506eda,_0x194fb0){return client['request'](_0x59199c,_0x30e405)['then'](function(_0x582352){logger[_0x47a5('0xb')](_0x47a5('0xc'),_0x343372,'request\x20sent');logger[_0x47a5('0xd')]('CmHopperFinal,\x20%s,\x20%s,\x20%s',_0x343372,'request\x20sent',JSON[_0x47a5('0xe')](_0x582352));if(_0x582352[_0x47a5('0xf')]){if(_0x582352[_0x47a5('0xf')][_0x47a5('0x10')]===0x1f4){logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')]['message']);return _0x194fb0(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);return _0x506eda(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}else{logger['info'](_0x47a5('0xc'),_0x343372,_0x47a5('0x12'));_0x506eda(_0x582352[_0x47a5('0x13')][_0x47a5('0x11')]);}})[_0x47a5('0x14')](function(_0x574af6){logger['error'](_0x47a5('0xc'),_0x343372,_0x574af6);_0x194fb0(_0x574af6);});});}exports['CreateCmHopperFinal']=function(_0x5247fd){var _0x423a81=this;return new Promise(function(_0xaf70a6,_0x2ce454){return db[_0x47a5('0x15')][_0x47a5('0x16')](_0x5247fd[_0x47a5('0x17')],{'raw':_0x5247fd[_0x47a5('0x18')]?_0x5247fd[_0x47a5('0x18')][_0x47a5('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x1570bc){logger[_0x47a5('0xb')]('CreateCmHopperFinal',_0x5247fd);logger[_0x47a5('0xd')](_0x47a5('0x1a'),_0x5247fd,JSON[_0x47a5('0xe')](_0x1570bc));_0xaf70a6(_0x1570bc);})['catch'](function(_0xb8ae6c){logger[_0x47a5('0xf')](_0x47a5('0x1a'),_0xb8ae6c[_0x47a5('0x11')],_0x5247fd);_0x2ce454(_0x423a81['error'](0x1f4,_0xb8ae6c[_0x47a5('0x11')]));});});};
\ No newline at end of file
index 2c552a6..d112106 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xef4d=['../../components/interaction/service','../../config/environment','./cmHopperFinal.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/voice/queue/countAttributes/:id','post','/voice/queue/moveContacts/:id','moveContactsQueueCampaignHopperFinal','/voice/campaign/moveContacts/:id','/checkContactHopper','checkContactHopper','put','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x2e4eef,_0x1cb476){var _0x2a8428=function(_0x56ade6){while(--_0x56ade6){_0x2e4eef['push'](_0x2e4eef['shift']());}};_0x2a8428(++_0x1cb476);}(_0xef4d,0xaf));var _0xdef4=function(_0x580576,_0x2f107d){_0x580576=_0x580576-0x0;var _0x3f55a0=_0xef4d[_0x580576];return _0x3f55a0;};'use strict';var multer=require(_0xdef4('0x0'));var util=require(_0xdef4('0x1'));var path=require('path');var timeout=require(_0xdef4('0x2'));var express=require(_0xdef4('0x3'));var router=express[_0xdef4('0x4')]();var fs_extra=require(_0xdef4('0x5'));var auth=require(_0xdef4('0x6'));var interaction=require(_0xdef4('0x7'));var config=require(_0xdef4('0x8'));var controller=require(_0xdef4('0x9'));router[_0xdef4('0xa')]('/',auth[_0xdef4('0xb')](),controller[_0xdef4('0xc')]);router[_0xdef4('0xa')](_0xdef4('0xd'),auth[_0xdef4('0xb')](),controller[_0xdef4('0xe')]);router['get'](_0xdef4('0xf'),auth[_0xdef4('0xb')](),controller[_0xdef4('0x10')]);router['get'](_0xdef4('0x11'),auth['isAuthenticated'](),controller['countContactsQueueCampaignHopperFinal']);router[_0xdef4('0xa')]('/campaign/countAttributes/:id',auth[_0xdef4('0xb')](),controller['countContactsIvrCampaignHopperFinal']);router[_0xdef4('0x12')](_0xdef4('0x13'),auth[_0xdef4('0xb')](),controller[_0xdef4('0x14')]);router[_0xdef4('0x12')](_0xdef4('0x15'),auth[_0xdef4('0xb')](),controller['moveContactsIvrCampaignHopperFinal']);router[_0xdef4('0x12')](_0xdef4('0x16'),auth['isAuthenticated'](),controller[_0xdef4('0x17')]);router[_0xdef4('0x18')](_0xdef4('0xf'),auth['isAuthenticated'](),controller['update']);module[_0xdef4('0x19')]=router;
\ No newline at end of file
+var _0x28a0=['Router','fs-extra','../../components/auth/service','../../config/environment','./cmHopperFinal.controller','index','get','isAuthenticated','/:id','show','/voice/queue/countAttributes/:id','countContactsQueueCampaignHopperFinal','/campaign/countAttributes/:id','post','/voice/queue/moveContacts/:id','moveContactsQueueCampaignHopperFinal','checkContactHopper','put','exports','multer','path','connect-timeout','express'];(function(_0x2c9985,_0x2975c1){var _0x5e1bea=function(_0x7761a8){while(--_0x7761a8){_0x2c9985['push'](_0x2c9985['shift']());}};_0x5e1bea(++_0x2975c1);}(_0x28a0,0x155));var _0x028a=function(_0x126558,_0x143c9a){_0x126558=_0x126558-0x0;var _0x1f6d14=_0x28a0[_0x126558];return _0x1f6d14;};'use strict';var multer=require(_0x028a('0x0'));var util=require('util');var path=require(_0x028a('0x1'));var timeout=require(_0x028a('0x2'));var express=require(_0x028a('0x3'));var router=express[_0x028a('0x4')]();var fs_extra=require(_0x028a('0x5'));var auth=require(_0x028a('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x028a('0x7'));var controller=require(_0x028a('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0x028a('0x9')]);router[_0x028a('0xa')]('/describe',auth[_0x028a('0xb')](),controller['describe']);router[_0x028a('0xa')](_0x028a('0xc'),auth[_0x028a('0xb')](),controller[_0x028a('0xd')]);router[_0x028a('0xa')](_0x028a('0xe'),auth['isAuthenticated'](),controller[_0x028a('0xf')]);router[_0x028a('0xa')](_0x028a('0x10'),auth[_0x028a('0xb')](),controller['countContactsIvrCampaignHopperFinal']);router[_0x028a('0x11')](_0x028a('0x12'),auth[_0x028a('0xb')](),controller[_0x028a('0x13')]);router[_0x028a('0x11')]('/voice/campaign/moveContacts/:id',auth[_0x028a('0xb')](),controller['moveContactsIvrCampaignHopperFinal']);router[_0x028a('0x11')]('/checkContactHopper',auth['isAuthenticated'](),controller[_0x028a('0x14')]);router[_0x028a('0x15')]('/:id',auth[_0x028a('0xb')](),controller['update']);module[_0x028a('0x16')]=router;
\ No newline at end of file
index a7a5398..5c800bd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2499=['exports','INTEGER','STRING','DATE','BOOLEAN','sequelize'];(function(_0x457e7b,_0x2ef525){var _0x14b5b5=function(_0x33e64d){while(--_0x33e64d){_0x457e7b['push'](_0x457e7b['shift']());}};_0x14b5b5(++_0x2ef525);}(_0x2499,0x7d));var _0x9249=function(_0x5a7f62,_0x49b582){_0x5a7f62=_0x5a7f62-0x0;var _0x1b1b01=_0x2499[_0x5a7f62];return _0x1b1b01;};'use strict';var Sequelize=require(_0x9249('0x0'));module[_0x9249('0x1')]={'state':{'type':Sequelize[_0x9249('0x2')](0x2)},'statedesc':{'type':Sequelize[_0x9249('0x3')]},'scheduledat':{'type':Sequelize[_0x9249('0x4')]},'countbusyretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0x9249('0x2')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0x9249('0x2')],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0x9249('0x2')],'defaultValue':0x0},'uniqueid':{'type':Sequelize['STRING']},'originatecalleridnum':{'type':Sequelize[_0x9249('0x3')]},'originatecalleridname':{'type':Sequelize[_0x9249('0x3')]},'calleridnum':{'type':Sequelize[_0x9249('0x3')]},'calleridname':{'type':Sequelize['STRING']},'starttime':{'type':Sequelize[_0x9249('0x4')]},'responsetime':{'type':Sequelize[_0x9249('0x4')]},'answertime':{'type':Sequelize[_0x9249('0x4')]},'droptime':{'type':Sequelize[_0x9249('0x4')]},'endtime':{'type':Sequelize[_0x9249('0x4')]},'ringtime':{'type':Sequelize[_0x9249('0x2')],'defaultValue':0x0},'holdtime':{'type':Sequelize[_0x9249('0x2')],'defaultValue':0x0},'talktime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0x9249('0x2')],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0x9249('0x3')]},'campaign':{'type':Sequelize['STRING']},'campaigntype':{'type':Sequelize['STRING']},'membername':{'type':Sequelize[_0x9249('0x3')]},'reason':{'type':Sequelize['STRING']},'amd':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'fax':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'callback':{'type':Sequelize[_0x9249('0x5')],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0x9249('0x3')],'defaultValue':null},'callbackat':{'type':Sequelize[_0x9249('0x4')]},'recallme':{'type':Sequelize[_0x9249('0x5')],'defaultValue':![]},'editedat':{'type':Sequelize['DATE']},'edited':{'type':Sequelize[_0x9249('0x5')],'defaultValue':![]},'countnosuchnumberretry':{'type':Sequelize[_0x9249('0x2')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0x9249('0x2')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0x9249('0x2')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0x9249('0x2')],'defaultValue':0x0},'dialTimezone':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xef0d=['sequelize','INTEGER','STRING','DATE','BOOLEAN'];(function(_0x300bfb,_0x3cae51){var _0x353a12=function(_0x183ab6){while(--_0x183ab6){_0x300bfb['push'](_0x300bfb['shift']());}};_0x353a12(++_0x3cae51);}(_0xef0d,0xdc));var _0xdef0=function(_0x581295,_0x2ede59){_0x581295=_0x581295-0x0;var _0x2a427f=_0xef0d[_0x581295];return _0x2a427f;};'use strict';var Sequelize=require(_0xdef0('0x0'));module['exports']={'state':{'type':Sequelize[_0xdef0('0x1')](0x2)},'statedesc':{'type':Sequelize[_0xdef0('0x2')]},'scheduledat':{'type':Sequelize[_0xdef0('0x3')]},'countbusyretry':{'type':Sequelize[_0xdef0('0x1')],'defaultValue':0x0},'countcongestionretry':{'type':Sequelize[_0xdef0('0x1')],'defaultValue':0x0},'countnoanswerretry':{'type':Sequelize[_0xdef0('0x1')],'defaultValue':0x0},'countglobal':{'type':Sequelize[_0xdef0('0x1')],'defaultValue':0x0},'uniqueid':{'type':Sequelize[_0xdef0('0x2')]},'originatecalleridnum':{'type':Sequelize[_0xdef0('0x2')]},'originatecalleridname':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0xdef0('0x2')]},'calleridname':{'type':Sequelize[_0xdef0('0x2')]},'starttime':{'type':Sequelize[_0xdef0('0x3')]},'responsetime':{'type':Sequelize[_0xdef0('0x3')]},'answertime':{'type':Sequelize[_0xdef0('0x3')]},'droptime':{'type':Sequelize[_0xdef0('0x3')]},'endtime':{'type':Sequelize[_0xdef0('0x3')]},'ringtime':{'type':Sequelize[_0xdef0('0x1')],'defaultValue':0x0},'holdtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'talktime':{'type':Sequelize[_0xdef0('0x1')],'defaultValue':0x0},'followuptime':{'type':Sequelize[_0xdef0('0x1')],'defaultValue':0x0},'dropreason':{'type':Sequelize[_0xdef0('0x2')]},'campaign':{'type':Sequelize[_0xdef0('0x2')]},'campaigntype':{'type':Sequelize[_0xdef0('0x2')]},'membername':{'type':Sequelize[_0xdef0('0x2')]},'reason':{'type':Sequelize['STRING']},'amd':{'type':Sequelize[_0xdef0('0x4')],'defaultValue':![]},'fax':{'type':Sequelize[_0xdef0('0x4')],'defaultValue':![]},'callback':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'callbackuniqueid':{'type':Sequelize[_0xdef0('0x2')],'defaultValue':null},'callbackat':{'type':Sequelize[_0xdef0('0x3')]},'recallme':{'type':Sequelize[_0xdef0('0x4')],'defaultValue':![]},'editedat':{'type':Sequelize['DATE']},'edited':{'type':Sequelize[_0xdef0('0x4')],'defaultValue':![]},'countnosuchnumberretry':{'type':Sequelize[_0xdef0('0x1')],'defaultValue':0x0},'countdropretry':{'type':Sequelize[_0xdef0('0x1')],'defaultValue':0x0},'countabandonedretry':{'type':Sequelize[_0xdef0('0x1')],'defaultValue':0x0},'countmachineretry':{'type':Sequelize[_0xdef0('0x1')],'defaultValue':0x0},'countagentrejectretry':{'type':Sequelize[_0xdef0('0x1')],'defaultValue':0x0},'dialTimezone':{'type':Sequelize[_0xdef0('0x2')]}};
\ No newline at end of file
index 87590f9..6c7d942 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5d9d=['moment','bluebird','mustache','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','update','then','destroy','error','stack','name','send','map','CmHopperHistory','rawAttributes','type','key','query','keys','filters','model','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','pick','merge','VIRTUAL','options','catch','params','include','find','create','body','describe','uniqueid','rimraf','zip-dir','fast-json-patch','request-promise'];(function(_0x192ac5,_0x308bad){var _0x2073f8=function(_0x3f0fc3){while(--_0x3f0fc3){_0x192ac5['push'](_0x192ac5['shift']());}};_0x2073f8(++_0x308bad);}(_0x5d9d,0x19a));var _0xd5d9=function(_0x2ce437,_0x30f034){_0x2ce437=_0x2ce437-0x0;var _0x5bfb88=_0x5d9d[_0x2ce437];return _0x5bfb88;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xd5d9('0x0'));var zipdir=require(_0xd5d9('0x1'));var jsonpatch=require(_0xd5d9('0x2'));var rp=require(_0xd5d9('0x3'));var moment=require(_0xd5d9('0x4'));var BPromise=require(_0xd5d9('0x5'));var Mustache=require(_0xd5d9('0x6'));var util=require('util');var path=require('path');var sox=require(_0xd5d9('0x7'));var csv=require(_0xd5d9('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xd5d9('0x9'));var _=require(_0xd5d9('0xa'));var squel=require(_0xd5d9('0xb'));var crypto=require(_0xd5d9('0xc'));var jsforce=require(_0xd5d9('0xd'));var deskjs=require(_0xd5d9('0xe'));var toCsv=require(_0xd5d9('0x8'));var querystring=require(_0xd5d9('0xf'));var Papa=require('papaparse');var Redis=require(_0xd5d9('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xd5d9('0x11'));var hardwareService=require(_0xd5d9('0x12'));var logger=require('../../config/logger')(_0xd5d9('0x13'));var utils=require('../../config/utils');var config=require(_0xd5d9('0x14'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x471e14,_0x3fc55e){_0x3fc55e=_0x3fc55e||0xcc;return function(_0x4338b9){if(_0x4338b9){return _0x471e14[_0xd5d9('0x15')](_0x3fc55e);}return _0x471e14[_0xd5d9('0x16')](_0x3fc55e)[_0xd5d9('0x17')]();};}function respondWithResult(_0x5e8531,_0x4e27e5){_0x4e27e5=_0x4e27e5||0xc8;return function(_0x10504a){if(_0x10504a){return _0x5e8531[_0xd5d9('0x16')](_0x4e27e5)[_0xd5d9('0x18')](_0x10504a);}};}function respondWithFilteredResult(_0x38a3fc,_0x113a0e){return function(_0x17d1a5){if(_0x17d1a5){var _0x27bf05=typeof _0x113a0e[_0xd5d9('0x19')]===_0xd5d9('0x1a')&&typeof _0x113a0e[_0xd5d9('0x1b')]==='undefined';var _0x4e026e=_0x17d1a5[_0xd5d9('0x1c')];var _0xa1f81=_0x27bf05?0x0:_0x113a0e[_0xd5d9('0x19')];var _0x9ffa18=_0x27bf05?_0x17d1a5[_0xd5d9('0x1c')]:_0x113a0e['offset']+_0x113a0e['limit'];var _0x175c77;if(_0x9ffa18>=_0x4e026e){_0x9ffa18=_0x4e026e;_0x175c77=0xc8;}else{_0x175c77=0xce;}_0x38a3fc['status'](_0x175c77);return _0x38a3fc[_0xd5d9('0x1d')](_0xd5d9('0x1e'),_0xa1f81+'-'+_0x9ffa18+'/'+_0x4e026e)['json'](_0x17d1a5);}return null;};}function patchUpdates(_0x19336e){return function(_0x19d1aa){try{jsonpatch[_0xd5d9('0x1f')](_0x19d1aa,_0x19336e,!![]);}catch(_0x35253b){return BPromise[_0xd5d9('0x20')](_0x35253b);}return _0x19d1aa['save']();};}function saveUpdates(_0x433f8f,_0x2aee1d){return function(_0x492ba2){if(_0x492ba2){return _0x492ba2[_0xd5d9('0x21')](_0x433f8f)[_0xd5d9('0x22')](function(_0x341d6b){return _0x341d6b;});}return null;};}function removeEntity(_0x40141b,_0x40a373){return function(_0x5cf7e5){if(_0x5cf7e5){return _0x5cf7e5[_0xd5d9('0x23')]()[_0xd5d9('0x22')](function(){_0x40141b['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x150b28,_0x515e6d){return function(_0xb42115){if(!_0xb42115){_0x150b28['sendStatus'](0x194);}return _0xb42115;};}function handleError(_0x33e788,_0x443c18){_0x443c18=_0x443c18||0x1f4;return function(_0x57dab6){logger[_0xd5d9('0x24')](_0x57dab6[_0xd5d9('0x25')]);if(_0x57dab6[_0xd5d9('0x26')]){delete _0x57dab6[_0xd5d9('0x26')];}_0x33e788[_0xd5d9('0x16')](_0x443c18)[_0xd5d9('0x27')](_0x57dab6);};}exports['index']=function(_0x2cabb3,_0x2e5942){var _0x2534e4={},_0x4baba4={},_0x39147f={'count':0x0,'rows':[]};var _0x213f35=_[_0xd5d9('0x28')](db[_0xd5d9('0x29')][_0xd5d9('0x2a')],function(_0x516083){return{'name':_0x516083['fieldName'],'type':_0x516083[_0xd5d9('0x2b')][_0xd5d9('0x2c')]};});_0x4baba4['model']=_[_0xd5d9('0x28')](_0x213f35,_0xd5d9('0x26'));_0x4baba4[_0xd5d9('0x2d')]=_[_0xd5d9('0x2e')](_0x2cabb3[_0xd5d9('0x2d')]);_0x4baba4[_0xd5d9('0x2f')]=_['intersection'](_0x4baba4[_0xd5d9('0x30')],_0x4baba4[_0xd5d9('0x2d')]);_0x2534e4['attributes']=_[_0xd5d9('0x31')](_0x4baba4[_0xd5d9('0x30')],qs[_0xd5d9('0x32')](_0x2cabb3['query']['fields']));_0x2534e4['attributes']=_0x2534e4[_0xd5d9('0x33')][_0xd5d9('0x34')]?_0x2534e4['attributes']:_0x4baba4[_0xd5d9('0x30')];if(!_0x2cabb3[_0xd5d9('0x2d')][_0xd5d9('0x35')](_0xd5d9('0x36'))){_0x2534e4[_0xd5d9('0x1b')]=qs[_0xd5d9('0x1b')](_0x2cabb3[_0xd5d9('0x2d')][_0xd5d9('0x1b')]);_0x2534e4[_0xd5d9('0x19')]=qs['offset'](_0x2cabb3['query'][_0xd5d9('0x19')]);}_0x2534e4['order']=qs[_0xd5d9('0x37')](_0x2cabb3['query'][_0xd5d9('0x37')]);_0x2534e4[_0xd5d9('0x38')]=qs[_0xd5d9('0x2f')](_[_0xd5d9('0x39')](_0x2cabb3[_0xd5d9('0x2d')],_0x4baba4[_0xd5d9('0x2f')]),_0x213f35);if(_0x2cabb3[_0xd5d9('0x2d')]['filter']){_0x2534e4[_0xd5d9('0x38')]=_[_0xd5d9('0x3a')](_0x2534e4[_0xd5d9('0x38')],{'$or':_[_0xd5d9('0x28')](_0x213f35,function(_0x2a4a83){if(_0x2a4a83['type']!==_0xd5d9('0x3b')){var _0x3b51bd={};_0x3b51bd[_0x2a4a83[_0xd5d9('0x26')]]={'$like':'%'+_0x2cabb3[_0xd5d9('0x2d')]['filter']+'%'};return _0x3b51bd;}})});}_0x2534e4=_[_0xd5d9('0x3a')]({},_0x2534e4,_0x2cabb3[_0xd5d9('0x3c')]);var _0xb3f8e4={'where':_0x2534e4[_0xd5d9('0x38')]};return db[_0xd5d9('0x29')][_0xd5d9('0x1c')](_0xb3f8e4)[_0xd5d9('0x22')](function(_0x289480){_0x39147f[_0xd5d9('0x1c')]=_0x289480;if(_0x2cabb3[_0xd5d9('0x2d')]['includeAll']){_0x2534e4['include']=[{'all':!![]}];}return db[_0xd5d9('0x29')]['findAll'](_0x2534e4);})['then'](function(_0x8f6481){_0x39147f['rows']=_0x8f6481;return _0x39147f;})[_0xd5d9('0x22')](respondWithFilteredResult(_0x2e5942,_0x2534e4))[_0xd5d9('0x3d')](handleError(_0x2e5942,null));};exports['show']=function(_0x380fcd,_0x3da72d){var _0x2b3b1f={'raw':!![],'where':{'id':_0x380fcd[_0xd5d9('0x3e')]['id']}},_0x18244e={};_0x18244e[_0xd5d9('0x30')]=_[_0xd5d9('0x2e')](db['CmHopperHistory'][_0xd5d9('0x2a')]);_0x18244e['query']=_[_0xd5d9('0x2e')](_0x380fcd['query']);_0x18244e[_0xd5d9('0x2f')]=_['intersection'](_0x18244e[_0xd5d9('0x30')],_0x18244e[_0xd5d9('0x2d')]);_0x2b3b1f['attributes']=_[_0xd5d9('0x31')](_0x18244e['model'],qs[_0xd5d9('0x32')](_0x380fcd['query'][_0xd5d9('0x32')]));_0x2b3b1f['attributes']=_0x2b3b1f[_0xd5d9('0x33')][_0xd5d9('0x34')]?_0x2b3b1f['attributes']:_0x18244e[_0xd5d9('0x30')];if(_0x380fcd[_0xd5d9('0x2d')]['includeAll']){_0x2b3b1f[_0xd5d9('0x3f')]=[{'all':!![]}];}_0x2b3b1f=_[_0xd5d9('0x3a')]({},_0x2b3b1f,_0x380fcd[_0xd5d9('0x3c')]);return db['CmHopperHistory'][_0xd5d9('0x40')](_0x2b3b1f)[_0xd5d9('0x22')](handleEntityNotFound(_0x3da72d,null))[_0xd5d9('0x22')](respondWithResult(_0x3da72d,null))[_0xd5d9('0x3d')](handleError(_0x3da72d,null));};exports[_0xd5d9('0x41')]=function(_0x2cd863,_0x40cd0b){return db[_0xd5d9('0x29')][_0xd5d9('0x41')](_0x2cd863[_0xd5d9('0x42')],{})[_0xd5d9('0x22')](respondWithResult(_0x40cd0b,0xc9))[_0xd5d9('0x3d')](handleError(_0x40cd0b,null));};exports[_0xd5d9('0x43')]=function(_0x490b50,_0x923b11){return db[_0xd5d9('0x29')]['describe']()[_0xd5d9('0x22')](respondWithResult(_0x923b11,null))[_0xd5d9('0x3d')](handleError(_0x923b11,null));};exports[_0xd5d9('0x21')]=function(_0x146624,_0x392fae){if(_0x146624[_0xd5d9('0x42')][_0xd5d9('0x44')]){delete _0x146624['body'][_0xd5d9('0x44')];}return db[_0xd5d9('0x29')][_0xd5d9('0x40')]({'where':{'uniqueid':_0x146624['params']['id']}})[_0xd5d9('0x22')](handleEntityNotFound(_0x392fae,null))['then'](saveUpdates(_0x146624[_0xd5d9('0x42')],null))[_0xd5d9('0x22')](respondWithResult(_0x392fae,null))['catch'](handleError(_0x392fae,null));};
\ No newline at end of file
+var _0xd51d=['eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/license/util','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','update','destroy','then','error','name','send','index','CmHopperHistory','rawAttributes','type','key','model','map','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','where','merge','VIRTUAL','filter','options','includeAll','findAll','show','include','find','catch','create','body','uniqueid','params'];(function(_0x1a72f3,_0x217011){var _0x57ef47=function(_0x20123d){while(--_0x20123d){_0x1a72f3['push'](_0x1a72f3['shift']());}};_0x57ef47(++_0x217011);}(_0xd51d,0x168));var _0xdd51=function(_0x55334a,_0x37bd17){_0x55334a=_0x55334a-0x0;var _0xf5452e=_0xd51d[_0x55334a];return _0xf5452e;};'use strict';var emlformat=require(_0xdd51('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xdd51('0x1'));var jsonpatch=require(_0xdd51('0x2'));var rp=require(_0xdd51('0x3'));var moment=require('moment');var BPromise=require(_0xdd51('0x4'));var Mustache=require(_0xdd51('0x5'));var util=require(_0xdd51('0x6'));var path=require(_0xdd51('0x7'));var sox=require(_0xdd51('0x8'));var csv=require('to-csv');var ejs=require(_0xdd51('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xdd51('0xa'));var squel=require(_0xdd51('0xb'));var crypto=require(_0xdd51('0xc'));var jsforce=require(_0xdd51('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xdd51('0xe'));var Redis=require(_0xdd51('0xf'));var authService=require('../../components/auth/service');var qs=require(_0xdd51('0x10'));var as=require(_0xdd51('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xdd51('0x12'));var utils=require(_0xdd51('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0xdd51('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x13d880,_0x52b86e){_0x52b86e=_0x52b86e||0xcc;return function(_0xd286e9){if(_0xd286e9){return _0x13d880[_0xdd51('0x15')](_0x52b86e);}return _0x13d880[_0xdd51('0x16')](_0x52b86e)[_0xdd51('0x17')]();};}function respondWithResult(_0x16ab9f,_0x2ac235){_0x2ac235=_0x2ac235||0xc8;return function(_0x287128){if(_0x287128){return _0x16ab9f[_0xdd51('0x16')](_0x2ac235)[_0xdd51('0x18')](_0x287128);}};}function respondWithFilteredResult(_0x3ad596,_0x39b614){return function(_0x41626e){if(_0x41626e){var _0x4b7f31=typeof _0x39b614[_0xdd51('0x19')]===_0xdd51('0x1a')&&typeof _0x39b614[_0xdd51('0x1b')]===_0xdd51('0x1a');var _0x180c4b=_0x41626e[_0xdd51('0x1c')];var _0x139691=_0x4b7f31?0x0:_0x39b614[_0xdd51('0x19')];var _0x30ee25=_0x4b7f31?_0x41626e[_0xdd51('0x1c')]:_0x39b614[_0xdd51('0x19')]+_0x39b614['limit'];var _0x1d535f;if(_0x30ee25>=_0x180c4b){_0x30ee25=_0x180c4b;_0x1d535f=0xc8;}else{_0x1d535f=0xce;}_0x3ad596[_0xdd51('0x16')](_0x1d535f);return _0x3ad596[_0xdd51('0x1d')](_0xdd51('0x1e'),_0x139691+'-'+_0x30ee25+'/'+_0x180c4b)[_0xdd51('0x18')](_0x41626e);}return null;};}function patchUpdates(_0x44f8f2){return function(_0x404265){try{jsonpatch['apply'](_0x404265,_0x44f8f2,!![]);}catch(_0x4c145e){return BPromise[_0xdd51('0x1f')](_0x4c145e);}return _0x404265['save']();};}function saveUpdates(_0x411b56,_0x3eb2c4){return function(_0x7c2ef2){if(_0x7c2ef2){return _0x7c2ef2[_0xdd51('0x20')](_0x411b56)['then'](function(_0x172ceb){return _0x172ceb;});}return null;};}function removeEntity(_0x38558f,_0x253837){return function(_0x577539){if(_0x577539){return _0x577539[_0xdd51('0x21')]()[_0xdd51('0x22')](function(){_0x38558f['status'](0xcc)[_0xdd51('0x17')]();});}};}function handleEntityNotFound(_0x4a80d1,_0x585cb2){return function(_0x5e58b7){if(!_0x5e58b7){_0x4a80d1[_0xdd51('0x15')](0x194);}return _0x5e58b7;};}function handleError(_0x4d7b1a,_0x565b02){_0x565b02=_0x565b02||0x1f4;return function(_0x2b3580){logger[_0xdd51('0x23')](_0x2b3580['stack']);if(_0x2b3580[_0xdd51('0x24')]){delete _0x2b3580['name'];}_0x4d7b1a['status'](_0x565b02)[_0xdd51('0x25')](_0x2b3580);};}exports[_0xdd51('0x26')]=function(_0x76443f,_0x561c72){var _0x32105a={},_0x320a5c={},_0x116ab0={'count':0x0,'rows':[]};var _0x105853=_['map'](db[_0xdd51('0x27')][_0xdd51('0x28')],function(_0x2346b9){return{'name':_0x2346b9['fieldName'],'type':_0x2346b9[_0xdd51('0x29')][_0xdd51('0x2a')]};});_0x320a5c[_0xdd51('0x2b')]=_[_0xdd51('0x2c')](_0x105853,_0xdd51('0x24'));_0x320a5c['query']=_[_0xdd51('0x2d')](_0x76443f[_0xdd51('0x2e')]);_0x320a5c[_0xdd51('0x2f')]=_[_0xdd51('0x30')](_0x320a5c['model'],_0x320a5c['query']);_0x32105a['attributes']=_[_0xdd51('0x30')](_0x320a5c[_0xdd51('0x2b')],qs[_0xdd51('0x31')](_0x76443f[_0xdd51('0x2e')][_0xdd51('0x31')]));_0x32105a[_0xdd51('0x32')]=_0x32105a[_0xdd51('0x32')][_0xdd51('0x33')]?_0x32105a[_0xdd51('0x32')]:_0x320a5c[_0xdd51('0x2b')];if(!_0x76443f[_0xdd51('0x2e')][_0xdd51('0x34')](_0xdd51('0x35'))){_0x32105a['limit']=qs['limit'](_0x76443f[_0xdd51('0x2e')][_0xdd51('0x1b')]);_0x32105a[_0xdd51('0x19')]=qs[_0xdd51('0x19')](_0x76443f['query'][_0xdd51('0x19')]);}_0x32105a[_0xdd51('0x36')]=qs[_0xdd51('0x37')](_0x76443f['query']['sort']);_0x32105a['where']=qs['filters'](_[_0xdd51('0x38')](_0x76443f['query'],_0x320a5c[_0xdd51('0x2f')]),_0x105853);if(_0x76443f[_0xdd51('0x2e')]['filter']){_0x32105a[_0xdd51('0x39')]=_[_0xdd51('0x3a')](_0x32105a[_0xdd51('0x39')],{'$or':_[_0xdd51('0x2c')](_0x105853,function(_0x352214){if(_0x352214['type']!==_0xdd51('0x3b')){var _0x5ce597={};_0x5ce597[_0x352214[_0xdd51('0x24')]]={'$like':'%'+_0x76443f['query'][_0xdd51('0x3c')]+'%'};return _0x5ce597;}})});}_0x32105a=_[_0xdd51('0x3a')]({},_0x32105a,_0x76443f[_0xdd51('0x3d')]);var _0x31c117={'where':_0x32105a[_0xdd51('0x39')]};return db[_0xdd51('0x27')][_0xdd51('0x1c')](_0x31c117)[_0xdd51('0x22')](function(_0x141366){_0x116ab0[_0xdd51('0x1c')]=_0x141366;if(_0x76443f[_0xdd51('0x2e')][_0xdd51('0x3e')]){_0x32105a['include']=[{'all':!![]}];}return db[_0xdd51('0x27')][_0xdd51('0x3f')](_0x32105a);})['then'](function(_0x17484f){_0x116ab0['rows']=_0x17484f;return _0x116ab0;})['then'](respondWithFilteredResult(_0x561c72,_0x32105a))['catch'](handleError(_0x561c72,null));};exports[_0xdd51('0x40')]=function(_0xb90142,_0x39bd4c){var _0x2c6375={'raw':!![],'where':{'id':_0xb90142['params']['id']}},_0x15130c={};_0x15130c['model']=_[_0xdd51('0x2d')](db[_0xdd51('0x27')]['rawAttributes']);_0x15130c['query']=_[_0xdd51('0x2d')](_0xb90142[_0xdd51('0x2e')]);_0x15130c['filters']=_[_0xdd51('0x30')](_0x15130c[_0xdd51('0x2b')],_0x15130c[_0xdd51('0x2e')]);_0x2c6375['attributes']=_[_0xdd51('0x30')](_0x15130c['model'],qs['fields'](_0xb90142[_0xdd51('0x2e')][_0xdd51('0x31')]));_0x2c6375['attributes']=_0x2c6375[_0xdd51('0x32')][_0xdd51('0x33')]?_0x2c6375[_0xdd51('0x32')]:_0x15130c['model'];if(_0xb90142[_0xdd51('0x2e')][_0xdd51('0x3e')]){_0x2c6375[_0xdd51('0x41')]=[{'all':!![]}];}_0x2c6375=_[_0xdd51('0x3a')]({},_0x2c6375,_0xb90142[_0xdd51('0x3d')]);return db[_0xdd51('0x27')][_0xdd51('0x42')](_0x2c6375)['then'](handleEntityNotFound(_0x39bd4c,null))[_0xdd51('0x22')](respondWithResult(_0x39bd4c,null))[_0xdd51('0x43')](handleError(_0x39bd4c,null));};exports['create']=function(_0x390b09,_0x1c250e){return db[_0xdd51('0x27')][_0xdd51('0x44')](_0x390b09[_0xdd51('0x45')],{})[_0xdd51('0x22')](respondWithResult(_0x1c250e,0xc9))[_0xdd51('0x43')](handleError(_0x1c250e,null));};exports['describe']=function(_0x559a02,_0x2ade9a){return db[_0xdd51('0x27')]['describe']()[_0xdd51('0x22')](respondWithResult(_0x2ade9a,null))['catch'](handleError(_0x2ade9a,null));};exports['update']=function(_0x5a6f63,_0x39a79e){if(_0x5a6f63[_0xdd51('0x45')]['uniqueid']){delete _0x5a6f63[_0xdd51('0x45')][_0xdd51('0x46')];}return db[_0xdd51('0x27')][_0xdd51('0x42')]({'where':{'uniqueid':_0x5a6f63[_0xdd51('0x47')]['id']}})[_0xdd51('0x22')](handleEntityNotFound(_0x39a79e,null))[_0xdd51('0x22')](saveUpdates(_0x5a6f63[_0xdd51('0x45')],null))[_0xdd51('0x22')](respondWithResult(_0x39a79e,null))[_0xdd51('0x43')](handleError(_0x39a79e,null));};
\ No newline at end of file
index b1c8140..aae1ae7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3419=['api','moment','request-promise','path','rimraf','../../config/environment','./cmHopperHistory.attributes','CmHopperHistory','cm_hopper_history','endtime','uniqueid','lodash','util','../../config/logger'];(function(_0x4e4c5a,_0x34f306){var _0x193b18=function(_0x13256c){while(--_0x13256c){_0x4e4c5a['push'](_0x4e4c5a['shift']());}};_0x193b18(++_0x34f306);}(_0x3419,0xb3));var _0x9341=function(_0x14b4b2,_0x42aed0){_0x14b4b2=_0x14b4b2-0x0;var _0x2710fd=_0x3419[_0x14b4b2];return _0x2710fd;};'use strict';var _=require(_0x9341('0x0'));var util=require(_0x9341('0x1'));var logger=require(_0x9341('0x2'))(_0x9341('0x3'));var moment=require(_0x9341('0x4'));var BPromise=require('bluebird');var rp=require(_0x9341('0x5'));var fs=require('fs');var path=require(_0x9341('0x6'));var rimraf=require(_0x9341('0x7'));var config=require(_0x9341('0x8'));var attributes=require(_0x9341('0x9'));module['exports']=function(_0xa36232,_0x204ee){return _0xa36232['define'](_0x9341('0xa'),attributes,{'tableName':_0x9341('0xb'),'paranoid':![],'indexes':[{'name':_0x9341('0xc'),'fields':[_0x9341('0xc')]},{'name':_0x9341('0xd'),'fields':[_0x9341('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xdbc6=['cm_hopper_history','endtime','uniqueid','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','CmHopperHistory'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xdbc6,0x13b));var _0x6dbc=function(_0x5d4e4f,_0x32cba9){_0x5d4e4f=_0x5d4e4f-0x0;var _0x25ff11=_0xdbc6[_0x5d4e4f];return _0x25ff11;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x6dbc('0x0'))('api');var moment=require(_0x6dbc('0x1'));var BPromise=require(_0x6dbc('0x2'));var rp=require(_0x6dbc('0x3'));var fs=require('fs');var path=require(_0x6dbc('0x4'));var rimraf=require(_0x6dbc('0x5'));var config=require(_0x6dbc('0x6'));var attributes=require('./cmHopperHistory.attributes');module[_0x6dbc('0x7')]=function(_0x434e1a,_0x5ebe85){return _0x434e1a[_0x6dbc('0x8')](_0x6dbc('0x9'),attributes,{'tableName':_0x6dbc('0xa'),'paranoid':![],'indexes':[{'name':_0x6dbc('0xb'),'fields':[_0x6dbc('0xb')]},{'name':'uniqueid','fields':[_0x6dbc('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
index d3356e9..d3f7977 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xad13=['http','request','then','info','CmHopperHistory,\x20%s,\x20%s','debug','CmHopperHistory,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','CreateCmHopperHistory','create','body','options','raw','AvgHandleTime','CmHopperHistory','findAll','COUNT','sequelize','col','predictiveIntervalTotalCalls','literal','`state`\x20=\x204,\x201,\x20null','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','AVG','`state`\x20=\x204,\x20`holdtime`,\x20null','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','outboundCongestionCallsDay','`state`\x20=\x2010\x20,\x201,\x20null','outboundDropCallsDayTimeout','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','`state`\x20=\x2016,\x201,\x20null','outboundAnswerAgiCallsDay','outboundReCallsDay','GetVoiceQueueHopperHistory','where','ivrTotalCallsDays','ivrAnswerCallsDay','GetCampaignHopperHistory','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x93f929,_0x5945b9){var _0x278195=function(_0x5a66f1){while(--_0x5a66f1){_0x93f929['push'](_0x93f929['shift']());}};_0x278195(++_0x5945b9);}(_0xad13,0x79));var _0x3ad1=function(_0x7f8db1,_0x491af7){_0x7f8db1=_0x7f8db1-0x0;var _0x4a8b20=_0xad13[_0x7f8db1];return _0x4a8b20;};'use strict';var _=require(_0x3ad1('0x0'));var util=require('util');var moment=require(_0x3ad1('0x1'));var BPromise=require(_0x3ad1('0x2'));var rs=require(_0x3ad1('0x3'));var fs=require('fs');var Redis=require(_0x3ad1('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x3ad1('0x5'));var logger=require(_0x3ad1('0x6'))(_0x3ad1('0x7'));var config=require(_0x3ad1('0x8'));var jayson=require(_0x3ad1('0x9'));var client=jayson[_0x3ad1('0xa')][_0x3ad1('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x23ed63,_0x44fd50,_0x313ad9){return new BPromise(function(_0x4d27b0,_0x2429f4){return client[_0x3ad1('0xc')](_0x23ed63,_0x313ad9)[_0x3ad1('0xd')](function(_0x4e93df){logger[_0x3ad1('0xe')](_0x3ad1('0xf'),_0x44fd50,'request\x20sent');logger[_0x3ad1('0x10')](_0x3ad1('0x11'),_0x44fd50,_0x3ad1('0x12'),JSON[_0x3ad1('0x13')](_0x4e93df));if(_0x4e93df[_0x3ad1('0x14')]){if(_0x4e93df[_0x3ad1('0x14')]['code']===0x1f4){logger['error'](_0x3ad1('0xf'),_0x44fd50,_0x4e93df[_0x3ad1('0x14')][_0x3ad1('0x15')]);return _0x2429f4(_0x4e93df[_0x3ad1('0x14')]['message']);}logger[_0x3ad1('0x14')]('CmHopperHistory,\x20%s,\x20%s',_0x44fd50,_0x4e93df[_0x3ad1('0x14')][_0x3ad1('0x15')]);return _0x4d27b0(_0x4e93df[_0x3ad1('0x14')][_0x3ad1('0x15')]);}else{logger[_0x3ad1('0xe')](_0x3ad1('0xf'),_0x44fd50,_0x3ad1('0x12'));_0x4d27b0(_0x4e93df[_0x3ad1('0x16')][_0x3ad1('0x15')]);}})[_0x3ad1('0x17')](function(_0x1d924e){logger[_0x3ad1('0x14')]('CmHopperHistory,\x20%s,\x20%s',_0x44fd50,_0x1d924e);_0x2429f4(_0x1d924e);});});}exports[_0x3ad1('0x18')]=function(_0x30e53f){var _0x79b791=this;return new Promise(function(_0xd43203,_0x11e3ed){return db['CmHopperHistory'][_0x3ad1('0x19')](_0x30e53f[_0x3ad1('0x1a')],{'raw':_0x30e53f['options']?_0x30e53f[_0x3ad1('0x1b')][_0x3ad1('0x1c')]===undefined?!![]:![]:!![]})[_0x3ad1('0xd')](function(_0x46649d){logger[_0x3ad1('0xe')](_0x3ad1('0x18'),_0x30e53f);logger['debug'](_0x3ad1('0x18'),_0x30e53f,JSON['stringify'](_0x46649d));_0xd43203(_0x46649d);})[_0x3ad1('0x17')](function(_0x5f1031){logger[_0x3ad1('0x14')](_0x3ad1('0x18'),_0x5f1031[_0x3ad1('0x15')],_0x30e53f);_0x11e3ed(_0x79b791[_0x3ad1('0x14')](0x1f4,_0x5f1031[_0x3ad1('0x15')]));});});};exports[_0x3ad1('0x1d')]=function(_0x2fd5e6){var _0x591c61=this;return new Promise(function(_0x5e36fe,_0x466d91){return db[_0x3ad1('0x1e')][_0x3ad1('0x1f')]({'raw':_0x2fd5e6[_0x3ad1('0x1b')]?_0x2fd5e6[_0x3ad1('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x2fd5e6['options']?_0x2fd5e6[_0x3ad1('0x1b')]['where']||null:null,'attributes':[[db['sequelize']['fn'](_0x3ad1('0x20'),db[_0x3ad1('0x21')][_0x3ad1('0x22')]('id')),_0x3ad1('0x23')],[db['sequelize']['fn'](_0x3ad1('0x20'),db[_0x3ad1('0x21')]['fn']('IF',db[_0x3ad1('0x21')][_0x3ad1('0x24')](_0x3ad1('0x25')))),'predictiveIntervalAnsweredCalls'],[db['sequelize']['fn'](_0x3ad1('0x20'),db['sequelize']['fn']('IF',db[_0x3ad1('0x21')][_0x3ad1('0x24')](_0x3ad1('0x26')))),_0x3ad1('0x27')],[db[_0x3ad1('0x21')]['fn'](_0x3ad1('0x20'),db[_0x3ad1('0x21')]['fn']('IF',db[_0x3ad1('0x21')][_0x3ad1('0x24')]('`state`\x20=\x2011,\x201,\x20null'))),_0x3ad1('0x28')],[db['sequelize']['fn'](_0x3ad1('0x29'),db[_0x3ad1('0x21')]['fn']('IF',db[_0x3ad1('0x21')][_0x3ad1('0x24')](_0x3ad1('0x2a')))),_0x3ad1('0x2b')],[db[_0x3ad1('0x21')]['fn']('AVG',db[_0x3ad1('0x21')]['fn']('IF',db['sequelize']['literal']('`state`\x20=\x204,\x20`talktime`,\x20null'))),_0x3ad1('0x2c')]]})[_0x3ad1('0xd')](function(_0xa4ccc3){logger[_0x3ad1('0xe')](_0x3ad1('0x1d'),_0x2fd5e6);logger[_0x3ad1('0x10')]('AvgHandleTime',_0x2fd5e6,JSON['stringify'](_0xa4ccc3));_0x5e36fe(_0xa4ccc3);})[_0x3ad1('0x17')](function(_0x21f21){logger[_0x3ad1('0x14')](_0x3ad1('0x1d'),_0x21f21[_0x3ad1('0x15')],_0x2fd5e6);_0x466d91(_0x591c61['error'](0x1f4,_0x21f21['message']));});});};exports['GetVoiceQueueHopperHistory']=function(_0x5d9365){var _0x528168=this;return new Promise(function(_0x5e878d,_0x5c2acd){return db[_0x3ad1('0x1e')][_0x3ad1('0x1f')]({'raw':_0x5d9365['options']?_0x5d9365[_0x3ad1('0x1b')][_0x3ad1('0x1c')]===undefined?!![]:![]:!![],'where':_0x5d9365['options']?_0x5d9365[_0x3ad1('0x1b')]['where']||null:null,'attributes':[[_0x3ad1('0x2d'),_0x3ad1('0x2e')],[db[_0x3ad1('0x21')]['fn'](_0x3ad1('0x20'),db['sequelize']['fn']('IF',db['sequelize'][_0x3ad1('0x24')](_0x3ad1('0x2f')))),_0x3ad1('0x30')],[db[_0x3ad1('0x21')]['fn']('COUNT',db[_0x3ad1('0x21')]['fn']('IF',db[_0x3ad1('0x21')][_0x3ad1('0x24')](_0x3ad1('0x31')))),'outboundNoAnswerCallsDay'],[db[_0x3ad1('0x21')]['fn']('COUNT',db['sequelize']['fn']('IF',db[_0x3ad1('0x21')]['literal']('`state`\x20=\x204,\x201,\x20null'))),'outboundAnswerCallsDay'],[db[_0x3ad1('0x21')]['fn'](_0x3ad1('0x20'),db[_0x3ad1('0x21')]['fn']('IF',db[_0x3ad1('0x21')][_0x3ad1('0x24')]('`state`\x20=\x205,\x201,\x20null'))),'outboundBusyCallsDay'],[db[_0x3ad1('0x21')]['fn'](_0x3ad1('0x20'),db['sequelize']['fn']('IF',db[_0x3ad1('0x21')][_0x3ad1('0x24')]('`state`\x20=\x208,\x201,\x20null'))),_0x3ad1('0x32')],[db[_0x3ad1('0x21')]['fn']('COUNT',db[_0x3ad1('0x21')]['fn']('IF',db['sequelize'][_0x3ad1('0x24')](_0x3ad1('0x33')))),_0x3ad1('0x34')],[db[_0x3ad1('0x21')]['fn'](_0x3ad1('0x20'),db[_0x3ad1('0x21')]['fn']('IF',db[_0x3ad1('0x21')]['literal']('`state`\x20=\x2011\x20,\x201,\x20null'))),_0x3ad1('0x35')],[db[_0x3ad1('0x21')]['fn'](_0x3ad1('0x20'),db[_0x3ad1('0x21')]['fn']('IF',db['sequelize']['literal'](_0x3ad1('0x36')))),'outboundUnknownCallsDay'],[db[_0x3ad1('0x21')]['fn']('COUNT',db[_0x3ad1('0x21')]['fn']('IF',db['sequelize'][_0x3ad1('0x24')](_0x3ad1('0x37')))),_0x3ad1('0x38')],[db['sequelize']['fn'](_0x3ad1('0x20'),db[_0x3ad1('0x21')]['fn']('IF',db[_0x3ad1('0x21')][_0x3ad1('0x24')]('`state`\x20=\x2014,\x201,\x20null'))),_0x3ad1('0x39')],[db[_0x3ad1('0x21')]['fn'](_0x3ad1('0x20'),db[_0x3ad1('0x21')]['fn']('IF',db[_0x3ad1('0x21')][_0x3ad1('0x24')]('`state`\x20=\x2018,\x201,\x20null'))),'outboundRejectCallsDay'],[db['sequelize']['fn'](_0x3ad1('0x20'),db[_0x3ad1('0x21')]['fn']('IF',db['sequelize']['literal'](_0x3ad1('0x3a')))),_0x3ad1('0x3b')],[db[_0x3ad1('0x21')]['fn'](_0x3ad1('0x20'),db['sequelize']['fn']('IF',db[_0x3ad1('0x21')]['literal']('`state`\x20=\x2020,\x201,\x20null'))),'outboundRejectCallsDay'],[db[_0x3ad1('0x21')]['fn'](_0x3ad1('0x20'),db[_0x3ad1('0x21')]['fn']('IF',db[_0x3ad1('0x21')][_0x3ad1('0x24')]('`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null'))),_0x3ad1('0x3c')]],'group':[_0x3ad1('0x2d')]})[_0x3ad1('0xd')](function(_0x4081d4){logger[_0x3ad1('0xe')]('GetVoiceQueueHopperHistory',_0x5d9365);logger[_0x3ad1('0x10')](_0x3ad1('0x3d'),_0x5d9365,JSON[_0x3ad1('0x13')](_0x4081d4));_0x5e878d(_0x4081d4);})[_0x3ad1('0x17')](function(_0x350d40){logger[_0x3ad1('0x14')](_0x3ad1('0x3d'),_0x350d40[_0x3ad1('0x15')],_0x5d9365);_0x5c2acd(_0x528168[_0x3ad1('0x14')](0x1f4,_0x350d40[_0x3ad1('0x15')]));});});};exports['GetCampaignHopperHistory']=function(_0x58ccef){var _0x42a2ac=this;return new Promise(function(_0x4e0fe8,_0x34d9c2){return db[_0x3ad1('0x1e')][_0x3ad1('0x1f')]({'raw':_0x58ccef['options']?_0x58ccef[_0x3ad1('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x58ccef[_0x3ad1('0x1b')]?_0x58ccef['options'][_0x3ad1('0x3e')]||null:null,'attributes':[[_0x3ad1('0x2d'),'name'],[db[_0x3ad1('0x21')]['fn'](_0x3ad1('0x20'),db[_0x3ad1('0x21')][_0x3ad1('0x22')]('id')),_0x3ad1('0x3f')],[db['sequelize']['fn'](_0x3ad1('0x20'),db['sequelize']['fn']('IF',db[_0x3ad1('0x21')][_0x3ad1('0x24')](_0x3ad1('0x25')))),_0x3ad1('0x40')]],'group':[_0x3ad1('0x2d')]})[_0x3ad1('0xd')](function(_0x924273){logger[_0x3ad1('0xe')]('GetCampaignHopperHistory',_0x58ccef);logger[_0x3ad1('0x10')](_0x3ad1('0x41'),_0x58ccef,JSON[_0x3ad1('0x13')](_0x924273));_0x4e0fe8(_0x924273);})[_0x3ad1('0x17')](function(_0x1d1403){logger[_0x3ad1('0x14')]('GetCampaignHopperHistory',_0x1d1403[_0x3ad1('0x15')],_0x58ccef);_0x34d9c2(_0x42a2ac[_0x3ad1('0x14')](0x1f4,_0x1d1403[_0x3ad1('0x15')]));});});};
\ No newline at end of file
+var _0x153f=['../../config/environment','jayson/promise','client','http','request','then','info','CmHopperHistory,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','CreateCmHopperHistory','CmHopperHistory','create','body','options','raw','catch','AvgHandleTime','findAll','sequelize','COUNT','col','predictiveIntervalTotalCalls','literal','`state`\x20=\x204,\x201,\x20null','predictiveIntervalAnsweredCalls','`state`\x20=\x2010,\x201,\x20null','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','`state`\x20=\x204,\x20`talktime`,\x20null','predictiveIntervalAvgTalktime','where','campaign','name','`state`\x20=\x200,\x201,\x20null','outboundNoSuchCallsDay','`state`\x20=\x203,\x201,\x20null','`state`\x20=\x205,\x201,\x20null','outboundBusyCallsDay','`state`\x20=\x208,\x201,\x20null','outboundCongestionCallsDay','`state`\x20=\x2010\x20,\x201,\x20null','`state`\x20=\x2011\x20,\x201,\x20null','outboundDropCallsDayCallersExit','`state`\x20=\x2012,\x201,\x20null','outboundUnknownCallsDay','`state`\x20=\x2013,\x201,\x20null','outboundBlacklistCallsDay','`state`\x20=\x2014,\x201,\x20null','outboundOriginateFailureCallsDay','`state`\x20=\x2016,\x201,\x20null','`state`\x20=\x2020,\x201,\x20null','`state`\x20=\x2022\x20or\x20`state`\x20=\x2023,\x201,\x20null','outboundReCallsDay','GetVoiceQueueHopperHistory','GetCampaignHopperHistory','ivrTotalCallsDays','ivrAnswerCallsDay','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger'];(function(_0x4e93a9,_0x413f30){var _0x43013c=function(_0x3a0cf3){while(--_0x3a0cf3){_0x4e93a9['push'](_0x4e93a9['shift']());}};_0x43013c(++_0x413f30);}(_0x153f,0x15b));var _0xf153=function(_0x282440,_0x4f57fc){_0x282440=_0x282440-0x0;var _0x17272c=_0x153f[_0x282440];return _0x17272c;};'use strict';var _=require(_0xf153('0x0'));var util=require(_0xf153('0x1'));var moment=require(_0xf153('0x2'));var BPromise=require(_0xf153('0x3'));var rs=require(_0xf153('0x4'));var fs=require('fs');var Redis=require(_0xf153('0x5'));var db=require(_0xf153('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xf153('0x7'))('rpc');var config=require(_0xf153('0x8'));var jayson=require(_0xf153('0x9'));var client=jayson[_0xf153('0xa')][_0xf153('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x21f432,_0x4c8ae5,_0x17ba96){return new BPromise(function(_0x143497,_0x224f88){return client[_0xf153('0xc')](_0x21f432,_0x17ba96)[_0xf153('0xd')](function(_0x3e7a82){logger[_0xf153('0xe')](_0xf153('0xf'),_0x4c8ae5,_0xf153('0x10'));logger[_0xf153('0x11')]('CmHopperHistory,\x20%s,\x20%s,\x20%s',_0x4c8ae5,_0xf153('0x10'),JSON[_0xf153('0x12')](_0x3e7a82));if(_0x3e7a82[_0xf153('0x13')]){if(_0x3e7a82['error'][_0xf153('0x14')]===0x1f4){logger[_0xf153('0x13')](_0xf153('0xf'),_0x4c8ae5,_0x3e7a82[_0xf153('0x13')][_0xf153('0x15')]);return _0x224f88(_0x3e7a82[_0xf153('0x13')][_0xf153('0x15')]);}logger[_0xf153('0x13')](_0xf153('0xf'),_0x4c8ae5,_0x3e7a82['error'][_0xf153('0x15')]);return _0x143497(_0x3e7a82[_0xf153('0x13')][_0xf153('0x15')]);}else{logger[_0xf153('0xe')](_0xf153('0xf'),_0x4c8ae5,_0xf153('0x10'));_0x143497(_0x3e7a82[_0xf153('0x16')][_0xf153('0x15')]);}})['catch'](function(_0x35f4e8){logger['error'](_0xf153('0xf'),_0x4c8ae5,_0x35f4e8);_0x224f88(_0x35f4e8);});});}exports[_0xf153('0x17')]=function(_0x138dbe){var _0x44272e=this;return new Promise(function(_0x4e790d,_0x357d57){return db[_0xf153('0x18')][_0xf153('0x19')](_0x138dbe[_0xf153('0x1a')],{'raw':_0x138dbe[_0xf153('0x1b')]?_0x138dbe[_0xf153('0x1b')][_0xf153('0x1c')]===undefined?!![]:![]:!![]})[_0xf153('0xd')](function(_0x3735a7){logger[_0xf153('0xe')](_0xf153('0x17'),_0x138dbe);logger[_0xf153('0x11')]('CreateCmHopperHistory',_0x138dbe,JSON[_0xf153('0x12')](_0x3735a7));_0x4e790d(_0x3735a7);})[_0xf153('0x1d')](function(_0x3d3e41){logger[_0xf153('0x13')](_0xf153('0x17'),_0x3d3e41[_0xf153('0x15')],_0x138dbe);_0x357d57(_0x44272e[_0xf153('0x13')](0x1f4,_0x3d3e41[_0xf153('0x15')]));});});};exports[_0xf153('0x1e')]=function(_0x38190c){var _0x1570fc=this;return new Promise(function(_0x39f3ed,_0x35cfe3){return db[_0xf153('0x18')][_0xf153('0x1f')]({'raw':_0x38190c[_0xf153('0x1b')]?_0x38190c[_0xf153('0x1b')][_0xf153('0x1c')]===undefined?!![]:![]:!![],'where':_0x38190c[_0xf153('0x1b')]?_0x38190c[_0xf153('0x1b')]['where']||null:null,'attributes':[[db[_0xf153('0x20')]['fn'](_0xf153('0x21'),db['sequelize'][_0xf153('0x22')]('id')),_0xf153('0x23')],[db['sequelize']['fn'](_0xf153('0x21'),db[_0xf153('0x20')]['fn']('IF',db[_0xf153('0x20')][_0xf153('0x24')](_0xf153('0x25')))),_0xf153('0x26')],[db[_0xf153('0x20')]['fn'](_0xf153('0x21'),db[_0xf153('0x20')]['fn']('IF',db[_0xf153('0x20')][_0xf153('0x24')](_0xf153('0x27')))),'predictiveIntervalDroppedCallsTimeout'],[db[_0xf153('0x20')]['fn'](_0xf153('0x21'),db[_0xf153('0x20')]['fn']('IF',db[_0xf153('0x20')]['literal']('`state`\x20=\x2011,\x201,\x20null'))),_0xf153('0x28')],[db['sequelize']['fn']('AVG',db[_0xf153('0x20')]['fn']('IF',db['sequelize'][_0xf153('0x24')]('`state`\x20=\x204,\x20`holdtime`,\x20null'))),_0xf153('0x29')],[db[_0xf153('0x20')]['fn']('AVG',db[_0xf153('0x20')]['fn']('IF',db[_0xf153('0x20')][_0xf153('0x24')](_0xf153('0x2a')))),_0xf153('0x2b')]]})[_0xf153('0xd')](function(_0x4ab69c){logger[_0xf153('0xe')]('AvgHandleTime',_0x38190c);logger[_0xf153('0x11')](_0xf153('0x1e'),_0x38190c,JSON[_0xf153('0x12')](_0x4ab69c));_0x39f3ed(_0x4ab69c);})[_0xf153('0x1d')](function(_0x274bcc){logger[_0xf153('0x13')]('AvgHandleTime',_0x274bcc[_0xf153('0x15')],_0x38190c);_0x35cfe3(_0x1570fc[_0xf153('0x13')](0x1f4,_0x274bcc[_0xf153('0x15')]));});});};exports['GetVoiceQueueHopperHistory']=function(_0x244172){var _0x17d60c=this;return new Promise(function(_0xd2a763,_0x254692){return db[_0xf153('0x18')][_0xf153('0x1f')]({'raw':_0x244172['options']?_0x244172[_0xf153('0x1b')][_0xf153('0x1c')]===undefined?!![]:![]:!![],'where':_0x244172['options']?_0x244172[_0xf153('0x1b')][_0xf153('0x2c')]||null:null,'attributes':[[_0xf153('0x2d'),_0xf153('0x2e')],[db[_0xf153('0x20')]['fn'](_0xf153('0x21'),db[_0xf153('0x20')]['fn']('IF',db['sequelize'][_0xf153('0x24')](_0xf153('0x2f')))),_0xf153('0x30')],[db[_0xf153('0x20')]['fn'](_0xf153('0x21'),db[_0xf153('0x20')]['fn']('IF',db['sequelize']['literal'](_0xf153('0x31')))),'outboundNoAnswerCallsDay'],[db[_0xf153('0x20')]['fn'](_0xf153('0x21'),db[_0xf153('0x20')]['fn']('IF',db[_0xf153('0x20')][_0xf153('0x24')](_0xf153('0x25')))),'outboundAnswerCallsDay'],[db['sequelize']['fn'](_0xf153('0x21'),db[_0xf153('0x20')]['fn']('IF',db['sequelize'][_0xf153('0x24')](_0xf153('0x32')))),_0xf153('0x33')],[db[_0xf153('0x20')]['fn'](_0xf153('0x21'),db[_0xf153('0x20')]['fn']('IF',db[_0xf153('0x20')][_0xf153('0x24')](_0xf153('0x34')))),_0xf153('0x35')],[db[_0xf153('0x20')]['fn'](_0xf153('0x21'),db['sequelize']['fn']('IF',db[_0xf153('0x20')][_0xf153('0x24')](_0xf153('0x36')))),'outboundDropCallsDayTimeout'],[db[_0xf153('0x20')]['fn'](_0xf153('0x21'),db['sequelize']['fn']('IF',db[_0xf153('0x20')]['literal'](_0xf153('0x37')))),_0xf153('0x38')],[db[_0xf153('0x20')]['fn']('COUNT',db[_0xf153('0x20')]['fn']('IF',db[_0xf153('0x20')][_0xf153('0x24')](_0xf153('0x39')))),_0xf153('0x3a')],[db['sequelize']['fn'](_0xf153('0x21'),db[_0xf153('0x20')]['fn']('IF',db['sequelize'][_0xf153('0x24')](_0xf153('0x3b')))),_0xf153('0x3c')],[db['sequelize']['fn'](_0xf153('0x21'),db[_0xf153('0x20')]['fn']('IF',db[_0xf153('0x20')][_0xf153('0x24')](_0xf153('0x3d')))),_0xf153('0x3e')],[db[_0xf153('0x20')]['fn'](_0xf153('0x21'),db[_0xf153('0x20')]['fn']('IF',db['sequelize'][_0xf153('0x24')]('`state`\x20=\x2018,\x201,\x20null'))),'outboundRejectCallsDay'],[db['sequelize']['fn'](_0xf153('0x21'),db[_0xf153('0x20')]['fn']('IF',db['sequelize'][_0xf153('0x24')](_0xf153('0x3f')))),'outboundAnswerAgiCallsDay'],[db[_0xf153('0x20')]['fn'](_0xf153('0x21'),db[_0xf153('0x20')]['fn']('IF',db[_0xf153('0x20')][_0xf153('0x24')](_0xf153('0x40')))),'outboundRejectCallsDay'],[db[_0xf153('0x20')]['fn'](_0xf153('0x21'),db['sequelize']['fn']('IF',db['sequelize'][_0xf153('0x24')](_0xf153('0x41')))),_0xf153('0x42')]],'group':[_0xf153('0x2d')]})[_0xf153('0xd')](function(_0x1e1c33){logger['info'](_0xf153('0x43'),_0x244172);logger['debug'](_0xf153('0x43'),_0x244172,JSON[_0xf153('0x12')](_0x1e1c33));_0xd2a763(_0x1e1c33);})[_0xf153('0x1d')](function(_0x5cc697){logger[_0xf153('0x13')](_0xf153('0x43'),_0x5cc697[_0xf153('0x15')],_0x244172);_0x254692(_0x17d60c[_0xf153('0x13')](0x1f4,_0x5cc697[_0xf153('0x15')]));});});};exports[_0xf153('0x44')]=function(_0x17f594){var _0x49b1f8=this;return new Promise(function(_0x84e55,_0x150892){return db[_0xf153('0x18')]['findAll']({'raw':_0x17f594[_0xf153('0x1b')]?_0x17f594[_0xf153('0x1b')][_0xf153('0x1c')]===undefined?!![]:![]:!![],'where':_0x17f594[_0xf153('0x1b')]?_0x17f594[_0xf153('0x1b')][_0xf153('0x2c')]||null:null,'attributes':[[_0xf153('0x2d'),_0xf153('0x2e')],[db['sequelize']['fn'](_0xf153('0x21'),db[_0xf153('0x20')]['col']('id')),_0xf153('0x45')],[db[_0xf153('0x20')]['fn'](_0xf153('0x21'),db[_0xf153('0x20')]['fn']('IF',db[_0xf153('0x20')][_0xf153('0x24')](_0xf153('0x25')))),_0xf153('0x46')]],'group':[_0xf153('0x2d')]})[_0xf153('0xd')](function(_0xca7bec){logger['info'](_0xf153('0x44'),_0x17f594);logger[_0xf153('0x11')]('GetCampaignHopperHistory',_0x17f594,JSON[_0xf153('0x12')](_0xca7bec));_0x84e55(_0xca7bec);})[_0xf153('0x1d')](function(_0x249cd6){logger[_0xf153('0x13')](_0xf153('0x44'),_0x249cd6[_0xf153('0x15')],_0x17f594);_0x150892(_0x49b1f8[_0xf153('0x13')](0x1f4,_0x249cd6['message']));});});};
\ No newline at end of file
index b86fdcf..1051c00 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x42db=['isAuthenticated','describe','/:id','post','put','update','exports','multer','util','path','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./cmHopperHistory.controller','get','index','/describe'];(function(_0x475675,_0x5839f6){var _0x92d2a0=function(_0x2ac8d1){while(--_0x2ac8d1){_0x475675['push'](_0x475675['shift']());}};_0x92d2a0(++_0x5839f6);}(_0x42db,0x79));var _0xb42d=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x42db[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0xb42d('0x0'));var util=require(_0xb42d('0x1'));var path=require(_0xb42d('0x2'));var timeout=require('connect-timeout');var express=require(_0xb42d('0x3'));var router=express[_0xb42d('0x4')]();var fs_extra=require(_0xb42d('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xb42d('0x6'));var config=require(_0xb42d('0x7'));var controller=require(_0xb42d('0x8'));router[_0xb42d('0x9')]('/',auth['isAuthenticated'](),controller[_0xb42d('0xa')]);router[_0xb42d('0x9')](_0xb42d('0xb'),auth[_0xb42d('0xc')](),controller[_0xb42d('0xd')]);router[_0xb42d('0x9')](_0xb42d('0xe'),auth['isAuthenticated'](),controller['show']);router[_0xb42d('0xf')]('/',auth[_0xb42d('0xc')](),controller['create']);router[_0xb42d('0x10')](_0xb42d('0xe'),auth[_0xb42d('0xc')](),controller[_0xb42d('0x11')]);module[_0xb42d('0x12')]=router;
\ No newline at end of file
+var _0xc98e=['util','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','isAuthenticated','index','describe','get','post','create','put','/:id','update','exports','multer'];(function(_0x317afc,_0xc51135){var _0x28d22a=function(_0x31356b){while(--_0x31356b){_0x317afc['push'](_0x317afc['shift']());}};_0x28d22a(++_0xc51135);}(_0xc98e,0x6b));var _0xec98=function(_0x148e95,_0x379c15){_0x148e95=_0x148e95-0x0;var _0x343521=_0xc98e[_0x148e95];return _0x343521;};'use strict';var multer=require(_0xec98('0x0'));var util=require(_0xec98('0x1'));var path=require('path');var timeout=require(_0xec98('0x2'));var express=require(_0xec98('0x3'));var router=express[_0xec98('0x4')]();var fs_extra=require(_0xec98('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xec98('0x6'));var config=require(_0xec98('0x7'));var controller=require('./cmHopperHistory.controller');router['get']('/',auth[_0xec98('0x8')](),controller[_0xec98('0x9')]);router['get']('/describe',auth['isAuthenticated'](),controller[_0xec98('0xa')]);router[_0xec98('0xb')]('/:id',auth[_0xec98('0x8')](),controller['show']);router[_0xec98('0xc')]('/',auth[_0xec98('0x8')](),controller[_0xec98('0xd')]);router[_0xec98('0xe')](_0xec98('0xf'),auth[_0xec98('0x8')](),controller[_0xec98('0x10')]);module[_0xec98('0x11')]=router;
\ No newline at end of file
index 8f6594f..c2f63c7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7722=['STRING','name','sequelize','exports'];(function(_0x3bd749,_0xa93c27){var _0x3ec8f7=function(_0x326c){while(--_0x326c){_0x3bd749['push'](_0x3bd749['shift']());}};_0x3ec8f7(++_0xa93c27);}(_0x7722,0x14e));var _0x2772=function(_0x39362f,_0x54694c){_0x39362f=_0x39362f-0x0;var _0x3e3753=_0x7722[_0x39362f];return _0x3e3753;};'use strict';var Sequelize=require(_0x2772('0x0'));module[_0x2772('0x1')]={'name':{'type':Sequelize[_0x2772('0x2')],'unique':_0x2772('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x2772('0x2')]},'dialPrefix':{'type':Sequelize[_0x2772('0x2')]}};
\ No newline at end of file
+var _0xd6d6=['STRING','name','sequelize','exports'];(function(_0x4f80ec,_0x422f5b){var _0x5147d6=function(_0x162fce){while(--_0x162fce){_0x4f80ec['push'](_0x4f80ec['shift']());}};_0x5147d6(++_0x422f5b);}(_0xd6d6,0xbe));var _0x6d6d=function(_0x58eaad,_0x4f7774){_0x58eaad=_0x58eaad-0x0;var _0x5fd9d1=_0xd6d6[_0x58eaad];return _0x5fd9d1;};'use strict';var Sequelize=require(_0x6d6d('0x0'));module[_0x6d6d('0x1')]={'name':{'type':Sequelize[_0x6d6d('0x2')],'unique':_0x6d6d('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize['STRING']},'dialPrefix':{'type':Sequelize[_0x6d6d('0x2')]}};
\ No newline at end of file
index 258c307..a490987 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfe15=['request-promise','moment','bluebird','mustache','util','path','ejs','lodash','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','redis','defaults','localhost','./cmList.socket','register','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','update','then','get','Lists','UserProfileResource','destroy','sendStatus','error','stack','name','send','map','CmList','fieldName','key','model','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','filters','pick','filter','merge','type','VIRTUAL','options','include','rows','show','params','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','catch','describe','addDisposition','ListId','Disposition','getDispositions','findOne','rawAttributes','order','findAll','removeDispositions','ids','CmContact','tags','isArray','push','each','omit','success','dataValues','errors','message','Malformed\x20request\x20syntax','getContacts','CmCustomField','CustomFields','format','cf_%d','raw','getContactsCsv','ContactItemType','OrderBy','select','from','cm_contacts','c.deletedAt\x20is\x20null','distinct','field','c.cf_','customField_','item','cm_contact_has_items','ItemTypeId\x20=\x20?','additionalPhone_','description','description_additionalPhone_','toString','isEmpty','now','writeFileSync','/tmp/list_%d_%s.csv','Content-disposition','attachment;\x20filename=','list_%d_%s.csv','setHeader','download','addCustomField','sequelize','transaction','TEXT','text','number','Sequelize','switch','BOOLEAN','defaultValue','queryInterface','addColumn','getGlobalCustomFields','addAgents','spread','emit','userCmList:save','removeAgents','userCmList:remove','getAgents','User','info','zip-dir','fast-json-patch'];(function(_0x545016,_0x5c5822){var _0x3a64f6=function(_0x3da565){while(--_0x3da565){_0x545016['push'](_0x545016['shift']());}};_0x3a64f6(++_0x5c5822);}(_0xfe15,0x144));var _0x5fe1=function(_0x595c62,_0x2e649a){_0x595c62=_0x595c62-0x0;var _0x5767a1=_0xfe15[_0x595c62];return _0x5767a1;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x5fe1('0x0'));var jsonpatch=require(_0x5fe1('0x1'));var rp=require(_0x5fe1('0x2'));var moment=require(_0x5fe1('0x3'));var BPromise=require(_0x5fe1('0x4'));var Mustache=require(_0x5fe1('0x5'));var util=require(_0x5fe1('0x6'));var path=require(_0x5fe1('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x5fe1('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x5fe1('0x9'));var squel=require('squel');var crypto=require(_0x5fe1('0xa'));var jsforce=require(_0x5fe1('0xb'));var deskjs=require(_0x5fe1('0xc'));var toCsv=require(_0x5fe1('0xd'));var querystring=require('querystring');var Papa=require(_0x5fe1('0xe'));var Redis=require(_0x5fe1('0xf'));var authService=require(_0x5fe1('0x10'));var qs=require(_0x5fe1('0x11'));var as=require(_0x5fe1('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x5fe1('0x13'))(_0x5fe1('0x14'));var utils=require(_0x5fe1('0x15'));var config=require(_0x5fe1('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x5fe1('0x17'))['db'];var csv_results;config[_0x5fe1('0x18')]=_[_0x5fe1('0x19')](config[_0x5fe1('0x18')],{'host':_0x5fe1('0x1a'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x5fe1('0x18')]));require(_0x5fe1('0x1b'))[_0x5fe1('0x1c')](socket);function respondWithStatusCode(_0x5072ff,_0x1a186d){_0x1a186d=_0x1a186d||0xcc;return function(_0x415259){if(_0x415259){return _0x5072ff['sendStatus'](_0x1a186d);}return _0x5072ff[_0x5fe1('0x1d')](_0x1a186d)[_0x5fe1('0x1e')]();};}function respondWithResult(_0x307cc1,_0x27e5e8){_0x27e5e8=_0x27e5e8||0xc8;return function(_0x1ddee5){if(_0x1ddee5){return _0x307cc1[_0x5fe1('0x1d')](_0x27e5e8)[_0x5fe1('0x1f')](_0x1ddee5);}};}function respondWithFilteredResult(_0x2b303a,_0x2f9b59){return function(_0x465231){if(_0x465231){var _0x33f28b=typeof _0x2f9b59[_0x5fe1('0x20')]===_0x5fe1('0x21')&&typeof _0x2f9b59[_0x5fe1('0x22')]===_0x5fe1('0x21');var _0x34f97c=_0x465231[_0x5fe1('0x23')];var _0x3b54ad=_0x33f28b?0x0:_0x2f9b59[_0x5fe1('0x20')];var _0x19702f=_0x33f28b?_0x465231[_0x5fe1('0x23')]:_0x2f9b59['offset']+_0x2f9b59['limit'];var _0x5b0c27;if(_0x19702f>=_0x34f97c){_0x19702f=_0x34f97c;_0x5b0c27=0xc8;}else{_0x5b0c27=0xce;}_0x2b303a['status'](_0x5b0c27);return _0x2b303a[_0x5fe1('0x24')](_0x5fe1('0x25'),_0x3b54ad+'-'+_0x19702f+'/'+_0x34f97c)[_0x5fe1('0x1f')](_0x465231);}return null;};}function patchUpdates(_0xab22ba){return function(_0x3c790f){try{jsonpatch[_0x5fe1('0x26')](_0x3c790f,_0xab22ba,!![]);}catch(_0x3678e7){return BPromise[_0x5fe1('0x27')](_0x3678e7);}return _0x3c790f['save']();};}function saveUpdates(_0x2ea730,_0x557173){return function(_0x1d62d8){if(_0x1d62d8){return _0x1d62d8[_0x5fe1('0x28')](_0x2ea730)[_0x5fe1('0x29')](function(_0x17dadd){return _0x17dadd;});}return null;};}function removeEntity(_0x49485b,_0x248b89){return function(_0x14b079){if(_0x14b079){return _0x14b079['destroy']()[_0x5fe1('0x29')](function(){var _0x330204=_0x14b079[_0x5fe1('0x2a')]({'plain':!![]});var _0x351004=_0x5fe1('0x2b');return db[_0x5fe1('0x2c')][_0x5fe1('0x2d')]({'where':{'type':_0x351004,'resourceId':_0x330204['id']}})[_0x5fe1('0x29')](function(){return _0x14b079;});})[_0x5fe1('0x29')](function(){_0x49485b['status'](0xcc)[_0x5fe1('0x1e')]();});}};}function handleEntityNotFound(_0x4c74a7,_0x3543c2){return function(_0x3944cd){if(!_0x3944cd){_0x4c74a7[_0x5fe1('0x2e')](0x194);}return _0x3944cd;};}function handleError(_0x1284ec,_0x347799){_0x347799=_0x347799||0x1f4;return function(_0x27e475){logger[_0x5fe1('0x2f')](_0x27e475[_0x5fe1('0x30')]);if(_0x27e475[_0x5fe1('0x31')]){delete _0x27e475[_0x5fe1('0x31')];}_0x1284ec[_0x5fe1('0x1d')](_0x347799)[_0x5fe1('0x32')](_0x27e475);};}exports['index']=function(_0x269ea1,_0x561900){var _0x44a597={},_0x27714a={},_0x42088d={'count':0x0,'rows':[]};var _0x93d2cf=_[_0x5fe1('0x33')](db[_0x5fe1('0x34')]['rawAttributes'],function(_0x5e040d){return{'name':_0x5e040d[_0x5fe1('0x35')],'type':_0x5e040d['type'][_0x5fe1('0x36')]};});_0x27714a[_0x5fe1('0x37')]=_[_0x5fe1('0x33')](_0x93d2cf,_0x5fe1('0x31'));_0x27714a[_0x5fe1('0x38')]=_[_0x5fe1('0x39')](_0x269ea1['query']);_0x27714a['filters']=_['intersection'](_0x27714a[_0x5fe1('0x37')],_0x27714a[_0x5fe1('0x38')]);_0x44a597['attributes']=_[_0x5fe1('0x3a')](_0x27714a['model'],qs[_0x5fe1('0x3b')](_0x269ea1[_0x5fe1('0x38')]['fields']));_0x44a597[_0x5fe1('0x3c')]=_0x44a597[_0x5fe1('0x3c')][_0x5fe1('0x3d')]?_0x44a597[_0x5fe1('0x3c')]:_0x27714a[_0x5fe1('0x37')];if(!_0x269ea1[_0x5fe1('0x38')][_0x5fe1('0x3e')](_0x5fe1('0x3f'))){_0x44a597[_0x5fe1('0x22')]=qs[_0x5fe1('0x22')](_0x269ea1[_0x5fe1('0x38')][_0x5fe1('0x22')]);_0x44a597[_0x5fe1('0x20')]=qs['offset'](_0x269ea1['query']['offset']);}_0x44a597['order']=qs['sort'](_0x269ea1[_0x5fe1('0x38')][_0x5fe1('0x40')]);_0x44a597[_0x5fe1('0x41')]=qs[_0x5fe1('0x42')](_[_0x5fe1('0x43')](_0x269ea1[_0x5fe1('0x38')],_0x27714a[_0x5fe1('0x42')]),_0x93d2cf);if(_0x269ea1['query'][_0x5fe1('0x44')]){_0x44a597[_0x5fe1('0x41')]=_[_0x5fe1('0x45')](_0x44a597[_0x5fe1('0x41')],{'$or':_['map'](_0x93d2cf,function(_0x5c29bf){if(_0x5c29bf[_0x5fe1('0x46')]!==_0x5fe1('0x47')){var _0x57b2af={};_0x57b2af[_0x5c29bf[_0x5fe1('0x31')]]={'$like':'%'+_0x269ea1[_0x5fe1('0x38')][_0x5fe1('0x44')]+'%'};return _0x57b2af;}})});}_0x44a597=_[_0x5fe1('0x45')]({},_0x44a597,_0x269ea1[_0x5fe1('0x48')]);var _0x203867={'where':_0x44a597[_0x5fe1('0x41')]};return db[_0x5fe1('0x34')][_0x5fe1('0x23')](_0x203867)[_0x5fe1('0x29')](function(_0x4debe2){_0x42088d[_0x5fe1('0x23')]=_0x4debe2;if(_0x269ea1[_0x5fe1('0x38')]['includeAll']){_0x44a597[_0x5fe1('0x49')]=[{'all':!![]}];}return db['CmList']['findAll'](_0x44a597);})[_0x5fe1('0x29')](function(_0xddb7d9){_0x42088d[_0x5fe1('0x4a')]=_0xddb7d9;return _0x42088d;})[_0x5fe1('0x29')](respondWithFilteredResult(_0x561900,_0x44a597))['catch'](handleError(_0x561900,null));};exports[_0x5fe1('0x4b')]=function(_0x4bac91,_0x1ec75c){var _0x22afba={'raw':![],'where':{'id':_0x4bac91[_0x5fe1('0x4c')]['id']}},_0x3eca62={};_0x3eca62[_0x5fe1('0x37')]=_['keys'](db[_0x5fe1('0x34')]['rawAttributes']);_0x3eca62[_0x5fe1('0x38')]=_['keys'](_0x4bac91[_0x5fe1('0x38')]);_0x3eca62[_0x5fe1('0x42')]=_[_0x5fe1('0x3a')](_0x3eca62[_0x5fe1('0x37')],_0x3eca62['query']);_0x22afba['attributes']=_['intersection'](_0x3eca62['model'],qs['fields'](_0x4bac91[_0x5fe1('0x38')][_0x5fe1('0x3b')]));_0x22afba['attributes']=_0x22afba[_0x5fe1('0x3c')][_0x5fe1('0x3d')]?_0x22afba[_0x5fe1('0x3c')]:_0x3eca62[_0x5fe1('0x37')];if(_0x4bac91['query']['includeAll']){_0x22afba['include']=[{'all':!![]}];}_0x22afba=_['merge']({},_0x22afba,_0x4bac91[_0x5fe1('0x48')]);return db['CmList'][_0x5fe1('0x4d')](_0x22afba)[_0x5fe1('0x29')](handleEntityNotFound(_0x1ec75c,null))[_0x5fe1('0x29')](respondWithResult(_0x1ec75c,null))['catch'](handleError(_0x1ec75c,null));};exports[_0x5fe1('0x4e')]=function(_0x5b6373,_0x3d964e){return db['CmList']['create'](_0x5b6373[_0x5fe1('0x4f')],{})[_0x5fe1('0x29')](function(_0x48d820){var _0x26307b=_0x5b6373[_0x5fe1('0x50')]['get']({'plain':!![]});if(!_0x26307b)throw new Error(_0x5fe1('0x51'));if(_0x26307b[_0x5fe1('0x52')]==='user'){var _0x28e631=_0x48d820[_0x5fe1('0x2a')]({'plain':!![]});var _0x4a3c99=_0x5fe1('0x2b');return db[_0x5fe1('0x53')][_0x5fe1('0x4d')]({'where':{'name':_0x4a3c99,'userProfileId':_0x26307b['userProfileId']},'raw':!![]})[_0x5fe1('0x29')](function(_0x3cc464){if(_0x3cc464&&_0x3cc464[_0x5fe1('0x54')]===0x0){return db[_0x5fe1('0x2c')]['create']({'name':_0x28e631[_0x5fe1('0x31')],'resourceId':_0x28e631['id'],'type':_0x3cc464['name'],'sectionId':_0x3cc464['id']},{})[_0x5fe1('0x29')](function(){return _0x48d820;});}else{return _0x48d820;}})['catch'](function(_0x2f6308){logger[_0x5fe1('0x2f')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2f6308);throw _0x2f6308;});}return _0x48d820;})['then'](respondWithResult(_0x3d964e,0xc9))['catch'](handleError(_0x3d964e,null));};exports[_0x5fe1('0x28')]=function(_0x447390,_0x37fc17){if(_0x447390[_0x5fe1('0x4f')]['id']){delete _0x447390['body']['id'];}return db[_0x5fe1('0x34')]['find']({'where':{'id':_0x447390[_0x5fe1('0x4c')]['id']}})[_0x5fe1('0x29')](handleEntityNotFound(_0x37fc17,null))[_0x5fe1('0x29')](saveUpdates(_0x447390[_0x5fe1('0x4f')],null))[_0x5fe1('0x29')](respondWithResult(_0x37fc17,null))[_0x5fe1('0x55')](handleError(_0x37fc17,null));};exports[_0x5fe1('0x2d')]=function(_0x394235,_0x2d1e1a){return db['CmList'][_0x5fe1('0x4d')]({'where':{'id':_0x394235['params']['id']}})[_0x5fe1('0x29')](handleEntityNotFound(_0x2d1e1a,null))[_0x5fe1('0x29')](removeEntity(_0x2d1e1a,null))[_0x5fe1('0x55')](handleError(_0x2d1e1a,null));};exports[_0x5fe1('0x56')]=function(_0x210ae2,_0x5b73f9){return db[_0x5fe1('0x34')]['describe']()[_0x5fe1('0x29')](respondWithResult(_0x5b73f9,null))[_0x5fe1('0x55')](handleError(_0x5b73f9,null));};exports[_0x5fe1('0x57')]=function(_0x4bb76d,_0x3ad23c,_0x583fec){if(_0x4bb76d[_0x5fe1('0x4f')]['id']){delete _0x4bb76d[_0x5fe1('0x4f')]['id'];}return db[_0x5fe1('0x34')][_0x5fe1('0x4d')]({'where':{'id':_0x4bb76d[_0x5fe1('0x4c')]['id']}})[_0x5fe1('0x29')](handleEntityNotFound(_0x3ad23c,null))['then'](function(_0x42c63f){if(_0x42c63f){_0x4bb76d[_0x5fe1('0x4f')][_0x5fe1('0x58')]=_0x42c63f['id'];return db[_0x5fe1('0x59')][_0x5fe1('0x4e')](_0x4bb76d[_0x5fe1('0x4f')]);}})[_0x5fe1('0x29')](respondWithResult(_0x3ad23c,null))[_0x5fe1('0x55')](handleError(_0x3ad23c,null));};exports[_0x5fe1('0x5a')]=function(_0x33f7d7,_0x2cf25f,_0x1c75a2){var _0x551222={'raw':![],'where':{}};var _0x3d3853={};var _0x3ba7e4={'count':0x0,'rows':[]};return db[_0x5fe1('0x34')][_0x5fe1('0x5b')]({'where':{'id':_0x33f7d7[_0x5fe1('0x4c')]['id']}})[_0x5fe1('0x29')](handleEntityNotFound(_0x2cf25f,null))[_0x5fe1('0x29')](function(_0x345606){if(_0x345606){_0x3d3853[_0x5fe1('0x37')]=_[_0x5fe1('0x39')](db[_0x5fe1('0x59')][_0x5fe1('0x5c')]);_0x3d3853[_0x5fe1('0x38')]=_['keys'](_0x33f7d7[_0x5fe1('0x38')]);_0x3d3853[_0x5fe1('0x42')]=_['intersection'](_0x3d3853['model'],_0x3d3853['query']);_0x551222[_0x5fe1('0x3c')]=_['intersection'](_0x3d3853[_0x5fe1('0x37')],qs[_0x5fe1('0x3b')](_0x33f7d7['query']['fields']));_0x551222[_0x5fe1('0x3c')]=_0x551222[_0x5fe1('0x3c')][_0x5fe1('0x3d')]?_0x551222['attributes']:_0x3d3853[_0x5fe1('0x37')];if(!_0x33f7d7[_0x5fe1('0x38')][_0x5fe1('0x3e')](_0x5fe1('0x3f'))){_0x551222[_0x5fe1('0x22')]=qs[_0x5fe1('0x22')](_0x33f7d7[_0x5fe1('0x38')][_0x5fe1('0x22')]);_0x551222[_0x5fe1('0x20')]=qs[_0x5fe1('0x20')](_0x33f7d7[_0x5fe1('0x38')][_0x5fe1('0x20')]);}_0x551222[_0x5fe1('0x5d')]=qs[_0x5fe1('0x40')](_0x33f7d7[_0x5fe1('0x38')][_0x5fe1('0x40')]);_0x551222[_0x5fe1('0x41')]=qs[_0x5fe1('0x42')](_[_0x5fe1('0x43')](_0x33f7d7['query'],_0x3d3853['filters']));_0x551222[_0x5fe1('0x41')][_0x5fe1('0x58')]=_0x345606['id'];if(_0x33f7d7[_0x5fe1('0x38')][_0x5fe1('0x44')]){_0x551222['where']=_[_0x5fe1('0x45')](_0x551222['where'],{'$or':_[_0x5fe1('0x33')](_0x551222[_0x5fe1('0x3c')],function(_0x181309){var _0x108dc1={};_0x108dc1[_0x181309]={'$like':'%'+_0x33f7d7['query'][_0x5fe1('0x44')]+'%'};return _0x108dc1;})});}_0x551222=_['merge']({},_0x551222,_0x33f7d7[_0x5fe1('0x48')]);return db['Disposition']['count']({'where':_0x551222['where']})[_0x5fe1('0x29')](function(_0x5ee522){_0x3ba7e4['count']=_0x5ee522;if(_0x33f7d7[_0x5fe1('0x38')]['includeAll']){_0x551222[_0x5fe1('0x49')]=[{'all':!![]}];}return db[_0x5fe1('0x59')][_0x5fe1('0x5e')](_0x551222);})['then'](function(_0x2c8e25){_0x3ba7e4[_0x5fe1('0x4a')]=_0x2c8e25;return _0x3ba7e4;});}})[_0x5fe1('0x29')](respondWithFilteredResult(_0x2cf25f,_0x551222))[_0x5fe1('0x55')](handleError(_0x2cf25f,null));};exports[_0x5fe1('0x5f')]=function(_0x25283f,_0x14233,_0x2f5c08){return db[_0x5fe1('0x34')][_0x5fe1('0x4d')]({'where':{'id':_0x25283f['params']['id']}})[_0x5fe1('0x29')](handleEntityNotFound(_0x14233,null))['then'](function(_0x53ec5f){if(_0x53ec5f){return _0x53ec5f['removeDispositions'](_0x25283f[_0x5fe1('0x38')][_0x5fe1('0x60')]);}})[_0x5fe1('0x29')](respondWithStatusCode(_0x14233,null))[_0x5fe1('0x55')](handleError(_0x14233,null));};exports['addContacts']=function(_0x41590f,_0xd4f22a,_0x2356fb){return db['CmList'][_0x5fe1('0x4d')]({'where':{'id':_0x41590f['params']['id']}})['then'](handleEntityNotFound(_0xd4f22a,null))[_0x5fe1('0x29')](function(_0x53ede5){if(_0x53ede5){var _0x3a389c=[];var _0x44e2ed={'success':[],'errors':[]};return db[_0x5fe1('0x61')][_0x5fe1('0x56')]()[_0x5fe1('0x29')](function(_0x3eec91){if(_0x41590f[_0x5fe1('0x4f')][_0x5fe1('0x62')]&&_[_0x5fe1('0x63')](_0x41590f[_0x5fe1('0x4f')][_0x5fe1('0x62')])){if(_0x41590f['body'][_0x5fe1('0x62')][_0x5fe1('0x3d')]){_0x41590f[_0x5fe1('0x4f')][_0x5fe1('0x62')]=_0x41590f[_0x5fe1('0x4f')][_0x5fe1('0x62')]['join'](';')+';';}else{_0x41590f[_0x5fe1('0x4f')][_0x5fe1('0x62')]=null;}}else{_0x41590f[_0x5fe1('0x4f')][_0x5fe1('0x62')]=null;}if(_0x41590f[_0x5fe1('0x4f')]&&_[_0x5fe1('0x63')](_0x41590f[_0x5fe1('0x4f')])){for(var _0x4e9080=0x0;_0x4e9080<_0x41590f[_0x5fe1('0x4f')]['length'];_0x4e9080+=0x1){_0x41590f[_0x5fe1('0x4f')][_0x4e9080]['ListId']=_0x41590f[_0x5fe1('0x4c')]['id'];_0x3a389c[_0x5fe1('0x64')](_0x41590f[_0x5fe1('0x4f')][_0x4e9080]);}return BPromise[_0x5fe1('0x65')](_0x3a389c,function(_0x54bd69){return db[_0x5fe1('0x61')]['create'](_[_0x5fe1('0x66')](_0x54bd69,['ids','id'])||{},{'fields':_['keys'](_0x3eec91),'raw':!![]})['then'](function(_0x185623){_0x44e2ed[_0x5fe1('0x67')][_0x5fe1('0x64')](_0x185623[_0x5fe1('0x68')]);})[_0x5fe1('0x55')](function(_0x3f6c1a){_0x44e2ed[_0x5fe1('0x69')][_0x5fe1('0x64')]({'data':_0x54bd69,'error':_0x3f6c1a[_0x5fe1('0x6a')]});});})['then'](function(_0x3e9b99){return _0x44e2ed;})[_0x5fe1('0x55')](function(_0x40a409){return _0x40a409;});}else{_0xd4f22a['status'](0x190)['json']({'message':_0x5fe1('0x6b')});}});}})[_0x5fe1('0x29')](respondWithResult(_0xd4f22a,null))[_0x5fe1('0x55')](handleError(_0xd4f22a,null));};exports[_0x5fe1('0x6c')]=function(_0x48544e,_0x272602,_0x5882f3){var _0x51fa44;return db[_0x5fe1('0x34')][_0x5fe1('0x4d')]({'where':{'id':_0x48544e[_0x5fe1('0x4c')]['id']},'include':[{'model':db[_0x5fe1('0x6d')],'as':_0x5fe1('0x6e')}]})['then'](handleEntityNotFound(_0x272602,null))[_0x5fe1('0x29')](function(_0xd7ba8c){if(_0xd7ba8c){_0x51fa44=_0xd7ba8c;return db[_0x5fe1('0x61')][_0x5fe1('0x5c')];}})[_0x5fe1('0x29')](function(_0x2eabc3){if(_0x2eabc3){var _0x3a44a8={};var _0x354f01={};_0x354f01['model']=_['concat'](_[_0x5fe1('0x39')](_0x2eabc3),_[_0x5fe1('0x33')](_0x51fa44[_0x5fe1('0x6e')],function(_0x395afe){return util[_0x5fe1('0x6f')](_0x5fe1('0x70'),_0x395afe['id']);}));_0x354f01['query']=_[_0x5fe1('0x39')](_0x48544e['query']);_0x354f01[_0x5fe1('0x42')]=_[_0x5fe1('0x3a')](_0x354f01[_0x5fe1('0x37')],_0x354f01[_0x5fe1('0x38')]);_0x3a44a8[_0x5fe1('0x3c')]=_[_0x5fe1('0x3a')](_0x354f01[_0x5fe1('0x37')],qs[_0x5fe1('0x3b')](_0x48544e[_0x5fe1('0x38')]['fields']));_0x3a44a8[_0x5fe1('0x3c')]=_0x3a44a8[_0x5fe1('0x3c')][_0x5fe1('0x3d')]?_0x3a44a8[_0x5fe1('0x3c')]:_0x354f01['model'];if(!_0x48544e['query']['hasOwnProperty'](_0x5fe1('0x3f'))){_0x3a44a8[_0x5fe1('0x22')]=qs[_0x5fe1('0x22')](_0x48544e[_0x5fe1('0x38')][_0x5fe1('0x22')]);_0x3a44a8[_0x5fe1('0x20')]=qs['offset'](_0x48544e[_0x5fe1('0x38')]['offset']);}_0x3a44a8['order']=qs[_0x5fe1('0x40')](_0x48544e[_0x5fe1('0x38')][_0x5fe1('0x40')]);_0x3a44a8[_0x5fe1('0x41')]=qs[_0x5fe1('0x42')](_[_0x5fe1('0x43')](_0x48544e[_0x5fe1('0x38')],_0x354f01['filters']));_0x3a44a8[_0x5fe1('0x71')]=!![];if(_0x48544e[_0x5fe1('0x38')]['filter']){_0x3a44a8['where']=_[_0x5fe1('0x45')](_0x3a44a8[_0x5fe1('0x41')],{'$or':_[_0x5fe1('0x33')](_0x3a44a8[_0x5fe1('0x3c')],function(_0xbaae98){var _0x4c0dd5={};_0x4c0dd5[_0xbaae98]={'$like':'%'+_0x48544e[_0x5fe1('0x38')][_0x5fe1('0x44')]+'%'};return _0x4c0dd5;})});}_0x3a44a8=_[_0x5fe1('0x45')]({},_0x3a44a8,_0x48544e['options']);return _0x51fa44['getContacts'](_0x3a44a8);}})[_0x5fe1('0x29')](respondWithResult(_0x272602,null))[_0x5fe1('0x55')](handleError(_0x272602,null));};exports[_0x5fe1('0x72')]=function(_0x3e8da7,_0x250e89,_0x2bd4e3){var _0x36e1bc;var _0x50d69e;var _0x34573d;var _0x162315=_0x3e8da7[_0x5fe1('0x4c')]['id'];csv_results=[];return db[_0x5fe1('0x73')][_0x5fe1('0x5e')]({'attributes':['id',_0x5fe1('0x31')],'raw':!![],'order':[_0x5fe1('0x74')]})['then'](function(_0x3f38d4){_0x36e1bc=_0x3f38d4;var _0x417c97=_[_0x5fe1('0x39')](db[_0x5fe1('0x61')]['rawAttributes']);return db[_0x5fe1('0x6d')][_0x5fe1('0x5e')]({'raw':!![],'attributes':['id','alias']})[_0x5fe1('0x29')](function(_0x37391e){_0x50d69e=_0x37391e;var _0x362d6b=squel[_0x5fe1('0x75')]()[_0x5fe1('0x3b')](_0x417c97)[_0x5fe1('0x76')](_0x5fe1('0x77'),'c')[_0x5fe1('0x41')]('c.ListId\x20=\x20?',_0x162315)['where'](_0x5fe1('0x78'))[_0x5fe1('0x79')]();for(var _0x3a5ac7=0x0;_0x3a5ac7<_0x50d69e['length'];_0x3a5ac7++){_0x362d6b[_0x5fe1('0x7a')](_0x5fe1('0x7b')+_0x50d69e[_0x3a5ac7]['id'],_0x5fe1('0x7c')+_0x50d69e[_0x3a5ac7]['alias']);}for(var _0x3a5ac7=0x0;_0x3a5ac7<_0x36e1bc['length'];_0x3a5ac7++){_0x362d6b[_0x5fe1('0x7a')](squel[_0x5fe1('0x75')]()[_0x5fe1('0x7a')](_0x5fe1('0x7d'))[_0x5fe1('0x76')](_0x5fe1('0x7e'))[_0x5fe1('0x41')](_0x5fe1('0x7f'),_0x36e1bc[_0x3a5ac7]['id'])[_0x5fe1('0x41')]('CmContactId\x20=\x20c.id'),_0x5fe1('0x80')+_0x36e1bc[_0x3a5ac7][_0x5fe1('0x31')]);_0x362d6b[_0x5fe1('0x7a')](squel['select']()[_0x5fe1('0x7a')](_0x5fe1('0x81'))['from'](_0x5fe1('0x7e'))['where'](_0x5fe1('0x7f'),_0x36e1bc[_0x3a5ac7]['id'])[_0x5fe1('0x41')]('CmContactId\x20=\x20c.id'),_0x5fe1('0x82')+_0x36e1bc[_0x3a5ac7][_0x5fe1('0x31')]);}var _0x4abc66=[];_0x4abc66[_0x5fe1('0x64')](_0x362d6b['toString']());BPromise[_0x5fe1('0x65')](_0x4abc66,handleQuery)[_0x5fe1('0x29')](function(_0x4a8569){handleQuery(_0x362d6b[_0x5fe1('0x83')]());var _0x59184c=csv_results[0x0];if(!_[_0x5fe1('0x84')](_0x59184c)){var _0xe3512=toCsv(_0x59184c);var _0x560042=Date[_0x5fe1('0x85')]();fs[_0x5fe1('0x86')](util[_0x5fe1('0x6f')](_0x5fe1('0x87'),_0x162315,_0x560042),_0xe3512);_0x250e89['setHeader'](_0x5fe1('0x88'),_0x5fe1('0x89')+util[_0x5fe1('0x6f')](_0x5fe1('0x8a'),_0x162315,_0x560042));_0x250e89[_0x5fe1('0x8b')]('Content-type','text/csv');return _0x250e89[_0x5fe1('0x8c')](util[_0x5fe1('0x6f')](_0x5fe1('0x87'),_0x162315,_0x560042));}else{return _0x250e89['sendStatus'](0xcc);}});});});};exports[_0x5fe1('0x8d')]=function(_0x5036e1,_0x27da7b,_0xbf5de9){var _0x419d3d;delete _0x5036e1['body']['id'];return db[_0x5fe1('0x34')][_0x5fe1('0x5b')]({'where':{'id':_0x5036e1[_0x5fe1('0x4c')]['id']}})[_0x5fe1('0x29')](handleEntityNotFound(_0x27da7b,null))[_0x5fe1('0x29')](function(_0x1be2c0){if(_0x1be2c0){return db[_0x5fe1('0x8e')][_0x5fe1('0x8f')](function(_0x3022f1){return db[_0x5fe1('0x6d')]['create'](_0x5036e1['body'],{'transaction':_0x3022f1})[_0x5fe1('0x29')](function(_0x2e6069){_0x419d3d=_0x2e6069;return _0x1be2c0['addCustomFields'](_0x2e6069,{'transaction':_0x3022f1});})['then'](function(){var _0x31ba6a={'type':db['Sequelize'][_0x5fe1('0x90')],'transaction':_0x3022f1};switch(_0x5036e1['body'][_0x5fe1('0x46')]){case _0x5fe1('0x91'):_0x31ba6a['type']=db['Sequelize'][_0x5fe1('0x90')];break;case _0x5fe1('0x92'):_0x31ba6a['type']=db[_0x5fe1('0x93')]['INTEGER'];break;case _0x5fe1('0x94'):_0x31ba6a[_0x5fe1('0x46')]=db[_0x5fe1('0x93')][_0x5fe1('0x95')];_0x31ba6a[_0x5fe1('0x96')]=![];break;default:}return db[_0x5fe1('0x8e')][_0x5fe1('0x97')][_0x5fe1('0x98')](_0x5fe1('0x77'),util[_0x5fe1('0x6f')]('cf_%s',_0x419d3d['id']),_0x31ba6a);})[_0x5fe1('0x29')](function(){return _0x419d3d;});});}})[_0x5fe1('0x29')](respondWithResult(_0x27da7b,null))[_0x5fe1('0x55')](handleError(_0x27da7b,null));};exports['getCustomFields']=function(_0x530ade,_0x13e969,_0x48a25d){var _0x1b6b56={};var _0x3f85c0={};var _0x14be26;var _0x452f1;return db[_0x5fe1('0x34')][_0x5fe1('0x5b')]({'where':{'id':_0x530ade[_0x5fe1('0x4c')]['id']}})[_0x5fe1('0x29')](handleEntityNotFound(_0x13e969,null))[_0x5fe1('0x29')](function(_0x271f39){if(_0x271f39){_0x14be26=_0x271f39;_0x3f85c0['model']=_[_0x5fe1('0x39')](db[_0x5fe1('0x6d')]['rawAttributes']);_0x3f85c0['query']=_['keys'](_0x530ade['query']);_0x3f85c0['filters']=_['intersection'](_0x3f85c0[_0x5fe1('0x37')],_0x3f85c0[_0x5fe1('0x38')]);_0x1b6b56[_0x5fe1('0x3c')]=_[_0x5fe1('0x3a')](_0x3f85c0['model'],qs[_0x5fe1('0x3b')](_0x530ade[_0x5fe1('0x38')][_0x5fe1('0x3b')]));_0x1b6b56[_0x5fe1('0x3c')]=_0x1b6b56['attributes'][_0x5fe1('0x3d')]?_0x1b6b56[_0x5fe1('0x3c')]:_0x3f85c0[_0x5fe1('0x37')];_0x1b6b56['order']=qs['sort'](_0x530ade[_0x5fe1('0x38')][_0x5fe1('0x40')]);_0x1b6b56[_0x5fe1('0x41')]=qs[_0x5fe1('0x42')](_[_0x5fe1('0x43')](_0x530ade['query'],_0x3f85c0[_0x5fe1('0x42')]));_0x1b6b56['where']=_[_0x5fe1('0x45')](_0x1b6b56[_0x5fe1('0x41')],{'$or':[{'ListId':_0x271f39['id']},{'ListId':null}]});if(_0x530ade[_0x5fe1('0x38')][_0x5fe1('0x44')]){_0x1b6b56[_0x5fe1('0x41')]=_[_0x5fe1('0x45')](_0x1b6b56[_0x5fe1('0x41')],{'$or':_[_0x5fe1('0x33')](_0x1b6b56[_0x5fe1('0x3c')],function(_0x285254){var _0x47b2cf={};_0x47b2cf[_0x285254]={'$like':'%'+_0x530ade[_0x5fe1('0x38')][_0x5fe1('0x44')]+'%'};return _0x47b2cf;})});}_0x1b6b56=_['merge']({},_0x1b6b56,_0x530ade[_0x5fe1('0x48')]);return db['CmCustomField']['findAndCountAll'](_0x1b6b56);}})[_0x5fe1('0x29')](respondWithResult(_0x13e969,null))['catch'](handleError(_0x13e969,null));};exports[_0x5fe1('0x99')]=function(_0x50b73a,_0x4058d7){return db[_0x5fe1('0x6d')]['findAndCountAll']({'where':{'ListId':null}})[_0x5fe1('0x29')](handleEntityNotFound(_0x4058d7,null))[_0x5fe1('0x29')](function(_0x3923b9){return _0x3923b9;})[_0x5fe1('0x29')](respondWithResult(_0x4058d7,null))[_0x5fe1('0x55')](handleError(_0x4058d7,null));};exports[_0x5fe1('0x9a')]=function(_0x31fade,_0x4aabde,_0xedb953){return db[_0x5fe1('0x34')][_0x5fe1('0x4d')]({'where':{'id':_0x31fade[_0x5fe1('0x4c')]['id']}})['then'](handleEntityNotFound(_0x4aabde,null))[_0x5fe1('0x29')](function(_0x4ebebd){if(_0x4ebebd){return _0x4ebebd[_0x5fe1('0x9a')](_0x31fade[_0x5fe1('0x4f')]['ids'],_[_0x5fe1('0x66')](_0x31fade[_0x5fe1('0x4f')],[_0x5fe1('0x60'),'id'])||{})[_0x5fe1('0x9b')](function(_0x4919d3){for(var _0x1d16b0=0x0;_0x1d16b0<_0x31fade['body'][_0x5fe1('0x60')]['length'];_0x1d16b0+=0x1){socket[_0x5fe1('0x9c')](_0x5fe1('0x9d'),{'UserId':Number(_0x31fade[_0x5fe1('0x4f')][_0x5fe1('0x60')][_0x1d16b0]),'CmListId':Number(_0x31fade['params']['id'])});}return _0x4919d3;});}})[_0x5fe1('0x29')](respondWithResult(_0x4aabde,null))[_0x5fe1('0x55')](handleError(_0x4aabde,null));};exports[_0x5fe1('0x9e')]=function(_0x498fd9,_0x1e0e35,_0x1b5b4c){return db[_0x5fe1('0x34')][_0x5fe1('0x4d')]({'where':{'id':_0x498fd9[_0x5fe1('0x4c')]['id']}})[_0x5fe1('0x29')](handleEntityNotFound(_0x1e0e35,null))['then'](function(_0x2694b7){if(_0x2694b7){return _0x2694b7[_0x5fe1('0x9e')](_0x498fd9[_0x5fe1('0x38')][_0x5fe1('0x60')])['then'](function(){if(_[_0x5fe1('0x63')](_0x498fd9[_0x5fe1('0x38')]['ids'])){for(var _0x4c7160=0x0;_0x4c7160<_0x498fd9['query']['ids'][_0x5fe1('0x3d')];_0x4c7160+=0x1){socket[_0x5fe1('0x9c')](_0x5fe1('0x9f'),{'UserId':Number(_0x498fd9['query'][_0x5fe1('0x60')][_0x4c7160]),'CmListId':Number(_0x498fd9[_0x5fe1('0x4c')]['id'])});}}else{socket[_0x5fe1('0x9c')]('userCmList:remove',{'UserId':Number(_0x498fd9[_0x5fe1('0x38')][_0x5fe1('0x60')]),'CmListId':Number(_0x498fd9[_0x5fe1('0x4c')]['id'])});}});}})['then'](respondWithStatusCode(_0x1e0e35,null))[_0x5fe1('0x55')](handleError(_0x1e0e35,null));};exports[_0x5fe1('0xa0')]=function(_0x1b8277,_0x30f43f,_0x4071a8){var _0x4e8876={};var _0x2bd2d2={};var _0x115f4c;var _0x17a93d;return db[_0x5fe1('0x34')][_0x5fe1('0x5b')]({'where':{'id':_0x1b8277[_0x5fe1('0x4c')]['id']}})[_0x5fe1('0x29')](handleEntityNotFound(_0x30f43f,null))['then'](function(_0x5dfad3){if(_0x5dfad3){_0x115f4c=_0x5dfad3;_0x2bd2d2[_0x5fe1('0x37')]=_[_0x5fe1('0x39')](db[_0x5fe1('0xa1')][_0x5fe1('0x5c')]);_0x2bd2d2[_0x5fe1('0x38')]=_[_0x5fe1('0x39')](_0x1b8277[_0x5fe1('0x38')]);_0x2bd2d2['filters']=_[_0x5fe1('0x3a')](_0x2bd2d2['model'],_0x2bd2d2[_0x5fe1('0x38')]);_0x4e8876[_0x5fe1('0x3c')]=_[_0x5fe1('0x3a')](_0x2bd2d2[_0x5fe1('0x37')],qs[_0x5fe1('0x3b')](_0x1b8277[_0x5fe1('0x38')][_0x5fe1('0x3b')]));_0x4e8876['attributes']=_0x4e8876[_0x5fe1('0x3c')][_0x5fe1('0x3d')]?_0x4e8876[_0x5fe1('0x3c')]:_0x2bd2d2[_0x5fe1('0x37')];_0x4e8876[_0x5fe1('0x5d')]=qs['sort'](_0x1b8277['query'][_0x5fe1('0x40')]);_0x4e8876['where']=qs[_0x5fe1('0x42')](_['pick'](_0x1b8277['query'],_0x2bd2d2[_0x5fe1('0x42')]));if(_0x1b8277[_0x5fe1('0x38')][_0x5fe1('0x44')]){_0x4e8876[_0x5fe1('0x41')]=_[_0x5fe1('0x45')](_0x4e8876[_0x5fe1('0x41')],{'$or':_[_0x5fe1('0x33')](_0x4e8876[_0x5fe1('0x3c')],function(_0x34a071){var _0x32e19c={};_0x32e19c[_0x34a071]={'$like':'%'+_0x1b8277[_0x5fe1('0x38')][_0x5fe1('0x44')]+'%'};return _0x32e19c;})});}_0x4e8876=_[_0x5fe1('0x45')]({},_0x4e8876,_0x1b8277[_0x5fe1('0x48')]);return _0x115f4c[_0x5fe1('0xa0')](_0x4e8876);}})[_0x5fe1('0x29')](function(_0x58ea66){if(_0x58ea66){_0x17a93d=_0x58ea66[_0x5fe1('0x3d')];if(!_0x1b8277[_0x5fe1('0x38')][_0x5fe1('0x3e')](_0x5fe1('0x3f'))){_0x4e8876[_0x5fe1('0x22')]=qs[_0x5fe1('0x22')](_0x1b8277[_0x5fe1('0x38')]['limit']);_0x4e8876[_0x5fe1('0x20')]=qs[_0x5fe1('0x20')](_0x1b8277[_0x5fe1('0x38')]['offset']);}return _0x115f4c['getAgents'](_0x4e8876);}})[_0x5fe1('0x29')](function(_0xe712e9){if(_0xe712e9){return _0xe712e9?{'count':_0x17a93d,'rows':_0xe712e9}:null;}})[_0x5fe1('0x29')](respondWithResult(_0x30f43f,null))[_0x5fe1('0x55')](handleError(_0x30f43f,null));};function handleQuery(_0x27b8c0){logger[_0x5fe1('0xa2')](_0x27b8c0);return db[_0x5fe1('0x8e')]['query'](_0x27b8c0)['spread'](function(_0x262121){csv_results[_0x5fe1('0x64')](_0x262121);})['catch'](function(_0x381013){logger[_0x5fe1('0x2f')](_0x381013[_0x5fe1('0x6a')]);});}
\ No newline at end of file
+var _0x4321=['User','getAgents','info','eml-format','rimraf','zip-dir','request-promise','moment','mustache','to-csv','ejs','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/license/util','../../mysqldb','defaults','localhost','redis','./cmList.socket','register','sendStatus','status','json','offset','undefined','limit','count','Content-Range','apply','reject','save','then','get','Lists','destroy','end','error','name','send','index','map','rawAttributes','type','key','model','query','intersection','attributes','fields','length','hasOwnProperty','order','where','filters','merge','VIRTUAL','filter','options','CmList','includeAll','include','findAll','rows','catch','show','keys','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','describe','addDisposition','ListId','Disposition','getDispositions','findOne','nolimit','sort','pick','removeDispositions','ids','addContacts','tags','isArray','each','CmContact','omit','push','dataValues','errors','message','Malformed\x20request\x20syntax','getContacts','CustomFields','concat','format','cf_%d','raw','getContactsCsv','ContactItemType','OrderBy','alias','select','from','c.ListId\x20=\x20?','c.deletedAt\x20is\x20null','distinct','field','c.cf_','customField_','item','cm_contact_has_items','ItemTypeId\x20=\x20?','CmContactId\x20=\x20c.id','toString','now','writeFileSync','/tmp/list_%d_%s.csv','setHeader','Content-disposition','attachment;\x20filename=','list_%d_%s.csv','download','addCustomField','sequelize','CmCustomField','addCustomFields','Sequelize','TEXT','text','number','INTEGER','switch','BOOLEAN','queryInterface','cm_contacts','getCustomFields','findAndCountAll','getGlobalCustomFields','addAgents','spread','emit','userCmList:save','removeAgents'];(function(_0x502b93,_0x25b04b){var _0x337691=function(_0x4b16e1){while(--_0x4b16e1){_0x502b93['push'](_0x502b93['shift']());}};_0x337691(++_0x25b04b);}(_0x4321,0x13d));var _0x1432=function(_0x3f1a86,_0x1f0dcc){_0x3f1a86=_0x3f1a86-0x0;var _0x518844=_0x4321[_0x3f1a86];return _0x518844;};'use strict';var emlformat=require(_0x1432('0x0'));var rimraf=require(_0x1432('0x1'));var zipdir=require(_0x1432('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x1432('0x3'));var moment=require(_0x1432('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x1432('0x5'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x1432('0x6'));var ejs=require(_0x1432('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require(_0x1432('0x8'));var jsforce=require('jsforce');var deskjs=require(_0x1432('0x9'));var toCsv=require(_0x1432('0x6'));var querystring=require('querystring');var Papa=require(_0x1432('0xa'));var Redis=require(_0x1432('0xb'));var authService=require(_0x1432('0xc'));var qs=require('../../components/parsers/qs');var as=require(_0x1432('0xd'));var hardwareService=require(_0x1432('0xe'));var logger=require('../../config/logger')(_0x1432('0xf'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x1432('0x10'));var db=require(_0x1432('0x11'))['db'];var csv_results;config['redis']=_[_0x1432('0x12')](config['redis'],{'host':_0x1432('0x13'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x1432('0x14')]));require(_0x1432('0x15'))[_0x1432('0x16')](socket);function respondWithStatusCode(_0x4a9973,_0x557e20){_0x557e20=_0x557e20||0xcc;return function(_0x5ada0d){if(_0x5ada0d){return _0x4a9973[_0x1432('0x17')](_0x557e20);}return _0x4a9973[_0x1432('0x18')](_0x557e20)['end']();};}function respondWithResult(_0xcd826f,_0x33c43b){_0x33c43b=_0x33c43b||0xc8;return function(_0xa7bf6a){if(_0xa7bf6a){return _0xcd826f['status'](_0x33c43b)[_0x1432('0x19')](_0xa7bf6a);}};}function respondWithFilteredResult(_0x3f6a5d,_0x169742){return function(_0x13dc6){if(_0x13dc6){var _0x26a552=typeof _0x169742[_0x1432('0x1a')]===_0x1432('0x1b')&&typeof _0x169742[_0x1432('0x1c')]===_0x1432('0x1b');var _0x2cf899=_0x13dc6[_0x1432('0x1d')];var _0x126bbd=_0x26a552?0x0:_0x169742['offset'];var _0x142f91=_0x26a552?_0x13dc6[_0x1432('0x1d')]:_0x169742[_0x1432('0x1a')]+_0x169742[_0x1432('0x1c')];var _0x2208b2;if(_0x142f91>=_0x2cf899){_0x142f91=_0x2cf899;_0x2208b2=0xc8;}else{_0x2208b2=0xce;}_0x3f6a5d[_0x1432('0x18')](_0x2208b2);return _0x3f6a5d['set'](_0x1432('0x1e'),_0x126bbd+'-'+_0x142f91+'/'+_0x2cf899)[_0x1432('0x19')](_0x13dc6);}return null;};}function patchUpdates(_0x482914){return function(_0x1c71ed){try{jsonpatch[_0x1432('0x1f')](_0x1c71ed,_0x482914,!![]);}catch(_0x190fca){return BPromise[_0x1432('0x20')](_0x190fca);}return _0x1c71ed[_0x1432('0x21')]();};}function saveUpdates(_0xa1c73a,_0x25f468){return function(_0x5dc41c){if(_0x5dc41c){return _0x5dc41c['update'](_0xa1c73a)[_0x1432('0x22')](function(_0x469505){return _0x469505;});}return null;};}function removeEntity(_0x3aefb1,_0x75b796){return function(_0xb84d31){if(_0xb84d31){return _0xb84d31['destroy']()['then'](function(){var _0x26197f=_0xb84d31[_0x1432('0x23')]({'plain':!![]});var _0x3c76ca=_0x1432('0x24');return db['UserProfileResource'][_0x1432('0x25')]({'where':{'type':_0x3c76ca,'resourceId':_0x26197f['id']}})[_0x1432('0x22')](function(){return _0xb84d31;});})[_0x1432('0x22')](function(){_0x3aefb1['status'](0xcc)[_0x1432('0x26')]();});}};}function handleEntityNotFound(_0x3212c4,_0x3c24eb){return function(_0x477cbd){if(!_0x477cbd){_0x3212c4[_0x1432('0x17')](0x194);}return _0x477cbd;};}function handleError(_0x49ff25,_0x42128e){_0x42128e=_0x42128e||0x1f4;return function(_0x59046f){logger[_0x1432('0x27')](_0x59046f['stack']);if(_0x59046f[_0x1432('0x28')]){delete _0x59046f['name'];}_0x49ff25[_0x1432('0x18')](_0x42128e)[_0x1432('0x29')](_0x59046f);};}exports[_0x1432('0x2a')]=function(_0x353a3d,_0x398f57){var _0x497a6b={},_0x527241={},_0x391a3c={'count':0x0,'rows':[]};var _0x3175d2=_[_0x1432('0x2b')](db['CmList'][_0x1432('0x2c')],function(_0x174786){return{'name':_0x174786['fieldName'],'type':_0x174786[_0x1432('0x2d')][_0x1432('0x2e')]};});_0x527241[_0x1432('0x2f')]=_['map'](_0x3175d2,_0x1432('0x28'));_0x527241['query']=_['keys'](_0x353a3d[_0x1432('0x30')]);_0x527241['filters']=_[_0x1432('0x31')](_0x527241[_0x1432('0x2f')],_0x527241[_0x1432('0x30')]);_0x497a6b[_0x1432('0x32')]=_[_0x1432('0x31')](_0x527241[_0x1432('0x2f')],qs[_0x1432('0x33')](_0x353a3d[_0x1432('0x30')]['fields']));_0x497a6b[_0x1432('0x32')]=_0x497a6b[_0x1432('0x32')][_0x1432('0x34')]?_0x497a6b[_0x1432('0x32')]:_0x527241[_0x1432('0x2f')];if(!_0x353a3d[_0x1432('0x30')][_0x1432('0x35')]('nolimit')){_0x497a6b['limit']=qs[_0x1432('0x1c')](_0x353a3d[_0x1432('0x30')][_0x1432('0x1c')]);_0x497a6b[_0x1432('0x1a')]=qs[_0x1432('0x1a')](_0x353a3d[_0x1432('0x30')][_0x1432('0x1a')]);}_0x497a6b[_0x1432('0x36')]=qs['sort'](_0x353a3d[_0x1432('0x30')]['sort']);_0x497a6b[_0x1432('0x37')]=qs[_0x1432('0x38')](_['pick'](_0x353a3d[_0x1432('0x30')],_0x527241['filters']),_0x3175d2);if(_0x353a3d['query']['filter']){_0x497a6b[_0x1432('0x37')]=_[_0x1432('0x39')](_0x497a6b[_0x1432('0x37')],{'$or':_[_0x1432('0x2b')](_0x3175d2,function(_0x5367cb){if(_0x5367cb[_0x1432('0x2d')]!==_0x1432('0x3a')){var _0x33e6e6={};_0x33e6e6[_0x5367cb[_0x1432('0x28')]]={'$like':'%'+_0x353a3d['query'][_0x1432('0x3b')]+'%'};return _0x33e6e6;}})});}_0x497a6b=_[_0x1432('0x39')]({},_0x497a6b,_0x353a3d[_0x1432('0x3c')]);var _0x5dd679={'where':_0x497a6b[_0x1432('0x37')]};return db[_0x1432('0x3d')][_0x1432('0x1d')](_0x5dd679)[_0x1432('0x22')](function(_0xda864d){_0x391a3c[_0x1432('0x1d')]=_0xda864d;if(_0x353a3d['query'][_0x1432('0x3e')]){_0x497a6b[_0x1432('0x3f')]=[{'all':!![]}];}return db[_0x1432('0x3d')][_0x1432('0x40')](_0x497a6b);})[_0x1432('0x22')](function(_0x11e6dc){_0x391a3c[_0x1432('0x41')]=_0x11e6dc;return _0x391a3c;})[_0x1432('0x22')](respondWithFilteredResult(_0x398f57,_0x497a6b))[_0x1432('0x42')](handleError(_0x398f57,null));};exports[_0x1432('0x43')]=function(_0x66726c,_0x1d7eae){var _0x1e6639={'raw':![],'where':{'id':_0x66726c['params']['id']}},_0x2525d2={};_0x2525d2[_0x1432('0x2f')]=_['keys'](db['CmList'][_0x1432('0x2c')]);_0x2525d2['query']=_[_0x1432('0x44')](_0x66726c[_0x1432('0x30')]);_0x2525d2['filters']=_[_0x1432('0x31')](_0x2525d2[_0x1432('0x2f')],_0x2525d2['query']);_0x1e6639[_0x1432('0x32')]=_[_0x1432('0x31')](_0x2525d2[_0x1432('0x2f')],qs[_0x1432('0x33')](_0x66726c[_0x1432('0x30')][_0x1432('0x33')]));_0x1e6639[_0x1432('0x32')]=_0x1e6639[_0x1432('0x32')][_0x1432('0x34')]?_0x1e6639[_0x1432('0x32')]:_0x2525d2['model'];if(_0x66726c['query'][_0x1432('0x3e')]){_0x1e6639[_0x1432('0x3f')]=[{'all':!![]}];}_0x1e6639=_[_0x1432('0x39')]({},_0x1e6639,_0x66726c[_0x1432('0x3c')]);return db[_0x1432('0x3d')][_0x1432('0x45')](_0x1e6639)[_0x1432('0x22')](handleEntityNotFound(_0x1d7eae,null))['then'](respondWithResult(_0x1d7eae,null))[_0x1432('0x42')](handleError(_0x1d7eae,null));};exports['create']=function(_0x907fbb,_0x5bb6db){return db[_0x1432('0x3d')][_0x1432('0x46')](_0x907fbb[_0x1432('0x47')],{})['then'](function(_0x50ebfd){var _0x34f244=_0x907fbb[_0x1432('0x48')][_0x1432('0x23')]({'plain':!![]});if(!_0x34f244)throw new Error(_0x1432('0x49'));if(_0x34f244[_0x1432('0x4a')]===_0x1432('0x48')){var _0x3f882f=_0x50ebfd[_0x1432('0x23')]({'plain':!![]});var _0x395631=_0x1432('0x24');return db['UserProfileSection']['find']({'where':{'name':_0x395631,'userProfileId':_0x34f244[_0x1432('0x4b')]},'raw':!![]})[_0x1432('0x22')](function(_0x4395c0){if(_0x4395c0&&_0x4395c0[_0x1432('0x4c')]===0x0){return db[_0x1432('0x4d')][_0x1432('0x46')]({'name':_0x3f882f[_0x1432('0x28')],'resourceId':_0x3f882f['id'],'type':_0x4395c0['name'],'sectionId':_0x4395c0['id']},{})[_0x1432('0x22')](function(){return _0x50ebfd;});}else{return _0x50ebfd;}})[_0x1432('0x42')](function(_0x12e7c2){logger[_0x1432('0x27')](_0x1432('0x4e'),_0x12e7c2);throw _0x12e7c2;});}return _0x50ebfd;})[_0x1432('0x22')](respondWithResult(_0x5bb6db,0xc9))['catch'](handleError(_0x5bb6db,null));};exports['update']=function(_0x117b76,_0x2f970f){if(_0x117b76['body']['id']){delete _0x117b76[_0x1432('0x47')]['id'];}return db[_0x1432('0x3d')]['find']({'where':{'id':_0x117b76['params']['id']}})['then'](handleEntityNotFound(_0x2f970f,null))[_0x1432('0x22')](saveUpdates(_0x117b76[_0x1432('0x47')],null))[_0x1432('0x22')](respondWithResult(_0x2f970f,null))[_0x1432('0x42')](handleError(_0x2f970f,null));};exports[_0x1432('0x25')]=function(_0x2c1550,_0x184dfe){return db[_0x1432('0x3d')][_0x1432('0x45')]({'where':{'id':_0x2c1550[_0x1432('0x4f')]['id']}})[_0x1432('0x22')](handleEntityNotFound(_0x184dfe,null))[_0x1432('0x22')](removeEntity(_0x184dfe,null))[_0x1432('0x42')](handleError(_0x184dfe,null));};exports['describe']=function(_0x262730,_0x47c4fe){return db['CmList'][_0x1432('0x50')]()[_0x1432('0x22')](respondWithResult(_0x47c4fe,null))['catch'](handleError(_0x47c4fe,null));};exports[_0x1432('0x51')]=function(_0x27bc8d,_0x2bdc25,_0x1ec924){if(_0x27bc8d['body']['id']){delete _0x27bc8d[_0x1432('0x47')]['id'];}return db[_0x1432('0x3d')]['find']({'where':{'id':_0x27bc8d['params']['id']}})['then'](handleEntityNotFound(_0x2bdc25,null))[_0x1432('0x22')](function(_0x32c5f0){if(_0x32c5f0){_0x27bc8d['body'][_0x1432('0x52')]=_0x32c5f0['id'];return db[_0x1432('0x53')][_0x1432('0x46')](_0x27bc8d[_0x1432('0x47')]);}})[_0x1432('0x22')](respondWithResult(_0x2bdc25,null))[_0x1432('0x42')](handleError(_0x2bdc25,null));};exports[_0x1432('0x54')]=function(_0x23c04a,_0x3ee5f6,_0x271941){var _0x394711={'raw':![],'where':{}};var _0x3b7bb8={};var _0x1fbe0e={'count':0x0,'rows':[]};return db[_0x1432('0x3d')][_0x1432('0x55')]({'where':{'id':_0x23c04a[_0x1432('0x4f')]['id']}})[_0x1432('0x22')](handleEntityNotFound(_0x3ee5f6,null))[_0x1432('0x22')](function(_0x49fd01){if(_0x49fd01){_0x3b7bb8['model']=_[_0x1432('0x44')](db[_0x1432('0x53')][_0x1432('0x2c')]);_0x3b7bb8[_0x1432('0x30')]=_[_0x1432('0x44')](_0x23c04a[_0x1432('0x30')]);_0x3b7bb8[_0x1432('0x38')]=_['intersection'](_0x3b7bb8[_0x1432('0x2f')],_0x3b7bb8[_0x1432('0x30')]);_0x394711[_0x1432('0x32')]=_[_0x1432('0x31')](_0x3b7bb8[_0x1432('0x2f')],qs[_0x1432('0x33')](_0x23c04a[_0x1432('0x30')]['fields']));_0x394711['attributes']=_0x394711[_0x1432('0x32')]['length']?_0x394711[_0x1432('0x32')]:_0x3b7bb8[_0x1432('0x2f')];if(!_0x23c04a[_0x1432('0x30')]['hasOwnProperty'](_0x1432('0x56'))){_0x394711[_0x1432('0x1c')]=qs[_0x1432('0x1c')](_0x23c04a[_0x1432('0x30')][_0x1432('0x1c')]);_0x394711[_0x1432('0x1a')]=qs[_0x1432('0x1a')](_0x23c04a[_0x1432('0x30')][_0x1432('0x1a')]);}_0x394711['order']=qs[_0x1432('0x57')](_0x23c04a['query'][_0x1432('0x57')]);_0x394711['where']=qs[_0x1432('0x38')](_[_0x1432('0x58')](_0x23c04a[_0x1432('0x30')],_0x3b7bb8[_0x1432('0x38')]));_0x394711[_0x1432('0x37')][_0x1432('0x52')]=_0x49fd01['id'];if(_0x23c04a[_0x1432('0x30')]['filter']){_0x394711['where']=_[_0x1432('0x39')](_0x394711[_0x1432('0x37')],{'$or':_[_0x1432('0x2b')](_0x394711[_0x1432('0x32')],function(_0xc39784){var _0x4da697={};_0x4da697[_0xc39784]={'$like':'%'+_0x23c04a[_0x1432('0x30')][_0x1432('0x3b')]+'%'};return _0x4da697;})});}_0x394711=_['merge']({},_0x394711,_0x23c04a['options']);return db[_0x1432('0x53')][_0x1432('0x1d')]({'where':_0x394711['where']})[_0x1432('0x22')](function(_0x33b6e3){_0x1fbe0e[_0x1432('0x1d')]=_0x33b6e3;if(_0x23c04a[_0x1432('0x30')][_0x1432('0x3e')]){_0x394711['include']=[{'all':!![]}];}return db['Disposition'][_0x1432('0x40')](_0x394711);})['then'](function(_0x57958b){_0x1fbe0e[_0x1432('0x41')]=_0x57958b;return _0x1fbe0e;});}})[_0x1432('0x22')](respondWithFilteredResult(_0x3ee5f6,_0x394711))['catch'](handleError(_0x3ee5f6,null));};exports[_0x1432('0x59')]=function(_0x8252c3,_0x1124a2,_0x5729ab){return db[_0x1432('0x3d')][_0x1432('0x45')]({'where':{'id':_0x8252c3['params']['id']}})[_0x1432('0x22')](handleEntityNotFound(_0x1124a2,null))['then'](function(_0x320d36){if(_0x320d36){return _0x320d36[_0x1432('0x59')](_0x8252c3[_0x1432('0x30')][_0x1432('0x5a')]);}})[_0x1432('0x22')](respondWithStatusCode(_0x1124a2,null))['catch'](handleError(_0x1124a2,null));};exports[_0x1432('0x5b')]=function(_0x362ab1,_0x185f8e,_0x4db5eb){return db[_0x1432('0x3d')][_0x1432('0x45')]({'where':{'id':_0x362ab1[_0x1432('0x4f')]['id']}})[_0x1432('0x22')](handleEntityNotFound(_0x185f8e,null))['then'](function(_0xc7e25e){if(_0xc7e25e){var _0x343cbc=[];var _0x275161={'success':[],'errors':[]};return db['CmContact'][_0x1432('0x50')]()[_0x1432('0x22')](function(_0x1e3259){if(_0x362ab1[_0x1432('0x47')][_0x1432('0x5c')]&&_[_0x1432('0x5d')](_0x362ab1[_0x1432('0x47')][_0x1432('0x5c')])){if(_0x362ab1['body'][_0x1432('0x5c')][_0x1432('0x34')]){_0x362ab1['body']['tags']=_0x362ab1[_0x1432('0x47')][_0x1432('0x5c')]['join'](';')+';';}else{_0x362ab1['body'][_0x1432('0x5c')]=null;}}else{_0x362ab1[_0x1432('0x47')][_0x1432('0x5c')]=null;}if(_0x362ab1[_0x1432('0x47')]&&_[_0x1432('0x5d')](_0x362ab1[_0x1432('0x47')])){for(var _0x16eab1=0x0;_0x16eab1<_0x362ab1[_0x1432('0x47')]['length'];_0x16eab1+=0x1){_0x362ab1[_0x1432('0x47')][_0x16eab1][_0x1432('0x52')]=_0x362ab1['params']['id'];_0x343cbc['push'](_0x362ab1[_0x1432('0x47')][_0x16eab1]);}return BPromise[_0x1432('0x5e')](_0x343cbc,function(_0x100aca){return db[_0x1432('0x5f')][_0x1432('0x46')](_[_0x1432('0x60')](_0x100aca,['ids','id'])||{},{'fields':_['keys'](_0x1e3259),'raw':!![]})['then'](function(_0x116229){_0x275161['success'][_0x1432('0x61')](_0x116229[_0x1432('0x62')]);})[_0x1432('0x42')](function(_0x1c5fc2){_0x275161[_0x1432('0x63')][_0x1432('0x61')]({'data':_0x100aca,'error':_0x1c5fc2[_0x1432('0x64')]});});})[_0x1432('0x22')](function(_0x14f0c3){return _0x275161;})[_0x1432('0x42')](function(_0xcbc846){return _0xcbc846;});}else{_0x185f8e[_0x1432('0x18')](0x190)['json']({'message':_0x1432('0x65')});}});}})[_0x1432('0x22')](respondWithResult(_0x185f8e,null))[_0x1432('0x42')](handleError(_0x185f8e,null));};exports[_0x1432('0x66')]=function(_0x51d93f,_0x402a5c,_0x17b4e0){var _0x3e4010;return db[_0x1432('0x3d')][_0x1432('0x45')]({'where':{'id':_0x51d93f[_0x1432('0x4f')]['id']},'include':[{'model':db['CmCustomField'],'as':_0x1432('0x67')}]})[_0x1432('0x22')](handleEntityNotFound(_0x402a5c,null))[_0x1432('0x22')](function(_0x5d720a){if(_0x5d720a){_0x3e4010=_0x5d720a;return db['CmContact']['rawAttributes'];}})[_0x1432('0x22')](function(_0x559426){if(_0x559426){var _0x5bef2c={};var _0xaa073e={};_0xaa073e[_0x1432('0x2f')]=_[_0x1432('0x68')](_[_0x1432('0x44')](_0x559426),_[_0x1432('0x2b')](_0x3e4010['CustomFields'],function(_0x36c275){return util[_0x1432('0x69')](_0x1432('0x6a'),_0x36c275['id']);}));_0xaa073e['query']=_[_0x1432('0x44')](_0x51d93f[_0x1432('0x30')]);_0xaa073e[_0x1432('0x38')]=_['intersection'](_0xaa073e['model'],_0xaa073e[_0x1432('0x30')]);_0x5bef2c[_0x1432('0x32')]=_[_0x1432('0x31')](_0xaa073e['model'],qs[_0x1432('0x33')](_0x51d93f['query'][_0x1432('0x33')]));_0x5bef2c[_0x1432('0x32')]=_0x5bef2c[_0x1432('0x32')][_0x1432('0x34')]?_0x5bef2c[_0x1432('0x32')]:_0xaa073e['model'];if(!_0x51d93f['query'][_0x1432('0x35')]('nolimit')){_0x5bef2c[_0x1432('0x1c')]=qs['limit'](_0x51d93f['query'][_0x1432('0x1c')]);_0x5bef2c['offset']=qs[_0x1432('0x1a')](_0x51d93f[_0x1432('0x30')][_0x1432('0x1a')]);}_0x5bef2c['order']=qs['sort'](_0x51d93f[_0x1432('0x30')]['sort']);_0x5bef2c[_0x1432('0x37')]=qs[_0x1432('0x38')](_[_0x1432('0x58')](_0x51d93f[_0x1432('0x30')],_0xaa073e[_0x1432('0x38')]));_0x5bef2c[_0x1432('0x6b')]=!![];if(_0x51d93f[_0x1432('0x30')]['filter']){_0x5bef2c[_0x1432('0x37')]=_['merge'](_0x5bef2c['where'],{'$or':_['map'](_0x5bef2c['attributes'],function(_0x63d195){var _0x36d5df={};_0x36d5df[_0x63d195]={'$like':'%'+_0x51d93f['query'][_0x1432('0x3b')]+'%'};return _0x36d5df;})});}_0x5bef2c=_[_0x1432('0x39')]({},_0x5bef2c,_0x51d93f[_0x1432('0x3c')]);return _0x3e4010[_0x1432('0x66')](_0x5bef2c);}})['then'](respondWithResult(_0x402a5c,null))[_0x1432('0x42')](handleError(_0x402a5c,null));};exports[_0x1432('0x6c')]=function(_0x490c95,_0x5cab93,_0x5cecc8){var _0x5b829d;var _0x1e05d9;var _0x5b455e;var _0x176689=_0x490c95[_0x1432('0x4f')]['id'];csv_results=[];return db[_0x1432('0x6d')][_0x1432('0x40')]({'attributes':['id',_0x1432('0x28')],'raw':!![],'order':[_0x1432('0x6e')]})[_0x1432('0x22')](function(_0x15f78f){_0x5b829d=_0x15f78f;var _0x10333e=_[_0x1432('0x44')](db[_0x1432('0x5f')]['rawAttributes']);return db['CmCustomField'][_0x1432('0x40')]({'raw':!![],'attributes':['id',_0x1432('0x6f')]})[_0x1432('0x22')](function(_0x5eb062){_0x1e05d9=_0x5eb062;var _0x265954=squel[_0x1432('0x70')]()[_0x1432('0x33')](_0x10333e)[_0x1432('0x71')]('cm_contacts','c')[_0x1432('0x37')](_0x1432('0x72'),_0x176689)[_0x1432('0x37')](_0x1432('0x73'))[_0x1432('0x74')]();for(var _0x2d8361=0x0;_0x2d8361<_0x1e05d9[_0x1432('0x34')];_0x2d8361++){_0x265954[_0x1432('0x75')](_0x1432('0x76')+_0x1e05d9[_0x2d8361]['id'],_0x1432('0x77')+_0x1e05d9[_0x2d8361]['alias']);}for(var _0x2d8361=0x0;_0x2d8361<_0x5b829d[_0x1432('0x34')];_0x2d8361++){_0x265954[_0x1432('0x75')](squel[_0x1432('0x70')]()[_0x1432('0x75')](_0x1432('0x78'))[_0x1432('0x71')](_0x1432('0x79'))[_0x1432('0x37')](_0x1432('0x7a'),_0x5b829d[_0x2d8361]['id'])[_0x1432('0x37')](_0x1432('0x7b')),'additionalPhone_'+_0x5b829d[_0x2d8361][_0x1432('0x28')]);_0x265954[_0x1432('0x75')](squel[_0x1432('0x70')]()['field']('description')['from']('cm_contact_has_items')[_0x1432('0x37')](_0x1432('0x7a'),_0x5b829d[_0x2d8361]['id'])[_0x1432('0x37')]('CmContactId\x20=\x20c.id'),'description_additionalPhone_'+_0x5b829d[_0x2d8361][_0x1432('0x28')]);}var _0x43caa4=[];_0x43caa4['push'](_0x265954[_0x1432('0x7c')]());BPromise[_0x1432('0x5e')](_0x43caa4,handleQuery)['then'](function(_0x55c1aa){handleQuery(_0x265954[_0x1432('0x7c')]());var _0x2ca3f8=csv_results[0x0];if(!_['isEmpty'](_0x2ca3f8)){var _0x2182e7=toCsv(_0x2ca3f8);var _0x39d623=Date[_0x1432('0x7d')]();fs[_0x1432('0x7e')](util[_0x1432('0x69')](_0x1432('0x7f'),_0x176689,_0x39d623),_0x2182e7);_0x5cab93[_0x1432('0x80')](_0x1432('0x81'),_0x1432('0x82')+util[_0x1432('0x69')](_0x1432('0x83'),_0x176689,_0x39d623));_0x5cab93[_0x1432('0x80')]('Content-type','text/csv');return _0x5cab93[_0x1432('0x84')](util[_0x1432('0x69')](_0x1432('0x7f'),_0x176689,_0x39d623));}else{return _0x5cab93[_0x1432('0x17')](0xcc);}});});});};exports[_0x1432('0x85')]=function(_0x205c98,_0x13238a,_0x1f61f7){var _0x4db282;delete _0x205c98[_0x1432('0x47')]['id'];return db[_0x1432('0x3d')][_0x1432('0x55')]({'where':{'id':_0x205c98[_0x1432('0x4f')]['id']}})[_0x1432('0x22')](handleEntityNotFound(_0x13238a,null))[_0x1432('0x22')](function(_0x397428){if(_0x397428){return db[_0x1432('0x86')]['transaction'](function(_0x28986c){return db[_0x1432('0x87')]['create'](_0x205c98['body'],{'transaction':_0x28986c})[_0x1432('0x22')](function(_0x1c5d88){_0x4db282=_0x1c5d88;return _0x397428[_0x1432('0x88')](_0x1c5d88,{'transaction':_0x28986c});})[_0x1432('0x22')](function(){var _0x5f2237={'type':db[_0x1432('0x89')][_0x1432('0x8a')],'transaction':_0x28986c};switch(_0x205c98[_0x1432('0x47')][_0x1432('0x2d')]){case _0x1432('0x8b'):_0x5f2237[_0x1432('0x2d')]=db[_0x1432('0x89')][_0x1432('0x8a')];break;case _0x1432('0x8c'):_0x5f2237[_0x1432('0x2d')]=db['Sequelize'][_0x1432('0x8d')];break;case _0x1432('0x8e'):_0x5f2237[_0x1432('0x2d')]=db['Sequelize'][_0x1432('0x8f')];_0x5f2237['defaultValue']=![];break;default:}return db['sequelize'][_0x1432('0x90')]['addColumn'](_0x1432('0x91'),util[_0x1432('0x69')]('cf_%s',_0x4db282['id']),_0x5f2237);})[_0x1432('0x22')](function(){return _0x4db282;});});}})[_0x1432('0x22')](respondWithResult(_0x13238a,null))[_0x1432('0x42')](handleError(_0x13238a,null));};exports[_0x1432('0x92')]=function(_0x25cc4a,_0x2f5d08,_0x5a3a71){var _0x2b6e08={};var _0x469adf={};var _0x4f7db8;var _0x5d084f;return db['CmList'][_0x1432('0x55')]({'where':{'id':_0x25cc4a[_0x1432('0x4f')]['id']}})[_0x1432('0x22')](handleEntityNotFound(_0x2f5d08,null))['then'](function(_0x2384bc){if(_0x2384bc){_0x4f7db8=_0x2384bc;_0x469adf[_0x1432('0x2f')]=_[_0x1432('0x44')](db[_0x1432('0x87')][_0x1432('0x2c')]);_0x469adf[_0x1432('0x30')]=_[_0x1432('0x44')](_0x25cc4a[_0x1432('0x30')]);_0x469adf[_0x1432('0x38')]=_[_0x1432('0x31')](_0x469adf[_0x1432('0x2f')],_0x469adf[_0x1432('0x30')]);_0x2b6e08[_0x1432('0x32')]=_[_0x1432('0x31')](_0x469adf['model'],qs['fields'](_0x25cc4a[_0x1432('0x30')][_0x1432('0x33')]));_0x2b6e08[_0x1432('0x32')]=_0x2b6e08[_0x1432('0x32')][_0x1432('0x34')]?_0x2b6e08['attributes']:_0x469adf[_0x1432('0x2f')];_0x2b6e08['order']=qs['sort'](_0x25cc4a[_0x1432('0x30')][_0x1432('0x57')]);_0x2b6e08[_0x1432('0x37')]=qs['filters'](_[_0x1432('0x58')](_0x25cc4a[_0x1432('0x30')],_0x469adf[_0x1432('0x38')]));_0x2b6e08[_0x1432('0x37')]=_[_0x1432('0x39')](_0x2b6e08['where'],{'$or':[{'ListId':_0x2384bc['id']},{'ListId':null}]});if(_0x25cc4a['query'][_0x1432('0x3b')]){_0x2b6e08[_0x1432('0x37')]=_[_0x1432('0x39')](_0x2b6e08[_0x1432('0x37')],{'$or':_[_0x1432('0x2b')](_0x2b6e08['attributes'],function(_0x441fe0){var _0x131777={};_0x131777[_0x441fe0]={'$like':'%'+_0x25cc4a[_0x1432('0x30')][_0x1432('0x3b')]+'%'};return _0x131777;})});}_0x2b6e08=_['merge']({},_0x2b6e08,_0x25cc4a['options']);return db[_0x1432('0x87')][_0x1432('0x93')](_0x2b6e08);}})[_0x1432('0x22')](respondWithResult(_0x2f5d08,null))[_0x1432('0x42')](handleError(_0x2f5d08,null));};exports[_0x1432('0x94')]=function(_0x1eb3f7,_0x1b8244){return db[_0x1432('0x87')][_0x1432('0x93')]({'where':{'ListId':null}})['then'](handleEntityNotFound(_0x1b8244,null))[_0x1432('0x22')](function(_0x2c46e7){return _0x2c46e7;})[_0x1432('0x22')](respondWithResult(_0x1b8244,null))[_0x1432('0x42')](handleError(_0x1b8244,null));};exports[_0x1432('0x95')]=function(_0x3028d3,_0x19c4eb,_0x54a34f){return db[_0x1432('0x3d')][_0x1432('0x45')]({'where':{'id':_0x3028d3[_0x1432('0x4f')]['id']}})['then'](handleEntityNotFound(_0x19c4eb,null))[_0x1432('0x22')](function(_0x2e80d4){if(_0x2e80d4){return _0x2e80d4['addAgents'](_0x3028d3[_0x1432('0x47')][_0x1432('0x5a')],_[_0x1432('0x60')](_0x3028d3[_0x1432('0x47')],[_0x1432('0x5a'),'id'])||{})[_0x1432('0x96')](function(_0x4177f9){for(var _0x159841=0x0;_0x159841<_0x3028d3[_0x1432('0x47')][_0x1432('0x5a')][_0x1432('0x34')];_0x159841+=0x1){socket[_0x1432('0x97')](_0x1432('0x98'),{'UserId':Number(_0x3028d3[_0x1432('0x47')]['ids'][_0x159841]),'CmListId':Number(_0x3028d3[_0x1432('0x4f')]['id'])});}return _0x4177f9;});}})[_0x1432('0x22')](respondWithResult(_0x19c4eb,null))['catch'](handleError(_0x19c4eb,null));};exports['removeAgents']=function(_0x37303c,_0x177cc6,_0x20fa6e){return db['CmList'][_0x1432('0x45')]({'where':{'id':_0x37303c[_0x1432('0x4f')]['id']}})[_0x1432('0x22')](handleEntityNotFound(_0x177cc6,null))['then'](function(_0x4d0213){if(_0x4d0213){return _0x4d0213[_0x1432('0x99')](_0x37303c[_0x1432('0x30')][_0x1432('0x5a')])[_0x1432('0x22')](function(){if(_[_0x1432('0x5d')](_0x37303c[_0x1432('0x30')][_0x1432('0x5a')])){for(var _0xcf46fd=0x0;_0xcf46fd<_0x37303c['query'][_0x1432('0x5a')][_0x1432('0x34')];_0xcf46fd+=0x1){socket[_0x1432('0x97')]('userCmList:remove',{'UserId':Number(_0x37303c['query']['ids'][_0xcf46fd]),'CmListId':Number(_0x37303c['params']['id'])});}}else{socket[_0x1432('0x97')]('userCmList:remove',{'UserId':Number(_0x37303c[_0x1432('0x30')][_0x1432('0x5a')]),'CmListId':Number(_0x37303c['params']['id'])});}});}})[_0x1432('0x22')](respondWithStatusCode(_0x177cc6,null))[_0x1432('0x42')](handleError(_0x177cc6,null));};exports['getAgents']=function(_0x54af69,_0x512761,_0x25d0c5){var _0x260f91={};var _0x77c995={};var _0x1ec92c;var _0x516a4d;return db[_0x1432('0x3d')][_0x1432('0x55')]({'where':{'id':_0x54af69[_0x1432('0x4f')]['id']}})[_0x1432('0x22')](handleEntityNotFound(_0x512761,null))[_0x1432('0x22')](function(_0x107c91){if(_0x107c91){_0x1ec92c=_0x107c91;_0x77c995['model']=_['keys'](db[_0x1432('0x9a')][_0x1432('0x2c')]);_0x77c995[_0x1432('0x30')]=_[_0x1432('0x44')](_0x54af69[_0x1432('0x30')]);_0x77c995[_0x1432('0x38')]=_['intersection'](_0x77c995[_0x1432('0x2f')],_0x77c995[_0x1432('0x30')]);_0x260f91['attributes']=_[_0x1432('0x31')](_0x77c995[_0x1432('0x2f')],qs[_0x1432('0x33')](_0x54af69[_0x1432('0x30')][_0x1432('0x33')]));_0x260f91[_0x1432('0x32')]=_0x260f91['attributes'][_0x1432('0x34')]?_0x260f91['attributes']:_0x77c995[_0x1432('0x2f')];_0x260f91['order']=qs['sort'](_0x54af69['query']['sort']);_0x260f91[_0x1432('0x37')]=qs[_0x1432('0x38')](_[_0x1432('0x58')](_0x54af69[_0x1432('0x30')],_0x77c995[_0x1432('0x38')]));if(_0x54af69[_0x1432('0x30')][_0x1432('0x3b')]){_0x260f91[_0x1432('0x37')]=_[_0x1432('0x39')](_0x260f91[_0x1432('0x37')],{'$or':_[_0x1432('0x2b')](_0x260f91['attributes'],function(_0x3971fb){var _0x277ea9={};_0x277ea9[_0x3971fb]={'$like':'%'+_0x54af69['query']['filter']+'%'};return _0x277ea9;})});}_0x260f91=_['merge']({},_0x260f91,_0x54af69['options']);return _0x1ec92c[_0x1432('0x9b')](_0x260f91);}})[_0x1432('0x22')](function(_0x8a2611){if(_0x8a2611){_0x516a4d=_0x8a2611[_0x1432('0x34')];if(!_0x54af69[_0x1432('0x30')][_0x1432('0x35')](_0x1432('0x56'))){_0x260f91[_0x1432('0x1c')]=qs[_0x1432('0x1c')](_0x54af69[_0x1432('0x30')][_0x1432('0x1c')]);_0x260f91['offset']=qs[_0x1432('0x1a')](_0x54af69['query'][_0x1432('0x1a')]);}return _0x1ec92c[_0x1432('0x9b')](_0x260f91);}})['then'](function(_0x37f0a1){if(_0x37f0a1){return _0x37f0a1?{'count':_0x516a4d,'rows':_0x37f0a1}:null;}})[_0x1432('0x22')](respondWithResult(_0x512761,null))[_0x1432('0x42')](handleError(_0x512761,null));};function handleQuery(_0x3c0e11){logger[_0x1432('0x9c')](_0x3c0e11);return db['sequelize']['query'](_0x3c0e11)[_0x1432('0x96')](function(_0x3f4838){csv_results[_0x1432('0x61')](_0x3f4838);})[_0x1432('0x42')](function(_0x3d383a){logger['error'](_0x3d383a[_0x1432('0x64')]);});}
\ No newline at end of file
index 7afc172..3731748 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9957=['setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','CmList'];(function(_0x115598,_0x4622f8){var _0x128dcb=function(_0x329313){while(--_0x329313){_0x115598['push'](_0x115598['shift']());}};_0x128dcb(++_0x4622f8);}(_0x9957,0x93));var _0x7995=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x9957[_0x1facfa];return _0x9ec701;};'use strict';var EventEmitter=require(_0x7995('0x0'));var CmList=require(_0x7995('0x1'))['db'][_0x7995('0x2')];var CmListEvents=new EventEmitter();CmListEvents[_0x7995('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x7995('0x4'),'afterDestroy':_0x7995('0x5')};function emitEvent(_0x1902b4){return function(_0x462a03,_0x576d89,_0x744bea){CmListEvents[_0x7995('0x6')](_0x1902b4+':'+_0x462a03['id'],_0x462a03);CmListEvents[_0x7995('0x6')](_0x1902b4,_0x462a03);_0x744bea(null);};}for(var e in events){if(events[_0x7995('0x7')](e)){var event=events[e];CmList[_0x7995('0x8')](e,emitEvent(event));}}module[_0x7995('0x9')]=CmListEvents;
\ No newline at end of file
+var _0xe14b=['hasOwnProperty','hook','exports','events','../../mysqldb','save','update','emit'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0xe14b,0x93));var _0xbe14=function(_0x1d767c,_0x129161){_0x1d767c=_0x1d767c-0x0;var _0x1d51dd=_0xe14b[_0x1d767c];return _0x1d51dd;};'use strict';var EventEmitter=require(_0xbe14('0x0'));var CmList=require(_0xbe14('0x1'))['db']['CmList'];var CmListEvents=new EventEmitter();CmListEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xbe14('0x2'),'afterUpdate':_0xbe14('0x3'),'afterDestroy':'remove'};function emitEvent(_0x7d3665){return function(_0x5ce8fb,_0x496c04,_0x1833e3){CmListEvents[_0xbe14('0x4')](_0x7d3665+':'+_0x5ce8fb['id'],_0x5ce8fb);CmListEvents[_0xbe14('0x4')](_0x7d3665,_0x5ce8fb);_0x1833e3(null);};}for(var e in events){if(events[_0xbe14('0x5')](e)){var event=events[e];CmList[_0xbe14('0x6')](e,emitEvent(event));}}module[_0xbe14('0x7')]=CmListEvents;
\ No newline at end of file
index 0a570a6..5134801 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x878f=['path','rimraf','../../config/environment','./cmList.attributes','exports','define','CmList','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x878f,0x173));var _0xf878=function(_0x1b2247,_0x4fce46){_0x1b2247=_0x1b2247-0x0;var _0x99c746=_0x878f[_0x1b2247];return _0x99c746;};'use strict';var _=require('lodash');var util=require(_0xf878('0x0'));var logger=require(_0xf878('0x1'))(_0xf878('0x2'));var moment=require(_0xf878('0x3'));var BPromise=require(_0xf878('0x4'));var rp=require(_0xf878('0x5'));var fs=require('fs');var path=require(_0xf878('0x6'));var rimraf=require(_0xf878('0x7'));var config=require(_0xf878('0x8'));var attributes=require(_0xf878('0x9'));module[_0xf878('0xa')]=function(_0x4bc9aa,_0x4ac8d8){return _0x4bc9aa[_0xf878('0xb')](_0xf878('0xc'),attributes,{'tableName':'cm_lists','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xd2ea=['cm_lists','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./cmList.attributes','exports','define','CmList'];(function(_0x349148,_0x31eabb){var _0x2f2b0f=function(_0x44726e){while(--_0x44726e){_0x349148['push'](_0x349148['shift']());}};_0x2f2b0f(++_0x31eabb);}(_0xd2ea,0x15f));var _0xad2e=function(_0x2259df,_0xf688f){_0x2259df=_0x2259df-0x0;var _0x118d5c=_0xd2ea[_0x2259df];return _0x118d5c;};'use strict';var _=require(_0xad2e('0x0'));var util=require(_0xad2e('0x1'));var logger=require(_0xad2e('0x2'))(_0xad2e('0x3'));var moment=require(_0xad2e('0x4'));var BPromise=require('bluebird');var rp=require(_0xad2e('0x5'));var fs=require('fs');var path=require(_0xad2e('0x6'));var rimraf=require(_0xad2e('0x7'));var config=require(_0xad2e('0x8'));var attributes=require(_0xad2e('0x9'));module[_0xad2e('0xa')]=function(_0x29e97f,_0x592e8b){return _0x29e97f[_0xad2e('0xb')](_0xad2e('0xc'),attributes,{'tableName':_0xad2e('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 209f404..21ac13d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcc8f=['redis','defaults','localhost','socket.io-emitter','./cmList.socket','register','request','info','CmList,\x20%s,\x20%s','request\x20sent','error','code','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','http'];(function(_0x35e0da,_0x1c6e27){var _0x51a4fa=function(_0x54bf74){while(--_0x54bf74){_0x35e0da['push'](_0x35e0da['shift']());}};_0x51a4fa(++_0x1c6e27);}(_0xcc8f,0xbd));var _0xfcc8=function(_0x50b852,_0x868720){_0x50b852=_0x50b852-0x0;var _0x4eb264=_0xcc8f[_0x50b852];return _0x4eb264;};'use strict';var _=require(_0xfcc8('0x0'));var util=require(_0xfcc8('0x1'));var moment=require(_0xfcc8('0x2'));var BPromise=require(_0xfcc8('0x3'));var rs=require(_0xfcc8('0x4'));var fs=require('fs');var Redis=require(_0xfcc8('0x5'));var db=require(_0xfcc8('0x6'))['db'];var utils=require(_0xfcc8('0x7'));var logger=require(_0xfcc8('0x8'))(_0xfcc8('0x9'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson['client'][_0xfcc8('0xa')]({'port':0x232a});config[_0xfcc8('0xb')]=_[_0xfcc8('0xc')](config[_0xfcc8('0xb')],{'host':_0xfcc8('0xd'),'port':0x18eb});var socket=require(_0xfcc8('0xe'))(new Redis(config[_0xfcc8('0xb')]));require(_0xfcc8('0xf'))[_0xfcc8('0x10')](socket);function respondWithRpcPromise(_0x31b664,_0x4a1114,_0x1a16a5){return new BPromise(function(_0x2840c7,_0x3a95a9){return client[_0xfcc8('0x11')](_0x31b664,_0x1a16a5)['then'](function(_0x4d6473){logger[_0xfcc8('0x12')](_0xfcc8('0x13'),_0x4a1114,_0xfcc8('0x14'));logger['debug']('CmList,\x20%s,\x20%s,\x20%s',_0x4a1114,_0xfcc8('0x14'),JSON['stringify'](_0x4d6473));if(_0x4d6473[_0xfcc8('0x15')]){if(_0x4d6473[_0xfcc8('0x15')][_0xfcc8('0x16')]===0x1f4){logger[_0xfcc8('0x15')](_0xfcc8('0x13'),_0x4a1114,_0x4d6473[_0xfcc8('0x15')][_0xfcc8('0x17')]);return _0x3a95a9(_0x4d6473[_0xfcc8('0x15')][_0xfcc8('0x17')]);}logger[_0xfcc8('0x15')](_0xfcc8('0x13'),_0x4a1114,_0x4d6473['error']['message']);return _0x2840c7(_0x4d6473[_0xfcc8('0x15')][_0xfcc8('0x17')]);}else{logger[_0xfcc8('0x12')](_0xfcc8('0x13'),_0x4a1114,_0xfcc8('0x14'));_0x2840c7(_0x4d6473['result'][_0xfcc8('0x17')]);}})[_0xfcc8('0x18')](function(_0xf12eb6){logger[_0xfcc8('0x15')](_0xfcc8('0x13'),_0x4a1114,_0xf12eb6);_0x3a95a9(_0xf12eb6);});});}
\ No newline at end of file
+var _0x23fd=['randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','localhost','socket.io-emitter','./cmList.socket','request','then','info','debug','request\x20sent','error','message','CmList,\x20%s,\x20%s','result','catch','moment','bluebird'];(function(_0x4cd4e4,_0x1857a2){var _0x18cf3b=function(_0x27ea45){while(--_0x27ea45){_0x4cd4e4['push'](_0x4cd4e4['shift']());}};_0x18cf3b(++_0x1857a2);}(_0x23fd,0x111));var _0xd23f=function(_0x4f62c9,_0x5e5b63){_0x4f62c9=_0x4f62c9-0x0;var _0x4dca96=_0x23fd[_0x4f62c9];return _0x4dca96;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xd23f('0x0'));var BPromise=require(_0xd23f('0x1'));var rs=require(_0xd23f('0x2'));var fs=require('fs');var Redis=require(_0xd23f('0x3'));var db=require(_0xd23f('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xd23f('0x5'))(_0xd23f('0x6'));var config=require(_0xd23f('0x7'));var jayson=require(_0xd23f('0x8'));var client=jayson[_0xd23f('0x9')][_0xd23f('0xa')]({'port':0x232a});config[_0xd23f('0xb')]=_['defaults'](config[_0xd23f('0xb')],{'host':_0xd23f('0xc'),'port':0x18eb});var socket=require(_0xd23f('0xd'))(new Redis(config['redis']));require(_0xd23f('0xe'))['register'](socket);function respondWithRpcPromise(_0x15c97d,_0x2e2811,_0x231806){return new BPromise(function(_0x21673a,_0x2fcac3){return client[_0xd23f('0xf')](_0x15c97d,_0x231806)[_0xd23f('0x10')](function(_0x311b67){logger[_0xd23f('0x11')]('CmList,\x20%s,\x20%s',_0x2e2811,'request\x20sent');logger[_0xd23f('0x12')]('CmList,\x20%s,\x20%s,\x20%s',_0x2e2811,_0xd23f('0x13'),JSON['stringify'](_0x311b67));if(_0x311b67[_0xd23f('0x14')]){if(_0x311b67[_0xd23f('0x14')]['code']===0x1f4){logger[_0xd23f('0x14')]('CmList,\x20%s,\x20%s',_0x2e2811,_0x311b67['error'][_0xd23f('0x15')]);return _0x2fcac3(_0x311b67[_0xd23f('0x14')]['message']);}logger[_0xd23f('0x14')](_0xd23f('0x16'),_0x2e2811,_0x311b67['error'][_0xd23f('0x15')]);return _0x21673a(_0x311b67[_0xd23f('0x14')][_0xd23f('0x15')]);}else{logger[_0xd23f('0x11')](_0xd23f('0x16'),_0x2e2811,'request\x20sent');_0x21673a(_0x311b67[_0xd23f('0x17')]['message']);}})[_0xd23f('0x18')](function(_0x1f35cd){logger[_0xd23f('0x14')](_0xd23f('0x16'),_0x2e2811,_0x1f35cd);_0x2fcac3(_0x1f35cd);});});}
\ No newline at end of file
index cb658a8..97e20e7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a4f=['update','emit','register','length','cmList:','save','remove'];(function(_0x55becf,_0x1ed2c7){var _0x29f547=function(_0x206a0a){while(--_0x206a0a){_0x55becf['push'](_0x55becf['shift']());}};_0x29f547(++_0x1ed2c7);}(_0x7a4f,0x1d3));var _0xf7a4=function(_0x1e5cc3,_0x238a87){_0x1e5cc3=_0x1e5cc3-0x0;var _0x15c596=_0x7a4f[_0x1e5cc3];return _0x15c596;};'use strict';var CmListEvents=require('./cmList.events');var events=[_0xf7a4('0x0'),_0xf7a4('0x1'),_0xf7a4('0x2')];function createListener(_0x29ed50,_0x141974){return function(_0x3357e6){_0x141974[_0xf7a4('0x3')](_0x29ed50,_0x3357e6);};}function removeListener(_0x2dc8ef,_0x446613){return function(){CmListEvents['removeListener'](_0x2dc8ef,_0x446613);};}exports[_0xf7a4('0x4')]=function(_0x34b03b){for(var _0x1844be=0x0,_0x468767=events[_0xf7a4('0x5')];_0x1844be<_0x468767;_0x1844be++){var _0x41002d=events[_0x1844be];var _0x5da8cf=createListener(_0xf7a4('0x6')+_0x41002d,_0x34b03b);CmListEvents['on'](_0x41002d,_0x5da8cf);}};
\ No newline at end of file
+var _0x0e61=['emit','removeListener','register','length','cmList:','save','remove','update'];(function(_0x9cfe28,_0x1a335c){var _0x54a1d0=function(_0x46bc02){while(--_0x46bc02){_0x9cfe28['push'](_0x9cfe28['shift']());}};_0x54a1d0(++_0x1a335c);}(_0x0e61,0xbd));var _0x10e6=function(_0x3c858f,_0x235201){_0x3c858f=_0x3c858f-0x0;var _0x198090=_0x0e61[_0x3c858f];return _0x198090;};'use strict';var CmListEvents=require('./cmList.events');var events=[_0x10e6('0x0'),_0x10e6('0x1'),_0x10e6('0x2')];function createListener(_0x160ddb,_0x17c60f){return function(_0x31f861){_0x17c60f[_0x10e6('0x3')](_0x160ddb,_0x31f861);};}function removeListener(_0x34f467,_0x786989){return function(){CmListEvents[_0x10e6('0x4')](_0x34f467,_0x786989);};}exports[_0x10e6('0x5')]=function(_0x24df1a){for(var _0x213578=0x0,_0x39904d=events[_0x10e6('0x6')];_0x213578<_0x39904d;_0x213578++){var _0x41d208=events[_0x213578];var _0x2db637=createListener(_0x10e6('0x7')+_0x41d208,_0x24df1a);CmListEvents['on'](_0x41d208,_0x2db637);}};
\ No newline at end of file
index 1a63c16..940a21d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1c32=['../../components/auth/service','../../components/interaction/service','../../config/environment','./cmList.controller','get','isAuthenticated','index','/describe','describe','/global_fields','getGlobalCustomFields','show','/:id/dispositions','getDispositions','/:id/contacts','getContacts','/:id/contacts/csv','getContactsCsv','/:id/fields','getAgents','post','addContacts','addCustomField','/:id/users','addAgents','put','/:id','update','delete','destroy','removeDispositions','removeAgents','multer','util','path','express','Router','fs-extra'];(function(_0x5a7fca,_0x2b8450){var _0x4db9ff=function(_0x36fe79){while(--_0x36fe79){_0x5a7fca['push'](_0x5a7fca['shift']());}};_0x4db9ff(++_0x2b8450);}(_0x1c32,0xb8));var _0x21c3=function(_0x5de1bc,_0x434be1){_0x5de1bc=_0x5de1bc-0x0;var _0x19f4b8=_0x1c32[_0x5de1bc];return _0x19f4b8;};'use strict';var multer=require(_0x21c3('0x0'));var util=require(_0x21c3('0x1'));var path=require(_0x21c3('0x2'));var timeout=require('connect-timeout');var express=require(_0x21c3('0x3'));var router=express[_0x21c3('0x4')]();var fs_extra=require(_0x21c3('0x5'));var auth=require(_0x21c3('0x6'));var interaction=require(_0x21c3('0x7'));var config=require(_0x21c3('0x8'));var controller=require(_0x21c3('0x9'));router[_0x21c3('0xa')]('/',auth[_0x21c3('0xb')](),controller[_0x21c3('0xc')]);router[_0x21c3('0xa')](_0x21c3('0xd'),auth[_0x21c3('0xb')](),controller[_0x21c3('0xe')]);router[_0x21c3('0xa')](_0x21c3('0xf'),auth['isAuthenticated'](),controller[_0x21c3('0x10')]);router[_0x21c3('0xa')]('/:id',auth[_0x21c3('0xb')](),controller[_0x21c3('0x11')]);router['get'](_0x21c3('0x12'),auth[_0x21c3('0xb')](),controller[_0x21c3('0x13')]);router[_0x21c3('0xa')](_0x21c3('0x14'),auth[_0x21c3('0xb')](),controller[_0x21c3('0x15')]);router['get'](_0x21c3('0x16'),auth[_0x21c3('0xb')](),controller[_0x21c3('0x17')]);router['get'](_0x21c3('0x18'),auth[_0x21c3('0xb')](),controller['getCustomFields']);router[_0x21c3('0xa')]('/:id/users',auth['isAuthenticated'](),controller[_0x21c3('0x19')]);router[_0x21c3('0x1a')]('/',auth[_0x21c3('0xb')](),controller['create']);router[_0x21c3('0x1a')](_0x21c3('0x12'),auth[_0x21c3('0xb')](),controller['addDisposition']);router[_0x21c3('0x1a')](_0x21c3('0x14'),auth[_0x21c3('0xb')](),controller[_0x21c3('0x1b')]);router[_0x21c3('0x1a')](_0x21c3('0x18'),auth[_0x21c3('0xb')](),controller[_0x21c3('0x1c')]);router[_0x21c3('0x1a')](_0x21c3('0x1d'),auth[_0x21c3('0xb')](),controller[_0x21c3('0x1e')]);router[_0x21c3('0x1f')](_0x21c3('0x20'),auth[_0x21c3('0xb')](),controller[_0x21c3('0x21')]);router[_0x21c3('0x22')](_0x21c3('0x20'),auth[_0x21c3('0xb')](),controller[_0x21c3('0x23')]);router[_0x21c3('0x22')](_0x21c3('0x12'),auth[_0x21c3('0xb')](),controller[_0x21c3('0x24')]);router[_0x21c3('0x22')]('/:id/users',auth[_0x21c3('0xb')](),controller[_0x21c3('0x25')]);module['exports']=router;
\ No newline at end of file
+var _0x24ab=['addAgents','delete','destroy','removeDispositions','removeAgents','exports','multer','path','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./cmList.controller','get','isAuthenticated','/describe','describe','/global_fields','getGlobalCustomFields','/:id','/:id/dispositions','/:id/fields','getCustomFields','post','create','addDisposition','/:id/contacts','addContacts','addCustomField','/:id/users'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x24ab,0x13c));var _0xb24a=function(_0x52917e,_0x23ebac){_0x52917e=_0x52917e-0x0;var _0x6ac3da=_0x24ab[_0x52917e];return _0x6ac3da;};'use strict';var multer=require(_0xb24a('0x0'));var util=require('util');var path=require(_0xb24a('0x1'));var timeout=require('connect-timeout');var express=require(_0xb24a('0x2'));var router=express['Router']();var fs_extra=require(_0xb24a('0x3'));var auth=require(_0xb24a('0x4'));var interaction=require(_0xb24a('0x5'));var config=require(_0xb24a('0x6'));var controller=require(_0xb24a('0x7'));router[_0xb24a('0x8')]('/',auth[_0xb24a('0x9')](),controller['index']);router[_0xb24a('0x8')](_0xb24a('0xa'),auth[_0xb24a('0x9')](),controller[_0xb24a('0xb')]);router[_0xb24a('0x8')](_0xb24a('0xc'),auth[_0xb24a('0x9')](),controller[_0xb24a('0xd')]);router[_0xb24a('0x8')](_0xb24a('0xe'),auth[_0xb24a('0x9')](),controller['show']);router[_0xb24a('0x8')](_0xb24a('0xf'),auth[_0xb24a('0x9')](),controller['getDispositions']);router[_0xb24a('0x8')]('/:id/contacts',auth[_0xb24a('0x9')](),controller['getContacts']);router[_0xb24a('0x8')]('/:id/contacts/csv',auth['isAuthenticated'](),controller['getContactsCsv']);router[_0xb24a('0x8')](_0xb24a('0x10'),auth['isAuthenticated'](),controller[_0xb24a('0x11')]);router[_0xb24a('0x8')]('/:id/users',auth[_0xb24a('0x9')](),controller['getAgents']);router[_0xb24a('0x12')]('/',auth[_0xb24a('0x9')](),controller[_0xb24a('0x13')]);router[_0xb24a('0x12')](_0xb24a('0xf'),auth['isAuthenticated'](),controller[_0xb24a('0x14')]);router[_0xb24a('0x12')](_0xb24a('0x15'),auth[_0xb24a('0x9')](),controller[_0xb24a('0x16')]);router['post']('/:id/fields',auth[_0xb24a('0x9')](),controller[_0xb24a('0x17')]);router[_0xb24a('0x12')](_0xb24a('0x18'),auth[_0xb24a('0x9')](),controller[_0xb24a('0x19')]);router['put'](_0xb24a('0xe'),auth[_0xb24a('0x9')](),controller['update']);router[_0xb24a('0x1a')](_0xb24a('0xe'),auth[_0xb24a('0x9')](),controller[_0xb24a('0x1b')]);router[_0xb24a('0x1a')](_0xb24a('0xf'),auth[_0xb24a('0x9')](),controller[_0xb24a('0x1c')]);router[_0xb24a('0x1a')](_0xb24a('0x18'),auth[_0xb24a('0x9')](),controller[_0xb24a('0x1d')]);module[_0xb24a('0x1e')]=router;
\ No newline at end of file
index 0ed3e0f..c97abf7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4d46=['getDataValue','STRING','sequelize','VIRTUAL'];(function(_0x389213,_0x14a50d){var _0x4ad6ca=function(_0x45203b){while(--_0x45203b){_0x389213['push'](_0x389213['shift']());}};_0x4ad6ca(++_0x14a50d);}(_0x4d46,0x1e2));var _0x64d4=function(_0x4eda88,_0x3cf42f){_0x4eda88=_0x4eda88-0x0;var _0xa891d3=_0x4d46[_0x4eda88];return _0xa891d3;};'use strict';var Sequelize=require(_0x64d4('0x0'));module['exports']={'name':{'type':Sequelize[_0x64d4('0x1')],'get':function(_0x794327){return this[_0x64d4('0x2')]('field');}},'field':{'type':Sequelize['STRING'],'allowNull':![]},'operator':{'type':Sequelize['STRING'],'allowNull':![]},'value':{'type':Sequelize[_0x64d4('0x3')],'allowNull':![]}};
\ No newline at end of file
+var _0xc165=['getDataValue','field','STRING','sequelize','exports','VIRTUAL'];(function(_0x506172,_0xbc3a3){var _0x2723c0=function(_0x57c3d9){while(--_0x57c3d9){_0x506172['push'](_0x506172['shift']());}};_0x2723c0(++_0xbc3a3);}(_0xc165,0xab));var _0x5c16=function(_0x487b0c,_0x14ff74){_0x487b0c=_0x487b0c-0x0;var _0x1adbdc=_0xc165[_0x487b0c];return _0x1adbdc;};'use strict';var Sequelize=require(_0x5c16('0x0'));module[_0x5c16('0x1')]={'name':{'type':Sequelize[_0x5c16('0x2')],'get':function(_0x4293f1){return this[_0x5c16('0x3')](_0x5c16('0x4'));}},'field':{'type':Sequelize['STRING'],'allowNull':![]},'operator':{'type':Sequelize[_0x5c16('0x5')],'allowNull':![]},'value':{'type':Sequelize[_0x5c16('0x5')],'allowNull':![]}};
\ No newline at end of file
index 4726efb..7b1d281 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9957=['eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','json','undefined','count','offset','limit','set','Content-Range','reject','save','then','destroy','error','name','send','update','body','Condition','find','catch','params'];(function(_0x568313,_0x120b36){var _0x157057=function(_0x4b9a6d){while(--_0x4b9a6d){_0x568313['push'](_0x568313['shift']());}};_0x157057(++_0x120b36);}(_0x9957,0x93));var _0x7995=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x9957[_0x5b644e];return _0x49c6bf;};'use strict';var emlformat=require(_0x7995('0x0'));var rimraf=require(_0x7995('0x1'));var zipdir=require(_0x7995('0x2'));var jsonpatch=require(_0x7995('0x3'));var rp=require('request-promise');var moment=require(_0x7995('0x4'));var BPromise=require(_0x7995('0x5'));var Mustache=require(_0x7995('0x6'));var util=require(_0x7995('0x7'));var path=require('path');var sox=require(_0x7995('0x8'));var csv=require(_0x7995('0x9'));var ejs=require(_0x7995('0xa'));var fs=require('fs');var fs_extra=require(_0x7995('0xb'));var _=require(_0x7995('0xc'));var squel=require(_0x7995('0xd'));var crypto=require('crypto');var jsforce=require(_0x7995('0xe'));var deskjs=require(_0x7995('0xf'));var toCsv=require('to-csv');var querystring=require(_0x7995('0x10'));var Papa=require(_0x7995('0x11'));var Redis=require(_0x7995('0x12'));var authService=require(_0x7995('0x13'));var qs=require(_0x7995('0x14'));var as=require(_0x7995('0x15'));var hardwareService=require(_0x7995('0x16'));var logger=require('../../config/logger')(_0x7995('0x17'));var utils=require(_0x7995('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0x7995('0x19'));var db=require(_0x7995('0x1a'))['db'];function respondWithStatusCode(_0x19a27e,_0x385f00){_0x385f00=_0x385f00||0xcc;return function(_0x281576){if(_0x281576){return _0x19a27e[_0x7995('0x1b')](_0x385f00);}return _0x19a27e[_0x7995('0x1c')](_0x385f00)['end']();};}function respondWithResult(_0x58f5ad,_0x2b4e94){_0x2b4e94=_0x2b4e94||0xc8;return function(_0x2233dd){if(_0x2233dd){return _0x58f5ad[_0x7995('0x1c')](_0x2b4e94)[_0x7995('0x1d')](_0x2233dd);}};}function respondWithFilteredResult(_0x3f1d3e,_0x1a5310){return function(_0x2202ce){if(_0x2202ce){var _0x41cbf0=typeof _0x1a5310['offset']===_0x7995('0x1e')&&typeof _0x1a5310['limit']===_0x7995('0x1e');var _0x37f297=_0x2202ce[_0x7995('0x1f')];var _0x291317=_0x41cbf0?0x0:_0x1a5310[_0x7995('0x20')];var _0x37a7d4=_0x41cbf0?_0x2202ce['count']:_0x1a5310['offset']+_0x1a5310[_0x7995('0x21')];var _0x5e6f90;if(_0x37a7d4>=_0x37f297){_0x37a7d4=_0x37f297;_0x5e6f90=0xc8;}else{_0x5e6f90=0xce;}_0x3f1d3e['status'](_0x5e6f90);return _0x3f1d3e[_0x7995('0x22')](_0x7995('0x23'),_0x291317+'-'+_0x37a7d4+'/'+_0x37f297)['json'](_0x2202ce);}return null;};}function patchUpdates(_0x3a9b54){return function(_0x51f276){try{jsonpatch['apply'](_0x51f276,_0x3a9b54,!![]);}catch(_0x3e4c54){return BPromise[_0x7995('0x24')](_0x3e4c54);}return _0x51f276[_0x7995('0x25')]();};}function saveUpdates(_0x1a8568,_0x460924){return function(_0x1c278a){if(_0x1c278a){return _0x1c278a['update'](_0x1a8568)[_0x7995('0x26')](function(_0x46ee4b){return _0x46ee4b;});}return null;};}function removeEntity(_0x204507,_0x285437){return function(_0x563799){if(_0x563799){return _0x563799[_0x7995('0x27')]()[_0x7995('0x26')](function(){_0x204507[_0x7995('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x39df42,_0x34e70c){return function(_0x401dc3){if(!_0x401dc3){_0x39df42[_0x7995('0x1b')](0x194);}return _0x401dc3;};}function handleError(_0x3a3fcf,_0x2a307e){_0x2a307e=_0x2a307e||0x1f4;return function(_0x56691a){logger[_0x7995('0x28')](_0x56691a['stack']);if(_0x56691a[_0x7995('0x29')]){delete _0x56691a[_0x7995('0x29')];}_0x3a3fcf[_0x7995('0x1c')](_0x2a307e)[_0x7995('0x2a')](_0x56691a);};}exports[_0x7995('0x2b')]=function(_0x4b6f99,_0x9b2a15){if(_0x4b6f99['body']['id']){delete _0x4b6f99[_0x7995('0x2c')]['id'];}return db[_0x7995('0x2d')][_0x7995('0x2e')]({'where':{'id':_0x4b6f99['params']['id']}})['then'](handleEntityNotFound(_0x9b2a15,null))['then'](saveUpdates(_0x4b6f99[_0x7995('0x2c')],null))[_0x7995('0x26')](respondWithResult(_0x9b2a15,null))[_0x7995('0x2f')](handleError(_0x9b2a15,null));};exports[_0x7995('0x27')]=function(_0x2e3493,_0x1ca460){return db['Condition']['find']({'where':{'id':_0x2e3493[_0x7995('0x30')]['id']}})['then'](handleEntityNotFound(_0x1ca460,null))[_0x7995('0x26')](removeEntity(_0x1ca460,null))[_0x7995('0x2f')](handleError(_0x1ca460,null));};
\ No newline at end of file
+var _0x7a54=['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','body','Condition','find','catch','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path'];(function(_0x541306,_0x5210ac){var _0x257c9f=function(_0x4bb8a5){while(--_0x4bb8a5){_0x541306['push'](_0x541306['shift']());}};_0x257c9f(++_0x5210ac);}(_0x7a54,0x106));var _0x47a5=function(_0x147b9b,_0x15670b){_0x147b9b=_0x147b9b-0x0;var _0x9c7ac5=_0x7a54[_0x147b9b];return _0x9c7ac5;};'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('0x22')]=function(_0x136b14,_0x16631f){if(_0x136b14[_0x47a5('0x29')]['id']){delete _0x136b14[_0x47a5('0x29')]['id'];}return db[_0x47a5('0x2a')][_0x47a5('0x2b')]({'where':{'id':_0x136b14['params']['id']}})[_0x47a5('0x23')](handleEntityNotFound(_0x16631f,null))['then'](saveUpdates(_0x136b14[_0x47a5('0x29')],null))[_0x47a5('0x23')](respondWithResult(_0x16631f,null))[_0x47a5('0x2c')](handleError(_0x16631f,null));};exports['destroy']=function(_0x256650,_0x625952){return db[_0x47a5('0x2a')][_0x47a5('0x2b')]({'where':{'id':_0x256650['params']['id']}})['then'](handleEntityNotFound(_0x625952,null))[_0x47a5('0x23')](removeEntity(_0x625952,null))[_0x47a5('0x2c')](handleError(_0x625952,null));};
\ No newline at end of file
index 4d6a4b8..4e90b3c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x56d8=['tools_conditions','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','exports','define','Condition'];(function(_0x363ef8,_0x4ecb1a){var _0x148822=function(_0x232634){while(--_0x232634){_0x363ef8['push'](_0x363ef8['shift']());}};_0x148822(++_0x4ecb1a);}(_0x56d8,0x91));var _0x856d=function(_0x465028,_0x4570ac){_0x465028=_0x465028-0x0;var _0xb783d4=_0x56d8[_0x465028];return _0xb783d4;};'use strict';var _=require(_0x856d('0x0'));var util=require(_0x856d('0x1'));var logger=require(_0x856d('0x2'))(_0x856d('0x3'));var moment=require(_0x856d('0x4'));var BPromise=require('bluebird');var rp=require(_0x856d('0x5'));var fs=require('fs');var path=require(_0x856d('0x6'));var rimraf=require(_0x856d('0x7'));var config=require('../../config/environment');var attributes=require('./condition.attributes');module[_0x856d('0x8')]=function(_0x54e541,_0x28c157){return _0x54e541[_0x856d('0x9')](_0x856d('0xa'),attributes,{'tableName':_0x856d('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe1a3=['rimraf','../../config/environment','./condition.attributes','exports','define','Condition','tools_conditions','lodash','util','../../config/logger','api','moment','request-promise','path'];(function(_0x344a3f,_0x579a22){var _0x264712=function(_0x34c9f0){while(--_0x34c9f0){_0x344a3f['push'](_0x344a3f['shift']());}};_0x264712(++_0x579a22);}(_0xe1a3,0x1ab));var _0x3e1a=function(_0x592df2,_0x613eae){_0x592df2=_0x592df2-0x0;var _0x40b754=_0xe1a3[_0x592df2];return _0x40b754;};'use strict';var _=require(_0x3e1a('0x0'));var util=require(_0x3e1a('0x1'));var logger=require(_0x3e1a('0x2'))(_0x3e1a('0x3'));var moment=require(_0x3e1a('0x4'));var BPromise=require('bluebird');var rp=require(_0x3e1a('0x5'));var fs=require('fs');var path=require(_0x3e1a('0x6'));var rimraf=require(_0x3e1a('0x7'));var config=require(_0x3e1a('0x8'));var attributes=require(_0x3e1a('0x9'));module[_0x3e1a('0xa')]=function(_0x457c83,_0x19b337){return _0x457c83[_0x3e1a('0xb')](_0x3e1a('0xc'),attributes,{'tableName':_0x3e1a('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 1e27570..81eaf73 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc1fe=['request','Condition,\x20%s,\x20%s','debug','Condition,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','request\x20sent','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http'];(function(_0x4b6887,_0x96c4b7){var _0x2bf120=function(_0x9c70c){while(--_0x9c70c){_0x4b6887['push'](_0x4b6887['shift']());}};_0x2bf120(++_0x96c4b7);}(_0xc1fe,0x108));var _0xec1f=function(_0x4a0b5f,_0x48f76a){_0x4a0b5f=_0x4a0b5f-0x0;var _0x70d9d6=_0xc1fe[_0x4a0b5f];return _0x70d9d6;};'use strict';var _=require(_0xec1f('0x0'));var util=require(_0xec1f('0x1'));var moment=require(_0xec1f('0x2'));var BPromise=require(_0xec1f('0x3'));var rs=require(_0xec1f('0x4'));var fs=require('fs');var Redis=require(_0xec1f('0x5'));var db=require(_0xec1f('0x6'))['db'];var utils=require(_0xec1f('0x7'));var logger=require(_0xec1f('0x8'))('rpc');var config=require(_0xec1f('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xec1f('0xa')][_0xec1f('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3b5fd3,_0xeedf34,_0x239573){return new BPromise(function(_0xcb9a3e,_0x4cf9e6){return client[_0xec1f('0xc')](_0x3b5fd3,_0x239573)['then'](function(_0x527859){logger['info'](_0xec1f('0xd'),_0xeedf34,'request\x20sent');logger[_0xec1f('0xe')](_0xec1f('0xf'),_0xeedf34,'request\x20sent',JSON[_0xec1f('0x10')](_0x527859));if(_0x527859[_0xec1f('0x11')]){if(_0x527859[_0xec1f('0x11')][_0xec1f('0x12')]===0x1f4){logger[_0xec1f('0x11')](_0xec1f('0xd'),_0xeedf34,_0x527859[_0xec1f('0x11')]['message']);return _0x4cf9e6(_0x527859[_0xec1f('0x11')][_0xec1f('0x13')]);}logger[_0xec1f('0x11')]('Condition,\x20%s,\x20%s',_0xeedf34,_0x527859[_0xec1f('0x11')][_0xec1f('0x13')]);return _0xcb9a3e(_0x527859['error'][_0xec1f('0x13')]);}else{logger[_0xec1f('0x14')](_0xec1f('0xd'),_0xeedf34,_0xec1f('0x15'));_0xcb9a3e(_0x527859[_0xec1f('0x16')]['message']);}})['catch'](function(_0x5721fb){logger[_0xec1f('0x11')](_0xec1f('0xd'),_0xeedf34,_0x5721fb);_0x4cf9e6(_0x5721fb);});});}
\ No newline at end of file
+var _0x5fb0=['jayson/promise','client','request','info','Condition,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x1dced7,_0x2f6417){var _0x1f2b69=function(_0x1c1f45){while(--_0x1c1f45){_0x1dced7['push'](_0x1dced7['shift']());}};_0x1f2b69(++_0x2f6417);}(_0x5fb0,0x1b1));var _0x05fb=function(_0x14d99c,_0xa1b029){_0x14d99c=_0x14d99c-0x0;var _0x2a8f65=_0x5fb0[_0x14d99c];return _0x2a8f65;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x05fb('0x0'));var BPromise=require('bluebird');var rs=require(_0x05fb('0x1'));var fs=require('fs');var Redis=require(_0x05fb('0x2'));var db=require(_0x05fb('0x3'))['db'];var utils=require(_0x05fb('0x4'));var logger=require(_0x05fb('0x5'))(_0x05fb('0x6'));var config=require(_0x05fb('0x7'));var jayson=require(_0x05fb('0x8'));var client=jayson[_0x05fb('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x27b865,_0x2a04bf,_0x47277f){return new BPromise(function(_0x3c2169,_0x5133b8){return client[_0x05fb('0xa')](_0x27b865,_0x47277f)['then'](function(_0x4bc2c5){logger[_0x05fb('0xb')](_0x05fb('0xc'),_0x2a04bf,_0x05fb('0xd'));logger[_0x05fb('0xe')]('Condition,\x20%s,\x20%s,\x20%s',_0x2a04bf,'request\x20sent',JSON[_0x05fb('0xf')](_0x4bc2c5));if(_0x4bc2c5[_0x05fb('0x10')]){if(_0x4bc2c5['error'][_0x05fb('0x11')]===0x1f4){logger[_0x05fb('0x10')](_0x05fb('0xc'),_0x2a04bf,_0x4bc2c5[_0x05fb('0x10')]['message']);return _0x5133b8(_0x4bc2c5[_0x05fb('0x10')][_0x05fb('0x12')]);}logger['error']('Condition,\x20%s,\x20%s',_0x2a04bf,_0x4bc2c5[_0x05fb('0x10')]['message']);return _0x3c2169(_0x4bc2c5[_0x05fb('0x10')]['message']);}else{logger['info'](_0x05fb('0xc'),_0x2a04bf,_0x05fb('0xd'));_0x3c2169(_0x4bc2c5[_0x05fb('0x13')][_0x05fb('0x12')]);}})[_0x05fb('0x14')](function(_0x140f5d){logger['error']('Condition,\x20%s,\x20%s',_0x2a04bf,_0x140f5d);_0x5133b8(_0x140f5d);});});}
\ No newline at end of file
index b90b26e..d64e9c1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8b70=['isAuthenticated','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','./condition.controller','/:id','update','delete'];(function(_0x1b2ff7,_0x12a034){var _0x31656a=function(_0x1165a5){while(--_0x1165a5){_0x1b2ff7['push'](_0x1b2ff7['shift']());}};_0x31656a(++_0x12a034);}(_0x8b70,0x1c2));var _0x08b7=function(_0x3f2fea,_0x3c4ea8){_0x3f2fea=_0x3f2fea-0x0;var _0x69a4d5=_0x8b70[_0x3f2fea];return _0x69a4d5;};'use strict';var multer=require(_0x08b7('0x0'));var util=require(_0x08b7('0x1'));var path=require(_0x08b7('0x2'));var timeout=require(_0x08b7('0x3'));var express=require(_0x08b7('0x4'));var router=express[_0x08b7('0x5')]();var fs_extra=require(_0x08b7('0x6'));var auth=require(_0x08b7('0x7'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x08b7('0x8'));router['put'](_0x08b7('0x9'),auth['isAuthenticated'](),controller[_0x08b7('0xa')]);router[_0x08b7('0xb')](_0x08b7('0x9'),auth[_0x08b7('0xc')](),controller['destroy']);module[_0x08b7('0xd')]=router;
\ No newline at end of file
+var _0x8158=['./condition.controller','put','/:id','update','delete','isAuthenticated','destroy','exports','util','express','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0x8158,0x167));var _0x8815=function(_0x456404,_0x2aaf71){_0x456404=_0x456404-0x0;var _0x4e030d=_0x8158[_0x456404];return _0x4e030d;};'use strict';var multer=require('multer');var util=require(_0x8815('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x8815('0x1'));var router=express[_0x8815('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0x8815('0x3'));var interaction=require(_0x8815('0x4'));var config=require('../../config/environment');var controller=require(_0x8815('0x5'));router[_0x8815('0x6')](_0x8815('0x7'),auth['isAuthenticated'](),controller[_0x8815('0x8')]);router[_0x8815('0x9')](_0x8815('0x7'),auth[_0x8815('0xa')](),controller[_0x8815('0xb')]);module[_0x8815('0xc')]=router;
\ No newline at end of file
index 709b7f9..025e60e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7e57=['exports','STRING','INTEGER'];(function(_0x3ec1da,_0x1e36f5){var _0x472358=function(_0x1d41b1){while(--_0x1d41b1){_0x3ec1da['push'](_0x3ec1da['shift']());}};_0x472358(++_0x1e36f5);}(_0x7e57,0xdb));var _0x77e5=function(_0x407147,_0x2b5b58){_0x407147=_0x407147-0x0;var _0x5e3a42=_0x7e57[_0x407147];return _0x5e3a42;};'use strict';var Sequelize=require('sequelize');module[_0x77e5('0x0')]={'name':{'type':Sequelize[_0x77e5('0x1')],'allowNull':![],'unique':'name'},'OrderBy':{'type':Sequelize[_0x77e5('0x2')],'allowNull':!![]},'rgbBackgroundColor':{'type':Sequelize[_0x77e5('0x1')],'allowNull':!![]}};
\ No newline at end of file
+var _0x4576=['STRING','name','INTEGER','exports'];(function(_0x507ac5,_0x33aaee){var _0x12c1bc=function(_0x5c953c){while(--_0x5c953c){_0x507ac5['push'](_0x507ac5['shift']());}};_0x12c1bc(++_0x33aaee);}(_0x4576,0x17f));var _0x6457=function(_0x4722e3,_0x1828df){_0x4722e3=_0x4722e3-0x0;var _0x36e4b4=_0x4576[_0x4722e3];return _0x36e4b4;};'use strict';var Sequelize=require('sequelize');module[_0x6457('0x0')]={'name':{'type':Sequelize[_0x6457('0x1')],'allowNull':![],'unique':_0x6457('0x2')},'OrderBy':{'type':Sequelize[_0x6457('0x3')],'allowNull':!![]},'rgbBackgroundColor':{'type':Sequelize[_0x6457('0x1')],'allowNull':!![]}};
\ No newline at end of file
index 58c8ecb..91fc328 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1775=['status','end','json','offset','undefined','count','set','Content-Range','apply','reject','save','then','destroy','ContactItemTypes','UserProfileResource','name','send','index','ContactItemType','fieldName','type','map','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','VIRTUAL','include','params','includeAll','find','catch','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','get','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','CmContactHasItem','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1775,0x1db));var _0x5177=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0x1775[_0x432682];return _0x463d05;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x5177('0x0'));var zipdir=require(_0x5177('0x1'));var jsonpatch=require(_0x5177('0x2'));var rp=require(_0x5177('0x3'));var moment=require(_0x5177('0x4'));var BPromise=require(_0x5177('0x5'));var Mustache=require(_0x5177('0x6'));var util=require(_0x5177('0x7'));var path=require(_0x5177('0x8'));var sox=require(_0x5177('0x9'));var csv=require(_0x5177('0xa'));var ejs=require(_0x5177('0xb'));var fs=require('fs');var fs_extra=require(_0x5177('0xc'));var _=require(_0x5177('0xd'));var squel=require(_0x5177('0xe'));var crypto=require(_0x5177('0xf'));var jsforce=require(_0x5177('0x10'));var deskjs=require(_0x5177('0x11'));var toCsv=require(_0x5177('0xa'));var querystring=require(_0x5177('0x12'));var Papa=require(_0x5177('0x13'));var Redis=require(_0x5177('0x14'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x5177('0x15'));var hardwareService=require(_0x5177('0x16'));var logger=require(_0x5177('0x17'))(_0x5177('0x18'));var utils=require(_0x5177('0x19'));var config=require('../../config/environment');var licenseUtil=require(_0x5177('0x1a'));var db=require(_0x5177('0x1b'))['db'];function respondWithStatusCode(_0xc613b9,_0x3c4ced){_0x3c4ced=_0x3c4ced||0xcc;return function(_0x111e99){if(_0x111e99){return _0xc613b9[_0x5177('0x1c')](_0x3c4ced);}return _0xc613b9[_0x5177('0x1d')](_0x3c4ced)[_0x5177('0x1e')]();};}function respondWithResult(_0x3e6224,_0x1eb9dd){_0x1eb9dd=_0x1eb9dd||0xc8;return function(_0x41bef4){if(_0x41bef4){return _0x3e6224[_0x5177('0x1d')](_0x1eb9dd)[_0x5177('0x1f')](_0x41bef4);}};}function respondWithFilteredResult(_0x31aff8,_0x1b32e6){return function(_0x175ca6){if(_0x175ca6){var _0x2ab5e5=typeof _0x1b32e6[_0x5177('0x20')]===_0x5177('0x21')&&typeof _0x1b32e6['limit']===_0x5177('0x21');var _0x41e687=_0x175ca6[_0x5177('0x22')];var _0x1b4102=_0x2ab5e5?0x0:_0x1b32e6['offset'];var _0x3e6944=_0x2ab5e5?_0x175ca6[_0x5177('0x22')]:_0x1b32e6[_0x5177('0x20')]+_0x1b32e6['limit'];var _0x86f5f8;if(_0x3e6944>=_0x41e687){_0x3e6944=_0x41e687;_0x86f5f8=0xc8;}else{_0x86f5f8=0xce;}_0x31aff8['status'](_0x86f5f8);return _0x31aff8[_0x5177('0x23')](_0x5177('0x24'),_0x1b4102+'-'+_0x3e6944+'/'+_0x41e687)[_0x5177('0x1f')](_0x175ca6);}return null;};}function patchUpdates(_0x27b732){return function(_0x451e5c){try{jsonpatch[_0x5177('0x25')](_0x451e5c,_0x27b732,!![]);}catch(_0x174c4f){return BPromise[_0x5177('0x26')](_0x174c4f);}return _0x451e5c[_0x5177('0x27')]();};}function saveUpdates(_0x2a95cc,_0x23dad2){return function(_0x3b0c37){if(_0x3b0c37){return _0x3b0c37['update'](_0x2a95cc)[_0x5177('0x28')](function(_0x556f96){return _0x556f96;});}return null;};}function removeEntity(_0x30b60f,_0x2c68d8){return function(_0x3b39b5){if(_0x3b39b5){return _0x3b39b5[_0x5177('0x29')]()['then'](function(){var _0x2503ef=_0x3b39b5['get']({'plain':!![]});var _0x564139=_0x5177('0x2a');return db[_0x5177('0x2b')]['destroy']({'where':{'type':_0x564139,'resourceId':_0x2503ef['id']}})[_0x5177('0x28')](function(){return _0x3b39b5;});})['then'](function(){_0x30b60f[_0x5177('0x1d')](0xcc)[_0x5177('0x1e')]();});}};}function handleEntityNotFound(_0x58846c,_0x3e021a){return function(_0x2554ec){if(!_0x2554ec){_0x58846c[_0x5177('0x1c')](0x194);}return _0x2554ec;};}function handleError(_0x7f86e,_0xe98ff1){_0xe98ff1=_0xe98ff1||0x1f4;return function(_0x1cef5d){logger['error'](_0x1cef5d['stack']);if(_0x1cef5d[_0x5177('0x2c')]){delete _0x1cef5d[_0x5177('0x2c')];}_0x7f86e[_0x5177('0x1d')](_0xe98ff1)[_0x5177('0x2d')](_0x1cef5d);};}exports[_0x5177('0x2e')]=function(_0x8134f9,_0x31eb9f){var _0x72dced={},_0x49f6f1={},_0x42e1db={'count':0x0,'rows':[]};var _0x2233a2=_['map'](db[_0x5177('0x2f')]['rawAttributes'],function(_0x172b36){return{'name':_0x172b36[_0x5177('0x30')],'type':_0x172b36[_0x5177('0x31')]['key']};});_0x49f6f1['model']=_[_0x5177('0x32')](_0x2233a2,_0x5177('0x2c'));_0x49f6f1[_0x5177('0x33')]=_[_0x5177('0x34')](_0x8134f9[_0x5177('0x33')]);_0x49f6f1[_0x5177('0x35')]=_[_0x5177('0x36')](_0x49f6f1[_0x5177('0x37')],_0x49f6f1['query']);_0x72dced[_0x5177('0x38')]=_[_0x5177('0x36')](_0x49f6f1['model'],qs[_0x5177('0x39')](_0x8134f9[_0x5177('0x33')][_0x5177('0x39')]));_0x72dced[_0x5177('0x38')]=_0x72dced[_0x5177('0x38')][_0x5177('0x3a')]?_0x72dced['attributes']:_0x49f6f1[_0x5177('0x37')];if(!_0x8134f9[_0x5177('0x33')][_0x5177('0x3b')](_0x5177('0x3c'))){_0x72dced[_0x5177('0x3d')]=qs[_0x5177('0x3d')](_0x8134f9[_0x5177('0x33')]['limit']);_0x72dced[_0x5177('0x20')]=qs[_0x5177('0x20')](_0x8134f9['query']['offset']);}_0x72dced[_0x5177('0x3e')]=qs[_0x5177('0x3f')](_0x8134f9[_0x5177('0x33')][_0x5177('0x3f')]);_0x72dced[_0x5177('0x40')]=qs[_0x5177('0x35')](_[_0x5177('0x41')](_0x8134f9[_0x5177('0x33')],_0x49f6f1[_0x5177('0x35')]),_0x2233a2);if(_0x8134f9[_0x5177('0x33')][_0x5177('0x42')]){_0x72dced[_0x5177('0x40')]=_[_0x5177('0x43')](_0x72dced['where'],{'$or':_[_0x5177('0x32')](_0x2233a2,function(_0x2a4db1){if(_0x2a4db1['type']!==_0x5177('0x44')){var _0x56f297={};_0x56f297[_0x2a4db1[_0x5177('0x2c')]]={'$like':'%'+_0x8134f9[_0x5177('0x33')][_0x5177('0x42')]+'%'};return _0x56f297;}})});}_0x72dced=_['merge']({},_0x72dced,_0x8134f9['options']);var _0x210510={'where':_0x72dced[_0x5177('0x40')]};return db[_0x5177('0x2f')][_0x5177('0x22')](_0x210510)[_0x5177('0x28')](function(_0x3e710d){_0x42e1db[_0x5177('0x22')]=_0x3e710d;if(_0x8134f9[_0x5177('0x33')]['includeAll']){_0x72dced[_0x5177('0x45')]=[{'all':!![]}];}return db['ContactItemType']['findAll'](_0x72dced);})[_0x5177('0x28')](function(_0x17dc98){_0x42e1db['rows']=_0x17dc98;return _0x42e1db;})[_0x5177('0x28')](respondWithFilteredResult(_0x31eb9f,_0x72dced))['catch'](handleError(_0x31eb9f,null));};exports['show']=function(_0x46c833,_0x1769cd){var _0x262c71={'raw':!![],'where':{'id':_0x46c833[_0x5177('0x46')]['id']}},_0x3776b8={};_0x3776b8[_0x5177('0x37')]=_[_0x5177('0x34')](db['ContactItemType']['rawAttributes']);_0x3776b8[_0x5177('0x33')]=_['keys'](_0x46c833[_0x5177('0x33')]);_0x3776b8[_0x5177('0x35')]=_[_0x5177('0x36')](_0x3776b8[_0x5177('0x37')],_0x3776b8['query']);_0x262c71[_0x5177('0x38')]=_[_0x5177('0x36')](_0x3776b8[_0x5177('0x37')],qs[_0x5177('0x39')](_0x46c833[_0x5177('0x33')][_0x5177('0x39')]));_0x262c71[_0x5177('0x38')]=_0x262c71[_0x5177('0x38')][_0x5177('0x3a')]?_0x262c71[_0x5177('0x38')]:_0x3776b8[_0x5177('0x37')];if(_0x46c833['query'][_0x5177('0x47')]){_0x262c71['include']=[{'all':!![]}];}_0x262c71=_['merge']({},_0x262c71,_0x46c833['options']);return db[_0x5177('0x2f')][_0x5177('0x48')](_0x262c71)['then'](handleEntityNotFound(_0x1769cd,null))[_0x5177('0x28')](respondWithResult(_0x1769cd,null))[_0x5177('0x49')](handleError(_0x1769cd,null));};exports[_0x5177('0x4a')]=function(_0x4891fe,_0x1d4ae4){return db['ContactItemType']['create'](_0x4891fe['body'],{})[_0x5177('0x28')](function(_0x37d5dd){var _0x1300d7=_0x4891fe['user']['get']({'plain':!![]});if(!_0x1300d7)throw new Error(_0x5177('0x4b'));if(_0x1300d7['role']===_0x5177('0x4c')){var _0x9dd7a2=_0x37d5dd[_0x5177('0x4d')]({'plain':!![]});var _0x31a6e1=_0x5177('0x2a');return db[_0x5177('0x4e')][_0x5177('0x48')]({'where':{'name':_0x31a6e1,'userProfileId':_0x1300d7[_0x5177('0x4f')]},'raw':!![]})[_0x5177('0x28')](function(_0x217aca){if(_0x217aca&&_0x217aca[_0x5177('0x50')]===0x0){return db[_0x5177('0x2b')][_0x5177('0x4a')]({'name':_0x9dd7a2['name'],'resourceId':_0x9dd7a2['id'],'type':_0x217aca['name'],'sectionId':_0x217aca['id']},{})[_0x5177('0x28')](function(){return _0x37d5dd;});}else{return _0x37d5dd;}})['catch'](function(_0x649c6f){logger['error'](_0x5177('0x51'),_0x649c6f);throw _0x649c6f;});}return _0x37d5dd;})[_0x5177('0x28')](respondWithResult(_0x1d4ae4,0xc9))[_0x5177('0x49')](handleError(_0x1d4ae4,null));};exports['update']=function(_0x5be224,_0x19884e){if(_0x5be224[_0x5177('0x52')]['id']){delete _0x5be224[_0x5177('0x52')]['id'];}return db[_0x5177('0x2f')]['find']({'where':{'id':_0x5be224['params']['id']}})[_0x5177('0x28')](handleEntityNotFound(_0x19884e,null))[_0x5177('0x28')](saveUpdates(_0x5be224[_0x5177('0x52')],null))[_0x5177('0x28')](respondWithResult(_0x19884e,null))['catch'](handleError(_0x19884e,null));};exports[_0x5177('0x29')]=function(_0x143aff,_0x3a18ad){return db['ContactItemType'][_0x5177('0x48')]({'where':{'id':_0x143aff[_0x5177('0x46')]['id']}})[_0x5177('0x28')](handleEntityNotFound(_0x3a18ad,null))['then'](db[_0x5177('0x53')]['update']({'ItemTypeId':null},{'where':{'ItemTypeId':_0x143aff[_0x5177('0x46')]['id']}}))[_0x5177('0x28')](removeEntity(_0x3a18ad,null))[_0x5177('0x49')](handleError(_0x3a18ad,null));};
\ No newline at end of file
+var _0x93e9=['send','map','rawAttributes','fieldName','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','filter','where','merge','type','options','ContactItemType','includeAll','include','rows','params','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','update','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','then','destroy','get','ContactItemTypes','UserProfileResource','error','stack','name'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x93e9,0xcc));var _0x993e=function(_0x5b55c4,_0x2a95dc){_0x5b55c4=_0x5b55c4-0x0;var _0x468c6a=_0x93e9[_0x5b55c4];return _0x468c6a;};'use strict';var emlformat=require(_0x993e('0x0'));var rimraf=require(_0x993e('0x1'));var zipdir=require(_0x993e('0x2'));var jsonpatch=require(_0x993e('0x3'));var rp=require(_0x993e('0x4'));var moment=require(_0x993e('0x5'));var BPromise=require(_0x993e('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0x993e('0x7'));var sox=require(_0x993e('0x8'));var csv=require(_0x993e('0x9'));var ejs=require(_0x993e('0xa'));var fs=require('fs');var fs_extra=require(_0x993e('0xb'));var _=require(_0x993e('0xc'));var squel=require(_0x993e('0xd'));var crypto=require(_0x993e('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x993e('0xf'));var toCsv=require(_0x993e('0x9'));var querystring=require(_0x993e('0x10'));var Papa=require(_0x993e('0x11'));var Redis=require(_0x993e('0x12'));var authService=require(_0x993e('0x13'));var qs=require(_0x993e('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x993e('0x15'));var logger=require(_0x993e('0x16'))('api');var utils=require('../../config/utils');var config=require(_0x993e('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x993e('0x18'))['db'];function respondWithStatusCode(_0x5d5c0d,_0x4c2707){_0x4c2707=_0x4c2707||0xcc;return function(_0x31ece2){if(_0x31ece2){return _0x5d5c0d[_0x993e('0x19')](_0x4c2707);}return _0x5d5c0d[_0x993e('0x1a')](_0x4c2707)[_0x993e('0x1b')]();};}function respondWithResult(_0x3e082b,_0x397b42){_0x397b42=_0x397b42||0xc8;return function(_0x34ddda){if(_0x34ddda){return _0x3e082b[_0x993e('0x1a')](_0x397b42)[_0x993e('0x1c')](_0x34ddda);}};}function respondWithFilteredResult(_0xa43a4e,_0x1a7726){return function(_0x135771){if(_0x135771){var _0x3df0e7=typeof _0x1a7726[_0x993e('0x1d')]===_0x993e('0x1e')&&typeof _0x1a7726[_0x993e('0x1f')]===_0x993e('0x1e');var _0x526e06=_0x135771[_0x993e('0x20')];var _0x1acd21=_0x3df0e7?0x0:_0x1a7726[_0x993e('0x1d')];var _0x3d6109=_0x3df0e7?_0x135771[_0x993e('0x20')]:_0x1a7726[_0x993e('0x1d')]+_0x1a7726['limit'];var _0x11cd41;if(_0x3d6109>=_0x526e06){_0x3d6109=_0x526e06;_0x11cd41=0xc8;}else{_0x11cd41=0xce;}_0xa43a4e[_0x993e('0x1a')](_0x11cd41);return _0xa43a4e[_0x993e('0x21')](_0x993e('0x22'),_0x1acd21+'-'+_0x3d6109+'/'+_0x526e06)[_0x993e('0x1c')](_0x135771);}return null;};}function patchUpdates(_0x425ab4){return function(_0x29e48d){try{jsonpatch[_0x993e('0x23')](_0x29e48d,_0x425ab4,!![]);}catch(_0x4bbe9c){return BPromise[_0x993e('0x24')](_0x4bbe9c);}return _0x29e48d['save']();};}function saveUpdates(_0x11f6f4,_0x37ff57){return function(_0x32b09e){if(_0x32b09e){return _0x32b09e['update'](_0x11f6f4)[_0x993e('0x25')](function(_0x13db4e){return _0x13db4e;});}return null;};}function removeEntity(_0xfba00f,_0x1c52fd){return function(_0x3b45ef){if(_0x3b45ef){return _0x3b45ef[_0x993e('0x26')]()[_0x993e('0x25')](function(){var _0x3ad96f=_0x3b45ef[_0x993e('0x27')]({'plain':!![]});var _0x18f6ac=_0x993e('0x28');return db[_0x993e('0x29')]['destroy']({'where':{'type':_0x18f6ac,'resourceId':_0x3ad96f['id']}})[_0x993e('0x25')](function(){return _0x3b45ef;});})[_0x993e('0x25')](function(){_0xfba00f['status'](0xcc)[_0x993e('0x1b')]();});}};}function handleEntityNotFound(_0x4f5cc1,_0x14a0c7){return function(_0xa03fbd){if(!_0xa03fbd){_0x4f5cc1[_0x993e('0x19')](0x194);}return _0xa03fbd;};}function handleError(_0x2ff973,_0x5c7507){_0x5c7507=_0x5c7507||0x1f4;return function(_0x48d457){logger[_0x993e('0x2a')](_0x48d457[_0x993e('0x2b')]);if(_0x48d457['name']){delete _0x48d457[_0x993e('0x2c')];}_0x2ff973[_0x993e('0x1a')](_0x5c7507)[_0x993e('0x2d')](_0x48d457);};}exports['index']=function(_0x2495b7,_0x9e0309){var _0x1f5d51={},_0x1fa8a5={},_0x2599ec={'count':0x0,'rows':[]};var _0x54da4e=_[_0x993e('0x2e')](db['ContactItemType'][_0x993e('0x2f')],function(_0x5ba163){return{'name':_0x5ba163[_0x993e('0x30')],'type':_0x5ba163['type'][_0x993e('0x31')]};});_0x1fa8a5[_0x993e('0x32')]=_[_0x993e('0x2e')](_0x54da4e,_0x993e('0x2c'));_0x1fa8a5[_0x993e('0x33')]=_[_0x993e('0x34')](_0x2495b7['query']);_0x1fa8a5[_0x993e('0x35')]=_['intersection'](_0x1fa8a5['model'],_0x1fa8a5[_0x993e('0x33')]);_0x1f5d51['attributes']=_[_0x993e('0x36')](_0x1fa8a5[_0x993e('0x32')],qs[_0x993e('0x37')](_0x2495b7[_0x993e('0x33')][_0x993e('0x37')]));_0x1f5d51[_0x993e('0x38')]=_0x1f5d51[_0x993e('0x38')][_0x993e('0x39')]?_0x1f5d51[_0x993e('0x38')]:_0x1fa8a5[_0x993e('0x32')];if(!_0x2495b7[_0x993e('0x33')][_0x993e('0x3a')](_0x993e('0x3b'))){_0x1f5d51[_0x993e('0x1f')]=qs[_0x993e('0x1f')](_0x2495b7['query'][_0x993e('0x1f')]);_0x1f5d51[_0x993e('0x1d')]=qs[_0x993e('0x1d')](_0x2495b7[_0x993e('0x33')][_0x993e('0x1d')]);}_0x1f5d51[_0x993e('0x3c')]=qs[_0x993e('0x3d')](_0x2495b7[_0x993e('0x33')][_0x993e('0x3d')]);_0x1f5d51['where']=qs[_0x993e('0x35')](_['pick'](_0x2495b7[_0x993e('0x33')],_0x1fa8a5[_0x993e('0x35')]),_0x54da4e);if(_0x2495b7[_0x993e('0x33')][_0x993e('0x3e')]){_0x1f5d51[_0x993e('0x3f')]=_[_0x993e('0x40')](_0x1f5d51[_0x993e('0x3f')],{'$or':_[_0x993e('0x2e')](_0x54da4e,function(_0x4f057e){if(_0x4f057e[_0x993e('0x41')]!=='VIRTUAL'){var _0x180ad4={};_0x180ad4[_0x4f057e['name']]={'$like':'%'+_0x2495b7[_0x993e('0x33')][_0x993e('0x3e')]+'%'};return _0x180ad4;}})});}_0x1f5d51=_[_0x993e('0x40')]({},_0x1f5d51,_0x2495b7[_0x993e('0x42')]);var _0x39424a={'where':_0x1f5d51[_0x993e('0x3f')]};return db[_0x993e('0x43')][_0x993e('0x20')](_0x39424a)['then'](function(_0xe64c){_0x2599ec['count']=_0xe64c;if(_0x2495b7['query'][_0x993e('0x44')]){_0x1f5d51[_0x993e('0x45')]=[{'all':!![]}];}return db[_0x993e('0x43')]['findAll'](_0x1f5d51);})[_0x993e('0x25')](function(_0x40719d){_0x2599ec[_0x993e('0x46')]=_0x40719d;return _0x2599ec;})['then'](respondWithFilteredResult(_0x9e0309,_0x1f5d51))['catch'](handleError(_0x9e0309,null));};exports['show']=function(_0x3f29c8,_0x1adb09){var _0x254f74={'raw':!![],'where':{'id':_0x3f29c8[_0x993e('0x47')]['id']}},_0x539c9d={};_0x539c9d[_0x993e('0x32')]=_['keys'](db[_0x993e('0x43')][_0x993e('0x2f')]);_0x539c9d['query']=_[_0x993e('0x34')](_0x3f29c8[_0x993e('0x33')]);_0x539c9d[_0x993e('0x35')]=_['intersection'](_0x539c9d['model'],_0x539c9d['query']);_0x254f74[_0x993e('0x38')]=_[_0x993e('0x36')](_0x539c9d[_0x993e('0x32')],qs[_0x993e('0x37')](_0x3f29c8['query'][_0x993e('0x37')]));_0x254f74[_0x993e('0x38')]=_0x254f74[_0x993e('0x38')][_0x993e('0x39')]?_0x254f74[_0x993e('0x38')]:_0x539c9d[_0x993e('0x32')];if(_0x3f29c8['query']['includeAll']){_0x254f74[_0x993e('0x45')]=[{'all':!![]}];}_0x254f74=_[_0x993e('0x40')]({},_0x254f74,_0x3f29c8['options']);return db['ContactItemType'][_0x993e('0x48')](_0x254f74)[_0x993e('0x25')](handleEntityNotFound(_0x1adb09,null))[_0x993e('0x25')](respondWithResult(_0x1adb09,null))[_0x993e('0x49')](handleError(_0x1adb09,null));};exports[_0x993e('0x4a')]=function(_0x256ce3,_0x5b18e3){return db[_0x993e('0x43')]['create'](_0x256ce3[_0x993e('0x4b')],{})[_0x993e('0x25')](function(_0x28cf3b){var _0x402e37=_0x256ce3[_0x993e('0x4c')][_0x993e('0x27')]({'plain':!![]});if(!_0x402e37)throw new Error(_0x993e('0x4d'));if(_0x402e37[_0x993e('0x4e')]==='user'){var _0x23f09c=_0x28cf3b[_0x993e('0x27')]({'plain':!![]});var _0x8b1516='ContactItemTypes';return db[_0x993e('0x4f')]['find']({'where':{'name':_0x8b1516,'userProfileId':_0x402e37[_0x993e('0x50')]},'raw':!![]})[_0x993e('0x25')](function(_0x5cd41a){if(_0x5cd41a&&_0x5cd41a[_0x993e('0x51')]===0x0){return db[_0x993e('0x29')]['create']({'name':_0x23f09c[_0x993e('0x2c')],'resourceId':_0x23f09c['id'],'type':_0x5cd41a[_0x993e('0x2c')],'sectionId':_0x5cd41a['id']},{})[_0x993e('0x25')](function(){return _0x28cf3b;});}else{return _0x28cf3b;}})[_0x993e('0x49')](function(_0x2e368e){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2e368e);throw _0x2e368e;});}return _0x28cf3b;})['then'](respondWithResult(_0x5b18e3,0xc9))[_0x993e('0x49')](handleError(_0x5b18e3,null));};exports[_0x993e('0x52')]=function(_0x42af4f,_0x2c3df7){if(_0x42af4f[_0x993e('0x4b')]['id']){delete _0x42af4f[_0x993e('0x4b')]['id'];}return db['ContactItemType'][_0x993e('0x48')]({'where':{'id':_0x42af4f[_0x993e('0x47')]['id']}})[_0x993e('0x25')](handleEntityNotFound(_0x2c3df7,null))['then'](saveUpdates(_0x42af4f[_0x993e('0x4b')],null))['then'](respondWithResult(_0x2c3df7,null))['catch'](handleError(_0x2c3df7,null));};exports[_0x993e('0x26')]=function(_0x37d7b1,_0x511641){return db[_0x993e('0x43')]['find']({'where':{'id':_0x37d7b1[_0x993e('0x47')]['id']}})[_0x993e('0x25')](handleEntityNotFound(_0x511641,null))['then'](db['CmContactHasItem'][_0x993e('0x52')]({'ItemTypeId':null},{'where':{'ItemTypeId':_0x37d7b1[_0x993e('0x47')]['id']}}))[_0x993e('0x25')](removeEntity(_0x511641,null))[_0x993e('0x49')](handleError(_0x511641,null));};
\ No newline at end of file
index d7de1a0..2d69277 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4706=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','exports','define','tools_contact_item_types','lodash','util'];(function(_0x114df3,_0x2b8934){var _0x53262f=function(_0x30d6df){while(--_0x30d6df){_0x114df3['push'](_0x114df3['shift']());}};_0x53262f(++_0x2b8934);}(_0x4706,0x17e));var _0x6470=function(_0x3aea74,_0x5f1e71){_0x3aea74=_0x3aea74-0x0;var _0x2f72e5=_0x4706[_0x3aea74];return _0x2f72e5;};'use strict';var _=require(_0x6470('0x0'));var util=require(_0x6470('0x1'));var logger=require(_0x6470('0x2'))(_0x6470('0x3'));var moment=require(_0x6470('0x4'));var BPromise=require(_0x6470('0x5'));var rp=require(_0x6470('0x6'));var fs=require('fs');var path=require(_0x6470('0x7'));var rimraf=require(_0x6470('0x8'));var config=require('../../config/environment');var attributes=require('./contactItemType.attributes');module[_0x6470('0x9')]=function(_0x168921,_0x1caaf6){return _0x168921[_0x6470('0xa')]('ContactItemType',attributes,{'tableName':_0x6470('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x911a=['util','api','moment','bluebird','request-promise','./contactItemType.attributes','exports','define','ContactItemType','tools_contact_item_types','lodash'];(function(_0x22459f,_0x55fa7c){var _0x16e389=function(_0x4d3da6){while(--_0x4d3da6){_0x22459f['push'](_0x22459f['shift']());}};_0x16e389(++_0x55fa7c);}(_0x911a,0xd0));var _0xa911=function(_0xf60236,_0x22096d){_0xf60236=_0xf60236-0x0;var _0x1b113f=_0x911a[_0xf60236];return _0x1b113f;};'use strict';var _=require(_0xa911('0x0'));var util=require(_0xa911('0x1'));var logger=require('../../config/logger')(_0xa911('0x2'));var moment=require(_0xa911('0x3'));var BPromise=require(_0xa911('0x4'));var rp=require(_0xa911('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xa911('0x6'));module[_0xa911('0x7')]=function(_0x32c588,_0x4ecde6){return _0x32c588[_0xa911('0x8')](_0xa911('0x9'),attributes,{'tableName':_0xa911('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index bdad804..4484286 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x32ee=['error','code','message','info','result','catch','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','ContactItemType,\x20%s,\x20%s','ContactItemType,\x20%s,\x20%s,\x20%s','request\x20sent','stringify'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x32ee,0x10e));var _0xe32e=function(_0x2535c9,_0x15db59){_0x2535c9=_0x2535c9-0x0;var _0x506ac3=_0x32ee[_0x2535c9];return _0x506ac3;};'use strict';var _=require('lodash');var util=require(_0xe32e('0x0'));var moment=require(_0xe32e('0x1'));var BPromise=require('bluebird');var rs=require(_0xe32e('0x2'));var fs=require('fs');var Redis=require(_0xe32e('0x3'));var db=require(_0xe32e('0x4'))['db'];var utils=require(_0xe32e('0x5'));var logger=require(_0xe32e('0x6'))(_0xe32e('0x7'));var config=require(_0xe32e('0x8'));var jayson=require(_0xe32e('0x9'));var client=jayson[_0xe32e('0xa')][_0xe32e('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x5dc66d,_0x29110a,_0x5d610d){return new BPromise(function(_0x5a63b0,_0x29bddf){return client[_0xe32e('0xc')](_0x5dc66d,_0x5d610d)[_0xe32e('0xd')](function(_0xa3f052){logger['info'](_0xe32e('0xe'),_0x29110a,'request\x20sent');logger['debug'](_0xe32e('0xf'),_0x29110a,_0xe32e('0x10'),JSON[_0xe32e('0x11')](_0xa3f052));if(_0xa3f052[_0xe32e('0x12')]){if(_0xa3f052['error'][_0xe32e('0x13')]===0x1f4){logger[_0xe32e('0x12')](_0xe32e('0xe'),_0x29110a,_0xa3f052[_0xe32e('0x12')]['message']);return _0x29bddf(_0xa3f052[_0xe32e('0x12')]['message']);}logger[_0xe32e('0x12')]('ContactItemType,\x20%s,\x20%s',_0x29110a,_0xa3f052[_0xe32e('0x12')][_0xe32e('0x14')]);return _0x5a63b0(_0xa3f052['error'][_0xe32e('0x14')]);}else{logger[_0xe32e('0x15')](_0xe32e('0xe'),_0x29110a,_0xe32e('0x10'));_0x5a63b0(_0xa3f052[_0xe32e('0x16')][_0xe32e('0x14')]);}})[_0xe32e('0x17')](function(_0x18f0c2){logger['error'](_0xe32e('0xe'),_0x29110a,_0x18f0c2);_0x29bddf(_0x18f0c2);});});}
\ No newline at end of file
+var _0x9af1=['moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','ContactItemType,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','lodash'];(function(_0x4f9b18,_0x2cb5ca){var _0x29f20c=function(_0x268b3d){while(--_0x268b3d){_0x4f9b18['push'](_0x4f9b18['shift']());}};_0x29f20c(++_0x2cb5ca);}(_0x9af1,0x149));var _0x19af=function(_0x38e177,_0x59ec9f){_0x38e177=_0x38e177-0x0;var _0x1faf15=_0x9af1[_0x38e177];return _0x1faf15;};'use strict';var _=require(_0x19af('0x0'));var util=require('util');var moment=require(_0x19af('0x1'));var BPromise=require(_0x19af('0x2'));var rs=require(_0x19af('0x3'));var fs=require('fs');var Redis=require(_0x19af('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x19af('0x5'));var logger=require(_0x19af('0x6'))(_0x19af('0x7'));var config=require(_0x19af('0x8'));var jayson=require(_0x19af('0x9'));var client=jayson[_0x19af('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5bd9ae,_0x2ae9f2,_0x386b1b){return new BPromise(function(_0x13bb7c,_0x19624f){return client[_0x19af('0xb')](_0x5bd9ae,_0x386b1b)[_0x19af('0xc')](function(_0x3234ac){logger[_0x19af('0xd')](_0x19af('0xe'),_0x2ae9f2,_0x19af('0xf'));logger[_0x19af('0x10')]('ContactItemType,\x20%s,\x20%s,\x20%s',_0x2ae9f2,'request\x20sent',JSON[_0x19af('0x11')](_0x3234ac));if(_0x3234ac['error']){if(_0x3234ac[_0x19af('0x12')][_0x19af('0x13')]===0x1f4){logger[_0x19af('0x12')](_0x19af('0xe'),_0x2ae9f2,_0x3234ac['error'][_0x19af('0x14')]);return _0x19624f(_0x3234ac[_0x19af('0x12')]['message']);}logger['error']('ContactItemType,\x20%s,\x20%s',_0x2ae9f2,_0x3234ac[_0x19af('0x12')][_0x19af('0x14')]);return _0x13bb7c(_0x3234ac['error'][_0x19af('0x14')]);}else{logger[_0x19af('0xd')]('ContactItemType,\x20%s,\x20%s',_0x2ae9f2,_0x19af('0xf'));_0x13bb7c(_0x3234ac[_0x19af('0x15')]['message']);}})['catch'](function(_0x3ce3ac){logger['error'](_0x19af('0xe'),_0x2ae9f2,_0x3ce3ac);_0x19624f(_0x3ce3ac);});});}
\ No newline at end of file
index 3da7490..ac3592a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb790=['update','delete','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','./contactItemType.controller','get','isAuthenticated','index','/:id','show','post','create'];(function(_0x2f6b14,_0x59ea50){var _0x2bb6ef=function(_0x3b6d12){while(--_0x3b6d12){_0x2f6b14['push'](_0x2f6b14['shift']());}};_0x2bb6ef(++_0x59ea50);}(_0xb790,0x1b9));var _0x0b79=function(_0xf34895,_0x21fb70){_0xf34895=_0xf34895-0x0;var _0x143f44=_0xb790[_0xf34895];return _0x143f44;};'use strict';var multer=require(_0x0b79('0x0'));var util=require(_0x0b79('0x1'));var path=require(_0x0b79('0x2'));var timeout=require(_0x0b79('0x3'));var express=require(_0x0b79('0x4'));var router=express['Router']();var fs_extra=require(_0x0b79('0x5'));var auth=require(_0x0b79('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x0b79('0x7'));router[_0x0b79('0x8')]('/',auth[_0x0b79('0x9')](),controller[_0x0b79('0xa')]);router['get'](_0x0b79('0xb'),auth[_0x0b79('0x9')](),controller[_0x0b79('0xc')]);router[_0x0b79('0xd')]('/',auth[_0x0b79('0x9')](),controller[_0x0b79('0xe')]);router['put'](_0x0b79('0xb'),auth[_0x0b79('0x9')](),controller[_0x0b79('0xf')]);router[_0x0b79('0x10')]('/:id',auth[_0x0b79('0x9')](),controller[_0x0b79('0x11')]);module[_0x0b79('0x12')]=router;
\ No newline at end of file
+var _0xe94e=['post','create','update','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./contactItemType.controller','get','index','/:id','isAuthenticated','show'];(function(_0x420b24,_0x382adc){var _0x4da552=function(_0x4e1623){while(--_0x4e1623){_0x420b24['push'](_0x420b24['shift']());}};_0x4da552(++_0x382adc);}(_0xe94e,0x1e0));var _0xee94=function(_0x412ae9,_0x13f88c){_0x412ae9=_0x412ae9-0x0;var _0x5ec05e=_0xe94e[_0x412ae9];return _0x5ec05e;};'use strict';var multer=require(_0xee94('0x0'));var util=require(_0xee94('0x1'));var path=require(_0xee94('0x2'));var timeout=require('connect-timeout');var express=require(_0xee94('0x3'));var router=express[_0xee94('0x4')]();var fs_extra=require(_0xee94('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xee94('0x6'));var config=require(_0xee94('0x7'));var controller=require(_0xee94('0x8'));router[_0xee94('0x9')]('/',auth['isAuthenticated'](),controller[_0xee94('0xa')]);router[_0xee94('0x9')](_0xee94('0xb'),auth[_0xee94('0xc')](),controller[_0xee94('0xd')]);router[_0xee94('0xe')]('/',auth['isAuthenticated'](),controller[_0xee94('0xf')]);router['put'](_0xee94('0xb'),auth[_0xee94('0xc')](),controller[_0xee94('0x10')]);router['delete'](_0xee94('0xb'),auth[_0xee94('0xc')](),controller[_0xee94('0x11')]);module[_0xee94('0x12')]=router;
\ No newline at end of file
index d978fa9..f8f7250 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd8b0=['exports','sequelize'];(function(_0xe4ba23,_0x366307){var _0x23dc13=function(_0x2a60d5){while(--_0x2a60d5){_0xe4ba23['push'](_0xe4ba23['shift']());}};_0x23dc13(++_0x366307);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require(_0x0d8b('0x0'));module[_0x0d8b('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':'name'},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xd8b0=['exports','sequelize'];(function(_0x3ee487,_0x3e1a08){var _0x12be90=function(_0x2e458b){while(--_0x2e458b){_0x3ee487['push'](_0x3ee487['shift']());}};_0x12be90(++_0x3e1a08);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require(_0x0d8b('0x0'));module[_0x0d8b('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':'name'},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
index d47ce3b..3316dc9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4c0e=['filter','where','merge','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','createdAt','updatedAt','update','attrUrl','attrs','value','https://','custom','attrPath','clock','attrHourFormat','HH:mm:ss','attrTimezone','attrFontSize','attrMetric','total','attrVoiceQueues','attrChannel','voice','attrEmailAccounts','attrFaxAccounts','attrSmsAccounts','attrOpenchannelAccounts','attrWhatsappAccounts','attrChatWebsites','pie-chart','attrSerie1','attrSerie2','attrSerie3','web-report','attrReport','reportType','attrRefresh','widgetAttributes:\x20%s','stringify','addItem','DashboardItem','getItems','order','eml-format','fast-json-patch','moment','bluebird','util','path','to-csv','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./dashboard.socket','register','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','apply','save','then','destroy','CustomDashboards','error','stack','name','send','index','map','Dashboard','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','pick'];(function(_0x39c734,_0x2f3e06){var _0xb2a2f9=function(_0x502f3f){while(--_0x502f3f){_0x39c734['push'](_0x39c734['shift']());}};_0xb2a2f9(++_0x2f3e06);}(_0x4c0e,0x13d));var _0xe4c0=function(_0x323419,_0x2a6172){_0x323419=_0x323419-0x0;var _0x4c0be7=_0x4c0e[_0x323419];return _0x4c0be7;};'use strict';var emlformat=require(_0xe4c0('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xe4c0('0x1'));var rp=require('request-promise');var moment=require(_0xe4c0('0x2'));var BPromise=require(_0xe4c0('0x3'));var Mustache=require('mustache');var util=require(_0xe4c0('0x4'));var path=require(_0xe4c0('0x5'));var sox=require('sox');var csv=require(_0xe4c0('0x6'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require(_0xe4c0('0x7'));var jsforce=require(_0xe4c0('0x8'));var deskjs=require(_0xe4c0('0x9'));var toCsv=require(_0xe4c0('0x6'));var querystring=require(_0xe4c0('0xa'));var Papa=require(_0xe4c0('0xb'));var Redis=require(_0xe4c0('0xc'));var authService=require('../../components/auth/service');var qs=require(_0xe4c0('0xd'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xe4c0('0xe'));var logger=require(_0xe4c0('0xf'))('api');var utils=require(_0xe4c0('0x10'));var config=require(_0xe4c0('0x11'));var licenseUtil=require(_0xe4c0('0x12'));var db=require(_0xe4c0('0x13'))['db'];config[_0xe4c0('0x14')]=_[_0xe4c0('0x15')](config['redis'],{'host':_0xe4c0('0x16'),'port':0x18eb});var socket=require(_0xe4c0('0x17'))(new Redis(config['redis']));require(_0xe4c0('0x18'))[_0xe4c0('0x19')](socket);function respondWithStatusCode(_0x43469a,_0x1aac2a){_0x1aac2a=_0x1aac2a||0xcc;return function(_0x18922a){if(_0x18922a){return _0x43469a[_0xe4c0('0x1a')](_0x1aac2a);}return _0x43469a[_0xe4c0('0x1b')](_0x1aac2a)[_0xe4c0('0x1c')]();};}function respondWithResult(_0x517709,_0x58a04a){_0x58a04a=_0x58a04a||0xc8;return function(_0xd47f09){if(_0xd47f09){return _0x517709['status'](_0x58a04a)['json'](_0xd47f09);}};}function respondWithFilteredResult(_0x302dd9,_0x3eca33){return function(_0x487cc7){if(_0x487cc7){var _0x51795b=typeof _0x3eca33[_0xe4c0('0x1d')]===_0xe4c0('0x1e')&&typeof _0x3eca33[_0xe4c0('0x1f')]===_0xe4c0('0x1e');var _0x5bfae3=_0x487cc7[_0xe4c0('0x20')];var _0x38b4b9=_0x51795b?0x0:_0x3eca33['offset'];var _0x472076=_0x51795b?_0x487cc7[_0xe4c0('0x20')]:_0x3eca33[_0xe4c0('0x1d')]+_0x3eca33[_0xe4c0('0x1f')];var _0x302a60;if(_0x472076>=_0x5bfae3){_0x472076=_0x5bfae3;_0x302a60=0xc8;}else{_0x302a60=0xce;}_0x302dd9[_0xe4c0('0x1b')](_0x302a60);return _0x302dd9[_0xe4c0('0x21')](_0xe4c0('0x22'),_0x38b4b9+'-'+_0x472076+'/'+_0x5bfae3)[_0xe4c0('0x23')](_0x487cc7);}return null;};}function patchUpdates(_0x2f5ee8){return function(_0x3afc03){try{jsonpatch[_0xe4c0('0x24')](_0x3afc03,_0x2f5ee8,!![]);}catch(_0x3fb96e){return BPromise['reject'](_0x3fb96e);}return _0x3afc03[_0xe4c0('0x25')]();};}function saveUpdates(_0x219bc5,_0x1e58bb){return function(_0x16e444){if(_0x16e444){return _0x16e444['update'](_0x219bc5)[_0xe4c0('0x26')](function(_0x17ffa2){return _0x17ffa2;});}return null;};}function removeEntity(_0x18b2e3,_0x102cef){return function(_0x5d4c90){if(_0x5d4c90){return _0x5d4c90[_0xe4c0('0x27')]()[_0xe4c0('0x26')](function(){var _0xbaf0c4=_0x5d4c90['get']({'plain':!![]});var _0x526977=_0xe4c0('0x28');return db['UserProfileResource'][_0xe4c0('0x27')]({'where':{'type':_0x526977,'resourceId':_0xbaf0c4['id']}})[_0xe4c0('0x26')](function(){return _0x5d4c90;});})[_0xe4c0('0x26')](function(){_0x18b2e3['status'](0xcc)[_0xe4c0('0x1c')]();});}};}function handleEntityNotFound(_0x120492,_0x132b24){return function(_0x4dbc8e){if(!_0x4dbc8e){_0x120492[_0xe4c0('0x1a')](0x194);}return _0x4dbc8e;};}function handleError(_0x1ffcc9,_0x131cb5){_0x131cb5=_0x131cb5||0x1f4;return function(_0xc8555e){logger[_0xe4c0('0x29')](_0xc8555e[_0xe4c0('0x2a')]);if(_0xc8555e[_0xe4c0('0x2b')]){delete _0xc8555e[_0xe4c0('0x2b')];}_0x1ffcc9[_0xe4c0('0x1b')](_0x131cb5)[_0xe4c0('0x2c')](_0xc8555e);};}exports[_0xe4c0('0x2d')]=function(_0x4fd624,_0x1a47a4){var _0x57aad3={},_0x5f48cd={},_0x52eb1a={'count':0x0,'rows':[]};var _0x21fcfd=_[_0xe4c0('0x2e')](db[_0xe4c0('0x2f')][_0xe4c0('0x30')],function(_0x8f146){return{'name':_0x8f146[_0xe4c0('0x31')],'type':_0x8f146[_0xe4c0('0x32')][_0xe4c0('0x33')]};});_0x5f48cd[_0xe4c0('0x34')]=_[_0xe4c0('0x2e')](_0x21fcfd,'name');_0x5f48cd[_0xe4c0('0x35')]=_[_0xe4c0('0x36')](_0x4fd624[_0xe4c0('0x35')]);_0x5f48cd[_0xe4c0('0x37')]=_['intersection'](_0x5f48cd[_0xe4c0('0x34')],_0x5f48cd[_0xe4c0('0x35')]);_0x57aad3[_0xe4c0('0x38')]=_[_0xe4c0('0x39')](_0x5f48cd[_0xe4c0('0x34')],qs[_0xe4c0('0x3a')](_0x4fd624['query'][_0xe4c0('0x3a')]));_0x57aad3[_0xe4c0('0x38')]=_0x57aad3[_0xe4c0('0x38')][_0xe4c0('0x3b')]?_0x57aad3[_0xe4c0('0x38')]:_0x5f48cd['model'];if(!_0x4fd624[_0xe4c0('0x35')][_0xe4c0('0x3c')](_0xe4c0('0x3d'))){_0x57aad3['limit']=qs[_0xe4c0('0x1f')](_0x4fd624[_0xe4c0('0x35')][_0xe4c0('0x1f')]);_0x57aad3[_0xe4c0('0x1d')]=qs[_0xe4c0('0x1d')](_0x4fd624[_0xe4c0('0x35')]['offset']);}_0x57aad3['order']=qs[_0xe4c0('0x3e')](_0x4fd624['query'][_0xe4c0('0x3e')]);_0x57aad3['where']=qs[_0xe4c0('0x37')](_[_0xe4c0('0x3f')](_0x4fd624[_0xe4c0('0x35')],_0x5f48cd[_0xe4c0('0x37')]),_0x21fcfd);if(_0x4fd624[_0xe4c0('0x35')][_0xe4c0('0x40')]){_0x57aad3[_0xe4c0('0x41')]=_['merge'](_0x57aad3['where'],{'$or':_[_0xe4c0('0x2e')](_0x21fcfd,function(_0x1d195b){if(_0x1d195b[_0xe4c0('0x32')]!=='VIRTUAL'){var _0x309ae0={};_0x309ae0[_0x1d195b['name']]={'$like':'%'+_0x4fd624[_0xe4c0('0x35')]['filter']+'%'};return _0x309ae0;}})});}_0x57aad3=_[_0xe4c0('0x42')]({},_0x57aad3,_0x4fd624[_0xe4c0('0x43')]);var _0x36d012={'where':_0x57aad3[_0xe4c0('0x41')]};return db[_0xe4c0('0x2f')][_0xe4c0('0x20')](_0x36d012)[_0xe4c0('0x26')](function(_0x3d431d){_0x52eb1a[_0xe4c0('0x20')]=_0x3d431d;if(_0x4fd624[_0xe4c0('0x35')][_0xe4c0('0x44')]){_0x57aad3[_0xe4c0('0x45')]=[{'all':!![]}];}return db[_0xe4c0('0x2f')][_0xe4c0('0x46')](_0x57aad3);})[_0xe4c0('0x26')](function(_0x4ab6e6){_0x52eb1a[_0xe4c0('0x47')]=_0x4ab6e6;return _0x52eb1a;})[_0xe4c0('0x26')](respondWithFilteredResult(_0x1a47a4,_0x57aad3))[_0xe4c0('0x48')](handleError(_0x1a47a4,null));};exports[_0xe4c0('0x49')]=function(_0x3b92a1,_0x42dfee){var _0x1171a0={'raw':![],'where':{'id':_0x3b92a1[_0xe4c0('0x4a')]['id']}},_0x20a02c={};_0x20a02c['model']=_[_0xe4c0('0x36')](db[_0xe4c0('0x2f')][_0xe4c0('0x30')]);_0x20a02c[_0xe4c0('0x35')]=_[_0xe4c0('0x36')](_0x3b92a1[_0xe4c0('0x35')]);_0x20a02c[_0xe4c0('0x37')]=_['intersection'](_0x20a02c[_0xe4c0('0x34')],_0x20a02c[_0xe4c0('0x35')]);_0x1171a0['attributes']=_[_0xe4c0('0x39')](_0x20a02c['model'],qs[_0xe4c0('0x3a')](_0x3b92a1[_0xe4c0('0x35')][_0xe4c0('0x3a')]));_0x1171a0['attributes']=_0x1171a0[_0xe4c0('0x38')][_0xe4c0('0x3b')]?_0x1171a0[_0xe4c0('0x38')]:_0x20a02c[_0xe4c0('0x34')];if(_0x3b92a1[_0xe4c0('0x35')][_0xe4c0('0x44')]){_0x1171a0['include']=[{'all':!![]}];}_0x1171a0=_[_0xe4c0('0x42')]({},_0x1171a0,_0x3b92a1[_0xe4c0('0x43')]);return db[_0xe4c0('0x2f')][_0xe4c0('0x4b')](_0x1171a0)[_0xe4c0('0x26')](handleEntityNotFound(_0x42dfee,null))[_0xe4c0('0x26')](respondWithResult(_0x42dfee,null))[_0xe4c0('0x48')](handleError(_0x42dfee,null));};exports[_0xe4c0('0x4c')]=function(_0x2c42ec,_0x1e65fe){return db['Dashboard'][_0xe4c0('0x4c')](_0x2c42ec[_0xe4c0('0x4d')],{})[_0xe4c0('0x26')](function(_0x3717b0){var _0x55d705=_0x2c42ec['user'][_0xe4c0('0x4e')]({'plain':!![]});if(!_0x55d705)throw new Error(_0xe4c0('0x4f'));if(_0x55d705[_0xe4c0('0x50')]===_0xe4c0('0x51')){var _0x210e3c=_0x3717b0[_0xe4c0('0x4e')]({'plain':!![]});var _0x5c6966='CustomDashboards';return db[_0xe4c0('0x52')]['find']({'where':{'name':_0x5c6966,'userProfileId':_0x55d705[_0xe4c0('0x53')]},'raw':!![]})[_0xe4c0('0x26')](function(_0x32e82c){if(_0x32e82c&&_0x32e82c[_0xe4c0('0x54')]===0x0){return db[_0xe4c0('0x55')][_0xe4c0('0x4c')]({'name':_0x210e3c[_0xe4c0('0x2b')],'resourceId':_0x210e3c['id'],'type':_0x32e82c[_0xe4c0('0x2b')],'sectionId':_0x32e82c['id']},{})[_0xe4c0('0x26')](function(){return _0x3717b0;});}else{return _0x3717b0;}})[_0xe4c0('0x48')](function(_0x3d674b){logger[_0xe4c0('0x29')](_0xe4c0('0x56'),_0x3d674b);throw _0x3d674b;});}return _0x3717b0;})[_0xe4c0('0x26')](respondWithResult(_0x1e65fe,0xc9))[_0xe4c0('0x48')](handleError(_0x1e65fe,null));};exports[_0xe4c0('0x57')]=function(_0x33da39,_0x11251b){var _0x50ec1b={'where':{'id':_0x33da39[_0xe4c0('0x4a')]['id']}},_0x26dea6={};_0x26dea6['model']=_[_0xe4c0('0x36')](db[_0xe4c0('0x2f')][_0xe4c0('0x30')]);_0x50ec1b[_0xe4c0('0x38')]=_[_0xe4c0('0x39')](_0x26dea6[_0xe4c0('0x34')],qs[_0xe4c0('0x3a')](_0x33da39[_0xe4c0('0x35')][_0xe4c0('0x3a')]));_0x50ec1b[_0xe4c0('0x38')]=_0x50ec1b['attributes'][_0xe4c0('0x3b')]?_0x50ec1b[_0xe4c0('0x38')]:_0x26dea6['model'];if(_0x33da39['query'][_0xe4c0('0x44')]){_0x50ec1b['include']=[{'all':!![]}];}_0x50ec1b=_[_0xe4c0('0x42')]({},_0x50ec1b,_0x33da39['options']);return db['Dashboard'][_0xe4c0('0x4b')](_0x50ec1b)[_0xe4c0('0x26')](handleEntityNotFound(_0x11251b,null))[_0xe4c0('0x26')](function(_0x55f097){if(_0x55f097){var _0x4369a2=_0x55f097[_0xe4c0('0x4e')]({'plain':!![]});_0x4369a2=qs['omit'](_0x4369a2,['id',_0xe4c0('0x58'),'updatedAt']);_0x33da39['body']=_['omit'](_0x33da39['body'],['id',_0xe4c0('0x58'),_0xe4c0('0x59')]);return db[_0xe4c0('0x2f')][_0xe4c0('0x4c')](_[_0xe4c0('0x42')](_0x4369a2,_0x33da39[_0xe4c0('0x4d')]),{'include':_0x33da39[_0xe4c0('0x35')]['includeAll']?[{'all':!![]}]:undefined})[_0xe4c0('0x26')](function(_0x13b301){var _0x4b5c5e=_0x33da39[_0xe4c0('0x51')][_0xe4c0('0x4e')]({'plain':!![]});if(!_0x4b5c5e)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x4b5c5e[_0xe4c0('0x50')]===_0xe4c0('0x51')){var _0x10309c=_0x13b301[_0xe4c0('0x4e')]({'plain':!![]});var _0x16e9bf=_0xe4c0('0x28');return db['UserProfileSection'][_0xe4c0('0x4b')]({'where':{'name':_0x16e9bf,'userProfileId':_0x4b5c5e[_0xe4c0('0x53')]},'raw':!![]})['then'](function(_0x69e3f6){if(_0x69e3f6&&_0x69e3f6[_0xe4c0('0x54')]===0x0){return db['UserProfileResource'][_0xe4c0('0x4c')]({'name':_0x10309c['name'],'resourceId':_0x10309c['id'],'type':_0x69e3f6[_0xe4c0('0x2b')],'sectionId':_0x69e3f6['id']},{})['then'](function(){return _0x13b301;});}else{return _0x13b301;}})['catch'](function(_0x4b633a){logger[_0xe4c0('0x29')](_0xe4c0('0x56'),_0x4b633a);throw _0x4b633a;});}return _0x13b301;});}})['then'](respondWithResult(_0x11251b,0xc9))[_0xe4c0('0x48')](handleError(_0x11251b,null));};exports[_0xe4c0('0x5a')]=function(_0x2d7600,_0x2a62e7){if(_0x2d7600['body']['id']){delete _0x2d7600[_0xe4c0('0x4d')]['id'];}return db[_0xe4c0('0x2f')][_0xe4c0('0x4b')]({'where':{'id':_0x2d7600[_0xe4c0('0x4a')]['id']}})[_0xe4c0('0x26')](handleEntityNotFound(_0x2a62e7,null))['then'](saveUpdates(_0x2d7600['body'],null))[_0xe4c0('0x26')](respondWithResult(_0x2a62e7,null))[_0xe4c0('0x48')](handleError(_0x2a62e7,null));};exports['destroy']=function(_0x5da268,_0x282940){return db[_0xe4c0('0x2f')][_0xe4c0('0x4b')]({'where':{'id':_0x5da268[_0xe4c0('0x4a')]['id']}})[_0xe4c0('0x26')](handleEntityNotFound(_0x282940,null))['then'](removeEntity(_0x282940,null))[_0xe4c0('0x48')](handleError(_0x282940,null));};function widgetAttributes(_0x10c87a){try{switch(_0x10c87a[_0xe4c0('0x32')]){case'iframe':return[{'name':'attrUrl','value':_0x10c87a[_0xe4c0('0x5b')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a[_0xe4c0('0x5c')][0x0]?_0x10c87a[_0xe4c0('0x5c')][0x0][_0xe4c0('0x5d')]:undefined)||_0xe4c0('0x5e')}];case _0xe4c0('0x5f'):return[{'name':'attrPath','value':_0x10c87a[_0xe4c0('0x60')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a[_0xe4c0('0x5c')][0x0]?_0x10c87a[_0xe4c0('0x5c')][0x0][_0xe4c0('0x5d')]:undefined)||''}];case _0xe4c0('0x61'):return[{'name':_0xe4c0('0x62'),'value':_0x10c87a[_0xe4c0('0x62')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a[_0xe4c0('0x5c')][0x0]?_0x10c87a[_0xe4c0('0x5c')][0x0][_0xe4c0('0x5d')]:undefined)||_0xe4c0('0x63')},{'name':'attrTimezone','value':_0x10c87a[_0xe4c0('0x64')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a[_0xe4c0('0x5c')][0x1]?_0x10c87a[_0xe4c0('0x5c')][0x1][_0xe4c0('0x5d')]:undefined)||'0.00'},{'name':'attrFontSize','value':_0x10c87a[_0xe4c0('0x65')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a[_0xe4c0('0x5c')][0x2]?_0x10c87a[_0xe4c0('0x5c')][0x2][_0xe4c0('0x5d')]:undefined)||0xc}];case'counter':return[{'name':_0xe4c0('0x66'),'value':_0x10c87a[_0xe4c0('0x66')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a[_0xe4c0('0x5c')][0x0]?_0x10c87a[_0xe4c0('0x5c')][0x0][_0xe4c0('0x5d')]:undefined)||_0xe4c0('0x67')},{'name':_0xe4c0('0x68'),'value':_0x10c87a['attrVoiceQueues']||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a['attrs'][0x1]?_0x10c87a[_0xe4c0('0x5c')][0x1][_0xe4c0('0x5d')]:undefined)||[]},{'name':_0xe4c0('0x65'),'value':_0x10c87a['attrFontSize']||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a[_0xe4c0('0x5c')][0x2]?_0x10c87a['attrs'][0x2][_0xe4c0('0x5d')]:undefined)||0x14},{'name':'attrChannel','value':_0x10c87a[_0xe4c0('0x69')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a[_0xe4c0('0x5c')][0x3]?_0x10c87a[_0xe4c0('0x5c')][0x3][_0xe4c0('0x5d')]:undefined)||_0xe4c0('0x6a')},{'name':_0xe4c0('0x6b'),'value':_0x10c87a[_0xe4c0('0x6b')]||(_0x10c87a['attrs']&&_0x10c87a[_0xe4c0('0x5c')][0x4]?_0x10c87a[_0xe4c0('0x5c')][0x4][_0xe4c0('0x5d')]:undefined)||''},{'name':_0xe4c0('0x6c'),'value':_0x10c87a[_0xe4c0('0x6c')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a['attrs'][0x5]?_0x10c87a[_0xe4c0('0x5c')][0x5]['value']:undefined)||''},{'name':_0xe4c0('0x6d'),'value':_0x10c87a[_0xe4c0('0x6d')]||(_0x10c87a['attrs']&&_0x10c87a[_0xe4c0('0x5c')][0x6]?_0x10c87a['attrs'][0x6][_0xe4c0('0x5d')]:undefined)||''},{'name':'attrOpenchannelAccounts','value':_0x10c87a[_0xe4c0('0x6e')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a[_0xe4c0('0x5c')][0x7]?_0x10c87a[_0xe4c0('0x5c')][0x7][_0xe4c0('0x5d')]:undefined)||''},{'name':'attrWhatsappAccounts','value':_0x10c87a[_0xe4c0('0x6f')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a[_0xe4c0('0x5c')][0x8]?_0x10c87a[_0xe4c0('0x5c')][0x8]['value']:undefined)||''},{'name':_0xe4c0('0x70'),'value':_0x10c87a[_0xe4c0('0x70')]||(_0x10c87a['attrs']&&_0x10c87a[_0xe4c0('0x5c')][0x9]?_0x10c87a['attrs'][0x9][_0xe4c0('0x5d')]:undefined)||''}];case'multibar-chart':case _0xe4c0('0x71'):return[{'name':'attrSerie1','value':_0x10c87a[_0xe4c0('0x72')]||(_0x10c87a['attrs']&&_0x10c87a[_0xe4c0('0x5c')][0x0]?_0x10c87a['attrs'][0x0][_0xe4c0('0x5d')]:undefined)||_0xe4c0('0x67')},{'name':_0xe4c0('0x73'),'value':_0x10c87a['attrSerie2']||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a[_0xe4c0('0x5c')][0x1]?_0x10c87a[_0xe4c0('0x5c')][0x1][_0xe4c0('0x5d')]:undefined)||null},{'name':_0xe4c0('0x74'),'value':_0x10c87a[_0xe4c0('0x74')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a[_0xe4c0('0x5c')][0x2]?_0x10c87a[_0xe4c0('0x5c')][0x2]['value']:undefined)||null},{'name':_0xe4c0('0x68'),'value':_0x10c87a[_0xe4c0('0x68')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a['attrs'][0x3]?_0x10c87a[_0xe4c0('0x5c')][0x3][_0xe4c0('0x5d')]:undefined)||[]},{'name':_0xe4c0('0x69'),'value':_0x10c87a[_0xe4c0('0x69')]||(_0x10c87a['attrs']&&_0x10c87a[_0xe4c0('0x5c')][0x4]?_0x10c87a['attrs'][0x4]['value']:undefined)||_0xe4c0('0x6a')},{'name':_0xe4c0('0x6b'),'value':_0x10c87a[_0xe4c0('0x6b')]||(_0x10c87a['attrs']&&_0x10c87a[_0xe4c0('0x5c')][0x5]?_0x10c87a['attrs'][0x5][_0xe4c0('0x5d')]:undefined)||''},{'name':_0xe4c0('0x6c'),'value':_0x10c87a[_0xe4c0('0x6c')]||(_0x10c87a['attrs']&&_0x10c87a['attrs'][0x6]?_0x10c87a[_0xe4c0('0x5c')][0x6][_0xe4c0('0x5d')]:undefined)||''},{'name':_0xe4c0('0x6d'),'value':_0x10c87a[_0xe4c0('0x6d')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a['attrs'][0x7]?_0x10c87a[_0xe4c0('0x5c')][0x7][_0xe4c0('0x5d')]:undefined)||''},{'name':'attrOpenchannelAccounts','value':_0x10c87a[_0xe4c0('0x6e')]||(_0x10c87a['attrs']&&_0x10c87a[_0xe4c0('0x5c')][0x8]?_0x10c87a[_0xe4c0('0x5c')][0x8][_0xe4c0('0x5d')]:undefined)||''},{'name':_0xe4c0('0x6f'),'value':_0x10c87a['attrWhatsappAccounts']||(_0x10c87a['attrs']&&_0x10c87a['attrs'][0x9]?_0x10c87a[_0xe4c0('0x5c')][0x9]['value']:undefined)||''},{'name':_0xe4c0('0x70'),'value':_0x10c87a[_0xe4c0('0x70')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a[_0xe4c0('0x5c')][0xa]?_0x10c87a[_0xe4c0('0x5c')][0xa][_0xe4c0('0x5d')]:undefined)||''}];case _0xe4c0('0x75'):return[{'name':_0xe4c0('0x76'),'type':_0x10c87a[_0xe4c0('0x77')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a['attrs'][0x0]?_0x10c87a[_0xe4c0('0x5c')][0x0][_0xe4c0('0x32')]:undefined)||null,'value':_0x10c87a[_0xe4c0('0x76')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a[_0xe4c0('0x5c')][0x0]?_0x10c87a[_0xe4c0('0x5c')][0x0][_0xe4c0('0x5d')]:undefined)||null},{'name':_0xe4c0('0x78'),'value':_0x10c87a[_0xe4c0('0x78')]||(_0x10c87a[_0xe4c0('0x5c')]&&_0x10c87a[_0xe4c0('0x5c')][0x1]?_0x10c87a[_0xe4c0('0x5c')][0x1][_0xe4c0('0x5d')]:undefined)||0x0}];default:return[];}}catch(_0x22effc){logger['error'](_0xe4c0('0x79'),JSON[_0xe4c0('0x7a')](_0x22effc));return[];}}exports[_0xe4c0('0x7b')]=function(_0x142d8f,_0x40236d,_0x28c99d){if(_0x142d8f['body']['id']){delete _0x142d8f[_0xe4c0('0x4d')]['id'];}return db[_0xe4c0('0x2f')][_0xe4c0('0x4b')]({'where':{'id':_0x142d8f['params']['id']}})[_0xe4c0('0x26')](handleEntityNotFound(_0x40236d,null))[_0xe4c0('0x26')](function(_0xc0b61){if(_0xc0b61){_0x142d8f['body']['DashboardId']=_0xc0b61['id'];_0x142d8f[_0xe4c0('0x4d')][_0xe4c0('0x5c')]=widgetAttributes(_0x142d8f[_0xe4c0('0x4d')]);return db[_0xe4c0('0x7c')]['create'](_0x142d8f[_0xe4c0('0x4d')]);}})[_0xe4c0('0x26')](respondWithResult(_0x40236d,null))[_0xe4c0('0x48')](handleError(_0x40236d,null));};exports[_0xe4c0('0x7d')]=function(_0x3212cb,_0x113d39,_0x53971e){var _0x5e9dda={};var _0x193219={};var _0x154bbe;var _0x779020;return db[_0xe4c0('0x2f')]['findOne']({'where':{'id':_0x3212cb[_0xe4c0('0x4a')]['id']}})['then'](handleEntityNotFound(_0x113d39,null))[_0xe4c0('0x26')](function(_0x31cccf){if(_0x31cccf){_0x154bbe=_0x31cccf;_0x193219[_0xe4c0('0x34')]=_[_0xe4c0('0x36')](db['DashboardItem'][_0xe4c0('0x30')]);_0x193219[_0xe4c0('0x35')]=_[_0xe4c0('0x36')](_0x3212cb['query']);_0x193219[_0xe4c0('0x37')]=_[_0xe4c0('0x39')](_0x193219['model'],_0x193219[_0xe4c0('0x35')]);_0x5e9dda['attributes']=_[_0xe4c0('0x39')](_0x193219['model'],qs['fields'](_0x3212cb[_0xe4c0('0x35')][_0xe4c0('0x3a')]));_0x5e9dda['attributes']=_0x5e9dda[_0xe4c0('0x38')][_0xe4c0('0x3b')]?_0x5e9dda[_0xe4c0('0x38')]:_0x193219['model'];_0x5e9dda[_0xe4c0('0x7e')]=qs['sort'](_0x3212cb[_0xe4c0('0x35')]['sort']);_0x5e9dda[_0xe4c0('0x41')]=qs['filters'](_['pick'](_0x3212cb[_0xe4c0('0x35')],_0x193219[_0xe4c0('0x37')]));if(_0x3212cb[_0xe4c0('0x35')][_0xe4c0('0x40')]){_0x5e9dda[_0xe4c0('0x41')]=_[_0xe4c0('0x42')](_0x5e9dda['where'],{'$or':_[_0xe4c0('0x2e')](_0x5e9dda[_0xe4c0('0x38')],function(_0x193a2e){var _0x4abf8f={};_0x4abf8f[_0x193a2e]={'$like':'%'+_0x3212cb[_0xe4c0('0x35')][_0xe4c0('0x40')]+'%'};return _0x4abf8f;})});}_0x5e9dda=_['merge']({},_0x5e9dda,_0x3212cb[_0xe4c0('0x43')]);return _0x154bbe[_0xe4c0('0x7d')](_0x5e9dda);}})['then'](function(_0x11917e){if(_0x11917e){_0x779020=_0x11917e[_0xe4c0('0x3b')];if(!_0x3212cb[_0xe4c0('0x35')][_0xe4c0('0x3c')](_0xe4c0('0x3d'))){_0x5e9dda[_0xe4c0('0x1f')]=qs['limit'](_0x3212cb[_0xe4c0('0x35')]['limit']);_0x5e9dda[_0xe4c0('0x1d')]=qs[_0xe4c0('0x1d')](_0x3212cb[_0xe4c0('0x35')][_0xe4c0('0x1d')]);}return _0x154bbe[_0xe4c0('0x7d')](_0x5e9dda);}})[_0xe4c0('0x26')](function(_0x828f87){if(_0x828f87){return _0x828f87?{'count':_0x779020,'rows':_0x828f87}:null;}})['then'](respondWithResult(_0x113d39,null))[_0xe4c0('0x48')](handleError(_0x113d39,null));};
\ No newline at end of file
+var _0x1872=['error','name','send','index','map','fieldName','type','key','model','query','attributes','intersection','fields','length','hasOwnProperty','order','sort','filters','pick','filter','merge','where','VIRTUAL','options','Dashboard','includeAll','include','findAll','rows','catch','show','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','get','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','clone','params','keys','rawAttributes','omit','updatedAt','UserProfileSection','update','iframe','attrUrl','attrs','value','custom','attrPath','clock','attrHourFormat','HH:mm:ss','attrTimezone','0.00','attrFontSize','counter','attrMetric','attrVoiceQueues','attrChannel','voice','attrEmailAccounts','attrFaxAccounts','attrOpenchannelAccounts','attrWhatsappAccounts','attrChatWebsites','multibar-chart','pie-chart','attrSerie1','total','attrSerie3','attrSmsAccounts','web-report','attrReport','reportType','attrRefresh','addItem','DashboardId','DashboardItem','findOne','nolimit','getItems','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','./dashboard.socket','sendStatus','status','end','json','limit','count','offset','set','Content-Range','apply','reject','save','then','CustomDashboards','UserProfileResource','destroy'];(function(_0x4c8a3d,_0x174bd2){var _0xbf1010=function(_0x2f94ea){while(--_0x2f94ea){_0x4c8a3d['push'](_0x4c8a3d['shift']());}};_0xbf1010(++_0x174bd2);}(_0x1872,0x157));var _0x2187=function(_0xda127b,_0x3792b4){_0xda127b=_0xda127b-0x0;var _0x4f9ddb=_0x1872[_0xda127b];return _0x4f9ddb;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x2187('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0x2187('0x1'));var moment=require(_0x2187('0x2'));var BPromise=require('bluebird');var Mustache=require(_0x2187('0x3'));var util=require(_0x2187('0x4'));var path=require(_0x2187('0x5'));var sox=require(_0x2187('0x6'));var csv=require(_0x2187('0x7'));var ejs=require(_0x2187('0x8'));var fs=require('fs');var fs_extra=require(_0x2187('0x9'));var _=require(_0x2187('0xa'));var squel=require('squel');var crypto=require(_0x2187('0xb'));var jsforce=require(_0x2187('0xc'));var deskjs=require(_0x2187('0xd'));var toCsv=require(_0x2187('0x7'));var querystring=require(_0x2187('0xe'));var Papa=require(_0x2187('0xf'));var Redis=require(_0x2187('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x2187('0x11'));var as=require(_0x2187('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x2187('0x13'))(_0x2187('0x14'));var utils=require(_0x2187('0x15'));var config=require(_0x2187('0x16'));var licenseUtil=require(_0x2187('0x17'));var db=require(_0x2187('0x18'))['db'];config[_0x2187('0x19')]=_[_0x2187('0x1a')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x2187('0x19')]));require(_0x2187('0x1b'))['register'](socket);function respondWithStatusCode(_0x535474,_0x12736f){_0x12736f=_0x12736f||0xcc;return function(_0x59a641){if(_0x59a641){return _0x535474[_0x2187('0x1c')](_0x12736f);}return _0x535474[_0x2187('0x1d')](_0x12736f)[_0x2187('0x1e')]();};}function respondWithResult(_0x684ca5,_0x30311e){_0x30311e=_0x30311e||0xc8;return function(_0x5ff2d){if(_0x5ff2d){return _0x684ca5[_0x2187('0x1d')](_0x30311e)[_0x2187('0x1f')](_0x5ff2d);}};}function respondWithFilteredResult(_0x321f99,_0x548796){return function(_0x13c8bb){if(_0x13c8bb){var _0x2022aa=typeof _0x548796['offset']==='undefined'&&typeof _0x548796[_0x2187('0x20')]==='undefined';var _0x43cb1f=_0x13c8bb[_0x2187('0x21')];var _0x2fe4dc=_0x2022aa?0x0:_0x548796[_0x2187('0x22')];var _0x5c603d=_0x2022aa?_0x13c8bb[_0x2187('0x21')]:_0x548796['offset']+_0x548796['limit'];var _0x5e1437;if(_0x5c603d>=_0x43cb1f){_0x5c603d=_0x43cb1f;_0x5e1437=0xc8;}else{_0x5e1437=0xce;}_0x321f99[_0x2187('0x1d')](_0x5e1437);return _0x321f99[_0x2187('0x23')](_0x2187('0x24'),_0x2fe4dc+'-'+_0x5c603d+'/'+_0x43cb1f)[_0x2187('0x1f')](_0x13c8bb);}return null;};}function patchUpdates(_0xd9f554){return function(_0x20b939){try{jsonpatch[_0x2187('0x25')](_0x20b939,_0xd9f554,!![]);}catch(_0x314f1b){return BPromise[_0x2187('0x26')](_0x314f1b);}return _0x20b939[_0x2187('0x27')]();};}function saveUpdates(_0x6d5093,_0x1d02b2){return function(_0x240ef5){if(_0x240ef5){return _0x240ef5['update'](_0x6d5093)[_0x2187('0x28')](function(_0x2fc675){return _0x2fc675;});}return null;};}function removeEntity(_0x4c0af0,_0x4fc023){return function(_0x3926c2){if(_0x3926c2){return _0x3926c2['destroy']()[_0x2187('0x28')](function(){var _0x593c9b=_0x3926c2['get']({'plain':!![]});var _0x270c87=_0x2187('0x29');return db[_0x2187('0x2a')][_0x2187('0x2b')]({'where':{'type':_0x270c87,'resourceId':_0x593c9b['id']}})[_0x2187('0x28')](function(){return _0x3926c2;});})['then'](function(){_0x4c0af0[_0x2187('0x1d')](0xcc)[_0x2187('0x1e')]();});}};}function handleEntityNotFound(_0x575e42,_0x46e8ef){return function(_0x2aaf70){if(!_0x2aaf70){_0x575e42['sendStatus'](0x194);}return _0x2aaf70;};}function handleError(_0x50f3f6,_0xcde8a9){_0xcde8a9=_0xcde8a9||0x1f4;return function(_0x15709a){logger[_0x2187('0x2c')](_0x15709a['stack']);if(_0x15709a['name']){delete _0x15709a[_0x2187('0x2d')];}_0x50f3f6[_0x2187('0x1d')](_0xcde8a9)[_0x2187('0x2e')](_0x15709a);};}exports[_0x2187('0x2f')]=function(_0x1ae885,_0x33e327){var _0x255df0={},_0x23ff4d={},_0x16ddbc={'count':0x0,'rows':[]};var _0x222cd7=_[_0x2187('0x30')](db['Dashboard']['rawAttributes'],function(_0x578549){return{'name':_0x578549[_0x2187('0x31')],'type':_0x578549[_0x2187('0x32')][_0x2187('0x33')]};});_0x23ff4d[_0x2187('0x34')]=_[_0x2187('0x30')](_0x222cd7,_0x2187('0x2d'));_0x23ff4d['query']=_['keys'](_0x1ae885[_0x2187('0x35')]);_0x23ff4d['filters']=_['intersection'](_0x23ff4d[_0x2187('0x34')],_0x23ff4d[_0x2187('0x35')]);_0x255df0[_0x2187('0x36')]=_[_0x2187('0x37')](_0x23ff4d[_0x2187('0x34')],qs[_0x2187('0x38')](_0x1ae885[_0x2187('0x35')][_0x2187('0x38')]));_0x255df0[_0x2187('0x36')]=_0x255df0['attributes'][_0x2187('0x39')]?_0x255df0[_0x2187('0x36')]:_0x23ff4d[_0x2187('0x34')];if(!_0x1ae885[_0x2187('0x35')][_0x2187('0x3a')]('nolimit')){_0x255df0['limit']=qs[_0x2187('0x20')](_0x1ae885[_0x2187('0x35')]['limit']);_0x255df0[_0x2187('0x22')]=qs[_0x2187('0x22')](_0x1ae885[_0x2187('0x35')][_0x2187('0x22')]);}_0x255df0[_0x2187('0x3b')]=qs['sort'](_0x1ae885[_0x2187('0x35')][_0x2187('0x3c')]);_0x255df0['where']=qs[_0x2187('0x3d')](_[_0x2187('0x3e')](_0x1ae885[_0x2187('0x35')],_0x23ff4d['filters']),_0x222cd7);if(_0x1ae885[_0x2187('0x35')][_0x2187('0x3f')]){_0x255df0['where']=_[_0x2187('0x40')](_0x255df0[_0x2187('0x41')],{'$or':_[_0x2187('0x30')](_0x222cd7,function(_0x260b94){if(_0x260b94['type']!==_0x2187('0x42')){var _0x7568ae={};_0x7568ae[_0x260b94[_0x2187('0x2d')]]={'$like':'%'+_0x1ae885[_0x2187('0x35')]['filter']+'%'};return _0x7568ae;}})});}_0x255df0=_[_0x2187('0x40')]({},_0x255df0,_0x1ae885[_0x2187('0x43')]);var _0x2402fb={'where':_0x255df0[_0x2187('0x41')]};return db[_0x2187('0x44')][_0x2187('0x21')](_0x2402fb)[_0x2187('0x28')](function(_0x2a9354){_0x16ddbc[_0x2187('0x21')]=_0x2a9354;if(_0x1ae885['query'][_0x2187('0x45')]){_0x255df0[_0x2187('0x46')]=[{'all':!![]}];}return db[_0x2187('0x44')][_0x2187('0x47')](_0x255df0);})[_0x2187('0x28')](function(_0xeb8047){_0x16ddbc[_0x2187('0x48')]=_0xeb8047;return _0x16ddbc;})['then'](respondWithFilteredResult(_0x33e327,_0x255df0))[_0x2187('0x49')](handleError(_0x33e327,null));};exports[_0x2187('0x4a')]=function(_0x3eebb6,_0x5a7203){var _0x364c4f={'raw':![],'where':{'id':_0x3eebb6['params']['id']}},_0x3ba3ef={};_0x3ba3ef[_0x2187('0x34')]=_['keys'](db[_0x2187('0x44')]['rawAttributes']);_0x3ba3ef[_0x2187('0x35')]=_['keys'](_0x3eebb6[_0x2187('0x35')]);_0x3ba3ef['filters']=_[_0x2187('0x37')](_0x3ba3ef[_0x2187('0x34')],_0x3ba3ef[_0x2187('0x35')]);_0x364c4f[_0x2187('0x36')]=_[_0x2187('0x37')](_0x3ba3ef[_0x2187('0x34')],qs[_0x2187('0x38')](_0x3eebb6[_0x2187('0x35')]['fields']));_0x364c4f[_0x2187('0x36')]=_0x364c4f[_0x2187('0x36')][_0x2187('0x39')]?_0x364c4f[_0x2187('0x36')]:_0x3ba3ef[_0x2187('0x34')];if(_0x3eebb6[_0x2187('0x35')]['includeAll']){_0x364c4f['include']=[{'all':!![]}];}_0x364c4f=_[_0x2187('0x40')]({},_0x364c4f,_0x3eebb6[_0x2187('0x43')]);return db[_0x2187('0x44')][_0x2187('0x4b')](_0x364c4f)[_0x2187('0x28')](handleEntityNotFound(_0x5a7203,null))[_0x2187('0x28')](respondWithResult(_0x5a7203,null))[_0x2187('0x49')](handleError(_0x5a7203,null));};exports[_0x2187('0x4c')]=function(_0x514548,_0x2a3c40){return db[_0x2187('0x44')]['create'](_0x514548[_0x2187('0x4d')],{})['then'](function(_0x32308a){var _0x2e87e1=_0x514548[_0x2187('0x4e')]['get']({'plain':!![]});if(!_0x2e87e1)throw new Error(_0x2187('0x4f'));if(_0x2e87e1[_0x2187('0x50')]===_0x2187('0x4e')){var _0x448af7=_0x32308a[_0x2187('0x51')]({'plain':!![]});var _0x12cb5a=_0x2187('0x29');return db['UserProfileSection'][_0x2187('0x4b')]({'where':{'name':_0x12cb5a,'userProfileId':_0x2e87e1['userProfileId']},'raw':!![]})[_0x2187('0x28')](function(_0x2bf747){if(_0x2bf747&&_0x2bf747['autoAssociation']===0x0){return db[_0x2187('0x2a')]['create']({'name':_0x448af7[_0x2187('0x2d')],'resourceId':_0x448af7['id'],'type':_0x2bf747[_0x2187('0x2d')],'sectionId':_0x2bf747['id']},{})[_0x2187('0x28')](function(){return _0x32308a;});}else{return _0x32308a;}})[_0x2187('0x49')](function(_0x375e83){logger[_0x2187('0x2c')](_0x2187('0x52'),_0x375e83);throw _0x375e83;});}return _0x32308a;})['then'](respondWithResult(_0x2a3c40,0xc9))[_0x2187('0x49')](handleError(_0x2a3c40,null));};exports[_0x2187('0x53')]=function(_0x2705b9,_0x25fc44){var _0x356815={'where':{'id':_0x2705b9[_0x2187('0x54')]['id']}},_0x25b91d={};_0x25b91d['model']=_[_0x2187('0x55')](db[_0x2187('0x44')][_0x2187('0x56')]);_0x356815[_0x2187('0x36')]=_[_0x2187('0x37')](_0x25b91d[_0x2187('0x34')],qs['fields'](_0x2705b9['query'][_0x2187('0x38')]));_0x356815[_0x2187('0x36')]=_0x356815[_0x2187('0x36')][_0x2187('0x39')]?_0x356815['attributes']:_0x25b91d[_0x2187('0x34')];if(_0x2705b9[_0x2187('0x35')][_0x2187('0x45')]){_0x356815['include']=[{'all':!![]}];}_0x356815=_[_0x2187('0x40')]({},_0x356815,_0x2705b9[_0x2187('0x43')]);return db[_0x2187('0x44')]['find'](_0x356815)[_0x2187('0x28')](handleEntityNotFound(_0x25fc44,null))[_0x2187('0x28')](function(_0x75a5c){if(_0x75a5c){var _0x15d9f0=_0x75a5c['get']({'plain':!![]});_0x15d9f0=qs[_0x2187('0x57')](_0x15d9f0,['id','createdAt',_0x2187('0x58')]);_0x2705b9[_0x2187('0x4d')]=_[_0x2187('0x57')](_0x2705b9['body'],['id','createdAt',_0x2187('0x58')]);return db[_0x2187('0x44')][_0x2187('0x4c')](_[_0x2187('0x40')](_0x15d9f0,_0x2705b9[_0x2187('0x4d')]),{'include':_0x2705b9['query']['includeAll']?[{'all':!![]}]:undefined})[_0x2187('0x28')](function(_0x6dd886){var _0x426f5d=_0x2705b9[_0x2187('0x4e')]['get']({'plain':!![]});if(!_0x426f5d)throw new Error(_0x2187('0x4f'));if(_0x426f5d[_0x2187('0x50')]===_0x2187('0x4e')){var _0x5f54cd=_0x6dd886[_0x2187('0x51')]({'plain':!![]});var _0x255687=_0x2187('0x29');return db[_0x2187('0x59')][_0x2187('0x4b')]({'where':{'name':_0x255687,'userProfileId':_0x426f5d['userProfileId']},'raw':!![]})[_0x2187('0x28')](function(_0x23f17a){if(_0x23f17a&&_0x23f17a['autoAssociation']===0x0){return db[_0x2187('0x2a')][_0x2187('0x4c')]({'name':_0x5f54cd[_0x2187('0x2d')],'resourceId':_0x5f54cd['id'],'type':_0x23f17a[_0x2187('0x2d')],'sectionId':_0x23f17a['id']},{})['then'](function(){return _0x6dd886;});}else{return _0x6dd886;}})[_0x2187('0x49')](function(_0x540bbc){logger[_0x2187('0x2c')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x540bbc);throw _0x540bbc;});}return _0x6dd886;});}})[_0x2187('0x28')](respondWithResult(_0x25fc44,0xc9))[_0x2187('0x49')](handleError(_0x25fc44,null));};exports[_0x2187('0x5a')]=function(_0x2a42e2,_0x22fe76){if(_0x2a42e2[_0x2187('0x4d')]['id']){delete _0x2a42e2['body']['id'];}return db['Dashboard'][_0x2187('0x4b')]({'where':{'id':_0x2a42e2['params']['id']}})[_0x2187('0x28')](handleEntityNotFound(_0x22fe76,null))[_0x2187('0x28')](saveUpdates(_0x2a42e2[_0x2187('0x4d')],null))['then'](respondWithResult(_0x22fe76,null))[_0x2187('0x49')](handleError(_0x22fe76,null));};exports['destroy']=function(_0x3b5c72,_0x212fab){return db[_0x2187('0x44')][_0x2187('0x4b')]({'where':{'id':_0x3b5c72[_0x2187('0x54')]['id']}})[_0x2187('0x28')](handleEntityNotFound(_0x212fab,null))[_0x2187('0x28')](removeEntity(_0x212fab,null))['catch'](handleError(_0x212fab,null));};function widgetAttributes(_0x537223){try{switch(_0x537223['type']){case _0x2187('0x5b'):return[{'name':_0x2187('0x5c'),'value':_0x537223[_0x2187('0x5c')]||(_0x537223[_0x2187('0x5d')]&&_0x537223[_0x2187('0x5d')][0x0]?_0x537223[_0x2187('0x5d')][0x0][_0x2187('0x5e')]:undefined)||'https://'}];case _0x2187('0x5f'):return[{'name':_0x2187('0x60'),'value':_0x537223[_0x2187('0x60')]||(_0x537223[_0x2187('0x5d')]&&_0x537223['attrs'][0x0]?_0x537223[_0x2187('0x5d')][0x0][_0x2187('0x5e')]:undefined)||''}];case _0x2187('0x61'):return[{'name':_0x2187('0x62'),'value':_0x537223['attrHourFormat']||(_0x537223[_0x2187('0x5d')]&&_0x537223[_0x2187('0x5d')][0x0]?_0x537223[_0x2187('0x5d')][0x0][_0x2187('0x5e')]:undefined)||_0x2187('0x63')},{'name':_0x2187('0x64'),'value':_0x537223['attrTimezone']||(_0x537223[_0x2187('0x5d')]&&_0x537223[_0x2187('0x5d')][0x1]?_0x537223[_0x2187('0x5d')][0x1][_0x2187('0x5e')]:undefined)||_0x2187('0x65')},{'name':_0x2187('0x66'),'value':_0x537223[_0x2187('0x66')]||(_0x537223['attrs']&&_0x537223[_0x2187('0x5d')][0x2]?_0x537223['attrs'][0x2]['value']:undefined)||0xc}];case _0x2187('0x67'):return[{'name':_0x2187('0x68'),'value':_0x537223[_0x2187('0x68')]||(_0x537223['attrs']&&_0x537223['attrs'][0x0]?_0x537223['attrs'][0x0][_0x2187('0x5e')]:undefined)||'total'},{'name':_0x2187('0x69'),'value':_0x537223[_0x2187('0x69')]||(_0x537223[_0x2187('0x5d')]&&_0x537223[_0x2187('0x5d')][0x1]?_0x537223[_0x2187('0x5d')][0x1][_0x2187('0x5e')]:undefined)||[]},{'name':_0x2187('0x66'),'value':_0x537223[_0x2187('0x66')]||(_0x537223[_0x2187('0x5d')]&&_0x537223['attrs'][0x2]?_0x537223[_0x2187('0x5d')][0x2][_0x2187('0x5e')]:undefined)||0x14},{'name':'attrChannel','value':_0x537223[_0x2187('0x6a')]||(_0x537223[_0x2187('0x5d')]&&_0x537223[_0x2187('0x5d')][0x3]?_0x537223[_0x2187('0x5d')][0x3][_0x2187('0x5e')]:undefined)||_0x2187('0x6b')},{'name':'attrEmailAccounts','value':_0x537223[_0x2187('0x6c')]||(_0x537223[_0x2187('0x5d')]&&_0x537223[_0x2187('0x5d')][0x4]?_0x537223[_0x2187('0x5d')][0x4][_0x2187('0x5e')]:undefined)||''},{'name':_0x2187('0x6d'),'value':_0x537223['attrFaxAccounts']||(_0x537223['attrs']&&_0x537223[_0x2187('0x5d')][0x5]?_0x537223[_0x2187('0x5d')][0x5][_0x2187('0x5e')]:undefined)||''},{'name':'attrSmsAccounts','value':_0x537223['attrSmsAccounts']||(_0x537223['attrs']&&_0x537223[_0x2187('0x5d')][0x6]?_0x537223[_0x2187('0x5d')][0x6][_0x2187('0x5e')]:undefined)||''},{'name':'attrOpenchannelAccounts','value':_0x537223[_0x2187('0x6e')]||(_0x537223[_0x2187('0x5d')]&&_0x537223[_0x2187('0x5d')][0x7]?_0x537223[_0x2187('0x5d')][0x7][_0x2187('0x5e')]:undefined)||''},{'name':_0x2187('0x6f'),'value':_0x537223['attrWhatsappAccounts']||(_0x537223[_0x2187('0x5d')]&&_0x537223['attrs'][0x8]?_0x537223[_0x2187('0x5d')][0x8][_0x2187('0x5e')]:undefined)||''},{'name':'attrChatWebsites','value':_0x537223[_0x2187('0x70')]||(_0x537223[_0x2187('0x5d')]&&_0x537223[_0x2187('0x5d')][0x9]?_0x537223['attrs'][0x9][_0x2187('0x5e')]:undefined)||''}];case _0x2187('0x71'):case _0x2187('0x72'):return[{'name':_0x2187('0x73'),'value':_0x537223[_0x2187('0x73')]||(_0x537223[_0x2187('0x5d')]&&_0x537223[_0x2187('0x5d')][0x0]?_0x537223[_0x2187('0x5d')][0x0][_0x2187('0x5e')]:undefined)||_0x2187('0x74')},{'name':'attrSerie2','value':_0x537223['attrSerie2']||(_0x537223[_0x2187('0x5d')]&&_0x537223['attrs'][0x1]?_0x537223[_0x2187('0x5d')][0x1][_0x2187('0x5e')]:undefined)||null},{'name':_0x2187('0x75'),'value':_0x537223[_0x2187('0x75')]||(_0x537223[_0x2187('0x5d')]&&_0x537223['attrs'][0x2]?_0x537223[_0x2187('0x5d')][0x2][_0x2187('0x5e')]:undefined)||null},{'name':_0x2187('0x69'),'value':_0x537223['attrVoiceQueues']||(_0x537223[_0x2187('0x5d')]&&_0x537223['attrs'][0x3]?_0x537223[_0x2187('0x5d')][0x3][_0x2187('0x5e')]:undefined)||[]},{'name':'attrChannel','value':_0x537223['attrChannel']||(_0x537223[_0x2187('0x5d')]&&_0x537223['attrs'][0x4]?_0x537223['attrs'][0x4][_0x2187('0x5e')]:undefined)||_0x2187('0x6b')},{'name':'attrEmailAccounts','value':_0x537223['attrEmailAccounts']||(_0x537223[_0x2187('0x5d')]&&_0x537223[_0x2187('0x5d')][0x5]?_0x537223['attrs'][0x5][_0x2187('0x5e')]:undefined)||''},{'name':_0x2187('0x6d'),'value':_0x537223[_0x2187('0x6d')]||(_0x537223[_0x2187('0x5d')]&&_0x537223['attrs'][0x6]?_0x537223[_0x2187('0x5d')][0x6][_0x2187('0x5e')]:undefined)||''},{'name':'attrSmsAccounts','value':_0x537223[_0x2187('0x76')]||(_0x537223[_0x2187('0x5d')]&&_0x537223[_0x2187('0x5d')][0x7]?_0x537223['attrs'][0x7][_0x2187('0x5e')]:undefined)||''},{'name':_0x2187('0x6e'),'value':_0x537223[_0x2187('0x6e')]||(_0x537223[_0x2187('0x5d')]&&_0x537223[_0x2187('0x5d')][0x8]?_0x537223['attrs'][0x8][_0x2187('0x5e')]:undefined)||''},{'name':'attrWhatsappAccounts','value':_0x537223[_0x2187('0x6f')]||(_0x537223[_0x2187('0x5d')]&&_0x537223[_0x2187('0x5d')][0x9]?_0x537223[_0x2187('0x5d')][0x9][_0x2187('0x5e')]:undefined)||''},{'name':'attrChatWebsites','value':_0x537223[_0x2187('0x70')]||(_0x537223[_0x2187('0x5d')]&&_0x537223[_0x2187('0x5d')][0xa]?_0x537223[_0x2187('0x5d')][0xa]['value']:undefined)||''}];case _0x2187('0x77'):return[{'name':_0x2187('0x78'),'type':_0x537223[_0x2187('0x79')]||(_0x537223[_0x2187('0x5d')]&&_0x537223['attrs'][0x0]?_0x537223[_0x2187('0x5d')][0x0]['type']:undefined)||null,'value':_0x537223[_0x2187('0x78')]||(_0x537223[_0x2187('0x5d')]&&_0x537223[_0x2187('0x5d')][0x0]?_0x537223[_0x2187('0x5d')][0x0][_0x2187('0x5e')]:undefined)||null},{'name':_0x2187('0x7a'),'value':_0x537223['attrRefresh']||(_0x537223[_0x2187('0x5d')]&&_0x537223['attrs'][0x1]?_0x537223['attrs'][0x1]['value']:undefined)||0x0}];default:return[];}}catch(_0x1fcb90){logger[_0x2187('0x2c')]('widgetAttributes:\x20%s',JSON['stringify'](_0x1fcb90));return[];}}exports[_0x2187('0x7b')]=function(_0x3344f6,_0x506dd1,_0x1ef039){if(_0x3344f6[_0x2187('0x4d')]['id']){delete _0x3344f6['body']['id'];}return db[_0x2187('0x44')][_0x2187('0x4b')]({'where':{'id':_0x3344f6[_0x2187('0x54')]['id']}})[_0x2187('0x28')](handleEntityNotFound(_0x506dd1,null))[_0x2187('0x28')](function(_0x15ef92){if(_0x15ef92){_0x3344f6[_0x2187('0x4d')][_0x2187('0x7c')]=_0x15ef92['id'];_0x3344f6[_0x2187('0x4d')]['attrs']=widgetAttributes(_0x3344f6[_0x2187('0x4d')]);return db[_0x2187('0x7d')][_0x2187('0x4c')](_0x3344f6[_0x2187('0x4d')]);}})['then'](respondWithResult(_0x506dd1,null))[_0x2187('0x49')](handleError(_0x506dd1,null));};exports['getItems']=function(_0x5b9cd3,_0x15dcd2,_0x832ca9){var _0x28743a={};var _0x52d829={};var _0x5e481d;var _0x41938d;return db[_0x2187('0x44')][_0x2187('0x7e')]({'where':{'id':_0x5b9cd3[_0x2187('0x54')]['id']}})[_0x2187('0x28')](handleEntityNotFound(_0x15dcd2,null))[_0x2187('0x28')](function(_0x18cd08){if(_0x18cd08){_0x5e481d=_0x18cd08;_0x52d829[_0x2187('0x34')]=_[_0x2187('0x55')](db['DashboardItem'][_0x2187('0x56')]);_0x52d829[_0x2187('0x35')]=_[_0x2187('0x55')](_0x5b9cd3[_0x2187('0x35')]);_0x52d829['filters']=_['intersection'](_0x52d829[_0x2187('0x34')],_0x52d829[_0x2187('0x35')]);_0x28743a[_0x2187('0x36')]=_['intersection'](_0x52d829[_0x2187('0x34')],qs[_0x2187('0x38')](_0x5b9cd3[_0x2187('0x35')]['fields']));_0x28743a['attributes']=_0x28743a[_0x2187('0x36')]['length']?_0x28743a[_0x2187('0x36')]:_0x52d829[_0x2187('0x34')];_0x28743a[_0x2187('0x3b')]=qs[_0x2187('0x3c')](_0x5b9cd3[_0x2187('0x35')][_0x2187('0x3c')]);_0x28743a[_0x2187('0x41')]=qs[_0x2187('0x3d')](_[_0x2187('0x3e')](_0x5b9cd3[_0x2187('0x35')],_0x52d829[_0x2187('0x3d')]));if(_0x5b9cd3['query']['filter']){_0x28743a[_0x2187('0x41')]=_['merge'](_0x28743a[_0x2187('0x41')],{'$or':_['map'](_0x28743a['attributes'],function(_0x2e8629){var _0x5a7730={};_0x5a7730[_0x2e8629]={'$like':'%'+_0x5b9cd3[_0x2187('0x35')][_0x2187('0x3f')]+'%'};return _0x5a7730;})});}_0x28743a=_[_0x2187('0x40')]({},_0x28743a,_0x5b9cd3[_0x2187('0x43')]);return _0x5e481d['getItems'](_0x28743a);}})[_0x2187('0x28')](function(_0x7f2bd2){if(_0x7f2bd2){_0x41938d=_0x7f2bd2[_0x2187('0x39')];if(!_0x5b9cd3[_0x2187('0x35')][_0x2187('0x3a')](_0x2187('0x7f'))){_0x28743a[_0x2187('0x20')]=qs[_0x2187('0x20')](_0x5b9cd3[_0x2187('0x35')]['limit']);_0x28743a[_0x2187('0x22')]=qs[_0x2187('0x22')](_0x5b9cd3[_0x2187('0x35')][_0x2187('0x22')]);}return _0x5e481d[_0x2187('0x80')](_0x28743a);}})[_0x2187('0x28')](function(_0xcfb979){if(_0xcfb979){return _0xcfb979?{'count':_0x41938d,'rows':_0xcfb979}:null;}})[_0x2187('0x28')](respondWithResult(_0x15dcd2,null))['catch'](handleError(_0x15dcd2,null));};
\ No newline at end of file
index b46338b..8c63a6a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc774=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','events','../../mysqldb','Dashboard'];(function(_0x35f4ac,_0x468f03){var _0x5b8bbd=function(_0x37469f){while(--_0x37469f){_0x35f4ac['push'](_0x35f4ac['shift']());}};_0x5b8bbd(++_0x468f03);}(_0xc774,0x129));var _0x4c77=function(_0x275ae5,_0xcfedc3){_0x275ae5=_0x275ae5-0x0;var _0x2c221d=_0xc774[_0x275ae5];return _0x2c221d;};'use strict';var EventEmitter=require(_0x4c77('0x0'));var Dashboard=require(_0x4c77('0x1'))['db'][_0x4c77('0x2')];var DashboardEvents=new EventEmitter();DashboardEvents[_0x4c77('0x3')](0x0);var events={'afterCreate':_0x4c77('0x4'),'afterUpdate':_0x4c77('0x5'),'afterDestroy':_0x4c77('0x6')};function emitEvent(_0x52c02d){return function(_0x2887fd,_0xb14d2d,_0x3c9238){DashboardEvents[_0x4c77('0x7')](_0x52c02d+':'+_0x2887fd['id'],_0x2887fd);DashboardEvents[_0x4c77('0x7')](_0x52c02d,_0x2887fd);_0x3c9238(null);};}for(var e in events){if(events[_0x4c77('0x8')](e)){var event=events[e];Dashboard[_0x4c77('0x9')](e,emitEvent(event));}}module['exports']=DashboardEvents;
\ No newline at end of file
+var _0x9b8e=['events','Dashboard','setMaxListeners','remove','emit','hasOwnProperty','hook','exports'];(function(_0x377959,_0x565f80){var _0x4ac430=function(_0x6ffad5){while(--_0x6ffad5){_0x377959['push'](_0x377959['shift']());}};_0x4ac430(++_0x565f80);}(_0x9b8e,0x158));var _0xe9b8=function(_0x2eeac8,_0x1cd8ed){_0x2eeac8=_0x2eeac8-0x0;var _0xd87a3c=_0x9b8e[_0x2eeac8];return _0xd87a3c;};'use strict';var EventEmitter=require(_0xe9b8('0x0'));var Dashboard=require('../../mysqldb')['db'][_0xe9b8('0x1')];var DashboardEvents=new EventEmitter();DashboardEvents[_0xe9b8('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xe9b8('0x3')};function emitEvent(_0x56068b){return function(_0x1fb7b1,_0x175526,_0x5dc89c){DashboardEvents[_0xe9b8('0x4')](_0x56068b+':'+_0x1fb7b1['id'],_0x1fb7b1);DashboardEvents[_0xe9b8('0x4')](_0x56068b,_0x1fb7b1);_0x5dc89c(null);};}for(var e in events){if(events[_0xe9b8('0x5')](e)){var event=events[e];Dashboard[_0xe9b8('0x6')](e,emitEvent(event));}}module[_0xe9b8('0x7')]=DashboardEvents;
\ No newline at end of file
index eb71793..a4218ba 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6c18=['Dashboard','dashboards','util','../../config/logger','bluebird','request-promise','rimraf','../../config/environment','./dashboard.attributes','define'];(function(_0x58cc62,_0x550387){var _0x2cb63b=function(_0x1e4bfe){while(--_0x1e4bfe){_0x58cc62['push'](_0x58cc62['shift']());}};_0x2cb63b(++_0x550387);}(_0x6c18,0x1a6));var _0x86c1=function(_0x40ca7a,_0x3d0a97){_0x40ca7a=_0x40ca7a-0x0;var _0x2d30b3=_0x6c18[_0x40ca7a];return _0x2d30b3;};'use strict';var _=require('lodash');var util=require(_0x86c1('0x0'));var logger=require(_0x86c1('0x1'))('api');var moment=require('moment');var BPromise=require(_0x86c1('0x2'));var rp=require(_0x86c1('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x86c1('0x4'));var config=require(_0x86c1('0x5'));var attributes=require(_0x86c1('0x6'));module['exports']=function(_0x3bd87c,_0x412c8d){return _0x3bd87c[_0x86c1('0x7')](_0x86c1('0x8'),attributes,{'tableName':_0x86c1('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xeb2c=['rimraf','./dashboard.attributes','exports','define','Dashboard','lodash','util','../../config/logger','api','moment','request-promise'];(function(_0x3aca58,_0x1aeabc){var _0x45fc3b=function(_0x4ecfbd){while(--_0x4ecfbd){_0x3aca58['push'](_0x3aca58['shift']());}};_0x45fc3b(++_0x1aeabc);}(_0xeb2c,0x1e9));var _0xceb2=function(_0x1d6a3b,_0x2c90ff){_0x1d6a3b=_0x1d6a3b-0x0;var _0x1a192d=_0xeb2c[_0x1d6a3b];return _0x1a192d;};'use strict';var _=require(_0xceb2('0x0'));var util=require(_0xceb2('0x1'));var logger=require(_0xceb2('0x2'))(_0xceb2('0x3'));var moment=require(_0xceb2('0x4'));var BPromise=require('bluebird');var rp=require(_0xceb2('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xceb2('0x6'));var config=require('../../config/environment');var attributes=require(_0xceb2('0x7'));module[_0xceb2('0x8')]=function(_0x11a0ec,_0x5d0b4f){return _0x11a0ec[_0xceb2('0x9')](_0xceb2('0xa'),attributes,{'tableName':'dashboards','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 7bd3c9c..752ef31 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x39cc=['../../config/utils','../../config/logger','rpc','../../config/environment','client','defaults','redis','localhost','socket.io-emitter','./dashboard.socket','register','then','info','Dashboard,\x20%s,\x20%s','request\x20sent','debug','Dashboard,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','bluebird','randomstring','../../mysqldb'];(function(_0x1365ae,_0x25be8e){var _0x525a9e=function(_0x4110a7){while(--_0x4110a7){_0x1365ae['push'](_0x1365ae['shift']());}};_0x525a9e(++_0x25be8e);}(_0x39cc,0x190));var _0xc39c=function(_0x14afb2,_0x223bc4){_0x14afb2=_0x14afb2-0x0;var _0x39ab93=_0x39cc[_0x14afb2];return _0x39ab93;};'use strict';var _=require(_0xc39c('0x0'));var util=require(_0xc39c('0x1'));var moment=require('moment');var BPromise=require(_0xc39c('0x2'));var rs=require(_0xc39c('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xc39c('0x4'))['db'];var utils=require(_0xc39c('0x5'));var logger=require(_0xc39c('0x6'))(_0xc39c('0x7'));var config=require(_0xc39c('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xc39c('0x9')]['http']({'port':0x232a});config['redis']=_[_0xc39c('0xa')](config[_0xc39c('0xb')],{'host':_0xc39c('0xc'),'port':0x18eb});var socket=require(_0xc39c('0xd'))(new Redis(config['redis']));require(_0xc39c('0xe'))[_0xc39c('0xf')](socket);function respondWithRpcPromise(_0x53ee3b,_0xf89b7a,_0x2b9fe2){return new BPromise(function(_0x4e8e70,_0x21f6bf){return client['request'](_0x53ee3b,_0x2b9fe2)[_0xc39c('0x10')](function(_0x293b78){logger[_0xc39c('0x11')](_0xc39c('0x12'),_0xf89b7a,_0xc39c('0x13'));logger[_0xc39c('0x14')](_0xc39c('0x15'),_0xf89b7a,_0xc39c('0x13'),JSON[_0xc39c('0x16')](_0x293b78));if(_0x293b78[_0xc39c('0x17')]){if(_0x293b78[_0xc39c('0x17')]['code']===0x1f4){logger[_0xc39c('0x17')](_0xc39c('0x12'),_0xf89b7a,_0x293b78[_0xc39c('0x17')][_0xc39c('0x18')]);return _0x21f6bf(_0x293b78['error'][_0xc39c('0x18')]);}logger[_0xc39c('0x17')](_0xc39c('0x12'),_0xf89b7a,_0x293b78['error'][_0xc39c('0x18')]);return _0x4e8e70(_0x293b78['error']['message']);}else{logger['info']('Dashboard,\x20%s,\x20%s',_0xf89b7a,_0xc39c('0x13'));_0x4e8e70(_0x293b78[_0xc39c('0x19')][_0xc39c('0x18')]);}})[_0xc39c('0x1a')](function(_0x9fcdda){logger['error'](_0xc39c('0x12'),_0xf89b7a,_0x9fcdda);_0x21f6bf(_0x9fcdda);});});}
\ No newline at end of file
+var _0x56cc=['Dashboard,\x20%s,\x20%s','debug','Dashboard,\x20%s,\x20%s,\x20%s','request\x20sent','code','error','message','result','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','defaults','localhost','socket.io-emitter','./dashboard.socket','register','then','info'];(function(_0x486754,_0x143291){var _0x28ed42=function(_0x592731){while(--_0x592731){_0x486754['push'](_0x486754['shift']());}};_0x28ed42(++_0x143291);}(_0x56cc,0xc8));var _0xc56c=function(_0x229f2f,_0x4d8c4e){_0x229f2f=_0x229f2f-0x0;var _0x2e1406=_0x56cc[_0x229f2f];return _0x2e1406;};'use strict';var _=require('lodash');var util=require(_0xc56c('0x0'));var moment=require(_0xc56c('0x1'));var BPromise=require(_0xc56c('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xc56c('0x3'))['db'];var utils=require(_0xc56c('0x4'));var logger=require(_0xc56c('0x5'))('rpc');var config=require(_0xc56c('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xc56c('0x7')][_0xc56c('0x8')]({'port':0x232a});config['redis']=_[_0xc56c('0x9')](config['redis'],{'host':_0xc56c('0xa'),'port':0x18eb});var socket=require(_0xc56c('0xb'))(new Redis(config['redis']));require(_0xc56c('0xc'))[_0xc56c('0xd')](socket);function respondWithRpcPromise(_0x3ed47f,_0x173b13,_0x47ade7){return new BPromise(function(_0x282ada,_0x2ce471){return client['request'](_0x3ed47f,_0x47ade7)[_0xc56c('0xe')](function(_0x10e706){logger[_0xc56c('0xf')](_0xc56c('0x10'),_0x173b13,'request\x20sent');logger[_0xc56c('0x11')](_0xc56c('0x12'),_0x173b13,_0xc56c('0x13'),JSON['stringify'](_0x10e706));if(_0x10e706['error']){if(_0x10e706['error'][_0xc56c('0x14')]===0x1f4){logger[_0xc56c('0x15')](_0xc56c('0x10'),_0x173b13,_0x10e706[_0xc56c('0x15')][_0xc56c('0x16')]);return _0x2ce471(_0x10e706[_0xc56c('0x15')]['message']);}logger[_0xc56c('0x15')](_0xc56c('0x10'),_0x173b13,_0x10e706[_0xc56c('0x15')][_0xc56c('0x16')]);return _0x282ada(_0x10e706[_0xc56c('0x15')]['message']);}else{logger[_0xc56c('0xf')](_0xc56c('0x10'),_0x173b13,_0xc56c('0x13'));_0x282ada(_0x10e706[_0xc56c('0x17')][_0xc56c('0x16')]);}})['catch'](function(_0x40a4ec){logger[_0xc56c('0x15')]('Dashboard,\x20%s,\x20%s',_0x173b13,_0x40a4ec);_0x2ce471(_0x40a4ec);});});}
\ No newline at end of file
index fd0b8ea..c4fd384 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf7f2=['register','length','dashboard:','./dashboard.events','save','update','emit','removeListener'];(function(_0x9df060,_0x253d33){var _0x338dfe=function(_0x17d9a5){while(--_0x17d9a5){_0x9df060['push'](_0x9df060['shift']());}};_0x338dfe(++_0x253d33);}(_0xf7f2,0xf3));var _0x2f7f=function(_0x7a6897,_0x66fa7c){_0x7a6897=_0x7a6897-0x0;var _0x1d49c1=_0xf7f2[_0x7a6897];return _0x1d49c1;};'use strict';var DashboardEvents=require(_0x2f7f('0x0'));var events=[_0x2f7f('0x1'),'remove',_0x2f7f('0x2')];function createListener(_0x87ea34,_0x3cc557){return function(_0x249c0c){_0x3cc557[_0x2f7f('0x3')](_0x87ea34,_0x249c0c);};}function removeListener(_0x1850fa,_0x96ef2b){return function(){DashboardEvents[_0x2f7f('0x4')](_0x1850fa,_0x96ef2b);};}exports[_0x2f7f('0x5')]=function(_0x420f80){for(var _0x268ea5=0x0,_0x288c85=events[_0x2f7f('0x6')];_0x268ea5<_0x288c85;_0x268ea5++){var _0x31c8c6=events[_0x268ea5];var _0xb2487b=createListener(_0x2f7f('0x7')+_0x31c8c6,_0x420f80);DashboardEvents['on'](_0x31c8c6,_0xb2487b);}};
\ No newline at end of file
+var _0x3396=['update','emit','removeListener','register','length','dashboard:','./dashboard.events','remove'];(function(_0x5e7b0a,_0xe2a383){var _0x59e412=function(_0xd3a9cb){while(--_0xd3a9cb){_0x5e7b0a['push'](_0x5e7b0a['shift']());}};_0x59e412(++_0xe2a383);}(_0x3396,0x6e));var _0x6339=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0x3396[_0xfae23b];return _0x200640;};'use strict';var DashboardEvents=require(_0x6339('0x0'));var events=['save',_0x6339('0x1'),_0x6339('0x2')];function createListener(_0x13bbe2,_0x39e5a3){return function(_0x4354ca){_0x39e5a3[_0x6339('0x3')](_0x13bbe2,_0x4354ca);};}function removeListener(_0x12cc7b,_0x121c8d){return function(){DashboardEvents[_0x6339('0x4')](_0x12cc7b,_0x121c8d);};}exports[_0x6339('0x5')]=function(_0x26a870){for(var _0x4083d6=0x0,_0x2d1f6c=events[_0x6339('0x6')];_0x4083d6<_0x2d1f6c;_0x4083d6++){var _0x85d4d6=events[_0x4083d6];var _0x2af449=createListener(_0x6339('0x7')+_0x85d4d6,_0x26a870);DashboardEvents['on'](_0x85d4d6,_0x2af449);}};
\ No newline at end of file
index ead1370..0a5042b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb714=['post','/:id/clone','clone','addItem','update','delete','destroy','exports','util','express','fs-extra','../../config/environment','./dashboard.controller','get','isAuthenticated','index','/:id','show','/:id/items','create'];(function(_0x49b207,_0x408ade){var _0x2dc8fa=function(_0x150975){while(--_0x150975){_0x49b207['push'](_0x49b207['shift']());}};_0x2dc8fa(++_0x408ade);}(_0xb714,0x120));var _0x4b71=function(_0x121f35,_0x5900cd){_0x121f35=_0x121f35-0x0;var _0x365177=_0xb714[_0x121f35];return _0x365177;};'use strict';var multer=require('multer');var util=require(_0x4b71('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x4b71('0x1'));var router=express['Router']();var fs_extra=require(_0x4b71('0x2'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x4b71('0x3'));var controller=require(_0x4b71('0x4'));router[_0x4b71('0x5')]('/',auth[_0x4b71('0x6')](),controller[_0x4b71('0x7')]);router[_0x4b71('0x5')](_0x4b71('0x8'),auth[_0x4b71('0x6')](),controller[_0x4b71('0x9')]);router['get'](_0x4b71('0xa'),auth['isAuthenticated'](),controller['getItems']);router['post']('/',auth[_0x4b71('0x6')](),controller[_0x4b71('0xb')]);router[_0x4b71('0xc')](_0x4b71('0xd'),auth[_0x4b71('0x6')](),controller[_0x4b71('0xe')]);router[_0x4b71('0xc')](_0x4b71('0xa'),auth[_0x4b71('0x6')](),controller[_0x4b71('0xf')]);router['put'](_0x4b71('0x8'),auth[_0x4b71('0x6')](),controller[_0x4b71('0x10')]);router[_0x4b71('0x11')](_0x4b71('0x8'),auth[_0x4b71('0x6')](),controller[_0x4b71('0x12')]);module[_0x4b71('0x13')]=router;
\ No newline at end of file
+var _0x0b26=['create','clone','addItem','put','update','delete','destroy','exports','multer','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','/:id','/:id/items','post'];(function(_0x3441bb,_0x11052c){var _0xd94568=function(_0x3cd075){while(--_0x3cd075){_0x3441bb['push'](_0x3441bb['shift']());}};_0xd94568(++_0x11052c);}(_0x0b26,0xa0));var _0x60b2=function(_0x116c04,_0x4963da){_0x116c04=_0x116c04-0x0;var _0x9e011d=_0x0b26[_0x116c04];return _0x9e011d;};'use strict';var multer=require(_0x60b2('0x0'));var util=require('util');var path=require('path');var timeout=require('connect-timeout');var express=require(_0x60b2('0x1'));var router=express[_0x60b2('0x2')]();var fs_extra=require(_0x60b2('0x3'));var auth=require(_0x60b2('0x4'));var interaction=require(_0x60b2('0x5'));var config=require('../../config/environment');var controller=require('./dashboard.controller');router[_0x60b2('0x6')]('/',auth[_0x60b2('0x7')](),controller['index']);router[_0x60b2('0x6')](_0x60b2('0x8'),auth[_0x60b2('0x7')](),controller['show']);router[_0x60b2('0x6')](_0x60b2('0x9'),auth['isAuthenticated'](),controller['getItems']);router[_0x60b2('0xa')]('/',auth[_0x60b2('0x7')](),controller[_0x60b2('0xb')]);router['post']('/:id/clone',auth[_0x60b2('0x7')](),controller[_0x60b2('0xc')]);router[_0x60b2('0xa')](_0x60b2('0x9'),auth[_0x60b2('0x7')](),controller[_0x60b2('0xd')]);router[_0x60b2('0xe')](_0x60b2('0x8'),auth[_0x60b2('0x7')](),controller[_0x60b2('0xf')]);router[_0x60b2('0x10')](_0x60b2('0x8'),auth[_0x60b2('0x7')](),controller[_0x60b2('0x11')]);module[_0x60b2('0x12')]=router;
\ No newline at end of file
index 4a927cb..735e27f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd117=['long','parse','getDataValue','attrs','setDataValue','stringify','INTEGER','#ffffff','sequelize','squel','lodash','exports','STRING','TEXT'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xd117,0x182));var _0x7d11=function(_0x14bf63,_0xdbd373){_0x14bf63=_0x14bf63-0x0;var _0x410d22=_0xd117[_0x14bf63];return _0x410d22;};'use strict';var Sequelize=require(_0x7d11('0x0'));var squel=require(_0x7d11('0x1'));var _=require(_0x7d11('0x2'));module[_0x7d11('0x3')]={'title':{'type':Sequelize[_0x7d11('0x4')],'allowNull':![]},'type':{'type':Sequelize[_0x7d11('0x4')](0x14),'allowNull':![],'validate':{'len':[0x1,0x14]}},'attrs':{'type':Sequelize[_0x7d11('0x5')](_0x7d11('0x6')),'get':function(){try{return JSON[_0x7d11('0x7')](this[_0x7d11('0x8')](_0x7d11('0x9')));}catch(_0x2689c6){return[];}},'set':function(_0x27d7e8){try{this[_0x7d11('0xa')](_0x7d11('0x9'),JSON[_0x7d11('0xb')](_0x27d7e8));}catch(_0x47b5e6){this[_0x7d11('0xa')](_0x7d11('0x9'),JSON[_0x7d11('0xb')]([]));}}},'sizeX':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1},'sizeY':{'type':Sequelize[_0x7d11('0xc')],'allowNull':![],'defaultValue':0x1},'row':{'type':Sequelize[_0x7d11('0xc')]},'col':{'type':Sequelize[_0x7d11('0xc')]},'background':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x7d11('0xd'),'validate':{'notEmpty':!![]}},'foreground':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'#2196f3','validate':{'notEmpty':!![]}},'link':{'type':Sequelize[_0x7d11('0x4')]},'titleFontSize':{'type':Sequelize['INTEGER'],'defaultValue':0xc}};
\ No newline at end of file
+var _0xda19=['TEXT','parse','getDataValue','attrs','setDataValue','stringify','INTEGER','#ffffff','#2196f3','squel','lodash','STRING'];(function(_0x25701b,_0x2a6976){var _0x3a8a2c=function(_0x1a5e78){while(--_0x1a5e78){_0x25701b['push'](_0x25701b['shift']());}};_0x3a8a2c(++_0x2a6976);}(_0xda19,0xd5));var _0x9da1=function(_0x5dad2a,_0x5077f0){_0x5dad2a=_0x5dad2a-0x0;var _0x5b8728=_0xda19[_0x5dad2a];return _0x5b8728;};'use strict';var Sequelize=require('sequelize');var squel=require(_0x9da1('0x0'));var _=require(_0x9da1('0x1'));module['exports']={'title':{'type':Sequelize[_0x9da1('0x2')],'allowNull':![]},'type':{'type':Sequelize['STRING'](0x14),'allowNull':![],'validate':{'len':[0x1,0x14]}},'attrs':{'type':Sequelize[_0x9da1('0x3')]('long'),'get':function(){try{return JSON[_0x9da1('0x4')](this[_0x9da1('0x5')](_0x9da1('0x6')));}catch(_0x470043){return[];}},'set':function(_0x156faf){try{this[_0x9da1('0x7')](_0x9da1('0x6'),JSON[_0x9da1('0x8')](_0x156faf));}catch(_0x1c24e6){this[_0x9da1('0x7')]('attrs',JSON['stringify']([]));}}},'sizeX':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1},'sizeY':{'type':Sequelize[_0x9da1('0x9')],'allowNull':![],'defaultValue':0x1},'row':{'type':Sequelize['INTEGER']},'col':{'type':Sequelize[_0x9da1('0x9')]},'background':{'type':Sequelize[_0x9da1('0x2')],'allowNull':![],'defaultValue':_0x9da1('0xa'),'validate':{'notEmpty':!![]}},'foreground':{'type':Sequelize[_0x9da1('0x2')],'allowNull':![],'defaultValue':_0x9da1('0xb'),'validate':{'notEmpty':!![]}},'link':{'type':Sequelize[_0x9da1('0x2')]},'titleFontSize':{'type':Sequelize[_0x9da1('0x9')],'defaultValue':0xc}};
\ No newline at end of file
index 10249da..01e1b28 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfdb3=['../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','save','then','error','stack','name','send','show','params','model','DashboardItem','rawAttributes','query','keys','filters','intersection','attributes','fields','length','includeAll','include','merge','catch','find','type','attrUrl','attrs','value','custom','attrPath','clock','attrHourFormat','HH:mm:ss','attrTimezone','attrFontSize','counter','attrMetric','attrVoiceQueues','attrChannel','voice','attrEmailAccounts','attrFaxAccounts','attrSmsAccounts','attrOpenchannelAccounts','attrChatWebsites','pie-chart','attrSerie1','total','attrSerie2','attrSerie3','attrWhatsappAccounts','web-report','attrReport','reportType','attrRefresh','stringify','create','body','update','eml-format','rimraf','fast-json-patch','bluebird','util','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/utils','../../config/environment'];(function(_0x55ff21,_0x566b6f){var _0x41d9fb=function(_0x1fec46){while(--_0x1fec46){_0x55ff21['push'](_0x55ff21['shift']());}};_0x41d9fb(++_0x566b6f);}(_0xfdb3,0x10c));var _0x3fdb=function(_0x455fff,_0x325219){_0x455fff=_0x455fff-0x0;var _0x44bdfc=_0xfdb3[_0x455fff];return _0x44bdfc;};'use strict';var emlformat=require(_0x3fdb('0x0'));var rimraf=require(_0x3fdb('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x3fdb('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x3fdb('0x3'));var Mustache=require('mustache');var util=require(_0x3fdb('0x4'));var path=require(_0x3fdb('0x5'));var sox=require(_0x3fdb('0x6'));var csv=require(_0x3fdb('0x7'));var ejs=require(_0x3fdb('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x3fdb('0x9'));var squel=require(_0x3fdb('0xa'));var crypto=require(_0x3fdb('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x3fdb('0xc'));var toCsv=require('to-csv');var querystring=require(_0x3fdb('0xd'));var Papa=require(_0x3fdb('0xe'));var Redis=require(_0x3fdb('0xf'));var authService=require(_0x3fdb('0x10'));var qs=require(_0x3fdb('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0x3fdb('0x12'));var config=require(_0x3fdb('0x13'));var licenseUtil=require(_0x3fdb('0x14'));var db=require(_0x3fdb('0x15'))['db'];config[_0x3fdb('0x16')]=_[_0x3fdb('0x17')](config[_0x3fdb('0x16')],{'host':_0x3fdb('0x18'),'port':0x18eb});var socket=require(_0x3fdb('0x19'))(new Redis(config[_0x3fdb('0x16')]));require('./dashboardItem.socket')[_0x3fdb('0x1a')](socket);function respondWithStatusCode(_0x1a5dd8,_0x4cbc07){_0x4cbc07=_0x4cbc07||0xcc;return function(_0x46c906){if(_0x46c906){return _0x1a5dd8[_0x3fdb('0x1b')](_0x4cbc07);}return _0x1a5dd8[_0x3fdb('0x1c')](_0x4cbc07)[_0x3fdb('0x1d')]();};}function respondWithResult(_0x5a9b95,_0x5f2d00){_0x5f2d00=_0x5f2d00||0xc8;return function(_0x52132a){if(_0x52132a){return _0x5a9b95[_0x3fdb('0x1c')](_0x5f2d00)[_0x3fdb('0x1e')](_0x52132a);}};}function respondWithFilteredResult(_0x11d57d,_0xf52e41){return function(_0x212ab6){if(_0x212ab6){var _0x57676f=typeof _0xf52e41[_0x3fdb('0x1f')]===_0x3fdb('0x20')&&typeof _0xf52e41[_0x3fdb('0x21')]===_0x3fdb('0x20');var _0x370f84=_0x212ab6['count'];var _0x319a6c=_0x57676f?0x0:_0xf52e41[_0x3fdb('0x1f')];var _0x44c8b2=_0x57676f?_0x212ab6[_0x3fdb('0x22')]:_0xf52e41[_0x3fdb('0x1f')]+_0xf52e41['limit'];var _0x76431d;if(_0x44c8b2>=_0x370f84){_0x44c8b2=_0x370f84;_0x76431d=0xc8;}else{_0x76431d=0xce;}_0x11d57d['status'](_0x76431d);return _0x11d57d[_0x3fdb('0x23')]('Content-Range',_0x319a6c+'-'+_0x44c8b2+'/'+_0x370f84)['json'](_0x212ab6);}return null;};}function patchUpdates(_0x48b674){return function(_0x5d6e2f){try{jsonpatch[_0x3fdb('0x24')](_0x5d6e2f,_0x48b674,!![]);}catch(_0x264913){return BPromise[_0x3fdb('0x25')](_0x264913);}return _0x5d6e2f[_0x3fdb('0x26')]();};}function saveUpdates(_0x111cb8,_0x3fb779){return function(_0x5d7665){if(_0x5d7665){return _0x5d7665['update'](_0x111cb8)[_0x3fdb('0x27')](function(_0xc0410d){return _0xc0410d;});}return null;};}function removeEntity(_0x5c30b5,_0xaf7f8f){return function(_0x594173){if(_0x594173){return _0x594173['destroy']()[_0x3fdb('0x27')](function(){_0x5c30b5[_0x3fdb('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2a634a,_0x4d9c14){return function(_0x166ff2){if(!_0x166ff2){_0x2a634a[_0x3fdb('0x1b')](0x194);}return _0x166ff2;};}function handleError(_0x11db11,_0x477f79){_0x477f79=_0x477f79||0x1f4;return function(_0x3d6fbe){logger[_0x3fdb('0x28')](_0x3d6fbe[_0x3fdb('0x29')]);if(_0x3d6fbe[_0x3fdb('0x2a')]){delete _0x3d6fbe['name'];}_0x11db11['status'](_0x477f79)[_0x3fdb('0x2b')](_0x3d6fbe);};}exports[_0x3fdb('0x2c')]=function(_0x874f01,_0x45da89){var _0x457a79={'raw':![],'where':{'id':_0x874f01[_0x3fdb('0x2d')]['id']}},_0xa87d82={};_0xa87d82[_0x3fdb('0x2e')]=_['keys'](db[_0x3fdb('0x2f')][_0x3fdb('0x30')]);_0xa87d82[_0x3fdb('0x31')]=_[_0x3fdb('0x32')](_0x874f01[_0x3fdb('0x31')]);_0xa87d82[_0x3fdb('0x33')]=_[_0x3fdb('0x34')](_0xa87d82[_0x3fdb('0x2e')],_0xa87d82[_0x3fdb('0x31')]);_0x457a79[_0x3fdb('0x35')]=_[_0x3fdb('0x34')](_0xa87d82[_0x3fdb('0x2e')],qs[_0x3fdb('0x36')](_0x874f01['query']['fields']));_0x457a79[_0x3fdb('0x35')]=_0x457a79[_0x3fdb('0x35')][_0x3fdb('0x37')]?_0x457a79[_0x3fdb('0x35')]:_0xa87d82[_0x3fdb('0x2e')];if(_0x874f01[_0x3fdb('0x31')][_0x3fdb('0x38')]){_0x457a79[_0x3fdb('0x39')]=[{'all':!![]}];}_0x457a79=_[_0x3fdb('0x3a')]({},_0x457a79,_0x874f01['options']);return db[_0x3fdb('0x2f')]['find'](_0x457a79)[_0x3fdb('0x27')](handleEntityNotFound(_0x45da89,null))[_0x3fdb('0x27')](respondWithResult(_0x45da89,null))[_0x3fdb('0x3b')](handleError(_0x45da89,null));};exports['destroy']=function(_0x29cdfa,_0x324037){return db['DashboardItem'][_0x3fdb('0x3c')]({'where':{'id':_0x29cdfa[_0x3fdb('0x2d')]['id']}})[_0x3fdb('0x27')](handleEntityNotFound(_0x324037,null))[_0x3fdb('0x27')](removeEntity(_0x324037,null))['catch'](handleError(_0x324037,null));};function widgetAttributes(_0x18431a){try{switch(_0x18431a[_0x3fdb('0x3d')]){case'iframe':return[{'name':_0x3fdb('0x3e'),'value':_0x18431a[_0x3fdb('0x3e')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x0]?_0x18431a[_0x3fdb('0x3f')][0x0][_0x3fdb('0x40')]:undefined)||'https://'}];case _0x3fdb('0x41'):return[{'name':'attrPath','value':_0x18431a[_0x3fdb('0x42')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x0]?_0x18431a['attrs'][0x0][_0x3fdb('0x40')]:undefined)||''}];case _0x3fdb('0x43'):return[{'name':_0x3fdb('0x44'),'value':_0x18431a[_0x3fdb('0x44')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x0]?_0x18431a[_0x3fdb('0x3f')][0x0]['value']:undefined)||_0x3fdb('0x45')},{'name':_0x3fdb('0x46'),'value':_0x18431a['attrTimezone']||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x1]?_0x18431a[_0x3fdb('0x3f')][0x1][_0x3fdb('0x40')]:undefined)||'0.00'},{'name':_0x3fdb('0x47'),'value':_0x18431a[_0x3fdb('0x47')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x2]?_0x18431a['attrs'][0x2][_0x3fdb('0x40')]:undefined)||0xc}];case _0x3fdb('0x48'):return[{'name':_0x3fdb('0x49'),'value':_0x18431a[_0x3fdb('0x49')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x0]?_0x18431a[_0x3fdb('0x3f')][0x0][_0x3fdb('0x40')]:undefined)||'total'},{'name':'attrVoiceQueues','value':_0x18431a[_0x3fdb('0x4a')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x1]?_0x18431a[_0x3fdb('0x3f')][0x1][_0x3fdb('0x40')]:undefined)||[]},{'name':_0x3fdb('0x47'),'value':_0x18431a[_0x3fdb('0x47')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x2]?_0x18431a[_0x3fdb('0x3f')][0x2][_0x3fdb('0x40')]:undefined)||0x14},{'name':_0x3fdb('0x4b'),'value':_0x18431a['attrChannel']||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x3]?_0x18431a['attrs'][0x3][_0x3fdb('0x40')]:undefined)||_0x3fdb('0x4c')},{'name':'attrEmailAccounts','value':_0x18431a[_0x3fdb('0x4d')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x4]?_0x18431a['attrs'][0x4][_0x3fdb('0x40')]:undefined)||''},{'name':_0x3fdb('0x4e'),'value':_0x18431a['attrFaxAccounts']||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x5]?_0x18431a[_0x3fdb('0x3f')][0x5][_0x3fdb('0x40')]:undefined)||''},{'name':_0x3fdb('0x4f'),'value':_0x18431a[_0x3fdb('0x4f')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x6]?_0x18431a[_0x3fdb('0x3f')][0x6]['value']:undefined)||''},{'name':_0x3fdb('0x50'),'value':_0x18431a[_0x3fdb('0x50')]||(_0x18431a['attrs']&&_0x18431a['attrs'][0x7]?_0x18431a['attrs'][0x7][_0x3fdb('0x40')]:undefined)||''},{'name':'attrWhatsappAccounts','value':_0x18431a['attrWhatsappAccounts']||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a['attrs'][0x8]?_0x18431a[_0x3fdb('0x3f')][0x8][_0x3fdb('0x40')]:undefined)||''},{'name':'attrChatWebsites','value':_0x18431a[_0x3fdb('0x51')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x9]?_0x18431a['attrs'][0x9][_0x3fdb('0x40')]:undefined)||''}];case'multibar-chart':case _0x3fdb('0x52'):return[{'name':_0x3fdb('0x53'),'value':_0x18431a[_0x3fdb('0x53')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a['attrs'][0x0]?_0x18431a['attrs'][0x0]['value']:undefined)||_0x3fdb('0x54')},{'name':_0x3fdb('0x55'),'value':_0x18431a[_0x3fdb('0x55')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a['attrs'][0x1]?_0x18431a[_0x3fdb('0x3f')][0x1][_0x3fdb('0x40')]:undefined)||null},{'name':_0x3fdb('0x56'),'value':_0x18431a['attrSerie3']||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x2]?_0x18431a[_0x3fdb('0x3f')][0x2]['value']:undefined)||null},{'name':'attrVoiceQueues','value':_0x18431a[_0x3fdb('0x4a')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x3]?_0x18431a['attrs'][0x3][_0x3fdb('0x40')]:undefined)||[]},{'name':_0x3fdb('0x4b'),'value':_0x18431a[_0x3fdb('0x4b')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x4]?_0x18431a[_0x3fdb('0x3f')][0x4][_0x3fdb('0x40')]:undefined)||_0x3fdb('0x4c')},{'name':_0x3fdb('0x4d'),'value':_0x18431a[_0x3fdb('0x4d')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x5]?_0x18431a['attrs'][0x5]['value']:undefined)||''},{'name':_0x3fdb('0x4e'),'value':_0x18431a[_0x3fdb('0x4e')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x6]?_0x18431a[_0x3fdb('0x3f')][0x6][_0x3fdb('0x40')]:undefined)||''},{'name':'attrSmsAccounts','value':_0x18431a[_0x3fdb('0x4f')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a['attrs'][0x7]?_0x18431a[_0x3fdb('0x3f')][0x7][_0x3fdb('0x40')]:undefined)||''},{'name':_0x3fdb('0x50'),'value':_0x18431a[_0x3fdb('0x50')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x8]?_0x18431a[_0x3fdb('0x3f')][0x8][_0x3fdb('0x40')]:undefined)||''},{'name':_0x3fdb('0x57'),'value':_0x18431a['attrWhatsappAccounts']||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x9]?_0x18431a[_0x3fdb('0x3f')][0x9][_0x3fdb('0x40')]:undefined)||''},{'name':_0x3fdb('0x51'),'value':_0x18431a[_0x3fdb('0x51')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a['attrs'][0xa]?_0x18431a[_0x3fdb('0x3f')][0xa]['value']:undefined)||''}];case _0x3fdb('0x58'):return[{'name':_0x3fdb('0x59'),'type':_0x18431a[_0x3fdb('0x5a')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x0]?_0x18431a['attrs'][0x0][_0x3fdb('0x3d')]:undefined)||null,'value':_0x18431a[_0x3fdb('0x59')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x0]?_0x18431a[_0x3fdb('0x3f')][0x0][_0x3fdb('0x40')]:undefined)||null},{'name':_0x3fdb('0x5b'),'value':_0x18431a[_0x3fdb('0x5b')]||(_0x18431a[_0x3fdb('0x3f')]&&_0x18431a[_0x3fdb('0x3f')][0x1]?_0x18431a[_0x3fdb('0x3f')][0x1]['value']:undefined)||0x0}];default:return[];}}catch(_0x5519a8){logger[_0x3fdb('0x28')]('widgetAttributes:\x20%s',JSON[_0x3fdb('0x5c')](_0x5519a8));return[];}}exports[_0x3fdb('0x5d')]=function(_0x42cbe5,_0x5b5993){if(_0x42cbe5['body']){_0x42cbe5[_0x3fdb('0x5e')][_0x3fdb('0x3f')]=widgetAttributes(_0x42cbe5[_0x3fdb('0x5e')]);}return db[_0x3fdb('0x2f')][_0x3fdb('0x5d')](_0x42cbe5['body'],{})[_0x3fdb('0x27')](respondWithResult(_0x5b5993,0xc9))[_0x3fdb('0x3b')](handleError(_0x5b5993,null));};exports[_0x3fdb('0x5f')]=function(_0x1366d4,_0x5110af){if(_0x1366d4[_0x3fdb('0x5e')]['id']){delete _0x1366d4['body']['id'];}_0x1366d4[_0x3fdb('0x5e')][_0x3fdb('0x3f')]=widgetAttributes(_0x1366d4[_0x3fdb('0x5e')]);return db[_0x3fdb('0x2f')][_0x3fdb('0x3c')]({'where':{'id':_0x1366d4['params']['id']}})[_0x3fdb('0x27')](handleEntityNotFound(_0x5110af,null))[_0x3fdb('0x27')](saveUpdates(_0x1366d4[_0x3fdb('0x5e')],null))[_0x3fdb('0x27')](respondWithResult(_0x5110af,null))['catch'](handleError(_0x5110af,null));};
\ No newline at end of file
+var _0xbe2a=['zip-dir','fast-json-patch','request-promise','moment','bluebird','util','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/environment','../../mysqldb','redis','localhost','socket.io-emitter','./dashboardItem.socket','register','sendStatus','status','json','offset','undefined','limit','set','Content-Range','reject','save','update','then','error','stack','name','send','show','params','keys','DashboardItem','rawAttributes','query','attributes','intersection','fields','length','model','includeAll','include','find','catch','type','iframe','attrs','value','https://','custom','attrPath','attrHourFormat','HH:mm:ss','attrTimezone','0.00','attrFontSize','counter','attrMetric','total','attrVoiceQueues','attrChannel','attrEmailAccounts','attrFaxAccounts','attrSmsAccounts','attrOpenchannelAccounts','attrWhatsappAccounts','attrChatWebsites','multibar-chart','pie-chart','attrSerie1','attrSerie2','attrSerie3','web-report','attrReport','reportType','attrRefresh','stringify','body','create','eml-format','rimraf'];(function(_0x46ed73,_0x53d915){var _0x220387=function(_0x5460bc){while(--_0x5460bc){_0x46ed73['push'](_0x46ed73['shift']());}};_0x220387(++_0x53d915);}(_0xbe2a,0x1d9));var _0xabe2=function(_0x5c9589,_0x3800a5){_0x5c9589=_0x5c9589-0x0;var _0x5e6ea3=_0xbe2a[_0x5c9589];return _0x5e6ea3;};'use strict';var emlformat=require(_0xabe2('0x0'));var rimraf=require(_0xabe2('0x1'));var zipdir=require(_0xabe2('0x2'));var jsonpatch=require(_0xabe2('0x3'));var rp=require(_0xabe2('0x4'));var moment=require(_0xabe2('0x5'));var BPromise=require(_0xabe2('0x6'));var Mustache=require('mustache');var util=require(_0xabe2('0x7'));var path=require('path');var sox=require(_0xabe2('0x8'));var csv=require(_0xabe2('0x9'));var ejs=require(_0xabe2('0xa'));var fs=require('fs');var fs_extra=require(_0xabe2('0xb'));var _=require(_0xabe2('0xc'));var squel=require(_0xabe2('0xd'));var crypto=require('crypto');var jsforce=require(_0xabe2('0xe'));var deskjs=require(_0xabe2('0xf'));var toCsv=require(_0xabe2('0x9'));var querystring=require(_0xabe2('0x10'));var Papa=require(_0xabe2('0x11'));var Redis=require(_0xabe2('0x12'));var authService=require('../../components/auth/service');var qs=require(_0xabe2('0x13'));var as=require(_0xabe2('0x14'));var hardwareService=require(_0xabe2('0x15'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0xabe2('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0xabe2('0x17'))['db'];config[_0xabe2('0x18')]=_['defaults'](config['redis'],{'host':_0xabe2('0x19'),'port':0x18eb});var socket=require(_0xabe2('0x1a'))(new Redis(config[_0xabe2('0x18')]));require(_0xabe2('0x1b'))[_0xabe2('0x1c')](socket);function respondWithStatusCode(_0xb8343d,_0x3d94a9){_0x3d94a9=_0x3d94a9||0xcc;return function(_0x3eb2e3){if(_0x3eb2e3){return _0xb8343d[_0xabe2('0x1d')](_0x3d94a9);}return _0xb8343d[_0xabe2('0x1e')](_0x3d94a9)['end']();};}function respondWithResult(_0x3dd6d9,_0x3ba203){_0x3ba203=_0x3ba203||0xc8;return function(_0x3eb2b2){if(_0x3eb2b2){return _0x3dd6d9['status'](_0x3ba203)[_0xabe2('0x1f')](_0x3eb2b2);}};}function respondWithFilteredResult(_0x59d667,_0x90ee5e){return function(_0x2d4bba){if(_0x2d4bba){var _0x49c4c3=typeof _0x90ee5e[_0xabe2('0x20')]===_0xabe2('0x21')&&typeof _0x90ee5e['limit']===_0xabe2('0x21');var _0x145a9d=_0x2d4bba['count'];var _0x55d89=_0x49c4c3?0x0:_0x90ee5e[_0xabe2('0x20')];var _0x2906f4=_0x49c4c3?_0x2d4bba['count']:_0x90ee5e[_0xabe2('0x20')]+_0x90ee5e[_0xabe2('0x22')];var _0x29a7b6;if(_0x2906f4>=_0x145a9d){_0x2906f4=_0x145a9d;_0x29a7b6=0xc8;}else{_0x29a7b6=0xce;}_0x59d667[_0xabe2('0x1e')](_0x29a7b6);return _0x59d667[_0xabe2('0x23')](_0xabe2('0x24'),_0x55d89+'-'+_0x2906f4+'/'+_0x145a9d)['json'](_0x2d4bba);}return null;};}function patchUpdates(_0x237a41){return function(_0x3472b4){try{jsonpatch['apply'](_0x3472b4,_0x237a41,!![]);}catch(_0x4ea837){return BPromise[_0xabe2('0x25')](_0x4ea837);}return _0x3472b4[_0xabe2('0x26')]();};}function saveUpdates(_0x1558a6,_0x91f296){return function(_0x5c83fb){if(_0x5c83fb){return _0x5c83fb[_0xabe2('0x27')](_0x1558a6)[_0xabe2('0x28')](function(_0x2c0c92){return _0x2c0c92;});}return null;};}function removeEntity(_0x49cd80,_0x3857cd){return function(_0x467365){if(_0x467365){return _0x467365['destroy']()[_0xabe2('0x28')](function(){_0x49cd80[_0xabe2('0x1e')](0xcc)['end']();});}};}function handleEntityNotFound(_0x22a760,_0x519805){return function(_0x402c91){if(!_0x402c91){_0x22a760[_0xabe2('0x1d')](0x194);}return _0x402c91;};}function handleError(_0x20aee1,_0x8a5517){_0x8a5517=_0x8a5517||0x1f4;return function(_0x302919){logger[_0xabe2('0x29')](_0x302919[_0xabe2('0x2a')]);if(_0x302919['name']){delete _0x302919[_0xabe2('0x2b')];}_0x20aee1[_0xabe2('0x1e')](_0x8a5517)[_0xabe2('0x2c')](_0x302919);};}exports[_0xabe2('0x2d')]=function(_0x29ef25,_0x527a23){var _0x2824a2={'raw':![],'where':{'id':_0x29ef25[_0xabe2('0x2e')]['id']}},_0x20ee27={};_0x20ee27['model']=_[_0xabe2('0x2f')](db[_0xabe2('0x30')][_0xabe2('0x31')]);_0x20ee27[_0xabe2('0x32')]=_[_0xabe2('0x2f')](_0x29ef25[_0xabe2('0x32')]);_0x20ee27['filters']=_['intersection'](_0x20ee27['model'],_0x20ee27['query']);_0x2824a2[_0xabe2('0x33')]=_[_0xabe2('0x34')](_0x20ee27['model'],qs[_0xabe2('0x35')](_0x29ef25['query'][_0xabe2('0x35')]));_0x2824a2['attributes']=_0x2824a2['attributes'][_0xabe2('0x36')]?_0x2824a2[_0xabe2('0x33')]:_0x20ee27[_0xabe2('0x37')];if(_0x29ef25[_0xabe2('0x32')][_0xabe2('0x38')]){_0x2824a2[_0xabe2('0x39')]=[{'all':!![]}];}_0x2824a2=_['merge']({},_0x2824a2,_0x29ef25['options']);return db['DashboardItem'][_0xabe2('0x3a')](_0x2824a2)[_0xabe2('0x28')](handleEntityNotFound(_0x527a23,null))['then'](respondWithResult(_0x527a23,null))[_0xabe2('0x3b')](handleError(_0x527a23,null));};exports['destroy']=function(_0x510ca1,_0x438d68){return db['DashboardItem'][_0xabe2('0x3a')]({'where':{'id':_0x510ca1[_0xabe2('0x2e')]['id']}})[_0xabe2('0x28')](handleEntityNotFound(_0x438d68,null))[_0xabe2('0x28')](removeEntity(_0x438d68,null))[_0xabe2('0x3b')](handleError(_0x438d68,null));};function widgetAttributes(_0x170940){try{switch(_0x170940[_0xabe2('0x3c')]){case _0xabe2('0x3d'):return[{'name':'attrUrl','value':_0x170940['attrUrl']||(_0x170940[_0xabe2('0x3e')]&&_0x170940[_0xabe2('0x3e')][0x0]?_0x170940['attrs'][0x0][_0xabe2('0x3f')]:undefined)||_0xabe2('0x40')}];case _0xabe2('0x41'):return[{'name':_0xabe2('0x42'),'value':_0x170940[_0xabe2('0x42')]||(_0x170940['attrs']&&_0x170940[_0xabe2('0x3e')][0x0]?_0x170940[_0xabe2('0x3e')][0x0]['value']:undefined)||''}];case'clock':return[{'name':_0xabe2('0x43'),'value':_0x170940['attrHourFormat']||(_0x170940['attrs']&&_0x170940[_0xabe2('0x3e')][0x0]?_0x170940[_0xabe2('0x3e')][0x0][_0xabe2('0x3f')]:undefined)||_0xabe2('0x44')},{'name':_0xabe2('0x45'),'value':_0x170940['attrTimezone']||(_0x170940['attrs']&&_0x170940['attrs'][0x1]?_0x170940[_0xabe2('0x3e')][0x1]['value']:undefined)||_0xabe2('0x46')},{'name':'attrFontSize','value':_0x170940[_0xabe2('0x47')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940['attrs'][0x2]?_0x170940['attrs'][0x2][_0xabe2('0x3f')]:undefined)||0xc}];case _0xabe2('0x48'):return[{'name':_0xabe2('0x49'),'value':_0x170940[_0xabe2('0x49')]||(_0x170940['attrs']&&_0x170940[_0xabe2('0x3e')][0x0]?_0x170940[_0xabe2('0x3e')][0x0][_0xabe2('0x3f')]:undefined)||_0xabe2('0x4a')},{'name':'attrVoiceQueues','value':_0x170940[_0xabe2('0x4b')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940[_0xabe2('0x3e')][0x1]?_0x170940['attrs'][0x1][_0xabe2('0x3f')]:undefined)||[]},{'name':_0xabe2('0x47'),'value':_0x170940[_0xabe2('0x47')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940[_0xabe2('0x3e')][0x2]?_0x170940[_0xabe2('0x3e')][0x2]['value']:undefined)||0x14},{'name':_0xabe2('0x4c'),'value':_0x170940[_0xabe2('0x4c')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940['attrs'][0x3]?_0x170940['attrs'][0x3][_0xabe2('0x3f')]:undefined)||'voice'},{'name':_0xabe2('0x4d'),'value':_0x170940[_0xabe2('0x4d')]||(_0x170940['attrs']&&_0x170940['attrs'][0x4]?_0x170940[_0xabe2('0x3e')][0x4][_0xabe2('0x3f')]:undefined)||''},{'name':'attrFaxAccounts','value':_0x170940[_0xabe2('0x4e')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940['attrs'][0x5]?_0x170940['attrs'][0x5]['value']:undefined)||''},{'name':_0xabe2('0x4f'),'value':_0x170940[_0xabe2('0x4f')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940['attrs'][0x6]?_0x170940[_0xabe2('0x3e')][0x6][_0xabe2('0x3f')]:undefined)||''},{'name':_0xabe2('0x50'),'value':_0x170940[_0xabe2('0x50')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940[_0xabe2('0x3e')][0x7]?_0x170940[_0xabe2('0x3e')][0x7]['value']:undefined)||''},{'name':_0xabe2('0x51'),'value':_0x170940[_0xabe2('0x51')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940['attrs'][0x8]?_0x170940['attrs'][0x8][_0xabe2('0x3f')]:undefined)||''},{'name':_0xabe2('0x52'),'value':_0x170940[_0xabe2('0x52')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940[_0xabe2('0x3e')][0x9]?_0x170940[_0xabe2('0x3e')][0x9][_0xabe2('0x3f')]:undefined)||''}];case _0xabe2('0x53'):case _0xabe2('0x54'):return[{'name':_0xabe2('0x55'),'value':_0x170940[_0xabe2('0x55')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940['attrs'][0x0]?_0x170940[_0xabe2('0x3e')][0x0][_0xabe2('0x3f')]:undefined)||'total'},{'name':_0xabe2('0x56'),'value':_0x170940['attrSerie2']||(_0x170940['attrs']&&_0x170940['attrs'][0x1]?_0x170940[_0xabe2('0x3e')][0x1][_0xabe2('0x3f')]:undefined)||null},{'name':_0xabe2('0x57'),'value':_0x170940[_0xabe2('0x57')]||(_0x170940['attrs']&&_0x170940[_0xabe2('0x3e')][0x2]?_0x170940[_0xabe2('0x3e')][0x2][_0xabe2('0x3f')]:undefined)||null},{'name':'attrVoiceQueues','value':_0x170940[_0xabe2('0x4b')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940[_0xabe2('0x3e')][0x3]?_0x170940[_0xabe2('0x3e')][0x3][_0xabe2('0x3f')]:undefined)||[]},{'name':_0xabe2('0x4c'),'value':_0x170940[_0xabe2('0x4c')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940[_0xabe2('0x3e')][0x4]?_0x170940[_0xabe2('0x3e')][0x4][_0xabe2('0x3f')]:undefined)||'voice'},{'name':_0xabe2('0x4d'),'value':_0x170940['attrEmailAccounts']||(_0x170940[_0xabe2('0x3e')]&&_0x170940[_0xabe2('0x3e')][0x5]?_0x170940[_0xabe2('0x3e')][0x5][_0xabe2('0x3f')]:undefined)||''},{'name':_0xabe2('0x4e'),'value':_0x170940[_0xabe2('0x4e')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940[_0xabe2('0x3e')][0x6]?_0x170940['attrs'][0x6]['value']:undefined)||''},{'name':'attrSmsAccounts','value':_0x170940[_0xabe2('0x4f')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940['attrs'][0x7]?_0x170940['attrs'][0x7][_0xabe2('0x3f')]:undefined)||''},{'name':_0xabe2('0x50'),'value':_0x170940[_0xabe2('0x50')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940[_0xabe2('0x3e')][0x8]?_0x170940['attrs'][0x8][_0xabe2('0x3f')]:undefined)||''},{'name':_0xabe2('0x51'),'value':_0x170940['attrWhatsappAccounts']||(_0x170940[_0xabe2('0x3e')]&&_0x170940['attrs'][0x9]?_0x170940[_0xabe2('0x3e')][0x9][_0xabe2('0x3f')]:undefined)||''},{'name':_0xabe2('0x52'),'value':_0x170940[_0xabe2('0x52')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940[_0xabe2('0x3e')][0xa]?_0x170940[_0xabe2('0x3e')][0xa][_0xabe2('0x3f')]:undefined)||''}];case _0xabe2('0x58'):return[{'name':_0xabe2('0x59'),'type':_0x170940[_0xabe2('0x5a')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940[_0xabe2('0x3e')][0x0]?_0x170940['attrs'][0x0][_0xabe2('0x3c')]:undefined)||null,'value':_0x170940[_0xabe2('0x59')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940[_0xabe2('0x3e')][0x0]?_0x170940[_0xabe2('0x3e')][0x0][_0xabe2('0x3f')]:undefined)||null},{'name':_0xabe2('0x5b'),'value':_0x170940[_0xabe2('0x5b')]||(_0x170940[_0xabe2('0x3e')]&&_0x170940[_0xabe2('0x3e')][0x1]?_0x170940[_0xabe2('0x3e')][0x1][_0xabe2('0x3f')]:undefined)||0x0}];default:return[];}}catch(_0x4d91ee){logger[_0xabe2('0x29')]('widgetAttributes:\x20%s',JSON[_0xabe2('0x5c')](_0x4d91ee));return[];}}exports['create']=function(_0x59ea8c,_0x2770eb){if(_0x59ea8c[_0xabe2('0x5d')]){_0x59ea8c[_0xabe2('0x5d')]['attrs']=widgetAttributes(_0x59ea8c['body']);}return db['DashboardItem'][_0xabe2('0x5e')](_0x59ea8c[_0xabe2('0x5d')],{})[_0xabe2('0x28')](respondWithResult(_0x2770eb,0xc9))[_0xabe2('0x3b')](handleError(_0x2770eb,null));};exports[_0xabe2('0x27')]=function(_0x31ef5d,_0x50457b){if(_0x31ef5d[_0xabe2('0x5d')]['id']){delete _0x31ef5d[_0xabe2('0x5d')]['id'];}_0x31ef5d[_0xabe2('0x5d')][_0xabe2('0x3e')]=widgetAttributes(_0x31ef5d[_0xabe2('0x5d')]);return db['DashboardItem']['find']({'where':{'id':_0x31ef5d[_0xabe2('0x2e')]['id']}})[_0xabe2('0x28')](handleEntityNotFound(_0x50457b,null))['then'](saveUpdates(_0x31ef5d[_0xabe2('0x5d')],null))[_0xabe2('0x28')](respondWithResult(_0x50457b,null))[_0xabe2('0x3b')](handleError(_0x50457b,null));};
\ No newline at end of file
index dde3978..a469639 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2b09=['hook','exports','events','../../mysqldb','DashboardItem','setMaxListeners','update','remove','emit'];(function(_0x59ee6f,_0x450239){var _0x4c0979=function(_0x565e92){while(--_0x565e92){_0x59ee6f['push'](_0x59ee6f['shift']());}};_0x4c0979(++_0x450239);}(_0x2b09,0x1bb));var _0x92b0=function(_0x347110,_0x13aa0f){_0x347110=_0x347110-0x0;var _0x37dfb4=_0x2b09[_0x347110];return _0x37dfb4;};'use strict';var EventEmitter=require(_0x92b0('0x0'));var DashboardItem=require(_0x92b0('0x1'))['db'][_0x92b0('0x2')];var DashboardItemEvents=new EventEmitter();DashboardItemEvents[_0x92b0('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x92b0('0x4'),'afterDestroy':_0x92b0('0x5')};function emitEvent(_0xc72165){return function(_0x1e5868,_0x1d77d8,_0xff180c){DashboardItemEvents['emit'](_0xc72165+':'+_0x1e5868['id'],_0x1e5868);DashboardItemEvents[_0x92b0('0x6')](_0xc72165,_0x1e5868);_0xff180c(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];DashboardItem[_0x92b0('0x7')](e,emitEvent(event));}}module[_0x92b0('0x8')]=DashboardItemEvents;
\ No newline at end of file
+var _0x6636=['hasOwnProperty','hook','events','../../mysqldb','setMaxListeners','save','update','remove','emit'];(function(_0x62ec9e,_0x21c9a6){var _0x480322=function(_0x28c0d8){while(--_0x28c0d8){_0x62ec9e['push'](_0x62ec9e['shift']());}};_0x480322(++_0x21c9a6);}(_0x6636,0x119));var _0x6663=function(_0x34aa9c,_0x2e3071){_0x34aa9c=_0x34aa9c-0x0;var _0x5c12fa=_0x6636[_0x34aa9c];return _0x5c12fa;};'use strict';var EventEmitter=require(_0x6663('0x0'));var DashboardItem=require(_0x6663('0x1'))['db']['DashboardItem'];var DashboardItemEvents=new EventEmitter();DashboardItemEvents[_0x6663('0x2')](0x0);var events={'afterCreate':_0x6663('0x3'),'afterUpdate':_0x6663('0x4'),'afterDestroy':_0x6663('0x5')};function emitEvent(_0x3b27e6){return function(_0x26173b,_0x24de71,_0x39f6ff){DashboardItemEvents[_0x6663('0x6')](_0x3b27e6+':'+_0x26173b['id'],_0x26173b);DashboardItemEvents[_0x6663('0x6')](_0x3b27e6,_0x26173b);_0x39f6ff(null);};}for(var e in events){if(events[_0x6663('0x7')](e)){var event=events[e];DashboardItem[_0x6663('0x8')](e,emitEvent(event));}}module['exports']=DashboardItemEvents;
\ No newline at end of file
index 5745103..aa58a96 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x60f2=['DashboardItem','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','./dashboardItem.attributes','exports','define'];(function(_0x5171ff,_0x5e9e47){var _0x2287ce=function(_0x1e5fca){while(--_0x1e5fca){_0x5171ff['push'](_0x5171ff['shift']());}};_0x2287ce(++_0x5e9e47);}(_0x60f2,0x1bd));var _0x260f=function(_0x2c87c7,_0x3c5fce){_0x2c87c7=_0x2c87c7-0x0;var _0x487963=_0x60f2[_0x2c87c7];return _0x487963;};'use strict';var _=require(_0x260f('0x0'));var util=require(_0x260f('0x1'));var logger=require(_0x260f('0x2'))('api');var moment=require(_0x260f('0x3'));var BPromise=require(_0x260f('0x4'));var rp=require(_0x260f('0x5'));var fs=require('fs');var path=require(_0x260f('0x6'));var rimraf=require(_0x260f('0x7'));var config=require('../../config/environment');var attributes=require(_0x260f('0x8'));module[_0x260f('0x9')]=function(_0x45adcb,_0x17a1cc){return _0x45adcb[_0x260f('0xa')](_0x260f('0xb'),attributes,{'tableName':'dashboard_items','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x96c0=['DashboardItem','lodash','util','../../config/logger','api','moment','request-promise','../../config/environment','./dashboardItem.attributes','exports'];(function(_0x5e536f,_0x25f933){var _0x57b4cb=function(_0x7a9b51){while(--_0x7a9b51){_0x5e536f['push'](_0x5e536f['shift']());}};_0x57b4cb(++_0x25f933);}(_0x96c0,0xdd));var _0x096c=function(_0x24602f,_0xce5df6){_0x24602f=_0x24602f-0x0;var _0x3a16bc=_0x96c0[_0x24602f];return _0x3a16bc;};'use strict';var _=require(_0x096c('0x0'));var util=require(_0x096c('0x1'));var logger=require(_0x096c('0x2'))(_0x096c('0x3'));var moment=require(_0x096c('0x4'));var BPromise=require('bluebird');var rp=require(_0x096c('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x096c('0x6'));var attributes=require(_0x096c('0x7'));module[_0x096c('0x8')]=function(_0x247358,_0x9770){return _0x247358['define'](_0x096c('0x9'),attributes,{'tableName':'dashboard_items','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index f71abf7..9eb1b96 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9785=['debug','error','code','message','info','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./dashboardItem.socket','register','request','then','DashboardItem,\x20%s,\x20%s','request\x20sent'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x9785,0x1e7));var _0x5978=function(_0x134c2e,_0x3573c4){_0x134c2e=_0x134c2e-0x0;var _0x2825db=_0x9785[_0x134c2e];return _0x2825db;};'use strict';var _=require(_0x5978('0x0'));var util=require(_0x5978('0x1'));var moment=require(_0x5978('0x2'));var BPromise=require(_0x5978('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5978('0x4'));var db=require(_0x5978('0x5'))['db'];var utils=require(_0x5978('0x6'));var logger=require(_0x5978('0x7'))(_0x5978('0x8'));var config=require(_0x5978('0x9'));var jayson=require(_0x5978('0xa'));var client=jayson[_0x5978('0xb')][_0x5978('0xc')]({'port':0x232a});config[_0x5978('0xd')]=_[_0x5978('0xe')](config[_0x5978('0xd')],{'host':_0x5978('0xf'),'port':0x18eb});var socket=require(_0x5978('0x10'))(new Redis(config[_0x5978('0xd')]));require(_0x5978('0x11'))[_0x5978('0x12')](socket);function respondWithRpcPromise(_0x306fbc,_0x40a9f4,_0x1dbdf5){return new BPromise(function(_0x5441c6,_0x56bd17){return client[_0x5978('0x13')](_0x306fbc,_0x1dbdf5)[_0x5978('0x14')](function(_0x523de8){logger['info'](_0x5978('0x15'),_0x40a9f4,_0x5978('0x16'));logger[_0x5978('0x17')]('DashboardItem,\x20%s,\x20%s,\x20%s',_0x40a9f4,'request\x20sent',JSON['stringify'](_0x523de8));if(_0x523de8[_0x5978('0x18')]){if(_0x523de8[_0x5978('0x18')][_0x5978('0x19')]===0x1f4){logger['error'](_0x5978('0x15'),_0x40a9f4,_0x523de8[_0x5978('0x18')][_0x5978('0x1a')]);return _0x56bd17(_0x523de8[_0x5978('0x18')][_0x5978('0x1a')]);}logger['error'](_0x5978('0x15'),_0x40a9f4,_0x523de8[_0x5978('0x18')][_0x5978('0x1a')]);return _0x5441c6(_0x523de8['error'][_0x5978('0x1a')]);}else{logger[_0x5978('0x1b')]('DashboardItem,\x20%s,\x20%s',_0x40a9f4,_0x5978('0x16'));_0x5441c6(_0x523de8[_0x5978('0x1c')]['message']);}})[_0x5978('0x1d')](function(_0x458664){logger[_0x5978('0x18')](_0x5978('0x15'),_0x40a9f4,_0x458664);_0x56bd17(_0x458664);});});}
\ No newline at end of file
+var _0x17eb=['redis','defaults','localhost','socket.io-emitter','./dashboardItem.socket','register','request','then','info','DashboardItem,\x20%s,\x20%s','request\x20sent','debug','DashboardItem,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http'];(function(_0x2b5eae,_0x55010d){var _0x5f3ac9=function(_0x397bfc){while(--_0x397bfc){_0x2b5eae['push'](_0x2b5eae['shift']());}};_0x5f3ac9(++_0x55010d);}(_0x17eb,0xdd));var _0xb17e=function(_0x7c0ca,_0x3ed137){_0x7c0ca=_0x7c0ca-0x0;var _0x2052c5=_0x17eb[_0x7c0ca];return _0x2052c5;};'use strict';var _=require(_0xb17e('0x0'));var util=require(_0xb17e('0x1'));var moment=require('moment');var BPromise=require(_0xb17e('0x2'));var rs=require(_0xb17e('0x3'));var fs=require('fs');var Redis=require(_0xb17e('0x4'));var db=require(_0xb17e('0x5'))['db'];var utils=require(_0xb17e('0x6'));var logger=require(_0xb17e('0x7'))(_0xb17e('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xb17e('0x9')][_0xb17e('0xa')]({'port':0x232a});config[_0xb17e('0xb')]=_[_0xb17e('0xc')](config[_0xb17e('0xb')],{'host':_0xb17e('0xd'),'port':0x18eb});var socket=require(_0xb17e('0xe'))(new Redis(config[_0xb17e('0xb')]));require(_0xb17e('0xf'))[_0xb17e('0x10')](socket);function respondWithRpcPromise(_0x1cddac,_0x9f2dd2,_0x2c2df4){return new BPromise(function(_0x39e7d6,_0x11f82f){return client[_0xb17e('0x11')](_0x1cddac,_0x2c2df4)[_0xb17e('0x12')](function(_0x153790){logger[_0xb17e('0x13')](_0xb17e('0x14'),_0x9f2dd2,_0xb17e('0x15'));logger[_0xb17e('0x16')](_0xb17e('0x17'),_0x9f2dd2,'request\x20sent',JSON[_0xb17e('0x18')](_0x153790));if(_0x153790['error']){if(_0x153790['error']['code']===0x1f4){logger[_0xb17e('0x19')](_0xb17e('0x14'),_0x9f2dd2,_0x153790[_0xb17e('0x19')]['message']);return _0x11f82f(_0x153790[_0xb17e('0x19')]['message']);}logger[_0xb17e('0x19')](_0xb17e('0x14'),_0x9f2dd2,_0x153790[_0xb17e('0x19')][_0xb17e('0x1a')]);return _0x39e7d6(_0x153790[_0xb17e('0x19')]['message']);}else{logger[_0xb17e('0x13')](_0xb17e('0x14'),_0x9f2dd2,'request\x20sent');_0x39e7d6(_0x153790[_0xb17e('0x1b')][_0xb17e('0x1a')]);}})[_0xb17e('0x1c')](function(_0x5d5492){logger[_0xb17e('0x19')](_0xb17e('0x14'),_0x9f2dd2,_0x5d5492);_0x11f82f(_0x5d5492);});});}
\ No newline at end of file
index 2a01e4d..7918d17 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7926=['./dashboardItem.events','save','remove','update','emit','register','length'];(function(_0xcab78a,_0x4dcb3b){var _0x18c1ca=function(_0x508b90){while(--_0x508b90){_0xcab78a['push'](_0xcab78a['shift']());}};_0x18c1ca(++_0x4dcb3b);}(_0x7926,0x134));var _0x6792=function(_0x52441d,_0x23ad5a){_0x52441d=_0x52441d-0x0;var _0x13a0a4=_0x7926[_0x52441d];return _0x13a0a4;};'use strict';var DashboardItemEvents=require(_0x6792('0x0'));var events=[_0x6792('0x1'),_0x6792('0x2'),_0x6792('0x3')];function createListener(_0x1afdad,_0x43f7d1){return function(_0x28ce7f){_0x43f7d1[_0x6792('0x4')](_0x1afdad,_0x28ce7f);};}function removeListener(_0x59197f,_0x4501a7){return function(){DashboardItemEvents['removeListener'](_0x59197f,_0x4501a7);};}exports[_0x6792('0x5')]=function(_0x24aa99){for(var _0x21d755=0x0,_0x45c445=events[_0x6792('0x6')];_0x21d755<_0x45c445;_0x21d755++){var _0x32277c=events[_0x21d755];var _0x3a23d8=createListener('dashboardItem:'+_0x32277c,_0x24aa99);DashboardItemEvents['on'](_0x32277c,_0x3a23d8);}};
\ No newline at end of file
+var _0x46a5=['update','emit','removeListener','register','length','./dashboardItem.events','save'];(function(_0x4ba102,_0x3dc213){var _0x1f35e7=function(_0xceae5a){while(--_0xceae5a){_0x4ba102['push'](_0x4ba102['shift']());}};_0x1f35e7(++_0x3dc213);}(_0x46a5,0x171));var _0x546a=function(_0x328991,_0x2e4053){_0x328991=_0x328991-0x0;var _0x3f824f=_0x46a5[_0x328991];return _0x3f824f;};'use strict';var DashboardItemEvents=require(_0x546a('0x0'));var events=[_0x546a('0x1'),'remove',_0x546a('0x2')];function createListener(_0x33ffe4,_0x44b9d5){return function(_0xa0fd98){_0x44b9d5[_0x546a('0x3')](_0x33ffe4,_0xa0fd98);};}function removeListener(_0x36a2a6,_0x26a006){return function(){DashboardItemEvents[_0x546a('0x4')](_0x36a2a6,_0x26a006);};}exports[_0x546a('0x5')]=function(_0x4642eb){for(var _0x1b4ad4=0x0,_0x552175=events[_0x546a('0x6')];_0x1b4ad4<_0x552175;_0x1b4ad4++){var _0x4de63b=events[_0x1b4ad4];var _0x218f43=createListener('dashboardItem:'+_0x4de63b,_0x4642eb);DashboardItemEvents['on'](_0x4de63b,_0x218f43);}};
\ No newline at end of file
index af9a839..ddf3736 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0aff=['create','put','isAuthenticated','update','delete','destroy','multer','path','connect-timeout','express','Router','../../components/interaction/service','./dashboardItem.controller','/:id','show'];(function(_0x399ecd,_0x1068c3){var _0x4e5421=function(_0x8aadff){while(--_0x8aadff){_0x399ecd['push'](_0x399ecd['shift']());}};_0x4e5421(++_0x1068c3);}(_0x0aff,0xab));var _0xf0af=function(_0x25a45a,_0x156e4b){_0x25a45a=_0x25a45a-0x0;var _0x237f87=_0x0aff[_0x25a45a];return _0x237f87;};'use strict';var multer=require(_0xf0af('0x0'));var util=require('util');var path=require(_0xf0af('0x1'));var timeout=require(_0xf0af('0x2'));var express=require(_0xf0af('0x3'));var router=express[_0xf0af('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xf0af('0x5'));var config=require('../../config/environment');var controller=require(_0xf0af('0x6'));router['get'](_0xf0af('0x7'),auth['isAuthenticated'](),controller[_0xf0af('0x8')]);router['post']('/',auth['isAuthenticated'](),controller[_0xf0af('0x9')]);router[_0xf0af('0xa')](_0xf0af('0x7'),auth[_0xf0af('0xb')](),controller[_0xf0af('0xc')]);router[_0xf0af('0xd')](_0xf0af('0x7'),auth[_0xf0af('0xb')](),controller[_0xf0af('0xe')]);module['exports']=router;
\ No newline at end of file
+var _0x6953=['fs-extra','../../components/auth/service','../../components/interaction/service','./dashboardItem.controller','isAuthenticated','show','post','create','put','/:id','destroy','exports','util','path','express'];(function(_0x1664de,_0x7de777){var _0x411f8f=function(_0x38333f){while(--_0x38333f){_0x1664de['push'](_0x1664de['shift']());}};_0x411f8f(++_0x7de777);}(_0x6953,0x1bf));var _0x3695=function(_0x3389ac,_0x4999b3){_0x3389ac=_0x3389ac-0x0;var _0x4961a9=_0x6953[_0x3389ac];return _0x4961a9;};'use strict';var multer=require('multer');var util=require(_0x3695('0x0'));var path=require(_0x3695('0x1'));var timeout=require('connect-timeout');var express=require(_0x3695('0x2'));var router=express['Router']();var fs_extra=require(_0x3695('0x3'));var auth=require(_0x3695('0x4'));var interaction=require(_0x3695('0x5'));var config=require('../../config/environment');var controller=require(_0x3695('0x6'));router['get']('/:id',auth[_0x3695('0x7')](),controller[_0x3695('0x8')]);router[_0x3695('0x9')]('/',auth[_0x3695('0x7')](),controller[_0x3695('0xa')]);router[_0x3695('0xb')]('/:id',auth[_0x3695('0x7')](),controller['update']);router['delete'](_0x3695('0xc'),auth['isAuthenticated'](),controller[_0x3695('0xd')]);module[_0x3695('0xe')]=router;
\ No newline at end of file
index bac28a8..8fd2920 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc0d0=['sequelize','STRING','ENUM','first','second','third'];(function(_0x2a11e0,_0x318b4b){var _0xed89fe=function(_0x45148e){while(--_0x45148e){_0x2a11e0['push'](_0x2a11e0['shift']());}};_0xed89fe(++_0x318b4b);}(_0xc0d0,0x17a));var _0x0c0d=function(_0x5f4cd7,_0x459c44){_0x5f4cd7=_0x5f4cd7-0x0;var _0x47c93f=_0xc0d0[_0x5f4cd7];return _0x47c93f;};'use strict';var Sequelize=require(_0x0c0d('0x0'));module['exports']={'name':{'type':Sequelize[_0x0c0d('0x1')],'allowNull':![]},'level':{'type':Sequelize[_0x0c0d('0x2')](_0x0c0d('0x3'),_0x0c0d('0x4'),_0x0c0d('0x5')),'allowNull':![],'defaultValue':_0x0c0d('0x3')},'description':{'type':Sequelize[_0x0c0d('0x1')]}};
\ No newline at end of file
+var _0x37ea=['third','exports','STRING','first','second'];(function(_0x3513ed,_0x1a671e){var _0x4a70aa=function(_0x28879e){while(--_0x28879e){_0x3513ed['push'](_0x3513ed['shift']());}};_0x4a70aa(++_0x1a671e);}(_0x37ea,0xc9));var _0xa37e=function(_0x1ad392,_0x28c4c6){_0x1ad392=_0x1ad392-0x0;var _0x198517=_0x37ea[_0x1ad392];return _0x198517;};'use strict';var Sequelize=require('sequelize');module[_0xa37e('0x0')]={'name':{'type':Sequelize[_0xa37e('0x1')],'allowNull':![]},'level':{'type':Sequelize['ENUM'](_0xa37e('0x2'),_0xa37e('0x3'),_0xa37e('0x4')),'allowNull':![],'defaultValue':_0xa37e('0x2')},'description':{'type':Sequelize[_0xa37e('0x1')]}};
\ No newline at end of file
index b7a0c4d..3e65a94 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x673f=['nolimit','sort','where','filters','pick','filter','options','include','rows','catch','show','params','intersection','length','includeAll','merge','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','eml-format','rimraf','zip-dir','request-promise','bluebird','util','path','sox','to-csv','ejs','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','destroy','get','Dispositions','then','error','stack','name','send','index','map','Disposition','rawAttributes','type','key','model','query','keys','attributes','fields','hasOwnProperty'];(function(_0x2d86ca,_0x3e0323){var _0xae8b2a=function(_0xc28dba){while(--_0xc28dba){_0x2d86ca['push'](_0x2d86ca['shift']());}};_0xae8b2a(++_0x3e0323);}(_0x673f,0x1b8));var _0xf673=function(_0x2d6119,_0x125fce){_0x2d6119=_0x2d6119-0x0;var _0x1325cd=_0x673f[_0x2d6119];return _0x1325cd;};'use strict';var emlformat=require(_0xf673('0x0'));var rimraf=require(_0xf673('0x1'));var zipdir=require(_0xf673('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xf673('0x3'));var moment=require('moment');var BPromise=require(_0xf673('0x4'));var Mustache=require('mustache');var util=require(_0xf673('0x5'));var path=require(_0xf673('0x6'));var sox=require(_0xf673('0x7'));var csv=require(_0xf673('0x8'));var ejs=require(_0xf673('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require(_0xf673('0xa'));var jsforce=require(_0xf673('0xb'));var deskjs=require(_0xf673('0xc'));var toCsv=require(_0xf673('0x8'));var querystring=require(_0xf673('0xd'));var Papa=require(_0xf673('0xe'));var Redis=require(_0xf673('0xf'));var authService=require(_0xf673('0x10'));var qs=require(_0xf673('0x11'));var as=require(_0xf673('0x12'));var hardwareService=require(_0xf673('0x13'));var logger=require('../../config/logger')(_0xf673('0x14'));var utils=require(_0xf673('0x15'));var config=require(_0xf673('0x16'));var licenseUtil=require(_0xf673('0x17'));var db=require(_0xf673('0x18'))['db'];function respondWithStatusCode(_0x3f442f,_0x31d68f){_0x31d68f=_0x31d68f||0xcc;return function(_0xc3eb50){if(_0xc3eb50){return _0x3f442f[_0xf673('0x19')](_0x31d68f);}return _0x3f442f[_0xf673('0x1a')](_0x31d68f)[_0xf673('0x1b')]();};}function respondWithResult(_0x25c0f,_0x2104ce){_0x2104ce=_0x2104ce||0xc8;return function(_0xe4f075){if(_0xe4f075){return _0x25c0f[_0xf673('0x1a')](_0x2104ce)[_0xf673('0x1c')](_0xe4f075);}};}function respondWithFilteredResult(_0x2761c0,_0x2fc20e){return function(_0x35ef69){if(_0x35ef69){var _0x21eda3=typeof _0x2fc20e[_0xf673('0x1d')]===_0xf673('0x1e')&&typeof _0x2fc20e[_0xf673('0x1f')]===_0xf673('0x1e');var _0x1fc4b6=_0x35ef69[_0xf673('0x20')];var _0x53cc6c=_0x21eda3?0x0:_0x2fc20e['offset'];var _0x4d19ed=_0x21eda3?_0x35ef69[_0xf673('0x20')]:_0x2fc20e[_0xf673('0x1d')]+_0x2fc20e[_0xf673('0x1f')];var _0x2c3199;if(_0x4d19ed>=_0x1fc4b6){_0x4d19ed=_0x1fc4b6;_0x2c3199=0xc8;}else{_0x2c3199=0xce;}_0x2761c0[_0xf673('0x1a')](_0x2c3199);return _0x2761c0[_0xf673('0x21')](_0xf673('0x22'),_0x53cc6c+'-'+_0x4d19ed+'/'+_0x1fc4b6)['json'](_0x35ef69);}return null;};}function patchUpdates(_0x2fb992){return function(_0x37126b){try{jsonpatch[_0xf673('0x23')](_0x37126b,_0x2fb992,!![]);}catch(_0x21f377){return BPromise[_0xf673('0x24')](_0x21f377);}return _0x37126b[_0xf673('0x25')]();};}function saveUpdates(_0x4f1de7,_0x3fe0ea){return function(_0x35a41c){if(_0x35a41c){return _0x35a41c['update'](_0x4f1de7)['then'](function(_0x16bb19){return _0x16bb19;});}return null;};}function removeEntity(_0x5d8966,_0x139ed6){return function(_0x167444){if(_0x167444){return _0x167444[_0xf673('0x26')]()['then'](function(){var _0x551a02=_0x167444[_0xf673('0x27')]({'plain':!![]});var _0x30bbbc=_0xf673('0x28');return db['UserProfileResource'][_0xf673('0x26')]({'where':{'type':_0x30bbbc,'resourceId':_0x551a02['id']}})[_0xf673('0x29')](function(){return _0x167444;});})[_0xf673('0x29')](function(){_0x5d8966[_0xf673('0x1a')](0xcc)[_0xf673('0x1b')]();});}};}function handleEntityNotFound(_0x286384,_0x223577){return function(_0x2c6757){if(!_0x2c6757){_0x286384['sendStatus'](0x194);}return _0x2c6757;};}function handleError(_0x125db7,_0x5909d1){_0x5909d1=_0x5909d1||0x1f4;return function(_0x42f9d3){logger[_0xf673('0x2a')](_0x42f9d3[_0xf673('0x2b')]);if(_0x42f9d3[_0xf673('0x2c')]){delete _0x42f9d3['name'];}_0x125db7['status'](_0x5909d1)[_0xf673('0x2d')](_0x42f9d3);};}exports[_0xf673('0x2e')]=function(_0x11673c,_0x5c2cc7){var _0x23ac3b={},_0x159b55={},_0x1abdfb={'count':0x0,'rows':[]};var _0x29ff43=_[_0xf673('0x2f')](db[_0xf673('0x30')][_0xf673('0x31')],function(_0x21425b){return{'name':_0x21425b['fieldName'],'type':_0x21425b[_0xf673('0x32')][_0xf673('0x33')]};});_0x159b55[_0xf673('0x34')]=_[_0xf673('0x2f')](_0x29ff43,_0xf673('0x2c'));_0x159b55[_0xf673('0x35')]=_[_0xf673('0x36')](_0x11673c['query']);_0x159b55['filters']=_['intersection'](_0x159b55[_0xf673('0x34')],_0x159b55[_0xf673('0x35')]);_0x23ac3b[_0xf673('0x37')]=_['intersection'](_0x159b55[_0xf673('0x34')],qs['fields'](_0x11673c['query'][_0xf673('0x38')]));_0x23ac3b[_0xf673('0x37')]=_0x23ac3b[_0xf673('0x37')]['length']?_0x23ac3b['attributes']:_0x159b55[_0xf673('0x34')];if(!_0x11673c[_0xf673('0x35')][_0xf673('0x39')](_0xf673('0x3a'))){_0x23ac3b['limit']=qs[_0xf673('0x1f')](_0x11673c['query'][_0xf673('0x1f')]);_0x23ac3b[_0xf673('0x1d')]=qs[_0xf673('0x1d')](_0x11673c[_0xf673('0x35')][_0xf673('0x1d')]);}_0x23ac3b['order']=qs[_0xf673('0x3b')](_0x11673c[_0xf673('0x35')][_0xf673('0x3b')]);_0x23ac3b[_0xf673('0x3c')]=qs[_0xf673('0x3d')](_[_0xf673('0x3e')](_0x11673c['query'],_0x159b55[_0xf673('0x3d')]),_0x29ff43);if(_0x11673c[_0xf673('0x35')][_0xf673('0x3f')]){_0x23ac3b['where']=_['merge'](_0x23ac3b[_0xf673('0x3c')],{'$or':_[_0xf673('0x2f')](_0x29ff43,function(_0x976f53){if(_0x976f53[_0xf673('0x32')]!=='VIRTUAL'){var _0x18c9ba={};_0x18c9ba[_0x976f53['name']]={'$like':'%'+_0x11673c[_0xf673('0x35')][_0xf673('0x3f')]+'%'};return _0x18c9ba;}})});}_0x23ac3b=_['merge']({},_0x23ac3b,_0x11673c[_0xf673('0x40')]);var _0x6b3d82={'where':_0x23ac3b[_0xf673('0x3c')]};return db['Disposition'][_0xf673('0x20')](_0x6b3d82)['then'](function(_0x496300){_0x1abdfb[_0xf673('0x20')]=_0x496300;if(_0x11673c[_0xf673('0x35')]['includeAll']){_0x23ac3b[_0xf673('0x41')]=[{'all':!![]}];}return db['Disposition']['findAll'](_0x23ac3b);})[_0xf673('0x29')](function(_0x125b89){_0x1abdfb[_0xf673('0x42')]=_0x125b89;return _0x1abdfb;})['then'](respondWithFilteredResult(_0x5c2cc7,_0x23ac3b))[_0xf673('0x43')](handleError(_0x5c2cc7,null));};exports[_0xf673('0x44')]=function(_0x7580dd,_0xf721b3){var _0x1df809={'raw':!![],'where':{'id':_0x7580dd[_0xf673('0x45')]['id']}},_0x5cf846={};_0x5cf846[_0xf673('0x34')]=_['keys'](db[_0xf673('0x30')]['rawAttributes']);_0x5cf846['query']=_[_0xf673('0x36')](_0x7580dd[_0xf673('0x35')]);_0x5cf846[_0xf673('0x3d')]=_[_0xf673('0x46')](_0x5cf846[_0xf673('0x34')],_0x5cf846[_0xf673('0x35')]);_0x1df809[_0xf673('0x37')]=_['intersection'](_0x5cf846[_0xf673('0x34')],qs['fields'](_0x7580dd[_0xf673('0x35')][_0xf673('0x38')]));_0x1df809[_0xf673('0x37')]=_0x1df809['attributes'][_0xf673('0x47')]?_0x1df809[_0xf673('0x37')]:_0x5cf846[_0xf673('0x34')];if(_0x7580dd[_0xf673('0x35')][_0xf673('0x48')]){_0x1df809[_0xf673('0x41')]=[{'all':!![]}];}_0x1df809=_[_0xf673('0x49')]({},_0x1df809,_0x7580dd[_0xf673('0x40')]);return db[_0xf673('0x30')][_0xf673('0x4a')](_0x1df809)[_0xf673('0x29')](handleEntityNotFound(_0xf721b3,null))[_0xf673('0x29')](respondWithResult(_0xf721b3,null))[_0xf673('0x43')](handleError(_0xf721b3,null));};exports[_0xf673('0x4b')]=function(_0x51910a,_0x316ba2){return db['Disposition'][_0xf673('0x4b')](_0x51910a[_0xf673('0x4c')],{})[_0xf673('0x29')](function(_0x2ec9b8){var _0x4745bb=_0x51910a[_0xf673('0x4d')][_0xf673('0x27')]({'plain':!![]});if(!_0x4745bb)throw new Error(_0xf673('0x4e'));if(_0x4745bb['role']===_0xf673('0x4d')){var _0x4c9150=_0x2ec9b8[_0xf673('0x27')]({'plain':!![]});var _0x4648b6=_0xf673('0x28');return db['UserProfileSection'][_0xf673('0x4a')]({'where':{'name':_0x4648b6,'userProfileId':_0x4745bb[_0xf673('0x4f')]},'raw':!![]})[_0xf673('0x29')](function(_0x56d14c){if(_0x56d14c&&_0x56d14c[_0xf673('0x50')]===0x0){return db[_0xf673('0x51')][_0xf673('0x4b')]({'name':_0x4c9150[_0xf673('0x2c')],'resourceId':_0x4c9150['id'],'type':_0x56d14c[_0xf673('0x2c')],'sectionId':_0x56d14c['id']},{})[_0xf673('0x29')](function(){return _0x2ec9b8;});}else{return _0x2ec9b8;}})[_0xf673('0x43')](function(_0x24c9fe){logger[_0xf673('0x2a')](_0xf673('0x52'),_0x24c9fe);throw _0x24c9fe;});}return _0x2ec9b8;})[_0xf673('0x29')](respondWithResult(_0x316ba2,0xc9))['catch'](handleError(_0x316ba2,null));};exports['update']=function(_0x5c13c3,_0xee3703){if(_0x5c13c3[_0xf673('0x4c')]['id']){delete _0x5c13c3[_0xf673('0x4c')]['id'];}return db[_0xf673('0x30')][_0xf673('0x4a')]({'where':{'id':_0x5c13c3[_0xf673('0x45')]['id']}})['then'](handleEntityNotFound(_0xee3703,null))[_0xf673('0x29')](saveUpdates(_0x5c13c3[_0xf673('0x4c')],null))[_0xf673('0x29')](respondWithResult(_0xee3703,null))[_0xf673('0x43')](handleError(_0xee3703,null));};exports[_0xf673('0x26')]=function(_0x334e5b,_0x17cd51){return db[_0xf673('0x30')][_0xf673('0x4a')]({'where':{'id':_0x334e5b[_0xf673('0x45')]['id']}})[_0xf673('0x29')](handleEntityNotFound(_0x17cd51,null))[_0xf673('0x29')](removeEntity(_0x17cd51,null))[_0xf673('0x43')](handleError(_0x17cd51,null));};
\ No newline at end of file
+var _0x7952=['../../mysqldb','sendStatus','status','offset','undefined','limit','count','Content-Range','json','apply','reject','save','update','then','destroy','get','Dispositions','UserProfileResource','end','error','stack','name','send','map','rawAttributes','fieldName','key','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','merge','type','VIRTUAL','options','Disposition','includeAll','include','findAll','catch','show','params','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','squel','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util'];(function(_0x7ba4c8,_0x173d7a){var _0x54c9bd=function(_0x3f3565){while(--_0x3f3565){_0x7ba4c8['push'](_0x7ba4c8['shift']());}};_0x54c9bd(++_0x173d7a);}(_0x7952,0xec));var _0x2795=function(_0x55e1d1,_0x3c9376){_0x55e1d1=_0x55e1d1-0x0;var _0x1165db=_0x7952[_0x55e1d1];return _0x1165db;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x2795('0x0'));var jsonpatch=require(_0x2795('0x1'));var rp=require(_0x2795('0x2'));var moment=require(_0x2795('0x3'));var BPromise=require(_0x2795('0x4'));var Mustache=require(_0x2795('0x5'));var util=require(_0x2795('0x6'));var path=require(_0x2795('0x7'));var sox=require(_0x2795('0x8'));var csv=require(_0x2795('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x2795('0xa'));var _=require('lodash');var squel=require(_0x2795('0xb'));var crypto=require(_0x2795('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x2795('0xd'));var toCsv=require(_0x2795('0x9'));var querystring=require('querystring');var Papa=require(_0x2795('0xe'));var Redis=require(_0x2795('0xf'));var authService=require(_0x2795('0x10'));var qs=require(_0x2795('0x11'));var as=require(_0x2795('0x12'));var hardwareService=require(_0x2795('0x13'));var logger=require(_0x2795('0x14'))(_0x2795('0x15'));var utils=require(_0x2795('0x16'));var config=require(_0x2795('0x17'));var licenseUtil=require(_0x2795('0x18'));var db=require(_0x2795('0x19'))['db'];function respondWithStatusCode(_0x5cee6b,_0x27c660){_0x27c660=_0x27c660||0xcc;return function(_0x2dd0df){if(_0x2dd0df){return _0x5cee6b[_0x2795('0x1a')](_0x27c660);}return _0x5cee6b['status'](_0x27c660)['end']();};}function respondWithResult(_0x410c09,_0x33cadc){_0x33cadc=_0x33cadc||0xc8;return function(_0x6714db){if(_0x6714db){return _0x410c09[_0x2795('0x1b')](_0x33cadc)['json'](_0x6714db);}};}function respondWithFilteredResult(_0x220a6a,_0x2cf469){return function(_0x873c18){if(_0x873c18){var _0x176492=typeof _0x2cf469[_0x2795('0x1c')]===_0x2795('0x1d')&&typeof _0x2cf469[_0x2795('0x1e')]===_0x2795('0x1d');var _0x2dc652=_0x873c18[_0x2795('0x1f')];var _0x411710=_0x176492?0x0:_0x2cf469['offset'];var _0x82c2d6=_0x176492?_0x873c18[_0x2795('0x1f')]:_0x2cf469['offset']+_0x2cf469['limit'];var _0x8fd64e;if(_0x82c2d6>=_0x2dc652){_0x82c2d6=_0x2dc652;_0x8fd64e=0xc8;}else{_0x8fd64e=0xce;}_0x220a6a[_0x2795('0x1b')](_0x8fd64e);return _0x220a6a['set'](_0x2795('0x20'),_0x411710+'-'+_0x82c2d6+'/'+_0x2dc652)[_0x2795('0x21')](_0x873c18);}return null;};}function patchUpdates(_0x28bca1){return function(_0xcc9ef1){try{jsonpatch[_0x2795('0x22')](_0xcc9ef1,_0x28bca1,!![]);}catch(_0x59d44d){return BPromise[_0x2795('0x23')](_0x59d44d);}return _0xcc9ef1[_0x2795('0x24')]();};}function saveUpdates(_0x55988b,_0x47fc5c){return function(_0x42b40f){if(_0x42b40f){return _0x42b40f[_0x2795('0x25')](_0x55988b)[_0x2795('0x26')](function(_0x354161){return _0x354161;});}return null;};}function removeEntity(_0x59ed7e,_0x6bf071){return function(_0x58e774){if(_0x58e774){return _0x58e774[_0x2795('0x27')]()['then'](function(){var _0xe923fb=_0x58e774[_0x2795('0x28')]({'plain':!![]});var _0x5785e4=_0x2795('0x29');return db[_0x2795('0x2a')][_0x2795('0x27')]({'where':{'type':_0x5785e4,'resourceId':_0xe923fb['id']}})[_0x2795('0x26')](function(){return _0x58e774;});})[_0x2795('0x26')](function(){_0x59ed7e[_0x2795('0x1b')](0xcc)[_0x2795('0x2b')]();});}};}function handleEntityNotFound(_0x2e0720,_0x19b5d9){return function(_0x3ac1f2){if(!_0x3ac1f2){_0x2e0720['sendStatus'](0x194);}return _0x3ac1f2;};}function handleError(_0x5d75de,_0x19ef0a){_0x19ef0a=_0x19ef0a||0x1f4;return function(_0x18d416){logger[_0x2795('0x2c')](_0x18d416[_0x2795('0x2d')]);if(_0x18d416[_0x2795('0x2e')]){delete _0x18d416[_0x2795('0x2e')];}_0x5d75de[_0x2795('0x1b')](_0x19ef0a)[_0x2795('0x2f')](_0x18d416);};}exports['index']=function(_0x469cdf,_0x1a08dd){var _0x3c010d={},_0x1ec76f={},_0xa5ba1={'count':0x0,'rows':[]};var _0xc398b4=_[_0x2795('0x30')](db['Disposition'][_0x2795('0x31')],function(_0x261ce6){return{'name':_0x261ce6[_0x2795('0x32')],'type':_0x261ce6['type'][_0x2795('0x33')]};});_0x1ec76f[_0x2795('0x34')]=_['map'](_0xc398b4,_0x2795('0x2e'));_0x1ec76f[_0x2795('0x35')]=_[_0x2795('0x36')](_0x469cdf[_0x2795('0x35')]);_0x1ec76f['filters']=_[_0x2795('0x37')](_0x1ec76f[_0x2795('0x34')],_0x1ec76f[_0x2795('0x35')]);_0x3c010d[_0x2795('0x38')]=_['intersection'](_0x1ec76f['model'],qs[_0x2795('0x39')](_0x469cdf[_0x2795('0x35')][_0x2795('0x39')]));_0x3c010d[_0x2795('0x38')]=_0x3c010d[_0x2795('0x38')]['length']?_0x3c010d['attributes']:_0x1ec76f['model'];if(!_0x469cdf['query'][_0x2795('0x3a')](_0x2795('0x3b'))){_0x3c010d['limit']=qs[_0x2795('0x1e')](_0x469cdf['query']['limit']);_0x3c010d['offset']=qs[_0x2795('0x1c')](_0x469cdf['query'][_0x2795('0x1c')]);}_0x3c010d[_0x2795('0x3c')]=qs[_0x2795('0x3d')](_0x469cdf['query'][_0x2795('0x3d')]);_0x3c010d['where']=qs[_0x2795('0x3e')](_[_0x2795('0x3f')](_0x469cdf[_0x2795('0x35')],_0x1ec76f[_0x2795('0x3e')]),_0xc398b4);if(_0x469cdf['query'][_0x2795('0x40')]){_0x3c010d[_0x2795('0x41')]=_[_0x2795('0x42')](_0x3c010d[_0x2795('0x41')],{'$or':_[_0x2795('0x30')](_0xc398b4,function(_0x130b1d){if(_0x130b1d[_0x2795('0x43')]!==_0x2795('0x44')){var _0xcc6a7a={};_0xcc6a7a[_0x130b1d['name']]={'$like':'%'+_0x469cdf['query']['filter']+'%'};return _0xcc6a7a;}})});}_0x3c010d=_[_0x2795('0x42')]({},_0x3c010d,_0x469cdf[_0x2795('0x45')]);var _0x1d3be5={'where':_0x3c010d[_0x2795('0x41')]};return db[_0x2795('0x46')]['count'](_0x1d3be5)[_0x2795('0x26')](function(_0x4c8e9f){_0xa5ba1[_0x2795('0x1f')]=_0x4c8e9f;if(_0x469cdf[_0x2795('0x35')][_0x2795('0x47')]){_0x3c010d[_0x2795('0x48')]=[{'all':!![]}];}return db[_0x2795('0x46')][_0x2795('0x49')](_0x3c010d);})[_0x2795('0x26')](function(_0xc1662e){_0xa5ba1['rows']=_0xc1662e;return _0xa5ba1;})['then'](respondWithFilteredResult(_0x1a08dd,_0x3c010d))[_0x2795('0x4a')](handleError(_0x1a08dd,null));};exports[_0x2795('0x4b')]=function(_0x3a1353,_0x58d939){var _0x2ce4a0={'raw':!![],'where':{'id':_0x3a1353[_0x2795('0x4c')]['id']}},_0x4614c3={};_0x4614c3[_0x2795('0x34')]=_[_0x2795('0x36')](db[_0x2795('0x46')][_0x2795('0x31')]);_0x4614c3[_0x2795('0x35')]=_[_0x2795('0x36')](_0x3a1353['query']);_0x4614c3['filters']=_[_0x2795('0x37')](_0x4614c3[_0x2795('0x34')],_0x4614c3[_0x2795('0x35')]);_0x2ce4a0[_0x2795('0x38')]=_['intersection'](_0x4614c3[_0x2795('0x34')],qs[_0x2795('0x39')](_0x3a1353[_0x2795('0x35')][_0x2795('0x39')]));_0x2ce4a0[_0x2795('0x38')]=_0x2ce4a0[_0x2795('0x38')]['length']?_0x2ce4a0[_0x2795('0x38')]:_0x4614c3[_0x2795('0x34')];if(_0x3a1353[_0x2795('0x35')][_0x2795('0x47')]){_0x2ce4a0[_0x2795('0x48')]=[{'all':!![]}];}_0x2ce4a0=_[_0x2795('0x42')]({},_0x2ce4a0,_0x3a1353[_0x2795('0x45')]);return db[_0x2795('0x46')][_0x2795('0x4d')](_0x2ce4a0)[_0x2795('0x26')](handleEntityNotFound(_0x58d939,null))[_0x2795('0x26')](respondWithResult(_0x58d939,null))[_0x2795('0x4a')](handleError(_0x58d939,null));};exports['create']=function(_0x3e5c6,_0x330e62){return db['Disposition'][_0x2795('0x4e')](_0x3e5c6[_0x2795('0x4f')],{})[_0x2795('0x26')](function(_0x24ae1a){var _0x20cbb4=_0x3e5c6[_0x2795('0x50')][_0x2795('0x28')]({'plain':!![]});if(!_0x20cbb4)throw new Error(_0x2795('0x51'));if(_0x20cbb4[_0x2795('0x52')]===_0x2795('0x50')){var _0x5d76d5=_0x24ae1a[_0x2795('0x28')]({'plain':!![]});var _0x101fac=_0x2795('0x29');return db[_0x2795('0x53')]['find']({'where':{'name':_0x101fac,'userProfileId':_0x20cbb4[_0x2795('0x54')]},'raw':!![]})[_0x2795('0x26')](function(_0x27e9e8){if(_0x27e9e8&&_0x27e9e8[_0x2795('0x55')]===0x0){return db[_0x2795('0x2a')]['create']({'name':_0x5d76d5[_0x2795('0x2e')],'resourceId':_0x5d76d5['id'],'type':_0x27e9e8[_0x2795('0x2e')],'sectionId':_0x27e9e8['id']},{})['then'](function(){return _0x24ae1a;});}else{return _0x24ae1a;}})[_0x2795('0x4a')](function(_0x5b3ee7){logger[_0x2795('0x2c')](_0x2795('0x56'),_0x5b3ee7);throw _0x5b3ee7;});}return _0x24ae1a;})[_0x2795('0x26')](respondWithResult(_0x330e62,0xc9))[_0x2795('0x4a')](handleError(_0x330e62,null));};exports['update']=function(_0x5d81ba,_0x4ff138){if(_0x5d81ba['body']['id']){delete _0x5d81ba['body']['id'];}return db[_0x2795('0x46')][_0x2795('0x4d')]({'where':{'id':_0x5d81ba[_0x2795('0x4c')]['id']}})[_0x2795('0x26')](handleEntityNotFound(_0x4ff138,null))['then'](saveUpdates(_0x5d81ba[_0x2795('0x4f')],null))[_0x2795('0x26')](respondWithResult(_0x4ff138,null))['catch'](handleError(_0x4ff138,null));};exports[_0x2795('0x27')]=function(_0x1a9608,_0x44465c){return db[_0x2795('0x46')][_0x2795('0x4d')]({'where':{'id':_0x1a9608[_0x2795('0x4c')]['id']}})['then'](handleEntityNotFound(_0x44465c,null))[_0x2795('0x26')](removeEntity(_0x44465c,null))['catch'](handleError(_0x44465c,null));};
\ No newline at end of file
index 52d852c..4c2708e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2aad=['moment','bluebird','request-promise','../../config/environment','./disposition.attributes','exports','define','Disposition','tools_dispositions','name_voice','name','ChatWebsiteId','name_mail','MailAccountId','name_sms','SmsAccountId','name_fax','FaxAccountId','name_openchannel','WhatsappAccountId','../../config/logger'];(function(_0x19da68,_0x5e9f6f){var _0x44da35=function(_0x4d61f6){while(--_0x4d61f6){_0x19da68['push'](_0x19da68['shift']());}};_0x44da35(++_0x5e9f6f);}(_0x2aad,0x1e2));var _0xd2aa=function(_0x1567a6,_0x1d84c2){_0x1567a6=_0x1567a6-0x0;var _0x7527c8=_0x2aad[_0x1567a6];return _0x7527c8;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xd2aa('0x0'))('api');var moment=require(_0xd2aa('0x1'));var BPromise=require(_0xd2aa('0x2'));var rp=require(_0xd2aa('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xd2aa('0x4'));var attributes=require(_0xd2aa('0x5'));module[_0xd2aa('0x6')]=function(_0x5b3362,_0x271434){return _0x5b3362[_0xd2aa('0x7')](_0xd2aa('0x8'),attributes,{'tableName':_0xd2aa('0x9'),'paranoid':![],'indexes':[{'unique':!![],'name':_0xd2aa('0xa'),'fields':[_0xd2aa('0xb'),'ListId']},{'unique':!![],'name':'name_chat','fields':[_0xd2aa('0xb'),_0xd2aa('0xc')]},{'unique':!![],'name':_0xd2aa('0xd'),'fields':[_0xd2aa('0xb'),_0xd2aa('0xe')]},{'unique':!![],'name':_0xd2aa('0xf'),'fields':[_0xd2aa('0xb'),_0xd2aa('0x10')]},{'unique':!![],'name':_0xd2aa('0x11'),'fields':[_0xd2aa('0xb'),_0xd2aa('0x12')]},{'unique':!![],'name':_0xd2aa('0x13'),'fields':[_0xd2aa('0xb'),'OpenchannelAccountId']},{'unique':!![],'name':'name_whatsapp','fields':[_0xd2aa('0xb'),_0xd2aa('0x14')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xcdae=['tools_dispositions','name_voice','name','ListId','name_chat','ChatWebsiteId','name_sms','name_fax','FaxAccountId','name_openchannel','OpenchannelAccountId','WhatsappAccountId','lodash','util','moment','request-promise','rimraf','../../config/environment','./disposition.attributes','exports','Disposition'];(function(_0x444c13,_0x42a073){var _0x4d770a=function(_0xca1844){while(--_0xca1844){_0x444c13['push'](_0x444c13['shift']());}};_0x4d770a(++_0x42a073);}(_0xcdae,0x108));var _0xecda=function(_0x4b9d22,_0x47b52c){_0x4b9d22=_0x4b9d22-0x0;var _0x19582a=_0xcdae[_0x4b9d22];return _0x19582a;};'use strict';var _=require(_0xecda('0x0'));var util=require(_0xecda('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xecda('0x2'));var BPromise=require('bluebird');var rp=require(_0xecda('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xecda('0x4'));var config=require(_0xecda('0x5'));var attributes=require(_0xecda('0x6'));module[_0xecda('0x7')]=function(_0x528c21,_0x24dc9c){return _0x528c21['define'](_0xecda('0x8'),attributes,{'tableName':_0xecda('0x9'),'paranoid':![],'indexes':[{'unique':!![],'name':_0xecda('0xa'),'fields':[_0xecda('0xb'),_0xecda('0xc')]},{'unique':!![],'name':_0xecda('0xd'),'fields':[_0xecda('0xb'),_0xecda('0xe')]},{'unique':!![],'name':'name_mail','fields':['name','MailAccountId']},{'unique':!![],'name':_0xecda('0xf'),'fields':[_0xecda('0xb'),'SmsAccountId']},{'unique':!![],'name':_0xecda('0x10'),'fields':['name',_0xecda('0x11')]},{'unique':!![],'name':_0xecda('0x12'),'fields':[_0xecda('0xb'),_0xecda('0x13')]},{'unique':!![],'name':'name_whatsapp','fields':[_0xecda('0xb'),_0xecda('0x14')]}],'timestamps':!![]});};
\ No newline at end of file
index 6529a57..3218ec1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['http','info','Disposition,\x20%s,\x20%s','request\x20sent','debug','Disposition,\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(_0x126417,_0x344291){var _0x3ea35c=function(_0x1a8b12){while(--_0x1a8b12){_0x126417['push'](_0x126417['shift']());}};_0x3ea35c(++_0x344291);}(_0xa9e0,0x123));var _0x0a9e=function(_0xea8947,_0x1b573d){_0xea8947=_0xea8947-0x0;var _0x2455e9=_0xa9e0[_0xea8947];return _0x2455e9;};'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','Disposition,\x20%s,\x20%s','request\x20sent','debug','Disposition,\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(_0x59ddb7,_0x3f443e){var _0x34d727=function(_0x491b44){while(--_0x491b44){_0x59ddb7['push'](_0x59ddb7['shift']());}};_0x34d727(++_0x3f443e);}(_0xa9e0,0x123));var _0x0a9e=function(_0x373dee,_0x1a8c45){_0x373dee=_0x373dee-0x0;var _0x46798f=_0xa9e0[_0x373dee];return _0x46798f;};'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
index 4713fe2..ab7bed9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x99d5=['index','/:id','show','post','put','update','delete','multer','util','path','connect-timeout','../../components/auth/service','../../components/interaction/service','./disposition.controller','get','isAuthenticated'];(function(_0x2ea952,_0xb91b9e){var _0x2a5456=function(_0x188f41){while(--_0x188f41){_0x2ea952['push'](_0x2ea952['shift']());}};_0x2a5456(++_0xb91b9e);}(_0x99d5,0x77));var _0x599d=function(_0x2313ef,_0x55f489){_0x2313ef=_0x2313ef-0x0;var _0x4f4159=_0x99d5[_0x2313ef];return _0x4f4159;};'use strict';var multer=require(_0x599d('0x0'));var util=require(_0x599d('0x1'));var path=require(_0x599d('0x2'));var timeout=require(_0x599d('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x599d('0x4'));var interaction=require(_0x599d('0x5'));var config=require('../../config/environment');var controller=require(_0x599d('0x6'));router[_0x599d('0x7')]('/',auth[_0x599d('0x8')](),controller[_0x599d('0x9')]);router['get'](_0x599d('0xa'),auth[_0x599d('0x8')](),controller[_0x599d('0xb')]);router[_0x599d('0xc')]('/',auth[_0x599d('0x8')](),controller['create']);router[_0x599d('0xd')](_0x599d('0xa'),auth[_0x599d('0x8')](),controller[_0x599d('0xe')]);router[_0x599d('0xf')](_0x599d('0xa'),auth[_0x599d('0x8')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x307e=['exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy'];(function(_0x2cff3c,_0x6415f9){var _0x406371=function(_0x8cc3be){while(--_0x8cc3be){_0x2cff3c['push'](_0x2cff3c['shift']());}};_0x406371(++_0x6415f9);}(_0x307e,0xc9));var _0xe307=function(_0x1d6147,_0x555bbb){_0x1d6147=_0x1d6147-0x0;var _0x4501bf=_0x307e[_0x1d6147];return _0x4501bf;};'use strict';var multer=require(_0xe307('0x0'));var util=require(_0xe307('0x1'));var path=require(_0xe307('0x2'));var timeout=require(_0xe307('0x3'));var express=require(_0xe307('0x4'));var router=express['Router']();var fs_extra=require(_0xe307('0x5'));var auth=require(_0xe307('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xe307('0x7'));var controller=require('./disposition.controller');router[_0xe307('0x8')]('/',auth[_0xe307('0x9')](),controller[_0xe307('0xa')]);router['get'](_0xe307('0xb'),auth[_0xe307('0x9')](),controller[_0xe307('0xc')]);router[_0xe307('0xd')]('/',auth[_0xe307('0x9')](),controller[_0xe307('0xe')]);router[_0xe307('0xf')](_0xe307('0xb'),auth[_0xe307('0x9')](),controller[_0xe307('0x10')]);router[_0xe307('0x11')](_0xe307('0xb'),auth[_0xe307('0x9')](),controller[_0xe307('0x12')]);module[_0xe307('0x13')]=router;
\ No newline at end of file
index 1008e07..2fdbd2c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc949=['mandatoryDisposition','sequelize','STRING','ENUM','yes','xCALLY\x20Motion\x20Fax','localstationid','2400','4800','9600','12000','14400','7200','v17,v27,v29','INTEGER','SIP','IAX','DADHI','KHOMP','TEXT','BOOLEAN','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId'];(function(_0x541a67,_0x50728d){var _0x45da2a=function(_0x158929){while(--_0x158929){_0x541a67['push'](_0x541a67['shift']());}};_0x45da2a(++_0x50728d);}(_0xc949,0x181));var _0x9c94=function(_0xefd519,_0xc62635){_0xefd519=_0xefd519-0x0;var _0x4bb882=_0xc949[_0xefd519];return _0x4bb882;};'use strict';var Sequelize=require(_0x9c94('0x0'));module['exports']={'name':{'type':Sequelize[_0x9c94('0x1')],'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x9c94('0x1')]},'ecm':{'type':Sequelize[_0x9c94('0x2')](_0x9c94('0x3'),'no'),'defaultValue':'yes'},'headerinfo':{'type':Sequelize[_0x9c94('0x1')],'defaultValue':_0x9c94('0x4')},'localstationid':{'type':Sequelize['STRING'],'unique':_0x9c94('0x5')},'minrate':{'type':Sequelize[_0x9c94('0x2')](_0x9c94('0x6'),_0x9c94('0x7'),'7200',_0x9c94('0x8'),_0x9c94('0x9'),_0x9c94('0xa')),'defaultValue':_0x9c94('0x7')},'maxrate':{'type':Sequelize[_0x9c94('0x2')](_0x9c94('0x6'),_0x9c94('0x7'),_0x9c94('0xb'),_0x9c94('0x8'),_0x9c94('0x9'),'14400'),'defaultValue':_0x9c94('0xa')},'modem':{'type':Sequelize[_0x9c94('0x1')],'defaultValue':_0x9c94('0xc')},'gateway':{'type':Sequelize[_0x9c94('0x1')],'defaultValue':'no','validate':{'is':/^(?:yes|no|[0-9]+)$/}},'faxdetect':{'type':Sequelize[_0x9c94('0x1')],'defaultValue':'no','validate':{'is':/^(?:yes|no|t38|cng|[0-9]+)$/}},'t38timeout':{'type':Sequelize[_0x9c94('0xd')],'defaultValue':0x1388,'validate':{'min':0x3e8}},'tech':{'type':Sequelize[_0x9c94('0x2')](_0x9c94('0xe'),_0x9c94('0xf'),_0x9c94('0x10'),_0x9c94('0x11')),'defaultValue':_0x9c94('0xe')},'key':{'type':Sequelize[_0x9c94('0x1')],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x9c94('0x12')],'defaultValue':function(){return'Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}';}},'notificationSound':{'type':Sequelize[_0x9c94('0x13')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x9c94('0xd')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x9c94('0xd')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x9c94('0xd')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x9c94('0xd')],'allowNull':!![],'defaultValue':null,'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0x9c94('0x13')],'defaultValue':![],'comment':_0x9c94('0x14'),'set':function(_0x4d9266){if(!_0x4d9266)this[_0x9c94('0x15')](_0x9c94('0x16'),null);this[_0x9c94('0x15')](_0x9c94('0x17'),_0x4d9266);}}};
\ No newline at end of file
+var _0x84e7=['14400','4800','v17,v27,v29','INTEGER','SIP','IAX','DADHI','TEXT','Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}','BOOLEAN','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','exports','STRING','ENUM','yes','xCALLY\x20Motion\x20Fax','localstationid','2400','7200','12000'];(function(_0x1bec41,_0x54c220){var _0x5306b0=function(_0x18b3e9){while(--_0x18b3e9){_0x1bec41['push'](_0x1bec41['shift']());}};_0x5306b0(++_0x54c220);}(_0x84e7,0x122));var _0x784e=function(_0x5a2b31,_0x1bacd9){_0x5a2b31=_0x5a2b31-0x0;var _0x3da8fc=_0x84e7[_0x5a2b31];return _0x3da8fc;};'use strict';var Sequelize=require('sequelize');module[_0x784e('0x0')]={'name':{'type':Sequelize[_0x784e('0x1')],'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize['STRING']},'ecm':{'type':Sequelize[_0x784e('0x2')](_0x784e('0x3'),'no'),'defaultValue':'yes'},'headerinfo':{'type':Sequelize[_0x784e('0x1')],'defaultValue':_0x784e('0x4')},'localstationid':{'type':Sequelize[_0x784e('0x1')],'unique':_0x784e('0x5')},'minrate':{'type':Sequelize[_0x784e('0x2')](_0x784e('0x6'),'4800',_0x784e('0x7'),'9600',_0x784e('0x8'),_0x784e('0x9')),'defaultValue':'4800'},'maxrate':{'type':Sequelize[_0x784e('0x2')](_0x784e('0x6'),_0x784e('0xa'),_0x784e('0x7'),'9600','12000',_0x784e('0x9')),'defaultValue':_0x784e('0x9')},'modem':{'type':Sequelize[_0x784e('0x1')],'defaultValue':_0x784e('0xb')},'gateway':{'type':Sequelize['STRING'],'defaultValue':'no','validate':{'is':/^(?:yes|no|[0-9]+)$/}},'faxdetect':{'type':Sequelize[_0x784e('0x1')],'defaultValue':'no','validate':{'is':/^(?:yes|no|t38|cng|[0-9]+)$/}},'t38timeout':{'type':Sequelize[_0x784e('0xc')],'defaultValue':0x1388,'validate':{'min':0x3e8}},'tech':{'type':Sequelize[_0x784e('0x2')](_0x784e('0xd'),_0x784e('0xe'),_0x784e('0xf'),'KHOMP'),'defaultValue':_0x784e('0xd')},'key':{'type':Sequelize['STRING'],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x784e('0x10')],'defaultValue':function(){return _0x784e('0x11');}},'notificationSound':{'type':Sequelize[_0x784e('0x12')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x784e('0x12')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x784e('0xc')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x784e('0xc')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x784e('0x12')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x784e('0xc')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x784e('0x12')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'allowNull':!![],'defaultValue':null,'comment':_0x784e('0x13')},'mandatoryDisposition':{'type':Sequelize[_0x784e('0x12')],'defaultValue':![],'comment':_0x784e('0x14'),'set':function(_0x25281f){if(!_0x25281f)this[_0x784e('0x15')](_0x784e('0x16'),null);this[_0x784e('0x15')]('mandatoryDisposition',_0x25281f);}}};
\ No newline at end of file
index c0cc26c..3f488aa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb267=['CannedAnswer','removeAnswers','FaxInteraction','addInteraction','omit','getInteractions','CmContact','Contact','User','Owner','fullname','Tag','Tags','color','tag','addApplications','sequelize','transaction','Transaction','ISOLATION_LEVELS','READ_COMMITTED','findOne','FaxApplication','bulkCreate','findAndCountAll','send','getApplications','context','exten','localstationid','system','Fax\x20Extension','priority','appdata','push','Answer','Set','ecm','gateway','faxdetect','maxrate','minrate','modem','t38timeout','FAXOPT(','Wait','/var/opt/motion2/server/files/attachments/fax-${CALLERID(num)}-${CUT(UNIQUEID,.,1)}-${CUT(UNIQUEID,.,2)}-${STRFTIME(,,%C%y%m%d%H%M%S)}-rx.tif,d','ReceiveFax','addAccountApplications','VoiceExtension','updateAccountApplications','key','createdAt','TrunkId','ListId','findById','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','FaxMessage','CmList','updatedAt','DESC','attachments','join','root','server/files/attachments','basename','CheckAfterSend','isNil','List','Contacts','List\x20not\x20found','filename','Contact\x20not\x20found','spread','out','ContactId','dataValues','SendFax','SendFaxRpc,\x20%s','addAgents','userFaxAccount:save','removeAgents','isArray','userFaxAccount:remove','emit','getAgents','eml-format','rimraf','zip-dir','request-promise','moment','util','path','sox','ejs','fs-extra','lodash','squel','crypto','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','redis','defaults','socket.io-emitter','./faxAccount.socket','register','client','http','request','info','FaxAccount,\x20%s,\x20%s','request\x20sent','FaxAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','reject','update','destroy','then','FaxAccounts','UserProfileResource','stack','name','index','Pause','map','rawAttributes','fieldName','type','keys','query','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','includeAll','rows','show','params','mandatoryDispositionPause','include','FaxAccount','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','Disposition','getDispositions','FaxAccountId','options','findAll','removeDispositions','ids','addAnswer'];(function(_0x1443eb,_0x203408){var _0x2b8810=function(_0x48bc4e){while(--_0x48bc4e){_0x1443eb['push'](_0x1443eb['shift']());}};_0x2b8810(++_0x203408);}(_0xb267,0x1ed));var _0x7b26=function(_0x88cc82,_0x5a38cf){_0x88cc82=_0x88cc82-0x0;var _0xba7a1=_0xb267[_0x88cc82];return _0xba7a1;};'use strict';var emlformat=require(_0x7b26('0x0'));var rimraf=require(_0x7b26('0x1'));var zipdir=require(_0x7b26('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x7b26('0x3'));var moment=require(_0x7b26('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x7b26('0x5'));var path=require(_0x7b26('0x6'));var sox=require(_0x7b26('0x7'));var csv=require('to-csv');var ejs=require(_0x7b26('0x8'));var fs=require('fs');var fs_extra=require(_0x7b26('0x9'));var _=require(_0x7b26('0xa'));var squel=require(_0x7b26('0xb'));var crypto=require(_0x7b26('0xc'));var jsforce=require(_0x7b26('0xd'));var deskjs=require(_0x7b26('0xe'));var toCsv=require(_0x7b26('0xf'));var querystring=require(_0x7b26('0x10'));var Papa=require(_0x7b26('0x11'));var Redis=require(_0x7b26('0x12'));var authService=require(_0x7b26('0x13'));var qs=require(_0x7b26('0x14'));var as=require(_0x7b26('0x15'));var hardwareService=require(_0x7b26('0x16'));var logger=require(_0x7b26('0x17'))(_0x7b26('0x18'));var utils=require(_0x7b26('0x19'));var config=require(_0x7b26('0x1a'));var licenseUtil=require(_0x7b26('0x1b'));var db=require('../../mysqldb')['db'];config[_0x7b26('0x1c')]=_[_0x7b26('0x1d')](config[_0x7b26('0x1c')],{'host':'localhost','port':0x18eb});var socket=require(_0x7b26('0x1e'))(new Redis(config[_0x7b26('0x1c')]));require(_0x7b26('0x1f'))[_0x7b26('0x20')](socket);var jayson=require('jayson/promise');var client=jayson[_0x7b26('0x21')][_0x7b26('0x22')]({'port':0x232c});var client9002=jayson[_0x7b26('0x21')][_0x7b26('0x22')]({'port':0x232a});function respondWithRpcPromise(_0x45054b,_0x42c49b,_0x639625,_0x14edc1){return new BPromise(function(_0x31e4a6,_0x375890){var _0x103482=_0x14edc1||client;return _0x103482[_0x7b26('0x23')](_0x45054b,_0x639625)['then'](function(_0x5b8fe9){logger[_0x7b26('0x24')](_0x7b26('0x25'),_0x42c49b,_0x7b26('0x26'));logger['debug'](_0x7b26('0x27'),_0x42c49b,_0x7b26('0x26'),JSON[_0x7b26('0x28')](_0x5b8fe9));if(_0x5b8fe9[_0x7b26('0x29')]){if(_0x5b8fe9[_0x7b26('0x29')]['code']===0x1f4){logger[_0x7b26('0x29')](_0x7b26('0x25'),_0x42c49b,_0x5b8fe9['error']['message']);return _0x375890(_0x5b8fe9[_0x7b26('0x29')][_0x7b26('0x2a')]);}logger[_0x7b26('0x29')](_0x7b26('0x25'),_0x42c49b,_0x5b8fe9[_0x7b26('0x29')][_0x7b26('0x2a')]);return _0x31e4a6(_0x5b8fe9[_0x7b26('0x29')][_0x7b26('0x2a')]);}else{logger[_0x7b26('0x24')]('FaxAccount,\x20%s,\x20%s',_0x42c49b,_0x7b26('0x26'));_0x31e4a6(_0x5b8fe9[_0x7b26('0x2b')][_0x7b26('0x2a')]);}})[_0x7b26('0x2c')](function(_0xa673ed){logger[_0x7b26('0x29')](_0x7b26('0x25'),_0x42c49b,_0xa673ed);_0x375890(_0xa673ed);});});}function respondWithStatusCode(_0x11dc5e,_0x42b697){_0x42b697=_0x42b697||0xcc;return function(_0x2024a6){if(_0x2024a6){return _0x11dc5e[_0x7b26('0x2d')](_0x42b697);}return _0x11dc5e[_0x7b26('0x2e')](_0x42b697)[_0x7b26('0x2f')]();};}function respondWithResult(_0x1a71e7,_0x2610ef){_0x2610ef=_0x2610ef||0xc8;return function(_0x2aee1b){if(_0x2aee1b){return _0x1a71e7['status'](_0x2610ef)[_0x7b26('0x30')](_0x2aee1b);}};}function respondWithFilteredResult(_0x26ef46,_0x2afcd3){return function(_0x29cd57){if(_0x29cd57){var _0x1c783f=typeof _0x2afcd3['offset']===_0x7b26('0x31')&&typeof _0x2afcd3[_0x7b26('0x32')]===_0x7b26('0x31');var _0x4e2053=_0x29cd57[_0x7b26('0x33')];var _0xcd12bc=_0x1c783f?0x0:_0x2afcd3[_0x7b26('0x34')];var _0x5ed3f4=_0x1c783f?_0x29cd57[_0x7b26('0x33')]:_0x2afcd3[_0x7b26('0x34')]+_0x2afcd3[_0x7b26('0x32')];var _0x9f333b;if(_0x5ed3f4>=_0x4e2053){_0x5ed3f4=_0x4e2053;_0x9f333b=0xc8;}else{_0x9f333b=0xce;}_0x26ef46[_0x7b26('0x2e')](_0x9f333b);return _0x26ef46[_0x7b26('0x35')](_0x7b26('0x36'),_0xcd12bc+'-'+_0x5ed3f4+'/'+_0x4e2053)[_0x7b26('0x30')](_0x29cd57);}return null;};}function patchUpdates(_0x5f16e5){return function(_0xbfc98d){try{jsonpatch[_0x7b26('0x37')](_0xbfc98d,_0x5f16e5,!![]);}catch(_0x7f284c){return BPromise[_0x7b26('0x38')](_0x7f284c);}return _0xbfc98d['save']();};}function saveUpdates(_0x539c2f,_0x19d125){return function(_0x442940){if(_0x442940){return _0x442940[_0x7b26('0x39')](_0x539c2f)['then'](function(_0x3ec609){return _0x3ec609;});}return null;};}function removeEntity(_0x4eb4c4,_0xbfee75){return function(_0x138e4d){if(_0x138e4d){return _0x138e4d[_0x7b26('0x3a')]()[_0x7b26('0x3b')](function(){var _0x13a14f=_0x138e4d['get']({'plain':!![]});var _0x465d52=_0x7b26('0x3c');return db[_0x7b26('0x3d')]['destroy']({'where':{'type':_0x465d52,'resourceId':_0x13a14f['id']}})['then'](function(){return _0x138e4d;});})[_0x7b26('0x3b')](function(){_0x4eb4c4['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0xa8b887,_0x441fd7){return function(_0x19c2c7){if(!_0x19c2c7){_0xa8b887[_0x7b26('0x2d')](0x194);}return _0x19c2c7;};}function handleError(_0x2c83fc,_0x137ab8){_0x137ab8=_0x137ab8||0x1f4;return function(_0x414fef){logger[_0x7b26('0x29')](_0x414fef[_0x7b26('0x3e')]);if(_0x414fef[_0x7b26('0x3f')]){delete _0x414fef[_0x7b26('0x3f')];}_0x2c83fc[_0x7b26('0x2e')](_0x137ab8)['send'](_0x414fef);};}exports[_0x7b26('0x40')]=function(_0x2a666f,_0x65169){var _0x32619e={'include':[{'model':db[_0x7b26('0x41')],'as':'mandatoryDispositionPause'}]},_0x1b0a5b={},_0x4bbb03={'count':0x0,'rows':[]};var _0x5e1091=_[_0x7b26('0x42')](db['FaxAccount'][_0x7b26('0x43')],function(_0x491d35){return{'name':_0x491d35[_0x7b26('0x44')],'type':_0x491d35[_0x7b26('0x45')]['key']};});_0x1b0a5b['model']=_[_0x7b26('0x42')](_0x5e1091,'name');_0x1b0a5b['query']=_[_0x7b26('0x46')](_0x2a666f[_0x7b26('0x47')]);_0x1b0a5b[_0x7b26('0x48')]=_[_0x7b26('0x49')](_0x1b0a5b['model'],_0x1b0a5b[_0x7b26('0x47')]);_0x32619e[_0x7b26('0x4a')]=_[_0x7b26('0x49')](_0x1b0a5b[_0x7b26('0x4b')],qs[_0x7b26('0x4c')](_0x2a666f[_0x7b26('0x47')][_0x7b26('0x4c')]));_0x32619e['attributes']=_0x32619e['attributes'][_0x7b26('0x4d')]?_0x32619e['attributes']:_0x1b0a5b['model'];if(!_0x2a666f['query'][_0x7b26('0x4e')](_0x7b26('0x4f'))){_0x32619e[_0x7b26('0x32')]=qs[_0x7b26('0x32')](_0x2a666f[_0x7b26('0x47')]['limit']);_0x32619e['offset']=qs[_0x7b26('0x34')](_0x2a666f[_0x7b26('0x47')][_0x7b26('0x34')]);}_0x32619e[_0x7b26('0x50')]=qs[_0x7b26('0x51')](_0x2a666f[_0x7b26('0x47')][_0x7b26('0x51')]);_0x32619e[_0x7b26('0x52')]=qs['filters'](_[_0x7b26('0x53')](_0x2a666f['query'],_0x1b0a5b[_0x7b26('0x48')]),_0x5e1091);if(_0x2a666f[_0x7b26('0x47')][_0x7b26('0x54')]){_0x32619e[_0x7b26('0x52')]=_[_0x7b26('0x55')](_0x32619e[_0x7b26('0x52')],{'$or':_[_0x7b26('0x42')](_0x5e1091,function(_0x50e34b){if(_0x50e34b['type']!=='VIRTUAL'){var _0x4b4b99={};_0x4b4b99[_0x50e34b[_0x7b26('0x3f')]]={'$like':'%'+_0x2a666f['query'][_0x7b26('0x54')]+'%'};return _0x4b4b99;}})});}_0x32619e=_['merge']({},_0x32619e,_0x2a666f['options']);var _0x2ec0ce={'where':_0x32619e['where']};return db['FaxAccount'][_0x7b26('0x33')](_0x2ec0ce)[_0x7b26('0x3b')](function(_0xdbab05){_0x4bbb03[_0x7b26('0x33')]=_0xdbab05;if(_0x2a666f[_0x7b26('0x47')][_0x7b26('0x56')]){_0x32619e['include']=[{'all':!![]}];}return db['FaxAccount']['findAll'](_0x32619e);})['then'](function(_0x5829a2){_0x4bbb03[_0x7b26('0x57')]=_0x5829a2;return _0x4bbb03;})[_0x7b26('0x3b')](respondWithFilteredResult(_0x65169,_0x32619e))['catch'](handleError(_0x65169,null));};exports[_0x7b26('0x58')]=function(_0x102ff6,_0xeff2ea){var _0x573b12={'raw':![],'where':{'id':_0x102ff6[_0x7b26('0x59')]['id']},'include':[{'model':db['Pause'],'as':_0x7b26('0x5a')}]},_0xd410d={};_0xd410d[_0x7b26('0x4b')]=_[_0x7b26('0x46')](db['FaxAccount']['rawAttributes']);_0xd410d[_0x7b26('0x47')]=_[_0x7b26('0x46')](_0x102ff6[_0x7b26('0x47')]);_0xd410d[_0x7b26('0x48')]=_[_0x7b26('0x49')](_0xd410d[_0x7b26('0x4b')],_0xd410d[_0x7b26('0x47')]);_0x573b12['attributes']=_[_0x7b26('0x49')](_0xd410d['model'],qs[_0x7b26('0x4c')](_0x102ff6[_0x7b26('0x47')][_0x7b26('0x4c')]));_0x573b12[_0x7b26('0x4a')]=_0x573b12[_0x7b26('0x4a')]['length']?_0x573b12[_0x7b26('0x4a')]:_0xd410d[_0x7b26('0x4b')];if(_0x102ff6[_0x7b26('0x47')][_0x7b26('0x56')]){_0x573b12[_0x7b26('0x5b')]=[{'all':!![]}];}_0x573b12=_[_0x7b26('0x55')]({},_0x573b12,_0x102ff6['options']);return db[_0x7b26('0x5c')][_0x7b26('0x5d')](_0x573b12)[_0x7b26('0x3b')](handleEntityNotFound(_0xeff2ea,null))[_0x7b26('0x3b')](respondWithResult(_0xeff2ea,null))[_0x7b26('0x2c')](handleError(_0xeff2ea,null));};exports[_0x7b26('0x5e')]=function(_0x246c4c,_0x139600){return db[_0x7b26('0x5c')][_0x7b26('0x5e')](_0x246c4c[_0x7b26('0x5f')],{})['then'](function(_0x1866fa){var _0x5f351e=_0x246c4c[_0x7b26('0x60')][_0x7b26('0x61')]({'plain':!![]});if(!_0x5f351e)throw new Error(_0x7b26('0x62'));if(_0x5f351e[_0x7b26('0x63')]===_0x7b26('0x60')){var _0x25ef2e=_0x1866fa[_0x7b26('0x61')]({'plain':!![]});var _0x4f6041=_0x7b26('0x3c');return db[_0x7b26('0x64')][_0x7b26('0x5d')]({'where':{'name':_0x4f6041,'userProfileId':_0x5f351e[_0x7b26('0x65')]},'raw':!![]})[_0x7b26('0x3b')](function(_0x41f22a){if(_0x41f22a&&_0x41f22a['autoAssociation']===0x0){return db[_0x7b26('0x3d')]['create']({'name':_0x25ef2e[_0x7b26('0x3f')],'resourceId':_0x25ef2e['id'],'type':_0x41f22a[_0x7b26('0x3f')],'sectionId':_0x41f22a['id']},{})[_0x7b26('0x3b')](function(){return _0x1866fa;});}else{return _0x1866fa;}})[_0x7b26('0x2c')](function(_0x1c73c8){logger[_0x7b26('0x29')](_0x7b26('0x66'),_0x1c73c8);throw _0x1c73c8;});}return _0x1866fa;})[_0x7b26('0x3b')](respondWithResult(_0x139600,0xc9))['catch'](handleError(_0x139600,null));};exports['update']=function(_0x5f58ad,_0x12efce){if(_0x5f58ad[_0x7b26('0x5f')]['id']){delete _0x5f58ad[_0x7b26('0x5f')]['id'];}return db[_0x7b26('0x5c')][_0x7b26('0x5d')]({'where':{'id':_0x5f58ad[_0x7b26('0x59')]['id']},'include':[{'model':db[_0x7b26('0x41')],'as':_0x7b26('0x5a')}]})[_0x7b26('0x3b')](handleEntityNotFound(_0x12efce,null))[_0x7b26('0x3b')](saveUpdates(_0x5f58ad[_0x7b26('0x5f')],null))[_0x7b26('0x3b')](respondWithResult(_0x12efce,null))[_0x7b26('0x2c')](handleError(_0x12efce,null));};exports['destroy']=function(_0x5bc191,_0x34d159){return db[_0x7b26('0x5c')][_0x7b26('0x5d')]({'where':{'id':_0x5bc191[_0x7b26('0x59')]['id']}})[_0x7b26('0x3b')](handleEntityNotFound(_0x34d159,null))[_0x7b26('0x3b')](removeEntity(_0x34d159,null))['catch'](handleError(_0x34d159,null));};exports[_0x7b26('0x67')]=function(_0x131734,_0x2f0089){return db[_0x7b26('0x5c')][_0x7b26('0x67')]()[_0x7b26('0x3b')](respondWithResult(_0x2f0089,null))[_0x7b26('0x2c')](handleError(_0x2f0089,null));};exports[_0x7b26('0x68')]=function(_0x5b0515,_0x153fe3,_0x5ad331){if(_0x5b0515[_0x7b26('0x5f')]['id']){delete _0x5b0515[_0x7b26('0x5f')]['id'];}return db[_0x7b26('0x5c')][_0x7b26('0x5d')]({'where':{'id':_0x5b0515[_0x7b26('0x59')]['id']}})['then'](handleEntityNotFound(_0x153fe3,null))[_0x7b26('0x3b')](function(_0x5de9c5){if(_0x5de9c5){_0x5b0515[_0x7b26('0x5f')]['FaxAccountId']=_0x5de9c5['id'];return db[_0x7b26('0x69')][_0x7b26('0x5e')](_0x5b0515['body']);}})[_0x7b26('0x3b')](respondWithResult(_0x153fe3,null))[_0x7b26('0x2c')](handleError(_0x153fe3,null));};exports[_0x7b26('0x6a')]=function(_0x4bedad,_0x386b2c,_0x43f120){var _0x5a56c2={'raw':![],'where':{}};var _0x26bdff={};var _0x383ac2={'count':0x0,'rows':[]};return db[_0x7b26('0x5c')]['findOne']({'where':{'id':_0x4bedad['params']['id']}})[_0x7b26('0x3b')](handleEntityNotFound(_0x386b2c,null))[_0x7b26('0x3b')](function(_0xdf5561){if(_0xdf5561){_0x26bdff['model']=_[_0x7b26('0x46')](db[_0x7b26('0x69')][_0x7b26('0x43')]);_0x26bdff[_0x7b26('0x47')]=_[_0x7b26('0x46')](_0x4bedad[_0x7b26('0x47')]);_0x26bdff[_0x7b26('0x48')]=_[_0x7b26('0x49')](_0x26bdff['model'],_0x26bdff['query']);_0x5a56c2['attributes']=_[_0x7b26('0x49')](_0x26bdff['model'],qs[_0x7b26('0x4c')](_0x4bedad[_0x7b26('0x47')][_0x7b26('0x4c')]));_0x5a56c2[_0x7b26('0x4a')]=_0x5a56c2[_0x7b26('0x4a')][_0x7b26('0x4d')]?_0x5a56c2[_0x7b26('0x4a')]:_0x26bdff[_0x7b26('0x4b')];if(!_0x4bedad[_0x7b26('0x47')][_0x7b26('0x4e')](_0x7b26('0x4f'))){_0x5a56c2['limit']=qs[_0x7b26('0x32')](_0x4bedad[_0x7b26('0x47')][_0x7b26('0x32')]);_0x5a56c2[_0x7b26('0x34')]=qs[_0x7b26('0x34')](_0x4bedad[_0x7b26('0x47')][_0x7b26('0x34')]);}_0x5a56c2[_0x7b26('0x50')]=qs['sort'](_0x4bedad[_0x7b26('0x47')]['sort']);_0x5a56c2[_0x7b26('0x52')]=qs[_0x7b26('0x48')](_[_0x7b26('0x53')](_0x4bedad[_0x7b26('0x47')],_0x26bdff[_0x7b26('0x48')]));_0x5a56c2[_0x7b26('0x52')][_0x7b26('0x6b')]=_0xdf5561['id'];if(_0x4bedad[_0x7b26('0x47')][_0x7b26('0x54')]){_0x5a56c2[_0x7b26('0x52')]=_[_0x7b26('0x55')](_0x5a56c2[_0x7b26('0x52')],{'$or':_[_0x7b26('0x42')](_0x5a56c2['attributes'],function(_0x58548e){var _0x1cb1ed={};_0x1cb1ed[_0x58548e]={'$like':'%'+_0x4bedad[_0x7b26('0x47')][_0x7b26('0x54')]+'%'};return _0x1cb1ed;})});}_0x5a56c2=_[_0x7b26('0x55')]({},_0x5a56c2,_0x4bedad[_0x7b26('0x6c')]);return db['Disposition'][_0x7b26('0x33')]({'where':_0x5a56c2[_0x7b26('0x52')]})['then'](function(_0x560c01){_0x383ac2[_0x7b26('0x33')]=_0x560c01;if(_0x4bedad[_0x7b26('0x47')]['includeAll']){_0x5a56c2[_0x7b26('0x5b')]=[{'all':!![]}];}return db[_0x7b26('0x69')][_0x7b26('0x6d')](_0x5a56c2);})[_0x7b26('0x3b')](function(_0x28b992){_0x383ac2[_0x7b26('0x57')]=_0x28b992;return _0x383ac2;});}})[_0x7b26('0x3b')](respondWithFilteredResult(_0x386b2c,_0x5a56c2))[_0x7b26('0x2c')](handleError(_0x386b2c,null));};exports['removeDispositions']=function(_0x3be5e9,_0x50733a,_0x141b4e){return db[_0x7b26('0x5c')]['find']({'where':{'id':_0x3be5e9['params']['id']}})[_0x7b26('0x3b')](handleEntityNotFound(_0x50733a,null))[_0x7b26('0x3b')](function(_0x306b84){if(_0x306b84){return _0x306b84[_0x7b26('0x6e')](_0x3be5e9[_0x7b26('0x47')][_0x7b26('0x6f')]);}})['then'](respondWithStatusCode(_0x50733a,null))['catch'](handleError(_0x50733a,null));};exports[_0x7b26('0x70')]=function(_0x36af1f,_0x3100f7,_0x5a1bb0){if(_0x36af1f[_0x7b26('0x5f')]['id']){delete _0x36af1f[_0x7b26('0x5f')]['id'];}return db[_0x7b26('0x5c')][_0x7b26('0x5d')]({'where':{'id':_0x36af1f['params']['id']}})['then'](handleEntityNotFound(_0x3100f7,null))[_0x7b26('0x3b')](function(_0x1d91d2){if(_0x1d91d2){_0x36af1f[_0x7b26('0x5f')]['FaxAccountId']=_0x1d91d2['id'];return db[_0x7b26('0x71')][_0x7b26('0x5e')](_0x36af1f[_0x7b26('0x5f')]);}})[_0x7b26('0x3b')](respondWithResult(_0x3100f7,null))['catch'](handleError(_0x3100f7,null));};exports['getAnswers']=function(_0x182cbb,_0x1789b0,_0x247e74){var _0x637ff6={'raw':![],'where':{}};var _0x24ef67={};var _0x2411bc={'count':0x0,'rows':[]};return db[_0x7b26('0x5c')]['findOne']({'where':{'id':_0x182cbb['params']['id']}})[_0x7b26('0x3b')](handleEntityNotFound(_0x1789b0,null))['then'](function(_0x199c49){if(_0x199c49){_0x24ef67[_0x7b26('0x4b')]=_[_0x7b26('0x46')](db[_0x7b26('0x71')][_0x7b26('0x43')]);_0x24ef67[_0x7b26('0x47')]=_[_0x7b26('0x46')](_0x182cbb[_0x7b26('0x47')]);_0x24ef67['filters']=_[_0x7b26('0x49')](_0x24ef67[_0x7b26('0x4b')],_0x24ef67['query']);_0x637ff6['attributes']=_[_0x7b26('0x49')](_0x24ef67[_0x7b26('0x4b')],qs[_0x7b26('0x4c')](_0x182cbb['query']['fields']));_0x637ff6[_0x7b26('0x4a')]=_0x637ff6[_0x7b26('0x4a')][_0x7b26('0x4d')]?_0x637ff6[_0x7b26('0x4a')]:_0x24ef67[_0x7b26('0x4b')];if(!_0x182cbb['query'][_0x7b26('0x4e')](_0x7b26('0x4f'))){_0x637ff6['limit']=qs[_0x7b26('0x32')](_0x182cbb['query'][_0x7b26('0x32')]);_0x637ff6[_0x7b26('0x34')]=qs[_0x7b26('0x34')](_0x182cbb[_0x7b26('0x47')][_0x7b26('0x34')]);}_0x637ff6[_0x7b26('0x50')]=qs['sort'](_0x182cbb[_0x7b26('0x47')]['sort']);_0x637ff6[_0x7b26('0x52')]=qs['filters'](_[_0x7b26('0x53')](_0x182cbb['query'],_0x24ef67[_0x7b26('0x48')]));_0x637ff6[_0x7b26('0x52')]['FaxAccountId']=_0x199c49['id'];if(_0x182cbb[_0x7b26('0x47')][_0x7b26('0x54')]){_0x637ff6['where']=_['merge'](_0x637ff6[_0x7b26('0x52')],{'$or':_[_0x7b26('0x42')](_0x637ff6['attributes'],function(_0x29e7e6){var _0x278dc7={};_0x278dc7[_0x29e7e6]={'$like':'%'+_0x182cbb[_0x7b26('0x47')][_0x7b26('0x54')]+'%'};return _0x278dc7;})});}_0x637ff6=_[_0x7b26('0x55')]({},_0x637ff6,_0x182cbb[_0x7b26('0x6c')]);return db[_0x7b26('0x71')][_0x7b26('0x33')]({'where':_0x637ff6[_0x7b26('0x52')]})[_0x7b26('0x3b')](function(_0xb26d95){_0x2411bc['count']=_0xb26d95;if(_0x182cbb[_0x7b26('0x47')]['includeAll']){_0x637ff6[_0x7b26('0x5b')]=[{'all':!![]}];}return db['CannedAnswer'][_0x7b26('0x6d')](_0x637ff6);})['then'](function(_0x1c0948){_0x2411bc[_0x7b26('0x57')]=_0x1c0948;return _0x2411bc;});}})[_0x7b26('0x3b')](respondWithFilteredResult(_0x1789b0,_0x637ff6))[_0x7b26('0x2c')](handleError(_0x1789b0,null));};exports[_0x7b26('0x72')]=function(_0x4fc84f,_0x50d0db,_0x2c0256){return db[_0x7b26('0x5c')]['find']({'where':{'id':_0x4fc84f[_0x7b26('0x59')]['id']}})[_0x7b26('0x3b')](handleEntityNotFound(_0x50d0db,null))[_0x7b26('0x3b')](function(_0x47621c){if(_0x47621c){return _0x47621c[_0x7b26('0x72')](_0x4fc84f[_0x7b26('0x47')][_0x7b26('0x6f')]);}})['then'](respondWithStatusCode(_0x50d0db,null))['catch'](handleError(_0x50d0db,null));};exports['addInteraction']=function(_0x14425d,_0x218537,_0x1190fc){return db[_0x7b26('0x73')][_0x7b26('0x5d')]({'where':{'id':_0x14425d[_0x7b26('0x59')]['id']}})['then'](handleEntityNotFound(_0x218537,null))[_0x7b26('0x3b')](function(_0x202bf9){if(_0x202bf9){return _0x202bf9[_0x7b26('0x74')](_0x14425d['body'][_0x7b26('0x6f')],_[_0x7b26('0x75')](_0x14425d[_0x7b26('0x5f')],[_0x7b26('0x6f'),'id'])||{});}})['then'](respondWithResult(_0x218537,null))[_0x7b26('0x2c')](handleError(_0x218537,null));};exports[_0x7b26('0x76')]=function(_0x5e4c5c,_0x3cb4d2,_0xba07b3){var _0x51f2b9={'raw':![],'where':{}};var _0xec6f27={};var _0x4ba921={'count':0x0,'rows':[]};return db[_0x7b26('0x5c')]['findOne']({'where':{'id':_0x5e4c5c[_0x7b26('0x59')]['id']}})[_0x7b26('0x3b')](handleEntityNotFound(_0x3cb4d2,null))[_0x7b26('0x3b')](function(_0x3c0528){if(_0x3c0528){_0xec6f27[_0x7b26('0x4b')]=_[_0x7b26('0x46')](db[_0x7b26('0x73')]['rawAttributes']);_0xec6f27[_0x7b26('0x47')]=_[_0x7b26('0x46')](_0x5e4c5c[_0x7b26('0x47')]);_0xec6f27[_0x7b26('0x48')]=_[_0x7b26('0x49')](_0xec6f27['model'],_0xec6f27[_0x7b26('0x47')]);_0x51f2b9[_0x7b26('0x4a')]=_['intersection'](_0xec6f27[_0x7b26('0x4b')],qs[_0x7b26('0x4c')](_0x5e4c5c['query'][_0x7b26('0x4c')]));_0x51f2b9[_0x7b26('0x4a')]=_0x51f2b9[_0x7b26('0x4a')][_0x7b26('0x4d')]?_0x51f2b9[_0x7b26('0x4a')]:_0xec6f27[_0x7b26('0x4b')];if(!_0x5e4c5c[_0x7b26('0x47')][_0x7b26('0x4e')](_0x7b26('0x4f'))){_0x51f2b9[_0x7b26('0x32')]=qs[_0x7b26('0x32')](_0x5e4c5c['query'][_0x7b26('0x32')]);_0x51f2b9[_0x7b26('0x34')]=qs[_0x7b26('0x34')](_0x5e4c5c[_0x7b26('0x47')]['offset']);}_0x51f2b9[_0x7b26('0x50')]=qs['sort'](_0x5e4c5c['query'][_0x7b26('0x51')]);_0x51f2b9[_0x7b26('0x52')]=qs['filters'](_[_0x7b26('0x53')](_0x5e4c5c[_0x7b26('0x47')],_0xec6f27[_0x7b26('0x48')]));_0x51f2b9['where'][_0x7b26('0x6b')]=_0x3c0528['id'];if(_0x5e4c5c[_0x7b26('0x47')]['filter']){_0x51f2b9[_0x7b26('0x52')]=_[_0x7b26('0x55')](_0x51f2b9[_0x7b26('0x52')],{'$or':_[_0x7b26('0x42')](_0x51f2b9[_0x7b26('0x4a')],function(_0x5e6442){var _0x2e62f6={};_0x2e62f6[_0x5e6442]={'$like':'%'+_0x5e4c5c[_0x7b26('0x47')][_0x7b26('0x54')]+'%'};return _0x2e62f6;})});}_0x51f2b9=_[_0x7b26('0x55')]({},_0x51f2b9,_0x5e4c5c[_0x7b26('0x6c')]);return db[_0x7b26('0x73')][_0x7b26('0x33')]({'where':_0x51f2b9['where']})['then'](function(_0x186005){_0x4ba921[_0x7b26('0x33')]=_0x186005;if(_0x5e4c5c[_0x7b26('0x47')][_0x7b26('0x56')]){_0x51f2b9[_0x7b26('0x5b')]=[{'model':db[_0x7b26('0x77')],'as':_0x7b26('0x78'),'required':![]},{'model':db[_0x7b26('0x79')],'as':_0x7b26('0x7a'),'attributes':[_0x7b26('0x3f'),_0x7b26('0x7b'),'internal'],'required':![]},{'model':db[_0x7b26('0x7c')],'as':_0x7b26('0x7d'),'attributes':['id',_0x7b26('0x3f'),_0x7b26('0x7e')],'where':_0x5e4c5c[_0x7b26('0x47')][_0x7b26('0x7f')]?{'id':_0x5e4c5c[_0x7b26('0x47')][_0x7b26('0x7f')]}:undefined,'required':_0x5e4c5c['query'][_0x7b26('0x7f')]?!![]:![]}];}return db[_0x7b26('0x73')]['findAll'](_0x51f2b9);})[_0x7b26('0x3b')](function(_0x260967){_0x4ba921[_0x7b26('0x57')]=_0x260967;return _0x4ba921;});}})[_0x7b26('0x3b')](respondWithFilteredResult(_0x3cb4d2,_0x51f2b9))[_0x7b26('0x2c')](handleError(_0x3cb4d2,null));};exports[_0x7b26('0x80')]=function(_0x5ed99c,_0x14e76e){var _0x87b72b=_0x5ed99c['params']['id'];var _0x4c9ee4=_0x5ed99c[_0x7b26('0x5f')];var _0x2fc047=0xc8;var _0x25b6f5=null;return db[_0x7b26('0x81')][_0x7b26('0x82')]({'isolationLevel':db['sequelize'][_0x7b26('0x83')][_0x7b26('0x84')][_0x7b26('0x85')]},function(_0x493a5e){return db[_0x7b26('0x5c')][_0x7b26('0x86')]({'where':{'id':_0x87b72b},'transaction':_0x493a5e})['then'](function(_0x181583){if(_0x181583){return db[_0x7b26('0x87')][_0x7b26('0x3a')]({'where':{'FaxAccountId':_0x87b72b},'transaction':_0x493a5e})[_0x7b26('0x3b')](function(){var _0x2d4e21=_[_0x7b26('0x42')](_0x4c9ee4,function(_0x460db1){_0x460db1[_0x7b26('0x6b')]=_0x87b72b;return _0x460db1;});return db[_0x7b26('0x87')][_0x7b26('0x88')](_0x2d4e21,{'transaction':_0x493a5e});});}else{_0x2fc047=0x194;_0x25b6f5=[];}});})[_0x7b26('0x3b')](function(){if(_0x2fc047!==0x194){return db[_0x7b26('0x87')][_0x7b26('0x89')]({'where':{'FaxAccountId':_0x87b72b},'order':'priority'})[_0x7b26('0x3b')](function(_0xbf3e52){_0x25b6f5=_0xbf3e52;});}})[_0x7b26('0x2c')](function(_0x504c56){_0x2fc047=0x1f4;logger[_0x7b26('0x29')](_0x504c56['stack']);if(_0x504c56['name']){delete _0x504c56[_0x7b26('0x3f')];}_0x25b6f5=_0x504c56;})['finally'](function(){if(_0x25b6f5===null){_0x14e76e[_0x7b26('0x2d')](_0x2fc047);}else{if(_0x2fc047===0x1f4){_0x14e76e[_0x7b26('0x2e')](_0x2fc047)[_0x7b26('0x8a')](_0x25b6f5);}else{_0x14e76e[_0x7b26('0x2e')](_0x2fc047)['json'](_0x25b6f5);}}});};exports[_0x7b26('0x8b')]=function(_0x148ef6,_0x457c40,_0x499901){var _0x4c06a4={};var _0x2af457={};var _0x179ac4;var _0xa256fb;return db['FaxAccount'][_0x7b26('0x86')]({'where':{'id':_0x148ef6[_0x7b26('0x59')]['id']}})[_0x7b26('0x3b')](handleEntityNotFound(_0x457c40,null))[_0x7b26('0x3b')](function(_0x21fb76){if(_0x21fb76){_0x179ac4=_0x21fb76;_0x2af457[_0x7b26('0x4b')]=_['keys'](db['FaxApplication'][_0x7b26('0x43')]);_0x2af457[_0x7b26('0x47')]=_['keys'](_0x148ef6[_0x7b26('0x47')]);_0x2af457[_0x7b26('0x48')]=_[_0x7b26('0x49')](_0x2af457['model'],_0x2af457['query']);_0x4c06a4[_0x7b26('0x4a')]=_[_0x7b26('0x49')](_0x2af457[_0x7b26('0x4b')],qs[_0x7b26('0x4c')](_0x148ef6[_0x7b26('0x47')][_0x7b26('0x4c')]));_0x4c06a4['attributes']=_0x4c06a4[_0x7b26('0x4a')][_0x7b26('0x4d')]?_0x4c06a4['attributes']:_0x2af457[_0x7b26('0x4b')];_0x4c06a4[_0x7b26('0x50')]=qs[_0x7b26('0x51')](_0x148ef6['query'][_0x7b26('0x51')]);_0x4c06a4[_0x7b26('0x52')]=qs['filters'](_[_0x7b26('0x53')](_0x148ef6[_0x7b26('0x47')],_0x2af457[_0x7b26('0x48')]));if(_0x148ef6[_0x7b26('0x47')][_0x7b26('0x54')]){_0x4c06a4['where']=_[_0x7b26('0x55')](_0x4c06a4[_0x7b26('0x52')],{'$or':_[_0x7b26('0x42')](_0x4c06a4[_0x7b26('0x4a')],function(_0x32d929){var _0x4436f9={};_0x4436f9[_0x32d929]={'$like':'%'+_0x148ef6[_0x7b26('0x47')][_0x7b26('0x54')]+'%'};return _0x4436f9;})});}_0x4c06a4=_['merge']({},_0x4c06a4,_0x148ef6[_0x7b26('0x6c')]);return _0x179ac4[_0x7b26('0x8b')](_0x4c06a4);}})[_0x7b26('0x3b')](function(_0x5e63f1){if(_0x5e63f1){_0xa256fb=_0x5e63f1[_0x7b26('0x4d')];if(!_0x148ef6[_0x7b26('0x47')]['hasOwnProperty'](_0x7b26('0x4f'))){_0x4c06a4[_0x7b26('0x32')]=qs[_0x7b26('0x32')](_0x148ef6[_0x7b26('0x47')][_0x7b26('0x32')]);_0x4c06a4[_0x7b26('0x34')]=qs[_0x7b26('0x34')](_0x148ef6[_0x7b26('0x47')][_0x7b26('0x34')]);}return _0x179ac4[_0x7b26('0x8b')](_0x4c06a4);}})[_0x7b26('0x3b')](function(_0x2d2d94){if(_0x2d2d94){return _0x2d2d94?{'count':_0xa256fb,'rows':_0x2d2d94}:null;}})[_0x7b26('0x3b')](respondWithResult(_0x457c40,null))[_0x7b26('0x2c')](handleError(_0x457c40,null));};function Extension(_0x4a043e,_0x3598e8,_0x163735,_0x4bdaf1){this[_0x7b26('0x8c')]='from-voip-provider';this[_0x7b26('0x8d')]=_0x4a043e[_0x7b26('0x8e')];this['app']=_0x4bdaf1;this[_0x7b26('0x45')]=_0x7b26('0x8f');this['description']=_0x7b26('0x90');this[_0x7b26('0x6b')]=_0x4a043e['id'];this[_0x7b26('0x91')]=_0x3598e8;this[_0x7b26('0x92')]=_0x163735;}function createExtensionsReciveFax(_0x1f3cd6){var _0x374463=0x1;var _0x380a7b=[];_0x380a7b[_0x7b26('0x93')](new Extension(_0x1f3cd6,_0x374463,'',_0x7b26('0x94')));_0x374463+=0x1;_0x380a7b[_0x7b26('0x93')](new Extension(_0x1f3cd6,_0x374463,'CDR(type)=inbound-fax',_0x7b26('0x95')));_0x374463+=0x1;for(var _0x2776e7 in _0x1f3cd6){if(_0x1f3cd6[_0x7b26('0x4e')](_0x2776e7)&&(_0x2776e7===_0x7b26('0x96')||_0x2776e7===_0x7b26('0x8e')||_0x2776e7===_0x7b26('0x97')||_0x2776e7===_0x7b26('0x98')||_0x2776e7==='headerinfo'||_0x2776e7===_0x7b26('0x99')||_0x2776e7===_0x7b26('0x9a')||_0x2776e7===_0x7b26('0x9b')||_0x2776e7===_0x7b26('0x9c'))){_0x380a7b['push'](new Extension(_0x1f3cd6,_0x374463,_0x7b26('0x9d')+_0x2776e7+')='+_0x1f3cd6[_0x2776e7],_0x7b26('0x95')));_0x374463+=0x1;}}_0x380a7b[_0x7b26('0x93')](new Extension(_0x1f3cd6,_0x374463,'6',_0x7b26('0x9e')));_0x374463+=0x1;_0x380a7b[_0x7b26('0x93')](new Extension(_0x1f3cd6,_0x374463,_0x7b26('0x9f'),_0x7b26('0xa0')));_0x374463=0x0;return _0x380a7b;}exports[_0x7b26('0xa1')]=function(_0x394d3e,_0x1a6851,_0x19e974){var _0x2c313b;return db['sequelize'][_0x7b26('0x82')](function(_0x403721){return db['FaxAccount'][_0x7b26('0x5e')](_0x394d3e[_0x7b26('0x5f')],{'transaction':_0x403721})[_0x7b26('0x3b')](function(_0x5d6bca){_0x2c313b=_0x5d6bca[_0x7b26('0x61')]({'plain':!![]});return db[_0x7b26('0xa2')][_0x7b26('0x88')](createExtensionsReciveFax(_0x2c313b),{'transaction':_0x403721});});})[_0x7b26('0x3b')](function(){return _0x2c313b;})[_0x7b26('0x3b')](respondWithResult(_0x1a6851,null))[_0x7b26('0x2c')](handleError(_0x1a6851,null));};exports[_0x7b26('0xa3')]=function(_0x2eb4bc,_0x13299c,_0x3ee801){var _0x77139;return db[_0x7b26('0x81')][_0x7b26('0x82')](function(_0x2f27e4){return db['FaxAccount']['update'](_0x2eb4bc[_0x7b26('0x5f')],{'where':{'id':_0x2eb4bc[_0x7b26('0x5f')]['id']},'transaction':_0x2f27e4})[_0x7b26('0x3b')](function(_0x3ddd36){return db['VoiceExtension'][_0x7b26('0x3a')]({'where':{'FaxAccountId':_0x2eb4bc[_0x7b26('0x5f')]['id']},'transaction':_0x2f27e4})[_0x7b26('0x3b')](function(_0x2dc410){return db[_0x7b26('0xa2')][_0x7b26('0x88')](createExtensionsReciveFax(_[_0x7b26('0x75')](_0x2eb4bc['body'],['tech',_0x7b26('0xa4'),_0x7b26('0xa5'),'updatedAt',_0x7b26('0xa6'),_0x7b26('0xa7')])),{'transaction':_0x2f27e4});});});})[_0x7b26('0x3b')](function(){return db['FaxAccount'][_0x7b26('0xa8')](_0x2eb4bc[_0x7b26('0x5f')]['id']);})[_0x7b26('0x3b')](respondWithResult(_0x13299c,null))[_0x7b26('0x2c')](handleError(_0x13299c,null));};exports['getMessages']=function(_0x30f847,_0x583fcb,_0x276603){var _0x3e9bb0={'raw':!![],'where':{}};var _0x5364f0={};var _0x5898ec={'count':0x0,'rows':[]};return db[_0x7b26('0x5c')][_0x7b26('0x86')]({'where':{'id':_0x30f847[_0x7b26('0x59')]['id']}})[_0x7b26('0x3b')](handleEntityNotFound(_0x583fcb,null))[_0x7b26('0x3b')](function(_0x52ea71){if(_0x52ea71){_0x5364f0[_0x7b26('0x4b')]=_[_0x7b26('0x46')](db['FaxMessage'][_0x7b26('0x43')]);_0x5364f0['query']=_[_0x7b26('0x46')](_0x30f847[_0x7b26('0x47')]);_0x5364f0[_0x7b26('0x48')]=_[_0x7b26('0x49')](_0x5364f0[_0x7b26('0x4b')],_0x5364f0[_0x7b26('0x47')]);_0x3e9bb0['attributes']=_[_0x7b26('0x49')](_0x5364f0[_0x7b26('0x4b')],qs[_0x7b26('0x4c')](_0x30f847['query'][_0x7b26('0x4c')]));_0x3e9bb0[_0x7b26('0x4a')]=_0x3e9bb0[_0x7b26('0x4a')][_0x7b26('0x4d')]?_0x3e9bb0[_0x7b26('0x4a')]:_0x5364f0[_0x7b26('0x4b')];if(!_0x30f847[_0x7b26('0x47')]['hasOwnProperty'](_0x7b26('0x4f'))){_0x3e9bb0[_0x7b26('0x32')]=qs[_0x7b26('0x32')](_0x30f847['query'][_0x7b26('0x32')]);_0x3e9bb0[_0x7b26('0x34')]=qs[_0x7b26('0x34')](_0x30f847[_0x7b26('0x47')][_0x7b26('0x34')]);}_0x3e9bb0[_0x7b26('0x50')]=qs[_0x7b26('0x51')](_0x30f847[_0x7b26('0x47')][_0x7b26('0x51')]);_0x3e9bb0[_0x7b26('0x52')]=qs['filters'](_['pick'](_0x30f847['query'],_0x5364f0[_0x7b26('0x48')]));_0x3e9bb0[_0x7b26('0x52')]['FaxAccountId']=_0x52ea71['id'];if(_0x30f847['query'][_0x7b26('0x54')]){_0x3e9bb0[_0x7b26('0x52')]=_[_0x7b26('0x55')](_0x3e9bb0['where'],{'$or':_[_0x7b26('0x42')](_0x3e9bb0[_0x7b26('0x4a')],function(_0x413aad){var _0x411043={};_0x411043[_0x413aad]={'$like':'%'+_0x30f847[_0x7b26('0x47')][_0x7b26('0x54')]+'%'};return _0x411043;})});}if(_0x30f847[_0x7b26('0x47')]['$gte']){var _0x48b60b=_0x30f847[_0x7b26('0x47')][_0x7b26('0xa9')][_0x7b26('0xaa')](',');var _0x143b9a={};_0x143b9a[_0x48b60b[0x0]]={'$gte':moment(_0x48b60b[0x1])[_0x7b26('0xab')](_0x7b26('0xac'))};_0x3e9bb0[_0x7b26('0x52')]=_[_0x7b26('0x55')](_0x3e9bb0[_0x7b26('0x52')],_0x143b9a);}_0x3e9bb0=_[_0x7b26('0x55')]({},_0x3e9bb0,_0x30f847[_0x7b26('0x6c')]);return db[_0x7b26('0xad')][_0x7b26('0x33')]({'where':_0x3e9bb0[_0x7b26('0x52')]})['then'](function(_0x301d4f){_0x5898ec[_0x7b26('0x33')]=_0x301d4f;if(_0x30f847['query'][_0x7b26('0x56')]){_0x3e9bb0[_0x7b26('0x5b')]=[{'all':!![]}];}return db['FaxMessage'][_0x7b26('0x6d')](_0x3e9bb0);})[_0x7b26('0x3b')](function(_0x53754e){_0x5898ec[_0x7b26('0x57')]=_0x53754e;return _0x5898ec;});}})[_0x7b26('0x3b')](respondWithFilteredResult(_0x583fcb,_0x3e9bb0))[_0x7b26('0x2c')](handleError(_0x583fcb,null));};exports[_0x7b26('0x8a')]=function(_0x4cfe45,_0x5846ad,_0xcb1a7){var _0x50e238,_0x434b1e={},_0x3af102;if(_0x4cfe45[_0x7b26('0x5f')]['to']){_0x3af102=_0x4cfe45['body']['to'][0x0];}return db['FaxAccount'][_0x7b26('0x5d')]({'where':{'id':_0x4cfe45[_0x7b26('0x59')]['id']},'include':[{'model':db[_0x7b26('0xae')],'as':'List','include':[{'model':db[_0x7b26('0x77')],'as':'Contacts','where':{'fax':_0x3af102},'limit':0x1,'order':[[_0x7b26('0xaf'),_0x7b26('0xb0')]]}]}]})[_0x7b26('0x3b')](handleEntityNotFound(_0x5846ad,null))[_0x7b26('0x3b')](function(_0x36ee37){_0x50e238=_0x36ee37;if(_0x4cfe45['body'][_0x7b26('0xb1')]&&_0x4cfe45[_0x7b26('0x5f')][_0x7b26('0xb1')][_0x7b26('0x4d')]){for(var _0x29ec84=0x0;_0x29ec84<_0x4cfe45[_0x7b26('0x5f')][_0x7b26('0xb1')][_0x7b26('0x4d')];_0x29ec84+=0x1){_0x4cfe45['body'][_0x7b26('0xb1')][_0x29ec84]={'filename':_0x4cfe45[_0x7b26('0x5f')]['attachments'][_0x29ec84][_0x7b26('0x3f')],'id':_0x4cfe45['body'][_0x7b26('0xb1')][_0x29ec84]['id'],'path':path[_0x7b26('0xb2')](config[_0x7b26('0xb3')],_0x7b26('0xb4'),_0x4cfe45[_0x7b26('0x5f')]['attachments'][_0x29ec84][_0x7b26('0xb5')])};}}return respondWithRpcPromise('CheckAfterSend',_0x7b26('0xb6'),{'FaxAccountId':_[_0x7b26('0xb7')](_0x4cfe45[_0x7b26('0x59')]['id'])?undefined:_0x4cfe45[_0x7b26('0x59')]['id'],'path':_[_0x7b26('0xb7')](_0x4cfe45[_0x7b26('0x5f')]['attachments'][0x0][_0x7b26('0x6')])?undefined:_0x4cfe45[_0x7b26('0x5f')][_0x7b26('0xb1')][0x0]['path'],'fax':_['isNil'](_0x4cfe45['body']['to'][0x0])?undefined:_0x4cfe45[_0x7b26('0x5f')]['to'][0x0]},client9002);})[_0x7b26('0x3b')](function(){if(_0x50e238){if(_[_0x7b26('0xb7')](_0x4cfe45['body']['from'])){_0x4cfe45['body']['from']=util[_0x7b26('0xab')]('\x22%s\x22\x20<%s>',_0x50e238[_0x7b26('0x3f')],_0x50e238['fax']);}if(_0x50e238['List']){if(_0x50e238[_0x7b26('0xb8')][_0x7b26('0xb9')]['length']){return _0x50e238[_0x7b26('0xb8')][_0x7b26('0xb9')][0x0];}else{return db['CmContact'][_0x7b26('0x5e')](_['defaults'](_0x4cfe45[_0x7b26('0x5f')],{'firstName':_0x4cfe45[_0x7b26('0x5f')]['to'][0x0],'phone':_0x4cfe45[_0x7b26('0x5f')]['to'][0x0],'fax':_0x4cfe45[_0x7b26('0x5f')]['to'][0x0],'ListId':_0x50e238[_0x7b26('0xa7')]}));}}else{throw new Error(_0x7b26('0xba'));}}else{throw new Error('Send\x20Fax\x20failed');}})[_0x7b26('0x3b')](function(_0x271093){if(_0x271093){return db[_0x7b26('0x73')][_0x7b26('0x5d')]({'where':{'ContactId':_0x271093['id'],'closed':![],'FaxAccountId':_0x50e238['id']}})[_0x7b26('0x3b')](function(_0x5785a4){if(_0x5785a4){return[_0x5785a4,![]];}return db[_0x7b26('0x73')][_0x7b26('0x5e')]({'UserId':_0x4cfe45['user']['id'],'ContactId':_0x271093['id'],'FaxAccountId':_0x50e238['id'],'fax':_0x4cfe45[_0x7b26('0x5f')]['to'][0x0],'firstMsgDirection':'out','Messages':[_[_0x7b26('0x55')](_0x4cfe45['body'],{'read':![],'body':_0x4cfe45[_0x7b26('0x5f')][_0x7b26('0xb1')][0x0][_0x7b26('0xbb')],'FaxAccountId':_0x50e238['id'],'UserId':_0x4cfe45[_0x7b26('0x60')]['id'],'ContactId':_0x271093['id'],'AttachmentId':_0x4cfe45[_0x7b26('0x5f')][_0x7b26('0xb1')][0x0]['id']})]},{'include':[{'model':db[_0x7b26('0xad')],'as':'Messages'}]})[_0x7b26('0x3b')](function(_0x58a9cd){return[_0x58a9cd,!![]];});});}else{throw new Error(_0x7b26('0xbc'));}})[_0x7b26('0xbd')](function(_0x24d7c4,_0x5f1bf3){if(_0x5f1bf3){return _0x24d7c4;}return db[_0x7b26('0xad')][_0x7b26('0x5e')]({'direction':_0x7b26('0xbe'),'read':![],'body':_0x4cfe45['body']['attachments'][0x0][_0x7b26('0xbb')],'FaxAccountId':_0x50e238['id'],'FaxInteractionId':_0x24d7c4['id'],'UserId':_0x4cfe45[_0x7b26('0x60')]['id'],'ContactId':_0x24d7c4[_0x7b26('0xbf')],'AttachmentId':_0x4cfe45[_0x7b26('0x5f')][_0x7b26('0xb1')][0x0]['id']})['then'](function(_0x3da26e){_0x24d7c4[_0x7b26('0xc0')]['Messages']=[];_0x24d7c4[_0x7b26('0xc0')]['Messages'][_0x7b26('0x93')](_0x3da26e[_0x7b26('0xc0')]);return _0x24d7c4;});})['then'](function(_0x38cbc7){respondWithRpcPromise(_0x7b26('0xc1'),'SendFax',{'FaxAccountId':_[_0x7b26('0xb7')](_0x4cfe45[_0x7b26('0x59')]['id'])?undefined:_0x4cfe45[_0x7b26('0x59')]['id'],'path':_[_0x7b26('0xb7')](_0x4cfe45['body'][_0x7b26('0xb1')][0x0][_0x7b26('0x6')])?undefined:_0x4cfe45[_0x7b26('0x5f')][_0x7b26('0xb1')][0x0][_0x7b26('0x6')],'fax':_['isNil'](_0x4cfe45[_0x7b26('0x5f')]['to'][0x0])?undefined:_0x4cfe45[_0x7b26('0x5f')]['to'][0x0],'AttachmentId':_0x4cfe45[_0x7b26('0x5f')][_0x7b26('0xb1')][0x0]['id']},client9002)['then'](function(_0x56aaf2){logger[_0x7b26('0x24')](_0x7b26('0xc2'),_0x56aaf2);})['catch'](function(_0x2cfad3){logger['info'](_0x7b26('0xc2'),_0x2cfad3);});return _0x38cbc7;})['then'](respondWithResult(_0x5846ad,null))[_0x7b26('0x2c')](handleError(_0x5846ad,null));};exports[_0x7b26('0xc3')]=function(_0xbd473f,_0xf462bb,_0xa1cae1){return db[_0x7b26('0x5c')][_0x7b26('0x5d')]({'where':{'id':_0xbd473f[_0x7b26('0x59')]['id']}})['then'](handleEntityNotFound(_0xf462bb,null))[_0x7b26('0x3b')](function(_0x5c2d6d){if(_0x5c2d6d){return _0x5c2d6d[_0x7b26('0xc3')](_0xbd473f[_0x7b26('0x5f')][_0x7b26('0x6f')],_[_0x7b26('0x75')](_0xbd473f[_0x7b26('0x5f')],[_0x7b26('0x6f'),'id'])||{})[_0x7b26('0xbd')](function(_0x105693){for(var _0x359a62=0x0;_0x359a62<_0xbd473f[_0x7b26('0x5f')]['ids'][_0x7b26('0x4d')];_0x359a62+=0x1){socket['emit'](_0x7b26('0xc4'),{'UserId':Number(_0xbd473f[_0x7b26('0x5f')][_0x7b26('0x6f')][_0x359a62]),'FaxAccountId':Number(_0xbd473f['params']['id'])});}return _0x105693;});}})[_0x7b26('0x3b')](respondWithResult(_0xf462bb,null))[_0x7b26('0x2c')](handleError(_0xf462bb,null));};exports[_0x7b26('0xc5')]=function(_0x4a3ff3,_0x2487a8,_0x428adb){return db[_0x7b26('0x5c')]['find']({'where':{'id':_0x4a3ff3[_0x7b26('0x59')]['id']}})[_0x7b26('0x3b')](handleEntityNotFound(_0x2487a8,null))['then'](function(_0x45e866){if(_0x45e866){return _0x45e866['removeAgents'](_0x4a3ff3[_0x7b26('0x47')][_0x7b26('0x6f')])[_0x7b26('0x3b')](function(){if(_[_0x7b26('0xc6')](_0x4a3ff3['query'][_0x7b26('0x6f')])){for(var _0x248de1=0x0;_0x248de1<_0x4a3ff3[_0x7b26('0x47')][_0x7b26('0x6f')][_0x7b26('0x4d')];_0x248de1+=0x1){socket['emit'](_0x7b26('0xc7'),{'UserId':Number(_0x4a3ff3[_0x7b26('0x47')][_0x7b26('0x6f')][_0x248de1]),'FaxAccountId':Number(_0x4a3ff3[_0x7b26('0x59')]['id'])});}}else{socket[_0x7b26('0xc8')](_0x7b26('0xc7'),{'UserId':Number(_0x4a3ff3['query'][_0x7b26('0x6f')]),'FaxAccountId':Number(_0x4a3ff3['params']['id'])});}});}})[_0x7b26('0x3b')](respondWithStatusCode(_0x2487a8,null))[_0x7b26('0x2c')](handleError(_0x2487a8,null));};exports[_0x7b26('0xc9')]=function(_0x3506ed,_0x5b3a59,_0xaa1fdc){var _0x2a963b={};var _0x2673ef={};var _0x2603af;var _0x4efb89;return db[_0x7b26('0x5c')][_0x7b26('0x86')]({'where':{'id':_0x3506ed[_0x7b26('0x59')]['id']}})[_0x7b26('0x3b')](handleEntityNotFound(_0x5b3a59,null))['then'](function(_0x5be1a5){if(_0x5be1a5){_0x2603af=_0x5be1a5;_0x2673ef[_0x7b26('0x4b')]=_['keys'](db[_0x7b26('0x79')][_0x7b26('0x43')]);_0x2673ef[_0x7b26('0x47')]=_['keys'](_0x3506ed[_0x7b26('0x47')]);_0x2673ef[_0x7b26('0x48')]=_[_0x7b26('0x49')](_0x2673ef['model'],_0x2673ef[_0x7b26('0x47')]);_0x2a963b['attributes']=_[_0x7b26('0x49')](_0x2673ef[_0x7b26('0x4b')],qs['fields'](_0x3506ed[_0x7b26('0x47')]['fields']));_0x2a963b[_0x7b26('0x4a')]=_0x2a963b[_0x7b26('0x4a')][_0x7b26('0x4d')]?_0x2a963b['attributes']:_0x2673ef[_0x7b26('0x4b')];_0x2a963b[_0x7b26('0x50')]=qs['sort'](_0x3506ed[_0x7b26('0x47')][_0x7b26('0x51')]);_0x2a963b[_0x7b26('0x52')]=qs[_0x7b26('0x48')](_[_0x7b26('0x53')](_0x3506ed[_0x7b26('0x47')],_0x2673ef[_0x7b26('0x48')]));if(_0x3506ed[_0x7b26('0x47')][_0x7b26('0x54')]){_0x2a963b['where']=_['merge'](_0x2a963b[_0x7b26('0x52')],{'$or':_['map'](_0x2a963b['attributes'],function(_0x4f95f1){var _0x10fc23={};_0x10fc23[_0x4f95f1]={'$like':'%'+_0x3506ed[_0x7b26('0x47')]['filter']+'%'};return _0x10fc23;})});}_0x2a963b=_[_0x7b26('0x55')]({},_0x2a963b,_0x3506ed['options']);return _0x2603af[_0x7b26('0xc9')](_0x2a963b);}})[_0x7b26('0x3b')](function(_0x465236){if(_0x465236){_0x4efb89=_0x465236['length'];if(!_0x3506ed[_0x7b26('0x47')]['hasOwnProperty'](_0x7b26('0x4f'))){_0x2a963b[_0x7b26('0x32')]=qs['limit'](_0x3506ed['query'][_0x7b26('0x32')]);_0x2a963b[_0x7b26('0x34')]=qs[_0x7b26('0x34')](_0x3506ed['query'][_0x7b26('0x34')]);}return _0x2603af['getAgents'](_0x2a963b);}})[_0x7b26('0x3b')](function(_0x26b987){if(_0x26b987){return _0x26b987?{'count':_0x4efb89,'rows':_0x26b987}:null;}})[_0x7b26('0x3b')](respondWithResult(_0x5b3a59,null))[_0x7b26('0x2c')](handleError(_0x5b3a59,null));};
\ No newline at end of file
+var _0x6229=['getMessages','FaxMessage','$gte','format','YYYY-MM-DD\x20HH:mm:ss','CmList','List','Contacts','updatedAt','DESC','attachments','join','root','server/files/attachments','CheckAfterSend','isNil','from','\x22%s\x22\x20<%s>','fax','defaults','Send\x20Fax\x20failed','out','Messages','Contact\x20not\x20found','spread','filename','ContactId','dataValues','SendFax','SendFaxRpc,\x20%s','addAgents','emit','userFaxAccount:save','removeAgents','isArray','userFaxAccount:remove','getAgents','zip-dir','moment','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','papaparse','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','./faxAccount.socket','register','jayson/promise','client','http','request','then','request\x20sent','debug','stringify','error','code','FaxAccount,\x20%s,\x20%s','message','info','result','catch','sendStatus','status','end','offset','limit','undefined','count','set','Content-Range','apply','save','update','destroy','get','FaxAccounts','stack','name','send','index','Pause','mandatoryDispositionPause','map','FaxAccount','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','VIRTUAL','merge','options','includeAll','include','rows','params','rawAttributes','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','find','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','describe','addDisposition','FaxAccountId','Disposition','getDispositions','findOne','pick','findAll','removeDispositions','addAnswer','CannedAnswer','getAnswers','removeAnswers','addInteraction','FaxInteraction','ids','omit','CmContact','Contact','User','Owner','fullname','internal','Tag','Tags','color','tag','addApplications','transaction','ISOLATION_LEVELS','READ_COMMITTED','FaxApplication','bulkCreate','findAndCountAll','finally','getApplications','context','exten','localstationid','app','type','system','description','priority','appdata','push','Answer','CDR(type)=inbound-fax','Set','ecm','gateway','faxdetect','headerinfo','maxrate','minrate','t38timeout','FAXOPT(','/var/opt/motion2/server/files/attachments/fax-${CALLERID(num)}-${CUT(UNIQUEID,.,1)}-${CUT(UNIQUEID,.,2)}-${STRFTIME(,,%C%y%m%d%H%M%S)}-rx.tif,d','ReceiveFax','sequelize','updateAccountApplications','VoiceExtension','tech','key','createdAt','TrunkId','ListId','findById'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x6229,0x1b3));var _0x9622=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x6229[_0x14add3];return _0x4a174f;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x9622('0x0'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x9622('0x1'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x9622('0x2'));var path=require(_0x9622('0x3'));var sox=require(_0x9622('0x4'));var csv=require(_0x9622('0x5'));var ejs=require(_0x9622('0x6'));var fs=require('fs');var fs_extra=require(_0x9622('0x7'));var _=require(_0x9622('0x8'));var squel=require(_0x9622('0x9'));var crypto=require(_0x9622('0xa'));var jsforce=require('jsforce');var deskjs=require(_0x9622('0xb'));var toCsv=require(_0x9622('0x5'));var querystring=require('querystring');var Papa=require(_0x9622('0xc'));var Redis=require(_0x9622('0xd'));var authService=require('../../components/auth/service');var qs=require(_0x9622('0xe'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x9622('0xf'))(_0x9622('0x10'));var utils=require('../../config/utils');var config=require(_0x9622('0x11'));var licenseUtil=require(_0x9622('0x12'));var db=require(_0x9622('0x13'))['db'];config[_0x9622('0x14')]=_['defaults'](config[_0x9622('0x14')],{'host':_0x9622('0x15'),'port':0x18eb});var socket=require(_0x9622('0x16'))(new Redis(config[_0x9622('0x14')]));require(_0x9622('0x17'))[_0x9622('0x18')](socket);var jayson=require(_0x9622('0x19'));var client=jayson[_0x9622('0x1a')][_0x9622('0x1b')]({'port':0x232c});var client9002=jayson[_0x9622('0x1a')][_0x9622('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0x2d2edf,_0x102a44,_0x3dbb61,_0x3cff65){return new BPromise(function(_0xb0b8fa,_0x4c0935){var _0x1f350d=_0x3cff65||client;return _0x1f350d[_0x9622('0x1c')](_0x2d2edf,_0x3dbb61)[_0x9622('0x1d')](function(_0x272756){logger['info']('FaxAccount,\x20%s,\x20%s',_0x102a44,_0x9622('0x1e'));logger[_0x9622('0x1f')]('FaxAccount,\x20%s,\x20%s,\x20%s',_0x102a44,'request\x20sent',JSON[_0x9622('0x20')](_0x272756));if(_0x272756['error']){if(_0x272756[_0x9622('0x21')][_0x9622('0x22')]===0x1f4){logger['error'](_0x9622('0x23'),_0x102a44,_0x272756[_0x9622('0x21')]['message']);return _0x4c0935(_0x272756[_0x9622('0x21')]['message']);}logger[_0x9622('0x21')](_0x9622('0x23'),_0x102a44,_0x272756[_0x9622('0x21')][_0x9622('0x24')]);return _0xb0b8fa(_0x272756[_0x9622('0x21')][_0x9622('0x24')]);}else{logger[_0x9622('0x25')](_0x9622('0x23'),_0x102a44,'request\x20sent');_0xb0b8fa(_0x272756[_0x9622('0x26')][_0x9622('0x24')]);}})[_0x9622('0x27')](function(_0x18684d){logger[_0x9622('0x21')](_0x9622('0x23'),_0x102a44,_0x18684d);_0x4c0935(_0x18684d);});});}function respondWithStatusCode(_0x1c9d7d,_0x1d428d){_0x1d428d=_0x1d428d||0xcc;return function(_0x3b190a){if(_0x3b190a){return _0x1c9d7d[_0x9622('0x28')](_0x1d428d);}return _0x1c9d7d[_0x9622('0x29')](_0x1d428d)[_0x9622('0x2a')]();};}function respondWithResult(_0x36dbef,_0x2783e6){_0x2783e6=_0x2783e6||0xc8;return function(_0x675f48){if(_0x675f48){return _0x36dbef[_0x9622('0x29')](_0x2783e6)['json'](_0x675f48);}};}function respondWithFilteredResult(_0x450dd5,_0x5dec4e){return function(_0x469971){if(_0x469971){var _0x1f49b5=typeof _0x5dec4e[_0x9622('0x2b')]==='undefined'&&typeof _0x5dec4e[_0x9622('0x2c')]===_0x9622('0x2d');var _0x48f2e=_0x469971['count'];var _0x5d6542=_0x1f49b5?0x0:_0x5dec4e[_0x9622('0x2b')];var _0x595475=_0x1f49b5?_0x469971[_0x9622('0x2e')]:_0x5dec4e['offset']+_0x5dec4e[_0x9622('0x2c')];var _0x51d6ce;if(_0x595475>=_0x48f2e){_0x595475=_0x48f2e;_0x51d6ce=0xc8;}else{_0x51d6ce=0xce;}_0x450dd5[_0x9622('0x29')](_0x51d6ce);return _0x450dd5[_0x9622('0x2f')](_0x9622('0x30'),_0x5d6542+'-'+_0x595475+'/'+_0x48f2e)['json'](_0x469971);}return null;};}function patchUpdates(_0x1dd815){return function(_0x37cb76){try{jsonpatch[_0x9622('0x31')](_0x37cb76,_0x1dd815,!![]);}catch(_0x56b224){return BPromise['reject'](_0x56b224);}return _0x37cb76[_0x9622('0x32')]();};}function saveUpdates(_0x385dca,_0x90006a){return function(_0x3bbe8){if(_0x3bbe8){return _0x3bbe8[_0x9622('0x33')](_0x385dca)[_0x9622('0x1d')](function(_0x4955a2){return _0x4955a2;});}return null;};}function removeEntity(_0x378246,_0x41c77f){return function(_0x397241){if(_0x397241){return _0x397241[_0x9622('0x34')]()[_0x9622('0x1d')](function(){var _0x191867=_0x397241[_0x9622('0x35')]({'plain':!![]});var _0x390bab=_0x9622('0x36');return db['UserProfileResource'][_0x9622('0x34')]({'where':{'type':_0x390bab,'resourceId':_0x191867['id']}})['then'](function(){return _0x397241;});})['then'](function(){_0x378246[_0x9622('0x29')](0xcc)[_0x9622('0x2a')]();});}};}function handleEntityNotFound(_0x49d753,_0x33a2ad){return function(_0x1cf00c){if(!_0x1cf00c){_0x49d753[_0x9622('0x28')](0x194);}return _0x1cf00c;};}function handleError(_0x24136d,_0x21aa0b){_0x21aa0b=_0x21aa0b||0x1f4;return function(_0x22bd83){logger['error'](_0x22bd83[_0x9622('0x37')]);if(_0x22bd83[_0x9622('0x38')]){delete _0x22bd83[_0x9622('0x38')];}_0x24136d[_0x9622('0x29')](_0x21aa0b)[_0x9622('0x39')](_0x22bd83);};}exports[_0x9622('0x3a')]=function(_0x26f3b6,_0xc2f628){var _0x5a4d76={'include':[{'model':db[_0x9622('0x3b')],'as':_0x9622('0x3c')}]},_0xcf80b0={},_0x50b6a3={'count':0x0,'rows':[]};var _0x45c81c=_[_0x9622('0x3d')](db[_0x9622('0x3e')]['rawAttributes'],function(_0x617014){return{'name':_0x617014['fieldName'],'type':_0x617014['type']['key']};});_0xcf80b0[_0x9622('0x3f')]=_['map'](_0x45c81c,_0x9622('0x38'));_0xcf80b0[_0x9622('0x40')]=_[_0x9622('0x41')](_0x26f3b6[_0x9622('0x40')]);_0xcf80b0[_0x9622('0x42')]=_[_0x9622('0x43')](_0xcf80b0[_0x9622('0x3f')],_0xcf80b0[_0x9622('0x40')]);_0x5a4d76[_0x9622('0x44')]=_[_0x9622('0x43')](_0xcf80b0[_0x9622('0x3f')],qs[_0x9622('0x45')](_0x26f3b6[_0x9622('0x40')][_0x9622('0x45')]));_0x5a4d76['attributes']=_0x5a4d76[_0x9622('0x44')][_0x9622('0x46')]?_0x5a4d76[_0x9622('0x44')]:_0xcf80b0[_0x9622('0x3f')];if(!_0x26f3b6[_0x9622('0x40')][_0x9622('0x47')](_0x9622('0x48'))){_0x5a4d76[_0x9622('0x2c')]=qs['limit'](_0x26f3b6[_0x9622('0x40')][_0x9622('0x2c')]);_0x5a4d76[_0x9622('0x2b')]=qs[_0x9622('0x2b')](_0x26f3b6[_0x9622('0x40')][_0x9622('0x2b')]);}_0x5a4d76[_0x9622('0x49')]=qs['sort'](_0x26f3b6[_0x9622('0x40')][_0x9622('0x4a')]);_0x5a4d76[_0x9622('0x4b')]=qs[_0x9622('0x42')](_['pick'](_0x26f3b6[_0x9622('0x40')],_0xcf80b0[_0x9622('0x42')]),_0x45c81c);if(_0x26f3b6['query'][_0x9622('0x4c')]){_0x5a4d76[_0x9622('0x4b')]=_['merge'](_0x5a4d76[_0x9622('0x4b')],{'$or':_['map'](_0x45c81c,function(_0x179adf){if(_0x179adf['type']!==_0x9622('0x4d')){var _0x42b539={};_0x42b539[_0x179adf[_0x9622('0x38')]]={'$like':'%'+_0x26f3b6[_0x9622('0x40')][_0x9622('0x4c')]+'%'};return _0x42b539;}})});}_0x5a4d76=_[_0x9622('0x4e')]({},_0x5a4d76,_0x26f3b6[_0x9622('0x4f')]);var _0x164db9={'where':_0x5a4d76[_0x9622('0x4b')]};return db[_0x9622('0x3e')][_0x9622('0x2e')](_0x164db9)['then'](function(_0x3b6cdf){_0x50b6a3[_0x9622('0x2e')]=_0x3b6cdf;if(_0x26f3b6[_0x9622('0x40')][_0x9622('0x50')]){_0x5a4d76[_0x9622('0x51')]=[{'all':!![]}];}return db['FaxAccount']['findAll'](_0x5a4d76);})[_0x9622('0x1d')](function(_0x4270e4){_0x50b6a3[_0x9622('0x52')]=_0x4270e4;return _0x50b6a3;})[_0x9622('0x1d')](respondWithFilteredResult(_0xc2f628,_0x5a4d76))['catch'](handleError(_0xc2f628,null));};exports['show']=function(_0x2cb940,_0x38915a){var _0x209c0b={'raw':![],'where':{'id':_0x2cb940[_0x9622('0x53')]['id']},'include':[{'model':db['Pause'],'as':_0x9622('0x3c')}]},_0x31ef87={};_0x31ef87[_0x9622('0x3f')]=_[_0x9622('0x41')](db[_0x9622('0x3e')][_0x9622('0x54')]);_0x31ef87['query']=_[_0x9622('0x41')](_0x2cb940[_0x9622('0x40')]);_0x31ef87[_0x9622('0x42')]=_[_0x9622('0x43')](_0x31ef87[_0x9622('0x3f')],_0x31ef87[_0x9622('0x40')]);_0x209c0b[_0x9622('0x44')]=_[_0x9622('0x43')](_0x31ef87['model'],qs[_0x9622('0x45')](_0x2cb940[_0x9622('0x40')]['fields']));_0x209c0b[_0x9622('0x44')]=_0x209c0b[_0x9622('0x44')]['length']?_0x209c0b['attributes']:_0x31ef87[_0x9622('0x3f')];if(_0x2cb940[_0x9622('0x40')][_0x9622('0x50')]){_0x209c0b[_0x9622('0x51')]=[{'all':!![]}];}_0x209c0b=_['merge']({},_0x209c0b,_0x2cb940['options']);return db[_0x9622('0x3e')]['find'](_0x209c0b)[_0x9622('0x1d')](handleEntityNotFound(_0x38915a,null))[_0x9622('0x1d')](respondWithResult(_0x38915a,null))[_0x9622('0x27')](handleError(_0x38915a,null));};exports['create']=function(_0x5a65d0,_0x17f6a9){return db[_0x9622('0x3e')][_0x9622('0x55')](_0x5a65d0['body'],{})[_0x9622('0x1d')](function(_0x204b45){var _0x1a23e7=_0x5a65d0[_0x9622('0x56')][_0x9622('0x35')]({'plain':!![]});if(!_0x1a23e7)throw new Error(_0x9622('0x57'));if(_0x1a23e7[_0x9622('0x58')]===_0x9622('0x56')){var _0x198019=_0x204b45[_0x9622('0x35')]({'plain':!![]});var _0xb2fff0=_0x9622('0x36');return db['UserProfileSection'][_0x9622('0x59')]({'where':{'name':_0xb2fff0,'userProfileId':_0x1a23e7[_0x9622('0x5a')]},'raw':!![]})['then'](function(_0x4c1c40){if(_0x4c1c40&&_0x4c1c40[_0x9622('0x5b')]===0x0){return db['UserProfileResource'][_0x9622('0x55')]({'name':_0x198019[_0x9622('0x38')],'resourceId':_0x198019['id'],'type':_0x4c1c40['name'],'sectionId':_0x4c1c40['id']},{})[_0x9622('0x1d')](function(){return _0x204b45;});}else{return _0x204b45;}})[_0x9622('0x27')](function(_0x45f1cf){logger[_0x9622('0x21')](_0x9622('0x5c'),_0x45f1cf);throw _0x45f1cf;});}return _0x204b45;})[_0x9622('0x1d')](respondWithResult(_0x17f6a9,0xc9))['catch'](handleError(_0x17f6a9,null));};exports[_0x9622('0x33')]=function(_0x419fe0,_0x49504e){if(_0x419fe0[_0x9622('0x5d')]['id']){delete _0x419fe0[_0x9622('0x5d')]['id'];}return db['FaxAccount'][_0x9622('0x59')]({'where':{'id':_0x419fe0['params']['id']},'include':[{'model':db[_0x9622('0x3b')],'as':_0x9622('0x3c')}]})[_0x9622('0x1d')](handleEntityNotFound(_0x49504e,null))['then'](saveUpdates(_0x419fe0[_0x9622('0x5d')],null))[_0x9622('0x1d')](respondWithResult(_0x49504e,null))['catch'](handleError(_0x49504e,null));};exports[_0x9622('0x34')]=function(_0x1074d8,_0x5ed18a){return db[_0x9622('0x3e')]['find']({'where':{'id':_0x1074d8['params']['id']}})[_0x9622('0x1d')](handleEntityNotFound(_0x5ed18a,null))[_0x9622('0x1d')](removeEntity(_0x5ed18a,null))[_0x9622('0x27')](handleError(_0x5ed18a,null));};exports[_0x9622('0x5e')]=function(_0x2d2920,_0x4bb841){return db[_0x9622('0x3e')][_0x9622('0x5e')]()[_0x9622('0x1d')](respondWithResult(_0x4bb841,null))[_0x9622('0x27')](handleError(_0x4bb841,null));};exports[_0x9622('0x5f')]=function(_0x45badf,_0x19e5fe,_0xa3054d){if(_0x45badf[_0x9622('0x5d')]['id']){delete _0x45badf['body']['id'];}return db['FaxAccount'][_0x9622('0x59')]({'where':{'id':_0x45badf[_0x9622('0x53')]['id']}})[_0x9622('0x1d')](handleEntityNotFound(_0x19e5fe,null))[_0x9622('0x1d')](function(_0xc35bc8){if(_0xc35bc8){_0x45badf[_0x9622('0x5d')][_0x9622('0x60')]=_0xc35bc8['id'];return db[_0x9622('0x61')][_0x9622('0x55')](_0x45badf['body']);}})[_0x9622('0x1d')](respondWithResult(_0x19e5fe,null))['catch'](handleError(_0x19e5fe,null));};exports[_0x9622('0x62')]=function(_0x4c5f19,_0x3a68c1,_0x69a66d){var _0x2a7ec2={'raw':![],'where':{}};var _0x57143f={};var _0x4367a1={'count':0x0,'rows':[]};return db[_0x9622('0x3e')][_0x9622('0x63')]({'where':{'id':_0x4c5f19[_0x9622('0x53')]['id']}})[_0x9622('0x1d')](handleEntityNotFound(_0x3a68c1,null))[_0x9622('0x1d')](function(_0x4f5391){if(_0x4f5391){_0x57143f[_0x9622('0x3f')]=_[_0x9622('0x41')](db['Disposition'][_0x9622('0x54')]);_0x57143f[_0x9622('0x40')]=_['keys'](_0x4c5f19[_0x9622('0x40')]);_0x57143f[_0x9622('0x42')]=_[_0x9622('0x43')](_0x57143f[_0x9622('0x3f')],_0x57143f[_0x9622('0x40')]);_0x2a7ec2['attributes']=_[_0x9622('0x43')](_0x57143f[_0x9622('0x3f')],qs[_0x9622('0x45')](_0x4c5f19[_0x9622('0x40')][_0x9622('0x45')]));_0x2a7ec2[_0x9622('0x44')]=_0x2a7ec2[_0x9622('0x44')]['length']?_0x2a7ec2['attributes']:_0x57143f['model'];if(!_0x4c5f19[_0x9622('0x40')][_0x9622('0x47')](_0x9622('0x48'))){_0x2a7ec2['limit']=qs[_0x9622('0x2c')](_0x4c5f19[_0x9622('0x40')]['limit']);_0x2a7ec2[_0x9622('0x2b')]=qs['offset'](_0x4c5f19[_0x9622('0x40')][_0x9622('0x2b')]);}_0x2a7ec2[_0x9622('0x49')]=qs[_0x9622('0x4a')](_0x4c5f19['query']['sort']);_0x2a7ec2['where']=qs[_0x9622('0x42')](_[_0x9622('0x64')](_0x4c5f19[_0x9622('0x40')],_0x57143f['filters']));_0x2a7ec2[_0x9622('0x4b')][_0x9622('0x60')]=_0x4f5391['id'];if(_0x4c5f19[_0x9622('0x40')]['filter']){_0x2a7ec2[_0x9622('0x4b')]=_[_0x9622('0x4e')](_0x2a7ec2[_0x9622('0x4b')],{'$or':_[_0x9622('0x3d')](_0x2a7ec2[_0x9622('0x44')],function(_0x4eeb63){var _0x13a6b9={};_0x13a6b9[_0x4eeb63]={'$like':'%'+_0x4c5f19[_0x9622('0x40')][_0x9622('0x4c')]+'%'};return _0x13a6b9;})});}_0x2a7ec2=_[_0x9622('0x4e')]({},_0x2a7ec2,_0x4c5f19[_0x9622('0x4f')]);return db[_0x9622('0x61')][_0x9622('0x2e')]({'where':_0x2a7ec2[_0x9622('0x4b')]})[_0x9622('0x1d')](function(_0x59a0d5){_0x4367a1[_0x9622('0x2e')]=_0x59a0d5;if(_0x4c5f19[_0x9622('0x40')][_0x9622('0x50')]){_0x2a7ec2['include']=[{'all':!![]}];}return db[_0x9622('0x61')][_0x9622('0x65')](_0x2a7ec2);})[_0x9622('0x1d')](function(_0x54ecdc){_0x4367a1['rows']=_0x54ecdc;return _0x4367a1;});}})['then'](respondWithFilteredResult(_0x3a68c1,_0x2a7ec2))[_0x9622('0x27')](handleError(_0x3a68c1,null));};exports[_0x9622('0x66')]=function(_0x122c2d,_0x259009,_0x1edb3e){return db[_0x9622('0x3e')][_0x9622('0x59')]({'where':{'id':_0x122c2d[_0x9622('0x53')]['id']}})[_0x9622('0x1d')](handleEntityNotFound(_0x259009,null))[_0x9622('0x1d')](function(_0x43a63e){if(_0x43a63e){return _0x43a63e[_0x9622('0x66')](_0x122c2d[_0x9622('0x40')]['ids']);}})[_0x9622('0x1d')](respondWithStatusCode(_0x259009,null))[_0x9622('0x27')](handleError(_0x259009,null));};exports[_0x9622('0x67')]=function(_0x307e9d,_0x39dbfd,_0x5981d2){if(_0x307e9d[_0x9622('0x5d')]['id']){delete _0x307e9d[_0x9622('0x5d')]['id'];}return db[_0x9622('0x3e')][_0x9622('0x59')]({'where':{'id':_0x307e9d[_0x9622('0x53')]['id']}})['then'](handleEntityNotFound(_0x39dbfd,null))[_0x9622('0x1d')](function(_0x4f331d){if(_0x4f331d){_0x307e9d[_0x9622('0x5d')][_0x9622('0x60')]=_0x4f331d['id'];return db[_0x9622('0x68')][_0x9622('0x55')](_0x307e9d[_0x9622('0x5d')]);}})['then'](respondWithResult(_0x39dbfd,null))[_0x9622('0x27')](handleError(_0x39dbfd,null));};exports[_0x9622('0x69')]=function(_0x5d7e9c,_0x215cbb,_0x392808){var _0x40520a={'raw':![],'where':{}};var _0x488215={};var _0x34f79c={'count':0x0,'rows':[]};return db[_0x9622('0x3e')][_0x9622('0x63')]({'where':{'id':_0x5d7e9c['params']['id']}})[_0x9622('0x1d')](handleEntityNotFound(_0x215cbb,null))[_0x9622('0x1d')](function(_0x3f3b91){if(_0x3f3b91){_0x488215['model']=_['keys'](db['CannedAnswer'][_0x9622('0x54')]);_0x488215[_0x9622('0x40')]=_['keys'](_0x5d7e9c[_0x9622('0x40')]);_0x488215[_0x9622('0x42')]=_[_0x9622('0x43')](_0x488215[_0x9622('0x3f')],_0x488215[_0x9622('0x40')]);_0x40520a[_0x9622('0x44')]=_[_0x9622('0x43')](_0x488215[_0x9622('0x3f')],qs[_0x9622('0x45')](_0x5d7e9c[_0x9622('0x40')][_0x9622('0x45')]));_0x40520a[_0x9622('0x44')]=_0x40520a[_0x9622('0x44')][_0x9622('0x46')]?_0x40520a[_0x9622('0x44')]:_0x488215[_0x9622('0x3f')];if(!_0x5d7e9c['query'][_0x9622('0x47')]('nolimit')){_0x40520a[_0x9622('0x2c')]=qs['limit'](_0x5d7e9c[_0x9622('0x40')][_0x9622('0x2c')]);_0x40520a[_0x9622('0x2b')]=qs[_0x9622('0x2b')](_0x5d7e9c['query'][_0x9622('0x2b')]);}_0x40520a[_0x9622('0x49')]=qs[_0x9622('0x4a')](_0x5d7e9c['query'][_0x9622('0x4a')]);_0x40520a[_0x9622('0x4b')]=qs[_0x9622('0x42')](_[_0x9622('0x64')](_0x5d7e9c[_0x9622('0x40')],_0x488215[_0x9622('0x42')]));_0x40520a[_0x9622('0x4b')][_0x9622('0x60')]=_0x3f3b91['id'];if(_0x5d7e9c[_0x9622('0x40')][_0x9622('0x4c')]){_0x40520a['where']=_[_0x9622('0x4e')](_0x40520a[_0x9622('0x4b')],{'$or':_['map'](_0x40520a[_0x9622('0x44')],function(_0xf6958c){var _0x428929={};_0x428929[_0xf6958c]={'$like':'%'+_0x5d7e9c[_0x9622('0x40')][_0x9622('0x4c')]+'%'};return _0x428929;})});}_0x40520a=_[_0x9622('0x4e')]({},_0x40520a,_0x5d7e9c[_0x9622('0x4f')]);return db[_0x9622('0x68')]['count']({'where':_0x40520a[_0x9622('0x4b')]})[_0x9622('0x1d')](function(_0x480f3e){_0x34f79c[_0x9622('0x2e')]=_0x480f3e;if(_0x5d7e9c[_0x9622('0x40')]['includeAll']){_0x40520a[_0x9622('0x51')]=[{'all':!![]}];}return db['CannedAnswer'][_0x9622('0x65')](_0x40520a);})[_0x9622('0x1d')](function(_0x203f65){_0x34f79c[_0x9622('0x52')]=_0x203f65;return _0x34f79c;});}})[_0x9622('0x1d')](respondWithFilteredResult(_0x215cbb,_0x40520a))[_0x9622('0x27')](handleError(_0x215cbb,null));};exports[_0x9622('0x6a')]=function(_0x42ee1f,_0xf3b7d9,_0x563632){return db[_0x9622('0x3e')]['find']({'where':{'id':_0x42ee1f[_0x9622('0x53')]['id']}})[_0x9622('0x1d')](handleEntityNotFound(_0xf3b7d9,null))[_0x9622('0x1d')](function(_0x158f6b){if(_0x158f6b){return _0x158f6b['removeAnswers'](_0x42ee1f['query']['ids']);}})['then'](respondWithStatusCode(_0xf3b7d9,null))['catch'](handleError(_0xf3b7d9,null));};exports[_0x9622('0x6b')]=function(_0x1e7909,_0x524bcc,_0x5a12ae){return db[_0x9622('0x6c')][_0x9622('0x59')]({'where':{'id':_0x1e7909[_0x9622('0x53')]['id']}})[_0x9622('0x1d')](handleEntityNotFound(_0x524bcc,null))[_0x9622('0x1d')](function(_0x18606a){if(_0x18606a){return _0x18606a[_0x9622('0x6b')](_0x1e7909[_0x9622('0x5d')][_0x9622('0x6d')],_[_0x9622('0x6e')](_0x1e7909['body'],[_0x9622('0x6d'),'id'])||{});}})[_0x9622('0x1d')](respondWithResult(_0x524bcc,null))[_0x9622('0x27')](handleError(_0x524bcc,null));};exports['getInteractions']=function(_0x4702f6,_0x38e7c4,_0x881b2a){var _0x38a8f6={'raw':![],'where':{}};var _0x3098cb={};var _0xe45640={'count':0x0,'rows':[]};return db['FaxAccount'][_0x9622('0x63')]({'where':{'id':_0x4702f6[_0x9622('0x53')]['id']}})[_0x9622('0x1d')](handleEntityNotFound(_0x38e7c4,null))[_0x9622('0x1d')](function(_0x48d338){if(_0x48d338){_0x3098cb[_0x9622('0x3f')]=_[_0x9622('0x41')](db[_0x9622('0x6c')][_0x9622('0x54')]);_0x3098cb[_0x9622('0x40')]=_[_0x9622('0x41')](_0x4702f6[_0x9622('0x40')]);_0x3098cb['filters']=_[_0x9622('0x43')](_0x3098cb['model'],_0x3098cb[_0x9622('0x40')]);_0x38a8f6[_0x9622('0x44')]=_['intersection'](_0x3098cb[_0x9622('0x3f')],qs[_0x9622('0x45')](_0x4702f6[_0x9622('0x40')][_0x9622('0x45')]));_0x38a8f6[_0x9622('0x44')]=_0x38a8f6[_0x9622('0x44')][_0x9622('0x46')]?_0x38a8f6['attributes']:_0x3098cb[_0x9622('0x3f')];if(!_0x4702f6['query'][_0x9622('0x47')](_0x9622('0x48'))){_0x38a8f6[_0x9622('0x2c')]=qs[_0x9622('0x2c')](_0x4702f6[_0x9622('0x40')]['limit']);_0x38a8f6[_0x9622('0x2b')]=qs[_0x9622('0x2b')](_0x4702f6['query'][_0x9622('0x2b')]);}_0x38a8f6[_0x9622('0x49')]=qs['sort'](_0x4702f6[_0x9622('0x40')][_0x9622('0x4a')]);_0x38a8f6[_0x9622('0x4b')]=qs[_0x9622('0x42')](_[_0x9622('0x64')](_0x4702f6[_0x9622('0x40')],_0x3098cb[_0x9622('0x42')]));_0x38a8f6['where']['FaxAccountId']=_0x48d338['id'];if(_0x4702f6['query']['filter']){_0x38a8f6[_0x9622('0x4b')]=_[_0x9622('0x4e')](_0x38a8f6['where'],{'$or':_[_0x9622('0x3d')](_0x38a8f6[_0x9622('0x44')],function(_0x27d47b){var _0xffa80e={};_0xffa80e[_0x27d47b]={'$like':'%'+_0x4702f6[_0x9622('0x40')][_0x9622('0x4c')]+'%'};return _0xffa80e;})});}_0x38a8f6=_[_0x9622('0x4e')]({},_0x38a8f6,_0x4702f6[_0x9622('0x4f')]);return db['FaxInteraction'][_0x9622('0x2e')]({'where':_0x38a8f6['where']})['then'](function(_0x3c4862){_0xe45640[_0x9622('0x2e')]=_0x3c4862;if(_0x4702f6[_0x9622('0x40')][_0x9622('0x50')]){_0x38a8f6[_0x9622('0x51')]=[{'model':db[_0x9622('0x6f')],'as':_0x9622('0x70'),'required':![]},{'model':db[_0x9622('0x71')],'as':_0x9622('0x72'),'attributes':[_0x9622('0x38'),_0x9622('0x73'),_0x9622('0x74')],'required':![]},{'model':db[_0x9622('0x75')],'as':_0x9622('0x76'),'attributes':['id','name',_0x9622('0x77')],'where':_0x4702f6['query'][_0x9622('0x78')]?{'id':_0x4702f6['query'][_0x9622('0x78')]}:undefined,'required':_0x4702f6['query'][_0x9622('0x78')]?!![]:![]}];}return db[_0x9622('0x6c')]['findAll'](_0x38a8f6);})[_0x9622('0x1d')](function(_0xff29ec){_0xe45640[_0x9622('0x52')]=_0xff29ec;return _0xe45640;});}})[_0x9622('0x1d')](respondWithFilteredResult(_0x38e7c4,_0x38a8f6))[_0x9622('0x27')](handleError(_0x38e7c4,null));};exports[_0x9622('0x79')]=function(_0x42301b,_0x2890ba){var _0x41776a=_0x42301b[_0x9622('0x53')]['id'];var _0x352487=_0x42301b['body'];var _0x2861cd=0xc8;var _0x27d6c4=null;return db['sequelize'][_0x9622('0x7a')]({'isolationLevel':db['sequelize']['Transaction'][_0x9622('0x7b')][_0x9622('0x7c')]},function(_0x48854a){return db[_0x9622('0x3e')][_0x9622('0x63')]({'where':{'id':_0x41776a},'transaction':_0x48854a})[_0x9622('0x1d')](function(_0xd69111){if(_0xd69111){return db[_0x9622('0x7d')]['destroy']({'where':{'FaxAccountId':_0x41776a},'transaction':_0x48854a})['then'](function(){var _0x85db3f=_[_0x9622('0x3d')](_0x352487,function(_0xccf68){_0xccf68[_0x9622('0x60')]=_0x41776a;return _0xccf68;});return db[_0x9622('0x7d')][_0x9622('0x7e')](_0x85db3f,{'transaction':_0x48854a});});}else{_0x2861cd=0x194;_0x27d6c4=[];}});})[_0x9622('0x1d')](function(){if(_0x2861cd!==0x194){return db[_0x9622('0x7d')][_0x9622('0x7f')]({'where':{'FaxAccountId':_0x41776a},'order':'priority'})['then'](function(_0xb34b68){_0x27d6c4=_0xb34b68;});}})[_0x9622('0x27')](function(_0x1d4438){_0x2861cd=0x1f4;logger['error'](_0x1d4438['stack']);if(_0x1d4438[_0x9622('0x38')]){delete _0x1d4438[_0x9622('0x38')];}_0x27d6c4=_0x1d4438;})[_0x9622('0x80')](function(){if(_0x27d6c4===null){_0x2890ba[_0x9622('0x28')](_0x2861cd);}else{if(_0x2861cd===0x1f4){_0x2890ba[_0x9622('0x29')](_0x2861cd)['send'](_0x27d6c4);}else{_0x2890ba[_0x9622('0x29')](_0x2861cd)['json'](_0x27d6c4);}}});};exports['getApplications']=function(_0x2dd915,_0x196b6a,_0xd0cf1c){var _0x5c77cd={};var _0x5cdfc3={};var _0x45464c;var _0xbc8947;return db[_0x9622('0x3e')][_0x9622('0x63')]({'where':{'id':_0x2dd915['params']['id']}})[_0x9622('0x1d')](handleEntityNotFound(_0x196b6a,null))[_0x9622('0x1d')](function(_0x3f433a){if(_0x3f433a){_0x45464c=_0x3f433a;_0x5cdfc3['model']=_[_0x9622('0x41')](db[_0x9622('0x7d')][_0x9622('0x54')]);_0x5cdfc3[_0x9622('0x40')]=_[_0x9622('0x41')](_0x2dd915[_0x9622('0x40')]);_0x5cdfc3[_0x9622('0x42')]=_[_0x9622('0x43')](_0x5cdfc3[_0x9622('0x3f')],_0x5cdfc3[_0x9622('0x40')]);_0x5c77cd[_0x9622('0x44')]=_['intersection'](_0x5cdfc3['model'],qs[_0x9622('0x45')](_0x2dd915['query'][_0x9622('0x45')]));_0x5c77cd[_0x9622('0x44')]=_0x5c77cd[_0x9622('0x44')]['length']?_0x5c77cd[_0x9622('0x44')]:_0x5cdfc3['model'];_0x5c77cd[_0x9622('0x49')]=qs[_0x9622('0x4a')](_0x2dd915['query'][_0x9622('0x4a')]);_0x5c77cd[_0x9622('0x4b')]=qs[_0x9622('0x42')](_[_0x9622('0x64')](_0x2dd915[_0x9622('0x40')],_0x5cdfc3[_0x9622('0x42')]));if(_0x2dd915['query'][_0x9622('0x4c')]){_0x5c77cd[_0x9622('0x4b')]=_[_0x9622('0x4e')](_0x5c77cd['where'],{'$or':_[_0x9622('0x3d')](_0x5c77cd['attributes'],function(_0xaacbb7){var _0x20674a={};_0x20674a[_0xaacbb7]={'$like':'%'+_0x2dd915[_0x9622('0x40')][_0x9622('0x4c')]+'%'};return _0x20674a;})});}_0x5c77cd=_[_0x9622('0x4e')]({},_0x5c77cd,_0x2dd915[_0x9622('0x4f')]);return _0x45464c[_0x9622('0x81')](_0x5c77cd);}})[_0x9622('0x1d')](function(_0xb0ddc1){if(_0xb0ddc1){_0xbc8947=_0xb0ddc1[_0x9622('0x46')];if(!_0x2dd915[_0x9622('0x40')][_0x9622('0x47')]('nolimit')){_0x5c77cd[_0x9622('0x2c')]=qs[_0x9622('0x2c')](_0x2dd915['query'][_0x9622('0x2c')]);_0x5c77cd['offset']=qs[_0x9622('0x2b')](_0x2dd915[_0x9622('0x40')][_0x9622('0x2b')]);}return _0x45464c[_0x9622('0x81')](_0x5c77cd);}})[_0x9622('0x1d')](function(_0x223082){if(_0x223082){return _0x223082?{'count':_0xbc8947,'rows':_0x223082}:null;}})['then'](respondWithResult(_0x196b6a,null))['catch'](handleError(_0x196b6a,null));};function Extension(_0x34c1dd,_0x41d674,_0x13f415,_0x3d739f){this[_0x9622('0x82')]='from-voip-provider';this[_0x9622('0x83')]=_0x34c1dd[_0x9622('0x84')];this[_0x9622('0x85')]=_0x3d739f;this[_0x9622('0x86')]=_0x9622('0x87');this[_0x9622('0x88')]='Fax\x20Extension';this['FaxAccountId']=_0x34c1dd['id'];this[_0x9622('0x89')]=_0x41d674;this[_0x9622('0x8a')]=_0x13f415;}function createExtensionsReciveFax(_0x5db38d){var _0x401044=0x1;var _0x588409=[];_0x588409[_0x9622('0x8b')](new Extension(_0x5db38d,_0x401044,'',_0x9622('0x8c')));_0x401044+=0x1;_0x588409[_0x9622('0x8b')](new Extension(_0x5db38d,_0x401044,_0x9622('0x8d'),_0x9622('0x8e')));_0x401044+=0x1;for(var _0xacaa0d in _0x5db38d){if(_0x5db38d[_0x9622('0x47')](_0xacaa0d)&&(_0xacaa0d===_0x9622('0x8f')||_0xacaa0d===_0x9622('0x84')||_0xacaa0d===_0x9622('0x90')||_0xacaa0d===_0x9622('0x91')||_0xacaa0d===_0x9622('0x92')||_0xacaa0d===_0x9622('0x93')||_0xacaa0d===_0x9622('0x94')||_0xacaa0d==='modem'||_0xacaa0d===_0x9622('0x95'))){_0x588409[_0x9622('0x8b')](new Extension(_0x5db38d,_0x401044,_0x9622('0x96')+_0xacaa0d+')='+_0x5db38d[_0xacaa0d],_0x9622('0x8e')));_0x401044+=0x1;}}_0x588409[_0x9622('0x8b')](new Extension(_0x5db38d,_0x401044,'6','Wait'));_0x401044+=0x1;_0x588409[_0x9622('0x8b')](new Extension(_0x5db38d,_0x401044,_0x9622('0x97'),_0x9622('0x98')));_0x401044=0x0;return _0x588409;}exports['addAccountApplications']=function(_0x3e370d,_0x5bfa86,_0x3b4223){var _0x3a8779;return db[_0x9622('0x99')][_0x9622('0x7a')](function(_0x3bbfb1){return db[_0x9622('0x3e')][_0x9622('0x55')](_0x3e370d[_0x9622('0x5d')],{'transaction':_0x3bbfb1})[_0x9622('0x1d')](function(_0x500c44){_0x3a8779=_0x500c44[_0x9622('0x35')]({'plain':!![]});return db['VoiceExtension'][_0x9622('0x7e')](createExtensionsReciveFax(_0x3a8779),{'transaction':_0x3bbfb1});});})[_0x9622('0x1d')](function(){return _0x3a8779;})[_0x9622('0x1d')](respondWithResult(_0x5bfa86,null))[_0x9622('0x27')](handleError(_0x5bfa86,null));};exports[_0x9622('0x9a')]=function(_0x4d7834,_0x37540f,_0x3b5f69){var _0x13e993;return db['sequelize'][_0x9622('0x7a')](function(_0x57b8f2){return db[_0x9622('0x3e')][_0x9622('0x33')](_0x4d7834[_0x9622('0x5d')],{'where':{'id':_0x4d7834['body']['id']},'transaction':_0x57b8f2})[_0x9622('0x1d')](function(_0x144341){return db[_0x9622('0x9b')][_0x9622('0x34')]({'where':{'FaxAccountId':_0x4d7834[_0x9622('0x5d')]['id']},'transaction':_0x57b8f2})[_0x9622('0x1d')](function(_0x51c967){return db[_0x9622('0x9b')][_0x9622('0x7e')](createExtensionsReciveFax(_[_0x9622('0x6e')](_0x4d7834[_0x9622('0x5d')],[_0x9622('0x9c'),_0x9622('0x9d'),_0x9622('0x9e'),'updatedAt',_0x9622('0x9f'),_0x9622('0xa0')])),{'transaction':_0x57b8f2});});});})[_0x9622('0x1d')](function(){return db[_0x9622('0x3e')][_0x9622('0xa1')](_0x4d7834[_0x9622('0x5d')]['id']);})[_0x9622('0x1d')](respondWithResult(_0x37540f,null))[_0x9622('0x27')](handleError(_0x37540f,null));};exports[_0x9622('0xa2')]=function(_0x35d7e3,_0x41184d,_0x1dc32f){var _0x405b0e={'raw':!![],'where':{}};var _0x3011d6={};var _0x1c24cb={'count':0x0,'rows':[]};return db[_0x9622('0x3e')][_0x9622('0x63')]({'where':{'id':_0x35d7e3['params']['id']}})[_0x9622('0x1d')](handleEntityNotFound(_0x41184d,null))['then'](function(_0x546371){if(_0x546371){_0x3011d6[_0x9622('0x3f')]=_[_0x9622('0x41')](db[_0x9622('0xa3')][_0x9622('0x54')]);_0x3011d6['query']=_[_0x9622('0x41')](_0x35d7e3['query']);_0x3011d6[_0x9622('0x42')]=_['intersection'](_0x3011d6[_0x9622('0x3f')],_0x3011d6['query']);_0x405b0e[_0x9622('0x44')]=_[_0x9622('0x43')](_0x3011d6[_0x9622('0x3f')],qs[_0x9622('0x45')](_0x35d7e3['query'][_0x9622('0x45')]));_0x405b0e[_0x9622('0x44')]=_0x405b0e[_0x9622('0x44')][_0x9622('0x46')]?_0x405b0e[_0x9622('0x44')]:_0x3011d6[_0x9622('0x3f')];if(!_0x35d7e3[_0x9622('0x40')][_0x9622('0x47')](_0x9622('0x48'))){_0x405b0e[_0x9622('0x2c')]=qs[_0x9622('0x2c')](_0x35d7e3[_0x9622('0x40')][_0x9622('0x2c')]);_0x405b0e[_0x9622('0x2b')]=qs[_0x9622('0x2b')](_0x35d7e3[_0x9622('0x40')][_0x9622('0x2b')]);}_0x405b0e[_0x9622('0x49')]=qs[_0x9622('0x4a')](_0x35d7e3[_0x9622('0x40')][_0x9622('0x4a')]);_0x405b0e['where']=qs[_0x9622('0x42')](_[_0x9622('0x64')](_0x35d7e3['query'],_0x3011d6[_0x9622('0x42')]));_0x405b0e['where'][_0x9622('0x60')]=_0x546371['id'];if(_0x35d7e3[_0x9622('0x40')][_0x9622('0x4c')]){_0x405b0e['where']=_[_0x9622('0x4e')](_0x405b0e[_0x9622('0x4b')],{'$or':_[_0x9622('0x3d')](_0x405b0e[_0x9622('0x44')],function(_0x23a4b4){var _0x381a84={};_0x381a84[_0x23a4b4]={'$like':'%'+_0x35d7e3['query'][_0x9622('0x4c')]+'%'};return _0x381a84;})});}if(_0x35d7e3[_0x9622('0x40')][_0x9622('0xa4')]){var _0x4c5015=_0x35d7e3[_0x9622('0x40')]['$gte']['split'](',');var _0x150ad1={};_0x150ad1[_0x4c5015[0x0]]={'$gte':moment(_0x4c5015[0x1])[_0x9622('0xa5')](_0x9622('0xa6'))};_0x405b0e[_0x9622('0x4b')]=_[_0x9622('0x4e')](_0x405b0e['where'],_0x150ad1);}_0x405b0e=_['merge']({},_0x405b0e,_0x35d7e3['options']);return db['FaxMessage'][_0x9622('0x2e')]({'where':_0x405b0e[_0x9622('0x4b')]})[_0x9622('0x1d')](function(_0x47ba5a){_0x1c24cb['count']=_0x47ba5a;if(_0x35d7e3[_0x9622('0x40')]['includeAll']){_0x405b0e[_0x9622('0x51')]=[{'all':!![]}];}return db[_0x9622('0xa3')]['findAll'](_0x405b0e);})['then'](function(_0x345192){_0x1c24cb[_0x9622('0x52')]=_0x345192;return _0x1c24cb;});}})['then'](respondWithFilteredResult(_0x41184d,_0x405b0e))['catch'](handleError(_0x41184d,null));};exports['send']=function(_0x2ba6b5,_0x248677,_0x241f40){var _0x46c6f2,_0x2985fb={},_0x1932b4;if(_0x2ba6b5[_0x9622('0x5d')]['to']){_0x1932b4=_0x2ba6b5['body']['to'][0x0];}return db['FaxAccount']['find']({'where':{'id':_0x2ba6b5[_0x9622('0x53')]['id']},'include':[{'model':db[_0x9622('0xa7')],'as':_0x9622('0xa8'),'include':[{'model':db[_0x9622('0x6f')],'as':_0x9622('0xa9'),'where':{'fax':_0x1932b4},'limit':0x1,'order':[[_0x9622('0xaa'),_0x9622('0xab')]]}]}]})[_0x9622('0x1d')](handleEntityNotFound(_0x248677,null))[_0x9622('0x1d')](function(_0x2b93a0){_0x46c6f2=_0x2b93a0;if(_0x2ba6b5['body'][_0x9622('0xac')]&&_0x2ba6b5['body'][_0x9622('0xac')][_0x9622('0x46')]){for(var _0x2aff28=0x0;_0x2aff28<_0x2ba6b5[_0x9622('0x5d')]['attachments'][_0x9622('0x46')];_0x2aff28+=0x1){_0x2ba6b5[_0x9622('0x5d')][_0x9622('0xac')][_0x2aff28]={'filename':_0x2ba6b5['body'][_0x9622('0xac')][_0x2aff28][_0x9622('0x38')],'id':_0x2ba6b5[_0x9622('0x5d')]['attachments'][_0x2aff28]['id'],'path':path[_0x9622('0xad')](config[_0x9622('0xae')],_0x9622('0xaf'),_0x2ba6b5[_0x9622('0x5d')][_0x9622('0xac')][_0x2aff28]['basename'])};}}return respondWithRpcPromise(_0x9622('0xb0'),_0x9622('0xb0'),{'FaxAccountId':_[_0x9622('0xb1')](_0x2ba6b5[_0x9622('0x53')]['id'])?undefined:_0x2ba6b5[_0x9622('0x53')]['id'],'path':_['isNil'](_0x2ba6b5[_0x9622('0x5d')][_0x9622('0xac')][0x0]['path'])?undefined:_0x2ba6b5[_0x9622('0x5d')][_0x9622('0xac')][0x0][_0x9622('0x3')],'fax':_[_0x9622('0xb1')](_0x2ba6b5[_0x9622('0x5d')]['to'][0x0])?undefined:_0x2ba6b5[_0x9622('0x5d')]['to'][0x0]},client9002);})[_0x9622('0x1d')](function(){if(_0x46c6f2){if(_[_0x9622('0xb1')](_0x2ba6b5[_0x9622('0x5d')]['from'])){_0x2ba6b5['body'][_0x9622('0xb2')]=util[_0x9622('0xa5')](_0x9622('0xb3'),_0x46c6f2['name'],_0x46c6f2[_0x9622('0xb4')]);}if(_0x46c6f2[_0x9622('0xa8')]){if(_0x46c6f2[_0x9622('0xa8')]['Contacts'][_0x9622('0x46')]){return _0x46c6f2[_0x9622('0xa8')][_0x9622('0xa9')][0x0];}else{return db['CmContact'][_0x9622('0x55')](_[_0x9622('0xb5')](_0x2ba6b5[_0x9622('0x5d')],{'firstName':_0x2ba6b5[_0x9622('0x5d')]['to'][0x0],'phone':_0x2ba6b5[_0x9622('0x5d')]['to'][0x0],'fax':_0x2ba6b5[_0x9622('0x5d')]['to'][0x0],'ListId':_0x46c6f2[_0x9622('0xa0')]}));}}else{throw new Error('List\x20not\x20found');}}else{throw new Error(_0x9622('0xb6'));}})['then'](function(_0x4460ac){if(_0x4460ac){return db['FaxInteraction'][_0x9622('0x59')]({'where':{'ContactId':_0x4460ac['id'],'closed':![],'FaxAccountId':_0x46c6f2['id']}})[_0x9622('0x1d')](function(_0x50dbb8){if(_0x50dbb8){return[_0x50dbb8,![]];}return db[_0x9622('0x6c')][_0x9622('0x55')]({'UserId':_0x2ba6b5['user']['id'],'ContactId':_0x4460ac['id'],'FaxAccountId':_0x46c6f2['id'],'fax':_0x2ba6b5['body']['to'][0x0],'firstMsgDirection':_0x9622('0xb7'),'Messages':[_[_0x9622('0x4e')](_0x2ba6b5[_0x9622('0x5d')],{'read':![],'body':_0x2ba6b5['body']['attachments'][0x0]['filename'],'FaxAccountId':_0x46c6f2['id'],'UserId':_0x2ba6b5[_0x9622('0x56')]['id'],'ContactId':_0x4460ac['id'],'AttachmentId':_0x2ba6b5[_0x9622('0x5d')][_0x9622('0xac')][0x0]['id']})]},{'include':[{'model':db[_0x9622('0xa3')],'as':_0x9622('0xb8')}]})[_0x9622('0x1d')](function(_0x1533f5){return[_0x1533f5,!![]];});});}else{throw new Error(_0x9622('0xb9'));}})[_0x9622('0xba')](function(_0x54d449,_0xff8643){if(_0xff8643){return _0x54d449;}return db[_0x9622('0xa3')][_0x9622('0x55')]({'direction':_0x9622('0xb7'),'read':![],'body':_0x2ba6b5[_0x9622('0x5d')][_0x9622('0xac')][0x0][_0x9622('0xbb')],'FaxAccountId':_0x46c6f2['id'],'FaxInteractionId':_0x54d449['id'],'UserId':_0x2ba6b5[_0x9622('0x56')]['id'],'ContactId':_0x54d449[_0x9622('0xbc')],'AttachmentId':_0x2ba6b5[_0x9622('0x5d')][_0x9622('0xac')][0x0]['id']})['then'](function(_0x4682ed){_0x54d449[_0x9622('0xbd')][_0x9622('0xb8')]=[];_0x54d449[_0x9622('0xbd')][_0x9622('0xb8')][_0x9622('0x8b')](_0x4682ed[_0x9622('0xbd')]);return _0x54d449;});})[_0x9622('0x1d')](function(_0x4d099b){respondWithRpcPromise(_0x9622('0xbe'),_0x9622('0xbe'),{'FaxAccountId':_[_0x9622('0xb1')](_0x2ba6b5[_0x9622('0x53')]['id'])?undefined:_0x2ba6b5['params']['id'],'path':_['isNil'](_0x2ba6b5['body']['attachments'][0x0][_0x9622('0x3')])?undefined:_0x2ba6b5[_0x9622('0x5d')]['attachments'][0x0]['path'],'fax':_[_0x9622('0xb1')](_0x2ba6b5[_0x9622('0x5d')]['to'][0x0])?undefined:_0x2ba6b5[_0x9622('0x5d')]['to'][0x0],'AttachmentId':_0x2ba6b5['body'][_0x9622('0xac')][0x0]['id']},client9002)[_0x9622('0x1d')](function(_0x5af2c8){logger[_0x9622('0x25')](_0x9622('0xbf'),_0x5af2c8);})['catch'](function(_0x326040){logger[_0x9622('0x25')]('SendFaxRpc,\x20%s',_0x326040);});return _0x4d099b;})[_0x9622('0x1d')](respondWithResult(_0x248677,null))[_0x9622('0x27')](handleError(_0x248677,null));};exports[_0x9622('0xc0')]=function(_0x1bd331,_0x5912a2,_0x115a94){return db[_0x9622('0x3e')][_0x9622('0x59')]({'where':{'id':_0x1bd331[_0x9622('0x53')]['id']}})[_0x9622('0x1d')](handleEntityNotFound(_0x5912a2,null))[_0x9622('0x1d')](function(_0x4b098b){if(_0x4b098b){return _0x4b098b['addAgents'](_0x1bd331[_0x9622('0x5d')][_0x9622('0x6d')],_[_0x9622('0x6e')](_0x1bd331[_0x9622('0x5d')],['ids','id'])||{})[_0x9622('0xba')](function(_0x298c13){for(var _0x2157e2=0x0;_0x2157e2<_0x1bd331[_0x9622('0x5d')][_0x9622('0x6d')]['length'];_0x2157e2+=0x1){socket[_0x9622('0xc1')](_0x9622('0xc2'),{'UserId':Number(_0x1bd331[_0x9622('0x5d')][_0x9622('0x6d')][_0x2157e2]),'FaxAccountId':Number(_0x1bd331[_0x9622('0x53')]['id'])});}return _0x298c13;});}})['then'](respondWithResult(_0x5912a2,null))[_0x9622('0x27')](handleError(_0x5912a2,null));};exports[_0x9622('0xc3')]=function(_0x396225,_0x35ac0e,_0x16df2f){return db[_0x9622('0x3e')][_0x9622('0x59')]({'where':{'id':_0x396225[_0x9622('0x53')]['id']}})['then'](handleEntityNotFound(_0x35ac0e,null))[_0x9622('0x1d')](function(_0x39911f){if(_0x39911f){return _0x39911f[_0x9622('0xc3')](_0x396225[_0x9622('0x40')][_0x9622('0x6d')])[_0x9622('0x1d')](function(){if(_[_0x9622('0xc4')](_0x396225[_0x9622('0x40')][_0x9622('0x6d')])){for(var _0x28b9eb=0x0;_0x28b9eb<_0x396225[_0x9622('0x40')][_0x9622('0x6d')]['length'];_0x28b9eb+=0x1){socket[_0x9622('0xc1')](_0x9622('0xc5'),{'UserId':Number(_0x396225[_0x9622('0x40')][_0x9622('0x6d')][_0x28b9eb]),'FaxAccountId':Number(_0x396225['params']['id'])});}}else{socket[_0x9622('0xc1')]('userFaxAccount:remove',{'UserId':Number(_0x396225[_0x9622('0x40')][_0x9622('0x6d')]),'FaxAccountId':Number(_0x396225['params']['id'])});}});}})['then'](respondWithStatusCode(_0x35ac0e,null))[_0x9622('0x27')](handleError(_0x35ac0e,null));};exports[_0x9622('0xc6')]=function(_0x549152,_0x629929,_0x4b16e8){var _0x147ff3={};var _0x5bd3f6={};var _0x56cdee;var _0x27a3b5;return db[_0x9622('0x3e')]['findOne']({'where':{'id':_0x549152['params']['id']}})['then'](handleEntityNotFound(_0x629929,null))['then'](function(_0x5d5947){if(_0x5d5947){_0x56cdee=_0x5d5947;_0x5bd3f6[_0x9622('0x3f')]=_[_0x9622('0x41')](db[_0x9622('0x71')][_0x9622('0x54')]);_0x5bd3f6[_0x9622('0x40')]=_['keys'](_0x549152['query']);_0x5bd3f6[_0x9622('0x42')]=_['intersection'](_0x5bd3f6[_0x9622('0x3f')],_0x5bd3f6[_0x9622('0x40')]);_0x147ff3[_0x9622('0x44')]=_['intersection'](_0x5bd3f6[_0x9622('0x3f')],qs['fields'](_0x549152['query']['fields']));_0x147ff3[_0x9622('0x44')]=_0x147ff3[_0x9622('0x44')]['length']?_0x147ff3[_0x9622('0x44')]:_0x5bd3f6[_0x9622('0x3f')];_0x147ff3['order']=qs[_0x9622('0x4a')](_0x549152[_0x9622('0x40')]['sort']);_0x147ff3[_0x9622('0x4b')]=qs['filters'](_[_0x9622('0x64')](_0x549152[_0x9622('0x40')],_0x5bd3f6[_0x9622('0x42')]));if(_0x549152[_0x9622('0x40')]['filter']){_0x147ff3[_0x9622('0x4b')]=_[_0x9622('0x4e')](_0x147ff3['where'],{'$or':_[_0x9622('0x3d')](_0x147ff3[_0x9622('0x44')],function(_0x515974){var _0x48cf9c={};_0x48cf9c[_0x515974]={'$like':'%'+_0x549152[_0x9622('0x40')][_0x9622('0x4c')]+'%'};return _0x48cf9c;})});}_0x147ff3=_[_0x9622('0x4e')]({},_0x147ff3,_0x549152['options']);return _0x56cdee[_0x9622('0xc6')](_0x147ff3);}})[_0x9622('0x1d')](function(_0x1f8154){if(_0x1f8154){_0x27a3b5=_0x1f8154['length'];if(!_0x549152[_0x9622('0x40')][_0x9622('0x47')]('nolimit')){_0x147ff3[_0x9622('0x2c')]=qs[_0x9622('0x2c')](_0x549152[_0x9622('0x40')][_0x9622('0x2c')]);_0x147ff3[_0x9622('0x2b')]=qs[_0x9622('0x2b')](_0x549152[_0x9622('0x40')]['offset']);}return _0x56cdee['getAgents'](_0x147ff3);}})['then'](function(_0x4a57f6){if(_0x4a57f6){return _0x4a57f6?{'count':_0x27a3b5,'rows':_0x4a57f6}:null;}})[_0x9622('0x1d')](respondWithResult(_0x629929,null))['catch'](handleError(_0x629929,null));};
\ No newline at end of file
index 04f8636..047ed2a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbded=['hasOwnProperty','hook','exports','events','FaxAccount','setMaxListeners','save','update','remove','emit'];(function(_0x414032,_0x3d8384){var _0x2fb672=function(_0x43d52b){while(--_0x43d52b){_0x414032['push'](_0x414032['shift']());}};_0x2fb672(++_0x3d8384);}(_0xbded,0x1c5));var _0xdbde=function(_0x520926,_0x13c788){_0x520926=_0x520926-0x0;var _0x3f19d7=_0xbded[_0x520926];return _0x3f19d7;};'use strict';var EventEmitter=require(_0xdbde('0x0'));var FaxAccount=require('../../mysqldb')['db'][_0xdbde('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents[_0xdbde('0x2')](0x0);var events={'afterCreate':_0xdbde('0x3'),'afterUpdate':_0xdbde('0x4'),'afterDestroy':_0xdbde('0x5')};function emitEvent(_0x201871){return function(_0x59e4d4,_0x174c0a,_0x507c5f){FaxAccountEvents[_0xdbde('0x6')](_0x201871+':'+_0x59e4d4['id'],_0x59e4d4);FaxAccountEvents[_0xdbde('0x6')](_0x201871,_0x59e4d4);_0x507c5f(null);};}for(var e in events){if(events[_0xdbde('0x7')](e)){var event=events[e];FaxAccount[_0xdbde('0x8')](e,emitEvent(event));}}module[_0xdbde('0x9')]=FaxAccountEvents;
\ No newline at end of file
+var _0x9648=['remove','emit','hasOwnProperty','hook','events','FaxAccount','save','update'];(function(_0x582ec1,_0x1867d1){var _0x2695fa=function(_0xac5620){while(--_0xac5620){_0x582ec1['push'](_0x582ec1['shift']());}};_0x2695fa(++_0x1867d1);}(_0x9648,0xa4));var _0x8964=function(_0x234c03,_0x46ea53){_0x234c03=_0x234c03-0x0;var _0x2990fc=_0x9648[_0x234c03];return _0x2990fc;};'use strict';var EventEmitter=require(_0x8964('0x0'));var FaxAccount=require('../../mysqldb')['db'][_0x8964('0x1')];var FaxAccountEvents=new EventEmitter();FaxAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x8964('0x2'),'afterUpdate':_0x8964('0x3'),'afterDestroy':_0x8964('0x4')};function emitEvent(_0x3c207d){return function(_0x577fd5,_0x3077af,_0x1ad783){FaxAccountEvents[_0x8964('0x5')](_0x3c207d+':'+_0x577fd5['id'],_0x577fd5);FaxAccountEvents[_0x8964('0x5')](_0x3c207d,_0x577fd5);_0x1ad783(null);};}for(var e in events){if(events[_0x8964('0x6')](e)){var event=events[e];FaxAccount[_0x8964('0x7')](e,emitEvent(event));}}module['exports']=FaxAccountEvents;
\ No newline at end of file
index b750475..2f8fb9b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0adc=['FaxAccount','fax_accounts','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./faxAccount.attributes','exports','define'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0adc,0x101));var _0xc0ad=function(_0x12e455,_0x581732){_0x12e455=_0x12e455-0x0;var _0x5d5ce7=_0x0adc[_0x12e455];return _0x5d5ce7;};'use strict';var _=require(_0xc0ad('0x0'));var util=require(_0xc0ad('0x1'));var logger=require(_0xc0ad('0x2'))(_0xc0ad('0x3'));var moment=require(_0xc0ad('0x4'));var BPromise=require(_0xc0ad('0x5'));var rp=require(_0xc0ad('0x6'));var fs=require('fs');var path=require(_0xc0ad('0x7'));var rimraf=require(_0xc0ad('0x8'));var config=require(_0xc0ad('0x9'));var attributes=require(_0xc0ad('0xa'));module[_0xc0ad('0xb')]=function(_0x26fc1a,_0x5f1b93){return _0x26fc1a[_0xc0ad('0xc')](_0xc0ad('0xd'),attributes,{'tableName':_0xc0ad('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6cd4=['request-promise','../../config/environment','./faxAccount.attributes','define','FaxAccount','lodash','../../config/logger','api','moment','bluebird'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0x6cd4,0x16d));var _0x46cd=function(_0x2be614,_0x3891a6){_0x2be614=_0x2be614-0x0;var _0x163a7c=_0x6cd4[_0x2be614];return _0x163a7c;};'use strict';var _=require(_0x46cd('0x0'));var util=require('util');var logger=require(_0x46cd('0x1'))(_0x46cd('0x2'));var moment=require(_0x46cd('0x3'));var BPromise=require(_0x46cd('0x4'));var rp=require(_0x46cd('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x46cd('0x6'));var attributes=require(_0x46cd('0x7'));module['exports']=function(_0x24e442,_0x1cec4c){return _0x24e442[_0x46cd('0x8')](_0x46cd('0x9'),attributes,{'tableName':'fax_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 934f3ba..9f6391f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2ca3=['unshift','waitForTheAssignedAgent','queueId','FaxQueue','startRouting','lodash','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','socket.io-emitter','./faxAccount.socket','request','then','info','FaxAccount,\x20%s,\x20%s','request\x20sent','debug','FaxAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetFaxAccount','findAll','options','raw','where','attributes','include','map','model','NotifyFaxAccount','body','fax','CmContact','describe','ValidationError','no\x20available\x20attributes','updatedAt','difference','keys','CompanyId','ListId','isNil','from','from\x20is\x20mandatory','Sequelize','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','FaxAccount','find','account','CmList','Contacts','DESC','FaxApplication','List','get','applications','Applications','list','orderBy','asc','length','defaults','create','contact','FaxInteraction','Contact\x20not\x20found','spread','push','close','unmanaged','*,*,*,*','interaction','FaxMessage','ContactId','AttachmentId','UserId','name'];(function(_0x3d4e35,_0x83c145){var _0x2c4e89=function(_0x321f72){while(--_0x321f72){_0x3d4e35['push'](_0x3d4e35['shift']());}};_0x2c4e89(++_0x83c145);}(_0x2ca3,0x169));var _0x32ca=function(_0x53b39a,_0x43a89a){_0x53b39a=_0x53b39a-0x0;var _0x29d39f=_0x2ca3[_0x53b39a];return _0x29d39f;};'use strict';var _=require(_0x32ca('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x32ca('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x32ca('0x2'));var logger=require(_0x32ca('0x3'))(_0x32ca('0x4'));var config=require(_0x32ca('0x5'));var jayson=require('jayson/promise');var client=jayson[_0x32ca('0x6')][_0x32ca('0x7')]({'port':0x232c});config[_0x32ca('0x8')]=_['defaults'](config[_0x32ca('0x8')],{'host':'localhost','port':0x18eb});var socket=require(_0x32ca('0x9'))(new Redis(config[_0x32ca('0x8')]));require(_0x32ca('0xa'))['register'](socket);function respondWithRpcPromise(_0x353502,_0x1d3c76,_0x1ac6f8){return new BPromise(function(_0x9f91f6,_0x2d4898){return client[_0x32ca('0xb')](_0x353502,_0x1ac6f8)[_0x32ca('0xc')](function(_0x18bfaa){logger[_0x32ca('0xd')](_0x32ca('0xe'),_0x1d3c76,_0x32ca('0xf'));logger[_0x32ca('0x10')](_0x32ca('0x11'),_0x1d3c76,_0x32ca('0xf'),JSON[_0x32ca('0x12')](_0x18bfaa));if(_0x18bfaa[_0x32ca('0x13')]){if(_0x18bfaa[_0x32ca('0x13')][_0x32ca('0x14')]===0x1f4){logger[_0x32ca('0x13')](_0x32ca('0xe'),_0x1d3c76,_0x18bfaa['error'][_0x32ca('0x15')]);return _0x2d4898(_0x18bfaa[_0x32ca('0x13')][_0x32ca('0x15')]);}logger[_0x32ca('0x13')](_0x32ca('0xe'),_0x1d3c76,_0x18bfaa['error'][_0x32ca('0x15')]);return _0x9f91f6(_0x18bfaa[_0x32ca('0x13')][_0x32ca('0x15')]);}else{logger['info'](_0x32ca('0xe'),_0x1d3c76,'request\x20sent');_0x9f91f6(_0x18bfaa[_0x32ca('0x16')][_0x32ca('0x15')]);}})[_0x32ca('0x17')](function(_0x2bca28){logger['error'](_0x32ca('0xe'),_0x1d3c76,_0x2bca28);_0x2d4898(_0x2bca28);});});}exports[_0x32ca('0x18')]=function(_0xf4ad8f){var _0x291901=this;return new Promise(function(_0x16e4a3,_0x3420df){return db['FaxAccount'][_0x32ca('0x19')]({'raw':_0xf4ad8f[_0x32ca('0x1a')]?_0xf4ad8f[_0x32ca('0x1a')][_0x32ca('0x1b')]===undefined?!![]:![]:!![],'where':_0xf4ad8f[_0x32ca('0x1a')]?_0xf4ad8f[_0x32ca('0x1a')][_0x32ca('0x1c')]||null:null,'attributes':_0xf4ad8f[_0x32ca('0x1a')]?_0xf4ad8f[_0x32ca('0x1a')][_0x32ca('0x1d')]||null:null,'limit':_0xf4ad8f[_0x32ca('0x1a')]?_0xf4ad8f[_0x32ca('0x1a')]['limit']||null:null,'include':_0xf4ad8f[_0x32ca('0x1a')]?_0xf4ad8f[_0x32ca('0x1a')][_0x32ca('0x1e')]?_[_0x32ca('0x1f')](_0xf4ad8f[_0x32ca('0x1a')][_0x32ca('0x1e')],function(_0x8c624f){return{'model':db[_0x8c624f[_0x32ca('0x20')]],'as':_0x8c624f['as'],'attributes':_0x8c624f[_0x32ca('0x1d')],'include':_0x8c624f[_0x32ca('0x1e')]?_[_0x32ca('0x1f')](_0x8c624f[_0x32ca('0x1e')],function(_0x95322){return{'model':db[_0x95322[_0x32ca('0x20')]],'as':_0x95322['as'],'attributes':_0x95322[_0x32ca('0x1d')],'include':_0x95322[_0x32ca('0x1e')]?_[_0x32ca('0x1f')](_0x95322[_0x32ca('0x1e')],function(_0x249d09){return{'model':db[_0x249d09['model']],'as':_0x249d09['as'],'attributes':_0x249d09[_0x32ca('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x349890){logger[_0x32ca('0xd')](_0x32ca('0x18'),_0xf4ad8f);logger[_0x32ca('0x10')]('GetFaxAccount',_0xf4ad8f,JSON[_0x32ca('0x12')](_0x349890));_0x16e4a3(_0x349890);})[_0x32ca('0x17')](function(_0x413a10){logger[_0x32ca('0x13')](_0x32ca('0x18'),_0x413a10[_0x32ca('0x15')],_0xf4ad8f);_0x3420df(_0x291901[_0x32ca('0x13')](0x1f4,_0x413a10['message']));});});};exports[_0x32ca('0x21')]=function(_0x38707f,_0x4ce9ac,_0x4d3e0c){var _0xe3a554=this;return new Promise(function(_0x53b211,_0xa2d4c3){var _0x42affd={'body':_0x38707f[_0x32ca('0x22')],'channel':_0x32ca('0x23')};var _0x5260c4=[];var _0x3196bf=[];var _0x3d27bf={};return db[_0x32ca('0x24')][_0x32ca('0x25')]()[_0x32ca('0xc')](function(_0x1ef919){if(!_0x1ef919){throw new db['Sequelize'][(_0x32ca('0x26'))](_0x32ca('0x27'));}_0x5260c4=_['difference'](_['keys'](_0x1ef919),['createdAt',_0x32ca('0x28')]);_0x3196bf=_[_0x32ca('0x29')](_[_0x32ca('0x2a')](_0x1ef919),['createdAt',_0x32ca('0x28'),_0x32ca('0x2b'),_0x32ca('0x2c')]);if(_0x38707f[_0x32ca('0x22')]['id']){delete _0x38707f['body']['id'];}if(_[_0x32ca('0x2d')](_0x38707f[_0x32ca('0x22')][_0x32ca('0x2e')])){throw new db['Sequelize'][(_0x32ca('0x26'))](_0x32ca('0x2f'));}if(_[_0x32ca('0x2d')](_0x38707f[_0x32ca('0x22')][_0x32ca('0x22')])||_0x38707f[_0x32ca('0x22')][_0x32ca('0x22')]===''){throw new db[(_0x32ca('0x30'))][(_0x32ca('0x26'))](_0x32ca('0x31'));}if(_[_0x32ca('0x2d')](_0x38707f[_0x32ca('0x22')][_0x32ca('0x32')])){throw new db[(_0x32ca('0x30'))][(_0x32ca('0x26'))](_0x32ca('0x33')+_0x3196bf);}if(!_['includes'](_0x3196bf,_0x38707f['body'][_0x32ca('0x32')])){throw new db[(_0x32ca('0x30'))]['ValidationError'](_0x32ca('0x34')+_0x3196bf);}_0x3d27bf[_0x38707f[_0x32ca('0x22')][_0x32ca('0x32')]]=_0x38707f[_0x32ca('0x22')][_0x32ca('0x2e')];})[_0x32ca('0xc')](function(){return db[_0x32ca('0x35')][_0x32ca('0x36')]({'where':{'id':_0x38707f[_0x32ca('0x37')]['id']},'include':[{'model':db[_0x32ca('0x38')],'as':'List','include':[{'model':db[_0x32ca('0x24')],'as':_0x32ca('0x39'),'where':_0x3d27bf,'limit':0x1,'order':[[_0x32ca('0x28'),_0x32ca('0x3a')]]}]},{'model':db[_0x32ca('0x3b')],'as':'Applications'}]});})[_0x32ca('0xc')](function(_0x5dc3a2){if(_0x5dc3a2&&_0x5dc3a2[_0x32ca('0x3c')]){var _0x163bb1=_0x5dc3a2[_0x32ca('0x3d')]({'plain':!![]});_0x42affd['account']=_0x163bb1;_0x42affd[_0x32ca('0x3e')]=_0x163bb1[_0x32ca('0x3f')];_0x42affd[_0x32ca('0x40')]=_0x163bb1[_0x32ca('0x3c')];_0x42affd[_0x32ca('0x3e')]=_[_0x32ca('0x41')](_0x42affd[_0x32ca('0x3e')],['priority'],[_0x32ca('0x42')]);if(_0x42affd[_0x32ca('0x37')]['Applications']){delete _0x42affd[_0x32ca('0x37')][_0x32ca('0x3f')];}if(_0x42affd[_0x32ca('0x37')][_0x32ca('0x3c')]&&_0x42affd[_0x32ca('0x37')][_0x32ca('0x3c')][_0x32ca('0x39')][_0x32ca('0x43')]){return _0x42affd[_0x32ca('0x37')][_0x32ca('0x3c')]['Contacts'][0x0];}var _0x57511f=_[_0x32ca('0x44')](_0x38707f[_0x32ca('0x22')],{'firstName':_0x38707f[_0x32ca('0x22')][_0x32ca('0x2e')],'ListId':_0x163bb1[_0x32ca('0x2c')]});_0x57511f[_0x38707f['body'][_0x32ca('0x32')]]=_0x38707f[_0x32ca('0x22')]['from'];return db['CmContact'][_0x32ca('0x45')](_0x57511f,{'fields':_0x5260c4,'raw':!![]});}})[_0x32ca('0xc')](function(_0x3ce1cb){_0x42affd[_0x32ca('0x46')]=_0x3ce1cb;if(_0x3ce1cb){var _0x257791={'ContactId':_0x3ce1cb['id'],'FaxAccountId':_0x38707f['account']['id'],'fax':_0x3ce1cb[_0x32ca('0x23')]};return db[_0x32ca('0x47')]['find']({'where':{'ContactId':_0x3ce1cb['id'],'closed':![],'FaxAccountId':_0x38707f['account']['id']}})[_0x32ca('0xc')](function(_0x558966){if(_0x558966){return[_0x558966,![]];}return db[_0x32ca('0x47')][_0x32ca('0x45')](_0x257791)[_0x32ca('0xc')](function(_0x1f751a){return[_0x1f751a,!![]];});});}else{throw new Error(_0x32ca('0x48'));}})[_0x32ca('0x49')](function(_0x5388fb,_0x2f54fa){var _0x5f3b40=_0x5388fb[_0x32ca('0x3d')]({'plain':!![]});if(_0x2f54fa){if(_0x42affd['account']['autoclose']){_0x42affd[_0x32ca('0x3e')][_0x32ca('0x4a')]({'id':0x0,'priority':_0x42affd[_0x32ca('0x3e')][_0x32ca('0x43')]+0x1,'app':_0x32ca('0x4b'),'appdata':_0x32ca('0x4c'),'interval':_0x32ca('0x4d')});}_0x5f3b40['created']=!![];}else{_0x5f3b40['created']=![];}_0x42affd[_0x32ca('0x4e')]=_0x5f3b40;return db[_0x32ca('0x4f')][_0x32ca('0x45')]({'body':_0x38707f[_0x32ca('0x22')]['body'],'FaxAccountId':_0x38707f['account']['id'],'FaxInteractionId':_0x5388fb['id'],'direction':'in','ContactId':_0x5388fb[_0x32ca('0x50')],'AttachmentId':_0x38707f[_0x32ca('0x22')][_0x32ca('0x51')]});})[_0x32ca('0xc')](function(_0x4a070a){_0x42affd[_0x32ca('0x15')]=_0x4a070a;if(!_0x42affd[_0x32ca('0x4e')][_0x32ca('0x52')])return;return db['User'][_0x32ca('0x36')]({'attributes':['id',_0x32ca('0x53')],'where':{'id':_0x42affd['interaction'][_0x32ca('0x52')]}});})['then'](function(_0xea40fc){if(_0xea40fc){_0x42affd[_0x32ca('0x3e')][_0x32ca('0x54')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0xea40fc['name']+','+(_0x42affd[_0x32ca('0x37')][_0x32ca('0x55')]||0xa),'interval':_0x32ca('0x4d')});}if(!_0x42affd['interaction'][_0x32ca('0x56')])return;return db[_0x32ca('0x57')][_0x32ca('0x36')]({'attributes':['id',_0x32ca('0x53')],'where':{'id':_0x42affd[_0x32ca('0x4e')][_0x32ca('0x56')]}});})[_0x32ca('0xc')](function(_0x84cdb8){if(_0x84cdb8){_0x42affd[_0x32ca('0x3e')]['unshift']({'id':0x0,'priority':0x1,'app':'queue','appdata':_0x84cdb8['name']+','+(_0x42affd[_0x32ca('0x37')]['waitForTheAssignedQueue']||0x12c),'interval':_0x32ca('0x4d')});}return respondWithRpcPromise('Start',_0x32ca('0x58'),_0x42affd);})[_0x32ca('0xc')](function(_0x3f31a2){_0x53b211(_0x3f31a2);})[_0x32ca('0x17')](function(_0x2309b8){_0xa2d4c3(_0xe3a554['error'](0x1f4,_0x2309b8[_0x32ca('0x15')]));});});};
\ No newline at end of file
+var _0x192a=['contact','fax','FaxInteraction','Contact\x20not\x20found','autoclose','close','unmanaged','*,*,*,*','created','interaction','FaxMessage','ContactId','AttachmentId','User','UserId','unshift','agent','name','waitForTheAssignedAgent','queueId','FaxQueue','queue','Start','startRouting','lodash','util','moment','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','client','http','redis','socket.io-emitter','./faxAccount.socket','register','request','then','info','FaxAccount,\x20%s,\x20%s','request\x20sent','FaxAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','FaxAccount','findAll','options','attributes','include','map','model','debug','GetFaxAccount','NotifyFaxAccount','CmContact','describe','Sequelize','ValidationError','no\x20available\x20attributes','difference','keys','createdAt','updatedAt','CompanyId','body','isNil','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','find','account','List','Contacts','DESC','FaxApplication','applications','Applications','list','orderBy','asc','length','defaults','create'];(function(_0x4b78d2,_0x4691de){var _0x599eca=function(_0x145bae){while(--_0x145bae){_0x4b78d2['push'](_0x4b78d2['shift']());}};_0x599eca(++_0x4691de);}(_0x192a,0xd0));var _0xa192=function(_0x4c5c71,_0x41cef7){_0x4c5c71=_0x4c5c71-0x0;var _0x136eed=_0x192a[_0x4c5c71];return _0x136eed;};'use strict';var _=require(_0xa192('0x0'));var util=require(_0xa192('0x1'));var moment=require(_0xa192('0x2'));var BPromise=require('bluebird');var rs=require(_0xa192('0x3'));var fs=require('fs');var Redis=require(_0xa192('0x4'));var db=require(_0xa192('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xa192('0x6'));var config=require(_0xa192('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xa192('0x8')][_0xa192('0x9')]({'port':0x232c});config[_0xa192('0xa')]=_['defaults'](config[_0xa192('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0xa192('0xb'))(new Redis(config[_0xa192('0xa')]));require(_0xa192('0xc'))[_0xa192('0xd')](socket);function respondWithRpcPromise(_0x433faa,_0x33fc0f,_0x5efe04){return new BPromise(function(_0x4adc74,_0x130fc9){return client[_0xa192('0xe')](_0x433faa,_0x5efe04)[_0xa192('0xf')](function(_0x21661c){logger[_0xa192('0x10')](_0xa192('0x11'),_0x33fc0f,_0xa192('0x12'));logger['debug'](_0xa192('0x13'),_0x33fc0f,_0xa192('0x12'),JSON[_0xa192('0x14')](_0x21661c));if(_0x21661c[_0xa192('0x15')]){if(_0x21661c[_0xa192('0x15')]['code']===0x1f4){logger[_0xa192('0x15')](_0xa192('0x11'),_0x33fc0f,_0x21661c[_0xa192('0x15')][_0xa192('0x16')]);return _0x130fc9(_0x21661c['error'][_0xa192('0x16')]);}logger[_0xa192('0x15')]('FaxAccount,\x20%s,\x20%s',_0x33fc0f,_0x21661c[_0xa192('0x15')]['message']);return _0x4adc74(_0x21661c[_0xa192('0x15')]['message']);}else{logger[_0xa192('0x10')]('FaxAccount,\x20%s,\x20%s',_0x33fc0f,_0xa192('0x12'));_0x4adc74(_0x21661c[_0xa192('0x17')]['message']);}})[_0xa192('0x18')](function(_0x29d211){logger['error'](_0xa192('0x11'),_0x33fc0f,_0x29d211);_0x130fc9(_0x29d211);});});}exports['GetFaxAccount']=function(_0x3958aa){var _0x396fa7=this;return new Promise(function(_0x47bf4b,_0x37cb6e){return db[_0xa192('0x19')][_0xa192('0x1a')]({'raw':_0x3958aa[_0xa192('0x1b')]?_0x3958aa[_0xa192('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x3958aa[_0xa192('0x1b')]?_0x3958aa[_0xa192('0x1b')]['where']||null:null,'attributes':_0x3958aa[_0xa192('0x1b')]?_0x3958aa[_0xa192('0x1b')][_0xa192('0x1c')]||null:null,'limit':_0x3958aa['options']?_0x3958aa[_0xa192('0x1b')]['limit']||null:null,'include':_0x3958aa[_0xa192('0x1b')]?_0x3958aa['options'][_0xa192('0x1d')]?_[_0xa192('0x1e')](_0x3958aa['options'][_0xa192('0x1d')],function(_0x46c7b3){return{'model':db[_0x46c7b3[_0xa192('0x1f')]],'as':_0x46c7b3['as'],'attributes':_0x46c7b3[_0xa192('0x1c')],'include':_0x46c7b3[_0xa192('0x1d')]?_['map'](_0x46c7b3['include'],function(_0x55c617){return{'model':db[_0x55c617[_0xa192('0x1f')]],'as':_0x55c617['as'],'attributes':_0x55c617[_0xa192('0x1c')],'include':_0x55c617[_0xa192('0x1d')]?_[_0xa192('0x1e')](_0x55c617[_0xa192('0x1d')],function(_0x19659e){return{'model':db[_0x19659e['model']],'as':_0x19659e['as'],'attributes':_0x19659e['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x1b68d1){logger['info']('GetFaxAccount',_0x3958aa);logger[_0xa192('0x20')](_0xa192('0x21'),_0x3958aa,JSON['stringify'](_0x1b68d1));_0x47bf4b(_0x1b68d1);})[_0xa192('0x18')](function(_0x56c575){logger[_0xa192('0x15')](_0xa192('0x21'),_0x56c575['message'],_0x3958aa);_0x37cb6e(_0x396fa7[_0xa192('0x15')](0x1f4,_0x56c575[_0xa192('0x16')]));});});};exports[_0xa192('0x22')]=function(_0x32593c,_0x116c0f,_0x58726b){var _0x273fe7=this;return new Promise(function(_0x392da2,_0x5a8f12){var _0x5d7fa5={'body':_0x32593c['body'],'channel':'fax'};var _0xe94785=[];var _0x3ef61e=[];var _0x39e29f={};return db[_0xa192('0x23')][_0xa192('0x24')]()[_0xa192('0xf')](function(_0x17a34f){if(!_0x17a34f){throw new db[(_0xa192('0x25'))][(_0xa192('0x26'))](_0xa192('0x27'));}_0xe94785=_[_0xa192('0x28')](_[_0xa192('0x29')](_0x17a34f),[_0xa192('0x2a'),'updatedAt']);_0x3ef61e=_['difference'](_[_0xa192('0x29')](_0x17a34f),[_0xa192('0x2a'),_0xa192('0x2b'),_0xa192('0x2c'),'ListId']);if(_0x32593c[_0xa192('0x2d')]['id']){delete _0x32593c[_0xa192('0x2d')]['id'];}if(_[_0xa192('0x2e')](_0x32593c[_0xa192('0x2d')][_0xa192('0x2f')])){throw new db['Sequelize'][(_0xa192('0x26'))](_0xa192('0x30'));}if(_[_0xa192('0x2e')](_0x32593c['body']['body'])||_0x32593c[_0xa192('0x2d')][_0xa192('0x2d')]===''){throw new db[(_0xa192('0x25'))]['ValidationError'](_0xa192('0x31'));}if(_['isNil'](_0x32593c['body'][_0xa192('0x32')])){throw new db[(_0xa192('0x25'))][(_0xa192('0x26'))](_0xa192('0x33')+_0x3ef61e);}if(!_[_0xa192('0x34')](_0x3ef61e,_0x32593c[_0xa192('0x2d')][_0xa192('0x32')])){throw new db['Sequelize'][(_0xa192('0x26'))](_0xa192('0x35')+_0x3ef61e);}_0x39e29f[_0x32593c['body'][_0xa192('0x32')]]=_0x32593c[_0xa192('0x2d')][_0xa192('0x2f')];})[_0xa192('0xf')](function(){return db[_0xa192('0x19')][_0xa192('0x36')]({'where':{'id':_0x32593c[_0xa192('0x37')]['id']},'include':[{'model':db['CmList'],'as':_0xa192('0x38'),'include':[{'model':db[_0xa192('0x23')],'as':_0xa192('0x39'),'where':_0x39e29f,'limit':0x1,'order':[['updatedAt',_0xa192('0x3a')]]}]},{'model':db[_0xa192('0x3b')],'as':'Applications'}]});})[_0xa192('0xf')](function(_0x334e10){if(_0x334e10&&_0x334e10[_0xa192('0x38')]){var _0x38c176=_0x334e10['get']({'plain':!![]});_0x5d7fa5[_0xa192('0x37')]=_0x38c176;_0x5d7fa5[_0xa192('0x3c')]=_0x38c176[_0xa192('0x3d')];_0x5d7fa5[_0xa192('0x3e')]=_0x38c176[_0xa192('0x38')];_0x5d7fa5[_0xa192('0x3c')]=_[_0xa192('0x3f')](_0x5d7fa5[_0xa192('0x3c')],['priority'],[_0xa192('0x40')]);if(_0x5d7fa5[_0xa192('0x37')][_0xa192('0x3d')]){delete _0x5d7fa5[_0xa192('0x37')][_0xa192('0x3d')];}if(_0x5d7fa5['account'][_0xa192('0x38')]&&_0x5d7fa5[_0xa192('0x37')][_0xa192('0x38')][_0xa192('0x39')][_0xa192('0x41')]){return _0x5d7fa5[_0xa192('0x37')][_0xa192('0x38')]['Contacts'][0x0];}var _0x5806b7=_[_0xa192('0x42')](_0x32593c['body'],{'firstName':_0x32593c[_0xa192('0x2d')][_0xa192('0x2f')],'ListId':_0x38c176['ListId']});_0x5806b7[_0x32593c[_0xa192('0x2d')]['mapKey']]=_0x32593c[_0xa192('0x2d')][_0xa192('0x2f')];return db[_0xa192('0x23')][_0xa192('0x43')](_0x5806b7,{'fields':_0xe94785,'raw':!![]});}})[_0xa192('0xf')](function(_0x28dc7b){_0x5d7fa5[_0xa192('0x44')]=_0x28dc7b;if(_0x28dc7b){var _0x20c55e={'ContactId':_0x28dc7b['id'],'FaxAccountId':_0x32593c[_0xa192('0x37')]['id'],'fax':_0x28dc7b[_0xa192('0x45')]};return db[_0xa192('0x46')][_0xa192('0x36')]({'where':{'ContactId':_0x28dc7b['id'],'closed':![],'FaxAccountId':_0x32593c[_0xa192('0x37')]['id']}})[_0xa192('0xf')](function(_0x2d9e24){if(_0x2d9e24){return[_0x2d9e24,![]];}return db[_0xa192('0x46')][_0xa192('0x43')](_0x20c55e)[_0xa192('0xf')](function(_0xd41e0c){return[_0xd41e0c,!![]];});});}else{throw new Error(_0xa192('0x47'));}})['spread'](function(_0x237117,_0x3c402e){var _0x3e51eb=_0x237117['get']({'plain':!![]});if(_0x3c402e){if(_0x5d7fa5[_0xa192('0x37')][_0xa192('0x48')]){_0x5d7fa5['applications']['push']({'id':0x0,'priority':_0x5d7fa5['applications'][_0xa192('0x41')]+0x1,'app':_0xa192('0x49'),'appdata':_0xa192('0x4a'),'interval':_0xa192('0x4b')});}_0x3e51eb[_0xa192('0x4c')]=!![];}else{_0x3e51eb[_0xa192('0x4c')]=![];}_0x5d7fa5[_0xa192('0x4d')]=_0x3e51eb;return db[_0xa192('0x4e')][_0xa192('0x43')]({'body':_0x32593c[_0xa192('0x2d')][_0xa192('0x2d')],'FaxAccountId':_0x32593c['account']['id'],'FaxInteractionId':_0x237117['id'],'direction':'in','ContactId':_0x237117[_0xa192('0x4f')],'AttachmentId':_0x32593c['body'][_0xa192('0x50')]});})[_0xa192('0xf')](function(_0x3fd021){_0x5d7fa5[_0xa192('0x16')]=_0x3fd021;if(!_0x5d7fa5[_0xa192('0x4d')]['UserId'])return;return db[_0xa192('0x51')]['find']({'attributes':['id','name'],'where':{'id':_0x5d7fa5[_0xa192('0x4d')][_0xa192('0x52')]}});})['then'](function(_0x2e9f94){if(_0x2e9f94){_0x5d7fa5[_0xa192('0x3c')][_0xa192('0x53')]({'id':0x0,'priority':0x0,'app':_0xa192('0x54'),'appdata':_0x2e9f94[_0xa192('0x55')]+','+(_0x5d7fa5['account'][_0xa192('0x56')]||0xa),'interval':_0xa192('0x4b')});}if(!_0x5d7fa5[_0xa192('0x4d')][_0xa192('0x57')])return;return db[_0xa192('0x58')][_0xa192('0x36')]({'attributes':['id','name'],'where':{'id':_0x5d7fa5[_0xa192('0x4d')][_0xa192('0x57')]}});})['then'](function(_0x6272d){if(_0x6272d){_0x5d7fa5['applications']['unshift']({'id':0x0,'priority':0x1,'app':_0xa192('0x59'),'appdata':_0x6272d[_0xa192('0x55')]+','+(_0x5d7fa5[_0xa192('0x37')]['waitForTheAssignedQueue']||0x12c),'interval':_0xa192('0x4b')});}return respondWithRpcPromise(_0xa192('0x5a'),_0xa192('0x5b'),_0x5d7fa5);})[_0xa192('0xf')](function(_0x452359){_0x392da2(_0x452359);})[_0xa192('0x18')](function(_0x353957){_0x5a8f12(_0x273fe7[_0xa192('0x15')](0x1f4,_0x353957['message']));});});};
\ No newline at end of file
index 7ffc90a..57f326b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x06cb=['register','length','faxAccount:','./faxAccount.events','save','remove','update','emit'];(function(_0xac1ffd,_0x5129a7){var _0x4e4a86=function(_0x519572){while(--_0x519572){_0xac1ffd['push'](_0xac1ffd['shift']());}};_0x4e4a86(++_0x5129a7);}(_0x06cb,0x113));var _0xb06c=function(_0x3f74ed,_0x520f2a){_0x3f74ed=_0x3f74ed-0x0;var _0x507434=_0x06cb[_0x3f74ed];return _0x507434;};'use strict';var FaxAccountEvents=require(_0xb06c('0x0'));var events=[_0xb06c('0x1'),_0xb06c('0x2'),_0xb06c('0x3')];function createListener(_0x2bc169,_0x2b0c21){return function(_0x5c651a){_0x2b0c21[_0xb06c('0x4')](_0x2bc169,_0x5c651a);};}function removeListener(_0x27624c,_0x4b3c41){return function(){FaxAccountEvents['removeListener'](_0x27624c,_0x4b3c41);};}exports[_0xb06c('0x5')]=function(_0x5ede0a){for(var _0x2ad1c3=0x0,_0x241202=events[_0xb06c('0x6')];_0x2ad1c3<_0x241202;_0x2ad1c3++){var _0x291a3e=events[_0x2ad1c3];var _0x650d76=createListener(_0xb06c('0x7')+_0x291a3e,_0x5ede0a);FaxAccountEvents['on'](_0x291a3e,_0x650d76);}};
\ No newline at end of file
+var _0xa93c=['emit','faxAccount:','save','remove','update'];(function(_0x2beeb9,_0x415c85){var _0x3f7f25=function(_0x1890d1){while(--_0x1890d1){_0x2beeb9['push'](_0x2beeb9['shift']());}};_0x3f7f25(++_0x415c85);}(_0xa93c,0x197));var _0xca93=function(_0x47cfa0,_0x176b87){_0x47cfa0=_0x47cfa0-0x0;var _0x386b1d=_0xa93c[_0x47cfa0];return _0x386b1d;};'use strict';var FaxAccountEvents=require('./faxAccount.events');var events=[_0xca93('0x0'),_0xca93('0x1'),_0xca93('0x2')];function createListener(_0x3ef44f,_0x5201b6){return function(_0x19e5d){_0x5201b6[_0xca93('0x3')](_0x3ef44f,_0x19e5d);};}function removeListener(_0x4761c2,_0x2dda1c){return function(){FaxAccountEvents['removeListener'](_0x4761c2,_0x2dda1c);};}exports['register']=function(_0x283596){for(var _0x665d5a=0x0,_0xc756bf=events['length'];_0x665d5a<_0xc756bf;_0x665d5a++){var _0x54de70=events[_0x665d5a];var _0x40f808=createListener(_0xca93('0x4')+_0x54de70,_0x283596);FaxAccountEvents['on'](_0x54de70,_0x40f808);}};
\ No newline at end of file
index 2e3b6c8..8d6d20a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3f3d=['express','fs-extra','../../components/interaction/service','../../config/environment','./faxAccount.controller','get','isAuthenticated','index','describe','/:id/dispositions','getDispositions','/:id/canned_answers','/:id/interactions','getInteractions','/:id/applications','getApplications','/:id/messages','getMessages','/:id/users','getAgents','create','post','addDisposition','addAnswer','addInteraction','addApplications','/addaccountapplications','updateAccountApplications','/:id/send','send','addAgents','put','/:id','update','delete','destroy','removeDispositions','removeAnswers','removeAgents','exports','multer','path','connect-timeout'];(function(_0xd12822,_0x3e2466){var _0x227129=function(_0x15776b){while(--_0x15776b){_0xd12822['push'](_0xd12822['shift']());}};_0x227129(++_0x3e2466);}(_0x3f3d,0xd4));var _0xd3f3=function(_0x5751e6,_0x125e5e){_0x5751e6=_0x5751e6-0x0;var _0x4199e4=_0x3f3d[_0x5751e6];return _0x4199e4;};'use strict';var multer=require(_0xd3f3('0x0'));var util=require('util');var path=require(_0xd3f3('0x1'));var timeout=require(_0xd3f3('0x2'));var express=require(_0xd3f3('0x3'));var router=express['Router']();var fs_extra=require(_0xd3f3('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0xd3f3('0x5'));var config=require(_0xd3f3('0x6'));var controller=require(_0xd3f3('0x7'));router[_0xd3f3('0x8')]('/',auth[_0xd3f3('0x9')](),controller[_0xd3f3('0xa')]);router[_0xd3f3('0x8')]('/describe',auth[_0xd3f3('0x9')](),controller[_0xd3f3('0xb')]);router['get']('/:id',auth['isAuthenticated'](),controller['show']);router[_0xd3f3('0x8')](_0xd3f3('0xc'),auth[_0xd3f3('0x9')](),controller[_0xd3f3('0xd')]);router['get'](_0xd3f3('0xe'),auth[_0xd3f3('0x9')](),controller['getAnswers']);router[_0xd3f3('0x8')](_0xd3f3('0xf'),auth[_0xd3f3('0x9')](),controller[_0xd3f3('0x10')]);router[_0xd3f3('0x8')](_0xd3f3('0x11'),auth[_0xd3f3('0x9')](),controller[_0xd3f3('0x12')]);router['get'](_0xd3f3('0x13'),auth[_0xd3f3('0x9')](),controller[_0xd3f3('0x14')]);router[_0xd3f3('0x8')](_0xd3f3('0x15'),auth[_0xd3f3('0x9')](),controller[_0xd3f3('0x16')]);router['post']('/',auth[_0xd3f3('0x9')](),controller[_0xd3f3('0x17')]);router[_0xd3f3('0x18')](_0xd3f3('0xc'),auth[_0xd3f3('0x9')](),controller[_0xd3f3('0x19')]);router[_0xd3f3('0x18')](_0xd3f3('0xe'),auth[_0xd3f3('0x9')](),controller[_0xd3f3('0x1a')]);router['post'](_0xd3f3('0xf'),auth[_0xd3f3('0x9')](),controller[_0xd3f3('0x1b')]);router['post'](_0xd3f3('0x11'),auth[_0xd3f3('0x9')](),controller[_0xd3f3('0x1c')]);router['post'](_0xd3f3('0x1d'),auth[_0xd3f3('0x9')](),controller['addAccountApplications']);router[_0xd3f3('0x18')]('/updateaccountapplications',auth[_0xd3f3('0x9')](),controller[_0xd3f3('0x1e')]);router['post'](_0xd3f3('0x1f'),auth[_0xd3f3('0x9')](),controller[_0xd3f3('0x20')]);router[_0xd3f3('0x18')](_0xd3f3('0x15'),auth[_0xd3f3('0x9')](),controller[_0xd3f3('0x21')]);router[_0xd3f3('0x22')](_0xd3f3('0x23'),auth['isAuthenticated'](),controller[_0xd3f3('0x24')]);router[_0xd3f3('0x25')]('/:id',auth[_0xd3f3('0x9')](),controller[_0xd3f3('0x26')]);router[_0xd3f3('0x25')]('/:id/dispositions',auth[_0xd3f3('0x9')](),controller[_0xd3f3('0x27')]);router['delete'](_0xd3f3('0xe'),auth[_0xd3f3('0x9')](),controller[_0xd3f3('0x28')]);router[_0xd3f3('0x25')](_0xd3f3('0x15'),auth['isAuthenticated'](),controller[_0xd3f3('0x29')]);module[_0xd3f3('0x2a')]=router;
\ No newline at end of file
+var _0xafbf=['/:id/dispositions','getDispositions','/:id/canned_answers','/:id/interactions','getInteractions','/:id/applications','getMessages','getAgents','create','post','addAnswer','addInteraction','addApplications','/addaccountapplications','addAccountApplications','/:id/send','/:id/users','addAgents','update','delete','destroy','removeDispositions','removeAnswers','removeAgents','exports','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','./faxAccount.controller','isAuthenticated','index','get','/describe','describe','/:id'];(function(_0x333f66,_0x371f7f){var _0x44d5f2=function(_0xb8a2fc){while(--_0xb8a2fc){_0x333f66['push'](_0x333f66['shift']());}};_0x44d5f2(++_0x371f7f);}(_0xafbf,0x65));var _0xfafb=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0xafbf[_0x5b644e];return _0x49c6bf;};'use strict';var multer=require('multer');var util=require(_0xfafb('0x0'));var path=require('path');var timeout=require(_0xfafb('0x1'));var express=require(_0xfafb('0x2'));var router=express[_0xfafb('0x3')]();var fs_extra=require(_0xfafb('0x4'));var auth=require(_0xfafb('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xfafb('0x6'));router['get']('/',auth[_0xfafb('0x7')](),controller[_0xfafb('0x8')]);router[_0xfafb('0x9')](_0xfafb('0xa'),auth['isAuthenticated'](),controller[_0xfafb('0xb')]);router[_0xfafb('0x9')](_0xfafb('0xc'),auth[_0xfafb('0x7')](),controller['show']);router[_0xfafb('0x9')](_0xfafb('0xd'),auth['isAuthenticated'](),controller[_0xfafb('0xe')]);router[_0xfafb('0x9')](_0xfafb('0xf'),auth[_0xfafb('0x7')](),controller['getAnswers']);router[_0xfafb('0x9')](_0xfafb('0x10'),auth['isAuthenticated'](),controller[_0xfafb('0x11')]);router['get'](_0xfafb('0x12'),auth[_0xfafb('0x7')](),controller['getApplications']);router[_0xfafb('0x9')]('/:id/messages',auth[_0xfafb('0x7')](),controller[_0xfafb('0x13')]);router[_0xfafb('0x9')]('/:id/users',auth[_0xfafb('0x7')](),controller[_0xfafb('0x14')]);router['post']('/',auth[_0xfafb('0x7')](),controller[_0xfafb('0x15')]);router[_0xfafb('0x16')]('/:id/dispositions',auth[_0xfafb('0x7')](),controller['addDisposition']);router['post'](_0xfafb('0xf'),auth[_0xfafb('0x7')](),controller[_0xfafb('0x17')]);router[_0xfafb('0x16')]('/:id/interactions',auth[_0xfafb('0x7')](),controller[_0xfafb('0x18')]);router[_0xfafb('0x16')](_0xfafb('0x12'),auth[_0xfafb('0x7')](),controller[_0xfafb('0x19')]);router[_0xfafb('0x16')](_0xfafb('0x1a'),auth[_0xfafb('0x7')](),controller[_0xfafb('0x1b')]);router['post']('/updateaccountapplications',auth['isAuthenticated'](),controller['updateAccountApplications']);router['post'](_0xfafb('0x1c'),auth[_0xfafb('0x7')](),controller['send']);router[_0xfafb('0x16')](_0xfafb('0x1d'),auth['isAuthenticated'](),controller[_0xfafb('0x1e')]);router['put'](_0xfafb('0xc'),auth[_0xfafb('0x7')](),controller[_0xfafb('0x1f')]);router[_0xfafb('0x20')](_0xfafb('0xc'),auth[_0xfafb('0x7')](),controller[_0xfafb('0x21')]);router[_0xfafb('0x20')](_0xfafb('0xd'),auth[_0xfafb('0x7')](),controller[_0xfafb('0x22')]);router[_0xfafb('0x20')](_0xfafb('0xf'),auth[_0xfafb('0x7')](),controller[_0xfafb('0x23')]);router[_0xfafb('0x20')](_0xfafb('0x1d'),auth[_0xfafb('0x7')](),controller[_0xfafb('0x24')]);module[_0xfafb('0x25')]=router;
\ No newline at end of file
index 9fdb509..57ba959 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x677b=['noop','STRING','sequelize','exports','INTEGER'];(function(_0x4048ac,_0x439058){var _0x41bd07=function(_0x47ad29){while(--_0x47ad29){_0x4048ac['push'](_0x4048ac['shift']());}};_0x41bd07(++_0x439058);}(_0x677b,0x1d3));var _0xb677=function(_0x5c2e5e,_0x2bc00e){_0x5c2e5e=_0x5c2e5e-0x0;var _0x46a5da=_0x677b[_0x5c2e5e];return _0x46a5da;};'use strict';var Sequelize=require(_0xb677('0x0'));module[_0xb677('0x1')]={'priority':{'type':Sequelize[_0xb677('0x2')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xb677('0x3')},'appdata':{'type':Sequelize['TEXT']()},'description':{'type':Sequelize[_0xb677('0x4')]},'interval':{'type':Sequelize['STRING'],'defaultValue':'*,*,*,*'}};
\ No newline at end of file
+var _0xba28=['noop','TEXT','*,*,*,*','exports','INTEGER','STRING'];(function(_0x7f133e,_0x48505c){var _0x3d8df7=function(_0xdb5339){while(--_0xdb5339){_0x7f133e['push'](_0x7f133e['shift']());}};_0x3d8df7(++_0x48505c);}(_0xba28,0x1e9));var _0x8ba2=function(_0x26462c,_0xd20a35){_0x26462c=_0x26462c-0x0;var _0x509a42=_0xba28[_0x26462c];return _0x509a42;};'use strict';var Sequelize=require('sequelize');module[_0x8ba2('0x0')]={'priority':{'type':Sequelize[_0x8ba2('0x1')],'allowNull':![]},'app':{'type':Sequelize[_0x8ba2('0x2')],'allowNull':![],'defaultValue':_0x8ba2('0x3')},'appdata':{'type':Sequelize[_0x8ba2('0x4')]()},'description':{'type':Sequelize[_0x8ba2('0x2')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x8ba2('0x5')}};
\ No newline at end of file
index b2b05b1..43a6cbc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x596a=['util','path','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','offset','limit','undefined','count','set','Content-Range','json','apply','reject','save','then','error','stack','name','send','map','FaxApplication','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','find','create','body','destroy','eml-format','rimraf','fast-json-patch','request-promise','moment'];(function(_0x10eb23,_0x58ab5d){var _0x2ae623=function(_0x1c750c){while(--_0x1c750c){_0x10eb23['push'](_0x10eb23['shift']());}};_0x2ae623(++_0x58ab5d);}(_0x596a,0x8d));var _0xa596=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x596a[_0x2641f9];return _0x585741;};'use strict';var emlformat=require(_0xa596('0x0'));var rimraf=require(_0xa596('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xa596('0x2'));var rp=require(_0xa596('0x3'));var moment=require(_0xa596('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xa596('0x5'));var path=require(_0xa596('0x6'));var sox=require('sox');var csv=require(_0xa596('0x7'));var ejs=require(_0xa596('0x8'));var fs=require('fs');var fs_extra=require(_0xa596('0x9'));var _=require('lodash');var squel=require(_0xa596('0xa'));var crypto=require(_0xa596('0xb'));var jsforce=require(_0xa596('0xc'));var deskjs=require(_0xa596('0xd'));var toCsv=require(_0xa596('0x7'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xa596('0xe'));var authService=require('../../components/auth/service');var qs=require(_0xa596('0xf'));var as=require(_0xa596('0x10'));var hardwareService=require(_0xa596('0x11'));var logger=require(_0xa596('0x12'))(_0xa596('0x13'));var utils=require(_0xa596('0x14'));var config=require(_0xa596('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0xa596('0x16'))['db'];function respondWithStatusCode(_0x1f9f49,_0x492ea2){_0x492ea2=_0x492ea2||0xcc;return function(_0x1138f4){if(_0x1138f4){return _0x1f9f49[_0xa596('0x17')](_0x492ea2);}return _0x1f9f49[_0xa596('0x18')](_0x492ea2)[_0xa596('0x19')]();};}function respondWithResult(_0x58ffde,_0x91edd0){_0x91edd0=_0x91edd0||0xc8;return function(_0x961b6a){if(_0x961b6a){return _0x58ffde[_0xa596('0x18')](_0x91edd0)['json'](_0x961b6a);}};}function respondWithFilteredResult(_0x133484,_0x2ef076){return function(_0x208e62){if(_0x208e62){var _0x2c6d43=typeof _0x2ef076[_0xa596('0x1a')]==='undefined'&&typeof _0x2ef076[_0xa596('0x1b')]===_0xa596('0x1c');var _0x36921c=_0x208e62[_0xa596('0x1d')];var _0x33d68d=_0x2c6d43?0x0:_0x2ef076['offset'];var _0x5718b8=_0x2c6d43?_0x208e62[_0xa596('0x1d')]:_0x2ef076[_0xa596('0x1a')]+_0x2ef076[_0xa596('0x1b')];var _0x48ef8e;if(_0x5718b8>=_0x36921c){_0x5718b8=_0x36921c;_0x48ef8e=0xc8;}else{_0x48ef8e=0xce;}_0x133484['status'](_0x48ef8e);return _0x133484[_0xa596('0x1e')](_0xa596('0x1f'),_0x33d68d+'-'+_0x5718b8+'/'+_0x36921c)[_0xa596('0x20')](_0x208e62);}return null;};}function patchUpdates(_0x5942c4){return function(_0x44c1e3){try{jsonpatch[_0xa596('0x21')](_0x44c1e3,_0x5942c4,!![]);}catch(_0x5bf4bc){return BPromise[_0xa596('0x22')](_0x5bf4bc);}return _0x44c1e3[_0xa596('0x23')]();};}function saveUpdates(_0x45c84c,_0x5e2f11){return function(_0x42c762){if(_0x42c762){return _0x42c762['update'](_0x45c84c)[_0xa596('0x24')](function(_0x5c8bec){return _0x5c8bec;});}return null;};}function removeEntity(_0x487a89,_0x34ccea){return function(_0x2905d4){if(_0x2905d4){return _0x2905d4['destroy']()[_0xa596('0x24')](function(){_0x487a89[_0xa596('0x18')](0xcc)[_0xa596('0x19')]();});}};}function handleEntityNotFound(_0x3aa6aa,_0x4b3220){return function(_0x5a04d2){if(!_0x5a04d2){_0x3aa6aa['sendStatus'](0x194);}return _0x5a04d2;};}function handleError(_0x38a6c0,_0x3d7743){_0x3d7743=_0x3d7743||0x1f4;return function(_0x2fb268){logger[_0xa596('0x25')](_0x2fb268[_0xa596('0x26')]);if(_0x2fb268[_0xa596('0x27')]){delete _0x2fb268[_0xa596('0x27')];}_0x38a6c0[_0xa596('0x18')](_0x3d7743)[_0xa596('0x28')](_0x2fb268);};}exports['index']=function(_0x3e81c9,_0x11c4a8){var _0x39f8a3={},_0x58a3d2={},_0x125453={'count':0x0,'rows':[]};var _0x581318=_[_0xa596('0x29')](db[_0xa596('0x2a')][_0xa596('0x2b')],function(_0x2a0830){return{'name':_0x2a0830['fieldName'],'type':_0x2a0830[_0xa596('0x2c')][_0xa596('0x2d')]};});_0x58a3d2[_0xa596('0x2e')]=_[_0xa596('0x29')](_0x581318,_0xa596('0x27'));_0x58a3d2[_0xa596('0x2f')]=_[_0xa596('0x30')](_0x3e81c9[_0xa596('0x2f')]);_0x58a3d2[_0xa596('0x31')]=_[_0xa596('0x32')](_0x58a3d2[_0xa596('0x2e')],_0x58a3d2['query']);_0x39f8a3[_0xa596('0x33')]=_[_0xa596('0x32')](_0x58a3d2[_0xa596('0x2e')],qs[_0xa596('0x34')](_0x3e81c9[_0xa596('0x2f')][_0xa596('0x34')]));_0x39f8a3[_0xa596('0x33')]=_0x39f8a3[_0xa596('0x33')][_0xa596('0x35')]?_0x39f8a3[_0xa596('0x33')]:_0x58a3d2[_0xa596('0x2e')];if(!_0x3e81c9[_0xa596('0x2f')][_0xa596('0x36')](_0xa596('0x37'))){_0x39f8a3['limit']=qs[_0xa596('0x1b')](_0x3e81c9[_0xa596('0x2f')][_0xa596('0x1b')]);_0x39f8a3['offset']=qs['offset'](_0x3e81c9[_0xa596('0x2f')][_0xa596('0x1a')]);}_0x39f8a3['order']=qs[_0xa596('0x38')](_0x3e81c9['query'][_0xa596('0x38')]);_0x39f8a3[_0xa596('0x39')]=qs[_0xa596('0x31')](_[_0xa596('0x3a')](_0x3e81c9[_0xa596('0x2f')],_0x58a3d2['filters']),_0x581318);if(_0x3e81c9['query'][_0xa596('0x3b')]){_0x39f8a3[_0xa596('0x39')]=_[_0xa596('0x3c')](_0x39f8a3['where'],{'$or':_[_0xa596('0x29')](_0x581318,function(_0xb68dfc){if(_0xb68dfc[_0xa596('0x2c')]!==_0xa596('0x3d')){var _0x264498={};_0x264498[_0xb68dfc[_0xa596('0x27')]]={'$like':'%'+_0x3e81c9[_0xa596('0x2f')]['filter']+'%'};return _0x264498;}})});}_0x39f8a3=_[_0xa596('0x3c')]({},_0x39f8a3,_0x3e81c9[_0xa596('0x3e')]);var _0xce4501={'where':_0x39f8a3[_0xa596('0x39')]};return db[_0xa596('0x2a')]['count'](_0xce4501)['then'](function(_0x215e87){_0x125453['count']=_0x215e87;if(_0x3e81c9[_0xa596('0x2f')][_0xa596('0x3f')]){_0x39f8a3[_0xa596('0x40')]=[{'all':!![]}];}return db['FaxApplication'][_0xa596('0x41')](_0x39f8a3);})[_0xa596('0x24')](function(_0x365f13){_0x125453[_0xa596('0x42')]=_0x365f13;return _0x125453;})[_0xa596('0x24')](respondWithFilteredResult(_0x11c4a8,_0x39f8a3))[_0xa596('0x43')](handleError(_0x11c4a8,null));};exports['show']=function(_0x461a34,_0xad0cf8){var _0x5d662b={'raw':!![],'where':{'id':_0x461a34[_0xa596('0x44')]['id']}},_0x4b25b9={};_0x4b25b9[_0xa596('0x2e')]=_[_0xa596('0x30')](db[_0xa596('0x2a')][_0xa596('0x2b')]);_0x4b25b9[_0xa596('0x2f')]=_[_0xa596('0x30')](_0x461a34['query']);_0x4b25b9[_0xa596('0x31')]=_[_0xa596('0x32')](_0x4b25b9[_0xa596('0x2e')],_0x4b25b9[_0xa596('0x2f')]);_0x5d662b[_0xa596('0x33')]=_[_0xa596('0x32')](_0x4b25b9[_0xa596('0x2e')],qs[_0xa596('0x34')](_0x461a34['query'][_0xa596('0x34')]));_0x5d662b[_0xa596('0x33')]=_0x5d662b[_0xa596('0x33')][_0xa596('0x35')]?_0x5d662b[_0xa596('0x33')]:_0x4b25b9['model'];if(_0x461a34['query'][_0xa596('0x3f')]){_0x5d662b[_0xa596('0x40')]=[{'all':!![]}];}_0x5d662b=_[_0xa596('0x3c')]({},_0x5d662b,_0x461a34[_0xa596('0x3e')]);return db['FaxApplication'][_0xa596('0x45')](_0x5d662b)[_0xa596('0x24')](handleEntityNotFound(_0xad0cf8,null))[_0xa596('0x24')](respondWithResult(_0xad0cf8,null))[_0xa596('0x43')](handleError(_0xad0cf8,null));};exports[_0xa596('0x46')]=function(_0x58c551,_0x235f70){return db[_0xa596('0x2a')][_0xa596('0x46')](_0x58c551[_0xa596('0x47')],{})['then'](respondWithResult(_0x235f70,0xc9))[_0xa596('0x43')](handleError(_0x235f70,null));};exports['update']=function(_0xa75a3e,_0x3b9981){if(_0xa75a3e[_0xa596('0x47')]['id']){delete _0xa75a3e[_0xa596('0x47')]['id'];}return db[_0xa596('0x2a')][_0xa596('0x45')]({'where':{'id':_0xa75a3e[_0xa596('0x44')]['id']}})['then'](handleEntityNotFound(_0x3b9981,null))[_0xa596('0x24')](saveUpdates(_0xa75a3e[_0xa596('0x47')],null))[_0xa596('0x24')](respondWithResult(_0x3b9981,null))[_0xa596('0x43')](handleError(_0x3b9981,null));};exports[_0xa596('0x48')]=function(_0x566f61,_0xb61a20){return db['FaxApplication']['find']({'where':{'id':_0x566f61[_0xa596('0x44')]['id']}})[_0xa596('0x24')](handleEntityNotFound(_0xb61a20,null))[_0xa596('0x24')](removeEntity(_0xb61a20,null))[_0xa596('0x43')](handleError(_0xb61a20,null));};
\ No newline at end of file
+var _0x2ef2=['create','body','params','rimraf','request-promise','moment','mustache','util','path','ejs','fs-extra','lodash','squel','jsforce','desk.js','to-csv','querystring','papaparse','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','save','update','then','destroy','error','stack','name','send','FaxApplication','rawAttributes','fieldName','type','key','query','keys','filters','intersection','model','attributes','fields','length','nolimit','where','pick','merge','map','filter','include','rows','catch','show','find'];(function(_0x4a0c33,_0x5686bb){var _0x6488f9=function(_0x3bbd97){while(--_0x3bbd97){_0x4a0c33['push'](_0x4a0c33['shift']());}};_0x6488f9(++_0x5686bb);}(_0x2ef2,0xcc));var _0x22ef=function(_0x2416b2,_0x134439){_0x2416b2=_0x2416b2-0x0;var _0x159c30=_0x2ef2[_0x2416b2];return _0x159c30;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x22ef('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x22ef('0x1'));var moment=require(_0x22ef('0x2'));var BPromise=require('bluebird');var Mustache=require(_0x22ef('0x3'));var util=require(_0x22ef('0x4'));var path=require(_0x22ef('0x5'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x22ef('0x6'));var fs=require('fs');var fs_extra=require(_0x22ef('0x7'));var _=require(_0x22ef('0x8'));var squel=require(_0x22ef('0x9'));var crypto=require('crypto');var jsforce=require(_0x22ef('0xa'));var deskjs=require(_0x22ef('0xb'));var toCsv=require(_0x22ef('0xc'));var querystring=require(_0x22ef('0xd'));var Papa=require(_0x22ef('0xe'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x22ef('0xf'));var hardwareService=require(_0x22ef('0x10'));var logger=require(_0x22ef('0x11'))('api');var utils=require(_0x22ef('0x12'));var config=require('../../config/environment');var licenseUtil=require(_0x22ef('0x13'));var db=require(_0x22ef('0x14'))['db'];function respondWithStatusCode(_0x48ffd6,_0x192d60){_0x192d60=_0x192d60||0xcc;return function(_0x13db54){if(_0x13db54){return _0x48ffd6[_0x22ef('0x15')](_0x192d60);}return _0x48ffd6[_0x22ef('0x16')](_0x192d60)[_0x22ef('0x17')]();};}function respondWithResult(_0x14ac28,_0x345e14){_0x345e14=_0x345e14||0xc8;return function(_0x35318f){if(_0x35318f){return _0x14ac28['status'](_0x345e14)[_0x22ef('0x18')](_0x35318f);}};}function respondWithFilteredResult(_0xcaa114,_0x15adc5){return function(_0x379cae){if(_0x379cae){var _0x26b89c=typeof _0x15adc5[_0x22ef('0x19')]===_0x22ef('0x1a')&&typeof _0x15adc5[_0x22ef('0x1b')]===_0x22ef('0x1a');var _0x4d3e9c=_0x379cae[_0x22ef('0x1c')];var _0x3fa31a=_0x26b89c?0x0:_0x15adc5[_0x22ef('0x19')];var _0x1820d2=_0x26b89c?_0x379cae[_0x22ef('0x1c')]:_0x15adc5[_0x22ef('0x19')]+_0x15adc5[_0x22ef('0x1b')];var _0x35a781;if(_0x1820d2>=_0x4d3e9c){_0x1820d2=_0x4d3e9c;_0x35a781=0xc8;}else{_0x35a781=0xce;}_0xcaa114['status'](_0x35a781);return _0xcaa114[_0x22ef('0x1d')](_0x22ef('0x1e'),_0x3fa31a+'-'+_0x1820d2+'/'+_0x4d3e9c)['json'](_0x379cae);}return null;};}function patchUpdates(_0x97ecfb){return function(_0x214fa0){try{jsonpatch['apply'](_0x214fa0,_0x97ecfb,!![]);}catch(_0xd08871){return BPromise[_0x22ef('0x1f')](_0xd08871);}return _0x214fa0[_0x22ef('0x20')]();};}function saveUpdates(_0xfe8f4b,_0x587ee4){return function(_0x2a1eaf){if(_0x2a1eaf){return _0x2a1eaf[_0x22ef('0x21')](_0xfe8f4b)[_0x22ef('0x22')](function(_0x4fd136){return _0x4fd136;});}return null;};}function removeEntity(_0x24fe3c,_0x15d1c4){return function(_0x1187d3){if(_0x1187d3){return _0x1187d3[_0x22ef('0x23')]()[_0x22ef('0x22')](function(){_0x24fe3c[_0x22ef('0x16')](0xcc)['end']();});}};}function handleEntityNotFound(_0x59ce86,_0x15bb4b){return function(_0x53659d){if(!_0x53659d){_0x59ce86[_0x22ef('0x15')](0x194);}return _0x53659d;};}function handleError(_0x4da0d6,_0x25d7bd){_0x25d7bd=_0x25d7bd||0x1f4;return function(_0x1f9131){logger[_0x22ef('0x24')](_0x1f9131[_0x22ef('0x25')]);if(_0x1f9131[_0x22ef('0x26')]){delete _0x1f9131[_0x22ef('0x26')];}_0x4da0d6[_0x22ef('0x16')](_0x25d7bd)[_0x22ef('0x27')](_0x1f9131);};}exports['index']=function(_0x2b6c0c,_0x24e129){var _0x5b01e7={},_0x1c9ac6={},_0x57337b={'count':0x0,'rows':[]};var _0x35fc18=_['map'](db[_0x22ef('0x28')][_0x22ef('0x29')],function(_0xc9c422){return{'name':_0xc9c422[_0x22ef('0x2a')],'type':_0xc9c422[_0x22ef('0x2b')][_0x22ef('0x2c')]};});_0x1c9ac6['model']=_['map'](_0x35fc18,_0x22ef('0x26'));_0x1c9ac6[_0x22ef('0x2d')]=_[_0x22ef('0x2e')](_0x2b6c0c[_0x22ef('0x2d')]);_0x1c9ac6[_0x22ef('0x2f')]=_[_0x22ef('0x30')](_0x1c9ac6[_0x22ef('0x31')],_0x1c9ac6[_0x22ef('0x2d')]);_0x5b01e7[_0x22ef('0x32')]=_['intersection'](_0x1c9ac6[_0x22ef('0x31')],qs[_0x22ef('0x33')](_0x2b6c0c['query']['fields']));_0x5b01e7['attributes']=_0x5b01e7[_0x22ef('0x32')][_0x22ef('0x34')]?_0x5b01e7[_0x22ef('0x32')]:_0x1c9ac6[_0x22ef('0x31')];if(!_0x2b6c0c[_0x22ef('0x2d')]['hasOwnProperty'](_0x22ef('0x35'))){_0x5b01e7[_0x22ef('0x1b')]=qs[_0x22ef('0x1b')](_0x2b6c0c[_0x22ef('0x2d')][_0x22ef('0x1b')]);_0x5b01e7[_0x22ef('0x19')]=qs[_0x22ef('0x19')](_0x2b6c0c[_0x22ef('0x2d')][_0x22ef('0x19')]);}_0x5b01e7['order']=qs['sort'](_0x2b6c0c[_0x22ef('0x2d')]['sort']);_0x5b01e7[_0x22ef('0x36')]=qs[_0x22ef('0x2f')](_[_0x22ef('0x37')](_0x2b6c0c[_0x22ef('0x2d')],_0x1c9ac6[_0x22ef('0x2f')]),_0x35fc18);if(_0x2b6c0c[_0x22ef('0x2d')]['filter']){_0x5b01e7[_0x22ef('0x36')]=_[_0x22ef('0x38')](_0x5b01e7['where'],{'$or':_[_0x22ef('0x39')](_0x35fc18,function(_0x55aa79){if(_0x55aa79['type']!=='VIRTUAL'){var _0x2647ed={};_0x2647ed[_0x55aa79['name']]={'$like':'%'+_0x2b6c0c[_0x22ef('0x2d')][_0x22ef('0x3a')]+'%'};return _0x2647ed;}})});}_0x5b01e7=_[_0x22ef('0x38')]({},_0x5b01e7,_0x2b6c0c['options']);var _0x530cbb={'where':_0x5b01e7['where']};return db['FaxApplication'][_0x22ef('0x1c')](_0x530cbb)[_0x22ef('0x22')](function(_0x2d7299){_0x57337b[_0x22ef('0x1c')]=_0x2d7299;if(_0x2b6c0c['query']['includeAll']){_0x5b01e7[_0x22ef('0x3b')]=[{'all':!![]}];}return db[_0x22ef('0x28')]['findAll'](_0x5b01e7);})['then'](function(_0x405b96){_0x57337b[_0x22ef('0x3c')]=_0x405b96;return _0x57337b;})[_0x22ef('0x22')](respondWithFilteredResult(_0x24e129,_0x5b01e7))[_0x22ef('0x3d')](handleError(_0x24e129,null));};exports[_0x22ef('0x3e')]=function(_0x534579,_0x347b40){var _0x418c42={'raw':!![],'where':{'id':_0x534579['params']['id']}},_0x429593={};_0x429593[_0x22ef('0x31')]=_['keys'](db['FaxApplication'][_0x22ef('0x29')]);_0x429593[_0x22ef('0x2d')]=_[_0x22ef('0x2e')](_0x534579['query']);_0x429593[_0x22ef('0x2f')]=_[_0x22ef('0x30')](_0x429593[_0x22ef('0x31')],_0x429593['query']);_0x418c42['attributes']=_['intersection'](_0x429593[_0x22ef('0x31')],qs[_0x22ef('0x33')](_0x534579[_0x22ef('0x2d')]['fields']));_0x418c42[_0x22ef('0x32')]=_0x418c42[_0x22ef('0x32')][_0x22ef('0x34')]?_0x418c42[_0x22ef('0x32')]:_0x429593[_0x22ef('0x31')];if(_0x534579[_0x22ef('0x2d')]['includeAll']){_0x418c42[_0x22ef('0x3b')]=[{'all':!![]}];}_0x418c42=_[_0x22ef('0x38')]({},_0x418c42,_0x534579['options']);return db['FaxApplication'][_0x22ef('0x3f')](_0x418c42)['then'](handleEntityNotFound(_0x347b40,null))[_0x22ef('0x22')](respondWithResult(_0x347b40,null))['catch'](handleError(_0x347b40,null));};exports[_0x22ef('0x40')]=function(_0x15b87c,_0x191560){return db[_0x22ef('0x28')]['create'](_0x15b87c[_0x22ef('0x41')],{})[_0x22ef('0x22')](respondWithResult(_0x191560,0xc9))['catch'](handleError(_0x191560,null));};exports[_0x22ef('0x21')]=function(_0x40ffec,_0x4835e1){if(_0x40ffec[_0x22ef('0x41')]['id']){delete _0x40ffec[_0x22ef('0x41')]['id'];}return db['FaxApplication']['find']({'where':{'id':_0x40ffec[_0x22ef('0x42')]['id']}})[_0x22ef('0x22')](handleEntityNotFound(_0x4835e1,null))[_0x22ef('0x22')](saveUpdates(_0x40ffec['body'],null))[_0x22ef('0x22')](respondWithResult(_0x4835e1,null))[_0x22ef('0x3d')](handleError(_0x4835e1,null));};exports[_0x22ef('0x23')]=function(_0x5b886e,_0x277530){return db[_0x22ef('0x28')][_0x22ef('0x3f')]({'where':{'id':_0x5b886e[_0x22ef('0x42')]['id']}})['then'](handleEntityNotFound(_0x277530,null))[_0x22ef('0x22')](removeEntity(_0x277530,null))[_0x22ef('0x3d')](handleError(_0x277530,null));};
\ No newline at end of file
index 0b4c791..b62a383 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3370=['moment','bluebird','request-promise','path','rimraf','./faxApplication.attributes','define','FaxApplication','fax_applications','utf8mb4','utf8mb4_unicode_ci','lodash'];(function(_0x39a3cb,_0x5bc57f){var _0x410720=function(_0x34b92b){while(--_0x34b92b){_0x39a3cb['push'](_0x39a3cb['shift']());}};_0x410720(++_0x5bc57f);}(_0x3370,0x83));var _0x0337=function(_0x2dec6b,_0x126741){_0x2dec6b=_0x2dec6b-0x0;var _0x1dc756=_0x3370[_0x2dec6b];return _0x1dc756;};'use strict';var _=require(_0x0337('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x0337('0x1'));var BPromise=require(_0x0337('0x2'));var rp=require(_0x0337('0x3'));var fs=require('fs');var path=require(_0x0337('0x4'));var rimraf=require(_0x0337('0x5'));var config=require('../../config/environment');var attributes=require(_0x0337('0x6'));module['exports']=function(_0xd16ea9,_0x2c7b39){return _0xd16ea9[_0x0337('0x7')](_0x0337('0x8'),attributes,{'tableName':_0x0337('0x9'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x0337('0xa'),'collate':_0x0337('0xb')});};
\ No newline at end of file
+var _0xf854=['path','rimraf','../../config/environment','exports','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x18557c,_0xb09006){var _0x58bc5f=function(_0x1f955c){while(--_0x1f955c){_0x18557c['push'](_0x18557c['shift']());}};_0x58bc5f(++_0xb09006);}(_0xf854,0xe3));var _0x4f85=function(_0x4080ed,_0x174935){_0x4080ed=_0x4080ed-0x0;var _0x7d13cc=_0xf854[_0x4080ed];return _0x7d13cc;};'use strict';var _=require(_0x4f85('0x0'));var util=require(_0x4f85('0x1'));var logger=require(_0x4f85('0x2'))(_0x4f85('0x3'));var moment=require(_0x4f85('0x4'));var BPromise=require(_0x4f85('0x5'));var rp=require(_0x4f85('0x6'));var fs=require('fs');var path=require(_0x4f85('0x7'));var rimraf=require(_0x4f85('0x8'));var config=require(_0x4f85('0x9'));var attributes=require('./faxApplication.attributes');module[_0x4f85('0xa')]=function(_0xa93bf3,_0x17275c){return _0xa93bf3['define']('FaxApplication',attributes,{'tableName':'fax_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x4f85('0xb'),'collate':_0x4f85('0xc')});};
\ No newline at end of file
index d7f44bb..fdbcdca 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8498=['../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','FaxApplication,\x20%s,\x20%s','request\x20sent','debug','FaxApplication,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','UpdateFaxApplication','FaxApplication','update','body','options','raw','attributes','limit','lodash','moment','randomstring','ioredis'];(function(_0x34e111,_0x3c2abd){var _0x4dcc22=function(_0x5d9293){while(--_0x5d9293){_0x34e111['push'](_0x34e111['shift']());}};_0x4dcc22(++_0x3c2abd);}(_0x8498,0x70));var _0x8849=function(_0x16a71c,_0x1b2cd5){_0x16a71c=_0x16a71c-0x0;var _0xfb1a17=_0x8498[_0x16a71c];return _0xfb1a17;};'use strict';var _=require(_0x8849('0x0'));var util=require('util');var moment=require(_0x8849('0x1'));var BPromise=require('bluebird');var rs=require(_0x8849('0x2'));var fs=require('fs');var Redis=require(_0x8849('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x8849('0x4'))(_0x8849('0x5'));var config=require(_0x8849('0x6'));var jayson=require(_0x8849('0x7'));var client=jayson[_0x8849('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x2e3ba5,_0x48adb8,_0x59a0c4){return new BPromise(function(_0x5a5ab9,_0x424824){return client[_0x8849('0x9')](_0x2e3ba5,_0x59a0c4)[_0x8849('0xa')](function(_0x56bde7){logger[_0x8849('0xb')](_0x8849('0xc'),_0x48adb8,_0x8849('0xd'));logger[_0x8849('0xe')](_0x8849('0xf'),_0x48adb8,'request\x20sent',JSON[_0x8849('0x10')](_0x56bde7));if(_0x56bde7[_0x8849('0x11')]){if(_0x56bde7['error']['code']===0x1f4){logger[_0x8849('0x11')](_0x8849('0xc'),_0x48adb8,_0x56bde7[_0x8849('0x11')]['message']);return _0x424824(_0x56bde7['error'][_0x8849('0x12')]);}logger['error']('FaxApplication,\x20%s,\x20%s',_0x48adb8,_0x56bde7['error'][_0x8849('0x12')]);return _0x5a5ab9(_0x56bde7[_0x8849('0x11')][_0x8849('0x12')]);}else{logger[_0x8849('0xb')]('FaxApplication,\x20%s,\x20%s',_0x48adb8,'request\x20sent');_0x5a5ab9(_0x56bde7[_0x8849('0x13')]['message']);}})[_0x8849('0x14')](function(_0x2ec0a6){logger[_0x8849('0x11')](_0x8849('0xc'),_0x48adb8,_0x2ec0a6);_0x424824(_0x2ec0a6);});});}exports[_0x8849('0x15')]=function(_0x43125a){var _0x420bc3=this;return new Promise(function(_0x2b140a,_0x2d38b9){return db[_0x8849('0x16')][_0x8849('0x17')](_0x43125a[_0x8849('0x18')],{'raw':_0x43125a[_0x8849('0x19')]?_0x43125a[_0x8849('0x19')][_0x8849('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x43125a[_0x8849('0x19')]?_0x43125a['options']['where']||null:null,'attributes':_0x43125a[_0x8849('0x19')]?_0x43125a[_0x8849('0x19')][_0x8849('0x1b')]||null:null,'limit':_0x43125a[_0x8849('0x19')]?_0x43125a['options'][_0x8849('0x1c')]||null:null})[_0x8849('0xa')](function(_0x24ae46){logger[_0x8849('0xb')](_0x8849('0x15'),_0x43125a);logger[_0x8849('0xe')](_0x8849('0x15'),_0x43125a,JSON['stringify'](_0x24ae46));_0x2b140a(_0x24ae46);})[_0x8849('0x14')](function(_0x3f4919){logger['error']('UpdateFaxApplication',_0x3f4919[_0x8849('0x12')],_0x43125a);_0x2d38b9(_0x420bc3[_0x8849('0x11')](0x1f4,_0x3f4919[_0x8849('0x12')]));});});};
\ No newline at end of file
+var _0x9e33=['raw','where','attributes','debug','stringify','lodash','util','moment','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','then','FaxApplication,\x20%s,\x20%s','request\x20sent','FaxApplication,\x20%s,\x20%s,\x20%s','error','message','info','result','catch','UpdateFaxApplication','FaxApplication','update','options'];(function(_0x1aa834,_0x537c04){var _0x168810=function(_0xb8b21d){while(--_0xb8b21d){_0x1aa834['push'](_0x1aa834['shift']());}};_0x168810(++_0x537c04);}(_0x9e33,0x144));var _0x39e3=function(_0x2211ed,_0x1bca0b){_0x2211ed=_0x2211ed-0x0;var _0x4d78cc=_0x9e33[_0x2211ed];return _0x4d78cc;};'use strict';var _=require(_0x39e3('0x0'));var util=require(_0x39e3('0x1'));var moment=require(_0x39e3('0x2'));var BPromise=require(_0x39e3('0x3'));var rs=require(_0x39e3('0x4'));var fs=require('fs');var Redis=require(_0x39e3('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x39e3('0x6'))(_0x39e3('0x7'));var config=require(_0x39e3('0x8'));var jayson=require(_0x39e3('0x9'));var client=jayson[_0x39e3('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4d2cb4,_0x3da195,_0x4a7806){return new BPromise(function(_0x38ce81,_0x50a66a){return client['request'](_0x4d2cb4,_0x4a7806)[_0x39e3('0xb')](function(_0x1add3b){logger['info'](_0x39e3('0xc'),_0x3da195,_0x39e3('0xd'));logger['debug'](_0x39e3('0xe'),_0x3da195,'request\x20sent',JSON['stringify'](_0x1add3b));if(_0x1add3b['error']){if(_0x1add3b[_0x39e3('0xf')]['code']===0x1f4){logger[_0x39e3('0xf')]('FaxApplication,\x20%s,\x20%s',_0x3da195,_0x1add3b[_0x39e3('0xf')][_0x39e3('0x10')]);return _0x50a66a(_0x1add3b[_0x39e3('0xf')][_0x39e3('0x10')]);}logger[_0x39e3('0xf')](_0x39e3('0xc'),_0x3da195,_0x1add3b[_0x39e3('0xf')]['message']);return _0x38ce81(_0x1add3b[_0x39e3('0xf')][_0x39e3('0x10')]);}else{logger[_0x39e3('0x11')](_0x39e3('0xc'),_0x3da195,_0x39e3('0xd'));_0x38ce81(_0x1add3b[_0x39e3('0x12')][_0x39e3('0x10')]);}})[_0x39e3('0x13')](function(_0x7c86b4){logger[_0x39e3('0xf')](_0x39e3('0xc'),_0x3da195,_0x7c86b4);_0x50a66a(_0x7c86b4);});});}exports[_0x39e3('0x14')]=function(_0x1e2a2d){var _0x5074d6=this;return new Promise(function(_0x35cdfc,_0x2deb2b){return db[_0x39e3('0x15')][_0x39e3('0x16')](_0x1e2a2d['body'],{'raw':_0x1e2a2d[_0x39e3('0x17')]?_0x1e2a2d['options'][_0x39e3('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1e2a2d[_0x39e3('0x17')]?_0x1e2a2d['options'][_0x39e3('0x19')]||null:null,'attributes':_0x1e2a2d[_0x39e3('0x17')]?_0x1e2a2d[_0x39e3('0x17')][_0x39e3('0x1a')]||null:null,'limit':_0x1e2a2d['options']?_0x1e2a2d[_0x39e3('0x17')]['limit']||null:null})['then'](function(_0x2b9a07){logger[_0x39e3('0x11')](_0x39e3('0x14'),_0x1e2a2d);logger[_0x39e3('0x1b')]('UpdateFaxApplication',_0x1e2a2d,JSON[_0x39e3('0x1c')](_0x2b9a07));_0x35cdfc(_0x2b9a07);})[_0x39e3('0x13')](function(_0x50b636){logger[_0x39e3('0xf')]('UpdateFaxApplication',_0x50b636[_0x39e3('0x10')],_0x1e2a2d);_0x2deb2b(_0x5074d6[_0x39e3('0xf')](0x1f4,_0x50b636[_0x39e3('0x10')]));});});};
\ No newline at end of file
index 8c05a2e..d18404e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xda2d=['isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy','exports','util','path','connect-timeout','express','Router','../../config/environment','./faxApplication.controller','get'];(function(_0x3e3f27,_0x2c2ecf){var _0x15c868=function(_0x4b348d){while(--_0x4b348d){_0x3e3f27['push'](_0x3e3f27['shift']());}};_0x15c868(++_0x2c2ecf);}(_0xda2d,0x102));var _0xdda2=function(_0x8680a1,_0x160fc0){_0x8680a1=_0x8680a1-0x0;var _0x3036c5=_0xda2d[_0x8680a1];return _0x3036c5;};'use strict';var multer=require('multer');var util=require(_0xdda2('0x0'));var path=require(_0xdda2('0x1'));var timeout=require(_0xdda2('0x2'));var express=require(_0xdda2('0x3'));var router=express[_0xdda2('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xdda2('0x5'));var controller=require(_0xdda2('0x6'));router[_0xdda2('0x7')]('/',auth[_0xdda2('0x8')](),controller[_0xdda2('0x9')]);router[_0xdda2('0x7')](_0xdda2('0xa'),auth[_0xdda2('0x8')](),controller[_0xdda2('0xb')]);router[_0xdda2('0xc')]('/',auth['isAuthenticated'](),controller[_0xdda2('0xd')]);router[_0xdda2('0xe')]('/:id',auth[_0xdda2('0x8')](),controller[_0xdda2('0xf')]);router[_0xdda2('0x10')](_0xdda2('0xa'),auth[_0xdda2('0x8')](),controller[_0xdda2('0x11')]);module[_0xdda2('0x12')]=router;
\ No newline at end of file
+var _0x0abf=['isAuthenticated','index','show','post','put','/:id','destroy','exports','multer','path','connect-timeout','fs-extra','../../components/interaction/service','../../config/environment','./faxApplication.controller','get'];(function(_0x565ed7,_0x398228){var _0x183ad7=function(_0x5a43d7){while(--_0x5a43d7){_0x565ed7['push'](_0x565ed7['shift']());}};_0x183ad7(++_0x398228);}(_0x0abf,0xe8));var _0xf0ab=function(_0x2b4411,_0x2625ed){_0x2b4411=_0x2b4411-0x0;var _0x8e41ef=_0x0abf[_0x2b4411];return _0x8e41ef;};'use strict';var multer=require(_0xf0ab('0x0'));var util=require('util');var path=require(_0xf0ab('0x1'));var timeout=require(_0xf0ab('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0xf0ab('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0xf0ab('0x4'));var config=require(_0xf0ab('0x5'));var controller=require(_0xf0ab('0x6'));router[_0xf0ab('0x7')]('/',auth[_0xf0ab('0x8')](),controller[_0xf0ab('0x9')]);router[_0xf0ab('0x7')]('/:id',auth[_0xf0ab('0x8')](),controller[_0xf0ab('0xa')]);router[_0xf0ab('0xb')]('/',auth[_0xf0ab('0x8')](),controller['create']);router[_0xf0ab('0xc')](_0xf0ab('0xd'),auth[_0xf0ab('0x8')](),controller['update']);router['delete'](_0xf0ab('0xd'),auth['isAuthenticated'](),controller[_0xf0ab('0xe')]);module[_0xf0ab('0xf')]=router;
\ No newline at end of file
index 225495b..904e01b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfb11=['STRING','ENUM','INTEGER','sequelize','BOOLEAN','DATE'];(function(_0x22c0c7,_0x4e19a8){var _0x644891=function(_0x3963a8){while(--_0x3963a8){_0x22c0c7['push'](_0x22c0c7['shift']());}};_0x644891(++_0x4e19a8);}(_0xfb11,0x1ad));var _0x1fb1=function(_0xea8947,_0x1b573d){_0xea8947=_0xea8947-0x0;var _0x2455e9=_0xfb11[_0xea8947];return _0x2455e9;};'use strict';var Sequelize=require(_0x1fb1('0x0'));module['exports']={'closed':{'type':Sequelize[_0x1fb1('0x1')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x1fb1('0x2')]},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize[_0x1fb1('0x3')]},'thirdDisposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0x1fb1('0x3')]},'read1stAt':{'type':Sequelize['DATE']},'fax':{'type':Sequelize[_0x1fb1('0x3')]},'firstMsgDirection':{'type':Sequelize[_0x1fb1('0x4')]('in','out'),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x1fb1('0x2')]},'lastMsgDirection':{'type':Sequelize[_0x1fb1('0x4')]('in','out'),'defaultValue':'in','allowNull':![]},'queueId':{'type':Sequelize[_0x1fb1('0x5')]}};
\ No newline at end of file
+var _0x0adf=['out','INTEGER','sequelize','exports','BOOLEAN','STRING','DATE','ENUM'];(function(_0xe675ad,_0x511282){var _0x59005f=function(_0x49dc09){while(--_0x49dc09){_0xe675ad['push'](_0xe675ad['shift']());}};_0x59005f(++_0x511282);}(_0x0adf,0x1d2));var _0xf0ad=function(_0x34e8ea,_0x5a5e15){_0x34e8ea=_0x34e8ea-0x0;var _0x541235=_0x0adf[_0x34e8ea];return _0x541235;};'use strict';var Sequelize=require(_0xf0ad('0x0'));module[_0xf0ad('0x1')]={'closed':{'type':Sequelize[_0xf0ad('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0xf0ad('0x3')]},'secondDisposition':{'type':Sequelize[_0xf0ad('0x3')]},'thirdDisposition':{'type':Sequelize[_0xf0ad('0x3')]},'note':{'type':Sequelize[_0xf0ad('0x3')]},'read1stAt':{'type':Sequelize[_0xf0ad('0x4')]},'fax':{'type':Sequelize[_0xf0ad('0x3')]},'firstMsgDirection':{'type':Sequelize[_0xf0ad('0x5')]('in','out'),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0xf0ad('0x4')]},'lastMsgDirection':{'type':Sequelize['ENUM']('in',_0xf0ad('0x6')),'defaultValue':'in','allowNull':![]},'queueId':{'type':Sequelize[_0xf0ad('0x7')]}};
\ No newline at end of file
index 42d3ee3..e3eb243 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0bb5=['limit','set','Content-Range','update','then','destroy','error','stack','name','index','map','FaxInteraction','rawAttributes','fieldName','type','findAll','fax','query','user','catch','show','params','model','keys','filters','intersection','attributes','fields','length','includeAll','include','options','create','body','find','describe','addMessage','FaxMessage','ids','omit','getMessages','hasOwnProperty','nolimit','sort','pick','where','FaxInteractionId','filter','$gte','split','format','merge','rows','addTags','setTags','spread','Tag','color','emit','faxInteractionTags:save','removeTags','download','unix','root','server','files','join','attachments','transcript-%d-%s.zip','push','Attachment','Messages','createdAt','mkdirSync','createReadStream','pipe','createWriteStream','basename','log','err','unlinkSync','zip-dir','bluebird','util','path','lodash','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./faxInteraction.socket','register','sendStatus','status','end','json','offset','undefined','count'];(function(_0x9c08ca,_0x4d3960){var _0x26541e=function(_0x3a5967){while(--_0x3a5967){_0x9c08ca['push'](_0x9c08ca['shift']());}};_0x26541e(++_0x4d3960);}(_0x0bb5,0x123));var _0x50bb=function(_0x383771,_0x50572d){_0x383771=_0x383771-0x0;var _0x37461d=_0x0bb5[_0x383771];return _0x37461d;};'use strict';var rimraf=require('rimraf');var zipdir=require(_0x50bb('0x0'));var moment=require('moment');var BPromise=require(_0x50bb('0x1'));var util=require(_0x50bb('0x2'));var path=require(_0x50bb('0x3'));var fs=require('fs');var _=require(_0x50bb('0x4'));var Redis=require(_0x50bb('0x5'));var interaction=require('../../components/interaction/service');var qs=require(_0x50bb('0x6'));var logger=require(_0x50bb('0x7'))(_0x50bb('0x8'));var config=require(_0x50bb('0x9'));var db=require(_0x50bb('0xa'))['db'];config[_0x50bb('0xb')]=_[_0x50bb('0xc')](config['redis'],{'host':_0x50bb('0xd'),'port':0x18eb});var socket=require(_0x50bb('0xe'))(new Redis(config[_0x50bb('0xb')]));require(_0x50bb('0xf'))[_0x50bb('0x10')](socket);function respondWithStatusCode(_0x239ad0,_0x56f3df){_0x56f3df=_0x56f3df||0xcc;return function(_0x7489de){if(_0x7489de){return _0x239ad0[_0x50bb('0x11')](_0x56f3df);}return _0x239ad0[_0x50bb('0x12')](_0x56f3df)[_0x50bb('0x13')]();};}function respondWithResult(_0x219ac1,_0x41553e){_0x41553e=_0x41553e||0xc8;return function(_0x1b3ca5){if(_0x1b3ca5){return _0x219ac1[_0x50bb('0x12')](_0x41553e)[_0x50bb('0x14')](_0x1b3ca5);}};}function respondWithFilteredResult(_0x4f3fee,_0x702564){return function(_0x20f5c0){if(_0x20f5c0){var _0x43ca0b=typeof _0x702564[_0x50bb('0x15')]===_0x50bb('0x16')&&typeof _0x702564['limit']===_0x50bb('0x16');var _0x5e56a4=_0x20f5c0[_0x50bb('0x17')];var _0x4677b1=_0x43ca0b?0x0:_0x702564[_0x50bb('0x15')];var _0x110855=_0x43ca0b?_0x20f5c0[_0x50bb('0x17')]:_0x702564['offset']+_0x702564[_0x50bb('0x18')];var _0x221dc3;if(_0x110855>=_0x5e56a4){_0x110855=_0x5e56a4;_0x221dc3=0xc8;}else{_0x221dc3=0xce;}_0x4f3fee[_0x50bb('0x12')](_0x221dc3);return _0x4f3fee[_0x50bb('0x19')](_0x50bb('0x1a'),_0x4677b1+'-'+_0x110855+'/'+_0x5e56a4)[_0x50bb('0x14')](_0x20f5c0);}return null;};}function saveUpdates(_0x324c8c){return function(_0x37c84f){if(_0x37c84f){return _0x37c84f[_0x50bb('0x1b')](_0x324c8c)[_0x50bb('0x1c')](function(_0x5e26f0){return _0x5e26f0;});}return null;};}function removeEntity(_0x13a529){return function(_0x38f575){if(_0x38f575){return _0x38f575[_0x50bb('0x1d')]()['then'](function(){_0x13a529['status'](0xcc)[_0x50bb('0x13')]();});}};}function handleEntityNotFound(_0x5f5548){return function(_0x3f0874){if(!_0x3f0874){_0x5f5548[_0x50bb('0x11')](0x194);}return _0x3f0874;};}function handleError(_0xffda02,_0x300169){_0x300169=_0x300169||0x1f4;return function(_0x133fbc){logger[_0x50bb('0x1e')](_0x133fbc[_0x50bb('0x1f')]);if(_0x133fbc['name']){delete _0x133fbc[_0x50bb('0x20')];}_0xffda02[_0x50bb('0x12')](_0x300169)['send'](_0x133fbc);};}exports[_0x50bb('0x21')]=function(_0x543430,_0x276510){var _0xa7b231={};var _0x2c9c2c=_[_0x50bb('0x22')](db[_0x50bb('0x23')][_0x50bb('0x24')],function(_0x1335b5){return{'name':_0x1335b5[_0x50bb('0x25')],'type':_0x1335b5[_0x50bb('0x26')]['key']};});_0xa7b231=qs['getOptions'](_0x2c9c2c,_0x543430);return interaction[_0x50bb('0x27')](_0x50bb('0x28'),_0x543430[_0x50bb('0x29')],_0x543430[_0x50bb('0x2a')],_0xa7b231,_0x2c9c2c)['then'](respondWithFilteredResult(_0x276510,_0xa7b231))[_0x50bb('0x2b')](handleError(_0x276510,null));};exports[_0x50bb('0x2c')]=function(_0xd83b7a,_0x7af0a1){var _0x51d8f8={'raw':![],'where':{'id':_0xd83b7a[_0x50bb('0x2d')]['id']}},_0x43b995={};_0x43b995[_0x50bb('0x2e')]=_[_0x50bb('0x2f')](db[_0x50bb('0x23')][_0x50bb('0x24')]);_0x43b995['query']=_[_0x50bb('0x2f')](_0xd83b7a[_0x50bb('0x29')]);_0x43b995[_0x50bb('0x30')]=_[_0x50bb('0x31')](_0x43b995[_0x50bb('0x2e')],_0x43b995['query']);_0x51d8f8[_0x50bb('0x32')]=_['intersection'](_0x43b995['model'],qs[_0x50bb('0x33')](_0xd83b7a['query'][_0x50bb('0x33')]));_0x51d8f8[_0x50bb('0x32')]=_0x51d8f8[_0x50bb('0x32')][_0x50bb('0x34')]?_0x51d8f8['attributes']:_0x43b995[_0x50bb('0x2e')];if(_0xd83b7a[_0x50bb('0x29')][_0x50bb('0x35')]){_0x51d8f8[_0x50bb('0x36')]=[{'all':!![]}];}_0x51d8f8=_['merge']({},_0x51d8f8,_0xd83b7a[_0x50bb('0x37')]);return db[_0x50bb('0x23')]['find'](_0x51d8f8)[_0x50bb('0x1c')](handleEntityNotFound(_0x7af0a1,null))[_0x50bb('0x1c')](respondWithResult(_0x7af0a1,null))['catch'](handleError(_0x7af0a1,null));};exports[_0x50bb('0x38')]=function(_0x562eab,_0x5a5657){return db[_0x50bb('0x23')][_0x50bb('0x38')](_0x562eab[_0x50bb('0x39')],{})[_0x50bb('0x1c')](respondWithResult(_0x5a5657,0xc9))[_0x50bb('0x2b')](handleError(_0x5a5657,null));};exports[_0x50bb('0x1b')]=function(_0x5339af,_0x29bf78){if(_0x5339af[_0x50bb('0x39')]['id']){delete _0x5339af[_0x50bb('0x39')]['id'];}return db['FaxInteraction'][_0x50bb('0x3a')]({'where':{'id':_0x5339af[_0x50bb('0x2d')]['id']}})[_0x50bb('0x1c')](handleEntityNotFound(_0x29bf78,null))[_0x50bb('0x1c')](saveUpdates(_0x5339af[_0x50bb('0x39')],null))[_0x50bb('0x1c')](respondWithResult(_0x29bf78,null))[_0x50bb('0x2b')](handleError(_0x29bf78,null));};exports[_0x50bb('0x1d')]=function(_0x55b2a8,_0x47098f){return db[_0x50bb('0x23')][_0x50bb('0x3a')]({'where':{'id':_0x55b2a8['params']['id']}})[_0x50bb('0x1c')](handleEntityNotFound(_0x47098f,null))['then'](removeEntity(_0x47098f,null))['catch'](handleError(_0x47098f,null));};exports[_0x50bb('0x3b')]=function(_0x27c8fa,_0x351ef0){return db['FaxInteraction'][_0x50bb('0x3b')]()[_0x50bb('0x1c')](respondWithResult(_0x351ef0,null))[_0x50bb('0x2b')](handleError(_0x351ef0,null));};exports[_0x50bb('0x3c')]=function(_0xad30af,_0x4e8c09){return db[_0x50bb('0x3d')]['find']({'where':{'id':_0xad30af['params']['id']}})[_0x50bb('0x1c')](handleEntityNotFound(_0x4e8c09,null))['then'](function(_0x10bebe){if(_0x10bebe){return _0x10bebe[_0x50bb('0x3c')](_0xad30af[_0x50bb('0x39')][_0x50bb('0x3e')],_[_0x50bb('0x3f')](_0xad30af[_0x50bb('0x39')],[_0x50bb('0x3e'),'id'])||{});}})[_0x50bb('0x1c')](respondWithResult(_0x4e8c09,null))[_0x50bb('0x2b')](handleError(_0x4e8c09,null));};exports[_0x50bb('0x40')]=function(_0x272786,_0x3694d2){var _0x7a78bf={'raw':![],'where':{}};var _0x23a9a6={};var _0x3cc12e={'count':0x0,'rows':[]};return db[_0x50bb('0x23')]['findOne']({'where':{'id':_0x272786[_0x50bb('0x2d')]['id']}})['then'](handleEntityNotFound(_0x3694d2,null))[_0x50bb('0x1c')](function(_0x7ad533){if(_0x7ad533){_0x23a9a6['model']=_[_0x50bb('0x2f')](db[_0x50bb('0x3d')][_0x50bb('0x24')]);_0x23a9a6[_0x50bb('0x29')]=_[_0x50bb('0x2f')](_0x272786[_0x50bb('0x29')]);_0x23a9a6[_0x50bb('0x30')]=_[_0x50bb('0x31')](_0x23a9a6[_0x50bb('0x2e')],_0x23a9a6[_0x50bb('0x29')]);_0x7a78bf['attributes']=_['intersection'](_0x23a9a6[_0x50bb('0x2e')],qs[_0x50bb('0x33')](_0x272786[_0x50bb('0x29')][_0x50bb('0x33')]));_0x7a78bf['attributes']=_0x7a78bf[_0x50bb('0x32')][_0x50bb('0x34')]?_0x7a78bf[_0x50bb('0x32')]:_0x23a9a6['model'];if(!_0x272786[_0x50bb('0x29')][_0x50bb('0x41')](_0x50bb('0x42'))){_0x7a78bf[_0x50bb('0x18')]=qs[_0x50bb('0x18')](_0x272786[_0x50bb('0x29')][_0x50bb('0x18')]);_0x7a78bf[_0x50bb('0x15')]=qs[_0x50bb('0x15')](_0x272786[_0x50bb('0x29')][_0x50bb('0x15')]);}_0x7a78bf['order']=qs[_0x50bb('0x43')](_0x272786[_0x50bb('0x29')][_0x50bb('0x43')]);_0x7a78bf['where']=qs[_0x50bb('0x30')](_[_0x50bb('0x44')](_0x272786[_0x50bb('0x29')],_0x23a9a6[_0x50bb('0x30')]));_0x7a78bf[_0x50bb('0x45')][_0x50bb('0x46')]=_0x7ad533['id'];if(_0x272786[_0x50bb('0x29')][_0x50bb('0x47')]){_0x7a78bf[_0x50bb('0x45')]=_['merge'](_0x7a78bf[_0x50bb('0x45')],{'$or':_[_0x50bb('0x22')](_0x7a78bf[_0x50bb('0x32')],function(_0x372893){var _0x36ce70={};_0x36ce70[_0x372893]={'$like':'%'+_0x272786[_0x50bb('0x29')][_0x50bb('0x47')]+'%'};return _0x36ce70;})});}if(_0x272786[_0x50bb('0x29')][_0x50bb('0x48')]){var _0xdb910e=_0x272786[_0x50bb('0x29')][_0x50bb('0x48')][_0x50bb('0x49')](',');var _0x4f23ff={};_0x4f23ff[_0xdb910e[0x0]]={'$gte':moment(_0xdb910e[0x1])[_0x50bb('0x4a')]('YYYY-MM-DD\x20HH:mm:ss')};_0x7a78bf[_0x50bb('0x45')]=_[_0x50bb('0x4b')](_0x7a78bf[_0x50bb('0x45')],_0x4f23ff);}_0x7a78bf=_['merge']({},_0x7a78bf,_0x272786[_0x50bb('0x37')]);return db[_0x50bb('0x3d')][_0x50bb('0x17')]({'where':_0x7a78bf[_0x50bb('0x45')]})[_0x50bb('0x1c')](function(_0x20d850){_0x3cc12e['count']=_0x20d850;if(_0x272786[_0x50bb('0x29')][_0x50bb('0x35')]){_0x7a78bf['include']=[{'all':!![]}];}return db['FaxMessage'][_0x50bb('0x27')](_0x7a78bf);})[_0x50bb('0x1c')](function(_0x40100c){_0x3cc12e[_0x50bb('0x4c')]=_0x40100c;return _0x3cc12e;});}})[_0x50bb('0x1c')](respondWithFilteredResult(_0x3694d2,_0x7a78bf))[_0x50bb('0x2b')](handleError(_0x3694d2,null));};exports[_0x50bb('0x4d')]=function(_0x445abf,_0x2db78f){return db['FaxInteraction'][_0x50bb('0x3a')]({'where':{'id':_0x445abf['params']['id']}})['then'](handleEntityNotFound(_0x2db78f,null))[_0x50bb('0x1c')](function(_0x319ce0){if(_0x319ce0){return _0x319ce0[_0x50bb('0x4e')](_0x445abf[_0x50bb('0x39')][_0x50bb('0x3e')],_[_0x50bb('0x3f')](_0x445abf[_0x50bb('0x39')],[_0x50bb('0x3e'),'id'])||{})[_0x50bb('0x4f')](function(){return db[_0x50bb('0x50')]['findAll']({'attributes':['id',_0x50bb('0x20'),_0x50bb('0x51')],'where':{'id':_0x445abf['body']['ids']}});})[_0x50bb('0x1c')](function(_0x52b189){socket[_0x50bb('0x52')](_0x50bb('0x53'),{'id':Number(_0x445abf[_0x50bb('0x2d')]['id']),'tags':_0x52b189||[]});return{'id':Number(_0x445abf['params']['id']),'tags':_0x52b189||[]};});}})[_0x50bb('0x1c')](respondWithResult(_0x2db78f,null))[_0x50bb('0x2b')](handleError(_0x2db78f,null));};exports[_0x50bb('0x54')]=function(_0x3cc020,_0x4d95fc){return db['FaxInteraction']['find']({'where':{'id':_0x3cc020[_0x50bb('0x2d')]['id']}})[_0x50bb('0x1c')](handleEntityNotFound(_0x4d95fc,null))['then'](function(_0x2d04f4){if(_0x2d04f4){return _0x2d04f4[_0x50bb('0x54')](_0x3cc020[_0x50bb('0x29')][_0x50bb('0x3e')]);}})[_0x50bb('0x1c')](respondWithStatusCode(_0x4d95fc,null))[_0x50bb('0x2b')](handleError(_0x4d95fc,null));};exports[_0x50bb('0x55')]=function(_0x4e0b6a,_0x1c4919){var _0x4c3db0=moment()[_0x50bb('0x56')]()['toString']();var _0x56c398=path['join'](config[_0x50bb('0x57')],_0x50bb('0x58'),_0x50bb('0x59'),'tmp');var _0xc356a1=path[_0x50bb('0x5a')](config[_0x50bb('0x57')],'server',_0x50bb('0x59'),_0x50bb('0x5b'));var _0x3e29f1=path[_0x50bb('0x5a')](_0x56c398,_0x4c3db0);var _0x20d945=util['format'](_0x50bb('0x5c'),_0x4e0b6a['params']['id'],_0x4c3db0);var _0x29edf2=path['join'](_0x56c398,_0x20d945);var _0x131df5=[];_0x131df5[_0x50bb('0x5d')]({'model':db[_0x50bb('0x5e')],'as':_0x50bb('0x5e'),'raw':!![]});var _0x6a41da=[{'model':db[_0x50bb('0x3d')],'as':_0x50bb('0x5f'),'attributes':['id',_0x50bb('0x39'),_0x50bb('0x60')],'include':_0x131df5}];return db[_0x50bb('0x23')][_0x50bb('0x3a')]({'where':{'id':_0x4e0b6a[_0x50bb('0x2d')]['id']},'include':_0x6a41da})[_0x50bb('0x1c')](handleEntityNotFound(_0x1c4919,null))['then'](function(_0x17abe7){if(_0x17abe7&&_0x17abe7[_0x50bb('0x5f')]){var _0x8b4acc=_0x17abe7['get']({'plain':!![]});fs[_0x50bb('0x61')](_0x3e29f1);for(var _0x532f33=0x0;_0x532f33<_0x8b4acc[_0x50bb('0x5f')][_0x50bb('0x34')];_0x532f33++){var _0x35c25d=_0x8b4acc['Messages'][_0x532f33][_0x50bb('0x5e')];if(_0x35c25d){var _0x4298ad=path[_0x50bb('0x5a')](_0xc356a1,_0x35c25d['basename']);if(fs['existsSync'](_0x4298ad)){fs[_0x50bb('0x62')](_0x4298ad)[_0x50bb('0x63')](fs[_0x50bb('0x64')](path[_0x50bb('0x5a')](_0x3e29f1,_0x35c25d[_0x50bb('0x65')])));}}}return BPromise['resolve']()['then'](function(){return new BPromise(function(_0x58ec2a,_0x5107d2){zipdir(_0x3e29f1,{'saveTo':_0x29edf2},function(_0x55e504,_0x3633dd){if(_0x55e504)return _0x5107d2(_0x55e504);return _0x58ec2a(_0x3633dd);});})[_0x50bb('0x1c')](function(){return new BPromise(function(_0x1c6179,_0x38fb33){rimraf(_0x3e29f1,function(_0x21178f){if(_0x21178f)_0x38fb33(_0x21178f);return _0x1c6179();});});})['then'](function(){return _0x1c4919['download'](_0x29edf2,_0x20d945,function(_0x2e4cf3){if(_0x2e4cf3){console[_0x50bb('0x66')](_0x50bb('0x67'),_0x2e4cf3);}else{fs[_0x50bb('0x68')](_0x29edf2);}});});});}else{return _0x1c4919[_0x50bb('0x11')](0xc8);}})[_0x50bb('0x2b')](handleError(_0x1c4919,null));};
\ No newline at end of file
+var _0x08e9=['ids','omit','findOne','hasOwnProperty','nolimit','sort','where','pick','filter','merge','$gte','format','YYYY-MM-DD\x20HH:mm:ss','options','rows','addTags','setTags','findAll','color','removeTags','download','unix','join','root','files','attachments','transcript-%d-%s.zip','push','Attachment','Messages','createdAt','get','mkdirSync','basename','existsSync','createReadStream','pipe','createWriteStream','resolve','log','err','unlinkSync','rimraf','moment','bluebird','util','path','ioredis','../../components/interaction/service','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','./faxInteraction.socket','register','json','undefined','limit','offset','count','set','Content-Range','update','then','destroy','status','sendStatus','stack','name','send','index','map','FaxInteraction','fieldName','key','getOptions','query','keys','rawAttributes','filters','attributes','intersection','model','fields','length','includeAll','include','find','catch','create','body','params','describe','addMessage','FaxMessage'];(function(_0x2e8180,_0x2eae3a){var _0x53894d=function(_0x3650c7){while(--_0x3650c7){_0x2e8180['push'](_0x2e8180['shift']());}};_0x53894d(++_0x2eae3a);}(_0x08e9,0x8d));var _0x908e=function(_0x5baa98,_0x9e5c5){_0x5baa98=_0x5baa98-0x0;var _0x5b8e22=_0x08e9[_0x5baa98];return _0x5b8e22;};'use strict';var rimraf=require(_0x908e('0x0'));var zipdir=require('zip-dir');var moment=require(_0x908e('0x1'));var BPromise=require(_0x908e('0x2'));var util=require(_0x908e('0x3'));var path=require(_0x908e('0x4'));var fs=require('fs');var _=require('lodash');var Redis=require(_0x908e('0x5'));var interaction=require(_0x908e('0x6'));var qs=require(_0x908e('0x7'));var logger=require(_0x908e('0x8'))(_0x908e('0x9'));var config=require(_0x908e('0xa'));var db=require(_0x908e('0xb'))['db'];config[_0x908e('0xc')]=_[_0x908e('0xd')](config[_0x908e('0xc')],{'host':_0x908e('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x908e('0xc')]));require(_0x908e('0xf'))[_0x908e('0x10')](socket);function respondWithStatusCode(_0x5b92a9,_0x5f41b2){_0x5f41b2=_0x5f41b2||0xcc;return function(_0x25b12f){if(_0x25b12f){return _0x5b92a9['sendStatus'](_0x5f41b2);}return _0x5b92a9['status'](_0x5f41b2)['end']();};}function respondWithResult(_0x20aa08,_0x2fe9e0){_0x2fe9e0=_0x2fe9e0||0xc8;return function(_0x499509){if(_0x499509){return _0x20aa08['status'](_0x2fe9e0)[_0x908e('0x11')](_0x499509);}};}function respondWithFilteredResult(_0x55a6aa,_0x4fad47){return function(_0x2c9d1a){if(_0x2c9d1a){var _0x146f65=typeof _0x4fad47['offset']===_0x908e('0x12')&&typeof _0x4fad47[_0x908e('0x13')]==='undefined';var _0x4b4065=_0x2c9d1a['count'];var _0x24d87d=_0x146f65?0x0:_0x4fad47[_0x908e('0x14')];var _0x2c8ac0=_0x146f65?_0x2c9d1a[_0x908e('0x15')]:_0x4fad47[_0x908e('0x14')]+_0x4fad47[_0x908e('0x13')];var _0x23d952;if(_0x2c8ac0>=_0x4b4065){_0x2c8ac0=_0x4b4065;_0x23d952=0xc8;}else{_0x23d952=0xce;}_0x55a6aa['status'](_0x23d952);return _0x55a6aa[_0x908e('0x16')](_0x908e('0x17'),_0x24d87d+'-'+_0x2c8ac0+'/'+_0x4b4065)[_0x908e('0x11')](_0x2c9d1a);}return null;};}function saveUpdates(_0x3016fa){return function(_0x322f39){if(_0x322f39){return _0x322f39[_0x908e('0x18')](_0x3016fa)[_0x908e('0x19')](function(_0x24ccc1){return _0x24ccc1;});}return null;};}function removeEntity(_0x208545){return function(_0x1688c3){if(_0x1688c3){return _0x1688c3[_0x908e('0x1a')]()[_0x908e('0x19')](function(){_0x208545[_0x908e('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x25cad5){return function(_0x2b180c){if(!_0x2b180c){_0x25cad5[_0x908e('0x1c')](0x194);}return _0x2b180c;};}function handleError(_0x263d0c,_0x16101d){_0x16101d=_0x16101d||0x1f4;return function(_0x447e56){logger['error'](_0x447e56[_0x908e('0x1d')]);if(_0x447e56[_0x908e('0x1e')]){delete _0x447e56['name'];}_0x263d0c['status'](_0x16101d)[_0x908e('0x1f')](_0x447e56);};}exports[_0x908e('0x20')]=function(_0x588a1a,_0x55939d){var _0x2a323d={};var _0x623466=_[_0x908e('0x21')](db[_0x908e('0x22')]['rawAttributes'],function(_0x126251){return{'name':_0x126251[_0x908e('0x23')],'type':_0x126251['type'][_0x908e('0x24')]};});_0x2a323d=qs[_0x908e('0x25')](_0x623466,_0x588a1a);return interaction['findAll']('fax',_0x588a1a[_0x908e('0x26')],_0x588a1a['user'],_0x2a323d,_0x623466)[_0x908e('0x19')](respondWithFilteredResult(_0x55939d,_0x2a323d))['catch'](handleError(_0x55939d,null));};exports['show']=function(_0x2c86b7,_0x5c219a){var _0x733f59={'raw':![],'where':{'id':_0x2c86b7['params']['id']}},_0x57df0f={};_0x57df0f['model']=_[_0x908e('0x27')](db['FaxInteraction'][_0x908e('0x28')]);_0x57df0f[_0x908e('0x26')]=_[_0x908e('0x27')](_0x2c86b7['query']);_0x57df0f[_0x908e('0x29')]=_['intersection'](_0x57df0f['model'],_0x57df0f[_0x908e('0x26')]);_0x733f59[_0x908e('0x2a')]=_[_0x908e('0x2b')](_0x57df0f[_0x908e('0x2c')],qs['fields'](_0x2c86b7[_0x908e('0x26')][_0x908e('0x2d')]));_0x733f59[_0x908e('0x2a')]=_0x733f59['attributes'][_0x908e('0x2e')]?_0x733f59[_0x908e('0x2a')]:_0x57df0f[_0x908e('0x2c')];if(_0x2c86b7[_0x908e('0x26')][_0x908e('0x2f')]){_0x733f59[_0x908e('0x30')]=[{'all':!![]}];}_0x733f59=_['merge']({},_0x733f59,_0x2c86b7['options']);return db[_0x908e('0x22')][_0x908e('0x31')](_0x733f59)[_0x908e('0x19')](handleEntityNotFound(_0x5c219a,null))[_0x908e('0x19')](respondWithResult(_0x5c219a,null))[_0x908e('0x32')](handleError(_0x5c219a,null));};exports[_0x908e('0x33')]=function(_0x1c7714,_0x909ecc){return db[_0x908e('0x22')][_0x908e('0x33')](_0x1c7714[_0x908e('0x34')],{})[_0x908e('0x19')](respondWithResult(_0x909ecc,0xc9))[_0x908e('0x32')](handleError(_0x909ecc,null));};exports['update']=function(_0x1e4d7e,_0x1b50ca){if(_0x1e4d7e['body']['id']){delete _0x1e4d7e[_0x908e('0x34')]['id'];}return db[_0x908e('0x22')][_0x908e('0x31')]({'where':{'id':_0x1e4d7e['params']['id']}})[_0x908e('0x19')](handleEntityNotFound(_0x1b50ca,null))[_0x908e('0x19')](saveUpdates(_0x1e4d7e[_0x908e('0x34')],null))['then'](respondWithResult(_0x1b50ca,null))[_0x908e('0x32')](handleError(_0x1b50ca,null));};exports[_0x908e('0x1a')]=function(_0x34ed4f,_0x1a742e){return db[_0x908e('0x22')][_0x908e('0x31')]({'where':{'id':_0x34ed4f[_0x908e('0x35')]['id']}})[_0x908e('0x19')](handleEntityNotFound(_0x1a742e,null))[_0x908e('0x19')](removeEntity(_0x1a742e,null))['catch'](handleError(_0x1a742e,null));};exports['describe']=function(_0x55ea52,_0x1219ed){return db[_0x908e('0x22')][_0x908e('0x36')]()['then'](respondWithResult(_0x1219ed,null))[_0x908e('0x32')](handleError(_0x1219ed,null));};exports[_0x908e('0x37')]=function(_0x18d07d,_0x3219e8){return db[_0x908e('0x38')][_0x908e('0x31')]({'where':{'id':_0x18d07d['params']['id']}})[_0x908e('0x19')](handleEntityNotFound(_0x3219e8,null))['then'](function(_0x362414){if(_0x362414){return _0x362414[_0x908e('0x37')](_0x18d07d[_0x908e('0x34')][_0x908e('0x39')],_[_0x908e('0x3a')](_0x18d07d[_0x908e('0x34')],[_0x908e('0x39'),'id'])||{});}})['then'](respondWithResult(_0x3219e8,null))['catch'](handleError(_0x3219e8,null));};exports['getMessages']=function(_0x5c43bd,_0x4e4333){var _0x1d29da={'raw':![],'where':{}};var _0x5c1d88={};var _0xa13914={'count':0x0,'rows':[]};return db[_0x908e('0x22')][_0x908e('0x3b')]({'where':{'id':_0x5c43bd[_0x908e('0x35')]['id']}})[_0x908e('0x19')](handleEntityNotFound(_0x4e4333,null))[_0x908e('0x19')](function(_0x4d49e2){if(_0x4d49e2){_0x5c1d88[_0x908e('0x2c')]=_[_0x908e('0x27')](db[_0x908e('0x38')][_0x908e('0x28')]);_0x5c1d88[_0x908e('0x26')]=_[_0x908e('0x27')](_0x5c43bd[_0x908e('0x26')]);_0x5c1d88[_0x908e('0x29')]=_[_0x908e('0x2b')](_0x5c1d88[_0x908e('0x2c')],_0x5c1d88[_0x908e('0x26')]);_0x1d29da['attributes']=_['intersection'](_0x5c1d88['model'],qs[_0x908e('0x2d')](_0x5c43bd[_0x908e('0x26')][_0x908e('0x2d')]));_0x1d29da[_0x908e('0x2a')]=_0x1d29da[_0x908e('0x2a')][_0x908e('0x2e')]?_0x1d29da[_0x908e('0x2a')]:_0x5c1d88[_0x908e('0x2c')];if(!_0x5c43bd[_0x908e('0x26')][_0x908e('0x3c')](_0x908e('0x3d'))){_0x1d29da[_0x908e('0x13')]=qs[_0x908e('0x13')](_0x5c43bd[_0x908e('0x26')][_0x908e('0x13')]);_0x1d29da['offset']=qs[_0x908e('0x14')](_0x5c43bd['query'][_0x908e('0x14')]);}_0x1d29da['order']=qs[_0x908e('0x3e')](_0x5c43bd[_0x908e('0x26')][_0x908e('0x3e')]);_0x1d29da[_0x908e('0x3f')]=qs[_0x908e('0x29')](_[_0x908e('0x40')](_0x5c43bd['query'],_0x5c1d88[_0x908e('0x29')]));_0x1d29da['where']['FaxInteractionId']=_0x4d49e2['id'];if(_0x5c43bd[_0x908e('0x26')][_0x908e('0x41')]){_0x1d29da[_0x908e('0x3f')]=_[_0x908e('0x42')](_0x1d29da[_0x908e('0x3f')],{'$or':_['map'](_0x1d29da[_0x908e('0x2a')],function(_0x30c532){var _0x5b5b81={};_0x5b5b81[_0x30c532]={'$like':'%'+_0x5c43bd[_0x908e('0x26')][_0x908e('0x41')]+'%'};return _0x5b5b81;})});}if(_0x5c43bd[_0x908e('0x26')]['$gte']){var _0x18279c=_0x5c43bd[_0x908e('0x26')][_0x908e('0x43')]['split'](',');var _0xde3eb3={};_0xde3eb3[_0x18279c[0x0]]={'$gte':moment(_0x18279c[0x1])[_0x908e('0x44')](_0x908e('0x45'))};_0x1d29da[_0x908e('0x3f')]=_[_0x908e('0x42')](_0x1d29da[_0x908e('0x3f')],_0xde3eb3);}_0x1d29da=_[_0x908e('0x42')]({},_0x1d29da,_0x5c43bd[_0x908e('0x46')]);return db[_0x908e('0x38')][_0x908e('0x15')]({'where':_0x1d29da[_0x908e('0x3f')]})[_0x908e('0x19')](function(_0x4caf02){_0xa13914['count']=_0x4caf02;if(_0x5c43bd['query']['includeAll']){_0x1d29da[_0x908e('0x30')]=[{'all':!![]}];}return db[_0x908e('0x38')]['findAll'](_0x1d29da);})[_0x908e('0x19')](function(_0x4d0dd0){_0xa13914[_0x908e('0x47')]=_0x4d0dd0;return _0xa13914;});}})[_0x908e('0x19')](respondWithFilteredResult(_0x4e4333,_0x1d29da))['catch'](handleError(_0x4e4333,null));};exports[_0x908e('0x48')]=function(_0x43a6b3,_0x5f496e){return db[_0x908e('0x22')][_0x908e('0x31')]({'where':{'id':_0x43a6b3[_0x908e('0x35')]['id']}})['then'](handleEntityNotFound(_0x5f496e,null))[_0x908e('0x19')](function(_0x20d681){if(_0x20d681){return _0x20d681[_0x908e('0x49')](_0x43a6b3[_0x908e('0x34')][_0x908e('0x39')],_[_0x908e('0x3a')](_0x43a6b3[_0x908e('0x34')],[_0x908e('0x39'),'id'])||{})['spread'](function(){return db['Tag'][_0x908e('0x4a')]({'attributes':['id',_0x908e('0x1e'),_0x908e('0x4b')],'where':{'id':_0x43a6b3[_0x908e('0x34')][_0x908e('0x39')]}});})[_0x908e('0x19')](function(_0x3a0be4){socket['emit']('faxInteractionTags:save',{'id':Number(_0x43a6b3[_0x908e('0x35')]['id']),'tags':_0x3a0be4||[]});return{'id':Number(_0x43a6b3[_0x908e('0x35')]['id']),'tags':_0x3a0be4||[]};});}})[_0x908e('0x19')](respondWithResult(_0x5f496e,null))['catch'](handleError(_0x5f496e,null));};exports[_0x908e('0x4c')]=function(_0x150895,_0xf8143f){return db[_0x908e('0x22')][_0x908e('0x31')]({'where':{'id':_0x150895[_0x908e('0x35')]['id']}})['then'](handleEntityNotFound(_0xf8143f,null))['then'](function(_0x4c6a61){if(_0x4c6a61){return _0x4c6a61['removeTags'](_0x150895[_0x908e('0x26')]['ids']);}})[_0x908e('0x19')](respondWithStatusCode(_0xf8143f,null))['catch'](handleError(_0xf8143f,null));};exports[_0x908e('0x4d')]=function(_0x11f959,_0x402118){var _0x5d8408=moment()[_0x908e('0x4e')]()['toString']();var _0xb8975b=path[_0x908e('0x4f')](config[_0x908e('0x50')],'server',_0x908e('0x51'),'tmp');var _0x51a853=path[_0x908e('0x4f')](config['root'],'server',_0x908e('0x51'),_0x908e('0x52'));var _0x2c2b41=path[_0x908e('0x4f')](_0xb8975b,_0x5d8408);var _0x25ee67=util[_0x908e('0x44')](_0x908e('0x53'),_0x11f959['params']['id'],_0x5d8408);var _0x571897=path[_0x908e('0x4f')](_0xb8975b,_0x25ee67);var _0x3dc16d=[];_0x3dc16d[_0x908e('0x54')]({'model':db[_0x908e('0x55')],'as':_0x908e('0x55'),'raw':!![]});var _0x1c1596=[{'model':db[_0x908e('0x38')],'as':_0x908e('0x56'),'attributes':['id',_0x908e('0x34'),_0x908e('0x57')],'include':_0x3dc16d}];return db['FaxInteraction']['find']({'where':{'id':_0x11f959[_0x908e('0x35')]['id']},'include':_0x1c1596})[_0x908e('0x19')](handleEntityNotFound(_0x402118,null))['then'](function(_0x30855b){if(_0x30855b&&_0x30855b[_0x908e('0x56')]){var _0x50651f=_0x30855b[_0x908e('0x58')]({'plain':!![]});fs[_0x908e('0x59')](_0x2c2b41);for(var _0x5dd69e=0x0;_0x5dd69e<_0x50651f[_0x908e('0x56')]['length'];_0x5dd69e++){var _0x5a935a=_0x50651f[_0x908e('0x56')][_0x5dd69e][_0x908e('0x55')];if(_0x5a935a){var _0x4841ea=path['join'](_0x51a853,_0x5a935a[_0x908e('0x5a')]);if(fs[_0x908e('0x5b')](_0x4841ea)){fs[_0x908e('0x5c')](_0x4841ea)[_0x908e('0x5d')](fs[_0x908e('0x5e')](path[_0x908e('0x4f')](_0x2c2b41,_0x5a935a[_0x908e('0x5a')])));}}}return BPromise[_0x908e('0x5f')]()[_0x908e('0x19')](function(){return new BPromise(function(_0x31ea82,_0x59300b){zipdir(_0x2c2b41,{'saveTo':_0x571897},function(_0x1e8397,_0x3069a5){if(_0x1e8397)return _0x59300b(_0x1e8397);return _0x31ea82(_0x3069a5);});})[_0x908e('0x19')](function(){return new BPromise(function(_0x4e807c,_0x28f1b0){rimraf(_0x2c2b41,function(_0x5476dc){if(_0x5476dc)_0x28f1b0(_0x5476dc);return _0x4e807c();});});})[_0x908e('0x19')](function(){return _0x402118[_0x908e('0x4d')](_0x571897,_0x25ee67,function(_0x1a4946){if(_0x1a4946){console[_0x908e('0x60')](_0x908e('0x61'),_0x1a4946);}else{fs[_0x908e('0x62')](_0x571897);}});});});}else{return _0x402118[_0x908e('0x1c')](0xc8);}})[_0x908e('0x32')](handleError(_0x402118,null));};
\ No newline at end of file
index 9ffd8a5..94bc1a6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x727d=['length','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','FaxMessage','save','remove','getUsers','then','setDataValue','Users','map','findAll','unreadMessages'];(function(_0x338253,_0x269685){var _0x549e8c=function(_0x180785){while(--_0x180785){_0x338253['push'](_0x338253['shift']());}};_0x549e8c(++_0x269685);}(_0x727d,0xa8));var _0xd727=function(_0x22f6f1,_0x1690df){_0x22f6f1=_0x22f6f1-0x0;var _0x3ec7f4=_0x727d[_0x22f6f1];return _0x3ec7f4;};'use strict';var EventEmitter=require(_0xd727('0x0'));var FaxInteraction=require(_0xd727('0x1'))['db']['FaxInteraction'];var FaxMessage=require(_0xd727('0x1'))['db'][_0xd727('0x2')];var FaxInteractionEvents=new EventEmitter();FaxInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xd727('0x3'),'afterUpdate':'update','afterDestroy':_0xd727('0x4')};function emitEvent(_0x4442e0){return function(_0x2edfc9,_0x2a9525,_0x2b8352){_0x2edfc9[_0xd727('0x5')]({'attributes':['id'],'raw':!![]})[_0xd727('0x6')](function(_0x260c1a){_0x2edfc9[_0xd727('0x7')](_0xd727('0x8'),_0x260c1a[_0xd727('0x9')](function(_0xb4cec8){return{'id':_0xb4cec8['id']};}));return FaxMessage[_0xd727('0xa')]({'where':{'FaxInteractionId':_0x2edfc9['id'],'direction':'in','read':![]},'raw':!![]});})[_0xd727('0x6')](function(_0x57e140){_0x2edfc9[_0xd727('0x7')](_0xd727('0xb'),_0x57e140[_0xd727('0xc')]);FaxInteractionEvents[_0xd727('0xd')](_0x4442e0+':'+_0x2edfc9['id'],_0x2edfc9);FaxInteractionEvents[_0xd727('0xd')](_0x4442e0,_0x2edfc9);_0x2b8352(null);})[_0xd727('0xe')](_0x2b8352(null));};}for(var e in events){if(events[_0xd727('0xf')](e)){var event=events[e];FaxInteraction[_0xd727('0x10')](e,emitEvent(event));}}module[_0xd727('0x11')]=FaxInteractionEvents;
\ No newline at end of file
+var _0xe942=['length','emit','catch','hasOwnProperty','hook','../../mysqldb','FaxInteraction','FaxMessage','setMaxListeners','save','update','Users','map','findAll','then','setDataValue','unreadMessages'];(function(_0x46c493,_0x429a61){var _0x1cac0f=function(_0x699a6a){while(--_0x699a6a){_0x46c493['push'](_0x46c493['shift']());}};_0x1cac0f(++_0x429a61);}(_0xe942,0xe2));var _0x2e94=function(_0x3ad462,_0x363c0d){_0x3ad462=_0x3ad462-0x0;var _0x4c721b=_0xe942[_0x3ad462];return _0x4c721b;};'use strict';var EventEmitter=require('events');var FaxInteraction=require(_0x2e94('0x0'))['db'][_0x2e94('0x1')];var FaxMessage=require(_0x2e94('0x0'))['db'][_0x2e94('0x2')];var FaxInteractionEvents=new EventEmitter();FaxInteractionEvents[_0x2e94('0x3')](0x0);var events={'afterCreate':_0x2e94('0x4'),'afterUpdate':_0x2e94('0x5'),'afterDestroy':'remove'};function emitEvent(_0x41503f){return function(_0x5e2195,_0x2219b9,_0x5542f6){_0x5e2195['getUsers']({'attributes':['id'],'raw':!![]})['then'](function(_0x10588d){_0x5e2195['setDataValue'](_0x2e94('0x6'),_0x10588d[_0x2e94('0x7')](function(_0x5168a2){return{'id':_0x5168a2['id']};}));return FaxMessage[_0x2e94('0x8')]({'where':{'FaxInteractionId':_0x5e2195['id'],'direction':'in','read':![]},'raw':!![]});})[_0x2e94('0x9')](function(_0x37ad6b){_0x5e2195[_0x2e94('0xa')](_0x2e94('0xb'),_0x37ad6b[_0x2e94('0xc')]);FaxInteractionEvents[_0x2e94('0xd')](_0x41503f+':'+_0x5e2195['id'],_0x5e2195);FaxInteractionEvents[_0x2e94('0xd')](_0x41503f,_0x5e2195);_0x5542f6(null);})[_0x2e94('0xe')](_0x5542f6(null));};}for(var e in events){if(events[_0x2e94('0xf')](e)){var event=events[e];FaxInteraction[_0x2e94('0x10')](e,emitEvent(event));}}module['exports']=FaxInteractionEvents;
\ No newline at end of file
index 528e294..e9cf18d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4b02=['path','rimraf','../../config/environment','./faxInteraction.attributes','exports','define','fax_interactions','format','YYYY-MM-DD\x20HH:mm:ss','util','../../config/logger','moment','bluebird','request-promise'];(function(_0x3b2028,_0x1ac361){var _0x38e443=function(_0x2799e5){while(--_0x2799e5){_0x3b2028['push'](_0x3b2028['shift']());}};_0x38e443(++_0x1ac361);}(_0x4b02,0xcd));var _0x24b0=function(_0x14ae7b,_0x3c26a4){_0x14ae7b=_0x14ae7b-0x0;var _0x28f774=_0x4b02[_0x14ae7b];return _0x28f774;};'use strict';var _=require('lodash');var util=require(_0x24b0('0x0'));var logger=require(_0x24b0('0x1'))('api');var moment=require(_0x24b0('0x2'));var BPromise=require(_0x24b0('0x3'));var rp=require(_0x24b0('0x4'));var fs=require('fs');var path=require(_0x24b0('0x5'));var rimraf=require(_0x24b0('0x6'));var config=require(_0x24b0('0x7'));var attributes=require(_0x24b0('0x8'));module[_0x24b0('0x9')]=function(_0x4ab406,_0x5a4f97){return _0x4ab406[_0x24b0('0xa')]('FaxInteraction',attributes,{'tableName':_0x24b0('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x4f3702,_0x52e238,_0x60cd9d){if(_0x4f3702['changed']('closed')){_0x4f3702['closedAt']=moment()[_0x24b0('0xc')](_0x24b0('0xd'));}_0x60cd9d(null,_0x4f3702);}}});};
\ No newline at end of file
+var _0x0dfa=['api','moment','bluebird','request-promise','rimraf','../../config/environment','./faxInteraction.attributes','exports','define','FaxInteraction','changed','closed','format','YYYY-MM-DD\x20HH:mm:ss','util','../../config/logger'];(function(_0x33ce24,_0x1d1370){var _0x6c76f8=function(_0x1559bb){while(--_0x1559bb){_0x33ce24['push'](_0x33ce24['shift']());}};_0x6c76f8(++_0x1d1370);}(_0x0dfa,0x13e));var _0xa0df=function(_0x1cc8fe,_0x105328){_0x1cc8fe=_0x1cc8fe-0x0;var _0x230054=_0x0dfa[_0x1cc8fe];return _0x230054;};'use strict';var _=require('lodash');var util=require(_0xa0df('0x0'));var logger=require(_0xa0df('0x1'))(_0xa0df('0x2'));var moment=require(_0xa0df('0x3'));var BPromise=require(_0xa0df('0x4'));var rp=require(_0xa0df('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xa0df('0x6'));var config=require(_0xa0df('0x7'));var attributes=require(_0xa0df('0x8'));module[_0xa0df('0x9')]=function(_0x2f204f,_0x5ae3c1){return _0x2f204f[_0xa0df('0xa')](_0xa0df('0xb'),attributes,{'tableName':'fax_interactions','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x3f74d6,_0x3deaa6,_0x1e7482){if(_0x3f74d6[_0xa0df('0xc')](_0xa0df('0xd'))){_0x3f74d6['closedAt']=moment()[_0xa0df('0xe')](_0xa0df('0xf'));}_0x1e7482(null,_0x3f74d6);}}});};
\ No newline at end of file
index c3cd4e6..a50eeb5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x66e1=['jayson/promise','http','redis','defaults','localhost','./faxInteraction.socket','register','request','FaxInteraction,\x20%s,\x20%s','request\x20sent','debug','FaxInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','UpdateFaxInteraction','FaxInteraction','body','raw','options','where','limit','then','info','find','addTags','ids','spread','AddTags','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','../../config/environment'];(function(_0x1be9e4,_0x58925d){var _0x1cce7e=function(_0x25722b){while(--_0x25722b){_0x1be9e4['push'](_0x1be9e4['shift']());}};_0x1cce7e(++_0x58925d);}(_0x66e1,0x188));var _0x166e=function(_0x507ac5,_0x33aaee){_0x507ac5=_0x507ac5-0x0;var _0x12c1bc=_0x66e1[_0x507ac5];return _0x12c1bc;};'use strict';var _=require(_0x166e('0x0'));var util=require(_0x166e('0x1'));var moment=require(_0x166e('0x2'));var BPromise=require(_0x166e('0x3'));var rs=require(_0x166e('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x166e('0x5'));var logger=require(_0x166e('0x6'))('rpc');var config=require(_0x166e('0x7'));var jayson=require(_0x166e('0x8'));var client=jayson['client'][_0x166e('0x9')]({'port':0x232a});config[_0x166e('0xa')]=_[_0x166e('0xb')](config[_0x166e('0xa')],{'host':_0x166e('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x166e('0xd'))[_0x166e('0xe')](socket);function respondWithRpcPromise(_0x2e4432,_0x3dd1f4,_0x12b288){return new BPromise(function(_0x50b857,_0x5e654e){return client[_0x166e('0xf')](_0x2e4432,_0x12b288)['then'](function(_0xd7c840){logger['info'](_0x166e('0x10'),_0x3dd1f4,_0x166e('0x11'));logger[_0x166e('0x12')](_0x166e('0x13'),_0x3dd1f4,_0x166e('0x11'),JSON[_0x166e('0x14')](_0xd7c840));if(_0xd7c840[_0x166e('0x15')]){if(_0xd7c840['error'][_0x166e('0x16')]===0x1f4){logger['error'](_0x166e('0x10'),_0x3dd1f4,_0xd7c840[_0x166e('0x15')][_0x166e('0x17')]);return _0x5e654e(_0xd7c840[_0x166e('0x15')][_0x166e('0x17')]);}logger[_0x166e('0x15')](_0x166e('0x10'),_0x3dd1f4,_0xd7c840[_0x166e('0x15')][_0x166e('0x17')]);return _0x50b857(_0xd7c840['error']['message']);}else{logger['info']('FaxInteraction,\x20%s,\x20%s',_0x3dd1f4,_0x166e('0x11'));_0x50b857(_0xd7c840[_0x166e('0x18')][_0x166e('0x17')]);}})[_0x166e('0x19')](function(_0x4b39cb){logger['error'](_0x166e('0x10'),_0x3dd1f4,_0x4b39cb);_0x5e654e(_0x4b39cb);});});}exports[_0x166e('0x1a')]=function(_0x382f55){var _0x49d097=this;return new Promise(function(_0x1bbefc,_0x4e8725){return db[_0x166e('0x1b')]['update'](_0x382f55[_0x166e('0x1c')],{'raw':_0x382f55['options']?_0x382f55['options'][_0x166e('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x382f55[_0x166e('0x1e')]?_0x382f55['options'][_0x166e('0x1f')]||null:null,'attributes':_0x382f55[_0x166e('0x1e')]?_0x382f55[_0x166e('0x1e')]['attributes']||null:null,'limit':_0x382f55['options']?_0x382f55[_0x166e('0x1e')][_0x166e('0x20')]||null:null})[_0x166e('0x21')](function(_0x57cdc1){logger[_0x166e('0x22')](_0x166e('0x1a'),_0x382f55);logger[_0x166e('0x12')](_0x166e('0x1a'),_0x382f55,JSON['stringify'](_0x57cdc1));_0x1bbefc(_0x57cdc1);})['catch'](function(_0x1bbb4e){logger['error']('UpdateFaxInteraction',_0x1bbb4e[_0x166e('0x17')],_0x382f55);_0x4e8725(_0x49d097[_0x166e('0x15')](0x1f4,_0x1bbb4e[_0x166e('0x17')]));});});};exports['AddTagsToFaxInteraction']=function(_0x3cbcdf){return new Promise(function(_0x30bba6,_0x4e6dd5){return db[_0x166e('0x1b')][_0x166e('0x23')]({'where':_0x3cbcdf['options']?_0x3cbcdf[_0x166e('0x1e')][_0x166e('0x1f')]||null:null})[_0x166e('0x21')](function(_0x5d5826){if(_0x5d5826){return _0x5d5826[_0x166e('0x24')](_0x3cbcdf[_0x166e('0x1c')][_0x166e('0x25')],_['omit'](_0x3cbcdf[_0x166e('0x1c')],[_0x166e('0x25'),'id'])||{});}})[_0x166e('0x26')](function(_0x2da307){logger[_0x166e('0x22')](_0x166e('0x27'),_0x3cbcdf);logger[_0x166e('0x12')]('AddTags',_0x3cbcdf,JSON['stringify'](_0x2da307));_0x30bba6(_0x2da307);})[_0x166e('0x19')](function(_0x247658){logger['error'](_0x166e('0x27'),_0x247658[_0x166e('0x17')],_0x3cbcdf);_0x4e6dd5(_this[_0x166e('0x15')](0x1f4,_0x247658[_0x166e('0x17')]));});});};
\ No newline at end of file
+var _0x612c=['code','error','message','FaxInteraction,\x20%s,\x20%s','result','UpdateFaxInteraction','update','body','options','raw','where','limit','catch','find','addTags','ids','omit','spread','AddTags','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','redis','defaults','socket.io-emitter','register','request','then','info','request\x20sent','debug','stringify'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x612c,0x109));var _0xc612=function(_0x19bc6c,_0x3aba6a){_0x19bc6c=_0x19bc6c-0x0;var _0x9691c5=_0x612c[_0x19bc6c];return _0x9691c5;};'use strict';var _=require(_0xc612('0x0'));var util=require(_0xc612('0x1'));var moment=require(_0xc612('0x2'));var BPromise=require(_0xc612('0x3'));var rs=require(_0xc612('0x4'));var fs=require('fs');var Redis=require(_0xc612('0x5'));var db=require(_0xc612('0x6'))['db'];var utils=require(_0xc612('0x7'));var logger=require(_0xc612('0x8'))(_0xc612('0x9'));var config=require('../../config/environment');var jayson=require(_0xc612('0xa'));var client=jayson['client'][_0xc612('0xb')]({'port':0x232a});config[_0xc612('0xc')]=_[_0xc612('0xd')](config[_0xc612('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0xc612('0xe'))(new Redis(config[_0xc612('0xc')]));require('./faxInteraction.socket')[_0xc612('0xf')](socket);function respondWithRpcPromise(_0x118412,_0x34536c,_0x4fbf46){return new BPromise(function(_0x4b8cf9,_0x388135){return client[_0xc612('0x10')](_0x118412,_0x4fbf46)[_0xc612('0x11')](function(_0x371ff3){logger[_0xc612('0x12')]('FaxInteraction,\x20%s,\x20%s',_0x34536c,_0xc612('0x13'));logger[_0xc612('0x14')]('FaxInteraction,\x20%s,\x20%s,\x20%s',_0x34536c,_0xc612('0x13'),JSON[_0xc612('0x15')](_0x371ff3));if(_0x371ff3['error']){if(_0x371ff3['error'][_0xc612('0x16')]===0x1f4){logger[_0xc612('0x17')]('FaxInteraction,\x20%s,\x20%s',_0x34536c,_0x371ff3['error'][_0xc612('0x18')]);return _0x388135(_0x371ff3[_0xc612('0x17')][_0xc612('0x18')]);}logger['error']('FaxInteraction,\x20%s,\x20%s',_0x34536c,_0x371ff3[_0xc612('0x17')][_0xc612('0x18')]);return _0x4b8cf9(_0x371ff3['error'][_0xc612('0x18')]);}else{logger[_0xc612('0x12')](_0xc612('0x19'),_0x34536c,_0xc612('0x13'));_0x4b8cf9(_0x371ff3[_0xc612('0x1a')][_0xc612('0x18')]);}})['catch'](function(_0x4ae416){logger['error'](_0xc612('0x19'),_0x34536c,_0x4ae416);_0x388135(_0x4ae416);});});}exports[_0xc612('0x1b')]=function(_0x384553){var _0x188775=this;return new Promise(function(_0x3ea76b,_0x5c7a95){return db['FaxInteraction'][_0xc612('0x1c')](_0x384553[_0xc612('0x1d')],{'raw':_0x384553[_0xc612('0x1e')]?_0x384553['options'][_0xc612('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x384553[_0xc612('0x1e')]?_0x384553[_0xc612('0x1e')][_0xc612('0x20')]||null:null,'attributes':_0x384553['options']?_0x384553[_0xc612('0x1e')]['attributes']||null:null,'limit':_0x384553[_0xc612('0x1e')]?_0x384553[_0xc612('0x1e')][_0xc612('0x21')]||null:null})[_0xc612('0x11')](function(_0x519277){logger[_0xc612('0x12')]('UpdateFaxInteraction',_0x384553);logger['debug'](_0xc612('0x1b'),_0x384553,JSON[_0xc612('0x15')](_0x519277));_0x3ea76b(_0x519277);})[_0xc612('0x22')](function(_0x1308f6){logger[_0xc612('0x17')](_0xc612('0x1b'),_0x1308f6[_0xc612('0x18')],_0x384553);_0x5c7a95(_0x188775['error'](0x1f4,_0x1308f6[_0xc612('0x18')]));});});};exports['AddTagsToFaxInteraction']=function(_0x4cbb30){return new Promise(function(_0x320f7c,_0x532ac6){return db['FaxInteraction'][_0xc612('0x23')]({'where':_0x4cbb30['options']?_0x4cbb30[_0xc612('0x1e')][_0xc612('0x20')]||null:null})[_0xc612('0x11')](function(_0x49046a){if(_0x49046a){return _0x49046a[_0xc612('0x24')](_0x4cbb30['body'][_0xc612('0x25')],_[_0xc612('0x26')](_0x4cbb30[_0xc612('0x1d')],[_0xc612('0x25'),'id'])||{});}})[_0xc612('0x27')](function(_0x221148){logger[_0xc612('0x12')](_0xc612('0x28'),_0x4cbb30);logger[_0xc612('0x14')]('AddTags',_0x4cbb30,JSON[_0xc612('0x15')](_0x221148));_0x320f7c(_0x221148);})['catch'](function(_0x36d672){logger[_0xc612('0x17')]('AddTags',_0x36d672[_0xc612('0x18')],_0x4cbb30);_0x532ac6(_this[_0xc612('0x17')](0x1f4,_0x36d672[_0xc612('0x18')]));});});};
\ No newline at end of file
index f1240b5..5d3fd52 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe15a=['emit','register','length','faxInteraction:','./faxInteraction.events','save','update'];(function(_0x23b2c0,_0x1d62e6){var _0x55b333=function(_0x2f86a3){while(--_0x2f86a3){_0x23b2c0['push'](_0x23b2c0['shift']());}};_0x55b333(++_0x1d62e6);}(_0xe15a,0xc8));var _0xae15=function(_0x4fbfd9,_0x3ab91a){_0x4fbfd9=_0x4fbfd9-0x0;var _0x31dc94=_0xe15a[_0x4fbfd9];return _0x31dc94;};'use strict';var FaxInteractionEvents=require(_0xae15('0x0'));var events=[_0xae15('0x1'),'remove',_0xae15('0x2')];function createListener(_0x2a6b7f,_0xee306c){return function(_0x4e4d9d){_0xee306c[_0xae15('0x3')](_0x2a6b7f,_0x4e4d9d);};}function removeListener(_0x2a2647,_0x16439f){return function(){FaxInteractionEvents['removeListener'](_0x2a2647,_0x16439f);};}exports[_0xae15('0x4')]=function(_0x1f0b27){for(var _0x105c51=0x0,_0x74b1a3=events[_0xae15('0x5')];_0x105c51<_0x74b1a3;_0x105c51++){var _0x3ad26f=events[_0x105c51];var _0x17ff72=createListener(_0xae15('0x6')+_0x3ad26f,_0x1f0b27);FaxInteractionEvents['on'](_0x3ad26f,_0x17ff72);}};
\ No newline at end of file
+var _0x535b=['remove','update','emit','removeListener','length','faxInteraction:','./faxInteraction.events','save'];(function(_0x12085d,_0x896e5e){var _0x3c0c45=function(_0x192bda){while(--_0x192bda){_0x12085d['push'](_0x12085d['shift']());}};_0x3c0c45(++_0x896e5e);}(_0x535b,0x1ae));var _0xb535=function(_0xefb9f4,_0x31b113){_0xefb9f4=_0xefb9f4-0x0;var _0x2953c3=_0x535b[_0xefb9f4];return _0x2953c3;};'use strict';var FaxInteractionEvents=require(_0xb535('0x0'));var events=[_0xb535('0x1'),_0xb535('0x2'),_0xb535('0x3')];function createListener(_0x5cf057,_0x162095){return function(_0x49f4eb){_0x162095[_0xb535('0x4')](_0x5cf057,_0x49f4eb);};}function removeListener(_0x22769,_0x299899){return function(){FaxInteractionEvents[_0xb535('0x5')](_0x22769,_0x299899);};}exports['register']=function(_0x483788){for(var _0xd8743=0x0,_0xde5bca=events[_0xb535('0x6')];_0xd8743<_0xde5bca;_0xd8743++){var _0x2cafe3=events[_0xd8743];var _0x58641c=createListener(_0xb535('0x7')+_0x2cafe3,_0x483788);FaxInteractionEvents['on'](_0x2cafe3,_0x58641c);}};
\ No newline at end of file
index da7fc0a..3776eb7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8365=['addMessage','fax','faxinteraction:addtags','addTags','put','tracked','faxinteraction:update','delete','faxinteraction:destroy','destroy','/:id/tags','removeTags','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','./faxInteraction.controller','get','index','/describe','isAuthenticated','describe','/:id','show','/:id/messages','getMessages','/:id/download','download','post','create'];(function(_0x381866,_0xaebd9d){var _0x44c7c7=function(_0x51b249){while(--_0x51b249){_0x381866['push'](_0x381866['shift']());}};_0x44c7c7(++_0xaebd9d);}(_0x8365,0x76));var _0x5836=function(_0x3511d3,_0x4107ae){_0x3511d3=_0x3511d3-0x0;var _0x5d6321=_0x8365[_0x3511d3];return _0x5d6321;};'use strict';var multer=require(_0x5836('0x0'));var util=require(_0x5836('0x1'));var path=require(_0x5836('0x2'));var timeout=require('connect-timeout');var express=require(_0x5836('0x3'));var router=express[_0x5836('0x4')]();var fs_extra=require(_0x5836('0x5'));var auth=require(_0x5836('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x5836('0x7'));var controller=require(_0x5836('0x8'));router[_0x5836('0x9')]('/',auth['isAuthenticated'](),controller[_0x5836('0xa')]);router[_0x5836('0x9')](_0x5836('0xb'),auth[_0x5836('0xc')](),controller[_0x5836('0xd')]);router[_0x5836('0x9')](_0x5836('0xe'),auth[_0x5836('0xc')](),controller[_0x5836('0xf')]);router[_0x5836('0x9')](_0x5836('0x10'),auth[_0x5836('0xc')](),controller[_0x5836('0x11')]);router['get'](_0x5836('0x12'),auth[_0x5836('0xc')](),controller[_0x5836('0x13')]);router[_0x5836('0x14')]('/',auth[_0x5836('0xc')](),controller[_0x5836('0x15')]);router[_0x5836('0x14')](_0x5836('0x10'),auth[_0x5836('0xc')](),controller[_0x5836('0x16')]);router[_0x5836('0x14')]('/:id/tags',auth[_0x5836('0xc')](),interaction['tracked'](_0x5836('0x17'),_0x5836('0x18')),controller[_0x5836('0x19')]);router[_0x5836('0x1a')](_0x5836('0xe'),auth[_0x5836('0xc')](),interaction[_0x5836('0x1b')](_0x5836('0x17'),_0x5836('0x1c')),controller['update']);router[_0x5836('0x1d')](_0x5836('0xe'),auth['isAuthenticated'](),interaction[_0x5836('0x1b')](_0x5836('0x17'),_0x5836('0x1e')),controller[_0x5836('0x1f')]);router[_0x5836('0x1d')](_0x5836('0x20'),auth['isAuthenticated'](),controller[_0x5836('0x21')]);module[_0x5836('0x22')]=router;
\ No newline at end of file
+var _0x1a47=['/:id/download','download','post','create','addMessage','/:id/tags','tracked','faxinteraction:addtags','addTags','put','fax','faxinteraction:update','update','faxinteraction:destroy','destroy','delete','removeTags','exports','util','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./faxInteraction.controller','get','isAuthenticated','/describe','/:id','/:id/messages'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1a47,0xe4));var _0x71a4=function(_0x2bb93c,_0x32b2fb){_0x2bb93c=_0x2bb93c-0x0;var _0x3aca85=_0x1a47[_0x2bb93c];return _0x3aca85;};'use strict';var multer=require('multer');var util=require(_0x71a4('0x0'));var path=require('path');var timeout=require(_0x71a4('0x1'));var express=require(_0x71a4('0x2'));var router=express[_0x71a4('0x3')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x71a4('0x4'));var config=require(_0x71a4('0x5'));var controller=require(_0x71a4('0x6'));router[_0x71a4('0x7')]('/',auth[_0x71a4('0x8')](),controller['index']);router[_0x71a4('0x7')](_0x71a4('0x9'),auth['isAuthenticated'](),controller['describe']);router['get'](_0x71a4('0xa'),auth['isAuthenticated'](),controller['show']);router[_0x71a4('0x7')](_0x71a4('0xb'),auth['isAuthenticated'](),controller['getMessages']);router['get'](_0x71a4('0xc'),auth[_0x71a4('0x8')](),controller[_0x71a4('0xd')]);router[_0x71a4('0xe')]('/',auth[_0x71a4('0x8')](),controller[_0x71a4('0xf')]);router[_0x71a4('0xe')](_0x71a4('0xb'),auth[_0x71a4('0x8')](),controller[_0x71a4('0x10')]);router[_0x71a4('0xe')](_0x71a4('0x11'),auth[_0x71a4('0x8')](),interaction[_0x71a4('0x12')]('fax',_0x71a4('0x13')),controller[_0x71a4('0x14')]);router[_0x71a4('0x15')](_0x71a4('0xa'),auth['isAuthenticated'](),interaction[_0x71a4('0x12')](_0x71a4('0x16'),_0x71a4('0x17')),controller[_0x71a4('0x18')]);router['delete']('/:id',auth['isAuthenticated'](),interaction[_0x71a4('0x12')]('fax',_0x71a4('0x19')),controller[_0x71a4('0x1a')]);router[_0x71a4('0x1b')](_0x71a4('0x11'),auth[_0x71a4('0x8')](),controller[_0x71a4('0x1c')]);module[_0x71a4('0x1d')]=router;
\ No newline at end of file
index ab3bcd0..803b152 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc5c7=['DATE','exports','TEXT','medium','BOOLEAN','ENUM','out'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xc5c7,0x1cf));var _0x7c5c=function(_0x40998d,_0x48a09c){_0x40998d=_0x40998d-0x0;var _0x5bffbc=_0xc5c7[_0x40998d];return _0x5bffbc;};'use strict';var Sequelize=require('sequelize');module[_0x7c5c('0x0')]={'body':{'type':Sequelize[_0x7c5c('0x1')](_0x7c5c('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0x7c5c('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0x7c5c('0x4')]('in',_0x7c5c('0x5')),'defaultValue':'out','allowNull':![]},'failMessage':{'type':Sequelize[_0x7c5c('0x1')],'defaultValue':null},'readAt':{'type':Sequelize[_0x7c5c('0x6')]}};
\ No newline at end of file
+var _0x4a81=['DATE','sequelize','exports','TEXT','medium','out'];(function(_0x13f514,_0x1ec5e2){var _0xdd2a85=function(_0x524fb6){while(--_0x524fb6){_0x13f514['push'](_0x13f514['shift']());}};_0xdd2a85(++_0x1ec5e2);}(_0x4a81,0x1b7));var _0x14a8=function(_0x5cd848,_0x43b34c){_0x5cd848=_0x5cd848-0x0;var _0x9e8fbe=_0x4a81[_0x5cd848];return _0x9e8fbe;};'use strict';var Sequelize=require(_0x14a8('0x0'));module[_0x14a8('0x1')]={'body':{'type':Sequelize[_0x14a8('0x2')](_0x14a8('0x3')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in',_0x14a8('0x4')),'defaultValue':'out','allowNull':![]},'failMessage':{'type':Sequelize[_0x14a8('0x2')],'defaultValue':null},'readAt':{'type':Sequelize[_0x14a8('0x5')]}};
\ No newline at end of file
index 7d3d5d8..9034329 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf062=['get','FaxInteraction','isNil','read1stAt','[FAXMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','user','interaction','null','AcceptMessage','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','QueryTypes','User','fullname','email','manual','interface','SIP/%s','channel','motionChannel','event','EventManager','acceptmessage','reject','FaxInteractionId','[FAXMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','RejectMessage','rejectMessage','SELECT','contact','internal','rejectmessage','create','findOne','SendFax','/var/opt/motion2/server/files/attachments/%s','basename','AttachmentId','download','server','files','attachments','Attachment','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','redis','defaults','localhost','socket.io-emitter','./faxMessage.socket','jayson/promise','client','http','then','info','debug','request\x20sent','stringify','error','message','FaxMessage,\x20%s,\x20%s','catch','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','save','update','destroy','stack','name','send','map','FaxMessage','rawAttributes','type','key','query','keys','intersection','attributes','model','fields','length','nolimit','order','filters','filter','where','merge','VIRTUAL','options','includeAll','rows','show','params','find','body','describe','accept','fax','format','UserId','agent'];(function(_0x59142e,_0x549776){var _0x54d462=function(_0x4074e9){while(--_0x4074e9){_0x59142e['push'](_0x59142e['shift']());}};_0x54d462(++_0x549776);}(_0xf062,0x1c6));var _0x2f06=function(_0x2e44bf,_0x3b6594){_0x2e44bf=_0x2e44bf-0x0;var _0x3fa399=_0xf062[_0x2e44bf];return _0x3fa399;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x2f06('0x0'));var zipdir=require(_0x2f06('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x2f06('0x2'));var moment=require(_0x2f06('0x3'));var BPromise=require(_0x2f06('0x4'));var Mustache=require(_0x2f06('0x5'));var util=require('util');var path=require(_0x2f06('0x6'));var sox=require(_0x2f06('0x7'));var csv=require(_0x2f06('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x2f06('0x9'));var _=require(_0x2f06('0xa'));var squel=require(_0x2f06('0xb'));var crypto=require(_0x2f06('0xc'));var jsforce=require(_0x2f06('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x2f06('0x8'));var querystring=require(_0x2f06('0xe'));var Papa=require(_0x2f06('0xf'));var Redis=require(_0x2f06('0x10'));var authService=require(_0x2f06('0x11'));var qs=require(_0x2f06('0x12'));var as=require(_0x2f06('0x13'));var hardwareService=require(_0x2f06('0x14'));var logger=require(_0x2f06('0x15'))(_0x2f06('0x16'));var utils=require('../../config/utils');var config=require(_0x2f06('0x17'));var licenseUtil=require(_0x2f06('0x18'));var db=require('../../mysqldb')['db'];config[_0x2f06('0x19')]=_[_0x2f06('0x1a')](config['redis'],{'host':_0x2f06('0x1b'),'port':0x18eb});var socket=require(_0x2f06('0x1c'))(new Redis(config['redis']));require(_0x2f06('0x1d'))['register'](socket);var jayson=require(_0x2f06('0x1e'));var client=jayson[_0x2f06('0x1f')][_0x2f06('0x20')]({'port':0x232c});var client9002=jayson['client'][_0x2f06('0x20')]({'port':0x232a});function respondWithRpcPromise(_0x1a8d00,_0x3bdf2e,_0x3c8641,_0x46dfbb){return new BPromise(function(_0xde18c9,_0x432c6a){var _0x19aa12=_0x46dfbb||client;return _0x19aa12['request'](_0x1a8d00,_0x3c8641)[_0x2f06('0x21')](function(_0x549c06){logger[_0x2f06('0x22')]('FaxMessage,\x20%s,\x20%s',_0x3bdf2e,'request\x20sent');logger[_0x2f06('0x23')]('FaxMessage,\x20%s,\x20%s,\x20%s',_0x3bdf2e,_0x2f06('0x24'),JSON[_0x2f06('0x25')](_0x549c06));if(_0x549c06[_0x2f06('0x26')]){if(_0x549c06[_0x2f06('0x26')]['code']===0x1f4){logger[_0x2f06('0x26')]('FaxMessage,\x20%s,\x20%s',_0x3bdf2e,_0x549c06[_0x2f06('0x26')][_0x2f06('0x27')]);return _0x432c6a(_0x549c06[_0x2f06('0x26')][_0x2f06('0x27')]);}logger['error']('FaxMessage,\x20%s,\x20%s',_0x3bdf2e,_0x549c06[_0x2f06('0x26')][_0x2f06('0x27')]);return _0xde18c9(_0x549c06[_0x2f06('0x26')][_0x2f06('0x27')]);}else{logger['info'](_0x2f06('0x28'),_0x3bdf2e,_0x2f06('0x24'));_0xde18c9(_0x549c06['result'][_0x2f06('0x27')]);}})[_0x2f06('0x29')](function(_0x3f0e63){logger[_0x2f06('0x26')](_0x2f06('0x28'),_0x3bdf2e,_0x3f0e63);_0x432c6a(_0x3f0e63);});});}function respondWithStatusCode(_0x5e66d3,_0x362a39){_0x362a39=_0x362a39||0xcc;return function(_0x12b68f){if(_0x12b68f){return _0x5e66d3[_0x2f06('0x2a')](_0x362a39);}return _0x5e66d3[_0x2f06('0x2b')](_0x362a39)[_0x2f06('0x2c')]();};}function respondWithResult(_0x36a569,_0x64b585){_0x64b585=_0x64b585||0xc8;return function(_0x3b7bb5){if(_0x3b7bb5){return _0x36a569[_0x2f06('0x2b')](_0x64b585)[_0x2f06('0x2d')](_0x3b7bb5);}};}function respondWithFilteredResult(_0x501866,_0x2adc56){return function(_0x12041c){if(_0x12041c){var _0x53c206=typeof _0x2adc56[_0x2f06('0x2e')]===_0x2f06('0x2f')&&typeof _0x2adc56[_0x2f06('0x30')]===_0x2f06('0x2f');var _0x53e1f4=_0x12041c[_0x2f06('0x31')];var _0x3b4c62=_0x53c206?0x0:_0x2adc56[_0x2f06('0x2e')];var _0x263e4e=_0x53c206?_0x12041c[_0x2f06('0x31')]:_0x2adc56[_0x2f06('0x2e')]+_0x2adc56['limit'];var _0x22a42b;if(_0x263e4e>=_0x53e1f4){_0x263e4e=_0x53e1f4;_0x22a42b=0xc8;}else{_0x22a42b=0xce;}_0x501866['status'](_0x22a42b);return _0x501866[_0x2f06('0x32')]('Content-Range',_0x3b4c62+'-'+_0x263e4e+'/'+_0x53e1f4)[_0x2f06('0x2d')](_0x12041c);}return null;};}function patchUpdates(_0x3477bd){return function(_0x561b12){try{jsonpatch[_0x2f06('0x33')](_0x561b12,_0x3477bd,!![]);}catch(_0x1900a6){return BPromise['reject'](_0x1900a6);}return _0x561b12[_0x2f06('0x34')]();};}function saveUpdates(_0x328f46,_0x4f5a2a){return function(_0x37e318){if(_0x37e318){return _0x37e318[_0x2f06('0x35')](_0x328f46)[_0x2f06('0x21')](function(_0x3ba65f){return _0x3ba65f;});}return null;};}function removeEntity(_0x2217d1,_0x3e0095){return function(_0x513ef4){if(_0x513ef4){return _0x513ef4[_0x2f06('0x36')]()[_0x2f06('0x21')](function(){_0x2217d1[_0x2f06('0x2b')](0xcc)[_0x2f06('0x2c')]();});}};}function handleEntityNotFound(_0x370b75,_0x1762aa){return function(_0x3e3ab8){if(!_0x3e3ab8){_0x370b75[_0x2f06('0x2a')](0x194);}return _0x3e3ab8;};}function handleError(_0x435282,_0x4e7173){_0x4e7173=_0x4e7173||0x1f4;return function(_0x2df94d){logger[_0x2f06('0x26')](_0x2df94d[_0x2f06('0x37')]);if(_0x2df94d[_0x2f06('0x38')]){delete _0x2df94d[_0x2f06('0x38')];}_0x435282[_0x2f06('0x2b')](_0x4e7173)[_0x2f06('0x39')](_0x2df94d);};}exports['index']=function(_0x2c8027,_0x1f6655){var _0x50cf09={},_0x39ed0f={},_0x52ea13={'count':0x0,'rows':[]};var _0x4dce21=_[_0x2f06('0x3a')](db[_0x2f06('0x3b')][_0x2f06('0x3c')],function(_0x40260c){return{'name':_0x40260c['fieldName'],'type':_0x40260c[_0x2f06('0x3d')][_0x2f06('0x3e')]};});_0x39ed0f['model']=_['map'](_0x4dce21,_0x2f06('0x38'));_0x39ed0f[_0x2f06('0x3f')]=_[_0x2f06('0x40')](_0x2c8027[_0x2f06('0x3f')]);_0x39ed0f['filters']=_[_0x2f06('0x41')](_0x39ed0f['model'],_0x39ed0f[_0x2f06('0x3f')]);_0x50cf09[_0x2f06('0x42')]=_[_0x2f06('0x41')](_0x39ed0f[_0x2f06('0x43')],qs[_0x2f06('0x44')](_0x2c8027[_0x2f06('0x3f')][_0x2f06('0x44')]));_0x50cf09[_0x2f06('0x42')]=_0x50cf09[_0x2f06('0x42')][_0x2f06('0x45')]?_0x50cf09[_0x2f06('0x42')]:_0x39ed0f[_0x2f06('0x43')];if(!_0x2c8027[_0x2f06('0x3f')]['hasOwnProperty'](_0x2f06('0x46'))){_0x50cf09['limit']=qs[_0x2f06('0x30')](_0x2c8027['query'][_0x2f06('0x30')]);_0x50cf09[_0x2f06('0x2e')]=qs['offset'](_0x2c8027[_0x2f06('0x3f')][_0x2f06('0x2e')]);}_0x50cf09[_0x2f06('0x47')]=qs['sort'](_0x2c8027['query']['sort']);_0x50cf09['where']=qs[_0x2f06('0x48')](_['pick'](_0x2c8027['query'],_0x39ed0f[_0x2f06('0x48')]),_0x4dce21);if(_0x2c8027[_0x2f06('0x3f')][_0x2f06('0x49')]){_0x50cf09[_0x2f06('0x4a')]=_[_0x2f06('0x4b')](_0x50cf09['where'],{'$or':_[_0x2f06('0x3a')](_0x4dce21,function(_0x52c770){if(_0x52c770[_0x2f06('0x3d')]!==_0x2f06('0x4c')){var _0x5cfedc={};_0x5cfedc[_0x52c770[_0x2f06('0x38')]]={'$like':'%'+_0x2c8027[_0x2f06('0x3f')][_0x2f06('0x49')]+'%'};return _0x5cfedc;}})});}_0x50cf09=_['merge']({},_0x50cf09,_0x2c8027[_0x2f06('0x4d')]);var _0x5e0587={'where':_0x50cf09[_0x2f06('0x4a')]};return db[_0x2f06('0x3b')][_0x2f06('0x31')](_0x5e0587)[_0x2f06('0x21')](function(_0x10f98e){_0x52ea13[_0x2f06('0x31')]=_0x10f98e;if(_0x2c8027[_0x2f06('0x3f')][_0x2f06('0x4e')]){_0x50cf09['include']=[{'all':!![]}];}return db['FaxMessage']['findAll'](_0x50cf09);})['then'](function(_0x2850f3){_0x52ea13[_0x2f06('0x4f')]=_0x2850f3;return _0x52ea13;})[_0x2f06('0x21')](respondWithFilteredResult(_0x1f6655,_0x50cf09))[_0x2f06('0x29')](handleError(_0x1f6655,null));};exports[_0x2f06('0x50')]=function(_0x1a49d7,_0x12e1e7){var _0x4382b6={'raw':!![],'where':{'id':_0x1a49d7[_0x2f06('0x51')]['id']}},_0xc84070={};_0xc84070[_0x2f06('0x43')]=_['keys'](db[_0x2f06('0x3b')][_0x2f06('0x3c')]);_0xc84070['query']=_['keys'](_0x1a49d7[_0x2f06('0x3f')]);_0xc84070['filters']=_['intersection'](_0xc84070['model'],_0xc84070[_0x2f06('0x3f')]);_0x4382b6[_0x2f06('0x42')]=_['intersection'](_0xc84070[_0x2f06('0x43')],qs[_0x2f06('0x44')](_0x1a49d7[_0x2f06('0x3f')]['fields']));_0x4382b6[_0x2f06('0x42')]=_0x4382b6[_0x2f06('0x42')][_0x2f06('0x45')]?_0x4382b6[_0x2f06('0x42')]:_0xc84070[_0x2f06('0x43')];if(_0x1a49d7[_0x2f06('0x3f')][_0x2f06('0x4e')]){_0x4382b6['include']=[{'all':!![]}];}_0x4382b6=_['merge']({},_0x4382b6,_0x1a49d7['options']);return db[_0x2f06('0x3b')][_0x2f06('0x52')](_0x4382b6)[_0x2f06('0x21')](handleEntityNotFound(_0x12e1e7,null))[_0x2f06('0x21')](respondWithResult(_0x12e1e7,null))[_0x2f06('0x29')](handleError(_0x12e1e7,null));};exports[_0x2f06('0x35')]=function(_0x5a0ae9,_0x1091ba){if(_0x5a0ae9[_0x2f06('0x53')]['id']){delete _0x5a0ae9[_0x2f06('0x53')]['id'];}return db['FaxMessage'][_0x2f06('0x52')]({'where':{'id':_0x5a0ae9[_0x2f06('0x51')]['id']}})[_0x2f06('0x21')](handleEntityNotFound(_0x1091ba,null))[_0x2f06('0x21')](saveUpdates(_0x5a0ae9[_0x2f06('0x53')],null))['then'](respondWithResult(_0x1091ba,null))[_0x2f06('0x29')](handleError(_0x1091ba,null));};exports['destroy']=function(_0x48981d,_0xbc9cd0){return db[_0x2f06('0x3b')][_0x2f06('0x52')]({'where':{'id':_0x48981d[_0x2f06('0x51')]['id']}})[_0x2f06('0x21')](handleEntityNotFound(_0xbc9cd0,null))['then'](removeEntity(_0xbc9cd0,null))[_0x2f06('0x29')](handleError(_0xbc9cd0,null));};exports[_0x2f06('0x54')]=function(_0x3d5900,_0xbdfa31){return db[_0x2f06('0x3b')][_0x2f06('0x54')]()['then'](respondWithResult(_0xbdfa31,null))[_0x2f06('0x29')](handleError(_0xbdfa31,null));};var interaction_log=require(_0x2f06('0x15'))('fax-interactions');exports[_0x2f06('0x55')]=function(_0x583c8b,_0x172d53,_0x6713ea){var _0x123136={'agent':{},'channel':_0x2f06('0x56')};if(_0x583c8b[_0x2f06('0x53')]['id']){delete _0x583c8b[_0x2f06('0x53')]['id'];}_0x583c8b[_0x2f06('0x53')]['read']=!![];_0x583c8b[_0x2f06('0x53')]['readAt']=moment()[_0x2f06('0x57')]('YYYY-MM-DD\x20HH:mm:ss');_0x583c8b[_0x2f06('0x53')][_0x2f06('0x58')]=_0x583c8b[_0x2f06('0x53')][_0x2f06('0x58')]||_0x583c8b['user']['id'];_0x123136[_0x2f06('0x59')]['id']=_0x583c8b[_0x2f06('0x53')][_0x2f06('0x58')];return db[_0x2f06('0x3b')][_0x2f06('0x52')]({'where':{'id':_0x583c8b[_0x2f06('0x51')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x172d53,null))['then'](saveUpdates(_0x583c8b[_0x2f06('0x53')],null))[_0x2f06('0x21')](function(_0x3c101a){if(_0x3c101a){_0x123136[_0x2f06('0x27')]=_0x3c101a[_0x2f06('0x5a')]({'plain':!![]});return db[_0x2f06('0x5b')][_0x2f06('0x52')]({'where':{'id':_0x3c101a['FaxInteractionId']}});}return null;})[_0x2f06('0x21')](handleEntityNotFound(_0x172d53,null))[_0x2f06('0x21')](function(_0x1d8555){if(_0x1d8555){return _0x1d8555[_0x2f06('0x35')]({'UserId':_0x583c8b['body'][_0x2f06('0x58')],'read1stAt':_[_0x2f06('0x5c')](_0x1d8555[_0x2f06('0x5d')])?moment()['format']('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0x2f06('0x21')](function(_0x10ec88){if(_0x10ec88){_0x123136['interaction']=_0x10ec88[_0x2f06('0x5a')]({'plain':!![]});interaction_log[_0x2f06('0x22')](_0x2f06('0x5e'),_0x583c8b[_0x2f06('0x5f')]['id'],_0x583c8b[_0x2f06('0x5f')][_0x2f06('0x38')],_0x583c8b[_0x2f06('0x5f')]['role'],_0x123136[_0x2f06('0x60')]['id'],_0x583c8b['body']?JSON['stringify'](_0x583c8b[_0x2f06('0x53')]):_0x2f06('0x61'));return respondWithRpcPromise(_0x2f06('0x62'),_0x2f06('0x63'),_0x123136);}return null;})['then'](function(_0x4912a8){var _0x236522=_0x2f06('0x64')+_0x4912a8[_0x2f06('0x27')][_0x2f06('0x65')];return db[_0x2f06('0x66')][_0x2f06('0x3f')](_0x236522,{'type':db['Sequelize'][_0x2f06('0x67')]['SELECT'],'raw':!![]})[_0x2f06('0x21')](function(_0x2ff114){return _0x2ff114;});})[_0x2f06('0x21')](function(_0x1ad5cd){if(_0x1ad5cd){_0x123136[_0x2f06('0x27')]['contact']=_0x1ad5cd[0x0];if(!_0x583c8b['body']['UserId'])return;return db[_0x2f06('0x68')][_0x2f06('0x52')]({'where':{'id':_0x583c8b[_0x2f06('0x53')][_0x2f06('0x58')],'role':'agent'},'attributes':['id',_0x2f06('0x38'),_0x2f06('0x69'),_0x2f06('0x6a'),'internal'],'raw':!![]});}return null;})[_0x2f06('0x21')](function(_0x21ac58){if(!_0x21ac58)return null;_0x123136[_0x2f06('0x27')]['agent']=_0x21ac58;return _0x123136;})[_0x2f06('0x21')](function(_0x203429){if(_0x203429){if(_0x583c8b['body'][_0x2f06('0x6b')]){_0x123136['message'][_0x2f06('0x6c')]=util[_0x2f06('0x57')](_0x2f06('0x6d'),_0x583c8b['user'][_0x2f06('0x38')]);_0x123136[_0x2f06('0x27')][_0x2f06('0x6e')]=_0x123136[_0x2f06('0x6e')];_0x123136[_0x2f06('0x27')][_0x2f06('0x6f')]=_0x123136['channel'];_0x123136[_0x2f06('0x27')][_0x2f06('0x70')]=_0x2f06('0x55');return respondWithRpcPromise('EventManager',_0x2f06('0x71'),{'event':_0x2f06('0x72'),'message':_0x123136[_0x2f06('0x27')]},client9002)[_0x2f06('0x21')](function(){return _0x123136;});}return _0x123136;}return null;})[_0x2f06('0x21')](respondWithResult(_0x172d53,null))[_0x2f06('0x29')](handleError(_0x172d53,null));};var interaction_log=require(_0x2f06('0x15'))('fax-interactions');exports[_0x2f06('0x73')]=function(_0x416703,_0x39fb0c,_0x24a54d){var _0x2fd9e1={'agent':{},'channel':_0x2f06('0x56')};if(_0x416703[_0x2f06('0x53')]['id']){delete _0x416703['body']['id'];}_0x416703[_0x2f06('0x53')][_0x2f06('0x58')]=_0x416703[_0x2f06('0x53')][_0x2f06('0x58')]||_0x416703['user']['id'];_0x2fd9e1[_0x2f06('0x59')]['id']=_0x416703[_0x2f06('0x53')][_0x2f06('0x58')];return db[_0x2f06('0x3b')][_0x2f06('0x52')]({'where':{'id':_0x416703[_0x2f06('0x51')]['id'],'UserId':null}})[_0x2f06('0x21')](handleEntityNotFound(_0x39fb0c,null))[_0x2f06('0x21')](function(_0x269b2a){if(_0x269b2a){_0x2fd9e1[_0x2f06('0x27')]=_0x269b2a['get']({'plain':!![]});return db[_0x2f06('0x5b')]['find']({'where':{'id':_0x269b2a[_0x2f06('0x74')]}});}return null;})[_0x2f06('0x21')](handleEntityNotFound(_0x39fb0c,null))[_0x2f06('0x21')](function(_0x33552c){if(_0x33552c){_0x2fd9e1[_0x2f06('0x60')]=_0x33552c[_0x2f06('0x5a')]({'plain':!![]});interaction_log[_0x2f06('0x22')](_0x2f06('0x75'),_0x416703[_0x2f06('0x5f')]['id'],_0x416703[_0x2f06('0x5f')][_0x2f06('0x38')],_0x416703[_0x2f06('0x5f')][_0x2f06('0x76')],_0x2fd9e1[_0x2f06('0x60')]['id'],_0x416703[_0x2f06('0x53')]?JSON[_0x2f06('0x25')](_0x416703[_0x2f06('0x53')]):_0x2f06('0x61'));return respondWithRpcPromise(_0x2f06('0x77'),_0x2f06('0x78'),_0x2fd9e1);}return null;})[_0x2f06('0x21')](function(_0x2ad07e){var _0x2f6d65=_0x2f06('0x64')+_0x2ad07e[_0x2f06('0x27')][_0x2f06('0x65')];return db[_0x2f06('0x66')][_0x2f06('0x3f')](_0x2f6d65,{'type':db['Sequelize'][_0x2f06('0x67')][_0x2f06('0x79')],'raw':!![]})[_0x2f06('0x21')](function(_0x5a798c){return _0x5a798c;});})[_0x2f06('0x21')](function(_0x4f52a9){if(_0x4f52a9){_0x2fd9e1[_0x2f06('0x27')][_0x2f06('0x7a')]=_0x4f52a9[0x0];if(!_0x416703[_0x2f06('0x53')][_0x2f06('0x58')])return;return db['User'][_0x2f06('0x52')]({'where':{'id':_0x416703['body'][_0x2f06('0x58')],'role':_0x2f06('0x59')},'attributes':['id','name','fullname',_0x2f06('0x6a'),_0x2f06('0x7b')],'raw':!![]});}return null;})[_0x2f06('0x21')](function(_0x1ce6b8){if(!_0x1ce6b8)return null;_0x2fd9e1[_0x2f06('0x27')][_0x2f06('0x59')]=_0x1ce6b8;return _0x2fd9e1;})[_0x2f06('0x21')](function(_0x4dfee4){if(_0x4dfee4){_0x4dfee4[_0x2f06('0x27')][_0x2f06('0x6c')]=util[_0x2f06('0x57')](_0x2f06('0x6d'),_0x416703[_0x2f06('0x5f')][_0x2f06('0x38')]);_0x4dfee4['message'][_0x2f06('0x6e')]=_0x2fd9e1[_0x2f06('0x6e')];_0x4dfee4[_0x2f06('0x27')][_0x2f06('0x6f')]=_0x2fd9e1[_0x2f06('0x6e')];_0x4dfee4[_0x2f06('0x27')][_0x2f06('0x70')]=_0x2f06('0x73');respondWithRpcPromise(_0x2f06('0x71'),_0x2f06('0x71'),{'event':_0x2f06('0x7c'),'message':_0x4dfee4[_0x2f06('0x27')]},client9002);return _0x2fd9e1;}return null;})[_0x2f06('0x21')](respondWithResult(_0x39fb0c,null))[_0x2f06('0x29')](handleError(_0x39fb0c,null));};exports[_0x2f06('0x7d')]=function(_0x3e07cb,_0x42018b){var _0x4b84ba;return db[_0x2f06('0x3b')][_0x2f06('0x7d')](_0x3e07cb[_0x2f06('0x53')],{})[_0x2f06('0x21')](function(_0xf59ec6){_0x4b84ba=_0xf59ec6;return db['CmContact'][_0x2f06('0x7e')]({'where':{'id':_0x4b84ba[_0x2f06('0x65')]}});})[_0x2f06('0x21')](function(_0x323cdc){if(_['isNil'](_0x323cdc)){return;}else{_0x4b84ba[_0x2f06('0x56')]=_0x323cdc[_0x2f06('0x56')];return db['Attachment'][_0x2f06('0x7e')]({'where':{'id':_0x4b84ba['AttachmentId']}});}})[_0x2f06('0x21')](function(_0x17081d){return respondWithRpcPromise(_0x2f06('0x7f'),_0x2f06('0x7f'),{'FaxAccountId':_[_0x2f06('0x5c')](_0x3e07cb[_0x2f06('0x53')])?undefined:_0x3e07cb[_0x2f06('0x53')]['FaxAccountId'],'path':_[_0x2f06('0x5c')](_0x17081d)?undefined:util['format'](_0x2f06('0x80'),_0x17081d[_0x2f06('0x81')]),'fax':_[_0x2f06('0x5c')](_0x4b84ba[_0x2f06('0x56')])?undefined:_0x4b84ba[_0x2f06('0x56')],'AttachmentId':_0x4b84ba[_0x2f06('0x82')]},client9002);})[_0x2f06('0x21')](respondWithResult(_0x42018b,0xc9))['catch'](handleError(_0x42018b,null));};exports[_0x2f06('0x83')]=function(_0x56690a,_0x4deb26){var _0xdfd365=path['join'](config['root'],_0x2f06('0x84'),_0x2f06('0x85'),_0x2f06('0x86'));return db[_0x2f06('0x3b')][_0x2f06('0x52')]({'where':{'id':_0x56690a[_0x2f06('0x51')]['id']},'include':[{'model':db[_0x2f06('0x87')],'as':_0x2f06('0x87')}]})['then'](handleEntityNotFound(_0x4deb26,null))[_0x2f06('0x21')](function(_0x3ea3dc){if(_0x3ea3dc){return _0x4deb26['download'](path['join'](_0xdfd365,_0x3ea3dc[_0x2f06('0x87')][_0x2f06('0x81')]));}})['catch'](handleError(_0x4deb26,null));};
\ No newline at end of file
+var _0x36d3=['body','destroy','describe','fax-interactions','accept','fax','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','FaxInteraction','[FAXMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','interaction','null','AcceptMessage','acceptMessage','sequelize','Sequelize','QueryTypes','SELECT','contact','fullname','email','internal','manual','SIP/%s','channel','motionChannel','event','EventManager','acceptmessage','get','FaxInteractionId','[FAXMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','rejectMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','User','interface','rejectmessage','create','findOne','isNil','Attachment','SendFax','FaxAccountId','/var/opt/motion2/server/files/attachments/%s','basename','AttachmentId','download','join','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','ejs','fs-extra','lodash','squel','crypto','to-csv','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','defaults','redis','socket.io-emitter','./faxMessage.socket','register','jayson/promise','client','http','then','info','request\x20sent','debug','FaxMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','FaxMessage,\x20%s,\x20%s','message','result','catch','sendStatus','status','end','offset','undefined','count','limit','Content-Range','json','apply','reject','save','update','stack','name','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','pick','filter','where','merge','options','FaxMessage','includeAll','include','findAll','rows','show','params','find'];(function(_0x210966,_0x40aa93){var _0x23489a=function(_0x5425dc){while(--_0x5425dc){_0x210966['push'](_0x210966['shift']());}};_0x23489a(++_0x40aa93);}(_0x36d3,0x151));var _0x336d=function(_0x5738f6,_0x4669f1){_0x5738f6=_0x5738f6-0x0;var _0x2282d6=_0x36d3[_0x5738f6];return _0x2282d6;};'use strict';var emlformat=require(_0x336d('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x336d('0x1'));var jsonpatch=require(_0x336d('0x2'));var rp=require(_0x336d('0x3'));var moment=require(_0x336d('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x336d('0x5'));var util=require(_0x336d('0x6'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x336d('0x7'));var fs=require('fs');var fs_extra=require(_0x336d('0x8'));var _=require(_0x336d('0x9'));var squel=require(_0x336d('0xa'));var crypto=require(_0x336d('0xb'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x336d('0xc'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x336d('0xd'));var qs=require(_0x336d('0xe'));var as=require(_0x336d('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x336d('0x10'))(_0x336d('0x11'));var utils=require(_0x336d('0x12'));var config=require(_0x336d('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0x336d('0x14'))['db'];config['redis']=_[_0x336d('0x15')](config[_0x336d('0x16')],{'host':'localhost','port':0x18eb});var socket=require(_0x336d('0x17'))(new Redis(config[_0x336d('0x16')]));require(_0x336d('0x18'))[_0x336d('0x19')](socket);var jayson=require(_0x336d('0x1a'));var client=jayson[_0x336d('0x1b')][_0x336d('0x1c')]({'port':0x232c});var client9002=jayson[_0x336d('0x1b')]['http']({'port':0x232a});function respondWithRpcPromise(_0x29121e,_0x416178,_0x103cbb,_0x4431bd){return new BPromise(function(_0x12d97b,_0x576dda){var _0x2f1c8d=_0x4431bd||client;return _0x2f1c8d['request'](_0x29121e,_0x103cbb)[_0x336d('0x1d')](function(_0x2cc6a2){logger[_0x336d('0x1e')]('FaxMessage,\x20%s,\x20%s',_0x416178,_0x336d('0x1f'));logger[_0x336d('0x20')](_0x336d('0x21'),_0x416178,_0x336d('0x1f'),JSON[_0x336d('0x22')](_0x2cc6a2));if(_0x2cc6a2[_0x336d('0x23')]){if(_0x2cc6a2[_0x336d('0x23')][_0x336d('0x24')]===0x1f4){logger[_0x336d('0x23')](_0x336d('0x25'),_0x416178,_0x2cc6a2[_0x336d('0x23')][_0x336d('0x26')]);return _0x576dda(_0x2cc6a2[_0x336d('0x23')][_0x336d('0x26')]);}logger[_0x336d('0x23')](_0x336d('0x25'),_0x416178,_0x2cc6a2[_0x336d('0x23')][_0x336d('0x26')]);return _0x12d97b(_0x2cc6a2[_0x336d('0x23')][_0x336d('0x26')]);}else{logger[_0x336d('0x1e')](_0x336d('0x25'),_0x416178,'request\x20sent');_0x12d97b(_0x2cc6a2[_0x336d('0x27')][_0x336d('0x26')]);}})[_0x336d('0x28')](function(_0x3c11ca){logger[_0x336d('0x23')](_0x336d('0x25'),_0x416178,_0x3c11ca);_0x576dda(_0x3c11ca);});});}function respondWithStatusCode(_0x286e9a,_0x3b2b9a){_0x3b2b9a=_0x3b2b9a||0xcc;return function(_0x4bb891){if(_0x4bb891){return _0x286e9a[_0x336d('0x29')](_0x3b2b9a);}return _0x286e9a[_0x336d('0x2a')](_0x3b2b9a)[_0x336d('0x2b')]();};}function respondWithResult(_0x31b882,_0xa2c989){_0xa2c989=_0xa2c989||0xc8;return function(_0x4838b8){if(_0x4838b8){return _0x31b882['status'](_0xa2c989)['json'](_0x4838b8);}};}function respondWithFilteredResult(_0xed7d80,_0x2cf8a9){return function(_0x2fdd8b){if(_0x2fdd8b){var _0xdb8bfe=typeof _0x2cf8a9[_0x336d('0x2c')]===_0x336d('0x2d')&&typeof _0x2cf8a9['limit']===_0x336d('0x2d');var _0x57d57b=_0x2fdd8b[_0x336d('0x2e')];var _0x139417=_0xdb8bfe?0x0:_0x2cf8a9[_0x336d('0x2c')];var _0x168b9c=_0xdb8bfe?_0x2fdd8b[_0x336d('0x2e')]:_0x2cf8a9['offset']+_0x2cf8a9[_0x336d('0x2f')];var _0x1a8ac7;if(_0x168b9c>=_0x57d57b){_0x168b9c=_0x57d57b;_0x1a8ac7=0xc8;}else{_0x1a8ac7=0xce;}_0xed7d80['status'](_0x1a8ac7);return _0xed7d80['set'](_0x336d('0x30'),_0x139417+'-'+_0x168b9c+'/'+_0x57d57b)[_0x336d('0x31')](_0x2fdd8b);}return null;};}function patchUpdates(_0x2f9f16){return function(_0x1cec92){try{jsonpatch[_0x336d('0x32')](_0x1cec92,_0x2f9f16,!![]);}catch(_0x187a58){return BPromise[_0x336d('0x33')](_0x187a58);}return _0x1cec92[_0x336d('0x34')]();};}function saveUpdates(_0x1247ae,_0xa1463a){return function(_0x168556){if(_0x168556){return _0x168556[_0x336d('0x35')](_0x1247ae)[_0x336d('0x1d')](function(_0x236fe4){return _0x236fe4;});}return null;};}function removeEntity(_0x7e0690,_0x529dca){return function(_0x493cc2){if(_0x493cc2){return _0x493cc2['destroy']()['then'](function(){_0x7e0690[_0x336d('0x2a')](0xcc)[_0x336d('0x2b')]();});}};}function handleEntityNotFound(_0xa7f610,_0x37805a){return function(_0x18bf22){if(!_0x18bf22){_0xa7f610[_0x336d('0x29')](0x194);}return _0x18bf22;};}function handleError(_0x5e01a0,_0x48ca8f){_0x48ca8f=_0x48ca8f||0x1f4;return function(_0x22ac41){logger[_0x336d('0x23')](_0x22ac41[_0x336d('0x36')]);if(_0x22ac41[_0x336d('0x37')]){delete _0x22ac41[_0x336d('0x37')];}_0x5e01a0[_0x336d('0x2a')](_0x48ca8f)['send'](_0x22ac41);};}exports[_0x336d('0x38')]=function(_0x575dc6,_0x3dc048){var _0x5248aa={},_0x2f1159={},_0x418963={'count':0x0,'rows':[]};var _0x2590e5=_[_0x336d('0x39')](db['FaxMessage'][_0x336d('0x3a')],function(_0x2ff805){return{'name':_0x2ff805[_0x336d('0x3b')],'type':_0x2ff805[_0x336d('0x3c')][_0x336d('0x3d')]};});_0x2f1159[_0x336d('0x3e')]=_['map'](_0x2590e5,_0x336d('0x37'));_0x2f1159[_0x336d('0x3f')]=_[_0x336d('0x40')](_0x575dc6[_0x336d('0x3f')]);_0x2f1159[_0x336d('0x41')]=_[_0x336d('0x42')](_0x2f1159['model'],_0x2f1159[_0x336d('0x3f')]);_0x5248aa[_0x336d('0x43')]=_[_0x336d('0x42')](_0x2f1159['model'],qs[_0x336d('0x44')](_0x575dc6['query'][_0x336d('0x44')]));_0x5248aa[_0x336d('0x43')]=_0x5248aa[_0x336d('0x43')][_0x336d('0x45')]?_0x5248aa[_0x336d('0x43')]:_0x2f1159[_0x336d('0x3e')];if(!_0x575dc6[_0x336d('0x3f')][_0x336d('0x46')]('nolimit')){_0x5248aa[_0x336d('0x2f')]=qs[_0x336d('0x2f')](_0x575dc6['query']['limit']);_0x5248aa[_0x336d('0x2c')]=qs['offset'](_0x575dc6[_0x336d('0x3f')][_0x336d('0x2c')]);}_0x5248aa[_0x336d('0x47')]=qs[_0x336d('0x48')](_0x575dc6[_0x336d('0x3f')][_0x336d('0x48')]);_0x5248aa['where']=qs[_0x336d('0x41')](_[_0x336d('0x49')](_0x575dc6[_0x336d('0x3f')],_0x2f1159[_0x336d('0x41')]),_0x2590e5);if(_0x575dc6[_0x336d('0x3f')][_0x336d('0x4a')]){_0x5248aa[_0x336d('0x4b')]=_[_0x336d('0x4c')](_0x5248aa[_0x336d('0x4b')],{'$or':_['map'](_0x2590e5,function(_0x324868){if(_0x324868[_0x336d('0x3c')]!=='VIRTUAL'){var _0x4346bf={};_0x4346bf[_0x324868[_0x336d('0x37')]]={'$like':'%'+_0x575dc6[_0x336d('0x3f')][_0x336d('0x4a')]+'%'};return _0x4346bf;}})});}_0x5248aa=_[_0x336d('0x4c')]({},_0x5248aa,_0x575dc6[_0x336d('0x4d')]);var _0x5db0e2={'where':_0x5248aa[_0x336d('0x4b')]};return db[_0x336d('0x4e')]['count'](_0x5db0e2)[_0x336d('0x1d')](function(_0x5b4742){_0x418963[_0x336d('0x2e')]=_0x5b4742;if(_0x575dc6[_0x336d('0x3f')][_0x336d('0x4f')]){_0x5248aa[_0x336d('0x50')]=[{'all':!![]}];}return db[_0x336d('0x4e')][_0x336d('0x51')](_0x5248aa);})[_0x336d('0x1d')](function(_0x1f258f){_0x418963[_0x336d('0x52')]=_0x1f258f;return _0x418963;})[_0x336d('0x1d')](respondWithFilteredResult(_0x3dc048,_0x5248aa))['catch'](handleError(_0x3dc048,null));};exports[_0x336d('0x53')]=function(_0x1d0416,_0x1a6fad){var _0x32fda8={'raw':!![],'where':{'id':_0x1d0416[_0x336d('0x54')]['id']}},_0x2dde82={};_0x2dde82[_0x336d('0x3e')]=_[_0x336d('0x40')](db['FaxMessage'][_0x336d('0x3a')]);_0x2dde82[_0x336d('0x3f')]=_[_0x336d('0x40')](_0x1d0416[_0x336d('0x3f')]);_0x2dde82['filters']=_[_0x336d('0x42')](_0x2dde82[_0x336d('0x3e')],_0x2dde82[_0x336d('0x3f')]);_0x32fda8['attributes']=_[_0x336d('0x42')](_0x2dde82[_0x336d('0x3e')],qs[_0x336d('0x44')](_0x1d0416[_0x336d('0x3f')][_0x336d('0x44')]));_0x32fda8['attributes']=_0x32fda8[_0x336d('0x43')][_0x336d('0x45')]?_0x32fda8[_0x336d('0x43')]:_0x2dde82['model'];if(_0x1d0416['query'][_0x336d('0x4f')]){_0x32fda8[_0x336d('0x50')]=[{'all':!![]}];}_0x32fda8=_['merge']({},_0x32fda8,_0x1d0416['options']);return db['FaxMessage'][_0x336d('0x55')](_0x32fda8)[_0x336d('0x1d')](handleEntityNotFound(_0x1a6fad,null))[_0x336d('0x1d')](respondWithResult(_0x1a6fad,null))['catch'](handleError(_0x1a6fad,null));};exports['update']=function(_0x2ad45b,_0x1b9373){if(_0x2ad45b[_0x336d('0x56')]['id']){delete _0x2ad45b[_0x336d('0x56')]['id'];}return db[_0x336d('0x4e')][_0x336d('0x55')]({'where':{'id':_0x2ad45b[_0x336d('0x54')]['id']}})[_0x336d('0x1d')](handleEntityNotFound(_0x1b9373,null))[_0x336d('0x1d')](saveUpdates(_0x2ad45b[_0x336d('0x56')],null))[_0x336d('0x1d')](respondWithResult(_0x1b9373,null))[_0x336d('0x28')](handleError(_0x1b9373,null));};exports[_0x336d('0x57')]=function(_0x3698b2,_0x143dde){return db[_0x336d('0x4e')][_0x336d('0x55')]({'where':{'id':_0x3698b2[_0x336d('0x54')]['id']}})[_0x336d('0x1d')](handleEntityNotFound(_0x143dde,null))['then'](removeEntity(_0x143dde,null))[_0x336d('0x28')](handleError(_0x143dde,null));};exports[_0x336d('0x58')]=function(_0xbf3f2,_0x4f4e12){return db['FaxMessage']['describe']()[_0x336d('0x1d')](respondWithResult(_0x4f4e12,null))[_0x336d('0x28')](handleError(_0x4f4e12,null));};var interaction_log=require(_0x336d('0x10'))(_0x336d('0x59'));exports[_0x336d('0x5a')]=function(_0x1afd13,_0x47f916,_0x1806a2){var _0x2dc72c={'agent':{},'channel':_0x336d('0x5b')};if(_0x1afd13['body']['id']){delete _0x1afd13[_0x336d('0x56')]['id'];}_0x1afd13[_0x336d('0x56')][_0x336d('0x5c')]=!![];_0x1afd13[_0x336d('0x56')][_0x336d('0x5d')]=moment()[_0x336d('0x5e')](_0x336d('0x5f'));_0x1afd13[_0x336d('0x56')][_0x336d('0x60')]=_0x1afd13[_0x336d('0x56')]['UserId']||_0x1afd13[_0x336d('0x61')]['id'];_0x2dc72c[_0x336d('0x62')]['id']=_0x1afd13['body']['UserId'];return db['FaxMessage'][_0x336d('0x55')]({'where':{'id':_0x1afd13['params']['id'],'UserId':null}})[_0x336d('0x1d')](handleEntityNotFound(_0x47f916,null))[_0x336d('0x1d')](saveUpdates(_0x1afd13[_0x336d('0x56')],null))[_0x336d('0x1d')](function(_0x1919d1){if(_0x1919d1){_0x2dc72c[_0x336d('0x26')]=_0x1919d1['get']({'plain':!![]});return db[_0x336d('0x63')][_0x336d('0x55')]({'where':{'id':_0x1919d1['FaxInteractionId']}});}return null;})[_0x336d('0x1d')](handleEntityNotFound(_0x47f916,null))['then'](function(_0x775afe){if(_0x775afe){return _0x775afe[_0x336d('0x35')]({'UserId':_0x1afd13[_0x336d('0x56')][_0x336d('0x60')],'read1stAt':_['isNil'](_0x775afe['read1stAt'])?moment()[_0x336d('0x5e')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0x336d('0x1d')](function(_0x1066a6){if(_0x1066a6){_0x2dc72c['interaction']=_0x1066a6['get']({'plain':!![]});interaction_log['info'](_0x336d('0x64'),_0x1afd13[_0x336d('0x61')]['id'],_0x1afd13[_0x336d('0x61')][_0x336d('0x37')],_0x1afd13['user'][_0x336d('0x65')],_0x2dc72c[_0x336d('0x66')]['id'],_0x1afd13[_0x336d('0x56')]?JSON[_0x336d('0x22')](_0x1afd13['body']):_0x336d('0x67'));return respondWithRpcPromise(_0x336d('0x68'),_0x336d('0x69'),_0x2dc72c);}return null;})[_0x336d('0x1d')](function(_0x5e43f6){var _0x868bbc='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x5e43f6[_0x336d('0x26')]['ContactId'];return db[_0x336d('0x6a')][_0x336d('0x3f')](_0x868bbc,{'type':db[_0x336d('0x6b')][_0x336d('0x6c')][_0x336d('0x6d')],'raw':!![]})['then'](function(_0x12da8d){return _0x12da8d;});})[_0x336d('0x1d')](function(_0x405057){if(_0x405057){_0x2dc72c[_0x336d('0x26')][_0x336d('0x6e')]=_0x405057[0x0];if(!_0x1afd13[_0x336d('0x56')]['UserId'])return;return db['User'][_0x336d('0x55')]({'where':{'id':_0x1afd13['body'][_0x336d('0x60')],'role':_0x336d('0x62')},'attributes':['id','name',_0x336d('0x6f'),_0x336d('0x70'),_0x336d('0x71')],'raw':!![]});}return null;})[_0x336d('0x1d')](function(_0x42e6b3){if(!_0x42e6b3)return null;_0x2dc72c[_0x336d('0x26')]['agent']=_0x42e6b3;return _0x2dc72c;})[_0x336d('0x1d')](function(_0x5c7a6d){if(_0x5c7a6d){if(_0x1afd13[_0x336d('0x56')][_0x336d('0x72')]){_0x2dc72c[_0x336d('0x26')]['interface']=util['format'](_0x336d('0x73'),_0x1afd13[_0x336d('0x61')][_0x336d('0x37')]);_0x2dc72c[_0x336d('0x26')][_0x336d('0x74')]=_0x2dc72c[_0x336d('0x74')];_0x2dc72c[_0x336d('0x26')][_0x336d('0x75')]=_0x2dc72c[_0x336d('0x74')];_0x2dc72c[_0x336d('0x26')][_0x336d('0x76')]=_0x336d('0x5a');return respondWithRpcPromise(_0x336d('0x77'),'EventManager',{'event':_0x336d('0x78'),'message':_0x2dc72c['message']},client9002)['then'](function(){return _0x2dc72c;});}return _0x2dc72c;}return null;})[_0x336d('0x1d')](respondWithResult(_0x47f916,null))['catch'](handleError(_0x47f916,null));};var interaction_log=require(_0x336d('0x10'))('fax-interactions');exports['reject']=function(_0x5c0d8a,_0x26094e,_0x2ad43b){var _0x1e30f0={'agent':{},'channel':_0x336d('0x5b')};if(_0x5c0d8a['body']['id']){delete _0x5c0d8a[_0x336d('0x56')]['id'];}_0x5c0d8a['body'][_0x336d('0x60')]=_0x5c0d8a[_0x336d('0x56')][_0x336d('0x60')]||_0x5c0d8a[_0x336d('0x61')]['id'];_0x1e30f0[_0x336d('0x62')]['id']=_0x5c0d8a[_0x336d('0x56')][_0x336d('0x60')];return db['FaxMessage'][_0x336d('0x55')]({'where':{'id':_0x5c0d8a['params']['id'],'UserId':null}})['then'](handleEntityNotFound(_0x26094e,null))[_0x336d('0x1d')](function(_0x292317){if(_0x292317){_0x1e30f0['message']=_0x292317[_0x336d('0x79')]({'plain':!![]});return db['FaxInteraction']['find']({'where':{'id':_0x292317[_0x336d('0x7a')]}});}return null;})[_0x336d('0x1d')](handleEntityNotFound(_0x26094e,null))['then'](function(_0x39f26a){if(_0x39f26a){_0x1e30f0[_0x336d('0x66')]=_0x39f26a['get']({'plain':!![]});interaction_log[_0x336d('0x1e')](_0x336d('0x7b'),_0x5c0d8a[_0x336d('0x61')]['id'],_0x5c0d8a[_0x336d('0x61')][_0x336d('0x37')],_0x5c0d8a[_0x336d('0x61')][_0x336d('0x65')],_0x1e30f0[_0x336d('0x66')]['id'],_0x5c0d8a[_0x336d('0x56')]?JSON['stringify'](_0x5c0d8a[_0x336d('0x56')]):'null');return respondWithRpcPromise('RejectMessage',_0x336d('0x7c'),_0x1e30f0);}return null;})[_0x336d('0x1d')](function(_0x5409b2){var _0x394f18=_0x336d('0x7d')+_0x5409b2['message'][_0x336d('0x7e')];return db[_0x336d('0x6a')]['query'](_0x394f18,{'type':db[_0x336d('0x6b')][_0x336d('0x6c')][_0x336d('0x6d')],'raw':!![]})[_0x336d('0x1d')](function(_0x275e28){return _0x275e28;});})['then'](function(_0x27acab){if(_0x27acab){_0x1e30f0[_0x336d('0x26')]['contact']=_0x27acab[0x0];if(!_0x5c0d8a['body'][_0x336d('0x60')])return;return db[_0x336d('0x7f')][_0x336d('0x55')]({'where':{'id':_0x5c0d8a[_0x336d('0x56')][_0x336d('0x60')],'role':_0x336d('0x62')},'attributes':['id',_0x336d('0x37'),_0x336d('0x6f'),_0x336d('0x70'),_0x336d('0x71')],'raw':!![]});}return null;})[_0x336d('0x1d')](function(_0x3d0ced){if(!_0x3d0ced)return null;_0x1e30f0[_0x336d('0x26')][_0x336d('0x62')]=_0x3d0ced;return _0x1e30f0;})[_0x336d('0x1d')](function(_0x2093e6){if(_0x2093e6){_0x2093e6[_0x336d('0x26')][_0x336d('0x80')]=util[_0x336d('0x5e')]('SIP/%s',_0x5c0d8a['user']['name']);_0x2093e6[_0x336d('0x26')][_0x336d('0x74')]=_0x1e30f0[_0x336d('0x74')];_0x2093e6[_0x336d('0x26')]['motionChannel']=_0x1e30f0[_0x336d('0x74')];_0x2093e6['message'][_0x336d('0x76')]='reject';respondWithRpcPromise(_0x336d('0x77'),_0x336d('0x77'),{'event':_0x336d('0x81'),'message':_0x2093e6[_0x336d('0x26')]},client9002);return _0x1e30f0;}return null;})[_0x336d('0x1d')](respondWithResult(_0x26094e,null))[_0x336d('0x28')](handleError(_0x26094e,null));};exports[_0x336d('0x82')]=function(_0x274089,_0xb1e83){var _0xb8033c;return db[_0x336d('0x4e')][_0x336d('0x82')](_0x274089['body'],{})[_0x336d('0x1d')](function(_0x1abf75){_0xb8033c=_0x1abf75;return db['CmContact'][_0x336d('0x83')]({'where':{'id':_0xb8033c['ContactId']}});})[_0x336d('0x1d')](function(_0x146eae){if(_[_0x336d('0x84')](_0x146eae)){return;}else{_0xb8033c[_0x336d('0x5b')]=_0x146eae[_0x336d('0x5b')];return db[_0x336d('0x85')][_0x336d('0x83')]({'where':{'id':_0xb8033c['AttachmentId']}});}})[_0x336d('0x1d')](function(_0x3ad131){return respondWithRpcPromise(_0x336d('0x86'),_0x336d('0x86'),{'FaxAccountId':_[_0x336d('0x84')](_0x274089['body'])?undefined:_0x274089[_0x336d('0x56')][_0x336d('0x87')],'path':_[_0x336d('0x84')](_0x3ad131)?undefined:util[_0x336d('0x5e')](_0x336d('0x88'),_0x3ad131[_0x336d('0x89')]),'fax':_['isNil'](_0xb8033c['fax'])?undefined:_0xb8033c[_0x336d('0x5b')],'AttachmentId':_0xb8033c[_0x336d('0x8a')]},client9002);})[_0x336d('0x1d')](respondWithResult(_0xb1e83,0xc9))['catch'](handleError(_0xb1e83,null));};exports[_0x336d('0x8b')]=function(_0x277f9c,_0x1165e4){var _0x6cc0a7=path[_0x336d('0x8c')](config['root'],'server','files','attachments');return db[_0x336d('0x4e')][_0x336d('0x55')]({'where':{'id':_0x277f9c[_0x336d('0x54')]['id']},'include':[{'model':db[_0x336d('0x85')],'as':_0x336d('0x85')}]})[_0x336d('0x1d')](handleEntityNotFound(_0x1165e4,null))[_0x336d('0x1d')](function(_0x54fe1c){if(_0x54fe1c){return _0x1165e4[_0x336d('0x8b')](path[_0x336d('0x8c')](_0x6cc0a7,_0x54fe1c[_0x336d('0x85')]['basename']));}})[_0x336d('0x28')](handleError(_0x1165e4,null));};
\ No newline at end of file
index 900c165..648e708 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcf71=['update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','FaxMessage','setMaxListeners'];(function(_0x350131,_0x397f44){var _0xd280a5=function(_0x68e8ed){while(--_0x68e8ed){_0x350131['push'](_0x350131['shift']());}};_0xd280a5(++_0x397f44);}(_0xcf71,0xba));var _0x1cf7=function(_0x3b0b34,_0xe6a14f){_0x3b0b34=_0x3b0b34-0x0;var _0x5f5496=_0xcf71[_0x3b0b34];return _0x5f5496;};'use strict';var EventEmitter=require(_0x1cf7('0x0'));var FaxMessage=require(_0x1cf7('0x1'))['db'][_0x1cf7('0x2')];var FaxMessageEvents=new EventEmitter();FaxMessageEvents[_0x1cf7('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0x1cf7('0x4'),'afterDestroy':_0x1cf7('0x5')};function emitEvent(_0xcc31bf){return function(_0x21307d,_0x11e462,_0x14d074){FaxMessageEvents[_0x1cf7('0x6')](_0xcc31bf+':'+_0x21307d['id'],_0x21307d);FaxMessageEvents[_0x1cf7('0x6')](_0xcc31bf,_0x21307d);_0x14d074(null);};}for(var e in events){if(events[_0x1cf7('0x7')](e)){var event=events[e];FaxMessage[_0x1cf7('0x8')](e,emitEvent(event));}}module[_0x1cf7('0x9')]=FaxMessageEvents;
\ No newline at end of file
+var _0x0eeb=['../../mysqldb','FaxMessage','setMaxListeners','save','update','emit','hasOwnProperty','hook','events'];(function(_0x444e8b,_0x3524cc){var _0x35eb37=function(_0x17e1a3){while(--_0x17e1a3){_0x444e8b['push'](_0x444e8b['shift']());}};_0x35eb37(++_0x3524cc);}(_0x0eeb,0xc5));var _0xb0ee=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0x0eeb[_0x4a9fb1];return _0x348672;};'use strict';var EventEmitter=require(_0xb0ee('0x0'));var FaxMessage=require(_0xb0ee('0x1'))['db'][_0xb0ee('0x2')];var FaxMessageEvents=new EventEmitter();FaxMessageEvents[_0xb0ee('0x3')](0x0);var events={'afterCreate':_0xb0ee('0x4'),'afterUpdate':_0xb0ee('0x5'),'afterDestroy':'remove'};function emitEvent(_0x5add55){return function(_0x3b94a0,_0xfbf0cc,_0x13a7ce){FaxMessageEvents[_0xb0ee('0x6')](_0x5add55+':'+_0x3b94a0['id'],_0x3b94a0);FaxMessageEvents[_0xb0ee('0x6')](_0x5add55,_0x3b94a0);_0x13a7ce(null);};}for(var e in events){if(events[_0xb0ee('0x7')](e)){var event=events[e];FaxMessage[_0xb0ee('0x8')](e,emitEvent(event));}}module['exports']=FaxMessageEvents;
\ No newline at end of file
index 9900268..452a4d8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4dd2=['moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','FaxMessage','fax_messages','fti_fax_messages','FULLTEXT','models','get','direction','toLowerCase','out','isNil','UserId','FaxInteraction','findOne','FaxInteractionId','then','createdAt','catch','error','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger'];(function(_0x266618,_0x18f637){var _0x54dbf5=function(_0x1f7985){while(--_0x1f7985){_0x266618['push'](_0x266618['shift']());}};_0x54dbf5(++_0x18f637);}(_0x4dd2,0x93));var _0x24dd=function(_0x366e51,_0x3a0178){_0x366e51=_0x366e51-0x0;var _0x4e23e3=_0x4dd2[_0x366e51];return _0x4e23e3;};'use strict';var _=require(_0x24dd('0x0'));var util=require(_0x24dd('0x1'));var logger=require(_0x24dd('0x2'))('api');var moment=require(_0x24dd('0x3'));var BPromise=require(_0x24dd('0x4'));var rp=require(_0x24dd('0x5'));var fs=require('fs');var path=require(_0x24dd('0x6'));var rimraf=require(_0x24dd('0x7'));var config=require(_0x24dd('0x8'));var attributes=require('./faxMessage.attributes');module[_0x24dd('0x9')]=function(_0x571235,_0x4b1769){return _0x571235['define'](_0x24dd('0xa'),attributes,{'tableName':_0x24dd('0xb'),'paranoid':![],'indexes':[{'name':_0x24dd('0xc'),'fields':['body'],'type':_0x24dd('0xd')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x42b7a7,_0x3bee64,_0x219da6){var _0x51d92c=_0x571235[_0x24dd('0xe')];var _0x3d6012=_0x42b7a7[_0x24dd('0xf')]({'plain':!![]});if(_0x3d6012[_0x24dd('0x10')][_0x24dd('0x11')]()==='in'||_0x3d6012[_0x24dd('0x10')]['toLowerCase']()===_0x24dd('0x12')&&!_0x3d6012['secret']&&!_[_0x24dd('0x13')](_0x3d6012[_0x24dd('0x14')])){_0x51d92c[_0x24dd('0x15')][_0x24dd('0x16')]({'where':{'id':_0x3d6012[_0x24dd('0x17')]}})[_0x24dd('0x18')](function(_0xbfbf70){if(_0xbfbf70){_0xbfbf70['update']({'lastMsgAt':_0x3d6012[_0x24dd('0x19')],'lastMsgDirection':_0x3d6012[_0x24dd('0x10')][_0x24dd('0x11')]()});}})[_0x24dd('0x1a')](function(_0x1befe7){console[_0x24dd('0x1b')](_0x1befe7);});}_0x219da6();}},'charset':_0x24dd('0x1c'),'collate':_0x24dd('0x1d')});};
\ No newline at end of file
+var _0x24e9=['utf8mb4','utf8mb4_unicode_ci','../../config/logger','api','moment','rimraf','./faxMessage.attributes','FaxMessage','fax_messages','fti_fax_messages','FULLTEXT','get','toLowerCase','direction','out','secret','isNil','findOne','FaxInteractionId','then','createdAt','catch'];(function(_0x4589a5,_0x2f1754){var _0x37fde0=function(_0x3ced3d){while(--_0x3ced3d){_0x4589a5['push'](_0x4589a5['shift']());}};_0x37fde0(++_0x2f1754);}(_0x24e9,0x86));var _0x924e=function(_0x43b06b,_0x1929c7){_0x43b06b=_0x43b06b-0x0;var _0x2c555b=_0x24e9[_0x43b06b];return _0x2c555b;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x924e('0x0'))(_0x924e('0x1'));var moment=require(_0x924e('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x924e('0x3'));var config=require('../../config/environment');var attributes=require(_0x924e('0x4'));module['exports']=function(_0x212a57,_0x30b08e){return _0x212a57['define'](_0x924e('0x5'),attributes,{'tableName':_0x924e('0x6'),'paranoid':![],'indexes':[{'name':_0x924e('0x7'),'fields':['body'],'type':_0x924e('0x8')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x580bae,_0x58740c,_0x4023a9){var _0x597911=_0x212a57['models'];var _0x4a99d7=_0x580bae[_0x924e('0x9')]({'plain':!![]});if(_0x4a99d7['direction'][_0x924e('0xa')]()==='in'||_0x4a99d7[_0x924e('0xb')][_0x924e('0xa')]()===_0x924e('0xc')&&!_0x4a99d7[_0x924e('0xd')]&&!_[_0x924e('0xe')](_0x4a99d7['UserId'])){_0x597911['FaxInteraction'][_0x924e('0xf')]({'where':{'id':_0x4a99d7[_0x924e('0x10')]}})[_0x924e('0x11')](function(_0x571e6f){if(_0x571e6f){_0x571e6f['update']({'lastMsgAt':_0x4a99d7[_0x924e('0x12')],'lastMsgDirection':_0x4a99d7[_0x924e('0xb')]['toLowerCase']()});}})[_0x924e('0x13')](function(_0x46a4c4){console['error'](_0x46a4c4);});}_0x4023a9();}},'charset':_0x924e('0x14'),'collate':_0x924e('0x15')});};
\ No newline at end of file
index 79c74ec..165f336 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x84ab=['code','message','result','catch','FaxMessage','create','body','raw','CreateFaxMessage','debug','UpdateFaxMessage','update','options','where','attributes','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','defaults','localhost','socket.io-emitter','./faxMessage.socket','then','info','FaxMessage,\x20%s,\x20%s','request\x20sent','FaxMessage,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x11f345,_0x3d1ac3){var _0x5d66c9=function(_0x8ac91a){while(--_0x8ac91a){_0x11f345['push'](_0x11f345['shift']());}};_0x5d66c9(++_0x3d1ac3);}(_0x84ab,0x12f));var _0xb84a=function(_0x557fd2,_0x2c0a7a){_0x557fd2=_0x557fd2-0x0;var _0x1b54a2=_0x84ab[_0x557fd2];return _0x1b54a2;};'use strict';var _=require(_0xb84a('0x0'));var util=require(_0xb84a('0x1'));var moment=require(_0xb84a('0x2'));var BPromise=require(_0xb84a('0x3'));var rs=require(_0xb84a('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb84a('0x5'))['db'];var utils=require(_0xb84a('0x6'));var logger=require('../../config/logger')(_0xb84a('0x7'));var config=require(_0xb84a('0x8'));var jayson=require(_0xb84a('0x9'));var client=jayson['client']['http']({'port':0x232a});config['redis']=_[_0xb84a('0xa')](config['redis'],{'host':_0xb84a('0xb'),'port':0x18eb});var socket=require(_0xb84a('0xc'))(new Redis(config['redis']));require(_0xb84a('0xd'))['register'](socket);function respondWithRpcPromise(_0x2e6a71,_0x1886e0,_0x42daf5){return new BPromise(function(_0x5d3b29,_0x5a34f7){return client['request'](_0x2e6a71,_0x42daf5)[_0xb84a('0xe')](function(_0x17379b){logger[_0xb84a('0xf')](_0xb84a('0x10'),_0x1886e0,_0xb84a('0x11'));logger['debug'](_0xb84a('0x12'),_0x1886e0,_0xb84a('0x11'),JSON[_0xb84a('0x13')](_0x17379b));if(_0x17379b[_0xb84a('0x14')]){if(_0x17379b[_0xb84a('0x14')][_0xb84a('0x15')]===0x1f4){logger[_0xb84a('0x14')](_0xb84a('0x10'),_0x1886e0,_0x17379b[_0xb84a('0x14')][_0xb84a('0x16')]);return _0x5a34f7(_0x17379b[_0xb84a('0x14')][_0xb84a('0x16')]);}logger['error'](_0xb84a('0x10'),_0x1886e0,_0x17379b[_0xb84a('0x14')][_0xb84a('0x16')]);return _0x5d3b29(_0x17379b[_0xb84a('0x14')][_0xb84a('0x16')]);}else{logger[_0xb84a('0xf')](_0xb84a('0x10'),_0x1886e0,_0xb84a('0x11'));_0x5d3b29(_0x17379b[_0xb84a('0x17')][_0xb84a('0x16')]);}})[_0xb84a('0x18')](function(_0x2de49c){logger[_0xb84a('0x14')](_0xb84a('0x10'),_0x1886e0,_0x2de49c);_0x5a34f7(_0x2de49c);});});}exports['CreateFaxMessage']=function(_0x1a0056){var _0x319216=this;return new Promise(function(_0x55a633,_0xac76d3){return db[_0xb84a('0x19')][_0xb84a('0x1a')](_0x1a0056[_0xb84a('0x1b')],{'raw':_0x1a0056['options']?_0x1a0056['options'][_0xb84a('0x1c')]===undefined?!![]:![]:!![]})[_0xb84a('0xe')](function(_0x2d70fd){logger[_0xb84a('0xf')](_0xb84a('0x1d'),_0x1a0056);logger[_0xb84a('0x1e')](_0xb84a('0x1d'),_0x1a0056,JSON[_0xb84a('0x13')](_0x2d70fd));_0x55a633(_0x2d70fd);})[_0xb84a('0x18')](function(_0x26fe42){logger[_0xb84a('0x14')](_0xb84a('0x1d'),_0x26fe42[_0xb84a('0x16')],_0x1a0056);_0xac76d3(_0x319216[_0xb84a('0x14')](0x1f4,_0x26fe42[_0xb84a('0x16')]));});});};exports[_0xb84a('0x1f')]=function(_0x378ce1){var _0x3ff0bc=this;return new Promise(function(_0x3b6805,_0xd468c3){return db[_0xb84a('0x19')][_0xb84a('0x20')](_0x378ce1[_0xb84a('0x1b')],{'raw':_0x378ce1[_0xb84a('0x21')]?_0x378ce1[_0xb84a('0x21')][_0xb84a('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x378ce1['options']?_0x378ce1['options'][_0xb84a('0x22')]||null:null,'attributes':_0x378ce1[_0xb84a('0x21')]?_0x378ce1['options'][_0xb84a('0x23')]||null:null,'limit':_0x378ce1[_0xb84a('0x21')]?_0x378ce1['options']['limit']||null:null})[_0xb84a('0xe')](function(_0x8e9319){logger['info'](_0xb84a('0x1f'),_0x378ce1);logger[_0xb84a('0x1e')](_0xb84a('0x1f'),_0x378ce1,JSON[_0xb84a('0x13')](_0x8e9319));_0x3b6805(_0x8e9319);})[_0xb84a('0x18')](function(_0x144c25){logger[_0xb84a('0x14')](_0xb84a('0x1f'),_0x144c25['message'],_0x378ce1);_0xd468c3(_0x3ff0bc[_0xb84a('0x14')](0x1f4,_0x144c25['message']));});});};
\ No newline at end of file
+var _0x6f0d=['../../config/logger','rpc','../../config/environment','client','redis','defaults','localhost','./faxMessage.socket','register','request','then','FaxMessage,\x20%s,\x20%s','request\x20sent','debug','FaxMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','CreateFaxMessage','FaxMessage','body','options','raw','UpdateFaxMessage','update','attributes','limit','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils'];(function(_0xae282f,_0x2d9368){var _0x5f46d4=function(_0x4f703e){while(--_0x4f703e){_0xae282f['push'](_0xae282f['shift']());}};_0x5f46d4(++_0x2d9368);}(_0x6f0d,0x16c));var _0xd6f0=function(_0x14e865,_0x24de1b){_0x14e865=_0x14e865-0x0;var _0x412c58=_0x6f0d[_0x14e865];return _0x412c58;};'use strict';var _=require('lodash');var util=require(_0xd6f0('0x0'));var moment=require(_0xd6f0('0x1'));var BPromise=require(_0xd6f0('0x2'));var rs=require(_0xd6f0('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd6f0('0x4'))['db'];var utils=require(_0xd6f0('0x5'));var logger=require(_0xd6f0('0x6'))(_0xd6f0('0x7'));var config=require(_0xd6f0('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xd6f0('0x9')]['http']({'port':0x232a});config[_0xd6f0('0xa')]=_[_0xd6f0('0xb')](config[_0xd6f0('0xa')],{'host':_0xd6f0('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xd6f0('0xd'))[_0xd6f0('0xe')](socket);function respondWithRpcPromise(_0x2854cd,_0x382a2e,_0x225dcf){return new BPromise(function(_0x4db64a,_0x136eee){return client[_0xd6f0('0xf')](_0x2854cd,_0x225dcf)[_0xd6f0('0x10')](function(_0x44bba6){logger['info'](_0xd6f0('0x11'),_0x382a2e,_0xd6f0('0x12'));logger[_0xd6f0('0x13')](_0xd6f0('0x14'),_0x382a2e,_0xd6f0('0x12'),JSON[_0xd6f0('0x15')](_0x44bba6));if(_0x44bba6[_0xd6f0('0x16')]){if(_0x44bba6[_0xd6f0('0x16')][_0xd6f0('0x17')]===0x1f4){logger['error'](_0xd6f0('0x11'),_0x382a2e,_0x44bba6[_0xd6f0('0x16')]['message']);return _0x136eee(_0x44bba6[_0xd6f0('0x16')]['message']);}logger[_0xd6f0('0x16')](_0xd6f0('0x11'),_0x382a2e,_0x44bba6[_0xd6f0('0x16')][_0xd6f0('0x18')]);return _0x4db64a(_0x44bba6[_0xd6f0('0x16')][_0xd6f0('0x18')]);}else{logger[_0xd6f0('0x19')](_0xd6f0('0x11'),_0x382a2e,_0xd6f0('0x12'));_0x4db64a(_0x44bba6[_0xd6f0('0x1a')][_0xd6f0('0x18')]);}})[_0xd6f0('0x1b')](function(_0x327231){logger[_0xd6f0('0x16')](_0xd6f0('0x11'),_0x382a2e,_0x327231);_0x136eee(_0x327231);});});}exports[_0xd6f0('0x1c')]=function(_0x5cd367){var _0x48ac38=this;return new Promise(function(_0x3939aa,_0x264104){return db[_0xd6f0('0x1d')]['create'](_0x5cd367[_0xd6f0('0x1e')],{'raw':_0x5cd367[_0xd6f0('0x1f')]?_0x5cd367['options'][_0xd6f0('0x20')]===undefined?!![]:![]:!![]})['then'](function(_0x1ee584){logger[_0xd6f0('0x19')]('CreateFaxMessage',_0x5cd367);logger[_0xd6f0('0x13')](_0xd6f0('0x1c'),_0x5cd367,JSON['stringify'](_0x1ee584));_0x3939aa(_0x1ee584);})[_0xd6f0('0x1b')](function(_0x402070){logger[_0xd6f0('0x16')]('CreateFaxMessage',_0x402070[_0xd6f0('0x18')],_0x5cd367);_0x264104(_0x48ac38[_0xd6f0('0x16')](0x1f4,_0x402070['message']));});});};exports[_0xd6f0('0x21')]=function(_0x551be8){var _0x2042d5=this;return new Promise(function(_0x3fb5c3,_0x1630dc){return db[_0xd6f0('0x1d')][_0xd6f0('0x22')](_0x551be8[_0xd6f0('0x1e')],{'raw':_0x551be8[_0xd6f0('0x1f')]?_0x551be8[_0xd6f0('0x1f')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x551be8[_0xd6f0('0x1f')]?_0x551be8[_0xd6f0('0x1f')]['where']||null:null,'attributes':_0x551be8[_0xd6f0('0x1f')]?_0x551be8[_0xd6f0('0x1f')][_0xd6f0('0x23')]||null:null,'limit':_0x551be8[_0xd6f0('0x1f')]?_0x551be8[_0xd6f0('0x1f')][_0xd6f0('0x24')]||null:null})[_0xd6f0('0x10')](function(_0x3151f8){logger[_0xd6f0('0x19')](_0xd6f0('0x21'),_0x551be8);logger[_0xd6f0('0x13')](_0xd6f0('0x21'),_0x551be8,JSON[_0xd6f0('0x15')](_0x3151f8));_0x3fb5c3(_0x3151f8);})[_0xd6f0('0x1b')](function(_0xbdd223){logger[_0xd6f0('0x16')](_0xd6f0('0x21'),_0xbdd223[_0xd6f0('0x18')],_0x551be8);_0x1630dc(_0x2042d5[_0xd6f0('0x16')](0x1f4,_0xbdd223[_0xd6f0('0x18')]));});});};
\ No newline at end of file
index 592e0f8..cc44f7a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb9dd=['length','faxMessage:','remove','emit','register'];(function(_0xb1174e,_0x1e68a7){var _0x285bac=function(_0x32c505){while(--_0x32c505){_0xb1174e['push'](_0xb1174e['shift']());}};_0x285bac(++_0x1e68a7);}(_0xb9dd,0xc5));var _0xdb9d=function(_0x209e24,_0x5421eb){_0x209e24=_0x209e24-0x0;var _0x395dd8=_0xb9dd[_0x209e24];return _0x395dd8;};'use strict';var FaxMessageEvents=require('./faxMessage.events');var events=['save',_0xdb9d('0x0'),'update'];function createListener(_0x327299,_0x5d1fd4){return function(_0x40ad5e){_0x5d1fd4[_0xdb9d('0x1')](_0x327299,_0x40ad5e);};}function removeListener(_0x3d57cb,_0xfc4e1c){return function(){FaxMessageEvents['removeListener'](_0x3d57cb,_0xfc4e1c);};}exports[_0xdb9d('0x2')]=function(_0x3dd438){for(var _0xaa023f=0x0,_0x5f3300=events[_0xdb9d('0x3')];_0xaa023f<_0x5f3300;_0xaa023f++){var _0x54ae15=events[_0xaa023f];var _0x1180a0=createListener(_0xdb9d('0x4')+_0x54ae15,_0x3dd438);FaxMessageEvents['on'](_0x54ae15,_0x1180a0);}};
\ No newline at end of file
+var _0xc78e=['update','emit','removeListener','length','faxMessage:','./faxMessage.events'];(function(_0x37a7c6,_0x3a84b6){var _0x539905=function(_0xa00c20){while(--_0xa00c20){_0x37a7c6['push'](_0x37a7c6['shift']());}};_0x539905(++_0x3a84b6);}(_0xc78e,0xbf));var _0xec78=function(_0x1edc0c,_0x33d6c5){_0x1edc0c=_0x1edc0c-0x0;var _0x40c93e=_0xc78e[_0x1edc0c];return _0x40c93e;};'use strict';var FaxMessageEvents=require(_0xec78('0x0'));var events=['save','remove',_0xec78('0x1')];function createListener(_0x4a4ffc,_0x4e3d01){return function(_0x37e03f){_0x4e3d01[_0xec78('0x2')](_0x4a4ffc,_0x37e03f);};}function removeListener(_0x3b177a,_0x362182){return function(){FaxMessageEvents[_0xec78('0x3')](_0x3b177a,_0x362182);};}exports['register']=function(_0xcc269a){for(var _0xed65ca=0x0,_0x23738c=events[_0xec78('0x4')];_0xed65ca<_0x23738c;_0xed65ca++){var _0x3c8dea=events[_0xed65ca];var _0x874ecc=createListener(_0xec78('0x5')+_0x3c8dea,_0xcc269a);FaxMessageEvents['on'](_0x3c8dea,_0x874ecc);}};
\ No newline at end of file
index a88ef67..358c1f8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x750a=['../../components/interaction/service','../../config/environment','./faxMessage.controller','get','isAuthenticated','index','/describe','/:id','show','download','tracked','faxmessage:create','create','update','/:id/accept','accept','put','/:id/reject','delete','exports','util','express','Router','fs-extra','../../components/auth/service'];(function(_0x3dbcd3,_0x49fd03){var _0x4ed28f=function(_0x4edd5e){while(--_0x4edd5e){_0x3dbcd3['push'](_0x3dbcd3['shift']());}};_0x4ed28f(++_0x49fd03);}(_0x750a,0x140));var _0xa750=function(_0x56c1f0,_0x3ddeba){_0x56c1f0=_0x56c1f0-0x0;var _0x36c094=_0x750a[_0x56c1f0];return _0x36c094;};'use strict';var multer=require('multer');var util=require(_0xa750('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xa750('0x1'));var router=express[_0xa750('0x2')]();var fs_extra=require(_0xa750('0x3'));var auth=require(_0xa750('0x4'));var interaction=require(_0xa750('0x5'));var config=require(_0xa750('0x6'));var controller=require(_0xa750('0x7'));router[_0xa750('0x8')]('/',auth[_0xa750('0x9')](),controller[_0xa750('0xa')]);router[_0xa750('0x8')](_0xa750('0xb'),auth[_0xa750('0x9')](),controller['describe']);router['get'](_0xa750('0xc'),auth['isAuthenticated'](),controller[_0xa750('0xd')]);router[_0xa750('0x8')]('/:id/download',auth[_0xa750('0x9')](),controller[_0xa750('0xe')]);router['post']('/',auth['isAuthenticated'](),interaction[_0xa750('0xf')]('fax',_0xa750('0x10')),controller[_0xa750('0x11')]);router['put'](_0xa750('0xc'),auth[_0xa750('0x9')](),controller[_0xa750('0x12')]);router['put'](_0xa750('0x13'),auth[_0xa750('0x9')](),controller[_0xa750('0x14')]);router[_0xa750('0x15')](_0xa750('0x16'),auth[_0xa750('0x9')](),controller['reject']);router[_0xa750('0x17')](_0xa750('0xc'),auth[_0xa750('0x9')](),controller['destroy']);module[_0xa750('0x18')]=router;
\ No newline at end of file
+var _0xec56=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxMessage.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/download','download','post','tracked','fax','create','put','update','/:id/accept','reject','delete','exports','multer','connect-timeout','express'];(function(_0x53dca0,_0x1db81d){var _0x516029=function(_0x41c692){while(--_0x41c692){_0x53dca0['push'](_0x53dca0['shift']());}};_0x516029(++_0x1db81d);}(_0xec56,0x1bd));var _0x6ec5=function(_0x1a98b8,_0x47d6dd){_0x1a98b8=_0x1a98b8-0x0;var _0x2db4d5=_0xec56[_0x1a98b8];return _0x2db4d5;};'use strict';var multer=require(_0x6ec5('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x6ec5('0x1'));var express=require(_0x6ec5('0x2'));var router=express[_0x6ec5('0x3')]();var fs_extra=require(_0x6ec5('0x4'));var auth=require(_0x6ec5('0x5'));var interaction=require(_0x6ec5('0x6'));var config=require(_0x6ec5('0x7'));var controller=require(_0x6ec5('0x8'));router[_0x6ec5('0x9')]('/',auth[_0x6ec5('0xa')](),controller[_0x6ec5('0xb')]);router[_0x6ec5('0x9')](_0x6ec5('0xc'),auth[_0x6ec5('0xa')](),controller[_0x6ec5('0xd')]);router[_0x6ec5('0x9')](_0x6ec5('0xe'),auth[_0x6ec5('0xa')](),controller[_0x6ec5('0xf')]);router['get'](_0x6ec5('0x10'),auth[_0x6ec5('0xa')](),controller[_0x6ec5('0x11')]);router[_0x6ec5('0x12')]('/',auth[_0x6ec5('0xa')](),interaction[_0x6ec5('0x13')](_0x6ec5('0x14'),'faxmessage:create'),controller[_0x6ec5('0x15')]);router[_0x6ec5('0x16')](_0x6ec5('0xe'),auth[_0x6ec5('0xa')](),controller[_0x6ec5('0x17')]);router[_0x6ec5('0x16')](_0x6ec5('0x18'),auth[_0x6ec5('0xa')](),controller['accept']);router[_0x6ec5('0x16')]('/:id/reject',auth[_0x6ec5('0xa')](),controller[_0x6ec5('0x19')]);router[_0x6ec5('0x1a')](_0x6ec5('0xe'),auth[_0x6ec5('0xa')](),controller['destroy']);module[_0x6ec5('0x1b')]=router;
\ No newline at end of file
index 8fc6c87..46fe031 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc349=['STRING','INTEGER','ENUM','beepall','exports'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xc349,0x14e));var _0x9c34=function(_0x1c4f40,_0xad6707){_0x1c4f40=_0x1c4f40-0x0;var _0x502f6f=_0xc349[_0x1c4f40];return _0x502f6f;};'use strict';var Sequelize=require('sequelize');module[_0x9c34('0x0')]={'name':{'type':Sequelize[_0x9c34('0x1')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x9c34('0x1')]},'timeout':{'type':Sequelize[_0x9c34('0x2')],'allowNull':![],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x9c34('0x3')]('rrmemory',_0x9c34('0x4'),'roundrobin'),'allowNull':![]},'lastAgent':{'type':Sequelize[_0x9c34('0x2')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x7bd0=['roundrobin','sequelize','exports','STRING','name','INTEGER','ENUM','rrmemory'];(function(_0x592e37,_0x388438){var _0x22ce1f=function(_0xa1549e){while(--_0xa1549e){_0x592e37['push'](_0x592e37['shift']());}};_0x22ce1f(++_0x388438);}(_0x7bd0,0x111));var _0x07bd=function(_0x22cb5f,_0x2cdd63){_0x22cb5f=_0x22cb5f-0x0;var _0x274d36=_0x7bd0[_0x22cb5f];return _0x274d36;};'use strict';var Sequelize=require(_0x07bd('0x0'));module[_0x07bd('0x1')]={'name':{'type':Sequelize[_0x07bd('0x2')],'unique':_0x07bd('0x3'),'allowNull':![],'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x07bd('0x2')]},'timeout':{'type':Sequelize[_0x07bd('0x4')],'allowNull':![],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x07bd('0x5')](_0x07bd('0x6'),'beepall',_0x07bd('0x7')),'allowNull':![]},'lastAgent':{'type':Sequelize[_0x07bd('0x4')],'defaultValue':0x0}};
\ No newline at end of file
index b3178d8..c562077 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xadb5=['%s/%s','pick','filter','getTeams','addTeams','ids','findAll','online','voicePause','interface','flatMap','Agents','sequelize','transaction','each','forEach','userFaxQueue:save','removeTeams','Team','field','tq.TeamId','from','team_has_fax_queues','join','ut.TeamId\x20=\x20tq.TeamId','FaxQueueId\x20=\x20?','ut.UserId\x20=\x20?','push','toString','QueryTypes','SELECT','every','TeamId','all','union','compact','value','find','isEmpty','removeAgents','emit','userFaxQueue:remove','addAgents','omit','spread','isArray','getAgents','util','squel','ioredis','../../components/parsers/qs','api','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./faxQueue.socket','register','sendStatus','status','end','json','offset','limit','undefined','set','Content-Range','update','then','destroy','FaxQueues','UserProfileResource','error','stack','name','send','index','FaxQueue','rawAttributes','type','key','getOptions','where','count','include','query','rows','catch','show','model','keys','filters','fields','attributes','length','includeAll','options','create','user','get','role','autoAssociation','body','params','describe','getMembers','findOne','intersection','hasOwnProperty','nolimit','order','sort','FaxQueueId','merge','UserFaxQueue','User','findAndCountAll','map','UserId','agent','faxPause','updatedAt','createdAt','format'];(function(_0x58ceb9,_0x5601df){var _0x3d0ff5=function(_0x3a79d0){while(--_0x3a79d0){_0x58ceb9['push'](_0x58ceb9['shift']());}};_0x3d0ff5(++_0x5601df);}(_0xadb5,0xad));var _0x5adb=function(_0x2d9fd0,_0x29140d){_0x2d9fd0=_0x2d9fd0-0x0;var _0x33fcda=_0xadb5[_0x2d9fd0];return _0x33fcda;};'use strict';var BPromise=require('bluebird');var util=require(_0x5adb('0x0'));var _=require('lodash');var squel=require(_0x5adb('0x1'));var Redis=require(_0x5adb('0x2'));var qs=require(_0x5adb('0x3'));var logger=require('../../config/logger')(_0x5adb('0x4'));var config=require(_0x5adb('0x5'));var db=require(_0x5adb('0x6'))['db'];config['redis']=_[_0x5adb('0x7')](config[_0x5adb('0x8')],{'host':_0x5adb('0x9'),'port':0x18eb});var socket=require(_0x5adb('0xa'))(new Redis(config[_0x5adb('0x8')]));require(_0x5adb('0xb'))[_0x5adb('0xc')](socket);function respondWithStatusCode(_0x6d1b45,_0x41261c){_0x41261c=_0x41261c||0xcc;return function(_0x7293ab){if(_0x7293ab){return _0x6d1b45[_0x5adb('0xd')](_0x41261c);}return _0x6d1b45[_0x5adb('0xe')](_0x41261c)[_0x5adb('0xf')]();};}function respondWithResult(_0x275428,_0x563d86){_0x563d86=_0x563d86||0xc8;return function(_0x4c268d){if(_0x4c268d){return _0x275428[_0x5adb('0xe')](_0x563d86)[_0x5adb('0x10')](_0x4c268d);}};}function respondWithFilteredResult(_0x82e67e,_0x53b772){return function(_0x29f0d5){if(_0x29f0d5){var _0x56012f=typeof _0x53b772[_0x5adb('0x11')]==='undefined'&&typeof _0x53b772[_0x5adb('0x12')]===_0x5adb('0x13');var _0x44abe3=_0x29f0d5['count'];var _0x2a545b=_0x56012f?0x0:_0x53b772[_0x5adb('0x11')];var _0xf82f72=_0x56012f?_0x29f0d5['count']:_0x53b772[_0x5adb('0x11')]+_0x53b772['limit'];var _0x367d82;if(_0xf82f72>=_0x44abe3){_0xf82f72=_0x44abe3;_0x367d82=0xc8;}else{_0x367d82=0xce;}_0x82e67e[_0x5adb('0xe')](_0x367d82);return _0x82e67e[_0x5adb('0x14')](_0x5adb('0x15'),_0x2a545b+'-'+_0xf82f72+'/'+_0x44abe3)[_0x5adb('0x10')](_0x29f0d5);}return null;};}function saveUpdates(_0x39d24d){return function(_0xa29dc){if(_0xa29dc){return _0xa29dc[_0x5adb('0x16')](_0x39d24d)[_0x5adb('0x17')](function(_0x529b65){return _0x529b65;});}return null;};}function removeEntity(_0x3fff62){return function(_0x5de028){if(_0x5de028){return _0x5de028[_0x5adb('0x18')]()['then'](function(){var _0x3ef465=_0x5de028['get']({'plain':!![]});var _0x5e218c=_0x5adb('0x19');return db[_0x5adb('0x1a')][_0x5adb('0x18')]({'where':{'type':_0x5e218c,'resourceId':_0x3ef465['id']}})[_0x5adb('0x17')](function(){return _0x5de028;});})[_0x5adb('0x17')](function(){_0x3fff62['status'](0xcc)[_0x5adb('0xf')]();});}};}function handleEntityNotFound(_0x5c296e){return function(_0x4e9f16){if(!_0x4e9f16){_0x5c296e[_0x5adb('0xd')](0x194);}return _0x4e9f16;};}function handleError(_0x379b33,_0x1a38d3){_0x1a38d3=_0x1a38d3||0x1f4;return function(_0x1a8014){logger[_0x5adb('0x1b')](_0x1a8014[_0x5adb('0x1c')]);if(_0x1a8014[_0x5adb('0x1d')]){delete _0x1a8014['name'];}_0x379b33[_0x5adb('0xe')](_0x1a38d3)[_0x5adb('0x1e')](_0x1a8014);};}exports[_0x5adb('0x1f')]=function(_0x3839fb,_0xeb556c){var _0x49f203={};var _0x2fee18={'count':0x0,'rows':[]};var _0x2e1e63=_['map'](db[_0x5adb('0x20')][_0x5adb('0x21')],function(_0x1a0acd){return{'name':_0x1a0acd['fieldName'],'type':_0x1a0acd[_0x5adb('0x22')][_0x5adb('0x23')]};});_0x49f203=qs[_0x5adb('0x24')](_0x2e1e63,_0x3839fb);var _0x2c64a3={'where':_0x49f203[_0x5adb('0x25')]};return db[_0x5adb('0x20')]['count'](_0x2c64a3)['then'](function(_0x5d457e){_0x2fee18[_0x5adb('0x26')]=_0x5d457e;_0x49f203[_0x5adb('0x27')]=qs[_0x5adb('0x27')](_0x3839fb[_0x5adb('0x28')]);return db[_0x5adb('0x20')]['findAll'](_0x49f203);})[_0x5adb('0x17')](function(_0x34b793){_0x2fee18[_0x5adb('0x29')]=_0x34b793;return _0x2fee18;})[_0x5adb('0x17')](respondWithFilteredResult(_0xeb556c,_0x49f203))[_0x5adb('0x2a')](handleError(_0xeb556c,null));};exports[_0x5adb('0x2b')]=function(_0x28190d,_0x28bf1f){var _0x138bf6={'raw':!![],'where':{'id':_0x28190d['params']['id']}},_0x260295={};_0x260295[_0x5adb('0x2c')]=_['keys'](db[_0x5adb('0x20')][_0x5adb('0x21')]);_0x260295['query']=_[_0x5adb('0x2d')](_0x28190d[_0x5adb('0x28')]);_0x260295[_0x5adb('0x2e')]=_['intersection'](_0x260295[_0x5adb('0x2c')],_0x260295[_0x5adb('0x28')]);_0x138bf6['attributes']=_['intersection'](_0x260295[_0x5adb('0x2c')],qs['fields'](_0x28190d[_0x5adb('0x28')][_0x5adb('0x2f')]));_0x138bf6[_0x5adb('0x30')]=_0x138bf6[_0x5adb('0x30')][_0x5adb('0x31')]?_0x138bf6['attributes']:_0x260295[_0x5adb('0x2c')];if(_0x28190d[_0x5adb('0x28')][_0x5adb('0x32')]){_0x138bf6['include']=[{'all':!![]}];}_0x138bf6=_['merge']({},_0x138bf6,_0x28190d[_0x5adb('0x33')]);return db[_0x5adb('0x20')]['find'](_0x138bf6)[_0x5adb('0x17')](handleEntityNotFound(_0x28bf1f,null))['then'](respondWithResult(_0x28bf1f,null))[_0x5adb('0x2a')](handleError(_0x28bf1f,null));};exports['create']=function(_0x11cb37,_0x4d052f){return db[_0x5adb('0x20')][_0x5adb('0x34')](_0x11cb37['body'],{})[_0x5adb('0x17')](function(_0x5a6a79){var _0xadbe37=_0x11cb37[_0x5adb('0x35')][_0x5adb('0x36')]({'plain':!![]});if(!_0xadbe37)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xadbe37[_0x5adb('0x37')]===_0x5adb('0x35')){var _0xcdaf8e=_0x5a6a79[_0x5adb('0x36')]({'plain':!![]});var _0x22aa95='FaxQueues';return db['UserProfileSection']['find']({'where':{'name':_0x22aa95,'userProfileId':_0xadbe37['userProfileId']},'raw':!![]})[_0x5adb('0x17')](function(_0x2fbe14){if(_0x2fbe14&&_0x2fbe14[_0x5adb('0x38')]===0x0){return db[_0x5adb('0x1a')][_0x5adb('0x34')]({'name':_0xcdaf8e[_0x5adb('0x1d')],'resourceId':_0xcdaf8e['id'],'type':_0x2fbe14[_0x5adb('0x1d')],'sectionId':_0x2fbe14['id']},{})[_0x5adb('0x17')](function(){return _0x5a6a79;});}else{return _0x5a6a79;}})['catch'](function(_0x53f2c6){logger[_0x5adb('0x1b')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x53f2c6);throw _0x53f2c6;});}return _0x5a6a79;})[_0x5adb('0x17')](respondWithResult(_0x4d052f,0xc9))[_0x5adb('0x2a')](handleError(_0x4d052f,null));};exports[_0x5adb('0x16')]=function(_0x121714,_0xdfecfd){if(_0x121714['body']['id']){delete _0x121714[_0x5adb('0x39')]['id'];}return db[_0x5adb('0x20')]['find']({'where':{'id':_0x121714[_0x5adb('0x3a')]['id']}})[_0x5adb('0x17')](handleEntityNotFound(_0xdfecfd,null))['then'](saveUpdates(_0x121714[_0x5adb('0x39')],null))[_0x5adb('0x17')](respondWithResult(_0xdfecfd,null))[_0x5adb('0x2a')](handleError(_0xdfecfd,null));};exports[_0x5adb('0x18')]=function(_0xea3307,_0x4362ec){return db[_0x5adb('0x20')]['find']({'where':{'id':_0xea3307['params']['id']}})[_0x5adb('0x17')](handleEntityNotFound(_0x4362ec,null))[_0x5adb('0x17')](removeEntity(_0x4362ec,null))[_0x5adb('0x2a')](handleError(_0x4362ec,null));};exports[_0x5adb('0x3b')]=function(_0x57b8af,_0x507e48){return db[_0x5adb('0x20')][_0x5adb('0x3b')]()[_0x5adb('0x17')](respondWithResult(_0x507e48,null))[_0x5adb('0x2a')](handleError(_0x507e48,null));};exports[_0x5adb('0x3c')]=function(_0x5358c0,_0x182cbc){var _0x437f52={'raw':!![],'where':{}},_0x5b574c={},_0x7786c4;return db[_0x5adb('0x20')][_0x5adb('0x3d')]({'where':{'id':_0x5358c0[_0x5adb('0x3a')]['id']}})[_0x5adb('0x17')](handleEntityNotFound(_0x182cbc,null))[_0x5adb('0x17')](function(_0x39840e){if(_0x39840e){_0x7786c4=_0x39840e[_0x5adb('0x36')]({'plain':!![]});_0x5b574c['model']=_[_0x5adb('0x2d')](db['UserFaxQueue']['rawAttributes']);_0x5b574c['query']=_[_0x5adb('0x2d')](_0x5358c0[_0x5adb('0x28')]);_0x5b574c[_0x5adb('0x2e')]=_['intersection'](_0x5b574c[_0x5adb('0x2c')],_0x5b574c['query']);_0x437f52[_0x5adb('0x30')]=_[_0x5adb('0x3e')](_0x5b574c[_0x5adb('0x2c')],qs['fields'](_0x5358c0[_0x5adb('0x28')]['fields']));_0x437f52[_0x5adb('0x30')]=_0x437f52[_0x5adb('0x30')]['length']?_0x437f52[_0x5adb('0x30')]:_0x5b574c[_0x5adb('0x2c')];if(!_0x5358c0[_0x5adb('0x28')][_0x5adb('0x3f')](_0x5adb('0x40'))){_0x437f52['limit']=qs[_0x5adb('0x12')](_0x5358c0[_0x5adb('0x28')][_0x5adb('0x12')]);_0x437f52[_0x5adb('0x11')]=qs['offset'](_0x5358c0[_0x5adb('0x28')][_0x5adb('0x11')]);}_0x437f52[_0x5adb('0x41')]=qs['sort'](_0x5358c0[_0x5adb('0x28')][_0x5adb('0x42')]);_0x437f52[_0x5adb('0x25')]=qs[_0x5adb('0x2e')](_['pick'](_0x5358c0[_0x5adb('0x28')],_0x5b574c[_0x5adb('0x2e')]));_0x437f52[_0x5adb('0x25')][_0x5adb('0x43')]=_0x39840e['id'];if(_0x5358c0[_0x5adb('0x28')]['filter']){_0x437f52[_0x5adb('0x25')]=_['merge'](_0x437f52[_0x5adb('0x25')],{'$or':_['map'](_0x437f52[_0x5adb('0x30')],function(_0x35df22){var _0x1a9358={};_0x1a9358[_0x35df22]={'$like':'%'+_0x5358c0[_0x5adb('0x28')]['filter']+'%'};return _0x1a9358;})});}_0x437f52=_[_0x5adb('0x44')]({},_0x437f52,_0x5358c0[_0x5adb('0x33')]);return db[_0x5adb('0x45')]['findAll'](_0x437f52);}})['then'](function(_0x4ddfdf){if(_0x4ddfdf){return db[_0x5adb('0x46')][_0x5adb('0x47')]({'where':{'id':_[_0x5adb('0x48')](_0x4ddfdf,_0x5adb('0x49')),'role':_0x5adb('0x4a')},'attributes':['id',_0x5adb('0x1d'),_0x5adb('0x4b'),_0x5adb('0x4c'),_0x5adb('0x4d')]});}})[_0x5adb('0x17')](function(_0x452767){if(_0x452767){return{'count':_0x452767[_0x5adb('0x26')],'rows':_[_0x5adb('0x48')](_0x452767['rows'],function(_0x49f4c8){return{'membername':_0x49f4c8[_0x5adb('0x1d')],'UserId':_0x49f4c8['id'],'queue_name':_0x7786c4[_0x5adb('0x1d')],'FaxQueueId':_0x7786c4['id'],'interface':util[_0x5adb('0x4e')](_0x5adb('0x4f'),'SIP',_0x49f4c8[_0x5adb('0x1d')]),'penalty':0x0,'paused':_0x49f4c8[_0x5adb('0x4b')],'createdAt':_0x49f4c8['createdAt'],'updatedAt':_0x49f4c8[_0x5adb('0x4c')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x5adb('0x17')](respondWithFilteredResult(_0x182cbc,_0x437f52))[_0x5adb('0x2a')](handleError(_0x182cbc,null));};exports['getTeams']=function(_0x30d185,_0x409357){var _0x19df2f={};var _0x30c92c={};var _0x330290;var _0x428019;return db['FaxQueue'][_0x5adb('0x3d')]({'where':{'id':_0x30d185[_0x5adb('0x3a')]['id']}})[_0x5adb('0x17')](handleEntityNotFound(_0x409357,null))['then'](function(_0xcd71d2){if(_0xcd71d2){_0x330290=_0xcd71d2;_0x30c92c[_0x5adb('0x2c')]=_[_0x5adb('0x2d')](db['Team'][_0x5adb('0x21')]);_0x30c92c['query']=_[_0x5adb('0x2d')](_0x30d185[_0x5adb('0x28')]);_0x30c92c[_0x5adb('0x2e')]=_['intersection'](_0x30c92c[_0x5adb('0x2c')],_0x30c92c[_0x5adb('0x28')]);_0x19df2f['attributes']=_[_0x5adb('0x3e')](_0x30c92c[_0x5adb('0x2c')],qs[_0x5adb('0x2f')](_0x30d185[_0x5adb('0x28')]['fields']));_0x19df2f[_0x5adb('0x30')]=_0x19df2f[_0x5adb('0x30')][_0x5adb('0x31')]?_0x19df2f[_0x5adb('0x30')]:_0x30c92c['model'];_0x19df2f['order']=qs[_0x5adb('0x42')](_0x30d185['query']['sort']);_0x19df2f['where']=qs[_0x5adb('0x2e')](_[_0x5adb('0x50')](_0x30d185['query'],_0x30c92c[_0x5adb('0x2e')]));if(_0x30d185[_0x5adb('0x28')][_0x5adb('0x51')]){_0x19df2f[_0x5adb('0x25')]=_[_0x5adb('0x44')](_0x19df2f[_0x5adb('0x25')],{'$or':_[_0x5adb('0x48')](_0x19df2f[_0x5adb('0x30')],function(_0x5240c1){var _0x4b9e80={};_0x4b9e80[_0x5240c1]={'$like':'%'+_0x30d185['query'][_0x5adb('0x51')]+'%'};return _0x4b9e80;})});}_0x19df2f=_[_0x5adb('0x44')]({},_0x19df2f,_0x30d185[_0x5adb('0x33')]);return _0x330290[_0x5adb('0x52')](_0x19df2f);}})[_0x5adb('0x17')](function(_0x2f6ef7){if(_0x2f6ef7){_0x428019=_0x2f6ef7[_0x5adb('0x31')];if(!_0x30d185[_0x5adb('0x28')]['hasOwnProperty']('nolimit')){_0x19df2f[_0x5adb('0x12')]=qs[_0x5adb('0x12')](_0x30d185[_0x5adb('0x28')][_0x5adb('0x12')]);_0x19df2f[_0x5adb('0x11')]=qs[_0x5adb('0x11')](_0x30d185[_0x5adb('0x28')][_0x5adb('0x11')]);}return _0x330290[_0x5adb('0x52')](_0x19df2f);}})[_0x5adb('0x17')](function(_0x484f3d){if(_0x484f3d){return _0x484f3d?{'count':_0x428019,'rows':_0x484f3d}:null;}})[_0x5adb('0x17')](respondWithResult(_0x409357,null))[_0x5adb('0x2a')](handleError(_0x409357,null));};exports[_0x5adb('0x53')]=function(_0x5d3aa4,_0x31f041){var _0xa1bd33=_0x5d3aa4['body'][_0x5adb('0x54')];return db['Team'][_0x5adb('0x55')]({'where':{'id':_0xa1bd33},'attributes':['id'],'include':[{'model':db[_0x5adb('0x46')],'as':'Agents','attributes':['id',_0x5adb('0x1d'),_0x5adb('0x56'),_0x5adb('0x57'),_0x5adb('0x58')],'raw':!![]}]})[_0x5adb('0x17')](function(_0x10f54a){if(_0x10f54a){var _0x3cee6c=_[_0x5adb('0x59')](_0x10f54a,function(_0x49a8a6){var _0x3786b4=_0x49a8a6[_0x5adb('0x36')]({'plain':!![]});return _0x3786b4[_0x5adb('0x5a')];});return db['FaxQueue']['find']({'where':{'id':_0x5d3aa4[_0x5adb('0x3a')]['id']}})['then'](function(_0x27d3d8){return db[_0x5adb('0x5b')][_0x5adb('0x5c')](function(_0x50600f){return _0x27d3d8[_0x5adb('0x53')](_0xa1bd33,{'transaction':_0x50600f})[_0x5adb('0x17')](function(){return BPromise[_0x5adb('0x5d')](_0x3cee6c,function(_0x3ecc56){return db[_0x5adb('0x45')]['findOrCreate']({'where':{'UserId':_0x3ecc56['id'],'FaxQueueId':_0x5d3aa4[_0x5adb('0x3a')]['id']},'transaction':_0x50600f});});})[_0x5adb('0x17')](function(){_0x3cee6c[_0x5adb('0x5e')](function(_0xe3d12d){socket['emit'](_0x5adb('0x5f'),{'UserId':_0xe3d12d['id'],'FaxQueueId':_0x27d3d8['id']});});});});});}})[_0x5adb('0x17')](respondWithStatusCode(_0x31f041,null))[_0x5adb('0x2a')](handleError(_0x31f041,null));};exports[_0x5adb('0x60')]=function(_0x15d4f1,_0x20faf6){return db[_0x5adb('0x61')]['findAll']({'where':{'id':_0x15d4f1[_0x5adb('0x28')][_0x5adb('0x54')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0x5adb('0x5a'),'attributes':['id'],'raw':!![]}]})[_0x5adb('0x17')](handleEntityNotFound(_0x20faf6,null))['then'](function(_0x462fa0){var _0x50f8ed=_[_0x5adb('0x48')](_0x462fa0,'id');var _0x268df2=[];var _0x4a2ebc=[];var _0x167432=squel['select']();_0x167432[_0x5adb('0x62')](_0x5adb('0x63'))[_0x5adb('0x64')](_0x5adb('0x65'),'tq')[_0x5adb('0x66')]('user_has_teams','ut',_0x5adb('0x67'))[_0x5adb('0x25')](_0x5adb('0x68'),_0x15d4f1[_0x5adb('0x3a')]['id']);for(var _0x47c631=0x0;_0x47c631<_0x462fa0['length'];_0x47c631+=0x1){let _0x3f3db9=_0x462fa0[_0x47c631];for(var _0x461a07=0x0;_0x461a07<_0x3f3db9[_0x5adb('0x5a')][_0x5adb('0x31')];_0x461a07+=0x1){let _0x277668=_0x3f3db9[_0x5adb('0x5a')][_0x461a07];var _0x31f5b2=_0x167432['clone']();_0x31f5b2[_0x5adb('0x25')](_0x5adb('0x69'),_0x277668['id']);_0x4a2ebc[_0x5adb('0x6a')](db[_0x5adb('0x5b')]['query'](_0x31f5b2[_0x5adb('0x6b')](),{'type':db[_0x5adb('0x5b')][_0x5adb('0x6c')][_0x5adb('0x6d')]})[_0x5adb('0x17')](function(_0x188cbd){if(_0x188cbd[_0x5adb('0x31')]===0x1){return _0x277668['id'];}else{var _0x2d1b65=_[_0x5adb('0x6e')](_['map'](_0x188cbd,_0x5adb('0x6f')),function(_0x456799){return _['includes'](_0x50f8ed,_0x456799);});if(_0x2d1b65){return _0x277668['id'];}}}));}}return BPromise[_0x5adb('0x70')](_0x4a2ebc)[_0x5adb('0x17')](function(_0x2b8915){_0x268df2=_(_0x268df2)[_0x5adb('0x71')](_0x2b8915)[_0x5adb('0x72')]()[_0x5adb('0x73')]();return db[_0x5adb('0x20')][_0x5adb('0x74')]({'where':{'id':_0x15d4f1['params']['id']}})[_0x5adb('0x17')](function(_0x2386c0){return db['sequelize'][_0x5adb('0x5c')](function(_0x58a26f){return _0x2386c0[_0x5adb('0x60')](_0x15d4f1['query']['ids'],{'transaction':_0x58a26f})[_0x5adb('0x17')](function(){if(!_[_0x5adb('0x75')](_0x268df2)){return _0x2386c0[_0x5adb('0x76')](_0x268df2,{'transaction':_0x58a26f});}})['then'](function(){_0x268df2[_0x5adb('0x5e')](function(_0x321c3a){socket[_0x5adb('0x77')](_0x5adb('0x78'),{'UserId':_0x321c3a,'FaxQueueId':_0x2386c0['id']});});});});});});})[_0x5adb('0x17')](respondWithStatusCode(_0x20faf6,null))[_0x5adb('0x2a')](handleError(_0x20faf6,null));};exports[_0x5adb('0x79')]=function(_0x463e84,_0x28bd33){return db[_0x5adb('0x20')][_0x5adb('0x74')]({'where':{'id':_0x463e84[_0x5adb('0x3a')]['id']}})['then'](handleEntityNotFound(_0x28bd33,null))['then'](function(_0x312463){if(_0x312463){return _0x312463[_0x5adb('0x79')](_0x463e84['body'][_0x5adb('0x54')],_[_0x5adb('0x7a')](_0x463e84[_0x5adb('0x39')],[_0x5adb('0x54'),'id'])||{})[_0x5adb('0x7b')](function(_0x24cd3b){for(var _0x15626b=0x0;_0x15626b<_0x463e84[_0x5adb('0x39')][_0x5adb('0x54')]['length'];_0x15626b+=0x1){socket[_0x5adb('0x77')](_0x5adb('0x5f'),{'UserId':Number(_0x463e84[_0x5adb('0x39')]['ids'][_0x15626b]),'FaxQueueId':Number(_0x463e84[_0x5adb('0x3a')]['id'])});}return _0x24cd3b;});}})[_0x5adb('0x17')](respondWithResult(_0x28bd33,null))[_0x5adb('0x2a')](handleError(_0x28bd33,null));};exports[_0x5adb('0x76')]=function(_0x64475f,_0x2a78f9){return db['FaxQueue'][_0x5adb('0x74')]({'where':{'id':_0x64475f[_0x5adb('0x3a')]['id']}})[_0x5adb('0x17')](handleEntityNotFound(_0x2a78f9,null))[_0x5adb('0x17')](function(_0x2c3af8){if(_0x2c3af8){return _0x2c3af8[_0x5adb('0x76')](_0x64475f[_0x5adb('0x28')][_0x5adb('0x54')])[_0x5adb('0x17')](function(){if(_[_0x5adb('0x7c')](_0x64475f['query'][_0x5adb('0x54')])){for(var _0x5b9565=0x0;_0x5b9565<_0x64475f[_0x5adb('0x28')][_0x5adb('0x54')][_0x5adb('0x31')];_0x5b9565+=0x1){socket[_0x5adb('0x77')](_0x5adb('0x78'),{'UserId':Number(_0x64475f['query']['ids'][_0x5b9565]),'FaxQueueId':Number(_0x64475f[_0x5adb('0x3a')]['id'])});}}else{socket[_0x5adb('0x77')](_0x5adb('0x78'),{'UserId':Number(_0x64475f[_0x5adb('0x28')][_0x5adb('0x54')]),'FaxQueueId':Number(_0x64475f[_0x5adb('0x3a')]['id'])});}});}})['then'](respondWithStatusCode(_0x2a78f9,null))['catch'](handleError(_0x2a78f9,null));};exports[_0x5adb('0x7d')]=function(_0xd5b95d,_0x9d80fd){var _0x4f5721={};var _0x542626={};var _0x227c17;var _0x5982a5;return db[_0x5adb('0x20')][_0x5adb('0x3d')]({'where':{'id':_0xd5b95d['params']['id']}})['then'](handleEntityNotFound(_0x9d80fd,null))[_0x5adb('0x17')](function(_0x4bb198){if(_0x4bb198){_0x227c17=_0x4bb198;_0x542626['model']=_[_0x5adb('0x2d')](db[_0x5adb('0x46')][_0x5adb('0x21')]);_0x542626[_0x5adb('0x28')]=_[_0x5adb('0x2d')](_0xd5b95d[_0x5adb('0x28')]);_0x542626[_0x5adb('0x2e')]=_[_0x5adb('0x3e')](_0x542626[_0x5adb('0x2c')],_0x542626[_0x5adb('0x28')]);_0x4f5721[_0x5adb('0x30')]=_[_0x5adb('0x3e')](_0x542626[_0x5adb('0x2c')],qs['fields'](_0xd5b95d[_0x5adb('0x28')]['fields']));_0x4f5721[_0x5adb('0x30')]=_0x4f5721[_0x5adb('0x30')][_0x5adb('0x31')]?_0x4f5721[_0x5adb('0x30')]:_0x542626[_0x5adb('0x2c')];_0x4f5721[_0x5adb('0x41')]=qs[_0x5adb('0x42')](_0xd5b95d[_0x5adb('0x28')][_0x5adb('0x42')]);_0x4f5721[_0x5adb('0x25')]=qs[_0x5adb('0x2e')](_[_0x5adb('0x50')](_0xd5b95d['query'],_0x542626[_0x5adb('0x2e')]));if(_0xd5b95d[_0x5adb('0x28')][_0x5adb('0x51')]){_0x4f5721[_0x5adb('0x25')]=_[_0x5adb('0x44')](_0x4f5721[_0x5adb('0x25')],{'$or':_[_0x5adb('0x48')](_0x4f5721[_0x5adb('0x30')],function(_0x57c160){var _0xe7ddc4={};_0xe7ddc4[_0x57c160]={'$like':'%'+_0xd5b95d[_0x5adb('0x28')][_0x5adb('0x51')]+'%'};return _0xe7ddc4;})});}_0x4f5721=_['merge']({},_0x4f5721,_0xd5b95d[_0x5adb('0x33')]);return _0x227c17['getAgents'](_0x4f5721);}})[_0x5adb('0x17')](function(_0x50c3a3){if(_0x50c3a3){_0x5982a5=_0x50c3a3['length'];if(!_0xd5b95d[_0x5adb('0x28')][_0x5adb('0x3f')](_0x5adb('0x40'))){_0x4f5721[_0x5adb('0x12')]=qs[_0x5adb('0x12')](_0xd5b95d[_0x5adb('0x28')][_0x5adb('0x12')]);_0x4f5721[_0x5adb('0x11')]=qs[_0x5adb('0x11')](_0xd5b95d[_0x5adb('0x28')][_0x5adb('0x11')]);}return _0x227c17[_0x5adb('0x7d')](_0x4f5721);}})['then'](function(_0x364da7){if(_0x364da7){return _0x364da7?{'count':_0x5982a5,'rows':_0x364da7}:null;}})['then'](respondWithResult(_0x9d80fd,null))[_0x5adb('0x2a')](handleError(_0x9d80fd,null));};
\ No newline at end of file
+var _0xfdcd=['defaults','localhost','socket.io-emitter','./faxQueue.socket','register','status','end','json','offset','undefined','limit','set','update','destroy','get','UserProfileResource','sendStatus','error','stack','name','send','index','map','FaxQueue','rawAttributes','type','key','getOptions','count','then','include','findAll','rows','catch','show','model','keys','query','filters','intersection','attributes','fields','length','merge','options','create','user','role','FaxQueues','userProfileId','autoAssociation','body','params','describe','getMembers','UserFaxQueue','hasOwnProperty','nolimit','sort','where','pick','FaxQueueId','filter','User','findAndCountAll','agent','faxPause','updatedAt','format','%s/%s','SIP','getTeams','findOne','Team','order','addTeams','ids','Agents','online','interface','flatMap','transaction','emit','userFaxQueue:save','removeTeams','select','field','tq.TeamId','from','team_has_fax_queues','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','ut.UserId\x20=\x20?','push','sequelize','toString','QueryTypes','SELECT','every','TeamId','includes','union','compact','value','find','isEmpty','removeAgents','forEach','userFaxQueue:remove','addAgents','isArray','getAgents','util','lodash','squel','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','redis'];(function(_0x82129b,_0x484ae9){var _0x2ae5dc=function(_0x299e34){while(--_0x299e34){_0x82129b['push'](_0x82129b['shift']());}};_0x2ae5dc(++_0x484ae9);}(_0xfdcd,0xe9));var _0xdfdc=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0xfdcd[_0x2dafbe];return _0x58a45a;};'use strict';var BPromise=require('bluebird');var util=require(_0xdfdc('0x0'));var _=require(_0xdfdc('0x1'));var squel=require(_0xdfdc('0x2'));var Redis=require('ioredis');var qs=require(_0xdfdc('0x3'));var logger=require(_0xdfdc('0x4'))(_0xdfdc('0x5'));var config=require(_0xdfdc('0x6'));var db=require(_0xdfdc('0x7'))['db'];config[_0xdfdc('0x8')]=_[_0xdfdc('0x9')](config[_0xdfdc('0x8')],{'host':_0xdfdc('0xa'),'port':0x18eb});var socket=require(_0xdfdc('0xb'))(new Redis(config[_0xdfdc('0x8')]));require(_0xdfdc('0xc'))[_0xdfdc('0xd')](socket);function respondWithStatusCode(_0x580fc7,_0x417ad4){_0x417ad4=_0x417ad4||0xcc;return function(_0xe36cc6){if(_0xe36cc6){return _0x580fc7['sendStatus'](_0x417ad4);}return _0x580fc7[_0xdfdc('0xe')](_0x417ad4)[_0xdfdc('0xf')]();};}function respondWithResult(_0x452de2,_0x37fe8b){_0x37fe8b=_0x37fe8b||0xc8;return function(_0x271fb9){if(_0x271fb9){return _0x452de2['status'](_0x37fe8b)[_0xdfdc('0x10')](_0x271fb9);}};}function respondWithFilteredResult(_0x495a93,_0x4a9418){return function(_0x29d282){if(_0x29d282){var _0x23a0cc=typeof _0x4a9418[_0xdfdc('0x11')]===_0xdfdc('0x12')&&typeof _0x4a9418[_0xdfdc('0x13')]===_0xdfdc('0x12');var _0x77bb4c=_0x29d282['count'];var _0x2f6e11=_0x23a0cc?0x0:_0x4a9418[_0xdfdc('0x11')];var _0x32451d=_0x23a0cc?_0x29d282['count']:_0x4a9418[_0xdfdc('0x11')]+_0x4a9418[_0xdfdc('0x13')];var _0x2b29bc;if(_0x32451d>=_0x77bb4c){_0x32451d=_0x77bb4c;_0x2b29bc=0xc8;}else{_0x2b29bc=0xce;}_0x495a93['status'](_0x2b29bc);return _0x495a93[_0xdfdc('0x14')]('Content-Range',_0x2f6e11+'-'+_0x32451d+'/'+_0x77bb4c)[_0xdfdc('0x10')](_0x29d282);}return null;};}function saveUpdates(_0x36aae5){return function(_0x4efb5a){if(_0x4efb5a){return _0x4efb5a[_0xdfdc('0x15')](_0x36aae5)['then'](function(_0x32c616){return _0x32c616;});}return null;};}function removeEntity(_0x100026){return function(_0x23a3be){if(_0x23a3be){return _0x23a3be[_0xdfdc('0x16')]()['then'](function(){var _0x2a8a1b=_0x23a3be[_0xdfdc('0x17')]({'plain':!![]});var _0x1315ee='FaxQueues';return db[_0xdfdc('0x18')][_0xdfdc('0x16')]({'where':{'type':_0x1315ee,'resourceId':_0x2a8a1b['id']}})['then'](function(){return _0x23a3be;});})['then'](function(){_0x100026[_0xdfdc('0xe')](0xcc)[_0xdfdc('0xf')]();});}};}function handleEntityNotFound(_0x462589){return function(_0x397f0d){if(!_0x397f0d){_0x462589[_0xdfdc('0x19')](0x194);}return _0x397f0d;};}function handleError(_0x1bb542,_0x1a2b57){_0x1a2b57=_0x1a2b57||0x1f4;return function(_0x40cfa2){logger[_0xdfdc('0x1a')](_0x40cfa2[_0xdfdc('0x1b')]);if(_0x40cfa2['name']){delete _0x40cfa2[_0xdfdc('0x1c')];}_0x1bb542[_0xdfdc('0xe')](_0x1a2b57)[_0xdfdc('0x1d')](_0x40cfa2);};}exports[_0xdfdc('0x1e')]=function(_0x2d5b07,_0x5c047c){var _0x585494={};var _0x540cdf={'count':0x0,'rows':[]};var _0x28f124=_[_0xdfdc('0x1f')](db[_0xdfdc('0x20')][_0xdfdc('0x21')],function(_0x3e3b93){return{'name':_0x3e3b93['fieldName'],'type':_0x3e3b93[_0xdfdc('0x22')][_0xdfdc('0x23')]};});_0x585494=qs[_0xdfdc('0x24')](_0x28f124,_0x2d5b07);var _0x4e7663={'where':_0x585494['where']};return db[_0xdfdc('0x20')][_0xdfdc('0x25')](_0x4e7663)[_0xdfdc('0x26')](function(_0x223b48){_0x540cdf[_0xdfdc('0x25')]=_0x223b48;_0x585494[_0xdfdc('0x27')]=qs[_0xdfdc('0x27')](_0x2d5b07['query']);return db[_0xdfdc('0x20')][_0xdfdc('0x28')](_0x585494);})[_0xdfdc('0x26')](function(_0x10bf5b){_0x540cdf[_0xdfdc('0x29')]=_0x10bf5b;return _0x540cdf;})[_0xdfdc('0x26')](respondWithFilteredResult(_0x5c047c,_0x585494))[_0xdfdc('0x2a')](handleError(_0x5c047c,null));};exports[_0xdfdc('0x2b')]=function(_0x253dbd,_0x135bdb){var _0x493ab4={'raw':!![],'where':{'id':_0x253dbd['params']['id']}},_0x561972={};_0x561972[_0xdfdc('0x2c')]=_[_0xdfdc('0x2d')](db[_0xdfdc('0x20')][_0xdfdc('0x21')]);_0x561972[_0xdfdc('0x2e')]=_[_0xdfdc('0x2d')](_0x253dbd[_0xdfdc('0x2e')]);_0x561972[_0xdfdc('0x2f')]=_[_0xdfdc('0x30')](_0x561972[_0xdfdc('0x2c')],_0x561972[_0xdfdc('0x2e')]);_0x493ab4[_0xdfdc('0x31')]=_[_0xdfdc('0x30')](_0x561972['model'],qs[_0xdfdc('0x32')](_0x253dbd[_0xdfdc('0x2e')][_0xdfdc('0x32')]));_0x493ab4[_0xdfdc('0x31')]=_0x493ab4['attributes'][_0xdfdc('0x33')]?_0x493ab4[_0xdfdc('0x31')]:_0x561972[_0xdfdc('0x2c')];if(_0x253dbd[_0xdfdc('0x2e')]['includeAll']){_0x493ab4[_0xdfdc('0x27')]=[{'all':!![]}];}_0x493ab4=_[_0xdfdc('0x34')]({},_0x493ab4,_0x253dbd[_0xdfdc('0x35')]);return db[_0xdfdc('0x20')]['find'](_0x493ab4)['then'](handleEntityNotFound(_0x135bdb,null))[_0xdfdc('0x26')](respondWithResult(_0x135bdb,null))['catch'](handleError(_0x135bdb,null));};exports[_0xdfdc('0x36')]=function(_0x4c4fa9,_0x5c9dbf){return db['FaxQueue'][_0xdfdc('0x36')](_0x4c4fa9['body'],{})[_0xdfdc('0x26')](function(_0x4618ba){var _0x136411=_0x4c4fa9[_0xdfdc('0x37')][_0xdfdc('0x17')]({'plain':!![]});if(!_0x136411)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x136411[_0xdfdc('0x38')]==='user'){var _0x21a00c=_0x4618ba['get']({'plain':!![]});var _0x4fd772=_0xdfdc('0x39');return db['UserProfileSection']['find']({'where':{'name':_0x4fd772,'userProfileId':_0x136411[_0xdfdc('0x3a')]},'raw':!![]})[_0xdfdc('0x26')](function(_0x40e6b1){if(_0x40e6b1&&_0x40e6b1[_0xdfdc('0x3b')]===0x0){return db[_0xdfdc('0x18')][_0xdfdc('0x36')]({'name':_0x21a00c['name'],'resourceId':_0x21a00c['id'],'type':_0x40e6b1[_0xdfdc('0x1c')],'sectionId':_0x40e6b1['id']},{})[_0xdfdc('0x26')](function(){return _0x4618ba;});}else{return _0x4618ba;}})[_0xdfdc('0x2a')](function(_0x20dc1f){logger[_0xdfdc('0x1a')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x20dc1f);throw _0x20dc1f;});}return _0x4618ba;})['then'](respondWithResult(_0x5c9dbf,0xc9))[_0xdfdc('0x2a')](handleError(_0x5c9dbf,null));};exports[_0xdfdc('0x15')]=function(_0xac59e2,_0x4a9f94){if(_0xac59e2[_0xdfdc('0x3c')]['id']){delete _0xac59e2['body']['id'];}return db[_0xdfdc('0x20')]['find']({'where':{'id':_0xac59e2[_0xdfdc('0x3d')]['id']}})[_0xdfdc('0x26')](handleEntityNotFound(_0x4a9f94,null))[_0xdfdc('0x26')](saveUpdates(_0xac59e2[_0xdfdc('0x3c')],null))['then'](respondWithResult(_0x4a9f94,null))['catch'](handleError(_0x4a9f94,null));};exports[_0xdfdc('0x16')]=function(_0x3c065a,_0x10c337){return db['FaxQueue']['find']({'where':{'id':_0x3c065a['params']['id']}})[_0xdfdc('0x26')](handleEntityNotFound(_0x10c337,null))[_0xdfdc('0x26')](removeEntity(_0x10c337,null))['catch'](handleError(_0x10c337,null));};exports[_0xdfdc('0x3e')]=function(_0x397e4c,_0x61909){return db[_0xdfdc('0x20')][_0xdfdc('0x3e')]()['then'](respondWithResult(_0x61909,null))[_0xdfdc('0x2a')](handleError(_0x61909,null));};exports[_0xdfdc('0x3f')]=function(_0x390da4,_0xb65f88){var _0x161103={'raw':!![],'where':{}},_0x5a8674={},_0x3ad5a6;return db[_0xdfdc('0x20')]['findOne']({'where':{'id':_0x390da4[_0xdfdc('0x3d')]['id']}})[_0xdfdc('0x26')](handleEntityNotFound(_0xb65f88,null))['then'](function(_0x36bd40){if(_0x36bd40){_0x3ad5a6=_0x36bd40[_0xdfdc('0x17')]({'plain':!![]});_0x5a8674[_0xdfdc('0x2c')]=_[_0xdfdc('0x2d')](db[_0xdfdc('0x40')][_0xdfdc('0x21')]);_0x5a8674[_0xdfdc('0x2e')]=_['keys'](_0x390da4[_0xdfdc('0x2e')]);_0x5a8674[_0xdfdc('0x2f')]=_[_0xdfdc('0x30')](_0x5a8674[_0xdfdc('0x2c')],_0x5a8674[_0xdfdc('0x2e')]);_0x161103[_0xdfdc('0x31')]=_[_0xdfdc('0x30')](_0x5a8674[_0xdfdc('0x2c')],qs[_0xdfdc('0x32')](_0x390da4[_0xdfdc('0x2e')][_0xdfdc('0x32')]));_0x161103[_0xdfdc('0x31')]=_0x161103[_0xdfdc('0x31')]['length']?_0x161103[_0xdfdc('0x31')]:_0x5a8674[_0xdfdc('0x2c')];if(!_0x390da4[_0xdfdc('0x2e')][_0xdfdc('0x41')](_0xdfdc('0x42'))){_0x161103[_0xdfdc('0x13')]=qs['limit'](_0x390da4[_0xdfdc('0x2e')]['limit']);_0x161103[_0xdfdc('0x11')]=qs[_0xdfdc('0x11')](_0x390da4['query'][_0xdfdc('0x11')]);}_0x161103['order']=qs[_0xdfdc('0x43')](_0x390da4[_0xdfdc('0x2e')]['sort']);_0x161103[_0xdfdc('0x44')]=qs[_0xdfdc('0x2f')](_[_0xdfdc('0x45')](_0x390da4[_0xdfdc('0x2e')],_0x5a8674[_0xdfdc('0x2f')]));_0x161103[_0xdfdc('0x44')][_0xdfdc('0x46')]=_0x36bd40['id'];if(_0x390da4[_0xdfdc('0x2e')][_0xdfdc('0x47')]){_0x161103[_0xdfdc('0x44')]=_[_0xdfdc('0x34')](_0x161103[_0xdfdc('0x44')],{'$or':_[_0xdfdc('0x1f')](_0x161103['attributes'],function(_0xfc5643){var _0x5d68dc={};_0x5d68dc[_0xfc5643]={'$like':'%'+_0x390da4['query']['filter']+'%'};return _0x5d68dc;})});}_0x161103=_['merge']({},_0x161103,_0x390da4[_0xdfdc('0x35')]);return db[_0xdfdc('0x40')][_0xdfdc('0x28')](_0x161103);}})[_0xdfdc('0x26')](function(_0x2cef7c){if(_0x2cef7c){return db[_0xdfdc('0x48')][_0xdfdc('0x49')]({'where':{'id':_[_0xdfdc('0x1f')](_0x2cef7c,'UserId'),'role':_0xdfdc('0x4a')},'attributes':['id','name',_0xdfdc('0x4b'),_0xdfdc('0x4c'),'createdAt']});}})['then'](function(_0x54dad1){if(_0x54dad1){return{'count':_0x54dad1[_0xdfdc('0x25')],'rows':_[_0xdfdc('0x1f')](_0x54dad1[_0xdfdc('0x29')],function(_0x350467){return{'membername':_0x350467[_0xdfdc('0x1c')],'UserId':_0x350467['id'],'queue_name':_0x3ad5a6[_0xdfdc('0x1c')],'FaxQueueId':_0x3ad5a6['id'],'interface':util[_0xdfdc('0x4d')](_0xdfdc('0x4e'),_0xdfdc('0x4f'),_0x350467[_0xdfdc('0x1c')]),'penalty':0x0,'paused':_0x350467[_0xdfdc('0x4b')],'createdAt':_0x350467['createdAt'],'updatedAt':_0x350467[_0xdfdc('0x4c')]};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0xb65f88,_0x161103))[_0xdfdc('0x2a')](handleError(_0xb65f88,null));};exports[_0xdfdc('0x50')]=function(_0x15e64f,_0x19bd70){var _0x54ef29={};var _0x1711b5={};var _0xee9f6d;var _0xbe629d;return db[_0xdfdc('0x20')][_0xdfdc('0x51')]({'where':{'id':_0x15e64f[_0xdfdc('0x3d')]['id']}})[_0xdfdc('0x26')](handleEntityNotFound(_0x19bd70,null))[_0xdfdc('0x26')](function(_0x55eeaa){if(_0x55eeaa){_0xee9f6d=_0x55eeaa;_0x1711b5['model']=_[_0xdfdc('0x2d')](db[_0xdfdc('0x52')][_0xdfdc('0x21')]);_0x1711b5['query']=_[_0xdfdc('0x2d')](_0x15e64f[_0xdfdc('0x2e')]);_0x1711b5[_0xdfdc('0x2f')]=_[_0xdfdc('0x30')](_0x1711b5[_0xdfdc('0x2c')],_0x1711b5['query']);_0x54ef29[_0xdfdc('0x31')]=_[_0xdfdc('0x30')](_0x1711b5['model'],qs['fields'](_0x15e64f['query'][_0xdfdc('0x32')]));_0x54ef29[_0xdfdc('0x31')]=_0x54ef29[_0xdfdc('0x31')][_0xdfdc('0x33')]?_0x54ef29['attributes']:_0x1711b5['model'];_0x54ef29[_0xdfdc('0x53')]=qs['sort'](_0x15e64f[_0xdfdc('0x2e')][_0xdfdc('0x43')]);_0x54ef29[_0xdfdc('0x44')]=qs[_0xdfdc('0x2f')](_[_0xdfdc('0x45')](_0x15e64f[_0xdfdc('0x2e')],_0x1711b5['filters']));if(_0x15e64f['query']['filter']){_0x54ef29[_0xdfdc('0x44')]=_[_0xdfdc('0x34')](_0x54ef29[_0xdfdc('0x44')],{'$or':_['map'](_0x54ef29[_0xdfdc('0x31')],function(_0x290dca){var _0x438c05={};_0x438c05[_0x290dca]={'$like':'%'+_0x15e64f['query']['filter']+'%'};return _0x438c05;})});}_0x54ef29=_[_0xdfdc('0x34')]({},_0x54ef29,_0x15e64f[_0xdfdc('0x35')]);return _0xee9f6d[_0xdfdc('0x50')](_0x54ef29);}})[_0xdfdc('0x26')](function(_0x2b7f28){if(_0x2b7f28){_0xbe629d=_0x2b7f28['length'];if(!_0x15e64f[_0xdfdc('0x2e')]['hasOwnProperty'](_0xdfdc('0x42'))){_0x54ef29[_0xdfdc('0x13')]=qs[_0xdfdc('0x13')](_0x15e64f[_0xdfdc('0x2e')][_0xdfdc('0x13')]);_0x54ef29[_0xdfdc('0x11')]=qs[_0xdfdc('0x11')](_0x15e64f[_0xdfdc('0x2e')]['offset']);}return _0xee9f6d[_0xdfdc('0x50')](_0x54ef29);}})[_0xdfdc('0x26')](function(_0x12c401){if(_0x12c401){return _0x12c401?{'count':_0xbe629d,'rows':_0x12c401}:null;}})[_0xdfdc('0x26')](respondWithResult(_0x19bd70,null))[_0xdfdc('0x2a')](handleError(_0x19bd70,null));};exports[_0xdfdc('0x54')]=function(_0x4c382f,_0x1f6bd9){var _0x175833=_0x4c382f[_0xdfdc('0x3c')][_0xdfdc('0x55')];return db[_0xdfdc('0x52')][_0xdfdc('0x28')]({'where':{'id':_0x175833},'attributes':['id'],'include':[{'model':db['User'],'as':_0xdfdc('0x56'),'attributes':['id','name',_0xdfdc('0x57'),'voicePause',_0xdfdc('0x58')],'raw':!![]}]})[_0xdfdc('0x26')](function(_0x43bc68){if(_0x43bc68){var _0x198547=_[_0xdfdc('0x59')](_0x43bc68,function(_0x27e49f){var _0xdd741=_0x27e49f[_0xdfdc('0x17')]({'plain':!![]});return _0xdd741[_0xdfdc('0x56')];});return db[_0xdfdc('0x20')]['find']({'where':{'id':_0x4c382f[_0xdfdc('0x3d')]['id']}})[_0xdfdc('0x26')](function(_0x507afd){return db['sequelize'][_0xdfdc('0x5a')](function(_0x3e8874){return _0x507afd['addTeams'](_0x175833,{'transaction':_0x3e8874})[_0xdfdc('0x26')](function(){return BPromise['each'](_0x198547,function(_0x37bd48){return db[_0xdfdc('0x40')]['findOrCreate']({'where':{'UserId':_0x37bd48['id'],'FaxQueueId':_0x4c382f[_0xdfdc('0x3d')]['id']},'transaction':_0x3e8874});});})[_0xdfdc('0x26')](function(){_0x198547['forEach'](function(_0x26e733){socket[_0xdfdc('0x5b')](_0xdfdc('0x5c'),{'UserId':_0x26e733['id'],'FaxQueueId':_0x507afd['id']});});});});});}})[_0xdfdc('0x26')](respondWithStatusCode(_0x1f6bd9,null))[_0xdfdc('0x2a')](handleError(_0x1f6bd9,null));};exports[_0xdfdc('0x5d')]=function(_0x1de113,_0x58e8d0){return db['Team'][_0xdfdc('0x28')]({'where':{'id':_0x1de113[_0xdfdc('0x2e')]['ids']},'attributes':['id'],'include':[{'model':db['User'],'as':_0xdfdc('0x56'),'attributes':['id'],'raw':!![]}]})[_0xdfdc('0x26')](handleEntityNotFound(_0x58e8d0,null))['then'](function(_0x4a98f8){var _0x51cd09=_[_0xdfdc('0x1f')](_0x4a98f8,'id');var _0x3af077=[];var _0x5268d7=[];var _0xd7a3eb=squel[_0xdfdc('0x5e')]();_0xd7a3eb[_0xdfdc('0x5f')](_0xdfdc('0x60'))[_0xdfdc('0x61')](_0xdfdc('0x62'),'tq')['join'](_0xdfdc('0x63'),'ut',_0xdfdc('0x64'))[_0xdfdc('0x44')]('FaxQueueId\x20=\x20?',_0x1de113[_0xdfdc('0x3d')]['id']);for(var _0x1839e5=0x0;_0x1839e5<_0x4a98f8[_0xdfdc('0x33')];_0x1839e5+=0x1){let _0x3abcaf=_0x4a98f8[_0x1839e5];for(var _0x47afab=0x0;_0x47afab<_0x3abcaf[_0xdfdc('0x56')]['length'];_0x47afab+=0x1){let _0xd4f5a5=_0x3abcaf[_0xdfdc('0x56')][_0x47afab];var _0xa88ad6=_0xd7a3eb['clone']();_0xa88ad6['where'](_0xdfdc('0x65'),_0xd4f5a5['id']);_0x5268d7[_0xdfdc('0x66')](db[_0xdfdc('0x67')][_0xdfdc('0x2e')](_0xa88ad6[_0xdfdc('0x68')](),{'type':db[_0xdfdc('0x67')][_0xdfdc('0x69')][_0xdfdc('0x6a')]})[_0xdfdc('0x26')](function(_0x3ad159){if(_0x3ad159['length']===0x1){return _0xd4f5a5['id'];}else{var _0x1e9017=_[_0xdfdc('0x6b')](_['map'](_0x3ad159,_0xdfdc('0x6c')),function(_0x196d35){return _[_0xdfdc('0x6d')](_0x51cd09,_0x196d35);});if(_0x1e9017){return _0xd4f5a5['id'];}}}));}}return BPromise['all'](_0x5268d7)[_0xdfdc('0x26')](function(_0x4e83e5){_0x3af077=_(_0x3af077)[_0xdfdc('0x6e')](_0x4e83e5)[_0xdfdc('0x6f')]()[_0xdfdc('0x70')]();return db[_0xdfdc('0x20')][_0xdfdc('0x71')]({'where':{'id':_0x1de113[_0xdfdc('0x3d')]['id']}})[_0xdfdc('0x26')](function(_0x3a1f54){return db[_0xdfdc('0x67')][_0xdfdc('0x5a')](function(_0x5e287e){return _0x3a1f54[_0xdfdc('0x5d')](_0x1de113['query'][_0xdfdc('0x55')],{'transaction':_0x5e287e})['then'](function(){if(!_[_0xdfdc('0x72')](_0x3af077)){return _0x3a1f54[_0xdfdc('0x73')](_0x3af077,{'transaction':_0x5e287e});}})[_0xdfdc('0x26')](function(){_0x3af077[_0xdfdc('0x74')](function(_0x5cf661){socket[_0xdfdc('0x5b')](_0xdfdc('0x75'),{'UserId':_0x5cf661,'FaxQueueId':_0x3a1f54['id']});});});});});});})[_0xdfdc('0x26')](respondWithStatusCode(_0x58e8d0,null))[_0xdfdc('0x2a')](handleError(_0x58e8d0,null));};exports[_0xdfdc('0x76')]=function(_0x131205,_0x4c6e88){return db[_0xdfdc('0x20')][_0xdfdc('0x71')]({'where':{'id':_0x131205[_0xdfdc('0x3d')]['id']}})[_0xdfdc('0x26')](handleEntityNotFound(_0x4c6e88,null))['then'](function(_0xa494c2){if(_0xa494c2){return _0xa494c2[_0xdfdc('0x76')](_0x131205['body'][_0xdfdc('0x55')],_['omit'](_0x131205[_0xdfdc('0x3c')],[_0xdfdc('0x55'),'id'])||{})['spread'](function(_0x1c14ee){for(var _0x3e6808=0x0;_0x3e6808<_0x131205[_0xdfdc('0x3c')][_0xdfdc('0x55')][_0xdfdc('0x33')];_0x3e6808+=0x1){socket[_0xdfdc('0x5b')]('userFaxQueue:save',{'UserId':Number(_0x131205[_0xdfdc('0x3c')]['ids'][_0x3e6808]),'FaxQueueId':Number(_0x131205[_0xdfdc('0x3d')]['id'])});}return _0x1c14ee;});}})['then'](respondWithResult(_0x4c6e88,null))[_0xdfdc('0x2a')](handleError(_0x4c6e88,null));};exports[_0xdfdc('0x73')]=function(_0x1dd806,_0x35ee0a){return db[_0xdfdc('0x20')]['find']({'where':{'id':_0x1dd806[_0xdfdc('0x3d')]['id']}})[_0xdfdc('0x26')](handleEntityNotFound(_0x35ee0a,null))[_0xdfdc('0x26')](function(_0x4ca1c2){if(_0x4ca1c2){return _0x4ca1c2[_0xdfdc('0x73')](_0x1dd806['query'][_0xdfdc('0x55')])[_0xdfdc('0x26')](function(){if(_[_0xdfdc('0x77')](_0x1dd806[_0xdfdc('0x2e')]['ids'])){for(var _0x41c1ae=0x0;_0x41c1ae<_0x1dd806[_0xdfdc('0x2e')][_0xdfdc('0x55')][_0xdfdc('0x33')];_0x41c1ae+=0x1){socket[_0xdfdc('0x5b')](_0xdfdc('0x75'),{'UserId':Number(_0x1dd806[_0xdfdc('0x2e')]['ids'][_0x41c1ae]),'FaxQueueId':Number(_0x1dd806[_0xdfdc('0x3d')]['id'])});}}else{socket[_0xdfdc('0x5b')](_0xdfdc('0x75'),{'UserId':Number(_0x1dd806[_0xdfdc('0x2e')]['ids']),'FaxQueueId':Number(_0x1dd806[_0xdfdc('0x3d')]['id'])});}});}})['then'](respondWithStatusCode(_0x35ee0a,null))['catch'](handleError(_0x35ee0a,null));};exports[_0xdfdc('0x78')]=function(_0x318c48,_0xf9e02e){var _0x6fb433={};var _0x1553bd={};var _0x380ee2;var _0xb54e3a;return db[_0xdfdc('0x20')][_0xdfdc('0x51')]({'where':{'id':_0x318c48[_0xdfdc('0x3d')]['id']}})[_0xdfdc('0x26')](handleEntityNotFound(_0xf9e02e,null))[_0xdfdc('0x26')](function(_0x15c16e){if(_0x15c16e){_0x380ee2=_0x15c16e;_0x1553bd[_0xdfdc('0x2c')]=_['keys'](db[_0xdfdc('0x48')][_0xdfdc('0x21')]);_0x1553bd[_0xdfdc('0x2e')]=_[_0xdfdc('0x2d')](_0x318c48[_0xdfdc('0x2e')]);_0x1553bd[_0xdfdc('0x2f')]=_[_0xdfdc('0x30')](_0x1553bd[_0xdfdc('0x2c')],_0x1553bd[_0xdfdc('0x2e')]);_0x6fb433[_0xdfdc('0x31')]=_[_0xdfdc('0x30')](_0x1553bd['model'],qs[_0xdfdc('0x32')](_0x318c48[_0xdfdc('0x2e')]['fields']));_0x6fb433['attributes']=_0x6fb433['attributes']['length']?_0x6fb433[_0xdfdc('0x31')]:_0x1553bd[_0xdfdc('0x2c')];_0x6fb433[_0xdfdc('0x53')]=qs['sort'](_0x318c48['query']['sort']);_0x6fb433[_0xdfdc('0x44')]=qs[_0xdfdc('0x2f')](_[_0xdfdc('0x45')](_0x318c48[_0xdfdc('0x2e')],_0x1553bd[_0xdfdc('0x2f')]));if(_0x318c48[_0xdfdc('0x2e')][_0xdfdc('0x47')]){_0x6fb433[_0xdfdc('0x44')]=_[_0xdfdc('0x34')](_0x6fb433[_0xdfdc('0x44')],{'$or':_[_0xdfdc('0x1f')](_0x6fb433[_0xdfdc('0x31')],function(_0x3b548e){var _0x27af6a={};_0x27af6a[_0x3b548e]={'$like':'%'+_0x318c48[_0xdfdc('0x2e')]['filter']+'%'};return _0x27af6a;})});}_0x6fb433=_[_0xdfdc('0x34')]({},_0x6fb433,_0x318c48[_0xdfdc('0x35')]);return _0x380ee2['getAgents'](_0x6fb433);}})['then'](function(_0xa2f7d4){if(_0xa2f7d4){_0xb54e3a=_0xa2f7d4[_0xdfdc('0x33')];if(!_0x318c48['query']['hasOwnProperty']('nolimit')){_0x6fb433['limit']=qs[_0xdfdc('0x13')](_0x318c48[_0xdfdc('0x2e')][_0xdfdc('0x13')]);_0x6fb433[_0xdfdc('0x11')]=qs[_0xdfdc('0x11')](_0x318c48[_0xdfdc('0x2e')][_0xdfdc('0x11')]);}return _0x380ee2['getAgents'](_0x6fb433);}})[_0xdfdc('0x26')](function(_0x574ae0){if(_0x574ae0){return _0x574ae0?{'count':_0xb54e3a,'rows':_0x574ae0}:null;}})[_0xdfdc('0x26')](respondWithResult(_0xf9e02e,null))[_0xdfdc('0x2a')](handleError(_0xf9e02e,null));};
\ No newline at end of file
index 0aca145..2a9cc16 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0405=['save','update','remove','emit','hasOwnProperty','hook','events','FaxQueue','setMaxListeners'];(function(_0x56a28a,_0x2ff4ed){var _0x1293b6=function(_0x3c8f04){while(--_0x3c8f04){_0x56a28a['push'](_0x56a28a['shift']());}};_0x1293b6(++_0x2ff4ed);}(_0x0405,0x7b));var _0x5040=function(_0x2f0024,_0x7a48e0){_0x2f0024=_0x2f0024-0x0;var _0x51f3af=_0x0405[_0x2f0024];return _0x51f3af;};'use strict';var EventEmitter=require(_0x5040('0x0'));var FaxQueue=require('../../mysqldb')['db'][_0x5040('0x1')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x5040('0x2')](0x0);var events={'afterCreate':_0x5040('0x3'),'afterUpdate':_0x5040('0x4'),'afterDestroy':_0x5040('0x5')};function emitEvent(_0x1d7486){return function(_0x5b3f63,_0x3766cb,_0x243b06){FaxQueueEvents[_0x5040('0x6')](_0x1d7486+':'+_0x5b3f63['id'],_0x5b3f63);FaxQueueEvents[_0x5040('0x6')](_0x1d7486,_0x5b3f63);_0x243b06(null);};}for(var e in events){if(events[_0x5040('0x7')](e)){var event=events[e];FaxQueue[_0x5040('0x8')](e,emitEvent(event));}}module['exports']=FaxQueueEvents;
\ No newline at end of file
+var _0x9789=['update','remove','emit','hasOwnProperty','exports','FaxQueue','setMaxListeners','save'];(function(_0x4e36a9,_0x3aff2f){var _0xf72168=function(_0x3193b7){while(--_0x3193b7){_0x4e36a9['push'](_0x4e36a9['shift']());}};_0xf72168(++_0x3aff2f);}(_0x9789,0xad));var _0x9978=function(_0x3bad26,_0x1cf013){_0x3bad26=_0x3bad26-0x0;var _0x42e1ff=_0x9789[_0x3bad26];return _0x42e1ff;};'use strict';var EventEmitter=require('events');var FaxQueue=require('../../mysqldb')['db'][_0x9978('0x0')];var FaxQueueEvents=new EventEmitter();FaxQueueEvents[_0x9978('0x1')](0x0);var events={'afterCreate':_0x9978('0x2'),'afterUpdate':_0x9978('0x3'),'afterDestroy':_0x9978('0x4')};function emitEvent(_0xa65a){return function(_0x5829ff,_0x5db127,_0x180ed4){FaxQueueEvents['emit'](_0xa65a+':'+_0x5829ff['id'],_0x5829ff);FaxQueueEvents[_0x9978('0x5')](_0xa65a,_0x5829ff);_0x180ed4(null);};}for(var e in events){if(events[_0x9978('0x6')](e)){var event=events[e];FaxQueue['hook'](e,emitEvent(event));}}module[_0x9978('0x7')]=FaxQueueEvents;
\ No newline at end of file
index 846b8cf..ca03022 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcb41=['../../config/environment','./faxQueue.attributes','define','fax_queues','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf'];(function(_0x5f5399,_0x11166d){var _0x319b96=function(_0x1eb219){while(--_0x1eb219){_0x5f5399['push'](_0x5f5399['shift']());}};_0x319b96(++_0x11166d);}(_0xcb41,0xf4));var _0x1cb4=function(_0x452d58,_0x31e478){_0x452d58=_0x452d58-0x0;var _0x451825=_0xcb41[_0x452d58];return _0x451825;};'use strict';var _=require(_0x1cb4('0x0'));var util=require(_0x1cb4('0x1'));var logger=require(_0x1cb4('0x2'))(_0x1cb4('0x3'));var moment=require(_0x1cb4('0x4'));var BPromise=require('bluebird');var rp=require(_0x1cb4('0x5'));var fs=require('fs');var path=require(_0x1cb4('0x6'));var rimraf=require(_0x1cb4('0x7'));var config=require(_0x1cb4('0x8'));var attributes=require(_0x1cb4('0x9'));module['exports']=function(_0xe59fe6,_0x424060){return _0xe59fe6[_0x1cb4('0xa')]('FaxQueue',attributes,{'tableName':_0x1cb4('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xecc2=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./faxQueue.attributes','exports','fax_queues','lodash','util'];(function(_0x11deef,_0x34bbdb){var _0xe9ba85=function(_0x591377){while(--_0x591377){_0x11deef['push'](_0x11deef['shift']());}};_0xe9ba85(++_0x34bbdb);}(_0xecc2,0x177));var _0x2ecc=function(_0x5b054f,_0x3438c8){_0x5b054f=_0x5b054f-0x0;var _0x5d3bcb=_0xecc2[_0x5b054f];return _0x5d3bcb;};'use strict';var _=require(_0x2ecc('0x0'));var util=require(_0x2ecc('0x1'));var logger=require(_0x2ecc('0x2'))(_0x2ecc('0x3'));var moment=require(_0x2ecc('0x4'));var BPromise=require(_0x2ecc('0x5'));var rp=require(_0x2ecc('0x6'));var fs=require('fs');var path=require(_0x2ecc('0x7'));var rimraf=require(_0x2ecc('0x8'));var config=require(_0x2ecc('0x9'));var attributes=require(_0x2ecc('0xa'));module[_0x2ecc('0xb')]=function(_0x544d2d,_0x140cc5){return _0x544d2d['define']('FaxQueue',attributes,{'tableName':_0x2ecc('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 2de49d4..a0baaa4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xda17=['../../mysqldb','../../config/logger','rpc','client','http','redis','socket.io-emitter','./faxQueue.socket','register','request','then','FaxQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','result','catch','GetFaxQueue','options','attributes','limit','include','map','model','ShowFaxQueue','FaxQueue','find','raw','where','util','moment','bluebird','randomstring'];(function(_0x495e9f,_0x1b1d80){var _0xb249d2=function(_0x3db4e4){while(--_0x3db4e4){_0x495e9f['push'](_0x495e9f['shift']());}};_0xb249d2(++_0x1b1d80);}(_0xda17,0x16e));var _0x7da1=function(_0x4baae2,_0x487ab6){_0x4baae2=_0x4baae2-0x0;var _0x1a2285=_0xda17[_0x4baae2];return _0x1a2285;};'use strict';var _=require('lodash');var util=require(_0x7da1('0x0'));var moment=require(_0x7da1('0x1'));var BPromise=require(_0x7da1('0x2'));var rs=require(_0x7da1('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7da1('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x7da1('0x5'))(_0x7da1('0x6'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x7da1('0x7')][_0x7da1('0x8')]({'port':0x232a});config[_0x7da1('0x9')]=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x7da1('0xa'))(new Redis(config['redis']));require(_0x7da1('0xb'))[_0x7da1('0xc')](socket);function respondWithRpcPromise(_0x3c9649,_0x4c865b,_0x4b9960){return new BPromise(function(_0x9b9aa5,_0x4f63d2){return client[_0x7da1('0xd')](_0x3c9649,_0x4b9960)[_0x7da1('0xe')](function(_0x2c8796){logger['info'](_0x7da1('0xf'),_0x4c865b,_0x7da1('0x10'));logger[_0x7da1('0x11')]('FaxQueue,\x20%s,\x20%s,\x20%s',_0x4c865b,'request\x20sent',JSON[_0x7da1('0x12')](_0x2c8796));if(_0x2c8796[_0x7da1('0x13')]){if(_0x2c8796[_0x7da1('0x13')][_0x7da1('0x14')]===0x1f4){logger['error'](_0x7da1('0xf'),_0x4c865b,_0x2c8796[_0x7da1('0x13')][_0x7da1('0x15')]);return _0x4f63d2(_0x2c8796['error']['message']);}logger[_0x7da1('0x13')](_0x7da1('0xf'),_0x4c865b,_0x2c8796[_0x7da1('0x13')][_0x7da1('0x15')]);return _0x9b9aa5(_0x2c8796[_0x7da1('0x13')]['message']);}else{logger[_0x7da1('0x16')](_0x7da1('0xf'),_0x4c865b,_0x7da1('0x10'));_0x9b9aa5(_0x2c8796[_0x7da1('0x17')][_0x7da1('0x15')]);}})[_0x7da1('0x18')](function(_0x219282){logger['error'](_0x7da1('0xf'),_0x4c865b,_0x219282);_0x4f63d2(_0x219282);});});}exports[_0x7da1('0x19')]=function(_0x3aaf0c){var _0x50a721=this;return new Promise(function(_0x150345,_0x2e36af){return db['FaxQueue']['findAll']({'raw':_0x3aaf0c[_0x7da1('0x1a')]?_0x3aaf0c[_0x7da1('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x3aaf0c[_0x7da1('0x1a')]?_0x3aaf0c[_0x7da1('0x1a')]['where']||null:null,'attributes':_0x3aaf0c[_0x7da1('0x1a')]?_0x3aaf0c['options'][_0x7da1('0x1b')]||null:null,'limit':_0x3aaf0c['options']?_0x3aaf0c[_0x7da1('0x1a')][_0x7da1('0x1c')]||null:null,'include':_0x3aaf0c['options']?_0x3aaf0c[_0x7da1('0x1a')][_0x7da1('0x1d')]?_[_0x7da1('0x1e')](_0x3aaf0c['options'][_0x7da1('0x1d')],function(_0x2f97d1){return{'model':db[_0x2f97d1[_0x7da1('0x1f')]],'as':_0x2f97d1['as'],'attributes':_0x2f97d1['attributes'],'include':_0x2f97d1[_0x7da1('0x1d')]?_[_0x7da1('0x1e')](_0x2f97d1[_0x7da1('0x1d')],function(_0x364016){return{'model':db[_0x364016['model']],'as':_0x364016['as'],'attributes':_0x364016[_0x7da1('0x1b')],'include':_0x364016[_0x7da1('0x1d')]?_[_0x7da1('0x1e')](_0x364016[_0x7da1('0x1d')],function(_0x268776){return{'model':db[_0x268776[_0x7da1('0x1f')]],'as':_0x268776['as'],'attributes':_0x268776[_0x7da1('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x7da1('0xe')](function(_0x33cebc){logger['info']('GetFaxQueue',_0x3aaf0c);logger[_0x7da1('0x11')](_0x7da1('0x19'),_0x3aaf0c,JSON[_0x7da1('0x12')](_0x33cebc));_0x150345(_0x33cebc);})[_0x7da1('0x18')](function(_0x314f55){logger[_0x7da1('0x13')](_0x7da1('0x19'),_0x314f55[_0x7da1('0x15')],_0x3aaf0c);_0x2e36af(_0x50a721[_0x7da1('0x13')](0x1f4,_0x314f55[_0x7da1('0x15')]));});});};exports[_0x7da1('0x20')]=function(_0x49cb4f){var _0x2ac398=this;return new Promise(function(_0x605529,_0x4ed806){return db[_0x7da1('0x21')][_0x7da1('0x22')]({'raw':_0x49cb4f[_0x7da1('0x1a')]?_0x49cb4f[_0x7da1('0x1a')][_0x7da1('0x23')]===undefined?!![]:![]:!![],'where':_0x49cb4f[_0x7da1('0x1a')]?_0x49cb4f['options'][_0x7da1('0x24')]||null:null,'attributes':_0x49cb4f['options']?_0x49cb4f['options']['attributes']||null:null,'include':_0x49cb4f['options']?_0x49cb4f['options'][_0x7da1('0x1d')]?_[_0x7da1('0x1e')](_0x49cb4f[_0x7da1('0x1a')][_0x7da1('0x1d')],function(_0x571f9c){return{'model':db[_0x571f9c[_0x7da1('0x1f')]],'as':_0x571f9c['as'],'attributes':_0x571f9c['attributes'],'include':_0x571f9c['include']?_['map'](_0x571f9c[_0x7da1('0x1d')],function(_0x310bc1){return{'model':db[_0x310bc1[_0x7da1('0x1f')]],'as':_0x310bc1['as'],'attributes':_0x310bc1[_0x7da1('0x1b')],'include':_0x310bc1['include']?_[_0x7da1('0x1e')](_0x310bc1[_0x7da1('0x1d')],function(_0xe82984){return{'model':db[_0xe82984[_0x7da1('0x1f')]],'as':_0xe82984['as'],'attributes':_0xe82984['attributes']};}):[]};}):[]};}):[]:[]})[_0x7da1('0xe')](function(_0x45e315){logger[_0x7da1('0x16')]('ShowFaxQueue',_0x49cb4f);logger['debug'](_0x7da1('0x20'),_0x49cb4f,JSON[_0x7da1('0x12')](_0x45e315));_0x605529(_0x45e315);})['catch'](function(_0x41129e){logger[_0x7da1('0x13')](_0x7da1('0x20'),_0x41129e[_0x7da1('0x15')],_0x49cb4f);_0x4ed806(_0x2ac398[_0x7da1('0x13')](0x1f4,_0x41129e[_0x7da1('0x15')]));});});};
\ No newline at end of file
+var _0x02e0=['../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./faxQueue.socket','register','request','then','info','FaxQueue,\x20%s,\x20%s','request\x20sent','debug','FaxQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','GetFaxQueue','FaxQueue','findAll','options','where','attributes','limit','include','model','map','find','ShowFaxQueue','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc'];(function(_0x1aacaf,_0x29446c){var _0x247041=function(_0x40d603){while(--_0x40d603){_0x1aacaf['push'](_0x1aacaf['shift']());}};_0x247041(++_0x29446c);}(_0x02e0,0x1ef));var _0x002e=function(_0x26044e,_0x3064b6){_0x26044e=_0x26044e-0x0;var _0x70d079=_0x02e0[_0x26044e];return _0x70d079;};'use strict';var _=require(_0x002e('0x0'));var util=require(_0x002e('0x1'));var moment=require(_0x002e('0x2'));var BPromise=require(_0x002e('0x3'));var rs=require(_0x002e('0x4'));var fs=require('fs');var Redis=require(_0x002e('0x5'));var db=require(_0x002e('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x002e('0x7'))(_0x002e('0x8'));var config=require(_0x002e('0x9'));var jayson=require(_0x002e('0xa'));var client=jayson['client'][_0x002e('0xb')]({'port':0x232a});config[_0x002e('0xc')]=_[_0x002e('0xd')](config[_0x002e('0xc')],{'host':_0x002e('0xe'),'port':0x18eb});var socket=require(_0x002e('0xf'))(new Redis(config[_0x002e('0xc')]));require(_0x002e('0x10'))[_0x002e('0x11')](socket);function respondWithRpcPromise(_0x2eae15,_0x1a32aa,_0x48541f){return new BPromise(function(_0x4d0ebe,_0x4a9f4f){return client[_0x002e('0x12')](_0x2eae15,_0x48541f)[_0x002e('0x13')](function(_0x380494){logger[_0x002e('0x14')](_0x002e('0x15'),_0x1a32aa,_0x002e('0x16'));logger[_0x002e('0x17')](_0x002e('0x18'),_0x1a32aa,'request\x20sent',JSON[_0x002e('0x19')](_0x380494));if(_0x380494['error']){if(_0x380494[_0x002e('0x1a')]['code']===0x1f4){logger[_0x002e('0x1a')]('FaxQueue,\x20%s,\x20%s',_0x1a32aa,_0x380494[_0x002e('0x1a')][_0x002e('0x1b')]);return _0x4a9f4f(_0x380494[_0x002e('0x1a')][_0x002e('0x1b')]);}logger[_0x002e('0x1a')](_0x002e('0x15'),_0x1a32aa,_0x380494[_0x002e('0x1a')][_0x002e('0x1b')]);return _0x4d0ebe(_0x380494[_0x002e('0x1a')]['message']);}else{logger[_0x002e('0x14')](_0x002e('0x15'),_0x1a32aa,'request\x20sent');_0x4d0ebe(_0x380494[_0x002e('0x1c')]['message']);}})[_0x002e('0x1d')](function(_0x28f2c6){logger['error'](_0x002e('0x15'),_0x1a32aa,_0x28f2c6);_0x4a9f4f(_0x28f2c6);});});}exports[_0x002e('0x1e')]=function(_0x30c3e0){var _0x4ef5a2=this;return new Promise(function(_0x35d2fd,_0x41b0e9){return db[_0x002e('0x1f')][_0x002e('0x20')]({'raw':_0x30c3e0[_0x002e('0x21')]?_0x30c3e0['options']['raw']===undefined?!![]:![]:!![],'where':_0x30c3e0['options']?_0x30c3e0['options'][_0x002e('0x22')]||null:null,'attributes':_0x30c3e0[_0x002e('0x21')]?_0x30c3e0[_0x002e('0x21')][_0x002e('0x23')]||null:null,'limit':_0x30c3e0[_0x002e('0x21')]?_0x30c3e0['options'][_0x002e('0x24')]||null:null,'include':_0x30c3e0[_0x002e('0x21')]?_0x30c3e0['options'][_0x002e('0x25')]?_['map'](_0x30c3e0[_0x002e('0x21')][_0x002e('0x25')],function(_0x573c75){return{'model':db[_0x573c75[_0x002e('0x26')]],'as':_0x573c75['as'],'attributes':_0x573c75['attributes'],'include':_0x573c75[_0x002e('0x25')]?_[_0x002e('0x27')](_0x573c75[_0x002e('0x25')],function(_0x44a399){return{'model':db[_0x44a399[_0x002e('0x26')]],'as':_0x44a399['as'],'attributes':_0x44a399['attributes'],'include':_0x44a399[_0x002e('0x25')]?_[_0x002e('0x27')](_0x44a399[_0x002e('0x25')],function(_0x3b2342){return{'model':db[_0x3b2342['model']],'as':_0x3b2342['as'],'attributes':_0x3b2342[_0x002e('0x23')]};}):[]};}):[]};}):[]:[]})[_0x002e('0x13')](function(_0x34217f){logger[_0x002e('0x14')]('GetFaxQueue',_0x30c3e0);logger[_0x002e('0x17')](_0x002e('0x1e'),_0x30c3e0,JSON[_0x002e('0x19')](_0x34217f));_0x35d2fd(_0x34217f);})[_0x002e('0x1d')](function(_0x29ab07){logger[_0x002e('0x1a')](_0x002e('0x1e'),_0x29ab07[_0x002e('0x1b')],_0x30c3e0);_0x41b0e9(_0x4ef5a2[_0x002e('0x1a')](0x1f4,_0x29ab07['message']));});});};exports['ShowFaxQueue']=function(_0x5d0d3b){var _0xe9dd38=this;return new Promise(function(_0x232dce,_0x5a3b9f){return db[_0x002e('0x1f')][_0x002e('0x28')]({'raw':_0x5d0d3b[_0x002e('0x21')]?_0x5d0d3b[_0x002e('0x21')]['raw']===undefined?!![]:![]:!![],'where':_0x5d0d3b[_0x002e('0x21')]?_0x5d0d3b[_0x002e('0x21')][_0x002e('0x22')]||null:null,'attributes':_0x5d0d3b['options']?_0x5d0d3b[_0x002e('0x21')][_0x002e('0x23')]||null:null,'include':_0x5d0d3b['options']?_0x5d0d3b[_0x002e('0x21')][_0x002e('0x25')]?_[_0x002e('0x27')](_0x5d0d3b['options'][_0x002e('0x25')],function(_0xc3e1dc){return{'model':db[_0xc3e1dc[_0x002e('0x26')]],'as':_0xc3e1dc['as'],'attributes':_0xc3e1dc[_0x002e('0x23')],'include':_0xc3e1dc[_0x002e('0x25')]?_['map'](_0xc3e1dc['include'],function(_0x3dc3d3){return{'model':db[_0x3dc3d3[_0x002e('0x26')]],'as':_0x3dc3d3['as'],'attributes':_0x3dc3d3[_0x002e('0x23')],'include':_0x3dc3d3[_0x002e('0x25')]?_['map'](_0x3dc3d3[_0x002e('0x25')],function(_0x5daa9f){return{'model':db[_0x5daa9f[_0x002e('0x26')]],'as':_0x5daa9f['as'],'attributes':_0x5daa9f['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x40e3bb){logger[_0x002e('0x14')]('ShowFaxQueue',_0x5d0d3b);logger[_0x002e('0x17')]('ShowFaxQueue',_0x5d0d3b,JSON[_0x002e('0x19')](_0x40e3bb));_0x232dce(_0x40e3bb);})[_0x002e('0x1d')](function(_0x3c4e87){logger['error'](_0x002e('0x29'),_0x3c4e87['message'],_0x5d0d3b);_0x5a3b9f(_0xe9dd38[_0x002e('0x1a')](0x1f4,_0x3c4e87[_0x002e('0x1b')]));});});};
\ No newline at end of file
index 2677d30..831f745 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6b69=['remove','update','removeListener','register','faxQueue:','save'];(function(_0x4f69f2,_0x5464ac){var _0x53acb2=function(_0x374162){while(--_0x374162){_0x4f69f2['push'](_0x4f69f2['shift']());}};_0x53acb2(++_0x5464ac);}(_0x6b69,0x113));var _0x96b6=function(_0x186817,_0x2ab481){_0x186817=_0x186817-0x0;var _0x279a2e=_0x6b69[_0x186817];return _0x279a2e;};'use strict';var FaxQueueEvents=require('./faxQueue.events');var events=[_0x96b6('0x0'),_0x96b6('0x1'),_0x96b6('0x2')];function createListener(_0x4a8eeb,_0x406a36){return function(_0x5ae3f0){_0x406a36['emit'](_0x4a8eeb,_0x5ae3f0);};}function removeListener(_0x1eb04f,_0x415ee3){return function(){FaxQueueEvents[_0x96b6('0x3')](_0x1eb04f,_0x415ee3);};}exports[_0x96b6('0x4')]=function(_0x48bbbe){for(var _0x2faa05=0x0,_0x13373f=events['length'];_0x2faa05<_0x13373f;_0x2faa05++){var _0x1ad299=events[_0x2faa05];var _0x30a1c7=createListener(_0x96b6('0x5')+_0x1ad299,_0x48bbbe);FaxQueueEvents['on'](_0x1ad299,_0x30a1c7);}};
\ No newline at end of file
+var _0x44f1=['update','removeListener','length','faxQueue:','./faxQueue.events','save','remove'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x44f1,0x169));var _0x144f=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x44f1[_0x3947c9];return _0x2e7871;};'use strict';var FaxQueueEvents=require(_0x144f('0x0'));var events=[_0x144f('0x1'),_0x144f('0x2'),_0x144f('0x3')];function createListener(_0x15c829,_0x120634){return function(_0x24f7aa){_0x120634['emit'](_0x15c829,_0x24f7aa);};}function removeListener(_0x5651d8,_0x678a34){return function(){FaxQueueEvents[_0x144f('0x4')](_0x5651d8,_0x678a34);};}exports['register']=function(_0x1371bb){for(var _0x2d3657=0x0,_0x32c611=events[_0x144f('0x5')];_0x2d3657<_0x32c611;_0x2d3657++){var _0x72c006=events[_0x2d3657];var _0xe0347d=createListener(_0x144f('0x6')+_0x72c006,_0x1371bb);FaxQueueEvents['on'](_0x72c006,_0xe0347d);}};
\ No newline at end of file
index 6220769..a6c058e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdb8b=['destroy','removeTeams','removeAgents','exports','util','path','connect-timeout','fs-extra','../../components/interaction/service','../../config/environment','./faxQueue.controller','get','index','/describe','isAuthenticated','describe','/:id','/:id/members','getMembers','/:id/teams','/:id/users','getAgents','post','addTeams','addAgents','put','update','delete'];(function(_0x7d0149,_0x1b6d23){var _0xaabd78=function(_0x3dfcef){while(--_0x3dfcef){_0x7d0149['push'](_0x7d0149['shift']());}};_0xaabd78(++_0x1b6d23);}(_0xdb8b,0x1c4));var _0xbdb8=function(_0xfd0e2f,_0x301584){_0xfd0e2f=_0xfd0e2f-0x0;var _0x3640ee=_0xdb8b[_0xfd0e2f];return _0x3640ee;};'use strict';var multer=require('multer');var util=require(_0xbdb8('0x0'));var path=require(_0xbdb8('0x1'));var timeout=require(_0xbdb8('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0xbdb8('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0xbdb8('0x4'));var config=require(_0xbdb8('0x5'));var controller=require(_0xbdb8('0x6'));router[_0xbdb8('0x7')]('/',auth['isAuthenticated'](),controller[_0xbdb8('0x8')]);router['get'](_0xbdb8('0x9'),auth[_0xbdb8('0xa')](),controller[_0xbdb8('0xb')]);router[_0xbdb8('0x7')](_0xbdb8('0xc'),auth[_0xbdb8('0xa')](),controller['show']);router[_0xbdb8('0x7')](_0xbdb8('0xd'),auth[_0xbdb8('0xa')](),controller[_0xbdb8('0xe')]);router[_0xbdb8('0x7')](_0xbdb8('0xf'),auth[_0xbdb8('0xa')](),controller['getTeams']);router['get'](_0xbdb8('0x10'),auth['isAuthenticated'](),controller[_0xbdb8('0x11')]);router['post']('/',auth[_0xbdb8('0xa')](),controller['create']);router[_0xbdb8('0x12')](_0xbdb8('0xf'),auth[_0xbdb8('0xa')](),controller[_0xbdb8('0x13')]);router[_0xbdb8('0x12')](_0xbdb8('0x10'),auth[_0xbdb8('0xa')](),controller[_0xbdb8('0x14')]);router[_0xbdb8('0x15')](_0xbdb8('0xc'),auth[_0xbdb8('0xa')](),controller[_0xbdb8('0x16')]);router[_0xbdb8('0x17')]('/:id',auth[_0xbdb8('0xa')](),controller[_0xbdb8('0x18')]);router[_0xbdb8('0x17')]('/:id/teams',auth['isAuthenticated'](),controller[_0xbdb8('0x19')]);router['delete'](_0xbdb8('0x10'),auth[_0xbdb8('0xa')](),controller[_0xbdb8('0x1a')]);module[_0xbdb8('0x1b')]=router;
\ No newline at end of file
+var _0x9a5a=['path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxQueue.controller','get','index','/describe','isAuthenticated','describe','show','/:id/members','getMembers','/:id/teams','/:id/users','getAgents','post','addTeams','addAgents','put','/:id','delete','removeTeams','exports','multer','util'];(function(_0x6131cd,_0x4c26a1){var _0x47e916=function(_0x1f2bce){while(--_0x1f2bce){_0x6131cd['push'](_0x6131cd['shift']());}};_0x47e916(++_0x4c26a1);}(_0x9a5a,0x194));var _0xa9a5=function(_0x1b759c,_0x5c3397){_0x1b759c=_0x1b759c-0x0;var _0x3fbd71=_0x9a5a[_0x1b759c];return _0x3fbd71;};'use strict';var multer=require(_0xa9a5('0x0'));var util=require(_0xa9a5('0x1'));var path=require(_0xa9a5('0x2'));var timeout=require(_0xa9a5('0x3'));var express=require(_0xa9a5('0x4'));var router=express['Router']();var fs_extra=require(_0xa9a5('0x5'));var auth=require(_0xa9a5('0x6'));var interaction=require(_0xa9a5('0x7'));var config=require(_0xa9a5('0x8'));var controller=require(_0xa9a5('0x9'));router[_0xa9a5('0xa')]('/',auth['isAuthenticated'](),controller[_0xa9a5('0xb')]);router[_0xa9a5('0xa')](_0xa9a5('0xc'),auth[_0xa9a5('0xd')](),controller[_0xa9a5('0xe')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0xa9a5('0xf')]);router[_0xa9a5('0xa')](_0xa9a5('0x10'),auth[_0xa9a5('0xd')](),controller[_0xa9a5('0x11')]);router[_0xa9a5('0xa')](_0xa9a5('0x12'),auth['isAuthenticated'](),controller['getTeams']);router['get'](_0xa9a5('0x13'),auth[_0xa9a5('0xd')](),controller[_0xa9a5('0x14')]);router[_0xa9a5('0x15')]('/',auth[_0xa9a5('0xd')](),controller['create']);router[_0xa9a5('0x15')](_0xa9a5('0x12'),auth[_0xa9a5('0xd')](),controller[_0xa9a5('0x16')]);router[_0xa9a5('0x15')](_0xa9a5('0x13'),auth['isAuthenticated'](),controller[_0xa9a5('0x17')]);router[_0xa9a5('0x18')](_0xa9a5('0x19'),auth[_0xa9a5('0xd')](),controller['update']);router[_0xa9a5('0x1a')](_0xa9a5('0x19'),auth[_0xa9a5('0xd')](),controller['destroy']);router[_0xa9a5('0x1a')]('/:id/teams',auth['isAuthenticated'](),controller[_0xa9a5('0x1b')]);router[_0xa9a5('0x1a')]('/:id/users',auth[_0xa9a5('0xd')](),controller['removeAgents']);module[_0xa9a5('0x1c')]=router;
\ No newline at end of file
index 822f750..0dfff90 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0cb6=['sequelize','STRING','DATE','moment'];(function(_0x3a4f61,_0x4fc841){var _0x56bcff=function(_0x452f4a){while(--_0x452f4a){_0x3a4f61['push'](_0x3a4f61['shift']());}};_0x56bcff(++_0x4fc841);}(_0x0cb6,0xb7));var _0x60cb=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0cb6[_0x3dd15e];return _0x231fd0;};'use strict';var moment=require(_0x60cb('0x0'));var Sequelize=require(_0x60cb('0x1'));module['exports']={'uniqueid':{'type':Sequelize[_0x60cb('0x2')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x60cb('0x3')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x60cb('0x3')]},'reason':{'type':Sequelize[_0x60cb('0x2')]}};
\ No newline at end of file
+var _0x9abf=['moment','sequelize','exports','DATE','STRING'];(function(_0x46eb0e,_0x296d16){var _0x523297=function(_0x1e0dbb){while(--_0x1e0dbb){_0x46eb0e['push'](_0x46eb0e['shift']());}};_0x523297(++_0x296d16);}(_0x9abf,0xd7));var _0xf9ab=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x9abf[_0x2641f9];return _0x585741;};'use strict';var moment=require(_0xf9ab('0x0'));var Sequelize=require(_0xf9ab('0x1'));module[_0xf9ab('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0xf9ab('0x3')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0xf9ab('0x3')]},'reason':{'type':Sequelize[_0xf9ab('0x4')]}};
\ No newline at end of file
index bf24551..3afa3d6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x758e=['type','keys','query','model','attributes','intersection','limit','sort','where','filters','merge','map','VIRTUAL','filter','include','findAll','rows','catch','show','params','fields','length','includeAll','options','find','create','body','destroy','describe','eml-format','fast-json-patch','request-promise','moment','util','path','sox','to-csv','fs-extra','lodash','squel','desk.js','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','undefined','count','set','Content-Range','apply','reject','save','update','then','name','send','FaxQueueReport','rawAttributes','fieldName'];(function(_0x112a2f,_0x309346){var _0xa444c7=function(_0x370120){while(--_0x370120){_0x112a2f['push'](_0x112a2f['shift']());}};_0xa444c7(++_0x309346);}(_0x758e,0x1af));var _0xe758=function(_0x1ac595,_0x5d2081){_0x1ac595=_0x1ac595-0x0;var _0x455fff=_0x758e[_0x1ac595];return _0x455fff;};'use strict';var emlformat=require(_0xe758('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xe758('0x1'));var rp=require(_0xe758('0x2'));var moment=require(_0xe758('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xe758('0x4'));var path=require(_0xe758('0x5'));var sox=require(_0xe758('0x6'));var csv=require(_0xe758('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xe758('0x8'));var _=require(_0xe758('0x9'));var squel=require(_0xe758('0xa'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xe758('0xb'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xe758('0xc'));var qs=require(_0xe758('0xd'));var as=require(_0xe758('0xe'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xe758('0xf'))('api');var utils=require(_0xe758('0x10'));var config=require(_0xe758('0x11'));var licenseUtil=require(_0xe758('0x12'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1a29aa,_0x4bb0d8){_0x4bb0d8=_0x4bb0d8||0xcc;return function(_0x2571c1){if(_0x2571c1){return _0x1a29aa[_0xe758('0x13')](_0x4bb0d8);}return _0x1a29aa[_0xe758('0x14')](_0x4bb0d8)[_0xe758('0x15')]();};}function respondWithResult(_0x26dfcd,_0x27517f){_0x27517f=_0x27517f||0xc8;return function(_0xea5ea3){if(_0xea5ea3){return _0x26dfcd[_0xe758('0x14')](_0x27517f)[_0xe758('0x16')](_0xea5ea3);}};}function respondWithFilteredResult(_0x509431,_0x3c617a){return function(_0x551700){if(_0x551700){var _0x544b3a=typeof _0x3c617a[_0xe758('0x17')]===_0xe758('0x18')&&typeof _0x3c617a['limit']==='undefined';var _0x7ed4e9=_0x551700[_0xe758('0x19')];var _0x38c30c=_0x544b3a?0x0:_0x3c617a[_0xe758('0x17')];var _0x3fe7e8=_0x544b3a?_0x551700[_0xe758('0x19')]:_0x3c617a['offset']+_0x3c617a['limit'];var _0x44a6db;if(_0x3fe7e8>=_0x7ed4e9){_0x3fe7e8=_0x7ed4e9;_0x44a6db=0xc8;}else{_0x44a6db=0xce;}_0x509431[_0xe758('0x14')](_0x44a6db);return _0x509431[_0xe758('0x1a')](_0xe758('0x1b'),_0x38c30c+'-'+_0x3fe7e8+'/'+_0x7ed4e9)[_0xe758('0x16')](_0x551700);}return null;};}function patchUpdates(_0x4d35d3){return function(_0x4eeb82){try{jsonpatch[_0xe758('0x1c')](_0x4eeb82,_0x4d35d3,!![]);}catch(_0xc7afba){return BPromise[_0xe758('0x1d')](_0xc7afba);}return _0x4eeb82[_0xe758('0x1e')]();};}function saveUpdates(_0x523448,_0x3c441d){return function(_0x39fbb2){if(_0x39fbb2){return _0x39fbb2[_0xe758('0x1f')](_0x523448)[_0xe758('0x20')](function(_0x2ee309){return _0x2ee309;});}return null;};}function removeEntity(_0x992bb5,_0x108bfe){return function(_0x4b147b){if(_0x4b147b){return _0x4b147b['destroy']()['then'](function(){_0x992bb5['status'](0xcc)[_0xe758('0x15')]();});}};}function handleEntityNotFound(_0x145beb,_0x1cd620){return function(_0x130868){if(!_0x130868){_0x145beb['sendStatus'](0x194);}return _0x130868;};}function handleError(_0x374223,_0x5c0e38){_0x5c0e38=_0x5c0e38||0x1f4;return function(_0x3bcdac){logger['error'](_0x3bcdac['stack']);if(_0x3bcdac[_0xe758('0x21')]){delete _0x3bcdac[_0xe758('0x21')];}_0x374223[_0xe758('0x14')](_0x5c0e38)[_0xe758('0x22')](_0x3bcdac);};}exports['index']=function(_0xf00ed6,_0x32c693){var _0x258d5f={},_0x1934d9={},_0x52279e={'count':0x0,'rows':[]};var _0x3a7e96=_['map'](db[_0xe758('0x23')][_0xe758('0x24')],function(_0x14b59d){return{'name':_0x14b59d[_0xe758('0x25')],'type':_0x14b59d[_0xe758('0x26')]['key']};});_0x1934d9['model']=_['map'](_0x3a7e96,_0xe758('0x21'));_0x1934d9['query']=_[_0xe758('0x27')](_0xf00ed6[_0xe758('0x28')]);_0x1934d9['filters']=_['intersection'](_0x1934d9[_0xe758('0x29')],_0x1934d9['query']);_0x258d5f[_0xe758('0x2a')]=_[_0xe758('0x2b')](_0x1934d9[_0xe758('0x29')],qs['fields'](_0xf00ed6[_0xe758('0x28')]['fields']));_0x258d5f[_0xe758('0x2a')]=_0x258d5f[_0xe758('0x2a')]['length']?_0x258d5f[_0xe758('0x2a')]:_0x1934d9[_0xe758('0x29')];if(!_0xf00ed6[_0xe758('0x28')]['hasOwnProperty']('nolimit')){_0x258d5f[_0xe758('0x2c')]=qs['limit'](_0xf00ed6[_0xe758('0x28')][_0xe758('0x2c')]);_0x258d5f[_0xe758('0x17')]=qs[_0xe758('0x17')](_0xf00ed6[_0xe758('0x28')][_0xe758('0x17')]);}_0x258d5f['order']=qs[_0xe758('0x2d')](_0xf00ed6['query']['sort']);_0x258d5f[_0xe758('0x2e')]=qs[_0xe758('0x2f')](_['pick'](_0xf00ed6[_0xe758('0x28')],_0x1934d9[_0xe758('0x2f')]),_0x3a7e96);if(_0xf00ed6[_0xe758('0x28')]['filter']){_0x258d5f[_0xe758('0x2e')]=_[_0xe758('0x30')](_0x258d5f[_0xe758('0x2e')],{'$or':_[_0xe758('0x31')](_0x3a7e96,function(_0x4bbf04){if(_0x4bbf04[_0xe758('0x26')]!==_0xe758('0x32')){var _0xfb2038={};_0xfb2038[_0x4bbf04[_0xe758('0x21')]]={'$like':'%'+_0xf00ed6['query'][_0xe758('0x33')]+'%'};return _0xfb2038;}})});}_0x258d5f=_['merge']({},_0x258d5f,_0xf00ed6['options']);var _0x36e6e7={'where':_0x258d5f[_0xe758('0x2e')]};return db[_0xe758('0x23')]['count'](_0x36e6e7)[_0xe758('0x20')](function(_0x2a0a8c){_0x52279e[_0xe758('0x19')]=_0x2a0a8c;if(_0xf00ed6[_0xe758('0x28')]['includeAll']){_0x258d5f[_0xe758('0x34')]=[{'all':!![]}];}return db[_0xe758('0x23')][_0xe758('0x35')](_0x258d5f);})[_0xe758('0x20')](function(_0x4f9edc){_0x52279e[_0xe758('0x36')]=_0x4f9edc;return _0x52279e;})['then'](respondWithFilteredResult(_0x32c693,_0x258d5f))[_0xe758('0x37')](handleError(_0x32c693,null));};exports[_0xe758('0x38')]=function(_0x5816fc,_0xe4129a){var _0x2882d0={'raw':!![],'where':{'id':_0x5816fc[_0xe758('0x39')]['id']}},_0x4c2855={};_0x4c2855[_0xe758('0x29')]=_[_0xe758('0x27')](db[_0xe758('0x23')][_0xe758('0x24')]);_0x4c2855[_0xe758('0x28')]=_[_0xe758('0x27')](_0x5816fc[_0xe758('0x28')]);_0x4c2855[_0xe758('0x2f')]=_['intersection'](_0x4c2855['model'],_0x4c2855['query']);_0x2882d0['attributes']=_[_0xe758('0x2b')](_0x4c2855[_0xe758('0x29')],qs[_0xe758('0x3a')](_0x5816fc[_0xe758('0x28')][_0xe758('0x3a')]));_0x2882d0[_0xe758('0x2a')]=_0x2882d0['attributes'][_0xe758('0x3b')]?_0x2882d0[_0xe758('0x2a')]:_0x4c2855['model'];if(_0x5816fc['query'][_0xe758('0x3c')]){_0x2882d0[_0xe758('0x34')]=[{'all':!![]}];}_0x2882d0=_[_0xe758('0x30')]({},_0x2882d0,_0x5816fc[_0xe758('0x3d')]);return db['FaxQueueReport'][_0xe758('0x3e')](_0x2882d0)[_0xe758('0x20')](handleEntityNotFound(_0xe4129a,null))[_0xe758('0x20')](respondWithResult(_0xe4129a,null))['catch'](handleError(_0xe4129a,null));};exports['create']=function(_0x1a16b5,_0x2272b5){return db[_0xe758('0x23')][_0xe758('0x3f')](_0x1a16b5[_0xe758('0x40')],{})['then'](respondWithResult(_0x2272b5,0xc9))[_0xe758('0x37')](handleError(_0x2272b5,null));};exports[_0xe758('0x1f')]=function(_0x58ebcc,_0x4ab7c6){if(_0x58ebcc[_0xe758('0x40')]['id']){delete _0x58ebcc[_0xe758('0x40')]['id'];}return db['FaxQueueReport'][_0xe758('0x3e')]({'where':{'id':_0x58ebcc[_0xe758('0x39')]['id']}})[_0xe758('0x20')](handleEntityNotFound(_0x4ab7c6,null))['then'](saveUpdates(_0x58ebcc[_0xe758('0x40')],null))[_0xe758('0x20')](respondWithResult(_0x4ab7c6,null))['catch'](handleError(_0x4ab7c6,null));};exports[_0xe758('0x41')]=function(_0x206cc3,_0x49c6d9){return db['FaxQueueReport'][_0xe758('0x3e')]({'where':{'id':_0x206cc3[_0xe758('0x39')]['id']}})[_0xe758('0x20')](handleEntityNotFound(_0x49c6d9,null))[_0xe758('0x20')](removeEntity(_0x49c6d9,null))[_0xe758('0x37')](handleError(_0x49c6d9,null));};exports[_0xe758('0x42')]=function(_0x158fb3,_0x1c8364){return db['FaxQueueReport'][_0xe758('0x42')]()[_0xe758('0x20')](respondWithResult(_0x1c8364,null))[_0xe758('0x37')](handleError(_0x1c8364,null));};
\ No newline at end of file
+var _0x652b=['rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','filters','filter','merge','where','VIRTUAL','options','includeAll','include','FaxQueueReport','findAll','show','params','catch','create','body','update','find','destroy','describe','eml-format','rimraf','zip-dir','request-promise','mustache','util','path','ejs','squel','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','undefined','count','limit','Content-Range','apply','then','end','sendStatus','stack','name','send','index','map'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x652b,0x68));var _0xb652=function(_0x43a37c,_0x25a567){_0x43a37c=_0x43a37c-0x0;var _0x5d1d40=_0x652b[_0x43a37c];return _0x5d1d40;};'use strict';var emlformat=require(_0xb652('0x0'));var rimraf=require(_0xb652('0x1'));var zipdir=require(_0xb652('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xb652('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xb652('0x4'));var util=require(_0xb652('0x5'));var path=require(_0xb652('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xb652('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xb652('0x8'));var crypto=require('crypto');var jsforce=require(_0xb652('0x9'));var deskjs=require(_0xb652('0xa'));var toCsv=require(_0xb652('0xb'));var querystring=require(_0xb652('0xc'));var Papa=require(_0xb652('0xd'));var Redis=require(_0xb652('0xe'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xb652('0xf'));var hardwareService=require(_0xb652('0x10'));var logger=require(_0xb652('0x11'))(_0xb652('0x12'));var utils=require('../../config/utils');var config=require(_0xb652('0x13'));var licenseUtil=require(_0xb652('0x14'));var db=require(_0xb652('0x15'))['db'];function respondWithStatusCode(_0x54c2e2,_0x1c182c){_0x1c182c=_0x1c182c||0xcc;return function(_0x813e0c){if(_0x813e0c){return _0x54c2e2['sendStatus'](_0x1c182c);}return _0x54c2e2['status'](_0x1c182c)['end']();};}function respondWithResult(_0x4921a0,_0x21ce7f){_0x21ce7f=_0x21ce7f||0xc8;return function(_0x4dda37){if(_0x4dda37){return _0x4921a0[_0xb652('0x16')](_0x21ce7f)[_0xb652('0x17')](_0x4dda37);}};}function respondWithFilteredResult(_0x16fbac,_0x50889e){return function(_0x1d6f1c){if(_0x1d6f1c){var _0x3621a4=typeof _0x50889e[_0xb652('0x18')]===_0xb652('0x19')&&typeof _0x50889e['limit']===_0xb652('0x19');var _0x289911=_0x1d6f1c[_0xb652('0x1a')];var _0x3bf3b0=_0x3621a4?0x0:_0x50889e['offset'];var _0x94d0b3=_0x3621a4?_0x1d6f1c['count']:_0x50889e[_0xb652('0x18')]+_0x50889e[_0xb652('0x1b')];var _0x22288e;if(_0x94d0b3>=_0x289911){_0x94d0b3=_0x289911;_0x22288e=0xc8;}else{_0x22288e=0xce;}_0x16fbac[_0xb652('0x16')](_0x22288e);return _0x16fbac['set'](_0xb652('0x1c'),_0x3bf3b0+'-'+_0x94d0b3+'/'+_0x289911)[_0xb652('0x17')](_0x1d6f1c);}return null;};}function patchUpdates(_0x3fc43e){return function(_0x169f41){try{jsonpatch[_0xb652('0x1d')](_0x169f41,_0x3fc43e,!![]);}catch(_0x3fb365){return BPromise['reject'](_0x3fb365);}return _0x169f41['save']();};}function saveUpdates(_0x71465c,_0x39a4e3){return function(_0x49a2b2){if(_0x49a2b2){return _0x49a2b2['update'](_0x71465c)[_0xb652('0x1e')](function(_0x48ae93){return _0x48ae93;});}return null;};}function removeEntity(_0x1884a0,_0x3756fb){return function(_0x52d51f){if(_0x52d51f){return _0x52d51f['destroy']()[_0xb652('0x1e')](function(){_0x1884a0[_0xb652('0x16')](0xcc)[_0xb652('0x1f')]();});}};}function handleEntityNotFound(_0x432a86,_0x15ea86){return function(_0x2f7186){if(!_0x2f7186){_0x432a86[_0xb652('0x20')](0x194);}return _0x2f7186;};}function handleError(_0x44ccf3,_0x56eade){_0x56eade=_0x56eade||0x1f4;return function(_0x4dcc1b){logger['error'](_0x4dcc1b[_0xb652('0x21')]);if(_0x4dcc1b['name']){delete _0x4dcc1b[_0xb652('0x22')];}_0x44ccf3['status'](_0x56eade)[_0xb652('0x23')](_0x4dcc1b);};}exports[_0xb652('0x24')]=function(_0x3b74eb,_0x2b91ff){var _0x147b8d={},_0x5f39cb={},_0x459c03={'count':0x0,'rows':[]};var _0x52d918=_[_0xb652('0x25')](db['FaxQueueReport'][_0xb652('0x26')],function(_0x23e529){return{'name':_0x23e529[_0xb652('0x27')],'type':_0x23e529[_0xb652('0x28')][_0xb652('0x29')]};});_0x5f39cb[_0xb652('0x2a')]=_[_0xb652('0x25')](_0x52d918,_0xb652('0x22'));_0x5f39cb[_0xb652('0x2b')]=_[_0xb652('0x2c')](_0x3b74eb[_0xb652('0x2b')]);_0x5f39cb['filters']=_[_0xb652('0x2d')](_0x5f39cb[_0xb652('0x2a')],_0x5f39cb[_0xb652('0x2b')]);_0x147b8d[_0xb652('0x2e')]=_[_0xb652('0x2d')](_0x5f39cb[_0xb652('0x2a')],qs['fields'](_0x3b74eb[_0xb652('0x2b')][_0xb652('0x2f')]));_0x147b8d[_0xb652('0x2e')]=_0x147b8d[_0xb652('0x2e')][_0xb652('0x30')]?_0x147b8d[_0xb652('0x2e')]:_0x5f39cb[_0xb652('0x2a')];if(!_0x3b74eb[_0xb652('0x2b')][_0xb652('0x31')](_0xb652('0x32'))){_0x147b8d['limit']=qs[_0xb652('0x1b')](_0x3b74eb['query']['limit']);_0x147b8d['offset']=qs[_0xb652('0x18')](_0x3b74eb[_0xb652('0x2b')][_0xb652('0x18')]);}_0x147b8d['order']=qs[_0xb652('0x33')](_0x3b74eb['query'][_0xb652('0x33')]);_0x147b8d['where']=qs[_0xb652('0x34')](_['pick'](_0x3b74eb[_0xb652('0x2b')],_0x5f39cb[_0xb652('0x34')]),_0x52d918);if(_0x3b74eb[_0xb652('0x2b')][_0xb652('0x35')]){_0x147b8d['where']=_[_0xb652('0x36')](_0x147b8d[_0xb652('0x37')],{'$or':_[_0xb652('0x25')](_0x52d918,function(_0xd20e40){if(_0xd20e40['type']!==_0xb652('0x38')){var _0x6deca9={};_0x6deca9[_0xd20e40['name']]={'$like':'%'+_0x3b74eb[_0xb652('0x2b')]['filter']+'%'};return _0x6deca9;}})});}_0x147b8d=_['merge']({},_0x147b8d,_0x3b74eb[_0xb652('0x39')]);var _0xb8f377={'where':_0x147b8d[_0xb652('0x37')]};return db['FaxQueueReport'][_0xb652('0x1a')](_0xb8f377)[_0xb652('0x1e')](function(_0x22edb1){_0x459c03[_0xb652('0x1a')]=_0x22edb1;if(_0x3b74eb[_0xb652('0x2b')][_0xb652('0x3a')]){_0x147b8d[_0xb652('0x3b')]=[{'all':!![]}];}return db[_0xb652('0x3c')][_0xb652('0x3d')](_0x147b8d);})[_0xb652('0x1e')](function(_0x501cb7){_0x459c03['rows']=_0x501cb7;return _0x459c03;})[_0xb652('0x1e')](respondWithFilteredResult(_0x2b91ff,_0x147b8d))['catch'](handleError(_0x2b91ff,null));};exports[_0xb652('0x3e')]=function(_0x20e887,_0x6499a7){var _0x3b6c98={'raw':!![],'where':{'id':_0x20e887[_0xb652('0x3f')]['id']}},_0x190c7={};_0x190c7['model']=_['keys'](db[_0xb652('0x3c')][_0xb652('0x26')]);_0x190c7[_0xb652('0x2b')]=_[_0xb652('0x2c')](_0x20e887['query']);_0x190c7[_0xb652('0x34')]=_[_0xb652('0x2d')](_0x190c7[_0xb652('0x2a')],_0x190c7[_0xb652('0x2b')]);_0x3b6c98[_0xb652('0x2e')]=_[_0xb652('0x2d')](_0x190c7[_0xb652('0x2a')],qs[_0xb652('0x2f')](_0x20e887[_0xb652('0x2b')][_0xb652('0x2f')]));_0x3b6c98[_0xb652('0x2e')]=_0x3b6c98[_0xb652('0x2e')][_0xb652('0x30')]?_0x3b6c98[_0xb652('0x2e')]:_0x190c7['model'];if(_0x20e887['query'][_0xb652('0x3a')]){_0x3b6c98[_0xb652('0x3b')]=[{'all':!![]}];}_0x3b6c98=_[_0xb652('0x36')]({},_0x3b6c98,_0x20e887['options']);return db[_0xb652('0x3c')]['find'](_0x3b6c98)[_0xb652('0x1e')](handleEntityNotFound(_0x6499a7,null))[_0xb652('0x1e')](respondWithResult(_0x6499a7,null))[_0xb652('0x40')](handleError(_0x6499a7,null));};exports[_0xb652('0x41')]=function(_0x3739b3,_0xdbe9a2){return db[_0xb652('0x3c')][_0xb652('0x41')](_0x3739b3[_0xb652('0x42')],{})['then'](respondWithResult(_0xdbe9a2,0xc9))[_0xb652('0x40')](handleError(_0xdbe9a2,null));};exports[_0xb652('0x43')]=function(_0x5a4d6c,_0x33eb79){if(_0x5a4d6c['body']['id']){delete _0x5a4d6c[_0xb652('0x42')]['id'];}return db[_0xb652('0x3c')][_0xb652('0x44')]({'where':{'id':_0x5a4d6c['params']['id']}})[_0xb652('0x1e')](handleEntityNotFound(_0x33eb79,null))[_0xb652('0x1e')](saveUpdates(_0x5a4d6c[_0xb652('0x42')],null))[_0xb652('0x1e')](respondWithResult(_0x33eb79,null))[_0xb652('0x40')](handleError(_0x33eb79,null));};exports[_0xb652('0x45')]=function(_0x3e067c,_0x1bebc7){return db['FaxQueueReport']['find']({'where':{'id':_0x3e067c[_0xb652('0x3f')]['id']}})[_0xb652('0x1e')](handleEntityNotFound(_0x1bebc7,null))['then'](removeEntity(_0x1bebc7,null))['catch'](handleError(_0x1bebc7,null));};exports['describe']=function(_0x10ca6c,_0x938dbf){return db[_0xb652('0x3c')][_0xb652('0x46')]()['then'](respondWithResult(_0x938dbf,null))['catch'](handleError(_0x938dbf,null));};
\ No newline at end of file
index 47f7d0b..a45cb8f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1cb9=['api','moment','bluebird','path','rimraf','./faxQueueReport.attributes','exports','define','FaxQueueReport','uniqueid','lodash','../../config/logger'];(function(_0x45e98e,_0x169b60){var _0x374dba=function(_0x597612){while(--_0x597612){_0x45e98e['push'](_0x45e98e['shift']());}};_0x374dba(++_0x169b60);}(_0x1cb9,0x14e));var _0x91cb=function(_0x419aaf,_0x5b5cb5){_0x419aaf=_0x419aaf-0x0;var _0x4cab8a=_0x1cb9[_0x419aaf];return _0x4cab8a;};'use strict';var _=require(_0x91cb('0x0'));var util=require('util');var logger=require(_0x91cb('0x1'))(_0x91cb('0x2'));var moment=require(_0x91cb('0x3'));var BPromise=require(_0x91cb('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x91cb('0x5'));var rimraf=require(_0x91cb('0x6'));var config=require('../../config/environment');var attributes=require(_0x91cb('0x7'));module[_0x91cb('0x8')]=function(_0x186dc3,_0x28543e){return _0x186dc3[_0x91cb('0x9')](_0x91cb('0xa'),attributes,{'tableName':'report_fax_queue','paranoid':![],'indexes':[{'name':_0x91cb('0xb'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x5fc3=['util','api','moment','bluebird','request-promise','path','../../config/environment','./faxQueueReport.attributes','exports','define','report_fax_queue','uniqueid','lodash'];(function(_0xe37e53,_0x10cb82){var _0x6c60cf=function(_0x20df54){while(--_0x20df54){_0xe37e53['push'](_0xe37e53['shift']());}};_0x6c60cf(++_0x10cb82);}(_0x5fc3,0xa8));var _0x35fc=function(_0x5d3903,_0x3d6c3e){_0x5d3903=_0x5d3903-0x0;var _0x4b8bc9=_0x5fc3[_0x5d3903];return _0x4b8bc9;};'use strict';var _=require(_0x35fc('0x0'));var util=require(_0x35fc('0x1'));var logger=require('../../config/logger')(_0x35fc('0x2'));var moment=require(_0x35fc('0x3'));var BPromise=require(_0x35fc('0x4'));var rp=require(_0x35fc('0x5'));var fs=require('fs');var path=require(_0x35fc('0x6'));var rimraf=require('rimraf');var config=require(_0x35fc('0x7'));var attributes=require(_0x35fc('0x8'));module[_0x35fc('0x9')]=function(_0x5b85ad,_0x5754be){return _0x5b85ad[_0x35fc('0xa')]('FaxQueueReport',attributes,{'tableName':_0x35fc('0xb'),'paranoid':![],'indexes':[{'name':_0x35fc('0xc'),'fields':[_0x35fc('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
index ab685bf..384f09f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb0e7=['update','where','attributes','limit','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','then','info','FaxQueueReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','catch','CreateFaxQueueReport','create','body','options','raw','UpdateFaxQueueReport','FaxQueueReport'];(function(_0x2862f2,_0x4dc428){var _0x2eaac5=function(_0x37e814){while(--_0x37e814){_0x2862f2['push'](_0x2862f2['shift']());}};_0x2eaac5(++_0x4dc428);}(_0xb0e7,0x1c4));var _0x7b0e=function(_0x2c5d16,_0x234577){_0x2c5d16=_0x2c5d16-0x0;var _0x5e3f87=_0xb0e7[_0x2c5d16];return _0x5e3f87;};'use strict';var _=require(_0x7b0e('0x0'));var util=require('util');var moment=require(_0x7b0e('0x1'));var BPromise=require(_0x7b0e('0x2'));var rs=require(_0x7b0e('0x3'));var fs=require('fs');var Redis=require(_0x7b0e('0x4'));var db=require(_0x7b0e('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x7b0e('0x6'));var config=require(_0x7b0e('0x7'));var jayson=require(_0x7b0e('0x8'));var client=jayson[_0x7b0e('0x9')][_0x7b0e('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x134054,_0x49316b,_0x4e3cac){return new BPromise(function(_0x5c5046,_0x3a3ced){return client['request'](_0x134054,_0x4e3cac)[_0x7b0e('0xb')](function(_0x5d80e2){logger[_0x7b0e('0xc')](_0x7b0e('0xd'),_0x49316b,_0x7b0e('0xe'));logger[_0x7b0e('0xf')]('FaxQueueReport,\x20%s,\x20%s,\x20%s',_0x49316b,_0x7b0e('0xe'),JSON[_0x7b0e('0x10')](_0x5d80e2));if(_0x5d80e2[_0x7b0e('0x11')]){if(_0x5d80e2[_0x7b0e('0x11')][_0x7b0e('0x12')]===0x1f4){logger[_0x7b0e('0x11')](_0x7b0e('0xd'),_0x49316b,_0x5d80e2[_0x7b0e('0x11')]['message']);return _0x3a3ced(_0x5d80e2[_0x7b0e('0x11')][_0x7b0e('0x13')]);}logger[_0x7b0e('0x11')](_0x7b0e('0xd'),_0x49316b,_0x5d80e2[_0x7b0e('0x11')][_0x7b0e('0x13')]);return _0x5c5046(_0x5d80e2['error'][_0x7b0e('0x13')]);}else{logger[_0x7b0e('0xc')](_0x7b0e('0xd'),_0x49316b,_0x7b0e('0xe'));_0x5c5046(_0x5d80e2['result'][_0x7b0e('0x13')]);}})[_0x7b0e('0x14')](function(_0x380e4d){logger[_0x7b0e('0x11')](_0x7b0e('0xd'),_0x49316b,_0x380e4d);_0x3a3ced(_0x380e4d);});});}exports[_0x7b0e('0x15')]=function(_0x3bc75c){var _0x495435=this;return new Promise(function(_0xce9bbf,_0x57da10){return db['FaxQueueReport'][_0x7b0e('0x16')](_0x3bc75c[_0x7b0e('0x17')],{'raw':_0x3bc75c['options']?_0x3bc75c[_0x7b0e('0x18')][_0x7b0e('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x50e41f){logger[_0x7b0e('0xc')](_0x7b0e('0x15'),_0x3bc75c);logger['debug'](_0x7b0e('0x15'),_0x3bc75c,JSON[_0x7b0e('0x10')](_0x50e41f));_0xce9bbf(_0x50e41f);})['catch'](function(_0x30854e){logger[_0x7b0e('0x11')](_0x7b0e('0x15'),_0x30854e['message'],_0x3bc75c);_0x57da10(_0x495435['error'](0x1f4,_0x30854e['message']));});});};exports[_0x7b0e('0x1a')]=function(_0x34d459){var _0x2c1c3c=this;return new Promise(function(_0x52b143,_0x2052f1){return db[_0x7b0e('0x1b')][_0x7b0e('0x1c')](_0x34d459['body'],{'raw':_0x34d459[_0x7b0e('0x18')]?_0x34d459['options'][_0x7b0e('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x34d459[_0x7b0e('0x18')]?_0x34d459[_0x7b0e('0x18')][_0x7b0e('0x1d')]||null:null,'attributes':_0x34d459[_0x7b0e('0x18')]?_0x34d459[_0x7b0e('0x18')][_0x7b0e('0x1e')]||null:null,'limit':_0x34d459[_0x7b0e('0x18')]?_0x34d459[_0x7b0e('0x18')][_0x7b0e('0x1f')]||null:null})[_0x7b0e('0xb')](function(_0x3664b4){logger['info'](_0x7b0e('0x1a'),_0x34d459);logger[_0x7b0e('0xf')](_0x7b0e('0x1a'),_0x34d459,JSON[_0x7b0e('0x10')](_0x3664b4));_0x52b143(_0x3664b4);})[_0x7b0e('0x14')](function(_0x28f2fe){logger['error'](_0x7b0e('0x1a'),_0x28f2fe[_0x7b0e('0x13')],_0x34d459);_0x2052f1(_0x2c1c3c[_0x7b0e('0x11')](0x1f4,_0x28f2fe['message']));});});};
\ No newline at end of file
+var _0x84ed=['options','raw','CreateFaxQueueReport','UpdateFaxQueueReport','FaxQueueReport','update','where','attributes','limit','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','client','http','request','then','FaxQueueReport,\x20%s,\x20%s','request\x20sent','debug','FaxQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','create','body'];(function(_0x432682,_0x253044){var _0x463d05=function(_0xa73403){while(--_0xa73403){_0x432682['push'](_0x432682['shift']());}};_0x463d05(++_0x253044);}(_0x84ed,0x69));var _0xd84e=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0x84ed[_0x2c91e9];return _0x13f0ff;};'use strict';var _=require(_0xd84e('0x0'));var util=require(_0xd84e('0x1'));var moment=require(_0xd84e('0x2'));var BPromise=require('bluebird');var rs=require(_0xd84e('0x3'));var fs=require('fs');var Redis=require(_0xd84e('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xd84e('0x5'));var logger=require(_0xd84e('0x6'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xd84e('0x7')][_0xd84e('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x46938c,_0x33a5df,_0xec6852){return new BPromise(function(_0x45e78b,_0x24bf0c){return client[_0xd84e('0x9')](_0x46938c,_0xec6852)[_0xd84e('0xa')](function(_0x79a3f4){logger['info'](_0xd84e('0xb'),_0x33a5df,_0xd84e('0xc'));logger[_0xd84e('0xd')](_0xd84e('0xe'),_0x33a5df,'request\x20sent',JSON[_0xd84e('0xf')](_0x79a3f4));if(_0x79a3f4[_0xd84e('0x10')]){if(_0x79a3f4[_0xd84e('0x10')][_0xd84e('0x11')]===0x1f4){logger[_0xd84e('0x10')](_0xd84e('0xb'),_0x33a5df,_0x79a3f4[_0xd84e('0x10')][_0xd84e('0x12')]);return _0x24bf0c(_0x79a3f4[_0xd84e('0x10')]['message']);}logger[_0xd84e('0x10')](_0xd84e('0xb'),_0x33a5df,_0x79a3f4[_0xd84e('0x10')][_0xd84e('0x12')]);return _0x45e78b(_0x79a3f4['error']['message']);}else{logger[_0xd84e('0x13')]('FaxQueueReport,\x20%s,\x20%s',_0x33a5df,_0xd84e('0xc'));_0x45e78b(_0x79a3f4[_0xd84e('0x14')][_0xd84e('0x12')]);}})['catch'](function(_0x3439e5){logger[_0xd84e('0x10')](_0xd84e('0xb'),_0x33a5df,_0x3439e5);_0x24bf0c(_0x3439e5);});});}exports['CreateFaxQueueReport']=function(_0x14c307){var _0x2d2280=this;return new Promise(function(_0x90bd2c,_0x13ae27){return db['FaxQueueReport'][_0xd84e('0x15')](_0x14c307[_0xd84e('0x16')],{'raw':_0x14c307[_0xd84e('0x17')]?_0x14c307['options'][_0xd84e('0x18')]===undefined?!![]:![]:!![]})[_0xd84e('0xa')](function(_0x439282){logger['info'](_0xd84e('0x19'),_0x14c307);logger[_0xd84e('0xd')](_0xd84e('0x19'),_0x14c307,JSON[_0xd84e('0xf')](_0x439282));_0x90bd2c(_0x439282);})['catch'](function(_0x2f096a){logger[_0xd84e('0x10')](_0xd84e('0x19'),_0x2f096a[_0xd84e('0x12')],_0x14c307);_0x13ae27(_0x2d2280[_0xd84e('0x10')](0x1f4,_0x2f096a[_0xd84e('0x12')]));});});};exports[_0xd84e('0x1a')]=function(_0xd58fec){var _0x296a80=this;return new Promise(function(_0x56c31f,_0x57d975){return db[_0xd84e('0x1b')][_0xd84e('0x1c')](_0xd58fec[_0xd84e('0x16')],{'raw':_0xd58fec[_0xd84e('0x17')]?_0xd58fec[_0xd84e('0x17')][_0xd84e('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xd58fec[_0xd84e('0x17')]?_0xd58fec[_0xd84e('0x17')][_0xd84e('0x1d')]||null:null,'attributes':_0xd58fec[_0xd84e('0x17')]?_0xd58fec[_0xd84e('0x17')][_0xd84e('0x1e')]||null:null,'limit':_0xd58fec[_0xd84e('0x17')]?_0xd58fec[_0xd84e('0x17')][_0xd84e('0x1f')]||null:null})[_0xd84e('0xa')](function(_0x548eea){logger[_0xd84e('0x13')](_0xd84e('0x1a'),_0xd58fec);logger[_0xd84e('0xd')](_0xd84e('0x1a'),_0xd58fec,JSON['stringify'](_0x548eea));_0x56c31f(_0x548eea);})['catch'](function(_0x50c11a){logger['error'](_0xd84e('0x1a'),_0x50c11a[_0xd84e('0x12')],_0xd58fec);_0x57d975(_0x296a80[_0xd84e('0x10')](0x1f4,_0x50c11a[_0xd84e('0x12')]));});});};
\ No newline at end of file
index a929067..0137c55 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x23c2=['/:id','show','post','put','delete','exports','multer','util','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxQueueReport.controller','get','/describe','isAuthenticated','describe'];(function(_0x4ad046,_0x40b810){var _0x35c384=function(_0x54944e){while(--_0x54944e){_0x4ad046['push'](_0x4ad046['shift']());}};_0x35c384(++_0x40b810);}(_0x23c2,0xc4));var _0x223c=function(_0x1ce9ea,_0x32e6f4){_0x1ce9ea=_0x1ce9ea-0x0;var _0x2a95b9=_0x23c2[_0x1ce9ea];return _0x2a95b9;};'use strict';var multer=require(_0x223c('0x0'));var util=require(_0x223c('0x1'));var path=require(_0x223c('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x223c('0x3')]();var fs_extra=require(_0x223c('0x4'));var auth=require(_0x223c('0x5'));var interaction=require(_0x223c('0x6'));var config=require(_0x223c('0x7'));var controller=require(_0x223c('0x8'));router[_0x223c('0x9')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x223c('0xa'),auth[_0x223c('0xb')](),controller[_0x223c('0xc')]);router['get'](_0x223c('0xd'),auth[_0x223c('0xb')](),controller[_0x223c('0xe')]);router[_0x223c('0xf')]('/',auth[_0x223c('0xb')](),controller['create']);router[_0x223c('0x10')](_0x223c('0xd'),auth[_0x223c('0xb')](),controller['update']);router[_0x223c('0x11')](_0x223c('0xd'),auth['isAuthenticated'](),controller['destroy']);module[_0x223c('0x12')]=router;
\ No newline at end of file
+var _0x6b07=['Router','fs-extra','../../components/interaction/service','./faxQueueReport.controller','get','/describe','isAuthenticated','describe','show','post','create','put','update','/:id','destroy','exports','multer','util','path','connect-timeout','express'];(function(_0x29b274,_0x1865c3){var _0x273473=function(_0x45d259){while(--_0x45d259){_0x29b274['push'](_0x29b274['shift']());}};_0x273473(++_0x1865c3);}(_0x6b07,0x79));var _0x76b0=function(_0x4aaf3c,_0x393fb9){_0x4aaf3c=_0x4aaf3c-0x0;var _0x174c6c=_0x6b07[_0x4aaf3c];return _0x174c6c;};'use strict';var multer=require(_0x76b0('0x0'));var util=require(_0x76b0('0x1'));var path=require(_0x76b0('0x2'));var timeout=require(_0x76b0('0x3'));var express=require(_0x76b0('0x4'));var router=express[_0x76b0('0x5')]();var fs_extra=require(_0x76b0('0x6'));var auth=require('../../components/auth/service');var interaction=require(_0x76b0('0x7'));var config=require('../../config/environment');var controller=require(_0x76b0('0x8'));router[_0x76b0('0x9')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x76b0('0xa'),auth[_0x76b0('0xb')](),controller[_0x76b0('0xc')]);router[_0x76b0('0x9')]('/:id',auth[_0x76b0('0xb')](),controller[_0x76b0('0xd')]);router[_0x76b0('0xe')]('/',auth[_0x76b0('0xb')](),controller[_0x76b0('0xf')]);router[_0x76b0('0x10')]('/:id',auth[_0x76b0('0xb')](),controller[_0x76b0('0x11')]);router['delete'](_0x76b0('0x12'),auth[_0x76b0('0xb')](),controller[_0x76b0('0x13')]);module[_0x76b0('0x14')]=router;
\ No newline at end of file
index 8b59e2a..e5f12f5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x00bb=['moment','sequelize','exports','ENUM','agent','queue','DATE','NOW'];(function(_0xd72b2d,_0x196d6c){var _0x5b7e5f=function(_0x1d7580){while(--_0x1d7580){_0xd72b2d['push'](_0xd72b2d['shift']());}};_0x5b7e5f(++_0x196d6c);}(_0x00bb,0x1d8));var _0xb00b=function(_0x2d7f0e,_0x3e6fbd){_0x2d7f0e=_0x2d7f0e-0x0;var _0x110b07=_0x00bb[_0x2d7f0e];return _0x110b07;};'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 _0x54ef=['agent','queue','DATE','NOW','moment','sequelize','exports','ENUM','account'];(function(_0x34947e,_0x45c404){var _0x87404f=function(_0x5e5027){while(--_0x5e5027){_0x34947e['push'](_0x34947e['shift']());}};_0x87404f(++_0x45c404);}(_0x54ef,0x112));var _0xf54e=function(_0x37c6ef,_0x38393d){_0x37c6ef=_0x37c6ef-0x0;var _0x177027=_0x54ef[_0x37c6ef];return _0x177027;};'use strict';var moment=require(_0xf54e('0x0'));var Sequelize=require(_0xf54e('0x1'));module[_0xf54e('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0xf54e('0x3')](_0xf54e('0x4'),_0xf54e('0x5'),_0xf54e('0x6')),'allowNull':![],'defaultValue':_0xf54e('0x6')},'transferredAt':{'type':Sequelize[_0xf54e('0x7')],'allowNull':![],'defaultValue':Sequelize[_0xf54e('0x8')]}};
\ No newline at end of file
index f644de6..f4c8ae6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8d59=['stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','FaxTransferReport','includeAll','findAll','rows','catch','show','params','find','create','body','describe','eml-format','rimraf','zip-dir','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','save','update','then','destroy','error'];(function(_0x3ae5a0,_0x152aaf){var _0x47be8c=function(_0x27b074){while(--_0x27b074){_0x3ae5a0['push'](_0x3ae5a0['shift']());}};_0x47be8c(++_0x152aaf);}(_0x8d59,0x161));var _0x98d5=function(_0x362cfe,_0x161591){_0x362cfe=_0x362cfe-0x0;var _0x5aa4b4=_0x8d59[_0x362cfe];return _0x5aa4b4;};'use strict';var emlformat=require(_0x98d5('0x0'));var rimraf=require(_0x98d5('0x1'));var zipdir=require(_0x98d5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x98d5('0x3'));var BPromise=require(_0x98d5('0x4'));var Mustache=require('mustache');var util=require(_0x98d5('0x5'));var path=require(_0x98d5('0x6'));var sox=require(_0x98d5('0x7'));var csv=require(_0x98d5('0x8'));var ejs=require(_0x98d5('0x9'));var fs=require('fs');var fs_extra=require(_0x98d5('0xa'));var _=require(_0x98d5('0xb'));var squel=require(_0x98d5('0xc'));var crypto=require(_0x98d5('0xd'));var jsforce=require(_0x98d5('0xe'));var deskjs=require(_0x98d5('0xf'));var toCsv=require(_0x98d5('0x8'));var querystring=require(_0x98d5('0x10'));var Papa=require('papaparse');var Redis=require(_0x98d5('0x11'));var authService=require(_0x98d5('0x12'));var qs=require(_0x98d5('0x13'));var as=require(_0x98d5('0x14'));var hardwareService=require(_0x98d5('0x15'));var logger=require(_0x98d5('0x16'))(_0x98d5('0x17'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x98d5('0x18'));var db=require(_0x98d5('0x19'))['db'];function respondWithStatusCode(_0x117a9f,_0x4c31ac){_0x4c31ac=_0x4c31ac||0xcc;return function(_0x5c7c3d){if(_0x5c7c3d){return _0x117a9f[_0x98d5('0x1a')](_0x4c31ac);}return _0x117a9f[_0x98d5('0x1b')](_0x4c31ac)[_0x98d5('0x1c')]();};}function respondWithResult(_0x26fbfd,_0x412833){_0x412833=_0x412833||0xc8;return function(_0x2e6fda){if(_0x2e6fda){return _0x26fbfd[_0x98d5('0x1b')](_0x412833)[_0x98d5('0x1d')](_0x2e6fda);}};}function respondWithFilteredResult(_0xfc4811,_0x5c6156){return function(_0x419333){if(_0x419333){var _0x28bdd3=typeof _0x5c6156[_0x98d5('0x1e')]===_0x98d5('0x1f')&&typeof _0x5c6156[_0x98d5('0x20')]===_0x98d5('0x1f');var _0x65021a=_0x419333[_0x98d5('0x21')];var _0x34a2d6=_0x28bdd3?0x0:_0x5c6156[_0x98d5('0x1e')];var _0x1c537e=_0x28bdd3?_0x419333['count']:_0x5c6156['offset']+_0x5c6156[_0x98d5('0x20')];var _0x41efc4;if(_0x1c537e>=_0x65021a){_0x1c537e=_0x65021a;_0x41efc4=0xc8;}else{_0x41efc4=0xce;}_0xfc4811[_0x98d5('0x1b')](_0x41efc4);return _0xfc4811[_0x98d5('0x22')]('Content-Range',_0x34a2d6+'-'+_0x1c537e+'/'+_0x65021a)['json'](_0x419333);}return null;};}function patchUpdates(_0x41c712){return function(_0x168144){try{jsonpatch[_0x98d5('0x23')](_0x168144,_0x41c712,!![]);}catch(_0x42aa65){return BPromise[_0x98d5('0x24')](_0x42aa65);}return _0x168144[_0x98d5('0x25')]();};}function saveUpdates(_0x4aa558,_0x4fb729){return function(_0x140e4c){if(_0x140e4c){return _0x140e4c[_0x98d5('0x26')](_0x4aa558)[_0x98d5('0x27')](function(_0xe90de2){return _0xe90de2;});}return null;};}function removeEntity(_0x2397f9,_0x382083){return function(_0x5d3081){if(_0x5d3081){return _0x5d3081[_0x98d5('0x28')]()[_0x98d5('0x27')](function(){_0x2397f9[_0x98d5('0x1b')](0xcc)[_0x98d5('0x1c')]();});}};}function handleEntityNotFound(_0x288d4f,_0x1c002c){return function(_0x1f8cf6){if(!_0x1f8cf6){_0x288d4f[_0x98d5('0x1a')](0x194);}return _0x1f8cf6;};}function handleError(_0x5ddcb9,_0x3500ab){_0x3500ab=_0x3500ab||0x1f4;return function(_0x28b0c2){logger[_0x98d5('0x29')](_0x28b0c2[_0x98d5('0x2a')]);if(_0x28b0c2[_0x98d5('0x2b')]){delete _0x28b0c2[_0x98d5('0x2b')];}_0x5ddcb9[_0x98d5('0x1b')](_0x3500ab)[_0x98d5('0x2c')](_0x28b0c2);};}exports[_0x98d5('0x2d')]=function(_0x3ea3ef,_0x37257){var _0x1ecce0={},_0x2c8d1b={},_0x5cab05={'count':0x0,'rows':[]};var _0xe1d075=_[_0x98d5('0x2e')](db['FaxTransferReport'][_0x98d5('0x2f')],function(_0x2e797b){return{'name':_0x2e797b[_0x98d5('0x30')],'type':_0x2e797b[_0x98d5('0x31')][_0x98d5('0x32')]};});_0x2c8d1b[_0x98d5('0x33')]=_[_0x98d5('0x2e')](_0xe1d075,_0x98d5('0x2b'));_0x2c8d1b[_0x98d5('0x34')]=_[_0x98d5('0x35')](_0x3ea3ef['query']);_0x2c8d1b[_0x98d5('0x36')]=_['intersection'](_0x2c8d1b[_0x98d5('0x33')],_0x2c8d1b['query']);_0x1ecce0['attributes']=_[_0x98d5('0x37')](_0x2c8d1b[_0x98d5('0x33')],qs[_0x98d5('0x38')](_0x3ea3ef[_0x98d5('0x34')][_0x98d5('0x38')]));_0x1ecce0['attributes']=_0x1ecce0[_0x98d5('0x39')][_0x98d5('0x3a')]?_0x1ecce0[_0x98d5('0x39')]:_0x2c8d1b[_0x98d5('0x33')];if(!_0x3ea3ef['query'][_0x98d5('0x3b')](_0x98d5('0x3c'))){_0x1ecce0[_0x98d5('0x20')]=qs[_0x98d5('0x20')](_0x3ea3ef[_0x98d5('0x34')]['limit']);_0x1ecce0[_0x98d5('0x1e')]=qs[_0x98d5('0x1e')](_0x3ea3ef[_0x98d5('0x34')][_0x98d5('0x1e')]);}_0x1ecce0[_0x98d5('0x3d')]=qs['sort'](_0x3ea3ef[_0x98d5('0x34')][_0x98d5('0x3e')]);_0x1ecce0[_0x98d5('0x3f')]=qs[_0x98d5('0x36')](_[_0x98d5('0x40')](_0x3ea3ef[_0x98d5('0x34')],_0x2c8d1b[_0x98d5('0x36')]),_0xe1d075);if(_0x3ea3ef[_0x98d5('0x34')][_0x98d5('0x41')]){_0x1ecce0[_0x98d5('0x3f')]=_[_0x98d5('0x42')](_0x1ecce0[_0x98d5('0x3f')],{'$or':_[_0x98d5('0x2e')](_0xe1d075,function(_0x25422a){if(_0x25422a[_0x98d5('0x31')]!=='VIRTUAL'){var _0x329d48={};_0x329d48[_0x25422a['name']]={'$like':'%'+_0x3ea3ef['query'][_0x98d5('0x41')]+'%'};return _0x329d48;}})});}_0x1ecce0=_[_0x98d5('0x42')]({},_0x1ecce0,_0x3ea3ef[_0x98d5('0x43')]);var _0x2ecb18={'where':_0x1ecce0['where']};return db[_0x98d5('0x44')][_0x98d5('0x21')](_0x2ecb18)['then'](function(_0x15a0e2){_0x5cab05[_0x98d5('0x21')]=_0x15a0e2;if(_0x3ea3ef[_0x98d5('0x34')][_0x98d5('0x45')]){_0x1ecce0['include']=[{'all':!![]}];}return db['FaxTransferReport'][_0x98d5('0x46')](_0x1ecce0);})[_0x98d5('0x27')](function(_0x342e45){_0x5cab05[_0x98d5('0x47')]=_0x342e45;return _0x5cab05;})[_0x98d5('0x27')](respondWithFilteredResult(_0x37257,_0x1ecce0))[_0x98d5('0x48')](handleError(_0x37257,null));};exports[_0x98d5('0x49')]=function(_0x2f64e4,_0x121805){var _0xd3dace={'raw':!![],'where':{'id':_0x2f64e4[_0x98d5('0x4a')]['id']}},_0x432a84={};_0x432a84[_0x98d5('0x33')]=_[_0x98d5('0x35')](db['FaxTransferReport'][_0x98d5('0x2f')]);_0x432a84['query']=_[_0x98d5('0x35')](_0x2f64e4[_0x98d5('0x34')]);_0x432a84[_0x98d5('0x36')]=_[_0x98d5('0x37')](_0x432a84[_0x98d5('0x33')],_0x432a84[_0x98d5('0x34')]);_0xd3dace[_0x98d5('0x39')]=_[_0x98d5('0x37')](_0x432a84[_0x98d5('0x33')],qs[_0x98d5('0x38')](_0x2f64e4['query'][_0x98d5('0x38')]));_0xd3dace[_0x98d5('0x39')]=_0xd3dace[_0x98d5('0x39')]['length']?_0xd3dace[_0x98d5('0x39')]:_0x432a84[_0x98d5('0x33')];if(_0x2f64e4[_0x98d5('0x34')][_0x98d5('0x45')]){_0xd3dace['include']=[{'all':!![]}];}_0xd3dace=_['merge']({},_0xd3dace,_0x2f64e4['options']);return db[_0x98d5('0x44')][_0x98d5('0x4b')](_0xd3dace)[_0x98d5('0x27')](handleEntityNotFound(_0x121805,null))[_0x98d5('0x27')](respondWithResult(_0x121805,null))[_0x98d5('0x48')](handleError(_0x121805,null));};exports[_0x98d5('0x4c')]=function(_0x497e59,_0x4044ad){return db[_0x98d5('0x44')]['create'](_0x497e59[_0x98d5('0x4d')],{})[_0x98d5('0x27')](respondWithResult(_0x4044ad,0xc9))[_0x98d5('0x48')](handleError(_0x4044ad,null));};exports[_0x98d5('0x26')]=function(_0x678df2,_0x282c6c){if(_0x678df2[_0x98d5('0x4d')]['id']){delete _0x678df2['body']['id'];}return db[_0x98d5('0x44')][_0x98d5('0x4b')]({'where':{'id':_0x678df2[_0x98d5('0x4a')]['id']}})['then'](handleEntityNotFound(_0x282c6c,null))[_0x98d5('0x27')](saveUpdates(_0x678df2[_0x98d5('0x4d')],null))[_0x98d5('0x27')](respondWithResult(_0x282c6c,null))[_0x98d5('0x48')](handleError(_0x282c6c,null));};exports[_0x98d5('0x28')]=function(_0xc7b249,_0xce098){return db[_0x98d5('0x44')][_0x98d5('0x4b')]({'where':{'id':_0xc7b249[_0x98d5('0x4a')]['id']}})[_0x98d5('0x27')](handleEntityNotFound(_0xce098,null))['then'](removeEntity(_0xce098,null))['catch'](handleError(_0xce098,null));};exports[_0x98d5('0x4e')]=function(_0x46e9ca,_0xac43b1){return db[_0x98d5('0x44')][_0x98d5('0x4e')]()[_0x98d5('0x27')](respondWithResult(_0xac43b1,null))['catch'](handleError(_0xac43b1,null));};
\ No newline at end of file
+var _0x93d6=['sendStatus','error','stack','name','send','index','map','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','order','sort','pick','filter','where','merge','type','options','FaxTransferReport','includeAll','findAll','show','params','rawAttributes','include','catch','create','body','update','find','describe','eml-format','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','save','then','destroy'];(function(_0x31a27d,_0x19a26d){var _0x935871=function(_0x2523b1){while(--_0x2523b1){_0x31a27d['push'](_0x31a27d['shift']());}};_0x935871(++_0x19a26d);}(_0x93d6,0xbe));var _0x693d=function(_0x243427,_0x784e11){_0x243427=_0x243427-0x0;var _0xc59f9a=_0x93d6[_0x243427];return _0xc59f9a;};'use strict';var emlformat=require(_0x693d('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x693d('0x1'));var rp=require(_0x693d('0x2'));var moment=require('moment');var BPromise=require(_0x693d('0x3'));var Mustache=require(_0x693d('0x4'));var util=require(_0x693d('0x5'));var path=require(_0x693d('0x6'));var sox=require(_0x693d('0x7'));var csv=require(_0x693d('0x8'));var ejs=require(_0x693d('0x9'));var fs=require('fs');var fs_extra=require(_0x693d('0xa'));var _=require(_0x693d('0xb'));var squel=require(_0x693d('0xc'));var crypto=require('crypto');var jsforce=require(_0x693d('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x693d('0x8'));var querystring=require(_0x693d('0xe'));var Papa=require(_0x693d('0xf'));var Redis=require(_0x693d('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x693d('0x11'));var as=require(_0x693d('0x12'));var hardwareService=require(_0x693d('0x13'));var logger=require(_0x693d('0x14'))(_0x693d('0x15'));var utils=require(_0x693d('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x693d('0x17'));var db=require(_0x693d('0x18'))['db'];function respondWithStatusCode(_0x23e98a,_0x2f6340){_0x2f6340=_0x2f6340||0xcc;return function(_0x2f6a46){if(_0x2f6a46){return _0x23e98a['sendStatus'](_0x2f6340);}return _0x23e98a[_0x693d('0x19')](_0x2f6340)[_0x693d('0x1a')]();};}function respondWithResult(_0x1e23cd,_0x4d1770){_0x4d1770=_0x4d1770||0xc8;return function(_0x29dc17){if(_0x29dc17){return _0x1e23cd[_0x693d('0x19')](_0x4d1770)[_0x693d('0x1b')](_0x29dc17);}};}function respondWithFilteredResult(_0x4e7a97,_0x50e355){return function(_0x2db8f9){if(_0x2db8f9){var _0x1c6f4d=typeof _0x50e355[_0x693d('0x1c')]===_0x693d('0x1d')&&typeof _0x50e355[_0x693d('0x1e')]==='undefined';var _0x216213=_0x2db8f9[_0x693d('0x1f')];var _0x4fb8d0=_0x1c6f4d?0x0:_0x50e355[_0x693d('0x1c')];var _0x4b49b6=_0x1c6f4d?_0x2db8f9[_0x693d('0x1f')]:_0x50e355[_0x693d('0x1c')]+_0x50e355[_0x693d('0x1e')];var _0x37675c;if(_0x4b49b6>=_0x216213){_0x4b49b6=_0x216213;_0x37675c=0xc8;}else{_0x37675c=0xce;}_0x4e7a97[_0x693d('0x19')](_0x37675c);return _0x4e7a97[_0x693d('0x20')](_0x693d('0x21'),_0x4fb8d0+'-'+_0x4b49b6+'/'+_0x216213)['json'](_0x2db8f9);}return null;};}function patchUpdates(_0x1ce0dc){return function(_0x12f276){try{jsonpatch[_0x693d('0x22')](_0x12f276,_0x1ce0dc,!![]);}catch(_0x37119b){return BPromise['reject'](_0x37119b);}return _0x12f276[_0x693d('0x23')]();};}function saveUpdates(_0x16e380,_0x4b8639){return function(_0x1e14e2){if(_0x1e14e2){return _0x1e14e2['update'](_0x16e380)[_0x693d('0x24')](function(_0x5b7ba3){return _0x5b7ba3;});}return null;};}function removeEntity(_0x2085b6,_0x56bc01){return function(_0x5a968d){if(_0x5a968d){return _0x5a968d[_0x693d('0x25')]()[_0x693d('0x24')](function(){_0x2085b6[_0x693d('0x19')](0xcc)[_0x693d('0x1a')]();});}};}function handleEntityNotFound(_0x3e0b36,_0x34bddd){return function(_0x5ca154){if(!_0x5ca154){_0x3e0b36[_0x693d('0x26')](0x194);}return _0x5ca154;};}function handleError(_0x12b398,_0x567de2){_0x567de2=_0x567de2||0x1f4;return function(_0x37c89e){logger[_0x693d('0x27')](_0x37c89e[_0x693d('0x28')]);if(_0x37c89e[_0x693d('0x29')]){delete _0x37c89e['name'];}_0x12b398[_0x693d('0x19')](_0x567de2)[_0x693d('0x2a')](_0x37c89e);};}exports[_0x693d('0x2b')]=function(_0x50fa83,_0x2bb850){var _0x143f51={},_0x54b4df={},_0xd6074f={'count':0x0,'rows':[]};var _0x1ace97=_[_0x693d('0x2c')](db['FaxTransferReport']['rawAttributes'],function(_0x546123){return{'name':_0x546123[_0x693d('0x2d')],'type':_0x546123['type'][_0x693d('0x2e')]};});_0x54b4df[_0x693d('0x2f')]=_[_0x693d('0x2c')](_0x1ace97,_0x693d('0x29'));_0x54b4df[_0x693d('0x30')]=_[_0x693d('0x31')](_0x50fa83[_0x693d('0x30')]);_0x54b4df[_0x693d('0x32')]=_[_0x693d('0x33')](_0x54b4df[_0x693d('0x2f')],_0x54b4df[_0x693d('0x30')]);_0x143f51[_0x693d('0x34')]=_[_0x693d('0x33')](_0x54b4df['model'],qs['fields'](_0x50fa83['query'][_0x693d('0x35')]));_0x143f51[_0x693d('0x34')]=_0x143f51[_0x693d('0x34')][_0x693d('0x36')]?_0x143f51[_0x693d('0x34')]:_0x54b4df[_0x693d('0x2f')];if(!_0x50fa83[_0x693d('0x30')]['hasOwnProperty']('nolimit')){_0x143f51['limit']=qs['limit'](_0x50fa83[_0x693d('0x30')]['limit']);_0x143f51[_0x693d('0x1c')]=qs['offset'](_0x50fa83[_0x693d('0x30')]['offset']);}_0x143f51[_0x693d('0x37')]=qs[_0x693d('0x38')](_0x50fa83[_0x693d('0x30')][_0x693d('0x38')]);_0x143f51['where']=qs[_0x693d('0x32')](_[_0x693d('0x39')](_0x50fa83[_0x693d('0x30')],_0x54b4df[_0x693d('0x32')]),_0x1ace97);if(_0x50fa83[_0x693d('0x30')][_0x693d('0x3a')]){_0x143f51[_0x693d('0x3b')]=_[_0x693d('0x3c')](_0x143f51[_0x693d('0x3b')],{'$or':_[_0x693d('0x2c')](_0x1ace97,function(_0x1514c9){if(_0x1514c9[_0x693d('0x3d')]!=='VIRTUAL'){var _0x1c8bc3={};_0x1c8bc3[_0x1514c9['name']]={'$like':'%'+_0x50fa83[_0x693d('0x30')][_0x693d('0x3a')]+'%'};return _0x1c8bc3;}})});}_0x143f51=_[_0x693d('0x3c')]({},_0x143f51,_0x50fa83[_0x693d('0x3e')]);var _0x4d243d={'where':_0x143f51[_0x693d('0x3b')]};return db[_0x693d('0x3f')][_0x693d('0x1f')](_0x4d243d)['then'](function(_0xe06202){_0xd6074f[_0x693d('0x1f')]=_0xe06202;if(_0x50fa83['query'][_0x693d('0x40')]){_0x143f51['include']=[{'all':!![]}];}return db[_0x693d('0x3f')][_0x693d('0x41')](_0x143f51);})['then'](function(_0x13fb32){_0xd6074f['rows']=_0x13fb32;return _0xd6074f;})[_0x693d('0x24')](respondWithFilteredResult(_0x2bb850,_0x143f51))['catch'](handleError(_0x2bb850,null));};exports[_0x693d('0x42')]=function(_0x5c813c,_0x556b63){var _0x65410={'raw':!![],'where':{'id':_0x5c813c[_0x693d('0x43')]['id']}},_0x5c754e={};_0x5c754e['model']=_['keys'](db['FaxTransferReport'][_0x693d('0x44')]);_0x5c754e[_0x693d('0x30')]=_[_0x693d('0x31')](_0x5c813c[_0x693d('0x30')]);_0x5c754e[_0x693d('0x32')]=_['intersection'](_0x5c754e[_0x693d('0x2f')],_0x5c754e[_0x693d('0x30')]);_0x65410[_0x693d('0x34')]=_[_0x693d('0x33')](_0x5c754e['model'],qs['fields'](_0x5c813c[_0x693d('0x30')][_0x693d('0x35')]));_0x65410[_0x693d('0x34')]=_0x65410[_0x693d('0x34')][_0x693d('0x36')]?_0x65410[_0x693d('0x34')]:_0x5c754e['model'];if(_0x5c813c[_0x693d('0x30')][_0x693d('0x40')]){_0x65410[_0x693d('0x45')]=[{'all':!![]}];}_0x65410=_[_0x693d('0x3c')]({},_0x65410,_0x5c813c[_0x693d('0x3e')]);return db[_0x693d('0x3f')]['find'](_0x65410)[_0x693d('0x24')](handleEntityNotFound(_0x556b63,null))['then'](respondWithResult(_0x556b63,null))[_0x693d('0x46')](handleError(_0x556b63,null));};exports[_0x693d('0x47')]=function(_0x5ef7f8,_0x363349){return db[_0x693d('0x3f')][_0x693d('0x47')](_0x5ef7f8[_0x693d('0x48')],{})[_0x693d('0x24')](respondWithResult(_0x363349,0xc9))[_0x693d('0x46')](handleError(_0x363349,null));};exports[_0x693d('0x49')]=function(_0x5575cc,_0x3103c4){if(_0x5575cc[_0x693d('0x48')]['id']){delete _0x5575cc[_0x693d('0x48')]['id'];}return db['FaxTransferReport'][_0x693d('0x4a')]({'where':{'id':_0x5575cc['params']['id']}})[_0x693d('0x24')](handleEntityNotFound(_0x3103c4,null))[_0x693d('0x24')](saveUpdates(_0x5575cc[_0x693d('0x48')],null))[_0x693d('0x24')](respondWithResult(_0x3103c4,null))[_0x693d('0x46')](handleError(_0x3103c4,null));};exports[_0x693d('0x25')]=function(_0x26828f,_0x3b4095){return db[_0x693d('0x3f')][_0x693d('0x4a')]({'where':{'id':_0x26828f[_0x693d('0x43')]['id']}})['then'](handleEntityNotFound(_0x3b4095,null))['then'](removeEntity(_0x3b4095,null))[_0x693d('0x46')](handleError(_0x3b4095,null));};exports[_0x693d('0x4b')]=function(_0x4e1131,_0x5b4328){return db[_0x693d('0x3f')][_0x693d('0x4b')]()['then'](respondWithResult(_0x5b4328,null))[_0x693d('0x46')](handleError(_0x5b4328,null));};
\ No newline at end of file
index 1a355d7..ad0e3d7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a2b=['exports','define','FaxTransferReport','report_fax_transfer','lodash','util','request-promise','rimraf','../../config/environment','./faxTransferReport.attributes'];(function(_0x410612,_0x551c48){var _0xbfa860=function(_0x4fb412){while(--_0x4fb412){_0x410612['push'](_0x410612['shift']());}};_0xbfa860(++_0x551c48);}(_0x7a2b,0x7c));var _0xb7a2=function(_0x2b10c6,_0x185590){_0x2b10c6=_0x2b10c6-0x0;var _0x3789d2=_0x7a2b[_0x2b10c6];return _0x3789d2;};'use strict';var _=require(_0xb7a2('0x0'));var util=require(_0xb7a2('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xb7a2('0x2'));var fs=require('fs');var path=require('path');var rimraf=require(_0xb7a2('0x3'));var config=require(_0xb7a2('0x4'));var attributes=require(_0xb7a2('0x5'));module[_0xb7a2('0x6')]=function(_0x2cdf6d,_0x1d5fd0){return _0x2cdf6d[_0xb7a2('0x7')](_0xb7a2('0x8'),attributes,{'tableName':_0xb7a2('0x9'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x0f3e=['../../config/environment','exports','define','FaxTransferReport','report_fax_transfer','uniqueid','lodash','../../config/logger','api','bluebird','request-promise','rimraf'];(function(_0x343ebb,_0x1f46b9){var _0x58cf20=function(_0x4e070d){while(--_0x4e070d){_0x343ebb['push'](_0x343ebb['shift']());}};_0x58cf20(++_0x1f46b9);}(_0x0f3e,0x1e6));var _0xe0f3=function(_0x3c169a,_0x321e59){_0x3c169a=_0x3c169a-0x0;var _0x57394e=_0x0f3e[_0x3c169a];return _0x57394e;};'use strict';var _=require(_0xe0f3('0x0'));var util=require('util');var logger=require(_0xe0f3('0x1'))(_0xe0f3('0x2'));var moment=require('moment');var BPromise=require(_0xe0f3('0x3'));var rp=require(_0xe0f3('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe0f3('0x5'));var config=require(_0xe0f3('0x6'));var attributes=require('./faxTransferReport.attributes');module[_0xe0f3('0x7')]=function(_0x4422ae,_0x3d98df){return _0x4422ae[_0xe0f3('0x8')](_0xe0f3('0x9'),attributes,{'tableName':_0xe0f3('0xa'),'paranoid':![],'indexes':[{'name':_0xe0f3('0xb'),'fields':[_0xe0f3('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
index 8c65e4a..78d842a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xce2d=['jayson/promise','client','http','request','then','info','FaxTransferReport,\x20%s,\x20%s','request\x20sent','FaxTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x1c5e6d,_0x4044a7){var _0x370758=function(_0x3f28e8){while(--_0x3f28e8){_0x1c5e6d['push'](_0x1c5e6d['shift']());}};_0x370758(++_0x4044a7);}(_0xce2d,0x19f));var _0xdce2=function(_0xe2b0bb,_0x1e6266){_0xe2b0bb=_0xe2b0bb-0x0;var _0x25ea3d=_0xce2d[_0xe2b0bb];return _0x25ea3d;};'use strict';var _=require(_0xdce2('0x0'));var util=require(_0xdce2('0x1'));var moment=require(_0xdce2('0x2'));var BPromise=require(_0xdce2('0x3'));var rs=require(_0xdce2('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xdce2('0x5'))['db'];var utils=require(_0xdce2('0x6'));var logger=require(_0xdce2('0x7'))(_0xdce2('0x8'));var config=require(_0xdce2('0x9'));var jayson=require(_0xdce2('0xa'));var client=jayson[_0xdce2('0xb')][_0xdce2('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x20b324,_0x599c0d,_0x70c862){return new BPromise(function(_0x93a10b,_0x493919){return client[_0xdce2('0xd')](_0x20b324,_0x70c862)[_0xdce2('0xe')](function(_0x38bad8){logger[_0xdce2('0xf')](_0xdce2('0x10'),_0x599c0d,_0xdce2('0x11'));logger['debug'](_0xdce2('0x12'),_0x599c0d,'request\x20sent',JSON[_0xdce2('0x13')](_0x38bad8));if(_0x38bad8[_0xdce2('0x14')]){if(_0x38bad8[_0xdce2('0x14')][_0xdce2('0x15')]===0x1f4){logger[_0xdce2('0x14')](_0xdce2('0x10'),_0x599c0d,_0x38bad8[_0xdce2('0x14')]['message']);return _0x493919(_0x38bad8[_0xdce2('0x14')][_0xdce2('0x16')]);}logger[_0xdce2('0x14')](_0xdce2('0x10'),_0x599c0d,_0x38bad8[_0xdce2('0x14')][_0xdce2('0x16')]);return _0x93a10b(_0x38bad8['error']['message']);}else{logger[_0xdce2('0xf')](_0xdce2('0x10'),_0x599c0d,_0xdce2('0x11'));_0x93a10b(_0x38bad8[_0xdce2('0x17')]['message']);}})[_0xdce2('0x18')](function(_0x5aa817){logger[_0xdce2('0x14')](_0xdce2('0x10'),_0x599c0d,_0x5aa817);_0x493919(_0x5aa817);});});}
\ No newline at end of file
+var _0x4b89=['rpc','../../config/environment','jayson/promise','client','http','request','then','info','FaxTransferReport,\x20%s,\x20%s','request\x20sent','debug','FaxTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x28f41f,_0x55b21c){var _0x54056f=function(_0x544948){while(--_0x544948){_0x28f41f['push'](_0x28f41f['shift']());}};_0x54056f(++_0x55b21c);}(_0x4b89,0xad));var _0x94b8=function(_0x26c10f,_0x5411be){_0x26c10f=_0x26c10f-0x0;var _0x17e0b8=_0x4b89[_0x26c10f];return _0x17e0b8;};'use strict';var _=require(_0x94b8('0x0'));var util=require(_0x94b8('0x1'));var moment=require(_0x94b8('0x2'));var BPromise=require(_0x94b8('0x3'));var rs=require(_0x94b8('0x4'));var fs=require('fs');var Redis=require(_0x94b8('0x5'));var db=require(_0x94b8('0x6'))['db'];var utils=require(_0x94b8('0x7'));var logger=require(_0x94b8('0x8'))(_0x94b8('0x9'));var config=require(_0x94b8('0xa'));var jayson=require(_0x94b8('0xb'));var client=jayson[_0x94b8('0xc')][_0x94b8('0xd')]({'port':0x232a});function respondWithRpcPromise(_0xedbf41,_0x4e0b40,_0x2f1d41){return new BPromise(function(_0x51a765,_0x3e9d3f){return client[_0x94b8('0xe')](_0xedbf41,_0x2f1d41)[_0x94b8('0xf')](function(_0x5e3ece){logger[_0x94b8('0x10')](_0x94b8('0x11'),_0x4e0b40,_0x94b8('0x12'));logger[_0x94b8('0x13')](_0x94b8('0x14'),_0x4e0b40,_0x94b8('0x12'),JSON[_0x94b8('0x15')](_0x5e3ece));if(_0x5e3ece[_0x94b8('0x16')]){if(_0x5e3ece[_0x94b8('0x16')][_0x94b8('0x17')]===0x1f4){logger[_0x94b8('0x16')](_0x94b8('0x11'),_0x4e0b40,_0x5e3ece[_0x94b8('0x16')][_0x94b8('0x18')]);return _0x3e9d3f(_0x5e3ece['error'][_0x94b8('0x18')]);}logger[_0x94b8('0x16')](_0x94b8('0x11'),_0x4e0b40,_0x5e3ece[_0x94b8('0x16')][_0x94b8('0x18')]);return _0x51a765(_0x5e3ece[_0x94b8('0x16')][_0x94b8('0x18')]);}else{logger[_0x94b8('0x10')]('FaxTransferReport,\x20%s,\x20%s',_0x4e0b40,_0x94b8('0x12'));_0x51a765(_0x5e3ece['result'][_0x94b8('0x18')]);}})[_0x94b8('0x19')](function(_0x10c32f){logger[_0x94b8('0x16')]('FaxTransferReport,\x20%s,\x20%s',_0x4e0b40,_0x10c32f);_0x3e9d3f(_0x10c32f);});});}
\ No newline at end of file
index a7c81a3..6d2cd7c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5026=['/describe','describe','show','post','put','update','delete','/:id','destroy','exports','multer','util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxTransferReport.controller','get','isAuthenticated'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5026,0xdc));var _0x6502=function(_0x2e20b6,_0x370595){_0x2e20b6=_0x2e20b6-0x0;var _0x876b19=_0x5026[_0x2e20b6];return _0x876b19;};'use strict';var multer=require(_0x6502('0x0'));var util=require(_0x6502('0x1'));var path=require(_0x6502('0x2'));var timeout=require(_0x6502('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x6502('0x4'));var auth=require(_0x6502('0x5'));var interaction=require(_0x6502('0x6'));var config=require(_0x6502('0x7'));var controller=require(_0x6502('0x8'));router[_0x6502('0x9')]('/',auth[_0x6502('0xa')](),controller['index']);router[_0x6502('0x9')](_0x6502('0xb'),auth['isAuthenticated'](),controller[_0x6502('0xc')]);router[_0x6502('0x9')]('/:id',auth[_0x6502('0xa')](),controller[_0x6502('0xd')]);router[_0x6502('0xe')]('/',auth['isAuthenticated'](),controller['create']);router[_0x6502('0xf')]('/:id',auth[_0x6502('0xa')](),controller[_0x6502('0x10')]);router[_0x6502('0x11')](_0x6502('0x12'),auth[_0x6502('0xa')](),controller[_0x6502('0x13')]);module[_0x6502('0x14')]=router;
\ No newline at end of file
+var _0x66ae=['post','create','put','update','delete','destroy','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./faxTransferReport.controller','get','isAuthenticated','/describe','describe','show'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x66ae,0xae));var _0xe66a=function(_0x320869,_0x248a04){_0x320869=_0x320869-0x0;var _0x53a243=_0x66ae[_0x320869];return _0x53a243;};'use strict';var multer=require(_0xe66a('0x0'));var util=require(_0xe66a('0x1'));var path=require(_0xe66a('0x2'));var timeout=require('connect-timeout');var express=require(_0xe66a('0x3'));var router=express[_0xe66a('0x4')]();var fs_extra=require(_0xe66a('0x5'));var auth=require(_0xe66a('0x6'));var interaction=require(_0xe66a('0x7'));var config=require(_0xe66a('0x8'));var controller=require(_0xe66a('0x9'));router[_0xe66a('0xa')]('/',auth[_0xe66a('0xb')](),controller['index']);router[_0xe66a('0xa')](_0xe66a('0xc'),auth[_0xe66a('0xb')](),controller[_0xe66a('0xd')]);router[_0xe66a('0xa')]('/:id',auth[_0xe66a('0xb')](),controller[_0xe66a('0xe')]);router[_0xe66a('0xf')]('/',auth[_0xe66a('0xb')](),controller[_0xe66a('0x10')]);router[_0xe66a('0x11')]('/:id',auth[_0xe66a('0xb')](),controller[_0xe66a('0x12')]);router[_0xe66a('0x13')]('/:id',auth[_0xe66a('0xb')](),controller[_0xe66a('0x14')]);module['exports']=router;
\ No newline at end of file
index 841effd..e35033e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x56ee=['get','isAuthenticated','index','/:id','show','/:id/configurations','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','put','update','delete','destroy','multer','util','path','connect-timeout','Router','fs-extra','../../components/interaction/service','../../config/environment','./intDeskAccount.controller'];(function(_0x75f869,_0x3690d6){var _0x10af8b=function(_0x22d3ff){while(--_0x22d3ff){_0x75f869['push'](_0x75f869['shift']());}};_0x10af8b(++_0x3690d6);}(_0x56ee,0x1d2));var _0xe56e=function(_0x3457b4,_0x4cd8f9){_0x3457b4=_0x3457b4-0x0;var _0xaa8fa9=_0x56ee[_0x3457b4];return _0xaa8fa9;};'use strict';var multer=require(_0xe56e('0x0'));var util=require(_0xe56e('0x1'));var path=require(_0xe56e('0x2'));var timeout=require(_0xe56e('0x3'));var express=require('express');var router=express[_0xe56e('0x4')]();var fs_extra=require(_0xe56e('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xe56e('0x6'));var config=require(_0xe56e('0x7'));var controller=require(_0xe56e('0x8'));router[_0xe56e('0x9')]('/',auth[_0xe56e('0xa')](),controller[_0xe56e('0xb')]);router[_0xe56e('0x9')](_0xe56e('0xc'),auth[_0xe56e('0xa')](),controller[_0xe56e('0xd')]);router[_0xe56e('0x9')](_0xe56e('0xe'),auth[_0xe56e('0xa')](),controller[_0xe56e('0xf')]);router[_0xe56e('0x9')](_0xe56e('0x10'),auth[_0xe56e('0xa')](),controller[_0xe56e('0x11')]);router[_0xe56e('0x12')]('/',auth[_0xe56e('0xa')](),controller[_0xe56e('0x13')]);router[_0xe56e('0x12')](_0xe56e('0xe'),auth[_0xe56e('0xa')](),controller[_0xe56e('0x14')]);router[_0xe56e('0x15')](_0xe56e('0xc'),auth['isAuthenticated'](),controller[_0xe56e('0x16')]);router[_0xe56e('0x17')](_0xe56e('0xc'),auth[_0xe56e('0xa')](),controller[_0xe56e('0x18')]);module['exports']=router;
\ No newline at end of file
+var _0xf8fb=['../../config/environment','./intDeskAccount.controller','get','isAuthenticated','/:id','show','/:id/configurations','getFields','addConfiguration','put','update','delete','destroy','exports','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x4a6f42,_0x48006b){var _0xfd7f0b=function(_0x3b82b4){while(--_0x3b82b4){_0x4a6f42['push'](_0x4a6f42['shift']());}};_0xfd7f0b(++_0x48006b);}(_0xf8fb,0xf5));var _0xbf8f=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0xf8fb[_0x3ab51d];return _0x29a04e;};'use strict';var multer=require(_0xbf8f('0x0'));var util=require(_0xbf8f('0x1'));var path=require('path');var timeout=require(_0xbf8f('0x2'));var express=require(_0xbf8f('0x3'));var router=express[_0xbf8f('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xbf8f('0x5'));var interaction=require(_0xbf8f('0x6'));var config=require(_0xbf8f('0x7'));var controller=require(_0xbf8f('0x8'));router[_0xbf8f('0x9')]('/',auth[_0xbf8f('0xa')](),controller['index']);router[_0xbf8f('0x9')](_0xbf8f('0xb'),auth[_0xbf8f('0xa')](),controller[_0xbf8f('0xc')]);router['get'](_0xbf8f('0xd'),auth[_0xbf8f('0xa')](),controller['getConfigurations']);router[_0xbf8f('0x9')]('/:id/fields',auth[_0xbf8f('0xa')](),controller[_0xbf8f('0xe')]);router['post']('/',auth[_0xbf8f('0xa')](),controller['create']);router['post'](_0xbf8f('0xd'),auth[_0xbf8f('0xa')](),controller[_0xbf8f('0xf')]);router[_0xbf8f('0x10')]('/:id',auth['isAuthenticated'](),controller[_0xbf8f('0x11')]);router[_0xbf8f('0x12')](_0xbf8f('0xb'),auth[_0xbf8f('0xa')](),controller[_0xbf8f('0x13')]);module[_0xbf8f('0x14')]=router;
\ No newline at end of file
index fe3e7dd..5e59b55 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4299=['integrationTab','sequelize','exports','STRING','basic'];(function(_0x330513,_0x596cc2){var _0x3fca6e=function(_0x22e58a){while(--_0x22e58a){_0x330513['push'](_0x330513['shift']());}};_0x3fca6e(++_0x596cc2);}(_0x4299,0x169));var _0x9429=function(_0x452f55,_0x2b6e72){_0x452f55=_0x452f55-0x0;var _0x253456=_0x4299[_0x452f55];return _0x253456;};'use strict';var Sequelize=require(_0x9429('0x0'));module[_0x9429('0x1')]={'name':{'type':Sequelize[_0x9429('0x2')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0x9429('0x2')]},'remoteUri':{'type':Sequelize[_0x9429('0x2')]},'authType':{'type':Sequelize['ENUM'](_0x9429('0x3')),'defaultValue':_0x9429('0x3')},'password':{'type':Sequelize[_0x9429('0x2')]},'consumerKey':{'type':Sequelize[_0x9429('0x2')]},'consumerSecret':{'type':Sequelize[_0x9429('0x2')]},'token':{'type':Sequelize[_0x9429('0x2')]},'tokenSecret':{'type':Sequelize[_0x9429('0x2')]},'serverUrl':{'type':Sequelize[_0x9429('0x2')],'allowNull':![]},'type':{'type':Sequelize['ENUM']('integrationTab','newTab'),'defaultValue':_0x9429('0x4')}};
\ No newline at end of file
+var _0x1c2f=['ENUM','basic','integrationTab','sequelize','exports','STRING'];(function(_0x26dd96,_0x1e70a6){var _0x1aa18f=function(_0x1e846){while(--_0x1e846){_0x26dd96['push'](_0x26dd96['shift']());}};_0x1aa18f(++_0x1e70a6);}(_0x1c2f,0x15f));var _0xf1c2=function(_0x412aaa,_0x5376a3){_0x412aaa=_0x412aaa-0x0;var _0x3f1850=_0x1c2f[_0x412aaa];return _0x3f1850;};'use strict';var Sequelize=require(_0xf1c2('0x0'));module[_0xf1c2('0x1')]={'name':{'type':Sequelize[_0xf1c2('0x2')]},'description':{'type':Sequelize[_0xf1c2('0x2')]},'username':{'type':Sequelize[_0xf1c2('0x2')]},'remoteUri':{'type':Sequelize[_0xf1c2('0x2')]},'authType':{'type':Sequelize[_0xf1c2('0x3')](_0xf1c2('0x4')),'defaultValue':'basic'},'password':{'type':Sequelize['STRING']},'consumerKey':{'type':Sequelize[_0xf1c2('0x2')]},'consumerSecret':{'type':Sequelize[_0xf1c2('0x2')]},'token':{'type':Sequelize[_0xf1c2('0x2')]},'tokenSecret':{'type':Sequelize['STRING']},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0xf1c2('0x3')](_0xf1c2('0x5'),'newTab'),'defaultValue':'integrationTab'}};
\ No newline at end of file
index fca51d1..660e404 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9385=['rows','catch','params','include','create','body','find','destroy','getConfigurations','findOne','pick','Subjects','channel','Descriptions','getDescriptions','DeskConfiguration','DeskField','getFields','priority','remoteUri','authType','username','consumerKey','token','tokenSecret','slice','substring','lastIndexOf','format','%s/custom_fields','application/json','basic','headers','Basic\x20%s','password','toString','base64','concat','_embedded','entries','active','label','test','getFields,\x20%s,\x20%s,\x20%s','stringify','Wrong\x20credentials','eml-format','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','../../components/integrations/configuration','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','reject','update','then','error','name','send','index','map','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','filter','where','merge','type','VIRTUAL','options','DeskAccount','includeAll','findAll'];(function(_0x1caf6a,_0x26a5bf){var _0x1bf493=function(_0x3982f5){while(--_0x3982f5){_0x1caf6a['push'](_0x1caf6a['shift']());}};_0x1bf493(++_0x26a5bf);}(_0x9385,0x175));var _0x5938=function(_0x2850c0,_0x1363a7){_0x2850c0=_0x2850c0-0x0;var _0x21e830=_0x9385[_0x2850c0];return _0x21e830;};'use strict';var emlformat=require(_0x5938('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x5938('0x1'));var moment=require(_0x5938('0x2'));var BPromise=require(_0x5938('0x3'));var Mustache=require(_0x5938('0x4'));var util=require(_0x5938('0x5'));var path=require(_0x5938('0x6'));var sox=require('sox');var csv=require(_0x5938('0x7'));var ejs=require(_0x5938('0x8'));var fs=require('fs');var fs_extra=require(_0x5938('0x9'));var _=require('lodash');var squel=require(_0x5938('0xa'));var crypto=require(_0x5938('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x5938('0xc'));var toCsv=require('to-csv');var querystring=require(_0x5938('0xd'));var Papa=require('papaparse');var Redis=require(_0x5938('0xe'));var authService=require(_0x5938('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x5938('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x5938('0x11'))(_0x5938('0x12'));var utils=require(_0x5938('0x13'));var config=require(_0x5938('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0x5938('0x15'))['db'];var integrations=require(_0x5938('0x16'));function respondWithStatusCode(_0x8afd00,_0x280722){_0x280722=_0x280722||0xcc;return function(_0x211f97){if(_0x211f97){return _0x8afd00[_0x5938('0x17')](_0x280722);}return _0x8afd00[_0x5938('0x18')](_0x280722)[_0x5938('0x19')]();};}function respondWithResult(_0x10c143,_0x2ab0de){_0x2ab0de=_0x2ab0de||0xc8;return function(_0x14a6e2){if(_0x14a6e2){return _0x10c143[_0x5938('0x18')](_0x2ab0de)[_0x5938('0x1a')](_0x14a6e2);}};}function respondWithFilteredResult(_0x565203,_0x447c41){return function(_0x27c7a2){if(_0x27c7a2){var _0x45a9b4=typeof _0x447c41[_0x5938('0x1b')]===_0x5938('0x1c')&&typeof _0x447c41[_0x5938('0x1d')]===_0x5938('0x1c');var _0x5c46d8=_0x27c7a2[_0x5938('0x1e')];var _0x234d50=_0x45a9b4?0x0:_0x447c41['offset'];var _0x3d1949=_0x45a9b4?_0x27c7a2[_0x5938('0x1e')]:_0x447c41[_0x5938('0x1b')]+_0x447c41['limit'];var _0x1b45c4;if(_0x3d1949>=_0x5c46d8){_0x3d1949=_0x5c46d8;_0x1b45c4=0xc8;}else{_0x1b45c4=0xce;}_0x565203[_0x5938('0x18')](_0x1b45c4);return _0x565203['set'](_0x5938('0x1f'),_0x234d50+'-'+_0x3d1949+'/'+_0x5c46d8)['json'](_0x27c7a2);}return null;};}function patchUpdates(_0x2c9680){return function(_0x125874){try{jsonpatch['apply'](_0x125874,_0x2c9680,!![]);}catch(_0x341669){return BPromise[_0x5938('0x20')](_0x341669);}return _0x125874['save']();};}function saveUpdates(_0x3471d3,_0x11d31d){return function(_0x30d101){if(_0x30d101){return _0x30d101[_0x5938('0x21')](_0x3471d3)['then'](function(_0x320952){return _0x320952;});}return null;};}function removeEntity(_0x13cd0d,_0x596fab){return function(_0xc6d9f5){if(_0xc6d9f5){return _0xc6d9f5['destroy']()[_0x5938('0x22')](function(){_0x13cd0d['status'](0xcc)[_0x5938('0x19')]();});}};}function handleEntityNotFound(_0x354b05,_0x247a12){return function(_0x1ff87e){if(!_0x1ff87e){_0x354b05[_0x5938('0x17')](0x194);}return _0x1ff87e;};}function handleError(_0x1399dc,_0x521679){_0x521679=_0x521679||0x1f4;return function(_0x47e952){logger[_0x5938('0x23')](_0x47e952['stack']);if(_0x47e952['name']){delete _0x47e952[_0x5938('0x24')];}_0x1399dc[_0x5938('0x18')](_0x521679)[_0x5938('0x25')](_0x47e952);};}exports[_0x5938('0x26')]=function(_0x1355b3,_0x8a028d){var _0x5b5df2={},_0x12e7de={},_0xfde067={'count':0x0,'rows':[]};var _0x2327aa=_[_0x5938('0x27')](db['DeskAccount'][_0x5938('0x28')],function(_0x14da8f){return{'name':_0x14da8f[_0x5938('0x29')],'type':_0x14da8f['type'][_0x5938('0x2a')]};});_0x12e7de[_0x5938('0x2b')]=_[_0x5938('0x27')](_0x2327aa,_0x5938('0x24'));_0x12e7de[_0x5938('0x2c')]=_[_0x5938('0x2d')](_0x1355b3[_0x5938('0x2c')]);_0x12e7de[_0x5938('0x2e')]=_[_0x5938('0x2f')](_0x12e7de[_0x5938('0x2b')],_0x12e7de[_0x5938('0x2c')]);_0x5b5df2[_0x5938('0x30')]=_['intersection'](_0x12e7de[_0x5938('0x2b')],qs[_0x5938('0x31')](_0x1355b3['query'][_0x5938('0x31')]));_0x5b5df2['attributes']=_0x5b5df2[_0x5938('0x30')][_0x5938('0x32')]?_0x5b5df2[_0x5938('0x30')]:_0x12e7de[_0x5938('0x2b')];if(!_0x1355b3[_0x5938('0x2c')][_0x5938('0x33')](_0x5938('0x34'))){_0x5b5df2[_0x5938('0x1d')]=qs[_0x5938('0x1d')](_0x1355b3[_0x5938('0x2c')][_0x5938('0x1d')]);_0x5b5df2[_0x5938('0x1b')]=qs[_0x5938('0x1b')](_0x1355b3[_0x5938('0x2c')][_0x5938('0x1b')]);}_0x5b5df2['order']=qs[_0x5938('0x35')](_0x1355b3[_0x5938('0x2c')][_0x5938('0x35')]);_0x5b5df2['where']=qs['filters'](_['pick'](_0x1355b3[_0x5938('0x2c')],_0x12e7de[_0x5938('0x2e')]),_0x2327aa);if(_0x1355b3[_0x5938('0x2c')][_0x5938('0x36')]){_0x5b5df2[_0x5938('0x37')]=_[_0x5938('0x38')](_0x5b5df2[_0x5938('0x37')],{'$or':_[_0x5938('0x27')](_0x2327aa,function(_0x109780){if(_0x109780[_0x5938('0x39')]!==_0x5938('0x3a')){var _0x38587d={};_0x38587d[_0x109780[_0x5938('0x24')]]={'$like':'%'+_0x1355b3['query']['filter']+'%'};return _0x38587d;}})});}_0x5b5df2=_['merge']({},_0x5b5df2,_0x1355b3[_0x5938('0x3b')]);var _0x11e0f3={'where':_0x5b5df2[_0x5938('0x37')]};return db[_0x5938('0x3c')][_0x5938('0x1e')](_0x11e0f3)['then'](function(_0x456c8c){_0xfde067[_0x5938('0x1e')]=_0x456c8c;if(_0x1355b3[_0x5938('0x2c')][_0x5938('0x3d')]){_0x5b5df2['include']=[{'all':!![]}];}return db[_0x5938('0x3c')][_0x5938('0x3e')](_0x5b5df2);})[_0x5938('0x22')](function(_0x1f25d0){_0xfde067[_0x5938('0x3f')]=_0x1f25d0;return _0xfde067;})['then'](respondWithFilteredResult(_0x8a028d,_0x5b5df2))[_0x5938('0x40')](handleError(_0x8a028d,null));};exports['show']=function(_0x2e830c,_0x3ba0f1){var _0x4969a5={'raw':![],'where':{'id':_0x2e830c[_0x5938('0x41')]['id']}},_0x373518={};_0x373518['model']=_[_0x5938('0x2d')](db[_0x5938('0x3c')][_0x5938('0x28')]);_0x373518[_0x5938('0x2c')]=_['keys'](_0x2e830c['query']);_0x373518[_0x5938('0x2e')]=_[_0x5938('0x2f')](_0x373518[_0x5938('0x2b')],_0x373518['query']);_0x4969a5['attributes']=_['intersection'](_0x373518[_0x5938('0x2b')],qs[_0x5938('0x31')](_0x2e830c[_0x5938('0x2c')]['fields']));_0x4969a5['attributes']=_0x4969a5[_0x5938('0x30')][_0x5938('0x32')]?_0x4969a5[_0x5938('0x30')]:_0x373518[_0x5938('0x2b')];if(_0x2e830c[_0x5938('0x2c')]['includeAll']){_0x4969a5[_0x5938('0x42')]=[{'all':!![]}];}_0x4969a5=_[_0x5938('0x38')]({},_0x4969a5,_0x2e830c[_0x5938('0x3b')]);return db[_0x5938('0x3c')]['find'](_0x4969a5)[_0x5938('0x22')](handleEntityNotFound(_0x3ba0f1,null))[_0x5938('0x22')](respondWithResult(_0x3ba0f1,null))[_0x5938('0x40')](handleError(_0x3ba0f1,null));};exports[_0x5938('0x43')]=function(_0x2492ab,_0x21f4e2){return db[_0x5938('0x3c')][_0x5938('0x43')](_0x2492ab['body'],{})[_0x5938('0x22')](respondWithResult(_0x21f4e2,0xc9))[_0x5938('0x40')](handleError(_0x21f4e2,null));};exports[_0x5938('0x21')]=function(_0xf344c,_0xf9fb05){if(_0xf344c[_0x5938('0x44')]['id']){delete _0xf344c[_0x5938('0x44')]['id'];}return db[_0x5938('0x3c')][_0x5938('0x45')]({'where':{'id':_0xf344c[_0x5938('0x41')]['id']}})[_0x5938('0x22')](handleEntityNotFound(_0xf9fb05,null))['then'](saveUpdates(_0xf344c[_0x5938('0x44')],null))[_0x5938('0x22')](respondWithResult(_0xf9fb05,null))[_0x5938('0x40')](handleError(_0xf9fb05,null));};exports[_0x5938('0x46')]=function(_0x53c49d,_0x9d0cf3){return db[_0x5938('0x3c')][_0x5938('0x45')]({'where':{'id':_0x53c49d['params']['id']}})[_0x5938('0x22')](handleEntityNotFound(_0x9d0cf3,null))[_0x5938('0x22')](removeEntity(_0x9d0cf3,null))[_0x5938('0x40')](handleError(_0x9d0cf3,null));};exports[_0x5938('0x47')]=function(_0x1eb614,_0x46f788,_0x440f43){var _0x24203a={};var _0x145a77={};var _0x25af82;var _0x2ab12b;return db[_0x5938('0x3c')][_0x5938('0x48')]({'where':{'id':_0x1eb614[_0x5938('0x41')]['id']}})[_0x5938('0x22')](handleEntityNotFound(_0x46f788,null))['then'](function(_0x436b39){if(_0x436b39){_0x25af82=_0x436b39;_0x145a77[_0x5938('0x2b')]=_[_0x5938('0x2d')](db['DeskConfiguration'][_0x5938('0x28')]);_0x145a77[_0x5938('0x2c')]=_['keys'](_0x1eb614[_0x5938('0x2c')]);_0x145a77['filters']=_['intersection'](_0x145a77[_0x5938('0x2b')],_0x145a77[_0x5938('0x2c')]);_0x24203a['attributes']=_[_0x5938('0x2f')](_0x145a77['model'],qs[_0x5938('0x31')](_0x1eb614[_0x5938('0x2c')]['fields']));_0x24203a[_0x5938('0x30')]=_0x24203a[_0x5938('0x30')][_0x5938('0x32')]?_0x24203a[_0x5938('0x30')]:_0x145a77[_0x5938('0x2b')];_0x24203a['order']=qs[_0x5938('0x35')](_0x1eb614[_0x5938('0x2c')][_0x5938('0x35')]);_0x24203a[_0x5938('0x37')]=qs[_0x5938('0x2e')](_[_0x5938('0x49')](_0x1eb614['query'],_0x145a77['filters']));if(_0x1eb614[_0x5938('0x2c')][_0x5938('0x36')]){_0x24203a[_0x5938('0x37')]=_[_0x5938('0x38')](_0x24203a[_0x5938('0x37')],{'$or':_[_0x5938('0x27')](_0x24203a[_0x5938('0x30')],function(_0x5f28b3){var _0x5cf968={};_0x5cf968[_0x5f28b3]={'$like':'%'+_0x1eb614[_0x5938('0x2c')][_0x5938('0x36')]+'%'};return _0x5cf968;})});}_0x24203a=_[_0x5938('0x38')]({},_0x24203a,_0x1eb614[_0x5938('0x3b')]);return _0x25af82[_0x5938('0x47')](_0x24203a);}})[_0x5938('0x22')](function(_0x53db58){if(_0x53db58){_0x2ab12b=_0x53db58[_0x5938('0x32')];if(!_0x1eb614[_0x5938('0x2c')][_0x5938('0x33')](_0x5938('0x34'))){_0x24203a[_0x5938('0x1d')]=qs[_0x5938('0x1d')](_0x1eb614[_0x5938('0x2c')][_0x5938('0x1d')]);_0x24203a['offset']=qs[_0x5938('0x1b')](_0x1eb614[_0x5938('0x2c')][_0x5938('0x1b')]);}return _0x25af82[_0x5938('0x47')](_0x24203a);}})['then'](function(_0x20f68d){if(_0x20f68d){return _0x20f68d?{'count':_0x2ab12b,'rows':_0x20f68d}:null;}})[_0x5938('0x22')](respondWithResult(_0x46f788,null))['catch'](handleError(_0x46f788,null));};exports['addConfiguration']=function(_0x62be96,_0x4ffa88,_0x5610f6){if(_0x62be96[_0x5938('0x44')]['id']){delete _0x62be96[_0x5938('0x44')]['id'];}return db[_0x5938('0x3c')][_0x5938('0x48')]({'where':{'id':_0x62be96[_0x5938('0x41')]['id']}})['then'](handleEntityNotFound(_0x4ffa88,null))[_0x5938('0x22')](function(_0x88cfbd){if(_0x88cfbd){_0x62be96[_0x5938('0x44')]['AccountId']=_0x88cfbd['id'];_0x62be96['body'][_0x5938('0x4a')]=integrations['getSubjects'](_0x62be96[_0x5938('0x44')][_0x5938('0x4b')],_0x62be96[_0x5938('0x44')][_0x5938('0x39')]);_0x62be96['body'][_0x5938('0x4c')]=integrations[_0x5938('0x4d')](_0x62be96[_0x5938('0x44')][_0x5938('0x4b')],_0x62be96[_0x5938('0x44')][_0x5938('0x39')]);return db[_0x5938('0x4e')][_0x5938('0x43')](_0x62be96[_0x5938('0x44')],{'include':[{'model':db[_0x5938('0x4f')],'as':_0x5938('0x4a')},{'model':db[_0x5938('0x4f')],'as':_0x5938('0x4c')}]});}return null;})[_0x5938('0x22')](respondWithResult(_0x4ffa88,null))[_0x5938('0x40')](handleError(_0x4ffa88,null));};exports[_0x5938('0x50')]=function(_0x3814cf,_0x22ec3f,_0x5144e2){var _0x32daba=[{'name':_0x5938('0x51'),'label':_0x5938('0x51'),'custom':![],'options':[{'name':0x1,'value':0x1},{'name':0x2,'value':0x2},{'name':0x3,'value':0x3},{'name':0x4,'value':0x4},{'name':0x5,'value':0x5},{'name':0x6,'value':0x6},{'name':0x7,'value':0x7},{'name':0x8,'value':0x8},{'name':0x9,'value':0x9},{'name':0xa,'value':0xa}]}];var _0x4bef93='';return db[_0x5938('0x3c')]['findOne']({'where':{'id':_0x3814cf[_0x5938('0x41')]['id']},'attributes':['id',_0x5938('0x52'),_0x5938('0x53'),_0x5938('0x54'),'password',_0x5938('0x55'),'consumerSecret',_0x5938('0x56'),_0x5938('0x57')]})[_0x5938('0x22')](handleEntityNotFound(_0x22ec3f,null))[_0x5938('0x22')](function(_0x29ba9c){if(_0x29ba9c){_0x4bef93=_0x29ba9c[_0x5938('0x52')];var _0x5cdd82=_0x4bef93[_0x5938('0x58')](-0x1);if(_0x5cdd82==='/'){_0x4bef93=_0x4bef93[_0x5938('0x59')](0x0,_0x4bef93[_0x5938('0x5a')](_0x5cdd82));}var _0x4456f7={'method':'GET','uri':util[_0x5938('0x5b')](_0x5938('0x5c'),_0x4bef93),'headers':{'Content-Type':_0x5938('0x5d'),'Accept':_0x5938('0x5d')},'json':!![]};if(_0x29ba9c[_0x5938('0x53')]===_0x5938('0x5e')){_0x4456f7[_0x5938('0x5f')]['Authorization']=util[_0x5938('0x5b')](_0x5938('0x60'),new Buffer(util[_0x5938('0x5b')]('%s:%s',_0x29ba9c[_0x5938('0x54')],_0x29ba9c[_0x5938('0x61')]))[_0x5938('0x62')](_0x5938('0x63')));}return rp(_0x4456f7)[_0x5938('0x22')](function(_0x1f4b3b){return _0x32daba[_0x5938('0x64')](_[_0x5938('0x27')](_0x1f4b3b[_0x5938('0x65')][_0x5938('0x66')],function(_0x23b037){return{'id':_0x23b037[_0x5938('0x24')],'name':_0x23b037[_0x5938('0x24')],'type':_0x23b037['type'],'active':_0x23b037[_0x5938('0x67')],'label':_0x23b037[_0x5938('0x68')],'custom':!![]};}));});}})[_0x5938('0x22')](function(_0x48a4d4){return{'count':_0x48a4d4[_0x5938('0x32')],'rows':_0x48a4d4};})[_0x5938('0x22')](respondWithResult(_0x22ec3f,null))[_0x5938('0x40')](function(_0xa057d1){var _0x2ef82d=_0x3814cf[_0x5938('0x2c')][_0x5938('0x69')]?0x1f4:_0xa057d1['statusCode']||0x1f4;logger[_0x5938('0x23')](_0x5938('0x6a'),_0x5938('0x50'),_0x2ef82d,JSON[_0x5938('0x6b')](_0xa057d1));delete _0xa057d1[_0x5938('0x24')];if(_0x2ef82d===0x191){_0x2ef82d=0x190;}_0x22ec3f[_0x5938('0x18')](_0x2ef82d)[_0x5938('0x25')](_0x3814cf[_0x5938('0x2c')][_0x5938('0x69')]?{'message':_0x5938('0x6c'),'statusCode':_0xa057d1['statusCode']}:_0xa057d1);});};
\ No newline at end of file
+var _0x4b95=['entries','active','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','send','Wrong\x20credentials','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','offset','count','set','Content-Range','apply','reject','then','destroy','error','stack','name','index','map','DeskAccount','key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','order','sort','where','pick','filter','merge','type','options','findAll','rows','show','params','keys','rawAttributes','includeAll','include','find','catch','create','body','update','getConfigurations','findOne','DeskConfiguration','nolimit','addConfiguration','AccountId','Subjects','getSubjects','Descriptions','getDescriptions','DeskField','getFields','priority','remoteUri','username','consumerKey','token','tokenSecret','slice','GET','application/json','authType','headers','Authorization','format','Basic\x20%s','%s:%s','base64','concat','_embedded'];(function(_0x451303,_0x2d1114){var _0x2087c4=function(_0x152f23){while(--_0x152f23){_0x451303['push'](_0x451303['shift']());}};_0x2087c4(++_0x2d1114);}(_0x4b95,0x15e));var _0x54b9=function(_0x30a334,_0x1dcfab){_0x30a334=_0x30a334-0x0;var _0xd36f52=_0x4b95[_0x30a334];return _0xd36f52;};'use strict';var emlformat=require(_0x54b9('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x54b9('0x1'));var jsonpatch=require(_0x54b9('0x2'));var rp=require(_0x54b9('0x3'));var moment=require(_0x54b9('0x4'));var BPromise=require(_0x54b9('0x5'));var Mustache=require('mustache');var util=require(_0x54b9('0x6'));var path=require('path');var sox=require(_0x54b9('0x7'));var csv=require(_0x54b9('0x8'));var ejs=require(_0x54b9('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x54b9('0xa'));var squel=require(_0x54b9('0xb'));var crypto=require(_0x54b9('0xc'));var jsforce=require(_0x54b9('0xd'));var deskjs=require(_0x54b9('0xe'));var toCsv=require(_0x54b9('0x8'));var querystring=require(_0x54b9('0xf'));var Papa=require(_0x54b9('0x10'));var Redis=require(_0x54b9('0x11'));var authService=require(_0x54b9('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x54b9('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x54b9('0x14'))(_0x54b9('0x15'));var utils=require(_0x54b9('0x16'));var config=require(_0x54b9('0x17'));var licenseUtil=require(_0x54b9('0x18'));var db=require(_0x54b9('0x19'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x13e493,_0x2203b7){_0x2203b7=_0x2203b7||0xcc;return function(_0x1bbaed){if(_0x1bbaed){return _0x13e493[_0x54b9('0x1a')](_0x2203b7);}return _0x13e493[_0x54b9('0x1b')](_0x2203b7)[_0x54b9('0x1c')]();};}function respondWithResult(_0x3830b3,_0x35af67){_0x35af67=_0x35af67||0xc8;return function(_0x35d3ed){if(_0x35d3ed){return _0x3830b3[_0x54b9('0x1b')](_0x35af67)[_0x54b9('0x1d')](_0x35d3ed);}};}function respondWithFilteredResult(_0x2a57c9,_0x34aaa9){return function(_0x3e083b){if(_0x3e083b){var _0xfd408e=typeof _0x34aaa9['offset']===_0x54b9('0x1e')&&typeof _0x34aaa9[_0x54b9('0x1f')]==='undefined';var _0x3f63ce=_0x3e083b['count'];var _0x39b58b=_0xfd408e?0x0:_0x34aaa9[_0x54b9('0x20')];var _0x339be4=_0xfd408e?_0x3e083b[_0x54b9('0x21')]:_0x34aaa9[_0x54b9('0x20')]+_0x34aaa9[_0x54b9('0x1f')];var _0x51a6b0;if(_0x339be4>=_0x3f63ce){_0x339be4=_0x3f63ce;_0x51a6b0=0xc8;}else{_0x51a6b0=0xce;}_0x2a57c9[_0x54b9('0x1b')](_0x51a6b0);return _0x2a57c9[_0x54b9('0x22')](_0x54b9('0x23'),_0x39b58b+'-'+_0x339be4+'/'+_0x3f63ce)[_0x54b9('0x1d')](_0x3e083b);}return null;};}function patchUpdates(_0x725050){return function(_0xffde41){try{jsonpatch[_0x54b9('0x24')](_0xffde41,_0x725050,!![]);}catch(_0x544ec9){return BPromise[_0x54b9('0x25')](_0x544ec9);}return _0xffde41['save']();};}function saveUpdates(_0x2900dc,_0x1b9ffb){return function(_0x45bf45){if(_0x45bf45){return _0x45bf45['update'](_0x2900dc)[_0x54b9('0x26')](function(_0x1803ff){return _0x1803ff;});}return null;};}function removeEntity(_0x13cc96,_0x2fe1b4){return function(_0x945a07){if(_0x945a07){return _0x945a07[_0x54b9('0x27')]()[_0x54b9('0x26')](function(){_0x13cc96[_0x54b9('0x1b')](0xcc)[_0x54b9('0x1c')]();});}};}function handleEntityNotFound(_0x3fde8a,_0x2ec10e){return function(_0x19a6c8){if(!_0x19a6c8){_0x3fde8a[_0x54b9('0x1a')](0x194);}return _0x19a6c8;};}function handleError(_0x5668c5,_0x7d5e0c){_0x7d5e0c=_0x7d5e0c||0x1f4;return function(_0x5d7093){logger[_0x54b9('0x28')](_0x5d7093[_0x54b9('0x29')]);if(_0x5d7093['name']){delete _0x5d7093[_0x54b9('0x2a')];}_0x5668c5['status'](_0x7d5e0c)['send'](_0x5d7093);};}exports[_0x54b9('0x2b')]=function(_0x150caa,_0x3053ca){var _0xf2c788={},_0x468600={},_0x56aa17={'count':0x0,'rows':[]};var _0x2d581d=_[_0x54b9('0x2c')](db[_0x54b9('0x2d')]['rawAttributes'],function(_0x5b8c29){return{'name':_0x5b8c29['fieldName'],'type':_0x5b8c29['type'][_0x54b9('0x2e')]};});_0x468600[_0x54b9('0x2f')]=_[_0x54b9('0x2c')](_0x2d581d,_0x54b9('0x2a'));_0x468600[_0x54b9('0x30')]=_['keys'](_0x150caa[_0x54b9('0x30')]);_0x468600[_0x54b9('0x31')]=_[_0x54b9('0x32')](_0x468600[_0x54b9('0x2f')],_0x468600[_0x54b9('0x30')]);_0xf2c788['attributes']=_['intersection'](_0x468600[_0x54b9('0x2f')],qs[_0x54b9('0x33')](_0x150caa['query'][_0x54b9('0x33')]));_0xf2c788[_0x54b9('0x34')]=_0xf2c788[_0x54b9('0x34')][_0x54b9('0x35')]?_0xf2c788['attributes']:_0x468600[_0x54b9('0x2f')];if(!_0x150caa[_0x54b9('0x30')][_0x54b9('0x36')]('nolimit')){_0xf2c788[_0x54b9('0x1f')]=qs[_0x54b9('0x1f')](_0x150caa['query'][_0x54b9('0x1f')]);_0xf2c788[_0x54b9('0x20')]=qs[_0x54b9('0x20')](_0x150caa[_0x54b9('0x30')][_0x54b9('0x20')]);}_0xf2c788[_0x54b9('0x37')]=qs[_0x54b9('0x38')](_0x150caa['query']['sort']);_0xf2c788[_0x54b9('0x39')]=qs[_0x54b9('0x31')](_[_0x54b9('0x3a')](_0x150caa[_0x54b9('0x30')],_0x468600['filters']),_0x2d581d);if(_0x150caa[_0x54b9('0x30')][_0x54b9('0x3b')]){_0xf2c788[_0x54b9('0x39')]=_[_0x54b9('0x3c')](_0xf2c788['where'],{'$or':_[_0x54b9('0x2c')](_0x2d581d,function(_0x3c5337){if(_0x3c5337[_0x54b9('0x3d')]!=='VIRTUAL'){var _0x22d883={};_0x22d883[_0x3c5337[_0x54b9('0x2a')]]={'$like':'%'+_0x150caa[_0x54b9('0x30')][_0x54b9('0x3b')]+'%'};return _0x22d883;}})});}_0xf2c788=_[_0x54b9('0x3c')]({},_0xf2c788,_0x150caa[_0x54b9('0x3e')]);var _0x459f1e={'where':_0xf2c788[_0x54b9('0x39')]};return db[_0x54b9('0x2d')][_0x54b9('0x21')](_0x459f1e)['then'](function(_0x155af5){_0x56aa17['count']=_0x155af5;if(_0x150caa['query']['includeAll']){_0xf2c788['include']=[{'all':!![]}];}return db[_0x54b9('0x2d')][_0x54b9('0x3f')](_0xf2c788);})[_0x54b9('0x26')](function(_0x39f705){_0x56aa17[_0x54b9('0x40')]=_0x39f705;return _0x56aa17;})[_0x54b9('0x26')](respondWithFilteredResult(_0x3053ca,_0xf2c788))['catch'](handleError(_0x3053ca,null));};exports[_0x54b9('0x41')]=function(_0x78ab5f,_0x128c60){var _0x20e301={'raw':![],'where':{'id':_0x78ab5f[_0x54b9('0x42')]['id']}},_0x29e8ab={};_0x29e8ab[_0x54b9('0x2f')]=_[_0x54b9('0x43')](db[_0x54b9('0x2d')][_0x54b9('0x44')]);_0x29e8ab[_0x54b9('0x30')]=_['keys'](_0x78ab5f[_0x54b9('0x30')]);_0x29e8ab['filters']=_['intersection'](_0x29e8ab['model'],_0x29e8ab[_0x54b9('0x30')]);_0x20e301[_0x54b9('0x34')]=_[_0x54b9('0x32')](_0x29e8ab[_0x54b9('0x2f')],qs[_0x54b9('0x33')](_0x78ab5f['query'][_0x54b9('0x33')]));_0x20e301[_0x54b9('0x34')]=_0x20e301['attributes'][_0x54b9('0x35')]?_0x20e301[_0x54b9('0x34')]:_0x29e8ab['model'];if(_0x78ab5f[_0x54b9('0x30')][_0x54b9('0x45')]){_0x20e301[_0x54b9('0x46')]=[{'all':!![]}];}_0x20e301=_['merge']({},_0x20e301,_0x78ab5f[_0x54b9('0x3e')]);return db[_0x54b9('0x2d')][_0x54b9('0x47')](_0x20e301)[_0x54b9('0x26')](handleEntityNotFound(_0x128c60,null))[_0x54b9('0x26')](respondWithResult(_0x128c60,null))[_0x54b9('0x48')](handleError(_0x128c60,null));};exports[_0x54b9('0x49')]=function(_0x37d326,_0x1a0226){return db[_0x54b9('0x2d')][_0x54b9('0x49')](_0x37d326[_0x54b9('0x4a')],{})[_0x54b9('0x26')](respondWithResult(_0x1a0226,0xc9))['catch'](handleError(_0x1a0226,null));};exports[_0x54b9('0x4b')]=function(_0x16c7a2,_0x3c1a35){if(_0x16c7a2[_0x54b9('0x4a')]['id']){delete _0x16c7a2[_0x54b9('0x4a')]['id'];}return db[_0x54b9('0x2d')][_0x54b9('0x47')]({'where':{'id':_0x16c7a2['params']['id']}})[_0x54b9('0x26')](handleEntityNotFound(_0x3c1a35,null))[_0x54b9('0x26')](saveUpdates(_0x16c7a2[_0x54b9('0x4a')],null))['then'](respondWithResult(_0x3c1a35,null))[_0x54b9('0x48')](handleError(_0x3c1a35,null));};exports['destroy']=function(_0x11c313,_0x5343d8){return db[_0x54b9('0x2d')]['find']({'where':{'id':_0x11c313[_0x54b9('0x42')]['id']}})[_0x54b9('0x26')](handleEntityNotFound(_0x5343d8,null))[_0x54b9('0x26')](removeEntity(_0x5343d8,null))[_0x54b9('0x48')](handleError(_0x5343d8,null));};exports[_0x54b9('0x4c')]=function(_0x285034,_0x578cfc,_0x4b8c83){var _0x1bec01={};var _0x2e91e4={};var _0x47387a;var _0x3654ca;return db['DeskAccount'][_0x54b9('0x4d')]({'where':{'id':_0x285034[_0x54b9('0x42')]['id']}})[_0x54b9('0x26')](handleEntityNotFound(_0x578cfc,null))[_0x54b9('0x26')](function(_0x632a9){if(_0x632a9){_0x47387a=_0x632a9;_0x2e91e4[_0x54b9('0x2f')]=_[_0x54b9('0x43')](db[_0x54b9('0x4e')]['rawAttributes']);_0x2e91e4[_0x54b9('0x30')]=_[_0x54b9('0x43')](_0x285034[_0x54b9('0x30')]);_0x2e91e4[_0x54b9('0x31')]=_[_0x54b9('0x32')](_0x2e91e4['model'],_0x2e91e4[_0x54b9('0x30')]);_0x1bec01[_0x54b9('0x34')]=_[_0x54b9('0x32')](_0x2e91e4[_0x54b9('0x2f')],qs[_0x54b9('0x33')](_0x285034[_0x54b9('0x30')][_0x54b9('0x33')]));_0x1bec01['attributes']=_0x1bec01[_0x54b9('0x34')][_0x54b9('0x35')]?_0x1bec01[_0x54b9('0x34')]:_0x2e91e4[_0x54b9('0x2f')];_0x1bec01['order']=qs[_0x54b9('0x38')](_0x285034[_0x54b9('0x30')]['sort']);_0x1bec01[_0x54b9('0x39')]=qs[_0x54b9('0x31')](_[_0x54b9('0x3a')](_0x285034[_0x54b9('0x30')],_0x2e91e4[_0x54b9('0x31')]));if(_0x285034[_0x54b9('0x30')][_0x54b9('0x3b')]){_0x1bec01[_0x54b9('0x39')]=_[_0x54b9('0x3c')](_0x1bec01[_0x54b9('0x39')],{'$or':_[_0x54b9('0x2c')](_0x1bec01[_0x54b9('0x34')],function(_0x9455a1){var _0x3a43c6={};_0x3a43c6[_0x9455a1]={'$like':'%'+_0x285034[_0x54b9('0x30')][_0x54b9('0x3b')]+'%'};return _0x3a43c6;})});}_0x1bec01=_['merge']({},_0x1bec01,_0x285034['options']);return _0x47387a[_0x54b9('0x4c')](_0x1bec01);}})[_0x54b9('0x26')](function(_0x139161){if(_0x139161){_0x3654ca=_0x139161['length'];if(!_0x285034[_0x54b9('0x30')]['hasOwnProperty'](_0x54b9('0x4f'))){_0x1bec01[_0x54b9('0x1f')]=qs[_0x54b9('0x1f')](_0x285034[_0x54b9('0x30')][_0x54b9('0x1f')]);_0x1bec01[_0x54b9('0x20')]=qs[_0x54b9('0x20')](_0x285034[_0x54b9('0x30')][_0x54b9('0x20')]);}return _0x47387a[_0x54b9('0x4c')](_0x1bec01);}})['then'](function(_0x5a4c71){if(_0x5a4c71){return _0x5a4c71?{'count':_0x3654ca,'rows':_0x5a4c71}:null;}})[_0x54b9('0x26')](respondWithResult(_0x578cfc,null))[_0x54b9('0x48')](handleError(_0x578cfc,null));};exports[_0x54b9('0x50')]=function(_0x102f00,_0xa10890,_0x2ccecb){if(_0x102f00[_0x54b9('0x4a')]['id']){delete _0x102f00['body']['id'];}return db[_0x54b9('0x2d')][_0x54b9('0x4d')]({'where':{'id':_0x102f00['params']['id']}})[_0x54b9('0x26')](handleEntityNotFound(_0xa10890,null))['then'](function(_0x248b88){if(_0x248b88){_0x102f00[_0x54b9('0x4a')][_0x54b9('0x51')]=_0x248b88['id'];_0x102f00[_0x54b9('0x4a')][_0x54b9('0x52')]=integrations[_0x54b9('0x53')](_0x102f00[_0x54b9('0x4a')]['channel'],_0x102f00[_0x54b9('0x4a')][_0x54b9('0x3d')]);_0x102f00['body'][_0x54b9('0x54')]=integrations[_0x54b9('0x55')](_0x102f00[_0x54b9('0x4a')]['channel'],_0x102f00[_0x54b9('0x4a')][_0x54b9('0x3d')]);return db['DeskConfiguration'][_0x54b9('0x49')](_0x102f00['body'],{'include':[{'model':db[_0x54b9('0x56')],'as':_0x54b9('0x52')},{'model':db[_0x54b9('0x56')],'as':'Descriptions'}]});}return null;})[_0x54b9('0x26')](respondWithResult(_0xa10890,null))['catch'](handleError(_0xa10890,null));};exports[_0x54b9('0x57')]=function(_0xb7460,_0x1aa6c4,_0x8fa701){var _0x807759=[{'name':'priority','label':_0x54b9('0x58'),'custom':![],'options':[{'name':0x1,'value':0x1},{'name':0x2,'value':0x2},{'name':0x3,'value':0x3},{'name':0x4,'value':0x4},{'name':0x5,'value':0x5},{'name':0x6,'value':0x6},{'name':0x7,'value':0x7},{'name':0x8,'value':0x8},{'name':0x9,'value':0x9},{'name':0xa,'value':0xa}]}];var _0x42b4ca='';return db[_0x54b9('0x2d')][_0x54b9('0x4d')]({'where':{'id':_0xb7460['params']['id']},'attributes':['id',_0x54b9('0x59'),'authType',_0x54b9('0x5a'),'password',_0x54b9('0x5b'),'consumerSecret',_0x54b9('0x5c'),_0x54b9('0x5d')]})[_0x54b9('0x26')](handleEntityNotFound(_0x1aa6c4,null))[_0x54b9('0x26')](function(_0x3600d5){if(_0x3600d5){_0x42b4ca=_0x3600d5['remoteUri'];var _0x103d4e=_0x42b4ca[_0x54b9('0x5e')](-0x1);if(_0x103d4e==='/'){_0x42b4ca=_0x42b4ca['substring'](0x0,_0x42b4ca['lastIndexOf'](_0x103d4e));}var _0x730091={'method':_0x54b9('0x5f'),'uri':util['format']('%s/custom_fields',_0x42b4ca),'headers':{'Content-Type':_0x54b9('0x60'),'Accept':_0x54b9('0x60')},'json':!![]};if(_0x3600d5[_0x54b9('0x61')]==='basic'){_0x730091[_0x54b9('0x62')][_0x54b9('0x63')]=util[_0x54b9('0x64')](_0x54b9('0x65'),new Buffer(util[_0x54b9('0x64')](_0x54b9('0x66'),_0x3600d5[_0x54b9('0x5a')],_0x3600d5['password']))['toString'](_0x54b9('0x67')));}return rp(_0x730091)[_0x54b9('0x26')](function(_0x19e3ef){return _0x807759[_0x54b9('0x68')](_[_0x54b9('0x2c')](_0x19e3ef[_0x54b9('0x69')][_0x54b9('0x6a')],function(_0x5e2979){return{'id':_0x5e2979[_0x54b9('0x2a')],'name':_0x5e2979['name'],'type':_0x5e2979[_0x54b9('0x3d')],'active':_0x5e2979[_0x54b9('0x6b')],'label':_0x5e2979['label'],'custom':!![]};}));});}})['then'](function(_0x48e1b5){return{'count':_0x48e1b5[_0x54b9('0x35')],'rows':_0x48e1b5};})[_0x54b9('0x26')](respondWithResult(_0x1aa6c4,null))[_0x54b9('0x48')](function(_0x38e936){var _0x1e3215=_0xb7460[_0x54b9('0x30')][_0x54b9('0x6c')]?0x1f4:_0x38e936[_0x54b9('0x6d')]||0x1f4;logger[_0x54b9('0x28')](_0x54b9('0x6e'),'getFields',_0x1e3215,JSON[_0x54b9('0x6f')](_0x38e936));delete _0x38e936[_0x54b9('0x2a')];if(_0x1e3215===0x191){_0x1e3215=0x190;}_0x1aa6c4[_0x54b9('0x1b')](_0x1e3215)[_0x54b9('0x70')](_0xb7460[_0x54b9('0x30')][_0x54b9('0x6c')]?{'message':_0x54b9('0x71'),'statusCode':_0x38e936[_0x54b9('0x6d')]}:_0x38e936);});};
\ No newline at end of file
index b72181e..cf52ce5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfd2a=['moment','request-promise','path','rimraf','../../config/environment','./intDeskAccount.attributes','../../components/integrations/configuration','exports','DeskAccount','int_desk_accounts','util','../../config/logger','api'];(function(_0x32ed89,_0x11d953){var _0x262961=function(_0x29727c){while(--_0x29727c){_0x32ed89['push'](_0x32ed89['shift']());}};_0x262961(++_0x11d953);}(_0xfd2a,0x1d1));var _0xafd2=function(_0x1d1779,_0x284147){_0x1d1779=_0x1d1779-0x0;var _0x2377e9=_0xfd2a[_0x1d1779];return _0x2377e9;};'use strict';var _=require('lodash');var util=require(_0xafd2('0x0'));var logger=require(_0xafd2('0x1'))(_0xafd2('0x2'));var moment=require(_0xafd2('0x3'));var BPromise=require('bluebird');var rp=require(_0xafd2('0x4'));var fs=require('fs');var path=require(_0xafd2('0x5'));var rimraf=require(_0xafd2('0x6'));var config=require(_0xafd2('0x7'));var attributes=require(_0xafd2('0x8'));var integrations=require(_0xafd2('0x9'));module[_0xafd2('0xa')]=function(_0x45e9d2,_0xdf6900){return _0x45e9d2['define'](_0xafd2('0xb'),attributes,{'tableName':_0xafd2('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x78d5=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intDeskAccount.attributes','exports','define','DeskAccount','../../config/logger'];(function(_0x4c922b,_0x594eaa){var _0xccecc2=function(_0x1b4489){while(--_0x1b4489){_0x4c922b['push'](_0x4c922b['shift']());}};_0xccecc2(++_0x594eaa);}(_0x78d5,0x167));var _0x578d=function(_0x462391,_0x2c2fe7){_0x462391=_0x462391-0x0;var _0x26c572=_0x78d5[_0x462391];return _0x26c572;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x578d('0x0'))(_0x578d('0x1'));var moment=require(_0x578d('0x2'));var BPromise=require(_0x578d('0x3'));var rp=require(_0x578d('0x4'));var fs=require('fs');var path=require(_0x578d('0x5'));var rimraf=require(_0x578d('0x6'));var config=require(_0x578d('0x7'));var attributes=require(_0x578d('0x8'));var integrations=require('../../components/integrations/configuration');module[_0x578d('0x9')]=function(_0x58fdc8,_0x141ced){return _0x58fdc8[_0x578d('0xa')](_0x578d('0xb'),attributes,{'tableName':'int_desk_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index b70b860..8617dbf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4f17=['limit','include','map','model','then','stringify','ShowDeskAccount','find','where','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','request','info','request\x20sent','debug','DeskAccount,\x20%s,\x20%s,\x20%s','error','DeskAccount,\x20%s,\x20%s','message','result','catch','GetDeskAccount','DeskAccount','options','raw','attributes'];(function(_0xf436fb,_0x25f9b8){var _0x188bca=function(_0x4c20aa){while(--_0x4c20aa){_0xf436fb['push'](_0xf436fb['shift']());}};_0x188bca(++_0x25f9b8);}(_0x4f17,0x1c3));var _0x74f1=function(_0x1a6007,_0x350755){_0x1a6007=_0x1a6007-0x0;var _0x120665=_0x4f17[_0x1a6007];return _0x120665;};'use strict';var _=require(_0x74f1('0x0'));var util=require(_0x74f1('0x1'));var moment=require(_0x74f1('0x2'));var BPromise=require(_0x74f1('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x74f1('0x4'))['db'];var utils=require(_0x74f1('0x5'));var logger=require('../../config/logger')(_0x74f1('0x6'));var config=require('../../config/environment');var jayson=require(_0x74f1('0x7'));var client=jayson[_0x74f1('0x8')][_0x74f1('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x45d358,_0x5c6700,_0x4d0ad5){return new BPromise(function(_0x2b6426,_0x5d6615){return client[_0x74f1('0xa')](_0x45d358,_0x4d0ad5)['then'](function(_0x485a4a){logger[_0x74f1('0xb')]('DeskAccount,\x20%s,\x20%s',_0x5c6700,_0x74f1('0xc'));logger[_0x74f1('0xd')](_0x74f1('0xe'),_0x5c6700,_0x74f1('0xc'),JSON['stringify'](_0x485a4a));if(_0x485a4a[_0x74f1('0xf')]){if(_0x485a4a[_0x74f1('0xf')]['code']===0x1f4){logger[_0x74f1('0xf')](_0x74f1('0x10'),_0x5c6700,_0x485a4a[_0x74f1('0xf')]['message']);return _0x5d6615(_0x485a4a[_0x74f1('0xf')]['message']);}logger[_0x74f1('0xf')]('DeskAccount,\x20%s,\x20%s',_0x5c6700,_0x485a4a[_0x74f1('0xf')][_0x74f1('0x11')]);return _0x2b6426(_0x485a4a[_0x74f1('0xf')]['message']);}else{logger[_0x74f1('0xb')]('DeskAccount,\x20%s,\x20%s',_0x5c6700,'request\x20sent');_0x2b6426(_0x485a4a[_0x74f1('0x12')][_0x74f1('0x11')]);}})[_0x74f1('0x13')](function(_0x39b0d4){logger[_0x74f1('0xf')](_0x74f1('0x10'),_0x5c6700,_0x39b0d4);_0x5d6615(_0x39b0d4);});});}exports[_0x74f1('0x14')]=function(_0x11be2f){var _0x1738e2=this;return new Promise(function(_0x456a8e,_0x3e1e90){return db[_0x74f1('0x15')]['findAll']({'raw':_0x11be2f['options']?_0x11be2f[_0x74f1('0x16')][_0x74f1('0x17')]===undefined?!![]:![]:!![],'where':_0x11be2f[_0x74f1('0x16')]?_0x11be2f[_0x74f1('0x16')]['where']||null:null,'attributes':_0x11be2f[_0x74f1('0x16')]?_0x11be2f['options'][_0x74f1('0x18')]||null:null,'limit':_0x11be2f[_0x74f1('0x16')]?_0x11be2f[_0x74f1('0x16')][_0x74f1('0x19')]||null:null,'include':_0x11be2f[_0x74f1('0x16')]?_0x11be2f[_0x74f1('0x16')][_0x74f1('0x1a')]?_['map'](_0x11be2f[_0x74f1('0x16')][_0x74f1('0x1a')],function(_0x110d69){return{'model':db[_0x110d69['model']],'as':_0x110d69['as'],'attributes':_0x110d69[_0x74f1('0x18')],'include':_0x110d69[_0x74f1('0x1a')]?_['map'](_0x110d69[_0x74f1('0x1a')],function(_0x4cadac){return{'model':db[_0x4cadac['model']],'as':_0x4cadac['as'],'attributes':_0x4cadac[_0x74f1('0x18')],'include':_0x4cadac[_0x74f1('0x1a')]?_[_0x74f1('0x1b')](_0x4cadac['include'],function(_0x4cca2b){return{'model':db[_0x4cca2b[_0x74f1('0x1c')]],'as':_0x4cca2b['as'],'attributes':_0x4cca2b['attributes']};}):[]};}):[]};}):[]:[]})[_0x74f1('0x1d')](function(_0x5da1e5){logger[_0x74f1('0xb')](_0x74f1('0x14'),_0x11be2f);logger[_0x74f1('0xd')](_0x74f1('0x14'),_0x11be2f,JSON[_0x74f1('0x1e')](_0x5da1e5));_0x456a8e(_0x5da1e5);})[_0x74f1('0x13')](function(_0x50305f){logger['error']('GetDeskAccount',_0x50305f[_0x74f1('0x11')],_0x11be2f);_0x3e1e90(_0x1738e2[_0x74f1('0xf')](0x1f4,_0x50305f['message']));});});};exports[_0x74f1('0x1f')]=function(_0x20ee18){var _0x1ac7b5=this;return new Promise(function(_0x369e35,_0x2bfe72){return db[_0x74f1('0x15')][_0x74f1('0x20')]({'raw':_0x20ee18['options']?_0x20ee18[_0x74f1('0x16')][_0x74f1('0x17')]===undefined?!![]:![]:!![],'where':_0x20ee18[_0x74f1('0x16')]?_0x20ee18[_0x74f1('0x16')][_0x74f1('0x21')]||null:null,'attributes':_0x20ee18[_0x74f1('0x16')]?_0x20ee18[_0x74f1('0x16')][_0x74f1('0x18')]||null:null,'include':_0x20ee18[_0x74f1('0x16')]?_0x20ee18[_0x74f1('0x16')][_0x74f1('0x1a')]?_[_0x74f1('0x1b')](_0x20ee18[_0x74f1('0x16')][_0x74f1('0x1a')],function(_0x19c862){return{'model':db[_0x19c862['model']],'as':_0x19c862['as'],'attributes':_0x19c862['attributes'],'include':_0x19c862[_0x74f1('0x1a')]?_[_0x74f1('0x1b')](_0x19c862['include'],function(_0x1d57ce){return{'model':db[_0x1d57ce[_0x74f1('0x1c')]],'as':_0x1d57ce['as'],'attributes':_0x1d57ce[_0x74f1('0x18')],'include':_0x1d57ce[_0x74f1('0x1a')]?_[_0x74f1('0x1b')](_0x1d57ce['include'],function(_0x447a13){return{'model':db[_0x447a13[_0x74f1('0x1c')]],'as':_0x447a13['as'],'attributes':_0x447a13['attributes']};}):[]};}):[]};}):[]:[]})[_0x74f1('0x1d')](function(_0x15b7ab){logger[_0x74f1('0xb')](_0x74f1('0x1f'),_0x20ee18);logger[_0x74f1('0xd')](_0x74f1('0x1f'),_0x20ee18,JSON[_0x74f1('0x1e')](_0x15b7ab));_0x369e35(_0x15b7ab);})[_0x74f1('0x13')](function(_0x3b00f5){logger['error']('ShowDeskAccount',_0x3b00f5[_0x74f1('0x11')],_0x20ee18);_0x2bfe72(_0x1ac7b5[_0x74f1('0xf')](0x1f4,_0x3b00f5[_0x74f1('0x11')]));});});};
\ No newline at end of file
+var _0x9998=['attributes','stringify','catch','ShowDeskAccount','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','DeskAccount,\x20%s,\x20%s','request\x20sent','debug','DeskAccount,\x20%s,\x20%s,\x20%s','code','error','message','GetDeskAccount','DeskAccount','findAll','options','limit','map','include','model'];(function(_0x1594ef,_0x467a04){var _0x1b7070=function(_0xf86472){while(--_0xf86472){_0x1594ef['push'](_0x1594ef['shift']());}};_0x1b7070(++_0x467a04);}(_0x9998,0xa9));var _0x8999=function(_0x2ed33f,_0x1cbe4e){_0x2ed33f=_0x2ed33f-0x0;var _0x2cdd0e=_0x9998[_0x2ed33f];return _0x2cdd0e;};'use strict';var _=require('lodash');var util=require(_0x8999('0x0'));var moment=require('moment');var BPromise=require(_0x8999('0x1'));var rs=require(_0x8999('0x2'));var fs=require('fs');var Redis=require(_0x8999('0x3'));var db=require(_0x8999('0x4'))['db'];var utils=require(_0x8999('0x5'));var logger=require(_0x8999('0x6'))(_0x8999('0x7'));var config=require('../../config/environment');var jayson=require(_0x8999('0x8'));var client=jayson[_0x8999('0x9')][_0x8999('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4affae,_0x1cfd67,_0x6b3f3a){return new BPromise(function(_0x5ad7d5,_0x28cb28){return client[_0x8999('0xb')](_0x4affae,_0x6b3f3a)[_0x8999('0xc')](function(_0x5c3889){logger[_0x8999('0xd')](_0x8999('0xe'),_0x1cfd67,_0x8999('0xf'));logger[_0x8999('0x10')](_0x8999('0x11'),_0x1cfd67,_0x8999('0xf'),JSON['stringify'](_0x5c3889));if(_0x5c3889['error']){if(_0x5c3889['error'][_0x8999('0x12')]===0x1f4){logger['error'](_0x8999('0xe'),_0x1cfd67,_0x5c3889[_0x8999('0x13')][_0x8999('0x14')]);return _0x28cb28(_0x5c3889[_0x8999('0x13')][_0x8999('0x14')]);}logger[_0x8999('0x13')](_0x8999('0xe'),_0x1cfd67,_0x5c3889['error'][_0x8999('0x14')]);return _0x5ad7d5(_0x5c3889[_0x8999('0x13')][_0x8999('0x14')]);}else{logger['info'](_0x8999('0xe'),_0x1cfd67,_0x8999('0xf'));_0x5ad7d5(_0x5c3889['result']['message']);}})['catch'](function(_0x44732b){logger[_0x8999('0x13')](_0x8999('0xe'),_0x1cfd67,_0x44732b);_0x28cb28(_0x44732b);});});}exports[_0x8999('0x15')]=function(_0x3d2732){var _0xe860f3=this;return new Promise(function(_0x8e4dd1,_0x228f06){return db[_0x8999('0x16')][_0x8999('0x17')]({'raw':_0x3d2732[_0x8999('0x18')]?_0x3d2732['options']['raw']===undefined?!![]:![]:!![],'where':_0x3d2732[_0x8999('0x18')]?_0x3d2732[_0x8999('0x18')]['where']||null:null,'attributes':_0x3d2732[_0x8999('0x18')]?_0x3d2732[_0x8999('0x18')]['attributes']||null:null,'limit':_0x3d2732['options']?_0x3d2732[_0x8999('0x18')][_0x8999('0x19')]||null:null,'include':_0x3d2732[_0x8999('0x18')]?_0x3d2732[_0x8999('0x18')]['include']?_[_0x8999('0x1a')](_0x3d2732[_0x8999('0x18')][_0x8999('0x1b')],function(_0x4756d2){return{'model':db[_0x4756d2[_0x8999('0x1c')]],'as':_0x4756d2['as'],'attributes':_0x4756d2[_0x8999('0x1d')],'include':_0x4756d2[_0x8999('0x1b')]?_['map'](_0x4756d2[_0x8999('0x1b')],function(_0x1979ec){return{'model':db[_0x1979ec[_0x8999('0x1c')]],'as':_0x1979ec['as'],'attributes':_0x1979ec[_0x8999('0x1d')],'include':_0x1979ec[_0x8999('0x1b')]?_[_0x8999('0x1a')](_0x1979ec[_0x8999('0x1b')],function(_0x250359){return{'model':db[_0x250359[_0x8999('0x1c')]],'as':_0x250359['as'],'attributes':_0x250359[_0x8999('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x8999('0xc')](function(_0x131940){logger['info'](_0x8999('0x15'),_0x3d2732);logger[_0x8999('0x10')]('GetDeskAccount',_0x3d2732,JSON[_0x8999('0x1e')](_0x131940));_0x8e4dd1(_0x131940);})[_0x8999('0x1f')](function(_0xe9c053){logger[_0x8999('0x13')](_0x8999('0x15'),_0xe9c053[_0x8999('0x14')],_0x3d2732);_0x228f06(_0xe860f3[_0x8999('0x13')](0x1f4,_0xe9c053[_0x8999('0x14')]));});});};exports[_0x8999('0x20')]=function(_0x3d8a5e){var _0x22dd57=this;return new Promise(function(_0xf28147,_0x2281a3){return db[_0x8999('0x16')]['find']({'raw':_0x3d8a5e[_0x8999('0x18')]?_0x3d8a5e['options']['raw']===undefined?!![]:![]:!![],'where':_0x3d8a5e[_0x8999('0x18')]?_0x3d8a5e[_0x8999('0x18')]['where']||null:null,'attributes':_0x3d8a5e[_0x8999('0x18')]?_0x3d8a5e[_0x8999('0x18')][_0x8999('0x1d')]||null:null,'include':_0x3d8a5e[_0x8999('0x18')]?_0x3d8a5e[_0x8999('0x18')]['include']?_[_0x8999('0x1a')](_0x3d8a5e[_0x8999('0x18')][_0x8999('0x1b')],function(_0x5058d9){return{'model':db[_0x5058d9[_0x8999('0x1c')]],'as':_0x5058d9['as'],'attributes':_0x5058d9[_0x8999('0x1d')],'include':_0x5058d9[_0x8999('0x1b')]?_[_0x8999('0x1a')](_0x5058d9[_0x8999('0x1b')],function(_0x386498){return{'model':db[_0x386498[_0x8999('0x1c')]],'as':_0x386498['as'],'attributes':_0x386498[_0x8999('0x1d')],'include':_0x386498[_0x8999('0x1b')]?_[_0x8999('0x1a')](_0x386498[_0x8999('0x1b')],function(_0x3fb10b){return{'model':db[_0x3fb10b[_0x8999('0x1c')]],'as':_0x3fb10b['as'],'attributes':_0x3fb10b['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x22e1da){logger[_0x8999('0xd')]('ShowDeskAccount',_0x3d8a5e);logger[_0x8999('0x10')]('ShowDeskAccount',_0x3d8a5e,JSON['stringify'](_0x22e1da));_0xf28147(_0x22e1da);})['catch'](function(_0x10c65d){logger['error']('ShowDeskAccount',_0x10c65d[_0x8999('0x14')],_0x3d8a5e);_0x2281a3(_0x22dd57[_0x8999('0x13')](0x1f4,_0x10c65d[_0x8999('0x14')]));});});};
\ No newline at end of file
index 9d7ed47..24a08bf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x008c=['../../config/environment','./intDeskConfiguration.controller','get','isAuthenticated','index','getFields','/:id/descriptions','getDescriptions','/:id/tags','getTags','post','setTags','put','/:id','update','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x2c87ca,_0x31a6f0){var _0x32e581=function(_0x230d39){while(--_0x230d39){_0x2c87ca['push'](_0x2c87ca['shift']());}};_0x32e581(++_0x31a6f0);}(_0x008c,0x188));var _0xc008=function(_0x4953da,_0x5adaca){_0x4953da=_0x4953da-0x0;var _0x2d3780=_0x008c[_0x4953da];return _0x2d3780;};'use strict';var multer=require(_0xc008('0x0'));var util=require(_0xc008('0x1'));var path=require(_0xc008('0x2'));var timeout=require(_0xc008('0x3'));var express=require(_0xc008('0x4'));var router=express['Router']();var fs_extra=require(_0xc008('0x5'));var auth=require(_0xc008('0x6'));var interaction=require(_0xc008('0x7'));var config=require(_0xc008('0x8'));var controller=require(_0xc008('0x9'));router[_0xc008('0xa')]('/',auth[_0xc008('0xb')](),controller[_0xc008('0xc')]);router[_0xc008('0xa')]('/:id',auth[_0xc008('0xb')](),controller['show']);router[_0xc008('0xa')]('/:id/fields',auth['isAuthenticated'](),controller[_0xc008('0xd')]);router[_0xc008('0xa')]('/:id/subjects',auth['isAuthenticated'](),controller['getSubjects']);router[_0xc008('0xa')](_0xc008('0xe'),auth['isAuthenticated'](),controller[_0xc008('0xf')]);router[_0xc008('0xa')](_0xc008('0x10'),auth[_0xc008('0xb')](),controller[_0xc008('0x11')]);router[_0xc008('0x12')]('/',auth[_0xc008('0xb')](),controller['create']);router['post'](_0xc008('0x10'),auth['isAuthenticated'](),controller[_0xc008('0x13')]);router[_0xc008('0x14')](_0xc008('0x15'),auth[_0xc008('0xb')](),controller[_0xc008('0x16')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0xc008('0x17')]);module[_0xc008('0x18')]=router;
\ No newline at end of file
+var _0x7217=['getDescriptions','/:id/tags','post','setTags','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../config/environment','./intDeskConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions'];(function(_0x3ce233,_0x58abd8){var _0x48c0cc=function(_0xce2df0){while(--_0xce2df0){_0x3ce233['push'](_0x3ce233['shift']());}};_0x48c0cc(++_0x58abd8);}(_0x7217,0x19e));var _0x7721=function(_0xa1e3e3,_0x29fe0e){_0xa1e3e3=_0xa1e3e3-0x0;var _0xc980e9=_0x7217[_0xa1e3e3];return _0xc980e9;};'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['getTags']);router[_0x7721('0x14')]('/',auth[_0x7721('0x9')](),controller['create']);router[_0x7721('0x14')](_0x7721('0x13'),auth[_0x7721('0x9')](),controller[_0x7721('0x15')]);router['put'](_0x7721('0xb'),auth[_0x7721('0x9')](),controller['update']);router['delete']('/:id',auth[_0x7721('0x9')](),controller[_0x7721('0x16')]);module[_0x7721('0x17')]=router;
\ No newline at end of file
index 437c791..efb6e90 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x37ef=['STRING','sequelize','exports'];(function(_0x2137a9,_0xa4748f){var _0x2be43f=function(_0x20faef){while(--_0x20faef){_0x2137a9['push'](_0x2137a9['shift']());}};_0x2be43f(++_0xa4748f);}(_0x37ef,0x94));var _0xf37e=function(_0x5abe82,_0x3f4b65){_0x5abe82=_0x5abe82-0x0;var _0x2f8f38=_0x37ef[_0x5abe82];return _0x2f8f38;};'use strict';var Sequelize=require(_0xf37e('0x0'));module[_0xf37e('0x1')]={'name':{'type':Sequelize[_0xf37e('0x2')]},'description':{'type':Sequelize[_0xf37e('0x2')]}};
\ No newline at end of file
+var _0x8ac0=['STRING'];(function(_0x4447fd,_0x1812c9){var _0x3c4718=function(_0x3c7591){while(--_0x3c7591){_0x4447fd['push'](_0x4447fd['shift']());}};_0x3c4718(++_0x1812c9);}(_0x8ac0,0x1c6));var _0x08ac=function(_0xc29704,_0x2767c7){_0xc29704=_0xc29704-0x0;var _0x7d8e58=_0x8ac0[_0xc29704];return _0x7d8e58;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x08ac('0x0')]},'description':{'type':Sequelize[_0x08ac('0x0')]}};
\ No newline at end of file
index 13748b4..aa0041e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb197=['pick','filter','merge','VIRTUAL','DeskConfiguration','includeAll','include','findAll','rows','catch','show','params','keys','options','find','create','update','body','findOne','getFields','getSubjects','DeskField','getDescriptions','getTags','Tag','setTags','ids','eml-format','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','status','end','undefined','count','offset','limit','set','Content-Range','json','save','then','destroy','sendStatus','error','stack','name','send','index','map','rawAttributes','type','key','query','filters','intersection','attributes','model','fields','length','hasOwnProperty','nolimit','order','sort','where'];(function(_0x9aada2,_0xd2d349){var _0x196dff=function(_0x5ad061){while(--_0x5ad061){_0x9aada2['push'](_0x9aada2['shift']());}};_0x196dff(++_0xd2d349);}(_0xb197,0x117));var _0x7b19=function(_0x4bed75,_0x211cc7){_0x4bed75=_0x4bed75-0x0;var _0x2dd8e8=_0xb197[_0x4bed75];return _0x2dd8e8;};'use strict';var emlformat=require(_0x7b19('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x7b19('0x1'));var BPromise=require(_0x7b19('0x2'));var Mustache=require(_0x7b19('0x3'));var util=require(_0x7b19('0x4'));var path=require(_0x7b19('0x5'));var sox=require(_0x7b19('0x6'));var csv=require(_0x7b19('0x7'));var ejs=require(_0x7b19('0x8'));var fs=require('fs');var fs_extra=require(_0x7b19('0x9'));var _=require(_0x7b19('0xa'));var squel=require('squel');var crypto=require(_0x7b19('0xb'));var jsforce=require(_0x7b19('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x7b19('0x7'));var querystring=require('querystring');var Papa=require(_0x7b19('0xd'));var Redis=require(_0x7b19('0xe'));var authService=require(_0x7b19('0xf'));var qs=require(_0x7b19('0x10'));var as=require(_0x7b19('0x11'));var hardwareService=require(_0x7b19('0x12'));var logger=require(_0x7b19('0x13'))(_0x7b19('0x14'));var utils=require(_0x7b19('0x15'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x7b19('0x16'))['db'];function respondWithStatusCode(_0x5d38b3,_0x12a69c){_0x12a69c=_0x12a69c||0xcc;return function(_0x48d5f8){if(_0x48d5f8){return _0x5d38b3['sendStatus'](_0x12a69c);}return _0x5d38b3[_0x7b19('0x17')](_0x12a69c)[_0x7b19('0x18')]();};}function respondWithResult(_0x100d03,_0x1ce53d){_0x1ce53d=_0x1ce53d||0xc8;return function(_0x5e6c31){if(_0x5e6c31){return _0x100d03['status'](_0x1ce53d)['json'](_0x5e6c31);}};}function respondWithFilteredResult(_0xdad8a7,_0x602bdf){return function(_0x810f4){if(_0x810f4){var _0x2899d7=typeof _0x602bdf['offset']==='undefined'&&typeof _0x602bdf['limit']===_0x7b19('0x19');var _0x213bfe=_0x810f4[_0x7b19('0x1a')];var _0x15b5a4=_0x2899d7?0x0:_0x602bdf[_0x7b19('0x1b')];var _0x10ea23=_0x2899d7?_0x810f4[_0x7b19('0x1a')]:_0x602bdf['offset']+_0x602bdf[_0x7b19('0x1c')];var _0x476a44;if(_0x10ea23>=_0x213bfe){_0x10ea23=_0x213bfe;_0x476a44=0xc8;}else{_0x476a44=0xce;}_0xdad8a7['status'](_0x476a44);return _0xdad8a7[_0x7b19('0x1d')](_0x7b19('0x1e'),_0x15b5a4+'-'+_0x10ea23+'/'+_0x213bfe)[_0x7b19('0x1f')](_0x810f4);}return null;};}function patchUpdates(_0x577481){return function(_0x4331d7){try{jsonpatch['apply'](_0x4331d7,_0x577481,!![]);}catch(_0xd07a53){return BPromise['reject'](_0xd07a53);}return _0x4331d7[_0x7b19('0x20')]();};}function saveUpdates(_0x26afb2,_0x432921){return function(_0x19a01d){if(_0x19a01d){return _0x19a01d['update'](_0x26afb2)[_0x7b19('0x21')](function(_0x2d3b06){return _0x2d3b06;});}return null;};}function removeEntity(_0x255881,_0x4512d0){return function(_0x252a9d){if(_0x252a9d){return _0x252a9d[_0x7b19('0x22')]()[_0x7b19('0x21')](function(){_0x255881[_0x7b19('0x17')](0xcc)[_0x7b19('0x18')]();});}};}function handleEntityNotFound(_0x2c5871,_0xb1f03){return function(_0x8a32f5){if(!_0x8a32f5){_0x2c5871[_0x7b19('0x23')](0x194);}return _0x8a32f5;};}function handleError(_0x4c408b,_0x558f2e){_0x558f2e=_0x558f2e||0x1f4;return function(_0x403c83){logger[_0x7b19('0x24')](_0x403c83[_0x7b19('0x25')]);if(_0x403c83[_0x7b19('0x26')]){delete _0x403c83[_0x7b19('0x26')];}_0x4c408b['status'](_0x558f2e)[_0x7b19('0x27')](_0x403c83);};}exports[_0x7b19('0x28')]=function(_0x12d0e3,_0x286529){var _0x3f48de={},_0x1648c2={},_0x54b0d8={'count':0x0,'rows':[]};var _0x40c39d=_[_0x7b19('0x29')](db['DeskConfiguration'][_0x7b19('0x2a')],function(_0x172f63){return{'name':_0x172f63['fieldName'],'type':_0x172f63[_0x7b19('0x2b')][_0x7b19('0x2c')]};});_0x1648c2['model']=_[_0x7b19('0x29')](_0x40c39d,'name');_0x1648c2[_0x7b19('0x2d')]=_['keys'](_0x12d0e3[_0x7b19('0x2d')]);_0x1648c2[_0x7b19('0x2e')]=_[_0x7b19('0x2f')](_0x1648c2['model'],_0x1648c2[_0x7b19('0x2d')]);_0x3f48de[_0x7b19('0x30')]=_['intersection'](_0x1648c2[_0x7b19('0x31')],qs['fields'](_0x12d0e3['query'][_0x7b19('0x32')]));_0x3f48de['attributes']=_0x3f48de['attributes'][_0x7b19('0x33')]?_0x3f48de[_0x7b19('0x30')]:_0x1648c2[_0x7b19('0x31')];if(!_0x12d0e3['query'][_0x7b19('0x34')](_0x7b19('0x35'))){_0x3f48de[_0x7b19('0x1c')]=qs[_0x7b19('0x1c')](_0x12d0e3[_0x7b19('0x2d')]['limit']);_0x3f48de[_0x7b19('0x1b')]=qs[_0x7b19('0x1b')](_0x12d0e3['query'][_0x7b19('0x1b')]);}_0x3f48de[_0x7b19('0x36')]=qs[_0x7b19('0x37')](_0x12d0e3[_0x7b19('0x2d')]['sort']);_0x3f48de[_0x7b19('0x38')]=qs[_0x7b19('0x2e')](_[_0x7b19('0x39')](_0x12d0e3[_0x7b19('0x2d')],_0x1648c2[_0x7b19('0x2e')]),_0x40c39d);if(_0x12d0e3[_0x7b19('0x2d')][_0x7b19('0x3a')]){_0x3f48de[_0x7b19('0x38')]=_[_0x7b19('0x3b')](_0x3f48de[_0x7b19('0x38')],{'$or':_[_0x7b19('0x29')](_0x40c39d,function(_0x1152ba){if(_0x1152ba[_0x7b19('0x2b')]!==_0x7b19('0x3c')){var _0x3da3a4={};_0x3da3a4[_0x1152ba[_0x7b19('0x26')]]={'$like':'%'+_0x12d0e3[_0x7b19('0x2d')][_0x7b19('0x3a')]+'%'};return _0x3da3a4;}})});}_0x3f48de=_[_0x7b19('0x3b')]({},_0x3f48de,_0x12d0e3['options']);var _0x251d48={'where':_0x3f48de[_0x7b19('0x38')]};return db[_0x7b19('0x3d')][_0x7b19('0x1a')](_0x251d48)[_0x7b19('0x21')](function(_0x8fb2d){_0x54b0d8[_0x7b19('0x1a')]=_0x8fb2d;if(_0x12d0e3[_0x7b19('0x2d')][_0x7b19('0x3e')]){_0x3f48de[_0x7b19('0x3f')]=[{'all':!![]}];}return db[_0x7b19('0x3d')][_0x7b19('0x40')](_0x3f48de);})[_0x7b19('0x21')](function(_0x5ebfea){_0x54b0d8[_0x7b19('0x41')]=_0x5ebfea;return _0x54b0d8;})[_0x7b19('0x21')](respondWithFilteredResult(_0x286529,_0x3f48de))[_0x7b19('0x42')](handleError(_0x286529,null));};exports[_0x7b19('0x43')]=function(_0x57cffa,_0x41770a){var _0x19765a={'raw':![],'where':{'id':_0x57cffa[_0x7b19('0x44')]['id']}},_0x381837={};_0x381837[_0x7b19('0x31')]=_['keys'](db[_0x7b19('0x3d')][_0x7b19('0x2a')]);_0x381837[_0x7b19('0x2d')]=_[_0x7b19('0x45')](_0x57cffa['query']);_0x381837['filters']=_[_0x7b19('0x2f')](_0x381837[_0x7b19('0x31')],_0x381837['query']);_0x19765a[_0x7b19('0x30')]=_[_0x7b19('0x2f')](_0x381837[_0x7b19('0x31')],qs[_0x7b19('0x32')](_0x57cffa[_0x7b19('0x2d')]['fields']));_0x19765a['attributes']=_0x19765a[_0x7b19('0x30')][_0x7b19('0x33')]?_0x19765a[_0x7b19('0x30')]:_0x381837[_0x7b19('0x31')];if(_0x57cffa[_0x7b19('0x2d')]['includeAll']){_0x19765a[_0x7b19('0x3f')]=[{'all':!![]}];}_0x19765a=_[_0x7b19('0x3b')]({},_0x19765a,_0x57cffa[_0x7b19('0x46')]);return db['DeskConfiguration'][_0x7b19('0x47')](_0x19765a)[_0x7b19('0x21')](handleEntityNotFound(_0x41770a,null))[_0x7b19('0x21')](respondWithResult(_0x41770a,null))[_0x7b19('0x42')](handleError(_0x41770a,null));};exports[_0x7b19('0x48')]=function(_0x1620a2,_0x4224ad){return db[_0x7b19('0x3d')][_0x7b19('0x48')](_0x1620a2['body'],{})['then'](respondWithResult(_0x4224ad,0xc9))[_0x7b19('0x42')](handleError(_0x4224ad,null));};exports[_0x7b19('0x49')]=function(_0x11d77c,_0x895dca){if(_0x11d77c['body']['id']){delete _0x11d77c[_0x7b19('0x4a')]['id'];}return db[_0x7b19('0x3d')][_0x7b19('0x47')]({'where':{'id':_0x11d77c[_0x7b19('0x44')]['id']}})[_0x7b19('0x21')](handleEntityNotFound(_0x895dca,null))[_0x7b19('0x21')](saveUpdates(_0x11d77c[_0x7b19('0x4a')],null))[_0x7b19('0x21')](respondWithResult(_0x895dca,null))[_0x7b19('0x42')](handleError(_0x895dca,null));};exports[_0x7b19('0x22')]=function(_0x43558d,_0xedd99d){return db[_0x7b19('0x3d')][_0x7b19('0x47')]({'where':{'id':_0x43558d[_0x7b19('0x44')]['id']}})['then'](handleEntityNotFound(_0xedd99d,null))['then'](removeEntity(_0xedd99d,null))[_0x7b19('0x42')](handleError(_0xedd99d,null));};exports['getFields']=function(_0x7badfe,_0x56010a,_0x394d0f){var _0x5e3e21={};var _0x2b0146={};var _0x1d7bf2;var _0x20b20d;return db['DeskConfiguration'][_0x7b19('0x4b')]({'where':{'id':_0x7badfe[_0x7b19('0x44')]['id']}})['then'](handleEntityNotFound(_0x56010a,null))['then'](function(_0x54a0d6){if(_0x54a0d6){_0x1d7bf2=_0x54a0d6;_0x2b0146[_0x7b19('0x31')]=_[_0x7b19('0x45')](db['DeskField'][_0x7b19('0x2a')]);_0x2b0146[_0x7b19('0x2d')]=_['keys'](_0x7badfe[_0x7b19('0x2d')]);_0x2b0146[_0x7b19('0x2e')]=_[_0x7b19('0x2f')](_0x2b0146[_0x7b19('0x31')],_0x2b0146[_0x7b19('0x2d')]);_0x5e3e21[_0x7b19('0x30')]=_[_0x7b19('0x2f')](_0x2b0146[_0x7b19('0x31')],qs[_0x7b19('0x32')](_0x7badfe[_0x7b19('0x2d')][_0x7b19('0x32')]));_0x5e3e21[_0x7b19('0x30')]=_0x5e3e21[_0x7b19('0x30')][_0x7b19('0x33')]?_0x5e3e21[_0x7b19('0x30')]:_0x2b0146[_0x7b19('0x31')];_0x5e3e21[_0x7b19('0x36')]=qs[_0x7b19('0x37')](_0x7badfe[_0x7b19('0x2d')]['sort']);_0x5e3e21['where']=qs[_0x7b19('0x2e')](_[_0x7b19('0x39')](_0x7badfe['query'],_0x2b0146[_0x7b19('0x2e')]));if(_0x7badfe[_0x7b19('0x2d')][_0x7b19('0x3a')]){_0x5e3e21[_0x7b19('0x38')]=_['merge'](_0x5e3e21[_0x7b19('0x38')],{'$or':_[_0x7b19('0x29')](_0x5e3e21['attributes'],function(_0xcc09e8){var _0x3fd984={};_0x3fd984[_0xcc09e8]={'$like':'%'+_0x7badfe['query'][_0x7b19('0x3a')]+'%'};return _0x3fd984;})});}_0x5e3e21=_[_0x7b19('0x3b')]({},_0x5e3e21,_0x7badfe[_0x7b19('0x46')]);return _0x1d7bf2[_0x7b19('0x4c')](_0x5e3e21);}})[_0x7b19('0x21')](function(_0x52979d){if(_0x52979d){_0x20b20d=_0x52979d[_0x7b19('0x33')];if(!_0x7badfe[_0x7b19('0x2d')][_0x7b19('0x34')](_0x7b19('0x35'))){_0x5e3e21[_0x7b19('0x1c')]=qs['limit'](_0x7badfe[_0x7b19('0x2d')][_0x7b19('0x1c')]);_0x5e3e21[_0x7b19('0x1b')]=qs['offset'](_0x7badfe[_0x7b19('0x2d')][_0x7b19('0x1b')]);}return _0x1d7bf2['getFields'](_0x5e3e21);}})[_0x7b19('0x21')](function(_0x4c842d){if(_0x4c842d){return _0x4c842d?{'count':_0x20b20d,'rows':_0x4c842d}:null;}})[_0x7b19('0x21')](respondWithResult(_0x56010a,null))[_0x7b19('0x42')](handleError(_0x56010a,null));};exports[_0x7b19('0x4d')]=function(_0x395f33,_0x214c65,_0xbe8fad){var _0x362207={};var _0x3170c3={};var _0x59e286;var _0x2064b2;return db['DeskConfiguration'][_0x7b19('0x4b')]({'where':{'id':_0x395f33['params']['id']}})[_0x7b19('0x21')](handleEntityNotFound(_0x214c65,null))[_0x7b19('0x21')](function(_0x52edc8){if(_0x52edc8){_0x59e286=_0x52edc8;_0x3170c3[_0x7b19('0x31')]=_[_0x7b19('0x45')](db['DeskField'][_0x7b19('0x2a')]);_0x3170c3[_0x7b19('0x2d')]=_['keys'](_0x395f33[_0x7b19('0x2d')]);_0x3170c3[_0x7b19('0x2e')]=_[_0x7b19('0x2f')](_0x3170c3[_0x7b19('0x31')],_0x3170c3[_0x7b19('0x2d')]);_0x362207[_0x7b19('0x30')]=_['intersection'](_0x3170c3[_0x7b19('0x31')],qs[_0x7b19('0x32')](_0x395f33[_0x7b19('0x2d')][_0x7b19('0x32')]));_0x362207[_0x7b19('0x30')]=_0x362207[_0x7b19('0x30')][_0x7b19('0x33')]?_0x362207[_0x7b19('0x30')]:_0x3170c3[_0x7b19('0x31')];_0x362207[_0x7b19('0x36')]=qs['sort'](_0x395f33[_0x7b19('0x2d')][_0x7b19('0x37')]);_0x362207['where']=qs[_0x7b19('0x2e')](_[_0x7b19('0x39')](_0x395f33[_0x7b19('0x2d')],_0x3170c3[_0x7b19('0x2e')]));if(_0x395f33[_0x7b19('0x2d')][_0x7b19('0x3a')]){_0x362207[_0x7b19('0x38')]=_['merge'](_0x362207[_0x7b19('0x38')],{'$or':_[_0x7b19('0x29')](_0x362207[_0x7b19('0x30')],function(_0x48a3df){var _0x186919={};_0x186919[_0x48a3df]={'$like':'%'+_0x395f33[_0x7b19('0x2d')]['filter']+'%'};return _0x186919;})});}_0x362207=_[_0x7b19('0x3b')]({},_0x362207,_0x395f33[_0x7b19('0x46')]);return _0x59e286[_0x7b19('0x4d')](_0x362207);}})[_0x7b19('0x21')](function(_0x31e87c){if(_0x31e87c){_0x2064b2=_0x31e87c[_0x7b19('0x33')];if(!_0x395f33[_0x7b19('0x2d')][_0x7b19('0x34')](_0x7b19('0x35'))){_0x362207[_0x7b19('0x1c')]=qs[_0x7b19('0x1c')](_0x395f33['query'][_0x7b19('0x1c')]);_0x362207[_0x7b19('0x1b')]=qs[_0x7b19('0x1b')](_0x395f33[_0x7b19('0x2d')]['offset']);}return _0x59e286[_0x7b19('0x4d')](_0x362207);}})[_0x7b19('0x21')](function(_0x3761cd){if(_0x3761cd){return _0x3761cd?{'count':_0x2064b2,'rows':_0x3761cd}:null;}})[_0x7b19('0x21')](respondWithResult(_0x214c65,null))[_0x7b19('0x42')](handleError(_0x214c65,null));};exports['getDescriptions']=function(_0x3c1cfd,_0x54ffb1,_0x5dc88f){var _0x4ecf3a={};var _0x4636c6={};var _0x3938a9;var _0x51cfb9;return db[_0x7b19('0x3d')]['findOne']({'where':{'id':_0x3c1cfd[_0x7b19('0x44')]['id']}})[_0x7b19('0x21')](handleEntityNotFound(_0x54ffb1,null))[_0x7b19('0x21')](function(_0x35a058){if(_0x35a058){_0x3938a9=_0x35a058;_0x4636c6[_0x7b19('0x31')]=_[_0x7b19('0x45')](db[_0x7b19('0x4e')][_0x7b19('0x2a')]);_0x4636c6[_0x7b19('0x2d')]=_[_0x7b19('0x45')](_0x3c1cfd['query']);_0x4636c6[_0x7b19('0x2e')]=_['intersection'](_0x4636c6['model'],_0x4636c6[_0x7b19('0x2d')]);_0x4ecf3a[_0x7b19('0x30')]=_['intersection'](_0x4636c6['model'],qs['fields'](_0x3c1cfd[_0x7b19('0x2d')][_0x7b19('0x32')]));_0x4ecf3a[_0x7b19('0x30')]=_0x4ecf3a[_0x7b19('0x30')][_0x7b19('0x33')]?_0x4ecf3a['attributes']:_0x4636c6[_0x7b19('0x31')];_0x4ecf3a['order']=qs['sort'](_0x3c1cfd[_0x7b19('0x2d')][_0x7b19('0x37')]);_0x4ecf3a[_0x7b19('0x38')]=qs['filters'](_['pick'](_0x3c1cfd[_0x7b19('0x2d')],_0x4636c6[_0x7b19('0x2e')]));if(_0x3c1cfd[_0x7b19('0x2d')][_0x7b19('0x3a')]){_0x4ecf3a[_0x7b19('0x38')]=_[_0x7b19('0x3b')](_0x4ecf3a[_0x7b19('0x38')],{'$or':_['map'](_0x4ecf3a['attributes'],function(_0x168129){var _0x370dc4={};_0x370dc4[_0x168129]={'$like':'%'+_0x3c1cfd[_0x7b19('0x2d')][_0x7b19('0x3a')]+'%'};return _0x370dc4;})});}_0x4ecf3a=_[_0x7b19('0x3b')]({},_0x4ecf3a,_0x3c1cfd['options']);return _0x3938a9[_0x7b19('0x4f')](_0x4ecf3a);}})[_0x7b19('0x21')](function(_0x416eb8){if(_0x416eb8){_0x51cfb9=_0x416eb8[_0x7b19('0x33')];if(!_0x3c1cfd['query'][_0x7b19('0x34')]('nolimit')){_0x4ecf3a[_0x7b19('0x1c')]=qs['limit'](_0x3c1cfd[_0x7b19('0x2d')][_0x7b19('0x1c')]);_0x4ecf3a[_0x7b19('0x1b')]=qs[_0x7b19('0x1b')](_0x3c1cfd[_0x7b19('0x2d')][_0x7b19('0x1b')]);}return _0x3938a9[_0x7b19('0x4f')](_0x4ecf3a);}})[_0x7b19('0x21')](function(_0x5ef452){if(_0x5ef452){return _0x5ef452?{'count':_0x51cfb9,'rows':_0x5ef452}:null;}})[_0x7b19('0x21')](respondWithResult(_0x54ffb1,null))[_0x7b19('0x42')](handleError(_0x54ffb1,null));};exports[_0x7b19('0x50')]=function(_0x2f9499,_0x33a197,_0x365ab6){var _0x4d3bae={};var _0x1c17e4={};var _0x44a3b5;var _0x15dc3a;return db[_0x7b19('0x3d')][_0x7b19('0x4b')]({'where':{'id':_0x2f9499['params']['id']}})['then'](handleEntityNotFound(_0x33a197,null))[_0x7b19('0x21')](function(_0x190b61){if(_0x190b61){_0x44a3b5=_0x190b61;_0x1c17e4[_0x7b19('0x31')]=_['keys'](db[_0x7b19('0x51')][_0x7b19('0x2a')]);_0x1c17e4[_0x7b19('0x2d')]=_[_0x7b19('0x45')](_0x2f9499[_0x7b19('0x2d')]);_0x1c17e4[_0x7b19('0x2e')]=_[_0x7b19('0x2f')](_0x1c17e4['model'],_0x1c17e4[_0x7b19('0x2d')]);_0x4d3bae[_0x7b19('0x30')]=_[_0x7b19('0x2f')](_0x1c17e4['model'],qs[_0x7b19('0x32')](_0x2f9499[_0x7b19('0x2d')][_0x7b19('0x32')]));_0x4d3bae[_0x7b19('0x30')]=_0x4d3bae[_0x7b19('0x30')][_0x7b19('0x33')]?_0x4d3bae['attributes']:_0x1c17e4[_0x7b19('0x31')];_0x4d3bae['order']=qs[_0x7b19('0x37')](_0x2f9499[_0x7b19('0x2d')]['sort']);_0x4d3bae[_0x7b19('0x38')]=qs['filters'](_[_0x7b19('0x39')](_0x2f9499[_0x7b19('0x2d')],_0x1c17e4[_0x7b19('0x2e')]));if(_0x2f9499[_0x7b19('0x2d')][_0x7b19('0x3a')]){_0x4d3bae[_0x7b19('0x38')]=_['merge'](_0x4d3bae['where'],{'$or':_[_0x7b19('0x29')](_0x4d3bae['attributes'],function(_0x21694f){var _0x5a8be5={};_0x5a8be5[_0x21694f]={'$like':'%'+_0x2f9499[_0x7b19('0x2d')][_0x7b19('0x3a')]+'%'};return _0x5a8be5;})});}_0x4d3bae=_[_0x7b19('0x3b')]({},_0x4d3bae,_0x2f9499[_0x7b19('0x46')]);return _0x44a3b5[_0x7b19('0x50')](_0x4d3bae);}})[_0x7b19('0x21')](function(_0x82bcaa){if(_0x82bcaa){_0x15dc3a=_0x82bcaa[_0x7b19('0x33')];if(!_0x2f9499[_0x7b19('0x2d')][_0x7b19('0x34')](_0x7b19('0x35'))){_0x4d3bae[_0x7b19('0x1c')]=qs['limit'](_0x2f9499[_0x7b19('0x2d')][_0x7b19('0x1c')]);_0x4d3bae[_0x7b19('0x1b')]=qs[_0x7b19('0x1b')](_0x2f9499[_0x7b19('0x2d')]['offset']);}return _0x44a3b5[_0x7b19('0x50')](_0x4d3bae);}})['then'](function(_0x561248){if(_0x561248){return _0x561248?{'count':_0x15dc3a,'rows':_0x561248}:null;}})['then'](respondWithResult(_0x33a197,null))[_0x7b19('0x42')](handleError(_0x33a197,null));};exports[_0x7b19('0x52')]=function(_0xf4c0d5,_0x3ed897,_0x3f7925){if(_0xf4c0d5[_0x7b19('0x4a')]['id']){delete _0xf4c0d5[_0x7b19('0x4a')]['id'];}return db[_0x7b19('0x3d')]['findOne']({'where':{'id':_0xf4c0d5[_0x7b19('0x44')]['id']}})[_0x7b19('0x21')](handleEntityNotFound(_0x3ed897,null))['then'](function(_0x1f1a78){if(_0x1f1a78){return _0x1f1a78['setTags'](_0xf4c0d5['body'][_0x7b19('0x53')]||[]);}return null;})[_0x7b19('0x21')](respondWithResult(_0x3ed897,null))[_0x7b19('0x42')](handleError(_0x3ed897,null));};
\ No newline at end of file
+var _0x3a52=['find','getFields','findOne','DeskField','getSubjects','setTags','ids','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','map','rawAttributes','fieldName','key','query','keys','model','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','DeskConfiguration','includeAll','include','findAll','rows','catch','show','params','filters','options','create','body'];(function(_0x9dfc10,_0x19c2d5){var _0x4f938a=function(_0x12b1e5){while(--_0x12b1e5){_0x9dfc10['push'](_0x9dfc10['shift']());}};_0x4f938a(++_0x19c2d5);}(_0x3a52,0x1b5));var _0x23a5=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x3a52[_0x321bb2];return _0x9c12ed;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x23a5('0x0'));var jsonpatch=require(_0x23a5('0x1'));var rp=require(_0x23a5('0x2'));var moment=require(_0x23a5('0x3'));var BPromise=require(_0x23a5('0x4'));var Mustache=require(_0x23a5('0x5'));var util=require(_0x23a5('0x6'));var path=require(_0x23a5('0x7'));var sox=require(_0x23a5('0x8'));var csv=require('to-csv');var ejs=require(_0x23a5('0x9'));var fs=require('fs');var fs_extra=require(_0x23a5('0xa'));var _=require(_0x23a5('0xb'));var squel=require(_0x23a5('0xc'));var crypto=require(_0x23a5('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x23a5('0xe'));var toCsv=require(_0x23a5('0xf'));var querystring=require(_0x23a5('0x10'));var Papa=require('papaparse');var Redis=require(_0x23a5('0x11'));var authService=require(_0x23a5('0x12'));var qs=require(_0x23a5('0x13'));var as=require(_0x23a5('0x14'));var hardwareService=require(_0x23a5('0x15'));var logger=require(_0x23a5('0x16'))(_0x23a5('0x17'));var utils=require(_0x23a5('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0x23a5('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5d3195,_0x3f2540){_0x3f2540=_0x3f2540||0xcc;return function(_0x40c86c){if(_0x40c86c){return _0x5d3195[_0x23a5('0x1a')](_0x3f2540);}return _0x5d3195[_0x23a5('0x1b')](_0x3f2540)[_0x23a5('0x1c')]();};}function respondWithResult(_0x914fbd,_0x55a279){_0x55a279=_0x55a279||0xc8;return function(_0x26a56c){if(_0x26a56c){return _0x914fbd[_0x23a5('0x1b')](_0x55a279)[_0x23a5('0x1d')](_0x26a56c);}};}function respondWithFilteredResult(_0x1e321e,_0x2d9953){return function(_0x5502b9){if(_0x5502b9){var _0x5efb49=typeof _0x2d9953[_0x23a5('0x1e')]===_0x23a5('0x1f')&&typeof _0x2d9953['limit']===_0x23a5('0x1f');var _0x71aa05=_0x5502b9[_0x23a5('0x20')];var _0x5e7d66=_0x5efb49?0x0:_0x2d9953[_0x23a5('0x1e')];var _0x215eee=_0x5efb49?_0x5502b9[_0x23a5('0x20')]:_0x2d9953[_0x23a5('0x1e')]+_0x2d9953[_0x23a5('0x21')];var _0x8dc9a1;if(_0x215eee>=_0x71aa05){_0x215eee=_0x71aa05;_0x8dc9a1=0xc8;}else{_0x8dc9a1=0xce;}_0x1e321e[_0x23a5('0x1b')](_0x8dc9a1);return _0x1e321e[_0x23a5('0x22')](_0x23a5('0x23'),_0x5e7d66+'-'+_0x215eee+'/'+_0x71aa05)['json'](_0x5502b9);}return null;};}function patchUpdates(_0x4dce73){return function(_0x401703){try{jsonpatch[_0x23a5('0x24')](_0x401703,_0x4dce73,!![]);}catch(_0x5a1fa0){return BPromise[_0x23a5('0x25')](_0x5a1fa0);}return _0x401703[_0x23a5('0x26')]();};}function saveUpdates(_0x1c81bb,_0x5a162f){return function(_0x27058c){if(_0x27058c){return _0x27058c[_0x23a5('0x27')](_0x1c81bb)[_0x23a5('0x28')](function(_0x535a44){return _0x535a44;});}return null;};}function removeEntity(_0x5c7629,_0x525bc8){return function(_0x189e2c){if(_0x189e2c){return _0x189e2c[_0x23a5('0x29')]()[_0x23a5('0x28')](function(){_0x5c7629['status'](0xcc)[_0x23a5('0x1c')]();});}};}function handleEntityNotFound(_0x2c1dcf,_0x224a60){return function(_0xd7723e){if(!_0xd7723e){_0x2c1dcf['sendStatus'](0x194);}return _0xd7723e;};}function handleError(_0x4f8e62,_0x5f1e12){_0x5f1e12=_0x5f1e12||0x1f4;return function(_0x31437d){logger[_0x23a5('0x2a')](_0x31437d[_0x23a5('0x2b')]);if(_0x31437d[_0x23a5('0x2c')]){delete _0x31437d[_0x23a5('0x2c')];}_0x4f8e62[_0x23a5('0x1b')](_0x5f1e12)[_0x23a5('0x2d')](_0x31437d);};}exports['index']=function(_0x543adb,_0x574de4){var _0x9b455d={},_0x129b25={},_0x48f1dc={'count':0x0,'rows':[]};var _0x48602d=_[_0x23a5('0x2e')](db['DeskConfiguration'][_0x23a5('0x2f')],function(_0x2a5a57){return{'name':_0x2a5a57[_0x23a5('0x30')],'type':_0x2a5a57['type'][_0x23a5('0x31')]};});_0x129b25['model']=_[_0x23a5('0x2e')](_0x48602d,'name');_0x129b25[_0x23a5('0x32')]=_[_0x23a5('0x33')](_0x543adb[_0x23a5('0x32')]);_0x129b25['filters']=_['intersection'](_0x129b25[_0x23a5('0x34')],_0x129b25[_0x23a5('0x32')]);_0x9b455d[_0x23a5('0x35')]=_[_0x23a5('0x36')](_0x129b25[_0x23a5('0x34')],qs[_0x23a5('0x37')](_0x543adb[_0x23a5('0x32')][_0x23a5('0x37')]));_0x9b455d[_0x23a5('0x35')]=_0x9b455d[_0x23a5('0x35')][_0x23a5('0x38')]?_0x9b455d[_0x23a5('0x35')]:_0x129b25[_0x23a5('0x34')];if(!_0x543adb['query'][_0x23a5('0x39')](_0x23a5('0x3a'))){_0x9b455d[_0x23a5('0x21')]=qs[_0x23a5('0x21')](_0x543adb[_0x23a5('0x32')][_0x23a5('0x21')]);_0x9b455d[_0x23a5('0x1e')]=qs[_0x23a5('0x1e')](_0x543adb[_0x23a5('0x32')]['offset']);}_0x9b455d[_0x23a5('0x3b')]=qs[_0x23a5('0x3c')](_0x543adb[_0x23a5('0x32')][_0x23a5('0x3c')]);_0x9b455d[_0x23a5('0x3d')]=qs['filters'](_[_0x23a5('0x3e')](_0x543adb[_0x23a5('0x32')],_0x129b25['filters']),_0x48602d);if(_0x543adb[_0x23a5('0x32')][_0x23a5('0x3f')]){_0x9b455d['where']=_[_0x23a5('0x40')](_0x9b455d[_0x23a5('0x3d')],{'$or':_[_0x23a5('0x2e')](_0x48602d,function(_0x2a30ea){if(_0x2a30ea[_0x23a5('0x41')]!==_0x23a5('0x42')){var _0x55d188={};_0x55d188[_0x2a30ea[_0x23a5('0x2c')]]={'$like':'%'+_0x543adb[_0x23a5('0x32')][_0x23a5('0x3f')]+'%'};return _0x55d188;}})});}_0x9b455d=_[_0x23a5('0x40')]({},_0x9b455d,_0x543adb['options']);var _0x237845={'where':_0x9b455d['where']};return db[_0x23a5('0x43')]['count'](_0x237845)[_0x23a5('0x28')](function(_0x3dab5d){_0x48f1dc['count']=_0x3dab5d;if(_0x543adb[_0x23a5('0x32')][_0x23a5('0x44')]){_0x9b455d[_0x23a5('0x45')]=[{'all':!![]}];}return db[_0x23a5('0x43')][_0x23a5('0x46')](_0x9b455d);})[_0x23a5('0x28')](function(_0x5ae495){_0x48f1dc[_0x23a5('0x47')]=_0x5ae495;return _0x48f1dc;})[_0x23a5('0x28')](respondWithFilteredResult(_0x574de4,_0x9b455d))[_0x23a5('0x48')](handleError(_0x574de4,null));};exports[_0x23a5('0x49')]=function(_0x2f2ac5,_0x15f1b3){var _0x11d263={'raw':![],'where':{'id':_0x2f2ac5[_0x23a5('0x4a')]['id']}},_0x32cfd8={};_0x32cfd8[_0x23a5('0x34')]=_[_0x23a5('0x33')](db[_0x23a5('0x43')]['rawAttributes']);_0x32cfd8['query']=_[_0x23a5('0x33')](_0x2f2ac5[_0x23a5('0x32')]);_0x32cfd8[_0x23a5('0x4b')]=_[_0x23a5('0x36')](_0x32cfd8[_0x23a5('0x34')],_0x32cfd8[_0x23a5('0x32')]);_0x11d263[_0x23a5('0x35')]=_[_0x23a5('0x36')](_0x32cfd8[_0x23a5('0x34')],qs[_0x23a5('0x37')](_0x2f2ac5[_0x23a5('0x32')][_0x23a5('0x37')]));_0x11d263['attributes']=_0x11d263['attributes'][_0x23a5('0x38')]?_0x11d263[_0x23a5('0x35')]:_0x32cfd8[_0x23a5('0x34')];if(_0x2f2ac5[_0x23a5('0x32')][_0x23a5('0x44')]){_0x11d263[_0x23a5('0x45')]=[{'all':!![]}];}_0x11d263=_[_0x23a5('0x40')]({},_0x11d263,_0x2f2ac5[_0x23a5('0x4c')]);return db[_0x23a5('0x43')]['find'](_0x11d263)[_0x23a5('0x28')](handleEntityNotFound(_0x15f1b3,null))[_0x23a5('0x28')](respondWithResult(_0x15f1b3,null))[_0x23a5('0x48')](handleError(_0x15f1b3,null));};exports[_0x23a5('0x4d')]=function(_0x5b4ff2,_0x1b285e){return db['DeskConfiguration'][_0x23a5('0x4d')](_0x5b4ff2['body'],{})[_0x23a5('0x28')](respondWithResult(_0x1b285e,0xc9))['catch'](handleError(_0x1b285e,null));};exports[_0x23a5('0x27')]=function(_0x54d312,_0x3b08e3){if(_0x54d312[_0x23a5('0x4e')]['id']){delete _0x54d312[_0x23a5('0x4e')]['id'];}return db[_0x23a5('0x43')][_0x23a5('0x4f')]({'where':{'id':_0x54d312[_0x23a5('0x4a')]['id']}})[_0x23a5('0x28')](handleEntityNotFound(_0x3b08e3,null))[_0x23a5('0x28')](saveUpdates(_0x54d312['body'],null))[_0x23a5('0x28')](respondWithResult(_0x3b08e3,null))[_0x23a5('0x48')](handleError(_0x3b08e3,null));};exports[_0x23a5('0x29')]=function(_0x3b6b37,_0x53cba2){return db[_0x23a5('0x43')][_0x23a5('0x4f')]({'where':{'id':_0x3b6b37['params']['id']}})[_0x23a5('0x28')](handleEntityNotFound(_0x53cba2,null))['then'](removeEntity(_0x53cba2,null))['catch'](handleError(_0x53cba2,null));};exports[_0x23a5('0x50')]=function(_0x65e07d,_0x124f1f,_0xf05d16){var _0x49b7f2={};var _0x14b94a={};var _0x477ffe;var _0x5dbffd;return db[_0x23a5('0x43')][_0x23a5('0x51')]({'where':{'id':_0x65e07d[_0x23a5('0x4a')]['id']}})[_0x23a5('0x28')](handleEntityNotFound(_0x124f1f,null))['then'](function(_0x54f9e8){if(_0x54f9e8){_0x477ffe=_0x54f9e8;_0x14b94a[_0x23a5('0x34')]=_[_0x23a5('0x33')](db[_0x23a5('0x52')][_0x23a5('0x2f')]);_0x14b94a['query']=_[_0x23a5('0x33')](_0x65e07d[_0x23a5('0x32')]);_0x14b94a[_0x23a5('0x4b')]=_[_0x23a5('0x36')](_0x14b94a['model'],_0x14b94a[_0x23a5('0x32')]);_0x49b7f2[_0x23a5('0x35')]=_[_0x23a5('0x36')](_0x14b94a['model'],qs[_0x23a5('0x37')](_0x65e07d[_0x23a5('0x32')][_0x23a5('0x37')]));_0x49b7f2['attributes']=_0x49b7f2[_0x23a5('0x35')][_0x23a5('0x38')]?_0x49b7f2[_0x23a5('0x35')]:_0x14b94a['model'];_0x49b7f2['order']=qs[_0x23a5('0x3c')](_0x65e07d[_0x23a5('0x32')][_0x23a5('0x3c')]);_0x49b7f2[_0x23a5('0x3d')]=qs['filters'](_[_0x23a5('0x3e')](_0x65e07d[_0x23a5('0x32')],_0x14b94a[_0x23a5('0x4b')]));if(_0x65e07d[_0x23a5('0x32')][_0x23a5('0x3f')]){_0x49b7f2[_0x23a5('0x3d')]=_[_0x23a5('0x40')](_0x49b7f2[_0x23a5('0x3d')],{'$or':_['map'](_0x49b7f2[_0x23a5('0x35')],function(_0x508c72){var _0x316569={};_0x316569[_0x508c72]={'$like':'%'+_0x65e07d[_0x23a5('0x32')]['filter']+'%'};return _0x316569;})});}_0x49b7f2=_[_0x23a5('0x40')]({},_0x49b7f2,_0x65e07d[_0x23a5('0x4c')]);return _0x477ffe[_0x23a5('0x50')](_0x49b7f2);}})[_0x23a5('0x28')](function(_0x2a7013){if(_0x2a7013){_0x5dbffd=_0x2a7013[_0x23a5('0x38')];if(!_0x65e07d['query']['hasOwnProperty'](_0x23a5('0x3a'))){_0x49b7f2[_0x23a5('0x21')]=qs[_0x23a5('0x21')](_0x65e07d[_0x23a5('0x32')][_0x23a5('0x21')]);_0x49b7f2[_0x23a5('0x1e')]=qs[_0x23a5('0x1e')](_0x65e07d[_0x23a5('0x32')][_0x23a5('0x1e')]);}return _0x477ffe['getFields'](_0x49b7f2);}})[_0x23a5('0x28')](function(_0x25d3d5){if(_0x25d3d5){return _0x25d3d5?{'count':_0x5dbffd,'rows':_0x25d3d5}:null;}})[_0x23a5('0x28')](respondWithResult(_0x124f1f,null))[_0x23a5('0x48')](handleError(_0x124f1f,null));};exports[_0x23a5('0x53')]=function(_0x5631a4,_0x7121b2,_0x57c217){var _0x2565ad={};var _0x1c2798={};var _0x4b9f0c;var _0x22f09b;return db[_0x23a5('0x43')][_0x23a5('0x51')]({'where':{'id':_0x5631a4[_0x23a5('0x4a')]['id']}})['then'](handleEntityNotFound(_0x7121b2,null))[_0x23a5('0x28')](function(_0x2cc96b){if(_0x2cc96b){_0x4b9f0c=_0x2cc96b;_0x1c2798[_0x23a5('0x34')]=_[_0x23a5('0x33')](db[_0x23a5('0x52')][_0x23a5('0x2f')]);_0x1c2798[_0x23a5('0x32')]=_['keys'](_0x5631a4[_0x23a5('0x32')]);_0x1c2798[_0x23a5('0x4b')]=_[_0x23a5('0x36')](_0x1c2798[_0x23a5('0x34')],_0x1c2798['query']);_0x2565ad[_0x23a5('0x35')]=_['intersection'](_0x1c2798[_0x23a5('0x34')],qs['fields'](_0x5631a4[_0x23a5('0x32')][_0x23a5('0x37')]));_0x2565ad[_0x23a5('0x35')]=_0x2565ad[_0x23a5('0x35')][_0x23a5('0x38')]?_0x2565ad['attributes']:_0x1c2798[_0x23a5('0x34')];_0x2565ad[_0x23a5('0x3b')]=qs[_0x23a5('0x3c')](_0x5631a4[_0x23a5('0x32')][_0x23a5('0x3c')]);_0x2565ad['where']=qs[_0x23a5('0x4b')](_[_0x23a5('0x3e')](_0x5631a4[_0x23a5('0x32')],_0x1c2798[_0x23a5('0x4b')]));if(_0x5631a4[_0x23a5('0x32')][_0x23a5('0x3f')]){_0x2565ad['where']=_[_0x23a5('0x40')](_0x2565ad[_0x23a5('0x3d')],{'$or':_['map'](_0x2565ad[_0x23a5('0x35')],function(_0x4f050a){var _0x5caabf={};_0x5caabf[_0x4f050a]={'$like':'%'+_0x5631a4[_0x23a5('0x32')][_0x23a5('0x3f')]+'%'};return _0x5caabf;})});}_0x2565ad=_['merge']({},_0x2565ad,_0x5631a4[_0x23a5('0x4c')]);return _0x4b9f0c[_0x23a5('0x53')](_0x2565ad);}})[_0x23a5('0x28')](function(_0x2233ed){if(_0x2233ed){_0x22f09b=_0x2233ed[_0x23a5('0x38')];if(!_0x5631a4[_0x23a5('0x32')][_0x23a5('0x39')](_0x23a5('0x3a'))){_0x2565ad[_0x23a5('0x21')]=qs[_0x23a5('0x21')](_0x5631a4['query'][_0x23a5('0x21')]);_0x2565ad['offset']=qs[_0x23a5('0x1e')](_0x5631a4[_0x23a5('0x32')][_0x23a5('0x1e')]);}return _0x4b9f0c[_0x23a5('0x53')](_0x2565ad);}})[_0x23a5('0x28')](function(_0x3b1ea0){if(_0x3b1ea0){return _0x3b1ea0?{'count':_0x22f09b,'rows':_0x3b1ea0}:null;}})['then'](respondWithResult(_0x7121b2,null))['catch'](handleError(_0x7121b2,null));};exports['getDescriptions']=function(_0x3a2d39,_0x7fc311,_0x23153a){var _0x518a54={};var _0x130290={};var _0x116c7d;var _0x5d1d60;return db[_0x23a5('0x43')][_0x23a5('0x51')]({'where':{'id':_0x3a2d39[_0x23a5('0x4a')]['id']}})[_0x23a5('0x28')](handleEntityNotFound(_0x7fc311,null))['then'](function(_0x1ee6bc){if(_0x1ee6bc){_0x116c7d=_0x1ee6bc;_0x130290['model']=_[_0x23a5('0x33')](db['DeskField']['rawAttributes']);_0x130290[_0x23a5('0x32')]=_['keys'](_0x3a2d39[_0x23a5('0x32')]);_0x130290[_0x23a5('0x4b')]=_[_0x23a5('0x36')](_0x130290['model'],_0x130290['query']);_0x518a54[_0x23a5('0x35')]=_['intersection'](_0x130290[_0x23a5('0x34')],qs[_0x23a5('0x37')](_0x3a2d39[_0x23a5('0x32')][_0x23a5('0x37')]));_0x518a54[_0x23a5('0x35')]=_0x518a54[_0x23a5('0x35')][_0x23a5('0x38')]?_0x518a54['attributes']:_0x130290[_0x23a5('0x34')];_0x518a54[_0x23a5('0x3b')]=qs[_0x23a5('0x3c')](_0x3a2d39[_0x23a5('0x32')][_0x23a5('0x3c')]);_0x518a54[_0x23a5('0x3d')]=qs[_0x23a5('0x4b')](_['pick'](_0x3a2d39[_0x23a5('0x32')],_0x130290[_0x23a5('0x4b')]));if(_0x3a2d39[_0x23a5('0x32')][_0x23a5('0x3f')]){_0x518a54[_0x23a5('0x3d')]=_[_0x23a5('0x40')](_0x518a54[_0x23a5('0x3d')],{'$or':_[_0x23a5('0x2e')](_0x518a54[_0x23a5('0x35')],function(_0x23c381){var _0x348280={};_0x348280[_0x23c381]={'$like':'%'+_0x3a2d39['query'][_0x23a5('0x3f')]+'%'};return _0x348280;})});}_0x518a54=_[_0x23a5('0x40')]({},_0x518a54,_0x3a2d39['options']);return _0x116c7d['getDescriptions'](_0x518a54);}})[_0x23a5('0x28')](function(_0xaa6747){if(_0xaa6747){_0x5d1d60=_0xaa6747[_0x23a5('0x38')];if(!_0x3a2d39['query'][_0x23a5('0x39')](_0x23a5('0x3a'))){_0x518a54['limit']=qs[_0x23a5('0x21')](_0x3a2d39[_0x23a5('0x32')]['limit']);_0x518a54['offset']=qs[_0x23a5('0x1e')](_0x3a2d39[_0x23a5('0x32')][_0x23a5('0x1e')]);}return _0x116c7d['getDescriptions'](_0x518a54);}})[_0x23a5('0x28')](function(_0x13cf7e){if(_0x13cf7e){return _0x13cf7e?{'count':_0x5d1d60,'rows':_0x13cf7e}:null;}})[_0x23a5('0x28')](respondWithResult(_0x7fc311,null))['catch'](handleError(_0x7fc311,null));};exports['getTags']=function(_0x3682c7,_0x472263,_0x349fda){var _0x4fde35={};var _0x577428={};var _0x47e4db;var _0x2177b5;return db[_0x23a5('0x43')][_0x23a5('0x51')]({'where':{'id':_0x3682c7[_0x23a5('0x4a')]['id']}})['then'](handleEntityNotFound(_0x472263,null))[_0x23a5('0x28')](function(_0x326882){if(_0x326882){_0x47e4db=_0x326882;_0x577428[_0x23a5('0x34')]=_[_0x23a5('0x33')](db['Tag'][_0x23a5('0x2f')]);_0x577428[_0x23a5('0x32')]=_['keys'](_0x3682c7['query']);_0x577428[_0x23a5('0x4b')]=_[_0x23a5('0x36')](_0x577428['model'],_0x577428[_0x23a5('0x32')]);_0x4fde35[_0x23a5('0x35')]=_[_0x23a5('0x36')](_0x577428[_0x23a5('0x34')],qs['fields'](_0x3682c7[_0x23a5('0x32')]['fields']));_0x4fde35[_0x23a5('0x35')]=_0x4fde35[_0x23a5('0x35')][_0x23a5('0x38')]?_0x4fde35['attributes']:_0x577428[_0x23a5('0x34')];_0x4fde35[_0x23a5('0x3b')]=qs[_0x23a5('0x3c')](_0x3682c7[_0x23a5('0x32')][_0x23a5('0x3c')]);_0x4fde35[_0x23a5('0x3d')]=qs[_0x23a5('0x4b')](_[_0x23a5('0x3e')](_0x3682c7[_0x23a5('0x32')],_0x577428[_0x23a5('0x4b')]));if(_0x3682c7['query'][_0x23a5('0x3f')]){_0x4fde35['where']=_[_0x23a5('0x40')](_0x4fde35[_0x23a5('0x3d')],{'$or':_['map'](_0x4fde35[_0x23a5('0x35')],function(_0x1357c4){var _0x491dba={};_0x491dba[_0x1357c4]={'$like':'%'+_0x3682c7['query'][_0x23a5('0x3f')]+'%'};return _0x491dba;})});}_0x4fde35=_[_0x23a5('0x40')]({},_0x4fde35,_0x3682c7[_0x23a5('0x4c')]);return _0x47e4db['getTags'](_0x4fde35);}})[_0x23a5('0x28')](function(_0x5d76bf){if(_0x5d76bf){_0x2177b5=_0x5d76bf['length'];if(!_0x3682c7[_0x23a5('0x32')][_0x23a5('0x39')](_0x23a5('0x3a'))){_0x4fde35[_0x23a5('0x21')]=qs[_0x23a5('0x21')](_0x3682c7[_0x23a5('0x32')][_0x23a5('0x21')]);_0x4fde35['offset']=qs[_0x23a5('0x1e')](_0x3682c7[_0x23a5('0x32')][_0x23a5('0x1e')]);}return _0x47e4db['getTags'](_0x4fde35);}})['then'](function(_0x351379){if(_0x351379){return _0x351379?{'count':_0x2177b5,'rows':_0x351379}:null;}})[_0x23a5('0x28')](respondWithResult(_0x472263,null))['catch'](handleError(_0x472263,null));};exports[_0x23a5('0x54')]=function(_0x1e41df,_0x438fd9,_0x2d3b19){if(_0x1e41df['body']['id']){delete _0x1e41df[_0x23a5('0x4e')]['id'];}return db[_0x23a5('0x43')]['findOne']({'where':{'id':_0x1e41df[_0x23a5('0x4a')]['id']}})[_0x23a5('0x28')](handleEntityNotFound(_0x438fd9,null))[_0x23a5('0x28')](function(_0x14446f){if(_0x14446f){return _0x14446f[_0x23a5('0x54')](_0x1e41df[_0x23a5('0x4e')][_0x23a5('0x55')]||[]);}return null;})[_0x23a5('0x28')](respondWithResult(_0x438fd9,null))[_0x23a5('0x48')](handleError(_0x438fd9,null));};
\ No newline at end of file
index f1e6175..fac75b6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9d26=['moment','bluebird','request-promise','rimraf','./intDeskConfiguration.attributes','exports','define','DeskConfiguration','int_desk_configurations','lodash','../../config/logger','api'];(function(_0x10c51f,_0x11270f){var _0x56a0cd=function(_0x563ac6){while(--_0x563ac6){_0x10c51f['push'](_0x10c51f['shift']());}};_0x56a0cd(++_0x11270f);}(_0x9d26,0x17d));var _0x69d2=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x9d26[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x69d2('0x0'));var util=require('util');var logger=require(_0x69d2('0x1'))(_0x69d2('0x2'));var moment=require(_0x69d2('0x3'));var BPromise=require(_0x69d2('0x4'));var rp=require(_0x69d2('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x69d2('0x6'));var config=require('../../config/environment');var attributes=require(_0x69d2('0x7'));module[_0x69d2('0x8')]=function(_0x433136,_0x4f55b0){return _0x433136[_0x69d2('0x9')](_0x69d2('0xa'),attributes,{'tableName':_0x69d2('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xdf03=['path','rimraf','./intDeskConfiguration.attributes','DeskConfiguration','int_desk_configurations','lodash','util','../../config/logger','moment','bluebird','request-promise'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xdf03,0x73));var _0x3df0=function(_0x1c3370,_0xf617e8){_0x1c3370=_0x1c3370-0x0;var _0xa9b358=_0xdf03[_0x1c3370];return _0xa9b358;};'use strict';var _=require(_0x3df0('0x0'));var util=require(_0x3df0('0x1'));var logger=require(_0x3df0('0x2'))('api');var moment=require(_0x3df0('0x3'));var BPromise=require(_0x3df0('0x4'));var rp=require(_0x3df0('0x5'));var fs=require('fs');var path=require(_0x3df0('0x6'));var rimraf=require(_0x3df0('0x7'));var config=require('../../config/environment');var attributes=require(_0x3df0('0x8'));module['exports']=function(_0x3d20c1,_0x7e0fd8){return _0x3d20c1['define'](_0x3df0('0x9'),attributes,{'tableName':_0x3df0('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 9969254..1efb859 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xce2f=['../../mysqldb','../../config/logger','../../config/environment','client','http','request','info','request\x20sent','DeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','message','DeskConfiguration,\x20%s,\x20%s','catch','util','moment','bluebird','randomstring','ioredis'];(function(_0x1ba865,_0x110d26){var _0x35a964=function(_0x221267){while(--_0x221267){_0x1ba865['push'](_0x1ba865['shift']());}};_0x35a964(++_0x110d26);}(_0xce2f,0x18a));var _0xfce2=function(_0x3dcac4,_0x4819b0){_0x3dcac4=_0x3dcac4-0x0;var _0x5d68f4=_0xce2f[_0x3dcac4];return _0x5d68f4;};'use strict';var _=require('lodash');var util=require(_0xfce2('0x0'));var moment=require(_0xfce2('0x1'));var BPromise=require(_0xfce2('0x2'));var rs=require(_0xfce2('0x3'));var fs=require('fs');var Redis=require(_0xfce2('0x4'));var db=require(_0xfce2('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xfce2('0x6'))('rpc');var config=require(_0xfce2('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xfce2('0x8')][_0xfce2('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x13c378,_0x741a25,_0x442065){return new BPromise(function(_0x458b85,_0x27f1d1){return client[_0xfce2('0xa')](_0x13c378,_0x442065)['then'](function(_0x5ce1d6){logger[_0xfce2('0xb')]('DeskConfiguration,\x20%s,\x20%s',_0x741a25,_0xfce2('0xc'));logger['debug'](_0xfce2('0xd'),_0x741a25,'request\x20sent',JSON[_0xfce2('0xe')](_0x5ce1d6));if(_0x5ce1d6[_0xfce2('0xf')]){if(_0x5ce1d6[_0xfce2('0xf')]['code']===0x1f4){logger[_0xfce2('0xf')]('DeskConfiguration,\x20%s,\x20%s',_0x741a25,_0x5ce1d6[_0xfce2('0xf')][_0xfce2('0x10')]);return _0x27f1d1(_0x5ce1d6[_0xfce2('0xf')][_0xfce2('0x10')]);}logger[_0xfce2('0xf')](_0xfce2('0x11'),_0x741a25,_0x5ce1d6[_0xfce2('0xf')]['message']);return _0x458b85(_0x5ce1d6[_0xfce2('0xf')][_0xfce2('0x10')]);}else{logger['info'](_0xfce2('0x11'),_0x741a25,_0xfce2('0xc'));_0x458b85(_0x5ce1d6['result']['message']);}})[_0xfce2('0x12')](function(_0x4495be){logger['error'](_0xfce2('0x11'),_0x741a25,_0x4495be);_0x27f1d1(_0x4495be);});});}
\ No newline at end of file
+var _0xa413=['result','catch','lodash','moment','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','request\x20sent','DeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','DeskConfiguration,\x20%s,\x20%s','message','info'];(function(_0x1f782d,_0x5906b8){var _0x228cce=function(_0x3036cc){while(--_0x3036cc){_0x1f782d['push'](_0x1f782d['shift']());}};_0x228cce(++_0x5906b8);}(_0xa413,0x1e5));var _0x3a41=function(_0x34a89a,_0x547e48){_0x34a89a=_0x34a89a-0x0;var _0x378dd3=_0xa413[_0x34a89a];return _0x378dd3;};'use strict';var _=require(_0x3a41('0x0'));var util=require('util');var moment=require(_0x3a41('0x1'));var BPromise=require('bluebird');var rs=require(_0x3a41('0x2'));var fs=require('fs');var Redis=require(_0x3a41('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x3a41('0x4'))(_0x3a41('0x5'));var config=require(_0x3a41('0x6'));var jayson=require(_0x3a41('0x7'));var client=jayson[_0x3a41('0x8')][_0x3a41('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x45f6d2,_0x407d52,_0xca7253){return new BPromise(function(_0x473cd2,_0x27c2e5){return client['request'](_0x45f6d2,_0xca7253)[_0x3a41('0xa')](function(_0x570304){logger['info']('DeskConfiguration,\x20%s,\x20%s',_0x407d52,_0x3a41('0xb'));logger['debug'](_0x3a41('0xc'),_0x407d52,'request\x20sent',JSON[_0x3a41('0xd')](_0x570304));if(_0x570304[_0x3a41('0xe')]){if(_0x570304['error'][_0x3a41('0xf')]===0x1f4){logger[_0x3a41('0xe')](_0x3a41('0x10'),_0x407d52,_0x570304[_0x3a41('0xe')][_0x3a41('0x11')]);return _0x27c2e5(_0x570304['error'][_0x3a41('0x11')]);}logger[_0x3a41('0xe')](_0x3a41('0x10'),_0x407d52,_0x570304[_0x3a41('0xe')][_0x3a41('0x11')]);return _0x473cd2(_0x570304[_0x3a41('0xe')][_0x3a41('0x11')]);}else{logger[_0x3a41('0x12')](_0x3a41('0x10'),_0x407d52,_0x3a41('0xb'));_0x473cd2(_0x570304[_0x3a41('0x13')]['message']);}})[_0x3a41('0x14')](function(_0x30d675){logger['error']('DeskConfiguration,\x20%s,\x20%s',_0x407d52,_0x30d675);_0x27c2e5(_0x30d675);});});}
\ No newline at end of file
index e4aa0c9..65b054b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x173c=['isAuthenticated','destroy','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./intDeskField.controller','get','/:id','show','post','update'];(function(_0x42ea94,_0x127f76){var _0x269d12=function(_0x108ada){while(--_0x108ada){_0x42ea94['push'](_0x42ea94['shift']());}};_0x269d12(++_0x127f76);}(_0x173c,0xf2));var _0xc173=function(_0x4dd092,_0x459ce1){_0x4dd092=_0x4dd092-0x0;var _0x5d1086=_0x173c[_0x4dd092];return _0x5d1086;};'use strict';var multer=require(_0xc173('0x0'));var util=require(_0xc173('0x1'));var path=require(_0xc173('0x2'));var timeout=require(_0xc173('0x3'));var express=require(_0xc173('0x4'));var router=express[_0xc173('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xc173('0x6'));var config=require(_0xc173('0x7'));var controller=require(_0xc173('0x8'));router[_0xc173('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0xc173('0x9')](_0xc173('0xa'),auth['isAuthenticated'](),controller[_0xc173('0xb')]);router[_0xc173('0xc')]('/',auth['isAuthenticated'](),controller['create']);router['put']('/:id',auth['isAuthenticated'](),controller[_0xc173('0xd')]);router['delete'](_0xc173('0xa'),auth[_0xc173('0xe')](),controller[_0xc173('0xf')]);module['exports']=router;
\ No newline at end of file
+var _0x51c5=['../../components/auth/service','../../components/interaction/service','../../config/environment','./intDeskField.controller','get','isAuthenticated','/:id','show','post','create','put','destroy','exports','path','connect-timeout','express','Router'];(function(_0x194810,_0x18ca17){var _0x321409=function(_0x51b113){while(--_0x51b113){_0x194810['push'](_0x194810['shift']());}};_0x321409(++_0x18ca17);}(_0x51c5,0xc8));var _0x551c=function(_0x5627e1,_0x1b2dbf){_0x5627e1=_0x5627e1-0x0;var _0x2f013f=_0x51c5[_0x5627e1];return _0x2f013f;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x551c('0x0'));var timeout=require(_0x551c('0x1'));var express=require(_0x551c('0x2'));var router=express[_0x551c('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x551c('0x4'));var interaction=require(_0x551c('0x5'));var config=require(_0x551c('0x6'));var controller=require(_0x551c('0x7'));router[_0x551c('0x8')]('/',auth[_0x551c('0x9')](),controller['index']);router[_0x551c('0x8')](_0x551c('0xa'),auth[_0x551c('0x9')](),controller[_0x551c('0xb')]);router[_0x551c('0xc')]('/',auth[_0x551c('0x9')](),controller[_0x551c('0xd')]);router[_0x551c('0xe')](_0x551c('0xa'),auth[_0x551c('0x9')](),controller['update']);router['delete'](_0x551c('0xa'),auth['isAuthenticated'](),controller[_0x551c('0xf')]);module[_0x551c('0x10')]=router;
\ No newline at end of file
index 1e0d178..6887d79 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9a61=['customVariable','keyValue','string','STRING','variable','BOOLEAN','sequelize','ENUM'];(function(_0x9e76d,_0x44e7a0){var _0x320985=function(_0x32c6c9){while(--_0x32c6c9){_0x9e76d['push'](_0x9e76d['shift']());}};_0x320985(++_0x44e7a0);}(_0x9a61,0x1ce));var _0x19a6=function(_0x57b10f,_0x39543b){_0x57b10f=_0x57b10f-0x0;var _0x4fdf86=_0x9a61[_0x57b10f];return _0x4fdf86;};'use strict';var Sequelize=require(_0x19a6('0x0'));module['exports']={'type':{'type':Sequelize[_0x19a6('0x1')]('string','variable',_0x19a6('0x2'),_0x19a6('0x3'),'picklist'),'defaultValue':_0x19a6('0x4')},'content':{'type':Sequelize[_0x19a6('0x5')]},'key':{'type':Sequelize[_0x19a6('0x5')]},'keyType':{'type':Sequelize[_0x19a6('0x1')](_0x19a6('0x4'),_0x19a6('0x6'),_0x19a6('0x2'))},'keyContent':{'type':Sequelize[_0x19a6('0x5')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0x19a6('0x5')]},'customField':{'type':Sequelize[_0x19a6('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x19a6('0x5')]}};
\ No newline at end of file
+var _0x0a5a=['variable','customVariable','picklist','string','STRING','exports'];(function(_0x329397,_0x102228){var _0x126bf9=function(_0x54215c){while(--_0x54215c){_0x329397['push'](_0x329397['shift']());}};_0x126bf9(++_0x102228);}(_0x0a5a,0x1e5));var _0xa0a5=function(_0x4f3f44,_0x27f107){_0x4f3f44=_0x4f3f44-0x0;var _0x2d98d1=_0x0a5a[_0x4f3f44];return _0x2d98d1;};'use strict';var Sequelize=require('sequelize');module[_0xa0a5('0x0')]={'type':{'type':Sequelize['ENUM']('string',_0xa0a5('0x1'),_0xa0a5('0x2'),'keyValue',_0xa0a5('0x3')),'defaultValue':_0xa0a5('0x4')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize[_0xa0a5('0x5')]},'keyType':{'type':Sequelize['ENUM']('string',_0xa0a5('0x1'),_0xa0a5('0x2'))},'keyContent':{'type':Sequelize[_0xa0a5('0x5')]},'idField':{'type':Sequelize[_0xa0a5('0x5')]},'nameField':{'type':Sequelize[_0xa0a5('0x5')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 640498d..e12208e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe9e5=['filters','intersection','model','fields','attributes','length','query','hasOwnProperty','nolimit','sort','where','filter','merge','options','include','findAll','rows','catch','show','params','includeAll','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','to-csv','ejs','fs-extra','lodash','squel','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/environment','../../config/license/util','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','update','then','destroy','end','error','stack','name','send','map','DeskField','rawAttributes','fieldName','type','keys'];(function(_0x50c492,_0x5c1e67){var _0x3505a8=function(_0x2f7937){while(--_0x2f7937){_0x50c492['push'](_0x50c492['shift']());}};_0x3505a8(++_0x5c1e67);}(_0xe9e5,0x138));var _0x5e9e=function(_0x23983a,_0x38947d){_0x23983a=_0x23983a-0x0;var _0x127ff1=_0xe9e5[_0x23983a];return _0x127ff1;};'use strict';var emlformat=require(_0x5e9e('0x0'));var rimraf=require(_0x5e9e('0x1'));var zipdir=require(_0x5e9e('0x2'));var jsonpatch=require(_0x5e9e('0x3'));var rp=require(_0x5e9e('0x4'));var moment=require(_0x5e9e('0x5'));var BPromise=require(_0x5e9e('0x6'));var Mustache=require('mustache');var util=require(_0x5e9e('0x7'));var path=require(_0x5e9e('0x8'));var sox=require('sox');var csv=require(_0x5e9e('0x9'));var ejs=require(_0x5e9e('0xa'));var fs=require('fs');var fs_extra=require(_0x5e9e('0xb'));var _=require(_0x5e9e('0xc'));var squel=require(_0x5e9e('0xd'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x5e9e('0xe'));var toCsv=require(_0x5e9e('0x9'));var querystring=require(_0x5e9e('0xf'));var Papa=require('papaparse');var Redis=require(_0x5e9e('0x10'));var authService=require(_0x5e9e('0x11'));var qs=require(_0x5e9e('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x5e9e('0x13'));var logger=require('../../config/logger')(_0x5e9e('0x14'));var utils=require('../../config/utils');var config=require(_0x5e9e('0x15'));var licenseUtil=require(_0x5e9e('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3e03d3,_0x48850c){_0x48850c=_0x48850c||0xcc;return function(_0x2a6442){if(_0x2a6442){return _0x3e03d3[_0x5e9e('0x17')](_0x48850c);}return _0x3e03d3[_0x5e9e('0x18')](_0x48850c)['end']();};}function respondWithResult(_0x5cc1af,_0xac65f5){_0xac65f5=_0xac65f5||0xc8;return function(_0x9dc7fd){if(_0x9dc7fd){return _0x5cc1af[_0x5e9e('0x18')](_0xac65f5)[_0x5e9e('0x19')](_0x9dc7fd);}};}function respondWithFilteredResult(_0x1b6475,_0x1d9955){return function(_0x124a46){if(_0x124a46){var _0x333db7=typeof _0x1d9955[_0x5e9e('0x1a')]===_0x5e9e('0x1b')&&typeof _0x1d9955[_0x5e9e('0x1c')]===_0x5e9e('0x1b');var _0x3f0542=_0x124a46[_0x5e9e('0x1d')];var _0x4516c9=_0x333db7?0x0:_0x1d9955[_0x5e9e('0x1a')];var _0x481c95=_0x333db7?_0x124a46['count']:_0x1d9955['offset']+_0x1d9955[_0x5e9e('0x1c')];var _0x2cddee;if(_0x481c95>=_0x3f0542){_0x481c95=_0x3f0542;_0x2cddee=0xc8;}else{_0x2cddee=0xce;}_0x1b6475[_0x5e9e('0x18')](_0x2cddee);return _0x1b6475[_0x5e9e('0x1e')](_0x5e9e('0x1f'),_0x4516c9+'-'+_0x481c95+'/'+_0x3f0542)[_0x5e9e('0x19')](_0x124a46);}return null;};}function patchUpdates(_0x4f8146){return function(_0x2b64b7){try{jsonpatch[_0x5e9e('0x20')](_0x2b64b7,_0x4f8146,!![]);}catch(_0xa3349f){return BPromise[_0x5e9e('0x21')](_0xa3349f);}return _0x2b64b7['save']();};}function saveUpdates(_0x5b59b3,_0xdf3a98){return function(_0x360f2d){if(_0x360f2d){return _0x360f2d[_0x5e9e('0x22')](_0x5b59b3)[_0x5e9e('0x23')](function(_0x2b8ef4){return _0x2b8ef4;});}return null;};}function removeEntity(_0xc4e3c4,_0x5048c7){return function(_0x31bbe9){if(_0x31bbe9){return _0x31bbe9[_0x5e9e('0x24')]()['then'](function(){_0xc4e3c4[_0x5e9e('0x18')](0xcc)[_0x5e9e('0x25')]();});}};}function handleEntityNotFound(_0x2a5e5b,_0x55f0c5){return function(_0x9358cd){if(!_0x9358cd){_0x2a5e5b[_0x5e9e('0x17')](0x194);}return _0x9358cd;};}function handleError(_0x5f329a,_0x5e7eff){_0x5e7eff=_0x5e7eff||0x1f4;return function(_0x57d2d4){logger[_0x5e9e('0x26')](_0x57d2d4[_0x5e9e('0x27')]);if(_0x57d2d4[_0x5e9e('0x28')]){delete _0x57d2d4['name'];}_0x5f329a[_0x5e9e('0x18')](_0x5e7eff)[_0x5e9e('0x29')](_0x57d2d4);};}exports['index']=function(_0x481402,_0x2e6cca){var _0x2c0123={},_0xe880a1={},_0xfc5430={'count':0x0,'rows':[]};var _0x59b7fd=_[_0x5e9e('0x2a')](db[_0x5e9e('0x2b')][_0x5e9e('0x2c')],function(_0x57bc32){return{'name':_0x57bc32[_0x5e9e('0x2d')],'type':_0x57bc32[_0x5e9e('0x2e')]['key']};});_0xe880a1['model']=_[_0x5e9e('0x2a')](_0x59b7fd,_0x5e9e('0x28'));_0xe880a1['query']=_[_0x5e9e('0x2f')](_0x481402['query']);_0xe880a1[_0x5e9e('0x30')]=_[_0x5e9e('0x31')](_0xe880a1[_0x5e9e('0x32')],_0xe880a1['query']);_0x2c0123['attributes']=_[_0x5e9e('0x31')](_0xe880a1[_0x5e9e('0x32')],qs['fields'](_0x481402['query'][_0x5e9e('0x33')]));_0x2c0123[_0x5e9e('0x34')]=_0x2c0123[_0x5e9e('0x34')][_0x5e9e('0x35')]?_0x2c0123[_0x5e9e('0x34')]:_0xe880a1[_0x5e9e('0x32')];if(!_0x481402[_0x5e9e('0x36')][_0x5e9e('0x37')](_0x5e9e('0x38'))){_0x2c0123[_0x5e9e('0x1c')]=qs[_0x5e9e('0x1c')](_0x481402[_0x5e9e('0x36')][_0x5e9e('0x1c')]);_0x2c0123[_0x5e9e('0x1a')]=qs[_0x5e9e('0x1a')](_0x481402['query']['offset']);}_0x2c0123['order']=qs[_0x5e9e('0x39')](_0x481402['query'][_0x5e9e('0x39')]);_0x2c0123[_0x5e9e('0x3a')]=qs['filters'](_['pick'](_0x481402['query'],_0xe880a1[_0x5e9e('0x30')]),_0x59b7fd);if(_0x481402['query'][_0x5e9e('0x3b')]){_0x2c0123[_0x5e9e('0x3a')]=_[_0x5e9e('0x3c')](_0x2c0123[_0x5e9e('0x3a')],{'$or':_['map'](_0x59b7fd,function(_0x182eec){if(_0x182eec[_0x5e9e('0x2e')]!=='VIRTUAL'){var _0x1b278d={};_0x1b278d[_0x182eec[_0x5e9e('0x28')]]={'$like':'%'+_0x481402[_0x5e9e('0x36')]['filter']+'%'};return _0x1b278d;}})});}_0x2c0123=_[_0x5e9e('0x3c')]({},_0x2c0123,_0x481402[_0x5e9e('0x3d')]);var _0x227a69={'where':_0x2c0123[_0x5e9e('0x3a')]};return db[_0x5e9e('0x2b')][_0x5e9e('0x1d')](_0x227a69)['then'](function(_0x364de6){_0xfc5430[_0x5e9e('0x1d')]=_0x364de6;if(_0x481402[_0x5e9e('0x36')]['includeAll']){_0x2c0123[_0x5e9e('0x3e')]=[{'all':!![]}];}return db[_0x5e9e('0x2b')][_0x5e9e('0x3f')](_0x2c0123);})[_0x5e9e('0x23')](function(_0x59549f){_0xfc5430[_0x5e9e('0x40')]=_0x59549f;return _0xfc5430;})[_0x5e9e('0x23')](respondWithFilteredResult(_0x2e6cca,_0x2c0123))[_0x5e9e('0x41')](handleError(_0x2e6cca,null));};exports[_0x5e9e('0x42')]=function(_0x7563e1,_0x45e2cc){var _0x5c5dd9={'raw':!![],'where':{'id':_0x7563e1[_0x5e9e('0x43')]['id']}},_0x4a5def={};_0x4a5def[_0x5e9e('0x32')]=_[_0x5e9e('0x2f')](db[_0x5e9e('0x2b')][_0x5e9e('0x2c')]);_0x4a5def['query']=_['keys'](_0x7563e1[_0x5e9e('0x36')]);_0x4a5def['filters']=_[_0x5e9e('0x31')](_0x4a5def[_0x5e9e('0x32')],_0x4a5def['query']);_0x5c5dd9[_0x5e9e('0x34')]=_[_0x5e9e('0x31')](_0x4a5def[_0x5e9e('0x32')],qs[_0x5e9e('0x33')](_0x7563e1[_0x5e9e('0x36')]['fields']));_0x5c5dd9['attributes']=_0x5c5dd9[_0x5e9e('0x34')][_0x5e9e('0x35')]?_0x5c5dd9[_0x5e9e('0x34')]:_0x4a5def['model'];if(_0x7563e1[_0x5e9e('0x36')][_0x5e9e('0x44')]){_0x5c5dd9[_0x5e9e('0x3e')]=[{'all':!![]}];}_0x5c5dd9=_['merge']({},_0x5c5dd9,_0x7563e1[_0x5e9e('0x3d')]);return db[_0x5e9e('0x2b')][_0x5e9e('0x45')](_0x5c5dd9)[_0x5e9e('0x23')](handleEntityNotFound(_0x45e2cc,null))[_0x5e9e('0x23')](respondWithResult(_0x45e2cc,null))[_0x5e9e('0x41')](handleError(_0x45e2cc,null));};exports[_0x5e9e('0x46')]=function(_0x5f0b8d,_0x30ac7d){return db[_0x5e9e('0x2b')][_0x5e9e('0x46')](_0x5f0b8d['body'],{})[_0x5e9e('0x23')](respondWithResult(_0x30ac7d,0xc9))[_0x5e9e('0x41')](handleError(_0x30ac7d,null));};exports[_0x5e9e('0x22')]=function(_0x308730,_0x28faef){if(_0x308730[_0x5e9e('0x47')]['id']){delete _0x308730[_0x5e9e('0x47')]['id'];}return db['DeskField'][_0x5e9e('0x45')]({'where':{'id':_0x308730[_0x5e9e('0x43')]['id']}})['then'](handleEntityNotFound(_0x28faef,null))[_0x5e9e('0x23')](saveUpdates(_0x308730['body'],null))[_0x5e9e('0x23')](respondWithResult(_0x28faef,null))['catch'](handleError(_0x28faef,null));};exports[_0x5e9e('0x24')]=function(_0x24493f,_0x587d3d){return db[_0x5e9e('0x2b')]['find']({'where':{'id':_0x24493f['params']['id']}})[_0x5e9e('0x23')](handleEntityNotFound(_0x587d3d,null))[_0x5e9e('0x23')](removeEntity(_0x587d3d,null))['catch'](handleError(_0x587d3d,null));};
\ No newline at end of file
+var _0x49c1=['save','update','then','destroy','sendStatus','error','stack','name','send','map','DeskField','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','nolimit','order','sort','where','filter','merge','includeAll','include','rows','catch','params','keys','find','body','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','path','sox','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','apply','reject'];(function(_0x354760,_0x256c41){var _0x499c94=function(_0x3b6750){while(--_0x3b6750){_0x354760['push'](_0x354760['shift']());}};_0x499c94(++_0x256c41);}(_0x49c1,0xef));var _0x149c=function(_0x5a5fc8,_0x2a1c05){_0x5a5fc8=_0x5a5fc8-0x0;var _0x3df2a9=_0x49c1[_0x5a5fc8];return _0x3df2a9;};'use strict';var emlformat=require(_0x149c('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x149c('0x1'));var jsonpatch=require(_0x149c('0x2'));var rp=require(_0x149c('0x3'));var moment=require('moment');var BPromise=require(_0x149c('0x4'));var Mustache=require(_0x149c('0x5'));var util=require('util');var path=require(_0x149c('0x6'));var sox=require(_0x149c('0x7'));var csv=require('to-csv');var ejs=require(_0x149c('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x149c('0x9'));var squel=require(_0x149c('0xa'));var crypto=require('crypto');var jsforce=require(_0x149c('0xb'));var deskjs=require(_0x149c('0xc'));var toCsv=require('to-csv');var querystring=require(_0x149c('0xd'));var Papa=require(_0x149c('0xe'));var Redis=require('ioredis');var authService=require(_0x149c('0xf'));var qs=require(_0x149c('0x10'));var as=require(_0x149c('0x11'));var hardwareService=require(_0x149c('0x12'));var logger=require('../../config/logger')(_0x149c('0x13'));var utils=require(_0x149c('0x14'));var config=require(_0x149c('0x15'));var licenseUtil=require(_0x149c('0x16'));var db=require(_0x149c('0x17'))['db'];function respondWithStatusCode(_0x19e0b1,_0x1a0c32){_0x1a0c32=_0x1a0c32||0xcc;return function(_0x2310b8){if(_0x2310b8){return _0x19e0b1['sendStatus'](_0x1a0c32);}return _0x19e0b1[_0x149c('0x18')](_0x1a0c32)[_0x149c('0x19')]();};}function respondWithResult(_0x4aee29,_0x3b247e){_0x3b247e=_0x3b247e||0xc8;return function(_0x4e6cbc){if(_0x4e6cbc){return _0x4aee29[_0x149c('0x18')](_0x3b247e)[_0x149c('0x1a')](_0x4e6cbc);}};}function respondWithFilteredResult(_0x177800,_0x471e93){return function(_0x3d851a){if(_0x3d851a){var _0x30f8c1=typeof _0x471e93[_0x149c('0x1b')]===_0x149c('0x1c')&&typeof _0x471e93[_0x149c('0x1d')]==='undefined';var _0x449ac4=_0x3d851a[_0x149c('0x1e')];var _0x352f68=_0x30f8c1?0x0:_0x471e93[_0x149c('0x1b')];var _0x35f64f=_0x30f8c1?_0x3d851a[_0x149c('0x1e')]:_0x471e93[_0x149c('0x1b')]+_0x471e93[_0x149c('0x1d')];var _0x5910bd;if(_0x35f64f>=_0x449ac4){_0x35f64f=_0x449ac4;_0x5910bd=0xc8;}else{_0x5910bd=0xce;}_0x177800[_0x149c('0x18')](_0x5910bd);return _0x177800['set']('Content-Range',_0x352f68+'-'+_0x35f64f+'/'+_0x449ac4)['json'](_0x3d851a);}return null;};}function patchUpdates(_0x4c9b41){return function(_0x14194d){try{jsonpatch[_0x149c('0x1f')](_0x14194d,_0x4c9b41,!![]);}catch(_0xc1e2d6){return BPromise[_0x149c('0x20')](_0xc1e2d6);}return _0x14194d[_0x149c('0x21')]();};}function saveUpdates(_0x184924,_0x4e663e){return function(_0x398203){if(_0x398203){return _0x398203[_0x149c('0x22')](_0x184924)[_0x149c('0x23')](function(_0x178cf6){return _0x178cf6;});}return null;};}function removeEntity(_0x2cdd54,_0xb60e06){return function(_0x238363){if(_0x238363){return _0x238363[_0x149c('0x24')]()['then'](function(){_0x2cdd54[_0x149c('0x18')](0xcc)[_0x149c('0x19')]();});}};}function handleEntityNotFound(_0x4bb447,_0x29b216){return function(_0xac3cec){if(!_0xac3cec){_0x4bb447[_0x149c('0x25')](0x194);}return _0xac3cec;};}function handleError(_0x2b27f4,_0x5a16cb){_0x5a16cb=_0x5a16cb||0x1f4;return function(_0x36e070){logger[_0x149c('0x26')](_0x36e070[_0x149c('0x27')]);if(_0x36e070[_0x149c('0x28')]){delete _0x36e070[_0x149c('0x28')];}_0x2b27f4[_0x149c('0x18')](_0x5a16cb)[_0x149c('0x29')](_0x36e070);};}exports['index']=function(_0x55c85f,_0x5ea478){var _0x1203f2={},_0x2da1de={},_0x5a268b={'count':0x0,'rows':[]};var _0x7eddc0=_[_0x149c('0x2a')](db[_0x149c('0x2b')][_0x149c('0x2c')],function(_0x561445){return{'name':_0x561445[_0x149c('0x2d')],'type':_0x561445[_0x149c('0x2e')][_0x149c('0x2f')]};});_0x2da1de[_0x149c('0x30')]=_[_0x149c('0x2a')](_0x7eddc0,'name');_0x2da1de[_0x149c('0x31')]=_['keys'](_0x55c85f[_0x149c('0x31')]);_0x2da1de[_0x149c('0x32')]=_[_0x149c('0x33')](_0x2da1de[_0x149c('0x30')],_0x2da1de[_0x149c('0x31')]);_0x1203f2[_0x149c('0x34')]=_[_0x149c('0x33')](_0x2da1de['model'],qs[_0x149c('0x35')](_0x55c85f['query'][_0x149c('0x35')]));_0x1203f2['attributes']=_0x1203f2[_0x149c('0x34')]['length']?_0x1203f2[_0x149c('0x34')]:_0x2da1de[_0x149c('0x30')];if(!_0x55c85f['query']['hasOwnProperty'](_0x149c('0x36'))){_0x1203f2[_0x149c('0x1d')]=qs['limit'](_0x55c85f['query'][_0x149c('0x1d')]);_0x1203f2[_0x149c('0x1b')]=qs[_0x149c('0x1b')](_0x55c85f[_0x149c('0x31')][_0x149c('0x1b')]);}_0x1203f2[_0x149c('0x37')]=qs['sort'](_0x55c85f[_0x149c('0x31')][_0x149c('0x38')]);_0x1203f2[_0x149c('0x39')]=qs[_0x149c('0x32')](_['pick'](_0x55c85f[_0x149c('0x31')],_0x2da1de[_0x149c('0x32')]),_0x7eddc0);if(_0x55c85f[_0x149c('0x31')][_0x149c('0x3a')]){_0x1203f2['where']=_['merge'](_0x1203f2[_0x149c('0x39')],{'$or':_[_0x149c('0x2a')](_0x7eddc0,function(_0x48e4ca){if(_0x48e4ca[_0x149c('0x2e')]!=='VIRTUAL'){var _0xe18636={};_0xe18636[_0x48e4ca[_0x149c('0x28')]]={'$like':'%'+_0x55c85f[_0x149c('0x31')][_0x149c('0x3a')]+'%'};return _0xe18636;}})});}_0x1203f2=_[_0x149c('0x3b')]({},_0x1203f2,_0x55c85f['options']);var _0x36b9ce={'where':_0x1203f2[_0x149c('0x39')]};return db['DeskField']['count'](_0x36b9ce)[_0x149c('0x23')](function(_0xeecd72){_0x5a268b['count']=_0xeecd72;if(_0x55c85f[_0x149c('0x31')][_0x149c('0x3c')]){_0x1203f2[_0x149c('0x3d')]=[{'all':!![]}];}return db['DeskField']['findAll'](_0x1203f2);})[_0x149c('0x23')](function(_0x14f790){_0x5a268b[_0x149c('0x3e')]=_0x14f790;return _0x5a268b;})['then'](respondWithFilteredResult(_0x5ea478,_0x1203f2))[_0x149c('0x3f')](handleError(_0x5ea478,null));};exports['show']=function(_0x47d8fd,_0x3fc899){var _0x26418d={'raw':!![],'where':{'id':_0x47d8fd[_0x149c('0x40')]['id']}},_0x154a3c={};_0x154a3c[_0x149c('0x30')]=_[_0x149c('0x41')](db['DeskField'][_0x149c('0x2c')]);_0x154a3c[_0x149c('0x31')]=_[_0x149c('0x41')](_0x47d8fd[_0x149c('0x31')]);_0x154a3c[_0x149c('0x32')]=_[_0x149c('0x33')](_0x154a3c[_0x149c('0x30')],_0x154a3c[_0x149c('0x31')]);_0x26418d[_0x149c('0x34')]=_[_0x149c('0x33')](_0x154a3c['model'],qs[_0x149c('0x35')](_0x47d8fd[_0x149c('0x31')][_0x149c('0x35')]));_0x26418d[_0x149c('0x34')]=_0x26418d[_0x149c('0x34')]['length']?_0x26418d['attributes']:_0x154a3c[_0x149c('0x30')];if(_0x47d8fd['query'][_0x149c('0x3c')]){_0x26418d[_0x149c('0x3d')]=[{'all':!![]}];}_0x26418d=_['merge']({},_0x26418d,_0x47d8fd['options']);return db[_0x149c('0x2b')][_0x149c('0x42')](_0x26418d)[_0x149c('0x23')](handleEntityNotFound(_0x3fc899,null))[_0x149c('0x23')](respondWithResult(_0x3fc899,null))['catch'](handleError(_0x3fc899,null));};exports['create']=function(_0x24983b,_0x25584b){return db['DeskField']['create'](_0x24983b['body'],{})[_0x149c('0x23')](respondWithResult(_0x25584b,0xc9))[_0x149c('0x3f')](handleError(_0x25584b,null));};exports[_0x149c('0x22')]=function(_0x1cbc98,_0x54a99b){if(_0x1cbc98[_0x149c('0x43')]['id']){delete _0x1cbc98[_0x149c('0x43')]['id'];}return db[_0x149c('0x2b')]['find']({'where':{'id':_0x1cbc98[_0x149c('0x40')]['id']}})[_0x149c('0x23')](handleEntityNotFound(_0x54a99b,null))['then'](saveUpdates(_0x1cbc98['body'],null))['then'](respondWithResult(_0x54a99b,null))['catch'](handleError(_0x54a99b,null));};exports[_0x149c('0x24')]=function(_0x437ae0,_0x16cae8){return db['DeskField'][_0x149c('0x42')]({'where':{'id':_0x437ae0['params']['id']}})[_0x149c('0x23')](handleEntityNotFound(_0x16cae8,null))['then'](removeEntity(_0x16cae8,null))[_0x149c('0x3f')](handleError(_0x16cae8,null));};
\ No newline at end of file
index 48b127e..d5766f3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x75c2=['../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intDeskField.attributes','exports','define','int_desk_fields','desk_unique_index','idField','FieldId','lodash'];(function(_0x5e20f0,_0x4d99a5){var _0x243eb9=function(_0x32c904){while(--_0x32c904){_0x5e20f0['push'](_0x5e20f0['shift']());}};_0x243eb9(++_0x4d99a5);}(_0x75c2,0x19f));var _0x275c=function(_0x59a4f1,_0x2fadda){_0x59a4f1=_0x59a4f1-0x0;var _0x23dd94=_0x75c2[_0x59a4f1];return _0x23dd94;};'use strict';var _=require(_0x275c('0x0'));var util=require('util');var logger=require(_0x275c('0x1'))(_0x275c('0x2'));var moment=require(_0x275c('0x3'));var BPromise=require(_0x275c('0x4'));var rp=require(_0x275c('0x5'));var fs=require('fs');var path=require(_0x275c('0x6'));var rimraf=require(_0x275c('0x7'));var config=require(_0x275c('0x8'));var attributes=require(_0x275c('0x9'));module[_0x275c('0xa')]=function(_0x561d64,_0xe77f0f){return _0x561d64[_0x275c('0xb')]('DeskField',attributes,{'tableName':_0x275c('0xc'),'paranoid':![],'indexes':[{'name':_0x275c('0xd'),'fields':[_0x275c('0xe'),_0x275c('0xf')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x760e=['request-promise','rimraf','../../config/environment','./intDeskField.attributes','exports','define','DeskField','int_desk_fields','desk_unique_index','idField','FieldId','lodash','../../config/logger'];(function(_0x433299,_0x2b09dd){var _0x3eb48d=function(_0x96e751){while(--_0x96e751){_0x433299['push'](_0x433299['shift']());}};_0x3eb48d(++_0x2b09dd);}(_0x760e,0x1df));var _0xe760=function(_0x1d8fa8,_0x4b699d){_0x1d8fa8=_0x1d8fa8-0x0;var _0x37396d=_0x760e[_0x1d8fa8];return _0x37396d;};'use strict';var _=require(_0xe760('0x0'));var util=require('util');var logger=require(_0xe760('0x1'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xe760('0x2'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe760('0x3'));var config=require(_0xe760('0x4'));var attributes=require(_0xe760('0x5'));module[_0xe760('0x6')]=function(_0x309ff9,_0x3bced6){return _0x309ff9[_0xe760('0x7')](_0xe760('0x8'),attributes,{'tableName':_0xe760('0x9'),'paranoid':![],'indexes':[{'name':_0xe760('0xa'),'fields':[_0xe760('0xb'),_0xe760('0xc')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index 2a70c66..4e1ee83 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xace4=['rpc','../../config/environment','jayson/promise','client','http','request','then','DeskField,\x20%s,\x20%s','request\x20sent','debug','DeskField,\x20%s,\x20%s,\x20%s','error','code','message','info','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x2f5556,_0x2b6c90){var _0x5523c1=function(_0x5c5886){while(--_0x5c5886){_0x2f5556['push'](_0x2f5556['shift']());}};_0x5523c1(++_0x2b6c90);}(_0xace4,0x88));var _0x4ace=function(_0x35ef6b,_0x202c42){_0x35ef6b=_0x35ef6b-0x0;var _0x3ad145=_0xace4[_0x35ef6b];return _0x3ad145;};'use strict';var _=require(_0x4ace('0x0'));var util=require(_0x4ace('0x1'));var moment=require(_0x4ace('0x2'));var BPromise=require(_0x4ace('0x3'));var rs=require(_0x4ace('0x4'));var fs=require('fs');var Redis=require(_0x4ace('0x5'));var db=require(_0x4ace('0x6'))['db'];var utils=require(_0x4ace('0x7'));var logger=require('../../config/logger')(_0x4ace('0x8'));var config=require(_0x4ace('0x9'));var jayson=require(_0x4ace('0xa'));var client=jayson[_0x4ace('0xb')][_0x4ace('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x2c0018,_0xfe664f,_0x48416e){return new BPromise(function(_0x32db09,_0x13477f){return client[_0x4ace('0xd')](_0x2c0018,_0x48416e)[_0x4ace('0xe')](function(_0x107c9c){logger['info'](_0x4ace('0xf'),_0xfe664f,_0x4ace('0x10'));logger[_0x4ace('0x11')](_0x4ace('0x12'),_0xfe664f,_0x4ace('0x10'),JSON['stringify'](_0x107c9c));if(_0x107c9c[_0x4ace('0x13')]){if(_0x107c9c['error'][_0x4ace('0x14')]===0x1f4){logger[_0x4ace('0x13')](_0x4ace('0xf'),_0xfe664f,_0x107c9c[_0x4ace('0x13')]['message']);return _0x13477f(_0x107c9c[_0x4ace('0x13')][_0x4ace('0x15')]);}logger[_0x4ace('0x13')](_0x4ace('0xf'),_0xfe664f,_0x107c9c['error'][_0x4ace('0x15')]);return _0x32db09(_0x107c9c[_0x4ace('0x13')][_0x4ace('0x15')]);}else{logger[_0x4ace('0x16')](_0x4ace('0xf'),_0xfe664f,'request\x20sent');_0x32db09(_0x107c9c['result']['message']);}})[_0x4ace('0x17')](function(_0x5e7560){logger['error']('DeskField,\x20%s,\x20%s',_0xfe664f,_0x5e7560);_0x13477f(_0x5e7560);});});}
\ No newline at end of file
+var _0x04d4=['../../config/environment','client','http','request','info','DeskField,\x20%s,\x20%s','request\x20sent','debug','DeskField,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x266876,_0x5dbbb8){var _0x22de81=function(_0x40888c){while(--_0x40888c){_0x266876['push'](_0x266876['shift']());}};_0x22de81(++_0x5dbbb8);}(_0x04d4,0x8b));var _0x404d=function(_0x3a20f9,_0x474946){_0x3a20f9=_0x3a20f9-0x0;var _0x2cc897=_0x04d4[_0x3a20f9];return _0x2cc897;};'use strict';var _=require(_0x404d('0x0'));var util=require(_0x404d('0x1'));var moment=require(_0x404d('0x2'));var BPromise=require(_0x404d('0x3'));var rs=require(_0x404d('0x4'));var fs=require('fs');var Redis=require(_0x404d('0x5'));var db=require(_0x404d('0x6'))['db'];var utils=require(_0x404d('0x7'));var logger=require('../../config/logger')('rpc');var config=require(_0x404d('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x404d('0x9')][_0x404d('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xdfffee,_0x30af69,_0x3e5e6c){return new BPromise(function(_0x4bc194,_0x1037cd){return client[_0x404d('0xb')](_0xdfffee,_0x3e5e6c)['then'](function(_0x346280){logger[_0x404d('0xc')](_0x404d('0xd'),_0x30af69,_0x404d('0xe'));logger[_0x404d('0xf')](_0x404d('0x10'),_0x30af69,_0x404d('0xe'),JSON[_0x404d('0x11')](_0x346280));if(_0x346280[_0x404d('0x12')]){if(_0x346280[_0x404d('0x12')]['code']===0x1f4){logger['error'](_0x404d('0xd'),_0x30af69,_0x346280['error'][_0x404d('0x13')]);return _0x1037cd(_0x346280[_0x404d('0x12')]['message']);}logger['error'](_0x404d('0xd'),_0x30af69,_0x346280[_0x404d('0x12')][_0x404d('0x13')]);return _0x4bc194(_0x346280[_0x404d('0x12')][_0x404d('0x13')]);}else{logger[_0x404d('0xc')](_0x404d('0xd'),_0x30af69,'request\x20sent');_0x4bc194(_0x346280['result'][_0x404d('0x13')]);}})[_0x404d('0x14')](function(_0x4889b9){logger['error'](_0x404d('0xd'),_0x30af69,_0x4889b9);_0x1037cd(_0x4889b9);});});}
\ No newline at end of file
index ac1391a..6e2811e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeab5=['post','create','put','delete','destroy','multer','util','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./intDynamics365Account.controller','get','index','/:id','isAuthenticated','show','/:id/configurations','getConfigurations','/:id/fields'];(function(_0x1b0c7c,_0x468383){var _0x44f649=function(_0x56fbc6){while(--_0x56fbc6){_0x1b0c7c['push'](_0x1b0c7c['shift']());}};_0x44f649(++_0x468383);}(_0xeab5,0x98));var _0x5eab=function(_0xb2f24,_0x5ca905){_0xb2f24=_0xb2f24-0x0;var _0x4eed19=_0xeab5[_0xb2f24];return _0x4eed19;};'use strict';var multer=require(_0x5eab('0x0'));var util=require(_0x5eab('0x1'));var path=require('path');var timeout=require(_0x5eab('0x2'));var express=require(_0x5eab('0x3'));var router=express['Router']();var fs_extra=require(_0x5eab('0x4'));var auth=require(_0x5eab('0x5'));var interaction=require(_0x5eab('0x6'));var config=require('../../config/environment');var controller=require(_0x5eab('0x7'));router[_0x5eab('0x8')]('/',auth['isAuthenticated'](),controller[_0x5eab('0x9')]);router[_0x5eab('0x8')](_0x5eab('0xa'),auth[_0x5eab('0xb')](),controller[_0x5eab('0xc')]);router[_0x5eab('0x8')](_0x5eab('0xd'),auth[_0x5eab('0xb')](),controller[_0x5eab('0xe')]);router[_0x5eab('0x8')](_0x5eab('0xf'),auth[_0x5eab('0xb')](),controller['getFields']);router[_0x5eab('0x10')]('/',auth[_0x5eab('0xb')](),controller[_0x5eab('0x11')]);router[_0x5eab('0x10')](_0x5eab('0xd'),auth[_0x5eab('0xb')](),controller['addConfiguration']);router[_0x5eab('0x12')](_0x5eab('0xa'),auth['isAuthenticated'](),controller['update']);router[_0x5eab('0x13')](_0x5eab('0xa'),auth[_0x5eab('0xb')](),controller[_0x5eab('0x14')]);module['exports']=router;
\ No newline at end of file
+var _0x75b0=['fs-extra','../../components/auth/service','../../components/interaction/service','./intDynamics365Account.controller','get','/:id','show','/:id/configurations','getConfigurations','getFields','post','create','isAuthenticated','put','update','delete','destroy','multer','path','connect-timeout','express','Router'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x75b0,0x103));var _0x075b=function(_0x46abf8,_0x25fde6){_0x46abf8=_0x46abf8-0x0;var _0x9aec4c=_0x75b0[_0x46abf8];return _0x9aec4c;};'use strict';var multer=require(_0x075b('0x0'));var util=require('util');var path=require(_0x075b('0x1'));var timeout=require(_0x075b('0x2'));var express=require(_0x075b('0x3'));var router=express[_0x075b('0x4')]();var fs_extra=require(_0x075b('0x5'));var auth=require(_0x075b('0x6'));var interaction=require(_0x075b('0x7'));var config=require('../../config/environment');var controller=require(_0x075b('0x8'));router[_0x075b('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0x075b('0x9')](_0x075b('0xa'),auth['isAuthenticated'](),controller[_0x075b('0xb')]);router[_0x075b('0x9')](_0x075b('0xc'),auth['isAuthenticated'](),controller[_0x075b('0xd')]);router[_0x075b('0x9')]('/:id/fields',auth['isAuthenticated'](),controller[_0x075b('0xe')]);router[_0x075b('0xf')]('/',auth['isAuthenticated'](),controller[_0x075b('0x10')]);router[_0x075b('0xf')]('/:id/configurations',auth[_0x075b('0x11')](),controller['addConfiguration']);router[_0x075b('0x12')](_0x075b('0xa'),auth['isAuthenticated'](),controller[_0x075b('0x13')]);router[_0x075b('0x14')](_0x075b('0xa'),auth['isAuthenticated'](),controller[_0x075b('0x15')]);module['exports']=router;
\ No newline at end of file
index 98dd14a..6c6b59c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5292=['STRING','sequelize','exports'];(function(_0xd0a847,_0x72562b){var _0x2536ec=function(_0x20e4db){while(--_0x20e4db){_0xd0a847['push'](_0xd0a847['shift']());}};_0x2536ec(++_0x72562b);}(_0x5292,0xf7));var _0x2529=function(_0x5a8e42,_0x1bdf90){_0x5a8e42=_0x5a8e42-0x0;var _0x3939ef=_0x5292[_0x5a8e42];return _0x3939ef;};'use strict';var Sequelize=require(_0x2529('0x0'));module[_0x2529('0x1')]={'name':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0x2529('0x2')]},'password':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0x2529('0x2')]},'tenantId':{'type':Sequelize[_0x2529('0x2')]},'clientId':{'type':Sequelize[_0x2529('0x2')]},'clientSecret':{'type':Sequelize[_0x2529('0x2')]},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize[_0x2529('0x2')]},'modernAuthentication':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}};
\ No newline at end of file
+var _0x4be6=['STRING','exports'];(function(_0xda464c,_0x26e47d){var _0x19e222=function(_0x1ec605){while(--_0x1ec605){_0xda464c['push'](_0xda464c['shift']());}};_0x19e222(++_0x26e47d);}(_0x4be6,0xb5));var _0x64be=function(_0x566760,_0x1f7104){_0x566760=_0x566760-0x0;var _0x30ca6d=_0x4be6[_0x566760];return _0x30ca6d;};'use strict';var Sequelize=require('sequelize');module[_0x64be('0x0')]={'name':{'type':Sequelize[_0x64be('0x1')]},'username':{'type':Sequelize[_0x64be('0x1')]},'password':{'type':Sequelize[_0x64be('0x1')]},'remoteUri':{'type':Sequelize[_0x64be('0x1')]},'tenantId':{'type':Sequelize[_0x64be('0x1')]},'clientId':{'type':Sequelize[_0x64be('0x1')]},'clientSecret':{'type':Sequelize[_0x64be('0x1')]},'serverUrl':{'type':Sequelize[_0x64be('0x1')],'allowNull':![]},'description':{'type':Sequelize[_0x64be('0x1')]},'modernAuthentication':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}};
\ No newline at end of file
index 200698d..eb37707 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc7ea=['sendStatus','error','stack','name','send','map','Dynamics365Account','fieldName','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','order','sort','where','pick','VIRTUAL','filter','merge','options','includeAll','include','findAll','catch','show','params','rawAttributes','find','create','body','getConfigurations','Dynamics365Configuration','addConfiguration','findOne','AccountId','Subjects','type','Descriptions','getDescriptions','channel','Dynamics365Field','slice','lastIndexOf','format','%s/api/data/v9.0/','getFields','ticketType','incident','Incident','PhoneCall','description','customerid','ownerid','caseorigincode','regardingobjectid','directioncode','phonecall_activity_parties','accountidname','accountidyominame','actualserviceunits','billedserviceunits','contactidname','contactidyominame','contractdetailidname','contractidname','createdbyexternalpartyname','createdbyexternalpartyyominame','createdbyname','createdbyyominame','createdon','createdonbehalfbyname','createdonbehalfbyyominame','customeridname','customeridtype','emailaddress','entityimage_timestamp','entityimage_url','escalatedon','exchangerate','firstresponsebykpiidname','followupby','importsequencenumber','kbarticleidname','lastonholdtime','modifiedbyexternalpartyyominame','modifiedbyname','modifiedbyyominame','modifiedon','modifiedonbehalfbyyominame','msdyn_incidenttypename','msdyn_iotalertname','numberofchildincidents','overriddencreatedon','owneridyominame','parentcaseidname','primarycontactidname','primarycontactidyominame','prioritycodename','productidname','productserialnumber','resolveby','resolvebykpiidname','responseby','responsiblecontactidyominame','slainvokedidname','slaname','socialprofileidname','statecode','statuscode','subjectidname','ticketnumber','timezoneruleversionnumber','utcconversiontimezonecode','versionnumber','concat','username','remoteUri','tenantId','clientId','clientSecret','modernAuthentication','CloudProvider','data5','data7','https://login.microsoftonline.com/','/oauth2/token','password','GET','EntityDefinitions?$select=DisplayName,EntitySetName&$filter=SchemaName\x20eq\x20\x27','Bearer\x20','4.0','value',')?$select=LogicalName&$expand=Attributes($select=LogicalName)','Attributes','remove','includes','LogicalName','forEach','@odata.type','substring','PicklistAttributeMetadata','push','isNil','BooleanAttributeMetadata','MetadataId','all','StringAttributeMetadata','MemoAttributeMetadata','DateTimeAttributeMetadata','StatusAttributeMetadata','StateAttributeMetadata','DecimalAttributeMetadata','test','statusCode','EntityDefinitions(',')/Attributes(',')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?','$select=DisplayName,LogicalName&$expand=OptionSet($select=Options)','OptionSet','Options','Label','UserLocalizedLabel','DisplayName',')/Microsoft.Dynamics.CRM.BooleanAttributeMetadata?$select=DisplayName,LogicalName&$expand=OptionSet($select=FalseOption,\x20TrueOption)','TrueOption','true','FalseOption','false',')/Microsoft.Dynamics.CRM.','?$select=DisplayName,LogicalName','request-promise','util','../../components/parsers/qs','../../config/logger','api','../../mysqldb','status','json','offset','limit','undefined','count','Content-Range','update','then','destroy','end'];(function(_0x3015f9,_0x6eeb0d){var _0x3390b6=function(_0x4cff57){while(--_0x4cff57){_0x3015f9['push'](_0x3015f9['shift']());}};_0x3390b6(++_0x6eeb0d);}(_0xc7ea,0x171));var _0xac7e=function(_0x44c25c,_0x4bf0a6){_0x44c25c=_0x44c25c-0x0;var _0x5aa80a=_0xc7ea[_0x44c25c];return _0x5aa80a;};'use strict';var rp=require(_0xac7e('0x0'));var util=require(_0xac7e('0x1'));var _=require('lodash');var qs=require(_0xac7e('0x2'));var logger=require(_0xac7e('0x3'))(_0xac7e('0x4'));var db=require(_0xac7e('0x5'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithResult(_0x134a3d,_0x39bf60){_0x39bf60=_0x39bf60||0xc8;return function(_0x1c15cf){if(_0x1c15cf){return _0x134a3d[_0xac7e('0x6')](_0x39bf60)[_0xac7e('0x7')](_0x1c15cf);}};}function respondWithFilteredResult(_0x45e73f,_0x447bfe){return function(_0x1aca29){if(_0x1aca29){var _0x1612f3=typeof _0x447bfe[_0xac7e('0x8')]==='undefined'&&typeof _0x447bfe[_0xac7e('0x9')]===_0xac7e('0xa');var _0x2efbf4=_0x1aca29[_0xac7e('0xb')];var _0x39d2e3=_0x1612f3?0x0:_0x447bfe[_0xac7e('0x8')];var _0x10873d=_0x1612f3?_0x1aca29[_0xac7e('0xb')]:_0x447bfe[_0xac7e('0x8')]+_0x447bfe[_0xac7e('0x9')];var _0x404fc0;if(_0x10873d>=_0x2efbf4){_0x10873d=_0x2efbf4;_0x404fc0=0xc8;}else{_0x404fc0=0xce;}_0x45e73f[_0xac7e('0x6')](_0x404fc0);return _0x45e73f['set'](_0xac7e('0xc'),_0x39d2e3+'-'+_0x10873d+'/'+_0x2efbf4)[_0xac7e('0x7')](_0x1aca29);}return null;};}function saveUpdates(_0x5d4537){return function(_0x617cf9){if(_0x617cf9){return _0x617cf9[_0xac7e('0xd')](_0x5d4537)[_0xac7e('0xe')](function(_0x145382){return _0x145382;});}return null;};}function removeEntity(_0x31a8e7){return function(_0x52be09){if(_0x52be09){return _0x52be09[_0xac7e('0xf')]()[_0xac7e('0xe')](function(){_0x31a8e7[_0xac7e('0x6')](0xcc)[_0xac7e('0x10')]();});}};}function handleEntityNotFound(_0x333436){return function(_0x232ce5){if(!_0x232ce5){_0x333436[_0xac7e('0x11')](0x194);}return _0x232ce5;};}function handleError(_0x11ed74,_0x5f08f1){_0x5f08f1=_0x5f08f1||0x1f4;return function(_0x3f4869){logger[_0xac7e('0x12')](_0x3f4869[_0xac7e('0x13')]);if(_0x3f4869[_0xac7e('0x14')]){delete _0x3f4869[_0xac7e('0x14')];}_0x11ed74['status'](_0x5f08f1)[_0xac7e('0x15')](_0x3f4869);};}exports['index']=function(_0xba3d01,_0x5e89f1){var _0xa048e9={},_0x406f0a={},_0x231ab0={'count':0x0,'rows':[]};var _0x41ae40=_[_0xac7e('0x16')](db[_0xac7e('0x17')]['rawAttributes'],function(_0x12d34a){return{'name':_0x12d34a[_0xac7e('0x18')],'type':_0x12d34a['type'][_0xac7e('0x19')]};});_0x406f0a[_0xac7e('0x1a')]=_[_0xac7e('0x16')](_0x41ae40,_0xac7e('0x14'));_0x406f0a[_0xac7e('0x1b')]=_[_0xac7e('0x1c')](_0xba3d01[_0xac7e('0x1b')]);_0x406f0a[_0xac7e('0x1d')]=_[_0xac7e('0x1e')](_0x406f0a[_0xac7e('0x1a')],_0x406f0a[_0xac7e('0x1b')]);_0xa048e9['attributes']=_['intersection'](_0x406f0a[_0xac7e('0x1a')],qs[_0xac7e('0x1f')](_0xba3d01[_0xac7e('0x1b')]['fields']));_0xa048e9[_0xac7e('0x20')]=_0xa048e9[_0xac7e('0x20')][_0xac7e('0x21')]?_0xa048e9[_0xac7e('0x20')]:_0x406f0a['model'];if(!_0xba3d01['query'][_0xac7e('0x22')]('nolimit')){_0xa048e9['limit']=qs[_0xac7e('0x9')](_0xba3d01[_0xac7e('0x1b')][_0xac7e('0x9')]);_0xa048e9['offset']=qs[_0xac7e('0x8')](_0xba3d01[_0xac7e('0x1b')][_0xac7e('0x8')]);}_0xa048e9[_0xac7e('0x23')]=qs['sort'](_0xba3d01[_0xac7e('0x1b')][_0xac7e('0x24')]);_0xa048e9[_0xac7e('0x25')]=qs['filters'](_[_0xac7e('0x26')](_0xba3d01[_0xac7e('0x1b')],_0x406f0a[_0xac7e('0x1d')]),_0x41ae40);if(_0xba3d01[_0xac7e('0x1b')]['filter']){_0xa048e9[_0xac7e('0x25')]=_['merge'](_0xa048e9[_0xac7e('0x25')],{'$or':_[_0xac7e('0x16')](_0x41ae40,function(_0x3c08f6){if(_0x3c08f6['type']!==_0xac7e('0x27')){var _0x2e1fe3={};_0x2e1fe3[_0x3c08f6['name']]={'$like':'%'+_0xba3d01['query'][_0xac7e('0x28')]+'%'};return _0x2e1fe3;}})});}_0xa048e9=_[_0xac7e('0x29')]({},_0xa048e9,_0xba3d01[_0xac7e('0x2a')]);var _0x2133c7={'where':_0xa048e9[_0xac7e('0x25')]};return db[_0xac7e('0x17')][_0xac7e('0xb')](_0x2133c7)[_0xac7e('0xe')](function(_0x38bfb1){_0x231ab0['count']=_0x38bfb1;if(_0xba3d01[_0xac7e('0x1b')][_0xac7e('0x2b')]){_0xa048e9[_0xac7e('0x2c')]=[{'all':!![]}];}return db[_0xac7e('0x17')][_0xac7e('0x2d')](_0xa048e9);})[_0xac7e('0xe')](function(_0x4df140){_0x231ab0['rows']=_0x4df140;return _0x231ab0;})[_0xac7e('0xe')](respondWithFilteredResult(_0x5e89f1,_0xa048e9))[_0xac7e('0x2e')](handleError(_0x5e89f1,null));};exports[_0xac7e('0x2f')]=function(_0x411f47,_0xadc329){var _0x128298={'raw':![],'where':{'id':_0x411f47[_0xac7e('0x30')]['id']}},_0x278848={};_0x278848[_0xac7e('0x1a')]=_['keys'](db[_0xac7e('0x17')][_0xac7e('0x31')]);_0x278848['query']=_[_0xac7e('0x1c')](_0x411f47[_0xac7e('0x1b')]);_0x278848['filters']=_[_0xac7e('0x1e')](_0x278848[_0xac7e('0x1a')],_0x278848[_0xac7e('0x1b')]);_0x128298[_0xac7e('0x20')]=_[_0xac7e('0x1e')](_0x278848[_0xac7e('0x1a')],qs[_0xac7e('0x1f')](_0x411f47[_0xac7e('0x1b')]['fields']));_0x128298[_0xac7e('0x20')]=_0x128298[_0xac7e('0x20')]['length']?_0x128298[_0xac7e('0x20')]:_0x278848[_0xac7e('0x1a')];if(_0x411f47[_0xac7e('0x1b')]['includeAll']){_0x128298['include']=[{'all':!![]}];}_0x128298=_[_0xac7e('0x29')]({},_0x128298,_0x411f47[_0xac7e('0x2a')]);return db['Dynamics365Account'][_0xac7e('0x32')](_0x128298)[_0xac7e('0xe')](handleEntityNotFound(_0xadc329,null))[_0xac7e('0xe')](respondWithResult(_0xadc329,null))[_0xac7e('0x2e')](handleError(_0xadc329,null));};exports[_0xac7e('0x33')]=function(_0x21e628,_0x3794ad){return db[_0xac7e('0x17')][_0xac7e('0x33')](_0x21e628[_0xac7e('0x34')],{})[_0xac7e('0xe')](respondWithResult(_0x3794ad,0xc9))[_0xac7e('0x2e')](handleError(_0x3794ad,null));};exports[_0xac7e('0xd')]=function(_0x5c2437,_0x2f31d9){if(_0x5c2437[_0xac7e('0x34')]['id']){delete _0x5c2437['body']['id'];}return db[_0xac7e('0x17')][_0xac7e('0x32')]({'where':{'id':_0x5c2437[_0xac7e('0x30')]['id']}})[_0xac7e('0xe')](handleEntityNotFound(_0x2f31d9,null))['then'](saveUpdates(_0x5c2437[_0xac7e('0x34')],null))[_0xac7e('0xe')](respondWithResult(_0x2f31d9,null))['catch'](handleError(_0x2f31d9,null));};exports['destroy']=function(_0x4c5880,_0x309a8e){return db['Dynamics365Account'][_0xac7e('0x32')]({'where':{'id':_0x4c5880[_0xac7e('0x30')]['id']}})['then'](handleEntityNotFound(_0x309a8e,null))[_0xac7e('0xe')](removeEntity(_0x309a8e,null))[_0xac7e('0x2e')](handleError(_0x309a8e,null));};exports[_0xac7e('0x35')]=function(_0x2cc3bd,_0x156517){var _0x284724={};var _0x5c0642={};var _0x1808c2;var _0x1d4a60;return db[_0xac7e('0x17')]['findOne']({'where':{'id':_0x2cc3bd[_0xac7e('0x30')]['id']}})[_0xac7e('0xe')](handleEntityNotFound(_0x156517,null))['then'](function(_0x5dca76){if(_0x5dca76){_0x1808c2=_0x5dca76;_0x5c0642['model']=_['keys'](db[_0xac7e('0x36')]['rawAttributes']);_0x5c0642['query']=_['keys'](_0x2cc3bd['query']);_0x5c0642[_0xac7e('0x1d')]=_['intersection'](_0x5c0642[_0xac7e('0x1a')],_0x5c0642[_0xac7e('0x1b')]);_0x284724[_0xac7e('0x20')]=_['intersection'](_0x5c0642['model'],qs[_0xac7e('0x1f')](_0x2cc3bd['query']['fields']));_0x284724[_0xac7e('0x20')]=_0x284724[_0xac7e('0x20')][_0xac7e('0x21')]?_0x284724['attributes']:_0x5c0642['model'];_0x284724['order']=qs['sort'](_0x2cc3bd[_0xac7e('0x1b')][_0xac7e('0x24')]);_0x284724[_0xac7e('0x25')]=qs[_0xac7e('0x1d')](_[_0xac7e('0x26')](_0x2cc3bd[_0xac7e('0x1b')],_0x5c0642[_0xac7e('0x1d')]));if(_0x2cc3bd[_0xac7e('0x1b')][_0xac7e('0x28')]){_0x284724['where']=_[_0xac7e('0x29')](_0x284724[_0xac7e('0x25')],{'$or':_[_0xac7e('0x16')](_0x284724['attributes'],function(_0x1b2b9e){var _0x22a663={};_0x22a663[_0x1b2b9e]={'$like':'%'+_0x2cc3bd[_0xac7e('0x1b')][_0xac7e('0x28')]+'%'};return _0x22a663;})});}_0x284724=_[_0xac7e('0x29')]({},_0x284724,_0x2cc3bd[_0xac7e('0x2a')]);return _0x1808c2[_0xac7e('0x35')](_0x284724);}})[_0xac7e('0xe')](function(_0xbbef){if(_0xbbef){_0x1d4a60=_0xbbef[_0xac7e('0x21')];if(!_0x2cc3bd[_0xac7e('0x1b')][_0xac7e('0x22')]('nolimit')){_0x284724[_0xac7e('0x9')]=qs['limit'](_0x2cc3bd[_0xac7e('0x1b')]['limit']);_0x284724[_0xac7e('0x8')]=qs[_0xac7e('0x8')](_0x2cc3bd[_0xac7e('0x1b')]['offset']);}return _0x1808c2['getConfigurations'](_0x284724);}})[_0xac7e('0xe')](function(_0x4db4e9){if(_0x4db4e9){return _0x4db4e9?{'count':_0x1d4a60,'rows':_0x4db4e9}:null;}})[_0xac7e('0xe')](respondWithResult(_0x156517,null))[_0xac7e('0x2e')](handleError(_0x156517,null));};exports[_0xac7e('0x37')]=function(_0x34dd23,_0x36f9e0){if(_0x34dd23[_0xac7e('0x34')]['id']){delete _0x34dd23[_0xac7e('0x34')]['id'];}return db[_0xac7e('0x17')][_0xac7e('0x38')]({'where':{'id':_0x34dd23[_0xac7e('0x30')]['id']}})['then'](handleEntityNotFound(_0x36f9e0,null))['then'](function(_0x67410e){if(_0x67410e){_0x34dd23[_0xac7e('0x34')][_0xac7e('0x39')]=_0x67410e['id'];_0x34dd23[_0xac7e('0x34')][_0xac7e('0x3a')]=integrations['getSubjects'](_0x34dd23[_0xac7e('0x34')]['channel'],_0x34dd23[_0xac7e('0x34')][_0xac7e('0x3b')]);_0x34dd23[_0xac7e('0x34')][_0xac7e('0x3c')]=integrations[_0xac7e('0x3d')](_0x34dd23[_0xac7e('0x34')][_0xac7e('0x3e')],_0x34dd23[_0xac7e('0x34')]['type']);return db['Dynamics365Configuration'][_0xac7e('0x33')](_0x34dd23['body'],{'include':[{'model':db[_0xac7e('0x3f')],'as':'Subjects'},{'model':db[_0xac7e('0x3f')],'as':_0xac7e('0x3c')}]});}return null;})[_0xac7e('0xe')](respondWithResult(_0x36f9e0,null))[_0xac7e('0x2e')](handleError(_0x36f9e0,null));};function sanitizeRemoteUri(_0x4b3354){var _0x1f6553=_0x4b3354[_0xac7e('0x40')](-0x1);if(_0x1f6553==='/')return _0x4b3354['substring'](0x0,_0x4b3354[_0xac7e('0x41')](_0x1f6553));return _0x4b3354;}function getWebApiUrl(_0x4c5810){return util[_0xac7e('0x42')](_0xac7e('0x43'),_0x4c5810);}exports[_0xac7e('0x44')]=function(_0x532bad,_0x16d363){var _0x473919=_0x532bad['query'][_0xac7e('0x45')];var _0x56e54d=_0x473919===_0xac7e('0x46')?_0xac7e('0x47'):_0xac7e('0x48');var _0x590ab0='';var _0x13c1fa='';var _0x289b86='';var _0x37a79b='';var _0x2c8c69='';var _0x45853c='';var _0x35dd64='';var _0x4877db='';var _0x4b744f=['title',_0xac7e('0x49'),_0xac7e('0x4a'),_0xac7e('0x4b'),_0xac7e('0x4c'),'subject','phonenumber',_0xac7e('0x4d'),_0xac7e('0x4e'),_0xac7e('0x4f')];var _0x2ee255=[_0xac7e('0x50'),_0xac7e('0x51'),_0xac7e('0x52'),_0xac7e('0x53'),_0xac7e('0x54'),_0xac7e('0x55'),_0xac7e('0x56'),_0xac7e('0x57'),_0xac7e('0x58'),_0xac7e('0x59'),_0xac7e('0x5a'),_0xac7e('0x5b'),_0xac7e('0x5c'),_0xac7e('0x5d'),_0xac7e('0x5e'),_0xac7e('0x5f'),_0xac7e('0x60'),'customeridyominame',_0xac7e('0x61'),'entitlementidname',_0xac7e('0x62'),_0xac7e('0x63'),_0xac7e('0x64'),_0xac7e('0x65'),_0xac7e('0x66'),_0xac7e('0x67'),_0xac7e('0x68'),'influencescore',_0xac7e('0x69'),_0xac7e('0x6a'),'masteridname','modifiedbyexternalpartyname',_0xac7e('0x6b'),_0xac7e('0x6c'),_0xac7e('0x6d'),_0xac7e('0x6e'),'modifiedonbehalfbyname',_0xac7e('0x6f'),_0xac7e('0x70'),_0xac7e('0x71'),_0xac7e('0x72'),'onholdtime',_0xac7e('0x73'),'owneridname','owneridtype',_0xac7e('0x74'),_0xac7e('0x75'),_0xac7e('0x76'),_0xac7e('0x77'),_0xac7e('0x78'),_0xac7e('0x79'),_0xac7e('0x7a'),_0xac7e('0x7b'),_0xac7e('0x7c'),_0xac7e('0x7d'),'responsiblecontactidname',_0xac7e('0x7e'),'sentimentvalue',_0xac7e('0x7f'),_0xac7e('0x80'),_0xac7e('0x81'),_0xac7e('0x82'),_0xac7e('0x83'),_0xac7e('0x84'),_0xac7e('0x85'),_0xac7e('0x86'),'transactioncurrencyidname','traversedpath',_0xac7e('0x87'),_0xac7e('0x88')];var _0x1afeda=_0x4b744f[_0xac7e('0x89')](_0x2ee255);return db[_0xac7e('0x17')][_0xac7e('0x38')]({'where':{'id':_0x532bad[_0xac7e('0x30')]['id']},'attributes':['id',_0xac7e('0x8a'),'password',_0xac7e('0x8b'),_0xac7e('0x8c'),_0xac7e('0x8d'),_0xac7e('0x8e'),_0xac7e('0x8f')],'include':[{'model':db[_0xac7e('0x90')],'as':_0xac7e('0x90'),'attributes':['id',_0xac7e('0x91'),_0xac7e('0x92')]}]})[_0xac7e('0xe')](handleEntityNotFound(_0x16d363,null))['then'](function(_0x19db63){if(_0x19db63){if(_0x19db63[_0xac7e('0x8f')]){_0x19db63['access_token']=_0x19db63['CloudProvider']['data5'];_0x4877db=sanitizeRemoteUri(_0x19db63['CloudProvider'][_0xac7e('0x92')]);_0x35dd64=getWebApiUrl(_0x4877db);return _0x19db63;}_0x4877db=sanitizeRemoteUri(_0x19db63[_0xac7e('0x8b')]);_0x35dd64=getWebApiUrl(_0x4877db);var _0x2f02d9={'method':'POST','uri':_0xac7e('0x93')+_0x19db63[_0xac7e('0x8c')]+_0xac7e('0x94'),'form':{'client_id':_0x19db63[_0xac7e('0x8d')],'resource':_0x4877db,'username':_0x19db63[_0xac7e('0x8a')],'password':_0x19db63[_0xac7e('0x95')],'grant_type':_0xac7e('0x95'),'client_secret':_0x19db63[_0xac7e('0x8e')]},'json':!![]};return rp(_0x2f02d9);}})[_0xac7e('0xe')](function(_0x209dcd){_0x45853c=_0x209dcd['access_token'];var _0x550cfe={'method':_0xac7e('0x96'),'uri':encodeURI(_0x35dd64+_0xac7e('0x97')+_0x56e54d+'\x27'),'headers':{'Authorization':_0xac7e('0x98')+_0x45853c,'If-None-Match':null,'OData-Version':_0xac7e('0x99')},'json':!![]};return rp(_0x550cfe);})[_0xac7e('0xe')](function(_0x2c981f){var _0xa9a42b=_0x2c981f[_0xac7e('0x9a')][0x0];var _0x1e05f7=_0xa9a42b['MetadataId'];var _0x846630={'method':_0xac7e('0x96'),'uri':_0x35dd64+'EntityDefinitions('+_0x1e05f7+_0xac7e('0x9b'),'headers':{'Authorization':'Bearer\x20'+_0x45853c,'If-None-Match':null,'OData-Version':_0xac7e('0x99')},'json':!![]};return rp(_0x846630);})[_0xac7e('0xe')](function(_0x16a3aa){_0x590ab0=_0x16a3aa;_0x13c1fa=_0x590ab0[_0xac7e('0x9c')];_0x13c1fa=_[_0xac7e('0x9d')](_0x13c1fa,function(_0x580a24){return!_0x1afeda[_0xac7e('0x9e')](_0x580a24[_0xac7e('0x9f')]);});var _0x467b36=[];var _0x1010d2=[];_0x13c1fa[_0xac7e('0xa0')](function(_0x5d25d3){if(_0x5d25d3[_0xac7e('0xa1')]){var _0x330802=_0x5d25d3[_0xac7e('0xa1')][_0xac7e('0xa2')](_0x5d25d3[_0xac7e('0xa1')]['lastIndexOf']('.')+0x1);if(_0x330802===_0xac7e('0xa3')){_0x467b36[_0xac7e('0xa4')](getSelectList(_0x35dd64,_0x473919,_0x1010d2,_0x590ab0['MetadataId'],_0x5d25d3['MetadataId'],_0x45853c));}}});return Promise['all'](_0x467b36);})[_0xac7e('0xe')](function(_0x1e918a){_0x289b86=_0x1e918a[0x0];var _0x1df5ff=[];var _0x460847=[];_0x13c1fa[_0xac7e('0xa0')](function(_0x5f12c5){if(!_[_0xac7e('0xa5')](_0x5f12c5[_0xac7e('0xa1')])){var _0x15468e=_0x5f12c5[_0xac7e('0xa1')][_0xac7e('0xa2')](_0x5f12c5[_0xac7e('0xa1')][_0xac7e('0x41')]('.')+0x1);if(_0x15468e===_0xac7e('0xa6')){_0x1df5ff[_0xac7e('0xa4')](getBooleanList(_0x35dd64,_0x473919,_0x460847,_0x590ab0[_0xac7e('0xa7')],_0x5f12c5['MetadataId'],_0x45853c));}}});return Promise[_0xac7e('0xa8')](_0x1df5ff);})[_0xac7e('0xe')](function(_0x6123fa){_0x37a79b=_0x6123fa[0x0];var _0x2b12e3=[];var _0xca7703=[];_0x13c1fa[_0xac7e('0xa0')](function(_0x5e1a0b){if(_0x5e1a0b['@odata.type']){var _0x3d459f=_0x5e1a0b[_0xac7e('0xa1')][_0xac7e('0xa2')](_0x5e1a0b[_0xac7e('0xa1')][_0xac7e('0x41')]('.')+0x1);if(_0x3d459f===_0xac7e('0xa9')||_0x3d459f==='DoubleAttributeMetadata'||_0x3d459f==='BigIntAttributeMetadata'||_0x3d459f==='IntegerAttributeMetadata'||_0x3d459f===_0xac7e('0xaa')||_0x3d459f===_0xac7e('0xab')||_0x3d459f===_0xac7e('0xac')||_0x3d459f==='EntityNameAttributeMetadata'||_0x3d459f===_0xac7e('0xad')||_0x3d459f===_0xac7e('0xae')){_0x2b12e3[_0xac7e('0xa4')](getInputList(_0x35dd64,_0x473919,_0x3d459f,_0xca7703,_0x590ab0['MetadataId'],_0x5e1a0b[_0xac7e('0xa7')],_0x45853c));}}});return Promise[_0xac7e('0xa8')](_0x2b12e3);})[_0xac7e('0xe')](function(_0x26d69e){_0x2c8c69=_0x26d69e[0x0];var _0x56359a=_0x289b86['concat'](_0x37a79b)['concat'](_0x2c8c69);var _0x4429da={'count':_0x56359a[_0xac7e('0x21')],'rows':_0x56359a};return _0x4429da;})['then'](respondWithResult(_0x16d363,null))[_0xac7e('0x2e')](function(_0x1b0dce){var _0x4f18f7=_0x532bad[_0xac7e('0x1b')][_0xac7e('0xaf')]?0x1f4:_0x1b0dce['statusCode']||0x1f4;logger[_0xac7e('0x12')](_0x1b0dce['stack']);delete _0x1b0dce[_0xac7e('0x14')];if(_0x4f18f7===0x191){_0x4f18f7=0x190;}_0x16d363[_0xac7e('0x6')](_0x4f18f7)['send'](_0x532bad['query'][_0xac7e('0xaf')]?{'message':'Wrong\x20credentials','statusCode':_0x1b0dce[_0xac7e('0xb0')]}:_0x1b0dce);});};function getSelectList(_0x4c4084,_0x582446,_0x552bac,_0x4ae3dc,_0x943b4d,_0x257612){var _0x11b7c8={'method':_0xac7e('0x96'),'uri':_0x4c4084+_0xac7e('0xb1')+_0x4ae3dc+_0xac7e('0xb2')+_0x943b4d+_0xac7e('0xb3')+_0xac7e('0xb4'),'headers':{'Authorization':_0xac7e('0x98')+_0x257612,'If-None-Match':null,'OData-Version':_0xac7e('0x99')},'json':!![]};return rp(_0x11b7c8)['then'](function(_0x4bf1e4){var _0x5ddc63=[];var _0x5d5294=_0x4bf1e4[_0xac7e('0xb5')][_0xac7e('0xb6')];_0x5d5294['forEach'](function(_0x3f9c36){_0x5ddc63[_0xac7e('0xa4')]({'name':_0x3f9c36[_0xac7e('0xb7')][_0xac7e('0xb8')][_0xac7e('0xb7')],'value':String(_0x3f9c36['Value'])});});var _0x1564f6={'id':_0x582446+'_'+_0x4bf1e4[_0xac7e('0x9f')],'name':_0x4bf1e4[_0xac7e('0xb9')][_0xac7e('0xb8')][_0xac7e('0xb7')],'custom':![],'options':_0x5ddc63};_0x552bac[_0xac7e('0xa4')](_0x1564f6);return _0x552bac;});}function getBooleanList(_0x37da95,_0x115ef5,_0x1e15a2,_0x2126ea,_0x1551b5,_0x3142cc){var _0x415bc4={'method':_0xac7e('0x96'),'uri':_0x37da95+'EntityDefinitions('+_0x2126ea+')/Attributes('+_0x1551b5+_0xac7e('0xba'),'headers':{'Authorization':_0xac7e('0x98')+_0x3142cc,'If-None-Match':null,'OData-Version':'4.0'},'json':!![]};return rp(_0x415bc4)[_0xac7e('0xe')](function(_0x2df06f){var _0x291463=[];_0x291463[_0xac7e('0xa4')]({'name':_0x2df06f[_0xac7e('0xb5')][_0xac7e('0xbb')][_0xac7e('0xb7')][_0xac7e('0xb8')][_0xac7e('0xb7')],'value':_0xac7e('0xbc')},{'name':_0x2df06f[_0xac7e('0xb5')][_0xac7e('0xbd')][_0xac7e('0xb7')]['UserLocalizedLabel'][_0xac7e('0xb7')],'value':_0xac7e('0xbe')});var _0x269843={'id':_0x115ef5+'_'+_0x2df06f[_0xac7e('0x9f')],'name':_0x2df06f[_0xac7e('0xb9')][_0xac7e('0xb8')]['Label'],'custom':![],'options':_0x291463};_0x1e15a2[_0xac7e('0xa4')](_0x269843);return _0x1e15a2;});}function getInputList(_0xd1a651,_0x44b9a6,_0x3cd8d4,_0x3ffa05,_0x4fc859,_0x4b6604,_0x1690c){var _0x11f209={'method':_0xac7e('0x96'),'uri':_0xd1a651+_0xac7e('0xb1')+_0x4fc859+_0xac7e('0xb2')+_0x4b6604+_0xac7e('0xbf')+_0x3cd8d4+_0xac7e('0xc0'),'headers':{'Authorization':_0xac7e('0x98')+_0x1690c,'If-None-Match':null,'OData-Version':_0xac7e('0x99')},'json':!![]};return rp(_0x11f209)[_0xac7e('0xe')](function(_0x5b04c7){var _0x41d80b={'id':_0x44b9a6+'_'+_0x5b04c7[_0xac7e('0x9f')],'name':_0x5b04c7[_0xac7e('0xb9')][_0xac7e('0xb8')]?_0x5b04c7[_0xac7e('0xb9')][_0xac7e('0xb8')][_0xac7e('0xb7')]:_0x5b04c7['LogicalName'],'custom':![],'options':[]};_0x3ffa05[_0xac7e('0xa4')](_0x41d80b);return _0x3ffa05;});}
\ No newline at end of file
+var _0x657b=['find','create','body','update','getConfigurations','addConfiguration','findOne','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','Dynamics365Field','slice','substring','lastIndexOf','getFields','incident','PhoneCall','description','customerid','ownerid','caseorigincode','subject','phonenumber','regardingobjectid','phonecall_activity_parties','accountidyominame','actualserviceunits','contactidname','contactidyominame','contractdetailidname','createdbyexternalpartyname','createdbyexternalpartyyominame','createdbyname','createdbyyominame','createdon','customeridname','customeridtype','customeridyominame','emailaddress','entitlementidname','entityimage_timestamp','entityimage_url','escalatedon','firstresponsebykpiidname','followupby','modifiedbyexternalpartyname','modifiedbyexternalpartyyominame','modifiedbyname','modifiedonbehalfbyyominame','msdyn_incidenttypename','msdyn_iotalertname','numberofchildincidents','overriddencreatedon','owneridname','owneridtype','parentcaseidname','primarycontactidyominame','prioritycodename','resolveby','resolvebykpiidname','responsiblecontactidyominame','sentimentvalue','slainvokedidname','slaname','socialprofileidname','statecode','ticketnumber','timezoneruleversionnumber','transactioncurrencyidname','traversedpath','versionnumber','remoteUri','clientId','clientSecret','modernAuthentication','data5','access_token','CloudProvider','data7','POST','https://login.microsoftonline.com/','/oauth2/token','username','password','GET','4.0','value','MetadataId','EntityDefinitions(',')?$select=LogicalName&$expand=Attributes($select=LogicalName)','Bearer\x20','Attributes','includes','LogicalName','@odata.type','push','isNil','all','forEach','DoubleAttributeMetadata','BigIntAttributeMetadata','IntegerAttributeMetadata','MemoAttributeMetadata','StatusAttributeMetadata','EntityNameAttributeMetadata','StateAttributeMetadata','DecimalAttributeMetadata','concat','test','Wrong\x20credentials','statusCode',')/Attributes(',')/Microsoft.Dynamics.CRM.PicklistAttributeMetadata?','OptionSet','Label','UserLocalizedLabel','DisplayName',')/Microsoft.Dynamics.CRM.BooleanAttributeMetadata?$select=DisplayName,LogicalName&$expand=OptionSet($select=FalseOption,\x20TrueOption)','TrueOption','true','FalseOption','false',')/Microsoft.Dynamics.CRM.','?$select=DisplayName,LogicalName','request-promise','util','lodash','../../components/parsers/qs','../../config/logger','../../mysqldb','../../components/integrations/configuration','status','json','offset','undefined','limit','count','set','Content-Range','then','sendStatus','error','stack','name','send','map','Dynamics365Account','rawAttributes','fieldName','key','model','query','filters','intersection','attributes','nolimit','order','sort','where','pick','merge','type','VIRTUAL','filter','options','includeAll','include','findAll','rows','catch','show','params','keys','fields','length'];(function(_0x27d958,_0x29ef87){var _0x53e63e=function(_0x4130ec){while(--_0x4130ec){_0x27d958['push'](_0x27d958['shift']());}};_0x53e63e(++_0x29ef87);}(_0x657b,0x131));var _0xb657=function(_0x4d437e,_0x1788b6){_0x4d437e=_0x4d437e-0x0;var _0xf14e4c=_0x657b[_0x4d437e];return _0xf14e4c;};'use strict';var rp=require(_0xb657('0x0'));var util=require(_0xb657('0x1'));var _=require(_0xb657('0x2'));var qs=require(_0xb657('0x3'));var logger=require(_0xb657('0x4'))('api');var db=require(_0xb657('0x5'))['db'];var integrations=require(_0xb657('0x6'));function respondWithResult(_0x5da1bc,_0x175072){_0x175072=_0x175072||0xc8;return function(_0x322e57){if(_0x322e57){return _0x5da1bc[_0xb657('0x7')](_0x175072)[_0xb657('0x8')](_0x322e57);}};}function respondWithFilteredResult(_0x446b17,_0x5d54f6){return function(_0x471e78){if(_0x471e78){var _0x55acdf=typeof _0x5d54f6[_0xb657('0x9')]===_0xb657('0xa')&&typeof _0x5d54f6[_0xb657('0xb')]==='undefined';var _0x36b334=_0x471e78['count'];var _0x3c9e00=_0x55acdf?0x0:_0x5d54f6['offset'];var _0x2a3189=_0x55acdf?_0x471e78[_0xb657('0xc')]:_0x5d54f6[_0xb657('0x9')]+_0x5d54f6['limit'];var _0x12aaa7;if(_0x2a3189>=_0x36b334){_0x2a3189=_0x36b334;_0x12aaa7=0xc8;}else{_0x12aaa7=0xce;}_0x446b17[_0xb657('0x7')](_0x12aaa7);return _0x446b17[_0xb657('0xd')](_0xb657('0xe'),_0x3c9e00+'-'+_0x2a3189+'/'+_0x36b334)['json'](_0x471e78);}return null;};}function saveUpdates(_0x3e1ea1){return function(_0x3ebcc2){if(_0x3ebcc2){return _0x3ebcc2['update'](_0x3e1ea1)[_0xb657('0xf')](function(_0x20a26){return _0x20a26;});}return null;};}function removeEntity(_0xf04de9){return function(_0x3ca0b4){if(_0x3ca0b4){return _0x3ca0b4['destroy']()[_0xb657('0xf')](function(){_0xf04de9[_0xb657('0x7')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4d253b){return function(_0x144eaf){if(!_0x144eaf){_0x4d253b[_0xb657('0x10')](0x194);}return _0x144eaf;};}function handleError(_0x2c1fb7,_0x9dc84c){_0x9dc84c=_0x9dc84c||0x1f4;return function(_0x17c045){logger[_0xb657('0x11')](_0x17c045[_0xb657('0x12')]);if(_0x17c045[_0xb657('0x13')]){delete _0x17c045[_0xb657('0x13')];}_0x2c1fb7[_0xb657('0x7')](_0x9dc84c)[_0xb657('0x14')](_0x17c045);};}exports['index']=function(_0x8c156f,_0x12f79e){var _0x21474b={},_0x2120e3={},_0x538a12={'count':0x0,'rows':[]};var _0x58c86c=_[_0xb657('0x15')](db[_0xb657('0x16')][_0xb657('0x17')],function(_0x581db8){return{'name':_0x581db8[_0xb657('0x18')],'type':_0x581db8['type'][_0xb657('0x19')]};});_0x2120e3[_0xb657('0x1a')]=_[_0xb657('0x15')](_0x58c86c,_0xb657('0x13'));_0x2120e3[_0xb657('0x1b')]=_['keys'](_0x8c156f[_0xb657('0x1b')]);_0x2120e3[_0xb657('0x1c')]=_[_0xb657('0x1d')](_0x2120e3[_0xb657('0x1a')],_0x2120e3['query']);_0x21474b[_0xb657('0x1e')]=_['intersection'](_0x2120e3[_0xb657('0x1a')],qs['fields'](_0x8c156f[_0xb657('0x1b')]['fields']));_0x21474b[_0xb657('0x1e')]=_0x21474b[_0xb657('0x1e')]['length']?_0x21474b[_0xb657('0x1e')]:_0x2120e3[_0xb657('0x1a')];if(!_0x8c156f[_0xb657('0x1b')]['hasOwnProperty'](_0xb657('0x1f'))){_0x21474b[_0xb657('0xb')]=qs[_0xb657('0xb')](_0x8c156f[_0xb657('0x1b')][_0xb657('0xb')]);_0x21474b[_0xb657('0x9')]=qs[_0xb657('0x9')](_0x8c156f[_0xb657('0x1b')][_0xb657('0x9')]);}_0x21474b[_0xb657('0x20')]=qs[_0xb657('0x21')](_0x8c156f[_0xb657('0x1b')][_0xb657('0x21')]);_0x21474b[_0xb657('0x22')]=qs[_0xb657('0x1c')](_[_0xb657('0x23')](_0x8c156f[_0xb657('0x1b')],_0x2120e3['filters']),_0x58c86c);if(_0x8c156f[_0xb657('0x1b')]['filter']){_0x21474b[_0xb657('0x22')]=_[_0xb657('0x24')](_0x21474b['where'],{'$or':_[_0xb657('0x15')](_0x58c86c,function(_0x7ec316){if(_0x7ec316[_0xb657('0x25')]!==_0xb657('0x26')){var _0xbff50={};_0xbff50[_0x7ec316['name']]={'$like':'%'+_0x8c156f[_0xb657('0x1b')][_0xb657('0x27')]+'%'};return _0xbff50;}})});}_0x21474b=_[_0xb657('0x24')]({},_0x21474b,_0x8c156f[_0xb657('0x28')]);var _0x2041a7={'where':_0x21474b['where']};return db[_0xb657('0x16')][_0xb657('0xc')](_0x2041a7)[_0xb657('0xf')](function(_0x4cd635){_0x538a12[_0xb657('0xc')]=_0x4cd635;if(_0x8c156f['query'][_0xb657('0x29')]){_0x21474b[_0xb657('0x2a')]=[{'all':!![]}];}return db[_0xb657('0x16')][_0xb657('0x2b')](_0x21474b);})[_0xb657('0xf')](function(_0x87600a){_0x538a12[_0xb657('0x2c')]=_0x87600a;return _0x538a12;})[_0xb657('0xf')](respondWithFilteredResult(_0x12f79e,_0x21474b))[_0xb657('0x2d')](handleError(_0x12f79e,null));};exports[_0xb657('0x2e')]=function(_0x247ace,_0x5693c5){var _0x5c0e8c={'raw':![],'where':{'id':_0x247ace[_0xb657('0x2f')]['id']}},_0x31aa91={};_0x31aa91[_0xb657('0x1a')]=_[_0xb657('0x30')](db[_0xb657('0x16')][_0xb657('0x17')]);_0x31aa91['query']=_[_0xb657('0x30')](_0x247ace['query']);_0x31aa91[_0xb657('0x1c')]=_[_0xb657('0x1d')](_0x31aa91[_0xb657('0x1a')],_0x31aa91[_0xb657('0x1b')]);_0x5c0e8c[_0xb657('0x1e')]=_['intersection'](_0x31aa91[_0xb657('0x1a')],qs[_0xb657('0x31')](_0x247ace[_0xb657('0x1b')][_0xb657('0x31')]));_0x5c0e8c[_0xb657('0x1e')]=_0x5c0e8c[_0xb657('0x1e')][_0xb657('0x32')]?_0x5c0e8c[_0xb657('0x1e')]:_0x31aa91[_0xb657('0x1a')];if(_0x247ace[_0xb657('0x1b')]['includeAll']){_0x5c0e8c[_0xb657('0x2a')]=[{'all':!![]}];}_0x5c0e8c=_['merge']({},_0x5c0e8c,_0x247ace[_0xb657('0x28')]);return db['Dynamics365Account'][_0xb657('0x33')](_0x5c0e8c)[_0xb657('0xf')](handleEntityNotFound(_0x5693c5,null))[_0xb657('0xf')](respondWithResult(_0x5693c5,null))[_0xb657('0x2d')](handleError(_0x5693c5,null));};exports[_0xb657('0x34')]=function(_0x3d4132,_0x5e15cd){return db[_0xb657('0x16')][_0xb657('0x34')](_0x3d4132[_0xb657('0x35')],{})['then'](respondWithResult(_0x5e15cd,0xc9))[_0xb657('0x2d')](handleError(_0x5e15cd,null));};exports[_0xb657('0x36')]=function(_0x41a067,_0x239594){if(_0x41a067[_0xb657('0x35')]['id']){delete _0x41a067[_0xb657('0x35')]['id'];}return db[_0xb657('0x16')][_0xb657('0x33')]({'where':{'id':_0x41a067[_0xb657('0x2f')]['id']}})['then'](handleEntityNotFound(_0x239594,null))[_0xb657('0xf')](saveUpdates(_0x41a067['body'],null))[_0xb657('0xf')](respondWithResult(_0x239594,null))[_0xb657('0x2d')](handleError(_0x239594,null));};exports['destroy']=function(_0xd63abc,_0x59e4b4){return db['Dynamics365Account'][_0xb657('0x33')]({'where':{'id':_0xd63abc[_0xb657('0x2f')]['id']}})[_0xb657('0xf')](handleEntityNotFound(_0x59e4b4,null))[_0xb657('0xf')](removeEntity(_0x59e4b4,null))['catch'](handleError(_0x59e4b4,null));};exports[_0xb657('0x37')]=function(_0xab76d8,_0x2c336a){var _0xb12fd7={};var _0x3f4a16={};var _0x5c7d53;var _0x301c20;return db['Dynamics365Account']['findOne']({'where':{'id':_0xab76d8['params']['id']}})[_0xb657('0xf')](handleEntityNotFound(_0x2c336a,null))['then'](function(_0x2367aa){if(_0x2367aa){_0x5c7d53=_0x2367aa;_0x3f4a16[_0xb657('0x1a')]=_[_0xb657('0x30')](db['Dynamics365Configuration'][_0xb657('0x17')]);_0x3f4a16[_0xb657('0x1b')]=_[_0xb657('0x30')](_0xab76d8[_0xb657('0x1b')]);_0x3f4a16[_0xb657('0x1c')]=_[_0xb657('0x1d')](_0x3f4a16['model'],_0x3f4a16[_0xb657('0x1b')]);_0xb12fd7[_0xb657('0x1e')]=_['intersection'](_0x3f4a16[_0xb657('0x1a')],qs['fields'](_0xab76d8[_0xb657('0x1b')]['fields']));_0xb12fd7[_0xb657('0x1e')]=_0xb12fd7['attributes'][_0xb657('0x32')]?_0xb12fd7['attributes']:_0x3f4a16[_0xb657('0x1a')];_0xb12fd7[_0xb657('0x20')]=qs[_0xb657('0x21')](_0xab76d8[_0xb657('0x1b')][_0xb657('0x21')]);_0xb12fd7['where']=qs[_0xb657('0x1c')](_[_0xb657('0x23')](_0xab76d8[_0xb657('0x1b')],_0x3f4a16[_0xb657('0x1c')]));if(_0xab76d8[_0xb657('0x1b')][_0xb657('0x27')]){_0xb12fd7['where']=_[_0xb657('0x24')](_0xb12fd7[_0xb657('0x22')],{'$or':_[_0xb657('0x15')](_0xb12fd7[_0xb657('0x1e')],function(_0xfb5b71){var _0x267339={};_0x267339[_0xfb5b71]={'$like':'%'+_0xab76d8[_0xb657('0x1b')][_0xb657('0x27')]+'%'};return _0x267339;})});}_0xb12fd7=_[_0xb657('0x24')]({},_0xb12fd7,_0xab76d8['options']);return _0x5c7d53[_0xb657('0x37')](_0xb12fd7);}})[_0xb657('0xf')](function(_0x23102b){if(_0x23102b){_0x301c20=_0x23102b[_0xb657('0x32')];if(!_0xab76d8[_0xb657('0x1b')]['hasOwnProperty'](_0xb657('0x1f'))){_0xb12fd7['limit']=qs['limit'](_0xab76d8[_0xb657('0x1b')][_0xb657('0xb')]);_0xb12fd7[_0xb657('0x9')]=qs[_0xb657('0x9')](_0xab76d8[_0xb657('0x1b')]['offset']);}return _0x5c7d53[_0xb657('0x37')](_0xb12fd7);}})['then'](function(_0x1b7cba){if(_0x1b7cba){return _0x1b7cba?{'count':_0x301c20,'rows':_0x1b7cba}:null;}})[_0xb657('0xf')](respondWithResult(_0x2c336a,null))[_0xb657('0x2d')](handleError(_0x2c336a,null));};exports[_0xb657('0x38')]=function(_0xccc49b,_0x162d76){if(_0xccc49b[_0xb657('0x35')]['id']){delete _0xccc49b[_0xb657('0x35')]['id'];}return db[_0xb657('0x16')][_0xb657('0x39')]({'where':{'id':_0xccc49b[_0xb657('0x2f')]['id']}})[_0xb657('0xf')](handleEntityNotFound(_0x162d76,null))[_0xb657('0xf')](function(_0x148dba){if(_0x148dba){_0xccc49b[_0xb657('0x35')][_0xb657('0x3a')]=_0x148dba['id'];_0xccc49b[_0xb657('0x35')][_0xb657('0x3b')]=integrations[_0xb657('0x3c')](_0xccc49b[_0xb657('0x35')][_0xb657('0x3d')],_0xccc49b[_0xb657('0x35')][_0xb657('0x25')]);_0xccc49b['body'][_0xb657('0x3e')]=integrations[_0xb657('0x3f')](_0xccc49b[_0xb657('0x35')]['channel'],_0xccc49b[_0xb657('0x35')]['type']);return db['Dynamics365Configuration'][_0xb657('0x34')](_0xccc49b[_0xb657('0x35')],{'include':[{'model':db[_0xb657('0x40')],'as':'Subjects'},{'model':db[_0xb657('0x40')],'as':_0xb657('0x3e')}]});}return null;})[_0xb657('0xf')](respondWithResult(_0x162d76,null))['catch'](handleError(_0x162d76,null));};function sanitizeRemoteUri(_0x5e0cc0){var _0x35acf5=_0x5e0cc0[_0xb657('0x41')](-0x1);if(_0x35acf5==='/')return _0x5e0cc0[_0xb657('0x42')](0x0,_0x5e0cc0[_0xb657('0x43')](_0x35acf5));return _0x5e0cc0;}function getWebApiUrl(_0x25a27e){return util['format']('%s/api/data/v9.0/',_0x25a27e);}exports[_0xb657('0x44')]=function(_0x46bc3d,_0xcba01c){var _0xe8f0b2=_0x46bc3d[_0xb657('0x1b')]['ticketType'];var _0x2ca539=_0xe8f0b2===_0xb657('0x45')?'Incident':_0xb657('0x46');var _0xfe306f='';var _0x3f2773='';var _0x248dbf='';var _0x13eb21='';var _0x1679d9='';var _0x76336f='';var _0x15f10a='';var _0x5d77ee='';var _0x4c7d4b=['title',_0xb657('0x47'),_0xb657('0x48'),_0xb657('0x49'),_0xb657('0x4a'),_0xb657('0x4b'),_0xb657('0x4c'),_0xb657('0x4d'),'directioncode',_0xb657('0x4e')];var _0x4c3a05=['accountidname',_0xb657('0x4f'),_0xb657('0x50'),'billedserviceunits',_0xb657('0x51'),_0xb657('0x52'),_0xb657('0x53'),'contractidname',_0xb657('0x54'),_0xb657('0x55'),_0xb657('0x56'),_0xb657('0x57'),_0xb657('0x58'),'createdonbehalfbyname','createdonbehalfbyyominame',_0xb657('0x59'),_0xb657('0x5a'),_0xb657('0x5b'),_0xb657('0x5c'),_0xb657('0x5d'),_0xb657('0x5e'),_0xb657('0x5f'),_0xb657('0x60'),'exchangerate',_0xb657('0x61'),_0xb657('0x62'),'importsequencenumber','influencescore','kbarticleidname','lastonholdtime','masteridname',_0xb657('0x63'),_0xb657('0x64'),_0xb657('0x65'),'modifiedbyyominame','modifiedon','modifiedonbehalfbyname',_0xb657('0x66'),_0xb657('0x67'),_0xb657('0x68'),_0xb657('0x69'),'onholdtime',_0xb657('0x6a'),_0xb657('0x6b'),_0xb657('0x6c'),'owneridyominame',_0xb657('0x6d'),'primarycontactidname',_0xb657('0x6e'),_0xb657('0x6f'),'productidname','productserialnumber',_0xb657('0x70'),_0xb657('0x71'),'responseby','responsiblecontactidname',_0xb657('0x72'),_0xb657('0x73'),_0xb657('0x74'),_0xb657('0x75'),_0xb657('0x76'),_0xb657('0x77'),'statuscode','subjectidname',_0xb657('0x78'),_0xb657('0x79'),_0xb657('0x7a'),_0xb657('0x7b'),'utcconversiontimezonecode',_0xb657('0x7c')];var _0xafc404=_0x4c7d4b['concat'](_0x4c3a05);return db[_0xb657('0x16')]['findOne']({'where':{'id':_0x46bc3d['params']['id']},'attributes':['id','username','password',_0xb657('0x7d'),'tenantId',_0xb657('0x7e'),_0xb657('0x7f'),_0xb657('0x80')],'include':[{'model':db['CloudProvider'],'as':'CloudProvider','attributes':['id',_0xb657('0x81'),'data7']}]})[_0xb657('0xf')](handleEntityNotFound(_0xcba01c,null))[_0xb657('0xf')](function(_0x54d02b){if(_0x54d02b){if(_0x54d02b[_0xb657('0x80')]){_0x54d02b[_0xb657('0x82')]=_0x54d02b[_0xb657('0x83')][_0xb657('0x81')];_0x5d77ee=sanitizeRemoteUri(_0x54d02b[_0xb657('0x83')][_0xb657('0x84')]);_0x15f10a=getWebApiUrl(_0x5d77ee);return _0x54d02b;}_0x5d77ee=sanitizeRemoteUri(_0x54d02b[_0xb657('0x7d')]);_0x15f10a=getWebApiUrl(_0x5d77ee);var _0x647043={'method':_0xb657('0x85'),'uri':_0xb657('0x86')+_0x54d02b['tenantId']+_0xb657('0x87'),'form':{'client_id':_0x54d02b[_0xb657('0x7e')],'resource':_0x5d77ee,'username':_0x54d02b[_0xb657('0x88')],'password':_0x54d02b[_0xb657('0x89')],'grant_type':_0xb657('0x89'),'client_secret':_0x54d02b['clientSecret']},'json':!![]};return rp(_0x647043);}})[_0xb657('0xf')](function(_0x27b96a){_0x76336f=_0x27b96a[_0xb657('0x82')];var _0x537b50={'method':_0xb657('0x8a'),'uri':encodeURI(_0x15f10a+'EntityDefinitions?$select=DisplayName,EntitySetName&$filter=SchemaName\x20eq\x20\x27'+_0x2ca539+'\x27'),'headers':{'Authorization':'Bearer\x20'+_0x76336f,'If-None-Match':null,'OData-Version':_0xb657('0x8b')},'json':!![]};return rp(_0x537b50);})[_0xb657('0xf')](function(_0x1417fb){var _0x2de897=_0x1417fb[_0xb657('0x8c')][0x0];var _0x1aa012=_0x2de897[_0xb657('0x8d')];var _0x3f1a07={'method':_0xb657('0x8a'),'uri':_0x15f10a+_0xb657('0x8e')+_0x1aa012+_0xb657('0x8f'),'headers':{'Authorization':_0xb657('0x90')+_0x76336f,'If-None-Match':null,'OData-Version':'4.0'},'json':!![]};return rp(_0x3f1a07);})[_0xb657('0xf')](function(_0x2cbaa0){_0xfe306f=_0x2cbaa0;_0x3f2773=_0xfe306f[_0xb657('0x91')];_0x3f2773=_['remove'](_0x3f2773,function(_0x27d455){return!_0xafc404[_0xb657('0x92')](_0x27d455[_0xb657('0x93')]);});var _0x3ec364=[];var _0x54bf8e=[];_0x3f2773['forEach'](function(_0x20ef2f){if(_0x20ef2f[_0xb657('0x94')]){var _0x5386c6=_0x20ef2f[_0xb657('0x94')][_0xb657('0x42')](_0x20ef2f[_0xb657('0x94')][_0xb657('0x43')]('.')+0x1);if(_0x5386c6==='PicklistAttributeMetadata'){_0x3ec364[_0xb657('0x95')](getSelectList(_0x15f10a,_0xe8f0b2,_0x54bf8e,_0xfe306f['MetadataId'],_0x20ef2f['MetadataId'],_0x76336f));}}});return Promise['all'](_0x3ec364);})[_0xb657('0xf')](function(_0x27fadf){_0x248dbf=_0x27fadf[0x0];var _0x2b5789=[];var _0x3b1966=[];_0x3f2773['forEach'](function(_0x4e3ac7){if(!_[_0xb657('0x96')](_0x4e3ac7[_0xb657('0x94')])){var _0x49d6b1=_0x4e3ac7[_0xb657('0x94')][_0xb657('0x42')](_0x4e3ac7[_0xb657('0x94')][_0xb657('0x43')]('.')+0x1);if(_0x49d6b1==='BooleanAttributeMetadata'){_0x2b5789[_0xb657('0x95')](getBooleanList(_0x15f10a,_0xe8f0b2,_0x3b1966,_0xfe306f[_0xb657('0x8d')],_0x4e3ac7[_0xb657('0x8d')],_0x76336f));}}});return Promise[_0xb657('0x97')](_0x2b5789);})['then'](function(_0x2a9739){_0x13eb21=_0x2a9739[0x0];var _0x24f533=[];var _0x2f5789=[];_0x3f2773[_0xb657('0x98')](function(_0x61e73d){if(_0x61e73d[_0xb657('0x94')]){var _0x15d7c3=_0x61e73d[_0xb657('0x94')][_0xb657('0x42')](_0x61e73d['@odata.type']['lastIndexOf']('.')+0x1);if(_0x15d7c3==='StringAttributeMetadata'||_0x15d7c3===_0xb657('0x99')||_0x15d7c3===_0xb657('0x9a')||_0x15d7c3===_0xb657('0x9b')||_0x15d7c3===_0xb657('0x9c')||_0x15d7c3==='DateTimeAttributeMetadata'||_0x15d7c3===_0xb657('0x9d')||_0x15d7c3===_0xb657('0x9e')||_0x15d7c3===_0xb657('0x9f')||_0x15d7c3===_0xb657('0xa0')){_0x24f533[_0xb657('0x95')](getInputList(_0x15f10a,_0xe8f0b2,_0x15d7c3,_0x2f5789,_0xfe306f[_0xb657('0x8d')],_0x61e73d[_0xb657('0x8d')],_0x76336f));}}});return Promise[_0xb657('0x97')](_0x24f533);})[_0xb657('0xf')](function(_0x504f61){_0x1679d9=_0x504f61[0x0];var _0x18dbe0=_0x248dbf[_0xb657('0xa1')](_0x13eb21)[_0xb657('0xa1')](_0x1679d9);var _0x3b39f7={'count':_0x18dbe0[_0xb657('0x32')],'rows':_0x18dbe0};return _0x3b39f7;})['then'](respondWithResult(_0xcba01c,null))[_0xb657('0x2d')](function(_0x23c132){var _0x5aa3aa=_0x46bc3d[_0xb657('0x1b')][_0xb657('0xa2')]?0x1f4:_0x23c132['statusCode']||0x1f4;logger[_0xb657('0x11')](_0x23c132['stack']);delete _0x23c132['name'];if(_0x5aa3aa===0x191){_0x5aa3aa=0x190;}_0xcba01c[_0xb657('0x7')](_0x5aa3aa)[_0xb657('0x14')](_0x46bc3d[_0xb657('0x1b')][_0xb657('0xa2')]?{'message':_0xb657('0xa3'),'statusCode':_0x23c132[_0xb657('0xa4')]}:_0x23c132);});};function getSelectList(_0x3e0652,_0x45cffc,_0x147231,_0xc71e4f,_0x2a8a27,_0x59485c){var _0x1fabbf={'method':'GET','uri':_0x3e0652+_0xb657('0x8e')+_0xc71e4f+_0xb657('0xa5')+_0x2a8a27+_0xb657('0xa6')+'$select=DisplayName,LogicalName&$expand=OptionSet($select=Options)','headers':{'Authorization':_0xb657('0x90')+_0x59485c,'If-None-Match':null,'OData-Version':'4.0'},'json':!![]};return rp(_0x1fabbf)['then'](function(_0x51493f){var _0x4d6e18=[];var _0x4b7325=_0x51493f[_0xb657('0xa7')]['Options'];_0x4b7325[_0xb657('0x98')](function(_0x50c7cd){_0x4d6e18['push']({'name':_0x50c7cd[_0xb657('0xa8')][_0xb657('0xa9')]['Label'],'value':String(_0x50c7cd['Value'])});});var _0x560397={'id':_0x45cffc+'_'+_0x51493f['LogicalName'],'name':_0x51493f[_0xb657('0xaa')][_0xb657('0xa9')]['Label'],'custom':![],'options':_0x4d6e18};_0x147231['push'](_0x560397);return _0x147231;});}function getBooleanList(_0x5d2447,_0x40a159,_0x21d57c,_0x1d5b6a,_0x24acea,_0x40ca95){var _0x4f92a2={'method':'GET','uri':_0x5d2447+_0xb657('0x8e')+_0x1d5b6a+_0xb657('0xa5')+_0x24acea+_0xb657('0xab'),'headers':{'Authorization':'Bearer\x20'+_0x40ca95,'If-None-Match':null,'OData-Version':_0xb657('0x8b')},'json':!![]};return rp(_0x4f92a2)[_0xb657('0xf')](function(_0x12fef5){var _0x2ce726=[];_0x2ce726['push']({'name':_0x12fef5[_0xb657('0xa7')][_0xb657('0xac')][_0xb657('0xa8')][_0xb657('0xa9')][_0xb657('0xa8')],'value':_0xb657('0xad')},{'name':_0x12fef5[_0xb657('0xa7')][_0xb657('0xae')][_0xb657('0xa8')][_0xb657('0xa9')]['Label'],'value':_0xb657('0xaf')});var _0x42a25={'id':_0x40a159+'_'+_0x12fef5['LogicalName'],'name':_0x12fef5[_0xb657('0xaa')][_0xb657('0xa9')][_0xb657('0xa8')],'custom':![],'options':_0x2ce726};_0x21d57c[_0xb657('0x95')](_0x42a25);return _0x21d57c;});}function getInputList(_0x4a4902,_0x2afcfb,_0x6a58eb,_0x2b45d8,_0x17eb16,_0x389a83,_0x2810b7){var _0x3b245b={'method':_0xb657('0x8a'),'uri':_0x4a4902+_0xb657('0x8e')+_0x17eb16+_0xb657('0xa5')+_0x389a83+_0xb657('0xb0')+_0x6a58eb+_0xb657('0xb1'),'headers':{'Authorization':_0xb657('0x90')+_0x2810b7,'If-None-Match':null,'OData-Version':_0xb657('0x8b')},'json':!![]};return rp(_0x3b245b)[_0xb657('0xf')](function(_0x4e6607){var _0x41a4a6={'id':_0x2afcfb+'_'+_0x4e6607[_0xb657('0x93')],'name':_0x4e6607['DisplayName']['UserLocalizedLabel']?_0x4e6607[_0xb657('0xaa')][_0xb657('0xa9')]['Label']:_0x4e6607['LogicalName'],'custom':![],'options':[]};_0x2b45d8[_0xb657('0x95')](_0x41a4a6);return _0x2b45d8;});}
\ No newline at end of file
index 9f61a79..1fe803e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd8b0=['exports','Dynamics365Account','int_dynamics365_accounts','lodash','util','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x580705,_0x47233b){var _0x264300=function(_0x20cb18){while(--_0x20cb18){_0x580705['push'](_0x580705['shift']());}};_0x264300(++_0x47233b);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x0d8b('0x2'));var rp=require(_0x0d8b('0x3'));var fs=require('fs');var path=require(_0x0d8b('0x4'));var rimraf=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));var attributes=require('./intDynamics365Account.attributes');var integrations=require('../../components/integrations/configuration');module[_0x0d8b('0x7')]=function(_0x227c63,_0x39f43a){return _0x227c63['define'](_0x0d8b('0x8'),attributes,{'tableName':_0x0d8b('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xbaf0=['../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./intDynamics365Account.attributes','../../components/integrations/configuration','exports','define','Dynamics365Account','util'];(function(_0x39dda2,_0x383be4){var _0x10aaaa=function(_0x417d69){while(--_0x417d69){_0x39dda2['push'](_0x39dda2['shift']());}};_0x10aaaa(++_0x383be4);}(_0xbaf0,0x12a));var _0x0baf=function(_0x465028,_0x4570ac){_0x465028=_0x465028-0x0;var _0xb783d4=_0xbaf0[_0x465028];return _0xb783d4;};'use strict';var _=require('lodash');var util=require(_0x0baf('0x0'));var logger=require(_0x0baf('0x1'))(_0x0baf('0x2'));var moment=require(_0x0baf('0x3'));var BPromise=require(_0x0baf('0x4'));var rp=require(_0x0baf('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x0baf('0x6'));var config=require(_0x0baf('0x7'));var attributes=require(_0x0baf('0x8'));var integrations=require(_0x0baf('0x9'));module[_0x0baf('0xa')]=function(_0x335e24,_0x1a10b1){return _0x335e24[_0x0baf('0xb')](_0x0baf('0xc'),attributes,{'tableName':'int_dynamics365_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 752a55b..99bd655 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9cbc=['find','where','lodash','util','moment','ioredis','../../config/utils','rpc','../../config/environment','client','http','request','then','Dynamics365Account,\x20%s,\x20%s','request\x20sent','error','message','info','result','catch','Dynamics365Account','findAll','options','raw','map','include','model','attributes','GetDynamics365Account','debug','stringify','ShowDynamics365Account'];(function(_0x12c72e,_0x306bd4){var _0x5190b5=function(_0x481f03){while(--_0x481f03){_0x12c72e['push'](_0x12c72e['shift']());}};_0x5190b5(++_0x306bd4);}(_0x9cbc,0x1e2));var _0xc9cb=function(_0x34bcf6,_0x2cc521){_0x34bcf6=_0x34bcf6-0x0;var _0x54adc9=_0x9cbc[_0x34bcf6];return _0x54adc9;};'use strict';var _=require(_0xc9cb('0x0'));var util=require(_0xc9cb('0x1'));var moment=require(_0xc9cb('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xc9cb('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xc9cb('0x4'));var logger=require('../../config/logger')(_0xc9cb('0x5'));var config=require(_0xc9cb('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xc9cb('0x7')][_0xc9cb('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x112449,_0x29ea83,_0x55fd64){return new BPromise(function(_0x5e442e,_0x306f94){return client[_0xc9cb('0x9')](_0x112449,_0x55fd64)[_0xc9cb('0xa')](function(_0x333c8c){logger['info'](_0xc9cb('0xb'),_0x29ea83,_0xc9cb('0xc'));logger['debug']('Dynamics365Account,\x20%s,\x20%s,\x20%s',_0x29ea83,_0xc9cb('0xc'),JSON['stringify'](_0x333c8c));if(_0x333c8c['error']){if(_0x333c8c[_0xc9cb('0xd')]['code']===0x1f4){logger[_0xc9cb('0xd')](_0xc9cb('0xb'),_0x29ea83,_0x333c8c[_0xc9cb('0xd')][_0xc9cb('0xe')]);return _0x306f94(_0x333c8c[_0xc9cb('0xd')][_0xc9cb('0xe')]);}logger[_0xc9cb('0xd')](_0xc9cb('0xb'),_0x29ea83,_0x333c8c['error']['message']);return _0x5e442e(_0x333c8c['error'][_0xc9cb('0xe')]);}else{logger[_0xc9cb('0xf')](_0xc9cb('0xb'),_0x29ea83,'request\x20sent');_0x5e442e(_0x333c8c[_0xc9cb('0x10')]['message']);}})[_0xc9cb('0x11')](function(_0x42fd25){logger[_0xc9cb('0xd')]('Dynamics365Account,\x20%s,\x20%s',_0x29ea83,_0x42fd25);_0x306f94(_0x42fd25);});});}exports['GetDynamics365Account']=function(_0x5580dc){var _0xd82260=this;return new Promise(function(_0x4c8d62,_0x2cf790){return db[_0xc9cb('0x12')][_0xc9cb('0x13')]({'raw':_0x5580dc[_0xc9cb('0x14')]?_0x5580dc[_0xc9cb('0x14')][_0xc9cb('0x15')]===undefined?!![]:![]:!![],'where':_0x5580dc[_0xc9cb('0x14')]?_0x5580dc[_0xc9cb('0x14')]['where']||null:null,'attributes':_0x5580dc['options']?_0x5580dc['options']['attributes']||null:null,'limit':_0x5580dc[_0xc9cb('0x14')]?_0x5580dc[_0xc9cb('0x14')]['limit']||null:null,'include':_0x5580dc['options']?_0x5580dc[_0xc9cb('0x14')]['include']?_[_0xc9cb('0x16')](_0x5580dc[_0xc9cb('0x14')][_0xc9cb('0x17')],function(_0x3645e0){return{'model':db[_0x3645e0[_0xc9cb('0x18')]],'as':_0x3645e0['as'],'attributes':_0x3645e0[_0xc9cb('0x19')],'include':_0x3645e0[_0xc9cb('0x17')]?_[_0xc9cb('0x16')](_0x3645e0[_0xc9cb('0x17')],function(_0x45beea){return{'model':db[_0x45beea[_0xc9cb('0x18')]],'as':_0x45beea['as'],'attributes':_0x45beea[_0xc9cb('0x19')],'include':_0x45beea[_0xc9cb('0x17')]?_[_0xc9cb('0x16')](_0x45beea['include'],function(_0x954475){return{'model':db[_0x954475['model']],'as':_0x954475['as'],'attributes':_0x954475[_0xc9cb('0x19')]};}):[]};}):[]};}):[]:[]})[_0xc9cb('0xa')](function(_0x342317){logger[_0xc9cb('0xf')](_0xc9cb('0x1a'),_0x5580dc);logger[_0xc9cb('0x1b')](_0xc9cb('0x1a'),_0x5580dc,JSON[_0xc9cb('0x1c')](_0x342317));_0x4c8d62(_0x342317);})[_0xc9cb('0x11')](function(_0x133366){logger[_0xc9cb('0xd')](_0xc9cb('0x1a'),_0x133366[_0xc9cb('0xe')],_0x5580dc);_0x2cf790(_0xd82260[_0xc9cb('0xd')](0x1f4,_0x133366[_0xc9cb('0xe')]));});});};exports[_0xc9cb('0x1d')]=function(_0x14ca99){var _0x8201f9=this;return new Promise(function(_0x9fee49,_0xe29aab){return db[_0xc9cb('0x12')][_0xc9cb('0x1e')]({'raw':_0x14ca99['options']?_0x14ca99['options'][_0xc9cb('0x15')]===undefined?!![]:![]:!![],'where':_0x14ca99[_0xc9cb('0x14')]?_0x14ca99[_0xc9cb('0x14')][_0xc9cb('0x1f')]||null:null,'attributes':_0x14ca99['options']?_0x14ca99['options'][_0xc9cb('0x19')]||null:null,'include':_0x14ca99[_0xc9cb('0x14')]?_0x14ca99['options'][_0xc9cb('0x17')]?_[_0xc9cb('0x16')](_0x14ca99[_0xc9cb('0x14')]['include'],function(_0x58a7d1){return{'model':db[_0x58a7d1[_0xc9cb('0x18')]],'as':_0x58a7d1['as'],'attributes':_0x58a7d1[_0xc9cb('0x19')],'include':_0x58a7d1[_0xc9cb('0x17')]?_[_0xc9cb('0x16')](_0x58a7d1[_0xc9cb('0x17')],function(_0x4e3f97){return{'model':db[_0x4e3f97[_0xc9cb('0x18')]],'as':_0x4e3f97['as'],'attributes':_0x4e3f97[_0xc9cb('0x19')],'include':_0x4e3f97[_0xc9cb('0x17')]?_[_0xc9cb('0x16')](_0x4e3f97[_0xc9cb('0x17')],function(_0x3846dc){return{'model':db[_0x3846dc[_0xc9cb('0x18')]],'as':_0x3846dc['as'],'attributes':_0x3846dc[_0xc9cb('0x19')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x4348db){logger[_0xc9cb('0xf')](_0xc9cb('0x1d'),_0x14ca99);logger[_0xc9cb('0x1b')]('ShowDynamics365Account',_0x14ca99,JSON[_0xc9cb('0x1c')](_0x4348db));_0x9fee49(_0x4348db);})['catch'](function(_0x37a744){logger[_0xc9cb('0xd')](_0xc9cb('0x1d'),_0x37a744[_0xc9cb('0xe')],_0x14ca99);_0xe29aab(_0x8201f9['error'](0x1f4,_0x37a744['message']));});});};
\ No newline at end of file
+var _0xf229=['then','Dynamics365Account,\x20%s,\x20%s','debug','Dynamics365Account,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','request\x20sent','result','catch','findAll','options','raw','attributes','limit','include','map','model','GetDynamics365Account','ShowDynamics365Account','Dynamics365Account','find','where','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http'];(function(_0xd5f14,_0x43371d){var _0xb417ec=function(_0x9860b0){while(--_0x9860b0){_0xd5f14['push'](_0xd5f14['shift']());}};_0xb417ec(++_0x43371d);}(_0xf229,0x131));var _0x9f22=function(_0xf70346,_0x2ce180){_0xf70346=_0xf70346-0x0;var _0x4636fb=_0xf229[_0xf70346];return _0x4636fb;};'use strict';var _=require(_0x9f22('0x0'));var util=require('util');var moment=require(_0x9f22('0x1'));var BPromise=require('bluebird');var rs=require(_0x9f22('0x2'));var fs=require('fs');var Redis=require(_0x9f22('0x3'));var db=require(_0x9f22('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x9f22('0x5'))(_0x9f22('0x6'));var config=require(_0x9f22('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x9f22('0x8')][_0x9f22('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x195ce7,_0x1f7eac,_0x3cb923){return new BPromise(function(_0x1323b7,_0x55a77b){return client['request'](_0x195ce7,_0x3cb923)[_0x9f22('0xa')](function(_0x5e61cd){logger['info'](_0x9f22('0xb'),_0x1f7eac,'request\x20sent');logger[_0x9f22('0xc')](_0x9f22('0xd'),_0x1f7eac,'request\x20sent',JSON[_0x9f22('0xe')](_0x5e61cd));if(_0x5e61cd[_0x9f22('0xf')]){if(_0x5e61cd[_0x9f22('0xf')][_0x9f22('0x10')]===0x1f4){logger[_0x9f22('0xf')]('Dynamics365Account,\x20%s,\x20%s',_0x1f7eac,_0x5e61cd[_0x9f22('0xf')][_0x9f22('0x11')]);return _0x55a77b(_0x5e61cd[_0x9f22('0xf')][_0x9f22('0x11')]);}logger[_0x9f22('0xf')](_0x9f22('0xb'),_0x1f7eac,_0x5e61cd[_0x9f22('0xf')]['message']);return _0x1323b7(_0x5e61cd[_0x9f22('0xf')][_0x9f22('0x11')]);}else{logger[_0x9f22('0x12')](_0x9f22('0xb'),_0x1f7eac,_0x9f22('0x13'));_0x1323b7(_0x5e61cd[_0x9f22('0x14')]['message']);}})[_0x9f22('0x15')](function(_0x84dc1e){logger[_0x9f22('0xf')](_0x9f22('0xb'),_0x1f7eac,_0x84dc1e);_0x55a77b(_0x84dc1e);});});}exports['GetDynamics365Account']=function(_0x5b997b){var _0x423aee=this;return new Promise(function(_0x1bafa8,_0x4e4a64){return db['Dynamics365Account'][_0x9f22('0x16')]({'raw':_0x5b997b[_0x9f22('0x17')]?_0x5b997b[_0x9f22('0x17')][_0x9f22('0x18')]===undefined?!![]:![]:!![],'where':_0x5b997b['options']?_0x5b997b[_0x9f22('0x17')]['where']||null:null,'attributes':_0x5b997b[_0x9f22('0x17')]?_0x5b997b[_0x9f22('0x17')][_0x9f22('0x19')]||null:null,'limit':_0x5b997b['options']?_0x5b997b['options'][_0x9f22('0x1a')]||null:null,'include':_0x5b997b[_0x9f22('0x17')]?_0x5b997b[_0x9f22('0x17')][_0x9f22('0x1b')]?_[_0x9f22('0x1c')](_0x5b997b[_0x9f22('0x17')]['include'],function(_0x4c8cdf){return{'model':db[_0x4c8cdf[_0x9f22('0x1d')]],'as':_0x4c8cdf['as'],'attributes':_0x4c8cdf['attributes'],'include':_0x4c8cdf[_0x9f22('0x1b')]?_['map'](_0x4c8cdf['include'],function(_0x1d7b84){return{'model':db[_0x1d7b84[_0x9f22('0x1d')]],'as':_0x1d7b84['as'],'attributes':_0x1d7b84[_0x9f22('0x19')],'include':_0x1d7b84[_0x9f22('0x1b')]?_[_0x9f22('0x1c')](_0x1d7b84[_0x9f22('0x1b')],function(_0x118d5c){return{'model':db[_0x118d5c[_0x9f22('0x1d')]],'as':_0x118d5c['as'],'attributes':_0x118d5c[_0x9f22('0x19')]};}):[]};}):[]};}):[]:[]})[_0x9f22('0xa')](function(_0x4f383a){logger[_0x9f22('0x12')](_0x9f22('0x1e'),_0x5b997b);logger['debug'](_0x9f22('0x1e'),_0x5b997b,JSON[_0x9f22('0xe')](_0x4f383a));_0x1bafa8(_0x4f383a);})[_0x9f22('0x15')](function(_0xec127f){logger[_0x9f22('0xf')](_0x9f22('0x1e'),_0xec127f[_0x9f22('0x11')],_0x5b997b);_0x4e4a64(_0x423aee[_0x9f22('0xf')](0x1f4,_0xec127f[_0x9f22('0x11')]));});});};exports[_0x9f22('0x1f')]=function(_0x4b2230){var _0x385f7f=this;return new Promise(function(_0x43157c,_0x1a0ffb){return db[_0x9f22('0x20')][_0x9f22('0x21')]({'raw':_0x4b2230[_0x9f22('0x17')]?_0x4b2230['options']['raw']===undefined?!![]:![]:!![],'where':_0x4b2230[_0x9f22('0x17')]?_0x4b2230[_0x9f22('0x17')][_0x9f22('0x22')]||null:null,'attributes':_0x4b2230[_0x9f22('0x17')]?_0x4b2230[_0x9f22('0x17')][_0x9f22('0x19')]||null:null,'include':_0x4b2230[_0x9f22('0x17')]?_0x4b2230[_0x9f22('0x17')]['include']?_['map'](_0x4b2230['options'][_0x9f22('0x1b')],function(_0x36e06f){return{'model':db[_0x36e06f['model']],'as':_0x36e06f['as'],'attributes':_0x36e06f['attributes'],'include':_0x36e06f['include']?_[_0x9f22('0x1c')](_0x36e06f[_0x9f22('0x1b')],function(_0x3a978d){return{'model':db[_0x3a978d['model']],'as':_0x3a978d['as'],'attributes':_0x3a978d[_0x9f22('0x19')],'include':_0x3a978d[_0x9f22('0x1b')]?_[_0x9f22('0x1c')](_0x3a978d[_0x9f22('0x1b')],function(_0x2ca144){return{'model':db[_0x2ca144[_0x9f22('0x1d')]],'as':_0x2ca144['as'],'attributes':_0x2ca144[_0x9f22('0x19')]};}):[]};}):[]};}):[]:[]})[_0x9f22('0xa')](function(_0x4d6d9b){logger[_0x9f22('0x12')](_0x9f22('0x1f'),_0x4b2230);logger[_0x9f22('0xc')](_0x9f22('0x1f'),_0x4b2230,JSON[_0x9f22('0xe')](_0x4d6d9b));_0x43157c(_0x4d6d9b);})[_0x9f22('0x15')](function(_0x358234){logger[_0x9f22('0xf')](_0x9f22('0x1f'),_0x358234['message'],_0x4b2230);_0x1a0ffb(_0x385f7f['error'](0x1f4,_0x358234[_0x9f22('0x11')]));});});};
\ No newline at end of file
index dfa5d3f..3841c40 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfdb8=['/:id','show','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','create','put','delete','destroy','multer','util','path','connect-timeout','express','fs-extra','../../components/interaction/service','../../config/environment','isAuthenticated','index','get'];(function(_0x47b15f,_0x103e93){var _0x55bf25=function(_0x51fe7f){while(--_0x51fe7f){_0x47b15f['push'](_0x47b15f['shift']());}};_0x55bf25(++_0x103e93);}(_0xfdb8,0x120));var _0x8fdb=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xfdb8[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0x8fdb('0x0'));var util=require(_0x8fdb('0x1'));var path=require(_0x8fdb('0x2'));var timeout=require(_0x8fdb('0x3'));var express=require(_0x8fdb('0x4'));var router=express['Router']();var fs_extra=require(_0x8fdb('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x8fdb('0x6'));var config=require(_0x8fdb('0x7'));var controller=require('./intDynamics365Configuration.controller');router['get']('/',auth[_0x8fdb('0x8')](),controller[_0x8fdb('0x9')]);router[_0x8fdb('0xa')](_0x8fdb('0xb'),auth[_0x8fdb('0x8')](),controller[_0x8fdb('0xc')]);router[_0x8fdb('0xa')]('/:id/fields',auth['isAuthenticated'](),controller[_0x8fdb('0xd')]);router[_0x8fdb('0xa')](_0x8fdb('0xe'),auth[_0x8fdb('0x8')](),controller[_0x8fdb('0xf')]);router[_0x8fdb('0xa')](_0x8fdb('0x10'),auth[_0x8fdb('0x8')](),controller[_0x8fdb('0x11')]);router[_0x8fdb('0x12')]('/',auth[_0x8fdb('0x8')](),controller[_0x8fdb('0x13')]);router[_0x8fdb('0x14')](_0x8fdb('0xb'),auth[_0x8fdb('0x8')](),controller['update']);router[_0x8fdb('0x15')](_0x8fdb('0xb'),auth[_0x8fdb('0x8')](),controller[_0x8fdb('0x16')]);module['exports']=router;
\ No newline at end of file
+var _0x666b=['show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','create','put','update','delete','destroy','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','./intDynamics365Configuration.controller','get','isAuthenticated','/:id'];(function(_0x3137f6,_0x5d9dbf){var _0x28f5b7=function(_0x126769){while(--_0x126769){_0x3137f6['push'](_0x3137f6['shift']());}};_0x28f5b7(++_0x5d9dbf);}(_0x666b,0x107));var _0xb666=function(_0x9a7d08,_0xe9048){_0x9a7d08=_0x9a7d08-0x0;var _0x58e6e8=_0x666b[_0x9a7d08];return _0x58e6e8;};'use strict';var multer=require(_0xb666('0x0'));var util=require(_0xb666('0x1'));var path=require(_0xb666('0x2'));var timeout=require(_0xb666('0x3'));var express=require(_0xb666('0x4'));var router=express[_0xb666('0x5')]();var fs_extra=require(_0xb666('0x6'));var auth=require(_0xb666('0x7'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xb666('0x8'));router[_0xb666('0x9')]('/',auth[_0xb666('0xa')](),controller['index']);router[_0xb666('0x9')](_0xb666('0xb'),auth[_0xb666('0xa')](),controller[_0xb666('0xc')]);router['get'](_0xb666('0xd'),auth['isAuthenticated'](),controller[_0xb666('0xe')]);router['get'](_0xb666('0xf'),auth[_0xb666('0xa')](),controller[_0xb666('0x10')]);router[_0xb666('0x9')](_0xb666('0x11'),auth[_0xb666('0xa')](),controller[_0xb666('0x12')]);router[_0xb666('0x13')]('/',auth['isAuthenticated'](),controller[_0xb666('0x14')]);router[_0xb666('0x15')](_0xb666('0xb'),auth[_0xb666('0xa')](),controller[_0xb666('0x16')]);router[_0xb666('0x17')](_0xb666('0xb'),auth[_0xb666('0xa')](),controller[_0xb666('0x18')]);module['exports']=router;
\ No newline at end of file
index 0f5d3ba..f1e13a5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a88=['sequelize','STRING','ENUM','incident','contact','nothing','BOOLEAN'];(function(_0x562f3b,_0x4c65ae){var _0x1edd55=function(_0xe67e06){while(--_0xe67e06){_0x562f3b['push'](_0x562f3b['shift']());}};_0x1edd55(++_0x4c65ae);}(_0x7a88,0x1b2));var _0x87a8=function(_0x2d283c,_0x1702d3){_0x2d283c=_0x2d283c-0x0;var _0xa8fbc0=_0x7a88[_0x2d283c];return _0xa8fbc0;};'use strict';var Sequelize=require(_0x87a8('0x0'));module['exports']={'name':{'type':Sequelize[_0x87a8('0x1')]},'description':{'type':Sequelize['STRING']},'ticketType':{'type':Sequelize[_0x87a8('0x2')](_0x87a8('0x3'),'phonecall'),'defaultValue':_0x87a8('0x3')},'moduleCreate':{'type':Sequelize[_0x87a8('0x2')](_0x87a8('0x4'),_0x87a8('0x5')),'defaultValue':_0x87a8('0x4'),'allowNull':![]},'additionalSearchContact':{'type':Sequelize[_0x87a8('0x1')],'allowNull':!![]},'openNewTab':{'type':Sequelize[_0x87a8('0x6')],'defaultValue':!![]}};
\ No newline at end of file
+var _0x65c6=['incident','phonecall','contact','nothing','BOOLEAN','sequelize','exports','STRING','ENUM'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x65c6,0xd4));var _0x665c=function(_0x5bfd40,_0x4af241){_0x5bfd40=_0x5bfd40-0x0;var _0x4bc758=_0x65c6[_0x5bfd40];return _0x4bc758;};'use strict';var Sequelize=require(_0x665c('0x0'));module[_0x665c('0x1')]={'name':{'type':Sequelize[_0x665c('0x2')]},'description':{'type':Sequelize[_0x665c('0x2')]},'ticketType':{'type':Sequelize[_0x665c('0x3')](_0x665c('0x4'),_0x665c('0x5')),'defaultValue':_0x665c('0x4')},'moduleCreate':{'type':Sequelize[_0x665c('0x3')](_0x665c('0x6'),_0x665c('0x7')),'defaultValue':_0x665c('0x6'),'allowNull':![]},'additionalSearchContact':{'type':Sequelize[_0x665c('0x2')],'allowNull':!![]},'openNewTab':{'type':Sequelize[_0x665c('0x8')],'defaultValue':!![]}};
\ No newline at end of file
index 3fa16f6..07f1668 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0508=['then','end','error','stack','name','send','index','map','Dynamics365Configuration','rawAttributes','type','key','model','keys','query','filters','intersection','fields','attributes','hasOwnProperty','order','sort','where','pick','merge','options','includeAll','findAll','rows','catch','show','length','include','find','create','body','params','getFields','findOne','filter','nolimit','getSubjects','Dynamics365Field','getDescriptions','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','destroy'];(function(_0x1c7047,_0x2ad594){var _0x297e1f=function(_0x3de590){while(--_0x3de590){_0x1c7047['push'](_0x1c7047['shift']());}};_0x297e1f(++_0x2ad594);}(_0x0508,0x178));var _0x8050=function(_0xd2df21,_0xfe9e98){_0xd2df21=_0xd2df21-0x0;var _0x49edf5=_0x0508[_0xd2df21];return _0x49edf5;};'use strict';var emlformat=require(_0x8050('0x0'));var rimraf=require(_0x8050('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x8050('0x2'));var rp=require('request-promise');var moment=require(_0x8050('0x3'));var BPromise=require(_0x8050('0x4'));var Mustache=require(_0x8050('0x5'));var util=require(_0x8050('0x6'));var path=require(_0x8050('0x7'));var sox=require(_0x8050('0x8'));var csv=require(_0x8050('0x9'));var ejs=require(_0x8050('0xa'));var fs=require('fs');var fs_extra=require(_0x8050('0xb'));var _=require(_0x8050('0xc'));var squel=require(_0x8050('0xd'));var crypto=require(_0x8050('0xe'));var jsforce=require(_0x8050('0xf'));var deskjs=require(_0x8050('0x10'));var toCsv=require('to-csv');var querystring=require(_0x8050('0x11'));var Papa=require(_0x8050('0x12'));var Redis=require(_0x8050('0x13'));var authService=require(_0x8050('0x14'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x8050('0x15'));var logger=require(_0x8050('0x16'))(_0x8050('0x17'));var utils=require('../../config/utils');var config=require(_0x8050('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0x8050('0x19'))['db'];function respondWithStatusCode(_0x3b1687,_0x5cf625){_0x5cf625=_0x5cf625||0xcc;return function(_0x13bcd8){if(_0x13bcd8){return _0x3b1687[_0x8050('0x1a')](_0x5cf625);}return _0x3b1687[_0x8050('0x1b')](_0x5cf625)['end']();};}function respondWithResult(_0x3ac566,_0x3ef94e){_0x3ef94e=_0x3ef94e||0xc8;return function(_0x10d532){if(_0x10d532){return _0x3ac566[_0x8050('0x1b')](_0x3ef94e)[_0x8050('0x1c')](_0x10d532);}};}function respondWithFilteredResult(_0x5585b2,_0x5ed195){return function(_0x3628cd){if(_0x3628cd){var _0x5b8a4d=typeof _0x5ed195[_0x8050('0x1d')]===_0x8050('0x1e')&&typeof _0x5ed195[_0x8050('0x1f')]===_0x8050('0x1e');var _0x5d13f3=_0x3628cd[_0x8050('0x20')];var _0x48308f=_0x5b8a4d?0x0:_0x5ed195[_0x8050('0x1d')];var _0x1c653a=_0x5b8a4d?_0x3628cd[_0x8050('0x20')]:_0x5ed195[_0x8050('0x1d')]+_0x5ed195['limit'];var _0x7c0722;if(_0x1c653a>=_0x5d13f3){_0x1c653a=_0x5d13f3;_0x7c0722=0xc8;}else{_0x7c0722=0xce;}_0x5585b2[_0x8050('0x1b')](_0x7c0722);return _0x5585b2['set'](_0x8050('0x21'),_0x48308f+'-'+_0x1c653a+'/'+_0x5d13f3)[_0x8050('0x1c')](_0x3628cd);}return null;};}function patchUpdates(_0x23fd3c){return function(_0x2d7bd7){try{jsonpatch[_0x8050('0x22')](_0x2d7bd7,_0x23fd3c,!![]);}catch(_0x46ed7f){return BPromise[_0x8050('0x23')](_0x46ed7f);}return _0x2d7bd7[_0x8050('0x24')]();};}function saveUpdates(_0x27aa3d,_0x6ebcc0){return function(_0x5653a6){if(_0x5653a6){return _0x5653a6[_0x8050('0x25')](_0x27aa3d)['then'](function(_0x1829c6){return _0x1829c6;});}return null;};}function removeEntity(_0x54f044,_0x47039a){return function(_0x4586d0){if(_0x4586d0){return _0x4586d0[_0x8050('0x26')]()[_0x8050('0x27')](function(){_0x54f044[_0x8050('0x1b')](0xcc)[_0x8050('0x28')]();});}};}function handleEntityNotFound(_0x4b0904,_0x330d8d){return function(_0x1d6a51){if(!_0x1d6a51){_0x4b0904['sendStatus'](0x194);}return _0x1d6a51;};}function handleError(_0x1a73e3,_0x1194b1){_0x1194b1=_0x1194b1||0x1f4;return function(_0x269399){logger[_0x8050('0x29')](_0x269399[_0x8050('0x2a')]);if(_0x269399[_0x8050('0x2b')]){delete _0x269399[_0x8050('0x2b')];}_0x1a73e3[_0x8050('0x1b')](_0x1194b1)[_0x8050('0x2c')](_0x269399);};}exports[_0x8050('0x2d')]=function(_0x45112a,_0x1f7388){var _0x1eb98f={},_0x2179cb={},_0x418609={'count':0x0,'rows':[]};var _0x59ef4e=_[_0x8050('0x2e')](db[_0x8050('0x2f')][_0x8050('0x30')],function(_0x301e0c){return{'name':_0x301e0c['fieldName'],'type':_0x301e0c[_0x8050('0x31')][_0x8050('0x32')]};});_0x2179cb[_0x8050('0x33')]=_[_0x8050('0x2e')](_0x59ef4e,'name');_0x2179cb['query']=_[_0x8050('0x34')](_0x45112a[_0x8050('0x35')]);_0x2179cb[_0x8050('0x36')]=_[_0x8050('0x37')](_0x2179cb['model'],_0x2179cb[_0x8050('0x35')]);_0x1eb98f['attributes']=_[_0x8050('0x37')](_0x2179cb[_0x8050('0x33')],qs[_0x8050('0x38')](_0x45112a[_0x8050('0x35')][_0x8050('0x38')]));_0x1eb98f[_0x8050('0x39')]=_0x1eb98f['attributes']['length']?_0x1eb98f[_0x8050('0x39')]:_0x2179cb[_0x8050('0x33')];if(!_0x45112a['query'][_0x8050('0x3a')]('nolimit')){_0x1eb98f['limit']=qs['limit'](_0x45112a['query'][_0x8050('0x1f')]);_0x1eb98f[_0x8050('0x1d')]=qs[_0x8050('0x1d')](_0x45112a[_0x8050('0x35')][_0x8050('0x1d')]);}_0x1eb98f[_0x8050('0x3b')]=qs[_0x8050('0x3c')](_0x45112a[_0x8050('0x35')][_0x8050('0x3c')]);_0x1eb98f[_0x8050('0x3d')]=qs[_0x8050('0x36')](_[_0x8050('0x3e')](_0x45112a[_0x8050('0x35')],_0x2179cb[_0x8050('0x36')]),_0x59ef4e);if(_0x45112a[_0x8050('0x35')]['filter']){_0x1eb98f[_0x8050('0x3d')]=_[_0x8050('0x3f')](_0x1eb98f[_0x8050('0x3d')],{'$or':_['map'](_0x59ef4e,function(_0x4f4af7){if(_0x4f4af7['type']!=='VIRTUAL'){var _0x4c59ab={};_0x4c59ab[_0x4f4af7[_0x8050('0x2b')]]={'$like':'%'+_0x45112a[_0x8050('0x35')]['filter']+'%'};return _0x4c59ab;}})});}_0x1eb98f=_[_0x8050('0x3f')]({},_0x1eb98f,_0x45112a[_0x8050('0x40')]);var _0x5661db={'where':_0x1eb98f[_0x8050('0x3d')]};return db[_0x8050('0x2f')][_0x8050('0x20')](_0x5661db)[_0x8050('0x27')](function(_0x2e29d9){_0x418609[_0x8050('0x20')]=_0x2e29d9;if(_0x45112a[_0x8050('0x35')][_0x8050('0x41')]){_0x1eb98f['include']=[{'all':!![]}];}return db[_0x8050('0x2f')][_0x8050('0x42')](_0x1eb98f);})[_0x8050('0x27')](function(_0x4be028){_0x418609[_0x8050('0x43')]=_0x4be028;return _0x418609;})[_0x8050('0x27')](respondWithFilteredResult(_0x1f7388,_0x1eb98f))[_0x8050('0x44')](handleError(_0x1f7388,null));};exports[_0x8050('0x45')]=function(_0x414e8a,_0x40a60d){var _0x1d6093={'raw':![],'where':{'id':_0x414e8a['params']['id']}},_0x5eda72={};_0x5eda72['model']=_[_0x8050('0x34')](db['Dynamics365Configuration'][_0x8050('0x30')]);_0x5eda72[_0x8050('0x35')]=_[_0x8050('0x34')](_0x414e8a[_0x8050('0x35')]);_0x5eda72[_0x8050('0x36')]=_[_0x8050('0x37')](_0x5eda72[_0x8050('0x33')],_0x5eda72[_0x8050('0x35')]);_0x1d6093['attributes']=_[_0x8050('0x37')](_0x5eda72['model'],qs['fields'](_0x414e8a[_0x8050('0x35')][_0x8050('0x38')]));_0x1d6093[_0x8050('0x39')]=_0x1d6093['attributes'][_0x8050('0x46')]?_0x1d6093['attributes']:_0x5eda72[_0x8050('0x33')];if(_0x414e8a[_0x8050('0x35')][_0x8050('0x41')]){_0x1d6093[_0x8050('0x47')]=[{'all':!![]}];}_0x1d6093=_[_0x8050('0x3f')]({},_0x1d6093,_0x414e8a['options']);return db[_0x8050('0x2f')][_0x8050('0x48')](_0x1d6093)[_0x8050('0x27')](handleEntityNotFound(_0x40a60d,null))[_0x8050('0x27')](respondWithResult(_0x40a60d,null))[_0x8050('0x44')](handleError(_0x40a60d,null));};exports[_0x8050('0x49')]=function(_0x6f60d3,_0xfeddb0){return db[_0x8050('0x2f')][_0x8050('0x49')](_0x6f60d3[_0x8050('0x4a')],{})[_0x8050('0x27')](respondWithResult(_0xfeddb0,0xc9))[_0x8050('0x44')](handleError(_0xfeddb0,null));};exports['update']=function(_0x5c8bcd,_0xdd34f3){if(_0x5c8bcd[_0x8050('0x4a')]['id']){delete _0x5c8bcd[_0x8050('0x4a')]['id'];}return db[_0x8050('0x2f')][_0x8050('0x48')]({'where':{'id':_0x5c8bcd[_0x8050('0x4b')]['id']}})[_0x8050('0x27')](handleEntityNotFound(_0xdd34f3,null))[_0x8050('0x27')](saveUpdates(_0x5c8bcd['body'],null))['then'](respondWithResult(_0xdd34f3,null))[_0x8050('0x44')](handleError(_0xdd34f3,null));};exports['destroy']=function(_0x4fd2f3,_0x17481d){return db[_0x8050('0x2f')][_0x8050('0x48')]({'where':{'id':_0x4fd2f3[_0x8050('0x4b')]['id']}})[_0x8050('0x27')](handleEntityNotFound(_0x17481d,null))[_0x8050('0x27')](removeEntity(_0x17481d,null))['catch'](handleError(_0x17481d,null));};exports[_0x8050('0x4c')]=function(_0x5bde80,_0x316c22,_0xe54f83){var _0x27206c={};var _0x400653={};var _0x37d01c;var _0x2acd13;return db['Dynamics365Configuration'][_0x8050('0x4d')]({'where':{'id':_0x5bde80['params']['id']}})[_0x8050('0x27')](handleEntityNotFound(_0x316c22,null))['then'](function(_0x56dd22){if(_0x56dd22){_0x37d01c=_0x56dd22;_0x400653[_0x8050('0x33')]=_[_0x8050('0x34')](db['Dynamics365Field'][_0x8050('0x30')]);_0x400653['query']=_[_0x8050('0x34')](_0x5bde80[_0x8050('0x35')]);_0x400653[_0x8050('0x36')]=_['intersection'](_0x400653['model'],_0x400653[_0x8050('0x35')]);_0x27206c[_0x8050('0x39')]=_[_0x8050('0x37')](_0x400653[_0x8050('0x33')],qs[_0x8050('0x38')](_0x5bde80[_0x8050('0x35')][_0x8050('0x38')]));_0x27206c[_0x8050('0x39')]=_0x27206c['attributes'][_0x8050('0x46')]?_0x27206c[_0x8050('0x39')]:_0x400653['model'];_0x27206c[_0x8050('0x3b')]=qs[_0x8050('0x3c')](_0x5bde80[_0x8050('0x35')][_0x8050('0x3c')]);_0x27206c['where']=qs[_0x8050('0x36')](_[_0x8050('0x3e')](_0x5bde80[_0x8050('0x35')],_0x400653[_0x8050('0x36')]));if(_0x5bde80['query'][_0x8050('0x4e')]){_0x27206c[_0x8050('0x3d')]=_['merge'](_0x27206c[_0x8050('0x3d')],{'$or':_['map'](_0x27206c[_0x8050('0x39')],function(_0x4c6f46){var _0x53f4b7={};_0x53f4b7[_0x4c6f46]={'$like':'%'+_0x5bde80[_0x8050('0x35')][_0x8050('0x4e')]+'%'};return _0x53f4b7;})});}_0x27206c=_[_0x8050('0x3f')]({},_0x27206c,_0x5bde80['options']);return _0x37d01c[_0x8050('0x4c')](_0x27206c);}})[_0x8050('0x27')](function(_0x2cc0cb){if(_0x2cc0cb){_0x2acd13=_0x2cc0cb['length'];if(!_0x5bde80[_0x8050('0x35')][_0x8050('0x3a')](_0x8050('0x4f'))){_0x27206c[_0x8050('0x1f')]=qs[_0x8050('0x1f')](_0x5bde80[_0x8050('0x35')]['limit']);_0x27206c[_0x8050('0x1d')]=qs['offset'](_0x5bde80[_0x8050('0x35')]['offset']);}return _0x37d01c[_0x8050('0x4c')](_0x27206c);}})[_0x8050('0x27')](function(_0x43288d){if(_0x43288d){return _0x43288d?{'count':_0x2acd13,'rows':_0x43288d}:null;}})['then'](respondWithResult(_0x316c22,null))[_0x8050('0x44')](handleError(_0x316c22,null));};exports[_0x8050('0x50')]=function(_0x262fb7,_0x4c3c64,_0x121efd){var _0x5d7a8c={};var _0xc9c72b={};var _0x239182;var _0x292d19;return db[_0x8050('0x2f')][_0x8050('0x4d')]({'where':{'id':_0x262fb7[_0x8050('0x4b')]['id']}})[_0x8050('0x27')](handleEntityNotFound(_0x4c3c64,null))[_0x8050('0x27')](function(_0x2ed214){if(_0x2ed214){_0x239182=_0x2ed214;_0xc9c72b[_0x8050('0x33')]=_['keys'](db[_0x8050('0x51')][_0x8050('0x30')]);_0xc9c72b[_0x8050('0x35')]=_[_0x8050('0x34')](_0x262fb7[_0x8050('0x35')]);_0xc9c72b[_0x8050('0x36')]=_[_0x8050('0x37')](_0xc9c72b['model'],_0xc9c72b[_0x8050('0x35')]);_0x5d7a8c[_0x8050('0x39')]=_['intersection'](_0xc9c72b[_0x8050('0x33')],qs[_0x8050('0x38')](_0x262fb7[_0x8050('0x35')]['fields']));_0x5d7a8c[_0x8050('0x39')]=_0x5d7a8c[_0x8050('0x39')][_0x8050('0x46')]?_0x5d7a8c[_0x8050('0x39')]:_0xc9c72b['model'];_0x5d7a8c[_0x8050('0x3b')]=qs[_0x8050('0x3c')](_0x262fb7['query'][_0x8050('0x3c')]);_0x5d7a8c[_0x8050('0x3d')]=qs[_0x8050('0x36')](_[_0x8050('0x3e')](_0x262fb7[_0x8050('0x35')],_0xc9c72b[_0x8050('0x36')]));if(_0x262fb7[_0x8050('0x35')][_0x8050('0x4e')]){_0x5d7a8c[_0x8050('0x3d')]=_[_0x8050('0x3f')](_0x5d7a8c[_0x8050('0x3d')],{'$or':_[_0x8050('0x2e')](_0x5d7a8c['attributes'],function(_0x4b3932){var _0x3375b9={};_0x3375b9[_0x4b3932]={'$like':'%'+_0x262fb7['query']['filter']+'%'};return _0x3375b9;})});}_0x5d7a8c=_[_0x8050('0x3f')]({},_0x5d7a8c,_0x262fb7['options']);return _0x239182[_0x8050('0x50')](_0x5d7a8c);}})['then'](function(_0x1d9e94){if(_0x1d9e94){_0x292d19=_0x1d9e94[_0x8050('0x46')];if(!_0x262fb7['query'][_0x8050('0x3a')](_0x8050('0x4f'))){_0x5d7a8c['limit']=qs[_0x8050('0x1f')](_0x262fb7[_0x8050('0x35')][_0x8050('0x1f')]);_0x5d7a8c['offset']=qs[_0x8050('0x1d')](_0x262fb7[_0x8050('0x35')]['offset']);}return _0x239182[_0x8050('0x50')](_0x5d7a8c);}})[_0x8050('0x27')](function(_0x5b078b){if(_0x5b078b){return _0x5b078b?{'count':_0x292d19,'rows':_0x5b078b}:null;}})['then'](respondWithResult(_0x4c3c64,null))[_0x8050('0x44')](handleError(_0x4c3c64,null));};exports[_0x8050('0x52')]=function(_0x43e0a5,_0x224897,_0x494579){var _0x463d15={};var _0x28a99f={};var _0x4afb70;var _0x1b5b91;return db[_0x8050('0x2f')]['findOne']({'where':{'id':_0x43e0a5[_0x8050('0x4b')]['id']}})['then'](handleEntityNotFound(_0x224897,null))['then'](function(_0xdd0e9d){if(_0xdd0e9d){_0x4afb70=_0xdd0e9d;_0x28a99f['model']=_[_0x8050('0x34')](db[_0x8050('0x51')][_0x8050('0x30')]);_0x28a99f[_0x8050('0x35')]=_['keys'](_0x43e0a5[_0x8050('0x35')]);_0x28a99f[_0x8050('0x36')]=_['intersection'](_0x28a99f[_0x8050('0x33')],_0x28a99f[_0x8050('0x35')]);_0x463d15[_0x8050('0x39')]=_['intersection'](_0x28a99f[_0x8050('0x33')],qs[_0x8050('0x38')](_0x43e0a5[_0x8050('0x35')][_0x8050('0x38')]));_0x463d15['attributes']=_0x463d15[_0x8050('0x39')]['length']?_0x463d15[_0x8050('0x39')]:_0x28a99f[_0x8050('0x33')];_0x463d15[_0x8050('0x3b')]=qs[_0x8050('0x3c')](_0x43e0a5[_0x8050('0x35')][_0x8050('0x3c')]);_0x463d15[_0x8050('0x3d')]=qs[_0x8050('0x36')](_[_0x8050('0x3e')](_0x43e0a5[_0x8050('0x35')],_0x28a99f[_0x8050('0x36')]));if(_0x43e0a5[_0x8050('0x35')][_0x8050('0x4e')]){_0x463d15['where']=_['merge'](_0x463d15[_0x8050('0x3d')],{'$or':_['map'](_0x463d15[_0x8050('0x39')],function(_0x342065){var _0x55a91f={};_0x55a91f[_0x342065]={'$like':'%'+_0x43e0a5[_0x8050('0x35')][_0x8050('0x4e')]+'%'};return _0x55a91f;})});}_0x463d15=_[_0x8050('0x3f')]({},_0x463d15,_0x43e0a5[_0x8050('0x40')]);return _0x4afb70[_0x8050('0x52')](_0x463d15);}})[_0x8050('0x27')](function(_0x354546){if(_0x354546){_0x1b5b91=_0x354546[_0x8050('0x46')];if(!_0x43e0a5[_0x8050('0x35')][_0x8050('0x3a')]('nolimit')){_0x463d15[_0x8050('0x1f')]=qs[_0x8050('0x1f')](_0x43e0a5[_0x8050('0x35')]['limit']);_0x463d15['offset']=qs[_0x8050('0x1d')](_0x43e0a5[_0x8050('0x35')]['offset']);}return _0x4afb70[_0x8050('0x52')](_0x463d15);}})[_0x8050('0x27')](function(_0x420953){if(_0x420953){return _0x420953?{'count':_0x1b5b91,'rows':_0x420953}:null;}})[_0x8050('0x27')](respondWithResult(_0x224897,null))[_0x8050('0x44')](handleError(_0x224897,null));};
\ No newline at end of file
+var _0xcbcb=['model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','update','findOne','Dynamics365Field','getFields','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','apply','destroy','then','stack','name','index','map','Dynamics365Configuration','rawAttributes','type','query','keys','filters','intersection'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0xcbcb,0x6d));var _0xbcbc=function(_0x2b26c3,_0x514fd1){_0x2b26c3=_0x2b26c3-0x0;var _0x3cbde4=_0xcbcb[_0x2b26c3];return _0x3cbde4;};'use strict';var emlformat=require(_0xbcbc('0x0'));var rimraf=require(_0xbcbc('0x1'));var zipdir=require(_0xbcbc('0x2'));var jsonpatch=require(_0xbcbc('0x3'));var rp=require(_0xbcbc('0x4'));var moment=require(_0xbcbc('0x5'));var BPromise=require(_0xbcbc('0x6'));var Mustache=require(_0xbcbc('0x7'));var util=require(_0xbcbc('0x8'));var path=require(_0xbcbc('0x9'));var sox=require(_0xbcbc('0xa'));var csv=require(_0xbcbc('0xb'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xbcbc('0xc'));var _=require(_0xbcbc('0xd'));var squel=require(_0xbcbc('0xe'));var crypto=require('crypto');var jsforce=require(_0xbcbc('0xf'));var deskjs=require(_0xbcbc('0x10'));var toCsv=require(_0xbcbc('0xb'));var querystring=require(_0xbcbc('0x11'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xbcbc('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xbcbc('0x13'));var hardwareService=require(_0xbcbc('0x14'));var logger=require(_0xbcbc('0x15'))(_0xbcbc('0x16'));var utils=require(_0xbcbc('0x17'));var config=require(_0xbcbc('0x18'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2710a6,_0x1d8d51){_0x1d8d51=_0x1d8d51||0xcc;return function(_0x4635fa){if(_0x4635fa){return _0x2710a6[_0xbcbc('0x19')](_0x1d8d51);}return _0x2710a6[_0xbcbc('0x1a')](_0x1d8d51)[_0xbcbc('0x1b')]();};}function respondWithResult(_0x1d3ec7,_0x447eb1){_0x447eb1=_0x447eb1||0xc8;return function(_0xbf69f1){if(_0xbf69f1){return _0x1d3ec7[_0xbcbc('0x1a')](_0x447eb1)[_0xbcbc('0x1c')](_0xbf69f1);}};}function respondWithFilteredResult(_0x43cc55,_0xedde1b){return function(_0x42e123){if(_0x42e123){var _0x3420d7=typeof _0xedde1b[_0xbcbc('0x1d')]==='undefined'&&typeof _0xedde1b[_0xbcbc('0x1e')]===_0xbcbc('0x1f');var _0x28ce09=_0x42e123[_0xbcbc('0x20')];var _0x27979d=_0x3420d7?0x0:_0xedde1b[_0xbcbc('0x1d')];var _0x154ae0=_0x3420d7?_0x42e123[_0xbcbc('0x20')]:_0xedde1b[_0xbcbc('0x1d')]+_0xedde1b[_0xbcbc('0x1e')];var _0x23469e;if(_0x154ae0>=_0x28ce09){_0x154ae0=_0x28ce09;_0x23469e=0xc8;}else{_0x23469e=0xce;}_0x43cc55[_0xbcbc('0x1a')](_0x23469e);return _0x43cc55[_0xbcbc('0x21')](_0xbcbc('0x22'),_0x27979d+'-'+_0x154ae0+'/'+_0x28ce09)[_0xbcbc('0x1c')](_0x42e123);}return null;};}function patchUpdates(_0x3fb0b2){return function(_0x28089e){try{jsonpatch[_0xbcbc('0x23')](_0x28089e,_0x3fb0b2,!![]);}catch(_0xcfe843){return BPromise['reject'](_0xcfe843);}return _0x28089e['save']();};}function saveUpdates(_0x5ddc03,_0x913ddc){return function(_0xd6c923){if(_0xd6c923){return _0xd6c923['update'](_0x5ddc03)['then'](function(_0x309103){return _0x309103;});}return null;};}function removeEntity(_0x3c45ab,_0x31725f){return function(_0x487058){if(_0x487058){return _0x487058[_0xbcbc('0x24')]()[_0xbcbc('0x25')](function(){_0x3c45ab['status'](0xcc)[_0xbcbc('0x1b')]();});}};}function handleEntityNotFound(_0x220046,_0x3745a4){return function(_0x54f162){if(!_0x54f162){_0x220046[_0xbcbc('0x19')](0x194);}return _0x54f162;};}function handleError(_0x2c499e,_0x2dad96){_0x2dad96=_0x2dad96||0x1f4;return function(_0x218834){logger['error'](_0x218834[_0xbcbc('0x26')]);if(_0x218834[_0xbcbc('0x27')]){delete _0x218834[_0xbcbc('0x27')];}_0x2c499e[_0xbcbc('0x1a')](_0x2dad96)['send'](_0x218834);};}exports[_0xbcbc('0x28')]=function(_0x41acdb,_0x251f38){var _0x4a8335={},_0x12a537={},_0x141dcb={'count':0x0,'rows':[]};var _0x5a7d9e=_[_0xbcbc('0x29')](db[_0xbcbc('0x2a')][_0xbcbc('0x2b')],function(_0x5b6a53){return{'name':_0x5b6a53['fieldName'],'type':_0x5b6a53[_0xbcbc('0x2c')]['key']};});_0x12a537['model']=_[_0xbcbc('0x29')](_0x5a7d9e,'name');_0x12a537[_0xbcbc('0x2d')]=_[_0xbcbc('0x2e')](_0x41acdb[_0xbcbc('0x2d')]);_0x12a537[_0xbcbc('0x2f')]=_[_0xbcbc('0x30')](_0x12a537[_0xbcbc('0x31')],_0x12a537[_0xbcbc('0x2d')]);_0x4a8335['attributes']=_['intersection'](_0x12a537[_0xbcbc('0x31')],qs[_0xbcbc('0x32')](_0x41acdb[_0xbcbc('0x2d')][_0xbcbc('0x32')]));_0x4a8335['attributes']=_0x4a8335[_0xbcbc('0x33')][_0xbcbc('0x34')]?_0x4a8335['attributes']:_0x12a537['model'];if(!_0x41acdb[_0xbcbc('0x2d')][_0xbcbc('0x35')](_0xbcbc('0x36'))){_0x4a8335[_0xbcbc('0x1e')]=qs[_0xbcbc('0x1e')](_0x41acdb[_0xbcbc('0x2d')]['limit']);_0x4a8335['offset']=qs[_0xbcbc('0x1d')](_0x41acdb[_0xbcbc('0x2d')]['offset']);}_0x4a8335[_0xbcbc('0x37')]=qs['sort'](_0x41acdb[_0xbcbc('0x2d')][_0xbcbc('0x38')]);_0x4a8335['where']=qs[_0xbcbc('0x2f')](_[_0xbcbc('0x39')](_0x41acdb[_0xbcbc('0x2d')],_0x12a537[_0xbcbc('0x2f')]),_0x5a7d9e);if(_0x41acdb[_0xbcbc('0x2d')][_0xbcbc('0x3a')]){_0x4a8335[_0xbcbc('0x3b')]=_[_0xbcbc('0x3c')](_0x4a8335['where'],{'$or':_[_0xbcbc('0x29')](_0x5a7d9e,function(_0x35c21d){if(_0x35c21d['type']!==_0xbcbc('0x3d')){var _0x339215={};_0x339215[_0x35c21d[_0xbcbc('0x27')]]={'$like':'%'+_0x41acdb[_0xbcbc('0x2d')]['filter']+'%'};return _0x339215;}})});}_0x4a8335=_[_0xbcbc('0x3c')]({},_0x4a8335,_0x41acdb[_0xbcbc('0x3e')]);var _0x4aa73a={'where':_0x4a8335['where']};return db['Dynamics365Configuration'][_0xbcbc('0x20')](_0x4aa73a)[_0xbcbc('0x25')](function(_0x3e1c57){_0x141dcb[_0xbcbc('0x20')]=_0x3e1c57;if(_0x41acdb[_0xbcbc('0x2d')][_0xbcbc('0x3f')]){_0x4a8335[_0xbcbc('0x40')]=[{'all':!![]}];}return db[_0xbcbc('0x2a')][_0xbcbc('0x41')](_0x4a8335);})['then'](function(_0x5e87a8){_0x141dcb[_0xbcbc('0x42')]=_0x5e87a8;return _0x141dcb;})[_0xbcbc('0x25')](respondWithFilteredResult(_0x251f38,_0x4a8335))[_0xbcbc('0x43')](handleError(_0x251f38,null));};exports[_0xbcbc('0x44')]=function(_0x578a3b,_0x335e3f){var _0x31e9b0={'raw':![],'where':{'id':_0x578a3b[_0xbcbc('0x45')]['id']}},_0x402198={};_0x402198['model']=_[_0xbcbc('0x2e')](db[_0xbcbc('0x2a')][_0xbcbc('0x2b')]);_0x402198[_0xbcbc('0x2d')]=_[_0xbcbc('0x2e')](_0x578a3b[_0xbcbc('0x2d')]);_0x402198[_0xbcbc('0x2f')]=_['intersection'](_0x402198[_0xbcbc('0x31')],_0x402198['query']);_0x31e9b0[_0xbcbc('0x33')]=_[_0xbcbc('0x30')](_0x402198[_0xbcbc('0x31')],qs[_0xbcbc('0x32')](_0x578a3b[_0xbcbc('0x2d')][_0xbcbc('0x32')]));_0x31e9b0[_0xbcbc('0x33')]=_0x31e9b0[_0xbcbc('0x33')][_0xbcbc('0x34')]?_0x31e9b0[_0xbcbc('0x33')]:_0x402198['model'];if(_0x578a3b[_0xbcbc('0x2d')][_0xbcbc('0x3f')]){_0x31e9b0[_0xbcbc('0x40')]=[{'all':!![]}];}_0x31e9b0=_[_0xbcbc('0x3c')]({},_0x31e9b0,_0x578a3b['options']);return db[_0xbcbc('0x2a')][_0xbcbc('0x46')](_0x31e9b0)['then'](handleEntityNotFound(_0x335e3f,null))['then'](respondWithResult(_0x335e3f,null))[_0xbcbc('0x43')](handleError(_0x335e3f,null));};exports['create']=function(_0x2ed45f,_0x21df2e){return db[_0xbcbc('0x2a')][_0xbcbc('0x47')](_0x2ed45f[_0xbcbc('0x48')],{})[_0xbcbc('0x25')](respondWithResult(_0x21df2e,0xc9))[_0xbcbc('0x43')](handleError(_0x21df2e,null));};exports[_0xbcbc('0x49')]=function(_0x1e9468,_0x273529){if(_0x1e9468[_0xbcbc('0x48')]['id']){delete _0x1e9468[_0xbcbc('0x48')]['id'];}return db[_0xbcbc('0x2a')]['find']({'where':{'id':_0x1e9468['params']['id']}})[_0xbcbc('0x25')](handleEntityNotFound(_0x273529,null))[_0xbcbc('0x25')](saveUpdates(_0x1e9468[_0xbcbc('0x48')],null))[_0xbcbc('0x25')](respondWithResult(_0x273529,null))[_0xbcbc('0x43')](handleError(_0x273529,null));};exports[_0xbcbc('0x24')]=function(_0x4be12c,_0x14411e){return db['Dynamics365Configuration'][_0xbcbc('0x46')]({'where':{'id':_0x4be12c[_0xbcbc('0x45')]['id']}})[_0xbcbc('0x25')](handleEntityNotFound(_0x14411e,null))['then'](removeEntity(_0x14411e,null))[_0xbcbc('0x43')](handleError(_0x14411e,null));};exports['getFields']=function(_0x105dd9,_0xcc9dad,_0x435d9f){var _0x4765eb={};var _0x2fd2ed={};var _0x235205;var _0x12ac26;return db['Dynamics365Configuration'][_0xbcbc('0x4a')]({'where':{'id':_0x105dd9[_0xbcbc('0x45')]['id']}})[_0xbcbc('0x25')](handleEntityNotFound(_0xcc9dad,null))[_0xbcbc('0x25')](function(_0x517440){if(_0x517440){_0x235205=_0x517440;_0x2fd2ed['model']=_[_0xbcbc('0x2e')](db[_0xbcbc('0x4b')]['rawAttributes']);_0x2fd2ed['query']=_[_0xbcbc('0x2e')](_0x105dd9['query']);_0x2fd2ed[_0xbcbc('0x2f')]=_[_0xbcbc('0x30')](_0x2fd2ed[_0xbcbc('0x31')],_0x2fd2ed[_0xbcbc('0x2d')]);_0x4765eb[_0xbcbc('0x33')]=_['intersection'](_0x2fd2ed['model'],qs['fields'](_0x105dd9[_0xbcbc('0x2d')][_0xbcbc('0x32')]));_0x4765eb[_0xbcbc('0x33')]=_0x4765eb[_0xbcbc('0x33')]['length']?_0x4765eb[_0xbcbc('0x33')]:_0x2fd2ed[_0xbcbc('0x31')];_0x4765eb[_0xbcbc('0x37')]=qs[_0xbcbc('0x38')](_0x105dd9[_0xbcbc('0x2d')][_0xbcbc('0x38')]);_0x4765eb[_0xbcbc('0x3b')]=qs[_0xbcbc('0x2f')](_[_0xbcbc('0x39')](_0x105dd9[_0xbcbc('0x2d')],_0x2fd2ed[_0xbcbc('0x2f')]));if(_0x105dd9[_0xbcbc('0x2d')]['filter']){_0x4765eb[_0xbcbc('0x3b')]=_['merge'](_0x4765eb['where'],{'$or':_[_0xbcbc('0x29')](_0x4765eb[_0xbcbc('0x33')],function(_0x15f968){var _0x41d775={};_0x41d775[_0x15f968]={'$like':'%'+_0x105dd9[_0xbcbc('0x2d')][_0xbcbc('0x3a')]+'%'};return _0x41d775;})});}_0x4765eb=_[_0xbcbc('0x3c')]({},_0x4765eb,_0x105dd9['options']);return _0x235205[_0xbcbc('0x4c')](_0x4765eb);}})['then'](function(_0x648c08){if(_0x648c08){_0x12ac26=_0x648c08[_0xbcbc('0x34')];if(!_0x105dd9[_0xbcbc('0x2d')][_0xbcbc('0x35')](_0xbcbc('0x36'))){_0x4765eb[_0xbcbc('0x1e')]=qs[_0xbcbc('0x1e')](_0x105dd9[_0xbcbc('0x2d')][_0xbcbc('0x1e')]);_0x4765eb[_0xbcbc('0x1d')]=qs[_0xbcbc('0x1d')](_0x105dd9[_0xbcbc('0x2d')][_0xbcbc('0x1d')]);}return _0x235205['getFields'](_0x4765eb);}})[_0xbcbc('0x25')](function(_0x16122b){if(_0x16122b){return _0x16122b?{'count':_0x12ac26,'rows':_0x16122b}:null;}})['then'](respondWithResult(_0xcc9dad,null))['catch'](handleError(_0xcc9dad,null));};exports[_0xbcbc('0x4d')]=function(_0x101b5a,_0x4b290a,_0x2940ee){var _0xbcf8da={};var _0xc625fb={};var _0x5133a2;var _0x14cd24;return db[_0xbcbc('0x2a')][_0xbcbc('0x4a')]({'where':{'id':_0x101b5a['params']['id']}})[_0xbcbc('0x25')](handleEntityNotFound(_0x4b290a,null))[_0xbcbc('0x25')](function(_0x3b494f){if(_0x3b494f){_0x5133a2=_0x3b494f;_0xc625fb[_0xbcbc('0x31')]=_[_0xbcbc('0x2e')](db[_0xbcbc('0x4b')][_0xbcbc('0x2b')]);_0xc625fb[_0xbcbc('0x2d')]=_[_0xbcbc('0x2e')](_0x101b5a[_0xbcbc('0x2d')]);_0xc625fb['filters']=_[_0xbcbc('0x30')](_0xc625fb[_0xbcbc('0x31')],_0xc625fb['query']);_0xbcf8da['attributes']=_['intersection'](_0xc625fb[_0xbcbc('0x31')],qs[_0xbcbc('0x32')](_0x101b5a['query']['fields']));_0xbcf8da['attributes']=_0xbcf8da[_0xbcbc('0x33')][_0xbcbc('0x34')]?_0xbcf8da[_0xbcbc('0x33')]:_0xc625fb['model'];_0xbcf8da[_0xbcbc('0x37')]=qs[_0xbcbc('0x38')](_0x101b5a[_0xbcbc('0x2d')][_0xbcbc('0x38')]);_0xbcf8da[_0xbcbc('0x3b')]=qs['filters'](_[_0xbcbc('0x39')](_0x101b5a[_0xbcbc('0x2d')],_0xc625fb[_0xbcbc('0x2f')]));if(_0x101b5a['query'][_0xbcbc('0x3a')]){_0xbcf8da[_0xbcbc('0x3b')]=_['merge'](_0xbcf8da['where'],{'$or':_[_0xbcbc('0x29')](_0xbcf8da['attributes'],function(_0x3d3fd7){var _0x487b14={};_0x487b14[_0x3d3fd7]={'$like':'%'+_0x101b5a[_0xbcbc('0x2d')]['filter']+'%'};return _0x487b14;})});}_0xbcf8da=_[_0xbcbc('0x3c')]({},_0xbcf8da,_0x101b5a['options']);return _0x5133a2[_0xbcbc('0x4d')](_0xbcf8da);}})[_0xbcbc('0x25')](function(_0x3afff2){if(_0x3afff2){_0x14cd24=_0x3afff2['length'];if(!_0x101b5a[_0xbcbc('0x2d')][_0xbcbc('0x35')]('nolimit')){_0xbcf8da['limit']=qs[_0xbcbc('0x1e')](_0x101b5a[_0xbcbc('0x2d')][_0xbcbc('0x1e')]);_0xbcf8da['offset']=qs[_0xbcbc('0x1d')](_0x101b5a[_0xbcbc('0x2d')][_0xbcbc('0x1d')]);}return _0x5133a2['getSubjects'](_0xbcf8da);}})[_0xbcbc('0x25')](function(_0x37c3c5){if(_0x37c3c5){return _0x37c3c5?{'count':_0x14cd24,'rows':_0x37c3c5}:null;}})[_0xbcbc('0x25')](respondWithResult(_0x4b290a,null))[_0xbcbc('0x43')](handleError(_0x4b290a,null));};exports[_0xbcbc('0x4e')]=function(_0x1c25bd,_0x544a8c,_0xb62e1e){var _0x33f1f4={};var _0x45254c={};var _0x1b4675;var _0x34ad0e;return db[_0xbcbc('0x2a')]['findOne']({'where':{'id':_0x1c25bd[_0xbcbc('0x45')]['id']}})[_0xbcbc('0x25')](handleEntityNotFound(_0x544a8c,null))[_0xbcbc('0x25')](function(_0x2b0946){if(_0x2b0946){_0x1b4675=_0x2b0946;_0x45254c[_0xbcbc('0x31')]=_['keys'](db['Dynamics365Field'][_0xbcbc('0x2b')]);_0x45254c[_0xbcbc('0x2d')]=_['keys'](_0x1c25bd['query']);_0x45254c['filters']=_['intersection'](_0x45254c[_0xbcbc('0x31')],_0x45254c[_0xbcbc('0x2d')]);_0x33f1f4['attributes']=_[_0xbcbc('0x30')](_0x45254c[_0xbcbc('0x31')],qs[_0xbcbc('0x32')](_0x1c25bd['query'][_0xbcbc('0x32')]));_0x33f1f4[_0xbcbc('0x33')]=_0x33f1f4[_0xbcbc('0x33')][_0xbcbc('0x34')]?_0x33f1f4['attributes']:_0x45254c[_0xbcbc('0x31')];_0x33f1f4['order']=qs[_0xbcbc('0x38')](_0x1c25bd[_0xbcbc('0x2d')][_0xbcbc('0x38')]);_0x33f1f4[_0xbcbc('0x3b')]=qs['filters'](_[_0xbcbc('0x39')](_0x1c25bd[_0xbcbc('0x2d')],_0x45254c['filters']));if(_0x1c25bd[_0xbcbc('0x2d')][_0xbcbc('0x3a')]){_0x33f1f4['where']=_[_0xbcbc('0x3c')](_0x33f1f4[_0xbcbc('0x3b')],{'$or':_['map'](_0x33f1f4[_0xbcbc('0x33')],function(_0x3c5ea6){var _0x581c04={};_0x581c04[_0x3c5ea6]={'$like':'%'+_0x1c25bd[_0xbcbc('0x2d')]['filter']+'%'};return _0x581c04;})});}_0x33f1f4=_[_0xbcbc('0x3c')]({},_0x33f1f4,_0x1c25bd[_0xbcbc('0x3e')]);return _0x1b4675[_0xbcbc('0x4e')](_0x33f1f4);}})['then'](function(_0x554441){if(_0x554441){_0x34ad0e=_0x554441[_0xbcbc('0x34')];if(!_0x1c25bd[_0xbcbc('0x2d')][_0xbcbc('0x35')](_0xbcbc('0x36'))){_0x33f1f4['limit']=qs[_0xbcbc('0x1e')](_0x1c25bd['query'][_0xbcbc('0x1e')]);_0x33f1f4[_0xbcbc('0x1d')]=qs[_0xbcbc('0x1d')](_0x1c25bd[_0xbcbc('0x2d')][_0xbcbc('0x1d')]);}return _0x1b4675[_0xbcbc('0x4e')](_0x33f1f4);}})[_0xbcbc('0x25')](function(_0x205bdb){if(_0x205bdb){return _0x205bdb?{'count':_0x34ad0e,'rows':_0x205bdb}:null;}})[_0xbcbc('0x25')](respondWithResult(_0x544a8c,null))['catch'](handleError(_0x544a8c,null));};
\ No newline at end of file
index cbd67e1..702ff17 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x54ef=['../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intDynamics365Configuration.attributes','define','Dynamics365Configuration','lodash','util'];(function(_0x1df4c7,_0x57942e){var _0x175ece=function(_0x4d894b){while(--_0x4d894b){_0x1df4c7['push'](_0x1df4c7['shift']());}};_0x175ece(++_0x57942e);}(_0x54ef,0x112));var _0xf54e=function(_0x31f765,_0x4a70cc){_0x31f765=_0x31f765-0x0;var _0x3372be=_0x54ef[_0x31f765];return _0x3372be;};'use strict';var _=require(_0xf54e('0x0'));var util=require(_0xf54e('0x1'));var logger=require(_0xf54e('0x2'))('api');var moment=require(_0xf54e('0x3'));var BPromise=require(_0xf54e('0x4'));var rp=require(_0xf54e('0x5'));var fs=require('fs');var path=require(_0xf54e('0x6'));var rimraf=require(_0xf54e('0x7'));var config=require(_0xf54e('0x8'));var attributes=require(_0xf54e('0x9'));module['exports']=function(_0x55e611,_0x18e84e){return _0x55e611[_0xf54e('0xa')](_0xf54e('0xb'),attributes,{'tableName':'int_dynamics365_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x9c44=['request-promise','path','./intDynamics365Configuration.attributes','define','Dynamics365Configuration','int_dynamics365_configurations','../../config/logger','api','moment','bluebird'];(function(_0x1f7d7b,_0x198611){var _0x4778c6=function(_0x1f3a95){while(--_0x1f3a95){_0x1f7d7b['push'](_0x1f7d7b['shift']());}};_0x4778c6(++_0x198611);}(_0x9c44,0x178));var _0x49c4=function(_0x543084,_0x4337f5){_0x543084=_0x543084-0x0;var _0x306a57=_0x9c44[_0x543084];return _0x306a57;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x49c4('0x0'))(_0x49c4('0x1'));var moment=require(_0x49c4('0x2'));var BPromise=require(_0x49c4('0x3'));var rp=require(_0x49c4('0x4'));var fs=require('fs');var path=require(_0x49c4('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x49c4('0x6'));module['exports']=function(_0xc1278f,_0x6030ae){return _0xc1278f[_0x49c4('0x7')](_0x49c4('0x8'),attributes,{'tableName':_0x49c4('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 63f5e84..d7fb072 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc44f=['rpc','../../config/environment','jayson/promise','client','http','request','info','Dynamics365Configuration,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Configuration,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','randomstring','ioredis','../../config/utils','../../config/logger'];(function(_0x2c5390,_0x4a4fa2){var _0x418a74=function(_0x5c9ea2){while(--_0x5c9ea2){_0x2c5390['push'](_0x2c5390['shift']());}};_0x418a74(++_0x4a4fa2);}(_0xc44f,0x19c));var _0xfc44=function(_0x480390,_0xe34ede){_0x480390=_0x480390-0x0;var _0x346191=_0xc44f[_0x480390];return _0x346191;};'use strict';var _=require(_0xfc44('0x0'));var util=require(_0xfc44('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xfc44('0x2'));var fs=require('fs');var Redis=require(_0xfc44('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xfc44('0x4'));var logger=require(_0xfc44('0x5'))(_0xfc44('0x6'));var config=require(_0xfc44('0x7'));var jayson=require(_0xfc44('0x8'));var client=jayson[_0xfc44('0x9')][_0xfc44('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x508e3d,_0x3684b3,_0x2ab1ca){return new BPromise(function(_0x488869,_0xaad2c4){return client[_0xfc44('0xb')](_0x508e3d,_0x2ab1ca)['then'](function(_0x51253a){logger[_0xfc44('0xc')](_0xfc44('0xd'),_0x3684b3,_0xfc44('0xe'));logger[_0xfc44('0xf')](_0xfc44('0x10'),_0x3684b3,_0xfc44('0xe'),JSON[_0xfc44('0x11')](_0x51253a));if(_0x51253a[_0xfc44('0x12')]){if(_0x51253a[_0xfc44('0x12')]['code']===0x1f4){logger[_0xfc44('0x12')](_0xfc44('0xd'),_0x3684b3,_0x51253a['error']['message']);return _0xaad2c4(_0x51253a[_0xfc44('0x12')][_0xfc44('0x13')]);}logger['error'](_0xfc44('0xd'),_0x3684b3,_0x51253a[_0xfc44('0x12')]['message']);return _0x488869(_0x51253a['error'][_0xfc44('0x13')]);}else{logger[_0xfc44('0xc')]('Dynamics365Configuration,\x20%s,\x20%s',_0x3684b3,_0xfc44('0xe'));_0x488869(_0x51253a[_0xfc44('0x14')][_0xfc44('0x13')]);}})[_0xfc44('0x15')](function(_0xa82ec8){logger['error']('Dynamics365Configuration,\x20%s,\x20%s',_0x3684b3,_0xa82ec8);_0xaad2c4(_0xa82ec8);});});}
\ No newline at end of file
+var _0xd648=['rpc','../../config/environment','jayson/promise','client','http','request','then','info','Dynamics365Configuration,\x20%s,\x20%s','request\x20sent','debug','Dynamics365Configuration,\x20%s,\x20%s,\x20%s','error','code','message','catch','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x191dbb,_0x384952){var _0x214209=function(_0x4d5bf8){while(--_0x4d5bf8){_0x191dbb['push'](_0x191dbb['shift']());}};_0x214209(++_0x384952);}(_0xd648,0x175));var _0x8d64=function(_0x119119,_0x3d9525){_0x119119=_0x119119-0x0;var _0x4e8c54=_0xd648[_0x119119];return _0x4e8c54;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x8d64('0x0'));var BPromise=require(_0x8d64('0x1'));var rs=require(_0x8d64('0x2'));var fs=require('fs');var Redis=require(_0x8d64('0x3'));var db=require(_0x8d64('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x8d64('0x5'));var config=require(_0x8d64('0x6'));var jayson=require(_0x8d64('0x7'));var client=jayson[_0x8d64('0x8')][_0x8d64('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x39b9d4,_0x41cff9,_0x32f14b){return new BPromise(function(_0x4cf9a7,_0x39b314){return client[_0x8d64('0xa')](_0x39b9d4,_0x32f14b)[_0x8d64('0xb')](function(_0x1d6139){logger[_0x8d64('0xc')](_0x8d64('0xd'),_0x41cff9,_0x8d64('0xe'));logger[_0x8d64('0xf')](_0x8d64('0x10'),_0x41cff9,_0x8d64('0xe'),JSON['stringify'](_0x1d6139));if(_0x1d6139[_0x8d64('0x11')]){if(_0x1d6139[_0x8d64('0x11')][_0x8d64('0x12')]===0x1f4){logger['error'](_0x8d64('0xd'),_0x41cff9,_0x1d6139[_0x8d64('0x11')]['message']);return _0x39b314(_0x1d6139[_0x8d64('0x11')][_0x8d64('0x13')]);}logger[_0x8d64('0x11')](_0x8d64('0xd'),_0x41cff9,_0x1d6139[_0x8d64('0x11')][_0x8d64('0x13')]);return _0x4cf9a7(_0x1d6139[_0x8d64('0x11')][_0x8d64('0x13')]);}else{logger[_0x8d64('0xc')](_0x8d64('0xd'),_0x41cff9,_0x8d64('0xe'));_0x4cf9a7(_0x1d6139['result']['message']);}})[_0x8d64('0x14')](function(_0x2c238b){logger['error']('Dynamics365Configuration,\x20%s,\x20%s',_0x41cff9,_0x2c238b);_0x39b314(_0x2c238b);});});}
\ No newline at end of file
index 69531f8..38f5f55 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa0ee=['post','create','/:id','update','delete','destroy','util','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intDynamics365Field.controller','get','index','isAuthenticated','show'];(function(_0x1bd416,_0x52f4da){var _0x584a3b=function(_0x7e76ea){while(--_0x7e76ea){_0x1bd416['push'](_0x1bd416['shift']());}};_0x584a3b(++_0x52f4da);}(_0xa0ee,0xcc));var _0xea0e=function(_0x2cacef,_0xba1573){_0x2cacef=_0x2cacef-0x0;var _0x289ba6=_0xa0ee[_0x2cacef];return _0x289ba6;};'use strict';var multer=require('multer');var util=require(_0xea0e('0x0'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xea0e('0x1'));var router=express[_0xea0e('0x2')]();var fs_extra=require(_0xea0e('0x3'));var auth=require(_0xea0e('0x4'));var interaction=require(_0xea0e('0x5'));var config=require(_0xea0e('0x6'));var controller=require(_0xea0e('0x7'));router[_0xea0e('0x8')]('/',auth['isAuthenticated'](),controller[_0xea0e('0x9')]);router['get']('/:id',auth[_0xea0e('0xa')](),controller[_0xea0e('0xb')]);router[_0xea0e('0xc')]('/',auth[_0xea0e('0xa')](),controller[_0xea0e('0xd')]);router['put'](_0xea0e('0xe'),auth[_0xea0e('0xa')](),controller[_0xea0e('0xf')]);router[_0xea0e('0x10')](_0xea0e('0xe'),auth[_0xea0e('0xa')](),controller[_0xea0e('0x11')]);module['exports']=router;
\ No newline at end of file
+var _0xe675=['connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./intDynamics365Field.controller','get','isAuthenticated','/:id','show','create','put','update','delete','multer','util','path'];(function(_0x2dccfb,_0x13bf41){var _0x4ff945=function(_0x3876a9){while(--_0x3876a9){_0x2dccfb['push'](_0x2dccfb['shift']());}};_0x4ff945(++_0x13bf41);}(_0xe675,0xb1));var _0x5e67=function(_0xcaeb26,_0x46a053){_0xcaeb26=_0xcaeb26-0x0;var _0x2795c6=_0xe675[_0xcaeb26];return _0x2795c6;};'use strict';var multer=require(_0x5e67('0x0'));var util=require(_0x5e67('0x1'));var path=require(_0x5e67('0x2'));var timeout=require(_0x5e67('0x3'));var express=require(_0x5e67('0x4'));var router=express[_0x5e67('0x5')]();var fs_extra=require(_0x5e67('0x6'));var auth=require(_0x5e67('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0x5e67('0x8'));var controller=require(_0x5e67('0x9'));router[_0x5e67('0xa')]('/',auth[_0x5e67('0xb')](),controller['index']);router['get'](_0x5e67('0xc'),auth[_0x5e67('0xb')](),controller[_0x5e67('0xd')]);router['post']('/',auth[_0x5e67('0xb')](),controller[_0x5e67('0xe')]);router[_0x5e67('0xf')](_0x5e67('0xc'),auth[_0x5e67('0xb')](),controller[_0x5e67('0x10')]);router[_0x5e67('0x11')]('/:id',auth['isAuthenticated'](),controller['destroy']);module['exports']=router;
\ No newline at end of file
index d27acd6..101b289 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2164=['string','STRING','BOOLEAN','sequelize','exports','ENUM','variable','customVariable','keyValue','picklist'];(function(_0x20634c,_0x5534fc){var _0x5d8936=function(_0x6b45f2){while(--_0x6b45f2){_0x20634c['push'](_0x20634c['shift']());}};_0x5d8936(++_0x5534fc);}(_0x2164,0x157));var _0x4216=function(_0x480e2e,_0x4ae64a){_0x480e2e=_0x480e2e-0x0;var _0x1d9691=_0x2164[_0x480e2e];return _0x1d9691;};'use strict';var Sequelize=require(_0x4216('0x0'));module[_0x4216('0x1')]={'type':{'type':Sequelize[_0x4216('0x2')]('string',_0x4216('0x3'),_0x4216('0x4'),_0x4216('0x5'),_0x4216('0x6')),'defaultValue':_0x4216('0x7')},'content':{'type':Sequelize[_0x4216('0x8')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize['ENUM']('string',_0x4216('0x3'),_0x4216('0x4'))},'keyContent':{'type':Sequelize[_0x4216('0x8')]},'idField':{'type':Sequelize[_0x4216('0x8')]},'nameField':{'type':Sequelize[_0x4216('0x8')]},'customField':{'type':Sequelize[_0x4216('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x4216('0x8')]}};
\ No newline at end of file
+var _0xcba4=['customVariable','keyValue','picklist','STRING','BOOLEAN','sequelize','exports','string'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xcba4,0xe5));var _0x4cba=function(_0xc25577,_0x16d201){_0xc25577=_0xc25577-0x0;var _0x1a6990=_0xcba4[_0xc25577];return _0x1a6990;};'use strict';var Sequelize=require(_0x4cba('0x0'));module[_0x4cba('0x1')]={'type':{'type':Sequelize['ENUM'](_0x4cba('0x2'),'variable',_0x4cba('0x3'),_0x4cba('0x4'),_0x4cba('0x5')),'defaultValue':_0x4cba('0x2')},'content':{'type':Sequelize[_0x4cba('0x6')]},'key':{'type':Sequelize[_0x4cba('0x6')]},'keyType':{'type':Sequelize['ENUM']('string','variable',_0x4cba('0x3'))},'keyContent':{'type':Sequelize[_0x4cba('0x6')]},'idField':{'type':Sequelize[_0x4cba('0x6')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize[_0x4cba('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x4cba('0x6')]}};
\ No newline at end of file
index 064aa32..e1fbc97 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1f38=['filter','options','Dynamics365Field','includeAll','include','findAll','catch','show','params','find','create','body','destroy','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','apply','reject','save','update','then','end','stack','name','send','map','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','merge','VIRTUAL'];(function(_0x49d7ca,_0x514fc4){var _0x12422f=function(_0x2bc407){while(--_0x2bc407){_0x49d7ca['push'](_0x49d7ca['shift']());}};_0x12422f(++_0x514fc4);}(_0x1f38,0x1c9));var _0x81f3=function(_0x17fdde,_0x4b3717){_0x17fdde=_0x17fdde-0x0;var _0x4fd885=_0x1f38[_0x17fdde];return _0x4fd885;};'use strict';var emlformat=require(_0x81f3('0x0'));var rimraf=require(_0x81f3('0x1'));var zipdir=require(_0x81f3('0x2'));var jsonpatch=require(_0x81f3('0x3'));var rp=require(_0x81f3('0x4'));var moment=require(_0x81f3('0x5'));var BPromise=require(_0x81f3('0x6'));var Mustache=require(_0x81f3('0x7'));var util=require(_0x81f3('0x8'));var path=require(_0x81f3('0x9'));var sox=require(_0x81f3('0xa'));var csv=require(_0x81f3('0xb'));var ejs=require(_0x81f3('0xc'));var fs=require('fs');var fs_extra=require(_0x81f3('0xd'));var _=require(_0x81f3('0xe'));var squel=require(_0x81f3('0xf'));var crypto=require(_0x81f3('0x10'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x81f3('0xb'));var querystring=require(_0x81f3('0x11'));var Papa=require(_0x81f3('0x12'));var Redis=require(_0x81f3('0x13'));var authService=require(_0x81f3('0x14'));var qs=require(_0x81f3('0x15'));var as=require(_0x81f3('0x16'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x81f3('0x17'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x81f3('0x18'));var db=require(_0x81f3('0x19'))['db'];function respondWithStatusCode(_0x4a1bcb,_0xee8968){_0xee8968=_0xee8968||0xcc;return function(_0x42110f){if(_0x42110f){return _0x4a1bcb[_0x81f3('0x1a')](_0xee8968);}return _0x4a1bcb[_0x81f3('0x1b')](_0xee8968)['end']();};}function respondWithResult(_0x4895c9,_0x1a202c){_0x1a202c=_0x1a202c||0xc8;return function(_0x43a063){if(_0x43a063){return _0x4895c9[_0x81f3('0x1b')](_0x1a202c)[_0x81f3('0x1c')](_0x43a063);}};}function respondWithFilteredResult(_0x28ebb0,_0x2270ec){return function(_0x1d052c){if(_0x1d052c){var _0x3415c2=typeof _0x2270ec[_0x81f3('0x1d')]===_0x81f3('0x1e')&&typeof _0x2270ec[_0x81f3('0x1f')]==='undefined';var _0x213ad0=_0x1d052c[_0x81f3('0x20')];var _0x5a6ca9=_0x3415c2?0x0:_0x2270ec[_0x81f3('0x1d')];var _0x567497=_0x3415c2?_0x1d052c['count']:_0x2270ec['offset']+_0x2270ec[_0x81f3('0x1f')];var _0x4e534f;if(_0x567497>=_0x213ad0){_0x567497=_0x213ad0;_0x4e534f=0xc8;}else{_0x4e534f=0xce;}_0x28ebb0[_0x81f3('0x1b')](_0x4e534f);return _0x28ebb0[_0x81f3('0x21')]('Content-Range',_0x5a6ca9+'-'+_0x567497+'/'+_0x213ad0)[_0x81f3('0x1c')](_0x1d052c);}return null;};}function patchUpdates(_0x6aede9){return function(_0x5590f0){try{jsonpatch[_0x81f3('0x22')](_0x5590f0,_0x6aede9,!![]);}catch(_0x185b90){return BPromise[_0x81f3('0x23')](_0x185b90);}return _0x5590f0[_0x81f3('0x24')]();};}function saveUpdates(_0x44df0c,_0x490cac){return function(_0x31f7c6){if(_0x31f7c6){return _0x31f7c6[_0x81f3('0x25')](_0x44df0c)[_0x81f3('0x26')](function(_0x5925cb){return _0x5925cb;});}return null;};}function removeEntity(_0x4fd862,_0x2fbc39){return function(_0x115325){if(_0x115325){return _0x115325['destroy']()[_0x81f3('0x26')](function(){_0x4fd862['status'](0xcc)[_0x81f3('0x27')]();});}};}function handleEntityNotFound(_0x34065c,_0x3827dd){return function(_0x1d8693){if(!_0x1d8693){_0x34065c['sendStatus'](0x194);}return _0x1d8693;};}function handleError(_0x3187f1,_0x53add9){_0x53add9=_0x53add9||0x1f4;return function(_0x3fbff6){logger['error'](_0x3fbff6[_0x81f3('0x28')]);if(_0x3fbff6[_0x81f3('0x29')]){delete _0x3fbff6['name'];}_0x3187f1[_0x81f3('0x1b')](_0x53add9)[_0x81f3('0x2a')](_0x3fbff6);};}exports['index']=function(_0x2882ce,_0x53371c){var _0x1e4f68={},_0x218cae={},_0x540c74={'count':0x0,'rows':[]};var _0x50f8d8=_[_0x81f3('0x2b')](db['Dynamics365Field'][_0x81f3('0x2c')],function(_0x8d528a){return{'name':_0x8d528a['fieldName'],'type':_0x8d528a[_0x81f3('0x2d')][_0x81f3('0x2e')]};});_0x218cae[_0x81f3('0x2f')]=_['map'](_0x50f8d8,'name');_0x218cae[_0x81f3('0x30')]=_[_0x81f3('0x31')](_0x2882ce[_0x81f3('0x30')]);_0x218cae[_0x81f3('0x32')]=_[_0x81f3('0x33')](_0x218cae[_0x81f3('0x2f')],_0x218cae[_0x81f3('0x30')]);_0x1e4f68[_0x81f3('0x34')]=_[_0x81f3('0x33')](_0x218cae[_0x81f3('0x2f')],qs[_0x81f3('0x35')](_0x2882ce[_0x81f3('0x30')][_0x81f3('0x35')]));_0x1e4f68[_0x81f3('0x34')]=_0x1e4f68[_0x81f3('0x34')][_0x81f3('0x36')]?_0x1e4f68[_0x81f3('0x34')]:_0x218cae[_0x81f3('0x2f')];if(!_0x2882ce[_0x81f3('0x30')][_0x81f3('0x37')](_0x81f3('0x38'))){_0x1e4f68[_0x81f3('0x1f')]=qs[_0x81f3('0x1f')](_0x2882ce['query'][_0x81f3('0x1f')]);_0x1e4f68[_0x81f3('0x1d')]=qs['offset'](_0x2882ce[_0x81f3('0x30')][_0x81f3('0x1d')]);}_0x1e4f68['order']=qs[_0x81f3('0x39')](_0x2882ce[_0x81f3('0x30')]['sort']);_0x1e4f68['where']=qs[_0x81f3('0x32')](_['pick'](_0x2882ce['query'],_0x218cae['filters']),_0x50f8d8);if(_0x2882ce[_0x81f3('0x30')]['filter']){_0x1e4f68[_0x81f3('0x3a')]=_[_0x81f3('0x3b')](_0x1e4f68[_0x81f3('0x3a')],{'$or':_[_0x81f3('0x2b')](_0x50f8d8,function(_0x2f9c57){if(_0x2f9c57[_0x81f3('0x2d')]!==_0x81f3('0x3c')){var _0x2cdea9={};_0x2cdea9[_0x2f9c57[_0x81f3('0x29')]]={'$like':'%'+_0x2882ce[_0x81f3('0x30')][_0x81f3('0x3d')]+'%'};return _0x2cdea9;}})});}_0x1e4f68=_[_0x81f3('0x3b')]({},_0x1e4f68,_0x2882ce[_0x81f3('0x3e')]);var _0xb00f65={'where':_0x1e4f68[_0x81f3('0x3a')]};return db[_0x81f3('0x3f')]['count'](_0xb00f65)[_0x81f3('0x26')](function(_0x499d5b){_0x540c74[_0x81f3('0x20')]=_0x499d5b;if(_0x2882ce[_0x81f3('0x30')][_0x81f3('0x40')]){_0x1e4f68[_0x81f3('0x41')]=[{'all':!![]}];}return db['Dynamics365Field'][_0x81f3('0x42')](_0x1e4f68);})[_0x81f3('0x26')](function(_0x393750){_0x540c74['rows']=_0x393750;return _0x540c74;})[_0x81f3('0x26')](respondWithFilteredResult(_0x53371c,_0x1e4f68))[_0x81f3('0x43')](handleError(_0x53371c,null));};exports[_0x81f3('0x44')]=function(_0x5d8d56,_0x4ad078){var _0x47af7e={'raw':!![],'where':{'id':_0x5d8d56[_0x81f3('0x45')]['id']}},_0x44a919={};_0x44a919[_0x81f3('0x2f')]=_[_0x81f3('0x31')](db[_0x81f3('0x3f')][_0x81f3('0x2c')]);_0x44a919[_0x81f3('0x30')]=_[_0x81f3('0x31')](_0x5d8d56['query']);_0x44a919[_0x81f3('0x32')]=_['intersection'](_0x44a919[_0x81f3('0x2f')],_0x44a919['query']);_0x47af7e[_0x81f3('0x34')]=_[_0x81f3('0x33')](_0x44a919[_0x81f3('0x2f')],qs[_0x81f3('0x35')](_0x5d8d56['query']['fields']));_0x47af7e[_0x81f3('0x34')]=_0x47af7e[_0x81f3('0x34')][_0x81f3('0x36')]?_0x47af7e[_0x81f3('0x34')]:_0x44a919[_0x81f3('0x2f')];if(_0x5d8d56[_0x81f3('0x30')][_0x81f3('0x40')]){_0x47af7e['include']=[{'all':!![]}];}_0x47af7e=_['merge']({},_0x47af7e,_0x5d8d56[_0x81f3('0x3e')]);return db[_0x81f3('0x3f')][_0x81f3('0x46')](_0x47af7e)['then'](handleEntityNotFound(_0x4ad078,null))[_0x81f3('0x26')](respondWithResult(_0x4ad078,null))[_0x81f3('0x43')](handleError(_0x4ad078,null));};exports[_0x81f3('0x47')]=function(_0xbbda7d,_0x516a8a){return db[_0x81f3('0x3f')][_0x81f3('0x47')](_0xbbda7d['body'],{})['then'](respondWithResult(_0x516a8a,0xc9))['catch'](handleError(_0x516a8a,null));};exports[_0x81f3('0x25')]=function(_0x1c94ad,_0x29a206){if(_0x1c94ad[_0x81f3('0x48')]['id']){delete _0x1c94ad['body']['id'];}return db[_0x81f3('0x3f')][_0x81f3('0x46')]({'where':{'id':_0x1c94ad[_0x81f3('0x45')]['id']}})[_0x81f3('0x26')](handleEntityNotFound(_0x29a206,null))[_0x81f3('0x26')](saveUpdates(_0x1c94ad['body'],null))[_0x81f3('0x26')](respondWithResult(_0x29a206,null))[_0x81f3('0x43')](handleError(_0x29a206,null));};exports[_0x81f3('0x49')]=function(_0x5d9d6b,_0x596cb2){return db[_0x81f3('0x3f')][_0x81f3('0x46')]({'where':{'id':_0x5d9d6b[_0x81f3('0x45')]['id']}})[_0x81f3('0x26')](handleEntityNotFound(_0x596cb2,null))[_0x81f3('0x26')](removeEntity(_0x596cb2,null))[_0x81f3('0x43')](handleError(_0x596cb2,null));};
\ No newline at end of file
+var _0x7433=['desk.js','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/logger','../../mysqldb','status','end','json','offset','undefined','limit','count','set','apply','reject','save','update','then','destroy','stack','name','send','map','Dynamics365Field','fieldName','type','key','model','query','filters','intersection','attributes','fields','length','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','include','show','params','rawAttributes','keys','catch','create','body','find','rimraf','zip-dir','request-promise','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce'];(function(_0x132765,_0x2663cd){var _0x2f3263=function(_0x28c713){while(--_0x28c713){_0x132765['push'](_0x132765['shift']());}};_0x2f3263(++_0x2663cd);}(_0x7433,0xfa));var _0x3743=function(_0x3944b3,_0xf05375){_0x3944b3=_0x3944b3-0x0;var _0xbf7a53=_0x7433[_0x3944b3];return _0xbf7a53;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x3743('0x0'));var zipdir=require(_0x3743('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x3743('0x2'));var moment=require('moment');var BPromise=require(_0x3743('0x3'));var Mustache=require(_0x3743('0x4'));var util=require(_0x3743('0x5'));var path=require('path');var sox=require(_0x3743('0x6'));var csv=require(_0x3743('0x7'));var ejs=require(_0x3743('0x8'));var fs=require('fs');var fs_extra=require(_0x3743('0x9'));var _=require(_0x3743('0xa'));var squel=require(_0x3743('0xb'));var crypto=require(_0x3743('0xc'));var jsforce=require(_0x3743('0xd'));var deskjs=require(_0x3743('0xe'));var toCsv=require(_0x3743('0x7'));var querystring=require('querystring');var Papa=require(_0x3743('0xf'));var Redis=require(_0x3743('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x3743('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x3743('0x12'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x3743('0x13'))['db'];function respondWithStatusCode(_0x314d76,_0x5498e8){_0x5498e8=_0x5498e8||0xcc;return function(_0x210ced){if(_0x210ced){return _0x314d76['sendStatus'](_0x5498e8);}return _0x314d76[_0x3743('0x14')](_0x5498e8)[_0x3743('0x15')]();};}function respondWithResult(_0x1383e0,_0x379f7a){_0x379f7a=_0x379f7a||0xc8;return function(_0x34396c){if(_0x34396c){return _0x1383e0['status'](_0x379f7a)[_0x3743('0x16')](_0x34396c);}};}function respondWithFilteredResult(_0x5ec748,_0x375949){return function(_0x4e8020){if(_0x4e8020){var _0x5593c7=typeof _0x375949[_0x3743('0x17')]===_0x3743('0x18')&&typeof _0x375949[_0x3743('0x19')]==='undefined';var _0x4b20aa=_0x4e8020[_0x3743('0x1a')];var _0x559091=_0x5593c7?0x0:_0x375949[_0x3743('0x17')];var _0x10fef3=_0x5593c7?_0x4e8020[_0x3743('0x1a')]:_0x375949[_0x3743('0x17')]+_0x375949[_0x3743('0x19')];var _0x2bcefa;if(_0x10fef3>=_0x4b20aa){_0x10fef3=_0x4b20aa;_0x2bcefa=0xc8;}else{_0x2bcefa=0xce;}_0x5ec748[_0x3743('0x14')](_0x2bcefa);return _0x5ec748[_0x3743('0x1b')]('Content-Range',_0x559091+'-'+_0x10fef3+'/'+_0x4b20aa)[_0x3743('0x16')](_0x4e8020);}return null;};}function patchUpdates(_0x46c3ff){return function(_0x54b452){try{jsonpatch[_0x3743('0x1c')](_0x54b452,_0x46c3ff,!![]);}catch(_0x1895a6){return BPromise[_0x3743('0x1d')](_0x1895a6);}return _0x54b452[_0x3743('0x1e')]();};}function saveUpdates(_0x67f608,_0x1bdb7e){return function(_0x988c2c){if(_0x988c2c){return _0x988c2c[_0x3743('0x1f')](_0x67f608)[_0x3743('0x20')](function(_0x571651){return _0x571651;});}return null;};}function removeEntity(_0x56a919,_0x37cddc){return function(_0x84755b){if(_0x84755b){return _0x84755b[_0x3743('0x21')]()[_0x3743('0x20')](function(){_0x56a919[_0x3743('0x14')](0xcc)[_0x3743('0x15')]();});}};}function handleEntityNotFound(_0x41bce7,_0x29876a){return function(_0x320212){if(!_0x320212){_0x41bce7['sendStatus'](0x194);}return _0x320212;};}function handleError(_0x3101f5,_0x5df785){_0x5df785=_0x5df785||0x1f4;return function(_0x253548){logger['error'](_0x253548[_0x3743('0x22')]);if(_0x253548[_0x3743('0x23')]){delete _0x253548[_0x3743('0x23')];}_0x3101f5['status'](_0x5df785)[_0x3743('0x24')](_0x253548);};}exports['index']=function(_0x536d83,_0x355a75){var _0x4676d4={},_0x2a7330={},_0x29687a={'count':0x0,'rows':[]};var _0x1616db=_[_0x3743('0x25')](db[_0x3743('0x26')]['rawAttributes'],function(_0x2efd40){return{'name':_0x2efd40[_0x3743('0x27')],'type':_0x2efd40[_0x3743('0x28')][_0x3743('0x29')]};});_0x2a7330[_0x3743('0x2a')]=_['map'](_0x1616db,_0x3743('0x23'));_0x2a7330[_0x3743('0x2b')]=_['keys'](_0x536d83['query']);_0x2a7330[_0x3743('0x2c')]=_[_0x3743('0x2d')](_0x2a7330[_0x3743('0x2a')],_0x2a7330[_0x3743('0x2b')]);_0x4676d4[_0x3743('0x2e')]=_[_0x3743('0x2d')](_0x2a7330[_0x3743('0x2a')],qs[_0x3743('0x2f')](_0x536d83[_0x3743('0x2b')][_0x3743('0x2f')]));_0x4676d4[_0x3743('0x2e')]=_0x4676d4[_0x3743('0x2e')][_0x3743('0x30')]?_0x4676d4[_0x3743('0x2e')]:_0x2a7330[_0x3743('0x2a')];if(!_0x536d83['query']['hasOwnProperty']('nolimit')){_0x4676d4['limit']=qs['limit'](_0x536d83[_0x3743('0x2b')][_0x3743('0x19')]);_0x4676d4['offset']=qs['offset'](_0x536d83[_0x3743('0x2b')][_0x3743('0x17')]);}_0x4676d4[_0x3743('0x31')]=qs[_0x3743('0x32')](_0x536d83[_0x3743('0x2b')][_0x3743('0x32')]);_0x4676d4[_0x3743('0x33')]=qs[_0x3743('0x2c')](_[_0x3743('0x34')](_0x536d83[_0x3743('0x2b')],_0x2a7330[_0x3743('0x2c')]),_0x1616db);if(_0x536d83[_0x3743('0x2b')][_0x3743('0x35')]){_0x4676d4['where']=_[_0x3743('0x36')](_0x4676d4[_0x3743('0x33')],{'$or':_[_0x3743('0x25')](_0x1616db,function(_0x5e81c9){if(_0x5e81c9[_0x3743('0x28')]!==_0x3743('0x37')){var _0x1371a2={};_0x1371a2[_0x5e81c9[_0x3743('0x23')]]={'$like':'%'+_0x536d83['query'][_0x3743('0x35')]+'%'};return _0x1371a2;}})});}_0x4676d4=_[_0x3743('0x36')]({},_0x4676d4,_0x536d83['options']);var _0x236013={'where':_0x4676d4[_0x3743('0x33')]};return db[_0x3743('0x26')][_0x3743('0x1a')](_0x236013)[_0x3743('0x20')](function(_0x37c540){_0x29687a[_0x3743('0x1a')]=_0x37c540;if(_0x536d83[_0x3743('0x2b')][_0x3743('0x38')]){_0x4676d4[_0x3743('0x39')]=[{'all':!![]}];}return db[_0x3743('0x26')]['findAll'](_0x4676d4);})[_0x3743('0x20')](function(_0x3171d2){_0x29687a['rows']=_0x3171d2;return _0x29687a;})[_0x3743('0x20')](respondWithFilteredResult(_0x355a75,_0x4676d4))['catch'](handleError(_0x355a75,null));};exports[_0x3743('0x3a')]=function(_0x425ba9,_0x43e3b7){var _0x45d5e6={'raw':!![],'where':{'id':_0x425ba9[_0x3743('0x3b')]['id']}},_0x4da0d4={};_0x4da0d4[_0x3743('0x2a')]=_['keys'](db[_0x3743('0x26')][_0x3743('0x3c')]);_0x4da0d4[_0x3743('0x2b')]=_[_0x3743('0x3d')](_0x425ba9[_0x3743('0x2b')]);_0x4da0d4[_0x3743('0x2c')]=_[_0x3743('0x2d')](_0x4da0d4[_0x3743('0x2a')],_0x4da0d4[_0x3743('0x2b')]);_0x45d5e6[_0x3743('0x2e')]=_[_0x3743('0x2d')](_0x4da0d4[_0x3743('0x2a')],qs['fields'](_0x425ba9['query'][_0x3743('0x2f')]));_0x45d5e6['attributes']=_0x45d5e6[_0x3743('0x2e')][_0x3743('0x30')]?_0x45d5e6[_0x3743('0x2e')]:_0x4da0d4[_0x3743('0x2a')];if(_0x425ba9[_0x3743('0x2b')][_0x3743('0x38')]){_0x45d5e6['include']=[{'all':!![]}];}_0x45d5e6=_[_0x3743('0x36')]({},_0x45d5e6,_0x425ba9['options']);return db[_0x3743('0x26')]['find'](_0x45d5e6)[_0x3743('0x20')](handleEntityNotFound(_0x43e3b7,null))['then'](respondWithResult(_0x43e3b7,null))[_0x3743('0x3e')](handleError(_0x43e3b7,null));};exports[_0x3743('0x3f')]=function(_0x4aeab3,_0x57e4d9){return db[_0x3743('0x26')][_0x3743('0x3f')](_0x4aeab3['body'],{})[_0x3743('0x20')](respondWithResult(_0x57e4d9,0xc9))['catch'](handleError(_0x57e4d9,null));};exports[_0x3743('0x1f')]=function(_0x569a90,_0x4c05da){if(_0x569a90[_0x3743('0x40')]['id']){delete _0x569a90[_0x3743('0x40')]['id'];}return db[_0x3743('0x26')][_0x3743('0x41')]({'where':{'id':_0x569a90[_0x3743('0x3b')]['id']}})['then'](handleEntityNotFound(_0x4c05da,null))[_0x3743('0x20')](saveUpdates(_0x569a90[_0x3743('0x40')],null))[_0x3743('0x20')](respondWithResult(_0x4c05da,null))[_0x3743('0x3e')](handleError(_0x4c05da,null));};exports[_0x3743('0x21')]=function(_0x357dc2,_0x33c531){return db[_0x3743('0x26')][_0x3743('0x41')]({'where':{'id':_0x357dc2[_0x3743('0x3b')]['id']}})[_0x3743('0x20')](handleEntityNotFound(_0x33c531,null))[_0x3743('0x20')](removeEntity(_0x33c531,null))[_0x3743('0x3e')](handleError(_0x33c531,null));};
\ No newline at end of file
index 31d878b..0fa53df 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x21db=['./intDynamics365Field.attributes','exports','define','Dynamics365Field','int_dynamics365_fields','FieldId','../../config/logger','api','bluebird','request-promise','rimraf','../../config/environment'];(function(_0x5e9826,_0x1bc7a0){var _0x1de320=function(_0x1ea7f8){while(--_0x1ea7f8){_0x5e9826['push'](_0x5e9826['shift']());}};_0x1de320(++_0x1bc7a0);}(_0x21db,0xde));var _0xb21d=function(_0x545a02,_0x2efaab){_0x545a02=_0x545a02-0x0;var _0x70e3e=_0x21db[_0x545a02];return _0x70e3e;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xb21d('0x0'))(_0xb21d('0x1'));var moment=require('moment');var BPromise=require(_0xb21d('0x2'));var rp=require(_0xb21d('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xb21d('0x4'));var config=require(_0xb21d('0x5'));var attributes=require(_0xb21d('0x6'));module[_0xb21d('0x7')]=function(_0x558c4d,_0x23914c){return _0x558c4d[_0xb21d('0x8')](_0xb21d('0x9'),attributes,{'tableName':_0xb21d('0xa'),'paranoid':![],'indexes':[{'name':'dynamics365_unique_index','fields':['idField',_0xb21d('0xb')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xefa7=['bluebird','request-promise','path','rimraf','./intDynamics365Field.attributes','exports','define','int_dynamics365_fields','dynamics365_unique_index','FieldId','lodash','../../config/logger','api','moment'];(function(_0x14d896,_0x53578b){var _0x28679a=function(_0x14921f){while(--_0x14921f){_0x14d896['push'](_0x14d896['shift']());}};_0x28679a(++_0x53578b);}(_0xefa7,0x106));var _0x7efa=function(_0x1547ed,_0x17e5eb){_0x1547ed=_0x1547ed-0x0;var _0x45bc13=_0xefa7[_0x1547ed];return _0x45bc13;};'use strict';var _=require(_0x7efa('0x0'));var util=require('util');var logger=require(_0x7efa('0x1'))(_0x7efa('0x2'));var moment=require(_0x7efa('0x3'));var BPromise=require(_0x7efa('0x4'));var rp=require(_0x7efa('0x5'));var fs=require('fs');var path=require(_0x7efa('0x6'));var rimraf=require(_0x7efa('0x7'));var config=require('../../config/environment');var attributes=require(_0x7efa('0x8'));module[_0x7efa('0x9')]=function(_0x467212,_0x27d029){return _0x467212[_0x7efa('0xa')]('Dynamics365Field',attributes,{'tableName':_0x7efa('0xb'),'paranoid':![],'indexes':[{'name':_0x7efa('0xc'),'fields':['idField',_0x7efa('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index 5b911f7..aa77249 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x747c=['request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','Dynamics365Field,\x20%s,\x20%s','debug','Dynamics365Field,\x20%s,\x20%s,\x20%s'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x747c,0x1b7));var _0xc747=function(_0x39b2a8,_0x232671){_0x39b2a8=_0x39b2a8-0x0;var _0x168b5c=_0x747c[_0x39b2a8];return _0x168b5c;};'use strict';var _=require(_0xc747('0x0'));var util=require(_0xc747('0x1'));var moment=require(_0xc747('0x2'));var BPromise=require('bluebird');var rs=require(_0xc747('0x3'));var fs=require('fs');var Redis=require(_0xc747('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xc747('0x5'));var logger=require('../../config/logger')(_0xc747('0x6'));var config=require(_0xc747('0x7'));var jayson=require(_0xc747('0x8'));var client=jayson[_0xc747('0x9')][_0xc747('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1d2bbe,_0x5986da,_0x37012d){return new BPromise(function(_0x4885f1,_0x2b0908){return client[_0xc747('0xb')](_0x1d2bbe,_0x37012d)[_0xc747('0xc')](function(_0x18a166){logger[_0xc747('0xd')](_0xc747('0xe'),_0x5986da,'request\x20sent');logger[_0xc747('0xf')](_0xc747('0x10'),_0x5986da,_0xc747('0x11'),JSON[_0xc747('0x12')](_0x18a166));if(_0x18a166['error']){if(_0x18a166[_0xc747('0x13')][_0xc747('0x14')]===0x1f4){logger[_0xc747('0x13')](_0xc747('0xe'),_0x5986da,_0x18a166['error'][_0xc747('0x15')]);return _0x2b0908(_0x18a166[_0xc747('0x13')][_0xc747('0x15')]);}logger[_0xc747('0x13')](_0xc747('0xe'),_0x5986da,_0x18a166[_0xc747('0x13')]['message']);return _0x4885f1(_0x18a166['error']['message']);}else{logger[_0xc747('0xd')](_0xc747('0xe'),_0x5986da,_0xc747('0x11'));_0x4885f1(_0x18a166[_0xc747('0x16')][_0xc747('0x15')]);}})[_0xc747('0x17')](function(_0x26ce8f){logger[_0xc747('0x13')]('Dynamics365Field,\x20%s,\x20%s',_0x5986da,_0x26ce8f);_0x2b0908(_0x26ce8f);});});}
\ No newline at end of file
+var _0xa82a=['then','info','Dynamics365Field,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x3a5648,_0x58054e){var _0x34126d=function(_0x3a6476){while(--_0x3a6476){_0x3a5648['push'](_0x3a5648['shift']());}};_0x34126d(++_0x58054e);}(_0xa82a,0xfa));var _0xaa82=function(_0x29f1a5,_0x2a56b4){_0x29f1a5=_0x29f1a5-0x0;var _0x3d5ce1=_0xa82a[_0x29f1a5];return _0x3d5ce1;};'use strict';var _=require(_0xaa82('0x0'));var util=require(_0xaa82('0x1'));var moment=require(_0xaa82('0x2'));var BPromise=require(_0xaa82('0x3'));var rs=require(_0xaa82('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xaa82('0x5'))['db'];var utils=require(_0xaa82('0x6'));var logger=require(_0xaa82('0x7'))(_0xaa82('0x8'));var config=require(_0xaa82('0x9'));var jayson=require(_0xaa82('0xa'));var client=jayson[_0xaa82('0xb')][_0xaa82('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x3039cf,_0x21b352,_0xcf1d58){return new BPromise(function(_0x4a92b2,_0x24884a){return client[_0xaa82('0xd')](_0x3039cf,_0xcf1d58)[_0xaa82('0xe')](function(_0x2096a4){logger[_0xaa82('0xf')](_0xaa82('0x10'),_0x21b352,_0xaa82('0x11'));logger[_0xaa82('0x12')]('Dynamics365Field,\x20%s,\x20%s,\x20%s',_0x21b352,'request\x20sent',JSON[_0xaa82('0x13')](_0x2096a4));if(_0x2096a4[_0xaa82('0x14')]){if(_0x2096a4[_0xaa82('0x14')][_0xaa82('0x15')]===0x1f4){logger[_0xaa82('0x14')]('Dynamics365Field,\x20%s,\x20%s',_0x21b352,_0x2096a4[_0xaa82('0x14')][_0xaa82('0x16')]);return _0x24884a(_0x2096a4[_0xaa82('0x14')][_0xaa82('0x16')]);}logger[_0xaa82('0x14')]('Dynamics365Field,\x20%s,\x20%s',_0x21b352,_0x2096a4[_0xaa82('0x14')]['message']);return _0x4a92b2(_0x2096a4[_0xaa82('0x14')]['message']);}else{logger[_0xaa82('0xf')](_0xaa82('0x10'),_0x21b352,_0xaa82('0x11'));_0x4a92b2(_0x2096a4[_0xaa82('0x17')][_0xaa82('0x16')]);}})['catch'](function(_0x5115cc){logger['error'](_0xaa82('0x10'),_0x21b352,_0x5115cc);_0x24884a(_0x5115cc);});});}
\ No newline at end of file
index f03c3a5..572cfa1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x13c3=['addConfiguration','put','update','destroy','exports','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./intFreshdeskAccount.controller','get','isAuthenticated','index','/:id','show','getFields','create','/:id/configurations'];(function(_0xc19c2f,_0x1fbf65){var _0x33b335=function(_0xe9a7b8){while(--_0xe9a7b8){_0xc19c2f['push'](_0xc19c2f['shift']());}};_0x33b335(++_0x1fbf65);}(_0x13c3,0x6e));var _0x313c=function(_0x3f3567,_0x119f3e){_0x3f3567=_0x3f3567-0x0;var _0x1877a4=_0x13c3[_0x3f3567];return _0x1877a4;};'use strict';var multer=require(_0x313c('0x0'));var util=require(_0x313c('0x1'));var path=require('path');var timeout=require(_0x313c('0x2'));var express=require(_0x313c('0x3'));var router=express[_0x313c('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x313c('0x5'));var interaction=require(_0x313c('0x6'));var config=require('../../config/environment');var controller=require(_0x313c('0x7'));router[_0x313c('0x8')]('/',auth[_0x313c('0x9')](),controller[_0x313c('0xa')]);router[_0x313c('0x8')](_0x313c('0xb'),auth[_0x313c('0x9')](),controller[_0x313c('0xc')]);router[_0x313c('0x8')]('/:id/configurations',auth[_0x313c('0x9')](),controller['getConfigurations']);router[_0x313c('0x8')]('/:id/fields',auth[_0x313c('0x9')](),controller[_0x313c('0xd')]);router['post']('/',auth['isAuthenticated'](),controller[_0x313c('0xe')]);router['post'](_0x313c('0xf'),auth[_0x313c('0x9')](),controller[_0x313c('0x10')]);router[_0x313c('0x11')]('/:id',auth[_0x313c('0x9')](),controller[_0x313c('0x12')]);router['delete'](_0x313c('0xb'),auth[_0x313c('0x9')](),controller[_0x313c('0x13')]);module[_0x313c('0x14')]=router;
\ No newline at end of file
+var _0x8cec=['../../components/auth/service','../../config/environment','./intFreshdeskAccount.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','post','/:id/configurations','addConfiguration','put','update','delete','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra'];(function(_0x56553e,_0x188da){var _0x10515a=function(_0x4f1445){while(--_0x4f1445){_0x56553e['push'](_0x56553e['shift']());}};_0x10515a(++_0x188da);}(_0x8cec,0x192));var _0xc8ce=function(_0x26b5a9,_0x2c1f6f){_0x26b5a9=_0x26b5a9-0x0;var _0x5dc833=_0x8cec[_0x26b5a9];return _0x5dc833;};'use strict';var multer=require(_0xc8ce('0x0'));var util=require(_0xc8ce('0x1'));var path=require(_0xc8ce('0x2'));var timeout=require(_0xc8ce('0x3'));var express=require('express');var router=express[_0xc8ce('0x4')]();var fs_extra=require(_0xc8ce('0x5'));var auth=require(_0xc8ce('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xc8ce('0x7'));var controller=require(_0xc8ce('0x8'));router[_0xc8ce('0x9')]('/',auth[_0xc8ce('0xa')](),controller[_0xc8ce('0xb')]);router[_0xc8ce('0x9')](_0xc8ce('0xc'),auth[_0xc8ce('0xa')](),controller[_0xc8ce('0xd')]);router[_0xc8ce('0x9')]('/:id/configurations',auth['isAuthenticated'](),controller['getConfigurations']);router[_0xc8ce('0x9')](_0xc8ce('0xe'),auth['isAuthenticated'](),controller[_0xc8ce('0xf')]);router[_0xc8ce('0x10')]('/',auth[_0xc8ce('0xa')](),controller['create']);router[_0xc8ce('0x10')](_0xc8ce('0x11'),auth[_0xc8ce('0xa')](),controller[_0xc8ce('0x12')]);router[_0xc8ce('0x13')]('/:id',auth['isAuthenticated'](),controller[_0xc8ce('0x14')]);router[_0xc8ce('0x15')]('/:id',auth[_0xc8ce('0xa')](),controller[_0xc8ce('0x16')]);module[_0xc8ce('0x17')]=router;
\ No newline at end of file
index 1f82cc4..d112ec9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7096=['exports','STRING','username','remoteUri'];(function(_0x1e928b,_0x7cb412){var _0x3e26c3=function(_0x1c41f8){while(--_0x1c41f8){_0x1e928b['push'](_0x1e928b['shift']());}};_0x3e26c3(++_0x7cb412);}(_0x7096,0x10c));var _0x6709=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x7096[_0x3b380d];return _0x54502b;};'use strict';var Sequelize=require('sequelize');module[_0x6709('0x0')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x6709('0x1')]},'username':{'type':Sequelize['STRING'],'unique':_0x6709('0x2')},'apiKey':{'type':Sequelize[_0x6709('0x1')]},'remoteUri':{'type':Sequelize[_0x6709('0x1')],'unique':_0x6709('0x3')},'serverUrl':{'type':Sequelize[_0x6709('0x1')],'allowNull':![]}};
\ No newline at end of file
+var _0x2032=['remoteUri','exports','STRING','username'];(function(_0x175113,_0x1119d7){var _0x510e3b=function(_0x14549d){while(--_0x14549d){_0x175113['push'](_0x175113['shift']());}};_0x510e3b(++_0x1119d7);}(_0x2032,0xd9));var _0x2203=function(_0x3371df,_0x3894b9){_0x3371df=_0x3371df-0x0;var _0x119a00=_0x2032[_0x3371df];return _0x119a00;};'use strict';var Sequelize=require('sequelize');module[_0x2203('0x0')]={'name':{'type':Sequelize[_0x2203('0x1')]},'description':{'type':Sequelize[_0x2203('0x1')]},'username':{'type':Sequelize['STRING'],'unique':_0x2203('0x2')},'apiKey':{'type':Sequelize[_0x2203('0x1')]},'remoteUri':{'type':Sequelize['STRING'],'unique':_0x2203('0x3')},'serverUrl':{'type':Sequelize[_0x2203('0x1')],'allowNull':![]}};
\ No newline at end of file
index 0628736..64d2e9d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x073e=['params','include','find','create','body','destroy','getConfigurations','findOne','FreshdeskConfiguration','order','addConfiguration','AccountId','Subjects','getSubjects','getDescriptions','channel','FreshdeskField','Descriptions','getFields','remoteUri','apiKey','slice','lastIndexOf','GET','format','%s/%s','api/v2/ticket_fields','%s:X','toString','requester','subject','priority','group','source','ticket_type','company','remove','default','custom_text','label','choices','capitalize','statusCode','stringify','test','Wrong\x20credentials','eml-format','rimraf','zip-dir','fast-json-patch','mustache','util','path','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','status','end','json','undefined','count','offset','set','Content-Range','apply','reject','update','then','sendStatus','error','name','send','map','FreshdeskAccount','rawAttributes','fieldName','type','query','keys','model','intersection','fields','length','attributes','hasOwnProperty','nolimit','limit','sort','filters','pick','where','VIRTUAL','filter','merge','options','includeAll','findAll','rows','catch'];(function(_0x4165d4,_0x2702b0){var _0x105d05=function(_0x68f53e){while(--_0x68f53e){_0x4165d4['push'](_0x4165d4['shift']());}};_0x105d05(++_0x2702b0);}(_0x073e,0x181));var _0xe073=function(_0x290550,_0x21b822){_0x290550=_0x290550-0x0;var _0x30c88c=_0x073e[_0x290550];return _0x30c88c;};'use strict';var emlformat=require(_0xe073('0x0'));var rimraf=require(_0xe073('0x1'));var zipdir=require(_0xe073('0x2'));var jsonpatch=require(_0xe073('0x3'));var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xe073('0x4'));var util=require(_0xe073('0x5'));var path=require(_0xe073('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xe073('0x7'));var _=require(_0xe073('0x8'));var squel=require(_0xe073('0x9'));var crypto=require(_0xe073('0xa'));var jsforce=require(_0xe073('0xb'));var deskjs=require(_0xe073('0xc'));var toCsv=require('to-csv');var querystring=require(_0xe073('0xd'));var Papa=require(_0xe073('0xe'));var Redis=require(_0xe073('0xf'));var authService=require(_0xe073('0x10'));var qs=require('../../components/parsers/qs');var as=require(_0xe073('0x11'));var hardwareService=require(_0xe073('0x12'));var logger=require(_0xe073('0x13'))(_0xe073('0x14'));var utils=require(_0xe073('0x15'));var config=require(_0xe073('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0xe073('0x17'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x3dedf7,_0x5d2f2f){_0x5d2f2f=_0x5d2f2f||0xcc;return function(_0x3549c4){if(_0x3549c4){return _0x3dedf7['sendStatus'](_0x5d2f2f);}return _0x3dedf7[_0xe073('0x18')](_0x5d2f2f)[_0xe073('0x19')]();};}function respondWithResult(_0x47828d,_0x2ce92d){_0x2ce92d=_0x2ce92d||0xc8;return function(_0x3fb05a){if(_0x3fb05a){return _0x47828d[_0xe073('0x18')](_0x2ce92d)[_0xe073('0x1a')](_0x3fb05a);}};}function respondWithFilteredResult(_0xfb28f5,_0x208f2e){return function(_0x26f3d3){if(_0x26f3d3){var _0x38f9e5=typeof _0x208f2e['offset']==='undefined'&&typeof _0x208f2e['limit']===_0xe073('0x1b');var _0x15488e=_0x26f3d3[_0xe073('0x1c')];var _0x16eaa6=_0x38f9e5?0x0:_0x208f2e['offset'];var _0x4fdd2c=_0x38f9e5?_0x26f3d3[_0xe073('0x1c')]:_0x208f2e[_0xe073('0x1d')]+_0x208f2e['limit'];var _0x21c02e;if(_0x4fdd2c>=_0x15488e){_0x4fdd2c=_0x15488e;_0x21c02e=0xc8;}else{_0x21c02e=0xce;}_0xfb28f5[_0xe073('0x18')](_0x21c02e);return _0xfb28f5[_0xe073('0x1e')](_0xe073('0x1f'),_0x16eaa6+'-'+_0x4fdd2c+'/'+_0x15488e)[_0xe073('0x1a')](_0x26f3d3);}return null;};}function patchUpdates(_0x17dd4b){return function(_0x41639a){try{jsonpatch[_0xe073('0x20')](_0x41639a,_0x17dd4b,!![]);}catch(_0xef9bf5){return BPromise[_0xe073('0x21')](_0xef9bf5);}return _0x41639a['save']();};}function saveUpdates(_0x4405fd,_0x21f9c2){return function(_0x419703){if(_0x419703){return _0x419703[_0xe073('0x22')](_0x4405fd)[_0xe073('0x23')](function(_0x275aa8){return _0x275aa8;});}return null;};}function removeEntity(_0x504c26,_0x4c76ef){return function(_0x42d112){if(_0x42d112){return _0x42d112['destroy']()['then'](function(){_0x504c26['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x54a38b,_0x50795f){return function(_0x23537f){if(!_0x23537f){_0x54a38b[_0xe073('0x24')](0x194);}return _0x23537f;};}function handleError(_0x5bd226,_0x1fca27){_0x1fca27=_0x1fca27||0x1f4;return function(_0x4548d8){logger[_0xe073('0x25')](_0x4548d8['stack']);if(_0x4548d8[_0xe073('0x26')]){delete _0x4548d8['name'];}_0x5bd226[_0xe073('0x18')](_0x1fca27)[_0xe073('0x27')](_0x4548d8);};}exports['index']=function(_0x5dfff9,_0x15adbb){var _0x859ed8={},_0x278fbb={},_0x2f1cd2={'count':0x0,'rows':[]};var _0x20fabe=_[_0xe073('0x28')](db[_0xe073('0x29')][_0xe073('0x2a')],function(_0x5c04fe){return{'name':_0x5c04fe[_0xe073('0x2b')],'type':_0x5c04fe[_0xe073('0x2c')]['key']};});_0x278fbb['model']=_[_0xe073('0x28')](_0x20fabe,'name');_0x278fbb[_0xe073('0x2d')]=_[_0xe073('0x2e')](_0x5dfff9[_0xe073('0x2d')]);_0x278fbb['filters']=_['intersection'](_0x278fbb[_0xe073('0x2f')],_0x278fbb[_0xe073('0x2d')]);_0x859ed8['attributes']=_[_0xe073('0x30')](_0x278fbb[_0xe073('0x2f')],qs[_0xe073('0x31')](_0x5dfff9['query'][_0xe073('0x31')]));_0x859ed8['attributes']=_0x859ed8['attributes'][_0xe073('0x32')]?_0x859ed8[_0xe073('0x33')]:_0x278fbb[_0xe073('0x2f')];if(!_0x5dfff9['query'][_0xe073('0x34')](_0xe073('0x35'))){_0x859ed8[_0xe073('0x36')]=qs['limit'](_0x5dfff9[_0xe073('0x2d')][_0xe073('0x36')]);_0x859ed8[_0xe073('0x1d')]=qs[_0xe073('0x1d')](_0x5dfff9[_0xe073('0x2d')][_0xe073('0x1d')]);}_0x859ed8['order']=qs[_0xe073('0x37')](_0x5dfff9[_0xe073('0x2d')][_0xe073('0x37')]);_0x859ed8['where']=qs[_0xe073('0x38')](_[_0xe073('0x39')](_0x5dfff9[_0xe073('0x2d')],_0x278fbb[_0xe073('0x38')]),_0x20fabe);if(_0x5dfff9[_0xe073('0x2d')]['filter']){_0x859ed8[_0xe073('0x3a')]=_['merge'](_0x859ed8[_0xe073('0x3a')],{'$or':_[_0xe073('0x28')](_0x20fabe,function(_0x469537){if(_0x469537[_0xe073('0x2c')]!==_0xe073('0x3b')){var _0x2e200c={};_0x2e200c[_0x469537[_0xe073('0x26')]]={'$like':'%'+_0x5dfff9[_0xe073('0x2d')][_0xe073('0x3c')]+'%'};return _0x2e200c;}})});}_0x859ed8=_[_0xe073('0x3d')]({},_0x859ed8,_0x5dfff9[_0xe073('0x3e')]);var _0x300ef8={'where':_0x859ed8[_0xe073('0x3a')]};return db['FreshdeskAccount'][_0xe073('0x1c')](_0x300ef8)['then'](function(_0x174207){_0x2f1cd2[_0xe073('0x1c')]=_0x174207;if(_0x5dfff9[_0xe073('0x2d')][_0xe073('0x3f')]){_0x859ed8['include']=[{'all':!![]}];}return db[_0xe073('0x29')][_0xe073('0x40')](_0x859ed8);})[_0xe073('0x23')](function(_0x3c44f1){_0x2f1cd2[_0xe073('0x41')]=_0x3c44f1;return _0x2f1cd2;})['then'](respondWithFilteredResult(_0x15adbb,_0x859ed8))[_0xe073('0x42')](handleError(_0x15adbb,null));};exports['show']=function(_0x764196,_0x2a8c57){var _0x125d1f={'raw':![],'where':{'id':_0x764196[_0xe073('0x43')]['id']}},_0x76ae2e={};_0x76ae2e[_0xe073('0x2f')]=_[_0xe073('0x2e')](db[_0xe073('0x29')][_0xe073('0x2a')]);_0x76ae2e[_0xe073('0x2d')]=_[_0xe073('0x2e')](_0x764196['query']);_0x76ae2e['filters']=_[_0xe073('0x30')](_0x76ae2e[_0xe073('0x2f')],_0x76ae2e[_0xe073('0x2d')]);_0x125d1f[_0xe073('0x33')]=_[_0xe073('0x30')](_0x76ae2e['model'],qs[_0xe073('0x31')](_0x764196[_0xe073('0x2d')][_0xe073('0x31')]));_0x125d1f[_0xe073('0x33')]=_0x125d1f[_0xe073('0x33')]['length']?_0x125d1f[_0xe073('0x33')]:_0x76ae2e['model'];if(_0x764196['query'][_0xe073('0x3f')]){_0x125d1f[_0xe073('0x44')]=[{'all':!![]}];}_0x125d1f=_['merge']({},_0x125d1f,_0x764196['options']);return db[_0xe073('0x29')][_0xe073('0x45')](_0x125d1f)[_0xe073('0x23')](handleEntityNotFound(_0x2a8c57,null))[_0xe073('0x23')](respondWithResult(_0x2a8c57,null))[_0xe073('0x42')](handleError(_0x2a8c57,null));};exports[_0xe073('0x46')]=function(_0x317159,_0x5c7c66){return db[_0xe073('0x29')]['create'](_0x317159[_0xe073('0x47')],{})[_0xe073('0x23')](respondWithResult(_0x5c7c66,0xc9))[_0xe073('0x42')](handleError(_0x5c7c66,null));};exports['update']=function(_0x4d5bcd,_0x20f918){if(_0x4d5bcd[_0xe073('0x47')]['id']){delete _0x4d5bcd[_0xe073('0x47')]['id'];}return db['FreshdeskAccount'][_0xe073('0x45')]({'where':{'id':_0x4d5bcd[_0xe073('0x43')]['id']}})[_0xe073('0x23')](handleEntityNotFound(_0x20f918,null))[_0xe073('0x23')](saveUpdates(_0x4d5bcd[_0xe073('0x47')],null))[_0xe073('0x23')](respondWithResult(_0x20f918,null))[_0xe073('0x42')](handleError(_0x20f918,null));};exports[_0xe073('0x48')]=function(_0x3238eb,_0x5626d4){return db[_0xe073('0x29')]['find']({'where':{'id':_0x3238eb[_0xe073('0x43')]['id']}})['then'](handleEntityNotFound(_0x5626d4,null))[_0xe073('0x23')](removeEntity(_0x5626d4,null))[_0xe073('0x42')](handleError(_0x5626d4,null));};exports[_0xe073('0x49')]=function(_0xc7ff7c,_0x527a35,_0x2a3d65){var _0x1090c4={};var _0x191005={};var _0x48a470;var _0x5503c2;return db[_0xe073('0x29')][_0xe073('0x4a')]({'where':{'id':_0xc7ff7c[_0xe073('0x43')]['id']}})[_0xe073('0x23')](handleEntityNotFound(_0x527a35,null))[_0xe073('0x23')](function(_0x5212d5){if(_0x5212d5){_0x48a470=_0x5212d5;_0x191005[_0xe073('0x2f')]=_[_0xe073('0x2e')](db[_0xe073('0x4b')][_0xe073('0x2a')]);_0x191005[_0xe073('0x2d')]=_[_0xe073('0x2e')](_0xc7ff7c[_0xe073('0x2d')]);_0x191005[_0xe073('0x38')]=_[_0xe073('0x30')](_0x191005[_0xe073('0x2f')],_0x191005['query']);_0x1090c4[_0xe073('0x33')]=_['intersection'](_0x191005['model'],qs[_0xe073('0x31')](_0xc7ff7c[_0xe073('0x2d')][_0xe073('0x31')]));_0x1090c4['attributes']=_0x1090c4[_0xe073('0x33')][_0xe073('0x32')]?_0x1090c4[_0xe073('0x33')]:_0x191005['model'];_0x1090c4[_0xe073('0x4c')]=qs['sort'](_0xc7ff7c[_0xe073('0x2d')][_0xe073('0x37')]);_0x1090c4[_0xe073('0x3a')]=qs[_0xe073('0x38')](_[_0xe073('0x39')](_0xc7ff7c[_0xe073('0x2d')],_0x191005[_0xe073('0x38')]));if(_0xc7ff7c[_0xe073('0x2d')][_0xe073('0x3c')]){_0x1090c4[_0xe073('0x3a')]=_[_0xe073('0x3d')](_0x1090c4[_0xe073('0x3a')],{'$or':_[_0xe073('0x28')](_0x1090c4[_0xe073('0x33')],function(_0x9a824b){var _0x1dff1e={};_0x1dff1e[_0x9a824b]={'$like':'%'+_0xc7ff7c[_0xe073('0x2d')][_0xe073('0x3c')]+'%'};return _0x1dff1e;})});}_0x1090c4=_[_0xe073('0x3d')]({},_0x1090c4,_0xc7ff7c[_0xe073('0x3e')]);return _0x48a470[_0xe073('0x49')](_0x1090c4);}})[_0xe073('0x23')](function(_0xce6a6d){if(_0xce6a6d){_0x5503c2=_0xce6a6d[_0xe073('0x32')];if(!_0xc7ff7c[_0xe073('0x2d')][_0xe073('0x34')]('nolimit')){_0x1090c4[_0xe073('0x36')]=qs[_0xe073('0x36')](_0xc7ff7c[_0xe073('0x2d')][_0xe073('0x36')]);_0x1090c4[_0xe073('0x1d')]=qs['offset'](_0xc7ff7c[_0xe073('0x2d')]['offset']);}return _0x48a470[_0xe073('0x49')](_0x1090c4);}})[_0xe073('0x23')](function(_0x1c941f){if(_0x1c941f){return _0x1c941f?{'count':_0x5503c2,'rows':_0x1c941f}:null;}})[_0xe073('0x23')](respondWithResult(_0x527a35,null))[_0xe073('0x42')](handleError(_0x527a35,null));};exports[_0xe073('0x4d')]=function(_0x5ada4e,_0x3ffd06,_0x5d05e1){if(_0x5ada4e[_0xe073('0x47')]['id']){delete _0x5ada4e['body']['id'];}return db[_0xe073('0x29')][_0xe073('0x4a')]({'where':{'id':_0x5ada4e[_0xe073('0x43')]['id']}})[_0xe073('0x23')](handleEntityNotFound(_0x3ffd06,null))[_0xe073('0x23')](function(_0x17db84){if(_0x17db84){_0x5ada4e[_0xe073('0x47')][_0xe073('0x4e')]=_0x17db84['id'];_0x5ada4e[_0xe073('0x47')][_0xe073('0x4f')]=integrations[_0xe073('0x50')](_0x5ada4e['body']['channel'],_0x5ada4e[_0xe073('0x47')][_0xe073('0x2c')]);_0x5ada4e['body']['Descriptions']=integrations[_0xe073('0x51')](_0x5ada4e[_0xe073('0x47')][_0xe073('0x52')],_0x5ada4e[_0xe073('0x47')][_0xe073('0x2c')]);return db['FreshdeskConfiguration'][_0xe073('0x46')](_0x5ada4e[_0xe073('0x47')],{'include':[{'model':db[_0xe073('0x53')],'as':_0xe073('0x4f')},{'model':db[_0xe073('0x53')],'as':_0xe073('0x54')}]});}return null;})[_0xe073('0x23')](respondWithResult(_0x3ffd06,null))[_0xe073('0x42')](handleError(_0x3ffd06,null));};exports[_0xe073('0x55')]=function(_0x35e2ae,_0x512cd5,_0x19a3e7){var _0x509fd5='';return db['FreshdeskAccount'][_0xe073('0x4a')]({'where':{'id':_0x35e2ae[_0xe073('0x43')]['id']},'attributes':['id',_0xe073('0x56'),_0xe073('0x57')]})[_0xe073('0x23')](handleEntityNotFound(_0x512cd5,null))[_0xe073('0x23')](function(_0x31a0e2){if(_0x31a0e2){_0x509fd5=_0x31a0e2[_0xe073('0x56')];var _0x1b4e7a=_0x509fd5[_0xe073('0x58')](-0x1);if(_0x1b4e7a==='/'){_0x509fd5=_0x509fd5['substring'](0x0,_0x509fd5[_0xe073('0x59')](_0x1b4e7a));}return rp({'method':_0xe073('0x5a'),'uri':util[_0xe073('0x5b')](_0xe073('0x5c'),_0x509fd5,_0xe073('0x5d')),'headers':{'Authorization':util['format']('Basic\x20%s',new Buffer(util[_0xe073('0x5b')](_0xe073('0x5e'),_0x31a0e2[_0xe073('0x57')]))[_0xe073('0x5f')]('base64'))},'json':!![]});}})['then'](function(_0x40a351){if(_0x40a351){var _0x164a8f=[_0xe073('0x60'),_0xe073('0x61'),'agent','description','status',_0xe073('0x62'),_0xe073('0x63'),_0xe073('0x64'),_0xe073('0x65'),_0xe073('0x63'),_0xe073('0x66')];_[_0xe073('0x67')](_0x40a351,function(_0x5bdb91){return _0x164a8f['includes'](_0x5bdb91[_0xe073('0x26')])||!_0x5bdb91[_0xe073('0x68')]&&_0x5bdb91[_0xe073('0x2c')]!==_0xe073('0x69')&&_0x5bdb91[_0xe073('0x2c')]!=='custom_dropdown';});return{'count':_0x40a351[_0xe073('0x32')],'rows':_['map'](_0x40a351,function(_0x5b6b21){return{'id':_0x5b6b21[_0xe073('0x26')],'name':_0x5b6b21[_0xe073('0x6a')],'custom':!_0x5b6b21[_0xe073('0x68')],'options':_0x5b6b21[_0xe073('0x6b')]?_['map'](_0x5b6b21['choices'],function(_0xb8b09f){return{'name':_[_0xe073('0x6c')](_0xb8b09f),'value':_0xb8b09f};}):[]};})};}})['then'](respondWithResult(_0x512cd5,null))[_0xe073('0x42')](function(_0x278717){var _0x624d5f=_0x35e2ae[_0xe073('0x2d')]['test']?0x1f4:_0x278717[_0xe073('0x6d')]||0x1f4;logger[_0xe073('0x25')]('getFields,\x20%s,\x20%s,\x20%s',_0xe073('0x55'),_0x624d5f,JSON[_0xe073('0x6e')](_0x278717));delete _0x278717['name'];if(_0x624d5f===0x191){_0x624d5f=0x190;}_0x512cd5[_0xe073('0x18')](_0x624d5f)[_0xe073('0x27')](_0x35e2ae[_0xe073('0x2d')][_0xe073('0x6f')]?{'message':_0xe073('0x70'),'statusCode':_0x278717['statusCode']}:_0x278717);});};
\ No newline at end of file
+var _0xa68c=['includeAll','findAll','rows','catch','params','include','create','body','destroy','getConfigurations','addConfiguration','findOne','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','FreshdeskConfiguration','FreshdeskField','remoteUri','GET','format','%s/%s','Basic\x20%s','%s:X','apiKey','toString','base64','requester','subject','agent','priority','source','ticket_type','group','company','remove','default','custom_text','label','choices','capitalize','test','getFields,\x20%s,\x20%s,\x20%s','stringify','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','sendStatus','end','offset','undefined','limit','count','status','Content-Range','json','reject','save','update','then','error','stack','name','send','index','map','FreshdeskAccount','rawAttributes','fieldName','type','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','options'];(function(_0xf71120,_0x25b7f9){var _0xbe2fd3=function(_0x1acbdd){while(--_0x1acbdd){_0xf71120['push'](_0xf71120['shift']());}};_0xbe2fd3(++_0x25b7f9);}(_0xa68c,0x187));var _0xca68=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0xa68c[_0x6c993a];return _0x27f547;};'use strict';var emlformat=require(_0xca68('0x0'));var rimraf=require(_0xca68('0x1'));var zipdir=require(_0xca68('0x2'));var jsonpatch=require(_0xca68('0x3'));var rp=require(_0xca68('0x4'));var moment=require(_0xca68('0x5'));var BPromise=require(_0xca68('0x6'));var Mustache=require(_0xca68('0x7'));var util=require(_0xca68('0x8'));var path=require('path');var sox=require('sox');var csv=require(_0xca68('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xca68('0xa'));var _=require(_0xca68('0xb'));var squel=require(_0xca68('0xc'));var crypto=require(_0xca68('0xd'));var jsforce=require(_0xca68('0xe'));var deskjs=require(_0xca68('0xf'));var toCsv=require(_0xca68('0x9'));var querystring=require(_0xca68('0x10'));var Papa=require(_0xca68('0x11'));var Redis=require(_0xca68('0x12'));var authService=require(_0xca68('0x13'));var qs=require(_0xca68('0x14'));var as=require(_0xca68('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xca68('0x16'));var utils=require(_0xca68('0x17'));var config=require(_0xca68('0x18'));var licenseUtil=require(_0xca68('0x19'));var db=require(_0xca68('0x1a'))['db'];var integrations=require(_0xca68('0x1b'));function respondWithStatusCode(_0x4cc845,_0x221af9){_0x221af9=_0x221af9||0xcc;return function(_0x109996){if(_0x109996){return _0x4cc845[_0xca68('0x1c')](_0x221af9);}return _0x4cc845['status'](_0x221af9)[_0xca68('0x1d')]();};}function respondWithResult(_0x4944db,_0x1eee82){_0x1eee82=_0x1eee82||0xc8;return function(_0x1d5ef1){if(_0x1d5ef1){return _0x4944db['status'](_0x1eee82)['json'](_0x1d5ef1);}};}function respondWithFilteredResult(_0x2cb440,_0x252712){return function(_0x38d443){if(_0x38d443){var _0xce1268=typeof _0x252712[_0xca68('0x1e')]===_0xca68('0x1f')&&typeof _0x252712[_0xca68('0x20')]===_0xca68('0x1f');var _0x180edb=_0x38d443[_0xca68('0x21')];var _0x9221a5=_0xce1268?0x0:_0x252712[_0xca68('0x1e')];var _0x30e34f=_0xce1268?_0x38d443[_0xca68('0x21')]:_0x252712[_0xca68('0x1e')]+_0x252712[_0xca68('0x20')];var _0x5d5ac3;if(_0x30e34f>=_0x180edb){_0x30e34f=_0x180edb;_0x5d5ac3=0xc8;}else{_0x5d5ac3=0xce;}_0x2cb440[_0xca68('0x22')](_0x5d5ac3);return _0x2cb440['set'](_0xca68('0x23'),_0x9221a5+'-'+_0x30e34f+'/'+_0x180edb)[_0xca68('0x24')](_0x38d443);}return null;};}function patchUpdates(_0x27b1a2){return function(_0x4aeac7){try{jsonpatch['apply'](_0x4aeac7,_0x27b1a2,!![]);}catch(_0x58855b){return BPromise[_0xca68('0x25')](_0x58855b);}return _0x4aeac7[_0xca68('0x26')]();};}function saveUpdates(_0x39f8ee,_0x441a4e){return function(_0x1efd64){if(_0x1efd64){return _0x1efd64[_0xca68('0x27')](_0x39f8ee)[_0xca68('0x28')](function(_0x5d1891){return _0x5d1891;});}return null;};}function removeEntity(_0x1b2f41,_0x26628c){return function(_0x17f0c7){if(_0x17f0c7){return _0x17f0c7['destroy']()['then'](function(){_0x1b2f41[_0xca68('0x22')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5d8279,_0x28b801){return function(_0x55af0b){if(!_0x55af0b){_0x5d8279[_0xca68('0x1c')](0x194);}return _0x55af0b;};}function handleError(_0x1ca374,_0x2ebfe0){_0x2ebfe0=_0x2ebfe0||0x1f4;return function(_0x4f059c){logger[_0xca68('0x29')](_0x4f059c[_0xca68('0x2a')]);if(_0x4f059c[_0xca68('0x2b')]){delete _0x4f059c[_0xca68('0x2b')];}_0x1ca374[_0xca68('0x22')](_0x2ebfe0)[_0xca68('0x2c')](_0x4f059c);};}exports[_0xca68('0x2d')]=function(_0x141aa2,_0x553469){var _0x51bd6f={},_0x44b5f3={},_0x5e0f3b={'count':0x0,'rows':[]};var _0x3b01df=_[_0xca68('0x2e')](db[_0xca68('0x2f')][_0xca68('0x30')],function(_0x438cf4){return{'name':_0x438cf4[_0xca68('0x31')],'type':_0x438cf4[_0xca68('0x32')]['key']};});_0x44b5f3[_0xca68('0x33')]=_[_0xca68('0x2e')](_0x3b01df,_0xca68('0x2b'));_0x44b5f3[_0xca68('0x34')]=_[_0xca68('0x35')](_0x141aa2[_0xca68('0x34')]);_0x44b5f3[_0xca68('0x36')]=_['intersection'](_0x44b5f3['model'],_0x44b5f3[_0xca68('0x34')]);_0x51bd6f[_0xca68('0x37')]=_[_0xca68('0x38')](_0x44b5f3[_0xca68('0x33')],qs[_0xca68('0x39')](_0x141aa2['query']['fields']));_0x51bd6f[_0xca68('0x37')]=_0x51bd6f[_0xca68('0x37')][_0xca68('0x3a')]?_0x51bd6f[_0xca68('0x37')]:_0x44b5f3[_0xca68('0x33')];if(!_0x141aa2[_0xca68('0x34')][_0xca68('0x3b')](_0xca68('0x3c'))){_0x51bd6f[_0xca68('0x20')]=qs[_0xca68('0x20')](_0x141aa2[_0xca68('0x34')]['limit']);_0x51bd6f[_0xca68('0x1e')]=qs[_0xca68('0x1e')](_0x141aa2[_0xca68('0x34')][_0xca68('0x1e')]);}_0x51bd6f[_0xca68('0x3d')]=qs[_0xca68('0x3e')](_0x141aa2['query'][_0xca68('0x3e')]);_0x51bd6f[_0xca68('0x3f')]=qs['filters'](_[_0xca68('0x40')](_0x141aa2['query'],_0x44b5f3[_0xca68('0x36')]),_0x3b01df);if(_0x141aa2[_0xca68('0x34')]['filter']){_0x51bd6f[_0xca68('0x3f')]=_[_0xca68('0x41')](_0x51bd6f[_0xca68('0x3f')],{'$or':_[_0xca68('0x2e')](_0x3b01df,function(_0x3132b0){if(_0x3132b0['type']!==_0xca68('0x42')){var _0x1ab056={};_0x1ab056[_0x3132b0['name']]={'$like':'%'+_0x141aa2[_0xca68('0x34')][_0xca68('0x43')]+'%'};return _0x1ab056;}})});}_0x51bd6f=_[_0xca68('0x41')]({},_0x51bd6f,_0x141aa2[_0xca68('0x44')]);var _0xc49648={'where':_0x51bd6f[_0xca68('0x3f')]};return db['FreshdeskAccount']['count'](_0xc49648)['then'](function(_0x802506){_0x5e0f3b['count']=_0x802506;if(_0x141aa2[_0xca68('0x34')][_0xca68('0x45')]){_0x51bd6f['include']=[{'all':!![]}];}return db[_0xca68('0x2f')][_0xca68('0x46')](_0x51bd6f);})[_0xca68('0x28')](function(_0x449f97){_0x5e0f3b[_0xca68('0x47')]=_0x449f97;return _0x5e0f3b;})[_0xca68('0x28')](respondWithFilteredResult(_0x553469,_0x51bd6f))[_0xca68('0x48')](handleError(_0x553469,null));};exports['show']=function(_0x5f105c,_0x3269aa){var _0xd1f72={'raw':![],'where':{'id':_0x5f105c[_0xca68('0x49')]['id']}},_0x512e2e={};_0x512e2e[_0xca68('0x33')]=_[_0xca68('0x35')](db['FreshdeskAccount'][_0xca68('0x30')]);_0x512e2e[_0xca68('0x34')]=_[_0xca68('0x35')](_0x5f105c['query']);_0x512e2e[_0xca68('0x36')]=_[_0xca68('0x38')](_0x512e2e[_0xca68('0x33')],_0x512e2e[_0xca68('0x34')]);_0xd1f72[_0xca68('0x37')]=_[_0xca68('0x38')](_0x512e2e['model'],qs[_0xca68('0x39')](_0x5f105c['query'][_0xca68('0x39')]));_0xd1f72['attributes']=_0xd1f72[_0xca68('0x37')][_0xca68('0x3a')]?_0xd1f72[_0xca68('0x37')]:_0x512e2e['model'];if(_0x5f105c[_0xca68('0x34')][_0xca68('0x45')]){_0xd1f72[_0xca68('0x4a')]=[{'all':!![]}];}_0xd1f72=_['merge']({},_0xd1f72,_0x5f105c[_0xca68('0x44')]);return db[_0xca68('0x2f')]['find'](_0xd1f72)['then'](handleEntityNotFound(_0x3269aa,null))['then'](respondWithResult(_0x3269aa,null))['catch'](handleError(_0x3269aa,null));};exports[_0xca68('0x4b')]=function(_0x1f3f96,_0x31219e){return db['FreshdeskAccount']['create'](_0x1f3f96[_0xca68('0x4c')],{})[_0xca68('0x28')](respondWithResult(_0x31219e,0xc9))[_0xca68('0x48')](handleError(_0x31219e,null));};exports[_0xca68('0x27')]=function(_0x40cef9,_0x20c6ea){if(_0x40cef9[_0xca68('0x4c')]['id']){delete _0x40cef9[_0xca68('0x4c')]['id'];}return db['FreshdeskAccount']['find']({'where':{'id':_0x40cef9[_0xca68('0x49')]['id']}})[_0xca68('0x28')](handleEntityNotFound(_0x20c6ea,null))['then'](saveUpdates(_0x40cef9['body'],null))[_0xca68('0x28')](respondWithResult(_0x20c6ea,null))['catch'](handleError(_0x20c6ea,null));};exports[_0xca68('0x4d')]=function(_0x4670ed,_0x5b2cff){return db['FreshdeskAccount']['find']({'where':{'id':_0x4670ed[_0xca68('0x49')]['id']}})[_0xca68('0x28')](handleEntityNotFound(_0x5b2cff,null))['then'](removeEntity(_0x5b2cff,null))[_0xca68('0x48')](handleError(_0x5b2cff,null));};exports[_0xca68('0x4e')]=function(_0x134736,_0x1c4d0a,_0x1b8867){var _0x414c62={};var _0x3713c6={};var _0xb13cd;var _0x10a31f;return db[_0xca68('0x2f')]['findOne']({'where':{'id':_0x134736[_0xca68('0x49')]['id']}})[_0xca68('0x28')](handleEntityNotFound(_0x1c4d0a,null))[_0xca68('0x28')](function(_0x2fa868){if(_0x2fa868){_0xb13cd=_0x2fa868;_0x3713c6[_0xca68('0x33')]=_[_0xca68('0x35')](db['FreshdeskConfiguration'][_0xca68('0x30')]);_0x3713c6[_0xca68('0x34')]=_[_0xca68('0x35')](_0x134736[_0xca68('0x34')]);_0x3713c6[_0xca68('0x36')]=_[_0xca68('0x38')](_0x3713c6['model'],_0x3713c6[_0xca68('0x34')]);_0x414c62[_0xca68('0x37')]=_['intersection'](_0x3713c6['model'],qs[_0xca68('0x39')](_0x134736[_0xca68('0x34')]['fields']));_0x414c62[_0xca68('0x37')]=_0x414c62[_0xca68('0x37')][_0xca68('0x3a')]?_0x414c62['attributes']:_0x3713c6['model'];_0x414c62[_0xca68('0x3d')]=qs[_0xca68('0x3e')](_0x134736['query'][_0xca68('0x3e')]);_0x414c62[_0xca68('0x3f')]=qs[_0xca68('0x36')](_[_0xca68('0x40')](_0x134736['query'],_0x3713c6['filters']));if(_0x134736[_0xca68('0x34')]['filter']){_0x414c62['where']=_['merge'](_0x414c62[_0xca68('0x3f')],{'$or':_[_0xca68('0x2e')](_0x414c62[_0xca68('0x37')],function(_0x35b592){var _0xc00d0d={};_0xc00d0d[_0x35b592]={'$like':'%'+_0x134736[_0xca68('0x34')][_0xca68('0x43')]+'%'};return _0xc00d0d;})});}_0x414c62=_['merge']({},_0x414c62,_0x134736[_0xca68('0x44')]);return _0xb13cd['getConfigurations'](_0x414c62);}})[_0xca68('0x28')](function(_0x12070f){if(_0x12070f){_0x10a31f=_0x12070f[_0xca68('0x3a')];if(!_0x134736[_0xca68('0x34')][_0xca68('0x3b')]('nolimit')){_0x414c62[_0xca68('0x20')]=qs['limit'](_0x134736[_0xca68('0x34')][_0xca68('0x20')]);_0x414c62[_0xca68('0x1e')]=qs['offset'](_0x134736['query'][_0xca68('0x1e')]);}return _0xb13cd[_0xca68('0x4e')](_0x414c62);}})[_0xca68('0x28')](function(_0x29afac){if(_0x29afac){return _0x29afac?{'count':_0x10a31f,'rows':_0x29afac}:null;}})[_0xca68('0x28')](respondWithResult(_0x1c4d0a,null))['catch'](handleError(_0x1c4d0a,null));};exports[_0xca68('0x4f')]=function(_0x11a4c7,_0x43a6a0,_0x705a0e){if(_0x11a4c7[_0xca68('0x4c')]['id']){delete _0x11a4c7[_0xca68('0x4c')]['id'];}return db[_0xca68('0x2f')][_0xca68('0x50')]({'where':{'id':_0x11a4c7[_0xca68('0x49')]['id']}})[_0xca68('0x28')](handleEntityNotFound(_0x43a6a0,null))['then'](function(_0x21f50e){if(_0x21f50e){_0x11a4c7[_0xca68('0x4c')][_0xca68('0x51')]=_0x21f50e['id'];_0x11a4c7['body'][_0xca68('0x52')]=integrations[_0xca68('0x53')](_0x11a4c7[_0xca68('0x4c')][_0xca68('0x54')],_0x11a4c7['body'][_0xca68('0x32')]);_0x11a4c7[_0xca68('0x4c')][_0xca68('0x55')]=integrations[_0xca68('0x56')](_0x11a4c7['body'][_0xca68('0x54')],_0x11a4c7[_0xca68('0x4c')][_0xca68('0x32')]);return db[_0xca68('0x57')]['create'](_0x11a4c7[_0xca68('0x4c')],{'include':[{'model':db[_0xca68('0x58')],'as':'Subjects'},{'model':db['FreshdeskField'],'as':_0xca68('0x55')}]});}return null;})[_0xca68('0x28')](respondWithResult(_0x43a6a0,null))[_0xca68('0x48')](handleError(_0x43a6a0,null));};exports['getFields']=function(_0x25ce17,_0x48678f,_0x411fe5){var _0x195a2f='';return db['FreshdeskAccount']['findOne']({'where':{'id':_0x25ce17[_0xca68('0x49')]['id']},'attributes':['id',_0xca68('0x59'),'apiKey']})[_0xca68('0x28')](handleEntityNotFound(_0x48678f,null))[_0xca68('0x28')](function(_0x645396){if(_0x645396){_0x195a2f=_0x645396[_0xca68('0x59')];var _0x200803=_0x195a2f['slice'](-0x1);if(_0x200803==='/'){_0x195a2f=_0x195a2f['substring'](0x0,_0x195a2f['lastIndexOf'](_0x200803));}return rp({'method':_0xca68('0x5a'),'uri':util[_0xca68('0x5b')](_0xca68('0x5c'),_0x195a2f,'api/v2/ticket_fields'),'headers':{'Authorization':util['format'](_0xca68('0x5d'),new Buffer(util['format'](_0xca68('0x5e'),_0x645396[_0xca68('0x5f')]))[_0xca68('0x60')](_0xca68('0x61')))},'json':!![]});}})[_0xca68('0x28')](function(_0x1ffa11){if(_0x1ffa11){var _0x280fcb=[_0xca68('0x62'),_0xca68('0x63'),_0xca68('0x64'),'description','status',_0xca68('0x65'),'group',_0xca68('0x66'),_0xca68('0x67'),_0xca68('0x68'),_0xca68('0x69')];_[_0xca68('0x6a')](_0x1ffa11,function(_0x2c0651){return _0x280fcb['includes'](_0x2c0651[_0xca68('0x2b')])||!_0x2c0651[_0xca68('0x6b')]&&_0x2c0651[_0xca68('0x32')]!==_0xca68('0x6c')&&_0x2c0651[_0xca68('0x32')]!=='custom_dropdown';});return{'count':_0x1ffa11[_0xca68('0x3a')],'rows':_[_0xca68('0x2e')](_0x1ffa11,function(_0x5bfb2a){return{'id':_0x5bfb2a['name'],'name':_0x5bfb2a[_0xca68('0x6d')],'custom':!_0x5bfb2a[_0xca68('0x6b')],'options':_0x5bfb2a[_0xca68('0x6e')]?_[_0xca68('0x2e')](_0x5bfb2a[_0xca68('0x6e')],function(_0x2b4679){return{'name':_[_0xca68('0x6f')](_0x2b4679),'value':_0x2b4679};}):[]};})};}})[_0xca68('0x28')](respondWithResult(_0x48678f,null))['catch'](function(_0x342093){var _0x4b515d=_0x25ce17[_0xca68('0x34')][_0xca68('0x70')]?0x1f4:_0x342093['statusCode']||0x1f4;logger[_0xca68('0x29')](_0xca68('0x71'),'getFields',_0x4b515d,JSON[_0xca68('0x72')](_0x342093));delete _0x342093['name'];if(_0x4b515d===0x191){_0x4b515d=0x190;}_0x48678f[_0xca68('0x22')](_0x4b515d)['send'](_0x25ce17['query'][_0xca68('0x70')]?{'message':'Wrong\x20credentials','statusCode':_0x342093['statusCode']}:_0x342093);});};
\ No newline at end of file
index 7e01f43..15c6b5b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xac1d=['int_freshdesk_accounts','util','../../config/logger','api','rimraf','./intFreshdeskAccount.attributes','exports','define','FreshdeskAccount'];(function(_0x52544a,_0x41e302){var _0x501ecf=function(_0x138fe3){while(--_0x138fe3){_0x52544a['push'](_0x52544a['shift']());}};_0x501ecf(++_0x41e302);}(_0xac1d,0x14e));var _0xdac1=function(_0x4146f2,_0x3e3f70){_0x4146f2=_0x4146f2-0x0;var _0x2ae924=_0xac1d[_0x4146f2];return _0x2ae924;};'use strict';var _=require('lodash');var util=require(_0xdac1('0x0'));var logger=require(_0xdac1('0x1'))(_0xdac1('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xdac1('0x3'));var config=require('../../config/environment');var attributes=require(_0xdac1('0x4'));var integrations=require('../../components/integrations/configuration');module[_0xdac1('0x5')]=function(_0x1b9855,_0x531a3e){return _0x1b9855[_0xdac1('0x6')](_0xdac1('0x7'),attributes,{'tableName':_0xdac1('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6a09=['lodash','request-promise','path','rimraf','../../config/environment','./intFreshdeskAccount.attributes','exports','define','int_freshdesk_accounts'];(function(_0x584291,_0x24b5b3){var _0x4e7d08=function(_0x59e0b1){while(--_0x59e0b1){_0x584291['push'](_0x584291['shift']());}};_0x4e7d08(++_0x24b5b3);}(_0x6a09,0xc6));var _0x96a0=function(_0x13023b,_0x51328e){_0x13023b=_0x13023b-0x0;var _0x458326=_0x6a09[_0x13023b];return _0x458326;};'use strict';var _=require(_0x96a0('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x96a0('0x1'));var fs=require('fs');var path=require(_0x96a0('0x2'));var rimraf=require(_0x96a0('0x3'));var config=require(_0x96a0('0x4'));var attributes=require(_0x96a0('0x5'));var integrations=require('../../components/integrations/configuration');module[_0x96a0('0x6')]=function(_0x3adde4,_0x486c60){return _0x3adde4[_0x96a0('0x7')]('FreshdeskAccount',attributes,{'tableName':_0x96a0('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 3b00b6d..736d346 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6c47=['include','model','debug','ShowFreshdeskAccount','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','then','info','FreshdeskAccount,\x20%s,\x20%s','request\x20sent','FreshdeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetFreshdeskAccount','FreshdeskAccount','findAll','options','raw','where','attributes','map'];(function(_0x5bd015,_0x4610d8){var _0x19356c=function(_0x4c4117){while(--_0x4c4117){_0x5bd015['push'](_0x5bd015['shift']());}};_0x19356c(++_0x4610d8);}(_0x6c47,0xae));var _0x76c4=function(_0xf78d55,_0x1904a1){_0xf78d55=_0xf78d55-0x0;var _0x5be011=_0x6c47[_0xf78d55];return _0x5be011;};'use strict';var _=require(_0x76c4('0x0'));var util=require(_0x76c4('0x1'));var moment=require('moment');var BPromise=require(_0x76c4('0x2'));var rs=require(_0x76c4('0x3'));var fs=require('fs');var Redis=require(_0x76c4('0x4'));var db=require(_0x76c4('0x5'))['db'];var utils=require(_0x76c4('0x6'));var logger=require('../../config/logger')(_0x76c4('0x7'));var config=require(_0x76c4('0x8'));var jayson=require(_0x76c4('0x9'));var client=jayson['client'][_0x76c4('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x12f0f1,_0x28ec58,_0x1aec6e){return new BPromise(function(_0x5ee361,_0x1dfaa2){return client['request'](_0x12f0f1,_0x1aec6e)[_0x76c4('0xb')](function(_0x5aa4ae){logger[_0x76c4('0xc')](_0x76c4('0xd'),_0x28ec58,_0x76c4('0xe'));logger['debug'](_0x76c4('0xf'),_0x28ec58,_0x76c4('0xe'),JSON[_0x76c4('0x10')](_0x5aa4ae));if(_0x5aa4ae[_0x76c4('0x11')]){if(_0x5aa4ae[_0x76c4('0x11')][_0x76c4('0x12')]===0x1f4){logger[_0x76c4('0x11')]('FreshdeskAccount,\x20%s,\x20%s',_0x28ec58,_0x5aa4ae[_0x76c4('0x11')][_0x76c4('0x13')]);return _0x1dfaa2(_0x5aa4ae[_0x76c4('0x11')]['message']);}logger[_0x76c4('0x11')](_0x76c4('0xd'),_0x28ec58,_0x5aa4ae[_0x76c4('0x11')][_0x76c4('0x13')]);return _0x5ee361(_0x5aa4ae['error'][_0x76c4('0x13')]);}else{logger[_0x76c4('0xc')](_0x76c4('0xd'),_0x28ec58,_0x76c4('0xe'));_0x5ee361(_0x5aa4ae[_0x76c4('0x14')]['message']);}})[_0x76c4('0x15')](function(_0x455734){logger[_0x76c4('0x11')](_0x76c4('0xd'),_0x28ec58,_0x455734);_0x1dfaa2(_0x455734);});});}exports[_0x76c4('0x16')]=function(_0x5445ed){var _0x53db23=this;return new Promise(function(_0xace765,_0x33054){return db[_0x76c4('0x17')][_0x76c4('0x18')]({'raw':_0x5445ed[_0x76c4('0x19')]?_0x5445ed[_0x76c4('0x19')][_0x76c4('0x1a')]===undefined?!![]:![]:!![],'where':_0x5445ed['options']?_0x5445ed['options'][_0x76c4('0x1b')]||null:null,'attributes':_0x5445ed[_0x76c4('0x19')]?_0x5445ed[_0x76c4('0x19')][_0x76c4('0x1c')]||null:null,'limit':_0x5445ed['options']?_0x5445ed[_0x76c4('0x19')]['limit']||null:null,'include':_0x5445ed[_0x76c4('0x19')]?_0x5445ed[_0x76c4('0x19')]['include']?_[_0x76c4('0x1d')](_0x5445ed[_0x76c4('0x19')][_0x76c4('0x1e')],function(_0x2529b6){return{'model':db[_0x2529b6[_0x76c4('0x1f')]],'as':_0x2529b6['as'],'attributes':_0x2529b6[_0x76c4('0x1c')],'include':_0x2529b6[_0x76c4('0x1e')]?_[_0x76c4('0x1d')](_0x2529b6['include'],function(_0x1357b4){return{'model':db[_0x1357b4[_0x76c4('0x1f')]],'as':_0x1357b4['as'],'attributes':_0x1357b4[_0x76c4('0x1c')],'include':_0x1357b4[_0x76c4('0x1e')]?_['map'](_0x1357b4[_0x76c4('0x1e')],function(_0x214908){return{'model':db[_0x214908['model']],'as':_0x214908['as'],'attributes':_0x214908[_0x76c4('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x3daf6e){logger[_0x76c4('0xc')](_0x76c4('0x16'),_0x5445ed);logger[_0x76c4('0x20')]('GetFreshdeskAccount',_0x5445ed,JSON[_0x76c4('0x10')](_0x3daf6e));_0xace765(_0x3daf6e);})[_0x76c4('0x15')](function(_0x3f5715){logger['error'](_0x76c4('0x16'),_0x3f5715[_0x76c4('0x13')],_0x5445ed);_0x33054(_0x53db23[_0x76c4('0x11')](0x1f4,_0x3f5715[_0x76c4('0x13')]));});});};exports[_0x76c4('0x21')]=function(_0x3e01d1){var _0x1c0198=this;return new Promise(function(_0x3deb9d,_0x2597bc){return db['FreshdeskAccount']['find']({'raw':_0x3e01d1[_0x76c4('0x19')]?_0x3e01d1['options'][_0x76c4('0x1a')]===undefined?!![]:![]:!![],'where':_0x3e01d1[_0x76c4('0x19')]?_0x3e01d1[_0x76c4('0x19')][_0x76c4('0x1b')]||null:null,'attributes':_0x3e01d1[_0x76c4('0x19')]?_0x3e01d1['options'][_0x76c4('0x1c')]||null:null,'include':_0x3e01d1[_0x76c4('0x19')]?_0x3e01d1[_0x76c4('0x19')][_0x76c4('0x1e')]?_['map'](_0x3e01d1[_0x76c4('0x19')][_0x76c4('0x1e')],function(_0x53a449){return{'model':db[_0x53a449[_0x76c4('0x1f')]],'as':_0x53a449['as'],'attributes':_0x53a449[_0x76c4('0x1c')],'include':_0x53a449[_0x76c4('0x1e')]?_['map'](_0x53a449[_0x76c4('0x1e')],function(_0x1b33c0){return{'model':db[_0x1b33c0[_0x76c4('0x1f')]],'as':_0x1b33c0['as'],'attributes':_0x1b33c0['attributes'],'include':_0x1b33c0[_0x76c4('0x1e')]?_[_0x76c4('0x1d')](_0x1b33c0['include'],function(_0xdd8a78){return{'model':db[_0xdd8a78[_0x76c4('0x1f')]],'as':_0xdd8a78['as'],'attributes':_0xdd8a78['attributes']};}):[]};}):[]};}):[]:[]})[_0x76c4('0xb')](function(_0x2b32e1){logger[_0x76c4('0xc')]('ShowFreshdeskAccount',_0x3e01d1);logger[_0x76c4('0x20')](_0x76c4('0x21'),_0x3e01d1,JSON[_0x76c4('0x10')](_0x2b32e1));_0x3deb9d(_0x2b32e1);})['catch'](function(_0x1d9859){logger[_0x76c4('0x11')]('ShowFreshdeskAccount',_0x1d9859['message'],_0x3e01d1);_0x2597bc(_0x1c0198[_0x76c4('0x11')](0x1f4,_0x1d9859[_0x76c4('0x13')]));});});};
\ No newline at end of file
+var _0x1093=['info','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','FreshdeskAccount,\x20%s,\x20%s','request\x20sent','debug','FreshdeskAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','FreshdeskAccount','findAll','options','where','attributes','limit','include','model','map','GetFreshdeskAccount','ShowFreshdeskAccount','find'];(function(_0x355692,_0x1ad1ac){var _0x270884=function(_0x5253b8){while(--_0x5253b8){_0x355692['push'](_0x355692['shift']());}};_0x270884(++_0x1ad1ac);}(_0x1093,0x1c8));var _0x3109=function(_0x34bc30,_0x177cb0){_0x34bc30=_0x34bc30-0x0;var _0x5706de=_0x1093[_0x34bc30];return _0x5706de;};'use strict';var _=require(_0x3109('0x0'));var util=require(_0x3109('0x1'));var moment=require(_0x3109('0x2'));var BPromise=require(_0x3109('0x3'));var rs=require(_0x3109('0x4'));var fs=require('fs');var Redis=require(_0x3109('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x3109('0x6'));var logger=require(_0x3109('0x7'))(_0x3109('0x8'));var config=require(_0x3109('0x9'));var jayson=require(_0x3109('0xa'));var client=jayson['client'][_0x3109('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x8b1e13,_0x2f7e68,_0x48a6f9){return new BPromise(function(_0x3a1543,_0x2fdb78){return client['request'](_0x8b1e13,_0x48a6f9)[_0x3109('0xc')](function(_0x39dc41){logger['info'](_0x3109('0xd'),_0x2f7e68,_0x3109('0xe'));logger[_0x3109('0xf')](_0x3109('0x10'),_0x2f7e68,'request\x20sent',JSON[_0x3109('0x11')](_0x39dc41));if(_0x39dc41[_0x3109('0x12')]){if(_0x39dc41[_0x3109('0x12')]['code']===0x1f4){logger[_0x3109('0x12')](_0x3109('0xd'),_0x2f7e68,_0x39dc41[_0x3109('0x12')][_0x3109('0x13')]);return _0x2fdb78(_0x39dc41[_0x3109('0x12')]['message']);}logger[_0x3109('0x12')](_0x3109('0xd'),_0x2f7e68,_0x39dc41[_0x3109('0x12')]['message']);return _0x3a1543(_0x39dc41[_0x3109('0x12')]['message']);}else{logger['info'](_0x3109('0xd'),_0x2f7e68,_0x3109('0xe'));_0x3a1543(_0x39dc41[_0x3109('0x14')][_0x3109('0x13')]);}})[_0x3109('0x15')](function(_0x1684fd){logger[_0x3109('0x12')]('FreshdeskAccount,\x20%s,\x20%s',_0x2f7e68,_0x1684fd);_0x2fdb78(_0x1684fd);});});}exports['GetFreshdeskAccount']=function(_0x4840a9){var _0x40af6c=this;return new Promise(function(_0x1e622e,_0x52f04d){return db[_0x3109('0x16')][_0x3109('0x17')]({'raw':_0x4840a9[_0x3109('0x18')]?_0x4840a9[_0x3109('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x4840a9[_0x3109('0x18')]?_0x4840a9['options'][_0x3109('0x19')]||null:null,'attributes':_0x4840a9['options']?_0x4840a9[_0x3109('0x18')][_0x3109('0x1a')]||null:null,'limit':_0x4840a9[_0x3109('0x18')]?_0x4840a9[_0x3109('0x18')][_0x3109('0x1b')]||null:null,'include':_0x4840a9[_0x3109('0x18')]?_0x4840a9[_0x3109('0x18')]['include']?_['map'](_0x4840a9[_0x3109('0x18')][_0x3109('0x1c')],function(_0x1831ce){return{'model':db[_0x1831ce[_0x3109('0x1d')]],'as':_0x1831ce['as'],'attributes':_0x1831ce['attributes'],'include':_0x1831ce[_0x3109('0x1c')]?_[_0x3109('0x1e')](_0x1831ce[_0x3109('0x1c')],function(_0x1d1717){return{'model':db[_0x1d1717[_0x3109('0x1d')]],'as':_0x1d1717['as'],'attributes':_0x1d1717[_0x3109('0x1a')],'include':_0x1d1717['include']?_[_0x3109('0x1e')](_0x1d1717[_0x3109('0x1c')],function(_0x435bd1){return{'model':db[_0x435bd1[_0x3109('0x1d')]],'as':_0x435bd1['as'],'attributes':_0x435bd1[_0x3109('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x3109('0xc')](function(_0x307c38){logger['info'](_0x3109('0x1f'),_0x4840a9);logger[_0x3109('0xf')](_0x3109('0x1f'),_0x4840a9,JSON[_0x3109('0x11')](_0x307c38));_0x1e622e(_0x307c38);})[_0x3109('0x15')](function(_0x1a9259){logger['error'](_0x3109('0x1f'),_0x1a9259[_0x3109('0x13')],_0x4840a9);_0x52f04d(_0x40af6c[_0x3109('0x12')](0x1f4,_0x1a9259[_0x3109('0x13')]));});});};exports[_0x3109('0x20')]=function(_0x1181b6){var _0xd5e08b=this;return new Promise(function(_0x396fec,_0x447ea1){return db['FreshdeskAccount'][_0x3109('0x21')]({'raw':_0x1181b6[_0x3109('0x18')]?_0x1181b6[_0x3109('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x1181b6[_0x3109('0x18')]?_0x1181b6[_0x3109('0x18')][_0x3109('0x19')]||null:null,'attributes':_0x1181b6[_0x3109('0x18')]?_0x1181b6['options'][_0x3109('0x1a')]||null:null,'include':_0x1181b6[_0x3109('0x18')]?_0x1181b6['options'][_0x3109('0x1c')]?_[_0x3109('0x1e')](_0x1181b6[_0x3109('0x18')][_0x3109('0x1c')],function(_0x1e7451){return{'model':db[_0x1e7451[_0x3109('0x1d')]],'as':_0x1e7451['as'],'attributes':_0x1e7451['attributes'],'include':_0x1e7451[_0x3109('0x1c')]?_[_0x3109('0x1e')](_0x1e7451[_0x3109('0x1c')],function(_0x2a971c){return{'model':db[_0x2a971c['model']],'as':_0x2a971c['as'],'attributes':_0x2a971c['attributes'],'include':_0x2a971c[_0x3109('0x1c')]?_[_0x3109('0x1e')](_0x2a971c[_0x3109('0x1c')],function(_0x176e38){return{'model':db[_0x176e38[_0x3109('0x1d')]],'as':_0x176e38['as'],'attributes':_0x176e38[_0x3109('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1c9e9b){logger[_0x3109('0x22')](_0x3109('0x20'),_0x1181b6);logger[_0x3109('0xf')]('ShowFreshdeskAccount',_0x1181b6,JSON[_0x3109('0x11')](_0x1c9e9b));_0x396fec(_0x1c9e9b);})[_0x3109('0x15')](function(_0x50e93f){logger[_0x3109('0x12')](_0x3109('0x20'),_0x50e93f[_0x3109('0x13')],_0x1181b6);_0x447ea1(_0xd5e08b[_0x3109('0x12')](0x1f4,_0x50e93f[_0x3109('0x13')]));});});};
\ No newline at end of file
index 286326d..6d42004 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb5f7=['index','/:id','show','get','/:id/fields','getFields','/:id/descriptions','getDescriptions','/:id/tags','getTags','post','setTags','put','update','delete','destroy','util','path','../../config/environment','./intFreshdeskConfiguration.controller','isAuthenticated'];(function(_0x2a00d6,_0x263a31){var _0x214cfa=function(_0x26868a){while(--_0x26868a){_0x2a00d6['push'](_0x2a00d6['shift']());}};_0x214cfa(++_0x263a31);}(_0xb5f7,0xcd));var _0x7b5f=function(_0x424208,_0x38ddb2){_0x424208=_0x424208-0x0;var _0x476725=_0xb5f7[_0x424208];return _0x476725;};'use strict';var multer=require('multer');var util=require(_0x7b5f('0x0'));var path=require(_0x7b5f('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x7b5f('0x2'));var controller=require(_0x7b5f('0x3'));router['get']('/',auth[_0x7b5f('0x4')](),controller[_0x7b5f('0x5')]);router['get'](_0x7b5f('0x6'),auth['isAuthenticated'](),controller[_0x7b5f('0x7')]);router[_0x7b5f('0x8')](_0x7b5f('0x9'),auth[_0x7b5f('0x4')](),controller[_0x7b5f('0xa')]);router[_0x7b5f('0x8')]('/:id/subjects',auth['isAuthenticated'](),controller['getSubjects']);router[_0x7b5f('0x8')](_0x7b5f('0xb'),auth['isAuthenticated'](),controller[_0x7b5f('0xc')]);router[_0x7b5f('0x8')](_0x7b5f('0xd'),auth['isAuthenticated'](),controller[_0x7b5f('0xe')]);router[_0x7b5f('0xf')]('/',auth['isAuthenticated'](),controller['create']);router[_0x7b5f('0xf')](_0x7b5f('0xd'),auth[_0x7b5f('0x4')](),controller[_0x7b5f('0x10')]);router[_0x7b5f('0x11')](_0x7b5f('0x6'),auth[_0x7b5f('0x4')](),controller[_0x7b5f('0x12')]);router[_0x7b5f('0x13')]('/:id',auth[_0x7b5f('0x4')](),controller[_0x7b5f('0x14')]);module['exports']=router;
\ No newline at end of file
+var _0x96f7=['isAuthenticated','show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','/:id/tags','getTags','create','post','put','update','delete','destroy','exports','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshdeskConfiguration.controller','get','index','/:id'];(function(_0x1db831,_0x42b7b5){var _0x39ba56=function(_0x2c2dd3){while(--_0x2c2dd3){_0x1db831['push'](_0x1db831['shift']());}};_0x39ba56(++_0x42b7b5);}(_0x96f7,0x1e1));var _0x796f=function(_0x32e77f,_0x14464d){_0x32e77f=_0x32e77f-0x0;var _0x47e651=_0x96f7[_0x32e77f];return _0x47e651;};'use strict';var multer=require(_0x796f('0x0'));var util=require(_0x796f('0x1'));var path=require('path');var timeout=require(_0x796f('0x2'));var express=require(_0x796f('0x3'));var router=express[_0x796f('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x796f('0x5'));var interaction=require(_0x796f('0x6'));var config=require(_0x796f('0x7'));var controller=require(_0x796f('0x8'));router[_0x796f('0x9')]('/',auth['isAuthenticated'](),controller[_0x796f('0xa')]);router[_0x796f('0x9')](_0x796f('0xb'),auth[_0x796f('0xc')](),controller[_0x796f('0xd')]);router[_0x796f('0x9')](_0x796f('0xe'),auth[_0x796f('0xc')](),controller[_0x796f('0xf')]);router['get'](_0x796f('0x10'),auth[_0x796f('0xc')](),controller[_0x796f('0x11')]);router[_0x796f('0x9')](_0x796f('0x12'),auth[_0x796f('0xc')](),controller[_0x796f('0x13')]);router[_0x796f('0x9')](_0x796f('0x14'),auth['isAuthenticated'](),controller[_0x796f('0x15')]);router['post']('/',auth[_0x796f('0xc')](),controller[_0x796f('0x16')]);router[_0x796f('0x17')]('/:id/tags',auth[_0x796f('0xc')](),controller['setTags']);router[_0x796f('0x18')]('/:id',auth[_0x796f('0xc')](),controller[_0x796f('0x19')]);router[_0x796f('0x1a')](_0x796f('0xb'),auth[_0x796f('0xc')](),controller[_0x796f('0x1b')]);module[_0x796f('0x1c')]=router;
\ No newline at end of file
index 853c72f..922d1e6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x756e=['exports','STRING','sequelize'];(function(_0xbcc6e1,_0x4c42f6){var _0x4985f9=function(_0x2f96ec){while(--_0x2f96ec){_0xbcc6e1['push'](_0xbcc6e1['shift']());}};_0x4985f9(++_0x4c42f6);}(_0x756e,0xe3));var _0xe756=function(_0x275853,_0x59eeb6){_0x275853=_0x275853-0x0;var _0x3ca91c=_0x756e[_0x275853];return _0x3ca91c;};'use strict';var Sequelize=require(_0xe756('0x0'));module[_0xe756('0x1')]={'name':{'type':Sequelize[_0xe756('0x2')]},'description':{'type':Sequelize[_0xe756('0x2')]}};
\ No newline at end of file
+var _0x296d=['exports','STRING','sequelize'];(function(_0x805404,_0x18cb52){var _0x3b7050=function(_0x2bd1a2){while(--_0x2bd1a2){_0x805404['push'](_0x805404['shift']());}};_0x3b7050(++_0x18cb52);}(_0x296d,0xc8));var _0xd296=function(_0x52a592,_0x2926b4){_0x52a592=_0x52a592-0x0;var _0x511e55=_0x296d[_0x52a592];return _0x511e55;};'use strict';var Sequelize=require(_0xd296('0x0'));module[_0xd296('0x1')]={'name':{'type':Sequelize[_0xd296('0x2')]},'description':{'type':Sequelize[_0xd296('0x2')]}};
\ No newline at end of file
index 0c5c2bb..7487078 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc4c4=['map','FreshdeskConfiguration','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','intersection','fields','length','nolimit','order','sort','pick','filter','where','VIRTUAL','merge','includeAll','include','rows','catch','show','params','options','find','create','body','getFields','findOne','FreshdeskField','hasOwnProperty','getSubjects','getDescriptions','getTags','Tag','setTags','ids','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','util','path','ejs','lodash','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','offset','undefined','limit','count','set','Content-Range','json','update','then','destroy','error','stack','name','send','index'];(function(_0x349148,_0x31eabb){var _0x2f2b0f=function(_0x44726e){while(--_0x44726e){_0x349148['push'](_0x349148['shift']());}};_0x2f2b0f(++_0x31eabb);}(_0xc4c4,0xd0));var _0x4c4c=function(_0x1d80be,_0x3a60ff){_0x1d80be=_0x1d80be-0x0;var _0xf9a4f3=_0xc4c4[_0x1d80be];return _0xf9a4f3;};'use strict';var emlformat=require(_0x4c4c('0x0'));var rimraf=require(_0x4c4c('0x1'));var zipdir=require(_0x4c4c('0x2'));var jsonpatch=require(_0x4c4c('0x3'));var rp=require('request-promise');var moment=require(_0x4c4c('0x4'));var BPromise=require(_0x4c4c('0x5'));var Mustache=require('mustache');var util=require(_0x4c4c('0x6'));var path=require(_0x4c4c('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x4c4c('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x4c4c('0x9'));var squel=require('squel');var crypto=require(_0x4c4c('0xa'));var jsforce=require('jsforce');var deskjs=require(_0x4c4c('0xb'));var toCsv=require('to-csv');var querystring=require(_0x4c4c('0xc'));var Papa=require(_0x4c4c('0xd'));var Redis=require('ioredis');var authService=require(_0x4c4c('0xe'));var qs=require(_0x4c4c('0xf'));var as=require(_0x4c4c('0x10'));var hardwareService=require(_0x4c4c('0x11'));var logger=require(_0x4c4c('0x12'))(_0x4c4c('0x13'));var utils=require(_0x4c4c('0x14'));var config=require(_0x4c4c('0x15'));var licenseUtil=require(_0x4c4c('0x16'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4bd569,_0x2b4dcf){_0x2b4dcf=_0x2b4dcf||0xcc;return function(_0x10d67a){if(_0x10d67a){return _0x4bd569[_0x4c4c('0x17')](_0x2b4dcf);}return _0x4bd569[_0x4c4c('0x18')](_0x2b4dcf)[_0x4c4c('0x19')]();};}function respondWithResult(_0x41a8be,_0x5c72d6){_0x5c72d6=_0x5c72d6||0xc8;return function(_0x296298){if(_0x296298){return _0x41a8be[_0x4c4c('0x18')](_0x5c72d6)['json'](_0x296298);}};}function respondWithFilteredResult(_0x230b4c,_0x4d6d6d){return function(_0x4f9b5d){if(_0x4f9b5d){var _0x42ad76=typeof _0x4d6d6d[_0x4c4c('0x1a')]===_0x4c4c('0x1b')&&typeof _0x4d6d6d[_0x4c4c('0x1c')]===_0x4c4c('0x1b');var _0x2a69b0=_0x4f9b5d[_0x4c4c('0x1d')];var _0x3b2b82=_0x42ad76?0x0:_0x4d6d6d[_0x4c4c('0x1a')];var _0x5d6f3f=_0x42ad76?_0x4f9b5d[_0x4c4c('0x1d')]:_0x4d6d6d[_0x4c4c('0x1a')]+_0x4d6d6d[_0x4c4c('0x1c')];var _0x138c7b;if(_0x5d6f3f>=_0x2a69b0){_0x5d6f3f=_0x2a69b0;_0x138c7b=0xc8;}else{_0x138c7b=0xce;}_0x230b4c[_0x4c4c('0x18')](_0x138c7b);return _0x230b4c[_0x4c4c('0x1e')](_0x4c4c('0x1f'),_0x3b2b82+'-'+_0x5d6f3f+'/'+_0x2a69b0)[_0x4c4c('0x20')](_0x4f9b5d);}return null;};}function patchUpdates(_0x144ad4){return function(_0x44633b){try{jsonpatch['apply'](_0x44633b,_0x144ad4,!![]);}catch(_0x3d0d5d){return BPromise['reject'](_0x3d0d5d);}return _0x44633b['save']();};}function saveUpdates(_0x1d865e,_0x1d868b){return function(_0x566d7f){if(_0x566d7f){return _0x566d7f[_0x4c4c('0x21')](_0x1d865e)[_0x4c4c('0x22')](function(_0x5059df){return _0x5059df;});}return null;};}function removeEntity(_0x57f0c6,_0x36fc6a){return function(_0x43bd9f){if(_0x43bd9f){return _0x43bd9f[_0x4c4c('0x23')]()[_0x4c4c('0x22')](function(){_0x57f0c6[_0x4c4c('0x18')](0xcc)[_0x4c4c('0x19')]();});}};}function handleEntityNotFound(_0x545f38,_0x94b325){return function(_0x1f3723){if(!_0x1f3723){_0x545f38[_0x4c4c('0x17')](0x194);}return _0x1f3723;};}function handleError(_0x1a9255,_0x31c9f4){_0x31c9f4=_0x31c9f4||0x1f4;return function(_0x2f5f3e){logger[_0x4c4c('0x24')](_0x2f5f3e[_0x4c4c('0x25')]);if(_0x2f5f3e[_0x4c4c('0x26')]){delete _0x2f5f3e[_0x4c4c('0x26')];}_0x1a9255[_0x4c4c('0x18')](_0x31c9f4)[_0x4c4c('0x27')](_0x2f5f3e);};}exports[_0x4c4c('0x28')]=function(_0x5fa41f,_0x643028){var _0x197364={},_0x18553b={},_0x152a8c={'count':0x0,'rows':[]};var _0x322348=_[_0x4c4c('0x29')](db[_0x4c4c('0x2a')][_0x4c4c('0x2b')],function(_0x3c41bb){return{'name':_0x3c41bb[_0x4c4c('0x2c')],'type':_0x3c41bb[_0x4c4c('0x2d')][_0x4c4c('0x2e')]};});_0x18553b[_0x4c4c('0x2f')]=_[_0x4c4c('0x29')](_0x322348,_0x4c4c('0x26'));_0x18553b[_0x4c4c('0x30')]=_[_0x4c4c('0x31')](_0x5fa41f[_0x4c4c('0x30')]);_0x18553b[_0x4c4c('0x32')]=_['intersection'](_0x18553b[_0x4c4c('0x2f')],_0x18553b[_0x4c4c('0x30')]);_0x197364[_0x4c4c('0x33')]=_[_0x4c4c('0x34')](_0x18553b[_0x4c4c('0x2f')],qs[_0x4c4c('0x35')](_0x5fa41f['query'][_0x4c4c('0x35')]));_0x197364[_0x4c4c('0x33')]=_0x197364['attributes'][_0x4c4c('0x36')]?_0x197364['attributes']:_0x18553b[_0x4c4c('0x2f')];if(!_0x5fa41f['query']['hasOwnProperty'](_0x4c4c('0x37'))){_0x197364[_0x4c4c('0x1c')]=qs[_0x4c4c('0x1c')](_0x5fa41f['query']['limit']);_0x197364[_0x4c4c('0x1a')]=qs[_0x4c4c('0x1a')](_0x5fa41f[_0x4c4c('0x30')][_0x4c4c('0x1a')]);}_0x197364[_0x4c4c('0x38')]=qs[_0x4c4c('0x39')](_0x5fa41f[_0x4c4c('0x30')][_0x4c4c('0x39')]);_0x197364['where']=qs[_0x4c4c('0x32')](_[_0x4c4c('0x3a')](_0x5fa41f[_0x4c4c('0x30')],_0x18553b['filters']),_0x322348);if(_0x5fa41f['query'][_0x4c4c('0x3b')]){_0x197364[_0x4c4c('0x3c')]=_['merge'](_0x197364[_0x4c4c('0x3c')],{'$or':_[_0x4c4c('0x29')](_0x322348,function(_0x3533ff){if(_0x3533ff[_0x4c4c('0x2d')]!==_0x4c4c('0x3d')){var _0x1dae8b={};_0x1dae8b[_0x3533ff['name']]={'$like':'%'+_0x5fa41f[_0x4c4c('0x30')]['filter']+'%'};return _0x1dae8b;}})});}_0x197364=_[_0x4c4c('0x3e')]({},_0x197364,_0x5fa41f['options']);var _0x67bf74={'where':_0x197364['where']};return db['FreshdeskConfiguration']['count'](_0x67bf74)[_0x4c4c('0x22')](function(_0x33a332){_0x152a8c['count']=_0x33a332;if(_0x5fa41f[_0x4c4c('0x30')][_0x4c4c('0x3f')]){_0x197364[_0x4c4c('0x40')]=[{'all':!![]}];}return db[_0x4c4c('0x2a')]['findAll'](_0x197364);})[_0x4c4c('0x22')](function(_0x8dc62e){_0x152a8c[_0x4c4c('0x41')]=_0x8dc62e;return _0x152a8c;})[_0x4c4c('0x22')](respondWithFilteredResult(_0x643028,_0x197364))[_0x4c4c('0x42')](handleError(_0x643028,null));};exports[_0x4c4c('0x43')]=function(_0x1ad964,_0x17ad2e){var _0x2246db={'raw':![],'where':{'id':_0x1ad964[_0x4c4c('0x44')]['id']}},_0xd354a0={};_0xd354a0[_0x4c4c('0x2f')]=_[_0x4c4c('0x31')](db['FreshdeskConfiguration']['rawAttributes']);_0xd354a0['query']=_['keys'](_0x1ad964['query']);_0xd354a0[_0x4c4c('0x32')]=_[_0x4c4c('0x34')](_0xd354a0[_0x4c4c('0x2f')],_0xd354a0[_0x4c4c('0x30')]);_0x2246db[_0x4c4c('0x33')]=_['intersection'](_0xd354a0[_0x4c4c('0x2f')],qs[_0x4c4c('0x35')](_0x1ad964['query'][_0x4c4c('0x35')]));_0x2246db[_0x4c4c('0x33')]=_0x2246db[_0x4c4c('0x33')]['length']?_0x2246db[_0x4c4c('0x33')]:_0xd354a0[_0x4c4c('0x2f')];if(_0x1ad964[_0x4c4c('0x30')][_0x4c4c('0x3f')]){_0x2246db[_0x4c4c('0x40')]=[{'all':!![]}];}_0x2246db=_[_0x4c4c('0x3e')]({},_0x2246db,_0x1ad964[_0x4c4c('0x45')]);return db[_0x4c4c('0x2a')][_0x4c4c('0x46')](_0x2246db)[_0x4c4c('0x22')](handleEntityNotFound(_0x17ad2e,null))[_0x4c4c('0x22')](respondWithResult(_0x17ad2e,null))['catch'](handleError(_0x17ad2e,null));};exports[_0x4c4c('0x47')]=function(_0x3c762a,_0x39156e){return db['FreshdeskConfiguration'][_0x4c4c('0x47')](_0x3c762a['body'],{})[_0x4c4c('0x22')](respondWithResult(_0x39156e,0xc9))[_0x4c4c('0x42')](handleError(_0x39156e,null));};exports[_0x4c4c('0x21')]=function(_0x36bad3,_0x4d3421){if(_0x36bad3['body']['id']){delete _0x36bad3[_0x4c4c('0x48')]['id'];}return db[_0x4c4c('0x2a')][_0x4c4c('0x46')]({'where':{'id':_0x36bad3[_0x4c4c('0x44')]['id']}})['then'](handleEntityNotFound(_0x4d3421,null))['then'](saveUpdates(_0x36bad3[_0x4c4c('0x48')],null))[_0x4c4c('0x22')](respondWithResult(_0x4d3421,null))[_0x4c4c('0x42')](handleError(_0x4d3421,null));};exports[_0x4c4c('0x23')]=function(_0x89fac5,_0x584ee7){return db['FreshdeskConfiguration']['find']({'where':{'id':_0x89fac5[_0x4c4c('0x44')]['id']}})[_0x4c4c('0x22')](handleEntityNotFound(_0x584ee7,null))[_0x4c4c('0x22')](removeEntity(_0x584ee7,null))['catch'](handleError(_0x584ee7,null));};exports[_0x4c4c('0x49')]=function(_0x1e6424,_0x38e2a0,_0x3adac8){var _0x1fdfcb={};var _0x6221b0={};var _0x5081a7;var _0x3c221e;return db[_0x4c4c('0x2a')][_0x4c4c('0x4a')]({'where':{'id':_0x1e6424[_0x4c4c('0x44')]['id']}})['then'](handleEntityNotFound(_0x38e2a0,null))[_0x4c4c('0x22')](function(_0x3a086c){if(_0x3a086c){_0x5081a7=_0x3a086c;_0x6221b0[_0x4c4c('0x2f')]=_[_0x4c4c('0x31')](db[_0x4c4c('0x4b')][_0x4c4c('0x2b')]);_0x6221b0[_0x4c4c('0x30')]=_[_0x4c4c('0x31')](_0x1e6424['query']);_0x6221b0['filters']=_[_0x4c4c('0x34')](_0x6221b0[_0x4c4c('0x2f')],_0x6221b0[_0x4c4c('0x30')]);_0x1fdfcb[_0x4c4c('0x33')]=_['intersection'](_0x6221b0['model'],qs['fields'](_0x1e6424[_0x4c4c('0x30')][_0x4c4c('0x35')]));_0x1fdfcb[_0x4c4c('0x33')]=_0x1fdfcb[_0x4c4c('0x33')][_0x4c4c('0x36')]?_0x1fdfcb['attributes']:_0x6221b0[_0x4c4c('0x2f')];_0x1fdfcb[_0x4c4c('0x38')]=qs[_0x4c4c('0x39')](_0x1e6424[_0x4c4c('0x30')][_0x4c4c('0x39')]);_0x1fdfcb[_0x4c4c('0x3c')]=qs[_0x4c4c('0x32')](_[_0x4c4c('0x3a')](_0x1e6424['query'],_0x6221b0['filters']));if(_0x1e6424[_0x4c4c('0x30')][_0x4c4c('0x3b')]){_0x1fdfcb['where']=_[_0x4c4c('0x3e')](_0x1fdfcb['where'],{'$or':_[_0x4c4c('0x29')](_0x1fdfcb[_0x4c4c('0x33')],function(_0x6361aa){var _0x15440e={};_0x15440e[_0x6361aa]={'$like':'%'+_0x1e6424[_0x4c4c('0x30')][_0x4c4c('0x3b')]+'%'};return _0x15440e;})});}_0x1fdfcb=_[_0x4c4c('0x3e')]({},_0x1fdfcb,_0x1e6424['options']);return _0x5081a7[_0x4c4c('0x49')](_0x1fdfcb);}})['then'](function(_0x106cb5){if(_0x106cb5){_0x3c221e=_0x106cb5['length'];if(!_0x1e6424[_0x4c4c('0x30')][_0x4c4c('0x4c')](_0x4c4c('0x37'))){_0x1fdfcb[_0x4c4c('0x1c')]=qs[_0x4c4c('0x1c')](_0x1e6424[_0x4c4c('0x30')][_0x4c4c('0x1c')]);_0x1fdfcb[_0x4c4c('0x1a')]=qs[_0x4c4c('0x1a')](_0x1e6424[_0x4c4c('0x30')][_0x4c4c('0x1a')]);}return _0x5081a7[_0x4c4c('0x49')](_0x1fdfcb);}})[_0x4c4c('0x22')](function(_0x352db0){if(_0x352db0){return _0x352db0?{'count':_0x3c221e,'rows':_0x352db0}:null;}})['then'](respondWithResult(_0x38e2a0,null))[_0x4c4c('0x42')](handleError(_0x38e2a0,null));};exports[_0x4c4c('0x4d')]=function(_0x58425f,_0x5ba89f,_0x5dad62){var _0xc6c804={};var _0x239040={};var _0xcf57ad;var _0x306ca2;return db[_0x4c4c('0x2a')][_0x4c4c('0x4a')]({'where':{'id':_0x58425f['params']['id']}})[_0x4c4c('0x22')](handleEntityNotFound(_0x5ba89f,null))[_0x4c4c('0x22')](function(_0x17dd4c){if(_0x17dd4c){_0xcf57ad=_0x17dd4c;_0x239040[_0x4c4c('0x2f')]=_[_0x4c4c('0x31')](db[_0x4c4c('0x4b')][_0x4c4c('0x2b')]);_0x239040[_0x4c4c('0x30')]=_[_0x4c4c('0x31')](_0x58425f[_0x4c4c('0x30')]);_0x239040['filters']=_[_0x4c4c('0x34')](_0x239040[_0x4c4c('0x2f')],_0x239040[_0x4c4c('0x30')]);_0xc6c804[_0x4c4c('0x33')]=_[_0x4c4c('0x34')](_0x239040[_0x4c4c('0x2f')],qs[_0x4c4c('0x35')](_0x58425f[_0x4c4c('0x30')]['fields']));_0xc6c804[_0x4c4c('0x33')]=_0xc6c804['attributes'][_0x4c4c('0x36')]?_0xc6c804['attributes']:_0x239040[_0x4c4c('0x2f')];_0xc6c804[_0x4c4c('0x38')]=qs['sort'](_0x58425f[_0x4c4c('0x30')]['sort']);_0xc6c804[_0x4c4c('0x3c')]=qs[_0x4c4c('0x32')](_[_0x4c4c('0x3a')](_0x58425f[_0x4c4c('0x30')],_0x239040[_0x4c4c('0x32')]));if(_0x58425f[_0x4c4c('0x30')][_0x4c4c('0x3b')]){_0xc6c804['where']=_[_0x4c4c('0x3e')](_0xc6c804[_0x4c4c('0x3c')],{'$or':_[_0x4c4c('0x29')](_0xc6c804['attributes'],function(_0x2233dc){var _0x375981={};_0x375981[_0x2233dc]={'$like':'%'+_0x58425f[_0x4c4c('0x30')][_0x4c4c('0x3b')]+'%'};return _0x375981;})});}_0xc6c804=_[_0x4c4c('0x3e')]({},_0xc6c804,_0x58425f['options']);return _0xcf57ad[_0x4c4c('0x4d')](_0xc6c804);}})['then'](function(_0x921a7c){if(_0x921a7c){_0x306ca2=_0x921a7c[_0x4c4c('0x36')];if(!_0x58425f[_0x4c4c('0x30')][_0x4c4c('0x4c')](_0x4c4c('0x37'))){_0xc6c804[_0x4c4c('0x1c')]=qs[_0x4c4c('0x1c')](_0x58425f[_0x4c4c('0x30')][_0x4c4c('0x1c')]);_0xc6c804[_0x4c4c('0x1a')]=qs[_0x4c4c('0x1a')](_0x58425f[_0x4c4c('0x30')][_0x4c4c('0x1a')]);}return _0xcf57ad[_0x4c4c('0x4d')](_0xc6c804);}})[_0x4c4c('0x22')](function(_0x4b6ccc){if(_0x4b6ccc){return _0x4b6ccc?{'count':_0x306ca2,'rows':_0x4b6ccc}:null;}})['then'](respondWithResult(_0x5ba89f,null))[_0x4c4c('0x42')](handleError(_0x5ba89f,null));};exports[_0x4c4c('0x4e')]=function(_0x24c0d9,_0x687cb1,_0x59547f){var _0x2f1b39={};var _0x463498={};var _0x2d4215;var _0x2d828f;return db['FreshdeskConfiguration'][_0x4c4c('0x4a')]({'where':{'id':_0x24c0d9[_0x4c4c('0x44')]['id']}})[_0x4c4c('0x22')](handleEntityNotFound(_0x687cb1,null))['then'](function(_0x157d01){if(_0x157d01){_0x2d4215=_0x157d01;_0x463498[_0x4c4c('0x2f')]=_[_0x4c4c('0x31')](db[_0x4c4c('0x4b')][_0x4c4c('0x2b')]);_0x463498[_0x4c4c('0x30')]=_[_0x4c4c('0x31')](_0x24c0d9['query']);_0x463498[_0x4c4c('0x32')]=_['intersection'](_0x463498[_0x4c4c('0x2f')],_0x463498['query']);_0x2f1b39[_0x4c4c('0x33')]=_[_0x4c4c('0x34')](_0x463498[_0x4c4c('0x2f')],qs[_0x4c4c('0x35')](_0x24c0d9[_0x4c4c('0x30')][_0x4c4c('0x35')]));_0x2f1b39[_0x4c4c('0x33')]=_0x2f1b39[_0x4c4c('0x33')][_0x4c4c('0x36')]?_0x2f1b39[_0x4c4c('0x33')]:_0x463498[_0x4c4c('0x2f')];_0x2f1b39[_0x4c4c('0x38')]=qs[_0x4c4c('0x39')](_0x24c0d9[_0x4c4c('0x30')][_0x4c4c('0x39')]);_0x2f1b39[_0x4c4c('0x3c')]=qs[_0x4c4c('0x32')](_[_0x4c4c('0x3a')](_0x24c0d9[_0x4c4c('0x30')],_0x463498[_0x4c4c('0x32')]));if(_0x24c0d9[_0x4c4c('0x30')][_0x4c4c('0x3b')]){_0x2f1b39[_0x4c4c('0x3c')]=_[_0x4c4c('0x3e')](_0x2f1b39[_0x4c4c('0x3c')],{'$or':_[_0x4c4c('0x29')](_0x2f1b39[_0x4c4c('0x33')],function(_0x5b95fa){var _0x556daf={};_0x556daf[_0x5b95fa]={'$like':'%'+_0x24c0d9[_0x4c4c('0x30')][_0x4c4c('0x3b')]+'%'};return _0x556daf;})});}_0x2f1b39=_[_0x4c4c('0x3e')]({},_0x2f1b39,_0x24c0d9[_0x4c4c('0x45')]);return _0x2d4215[_0x4c4c('0x4e')](_0x2f1b39);}})['then'](function(_0x26170f){if(_0x26170f){_0x2d828f=_0x26170f[_0x4c4c('0x36')];if(!_0x24c0d9[_0x4c4c('0x30')][_0x4c4c('0x4c')](_0x4c4c('0x37'))){_0x2f1b39[_0x4c4c('0x1c')]=qs[_0x4c4c('0x1c')](_0x24c0d9[_0x4c4c('0x30')][_0x4c4c('0x1c')]);_0x2f1b39[_0x4c4c('0x1a')]=qs['offset'](_0x24c0d9[_0x4c4c('0x30')][_0x4c4c('0x1a')]);}return _0x2d4215[_0x4c4c('0x4e')](_0x2f1b39);}})['then'](function(_0x1de9ff){if(_0x1de9ff){return _0x1de9ff?{'count':_0x2d828f,'rows':_0x1de9ff}:null;}})[_0x4c4c('0x22')](respondWithResult(_0x687cb1,null))['catch'](handleError(_0x687cb1,null));};exports[_0x4c4c('0x4f')]=function(_0x54b9e7,_0x55a230,_0x33692e){var _0x59f43e={};var _0xa99511={};var _0x3c693c;var _0x420c54;return db[_0x4c4c('0x2a')][_0x4c4c('0x4a')]({'where':{'id':_0x54b9e7[_0x4c4c('0x44')]['id']}})[_0x4c4c('0x22')](handleEntityNotFound(_0x55a230,null))['then'](function(_0x67050e){if(_0x67050e){_0x3c693c=_0x67050e;_0xa99511['model']=_[_0x4c4c('0x31')](db[_0x4c4c('0x50')]['rawAttributes']);_0xa99511[_0x4c4c('0x30')]=_['keys'](_0x54b9e7[_0x4c4c('0x30')]);_0xa99511[_0x4c4c('0x32')]=_[_0x4c4c('0x34')](_0xa99511['model'],_0xa99511[_0x4c4c('0x30')]);_0x59f43e['attributes']=_['intersection'](_0xa99511[_0x4c4c('0x2f')],qs[_0x4c4c('0x35')](_0x54b9e7[_0x4c4c('0x30')][_0x4c4c('0x35')]));_0x59f43e['attributes']=_0x59f43e['attributes'][_0x4c4c('0x36')]?_0x59f43e[_0x4c4c('0x33')]:_0xa99511[_0x4c4c('0x2f')];_0x59f43e[_0x4c4c('0x38')]=qs[_0x4c4c('0x39')](_0x54b9e7['query'][_0x4c4c('0x39')]);_0x59f43e[_0x4c4c('0x3c')]=qs[_0x4c4c('0x32')](_[_0x4c4c('0x3a')](_0x54b9e7[_0x4c4c('0x30')],_0xa99511[_0x4c4c('0x32')]));if(_0x54b9e7[_0x4c4c('0x30')][_0x4c4c('0x3b')]){_0x59f43e[_0x4c4c('0x3c')]=_[_0x4c4c('0x3e')](_0x59f43e[_0x4c4c('0x3c')],{'$or':_[_0x4c4c('0x29')](_0x59f43e[_0x4c4c('0x33')],function(_0x2ee774){var _0x3545f2={};_0x3545f2[_0x2ee774]={'$like':'%'+_0x54b9e7[_0x4c4c('0x30')][_0x4c4c('0x3b')]+'%'};return _0x3545f2;})});}_0x59f43e=_[_0x4c4c('0x3e')]({},_0x59f43e,_0x54b9e7[_0x4c4c('0x45')]);return _0x3c693c['getTags'](_0x59f43e);}})[_0x4c4c('0x22')](function(_0x31930d){if(_0x31930d){_0x420c54=_0x31930d[_0x4c4c('0x36')];if(!_0x54b9e7[_0x4c4c('0x30')][_0x4c4c('0x4c')](_0x4c4c('0x37'))){_0x59f43e[_0x4c4c('0x1c')]=qs['limit'](_0x54b9e7[_0x4c4c('0x30')][_0x4c4c('0x1c')]);_0x59f43e['offset']=qs[_0x4c4c('0x1a')](_0x54b9e7[_0x4c4c('0x30')][_0x4c4c('0x1a')]);}return _0x3c693c[_0x4c4c('0x4f')](_0x59f43e);}})[_0x4c4c('0x22')](function(_0x5ce98d){if(_0x5ce98d){return _0x5ce98d?{'count':_0x420c54,'rows':_0x5ce98d}:null;}})['then'](respondWithResult(_0x55a230,null))[_0x4c4c('0x42')](handleError(_0x55a230,null));};exports['setTags']=function(_0x43d588,_0x10af12,_0x1498a1){if(_0x43d588[_0x4c4c('0x48')]['id']){delete _0x43d588[_0x4c4c('0x48')]['id'];}return db[_0x4c4c('0x2a')][_0x4c4c('0x4a')]({'where':{'id':_0x43d588[_0x4c4c('0x44')]['id']}})[_0x4c4c('0x22')](handleEntityNotFound(_0x10af12,null))['then'](function(_0x561006){if(_0x561006){return _0x561006[_0x4c4c('0x51')](_0x43d588[_0x4c4c('0x48')][_0x4c4c('0x52')]||[]);}return null;})[_0x4c4c('0x22')](respondWithResult(_0x10af12,null))[_0x4c4c('0x42')](handleError(_0x10af12,null));};
\ No newline at end of file
+var _0x8beb=['fs-extra','lodash','squel','jsforce','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','name','send','index','map','FreshdeskConfiguration','rawAttributes','key','model','keys','query','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filters','filter','merge','where','type','includeAll','include','findAll','rows','catch','show','params','create','body','find','getFields','findOne','FreshdeskField','options','getSubjects','getDescriptions','getTags','setTags','ids','eml-format','rimraf','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','ejs'];(function(_0x155766,_0x3a07b9){var _0x11f367=function(_0x365dec){while(--_0x365dec){_0x155766['push'](_0x155766['shift']());}};_0x11f367(++_0x3a07b9);}(_0x8beb,0xa2));var _0xb8be=function(_0x576206,_0x10ddfa){_0x576206=_0x576206-0x0;var _0x219034=_0x8beb[_0x576206];return _0x219034;};'use strict';var emlformat=require(_0xb8be('0x0'));var rimraf=require(_0xb8be('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xb8be('0x2'));var rp=require(_0xb8be('0x3'));var moment=require('moment');var BPromise=require(_0xb8be('0x4'));var Mustache=require(_0xb8be('0x5'));var util=require(_0xb8be('0x6'));var path=require(_0xb8be('0x7'));var sox=require(_0xb8be('0x8'));var csv=require('to-csv');var ejs=require(_0xb8be('0x9'));var fs=require('fs');var fs_extra=require(_0xb8be('0xa'));var _=require(_0xb8be('0xb'));var squel=require(_0xb8be('0xc'));var crypto=require('crypto');var jsforce=require(_0xb8be('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xb8be('0xe'));var querystring=require(_0xb8be('0xf'));var Papa=require(_0xb8be('0x10'));var Redis=require('ioredis');var authService=require(_0xb8be('0x11'));var qs=require(_0xb8be('0x12'));var as=require(_0xb8be('0x13'));var hardwareService=require(_0xb8be('0x14'));var logger=require(_0xb8be('0x15'))('api');var utils=require(_0xb8be('0x16'));var config=require(_0xb8be('0x17'));var licenseUtil=require(_0xb8be('0x18'));var db=require(_0xb8be('0x19'))['db'];function respondWithStatusCode(_0x444f9b,_0x41afcc){_0x41afcc=_0x41afcc||0xcc;return function(_0x1e9034){if(_0x1e9034){return _0x444f9b['sendStatus'](_0x41afcc);}return _0x444f9b[_0xb8be('0x1a')](_0x41afcc)[_0xb8be('0x1b')]();};}function respondWithResult(_0xdb0222,_0x5e9232){_0x5e9232=_0x5e9232||0xc8;return function(_0x52fa54){if(_0x52fa54){return _0xdb0222[_0xb8be('0x1a')](_0x5e9232)[_0xb8be('0x1c')](_0x52fa54);}};}function respondWithFilteredResult(_0x457305,_0x535cef){return function(_0x253faf){if(_0x253faf){var _0x5c233f=typeof _0x535cef[_0xb8be('0x1d')]===_0xb8be('0x1e')&&typeof _0x535cef[_0xb8be('0x1f')]===_0xb8be('0x1e');var _0x53a63c=_0x253faf[_0xb8be('0x20')];var _0x45cfd5=_0x5c233f?0x0:_0x535cef[_0xb8be('0x1d')];var _0x501544=_0x5c233f?_0x253faf[_0xb8be('0x20')]:_0x535cef[_0xb8be('0x1d')]+_0x535cef[_0xb8be('0x1f')];var _0x3c5ea6;if(_0x501544>=_0x53a63c){_0x501544=_0x53a63c;_0x3c5ea6=0xc8;}else{_0x3c5ea6=0xce;}_0x457305[_0xb8be('0x1a')](_0x3c5ea6);return _0x457305[_0xb8be('0x21')](_0xb8be('0x22'),_0x45cfd5+'-'+_0x501544+'/'+_0x53a63c)[_0xb8be('0x1c')](_0x253faf);}return null;};}function patchUpdates(_0x786e22){return function(_0xe1f41a){try{jsonpatch[_0xb8be('0x23')](_0xe1f41a,_0x786e22,!![]);}catch(_0x475bc2){return BPromise[_0xb8be('0x24')](_0x475bc2);}return _0xe1f41a[_0xb8be('0x25')]();};}function saveUpdates(_0x5bd750,_0x42afe8){return function(_0x29ee64){if(_0x29ee64){return _0x29ee64[_0xb8be('0x26')](_0x5bd750)[_0xb8be('0x27')](function(_0x358671){return _0x358671;});}return null;};}function removeEntity(_0x4665e2,_0x5cc065){return function(_0x4277a8){if(_0x4277a8){return _0x4277a8[_0xb8be('0x28')]()[_0xb8be('0x27')](function(){_0x4665e2[_0xb8be('0x1a')](0xcc)[_0xb8be('0x1b')]();});}};}function handleEntityNotFound(_0x2fdbe,_0x12c715){return function(_0x2dfce3){if(!_0x2dfce3){_0x2fdbe[_0xb8be('0x29')](0x194);}return _0x2dfce3;};}function handleError(_0x4c1ab9,_0x379a02){_0x379a02=_0x379a02||0x1f4;return function(_0x243092){logger[_0xb8be('0x2a')](_0x243092['stack']);if(_0x243092[_0xb8be('0x2b')]){delete _0x243092['name'];}_0x4c1ab9[_0xb8be('0x1a')](_0x379a02)[_0xb8be('0x2c')](_0x243092);};}exports[_0xb8be('0x2d')]=function(_0x3b7f86,_0x5de05c){var _0x4b0a24={},_0x3deaa6={},_0x2ee285={'count':0x0,'rows':[]};var _0x281d7f=_[_0xb8be('0x2e')](db[_0xb8be('0x2f')][_0xb8be('0x30')],function(_0x454075){return{'name':_0x454075['fieldName'],'type':_0x454075['type'][_0xb8be('0x31')]};});_0x3deaa6[_0xb8be('0x32')]=_['map'](_0x281d7f,'name');_0x3deaa6['query']=_[_0xb8be('0x33')](_0x3b7f86[_0xb8be('0x34')]);_0x3deaa6['filters']=_[_0xb8be('0x35')](_0x3deaa6[_0xb8be('0x32')],_0x3deaa6[_0xb8be('0x34')]);_0x4b0a24['attributes']=_[_0xb8be('0x35')](_0x3deaa6[_0xb8be('0x32')],qs[_0xb8be('0x36')](_0x3b7f86[_0xb8be('0x34')][_0xb8be('0x36')]));_0x4b0a24[_0xb8be('0x37')]=_0x4b0a24[_0xb8be('0x37')][_0xb8be('0x38')]?_0x4b0a24[_0xb8be('0x37')]:_0x3deaa6[_0xb8be('0x32')];if(!_0x3b7f86[_0xb8be('0x34')][_0xb8be('0x39')](_0xb8be('0x3a'))){_0x4b0a24[_0xb8be('0x1f')]=qs[_0xb8be('0x1f')](_0x3b7f86['query'][_0xb8be('0x1f')]);_0x4b0a24['offset']=qs[_0xb8be('0x1d')](_0x3b7f86[_0xb8be('0x34')][_0xb8be('0x1d')]);}_0x4b0a24[_0xb8be('0x3b')]=qs['sort'](_0x3b7f86[_0xb8be('0x34')][_0xb8be('0x3c')]);_0x4b0a24['where']=qs['filters'](_[_0xb8be('0x3d')](_0x3b7f86['query'],_0x3deaa6[_0xb8be('0x3e')]),_0x281d7f);if(_0x3b7f86[_0xb8be('0x34')][_0xb8be('0x3f')]){_0x4b0a24['where']=_[_0xb8be('0x40')](_0x4b0a24[_0xb8be('0x41')],{'$or':_['map'](_0x281d7f,function(_0x394e12){if(_0x394e12[_0xb8be('0x42')]!=='VIRTUAL'){var _0x311c38={};_0x311c38[_0x394e12['name']]={'$like':'%'+_0x3b7f86[_0xb8be('0x34')][_0xb8be('0x3f')]+'%'};return _0x311c38;}})});}_0x4b0a24=_[_0xb8be('0x40')]({},_0x4b0a24,_0x3b7f86['options']);var _0x1ec993={'where':_0x4b0a24['where']};return db[_0xb8be('0x2f')][_0xb8be('0x20')](_0x1ec993)[_0xb8be('0x27')](function(_0x5be848){_0x2ee285[_0xb8be('0x20')]=_0x5be848;if(_0x3b7f86['query'][_0xb8be('0x43')]){_0x4b0a24[_0xb8be('0x44')]=[{'all':!![]}];}return db['FreshdeskConfiguration'][_0xb8be('0x45')](_0x4b0a24);})[_0xb8be('0x27')](function(_0x383334){_0x2ee285[_0xb8be('0x46')]=_0x383334;return _0x2ee285;})['then'](respondWithFilteredResult(_0x5de05c,_0x4b0a24))[_0xb8be('0x47')](handleError(_0x5de05c,null));};exports[_0xb8be('0x48')]=function(_0x1e9895,_0x4c7bb1){var _0x3e1e6e={'raw':![],'where':{'id':_0x1e9895[_0xb8be('0x49')]['id']}},_0xe7bc7b={};_0xe7bc7b[_0xb8be('0x32')]=_[_0xb8be('0x33')](db[_0xb8be('0x2f')][_0xb8be('0x30')]);_0xe7bc7b['query']=_[_0xb8be('0x33')](_0x1e9895[_0xb8be('0x34')]);_0xe7bc7b[_0xb8be('0x3e')]=_[_0xb8be('0x35')](_0xe7bc7b[_0xb8be('0x32')],_0xe7bc7b[_0xb8be('0x34')]);_0x3e1e6e[_0xb8be('0x37')]=_[_0xb8be('0x35')](_0xe7bc7b[_0xb8be('0x32')],qs[_0xb8be('0x36')](_0x1e9895[_0xb8be('0x34')][_0xb8be('0x36')]));_0x3e1e6e[_0xb8be('0x37')]=_0x3e1e6e[_0xb8be('0x37')][_0xb8be('0x38')]?_0x3e1e6e[_0xb8be('0x37')]:_0xe7bc7b['model'];if(_0x1e9895[_0xb8be('0x34')][_0xb8be('0x43')]){_0x3e1e6e['include']=[{'all':!![]}];}_0x3e1e6e=_[_0xb8be('0x40')]({},_0x3e1e6e,_0x1e9895['options']);return db[_0xb8be('0x2f')]['find'](_0x3e1e6e)[_0xb8be('0x27')](handleEntityNotFound(_0x4c7bb1,null))[_0xb8be('0x27')](respondWithResult(_0x4c7bb1,null))[_0xb8be('0x47')](handleError(_0x4c7bb1,null));};exports['create']=function(_0xeacf10,_0x511e7b){return db[_0xb8be('0x2f')][_0xb8be('0x4a')](_0xeacf10['body'],{})[_0xb8be('0x27')](respondWithResult(_0x511e7b,0xc9))[_0xb8be('0x47')](handleError(_0x511e7b,null));};exports[_0xb8be('0x26')]=function(_0xfb83c1,_0x262bda){if(_0xfb83c1['body']['id']){delete _0xfb83c1[_0xb8be('0x4b')]['id'];}return db[_0xb8be('0x2f')][_0xb8be('0x4c')]({'where':{'id':_0xfb83c1[_0xb8be('0x49')]['id']}})[_0xb8be('0x27')](handleEntityNotFound(_0x262bda,null))['then'](saveUpdates(_0xfb83c1[_0xb8be('0x4b')],null))[_0xb8be('0x27')](respondWithResult(_0x262bda,null))[_0xb8be('0x47')](handleError(_0x262bda,null));};exports[_0xb8be('0x28')]=function(_0x8459db,_0x37f2fb){return db[_0xb8be('0x2f')][_0xb8be('0x4c')]({'where':{'id':_0x8459db[_0xb8be('0x49')]['id']}})[_0xb8be('0x27')](handleEntityNotFound(_0x37f2fb,null))[_0xb8be('0x27')](removeEntity(_0x37f2fb,null))[_0xb8be('0x47')](handleError(_0x37f2fb,null));};exports[_0xb8be('0x4d')]=function(_0x66c7f1,_0x4c31b3,_0x31385c){var _0x13547f={};var _0x314e05={};var _0x14d74c;var _0x47d958;return db[_0xb8be('0x2f')][_0xb8be('0x4e')]({'where':{'id':_0x66c7f1[_0xb8be('0x49')]['id']}})[_0xb8be('0x27')](handleEntityNotFound(_0x4c31b3,null))['then'](function(_0x51272a){if(_0x51272a){_0x14d74c=_0x51272a;_0x314e05['model']=_[_0xb8be('0x33')](db[_0xb8be('0x4f')][_0xb8be('0x30')]);_0x314e05[_0xb8be('0x34')]=_['keys'](_0x66c7f1[_0xb8be('0x34')]);_0x314e05['filters']=_[_0xb8be('0x35')](_0x314e05[_0xb8be('0x32')],_0x314e05[_0xb8be('0x34')]);_0x13547f[_0xb8be('0x37')]=_[_0xb8be('0x35')](_0x314e05[_0xb8be('0x32')],qs[_0xb8be('0x36')](_0x66c7f1['query']['fields']));_0x13547f['attributes']=_0x13547f[_0xb8be('0x37')][_0xb8be('0x38')]?_0x13547f['attributes']:_0x314e05[_0xb8be('0x32')];_0x13547f['order']=qs[_0xb8be('0x3c')](_0x66c7f1[_0xb8be('0x34')][_0xb8be('0x3c')]);_0x13547f[_0xb8be('0x41')]=qs[_0xb8be('0x3e')](_[_0xb8be('0x3d')](_0x66c7f1[_0xb8be('0x34')],_0x314e05[_0xb8be('0x3e')]));if(_0x66c7f1[_0xb8be('0x34')][_0xb8be('0x3f')]){_0x13547f[_0xb8be('0x41')]=_[_0xb8be('0x40')](_0x13547f[_0xb8be('0x41')],{'$or':_['map'](_0x13547f[_0xb8be('0x37')],function(_0x303aff){var _0x569315={};_0x569315[_0x303aff]={'$like':'%'+_0x66c7f1[_0xb8be('0x34')][_0xb8be('0x3f')]+'%'};return _0x569315;})});}_0x13547f=_['merge']({},_0x13547f,_0x66c7f1[_0xb8be('0x50')]);return _0x14d74c[_0xb8be('0x4d')](_0x13547f);}})[_0xb8be('0x27')](function(_0x11e1dd){if(_0x11e1dd){_0x47d958=_0x11e1dd[_0xb8be('0x38')];if(!_0x66c7f1['query']['hasOwnProperty'](_0xb8be('0x3a'))){_0x13547f[_0xb8be('0x1f')]=qs['limit'](_0x66c7f1[_0xb8be('0x34')][_0xb8be('0x1f')]);_0x13547f[_0xb8be('0x1d')]=qs['offset'](_0x66c7f1[_0xb8be('0x34')]['offset']);}return _0x14d74c[_0xb8be('0x4d')](_0x13547f);}})[_0xb8be('0x27')](function(_0x588ff7){if(_0x588ff7){return _0x588ff7?{'count':_0x47d958,'rows':_0x588ff7}:null;}})['then'](respondWithResult(_0x4c31b3,null))[_0xb8be('0x47')](handleError(_0x4c31b3,null));};exports['getSubjects']=function(_0x5ac4c5,_0x17d7d7,_0x33dfdc){var _0x3a8703={};var _0x19ed30={};var _0x4c1633;var _0x267627;return db[_0xb8be('0x2f')]['findOne']({'where':{'id':_0x5ac4c5[_0xb8be('0x49')]['id']}})['then'](handleEntityNotFound(_0x17d7d7,null))[_0xb8be('0x27')](function(_0x1b7f4f){if(_0x1b7f4f){_0x4c1633=_0x1b7f4f;_0x19ed30[_0xb8be('0x32')]=_[_0xb8be('0x33')](db['FreshdeskField'][_0xb8be('0x30')]);_0x19ed30[_0xb8be('0x34')]=_[_0xb8be('0x33')](_0x5ac4c5[_0xb8be('0x34')]);_0x19ed30[_0xb8be('0x3e')]=_['intersection'](_0x19ed30[_0xb8be('0x32')],_0x19ed30[_0xb8be('0x34')]);_0x3a8703[_0xb8be('0x37')]=_[_0xb8be('0x35')](_0x19ed30[_0xb8be('0x32')],qs[_0xb8be('0x36')](_0x5ac4c5[_0xb8be('0x34')]['fields']));_0x3a8703[_0xb8be('0x37')]=_0x3a8703[_0xb8be('0x37')][_0xb8be('0x38')]?_0x3a8703[_0xb8be('0x37')]:_0x19ed30['model'];_0x3a8703[_0xb8be('0x3b')]=qs[_0xb8be('0x3c')](_0x5ac4c5['query'][_0xb8be('0x3c')]);_0x3a8703[_0xb8be('0x41')]=qs[_0xb8be('0x3e')](_[_0xb8be('0x3d')](_0x5ac4c5[_0xb8be('0x34')],_0x19ed30['filters']));if(_0x5ac4c5['query'][_0xb8be('0x3f')]){_0x3a8703[_0xb8be('0x41')]=_['merge'](_0x3a8703[_0xb8be('0x41')],{'$or':_[_0xb8be('0x2e')](_0x3a8703[_0xb8be('0x37')],function(_0x10fa9a){var _0x498e91={};_0x498e91[_0x10fa9a]={'$like':'%'+_0x5ac4c5[_0xb8be('0x34')][_0xb8be('0x3f')]+'%'};return _0x498e91;})});}_0x3a8703=_[_0xb8be('0x40')]({},_0x3a8703,_0x5ac4c5[_0xb8be('0x50')]);return _0x4c1633[_0xb8be('0x51')](_0x3a8703);}})[_0xb8be('0x27')](function(_0x2de122){if(_0x2de122){_0x267627=_0x2de122[_0xb8be('0x38')];if(!_0x5ac4c5[_0xb8be('0x34')][_0xb8be('0x39')]('nolimit')){_0x3a8703[_0xb8be('0x1f')]=qs['limit'](_0x5ac4c5[_0xb8be('0x34')][_0xb8be('0x1f')]);_0x3a8703[_0xb8be('0x1d')]=qs[_0xb8be('0x1d')](_0x5ac4c5['query']['offset']);}return _0x4c1633['getSubjects'](_0x3a8703);}})[_0xb8be('0x27')](function(_0x441f97){if(_0x441f97){return _0x441f97?{'count':_0x267627,'rows':_0x441f97}:null;}})[_0xb8be('0x27')](respondWithResult(_0x17d7d7,null))[_0xb8be('0x47')](handleError(_0x17d7d7,null));};exports['getDescriptions']=function(_0x335ce0,_0xd84374,_0x442060){var _0x5ecc77={};var _0x2fc91a={};var _0x4da959;var _0x576c2e;return db[_0xb8be('0x2f')][_0xb8be('0x4e')]({'where':{'id':_0x335ce0[_0xb8be('0x49')]['id']}})[_0xb8be('0x27')](handleEntityNotFound(_0xd84374,null))[_0xb8be('0x27')](function(_0x8d7127){if(_0x8d7127){_0x4da959=_0x8d7127;_0x2fc91a['model']=_[_0xb8be('0x33')](db[_0xb8be('0x4f')][_0xb8be('0x30')]);_0x2fc91a[_0xb8be('0x34')]=_[_0xb8be('0x33')](_0x335ce0['query']);_0x2fc91a['filters']=_['intersection'](_0x2fc91a[_0xb8be('0x32')],_0x2fc91a[_0xb8be('0x34')]);_0x5ecc77[_0xb8be('0x37')]=_[_0xb8be('0x35')](_0x2fc91a[_0xb8be('0x32')],qs[_0xb8be('0x36')](_0x335ce0[_0xb8be('0x34')][_0xb8be('0x36')]));_0x5ecc77[_0xb8be('0x37')]=_0x5ecc77[_0xb8be('0x37')][_0xb8be('0x38')]?_0x5ecc77[_0xb8be('0x37')]:_0x2fc91a[_0xb8be('0x32')];_0x5ecc77[_0xb8be('0x3b')]=qs[_0xb8be('0x3c')](_0x335ce0[_0xb8be('0x34')][_0xb8be('0x3c')]);_0x5ecc77[_0xb8be('0x41')]=qs['filters'](_['pick'](_0x335ce0[_0xb8be('0x34')],_0x2fc91a['filters']));if(_0x335ce0[_0xb8be('0x34')][_0xb8be('0x3f')]){_0x5ecc77[_0xb8be('0x41')]=_[_0xb8be('0x40')](_0x5ecc77[_0xb8be('0x41')],{'$or':_['map'](_0x5ecc77['attributes'],function(_0x167cc6){var _0x33b169={};_0x33b169[_0x167cc6]={'$like':'%'+_0x335ce0[_0xb8be('0x34')][_0xb8be('0x3f')]+'%'};return _0x33b169;})});}_0x5ecc77=_[_0xb8be('0x40')]({},_0x5ecc77,_0x335ce0[_0xb8be('0x50')]);return _0x4da959[_0xb8be('0x52')](_0x5ecc77);}})[_0xb8be('0x27')](function(_0x1ec78d){if(_0x1ec78d){_0x576c2e=_0x1ec78d[_0xb8be('0x38')];if(!_0x335ce0[_0xb8be('0x34')]['hasOwnProperty'](_0xb8be('0x3a'))){_0x5ecc77[_0xb8be('0x1f')]=qs[_0xb8be('0x1f')](_0x335ce0[_0xb8be('0x34')][_0xb8be('0x1f')]);_0x5ecc77[_0xb8be('0x1d')]=qs[_0xb8be('0x1d')](_0x335ce0[_0xb8be('0x34')][_0xb8be('0x1d')]);}return _0x4da959['getDescriptions'](_0x5ecc77);}})[_0xb8be('0x27')](function(_0x4220e1){if(_0x4220e1){return _0x4220e1?{'count':_0x576c2e,'rows':_0x4220e1}:null;}})[_0xb8be('0x27')](respondWithResult(_0xd84374,null))[_0xb8be('0x47')](handleError(_0xd84374,null));};exports[_0xb8be('0x53')]=function(_0x1fd29c,_0x495650,_0x20b341){var _0x5d892a={};var _0x2c00cb={};var _0x1695f3;var _0x4f5e7e;return db[_0xb8be('0x2f')][_0xb8be('0x4e')]({'where':{'id':_0x1fd29c[_0xb8be('0x49')]['id']}})[_0xb8be('0x27')](handleEntityNotFound(_0x495650,null))['then'](function(_0x19a14e){if(_0x19a14e){_0x1695f3=_0x19a14e;_0x2c00cb[_0xb8be('0x32')]=_[_0xb8be('0x33')](db['Tag'][_0xb8be('0x30')]);_0x2c00cb[_0xb8be('0x34')]=_[_0xb8be('0x33')](_0x1fd29c[_0xb8be('0x34')]);_0x2c00cb['filters']=_['intersection'](_0x2c00cb['model'],_0x2c00cb[_0xb8be('0x34')]);_0x5d892a[_0xb8be('0x37')]=_[_0xb8be('0x35')](_0x2c00cb[_0xb8be('0x32')],qs[_0xb8be('0x36')](_0x1fd29c[_0xb8be('0x34')][_0xb8be('0x36')]));_0x5d892a['attributes']=_0x5d892a[_0xb8be('0x37')]['length']?_0x5d892a[_0xb8be('0x37')]:_0x2c00cb[_0xb8be('0x32')];_0x5d892a['order']=qs[_0xb8be('0x3c')](_0x1fd29c[_0xb8be('0x34')]['sort']);_0x5d892a['where']=qs['filters'](_[_0xb8be('0x3d')](_0x1fd29c[_0xb8be('0x34')],_0x2c00cb['filters']));if(_0x1fd29c[_0xb8be('0x34')][_0xb8be('0x3f')]){_0x5d892a['where']=_[_0xb8be('0x40')](_0x5d892a[_0xb8be('0x41')],{'$or':_[_0xb8be('0x2e')](_0x5d892a[_0xb8be('0x37')],function(_0x2b6f46){var _0x2c6e4b={};_0x2c6e4b[_0x2b6f46]={'$like':'%'+_0x1fd29c['query'][_0xb8be('0x3f')]+'%'};return _0x2c6e4b;})});}_0x5d892a=_[_0xb8be('0x40')]({},_0x5d892a,_0x1fd29c[_0xb8be('0x50')]);return _0x1695f3['getTags'](_0x5d892a);}})['then'](function(_0x48bd59){if(_0x48bd59){_0x4f5e7e=_0x48bd59['length'];if(!_0x1fd29c[_0xb8be('0x34')][_0xb8be('0x39')]('nolimit')){_0x5d892a['limit']=qs[_0xb8be('0x1f')](_0x1fd29c[_0xb8be('0x34')]['limit']);_0x5d892a[_0xb8be('0x1d')]=qs['offset'](_0x1fd29c[_0xb8be('0x34')][_0xb8be('0x1d')]);}return _0x1695f3[_0xb8be('0x53')](_0x5d892a);}})['then'](function(_0x3dbf76){if(_0x3dbf76){return _0x3dbf76?{'count':_0x4f5e7e,'rows':_0x3dbf76}:null;}})['then'](respondWithResult(_0x495650,null))[_0xb8be('0x47')](handleError(_0x495650,null));};exports[_0xb8be('0x54')]=function(_0x3d6973,_0x19e5b6,_0x5a6a0d){if(_0x3d6973[_0xb8be('0x4b')]['id']){delete _0x3d6973[_0xb8be('0x4b')]['id'];}return db[_0xb8be('0x2f')]['findOne']({'where':{'id':_0x3d6973[_0xb8be('0x49')]['id']}})[_0xb8be('0x27')](handleEntityNotFound(_0x19e5b6,null))[_0xb8be('0x27')](function(_0x248ec1){if(_0x248ec1){return _0x248ec1[_0xb8be('0x54')](_0x3d6973[_0xb8be('0x4b')][_0xb8be('0x55')]||[]);}return null;})[_0xb8be('0x27')](respondWithResult(_0x19e5b6,null))[_0xb8be('0x47')](handleError(_0x19e5b6,null));};
\ No newline at end of file
index 621e4af..50a8c55 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x61f6=['../../config/environment','./intFreshdeskConfiguration.attributes','exports','define','int_freshdesk_configurations','lodash','util','../../config/logger','api','bluebird','request-promise','path'];(function(_0x591d44,_0x2b43a3){var _0x41dd26=function(_0x4c91ee){while(--_0x4c91ee){_0x591d44['push'](_0x591d44['shift']());}};_0x41dd26(++_0x2b43a3);}(_0x61f6,0x119));var _0x661f=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0x61f6[_0x167cc1];return _0x10bc4b;};'use strict';var _=require(_0x661f('0x0'));var util=require(_0x661f('0x1'));var logger=require(_0x661f('0x2'))(_0x661f('0x3'));var moment=require('moment');var BPromise=require(_0x661f('0x4'));var rp=require(_0x661f('0x5'));var fs=require('fs');var path=require(_0x661f('0x6'));var rimraf=require('rimraf');var config=require(_0x661f('0x7'));var attributes=require(_0x661f('0x8'));module[_0x661f('0x9')]=function(_0x4811da,_0x85b061){return _0x4811da[_0x661f('0xa')]('FreshdeskConfiguration',attributes,{'tableName':_0x661f('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6855=['define','int_freshdesk_configurations','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intFreshdeskConfiguration.attributes'];(function(_0x48f149,_0x934452){var _0x2c9318=function(_0x15ae35){while(--_0x15ae35){_0x48f149['push'](_0x48f149['shift']());}};_0x2c9318(++_0x934452);}(_0x6855,0x91));var _0x5685=function(_0xdc37a1,_0x53ebb9){_0xdc37a1=_0xdc37a1-0x0;var _0x99b4fe=_0x6855[_0xdc37a1];return _0x99b4fe;};'use strict';var _=require(_0x5685('0x0'));var util=require(_0x5685('0x1'));var logger=require(_0x5685('0x2'))(_0x5685('0x3'));var moment=require(_0x5685('0x4'));var BPromise=require(_0x5685('0x5'));var rp=require(_0x5685('0x6'));var fs=require('fs');var path=require(_0x5685('0x7'));var rimraf=require(_0x5685('0x8'));var config=require(_0x5685('0x9'));var attributes=require(_0x5685('0xa'));module['exports']=function(_0x4bd5c7,_0x2442d7){return _0x4bd5c7[_0x5685('0xb')]('FreshdeskConfiguration',attributes,{'tableName':_0x5685('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 0d9c338..1dcf18d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xda26=['randomstring','ioredis','../../config/utils','../../config/environment','jayson/promise','client','http','then','FreshdeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','moment','bluebird'];(function(_0x572b5a,_0x56b877){var _0x1af519=function(_0x1ade42){while(--_0x1ade42){_0x572b5a['push'](_0x572b5a['shift']());}};_0x1af519(++_0x56b877);}(_0xda26,0x16c));var _0x6da2=function(_0x2ce0bf,_0x3dd6af){_0x2ce0bf=_0x2ce0bf-0x0;var _0x1e71b8=_0xda26[_0x2ce0bf];return _0x1e71b8;};'use strict';var _=require(_0x6da2('0x0'));var util=require(_0x6da2('0x1'));var moment=require(_0x6da2('0x2'));var BPromise=require(_0x6da2('0x3'));var rs=require(_0x6da2('0x4'));var fs=require('fs');var Redis=require(_0x6da2('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x6da2('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x6da2('0x7'));var jayson=require(_0x6da2('0x8'));var client=jayson[_0x6da2('0x9')][_0x6da2('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1889b5,_0x4c9d63,_0x2ab4de){return new BPromise(function(_0x2a0ff2,_0x1a40a5){return client['request'](_0x1889b5,_0x2ab4de)[_0x6da2('0xb')](function(_0x40afbd){logger['info'](_0x6da2('0xc'),_0x4c9d63,_0x6da2('0xd'));logger[_0x6da2('0xe')](_0x6da2('0xf'),_0x4c9d63,_0x6da2('0xd'),JSON[_0x6da2('0x10')](_0x40afbd));if(_0x40afbd[_0x6da2('0x11')]){if(_0x40afbd[_0x6da2('0x11')][_0x6da2('0x12')]===0x1f4){logger['error'](_0x6da2('0xc'),_0x4c9d63,_0x40afbd[_0x6da2('0x11')][_0x6da2('0x13')]);return _0x1a40a5(_0x40afbd[_0x6da2('0x11')][_0x6da2('0x13')]);}logger[_0x6da2('0x11')](_0x6da2('0xc'),_0x4c9d63,_0x40afbd[_0x6da2('0x11')][_0x6da2('0x13')]);return _0x2a0ff2(_0x40afbd['error']['message']);}else{logger[_0x6da2('0x14')](_0x6da2('0xc'),_0x4c9d63,'request\x20sent');_0x2a0ff2(_0x40afbd[_0x6da2('0x15')][_0x6da2('0x13')]);}})[_0x6da2('0x16')](function(_0x4e2da6){logger[_0x6da2('0x11')](_0x6da2('0xc'),_0x4c9d63,_0x4e2da6);_0x1a40a5(_0x4e2da6);});});}
\ No newline at end of file
+var _0xfced=['http','request','then','FreshdeskConfiguration,\x20%s,\x20%s','debug','FreshdeskConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','request\x20sent','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client'];(function(_0x2d057e,_0x1cd908){var _0x34c80d=function(_0x54edf9){while(--_0x54edf9){_0x2d057e['push'](_0x2d057e['shift']());}};_0x34c80d(++_0x1cd908);}(_0xfced,0x18e));var _0xdfce=function(_0x2306b7,_0x4f7413){_0x2306b7=_0x2306b7-0x0;var _0x36f8b7=_0xfced[_0x2306b7];return _0x36f8b7;};'use strict';var _=require(_0xdfce('0x0'));var util=require(_0xdfce('0x1'));var moment=require(_0xdfce('0x2'));var BPromise=require(_0xdfce('0x3'));var rs=require(_0xdfce('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xdfce('0x5'))['db'];var utils=require(_0xdfce('0x6'));var logger=require(_0xdfce('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0xdfce('0x8'));var client=jayson[_0xdfce('0x9')][_0xdfce('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1a9c8a,_0x521119,_0x3fa76a){return new BPromise(function(_0x1bc909,_0x4e4ba6){return client[_0xdfce('0xb')](_0x1a9c8a,_0x3fa76a)[_0xdfce('0xc')](function(_0x405400){logger['info'](_0xdfce('0xd'),_0x521119,'request\x20sent');logger[_0xdfce('0xe')](_0xdfce('0xf'),_0x521119,'request\x20sent',JSON[_0xdfce('0x10')](_0x405400));if(_0x405400['error']){if(_0x405400[_0xdfce('0x11')][_0xdfce('0x12')]===0x1f4){logger[_0xdfce('0x11')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x521119,_0x405400['error'][_0xdfce('0x13')]);return _0x4e4ba6(_0x405400['error'][_0xdfce('0x13')]);}logger[_0xdfce('0x11')](_0xdfce('0xd'),_0x521119,_0x405400['error'][_0xdfce('0x13')]);return _0x1bc909(_0x405400[_0xdfce('0x11')][_0xdfce('0x13')]);}else{logger[_0xdfce('0x14')]('FreshdeskConfiguration,\x20%s,\x20%s',_0x521119,_0xdfce('0x15'));_0x1bc909(_0x405400[_0xdfce('0x16')][_0xdfce('0x13')]);}})[_0xdfce('0x17')](function(_0x26da4d){logger[_0xdfce('0x11')](_0xdfce('0xd'),_0x521119,_0x26da4d);_0x4e4ba6(_0x26da4d);});});}
\ No newline at end of file
index 7e8f57b..d97b175 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x924e=['connect-timeout','express','Router','fs-extra','../../components/auth/service','./intFreshdeskField.controller','get','isAuthenticated','index','show','put','/:id','delete','destroy','util','path'];(function(_0x5b407e,_0x1777c9){var _0x39c4ca=function(_0x2c20f4){while(--_0x2c20f4){_0x5b407e['push'](_0x5b407e['shift']());}};_0x39c4ca(++_0x1777c9);}(_0x924e,0xbe));var _0xe924=function(_0x104112,_0x342eb6){_0x104112=_0x104112-0x0;var _0x394ab4=_0x924e[_0x104112];return _0x394ab4;};'use strict';var multer=require('multer');var util=require(_0xe924('0x0'));var path=require(_0xe924('0x1'));var timeout=require(_0xe924('0x2'));var express=require(_0xe924('0x3'));var router=express[_0xe924('0x4')]();var fs_extra=require(_0xe924('0x5'));var auth=require(_0xe924('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xe924('0x7'));router[_0xe924('0x8')]('/',auth[_0xe924('0x9')](),controller[_0xe924('0xa')]);router[_0xe924('0x8')]('/:id',auth['isAuthenticated'](),controller[_0xe924('0xb')]);router['post']('/',auth[_0xe924('0x9')](),controller['create']);router[_0xe924('0xc')](_0xe924('0xd'),auth[_0xe924('0x9')](),controller['update']);router[_0xe924('0xe')]('/:id',auth[_0xe924('0x9')](),controller[_0xe924('0xf')]);module['exports']=router;
\ No newline at end of file
+var _0x57f5=['index','isAuthenticated','post','/:id','update','delete','exports','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshdeskField.controller','get'];(function(_0x2641f9,_0x26715f){var _0x585741=function(_0x2d1462){while(--_0x2d1462){_0x2641f9['push'](_0x2641f9['shift']());}};_0x585741(++_0x26715f);}(_0x57f5,0x1e3));var _0x557f=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x57f5[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0x557f('0x0'));var util=require(_0x557f('0x1'));var path=require('path');var timeout=require(_0x557f('0x2'));var express=require(_0x557f('0x3'));var router=express[_0x557f('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x557f('0x5'));var interaction=require(_0x557f('0x6'));var config=require(_0x557f('0x7'));var controller=require(_0x557f('0x8'));router[_0x557f('0x9')]('/',auth['isAuthenticated'](),controller[_0x557f('0xa')]);router[_0x557f('0x9')]('/:id',auth[_0x557f('0xb')](),controller['show']);router[_0x557f('0xc')]('/',auth[_0x557f('0xb')](),controller['create']);router['put'](_0x557f('0xd'),auth['isAuthenticated'](),controller[_0x557f('0xe')]);router[_0x557f('0xf')](_0x557f('0xd'),auth[_0x557f('0xb')](),controller['destroy']);module[_0x557f('0x10')]=router;
\ No newline at end of file
index fa4d437..038f44d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x22e7=['STRING','ENUM','BOOLEAN','sequelize','exports','variable','customVariable','keyValue','string'];(function(_0x4ac32f,_0x99d209){var _0x2ba3d0=function(_0x323db1){while(--_0x323db1){_0x4ac32f['push'](_0x4ac32f['shift']());}};_0x2ba3d0(++_0x99d209);}(_0x22e7,0x150));var _0x722e=function(_0x1b85ee,_0x96717c){_0x1b85ee=_0x1b85ee-0x0;var _0x5bc5d3=_0x22e7[_0x1b85ee];return _0x5bc5d3;};'use strict';var Sequelize=require(_0x722e('0x0'));module[_0x722e('0x1')]={'type':{'type':Sequelize['ENUM']('string',_0x722e('0x2'),_0x722e('0x3'),_0x722e('0x4'),'picklist'),'defaultValue':_0x722e('0x5')},'content':{'type':Sequelize[_0x722e('0x6')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0x722e('0x7')](_0x722e('0x5'),_0x722e('0x2'),_0x722e('0x3'))},'keyContent':{'type':Sequelize[_0x722e('0x6')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize[_0x722e('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x10d3=['sequelize','string','variable','customVariable','keyValue','picklist','STRING','ENUM','BOOLEAN'];(function(_0x3465d2,_0x165659){var _0x203f3c=function(_0x221099){while(--_0x221099){_0x3465d2['push'](_0x3465d2['shift']());}};_0x203f3c(++_0x165659);}(_0x10d3,0x19e));var _0x310d=function(_0x5da339,_0x26c474){_0x5da339=_0x5da339-0x0;var _0x23958a=_0x10d3[_0x5da339];return _0x23958a;};'use strict';var Sequelize=require(_0x310d('0x0'));module['exports']={'type':{'type':Sequelize['ENUM'](_0x310d('0x1'),_0x310d('0x2'),_0x310d('0x3'),_0x310d('0x4'),_0x310d('0x5')),'defaultValue':_0x310d('0x1')},'content':{'type':Sequelize[_0x310d('0x6')]},'key':{'type':Sequelize[_0x310d('0x6')]},'keyType':{'type':Sequelize[_0x310d('0x7')]('string',_0x310d('0x2'),_0x310d('0x3'))},'keyContent':{'type':Sequelize[_0x310d('0x6')]},'idField':{'type':Sequelize[_0x310d('0x6')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize[_0x310d('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 5d03bf0..599b0fe 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf290=['body','update','destroy','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','then','error','send','index','map','rawAttributes','type','key','model','keys','intersection','query','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','merge','name','filter','FreshdeskField','includeAll','findAll','catch','show','params','include','options','find','create'];(function(_0x2f5ce7,_0x319a62){var _0x1297bc=function(_0x226a11){while(--_0x226a11){_0x2f5ce7['push'](_0x2f5ce7['shift']());}};_0x1297bc(++_0x319a62);}(_0xf290,0xde));var _0x0f29=function(_0x2f3794,_0x3c3bec){_0x2f3794=_0x2f3794-0x0;var _0x1c9fbe=_0xf290[_0x2f3794];return _0x1c9fbe;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x0f29('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x0f29('0x1'));var rp=require('request-promise');var moment=require(_0x0f29('0x2'));var BPromise=require(_0x0f29('0x3'));var Mustache=require(_0x0f29('0x4'));var util=require(_0x0f29('0x5'));var path=require(_0x0f29('0x6'));var sox=require('sox');var csv=require(_0x0f29('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0f29('0x8'));var _=require(_0x0f29('0x9'));var squel=require(_0x0f29('0xa'));var crypto=require(_0x0f29('0xb'));var jsforce=require(_0x0f29('0xc'));var deskjs=require(_0x0f29('0xd'));var toCsv=require(_0x0f29('0x7'));var querystring=require(_0x0f29('0xe'));var Papa=require(_0x0f29('0xf'));var Redis=require(_0x0f29('0x10'));var authService=require(_0x0f29('0x11'));var qs=require(_0x0f29('0x12'));var as=require(_0x0f29('0x13'));var hardwareService=require(_0x0f29('0x14'));var logger=require(_0x0f29('0x15'))('api');var utils=require(_0x0f29('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x0f29('0x17'));var db=require(_0x0f29('0x18'))['db'];function respondWithStatusCode(_0x26bbec,_0x222c42){_0x222c42=_0x222c42||0xcc;return function(_0x195424){if(_0x195424){return _0x26bbec[_0x0f29('0x19')](_0x222c42);}return _0x26bbec['status'](_0x222c42)[_0x0f29('0x1a')]();};}function respondWithResult(_0x39961f,_0x2bb7b8){_0x2bb7b8=_0x2bb7b8||0xc8;return function(_0x368984){if(_0x368984){return _0x39961f[_0x0f29('0x1b')](_0x2bb7b8)[_0x0f29('0x1c')](_0x368984);}};}function respondWithFilteredResult(_0x1c518,_0x69df36){return function(_0x547404){if(_0x547404){var _0x4ac37d=typeof _0x69df36[_0x0f29('0x1d')]===_0x0f29('0x1e')&&typeof _0x69df36[_0x0f29('0x1f')]===_0x0f29('0x1e');var _0x4b3f0b=_0x547404[_0x0f29('0x20')];var _0x5d72a5=_0x4ac37d?0x0:_0x69df36[_0x0f29('0x1d')];var _0x4ca5e8=_0x4ac37d?_0x547404['count']:_0x69df36['offset']+_0x69df36[_0x0f29('0x1f')];var _0x8fc03f;if(_0x4ca5e8>=_0x4b3f0b){_0x4ca5e8=_0x4b3f0b;_0x8fc03f=0xc8;}else{_0x8fc03f=0xce;}_0x1c518[_0x0f29('0x1b')](_0x8fc03f);return _0x1c518[_0x0f29('0x21')](_0x0f29('0x22'),_0x5d72a5+'-'+_0x4ca5e8+'/'+_0x4b3f0b)[_0x0f29('0x1c')](_0x547404);}return null;};}function patchUpdates(_0x150271){return function(_0x4888b6){try{jsonpatch[_0x0f29('0x23')](_0x4888b6,_0x150271,!![]);}catch(_0x5a5a03){return BPromise['reject'](_0x5a5a03);}return _0x4888b6['save']();};}function saveUpdates(_0x5d94b9,_0x38a1ce){return function(_0x4a9dd8){if(_0x4a9dd8){return _0x4a9dd8['update'](_0x5d94b9)[_0x0f29('0x24')](function(_0x1840e0){return _0x1840e0;});}return null;};}function removeEntity(_0x346db8,_0x3402dc){return function(_0x29ca73){if(_0x29ca73){return _0x29ca73['destroy']()[_0x0f29('0x24')](function(){_0x346db8['status'](0xcc)[_0x0f29('0x1a')]();});}};}function handleEntityNotFound(_0x26f46f,_0x23c09e){return function(_0x28cfaa){if(!_0x28cfaa){_0x26f46f['sendStatus'](0x194);}return _0x28cfaa;};}function handleError(_0x13a2c7,_0x540d72){_0x540d72=_0x540d72||0x1f4;return function(_0x58b201){logger[_0x0f29('0x25')](_0x58b201['stack']);if(_0x58b201['name']){delete _0x58b201['name'];}_0x13a2c7['status'](_0x540d72)[_0x0f29('0x26')](_0x58b201);};}exports[_0x0f29('0x27')]=function(_0x4cc5a0,_0x1fc4fd){var _0x2ab528={},_0x274c9d={},_0x51e7dc={'count':0x0,'rows':[]};var _0x56e729=_[_0x0f29('0x28')](db['FreshdeskField'][_0x0f29('0x29')],function(_0x561c31){return{'name':_0x561c31['fieldName'],'type':_0x561c31[_0x0f29('0x2a')][_0x0f29('0x2b')]};});_0x274c9d[_0x0f29('0x2c')]=_[_0x0f29('0x28')](_0x56e729,'name');_0x274c9d['query']=_[_0x0f29('0x2d')](_0x4cc5a0['query']);_0x274c9d['filters']=_[_0x0f29('0x2e')](_0x274c9d['model'],_0x274c9d[_0x0f29('0x2f')]);_0x2ab528['attributes']=_['intersection'](_0x274c9d[_0x0f29('0x2c')],qs[_0x0f29('0x30')](_0x4cc5a0[_0x0f29('0x2f')][_0x0f29('0x30')]));_0x2ab528[_0x0f29('0x31')]=_0x2ab528['attributes'][_0x0f29('0x32')]?_0x2ab528['attributes']:_0x274c9d[_0x0f29('0x2c')];if(!_0x4cc5a0[_0x0f29('0x2f')][_0x0f29('0x33')](_0x0f29('0x34'))){_0x2ab528['limit']=qs[_0x0f29('0x1f')](_0x4cc5a0[_0x0f29('0x2f')]['limit']);_0x2ab528[_0x0f29('0x1d')]=qs[_0x0f29('0x1d')](_0x4cc5a0['query']['offset']);}_0x2ab528[_0x0f29('0x35')]=qs[_0x0f29('0x36')](_0x4cc5a0[_0x0f29('0x2f')][_0x0f29('0x36')]);_0x2ab528[_0x0f29('0x37')]=qs[_0x0f29('0x38')](_['pick'](_0x4cc5a0[_0x0f29('0x2f')],_0x274c9d['filters']),_0x56e729);if(_0x4cc5a0[_0x0f29('0x2f')]['filter']){_0x2ab528[_0x0f29('0x37')]=_[_0x0f29('0x39')](_0x2ab528[_0x0f29('0x37')],{'$or':_['map'](_0x56e729,function(_0x5f0d26){if(_0x5f0d26[_0x0f29('0x2a')]!=='VIRTUAL'){var _0x312c07={};_0x312c07[_0x5f0d26[_0x0f29('0x3a')]]={'$like':'%'+_0x4cc5a0[_0x0f29('0x2f')][_0x0f29('0x3b')]+'%'};return _0x312c07;}})});}_0x2ab528=_[_0x0f29('0x39')]({},_0x2ab528,_0x4cc5a0['options']);var _0x13c05c={'where':_0x2ab528[_0x0f29('0x37')]};return db[_0x0f29('0x3c')][_0x0f29('0x20')](_0x13c05c)[_0x0f29('0x24')](function(_0x4043d9){_0x51e7dc[_0x0f29('0x20')]=_0x4043d9;if(_0x4cc5a0[_0x0f29('0x2f')][_0x0f29('0x3d')]){_0x2ab528['include']=[{'all':!![]}];}return db[_0x0f29('0x3c')][_0x0f29('0x3e')](_0x2ab528);})[_0x0f29('0x24')](function(_0x11b1dc){_0x51e7dc['rows']=_0x11b1dc;return _0x51e7dc;})[_0x0f29('0x24')](respondWithFilteredResult(_0x1fc4fd,_0x2ab528))[_0x0f29('0x3f')](handleError(_0x1fc4fd,null));};exports[_0x0f29('0x40')]=function(_0x5c2282,_0x185493){var _0x56062d={'raw':!![],'where':{'id':_0x5c2282[_0x0f29('0x41')]['id']}},_0x410c59={};_0x410c59[_0x0f29('0x2c')]=_['keys'](db[_0x0f29('0x3c')][_0x0f29('0x29')]);_0x410c59[_0x0f29('0x2f')]=_[_0x0f29('0x2d')](_0x5c2282[_0x0f29('0x2f')]);_0x410c59[_0x0f29('0x38')]=_[_0x0f29('0x2e')](_0x410c59[_0x0f29('0x2c')],_0x410c59['query']);_0x56062d['attributes']=_['intersection'](_0x410c59[_0x0f29('0x2c')],qs[_0x0f29('0x30')](_0x5c2282[_0x0f29('0x2f')][_0x0f29('0x30')]));_0x56062d[_0x0f29('0x31')]=_0x56062d[_0x0f29('0x31')]['length']?_0x56062d[_0x0f29('0x31')]:_0x410c59['model'];if(_0x5c2282[_0x0f29('0x2f')]['includeAll']){_0x56062d[_0x0f29('0x42')]=[{'all':!![]}];}_0x56062d=_[_0x0f29('0x39')]({},_0x56062d,_0x5c2282[_0x0f29('0x43')]);return db[_0x0f29('0x3c')][_0x0f29('0x44')](_0x56062d)['then'](handleEntityNotFound(_0x185493,null))[_0x0f29('0x24')](respondWithResult(_0x185493,null))[_0x0f29('0x3f')](handleError(_0x185493,null));};exports[_0x0f29('0x45')]=function(_0x5a05b6,_0x14b747){return db['FreshdeskField']['create'](_0x5a05b6[_0x0f29('0x46')],{})[_0x0f29('0x24')](respondWithResult(_0x14b747,0xc9))[_0x0f29('0x3f')](handleError(_0x14b747,null));};exports[_0x0f29('0x47')]=function(_0x20aa53,_0x335435){if(_0x20aa53['body']['id']){delete _0x20aa53[_0x0f29('0x46')]['id'];}return db[_0x0f29('0x3c')][_0x0f29('0x44')]({'where':{'id':_0x20aa53[_0x0f29('0x41')]['id']}})[_0x0f29('0x24')](handleEntityNotFound(_0x335435,null))[_0x0f29('0x24')](saveUpdates(_0x20aa53[_0x0f29('0x46')],null))[_0x0f29('0x24')](respondWithResult(_0x335435,null))[_0x0f29('0x3f')](handleError(_0x335435,null));};exports[_0x0f29('0x48')]=function(_0x5cd4a9,_0x5e4479){return db[_0x0f29('0x3c')][_0x0f29('0x44')]({'where':{'id':_0x5cd4a9[_0x0f29('0x41')]['id']}})[_0x0f29('0x24')](handleEntityNotFound(_0x5e4479,null))['then'](removeEntity(_0x5e4479,null))[_0x0f29('0x3f')](handleError(_0x5e4479,null));};
\ No newline at end of file
+var _0xb469=['undefined','count','limit','set','Content-Range','apply','update','then','error','stack','name','index','map','FreshdeskField','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','offset','order','sort','pick','filter','where','merge','VIRTUAL','include','rows','catch','params','includeAll','options','find','body','destroy','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','to-csv','ejs','lodash','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json'];(function(_0x1ca66c,_0x3e3868){var _0x5a78ce=function(_0x5432ac){while(--_0x5432ac){_0x1ca66c['push'](_0x1ca66c['shift']());}};_0x5a78ce(++_0x3e3868);}(_0xb469,0x13b));var _0x9b46=function(_0x7c6e1b,_0x5a9c22){_0x7c6e1b=_0x7c6e1b-0x0;var _0x1329ba=_0xb469[_0x7c6e1b];return _0x1329ba;};'use strict';var emlformat=require(_0x9b46('0x0'));var rimraf=require(_0x9b46('0x1'));var zipdir=require(_0x9b46('0x2'));var jsonpatch=require(_0x9b46('0x3'));var rp=require(_0x9b46('0x4'));var moment=require(_0x9b46('0x5'));var BPromise=require(_0x9b46('0x6'));var Mustache=require('mustache');var util=require(_0x9b46('0x7'));var path=require(_0x9b46('0x8'));var sox=require('sox');var csv=require(_0x9b46('0x9'));var ejs=require(_0x9b46('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x9b46('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x9b46('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x9b46('0x9'));var querystring=require(_0x9b46('0xd'));var Papa=require(_0x9b46('0xe'));var Redis=require('ioredis');var authService=require(_0x9b46('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x9b46('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x9b46('0x11'))('api');var utils=require(_0x9b46('0x12'));var config=require(_0x9b46('0x13'));var licenseUtil=require('../../config/license/util');var db=require(_0x9b46('0x14'))['db'];function respondWithStatusCode(_0x417df5,_0x5b65c2){_0x5b65c2=_0x5b65c2||0xcc;return function(_0x14362a){if(_0x14362a){return _0x417df5[_0x9b46('0x15')](_0x5b65c2);}return _0x417df5[_0x9b46('0x16')](_0x5b65c2)[_0x9b46('0x17')]();};}function respondWithResult(_0xa8f4ac,_0x35c5c1){_0x35c5c1=_0x35c5c1||0xc8;return function(_0x2136bc){if(_0x2136bc){return _0xa8f4ac[_0x9b46('0x16')](_0x35c5c1)[_0x9b46('0x18')](_0x2136bc);}};}function respondWithFilteredResult(_0x178293,_0xbc1ba6){return function(_0x135cc2){if(_0x135cc2){var _0x1e6911=typeof _0xbc1ba6['offset']==='undefined'&&typeof _0xbc1ba6['limit']===_0x9b46('0x19');var _0x5a380c=_0x135cc2[_0x9b46('0x1a')];var _0x5c5cc9=_0x1e6911?0x0:_0xbc1ba6['offset'];var _0x3d9efa=_0x1e6911?_0x135cc2['count']:_0xbc1ba6['offset']+_0xbc1ba6[_0x9b46('0x1b')];var _0x3a15cc;if(_0x3d9efa>=_0x5a380c){_0x3d9efa=_0x5a380c;_0x3a15cc=0xc8;}else{_0x3a15cc=0xce;}_0x178293['status'](_0x3a15cc);return _0x178293[_0x9b46('0x1c')](_0x9b46('0x1d'),_0x5c5cc9+'-'+_0x3d9efa+'/'+_0x5a380c)['json'](_0x135cc2);}return null;};}function patchUpdates(_0x55aece){return function(_0xbec2ea){try{jsonpatch[_0x9b46('0x1e')](_0xbec2ea,_0x55aece,!![]);}catch(_0x204098){return BPromise['reject'](_0x204098);}return _0xbec2ea['save']();};}function saveUpdates(_0x2b3440,_0x51d2ca){return function(_0x21dacb){if(_0x21dacb){return _0x21dacb[_0x9b46('0x1f')](_0x2b3440)['then'](function(_0xadff19){return _0xadff19;});}return null;};}function removeEntity(_0x5182b1,_0x141cb6){return function(_0x2b6f72){if(_0x2b6f72){return _0x2b6f72['destroy']()[_0x9b46('0x20')](function(){_0x5182b1[_0x9b46('0x16')](0xcc)[_0x9b46('0x17')]();});}};}function handleEntityNotFound(_0x319930,_0x33ea06){return function(_0x3e4899){if(!_0x3e4899){_0x319930[_0x9b46('0x15')](0x194);}return _0x3e4899;};}function handleError(_0x5dc377,_0xdd756c){_0xdd756c=_0xdd756c||0x1f4;return function(_0x3ac37e){logger[_0x9b46('0x21')](_0x3ac37e[_0x9b46('0x22')]);if(_0x3ac37e[_0x9b46('0x23')]){delete _0x3ac37e[_0x9b46('0x23')];}_0x5dc377[_0x9b46('0x16')](_0xdd756c)['send'](_0x3ac37e);};}exports[_0x9b46('0x24')]=function(_0xee519e,_0x3630bf){var _0x376ccc={},_0x28b289={},_0x869993={'count':0x0,'rows':[]};var _0xc062ec=_[_0x9b46('0x25')](db[_0x9b46('0x26')][_0x9b46('0x27')],function(_0x2e1c51){return{'name':_0x2e1c51['fieldName'],'type':_0x2e1c51[_0x9b46('0x28')][_0x9b46('0x29')]};});_0x28b289[_0x9b46('0x2a')]=_[_0x9b46('0x25')](_0xc062ec,_0x9b46('0x23'));_0x28b289[_0x9b46('0x2b')]=_[_0x9b46('0x2c')](_0xee519e[_0x9b46('0x2b')]);_0x28b289[_0x9b46('0x2d')]=_[_0x9b46('0x2e')](_0x28b289[_0x9b46('0x2a')],_0x28b289['query']);_0x376ccc[_0x9b46('0x2f')]=_['intersection'](_0x28b289[_0x9b46('0x2a')],qs[_0x9b46('0x30')](_0xee519e[_0x9b46('0x2b')]['fields']));_0x376ccc[_0x9b46('0x2f')]=_0x376ccc[_0x9b46('0x2f')][_0x9b46('0x31')]?_0x376ccc[_0x9b46('0x2f')]:_0x28b289[_0x9b46('0x2a')];if(!_0xee519e['query']['hasOwnProperty'](_0x9b46('0x32'))){_0x376ccc[_0x9b46('0x1b')]=qs[_0x9b46('0x1b')](_0xee519e[_0x9b46('0x2b')]['limit']);_0x376ccc[_0x9b46('0x33')]=qs['offset'](_0xee519e[_0x9b46('0x2b')][_0x9b46('0x33')]);}_0x376ccc[_0x9b46('0x34')]=qs[_0x9b46('0x35')](_0xee519e['query'][_0x9b46('0x35')]);_0x376ccc['where']=qs[_0x9b46('0x2d')](_[_0x9b46('0x36')](_0xee519e[_0x9b46('0x2b')],_0x28b289[_0x9b46('0x2d')]),_0xc062ec);if(_0xee519e[_0x9b46('0x2b')][_0x9b46('0x37')]){_0x376ccc[_0x9b46('0x38')]=_[_0x9b46('0x39')](_0x376ccc[_0x9b46('0x38')],{'$or':_[_0x9b46('0x25')](_0xc062ec,function(_0x1c4147){if(_0x1c4147['type']!==_0x9b46('0x3a')){var _0x5aac02={};_0x5aac02[_0x1c4147[_0x9b46('0x23')]]={'$like':'%'+_0xee519e[_0x9b46('0x2b')]['filter']+'%'};return _0x5aac02;}})});}_0x376ccc=_[_0x9b46('0x39')]({},_0x376ccc,_0xee519e['options']);var _0x416538={'where':_0x376ccc['where']};return db[_0x9b46('0x26')][_0x9b46('0x1a')](_0x416538)[_0x9b46('0x20')](function(_0x22ab5d){_0x869993[_0x9b46('0x1a')]=_0x22ab5d;if(_0xee519e['query']['includeAll']){_0x376ccc[_0x9b46('0x3b')]=[{'all':!![]}];}return db['FreshdeskField']['findAll'](_0x376ccc);})['then'](function(_0x4e1911){_0x869993[_0x9b46('0x3c')]=_0x4e1911;return _0x869993;})['then'](respondWithFilteredResult(_0x3630bf,_0x376ccc))[_0x9b46('0x3d')](handleError(_0x3630bf,null));};exports['show']=function(_0x3fa46c,_0xe807bf){var _0x2e92aa={'raw':!![],'where':{'id':_0x3fa46c[_0x9b46('0x3e')]['id']}},_0xa14b={};_0xa14b[_0x9b46('0x2a')]=_[_0x9b46('0x2c')](db[_0x9b46('0x26')][_0x9b46('0x27')]);_0xa14b['query']=_[_0x9b46('0x2c')](_0x3fa46c[_0x9b46('0x2b')]);_0xa14b[_0x9b46('0x2d')]=_[_0x9b46('0x2e')](_0xa14b[_0x9b46('0x2a')],_0xa14b[_0x9b46('0x2b')]);_0x2e92aa[_0x9b46('0x2f')]=_[_0x9b46('0x2e')](_0xa14b[_0x9b46('0x2a')],qs[_0x9b46('0x30')](_0x3fa46c[_0x9b46('0x2b')][_0x9b46('0x30')]));_0x2e92aa[_0x9b46('0x2f')]=_0x2e92aa[_0x9b46('0x2f')]['length']?_0x2e92aa['attributes']:_0xa14b[_0x9b46('0x2a')];if(_0x3fa46c[_0x9b46('0x2b')][_0x9b46('0x3f')]){_0x2e92aa['include']=[{'all':!![]}];}_0x2e92aa=_['merge']({},_0x2e92aa,_0x3fa46c[_0x9b46('0x40')]);return db[_0x9b46('0x26')][_0x9b46('0x41')](_0x2e92aa)[_0x9b46('0x20')](handleEntityNotFound(_0xe807bf,null))[_0x9b46('0x20')](respondWithResult(_0xe807bf,null))[_0x9b46('0x3d')](handleError(_0xe807bf,null));};exports['create']=function(_0x6d1e73,_0x32e34d){return db[_0x9b46('0x26')]['create'](_0x6d1e73[_0x9b46('0x42')],{})['then'](respondWithResult(_0x32e34d,0xc9))[_0x9b46('0x3d')](handleError(_0x32e34d,null));};exports[_0x9b46('0x1f')]=function(_0x16e6d8,_0x566bad){if(_0x16e6d8[_0x9b46('0x42')]['id']){delete _0x16e6d8[_0x9b46('0x42')]['id'];}return db[_0x9b46('0x26')][_0x9b46('0x41')]({'where':{'id':_0x16e6d8[_0x9b46('0x3e')]['id']}})[_0x9b46('0x20')](handleEntityNotFound(_0x566bad,null))['then'](saveUpdates(_0x16e6d8[_0x9b46('0x42')],null))[_0x9b46('0x20')](respondWithResult(_0x566bad,null))[_0x9b46('0x3d')](handleError(_0x566bad,null));};exports[_0x9b46('0x43')]=function(_0x362311,_0x36a492){return db['FreshdeskField'][_0x9b46('0x41')]({'where':{'id':_0x362311['params']['id']}})[_0x9b46('0x20')](handleEntityNotFound(_0x36a492,null))[_0x9b46('0x20')](removeEntity(_0x36a492,null))[_0x9b46('0x3d')](handleError(_0x36a492,null));};
\ No newline at end of file
index 152557d..1c2a76b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x54f3=['util','../../config/logger','api','moment','bluebird','rimraf','../../config/environment','./intFreshdeskField.attributes','FreshdeskField','int_freshdesk_fields','freshdesk_unique_index','idField'];(function(_0x1fcc72,_0x191471){var _0x77731c=function(_0x36c407){while(--_0x36c407){_0x1fcc72['push'](_0x1fcc72['shift']());}};_0x77731c(++_0x191471);}(_0x54f3,0x120));var _0x354f=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0x54f3[_0x40a045];return _0x1a687c;};'use strict';var _=require('lodash');var util=require(_0x354f('0x0'));var logger=require(_0x354f('0x1'))(_0x354f('0x2'));var moment=require(_0x354f('0x3'));var BPromise=require(_0x354f('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x354f('0x5'));var config=require(_0x354f('0x6'));var attributes=require(_0x354f('0x7'));module['exports']=function(_0x5618ac,_0x234ac6){return _0x5618ac['define'](_0x354f('0x8'),attributes,{'tableName':_0x354f('0x9'),'paranoid':![],'indexes':[{'name':_0x354f('0xa'),'fields':[_0x354f('0xb'),'FieldId'],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x707d=['FieldId','util','../../config/logger','api','moment','rimraf','../../config/environment','exports','FreshdeskField','idField'];(function(_0xc412fe,_0x45318e){var _0x45cf39=function(_0x214edd){while(--_0x214edd){_0xc412fe['push'](_0xc412fe['shift']());}};_0x45cf39(++_0x45318e);}(_0x707d,0x12d));var _0xd707=function(_0x6fb36e,_0x2cbe26){_0x6fb36e=_0x6fb36e-0x0;var _0x49e55b=_0x707d[_0x6fb36e];return _0x49e55b;};'use strict';var _=require('lodash');var util=require(_0xd707('0x0'));var logger=require(_0xd707('0x1'))(_0xd707('0x2'));var moment=require(_0xd707('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xd707('0x4'));var config=require(_0xd707('0x5'));var attributes=require('./intFreshdeskField.attributes');module[_0xd707('0x6')]=function(_0x6f0216,_0x10a295){return _0x6f0216['define'](_0xd707('0x7'),attributes,{'tableName':'int_freshdesk_fields','paranoid':![],'indexes':[{'name':'freshdesk_unique_index','fields':[_0xd707('0x8'),_0xd707('0x9')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index 899d59d..d1ed180 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1632=['../../config/utils','../../config/logger','rpc','client','http','request','info','FreshdeskField,\x20%s,\x20%s','request\x20sent','debug','FreshdeskField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','bluebird','randomstring'];(function(_0x38a7ac,_0x45514b){var _0x53061a=function(_0x1d2469){while(--_0x1d2469){_0x38a7ac['push'](_0x38a7ac['shift']());}};_0x53061a(++_0x45514b);}(_0x1632,0x8e));var _0x2163=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x1632[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x2163('0x0'));var util=require(_0x2163('0x1'));var moment=require(_0x2163('0x2'));var BPromise=require(_0x2163('0x3'));var rs=require(_0x2163('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x2163('0x5'));var logger=require(_0x2163('0x6'))(_0x2163('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x2163('0x8')][_0x2163('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x210738,_0x24981c,_0x3bcb76){return new BPromise(function(_0x42c0dd,_0x3d8c85){return client[_0x2163('0xa')](_0x210738,_0x3bcb76)['then'](function(_0x2cfd22){logger[_0x2163('0xb')](_0x2163('0xc'),_0x24981c,_0x2163('0xd'));logger[_0x2163('0xe')](_0x2163('0xf'),_0x24981c,_0x2163('0xd'),JSON[_0x2163('0x10')](_0x2cfd22));if(_0x2cfd22[_0x2163('0x11')]){if(_0x2cfd22[_0x2163('0x11')][_0x2163('0x12')]===0x1f4){logger[_0x2163('0x11')](_0x2163('0xc'),_0x24981c,_0x2cfd22[_0x2163('0x11')][_0x2163('0x13')]);return _0x3d8c85(_0x2cfd22[_0x2163('0x11')]['message']);}logger[_0x2163('0x11')](_0x2163('0xc'),_0x24981c,_0x2cfd22[_0x2163('0x11')][_0x2163('0x13')]);return _0x42c0dd(_0x2cfd22['error'][_0x2163('0x13')]);}else{logger['info'](_0x2163('0xc'),_0x24981c,_0x2163('0xd'));_0x42c0dd(_0x2cfd22[_0x2163('0x14')][_0x2163('0x13')]);}})['catch'](function(_0x2837a0){logger[_0x2163('0x11')](_0x2163('0xc'),_0x24981c,_0x2837a0);_0x3d8c85(_0x2837a0);});});}
\ No newline at end of file
+var _0xf0b6=['../../config/environment','jayson/promise','client','http','request','info','FreshdeskField,\x20%s,\x20%s','request\x20sent','debug','FreshdeskField,\x20%s,\x20%s,\x20%s','stringify','error','message','result','lodash','util','bluebird','../../mysqldb','../../config/utils','rpc'];(function(_0x2d1476,_0x589dd3){var _0x2e4cde=function(_0x4d1211){while(--_0x4d1211){_0x2d1476['push'](_0x2d1476['shift']());}};_0x2e4cde(++_0x589dd3);}(_0xf0b6,0x18a));var _0x6f0b=function(_0x1c11e1,_0x313123){_0x1c11e1=_0x1c11e1-0x0;var _0x3f498b=_0xf0b6[_0x1c11e1];return _0x3f498b;};'use strict';var _=require(_0x6f0b('0x0'));var util=require(_0x6f0b('0x1'));var moment=require('moment');var BPromise=require(_0x6f0b('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6f0b('0x3'))['db'];var utils=require(_0x6f0b('0x4'));var logger=require('../../config/logger')(_0x6f0b('0x5'));var config=require(_0x6f0b('0x6'));var jayson=require(_0x6f0b('0x7'));var client=jayson[_0x6f0b('0x8')][_0x6f0b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x30b457,_0x37774b,_0x5967a6){return new BPromise(function(_0x1e922f,_0x1c6751){return client[_0x6f0b('0xa')](_0x30b457,_0x5967a6)['then'](function(_0x273b8d){logger[_0x6f0b('0xb')](_0x6f0b('0xc'),_0x37774b,_0x6f0b('0xd'));logger[_0x6f0b('0xe')](_0x6f0b('0xf'),_0x37774b,_0x6f0b('0xd'),JSON[_0x6f0b('0x10')](_0x273b8d));if(_0x273b8d[_0x6f0b('0x11')]){if(_0x273b8d[_0x6f0b('0x11')]['code']===0x1f4){logger[_0x6f0b('0x11')](_0x6f0b('0xc'),_0x37774b,_0x273b8d['error'][_0x6f0b('0x12')]);return _0x1c6751(_0x273b8d[_0x6f0b('0x11')][_0x6f0b('0x12')]);}logger[_0x6f0b('0x11')](_0x6f0b('0xc'),_0x37774b,_0x273b8d[_0x6f0b('0x11')][_0x6f0b('0x12')]);return _0x1e922f(_0x273b8d[_0x6f0b('0x11')][_0x6f0b('0x12')]);}else{logger[_0x6f0b('0xb')]('FreshdeskField,\x20%s,\x20%s',_0x37774b,_0x6f0b('0xd'));_0x1e922f(_0x273b8d[_0x6f0b('0x13')][_0x6f0b('0x12')]);}})['catch'](function(_0x5da306){logger[_0x6f0b('0x11')](_0x6f0b('0xc'),_0x37774b,_0x5da306);_0x1c6751(_0x5da306);});});}
\ No newline at end of file
index b963904..dd4616c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5ec6=['exports','multer','util','path','express','fs-extra','../../components/interaction/service','./intFreshsalesAccount.controller','isAuthenticated','index','/:id','get','/:id/configurations','/:id/fields','getFields','post','create','addConfiguration','update','delete','destroy'];(function(_0x1a7846,_0x59723e){var _0x48049=function(_0x203ff6){while(--_0x203ff6){_0x1a7846['push'](_0x1a7846['shift']());}};_0x48049(++_0x59723e);}(_0x5ec6,0x7f));var _0x65ec=function(_0x2544db,_0x570d3f){_0x2544db=_0x2544db-0x0;var _0x21421a=_0x5ec6[_0x2544db];return _0x21421a;};'use strict';var multer=require(_0x65ec('0x0'));var util=require(_0x65ec('0x1'));var path=require(_0x65ec('0x2'));var timeout=require('connect-timeout');var express=require(_0x65ec('0x3'));var router=express['Router']();var fs_extra=require(_0x65ec('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x65ec('0x5'));var config=require('../../config/environment');var controller=require(_0x65ec('0x6'));router['get']('/',auth[_0x65ec('0x7')](),controller[_0x65ec('0x8')]);router['get'](_0x65ec('0x9'),auth[_0x65ec('0x7')](),controller['show']);router[_0x65ec('0xa')](_0x65ec('0xb'),auth[_0x65ec('0x7')](),controller['getConfigurations']);router['get'](_0x65ec('0xc'),auth['isAuthenticated'](),controller[_0x65ec('0xd')]);router[_0x65ec('0xe')]('/',auth['isAuthenticated'](),controller[_0x65ec('0xf')]);router[_0x65ec('0xe')]('/:id/configurations',auth[_0x65ec('0x7')](),controller[_0x65ec('0x10')]);router['put'](_0x65ec('0x9'),auth[_0x65ec('0x7')](),controller[_0x65ec('0x11')]);router[_0x65ec('0x12')](_0x65ec('0x9'),auth[_0x65ec('0x7')](),controller[_0x65ec('0x13')]);module[_0x65ec('0x14')]=router;
\ No newline at end of file
+var _0x0713=['destroy','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./intFreshsalesAccount.controller','get','isAuthenticated','index','/:id','show','/:id/configurations','/:id/fields','getFields','post','create','addConfiguration','delete'];(function(_0x221c3c,_0x7319f2){var _0x8b4802=function(_0x1302e5){while(--_0x1302e5){_0x221c3c['push'](_0x221c3c['shift']());}};_0x8b4802(++_0x7319f2);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3071('0x0'));var timeout=require(_0x3071('0x1'));var express=require(_0x3071('0x2'));var router=express[_0x3071('0x3')]();var fs_extra=require(_0x3071('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));var controller=require(_0x3071('0x7'));router[_0x3071('0x8')]('/',auth[_0x3071('0x9')](),controller[_0x3071('0xa')]);router[_0x3071('0x8')](_0x3071('0xb'),auth[_0x3071('0x9')](),controller[_0x3071('0xc')]);router[_0x3071('0x8')](_0x3071('0xd'),auth[_0x3071('0x9')](),controller['getConfigurations']);router[_0x3071('0x8')](_0x3071('0xe'),auth[_0x3071('0x9')](),controller[_0x3071('0xf')]);router[_0x3071('0x10')]('/',auth['isAuthenticated'](),controller[_0x3071('0x11')]);router[_0x3071('0x10')](_0x3071('0xd'),auth[_0x3071('0x9')](),controller[_0x3071('0x12')]);router['put']('/:id',auth[_0x3071('0x9')](),controller['update']);router[_0x3071('0x13')](_0x3071('0xb'),auth['isAuthenticated'](),controller[_0x3071('0x14')]);module['exports']=router;
\ No newline at end of file
index 8f09e93..a27a97c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x896e=['exports','STRING','username','remoteUri','sequelize'];(function(_0xddfe05,_0x57b987){var _0x42b95e=function(_0x30699b){while(--_0x30699b){_0xddfe05['push'](_0xddfe05['shift']());}};_0x42b95e(++_0x57b987);}(_0x896e,0x1e9));var _0xe896=function(_0x671c14,_0x3328f9){_0x671c14=_0x671c14-0x0;var _0x5513e7=_0x896e[_0x671c14];return _0x5513e7;};'use strict';var Sequelize=require(_0xe896('0x0'));module[_0xe896('0x1')]={'name':{'type':Sequelize[_0xe896('0x2')]},'description':{'type':Sequelize[_0xe896('0x2')]},'username':{'type':Sequelize[_0xe896('0x2')],'unique':_0xe896('0x3')},'apiKey':{'type':Sequelize[_0xe896('0x2')]},'remoteUri':{'type':Sequelize[_0xe896('0x2')],'unique':_0xe896('0x4')},'serverUrl':{'type':Sequelize[_0xe896('0x2')],'allowNull':![]}};
\ No newline at end of file
+var _0xb03e=['STRING','username','remoteUri','exports'];(function(_0x383349,_0x460379){var _0xddb587=function(_0x383db6){while(--_0x383db6){_0x383349['push'](_0x383349['shift']());}};_0xddb587(++_0x460379);}(_0xb03e,0x1eb));var _0xeb03=function(_0xa191e8,_0x5f516b){_0xa191e8=_0xa191e8-0x0;var _0xa733ef=_0xb03e[_0xa191e8];return _0xa733ef;};'use strict';var Sequelize=require('sequelize');module[_0xeb03('0x0')]={'name':{'type':Sequelize[_0xeb03('0x1')]},'description':{'type':Sequelize[_0xeb03('0x1')]},'username':{'type':Sequelize[_0xeb03('0x1')],'unique':_0xeb03('0x2')},'apiKey':{'type':Sequelize[_0xeb03('0x1')]},'remoteUri':{'type':Sequelize[_0xeb03('0x1')],'unique':_0xeb03('0x3')},'serverUrl':{'type':Sequelize[_0xeb03('0x1')],'allowNull':![]}};
\ No newline at end of file
index b80b195..9fd3b7d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5e1d=['request-promise','moment','bluebird','util','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','../../config/environment','../../mysqldb','../../components/integrations/configuration','sendStatus','end','status','json','undefined','limit','count','offset','set','Content-Range','apply','reject','save','update','then','error','name','send','index','map','FreshsalesAccount','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','include','rows','catch','show','params','length','find','create','body','destroy','getConfigurations','findOne','pick','addConfiguration','AccountId','channel','Descriptions','getDescriptions','FreshsalesConfiguration','Subjects','FreshsalesField','getFields','username','remoteUri','slice','lastIndexOf','format','/api/selector/owners','Token\x20token=','email','Requested\x20Resource\x20not\x20Found','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','Wrong\x20credentials','eml-format','rimraf','zip-dir','fast-json-patch'];(function(_0x37881d,_0x3e53db){var _0x397633=function(_0x4a84d3){while(--_0x4a84d3){_0x37881d['push'](_0x37881d['shift']());}};_0x397633(++_0x3e53db);}(_0x5e1d,0xc8));var _0xd5e1=function(_0x2fcadf,_0x401da6){_0x2fcadf=_0x2fcadf-0x0;var _0x2a2c05=_0x5e1d[_0x2fcadf];return _0x2a2c05;};'use strict';var emlformat=require(_0xd5e1('0x0'));var rimraf=require(_0xd5e1('0x1'));var zipdir=require(_0xd5e1('0x2'));var jsonpatch=require(_0xd5e1('0x3'));var rp=require(_0xd5e1('0x4'));var moment=require(_0xd5e1('0x5'));var BPromise=require(_0xd5e1('0x6'));var Mustache=require('mustache');var util=require(_0xd5e1('0x7'));var path=require(_0xd5e1('0x8'));var sox=require(_0xd5e1('0x9'));var csv=require(_0xd5e1('0xa'));var ejs=require(_0xd5e1('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xd5e1('0xc'));var crypto=require(_0xd5e1('0xd'));var jsforce=require(_0xd5e1('0xe'));var deskjs=require(_0xd5e1('0xf'));var toCsv=require(_0xd5e1('0xa'));var querystring=require(_0xd5e1('0x10'));var Papa=require(_0xd5e1('0x11'));var Redis=require('ioredis');var authService=require(_0xd5e1('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xd5e1('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xd5e1('0x14'))('api');var utils=require('../../config/utils');var config=require(_0xd5e1('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0xd5e1('0x16'))['db'];var integrations=require(_0xd5e1('0x17'));function respondWithStatusCode(_0x5839b3,_0x173a0e){_0x173a0e=_0x173a0e||0xcc;return function(_0x2d1a42){if(_0x2d1a42){return _0x5839b3[_0xd5e1('0x18')](_0x173a0e);}return _0x5839b3['status'](_0x173a0e)[_0xd5e1('0x19')]();};}function respondWithResult(_0x4af3ea,_0x7e1206){_0x7e1206=_0x7e1206||0xc8;return function(_0x253eb5){if(_0x253eb5){return _0x4af3ea[_0xd5e1('0x1a')](_0x7e1206)[_0xd5e1('0x1b')](_0x253eb5);}};}function respondWithFilteredResult(_0x43ca94,_0x370a4d){return function(_0x3191b5){if(_0x3191b5){var _0x2fd3a4=typeof _0x370a4d['offset']===_0xd5e1('0x1c')&&typeof _0x370a4d[_0xd5e1('0x1d')]==='undefined';var _0x55d7bf=_0x3191b5[_0xd5e1('0x1e')];var _0x1c1d89=_0x2fd3a4?0x0:_0x370a4d[_0xd5e1('0x1f')];var _0x64af69=_0x2fd3a4?_0x3191b5[_0xd5e1('0x1e')]:_0x370a4d[_0xd5e1('0x1f')]+_0x370a4d[_0xd5e1('0x1d')];var _0xce830f;if(_0x64af69>=_0x55d7bf){_0x64af69=_0x55d7bf;_0xce830f=0xc8;}else{_0xce830f=0xce;}_0x43ca94[_0xd5e1('0x1a')](_0xce830f);return _0x43ca94[_0xd5e1('0x20')](_0xd5e1('0x21'),_0x1c1d89+'-'+_0x64af69+'/'+_0x55d7bf)['json'](_0x3191b5);}return null;};}function patchUpdates(_0x4f8561){return function(_0x1921ef){try{jsonpatch[_0xd5e1('0x22')](_0x1921ef,_0x4f8561,!![]);}catch(_0x1ce9c8){return BPromise[_0xd5e1('0x23')](_0x1ce9c8);}return _0x1921ef[_0xd5e1('0x24')]();};}function saveUpdates(_0x74c78a,_0x461902){return function(_0x1a8be9){if(_0x1a8be9){return _0x1a8be9[_0xd5e1('0x25')](_0x74c78a)[_0xd5e1('0x26')](function(_0x731c8f){return _0x731c8f;});}return null;};}function removeEntity(_0x1da031,_0x5d61bf){return function(_0x4f0d14){if(_0x4f0d14){return _0x4f0d14['destroy']()[_0xd5e1('0x26')](function(){_0x1da031['status'](0xcc)[_0xd5e1('0x19')]();});}};}function handleEntityNotFound(_0x425f3e,_0xfed768){return function(_0x3996ef){if(!_0x3996ef){_0x425f3e[_0xd5e1('0x18')](0x194);}return _0x3996ef;};}function handleError(_0x3f583a,_0x11b5c4){_0x11b5c4=_0x11b5c4||0x1f4;return function(_0x5401f2){logger[_0xd5e1('0x27')](_0x5401f2['stack']);if(_0x5401f2[_0xd5e1('0x28')]){delete _0x5401f2[_0xd5e1('0x28')];}_0x3f583a[_0xd5e1('0x1a')](_0x11b5c4)[_0xd5e1('0x29')](_0x5401f2);};}exports[_0xd5e1('0x2a')]=function(_0x221b22,_0x30beca){var _0x361b1e={},_0x2c5327={},_0x152040={'count':0x0,'rows':[]};var _0x1bda2a=_[_0xd5e1('0x2b')](db[_0xd5e1('0x2c')][_0xd5e1('0x2d')],function(_0x5dddff){return{'name':_0x5dddff[_0xd5e1('0x2e')],'type':_0x5dddff[_0xd5e1('0x2f')][_0xd5e1('0x30')]};});_0x2c5327[_0xd5e1('0x31')]=_[_0xd5e1('0x2b')](_0x1bda2a,_0xd5e1('0x28'));_0x2c5327[_0xd5e1('0x32')]=_[_0xd5e1('0x33')](_0x221b22[_0xd5e1('0x32')]);_0x2c5327[_0xd5e1('0x34')]=_[_0xd5e1('0x35')](_0x2c5327['model'],_0x2c5327['query']);_0x361b1e[_0xd5e1('0x36')]=_[_0xd5e1('0x35')](_0x2c5327[_0xd5e1('0x31')],qs[_0xd5e1('0x37')](_0x221b22[_0xd5e1('0x32')][_0xd5e1('0x37')]));_0x361b1e[_0xd5e1('0x36')]=_0x361b1e[_0xd5e1('0x36')]['length']?_0x361b1e[_0xd5e1('0x36')]:_0x2c5327['model'];if(!_0x221b22[_0xd5e1('0x32')][_0xd5e1('0x38')](_0xd5e1('0x39'))){_0x361b1e[_0xd5e1('0x1d')]=qs['limit'](_0x221b22[_0xd5e1('0x32')]['limit']);_0x361b1e[_0xd5e1('0x1f')]=qs['offset'](_0x221b22[_0xd5e1('0x32')][_0xd5e1('0x1f')]);}_0x361b1e[_0xd5e1('0x3a')]=qs[_0xd5e1('0x3b')](_0x221b22['query'][_0xd5e1('0x3b')]);_0x361b1e[_0xd5e1('0x3c')]=qs['filters'](_['pick'](_0x221b22['query'],_0x2c5327[_0xd5e1('0x34')]),_0x1bda2a);if(_0x221b22[_0xd5e1('0x32')][_0xd5e1('0x3d')]){_0x361b1e[_0xd5e1('0x3c')]=_[_0xd5e1('0x3e')](_0x361b1e[_0xd5e1('0x3c')],{'$or':_[_0xd5e1('0x2b')](_0x1bda2a,function(_0x51be7e){if(_0x51be7e[_0xd5e1('0x2f')]!==_0xd5e1('0x3f')){var _0x3d44f2={};_0x3d44f2[_0x51be7e[_0xd5e1('0x28')]]={'$like':'%'+_0x221b22[_0xd5e1('0x32')]['filter']+'%'};return _0x3d44f2;}})});}_0x361b1e=_[_0xd5e1('0x3e')]({},_0x361b1e,_0x221b22[_0xd5e1('0x40')]);var _0x5d1a6a={'where':_0x361b1e[_0xd5e1('0x3c')]};return db['FreshsalesAccount'][_0xd5e1('0x1e')](_0x5d1a6a)[_0xd5e1('0x26')](function(_0x1b5adc){_0x152040[_0xd5e1('0x1e')]=_0x1b5adc;if(_0x221b22['query'][_0xd5e1('0x41')]){_0x361b1e[_0xd5e1('0x42')]=[{'all':!![]}];}return db[_0xd5e1('0x2c')]['findAll'](_0x361b1e);})[_0xd5e1('0x26')](function(_0x1e6466){_0x152040[_0xd5e1('0x43')]=_0x1e6466;return _0x152040;})['then'](respondWithFilteredResult(_0x30beca,_0x361b1e))[_0xd5e1('0x44')](handleError(_0x30beca,null));};exports[_0xd5e1('0x45')]=function(_0x3dc871,_0xd4805c){var _0x5710c8={'raw':![],'where':{'id':_0x3dc871[_0xd5e1('0x46')]['id']}},_0xb3ccb5={};_0xb3ccb5['model']=_[_0xd5e1('0x33')](db[_0xd5e1('0x2c')]['rawAttributes']);_0xb3ccb5['query']=_[_0xd5e1('0x33')](_0x3dc871['query']);_0xb3ccb5['filters']=_['intersection'](_0xb3ccb5[_0xd5e1('0x31')],_0xb3ccb5[_0xd5e1('0x32')]);_0x5710c8['attributes']=_[_0xd5e1('0x35')](_0xb3ccb5[_0xd5e1('0x31')],qs['fields'](_0x3dc871[_0xd5e1('0x32')][_0xd5e1('0x37')]));_0x5710c8[_0xd5e1('0x36')]=_0x5710c8[_0xd5e1('0x36')][_0xd5e1('0x47')]?_0x5710c8['attributes']:_0xb3ccb5[_0xd5e1('0x31')];if(_0x3dc871['query'][_0xd5e1('0x41')]){_0x5710c8['include']=[{'all':!![]}];}_0x5710c8=_[_0xd5e1('0x3e')]({},_0x5710c8,_0x3dc871[_0xd5e1('0x40')]);return db[_0xd5e1('0x2c')][_0xd5e1('0x48')](_0x5710c8)['then'](handleEntityNotFound(_0xd4805c,null))[_0xd5e1('0x26')](respondWithResult(_0xd4805c,null))[_0xd5e1('0x44')](handleError(_0xd4805c,null));};exports[_0xd5e1('0x49')]=function(_0x23b940,_0x11206b){return db[_0xd5e1('0x2c')][_0xd5e1('0x49')](_0x23b940[_0xd5e1('0x4a')],{})[_0xd5e1('0x26')](respondWithResult(_0x11206b,0xc9))[_0xd5e1('0x44')](handleError(_0x11206b,null));};exports[_0xd5e1('0x25')]=function(_0x9d12a5,_0x2b8591){if(_0x9d12a5[_0xd5e1('0x4a')]['id']){delete _0x9d12a5[_0xd5e1('0x4a')]['id'];}return db[_0xd5e1('0x2c')]['find']({'where':{'id':_0x9d12a5[_0xd5e1('0x46')]['id']}})[_0xd5e1('0x26')](handleEntityNotFound(_0x2b8591,null))[_0xd5e1('0x26')](saveUpdates(_0x9d12a5[_0xd5e1('0x4a')],null))[_0xd5e1('0x26')](respondWithResult(_0x2b8591,null))[_0xd5e1('0x44')](handleError(_0x2b8591,null));};exports[_0xd5e1('0x4b')]=function(_0x1d8740,_0x118c6a){return db['FreshsalesAccount']['find']({'where':{'id':_0x1d8740[_0xd5e1('0x46')]['id']}})[_0xd5e1('0x26')](handleEntityNotFound(_0x118c6a,null))[_0xd5e1('0x26')](removeEntity(_0x118c6a,null))['catch'](handleError(_0x118c6a,null));};exports[_0xd5e1('0x4c')]=function(_0x563df4,_0x42009f,_0x1e56d1){var _0x3bdac0={};var _0x5e541d={};var _0x1cd208;var _0xb8ce26;return db[_0xd5e1('0x2c')][_0xd5e1('0x4d')]({'where':{'id':_0x563df4[_0xd5e1('0x46')]['id']}})[_0xd5e1('0x26')](handleEntityNotFound(_0x42009f,null))['then'](function(_0x47a4c1){if(_0x47a4c1){_0x1cd208=_0x47a4c1;_0x5e541d[_0xd5e1('0x31')]=_[_0xd5e1('0x33')](db['FreshsalesConfiguration'][_0xd5e1('0x2d')]);_0x5e541d[_0xd5e1('0x32')]=_[_0xd5e1('0x33')](_0x563df4['query']);_0x5e541d['filters']=_[_0xd5e1('0x35')](_0x5e541d[_0xd5e1('0x31')],_0x5e541d[_0xd5e1('0x32')]);_0x3bdac0[_0xd5e1('0x36')]=_[_0xd5e1('0x35')](_0x5e541d[_0xd5e1('0x31')],qs[_0xd5e1('0x37')](_0x563df4[_0xd5e1('0x32')][_0xd5e1('0x37')]));_0x3bdac0[_0xd5e1('0x36')]=_0x3bdac0[_0xd5e1('0x36')][_0xd5e1('0x47')]?_0x3bdac0['attributes']:_0x5e541d[_0xd5e1('0x31')];_0x3bdac0[_0xd5e1('0x3a')]=qs['sort'](_0x563df4[_0xd5e1('0x32')][_0xd5e1('0x3b')]);_0x3bdac0['where']=qs[_0xd5e1('0x34')](_[_0xd5e1('0x4e')](_0x563df4['query'],_0x5e541d[_0xd5e1('0x34')]));if(_0x563df4['query'][_0xd5e1('0x3d')]){_0x3bdac0[_0xd5e1('0x3c')]=_[_0xd5e1('0x3e')](_0x3bdac0[_0xd5e1('0x3c')],{'$or':_[_0xd5e1('0x2b')](_0x3bdac0[_0xd5e1('0x36')],function(_0x3744ba){var _0x46d994={};_0x46d994[_0x3744ba]={'$like':'%'+_0x563df4[_0xd5e1('0x32')]['filter']+'%'};return _0x46d994;})});}_0x3bdac0=_[_0xd5e1('0x3e')]({},_0x3bdac0,_0x563df4[_0xd5e1('0x40')]);return _0x1cd208[_0xd5e1('0x4c')](_0x3bdac0);}})[_0xd5e1('0x26')](function(_0x52ab1b){if(_0x52ab1b){_0xb8ce26=_0x52ab1b[_0xd5e1('0x47')];if(!_0x563df4[_0xd5e1('0x32')][_0xd5e1('0x38')](_0xd5e1('0x39'))){_0x3bdac0[_0xd5e1('0x1d')]=qs[_0xd5e1('0x1d')](_0x563df4[_0xd5e1('0x32')][_0xd5e1('0x1d')]);_0x3bdac0[_0xd5e1('0x1f')]=qs[_0xd5e1('0x1f')](_0x563df4['query'][_0xd5e1('0x1f')]);}return _0x1cd208[_0xd5e1('0x4c')](_0x3bdac0);}})['then'](function(_0x26b0ad){if(_0x26b0ad){return _0x26b0ad?{'count':_0xb8ce26,'rows':_0x26b0ad}:null;}})[_0xd5e1('0x26')](respondWithResult(_0x42009f,null))[_0xd5e1('0x44')](handleError(_0x42009f,null));};exports[_0xd5e1('0x4f')]=function(_0x29a4d2,_0x28f84d,_0x485222){if(_0x29a4d2['body']['id']){delete _0x29a4d2[_0xd5e1('0x4a')]['id'];}return db[_0xd5e1('0x2c')][_0xd5e1('0x4d')]({'where':{'id':_0x29a4d2['params']['id']}})[_0xd5e1('0x26')](handleEntityNotFound(_0x28f84d,null))[_0xd5e1('0x26')](function(_0x1793a0){if(_0x1793a0){_0x29a4d2[_0xd5e1('0x4a')][_0xd5e1('0x50')]=_0x1793a0['id'];_0x29a4d2[_0xd5e1('0x4a')]['Subjects']=integrations['getSubjects'](_0x29a4d2[_0xd5e1('0x4a')][_0xd5e1('0x51')],_0x29a4d2[_0xd5e1('0x4a')][_0xd5e1('0x2f')]);_0x29a4d2[_0xd5e1('0x4a')][_0xd5e1('0x52')]=integrations[_0xd5e1('0x53')](_0x29a4d2['body'][_0xd5e1('0x51')],_0x29a4d2[_0xd5e1('0x4a')][_0xd5e1('0x2f')]);return db[_0xd5e1('0x54')][_0xd5e1('0x49')](_0x29a4d2[_0xd5e1('0x4a')],{'include':[{'model':db['FreshsalesField'],'as':_0xd5e1('0x55')},{'model':db[_0xd5e1('0x56')],'as':_0xd5e1('0x52')}]});}return null;})[_0xd5e1('0x26')](respondWithResult(_0x28f84d,null))[_0xd5e1('0x44')](handleError(_0x28f84d,null));};exports[_0xd5e1('0x57')]=function(_0x2476f2,_0x2acd9c,_0x25751c){var _0x1ae3b8='';var _0x500866='';return db[_0xd5e1('0x2c')]['findOne']({'where':{'id':_0x2476f2['params']['id']},'attributes':['id',_0xd5e1('0x58'),_0xd5e1('0x59'),'apiKey']})[_0xd5e1('0x26')](handleEntityNotFound(_0x2acd9c,null))[_0xd5e1('0x26')](function(_0x25b035){if(_0x25b035){_0x500866=_0x25b035[_0xd5e1('0x58')];_0x1ae3b8=_0x25b035[_0xd5e1('0x59')];var _0x40c3b6=_0x25b035[_0xd5e1('0x59')][_0xd5e1('0x5a')](-0x1);if(_0x40c3b6==='/'){_0x1ae3b8=_0x1ae3b8['substring'](0x0,_0x1ae3b8[_0xd5e1('0x5b')](_0x40c3b6));}return rp({'method':'GET','uri':util[_0xd5e1('0x5c')]('%s%s',_0x1ae3b8,_0xd5e1('0x5d')),'headers':{'Authorization':_0xd5e1('0x5e')+_0x25b035['apiKey']},'json':!![]});}})[_0xd5e1('0x26')](function(_0x1d78ad){if(_0x1d78ad){var _0x20c5ce=_0x1d78ad['users'];var _0x298ca0=![];var _0x16612c=null;for(_0x16612c=0x0;_0x16612c<_0x20c5ce[_0xd5e1('0x47')];_0x16612c++){if(_0x20c5ce[_0x16612c][_0xd5e1('0x5f')]===_0x500866){_0x298ca0=!![];}}if(_0x298ca0){return!![];}else{throw new Error({'statusCode':0x194,'message':_0xd5e1('0x60')});}}})[_0xd5e1('0x26')](respondWithResult(_0x2acd9c,null))['catch'](function(_0xcc5fc2){var _0x25fbad=_0x2476f2[_0xd5e1('0x32')][_0xd5e1('0x61')]?0x1f4:_0xcc5fc2[_0xd5e1('0x62')]||0x1f4;logger[_0xd5e1('0x27')](_0xd5e1('0x63'),_0xd5e1('0x57'),_0x25fbad,JSON[_0xd5e1('0x64')](_0xcc5fc2));delete _0xcc5fc2['name'];if(_0x25fbad===0x191){_0x25fbad=0x190;}_0x2acd9c['status'](_0x25fbad)['send'](_0x2476f2[_0xd5e1('0x32')]['test']?{'message':_0xd5e1('0x65'),'statusCode':_0xcc5fc2[_0xd5e1('0x62')]}:_0xcc5fc2);});};
\ No newline at end of file
+var _0xb09e=['name','send','index','FreshsalesAccount','rawAttributes','type','key','model','map','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','show','params','keys','length','find','catch','create','body','getConfigurations','findOne','FreshsalesConfiguration','AccountId','channel','getDescriptions','FreshsalesField','Subjects','Descriptions','getFields','username','remoteUri','apiKey','slice','substring','lastIndexOf','GET','%s%s','/api/selector/owners','Token\x20token=','users','Requested\x20Resource\x20not\x20Found','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','sox','ejs','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','update','then','destroy','error','stack'];(function(_0x407d85,_0x23c79e){var _0x51c8ff=function(_0x250c24){while(--_0x250c24){_0x407d85['push'](_0x407d85['shift']());}};_0x51c8ff(++_0x23c79e);}(_0xb09e,0x176));var _0xeb09=function(_0x14f1c7,_0x5eae6b){_0x14f1c7=_0x14f1c7-0x0;var _0x35f232=_0xb09e[_0x14f1c7];return _0x35f232;};'use strict';var emlformat=require(_0xeb09('0x0'));var rimraf=require(_0xeb09('0x1'));var zipdir=require(_0xeb09('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xeb09('0x3'));var moment=require(_0xeb09('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xeb09('0x5'));var util=require(_0xeb09('0x6'));var path=require('path');var sox=require(_0xeb09('0x7'));var csv=require('to-csv');var ejs=require(_0xeb09('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xeb09('0x9'));var squel=require(_0xeb09('0xa'));var crypto=require(_0xeb09('0xb'));var jsforce=require(_0xeb09('0xc'));var deskjs=require(_0xeb09('0xd'));var toCsv=require(_0xeb09('0xe'));var querystring=require(_0xeb09('0xf'));var Papa=require('papaparse');var Redis=require(_0xeb09('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xeb09('0x11'));var hardwareService=require(_0xeb09('0x12'));var logger=require(_0xeb09('0x13'))(_0xeb09('0x14'));var utils=require(_0xeb09('0x15'));var config=require(_0xeb09('0x16'));var licenseUtil=require(_0xeb09('0x17'));var db=require(_0xeb09('0x18'))['db'];var integrations=require(_0xeb09('0x19'));function respondWithStatusCode(_0x54ed68,_0x134336){_0x134336=_0x134336||0xcc;return function(_0x4a2b11){if(_0x4a2b11){return _0x54ed68[_0xeb09('0x1a')](_0x134336);}return _0x54ed68[_0xeb09('0x1b')](_0x134336)[_0xeb09('0x1c')]();};}function respondWithResult(_0xbd7200,_0x433929){_0x433929=_0x433929||0xc8;return function(_0xe7cf9){if(_0xe7cf9){return _0xbd7200['status'](_0x433929)[_0xeb09('0x1d')](_0xe7cf9);}};}function respondWithFilteredResult(_0x17fd3b,_0x4971bd){return function(_0x7842cb){if(_0x7842cb){var _0x3a9376=typeof _0x4971bd[_0xeb09('0x1e')]===_0xeb09('0x1f')&&typeof _0x4971bd[_0xeb09('0x20')]===_0xeb09('0x1f');var _0x269dd2=_0x7842cb[_0xeb09('0x21')];var _0x3b2ccc=_0x3a9376?0x0:_0x4971bd[_0xeb09('0x1e')];var _0x317f7b=_0x3a9376?_0x7842cb[_0xeb09('0x21')]:_0x4971bd[_0xeb09('0x1e')]+_0x4971bd['limit'];var _0x268677;if(_0x317f7b>=_0x269dd2){_0x317f7b=_0x269dd2;_0x268677=0xc8;}else{_0x268677=0xce;}_0x17fd3b[_0xeb09('0x1b')](_0x268677);return _0x17fd3b[_0xeb09('0x22')]('Content-Range',_0x3b2ccc+'-'+_0x317f7b+'/'+_0x269dd2)[_0xeb09('0x1d')](_0x7842cb);}return null;};}function patchUpdates(_0x252e46){return function(_0x43f4ae){try{jsonpatch[_0xeb09('0x23')](_0x43f4ae,_0x252e46,!![]);}catch(_0x29690f){return BPromise[_0xeb09('0x24')](_0x29690f);}return _0x43f4ae['save']();};}function saveUpdates(_0x113a01,_0x965c18){return function(_0x1b01c9){if(_0x1b01c9){return _0x1b01c9[_0xeb09('0x25')](_0x113a01)[_0xeb09('0x26')](function(_0x814663){return _0x814663;});}return null;};}function removeEntity(_0x32cffb,_0x81ea90){return function(_0x35ce73){if(_0x35ce73){return _0x35ce73[_0xeb09('0x27')]()[_0xeb09('0x26')](function(){_0x32cffb[_0xeb09('0x1b')](0xcc)[_0xeb09('0x1c')]();});}};}function handleEntityNotFound(_0x3bc833,_0x37eac4){return function(_0x481da7){if(!_0x481da7){_0x3bc833[_0xeb09('0x1a')](0x194);}return _0x481da7;};}function handleError(_0x5ce311,_0x4a71b4){_0x4a71b4=_0x4a71b4||0x1f4;return function(_0x26404a){logger[_0xeb09('0x28')](_0x26404a[_0xeb09('0x29')]);if(_0x26404a['name']){delete _0x26404a[_0xeb09('0x2a')];}_0x5ce311[_0xeb09('0x1b')](_0x4a71b4)[_0xeb09('0x2b')](_0x26404a);};}exports[_0xeb09('0x2c')]=function(_0x13d015,_0x71d74f){var _0xc057cf={},_0xf9d50d={},_0x428938={'count':0x0,'rows':[]};var _0x4c7311=_['map'](db[_0xeb09('0x2d')][_0xeb09('0x2e')],function(_0x339726){return{'name':_0x339726['fieldName'],'type':_0x339726[_0xeb09('0x2f')][_0xeb09('0x30')]};});_0xf9d50d[_0xeb09('0x31')]=_[_0xeb09('0x32')](_0x4c7311,_0xeb09('0x2a'));_0xf9d50d[_0xeb09('0x33')]=_['keys'](_0x13d015[_0xeb09('0x33')]);_0xf9d50d[_0xeb09('0x34')]=_[_0xeb09('0x35')](_0xf9d50d[_0xeb09('0x31')],_0xf9d50d[_0xeb09('0x33')]);_0xc057cf[_0xeb09('0x36')]=_[_0xeb09('0x35')](_0xf9d50d[_0xeb09('0x31')],qs['fields'](_0x13d015[_0xeb09('0x33')][_0xeb09('0x37')]));_0xc057cf['attributes']=_0xc057cf['attributes']['length']?_0xc057cf[_0xeb09('0x36')]:_0xf9d50d['model'];if(!_0x13d015[_0xeb09('0x33')][_0xeb09('0x38')](_0xeb09('0x39'))){_0xc057cf[_0xeb09('0x20')]=qs[_0xeb09('0x20')](_0x13d015['query'][_0xeb09('0x20')]);_0xc057cf[_0xeb09('0x1e')]=qs['offset'](_0x13d015[_0xeb09('0x33')]['offset']);}_0xc057cf[_0xeb09('0x3a')]=qs[_0xeb09('0x3b')](_0x13d015[_0xeb09('0x33')][_0xeb09('0x3b')]);_0xc057cf[_0xeb09('0x3c')]=qs['filters'](_[_0xeb09('0x3d')](_0x13d015[_0xeb09('0x33')],_0xf9d50d[_0xeb09('0x34')]),_0x4c7311);if(_0x13d015['query'][_0xeb09('0x3e')]){_0xc057cf['where']=_[_0xeb09('0x3f')](_0xc057cf[_0xeb09('0x3c')],{'$or':_['map'](_0x4c7311,function(_0x4f4c98){if(_0x4f4c98[_0xeb09('0x2f')]!==_0xeb09('0x40')){var _0x1ea0ae={};_0x1ea0ae[_0x4f4c98[_0xeb09('0x2a')]]={'$like':'%'+_0x13d015[_0xeb09('0x33')]['filter']+'%'};return _0x1ea0ae;}})});}_0xc057cf=_[_0xeb09('0x3f')]({},_0xc057cf,_0x13d015[_0xeb09('0x41')]);var _0xfb1bba={'where':_0xc057cf['where']};return db[_0xeb09('0x2d')][_0xeb09('0x21')](_0xfb1bba)[_0xeb09('0x26')](function(_0x1cb1f9){_0x428938[_0xeb09('0x21')]=_0x1cb1f9;if(_0x13d015[_0xeb09('0x33')][_0xeb09('0x42')]){_0xc057cf[_0xeb09('0x43')]=[{'all':!![]}];}return db[_0xeb09('0x2d')][_0xeb09('0x44')](_0xc057cf);})[_0xeb09('0x26')](function(_0x11405f){_0x428938[_0xeb09('0x45')]=_0x11405f;return _0x428938;})[_0xeb09('0x26')](respondWithFilteredResult(_0x71d74f,_0xc057cf))['catch'](handleError(_0x71d74f,null));};exports[_0xeb09('0x46')]=function(_0x3965ef,_0x32a8f3){var _0x380990={'raw':![],'where':{'id':_0x3965ef[_0xeb09('0x47')]['id']}},_0x129447={};_0x129447['model']=_[_0xeb09('0x48')](db['FreshsalesAccount'][_0xeb09('0x2e')]);_0x129447[_0xeb09('0x33')]=_[_0xeb09('0x48')](_0x3965ef[_0xeb09('0x33')]);_0x129447[_0xeb09('0x34')]=_[_0xeb09('0x35')](_0x129447[_0xeb09('0x31')],_0x129447[_0xeb09('0x33')]);_0x380990[_0xeb09('0x36')]=_[_0xeb09('0x35')](_0x129447[_0xeb09('0x31')],qs['fields'](_0x3965ef['query'][_0xeb09('0x37')]));_0x380990[_0xeb09('0x36')]=_0x380990[_0xeb09('0x36')][_0xeb09('0x49')]?_0x380990[_0xeb09('0x36')]:_0x129447[_0xeb09('0x31')];if(_0x3965ef[_0xeb09('0x33')][_0xeb09('0x42')]){_0x380990[_0xeb09('0x43')]=[{'all':!![]}];}_0x380990=_[_0xeb09('0x3f')]({},_0x380990,_0x3965ef[_0xeb09('0x41')]);return db[_0xeb09('0x2d')][_0xeb09('0x4a')](_0x380990)['then'](handleEntityNotFound(_0x32a8f3,null))[_0xeb09('0x26')](respondWithResult(_0x32a8f3,null))[_0xeb09('0x4b')](handleError(_0x32a8f3,null));};exports[_0xeb09('0x4c')]=function(_0x31f429,_0x306b13){return db[_0xeb09('0x2d')][_0xeb09('0x4c')](_0x31f429[_0xeb09('0x4d')],{})['then'](respondWithResult(_0x306b13,0xc9))['catch'](handleError(_0x306b13,null));};exports[_0xeb09('0x25')]=function(_0x3eaf5b,_0x2c0d4a){if(_0x3eaf5b[_0xeb09('0x4d')]['id']){delete _0x3eaf5b[_0xeb09('0x4d')]['id'];}return db[_0xeb09('0x2d')][_0xeb09('0x4a')]({'where':{'id':_0x3eaf5b[_0xeb09('0x47')]['id']}})[_0xeb09('0x26')](handleEntityNotFound(_0x2c0d4a,null))[_0xeb09('0x26')](saveUpdates(_0x3eaf5b[_0xeb09('0x4d')],null))['then'](respondWithResult(_0x2c0d4a,null))[_0xeb09('0x4b')](handleError(_0x2c0d4a,null));};exports['destroy']=function(_0x525e99,_0x1a692e){return db[_0xeb09('0x2d')]['find']({'where':{'id':_0x525e99['params']['id']}})['then'](handleEntityNotFound(_0x1a692e,null))[_0xeb09('0x26')](removeEntity(_0x1a692e,null))[_0xeb09('0x4b')](handleError(_0x1a692e,null));};exports[_0xeb09('0x4e')]=function(_0x246dbf,_0x486406,_0x33219d){var _0xa1dc91={};var _0xb607e1={};var _0x40ff69;var _0x1eb7f3;return db[_0xeb09('0x2d')][_0xeb09('0x4f')]({'where':{'id':_0x246dbf[_0xeb09('0x47')]['id']}})[_0xeb09('0x26')](handleEntityNotFound(_0x486406,null))[_0xeb09('0x26')](function(_0x5e6189){if(_0x5e6189){_0x40ff69=_0x5e6189;_0xb607e1['model']=_['keys'](db[_0xeb09('0x50')][_0xeb09('0x2e')]);_0xb607e1[_0xeb09('0x33')]=_[_0xeb09('0x48')](_0x246dbf['query']);_0xb607e1[_0xeb09('0x34')]=_[_0xeb09('0x35')](_0xb607e1['model'],_0xb607e1[_0xeb09('0x33')]);_0xa1dc91['attributes']=_['intersection'](_0xb607e1[_0xeb09('0x31')],qs[_0xeb09('0x37')](_0x246dbf[_0xeb09('0x33')]['fields']));_0xa1dc91['attributes']=_0xa1dc91[_0xeb09('0x36')][_0xeb09('0x49')]?_0xa1dc91[_0xeb09('0x36')]:_0xb607e1[_0xeb09('0x31')];_0xa1dc91[_0xeb09('0x3a')]=qs[_0xeb09('0x3b')](_0x246dbf[_0xeb09('0x33')][_0xeb09('0x3b')]);_0xa1dc91[_0xeb09('0x3c')]=qs[_0xeb09('0x34')](_['pick'](_0x246dbf['query'],_0xb607e1['filters']));if(_0x246dbf[_0xeb09('0x33')]['filter']){_0xa1dc91[_0xeb09('0x3c')]=_['merge'](_0xa1dc91[_0xeb09('0x3c')],{'$or':_[_0xeb09('0x32')](_0xa1dc91[_0xeb09('0x36')],function(_0x587b02){var _0x2a59fa={};_0x2a59fa[_0x587b02]={'$like':'%'+_0x246dbf[_0xeb09('0x33')][_0xeb09('0x3e')]+'%'};return _0x2a59fa;})});}_0xa1dc91=_[_0xeb09('0x3f')]({},_0xa1dc91,_0x246dbf[_0xeb09('0x41')]);return _0x40ff69['getConfigurations'](_0xa1dc91);}})[_0xeb09('0x26')](function(_0x10538c){if(_0x10538c){_0x1eb7f3=_0x10538c[_0xeb09('0x49')];if(!_0x246dbf['query'][_0xeb09('0x38')](_0xeb09('0x39'))){_0xa1dc91['limit']=qs[_0xeb09('0x20')](_0x246dbf['query'][_0xeb09('0x20')]);_0xa1dc91[_0xeb09('0x1e')]=qs['offset'](_0x246dbf[_0xeb09('0x33')][_0xeb09('0x1e')]);}return _0x40ff69[_0xeb09('0x4e')](_0xa1dc91);}})['then'](function(_0x3de9e0){if(_0x3de9e0){return _0x3de9e0?{'count':_0x1eb7f3,'rows':_0x3de9e0}:null;}})[_0xeb09('0x26')](respondWithResult(_0x486406,null))[_0xeb09('0x4b')](handleError(_0x486406,null));};exports['addConfiguration']=function(_0x4d0611,_0x36b906,_0x5a9f1d){if(_0x4d0611[_0xeb09('0x4d')]['id']){delete _0x4d0611[_0xeb09('0x4d')]['id'];}return db['FreshsalesAccount']['findOne']({'where':{'id':_0x4d0611[_0xeb09('0x47')]['id']}})[_0xeb09('0x26')](handleEntityNotFound(_0x36b906,null))[_0xeb09('0x26')](function(_0x3a3f69){if(_0x3a3f69){_0x4d0611[_0xeb09('0x4d')][_0xeb09('0x51')]=_0x3a3f69['id'];_0x4d0611[_0xeb09('0x4d')]['Subjects']=integrations['getSubjects'](_0x4d0611[_0xeb09('0x4d')][_0xeb09('0x52')],_0x4d0611['body'][_0xeb09('0x2f')]);_0x4d0611[_0xeb09('0x4d')]['Descriptions']=integrations[_0xeb09('0x53')](_0x4d0611[_0xeb09('0x4d')][_0xeb09('0x52')],_0x4d0611[_0xeb09('0x4d')][_0xeb09('0x2f')]);return db[_0xeb09('0x50')][_0xeb09('0x4c')](_0x4d0611[_0xeb09('0x4d')],{'include':[{'model':db[_0xeb09('0x54')],'as':_0xeb09('0x55')},{'model':db[_0xeb09('0x54')],'as':_0xeb09('0x56')}]});}return null;})['then'](respondWithResult(_0x36b906,null))['catch'](handleError(_0x36b906,null));};exports[_0xeb09('0x57')]=function(_0x2306bd,_0x2fe793,_0x425fb0){var _0x42eeea='';var _0xb15534='';return db['FreshsalesAccount'][_0xeb09('0x4f')]({'where':{'id':_0x2306bd[_0xeb09('0x47')]['id']},'attributes':['id',_0xeb09('0x58'),_0xeb09('0x59'),_0xeb09('0x5a')]})[_0xeb09('0x26')](handleEntityNotFound(_0x2fe793,null))[_0xeb09('0x26')](function(_0x481a7b){if(_0x481a7b){_0xb15534=_0x481a7b[_0xeb09('0x58')];_0x42eeea=_0x481a7b['remoteUri'];var _0x3ed853=_0x481a7b['remoteUri'][_0xeb09('0x5b')](-0x1);if(_0x3ed853==='/'){_0x42eeea=_0x42eeea[_0xeb09('0x5c')](0x0,_0x42eeea[_0xeb09('0x5d')](_0x3ed853));}return rp({'method':_0xeb09('0x5e'),'uri':util['format'](_0xeb09('0x5f'),_0x42eeea,_0xeb09('0x60')),'headers':{'Authorization':_0xeb09('0x61')+_0x481a7b[_0xeb09('0x5a')]},'json':!![]});}})[_0xeb09('0x26')](function(_0x5bc497){if(_0x5bc497){var _0x9c3e00=_0x5bc497[_0xeb09('0x62')];var _0xf3d006=![];var _0x2be6f9=null;for(_0x2be6f9=0x0;_0x2be6f9<_0x9c3e00[_0xeb09('0x49')];_0x2be6f9++){if(_0x9c3e00[_0x2be6f9]['email']===_0xb15534){_0xf3d006=!![];}}if(_0xf3d006){return!![];}else{throw new Error({'statusCode':0x194,'message':_0xeb09('0x63')});}}})['then'](respondWithResult(_0x2fe793,null))['catch'](function(_0x59fa97){var _0x15e07d=_0x2306bd[_0xeb09('0x33')][_0xeb09('0x64')]?0x1f4:_0x59fa97[_0xeb09('0x65')]||0x1f4;logger['error'](_0xeb09('0x66'),_0xeb09('0x57'),_0x15e07d,JSON['stringify'](_0x59fa97));delete _0x59fa97['name'];if(_0x15e07d===0x191){_0x15e07d=0x190;}_0x2fe793[_0xeb09('0x1b')](_0x15e07d)['send'](_0x2306bd[_0xeb09('0x33')][_0xeb09('0x64')]?{'message':_0xeb09('0x67'),'statusCode':_0x59fa97[_0xeb09('0x65')]}:_0x59fa97);});};
\ No newline at end of file
index f674d6c..6108946 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4975=['path','rimraf','../../config/environment','./intFreshsalesAccount.attributes','../../components/integrations/configuration','define','FreshsalesAccount','int_freshsales_accounts','lodash','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x285505,_0x265976){var _0x3366af=function(_0x15087b){while(--_0x15087b){_0x285505['push'](_0x285505['shift']());}};_0x3366af(++_0x265976);}(_0x4975,0x86));var _0x5497=function(_0x5b92a7,_0x178d00){_0x5b92a7=_0x5b92a7-0x0;var _0x446c20=_0x4975[_0x5b92a7];return _0x446c20;};'use strict';var _=require(_0x5497('0x0'));var util=require('util');var logger=require(_0x5497('0x1'))(_0x5497('0x2'));var moment=require(_0x5497('0x3'));var BPromise=require(_0x5497('0x4'));var rp=require(_0x5497('0x5'));var fs=require('fs');var path=require(_0x5497('0x6'));var rimraf=require(_0x5497('0x7'));var config=require(_0x5497('0x8'));var attributes=require(_0x5497('0x9'));var integrations=require(_0x5497('0xa'));module['exports']=function(_0x37e48d,_0x4f563d){return _0x37e48d[_0x5497('0xb')](_0x5497('0xc'),attributes,{'tableName':_0x5497('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xadb5=['../../components/integrations/configuration','exports','define','FreshsalesAccount','int_freshsales_accounts','util','api','moment','bluebird','path','rimraf','../../config/environment'];(function(_0x6cf19c,_0x2f3f02){var _0xce14f3=function(_0x474587){while(--_0x474587){_0x6cf19c['push'](_0x6cf19c['shift']());}};_0xce14f3(++_0x2f3f02);}(_0xadb5,0xad));var _0x5adb=function(_0x5e6a49,_0x47f003){_0x5e6a49=_0x5e6a49-0x0;var _0x17cc26=_0xadb5[_0x5e6a49];return _0x17cc26;};'use strict';var _=require('lodash');var util=require(_0x5adb('0x0'));var logger=require('../../config/logger')(_0x5adb('0x1'));var moment=require(_0x5adb('0x2'));var BPromise=require(_0x5adb('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x5adb('0x4'));var rimraf=require(_0x5adb('0x5'));var config=require(_0x5adb('0x6'));var attributes=require('./intFreshsalesAccount.attributes');var integrations=require(_0x5adb('0x7'));module[_0x5adb('0x8')]=function(_0x3e2555,_0x3213e8){return _0x3e2555[_0x5adb('0x9')](_0x5adb('0xa'),attributes,{'tableName':_0x5adb('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 961bdf7..dcd21e5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe5af=['ShowFreshsalesAccount','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','jayson/promise','client','then','FreshsalesAccount,\x20%s,\x20%s','request\x20sent','FreshsalesAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','catch','GetFreshsalesAccount','FreshsalesAccount','findAll','options','where','attributes','include','model','map','find','raw','debug'];(function(_0x4e9d3c,_0x1f4b98){var _0x2d0825=function(_0x384676){while(--_0x384676){_0x4e9d3c['push'](_0x4e9d3c['shift']());}};_0x2d0825(++_0x1f4b98);}(_0xe5af,0x9c));var _0xfe5a=function(_0x4bcfc5,_0x1de741){_0x4bcfc5=_0x4bcfc5-0x0;var _0x3b1ed1=_0xe5af[_0x4bcfc5];return _0x3b1ed1;};'use strict';var _=require('lodash');var util=require(_0xfe5a('0x0'));var moment=require(_0xfe5a('0x1'));var BPromise=require('bluebird');var rs=require(_0xfe5a('0x2'));var fs=require('fs');var Redis=require(_0xfe5a('0x3'));var db=require(_0xfe5a('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xfe5a('0x5'))('rpc');var config=require('../../config/environment');var jayson=require(_0xfe5a('0x6'));var client=jayson[_0xfe5a('0x7')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5eea2e,_0x356c69,_0x106492){return new BPromise(function(_0xfb4357,_0x3e683c){return client['request'](_0x5eea2e,_0x106492)[_0xfe5a('0x8')](function(_0x5a48ff){logger['info'](_0xfe5a('0x9'),_0x356c69,_0xfe5a('0xa'));logger['debug'](_0xfe5a('0xb'),_0x356c69,_0xfe5a('0xa'),JSON[_0xfe5a('0xc')](_0x5a48ff));if(_0x5a48ff[_0xfe5a('0xd')]){if(_0x5a48ff[_0xfe5a('0xd')]['code']===0x1f4){logger[_0xfe5a('0xd')](_0xfe5a('0x9'),_0x356c69,_0x5a48ff[_0xfe5a('0xd')][_0xfe5a('0xe')]);return _0x3e683c(_0x5a48ff[_0xfe5a('0xd')]['message']);}logger[_0xfe5a('0xd')](_0xfe5a('0x9'),_0x356c69,_0x5a48ff[_0xfe5a('0xd')][_0xfe5a('0xe')]);return _0xfb4357(_0x5a48ff[_0xfe5a('0xd')][_0xfe5a('0xe')]);}else{logger[_0xfe5a('0xf')](_0xfe5a('0x9'),_0x356c69,_0xfe5a('0xa'));_0xfb4357(_0x5a48ff[_0xfe5a('0x10')][_0xfe5a('0xe')]);}})[_0xfe5a('0x11')](function(_0x22afa7){logger[_0xfe5a('0xd')](_0xfe5a('0x9'),_0x356c69,_0x22afa7);_0x3e683c(_0x22afa7);});});}exports[_0xfe5a('0x12')]=function(_0x5bf597){var _0x20620b=this;return new Promise(function(_0x456707,_0x54d5fb){return db[_0xfe5a('0x13')][_0xfe5a('0x14')]({'raw':_0x5bf597[_0xfe5a('0x15')]?_0x5bf597['options']['raw']===undefined?!![]:![]:!![],'where':_0x5bf597[_0xfe5a('0x15')]?_0x5bf597[_0xfe5a('0x15')][_0xfe5a('0x16')]||null:null,'attributes':_0x5bf597[_0xfe5a('0x15')]?_0x5bf597[_0xfe5a('0x15')][_0xfe5a('0x17')]||null:null,'limit':_0x5bf597['options']?_0x5bf597[_0xfe5a('0x15')]['limit']||null:null,'include':_0x5bf597[_0xfe5a('0x15')]?_0x5bf597[_0xfe5a('0x15')][_0xfe5a('0x18')]?_['map'](_0x5bf597['options'][_0xfe5a('0x18')],function(_0x3e55fd){return{'model':db[_0x3e55fd['model']],'as':_0x3e55fd['as'],'attributes':_0x3e55fd[_0xfe5a('0x17')],'include':_0x3e55fd[_0xfe5a('0x18')]?_['map'](_0x3e55fd[_0xfe5a('0x18')],function(_0x3a4f3c){return{'model':db[_0x3a4f3c[_0xfe5a('0x19')]],'as':_0x3a4f3c['as'],'attributes':_0x3a4f3c[_0xfe5a('0x17')],'include':_0x3a4f3c['include']?_[_0xfe5a('0x1a')](_0x3a4f3c[_0xfe5a('0x18')],function(_0x24481f){return{'model':db[_0x24481f[_0xfe5a('0x19')]],'as':_0x24481f['as'],'attributes':_0x24481f[_0xfe5a('0x17')]};}):[]};}):[]};}):[]:[]})[_0xfe5a('0x8')](function(_0xdbf1e0){logger[_0xfe5a('0xf')]('GetFreshsalesAccount',_0x5bf597);logger['debug'](_0xfe5a('0x12'),_0x5bf597,JSON['stringify'](_0xdbf1e0));_0x456707(_0xdbf1e0);})[_0xfe5a('0x11')](function(_0xfcb05b){logger[_0xfe5a('0xd')]('GetFreshsalesAccount',_0xfcb05b['message'],_0x5bf597);_0x54d5fb(_0x20620b['error'](0x1f4,_0xfcb05b[_0xfe5a('0xe')]));});});};exports['ShowFreshsalesAccount']=function(_0x51d1f4){var _0x498b64=this;return new Promise(function(_0x3b6e4d,_0x14c66d){return db[_0xfe5a('0x13')][_0xfe5a('0x1b')]({'raw':_0x51d1f4[_0xfe5a('0x15')]?_0x51d1f4[_0xfe5a('0x15')][_0xfe5a('0x1c')]===undefined?!![]:![]:!![],'where':_0x51d1f4[_0xfe5a('0x15')]?_0x51d1f4[_0xfe5a('0x15')][_0xfe5a('0x16')]||null:null,'attributes':_0x51d1f4[_0xfe5a('0x15')]?_0x51d1f4['options'][_0xfe5a('0x17')]||null:null,'include':_0x51d1f4[_0xfe5a('0x15')]?_0x51d1f4['options'][_0xfe5a('0x18')]?_[_0xfe5a('0x1a')](_0x51d1f4[_0xfe5a('0x15')][_0xfe5a('0x18')],function(_0xe5a992){return{'model':db[_0xe5a992['model']],'as':_0xe5a992['as'],'attributes':_0xe5a992['attributes'],'include':_0xe5a992[_0xfe5a('0x18')]?_['map'](_0xe5a992[_0xfe5a('0x18')],function(_0xb31d0){return{'model':db[_0xb31d0[_0xfe5a('0x19')]],'as':_0xb31d0['as'],'attributes':_0xb31d0[_0xfe5a('0x17')],'include':_0xb31d0['include']?_[_0xfe5a('0x1a')](_0xb31d0[_0xfe5a('0x18')],function(_0x2e3a36){return{'model':db[_0x2e3a36['model']],'as':_0x2e3a36['as'],'attributes':_0x2e3a36[_0xfe5a('0x17')]};}):[]};}):[]};}):[]:[]})[_0xfe5a('0x8')](function(_0x4617f0){logger[_0xfe5a('0xf')]('ShowFreshsalesAccount',_0x51d1f4);logger[_0xfe5a('0x1d')]('ShowFreshsalesAccount',_0x51d1f4,JSON[_0xfe5a('0xc')](_0x4617f0));_0x3b6e4d(_0x4617f0);})[_0xfe5a('0x11')](function(_0x576189){logger[_0xfe5a('0xd')](_0xfe5a('0x1e'),_0x576189[_0xfe5a('0xe')],_0x51d1f4);_0x14c66d(_0x498b64[_0xfe5a('0xd')](0x1f4,_0x576189['message']));});});};
\ No newline at end of file
+var _0x7096=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','FreshsalesAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','GetFreshsalesAccount','FreshsalesAccount','options','raw','where','attributes','limit','include','map','model','find','ShowFreshsalesAccount','util','bluebird','ioredis','../../mysqldb'];(function(_0x5ea2f9,_0x320917){var _0x36e586=function(_0x2e79a2){while(--_0x2e79a2){_0x5ea2f9['push'](_0x5ea2f9['shift']());}};_0x36e586(++_0x320917);}(_0x7096,0x10c));var _0x6709=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x7096[_0x501510];return _0x1e6ee5;};'use strict';var _=require('lodash');var util=require(_0x6709('0x0'));var moment=require('moment');var BPromise=require(_0x6709('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6709('0x2'));var db=require(_0x6709('0x3'))['db'];var utils=require(_0x6709('0x4'));var logger=require(_0x6709('0x5'))(_0x6709('0x6'));var config=require(_0x6709('0x7'));var jayson=require(_0x6709('0x8'));var client=jayson[_0x6709('0x9')][_0x6709('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3e2223,_0x11ad23,_0x985814){return new BPromise(function(_0x30147f,_0x513ab6){return client['request'](_0x3e2223,_0x985814)[_0x6709('0xb')](function(_0x2d8c0b){logger[_0x6709('0xc')](_0x6709('0xd'),_0x11ad23,_0x6709('0xe'));logger[_0x6709('0xf')]('FreshsalesAccount,\x20%s,\x20%s,\x20%s',_0x11ad23,'request\x20sent',JSON[_0x6709('0x10')](_0x2d8c0b));if(_0x2d8c0b[_0x6709('0x11')]){if(_0x2d8c0b[_0x6709('0x11')][_0x6709('0x12')]===0x1f4){logger[_0x6709('0x11')](_0x6709('0xd'),_0x11ad23,_0x2d8c0b[_0x6709('0x11')][_0x6709('0x13')]);return _0x513ab6(_0x2d8c0b['error'][_0x6709('0x13')]);}logger[_0x6709('0x11')](_0x6709('0xd'),_0x11ad23,_0x2d8c0b[_0x6709('0x11')]['message']);return _0x30147f(_0x2d8c0b[_0x6709('0x11')]['message']);}else{logger[_0x6709('0xc')]('FreshsalesAccount,\x20%s,\x20%s',_0x11ad23,_0x6709('0xe'));_0x30147f(_0x2d8c0b[_0x6709('0x14')][_0x6709('0x13')]);}})[_0x6709('0x15')](function(_0x4cab30){logger['error']('FreshsalesAccount,\x20%s,\x20%s',_0x11ad23,_0x4cab30);_0x513ab6(_0x4cab30);});});}exports[_0x6709('0x16')]=function(_0x235a54){var _0x4a732e=this;return new Promise(function(_0x9c1fd8,_0x166c97){return db[_0x6709('0x17')]['findAll']({'raw':_0x235a54[_0x6709('0x18')]?_0x235a54[_0x6709('0x18')][_0x6709('0x19')]===undefined?!![]:![]:!![],'where':_0x235a54[_0x6709('0x18')]?_0x235a54['options'][_0x6709('0x1a')]||null:null,'attributes':_0x235a54[_0x6709('0x18')]?_0x235a54[_0x6709('0x18')][_0x6709('0x1b')]||null:null,'limit':_0x235a54[_0x6709('0x18')]?_0x235a54[_0x6709('0x18')][_0x6709('0x1c')]||null:null,'include':_0x235a54[_0x6709('0x18')]?_0x235a54[_0x6709('0x18')][_0x6709('0x1d')]?_[_0x6709('0x1e')](_0x235a54[_0x6709('0x18')]['include'],function(_0x29f25f){return{'model':db[_0x29f25f[_0x6709('0x1f')]],'as':_0x29f25f['as'],'attributes':_0x29f25f[_0x6709('0x1b')],'include':_0x29f25f['include']?_[_0x6709('0x1e')](_0x29f25f[_0x6709('0x1d')],function(_0x20a347){return{'model':db[_0x20a347[_0x6709('0x1f')]],'as':_0x20a347['as'],'attributes':_0x20a347['attributes'],'include':_0x20a347[_0x6709('0x1d')]?_[_0x6709('0x1e')](_0x20a347['include'],function(_0x585073){return{'model':db[_0x585073[_0x6709('0x1f')]],'as':_0x585073['as'],'attributes':_0x585073['attributes']};}):[]};}):[]};}):[]:[]})[_0x6709('0xb')](function(_0x2499a2){logger['info'](_0x6709('0x16'),_0x235a54);logger['debug'](_0x6709('0x16'),_0x235a54,JSON[_0x6709('0x10')](_0x2499a2));_0x9c1fd8(_0x2499a2);})['catch'](function(_0x137137){logger['error'](_0x6709('0x16'),_0x137137[_0x6709('0x13')],_0x235a54);_0x166c97(_0x4a732e['error'](0x1f4,_0x137137[_0x6709('0x13')]));});});};exports['ShowFreshsalesAccount']=function(_0x138318){var _0x135f46=this;return new Promise(function(_0x4b93b2,_0x564dcb){return db[_0x6709('0x17')][_0x6709('0x20')]({'raw':_0x138318[_0x6709('0x18')]?_0x138318[_0x6709('0x18')][_0x6709('0x19')]===undefined?!![]:![]:!![],'where':_0x138318[_0x6709('0x18')]?_0x138318[_0x6709('0x18')][_0x6709('0x1a')]||null:null,'attributes':_0x138318[_0x6709('0x18')]?_0x138318['options'][_0x6709('0x1b')]||null:null,'include':_0x138318[_0x6709('0x18')]?_0x138318[_0x6709('0x18')][_0x6709('0x1d')]?_['map'](_0x138318[_0x6709('0x18')][_0x6709('0x1d')],function(_0x124e01){return{'model':db[_0x124e01[_0x6709('0x1f')]],'as':_0x124e01['as'],'attributes':_0x124e01['attributes'],'include':_0x124e01[_0x6709('0x1d')]?_[_0x6709('0x1e')](_0x124e01['include'],function(_0x8952f1){return{'model':db[_0x8952f1[_0x6709('0x1f')]],'as':_0x8952f1['as'],'attributes':_0x8952f1['attributes'],'include':_0x8952f1[_0x6709('0x1d')]?_[_0x6709('0x1e')](_0x8952f1[_0x6709('0x1d')],function(_0xf30c4c){return{'model':db[_0xf30c4c[_0x6709('0x1f')]],'as':_0xf30c4c['as'],'attributes':_0xf30c4c[_0x6709('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x6709('0xb')](function(_0x4bfed4){logger[_0x6709('0xc')](_0x6709('0x21'),_0x138318);logger['debug'](_0x6709('0x21'),_0x138318,JSON[_0x6709('0x10')](_0x4bfed4));_0x4b93b2(_0x4bfed4);})[_0x6709('0x15')](function(_0x2bb89c){logger[_0x6709('0x11')](_0x6709('0x21'),_0x2bb89c['message'],_0x138318);_0x564dcb(_0x135f46[_0x6709('0x11')](0x1f4,_0x2bb89c['message']));});});};
\ No newline at end of file
index e14af0a..d3e15c4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xafee=['update','delete','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshsalesConfiguration.controller','index','/:id','isAuthenticated','show','/:id/subjects','getSubjects','get','/:id/descriptions','getDescriptions','create','put'];(function(_0x254ced,_0x4d0897){var _0x3b81ca=function(_0x59e7ad){while(--_0x59e7ad){_0x254ced['push'](_0x254ced['shift']());}};_0x3b81ca(++_0x4d0897);}(_0xafee,0x7b));var _0xeafe=function(_0x32f7d7,_0x54231b){_0x32f7d7=_0x32f7d7-0x0;var _0x133d09=_0xafee[_0x32f7d7];return _0x133d09;};'use strict';var multer=require(_0xeafe('0x0'));var util=require(_0xeafe('0x1'));var path=require(_0xeafe('0x2'));var timeout=require('connect-timeout');var express=require(_0xeafe('0x3'));var router=express[_0xeafe('0x4')]();var fs_extra=require(_0xeafe('0x5'));var auth=require(_0xeafe('0x6'));var interaction=require(_0xeafe('0x7'));var config=require(_0xeafe('0x8'));var controller=require(_0xeafe('0x9'));router['get']('/',auth['isAuthenticated'](),controller[_0xeafe('0xa')]);router['get'](_0xeafe('0xb'),auth[_0xeafe('0xc')](),controller[_0xeafe('0xd')]);router['get'](_0xeafe('0xe'),auth[_0xeafe('0xc')](),controller[_0xeafe('0xf')]);router[_0xeafe('0x10')](_0xeafe('0x11'),auth[_0xeafe('0xc')](),controller[_0xeafe('0x12')]);router['get']('/:id/fields',auth[_0xeafe('0xc')](),controller['getFields']);router['post']('/',auth[_0xeafe('0xc')](),controller[_0xeafe('0x13')]);router[_0xeafe('0x14')](_0xeafe('0xb'),auth[_0xeafe('0xc')](),controller[_0xeafe('0x15')]);router[_0xeafe('0x16')]('/:id',auth[_0xeafe('0xc')](),controller['destroy']);module[_0xeafe('0x17')]=router;
\ No newline at end of file
+var _0xa3d7=['getFields','post','create','put','update','delete','destroy','multer','util','path','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./intFreshsalesConfiguration.controller','index','get','/:id','isAuthenticated','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','/:id/fields'];(function(_0x41d02a,_0x355e19){var _0x4c3983=function(_0x4802a7){while(--_0x4802a7){_0x41d02a['push'](_0x41d02a['shift']());}};_0x4c3983(++_0x355e19);}(_0xa3d7,0xe8));var _0x7a3d=function(_0x32bb6b,_0x1a5fbe){_0x32bb6b=_0x32bb6b-0x0;var _0x58dcb4=_0xa3d7[_0x32bb6b];return _0x58dcb4;};'use strict';var multer=require(_0x7a3d('0x0'));var util=require(_0x7a3d('0x1'));var path=require(_0x7a3d('0x2'));var timeout=require(_0x7a3d('0x3'));var express=require(_0x7a3d('0x4'));var router=express[_0x7a3d('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x7a3d('0x6'));var config=require(_0x7a3d('0x7'));var controller=require(_0x7a3d('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0x7a3d('0x9')]);router[_0x7a3d('0xa')](_0x7a3d('0xb'),auth[_0x7a3d('0xc')](),controller['show']);router['get'](_0x7a3d('0xd'),auth[_0x7a3d('0xc')](),controller[_0x7a3d('0xe')]);router[_0x7a3d('0xa')](_0x7a3d('0xf'),auth[_0x7a3d('0xc')](),controller[_0x7a3d('0x10')]);router[_0x7a3d('0xa')](_0x7a3d('0x11'),auth[_0x7a3d('0xc')](),controller[_0x7a3d('0x12')]);router[_0x7a3d('0x13')]('/',auth[_0x7a3d('0xc')](),controller[_0x7a3d('0x14')]);router[_0x7a3d('0x15')](_0x7a3d('0xb'),auth[_0x7a3d('0xc')](),controller[_0x7a3d('0x16')]);router[_0x7a3d('0x17')]('/:id',auth[_0x7a3d('0xc')](),controller[_0x7a3d('0x18')]);module['exports']=router;
\ No newline at end of file
index 6f76429..ae5cc24 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x57c8=['STRING'];(function(_0x3b4875,_0x8c5ddf){var _0x15d576=function(_0x58ee4c){while(--_0x58ee4c){_0x3b4875['push'](_0x3b4875['shift']());}};_0x15d576(++_0x8c5ddf);}(_0x57c8,0x180));var _0x857c=function(_0xb025c8,_0x24bcc9){_0xb025c8=_0xb025c8-0x0;var _0x5cddfc=_0x57c8[_0xb025c8];return _0x5cddfc;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x857c('0x0')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xa93a=['STRING'];(function(_0x38a155,_0x2aa026){var _0x269403=function(_0x47263b){while(--_0x47263b){_0x38a155['push'](_0x38a155['shift']());}};_0x269403(++_0x2aa026);}(_0xa93a,0x1f3));var _0xaa93=function(_0x3753e4,_0x29beeb){_0x3753e4=_0x3753e4-0x0;var _0x1ce9e0=_0xa93a[_0x3753e4];return _0x1ce9e0;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xaa93('0x0')]},'description':{'type':Sequelize[_0xaa93('0x0')]}};
\ No newline at end of file
index b0295fb..512ea3b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf122=['order','sort','where','filters','pick','filter','merge','VIRTUAL','includeAll','include','findAll','rows','catch','show','params','find','create','body','getSubjects','findOne','FreshsalesField','options','nolimit','getDescriptions','getFields','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','set','apply','reject','update','then','destroy','error','stack','name','send','map','FreshsalesConfiguration','rawAttributes','fieldName','type','key','query','keys','intersection','model','attributes','fields','length','hasOwnProperty'];(function(_0x3a3ebe,_0x36a3f8){var _0x27ec79=function(_0x26c859){while(--_0x26c859){_0x3a3ebe['push'](_0x3a3ebe['shift']());}};_0x27ec79(++_0x36a3f8);}(_0xf122,0x10f));var _0x2f12=function(_0x1f5d8c,_0x4c1faf){_0x1f5d8c=_0x1f5d8c-0x0;var _0x3847d0=_0xf122[_0x1f5d8c];return _0x3847d0;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x2f12('0x0'));var jsonpatch=require(_0x2f12('0x1'));var rp=require(_0x2f12('0x2'));var moment=require(_0x2f12('0x3'));var BPromise=require(_0x2f12('0x4'));var Mustache=require('mustache');var util=require(_0x2f12('0x5'));var path=require(_0x2f12('0x6'));var sox=require(_0x2f12('0x7'));var csv=require(_0x2f12('0x8'));var ejs=require(_0x2f12('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x2f12('0xa'));var squel=require('squel');var crypto=require(_0x2f12('0xb'));var jsforce=require(_0x2f12('0xc'));var deskjs=require(_0x2f12('0xd'));var toCsv=require(_0x2f12('0x8'));var querystring=require(_0x2f12('0xe'));var Papa=require('papaparse');var Redis=require(_0x2f12('0xf'));var authService=require(_0x2f12('0x10'));var qs=require(_0x2f12('0x11'));var as=require(_0x2f12('0x12'));var hardwareService=require(_0x2f12('0x13'));var logger=require('../../config/logger')(_0x2f12('0x14'));var utils=require(_0x2f12('0x15'));var config=require(_0x2f12('0x16'));var licenseUtil=require(_0x2f12('0x17'));var db=require(_0x2f12('0x18'))['db'];function respondWithStatusCode(_0x4c64b0,_0x41a9e4){_0x41a9e4=_0x41a9e4||0xcc;return function(_0x249dc3){if(_0x249dc3){return _0x4c64b0[_0x2f12('0x19')](_0x41a9e4);}return _0x4c64b0[_0x2f12('0x1a')](_0x41a9e4)[_0x2f12('0x1b')]();};}function respondWithResult(_0xad5c6c,_0x4fa54d){_0x4fa54d=_0x4fa54d||0xc8;return function(_0x557a3f){if(_0x557a3f){return _0xad5c6c['status'](_0x4fa54d)[_0x2f12('0x1c')](_0x557a3f);}};}function respondWithFilteredResult(_0x4bce8e,_0x2e589b){return function(_0x3ad97f){if(_0x3ad97f){var _0x49777b=typeof _0x2e589b['offset']===_0x2f12('0x1d')&&typeof _0x2e589b[_0x2f12('0x1e')]===_0x2f12('0x1d');var _0x2c11f3=_0x3ad97f[_0x2f12('0x1f')];var _0x4749b4=_0x49777b?0x0:_0x2e589b[_0x2f12('0x20')];var _0x7d400d=_0x49777b?_0x3ad97f[_0x2f12('0x1f')]:_0x2e589b['offset']+_0x2e589b[_0x2f12('0x1e')];var _0x512960;if(_0x7d400d>=_0x2c11f3){_0x7d400d=_0x2c11f3;_0x512960=0xc8;}else{_0x512960=0xce;}_0x4bce8e[_0x2f12('0x1a')](_0x512960);return _0x4bce8e[_0x2f12('0x21')]('Content-Range',_0x4749b4+'-'+_0x7d400d+'/'+_0x2c11f3)[_0x2f12('0x1c')](_0x3ad97f);}return null;};}function patchUpdates(_0x5411c2){return function(_0x177927){try{jsonpatch[_0x2f12('0x22')](_0x177927,_0x5411c2,!![]);}catch(_0x1e0c50){return BPromise[_0x2f12('0x23')](_0x1e0c50);}return _0x177927['save']();};}function saveUpdates(_0xc5c518,_0x5d8999){return function(_0x2f67b6){if(_0x2f67b6){return _0x2f67b6[_0x2f12('0x24')](_0xc5c518)[_0x2f12('0x25')](function(_0x6b71f7){return _0x6b71f7;});}return null;};}function removeEntity(_0x5c977b,_0x321e0b){return function(_0x5d59d7){if(_0x5d59d7){return _0x5d59d7[_0x2f12('0x26')]()['then'](function(){_0x5c977b[_0x2f12('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1cac06,_0x167182){return function(_0xa1715f){if(!_0xa1715f){_0x1cac06['sendStatus'](0x194);}return _0xa1715f;};}function handleError(_0x3684fd,_0x57db23){_0x57db23=_0x57db23||0x1f4;return function(_0x51ee9d){logger[_0x2f12('0x27')](_0x51ee9d[_0x2f12('0x28')]);if(_0x51ee9d[_0x2f12('0x29')]){delete _0x51ee9d['name'];}_0x3684fd[_0x2f12('0x1a')](_0x57db23)[_0x2f12('0x2a')](_0x51ee9d);};}exports['index']=function(_0x399a48,_0x45570c){var _0x204f81={},_0x542a45={},_0x5b52fc={'count':0x0,'rows':[]};var _0x33d0b2=_[_0x2f12('0x2b')](db[_0x2f12('0x2c')][_0x2f12('0x2d')],function(_0x12b3e2){return{'name':_0x12b3e2[_0x2f12('0x2e')],'type':_0x12b3e2[_0x2f12('0x2f')][_0x2f12('0x30')]};});_0x542a45['model']=_[_0x2f12('0x2b')](_0x33d0b2,_0x2f12('0x29'));_0x542a45[_0x2f12('0x31')]=_[_0x2f12('0x32')](_0x399a48[_0x2f12('0x31')]);_0x542a45['filters']=_[_0x2f12('0x33')](_0x542a45[_0x2f12('0x34')],_0x542a45[_0x2f12('0x31')]);_0x204f81[_0x2f12('0x35')]=_[_0x2f12('0x33')](_0x542a45[_0x2f12('0x34')],qs[_0x2f12('0x36')](_0x399a48[_0x2f12('0x31')][_0x2f12('0x36')]));_0x204f81[_0x2f12('0x35')]=_0x204f81[_0x2f12('0x35')][_0x2f12('0x37')]?_0x204f81[_0x2f12('0x35')]:_0x542a45[_0x2f12('0x34')];if(!_0x399a48[_0x2f12('0x31')][_0x2f12('0x38')]('nolimit')){_0x204f81[_0x2f12('0x1e')]=qs['limit'](_0x399a48[_0x2f12('0x31')][_0x2f12('0x1e')]);_0x204f81[_0x2f12('0x20')]=qs[_0x2f12('0x20')](_0x399a48[_0x2f12('0x31')][_0x2f12('0x20')]);}_0x204f81[_0x2f12('0x39')]=qs[_0x2f12('0x3a')](_0x399a48[_0x2f12('0x31')][_0x2f12('0x3a')]);_0x204f81[_0x2f12('0x3b')]=qs[_0x2f12('0x3c')](_[_0x2f12('0x3d')](_0x399a48[_0x2f12('0x31')],_0x542a45[_0x2f12('0x3c')]),_0x33d0b2);if(_0x399a48[_0x2f12('0x31')][_0x2f12('0x3e')]){_0x204f81[_0x2f12('0x3b')]=_[_0x2f12('0x3f')](_0x204f81[_0x2f12('0x3b')],{'$or':_[_0x2f12('0x2b')](_0x33d0b2,function(_0x4dfdc9){if(_0x4dfdc9[_0x2f12('0x2f')]!==_0x2f12('0x40')){var _0x436efd={};_0x436efd[_0x4dfdc9['name']]={'$like':'%'+_0x399a48[_0x2f12('0x31')][_0x2f12('0x3e')]+'%'};return _0x436efd;}})});}_0x204f81=_['merge']({},_0x204f81,_0x399a48['options']);var _0x14808b={'where':_0x204f81[_0x2f12('0x3b')]};return db[_0x2f12('0x2c')]['count'](_0x14808b)[_0x2f12('0x25')](function(_0x3ec7a8){_0x5b52fc[_0x2f12('0x1f')]=_0x3ec7a8;if(_0x399a48['query'][_0x2f12('0x41')]){_0x204f81[_0x2f12('0x42')]=[{'all':!![]}];}return db['FreshsalesConfiguration'][_0x2f12('0x43')](_0x204f81);})[_0x2f12('0x25')](function(_0x7cab90){_0x5b52fc[_0x2f12('0x44')]=_0x7cab90;return _0x5b52fc;})[_0x2f12('0x25')](respondWithFilteredResult(_0x45570c,_0x204f81))[_0x2f12('0x45')](handleError(_0x45570c,null));};exports[_0x2f12('0x46')]=function(_0x3c38ba,_0x18db1e){var _0x1fbf1f={'raw':![],'where':{'id':_0x3c38ba[_0x2f12('0x47')]['id']}},_0x449a30={};_0x449a30[_0x2f12('0x34')]=_[_0x2f12('0x32')](db[_0x2f12('0x2c')][_0x2f12('0x2d')]);_0x449a30['query']=_[_0x2f12('0x32')](_0x3c38ba[_0x2f12('0x31')]);_0x449a30['filters']=_[_0x2f12('0x33')](_0x449a30['model'],_0x449a30[_0x2f12('0x31')]);_0x1fbf1f[_0x2f12('0x35')]=_[_0x2f12('0x33')](_0x449a30[_0x2f12('0x34')],qs[_0x2f12('0x36')](_0x3c38ba['query'][_0x2f12('0x36')]));_0x1fbf1f['attributes']=_0x1fbf1f[_0x2f12('0x35')]['length']?_0x1fbf1f[_0x2f12('0x35')]:_0x449a30['model'];if(_0x3c38ba[_0x2f12('0x31')]['includeAll']){_0x1fbf1f[_0x2f12('0x42')]=[{'all':!![]}];}_0x1fbf1f=_[_0x2f12('0x3f')]({},_0x1fbf1f,_0x3c38ba['options']);return db['FreshsalesConfiguration'][_0x2f12('0x48')](_0x1fbf1f)['then'](handleEntityNotFound(_0x18db1e,null))[_0x2f12('0x25')](respondWithResult(_0x18db1e,null))[_0x2f12('0x45')](handleError(_0x18db1e,null));};exports[_0x2f12('0x49')]=function(_0x5eae96,_0x5293bc){return db[_0x2f12('0x2c')][_0x2f12('0x49')](_0x5eae96[_0x2f12('0x4a')],{})['then'](respondWithResult(_0x5293bc,0xc9))[_0x2f12('0x45')](handleError(_0x5293bc,null));};exports[_0x2f12('0x24')]=function(_0x330a2f,_0x35b375){if(_0x330a2f[_0x2f12('0x4a')]['id']){delete _0x330a2f['body']['id'];}return db[_0x2f12('0x2c')][_0x2f12('0x48')]({'where':{'id':_0x330a2f[_0x2f12('0x47')]['id']}})[_0x2f12('0x25')](handleEntityNotFound(_0x35b375,null))[_0x2f12('0x25')](saveUpdates(_0x330a2f[_0x2f12('0x4a')],null))[_0x2f12('0x25')](respondWithResult(_0x35b375,null))[_0x2f12('0x45')](handleError(_0x35b375,null));};exports[_0x2f12('0x26')]=function(_0x368699,_0x13798e){return db[_0x2f12('0x2c')][_0x2f12('0x48')]({'where':{'id':_0x368699[_0x2f12('0x47')]['id']}})[_0x2f12('0x25')](handleEntityNotFound(_0x13798e,null))[_0x2f12('0x25')](removeEntity(_0x13798e,null))[_0x2f12('0x45')](handleError(_0x13798e,null));};exports[_0x2f12('0x4b')]=function(_0x386439,_0x2f2526,_0x525d0a){var _0x580ea1={};var _0x3f7160={};var _0x5b4ff0;var _0x289360;return db['FreshsalesConfiguration'][_0x2f12('0x4c')]({'where':{'id':_0x386439[_0x2f12('0x47')]['id']}})[_0x2f12('0x25')](handleEntityNotFound(_0x2f2526,null))['then'](function(_0x776743){if(_0x776743){_0x5b4ff0=_0x776743;_0x3f7160[_0x2f12('0x34')]=_[_0x2f12('0x32')](db[_0x2f12('0x4d')][_0x2f12('0x2d')]);_0x3f7160['query']=_[_0x2f12('0x32')](_0x386439[_0x2f12('0x31')]);_0x3f7160[_0x2f12('0x3c')]=_['intersection'](_0x3f7160[_0x2f12('0x34')],_0x3f7160[_0x2f12('0x31')]);_0x580ea1[_0x2f12('0x35')]=_['intersection'](_0x3f7160['model'],qs[_0x2f12('0x36')](_0x386439[_0x2f12('0x31')][_0x2f12('0x36')]));_0x580ea1[_0x2f12('0x35')]=_0x580ea1['attributes'][_0x2f12('0x37')]?_0x580ea1['attributes']:_0x3f7160['model'];_0x580ea1['order']=qs[_0x2f12('0x3a')](_0x386439[_0x2f12('0x31')][_0x2f12('0x3a')]);_0x580ea1[_0x2f12('0x3b')]=qs['filters'](_[_0x2f12('0x3d')](_0x386439[_0x2f12('0x31')],_0x3f7160['filters']));if(_0x386439['query'][_0x2f12('0x3e')]){_0x580ea1[_0x2f12('0x3b')]=_[_0x2f12('0x3f')](_0x580ea1['where'],{'$or':_[_0x2f12('0x2b')](_0x580ea1['attributes'],function(_0x2a82ee){var _0x180051={};_0x180051[_0x2a82ee]={'$like':'%'+_0x386439[_0x2f12('0x31')][_0x2f12('0x3e')]+'%'};return _0x180051;})});}_0x580ea1=_[_0x2f12('0x3f')]({},_0x580ea1,_0x386439[_0x2f12('0x4e')]);return _0x5b4ff0[_0x2f12('0x4b')](_0x580ea1);}})[_0x2f12('0x25')](function(_0x36dcca){if(_0x36dcca){_0x289360=_0x36dcca[_0x2f12('0x37')];if(!_0x386439[_0x2f12('0x31')][_0x2f12('0x38')](_0x2f12('0x4f'))){_0x580ea1['limit']=qs[_0x2f12('0x1e')](_0x386439[_0x2f12('0x31')]['limit']);_0x580ea1[_0x2f12('0x20')]=qs[_0x2f12('0x20')](_0x386439[_0x2f12('0x31')][_0x2f12('0x20')]);}return _0x5b4ff0[_0x2f12('0x4b')](_0x580ea1);}})[_0x2f12('0x25')](function(_0x325d08){if(_0x325d08){return _0x325d08?{'count':_0x289360,'rows':_0x325d08}:null;}})[_0x2f12('0x25')](respondWithResult(_0x2f2526,null))[_0x2f12('0x45')](handleError(_0x2f2526,null));};exports[_0x2f12('0x50')]=function(_0x12ffd8,_0x5c1074,_0x2ede39){var _0x326c01={};var _0x490f23={};var _0x368f40;var _0x45f1a9;return db[_0x2f12('0x2c')][_0x2f12('0x4c')]({'where':{'id':_0x12ffd8['params']['id']}})[_0x2f12('0x25')](handleEntityNotFound(_0x5c1074,null))['then'](function(_0xc8cc95){if(_0xc8cc95){_0x368f40=_0xc8cc95;_0x490f23['model']=_['keys'](db[_0x2f12('0x4d')][_0x2f12('0x2d')]);_0x490f23[_0x2f12('0x31')]=_[_0x2f12('0x32')](_0x12ffd8[_0x2f12('0x31')]);_0x490f23[_0x2f12('0x3c')]=_[_0x2f12('0x33')](_0x490f23[_0x2f12('0x34')],_0x490f23[_0x2f12('0x31')]);_0x326c01[_0x2f12('0x35')]=_[_0x2f12('0x33')](_0x490f23['model'],qs['fields'](_0x12ffd8[_0x2f12('0x31')][_0x2f12('0x36')]));_0x326c01[_0x2f12('0x35')]=_0x326c01[_0x2f12('0x35')][_0x2f12('0x37')]?_0x326c01[_0x2f12('0x35')]:_0x490f23[_0x2f12('0x34')];_0x326c01['order']=qs[_0x2f12('0x3a')](_0x12ffd8[_0x2f12('0x31')][_0x2f12('0x3a')]);_0x326c01[_0x2f12('0x3b')]=qs[_0x2f12('0x3c')](_[_0x2f12('0x3d')](_0x12ffd8['query'],_0x490f23[_0x2f12('0x3c')]));if(_0x12ffd8[_0x2f12('0x31')][_0x2f12('0x3e')]){_0x326c01[_0x2f12('0x3b')]=_[_0x2f12('0x3f')](_0x326c01[_0x2f12('0x3b')],{'$or':_[_0x2f12('0x2b')](_0x326c01[_0x2f12('0x35')],function(_0x563100){var _0x3cd644={};_0x3cd644[_0x563100]={'$like':'%'+_0x12ffd8[_0x2f12('0x31')][_0x2f12('0x3e')]+'%'};return _0x3cd644;})});}_0x326c01=_['merge']({},_0x326c01,_0x12ffd8[_0x2f12('0x4e')]);return _0x368f40['getDescriptions'](_0x326c01);}})[_0x2f12('0x25')](function(_0x233d36){if(_0x233d36){_0x45f1a9=_0x233d36[_0x2f12('0x37')];if(!_0x12ffd8['query'][_0x2f12('0x38')](_0x2f12('0x4f'))){_0x326c01[_0x2f12('0x1e')]=qs[_0x2f12('0x1e')](_0x12ffd8['query'][_0x2f12('0x1e')]);_0x326c01[_0x2f12('0x20')]=qs[_0x2f12('0x20')](_0x12ffd8[_0x2f12('0x31')][_0x2f12('0x20')]);}return _0x368f40[_0x2f12('0x50')](_0x326c01);}})['then'](function(_0x59d6f9){if(_0x59d6f9){return _0x59d6f9?{'count':_0x45f1a9,'rows':_0x59d6f9}:null;}})['then'](respondWithResult(_0x5c1074,null))[_0x2f12('0x45')](handleError(_0x5c1074,null));};exports[_0x2f12('0x51')]=function(_0x439d10,_0x498e60,_0x2ef532){var _0x485392={};var _0x2831e3={};var _0x55caa1;var _0x4bdfb3;return db[_0x2f12('0x2c')][_0x2f12('0x4c')]({'where':{'id':_0x439d10['params']['id']}})[_0x2f12('0x25')](handleEntityNotFound(_0x498e60,null))[_0x2f12('0x25')](function(_0xc8fb79){if(_0xc8fb79){_0x55caa1=_0xc8fb79;_0x2831e3['model']=_['keys'](db[_0x2f12('0x4d')][_0x2f12('0x2d')]);_0x2831e3[_0x2f12('0x31')]=_[_0x2f12('0x32')](_0x439d10[_0x2f12('0x31')]);_0x2831e3[_0x2f12('0x3c')]=_[_0x2f12('0x33')](_0x2831e3[_0x2f12('0x34')],_0x2831e3['query']);_0x485392[_0x2f12('0x35')]=_[_0x2f12('0x33')](_0x2831e3[_0x2f12('0x34')],qs[_0x2f12('0x36')](_0x439d10[_0x2f12('0x31')][_0x2f12('0x36')]));_0x485392[_0x2f12('0x35')]=_0x485392[_0x2f12('0x35')][_0x2f12('0x37')]?_0x485392[_0x2f12('0x35')]:_0x2831e3['model'];_0x485392['order']=qs['sort'](_0x439d10[_0x2f12('0x31')][_0x2f12('0x3a')]);_0x485392[_0x2f12('0x3b')]=qs[_0x2f12('0x3c')](_[_0x2f12('0x3d')](_0x439d10[_0x2f12('0x31')],_0x2831e3[_0x2f12('0x3c')]));if(_0x439d10[_0x2f12('0x31')][_0x2f12('0x3e')]){_0x485392['where']=_[_0x2f12('0x3f')](_0x485392[_0x2f12('0x3b')],{'$or':_[_0x2f12('0x2b')](_0x485392[_0x2f12('0x35')],function(_0x1295fb){var _0x11cb11={};_0x11cb11[_0x1295fb]={'$like':'%'+_0x439d10[_0x2f12('0x31')][_0x2f12('0x3e')]+'%'};return _0x11cb11;})});}_0x485392=_[_0x2f12('0x3f')]({},_0x485392,_0x439d10[_0x2f12('0x4e')]);return _0x55caa1[_0x2f12('0x51')](_0x485392);}})[_0x2f12('0x25')](function(_0x4b5a2f){if(_0x4b5a2f){_0x4bdfb3=_0x4b5a2f[_0x2f12('0x37')];if(!_0x439d10[_0x2f12('0x31')][_0x2f12('0x38')]('nolimit')){_0x485392[_0x2f12('0x1e')]=qs['limit'](_0x439d10[_0x2f12('0x31')][_0x2f12('0x1e')]);_0x485392[_0x2f12('0x20')]=qs['offset'](_0x439d10[_0x2f12('0x31')][_0x2f12('0x20')]);}return _0x55caa1[_0x2f12('0x51')](_0x485392);}})[_0x2f12('0x25')](function(_0x26a7bc){if(_0x26a7bc){return _0x26a7bc?{'count':_0x4bdfb3,'rows':_0x26a7bc}:null;}})[_0x2f12('0x25')](respondWithResult(_0x498e60,null))[_0x2f12('0x45')](handleError(_0x498e60,null));};
\ No newline at end of file
+var _0x30e2=['VIRTUAL','options','FreshsalesConfiguration','includeAll','findAll','rows','catch','show','params','rawAttributes','include','find','create','body','destroy','getSubjects','findOne','FreshsalesField','length','order','getDescriptions','pick','getFields','eml-format','zip-dir','fast-json-patch','request-promise','mustache','util','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','json','limit','undefined','count','offset','set','Content-Range','apply','reject','save','update','then','status','end','error','stack','name','send','index','fieldName','key','model','map','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','filters','filter','merge','type'];(function(_0x392950,_0x48f861){var _0x532f67=function(_0x58b37d){while(--_0x58b37d){_0x392950['push'](_0x392950['shift']());}};_0x532f67(++_0x48f861);}(_0x30e2,0x167));var _0x230e=function(_0x3edb04,_0x26bf5a){_0x3edb04=_0x3edb04-0x0;var _0x2082e8=_0x30e2[_0x3edb04];return _0x2082e8;};'use strict';var emlformat=require(_0x230e('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x230e('0x1'));var jsonpatch=require(_0x230e('0x2'));var rp=require(_0x230e('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x230e('0x4'));var util=require(_0x230e('0x5'));var path=require('path');var sox=require('sox');var csv=require(_0x230e('0x6'));var ejs=require(_0x230e('0x7'));var fs=require('fs');var fs_extra=require(_0x230e('0x8'));var _=require(_0x230e('0x9'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x230e('0xa'));var deskjs=require(_0x230e('0xb'));var toCsv=require(_0x230e('0x6'));var querystring=require(_0x230e('0xc'));var Papa=require(_0x230e('0xd'));var Redis=require(_0x230e('0xe'));var authService=require(_0x230e('0xf'));var qs=require(_0x230e('0x10'));var as=require(_0x230e('0x11'));var hardwareService=require(_0x230e('0x12'));var logger=require(_0x230e('0x13'))(_0x230e('0x14'));var utils=require(_0x230e('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x230e('0x16'));var db=require(_0x230e('0x17'))['db'];function respondWithStatusCode(_0x3da563,_0x4016d5){_0x4016d5=_0x4016d5||0xcc;return function(_0x175df8){if(_0x175df8){return _0x3da563[_0x230e('0x18')](_0x4016d5);}return _0x3da563['status'](_0x4016d5)['end']();};}function respondWithResult(_0x4c6058,_0x56ba38){_0x56ba38=_0x56ba38||0xc8;return function(_0x1ab108){if(_0x1ab108){return _0x4c6058['status'](_0x56ba38)[_0x230e('0x19')](_0x1ab108);}};}function respondWithFilteredResult(_0x2dec29,_0x2c235f){return function(_0x2ecf60){if(_0x2ecf60){var _0xbc4645=typeof _0x2c235f['offset']==='undefined'&&typeof _0x2c235f[_0x230e('0x1a')]===_0x230e('0x1b');var _0x452f6b=_0x2ecf60[_0x230e('0x1c')];var _0x19f633=_0xbc4645?0x0:_0x2c235f[_0x230e('0x1d')];var _0x310a9f=_0xbc4645?_0x2ecf60[_0x230e('0x1c')]:_0x2c235f['offset']+_0x2c235f['limit'];var _0x59c628;if(_0x310a9f>=_0x452f6b){_0x310a9f=_0x452f6b;_0x59c628=0xc8;}else{_0x59c628=0xce;}_0x2dec29['status'](_0x59c628);return _0x2dec29[_0x230e('0x1e')](_0x230e('0x1f'),_0x19f633+'-'+_0x310a9f+'/'+_0x452f6b)[_0x230e('0x19')](_0x2ecf60);}return null;};}function patchUpdates(_0x2a529e){return function(_0x67be15){try{jsonpatch[_0x230e('0x20')](_0x67be15,_0x2a529e,!![]);}catch(_0x5ad54f){return BPromise[_0x230e('0x21')](_0x5ad54f);}return _0x67be15[_0x230e('0x22')]();};}function saveUpdates(_0x2ba996,_0x1035c5){return function(_0xe40e8a){if(_0xe40e8a){return _0xe40e8a[_0x230e('0x23')](_0x2ba996)[_0x230e('0x24')](function(_0x2e0164){return _0x2e0164;});}return null;};}function removeEntity(_0x41bc36,_0xc9d350){return function(_0x5afefb){if(_0x5afefb){return _0x5afefb['destroy']()['then'](function(){_0x41bc36[_0x230e('0x25')](0xcc)[_0x230e('0x26')]();});}};}function handleEntityNotFound(_0x513768,_0x54e2fd){return function(_0x482598){if(!_0x482598){_0x513768[_0x230e('0x18')](0x194);}return _0x482598;};}function handleError(_0x39f079,_0x2b9b54){_0x2b9b54=_0x2b9b54||0x1f4;return function(_0x140004){logger[_0x230e('0x27')](_0x140004[_0x230e('0x28')]);if(_0x140004[_0x230e('0x29')]){delete _0x140004['name'];}_0x39f079[_0x230e('0x25')](_0x2b9b54)[_0x230e('0x2a')](_0x140004);};}exports[_0x230e('0x2b')]=function(_0xe8d8f,_0x3e8259){var _0x4e3fad={},_0x19a2b5={},_0x67fb27={'count':0x0,'rows':[]};var _0x440ef8=_['map'](db['FreshsalesConfiguration']['rawAttributes'],function(_0x365607){return{'name':_0x365607[_0x230e('0x2c')],'type':_0x365607['type'][_0x230e('0x2d')]};});_0x19a2b5[_0x230e('0x2e')]=_[_0x230e('0x2f')](_0x440ef8,_0x230e('0x29'));_0x19a2b5[_0x230e('0x30')]=_[_0x230e('0x31')](_0xe8d8f[_0x230e('0x30')]);_0x19a2b5['filters']=_[_0x230e('0x32')](_0x19a2b5['model'],_0x19a2b5[_0x230e('0x30')]);_0x4e3fad[_0x230e('0x33')]=_['intersection'](_0x19a2b5[_0x230e('0x2e')],qs[_0x230e('0x34')](_0xe8d8f[_0x230e('0x30')][_0x230e('0x34')]));_0x4e3fad['attributes']=_0x4e3fad[_0x230e('0x33')]['length']?_0x4e3fad['attributes']:_0x19a2b5[_0x230e('0x2e')];if(!_0xe8d8f[_0x230e('0x30')][_0x230e('0x35')](_0x230e('0x36'))){_0x4e3fad[_0x230e('0x1a')]=qs[_0x230e('0x1a')](_0xe8d8f[_0x230e('0x30')][_0x230e('0x1a')]);_0x4e3fad[_0x230e('0x1d')]=qs[_0x230e('0x1d')](_0xe8d8f[_0x230e('0x30')][_0x230e('0x1d')]);}_0x4e3fad['order']=qs['sort'](_0xe8d8f[_0x230e('0x30')][_0x230e('0x37')]);_0x4e3fad[_0x230e('0x38')]=qs['filters'](_['pick'](_0xe8d8f['query'],_0x19a2b5[_0x230e('0x39')]),_0x440ef8);if(_0xe8d8f['query'][_0x230e('0x3a')]){_0x4e3fad['where']=_[_0x230e('0x3b')](_0x4e3fad['where'],{'$or':_[_0x230e('0x2f')](_0x440ef8,function(_0x14c8de){if(_0x14c8de[_0x230e('0x3c')]!==_0x230e('0x3d')){var _0x4c6a53={};_0x4c6a53[_0x14c8de[_0x230e('0x29')]]={'$like':'%'+_0xe8d8f[_0x230e('0x30')][_0x230e('0x3a')]+'%'};return _0x4c6a53;}})});}_0x4e3fad=_[_0x230e('0x3b')]({},_0x4e3fad,_0xe8d8f[_0x230e('0x3e')]);var _0x16ad29={'where':_0x4e3fad['where']};return db[_0x230e('0x3f')][_0x230e('0x1c')](_0x16ad29)['then'](function(_0x5ccee6){_0x67fb27[_0x230e('0x1c')]=_0x5ccee6;if(_0xe8d8f[_0x230e('0x30')][_0x230e('0x40')]){_0x4e3fad['include']=[{'all':!![]}];}return db[_0x230e('0x3f')][_0x230e('0x41')](_0x4e3fad);})[_0x230e('0x24')](function(_0x54295f){_0x67fb27[_0x230e('0x42')]=_0x54295f;return _0x67fb27;})[_0x230e('0x24')](respondWithFilteredResult(_0x3e8259,_0x4e3fad))[_0x230e('0x43')](handleError(_0x3e8259,null));};exports[_0x230e('0x44')]=function(_0x4e08d6,_0x497964){var _0x74fd3f={'raw':![],'where':{'id':_0x4e08d6[_0x230e('0x45')]['id']}},_0x46b4f3={};_0x46b4f3[_0x230e('0x2e')]=_[_0x230e('0x31')](db['FreshsalesConfiguration'][_0x230e('0x46')]);_0x46b4f3[_0x230e('0x30')]=_['keys'](_0x4e08d6['query']);_0x46b4f3[_0x230e('0x39')]=_['intersection'](_0x46b4f3[_0x230e('0x2e')],_0x46b4f3[_0x230e('0x30')]);_0x74fd3f[_0x230e('0x33')]=_[_0x230e('0x32')](_0x46b4f3[_0x230e('0x2e')],qs[_0x230e('0x34')](_0x4e08d6[_0x230e('0x30')][_0x230e('0x34')]));_0x74fd3f[_0x230e('0x33')]=_0x74fd3f[_0x230e('0x33')]['length']?_0x74fd3f['attributes']:_0x46b4f3[_0x230e('0x2e')];if(_0x4e08d6[_0x230e('0x30')][_0x230e('0x40')]){_0x74fd3f[_0x230e('0x47')]=[{'all':!![]}];}_0x74fd3f=_[_0x230e('0x3b')]({},_0x74fd3f,_0x4e08d6['options']);return db[_0x230e('0x3f')][_0x230e('0x48')](_0x74fd3f)['then'](handleEntityNotFound(_0x497964,null))[_0x230e('0x24')](respondWithResult(_0x497964,null))[_0x230e('0x43')](handleError(_0x497964,null));};exports[_0x230e('0x49')]=function(_0x1fa0f2,_0x213ae3){return db['FreshsalesConfiguration'][_0x230e('0x49')](_0x1fa0f2[_0x230e('0x4a')],{})[_0x230e('0x24')](respondWithResult(_0x213ae3,0xc9))[_0x230e('0x43')](handleError(_0x213ae3,null));};exports['update']=function(_0x3db88f,_0x301753){if(_0x3db88f[_0x230e('0x4a')]['id']){delete _0x3db88f[_0x230e('0x4a')]['id'];}return db['FreshsalesConfiguration'][_0x230e('0x48')]({'where':{'id':_0x3db88f['params']['id']}})[_0x230e('0x24')](handleEntityNotFound(_0x301753,null))['then'](saveUpdates(_0x3db88f[_0x230e('0x4a')],null))[_0x230e('0x24')](respondWithResult(_0x301753,null))[_0x230e('0x43')](handleError(_0x301753,null));};exports[_0x230e('0x4b')]=function(_0x5494ea,_0x3bcd14){return db[_0x230e('0x3f')][_0x230e('0x48')]({'where':{'id':_0x5494ea['params']['id']}})[_0x230e('0x24')](handleEntityNotFound(_0x3bcd14,null))[_0x230e('0x24')](removeEntity(_0x3bcd14,null))[_0x230e('0x43')](handleError(_0x3bcd14,null));};exports[_0x230e('0x4c')]=function(_0x4f81c9,_0x18c698,_0x24e5c0){var _0x23264b={};var _0x405e2a={};var _0x2b24d0;var _0x27b517;return db[_0x230e('0x3f')][_0x230e('0x4d')]({'where':{'id':_0x4f81c9['params']['id']}})['then'](handleEntityNotFound(_0x18c698,null))[_0x230e('0x24')](function(_0x1e432c){if(_0x1e432c){_0x2b24d0=_0x1e432c;_0x405e2a[_0x230e('0x2e')]=_[_0x230e('0x31')](db[_0x230e('0x4e')][_0x230e('0x46')]);_0x405e2a['query']=_['keys'](_0x4f81c9['query']);_0x405e2a['filters']=_['intersection'](_0x405e2a[_0x230e('0x2e')],_0x405e2a[_0x230e('0x30')]);_0x23264b[_0x230e('0x33')]=_[_0x230e('0x32')](_0x405e2a[_0x230e('0x2e')],qs[_0x230e('0x34')](_0x4f81c9[_0x230e('0x30')][_0x230e('0x34')]));_0x23264b[_0x230e('0x33')]=_0x23264b['attributes'][_0x230e('0x4f')]?_0x23264b[_0x230e('0x33')]:_0x405e2a[_0x230e('0x2e')];_0x23264b[_0x230e('0x50')]=qs[_0x230e('0x37')](_0x4f81c9['query'][_0x230e('0x37')]);_0x23264b[_0x230e('0x38')]=qs[_0x230e('0x39')](_['pick'](_0x4f81c9[_0x230e('0x30')],_0x405e2a['filters']));if(_0x4f81c9[_0x230e('0x30')][_0x230e('0x3a')]){_0x23264b[_0x230e('0x38')]=_['merge'](_0x23264b['where'],{'$or':_['map'](_0x23264b[_0x230e('0x33')],function(_0x113b07){var _0x2a8b7b={};_0x2a8b7b[_0x113b07]={'$like':'%'+_0x4f81c9[_0x230e('0x30')]['filter']+'%'};return _0x2a8b7b;})});}_0x23264b=_['merge']({},_0x23264b,_0x4f81c9['options']);return _0x2b24d0[_0x230e('0x4c')](_0x23264b);}})[_0x230e('0x24')](function(_0x16b535){if(_0x16b535){_0x27b517=_0x16b535['length'];if(!_0x4f81c9[_0x230e('0x30')][_0x230e('0x35')]('nolimit')){_0x23264b[_0x230e('0x1a')]=qs[_0x230e('0x1a')](_0x4f81c9[_0x230e('0x30')][_0x230e('0x1a')]);_0x23264b[_0x230e('0x1d')]=qs[_0x230e('0x1d')](_0x4f81c9[_0x230e('0x30')][_0x230e('0x1d')]);}return _0x2b24d0['getSubjects'](_0x23264b);}})[_0x230e('0x24')](function(_0x2a48d6){if(_0x2a48d6){return _0x2a48d6?{'count':_0x27b517,'rows':_0x2a48d6}:null;}})[_0x230e('0x24')](respondWithResult(_0x18c698,null))[_0x230e('0x43')](handleError(_0x18c698,null));};exports[_0x230e('0x51')]=function(_0x455cac,_0xbbe2a8,_0x5078e3){var _0x53e7f0={};var _0x3bae46={};var _0x3e9e87;var _0x4716cd;return db[_0x230e('0x3f')][_0x230e('0x4d')]({'where':{'id':_0x455cac[_0x230e('0x45')]['id']}})['then'](handleEntityNotFound(_0xbbe2a8,null))[_0x230e('0x24')](function(_0x23b4f9){if(_0x23b4f9){_0x3e9e87=_0x23b4f9;_0x3bae46[_0x230e('0x2e')]=_[_0x230e('0x31')](db[_0x230e('0x4e')][_0x230e('0x46')]);_0x3bae46[_0x230e('0x30')]=_[_0x230e('0x31')](_0x455cac[_0x230e('0x30')]);_0x3bae46[_0x230e('0x39')]=_[_0x230e('0x32')](_0x3bae46[_0x230e('0x2e')],_0x3bae46['query']);_0x53e7f0[_0x230e('0x33')]=_[_0x230e('0x32')](_0x3bae46['model'],qs[_0x230e('0x34')](_0x455cac[_0x230e('0x30')][_0x230e('0x34')]));_0x53e7f0[_0x230e('0x33')]=_0x53e7f0[_0x230e('0x33')][_0x230e('0x4f')]?_0x53e7f0[_0x230e('0x33')]:_0x3bae46['model'];_0x53e7f0['order']=qs[_0x230e('0x37')](_0x455cac[_0x230e('0x30')][_0x230e('0x37')]);_0x53e7f0[_0x230e('0x38')]=qs[_0x230e('0x39')](_[_0x230e('0x52')](_0x455cac['query'],_0x3bae46['filters']));if(_0x455cac[_0x230e('0x30')][_0x230e('0x3a')]){_0x53e7f0[_0x230e('0x38')]=_[_0x230e('0x3b')](_0x53e7f0[_0x230e('0x38')],{'$or':_['map'](_0x53e7f0[_0x230e('0x33')],function(_0x4c82ac){var _0x12bb27={};_0x12bb27[_0x4c82ac]={'$like':'%'+_0x455cac[_0x230e('0x30')][_0x230e('0x3a')]+'%'};return _0x12bb27;})});}_0x53e7f0=_[_0x230e('0x3b')]({},_0x53e7f0,_0x455cac[_0x230e('0x3e')]);return _0x3e9e87['getDescriptions'](_0x53e7f0);}})[_0x230e('0x24')](function(_0x2e1dba){if(_0x2e1dba){_0x4716cd=_0x2e1dba[_0x230e('0x4f')];if(!_0x455cac[_0x230e('0x30')][_0x230e('0x35')](_0x230e('0x36'))){_0x53e7f0[_0x230e('0x1a')]=qs[_0x230e('0x1a')](_0x455cac['query'][_0x230e('0x1a')]);_0x53e7f0[_0x230e('0x1d')]=qs[_0x230e('0x1d')](_0x455cac[_0x230e('0x30')][_0x230e('0x1d')]);}return _0x3e9e87[_0x230e('0x51')](_0x53e7f0);}})['then'](function(_0x3abb58){if(_0x3abb58){return _0x3abb58?{'count':_0x4716cd,'rows':_0x3abb58}:null;}})[_0x230e('0x24')](respondWithResult(_0xbbe2a8,null))[_0x230e('0x43')](handleError(_0xbbe2a8,null));};exports[_0x230e('0x53')]=function(_0x1c1455,_0x580eca,_0x46dada){var _0x1afccf={};var _0x643edb={};var _0x3477f3;var _0x5728b9;return db[_0x230e('0x3f')][_0x230e('0x4d')]({'where':{'id':_0x1c1455[_0x230e('0x45')]['id']}})['then'](handleEntityNotFound(_0x580eca,null))[_0x230e('0x24')](function(_0x3418f6){if(_0x3418f6){_0x3477f3=_0x3418f6;_0x643edb[_0x230e('0x2e')]=_[_0x230e('0x31')](db['FreshsalesField'][_0x230e('0x46')]);_0x643edb['query']=_[_0x230e('0x31')](_0x1c1455[_0x230e('0x30')]);_0x643edb[_0x230e('0x39')]=_[_0x230e('0x32')](_0x643edb[_0x230e('0x2e')],_0x643edb[_0x230e('0x30')]);_0x1afccf[_0x230e('0x33')]=_[_0x230e('0x32')](_0x643edb[_0x230e('0x2e')],qs[_0x230e('0x34')](_0x1c1455['query'][_0x230e('0x34')]));_0x1afccf[_0x230e('0x33')]=_0x1afccf[_0x230e('0x33')][_0x230e('0x4f')]?_0x1afccf['attributes']:_0x643edb[_0x230e('0x2e')];_0x1afccf[_0x230e('0x50')]=qs[_0x230e('0x37')](_0x1c1455['query'][_0x230e('0x37')]);_0x1afccf[_0x230e('0x38')]=qs[_0x230e('0x39')](_['pick'](_0x1c1455[_0x230e('0x30')],_0x643edb[_0x230e('0x39')]));if(_0x1c1455['query'][_0x230e('0x3a')]){_0x1afccf[_0x230e('0x38')]=_['merge'](_0x1afccf['where'],{'$or':_[_0x230e('0x2f')](_0x1afccf['attributes'],function(_0x2a57e6){var _0x5abc18={};_0x5abc18[_0x2a57e6]={'$like':'%'+_0x1c1455['query'][_0x230e('0x3a')]+'%'};return _0x5abc18;})});}_0x1afccf=_[_0x230e('0x3b')]({},_0x1afccf,_0x1c1455[_0x230e('0x3e')]);return _0x3477f3[_0x230e('0x53')](_0x1afccf);}})['then'](function(_0x26cc4c){if(_0x26cc4c){_0x5728b9=_0x26cc4c[_0x230e('0x4f')];if(!_0x1c1455[_0x230e('0x30')]['hasOwnProperty'](_0x230e('0x36'))){_0x1afccf[_0x230e('0x1a')]=qs[_0x230e('0x1a')](_0x1c1455[_0x230e('0x30')][_0x230e('0x1a')]);_0x1afccf[_0x230e('0x1d')]=qs[_0x230e('0x1d')](_0x1c1455[_0x230e('0x30')]['offset']);}return _0x3477f3['getFields'](_0x1afccf);}})[_0x230e('0x24')](function(_0x1828f0){if(_0x1828f0){return _0x1828f0?{'count':_0x5728b9,'rows':_0x1828f0}:null;}})['then'](respondWithResult(_0x580eca,null))[_0x230e('0x43')](handleError(_0x580eca,null));};
\ No newline at end of file
index 700f2fe..87c7a45 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7b0c=['exports','define','FreshsalesConfiguration','int_freshsales_configurations','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf','./intFreshsalesConfiguration.attributes'];(function(_0x5c02e6,_0x5848fd){var _0x2f0c79=function(_0x5da959){while(--_0x5da959){_0x5c02e6['push'](_0x5c02e6['shift']());}};_0x2f0c79(++_0x5848fd);}(_0x7b0c,0x1a4));var _0xc7b0=function(_0xbfb53e,_0x4d20ea){_0xbfb53e=_0xbfb53e-0x0;var _0x30ba7e=_0x7b0c[_0xbfb53e];return _0x30ba7e;};'use strict';var _=require(_0xc7b0('0x0'));var util=require(_0xc7b0('0x1'));var logger=require(_0xc7b0('0x2'))(_0xc7b0('0x3'));var moment=require(_0xc7b0('0x4'));var BPromise=require(_0xc7b0('0x5'));var rp=require(_0xc7b0('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xc7b0('0x7'));var config=require('../../config/environment');var attributes=require(_0xc7b0('0x8'));module[_0xc7b0('0x9')]=function(_0x2509ec,_0x5d7f13){return _0x2509ec[_0xc7b0('0xa')](_0xc7b0('0xb'),attributes,{'tableName':_0xc7b0('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x493b=['path','rimraf','../../config/environment','./intFreshsalesConfiguration.attributes','exports','define','FreshsalesConfiguration','int_freshsales_configurations','util','api','moment','request-promise'];(function(_0x364107,_0x50fa5d){var _0x144121=function(_0x3328ba){while(--_0x3328ba){_0x364107['push'](_0x364107['shift']());}};_0x144121(++_0x50fa5d);}(_0x493b,0xec));var _0xb493=function(_0xe69ce1,_0x11fea4){_0xe69ce1=_0xe69ce1-0x0;var _0x3e8e93=_0x493b[_0xe69ce1];return _0x3e8e93;};'use strict';var _=require('lodash');var util=require(_0xb493('0x0'));var logger=require('../../config/logger')(_0xb493('0x1'));var moment=require(_0xb493('0x2'));var BPromise=require('bluebird');var rp=require(_0xb493('0x3'));var fs=require('fs');var path=require(_0xb493('0x4'));var rimraf=require(_0xb493('0x5'));var config=require(_0xb493('0x6'));var attributes=require(_0xb493('0x7'));module[_0xb493('0x8')]=function(_0x3e5302,_0x201f45){return _0x3e5302[_0xb493('0x9')](_0xb493('0xa'),attributes,{'tableName':_0xb493('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 5d76c72..0cf1d33 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1644=['FreshsalesConfiguration,\x20%s,\x20%s','FreshsalesConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info'];(function(_0x10795b,_0x514e41){var _0x1356a3=function(_0x50b107){while(--_0x50b107){_0x10795b['push'](_0x10795b['shift']());}};_0x1356a3(++_0x514e41);}(_0x1644,0x1ab));var _0x4164=function(_0x11f598,_0x5a2990){_0x11f598=_0x11f598-0x0;var _0x2a37dc=_0x1644[_0x11f598];return _0x2a37dc;};'use strict';var _=require('lodash');var util=require(_0x4164('0x0'));var moment=require('moment');var BPromise=require(_0x4164('0x1'));var rs=require(_0x4164('0x2'));var fs=require('fs');var Redis=require(_0x4164('0x3'));var db=require(_0x4164('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x4164('0x5'))(_0x4164('0x6'));var config=require(_0x4164('0x7'));var jayson=require(_0x4164('0x8'));var client=jayson[_0x4164('0x9')][_0x4164('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2a6c13,_0x180e2c,_0x5d26a9){return new BPromise(function(_0x5bad90,_0x2fd388){return client['request'](_0x2a6c13,_0x5d26a9)[_0x4164('0xb')](function(_0x238e17){logger[_0x4164('0xc')](_0x4164('0xd'),_0x180e2c,'request\x20sent');logger['debug'](_0x4164('0xe'),_0x180e2c,_0x4164('0xf'),JSON[_0x4164('0x10')](_0x238e17));if(_0x238e17[_0x4164('0x11')]){if(_0x238e17[_0x4164('0x11')][_0x4164('0x12')]===0x1f4){logger[_0x4164('0x11')](_0x4164('0xd'),_0x180e2c,_0x238e17['error'][_0x4164('0x13')]);return _0x2fd388(_0x238e17[_0x4164('0x11')][_0x4164('0x13')]);}logger[_0x4164('0x11')](_0x4164('0xd'),_0x180e2c,_0x238e17[_0x4164('0x11')][_0x4164('0x13')]);return _0x5bad90(_0x238e17['error'][_0x4164('0x13')]);}else{logger[_0x4164('0xc')](_0x4164('0xd'),_0x180e2c,'request\x20sent');_0x5bad90(_0x238e17[_0x4164('0x14')][_0x4164('0x13')]);}})[_0x4164('0x15')](function(_0x2a970c){logger[_0x4164('0x11')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x180e2c,_0x2a970c);_0x2fd388(_0x2a970c);});});}
\ No newline at end of file
+var _0xd13d=['code','message','result','catch','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','then','info','FreshsalesConfiguration,\x20%s,\x20%s','request\x20sent','debug','stringify','error'];(function(_0x3e57ef,_0x388fab){var _0x5ade66=function(_0xcbbd3){while(--_0xcbbd3){_0x3e57ef['push'](_0x3e57ef['shift']());}};_0x5ade66(++_0x388fab);}(_0xd13d,0x97));var _0xdd13=function(_0xe4d1cc,_0x35bf20){_0xe4d1cc=_0xe4d1cc-0x0;var _0x41b493=_0xd13d[_0xe4d1cc];return _0x41b493;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xdd13('0x0'));var BPromise=require('bluebird');var rs=require(_0xdd13('0x1'));var fs=require('fs');var Redis=require(_0xdd13('0x2'));var db=require(_0xdd13('0x3'))['db'];var utils=require(_0xdd13('0x4'));var logger=require(_0xdd13('0x5'))(_0xdd13('0x6'));var config=require('../../config/environment');var jayson=require(_0xdd13('0x7'));var client=jayson[_0xdd13('0x8')][_0xdd13('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x207769,_0x470aa5,_0x3be803){return new BPromise(function(_0x2f1881,_0x37ffaf){return client['request'](_0x207769,_0x3be803)[_0xdd13('0xa')](function(_0x4ecb25){logger[_0xdd13('0xb')](_0xdd13('0xc'),_0x470aa5,_0xdd13('0xd'));logger[_0xdd13('0xe')]('FreshsalesConfiguration,\x20%s,\x20%s,\x20%s',_0x470aa5,_0xdd13('0xd'),JSON[_0xdd13('0xf')](_0x4ecb25));if(_0x4ecb25[_0xdd13('0x10')]){if(_0x4ecb25[_0xdd13('0x10')][_0xdd13('0x11')]===0x1f4){logger[_0xdd13('0x10')](_0xdd13('0xc'),_0x470aa5,_0x4ecb25[_0xdd13('0x10')][_0xdd13('0x12')]);return _0x37ffaf(_0x4ecb25[_0xdd13('0x10')][_0xdd13('0x12')]);}logger['error'](_0xdd13('0xc'),_0x470aa5,_0x4ecb25[_0xdd13('0x10')][_0xdd13('0x12')]);return _0x2f1881(_0x4ecb25[_0xdd13('0x10')]['message']);}else{logger[_0xdd13('0xb')](_0xdd13('0xc'),_0x470aa5,'request\x20sent');_0x2f1881(_0x4ecb25[_0xdd13('0x13')]['message']);}})[_0xdd13('0x14')](function(_0x59ecae){logger[_0xdd13('0x10')]('FreshsalesConfiguration,\x20%s,\x20%s',_0x470aa5,_0x59ecae);_0x37ffaf(_0x59ecae);});});}
\ No newline at end of file
index 5f11b1d..49d7625 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0911=['multer','util','path','connect-timeout','express','fs-extra','../../components/interaction/service','../../config/environment','./intFreshsalesField.controller','get','isAuthenticated','index','/:id','show','create','put','update'];(function(_0x18cac4,_0x57a4d5){var _0x2227c6=function(_0x72934d){while(--_0x72934d){_0x18cac4['push'](_0x18cac4['shift']());}};_0x2227c6(++_0x57a4d5);}(_0x0911,0x1a9));var _0x1091=function(_0x280c4b,_0xfe785d){_0x280c4b=_0x280c4b-0x0;var _0x2a5e90=_0x0911[_0x280c4b];return _0x2a5e90;};'use strict';var multer=require(_0x1091('0x0'));var util=require(_0x1091('0x1'));var path=require(_0x1091('0x2'));var timeout=require(_0x1091('0x3'));var express=require(_0x1091('0x4'));var router=express['Router']();var fs_extra=require(_0x1091('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x1091('0x6'));var config=require(_0x1091('0x7'));var controller=require(_0x1091('0x8'));router[_0x1091('0x9')]('/',auth[_0x1091('0xa')](),controller[_0x1091('0xb')]);router[_0x1091('0x9')](_0x1091('0xc'),auth[_0x1091('0xa')](),controller[_0x1091('0xd')]);router['post']('/',auth[_0x1091('0xa')](),controller[_0x1091('0xe')]);router[_0x1091('0xf')](_0x1091('0xc'),auth[_0x1091('0xa')](),controller[_0x1091('0x10')]);router['delete'](_0x1091('0xc'),auth[_0x1091('0xa')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x1e69=['/:id','show','post','update','delete','destroy','exports','util','path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./intFreshsalesField.controller','get','isAuthenticated','index'];(function(_0x54c9dd,_0x233a86){var _0x855156=function(_0x2dd60b){while(--_0x2dd60b){_0x54c9dd['push'](_0x54c9dd['shift']());}};_0x855156(++_0x233a86);}(_0x1e69,0x85));var _0x91e6=function(_0x328cdc,_0xe9775){_0x328cdc=_0x328cdc-0x0;var _0x17eea7=_0x1e69[_0x328cdc];return _0x17eea7;};'use strict';var multer=require('multer');var util=require(_0x91e6('0x0'));var path=require(_0x91e6('0x1'));var timeout=require(_0x91e6('0x2'));var express=require(_0x91e6('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x91e6('0x4'));var interaction=require(_0x91e6('0x5'));var config=require(_0x91e6('0x6'));var controller=require(_0x91e6('0x7'));router[_0x91e6('0x8')]('/',auth[_0x91e6('0x9')](),controller[_0x91e6('0xa')]);router[_0x91e6('0x8')](_0x91e6('0xb'),auth[_0x91e6('0x9')](),controller[_0x91e6('0xc')]);router[_0x91e6('0xd')]('/',auth[_0x91e6('0x9')](),controller['create']);router['put'](_0x91e6('0xb'),auth[_0x91e6('0x9')](),controller[_0x91e6('0xe')]);router[_0x91e6('0xf')]('/:id',auth[_0x91e6('0x9')](),controller[_0x91e6('0x10')]);module[_0x91e6('0x11')]=router;
\ No newline at end of file
index 1b87560..200d73f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x807e=['STRING','variable','sequelize','ENUM','string','customVariable','keyValue'];(function(_0x1a47b7,_0x19e548){var _0x33dad0=function(_0x5d2e29){while(--_0x5d2e29){_0x1a47b7['push'](_0x1a47b7['shift']());}};_0x33dad0(++_0x19e548);}(_0x807e,0x136));var _0xe807=function(_0x1cafb9,_0x1f3d29){_0x1cafb9=_0x1cafb9-0x0;var _0x32d7a3=_0x807e[_0x1cafb9];return _0x32d7a3;};'use strict';var Sequelize=require(_0xe807('0x0'));module['exports']={'type':{'type':Sequelize[_0xe807('0x1')](_0xe807('0x2'),'variable',_0xe807('0x3'),_0xe807('0x4'),'picklist'),'defaultValue':_0xe807('0x2')},'content':{'type':Sequelize[_0xe807('0x5')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize['ENUM']('string',_0xe807('0x6'),_0xe807('0x3'))},'keyContent':{'type':Sequelize[_0xe807('0x5')]},'idField':{'type':Sequelize[_0xe807('0x5')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xe807('0x5')]}};
\ No newline at end of file
+var _0xd221=['exports','ENUM','variable','keyValue','string','STRING','customVariable','BOOLEAN','sequelize'];(function(_0x2f45ea,_0x15c656){var _0x485a84=function(_0x4a1fe3){while(--_0x4a1fe3){_0x2f45ea['push'](_0x2f45ea['shift']());}};_0x485a84(++_0x15c656);}(_0xd221,0x14c));var _0x1d22=function(_0x1ee3e1,_0x3807fc){_0x1ee3e1=_0x1ee3e1-0x0;var _0xf52785=_0xd221[_0x1ee3e1];return _0xf52785;};'use strict';var Sequelize=require(_0x1d22('0x0'));module[_0x1d22('0x1')]={'type':{'type':Sequelize[_0x1d22('0x2')]('string',_0x1d22('0x3'),'customVariable',_0x1d22('0x4'),'picklist'),'defaultValue':_0x1d22('0x5')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize[_0x1d22('0x6')]},'keyType':{'type':Sequelize[_0x1d22('0x2')]('string','variable',_0x1d22('0x7'))},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0x1d22('0x6')]},'customField':{'type':Sequelize[_0x1d22('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
index b7b4a14..312fa52 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe4f4=['order','sort','where','filters','merge','type','VIRTUAL','name','filter','options','includeAll','include','findAll','rows','show','params','length','find','create','body','catch','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','destroy','then','error','index','map','FreshsalesField','rawAttributes','fieldName','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit'];(function(_0x443bd4,_0x9b1972){var _0x91a1d4=function(_0x1d46ed){while(--_0x1d46ed){_0x443bd4['push'](_0x443bd4['shift']());}};_0x91a1d4(++_0x9b1972);}(_0xe4f4,0x139));var _0x4e4f=function(_0x3c4e48,_0x43a5eb){_0x3c4e48=_0x3c4e48-0x0;var _0x37fd7e=_0xe4f4[_0x3c4e48];return _0x37fd7e;};'use strict';var emlformat=require(_0x4e4f('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x4e4f('0x1'));var jsonpatch=require(_0x4e4f('0x2'));var rp=require('request-promise');var moment=require(_0x4e4f('0x3'));var BPromise=require(_0x4e4f('0x4'));var Mustache=require(_0x4e4f('0x5'));var util=require(_0x4e4f('0x6'));var path=require(_0x4e4f('0x7'));var sox=require(_0x4e4f('0x8'));var csv=require(_0x4e4f('0x9'));var ejs=require(_0x4e4f('0xa'));var fs=require('fs');var fs_extra=require(_0x4e4f('0xb'));var _=require(_0x4e4f('0xc'));var squel=require(_0x4e4f('0xd'));var crypto=require('crypto');var jsforce=require(_0x4e4f('0xe'));var deskjs=require(_0x4e4f('0xf'));var toCsv=require(_0x4e4f('0x9'));var querystring=require('querystring');var Papa=require(_0x4e4f('0x10'));var Redis=require(_0x4e4f('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x4e4f('0x12'));var as=require(_0x4e4f('0x13'));var hardwareService=require(_0x4e4f('0x14'));var logger=require(_0x4e4f('0x15'))(_0x4e4f('0x16'));var utils=require(_0x4e4f('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x29917f,_0x5017fe){_0x5017fe=_0x5017fe||0xcc;return function(_0x2d03b5){if(_0x2d03b5){return _0x29917f['sendStatus'](_0x5017fe);}return _0x29917f['status'](_0x5017fe)['end']();};}function respondWithResult(_0x58fbce,_0x143e6c){_0x143e6c=_0x143e6c||0xc8;return function(_0x4c7ad0){if(_0x4c7ad0){return _0x58fbce[_0x4e4f('0x18')](_0x143e6c)[_0x4e4f('0x19')](_0x4c7ad0);}};}function respondWithFilteredResult(_0xa6b02c,_0x45a408){return function(_0x47ef92){if(_0x47ef92){var _0x1c7a12=typeof _0x45a408[_0x4e4f('0x1a')]===_0x4e4f('0x1b')&&typeof _0x45a408[_0x4e4f('0x1c')]===_0x4e4f('0x1b');var _0x1f2fe9=_0x47ef92['count'];var _0x131cb6=_0x1c7a12?0x0:_0x45a408[_0x4e4f('0x1a')];var _0x54388a=_0x1c7a12?_0x47ef92[_0x4e4f('0x1d')]:_0x45a408['offset']+_0x45a408[_0x4e4f('0x1c')];var _0x467d35;if(_0x54388a>=_0x1f2fe9){_0x54388a=_0x1f2fe9;_0x467d35=0xc8;}else{_0x467d35=0xce;}_0xa6b02c['status'](_0x467d35);return _0xa6b02c[_0x4e4f('0x1e')](_0x4e4f('0x1f'),_0x131cb6+'-'+_0x54388a+'/'+_0x1f2fe9)[_0x4e4f('0x19')](_0x47ef92);}return null;};}function patchUpdates(_0x33175a){return function(_0x581bc6){try{jsonpatch[_0x4e4f('0x20')](_0x581bc6,_0x33175a,!![]);}catch(_0xe25acc){return BPromise[_0x4e4f('0x21')](_0xe25acc);}return _0x581bc6[_0x4e4f('0x22')]();};}function saveUpdates(_0x27644a,_0x27a46f){return function(_0x2bff56){if(_0x2bff56){return _0x2bff56[_0x4e4f('0x23')](_0x27644a)['then'](function(_0xdf076d){return _0xdf076d;});}return null;};}function removeEntity(_0x41a809,_0x38a7fe){return function(_0x124482){if(_0x124482){return _0x124482[_0x4e4f('0x24')]()[_0x4e4f('0x25')](function(){_0x41a809[_0x4e4f('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0x439970,_0x4b3907){return function(_0x1fbd30){if(!_0x1fbd30){_0x439970['sendStatus'](0x194);}return _0x1fbd30;};}function handleError(_0x4de24e,_0x2cb76c){_0x2cb76c=_0x2cb76c||0x1f4;return function(_0x312871){logger[_0x4e4f('0x26')](_0x312871['stack']);if(_0x312871['name']){delete _0x312871['name'];}_0x4de24e[_0x4e4f('0x18')](_0x2cb76c)['send'](_0x312871);};}exports[_0x4e4f('0x27')]=function(_0x1aab80,_0x52f4bd){var _0x579ac0={},_0x3fad7b={},_0x95c017={'count':0x0,'rows':[]};var _0x361a74=_[_0x4e4f('0x28')](db[_0x4e4f('0x29')][_0x4e4f('0x2a')],function(_0x3bf9e7){return{'name':_0x3bf9e7[_0x4e4f('0x2b')],'type':_0x3bf9e7['type']['key']};});_0x3fad7b[_0x4e4f('0x2c')]=_[_0x4e4f('0x28')](_0x361a74,'name');_0x3fad7b[_0x4e4f('0x2d')]=_[_0x4e4f('0x2e')](_0x1aab80[_0x4e4f('0x2d')]);_0x3fad7b['filters']=_[_0x4e4f('0x2f')](_0x3fad7b[_0x4e4f('0x2c')],_0x3fad7b['query']);_0x579ac0[_0x4e4f('0x30')]=_[_0x4e4f('0x2f')](_0x3fad7b[_0x4e4f('0x2c')],qs[_0x4e4f('0x31')](_0x1aab80['query'][_0x4e4f('0x31')]));_0x579ac0[_0x4e4f('0x30')]=_0x579ac0['attributes']['length']?_0x579ac0[_0x4e4f('0x30')]:_0x3fad7b[_0x4e4f('0x2c')];if(!_0x1aab80['query'][_0x4e4f('0x32')](_0x4e4f('0x33'))){_0x579ac0['limit']=qs[_0x4e4f('0x1c')](_0x1aab80['query'][_0x4e4f('0x1c')]);_0x579ac0[_0x4e4f('0x1a')]=qs[_0x4e4f('0x1a')](_0x1aab80['query'][_0x4e4f('0x1a')]);}_0x579ac0[_0x4e4f('0x34')]=qs['sort'](_0x1aab80[_0x4e4f('0x2d')][_0x4e4f('0x35')]);_0x579ac0[_0x4e4f('0x36')]=qs[_0x4e4f('0x37')](_['pick'](_0x1aab80[_0x4e4f('0x2d')],_0x3fad7b[_0x4e4f('0x37')]),_0x361a74);if(_0x1aab80[_0x4e4f('0x2d')]['filter']){_0x579ac0[_0x4e4f('0x36')]=_[_0x4e4f('0x38')](_0x579ac0[_0x4e4f('0x36')],{'$or':_['map'](_0x361a74,function(_0x456326){if(_0x456326[_0x4e4f('0x39')]!==_0x4e4f('0x3a')){var _0x53059c={};_0x53059c[_0x456326[_0x4e4f('0x3b')]]={'$like':'%'+_0x1aab80['query'][_0x4e4f('0x3c')]+'%'};return _0x53059c;}})});}_0x579ac0=_[_0x4e4f('0x38')]({},_0x579ac0,_0x1aab80[_0x4e4f('0x3d')]);var _0x3bba9e={'where':_0x579ac0['where']};return db[_0x4e4f('0x29')][_0x4e4f('0x1d')](_0x3bba9e)[_0x4e4f('0x25')](function(_0x3a638e){_0x95c017['count']=_0x3a638e;if(_0x1aab80['query'][_0x4e4f('0x3e')]){_0x579ac0[_0x4e4f('0x3f')]=[{'all':!![]}];}return db['FreshsalesField'][_0x4e4f('0x40')](_0x579ac0);})[_0x4e4f('0x25')](function(_0xbc5da9){_0x95c017[_0x4e4f('0x41')]=_0xbc5da9;return _0x95c017;})['then'](respondWithFilteredResult(_0x52f4bd,_0x579ac0))['catch'](handleError(_0x52f4bd,null));};exports[_0x4e4f('0x42')]=function(_0x30c61f,_0x70e03c){var _0x36858a={'raw':!![],'where':{'id':_0x30c61f[_0x4e4f('0x43')]['id']}},_0x49b4b0={};_0x49b4b0[_0x4e4f('0x2c')]=_[_0x4e4f('0x2e')](db['FreshsalesField'][_0x4e4f('0x2a')]);_0x49b4b0[_0x4e4f('0x2d')]=_[_0x4e4f('0x2e')](_0x30c61f['query']);_0x49b4b0['filters']=_['intersection'](_0x49b4b0[_0x4e4f('0x2c')],_0x49b4b0[_0x4e4f('0x2d')]);_0x36858a['attributes']=_[_0x4e4f('0x2f')](_0x49b4b0['model'],qs[_0x4e4f('0x31')](_0x30c61f['query'][_0x4e4f('0x31')]));_0x36858a['attributes']=_0x36858a[_0x4e4f('0x30')][_0x4e4f('0x44')]?_0x36858a[_0x4e4f('0x30')]:_0x49b4b0[_0x4e4f('0x2c')];if(_0x30c61f['query']['includeAll']){_0x36858a[_0x4e4f('0x3f')]=[{'all':!![]}];}_0x36858a=_[_0x4e4f('0x38')]({},_0x36858a,_0x30c61f['options']);return db[_0x4e4f('0x29')][_0x4e4f('0x45')](_0x36858a)[_0x4e4f('0x25')](handleEntityNotFound(_0x70e03c,null))['then'](respondWithResult(_0x70e03c,null))['catch'](handleError(_0x70e03c,null));};exports[_0x4e4f('0x46')]=function(_0x43f0c6,_0x42cf2a){return db['FreshsalesField'][_0x4e4f('0x46')](_0x43f0c6[_0x4e4f('0x47')],{})['then'](respondWithResult(_0x42cf2a,0xc9))[_0x4e4f('0x48')](handleError(_0x42cf2a,null));};exports['update']=function(_0x23fddc,_0x25d183){if(_0x23fddc[_0x4e4f('0x47')]['id']){delete _0x23fddc[_0x4e4f('0x47')]['id'];}return db[_0x4e4f('0x29')][_0x4e4f('0x45')]({'where':{'id':_0x23fddc['params']['id']}})[_0x4e4f('0x25')](handleEntityNotFound(_0x25d183,null))[_0x4e4f('0x25')](saveUpdates(_0x23fddc['body'],null))[_0x4e4f('0x25')](respondWithResult(_0x25d183,null))[_0x4e4f('0x48')](handleError(_0x25d183,null));};exports['destroy']=function(_0x27bd81,_0x36af2b){return db[_0x4e4f('0x29')][_0x4e4f('0x45')]({'where':{'id':_0x27bd81[_0x4e4f('0x43')]['id']}})[_0x4e4f('0x25')](handleEntityNotFound(_0x36af2b,null))['then'](removeEntity(_0x36af2b,null))['catch'](handleError(_0x36af2b,null));};
\ No newline at end of file
+var _0xf2b9=['name','send','index','rawAttributes','fieldName','type','model','map','query','keys','filters','intersection','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge','FreshsalesField','includeAll','include','findAll','rows','catch','params','fields','length','options','find','create','body','update','destroy','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','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','api','../../config/utils','../../mysqldb','sendStatus','status','end','undefined','limit','count','offset','set','Content-Range','json','apply','reject','save','then','error','stack'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0xf2b9,0x15d));var _0x9f2b=function(_0x36fa1a,_0xe9af21){_0x36fa1a=_0x36fa1a-0x0;var _0x224bd9=_0xf2b9[_0x36fa1a];return _0x224bd9;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x9f2b('0x0'));var jsonpatch=require(_0x9f2b('0x1'));var rp=require(_0x9f2b('0x2'));var moment=require('moment');var BPromise=require(_0x9f2b('0x3'));var Mustache=require(_0x9f2b('0x4'));var util=require(_0x9f2b('0x5'));var path=require(_0x9f2b('0x6'));var sox=require('sox');var csv=require(_0x9f2b('0x7'));var ejs=require(_0x9f2b('0x8'));var fs=require('fs');var fs_extra=require(_0x9f2b('0x9'));var _=require(_0x9f2b('0xa'));var squel=require(_0x9f2b('0xb'));var crypto=require(_0x9f2b('0xc'));var jsforce=require(_0x9f2b('0xd'));var deskjs=require(_0x9f2b('0xe'));var toCsv=require('to-csv');var querystring=require(_0x9f2b('0xf'));var Papa=require(_0x9f2b('0x10'));var Redis=require(_0x9f2b('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x9f2b('0x12'));var as=require(_0x9f2b('0x13'));var hardwareService=require(_0x9f2b('0x14'));var logger=require(_0x9f2b('0x15'))(_0x9f2b('0x16'));var utils=require(_0x9f2b('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x9f2b('0x18'))['db'];function respondWithStatusCode(_0x30b4a6,_0x168667){_0x168667=_0x168667||0xcc;return function(_0xf11e74){if(_0xf11e74){return _0x30b4a6[_0x9f2b('0x19')](_0x168667);}return _0x30b4a6[_0x9f2b('0x1a')](_0x168667)[_0x9f2b('0x1b')]();};}function respondWithResult(_0x3cdb84,_0x2bd988){_0x2bd988=_0x2bd988||0xc8;return function(_0x693faa){if(_0x693faa){return _0x3cdb84[_0x9f2b('0x1a')](_0x2bd988)['json'](_0x693faa);}};}function respondWithFilteredResult(_0x518b8f,_0x31d9b7){return function(_0x5d28f9){if(_0x5d28f9){var _0x138a1e=typeof _0x31d9b7['offset']===_0x9f2b('0x1c')&&typeof _0x31d9b7[_0x9f2b('0x1d')]===_0x9f2b('0x1c');var _0x3b2487=_0x5d28f9[_0x9f2b('0x1e')];var _0x348130=_0x138a1e?0x0:_0x31d9b7[_0x9f2b('0x1f')];var _0x440bee=_0x138a1e?_0x5d28f9[_0x9f2b('0x1e')]:_0x31d9b7['offset']+_0x31d9b7[_0x9f2b('0x1d')];var _0x1cf64a;if(_0x440bee>=_0x3b2487){_0x440bee=_0x3b2487;_0x1cf64a=0xc8;}else{_0x1cf64a=0xce;}_0x518b8f['status'](_0x1cf64a);return _0x518b8f[_0x9f2b('0x20')](_0x9f2b('0x21'),_0x348130+'-'+_0x440bee+'/'+_0x3b2487)[_0x9f2b('0x22')](_0x5d28f9);}return null;};}function patchUpdates(_0x1c539e){return function(_0x41e7e6){try{jsonpatch[_0x9f2b('0x23')](_0x41e7e6,_0x1c539e,!![]);}catch(_0x45a753){return BPromise[_0x9f2b('0x24')](_0x45a753);}return _0x41e7e6[_0x9f2b('0x25')]();};}function saveUpdates(_0x56a5a7,_0x234209){return function(_0x6951f9){if(_0x6951f9){return _0x6951f9['update'](_0x56a5a7)[_0x9f2b('0x26')](function(_0x5a80b5){return _0x5a80b5;});}return null;};}function removeEntity(_0x2d8646,_0x354be1){return function(_0x5db8c2){if(_0x5db8c2){return _0x5db8c2['destroy']()['then'](function(){_0x2d8646['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x5abf53,_0x1edf8e){return function(_0x3e9d68){if(!_0x3e9d68){_0x5abf53[_0x9f2b('0x19')](0x194);}return _0x3e9d68;};}function handleError(_0x2cada7,_0x4fa536){_0x4fa536=_0x4fa536||0x1f4;return function(_0x29ac4b){logger[_0x9f2b('0x27')](_0x29ac4b[_0x9f2b('0x28')]);if(_0x29ac4b[_0x9f2b('0x29')]){delete _0x29ac4b[_0x9f2b('0x29')];}_0x2cada7[_0x9f2b('0x1a')](_0x4fa536)[_0x9f2b('0x2a')](_0x29ac4b);};}exports[_0x9f2b('0x2b')]=function(_0x130308,_0x4760c3){var _0x2709fe={},_0x3aa489={},_0x5f495a={'count':0x0,'rows':[]};var _0x55b419=_['map'](db['FreshsalesField'][_0x9f2b('0x2c')],function(_0x57cd2e){return{'name':_0x57cd2e[_0x9f2b('0x2d')],'type':_0x57cd2e[_0x9f2b('0x2e')]['key']};});_0x3aa489[_0x9f2b('0x2f')]=_[_0x9f2b('0x30')](_0x55b419,_0x9f2b('0x29'));_0x3aa489[_0x9f2b('0x31')]=_[_0x9f2b('0x32')](_0x130308['query']);_0x3aa489[_0x9f2b('0x33')]=_[_0x9f2b('0x34')](_0x3aa489['model'],_0x3aa489[_0x9f2b('0x31')]);_0x2709fe[_0x9f2b('0x35')]=_[_0x9f2b('0x34')](_0x3aa489[_0x9f2b('0x2f')],qs['fields'](_0x130308['query']['fields']));_0x2709fe[_0x9f2b('0x35')]=_0x2709fe[_0x9f2b('0x35')]['length']?_0x2709fe[_0x9f2b('0x35')]:_0x3aa489[_0x9f2b('0x2f')];if(!_0x130308['query'][_0x9f2b('0x36')](_0x9f2b('0x37'))){_0x2709fe['limit']=qs[_0x9f2b('0x1d')](_0x130308[_0x9f2b('0x31')][_0x9f2b('0x1d')]);_0x2709fe[_0x9f2b('0x1f')]=qs[_0x9f2b('0x1f')](_0x130308[_0x9f2b('0x31')][_0x9f2b('0x1f')]);}_0x2709fe[_0x9f2b('0x38')]=qs[_0x9f2b('0x39')](_0x130308['query'][_0x9f2b('0x39')]);_0x2709fe[_0x9f2b('0x3a')]=qs[_0x9f2b('0x33')](_[_0x9f2b('0x3b')](_0x130308[_0x9f2b('0x31')],_0x3aa489[_0x9f2b('0x33')]),_0x55b419);if(_0x130308[_0x9f2b('0x31')][_0x9f2b('0x3c')]){_0x2709fe[_0x9f2b('0x3a')]=_['merge'](_0x2709fe[_0x9f2b('0x3a')],{'$or':_[_0x9f2b('0x30')](_0x55b419,function(_0x3303b2){if(_0x3303b2[_0x9f2b('0x2e')]!==_0x9f2b('0x3d')){var _0x1bdd71={};_0x1bdd71[_0x3303b2[_0x9f2b('0x29')]]={'$like':'%'+_0x130308[_0x9f2b('0x31')][_0x9f2b('0x3c')]+'%'};return _0x1bdd71;}})});}_0x2709fe=_[_0x9f2b('0x3e')]({},_0x2709fe,_0x130308['options']);var _0x49317d={'where':_0x2709fe['where']};return db[_0x9f2b('0x3f')][_0x9f2b('0x1e')](_0x49317d)[_0x9f2b('0x26')](function(_0x3f29b0){_0x5f495a[_0x9f2b('0x1e')]=_0x3f29b0;if(_0x130308[_0x9f2b('0x31')][_0x9f2b('0x40')]){_0x2709fe[_0x9f2b('0x41')]=[{'all':!![]}];}return db[_0x9f2b('0x3f')][_0x9f2b('0x42')](_0x2709fe);})[_0x9f2b('0x26')](function(_0x53adf4){_0x5f495a[_0x9f2b('0x43')]=_0x53adf4;return _0x5f495a;})[_0x9f2b('0x26')](respondWithFilteredResult(_0x4760c3,_0x2709fe))[_0x9f2b('0x44')](handleError(_0x4760c3,null));};exports['show']=function(_0x1af1b2,_0x21b014){var _0x248f61={'raw':!![],'where':{'id':_0x1af1b2[_0x9f2b('0x45')]['id']}},_0x1c819f={};_0x1c819f['model']=_[_0x9f2b('0x32')](db[_0x9f2b('0x3f')][_0x9f2b('0x2c')]);_0x1c819f['query']=_['keys'](_0x1af1b2[_0x9f2b('0x31')]);_0x1c819f['filters']=_[_0x9f2b('0x34')](_0x1c819f[_0x9f2b('0x2f')],_0x1c819f[_0x9f2b('0x31')]);_0x248f61[_0x9f2b('0x35')]=_[_0x9f2b('0x34')](_0x1c819f[_0x9f2b('0x2f')],qs[_0x9f2b('0x46')](_0x1af1b2['query']['fields']));_0x248f61[_0x9f2b('0x35')]=_0x248f61[_0x9f2b('0x35')][_0x9f2b('0x47')]?_0x248f61[_0x9f2b('0x35')]:_0x1c819f[_0x9f2b('0x2f')];if(_0x1af1b2['query'][_0x9f2b('0x40')]){_0x248f61['include']=[{'all':!![]}];}_0x248f61=_[_0x9f2b('0x3e')]({},_0x248f61,_0x1af1b2[_0x9f2b('0x48')]);return db['FreshsalesField'][_0x9f2b('0x49')](_0x248f61)[_0x9f2b('0x26')](handleEntityNotFound(_0x21b014,null))['then'](respondWithResult(_0x21b014,null))['catch'](handleError(_0x21b014,null));};exports[_0x9f2b('0x4a')]=function(_0x17840c,_0x4e1f4c){return db[_0x9f2b('0x3f')][_0x9f2b('0x4a')](_0x17840c[_0x9f2b('0x4b')],{})[_0x9f2b('0x26')](respondWithResult(_0x4e1f4c,0xc9))[_0x9f2b('0x44')](handleError(_0x4e1f4c,null));};exports[_0x9f2b('0x4c')]=function(_0x4163c9,_0x1e2ead){if(_0x4163c9[_0x9f2b('0x4b')]['id']){delete _0x4163c9[_0x9f2b('0x4b')]['id'];}return db['FreshsalesField'][_0x9f2b('0x49')]({'where':{'id':_0x4163c9['params']['id']}})['then'](handleEntityNotFound(_0x1e2ead,null))[_0x9f2b('0x26')](saveUpdates(_0x4163c9['body'],null))['then'](respondWithResult(_0x1e2ead,null))['catch'](handleError(_0x1e2ead,null));};exports[_0x9f2b('0x4d')]=function(_0x22f991,_0x53f50b){return db[_0x9f2b('0x3f')][_0x9f2b('0x49')]({'where':{'id':_0x22f991[_0x9f2b('0x45')]['id']}})[_0x9f2b('0x26')](handleEntityNotFound(_0x53f50b,null))[_0x9f2b('0x26')](removeEntity(_0x53f50b,null))[_0x9f2b('0x44')](handleError(_0x53f50b,null));};
\ No newline at end of file
index e505289..3418d1c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1867=['util','api','bluebird','request-promise','path','rimraf','../../config/environment','./intFreshsalesField.attributes','exports','FreshsalesField','int_freshsales_fields','idField','FieldId','lodash'];(function(_0x542b75,_0x599551){var _0x820dcc=function(_0x2e23f4){while(--_0x2e23f4){_0x542b75['push'](_0x542b75['shift']());}};_0x820dcc(++_0x599551);}(_0x1867,0xb5));var _0x7186=function(_0x7744c9,_0x2969ef){_0x7744c9=_0x7744c9-0x0;var _0x163826=_0x1867[_0x7744c9];return _0x163826;};'use strict';var _=require(_0x7186('0x0'));var util=require(_0x7186('0x1'));var logger=require('../../config/logger')(_0x7186('0x2'));var moment=require('moment');var BPromise=require(_0x7186('0x3'));var rp=require(_0x7186('0x4'));var fs=require('fs');var path=require(_0x7186('0x5'));var rimraf=require(_0x7186('0x6'));var config=require(_0x7186('0x7'));var attributes=require(_0x7186('0x8'));module[_0x7186('0x9')]=function(_0x27bd91,_0x349203){return _0x27bd91['define'](_0x7186('0xa'),attributes,{'tableName':_0x7186('0xb'),'paranoid':![],'indexes':[{'name':'freshsales_unique_index','fields':[_0x7186('0xc'),_0x7186('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xa848=['rimraf','../../config/environment','./intFreshsalesField.attributes','exports','define','FreshsalesField','int_freshsales_fields','freshsales_unique_index','FieldId','lodash','util','../../config/logger','moment','bluebird','request-promise','path'];(function(_0xd511ff,_0xf77ab9){var _0x508d6d=function(_0x19342a){while(--_0x19342a){_0xd511ff['push'](_0xd511ff['shift']());}};_0x508d6d(++_0xf77ab9);}(_0xa848,0x99));var _0x8a84=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0xa848[_0x167cc1];return _0x10bc4b;};'use strict';var _=require(_0x8a84('0x0'));var util=require(_0x8a84('0x1'));var logger=require(_0x8a84('0x2'))('api');var moment=require(_0x8a84('0x3'));var BPromise=require(_0x8a84('0x4'));var rp=require(_0x8a84('0x5'));var fs=require('fs');var path=require(_0x8a84('0x6'));var rimraf=require(_0x8a84('0x7'));var config=require(_0x8a84('0x8'));var attributes=require(_0x8a84('0x9'));module[_0x8a84('0xa')]=function(_0x13acad,_0x3ee596){return _0x13acad[_0x8a84('0xb')](_0x8a84('0xc'),attributes,{'tableName':_0x8a84('0xd'),'paranoid':![],'indexes':[{'name':_0x8a84('0xe'),'fields':['idField',_0x8a84('0xf')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index c208f6f..2bc9fb7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x326f=['info','FreshsalesField,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x16317d,_0x35ee2e){var _0x46a591=function(_0x24f932){while(--_0x24f932){_0x16317d['push'](_0x16317d['shift']());}};_0x46a591(++_0x35ee2e);}(_0x326f,0xd1));var _0xf326=function(_0x746e88,_0x14d63d){_0x746e88=_0x746e88-0x0;var _0x1f054a=_0x326f[_0x746e88];return _0x1f054a;};'use strict';var _=require(_0xf326('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xf326('0x1'));var rs=require(_0xf326('0x2'));var fs=require('fs');var Redis=require(_0xf326('0x3'));var db=require(_0xf326('0x4'))['db'];var utils=require(_0xf326('0x5'));var logger=require(_0xf326('0x6'))(_0xf326('0x7'));var config=require(_0xf326('0x8'));var jayson=require(_0xf326('0x9'));var client=jayson[_0xf326('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3c254d,_0x3851eb,_0x165f95){return new BPromise(function(_0x1e7b8a,_0x515bfa){return client['request'](_0x3c254d,_0x165f95)['then'](function(_0x3bacf2){logger[_0xf326('0xb')](_0xf326('0xc'),_0x3851eb,_0xf326('0xd'));logger[_0xf326('0xe')]('FreshsalesField,\x20%s,\x20%s,\x20%s',_0x3851eb,_0xf326('0xd'),JSON['stringify'](_0x3bacf2));if(_0x3bacf2[_0xf326('0xf')]){if(_0x3bacf2['error'][_0xf326('0x10')]===0x1f4){logger['error'](_0xf326('0xc'),_0x3851eb,_0x3bacf2[_0xf326('0xf')]['message']);return _0x515bfa(_0x3bacf2[_0xf326('0xf')][_0xf326('0x11')]);}logger[_0xf326('0xf')](_0xf326('0xc'),_0x3851eb,_0x3bacf2['error'][_0xf326('0x11')]);return _0x1e7b8a(_0x3bacf2['error']['message']);}else{logger[_0xf326('0xb')](_0xf326('0xc'),_0x3851eb,_0xf326('0xd'));_0x1e7b8a(_0x3bacf2[_0xf326('0x12')][_0xf326('0x11')]);}})[_0xf326('0x13')](function(_0x34128e){logger[_0xf326('0xf')]('FreshsalesField,\x20%s,\x20%s',_0x3851eb,_0x34128e);_0x515bfa(_0x34128e);});});}
\ No newline at end of file
+var _0x4975=['ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','FreshsalesField,\x20%s,\x20%s','request\x20sent','debug','FreshsalesField,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','moment','bluebird','randomstring'];(function(_0x5783f4,_0x4a9e0a){var _0x28e380=function(_0x1ffc49){while(--_0x1ffc49){_0x5783f4['push'](_0x5783f4['shift']());}};_0x28e380(++_0x4a9e0a);}(_0x4975,0x86));var _0x5497=function(_0x16fcd9,_0x250c06){_0x16fcd9=_0x16fcd9-0x0;var _0x29fefd=_0x4975[_0x16fcd9];return _0x29fefd;};'use strict';var _=require(_0x5497('0x0'));var util=require('util');var moment=require(_0x5497('0x1'));var BPromise=require(_0x5497('0x2'));var rs=require(_0x5497('0x3'));var fs=require('fs');var Redis=require(_0x5497('0x4'));var db=require(_0x5497('0x5'))['db'];var utils=require(_0x5497('0x6'));var logger=require(_0x5497('0x7'))(_0x5497('0x8'));var config=require(_0x5497('0x9'));var jayson=require(_0x5497('0xa'));var client=jayson['client'][_0x5497('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4f563d,_0x1d0019,_0x674a2a){return new BPromise(function(_0x368e8b,_0x57f930){return client[_0x5497('0xc')](_0x4f563d,_0x674a2a)['then'](function(_0x1f63d8){logger[_0x5497('0xd')](_0x5497('0xe'),_0x1d0019,_0x5497('0xf'));logger[_0x5497('0x10')](_0x5497('0x11'),_0x1d0019,_0x5497('0xf'),JSON[_0x5497('0x12')](_0x1f63d8));if(_0x1f63d8['error']){if(_0x1f63d8['error']['code']===0x1f4){logger[_0x5497('0x13')](_0x5497('0xe'),_0x1d0019,_0x1f63d8[_0x5497('0x13')][_0x5497('0x14')]);return _0x57f930(_0x1f63d8[_0x5497('0x13')][_0x5497('0x14')]);}logger[_0x5497('0x13')](_0x5497('0xe'),_0x1d0019,_0x1f63d8[_0x5497('0x13')][_0x5497('0x14')]);return _0x368e8b(_0x1f63d8['error'][_0x5497('0x14')]);}else{logger['info'](_0x5497('0xe'),_0x1d0019,_0x5497('0xf'));_0x368e8b(_0x1f63d8[_0x5497('0x15')][_0x5497('0x14')]);}})[_0x5497('0x16')](function(_0x4073e6){logger[_0x5497('0x13')]('FreshsalesField,\x20%s,\x20%s',_0x1d0019,_0x4073e6);_0x57f930(_0x4073e6);});});}
\ No newline at end of file
index 7a38284..d02b975 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSalesforceAccount.controller','get','index','/:id','getConfigurations','/:id/fields','isAuthenticated','getFields','post','addConfiguration','put','update','destroy','exports','multer','util','path'];(function(_0x50e26a,_0x2f7a08){var _0x34f013=function(_0x3f4fba){while(--_0x3f4fba){_0x50e26a['push'](_0x50e26a['shift']());}};_0x34f013(++_0x2f7a08);}(_0xa9e0,0x123));var _0x0a9e=function(_0x298ed3,_0x4ab5e1){_0x298ed3=_0x298ed3-0x0;var _0x5aad28=_0xa9e0[_0x298ed3];return _0x5aad28;};'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('0x8')]('/:id/configurations',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')]('/',auth['isAuthenticated'](),controller['create']);router['post']('/:id/configurations',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x11')](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x12')]);router['delete'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);module[_0x0a9e('0x14')]=router;
\ No newline at end of file
+var _0x9957=['connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intSalesforceAccount.controller','get','isAuthenticated','index','/:id','show','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','put','update','delete','destroy','exports','multer','util','path'];(function(_0x38b171,_0x5d4925){var _0xe18c8=function(_0x468127){while(--_0x468127){_0x38b171['push'](_0x38b171['shift']());}};_0xe18c8(++_0x5d4925);}(_0x9957,0x93));var _0x7995=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x9957[_0x5b644e];return _0x49c6bf;};'use strict';var multer=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var path=require(_0x7995('0x2'));var timeout=require(_0x7995('0x3'));var express=require('express');var router=express[_0x7995('0x4')]();var fs_extra=require(_0x7995('0x5'));var auth=require(_0x7995('0x6'));var interaction=require(_0x7995('0x7'));var config=require('../../config/environment');var controller=require(_0x7995('0x8'));router[_0x7995('0x9')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0xb')]);router[_0x7995('0x9')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0xd')]);router[_0x7995('0x9')]('/:id/configurations',auth[_0x7995('0xa')](),controller[_0x7995('0xe')]);router[_0x7995('0x9')](_0x7995('0xf'),auth[_0x7995('0xa')](),controller[_0x7995('0x10')]);router[_0x7995('0x11')]('/',auth['isAuthenticated'](),controller[_0x7995('0x12')]);router[_0x7995('0x11')]('/:id/configurations',auth[_0x7995('0xa')](),controller[_0x7995('0x13')]);router[_0x7995('0x14')](_0x7995('0xc'),auth[_0x7995('0xa')](),controller[_0x7995('0x15')]);router[_0x7995('0x16')]('/:id',auth['isAuthenticated'](),controller[_0x7995('0x17')]);module[_0x7995('0x18')]=router;
\ No newline at end of file
index 2f8186b..2f09939 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcd6f=['newTab','sequelize','exports','STRING','username','ENUM'];(function(_0x229b57,_0x493781){var _0x27937f=function(_0x23d514){while(--_0x23d514){_0x229b57['push'](_0x229b57['shift']());}};_0x27937f(++_0x493781);}(_0xcd6f,0x17b));var _0xfcd6=function(_0x330dcc,_0x30bf1c){_0x330dcc=_0x330dcc-0x0;var _0x37b076=_0xcd6f[_0x330dcc];return _0x37b076;};'use strict';var Sequelize=require(_0xfcd6('0x0'));module[_0xfcd6('0x1')]={'name':{'type':Sequelize[_0xfcd6('0x2')]},'description':{'type':Sequelize[_0xfcd6('0x2')]},'username':{'type':Sequelize[_0xfcd6('0x2')],'unique':_0xfcd6('0x3')},'remoteUri':{'type':Sequelize['STRING']},'password':{'type':Sequelize[_0xfcd6('0x2')]},'clientId':{'type':Sequelize[_0xfcd6('0x2')]},'clientSecret':{'type':Sequelize[_0xfcd6('0x2')]},'securityToken':{'type':Sequelize[_0xfcd6('0x2')]},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0xfcd6('0x4')]('integrationTab',_0xfcd6('0x5')),'defaultValue':'integrationTab'}};
\ No newline at end of file
+var _0x363a=['newTab','exports','STRING','username','ENUM','integrationTab'];(function(_0x4c2845,_0x16f1a0){var _0x2eb1db=function(_0x49a5ce){while(--_0x49a5ce){_0x4c2845['push'](_0x4c2845['shift']());}};_0x2eb1db(++_0x16f1a0);}(_0x363a,0x97));var _0xa363=function(_0x122e42,_0x222609){_0x122e42=_0x122e42-0x0;var _0x4c019e=_0x363a[_0x122e42];return _0x4c019e;};'use strict';var Sequelize=require('sequelize');module[_0xa363('0x0')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xa363('0x1')]},'username':{'type':Sequelize['STRING'],'unique':_0xa363('0x2')},'remoteUri':{'type':Sequelize[_0xa363('0x1')]},'password':{'type':Sequelize['STRING']},'clientId':{'type':Sequelize[_0xa363('0x1')]},'clientSecret':{'type':Sequelize[_0xa363('0x1')]},'securityToken':{'type':Sequelize[_0xa363('0x1')]},'serverUrl':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0xa363('0x3')](_0xa363('0x4'),_0xa363('0x5')),'defaultValue':_0xa363('0x4')}};
\ No newline at end of file
index f011a52..df6f2d6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2f03=['getConfigurations','findOne','keys','SalesforceConfiguration','rawAttributes','hasOwnProperty','addConfiguration','Subjects','getSubjects','channel','Descriptions','SalesforceField','getFields','Task','remoteUri','clientId','clientSecret','username','password','slice','substring','lastIndexOf','concat','sobject','describe','OwnerId','IsRecurrence','Subject','Description','string','int','picklist','boolean','textarea','phone','includes','label','custom','picklistValues','value','True','true','False','false','test','statusCode','error','getFields,\x20%s,\x20%s,\x20%s','stringify','Wrong\x20credentials','rimraf','zip-dir','fast-json-patch','request-promise','moment','util','path','sox','to-csv','ejs','squel','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','sendStatus','status','end','json','limit','undefined','count','offset','set','apply','update','then','destroy','stack','name','send','map','SalesforceAccount','fieldName','type','model','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','merge','VIRTUAL','filter','options','includeAll','include','findAll','rows','catch','params','create','body','find'];(function(_0x30e3b3,_0x2825db){var _0x4efc0d=function(_0x48c64c){while(--_0x48c64c){_0x30e3b3['push'](_0x30e3b3['shift']());}};_0x4efc0d(++_0x2825db);}(_0x2f03,0x194));var _0x32f0=function(_0x426955,_0x50778a){_0x426955=_0x426955-0x0;var _0x46c925=_0x2f03[_0x426955];return _0x46c925;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x32f0('0x0'));var zipdir=require(_0x32f0('0x1'));var jsonpatch=require(_0x32f0('0x2'));var rp=require(_0x32f0('0x3'));var moment=require(_0x32f0('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x32f0('0x5'));var path=require(_0x32f0('0x6'));var sox=require(_0x32f0('0x7'));var csv=require(_0x32f0('0x8'));var ejs=require(_0x32f0('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x32f0('0xa'));var crypto=require(_0x32f0('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x32f0('0xc'));var toCsv=require(_0x32f0('0x8'));var querystring=require(_0x32f0('0xd'));var Papa=require(_0x32f0('0xe'));var Redis=require('ioredis');var authService=require(_0x32f0('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x32f0('0x10'));var hardwareService=require(_0x32f0('0x11'));var logger=require(_0x32f0('0x12'))('api');var utils=require(_0x32f0('0x13'));var config=require(_0x32f0('0x14'));var licenseUtil=require(_0x32f0('0x15'));var db=require(_0x32f0('0x16'))['db'];var integrations=require(_0x32f0('0x17'));function respondWithStatusCode(_0x538ce5,_0x22c362){_0x22c362=_0x22c362||0xcc;return function(_0x2a1473){if(_0x2a1473){return _0x538ce5[_0x32f0('0x18')](_0x22c362);}return _0x538ce5[_0x32f0('0x19')](_0x22c362)[_0x32f0('0x1a')]();};}function respondWithResult(_0x411bee,_0x352360){_0x352360=_0x352360||0xc8;return function(_0xbfff54){if(_0xbfff54){return _0x411bee[_0x32f0('0x19')](_0x352360)[_0x32f0('0x1b')](_0xbfff54);}};}function respondWithFilteredResult(_0x27beb9,_0x1a321e){return function(_0x4ceff2){if(_0x4ceff2){var _0x4c2f14=typeof _0x1a321e['offset']==='undefined'&&typeof _0x1a321e[_0x32f0('0x1c')]===_0x32f0('0x1d');var _0x5d6a0d=_0x4ceff2[_0x32f0('0x1e')];var _0x536faa=_0x4c2f14?0x0:_0x1a321e[_0x32f0('0x1f')];var _0x164883=_0x4c2f14?_0x4ceff2['count']:_0x1a321e[_0x32f0('0x1f')]+_0x1a321e['limit'];var _0x54c02a;if(_0x164883>=_0x5d6a0d){_0x164883=_0x5d6a0d;_0x54c02a=0xc8;}else{_0x54c02a=0xce;}_0x27beb9[_0x32f0('0x19')](_0x54c02a);return _0x27beb9[_0x32f0('0x20')]('Content-Range',_0x536faa+'-'+_0x164883+'/'+_0x5d6a0d)[_0x32f0('0x1b')](_0x4ceff2);}return null;};}function patchUpdates(_0x11ad83){return function(_0x52ad77){try{jsonpatch[_0x32f0('0x21')](_0x52ad77,_0x11ad83,!![]);}catch(_0x27dda2){return BPromise['reject'](_0x27dda2);}return _0x52ad77['save']();};}function saveUpdates(_0x56867f,_0x4e897b){return function(_0x46bd46){if(_0x46bd46){return _0x46bd46[_0x32f0('0x22')](_0x56867f)[_0x32f0('0x23')](function(_0xa45067){return _0xa45067;});}return null;};}function removeEntity(_0x2fac49,_0xb54715){return function(_0x5ec434){if(_0x5ec434){return _0x5ec434[_0x32f0('0x24')]()['then'](function(){_0x2fac49[_0x32f0('0x19')](0xcc)[_0x32f0('0x1a')]();});}};}function handleEntityNotFound(_0x2c5884,_0x2f9aec){return function(_0x58eca3){if(!_0x58eca3){_0x2c5884[_0x32f0('0x18')](0x194);}return _0x58eca3;};}function handleError(_0xa9f4c4,_0x583755){_0x583755=_0x583755||0x1f4;return function(_0x39c6bc){logger['error'](_0x39c6bc[_0x32f0('0x25')]);if(_0x39c6bc[_0x32f0('0x26')]){delete _0x39c6bc['name'];}_0xa9f4c4[_0x32f0('0x19')](_0x583755)[_0x32f0('0x27')](_0x39c6bc);};}exports['index']=function(_0x2282fe,_0x5d0d5a){var _0x3399ab={},_0x141a3d={},_0x32bee0={'count':0x0,'rows':[]};var _0x52188b=_[_0x32f0('0x28')](db[_0x32f0('0x29')]['rawAttributes'],function(_0x350a0d){return{'name':_0x350a0d[_0x32f0('0x2a')],'type':_0x350a0d[_0x32f0('0x2b')]['key']};});_0x141a3d[_0x32f0('0x2c')]=_['map'](_0x52188b,'name');_0x141a3d[_0x32f0('0x2d')]=_['keys'](_0x2282fe[_0x32f0('0x2d')]);_0x141a3d[_0x32f0('0x2e')]=_[_0x32f0('0x2f')](_0x141a3d['model'],_0x141a3d[_0x32f0('0x2d')]);_0x3399ab[_0x32f0('0x30')]=_[_0x32f0('0x2f')](_0x141a3d[_0x32f0('0x2c')],qs['fields'](_0x2282fe[_0x32f0('0x2d')][_0x32f0('0x31')]));_0x3399ab[_0x32f0('0x30')]=_0x3399ab[_0x32f0('0x30')][_0x32f0('0x32')]?_0x3399ab[_0x32f0('0x30')]:_0x141a3d['model'];if(!_0x2282fe[_0x32f0('0x2d')]['hasOwnProperty'](_0x32f0('0x33'))){_0x3399ab[_0x32f0('0x1c')]=qs[_0x32f0('0x1c')](_0x2282fe[_0x32f0('0x2d')]['limit']);_0x3399ab[_0x32f0('0x1f')]=qs['offset'](_0x2282fe[_0x32f0('0x2d')]['offset']);}_0x3399ab[_0x32f0('0x34')]=qs[_0x32f0('0x35')](_0x2282fe['query'][_0x32f0('0x35')]);_0x3399ab[_0x32f0('0x36')]=qs['filters'](_['pick'](_0x2282fe[_0x32f0('0x2d')],_0x141a3d[_0x32f0('0x2e')]),_0x52188b);if(_0x2282fe[_0x32f0('0x2d')]['filter']){_0x3399ab[_0x32f0('0x36')]=_[_0x32f0('0x37')](_0x3399ab[_0x32f0('0x36')],{'$or':_[_0x32f0('0x28')](_0x52188b,function(_0x3c876b){if(_0x3c876b[_0x32f0('0x2b')]!==_0x32f0('0x38')){var _0x5909db={};_0x5909db[_0x3c876b[_0x32f0('0x26')]]={'$like':'%'+_0x2282fe[_0x32f0('0x2d')][_0x32f0('0x39')]+'%'};return _0x5909db;}})});}_0x3399ab=_[_0x32f0('0x37')]({},_0x3399ab,_0x2282fe[_0x32f0('0x3a')]);var _0x3a1948={'where':_0x3399ab['where']};return db[_0x32f0('0x29')]['count'](_0x3a1948)[_0x32f0('0x23')](function(_0x2b9483){_0x32bee0['count']=_0x2b9483;if(_0x2282fe[_0x32f0('0x2d')][_0x32f0('0x3b')]){_0x3399ab[_0x32f0('0x3c')]=[{'all':!![]}];}return db[_0x32f0('0x29')][_0x32f0('0x3d')](_0x3399ab);})[_0x32f0('0x23')](function(_0x1f263a){_0x32bee0[_0x32f0('0x3e')]=_0x1f263a;return _0x32bee0;})[_0x32f0('0x23')](respondWithFilteredResult(_0x5d0d5a,_0x3399ab))[_0x32f0('0x3f')](handleError(_0x5d0d5a,null));};exports['show']=function(_0x4b48b4,_0x4ff721){var _0x36717b={'raw':![],'where':{'id':_0x4b48b4[_0x32f0('0x40')]['id']}},_0xe79bd4={};_0xe79bd4[_0x32f0('0x2c')]=_['keys'](db[_0x32f0('0x29')]['rawAttributes']);_0xe79bd4[_0x32f0('0x2d')]=_['keys'](_0x4b48b4[_0x32f0('0x2d')]);_0xe79bd4['filters']=_[_0x32f0('0x2f')](_0xe79bd4[_0x32f0('0x2c')],_0xe79bd4['query']);_0x36717b[_0x32f0('0x30')]=_['intersection'](_0xe79bd4[_0x32f0('0x2c')],qs[_0x32f0('0x31')](_0x4b48b4[_0x32f0('0x2d')][_0x32f0('0x31')]));_0x36717b[_0x32f0('0x30')]=_0x36717b[_0x32f0('0x30')][_0x32f0('0x32')]?_0x36717b[_0x32f0('0x30')]:_0xe79bd4[_0x32f0('0x2c')];if(_0x4b48b4[_0x32f0('0x2d')][_0x32f0('0x3b')]){_0x36717b[_0x32f0('0x3c')]=[{'all':!![]}];}_0x36717b=_[_0x32f0('0x37')]({},_0x36717b,_0x4b48b4['options']);return db[_0x32f0('0x29')]['find'](_0x36717b)[_0x32f0('0x23')](handleEntityNotFound(_0x4ff721,null))[_0x32f0('0x23')](respondWithResult(_0x4ff721,null))['catch'](handleError(_0x4ff721,null));};exports[_0x32f0('0x41')]=function(_0x5de161,_0x285af9){return db[_0x32f0('0x29')][_0x32f0('0x41')](_0x5de161['body'],{})['then'](respondWithResult(_0x285af9,0xc9))[_0x32f0('0x3f')](handleError(_0x285af9,null));};exports[_0x32f0('0x22')]=function(_0x3875ab,_0x1ea0db){if(_0x3875ab[_0x32f0('0x42')]['id']){delete _0x3875ab[_0x32f0('0x42')]['id'];}return db[_0x32f0('0x29')][_0x32f0('0x43')]({'where':{'id':_0x3875ab[_0x32f0('0x40')]['id']}})['then'](handleEntityNotFound(_0x1ea0db,null))['then'](saveUpdates(_0x3875ab[_0x32f0('0x42')],null))['then'](respondWithResult(_0x1ea0db,null))['catch'](handleError(_0x1ea0db,null));};exports[_0x32f0('0x24')]=function(_0x53f0ee,_0x40b485){return db[_0x32f0('0x29')][_0x32f0('0x43')]({'where':{'id':_0x53f0ee[_0x32f0('0x40')]['id']}})['then'](handleEntityNotFound(_0x40b485,null))['then'](removeEntity(_0x40b485,null))[_0x32f0('0x3f')](handleError(_0x40b485,null));};exports[_0x32f0('0x44')]=function(_0x391bfd,_0x29f051,_0x59acb7){var _0x566e3a={};var _0x287c70={};var _0x5d8a78;var _0x3ff299;return db[_0x32f0('0x29')][_0x32f0('0x45')]({'where':{'id':_0x391bfd[_0x32f0('0x40')]['id']}})[_0x32f0('0x23')](handleEntityNotFound(_0x29f051,null))['then'](function(_0x153457){if(_0x153457){_0x5d8a78=_0x153457;_0x287c70[_0x32f0('0x2c')]=_[_0x32f0('0x46')](db[_0x32f0('0x47')][_0x32f0('0x48')]);_0x287c70['query']=_[_0x32f0('0x46')](_0x391bfd[_0x32f0('0x2d')]);_0x287c70[_0x32f0('0x2e')]=_[_0x32f0('0x2f')](_0x287c70[_0x32f0('0x2c')],_0x287c70[_0x32f0('0x2d')]);_0x566e3a['attributes']=_[_0x32f0('0x2f')](_0x287c70[_0x32f0('0x2c')],qs[_0x32f0('0x31')](_0x391bfd[_0x32f0('0x2d')][_0x32f0('0x31')]));_0x566e3a[_0x32f0('0x30')]=_0x566e3a['attributes']['length']?_0x566e3a['attributes']:_0x287c70[_0x32f0('0x2c')];_0x566e3a['order']=qs['sort'](_0x391bfd[_0x32f0('0x2d')][_0x32f0('0x35')]);_0x566e3a[_0x32f0('0x36')]=qs[_0x32f0('0x2e')](_['pick'](_0x391bfd[_0x32f0('0x2d')],_0x287c70['filters']));if(_0x391bfd['query'][_0x32f0('0x39')]){_0x566e3a['where']=_[_0x32f0('0x37')](_0x566e3a[_0x32f0('0x36')],{'$or':_[_0x32f0('0x28')](_0x566e3a[_0x32f0('0x30')],function(_0x4eb7dd){var _0x422f64={};_0x422f64[_0x4eb7dd]={'$like':'%'+_0x391bfd[_0x32f0('0x2d')][_0x32f0('0x39')]+'%'};return _0x422f64;})});}_0x566e3a=_['merge']({},_0x566e3a,_0x391bfd['options']);return _0x5d8a78['getConfigurations'](_0x566e3a);}})[_0x32f0('0x23')](function(_0x40d8d6){if(_0x40d8d6){_0x3ff299=_0x40d8d6[_0x32f0('0x32')];if(!_0x391bfd[_0x32f0('0x2d')][_0x32f0('0x49')](_0x32f0('0x33'))){_0x566e3a['limit']=qs[_0x32f0('0x1c')](_0x391bfd['query'][_0x32f0('0x1c')]);_0x566e3a['offset']=qs[_0x32f0('0x1f')](_0x391bfd['query'][_0x32f0('0x1f')]);}return _0x5d8a78[_0x32f0('0x44')](_0x566e3a);}})[_0x32f0('0x23')](function(_0x53ad72){if(_0x53ad72){return _0x53ad72?{'count':_0x3ff299,'rows':_0x53ad72}:null;}})[_0x32f0('0x23')](respondWithResult(_0x29f051,null))['catch'](handleError(_0x29f051,null));};exports[_0x32f0('0x4a')]=function(_0x4a3a76,_0x1681d8,_0x28bc9e){if(_0x4a3a76['body']['id']){delete _0x4a3a76['body']['id'];}return db['SalesforceAccount'][_0x32f0('0x45')]({'where':{'id':_0x4a3a76['params']['id']}})[_0x32f0('0x23')](handleEntityNotFound(_0x1681d8,null))[_0x32f0('0x23')](function(_0x3eebf9){if(_0x3eebf9){_0x4a3a76['body']['AccountId']=_0x3eebf9['id'];_0x4a3a76['body'][_0x32f0('0x4b')]=integrations[_0x32f0('0x4c')](_0x4a3a76[_0x32f0('0x42')][_0x32f0('0x4d')],_0x4a3a76['body'][_0x32f0('0x2b')]);_0x4a3a76[_0x32f0('0x42')][_0x32f0('0x4e')]=integrations['getDescriptions'](_0x4a3a76['body'][_0x32f0('0x4d')],_0x4a3a76['body'][_0x32f0('0x2b')]);return db[_0x32f0('0x47')]['create'](_0x4a3a76[_0x32f0('0x42')],{'include':[{'model':db[_0x32f0('0x4f')],'as':_0x32f0('0x4b')},{'model':db[_0x32f0('0x4f')],'as':_0x32f0('0x4e')}]});}return null;})[_0x32f0('0x23')](respondWithResult(_0x1681d8,null))[_0x32f0('0x3f')](handleError(_0x1681d8,null));};exports[_0x32f0('0x50')]=function(_0x3054b0,_0x32187d,_0x18fac2){var _0x55c6ec;var _0x4117ee='';var _0x24fc3b=_0x32f0('0x51');return db[_0x32f0('0x29')][_0x32f0('0x45')]({'where':{'id':_0x3054b0[_0x32f0('0x40')]['id']},'attributes':['id',_0x32f0('0x52'),_0x32f0('0x53'),_0x32f0('0x54'),_0x32f0('0x55'),_0x32f0('0x56'),'securityToken']})['then'](handleEntityNotFound(_0x32187d,null))['then'](function(_0x409377){if(_0x409377){_0x4117ee=_0x409377['remoteUri'];var _0x570035=_0x4117ee[_0x32f0('0x57')](-0x1);if(_0x570035==='/'){_0x4117ee=_0x4117ee[_0x32f0('0x58')](0x0,_0x4117ee[_0x32f0('0x59')](_0x570035));}_0x55c6ec=new jsforce['Connection']({'oauth2':{'loginUrl':_0x4117ee,'clientId':_0x409377['clientId'],'clientSecret':_0x409377['clientSecret']}});return _0x55c6ec['login'](_0x409377[_0x32f0('0x55')],_0x409377['password'][_0x32f0('0x5a')](_0x409377['securityToken']));}})[_0x32f0('0x23')](function(_0x42e8e2){if(_0x42e8e2){if(!_['isNil'](_0x3054b0[_0x32f0('0x2d')]['ticketType'])){_0x24fc3b=_0x3054b0[_0x32f0('0x2d')]['ticketType'];}return _0x55c6ec[_0x32f0('0x5b')](_0x24fc3b)[_0x32f0('0x5c')]();}})[_0x32f0('0x23')](function(_0x56f611){var _0x36c341=[_0x32f0('0x5d'),'ActivityDate','IsReminderSet',_0x32f0('0x5e'),_0x32f0('0x5f'),_0x32f0('0x60')];var _0x2e1285=[_0x32f0('0x61'),_0x32f0('0x62'),_0x32f0('0x63'),_0x32f0('0x64'),'email',_0x32f0('0x65'),_0x32f0('0x66')];if(_0x56f611){_['remove'](_0x56f611[_0x32f0('0x31')],function(_0x4f93cf){return _0x36c341[_0x32f0('0x67')](_0x4f93cf[_0x32f0('0x26')])||!_0x2e1285[_0x32f0('0x67')](_0x4f93cf['type']);});return{'count':_0x56f611[_0x32f0('0x31')]['length'],'rows':_['map'](_0x56f611[_0x32f0('0x31')],function(_0xc03461){return{'id':_0xc03461[_0x32f0('0x26')],'name':_0xc03461[_0x32f0('0x68')],'custom':_0xc03461[_0x32f0('0x69')],'options':_0xc03461[_0x32f0('0x6a')]['length']>0x0?_[_0x32f0('0x28')](_0xc03461[_0x32f0('0x6a')],function(_0x218ba1){return{'name':_0x218ba1[_0x32f0('0x68')],'value':_0x218ba1[_0x32f0('0x6b')]};}):_0xc03461[_0x32f0('0x2b')]=='boolean'?[{'name':_0x32f0('0x6c'),'value':_0x32f0('0x6d')},{'name':_0x32f0('0x6e'),'value':_0x32f0('0x6f')}]:[]};})};}})['then'](respondWithResult(_0x32187d,null))[_0x32f0('0x3f')](function(_0x4e2a7d){var _0x1639c6=_0x3054b0[_0x32f0('0x2d')][_0x32f0('0x70')]?0x1f4:_0x4e2a7d[_0x32f0('0x71')]||0x1f4;logger[_0x32f0('0x72')](_0x32f0('0x73'),_0x32f0('0x50'),_0x1639c6,JSON[_0x32f0('0x74')](_0x4e2a7d));delete _0x4e2a7d['name'];if(_0x1639c6===0x191){_0x1639c6=0x190;}_0x32187d['status'](_0x1639c6)[_0x32f0('0x27')](_0x3054b0['query'][_0x32f0('0x70')]?{'message':_0x32f0('0x75'),'statusCode':_0x4e2a7d[_0x32f0('0x71')]}:_0x4e2a7d);});};
\ No newline at end of file
+var _0x83f9=['clientSecret','username','password','securityToken','slice','lastIndexOf','Connection','login','isNil','ticketType','describe','OwnerId','ActivityDate','IsReminderSet','IsRecurrence','Subject','Description','string','int','picklist','boolean','email','textarea','phone','includes','label','custom','picklistValues','True','true','False','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','update','destroy','then','error','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','VIRTUAL','merge','options','SalesforceAccount','findAll','show','intersection','fields','includeAll','include','find','create','body','catch','params','getConfigurations','findOne','SalesforceConfiguration','filter','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','SalesforceField','getFields','Task','remoteUri','clientId'];(function(_0x317e30,_0x32ad66){var _0x203788=function(_0x264d38){while(--_0x264d38){_0x317e30['push'](_0x317e30['shift']());}};_0x203788(++_0x32ad66);}(_0x83f9,0x197));var _0x983f=function(_0x3814d4,_0x32ea27){_0x3814d4=_0x3814d4-0x0;var _0x315172=_0x83f9[_0x3814d4];return _0x315172;};'use strict';var emlformat=require(_0x983f('0x0'));var rimraf=require(_0x983f('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x983f('0x2'));var rp=require('request-promise');var moment=require(_0x983f('0x3'));var BPromise=require(_0x983f('0x4'));var Mustache=require(_0x983f('0x5'));var util=require(_0x983f('0x6'));var path=require('path');var sox=require(_0x983f('0x7'));var csv=require(_0x983f('0x8'));var ejs=require(_0x983f('0x9'));var fs=require('fs');var fs_extra=require(_0x983f('0xa'));var _=require(_0x983f('0xb'));var squel=require('squel');var crypto=require(_0x983f('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x983f('0xd'));var toCsv=require(_0x983f('0x8'));var querystring=require(_0x983f('0xe'));var Papa=require(_0x983f('0xf'));var Redis=require(_0x983f('0x10'));var authService=require(_0x983f('0x11'));var qs=require(_0x983f('0x12'));var as=require(_0x983f('0x13'));var hardwareService=require(_0x983f('0x14'));var logger=require(_0x983f('0x15'))(_0x983f('0x16'));var utils=require('../../config/utils');var config=require(_0x983f('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x983f('0x18'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x3cf8f3,_0x24e309){_0x24e309=_0x24e309||0xcc;return function(_0xe16392){if(_0xe16392){return _0x3cf8f3[_0x983f('0x19')](_0x24e309);}return _0x3cf8f3[_0x983f('0x1a')](_0x24e309)[_0x983f('0x1b')]();};}function respondWithResult(_0x26392a,_0x388208){_0x388208=_0x388208||0xc8;return function(_0x57e2a1){if(_0x57e2a1){return _0x26392a[_0x983f('0x1a')](_0x388208)[_0x983f('0x1c')](_0x57e2a1);}};}function respondWithFilteredResult(_0x387872,_0x2ebd60){return function(_0x1f3f1d){if(_0x1f3f1d){var _0x2f099e=typeof _0x2ebd60[_0x983f('0x1d')]===_0x983f('0x1e')&&typeof _0x2ebd60[_0x983f('0x1f')]===_0x983f('0x1e');var _0xe468ad=_0x1f3f1d[_0x983f('0x20')];var _0x1923da=_0x2f099e?0x0:_0x2ebd60['offset'];var _0x4ace4a=_0x2f099e?_0x1f3f1d[_0x983f('0x20')]:_0x2ebd60[_0x983f('0x1d')]+_0x2ebd60[_0x983f('0x1f')];var _0x385942;if(_0x4ace4a>=_0xe468ad){_0x4ace4a=_0xe468ad;_0x385942=0xc8;}else{_0x385942=0xce;}_0x387872[_0x983f('0x1a')](_0x385942);return _0x387872[_0x983f('0x21')]('Content-Range',_0x1923da+'-'+_0x4ace4a+'/'+_0xe468ad)[_0x983f('0x1c')](_0x1f3f1d);}return null;};}function patchUpdates(_0x34d0ec){return function(_0x1c6340){try{jsonpatch['apply'](_0x1c6340,_0x34d0ec,!![]);}catch(_0x3c24d7){return BPromise['reject'](_0x3c24d7);}return _0x1c6340['save']();};}function saveUpdates(_0x1cd832,_0x1390e0){return function(_0x73a4ca){if(_0x73a4ca){return _0x73a4ca[_0x983f('0x22')](_0x1cd832)['then'](function(_0x21014f){return _0x21014f;});}return null;};}function removeEntity(_0x506133,_0x39a7f5){return function(_0x1d3028){if(_0x1d3028){return _0x1d3028[_0x983f('0x23')]()[_0x983f('0x24')](function(){_0x506133['status'](0xcc)[_0x983f('0x1b')]();});}};}function handleEntityNotFound(_0x381eb0,_0x3847ae){return function(_0x2bd811){if(!_0x2bd811){_0x381eb0['sendStatus'](0x194);}return _0x2bd811;};}function handleError(_0x5c14b2,_0x1a3633){_0x1a3633=_0x1a3633||0x1f4;return function(_0x493038){logger[_0x983f('0x25')](_0x493038['stack']);if(_0x493038[_0x983f('0x26')]){delete _0x493038['name'];}_0x5c14b2[_0x983f('0x1a')](_0x1a3633)[_0x983f('0x27')](_0x493038);};}exports[_0x983f('0x28')]=function(_0x993afb,_0x2d1456){var _0xba33f0={},_0x68157b={},_0x438bb8={'count':0x0,'rows':[]};var _0x2baca2=_[_0x983f('0x29')](db['SalesforceAccount'][_0x983f('0x2a')],function(_0xc3b167){return{'name':_0xc3b167[_0x983f('0x2b')],'type':_0xc3b167[_0x983f('0x2c')][_0x983f('0x2d')]};});_0x68157b[_0x983f('0x2e')]=_['map'](_0x2baca2,_0x983f('0x26'));_0x68157b[_0x983f('0x2f')]=_[_0x983f('0x30')](_0x993afb[_0x983f('0x2f')]);_0x68157b[_0x983f('0x31')]=_['intersection'](_0x68157b[_0x983f('0x2e')],_0x68157b[_0x983f('0x2f')]);_0xba33f0[_0x983f('0x32')]=_['intersection'](_0x68157b['model'],qs['fields'](_0x993afb[_0x983f('0x2f')]['fields']));_0xba33f0['attributes']=_0xba33f0[_0x983f('0x32')][_0x983f('0x33')]?_0xba33f0[_0x983f('0x32')]:_0x68157b['model'];if(!_0x993afb[_0x983f('0x2f')][_0x983f('0x34')](_0x983f('0x35'))){_0xba33f0[_0x983f('0x1f')]=qs['limit'](_0x993afb[_0x983f('0x2f')]['limit']);_0xba33f0[_0x983f('0x1d')]=qs[_0x983f('0x1d')](_0x993afb['query'][_0x983f('0x1d')]);}_0xba33f0[_0x983f('0x36')]=qs[_0x983f('0x37')](_0x993afb[_0x983f('0x2f')][_0x983f('0x37')]);_0xba33f0[_0x983f('0x38')]=qs[_0x983f('0x31')](_[_0x983f('0x39')](_0x993afb['query'],_0x68157b['filters']),_0x2baca2);if(_0x993afb['query']['filter']){_0xba33f0[_0x983f('0x38')]=_['merge'](_0xba33f0[_0x983f('0x38')],{'$or':_[_0x983f('0x29')](_0x2baca2,function(_0x70047d){if(_0x70047d['type']!==_0x983f('0x3a')){var _0x1a13fd={};_0x1a13fd[_0x70047d[_0x983f('0x26')]]={'$like':'%'+_0x993afb[_0x983f('0x2f')]['filter']+'%'};return _0x1a13fd;}})});}_0xba33f0=_[_0x983f('0x3b')]({},_0xba33f0,_0x993afb[_0x983f('0x3c')]);var _0x489e16={'where':_0xba33f0[_0x983f('0x38')]};return db[_0x983f('0x3d')][_0x983f('0x20')](_0x489e16)[_0x983f('0x24')](function(_0x356426){_0x438bb8[_0x983f('0x20')]=_0x356426;if(_0x993afb[_0x983f('0x2f')]['includeAll']){_0xba33f0['include']=[{'all':!![]}];}return db[_0x983f('0x3d')][_0x983f('0x3e')](_0xba33f0);})[_0x983f('0x24')](function(_0x39416d){_0x438bb8['rows']=_0x39416d;return _0x438bb8;})[_0x983f('0x24')](respondWithFilteredResult(_0x2d1456,_0xba33f0))['catch'](handleError(_0x2d1456,null));};exports[_0x983f('0x3f')]=function(_0x3f5b78,_0x111eb5){var _0x627ffa={'raw':![],'where':{'id':_0x3f5b78['params']['id']}},_0x2a2518={};_0x2a2518[_0x983f('0x2e')]=_['keys'](db['SalesforceAccount'][_0x983f('0x2a')]);_0x2a2518['query']=_[_0x983f('0x30')](_0x3f5b78['query']);_0x2a2518[_0x983f('0x31')]=_[_0x983f('0x40')](_0x2a2518[_0x983f('0x2e')],_0x2a2518['query']);_0x627ffa['attributes']=_[_0x983f('0x40')](_0x2a2518['model'],qs[_0x983f('0x41')](_0x3f5b78[_0x983f('0x2f')][_0x983f('0x41')]));_0x627ffa['attributes']=_0x627ffa[_0x983f('0x32')][_0x983f('0x33')]?_0x627ffa[_0x983f('0x32')]:_0x2a2518[_0x983f('0x2e')];if(_0x3f5b78[_0x983f('0x2f')][_0x983f('0x42')]){_0x627ffa[_0x983f('0x43')]=[{'all':!![]}];}_0x627ffa=_[_0x983f('0x3b')]({},_0x627ffa,_0x3f5b78[_0x983f('0x3c')]);return db[_0x983f('0x3d')][_0x983f('0x44')](_0x627ffa)[_0x983f('0x24')](handleEntityNotFound(_0x111eb5,null))[_0x983f('0x24')](respondWithResult(_0x111eb5,null))['catch'](handleError(_0x111eb5,null));};exports[_0x983f('0x45')]=function(_0x48d4f3,_0x59e106){return db['SalesforceAccount']['create'](_0x48d4f3[_0x983f('0x46')],{})['then'](respondWithResult(_0x59e106,0xc9))[_0x983f('0x47')](handleError(_0x59e106,null));};exports[_0x983f('0x22')]=function(_0x1e723e,_0x54c76b){if(_0x1e723e[_0x983f('0x46')]['id']){delete _0x1e723e['body']['id'];}return db[_0x983f('0x3d')][_0x983f('0x44')]({'where':{'id':_0x1e723e[_0x983f('0x48')]['id']}})[_0x983f('0x24')](handleEntityNotFound(_0x54c76b,null))[_0x983f('0x24')](saveUpdates(_0x1e723e[_0x983f('0x46')],null))[_0x983f('0x24')](respondWithResult(_0x54c76b,null))[_0x983f('0x47')](handleError(_0x54c76b,null));};exports[_0x983f('0x23')]=function(_0x5aca24,_0x28d1aa){return db[_0x983f('0x3d')][_0x983f('0x44')]({'where':{'id':_0x5aca24[_0x983f('0x48')]['id']}})['then'](handleEntityNotFound(_0x28d1aa,null))[_0x983f('0x24')](removeEntity(_0x28d1aa,null))[_0x983f('0x47')](handleError(_0x28d1aa,null));};exports[_0x983f('0x49')]=function(_0x495f3b,_0x46b016,_0x41eab9){var _0x3dcddd={};var _0x5e1b5f={};var _0x3c7f59;var _0x1b5b30;return db[_0x983f('0x3d')][_0x983f('0x4a')]({'where':{'id':_0x495f3b[_0x983f('0x48')]['id']}})[_0x983f('0x24')](handleEntityNotFound(_0x46b016,null))['then'](function(_0x276a9d){if(_0x276a9d){_0x3c7f59=_0x276a9d;_0x5e1b5f[_0x983f('0x2e')]=_['keys'](db[_0x983f('0x4b')][_0x983f('0x2a')]);_0x5e1b5f[_0x983f('0x2f')]=_[_0x983f('0x30')](_0x495f3b[_0x983f('0x2f')]);_0x5e1b5f['filters']=_['intersection'](_0x5e1b5f[_0x983f('0x2e')],_0x5e1b5f[_0x983f('0x2f')]);_0x3dcddd[_0x983f('0x32')]=_[_0x983f('0x40')](_0x5e1b5f['model'],qs[_0x983f('0x41')](_0x495f3b[_0x983f('0x2f')][_0x983f('0x41')]));_0x3dcddd[_0x983f('0x32')]=_0x3dcddd['attributes'][_0x983f('0x33')]?_0x3dcddd['attributes']:_0x5e1b5f[_0x983f('0x2e')];_0x3dcddd['order']=qs[_0x983f('0x37')](_0x495f3b['query'][_0x983f('0x37')]);_0x3dcddd['where']=qs[_0x983f('0x31')](_[_0x983f('0x39')](_0x495f3b['query'],_0x5e1b5f[_0x983f('0x31')]));if(_0x495f3b[_0x983f('0x2f')][_0x983f('0x4c')]){_0x3dcddd[_0x983f('0x38')]=_[_0x983f('0x3b')](_0x3dcddd['where'],{'$or':_[_0x983f('0x29')](_0x3dcddd['attributes'],function(_0x124c47){var _0xa7d857={};_0xa7d857[_0x124c47]={'$like':'%'+_0x495f3b['query'][_0x983f('0x4c')]+'%'};return _0xa7d857;})});}_0x3dcddd=_[_0x983f('0x3b')]({},_0x3dcddd,_0x495f3b[_0x983f('0x3c')]);return _0x3c7f59[_0x983f('0x49')](_0x3dcddd);}})[_0x983f('0x24')](function(_0x5db141){if(_0x5db141){_0x1b5b30=_0x5db141[_0x983f('0x33')];if(!_0x495f3b[_0x983f('0x2f')][_0x983f('0x34')](_0x983f('0x35'))){_0x3dcddd['limit']=qs[_0x983f('0x1f')](_0x495f3b['query'][_0x983f('0x1f')]);_0x3dcddd['offset']=qs[_0x983f('0x1d')](_0x495f3b[_0x983f('0x2f')][_0x983f('0x1d')]);}return _0x3c7f59['getConfigurations'](_0x3dcddd);}})['then'](function(_0x163e19){if(_0x163e19){return _0x163e19?{'count':_0x1b5b30,'rows':_0x163e19}:null;}})[_0x983f('0x24')](respondWithResult(_0x46b016,null))['catch'](handleError(_0x46b016,null));};exports[_0x983f('0x4d')]=function(_0x3f0c7c,_0x2bd545,_0x1aec30){if(_0x3f0c7c[_0x983f('0x46')]['id']){delete _0x3f0c7c[_0x983f('0x46')]['id'];}return db[_0x983f('0x3d')][_0x983f('0x4a')]({'where':{'id':_0x3f0c7c[_0x983f('0x48')]['id']}})[_0x983f('0x24')](handleEntityNotFound(_0x2bd545,null))['then'](function(_0x281011){if(_0x281011){_0x3f0c7c[_0x983f('0x46')][_0x983f('0x4e')]=_0x281011['id'];_0x3f0c7c[_0x983f('0x46')][_0x983f('0x4f')]=integrations[_0x983f('0x50')](_0x3f0c7c[_0x983f('0x46')][_0x983f('0x51')],_0x3f0c7c[_0x983f('0x46')][_0x983f('0x2c')]);_0x3f0c7c[_0x983f('0x46')][_0x983f('0x52')]=integrations[_0x983f('0x53')](_0x3f0c7c[_0x983f('0x46')][_0x983f('0x51')],_0x3f0c7c[_0x983f('0x46')][_0x983f('0x2c')]);return db[_0x983f('0x4b')][_0x983f('0x45')](_0x3f0c7c[_0x983f('0x46')],{'include':[{'model':db[_0x983f('0x54')],'as':'Subjects'},{'model':db[_0x983f('0x54')],'as':_0x983f('0x52')}]});}return null;})['then'](respondWithResult(_0x2bd545,null))['catch'](handleError(_0x2bd545,null));};exports[_0x983f('0x55')]=function(_0x5c99d9,_0x195bbf,_0x13ba45){var _0x576484;var _0x38bd00='';var _0x2d8972=_0x983f('0x56');return db[_0x983f('0x3d')]['findOne']({'where':{'id':_0x5c99d9[_0x983f('0x48')]['id']},'attributes':['id',_0x983f('0x57'),_0x983f('0x58'),_0x983f('0x59'),_0x983f('0x5a'),_0x983f('0x5b'),_0x983f('0x5c')]})['then'](handleEntityNotFound(_0x195bbf,null))[_0x983f('0x24')](function(_0x42eca2){if(_0x42eca2){_0x38bd00=_0x42eca2[_0x983f('0x57')];var _0x10e5ce=_0x38bd00[_0x983f('0x5d')](-0x1);if(_0x10e5ce==='/'){_0x38bd00=_0x38bd00['substring'](0x0,_0x38bd00[_0x983f('0x5e')](_0x10e5ce));}_0x576484=new jsforce[(_0x983f('0x5f'))]({'oauth2':{'loginUrl':_0x38bd00,'clientId':_0x42eca2['clientId'],'clientSecret':_0x42eca2[_0x983f('0x59')]}});return _0x576484[_0x983f('0x60')](_0x42eca2['username'],_0x42eca2[_0x983f('0x5b')]['concat'](_0x42eca2[_0x983f('0x5c')]));}})[_0x983f('0x24')](function(_0x1ae3fc){if(_0x1ae3fc){if(!_[_0x983f('0x61')](_0x5c99d9['query'][_0x983f('0x62')])){_0x2d8972=_0x5c99d9[_0x983f('0x2f')]['ticketType'];}return _0x576484['sobject'](_0x2d8972)[_0x983f('0x63')]();}})[_0x983f('0x24')](function(_0x408f69){var _0x2dc880=[_0x983f('0x64'),_0x983f('0x65'),_0x983f('0x66'),_0x983f('0x67'),_0x983f('0x68'),_0x983f('0x69')];var _0x3b8808=[_0x983f('0x6a'),_0x983f('0x6b'),_0x983f('0x6c'),_0x983f('0x6d'),_0x983f('0x6e'),_0x983f('0x6f'),_0x983f('0x70')];if(_0x408f69){_['remove'](_0x408f69[_0x983f('0x41')],function(_0x325c9a){return _0x2dc880[_0x983f('0x71')](_0x325c9a['name'])||!_0x3b8808[_0x983f('0x71')](_0x325c9a[_0x983f('0x2c')]);});return{'count':_0x408f69[_0x983f('0x41')][_0x983f('0x33')],'rows':_[_0x983f('0x29')](_0x408f69[_0x983f('0x41')],function(_0x360ba3){return{'id':_0x360ba3[_0x983f('0x26')],'name':_0x360ba3[_0x983f('0x72')],'custom':_0x360ba3[_0x983f('0x73')],'options':_0x360ba3['picklistValues'][_0x983f('0x33')]>0x0?_[_0x983f('0x29')](_0x360ba3[_0x983f('0x74')],function(_0x26c562){return{'name':_0x26c562[_0x983f('0x72')],'value':_0x26c562['value']};}):_0x360ba3[_0x983f('0x2c')]==_0x983f('0x6d')?[{'name':_0x983f('0x75'),'value':_0x983f('0x76')},{'name':_0x983f('0x77'),'value':'false'}]:[]};})};}})['then'](respondWithResult(_0x195bbf,null))[_0x983f('0x47')](function(_0x40150d){var _0x4f3682=_0x5c99d9[_0x983f('0x2f')][_0x983f('0x78')]?0x1f4:_0x40150d[_0x983f('0x79')]||0x1f4;logger['error'](_0x983f('0x7a'),_0x983f('0x55'),_0x4f3682,JSON[_0x983f('0x7b')](_0x40150d));delete _0x40150d['name'];if(_0x4f3682===0x191){_0x4f3682=0x190;}_0x195bbf[_0x983f('0x1a')](_0x4f3682)[_0x983f('0x27')](_0x5c99d9[_0x983f('0x2f')][_0x983f('0x78')]?{'message':'Wrong\x20credentials','statusCode':_0x40150d['statusCode']}:_0x40150d);});};
\ No newline at end of file
index e3b7645..27c5d4a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7c68=['request-promise','path','rimraf','./intSalesforceAccount.attributes','../../components/integrations/configuration','SalesforceAccount','int_salesforce_accounts','lodash','util','../../config/logger','api'];(function(_0x491e36,_0x4579a7){var _0x2e7a3c=function(_0x34fa8d){while(--_0x34fa8d){_0x491e36['push'](_0x491e36['shift']());}};_0x2e7a3c(++_0x4579a7);}(_0x7c68,0x1d5));var _0x87c6=function(_0x5dab13,_0x1e6c9f){_0x5dab13=_0x5dab13-0x0;var _0x110f88=_0x7c68[_0x5dab13];return _0x110f88;};'use strict';var _=require(_0x87c6('0x0'));var util=require(_0x87c6('0x1'));var logger=require(_0x87c6('0x2'))(_0x87c6('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x87c6('0x4'));var fs=require('fs');var path=require(_0x87c6('0x5'));var rimraf=require(_0x87c6('0x6'));var config=require('../../config/environment');var attributes=require(_0x87c6('0x7'));var integrations=require(_0x87c6('0x8'));module['exports']=function(_0x3cc9cf,_0x5b2be4){return _0x3cc9cf['define'](_0x87c6('0x9'),attributes,{'tableName':_0x87c6('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x11cd=['lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./intSalesforceAccount.attributes','../../components/integrations/configuration','define','SalesforceAccount','int_salesforce_accounts'];(function(_0xfbd45c,_0x52c611){var _0x432e51=function(_0x125f9c){while(--_0x125f9c){_0xfbd45c['push'](_0xfbd45c['shift']());}};_0x432e51(++_0x52c611);}(_0x11cd,0x1c0));var _0xd11c=function(_0x48f151,_0x1e4161){_0x48f151=_0x48f151-0x0;var _0x362072=_0x11cd[_0x48f151];return _0x362072;};'use strict';var _=require(_0xd11c('0x0'));var util=require(_0xd11c('0x1'));var logger=require(_0xd11c('0x2'))(_0xd11c('0x3'));var moment=require(_0xd11c('0x4'));var BPromise=require('bluebird');var rp=require(_0xd11c('0x5'));var fs=require('fs');var path=require(_0xd11c('0x6'));var rimraf=require(_0xd11c('0x7'));var config=require(_0xd11c('0x8'));var attributes=require(_0xd11c('0x9'));var integrations=require(_0xd11c('0xa'));module['exports']=function(_0x795b6f,_0xb8e9a7){return _0x795b6f[_0xd11c('0xb')](_0xd11c('0xc'),attributes,{'tableName':_0xd11c('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 73f66fe..0fe391f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x964b=['../../config/logger','../../config/environment','jayson/promise','client','http','request','info','SalesforceAccount,\x20%s,\x20%s','request\x20sent','debug','SalesforceAccount,\x20%s,\x20%s,\x20%s','error','code','message','catch','GetSalesforceAccount','options','raw','attributes','include','model','map','stringify','ShowSalesforceAccount','where','then','lodash','util','bluebird','randomstring','ioredis'];(function(_0x47c958,_0x3cfe09){var _0x573eab=function(_0x380ec6){while(--_0x380ec6){_0x47c958['push'](_0x47c958['shift']());}};_0x573eab(++_0x3cfe09);}(_0x964b,0x112));var _0xb964=function(_0x572c91,_0x312ac9){_0x572c91=_0x572c91-0x0;var _0x36b873=_0x964b[_0x572c91];return _0x36b873;};'use strict';var _=require(_0xb964('0x0'));var util=require(_0xb964('0x1'));var moment=require('moment');var BPromise=require(_0xb964('0x2'));var rs=require(_0xb964('0x3'));var fs=require('fs');var Redis=require(_0xb964('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xb964('0x5'))('rpc');var config=require(_0xb964('0x6'));var jayson=require(_0xb964('0x7'));var client=jayson[_0xb964('0x8')][_0xb964('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x204c7d,_0xde47d5,_0x3fe401){return new BPromise(function(_0x53b463,_0x58e49e){return client[_0xb964('0xa')](_0x204c7d,_0x3fe401)['then'](function(_0x55e697){logger[_0xb964('0xb')](_0xb964('0xc'),_0xde47d5,_0xb964('0xd'));logger[_0xb964('0xe')](_0xb964('0xf'),_0xde47d5,_0xb964('0xd'),JSON['stringify'](_0x55e697));if(_0x55e697[_0xb964('0x10')]){if(_0x55e697[_0xb964('0x10')][_0xb964('0x11')]===0x1f4){logger[_0xb964('0x10')]('SalesforceAccount,\x20%s,\x20%s',_0xde47d5,_0x55e697[_0xb964('0x10')]['message']);return _0x58e49e(_0x55e697['error'][_0xb964('0x12')]);}logger[_0xb964('0x10')](_0xb964('0xc'),_0xde47d5,_0x55e697[_0xb964('0x10')][_0xb964('0x12')]);return _0x53b463(_0x55e697[_0xb964('0x10')][_0xb964('0x12')]);}else{logger['info'](_0xb964('0xc'),_0xde47d5,'request\x20sent');_0x53b463(_0x55e697['result'][_0xb964('0x12')]);}})[_0xb964('0x13')](function(_0x26aa2c){logger[_0xb964('0x10')](_0xb964('0xc'),_0xde47d5,_0x26aa2c);_0x58e49e(_0x26aa2c);});});}exports[_0xb964('0x14')]=function(_0x263276){var _0x44d78a=this;return new Promise(function(_0x2bd9d5,_0x57772a){return db['SalesforceAccount']['findAll']({'raw':_0x263276[_0xb964('0x15')]?_0x263276[_0xb964('0x15')][_0xb964('0x16')]===undefined?!![]:![]:!![],'where':_0x263276[_0xb964('0x15')]?_0x263276[_0xb964('0x15')]['where']||null:null,'attributes':_0x263276['options']?_0x263276['options'][_0xb964('0x17')]||null:null,'limit':_0x263276[_0xb964('0x15')]?_0x263276[_0xb964('0x15')]['limit']||null:null,'include':_0x263276[_0xb964('0x15')]?_0x263276[_0xb964('0x15')][_0xb964('0x18')]?_['map'](_0x263276['options'][_0xb964('0x18')],function(_0x5469c2){return{'model':db[_0x5469c2[_0xb964('0x19')]],'as':_0x5469c2['as'],'attributes':_0x5469c2[_0xb964('0x17')],'include':_0x5469c2[_0xb964('0x18')]?_[_0xb964('0x1a')](_0x5469c2['include'],function(_0x1cecce){return{'model':db[_0x1cecce[_0xb964('0x19')]],'as':_0x1cecce['as'],'attributes':_0x1cecce[_0xb964('0x17')],'include':_0x1cecce[_0xb964('0x18')]?_[_0xb964('0x1a')](_0x1cecce[_0xb964('0x18')],function(_0x13d94d){return{'model':db[_0x13d94d[_0xb964('0x19')]],'as':_0x13d94d['as'],'attributes':_0x13d94d[_0xb964('0x17')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2b5b7d){logger[_0xb964('0xb')](_0xb964('0x14'),_0x263276);logger[_0xb964('0xe')](_0xb964('0x14'),_0x263276,JSON[_0xb964('0x1b')](_0x2b5b7d));_0x2bd9d5(_0x2b5b7d);})[_0xb964('0x13')](function(_0x4fefa9){logger[_0xb964('0x10')](_0xb964('0x14'),_0x4fefa9[_0xb964('0x12')],_0x263276);_0x57772a(_0x44d78a['error'](0x1f4,_0x4fefa9[_0xb964('0x12')]));});});};exports[_0xb964('0x1c')]=function(_0xa0df8b){var _0x2cc8b6=this;return new Promise(function(_0x4321c3,_0x36117c){return db['SalesforceAccount']['find']({'raw':_0xa0df8b[_0xb964('0x15')]?_0xa0df8b[_0xb964('0x15')][_0xb964('0x16')]===undefined?!![]:![]:!![],'where':_0xa0df8b[_0xb964('0x15')]?_0xa0df8b['options'][_0xb964('0x1d')]||null:null,'attributes':_0xa0df8b['options']?_0xa0df8b[_0xb964('0x15')][_0xb964('0x17')]||null:null,'include':_0xa0df8b['options']?_0xa0df8b['options'][_0xb964('0x18')]?_[_0xb964('0x1a')](_0xa0df8b[_0xb964('0x15')][_0xb964('0x18')],function(_0x17fb50){return{'model':db[_0x17fb50[_0xb964('0x19')]],'as':_0x17fb50['as'],'attributes':_0x17fb50['attributes'],'include':_0x17fb50['include']?_['map'](_0x17fb50[_0xb964('0x18')],function(_0x726d32){return{'model':db[_0x726d32[_0xb964('0x19')]],'as':_0x726d32['as'],'attributes':_0x726d32[_0xb964('0x17')],'include':_0x726d32[_0xb964('0x18')]?_[_0xb964('0x1a')](_0x726d32['include'],function(_0x5aef1f){return{'model':db[_0x5aef1f[_0xb964('0x19')]],'as':_0x5aef1f['as'],'attributes':_0x5aef1f[_0xb964('0x17')]};}):[]};}):[]};}):[]:[]})[_0xb964('0x1e')](function(_0x295863){logger[_0xb964('0xb')]('ShowSalesforceAccount',_0xa0df8b);logger[_0xb964('0xe')](_0xb964('0x1c'),_0xa0df8b,JSON[_0xb964('0x1b')](_0x295863));_0x4321c3(_0x295863);})[_0xb964('0x13')](function(_0x157726){logger[_0xb964('0x10')](_0xb964('0x1c'),_0x157726['message'],_0xa0df8b);_0x36117c(_0x2cc8b6[_0xb964('0x10')](0x1f4,_0x157726['message']));});});};
\ No newline at end of file
+var _0xa467=['where','attributes','limit','map','include','model','debug','ShowSalesforceAccount','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','request','then','info','request\x20sent','SalesforceAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','GetSalesforceAccount','SalesforceAccount','findAll','options','raw'];(function(_0x5235dd,_0x3f91cf){var _0x13059d=function(_0x355a98){while(--_0x355a98){_0x5235dd['push'](_0x5235dd['shift']());}};_0x13059d(++_0x3f91cf);}(_0xa467,0x143));var _0x7a46=function(_0x2e2824,_0x49905b){_0x2e2824=_0x2e2824-0x0;var _0x21549c=_0xa467[_0x2e2824];return _0x21549c;};'use strict';var _=require(_0x7a46('0x0'));var util=require(_0x7a46('0x1'));var moment=require(_0x7a46('0x2'));var BPromise=require(_0x7a46('0x3'));var rs=require(_0x7a46('0x4'));var fs=require('fs');var Redis=require(_0x7a46('0x5'));var db=require(_0x7a46('0x6'))['db'];var utils=require(_0x7a46('0x7'));var logger=require(_0x7a46('0x8'))('rpc');var config=require('../../config/environment');var jayson=require(_0x7a46('0x9'));var client=jayson[_0x7a46('0xa')][_0x7a46('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x463cdf,_0x6d8fce,_0x550c38){return new BPromise(function(_0x341d9e,_0x1f8b07){return client[_0x7a46('0xc')](_0x463cdf,_0x550c38)[_0x7a46('0xd')](function(_0x382b56){logger[_0x7a46('0xe')]('SalesforceAccount,\x20%s,\x20%s',_0x6d8fce,_0x7a46('0xf'));logger['debug'](_0x7a46('0x10'),_0x6d8fce,'request\x20sent',JSON[_0x7a46('0x11')](_0x382b56));if(_0x382b56[_0x7a46('0x12')]){if(_0x382b56[_0x7a46('0x12')][_0x7a46('0x13')]===0x1f4){logger[_0x7a46('0x12')]('SalesforceAccount,\x20%s,\x20%s',_0x6d8fce,_0x382b56[_0x7a46('0x12')][_0x7a46('0x14')]);return _0x1f8b07(_0x382b56[_0x7a46('0x12')][_0x7a46('0x14')]);}logger[_0x7a46('0x12')]('SalesforceAccount,\x20%s,\x20%s',_0x6d8fce,_0x382b56[_0x7a46('0x12')]['message']);return _0x341d9e(_0x382b56['error'][_0x7a46('0x14')]);}else{logger[_0x7a46('0xe')]('SalesforceAccount,\x20%s,\x20%s',_0x6d8fce,_0x7a46('0xf'));_0x341d9e(_0x382b56['result'][_0x7a46('0x14')]);}})[_0x7a46('0x15')](function(_0x50e40e){logger[_0x7a46('0x12')]('SalesforceAccount,\x20%s,\x20%s',_0x6d8fce,_0x50e40e);_0x1f8b07(_0x50e40e);});});}exports[_0x7a46('0x16')]=function(_0x3aa0ad){var _0x3cdc54=this;return new Promise(function(_0x279fc8,_0x5eace2){return db[_0x7a46('0x17')][_0x7a46('0x18')]({'raw':_0x3aa0ad['options']?_0x3aa0ad[_0x7a46('0x19')][_0x7a46('0x1a')]===undefined?!![]:![]:!![],'where':_0x3aa0ad['options']?_0x3aa0ad['options'][_0x7a46('0x1b')]||null:null,'attributes':_0x3aa0ad[_0x7a46('0x19')]?_0x3aa0ad[_0x7a46('0x19')][_0x7a46('0x1c')]||null:null,'limit':_0x3aa0ad['options']?_0x3aa0ad[_0x7a46('0x19')][_0x7a46('0x1d')]||null:null,'include':_0x3aa0ad['options']?_0x3aa0ad['options']['include']?_[_0x7a46('0x1e')](_0x3aa0ad[_0x7a46('0x19')]['include'],function(_0x46512d){return{'model':db[_0x46512d['model']],'as':_0x46512d['as'],'attributes':_0x46512d[_0x7a46('0x1c')],'include':_0x46512d[_0x7a46('0x1f')]?_['map'](_0x46512d[_0x7a46('0x1f')],function(_0x1222ae){return{'model':db[_0x1222ae[_0x7a46('0x20')]],'as':_0x1222ae['as'],'attributes':_0x1222ae[_0x7a46('0x1c')],'include':_0x1222ae[_0x7a46('0x1f')]?_[_0x7a46('0x1e')](_0x1222ae[_0x7a46('0x1f')],function(_0x595c66){return{'model':db[_0x595c66[_0x7a46('0x20')]],'as':_0x595c66['as'],'attributes':_0x595c66[_0x7a46('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x7a46('0xd')](function(_0xa81c32){logger[_0x7a46('0xe')](_0x7a46('0x16'),_0x3aa0ad);logger[_0x7a46('0x21')]('GetSalesforceAccount',_0x3aa0ad,JSON[_0x7a46('0x11')](_0xa81c32));_0x279fc8(_0xa81c32);})[_0x7a46('0x15')](function(_0x3b35dd){logger[_0x7a46('0x12')](_0x7a46('0x16'),_0x3b35dd['message'],_0x3aa0ad);_0x5eace2(_0x3cdc54[_0x7a46('0x12')](0x1f4,_0x3b35dd['message']));});});};exports['ShowSalesforceAccount']=function(_0x29ac6a){var _0x477aa1=this;return new Promise(function(_0x273cec,_0x3c7016){return db[_0x7a46('0x17')]['find']({'raw':_0x29ac6a['options']?_0x29ac6a[_0x7a46('0x19')][_0x7a46('0x1a')]===undefined?!![]:![]:!![],'where':_0x29ac6a[_0x7a46('0x19')]?_0x29ac6a['options'][_0x7a46('0x1b')]||null:null,'attributes':_0x29ac6a[_0x7a46('0x19')]?_0x29ac6a[_0x7a46('0x19')][_0x7a46('0x1c')]||null:null,'include':_0x29ac6a[_0x7a46('0x19')]?_0x29ac6a[_0x7a46('0x19')][_0x7a46('0x1f')]?_[_0x7a46('0x1e')](_0x29ac6a[_0x7a46('0x19')][_0x7a46('0x1f')],function(_0x10a1f4){return{'model':db[_0x10a1f4[_0x7a46('0x20')]],'as':_0x10a1f4['as'],'attributes':_0x10a1f4[_0x7a46('0x1c')],'include':_0x10a1f4[_0x7a46('0x1f')]?_[_0x7a46('0x1e')](_0x10a1f4[_0x7a46('0x1f')],function(_0x4d86f7){return{'model':db[_0x4d86f7['model']],'as':_0x4d86f7['as'],'attributes':_0x4d86f7[_0x7a46('0x1c')],'include':_0x4d86f7[_0x7a46('0x1f')]?_[_0x7a46('0x1e')](_0x4d86f7[_0x7a46('0x1f')],function(_0x4a6ffd){return{'model':db[_0x4a6ffd[_0x7a46('0x20')]],'as':_0x4a6ffd['as'],'attributes':_0x4a6ffd[_0x7a46('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x15ca0f){logger[_0x7a46('0xe')](_0x7a46('0x22'),_0x29ac6a);logger['debug']('ShowSalesforceAccount',_0x29ac6a,JSON[_0x7a46('0x11')](_0x15ca0f));_0x273cec(_0x15ca0f);})[_0x7a46('0x15')](function(_0x115cb3){logger[_0x7a46('0x12')](_0x7a46('0x22'),_0x115cb3[_0x7a46('0x14')],_0x29ac6a);_0x3c7016(_0x477aa1[_0x7a46('0x12')](0x1f4,_0x115cb3['message']));});});};
\ No newline at end of file
index 2c82fc3..588b5ac 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xadb5=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','/:id/descriptions','getDescriptions','put','update','delete','destroy','exports','util','connect-timeout','express'];(function(_0x1cb85b,_0x3d86cc){var _0x29dbf2=function(_0x1daa3a){while(--_0x1daa3a){_0x1cb85b['push'](_0x1cb85b['shift']());}};_0x29dbf2(++_0x3d86cc);}(_0xadb5,0xad));var _0x5adb=function(_0x4c9535,_0x621932){_0x4c9535=_0x4c9535-0x0;var _0x433fa1=_0xadb5[_0x4c9535];return _0x433fa1;};'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('./intSalesforceConfiguration.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('0x7')](_0x5adb('0xe'),auth[_0x5adb('0x8')](),controller['getSubjects']);router['get'](_0x5adb('0xf'),auth[_0x5adb('0x8')](),controller[_0x5adb('0x10')]);router['post']('/',auth[_0x5adb('0x8')](),controller['create']);router[_0x5adb('0x11')]('/:id',auth[_0x5adb('0x8')](),controller[_0x5adb('0x12')]);router[_0x5adb('0x13')]('/:id',auth[_0x5adb('0x8')](),controller[_0x5adb('0x14')]);module[_0x5adb('0x15')]=router;
\ No newline at end of file
+var _0x2ef3=['connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./intSalesforceConfiguration.controller','get','/:id','isAuthenticated','show','/:id/fields','getFields','/:id/subjects','/:id/descriptions','getDescriptions','put','update','exports','multer','util','path'];(function(_0x1710f2,_0x341159){var _0x355f2d=function(_0x4ab2e9){while(--_0x4ab2e9){_0x1710f2['push'](_0x1710f2['shift']());}};_0x355f2d(++_0x341159);}(_0x2ef3,0xba));var _0x32ef=function(_0x4cd027,_0x326ef5){_0x4cd027=_0x4cd027-0x0;var _0x55b2da=_0x2ef3[_0x4cd027];return _0x55b2da;};'use strict';var multer=require(_0x32ef('0x0'));var util=require(_0x32ef('0x1'));var path=require(_0x32ef('0x2'));var timeout=require(_0x32ef('0x3'));var express=require(_0x32ef('0x4'));var router=express[_0x32ef('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x32ef('0x6'));var interaction=require(_0x32ef('0x7'));var config=require('../../config/environment');var controller=require(_0x32ef('0x8'));router[_0x32ef('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0x32ef('0x9')](_0x32ef('0xa'),auth[_0x32ef('0xb')](),controller[_0x32ef('0xc')]);router[_0x32ef('0x9')](_0x32ef('0xd'),auth[_0x32ef('0xb')](),controller[_0x32ef('0xe')]);router[_0x32ef('0x9')](_0x32ef('0xf'),auth['isAuthenticated'](),controller['getSubjects']);router[_0x32ef('0x9')](_0x32ef('0x10'),auth[_0x32ef('0xb')](),controller[_0x32ef('0x11')]);router['post']('/',auth[_0x32ef('0xb')](),controller['create']);router[_0x32ef('0x12')]('/:id',auth[_0x32ef('0xb')](),controller[_0x32ef('0x13')]);router['delete']('/:id',auth[_0x32ef('0xb')](),controller['destroy']);module[_0x32ef('0x14')]=router;
\ No newline at end of file
index 9a5bef3..8da6042 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3b99=['lead','sequelize','exports','STRING','ENUM','Task','Case','contact_lead','contact','account','nothing'];(function(_0x422905,_0x3bce3a){var _0x33dc6c=function(_0x4852c9){while(--_0x4852c9){_0x422905['push'](_0x422905['shift']());}};_0x33dc6c(++_0x3bce3a);}(_0x3b99,0x161));var _0x93b9=function(_0x402988,_0x33b094){_0x402988=_0x402988-0x0;var _0x3b0272=_0x3b99[_0x402988];return _0x3b0272;};'use strict';var Sequelize=require(_0x93b9('0x0'));module[_0x93b9('0x1')]={'name':{'type':Sequelize[_0x93b9('0x2')]},'description':{'type':Sequelize[_0x93b9('0x2')]},'ticketType':{'type':Sequelize[_0x93b9('0x3')](_0x93b9('0x4'),_0x93b9('0x5')),'defaultValue':_0x93b9('0x4')},'moduleSearch':{'type':Sequelize['ENUM'](_0x93b9('0x6'),_0x93b9('0x7'),'lead','account_contact_lead',_0x93b9('0x8')),'defaultValue':_0x93b9('0x6')},'moduleCreate':{'type':Sequelize['ENUM'](_0x93b9('0x9'),_0x93b9('0x7'),_0x93b9('0xa'),_0x93b9('0x8')),'defaultValue':_0x93b9('0xa')},'leadId':{'type':Sequelize['STRING']},'additionalSearchAccount':{'type':Sequelize[_0x93b9('0x2')]},'additionalSearchContact':{'type':Sequelize['STRING']},'additionalSearchLead':{'type':Sequelize[_0x93b9('0x2')]}};
\ No newline at end of file
+var _0x224f=['lead','account_contact_lead','account','nothing','exports','STRING','ENUM','Task','Case','contact_lead','contact'];(function(_0x44ac1e,_0x2fb2be){var _0x37c9db=function(_0x43226b){while(--_0x43226b){_0x44ac1e['push'](_0x44ac1e['shift']());}};_0x37c9db(++_0x2fb2be);}(_0x224f,0x1a6));var _0xf224=function(_0x4191bc,_0x3096c5){_0x4191bc=_0x4191bc-0x0;var _0x1ffd4e=_0x224f[_0x4191bc];return _0x1ffd4e;};'use strict';var Sequelize=require('sequelize');module[_0xf224('0x0')]={'name':{'type':Sequelize[_0xf224('0x1')]},'description':{'type':Sequelize['STRING']},'ticketType':{'type':Sequelize[_0xf224('0x2')](_0xf224('0x3'),_0xf224('0x4')),'defaultValue':'Task'},'moduleSearch':{'type':Sequelize[_0xf224('0x2')](_0xf224('0x5'),_0xf224('0x6'),_0xf224('0x7'),_0xf224('0x8'),_0xf224('0x9')),'defaultValue':'contact_lead'},'moduleCreate':{'type':Sequelize[_0xf224('0x2')](_0xf224('0xa'),_0xf224('0x6'),_0xf224('0x7'),_0xf224('0x9')),'defaultValue':_0xf224('0x7')},'leadId':{'type':Sequelize[_0xf224('0x1')]},'additionalSearchAccount':{'type':Sequelize[_0xf224('0x1')]},'additionalSearchContact':{'type':Sequelize['STRING']},'additionalSearchLead':{'type':Sequelize[_0xf224('0x1')]}};
\ No newline at end of file
index d9258ee..50b3ca8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x528f=['create','body','getFields','findOne','SalesforceField','length','getSubjects','getDescriptions','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','sox','ejs','fs-extra','squel','crypto','jsforce','desk.js','papaparse','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','set','Content-Range','apply','save','update','then','destroy','stack','name','send','map','SalesforceConfiguration','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','count','includeAll','include','findAll','rows','catch','show','params','find'];(function(_0x28b3bb,_0xa77ae5){var _0x379851=function(_0x1de628){while(--_0x1de628){_0x28b3bb['push'](_0x28b3bb['shift']());}};_0x379851(++_0xa77ae5);}(_0x528f,0x140));var _0xf528=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x528f[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xf528('0x0'));var zipdir=require(_0xf528('0x1'));var jsonpatch=require(_0xf528('0x2'));var rp=require(_0xf528('0x3'));var moment=require(_0xf528('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xf528('0x5'));var util=require('util');var path=require('path');var sox=require(_0xf528('0x6'));var csv=require('to-csv');var ejs=require(_0xf528('0x7'));var fs=require('fs');var fs_extra=require(_0xf528('0x8'));var _=require('lodash');var squel=require(_0xf528('0x9'));var crypto=require(_0xf528('0xa'));var jsforce=require(_0xf528('0xb'));var deskjs=require(_0xf528('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xf528('0xd'));var Redis=require('ioredis');var authService=require(_0xf528('0xe'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xf528('0xf'));var logger=require('../../config/logger')(_0xf528('0x10'));var utils=require(_0xf528('0x11'));var config=require(_0xf528('0x12'));var licenseUtil=require(_0xf528('0x13'));var db=require(_0xf528('0x14'))['db'];function respondWithStatusCode(_0x2bc000,_0x57e721){_0x57e721=_0x57e721||0xcc;return function(_0x3ee03d){if(_0x3ee03d){return _0x2bc000[_0xf528('0x15')](_0x57e721);}return _0x2bc000[_0xf528('0x16')](_0x57e721)[_0xf528('0x17')]();};}function respondWithResult(_0x432ba2,_0x85b593){_0x85b593=_0x85b593||0xc8;return function(_0x233139){if(_0x233139){return _0x432ba2[_0xf528('0x16')](_0x85b593)[_0xf528('0x18')](_0x233139);}};}function respondWithFilteredResult(_0x155fe6,_0x490980){return function(_0x4d764a){if(_0x4d764a){var _0x1d9d2a=typeof _0x490980[_0xf528('0x19')]===_0xf528('0x1a')&&typeof _0x490980[_0xf528('0x1b')]===_0xf528('0x1a');var _0x4bae1a=_0x4d764a['count'];var _0x251fb5=_0x1d9d2a?0x0:_0x490980[_0xf528('0x19')];var _0x128be4=_0x1d9d2a?_0x4d764a['count']:_0x490980['offset']+_0x490980[_0xf528('0x1b')];var _0x5c23c8;if(_0x128be4>=_0x4bae1a){_0x128be4=_0x4bae1a;_0x5c23c8=0xc8;}else{_0x5c23c8=0xce;}_0x155fe6[_0xf528('0x16')](_0x5c23c8);return _0x155fe6[_0xf528('0x1c')](_0xf528('0x1d'),_0x251fb5+'-'+_0x128be4+'/'+_0x4bae1a)[_0xf528('0x18')](_0x4d764a);}return null;};}function patchUpdates(_0x11263d){return function(_0x3db01b){try{jsonpatch[_0xf528('0x1e')](_0x3db01b,_0x11263d,!![]);}catch(_0x35e150){return BPromise['reject'](_0x35e150);}return _0x3db01b[_0xf528('0x1f')]();};}function saveUpdates(_0x13db73,_0x2cd2d7){return function(_0x3d55cc){if(_0x3d55cc){return _0x3d55cc[_0xf528('0x20')](_0x13db73)[_0xf528('0x21')](function(_0x1293f9){return _0x1293f9;});}return null;};}function removeEntity(_0x28b80c,_0x5d7ca4){return function(_0x4b0a02){if(_0x4b0a02){return _0x4b0a02[_0xf528('0x22')]()[_0xf528('0x21')](function(){_0x28b80c[_0xf528('0x16')](0xcc)[_0xf528('0x17')]();});}};}function handleEntityNotFound(_0x3596ce,_0x4a7238){return function(_0x8c5bf1){if(!_0x8c5bf1){_0x3596ce[_0xf528('0x15')](0x194);}return _0x8c5bf1;};}function handleError(_0x5e0a44,_0x475e8e){_0x475e8e=_0x475e8e||0x1f4;return function(_0xe5d90c){logger['error'](_0xe5d90c[_0xf528('0x23')]);if(_0xe5d90c['name']){delete _0xe5d90c[_0xf528('0x24')];}_0x5e0a44[_0xf528('0x16')](_0x475e8e)[_0xf528('0x25')](_0xe5d90c);};}exports['index']=function(_0x4dd8fd,_0x9a5467){var _0x31a194={},_0x25cca4={},_0x2867fd={'count':0x0,'rows':[]};var _0xbeaa21=_[_0xf528('0x26')](db[_0xf528('0x27')][_0xf528('0x28')],function(_0x14b950){return{'name':_0x14b950[_0xf528('0x29')],'type':_0x14b950[_0xf528('0x2a')][_0xf528('0x2b')]};});_0x25cca4[_0xf528('0x2c')]=_[_0xf528('0x26')](_0xbeaa21,_0xf528('0x24'));_0x25cca4[_0xf528('0x2d')]=_[_0xf528('0x2e')](_0x4dd8fd['query']);_0x25cca4[_0xf528('0x2f')]=_[_0xf528('0x30')](_0x25cca4[_0xf528('0x2c')],_0x25cca4[_0xf528('0x2d')]);_0x31a194[_0xf528('0x31')]=_[_0xf528('0x30')](_0x25cca4['model'],qs['fields'](_0x4dd8fd[_0xf528('0x2d')][_0xf528('0x32')]));_0x31a194[_0xf528('0x31')]=_0x31a194[_0xf528('0x31')]['length']?_0x31a194[_0xf528('0x31')]:_0x25cca4[_0xf528('0x2c')];if(!_0x4dd8fd[_0xf528('0x2d')][_0xf528('0x33')](_0xf528('0x34'))){_0x31a194[_0xf528('0x1b')]=qs[_0xf528('0x1b')](_0x4dd8fd[_0xf528('0x2d')]['limit']);_0x31a194['offset']=qs[_0xf528('0x19')](_0x4dd8fd[_0xf528('0x2d')][_0xf528('0x19')]);}_0x31a194[_0xf528('0x35')]=qs[_0xf528('0x36')](_0x4dd8fd[_0xf528('0x2d')][_0xf528('0x36')]);_0x31a194[_0xf528('0x37')]=qs[_0xf528('0x2f')](_[_0xf528('0x38')](_0x4dd8fd['query'],_0x25cca4[_0xf528('0x2f')]),_0xbeaa21);if(_0x4dd8fd['query'][_0xf528('0x39')]){_0x31a194[_0xf528('0x37')]=_[_0xf528('0x3a')](_0x31a194['where'],{'$or':_[_0xf528('0x26')](_0xbeaa21,function(_0x6793e){if(_0x6793e[_0xf528('0x2a')]!==_0xf528('0x3b')){var _0x4e3ec4={};_0x4e3ec4[_0x6793e[_0xf528('0x24')]]={'$like':'%'+_0x4dd8fd['query'][_0xf528('0x39')]+'%'};return _0x4e3ec4;}})});}_0x31a194=_[_0xf528('0x3a')]({},_0x31a194,_0x4dd8fd[_0xf528('0x3c')]);var _0x14d76e={'where':_0x31a194['where']};return db[_0xf528('0x27')][_0xf528('0x3d')](_0x14d76e)[_0xf528('0x21')](function(_0x4bd6c8){_0x2867fd[_0xf528('0x3d')]=_0x4bd6c8;if(_0x4dd8fd['query'][_0xf528('0x3e')]){_0x31a194[_0xf528('0x3f')]=[{'all':!![]}];}return db[_0xf528('0x27')][_0xf528('0x40')](_0x31a194);})['then'](function(_0x304e74){_0x2867fd[_0xf528('0x41')]=_0x304e74;return _0x2867fd;})['then'](respondWithFilteredResult(_0x9a5467,_0x31a194))[_0xf528('0x42')](handleError(_0x9a5467,null));};exports[_0xf528('0x43')]=function(_0x5aae17,_0x1810b3){var _0x17f04b={'raw':![],'where':{'id':_0x5aae17[_0xf528('0x44')]['id']}},_0x4d2626={};_0x4d2626[_0xf528('0x2c')]=_['keys'](db['SalesforceConfiguration'][_0xf528('0x28')]);_0x4d2626[_0xf528('0x2d')]=_[_0xf528('0x2e')](_0x5aae17[_0xf528('0x2d')]);_0x4d2626[_0xf528('0x2f')]=_[_0xf528('0x30')](_0x4d2626['model'],_0x4d2626[_0xf528('0x2d')]);_0x17f04b[_0xf528('0x31')]=_['intersection'](_0x4d2626[_0xf528('0x2c')],qs[_0xf528('0x32')](_0x5aae17[_0xf528('0x2d')]['fields']));_0x17f04b['attributes']=_0x17f04b[_0xf528('0x31')]['length']?_0x17f04b[_0xf528('0x31')]:_0x4d2626[_0xf528('0x2c')];if(_0x5aae17['query'][_0xf528('0x3e')]){_0x17f04b[_0xf528('0x3f')]=[{'all':!![]}];}_0x17f04b=_[_0xf528('0x3a')]({},_0x17f04b,_0x5aae17[_0xf528('0x3c')]);return db[_0xf528('0x27')][_0xf528('0x45')](_0x17f04b)[_0xf528('0x21')](handleEntityNotFound(_0x1810b3,null))['then'](respondWithResult(_0x1810b3,null))[_0xf528('0x42')](handleError(_0x1810b3,null));};exports[_0xf528('0x46')]=function(_0x97cc3e,_0xc82ffe){return db[_0xf528('0x27')][_0xf528('0x46')](_0x97cc3e[_0xf528('0x47')],{})['then'](respondWithResult(_0xc82ffe,0xc9))['catch'](handleError(_0xc82ffe,null));};exports[_0xf528('0x20')]=function(_0xb90ef0,_0x4d08ab){if(_0xb90ef0[_0xf528('0x47')]['id']){delete _0xb90ef0[_0xf528('0x47')]['id'];}return db[_0xf528('0x27')][_0xf528('0x45')]({'where':{'id':_0xb90ef0[_0xf528('0x44')]['id']}})[_0xf528('0x21')](handleEntityNotFound(_0x4d08ab,null))[_0xf528('0x21')](saveUpdates(_0xb90ef0[_0xf528('0x47')],null))[_0xf528('0x21')](respondWithResult(_0x4d08ab,null))[_0xf528('0x42')](handleError(_0x4d08ab,null));};exports[_0xf528('0x22')]=function(_0x44af24,_0xb754cd){return db[_0xf528('0x27')][_0xf528('0x45')]({'where':{'id':_0x44af24['params']['id']}})[_0xf528('0x21')](handleEntityNotFound(_0xb754cd,null))[_0xf528('0x21')](removeEntity(_0xb754cd,null))[_0xf528('0x42')](handleError(_0xb754cd,null));};exports[_0xf528('0x48')]=function(_0x2002ed,_0x900f8d,_0x5062cb){var _0x10eb6c={};var _0x2d316a={};var _0x2413f2;var _0x30bda2;return db['SalesforceConfiguration'][_0xf528('0x49')]({'where':{'id':_0x2002ed[_0xf528('0x44')]['id']}})[_0xf528('0x21')](handleEntityNotFound(_0x900f8d,null))[_0xf528('0x21')](function(_0x27155d){if(_0x27155d){_0x2413f2=_0x27155d;_0x2d316a['model']=_['keys'](db[_0xf528('0x4a')][_0xf528('0x28')]);_0x2d316a[_0xf528('0x2d')]=_[_0xf528('0x2e')](_0x2002ed[_0xf528('0x2d')]);_0x2d316a[_0xf528('0x2f')]=_[_0xf528('0x30')](_0x2d316a[_0xf528('0x2c')],_0x2d316a['query']);_0x10eb6c[_0xf528('0x31')]=_[_0xf528('0x30')](_0x2d316a[_0xf528('0x2c')],qs['fields'](_0x2002ed[_0xf528('0x2d')][_0xf528('0x32')]));_0x10eb6c[_0xf528('0x31')]=_0x10eb6c[_0xf528('0x31')][_0xf528('0x4b')]?_0x10eb6c[_0xf528('0x31')]:_0x2d316a['model'];_0x10eb6c[_0xf528('0x35')]=qs[_0xf528('0x36')](_0x2002ed['query'][_0xf528('0x36')]);_0x10eb6c[_0xf528('0x37')]=qs[_0xf528('0x2f')](_['pick'](_0x2002ed[_0xf528('0x2d')],_0x2d316a['filters']));if(_0x2002ed[_0xf528('0x2d')][_0xf528('0x39')]){_0x10eb6c[_0xf528('0x37')]=_[_0xf528('0x3a')](_0x10eb6c[_0xf528('0x37')],{'$or':_[_0xf528('0x26')](_0x10eb6c['attributes'],function(_0xfd78ce){var _0x4153b4={};_0x4153b4[_0xfd78ce]={'$like':'%'+_0x2002ed[_0xf528('0x2d')]['filter']+'%'};return _0x4153b4;})});}_0x10eb6c=_[_0xf528('0x3a')]({},_0x10eb6c,_0x2002ed[_0xf528('0x3c')]);return _0x2413f2[_0xf528('0x48')](_0x10eb6c);}})[_0xf528('0x21')](function(_0x1fbed8){if(_0x1fbed8){_0x30bda2=_0x1fbed8['length'];if(!_0x2002ed[_0xf528('0x2d')][_0xf528('0x33')](_0xf528('0x34'))){_0x10eb6c[_0xf528('0x1b')]=qs[_0xf528('0x1b')](_0x2002ed['query'][_0xf528('0x1b')]);_0x10eb6c['offset']=qs[_0xf528('0x19')](_0x2002ed[_0xf528('0x2d')][_0xf528('0x19')]);}return _0x2413f2[_0xf528('0x48')](_0x10eb6c);}})[_0xf528('0x21')](function(_0x1b18c2){if(_0x1b18c2){return _0x1b18c2?{'count':_0x30bda2,'rows':_0x1b18c2}:null;}})[_0xf528('0x21')](respondWithResult(_0x900f8d,null))['catch'](handleError(_0x900f8d,null));};exports['getSubjects']=function(_0x348f61,_0x1ee478,_0x55bbf4){var _0x4ab2ac={};var _0x5fb9ec={};var _0x4f1667;var _0x4fae01;return db[_0xf528('0x27')]['findOne']({'where':{'id':_0x348f61[_0xf528('0x44')]['id']}})[_0xf528('0x21')](handleEntityNotFound(_0x1ee478,null))[_0xf528('0x21')](function(_0x4ffc82){if(_0x4ffc82){_0x4f1667=_0x4ffc82;_0x5fb9ec['model']=_[_0xf528('0x2e')](db[_0xf528('0x4a')][_0xf528('0x28')]);_0x5fb9ec['query']=_[_0xf528('0x2e')](_0x348f61['query']);_0x5fb9ec[_0xf528('0x2f')]=_[_0xf528('0x30')](_0x5fb9ec[_0xf528('0x2c')],_0x5fb9ec[_0xf528('0x2d')]);_0x4ab2ac[_0xf528('0x31')]=_[_0xf528('0x30')](_0x5fb9ec['model'],qs['fields'](_0x348f61[_0xf528('0x2d')][_0xf528('0x32')]));_0x4ab2ac[_0xf528('0x31')]=_0x4ab2ac['attributes'][_0xf528('0x4b')]?_0x4ab2ac['attributes']:_0x5fb9ec['model'];_0x4ab2ac[_0xf528('0x35')]=qs[_0xf528('0x36')](_0x348f61['query'][_0xf528('0x36')]);_0x4ab2ac[_0xf528('0x37')]=qs[_0xf528('0x2f')](_['pick'](_0x348f61['query'],_0x5fb9ec[_0xf528('0x2f')]));if(_0x348f61[_0xf528('0x2d')]['filter']){_0x4ab2ac[_0xf528('0x37')]=_[_0xf528('0x3a')](_0x4ab2ac[_0xf528('0x37')],{'$or':_[_0xf528('0x26')](_0x4ab2ac['attributes'],function(_0x5adfe6){var _0x359cb0={};_0x359cb0[_0x5adfe6]={'$like':'%'+_0x348f61[_0xf528('0x2d')]['filter']+'%'};return _0x359cb0;})});}_0x4ab2ac=_[_0xf528('0x3a')]({},_0x4ab2ac,_0x348f61[_0xf528('0x3c')]);return _0x4f1667[_0xf528('0x4c')](_0x4ab2ac);}})['then'](function(_0x15ec70){if(_0x15ec70){_0x4fae01=_0x15ec70[_0xf528('0x4b')];if(!_0x348f61[_0xf528('0x2d')]['hasOwnProperty'](_0xf528('0x34'))){_0x4ab2ac['limit']=qs[_0xf528('0x1b')](_0x348f61[_0xf528('0x2d')][_0xf528('0x1b')]);_0x4ab2ac[_0xf528('0x19')]=qs['offset'](_0x348f61[_0xf528('0x2d')][_0xf528('0x19')]);}return _0x4f1667[_0xf528('0x4c')](_0x4ab2ac);}})['then'](function(_0x4dc33c){if(_0x4dc33c){return _0x4dc33c?{'count':_0x4fae01,'rows':_0x4dc33c}:null;}})[_0xf528('0x21')](respondWithResult(_0x1ee478,null))[_0xf528('0x42')](handleError(_0x1ee478,null));};exports['getDescriptions']=function(_0xa5a873,_0x1ca4b5,_0x2b7030){var _0x398aaa={};var _0x3ab4c4={};var _0x58c56d;var _0x23f11a;return db[_0xf528('0x27')][_0xf528('0x49')]({'where':{'id':_0xa5a873[_0xf528('0x44')]['id']}})[_0xf528('0x21')](handleEntityNotFound(_0x1ca4b5,null))[_0xf528('0x21')](function(_0x2a84cc){if(_0x2a84cc){_0x58c56d=_0x2a84cc;_0x3ab4c4[_0xf528('0x2c')]=_[_0xf528('0x2e')](db[_0xf528('0x4a')][_0xf528('0x28')]);_0x3ab4c4[_0xf528('0x2d')]=_[_0xf528('0x2e')](_0xa5a873[_0xf528('0x2d')]);_0x3ab4c4[_0xf528('0x2f')]=_['intersection'](_0x3ab4c4[_0xf528('0x2c')],_0x3ab4c4['query']);_0x398aaa[_0xf528('0x31')]=_[_0xf528('0x30')](_0x3ab4c4[_0xf528('0x2c')],qs[_0xf528('0x32')](_0xa5a873[_0xf528('0x2d')][_0xf528('0x32')]));_0x398aaa[_0xf528('0x31')]=_0x398aaa[_0xf528('0x31')]['length']?_0x398aaa[_0xf528('0x31')]:_0x3ab4c4['model'];_0x398aaa[_0xf528('0x35')]=qs[_0xf528('0x36')](_0xa5a873[_0xf528('0x2d')][_0xf528('0x36')]);_0x398aaa[_0xf528('0x37')]=qs[_0xf528('0x2f')](_[_0xf528('0x38')](_0xa5a873[_0xf528('0x2d')],_0x3ab4c4[_0xf528('0x2f')]));if(_0xa5a873['query'][_0xf528('0x39')]){_0x398aaa['where']=_[_0xf528('0x3a')](_0x398aaa[_0xf528('0x37')],{'$or':_['map'](_0x398aaa[_0xf528('0x31')],function(_0x18dfbc){var _0x5edc42={};_0x5edc42[_0x18dfbc]={'$like':'%'+_0xa5a873[_0xf528('0x2d')][_0xf528('0x39')]+'%'};return _0x5edc42;})});}_0x398aaa=_[_0xf528('0x3a')]({},_0x398aaa,_0xa5a873[_0xf528('0x3c')]);return _0x58c56d[_0xf528('0x4d')](_0x398aaa);}})[_0xf528('0x21')](function(_0x4dbc1d){if(_0x4dbc1d){_0x23f11a=_0x4dbc1d[_0xf528('0x4b')];if(!_0xa5a873[_0xf528('0x2d')]['hasOwnProperty'](_0xf528('0x34'))){_0x398aaa[_0xf528('0x1b')]=qs[_0xf528('0x1b')](_0xa5a873[_0xf528('0x2d')][_0xf528('0x1b')]);_0x398aaa[_0xf528('0x19')]=qs[_0xf528('0x19')](_0xa5a873[_0xf528('0x2d')][_0xf528('0x19')]);}return _0x58c56d[_0xf528('0x4d')](_0x398aaa);}})['then'](function(_0x1a5755){if(_0x1a5755){return _0x1a5755?{'count':_0x23f11a,'rows':_0x1a5755}:null;}})[_0xf528('0x21')](respondWithResult(_0x1ca4b5,null))[_0xf528('0x42')](handleError(_0x1ca4b5,null));};
\ No newline at end of file
+var _0x41f2=['fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','map','options','include','findAll','show','length','includeAll','find','create','body','catch','destroy','params','getFields','findOne','SalesforceField','getSubjects','getDescriptions','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','util','path','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','undefined','limit','offset','count','Content-Range','apply','reject','save','update','then','end','error','stack','name','SalesforceConfiguration','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes'];(function(_0x38ec31,_0x5a9ead){var _0x274821=function(_0x5a0fe5){while(--_0x5a0fe5){_0x38ec31['push'](_0x38ec31['shift']());}};_0x274821(++_0x5a9ead);}(_0x41f2,0x14f));var _0x241f=function(_0x4c7e4,_0x30ab4d){_0x4c7e4=_0x4c7e4-0x0;var _0xd8677=_0x41f2[_0x4c7e4];return _0xd8677;};'use strict';var emlformat=require(_0x241f('0x0'));var rimraf=require(_0x241f('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x241f('0x2'));var rp=require(_0x241f('0x3'));var moment=require(_0x241f('0x4'));var BPromise=require(_0x241f('0x5'));var Mustache=require('mustache');var util=require(_0x241f('0x6'));var path=require(_0x241f('0x7'));var sox=require('sox');var csv=require(_0x241f('0x8'));var ejs=require(_0x241f('0x9'));var fs=require('fs');var fs_extra=require(_0x241f('0xa'));var _=require(_0x241f('0xb'));var squel=require(_0x241f('0xc'));var crypto=require('crypto');var jsforce=require(_0x241f('0xd'));var deskjs=require(_0x241f('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x241f('0xf'));var authService=require('../../components/auth/service');var qs=require(_0x241f('0x10'));var as=require(_0x241f('0x11'));var hardwareService=require(_0x241f('0x12'));var logger=require('../../config/logger')(_0x241f('0x13'));var utils=require('../../config/utils');var config=require(_0x241f('0x14'));var licenseUtil=require(_0x241f('0x15'));var db=require(_0x241f('0x16'))['db'];function respondWithStatusCode(_0x5df4ed,_0x35429f){_0x35429f=_0x35429f||0xcc;return function(_0x3c3302){if(_0x3c3302){return _0x5df4ed[_0x241f('0x17')](_0x35429f);}return _0x5df4ed[_0x241f('0x18')](_0x35429f)['end']();};}function respondWithResult(_0x144877,_0x4e8be7){_0x4e8be7=_0x4e8be7||0xc8;return function(_0x313e95){if(_0x313e95){return _0x144877[_0x241f('0x18')](_0x4e8be7)['json'](_0x313e95);}};}function respondWithFilteredResult(_0x471165,_0x34ee2a){return function(_0x432fc2){if(_0x432fc2){var _0x436856=typeof _0x34ee2a['offset']===_0x241f('0x19')&&typeof _0x34ee2a[_0x241f('0x1a')]==='undefined';var _0x24f4b0=_0x432fc2['count'];var _0x32f7b9=_0x436856?0x0:_0x34ee2a[_0x241f('0x1b')];var _0x55e0d0=_0x436856?_0x432fc2[_0x241f('0x1c')]:_0x34ee2a[_0x241f('0x1b')]+_0x34ee2a['limit'];var _0x4e2d93;if(_0x55e0d0>=_0x24f4b0){_0x55e0d0=_0x24f4b0;_0x4e2d93=0xc8;}else{_0x4e2d93=0xce;}_0x471165[_0x241f('0x18')](_0x4e2d93);return _0x471165['set'](_0x241f('0x1d'),_0x32f7b9+'-'+_0x55e0d0+'/'+_0x24f4b0)['json'](_0x432fc2);}return null;};}function patchUpdates(_0x5eaab7){return function(_0x499440){try{jsonpatch[_0x241f('0x1e')](_0x499440,_0x5eaab7,!![]);}catch(_0x5cfd64){return BPromise[_0x241f('0x1f')](_0x5cfd64);}return _0x499440[_0x241f('0x20')]();};}function saveUpdates(_0x34a174,_0x43b477){return function(_0x3d5eaa){if(_0x3d5eaa){return _0x3d5eaa[_0x241f('0x21')](_0x34a174)[_0x241f('0x22')](function(_0x5d8446){return _0x5d8446;});}return null;};}function removeEntity(_0x404ca9,_0x1b7a9c){return function(_0x2c1c84){if(_0x2c1c84){return _0x2c1c84['destroy']()[_0x241f('0x22')](function(){_0x404ca9[_0x241f('0x18')](0xcc)[_0x241f('0x23')]();});}};}function handleEntityNotFound(_0x563513,_0x1210bb){return function(_0x2d17d0){if(!_0x2d17d0){_0x563513['sendStatus'](0x194);}return _0x2d17d0;};}function handleError(_0x30debf,_0x5a6b13){_0x5a6b13=_0x5a6b13||0x1f4;return function(_0x2113c2){logger[_0x241f('0x24')](_0x2113c2[_0x241f('0x25')]);if(_0x2113c2[_0x241f('0x26')]){delete _0x2113c2[_0x241f('0x26')];}_0x30debf[_0x241f('0x18')](_0x5a6b13)['send'](_0x2113c2);};}exports['index']=function(_0x5700e1,_0x5ce5b2){var _0x3ba48d={},_0x52c85b={},_0x5d3f2f={'count':0x0,'rows':[]};var _0x124ae2=_['map'](db[_0x241f('0x27')][_0x241f('0x28')],function(_0x4488e0){return{'name':_0x4488e0[_0x241f('0x29')],'type':_0x4488e0[_0x241f('0x2a')][_0x241f('0x2b')]};});_0x52c85b[_0x241f('0x2c')]=_['map'](_0x124ae2,_0x241f('0x26'));_0x52c85b[_0x241f('0x2d')]=_[_0x241f('0x2e')](_0x5700e1[_0x241f('0x2d')]);_0x52c85b[_0x241f('0x2f')]=_[_0x241f('0x30')](_0x52c85b['model'],_0x52c85b[_0x241f('0x2d')]);_0x3ba48d[_0x241f('0x31')]=_[_0x241f('0x30')](_0x52c85b[_0x241f('0x2c')],qs[_0x241f('0x32')](_0x5700e1[_0x241f('0x2d')]['fields']));_0x3ba48d['attributes']=_0x3ba48d['attributes']['length']?_0x3ba48d[_0x241f('0x31')]:_0x52c85b[_0x241f('0x2c')];if(!_0x5700e1[_0x241f('0x2d')][_0x241f('0x33')](_0x241f('0x34'))){_0x3ba48d[_0x241f('0x1a')]=qs[_0x241f('0x1a')](_0x5700e1[_0x241f('0x2d')][_0x241f('0x1a')]);_0x3ba48d[_0x241f('0x1b')]=qs['offset'](_0x5700e1[_0x241f('0x2d')][_0x241f('0x1b')]);}_0x3ba48d[_0x241f('0x35')]=qs[_0x241f('0x36')](_0x5700e1[_0x241f('0x2d')][_0x241f('0x36')]);_0x3ba48d[_0x241f('0x37')]=qs[_0x241f('0x2f')](_[_0x241f('0x38')](_0x5700e1[_0x241f('0x2d')],_0x52c85b[_0x241f('0x2f')]),_0x124ae2);if(_0x5700e1[_0x241f('0x2d')][_0x241f('0x39')]){_0x3ba48d[_0x241f('0x37')]=_[_0x241f('0x3a')](_0x3ba48d['where'],{'$or':_[_0x241f('0x3b')](_0x124ae2,function(_0x355041){if(_0x355041['type']!=='VIRTUAL'){var _0x165820={};_0x165820[_0x355041[_0x241f('0x26')]]={'$like':'%'+_0x5700e1[_0x241f('0x2d')][_0x241f('0x39')]+'%'};return _0x165820;}})});}_0x3ba48d=_[_0x241f('0x3a')]({},_0x3ba48d,_0x5700e1[_0x241f('0x3c')]);var _0x574d70={'where':_0x3ba48d[_0x241f('0x37')]};return db['SalesforceConfiguration'][_0x241f('0x1c')](_0x574d70)[_0x241f('0x22')](function(_0x14a5f9){_0x5d3f2f[_0x241f('0x1c')]=_0x14a5f9;if(_0x5700e1[_0x241f('0x2d')]['includeAll']){_0x3ba48d[_0x241f('0x3d')]=[{'all':!![]}];}return db[_0x241f('0x27')][_0x241f('0x3e')](_0x3ba48d);})[_0x241f('0x22')](function(_0x50e6be){_0x5d3f2f['rows']=_0x50e6be;return _0x5d3f2f;})['then'](respondWithFilteredResult(_0x5ce5b2,_0x3ba48d))['catch'](handleError(_0x5ce5b2,null));};exports[_0x241f('0x3f')]=function(_0x2cf899,_0x227490){var _0x5c5d56={'raw':![],'where':{'id':_0x2cf899['params']['id']}},_0x433662={};_0x433662[_0x241f('0x2c')]=_[_0x241f('0x2e')](db['SalesforceConfiguration'][_0x241f('0x28')]);_0x433662[_0x241f('0x2d')]=_[_0x241f('0x2e')](_0x2cf899[_0x241f('0x2d')]);_0x433662[_0x241f('0x2f')]=_[_0x241f('0x30')](_0x433662[_0x241f('0x2c')],_0x433662[_0x241f('0x2d')]);_0x5c5d56[_0x241f('0x31')]=_[_0x241f('0x30')](_0x433662[_0x241f('0x2c')],qs[_0x241f('0x32')](_0x2cf899[_0x241f('0x2d')][_0x241f('0x32')]));_0x5c5d56['attributes']=_0x5c5d56[_0x241f('0x31')][_0x241f('0x40')]?_0x5c5d56[_0x241f('0x31')]:_0x433662['model'];if(_0x2cf899['query'][_0x241f('0x41')]){_0x5c5d56['include']=[{'all':!![]}];}_0x5c5d56=_[_0x241f('0x3a')]({},_0x5c5d56,_0x2cf899[_0x241f('0x3c')]);return db['SalesforceConfiguration'][_0x241f('0x42')](_0x5c5d56)[_0x241f('0x22')](handleEntityNotFound(_0x227490,null))['then'](respondWithResult(_0x227490,null))['catch'](handleError(_0x227490,null));};exports['create']=function(_0x2c5004,_0x40510d){return db[_0x241f('0x27')][_0x241f('0x43')](_0x2c5004[_0x241f('0x44')],{})[_0x241f('0x22')](respondWithResult(_0x40510d,0xc9))[_0x241f('0x45')](handleError(_0x40510d,null));};exports['update']=function(_0x4108b7,_0xe3fc9a){if(_0x4108b7[_0x241f('0x44')]['id']){delete _0x4108b7['body']['id'];}return db[_0x241f('0x27')][_0x241f('0x42')]({'where':{'id':_0x4108b7['params']['id']}})[_0x241f('0x22')](handleEntityNotFound(_0xe3fc9a,null))[_0x241f('0x22')](saveUpdates(_0x4108b7['body'],null))[_0x241f('0x22')](respondWithResult(_0xe3fc9a,null))[_0x241f('0x45')](handleError(_0xe3fc9a,null));};exports[_0x241f('0x46')]=function(_0xda0ba5,_0x2811a9){return db[_0x241f('0x27')][_0x241f('0x42')]({'where':{'id':_0xda0ba5[_0x241f('0x47')]['id']}})['then'](handleEntityNotFound(_0x2811a9,null))[_0x241f('0x22')](removeEntity(_0x2811a9,null))['catch'](handleError(_0x2811a9,null));};exports[_0x241f('0x48')]=function(_0x396770,_0x11aff8,_0x51cd89){var _0x5b0859={};var _0x4a6ea2={};var _0x489398;var _0x560187;return db['SalesforceConfiguration'][_0x241f('0x49')]({'where':{'id':_0x396770['params']['id']}})[_0x241f('0x22')](handleEntityNotFound(_0x11aff8,null))[_0x241f('0x22')](function(_0x5dc208){if(_0x5dc208){_0x489398=_0x5dc208;_0x4a6ea2[_0x241f('0x2c')]=_[_0x241f('0x2e')](db[_0x241f('0x4a')][_0x241f('0x28')]);_0x4a6ea2[_0x241f('0x2d')]=_[_0x241f('0x2e')](_0x396770[_0x241f('0x2d')]);_0x4a6ea2['filters']=_[_0x241f('0x30')](_0x4a6ea2[_0x241f('0x2c')],_0x4a6ea2[_0x241f('0x2d')]);_0x5b0859['attributes']=_['intersection'](_0x4a6ea2[_0x241f('0x2c')],qs[_0x241f('0x32')](_0x396770[_0x241f('0x2d')][_0x241f('0x32')]));_0x5b0859[_0x241f('0x31')]=_0x5b0859[_0x241f('0x31')][_0x241f('0x40')]?_0x5b0859[_0x241f('0x31')]:_0x4a6ea2[_0x241f('0x2c')];_0x5b0859[_0x241f('0x35')]=qs[_0x241f('0x36')](_0x396770[_0x241f('0x2d')][_0x241f('0x36')]);_0x5b0859[_0x241f('0x37')]=qs[_0x241f('0x2f')](_['pick'](_0x396770[_0x241f('0x2d')],_0x4a6ea2[_0x241f('0x2f')]));if(_0x396770[_0x241f('0x2d')][_0x241f('0x39')]){_0x5b0859[_0x241f('0x37')]=_[_0x241f('0x3a')](_0x5b0859['where'],{'$or':_[_0x241f('0x3b')](_0x5b0859[_0x241f('0x31')],function(_0x4df1a5){var _0x21f4c9={};_0x21f4c9[_0x4df1a5]={'$like':'%'+_0x396770['query'][_0x241f('0x39')]+'%'};return _0x21f4c9;})});}_0x5b0859=_[_0x241f('0x3a')]({},_0x5b0859,_0x396770['options']);return _0x489398[_0x241f('0x48')](_0x5b0859);}})[_0x241f('0x22')](function(_0x55ae4c){if(_0x55ae4c){_0x560187=_0x55ae4c[_0x241f('0x40')];if(!_0x396770[_0x241f('0x2d')][_0x241f('0x33')](_0x241f('0x34'))){_0x5b0859[_0x241f('0x1a')]=qs['limit'](_0x396770[_0x241f('0x2d')][_0x241f('0x1a')]);_0x5b0859[_0x241f('0x1b')]=qs[_0x241f('0x1b')](_0x396770[_0x241f('0x2d')][_0x241f('0x1b')]);}return _0x489398[_0x241f('0x48')](_0x5b0859);}})[_0x241f('0x22')](function(_0x410428){if(_0x410428){return _0x410428?{'count':_0x560187,'rows':_0x410428}:null;}})['then'](respondWithResult(_0x11aff8,null))[_0x241f('0x45')](handleError(_0x11aff8,null));};exports['getSubjects']=function(_0x418ecf,_0x5a52c5,_0x2c4947){var _0x56457d={};var _0x1704fc={};var _0x1187f8;var _0x11cd33;return db[_0x241f('0x27')][_0x241f('0x49')]({'where':{'id':_0x418ecf[_0x241f('0x47')]['id']}})[_0x241f('0x22')](handleEntityNotFound(_0x5a52c5,null))[_0x241f('0x22')](function(_0x382e8d){if(_0x382e8d){_0x1187f8=_0x382e8d;_0x1704fc[_0x241f('0x2c')]=_[_0x241f('0x2e')](db[_0x241f('0x4a')][_0x241f('0x28')]);_0x1704fc['query']=_[_0x241f('0x2e')](_0x418ecf[_0x241f('0x2d')]);_0x1704fc[_0x241f('0x2f')]=_['intersection'](_0x1704fc['model'],_0x1704fc[_0x241f('0x2d')]);_0x56457d[_0x241f('0x31')]=_['intersection'](_0x1704fc[_0x241f('0x2c')],qs[_0x241f('0x32')](_0x418ecf['query'][_0x241f('0x32')]));_0x56457d['attributes']=_0x56457d['attributes'][_0x241f('0x40')]?_0x56457d['attributes']:_0x1704fc['model'];_0x56457d[_0x241f('0x35')]=qs[_0x241f('0x36')](_0x418ecf[_0x241f('0x2d')]['sort']);_0x56457d[_0x241f('0x37')]=qs['filters'](_[_0x241f('0x38')](_0x418ecf['query'],_0x1704fc[_0x241f('0x2f')]));if(_0x418ecf['query'][_0x241f('0x39')]){_0x56457d[_0x241f('0x37')]=_[_0x241f('0x3a')](_0x56457d[_0x241f('0x37')],{'$or':_[_0x241f('0x3b')](_0x56457d[_0x241f('0x31')],function(_0x11d2cc){var _0x507258={};_0x507258[_0x11d2cc]={'$like':'%'+_0x418ecf[_0x241f('0x2d')][_0x241f('0x39')]+'%'};return _0x507258;})});}_0x56457d=_[_0x241f('0x3a')]({},_0x56457d,_0x418ecf[_0x241f('0x3c')]);return _0x1187f8[_0x241f('0x4b')](_0x56457d);}})[_0x241f('0x22')](function(_0xffb72f){if(_0xffb72f){_0x11cd33=_0xffb72f[_0x241f('0x40')];if(!_0x418ecf[_0x241f('0x2d')][_0x241f('0x33')]('nolimit')){_0x56457d[_0x241f('0x1a')]=qs[_0x241f('0x1a')](_0x418ecf[_0x241f('0x2d')][_0x241f('0x1a')]);_0x56457d['offset']=qs[_0x241f('0x1b')](_0x418ecf[_0x241f('0x2d')][_0x241f('0x1b')]);}return _0x1187f8['getSubjects'](_0x56457d);}})[_0x241f('0x22')](function(_0x237356){if(_0x237356){return _0x237356?{'count':_0x11cd33,'rows':_0x237356}:null;}})['then'](respondWithResult(_0x5a52c5,null))[_0x241f('0x45')](handleError(_0x5a52c5,null));};exports[_0x241f('0x4c')]=function(_0x51adfd,_0x3fbedc,_0x4d9124){var _0x5be3bf={};var _0xb9e569={};var _0x53da21;var _0x1f1364;return db[_0x241f('0x27')]['findOne']({'where':{'id':_0x51adfd['params']['id']}})[_0x241f('0x22')](handleEntityNotFound(_0x3fbedc,null))['then'](function(_0x5acac1){if(_0x5acac1){_0x53da21=_0x5acac1;_0xb9e569[_0x241f('0x2c')]=_[_0x241f('0x2e')](db[_0x241f('0x4a')]['rawAttributes']);_0xb9e569[_0x241f('0x2d')]=_['keys'](_0x51adfd[_0x241f('0x2d')]);_0xb9e569[_0x241f('0x2f')]=_[_0x241f('0x30')](_0xb9e569[_0x241f('0x2c')],_0xb9e569[_0x241f('0x2d')]);_0x5be3bf[_0x241f('0x31')]=_['intersection'](_0xb9e569[_0x241f('0x2c')],qs[_0x241f('0x32')](_0x51adfd[_0x241f('0x2d')][_0x241f('0x32')]));_0x5be3bf['attributes']=_0x5be3bf[_0x241f('0x31')]['length']?_0x5be3bf['attributes']:_0xb9e569[_0x241f('0x2c')];_0x5be3bf[_0x241f('0x35')]=qs[_0x241f('0x36')](_0x51adfd[_0x241f('0x2d')][_0x241f('0x36')]);_0x5be3bf[_0x241f('0x37')]=qs[_0x241f('0x2f')](_[_0x241f('0x38')](_0x51adfd[_0x241f('0x2d')],_0xb9e569[_0x241f('0x2f')]));if(_0x51adfd[_0x241f('0x2d')]['filter']){_0x5be3bf['where']=_[_0x241f('0x3a')](_0x5be3bf[_0x241f('0x37')],{'$or':_['map'](_0x5be3bf[_0x241f('0x31')],function(_0x59dc0d){var _0x7101f7={};_0x7101f7[_0x59dc0d]={'$like':'%'+_0x51adfd[_0x241f('0x2d')][_0x241f('0x39')]+'%'};return _0x7101f7;})});}_0x5be3bf=_[_0x241f('0x3a')]({},_0x5be3bf,_0x51adfd[_0x241f('0x3c')]);return _0x53da21[_0x241f('0x4c')](_0x5be3bf);}})[_0x241f('0x22')](function(_0x405520){if(_0x405520){_0x1f1364=_0x405520[_0x241f('0x40')];if(!_0x51adfd[_0x241f('0x2d')][_0x241f('0x33')](_0x241f('0x34'))){_0x5be3bf[_0x241f('0x1a')]=qs[_0x241f('0x1a')](_0x51adfd[_0x241f('0x2d')]['limit']);_0x5be3bf[_0x241f('0x1b')]=qs[_0x241f('0x1b')](_0x51adfd[_0x241f('0x2d')][_0x241f('0x1b')]);}return _0x53da21[_0x241f('0x4c')](_0x5be3bf);}})[_0x241f('0x22')](function(_0x1f34ba){if(_0x1f34ba){return _0x1f34ba?{'count':_0x1f1364,'rows':_0x1f34ba}:null;}})[_0x241f('0x22')](respondWithResult(_0x3fbedc,null))[_0x241f('0x45')](handleError(_0x3fbedc,null));};
\ No newline at end of file
index 690efe1..d8d288e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x82e5=['../../config/environment','./intSalesforceConfiguration.attributes','exports','SalesforceConfiguration','int_salesforce_configurations','../../config/logger','api','moment','request-promise','path'];(function(_0x2eaabe,_0x42785c){var _0x6f3d05=function(_0x3347af){while(--_0x3347af){_0x2eaabe['push'](_0x2eaabe['shift']());}};_0x6f3d05(++_0x42785c);}(_0x82e5,0x109));var _0x582e=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0x82e5[_0x397e5f];return _0x5302b8;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x582e('0x0'))(_0x582e('0x1'));var moment=require(_0x582e('0x2'));var BPromise=require('bluebird');var rp=require(_0x582e('0x3'));var fs=require('fs');var path=require(_0x582e('0x4'));var rimraf=require('rimraf');var config=require(_0x582e('0x5'));var attributes=require(_0x582e('0x6'));module[_0x582e('0x7')]=function(_0x3d8955,_0xf6925c){return _0x3d8955['define'](_0x582e('0x8'),attributes,{'tableName':_0x582e('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x992a=['../../config/environment','SalesforceConfiguration','int_salesforce_configurations','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0x992a,0xd4));var _0xa992=function(_0xd9f102,_0x5a0d28){_0xd9f102=_0xd9f102-0x0;var _0x2652e4=_0x992a[_0xd9f102];return _0x2652e4;};'use strict';var _=require(_0xa992('0x0'));var util=require(_0xa992('0x1'));var logger=require(_0xa992('0x2'))(_0xa992('0x3'));var moment=require(_0xa992('0x4'));var BPromise=require('bluebird');var rp=require(_0xa992('0x5'));var fs=require('fs');var path=require(_0xa992('0x6'));var rimraf=require(_0xa992('0x7'));var config=require(_0xa992('0x8'));var attributes=require('./intSalesforceConfiguration.attributes');module['exports']=function(_0x237cba,_0x42badf){return _0x237cba['define'](_0xa992('0x9'),attributes,{'tableName':_0xa992('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 63c97cc..836f70c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6ec0=['request','then','info','SalesforceConfiguration,\x20%s,\x20%s','request\x20sent','debug','SalesforceConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','moment','bluebird','randomstring','ioredis','../../config/logger','../../config/environment','client','http'];(function(_0x22f46f,_0x4655d4){var _0x554945=function(_0x472bb6){while(--_0x472bb6){_0x22f46f['push'](_0x22f46f['shift']());}};_0x554945(++_0x4655d4);}(_0x6ec0,0x1da));var _0x06ec=function(_0x2c26a0,_0x2b9577){_0x2c26a0=_0x2c26a0-0x0;var _0x3e26d2=_0x6ec0[_0x2c26a0];return _0x3e26d2;};'use strict';var _=require(_0x06ec('0x0'));var util=require('util');var moment=require(_0x06ec('0x1'));var BPromise=require(_0x06ec('0x2'));var rs=require(_0x06ec('0x3'));var fs=require('fs');var Redis=require(_0x06ec('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x06ec('0x5'))('rpc');var config=require(_0x06ec('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x06ec('0x7')][_0x06ec('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3a029d,_0x483b35,_0x1b94cb){return new BPromise(function(_0x3640df,_0x57662e){return client[_0x06ec('0x9')](_0x3a029d,_0x1b94cb)[_0x06ec('0xa')](function(_0x1903b5){logger[_0x06ec('0xb')](_0x06ec('0xc'),_0x483b35,_0x06ec('0xd'));logger[_0x06ec('0xe')](_0x06ec('0xf'),_0x483b35,_0x06ec('0xd'),JSON[_0x06ec('0x10')](_0x1903b5));if(_0x1903b5[_0x06ec('0x11')]){if(_0x1903b5[_0x06ec('0x11')][_0x06ec('0x12')]===0x1f4){logger['error'](_0x06ec('0xc'),_0x483b35,_0x1903b5['error'][_0x06ec('0x13')]);return _0x57662e(_0x1903b5['error']['message']);}logger[_0x06ec('0x11')]('SalesforceConfiguration,\x20%s,\x20%s',_0x483b35,_0x1903b5[_0x06ec('0x11')][_0x06ec('0x13')]);return _0x3640df(_0x1903b5[_0x06ec('0x11')][_0x06ec('0x13')]);}else{logger[_0x06ec('0xb')](_0x06ec('0xc'),_0x483b35,'request\x20sent');_0x3640df(_0x1903b5[_0x06ec('0x14')]['message']);}})['catch'](function(_0x2ce0b5){logger[_0x06ec('0x11')]('SalesforceConfiguration,\x20%s,\x20%s',_0x483b35,_0x2ce0b5);_0x57662e(_0x2ce0b5);});});}
\ No newline at end of file
+var _0x6616=['request','then','info','SalesforceConfiguration,\x20%s,\x20%s','request\x20sent','debug','SalesforceConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http'];(function(_0x41d942,_0x5bf053){var _0x12bd52=function(_0x1338bb){while(--_0x1338bb){_0x41d942['push'](_0x41d942['shift']());}};_0x12bd52(++_0x5bf053);}(_0x6616,0x10a));var _0x6661=function(_0x253298,_0x84da9f){_0x253298=_0x253298-0x0;var _0x12801e=_0x6616[_0x253298];return _0x12801e;};'use strict';var _=require(_0x6661('0x0'));var util=require(_0x6661('0x1'));var moment=require(_0x6661('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x6661('0x3'))['db'];var utils=require(_0x6661('0x4'));var logger=require(_0x6661('0x5'))(_0x6661('0x6'));var config=require('../../config/environment');var jayson=require(_0x6661('0x7'));var client=jayson[_0x6661('0x8')][_0x6661('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1881e7,_0x5aa352,_0x1d58d2){return new BPromise(function(_0x485f67,_0x1e777d){return client[_0x6661('0xa')](_0x1881e7,_0x1d58d2)[_0x6661('0xb')](function(_0x1e1022){logger[_0x6661('0xc')](_0x6661('0xd'),_0x5aa352,_0x6661('0xe'));logger[_0x6661('0xf')](_0x6661('0x10'),_0x5aa352,_0x6661('0xe'),JSON[_0x6661('0x11')](_0x1e1022));if(_0x1e1022[_0x6661('0x12')]){if(_0x1e1022[_0x6661('0x12')][_0x6661('0x13')]===0x1f4){logger[_0x6661('0x12')]('SalesforceConfiguration,\x20%s,\x20%s',_0x5aa352,_0x1e1022[_0x6661('0x12')]['message']);return _0x1e777d(_0x1e1022['error'][_0x6661('0x14')]);}logger[_0x6661('0x12')](_0x6661('0xd'),_0x5aa352,_0x1e1022[_0x6661('0x12')][_0x6661('0x14')]);return _0x485f67(_0x1e1022[_0x6661('0x12')][_0x6661('0x14')]);}else{logger['info'](_0x6661('0xd'),_0x5aa352,'request\x20sent');_0x485f67(_0x1e1022[_0x6661('0x15')]['message']);}})[_0x6661('0x16')](function(_0x15c7c3){logger[_0x6661('0x12')](_0x6661('0xd'),_0x5aa352,_0x15c7c3);_0x1e777d(_0x15c7c3);});});}
\ No newline at end of file
index d459a6a..7558e41 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5aa2=['delete','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSalesforceField.controller','isAuthenticated','index','get','/:id','show','create'];(function(_0x412e27,_0x20a978){var _0x53da42=function(_0x43cae5){while(--_0x43cae5){_0x412e27['push'](_0x412e27['shift']());}};_0x53da42(++_0x20a978);}(_0x5aa2,0xce));var _0x25aa=function(_0x6161b3,_0x5b61f1){_0x6161b3=_0x6161b3-0x0;var _0x403713=_0x5aa2[_0x6161b3];return _0x403713;};'use strict';var multer=require(_0x25aa('0x0'));var util=require('util');var path=require(_0x25aa('0x1'));var timeout=require(_0x25aa('0x2'));var express=require(_0x25aa('0x3'));var router=express[_0x25aa('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x25aa('0x5'));var interaction=require(_0x25aa('0x6'));var config=require(_0x25aa('0x7'));var controller=require(_0x25aa('0x8'));router['get']('/',auth[_0x25aa('0x9')](),controller[_0x25aa('0xa')]);router[_0x25aa('0xb')](_0x25aa('0xc'),auth['isAuthenticated'](),controller[_0x25aa('0xd')]);router['post']('/',auth[_0x25aa('0x9')](),controller[_0x25aa('0xe')]);router['put'](_0x25aa('0xc'),auth[_0x25aa('0x9')](),controller['update']);router[_0x25aa('0xf')](_0x25aa('0xc'),auth[_0x25aa('0x9')](),controller['destroy']);module[_0x25aa('0x10')]=router;
\ No newline at end of file
+var _0x24f5=['get','index','/:id','isAuthenticated','show','post','create','put','update','exports','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSalesforceField.controller'];(function(_0x2261ce,_0x9ed8b6){var _0x524640=function(_0x3cbb90){while(--_0x3cbb90){_0x2261ce['push'](_0x2261ce['shift']());}};_0x524640(++_0x9ed8b6);}(_0x24f5,0x101));var _0x524f=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x24f5[_0xa464c9];return _0x3d73c4;};'use strict';var multer=require('multer');var util=require(_0x524f('0x0'));var path=require(_0x524f('0x1'));var timeout=require(_0x524f('0x2'));var express=require('express');var router=express[_0x524f('0x3')]();var fs_extra=require(_0x524f('0x4'));var auth=require(_0x524f('0x5'));var interaction=require(_0x524f('0x6'));var config=require(_0x524f('0x7'));var controller=require(_0x524f('0x8'));router[_0x524f('0x9')]('/',auth['isAuthenticated'](),controller[_0x524f('0xa')]);router['get'](_0x524f('0xb'),auth[_0x524f('0xc')](),controller[_0x524f('0xd')]);router[_0x524f('0xe')]('/',auth[_0x524f('0xc')](),controller[_0x524f('0xf')]);router[_0x524f('0x10')]('/:id',auth[_0x524f('0xc')](),controller[_0x524f('0x11')]);router['delete']('/:id',auth[_0x524f('0xc')](),controller['destroy']);module[_0x524f('0x12')]=router;
\ No newline at end of file
index c6d686e..5686503 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8e16=['exports','ENUM','string','customVariable','keyValue','STRING','variable'];(function(_0x1a87b3,_0x45ba68){var _0x37e84d=function(_0x39f49e){while(--_0x39f49e){_0x1a87b3['push'](_0x1a87b3['shift']());}};_0x37e84d(++_0x45ba68);}(_0x8e16,0x1c7));var _0x68e1=function(_0x566bec,_0x464cad){_0x566bec=_0x566bec-0x0;var _0x4e4b99=_0x8e16[_0x566bec];return _0x4e4b99;};'use strict';var Sequelize=require('sequelize');module[_0x68e1('0x0')]={'type':{'type':Sequelize[_0x68e1('0x1')](_0x68e1('0x2'),'variable',_0x68e1('0x3'),_0x68e1('0x4'),'picklist'),'defaultValue':_0x68e1('0x2')},'content':{'type':Sequelize[_0x68e1('0x5')]},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0x68e1('0x1')](_0x68e1('0x2'),_0x68e1('0x6'),'customVariable')},'keyContent':{'type':Sequelize[_0x68e1('0x5')]},'idField':{'type':Sequelize[_0x68e1('0x5')]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xd0ac=['picklist','STRING','sequelize','exports','ENUM','string','variable','customVariable','keyValue'];(function(_0x18b5e8,_0x51e875){var _0x25baed=function(_0x3fcdf9){while(--_0x3fcdf9){_0x18b5e8['push'](_0x18b5e8['shift']());}};_0x25baed(++_0x51e875);}(_0xd0ac,0x1e8));var _0xcd0a=function(_0x42d010,_0x3ee3fb){_0x42d010=_0x42d010-0x0;var _0x4d5c28=_0xd0ac[_0x42d010];return _0x4d5c28;};'use strict';var Sequelize=require(_0xcd0a('0x0'));module[_0xcd0a('0x1')]={'type':{'type':Sequelize[_0xcd0a('0x2')](_0xcd0a('0x3'),_0xcd0a('0x4'),_0xcd0a('0x5'),_0xcd0a('0x6'),_0xcd0a('0x7')),'defaultValue':_0xcd0a('0x3')},'content':{'type':Sequelize[_0xcd0a('0x8')]},'key':{'type':Sequelize[_0xcd0a('0x8')]},'keyType':{'type':Sequelize[_0xcd0a('0x2')]('string',_0xcd0a('0x4'),'customVariable')},'keyContent':{'type':Sequelize[_0xcd0a('0x8')]},'idField':{'type':Sequelize['STRING']},'variableName':{'type':Sequelize[_0xcd0a('0x8')]}};
\ No newline at end of file
index 31bf49b..9b85468 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8bc1=['filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','catch','show','include','find','body','params','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/parsers/qs','../../config/license/hardware','../../mysqldb','sendStatus','status','offset','undefined','limit','count','set','Content-Range','reject','save','update','then','destroy','end','error','stack','name','send','index','map','SalesforceField','rawAttributes','type','model','query','keys'];(function(_0x4e3598,_0x24a224){var _0x40c42e=function(_0x3a82c2){while(--_0x3a82c2){_0x4e3598['push'](_0x4e3598['shift']());}};_0x40c42e(++_0x24a224);}(_0x8bc1,0x1c1));var _0x18bc=function(_0x254bb6,_0x28d0a8){_0x254bb6=_0x254bb6-0x0;var _0x32be0b=_0x8bc1[_0x254bb6];return _0x32be0b;};'use strict';var emlformat=require(_0x18bc('0x0'));var rimraf=require(_0x18bc('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x18bc('0x2'));var rp=require(_0x18bc('0x3'));var moment=require(_0x18bc('0x4'));var BPromise=require(_0x18bc('0x5'));var Mustache=require(_0x18bc('0x6'));var util=require(_0x18bc('0x7'));var path=require(_0x18bc('0x8'));var sox=require(_0x18bc('0x9'));var csv=require(_0x18bc('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x18bc('0xb'));var _=require(_0x18bc('0xc'));var squel=require(_0x18bc('0xd'));var crypto=require(_0x18bc('0xe'));var jsforce=require(_0x18bc('0xf'));var deskjs=require(_0x18bc('0x10'));var toCsv=require(_0x18bc('0xa'));var querystring=require(_0x18bc('0x11'));var Papa=require('papaparse');var Redis=require(_0x18bc('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x18bc('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x18bc('0x14'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x18bc('0x15'))['db'];function respondWithStatusCode(_0x2630f0,_0x107620){_0x107620=_0x107620||0xcc;return function(_0x593419){if(_0x593419){return _0x2630f0[_0x18bc('0x16')](_0x107620);}return _0x2630f0[_0x18bc('0x17')](_0x107620)['end']();};}function respondWithResult(_0x54f65f,_0x5f1935){_0x5f1935=_0x5f1935||0xc8;return function(_0x923817){if(_0x923817){return _0x54f65f[_0x18bc('0x17')](_0x5f1935)['json'](_0x923817);}};}function respondWithFilteredResult(_0x400395,_0x43e0b8){return function(_0x2354b6){if(_0x2354b6){var _0x525f23=typeof _0x43e0b8[_0x18bc('0x18')]===_0x18bc('0x19')&&typeof _0x43e0b8[_0x18bc('0x1a')]===_0x18bc('0x19');var _0x4b7ccc=_0x2354b6['count'];var _0x4929c3=_0x525f23?0x0:_0x43e0b8[_0x18bc('0x18')];var _0x20f411=_0x525f23?_0x2354b6[_0x18bc('0x1b')]:_0x43e0b8[_0x18bc('0x18')]+_0x43e0b8[_0x18bc('0x1a')];var _0x4e20ac;if(_0x20f411>=_0x4b7ccc){_0x20f411=_0x4b7ccc;_0x4e20ac=0xc8;}else{_0x4e20ac=0xce;}_0x400395[_0x18bc('0x17')](_0x4e20ac);return _0x400395[_0x18bc('0x1c')](_0x18bc('0x1d'),_0x4929c3+'-'+_0x20f411+'/'+_0x4b7ccc)['json'](_0x2354b6);}return null;};}function patchUpdates(_0x1f82dd){return function(_0x1b2e8f){try{jsonpatch['apply'](_0x1b2e8f,_0x1f82dd,!![]);}catch(_0x11cab1){return BPromise[_0x18bc('0x1e')](_0x11cab1);}return _0x1b2e8f[_0x18bc('0x1f')]();};}function saveUpdates(_0x4087a3,_0x578fde){return function(_0x3ba06b){if(_0x3ba06b){return _0x3ba06b[_0x18bc('0x20')](_0x4087a3)[_0x18bc('0x21')](function(_0x246177){return _0x246177;});}return null;};}function removeEntity(_0x2941f5,_0x13c85a){return function(_0xaa328c){if(_0xaa328c){return _0xaa328c[_0x18bc('0x22')]()[_0x18bc('0x21')](function(){_0x2941f5['status'](0xcc)[_0x18bc('0x23')]();});}};}function handleEntityNotFound(_0x1d0532,_0x4c6a9d){return function(_0x3f8239){if(!_0x3f8239){_0x1d0532[_0x18bc('0x16')](0x194);}return _0x3f8239;};}function handleError(_0x3451fd,_0x58e692){_0x58e692=_0x58e692||0x1f4;return function(_0x62bb29){logger[_0x18bc('0x24')](_0x62bb29[_0x18bc('0x25')]);if(_0x62bb29[_0x18bc('0x26')]){delete _0x62bb29[_0x18bc('0x26')];}_0x3451fd[_0x18bc('0x17')](_0x58e692)[_0x18bc('0x27')](_0x62bb29);};}exports[_0x18bc('0x28')]=function(_0x326a42,_0x3dcac3){var _0x5e65a9={},_0x2e475f={},_0x1e0144={'count':0x0,'rows':[]};var _0x3cef9f=_[_0x18bc('0x29')](db[_0x18bc('0x2a')][_0x18bc('0x2b')],function(_0x5aaac3){return{'name':_0x5aaac3['fieldName'],'type':_0x5aaac3[_0x18bc('0x2c')]['key']};});_0x2e475f[_0x18bc('0x2d')]=_[_0x18bc('0x29')](_0x3cef9f,_0x18bc('0x26'));_0x2e475f[_0x18bc('0x2e')]=_[_0x18bc('0x2f')](_0x326a42[_0x18bc('0x2e')]);_0x2e475f[_0x18bc('0x30')]=_[_0x18bc('0x31')](_0x2e475f['model'],_0x2e475f[_0x18bc('0x2e')]);_0x5e65a9[_0x18bc('0x32')]=_[_0x18bc('0x31')](_0x2e475f[_0x18bc('0x2d')],qs['fields'](_0x326a42['query'][_0x18bc('0x33')]));_0x5e65a9['attributes']=_0x5e65a9['attributes'][_0x18bc('0x34')]?_0x5e65a9[_0x18bc('0x32')]:_0x2e475f['model'];if(!_0x326a42[_0x18bc('0x2e')][_0x18bc('0x35')](_0x18bc('0x36'))){_0x5e65a9[_0x18bc('0x1a')]=qs[_0x18bc('0x1a')](_0x326a42[_0x18bc('0x2e')][_0x18bc('0x1a')]);_0x5e65a9[_0x18bc('0x18')]=qs[_0x18bc('0x18')](_0x326a42['query'][_0x18bc('0x18')]);}_0x5e65a9[_0x18bc('0x37')]=qs[_0x18bc('0x38')](_0x326a42['query'][_0x18bc('0x38')]);_0x5e65a9[_0x18bc('0x39')]=qs[_0x18bc('0x30')](_[_0x18bc('0x3a')](_0x326a42[_0x18bc('0x2e')],_0x2e475f[_0x18bc('0x30')]),_0x3cef9f);if(_0x326a42[_0x18bc('0x2e')][_0x18bc('0x3b')]){_0x5e65a9['where']=_[_0x18bc('0x3c')](_0x5e65a9[_0x18bc('0x39')],{'$or':_['map'](_0x3cef9f,function(_0x3cc94f){if(_0x3cc94f[_0x18bc('0x2c')]!==_0x18bc('0x3d')){var _0x32535a={};_0x32535a[_0x3cc94f[_0x18bc('0x26')]]={'$like':'%'+_0x326a42[_0x18bc('0x2e')][_0x18bc('0x3b')]+'%'};return _0x32535a;}})});}_0x5e65a9=_['merge']({},_0x5e65a9,_0x326a42[_0x18bc('0x3e')]);var _0x453336={'where':_0x5e65a9[_0x18bc('0x39')]};return db[_0x18bc('0x2a')]['count'](_0x453336)[_0x18bc('0x21')](function(_0x533ec6){_0x1e0144[_0x18bc('0x1b')]=_0x533ec6;if(_0x326a42[_0x18bc('0x2e')][_0x18bc('0x3f')]){_0x5e65a9['include']=[{'all':!![]}];}return db[_0x18bc('0x2a')][_0x18bc('0x40')](_0x5e65a9);})[_0x18bc('0x21')](function(_0x13247d){_0x1e0144['rows']=_0x13247d;return _0x1e0144;})[_0x18bc('0x21')](respondWithFilteredResult(_0x3dcac3,_0x5e65a9))[_0x18bc('0x41')](handleError(_0x3dcac3,null));};exports[_0x18bc('0x42')]=function(_0x138682,_0x5304cd){var _0x19a018={'raw':!![],'where':{'id':_0x138682['params']['id']}},_0x4d8cdd={};_0x4d8cdd['model']=_['keys'](db[_0x18bc('0x2a')]['rawAttributes']);_0x4d8cdd[_0x18bc('0x2e')]=_[_0x18bc('0x2f')](_0x138682[_0x18bc('0x2e')]);_0x4d8cdd[_0x18bc('0x30')]=_[_0x18bc('0x31')](_0x4d8cdd[_0x18bc('0x2d')],_0x4d8cdd[_0x18bc('0x2e')]);_0x19a018['attributes']=_[_0x18bc('0x31')](_0x4d8cdd['model'],qs[_0x18bc('0x33')](_0x138682[_0x18bc('0x2e')][_0x18bc('0x33')]));_0x19a018['attributes']=_0x19a018[_0x18bc('0x32')][_0x18bc('0x34')]?_0x19a018[_0x18bc('0x32')]:_0x4d8cdd[_0x18bc('0x2d')];if(_0x138682['query'][_0x18bc('0x3f')]){_0x19a018[_0x18bc('0x43')]=[{'all':!![]}];}_0x19a018=_[_0x18bc('0x3c')]({},_0x19a018,_0x138682[_0x18bc('0x3e')]);return db[_0x18bc('0x2a')][_0x18bc('0x44')](_0x19a018)[_0x18bc('0x21')](handleEntityNotFound(_0x5304cd,null))[_0x18bc('0x21')](respondWithResult(_0x5304cd,null))[_0x18bc('0x41')](handleError(_0x5304cd,null));};exports['create']=function(_0x5a9a3d,_0x3dd9e5){return db['SalesforceField']['create'](_0x5a9a3d['body'],{})[_0x18bc('0x21')](respondWithResult(_0x3dd9e5,0xc9))[_0x18bc('0x41')](handleError(_0x3dd9e5,null));};exports[_0x18bc('0x20')]=function(_0x5f3a81,_0xcf6f17){if(_0x5f3a81[_0x18bc('0x45')]['id']){delete _0x5f3a81['body']['id'];}return db[_0x18bc('0x2a')]['find']({'where':{'id':_0x5f3a81[_0x18bc('0x46')]['id']}})[_0x18bc('0x21')](handleEntityNotFound(_0xcf6f17,null))[_0x18bc('0x21')](saveUpdates(_0x5f3a81[_0x18bc('0x45')],null))[_0x18bc('0x21')](respondWithResult(_0xcf6f17,null))['catch'](handleError(_0xcf6f17,null));};exports[_0x18bc('0x22')]=function(_0x4cef28,_0x313372){return db['SalesforceField']['find']({'where':{'id':_0x4cef28['params']['id']}})[_0x18bc('0x21')](handleEntityNotFound(_0x313372,null))[_0x18bc('0x21')](removeEntity(_0x313372,null))[_0x18bc('0x41')](handleError(_0x313372,null));};
\ No newline at end of file
+var _0xf982=['includeAll','create','body','find','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','lodash','squel','crypto','jsforce','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment','../../config/license/util','sendStatus','status','json','offset','undefined','limit','count','set','apply','save','update','then','destroy','end','error','stack','name','SalesforceField','rawAttributes','fieldName','key','model','map','query','filters','intersection','attributes','fields','length','nolimit','sort','where','pick','filter','merge','type','VIRTUAL','options','include','findAll','rows','catch','show','params','keys'];(function(_0x4af777,_0x1dcc3f){var _0x3f752d=function(_0x20c7eb){while(--_0x20c7eb){_0x4af777['push'](_0x4af777['shift']());}};_0x3f752d(++_0x1dcc3f);}(_0xf982,0x171));var _0x2f98=function(_0x2e71d3,_0x42cd6d){_0x2e71d3=_0x2e71d3-0x0;var _0x37d70d=_0xf982[_0x2e71d3];return _0x37d70d;};'use strict';var emlformat=require(_0x2f98('0x0'));var rimraf=require(_0x2f98('0x1'));var zipdir=require(_0x2f98('0x2'));var jsonpatch=require(_0x2f98('0x3'));var rp=require(_0x2f98('0x4'));var moment=require(_0x2f98('0x5'));var BPromise=require(_0x2f98('0x6'));var Mustache=require(_0x2f98('0x7'));var util=require(_0x2f98('0x8'));var path=require(_0x2f98('0x9'));var sox=require(_0x2f98('0xa'));var csv=require('to-csv');var ejs=require(_0x2f98('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x2f98('0xc'));var squel=require(_0x2f98('0xd'));var crypto=require(_0x2f98('0xe'));var jsforce=require(_0x2f98('0xf'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x2f98('0x10'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x2f98('0x11'));var qs=require(_0x2f98('0x12'));var as=require(_0x2f98('0x13'));var hardwareService=require(_0x2f98('0x14'));var logger=require('../../config/logger')(_0x2f98('0x15'));var utils=require('../../config/utils');var config=require(_0x2f98('0x16'));var licenseUtil=require(_0x2f98('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x21725a,_0x1c13d0){_0x1c13d0=_0x1c13d0||0xcc;return function(_0x36198b){if(_0x36198b){return _0x21725a[_0x2f98('0x18')](_0x1c13d0);}return _0x21725a[_0x2f98('0x19')](_0x1c13d0)['end']();};}function respondWithResult(_0x405b82,_0x2def31){_0x2def31=_0x2def31||0xc8;return function(_0x25e35d){if(_0x25e35d){return _0x405b82[_0x2f98('0x19')](_0x2def31)[_0x2f98('0x1a')](_0x25e35d);}};}function respondWithFilteredResult(_0x107526,_0xfee0dc){return function(_0x557a03){if(_0x557a03){var _0x19b1df=typeof _0xfee0dc[_0x2f98('0x1b')]===_0x2f98('0x1c')&&typeof _0xfee0dc[_0x2f98('0x1d')]==='undefined';var _0x533243=_0x557a03[_0x2f98('0x1e')];var _0x12bd64=_0x19b1df?0x0:_0xfee0dc[_0x2f98('0x1b')];var _0x49ef20=_0x19b1df?_0x557a03[_0x2f98('0x1e')]:_0xfee0dc[_0x2f98('0x1b')]+_0xfee0dc[_0x2f98('0x1d')];var _0x3371ac;if(_0x49ef20>=_0x533243){_0x49ef20=_0x533243;_0x3371ac=0xc8;}else{_0x3371ac=0xce;}_0x107526[_0x2f98('0x19')](_0x3371ac);return _0x107526[_0x2f98('0x1f')]('Content-Range',_0x12bd64+'-'+_0x49ef20+'/'+_0x533243)[_0x2f98('0x1a')](_0x557a03);}return null;};}function patchUpdates(_0x4b7c73){return function(_0x2a56a1){try{jsonpatch[_0x2f98('0x20')](_0x2a56a1,_0x4b7c73,!![]);}catch(_0x2a76ac){return BPromise['reject'](_0x2a76ac);}return _0x2a56a1[_0x2f98('0x21')]();};}function saveUpdates(_0x254c01,_0x41d1da){return function(_0x140c3a){if(_0x140c3a){return _0x140c3a[_0x2f98('0x22')](_0x254c01)[_0x2f98('0x23')](function(_0x4edc62){return _0x4edc62;});}return null;};}function removeEntity(_0x149be2,_0x52bdf1){return function(_0x5e27f4){if(_0x5e27f4){return _0x5e27f4[_0x2f98('0x24')]()[_0x2f98('0x23')](function(){_0x149be2['status'](0xcc)[_0x2f98('0x25')]();});}};}function handleEntityNotFound(_0x550565,_0x1de14e){return function(_0x1b76e5){if(!_0x1b76e5){_0x550565['sendStatus'](0x194);}return _0x1b76e5;};}function handleError(_0x5ee850,_0x51b8bf){_0x51b8bf=_0x51b8bf||0x1f4;return function(_0x24f22c){logger[_0x2f98('0x26')](_0x24f22c[_0x2f98('0x27')]);if(_0x24f22c[_0x2f98('0x28')]){delete _0x24f22c['name'];}_0x5ee850[_0x2f98('0x19')](_0x51b8bf)['send'](_0x24f22c);};}exports['index']=function(_0xa1a9f2,_0x5cc4b5){var _0x422492={},_0x437ebb={},_0x1d0fa2={'count':0x0,'rows':[]};var _0x5506f5=_['map'](db[_0x2f98('0x29')][_0x2f98('0x2a')],function(_0x509e3c){return{'name':_0x509e3c[_0x2f98('0x2b')],'type':_0x509e3c['type'][_0x2f98('0x2c')]};});_0x437ebb[_0x2f98('0x2d')]=_[_0x2f98('0x2e')](_0x5506f5,_0x2f98('0x28'));_0x437ebb[_0x2f98('0x2f')]=_['keys'](_0xa1a9f2[_0x2f98('0x2f')]);_0x437ebb[_0x2f98('0x30')]=_[_0x2f98('0x31')](_0x437ebb[_0x2f98('0x2d')],_0x437ebb[_0x2f98('0x2f')]);_0x422492[_0x2f98('0x32')]=_[_0x2f98('0x31')](_0x437ebb[_0x2f98('0x2d')],qs['fields'](_0xa1a9f2[_0x2f98('0x2f')][_0x2f98('0x33')]));_0x422492[_0x2f98('0x32')]=_0x422492['attributes'][_0x2f98('0x34')]?_0x422492['attributes']:_0x437ebb['model'];if(!_0xa1a9f2[_0x2f98('0x2f')]['hasOwnProperty'](_0x2f98('0x35'))){_0x422492[_0x2f98('0x1d')]=qs['limit'](_0xa1a9f2[_0x2f98('0x2f')][_0x2f98('0x1d')]);_0x422492[_0x2f98('0x1b')]=qs[_0x2f98('0x1b')](_0xa1a9f2[_0x2f98('0x2f')][_0x2f98('0x1b')]);}_0x422492['order']=qs[_0x2f98('0x36')](_0xa1a9f2[_0x2f98('0x2f')][_0x2f98('0x36')]);_0x422492[_0x2f98('0x37')]=qs['filters'](_[_0x2f98('0x38')](_0xa1a9f2[_0x2f98('0x2f')],_0x437ebb[_0x2f98('0x30')]),_0x5506f5);if(_0xa1a9f2[_0x2f98('0x2f')][_0x2f98('0x39')]){_0x422492[_0x2f98('0x37')]=_[_0x2f98('0x3a')](_0x422492[_0x2f98('0x37')],{'$or':_[_0x2f98('0x2e')](_0x5506f5,function(_0x508615){if(_0x508615[_0x2f98('0x3b')]!==_0x2f98('0x3c')){var _0x328e4d={};_0x328e4d[_0x508615['name']]={'$like':'%'+_0xa1a9f2[_0x2f98('0x2f')][_0x2f98('0x39')]+'%'};return _0x328e4d;}})});}_0x422492=_['merge']({},_0x422492,_0xa1a9f2[_0x2f98('0x3d')]);var _0x57a5de={'where':_0x422492['where']};return db['SalesforceField'][_0x2f98('0x1e')](_0x57a5de)[_0x2f98('0x23')](function(_0x204a4e){_0x1d0fa2[_0x2f98('0x1e')]=_0x204a4e;if(_0xa1a9f2[_0x2f98('0x2f')]['includeAll']){_0x422492[_0x2f98('0x3e')]=[{'all':!![]}];}return db['SalesforceField'][_0x2f98('0x3f')](_0x422492);})[_0x2f98('0x23')](function(_0x41040f){_0x1d0fa2[_0x2f98('0x40')]=_0x41040f;return _0x1d0fa2;})[_0x2f98('0x23')](respondWithFilteredResult(_0x5cc4b5,_0x422492))[_0x2f98('0x41')](handleError(_0x5cc4b5,null));};exports[_0x2f98('0x42')]=function(_0x42dbe9,_0x5a86e7){var _0x47dd7a={'raw':!![],'where':{'id':_0x42dbe9[_0x2f98('0x43')]['id']}},_0x3767ac={};_0x3767ac[_0x2f98('0x2d')]=_[_0x2f98('0x44')](db[_0x2f98('0x29')][_0x2f98('0x2a')]);_0x3767ac[_0x2f98('0x2f')]=_[_0x2f98('0x44')](_0x42dbe9[_0x2f98('0x2f')]);_0x3767ac[_0x2f98('0x30')]=_[_0x2f98('0x31')](_0x3767ac[_0x2f98('0x2d')],_0x3767ac['query']);_0x47dd7a[_0x2f98('0x32')]=_['intersection'](_0x3767ac['model'],qs[_0x2f98('0x33')](_0x42dbe9[_0x2f98('0x2f')][_0x2f98('0x33')]));_0x47dd7a['attributes']=_0x47dd7a[_0x2f98('0x32')][_0x2f98('0x34')]?_0x47dd7a[_0x2f98('0x32')]:_0x3767ac[_0x2f98('0x2d')];if(_0x42dbe9[_0x2f98('0x2f')][_0x2f98('0x45')]){_0x47dd7a['include']=[{'all':!![]}];}_0x47dd7a=_['merge']({},_0x47dd7a,_0x42dbe9[_0x2f98('0x3d')]);return db[_0x2f98('0x29')]['find'](_0x47dd7a)[_0x2f98('0x23')](handleEntityNotFound(_0x5a86e7,null))[_0x2f98('0x23')](respondWithResult(_0x5a86e7,null))[_0x2f98('0x41')](handleError(_0x5a86e7,null));};exports['create']=function(_0x3621e6,_0x2e2cdc){return db[_0x2f98('0x29')][_0x2f98('0x46')](_0x3621e6[_0x2f98('0x47')],{})[_0x2f98('0x23')](respondWithResult(_0x2e2cdc,0xc9))[_0x2f98('0x41')](handleError(_0x2e2cdc,null));};exports[_0x2f98('0x22')]=function(_0x32f260,_0x5ead14){if(_0x32f260[_0x2f98('0x47')]['id']){delete _0x32f260[_0x2f98('0x47')]['id'];}return db['SalesforceField'][_0x2f98('0x48')]({'where':{'id':_0x32f260['params']['id']}})[_0x2f98('0x23')](handleEntityNotFound(_0x5ead14,null))[_0x2f98('0x23')](saveUpdates(_0x32f260[_0x2f98('0x47')],null))[_0x2f98('0x23')](respondWithResult(_0x5ead14,null))[_0x2f98('0x41')](handleError(_0x5ead14,null));};exports['destroy']=function(_0x38a9ac,_0x4fa13f){return db[_0x2f98('0x29')][_0x2f98('0x48')]({'where':{'id':_0x38a9ac['params']['id']}})[_0x2f98('0x23')](handleEntityNotFound(_0x4fa13f,null))[_0x2f98('0x23')](removeEntity(_0x4fa13f,null))[_0x2f98('0x41')](handleError(_0x4fa13f,null));};
\ No newline at end of file
index a65d579..ee9b78c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd9bb=['request-promise','path','rimraf','../../config/environment','./intSalesforceField.attributes','exports','int_salesforce_fields','salesforce_unique_index','idField','FieldId','lodash','util','moment'];(function(_0x6131cd,_0x4c26a1){var _0x47e916=function(_0x1f2bce){while(--_0x1f2bce){_0x6131cd['push'](_0x6131cd['shift']());}};_0x47e916(++_0x4c26a1);}(_0xd9bb,0x128));var _0xbd9b=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xd9bb[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0xbd9b('0x0'));var util=require(_0xbd9b('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xbd9b('0x2'));var BPromise=require('bluebird');var rp=require(_0xbd9b('0x3'));var fs=require('fs');var path=require(_0xbd9b('0x4'));var rimraf=require(_0xbd9b('0x5'));var config=require(_0xbd9b('0x6'));var attributes=require(_0xbd9b('0x7'));module[_0xbd9b('0x8')]=function(_0x86006d,_0x1c38da){return _0x86006d['define']('SalesforceField',attributes,{'tableName':_0xbd9b('0x9'),'paranoid':![],'indexes':[{'name':_0xbd9b('0xa'),'fields':[_0xbd9b('0xb'),_0xbd9b('0xc')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x8d2e=['SalesforceField','int_salesforce_fields','idField','lodash','util','api','moment','request-promise','path','rimraf','./intSalesforceField.attributes','exports','define'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x8d2e,0x6b));var _0xe8d2=function(_0x42145f,_0xc3da46){_0x42145f=_0x42145f-0x0;var _0x3f9619=_0x8d2e[_0x42145f];return _0x3f9619;};'use strict';var _=require(_0xe8d2('0x0'));var util=require(_0xe8d2('0x1'));var logger=require('../../config/logger')(_0xe8d2('0x2'));var moment=require(_0xe8d2('0x3'));var BPromise=require('bluebird');var rp=require(_0xe8d2('0x4'));var fs=require('fs');var path=require(_0xe8d2('0x5'));var rimraf=require(_0xe8d2('0x6'));var config=require('../../config/environment');var attributes=require(_0xe8d2('0x7'));module[_0xe8d2('0x8')]=function(_0x3416bf,_0x3c0814){return _0x3416bf[_0xe8d2('0x9')](_0xe8d2('0xa'),attributes,{'tableName':_0xe8d2('0xb'),'paranoid':![],'indexes':[{'name':'salesforce_unique_index','fields':[_0xe8d2('0xc'),'FieldId'],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index a0ce224..7cb1d52 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6e3b=['util','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','SalesforceField,\x20%s,\x20%s','request\x20sent','SalesforceField,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','lodash'];(function(_0xb3c018,_0x4f4082){var _0x3a0995=function(_0x3ee087){while(--_0x3ee087){_0xb3c018['push'](_0xb3c018['shift']());}};_0x3a0995(++_0x4f4082);}(_0x6e3b,0xc7));var _0xb6e3=function(_0x280ffe,_0x460fc9){_0x280ffe=_0x280ffe-0x0;var _0xad5f45=_0x6e3b[_0x280ffe];return _0xad5f45;};'use strict';var _=require(_0xb6e3('0x0'));var util=require(_0xb6e3('0x1'));var moment=require('moment');var BPromise=require(_0xb6e3('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xb6e3('0x3'));var logger=require(_0xb6e3('0x4'))(_0xb6e3('0x5'));var config=require(_0xb6e3('0x6'));var jayson=require(_0xb6e3('0x7'));var client=jayson[_0xb6e3('0x8')][_0xb6e3('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2220ea,_0x53b5c3,_0x47c196){return new BPromise(function(_0xcc2088,_0x11a704){return client[_0xb6e3('0xa')](_0x2220ea,_0x47c196)['then'](function(_0x187316){logger[_0xb6e3('0xb')](_0xb6e3('0xc'),_0x53b5c3,_0xb6e3('0xd'));logger['debug'](_0xb6e3('0xe'),_0x53b5c3,_0xb6e3('0xd'),JSON['stringify'](_0x187316));if(_0x187316['error']){if(_0x187316[_0xb6e3('0xf')][_0xb6e3('0x10')]===0x1f4){logger[_0xb6e3('0xf')]('SalesforceField,\x20%s,\x20%s',_0x53b5c3,_0x187316[_0xb6e3('0xf')][_0xb6e3('0x11')]);return _0x11a704(_0x187316[_0xb6e3('0xf')]['message']);}logger[_0xb6e3('0xf')](_0xb6e3('0xc'),_0x53b5c3,_0x187316[_0xb6e3('0xf')][_0xb6e3('0x11')]);return _0xcc2088(_0x187316[_0xb6e3('0xf')][_0xb6e3('0x11')]);}else{logger[_0xb6e3('0xb')](_0xb6e3('0xc'),_0x53b5c3,'request\x20sent');_0xcc2088(_0x187316[_0xb6e3('0x12')]['message']);}})[_0xb6e3('0x13')](function(_0x223db8){logger['error'](_0xb6e3('0xc'),_0x53b5c3,_0x223db8);_0x11a704(_0x223db8);});});}
\ No newline at end of file
+var _0xe332=['../../config/logger','rpc','../../config/environment','client','http','request','then','SalesforceField,\x20%s,\x20%s','request\x20sent','debug','SalesforceField,\x20%s,\x20%s,\x20%s','error','code','message','info','catch','lodash','moment','bluebird','../../mysqldb'];(function(_0x4be3ec,_0x218441){var _0x44b79f=function(_0x56d3c1){while(--_0x56d3c1){_0x4be3ec['push'](_0x4be3ec['shift']());}};_0x44b79f(++_0x218441);}(_0xe332,0x18c));var _0x2e33=function(_0x294f75,_0x187720){_0x294f75=_0x294f75-0x0;var _0x2cbc9e=_0xe332[_0x294f75];return _0x2cbc9e;};'use strict';var _=require(_0x2e33('0x0'));var util=require('util');var moment=require(_0x2e33('0x1'));var BPromise=require(_0x2e33('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x2e33('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x2e33('0x4'))(_0x2e33('0x5'));var config=require(_0x2e33('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x2e33('0x7')][_0x2e33('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4f6025,_0x3861cf,_0x2c32c4){return new BPromise(function(_0x9e0a2e,_0x24238f){return client[_0x2e33('0x9')](_0x4f6025,_0x2c32c4)[_0x2e33('0xa')](function(_0x285433){logger['info'](_0x2e33('0xb'),_0x3861cf,_0x2e33('0xc'));logger[_0x2e33('0xd')](_0x2e33('0xe'),_0x3861cf,'request\x20sent',JSON['stringify'](_0x285433));if(_0x285433['error']){if(_0x285433[_0x2e33('0xf')][_0x2e33('0x10')]===0x1f4){logger[_0x2e33('0xf')](_0x2e33('0xb'),_0x3861cf,_0x285433['error']['message']);return _0x24238f(_0x285433[_0x2e33('0xf')][_0x2e33('0x11')]);}logger['error']('SalesforceField,\x20%s,\x20%s',_0x3861cf,_0x285433[_0x2e33('0xf')][_0x2e33('0x11')]);return _0x9e0a2e(_0x285433[_0x2e33('0xf')][_0x2e33('0x11')]);}else{logger[_0x2e33('0x12')]('SalesforceField,\x20%s,\x20%s',_0x3861cf,_0x2e33('0xc'));_0x9e0a2e(_0x285433['result'][_0x2e33('0x11')]);}})[_0x2e33('0x13')](function(_0x178805){logger[_0x2e33('0xf')]('SalesforceField,\x20%s,\x20%s',_0x3861cf,_0x178805);_0x24238f(_0x178805);});});}
\ No newline at end of file
index 5d6b011..94070c1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x699a=['addConfiguration','put','update','destroy','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','./intServicenowAccount.controller','get','index','/:id','isAuthenticated','getConfigurations','/:id/fields','getFields','create','/:id/configurations'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x699a,0x12a));var _0xa699=function(_0x4c12ec,_0x2e9103){_0x4c12ec=_0x4c12ec-0x0;var _0x3ae42c=_0x699a[_0x4c12ec];return _0x3ae42c;};'use strict';var multer=require(_0xa699('0x0'));var util=require(_0xa699('0x1'));var path=require(_0xa699('0x2'));var timeout=require(_0xa699('0x3'));var express=require('express');var router=express[_0xa699('0x4')]();var fs_extra=require(_0xa699('0x5'));var auth=require(_0xa699('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xa699('0x7'));router[_0xa699('0x8')]('/',auth['isAuthenticated'](),controller[_0xa699('0x9')]);router[_0xa699('0x8')](_0xa699('0xa'),auth[_0xa699('0xb')](),controller['show']);router[_0xa699('0x8')]('/:id/configurations',auth['isAuthenticated'](),controller[_0xa699('0xc')]);router[_0xa699('0x8')](_0xa699('0xd'),auth['isAuthenticated'](),controller[_0xa699('0xe')]);router['post']('/',auth[_0xa699('0xb')](),controller[_0xa699('0xf')]);router['post'](_0xa699('0x10'),auth[_0xa699('0xb')](),controller[_0xa699('0x11')]);router[_0xa699('0x12')]('/:id',auth[_0xa699('0xb')](),controller[_0xa699('0x13')]);router['delete'](_0xa699('0xa'),auth['isAuthenticated'](),controller[_0xa699('0x14')]);module['exports']=router;
\ No newline at end of file
+var _0x07c3=['put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','./intServicenowAccount.controller','get','isAuthenticated','index','/:id','show','/:id/configurations','getConfigurations','/:id/fields','getFields','post','create'];(function(_0x4e6fe3,_0x4375e6){var _0x44b03e=function(_0x485c9b){while(--_0x485c9b){_0x4e6fe3['push'](_0x4e6fe3['shift']());}};_0x44b03e(++_0x4375e6);}(_0x07c3,0x1bf));var _0x307c=function(_0x129a57,_0x330d03){_0x129a57=_0x129a57-0x0;var _0xa7147c=_0x07c3[_0x129a57];return _0xa7147c;};'use strict';var multer=require(_0x307c('0x0'));var util=require(_0x307c('0x1'));var path=require(_0x307c('0x2'));var timeout=require(_0x307c('0x3'));var express=require(_0x307c('0x4'));var router=express[_0x307c('0x5')]();var fs_extra=require(_0x307c('0x6'));var auth=require(_0x307c('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0x307c('0x8'));var controller=require(_0x307c('0x9'));router[_0x307c('0xa')]('/',auth[_0x307c('0xb')](),controller[_0x307c('0xc')]);router[_0x307c('0xa')](_0x307c('0xd'),auth[_0x307c('0xb')](),controller[_0x307c('0xe')]);router[_0x307c('0xa')](_0x307c('0xf'),auth[_0x307c('0xb')](),controller[_0x307c('0x10')]);router[_0x307c('0xa')](_0x307c('0x11'),auth['isAuthenticated'](),controller[_0x307c('0x12')]);router[_0x307c('0x13')]('/',auth[_0x307c('0xb')](),controller[_0x307c('0x14')]);router['post']('/:id/configurations',auth[_0x307c('0xb')](),controller['addConfiguration']);router[_0x307c('0x15')](_0x307c('0xd'),auth['isAuthenticated'](),controller[_0x307c('0x16')]);router[_0x307c('0x17')](_0x307c('0xd'),auth[_0x307c('0xb')](),controller[_0x307c('0x18')]);module[_0x307c('0x19')]=router;
\ No newline at end of file
index 22457ed..bb9eb21 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf85d=['remoteUri','sequelize','exports','STRING','username'];(function(_0x136199,_0x3beb39){var _0x44ec86=function(_0x58bf80){while(--_0x58bf80){_0x136199['push'](_0x136199['shift']());}};_0x44ec86(++_0x3beb39);}(_0xf85d,0x146));var _0xdf85=function(_0x4f98f2,_0x35d270){_0x4f98f2=_0x4f98f2-0x0;var _0x595a12=_0xf85d[_0x4f98f2];return _0x595a12;};'use strict';var Sequelize=require(_0xdf85('0x0'));module[_0xdf85('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xdf85('0x2')]},'username':{'type':Sequelize[_0xdf85('0x2')],'unique':_0xdf85('0x3')},'password':{'type':Sequelize['STRING']},'email':{'type':Sequelize[_0xdf85('0x2')]},'remoteUri':{'type':Sequelize[_0xdf85('0x2')],'unique':_0xdf85('0x4')},'serverUrl':{'type':Sequelize[_0xdf85('0x2')],'allowNull':![]}};
\ No newline at end of file
+var _0xe578=['exports','STRING','username','remoteUri','sequelize'];(function(_0x126558,_0x143c9a){var _0x1f6d14=function(_0x2b0eea){while(--_0x2b0eea){_0x126558['push'](_0x126558['shift']());}};_0x1f6d14(++_0x143c9a);}(_0xe578,0x95));var _0x8e57=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0xe578[_0x432682];return _0x463d05;};'use strict';var Sequelize=require(_0x8e57('0x0'));module[_0x8e57('0x1')]={'name':{'type':Sequelize[_0x8e57('0x2')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0x8e57('0x2')],'unique':_0x8e57('0x3')},'password':{'type':Sequelize[_0x8e57('0x2')]},'email':{'type':Sequelize[_0x8e57('0x2')]},'remoteUri':{'type':Sequelize[_0x8e57('0x2')],'unique':_0x8e57('0x4')},'serverUrl':{'type':Sequelize[_0x8e57('0x2')],'allowNull':![]}};
\ No newline at end of file
index d88a003..147e9a6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x21c2=['reopen_count','sys_tags','escalation','upon_approval','correlation_id','password','remoteUri','serverUrl','slice','substring','format','%s/api/now/doc/table/schema/','%s/api/now/table/','username','incident?sysparm_display_value=all','result','incident\x20table\x20objects','assign','remove','forEach','internalType','label','push','all','includes','TCL:\x20exports.getEntityFields\x20->\x20_objectsCustom','concat','log','ServiceNow\x20error:\x20','test','statusCode','boolean','True','False','false','GET','sys_choice?sysparm_query=name=incident^element=','inactive','value','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','offset','count','limit','Content-Range','apply','save','update','then','destroy','error','stack','name','index','ServicenowAccount','rawAttributes','fieldName','type','key','model','map','query','keys','intersection','attributes','fields','nolimit','order','sort','where','filters','pick','filter','merge','includeAll','include','findAll','rows','catch','show','params','options','create','body','find','getConfigurations','findOne','length','hasOwnProperty','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','ServicenowConfiguration','ServicenowField','getFields','subcategory','notify','incident_state','severity','category','parent','made_sla','caused_by','watch_list','sys_updated_on','child_incidents','hold_reason','number','resolved_by','opened_by','user_input','sys_created_on','sys_domain','state','sys_created_by','knowledge','calendar_stc','closed_at','cmdb_ci','delivery_plan','active','work_notes_list','business_service','priority','sys_domain_path','rfc','expected_start','opened_at','business_duration','group_list','work_end','approval_set','close_code','correlation_display','assignment_group','business_stc','calendar_duration','sys_class_name','close_notes','closed_by','parent_incident','sys_id','reopened_by','urgency','problem_id','company','reassignment_count','activity_due','assigned_to','comments','sla_due','approval','comments_and_work_notes','due_date','sys_mod_count'];(function(_0x2fca93,_0x4ef99b){var _0x391ce6=function(_0x48c832){while(--_0x48c832){_0x2fca93['push'](_0x2fca93['shift']());}};_0x391ce6(++_0x4ef99b);}(_0x21c2,0x19b));var _0x221c=function(_0x208126,_0x4c662f){_0x208126=_0x208126-0x0;var _0x4ba72a=_0x21c2[_0x208126];return _0x4ba72a;};'use strict';var emlformat=require(_0x221c('0x0'));var rimraf=require(_0x221c('0x1'));var zipdir=require(_0x221c('0x2'));var jsonpatch=require(_0x221c('0x3'));var rp=require(_0x221c('0x4'));var moment=require(_0x221c('0x5'));var BPromise=require(_0x221c('0x6'));var Mustache=require(_0x221c('0x7'));var util=require(_0x221c('0x8'));var path=require(_0x221c('0x9'));var sox=require('sox');var csv=require(_0x221c('0xa'));var ejs=require(_0x221c('0xb'));var fs=require('fs');var fs_extra=require(_0x221c('0xc'));var _=require(_0x221c('0xd'));var squel=require(_0x221c('0xe'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x221c('0xf'));var toCsv=require('to-csv');var querystring=require(_0x221c('0x10'));var Papa=require(_0x221c('0x11'));var Redis=require('ioredis');var authService=require(_0x221c('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x221c('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x221c('0x14'))(_0x221c('0x15'));var utils=require(_0x221c('0x16'));var config=require(_0x221c('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x221c('0x18'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x14fbb3,_0x1a45ac){_0x1a45ac=_0x1a45ac||0xcc;return function(_0x30f365){if(_0x30f365){return _0x14fbb3[_0x221c('0x19')](_0x1a45ac);}return _0x14fbb3['status'](_0x1a45ac)[_0x221c('0x1a')]();};}function respondWithResult(_0x4aed67,_0x5a3516){_0x5a3516=_0x5a3516||0xc8;return function(_0x38cfba){if(_0x38cfba){return _0x4aed67[_0x221c('0x1b')](_0x5a3516)[_0x221c('0x1c')](_0x38cfba);}};}function respondWithFilteredResult(_0x4e7f5d,_0x2994e2){return function(_0x1a8bf1){if(_0x1a8bf1){var _0x74bdca=typeof _0x2994e2[_0x221c('0x1d')]==='undefined'&&typeof _0x2994e2['limit']==='undefined';var _0x25895e=_0x1a8bf1[_0x221c('0x1e')];var _0x285457=_0x74bdca?0x0:_0x2994e2['offset'];var _0x4d664=_0x74bdca?_0x1a8bf1['count']:_0x2994e2[_0x221c('0x1d')]+_0x2994e2[_0x221c('0x1f')];var _0xd513f5;if(_0x4d664>=_0x25895e){_0x4d664=_0x25895e;_0xd513f5=0xc8;}else{_0xd513f5=0xce;}_0x4e7f5d['status'](_0xd513f5);return _0x4e7f5d['set'](_0x221c('0x20'),_0x285457+'-'+_0x4d664+'/'+_0x25895e)[_0x221c('0x1c')](_0x1a8bf1);}return null;};}function patchUpdates(_0x5ced64){return function(_0x61f5ff){try{jsonpatch[_0x221c('0x21')](_0x61f5ff,_0x5ced64,!![]);}catch(_0x33f2ce){return BPromise['reject'](_0x33f2ce);}return _0x61f5ff[_0x221c('0x22')]();};}function saveUpdates(_0xc3abc0,_0xac9928){return function(_0x20e5ea){if(_0x20e5ea){return _0x20e5ea[_0x221c('0x23')](_0xc3abc0)[_0x221c('0x24')](function(_0x51786a){return _0x51786a;});}return null;};}function removeEntity(_0x5b47d3,_0x17bedd){return function(_0x135b88){if(_0x135b88){return _0x135b88[_0x221c('0x25')]()['then'](function(){_0x5b47d3[_0x221c('0x1b')](0xcc)[_0x221c('0x1a')]();});}};}function handleEntityNotFound(_0x5445aa,_0x52a1b0){return function(_0x3afddc){if(!_0x3afddc){_0x5445aa[_0x221c('0x19')](0x194);}return _0x3afddc;};}function handleError(_0x4fc0e3,_0x766a14){_0x766a14=_0x766a14||0x1f4;return function(_0x5b6ae8){logger[_0x221c('0x26')](_0x5b6ae8[_0x221c('0x27')]);if(_0x5b6ae8[_0x221c('0x28')]){delete _0x5b6ae8[_0x221c('0x28')];}_0x4fc0e3[_0x221c('0x1b')](_0x766a14)['send'](_0x5b6ae8);};}exports[_0x221c('0x29')]=function(_0x37b38f,_0x188ea6){var _0x4daa4a={},_0x428110={},_0x21190b={'count':0x0,'rows':[]};var _0x14dc3e=_['map'](db[_0x221c('0x2a')][_0x221c('0x2b')],function(_0x2f9490){return{'name':_0x2f9490[_0x221c('0x2c')],'type':_0x2f9490[_0x221c('0x2d')][_0x221c('0x2e')]};});_0x428110[_0x221c('0x2f')]=_[_0x221c('0x30')](_0x14dc3e,_0x221c('0x28'));_0x428110[_0x221c('0x31')]=_[_0x221c('0x32')](_0x37b38f['query']);_0x428110['filters']=_[_0x221c('0x33')](_0x428110[_0x221c('0x2f')],_0x428110[_0x221c('0x31')]);_0x4daa4a[_0x221c('0x34')]=_[_0x221c('0x33')](_0x428110[_0x221c('0x2f')],qs[_0x221c('0x35')](_0x37b38f[_0x221c('0x31')][_0x221c('0x35')]));_0x4daa4a[_0x221c('0x34')]=_0x4daa4a[_0x221c('0x34')]['length']?_0x4daa4a[_0x221c('0x34')]:_0x428110[_0x221c('0x2f')];if(!_0x37b38f[_0x221c('0x31')]['hasOwnProperty'](_0x221c('0x36'))){_0x4daa4a['limit']=qs[_0x221c('0x1f')](_0x37b38f[_0x221c('0x31')][_0x221c('0x1f')]);_0x4daa4a[_0x221c('0x1d')]=qs['offset'](_0x37b38f[_0x221c('0x31')][_0x221c('0x1d')]);}_0x4daa4a[_0x221c('0x37')]=qs['sort'](_0x37b38f['query'][_0x221c('0x38')]);_0x4daa4a[_0x221c('0x39')]=qs[_0x221c('0x3a')](_[_0x221c('0x3b')](_0x37b38f[_0x221c('0x31')],_0x428110[_0x221c('0x3a')]),_0x14dc3e);if(_0x37b38f[_0x221c('0x31')][_0x221c('0x3c')]){_0x4daa4a[_0x221c('0x39')]=_[_0x221c('0x3d')](_0x4daa4a[_0x221c('0x39')],{'$or':_[_0x221c('0x30')](_0x14dc3e,function(_0x587ae7){if(_0x587ae7[_0x221c('0x2d')]!=='VIRTUAL'){var _0xd59e4f={};_0xd59e4f[_0x587ae7['name']]={'$like':'%'+_0x37b38f[_0x221c('0x31')][_0x221c('0x3c')]+'%'};return _0xd59e4f;}})});}_0x4daa4a=_[_0x221c('0x3d')]({},_0x4daa4a,_0x37b38f['options']);var _0x3c3094={'where':_0x4daa4a['where']};return db['ServicenowAccount'][_0x221c('0x1e')](_0x3c3094)[_0x221c('0x24')](function(_0x2bff3c){_0x21190b['count']=_0x2bff3c;if(_0x37b38f['query'][_0x221c('0x3e')]){_0x4daa4a[_0x221c('0x3f')]=[{'all':!![]}];}return db['ServicenowAccount'][_0x221c('0x40')](_0x4daa4a);})[_0x221c('0x24')](function(_0x29172b){_0x21190b[_0x221c('0x41')]=_0x29172b;return _0x21190b;})[_0x221c('0x24')](respondWithFilteredResult(_0x188ea6,_0x4daa4a))[_0x221c('0x42')](handleError(_0x188ea6,null));};exports[_0x221c('0x43')]=function(_0x12b8c7,_0x1c3bee){var _0x436c93={'raw':![],'where':{'id':_0x12b8c7[_0x221c('0x44')]['id']}},_0x4a2618={};_0x4a2618[_0x221c('0x2f')]=_[_0x221c('0x32')](db[_0x221c('0x2a')]['rawAttributes']);_0x4a2618[_0x221c('0x31')]=_['keys'](_0x12b8c7['query']);_0x4a2618[_0x221c('0x3a')]=_[_0x221c('0x33')](_0x4a2618['model'],_0x4a2618[_0x221c('0x31')]);_0x436c93['attributes']=_[_0x221c('0x33')](_0x4a2618['model'],qs['fields'](_0x12b8c7[_0x221c('0x31')]['fields']));_0x436c93[_0x221c('0x34')]=_0x436c93[_0x221c('0x34')]['length']?_0x436c93[_0x221c('0x34')]:_0x4a2618[_0x221c('0x2f')];if(_0x12b8c7['query'][_0x221c('0x3e')]){_0x436c93[_0x221c('0x3f')]=[{'all':!![]}];}_0x436c93=_[_0x221c('0x3d')]({},_0x436c93,_0x12b8c7[_0x221c('0x45')]);return db['ServicenowAccount']['find'](_0x436c93)[_0x221c('0x24')](handleEntityNotFound(_0x1c3bee,null))['then'](respondWithResult(_0x1c3bee,null))[_0x221c('0x42')](handleError(_0x1c3bee,null));};exports[_0x221c('0x46')]=function(_0x3098dd,_0x33a17f){return db[_0x221c('0x2a')][_0x221c('0x46')](_0x3098dd[_0x221c('0x47')],{})['then'](respondWithResult(_0x33a17f,0xc9))[_0x221c('0x42')](handleError(_0x33a17f,null));};exports[_0x221c('0x23')]=function(_0x258522,_0x16038d){if(_0x258522[_0x221c('0x47')]['id']){delete _0x258522[_0x221c('0x47')]['id'];}return db[_0x221c('0x2a')][_0x221c('0x48')]({'where':{'id':_0x258522[_0x221c('0x44')]['id']}})[_0x221c('0x24')](handleEntityNotFound(_0x16038d,null))[_0x221c('0x24')](saveUpdates(_0x258522['body'],null))[_0x221c('0x24')](respondWithResult(_0x16038d,null))[_0x221c('0x42')](handleError(_0x16038d,null));};exports['destroy']=function(_0x328455,_0xd7c3ba){return db[_0x221c('0x2a')]['find']({'where':{'id':_0x328455[_0x221c('0x44')]['id']}})[_0x221c('0x24')](handleEntityNotFound(_0xd7c3ba,null))[_0x221c('0x24')](removeEntity(_0xd7c3ba,null))[_0x221c('0x42')](handleError(_0xd7c3ba,null));};exports[_0x221c('0x49')]=function(_0x59e206,_0x353171,_0x5869b8){var _0x408060={};var _0x18d96f={};var _0x441147;var _0x545461;return db[_0x221c('0x2a')][_0x221c('0x4a')]({'where':{'id':_0x59e206['params']['id']}})['then'](handleEntityNotFound(_0x353171,null))[_0x221c('0x24')](function(_0x152b99){if(_0x152b99){_0x441147=_0x152b99;_0x18d96f[_0x221c('0x2f')]=_[_0x221c('0x32')](db['ServicenowConfiguration'][_0x221c('0x2b')]);_0x18d96f['query']=_[_0x221c('0x32')](_0x59e206[_0x221c('0x31')]);_0x18d96f[_0x221c('0x3a')]=_['intersection'](_0x18d96f[_0x221c('0x2f')],_0x18d96f[_0x221c('0x31')]);_0x408060['attributes']=_[_0x221c('0x33')](_0x18d96f['model'],qs[_0x221c('0x35')](_0x59e206[_0x221c('0x31')]['fields']));_0x408060[_0x221c('0x34')]=_0x408060['attributes'][_0x221c('0x4b')]?_0x408060[_0x221c('0x34')]:_0x18d96f[_0x221c('0x2f')];_0x408060[_0x221c('0x37')]=qs['sort'](_0x59e206['query'][_0x221c('0x38')]);_0x408060[_0x221c('0x39')]=qs[_0x221c('0x3a')](_[_0x221c('0x3b')](_0x59e206[_0x221c('0x31')],_0x18d96f[_0x221c('0x3a')]));if(_0x59e206[_0x221c('0x31')][_0x221c('0x3c')]){_0x408060[_0x221c('0x39')]=_[_0x221c('0x3d')](_0x408060[_0x221c('0x39')],{'$or':_[_0x221c('0x30')](_0x408060[_0x221c('0x34')],function(_0x4d5860){var _0x48c8e7={};_0x48c8e7[_0x4d5860]={'$like':'%'+_0x59e206[_0x221c('0x31')][_0x221c('0x3c')]+'%'};return _0x48c8e7;})});}_0x408060=_[_0x221c('0x3d')]({},_0x408060,_0x59e206[_0x221c('0x45')]);return _0x441147[_0x221c('0x49')](_0x408060);}})[_0x221c('0x24')](function(_0x1e193a){if(_0x1e193a){_0x545461=_0x1e193a[_0x221c('0x4b')];if(!_0x59e206[_0x221c('0x31')][_0x221c('0x4c')](_0x221c('0x36'))){_0x408060[_0x221c('0x1f')]=qs['limit'](_0x59e206[_0x221c('0x31')]['limit']);_0x408060[_0x221c('0x1d')]=qs[_0x221c('0x1d')](_0x59e206[_0x221c('0x31')][_0x221c('0x1d')]);}return _0x441147[_0x221c('0x49')](_0x408060);}})['then'](function(_0x3477b5){if(_0x3477b5){return _0x3477b5?{'count':_0x545461,'rows':_0x3477b5}:null;}})[_0x221c('0x24')](respondWithResult(_0x353171,null))[_0x221c('0x42')](handleError(_0x353171,null));};exports[_0x221c('0x4d')]=function(_0x57f269,_0x1516b7,_0x5bff3e){if(_0x57f269[_0x221c('0x47')]['id']){delete _0x57f269[_0x221c('0x47')]['id'];}return db[_0x221c('0x2a')]['findOne']({'where':{'id':_0x57f269['params']['id']}})['then'](handleEntityNotFound(_0x1516b7,null))[_0x221c('0x24')](function(_0x47ea57){if(_0x47ea57){_0x57f269[_0x221c('0x47')][_0x221c('0x4e')]=_0x47ea57['id'];_0x57f269['body'][_0x221c('0x4f')]=integrations[_0x221c('0x50')](_0x57f269[_0x221c('0x47')][_0x221c('0x51')],_0x57f269[_0x221c('0x47')][_0x221c('0x2d')]);_0x57f269[_0x221c('0x47')][_0x221c('0x52')]=integrations[_0x221c('0x53')](_0x57f269['body'][_0x221c('0x51')],_0x57f269[_0x221c('0x47')][_0x221c('0x2d')]);return db[_0x221c('0x54')][_0x221c('0x46')](_0x57f269['body'],{'include':[{'model':db[_0x221c('0x55')],'as':'Subjects'},{'model':db[_0x221c('0x55')],'as':_0x221c('0x52')}]});}return null;})[_0x221c('0x24')](respondWithResult(_0x1516b7,null))[_0x221c('0x42')](handleError(_0x1516b7,null));};exports[_0x221c('0x56')]=function(_0x290513,_0x458584,_0x174568){var _0x42780e=['made_sla','hold_reason','knowledge',_0x221c('0x57'),'close_code',_0x221c('0x58'),_0x221c('0x59'),_0x221c('0x5a'),_0x221c('0x5b')];var _0xe75baa=[_0x221c('0x5c'),_0x221c('0x5d'),_0x221c('0x5e'),_0x221c('0x5f'),'upon_reject',_0x221c('0x60'),_0x221c('0x61'),_0x221c('0x62'),'approval_history',_0x221c('0x63'),_0x221c('0x64'),'sys_updated_by',_0x221c('0x65'),_0x221c('0x66'),_0x221c('0x67'),_0x221c('0x68'),_0x221c('0x69'),_0x221c('0x6a'),_0x221c('0x6b'),_0x221c('0x37'),_0x221c('0x6c'),_0x221c('0x6d'),_0x221c('0x6e'),_0x221c('0x6f'),'impact',_0x221c('0x70'),_0x221c('0x71'),_0x221c('0x72'),_0x221c('0x73'),_0x221c('0x74'),_0x221c('0x75'),'time_worked',_0x221c('0x76'),_0x221c('0x77'),_0x221c('0x78'),_0x221c('0x79'),_0x221c('0x7a'),'reopened_time','resolved_at','caller_id',_0x221c('0x7b'),_0x221c('0x57'),'work_notes','short_description',_0x221c('0x7c'),_0x221c('0x7d'),'delivery_task','work_start',_0x221c('0x7e'),_0x221c('0x7f'),'additional_assignee_list','description',_0x221c('0x80'),_0x221c('0x58'),_0x221c('0x81'),_0x221c('0x82'),_0x221c('0x83'),'follow_up',_0x221c('0x84'),_0x221c('0x85'),'contact_type',_0x221c('0x86'),_0x221c('0x59'),_0x221c('0x87'),_0x221c('0x88'),_0x221c('0x89'),_0x221c('0x8a'),_0x221c('0x8b'),_0x221c('0x8c'),_0x221c('0x5a'),_0x221c('0x8d'),_0x221c('0x8e'),_0x221c('0x8f'),_0x221c('0x90'),_0x221c('0x91'),_0x221c('0x92'),_0x221c('0x93'),_0x221c('0x94'),_0x221c('0x95'),_0x221c('0x96'),_0x221c('0x97'),'location',_0x221c('0x5b')];var _0x2d39b7='';var _0x3d22e0='';var _0x5bb709=[];var _0x347596='';var _0x2a03e7='';var _0x22a48f=[];var _0x375290='';var _0x187f12='';var _0x15f7b6={};var _0xc036ea='';return db[_0x221c('0x2a')]['findOne']({'where':{'id':_0x290513[_0x221c('0x44')]['id']},'attributes':['id','username',_0x221c('0x98'),'email',_0x221c('0x99'),_0x221c('0x9a')]})['then'](handleEntityNotFound(_0x458584,null))[_0x221c('0x24')](function(_0x289d97){if(_0x289d97){_0xc036ea=_0x289d97[_0x221c('0x99')];var _0x1e3249=_0xc036ea[_0x221c('0x9b')](-0x1);if(_0x1e3249==='/'){_0xc036ea=_0xc036ea[_0x221c('0x9c')](0x0,_0xc036ea['lastIndexOf'](_0x1e3249));}_0x187f12=util[_0x221c('0x9d')](_0x221c('0x9e'),_0xc036ea);_0x375290=util[_0x221c('0x9d')](_0x221c('0x9f'),_0xc036ea);_0x15f7b6={'user':_0x289d97[_0x221c('0xa0')],'pass':_0x289d97[_0x221c('0x98')]};var _0x591e63={'method':'GET','uri':_0x187f12+_0x221c('0xa1'),'auth':_0x15f7b6,'json':!![]};return rp(_0x591e63);}})[_0x221c('0x24')](function(_0x45dcb2){if(_0x45dcb2['result'][_0x221c('0x4b')]>0x0){_0x2d39b7=_0x45dcb2[_0x221c('0xa2')];}console['log'](_0x221c('0xa3'),_0x2d39b7);_0x22a48f=[];_0x3d22e0=Object[_0x221c('0xa4')]([],_0x2d39b7);_[_0x221c('0xa5')](_0x3d22e0,function(_0x72ee8a){return!_0x42780e['includes'](_0x72ee8a[_0x221c('0x28')]);});_0x3d22e0[_0x221c('0xa6')](function(_0x2d8495){var _0x1e8404=createFieldObject(_0x375290,_0x15f7b6,_0x2d8495[_0x221c('0xa7')],_0x2d8495[_0x221c('0x28')],_0x2d8495[_0x221c('0xa8')],![]);_0x22a48f[_0x221c('0xa9')](_0x1e8404);});return Promise[_0x221c('0xaa')](_0x22a48f);})[_0x221c('0x24')](function(_0x14c9fe){_0x5bb709=_0x14c9fe;_0x347596=Object[_0x221c('0xa4')]([],_0x2d39b7);console['log']('TCL:\x20_object',_0x2d39b7);_[_0x221c('0xa5')](_0x347596,function(_0x471afc){return _0xe75baa[_0x221c('0xab')](_0x471afc[_0x221c('0x28')]);});console['log'](_0x221c('0xac'),_0x347596);_0x22a48f=[];_0x347596[_0x221c('0xa6')](function(_0x6af12f){var _0x337251=createFieldObject(_0x375290,_0x15f7b6,_0x6af12f[_0x221c('0xa7')],_0x6af12f[_0x221c('0x28')],_0x6af12f[_0x221c('0xa8')],!![]);_0x22a48f[_0x221c('0xa9')](_0x337251);});return Promise['all'](_0x22a48f);})['then'](function(_0x191a26){_0x2a03e7=_0x191a26;var _0x596697=_0x5bb709[_0x221c('0xad')](_0x2a03e7);return{'count':_0x596697['length'],'rows':_0x596697};})[_0x221c('0x24')](respondWithResult(_0x458584,null))[_0x221c('0x42')](function(_0x3a1589){console[_0x221c('0xae')](_0x221c('0xaf')+_0x3a1589);var _0x4be797=_0x290513[_0x221c('0x31')][_0x221c('0xb0')]?0x1f4:_0x3a1589[_0x221c('0xb1')]||0x1f4;logger[_0x221c('0x26')](_0x3a1589[_0x221c('0x27')]);delete _0x3a1589[_0x221c('0x28')];if(_0x4be797===0x191){_0x4be797=0x190;}_0x458584[_0x221c('0x1b')](_0x4be797)['send'](_0x290513[_0x221c('0x31')][_0x221c('0xb0')]?{'message':'Wrong\x20credentials','statusCode':_0x3a1589[_0x221c('0xb1')]}:_0x3a1589);});};function createFieldObject(_0x2f71ba,_0x444a6a,_0x3ade48,_0x3c381e,_0x429c7b,_0x2080d4){return new Promise(function(_0x78889c,_0x1b4e32){var _0x297bf9={'id':_0x3c381e,'name':_0x429c7b,'custom':_0x2080d4};if(_0x3ade48===_0x221c('0xb2')){_0x297bf9['options']=[{'name':_0x221c('0xb3'),'value':'true'},{'name':_0x221c('0xb4'),'value':_0x221c('0xb5')}];_0x78889c(_0x297bf9);}else{var _0x59b92c={'method':_0x221c('0xb6'),'uri':_0x2f71ba+_0x221c('0xb7')+_0x3c381e,'auth':_0x444a6a,'json':!![]};return rp(_0x59b92c)[_0x221c('0x24')](function(_0x19d862){var _0x2f85da=[];if(_0x19d862[_0x221c('0xa2')][_0x221c('0x4b')]>0x0){_0x19d862[_0x221c('0xa2')]['forEach'](function(_0x48309d){if(_0x48309d[_0x221c('0xb8')]==='false'){var _0x51eb5a={'name':_0x48309d[_0x221c('0xa8')],'value':_0x48309d[_0x221c('0xb9')]};_0x2f85da[_0x221c('0xa9')](_0x51eb5a);}});}_0x297bf9[_0x221c('0x45')]=_0x2f85da;if(_0x297bf9['options'][_0x221c('0x4b')]>0x0){_0x78889c(_0x297bf9);}else{if(_0x2080d4==![]){_0x78889c();}else{_0x78889c(_0x297bf9);}}});}});}
\ No newline at end of file
+var _0x4793=['find','create','body','params','getConfigurations','findOne','pick','nolimit','addConfiguration','AccountId','Subjects','getSubjects','Descriptions','getDescriptions','channel','ServicenowField','getFields','made_sla','hold_reason','knowledge','subcategory','close_code','category','parent','caused_by','watch_list','upon_reject','child_incidents','number','opened_by','user_input','sys_created_on','sys_domain','state','sys_created_by','calendar_stc','cmdb_ci','delivery_plan','impact','active','business_service','priority','sys_domain_path','rfc','time_worked','expected_start','opened_at','business_duration','reopened_time','resolved_at','caller_id','work_notes','correlation_display','work_start','assignment_group','business_stc','additional_assignee_list','notify','sys_class_name','close_notes','closed_by','follow_up','parent_incident','sys_id','contact_type','reopened_by','incident_state','problem_id','reassignment_count','assigned_to','severity','sla_due','approval','comments_and_work_notes','due_date','sys_mod_count','reopen_count','sys_tags','escalation','upon_approval','correlation_id','location','username','password','email','remoteUri','serverUrl','slice','substring','lastIndexOf','format','%s/api/now/doc/table/schema/','%s/api/now/table/','GET','incident?sysparm_display_value=all','result','log','assign','remove','includes','forEach','label','push','all','internalType','concat','test','statusCode','error','Wrong\x20credentials','boolean','True','true','False','false','value','eml-format','rimraf','zip-dir','bluebird','mustache','util','path','to-csv','ejs','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','limit','undefined','offset','count','set','Content-Range','apply','reject','save','update','then','destroy','sendStatus','stack','name','send','index','fieldName','key','map','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','where','filter','merge','type','VIRTUAL','options','ServicenowAccount','catch','show','rawAttributes','includeAll','include'];(function(_0x5df9e9,_0xc5717f){var _0x55a6ae=function(_0x3f4b2b){while(--_0x3f4b2b){_0x5df9e9['push'](_0x5df9e9['shift']());}};_0x55a6ae(++_0xc5717f);}(_0x4793,0x1e6));var _0x3479=function(_0x2e9ce5,_0x156a53){_0x2e9ce5=_0x2e9ce5-0x0;var _0x2f2e01=_0x4793[_0x2e9ce5];return _0x2f2e01;};'use strict';var emlformat=require(_0x3479('0x0'));var rimraf=require(_0x3479('0x1'));var zipdir=require(_0x3479('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x3479('0x3'));var Mustache=require(_0x3479('0x4'));var util=require(_0x3479('0x5'));var path=require(_0x3479('0x6'));var sox=require('sox');var csv=require(_0x3479('0x7'));var ejs=require(_0x3479('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x3479('0x9'));var crypto=require('crypto');var jsforce=require(_0x3479('0xa'));var deskjs=require(_0x3479('0xb'));var toCsv=require('to-csv');var querystring=require(_0x3479('0xc'));var Papa=require(_0x3479('0xd'));var Redis=require(_0x3479('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x3479('0xf'));var as=require(_0x3479('0x10'));var hardwareService=require(_0x3479('0x11'));var logger=require('../../config/logger')(_0x3479('0x12'));var utils=require(_0x3479('0x13'));var config=require(_0x3479('0x14'));var licenseUtil=require(_0x3479('0x15'));var db=require(_0x3479('0x16'))['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x5052a5,_0x55258a){_0x55258a=_0x55258a||0xcc;return function(_0x4fbf42){if(_0x4fbf42){return _0x5052a5['sendStatus'](_0x55258a);}return _0x5052a5[_0x3479('0x17')](_0x55258a)[_0x3479('0x18')]();};}function respondWithResult(_0x1ad86b,_0x260690){_0x260690=_0x260690||0xc8;return function(_0x204b3e){if(_0x204b3e){return _0x1ad86b[_0x3479('0x17')](_0x260690)[_0x3479('0x19')](_0x204b3e);}};}function respondWithFilteredResult(_0x1c81c6,_0x1782be){return function(_0x57a831){if(_0x57a831){var _0x3f170f=typeof _0x1782be['offset']==='undefined'&&typeof _0x1782be[_0x3479('0x1a')]===_0x3479('0x1b');var _0xe26601=_0x57a831['count'];var _0x1f4dbc=_0x3f170f?0x0:_0x1782be[_0x3479('0x1c')];var _0x5e3bec=_0x3f170f?_0x57a831[_0x3479('0x1d')]:_0x1782be['offset']+_0x1782be[_0x3479('0x1a')];var _0x4eed89;if(_0x5e3bec>=_0xe26601){_0x5e3bec=_0xe26601;_0x4eed89=0xc8;}else{_0x4eed89=0xce;}_0x1c81c6['status'](_0x4eed89);return _0x1c81c6[_0x3479('0x1e')](_0x3479('0x1f'),_0x1f4dbc+'-'+_0x5e3bec+'/'+_0xe26601)['json'](_0x57a831);}return null;};}function patchUpdates(_0x2328f6){return function(_0x224a09){try{jsonpatch[_0x3479('0x20')](_0x224a09,_0x2328f6,!![]);}catch(_0xc157cb){return BPromise[_0x3479('0x21')](_0xc157cb);}return _0x224a09[_0x3479('0x22')]();};}function saveUpdates(_0x3b05b0,_0x65696f){return function(_0x37238a){if(_0x37238a){return _0x37238a[_0x3479('0x23')](_0x3b05b0)[_0x3479('0x24')](function(_0x348963){return _0x348963;});}return null;};}function removeEntity(_0x51ac71,_0x43f9ea){return function(_0x202982){if(_0x202982){return _0x202982[_0x3479('0x25')]()[_0x3479('0x24')](function(){_0x51ac71['status'](0xcc)[_0x3479('0x18')]();});}};}function handleEntityNotFound(_0x534f1c,_0x2d9afe){return function(_0x31f2a3){if(!_0x31f2a3){_0x534f1c[_0x3479('0x26')](0x194);}return _0x31f2a3;};}function handleError(_0x4ad232,_0x30ba9e){_0x30ba9e=_0x30ba9e||0x1f4;return function(_0x202134){logger['error'](_0x202134[_0x3479('0x27')]);if(_0x202134[_0x3479('0x28')]){delete _0x202134['name'];}_0x4ad232[_0x3479('0x17')](_0x30ba9e)[_0x3479('0x29')](_0x202134);};}exports[_0x3479('0x2a')]=function(_0x24694e,_0x192204){var _0xcf8070={},_0x4173d9={},_0x370da1={'count':0x0,'rows':[]};var _0x10f39b=_['map'](db['ServicenowAccount']['rawAttributes'],function(_0x1baa96){return{'name':_0x1baa96[_0x3479('0x2b')],'type':_0x1baa96['type'][_0x3479('0x2c')]};});_0x4173d9['model']=_[_0x3479('0x2d')](_0x10f39b,_0x3479('0x28'));_0x4173d9[_0x3479('0x2e')]=_[_0x3479('0x2f')](_0x24694e[_0x3479('0x2e')]);_0x4173d9[_0x3479('0x30')]=_[_0x3479('0x31')](_0x4173d9[_0x3479('0x32')],_0x4173d9[_0x3479('0x2e')]);_0xcf8070[_0x3479('0x33')]=_[_0x3479('0x31')](_0x4173d9[_0x3479('0x32')],qs[_0x3479('0x34')](_0x24694e[_0x3479('0x2e')]['fields']));_0xcf8070[_0x3479('0x33')]=_0xcf8070[_0x3479('0x33')][_0x3479('0x35')]?_0xcf8070[_0x3479('0x33')]:_0x4173d9[_0x3479('0x32')];if(!_0x24694e[_0x3479('0x2e')][_0x3479('0x36')]('nolimit')){_0xcf8070['limit']=qs[_0x3479('0x1a')](_0x24694e['query'][_0x3479('0x1a')]);_0xcf8070['offset']=qs[_0x3479('0x1c')](_0x24694e[_0x3479('0x2e')][_0x3479('0x1c')]);}_0xcf8070[_0x3479('0x37')]=qs[_0x3479('0x38')](_0x24694e[_0x3479('0x2e')]['sort']);_0xcf8070[_0x3479('0x39')]=qs[_0x3479('0x30')](_['pick'](_0x24694e[_0x3479('0x2e')],_0x4173d9[_0x3479('0x30')]),_0x10f39b);if(_0x24694e['query'][_0x3479('0x3a')]){_0xcf8070[_0x3479('0x39')]=_[_0x3479('0x3b')](_0xcf8070[_0x3479('0x39')],{'$or':_[_0x3479('0x2d')](_0x10f39b,function(_0x1d2fc5){if(_0x1d2fc5[_0x3479('0x3c')]!==_0x3479('0x3d')){var _0x3a737c={};_0x3a737c[_0x1d2fc5[_0x3479('0x28')]]={'$like':'%'+_0x24694e[_0x3479('0x2e')][_0x3479('0x3a')]+'%'};return _0x3a737c;}})});}_0xcf8070=_[_0x3479('0x3b')]({},_0xcf8070,_0x24694e[_0x3479('0x3e')]);var _0x4df333={'where':_0xcf8070['where']};return db[_0x3479('0x3f')][_0x3479('0x1d')](_0x4df333)[_0x3479('0x24')](function(_0x294f5b){_0x370da1[_0x3479('0x1d')]=_0x294f5b;if(_0x24694e[_0x3479('0x2e')]['includeAll']){_0xcf8070['include']=[{'all':!![]}];}return db[_0x3479('0x3f')]['findAll'](_0xcf8070);})[_0x3479('0x24')](function(_0x438cca){_0x370da1['rows']=_0x438cca;return _0x370da1;})[_0x3479('0x24')](respondWithFilteredResult(_0x192204,_0xcf8070))[_0x3479('0x40')](handleError(_0x192204,null));};exports[_0x3479('0x41')]=function(_0x4eefb2,_0x4966a7){var _0x381705={'raw':![],'where':{'id':_0x4eefb2['params']['id']}},_0xe37af0={};_0xe37af0['model']=_[_0x3479('0x2f')](db[_0x3479('0x3f')][_0x3479('0x42')]);_0xe37af0['query']=_[_0x3479('0x2f')](_0x4eefb2['query']);_0xe37af0[_0x3479('0x30')]=_[_0x3479('0x31')](_0xe37af0['model'],_0xe37af0[_0x3479('0x2e')]);_0x381705[_0x3479('0x33')]=_[_0x3479('0x31')](_0xe37af0[_0x3479('0x32')],qs[_0x3479('0x34')](_0x4eefb2['query'][_0x3479('0x34')]));_0x381705[_0x3479('0x33')]=_0x381705['attributes'][_0x3479('0x35')]?_0x381705['attributes']:_0xe37af0[_0x3479('0x32')];if(_0x4eefb2[_0x3479('0x2e')][_0x3479('0x43')]){_0x381705[_0x3479('0x44')]=[{'all':!![]}];}_0x381705=_[_0x3479('0x3b')]({},_0x381705,_0x4eefb2[_0x3479('0x3e')]);return db[_0x3479('0x3f')][_0x3479('0x45')](_0x381705)[_0x3479('0x24')](handleEntityNotFound(_0x4966a7,null))[_0x3479('0x24')](respondWithResult(_0x4966a7,null))[_0x3479('0x40')](handleError(_0x4966a7,null));};exports[_0x3479('0x46')]=function(_0x53238d,_0x2064e8){return db[_0x3479('0x3f')][_0x3479('0x46')](_0x53238d[_0x3479('0x47')],{})[_0x3479('0x24')](respondWithResult(_0x2064e8,0xc9))[_0x3479('0x40')](handleError(_0x2064e8,null));};exports[_0x3479('0x23')]=function(_0x559bd8,_0x306cb9){if(_0x559bd8[_0x3479('0x47')]['id']){delete _0x559bd8[_0x3479('0x47')]['id'];}return db[_0x3479('0x3f')][_0x3479('0x45')]({'where':{'id':_0x559bd8[_0x3479('0x48')]['id']}})[_0x3479('0x24')](handleEntityNotFound(_0x306cb9,null))['then'](saveUpdates(_0x559bd8['body'],null))[_0x3479('0x24')](respondWithResult(_0x306cb9,null))[_0x3479('0x40')](handleError(_0x306cb9,null));};exports[_0x3479('0x25')]=function(_0x1daa4b,_0x3b58a1){return db[_0x3479('0x3f')][_0x3479('0x45')]({'where':{'id':_0x1daa4b[_0x3479('0x48')]['id']}})['then'](handleEntityNotFound(_0x3b58a1,null))[_0x3479('0x24')](removeEntity(_0x3b58a1,null))[_0x3479('0x40')](handleError(_0x3b58a1,null));};exports[_0x3479('0x49')]=function(_0x376108,_0x5a27d1,_0x5b7e8b){var _0x1e8327={};var _0x47cc22={};var _0x3e6eb6;var _0x47e4de;return db[_0x3479('0x3f')][_0x3479('0x4a')]({'where':{'id':_0x376108[_0x3479('0x48')]['id']}})[_0x3479('0x24')](handleEntityNotFound(_0x5a27d1,null))[_0x3479('0x24')](function(_0x49c2e7){if(_0x49c2e7){_0x3e6eb6=_0x49c2e7;_0x47cc22['model']=_[_0x3479('0x2f')](db['ServicenowConfiguration'][_0x3479('0x42')]);_0x47cc22[_0x3479('0x2e')]=_[_0x3479('0x2f')](_0x376108[_0x3479('0x2e')]);_0x47cc22[_0x3479('0x30')]=_[_0x3479('0x31')](_0x47cc22[_0x3479('0x32')],_0x47cc22['query']);_0x1e8327[_0x3479('0x33')]=_[_0x3479('0x31')](_0x47cc22[_0x3479('0x32')],qs[_0x3479('0x34')](_0x376108[_0x3479('0x2e')][_0x3479('0x34')]));_0x1e8327['attributes']=_0x1e8327[_0x3479('0x33')]['length']?_0x1e8327[_0x3479('0x33')]:_0x47cc22['model'];_0x1e8327['order']=qs[_0x3479('0x38')](_0x376108[_0x3479('0x2e')][_0x3479('0x38')]);_0x1e8327[_0x3479('0x39')]=qs[_0x3479('0x30')](_[_0x3479('0x4b')](_0x376108[_0x3479('0x2e')],_0x47cc22[_0x3479('0x30')]));if(_0x376108[_0x3479('0x2e')]['filter']){_0x1e8327[_0x3479('0x39')]=_['merge'](_0x1e8327[_0x3479('0x39')],{'$or':_[_0x3479('0x2d')](_0x1e8327[_0x3479('0x33')],function(_0x3d9a0d){var _0x41a923={};_0x41a923[_0x3d9a0d]={'$like':'%'+_0x376108[_0x3479('0x2e')][_0x3479('0x3a')]+'%'};return _0x41a923;})});}_0x1e8327=_[_0x3479('0x3b')]({},_0x1e8327,_0x376108[_0x3479('0x3e')]);return _0x3e6eb6[_0x3479('0x49')](_0x1e8327);}})['then'](function(_0x56780f){if(_0x56780f){_0x47e4de=_0x56780f[_0x3479('0x35')];if(!_0x376108['query'][_0x3479('0x36')](_0x3479('0x4c'))){_0x1e8327[_0x3479('0x1a')]=qs['limit'](_0x376108[_0x3479('0x2e')][_0x3479('0x1a')]);_0x1e8327['offset']=qs['offset'](_0x376108[_0x3479('0x2e')]['offset']);}return _0x3e6eb6['getConfigurations'](_0x1e8327);}})['then'](function(_0x48dc6d){if(_0x48dc6d){return _0x48dc6d?{'count':_0x47e4de,'rows':_0x48dc6d}:null;}})[_0x3479('0x24')](respondWithResult(_0x5a27d1,null))['catch'](handleError(_0x5a27d1,null));};exports[_0x3479('0x4d')]=function(_0x5ef8f0,_0x1d9277,_0x49e1c1){if(_0x5ef8f0[_0x3479('0x47')]['id']){delete _0x5ef8f0[_0x3479('0x47')]['id'];}return db['ServicenowAccount'][_0x3479('0x4a')]({'where':{'id':_0x5ef8f0[_0x3479('0x48')]['id']}})[_0x3479('0x24')](handleEntityNotFound(_0x1d9277,null))[_0x3479('0x24')](function(_0x1980ce){if(_0x1980ce){_0x5ef8f0[_0x3479('0x47')][_0x3479('0x4e')]=_0x1980ce['id'];_0x5ef8f0[_0x3479('0x47')][_0x3479('0x4f')]=integrations[_0x3479('0x50')](_0x5ef8f0['body']['channel'],_0x5ef8f0[_0x3479('0x47')][_0x3479('0x3c')]);_0x5ef8f0[_0x3479('0x47')][_0x3479('0x51')]=integrations[_0x3479('0x52')](_0x5ef8f0[_0x3479('0x47')][_0x3479('0x53')],_0x5ef8f0[_0x3479('0x47')][_0x3479('0x3c')]);return db['ServicenowConfiguration'][_0x3479('0x46')](_0x5ef8f0[_0x3479('0x47')],{'include':[{'model':db[_0x3479('0x54')],'as':_0x3479('0x4f')},{'model':db[_0x3479('0x54')],'as':_0x3479('0x51')}]});}return null;})[_0x3479('0x24')](respondWithResult(_0x1d9277,null))[_0x3479('0x40')](handleError(_0x1d9277,null));};exports[_0x3479('0x55')]=function(_0x4051b7,_0xdd88d2,_0x5cb8c7){var _0x51229a=[_0x3479('0x56'),_0x3479('0x57'),_0x3479('0x58'),_0x3479('0x59'),_0x3479('0x5a'),'notify','incident_state','severity',_0x3479('0x5b')];var _0x247743=[_0x3479('0x5c'),'made_sla',_0x3479('0x5d'),_0x3479('0x5e'),_0x3479('0x5f'),'sys_updated_on',_0x3479('0x60'),_0x3479('0x57'),'approval_history',_0x3479('0x61'),'resolved_by','sys_updated_by',_0x3479('0x62'),_0x3479('0x63'),_0x3479('0x64'),_0x3479('0x65'),_0x3479('0x66'),_0x3479('0x67'),_0x3479('0x58'),'order',_0x3479('0x68'),'closed_at',_0x3479('0x69'),_0x3479('0x6a'),_0x3479('0x6b'),_0x3479('0x6c'),'work_notes_list',_0x3479('0x6d'),_0x3479('0x6e'),_0x3479('0x6f'),_0x3479('0x70'),_0x3479('0x71'),_0x3479('0x72'),_0x3479('0x73'),_0x3479('0x74'),'group_list','work_end',_0x3479('0x75'),_0x3479('0x76'),_0x3479('0x77'),'approval_set','subcategory',_0x3479('0x78'),'short_description',_0x3479('0x5a'),_0x3479('0x79'),'delivery_task',_0x3479('0x7a'),_0x3479('0x7b'),_0x3479('0x7c'),_0x3479('0x7d'),'description','calendar_duration',_0x3479('0x7e'),_0x3479('0x7f'),_0x3479('0x80'),_0x3479('0x81'),_0x3479('0x82'),_0x3479('0x83'),_0x3479('0x84'),_0x3479('0x85'),_0x3479('0x86'),_0x3479('0x87'),'urgency',_0x3479('0x88'),'company',_0x3479('0x89'),'activity_due',_0x3479('0x8a'),_0x3479('0x8b'),'comments',_0x3479('0x8c'),_0x3479('0x8d'),_0x3479('0x8e'),_0x3479('0x8f'),_0x3479('0x90'),_0x3479('0x91'),_0x3479('0x92'),_0x3479('0x93'),_0x3479('0x94'),_0x3479('0x95'),_0x3479('0x96'),'category'];var _0x4d50d6='';var _0x57e0d1='';var _0x48c16b=[];var _0x168c1d='';var _0x3c88bd='';var _0x3ba86b=[];var _0x48aed9='';var _0x1b5f4b='';var _0x3da9b1={};var _0x11839f='';return db[_0x3479('0x3f')][_0x3479('0x4a')]({'where':{'id':_0x4051b7['params']['id']},'attributes':['id',_0x3479('0x97'),_0x3479('0x98'),_0x3479('0x99'),_0x3479('0x9a'),_0x3479('0x9b')]})[_0x3479('0x24')](handleEntityNotFound(_0xdd88d2,null))[_0x3479('0x24')](function(_0x230515){if(_0x230515){_0x11839f=_0x230515[_0x3479('0x9a')];var _0xfae213=_0x11839f[_0x3479('0x9c')](-0x1);if(_0xfae213==='/'){_0x11839f=_0x11839f[_0x3479('0x9d')](0x0,_0x11839f[_0x3479('0x9e')](_0xfae213));}_0x1b5f4b=util[_0x3479('0x9f')](_0x3479('0xa0'),_0x11839f);_0x48aed9=util[_0x3479('0x9f')](_0x3479('0xa1'),_0x11839f);_0x3da9b1={'user':_0x230515[_0x3479('0x97')],'pass':_0x230515[_0x3479('0x98')]};var _0x12f3dc={'method':_0x3479('0xa2'),'uri':_0x1b5f4b+_0x3479('0xa3'),'auth':_0x3da9b1,'json':!![]};return rp(_0x12f3dc);}})['then'](function(_0x1f8b73){if(_0x1f8b73[_0x3479('0xa4')][_0x3479('0x35')]>0x0){_0x4d50d6=_0x1f8b73[_0x3479('0xa4')];}console[_0x3479('0xa5')]('incident\x20table\x20objects',_0x4d50d6);_0x3ba86b=[];_0x57e0d1=Object[_0x3479('0xa6')]([],_0x4d50d6);_[_0x3479('0xa7')](_0x57e0d1,function(_0x22a163){return!_0x51229a[_0x3479('0xa8')](_0x22a163['name']);});_0x57e0d1[_0x3479('0xa9')](function(_0x1d06e4){var _0x43a6e8=createFieldObject(_0x48aed9,_0x3da9b1,_0x1d06e4['internalType'],_0x1d06e4['name'],_0x1d06e4[_0x3479('0xaa')],![]);_0x3ba86b[_0x3479('0xab')](_0x43a6e8);});return Promise[_0x3479('0xac')](_0x3ba86b);})[_0x3479('0x24')](function(_0x428111){_0x48c16b=_0x428111;_0x168c1d=Object[_0x3479('0xa6')]([],_0x4d50d6);console['log']('TCL:\x20_object',_0x4d50d6);_[_0x3479('0xa7')](_0x168c1d,function(_0x120958){return _0x247743[_0x3479('0xa8')](_0x120958[_0x3479('0x28')]);});console[_0x3479('0xa5')]('TCL:\x20exports.getEntityFields\x20->\x20_objectsCustom',_0x168c1d);_0x3ba86b=[];_0x168c1d[_0x3479('0xa9')](function(_0x27f03b){var _0xac27a=createFieldObject(_0x48aed9,_0x3da9b1,_0x27f03b[_0x3479('0xad')],_0x27f03b[_0x3479('0x28')],_0x27f03b[_0x3479('0xaa')],!![]);_0x3ba86b['push'](_0xac27a);});return Promise[_0x3479('0xac')](_0x3ba86b);})['then'](function(_0x3bf418){_0x3c88bd=_0x3bf418;var _0x41bf60=_0x48c16b[_0x3479('0xae')](_0x3c88bd);return{'count':_0x41bf60[_0x3479('0x35')],'rows':_0x41bf60};})[_0x3479('0x24')](respondWithResult(_0xdd88d2,null))['catch'](function(_0x37e97a){console[_0x3479('0xa5')]('ServiceNow\x20error:\x20'+_0x37e97a);var _0x5706a2=_0x4051b7[_0x3479('0x2e')][_0x3479('0xaf')]?0x1f4:_0x37e97a[_0x3479('0xb0')]||0x1f4;logger[_0x3479('0xb1')](_0x37e97a[_0x3479('0x27')]);delete _0x37e97a[_0x3479('0x28')];if(_0x5706a2===0x191){_0x5706a2=0x190;}_0xdd88d2['status'](_0x5706a2)['send'](_0x4051b7[_0x3479('0x2e')][_0x3479('0xaf')]?{'message':_0x3479('0xb2'),'statusCode':_0x37e97a['statusCode']}:_0x37e97a);});};function createFieldObject(_0x53cd7e,_0x5e002d,_0x37fa40,_0x3435b1,_0x25c86a,_0x3cca9f){return new Promise(function(_0x9f0aa,_0x4db016){var _0x52503b={'id':_0x3435b1,'name':_0x25c86a,'custom':_0x3cca9f};if(_0x37fa40===_0x3479('0xb3')){_0x52503b[_0x3479('0x3e')]=[{'name':_0x3479('0xb4'),'value':_0x3479('0xb5')},{'name':_0x3479('0xb6'),'value':_0x3479('0xb7')}];_0x9f0aa(_0x52503b);}else{var _0xe3f8c6={'method':_0x3479('0xa2'),'uri':_0x53cd7e+'sys_choice?sysparm_query=name=incident^element='+_0x3435b1,'auth':_0x5e002d,'json':!![]};return rp(_0xe3f8c6)[_0x3479('0x24')](function(_0xb103b4){var _0x23c142=[];if(_0xb103b4[_0x3479('0xa4')][_0x3479('0x35')]>0x0){_0xb103b4[_0x3479('0xa4')][_0x3479('0xa9')](function(_0x299af6){if(_0x299af6['inactive']===_0x3479('0xb7')){var _0x4d64ef={'name':_0x299af6[_0x3479('0xaa')],'value':_0x299af6[_0x3479('0xb8')]};_0x23c142[_0x3479('0xab')](_0x4d64ef);}});}_0x52503b[_0x3479('0x3e')]=_0x23c142;if(_0x52503b['options']['length']>0x0){_0x9f0aa(_0x52503b);}else{if(_0x3cca9f==![]){_0x9f0aa();}else{_0x9f0aa(_0x52503b);}}});}});}
\ No newline at end of file
index 0468ec4..1ae97e8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb4c7=['moment','request-promise','path','rimraf','../../config/environment','./intServicenowAccount.attributes','exports','ServicenowAccount','int_servicenow_accounts','lodash','util','../../config/logger','api'];(function(_0x5264cf,_0x27f100){var _0x2324da=function(_0x164310){while(--_0x164310){_0x5264cf['push'](_0x5264cf['shift']());}};_0x2324da(++_0x27f100);}(_0xb4c7,0x1ea));var _0x7b4c=function(_0x583f7b,_0x164833){_0x583f7b=_0x583f7b-0x0;var _0x170859=_0xb4c7[_0x583f7b];return _0x170859;};'use strict';var _=require(_0x7b4c('0x0'));var util=require(_0x7b4c('0x1'));var logger=require(_0x7b4c('0x2'))(_0x7b4c('0x3'));var moment=require(_0x7b4c('0x4'));var BPromise=require('bluebird');var rp=require(_0x7b4c('0x5'));var fs=require('fs');var path=require(_0x7b4c('0x6'));var rimraf=require(_0x7b4c('0x7'));var config=require(_0x7b4c('0x8'));var attributes=require(_0x7b4c('0x9'));var integrations=require('../../components/integrations/configuration');module[_0x7b4c('0xa')]=function(_0x10e197,_0x2dd5c7){return _0x10e197['define'](_0x7b4c('0xb'),attributes,{'tableName':_0x7b4c('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4975=['path','rimraf','../../config/environment','./intServicenowAccount.attributes','../../components/integrations/configuration','define','ServicenowAccount','int_servicenow_accounts','lodash','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x12105a,_0x59fada){var _0x34c70d=function(_0x618b5e){while(--_0x618b5e){_0x12105a['push'](_0x12105a['shift']());}};_0x34c70d(++_0x59fada);}(_0x4975,0x86));var _0x5497=function(_0x295a4e,_0x170c47){_0x295a4e=_0x295a4e-0x0;var _0x3a80e6=_0x4975[_0x295a4e];return _0x3a80e6;};'use strict';var _=require(_0x5497('0x0'));var util=require('util');var logger=require(_0x5497('0x1'))(_0x5497('0x2'));var moment=require(_0x5497('0x3'));var BPromise=require(_0x5497('0x4'));var rp=require(_0x5497('0x5'));var fs=require('fs');var path=require(_0x5497('0x6'));var rimraf=require(_0x5497('0x7'));var config=require(_0x5497('0x8'));var attributes=require(_0x5497('0x9'));var integrations=require(_0x5497('0xa'));module['exports']=function(_0x37e48d,_0x4f563d){return _0x37e48d[_0x5497('0xb')](_0x5497('0xc'),attributes,{'tableName':_0x5497('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 96f855d..58f3788 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x30ee=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','request','then','ServicenowAccount,\x20%s,\x20%s','request\x20sent','debug','ServicenowAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','GetServicenowAccount','findAll','options','raw','attributes','limit','include','map','model','ShowServicenowAccount','ServicenowAccount','find','where','util','moment','bluebird'];(function(_0x440272,_0xf9fab1){var _0x44fcb3=function(_0x558c1b){while(--_0x558c1b){_0x440272['push'](_0x440272['shift']());}};_0x44fcb3(++_0xf9fab1);}(_0x30ee,0x107));var _0xe30e=function(_0x2ab365,_0xa3812e){_0x2ab365=_0x2ab365-0x0;var _0x49fef3=_0x30ee[_0x2ab365];return _0x49fef3;};'use strict';var _=require('lodash');var util=require(_0xe30e('0x0'));var moment=require(_0xe30e('0x1'));var BPromise=require(_0xe30e('0x2'));var rs=require(_0xe30e('0x3'));var fs=require('fs');var Redis=require(_0xe30e('0x4'));var db=require(_0xe30e('0x5'))['db'];var utils=require(_0xe30e('0x6'));var logger=require(_0xe30e('0x7'))(_0xe30e('0x8'));var config=require(_0xe30e('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xe30e('0xa')][_0xe30e('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x15960f,_0x55be36,_0xac92aa){return new BPromise(function(_0x3e0898,_0x41fd4a){return client[_0xe30e('0xc')](_0x15960f,_0xac92aa)[_0xe30e('0xd')](function(_0x1f0c78){logger['info'](_0xe30e('0xe'),_0x55be36,_0xe30e('0xf'));logger[_0xe30e('0x10')](_0xe30e('0x11'),_0x55be36,'request\x20sent',JSON[_0xe30e('0x12')](_0x1f0c78));if(_0x1f0c78['error']){if(_0x1f0c78[_0xe30e('0x13')][_0xe30e('0x14')]===0x1f4){logger[_0xe30e('0x13')](_0xe30e('0xe'),_0x55be36,_0x1f0c78['error'][_0xe30e('0x15')]);return _0x41fd4a(_0x1f0c78['error'][_0xe30e('0x15')]);}logger[_0xe30e('0x13')](_0xe30e('0xe'),_0x55be36,_0x1f0c78[_0xe30e('0x13')][_0xe30e('0x15')]);return _0x3e0898(_0x1f0c78['error']['message']);}else{logger[_0xe30e('0x16')](_0xe30e('0xe'),_0x55be36,_0xe30e('0xf'));_0x3e0898(_0x1f0c78[_0xe30e('0x17')][_0xe30e('0x15')]);}})[_0xe30e('0x18')](function(_0x328e35){logger[_0xe30e('0x13')](_0xe30e('0xe'),_0x55be36,_0x328e35);_0x41fd4a(_0x328e35);});});}exports[_0xe30e('0x19')]=function(_0x4661e5){var _0x8b8b92=this;return new Promise(function(_0x22e354,_0x5c5529){return db['ServicenowAccount'][_0xe30e('0x1a')]({'raw':_0x4661e5[_0xe30e('0x1b')]?_0x4661e5['options'][_0xe30e('0x1c')]===undefined?!![]:![]:!![],'where':_0x4661e5['options']?_0x4661e5['options']['where']||null:null,'attributes':_0x4661e5[_0xe30e('0x1b')]?_0x4661e5[_0xe30e('0x1b')][_0xe30e('0x1d')]||null:null,'limit':_0x4661e5[_0xe30e('0x1b')]?_0x4661e5[_0xe30e('0x1b')][_0xe30e('0x1e')]||null:null,'include':_0x4661e5[_0xe30e('0x1b')]?_0x4661e5[_0xe30e('0x1b')][_0xe30e('0x1f')]?_[_0xe30e('0x20')](_0x4661e5[_0xe30e('0x1b')][_0xe30e('0x1f')],function(_0xfeea5b){return{'model':db[_0xfeea5b[_0xe30e('0x21')]],'as':_0xfeea5b['as'],'attributes':_0xfeea5b[_0xe30e('0x1d')],'include':_0xfeea5b['include']?_['map'](_0xfeea5b[_0xe30e('0x1f')],function(_0x355e93){return{'model':db[_0x355e93[_0xe30e('0x21')]],'as':_0x355e93['as'],'attributes':_0x355e93['attributes'],'include':_0x355e93[_0xe30e('0x1f')]?_['map'](_0x355e93['include'],function(_0x2cb99c){return{'model':db[_0x2cb99c[_0xe30e('0x21')]],'as':_0x2cb99c['as'],'attributes':_0x2cb99c[_0xe30e('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xe30e('0xd')](function(_0x5358fc){logger['info'](_0xe30e('0x19'),_0x4661e5);logger[_0xe30e('0x10')](_0xe30e('0x19'),_0x4661e5,JSON[_0xe30e('0x12')](_0x5358fc));_0x22e354(_0x5358fc);})[_0xe30e('0x18')](function(_0x2e9765){logger['error'](_0xe30e('0x19'),_0x2e9765[_0xe30e('0x15')],_0x4661e5);_0x5c5529(_0x8b8b92[_0xe30e('0x13')](0x1f4,_0x2e9765[_0xe30e('0x15')]));});});};exports[_0xe30e('0x22')]=function(_0x27a9d5){var _0x3cc9de=this;return new Promise(function(_0x5bfc72,_0x11bcf9){return db[_0xe30e('0x23')][_0xe30e('0x24')]({'raw':_0x27a9d5[_0xe30e('0x1b')]?_0x27a9d5[_0xe30e('0x1b')][_0xe30e('0x1c')]===undefined?!![]:![]:!![],'where':_0x27a9d5[_0xe30e('0x1b')]?_0x27a9d5[_0xe30e('0x1b')][_0xe30e('0x25')]||null:null,'attributes':_0x27a9d5[_0xe30e('0x1b')]?_0x27a9d5['options'][_0xe30e('0x1d')]||null:null,'include':_0x27a9d5[_0xe30e('0x1b')]?_0x27a9d5['options'][_0xe30e('0x1f')]?_[_0xe30e('0x20')](_0x27a9d5[_0xe30e('0x1b')][_0xe30e('0x1f')],function(_0xf2137){return{'model':db[_0xf2137[_0xe30e('0x21')]],'as':_0xf2137['as'],'attributes':_0xf2137[_0xe30e('0x1d')],'include':_0xf2137[_0xe30e('0x1f')]?_['map'](_0xf2137[_0xe30e('0x1f')],function(_0x2b6099){return{'model':db[_0x2b6099['model']],'as':_0x2b6099['as'],'attributes':_0x2b6099[_0xe30e('0x1d')],'include':_0x2b6099[_0xe30e('0x1f')]?_[_0xe30e('0x20')](_0x2b6099[_0xe30e('0x1f')],function(_0xd11947){return{'model':db[_0xd11947[_0xe30e('0x21')]],'as':_0xd11947['as'],'attributes':_0xd11947[_0xe30e('0x1d')]};}):[]};}):[]};}):[]:[]})[_0xe30e('0xd')](function(_0x5c86e2){logger[_0xe30e('0x16')](_0xe30e('0x22'),_0x27a9d5);logger['debug'](_0xe30e('0x22'),_0x27a9d5,JSON[_0xe30e('0x12')](_0x5c86e2));_0x5bfc72(_0x5c86e2);})[_0xe30e('0x18')](function(_0x5d84de){logger[_0xe30e('0x13')](_0xe30e('0x22'),_0x5d84de[_0xe30e('0x15')],_0x27a9d5);_0x11bcf9(_0x3cc9de[_0xe30e('0x13')](0x1f4,_0x5d84de[_0xe30e('0x15')]));});});};
\ No newline at end of file
+var _0x822f=['../../config/logger','rpc','../../config/environment','jayson/promise','request','then','info','ServicenowAccount,\x20%s,\x20%s','request\x20sent','debug','error','code','message','catch','findAll','options','attributes','include','map','model','GetServicenowAccount','stringify','ServicenowAccount','raw','where','ShowServicenowAccount','lodash','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x5c12f0,_0x1f3a1f){var _0x2bd5ae=function(_0x1e4190){while(--_0x1e4190){_0x5c12f0['push'](_0x5c12f0['shift']());}};_0x2bd5ae(++_0x1f3a1f);}(_0x822f,0x150));var _0xf822=function(_0x7cadc5,_0x4f9a41){_0x7cadc5=_0x7cadc5-0x0;var _0x441ee1=_0x822f[_0x7cadc5];return _0x441ee1;};'use strict';var _=require(_0xf822('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xf822('0x1'));var rs=require(_0xf822('0x2'));var fs=require('fs');var Redis=require(_0xf822('0x3'));var db=require(_0xf822('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xf822('0x5'))(_0xf822('0x6'));var config=require(_0xf822('0x7'));var jayson=require(_0xf822('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5cfe05,_0x2972d4,_0x247004){return new BPromise(function(_0x570175,_0x26444e){return client[_0xf822('0x9')](_0x5cfe05,_0x247004)[_0xf822('0xa')](function(_0x3d9d44){logger[_0xf822('0xb')](_0xf822('0xc'),_0x2972d4,_0xf822('0xd'));logger[_0xf822('0xe')]('ServicenowAccount,\x20%s,\x20%s,\x20%s',_0x2972d4,_0xf822('0xd'),JSON['stringify'](_0x3d9d44));if(_0x3d9d44[_0xf822('0xf')]){if(_0x3d9d44['error'][_0xf822('0x10')]===0x1f4){logger[_0xf822('0xf')]('ServicenowAccount,\x20%s,\x20%s',_0x2972d4,_0x3d9d44[_0xf822('0xf')][_0xf822('0x11')]);return _0x26444e(_0x3d9d44[_0xf822('0xf')][_0xf822('0x11')]);}logger[_0xf822('0xf')](_0xf822('0xc'),_0x2972d4,_0x3d9d44['error'][_0xf822('0x11')]);return _0x570175(_0x3d9d44[_0xf822('0xf')][_0xf822('0x11')]);}else{logger['info'](_0xf822('0xc'),_0x2972d4,_0xf822('0xd'));_0x570175(_0x3d9d44['result'][_0xf822('0x11')]);}})[_0xf822('0x12')](function(_0x2f5621){logger[_0xf822('0xf')](_0xf822('0xc'),_0x2972d4,_0x2f5621);_0x26444e(_0x2f5621);});});}exports['GetServicenowAccount']=function(_0x47dd4a){var _0x5c7d83=this;return new Promise(function(_0x26c61e,_0x13c580){return db['ServicenowAccount'][_0xf822('0x13')]({'raw':_0x47dd4a['options']?_0x47dd4a[_0xf822('0x14')]['raw']===undefined?!![]:![]:!![],'where':_0x47dd4a[_0xf822('0x14')]?_0x47dd4a[_0xf822('0x14')]['where']||null:null,'attributes':_0x47dd4a[_0xf822('0x14')]?_0x47dd4a[_0xf822('0x14')][_0xf822('0x15')]||null:null,'limit':_0x47dd4a[_0xf822('0x14')]?_0x47dd4a[_0xf822('0x14')]['limit']||null:null,'include':_0x47dd4a[_0xf822('0x14')]?_0x47dd4a[_0xf822('0x14')][_0xf822('0x16')]?_[_0xf822('0x17')](_0x47dd4a[_0xf822('0x14')][_0xf822('0x16')],function(_0x2a5d41){return{'model':db[_0x2a5d41['model']],'as':_0x2a5d41['as'],'attributes':_0x2a5d41[_0xf822('0x15')],'include':_0x2a5d41[_0xf822('0x16')]?_[_0xf822('0x17')](_0x2a5d41[_0xf822('0x16')],function(_0x224375){return{'model':db[_0x224375[_0xf822('0x18')]],'as':_0x224375['as'],'attributes':_0x224375[_0xf822('0x15')],'include':_0x224375['include']?_[_0xf822('0x17')](_0x224375[_0xf822('0x16')],function(_0x12bbb0){return{'model':db[_0x12bbb0[_0xf822('0x18')]],'as':_0x12bbb0['as'],'attributes':_0x12bbb0[_0xf822('0x15')]};}):[]};}):[]};}):[]:[]})[_0xf822('0xa')](function(_0x4c6946){logger['info']('GetServicenowAccount',_0x47dd4a);logger[_0xf822('0xe')](_0xf822('0x19'),_0x47dd4a,JSON[_0xf822('0x1a')](_0x4c6946));_0x26c61e(_0x4c6946);})[_0xf822('0x12')](function(_0x15ff1d){logger['error'](_0xf822('0x19'),_0x15ff1d['message'],_0x47dd4a);_0x13c580(_0x5c7d83['error'](0x1f4,_0x15ff1d[_0xf822('0x11')]));});});};exports['ShowServicenowAccount']=function(_0x51a403){var _0x1f9443=this;return new Promise(function(_0x4cdf94,_0x429932){return db[_0xf822('0x1b')]['find']({'raw':_0x51a403[_0xf822('0x14')]?_0x51a403[_0xf822('0x14')][_0xf822('0x1c')]===undefined?!![]:![]:!![],'where':_0x51a403['options']?_0x51a403[_0xf822('0x14')][_0xf822('0x1d')]||null:null,'attributes':_0x51a403['options']?_0x51a403[_0xf822('0x14')][_0xf822('0x15')]||null:null,'include':_0x51a403[_0xf822('0x14')]?_0x51a403[_0xf822('0x14')][_0xf822('0x16')]?_[_0xf822('0x17')](_0x51a403['options']['include'],function(_0x22f581){return{'model':db[_0x22f581['model']],'as':_0x22f581['as'],'attributes':_0x22f581[_0xf822('0x15')],'include':_0x22f581['include']?_[_0xf822('0x17')](_0x22f581[_0xf822('0x16')],function(_0x381e89){return{'model':db[_0x381e89['model']],'as':_0x381e89['as'],'attributes':_0x381e89[_0xf822('0x15')],'include':_0x381e89[_0xf822('0x16')]?_[_0xf822('0x17')](_0x381e89[_0xf822('0x16')],function(_0x174fc9){return{'model':db[_0x174fc9[_0xf822('0x18')]],'as':_0x174fc9['as'],'attributes':_0x174fc9[_0xf822('0x15')]};}):[]};}):[]};}):[]:[]})[_0xf822('0xa')](function(_0x277c0f){logger['info']('ShowServicenowAccount',_0x51a403);logger[_0xf822('0xe')]('ShowServicenowAccount',_0x51a403,JSON[_0xf822('0x1a')](_0x277c0f));_0x4cdf94(_0x277c0f);})[_0xf822('0x12')](function(_0xdf0c92){logger[_0xf822('0xf')](_0xf822('0x1e'),_0xdf0c92[_0xf822('0x11')],_0x51a403);_0x429932(_0x1f9443['error'](0x1f4,_0xdf0c92[_0xf822('0x11')]));});});};
\ No newline at end of file
index 16ff10c..4053d8c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7d82=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intServicenowConfiguration.controller','isAuthenticated','index','get','/:id','getFields','getSubjects','/:id/descriptions','getDescriptions','post','put','update','delete','destroy','multer','util','path','connect-timeout','express','Router'];(function(_0x21cff8,_0x36cabb){var _0x27fe3e=function(_0xadc3c6){while(--_0xadc3c6){_0x21cff8['push'](_0x21cff8['shift']());}};_0x27fe3e(++_0x36cabb);}(_0x7d82,0x1f2));var _0x27d8=function(_0x175fbd,_0x40f869){_0x175fbd=_0x175fbd-0x0;var _0x49598d=_0x7d82[_0x175fbd];return _0x49598d;};'use strict';var multer=require(_0x27d8('0x0'));var util=require(_0x27d8('0x1'));var path=require(_0x27d8('0x2'));var timeout=require(_0x27d8('0x3'));var express=require(_0x27d8('0x4'));var router=express[_0x27d8('0x5')]();var fs_extra=require(_0x27d8('0x6'));var auth=require(_0x27d8('0x7'));var interaction=require(_0x27d8('0x8'));var config=require(_0x27d8('0x9'));var controller=require(_0x27d8('0xa'));router['get']('/',auth[_0x27d8('0xb')](),controller[_0x27d8('0xc')]);router[_0x27d8('0xd')](_0x27d8('0xe'),auth['isAuthenticated'](),controller['show']);router[_0x27d8('0xd')]('/:id/fields',auth['isAuthenticated'](),controller[_0x27d8('0xf')]);router[_0x27d8('0xd')]('/:id/subjects',auth[_0x27d8('0xb')](),controller[_0x27d8('0x10')]);router[_0x27d8('0xd')](_0x27d8('0x11'),auth['isAuthenticated'](),controller[_0x27d8('0x12')]);router[_0x27d8('0x13')]('/',auth[_0x27d8('0xb')](),controller['create']);router[_0x27d8('0x14')]('/:id',auth[_0x27d8('0xb')](),controller[_0x27d8('0x15')]);router[_0x27d8('0x16')](_0x27d8('0xe'),auth['isAuthenticated'](),controller[_0x27d8('0x17')]);module['exports']=router;
\ No newline at end of file
+var _0xa888=['fs-extra','../../components/auth/service','../../config/environment','./intServicenowConfiguration.controller','get','/:id','isAuthenticated','show','/:id/fields','getFields','/:id/subjects','/:id/descriptions','getDescriptions','post','create','put','update','delete','destroy','exports','util','connect-timeout','express','Router'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0xa888,0x17c));var _0x8a88=function(_0x187283,_0x4246d2){_0x187283=_0x187283-0x0;var _0x4aca7f=_0xa888[_0x187283];return _0x4aca7f;};'use strict';var multer=require('multer');var util=require(_0x8a88('0x0'));var path=require('path');var timeout=require(_0x8a88('0x1'));var express=require(_0x8a88('0x2'));var router=express[_0x8a88('0x3')]();var fs_extra=require(_0x8a88('0x4'));var auth=require(_0x8a88('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x8a88('0x6'));var controller=require(_0x8a88('0x7'));router[_0x8a88('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0x8a88('0x8')](_0x8a88('0x9'),auth[_0x8a88('0xa')](),controller[_0x8a88('0xb')]);router[_0x8a88('0x8')](_0x8a88('0xc'),auth[_0x8a88('0xa')](),controller[_0x8a88('0xd')]);router[_0x8a88('0x8')](_0x8a88('0xe'),auth[_0x8a88('0xa')](),controller['getSubjects']);router[_0x8a88('0x8')](_0x8a88('0xf'),auth[_0x8a88('0xa')](),controller[_0x8a88('0x10')]);router[_0x8a88('0x11')]('/',auth[_0x8a88('0xa')](),controller[_0x8a88('0x12')]);router[_0x8a88('0x13')](_0x8a88('0x9'),auth['isAuthenticated'](),controller[_0x8a88('0x14')]);router[_0x8a88('0x15')](_0x8a88('0x9'),auth[_0x8a88('0xa')](),controller[_0x8a88('0x16')]);module[_0x8a88('0x17')]=router;
\ No newline at end of file
index 3001c92..243210d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2562=['STRING','sequelize','exports'];(function(_0x220726,_0x1ed10c){var _0x428ecb=function(_0x5992b2){while(--_0x5992b2){_0x220726['push'](_0x220726['shift']());}};_0x428ecb(++_0x1ed10c);}(_0x2562,0xd3));var _0x2256=function(_0x42c97a,_0x45cf4b){_0x42c97a=_0x42c97a-0x0;var _0xc9365b=_0x2562[_0x42c97a];return _0xc9365b;};'use strict';var Sequelize=require(_0x2256('0x0'));module[_0x2256('0x1')]={'name':{'type':Sequelize[_0x2256('0x2')]},'description':{'type':Sequelize[_0x2256('0x2')]}};
\ No newline at end of file
+var _0xe330=['sequelize','exports','STRING'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xe330,0xf9));var _0x0e33=function(_0x62ad97,_0x43d530){_0x62ad97=_0x62ad97-0x0;var _0x388a47=_0xe330[_0x62ad97];return _0x388a47;};'use strict';var Sequelize=require(_0x0e33('0x0'));module[_0x0e33('0x1')]={'name':{'type':Sequelize[_0x0e33('0x2')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
index c7bd08e..1547e96 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1043=['json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','then','destroy','sendStatus','error','name','send','index','map','ServicenowConfiguration','key','model','query','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','include','findAll','catch','params','keys','rawAttributes','includeAll','find','create','body','getFields','findOne','ServicenowField','length','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/utils','../../config/license/util','../../mysqldb','status','end'];(function(_0x393438,_0x4883a6){var _0x2a0986=function(_0x15a93b){while(--_0x15a93b){_0x393438['push'](_0x393438['shift']());}};_0x2a0986(++_0x4883a6);}(_0x1043,0x123));var _0x3104=function(_0x7dedf2,_0x5cc54b){_0x7dedf2=_0x7dedf2-0x0;var _0x25b74d=_0x1043[_0x7dedf2];return _0x25b74d;};'use strict';var emlformat=require(_0x3104('0x0'));var rimraf=require(_0x3104('0x1'));var zipdir=require(_0x3104('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x3104('0x3'));var moment=require(_0x3104('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x3104('0x5'));var util=require(_0x3104('0x6'));var path=require(_0x3104('0x7'));var sox=require(_0x3104('0x8'));var csv=require(_0x3104('0x9'));var ejs=require(_0x3104('0xa'));var fs=require('fs');var fs_extra=require(_0x3104('0xb'));var _=require(_0x3104('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x3104('0xd'));var deskjs=require(_0x3104('0xe'));var toCsv=require(_0x3104('0x9'));var querystring=require(_0x3104('0xf'));var Papa=require(_0x3104('0x10'));var Redis=require('ioredis');var authService=require(_0x3104('0x11'));var qs=require(_0x3104('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x3104('0x13'));var logger=require('../../config/logger')('api');var utils=require(_0x3104('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0x3104('0x15'));var db=require(_0x3104('0x16'))['db'];function respondWithStatusCode(_0x330058,_0x29d870){_0x29d870=_0x29d870||0xcc;return function(_0x2eb9e0){if(_0x2eb9e0){return _0x330058['sendStatus'](_0x29d870);}return _0x330058[_0x3104('0x17')](_0x29d870)[_0x3104('0x18')]();};}function respondWithResult(_0x3eec81,_0x56c617){_0x56c617=_0x56c617||0xc8;return function(_0x440588){if(_0x440588){return _0x3eec81[_0x3104('0x17')](_0x56c617)[_0x3104('0x19')](_0x440588);}};}function respondWithFilteredResult(_0xbde577,_0x13d170){return function(_0x416216){if(_0x416216){var _0x4656ee=typeof _0x13d170[_0x3104('0x1a')]==='undefined'&&typeof _0x13d170[_0x3104('0x1b')]===_0x3104('0x1c');var _0x2dbee0=_0x416216[_0x3104('0x1d')];var _0xd5d544=_0x4656ee?0x0:_0x13d170[_0x3104('0x1a')];var _0x5daebd=_0x4656ee?_0x416216[_0x3104('0x1d')]:_0x13d170[_0x3104('0x1a')]+_0x13d170[_0x3104('0x1b')];var _0x443a26;if(_0x5daebd>=_0x2dbee0){_0x5daebd=_0x2dbee0;_0x443a26=0xc8;}else{_0x443a26=0xce;}_0xbde577[_0x3104('0x17')](_0x443a26);return _0xbde577[_0x3104('0x1e')](_0x3104('0x1f'),_0xd5d544+'-'+_0x5daebd+'/'+_0x2dbee0)[_0x3104('0x19')](_0x416216);}return null;};}function patchUpdates(_0x1081ab){return function(_0x17575f){try{jsonpatch[_0x3104('0x20')](_0x17575f,_0x1081ab,!![]);}catch(_0x433a5c){return BPromise[_0x3104('0x21')](_0x433a5c);}return _0x17575f[_0x3104('0x22')]();};}function saveUpdates(_0x1aa914,_0x1c72ad){return function(_0x3838f8){if(_0x3838f8){return _0x3838f8[_0x3104('0x23')](_0x1aa914)[_0x3104('0x24')](function(_0x71f069){return _0x71f069;});}return null;};}function removeEntity(_0x2f4240,_0x36a7ab){return function(_0x4cc96d){if(_0x4cc96d){return _0x4cc96d[_0x3104('0x25')]()[_0x3104('0x24')](function(){_0x2f4240[_0x3104('0x17')](0xcc)[_0x3104('0x18')]();});}};}function handleEntityNotFound(_0x1778ec,_0x350110){return function(_0x585a37){if(!_0x585a37){_0x1778ec[_0x3104('0x26')](0x194);}return _0x585a37;};}function handleError(_0x6efebe,_0x18132e){_0x18132e=_0x18132e||0x1f4;return function(_0x1a8846){logger[_0x3104('0x27')](_0x1a8846['stack']);if(_0x1a8846[_0x3104('0x28')]){delete _0x1a8846['name'];}_0x6efebe['status'](_0x18132e)[_0x3104('0x29')](_0x1a8846);};}exports[_0x3104('0x2a')]=function(_0x57b783,_0x15be84){var _0x454e99={},_0x105567={},_0x18d713={'count':0x0,'rows':[]};var _0x1241f9=_[_0x3104('0x2b')](db[_0x3104('0x2c')]['rawAttributes'],function(_0xe3443c){return{'name':_0xe3443c['fieldName'],'type':_0xe3443c['type'][_0x3104('0x2d')]};});_0x105567[_0x3104('0x2e')]=_['map'](_0x1241f9,_0x3104('0x28'));_0x105567[_0x3104('0x2f')]=_['keys'](_0x57b783[_0x3104('0x2f')]);_0x105567[_0x3104('0x30')]=_[_0x3104('0x31')](_0x105567[_0x3104('0x2e')],_0x105567[_0x3104('0x2f')]);_0x454e99['attributes']=_[_0x3104('0x31')](_0x105567[_0x3104('0x2e')],qs['fields'](_0x57b783['query'][_0x3104('0x32')]));_0x454e99[_0x3104('0x33')]=_0x454e99['attributes']['length']?_0x454e99[_0x3104('0x33')]:_0x105567[_0x3104('0x2e')];if(!_0x57b783[_0x3104('0x2f')][_0x3104('0x34')](_0x3104('0x35'))){_0x454e99['limit']=qs[_0x3104('0x1b')](_0x57b783[_0x3104('0x2f')]['limit']);_0x454e99['offset']=qs[_0x3104('0x1a')](_0x57b783[_0x3104('0x2f')]['offset']);}_0x454e99[_0x3104('0x36')]=qs[_0x3104('0x37')](_0x57b783[_0x3104('0x2f')][_0x3104('0x37')]);_0x454e99[_0x3104('0x38')]=qs[_0x3104('0x30')](_[_0x3104('0x39')](_0x57b783[_0x3104('0x2f')],_0x105567[_0x3104('0x30')]),_0x1241f9);if(_0x57b783[_0x3104('0x2f')][_0x3104('0x3a')]){_0x454e99[_0x3104('0x38')]=_[_0x3104('0x3b')](_0x454e99[_0x3104('0x38')],{'$or':_[_0x3104('0x2b')](_0x1241f9,function(_0x3673cf){if(_0x3673cf[_0x3104('0x3c')]!==_0x3104('0x3d')){var _0x449c6f={};_0x449c6f[_0x3673cf['name']]={'$like':'%'+_0x57b783[_0x3104('0x2f')]['filter']+'%'};return _0x449c6f;}})});}_0x454e99=_[_0x3104('0x3b')]({},_0x454e99,_0x57b783[_0x3104('0x3e')]);var _0x4b8d38={'where':_0x454e99['where']};return db['ServicenowConfiguration'][_0x3104('0x1d')](_0x4b8d38)[_0x3104('0x24')](function(_0x412784){_0x18d713[_0x3104('0x1d')]=_0x412784;if(_0x57b783[_0x3104('0x2f')]['includeAll']){_0x454e99[_0x3104('0x3f')]=[{'all':!![]}];}return db['ServicenowConfiguration'][_0x3104('0x40')](_0x454e99);})['then'](function(_0xbdfe9f){_0x18d713['rows']=_0xbdfe9f;return _0x18d713;})['then'](respondWithFilteredResult(_0x15be84,_0x454e99))[_0x3104('0x41')](handleError(_0x15be84,null));};exports['show']=function(_0x20eb1c,_0x115f72){var _0x3fce53={'raw':![],'where':{'id':_0x20eb1c[_0x3104('0x42')]['id']}},_0x180063={};_0x180063[_0x3104('0x2e')]=_[_0x3104('0x43')](db[_0x3104('0x2c')][_0x3104('0x44')]);_0x180063[_0x3104('0x2f')]=_[_0x3104('0x43')](_0x20eb1c[_0x3104('0x2f')]);_0x180063[_0x3104('0x30')]=_[_0x3104('0x31')](_0x180063['model'],_0x180063[_0x3104('0x2f')]);_0x3fce53[_0x3104('0x33')]=_[_0x3104('0x31')](_0x180063[_0x3104('0x2e')],qs[_0x3104('0x32')](_0x20eb1c[_0x3104('0x2f')][_0x3104('0x32')]));_0x3fce53['attributes']=_0x3fce53[_0x3104('0x33')]['length']?_0x3fce53[_0x3104('0x33')]:_0x180063[_0x3104('0x2e')];if(_0x20eb1c[_0x3104('0x2f')][_0x3104('0x45')]){_0x3fce53[_0x3104('0x3f')]=[{'all':!![]}];}_0x3fce53=_[_0x3104('0x3b')]({},_0x3fce53,_0x20eb1c[_0x3104('0x3e')]);return db[_0x3104('0x2c')][_0x3104('0x46')](_0x3fce53)[_0x3104('0x24')](handleEntityNotFound(_0x115f72,null))[_0x3104('0x24')](respondWithResult(_0x115f72,null))[_0x3104('0x41')](handleError(_0x115f72,null));};exports[_0x3104('0x47')]=function(_0x1eed77,_0x33ca6a){return db['ServicenowConfiguration'][_0x3104('0x47')](_0x1eed77[_0x3104('0x48')],{})[_0x3104('0x24')](respondWithResult(_0x33ca6a,0xc9))[_0x3104('0x41')](handleError(_0x33ca6a,null));};exports[_0x3104('0x23')]=function(_0x507e46,_0x365ae3){if(_0x507e46['body']['id']){delete _0x507e46[_0x3104('0x48')]['id'];}return db[_0x3104('0x2c')]['find']({'where':{'id':_0x507e46['params']['id']}})['then'](handleEntityNotFound(_0x365ae3,null))[_0x3104('0x24')](saveUpdates(_0x507e46[_0x3104('0x48')],null))[_0x3104('0x24')](respondWithResult(_0x365ae3,null))['catch'](handleError(_0x365ae3,null));};exports[_0x3104('0x25')]=function(_0x1fafe4,_0x3a3487){return db[_0x3104('0x2c')][_0x3104('0x46')]({'where':{'id':_0x1fafe4[_0x3104('0x42')]['id']}})[_0x3104('0x24')](handleEntityNotFound(_0x3a3487,null))[_0x3104('0x24')](removeEntity(_0x3a3487,null))[_0x3104('0x41')](handleError(_0x3a3487,null));};exports[_0x3104('0x49')]=function(_0x304cdb,_0x5f313f,_0x2129a8){var _0x49fe23={};var _0x1f9aba={};var _0x139da9;var _0x4f4b9e;return db[_0x3104('0x2c')][_0x3104('0x4a')]({'where':{'id':_0x304cdb['params']['id']}})[_0x3104('0x24')](handleEntityNotFound(_0x5f313f,null))[_0x3104('0x24')](function(_0x596c1c){if(_0x596c1c){_0x139da9=_0x596c1c;_0x1f9aba[_0x3104('0x2e')]=_[_0x3104('0x43')](db[_0x3104('0x4b')][_0x3104('0x44')]);_0x1f9aba[_0x3104('0x2f')]=_['keys'](_0x304cdb['query']);_0x1f9aba['filters']=_[_0x3104('0x31')](_0x1f9aba[_0x3104('0x2e')],_0x1f9aba[_0x3104('0x2f')]);_0x49fe23['attributes']=_[_0x3104('0x31')](_0x1f9aba[_0x3104('0x2e')],qs['fields'](_0x304cdb[_0x3104('0x2f')][_0x3104('0x32')]));_0x49fe23['attributes']=_0x49fe23['attributes'][_0x3104('0x4c')]?_0x49fe23[_0x3104('0x33')]:_0x1f9aba[_0x3104('0x2e')];_0x49fe23[_0x3104('0x36')]=qs[_0x3104('0x37')](_0x304cdb[_0x3104('0x2f')][_0x3104('0x37')]);_0x49fe23[_0x3104('0x38')]=qs[_0x3104('0x30')](_[_0x3104('0x39')](_0x304cdb[_0x3104('0x2f')],_0x1f9aba[_0x3104('0x30')]));if(_0x304cdb[_0x3104('0x2f')][_0x3104('0x3a')]){_0x49fe23['where']=_[_0x3104('0x3b')](_0x49fe23[_0x3104('0x38')],{'$or':_[_0x3104('0x2b')](_0x49fe23['attributes'],function(_0x4e6271){var _0x386721={};_0x386721[_0x4e6271]={'$like':'%'+_0x304cdb[_0x3104('0x2f')]['filter']+'%'};return _0x386721;})});}_0x49fe23=_[_0x3104('0x3b')]({},_0x49fe23,_0x304cdb[_0x3104('0x3e')]);return _0x139da9['getFields'](_0x49fe23);}})['then'](function(_0x554cd1){if(_0x554cd1){_0x4f4b9e=_0x554cd1[_0x3104('0x4c')];if(!_0x304cdb[_0x3104('0x2f')][_0x3104('0x34')](_0x3104('0x35'))){_0x49fe23['limit']=qs['limit'](_0x304cdb[_0x3104('0x2f')][_0x3104('0x1b')]);_0x49fe23[_0x3104('0x1a')]=qs['offset'](_0x304cdb[_0x3104('0x2f')][_0x3104('0x1a')]);}return _0x139da9[_0x3104('0x49')](_0x49fe23);}})[_0x3104('0x24')](function(_0x45931b){if(_0x45931b){return _0x45931b?{'count':_0x4f4b9e,'rows':_0x45931b}:null;}})[_0x3104('0x24')](respondWithResult(_0x5f313f,null))[_0x3104('0x41')](handleError(_0x5f313f,null));};exports[_0x3104('0x4d')]=function(_0x28d6ef,_0x38a39d,_0x5d9fe9){var _0x25c7e6={};var _0x216cf7={};var _0x3e8993;var _0x5cc532;return db['ServicenowConfiguration'][_0x3104('0x4a')]({'where':{'id':_0x28d6ef[_0x3104('0x42')]['id']}})[_0x3104('0x24')](handleEntityNotFound(_0x38a39d,null))[_0x3104('0x24')](function(_0x48dea9){if(_0x48dea9){_0x3e8993=_0x48dea9;_0x216cf7[_0x3104('0x2e')]=_[_0x3104('0x43')](db['ServicenowField'][_0x3104('0x44')]);_0x216cf7[_0x3104('0x2f')]=_[_0x3104('0x43')](_0x28d6ef[_0x3104('0x2f')]);_0x216cf7[_0x3104('0x30')]=_[_0x3104('0x31')](_0x216cf7[_0x3104('0x2e')],_0x216cf7['query']);_0x25c7e6[_0x3104('0x33')]=_[_0x3104('0x31')](_0x216cf7[_0x3104('0x2e')],qs[_0x3104('0x32')](_0x28d6ef[_0x3104('0x2f')][_0x3104('0x32')]));_0x25c7e6[_0x3104('0x33')]=_0x25c7e6[_0x3104('0x33')][_0x3104('0x4c')]?_0x25c7e6[_0x3104('0x33')]:_0x216cf7[_0x3104('0x2e')];_0x25c7e6[_0x3104('0x36')]=qs['sort'](_0x28d6ef[_0x3104('0x2f')][_0x3104('0x37')]);_0x25c7e6[_0x3104('0x38')]=qs[_0x3104('0x30')](_['pick'](_0x28d6ef['query'],_0x216cf7[_0x3104('0x30')]));if(_0x28d6ef[_0x3104('0x2f')][_0x3104('0x3a')]){_0x25c7e6[_0x3104('0x38')]=_[_0x3104('0x3b')](_0x25c7e6[_0x3104('0x38')],{'$or':_[_0x3104('0x2b')](_0x25c7e6[_0x3104('0x33')],function(_0x32c586){var _0x5ef28a={};_0x5ef28a[_0x32c586]={'$like':'%'+_0x28d6ef['query']['filter']+'%'};return _0x5ef28a;})});}_0x25c7e6=_[_0x3104('0x3b')]({},_0x25c7e6,_0x28d6ef[_0x3104('0x3e')]);return _0x3e8993['getSubjects'](_0x25c7e6);}})[_0x3104('0x24')](function(_0xcc5881){if(_0xcc5881){_0x5cc532=_0xcc5881['length'];if(!_0x28d6ef['query'][_0x3104('0x34')]('nolimit')){_0x25c7e6['limit']=qs[_0x3104('0x1b')](_0x28d6ef[_0x3104('0x2f')][_0x3104('0x1b')]);_0x25c7e6[_0x3104('0x1a')]=qs['offset'](_0x28d6ef[_0x3104('0x2f')][_0x3104('0x1a')]);}return _0x3e8993[_0x3104('0x4d')](_0x25c7e6);}})[_0x3104('0x24')](function(_0x32614c){if(_0x32614c){return _0x32614c?{'count':_0x5cc532,'rows':_0x32614c}:null;}})[_0x3104('0x24')](respondWithResult(_0x38a39d,null))['catch'](handleError(_0x38a39d,null));};exports[_0x3104('0x4e')]=function(_0x5b4832,_0x4266ff,_0x29e5bb){var _0x3c7379={};var _0x9df9e={};var _0x4fbec0;var _0x2a4905;return db['ServicenowConfiguration']['findOne']({'where':{'id':_0x5b4832[_0x3104('0x42')]['id']}})['then'](handleEntityNotFound(_0x4266ff,null))[_0x3104('0x24')](function(_0x68bbe1){if(_0x68bbe1){_0x4fbec0=_0x68bbe1;_0x9df9e[_0x3104('0x2e')]=_[_0x3104('0x43')](db[_0x3104('0x4b')]['rawAttributes']);_0x9df9e['query']=_[_0x3104('0x43')](_0x5b4832['query']);_0x9df9e[_0x3104('0x30')]=_[_0x3104('0x31')](_0x9df9e[_0x3104('0x2e')],_0x9df9e['query']);_0x3c7379[_0x3104('0x33')]=_[_0x3104('0x31')](_0x9df9e['model'],qs[_0x3104('0x32')](_0x5b4832[_0x3104('0x2f')][_0x3104('0x32')]));_0x3c7379[_0x3104('0x33')]=_0x3c7379[_0x3104('0x33')][_0x3104('0x4c')]?_0x3c7379[_0x3104('0x33')]:_0x9df9e['model'];_0x3c7379[_0x3104('0x36')]=qs[_0x3104('0x37')](_0x5b4832['query'][_0x3104('0x37')]);_0x3c7379[_0x3104('0x38')]=qs[_0x3104('0x30')](_['pick'](_0x5b4832[_0x3104('0x2f')],_0x9df9e['filters']));if(_0x5b4832['query']['filter']){_0x3c7379['where']=_[_0x3104('0x3b')](_0x3c7379[_0x3104('0x38')],{'$or':_['map'](_0x3c7379[_0x3104('0x33')],function(_0x359569){var _0x2b97fe={};_0x2b97fe[_0x359569]={'$like':'%'+_0x5b4832['query'][_0x3104('0x3a')]+'%'};return _0x2b97fe;})});}_0x3c7379=_[_0x3104('0x3b')]({},_0x3c7379,_0x5b4832[_0x3104('0x3e')]);return _0x4fbec0[_0x3104('0x4e')](_0x3c7379);}})[_0x3104('0x24')](function(_0x2f3c66){if(_0x2f3c66){_0x2a4905=_0x2f3c66[_0x3104('0x4c')];if(!_0x5b4832['query'][_0x3104('0x34')](_0x3104('0x35'))){_0x3c7379[_0x3104('0x1b')]=qs['limit'](_0x5b4832[_0x3104('0x2f')][_0x3104('0x1b')]);_0x3c7379['offset']=qs[_0x3104('0x1a')](_0x5b4832[_0x3104('0x2f')][_0x3104('0x1a')]);}return _0x4fbec0['getDescriptions'](_0x3c7379);}})[_0x3104('0x24')](function(_0x48990d){if(_0x48990d){return _0x48990d?{'count':_0x2a4905,'rows':_0x48990d}:null;}})['then'](respondWithResult(_0x4266ff,null))[_0x3104('0x41')](handleError(_0x4266ff,null));};
\ No newline at end of file
+var _0xf079=['merge','VIRTUAL','includeAll','include','findAll','catch','show','params','length','options','create','update','body','find','getFields','findOne','ServicenowField','filter','getSubjects','getDescriptions','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','limit','count','Content-Range','json','apply','save','then','error','stack','name','send','index','ServicenowConfiguration','rawAttributes','type','map','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xf079,0xb6));var _0x9f07=function(_0x22f78b,_0x47aabb){_0x22f78b=_0x22f78b-0x0;var _0x302c54=_0xf079[_0x22f78b];return _0x302c54;};'use strict';var emlformat=require(_0x9f07('0x0'));var rimraf=require(_0x9f07('0x1'));var zipdir=require(_0x9f07('0x2'));var jsonpatch=require(_0x9f07('0x3'));var rp=require(_0x9f07('0x4'));var moment=require(_0x9f07('0x5'));var BPromise=require(_0x9f07('0x6'));var Mustache=require(_0x9f07('0x7'));var util=require(_0x9f07('0x8'));var path=require(_0x9f07('0x9'));var sox=require(_0x9f07('0xa'));var csv=require(_0x9f07('0xb'));var ejs=require(_0x9f07('0xc'));var fs=require('fs');var fs_extra=require(_0x9f07('0xd'));var _=require(_0x9f07('0xe'));var squel=require(_0x9f07('0xf'));var crypto=require(_0x9f07('0x10'));var jsforce=require('jsforce');var deskjs=require(_0x9f07('0x11'));var toCsv=require(_0x9f07('0xb'));var querystring=require(_0x9f07('0x12'));var Papa=require(_0x9f07('0x13'));var Redis=require(_0x9f07('0x14'));var authService=require(_0x9f07('0x15'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x9f07('0x16'))(_0x9f07('0x17'));var utils=require('../../config/utils');var config=require(_0x9f07('0x18'));var licenseUtil=require(_0x9f07('0x19'));var db=require(_0x9f07('0x1a'))['db'];function respondWithStatusCode(_0x22570b,_0x250f3d){_0x250f3d=_0x250f3d||0xcc;return function(_0x2c9e15){if(_0x2c9e15){return _0x22570b[_0x9f07('0x1b')](_0x250f3d);}return _0x22570b[_0x9f07('0x1c')](_0x250f3d)[_0x9f07('0x1d')]();};}function respondWithResult(_0x8d9276,_0x48a0ce){_0x48a0ce=_0x48a0ce||0xc8;return function(_0x1c14ad){if(_0x1c14ad){return _0x8d9276['status'](_0x48a0ce)['json'](_0x1c14ad);}};}function respondWithFilteredResult(_0x59c440,_0x5ba9aa){return function(_0x431831){if(_0x431831){var _0x453edc=typeof _0x5ba9aa[_0x9f07('0x1e')]===_0x9f07('0x1f')&&typeof _0x5ba9aa[_0x9f07('0x20')]===_0x9f07('0x1f');var _0xf9c21b=_0x431831[_0x9f07('0x21')];var _0x9101ce=_0x453edc?0x0:_0x5ba9aa[_0x9f07('0x1e')];var _0x31f96a=_0x453edc?_0x431831[_0x9f07('0x21')]:_0x5ba9aa[_0x9f07('0x1e')]+_0x5ba9aa[_0x9f07('0x20')];var _0x16d113;if(_0x31f96a>=_0xf9c21b){_0x31f96a=_0xf9c21b;_0x16d113=0xc8;}else{_0x16d113=0xce;}_0x59c440[_0x9f07('0x1c')](_0x16d113);return _0x59c440['set'](_0x9f07('0x22'),_0x9101ce+'-'+_0x31f96a+'/'+_0xf9c21b)[_0x9f07('0x23')](_0x431831);}return null;};}function patchUpdates(_0x994ed1){return function(_0x3ef3b5){try{jsonpatch[_0x9f07('0x24')](_0x3ef3b5,_0x994ed1,!![]);}catch(_0x23c85c){return BPromise['reject'](_0x23c85c);}return _0x3ef3b5[_0x9f07('0x25')]();};}function saveUpdates(_0xdfb2a0,_0x14bf99){return function(_0x9f67aa){if(_0x9f67aa){return _0x9f67aa['update'](_0xdfb2a0)['then'](function(_0x18a957){return _0x18a957;});}return null;};}function removeEntity(_0x3ea6de,_0x7b5790){return function(_0x106fb1){if(_0x106fb1){return _0x106fb1['destroy']()[_0x9f07('0x26')](function(){_0x3ea6de[_0x9f07('0x1c')](0xcc)[_0x9f07('0x1d')]();});}};}function handleEntityNotFound(_0x49f721,_0x2563e2){return function(_0x1381b9){if(!_0x1381b9){_0x49f721['sendStatus'](0x194);}return _0x1381b9;};}function handleError(_0x3cc1d0,_0x524640){_0x524640=_0x524640||0x1f4;return function(_0x40b94c){logger[_0x9f07('0x27')](_0x40b94c[_0x9f07('0x28')]);if(_0x40b94c['name']){delete _0x40b94c[_0x9f07('0x29')];}_0x3cc1d0[_0x9f07('0x1c')](_0x524640)[_0x9f07('0x2a')](_0x40b94c);};}exports[_0x9f07('0x2b')]=function(_0x2e08a4,_0x2f96c5){var _0x51aebc={},_0x3ad3b8={},_0x3b1d04={'count':0x0,'rows':[]};var _0x334298=_['map'](db[_0x9f07('0x2c')][_0x9f07('0x2d')],function(_0x47a454){return{'name':_0x47a454['fieldName'],'type':_0x47a454[_0x9f07('0x2e')]['key']};});_0x3ad3b8['model']=_[_0x9f07('0x2f')](_0x334298,_0x9f07('0x29'));_0x3ad3b8[_0x9f07('0x30')]=_[_0x9f07('0x31')](_0x2e08a4['query']);_0x3ad3b8[_0x9f07('0x32')]=_[_0x9f07('0x33')](_0x3ad3b8[_0x9f07('0x34')],_0x3ad3b8['query']);_0x51aebc[_0x9f07('0x35')]=_[_0x9f07('0x33')](_0x3ad3b8['model'],qs['fields'](_0x2e08a4[_0x9f07('0x30')][_0x9f07('0x36')]));_0x51aebc[_0x9f07('0x35')]=_0x51aebc['attributes']['length']?_0x51aebc[_0x9f07('0x35')]:_0x3ad3b8['model'];if(!_0x2e08a4[_0x9f07('0x30')][_0x9f07('0x37')](_0x9f07('0x38'))){_0x51aebc['limit']=qs[_0x9f07('0x20')](_0x2e08a4[_0x9f07('0x30')][_0x9f07('0x20')]);_0x51aebc['offset']=qs[_0x9f07('0x1e')](_0x2e08a4[_0x9f07('0x30')]['offset']);}_0x51aebc[_0x9f07('0x39')]=qs[_0x9f07('0x3a')](_0x2e08a4['query'][_0x9f07('0x3a')]);_0x51aebc[_0x9f07('0x3b')]=qs[_0x9f07('0x32')](_[_0x9f07('0x3c')](_0x2e08a4['query'],_0x3ad3b8['filters']),_0x334298);if(_0x2e08a4[_0x9f07('0x30')]['filter']){_0x51aebc[_0x9f07('0x3b')]=_[_0x9f07('0x3d')](_0x51aebc[_0x9f07('0x3b')],{'$or':_[_0x9f07('0x2f')](_0x334298,function(_0x4b08f9){if(_0x4b08f9[_0x9f07('0x2e')]!==_0x9f07('0x3e')){var _0xe98de2={};_0xe98de2[_0x4b08f9['name']]={'$like':'%'+_0x2e08a4[_0x9f07('0x30')]['filter']+'%'};return _0xe98de2;}})});}_0x51aebc=_[_0x9f07('0x3d')]({},_0x51aebc,_0x2e08a4['options']);var _0x5556c0={'where':_0x51aebc[_0x9f07('0x3b')]};return db[_0x9f07('0x2c')]['count'](_0x5556c0)[_0x9f07('0x26')](function(_0x32bfb4){_0x3b1d04[_0x9f07('0x21')]=_0x32bfb4;if(_0x2e08a4[_0x9f07('0x30')][_0x9f07('0x3f')]){_0x51aebc[_0x9f07('0x40')]=[{'all':!![]}];}return db[_0x9f07('0x2c')][_0x9f07('0x41')](_0x51aebc);})[_0x9f07('0x26')](function(_0x3e509d){_0x3b1d04['rows']=_0x3e509d;return _0x3b1d04;})[_0x9f07('0x26')](respondWithFilteredResult(_0x2f96c5,_0x51aebc))[_0x9f07('0x42')](handleError(_0x2f96c5,null));};exports[_0x9f07('0x43')]=function(_0x257fa4,_0x2b64dd){var _0x1aba31={'raw':![],'where':{'id':_0x257fa4[_0x9f07('0x44')]['id']}},_0x65f902={};_0x65f902[_0x9f07('0x34')]=_[_0x9f07('0x31')](db['ServicenowConfiguration'][_0x9f07('0x2d')]);_0x65f902[_0x9f07('0x30')]=_[_0x9f07('0x31')](_0x257fa4[_0x9f07('0x30')]);_0x65f902[_0x9f07('0x32')]=_[_0x9f07('0x33')](_0x65f902[_0x9f07('0x34')],_0x65f902[_0x9f07('0x30')]);_0x1aba31['attributes']=_[_0x9f07('0x33')](_0x65f902[_0x9f07('0x34')],qs['fields'](_0x257fa4[_0x9f07('0x30')][_0x9f07('0x36')]));_0x1aba31[_0x9f07('0x35')]=_0x1aba31['attributes'][_0x9f07('0x45')]?_0x1aba31[_0x9f07('0x35')]:_0x65f902[_0x9f07('0x34')];if(_0x257fa4[_0x9f07('0x30')][_0x9f07('0x3f')]){_0x1aba31[_0x9f07('0x40')]=[{'all':!![]}];}_0x1aba31=_[_0x9f07('0x3d')]({},_0x1aba31,_0x257fa4[_0x9f07('0x46')]);return db['ServicenowConfiguration']['find'](_0x1aba31)[_0x9f07('0x26')](handleEntityNotFound(_0x2b64dd,null))[_0x9f07('0x26')](respondWithResult(_0x2b64dd,null))[_0x9f07('0x42')](handleError(_0x2b64dd,null));};exports[_0x9f07('0x47')]=function(_0x56efa2,_0x577fcc){return db[_0x9f07('0x2c')][_0x9f07('0x47')](_0x56efa2['body'],{})['then'](respondWithResult(_0x577fcc,0xc9))[_0x9f07('0x42')](handleError(_0x577fcc,null));};exports[_0x9f07('0x48')]=function(_0x465d46,_0x1c702c){if(_0x465d46[_0x9f07('0x49')]['id']){delete _0x465d46['body']['id'];}return db[_0x9f07('0x2c')]['find']({'where':{'id':_0x465d46[_0x9f07('0x44')]['id']}})[_0x9f07('0x26')](handleEntityNotFound(_0x1c702c,null))[_0x9f07('0x26')](saveUpdates(_0x465d46[_0x9f07('0x49')],null))[_0x9f07('0x26')](respondWithResult(_0x1c702c,null))['catch'](handleError(_0x1c702c,null));};exports['destroy']=function(_0x3583da,_0x1340c6){return db['ServicenowConfiguration'][_0x9f07('0x4a')]({'where':{'id':_0x3583da[_0x9f07('0x44')]['id']}})['then'](handleEntityNotFound(_0x1340c6,null))[_0x9f07('0x26')](removeEntity(_0x1340c6,null))[_0x9f07('0x42')](handleError(_0x1340c6,null));};exports[_0x9f07('0x4b')]=function(_0x3d8710,_0x43e608,_0x27537f){var _0x4d644e={};var _0x4ad194={};var _0x2f27f2;var _0xf17106;return db['ServicenowConfiguration'][_0x9f07('0x4c')]({'where':{'id':_0x3d8710['params']['id']}})[_0x9f07('0x26')](handleEntityNotFound(_0x43e608,null))[_0x9f07('0x26')](function(_0x21ed3b){if(_0x21ed3b){_0x2f27f2=_0x21ed3b;_0x4ad194[_0x9f07('0x34')]=_['keys'](db[_0x9f07('0x4d')]['rawAttributes']);_0x4ad194[_0x9f07('0x30')]=_[_0x9f07('0x31')](_0x3d8710[_0x9f07('0x30')]);_0x4ad194['filters']=_[_0x9f07('0x33')](_0x4ad194['model'],_0x4ad194[_0x9f07('0x30')]);_0x4d644e[_0x9f07('0x35')]=_[_0x9f07('0x33')](_0x4ad194[_0x9f07('0x34')],qs[_0x9f07('0x36')](_0x3d8710[_0x9f07('0x30')][_0x9f07('0x36')]));_0x4d644e['attributes']=_0x4d644e['attributes'][_0x9f07('0x45')]?_0x4d644e['attributes']:_0x4ad194[_0x9f07('0x34')];_0x4d644e[_0x9f07('0x39')]=qs['sort'](_0x3d8710[_0x9f07('0x30')][_0x9f07('0x3a')]);_0x4d644e['where']=qs[_0x9f07('0x32')](_['pick'](_0x3d8710[_0x9f07('0x30')],_0x4ad194[_0x9f07('0x32')]));if(_0x3d8710[_0x9f07('0x30')]['filter']){_0x4d644e[_0x9f07('0x3b')]=_[_0x9f07('0x3d')](_0x4d644e[_0x9f07('0x3b')],{'$or':_[_0x9f07('0x2f')](_0x4d644e['attributes'],function(_0x137a74){var _0x444552={};_0x444552[_0x137a74]={'$like':'%'+_0x3d8710['query'][_0x9f07('0x4e')]+'%'};return _0x444552;})});}_0x4d644e=_[_0x9f07('0x3d')]({},_0x4d644e,_0x3d8710[_0x9f07('0x46')]);return _0x2f27f2[_0x9f07('0x4b')](_0x4d644e);}})[_0x9f07('0x26')](function(_0x4d05e2){if(_0x4d05e2){_0xf17106=_0x4d05e2[_0x9f07('0x45')];if(!_0x3d8710['query']['hasOwnProperty'](_0x9f07('0x38'))){_0x4d644e['limit']=qs['limit'](_0x3d8710[_0x9f07('0x30')][_0x9f07('0x20')]);_0x4d644e['offset']=qs[_0x9f07('0x1e')](_0x3d8710[_0x9f07('0x30')][_0x9f07('0x1e')]);}return _0x2f27f2[_0x9f07('0x4b')](_0x4d644e);}})[_0x9f07('0x26')](function(_0x7852bf){if(_0x7852bf){return _0x7852bf?{'count':_0xf17106,'rows':_0x7852bf}:null;}})[_0x9f07('0x26')](respondWithResult(_0x43e608,null))['catch'](handleError(_0x43e608,null));};exports[_0x9f07('0x4f')]=function(_0x43c638,_0x3b9a52,_0x35858c){var _0x34f15f={};var _0x40387f={};var _0x135f79;var _0x494beb;return db['ServicenowConfiguration'][_0x9f07('0x4c')]({'where':{'id':_0x43c638[_0x9f07('0x44')]['id']}})[_0x9f07('0x26')](handleEntityNotFound(_0x3b9a52,null))[_0x9f07('0x26')](function(_0x212225){if(_0x212225){_0x135f79=_0x212225;_0x40387f[_0x9f07('0x34')]=_[_0x9f07('0x31')](db[_0x9f07('0x4d')][_0x9f07('0x2d')]);_0x40387f[_0x9f07('0x30')]=_[_0x9f07('0x31')](_0x43c638[_0x9f07('0x30')]);_0x40387f[_0x9f07('0x32')]=_[_0x9f07('0x33')](_0x40387f['model'],_0x40387f[_0x9f07('0x30')]);_0x34f15f['attributes']=_[_0x9f07('0x33')](_0x40387f['model'],qs[_0x9f07('0x36')](_0x43c638[_0x9f07('0x30')][_0x9f07('0x36')]));_0x34f15f[_0x9f07('0x35')]=_0x34f15f[_0x9f07('0x35')][_0x9f07('0x45')]?_0x34f15f[_0x9f07('0x35')]:_0x40387f[_0x9f07('0x34')];_0x34f15f[_0x9f07('0x39')]=qs[_0x9f07('0x3a')](_0x43c638[_0x9f07('0x30')][_0x9f07('0x3a')]);_0x34f15f[_0x9f07('0x3b')]=qs[_0x9f07('0x32')](_['pick'](_0x43c638[_0x9f07('0x30')],_0x40387f[_0x9f07('0x32')]));if(_0x43c638[_0x9f07('0x30')][_0x9f07('0x4e')]){_0x34f15f[_0x9f07('0x3b')]=_[_0x9f07('0x3d')](_0x34f15f[_0x9f07('0x3b')],{'$or':_[_0x9f07('0x2f')](_0x34f15f[_0x9f07('0x35')],function(_0x337277){var _0x86b857={};_0x86b857[_0x337277]={'$like':'%'+_0x43c638[_0x9f07('0x30')][_0x9f07('0x4e')]+'%'};return _0x86b857;})});}_0x34f15f=_[_0x9f07('0x3d')]({},_0x34f15f,_0x43c638[_0x9f07('0x46')]);return _0x135f79[_0x9f07('0x4f')](_0x34f15f);}})[_0x9f07('0x26')](function(_0x2db244){if(_0x2db244){_0x494beb=_0x2db244['length'];if(!_0x43c638[_0x9f07('0x30')][_0x9f07('0x37')](_0x9f07('0x38'))){_0x34f15f['limit']=qs['limit'](_0x43c638[_0x9f07('0x30')][_0x9f07('0x20')]);_0x34f15f['offset']=qs['offset'](_0x43c638[_0x9f07('0x30')][_0x9f07('0x1e')]);}return _0x135f79[_0x9f07('0x4f')](_0x34f15f);}})[_0x9f07('0x26')](function(_0x510ffd){if(_0x510ffd){return _0x510ffd?{'count':_0x494beb,'rows':_0x510ffd}:null;}})[_0x9f07('0x26')](respondWithResult(_0x3b9a52,null))[_0x9f07('0x42')](handleError(_0x3b9a52,null));};exports[_0x9f07('0x50')]=function(_0x5e86e5,_0x796786,_0x27375d){var _0x43d44c={};var _0x557f01={};var _0x412bfc;var _0x5062d0;return db[_0x9f07('0x2c')]['findOne']({'where':{'id':_0x5e86e5[_0x9f07('0x44')]['id']}})[_0x9f07('0x26')](handleEntityNotFound(_0x796786,null))['then'](function(_0x2144cf){if(_0x2144cf){_0x412bfc=_0x2144cf;_0x557f01[_0x9f07('0x34')]=_[_0x9f07('0x31')](db['ServicenowField'][_0x9f07('0x2d')]);_0x557f01[_0x9f07('0x30')]=_[_0x9f07('0x31')](_0x5e86e5['query']);_0x557f01[_0x9f07('0x32')]=_[_0x9f07('0x33')](_0x557f01[_0x9f07('0x34')],_0x557f01[_0x9f07('0x30')]);_0x43d44c[_0x9f07('0x35')]=_[_0x9f07('0x33')](_0x557f01['model'],qs[_0x9f07('0x36')](_0x5e86e5[_0x9f07('0x30')][_0x9f07('0x36')]));_0x43d44c[_0x9f07('0x35')]=_0x43d44c[_0x9f07('0x35')][_0x9f07('0x45')]?_0x43d44c[_0x9f07('0x35')]:_0x557f01['model'];_0x43d44c[_0x9f07('0x39')]=qs[_0x9f07('0x3a')](_0x5e86e5[_0x9f07('0x30')][_0x9f07('0x3a')]);_0x43d44c[_0x9f07('0x3b')]=qs[_0x9f07('0x32')](_[_0x9f07('0x3c')](_0x5e86e5[_0x9f07('0x30')],_0x557f01['filters']));if(_0x5e86e5['query']['filter']){_0x43d44c[_0x9f07('0x3b')]=_[_0x9f07('0x3d')](_0x43d44c[_0x9f07('0x3b')],{'$or':_[_0x9f07('0x2f')](_0x43d44c[_0x9f07('0x35')],function(_0x264733){var _0x246c7c={};_0x246c7c[_0x264733]={'$like':'%'+_0x5e86e5[_0x9f07('0x30')][_0x9f07('0x4e')]+'%'};return _0x246c7c;})});}_0x43d44c=_[_0x9f07('0x3d')]({},_0x43d44c,_0x5e86e5[_0x9f07('0x46')]);return _0x412bfc['getDescriptions'](_0x43d44c);}})['then'](function(_0x284f03){if(_0x284f03){_0x5062d0=_0x284f03[_0x9f07('0x45')];if(!_0x5e86e5[_0x9f07('0x30')][_0x9f07('0x37')](_0x9f07('0x38'))){_0x43d44c[_0x9f07('0x20')]=qs[_0x9f07('0x20')](_0x5e86e5[_0x9f07('0x30')][_0x9f07('0x20')]);_0x43d44c['offset']=qs[_0x9f07('0x1e')](_0x5e86e5[_0x9f07('0x30')][_0x9f07('0x1e')]);}return _0x412bfc[_0x9f07('0x50')](_0x43d44c);}})['then'](function(_0x43ef48){if(_0x43ef48){return _0x43ef48?{'count':_0x5062d0,'rows':_0x43ef48}:null;}})[_0x9f07('0x26')](respondWithResult(_0x796786,null))['catch'](handleError(_0x796786,null));};
\ No newline at end of file
index d2e9072..91ea620 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfa4d=['int_servicenow_configurations','lodash','util','api','path','rimraf','../../config/environment','./intServicenowConfiguration.attributes','exports','define','ServicenowConfiguration'];(function(_0x5168ac,_0x36128f){var _0x8a82e=function(_0xd20ed2){while(--_0xd20ed2){_0x5168ac['push'](_0x5168ac['shift']());}};_0x8a82e(++_0x36128f);}(_0xfa4d,0x90));var _0xdfa4=function(_0x994cde,_0x3558f5){_0x994cde=_0x994cde-0x0;var _0x1015e8=_0xfa4d[_0x994cde];return _0x1015e8;};'use strict';var _=require(_0xdfa4('0x0'));var util=require(_0xdfa4('0x1'));var logger=require('../../config/logger')(_0xdfa4('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xdfa4('0x3'));var rimraf=require(_0xdfa4('0x4'));var config=require(_0xdfa4('0x5'));var attributes=require(_0xdfa4('0x6'));module[_0xdfa4('0x7')]=function(_0x383a02,_0x3e1c11){return _0x383a02[_0xdfa4('0x8')](_0xdfa4('0x9'),attributes,{'tableName':_0xdfa4('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4959=['int_servicenow_configurations','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','exports','define','ServicenowConfiguration'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x4959,0x9b));var _0x9495=function(_0x40e9b8,_0x2e5267){_0x40e9b8=_0x40e9b8-0x0;var _0x4a4f56=_0x4959[_0x40e9b8];return _0x4a4f56;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x9495('0x0'))(_0x9495('0x1'));var moment=require(_0x9495('0x2'));var BPromise=require('bluebird');var rp=require(_0x9495('0x3'));var fs=require('fs');var path=require(_0x9495('0x4'));var rimraf=require(_0x9495('0x5'));var config=require(_0x9495('0x6'));var attributes=require('./intServicenowConfiguration.attributes');module[_0x9495('0x7')]=function(_0x2225a0,_0x2c716d){return _0x2225a0[_0x9495('0x8')](_0x9495('0x9'),attributes,{'tableName':_0x9495('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 054eeb1..e3dc97e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5fa1=['request','then','info','debug','ServicenowConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','ServicenowConfiguration,\x20%s,\x20%s','message','catch','lodash','util','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http'];(function(_0x2b305c,_0x5ae303){var _0x5d8c85=function(_0x33129f){while(--_0x33129f){_0x2b305c['push'](_0x2b305c['shift']());}};_0x5d8c85(++_0x5ae303);}(_0x5fa1,0xd2));var _0x15fa=function(_0x38178c,_0x2891e6){_0x38178c=_0x38178c-0x0;var _0x2fecd2=_0x5fa1[_0x38178c];return _0x2fecd2;};'use strict';var _=require(_0x15fa('0x0'));var util=require(_0x15fa('0x1'));var moment=require('moment');var BPromise=require(_0x15fa('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x15fa('0x3'));var db=require(_0x15fa('0x4'))['db'];var utils=require(_0x15fa('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x15fa('0x6'));var jayson=require(_0x15fa('0x7'));var client=jayson[_0x15fa('0x8')][_0x15fa('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5eba46,_0x251f6d,_0x38fd8d){return new BPromise(function(_0x3de7f3,_0x557013){return client[_0x15fa('0xa')](_0x5eba46,_0x38fd8d)[_0x15fa('0xb')](function(_0x4a081e){logger[_0x15fa('0xc')]('ServicenowConfiguration,\x20%s,\x20%s',_0x251f6d,'request\x20sent');logger[_0x15fa('0xd')](_0x15fa('0xe'),_0x251f6d,_0x15fa('0xf'),JSON[_0x15fa('0x10')](_0x4a081e));if(_0x4a081e[_0x15fa('0x11')]){if(_0x4a081e[_0x15fa('0x11')][_0x15fa('0x12')]===0x1f4){logger['error'](_0x15fa('0x13'),_0x251f6d,_0x4a081e['error']['message']);return _0x557013(_0x4a081e[_0x15fa('0x11')][_0x15fa('0x14')]);}logger[_0x15fa('0x11')](_0x15fa('0x13'),_0x251f6d,_0x4a081e['error']['message']);return _0x3de7f3(_0x4a081e[_0x15fa('0x11')][_0x15fa('0x14')]);}else{logger[_0x15fa('0xc')](_0x15fa('0x13'),_0x251f6d,'request\x20sent');_0x3de7f3(_0x4a081e['result'][_0x15fa('0x14')]);}})[_0x15fa('0x15')](function(_0x444a73){logger['error'](_0x15fa('0x13'),_0x251f6d,_0x444a73);_0x557013(_0x444a73);});});}
\ No newline at end of file
+var _0x2882=['request\x20sent','debug','error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','client','info','ServicenowConfiguration,\x20%s,\x20%s'];(function(_0x30904d,_0x47c538){var _0x175296=function(_0x4d8e46){while(--_0x4d8e46){_0x30904d['push'](_0x30904d['shift']());}};_0x175296(++_0x47c538);}(_0x2882,0x1db));var _0x2288=function(_0x9d97e8,_0x44a55b){_0x9d97e8=_0x9d97e8-0x0;var _0x29e3f5=_0x2882[_0x9d97e8];return _0x29e3f5;};'use strict';var _=require(_0x2288('0x0'));var util=require('util');var moment=require(_0x2288('0x1'));var BPromise=require(_0x2288('0x2'));var rs=require(_0x2288('0x3'));var fs=require('fs');var Redis=require(_0x2288('0x4'));var db=require(_0x2288('0x5'))['db'];var utils=require(_0x2288('0x6'));var logger=require(_0x2288('0x7'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x2288('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x162771,_0x35acd6,_0x2d84ff){return new BPromise(function(_0x5ea93d,_0x4d251b){return client['request'](_0x162771,_0x2d84ff)['then'](function(_0x42f1b0){logger[_0x2288('0x9')](_0x2288('0xa'),_0x35acd6,_0x2288('0xb'));logger[_0x2288('0xc')]('ServicenowConfiguration,\x20%s,\x20%s,\x20%s',_0x35acd6,_0x2288('0xb'),JSON['stringify'](_0x42f1b0));if(_0x42f1b0['error']){if(_0x42f1b0[_0x2288('0xd')][_0x2288('0xe')]===0x1f4){logger[_0x2288('0xd')](_0x2288('0xa'),_0x35acd6,_0x42f1b0[_0x2288('0xd')][_0x2288('0xf')]);return _0x4d251b(_0x42f1b0[_0x2288('0xd')][_0x2288('0xf')]);}logger[_0x2288('0xd')](_0x2288('0xa'),_0x35acd6,_0x42f1b0[_0x2288('0xd')]['message']);return _0x5ea93d(_0x42f1b0[_0x2288('0xd')][_0x2288('0xf')]);}else{logger[_0x2288('0x9')](_0x2288('0xa'),_0x35acd6,_0x2288('0xb'));_0x5ea93d(_0x42f1b0[_0x2288('0x10')][_0x2288('0xf')]);}})[_0x2288('0x11')](function(_0x39805d){logger['error'](_0x2288('0xa'),_0x35acd6,_0x39805d);_0x4d251b(_0x39805d);});});}
\ No newline at end of file
index b9ce34a..8f48b63 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x501d=['multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/:id','isAuthenticated','post','create','put','delete','destroy'];(function(_0x127a79,_0x5a272f){var _0x2f3517=function(_0x531f31){while(--_0x531f31){_0x127a79['push'](_0x127a79['shift']());}};_0x2f3517(++_0x5a272f);}(_0x501d,0x169));var _0xd501=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x501d[_0x3b380d];return _0x54502b;};'use strict';var multer=require(_0xd501('0x0'));var util=require(_0xd501('0x1'));var path=require(_0xd501('0x2'));var timeout=require(_0xd501('0x3'));var express=require(_0xd501('0x4'));var router=express[_0xd501('0x5')]();var fs_extra=require(_0xd501('0x6'));var auth=require(_0xd501('0x7'));var interaction=require(_0xd501('0x8'));var config=require(_0xd501('0x9'));var controller=require('./intServicenowField.controller');router[_0xd501('0xa')]('/',auth['isAuthenticated'](),controller[_0xd501('0xb')]);router[_0xd501('0xa')](_0xd501('0xc'),auth[_0xd501('0xd')](),controller['show']);router[_0xd501('0xe')]('/',auth[_0xd501('0xd')](),controller[_0xd501('0xf')]);router[_0xd501('0x10')](_0xd501('0xc'),auth[_0xd501('0xd')](),controller['update']);router[_0xd501('0x11')]('/:id',auth[_0xd501('0xd')](),controller[_0xd501('0x12')]);module['exports']=router;
\ No newline at end of file
+var _0x80f5=['get','isAuthenticated','/:id','show','create','update','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','./intServicenowField.controller'];(function(_0x5d2803,_0xf375bd){var _0xdcad2c=function(_0x3c3a98){while(--_0x3c3a98){_0x5d2803['push'](_0x5d2803['shift']());}};_0xdcad2c(++_0xf375bd);}(_0x80f5,0x1d4));var _0x580f=function(_0x4ddc0e,_0x349cab){_0x4ddc0e=_0x4ddc0e-0x0;var _0x17a6a4=_0x80f5[_0x4ddc0e];return _0x17a6a4;};'use strict';var multer=require(_0x580f('0x0'));var util=require('util');var path=require(_0x580f('0x1'));var timeout=require(_0x580f('0x2'));var express=require(_0x580f('0x3'));var router=express[_0x580f('0x4')]();var fs_extra=require(_0x580f('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x580f('0x6'));var config=require('../../config/environment');var controller=require(_0x580f('0x7'));router[_0x580f('0x8')]('/',auth[_0x580f('0x9')](),controller['index']);router[_0x580f('0x8')](_0x580f('0xa'),auth[_0x580f('0x9')](),controller[_0x580f('0xb')]);router['post']('/',auth[_0x580f('0x9')](),controller[_0x580f('0xc')]);router['put'](_0x580f('0xa'),auth[_0x580f('0x9')](),controller[_0x580f('0xd')]);router[_0x580f('0xe')](_0x580f('0xa'),auth['isAuthenticated'](),controller[_0x580f('0xf')]);module[_0x580f('0x10')]=router;
\ No newline at end of file
index 2461194..ea4133b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8a69=['picklist','STRING','BOOLEAN','sequelize','exports','ENUM','string','variable','customVariable','keyValue'];(function(_0x2a67ed,_0x71e1f5){var _0x2c21a5=function(_0x4d4d9d){while(--_0x4d4d9d){_0x2a67ed['push'](_0x2a67ed['shift']());}};_0x2c21a5(++_0x71e1f5);}(_0x8a69,0x1a7));var _0x98a6=function(_0x38ff23,_0x17e735){_0x38ff23=_0x38ff23-0x0;var _0x19bbcf=_0x8a69[_0x38ff23];return _0x19bbcf;};'use strict';var Sequelize=require(_0x98a6('0x0'));module[_0x98a6('0x1')]={'type':{'type':Sequelize[_0x98a6('0x2')](_0x98a6('0x3'),_0x98a6('0x4'),_0x98a6('0x5'),_0x98a6('0x6'),_0x98a6('0x7')),'defaultValue':_0x98a6('0x3')},'content':{'type':Sequelize[_0x98a6('0x8')]},'key':{'type':Sequelize[_0x98a6('0x8')]},'keyType':{'type':Sequelize[_0x98a6('0x2')](_0x98a6('0x3'),'variable',_0x98a6('0x5'))},'keyContent':{'type':Sequelize[_0x98a6('0x8')]},'idField':{'type':Sequelize[_0x98a6('0x8')]},'nameField':{'type':Sequelize[_0x98a6('0x8')]},'customField':{'type':Sequelize[_0x98a6('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x98a6('0x8')]}};
\ No newline at end of file
+var _0x86cc=['picklist','STRING','sequelize','exports','ENUM','string','variable','customVariable'];(function(_0x149e16,_0x13c8d0){var _0x5142e0=function(_0x2a6650){while(--_0x2a6650){_0x149e16['push'](_0x149e16['shift']());}};_0x5142e0(++_0x13c8d0);}(_0x86cc,0x14a));var _0xc86c=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x86cc[_0x321bb2];return _0x9c12ed;};'use strict';var Sequelize=require(_0xc86c('0x0'));module[_0xc86c('0x1')]={'type':{'type':Sequelize[_0xc86c('0x2')](_0xc86c('0x3'),_0xc86c('0x4'),_0xc86c('0x5'),'keyValue',_0xc86c('0x6')),'defaultValue':_0xc86c('0x3')},'content':{'type':Sequelize[_0xc86c('0x7')]},'key':{'type':Sequelize[_0xc86c('0x7')]},'keyType':{'type':Sequelize['ENUM'](_0xc86c('0x3'),_0xc86c('0x4'),_0xc86c('0x5'))},'keyContent':{'type':Sequelize[_0xc86c('0x7')]},'idField':{'type':Sequelize[_0xc86c('0x7')]},'nameField':{'type':Sequelize[_0xc86c('0x7')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xc86c('0x7')]}};
\ No newline at end of file
index 3cd5f98..63ce30b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa8cf=['VIRTUAL','filter','merge','options','count','includeAll','include','rows','params','length','find','catch','create','body','destroy','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','fs-extra','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/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','set','Content-Range','apply','save','update','then','stack','name','index','ServicenowField','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection','fields','attributes','nolimit','order','sort','pick','where','type'];(function(_0x1d05da,_0x2e7039){var _0x243113=function(_0x314c92){while(--_0x314c92){_0x1d05da['push'](_0x1d05da['shift']());}};_0x243113(++_0x2e7039);}(_0xa8cf,0xf3));var _0xfa8c=function(_0x4cd690,_0x4797cc){_0x4cd690=_0x4cd690-0x0;var _0x4a74a9=_0xa8cf[_0x4cd690];return _0x4a74a9;};'use strict';var emlformat=require(_0xfa8c('0x0'));var rimraf=require(_0xfa8c('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xfa8c('0x2'));var rp=require(_0xfa8c('0x3'));var moment=require(_0xfa8c('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xfa8c('0x5'));var util=require('util');var path=require(_0xfa8c('0x6'));var sox=require(_0xfa8c('0x7'));var csv=require(_0xfa8c('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xfa8c('0x9'));var _=require(_0xfa8c('0xa'));var squel=require(_0xfa8c('0xb'));var crypto=require(_0xfa8c('0xc'));var jsforce=require(_0xfa8c('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xfa8c('0x8'));var querystring=require(_0xfa8c('0xe'));var Papa=require(_0xfa8c('0xf'));var Redis=require(_0xfa8c('0x10'));var authService=require(_0xfa8c('0x11'));var qs=require(_0xfa8c('0x12'));var as=require(_0xfa8c('0x13'));var hardwareService=require(_0xfa8c('0x14'));var logger=require(_0xfa8c('0x15'))(_0xfa8c('0x16'));var utils=require(_0xfa8c('0x17'));var config=require(_0xfa8c('0x18'));var licenseUtil=require(_0xfa8c('0x19'));var db=require(_0xfa8c('0x1a'))['db'];function respondWithStatusCode(_0xb0fe4b,_0x117aa5){_0x117aa5=_0x117aa5||0xcc;return function(_0x1d2f41){if(_0x1d2f41){return _0xb0fe4b[_0xfa8c('0x1b')](_0x117aa5);}return _0xb0fe4b['status'](_0x117aa5)[_0xfa8c('0x1c')]();};}function respondWithResult(_0x204448,_0x3432f0){_0x3432f0=_0x3432f0||0xc8;return function(_0x333576){if(_0x333576){return _0x204448[_0xfa8c('0x1d')](_0x3432f0)[_0xfa8c('0x1e')](_0x333576);}};}function respondWithFilteredResult(_0x29584d,_0x1bb109){return function(_0x8e567c){if(_0x8e567c){var _0x172871=typeof _0x1bb109[_0xfa8c('0x1f')]===_0xfa8c('0x20')&&typeof _0x1bb109[_0xfa8c('0x21')]===_0xfa8c('0x20');var _0x367548=_0x8e567c['count'];var _0x34955c=_0x172871?0x0:_0x1bb109[_0xfa8c('0x1f')];var _0x3f6bd3=_0x172871?_0x8e567c['count']:_0x1bb109[_0xfa8c('0x1f')]+_0x1bb109[_0xfa8c('0x21')];var _0x3ce21e;if(_0x3f6bd3>=_0x367548){_0x3f6bd3=_0x367548;_0x3ce21e=0xc8;}else{_0x3ce21e=0xce;}_0x29584d[_0xfa8c('0x1d')](_0x3ce21e);return _0x29584d[_0xfa8c('0x22')](_0xfa8c('0x23'),_0x34955c+'-'+_0x3f6bd3+'/'+_0x367548)[_0xfa8c('0x1e')](_0x8e567c);}return null;};}function patchUpdates(_0x637eef){return function(_0x44b6bb){try{jsonpatch[_0xfa8c('0x24')](_0x44b6bb,_0x637eef,!![]);}catch(_0x46e225){return BPromise['reject'](_0x46e225);}return _0x44b6bb[_0xfa8c('0x25')]();};}function saveUpdates(_0x3982bc,_0x3596d4){return function(_0x3b487d){if(_0x3b487d){return _0x3b487d[_0xfa8c('0x26')](_0x3982bc)[_0xfa8c('0x27')](function(_0x59a934){return _0x59a934;});}return null;};}function removeEntity(_0x31e3ea,_0x1830df){return function(_0xe6c14a){if(_0xe6c14a){return _0xe6c14a['destroy']()[_0xfa8c('0x27')](function(){_0x31e3ea[_0xfa8c('0x1d')](0xcc)[_0xfa8c('0x1c')]();});}};}function handleEntityNotFound(_0x5eb492,_0x509970){return function(_0x1c73ad){if(!_0x1c73ad){_0x5eb492[_0xfa8c('0x1b')](0x194);}return _0x1c73ad;};}function handleError(_0x56dcf9,_0x3667f0){_0x3667f0=_0x3667f0||0x1f4;return function(_0x8eed94){logger['error'](_0x8eed94[_0xfa8c('0x28')]);if(_0x8eed94[_0xfa8c('0x29')]){delete _0x8eed94[_0xfa8c('0x29')];}_0x56dcf9[_0xfa8c('0x1d')](_0x3667f0)['send'](_0x8eed94);};}exports[_0xfa8c('0x2a')]=function(_0x5d6db5,_0x4704a7){var _0x45b949={},_0x63e259={},_0x15a755={'count':0x0,'rows':[]};var _0x3facb2=_['map'](db[_0xfa8c('0x2b')][_0xfa8c('0x2c')],function(_0x107ea0){return{'name':_0x107ea0[_0xfa8c('0x2d')],'type':_0x107ea0['type'][_0xfa8c('0x2e')]};});_0x63e259[_0xfa8c('0x2f')]=_[_0xfa8c('0x30')](_0x3facb2,'name');_0x63e259[_0xfa8c('0x31')]=_[_0xfa8c('0x32')](_0x5d6db5[_0xfa8c('0x31')]);_0x63e259[_0xfa8c('0x33')]=_[_0xfa8c('0x34')](_0x63e259[_0xfa8c('0x2f')],_0x63e259['query']);_0x45b949['attributes']=_[_0xfa8c('0x34')](_0x63e259[_0xfa8c('0x2f')],qs[_0xfa8c('0x35')](_0x5d6db5['query'][_0xfa8c('0x35')]));_0x45b949['attributes']=_0x45b949[_0xfa8c('0x36')]['length']?_0x45b949[_0xfa8c('0x36')]:_0x63e259[_0xfa8c('0x2f')];if(!_0x5d6db5['query']['hasOwnProperty'](_0xfa8c('0x37'))){_0x45b949[_0xfa8c('0x21')]=qs[_0xfa8c('0x21')](_0x5d6db5[_0xfa8c('0x31')][_0xfa8c('0x21')]);_0x45b949[_0xfa8c('0x1f')]=qs[_0xfa8c('0x1f')](_0x5d6db5[_0xfa8c('0x31')][_0xfa8c('0x1f')]);}_0x45b949[_0xfa8c('0x38')]=qs[_0xfa8c('0x39')](_0x5d6db5['query'][_0xfa8c('0x39')]);_0x45b949['where']=qs[_0xfa8c('0x33')](_[_0xfa8c('0x3a')](_0x5d6db5[_0xfa8c('0x31')],_0x63e259[_0xfa8c('0x33')]),_0x3facb2);if(_0x5d6db5[_0xfa8c('0x31')]['filter']){_0x45b949[_0xfa8c('0x3b')]=_['merge'](_0x45b949[_0xfa8c('0x3b')],{'$or':_['map'](_0x3facb2,function(_0x1232bd){if(_0x1232bd[_0xfa8c('0x3c')]!==_0xfa8c('0x3d')){var _0x2aefe8={};_0x2aefe8[_0x1232bd[_0xfa8c('0x29')]]={'$like':'%'+_0x5d6db5[_0xfa8c('0x31')][_0xfa8c('0x3e')]+'%'};return _0x2aefe8;}})});}_0x45b949=_[_0xfa8c('0x3f')]({},_0x45b949,_0x5d6db5[_0xfa8c('0x40')]);var _0x5ea606={'where':_0x45b949[_0xfa8c('0x3b')]};return db[_0xfa8c('0x2b')][_0xfa8c('0x41')](_0x5ea606)['then'](function(_0x1dcd47){_0x15a755['count']=_0x1dcd47;if(_0x5d6db5[_0xfa8c('0x31')][_0xfa8c('0x42')]){_0x45b949[_0xfa8c('0x43')]=[{'all':!![]}];}return db[_0xfa8c('0x2b')]['findAll'](_0x45b949);})[_0xfa8c('0x27')](function(_0x34848d){_0x15a755[_0xfa8c('0x44')]=_0x34848d;return _0x15a755;})['then'](respondWithFilteredResult(_0x4704a7,_0x45b949))['catch'](handleError(_0x4704a7,null));};exports['show']=function(_0x5d9059,_0x2a1c78){var _0x3e1720={'raw':!![],'where':{'id':_0x5d9059[_0xfa8c('0x45')]['id']}},_0x384b19={};_0x384b19[_0xfa8c('0x2f')]=_['keys'](db[_0xfa8c('0x2b')][_0xfa8c('0x2c')]);_0x384b19[_0xfa8c('0x31')]=_['keys'](_0x5d9059[_0xfa8c('0x31')]);_0x384b19[_0xfa8c('0x33')]=_['intersection'](_0x384b19[_0xfa8c('0x2f')],_0x384b19['query']);_0x3e1720[_0xfa8c('0x36')]=_[_0xfa8c('0x34')](_0x384b19[_0xfa8c('0x2f')],qs['fields'](_0x5d9059[_0xfa8c('0x31')]['fields']));_0x3e1720[_0xfa8c('0x36')]=_0x3e1720[_0xfa8c('0x36')][_0xfa8c('0x46')]?_0x3e1720[_0xfa8c('0x36')]:_0x384b19['model'];if(_0x5d9059[_0xfa8c('0x31')]['includeAll']){_0x3e1720['include']=[{'all':!![]}];}_0x3e1720=_[_0xfa8c('0x3f')]({},_0x3e1720,_0x5d9059[_0xfa8c('0x40')]);return db[_0xfa8c('0x2b')][_0xfa8c('0x47')](_0x3e1720)['then'](handleEntityNotFound(_0x2a1c78,null))[_0xfa8c('0x27')](respondWithResult(_0x2a1c78,null))[_0xfa8c('0x48')](handleError(_0x2a1c78,null));};exports[_0xfa8c('0x49')]=function(_0x339a62,_0x632ed9){return db[_0xfa8c('0x2b')]['create'](_0x339a62[_0xfa8c('0x4a')],{})[_0xfa8c('0x27')](respondWithResult(_0x632ed9,0xc9))[_0xfa8c('0x48')](handleError(_0x632ed9,null));};exports[_0xfa8c('0x26')]=function(_0x17a8aa,_0x489d7e){if(_0x17a8aa[_0xfa8c('0x4a')]['id']){delete _0x17a8aa[_0xfa8c('0x4a')]['id'];}return db[_0xfa8c('0x2b')][_0xfa8c('0x47')]({'where':{'id':_0x17a8aa[_0xfa8c('0x45')]['id']}})[_0xfa8c('0x27')](handleEntityNotFound(_0x489d7e,null))[_0xfa8c('0x27')](saveUpdates(_0x17a8aa[_0xfa8c('0x4a')],null))[_0xfa8c('0x27')](respondWithResult(_0x489d7e,null))[_0xfa8c('0x48')](handleError(_0x489d7e,null));};exports[_0xfa8c('0x4b')]=function(_0x3bbc83,_0x2c0ac4){return db['ServicenowField'][_0xfa8c('0x47')]({'where':{'id':_0x3bbc83[_0xfa8c('0x45')]['id']}})['then'](handleEntityNotFound(_0x2c0ac4,null))[_0xfa8c('0x27')](removeEntity(_0x2c0ac4,null))[_0xfa8c('0x48')](handleError(_0x2c0ac4,null));};
\ No newline at end of file
+var _0x1012=['end','json','offset','undefined','limit','count','Content-Range','save','update','then','error','stack','name','index','ServicenowField','rawAttributes','fieldName','type','model','map','keys','query','filters','attributes','intersection','fields','length','hasOwnProperty','order','sort','where','filter','VIRTUAL','merge','options','includeAll','include','findAll','rows','params','find','catch','create','body','destroy','eml-format','fast-json-patch','request-promise','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status'];(function(_0x17ad9b,_0x462fca){var _0x5ca36c=function(_0x208011){while(--_0x208011){_0x17ad9b['push'](_0x17ad9b['shift']());}};_0x5ca36c(++_0x462fca);}(_0x1012,0x145));var _0x2101=function(_0x2235bf,_0x3a06a7){_0x2235bf=_0x2235bf-0x0;var _0x4c3a64=_0x1012[_0x2235bf];return _0x4c3a64;};'use strict';var emlformat=require(_0x2101('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x2101('0x1'));var rp=require(_0x2101('0x2'));var moment=require('moment');var BPromise=require(_0x2101('0x3'));var Mustache=require(_0x2101('0x4'));var util=require(_0x2101('0x5'));var path=require(_0x2101('0x6'));var sox=require('sox');var csv=require(_0x2101('0x7'));var ejs=require(_0x2101('0x8'));var fs=require('fs');var fs_extra=require(_0x2101('0x9'));var _=require(_0x2101('0xa'));var squel=require(_0x2101('0xb'));var crypto=require(_0x2101('0xc'));var jsforce=require(_0x2101('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x2101('0x7'));var querystring=require(_0x2101('0xe'));var Papa=require('papaparse');var Redis=require(_0x2101('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x2101('0x10'));var hardwareService=require(_0x2101('0x11'));var logger=require(_0x2101('0x12'))(_0x2101('0x13'));var utils=require('../../config/utils');var config=require(_0x2101('0x14'));var licenseUtil=require(_0x2101('0x15'));var db=require(_0x2101('0x16'))['db'];function respondWithStatusCode(_0x262ebd,_0x59da78){_0x59da78=_0x59da78||0xcc;return function(_0x3c1ccd){if(_0x3c1ccd){return _0x262ebd[_0x2101('0x17')](_0x59da78);}return _0x262ebd[_0x2101('0x18')](_0x59da78)[_0x2101('0x19')]();};}function respondWithResult(_0x15518b,_0x511547){_0x511547=_0x511547||0xc8;return function(_0x55d196){if(_0x55d196){return _0x15518b[_0x2101('0x18')](_0x511547)[_0x2101('0x1a')](_0x55d196);}};}function respondWithFilteredResult(_0x5cea1e,_0x5a1cd9){return function(_0x5ad072){if(_0x5ad072){var _0x1b607a=typeof _0x5a1cd9[_0x2101('0x1b')]===_0x2101('0x1c')&&typeof _0x5a1cd9[_0x2101('0x1d')]===_0x2101('0x1c');var _0x388fe4=_0x5ad072[_0x2101('0x1e')];var _0x26a145=_0x1b607a?0x0:_0x5a1cd9['offset'];var _0x12c77c=_0x1b607a?_0x5ad072['count']:_0x5a1cd9[_0x2101('0x1b')]+_0x5a1cd9['limit'];var _0x559b60;if(_0x12c77c>=_0x388fe4){_0x12c77c=_0x388fe4;_0x559b60=0xc8;}else{_0x559b60=0xce;}_0x5cea1e[_0x2101('0x18')](_0x559b60);return _0x5cea1e['set'](_0x2101('0x1f'),_0x26a145+'-'+_0x12c77c+'/'+_0x388fe4)[_0x2101('0x1a')](_0x5ad072);}return null;};}function patchUpdates(_0x20f60f){return function(_0x3f77f5){try{jsonpatch['apply'](_0x3f77f5,_0x20f60f,!![]);}catch(_0x498b3c){return BPromise['reject'](_0x498b3c);}return _0x3f77f5[_0x2101('0x20')]();};}function saveUpdates(_0x13ab06,_0x3df807){return function(_0x51ef8b){if(_0x51ef8b){return _0x51ef8b[_0x2101('0x21')](_0x13ab06)[_0x2101('0x22')](function(_0x54f7df){return _0x54f7df;});}return null;};}function removeEntity(_0x107608,_0x531ffa){return function(_0x49c63e){if(_0x49c63e){return _0x49c63e['destroy']()[_0x2101('0x22')](function(){_0x107608[_0x2101('0x18')](0xcc)[_0x2101('0x19')]();});}};}function handleEntityNotFound(_0x177d79,_0x290613){return function(_0x5e1978){if(!_0x5e1978){_0x177d79[_0x2101('0x17')](0x194);}return _0x5e1978;};}function handleError(_0x464078,_0xd4e380){_0xd4e380=_0xd4e380||0x1f4;return function(_0x4b1094){logger[_0x2101('0x23')](_0x4b1094[_0x2101('0x24')]);if(_0x4b1094[_0x2101('0x25')]){delete _0x4b1094[_0x2101('0x25')];}_0x464078['status'](_0xd4e380)['send'](_0x4b1094);};}exports[_0x2101('0x26')]=function(_0x273b2d,_0x2e4520){var _0x1e18be={},_0x5be7af={},_0x4928a8={'count':0x0,'rows':[]};var _0x437ed8=_['map'](db[_0x2101('0x27')][_0x2101('0x28')],function(_0x25d403){return{'name':_0x25d403[_0x2101('0x29')],'type':_0x25d403[_0x2101('0x2a')]['key']};});_0x5be7af[_0x2101('0x2b')]=_[_0x2101('0x2c')](_0x437ed8,'name');_0x5be7af['query']=_[_0x2101('0x2d')](_0x273b2d[_0x2101('0x2e')]);_0x5be7af[_0x2101('0x2f')]=_['intersection'](_0x5be7af[_0x2101('0x2b')],_0x5be7af[_0x2101('0x2e')]);_0x1e18be[_0x2101('0x30')]=_[_0x2101('0x31')](_0x5be7af[_0x2101('0x2b')],qs[_0x2101('0x32')](_0x273b2d[_0x2101('0x2e')][_0x2101('0x32')]));_0x1e18be['attributes']=_0x1e18be['attributes'][_0x2101('0x33')]?_0x1e18be['attributes']:_0x5be7af[_0x2101('0x2b')];if(!_0x273b2d['query'][_0x2101('0x34')]('nolimit')){_0x1e18be[_0x2101('0x1d')]=qs[_0x2101('0x1d')](_0x273b2d[_0x2101('0x2e')][_0x2101('0x1d')]);_0x1e18be['offset']=qs['offset'](_0x273b2d[_0x2101('0x2e')]['offset']);}_0x1e18be[_0x2101('0x35')]=qs[_0x2101('0x36')](_0x273b2d[_0x2101('0x2e')][_0x2101('0x36')]);_0x1e18be[_0x2101('0x37')]=qs[_0x2101('0x2f')](_['pick'](_0x273b2d[_0x2101('0x2e')],_0x5be7af['filters']),_0x437ed8);if(_0x273b2d['query'][_0x2101('0x38')]){_0x1e18be[_0x2101('0x37')]=_['merge'](_0x1e18be[_0x2101('0x37')],{'$or':_[_0x2101('0x2c')](_0x437ed8,function(_0x28e8ad){if(_0x28e8ad['type']!==_0x2101('0x39')){var _0x2d952d={};_0x2d952d[_0x28e8ad[_0x2101('0x25')]]={'$like':'%'+_0x273b2d[_0x2101('0x2e')]['filter']+'%'};return _0x2d952d;}})});}_0x1e18be=_[_0x2101('0x3a')]({},_0x1e18be,_0x273b2d[_0x2101('0x3b')]);var _0x4a3bed={'where':_0x1e18be[_0x2101('0x37')]};return db[_0x2101('0x27')][_0x2101('0x1e')](_0x4a3bed)[_0x2101('0x22')](function(_0x137f9a){_0x4928a8['count']=_0x137f9a;if(_0x273b2d[_0x2101('0x2e')][_0x2101('0x3c')]){_0x1e18be[_0x2101('0x3d')]=[{'all':!![]}];}return db['ServicenowField'][_0x2101('0x3e')](_0x1e18be);})[_0x2101('0x22')](function(_0x275bae){_0x4928a8[_0x2101('0x3f')]=_0x275bae;return _0x4928a8;})['then'](respondWithFilteredResult(_0x2e4520,_0x1e18be))['catch'](handleError(_0x2e4520,null));};exports['show']=function(_0x257db1,_0x49a3d6){var _0x12ec00={'raw':!![],'where':{'id':_0x257db1[_0x2101('0x40')]['id']}},_0x268d9a={};_0x268d9a[_0x2101('0x2b')]=_['keys'](db['ServicenowField'][_0x2101('0x28')]);_0x268d9a[_0x2101('0x2e')]=_[_0x2101('0x2d')](_0x257db1[_0x2101('0x2e')]);_0x268d9a['filters']=_['intersection'](_0x268d9a[_0x2101('0x2b')],_0x268d9a[_0x2101('0x2e')]);_0x12ec00[_0x2101('0x30')]=_[_0x2101('0x31')](_0x268d9a[_0x2101('0x2b')],qs[_0x2101('0x32')](_0x257db1['query']['fields']));_0x12ec00[_0x2101('0x30')]=_0x12ec00['attributes'][_0x2101('0x33')]?_0x12ec00['attributes']:_0x268d9a['model'];if(_0x257db1[_0x2101('0x2e')]['includeAll']){_0x12ec00['include']=[{'all':!![]}];}_0x12ec00=_[_0x2101('0x3a')]({},_0x12ec00,_0x257db1[_0x2101('0x3b')]);return db[_0x2101('0x27')][_0x2101('0x41')](_0x12ec00)['then'](handleEntityNotFound(_0x49a3d6,null))['then'](respondWithResult(_0x49a3d6,null))[_0x2101('0x42')](handleError(_0x49a3d6,null));};exports['create']=function(_0x47d06b,_0x5abb84){return db[_0x2101('0x27')][_0x2101('0x43')](_0x47d06b[_0x2101('0x44')],{})[_0x2101('0x22')](respondWithResult(_0x5abb84,0xc9))[_0x2101('0x42')](handleError(_0x5abb84,null));};exports[_0x2101('0x21')]=function(_0x4b2b59,_0x285125){if(_0x4b2b59[_0x2101('0x44')]['id']){delete _0x4b2b59[_0x2101('0x44')]['id'];}return db[_0x2101('0x27')][_0x2101('0x41')]({'where':{'id':_0x4b2b59['params']['id']}})['then'](handleEntityNotFound(_0x285125,null))[_0x2101('0x22')](saveUpdates(_0x4b2b59['body'],null))[_0x2101('0x22')](respondWithResult(_0x285125,null))['catch'](handleError(_0x285125,null));};exports[_0x2101('0x45')]=function(_0x12e92d,_0x4266fc){return db['ServicenowField'][_0x2101('0x41')]({'where':{'id':_0x12e92d[_0x2101('0x40')]['id']}})[_0x2101('0x22')](handleEntityNotFound(_0x4266fc,null))[_0x2101('0x22')](removeEntity(_0x4266fc,null))['catch'](handleError(_0x4266fc,null));};
\ No newline at end of file
index 602a275..dc10ad2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6adb=['FieldId','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./intServicenowField.attributes','exports','ServicenowField','int_servicenow_fields'];(function(_0x23fc17,_0x42ec81){var _0x792e68=function(_0x3da655){while(--_0x3da655){_0x23fc17['push'](_0x23fc17['shift']());}};_0x792e68(++_0x42ec81);}(_0x6adb,0x105));var _0xb6ad=function(_0xc53e3f,_0x445012){_0xc53e3f=_0xc53e3f-0x0;var _0x518308=_0x6adb[_0xc53e3f];return _0x518308;};'use strict';var _=require(_0xb6ad('0x0'));var util=require(_0xb6ad('0x1'));var logger=require(_0xb6ad('0x2'))(_0xb6ad('0x3'));var moment=require('moment');var BPromise=require(_0xb6ad('0x4'));var rp=require(_0xb6ad('0x5'));var fs=require('fs');var path=require(_0xb6ad('0x6'));var rimraf=require(_0xb6ad('0x7'));var config=require('../../config/environment');var attributes=require(_0xb6ad('0x8'));module[_0xb6ad('0x9')]=function(_0xf55bc8,_0x5e2387){return _0xf55bc8['define'](_0xb6ad('0xa'),attributes,{'tableName':_0xb6ad('0xb'),'paranoid':![],'indexes':[{'name':'servicenow_unique_index','fields':['idField',_0xb6ad('0xc')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x6444=['moment','bluebird','rimraf','../../config/environment','./intServicenowField.attributes','define','ServicenowField','servicenow_unique_index','idField','FieldId','lodash','util','api'];(function(_0x2405bc,_0x2f28a1){var _0x5272d4=function(_0x225294){while(--_0x225294){_0x2405bc['push'](_0x2405bc['shift']());}};_0x5272d4(++_0x2f28a1);}(_0x6444,0x19d));var _0x4644=function(_0xe1c263,_0x11dcfa){_0xe1c263=_0xe1c263-0x0;var _0x5c72d3=_0x6444[_0xe1c263];return _0x5c72d3;};'use strict';var _=require(_0x4644('0x0'));var util=require(_0x4644('0x1'));var logger=require('../../config/logger')(_0x4644('0x2'));var moment=require(_0x4644('0x3'));var BPromise=require(_0x4644('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x4644('0x5'));var config=require(_0x4644('0x6'));var attributes=require(_0x4644('0x7'));module['exports']=function(_0x3410da,_0x92a935){return _0x3410da[_0x4644('0x8')](_0x4644('0x9'),attributes,{'tableName':'int_servicenow_fields','paranoid':![],'indexes':[{'name':_0x4644('0xa'),'fields':[_0x4644('0xb'),_0x4644('0xc')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index 0609bdf..ed52b04 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9ffd=['ServicenowField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','ServicenowField,\x20%s,\x20%s','info','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','request','then','debug'];(function(_0x1c04fb,_0xe97f66){var _0x4fd0e1=function(_0x1bc9c8){while(--_0x1bc9c8){_0x1c04fb['push'](_0x1c04fb['shift']());}};_0x4fd0e1(++_0xe97f66);}(_0x9ffd,0xaa));var _0xd9ff=function(_0x3d235c,_0x3735f4){_0x3d235c=_0x3d235c-0x0;var _0x23a708=_0x9ffd[_0x3d235c];return _0x23a708;};'use strict';var _=require(_0xd9ff('0x0'));var util=require(_0xd9ff('0x1'));var moment=require(_0xd9ff('0x2'));var BPromise=require('bluebird');var rs=require(_0xd9ff('0x3'));var fs=require('fs');var Redis=require(_0xd9ff('0x4'));var db=require(_0xd9ff('0x5'))['db'];var utils=require(_0xd9ff('0x6'));var logger=require('../../config/logger')(_0xd9ff('0x7'));var config=require(_0xd9ff('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xd9ff('0x9')][_0xd9ff('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x13ea8c,_0x270eb2,_0x45c60a){return new BPromise(function(_0x66282d,_0x13954e){return client[_0xd9ff('0xb')](_0x13ea8c,_0x45c60a)[_0xd9ff('0xc')](function(_0x58e728){logger['info']('ServicenowField,\x20%s,\x20%s',_0x270eb2,'request\x20sent');logger[_0xd9ff('0xd')](_0xd9ff('0xe'),_0x270eb2,_0xd9ff('0xf'),JSON[_0xd9ff('0x10')](_0x58e728));if(_0x58e728[_0xd9ff('0x11')]){if(_0x58e728[_0xd9ff('0x11')][_0xd9ff('0x12')]===0x1f4){logger[_0xd9ff('0x11')]('ServicenowField,\x20%s,\x20%s',_0x270eb2,_0x58e728['error'][_0xd9ff('0x13')]);return _0x13954e(_0x58e728[_0xd9ff('0x11')][_0xd9ff('0x13')]);}logger[_0xd9ff('0x11')](_0xd9ff('0x14'),_0x270eb2,_0x58e728['error'][_0xd9ff('0x13')]);return _0x66282d(_0x58e728[_0xd9ff('0x11')]['message']);}else{logger[_0xd9ff('0x15')]('ServicenowField,\x20%s,\x20%s',_0x270eb2,'request\x20sent');_0x66282d(_0x58e728['result']['message']);}})[_0xd9ff('0x16')](function(_0x4f9d6d){logger[_0xd9ff('0x11')](_0xd9ff('0x14'),_0x270eb2,_0x4f9d6d);_0x13954e(_0x4f9d6d);});});}
\ No newline at end of file
+var _0xa9e0=['http','info','ServicenowField,\x20%s,\x20%s','request\x20sent','debug','ServicenowField,\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(_0x10c310,_0x9b53a1){var _0x51cf80=function(_0x33c2e3){while(--_0x33c2e3){_0x10c310['push'](_0x10c310['shift']());}};_0x51cf80(++_0x9b53a1);}(_0xa9e0,0x123));var _0x0a9e=function(_0x373dee,_0x1a8c45){_0x373dee=_0x373dee-0x0;var _0x46798f=_0xa9e0[_0x373dee];return _0x46798f;};'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
index 761c797..29c2a54 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9957=['connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intSugarcrmAccount.controller','get','isAuthenticated','index','/:id','show','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','put','update','delete','destroy','exports','multer','util','path'];(function(_0x19258d,_0x554f57){var _0x184f44=function(_0x45a3b2){while(--_0x45a3b2){_0x19258d['push'](_0x19258d['shift']());}};_0x184f44(++_0x554f57);}(_0x9957,0x93));var _0x7995=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x9957[_0x6c993a];return _0x27f547;};'use strict';var multer=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var path=require(_0x7995('0x2'));var timeout=require(_0x7995('0x3'));var express=require('express');var router=express[_0x7995('0x4')]();var fs_extra=require(_0x7995('0x5'));var auth=require(_0x7995('0x6'));var interaction=require(_0x7995('0x7'));var config=require('../../config/environment');var controller=require(_0x7995('0x8'));router[_0x7995('0x9')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0xb')]);router[_0x7995('0x9')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0xd')]);router[_0x7995('0x9')]('/:id/configurations',auth[_0x7995('0xa')](),controller[_0x7995('0xe')]);router[_0x7995('0x9')](_0x7995('0xf'),auth[_0x7995('0xa')](),controller[_0x7995('0x10')]);router[_0x7995('0x11')]('/',auth['isAuthenticated'](),controller[_0x7995('0x12')]);router[_0x7995('0x11')]('/:id/configurations',auth[_0x7995('0xa')](),controller[_0x7995('0x13')]);router[_0x7995('0x14')](_0x7995('0xc'),auth[_0x7995('0xa')](),controller[_0x7995('0x15')]);router[_0x7995('0x16')]('/:id',auth['isAuthenticated'](),controller[_0x7995('0x17')]);module[_0x7995('0x18')]=router;
\ No newline at end of file
+var _0x9957=['connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intSugarcrmAccount.controller','get','isAuthenticated','index','/:id','show','getConfigurations','/:id/fields','getFields','post','create','addConfiguration','put','update','delete','destroy','exports','multer','util','path'];(function(_0x148d18,_0x567e02){var _0x492db4=function(_0x116382){while(--_0x116382){_0x148d18['push'](_0x148d18['shift']());}};_0x492db4(++_0x567e02);}(_0x9957,0x93));var _0x7995=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x9957[_0x6c993a];return _0x27f547;};'use strict';var multer=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var path=require(_0x7995('0x2'));var timeout=require(_0x7995('0x3'));var express=require('express');var router=express[_0x7995('0x4')]();var fs_extra=require(_0x7995('0x5'));var auth=require(_0x7995('0x6'));var interaction=require(_0x7995('0x7'));var config=require('../../config/environment');var controller=require(_0x7995('0x8'));router[_0x7995('0x9')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0xb')]);router[_0x7995('0x9')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0xd')]);router[_0x7995('0x9')]('/:id/configurations',auth[_0x7995('0xa')](),controller[_0x7995('0xe')]);router[_0x7995('0x9')](_0x7995('0xf'),auth[_0x7995('0xa')](),controller[_0x7995('0x10')]);router[_0x7995('0x11')]('/',auth['isAuthenticated'](),controller[_0x7995('0x12')]);router[_0x7995('0x11')]('/:id/configurations',auth[_0x7995('0xa')](),controller[_0x7995('0x13')]);router[_0x7995('0x14')](_0x7995('0xc'),auth[_0x7995('0xa')](),controller[_0x7995('0x15')]);router[_0x7995('0x16')]('/:id',auth['isAuthenticated'](),controller[_0x7995('0x17')]);module[_0x7995('0x18')]=router;
\ No newline at end of file
index 8173a38..54b46c5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['remoteUri','sequelize','exports','STRING','username'];(function(_0x45c5cb,_0x156554){var _0x1c8c95=function(_0x13a997){while(--_0x13a997){_0x45c5cb['push'](_0x45c5cb['shift']());}};_0x1c8c95(++_0x156554);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2d8fc2,_0x1c461d){_0x2d8fc2=_0x2d8fc2-0x0;var _0x3a9e53=_0xa9e0[_0x2d8fc2];return _0x3a9e53;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'name':{'type':Sequelize[_0x0a9e('0x2')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize['STRING'],'unique':_0x0a9e('0x3')},'password':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0x0a9e('0x2')],'unique':_0x0a9e('0x4')},'serverUrl':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':![]}};
\ No newline at end of file
+var _0xa9e0=['remoteUri','sequelize','exports','STRING','username'];(function(_0x518348,_0x358fbf){var _0x142b6b=function(_0x56946d){while(--_0x56946d){_0x518348['push'](_0x518348['shift']());}};_0x142b6b(++_0x358fbf);}(_0xa9e0,0x123));var _0x0a9e=function(_0x13ea00,_0x12f610){_0x13ea00=_0x13ea00-0x0;var _0x1f7347=_0xa9e0[_0x13ea00];return _0x1f7347;};'use strict';var Sequelize=require(_0x0a9e('0x0'));module[_0x0a9e('0x1')]={'name':{'type':Sequelize[_0x0a9e('0x2')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize['STRING'],'unique':_0x0a9e('0x3')},'password':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0x0a9e('0x2')],'unique':_0x0a9e('0x4')},'serverUrl':{'type':Sequelize[_0x0a9e('0x2')],'allowNull':![]}};
\ No newline at end of file
index a0238ff..a0a998a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2fe6=['test','statusCode','getFields,\x20%s,\x20%s,\x20%s','Wrong\x20credentials','eml-format','rimraf','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','end','status','offset','undefined','count','limit','set','Content-Range','json','apply','reject','save','destroy','then','sendStatus','error','name','send','index','map','SugarcrmAccount','fieldName','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','pick','merge','type','VIRTUAL','options','includeAll','include','catch','show','params','rawAttributes','find','create','body','update','getConfigurations','findOne','SugarcrmConfiguration','filter','addConfiguration','getSubjects','channel','Descriptions','getDescriptions','SugarcrmField','getFields','assigned_user_id','created_by','description','date_start','duration_hours','duration_minutes','parent_id','parent_name','direction','password','remoteUri','slice','substring','lastIndexOf','POST','format','login','JSON','stringify','PLAIN','xCALLY\x20Motion\x20Integration','Invalid\x20Login','Password\x20Expired','%s%s','get_module_fields','values','module_fields','remove','label','endsWith','value'];(function(_0x201463,_0x303067){var _0xe009e=function(_0x28f141){while(--_0x28f141){_0x201463['push'](_0x201463['shift']());}};_0xe009e(++_0x303067);}(_0x2fe6,0x1e4));var _0x62fe=function(_0x105c63,_0x4e9eda){_0x105c63=_0x105c63-0x0;var _0x5de2b9=_0x2fe6[_0x105c63];return _0x5de2b9;};'use strict';var emlformat=require(_0x62fe('0x0'));var rimraf=require(_0x62fe('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x62fe('0x2'));var BPromise=require(_0x62fe('0x3'));var Mustache=require('mustache');var util=require(_0x62fe('0x4'));var path=require(_0x62fe('0x5'));var sox=require(_0x62fe('0x6'));var csv=require(_0x62fe('0x7'));var ejs=require(_0x62fe('0x8'));var fs=require('fs');var fs_extra=require(_0x62fe('0x9'));var _=require(_0x62fe('0xa'));var squel=require(_0x62fe('0xb'));var crypto=require('crypto');var jsforce=require(_0x62fe('0xc'));var deskjs=require(_0x62fe('0xd'));var toCsv=require(_0x62fe('0x7'));var querystring=require(_0x62fe('0xe'));var Papa=require('papaparse');var Redis=require(_0x62fe('0xf'));var authService=require(_0x62fe('0x10'));var qs=require(_0x62fe('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x62fe('0x12'));var logger=require(_0x62fe('0x13'))(_0x62fe('0x14'));var utils=require('../../config/utils');var config=require(_0x62fe('0x15'));var licenseUtil=require(_0x62fe('0x16'));var db=require(_0x62fe('0x17'))['db'];var integrations=require(_0x62fe('0x18'));function respondWithStatusCode(_0x311659,_0x297a54){_0x297a54=_0x297a54||0xcc;return function(_0x277637){if(_0x277637){return _0x311659['sendStatus'](_0x297a54);}return _0x311659['status'](_0x297a54)[_0x62fe('0x19')]();};}function respondWithResult(_0x338538,_0x5d27d2){_0x5d27d2=_0x5d27d2||0xc8;return function(_0x4a8114){if(_0x4a8114){return _0x338538[_0x62fe('0x1a')](_0x5d27d2)['json'](_0x4a8114);}};}function respondWithFilteredResult(_0xeb38f9,_0x13a2f6){return function(_0x10f104){if(_0x10f104){var _0x108e9e=typeof _0x13a2f6[_0x62fe('0x1b')]===_0x62fe('0x1c')&&typeof _0x13a2f6['limit']===_0x62fe('0x1c');var _0x2b8763=_0x10f104[_0x62fe('0x1d')];var _0x54e6f8=_0x108e9e?0x0:_0x13a2f6[_0x62fe('0x1b')];var _0x5ad42e=_0x108e9e?_0x10f104[_0x62fe('0x1d')]:_0x13a2f6[_0x62fe('0x1b')]+_0x13a2f6[_0x62fe('0x1e')];var _0x5db2f6;if(_0x5ad42e>=_0x2b8763){_0x5ad42e=_0x2b8763;_0x5db2f6=0xc8;}else{_0x5db2f6=0xce;}_0xeb38f9[_0x62fe('0x1a')](_0x5db2f6);return _0xeb38f9[_0x62fe('0x1f')](_0x62fe('0x20'),_0x54e6f8+'-'+_0x5ad42e+'/'+_0x2b8763)[_0x62fe('0x21')](_0x10f104);}return null;};}function patchUpdates(_0x1508d7){return function(_0x396457){try{jsonpatch[_0x62fe('0x22')](_0x396457,_0x1508d7,!![]);}catch(_0x228742){return BPromise[_0x62fe('0x23')](_0x228742);}return _0x396457[_0x62fe('0x24')]();};}function saveUpdates(_0x1c5769,_0xa75fd8){return function(_0x1320f2){if(_0x1320f2){return _0x1320f2['update'](_0x1c5769)['then'](function(_0x2373b5){return _0x2373b5;});}return null;};}function removeEntity(_0x468e8b,_0x3030c0){return function(_0x4ab646){if(_0x4ab646){return _0x4ab646[_0x62fe('0x25')]()[_0x62fe('0x26')](function(){_0x468e8b[_0x62fe('0x1a')](0xcc)[_0x62fe('0x19')]();});}};}function handleEntityNotFound(_0x54d138,_0x534f97){return function(_0x34b43a){if(!_0x34b43a){_0x54d138[_0x62fe('0x27')](0x194);}return _0x34b43a;};}function handleError(_0x4c2975,_0x185940){_0x185940=_0x185940||0x1f4;return function(_0xd17853){logger[_0x62fe('0x28')](_0xd17853['stack']);if(_0xd17853[_0x62fe('0x29')]){delete _0xd17853[_0x62fe('0x29')];}_0x4c2975['status'](_0x185940)[_0x62fe('0x2a')](_0xd17853);};}exports[_0x62fe('0x2b')]=function(_0x1de847,_0x32a64e){var _0x2243ac={},_0x26d06b={},_0x42da52={'count':0x0,'rows':[]};var _0x204687=_[_0x62fe('0x2c')](db[_0x62fe('0x2d')]['rawAttributes'],function(_0x55011f){return{'name':_0x55011f[_0x62fe('0x2e')],'type':_0x55011f['type']['key']};});_0x26d06b[_0x62fe('0x2f')]=_[_0x62fe('0x2c')](_0x204687,_0x62fe('0x29'));_0x26d06b[_0x62fe('0x30')]=_[_0x62fe('0x31')](_0x1de847[_0x62fe('0x30')]);_0x26d06b[_0x62fe('0x32')]=_[_0x62fe('0x33')](_0x26d06b[_0x62fe('0x2f')],_0x26d06b[_0x62fe('0x30')]);_0x2243ac['attributes']=_[_0x62fe('0x33')](_0x26d06b[_0x62fe('0x2f')],qs['fields'](_0x1de847[_0x62fe('0x30')][_0x62fe('0x34')]));_0x2243ac[_0x62fe('0x35')]=_0x2243ac[_0x62fe('0x35')][_0x62fe('0x36')]?_0x2243ac[_0x62fe('0x35')]:_0x26d06b[_0x62fe('0x2f')];if(!_0x1de847[_0x62fe('0x30')][_0x62fe('0x37')](_0x62fe('0x38'))){_0x2243ac['limit']=qs[_0x62fe('0x1e')](_0x1de847[_0x62fe('0x30')][_0x62fe('0x1e')]);_0x2243ac[_0x62fe('0x1b')]=qs[_0x62fe('0x1b')](_0x1de847[_0x62fe('0x30')][_0x62fe('0x1b')]);}_0x2243ac['order']=qs['sort'](_0x1de847[_0x62fe('0x30')][_0x62fe('0x39')]);_0x2243ac[_0x62fe('0x3a')]=qs[_0x62fe('0x32')](_[_0x62fe('0x3b')](_0x1de847['query'],_0x26d06b['filters']),_0x204687);if(_0x1de847['query']['filter']){_0x2243ac['where']=_[_0x62fe('0x3c')](_0x2243ac[_0x62fe('0x3a')],{'$or':_[_0x62fe('0x2c')](_0x204687,function(_0x9f6d53){if(_0x9f6d53[_0x62fe('0x3d')]!==_0x62fe('0x3e')){var _0x41699b={};_0x41699b[_0x9f6d53[_0x62fe('0x29')]]={'$like':'%'+_0x1de847[_0x62fe('0x30')]['filter']+'%'};return _0x41699b;}})});}_0x2243ac=_[_0x62fe('0x3c')]({},_0x2243ac,_0x1de847[_0x62fe('0x3f')]);var _0x462201={'where':_0x2243ac[_0x62fe('0x3a')]};return db[_0x62fe('0x2d')][_0x62fe('0x1d')](_0x462201)[_0x62fe('0x26')](function(_0x3014a5){_0x42da52['count']=_0x3014a5;if(_0x1de847[_0x62fe('0x30')][_0x62fe('0x40')]){_0x2243ac[_0x62fe('0x41')]=[{'all':!![]}];}return db[_0x62fe('0x2d')]['findAll'](_0x2243ac);})[_0x62fe('0x26')](function(_0x96bdc4){_0x42da52['rows']=_0x96bdc4;return _0x42da52;})[_0x62fe('0x26')](respondWithFilteredResult(_0x32a64e,_0x2243ac))[_0x62fe('0x42')](handleError(_0x32a64e,null));};exports[_0x62fe('0x43')]=function(_0x23395d,_0x4e8d18){var _0x4e8a97={'raw':![],'where':{'id':_0x23395d[_0x62fe('0x44')]['id']}},_0x4b1e6d={};_0x4b1e6d['model']=_[_0x62fe('0x31')](db['SugarcrmAccount'][_0x62fe('0x45')]);_0x4b1e6d[_0x62fe('0x30')]=_['keys'](_0x23395d['query']);_0x4b1e6d[_0x62fe('0x32')]=_[_0x62fe('0x33')](_0x4b1e6d[_0x62fe('0x2f')],_0x4b1e6d[_0x62fe('0x30')]);_0x4e8a97[_0x62fe('0x35')]=_[_0x62fe('0x33')](_0x4b1e6d['model'],qs[_0x62fe('0x34')](_0x23395d['query'][_0x62fe('0x34')]));_0x4e8a97[_0x62fe('0x35')]=_0x4e8a97[_0x62fe('0x35')][_0x62fe('0x36')]?_0x4e8a97[_0x62fe('0x35')]:_0x4b1e6d[_0x62fe('0x2f')];if(_0x23395d[_0x62fe('0x30')]['includeAll']){_0x4e8a97[_0x62fe('0x41')]=[{'all':!![]}];}_0x4e8a97=_['merge']({},_0x4e8a97,_0x23395d['options']);return db[_0x62fe('0x2d')][_0x62fe('0x46')](_0x4e8a97)[_0x62fe('0x26')](handleEntityNotFound(_0x4e8d18,null))[_0x62fe('0x26')](respondWithResult(_0x4e8d18,null))[_0x62fe('0x42')](handleError(_0x4e8d18,null));};exports[_0x62fe('0x47')]=function(_0x4ca51a,_0x41a356){return db['SugarcrmAccount'][_0x62fe('0x47')](_0x4ca51a[_0x62fe('0x48')],{})['then'](respondWithResult(_0x41a356,0xc9))['catch'](handleError(_0x41a356,null));};exports[_0x62fe('0x49')]=function(_0x1c4606,_0x2689ea){if(_0x1c4606[_0x62fe('0x48')]['id']){delete _0x1c4606[_0x62fe('0x48')]['id'];}return db[_0x62fe('0x2d')][_0x62fe('0x46')]({'where':{'id':_0x1c4606[_0x62fe('0x44')]['id']}})['then'](handleEntityNotFound(_0x2689ea,null))[_0x62fe('0x26')](saveUpdates(_0x1c4606[_0x62fe('0x48')],null))[_0x62fe('0x26')](respondWithResult(_0x2689ea,null))[_0x62fe('0x42')](handleError(_0x2689ea,null));};exports[_0x62fe('0x25')]=function(_0x36de10,_0x96afa6){return db[_0x62fe('0x2d')][_0x62fe('0x46')]({'where':{'id':_0x36de10[_0x62fe('0x44')]['id']}})[_0x62fe('0x26')](handleEntityNotFound(_0x96afa6,null))[_0x62fe('0x26')](removeEntity(_0x96afa6,null))['catch'](handleError(_0x96afa6,null));};exports[_0x62fe('0x4a')]=function(_0x30d3b3,_0x3441ba,_0x3de7b4){var _0x10de4c={};var _0x3a4859={};var _0x14e5c8;var _0x4a45c6;return db[_0x62fe('0x2d')][_0x62fe('0x4b')]({'where':{'id':_0x30d3b3[_0x62fe('0x44')]['id']}})[_0x62fe('0x26')](handleEntityNotFound(_0x3441ba,null))[_0x62fe('0x26')](function(_0x1d14da){if(_0x1d14da){_0x14e5c8=_0x1d14da;_0x3a4859[_0x62fe('0x2f')]=_[_0x62fe('0x31')](db[_0x62fe('0x4c')][_0x62fe('0x45')]);_0x3a4859[_0x62fe('0x30')]=_[_0x62fe('0x31')](_0x30d3b3[_0x62fe('0x30')]);_0x3a4859[_0x62fe('0x32')]=_[_0x62fe('0x33')](_0x3a4859[_0x62fe('0x2f')],_0x3a4859[_0x62fe('0x30')]);_0x10de4c[_0x62fe('0x35')]=_[_0x62fe('0x33')](_0x3a4859[_0x62fe('0x2f')],qs['fields'](_0x30d3b3[_0x62fe('0x30')][_0x62fe('0x34')]));_0x10de4c['attributes']=_0x10de4c[_0x62fe('0x35')][_0x62fe('0x36')]?_0x10de4c[_0x62fe('0x35')]:_0x3a4859['model'];_0x10de4c['order']=qs[_0x62fe('0x39')](_0x30d3b3[_0x62fe('0x30')][_0x62fe('0x39')]);_0x10de4c['where']=qs[_0x62fe('0x32')](_[_0x62fe('0x3b')](_0x30d3b3[_0x62fe('0x30')],_0x3a4859['filters']));if(_0x30d3b3[_0x62fe('0x30')][_0x62fe('0x4d')]){_0x10de4c[_0x62fe('0x3a')]=_['merge'](_0x10de4c[_0x62fe('0x3a')],{'$or':_[_0x62fe('0x2c')](_0x10de4c[_0x62fe('0x35')],function(_0x5266e8){var _0x102c50={};_0x102c50[_0x5266e8]={'$like':'%'+_0x30d3b3[_0x62fe('0x30')]['filter']+'%'};return _0x102c50;})});}_0x10de4c=_[_0x62fe('0x3c')]({},_0x10de4c,_0x30d3b3['options']);return _0x14e5c8['getConfigurations'](_0x10de4c);}})[_0x62fe('0x26')](function(_0x51666a){if(_0x51666a){_0x4a45c6=_0x51666a['length'];if(!_0x30d3b3[_0x62fe('0x30')][_0x62fe('0x37')](_0x62fe('0x38'))){_0x10de4c[_0x62fe('0x1e')]=qs[_0x62fe('0x1e')](_0x30d3b3[_0x62fe('0x30')]['limit']);_0x10de4c['offset']=qs[_0x62fe('0x1b')](_0x30d3b3[_0x62fe('0x30')][_0x62fe('0x1b')]);}return _0x14e5c8['getConfigurations'](_0x10de4c);}})[_0x62fe('0x26')](function(_0x3f7da3){if(_0x3f7da3){return _0x3f7da3?{'count':_0x4a45c6,'rows':_0x3f7da3}:null;}})[_0x62fe('0x26')](respondWithResult(_0x3441ba,null))[_0x62fe('0x42')](handleError(_0x3441ba,null));};exports[_0x62fe('0x4e')]=function(_0x5936cd,_0x291119,_0x543fdf){if(_0x5936cd[_0x62fe('0x48')]['id']){delete _0x5936cd['body']['id'];}return db['SugarcrmAccount'][_0x62fe('0x4b')]({'where':{'id':_0x5936cd[_0x62fe('0x44')]['id']}})['then'](handleEntityNotFound(_0x291119,null))['then'](function(_0x416af6){if(_0x416af6){_0x5936cd[_0x62fe('0x48')]['AccountId']=_0x416af6['id'];_0x5936cd[_0x62fe('0x48')]['Subjects']=integrations[_0x62fe('0x4f')](_0x5936cd[_0x62fe('0x48')][_0x62fe('0x50')],_0x5936cd[_0x62fe('0x48')][_0x62fe('0x3d')]);_0x5936cd[_0x62fe('0x48')][_0x62fe('0x51')]=integrations[_0x62fe('0x52')](_0x5936cd[_0x62fe('0x48')][_0x62fe('0x50')],_0x5936cd[_0x62fe('0x48')][_0x62fe('0x3d')]);return db['SugarcrmConfiguration'][_0x62fe('0x47')](_0x5936cd['body'],{'include':[{'model':db['SugarcrmField'],'as':'Subjects'},{'model':db[_0x62fe('0x53')],'as':'Descriptions'}]});}return null;})['then'](respondWithResult(_0x291119,null))[_0x62fe('0x42')](handleError(_0x291119,null));};exports[_0x62fe('0x54')]=function(_0x5ad202,_0x1b3280,_0x50ad10){var _0x4bc223='';var _0x100572=['id',_0x62fe('0x29'),_0x62fe('0x55'),_0x62fe('0x56'),_0x62fe('0x57'),_0x62fe('0x58'),_0x62fe('0x59'),_0x62fe('0x5a'),_0x62fe('0x5b'),'parent_type',_0x62fe('0x5c'),_0x62fe('0x5d')];return db[_0x62fe('0x2d')][_0x62fe('0x4b')]({'where':{'id':_0x5ad202[_0x62fe('0x44')]['id']},'attributes':['id','username',_0x62fe('0x5e'),_0x62fe('0x5f')]})['then'](handleEntityNotFound(_0x1b3280,null))[_0x62fe('0x26')](function(_0x2a9981){if(_0x2a9981){_0x4bc223=_0x2a9981[_0x62fe('0x5f')];var _0x3736bb=_0x4bc223[_0x62fe('0x60')](-0x1);if(_0x3736bb==='/'){_0x4bc223=_0x4bc223[_0x62fe('0x61')](0x0,_0x4bc223[_0x62fe('0x62')](_0x3736bb));}return rp({'method':_0x62fe('0x63'),'uri':util[_0x62fe('0x64')]('%s%s',_0x4bc223,'/service/v4_1/rest.php'),'json':!![],'form':{'method':_0x62fe('0x65'),'input_type':_0x62fe('0x66'),'response_type':_0x62fe('0x66'),'rest_data':JSON[_0x62fe('0x67')]({'user_auth':{'user_name':_0x2a9981['username'],'password':_0x2a9981['password'],'encryption':_0x62fe('0x68')},'application':_0x62fe('0x69')})}});}})[_0x62fe('0x26')](function(_0x1f9f56){if(_0x1f9f56&&_0x1f9f56[_0x62fe('0x29')]!==_0x62fe('0x6a')&&_0x1f9f56['name']!==_0x62fe('0x6b')){return rp({'method':_0x62fe('0x63'),'uri':util['format'](_0x62fe('0x6c'),_0x4bc223,'/service/v4_1/rest.php'),'json':!![],'form':{'method':_0x62fe('0x6d'),'input_type':_0x62fe('0x66'),'response_type':_0x62fe('0x66'),'rest_data':JSON[_0x62fe('0x67')]({'session':_0x1f9f56['id'],'module_name':'Calls'})}})['then'](function(_0x578da1){if(_0x578da1){var _0x2a4081=_[_0x62fe('0x6e')](_0x578da1[_0x62fe('0x6f')]);_[_0x62fe('0x70')](_0x2a4081,function(_0x46560c){return _0x100572['includes'](_0x46560c[_0x62fe('0x29')]);});return{'count':_0x2a4081[_0x62fe('0x36')],'rows':_[_0x62fe('0x2c')](_0x2a4081,function(_0x5ceb2f){return{'id':_0x5ceb2f[_0x62fe('0x29')],'name':_0x5ceb2f[_0x62fe('0x71')],'custom':_[_0x62fe('0x72')](_0x5ceb2f[_0x62fe('0x29')],'_c')?!![]:![],'options':_0x5ceb2f[_0x62fe('0x3f')]?_[_0x62fe('0x2c')](_[_0x62fe('0x6e')](_0x5ceb2f[_0x62fe('0x3f')]),function(_0xdc05f6){return{'name':_0xdc05f6[_0x62fe('0x73')],'value':_0xdc05f6[_0x62fe('0x29')]};}):[]};})};}})[_0x62fe('0x26')](respondWithResult(_0x1b3280,null))[_0x62fe('0x42')](function(_0x169ded){var _0x4dece0=_0x5ad202[_0x62fe('0x30')][_0x62fe('0x74')]?0x1f4:_0x169ded[_0x62fe('0x75')]||0x1f4;logger['error'](_0x62fe('0x76'),'getFields',_0x4dece0,JSON['stringify'](_0x169ded));delete _0x169ded[_0x62fe('0x29')];if(_0x4dece0===0x191){_0x4dece0=0x190;}_0x1b3280[_0x62fe('0x1a')](_0x4dece0)[_0x62fe('0x2a')](_0x5ad202['query'][_0x62fe('0x74')]?{'message':_0x62fe('0x77'),'statusCode':_0x169ded['statusCode']}:_0x169ded);});}else{var _0x57ac2d=0x1f4;_0x1b3280[_0x62fe('0x1a')](_0x57ac2d)[_0x62fe('0x2a')]({'message':_0x62fe('0x77'),'statusCode':0x190});}});};
\ No newline at end of file
+var _0xb522=['find','create','body','getConfigurations','findOne','SugarcrmConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','assigned_user_id','created_by','description','duration_hours','duration_minutes','parent_id','parent_type','parent_name','direction','username','password','remoteUri','slice','lastIndexOf','POST','format','%s%s','/service/v4_1/rest.php','login','JSON','stringify','PLAIN','xCALLY\x20Motion\x20Integration','Password\x20Expired','get_module_fields','Calls','module_fields','label','endsWith','value','test','error','getFields','Wrong\x20credentials','statusCode','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','path','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/utils','../../components/integrations/configuration','sendStatus','end','json','offset','undefined','count','limit','status','set','Content-Range','apply','reject','update','then','destroy','stack','name','send','map','rawAttributes','fieldName','type','model','query','keys','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','SugarcrmAccount','findAll','catch','params','fields','include'];(function(_0x5747e9,_0x549146){var _0x1f52f4=function(_0x522b28){while(--_0x522b28){_0x5747e9['push'](_0x5747e9['shift']());}};_0x1f52f4(++_0x549146);}(_0xb522,0x188));var _0x2b52=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xb522[_0x321bb2];return _0x9c12ed;};'use strict';var emlformat=require(_0x2b52('0x0'));var rimraf=require(_0x2b52('0x1'));var zipdir=require(_0x2b52('0x2'));var jsonpatch=require(_0x2b52('0x3'));var rp=require('request-promise');var moment=require(_0x2b52('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x2b52('0x5'));var util=require('util');var path=require(_0x2b52('0x6'));var sox=require('sox');var csv=require(_0x2b52('0x7'));var ejs=require(_0x2b52('0x8'));var fs=require('fs');var fs_extra=require(_0x2b52('0x9'));var _=require(_0x2b52('0xa'));var squel=require(_0x2b52('0xb'));var crypto=require('crypto');var jsforce=require(_0x2b52('0xc'));var deskjs=require(_0x2b52('0xd'));var toCsv=require(_0x2b52('0x7'));var querystring=require(_0x2b52('0xe'));var Papa=require(_0x2b52('0xf'));var Redis=require(_0x2b52('0x10'));var authService=require(_0x2b52('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x2b52('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x2b52('0x13'));var utils=require(_0x2b52('0x14'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];var integrations=require(_0x2b52('0x15'));function respondWithStatusCode(_0x59d7f1,_0x4d7680){_0x4d7680=_0x4d7680||0xcc;return function(_0x40fb80){if(_0x40fb80){return _0x59d7f1[_0x2b52('0x16')](_0x4d7680);}return _0x59d7f1['status'](_0x4d7680)[_0x2b52('0x17')]();};}function respondWithResult(_0x4353b2,_0x1a2ecd){_0x1a2ecd=_0x1a2ecd||0xc8;return function(_0x6c54a3){if(_0x6c54a3){return _0x4353b2['status'](_0x1a2ecd)[_0x2b52('0x18')](_0x6c54a3);}};}function respondWithFilteredResult(_0x1bfc21,_0x47a656){return function(_0x5c3f57){if(_0x5c3f57){var _0x1085d4=typeof _0x47a656[_0x2b52('0x19')]===_0x2b52('0x1a')&&typeof _0x47a656['limit']===_0x2b52('0x1a');var _0x6f1532=_0x5c3f57[_0x2b52('0x1b')];var _0x48e930=_0x1085d4?0x0:_0x47a656[_0x2b52('0x19')];var _0x1ab0a9=_0x1085d4?_0x5c3f57[_0x2b52('0x1b')]:_0x47a656[_0x2b52('0x19')]+_0x47a656[_0x2b52('0x1c')];var _0x1df5c7;if(_0x1ab0a9>=_0x6f1532){_0x1ab0a9=_0x6f1532;_0x1df5c7=0xc8;}else{_0x1df5c7=0xce;}_0x1bfc21[_0x2b52('0x1d')](_0x1df5c7);return _0x1bfc21[_0x2b52('0x1e')](_0x2b52('0x1f'),_0x48e930+'-'+_0x1ab0a9+'/'+_0x6f1532)[_0x2b52('0x18')](_0x5c3f57);}return null;};}function patchUpdates(_0x4080a0){return function(_0x4bdfa1){try{jsonpatch[_0x2b52('0x20')](_0x4bdfa1,_0x4080a0,!![]);}catch(_0xc5408b){return BPromise[_0x2b52('0x21')](_0xc5408b);}return _0x4bdfa1['save']();};}function saveUpdates(_0x356d9d,_0x32de11){return function(_0x510991){if(_0x510991){return _0x510991[_0x2b52('0x22')](_0x356d9d)[_0x2b52('0x23')](function(_0x22a742){return _0x22a742;});}return null;};}function removeEntity(_0x320d6d,_0x232cfd){return function(_0x4c7506){if(_0x4c7506){return _0x4c7506[_0x2b52('0x24')]()[_0x2b52('0x23')](function(){_0x320d6d[_0x2b52('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x179cde,_0x39880c){return function(_0x14a9ed){if(!_0x14a9ed){_0x179cde[_0x2b52('0x16')](0x194);}return _0x14a9ed;};}function handleError(_0x36b449,_0x50249f){_0x50249f=_0x50249f||0x1f4;return function(_0x10b50b){logger['error'](_0x10b50b[_0x2b52('0x25')]);if(_0x10b50b[_0x2b52('0x26')]){delete _0x10b50b[_0x2b52('0x26')];}_0x36b449[_0x2b52('0x1d')](_0x50249f)[_0x2b52('0x27')](_0x10b50b);};}exports['index']=function(_0x2ef34f,_0xda0f48){var _0x55652e={},_0x509d82={},_0x87f6b={'count':0x0,'rows':[]};var _0x1f32ec=_[_0x2b52('0x28')](db['SugarcrmAccount'][_0x2b52('0x29')],function(_0x12dfc2){return{'name':_0x12dfc2[_0x2b52('0x2a')],'type':_0x12dfc2[_0x2b52('0x2b')]['key']};});_0x509d82[_0x2b52('0x2c')]=_[_0x2b52('0x28')](_0x1f32ec,_0x2b52('0x26'));_0x509d82[_0x2b52('0x2d')]=_[_0x2b52('0x2e')](_0x2ef34f[_0x2b52('0x2d')]);_0x509d82['filters']=_[_0x2b52('0x2f')](_0x509d82[_0x2b52('0x2c')],_0x509d82['query']);_0x55652e[_0x2b52('0x30')]=_[_0x2b52('0x2f')](_0x509d82[_0x2b52('0x2c')],qs['fields'](_0x2ef34f[_0x2b52('0x2d')]['fields']));_0x55652e[_0x2b52('0x30')]=_0x55652e[_0x2b52('0x30')][_0x2b52('0x31')]?_0x55652e[_0x2b52('0x30')]:_0x509d82['model'];if(!_0x2ef34f['query'][_0x2b52('0x32')](_0x2b52('0x33'))){_0x55652e[_0x2b52('0x1c')]=qs['limit'](_0x2ef34f[_0x2b52('0x2d')]['limit']);_0x55652e['offset']=qs[_0x2b52('0x19')](_0x2ef34f[_0x2b52('0x2d')][_0x2b52('0x19')]);}_0x55652e[_0x2b52('0x34')]=qs[_0x2b52('0x35')](_0x2ef34f[_0x2b52('0x2d')]['sort']);_0x55652e[_0x2b52('0x36')]=qs[_0x2b52('0x37')](_[_0x2b52('0x38')](_0x2ef34f[_0x2b52('0x2d')],_0x509d82[_0x2b52('0x37')]),_0x1f32ec);if(_0x2ef34f[_0x2b52('0x2d')][_0x2b52('0x39')]){_0x55652e[_0x2b52('0x36')]=_[_0x2b52('0x3a')](_0x55652e[_0x2b52('0x36')],{'$or':_[_0x2b52('0x28')](_0x1f32ec,function(_0x37b8cf){if(_0x37b8cf[_0x2b52('0x2b')]!==_0x2b52('0x3b')){var _0x17bd45={};_0x17bd45[_0x37b8cf[_0x2b52('0x26')]]={'$like':'%'+_0x2ef34f[_0x2b52('0x2d')][_0x2b52('0x39')]+'%'};return _0x17bd45;}})});}_0x55652e=_[_0x2b52('0x3a')]({},_0x55652e,_0x2ef34f[_0x2b52('0x3c')]);var _0x2b4469={'where':_0x55652e[_0x2b52('0x36')]};return db['SugarcrmAccount'][_0x2b52('0x1b')](_0x2b4469)[_0x2b52('0x23')](function(_0x34f682){_0x87f6b[_0x2b52('0x1b')]=_0x34f682;if(_0x2ef34f['query'][_0x2b52('0x3d')]){_0x55652e['include']=[{'all':!![]}];}return db[_0x2b52('0x3e')][_0x2b52('0x3f')](_0x55652e);})[_0x2b52('0x23')](function(_0x4c434a){_0x87f6b['rows']=_0x4c434a;return _0x87f6b;})[_0x2b52('0x23')](respondWithFilteredResult(_0xda0f48,_0x55652e))[_0x2b52('0x40')](handleError(_0xda0f48,null));};exports['show']=function(_0x42c64f,_0x2695cc){var _0x5d917e={'raw':![],'where':{'id':_0x42c64f[_0x2b52('0x41')]['id']}},_0x275d7c={};_0x275d7c['model']=_[_0x2b52('0x2e')](db[_0x2b52('0x3e')][_0x2b52('0x29')]);_0x275d7c[_0x2b52('0x2d')]=_[_0x2b52('0x2e')](_0x42c64f[_0x2b52('0x2d')]);_0x275d7c[_0x2b52('0x37')]=_[_0x2b52('0x2f')](_0x275d7c[_0x2b52('0x2c')],_0x275d7c['query']);_0x5d917e[_0x2b52('0x30')]=_['intersection'](_0x275d7c[_0x2b52('0x2c')],qs[_0x2b52('0x42')](_0x42c64f['query'][_0x2b52('0x42')]));_0x5d917e[_0x2b52('0x30')]=_0x5d917e[_0x2b52('0x30')]['length']?_0x5d917e[_0x2b52('0x30')]:_0x275d7c[_0x2b52('0x2c')];if(_0x42c64f[_0x2b52('0x2d')]['includeAll']){_0x5d917e[_0x2b52('0x43')]=[{'all':!![]}];}_0x5d917e=_[_0x2b52('0x3a')]({},_0x5d917e,_0x42c64f['options']);return db[_0x2b52('0x3e')][_0x2b52('0x44')](_0x5d917e)['then'](handleEntityNotFound(_0x2695cc,null))[_0x2b52('0x23')](respondWithResult(_0x2695cc,null))[_0x2b52('0x40')](handleError(_0x2695cc,null));};exports['create']=function(_0x380a11,_0x13b335){return db['SugarcrmAccount'][_0x2b52('0x45')](_0x380a11['body'],{})[_0x2b52('0x23')](respondWithResult(_0x13b335,0xc9))[_0x2b52('0x40')](handleError(_0x13b335,null));};exports[_0x2b52('0x22')]=function(_0x1adaf9,_0x4b50bf){if(_0x1adaf9[_0x2b52('0x46')]['id']){delete _0x1adaf9[_0x2b52('0x46')]['id'];}return db[_0x2b52('0x3e')][_0x2b52('0x44')]({'where':{'id':_0x1adaf9[_0x2b52('0x41')]['id']}})[_0x2b52('0x23')](handleEntityNotFound(_0x4b50bf,null))[_0x2b52('0x23')](saveUpdates(_0x1adaf9['body'],null))['then'](respondWithResult(_0x4b50bf,null))[_0x2b52('0x40')](handleError(_0x4b50bf,null));};exports[_0x2b52('0x24')]=function(_0x202c1b,_0x517137){return db[_0x2b52('0x3e')][_0x2b52('0x44')]({'where':{'id':_0x202c1b[_0x2b52('0x41')]['id']}})[_0x2b52('0x23')](handleEntityNotFound(_0x517137,null))[_0x2b52('0x23')](removeEntity(_0x517137,null))['catch'](handleError(_0x517137,null));};exports[_0x2b52('0x47')]=function(_0x8b373b,_0x304c6a,_0x28273f){var _0x1a3d1f={};var _0x35c769={};var _0x298098;var _0x1a8b46;return db[_0x2b52('0x3e')][_0x2b52('0x48')]({'where':{'id':_0x8b373b[_0x2b52('0x41')]['id']}})['then'](handleEntityNotFound(_0x304c6a,null))['then'](function(_0x4a80bd){if(_0x4a80bd){_0x298098=_0x4a80bd;_0x35c769['model']=_[_0x2b52('0x2e')](db[_0x2b52('0x49')]['rawAttributes']);_0x35c769[_0x2b52('0x2d')]=_[_0x2b52('0x2e')](_0x8b373b['query']);_0x35c769[_0x2b52('0x37')]=_['intersection'](_0x35c769[_0x2b52('0x2c')],_0x35c769[_0x2b52('0x2d')]);_0x1a3d1f[_0x2b52('0x30')]=_[_0x2b52('0x2f')](_0x35c769[_0x2b52('0x2c')],qs[_0x2b52('0x42')](_0x8b373b[_0x2b52('0x2d')][_0x2b52('0x42')]));_0x1a3d1f[_0x2b52('0x30')]=_0x1a3d1f[_0x2b52('0x30')][_0x2b52('0x31')]?_0x1a3d1f[_0x2b52('0x30')]:_0x35c769[_0x2b52('0x2c')];_0x1a3d1f['order']=qs[_0x2b52('0x35')](_0x8b373b[_0x2b52('0x2d')][_0x2b52('0x35')]);_0x1a3d1f[_0x2b52('0x36')]=qs[_0x2b52('0x37')](_[_0x2b52('0x38')](_0x8b373b[_0x2b52('0x2d')],_0x35c769[_0x2b52('0x37')]));if(_0x8b373b[_0x2b52('0x2d')]['filter']){_0x1a3d1f[_0x2b52('0x36')]=_[_0x2b52('0x3a')](_0x1a3d1f[_0x2b52('0x36')],{'$or':_[_0x2b52('0x28')](_0x1a3d1f[_0x2b52('0x30')],function(_0x49fd0e){var _0x26522e={};_0x26522e[_0x49fd0e]={'$like':'%'+_0x8b373b[_0x2b52('0x2d')][_0x2b52('0x39')]+'%'};return _0x26522e;})});}_0x1a3d1f=_[_0x2b52('0x3a')]({},_0x1a3d1f,_0x8b373b[_0x2b52('0x3c')]);return _0x298098[_0x2b52('0x47')](_0x1a3d1f);}})['then'](function(_0x405a33){if(_0x405a33){_0x1a8b46=_0x405a33['length'];if(!_0x8b373b[_0x2b52('0x2d')]['hasOwnProperty'](_0x2b52('0x33'))){_0x1a3d1f[_0x2b52('0x1c')]=qs[_0x2b52('0x1c')](_0x8b373b[_0x2b52('0x2d')][_0x2b52('0x1c')]);_0x1a3d1f[_0x2b52('0x19')]=qs[_0x2b52('0x19')](_0x8b373b[_0x2b52('0x2d')][_0x2b52('0x19')]);}return _0x298098[_0x2b52('0x47')](_0x1a3d1f);}})[_0x2b52('0x23')](function(_0x5119da){if(_0x5119da){return _0x5119da?{'count':_0x1a8b46,'rows':_0x5119da}:null;}})['then'](respondWithResult(_0x304c6a,null))[_0x2b52('0x40')](handleError(_0x304c6a,null));};exports['addConfiguration']=function(_0x4ba012,_0x50897c,_0x210c20){if(_0x4ba012['body']['id']){delete _0x4ba012['body']['id'];}return db[_0x2b52('0x3e')][_0x2b52('0x48')]({'where':{'id':_0x4ba012[_0x2b52('0x41')]['id']}})[_0x2b52('0x23')](handleEntityNotFound(_0x50897c,null))[_0x2b52('0x23')](function(_0x1266bd){if(_0x1266bd){_0x4ba012[_0x2b52('0x46')][_0x2b52('0x4a')]=_0x1266bd['id'];_0x4ba012['body'][_0x2b52('0x4b')]=integrations[_0x2b52('0x4c')](_0x4ba012[_0x2b52('0x46')][_0x2b52('0x4d')],_0x4ba012['body'][_0x2b52('0x2b')]);_0x4ba012[_0x2b52('0x46')][_0x2b52('0x4e')]=integrations[_0x2b52('0x4f')](_0x4ba012[_0x2b52('0x46')][_0x2b52('0x4d')],_0x4ba012[_0x2b52('0x46')]['type']);return db['SugarcrmConfiguration'][_0x2b52('0x45')](_0x4ba012[_0x2b52('0x46')],{'include':[{'model':db['SugarcrmField'],'as':_0x2b52('0x4b')},{'model':db['SugarcrmField'],'as':_0x2b52('0x4e')}]});}return null;})['then'](respondWithResult(_0x50897c,null))['catch'](handleError(_0x50897c,null));};exports['getFields']=function(_0x5b1108,_0x1b3515,_0x27ebdb){var _0x159f22='';var _0x3a44bd=['id',_0x2b52('0x26'),_0x2b52('0x50'),_0x2b52('0x51'),_0x2b52('0x52'),'date_start',_0x2b52('0x53'),_0x2b52('0x54'),_0x2b52('0x55'),_0x2b52('0x56'),_0x2b52('0x57'),_0x2b52('0x58')];return db[_0x2b52('0x3e')][_0x2b52('0x48')]({'where':{'id':_0x5b1108[_0x2b52('0x41')]['id']},'attributes':['id',_0x2b52('0x59'),_0x2b52('0x5a'),_0x2b52('0x5b')]})[_0x2b52('0x23')](handleEntityNotFound(_0x1b3515,null))['then'](function(_0x2042b5){if(_0x2042b5){_0x159f22=_0x2042b5[_0x2b52('0x5b')];var _0x123cde=_0x159f22[_0x2b52('0x5c')](-0x1);if(_0x123cde==='/'){_0x159f22=_0x159f22['substring'](0x0,_0x159f22[_0x2b52('0x5d')](_0x123cde));}return rp({'method':_0x2b52('0x5e'),'uri':util[_0x2b52('0x5f')](_0x2b52('0x60'),_0x159f22,_0x2b52('0x61')),'json':!![],'form':{'method':_0x2b52('0x62'),'input_type':_0x2b52('0x63'),'response_type':_0x2b52('0x63'),'rest_data':JSON[_0x2b52('0x64')]({'user_auth':{'user_name':_0x2042b5[_0x2b52('0x59')],'password':_0x2042b5[_0x2b52('0x5a')],'encryption':_0x2b52('0x65')},'application':_0x2b52('0x66')})}});}})['then'](function(_0x565a30){if(_0x565a30&&_0x565a30[_0x2b52('0x26')]!=='Invalid\x20Login'&&_0x565a30[_0x2b52('0x26')]!==_0x2b52('0x67')){return rp({'method':_0x2b52('0x5e'),'uri':util[_0x2b52('0x5f')](_0x2b52('0x60'),_0x159f22,_0x2b52('0x61')),'json':!![],'form':{'method':_0x2b52('0x68'),'input_type':_0x2b52('0x63'),'response_type':'JSON','rest_data':JSON[_0x2b52('0x64')]({'session':_0x565a30['id'],'module_name':_0x2b52('0x69')})}})[_0x2b52('0x23')](function(_0x2c0481){if(_0x2c0481){var _0x1d1440=_['values'](_0x2c0481[_0x2b52('0x6a')]);_['remove'](_0x1d1440,function(_0x2a0ef7){return _0x3a44bd['includes'](_0x2a0ef7['name']);});return{'count':_0x1d1440[_0x2b52('0x31')],'rows':_[_0x2b52('0x28')](_0x1d1440,function(_0x51306b){return{'id':_0x51306b[_0x2b52('0x26')],'name':_0x51306b[_0x2b52('0x6b')],'custom':_[_0x2b52('0x6c')](_0x51306b['name'],'_c')?!![]:![],'options':_0x51306b[_0x2b52('0x3c')]?_[_0x2b52('0x28')](_['values'](_0x51306b[_0x2b52('0x3c')]),function(_0x376b3d){return{'name':_0x376b3d[_0x2b52('0x6d')],'value':_0x376b3d[_0x2b52('0x26')]};}):[]};})};}})[_0x2b52('0x23')](respondWithResult(_0x1b3515,null))[_0x2b52('0x40')](function(_0x2c438a){var _0x1615c3=_0x5b1108[_0x2b52('0x2d')][_0x2b52('0x6e')]?0x1f4:_0x2c438a['statusCode']||0x1f4;logger[_0x2b52('0x6f')]('getFields,\x20%s,\x20%s,\x20%s',_0x2b52('0x70'),_0x1615c3,JSON[_0x2b52('0x64')](_0x2c438a));delete _0x2c438a[_0x2b52('0x26')];if(_0x1615c3===0x191){_0x1615c3=0x190;}_0x1b3515[_0x2b52('0x1d')](_0x1615c3)['send'](_0x5b1108[_0x2b52('0x2d')][_0x2b52('0x6e')]?{'message':_0x2b52('0x71'),'statusCode':_0x2c438a[_0x2b52('0x72')]}:_0x2c438a);});}else{var _0xd2d83b=0x1f4;_0x1b3515[_0x2b52('0x1d')](_0xd2d83b)[_0x2b52('0x27')]({'message':_0x2b52('0x71'),'statusCode':0x190});}});};
\ No newline at end of file
index 65a3571..c8d7f6e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x27c2=['../../config/environment','../../components/integrations/configuration','exports','define','SugarcrmAccount','lodash','util','../../config/logger','api','moment','bluebird','rimraf'];(function(_0x2c16e8,_0x20eb85){var _0x4cec93=function(_0x333c1d){while(--_0x333c1d){_0x2c16e8['push'](_0x2c16e8['shift']());}};_0x4cec93(++_0x20eb85);}(_0x27c2,0x71));var _0x227c=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x27c2[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x227c('0x0'));var util=require(_0x227c('0x1'));var logger=require(_0x227c('0x2'))(_0x227c('0x3'));var moment=require(_0x227c('0x4'));var BPromise=require(_0x227c('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x227c('0x6'));var config=require(_0x227c('0x7'));var attributes=require('./intSugarcrmAccount.attributes');var integrations=require(_0x227c('0x8'));module[_0x227c('0x9')]=function(_0x3dcb55,_0x45ba86){return _0x3dcb55[_0x227c('0xa')](_0x227c('0xb'),attributes,{'tableName':'int_sugarcrm_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x759e=['util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intSugarcrmAccount.attributes','../../components/integrations/configuration','exports','define','SugarcrmAccount','int_sugarcrm_accounts','lodash'];(function(_0x42bdad,_0x12836c){var _0x122626=function(_0x2eb29c){while(--_0x2eb29c){_0x42bdad['push'](_0x42bdad['shift']());}};_0x122626(++_0x12836c);}(_0x759e,0xd1));var _0xe759=function(_0x59d08c,_0x595f68){_0x59d08c=_0x59d08c-0x0;var _0x172e6e=_0x759e[_0x59d08c];return _0x172e6e;};'use strict';var _=require(_0xe759('0x0'));var util=require(_0xe759('0x1'));var logger=require('../../config/logger')(_0xe759('0x2'));var moment=require(_0xe759('0x3'));var BPromise=require(_0xe759('0x4'));var rp=require(_0xe759('0x5'));var fs=require('fs');var path=require(_0xe759('0x6'));var rimraf=require(_0xe759('0x7'));var config=require(_0xe759('0x8'));var attributes=require(_0xe759('0x9'));var integrations=require(_0xe759('0xa'));module[_0xe759('0xb')]=function(_0x4bf712,_0x59057f){return _0x4bf712[_0xe759('0xc')](_0xe759('0xd'),attributes,{'tableName':_0xe759('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index bc14081..dfd2eb1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfdec=['where','ShowSugarcrmAccount','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','http','info','SugarcrmAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','findAll','options','raw','attributes','include','map','model','then','GetSugarcrmAccount','catch'];(function(_0x518775,_0x31ef03){var _0x1bdb17=function(_0x20e0c9){while(--_0x20e0c9){_0x518775['push'](_0x518775['shift']());}};_0x1bdb17(++_0x31ef03);}(_0xfdec,0x176));var _0xcfde=function(_0x3e78f4,_0x5d4c9a){_0x3e78f4=_0x3e78f4-0x0;var _0x5ca5eb=_0xfdec[_0x3e78f4];return _0x5ca5eb;};'use strict';var _=require('lodash');var util=require(_0xcfde('0x0'));var moment=require(_0xcfde('0x1'));var BPromise=require(_0xcfde('0x2'));var rs=require(_0xcfde('0x3'));var fs=require('fs');var Redis=require(_0xcfde('0x4'));var db=require(_0xcfde('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xcfde('0x6'))('rpc');var config=require(_0xcfde('0x7'));var jayson=require(_0xcfde('0x8'));var client=jayson['client'][_0xcfde('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3ca077,_0x56a061,_0x2be811){return new BPromise(function(_0x35c591,_0x2a1285){return client['request'](_0x3ca077,_0x2be811)['then'](function(_0x17cc10){logger[_0xcfde('0xa')](_0xcfde('0xb'),_0x56a061,_0xcfde('0xc'));logger[_0xcfde('0xd')]('SugarcrmAccount,\x20%s,\x20%s,\x20%s',_0x56a061,_0xcfde('0xc'),JSON[_0xcfde('0xe')](_0x17cc10));if(_0x17cc10[_0xcfde('0xf')]){if(_0x17cc10[_0xcfde('0xf')][_0xcfde('0x10')]===0x1f4){logger[_0xcfde('0xf')](_0xcfde('0xb'),_0x56a061,_0x17cc10[_0xcfde('0xf')][_0xcfde('0x11')]);return _0x2a1285(_0x17cc10[_0xcfde('0xf')]['message']);}logger[_0xcfde('0xf')](_0xcfde('0xb'),_0x56a061,_0x17cc10[_0xcfde('0xf')][_0xcfde('0x11')]);return _0x35c591(_0x17cc10[_0xcfde('0xf')][_0xcfde('0x11')]);}else{logger[_0xcfde('0xa')](_0xcfde('0xb'),_0x56a061,_0xcfde('0xc'));_0x35c591(_0x17cc10[_0xcfde('0x12')][_0xcfde('0x11')]);}})['catch'](function(_0x423bd7){logger[_0xcfde('0xf')](_0xcfde('0xb'),_0x56a061,_0x423bd7);_0x2a1285(_0x423bd7);});});}exports['GetSugarcrmAccount']=function(_0x5aa127){var _0x33921b=this;return new Promise(function(_0x2c6b39,_0x22ae51){return db['SugarcrmAccount'][_0xcfde('0x13')]({'raw':_0x5aa127[_0xcfde('0x14')]?_0x5aa127['options'][_0xcfde('0x15')]===undefined?!![]:![]:!![],'where':_0x5aa127[_0xcfde('0x14')]?_0x5aa127[_0xcfde('0x14')]['where']||null:null,'attributes':_0x5aa127['options']?_0x5aa127['options'][_0xcfde('0x16')]||null:null,'limit':_0x5aa127[_0xcfde('0x14')]?_0x5aa127[_0xcfde('0x14')]['limit']||null:null,'include':_0x5aa127[_0xcfde('0x14')]?_0x5aa127[_0xcfde('0x14')][_0xcfde('0x17')]?_[_0xcfde('0x18')](_0x5aa127[_0xcfde('0x14')][_0xcfde('0x17')],function(_0x5f5080){return{'model':db[_0x5f5080['model']],'as':_0x5f5080['as'],'attributes':_0x5f5080[_0xcfde('0x16')],'include':_0x5f5080[_0xcfde('0x17')]?_[_0xcfde('0x18')](_0x5f5080[_0xcfde('0x17')],function(_0x3faec9){return{'model':db[_0x3faec9[_0xcfde('0x19')]],'as':_0x3faec9['as'],'attributes':_0x3faec9['attributes'],'include':_0x3faec9['include']?_[_0xcfde('0x18')](_0x3faec9['include'],function(_0xe7909b){return{'model':db[_0xe7909b[_0xcfde('0x19')]],'as':_0xe7909b['as'],'attributes':_0xe7909b['attributes']};}):[]};}):[]};}):[]:[]})[_0xcfde('0x1a')](function(_0x3ae82d){logger[_0xcfde('0xa')](_0xcfde('0x1b'),_0x5aa127);logger[_0xcfde('0xd')](_0xcfde('0x1b'),_0x5aa127,JSON[_0xcfde('0xe')](_0x3ae82d));_0x2c6b39(_0x3ae82d);})[_0xcfde('0x1c')](function(_0x4df6e1){logger[_0xcfde('0xf')](_0xcfde('0x1b'),_0x4df6e1[_0xcfde('0x11')],_0x5aa127);_0x22ae51(_0x33921b['error'](0x1f4,_0x4df6e1[_0xcfde('0x11')]));});});};exports['ShowSugarcrmAccount']=function(_0xead28e){var _0x2a94a2=this;return new Promise(function(_0x1c236f,_0x596a7a){return db['SugarcrmAccount']['find']({'raw':_0xead28e[_0xcfde('0x14')]?_0xead28e[_0xcfde('0x14')][_0xcfde('0x15')]===undefined?!![]:![]:!![],'where':_0xead28e[_0xcfde('0x14')]?_0xead28e[_0xcfde('0x14')][_0xcfde('0x1d')]||null:null,'attributes':_0xead28e[_0xcfde('0x14')]?_0xead28e[_0xcfde('0x14')][_0xcfde('0x16')]||null:null,'include':_0xead28e['options']?_0xead28e[_0xcfde('0x14')]['include']?_[_0xcfde('0x18')](_0xead28e[_0xcfde('0x14')]['include'],function(_0x1c7025){return{'model':db[_0x1c7025[_0xcfde('0x19')]],'as':_0x1c7025['as'],'attributes':_0x1c7025['attributes'],'include':_0x1c7025[_0xcfde('0x17')]?_[_0xcfde('0x18')](_0x1c7025[_0xcfde('0x17')],function(_0x34f032){return{'model':db[_0x34f032[_0xcfde('0x19')]],'as':_0x34f032['as'],'attributes':_0x34f032['attributes'],'include':_0x34f032[_0xcfde('0x17')]?_[_0xcfde('0x18')](_0x34f032[_0xcfde('0x17')],function(_0x266d6d){return{'model':db[_0x266d6d[_0xcfde('0x19')]],'as':_0x266d6d['as'],'attributes':_0x266d6d[_0xcfde('0x16')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1a5cd2){logger[_0xcfde('0xa')](_0xcfde('0x1e'),_0xead28e);logger[_0xcfde('0xd')](_0xcfde('0x1e'),_0xead28e,JSON[_0xcfde('0xe')](_0x1a5cd2));_0x1c236f(_0x1a5cd2);})[_0xcfde('0x1c')](function(_0x53e08c){logger['error'](_0xcfde('0x1e'),_0x53e08c[_0xcfde('0x11')],_0xead28e);_0x596a7a(_0x2a94a2[_0xcfde('0xf')](0x1f4,_0x53e08c[_0xcfde('0x11')]));});});};
\ No newline at end of file
+var _0xc2bf=['limit','include','map','attributes','model','then','ShowSugarcrmAccount','SugarcrmAccount','raw','debug','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','request','SugarcrmAccount,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info','result','catch','GetSugarcrmAccount','findAll','options','where'];(function(_0x1a6cc3,_0x72951e){var _0x4a66e1=function(_0x3f8573){while(--_0x3f8573){_0x1a6cc3['push'](_0x1a6cc3['shift']());}};_0x4a66e1(++_0x72951e);}(_0xc2bf,0x70));var _0xfc2b=function(_0x26bb3f,_0x154461){_0x26bb3f=_0x26bb3f-0x0;var _0x4c7c79=_0xc2bf[_0x26bb3f];return _0x4c7c79;};'use strict';var _=require(_0xfc2b('0x0'));var util=require(_0xfc2b('0x1'));var moment=require(_0xfc2b('0x2'));var BPromise=require(_0xfc2b('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xfc2b('0x4'))['db'];var utils=require(_0xfc2b('0x5'));var logger=require(_0xfc2b('0x6'))(_0xfc2b('0x7'));var config=require('../../config/environment');var jayson=require(_0xfc2b('0x8'));var client=jayson['client'][_0xfc2b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x11bb2a,_0xdc7dbb,_0x42ddce){return new BPromise(function(_0x5378bb,_0xff880a){return client[_0xfc2b('0xa')](_0x11bb2a,_0x42ddce)['then'](function(_0xac6d6e){logger['info'](_0xfc2b('0xb'),_0xdc7dbb,'request\x20sent');logger['debug']('SugarcrmAccount,\x20%s,\x20%s,\x20%s',_0xdc7dbb,_0xfc2b('0xc'),JSON[_0xfc2b('0xd')](_0xac6d6e));if(_0xac6d6e['error']){if(_0xac6d6e[_0xfc2b('0xe')][_0xfc2b('0xf')]===0x1f4){logger[_0xfc2b('0xe')](_0xfc2b('0xb'),_0xdc7dbb,_0xac6d6e['error'][_0xfc2b('0x10')]);return _0xff880a(_0xac6d6e[_0xfc2b('0xe')][_0xfc2b('0x10')]);}logger[_0xfc2b('0xe')]('SugarcrmAccount,\x20%s,\x20%s',_0xdc7dbb,_0xac6d6e[_0xfc2b('0xe')][_0xfc2b('0x10')]);return _0x5378bb(_0xac6d6e[_0xfc2b('0xe')][_0xfc2b('0x10')]);}else{logger[_0xfc2b('0x11')](_0xfc2b('0xb'),_0xdc7dbb,_0xfc2b('0xc'));_0x5378bb(_0xac6d6e[_0xfc2b('0x12')][_0xfc2b('0x10')]);}})[_0xfc2b('0x13')](function(_0x5039b3){logger[_0xfc2b('0xe')](_0xfc2b('0xb'),_0xdc7dbb,_0x5039b3);_0xff880a(_0x5039b3);});});}exports[_0xfc2b('0x14')]=function(_0x2f20f2){var _0x34502c=this;return new Promise(function(_0x204dbc,_0x57a414){return db['SugarcrmAccount'][_0xfc2b('0x15')]({'raw':_0x2f20f2[_0xfc2b('0x16')]?_0x2f20f2[_0xfc2b('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x2f20f2[_0xfc2b('0x16')]?_0x2f20f2[_0xfc2b('0x16')][_0xfc2b('0x17')]||null:null,'attributes':_0x2f20f2[_0xfc2b('0x16')]?_0x2f20f2[_0xfc2b('0x16')]['attributes']||null:null,'limit':_0x2f20f2[_0xfc2b('0x16')]?_0x2f20f2[_0xfc2b('0x16')][_0xfc2b('0x18')]||null:null,'include':_0x2f20f2[_0xfc2b('0x16')]?_0x2f20f2[_0xfc2b('0x16')][_0xfc2b('0x19')]?_[_0xfc2b('0x1a')](_0x2f20f2[_0xfc2b('0x16')][_0xfc2b('0x19')],function(_0x5a4412){return{'model':db[_0x5a4412['model']],'as':_0x5a4412['as'],'attributes':_0x5a4412[_0xfc2b('0x1b')],'include':_0x5a4412['include']?_['map'](_0x5a4412['include'],function(_0x24b416){return{'model':db[_0x24b416[_0xfc2b('0x1c')]],'as':_0x24b416['as'],'attributes':_0x24b416[_0xfc2b('0x1b')],'include':_0x24b416[_0xfc2b('0x19')]?_[_0xfc2b('0x1a')](_0x24b416[_0xfc2b('0x19')],function(_0x2ba3e0){return{'model':db[_0x2ba3e0[_0xfc2b('0x1c')]],'as':_0x2ba3e0['as'],'attributes':_0x2ba3e0[_0xfc2b('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xfc2b('0x1d')](function(_0xd4dd0c){logger[_0xfc2b('0x11')](_0xfc2b('0x14'),_0x2f20f2);logger['debug']('GetSugarcrmAccount',_0x2f20f2,JSON[_0xfc2b('0xd')](_0xd4dd0c));_0x204dbc(_0xd4dd0c);})[_0xfc2b('0x13')](function(_0xc2aedd){logger[_0xfc2b('0xe')](_0xfc2b('0x14'),_0xc2aedd[_0xfc2b('0x10')],_0x2f20f2);_0x57a414(_0x34502c[_0xfc2b('0xe')](0x1f4,_0xc2aedd[_0xfc2b('0x10')]));});});};exports[_0xfc2b('0x1e')]=function(_0x434a71){var _0x5ba487=this;return new Promise(function(_0xa98eea,_0x3132d6){return db[_0xfc2b('0x1f')]['find']({'raw':_0x434a71[_0xfc2b('0x16')]?_0x434a71[_0xfc2b('0x16')][_0xfc2b('0x20')]===undefined?!![]:![]:!![],'where':_0x434a71[_0xfc2b('0x16')]?_0x434a71['options'][_0xfc2b('0x17')]||null:null,'attributes':_0x434a71[_0xfc2b('0x16')]?_0x434a71[_0xfc2b('0x16')][_0xfc2b('0x1b')]||null:null,'include':_0x434a71[_0xfc2b('0x16')]?_0x434a71[_0xfc2b('0x16')][_0xfc2b('0x19')]?_[_0xfc2b('0x1a')](_0x434a71[_0xfc2b('0x16')][_0xfc2b('0x19')],function(_0xcdcd5e){return{'model':db[_0xcdcd5e[_0xfc2b('0x1c')]],'as':_0xcdcd5e['as'],'attributes':_0xcdcd5e[_0xfc2b('0x1b')],'include':_0xcdcd5e[_0xfc2b('0x19')]?_[_0xfc2b('0x1a')](_0xcdcd5e[_0xfc2b('0x19')],function(_0x49f1f3){return{'model':db[_0x49f1f3[_0xfc2b('0x1c')]],'as':_0x49f1f3['as'],'attributes':_0x49f1f3[_0xfc2b('0x1b')],'include':_0x49f1f3['include']?_['map'](_0x49f1f3['include'],function(_0x25e2f0){return{'model':db[_0x25e2f0[_0xfc2b('0x1c')]],'as':_0x25e2f0['as'],'attributes':_0x25e2f0[_0xfc2b('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x46cfa4){logger[_0xfc2b('0x11')](_0xfc2b('0x1e'),_0x434a71);logger[_0xfc2b('0x21')](_0xfc2b('0x1e'),_0x434a71,JSON['stringify'](_0x46cfa4));_0xa98eea(_0x46cfa4);})['catch'](function(_0x429fca){logger['error'](_0xfc2b('0x1e'),_0x429fca[_0xfc2b('0x10')],_0x434a71);_0x3132d6(_0x5ba487[_0xfc2b('0xe')](0x1f4,_0x429fca[_0xfc2b('0x10')]));});});};
\ No newline at end of file
index 0be0a4e..f219c39 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x70b2=['isAuthenticated','index','/:id','show','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','create','put','update','delete','destroy','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSugarcrmConfiguration.controller','get'];(function(_0x66bfe8,_0x5e10fb){var _0x16b08a=function(_0x2ef6a5){while(--_0x2ef6a5){_0x66bfe8['push'](_0x66bfe8['shift']());}};_0x16b08a(++_0x5e10fb);}(_0x70b2,0x6e));var _0x270b=function(_0x15584a,_0x5870db){_0x15584a=_0x15584a-0x0;var _0x50df3a=_0x70b2[_0x15584a];return _0x50df3a;};'use strict';var multer=require('multer');var util=require(_0x270b('0x0'));var path=require(_0x270b('0x1'));var timeout=require('connect-timeout');var express=require(_0x270b('0x2'));var router=express[_0x270b('0x3')]();var fs_extra=require(_0x270b('0x4'));var auth=require(_0x270b('0x5'));var interaction=require(_0x270b('0x6'));var config=require(_0x270b('0x7'));var controller=require(_0x270b('0x8'));router[_0x270b('0x9')]('/',auth[_0x270b('0xa')](),controller[_0x270b('0xb')]);router[_0x270b('0x9')](_0x270b('0xc'),auth[_0x270b('0xa')](),controller[_0x270b('0xd')]);router[_0x270b('0x9')]('/:id/fields',auth['isAuthenticated'](),controller['getFields']);router['get'](_0x270b('0xe'),auth[_0x270b('0xa')](),controller[_0x270b('0xf')]);router[_0x270b('0x9')](_0x270b('0x10'),auth[_0x270b('0xa')](),controller[_0x270b('0x11')]);router[_0x270b('0x12')]('/',auth[_0x270b('0xa')](),controller[_0x270b('0x13')]);router[_0x270b('0x14')](_0x270b('0xc'),auth[_0x270b('0xa')](),controller[_0x270b('0x15')]);router[_0x270b('0x16')](_0x270b('0xc'),auth[_0x270b('0xa')](),controller[_0x270b('0x17')]);module['exports']=router;
\ No newline at end of file
+var _0xbf06=['create','put','update','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','./intSugarcrmConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','getDescriptions','post'];(function(_0x1179d2,_0x928deb){var _0x4d54f6=function(_0x58df79){while(--_0x58df79){_0x1179d2['push'](_0x1179d2['shift']());}};_0x4d54f6(++_0x928deb);}(_0xbf06,0x101));var _0x6bf0=function(_0x38ced4,_0x24263f){_0x38ced4=_0x38ced4-0x0;var _0x547c07=_0xbf06[_0x38ced4];return _0x547c07;};'use strict';var multer=require('multer');var util=require(_0x6bf0('0x0'));var path=require(_0x6bf0('0x1'));var timeout=require(_0x6bf0('0x2'));var express=require(_0x6bf0('0x3'));var router=express[_0x6bf0('0x4')]();var fs_extra=require(_0x6bf0('0x5'));var auth=require(_0x6bf0('0x6'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x6bf0('0x7'));router[_0x6bf0('0x8')]('/',auth[_0x6bf0('0x9')](),controller[_0x6bf0('0xa')]);router['get'](_0x6bf0('0xb'),auth[_0x6bf0('0x9')](),controller[_0x6bf0('0xc')]);router[_0x6bf0('0x8')](_0x6bf0('0xd'),auth['isAuthenticated'](),controller[_0x6bf0('0xe')]);router[_0x6bf0('0x8')](_0x6bf0('0xf'),auth[_0x6bf0('0x9')](),controller[_0x6bf0('0x10')]);router['get']('/:id/descriptions',auth[_0x6bf0('0x9')](),controller[_0x6bf0('0x11')]);router[_0x6bf0('0x12')]('/',auth[_0x6bf0('0x9')](),controller[_0x6bf0('0x13')]);router[_0x6bf0('0x14')](_0x6bf0('0xb'),auth[_0x6bf0('0x9')](),controller[_0x6bf0('0x15')]);router['delete']('/:id',auth['isAuthenticated'](),controller['destroy']);module[_0x6bf0('0x16')]=router;
\ No newline at end of file
index d22c833..224c9cf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbfcc=['STRING','sequelize','exports'];(function(_0x26bbd9,_0x27f48f){var _0x57849c=function(_0xf6039d){while(--_0xf6039d){_0x26bbd9['push'](_0x26bbd9['shift']());}};_0x57849c(++_0x27f48f);}(_0xbfcc,0x6d));var _0xcbfc=function(_0x20cb20,_0x256051){_0x20cb20=_0x20cb20-0x0;var _0x2fcf4b=_0xbfcc[_0x20cb20];return _0x2fcf4b;};'use strict';var Sequelize=require(_0xcbfc('0x0'));module[_0xcbfc('0x1')]={'name':{'type':Sequelize[_0xcbfc('0x2')]},'description':{'type':Sequelize[_0xcbfc('0x2')]}};
\ No newline at end of file
+var _0xea26=['STRING','sequelize','exports'];(function(_0x19258b,_0x22e850){var _0x5be66a=function(_0x24e321){while(--_0x24e321){_0x19258b['push'](_0x19258b['shift']());}};_0x5be66a(++_0x22e850);}(_0xea26,0xb2));var _0x6ea2=function(_0x2e5333,_0x495fee){_0x2e5333=_0x2e5333-0x0;var _0x22508a=_0xea26[_0x2e5333];return _0x22508a;};'use strict';var Sequelize=require(_0x6ea2('0x0'));module[_0x6ea2('0x1')]={'name':{'type':Sequelize[_0x6ea2('0x2')]},'description':{'type':Sequelize[_0x6ea2('0x2')]}};
\ No newline at end of file
index 6c78ca3..7654d8d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfe24=['../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','end','json','offset','undefined','limit','count','set','reject','save','update','destroy','then','error','name','send','index','SugarcrmConfiguration','rawAttributes','type','key','model','map','query','keys','attributes','intersection','fields','length','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','options','includeAll','include','findAll','rows','catch','show','params','find','create','body','getFields','findOne','SugarcrmField','filters','hasOwnProperty','getSubjects','getDescriptions','eml-format','fast-json-patch','moment','bluebird','mustache','util','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','papaparse','ioredis'];(function(_0x1a21d4,_0x42f41a){var _0x2434a9=function(_0x564512){while(--_0x564512){_0x1a21d4['push'](_0x1a21d4['shift']());}};_0x2434a9(++_0x42f41a);}(_0xfe24,0x129));var _0x4fe2=function(_0x42234e,_0x556ec2){_0x42234e=_0x42234e-0x0;var _0x3d8cf2=_0xfe24[_0x42234e];return _0x3d8cf2;};'use strict';var emlformat=require(_0x4fe2('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x4fe2('0x1'));var rp=require('request-promise');var moment=require(_0x4fe2('0x2'));var BPromise=require(_0x4fe2('0x3'));var Mustache=require(_0x4fe2('0x4'));var util=require(_0x4fe2('0x5'));var path=require('path');var sox=require('sox');var csv=require(_0x4fe2('0x6'));var ejs=require(_0x4fe2('0x7'));var fs=require('fs');var fs_extra=require(_0x4fe2('0x8'));var _=require(_0x4fe2('0x9'));var squel=require(_0x4fe2('0xa'));var crypto=require(_0x4fe2('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x4fe2('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x4fe2('0xd'));var Redis=require(_0x4fe2('0xe'));var authService=require(_0x4fe2('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x4fe2('0x10'));var hardwareService=require(_0x4fe2('0x11'));var logger=require(_0x4fe2('0x12'))(_0x4fe2('0x13'));var utils=require(_0x4fe2('0x14'));var config=require('../../config/environment');var licenseUtil=require(_0x4fe2('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x27f020,_0x4637d8){_0x4637d8=_0x4637d8||0xcc;return function(_0x3a5ff3){if(_0x3a5ff3){return _0x27f020[_0x4fe2('0x16')](_0x4637d8);}return _0x27f020[_0x4fe2('0x17')](_0x4637d8)[_0x4fe2('0x18')]();};}function respondWithResult(_0x35b231,_0x2e23d4){_0x2e23d4=_0x2e23d4||0xc8;return function(_0x1ec93e){if(_0x1ec93e){return _0x35b231[_0x4fe2('0x17')](_0x2e23d4)[_0x4fe2('0x19')](_0x1ec93e);}};}function respondWithFilteredResult(_0x588711,_0x41db10){return function(_0x477143){if(_0x477143){var _0x555074=typeof _0x41db10[_0x4fe2('0x1a')]===_0x4fe2('0x1b')&&typeof _0x41db10[_0x4fe2('0x1c')]===_0x4fe2('0x1b');var _0x159f8c=_0x477143[_0x4fe2('0x1d')];var _0x2079d0=_0x555074?0x0:_0x41db10[_0x4fe2('0x1a')];var _0x103e40=_0x555074?_0x477143[_0x4fe2('0x1d')]:_0x41db10[_0x4fe2('0x1a')]+_0x41db10[_0x4fe2('0x1c')];var _0x49332c;if(_0x103e40>=_0x159f8c){_0x103e40=_0x159f8c;_0x49332c=0xc8;}else{_0x49332c=0xce;}_0x588711[_0x4fe2('0x17')](_0x49332c);return _0x588711[_0x4fe2('0x1e')]('Content-Range',_0x2079d0+'-'+_0x103e40+'/'+_0x159f8c)[_0x4fe2('0x19')](_0x477143);}return null;};}function patchUpdates(_0x1ccccd){return function(_0x4f2285){try{jsonpatch['apply'](_0x4f2285,_0x1ccccd,!![]);}catch(_0x3156be){return BPromise[_0x4fe2('0x1f')](_0x3156be);}return _0x4f2285[_0x4fe2('0x20')]();};}function saveUpdates(_0x2a8e49,_0xa8cf74){return function(_0x32f103){if(_0x32f103){return _0x32f103[_0x4fe2('0x21')](_0x2a8e49)['then'](function(_0x47daeb){return _0x47daeb;});}return null;};}function removeEntity(_0x6ccac3,_0x2fa9d0){return function(_0x407fed){if(_0x407fed){return _0x407fed[_0x4fe2('0x22')]()[_0x4fe2('0x23')](function(){_0x6ccac3['status'](0xcc)[_0x4fe2('0x18')]();});}};}function handleEntityNotFound(_0xfd8374,_0x30a857){return function(_0x131619){if(!_0x131619){_0xfd8374[_0x4fe2('0x16')](0x194);}return _0x131619;};}function handleError(_0x292d43,_0x2f089f){_0x2f089f=_0x2f089f||0x1f4;return function(_0xc5394e){logger[_0x4fe2('0x24')](_0xc5394e['stack']);if(_0xc5394e[_0x4fe2('0x25')]){delete _0xc5394e[_0x4fe2('0x25')];}_0x292d43[_0x4fe2('0x17')](_0x2f089f)[_0x4fe2('0x26')](_0xc5394e);};}exports[_0x4fe2('0x27')]=function(_0x575318,_0xe92c48){var _0x1386c6={},_0x325dce={},_0x55222e={'count':0x0,'rows':[]};var _0x464879=_['map'](db[_0x4fe2('0x28')][_0x4fe2('0x29')],function(_0x4f4730){return{'name':_0x4f4730['fieldName'],'type':_0x4f4730[_0x4fe2('0x2a')][_0x4fe2('0x2b')]};});_0x325dce[_0x4fe2('0x2c')]=_[_0x4fe2('0x2d')](_0x464879,_0x4fe2('0x25'));_0x325dce[_0x4fe2('0x2e')]=_[_0x4fe2('0x2f')](_0x575318[_0x4fe2('0x2e')]);_0x325dce['filters']=_['intersection'](_0x325dce[_0x4fe2('0x2c')],_0x325dce[_0x4fe2('0x2e')]);_0x1386c6[_0x4fe2('0x30')]=_[_0x4fe2('0x31')](_0x325dce[_0x4fe2('0x2c')],qs[_0x4fe2('0x32')](_0x575318['query'][_0x4fe2('0x32')]));_0x1386c6[_0x4fe2('0x30')]=_0x1386c6['attributes'][_0x4fe2('0x33')]?_0x1386c6['attributes']:_0x325dce[_0x4fe2('0x2c')];if(!_0x575318[_0x4fe2('0x2e')]['hasOwnProperty'](_0x4fe2('0x34'))){_0x1386c6[_0x4fe2('0x1c')]=qs[_0x4fe2('0x1c')](_0x575318[_0x4fe2('0x2e')]['limit']);_0x1386c6[_0x4fe2('0x1a')]=qs[_0x4fe2('0x1a')](_0x575318[_0x4fe2('0x2e')][_0x4fe2('0x1a')]);}_0x1386c6[_0x4fe2('0x35')]=qs[_0x4fe2('0x36')](_0x575318[_0x4fe2('0x2e')][_0x4fe2('0x36')]);_0x1386c6[_0x4fe2('0x37')]=qs['filters'](_[_0x4fe2('0x38')](_0x575318[_0x4fe2('0x2e')],_0x325dce['filters']),_0x464879);if(_0x575318[_0x4fe2('0x2e')]['filter']){_0x1386c6[_0x4fe2('0x37')]=_[_0x4fe2('0x39')](_0x1386c6[_0x4fe2('0x37')],{'$or':_['map'](_0x464879,function(_0x372f9e){if(_0x372f9e[_0x4fe2('0x2a')]!==_0x4fe2('0x3a')){var _0x56711b={};_0x56711b[_0x372f9e[_0x4fe2('0x25')]]={'$like':'%'+_0x575318[_0x4fe2('0x2e')][_0x4fe2('0x3b')]+'%'};return _0x56711b;}})});}_0x1386c6=_[_0x4fe2('0x39')]({},_0x1386c6,_0x575318[_0x4fe2('0x3c')]);var _0x5e0caa={'where':_0x1386c6[_0x4fe2('0x37')]};return db[_0x4fe2('0x28')][_0x4fe2('0x1d')](_0x5e0caa)['then'](function(_0x304a40){_0x55222e[_0x4fe2('0x1d')]=_0x304a40;if(_0x575318[_0x4fe2('0x2e')][_0x4fe2('0x3d')]){_0x1386c6[_0x4fe2('0x3e')]=[{'all':!![]}];}return db['SugarcrmConfiguration'][_0x4fe2('0x3f')](_0x1386c6);})[_0x4fe2('0x23')](function(_0x629505){_0x55222e[_0x4fe2('0x40')]=_0x629505;return _0x55222e;})[_0x4fe2('0x23')](respondWithFilteredResult(_0xe92c48,_0x1386c6))[_0x4fe2('0x41')](handleError(_0xe92c48,null));};exports[_0x4fe2('0x42')]=function(_0x27357f,_0x182a69){var _0x11a2f={'raw':![],'where':{'id':_0x27357f[_0x4fe2('0x43')]['id']}},_0x238c6e={};_0x238c6e['model']=_[_0x4fe2('0x2f')](db[_0x4fe2('0x28')][_0x4fe2('0x29')]);_0x238c6e['query']=_[_0x4fe2('0x2f')](_0x27357f[_0x4fe2('0x2e')]);_0x238c6e['filters']=_[_0x4fe2('0x31')](_0x238c6e['model'],_0x238c6e[_0x4fe2('0x2e')]);_0x11a2f[_0x4fe2('0x30')]=_[_0x4fe2('0x31')](_0x238c6e['model'],qs['fields'](_0x27357f[_0x4fe2('0x2e')]['fields']));_0x11a2f[_0x4fe2('0x30')]=_0x11a2f[_0x4fe2('0x30')][_0x4fe2('0x33')]?_0x11a2f[_0x4fe2('0x30')]:_0x238c6e['model'];if(_0x27357f['query']['includeAll']){_0x11a2f[_0x4fe2('0x3e')]=[{'all':!![]}];}_0x11a2f=_[_0x4fe2('0x39')]({},_0x11a2f,_0x27357f[_0x4fe2('0x3c')]);return db[_0x4fe2('0x28')][_0x4fe2('0x44')](_0x11a2f)[_0x4fe2('0x23')](handleEntityNotFound(_0x182a69,null))[_0x4fe2('0x23')](respondWithResult(_0x182a69,null))['catch'](handleError(_0x182a69,null));};exports[_0x4fe2('0x45')]=function(_0x170112,_0x529a73){return db[_0x4fe2('0x28')][_0x4fe2('0x45')](_0x170112[_0x4fe2('0x46')],{})['then'](respondWithResult(_0x529a73,0xc9))[_0x4fe2('0x41')](handleError(_0x529a73,null));};exports[_0x4fe2('0x21')]=function(_0x4ec6b8,_0x281afb){if(_0x4ec6b8[_0x4fe2('0x46')]['id']){delete _0x4ec6b8[_0x4fe2('0x46')]['id'];}return db[_0x4fe2('0x28')][_0x4fe2('0x44')]({'where':{'id':_0x4ec6b8[_0x4fe2('0x43')]['id']}})[_0x4fe2('0x23')](handleEntityNotFound(_0x281afb,null))[_0x4fe2('0x23')](saveUpdates(_0x4ec6b8[_0x4fe2('0x46')],null))[_0x4fe2('0x23')](respondWithResult(_0x281afb,null))[_0x4fe2('0x41')](handleError(_0x281afb,null));};exports[_0x4fe2('0x22')]=function(_0x5c5820,_0x34b6cd){return db['SugarcrmConfiguration'][_0x4fe2('0x44')]({'where':{'id':_0x5c5820['params']['id']}})[_0x4fe2('0x23')](handleEntityNotFound(_0x34b6cd,null))[_0x4fe2('0x23')](removeEntity(_0x34b6cd,null))['catch'](handleError(_0x34b6cd,null));};exports[_0x4fe2('0x47')]=function(_0x10b7c3,_0x535363,_0x5e2af8){var _0x599d79={};var _0x4d369e={};var _0x3da89d;var _0x335511;return db[_0x4fe2('0x28')][_0x4fe2('0x48')]({'where':{'id':_0x10b7c3[_0x4fe2('0x43')]['id']}})[_0x4fe2('0x23')](handleEntityNotFound(_0x535363,null))[_0x4fe2('0x23')](function(_0x461736){if(_0x461736){_0x3da89d=_0x461736;_0x4d369e['model']=_[_0x4fe2('0x2f')](db[_0x4fe2('0x49')]['rawAttributes']);_0x4d369e[_0x4fe2('0x2e')]=_[_0x4fe2('0x2f')](_0x10b7c3[_0x4fe2('0x2e')]);_0x4d369e[_0x4fe2('0x4a')]=_[_0x4fe2('0x31')](_0x4d369e['model'],_0x4d369e[_0x4fe2('0x2e')]);_0x599d79[_0x4fe2('0x30')]=_[_0x4fe2('0x31')](_0x4d369e['model'],qs[_0x4fe2('0x32')](_0x10b7c3[_0x4fe2('0x2e')][_0x4fe2('0x32')]));_0x599d79[_0x4fe2('0x30')]=_0x599d79['attributes'][_0x4fe2('0x33')]?_0x599d79[_0x4fe2('0x30')]:_0x4d369e[_0x4fe2('0x2c')];_0x599d79['order']=qs['sort'](_0x10b7c3['query'][_0x4fe2('0x36')]);_0x599d79[_0x4fe2('0x37')]=qs['filters'](_[_0x4fe2('0x38')](_0x10b7c3['query'],_0x4d369e[_0x4fe2('0x4a')]));if(_0x10b7c3[_0x4fe2('0x2e')]['filter']){_0x599d79[_0x4fe2('0x37')]=_['merge'](_0x599d79[_0x4fe2('0x37')],{'$or':_['map'](_0x599d79[_0x4fe2('0x30')],function(_0x44309a){var _0x104d90={};_0x104d90[_0x44309a]={'$like':'%'+_0x10b7c3[_0x4fe2('0x2e')][_0x4fe2('0x3b')]+'%'};return _0x104d90;})});}_0x599d79=_[_0x4fe2('0x39')]({},_0x599d79,_0x10b7c3[_0x4fe2('0x3c')]);return _0x3da89d[_0x4fe2('0x47')](_0x599d79);}})[_0x4fe2('0x23')](function(_0x5cd10c){if(_0x5cd10c){_0x335511=_0x5cd10c['length'];if(!_0x10b7c3[_0x4fe2('0x2e')][_0x4fe2('0x4b')](_0x4fe2('0x34'))){_0x599d79[_0x4fe2('0x1c')]=qs['limit'](_0x10b7c3[_0x4fe2('0x2e')][_0x4fe2('0x1c')]);_0x599d79[_0x4fe2('0x1a')]=qs['offset'](_0x10b7c3[_0x4fe2('0x2e')]['offset']);}return _0x3da89d['getFields'](_0x599d79);}})[_0x4fe2('0x23')](function(_0x738939){if(_0x738939){return _0x738939?{'count':_0x335511,'rows':_0x738939}:null;}})[_0x4fe2('0x23')](respondWithResult(_0x535363,null))['catch'](handleError(_0x535363,null));};exports[_0x4fe2('0x4c')]=function(_0x403c95,_0x2a6076,_0x5836e4){var _0x47cd6a={};var _0x23dcb9={};var _0x2d2a1f;var _0x119ff3;return db['SugarcrmConfiguration'][_0x4fe2('0x48')]({'where':{'id':_0x403c95[_0x4fe2('0x43')]['id']}})[_0x4fe2('0x23')](handleEntityNotFound(_0x2a6076,null))['then'](function(_0x3fd462){if(_0x3fd462){_0x2d2a1f=_0x3fd462;_0x23dcb9[_0x4fe2('0x2c')]=_[_0x4fe2('0x2f')](db['SugarcrmField'][_0x4fe2('0x29')]);_0x23dcb9[_0x4fe2('0x2e')]=_[_0x4fe2('0x2f')](_0x403c95['query']);_0x23dcb9[_0x4fe2('0x4a')]=_[_0x4fe2('0x31')](_0x23dcb9[_0x4fe2('0x2c')],_0x23dcb9[_0x4fe2('0x2e')]);_0x47cd6a['attributes']=_['intersection'](_0x23dcb9[_0x4fe2('0x2c')],qs[_0x4fe2('0x32')](_0x403c95[_0x4fe2('0x2e')][_0x4fe2('0x32')]));_0x47cd6a['attributes']=_0x47cd6a[_0x4fe2('0x30')][_0x4fe2('0x33')]?_0x47cd6a[_0x4fe2('0x30')]:_0x23dcb9[_0x4fe2('0x2c')];_0x47cd6a[_0x4fe2('0x35')]=qs[_0x4fe2('0x36')](_0x403c95[_0x4fe2('0x2e')][_0x4fe2('0x36')]);_0x47cd6a[_0x4fe2('0x37')]=qs[_0x4fe2('0x4a')](_[_0x4fe2('0x38')](_0x403c95['query'],_0x23dcb9['filters']));if(_0x403c95[_0x4fe2('0x2e')][_0x4fe2('0x3b')]){_0x47cd6a['where']=_[_0x4fe2('0x39')](_0x47cd6a['where'],{'$or':_[_0x4fe2('0x2d')](_0x47cd6a[_0x4fe2('0x30')],function(_0x5cdc90){var _0x10f881={};_0x10f881[_0x5cdc90]={'$like':'%'+_0x403c95[_0x4fe2('0x2e')][_0x4fe2('0x3b')]+'%'};return _0x10f881;})});}_0x47cd6a=_[_0x4fe2('0x39')]({},_0x47cd6a,_0x403c95[_0x4fe2('0x3c')]);return _0x2d2a1f['getSubjects'](_0x47cd6a);}})[_0x4fe2('0x23')](function(_0x5e981e){if(_0x5e981e){_0x119ff3=_0x5e981e[_0x4fe2('0x33')];if(!_0x403c95[_0x4fe2('0x2e')]['hasOwnProperty'](_0x4fe2('0x34'))){_0x47cd6a[_0x4fe2('0x1c')]=qs[_0x4fe2('0x1c')](_0x403c95[_0x4fe2('0x2e')]['limit']);_0x47cd6a[_0x4fe2('0x1a')]=qs[_0x4fe2('0x1a')](_0x403c95[_0x4fe2('0x2e')][_0x4fe2('0x1a')]);}return _0x2d2a1f['getSubjects'](_0x47cd6a);}})['then'](function(_0x51bdf0){if(_0x51bdf0){return _0x51bdf0?{'count':_0x119ff3,'rows':_0x51bdf0}:null;}})[_0x4fe2('0x23')](respondWithResult(_0x2a6076,null))['catch'](handleError(_0x2a6076,null));};exports[_0x4fe2('0x4d')]=function(_0x17bb1d,_0x5297c3,_0x1ab18a){var _0x2b4c9c={};var _0x37eae0={};var _0x370c9c;var _0x2e1f77;return db[_0x4fe2('0x28')]['findOne']({'where':{'id':_0x17bb1d[_0x4fe2('0x43')]['id']}})[_0x4fe2('0x23')](handleEntityNotFound(_0x5297c3,null))[_0x4fe2('0x23')](function(_0x7996ac){if(_0x7996ac){_0x370c9c=_0x7996ac;_0x37eae0[_0x4fe2('0x2c')]=_[_0x4fe2('0x2f')](db[_0x4fe2('0x49')]['rawAttributes']);_0x37eae0[_0x4fe2('0x2e')]=_[_0x4fe2('0x2f')](_0x17bb1d[_0x4fe2('0x2e')]);_0x37eae0[_0x4fe2('0x4a')]=_[_0x4fe2('0x31')](_0x37eae0['model'],_0x37eae0[_0x4fe2('0x2e')]);_0x2b4c9c[_0x4fe2('0x30')]=_[_0x4fe2('0x31')](_0x37eae0[_0x4fe2('0x2c')],qs['fields'](_0x17bb1d[_0x4fe2('0x2e')]['fields']));_0x2b4c9c[_0x4fe2('0x30')]=_0x2b4c9c[_0x4fe2('0x30')][_0x4fe2('0x33')]?_0x2b4c9c[_0x4fe2('0x30')]:_0x37eae0[_0x4fe2('0x2c')];_0x2b4c9c['order']=qs['sort'](_0x17bb1d[_0x4fe2('0x2e')][_0x4fe2('0x36')]);_0x2b4c9c[_0x4fe2('0x37')]=qs['filters'](_['pick'](_0x17bb1d['query'],_0x37eae0[_0x4fe2('0x4a')]));if(_0x17bb1d[_0x4fe2('0x2e')][_0x4fe2('0x3b')]){_0x2b4c9c[_0x4fe2('0x37')]=_['merge'](_0x2b4c9c[_0x4fe2('0x37')],{'$or':_[_0x4fe2('0x2d')](_0x2b4c9c[_0x4fe2('0x30')],function(_0x1a5995){var _0x5155fc={};_0x5155fc[_0x1a5995]={'$like':'%'+_0x17bb1d[_0x4fe2('0x2e')]['filter']+'%'};return _0x5155fc;})});}_0x2b4c9c=_['merge']({},_0x2b4c9c,_0x17bb1d['options']);return _0x370c9c[_0x4fe2('0x4d')](_0x2b4c9c);}})[_0x4fe2('0x23')](function(_0x3672b3){if(_0x3672b3){_0x2e1f77=_0x3672b3[_0x4fe2('0x33')];if(!_0x17bb1d['query'][_0x4fe2('0x4b')](_0x4fe2('0x34'))){_0x2b4c9c[_0x4fe2('0x1c')]=qs[_0x4fe2('0x1c')](_0x17bb1d[_0x4fe2('0x2e')][_0x4fe2('0x1c')]);_0x2b4c9c[_0x4fe2('0x1a')]=qs['offset'](_0x17bb1d[_0x4fe2('0x2e')][_0x4fe2('0x1a')]);}return _0x370c9c[_0x4fe2('0x4d')](_0x2b4c9c);}})['then'](function(_0x464f8b){if(_0x464f8b){return _0x464f8b?{'count':_0x2e1f77,'rows':_0x464f8b}:null;}})[_0x4fe2('0x23')](respondWithResult(_0x5297c3,null))[_0x4fe2('0x41')](handleError(_0x5297c3,null));};
\ No newline at end of file
+var _0x6e9f=['offset','status','Content-Range','apply','reject','update','then','error','name','map','rawAttributes','fieldName','type','key','keys','query','filters','model','fields','attributes','length','sort','where','pick','filter','merge','options','includeAll','SugarcrmConfiguration','findAll','show','params','intersection','include','find','catch','create','body','SugarcrmField','order','hasOwnProperty','nolimit','getSubjects','findOne','getDescriptions','eml-format','fast-json-patch','request-promise','moment','mustache','path','sox','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','sendStatus','end','json','limit','undefined','count'];(function(_0x513c98,_0x36d3c1){var _0x59d12f=function(_0x27ca1e){while(--_0x27ca1e){_0x513c98['push'](_0x513c98['shift']());}};_0x59d12f(++_0x36d3c1);}(_0x6e9f,0x195));var _0xf6e9=function(_0x705dc,_0x333cb5){_0x705dc=_0x705dc-0x0;var _0x26c704=_0x6e9f[_0x705dc];return _0x26c704;};'use strict';var emlformat=require(_0xf6e9('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xf6e9('0x1'));var rp=require(_0xf6e9('0x2'));var moment=require(_0xf6e9('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xf6e9('0x4'));var util=require('util');var path=require(_0xf6e9('0x5'));var sox=require(_0xf6e9('0x6'));var csv=require('to-csv');var ejs=require(_0xf6e9('0x7'));var fs=require('fs');var fs_extra=require(_0xf6e9('0x8'));var _=require(_0xf6e9('0x9'));var squel=require(_0xf6e9('0xa'));var crypto=require('crypto');var jsforce=require(_0xf6e9('0xb'));var deskjs=require(_0xf6e9('0xc'));var toCsv=require('to-csv');var querystring=require(_0xf6e9('0xd'));var Papa=require(_0xf6e9('0xe'));var Redis=require(_0xf6e9('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xf6e9('0x10'));var logger=require(_0xf6e9('0x11'))('api');var utils=require(_0xf6e9('0x12'));var config=require(_0xf6e9('0x13'));var licenseUtil=require(_0xf6e9('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x43ecd6,_0x30c8f2){_0x30c8f2=_0x30c8f2||0xcc;return function(_0x1db4f0){if(_0x1db4f0){return _0x43ecd6[_0xf6e9('0x15')](_0x30c8f2);}return _0x43ecd6['status'](_0x30c8f2)[_0xf6e9('0x16')]();};}function respondWithResult(_0x5b3f5f,_0x3265df){_0x3265df=_0x3265df||0xc8;return function(_0x32147b){if(_0x32147b){return _0x5b3f5f['status'](_0x3265df)[_0xf6e9('0x17')](_0x32147b);}};}function respondWithFilteredResult(_0x7095dc,_0xf5a243){return function(_0x3488a2){if(_0x3488a2){var _0x1d40d0=typeof _0xf5a243['offset']==='undefined'&&typeof _0xf5a243[_0xf6e9('0x18')]===_0xf6e9('0x19');var _0x2bc780=_0x3488a2[_0xf6e9('0x1a')];var _0x20db99=_0x1d40d0?0x0:_0xf5a243[_0xf6e9('0x1b')];var _0x19d4ac=_0x1d40d0?_0x3488a2[_0xf6e9('0x1a')]:_0xf5a243['offset']+_0xf5a243[_0xf6e9('0x18')];var _0x3eb59f;if(_0x19d4ac>=_0x2bc780){_0x19d4ac=_0x2bc780;_0x3eb59f=0xc8;}else{_0x3eb59f=0xce;}_0x7095dc[_0xf6e9('0x1c')](_0x3eb59f);return _0x7095dc['set'](_0xf6e9('0x1d'),_0x20db99+'-'+_0x19d4ac+'/'+_0x2bc780)[_0xf6e9('0x17')](_0x3488a2);}return null;};}function patchUpdates(_0x5aa697){return function(_0x4bc264){try{jsonpatch[_0xf6e9('0x1e')](_0x4bc264,_0x5aa697,!![]);}catch(_0x3429f1){return BPromise[_0xf6e9('0x1f')](_0x3429f1);}return _0x4bc264['save']();};}function saveUpdates(_0x535b29,_0x44a86b){return function(_0x228b99){if(_0x228b99){return _0x228b99[_0xf6e9('0x20')](_0x535b29)[_0xf6e9('0x21')](function(_0x1ad623){return _0x1ad623;});}return null;};}function removeEntity(_0x51becb,_0x24b3b6){return function(_0x3f608a){if(_0x3f608a){return _0x3f608a['destroy']()[_0xf6e9('0x21')](function(){_0x51becb['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0xba714e,_0x2d549d){return function(_0x59cc36){if(!_0x59cc36){_0xba714e[_0xf6e9('0x15')](0x194);}return _0x59cc36;};}function handleError(_0x5943ba,_0x187f8f){_0x187f8f=_0x187f8f||0x1f4;return function(_0x1eb97c){logger[_0xf6e9('0x22')](_0x1eb97c['stack']);if(_0x1eb97c['name']){delete _0x1eb97c[_0xf6e9('0x23')];}_0x5943ba[_0xf6e9('0x1c')](_0x187f8f)['send'](_0x1eb97c);};}exports['index']=function(_0x3201eb,_0x2d3509){var _0x166d27={},_0x58f3a8={},_0x79acc2={'count':0x0,'rows':[]};var _0x4e96=_[_0xf6e9('0x24')](db['SugarcrmConfiguration'][_0xf6e9('0x25')],function(_0x10b826){return{'name':_0x10b826[_0xf6e9('0x26')],'type':_0x10b826[_0xf6e9('0x27')][_0xf6e9('0x28')]};});_0x58f3a8['model']=_[_0xf6e9('0x24')](_0x4e96,_0xf6e9('0x23'));_0x58f3a8['query']=_[_0xf6e9('0x29')](_0x3201eb[_0xf6e9('0x2a')]);_0x58f3a8[_0xf6e9('0x2b')]=_['intersection'](_0x58f3a8[_0xf6e9('0x2c')],_0x58f3a8[_0xf6e9('0x2a')]);_0x166d27['attributes']=_['intersection'](_0x58f3a8[_0xf6e9('0x2c')],qs[_0xf6e9('0x2d')](_0x3201eb['query'][_0xf6e9('0x2d')]));_0x166d27[_0xf6e9('0x2e')]=_0x166d27[_0xf6e9('0x2e')][_0xf6e9('0x2f')]?_0x166d27['attributes']:_0x58f3a8[_0xf6e9('0x2c')];if(!_0x3201eb[_0xf6e9('0x2a')]['hasOwnProperty']('nolimit')){_0x166d27[_0xf6e9('0x18')]=qs['limit'](_0x3201eb[_0xf6e9('0x2a')]['limit']);_0x166d27[_0xf6e9('0x1b')]=qs[_0xf6e9('0x1b')](_0x3201eb[_0xf6e9('0x2a')]['offset']);}_0x166d27['order']=qs[_0xf6e9('0x30')](_0x3201eb[_0xf6e9('0x2a')][_0xf6e9('0x30')]);_0x166d27[_0xf6e9('0x31')]=qs[_0xf6e9('0x2b')](_[_0xf6e9('0x32')](_0x3201eb[_0xf6e9('0x2a')],_0x58f3a8[_0xf6e9('0x2b')]),_0x4e96);if(_0x3201eb[_0xf6e9('0x2a')][_0xf6e9('0x33')]){_0x166d27[_0xf6e9('0x31')]=_[_0xf6e9('0x34')](_0x166d27[_0xf6e9('0x31')],{'$or':_[_0xf6e9('0x24')](_0x4e96,function(_0x2bcec2){if(_0x2bcec2[_0xf6e9('0x27')]!=='VIRTUAL'){var _0x3ad289={};_0x3ad289[_0x2bcec2[_0xf6e9('0x23')]]={'$like':'%'+_0x3201eb[_0xf6e9('0x2a')][_0xf6e9('0x33')]+'%'};return _0x3ad289;}})});}_0x166d27=_[_0xf6e9('0x34')]({},_0x166d27,_0x3201eb[_0xf6e9('0x35')]);var _0x4882f2={'where':_0x166d27[_0xf6e9('0x31')]};return db['SugarcrmConfiguration'][_0xf6e9('0x1a')](_0x4882f2)['then'](function(_0x283bef){_0x79acc2[_0xf6e9('0x1a')]=_0x283bef;if(_0x3201eb[_0xf6e9('0x2a')][_0xf6e9('0x36')]){_0x166d27['include']=[{'all':!![]}];}return db[_0xf6e9('0x37')][_0xf6e9('0x38')](_0x166d27);})[_0xf6e9('0x21')](function(_0x30aadf){_0x79acc2['rows']=_0x30aadf;return _0x79acc2;})[_0xf6e9('0x21')](respondWithFilteredResult(_0x2d3509,_0x166d27))['catch'](handleError(_0x2d3509,null));};exports[_0xf6e9('0x39')]=function(_0x30f68d,_0x434faf){var _0x13a67a={'raw':![],'where':{'id':_0x30f68d[_0xf6e9('0x3a')]['id']}},_0x24527b={};_0x24527b[_0xf6e9('0x2c')]=_[_0xf6e9('0x29')](db[_0xf6e9('0x37')]['rawAttributes']);_0x24527b['query']=_[_0xf6e9('0x29')](_0x30f68d[_0xf6e9('0x2a')]);_0x24527b['filters']=_['intersection'](_0x24527b[_0xf6e9('0x2c')],_0x24527b[_0xf6e9('0x2a')]);_0x13a67a['attributes']=_[_0xf6e9('0x3b')](_0x24527b[_0xf6e9('0x2c')],qs[_0xf6e9('0x2d')](_0x30f68d[_0xf6e9('0x2a')][_0xf6e9('0x2d')]));_0x13a67a['attributes']=_0x13a67a[_0xf6e9('0x2e')][_0xf6e9('0x2f')]?_0x13a67a[_0xf6e9('0x2e')]:_0x24527b[_0xf6e9('0x2c')];if(_0x30f68d[_0xf6e9('0x2a')][_0xf6e9('0x36')]){_0x13a67a[_0xf6e9('0x3c')]=[{'all':!![]}];}_0x13a67a=_['merge']({},_0x13a67a,_0x30f68d[_0xf6e9('0x35')]);return db[_0xf6e9('0x37')][_0xf6e9('0x3d')](_0x13a67a)[_0xf6e9('0x21')](handleEntityNotFound(_0x434faf,null))[_0xf6e9('0x21')](respondWithResult(_0x434faf,null))[_0xf6e9('0x3e')](handleError(_0x434faf,null));};exports[_0xf6e9('0x3f')]=function(_0xaa3b44,_0x44eea4){return db['SugarcrmConfiguration']['create'](_0xaa3b44['body'],{})[_0xf6e9('0x21')](respondWithResult(_0x44eea4,0xc9))[_0xf6e9('0x3e')](handleError(_0x44eea4,null));};exports[_0xf6e9('0x20')]=function(_0x3d67aa,_0x1d5856){if(_0x3d67aa[_0xf6e9('0x40')]['id']){delete _0x3d67aa[_0xf6e9('0x40')]['id'];}return db[_0xf6e9('0x37')][_0xf6e9('0x3d')]({'where':{'id':_0x3d67aa[_0xf6e9('0x3a')]['id']}})[_0xf6e9('0x21')](handleEntityNotFound(_0x1d5856,null))['then'](saveUpdates(_0x3d67aa[_0xf6e9('0x40')],null))[_0xf6e9('0x21')](respondWithResult(_0x1d5856,null))[_0xf6e9('0x3e')](handleError(_0x1d5856,null));};exports['destroy']=function(_0x62ce89,_0x345f31){return db[_0xf6e9('0x37')][_0xf6e9('0x3d')]({'where':{'id':_0x62ce89['params']['id']}})[_0xf6e9('0x21')](handleEntityNotFound(_0x345f31,null))[_0xf6e9('0x21')](removeEntity(_0x345f31,null))['catch'](handleError(_0x345f31,null));};exports['getFields']=function(_0x7e2608,_0x593f25,_0xfaa01c){var _0x9ec935={};var _0x17f074={};var _0x41a3e2;var _0x126f77;return db['SugarcrmConfiguration']['findOne']({'where':{'id':_0x7e2608[_0xf6e9('0x3a')]['id']}})['then'](handleEntityNotFound(_0x593f25,null))[_0xf6e9('0x21')](function(_0x82fe64){if(_0x82fe64){_0x41a3e2=_0x82fe64;_0x17f074[_0xf6e9('0x2c')]=_['keys'](db[_0xf6e9('0x41')][_0xf6e9('0x25')]);_0x17f074['query']=_[_0xf6e9('0x29')](_0x7e2608[_0xf6e9('0x2a')]);_0x17f074[_0xf6e9('0x2b')]=_[_0xf6e9('0x3b')](_0x17f074['model'],_0x17f074['query']);_0x9ec935['attributes']=_[_0xf6e9('0x3b')](_0x17f074['model'],qs[_0xf6e9('0x2d')](_0x7e2608['query'][_0xf6e9('0x2d')]));_0x9ec935['attributes']=_0x9ec935[_0xf6e9('0x2e')][_0xf6e9('0x2f')]?_0x9ec935[_0xf6e9('0x2e')]:_0x17f074['model'];_0x9ec935[_0xf6e9('0x42')]=qs['sort'](_0x7e2608['query'][_0xf6e9('0x30')]);_0x9ec935[_0xf6e9('0x31')]=qs[_0xf6e9('0x2b')](_['pick'](_0x7e2608['query'],_0x17f074[_0xf6e9('0x2b')]));if(_0x7e2608[_0xf6e9('0x2a')][_0xf6e9('0x33')]){_0x9ec935[_0xf6e9('0x31')]=_[_0xf6e9('0x34')](_0x9ec935[_0xf6e9('0x31')],{'$or':_[_0xf6e9('0x24')](_0x9ec935[_0xf6e9('0x2e')],function(_0x5a71e9){var _0x5e76e1={};_0x5e76e1[_0x5a71e9]={'$like':'%'+_0x7e2608['query'][_0xf6e9('0x33')]+'%'};return _0x5e76e1;})});}_0x9ec935=_['merge']({},_0x9ec935,_0x7e2608[_0xf6e9('0x35')]);return _0x41a3e2['getFields'](_0x9ec935);}})[_0xf6e9('0x21')](function(_0x1f732d){if(_0x1f732d){_0x126f77=_0x1f732d[_0xf6e9('0x2f')];if(!_0x7e2608[_0xf6e9('0x2a')][_0xf6e9('0x43')](_0xf6e9('0x44'))){_0x9ec935[_0xf6e9('0x18')]=qs[_0xf6e9('0x18')](_0x7e2608[_0xf6e9('0x2a')][_0xf6e9('0x18')]);_0x9ec935[_0xf6e9('0x1b')]=qs['offset'](_0x7e2608['query'][_0xf6e9('0x1b')]);}return _0x41a3e2['getFields'](_0x9ec935);}})[_0xf6e9('0x21')](function(_0x4139ff){if(_0x4139ff){return _0x4139ff?{'count':_0x126f77,'rows':_0x4139ff}:null;}})['then'](respondWithResult(_0x593f25,null))[_0xf6e9('0x3e')](handleError(_0x593f25,null));};exports[_0xf6e9('0x45')]=function(_0x49f99a,_0x194a6c,_0x56fb8a){var _0x5dab5d={};var _0x91030f={};var _0x446a3a;var _0x4ccfcf;return db[_0xf6e9('0x37')][_0xf6e9('0x46')]({'where':{'id':_0x49f99a[_0xf6e9('0x3a')]['id']}})[_0xf6e9('0x21')](handleEntityNotFound(_0x194a6c,null))[_0xf6e9('0x21')](function(_0x21a6ae){if(_0x21a6ae){_0x446a3a=_0x21a6ae;_0x91030f[_0xf6e9('0x2c')]=_[_0xf6e9('0x29')](db[_0xf6e9('0x41')][_0xf6e9('0x25')]);_0x91030f[_0xf6e9('0x2a')]=_[_0xf6e9('0x29')](_0x49f99a[_0xf6e9('0x2a')]);_0x91030f[_0xf6e9('0x2b')]=_[_0xf6e9('0x3b')](_0x91030f[_0xf6e9('0x2c')],_0x91030f[_0xf6e9('0x2a')]);_0x5dab5d[_0xf6e9('0x2e')]=_[_0xf6e9('0x3b')](_0x91030f['model'],qs['fields'](_0x49f99a[_0xf6e9('0x2a')][_0xf6e9('0x2d')]));_0x5dab5d[_0xf6e9('0x2e')]=_0x5dab5d['attributes'][_0xf6e9('0x2f')]?_0x5dab5d['attributes']:_0x91030f[_0xf6e9('0x2c')];_0x5dab5d[_0xf6e9('0x42')]=qs[_0xf6e9('0x30')](_0x49f99a[_0xf6e9('0x2a')]['sort']);_0x5dab5d['where']=qs['filters'](_[_0xf6e9('0x32')](_0x49f99a['query'],_0x91030f['filters']));if(_0x49f99a[_0xf6e9('0x2a')]['filter']){_0x5dab5d[_0xf6e9('0x31')]=_[_0xf6e9('0x34')](_0x5dab5d['where'],{'$or':_[_0xf6e9('0x24')](_0x5dab5d[_0xf6e9('0x2e')],function(_0x268fd5){var _0x3e9df0={};_0x3e9df0[_0x268fd5]={'$like':'%'+_0x49f99a[_0xf6e9('0x2a')]['filter']+'%'};return _0x3e9df0;})});}_0x5dab5d=_[_0xf6e9('0x34')]({},_0x5dab5d,_0x49f99a[_0xf6e9('0x35')]);return _0x446a3a[_0xf6e9('0x45')](_0x5dab5d);}})[_0xf6e9('0x21')](function(_0x49b6a6){if(_0x49b6a6){_0x4ccfcf=_0x49b6a6[_0xf6e9('0x2f')];if(!_0x49f99a['query'][_0xf6e9('0x43')](_0xf6e9('0x44'))){_0x5dab5d[_0xf6e9('0x18')]=qs[_0xf6e9('0x18')](_0x49f99a[_0xf6e9('0x2a')]['limit']);_0x5dab5d[_0xf6e9('0x1b')]=qs[_0xf6e9('0x1b')](_0x49f99a[_0xf6e9('0x2a')][_0xf6e9('0x1b')]);}return _0x446a3a['getSubjects'](_0x5dab5d);}})[_0xf6e9('0x21')](function(_0x3b12d0){if(_0x3b12d0){return _0x3b12d0?{'count':_0x4ccfcf,'rows':_0x3b12d0}:null;}})['then'](respondWithResult(_0x194a6c,null))[_0xf6e9('0x3e')](handleError(_0x194a6c,null));};exports[_0xf6e9('0x47')]=function(_0x3276ee,_0x147fe7,_0x329f85){var _0x411bfe={};var _0x12d76a={};var _0x459d63;var _0x15356a;return db[_0xf6e9('0x37')]['findOne']({'where':{'id':_0x3276ee['params']['id']}})['then'](handleEntityNotFound(_0x147fe7,null))[_0xf6e9('0x21')](function(_0x65ea16){if(_0x65ea16){_0x459d63=_0x65ea16;_0x12d76a[_0xf6e9('0x2c')]=_[_0xf6e9('0x29')](db['SugarcrmField'][_0xf6e9('0x25')]);_0x12d76a[_0xf6e9('0x2a')]=_[_0xf6e9('0x29')](_0x3276ee[_0xf6e9('0x2a')]);_0x12d76a['filters']=_['intersection'](_0x12d76a[_0xf6e9('0x2c')],_0x12d76a[_0xf6e9('0x2a')]);_0x411bfe[_0xf6e9('0x2e')]=_['intersection'](_0x12d76a[_0xf6e9('0x2c')],qs[_0xf6e9('0x2d')](_0x3276ee[_0xf6e9('0x2a')]['fields']));_0x411bfe[_0xf6e9('0x2e')]=_0x411bfe[_0xf6e9('0x2e')][_0xf6e9('0x2f')]?_0x411bfe[_0xf6e9('0x2e')]:_0x12d76a[_0xf6e9('0x2c')];_0x411bfe[_0xf6e9('0x42')]=qs[_0xf6e9('0x30')](_0x3276ee[_0xf6e9('0x2a')][_0xf6e9('0x30')]);_0x411bfe[_0xf6e9('0x31')]=qs['filters'](_[_0xf6e9('0x32')](_0x3276ee[_0xf6e9('0x2a')],_0x12d76a[_0xf6e9('0x2b')]));if(_0x3276ee[_0xf6e9('0x2a')][_0xf6e9('0x33')]){_0x411bfe[_0xf6e9('0x31')]=_['merge'](_0x411bfe[_0xf6e9('0x31')],{'$or':_[_0xf6e9('0x24')](_0x411bfe[_0xf6e9('0x2e')],function(_0x10f57f){var _0x47c32e={};_0x47c32e[_0x10f57f]={'$like':'%'+_0x3276ee['query']['filter']+'%'};return _0x47c32e;})});}_0x411bfe=_[_0xf6e9('0x34')]({},_0x411bfe,_0x3276ee[_0xf6e9('0x35')]);return _0x459d63[_0xf6e9('0x47')](_0x411bfe);}})[_0xf6e9('0x21')](function(_0x4a57c1){if(_0x4a57c1){_0x15356a=_0x4a57c1[_0xf6e9('0x2f')];if(!_0x3276ee[_0xf6e9('0x2a')][_0xf6e9('0x43')](_0xf6e9('0x44'))){_0x411bfe['limit']=qs[_0xf6e9('0x18')](_0x3276ee[_0xf6e9('0x2a')][_0xf6e9('0x18')]);_0x411bfe['offset']=qs[_0xf6e9('0x1b')](_0x3276ee['query'][_0xf6e9('0x1b')]);}return _0x459d63[_0xf6e9('0x47')](_0x411bfe);}})[_0xf6e9('0x21')](function(_0x11c882){if(_0x11c882){return _0x11c882?{'count':_0x15356a,'rows':_0x11c882}:null;}})['then'](respondWithResult(_0x147fe7,null))[_0xf6e9('0x3e')](handleError(_0x147fe7,null));};
\ No newline at end of file
index 8d30188..bc3f959 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe90d=['exports','define','SugarcrmConfiguration','int_sugarcrm_configurations','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x50718d,_0x4b4936){var _0x360e93=function(_0x1c2ae0){while(--_0x1c2ae0){_0x50718d['push'](_0x50718d['shift']());}};_0x360e93(++_0x4b4936);}(_0xe90d,0x10e));var _0xde90=function(_0x7985e5,_0x11afdc){_0x7985e5=_0x7985e5-0x0;var _0x1ef9e3=_0xe90d[_0x7985e5];return _0x1ef9e3;};'use strict';var _=require(_0xde90('0x0'));var util=require(_0xde90('0x1'));var logger=require(_0xde90('0x2'))(_0xde90('0x3'));var moment=require(_0xde90('0x4'));var BPromise=require(_0xde90('0x5'));var rp=require(_0xde90('0x6'));var fs=require('fs');var path=require(_0xde90('0x7'));var rimraf=require(_0xde90('0x8'));var config=require(_0xde90('0x9'));var attributes=require('./intSugarcrmConfiguration.attributes');module[_0xde90('0xa')]=function(_0x30151e,_0x1362fc){return _0x30151e[_0xde90('0xb')](_0xde90('0xc'),attributes,{'tableName':_0xde90('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7ccb=['../../config/logger','moment','request-promise','../../config/environment','exports','define','int_sugarcrm_configurations','util'];(function(_0x2c428d,_0x3a11e2){var _0x1d6888=function(_0x26ce38){while(--_0x26ce38){_0x2c428d['push'](_0x2c428d['shift']());}};_0x1d6888(++_0x3a11e2);}(_0x7ccb,0x167));var _0xb7cc=function(_0x18a71e,_0x1887ec){_0x18a71e=_0x18a71e-0x0;var _0x6a2ef7=_0x7ccb[_0x18a71e];return _0x6a2ef7;};'use strict';var _=require('lodash');var util=require(_0xb7cc('0x0'));var logger=require(_0xb7cc('0x1'))('api');var moment=require(_0xb7cc('0x2'));var BPromise=require('bluebird');var rp=require(_0xb7cc('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0xb7cc('0x4'));var attributes=require('./intSugarcrmConfiguration.attributes');module[_0xb7cc('0x5')]=function(_0x4849ef,_0x59de15){return _0x4849ef[_0xb7cc('0x6')]('SugarcrmConfiguration',attributes,{'tableName':_0xb7cc('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 005a76a..df5d484 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeb54=['SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x2d2c16,_0x4e88b6){var _0x53f2fb=function(_0x6b6dac){while(--_0x6b6dac){_0x2d2c16['push'](_0x2d2c16['shift']());}};_0x53f2fb(++_0x4e88b6);}(_0xeb54,0x149));var _0x4eb5=function(_0x1f6737,_0x40e5c1){_0x1f6737=_0x1f6737-0x0;var _0x2dcf1f=_0xeb54[_0x1f6737];return _0x2dcf1f;};'use strict';var _=require(_0x4eb5('0x0'));var util=require(_0x4eb5('0x1'));var moment=require(_0x4eb5('0x2'));var BPromise=require(_0x4eb5('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x4eb5('0x4'));var logger=require('../../config/logger')(_0x4eb5('0x5'));var config=require(_0x4eb5('0x6'));var jayson=require(_0x4eb5('0x7'));var client=jayson[_0x4eb5('0x8')][_0x4eb5('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x122987,_0x427cc5,_0x3b5adb){return new BPromise(function(_0x29002b,_0x1ab40b){return client[_0x4eb5('0xa')](_0x122987,_0x3b5adb)[_0x4eb5('0xb')](function(_0x1b4f0b){logger[_0x4eb5('0xc')](_0x4eb5('0xd'),_0x427cc5,_0x4eb5('0xe'));logger[_0x4eb5('0xf')](_0x4eb5('0x10'),_0x427cc5,_0x4eb5('0xe'),JSON[_0x4eb5('0x11')](_0x1b4f0b));if(_0x1b4f0b[_0x4eb5('0x12')]){if(_0x1b4f0b[_0x4eb5('0x12')][_0x4eb5('0x13')]===0x1f4){logger[_0x4eb5('0x12')](_0x4eb5('0xd'),_0x427cc5,_0x1b4f0b[_0x4eb5('0x12')][_0x4eb5('0x14')]);return _0x1ab40b(_0x1b4f0b[_0x4eb5('0x12')][_0x4eb5('0x14')]);}logger['error'](_0x4eb5('0xd'),_0x427cc5,_0x1b4f0b['error']['message']);return _0x29002b(_0x1b4f0b[_0x4eb5('0x12')][_0x4eb5('0x14')]);}else{logger['info'](_0x4eb5('0xd'),_0x427cc5,'request\x20sent');_0x29002b(_0x1b4f0b[_0x4eb5('0x15')][_0x4eb5('0x14')]);}})[_0x4eb5('0x16')](function(_0x15ca65){logger['error'](_0x4eb5('0xd'),_0x427cc5,_0x15ca65);_0x1ab40b(_0x15ca65);});});}
\ No newline at end of file
+var _0xa6a7=['SugarcrmConfiguration,\x20%s,\x20%s','request\x20sent','debug','SugarcrmConfiguration,\x20%s,\x20%s,\x20%s','error','message','info','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','then'];(function(_0x51a34e,_0xdd9984){var _0x6e5bd7=function(_0x11f638){while(--_0x11f638){_0x51a34e['push'](_0x51a34e['shift']());}};_0x6e5bd7(++_0xdd9984);}(_0xa6a7,0x1d7));var _0x7a6a=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa6a7[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x7a6a('0x0'));var util=require('util');var moment=require(_0x7a6a('0x1'));var BPromise=require(_0x7a6a('0x2'));var rs=require(_0x7a6a('0x3'));var fs=require('fs');var Redis=require(_0x7a6a('0x4'));var db=require(_0x7a6a('0x5'))['db'];var utils=require(_0x7a6a('0x6'));var logger=require('../../config/logger')(_0x7a6a('0x7'));var config=require(_0x7a6a('0x8'));var jayson=require(_0x7a6a('0x9'));var client=jayson[_0x7a6a('0xa')][_0x7a6a('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2a6cd4,_0x464605,_0x1c7891){return new BPromise(function(_0x4a068e,_0x13b5ee){return client['request'](_0x2a6cd4,_0x1c7891)[_0x7a6a('0xc')](function(_0x2c2301){logger['info'](_0x7a6a('0xd'),_0x464605,_0x7a6a('0xe'));logger[_0x7a6a('0xf')](_0x7a6a('0x10'),_0x464605,_0x7a6a('0xe'),JSON['stringify'](_0x2c2301));if(_0x2c2301['error']){if(_0x2c2301['error']['code']===0x1f4){logger[_0x7a6a('0x11')](_0x7a6a('0xd'),_0x464605,_0x2c2301[_0x7a6a('0x11')][_0x7a6a('0x12')]);return _0x13b5ee(_0x2c2301['error'][_0x7a6a('0x12')]);}logger['error'](_0x7a6a('0xd'),_0x464605,_0x2c2301[_0x7a6a('0x11')][_0x7a6a('0x12')]);return _0x4a068e(_0x2c2301[_0x7a6a('0x11')]['message']);}else{logger[_0x7a6a('0x13')]('SugarcrmConfiguration,\x20%s,\x20%s',_0x464605,'request\x20sent');_0x4a068e(_0x2c2301[_0x7a6a('0x14')][_0x7a6a('0x12')]);}})[_0x7a6a('0x15')](function(_0x4b8942){logger[_0x7a6a('0x11')](_0x7a6a('0xd'),_0x464605,_0x4b8942);_0x13b5ee(_0x4b8942);});});}
\ No newline at end of file
index 5e7befa..b9172f7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6f35=['isAuthenticated','show','post','create','/:id','update','delete','destroy','exports','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intSugarcrmField.controller','get'];(function(_0x217b70,_0x289ae3){var _0xc7b236=function(_0x3c24fc){while(--_0x3c24fc){_0x217b70['push'](_0x217b70['shift']());}};_0xc7b236(++_0x289ae3);}(_0x6f35,0x139));var _0x56f3=function(_0x182f05,_0x46cc14){_0x182f05=_0x182f05-0x0;var _0x2808d2=_0x6f35[_0x182f05];return _0x2808d2;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x56f3('0x0'));var timeout=require(_0x56f3('0x1'));var express=require(_0x56f3('0x2'));var router=express[_0x56f3('0x3')]();var fs_extra=require(_0x56f3('0x4'));var auth=require(_0x56f3('0x5'));var interaction=require(_0x56f3('0x6'));var config=require(_0x56f3('0x7'));var controller=require(_0x56f3('0x8'));router[_0x56f3('0x9')]('/',auth[_0x56f3('0xa')](),controller['index']);router[_0x56f3('0x9')]('/:id',auth[_0x56f3('0xa')](),controller[_0x56f3('0xb')]);router[_0x56f3('0xc')]('/',auth[_0x56f3('0xa')](),controller[_0x56f3('0xd')]);router['put'](_0x56f3('0xe'),auth[_0x56f3('0xa')](),controller[_0x56f3('0xf')]);router[_0x56f3('0x10')](_0x56f3('0xe'),auth[_0x56f3('0xa')](),controller[_0x56f3('0x11')]);module[_0x56f3('0x12')]=router;
\ No newline at end of file
+var _0x5d36=['exports','multer','util','express','fs-extra','../../components/interaction/service','../../config/environment','./intSugarcrmField.controller','index','/:id','show','post','isAuthenticated','create','put','update','destroy'];(function(_0x3b1b23,_0x21bccd){var _0x1efc85=function(_0x102a95){while(--_0x102a95){_0x3b1b23['push'](_0x3b1b23['shift']());}};_0x1efc85(++_0x21bccd);}(_0x5d36,0x199));var _0x65d3=function(_0xf31767,_0x381746){_0xf31767=_0xf31767-0x0;var _0x24bd0c=_0x5d36[_0xf31767];return _0x24bd0c;};'use strict';var multer=require(_0x65d3('0x0'));var util=require(_0x65d3('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x65d3('0x2'));var router=express['Router']();var fs_extra=require(_0x65d3('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x65d3('0x4'));var config=require(_0x65d3('0x5'));var controller=require(_0x65d3('0x6'));router['get']('/',auth['isAuthenticated'](),controller[_0x65d3('0x7')]);router['get'](_0x65d3('0x8'),auth['isAuthenticated'](),controller[_0x65d3('0x9')]);router[_0x65d3('0xa')]('/',auth[_0x65d3('0xb')](),controller[_0x65d3('0xc')]);router[_0x65d3('0xd')](_0x65d3('0x8'),auth[_0x65d3('0xb')](),controller[_0x65d3('0xe')]);router['delete'](_0x65d3('0x8'),auth[_0x65d3('0xb')](),controller[_0x65d3('0xf')]);module[_0x65d3('0x10')]=router;
\ No newline at end of file
index 339ec2e..0b4f34c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeb49=['picklist','STRING','sequelize','string','variable','customVariable'];(function(_0x433a86,_0x175b5c){var _0x23000c=function(_0x4b1fa0){while(--_0x4b1fa0){_0x433a86['push'](_0x433a86['shift']());}};_0x23000c(++_0x175b5c);}(_0xeb49,0x176));var _0x9eb4=function(_0x428a64,_0x16085a){_0x428a64=_0x428a64-0x0;var _0x386b79=_0xeb49[_0x428a64];return _0x386b79;};'use strict';var Sequelize=require(_0x9eb4('0x0'));module['exports']={'type':{'type':Sequelize['ENUM'](_0x9eb4('0x1'),_0x9eb4('0x2'),_0x9eb4('0x3'),'keyValue',_0x9eb4('0x4')),'defaultValue':_0x9eb4('0x1')},'content':{'type':Sequelize[_0x9eb4('0x5')]},'key':{'type':Sequelize[_0x9eb4('0x5')]},'keyType':{'type':Sequelize['ENUM']('string','variable','customVariable')},'keyContent':{'type':Sequelize[_0x9eb4('0x5')]},'idField':{'type':Sequelize[_0x9eb4('0x5')]},'nameField':{'type':Sequelize[_0x9eb4('0x5')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x9eb4('0x5')]}};
\ No newline at end of file
+var _0xf000=['exports','ENUM','variable','customVariable','keyValue','picklist','string','STRING'];(function(_0xce3a0b,_0x5b271b){var _0x1ca1b9=function(_0x1acd40){while(--_0x1acd40){_0xce3a0b['push'](_0xce3a0b['shift']());}};_0x1ca1b9(++_0x5b271b);}(_0xf000,0x1d8));var _0x0f00=function(_0x3fb9dd,_0x174fff){_0x3fb9dd=_0x3fb9dd-0x0;var _0x20136a=_0xf000[_0x3fb9dd];return _0x20136a;};'use strict';var Sequelize=require('sequelize');module[_0x0f00('0x0')]={'type':{'type':Sequelize[_0x0f00('0x1')]('string',_0x0f00('0x2'),_0x0f00('0x3'),_0x0f00('0x4'),_0x0f00('0x5')),'defaultValue':_0x0f00('0x6')},'content':{'type':Sequelize[_0x0f00('0x7')]},'key':{'type':Sequelize[_0x0f00('0x7')]},'keyType':{'type':Sequelize[_0x0f00('0x1')](_0x0f00('0x6'),'variable','customVariable')},'keyContent':{'type':Sequelize['STRING']},'idField':{'type':Sequelize[_0x0f00('0x7')]},'nameField':{'type':Sequelize[_0x0f00('0x7')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
index a45a570..5abbff9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2d73=['ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','end','status','json','undefined','count','offset','limit','set','reject','save','update','then','error','name','send','index','map','SugarcrmField','rawAttributes','fieldName','type','query','keys','filters','intersection','attributes','model','fields','length','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','include','findAll','rows','catch','show','options','create','body','params','destroy','rimraf','zip-dir','request-promise','mustache','util','path','sox','to-csv'];(function(_0x54e36f,_0x278434){var _0x22e333=function(_0x2a9eca){while(--_0x2a9eca){_0x54e36f['push'](_0x54e36f['shift']());}};_0x22e333(++_0x278434);}(_0x2d73,0x165));var _0x32d7=function(_0x170310,_0x31acf9){_0x170310=_0x170310-0x0;var _0x1b6006=_0x2d73[_0x170310];return _0x1b6006;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x32d7('0x0'));var zipdir=require(_0x32d7('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x32d7('0x2'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x32d7('0x3'));var util=require(_0x32d7('0x4'));var path=require(_0x32d7('0x5'));var sox=require(_0x32d7('0x6'));var csv=require(_0x32d7('0x7'));var ejs=require(_0x32d7('0x8'));var fs=require('fs');var fs_extra=require(_0x32d7('0x9'));var _=require(_0x32d7('0xa'));var squel=require(_0x32d7('0xb'));var crypto=require(_0x32d7('0xc'));var jsforce=require(_0x32d7('0xd'));var deskjs=require(_0x32d7('0xe'));var toCsv=require(_0x32d7('0x7'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x32d7('0xf'));var authService=require(_0x32d7('0x10'));var qs=require(_0x32d7('0x11'));var as=require(_0x32d7('0x12'));var hardwareService=require(_0x32d7('0x13'));var logger=require(_0x32d7('0x14'))(_0x32d7('0x15'));var utils=require(_0x32d7('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x32d7('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4e2644,_0x3fdf86){_0x3fdf86=_0x3fdf86||0xcc;return function(_0x141375){if(_0x141375){return _0x4e2644[_0x32d7('0x18')](_0x3fdf86);}return _0x4e2644['status'](_0x3fdf86)[_0x32d7('0x19')]();};}function respondWithResult(_0x50d96b,_0x2711d5){_0x2711d5=_0x2711d5||0xc8;return function(_0x2b2b60){if(_0x2b2b60){return _0x50d96b[_0x32d7('0x1a')](_0x2711d5)[_0x32d7('0x1b')](_0x2b2b60);}};}function respondWithFilteredResult(_0x45a06d,_0x49d09d){return function(_0x42a8f8){if(_0x42a8f8){var _0x5511c0=typeof _0x49d09d['offset']===_0x32d7('0x1c')&&typeof _0x49d09d['limit']===_0x32d7('0x1c');var _0x3e8e62=_0x42a8f8[_0x32d7('0x1d')];var _0x52dae9=_0x5511c0?0x0:_0x49d09d[_0x32d7('0x1e')];var _0x543ebc=_0x5511c0?_0x42a8f8['count']:_0x49d09d['offset']+_0x49d09d[_0x32d7('0x1f')];var _0x4caef5;if(_0x543ebc>=_0x3e8e62){_0x543ebc=_0x3e8e62;_0x4caef5=0xc8;}else{_0x4caef5=0xce;}_0x45a06d[_0x32d7('0x1a')](_0x4caef5);return _0x45a06d[_0x32d7('0x20')]('Content-Range',_0x52dae9+'-'+_0x543ebc+'/'+_0x3e8e62)[_0x32d7('0x1b')](_0x42a8f8);}return null;};}function patchUpdates(_0x54994e){return function(_0x603afc){try{jsonpatch['apply'](_0x603afc,_0x54994e,!![]);}catch(_0x4536b4){return BPromise[_0x32d7('0x21')](_0x4536b4);}return _0x603afc[_0x32d7('0x22')]();};}function saveUpdates(_0x4b3281,_0x4a5913){return function(_0x54aebe){if(_0x54aebe){return _0x54aebe[_0x32d7('0x23')](_0x4b3281)['then'](function(_0x4f9105){return _0x4f9105;});}return null;};}function removeEntity(_0x375e20,_0xa67e8f){return function(_0x5ef1c6){if(_0x5ef1c6){return _0x5ef1c6['destroy']()[_0x32d7('0x24')](function(){_0x375e20['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x1de84e,_0x38b6cf){return function(_0x40ad45){if(!_0x40ad45){_0x1de84e[_0x32d7('0x18')](0x194);}return _0x40ad45;};}function handleError(_0x58242b,_0x418abd){_0x418abd=_0x418abd||0x1f4;return function(_0x32bdc9){logger[_0x32d7('0x25')](_0x32bdc9['stack']);if(_0x32bdc9[_0x32d7('0x26')]){delete _0x32bdc9['name'];}_0x58242b[_0x32d7('0x1a')](_0x418abd)[_0x32d7('0x27')](_0x32bdc9);};}exports[_0x32d7('0x28')]=function(_0xae2334,_0x268c0d){var _0x1ec982={},_0x53e68e={},_0x2e87b4={'count':0x0,'rows':[]};var _0x5bc484=_[_0x32d7('0x29')](db[_0x32d7('0x2a')][_0x32d7('0x2b')],function(_0x474d51){return{'name':_0x474d51[_0x32d7('0x2c')],'type':_0x474d51[_0x32d7('0x2d')]['key']};});_0x53e68e['model']=_[_0x32d7('0x29')](_0x5bc484,_0x32d7('0x26'));_0x53e68e[_0x32d7('0x2e')]=_[_0x32d7('0x2f')](_0xae2334[_0x32d7('0x2e')]);_0x53e68e[_0x32d7('0x30')]=_[_0x32d7('0x31')](_0x53e68e['model'],_0x53e68e[_0x32d7('0x2e')]);_0x1ec982[_0x32d7('0x32')]=_[_0x32d7('0x31')](_0x53e68e[_0x32d7('0x33')],qs['fields'](_0xae2334['query'][_0x32d7('0x34')]));_0x1ec982[_0x32d7('0x32')]=_0x1ec982[_0x32d7('0x32')][_0x32d7('0x35')]?_0x1ec982[_0x32d7('0x32')]:_0x53e68e[_0x32d7('0x33')];if(!_0xae2334[_0x32d7('0x2e')]['hasOwnProperty'](_0x32d7('0x36'))){_0x1ec982[_0x32d7('0x1f')]=qs[_0x32d7('0x1f')](_0xae2334[_0x32d7('0x2e')][_0x32d7('0x1f')]);_0x1ec982[_0x32d7('0x1e')]=qs[_0x32d7('0x1e')](_0xae2334[_0x32d7('0x2e')][_0x32d7('0x1e')]);}_0x1ec982[_0x32d7('0x37')]=qs[_0x32d7('0x38')](_0xae2334[_0x32d7('0x2e')][_0x32d7('0x38')]);_0x1ec982[_0x32d7('0x39')]=qs[_0x32d7('0x30')](_[_0x32d7('0x3a')](_0xae2334[_0x32d7('0x2e')],_0x53e68e['filters']),_0x5bc484);if(_0xae2334[_0x32d7('0x2e')][_0x32d7('0x3b')]){_0x1ec982[_0x32d7('0x39')]=_[_0x32d7('0x3c')](_0x1ec982[_0x32d7('0x39')],{'$or':_[_0x32d7('0x29')](_0x5bc484,function(_0x3a181b){if(_0x3a181b['type']!==_0x32d7('0x3d')){var _0x536aff={};_0x536aff[_0x3a181b[_0x32d7('0x26')]]={'$like':'%'+_0xae2334['query'][_0x32d7('0x3b')]+'%'};return _0x536aff;}})});}_0x1ec982=_['merge']({},_0x1ec982,_0xae2334['options']);var _0x269217={'where':_0x1ec982[_0x32d7('0x39')]};return db['SugarcrmField'][_0x32d7('0x1d')](_0x269217)[_0x32d7('0x24')](function(_0xd1df1e){_0x2e87b4[_0x32d7('0x1d')]=_0xd1df1e;if(_0xae2334[_0x32d7('0x2e')][_0x32d7('0x3e')]){_0x1ec982[_0x32d7('0x3f')]=[{'all':!![]}];}return db[_0x32d7('0x2a')][_0x32d7('0x40')](_0x1ec982);})[_0x32d7('0x24')](function(_0x250e52){_0x2e87b4[_0x32d7('0x41')]=_0x250e52;return _0x2e87b4;})['then'](respondWithFilteredResult(_0x268c0d,_0x1ec982))[_0x32d7('0x42')](handleError(_0x268c0d,null));};exports[_0x32d7('0x43')]=function(_0x15602c,_0x5148f5){var _0x8c732f={'raw':!![],'where':{'id':_0x15602c['params']['id']}},_0x2cfe78={};_0x2cfe78['model']=_['keys'](db[_0x32d7('0x2a')][_0x32d7('0x2b')]);_0x2cfe78['query']=_[_0x32d7('0x2f')](_0x15602c[_0x32d7('0x2e')]);_0x2cfe78[_0x32d7('0x30')]=_[_0x32d7('0x31')](_0x2cfe78['model'],_0x2cfe78[_0x32d7('0x2e')]);_0x8c732f[_0x32d7('0x32')]=_['intersection'](_0x2cfe78['model'],qs[_0x32d7('0x34')](_0x15602c[_0x32d7('0x2e')][_0x32d7('0x34')]));_0x8c732f[_0x32d7('0x32')]=_0x8c732f[_0x32d7('0x32')][_0x32d7('0x35')]?_0x8c732f[_0x32d7('0x32')]:_0x2cfe78[_0x32d7('0x33')];if(_0x15602c['query'][_0x32d7('0x3e')]){_0x8c732f[_0x32d7('0x3f')]=[{'all':!![]}];}_0x8c732f=_[_0x32d7('0x3c')]({},_0x8c732f,_0x15602c[_0x32d7('0x44')]);return db[_0x32d7('0x2a')]['find'](_0x8c732f)['then'](handleEntityNotFound(_0x5148f5,null))[_0x32d7('0x24')](respondWithResult(_0x5148f5,null))['catch'](handleError(_0x5148f5,null));};exports['create']=function(_0xa23423,_0x288528){return db[_0x32d7('0x2a')][_0x32d7('0x45')](_0xa23423[_0x32d7('0x46')],{})['then'](respondWithResult(_0x288528,0xc9))[_0x32d7('0x42')](handleError(_0x288528,null));};exports[_0x32d7('0x23')]=function(_0x5204e4,_0x1d5268){if(_0x5204e4['body']['id']){delete _0x5204e4[_0x32d7('0x46')]['id'];}return db['SugarcrmField']['find']({'where':{'id':_0x5204e4[_0x32d7('0x47')]['id']}})['then'](handleEntityNotFound(_0x1d5268,null))[_0x32d7('0x24')](saveUpdates(_0x5204e4[_0x32d7('0x46')],null))['then'](respondWithResult(_0x1d5268,null))['catch'](handleError(_0x1d5268,null));};exports[_0x32d7('0x48')]=function(_0x8c0c08,_0x276571){return db['SugarcrmField']['find']({'where':{'id':_0x8c0c08[_0x32d7('0x47')]['id']}})[_0x32d7('0x24')](handleEntityNotFound(_0x276571,null))[_0x32d7('0x24')](removeEntity(_0x276571,null))[_0x32d7('0x42')](handleError(_0x276571,null));};
\ No newline at end of file
+var _0x078c=['show','params','includeAll','find','create','body','destroy','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','undefined','limit','count','reject','save','then','error','stack','name','map','SugarcrmField','rawAttributes','fieldName','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','type','VIRTUAL','options','include','findAll','rows','catch'];(function(_0x2ce852,_0x33114f){var _0x28132c=function(_0x40efeb){while(--_0x40efeb){_0x2ce852['push'](_0x2ce852['shift']());}};_0x28132c(++_0x33114f);}(_0x078c,0x1c9));var _0xc078=function(_0x29b609,_0x19d388){_0x29b609=_0x29b609-0x0;var _0x54c952=_0x078c[_0x29b609];return _0x54c952;};'use strict';var emlformat=require(_0xc078('0x0'));var rimraf=require(_0xc078('0x1'));var zipdir=require(_0xc078('0x2'));var jsonpatch=require(_0xc078('0x3'));var rp=require(_0xc078('0x4'));var moment=require(_0xc078('0x5'));var BPromise=require(_0xc078('0x6'));var Mustache=require(_0xc078('0x7'));var util=require(_0xc078('0x8'));var path=require('path');var sox=require('sox');var csv=require(_0xc078('0x9'));var ejs=require(_0xc078('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xc078('0xb'));var squel=require(_0xc078('0xc'));var crypto=require(_0xc078('0xd'));var jsforce=require(_0xc078('0xe'));var deskjs=require(_0xc078('0xf'));var toCsv=require('to-csv');var querystring=require(_0xc078('0x10'));var Papa=require(_0xc078('0x11'));var Redis=require(_0xc078('0x12'));var authService=require(_0xc078('0x13'));var qs=require(_0xc078('0x14'));var as=require(_0xc078('0x15'));var hardwareService=require(_0xc078('0x16'));var logger=require('../../config/logger')(_0xc078('0x17'));var utils=require(_0xc078('0x18'));var config=require(_0xc078('0x19'));var licenseUtil=require(_0xc078('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x694f80,_0x403486){_0x403486=_0x403486||0xcc;return function(_0x1fdee4){if(_0x1fdee4){return _0x694f80[_0xc078('0x1b')](_0x403486);}return _0x694f80[_0xc078('0x1c')](_0x403486)[_0xc078('0x1d')]();};}function respondWithResult(_0x64cf1b,_0x15afff){_0x15afff=_0x15afff||0xc8;return function(_0x3fdfee){if(_0x3fdfee){return _0x64cf1b[_0xc078('0x1c')](_0x15afff)[_0xc078('0x1e')](_0x3fdfee);}};}function respondWithFilteredResult(_0x18a1d3,_0x552838){return function(_0x5db74a){if(_0x5db74a){var _0x226787=typeof _0x552838[_0xc078('0x1f')]===_0xc078('0x20')&&typeof _0x552838[_0xc078('0x21')]===_0xc078('0x20');var _0x385743=_0x5db74a[_0xc078('0x22')];var _0x12446f=_0x226787?0x0:_0x552838['offset'];var _0x5a0d48=_0x226787?_0x5db74a[_0xc078('0x22')]:_0x552838[_0xc078('0x1f')]+_0x552838[_0xc078('0x21')];var _0x4fba09;if(_0x5a0d48>=_0x385743){_0x5a0d48=_0x385743;_0x4fba09=0xc8;}else{_0x4fba09=0xce;}_0x18a1d3['status'](_0x4fba09);return _0x18a1d3['set']('Content-Range',_0x12446f+'-'+_0x5a0d48+'/'+_0x385743)['json'](_0x5db74a);}return null;};}function patchUpdates(_0x117c27){return function(_0x55557c){try{jsonpatch['apply'](_0x55557c,_0x117c27,!![]);}catch(_0x4e98c5){return BPromise[_0xc078('0x23')](_0x4e98c5);}return _0x55557c[_0xc078('0x24')]();};}function saveUpdates(_0x3d2217,_0x36abfd){return function(_0x14bb9d){if(_0x14bb9d){return _0x14bb9d['update'](_0x3d2217)[_0xc078('0x25')](function(_0x3cb249){return _0x3cb249;});}return null;};}function removeEntity(_0x13480b,_0x2155d7){return function(_0x4d3167){if(_0x4d3167){return _0x4d3167['destroy']()[_0xc078('0x25')](function(){_0x13480b['status'](0xcc)[_0xc078('0x1d')]();});}};}function handleEntityNotFound(_0x5e21ef,_0x4076f8){return function(_0x2d027e){if(!_0x2d027e){_0x5e21ef[_0xc078('0x1b')](0x194);}return _0x2d027e;};}function handleError(_0x2cc494,_0x4d3c3f){_0x4d3c3f=_0x4d3c3f||0x1f4;return function(_0x561bfa){logger[_0xc078('0x26')](_0x561bfa[_0xc078('0x27')]);if(_0x561bfa[_0xc078('0x28')]){delete _0x561bfa[_0xc078('0x28')];}_0x2cc494['status'](_0x4d3c3f)['send'](_0x561bfa);};}exports['index']=function(_0x5b76e7,_0x59319a){var _0x241ad4={},_0x48a51b={},_0x42ed7f={'count':0x0,'rows':[]};var _0x1bc950=_[_0xc078('0x29')](db[_0xc078('0x2a')][_0xc078('0x2b')],function(_0x31091e){return{'name':_0x31091e[_0xc078('0x2c')],'type':_0x31091e['type']['key']};});_0x48a51b['model']=_[_0xc078('0x29')](_0x1bc950,_0xc078('0x28'));_0x48a51b['query']=_[_0xc078('0x2d')](_0x5b76e7[_0xc078('0x2e')]);_0x48a51b[_0xc078('0x2f')]=_[_0xc078('0x30')](_0x48a51b[_0xc078('0x31')],_0x48a51b[_0xc078('0x2e')]);_0x241ad4[_0xc078('0x32')]=_[_0xc078('0x30')](_0x48a51b[_0xc078('0x31')],qs[_0xc078('0x33')](_0x5b76e7[_0xc078('0x2e')][_0xc078('0x33')]));_0x241ad4[_0xc078('0x32')]=_0x241ad4[_0xc078('0x32')][_0xc078('0x34')]?_0x241ad4['attributes']:_0x48a51b[_0xc078('0x31')];if(!_0x5b76e7[_0xc078('0x2e')][_0xc078('0x35')](_0xc078('0x36'))){_0x241ad4[_0xc078('0x21')]=qs['limit'](_0x5b76e7[_0xc078('0x2e')][_0xc078('0x21')]);_0x241ad4[_0xc078('0x1f')]=qs[_0xc078('0x1f')](_0x5b76e7[_0xc078('0x2e')][_0xc078('0x1f')]);}_0x241ad4[_0xc078('0x37')]=qs[_0xc078('0x38')](_0x5b76e7[_0xc078('0x2e')][_0xc078('0x38')]);_0x241ad4['where']=qs[_0xc078('0x2f')](_[_0xc078('0x39')](_0x5b76e7[_0xc078('0x2e')],_0x48a51b[_0xc078('0x2f')]),_0x1bc950);if(_0x5b76e7[_0xc078('0x2e')][_0xc078('0x3a')]){_0x241ad4[_0xc078('0x3b')]=_[_0xc078('0x3c')](_0x241ad4[_0xc078('0x3b')],{'$or':_['map'](_0x1bc950,function(_0x58390b){if(_0x58390b[_0xc078('0x3d')]!==_0xc078('0x3e')){var _0x3e56fb={};_0x3e56fb[_0x58390b['name']]={'$like':'%'+_0x5b76e7[_0xc078('0x2e')][_0xc078('0x3a')]+'%'};return _0x3e56fb;}})});}_0x241ad4=_['merge']({},_0x241ad4,_0x5b76e7[_0xc078('0x3f')]);var _0x55f81a={'where':_0x241ad4['where']};return db[_0xc078('0x2a')]['count'](_0x55f81a)[_0xc078('0x25')](function(_0x3012f7){_0x42ed7f['count']=_0x3012f7;if(_0x5b76e7[_0xc078('0x2e')]['includeAll']){_0x241ad4[_0xc078('0x40')]=[{'all':!![]}];}return db[_0xc078('0x2a')][_0xc078('0x41')](_0x241ad4);})[_0xc078('0x25')](function(_0x404d65){_0x42ed7f[_0xc078('0x42')]=_0x404d65;return _0x42ed7f;})['then'](respondWithFilteredResult(_0x59319a,_0x241ad4))[_0xc078('0x43')](handleError(_0x59319a,null));};exports[_0xc078('0x44')]=function(_0x5dd9ba,_0x2e9248){var _0x27beff={'raw':!![],'where':{'id':_0x5dd9ba[_0xc078('0x45')]['id']}},_0x361e40={};_0x361e40[_0xc078('0x31')]=_[_0xc078('0x2d')](db['SugarcrmField'][_0xc078('0x2b')]);_0x361e40['query']=_['keys'](_0x5dd9ba[_0xc078('0x2e')]);_0x361e40['filters']=_[_0xc078('0x30')](_0x361e40[_0xc078('0x31')],_0x361e40['query']);_0x27beff[_0xc078('0x32')]=_['intersection'](_0x361e40[_0xc078('0x31')],qs[_0xc078('0x33')](_0x5dd9ba['query'][_0xc078('0x33')]));_0x27beff['attributes']=_0x27beff[_0xc078('0x32')][_0xc078('0x34')]?_0x27beff['attributes']:_0x361e40[_0xc078('0x31')];if(_0x5dd9ba[_0xc078('0x2e')][_0xc078('0x46')]){_0x27beff['include']=[{'all':!![]}];}_0x27beff=_[_0xc078('0x3c')]({},_0x27beff,_0x5dd9ba[_0xc078('0x3f')]);return db[_0xc078('0x2a')][_0xc078('0x47')](_0x27beff)[_0xc078('0x25')](handleEntityNotFound(_0x2e9248,null))[_0xc078('0x25')](respondWithResult(_0x2e9248,null))[_0xc078('0x43')](handleError(_0x2e9248,null));};exports[_0xc078('0x48')]=function(_0x9e7892,_0x33606b){return db['SugarcrmField'][_0xc078('0x48')](_0x9e7892['body'],{})[_0xc078('0x25')](respondWithResult(_0x33606b,0xc9))[_0xc078('0x43')](handleError(_0x33606b,null));};exports['update']=function(_0x23d324,_0x48cf68){if(_0x23d324[_0xc078('0x49')]['id']){delete _0x23d324[_0xc078('0x49')]['id'];}return db[_0xc078('0x2a')][_0xc078('0x47')]({'where':{'id':_0x23d324[_0xc078('0x45')]['id']}})[_0xc078('0x25')](handleEntityNotFound(_0x48cf68,null))[_0xc078('0x25')](saveUpdates(_0x23d324[_0xc078('0x49')],null))[_0xc078('0x25')](respondWithResult(_0x48cf68,null))[_0xc078('0x43')](handleError(_0x48cf68,null));};exports[_0xc078('0x4a')]=function(_0x3995b9,_0x2588b3){return db[_0xc078('0x2a')][_0xc078('0x47')]({'where':{'id':_0x3995b9['params']['id']}})['then'](handleEntityNotFound(_0x2588b3,null))[_0xc078('0x25')](removeEntity(_0x2588b3,null))[_0xc078('0x43')](handleError(_0x2588b3,null));};
\ No newline at end of file
index 7dc0118..c572876 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x360e=['path','rimraf','../../config/environment','exports','SugarcrmField','int_sugarcrm_fields','sugarcrm_unique_index','FieldId','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x3b16e1,_0x3bda3e){var _0x311d1b=function(_0x2a979b){while(--_0x2a979b){_0x3b16e1['push'](_0x3b16e1['shift']());}};_0x311d1b(++_0x3bda3e);}(_0x360e,0x112));var _0xe360=function(_0x42f270,_0x452dec){_0x42f270=_0x42f270-0x0;var _0x57bc5b=_0x360e[_0x42f270];return _0x57bc5b;};'use strict';var _=require(_0xe360('0x0'));var util=require(_0xe360('0x1'));var logger=require(_0xe360('0x2'))(_0xe360('0x3'));var moment=require(_0xe360('0x4'));var BPromise=require(_0xe360('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xe360('0x6'));var rimraf=require(_0xe360('0x7'));var config=require(_0xe360('0x8'));var attributes=require('./intSugarcrmField.attributes');module[_0xe360('0x9')]=function(_0x526af5,_0x4c6b5b){return _0x526af5['define'](_0xe360('0xa'),attributes,{'tableName':_0xe360('0xb'),'paranoid':![],'indexes':[{'name':_0xe360('0xc'),'fields':['idField',_0xe360('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xab47=['../../config/environment','./intSugarcrmField.attributes','define','SugarcrmField','int_sugarcrm_fields','sugarcrm_unique_index','lodash','util','../../config/logger','moment','bluebird','path','rimraf'];(function(_0x5dd421,_0x46f942){var _0x1b42c7=function(_0x53a1dd){while(--_0x53a1dd){_0x5dd421['push'](_0x5dd421['shift']());}};_0x1b42c7(++_0x46f942);}(_0xab47,0xd6));var _0x7ab4=function(_0x29dda1,_0x508e13){_0x29dda1=_0x29dda1-0x0;var _0x21b0ef=_0xab47[_0x29dda1];return _0x21b0ef;};'use strict';var _=require(_0x7ab4('0x0'));var util=require(_0x7ab4('0x1'));var logger=require(_0x7ab4('0x2'))('api');var moment=require(_0x7ab4('0x3'));var BPromise=require(_0x7ab4('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x7ab4('0x5'));var rimraf=require(_0x7ab4('0x6'));var config=require(_0x7ab4('0x7'));var attributes=require(_0x7ab4('0x8'));module['exports']=function(_0x1efcd2,_0x14816c){return _0x1efcd2[_0x7ab4('0x9')](_0x7ab4('0xa'),attributes,{'tableName':_0x7ab4('0xb'),'paranoid':![],'indexes':[{'name':_0x7ab4('0xc'),'fields':['idField','FieldId'],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index 81ea4ad..e3e9bf7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd69e=['error','code','message','result','lodash','util','moment','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','SugarcrmField,\x20%s,\x20%s','request\x20sent','debug','stringify'];(function(_0x70a8a5,_0x35a384){var _0x2b563b=function(_0x4bbb5b){while(--_0x4bbb5b){_0x70a8a5['push'](_0x70a8a5['shift']());}};_0x2b563b(++_0x35a384);}(_0xd69e,0x193));var _0xed69=function(_0x27af45,_0x1b57aa){_0x27af45=_0x27af45-0x0;var _0x18df21=_0xd69e[_0x27af45];return _0x18df21;};'use strict';var _=require(_0xed69('0x0'));var util=require(_0xed69('0x1'));var moment=require(_0xed69('0x2'));var BPromise=require('bluebird');var rs=require(_0xed69('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xed69('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xed69('0x5'))(_0xed69('0x6'));var config=require(_0xed69('0x7'));var jayson=require(_0xed69('0x8'));var client=jayson['client'][_0xed69('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x103562,_0x205045,_0x20534d){return new BPromise(function(_0x27f49d,_0xe3acc7){return client[_0xed69('0xa')](_0x103562,_0x20534d)[_0xed69('0xb')](function(_0x18d0f4){logger[_0xed69('0xc')](_0xed69('0xd'),_0x205045,_0xed69('0xe'));logger[_0xed69('0xf')]('SugarcrmField,\x20%s,\x20%s,\x20%s',_0x205045,_0xed69('0xe'),JSON[_0xed69('0x10')](_0x18d0f4));if(_0x18d0f4[_0xed69('0x11')]){if(_0x18d0f4[_0xed69('0x11')][_0xed69('0x12')]===0x1f4){logger[_0xed69('0x11')](_0xed69('0xd'),_0x205045,_0x18d0f4[_0xed69('0x11')]['message']);return _0xe3acc7(_0x18d0f4[_0xed69('0x11')][_0xed69('0x13')]);}logger['error']('SugarcrmField,\x20%s,\x20%s',_0x205045,_0x18d0f4['error'][_0xed69('0x13')]);return _0x27f49d(_0x18d0f4[_0xed69('0x11')][_0xed69('0x13')]);}else{logger[_0xed69('0xc')](_0xed69('0xd'),_0x205045,'request\x20sent');_0x27f49d(_0x18d0f4[_0xed69('0x14')][_0xed69('0x13')]);}})['catch'](function(_0x2c5282){logger[_0xed69('0x11')](_0xed69('0xd'),_0x205045,_0x2c5282);_0xe3acc7(_0x2c5282);});});}
\ No newline at end of file
+var _0xe7e7=['bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','SugarcrmField,\x20%s,\x20%s','request\x20sent','SugarcrmField,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xe7e7,0xbd));var _0x7e7e=function(_0x1cd12a,_0x1a55cd){_0x1cd12a=_0x1cd12a-0x0;var _0x1cab4d=_0xe7e7[_0x1cd12a];return _0x1cab4d;};'use strict';var _=require(_0x7e7e('0x0'));var util=require(_0x7e7e('0x1'));var moment=require(_0x7e7e('0x2'));var BPromise=require(_0x7e7e('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7e7e('0x4'));var db=require(_0x7e7e('0x5'))['db'];var utils=require(_0x7e7e('0x6'));var logger=require(_0x7e7e('0x7'))(_0x7e7e('0x8'));var config=require(_0x7e7e('0x9'));var jayson=require(_0x7e7e('0xa'));var client=jayson[_0x7e7e('0xb')][_0x7e7e('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x2926ff,_0x5b1aa4,_0xfecd7e){return new BPromise(function(_0x2332fd,_0x2002c6){return client[_0x7e7e('0xd')](_0x2926ff,_0xfecd7e)[_0x7e7e('0xe')](function(_0x986086){logger[_0x7e7e('0xf')](_0x7e7e('0x10'),_0x5b1aa4,_0x7e7e('0x11'));logger['debug'](_0x7e7e('0x12'),_0x5b1aa4,'request\x20sent',JSON[_0x7e7e('0x13')](_0x986086));if(_0x986086['error']){if(_0x986086[_0x7e7e('0x14')]['code']===0x1f4){logger[_0x7e7e('0x14')](_0x7e7e('0x10'),_0x5b1aa4,_0x986086[_0x7e7e('0x14')][_0x7e7e('0x15')]);return _0x2002c6(_0x986086['error'][_0x7e7e('0x15')]);}logger[_0x7e7e('0x14')](_0x7e7e('0x10'),_0x5b1aa4,_0x986086['error'][_0x7e7e('0x15')]);return _0x2332fd(_0x986086[_0x7e7e('0x14')][_0x7e7e('0x15')]);}else{logger['info'](_0x7e7e('0x10'),_0x5b1aa4,'request\x20sent');_0x2332fd(_0x986086[_0x7e7e('0x16')][_0x7e7e('0x15')]);}})[_0x7e7e('0x17')](function(_0xa1ece4){logger['error']('SugarcrmField,\x20%s,\x20%s',_0x5b1aa4,_0xa1ece4);_0x2002c6(_0xa1ece4);});});}
\ No newline at end of file
index c531ceb..f672959 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x777f=['./intVtigerAccount.controller','get','/:id','isAuthenticated','show','/:id/configurations','getConfigurations','getFields','post','create','addConfiguration','put','update','delete','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment'];(function(_0xe4bb3d,_0x21e87e){var _0xd9e51=function(_0x1f732b){while(--_0x1f732b){_0xe4bb3d['push'](_0xe4bb3d['shift']());}};_0xd9e51(++_0x21e87e);}(_0x777f,0x9f));var _0xf777=function(_0x336376,_0xe4b28d){_0x336376=_0x336376-0x0;var _0x1d2a8e=_0x777f[_0x336376];return _0x1d2a8e;};'use strict';var multer=require(_0xf777('0x0'));var util=require(_0xf777('0x1'));var path=require(_0xf777('0x2'));var timeout=require(_0xf777('0x3'));var express=require(_0xf777('0x4'));var router=express[_0xf777('0x5')]();var fs_extra=require(_0xf777('0x6'));var auth=require(_0xf777('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0xf777('0x8'));var controller=require(_0xf777('0x9'));router['get']('/',auth['isAuthenticated'](),controller['index']);router[_0xf777('0xa')](_0xf777('0xb'),auth[_0xf777('0xc')](),controller[_0xf777('0xd')]);router[_0xf777('0xa')](_0xf777('0xe'),auth[_0xf777('0xc')](),controller[_0xf777('0xf')]);router['get']('/:id/fields',auth['isAuthenticated'](),controller[_0xf777('0x10')]);router[_0xf777('0x11')]('/',auth['isAuthenticated'](),controller[_0xf777('0x12')]);router[_0xf777('0x11')](_0xf777('0xe'),auth['isAuthenticated'](),controller[_0xf777('0x13')]);router[_0xf777('0x14')](_0xf777('0xb'),auth[_0xf777('0xc')](),controller[_0xf777('0x15')]);router[_0xf777('0x16')](_0xf777('0xb'),auth['isAuthenticated'](),controller['destroy']);module[_0xf777('0x17')]=router;
\ No newline at end of file
+var _0xb9c6=['get','/:id/configurations','getConfigurations','/:id/fields','getFields','create','post','put','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../config/environment','./intVtigerAccount.controller','index','/:id','isAuthenticated'];(function(_0x4ecd76,_0x79f1f3){var _0x240f34=function(_0x563f79){while(--_0x563f79){_0x4ecd76['push'](_0x4ecd76['shift']());}};_0x240f34(++_0x79f1f3);}(_0xb9c6,0x1d8));var _0x6b9c=function(_0x30ebff,_0x434cc4){_0x30ebff=_0x30ebff-0x0;var _0x421101=_0xb9c6[_0x30ebff];return _0x421101;};'use strict';var multer=require(_0x6b9c('0x0'));var util=require(_0x6b9c('0x1'));var path=require(_0x6b9c('0x2'));var timeout=require(_0x6b9c('0x3'));var express=require(_0x6b9c('0x4'));var router=express[_0x6b9c('0x5')]();var fs_extra=require(_0x6b9c('0x6'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x6b9c('0x7'));var controller=require(_0x6b9c('0x8'));router['get']('/',auth['isAuthenticated'](),controller[_0x6b9c('0x9')]);router['get'](_0x6b9c('0xa'),auth[_0x6b9c('0xb')](),controller['show']);router[_0x6b9c('0xc')](_0x6b9c('0xd'),auth[_0x6b9c('0xb')](),controller[_0x6b9c('0xe')]);router[_0x6b9c('0xc')](_0x6b9c('0xf'),auth[_0x6b9c('0xb')](),controller[_0x6b9c('0x10')]);router['post']('/',auth[_0x6b9c('0xb')](),controller[_0x6b9c('0x11')]);router[_0x6b9c('0x12')](_0x6b9c('0xd'),auth[_0x6b9c('0xb')](),controller['addConfiguration']);router[_0x6b9c('0x13')](_0x6b9c('0xa'),auth[_0x6b9c('0xb')](),controller['update']);router['delete'](_0x6b9c('0xa'),auth['isAuthenticated'](),controller[_0x6b9c('0x14')]);module[_0x6b9c('0x15')]=router;
\ No newline at end of file
index 986aa46..2a25a7c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7e09=['STRING','HelpDesk','sequelize','exports'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0x7e09,0x1b2));var _0x97e0=function(_0x2c7b5c,_0x331adf){_0x2c7b5c=_0x2c7b5c-0x0;var _0x1df5f3=_0x7e09[_0x2c7b5c];return _0x1df5f3;};'use strict';var Sequelize=require(_0x97e0('0x0'));module[_0x97e0('0x1')]={'name':{'type':Sequelize[_0x97e0('0x2')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0x97e0('0x2')],'allowNull':![]},'moduleName':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x97e0('0x3')},'remoteUri':{'type':Sequelize['STRING'],'allowNull':![]},'serverUrl':{'type':Sequelize[_0x97e0('0x2')],'allowNull':![]},'accessKey':{'type':Sequelize[_0x97e0('0x2')],'allowNull':![]}};
\ No newline at end of file
+var _0xcfba=['STRING','HelpDesk','sequelize'];(function(_0x4b03c9,_0x17ce03){var _0x161ba2=function(_0xb952db){while(--_0xb952db){_0x4b03c9['push'](_0x4b03c9['shift']());}};_0x161ba2(++_0x17ce03);}(_0xcfba,0x1df));var _0xacfb=function(_0x1afeb5,_0x7c6311){_0x1afeb5=_0x1afeb5-0x0;var _0x55f568=_0xcfba[_0x1afeb5];return _0x55f568;};'use strict';var Sequelize=require(_0xacfb('0x0'));module['exports']={'name':{'type':Sequelize[_0xacfb('0x1')],'allowNull':![]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0xacfb('0x1')],'allowNull':![]},'moduleName':{'type':Sequelize[_0xacfb('0x1')],'allowNull':![],'defaultValue':_0xacfb('0x2')},'remoteUri':{'type':Sequelize[_0xacfb('0x1')],'allowNull':![]},'serverUrl':{'type':Sequelize[_0xacfb('0x1')],'allowNull':![]},'accessKey':{'type':Sequelize[_0xacfb('0x1')],'allowNull':![]}};
\ No newline at end of file
index 9129dce..3b3dd54 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5ddf=['length','hasOwnProperty','sort','where','pick','filter','merge','VIRTUAL','VtigerAccount','includeAll','include','findAll','params','keys','find','create','body','catch','update','getConfigurations','findOne','order','nolimit','AccountId','getSubjects','channel','Descriptions','getDescriptions','VtigerConfiguration','VtigerField','Subjects','getFields','username','description','moduleName','remoteUri','accessKey','slice','substring','format','%s/webservice.php','GET','getchallenge','success','POST','result','token','describe','sessionName','owner','includes','remove','editable','false','label','startsWith','picklist','picklistValues','value','log','vTiger\x20error:\x20','stringify','send','Wrong\x20credentials','statusCode','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../components/integrations/configuration','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','reject','save','destroy','then','error','name','index','map','rawAttributes','fieldName','type','key','query','filters','intersection','model','attributes','fields'];(function(_0x391d91,_0xb372c2){var _0x41f762=function(_0x14b121){while(--_0x14b121){_0x391d91['push'](_0x391d91['shift']());}};_0x41f762(++_0xb372c2);}(_0x5ddf,0x1a0));var _0xf5dd=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0x5ddf[_0x42cae2];return _0x5f256f;};'use strict';var emlformat=require(_0xf5dd('0x0'));var rimraf=require(_0xf5dd('0x1'));var zipdir=require(_0xf5dd('0x2'));var jsonpatch=require(_0xf5dd('0x3'));var rp=require('request-promise');var moment=require(_0xf5dd('0x4'));var BPromise=require(_0xf5dd('0x5'));var Mustache=require(_0xf5dd('0x6'));var util=require('util');var path=require(_0xf5dd('0x7'));var sox=require(_0xf5dd('0x8'));var csv=require(_0xf5dd('0x9'));var ejs=require(_0xf5dd('0xa'));var fs=require('fs');var fs_extra=require(_0xf5dd('0xb'));var _=require(_0xf5dd('0xc'));var squel=require('squel');var crypto=require(_0xf5dd('0xd'));var jsforce=require(_0xf5dd('0xe'));var deskjs=require(_0xf5dd('0xf'));var toCsv=require(_0xf5dd('0x9'));var querystring=require(_0xf5dd('0x10'));var Papa=require(_0xf5dd('0x11'));var Redis=require('ioredis');var authService=require(_0xf5dd('0x12'));var qs=require(_0xf5dd('0x13'));var as=require(_0xf5dd('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xf5dd('0x15'))(_0xf5dd('0x16'));var utils=require(_0xf5dd('0x17'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];var integrations=require(_0xf5dd('0x18'));function respondWithStatusCode(_0xa2581d,_0x1d98fe){_0x1d98fe=_0x1d98fe||0xcc;return function(_0x405800){if(_0x405800){return _0xa2581d[_0xf5dd('0x19')](_0x1d98fe);}return _0xa2581d[_0xf5dd('0x1a')](_0x1d98fe)[_0xf5dd('0x1b')]();};}function respondWithResult(_0xc8e10c,_0x4246c1){_0x4246c1=_0x4246c1||0xc8;return function(_0x13152f){if(_0x13152f){return _0xc8e10c[_0xf5dd('0x1a')](_0x4246c1)[_0xf5dd('0x1c')](_0x13152f);}};}function respondWithFilteredResult(_0x2eb990,_0x47d435){return function(_0x44c334){if(_0x44c334){var _0x4e3107=typeof _0x47d435[_0xf5dd('0x1d')]===_0xf5dd('0x1e')&&typeof _0x47d435[_0xf5dd('0x1f')]==='undefined';var _0x222fc5=_0x44c334[_0xf5dd('0x20')];var _0x1b3ef6=_0x4e3107?0x0:_0x47d435['offset'];var _0x3f96cc=_0x4e3107?_0x44c334[_0xf5dd('0x20')]:_0x47d435['offset']+_0x47d435[_0xf5dd('0x1f')];var _0x7489af;if(_0x3f96cc>=_0x222fc5){_0x3f96cc=_0x222fc5;_0x7489af=0xc8;}else{_0x7489af=0xce;}_0x2eb990['status'](_0x7489af);return _0x2eb990['set'](_0xf5dd('0x21'),_0x1b3ef6+'-'+_0x3f96cc+'/'+_0x222fc5)[_0xf5dd('0x1c')](_0x44c334);}return null;};}function patchUpdates(_0x1f0ef7){return function(_0x485968){try{jsonpatch['apply'](_0x485968,_0x1f0ef7,!![]);}catch(_0x3528b9){return BPromise[_0xf5dd('0x22')](_0x3528b9);}return _0x485968[_0xf5dd('0x23')]();};}function saveUpdates(_0x51afff,_0x26bbc9){return function(_0x5e2677){if(_0x5e2677){return _0x5e2677['update'](_0x51afff)['then'](function(_0x4f10ec){return _0x4f10ec;});}return null;};}function removeEntity(_0xdd5d6f,_0x36bee9){return function(_0x519594){if(_0x519594){return _0x519594[_0xf5dd('0x24')]()[_0xf5dd('0x25')](function(){_0xdd5d6f['status'](0xcc)[_0xf5dd('0x1b')]();});}};}function handleEntityNotFound(_0x41683f,_0x1bea2d){return function(_0x379423){if(!_0x379423){_0x41683f[_0xf5dd('0x19')](0x194);}return _0x379423;};}function handleError(_0x3c96a1,_0x473f88){_0x473f88=_0x473f88||0x1f4;return function(_0xdec13b){logger[_0xf5dd('0x26')](_0xdec13b['stack']);if(_0xdec13b[_0xf5dd('0x27')]){delete _0xdec13b[_0xf5dd('0x27')];}_0x3c96a1[_0xf5dd('0x1a')](_0x473f88)['send'](_0xdec13b);};}exports[_0xf5dd('0x28')]=function(_0x227105,_0x5011ad){var _0x48d343={},_0x497210={},_0x25b46d={'count':0x0,'rows':[]};var _0x14e4d9=_[_0xf5dd('0x29')](db['VtigerAccount'][_0xf5dd('0x2a')],function(_0x1655f3){return{'name':_0x1655f3[_0xf5dd('0x2b')],'type':_0x1655f3[_0xf5dd('0x2c')][_0xf5dd('0x2d')]};});_0x497210['model']=_[_0xf5dd('0x29')](_0x14e4d9,_0xf5dd('0x27'));_0x497210['query']=_['keys'](_0x227105[_0xf5dd('0x2e')]);_0x497210[_0xf5dd('0x2f')]=_[_0xf5dd('0x30')](_0x497210[_0xf5dd('0x31')],_0x497210['query']);_0x48d343[_0xf5dd('0x32')]=_[_0xf5dd('0x30')](_0x497210['model'],qs[_0xf5dd('0x33')](_0x227105[_0xf5dd('0x2e')][_0xf5dd('0x33')]));_0x48d343[_0xf5dd('0x32')]=_0x48d343[_0xf5dd('0x32')][_0xf5dd('0x34')]?_0x48d343[_0xf5dd('0x32')]:_0x497210['model'];if(!_0x227105[_0xf5dd('0x2e')][_0xf5dd('0x35')]('nolimit')){_0x48d343[_0xf5dd('0x1f')]=qs[_0xf5dd('0x1f')](_0x227105['query'][_0xf5dd('0x1f')]);_0x48d343['offset']=qs[_0xf5dd('0x1d')](_0x227105[_0xf5dd('0x2e')]['offset']);}_0x48d343['order']=qs[_0xf5dd('0x36')](_0x227105[_0xf5dd('0x2e')][_0xf5dd('0x36')]);_0x48d343[_0xf5dd('0x37')]=qs[_0xf5dd('0x2f')](_[_0xf5dd('0x38')](_0x227105[_0xf5dd('0x2e')],_0x497210[_0xf5dd('0x2f')]),_0x14e4d9);if(_0x227105[_0xf5dd('0x2e')][_0xf5dd('0x39')]){_0x48d343[_0xf5dd('0x37')]=_[_0xf5dd('0x3a')](_0x48d343['where'],{'$or':_[_0xf5dd('0x29')](_0x14e4d9,function(_0x177688){if(_0x177688[_0xf5dd('0x2c')]!==_0xf5dd('0x3b')){var _0x4009e7={};_0x4009e7[_0x177688['name']]={'$like':'%'+_0x227105[_0xf5dd('0x2e')][_0xf5dd('0x39')]+'%'};return _0x4009e7;}})});}_0x48d343=_[_0xf5dd('0x3a')]({},_0x48d343,_0x227105['options']);var _0x20a418={'where':_0x48d343[_0xf5dd('0x37')]};return db[_0xf5dd('0x3c')]['count'](_0x20a418)[_0xf5dd('0x25')](function(_0x2b8d81){_0x25b46d[_0xf5dd('0x20')]=_0x2b8d81;if(_0x227105[_0xf5dd('0x2e')][_0xf5dd('0x3d')]){_0x48d343[_0xf5dd('0x3e')]=[{'all':!![]}];}return db[_0xf5dd('0x3c')][_0xf5dd('0x3f')](_0x48d343);})[_0xf5dd('0x25')](function(_0x16ef7a){_0x25b46d['rows']=_0x16ef7a;return _0x25b46d;})[_0xf5dd('0x25')](respondWithFilteredResult(_0x5011ad,_0x48d343))['catch'](handleError(_0x5011ad,null));};exports['show']=function(_0x47ad01,_0x31e846){var _0x2b98c0={'raw':![],'where':{'id':_0x47ad01[_0xf5dd('0x40')]['id']}},_0x296e28={};_0x296e28[_0xf5dd('0x31')]=_['keys'](db[_0xf5dd('0x3c')][_0xf5dd('0x2a')]);_0x296e28[_0xf5dd('0x2e')]=_[_0xf5dd('0x41')](_0x47ad01[_0xf5dd('0x2e')]);_0x296e28['filters']=_[_0xf5dd('0x30')](_0x296e28[_0xf5dd('0x31')],_0x296e28['query']);_0x2b98c0['attributes']=_[_0xf5dd('0x30')](_0x296e28['model'],qs[_0xf5dd('0x33')](_0x47ad01['query']['fields']));_0x2b98c0[_0xf5dd('0x32')]=_0x2b98c0['attributes'][_0xf5dd('0x34')]?_0x2b98c0[_0xf5dd('0x32')]:_0x296e28['model'];if(_0x47ad01[_0xf5dd('0x2e')]['includeAll']){_0x2b98c0[_0xf5dd('0x3e')]=[{'all':!![]}];}_0x2b98c0=_[_0xf5dd('0x3a')]({},_0x2b98c0,_0x47ad01['options']);return db[_0xf5dd('0x3c')][_0xf5dd('0x42')](_0x2b98c0)['then'](handleEntityNotFound(_0x31e846,null))[_0xf5dd('0x25')](respondWithResult(_0x31e846,null))['catch'](handleError(_0x31e846,null));};exports['create']=function(_0x28f3ba,_0x57304f){return db[_0xf5dd('0x3c')][_0xf5dd('0x43')](_0x28f3ba[_0xf5dd('0x44')],{})[_0xf5dd('0x25')](respondWithResult(_0x57304f,0xc9))[_0xf5dd('0x45')](handleError(_0x57304f,null));};exports[_0xf5dd('0x46')]=function(_0x400011,_0x1d576c){if(_0x400011[_0xf5dd('0x44')]['id']){delete _0x400011['body']['id'];}return db['VtigerAccount'][_0xf5dd('0x42')]({'where':{'id':_0x400011[_0xf5dd('0x40')]['id']}})[_0xf5dd('0x25')](handleEntityNotFound(_0x1d576c,null))['then'](saveUpdates(_0x400011['body'],null))['then'](respondWithResult(_0x1d576c,null))[_0xf5dd('0x45')](handleError(_0x1d576c,null));};exports[_0xf5dd('0x24')]=function(_0x15a7cb,_0xa5ec77){return db[_0xf5dd('0x3c')][_0xf5dd('0x42')]({'where':{'id':_0x15a7cb[_0xf5dd('0x40')]['id']}})[_0xf5dd('0x25')](handleEntityNotFound(_0xa5ec77,null))['then'](removeEntity(_0xa5ec77,null))['catch'](handleError(_0xa5ec77,null));};exports[_0xf5dd('0x47')]=function(_0x4cf269,_0x20a19e,_0x2496b4){var _0x57bb0c={};var _0x5911f9={};var _0x5bf045;var _0x2d772b;return db['VtigerAccount'][_0xf5dd('0x48')]({'where':{'id':_0x4cf269[_0xf5dd('0x40')]['id']}})['then'](handleEntityNotFound(_0x20a19e,null))[_0xf5dd('0x25')](function(_0x3a98d4){if(_0x3a98d4){_0x5bf045=_0x3a98d4;_0x5911f9[_0xf5dd('0x31')]=_[_0xf5dd('0x41')](db['VtigerConfiguration']['rawAttributes']);_0x5911f9['query']=_[_0xf5dd('0x41')](_0x4cf269[_0xf5dd('0x2e')]);_0x5911f9[_0xf5dd('0x2f')]=_['intersection'](_0x5911f9['model'],_0x5911f9[_0xf5dd('0x2e')]);_0x57bb0c[_0xf5dd('0x32')]=_[_0xf5dd('0x30')](_0x5911f9[_0xf5dd('0x31')],qs[_0xf5dd('0x33')](_0x4cf269[_0xf5dd('0x2e')][_0xf5dd('0x33')]));_0x57bb0c[_0xf5dd('0x32')]=_0x57bb0c[_0xf5dd('0x32')][_0xf5dd('0x34')]?_0x57bb0c['attributes']:_0x5911f9[_0xf5dd('0x31')];_0x57bb0c[_0xf5dd('0x49')]=qs['sort'](_0x4cf269[_0xf5dd('0x2e')]['sort']);_0x57bb0c[_0xf5dd('0x37')]=qs[_0xf5dd('0x2f')](_[_0xf5dd('0x38')](_0x4cf269['query'],_0x5911f9[_0xf5dd('0x2f')]));if(_0x4cf269[_0xf5dd('0x2e')][_0xf5dd('0x39')]){_0x57bb0c[_0xf5dd('0x37')]=_[_0xf5dd('0x3a')](_0x57bb0c[_0xf5dd('0x37')],{'$or':_[_0xf5dd('0x29')](_0x57bb0c[_0xf5dd('0x32')],function(_0x3cf1df){var _0x2ae7b8={};_0x2ae7b8[_0x3cf1df]={'$like':'%'+_0x4cf269[_0xf5dd('0x2e')][_0xf5dd('0x39')]+'%'};return _0x2ae7b8;})});}_0x57bb0c=_['merge']({},_0x57bb0c,_0x4cf269['options']);return _0x5bf045[_0xf5dd('0x47')](_0x57bb0c);}})['then'](function(_0x4ac89e){if(_0x4ac89e){_0x2d772b=_0x4ac89e['length'];if(!_0x4cf269['query'][_0xf5dd('0x35')](_0xf5dd('0x4a'))){_0x57bb0c[_0xf5dd('0x1f')]=qs[_0xf5dd('0x1f')](_0x4cf269['query'][_0xf5dd('0x1f')]);_0x57bb0c['offset']=qs[_0xf5dd('0x1d')](_0x4cf269[_0xf5dd('0x2e')][_0xf5dd('0x1d')]);}return _0x5bf045[_0xf5dd('0x47')](_0x57bb0c);}})[_0xf5dd('0x25')](function(_0xbdb05f){if(_0xbdb05f){return _0xbdb05f?{'count':_0x2d772b,'rows':_0xbdb05f}:null;}})[_0xf5dd('0x25')](respondWithResult(_0x20a19e,null))[_0xf5dd('0x45')](handleError(_0x20a19e,null));};exports['addConfiguration']=function(_0x5f18f4,_0x367b02,_0xe068c3){if(_0x5f18f4[_0xf5dd('0x44')]['id']){delete _0x5f18f4['body']['id'];}return db[_0xf5dd('0x3c')]['findOne']({'where':{'id':_0x5f18f4[_0xf5dd('0x40')]['id']}})[_0xf5dd('0x25')](handleEntityNotFound(_0x367b02,null))[_0xf5dd('0x25')](function(_0x704484){if(_0x704484){_0x5f18f4[_0xf5dd('0x44')][_0xf5dd('0x4b')]=_0x704484['id'];_0x5f18f4[_0xf5dd('0x44')]['Subjects']=integrations[_0xf5dd('0x4c')](_0x5f18f4[_0xf5dd('0x44')][_0xf5dd('0x4d')],_0x5f18f4[_0xf5dd('0x44')][_0xf5dd('0x2c')]);_0x5f18f4[_0xf5dd('0x44')][_0xf5dd('0x4e')]=integrations[_0xf5dd('0x4f')](_0x5f18f4[_0xf5dd('0x44')][_0xf5dd('0x4d')],_0x5f18f4[_0xf5dd('0x44')][_0xf5dd('0x2c')]);return db[_0xf5dd('0x50')]['create'](_0x5f18f4[_0xf5dd('0x44')],{'include':[{'model':db[_0xf5dd('0x51')],'as':_0xf5dd('0x52')},{'model':db[_0xf5dd('0x51')],'as':_0xf5dd('0x4e')}]});}return null;})[_0xf5dd('0x25')](respondWithResult(_0x367b02,null))['catch'](handleError(_0x367b02,null));};var md5=require('md5');exports[_0xf5dd('0x53')]=function(_0x48ef7b,_0x1db320,_0x434c6d){var _0x20e1ec=null;var _0x48cb53=null;var _0x9149f=null;var _0x3fbd2f=null;var _0x4c017a='';return db['VtigerAccount'][_0xf5dd('0x48')]({'where':{'id':_0x48ef7b[_0xf5dd('0x40')]['id']},'attributes':['id','name',_0xf5dd('0x54'),_0xf5dd('0x55'),_0xf5dd('0x56'),_0xf5dd('0x57'),'serverUrl',_0xf5dd('0x58')]})['then'](handleEntityNotFound(_0x1db320,null))['then'](function(_0x1cf8b3){if(_0x1cf8b3){_0x20e1ec=_0x1cf8b3[_0xf5dd('0x54')];_0x48cb53=_0x1cf8b3['accessKey'];_0x9149f=_0x1cf8b3[_0xf5dd('0x56')];_0x4c017a=_0x1cf8b3[_0xf5dd('0x57')];var _0x16830e=_0x4c017a[_0xf5dd('0x59')](-0x1);if(_0x16830e==='/'){_0x4c017a=_0x4c017a[_0xf5dd('0x5a')](0x0,_0x4c017a['lastIndexOf'](_0x16830e));}_0x3fbd2f=util[_0xf5dd('0x5b')](_0xf5dd('0x5c'),_0x4c017a);var _0x5bb9da={'method':_0xf5dd('0x5d'),'uri':_0x3fbd2f,'qs':{'operation':_0xf5dd('0x5e'),'username':_0x1cf8b3[_0xf5dd('0x54')]},'json':!![]};return rp(_0x5bb9da);}})[_0xf5dd('0x25')](function(_0x4eea2d){if(_0x4eea2d[_0xf5dd('0x5f')]){var _0x43219b={'method':_0xf5dd('0x60'),'uri':_0x3fbd2f,'form':{'operation':'login','username':_0x20e1ec,'accessKey':md5(_0x4eea2d[_0xf5dd('0x61')][_0xf5dd('0x62')]+_0x48cb53)},'json':!![]};return rp(_0x43219b);}})[_0xf5dd('0x25')](function(_0x3d4bcc){if(_0x3d4bcc[_0xf5dd('0x5f')]){var _0x47e39f={'method':_0xf5dd('0x5d'),'uri':_0x3fbd2f,'qs':{'operation':_0xf5dd('0x63'),'username':_0x20e1ec,'sessionName':_0x3d4bcc['result'][_0xf5dd('0x64')],'elementType':_0x9149f},'json':!![]};return rp(_0x47e39f);}})['then'](function(_0x4b3abc){if(_0x4b3abc['success']){var _0x116c38=['autogenerated','reference',_0xf5dd('0x65')];_['remove'](_0x4b3abc[_0xf5dd('0x61')][_0xf5dd('0x33')],function(_0x1c091e){return _0x116c38[_0xf5dd('0x66')](_0x1c091e[_0xf5dd('0x2c')][_0xf5dd('0x27')]);});_[_0xf5dd('0x67')](_0x4b3abc[_0xf5dd('0x61')]['fields'],function(_0x4a876f){return _0x4a876f[_0xf5dd('0x68')]===_0xf5dd('0x69');});return{'count':_0x4b3abc[_0xf5dd('0x61')][_0xf5dd('0x33')][_0xf5dd('0x34')],'rows':_[_0xf5dd('0x29')](_0x4b3abc['result'][_0xf5dd('0x33')],function(_0xbd26c5){return{'id':_0xbd26c5[_0xf5dd('0x27')],'name':_0xbd26c5[_0xf5dd('0x6a')],'custom':_[_0xf5dd('0x6b')](_0xbd26c5[_0xf5dd('0x27')],'cf_')?!![]:![],'options':_0xbd26c5[_0xf5dd('0x2c')][_0xf5dd('0x27')]===_0xf5dd('0x6c')&&_0xbd26c5[_0xf5dd('0x2c')]['picklistValues'][_0xf5dd('0x34')]>0x0?_[_0xf5dd('0x29')](_0xbd26c5[_0xf5dd('0x2c')][_0xf5dd('0x6d')],function(_0x5baef6){return{'name':_0x5baef6[_0xf5dd('0x6a')],'value':_0x5baef6[_0xf5dd('0x6e')]};}):[]};})};}})[_0xf5dd('0x25')](respondWithResult(_0x1db320,null))[_0xf5dd('0x45')](function(_0x53b71e){console[_0xf5dd('0x6f')](_0xf5dd('0x70')+_0x53b71e);var _0x1b0b98=_0x48ef7b['query']['test']?0x1f4:_0x53b71e['statusCode']||0x1f4;logger['error']('getFields,\x20%s,\x20%s,\x20%s',_0xf5dd('0x53'),_0x1b0b98,JSON[_0xf5dd('0x71')](_0x53b71e));delete _0x53b71e[_0xf5dd('0x27')];if(_0x1b0b98===0x191){_0x1b0b98=0x190;}_0x1db320['status'](_0x1b0b98)[_0xf5dd('0x72')](_0x48ef7b[_0xf5dd('0x2e')]['test']?{'message':_0xf5dd('0x73'),'statusCode':_0x53b71e[_0xf5dd('0x74')]}:_0x53b71e);});};
\ No newline at end of file
+var _0xf401=['attributes','fields','length','nolimit','order','sort','where','pick','filter','map','VIRTUAL','merge','options','VtigerAccount','includeAll','include','rows','catch','params','create','body','find','destroy','getConfigurations','keys','VtigerConfiguration','hasOwnProperty','findOne','getSubjects','Descriptions','getDescriptions','channel','VtigerField','Subjects','md5','username','description','moduleName','remoteUri','accessKey','slice','substring','format','%s/webservice.php','GET','success','POST','login','token','describe','result','autogenerated','reference','owner','remove','includes','editable','false','label','startsWith','cf_','picklist','picklistValues','value','log','vTiger\x20error:\x20','test','getFields','Wrong\x20credentials','statusCode','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','api','../../config/utils','../../config/environment','../../mysqldb','../../components/integrations/configuration','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','save','update','then','error','stack','name','index','rawAttributes','type','key','query','filters','intersection','model'];(function(_0x10ccf1,_0x20f414){var _0x257c76=function(_0x49f817){while(--_0x49f817){_0x10ccf1['push'](_0x10ccf1['shift']());}};_0x257c76(++_0x20f414);}(_0xf401,0xbe));var _0x1f40=function(_0x467ad2,_0x22ddc3){_0x467ad2=_0x467ad2-0x0;var _0x3bb275=_0xf401[_0x467ad2];return _0x3bb275;};'use strict';var emlformat=require(_0x1f40('0x0'));var rimraf=require(_0x1f40('0x1'));var zipdir=require(_0x1f40('0x2'));var jsonpatch=require(_0x1f40('0x3'));var rp=require(_0x1f40('0x4'));var moment=require(_0x1f40('0x5'));var BPromise=require(_0x1f40('0x6'));var Mustache=require(_0x1f40('0x7'));var util=require('util');var path=require('path');var sox=require(_0x1f40('0x8'));var csv=require(_0x1f40('0x9'));var ejs=require(_0x1f40('0xa'));var fs=require('fs');var fs_extra=require(_0x1f40('0xb'));var _=require(_0x1f40('0xc'));var squel=require(_0x1f40('0xd'));var crypto=require(_0x1f40('0xe'));var jsforce=require('jsforce');var deskjs=require(_0x1f40('0xf'));var toCsv=require(_0x1f40('0x9'));var querystring=require(_0x1f40('0x10'));var Papa=require('papaparse');var Redis=require(_0x1f40('0x11'));var authService=require(_0x1f40('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x1f40('0x13'));var logger=require('../../config/logger')(_0x1f40('0x14'));var utils=require(_0x1f40('0x15'));var config=require(_0x1f40('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0x1f40('0x17'))['db'];var integrations=require(_0x1f40('0x18'));function respondWithStatusCode(_0x59ddbf,_0x2968fc){_0x2968fc=_0x2968fc||0xcc;return function(_0x144fb6){if(_0x144fb6){return _0x59ddbf[_0x1f40('0x19')](_0x2968fc);}return _0x59ddbf[_0x1f40('0x1a')](_0x2968fc)[_0x1f40('0x1b')]();};}function respondWithResult(_0x5935b9,_0x55091d){_0x55091d=_0x55091d||0xc8;return function(_0x206955){if(_0x206955){return _0x5935b9[_0x1f40('0x1a')](_0x55091d)[_0x1f40('0x1c')](_0x206955);}};}function respondWithFilteredResult(_0x4a67bb,_0x5c4412){return function(_0xb1317d){if(_0xb1317d){var _0x218b9e=typeof _0x5c4412['offset']===_0x1f40('0x1d')&&typeof _0x5c4412[_0x1f40('0x1e')]==='undefined';var _0x192785=_0xb1317d[_0x1f40('0x1f')];var _0x1a21c0=_0x218b9e?0x0:_0x5c4412[_0x1f40('0x20')];var _0x1bb1ec=_0x218b9e?_0xb1317d[_0x1f40('0x1f')]:_0x5c4412[_0x1f40('0x20')]+_0x5c4412[_0x1f40('0x1e')];var _0x209bee;if(_0x1bb1ec>=_0x192785){_0x1bb1ec=_0x192785;_0x209bee=0xc8;}else{_0x209bee=0xce;}_0x4a67bb[_0x1f40('0x1a')](_0x209bee);return _0x4a67bb[_0x1f40('0x21')](_0x1f40('0x22'),_0x1a21c0+'-'+_0x1bb1ec+'/'+_0x192785)['json'](_0xb1317d);}return null;};}function patchUpdates(_0x5cb384){return function(_0x3c4137){try{jsonpatch[_0x1f40('0x23')](_0x3c4137,_0x5cb384,!![]);}catch(_0x32fefe){return BPromise['reject'](_0x32fefe);}return _0x3c4137[_0x1f40('0x24')]();};}function saveUpdates(_0x53e50c,_0x397c19){return function(_0x194ecb){if(_0x194ecb){return _0x194ecb[_0x1f40('0x25')](_0x53e50c)[_0x1f40('0x26')](function(_0x420399){return _0x420399;});}return null;};}function removeEntity(_0x471021,_0x2a313c){return function(_0x206259){if(_0x206259){return _0x206259['destroy']()[_0x1f40('0x26')](function(){_0x471021[_0x1f40('0x1a')](0xcc)[_0x1f40('0x1b')]();});}};}function handleEntityNotFound(_0x25a583,_0xbbe931){return function(_0x42dcb8){if(!_0x42dcb8){_0x25a583[_0x1f40('0x19')](0x194);}return _0x42dcb8;};}function handleError(_0x4e9fd1,_0x325564){_0x325564=_0x325564||0x1f4;return function(_0x4a3ab1){logger[_0x1f40('0x27')](_0x4a3ab1[_0x1f40('0x28')]);if(_0x4a3ab1[_0x1f40('0x29')]){delete _0x4a3ab1[_0x1f40('0x29')];}_0x4e9fd1['status'](_0x325564)['send'](_0x4a3ab1);};}exports[_0x1f40('0x2a')]=function(_0xe1314a,_0x4e1093){var _0x4eca65={},_0xf8f92b={},_0x2d7e67={'count':0x0,'rows':[]};var _0x351b19=_['map'](db['VtigerAccount'][_0x1f40('0x2b')],function(_0x587e02){return{'name':_0x587e02['fieldName'],'type':_0x587e02[_0x1f40('0x2c')][_0x1f40('0x2d')]};});_0xf8f92b['model']=_['map'](_0x351b19,_0x1f40('0x29'));_0xf8f92b[_0x1f40('0x2e')]=_['keys'](_0xe1314a[_0x1f40('0x2e')]);_0xf8f92b[_0x1f40('0x2f')]=_[_0x1f40('0x30')](_0xf8f92b[_0x1f40('0x31')],_0xf8f92b['query']);_0x4eca65[_0x1f40('0x32')]=_[_0x1f40('0x30')](_0xf8f92b[_0x1f40('0x31')],qs[_0x1f40('0x33')](_0xe1314a[_0x1f40('0x2e')][_0x1f40('0x33')]));_0x4eca65[_0x1f40('0x32')]=_0x4eca65[_0x1f40('0x32')][_0x1f40('0x34')]?_0x4eca65[_0x1f40('0x32')]:_0xf8f92b[_0x1f40('0x31')];if(!_0xe1314a[_0x1f40('0x2e')]['hasOwnProperty'](_0x1f40('0x35'))){_0x4eca65['limit']=qs[_0x1f40('0x1e')](_0xe1314a[_0x1f40('0x2e')][_0x1f40('0x1e')]);_0x4eca65['offset']=qs[_0x1f40('0x20')](_0xe1314a['query'][_0x1f40('0x20')]);}_0x4eca65[_0x1f40('0x36')]=qs[_0x1f40('0x37')](_0xe1314a['query'][_0x1f40('0x37')]);_0x4eca65[_0x1f40('0x38')]=qs[_0x1f40('0x2f')](_[_0x1f40('0x39')](_0xe1314a['query'],_0xf8f92b['filters']),_0x351b19);if(_0xe1314a[_0x1f40('0x2e')][_0x1f40('0x3a')]){_0x4eca65['where']=_['merge'](_0x4eca65[_0x1f40('0x38')],{'$or':_[_0x1f40('0x3b')](_0x351b19,function(_0x3f327a){if(_0x3f327a['type']!==_0x1f40('0x3c')){var _0x1cee6a={};_0x1cee6a[_0x3f327a['name']]={'$like':'%'+_0xe1314a[_0x1f40('0x2e')][_0x1f40('0x3a')]+'%'};return _0x1cee6a;}})});}_0x4eca65=_[_0x1f40('0x3d')]({},_0x4eca65,_0xe1314a[_0x1f40('0x3e')]);var _0x4f3b29={'where':_0x4eca65[_0x1f40('0x38')]};return db[_0x1f40('0x3f')][_0x1f40('0x1f')](_0x4f3b29)['then'](function(_0x3e40f2){_0x2d7e67[_0x1f40('0x1f')]=_0x3e40f2;if(_0xe1314a[_0x1f40('0x2e')][_0x1f40('0x40')]){_0x4eca65[_0x1f40('0x41')]=[{'all':!![]}];}return db[_0x1f40('0x3f')]['findAll'](_0x4eca65);})[_0x1f40('0x26')](function(_0x3215d0){_0x2d7e67[_0x1f40('0x42')]=_0x3215d0;return _0x2d7e67;})[_0x1f40('0x26')](respondWithFilteredResult(_0x4e1093,_0x4eca65))[_0x1f40('0x43')](handleError(_0x4e1093,null));};exports['show']=function(_0x19f3f7,_0x193f12){var _0x522b7b={'raw':![],'where':{'id':_0x19f3f7[_0x1f40('0x44')]['id']}},_0x4f2081={};_0x4f2081[_0x1f40('0x31')]=_['keys'](db[_0x1f40('0x3f')][_0x1f40('0x2b')]);_0x4f2081[_0x1f40('0x2e')]=_['keys'](_0x19f3f7[_0x1f40('0x2e')]);_0x4f2081[_0x1f40('0x2f')]=_[_0x1f40('0x30')](_0x4f2081[_0x1f40('0x31')],_0x4f2081[_0x1f40('0x2e')]);_0x522b7b['attributes']=_[_0x1f40('0x30')](_0x4f2081[_0x1f40('0x31')],qs[_0x1f40('0x33')](_0x19f3f7[_0x1f40('0x2e')][_0x1f40('0x33')]));_0x522b7b[_0x1f40('0x32')]=_0x522b7b[_0x1f40('0x32')][_0x1f40('0x34')]?_0x522b7b[_0x1f40('0x32')]:_0x4f2081[_0x1f40('0x31')];if(_0x19f3f7['query']['includeAll']){_0x522b7b[_0x1f40('0x41')]=[{'all':!![]}];}_0x522b7b=_['merge']({},_0x522b7b,_0x19f3f7[_0x1f40('0x3e')]);return db[_0x1f40('0x3f')]['find'](_0x522b7b)[_0x1f40('0x26')](handleEntityNotFound(_0x193f12,null))[_0x1f40('0x26')](respondWithResult(_0x193f12,null))[_0x1f40('0x43')](handleError(_0x193f12,null));};exports[_0x1f40('0x45')]=function(_0x1e3437,_0x467789){return db[_0x1f40('0x3f')][_0x1f40('0x45')](_0x1e3437[_0x1f40('0x46')],{})[_0x1f40('0x26')](respondWithResult(_0x467789,0xc9))['catch'](handleError(_0x467789,null));};exports[_0x1f40('0x25')]=function(_0x78c1af,_0x30920c){if(_0x78c1af[_0x1f40('0x46')]['id']){delete _0x78c1af[_0x1f40('0x46')]['id'];}return db[_0x1f40('0x3f')][_0x1f40('0x47')]({'where':{'id':_0x78c1af['params']['id']}})[_0x1f40('0x26')](handleEntityNotFound(_0x30920c,null))[_0x1f40('0x26')](saveUpdates(_0x78c1af[_0x1f40('0x46')],null))['then'](respondWithResult(_0x30920c,null))['catch'](handleError(_0x30920c,null));};exports[_0x1f40('0x48')]=function(_0x499b56,_0x50233e){return db['VtigerAccount']['find']({'where':{'id':_0x499b56[_0x1f40('0x44')]['id']}})['then'](handleEntityNotFound(_0x50233e,null))[_0x1f40('0x26')](removeEntity(_0x50233e,null))[_0x1f40('0x43')](handleError(_0x50233e,null));};exports[_0x1f40('0x49')]=function(_0x4c75ff,_0x419379,_0x4312d9){var _0x272f2f={};var _0x275a43={};var _0x3f2894;var _0x2ce878;return db[_0x1f40('0x3f')]['findOne']({'where':{'id':_0x4c75ff[_0x1f40('0x44')]['id']}})[_0x1f40('0x26')](handleEntityNotFound(_0x419379,null))[_0x1f40('0x26')](function(_0x1829fb){if(_0x1829fb){_0x3f2894=_0x1829fb;_0x275a43['model']=_[_0x1f40('0x4a')](db[_0x1f40('0x4b')][_0x1f40('0x2b')]);_0x275a43[_0x1f40('0x2e')]=_[_0x1f40('0x4a')](_0x4c75ff[_0x1f40('0x2e')]);_0x275a43[_0x1f40('0x2f')]=_['intersection'](_0x275a43[_0x1f40('0x31')],_0x275a43[_0x1f40('0x2e')]);_0x272f2f[_0x1f40('0x32')]=_['intersection'](_0x275a43[_0x1f40('0x31')],qs[_0x1f40('0x33')](_0x4c75ff[_0x1f40('0x2e')][_0x1f40('0x33')]));_0x272f2f[_0x1f40('0x32')]=_0x272f2f[_0x1f40('0x32')][_0x1f40('0x34')]?_0x272f2f['attributes']:_0x275a43[_0x1f40('0x31')];_0x272f2f[_0x1f40('0x36')]=qs[_0x1f40('0x37')](_0x4c75ff[_0x1f40('0x2e')]['sort']);_0x272f2f[_0x1f40('0x38')]=qs[_0x1f40('0x2f')](_[_0x1f40('0x39')](_0x4c75ff[_0x1f40('0x2e')],_0x275a43[_0x1f40('0x2f')]));if(_0x4c75ff[_0x1f40('0x2e')][_0x1f40('0x3a')]){_0x272f2f[_0x1f40('0x38')]=_[_0x1f40('0x3d')](_0x272f2f[_0x1f40('0x38')],{'$or':_[_0x1f40('0x3b')](_0x272f2f[_0x1f40('0x32')],function(_0x591776){var _0x3c647f={};_0x3c647f[_0x591776]={'$like':'%'+_0x4c75ff['query'][_0x1f40('0x3a')]+'%'};return _0x3c647f;})});}_0x272f2f=_['merge']({},_0x272f2f,_0x4c75ff['options']);return _0x3f2894[_0x1f40('0x49')](_0x272f2f);}})['then'](function(_0x5ea9ff){if(_0x5ea9ff){_0x2ce878=_0x5ea9ff[_0x1f40('0x34')];if(!_0x4c75ff['query'][_0x1f40('0x4c')](_0x1f40('0x35'))){_0x272f2f[_0x1f40('0x1e')]=qs[_0x1f40('0x1e')](_0x4c75ff[_0x1f40('0x2e')][_0x1f40('0x1e')]);_0x272f2f[_0x1f40('0x20')]=qs[_0x1f40('0x20')](_0x4c75ff['query'][_0x1f40('0x20')]);}return _0x3f2894['getConfigurations'](_0x272f2f);}})[_0x1f40('0x26')](function(_0x10b831){if(_0x10b831){return _0x10b831?{'count':_0x2ce878,'rows':_0x10b831}:null;}})[_0x1f40('0x26')](respondWithResult(_0x419379,null))[_0x1f40('0x43')](handleError(_0x419379,null));};exports['addConfiguration']=function(_0x362844,_0x2821b2,_0x4b68fa){if(_0x362844[_0x1f40('0x46')]['id']){delete _0x362844[_0x1f40('0x46')]['id'];}return db[_0x1f40('0x3f')][_0x1f40('0x4d')]({'where':{'id':_0x362844['params']['id']}})[_0x1f40('0x26')](handleEntityNotFound(_0x2821b2,null))[_0x1f40('0x26')](function(_0x23519e){if(_0x23519e){_0x362844[_0x1f40('0x46')]['AccountId']=_0x23519e['id'];_0x362844[_0x1f40('0x46')]['Subjects']=integrations[_0x1f40('0x4e')](_0x362844[_0x1f40('0x46')]['channel'],_0x362844['body'][_0x1f40('0x2c')]);_0x362844[_0x1f40('0x46')][_0x1f40('0x4f')]=integrations[_0x1f40('0x50')](_0x362844[_0x1f40('0x46')][_0x1f40('0x51')],_0x362844[_0x1f40('0x46')][_0x1f40('0x2c')]);return db['VtigerConfiguration']['create'](_0x362844[_0x1f40('0x46')],{'include':[{'model':db[_0x1f40('0x52')],'as':_0x1f40('0x53')},{'model':db[_0x1f40('0x52')],'as':_0x1f40('0x4f')}]});}return null;})[_0x1f40('0x26')](respondWithResult(_0x2821b2,null))[_0x1f40('0x43')](handleError(_0x2821b2,null));};var md5=require(_0x1f40('0x54'));exports['getFields']=function(_0x11cd88,_0x182631,_0x50a582){var _0x8f1329=null;var _0x6e7e36=null;var _0x5b95ec=null;var _0x45c39e=null;var _0x46033e='';return db[_0x1f40('0x3f')][_0x1f40('0x4d')]({'where':{'id':_0x11cd88[_0x1f40('0x44')]['id']},'attributes':['id','name',_0x1f40('0x55'),_0x1f40('0x56'),_0x1f40('0x57'),_0x1f40('0x58'),'serverUrl',_0x1f40('0x59')]})[_0x1f40('0x26')](handleEntityNotFound(_0x182631,null))[_0x1f40('0x26')](function(_0x243a99){if(_0x243a99){_0x8f1329=_0x243a99[_0x1f40('0x55')];_0x6e7e36=_0x243a99['accessKey'];_0x5b95ec=_0x243a99['moduleName'];_0x46033e=_0x243a99[_0x1f40('0x58')];var _0x247d1b=_0x46033e[_0x1f40('0x5a')](-0x1);if(_0x247d1b==='/'){_0x46033e=_0x46033e[_0x1f40('0x5b')](0x0,_0x46033e['lastIndexOf'](_0x247d1b));}_0x45c39e=util[_0x1f40('0x5c')](_0x1f40('0x5d'),_0x46033e);var _0xf7c024={'method':_0x1f40('0x5e'),'uri':_0x45c39e,'qs':{'operation':'getchallenge','username':_0x243a99[_0x1f40('0x55')]},'json':!![]};return rp(_0xf7c024);}})[_0x1f40('0x26')](function(_0x5ddbe6){if(_0x5ddbe6[_0x1f40('0x5f')]){var _0x743374={'method':_0x1f40('0x60'),'uri':_0x45c39e,'form':{'operation':_0x1f40('0x61'),'username':_0x8f1329,'accessKey':md5(_0x5ddbe6['result'][_0x1f40('0x62')]+_0x6e7e36)},'json':!![]};return rp(_0x743374);}})[_0x1f40('0x26')](function(_0x2b9c26){if(_0x2b9c26[_0x1f40('0x5f')]){var _0x17d351={'method':_0x1f40('0x5e'),'uri':_0x45c39e,'qs':{'operation':_0x1f40('0x63'),'username':_0x8f1329,'sessionName':_0x2b9c26[_0x1f40('0x64')]['sessionName'],'elementType':_0x5b95ec},'json':!![]};return rp(_0x17d351);}})[_0x1f40('0x26')](function(_0x3aa1af){if(_0x3aa1af[_0x1f40('0x5f')]){var _0x5ed08a=[_0x1f40('0x65'),_0x1f40('0x66'),_0x1f40('0x67')];_[_0x1f40('0x68')](_0x3aa1af[_0x1f40('0x64')]['fields'],function(_0x3378f7){return _0x5ed08a[_0x1f40('0x69')](_0x3378f7[_0x1f40('0x2c')]['name']);});_[_0x1f40('0x68')](_0x3aa1af[_0x1f40('0x64')][_0x1f40('0x33')],function(_0x15da87){return _0x15da87[_0x1f40('0x6a')]===_0x1f40('0x6b');});return{'count':_0x3aa1af['result'][_0x1f40('0x33')][_0x1f40('0x34')],'rows':_[_0x1f40('0x3b')](_0x3aa1af['result'][_0x1f40('0x33')],function(_0x10233d){return{'id':_0x10233d[_0x1f40('0x29')],'name':_0x10233d[_0x1f40('0x6c')],'custom':_[_0x1f40('0x6d')](_0x10233d['name'],_0x1f40('0x6e'))?!![]:![],'options':_0x10233d[_0x1f40('0x2c')]['name']===_0x1f40('0x6f')&&_0x10233d[_0x1f40('0x2c')][_0x1f40('0x70')][_0x1f40('0x34')]>0x0?_['map'](_0x10233d[_0x1f40('0x2c')][_0x1f40('0x70')],function(_0x50fc0){return{'name':_0x50fc0[_0x1f40('0x6c')],'value':_0x50fc0[_0x1f40('0x71')]};}):[]};})};}})[_0x1f40('0x26')](respondWithResult(_0x182631,null))['catch'](function(_0x323944){console[_0x1f40('0x72')](_0x1f40('0x73')+_0x323944);var _0x250995=_0x11cd88[_0x1f40('0x2e')][_0x1f40('0x74')]?0x1f4:_0x323944['statusCode']||0x1f4;logger[_0x1f40('0x27')]('getFields,\x20%s,\x20%s,\x20%s',_0x1f40('0x75'),_0x250995,JSON['stringify'](_0x323944));delete _0x323944[_0x1f40('0x29')];if(_0x250995===0x191){_0x250995=0x190;}_0x182631[_0x1f40('0x1a')](_0x250995)['send'](_0x11cd88[_0x1f40('0x2e')]['test']?{'message':_0x1f40('0x76'),'statusCode':_0x323944[_0x1f40('0x77')]}:_0x323944);});};
\ No newline at end of file
index c73970d..36e74c4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9a72=['VtigerAccount','int_vtiger_accounts','lodash','util','api','moment','bluebird','path','../../config/environment','./intVtigerAccount.attributes','../../components/integrations/configuration','exports','define'];(function(_0x421e29,_0x1fd647){var _0x193716=function(_0x1c42d7){while(--_0x1c42d7){_0x421e29['push'](_0x421e29['shift']());}};_0x193716(++_0x1fd647);}(_0x9a72,0x12d));var _0x29a7=function(_0x5896c8,_0x44d791){_0x5896c8=_0x5896c8-0x0;var _0x52c0fb=_0x9a72[_0x5896c8];return _0x52c0fb;};'use strict';var _=require(_0x29a7('0x0'));var util=require(_0x29a7('0x1'));var logger=require('../../config/logger')(_0x29a7('0x2'));var moment=require(_0x29a7('0x3'));var BPromise=require(_0x29a7('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x29a7('0x5'));var rimraf=require('rimraf');var config=require(_0x29a7('0x6'));var attributes=require(_0x29a7('0x7'));var integrations=require(_0x29a7('0x8'));module[_0x29a7('0x9')]=function(_0x1fa125,_0xa0fc1c){return _0x1fa125[_0x29a7('0xa')](_0x29a7('0xb'),attributes,{'tableName':_0x29a7('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x60d7=['util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intVtigerAccount.attributes','../../components/integrations/configuration','exports','int_vtiger_accounts','lodash'];(function(_0x1b7a7e,_0xca7bec){var _0x39f594=function(_0x29c658){while(--_0x29c658){_0x1b7a7e['push'](_0x1b7a7e['shift']());}};_0x39f594(++_0xca7bec);}(_0x60d7,0xe9));var _0x760d=function(_0x42052e,_0x4a3189){_0x42052e=_0x42052e-0x0;var _0x2ad1ca=_0x60d7[_0x42052e];return _0x2ad1ca;};'use strict';var _=require(_0x760d('0x0'));var util=require(_0x760d('0x1'));var logger=require('../../config/logger')(_0x760d('0x2'));var moment=require(_0x760d('0x3'));var BPromise=require(_0x760d('0x4'));var rp=require(_0x760d('0x5'));var fs=require('fs');var path=require(_0x760d('0x6'));var rimraf=require(_0x760d('0x7'));var config=require(_0x760d('0x8'));var attributes=require(_0x760d('0x9'));var integrations=require(_0x760d('0xa'));module[_0x760d('0xb')]=function(_0x1b6239,_0x8f8dba){return _0x1b6239['define']('VtigerAccount',attributes,{'tableName':_0x760d('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index b7a6154..4c404dd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x065e=['request\x20sent','debug','VtigerAccount,\x20%s,\x20%s,\x20%s','stringify','error','VtigerAccount,\x20%s,\x20%s','message','result','GetVtigerAccount','VtigerAccount','findAll','options','attributes','limit','include','map','model','find','ShowVtigerAccount','catch','lodash','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','client','http','request','then','info'];(function(_0x552318,_0x71a891){var _0x2e7bee=function(_0xb48d9c){while(--_0xb48d9c){_0x552318['push'](_0x552318['shift']());}};_0x2e7bee(++_0x71a891);}(_0x065e,0x1a7));var _0xe065=function(_0xc5f804,_0x2f3ea2){_0xc5f804=_0xc5f804-0x0;var _0x10412e=_0x065e[_0xc5f804];return _0x10412e;};'use strict';var _=require(_0xe065('0x0'));var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xe065('0x1'));var fs=require('fs');var Redis=require(_0xe065('0x2'));var db=require(_0xe065('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xe065('0x4'));var config=require(_0xe065('0x5'));var jayson=require('jayson/promise');var client=jayson[_0xe065('0x6')][_0xe065('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x189d72,_0x52403a,_0x267122){return new BPromise(function(_0x5afbd4,_0x273e22){return client[_0xe065('0x8')](_0x189d72,_0x267122)[_0xe065('0x9')](function(_0x114497){logger[_0xe065('0xa')]('VtigerAccount,\x20%s,\x20%s',_0x52403a,_0xe065('0xb'));logger[_0xe065('0xc')](_0xe065('0xd'),_0x52403a,_0xe065('0xb'),JSON[_0xe065('0xe')](_0x114497));if(_0x114497[_0xe065('0xf')]){if(_0x114497['error']['code']===0x1f4){logger[_0xe065('0xf')](_0xe065('0x10'),_0x52403a,_0x114497[_0xe065('0xf')]['message']);return _0x273e22(_0x114497[_0xe065('0xf')][_0xe065('0x11')]);}logger[_0xe065('0xf')](_0xe065('0x10'),_0x52403a,_0x114497[_0xe065('0xf')]['message']);return _0x5afbd4(_0x114497[_0xe065('0xf')][_0xe065('0x11')]);}else{logger[_0xe065('0xa')](_0xe065('0x10'),_0x52403a,_0xe065('0xb'));_0x5afbd4(_0x114497[_0xe065('0x12')][_0xe065('0x11')]);}})['catch'](function(_0x1ba88d){logger[_0xe065('0xf')]('VtigerAccount,\x20%s,\x20%s',_0x52403a,_0x1ba88d);_0x273e22(_0x1ba88d);});});}exports[_0xe065('0x13')]=function(_0x1d2f7a){var _0x397f05=this;return new Promise(function(_0x14c97c,_0x1e7177){return db[_0xe065('0x14')][_0xe065('0x15')]({'raw':_0x1d2f7a['options']?_0x1d2f7a[_0xe065('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x1d2f7a[_0xe065('0x16')]?_0x1d2f7a[_0xe065('0x16')]['where']||null:null,'attributes':_0x1d2f7a[_0xe065('0x16')]?_0x1d2f7a['options'][_0xe065('0x17')]||null:null,'limit':_0x1d2f7a[_0xe065('0x16')]?_0x1d2f7a[_0xe065('0x16')][_0xe065('0x18')]||null:null,'include':_0x1d2f7a[_0xe065('0x16')]?_0x1d2f7a[_0xe065('0x16')][_0xe065('0x19')]?_[_0xe065('0x1a')](_0x1d2f7a[_0xe065('0x16')]['include'],function(_0x7208af){return{'model':db[_0x7208af[_0xe065('0x1b')]],'as':_0x7208af['as'],'attributes':_0x7208af[_0xe065('0x17')],'include':_0x7208af[_0xe065('0x19')]?_['map'](_0x7208af['include'],function(_0x164965){return{'model':db[_0x164965['model']],'as':_0x164965['as'],'attributes':_0x164965[_0xe065('0x17')],'include':_0x164965[_0xe065('0x19')]?_[_0xe065('0x1a')](_0x164965[_0xe065('0x19')],function(_0x418731){return{'model':db[_0x418731[_0xe065('0x1b')]],'as':_0x418731['as'],'attributes':_0x418731[_0xe065('0x17')]};}):[]};}):[]};}):[]:[]})[_0xe065('0x9')](function(_0x52cd9c){logger['info'](_0xe065('0x13'),_0x1d2f7a);logger[_0xe065('0xc')](_0xe065('0x13'),_0x1d2f7a,JSON[_0xe065('0xe')](_0x52cd9c));_0x14c97c(_0x52cd9c);})['catch'](function(_0x23f573){logger['error']('GetVtigerAccount',_0x23f573[_0xe065('0x11')],_0x1d2f7a);_0x1e7177(_0x397f05[_0xe065('0xf')](0x1f4,_0x23f573[_0xe065('0x11')]));});});};exports['ShowVtigerAccount']=function(_0x883747){var _0x59b915=this;return new Promise(function(_0x12679d,_0x46db7e){return db[_0xe065('0x14')][_0xe065('0x1c')]({'raw':_0x883747['options']?_0x883747[_0xe065('0x16')]['raw']===undefined?!![]:![]:!![],'where':_0x883747[_0xe065('0x16')]?_0x883747[_0xe065('0x16')]['where']||null:null,'attributes':_0x883747[_0xe065('0x16')]?_0x883747['options'][_0xe065('0x17')]||null:null,'include':_0x883747['options']?_0x883747[_0xe065('0x16')][_0xe065('0x19')]?_[_0xe065('0x1a')](_0x883747[_0xe065('0x16')]['include'],function(_0x1fe1dc){return{'model':db[_0x1fe1dc[_0xe065('0x1b')]],'as':_0x1fe1dc['as'],'attributes':_0x1fe1dc[_0xe065('0x17')],'include':_0x1fe1dc[_0xe065('0x19')]?_[_0xe065('0x1a')](_0x1fe1dc[_0xe065('0x19')],function(_0x4b822a){return{'model':db[_0x4b822a[_0xe065('0x1b')]],'as':_0x4b822a['as'],'attributes':_0x4b822a[_0xe065('0x17')],'include':_0x4b822a['include']?_[_0xe065('0x1a')](_0x4b822a[_0xe065('0x19')],function(_0x5afc23){return{'model':db[_0x5afc23[_0xe065('0x1b')]],'as':_0x5afc23['as'],'attributes':_0x5afc23[_0xe065('0x17')]};}):[]};}):[]};}):[]:[]})[_0xe065('0x9')](function(_0x35135f){logger['info'](_0xe065('0x1d'),_0x883747);logger['debug'](_0xe065('0x1d'),_0x883747,JSON[_0xe065('0xe')](_0x35135f));_0x12679d(_0x35135f);})[_0xe065('0x1e')](function(_0xcceb12){logger[_0xe065('0xf')](_0xe065('0x1d'),_0xcceb12['message'],_0x883747);_0x46db7e(_0x59b915[_0xe065('0xf')](0x1f4,_0xcceb12[_0xe065('0x11')]));});});};
\ No newline at end of file
+var _0x34b7=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','info','request\x20sent','debug','VtigerAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','VtigerAccount,\x20%s,\x20%s','message','result','catch','GetVtigerAccount','VtigerAccount','findAll','options','raw','where','attributes','map','include','model','then','ShowVtigerAccount','find','moment','bluebird'];(function(_0x2715a9,_0x14247e){var _0x224ef6=function(_0x284c0e){while(--_0x284c0e){_0x2715a9['push'](_0x2715a9['shift']());}};_0x224ef6(++_0x14247e);}(_0x34b7,0x196));var _0x734b=function(_0xaeff8a,_0x506724){_0xaeff8a=_0xaeff8a-0x0;var _0x8a6ce3=_0x34b7[_0xaeff8a];return _0x8a6ce3;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x734b('0x0'));var BPromise=require(_0x734b('0x1'));var rs=require(_0x734b('0x2'));var fs=require('fs');var Redis=require(_0x734b('0x3'));var db=require(_0x734b('0x4'))['db'];var utils=require(_0x734b('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x734b('0x6'));var jayson=require(_0x734b('0x7'));var client=jayson[_0x734b('0x8')][_0x734b('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x28918a,_0x35d685,_0x58e2f1){return new BPromise(function(_0x1eb803,_0x2e7932){return client['request'](_0x28918a,_0x58e2f1)['then'](function(_0x5f4b3a){logger[_0x734b('0xa')]('VtigerAccount,\x20%s,\x20%s',_0x35d685,_0x734b('0xb'));logger[_0x734b('0xc')](_0x734b('0xd'),_0x35d685,_0x734b('0xb'),JSON[_0x734b('0xe')](_0x5f4b3a));if(_0x5f4b3a[_0x734b('0xf')]){if(_0x5f4b3a[_0x734b('0xf')][_0x734b('0x10')]===0x1f4){logger[_0x734b('0xf')](_0x734b('0x11'),_0x35d685,_0x5f4b3a[_0x734b('0xf')][_0x734b('0x12')]);return _0x2e7932(_0x5f4b3a[_0x734b('0xf')][_0x734b('0x12')]);}logger['error'](_0x734b('0x11'),_0x35d685,_0x5f4b3a[_0x734b('0xf')][_0x734b('0x12')]);return _0x1eb803(_0x5f4b3a[_0x734b('0xf')][_0x734b('0x12')]);}else{logger[_0x734b('0xa')](_0x734b('0x11'),_0x35d685,_0x734b('0xb'));_0x1eb803(_0x5f4b3a[_0x734b('0x13')][_0x734b('0x12')]);}})[_0x734b('0x14')](function(_0x4d2d23){logger[_0x734b('0xf')](_0x734b('0x11'),_0x35d685,_0x4d2d23);_0x2e7932(_0x4d2d23);});});}exports[_0x734b('0x15')]=function(_0x5edbe9){var _0x4d3b9c=this;return new Promise(function(_0x56a95c,_0xcd12a1){return db[_0x734b('0x16')][_0x734b('0x17')]({'raw':_0x5edbe9[_0x734b('0x18')]?_0x5edbe9[_0x734b('0x18')][_0x734b('0x19')]===undefined?!![]:![]:!![],'where':_0x5edbe9[_0x734b('0x18')]?_0x5edbe9[_0x734b('0x18')][_0x734b('0x1a')]||null:null,'attributes':_0x5edbe9[_0x734b('0x18')]?_0x5edbe9[_0x734b('0x18')][_0x734b('0x1b')]||null:null,'limit':_0x5edbe9[_0x734b('0x18')]?_0x5edbe9[_0x734b('0x18')]['limit']||null:null,'include':_0x5edbe9[_0x734b('0x18')]?_0x5edbe9[_0x734b('0x18')]['include']?_[_0x734b('0x1c')](_0x5edbe9[_0x734b('0x18')][_0x734b('0x1d')],function(_0x11fb8e){return{'model':db[_0x11fb8e[_0x734b('0x1e')]],'as':_0x11fb8e['as'],'attributes':_0x11fb8e[_0x734b('0x1b')],'include':_0x11fb8e[_0x734b('0x1d')]?_[_0x734b('0x1c')](_0x11fb8e[_0x734b('0x1d')],function(_0x3abbe6){return{'model':db[_0x3abbe6[_0x734b('0x1e')]],'as':_0x3abbe6['as'],'attributes':_0x3abbe6[_0x734b('0x1b')],'include':_0x3abbe6[_0x734b('0x1d')]?_['map'](_0x3abbe6['include'],function(_0x13cc5a){return{'model':db[_0x13cc5a[_0x734b('0x1e')]],'as':_0x13cc5a['as'],'attributes':_0x13cc5a['attributes']};}):[]};}):[]};}):[]:[]})[_0x734b('0x1f')](function(_0x2dd51a){logger[_0x734b('0xa')](_0x734b('0x15'),_0x5edbe9);logger[_0x734b('0xc')](_0x734b('0x15'),_0x5edbe9,JSON[_0x734b('0xe')](_0x2dd51a));_0x56a95c(_0x2dd51a);})['catch'](function(_0x1f3652){logger[_0x734b('0xf')](_0x734b('0x15'),_0x1f3652[_0x734b('0x12')],_0x5edbe9);_0xcd12a1(_0x4d3b9c[_0x734b('0xf')](0x1f4,_0x1f3652[_0x734b('0x12')]));});});};exports[_0x734b('0x20')]=function(_0x21ed3c){var _0x371ead=this;return new Promise(function(_0x3065b0,_0x5dcabf){return db[_0x734b('0x16')][_0x734b('0x21')]({'raw':_0x21ed3c['options']?_0x21ed3c[_0x734b('0x18')][_0x734b('0x19')]===undefined?!![]:![]:!![],'where':_0x21ed3c[_0x734b('0x18')]?_0x21ed3c[_0x734b('0x18')][_0x734b('0x1a')]||null:null,'attributes':_0x21ed3c[_0x734b('0x18')]?_0x21ed3c[_0x734b('0x18')][_0x734b('0x1b')]||null:null,'include':_0x21ed3c[_0x734b('0x18')]?_0x21ed3c[_0x734b('0x18')][_0x734b('0x1d')]?_[_0x734b('0x1c')](_0x21ed3c[_0x734b('0x18')][_0x734b('0x1d')],function(_0x4512fc){return{'model':db[_0x4512fc['model']],'as':_0x4512fc['as'],'attributes':_0x4512fc[_0x734b('0x1b')],'include':_0x4512fc['include']?_[_0x734b('0x1c')](_0x4512fc[_0x734b('0x1d')],function(_0x3413bf){return{'model':db[_0x3413bf[_0x734b('0x1e')]],'as':_0x3413bf['as'],'attributes':_0x3413bf[_0x734b('0x1b')],'include':_0x3413bf[_0x734b('0x1d')]?_['map'](_0x3413bf['include'],function(_0x3460a0){return{'model':db[_0x3460a0['model']],'as':_0x3460a0['as'],'attributes':_0x3460a0[_0x734b('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2de959){logger['info'](_0x734b('0x20'),_0x21ed3c);logger['debug'](_0x734b('0x20'),_0x21ed3c,JSON[_0x734b('0xe')](_0x2de959));_0x3065b0(_0x2de959);})[_0x734b('0x14')](function(_0x34a504){logger[_0x734b('0xf')](_0x734b('0x20'),_0x34a504[_0x734b('0x12')],_0x21ed3c);_0x5dcabf(_0x371ead['error'](0x1f4,_0x34a504[_0x734b('0x12')]));});});};
\ No newline at end of file
index e06aa8a..0541c9f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4ba0=['update','delete','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/interaction/service','./intVtigerConfiguration.controller','isAuthenticated','index','get','/:id','show','/:id/fields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','put'];(function(_0x340e40,_0x27c03b){var _0x4b85e5=function(_0x14f4a3){while(--_0x14f4a3){_0x340e40['push'](_0x340e40['shift']());}};_0x4b85e5(++_0x27c03b);}(_0x4ba0,0xdc));var _0x04ba=function(_0x49b207,_0x408ade){_0x49b207=_0x49b207-0x0;var _0x2dc8fa=_0x4ba0[_0x49b207];return _0x2dc8fa;};'use strict';var multer=require(_0x04ba('0x0'));var util=require(_0x04ba('0x1'));var path=require(_0x04ba('0x2'));var timeout=require('connect-timeout');var express=require(_0x04ba('0x3'));var router=express[_0x04ba('0x4')]();var fs_extra=require(_0x04ba('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x04ba('0x6'));var config=require('../../config/environment');var controller=require(_0x04ba('0x7'));router['get']('/',auth[_0x04ba('0x8')](),controller[_0x04ba('0x9')]);router[_0x04ba('0xa')](_0x04ba('0xb'),auth[_0x04ba('0x8')](),controller[_0x04ba('0xc')]);router['get'](_0x04ba('0xd'),auth[_0x04ba('0x8')](),controller['getFields']);router[_0x04ba('0xa')](_0x04ba('0xe'),auth[_0x04ba('0x8')](),controller[_0x04ba('0xf')]);router['get'](_0x04ba('0x10'),auth[_0x04ba('0x8')](),controller[_0x04ba('0x11')]);router[_0x04ba('0x12')]('/',auth[_0x04ba('0x8')](),controller['create']);router[_0x04ba('0x13')]('/:id',auth[_0x04ba('0x8')](),controller[_0x04ba('0x14')]);router[_0x04ba('0x15')]('/:id',auth[_0x04ba('0x8')](),controller[_0x04ba('0x16')]);module[_0x04ba('0x17')]=router;
\ No newline at end of file
+var _0xdba3=['path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./intVtigerConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','getDescriptions','post','create','update','delete','exports','multer'];(function(_0x29b609,_0x19d388){var _0x54c952=function(_0xb3c38d){while(--_0xb3c38d){_0x29b609['push'](_0x29b609['shift']());}};_0x54c952(++_0x19d388);}(_0xdba3,0x107));var _0x3dba=function(_0x4afb46,_0x99c527){_0x4afb46=_0x4afb46-0x0;var _0x5b5d50=_0xdba3[_0x4afb46];return _0x5b5d50;};'use strict';var multer=require(_0x3dba('0x0'));var util=require('util');var path=require(_0x3dba('0x1'));var timeout=require(_0x3dba('0x2'));var express=require(_0x3dba('0x3'));var router=express[_0x3dba('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x3dba('0x5'));var interaction=require(_0x3dba('0x6'));var config=require(_0x3dba('0x7'));var controller=require(_0x3dba('0x8'));router[_0x3dba('0x9')]('/',auth[_0x3dba('0xa')](),controller[_0x3dba('0xb')]);router[_0x3dba('0x9')](_0x3dba('0xc'),auth[_0x3dba('0xa')](),controller[_0x3dba('0xd')]);router[_0x3dba('0x9')](_0x3dba('0xe'),auth['isAuthenticated'](),controller[_0x3dba('0xf')]);router['get'](_0x3dba('0x10'),auth['isAuthenticated'](),controller[_0x3dba('0x11')]);router[_0x3dba('0x9')]('/:id/descriptions',auth[_0x3dba('0xa')](),controller[_0x3dba('0x12')]);router[_0x3dba('0x13')]('/',auth[_0x3dba('0xa')](),controller[_0x3dba('0x14')]);router['put'](_0x3dba('0xc'),auth[_0x3dba('0xa')](),controller[_0x3dba('0x15')]);router[_0x3dba('0x16')]('/:id',auth[_0x3dba('0xa')](),controller['destroy']);module[_0x3dba('0x17')]=router;
\ No newline at end of file
index 7952896..e470c68 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf0dd=['STRING'];(function(_0xbe200f,_0x4b50eb){var _0x192597=function(_0x106cfd){while(--_0x106cfd){_0xbe200f['push'](_0xbe200f['shift']());}};_0x192597(++_0x4b50eb);}(_0xf0dd,0x184));var _0xdf0d=function(_0x5e7692,_0x1caa40){_0x5e7692=_0x5e7692-0x0;var _0x120367=_0xf0dd[_0x5e7692];return _0x120367;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0xdf0d('0x0')]},'description':{'type':Sequelize[_0xdf0d('0x0')]}};
\ No newline at end of file
+var _0x8fd8=['exports','STRING'];(function(_0x194631,_0x425021){var _0x15c0c3=function(_0x51642d){while(--_0x51642d){_0x194631['push'](_0x194631['shift']());}};_0x15c0c3(++_0x425021);}(_0x8fd8,0x130));var _0x88fd=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x8fd8[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require('sequelize');module[_0x88fd('0x0')]={'name':{'type':Sequelize[_0x88fd('0x1')]},'description':{'type':Sequelize[_0x88fd('0x1')]}};
\ No newline at end of file
index c39d9e3..7793a03 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc912=['mustache','path','sox','ejs','lodash','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','limit','undefined','count','Content-Range','apply','save','destroy','error','stack','name','send','index','map','VtigerConfiguration','rawAttributes','type','key','query','keys','model','attributes','intersection','fields','length','nolimit','order','sort','where','filters','pick','merge','VIRTUAL','filter','options','then','includeAll','include','rows','show','find','catch','create','body','update','params','getFields','VtigerField','hasOwnProperty','getSubjects','findOne','getDescriptions','eml-format','rimraf','zip-dir','request-promise','moment','bluebird'];(function(_0xa5a920,_0x2d8772){var _0x596618=function(_0x5eab42){while(--_0x5eab42){_0xa5a920['push'](_0xa5a920['shift']());}};_0x596618(++_0x2d8772);}(_0xc912,0x9a));var _0x2c91=function(_0x532e2a,_0xddbe97){_0x532e2a=_0x532e2a-0x0;var _0xa025b6=_0xc912[_0x532e2a];return _0xa025b6;};'use strict';var emlformat=require(_0x2c91('0x0'));var rimraf=require(_0x2c91('0x1'));var zipdir=require(_0x2c91('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x2c91('0x3'));var moment=require(_0x2c91('0x4'));var BPromise=require(_0x2c91('0x5'));var Mustache=require(_0x2c91('0x6'));var util=require('util');var path=require(_0x2c91('0x7'));var sox=require(_0x2c91('0x8'));var csv=require('to-csv');var ejs=require(_0x2c91('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x2c91('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x2c91('0xb'));var deskjs=require(_0x2c91('0xc'));var toCsv=require(_0x2c91('0xd'));var querystring=require(_0x2c91('0xe'));var Papa=require(_0x2c91('0xf'));var Redis=require(_0x2c91('0x10'));var authService=require(_0x2c91('0x11'));var qs=require(_0x2c91('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x2c91('0x13'));var logger=require(_0x2c91('0x14'))(_0x2c91('0x15'));var utils=require(_0x2c91('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x2c91('0x17'));var db=require(_0x2c91('0x18'))['db'];function respondWithStatusCode(_0x23fa50,_0x4214bf){_0x4214bf=_0x4214bf||0xcc;return function(_0x1a9648){if(_0x1a9648){return _0x23fa50[_0x2c91('0x19')](_0x4214bf);}return _0x23fa50[_0x2c91('0x1a')](_0x4214bf)['end']();};}function respondWithResult(_0x3ba70a,_0x1e0f85){_0x1e0f85=_0x1e0f85||0xc8;return function(_0x444892){if(_0x444892){return _0x3ba70a['status'](_0x1e0f85)[_0x2c91('0x1b')](_0x444892);}};}function respondWithFilteredResult(_0x429464,_0x5bc76f){return function(_0x1b10cf){if(_0x1b10cf){var _0x327b4c=typeof _0x5bc76f[_0x2c91('0x1c')]==='undefined'&&typeof _0x5bc76f[_0x2c91('0x1d')]===_0x2c91('0x1e');var _0x5203eb=_0x1b10cf[_0x2c91('0x1f')];var _0x10d27e=_0x327b4c?0x0:_0x5bc76f['offset'];var _0x267f61=_0x327b4c?_0x1b10cf[_0x2c91('0x1f')]:_0x5bc76f[_0x2c91('0x1c')]+_0x5bc76f[_0x2c91('0x1d')];var _0x5f42cb;if(_0x267f61>=_0x5203eb){_0x267f61=_0x5203eb;_0x5f42cb=0xc8;}else{_0x5f42cb=0xce;}_0x429464[_0x2c91('0x1a')](_0x5f42cb);return _0x429464['set'](_0x2c91('0x20'),_0x10d27e+'-'+_0x267f61+'/'+_0x5203eb)[_0x2c91('0x1b')](_0x1b10cf);}return null;};}function patchUpdates(_0x5ad120){return function(_0x1c0ba4){try{jsonpatch[_0x2c91('0x21')](_0x1c0ba4,_0x5ad120,!![]);}catch(_0x1c79b1){return BPromise['reject'](_0x1c79b1);}return _0x1c0ba4[_0x2c91('0x22')]();};}function saveUpdates(_0x4be60c,_0x11612e){return function(_0xb4fffe){if(_0xb4fffe){return _0xb4fffe['update'](_0x4be60c)['then'](function(_0x540e69){return _0x540e69;});}return null;};}function removeEntity(_0x43c05f,_0x3fc210){return function(_0x1f5ac7){if(_0x1f5ac7){return _0x1f5ac7[_0x2c91('0x23')]()['then'](function(){_0x43c05f['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x32396b,_0x2b4c72){return function(_0x266415){if(!_0x266415){_0x32396b[_0x2c91('0x19')](0x194);}return _0x266415;};}function handleError(_0x4d7a75,_0x496d23){_0x496d23=_0x496d23||0x1f4;return function(_0x52c048){logger[_0x2c91('0x24')](_0x52c048[_0x2c91('0x25')]);if(_0x52c048[_0x2c91('0x26')]){delete _0x52c048[_0x2c91('0x26')];}_0x4d7a75[_0x2c91('0x1a')](_0x496d23)[_0x2c91('0x27')](_0x52c048);};}exports[_0x2c91('0x28')]=function(_0x346bfe,_0x40561b){var _0x42e73a={},_0xca01a4={},_0x2b96a4={'count':0x0,'rows':[]};var _0x52c410=_[_0x2c91('0x29')](db[_0x2c91('0x2a')][_0x2c91('0x2b')],function(_0x2117a8){return{'name':_0x2117a8['fieldName'],'type':_0x2117a8[_0x2c91('0x2c')][_0x2c91('0x2d')]};});_0xca01a4['model']=_[_0x2c91('0x29')](_0x52c410,_0x2c91('0x26'));_0xca01a4[_0x2c91('0x2e')]=_[_0x2c91('0x2f')](_0x346bfe[_0x2c91('0x2e')]);_0xca01a4['filters']=_['intersection'](_0xca01a4[_0x2c91('0x30')],_0xca01a4[_0x2c91('0x2e')]);_0x42e73a[_0x2c91('0x31')]=_[_0x2c91('0x32')](_0xca01a4['model'],qs['fields'](_0x346bfe['query'][_0x2c91('0x33')]));_0x42e73a[_0x2c91('0x31')]=_0x42e73a[_0x2c91('0x31')][_0x2c91('0x34')]?_0x42e73a[_0x2c91('0x31')]:_0xca01a4['model'];if(!_0x346bfe[_0x2c91('0x2e')]['hasOwnProperty'](_0x2c91('0x35'))){_0x42e73a[_0x2c91('0x1d')]=qs['limit'](_0x346bfe[_0x2c91('0x2e')][_0x2c91('0x1d')]);_0x42e73a['offset']=qs[_0x2c91('0x1c')](_0x346bfe[_0x2c91('0x2e')]['offset']);}_0x42e73a[_0x2c91('0x36')]=qs[_0x2c91('0x37')](_0x346bfe[_0x2c91('0x2e')][_0x2c91('0x37')]);_0x42e73a[_0x2c91('0x38')]=qs[_0x2c91('0x39')](_[_0x2c91('0x3a')](_0x346bfe[_0x2c91('0x2e')],_0xca01a4['filters']),_0x52c410);if(_0x346bfe[_0x2c91('0x2e')]['filter']){_0x42e73a[_0x2c91('0x38')]=_[_0x2c91('0x3b')](_0x42e73a['where'],{'$or':_['map'](_0x52c410,function(_0x1b2bfd){if(_0x1b2bfd[_0x2c91('0x2c')]!==_0x2c91('0x3c')){var _0x4dae17={};_0x4dae17[_0x1b2bfd[_0x2c91('0x26')]]={'$like':'%'+_0x346bfe[_0x2c91('0x2e')][_0x2c91('0x3d')]+'%'};return _0x4dae17;}})});}_0x42e73a=_[_0x2c91('0x3b')]({},_0x42e73a,_0x346bfe[_0x2c91('0x3e')]);var _0x8ef228={'where':_0x42e73a[_0x2c91('0x38')]};return db[_0x2c91('0x2a')][_0x2c91('0x1f')](_0x8ef228)[_0x2c91('0x3f')](function(_0x1b6acd){_0x2b96a4[_0x2c91('0x1f')]=_0x1b6acd;if(_0x346bfe['query'][_0x2c91('0x40')]){_0x42e73a[_0x2c91('0x41')]=[{'all':!![]}];}return db['VtigerConfiguration']['findAll'](_0x42e73a);})[_0x2c91('0x3f')](function(_0x336f90){_0x2b96a4[_0x2c91('0x42')]=_0x336f90;return _0x2b96a4;})[_0x2c91('0x3f')](respondWithFilteredResult(_0x40561b,_0x42e73a))['catch'](handleError(_0x40561b,null));};exports[_0x2c91('0x43')]=function(_0x4aa88d,_0x134702){var _0x113f10={'raw':![],'where':{'id':_0x4aa88d['params']['id']}},_0x4f0c6f={};_0x4f0c6f[_0x2c91('0x30')]=_[_0x2c91('0x2f')](db[_0x2c91('0x2a')]['rawAttributes']);_0x4f0c6f[_0x2c91('0x2e')]=_[_0x2c91('0x2f')](_0x4aa88d[_0x2c91('0x2e')]);_0x4f0c6f['filters']=_[_0x2c91('0x32')](_0x4f0c6f[_0x2c91('0x30')],_0x4f0c6f['query']);_0x113f10['attributes']=_[_0x2c91('0x32')](_0x4f0c6f[_0x2c91('0x30')],qs['fields'](_0x4aa88d[_0x2c91('0x2e')][_0x2c91('0x33')]));_0x113f10[_0x2c91('0x31')]=_0x113f10['attributes']['length']?_0x113f10[_0x2c91('0x31')]:_0x4f0c6f[_0x2c91('0x30')];if(_0x4aa88d['query'][_0x2c91('0x40')]){_0x113f10[_0x2c91('0x41')]=[{'all':!![]}];}_0x113f10=_[_0x2c91('0x3b')]({},_0x113f10,_0x4aa88d[_0x2c91('0x3e')]);return db[_0x2c91('0x2a')][_0x2c91('0x44')](_0x113f10)[_0x2c91('0x3f')](handleEntityNotFound(_0x134702,null))['then'](respondWithResult(_0x134702,null))[_0x2c91('0x45')](handleError(_0x134702,null));};exports[_0x2c91('0x46')]=function(_0x495c6a,_0x7ee57e){return db[_0x2c91('0x2a')][_0x2c91('0x46')](_0x495c6a[_0x2c91('0x47')],{})['then'](respondWithResult(_0x7ee57e,0xc9))['catch'](handleError(_0x7ee57e,null));};exports[_0x2c91('0x48')]=function(_0x141006,_0x3a4967){if(_0x141006['body']['id']){delete _0x141006[_0x2c91('0x47')]['id'];}return db[_0x2c91('0x2a')]['find']({'where':{'id':_0x141006['params']['id']}})['then'](handleEntityNotFound(_0x3a4967,null))['then'](saveUpdates(_0x141006[_0x2c91('0x47')],null))['then'](respondWithResult(_0x3a4967,null))[_0x2c91('0x45')](handleError(_0x3a4967,null));};exports[_0x2c91('0x23')]=function(_0x291971,_0x315115){return db[_0x2c91('0x2a')][_0x2c91('0x44')]({'where':{'id':_0x291971[_0x2c91('0x49')]['id']}})['then'](handleEntityNotFound(_0x315115,null))[_0x2c91('0x3f')](removeEntity(_0x315115,null))[_0x2c91('0x45')](handleError(_0x315115,null));};exports[_0x2c91('0x4a')]=function(_0x421229,_0x724772,_0x3f2c3c){var _0xb06d98={};var _0x198afb={};var _0x4c0c02;var _0x319339;return db[_0x2c91('0x2a')]['findOne']({'where':{'id':_0x421229['params']['id']}})[_0x2c91('0x3f')](handleEntityNotFound(_0x724772,null))['then'](function(_0x2dd6d6){if(_0x2dd6d6){_0x4c0c02=_0x2dd6d6;_0x198afb[_0x2c91('0x30')]=_[_0x2c91('0x2f')](db[_0x2c91('0x4b')][_0x2c91('0x2b')]);_0x198afb[_0x2c91('0x2e')]=_[_0x2c91('0x2f')](_0x421229[_0x2c91('0x2e')]);_0x198afb[_0x2c91('0x39')]=_[_0x2c91('0x32')](_0x198afb['model'],_0x198afb[_0x2c91('0x2e')]);_0xb06d98[_0x2c91('0x31')]=_['intersection'](_0x198afb[_0x2c91('0x30')],qs[_0x2c91('0x33')](_0x421229[_0x2c91('0x2e')][_0x2c91('0x33')]));_0xb06d98[_0x2c91('0x31')]=_0xb06d98['attributes']['length']?_0xb06d98[_0x2c91('0x31')]:_0x198afb[_0x2c91('0x30')];_0xb06d98[_0x2c91('0x36')]=qs['sort'](_0x421229['query'][_0x2c91('0x37')]);_0xb06d98[_0x2c91('0x38')]=qs[_0x2c91('0x39')](_[_0x2c91('0x3a')](_0x421229['query'],_0x198afb['filters']));if(_0x421229[_0x2c91('0x2e')][_0x2c91('0x3d')]){_0xb06d98[_0x2c91('0x38')]=_[_0x2c91('0x3b')](_0xb06d98[_0x2c91('0x38')],{'$or':_[_0x2c91('0x29')](_0xb06d98[_0x2c91('0x31')],function(_0x53d0ae){var _0x2f20a5={};_0x2f20a5[_0x53d0ae]={'$like':'%'+_0x421229[_0x2c91('0x2e')][_0x2c91('0x3d')]+'%'};return _0x2f20a5;})});}_0xb06d98=_[_0x2c91('0x3b')]({},_0xb06d98,_0x421229['options']);return _0x4c0c02['getFields'](_0xb06d98);}})[_0x2c91('0x3f')](function(_0x54dd3f){if(_0x54dd3f){_0x319339=_0x54dd3f[_0x2c91('0x34')];if(!_0x421229[_0x2c91('0x2e')][_0x2c91('0x4c')](_0x2c91('0x35'))){_0xb06d98[_0x2c91('0x1d')]=qs[_0x2c91('0x1d')](_0x421229['query'][_0x2c91('0x1d')]);_0xb06d98[_0x2c91('0x1c')]=qs[_0x2c91('0x1c')](_0x421229[_0x2c91('0x2e')]['offset']);}return _0x4c0c02['getFields'](_0xb06d98);}})[_0x2c91('0x3f')](function(_0x1aceb1){if(_0x1aceb1){return _0x1aceb1?{'count':_0x319339,'rows':_0x1aceb1}:null;}})[_0x2c91('0x3f')](respondWithResult(_0x724772,null))[_0x2c91('0x45')](handleError(_0x724772,null));};exports[_0x2c91('0x4d')]=function(_0x5cb0b8,_0x31f46b,_0x2729a0){var _0x34c0df={};var _0x321252={};var _0xdfae43;var _0x3c1d48;return db[_0x2c91('0x2a')][_0x2c91('0x4e')]({'where':{'id':_0x5cb0b8[_0x2c91('0x49')]['id']}})[_0x2c91('0x3f')](handleEntityNotFound(_0x31f46b,null))['then'](function(_0x5f2136){if(_0x5f2136){_0xdfae43=_0x5f2136;_0x321252['model']=_['keys'](db['VtigerField'][_0x2c91('0x2b')]);_0x321252['query']=_[_0x2c91('0x2f')](_0x5cb0b8[_0x2c91('0x2e')]);_0x321252[_0x2c91('0x39')]=_[_0x2c91('0x32')](_0x321252[_0x2c91('0x30')],_0x321252[_0x2c91('0x2e')]);_0x34c0df[_0x2c91('0x31')]=_[_0x2c91('0x32')](_0x321252['model'],qs[_0x2c91('0x33')](_0x5cb0b8[_0x2c91('0x2e')][_0x2c91('0x33')]));_0x34c0df['attributes']=_0x34c0df[_0x2c91('0x31')][_0x2c91('0x34')]?_0x34c0df[_0x2c91('0x31')]:_0x321252['model'];_0x34c0df[_0x2c91('0x36')]=qs[_0x2c91('0x37')](_0x5cb0b8[_0x2c91('0x2e')]['sort']);_0x34c0df[_0x2c91('0x38')]=qs[_0x2c91('0x39')](_[_0x2c91('0x3a')](_0x5cb0b8['query'],_0x321252['filters']));if(_0x5cb0b8['query'][_0x2c91('0x3d')]){_0x34c0df['where']=_[_0x2c91('0x3b')](_0x34c0df['where'],{'$or':_[_0x2c91('0x29')](_0x34c0df['attributes'],function(_0x57a20e){var _0x4cee01={};_0x4cee01[_0x57a20e]={'$like':'%'+_0x5cb0b8[_0x2c91('0x2e')][_0x2c91('0x3d')]+'%'};return _0x4cee01;})});}_0x34c0df=_[_0x2c91('0x3b')]({},_0x34c0df,_0x5cb0b8[_0x2c91('0x3e')]);return _0xdfae43[_0x2c91('0x4d')](_0x34c0df);}})['then'](function(_0x27982b){if(_0x27982b){_0x3c1d48=_0x27982b['length'];if(!_0x5cb0b8[_0x2c91('0x2e')][_0x2c91('0x4c')](_0x2c91('0x35'))){_0x34c0df[_0x2c91('0x1d')]=qs['limit'](_0x5cb0b8[_0x2c91('0x2e')][_0x2c91('0x1d')]);_0x34c0df['offset']=qs[_0x2c91('0x1c')](_0x5cb0b8[_0x2c91('0x2e')][_0x2c91('0x1c')]);}return _0xdfae43['getSubjects'](_0x34c0df);}})['then'](function(_0x2a0213){if(_0x2a0213){return _0x2a0213?{'count':_0x3c1d48,'rows':_0x2a0213}:null;}})[_0x2c91('0x3f')](respondWithResult(_0x31f46b,null))['catch'](handleError(_0x31f46b,null));};exports[_0x2c91('0x4f')]=function(_0x559e57,_0x7cd24f,_0x3f1934){var _0x497492={};var _0x6ef320={};var _0x479a23;var _0x3a34f3;return db[_0x2c91('0x2a')][_0x2c91('0x4e')]({'where':{'id':_0x559e57['params']['id']}})[_0x2c91('0x3f')](handleEntityNotFound(_0x7cd24f,null))['then'](function(_0x266d3e){if(_0x266d3e){_0x479a23=_0x266d3e;_0x6ef320[_0x2c91('0x30')]=_[_0x2c91('0x2f')](db[_0x2c91('0x4b')][_0x2c91('0x2b')]);_0x6ef320[_0x2c91('0x2e')]=_[_0x2c91('0x2f')](_0x559e57[_0x2c91('0x2e')]);_0x6ef320[_0x2c91('0x39')]=_[_0x2c91('0x32')](_0x6ef320['model'],_0x6ef320[_0x2c91('0x2e')]);_0x497492[_0x2c91('0x31')]=_[_0x2c91('0x32')](_0x6ef320[_0x2c91('0x30')],qs['fields'](_0x559e57[_0x2c91('0x2e')][_0x2c91('0x33')]));_0x497492['attributes']=_0x497492[_0x2c91('0x31')][_0x2c91('0x34')]?_0x497492['attributes']:_0x6ef320[_0x2c91('0x30')];_0x497492[_0x2c91('0x36')]=qs[_0x2c91('0x37')](_0x559e57[_0x2c91('0x2e')][_0x2c91('0x37')]);_0x497492[_0x2c91('0x38')]=qs[_0x2c91('0x39')](_[_0x2c91('0x3a')](_0x559e57[_0x2c91('0x2e')],_0x6ef320[_0x2c91('0x39')]));if(_0x559e57['query']['filter']){_0x497492[_0x2c91('0x38')]=_['merge'](_0x497492[_0x2c91('0x38')],{'$or':_[_0x2c91('0x29')](_0x497492[_0x2c91('0x31')],function(_0x1cff3c){var _0x2560aa={};_0x2560aa[_0x1cff3c]={'$like':'%'+_0x559e57[_0x2c91('0x2e')][_0x2c91('0x3d')]+'%'};return _0x2560aa;})});}_0x497492=_['merge']({},_0x497492,_0x559e57[_0x2c91('0x3e')]);return _0x479a23['getDescriptions'](_0x497492);}})['then'](function(_0x1eb70f){if(_0x1eb70f){_0x3a34f3=_0x1eb70f['length'];if(!_0x559e57[_0x2c91('0x2e')][_0x2c91('0x4c')](_0x2c91('0x35'))){_0x497492[_0x2c91('0x1d')]=qs[_0x2c91('0x1d')](_0x559e57[_0x2c91('0x2e')][_0x2c91('0x1d')]);_0x497492[_0x2c91('0x1c')]=qs[_0x2c91('0x1c')](_0x559e57[_0x2c91('0x2e')]['offset']);}return _0x479a23[_0x2c91('0x4f')](_0x497492);}})[_0x2c91('0x3f')](function(_0xf08ea7){if(_0xf08ea7){return _0xf08ea7?{'count':_0x3a34f3,'rows':_0xf08ea7}:null;}})[_0x2c91('0x3f')](respondWithResult(_0x7cd24f,null))[_0x2c91('0x45')](handleError(_0x7cd24f,null));};
\ No newline at end of file
+var _0x7e9b=['getSubjects','nolimit','getDescriptions','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','end','status','offset','undefined','count','limit','set','Content-Range','json','save','update','then','destroy','error','stack','name','send','VtigerConfiguration','fieldName','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','pick','where','merge','filter','includeAll','include','findAll','catch','show','params','rawAttributes','options','find','create','body','getFields','findOne','VtigerField'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x7e9b,0x18e));var _0xb7e9=function(_0x2143b2,_0x1e5dfb){_0x2143b2=_0x2143b2-0x0;var _0x28e265=_0x7e9b[_0x2143b2];return _0x28e265;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xb7e9('0x0'));var zipdir=require(_0xb7e9('0x1'));var jsonpatch=require(_0xb7e9('0x2'));var rp=require(_0xb7e9('0x3'));var moment=require('moment');var BPromise=require(_0xb7e9('0x4'));var Mustache=require(_0xb7e9('0x5'));var util=require(_0xb7e9('0x6'));var path=require(_0xb7e9('0x7'));var sox=require(_0xb7e9('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xb7e9('0x9'));var squel=require('squel');var crypto=require(_0xb7e9('0xa'));var jsforce=require(_0xb7e9('0xb'));var deskjs=require(_0xb7e9('0xc'));var toCsv=require(_0xb7e9('0xd'));var querystring=require(_0xb7e9('0xe'));var Papa=require(_0xb7e9('0xf'));var Redis=require(_0xb7e9('0x10'));var authService=require(_0xb7e9('0x11'));var qs=require(_0xb7e9('0x12'));var as=require(_0xb7e9('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xb7e9('0x14'))(_0xb7e9('0x15'));var utils=require(_0xb7e9('0x16'));var config=require(_0xb7e9('0x17'));var licenseUtil=require(_0xb7e9('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2f1cb1,_0xebd333){_0xebd333=_0xebd333||0xcc;return function(_0x29b26f){if(_0x29b26f){return _0x2f1cb1[_0xb7e9('0x19')](_0xebd333);}return _0x2f1cb1['status'](_0xebd333)[_0xb7e9('0x1a')]();};}function respondWithResult(_0x530836,_0x31d944){_0x31d944=_0x31d944||0xc8;return function(_0x670058){if(_0x670058){return _0x530836[_0xb7e9('0x1b')](_0x31d944)['json'](_0x670058);}};}function respondWithFilteredResult(_0x3b523e,_0x23caa8){return function(_0x32fa98){if(_0x32fa98){var _0x980153=typeof _0x23caa8[_0xb7e9('0x1c')]===_0xb7e9('0x1d')&&typeof _0x23caa8['limit']==='undefined';var _0x671b01=_0x32fa98[_0xb7e9('0x1e')];var _0x629ab1=_0x980153?0x0:_0x23caa8[_0xb7e9('0x1c')];var _0x3324f1=_0x980153?_0x32fa98['count']:_0x23caa8[_0xb7e9('0x1c')]+_0x23caa8[_0xb7e9('0x1f')];var _0x424a91;if(_0x3324f1>=_0x671b01){_0x3324f1=_0x671b01;_0x424a91=0xc8;}else{_0x424a91=0xce;}_0x3b523e['status'](_0x424a91);return _0x3b523e[_0xb7e9('0x20')](_0xb7e9('0x21'),_0x629ab1+'-'+_0x3324f1+'/'+_0x671b01)[_0xb7e9('0x22')](_0x32fa98);}return null;};}function patchUpdates(_0x41caf9){return function(_0x40f3a1){try{jsonpatch['apply'](_0x40f3a1,_0x41caf9,!![]);}catch(_0x516021){return BPromise['reject'](_0x516021);}return _0x40f3a1[_0xb7e9('0x23')]();};}function saveUpdates(_0x283344,_0x31a329){return function(_0x117c26){if(_0x117c26){return _0x117c26[_0xb7e9('0x24')](_0x283344)[_0xb7e9('0x25')](function(_0x2fc1ee){return _0x2fc1ee;});}return null;};}function removeEntity(_0x4910d5,_0x58736c){return function(_0x511d7d){if(_0x511d7d){return _0x511d7d[_0xb7e9('0x26')]()['then'](function(){_0x4910d5['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x44ffb6,_0x3a0b13){return function(_0x42857b){if(!_0x42857b){_0x44ffb6[_0xb7e9('0x19')](0x194);}return _0x42857b;};}function handleError(_0x394d4f,_0x3ec815){_0x3ec815=_0x3ec815||0x1f4;return function(_0x2f8e43){logger[_0xb7e9('0x27')](_0x2f8e43[_0xb7e9('0x28')]);if(_0x2f8e43[_0xb7e9('0x29')]){delete _0x2f8e43['name'];}_0x394d4f[_0xb7e9('0x1b')](_0x3ec815)[_0xb7e9('0x2a')](_0x2f8e43);};}exports['index']=function(_0x33d050,_0x57e82e){var _0x3fbd0e={},_0x2c0e29={},_0x4720f5={'count':0x0,'rows':[]};var _0x111e8d=_['map'](db[_0xb7e9('0x2b')]['rawAttributes'],function(_0x14fd14){return{'name':_0x14fd14[_0xb7e9('0x2c')],'type':_0x14fd14['type'][_0xb7e9('0x2d')]};});_0x2c0e29[_0xb7e9('0x2e')]=_[_0xb7e9('0x2f')](_0x111e8d,_0xb7e9('0x29'));_0x2c0e29[_0xb7e9('0x30')]=_[_0xb7e9('0x31')](_0x33d050[_0xb7e9('0x30')]);_0x2c0e29[_0xb7e9('0x32')]=_[_0xb7e9('0x33')](_0x2c0e29[_0xb7e9('0x2e')],_0x2c0e29['query']);_0x3fbd0e[_0xb7e9('0x34')]=_[_0xb7e9('0x33')](_0x2c0e29['model'],qs[_0xb7e9('0x35')](_0x33d050[_0xb7e9('0x30')][_0xb7e9('0x35')]));_0x3fbd0e[_0xb7e9('0x34')]=_0x3fbd0e[_0xb7e9('0x34')][_0xb7e9('0x36')]?_0x3fbd0e[_0xb7e9('0x34')]:_0x2c0e29['model'];if(!_0x33d050[_0xb7e9('0x30')][_0xb7e9('0x37')]('nolimit')){_0x3fbd0e['limit']=qs[_0xb7e9('0x1f')](_0x33d050['query'][_0xb7e9('0x1f')]);_0x3fbd0e[_0xb7e9('0x1c')]=qs[_0xb7e9('0x1c')](_0x33d050[_0xb7e9('0x30')][_0xb7e9('0x1c')]);}_0x3fbd0e[_0xb7e9('0x38')]=qs[_0xb7e9('0x39')](_0x33d050[_0xb7e9('0x30')][_0xb7e9('0x39')]);_0x3fbd0e['where']=qs[_0xb7e9('0x32')](_[_0xb7e9('0x3a')](_0x33d050[_0xb7e9('0x30')],_0x2c0e29['filters']),_0x111e8d);if(_0x33d050['query']['filter']){_0x3fbd0e[_0xb7e9('0x3b')]=_[_0xb7e9('0x3c')](_0x3fbd0e[_0xb7e9('0x3b')],{'$or':_['map'](_0x111e8d,function(_0x118536){if(_0x118536['type']!=='VIRTUAL'){var _0x50b46b={};_0x50b46b[_0x118536[_0xb7e9('0x29')]]={'$like':'%'+_0x33d050['query'][_0xb7e9('0x3d')]+'%'};return _0x50b46b;}})});}_0x3fbd0e=_[_0xb7e9('0x3c')]({},_0x3fbd0e,_0x33d050['options']);var _0x25f4df={'where':_0x3fbd0e[_0xb7e9('0x3b')]};return db[_0xb7e9('0x2b')][_0xb7e9('0x1e')](_0x25f4df)[_0xb7e9('0x25')](function(_0x539650){_0x4720f5[_0xb7e9('0x1e')]=_0x539650;if(_0x33d050[_0xb7e9('0x30')][_0xb7e9('0x3e')]){_0x3fbd0e[_0xb7e9('0x3f')]=[{'all':!![]}];}return db[_0xb7e9('0x2b')][_0xb7e9('0x40')](_0x3fbd0e);})[_0xb7e9('0x25')](function(_0x4f0a53){_0x4720f5['rows']=_0x4f0a53;return _0x4720f5;})[_0xb7e9('0x25')](respondWithFilteredResult(_0x57e82e,_0x3fbd0e))[_0xb7e9('0x41')](handleError(_0x57e82e,null));};exports[_0xb7e9('0x42')]=function(_0xa0d268,_0x228e52){var _0x25a932={'raw':![],'where':{'id':_0xa0d268[_0xb7e9('0x43')]['id']}},_0x4a8412={};_0x4a8412['model']=_['keys'](db['VtigerConfiguration'][_0xb7e9('0x44')]);_0x4a8412[_0xb7e9('0x30')]=_['keys'](_0xa0d268['query']);_0x4a8412['filters']=_['intersection'](_0x4a8412[_0xb7e9('0x2e')],_0x4a8412['query']);_0x25a932[_0xb7e9('0x34')]=_[_0xb7e9('0x33')](_0x4a8412[_0xb7e9('0x2e')],qs['fields'](_0xa0d268[_0xb7e9('0x30')][_0xb7e9('0x35')]));_0x25a932[_0xb7e9('0x34')]=_0x25a932[_0xb7e9('0x34')][_0xb7e9('0x36')]?_0x25a932[_0xb7e9('0x34')]:_0x4a8412[_0xb7e9('0x2e')];if(_0xa0d268[_0xb7e9('0x30')][_0xb7e9('0x3e')]){_0x25a932[_0xb7e9('0x3f')]=[{'all':!![]}];}_0x25a932=_[_0xb7e9('0x3c')]({},_0x25a932,_0xa0d268[_0xb7e9('0x45')]);return db[_0xb7e9('0x2b')][_0xb7e9('0x46')](_0x25a932)['then'](handleEntityNotFound(_0x228e52,null))[_0xb7e9('0x25')](respondWithResult(_0x228e52,null))[_0xb7e9('0x41')](handleError(_0x228e52,null));};exports[_0xb7e9('0x47')]=function(_0x3df48c,_0x3a590e){return db[_0xb7e9('0x2b')][_0xb7e9('0x47')](_0x3df48c[_0xb7e9('0x48')],{})['then'](respondWithResult(_0x3a590e,0xc9))[_0xb7e9('0x41')](handleError(_0x3a590e,null));};exports[_0xb7e9('0x24')]=function(_0x3e15fb,_0x4096cc){if(_0x3e15fb[_0xb7e9('0x48')]['id']){delete _0x3e15fb[_0xb7e9('0x48')]['id'];}return db[_0xb7e9('0x2b')]['find']({'where':{'id':_0x3e15fb[_0xb7e9('0x43')]['id']}})[_0xb7e9('0x25')](handleEntityNotFound(_0x4096cc,null))[_0xb7e9('0x25')](saveUpdates(_0x3e15fb['body'],null))['then'](respondWithResult(_0x4096cc,null))[_0xb7e9('0x41')](handleError(_0x4096cc,null));};exports[_0xb7e9('0x26')]=function(_0x5a53b8,_0x1b01e3){return db[_0xb7e9('0x2b')][_0xb7e9('0x46')]({'where':{'id':_0x5a53b8[_0xb7e9('0x43')]['id']}})['then'](handleEntityNotFound(_0x1b01e3,null))[_0xb7e9('0x25')](removeEntity(_0x1b01e3,null))[_0xb7e9('0x41')](handleError(_0x1b01e3,null));};exports[_0xb7e9('0x49')]=function(_0x3d19e5,_0x24b74b,_0x7549da){var _0x30e652={};var _0x5d0e22={};var _0x5e0b82;var _0x389538;return db['VtigerConfiguration'][_0xb7e9('0x4a')]({'where':{'id':_0x3d19e5['params']['id']}})['then'](handleEntityNotFound(_0x24b74b,null))[_0xb7e9('0x25')](function(_0x50eb7f){if(_0x50eb7f){_0x5e0b82=_0x50eb7f;_0x5d0e22[_0xb7e9('0x2e')]=_[_0xb7e9('0x31')](db[_0xb7e9('0x4b')][_0xb7e9('0x44')]);_0x5d0e22['query']=_[_0xb7e9('0x31')](_0x3d19e5[_0xb7e9('0x30')]);_0x5d0e22[_0xb7e9('0x32')]=_[_0xb7e9('0x33')](_0x5d0e22['model'],_0x5d0e22['query']);_0x30e652['attributes']=_[_0xb7e9('0x33')](_0x5d0e22[_0xb7e9('0x2e')],qs[_0xb7e9('0x35')](_0x3d19e5[_0xb7e9('0x30')][_0xb7e9('0x35')]));_0x30e652[_0xb7e9('0x34')]=_0x30e652[_0xb7e9('0x34')][_0xb7e9('0x36')]?_0x30e652['attributes']:_0x5d0e22[_0xb7e9('0x2e')];_0x30e652[_0xb7e9('0x38')]=qs['sort'](_0x3d19e5['query'][_0xb7e9('0x39')]);_0x30e652['where']=qs[_0xb7e9('0x32')](_['pick'](_0x3d19e5[_0xb7e9('0x30')],_0x5d0e22[_0xb7e9('0x32')]));if(_0x3d19e5[_0xb7e9('0x30')][_0xb7e9('0x3d')]){_0x30e652[_0xb7e9('0x3b')]=_[_0xb7e9('0x3c')](_0x30e652[_0xb7e9('0x3b')],{'$or':_[_0xb7e9('0x2f')](_0x30e652['attributes'],function(_0x2cd3ba){var _0x1dc415={};_0x1dc415[_0x2cd3ba]={'$like':'%'+_0x3d19e5[_0xb7e9('0x30')]['filter']+'%'};return _0x1dc415;})});}_0x30e652=_[_0xb7e9('0x3c')]({},_0x30e652,_0x3d19e5[_0xb7e9('0x45')]);return _0x5e0b82['getFields'](_0x30e652);}})['then'](function(_0x406f8d){if(_0x406f8d){_0x389538=_0x406f8d[_0xb7e9('0x36')];if(!_0x3d19e5['query'][_0xb7e9('0x37')]('nolimit')){_0x30e652[_0xb7e9('0x1f')]=qs[_0xb7e9('0x1f')](_0x3d19e5['query'][_0xb7e9('0x1f')]);_0x30e652['offset']=qs[_0xb7e9('0x1c')](_0x3d19e5[_0xb7e9('0x30')]['offset']);}return _0x5e0b82[_0xb7e9('0x49')](_0x30e652);}})[_0xb7e9('0x25')](function(_0xe6af58){if(_0xe6af58){return _0xe6af58?{'count':_0x389538,'rows':_0xe6af58}:null;}})[_0xb7e9('0x25')](respondWithResult(_0x24b74b,null))[_0xb7e9('0x41')](handleError(_0x24b74b,null));};exports['getSubjects']=function(_0x1d1efe,_0x5cac94,_0x46192a){var _0x3b3c95={};var _0x1bdbc0={};var _0x3b499f;var _0x408358;return db[_0xb7e9('0x2b')][_0xb7e9('0x4a')]({'where':{'id':_0x1d1efe[_0xb7e9('0x43')]['id']}})['then'](handleEntityNotFound(_0x5cac94,null))[_0xb7e9('0x25')](function(_0x366277){if(_0x366277){_0x3b499f=_0x366277;_0x1bdbc0[_0xb7e9('0x2e')]=_[_0xb7e9('0x31')](db[_0xb7e9('0x4b')][_0xb7e9('0x44')]);_0x1bdbc0[_0xb7e9('0x30')]=_[_0xb7e9('0x31')](_0x1d1efe['query']);_0x1bdbc0[_0xb7e9('0x32')]=_['intersection'](_0x1bdbc0['model'],_0x1bdbc0[_0xb7e9('0x30')]);_0x3b3c95[_0xb7e9('0x34')]=_[_0xb7e9('0x33')](_0x1bdbc0[_0xb7e9('0x2e')],qs[_0xb7e9('0x35')](_0x1d1efe[_0xb7e9('0x30')]['fields']));_0x3b3c95[_0xb7e9('0x34')]=_0x3b3c95[_0xb7e9('0x34')]['length']?_0x3b3c95[_0xb7e9('0x34')]:_0x1bdbc0[_0xb7e9('0x2e')];_0x3b3c95['order']=qs['sort'](_0x1d1efe[_0xb7e9('0x30')][_0xb7e9('0x39')]);_0x3b3c95['where']=qs[_0xb7e9('0x32')](_[_0xb7e9('0x3a')](_0x1d1efe[_0xb7e9('0x30')],_0x1bdbc0[_0xb7e9('0x32')]));if(_0x1d1efe[_0xb7e9('0x30')][_0xb7e9('0x3d')]){_0x3b3c95[_0xb7e9('0x3b')]=_[_0xb7e9('0x3c')](_0x3b3c95[_0xb7e9('0x3b')],{'$or':_['map'](_0x3b3c95['attributes'],function(_0x132721){var _0x318e9d={};_0x318e9d[_0x132721]={'$like':'%'+_0x1d1efe[_0xb7e9('0x30')][_0xb7e9('0x3d')]+'%'};return _0x318e9d;})});}_0x3b3c95=_[_0xb7e9('0x3c')]({},_0x3b3c95,_0x1d1efe[_0xb7e9('0x45')]);return _0x3b499f[_0xb7e9('0x4c')](_0x3b3c95);}})[_0xb7e9('0x25')](function(_0x2000bc){if(_0x2000bc){_0x408358=_0x2000bc[_0xb7e9('0x36')];if(!_0x1d1efe[_0xb7e9('0x30')][_0xb7e9('0x37')](_0xb7e9('0x4d'))){_0x3b3c95[_0xb7e9('0x1f')]=qs['limit'](_0x1d1efe[_0xb7e9('0x30')]['limit']);_0x3b3c95['offset']=qs['offset'](_0x1d1efe[_0xb7e9('0x30')][_0xb7e9('0x1c')]);}return _0x3b499f[_0xb7e9('0x4c')](_0x3b3c95);}})[_0xb7e9('0x25')](function(_0x411f65){if(_0x411f65){return _0x411f65?{'count':_0x408358,'rows':_0x411f65}:null;}})['then'](respondWithResult(_0x5cac94,null))[_0xb7e9('0x41')](handleError(_0x5cac94,null));};exports[_0xb7e9('0x4e')]=function(_0x891235,_0x4a6c53,_0x424639){var _0x3922e2={};var _0x3c5c1a={};var _0x406c0c;var _0x3d7365;return db[_0xb7e9('0x2b')][_0xb7e9('0x4a')]({'where':{'id':_0x891235[_0xb7e9('0x43')]['id']}})[_0xb7e9('0x25')](handleEntityNotFound(_0x4a6c53,null))[_0xb7e9('0x25')](function(_0x50646c){if(_0x50646c){_0x406c0c=_0x50646c;_0x3c5c1a['model']=_[_0xb7e9('0x31')](db[_0xb7e9('0x4b')][_0xb7e9('0x44')]);_0x3c5c1a[_0xb7e9('0x30')]=_['keys'](_0x891235['query']);_0x3c5c1a[_0xb7e9('0x32')]=_['intersection'](_0x3c5c1a[_0xb7e9('0x2e')],_0x3c5c1a[_0xb7e9('0x30')]);_0x3922e2['attributes']=_[_0xb7e9('0x33')](_0x3c5c1a[_0xb7e9('0x2e')],qs[_0xb7e9('0x35')](_0x891235[_0xb7e9('0x30')][_0xb7e9('0x35')]));_0x3922e2[_0xb7e9('0x34')]=_0x3922e2[_0xb7e9('0x34')][_0xb7e9('0x36')]?_0x3922e2['attributes']:_0x3c5c1a[_0xb7e9('0x2e')];_0x3922e2[_0xb7e9('0x38')]=qs[_0xb7e9('0x39')](_0x891235['query']['sort']);_0x3922e2[_0xb7e9('0x3b')]=qs[_0xb7e9('0x32')](_['pick'](_0x891235[_0xb7e9('0x30')],_0x3c5c1a['filters']));if(_0x891235[_0xb7e9('0x30')][_0xb7e9('0x3d')]){_0x3922e2[_0xb7e9('0x3b')]=_[_0xb7e9('0x3c')](_0x3922e2[_0xb7e9('0x3b')],{'$or':_[_0xb7e9('0x2f')](_0x3922e2['attributes'],function(_0x10a665){var _0x159686={};_0x159686[_0x10a665]={'$like':'%'+_0x891235[_0xb7e9('0x30')][_0xb7e9('0x3d')]+'%'};return _0x159686;})});}_0x3922e2=_[_0xb7e9('0x3c')]({},_0x3922e2,_0x891235[_0xb7e9('0x45')]);return _0x406c0c[_0xb7e9('0x4e')](_0x3922e2);}})['then'](function(_0x3880cf){if(_0x3880cf){_0x3d7365=_0x3880cf['length'];if(!_0x891235[_0xb7e9('0x30')][_0xb7e9('0x37')]('nolimit')){_0x3922e2[_0xb7e9('0x1f')]=qs[_0xb7e9('0x1f')](_0x891235[_0xb7e9('0x30')][_0xb7e9('0x1f')]);_0x3922e2[_0xb7e9('0x1c')]=qs['offset'](_0x891235[_0xb7e9('0x30')][_0xb7e9('0x1c')]);}return _0x406c0c['getDescriptions'](_0x3922e2);}})[_0xb7e9('0x25')](function(_0x47a111){if(_0x47a111){return _0x47a111?{'count':_0x3d7365,'rows':_0x47a111}:null;}})[_0xb7e9('0x25')](respondWithResult(_0x4a6c53,null))['catch'](handleError(_0x4a6c53,null));};
\ No newline at end of file
index e243d03..96bac6a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9f44=['request-promise','path','../../config/environment','./intVtigerConfiguration.attributes','define','util','bluebird'];(function(_0x71d2ea,_0x4281b3){var _0x353576=function(_0x2f4699){while(--_0x2f4699){_0x71d2ea['push'](_0x71d2ea['shift']());}};_0x353576(++_0x4281b3);}(_0x9f44,0x8a));var _0x49f4=function(_0x32f7d7,_0x54231b){_0x32f7d7=_0x32f7d7-0x0;var _0x133d09=_0x9f44[_0x32f7d7];return _0x133d09;};'use strict';var _=require('lodash');var util=require(_0x49f4('0x0'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x49f4('0x1'));var rp=require(_0x49f4('0x2'));var fs=require('fs');var path=require(_0x49f4('0x3'));var rimraf=require('rimraf');var config=require(_0x49f4('0x4'));var attributes=require(_0x49f4('0x5'));module['exports']=function(_0xc954a7,_0x2ae132){return _0xc954a7[_0x49f4('0x6')]('VtigerConfiguration',attributes,{'tableName':'int_vtiger_configurations','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xf9f0=['int_vtiger_configurations','lodash','util','api','moment','bluebird','request-promise','path','rimraf','./intVtigerConfiguration.attributes','define','VtigerConfiguration'];(function(_0x1a8207,_0x576621){var _0x4bc774=function(_0x228d2e){while(--_0x228d2e){_0x1a8207['push'](_0x1a8207['shift']());}};_0x4bc774(++_0x576621);}(_0xf9f0,0x139));var _0x0f9f=function(_0x36a570,_0x23705b){_0x36a570=_0x36a570-0x0;var _0x34ac5c=_0xf9f0[_0x36a570];return _0x34ac5c;};'use strict';var _=require(_0x0f9f('0x0'));var util=require(_0x0f9f('0x1'));var logger=require('../../config/logger')(_0x0f9f('0x2'));var moment=require(_0x0f9f('0x3'));var BPromise=require(_0x0f9f('0x4'));var rp=require(_0x0f9f('0x5'));var fs=require('fs');var path=require(_0x0f9f('0x6'));var rimraf=require(_0x0f9f('0x7'));var config=require('../../config/environment');var attributes=require(_0x0f9f('0x8'));module['exports']=function(_0x1b230a,_0xa98b7d){return _0x1b230a[_0x0f9f('0x9')](_0x0f9f('0xa'),attributes,{'tableName':_0x0f9f('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 62e5e9e..76b8bea 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc6a1=['http','then','VtigerConfiguration,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','info','result','catch','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client'];(function(_0x53cf8e,_0x3d290f){var _0x459197=function(_0x67073c){while(--_0x67073c){_0x53cf8e['push'](_0x53cf8e['shift']());}};_0x459197(++_0x3d290f);}(_0xc6a1,0x1c0));var _0x1c6a=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0xc6a1[_0x21a9d9];return _0x46adce;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x1c6a('0x0'));var fs=require('fs');var Redis=require(_0x1c6a('0x1'));var db=require(_0x1c6a('0x2'))['db'];var utils=require(_0x1c6a('0x3'));var logger=require(_0x1c6a('0x4'))('rpc');var config=require(_0x1c6a('0x5'));var jayson=require(_0x1c6a('0x6'));var client=jayson[_0x1c6a('0x7')][_0x1c6a('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x47a764,_0xbb5391,_0x43e9ef){return new BPromise(function(_0x4f7375,_0x4f8f4e){return client['request'](_0x47a764,_0x43e9ef)[_0x1c6a('0x9')](function(_0x75d6f4){logger['info'](_0x1c6a('0xa'),_0xbb5391,_0x1c6a('0xb'));logger[_0x1c6a('0xc')]('VtigerConfiguration,\x20%s,\x20%s,\x20%s',_0xbb5391,_0x1c6a('0xb'),JSON[_0x1c6a('0xd')](_0x75d6f4));if(_0x75d6f4[_0x1c6a('0xe')]){if(_0x75d6f4[_0x1c6a('0xe')]['code']===0x1f4){logger[_0x1c6a('0xe')](_0x1c6a('0xa'),_0xbb5391,_0x75d6f4['error'][_0x1c6a('0xf')]);return _0x4f8f4e(_0x75d6f4[_0x1c6a('0xe')][_0x1c6a('0xf')]);}logger[_0x1c6a('0xe')](_0x1c6a('0xa'),_0xbb5391,_0x75d6f4[_0x1c6a('0xe')][_0x1c6a('0xf')]);return _0x4f7375(_0x75d6f4[_0x1c6a('0xe')]['message']);}else{logger[_0x1c6a('0x10')]('VtigerConfiguration,\x20%s,\x20%s',_0xbb5391,'request\x20sent');_0x4f7375(_0x75d6f4[_0x1c6a('0x11')][_0x1c6a('0xf')]);}})[_0x1c6a('0x12')](function(_0x28143d){logger['error'](_0x1c6a('0xa'),_0xbb5391,_0x28143d);_0x4f8f4e(_0x28143d);});});}
\ No newline at end of file
+var _0x9bad=['client','http','then','info','request\x20sent','VtigerConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','VtigerConfiguration,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x5b3ce1,_0xedd65b){var _0x38b358=function(_0x154aa6){while(--_0x154aa6){_0x5b3ce1['push'](_0x5b3ce1['shift']());}};_0x38b358(++_0xedd65b);}(_0x9bad,0x1b6));var _0xd9ba=function(_0x18a556,_0x344f55){_0x18a556=_0x18a556-0x0;var _0x5aa894=_0x9bad[_0x18a556];return _0x5aa894;};'use strict';var _=require(_0xd9ba('0x0'));var util=require(_0xd9ba('0x1'));var moment=require(_0xd9ba('0x2'));var BPromise=require(_0xd9ba('0x3'));var rs=require(_0xd9ba('0x4'));var fs=require('fs');var Redis=require(_0xd9ba('0x5'));var db=require(_0xd9ba('0x6'))['db'];var utils=require(_0xd9ba('0x7'));var logger=require(_0xd9ba('0x8'))(_0xd9ba('0x9'));var config=require(_0xd9ba('0xa'));var jayson=require(_0xd9ba('0xb'));var client=jayson[_0xd9ba('0xc')][_0xd9ba('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x2f5c30,_0x2457b1,_0x4860f2){return new BPromise(function(_0x2f0d70,_0x2d99a7){return client['request'](_0x2f5c30,_0x4860f2)[_0xd9ba('0xe')](function(_0x580075){logger[_0xd9ba('0xf')]('VtigerConfiguration,\x20%s,\x20%s',_0x2457b1,_0xd9ba('0x10'));logger['debug'](_0xd9ba('0x11'),_0x2457b1,'request\x20sent',JSON[_0xd9ba('0x12')](_0x580075));if(_0x580075[_0xd9ba('0x13')]){if(_0x580075['error'][_0xd9ba('0x14')]===0x1f4){logger['error'](_0xd9ba('0x15'),_0x2457b1,_0x580075[_0xd9ba('0x13')][_0xd9ba('0x16')]);return _0x2d99a7(_0x580075[_0xd9ba('0x13')]['message']);}logger[_0xd9ba('0x13')](_0xd9ba('0x15'),_0x2457b1,_0x580075[_0xd9ba('0x13')]['message']);return _0x2f0d70(_0x580075[_0xd9ba('0x13')][_0xd9ba('0x16')]);}else{logger['info'](_0xd9ba('0x15'),_0x2457b1,_0xd9ba('0x10'));_0x2f0d70(_0x580075[_0xd9ba('0x17')][_0xd9ba('0x16')]);}})[_0xd9ba('0x18')](function(_0x248dcd){logger[_0xd9ba('0x13')](_0xd9ba('0x15'),_0x2457b1,_0x248dcd);_0x2d99a7(_0x248dcd);});});}
\ No newline at end of file
index c524cab..1c1a9d3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x945b=['put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./intVtigerField.controller','get','index','/:id','isAuthenticated','show','post','create'];(function(_0x436985,_0x2e7f0b){var _0x2a8d4d=function(_0x9aadd4){while(--_0x9aadd4){_0x436985['push'](_0x436985['shift']());}};_0x2a8d4d(++_0x2e7f0b);}(_0x945b,0x116));var _0xb945=function(_0x5c08ae,_0x504511){_0x5c08ae=_0x5c08ae-0x0;var _0x191f67=_0x945b[_0x5c08ae];return _0x191f67;};'use strict';var multer=require(_0xb945('0x0'));var util=require(_0xb945('0x1'));var path=require(_0xb945('0x2'));var timeout=require(_0xb945('0x3'));var express=require(_0xb945('0x4'));var router=express['Router']();var fs_extra=require(_0xb945('0x5'));var auth=require(_0xb945('0x6'));var interaction=require(_0xb945('0x7'));var config=require('../../config/environment');var controller=require(_0xb945('0x8'));router[_0xb945('0x9')]('/',auth['isAuthenticated'](),controller[_0xb945('0xa')]);router[_0xb945('0x9')](_0xb945('0xb'),auth[_0xb945('0xc')](),controller[_0xb945('0xd')]);router[_0xb945('0xe')]('/',auth['isAuthenticated'](),controller[_0xb945('0xf')]);router[_0xb945('0x10')]('/:id',auth[_0xb945('0xc')](),controller[_0xb945('0x11')]);router[_0xb945('0x12')](_0xb945('0xb'),auth[_0xb945('0xc')](),controller[_0xb945('0x13')]);module[_0xb945('0x14')]=router;
\ No newline at end of file
+var _0x4f8f=['path','connect-timeout','express','../../components/auth/service','../../components/interaction/service','../../config/environment','get','/:id','isAuthenticated','show','post','create','put','delete','destroy','exports','multer','util'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0x4f8f,0xfa));var _0xf4f8=function(_0x45f7c8,_0x4b2546){_0x45f7c8=_0x45f7c8-0x0;var _0x4846c1=_0x4f8f[_0x45f7c8];return _0x4846c1;};'use strict';var multer=require(_0xf4f8('0x0'));var util=require(_0xf4f8('0x1'));var path=require(_0xf4f8('0x2'));var timeout=require(_0xf4f8('0x3'));var express=require(_0xf4f8('0x4'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xf4f8('0x5'));var interaction=require(_0xf4f8('0x6'));var config=require(_0xf4f8('0x7'));var controller=require('./intVtigerField.controller');router[_0xf4f8('0x8')]('/',auth['isAuthenticated'](),controller['index']);router[_0xf4f8('0x8')](_0xf4f8('0x9'),auth[_0xf4f8('0xa')](),controller[_0xf4f8('0xb')]);router[_0xf4f8('0xc')]('/',auth[_0xf4f8('0xa')](),controller[_0xf4f8('0xd')]);router[_0xf4f8('0xe')]('/:id',auth['isAuthenticated'](),controller['update']);router[_0xf4f8('0xf')](_0xf4f8('0x9'),auth[_0xf4f8('0xa')](),controller[_0xf4f8('0x10')]);module[_0xf4f8('0x11')]=router;
\ No newline at end of file
index fd7d17b..fb10b39 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa42b=['exports','ENUM','customVariable','picklist','string','STRING','variable','BOOLEAN'];(function(_0x3f2ba2,_0x1490e6){var _0x27e878=function(_0x4ab2d6){while(--_0x4ab2d6){_0x3f2ba2['push'](_0x3f2ba2['shift']());}};_0x27e878(++_0x1490e6);}(_0xa42b,0x130));var _0xba42=function(_0x173a3a,_0x528f6c){_0x173a3a=_0x173a3a-0x0;var _0x5c8923=_0xa42b[_0x173a3a];return _0x5c8923;};'use strict';var Sequelize=require('sequelize');module[_0xba42('0x0')]={'type':{'type':Sequelize[_0xba42('0x1')]('string','variable',_0xba42('0x2'),'keyValue',_0xba42('0x3')),'defaultValue':_0xba42('0x4')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize[_0xba42('0x5')]},'keyType':{'type':Sequelize['ENUM']('string',_0xba42('0x6'),_0xba42('0x2'))},'keyContent':{'type':Sequelize[_0xba42('0x5')]},'idField':{'type':Sequelize[_0xba42('0x5')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize[_0xba42('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xb268=['keyValue','picklist','STRING','variable','sequelize','ENUM','string','customVariable'];(function(_0x5a2285,_0x3212d1){var _0x48f6ed=function(_0x322127){while(--_0x322127){_0x5a2285['push'](_0x5a2285['shift']());}};_0x48f6ed(++_0x3212d1);}(_0xb268,0x1bc));var _0x8b26=function(_0x156f2d,_0xf77c58){_0x156f2d=_0x156f2d-0x0;var _0x4a3142=_0xb268[_0x156f2d];return _0x4a3142;};'use strict';var Sequelize=require(_0x8b26('0x0'));module['exports']={'type':{'type':Sequelize[_0x8b26('0x1')](_0x8b26('0x2'),'variable',_0x8b26('0x3'),_0x8b26('0x4'),_0x8b26('0x5')),'defaultValue':_0x8b26('0x2')},'content':{'type':Sequelize[_0x8b26('0x6')]},'key':{'type':Sequelize[_0x8b26('0x6')]},'keyType':{'type':Sequelize[_0x8b26('0x1')]('string',_0x8b26('0x7'),_0x8b26('0x3'))},'keyContent':{'type':Sequelize[_0x8b26('0x6')]},'idField':{'type':Sequelize[_0x8b26('0x6')]},'nameField':{'type':Sequelize[_0x8b26('0x6')]},'customField':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x8b26('0x6')]}};
\ No newline at end of file
index 8efbdb1..7b3170a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2525=['../../mysqldb','sendStatus','status','end','json','offset','undefined','count','apply','save','update','then','destroy','error','stack','name','send','index','rawAttributes','fieldName','type','key','model','map','keys','query','intersection','attributes','hasOwnProperty','nolimit','limit','order','sort','pick','filters','filter','where','VIRTUAL','merge','options','VtigerField','includeAll','include','findAll','catch','show','params','fields','length','find','create','body','eml-format','rimraf','zip-dir','bluebird','mustache','path','sox','to-csv','ejs','lodash','squel','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util'];(function(_0x5c9307,_0x5b97e4){var _0x373e29=function(_0xefebbd){while(--_0xefebbd){_0x5c9307['push'](_0x5c9307['shift']());}};_0x373e29(++_0x5b97e4);}(_0x2525,0x1ea));var _0x5252=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x2525[_0x6c993a];return _0x27f547;};'use strict';var emlformat=require(_0x5252('0x0'));var rimraf=require(_0x5252('0x1'));var zipdir=require(_0x5252('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x5252('0x3'));var Mustache=require(_0x5252('0x4'));var util=require('util');var path=require(_0x5252('0x5'));var sox=require(_0x5252('0x6'));var csv=require(_0x5252('0x7'));var ejs=require(_0x5252('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x5252('0x9'));var squel=require(_0x5252('0xa'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x5252('0xb'));var Papa=require('papaparse');var Redis=require(_0x5252('0xc'));var authService=require(_0x5252('0xd'));var qs=require(_0x5252('0xe'));var as=require(_0x5252('0xf'));var hardwareService=require(_0x5252('0x10'));var logger=require('../../config/logger')(_0x5252('0x11'));var utils=require(_0x5252('0x12'));var config=require(_0x5252('0x13'));var licenseUtil=require(_0x5252('0x14'));var db=require(_0x5252('0x15'))['db'];function respondWithStatusCode(_0x5bf59e,_0x3ea92c){_0x3ea92c=_0x3ea92c||0xcc;return function(_0x4125bf){if(_0x4125bf){return _0x5bf59e[_0x5252('0x16')](_0x3ea92c);}return _0x5bf59e[_0x5252('0x17')](_0x3ea92c)[_0x5252('0x18')]();};}function respondWithResult(_0x31b8ef,_0x48fd9a){_0x48fd9a=_0x48fd9a||0xc8;return function(_0x4d8c82){if(_0x4d8c82){return _0x31b8ef['status'](_0x48fd9a)[_0x5252('0x19')](_0x4d8c82);}};}function respondWithFilteredResult(_0x480762,_0x507866){return function(_0x12f3a2){if(_0x12f3a2){var _0x21bfe5=typeof _0x507866[_0x5252('0x1a')]===_0x5252('0x1b')&&typeof _0x507866['limit']===_0x5252('0x1b');var _0x9bd3e5=_0x12f3a2['count'];var _0x1c586b=_0x21bfe5?0x0:_0x507866['offset'];var _0xf4d7ee=_0x21bfe5?_0x12f3a2[_0x5252('0x1c')]:_0x507866[_0x5252('0x1a')]+_0x507866['limit'];var _0x32a9cb;if(_0xf4d7ee>=_0x9bd3e5){_0xf4d7ee=_0x9bd3e5;_0x32a9cb=0xc8;}else{_0x32a9cb=0xce;}_0x480762[_0x5252('0x17')](_0x32a9cb);return _0x480762['set']('Content-Range',_0x1c586b+'-'+_0xf4d7ee+'/'+_0x9bd3e5)[_0x5252('0x19')](_0x12f3a2);}return null;};}function patchUpdates(_0x2f9848){return function(_0x1be447){try{jsonpatch[_0x5252('0x1d')](_0x1be447,_0x2f9848,!![]);}catch(_0x1a9ea7){return BPromise['reject'](_0x1a9ea7);}return _0x1be447[_0x5252('0x1e')]();};}function saveUpdates(_0x2c1d9c,_0x271bce){return function(_0x7566e3){if(_0x7566e3){return _0x7566e3[_0x5252('0x1f')](_0x2c1d9c)[_0x5252('0x20')](function(_0x49139b){return _0x49139b;});}return null;};}function removeEntity(_0x221b8e,_0x10b452){return function(_0x5498ee){if(_0x5498ee){return _0x5498ee[_0x5252('0x21')]()[_0x5252('0x20')](function(){_0x221b8e[_0x5252('0x17')](0xcc)[_0x5252('0x18')]();});}};}function handleEntityNotFound(_0x230ac2,_0x4ba4c3){return function(_0x59e50e){if(!_0x59e50e){_0x230ac2[_0x5252('0x16')](0x194);}return _0x59e50e;};}function handleError(_0x2ae255,_0x423eeb){_0x423eeb=_0x423eeb||0x1f4;return function(_0x25b2ba){logger[_0x5252('0x22')](_0x25b2ba[_0x5252('0x23')]);if(_0x25b2ba[_0x5252('0x24')]){delete _0x25b2ba[_0x5252('0x24')];}_0x2ae255[_0x5252('0x17')](_0x423eeb)[_0x5252('0x25')](_0x25b2ba);};}exports[_0x5252('0x26')]=function(_0x2e7923,_0x4edd60){var _0x57661f={},_0x151a43={},_0x4adb22={'count':0x0,'rows':[]};var _0x19ba8d=_['map'](db['VtigerField'][_0x5252('0x27')],function(_0x14403f){return{'name':_0x14403f[_0x5252('0x28')],'type':_0x14403f[_0x5252('0x29')][_0x5252('0x2a')]};});_0x151a43[_0x5252('0x2b')]=_[_0x5252('0x2c')](_0x19ba8d,'name');_0x151a43['query']=_[_0x5252('0x2d')](_0x2e7923['query']);_0x151a43['filters']=_['intersection'](_0x151a43['model'],_0x151a43[_0x5252('0x2e')]);_0x57661f['attributes']=_[_0x5252('0x2f')](_0x151a43[_0x5252('0x2b')],qs['fields'](_0x2e7923[_0x5252('0x2e')]['fields']));_0x57661f[_0x5252('0x30')]=_0x57661f[_0x5252('0x30')]['length']?_0x57661f['attributes']:_0x151a43[_0x5252('0x2b')];if(!_0x2e7923[_0x5252('0x2e')][_0x5252('0x31')](_0x5252('0x32'))){_0x57661f[_0x5252('0x33')]=qs['limit'](_0x2e7923[_0x5252('0x2e')][_0x5252('0x33')]);_0x57661f[_0x5252('0x1a')]=qs['offset'](_0x2e7923[_0x5252('0x2e')][_0x5252('0x1a')]);}_0x57661f[_0x5252('0x34')]=qs[_0x5252('0x35')](_0x2e7923[_0x5252('0x2e')][_0x5252('0x35')]);_0x57661f['where']=qs['filters'](_[_0x5252('0x36')](_0x2e7923[_0x5252('0x2e')],_0x151a43[_0x5252('0x37')]),_0x19ba8d);if(_0x2e7923[_0x5252('0x2e')][_0x5252('0x38')]){_0x57661f[_0x5252('0x39')]=_['merge'](_0x57661f[_0x5252('0x39')],{'$or':_['map'](_0x19ba8d,function(_0x2c9524){if(_0x2c9524[_0x5252('0x29')]!==_0x5252('0x3a')){var _0x3f1a55={};_0x3f1a55[_0x2c9524[_0x5252('0x24')]]={'$like':'%'+_0x2e7923['query']['filter']+'%'};return _0x3f1a55;}})});}_0x57661f=_[_0x5252('0x3b')]({},_0x57661f,_0x2e7923[_0x5252('0x3c')]);var _0x561e36={'where':_0x57661f[_0x5252('0x39')]};return db[_0x5252('0x3d')]['count'](_0x561e36)[_0x5252('0x20')](function(_0x1c855d){_0x4adb22[_0x5252('0x1c')]=_0x1c855d;if(_0x2e7923['query'][_0x5252('0x3e')]){_0x57661f[_0x5252('0x3f')]=[{'all':!![]}];}return db[_0x5252('0x3d')][_0x5252('0x40')](_0x57661f);})[_0x5252('0x20')](function(_0x3b154b){_0x4adb22['rows']=_0x3b154b;return _0x4adb22;})['then'](respondWithFilteredResult(_0x4edd60,_0x57661f))[_0x5252('0x41')](handleError(_0x4edd60,null));};exports[_0x5252('0x42')]=function(_0x4e0fb6,_0x24c275){var _0xb50e19={'raw':!![],'where':{'id':_0x4e0fb6[_0x5252('0x43')]['id']}},_0x4e1c27={};_0x4e1c27[_0x5252('0x2b')]=_[_0x5252('0x2d')](db[_0x5252('0x3d')][_0x5252('0x27')]);_0x4e1c27['query']=_['keys'](_0x4e0fb6['query']);_0x4e1c27[_0x5252('0x37')]=_[_0x5252('0x2f')](_0x4e1c27['model'],_0x4e1c27[_0x5252('0x2e')]);_0xb50e19[_0x5252('0x30')]=_[_0x5252('0x2f')](_0x4e1c27[_0x5252('0x2b')],qs[_0x5252('0x44')](_0x4e0fb6[_0x5252('0x2e')][_0x5252('0x44')]));_0xb50e19[_0x5252('0x30')]=_0xb50e19[_0x5252('0x30')][_0x5252('0x45')]?_0xb50e19[_0x5252('0x30')]:_0x4e1c27['model'];if(_0x4e0fb6[_0x5252('0x2e')][_0x5252('0x3e')]){_0xb50e19['include']=[{'all':!![]}];}_0xb50e19=_[_0x5252('0x3b')]({},_0xb50e19,_0x4e0fb6[_0x5252('0x3c')]);return db['VtigerField'][_0x5252('0x46')](_0xb50e19)[_0x5252('0x20')](handleEntityNotFound(_0x24c275,null))[_0x5252('0x20')](respondWithResult(_0x24c275,null))['catch'](handleError(_0x24c275,null));};exports[_0x5252('0x47')]=function(_0xe219f,_0x5bcf72){return db[_0x5252('0x3d')][_0x5252('0x47')](_0xe219f[_0x5252('0x48')],{})['then'](respondWithResult(_0x5bcf72,0xc9))['catch'](handleError(_0x5bcf72,null));};exports['update']=function(_0x1ad14f,_0xfb7711){if(_0x1ad14f['body']['id']){delete _0x1ad14f[_0x5252('0x48')]['id'];}return db['VtigerField'][_0x5252('0x46')]({'where':{'id':_0x1ad14f[_0x5252('0x43')]['id']}})[_0x5252('0x20')](handleEntityNotFound(_0xfb7711,null))['then'](saveUpdates(_0x1ad14f[_0x5252('0x48')],null))[_0x5252('0x20')](respondWithResult(_0xfb7711,null))[_0x5252('0x41')](handleError(_0xfb7711,null));};exports['destroy']=function(_0x484a16,_0x53607c){return db['VtigerField']['find']({'where':{'id':_0x484a16[_0x5252('0x43')]['id']}})[_0x5252('0x20')](handleEntityNotFound(_0x53607c,null))[_0x5252('0x20')](removeEntity(_0x53607c,null))['catch'](handleError(_0x53607c,null));};
\ No newline at end of file
+var _0xa635=['then','destroy','end','error','name','send','index','VtigerField','fieldName','key','model','map','query','filters','attributes','intersection','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','keys','rawAttributes','find','create','body','update','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','json','limit','undefined','count','offset','status','set','save'];(function(_0x5d8445,_0x41d87c){var _0x510fa1=function(_0x1b0936){while(--_0x1b0936){_0x5d8445['push'](_0x5d8445['shift']());}};_0x510fa1(++_0x41d87c);}(_0xa635,0x19a));var _0x5a63=function(_0x1c7543,_0x11328a){_0x1c7543=_0x1c7543-0x0;var _0x3d90d8=_0xa635[_0x1c7543];return _0x3d90d8;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x5a63('0x0'));var rp=require(_0x5a63('0x1'));var moment=require(_0x5a63('0x2'));var BPromise=require(_0x5a63('0x3'));var Mustache=require(_0x5a63('0x4'));var util=require('util');var path=require(_0x5a63('0x5'));var sox=require(_0x5a63('0x6'));var csv=require(_0x5a63('0x7'));var ejs=require(_0x5a63('0x8'));var fs=require('fs');var fs_extra=require(_0x5a63('0x9'));var _=require(_0x5a63('0xa'));var squel=require(_0x5a63('0xb'));var crypto=require(_0x5a63('0xc'));var jsforce=require(_0x5a63('0xd'));var deskjs=require(_0x5a63('0xe'));var toCsv=require(_0x5a63('0x7'));var querystring=require(_0x5a63('0xf'));var Papa=require('papaparse');var Redis=require(_0x5a63('0x10'));var authService=require(_0x5a63('0x11'));var qs=require(_0x5a63('0x12'));var as=require(_0x5a63('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x5a63('0x14'))(_0x5a63('0x15'));var utils=require(_0x5a63('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x5a63('0x17'));var db=require(_0x5a63('0x18'))['db'];function respondWithStatusCode(_0x570ba1,_0x4e2aab){_0x4e2aab=_0x4e2aab||0xcc;return function(_0x24ebd0){if(_0x24ebd0){return _0x570ba1[_0x5a63('0x19')](_0x4e2aab);}return _0x570ba1['status'](_0x4e2aab)['end']();};}function respondWithResult(_0x2862e8,_0x16d6a9){_0x16d6a9=_0x16d6a9||0xc8;return function(_0x26c45e){if(_0x26c45e){return _0x2862e8['status'](_0x16d6a9)[_0x5a63('0x1a')](_0x26c45e);}};}function respondWithFilteredResult(_0x13feda,_0x1403c8){return function(_0x2eb272){if(_0x2eb272){var _0x4b3412=typeof _0x1403c8['offset']==='undefined'&&typeof _0x1403c8[_0x5a63('0x1b')]===_0x5a63('0x1c');var _0x511428=_0x2eb272[_0x5a63('0x1d')];var _0x134a0f=_0x4b3412?0x0:_0x1403c8[_0x5a63('0x1e')];var _0x218414=_0x4b3412?_0x2eb272[_0x5a63('0x1d')]:_0x1403c8[_0x5a63('0x1e')]+_0x1403c8[_0x5a63('0x1b')];var _0x1087c0;if(_0x218414>=_0x511428){_0x218414=_0x511428;_0x1087c0=0xc8;}else{_0x1087c0=0xce;}_0x13feda[_0x5a63('0x1f')](_0x1087c0);return _0x13feda[_0x5a63('0x20')]('Content-Range',_0x134a0f+'-'+_0x218414+'/'+_0x511428)[_0x5a63('0x1a')](_0x2eb272);}return null;};}function patchUpdates(_0x236442){return function(_0x14880c){try{jsonpatch['apply'](_0x14880c,_0x236442,!![]);}catch(_0x45572a){return BPromise['reject'](_0x45572a);}return _0x14880c[_0x5a63('0x21')]();};}function saveUpdates(_0xe89919,_0x16e21f){return function(_0x883d4f){if(_0x883d4f){return _0x883d4f['update'](_0xe89919)[_0x5a63('0x22')](function(_0x45de0d){return _0x45de0d;});}return null;};}function removeEntity(_0x4a58e2,_0x225ac6){return function(_0x158b0a){if(_0x158b0a){return _0x158b0a[_0x5a63('0x23')]()[_0x5a63('0x22')](function(){_0x4a58e2['status'](0xcc)[_0x5a63('0x24')]();});}};}function handleEntityNotFound(_0x5e8213,_0x40fae3){return function(_0x11fbef){if(!_0x11fbef){_0x5e8213[_0x5a63('0x19')](0x194);}return _0x11fbef;};}function handleError(_0xedda67,_0x4e1add){_0x4e1add=_0x4e1add||0x1f4;return function(_0x2fb75a){logger[_0x5a63('0x25')](_0x2fb75a['stack']);if(_0x2fb75a[_0x5a63('0x26')]){delete _0x2fb75a[_0x5a63('0x26')];}_0xedda67[_0x5a63('0x1f')](_0x4e1add)[_0x5a63('0x27')](_0x2fb75a);};}exports[_0x5a63('0x28')]=function(_0x10f575,_0x541848){var _0x30a7ed={},_0x144e52={},_0x83ddec={'count':0x0,'rows':[]};var _0x371c68=_['map'](db[_0x5a63('0x29')]['rawAttributes'],function(_0x32362e){return{'name':_0x32362e[_0x5a63('0x2a')],'type':_0x32362e['type'][_0x5a63('0x2b')]};});_0x144e52[_0x5a63('0x2c')]=_[_0x5a63('0x2d')](_0x371c68,'name');_0x144e52[_0x5a63('0x2e')]=_['keys'](_0x10f575[_0x5a63('0x2e')]);_0x144e52[_0x5a63('0x2f')]=_['intersection'](_0x144e52[_0x5a63('0x2c')],_0x144e52[_0x5a63('0x2e')]);_0x30a7ed[_0x5a63('0x30')]=_[_0x5a63('0x31')](_0x144e52[_0x5a63('0x2c')],qs[_0x5a63('0x32')](_0x10f575[_0x5a63('0x2e')][_0x5a63('0x32')]));_0x30a7ed[_0x5a63('0x30')]=_0x30a7ed['attributes'][_0x5a63('0x33')]?_0x30a7ed[_0x5a63('0x30')]:_0x144e52[_0x5a63('0x2c')];if(!_0x10f575[_0x5a63('0x2e')][_0x5a63('0x34')]('nolimit')){_0x30a7ed['limit']=qs[_0x5a63('0x1b')](_0x10f575['query']['limit']);_0x30a7ed[_0x5a63('0x1e')]=qs[_0x5a63('0x1e')](_0x10f575[_0x5a63('0x2e')]['offset']);}_0x30a7ed[_0x5a63('0x35')]=qs[_0x5a63('0x36')](_0x10f575[_0x5a63('0x2e')][_0x5a63('0x36')]);_0x30a7ed[_0x5a63('0x37')]=qs[_0x5a63('0x2f')](_[_0x5a63('0x38')](_0x10f575[_0x5a63('0x2e')],_0x144e52['filters']),_0x371c68);if(_0x10f575[_0x5a63('0x2e')][_0x5a63('0x39')]){_0x30a7ed['where']=_[_0x5a63('0x3a')](_0x30a7ed[_0x5a63('0x37')],{'$or':_[_0x5a63('0x2d')](_0x371c68,function(_0x37cdae){if(_0x37cdae[_0x5a63('0x3b')]!==_0x5a63('0x3c')){var _0x57a239={};_0x57a239[_0x37cdae[_0x5a63('0x26')]]={'$like':'%'+_0x10f575[_0x5a63('0x2e')][_0x5a63('0x39')]+'%'};return _0x57a239;}})});}_0x30a7ed=_['merge']({},_0x30a7ed,_0x10f575[_0x5a63('0x3d')]);var _0x2cf9c4={'where':_0x30a7ed[_0x5a63('0x37')]};return db['VtigerField']['count'](_0x2cf9c4)[_0x5a63('0x22')](function(_0x49976e){_0x83ddec['count']=_0x49976e;if(_0x10f575['query'][_0x5a63('0x3e')]){_0x30a7ed[_0x5a63('0x3f')]=[{'all':!![]}];}return db[_0x5a63('0x29')][_0x5a63('0x40')](_0x30a7ed);})[_0x5a63('0x22')](function(_0x401863){_0x83ddec[_0x5a63('0x41')]=_0x401863;return _0x83ddec;})[_0x5a63('0x22')](respondWithFilteredResult(_0x541848,_0x30a7ed))[_0x5a63('0x42')](handleError(_0x541848,null));};exports['show']=function(_0x4a89b9,_0x4ea44b){var _0x2a0bb9={'raw':!![],'where':{'id':_0x4a89b9[_0x5a63('0x43')]['id']}},_0x1380ee={};_0x1380ee[_0x5a63('0x2c')]=_[_0x5a63('0x44')](db[_0x5a63('0x29')][_0x5a63('0x45')]);_0x1380ee[_0x5a63('0x2e')]=_[_0x5a63('0x44')](_0x4a89b9[_0x5a63('0x2e')]);_0x1380ee[_0x5a63('0x2f')]=_[_0x5a63('0x31')](_0x1380ee[_0x5a63('0x2c')],_0x1380ee[_0x5a63('0x2e')]);_0x2a0bb9['attributes']=_[_0x5a63('0x31')](_0x1380ee['model'],qs[_0x5a63('0x32')](_0x4a89b9['query']['fields']));_0x2a0bb9[_0x5a63('0x30')]=_0x2a0bb9[_0x5a63('0x30')][_0x5a63('0x33')]?_0x2a0bb9[_0x5a63('0x30')]:_0x1380ee[_0x5a63('0x2c')];if(_0x4a89b9['query'][_0x5a63('0x3e')]){_0x2a0bb9[_0x5a63('0x3f')]=[{'all':!![]}];}_0x2a0bb9=_['merge']({},_0x2a0bb9,_0x4a89b9[_0x5a63('0x3d')]);return db[_0x5a63('0x29')][_0x5a63('0x46')](_0x2a0bb9)[_0x5a63('0x22')](handleEntityNotFound(_0x4ea44b,null))[_0x5a63('0x22')](respondWithResult(_0x4ea44b,null))[_0x5a63('0x42')](handleError(_0x4ea44b,null));};exports[_0x5a63('0x47')]=function(_0x226e55,_0x2a5265){return db[_0x5a63('0x29')]['create'](_0x226e55[_0x5a63('0x48')],{})[_0x5a63('0x22')](respondWithResult(_0x2a5265,0xc9))[_0x5a63('0x42')](handleError(_0x2a5265,null));};exports[_0x5a63('0x49')]=function(_0x39c87d,_0x45e324){if(_0x39c87d[_0x5a63('0x48')]['id']){delete _0x39c87d[_0x5a63('0x48')]['id'];}return db[_0x5a63('0x29')][_0x5a63('0x46')]({'where':{'id':_0x39c87d[_0x5a63('0x43')]['id']}})[_0x5a63('0x22')](handleEntityNotFound(_0x45e324,null))['then'](saveUpdates(_0x39c87d['body'],null))[_0x5a63('0x22')](respondWithResult(_0x45e324,null))[_0x5a63('0x42')](handleError(_0x45e324,null));};exports[_0x5a63('0x23')]=function(_0x5ddd54,_0x41e06b){return db[_0x5a63('0x29')][_0x5a63('0x46')]({'where':{'id':_0x5ddd54[_0x5a63('0x43')]['id']}})[_0x5a63('0x22')](handleEntityNotFound(_0x41e06b,null))['then'](removeEntity(_0x41e06b,null))['catch'](handleError(_0x41e06b,null));};
\ No newline at end of file
index c7ec356..9660326 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x037e=['request-promise','rimraf','../../config/environment','./intVtigerField.attributes','exports','define','VtigerField','vtiger_unique_index','idField','FieldId','lodash','util','../../config/logger','moment'];(function(_0x26707c,_0x1ee0cc){var _0x11e7aa=function(_0x2354b3){while(--_0x2354b3){_0x26707c['push'](_0x26707c['shift']());}};_0x11e7aa(++_0x1ee0cc);}(_0x037e,0x1ca));var _0xe037=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x037e[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0xe037('0x0'));var util=require(_0xe037('0x1'));var logger=require(_0xe037('0x2'))('api');var moment=require(_0xe037('0x3'));var BPromise=require('bluebird');var rp=require(_0xe037('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe037('0x5'));var config=require(_0xe037('0x6'));var attributes=require(_0xe037('0x7'));module[_0xe037('0x8')]=function(_0x4b8444,_0x5be704){return _0x4b8444[_0xe037('0x9')](_0xe037('0xa'),attributes,{'tableName':'int_vtiger_fields','paranoid':![],'indexes':[{'name':_0xe037('0xb'),'fields':[_0xe037('0xc'),_0xe037('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x5655=['../../config/environment','./intVtigerField.attributes','exports','VtigerField','int_vtiger_fields','vtiger_unique_index','FieldId','lodash','util','../../config/logger','api','moment','bluebird','rimraf'];(function(_0x32dd80,_0x4b94cb){var _0x1c7198=function(_0x450916){while(--_0x450916){_0x32dd80['push'](_0x32dd80['shift']());}};_0x1c7198(++_0x4b94cb);}(_0x5655,0xd9));var _0x5565=function(_0x12d0d2,_0x2ffc6d){_0x12d0d2=_0x12d0d2-0x0;var _0x4aec05=_0x5655[_0x12d0d2];return _0x4aec05;};'use strict';var _=require(_0x5565('0x0'));var util=require(_0x5565('0x1'));var logger=require(_0x5565('0x2'))(_0x5565('0x3'));var moment=require(_0x5565('0x4'));var BPromise=require(_0x5565('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x5565('0x6'));var config=require(_0x5565('0x7'));var attributes=require(_0x5565('0x8'));module[_0x5565('0x9')]=function(_0x5f4c52,_0x5d8cf2){return _0x5f4c52['define'](_0x5565('0xa'),attributes,{'tableName':_0x5565('0xb'),'paranoid':![],'indexes':[{'name':_0x5565('0xc'),'fields':['idField',_0x5565('0xd')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index 998ed81..1ccae0e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x70f8=['result','catch','moment','bluebird','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','http','request','then','VtigerField,\x20%s,\x20%s','VtigerField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','info'];(function(_0x53ccf2,_0x13cb67){var _0x5a2964=function(_0x3b0514){while(--_0x3b0514){_0x53ccf2['push'](_0x53ccf2['shift']());}};_0x5a2964(++_0x13cb67);}(_0x70f8,0x6b));var _0x870f=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x70f8[_0x5b644e];return _0x49c6bf;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x870f('0x0'));var BPromise=require(_0x870f('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x870f('0x2'));var db=require(_0x870f('0x3'))['db'];var utils=require(_0x870f('0x4'));var logger=require('../../config/logger')(_0x870f('0x5'));var config=require(_0x870f('0x6'));var jayson=require(_0x870f('0x7'));var client=jayson['client'][_0x870f('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5d698f,_0x199d79,_0x1922b1){return new BPromise(function(_0x4c68fc,_0x311d74){return client[_0x870f('0x9')](_0x5d698f,_0x1922b1)[_0x870f('0xa')](function(_0x3cf0bf){logger['info'](_0x870f('0xb'),_0x199d79,'request\x20sent');logger['debug'](_0x870f('0xc'),_0x199d79,_0x870f('0xd'),JSON[_0x870f('0xe')](_0x3cf0bf));if(_0x3cf0bf[_0x870f('0xf')]){if(_0x3cf0bf[_0x870f('0xf')][_0x870f('0x10')]===0x1f4){logger[_0x870f('0xf')](_0x870f('0xb'),_0x199d79,_0x3cf0bf[_0x870f('0xf')][_0x870f('0x11')]);return _0x311d74(_0x3cf0bf[_0x870f('0xf')][_0x870f('0x11')]);}logger[_0x870f('0xf')](_0x870f('0xb'),_0x199d79,_0x3cf0bf['error'][_0x870f('0x11')]);return _0x4c68fc(_0x3cf0bf[_0x870f('0xf')][_0x870f('0x11')]);}else{logger[_0x870f('0x12')](_0x870f('0xb'),_0x199d79,_0x870f('0xd'));_0x4c68fc(_0x3cf0bf[_0x870f('0x13')][_0x870f('0x11')]);}})[_0x870f('0x14')](function(_0x484676){logger[_0x870f('0xf')](_0x870f('0xb'),_0x199d79,_0x484676);_0x311d74(_0x484676);});});}
\ No newline at end of file
+var _0xc11a=['client','http','then','info','VtigerField,\x20%s,\x20%s','VtigerField,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','util','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise'];(function(_0x56c2d5,_0x3908fe){var _0x2e2133=function(_0x5d94e9){while(--_0x5d94e9){_0x56c2d5['push'](_0x56c2d5['shift']());}};_0x2e2133(++_0x3908fe);}(_0xc11a,0x1b1));var _0xac11=function(_0x21f931,_0x598b2d){_0x21f931=_0x21f931-0x0;var _0x3f083c=_0xc11a[_0x21f931];return _0x3f083c;};'use strict';var _=require('lodash');var util=require(_0xac11('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xac11('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xac11('0x2'))['db'];var utils=require(_0xac11('0x3'));var logger=require(_0xac11('0x4'))('rpc');var config=require(_0xac11('0x5'));var jayson=require(_0xac11('0x6'));var client=jayson[_0xac11('0x7')][_0xac11('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x31bee4,_0x5cf97d,_0x3adff5){return new BPromise(function(_0x46c151,_0x53a0db){return client['request'](_0x31bee4,_0x3adff5)[_0xac11('0x9')](function(_0x44a7ba){logger[_0xac11('0xa')](_0xac11('0xb'),_0x5cf97d,'request\x20sent');logger['debug'](_0xac11('0xc'),_0x5cf97d,_0xac11('0xd'),JSON[_0xac11('0xe')](_0x44a7ba));if(_0x44a7ba[_0xac11('0xf')]){if(_0x44a7ba[_0xac11('0xf')][_0xac11('0x10')]===0x1f4){logger[_0xac11('0xf')](_0xac11('0xb'),_0x5cf97d,_0x44a7ba[_0xac11('0xf')]['message']);return _0x53a0db(_0x44a7ba['error']['message']);}logger['error'](_0xac11('0xb'),_0x5cf97d,_0x44a7ba[_0xac11('0xf')]['message']);return _0x46c151(_0x44a7ba[_0xac11('0xf')][_0xac11('0x11')]);}else{logger[_0xac11('0xa')](_0xac11('0xb'),_0x5cf97d,_0xac11('0xd'));_0x46c151(_0x44a7ba[_0xac11('0x12')][_0xac11('0x11')]);}})[_0xac11('0x13')](function(_0xc62482){logger['error']('VtigerField,\x20%s,\x20%s',_0x5cf97d,_0xc62482);_0x53a0db(_0xc62482);});});}
\ No newline at end of file
index db8e636..43086cf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe432=['/:id/fields','post','create','addConfiguration','put','/:id','update','delete','destroy','exports','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZendeskAccount.controller','get','isAuthenticated','index','/:id/configurations','getConfigurations'];(function(_0x281b6c,_0x54a8ac){var _0x5e28aa=function(_0x9178f2){while(--_0x9178f2){_0x281b6c['push'](_0x281b6c['shift']());}};_0x5e28aa(++_0x54a8ac);}(_0xe432,0x9a));var _0x2e43=function(_0x1c1aec,_0x1a6131){_0x1c1aec=_0x1c1aec-0x0;var _0x2e4a37=_0xe432[_0x1c1aec];return _0x2e4a37;};'use strict';var multer=require('multer');var util=require(_0x2e43('0x0'));var path=require(_0x2e43('0x1'));var timeout=require(_0x2e43('0x2'));var express=require('express');var router=express[_0x2e43('0x3')]();var fs_extra=require(_0x2e43('0x4'));var auth=require(_0x2e43('0x5'));var interaction=require(_0x2e43('0x6'));var config=require(_0x2e43('0x7'));var controller=require(_0x2e43('0x8'));router[_0x2e43('0x9')]('/',auth[_0x2e43('0xa')](),controller[_0x2e43('0xb')]);router[_0x2e43('0x9')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0x2e43('0x9')](_0x2e43('0xc'),auth[_0x2e43('0xa')](),controller[_0x2e43('0xd')]);router[_0x2e43('0x9')](_0x2e43('0xe'),auth[_0x2e43('0xa')](),controller['getFields']);router[_0x2e43('0xf')]('/',auth['isAuthenticated'](),controller[_0x2e43('0x10')]);router[_0x2e43('0xf')](_0x2e43('0xc'),auth['isAuthenticated'](),controller[_0x2e43('0x11')]);router[_0x2e43('0x12')](_0x2e43('0x13'),auth[_0x2e43('0xa')](),controller[_0x2e43('0x14')]);router[_0x2e43('0x15')](_0x2e43('0x13'),auth[_0x2e43('0xa')](),controller[_0x2e43('0x16')]);module[_0x2e43('0x17')]=router;
\ No newline at end of file
+var _0xc0a4=['show','/:id/configurations','getFields','post','create','addConfiguration','put','destroy','exports','multer','util','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZendeskAccount.controller','get','isAuthenticated','index'];(function(_0xca9b1c,_0xdd3855){var _0xf76968=function(_0xf34ec0){while(--_0xf34ec0){_0xca9b1c['push'](_0xca9b1c['shift']());}};_0xf76968(++_0xdd3855);}(_0xc0a4,0xc6));var _0x4c0a=function(_0x4ea71e,_0x2c0956){_0x4ea71e=_0x4ea71e-0x0;var _0x47d9ff=_0xc0a4[_0x4ea71e];return _0x47d9ff;};'use strict';var multer=require(_0x4c0a('0x0'));var util=require(_0x4c0a('0x1'));var path=require('path');var timeout=require(_0x4c0a('0x2'));var express=require('express');var router=express[_0x4c0a('0x3')]();var fs_extra=require(_0x4c0a('0x4'));var auth=require(_0x4c0a('0x5'));var interaction=require(_0x4c0a('0x6'));var config=require(_0x4c0a('0x7'));var controller=require(_0x4c0a('0x8'));router[_0x4c0a('0x9')]('/',auth[_0x4c0a('0xa')](),controller[_0x4c0a('0xb')]);router[_0x4c0a('0x9')]('/:id',auth[_0x4c0a('0xa')](),controller[_0x4c0a('0xc')]);router['get'](_0x4c0a('0xd'),auth[_0x4c0a('0xa')](),controller['getConfigurations']);router[_0x4c0a('0x9')]('/:id/fields',auth[_0x4c0a('0xa')](),controller[_0x4c0a('0xe')]);router[_0x4c0a('0xf')]('/',auth[_0x4c0a('0xa')](),controller[_0x4c0a('0x10')]);router[_0x4c0a('0xf')](_0x4c0a('0xd'),auth['isAuthenticated'](),controller[_0x4c0a('0x11')]);router[_0x4c0a('0x12')]('/:id',auth[_0x4c0a('0xa')](),controller['update']);router['delete']('/:id',auth[_0x4c0a('0xa')](),controller[_0x4c0a('0x13')]);module[_0x4c0a('0x14')]=router;
\ No newline at end of file
index 7f23f29..ac463c3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7524=['username','ENUM','password','token','integrationTab','newTab','exports','STRING'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x7524,0xce));var _0x4752=function(_0x3fe397,_0x309778){_0x3fe397=_0x3fe397-0x0;var _0x366b33=_0x7524[_0x3fe397];return _0x366b33;};'use strict';var Sequelize=require('sequelize');module[_0x4752('0x0')]={'name':{'type':Sequelize[_0x4752('0x1')]},'description':{'type':Sequelize['STRING']},'username':{'type':Sequelize[_0x4752('0x1')],'unique':_0x4752('0x2')},'password':{'type':Sequelize['STRING']},'token':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize[_0x4752('0x1')],'unique':'remoteUri'},'authType':{'type':Sequelize[_0x4752('0x3')](_0x4752('0x4'),_0x4752('0x5')),'defaultValue':_0x4752('0x4')},'serverUrl':{'type':Sequelize[_0x4752('0x1')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x4752('0x6'),_0x4752('0x7')),'defaultValue':'integrationTab'}};
\ No newline at end of file
+var _0x8aad=['integrationTab','newTab','sequelize','exports','STRING','username','remoteUri','token','password'];(function(_0x207fb9,_0x44038b){var _0x564985=function(_0xc8a74e){while(--_0xc8a74e){_0x207fb9['push'](_0x207fb9['shift']());}};_0x564985(++_0x44038b);}(_0x8aad,0x146));var _0xd8aa=function(_0x1919f3,_0x318a4e){_0x1919f3=_0x1919f3-0x0;var _0x2c4234=_0x8aad[_0x1919f3];return _0x2c4234;};'use strict';var Sequelize=require(_0xd8aa('0x0'));module[_0xd8aa('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xd8aa('0x2')]},'username':{'type':Sequelize['STRING'],'unique':_0xd8aa('0x3')},'password':{'type':Sequelize[_0xd8aa('0x2')]},'token':{'type':Sequelize['STRING']},'remoteUri':{'type':Sequelize['STRING'],'unique':_0xd8aa('0x4')},'authType':{'type':Sequelize['ENUM']('password',_0xd8aa('0x5')),'defaultValue':_0xd8aa('0x6')},'serverUrl':{'type':Sequelize[_0xd8aa('0x2')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0xd8aa('0x7'),_0xd8aa('0x8')),'defaultValue':_0xd8aa('0x7')}};
\ No newline at end of file
index 1c9c9ca..8c4d5b4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe605=['password','token','authType','remoteUri','slice','GET','format','headers','Basic\x20%s','toString','base64','Sequelize','Unknown\x20authentication\x20type','subject','description','assignee','remove','ticket_fields','includes','position','title','system_field_options','custom_field_options','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','Wrong\x20credentials','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../components/integrations/configuration','sendStatus','status','undefined','limit','offset','count','set','Content-Range','json','apply','reject','update','then','destroy','end','error','name','send','index','map','ZendeskAccount','fieldName','key','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','includeAll','findAll','rows','catch','show','params','length','include','options','find','create','body','getConfigurations','findOne','ZendeskConfiguration','rawAttributes','addConfiguration','Subjects','channel','Descriptions','getDescriptions','ZendeskField','getFields','username'];(function(_0x32b30c,_0x4c5567){var _0x59bc79=function(_0x5ef43d){while(--_0x5ef43d){_0x32b30c['push'](_0x32b30c['shift']());}};_0x59bc79(++_0x4c5567);}(_0xe605,0x92));var _0x5e60=function(_0x1d6d59,_0x4aa77d){_0x1d6d59=_0x1d6d59-0x0;var _0x358617=_0xe605[_0x1d6d59];return _0x358617;};'use strict';var emlformat=require(_0x5e60('0x0'));var rimraf=require(_0x5e60('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x5e60('0x2'));var rp=require(_0x5e60('0x3'));var moment=require(_0x5e60('0x4'));var BPromise=require(_0x5e60('0x5'));var Mustache=require(_0x5e60('0x6'));var util=require(_0x5e60('0x7'));var path=require(_0x5e60('0x8'));var sox=require(_0x5e60('0x9'));var csv=require(_0x5e60('0xa'));var ejs=require(_0x5e60('0xb'));var fs=require('fs');var fs_extra=require(_0x5e60('0xc'));var _=require(_0x5e60('0xd'));var squel=require('squel');var crypto=require(_0x5e60('0xe'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x5e60('0xf'));var Papa=require(_0x5e60('0x10'));var Redis=require(_0x5e60('0x11'));var authService=require(_0x5e60('0x12'));var qs=require(_0x5e60('0x13'));var as=require(_0x5e60('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x5e60('0x15'))('api');var utils=require(_0x5e60('0x16'));var config=require(_0x5e60('0x17'));var licenseUtil=require(_0x5e60('0x18'));var db=require('../../mysqldb')['db'];var integrations=require(_0x5e60('0x19'));function respondWithStatusCode(_0x178782,_0x1f4e14){_0x1f4e14=_0x1f4e14||0xcc;return function(_0xe039de){if(_0xe039de){return _0x178782[_0x5e60('0x1a')](_0x1f4e14);}return _0x178782[_0x5e60('0x1b')](_0x1f4e14)['end']();};}function respondWithResult(_0x209adb,_0x45304f){_0x45304f=_0x45304f||0xc8;return function(_0x21e3c8){if(_0x21e3c8){return _0x209adb[_0x5e60('0x1b')](_0x45304f)['json'](_0x21e3c8);}};}function respondWithFilteredResult(_0x20af5f,_0x529ffe){return function(_0x1ffd77){if(_0x1ffd77){var _0x3bc7d8=typeof _0x529ffe['offset']===_0x5e60('0x1c')&&typeof _0x529ffe[_0x5e60('0x1d')]===_0x5e60('0x1c');var _0x43045a=_0x1ffd77['count'];var _0xdd0a71=_0x3bc7d8?0x0:_0x529ffe[_0x5e60('0x1e')];var _0x52cc15=_0x3bc7d8?_0x1ffd77[_0x5e60('0x1f')]:_0x529ffe[_0x5e60('0x1e')]+_0x529ffe[_0x5e60('0x1d')];var _0x311fef;if(_0x52cc15>=_0x43045a){_0x52cc15=_0x43045a;_0x311fef=0xc8;}else{_0x311fef=0xce;}_0x20af5f[_0x5e60('0x1b')](_0x311fef);return _0x20af5f[_0x5e60('0x20')](_0x5e60('0x21'),_0xdd0a71+'-'+_0x52cc15+'/'+_0x43045a)[_0x5e60('0x22')](_0x1ffd77);}return null;};}function patchUpdates(_0x3282e4){return function(_0x45f1a6){try{jsonpatch[_0x5e60('0x23')](_0x45f1a6,_0x3282e4,!![]);}catch(_0x578437){return BPromise[_0x5e60('0x24')](_0x578437);}return _0x45f1a6['save']();};}function saveUpdates(_0x376069,_0x1a44e5){return function(_0x2b0bae){if(_0x2b0bae){return _0x2b0bae[_0x5e60('0x25')](_0x376069)[_0x5e60('0x26')](function(_0x2a499e){return _0x2a499e;});}return null;};}function removeEntity(_0x2636f1,_0x5d2c03){return function(_0x18d527){if(_0x18d527){return _0x18d527[_0x5e60('0x27')]()[_0x5e60('0x26')](function(){_0x2636f1['status'](0xcc)[_0x5e60('0x28')]();});}};}function handleEntityNotFound(_0x56e3a5,_0x2d8aac){return function(_0x153459){if(!_0x153459){_0x56e3a5['sendStatus'](0x194);}return _0x153459;};}function handleError(_0x3bedea,_0x5712f7){_0x5712f7=_0x5712f7||0x1f4;return function(_0x23d187){logger[_0x5e60('0x29')](_0x23d187['stack']);if(_0x23d187[_0x5e60('0x2a')]){delete _0x23d187[_0x5e60('0x2a')];}_0x3bedea['status'](_0x5712f7)[_0x5e60('0x2b')](_0x23d187);};}exports[_0x5e60('0x2c')]=function(_0x52c97c,_0x5431a8){var _0x52f668={},_0xf25956={},_0x235cc7={'count':0x0,'rows':[]};var _0x2e8e9e=_[_0x5e60('0x2d')](db[_0x5e60('0x2e')]['rawAttributes'],function(_0x168ce6){return{'name':_0x168ce6[_0x5e60('0x2f')],'type':_0x168ce6['type'][_0x5e60('0x30')]};});_0xf25956['model']=_['map'](_0x2e8e9e,_0x5e60('0x2a'));_0xf25956[_0x5e60('0x31')]=_[_0x5e60('0x32')](_0x52c97c[_0x5e60('0x31')]);_0xf25956[_0x5e60('0x33')]=_[_0x5e60('0x34')](_0xf25956[_0x5e60('0x35')],_0xf25956[_0x5e60('0x31')]);_0x52f668[_0x5e60('0x36')]=_[_0x5e60('0x34')](_0xf25956['model'],qs[_0x5e60('0x37')](_0x52c97c['query']['fields']));_0x52f668[_0x5e60('0x36')]=_0x52f668[_0x5e60('0x36')]['length']?_0x52f668[_0x5e60('0x36')]:_0xf25956['model'];if(!_0x52c97c[_0x5e60('0x31')][_0x5e60('0x38')](_0x5e60('0x39'))){_0x52f668[_0x5e60('0x1d')]=qs[_0x5e60('0x1d')](_0x52c97c[_0x5e60('0x31')][_0x5e60('0x1d')]);_0x52f668[_0x5e60('0x1e')]=qs['offset'](_0x52c97c[_0x5e60('0x31')][_0x5e60('0x1e')]);}_0x52f668[_0x5e60('0x3a')]=qs[_0x5e60('0x3b')](_0x52c97c[_0x5e60('0x31')][_0x5e60('0x3b')]);_0x52f668[_0x5e60('0x3c')]=qs['filters'](_[_0x5e60('0x3d')](_0x52c97c[_0x5e60('0x31')],_0xf25956['filters']),_0x2e8e9e);if(_0x52c97c['query'][_0x5e60('0x3e')]){_0x52f668[_0x5e60('0x3c')]=_[_0x5e60('0x3f')](_0x52f668[_0x5e60('0x3c')],{'$or':_[_0x5e60('0x2d')](_0x2e8e9e,function(_0x4d2cd0){if(_0x4d2cd0[_0x5e60('0x40')]!==_0x5e60('0x41')){var _0x415208={};_0x415208[_0x4d2cd0[_0x5e60('0x2a')]]={'$like':'%'+_0x52c97c[_0x5e60('0x31')][_0x5e60('0x3e')]+'%'};return _0x415208;}})});}_0x52f668=_[_0x5e60('0x3f')]({},_0x52f668,_0x52c97c['options']);var _0x401bf1={'where':_0x52f668[_0x5e60('0x3c')]};return db['ZendeskAccount']['count'](_0x401bf1)['then'](function(_0x15a97b){_0x235cc7[_0x5e60('0x1f')]=_0x15a97b;if(_0x52c97c[_0x5e60('0x31')][_0x5e60('0x42')]){_0x52f668['include']=[{'all':!![]}];}return db[_0x5e60('0x2e')][_0x5e60('0x43')](_0x52f668);})['then'](function(_0x5bda22){_0x235cc7[_0x5e60('0x44')]=_0x5bda22;return _0x235cc7;})[_0x5e60('0x26')](respondWithFilteredResult(_0x5431a8,_0x52f668))[_0x5e60('0x45')](handleError(_0x5431a8,null));};exports[_0x5e60('0x46')]=function(_0x39ab09,_0x3899ae){var _0x2522d2={'raw':![],'where':{'id':_0x39ab09[_0x5e60('0x47')]['id']}},_0x2812e1={};_0x2812e1['model']=_[_0x5e60('0x32')](db[_0x5e60('0x2e')]['rawAttributes']);_0x2812e1[_0x5e60('0x31')]=_[_0x5e60('0x32')](_0x39ab09[_0x5e60('0x31')]);_0x2812e1[_0x5e60('0x33')]=_[_0x5e60('0x34')](_0x2812e1['model'],_0x2812e1[_0x5e60('0x31')]);_0x2522d2[_0x5e60('0x36')]=_[_0x5e60('0x34')](_0x2812e1[_0x5e60('0x35')],qs['fields'](_0x39ab09['query']['fields']));_0x2522d2[_0x5e60('0x36')]=_0x2522d2[_0x5e60('0x36')][_0x5e60('0x48')]?_0x2522d2[_0x5e60('0x36')]:_0x2812e1[_0x5e60('0x35')];if(_0x39ab09[_0x5e60('0x31')]['includeAll']){_0x2522d2[_0x5e60('0x49')]=[{'all':!![]}];}_0x2522d2=_[_0x5e60('0x3f')]({},_0x2522d2,_0x39ab09[_0x5e60('0x4a')]);return db[_0x5e60('0x2e')][_0x5e60('0x4b')](_0x2522d2)[_0x5e60('0x26')](handleEntityNotFound(_0x3899ae,null))[_0x5e60('0x26')](respondWithResult(_0x3899ae,null))['catch'](handleError(_0x3899ae,null));};exports[_0x5e60('0x4c')]=function(_0x3ed45d,_0x21a116){return db[_0x5e60('0x2e')][_0x5e60('0x4c')](_0x3ed45d[_0x5e60('0x4d')],{})[_0x5e60('0x26')](respondWithResult(_0x21a116,0xc9))[_0x5e60('0x45')](handleError(_0x21a116,null));};exports[_0x5e60('0x25')]=function(_0x350d6d,_0xe5e675){if(_0x350d6d[_0x5e60('0x4d')]['id']){delete _0x350d6d[_0x5e60('0x4d')]['id'];}return db[_0x5e60('0x2e')][_0x5e60('0x4b')]({'where':{'id':_0x350d6d[_0x5e60('0x47')]['id']}})[_0x5e60('0x26')](handleEntityNotFound(_0xe5e675,null))[_0x5e60('0x26')](saveUpdates(_0x350d6d['body'],null))['then'](respondWithResult(_0xe5e675,null))[_0x5e60('0x45')](handleError(_0xe5e675,null));};exports['destroy']=function(_0x3525d,_0x1d247e){return db[_0x5e60('0x2e')][_0x5e60('0x4b')]({'where':{'id':_0x3525d[_0x5e60('0x47')]['id']}})[_0x5e60('0x26')](handleEntityNotFound(_0x1d247e,null))['then'](removeEntity(_0x1d247e,null))['catch'](handleError(_0x1d247e,null));};exports[_0x5e60('0x4e')]=function(_0x1e4e41,_0x457c37,_0x4a2d67){var _0x594068={};var _0x31ced8={};var _0x46f3ba;var _0x179cc6;return db['ZendeskAccount'][_0x5e60('0x4f')]({'where':{'id':_0x1e4e41[_0x5e60('0x47')]['id']}})[_0x5e60('0x26')](handleEntityNotFound(_0x457c37,null))[_0x5e60('0x26')](function(_0x17d002){if(_0x17d002){_0x46f3ba=_0x17d002;_0x31ced8[_0x5e60('0x35')]=_['keys'](db[_0x5e60('0x50')][_0x5e60('0x51')]);_0x31ced8['query']=_[_0x5e60('0x32')](_0x1e4e41[_0x5e60('0x31')]);_0x31ced8[_0x5e60('0x33')]=_['intersection'](_0x31ced8[_0x5e60('0x35')],_0x31ced8[_0x5e60('0x31')]);_0x594068['attributes']=_[_0x5e60('0x34')](_0x31ced8[_0x5e60('0x35')],qs[_0x5e60('0x37')](_0x1e4e41[_0x5e60('0x31')]['fields']));_0x594068[_0x5e60('0x36')]=_0x594068[_0x5e60('0x36')]['length']?_0x594068[_0x5e60('0x36')]:_0x31ced8['model'];_0x594068[_0x5e60('0x3a')]=qs['sort'](_0x1e4e41[_0x5e60('0x31')][_0x5e60('0x3b')]);_0x594068['where']=qs[_0x5e60('0x33')](_['pick'](_0x1e4e41[_0x5e60('0x31')],_0x31ced8['filters']));if(_0x1e4e41[_0x5e60('0x31')]['filter']){_0x594068[_0x5e60('0x3c')]=_[_0x5e60('0x3f')](_0x594068[_0x5e60('0x3c')],{'$or':_[_0x5e60('0x2d')](_0x594068[_0x5e60('0x36')],function(_0x2b8343){var _0x3d1e35={};_0x3d1e35[_0x2b8343]={'$like':'%'+_0x1e4e41['query'][_0x5e60('0x3e')]+'%'};return _0x3d1e35;})});}_0x594068=_[_0x5e60('0x3f')]({},_0x594068,_0x1e4e41[_0x5e60('0x4a')]);return _0x46f3ba[_0x5e60('0x4e')](_0x594068);}})[_0x5e60('0x26')](function(_0x35aad7){if(_0x35aad7){_0x179cc6=_0x35aad7['length'];if(!_0x1e4e41['query']['hasOwnProperty'](_0x5e60('0x39'))){_0x594068[_0x5e60('0x1d')]=qs['limit'](_0x1e4e41[_0x5e60('0x31')][_0x5e60('0x1d')]);_0x594068['offset']=qs[_0x5e60('0x1e')](_0x1e4e41[_0x5e60('0x31')][_0x5e60('0x1e')]);}return _0x46f3ba[_0x5e60('0x4e')](_0x594068);}})[_0x5e60('0x26')](function(_0xcd2232){if(_0xcd2232){return _0xcd2232?{'count':_0x179cc6,'rows':_0xcd2232}:null;}})[_0x5e60('0x26')](respondWithResult(_0x457c37,null))[_0x5e60('0x45')](handleError(_0x457c37,null));};exports[_0x5e60('0x52')]=function(_0x406c3a,_0x157aad,_0x15921d){if(_0x406c3a[_0x5e60('0x4d')]['id']){delete _0x406c3a[_0x5e60('0x4d')]['id'];}return db[_0x5e60('0x2e')][_0x5e60('0x4f')]({'where':{'id':_0x406c3a[_0x5e60('0x47')]['id']}})['then'](handleEntityNotFound(_0x157aad,null))[_0x5e60('0x26')](function(_0x1706d6){if(_0x1706d6){_0x406c3a[_0x5e60('0x4d')]['AccountId']=_0x1706d6['id'];_0x406c3a[_0x5e60('0x4d')][_0x5e60('0x53')]=integrations['getSubjects'](_0x406c3a[_0x5e60('0x4d')][_0x5e60('0x54')],_0x406c3a['body'][_0x5e60('0x40')]);_0x406c3a[_0x5e60('0x4d')][_0x5e60('0x55')]=integrations[_0x5e60('0x56')](_0x406c3a[_0x5e60('0x4d')][_0x5e60('0x54')],_0x406c3a[_0x5e60('0x4d')][_0x5e60('0x40')]);return db[_0x5e60('0x50')]['create'](_0x406c3a[_0x5e60('0x4d')],{'include':[{'model':db[_0x5e60('0x57')],'as':_0x5e60('0x53')},{'model':db['ZendeskField'],'as':_0x5e60('0x55')}]});}return null;})[_0x5e60('0x26')](respondWithResult(_0x157aad,null))[_0x5e60('0x45')](handleError(_0x157aad,null));};exports[_0x5e60('0x58')]=function(_0x3e85fe,_0x559f8c,_0x4560e1){var _0x213c7e='';return db[_0x5e60('0x2e')]['findOne']({'where':{'id':_0x3e85fe['params']['id']},'attributes':['id',_0x5e60('0x59'),_0x5e60('0x5a'),_0x5e60('0x5b'),_0x5e60('0x5c'),_0x5e60('0x5d')]})[_0x5e60('0x26')](handleEntityNotFound(_0x559f8c,null))[_0x5e60('0x26')](function(_0x563e69){if(_0x563e69){_0x213c7e=_0x563e69[_0x5e60('0x5d')];var _0x199edd=_0x213c7e[_0x5e60('0x5e')](-0x1);if(_0x199edd==='/'){_0x213c7e=_0x213c7e['substring'](0x0,_0x213c7e['lastIndexOf'](_0x199edd));}var _0x447bd3={'method':_0x5e60('0x5f'),'uri':util[_0x5e60('0x60')]('%s/%s',_0x213c7e,'ticket_fields'),'json':!![]};switch(_0x563e69[_0x5e60('0x5c')]){case _0x5e60('0x5a'):_0x447bd3[_0x5e60('0x61')]={'Authorization':util[_0x5e60('0x60')](_0x5e60('0x62'),new Buffer(util[_0x5e60('0x60')]('%s:%s',_0x563e69[_0x5e60('0x59')],_0x563e69[_0x5e60('0x5a')]))[_0x5e60('0x63')](_0x5e60('0x64')))};break;case _0x5e60('0x5b'):_0x447bd3[_0x5e60('0x61')]={'Authorization':util[_0x5e60('0x60')](_0x5e60('0x62'),new Buffer(util[_0x5e60('0x60')]('%s/token:%s',_0x563e69[_0x5e60('0x59')],_0x563e69[_0x5e60('0x5b')]))['toString'](_0x5e60('0x64')))};break;default:throw new db[(_0x5e60('0x65'))]['ValidationError'](_0x5e60('0x66'));}return rp(_0x447bd3);}})[_0x5e60('0x26')](function(_0x391505){if(_0x391505){var _0x1b4aee=[_0x5e60('0x67'),_0x5e60('0x68'),'group',_0x5e60('0x69')];_[_0x5e60('0x6a')](_0x391505[_0x5e60('0x6b')],function(_0x222d94){return _0x1b4aee[_0x5e60('0x6c')](_0x222d94[_0x5e60('0x40')]);});return{'count':_0x391505[_0x5e60('0x6b')][_0x5e60('0x48')],'rows':_[_0x5e60('0x2d')](_0x391505['ticket_fields'],function(_0x10b77b){return{'id':_0x10b77b['id'],'name':_0x10b77b[_0x5e60('0x6d')]>0x7?_0x10b77b[_0x5e60('0x6e')]:_0x10b77b[_0x5e60('0x40')],'custom':_0x10b77b[_0x5e60('0x6d')]>0x7?!![]:![],'options':_0x10b77b[_0x5e60('0x6f')]?_0x10b77b[_0x5e60('0x6f')]:_0x10b77b[_0x5e60('0x70')]?_0x10b77b[_0x5e60('0x70')]:[]};})};}})[_0x5e60('0x26')](respondWithResult(_0x559f8c,null))['catch'](function(_0x5ab78f){var _0x5d2839=_0x3e85fe[_0x5e60('0x31')][_0x5e60('0x71')]?0x1f4:_0x5ab78f[_0x5e60('0x72')]||0x1f4;logger[_0x5e60('0x29')](_0x5e60('0x73'),_0x5e60('0x58'),_0x5d2839,JSON[_0x5e60('0x74')](_0x5ab78f));delete _0x5ab78f[_0x5e60('0x2a')];if(_0x5d2839===0x191){_0x5d2839=0x190;}_0x559f8c[_0x5e60('0x1b')](_0x5d2839)['send'](_0x3e85fe[_0x5e60('0x31')][_0x5e60('0x71')]?{'message':_0x5e60('0x75'),'statusCode':_0x5ab78f['statusCode']}:_0x5ab78f);});};
\ No newline at end of file
+var _0x6324=['error','name','send','index','ZendeskAccount','key','model','map','keys','query','intersection','fields','attributes','length','order','sort','filters','pick','where','merge','type','VIRTUAL','filter','options','include','findAll','rows','catch','show','params','rawAttributes','includeAll','create','body','find','getConfigurations','findOne','ZendeskConfiguration','hasOwnProperty','nolimit','addConfiguration','AccountId','getSubjects','channel','getDescriptions','ZendeskField','Subjects','Descriptions','getFields','username','password','token','authType','remoteUri','substring','lastIndexOf','GET','format','%s/%s','Basic\x20%s','%s:%s','toString','base64','%s/token:%s','ValidationError','Unknown\x20authentication\x20type','subject','assignee','remove','includes','ticket_fields','title','position','system_field_options','custom_field_options','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','stringify','Wrong\x20credentials','eml-format','rimraf','zip-dir','fast-json-patch','moment','mustache','path','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../components/integrations/configuration','sendStatus','status','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','then','destroy','end'];(function(_0xd7936d,_0xa7eecc){var _0x10149b=function(_0x3f4508){while(--_0x3f4508){_0xd7936d['push'](_0xd7936d['shift']());}};_0x10149b(++_0xa7eecc);}(_0x6324,0x142));var _0x4632=function(_0x4baac3,_0x481c9a){_0x4baac3=_0x4baac3-0x0;var _0x4fb4bc=_0x6324[_0x4baac3];return _0x4fb4bc;};'use strict';var emlformat=require(_0x4632('0x0'));var rimraf=require(_0x4632('0x1'));var zipdir=require(_0x4632('0x2'));var jsonpatch=require(_0x4632('0x3'));var rp=require('request-promise');var moment=require(_0x4632('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x4632('0x5'));var util=require('util');var path=require(_0x4632('0x6'));var sox=require('sox');var csv=require(_0x4632('0x7'));var ejs=require(_0x4632('0x8'));var fs=require('fs');var fs_extra=require(_0x4632('0x9'));var _=require(_0x4632('0xa'));var squel=require('squel');var crypto=require(_0x4632('0xb'));var jsforce=require(_0x4632('0xc'));var deskjs=require(_0x4632('0xd'));var toCsv=require('to-csv');var querystring=require(_0x4632('0xe'));var Papa=require(_0x4632('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x4632('0x10'));var as=require(_0x4632('0x11'));var hardwareService=require(_0x4632('0x12'));var logger=require(_0x4632('0x13'))(_0x4632('0x14'));var utils=require(_0x4632('0x15'));var config=require(_0x4632('0x16'));var licenseUtil=require(_0x4632('0x17'));var db=require('../../mysqldb')['db'];var integrations=require(_0x4632('0x18'));function respondWithStatusCode(_0x499d88,_0x4719f7){_0x4719f7=_0x4719f7||0xcc;return function(_0x299073){if(_0x299073){return _0x499d88[_0x4632('0x19')](_0x4719f7);}return _0x499d88[_0x4632('0x1a')](_0x4719f7)['end']();};}function respondWithResult(_0x3ba361,_0x255882){_0x255882=_0x255882||0xc8;return function(_0x3b9901){if(_0x3b9901){return _0x3ba361[_0x4632('0x1a')](_0x255882)[_0x4632('0x1b')](_0x3b9901);}};}function respondWithFilteredResult(_0x5438ab,_0x47b349){return function(_0x2fd7ae){if(_0x2fd7ae){var _0x38bedd=typeof _0x47b349[_0x4632('0x1c')]===_0x4632('0x1d')&&typeof _0x47b349['limit']===_0x4632('0x1d');var _0x113872=_0x2fd7ae[_0x4632('0x1e')];var _0x5b28b7=_0x38bedd?0x0:_0x47b349[_0x4632('0x1c')];var _0x1894bb=_0x38bedd?_0x2fd7ae['count']:_0x47b349['offset']+_0x47b349[_0x4632('0x1f')];var _0x3cf2bd;if(_0x1894bb>=_0x113872){_0x1894bb=_0x113872;_0x3cf2bd=0xc8;}else{_0x3cf2bd=0xce;}_0x5438ab[_0x4632('0x1a')](_0x3cf2bd);return _0x5438ab[_0x4632('0x20')](_0x4632('0x21'),_0x5b28b7+'-'+_0x1894bb+'/'+_0x113872)[_0x4632('0x1b')](_0x2fd7ae);}return null;};}function patchUpdates(_0x9ab826){return function(_0x468ccb){try{jsonpatch[_0x4632('0x22')](_0x468ccb,_0x9ab826,!![]);}catch(_0x3ea0d1){return BPromise[_0x4632('0x23')](_0x3ea0d1);}return _0x468ccb[_0x4632('0x24')]();};}function saveUpdates(_0x2ca6a5,_0x263907){return function(_0x4cfebc){if(_0x4cfebc){return _0x4cfebc[_0x4632('0x25')](_0x2ca6a5)[_0x4632('0x26')](function(_0x3537ed){return _0x3537ed;});}return null;};}function removeEntity(_0x380a9f,_0x1e1b86){return function(_0x38cbbc){if(_0x38cbbc){return _0x38cbbc[_0x4632('0x27')]()[_0x4632('0x26')](function(){_0x380a9f[_0x4632('0x1a')](0xcc)[_0x4632('0x28')]();});}};}function handleEntityNotFound(_0x1b8de0,_0x4af026){return function(_0x2e3428){if(!_0x2e3428){_0x1b8de0[_0x4632('0x19')](0x194);}return _0x2e3428;};}function handleError(_0x372679,_0x22d0f5){_0x22d0f5=_0x22d0f5||0x1f4;return function(_0x2a0b11){logger[_0x4632('0x29')](_0x2a0b11['stack']);if(_0x2a0b11['name']){delete _0x2a0b11[_0x4632('0x2a')];}_0x372679[_0x4632('0x1a')](_0x22d0f5)[_0x4632('0x2b')](_0x2a0b11);};}exports[_0x4632('0x2c')]=function(_0x34079f,_0x119d1b){var _0x3570b2={},_0x5e2ee4={},_0x42d505={'count':0x0,'rows':[]};var _0x135fd2=_['map'](db[_0x4632('0x2d')]['rawAttributes'],function(_0x6599ad){return{'name':_0x6599ad['fieldName'],'type':_0x6599ad['type'][_0x4632('0x2e')]};});_0x5e2ee4[_0x4632('0x2f')]=_[_0x4632('0x30')](_0x135fd2,'name');_0x5e2ee4['query']=_[_0x4632('0x31')](_0x34079f[_0x4632('0x32')]);_0x5e2ee4['filters']=_['intersection'](_0x5e2ee4[_0x4632('0x2f')],_0x5e2ee4[_0x4632('0x32')]);_0x3570b2['attributes']=_[_0x4632('0x33')](_0x5e2ee4[_0x4632('0x2f')],qs[_0x4632('0x34')](_0x34079f[_0x4632('0x32')][_0x4632('0x34')]));_0x3570b2['attributes']=_0x3570b2[_0x4632('0x35')][_0x4632('0x36')]?_0x3570b2['attributes']:_0x5e2ee4['model'];if(!_0x34079f[_0x4632('0x32')]['hasOwnProperty']('nolimit')){_0x3570b2[_0x4632('0x1f')]=qs['limit'](_0x34079f[_0x4632('0x32')][_0x4632('0x1f')]);_0x3570b2[_0x4632('0x1c')]=qs['offset'](_0x34079f[_0x4632('0x32')][_0x4632('0x1c')]);}_0x3570b2[_0x4632('0x37')]=qs[_0x4632('0x38')](_0x34079f[_0x4632('0x32')]['sort']);_0x3570b2['where']=qs[_0x4632('0x39')](_[_0x4632('0x3a')](_0x34079f[_0x4632('0x32')],_0x5e2ee4['filters']),_0x135fd2);if(_0x34079f['query']['filter']){_0x3570b2[_0x4632('0x3b')]=_[_0x4632('0x3c')](_0x3570b2['where'],{'$or':_[_0x4632('0x30')](_0x135fd2,function(_0x20a700){if(_0x20a700[_0x4632('0x3d')]!==_0x4632('0x3e')){var _0x2309f1={};_0x2309f1[_0x20a700[_0x4632('0x2a')]]={'$like':'%'+_0x34079f[_0x4632('0x32')][_0x4632('0x3f')]+'%'};return _0x2309f1;}})});}_0x3570b2=_[_0x4632('0x3c')]({},_0x3570b2,_0x34079f[_0x4632('0x40')]);var _0x1fd3f1={'where':_0x3570b2[_0x4632('0x3b')]};return db['ZendeskAccount'][_0x4632('0x1e')](_0x1fd3f1)[_0x4632('0x26')](function(_0x4c0e13){_0x42d505[_0x4632('0x1e')]=_0x4c0e13;if(_0x34079f[_0x4632('0x32')]['includeAll']){_0x3570b2[_0x4632('0x41')]=[{'all':!![]}];}return db['ZendeskAccount'][_0x4632('0x42')](_0x3570b2);})[_0x4632('0x26')](function(_0x1bfb36){_0x42d505[_0x4632('0x43')]=_0x1bfb36;return _0x42d505;})['then'](respondWithFilteredResult(_0x119d1b,_0x3570b2))[_0x4632('0x44')](handleError(_0x119d1b,null));};exports[_0x4632('0x45')]=function(_0x23ef38,_0x279298){var _0x5cc716={'raw':![],'where':{'id':_0x23ef38[_0x4632('0x46')]['id']}},_0x5b3fa9={};_0x5b3fa9[_0x4632('0x2f')]=_[_0x4632('0x31')](db['ZendeskAccount'][_0x4632('0x47')]);_0x5b3fa9[_0x4632('0x32')]=_[_0x4632('0x31')](_0x23ef38[_0x4632('0x32')]);_0x5b3fa9[_0x4632('0x39')]=_[_0x4632('0x33')](_0x5b3fa9[_0x4632('0x2f')],_0x5b3fa9['query']);_0x5cc716[_0x4632('0x35')]=_[_0x4632('0x33')](_0x5b3fa9[_0x4632('0x2f')],qs[_0x4632('0x34')](_0x23ef38[_0x4632('0x32')]['fields']));_0x5cc716['attributes']=_0x5cc716[_0x4632('0x35')][_0x4632('0x36')]?_0x5cc716[_0x4632('0x35')]:_0x5b3fa9[_0x4632('0x2f')];if(_0x23ef38['query'][_0x4632('0x48')]){_0x5cc716[_0x4632('0x41')]=[{'all':!![]}];}_0x5cc716=_[_0x4632('0x3c')]({},_0x5cc716,_0x23ef38[_0x4632('0x40')]);return db[_0x4632('0x2d')]['find'](_0x5cc716)[_0x4632('0x26')](handleEntityNotFound(_0x279298,null))[_0x4632('0x26')](respondWithResult(_0x279298,null))[_0x4632('0x44')](handleError(_0x279298,null));};exports[_0x4632('0x49')]=function(_0x3676fa,_0x2eb8b0){return db[_0x4632('0x2d')][_0x4632('0x49')](_0x3676fa[_0x4632('0x4a')],{})[_0x4632('0x26')](respondWithResult(_0x2eb8b0,0xc9))[_0x4632('0x44')](handleError(_0x2eb8b0,null));};exports['update']=function(_0xc3ffd0,_0x1ccadb){if(_0xc3ffd0[_0x4632('0x4a')]['id']){delete _0xc3ffd0['body']['id'];}return db[_0x4632('0x2d')][_0x4632('0x4b')]({'where':{'id':_0xc3ffd0[_0x4632('0x46')]['id']}})[_0x4632('0x26')](handleEntityNotFound(_0x1ccadb,null))[_0x4632('0x26')](saveUpdates(_0xc3ffd0[_0x4632('0x4a')],null))[_0x4632('0x26')](respondWithResult(_0x1ccadb,null))[_0x4632('0x44')](handleError(_0x1ccadb,null));};exports[_0x4632('0x27')]=function(_0x1aa831,_0x4e89e3){return db[_0x4632('0x2d')][_0x4632('0x4b')]({'where':{'id':_0x1aa831['params']['id']}})[_0x4632('0x26')](handleEntityNotFound(_0x4e89e3,null))[_0x4632('0x26')](removeEntity(_0x4e89e3,null))[_0x4632('0x44')](handleError(_0x4e89e3,null));};exports[_0x4632('0x4c')]=function(_0x2c59f5,_0xfeeac0,_0x248dcf){var _0xf4880f={};var _0x31b42d={};var _0x1b66e0;var _0x3e66d8;return db[_0x4632('0x2d')][_0x4632('0x4d')]({'where':{'id':_0x2c59f5[_0x4632('0x46')]['id']}})[_0x4632('0x26')](handleEntityNotFound(_0xfeeac0,null))[_0x4632('0x26')](function(_0x32cd35){if(_0x32cd35){_0x1b66e0=_0x32cd35;_0x31b42d[_0x4632('0x2f')]=_[_0x4632('0x31')](db[_0x4632('0x4e')]['rawAttributes']);_0x31b42d[_0x4632('0x32')]=_[_0x4632('0x31')](_0x2c59f5[_0x4632('0x32')]);_0x31b42d[_0x4632('0x39')]=_[_0x4632('0x33')](_0x31b42d[_0x4632('0x2f')],_0x31b42d['query']);_0xf4880f[_0x4632('0x35')]=_[_0x4632('0x33')](_0x31b42d[_0x4632('0x2f')],qs['fields'](_0x2c59f5[_0x4632('0x32')][_0x4632('0x34')]));_0xf4880f['attributes']=_0xf4880f[_0x4632('0x35')][_0x4632('0x36')]?_0xf4880f[_0x4632('0x35')]:_0x31b42d['model'];_0xf4880f[_0x4632('0x37')]=qs[_0x4632('0x38')](_0x2c59f5[_0x4632('0x32')][_0x4632('0x38')]);_0xf4880f[_0x4632('0x3b')]=qs[_0x4632('0x39')](_[_0x4632('0x3a')](_0x2c59f5[_0x4632('0x32')],_0x31b42d[_0x4632('0x39')]));if(_0x2c59f5[_0x4632('0x32')]['filter']){_0xf4880f[_0x4632('0x3b')]=_[_0x4632('0x3c')](_0xf4880f['where'],{'$or':_[_0x4632('0x30')](_0xf4880f['attributes'],function(_0x48e942){var _0xa55d76={};_0xa55d76[_0x48e942]={'$like':'%'+_0x2c59f5[_0x4632('0x32')][_0x4632('0x3f')]+'%'};return _0xa55d76;})});}_0xf4880f=_[_0x4632('0x3c')]({},_0xf4880f,_0x2c59f5[_0x4632('0x40')]);return _0x1b66e0[_0x4632('0x4c')](_0xf4880f);}})[_0x4632('0x26')](function(_0x3e2849){if(_0x3e2849){_0x3e66d8=_0x3e2849[_0x4632('0x36')];if(!_0x2c59f5[_0x4632('0x32')][_0x4632('0x4f')](_0x4632('0x50'))){_0xf4880f[_0x4632('0x1f')]=qs[_0x4632('0x1f')](_0x2c59f5['query']['limit']);_0xf4880f[_0x4632('0x1c')]=qs[_0x4632('0x1c')](_0x2c59f5[_0x4632('0x32')][_0x4632('0x1c')]);}return _0x1b66e0[_0x4632('0x4c')](_0xf4880f);}})[_0x4632('0x26')](function(_0x5b66ee){if(_0x5b66ee){return _0x5b66ee?{'count':_0x3e66d8,'rows':_0x5b66ee}:null;}})[_0x4632('0x26')](respondWithResult(_0xfeeac0,null))[_0x4632('0x44')](handleError(_0xfeeac0,null));};exports[_0x4632('0x51')]=function(_0x2e4d57,_0x5d1994,_0x529be1){if(_0x2e4d57[_0x4632('0x4a')]['id']){delete _0x2e4d57['body']['id'];}return db[_0x4632('0x2d')][_0x4632('0x4d')]({'where':{'id':_0x2e4d57[_0x4632('0x46')]['id']}})[_0x4632('0x26')](handleEntityNotFound(_0x5d1994,null))[_0x4632('0x26')](function(_0x5e5669){if(_0x5e5669){_0x2e4d57[_0x4632('0x4a')][_0x4632('0x52')]=_0x5e5669['id'];_0x2e4d57['body']['Subjects']=integrations[_0x4632('0x53')](_0x2e4d57[_0x4632('0x4a')][_0x4632('0x54')],_0x2e4d57[_0x4632('0x4a')]['type']);_0x2e4d57['body']['Descriptions']=integrations[_0x4632('0x55')](_0x2e4d57['body'][_0x4632('0x54')],_0x2e4d57[_0x4632('0x4a')][_0x4632('0x3d')]);return db[_0x4632('0x4e')][_0x4632('0x49')](_0x2e4d57[_0x4632('0x4a')],{'include':[{'model':db[_0x4632('0x56')],'as':_0x4632('0x57')},{'model':db[_0x4632('0x56')],'as':_0x4632('0x58')}]});}return null;})[_0x4632('0x26')](respondWithResult(_0x5d1994,null))[_0x4632('0x44')](handleError(_0x5d1994,null));};exports[_0x4632('0x59')]=function(_0x3d5e65,_0x461700,_0x1b2905){var _0x550c4d='';return db[_0x4632('0x2d')][_0x4632('0x4d')]({'where':{'id':_0x3d5e65[_0x4632('0x46')]['id']},'attributes':['id',_0x4632('0x5a'),_0x4632('0x5b'),_0x4632('0x5c'),_0x4632('0x5d'),_0x4632('0x5e')]})[_0x4632('0x26')](handleEntityNotFound(_0x461700,null))[_0x4632('0x26')](function(_0x16ed40){if(_0x16ed40){_0x550c4d=_0x16ed40[_0x4632('0x5e')];var _0x27e2a6=_0x550c4d['slice'](-0x1);if(_0x27e2a6==='/'){_0x550c4d=_0x550c4d[_0x4632('0x5f')](0x0,_0x550c4d[_0x4632('0x60')](_0x27e2a6));}var _0x348af1={'method':_0x4632('0x61'),'uri':util[_0x4632('0x62')](_0x4632('0x63'),_0x550c4d,'ticket_fields'),'json':!![]};switch(_0x16ed40[_0x4632('0x5d')]){case _0x4632('0x5b'):_0x348af1['headers']={'Authorization':util[_0x4632('0x62')](_0x4632('0x64'),new Buffer(util[_0x4632('0x62')](_0x4632('0x65'),_0x16ed40[_0x4632('0x5a')],_0x16ed40['password']))[_0x4632('0x66')](_0x4632('0x67')))};break;case _0x4632('0x5c'):_0x348af1['headers']={'Authorization':util[_0x4632('0x62')](_0x4632('0x64'),new Buffer(util[_0x4632('0x62')](_0x4632('0x68'),_0x16ed40[_0x4632('0x5a')],_0x16ed40[_0x4632('0x5c')]))[_0x4632('0x66')](_0x4632('0x67')))};break;default:throw new db['Sequelize'][(_0x4632('0x69'))](_0x4632('0x6a'));}return rp(_0x348af1);}})[_0x4632('0x26')](function(_0x525bf9){if(_0x525bf9){var _0xfc48bd=[_0x4632('0x6b'),'description','group',_0x4632('0x6c')];_[_0x4632('0x6d')](_0x525bf9['ticket_fields'],function(_0x63d3e1){return _0xfc48bd[_0x4632('0x6e')](_0x63d3e1[_0x4632('0x3d')]);});return{'count':_0x525bf9[_0x4632('0x6f')][_0x4632('0x36')],'rows':_[_0x4632('0x30')](_0x525bf9[_0x4632('0x6f')],function(_0x130b52){return{'id':_0x130b52['id'],'name':_0x130b52['position']>0x7?_0x130b52[_0x4632('0x70')]:_0x130b52[_0x4632('0x3d')],'custom':_0x130b52[_0x4632('0x71')]>0x7?!![]:![],'options':_0x130b52[_0x4632('0x72')]?_0x130b52['system_field_options']:_0x130b52[_0x4632('0x73')]?_0x130b52[_0x4632('0x73')]:[]};})};}})[_0x4632('0x26')](respondWithResult(_0x461700,null))[_0x4632('0x44')](function(_0x3cee1d){var _0x4ca8a8=_0x3d5e65[_0x4632('0x32')][_0x4632('0x74')]?0x1f4:_0x3cee1d[_0x4632('0x75')]||0x1f4;logger[_0x4632('0x29')](_0x4632('0x76'),_0x4632('0x59'),_0x4ca8a8,JSON[_0x4632('0x77')](_0x3cee1d));delete _0x3cee1d[_0x4632('0x2a')];if(_0x4ca8a8===0x191){_0x4ca8a8=0x190;}_0x461700['status'](_0x4ca8a8)[_0x4632('0x2b')](_0x3d5e65[_0x4632('0x32')][_0x4632('0x74')]?{'message':_0x4632('0x78'),'statusCode':_0x3cee1d[_0x4632('0x75')]}:_0x3cee1d);});};
\ No newline at end of file
index 3b95f7b..074177e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2059=['../../components/integrations/configuration','exports','define','int_zendesk_accounts','lodash','util','../../config/logger','api','bluebird','request-promise','path','../../config/environment','./intZendeskAccount.attributes'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0x2059,0x1be));var _0x9205=function(_0x2f6f50,_0x1d21a7){_0x2f6f50=_0x2f6f50-0x0;var _0x2cf365=_0x2059[_0x2f6f50];return _0x2cf365;};'use strict';var _=require(_0x9205('0x0'));var util=require(_0x9205('0x1'));var logger=require(_0x9205('0x2'))(_0x9205('0x3'));var moment=require('moment');var BPromise=require(_0x9205('0x4'));var rp=require(_0x9205('0x5'));var fs=require('fs');var path=require(_0x9205('0x6'));var rimraf=require('rimraf');var config=require(_0x9205('0x7'));var attributes=require(_0x9205('0x8'));var integrations=require(_0x9205('0x9'));module[_0x9205('0xa')]=function(_0x5e4914,_0x159c3d){return _0x5e4914[_0x9205('0xb')]('ZendeskAccount',attributes,{'tableName':_0x9205('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xada6=['util','../../config/logger','moment','../../config/environment','./intZendeskAccount.attributes','../../components/integrations/configuration','exports','define','lodash'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xada6,0x1ee));var _0x6ada=function(_0x419ed8,_0x4a4414){_0x419ed8=_0x419ed8-0x0;var _0x12a3b1=_0xada6[_0x419ed8];return _0x12a3b1;};'use strict';var _=require(_0x6ada('0x0'));var util=require(_0x6ada('0x1'));var logger=require(_0x6ada('0x2'))('api');var moment=require(_0x6ada('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x6ada('0x4'));var attributes=require(_0x6ada('0x5'));var integrations=require(_0x6ada('0x6'));module[_0x6ada('0x7')]=function(_0x196561,_0x2935ba){return _0x196561[_0x6ada('0x8')]('ZendeskAccount',attributes,{'tableName':'int_zendesk_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index b96fcde..858c9de 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8cc1=['error','message','info','result','GetZendeskAccount','ZendeskAccount','findAll','options','raw','where','attributes','limit','include','map','model','stringify','catch','find','ShowZendeskAccount','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','ZendeskAccount,\x20%s,\x20%s','request\x20sent','debug','ZendeskAccount,\x20%s,\x20%s,\x20%s'];(function(_0x26033c,_0x4d224e){var _0x369213=function(_0x3face8){while(--_0x3face8){_0x26033c['push'](_0x26033c['shift']());}};_0x369213(++_0x4d224e);}(_0x8cc1,0x14e));var _0x18cc=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x8cc1[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require(_0x18cc('0x0'));var moment=require('moment');var BPromise=require(_0x18cc('0x1'));var rs=require(_0x18cc('0x2'));var fs=require('fs');var Redis=require(_0x18cc('0x3'));var db=require(_0x18cc('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x18cc('0x5'))('rpc');var config=require(_0x18cc('0x6'));var jayson=require(_0x18cc('0x7'));var client=jayson[_0x18cc('0x8')][_0x18cc('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x32a0ca,_0x569265,_0x97fdde){return new BPromise(function(_0x379c7f,_0xf1edea){return client[_0x18cc('0xa')](_0x32a0ca,_0x97fdde)[_0x18cc('0xb')](function(_0x4749b1){logger['info'](_0x18cc('0xc'),_0x569265,_0x18cc('0xd'));logger[_0x18cc('0xe')](_0x18cc('0xf'),_0x569265,'request\x20sent',JSON['stringify'](_0x4749b1));if(_0x4749b1[_0x18cc('0x10')]){if(_0x4749b1['error']['code']===0x1f4){logger[_0x18cc('0x10')](_0x18cc('0xc'),_0x569265,_0x4749b1[_0x18cc('0x10')]['message']);return _0xf1edea(_0x4749b1[_0x18cc('0x10')][_0x18cc('0x11')]);}logger['error']('ZendeskAccount,\x20%s,\x20%s',_0x569265,_0x4749b1[_0x18cc('0x10')]['message']);return _0x379c7f(_0x4749b1[_0x18cc('0x10')]['message']);}else{logger[_0x18cc('0x12')]('ZendeskAccount,\x20%s,\x20%s',_0x569265,_0x18cc('0xd'));_0x379c7f(_0x4749b1[_0x18cc('0x13')][_0x18cc('0x11')]);}})['catch'](function(_0x1f7ec8){logger['error']('ZendeskAccount,\x20%s,\x20%s',_0x569265,_0x1f7ec8);_0xf1edea(_0x1f7ec8);});});}exports[_0x18cc('0x14')]=function(_0x104fc4){var _0x20a5ac=this;return new Promise(function(_0x19884a,_0x591a24){return db[_0x18cc('0x15')][_0x18cc('0x16')]({'raw':_0x104fc4[_0x18cc('0x17')]?_0x104fc4[_0x18cc('0x17')][_0x18cc('0x18')]===undefined?!![]:![]:!![],'where':_0x104fc4[_0x18cc('0x17')]?_0x104fc4[_0x18cc('0x17')][_0x18cc('0x19')]||null:null,'attributes':_0x104fc4[_0x18cc('0x17')]?_0x104fc4[_0x18cc('0x17')][_0x18cc('0x1a')]||null:null,'limit':_0x104fc4[_0x18cc('0x17')]?_0x104fc4[_0x18cc('0x17')][_0x18cc('0x1b')]||null:null,'include':_0x104fc4[_0x18cc('0x17')]?_0x104fc4[_0x18cc('0x17')][_0x18cc('0x1c')]?_[_0x18cc('0x1d')](_0x104fc4[_0x18cc('0x17')]['include'],function(_0x4b2358){return{'model':db[_0x4b2358[_0x18cc('0x1e')]],'as':_0x4b2358['as'],'attributes':_0x4b2358['attributes'],'include':_0x4b2358['include']?_[_0x18cc('0x1d')](_0x4b2358[_0x18cc('0x1c')],function(_0x8ebbf4){return{'model':db[_0x8ebbf4[_0x18cc('0x1e')]],'as':_0x8ebbf4['as'],'attributes':_0x8ebbf4[_0x18cc('0x1a')],'include':_0x8ebbf4[_0x18cc('0x1c')]?_[_0x18cc('0x1d')](_0x8ebbf4[_0x18cc('0x1c')],function(_0x217793){return{'model':db[_0x217793['model']],'as':_0x217793['as'],'attributes':_0x217793['attributes']};}):[]};}):[]};}):[]:[]})[_0x18cc('0xb')](function(_0x25c68e){logger[_0x18cc('0x12')]('GetZendeskAccount',_0x104fc4);logger[_0x18cc('0xe')]('GetZendeskAccount',_0x104fc4,JSON[_0x18cc('0x1f')](_0x25c68e));_0x19884a(_0x25c68e);})[_0x18cc('0x20')](function(_0x3f1a24){logger[_0x18cc('0x10')](_0x18cc('0x14'),_0x3f1a24[_0x18cc('0x11')],_0x104fc4);_0x591a24(_0x20a5ac[_0x18cc('0x10')](0x1f4,_0x3f1a24[_0x18cc('0x11')]));});});};exports['ShowZendeskAccount']=function(_0x29119d){var _0x399d07=this;return new Promise(function(_0x5bb35e,_0xd98c63){return db[_0x18cc('0x15')][_0x18cc('0x21')]({'raw':_0x29119d[_0x18cc('0x17')]?_0x29119d[_0x18cc('0x17')][_0x18cc('0x18')]===undefined?!![]:![]:!![],'where':_0x29119d[_0x18cc('0x17')]?_0x29119d['options']['where']||null:null,'attributes':_0x29119d[_0x18cc('0x17')]?_0x29119d[_0x18cc('0x17')]['attributes']||null:null,'include':_0x29119d['options']?_0x29119d[_0x18cc('0x17')][_0x18cc('0x1c')]?_[_0x18cc('0x1d')](_0x29119d[_0x18cc('0x17')][_0x18cc('0x1c')],function(_0x42206c){return{'model':db[_0x42206c['model']],'as':_0x42206c['as'],'attributes':_0x42206c[_0x18cc('0x1a')],'include':_0x42206c[_0x18cc('0x1c')]?_[_0x18cc('0x1d')](_0x42206c[_0x18cc('0x1c')],function(_0x13557a){return{'model':db[_0x13557a['model']],'as':_0x13557a['as'],'attributes':_0x13557a[_0x18cc('0x1a')],'include':_0x13557a[_0x18cc('0x1c')]?_[_0x18cc('0x1d')](_0x13557a[_0x18cc('0x1c')],function(_0x1c45db){return{'model':db[_0x1c45db[_0x18cc('0x1e')]],'as':_0x1c45db['as'],'attributes':_0x1c45db[_0x18cc('0x1a')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x3ae09e){logger[_0x18cc('0x12')]('ShowZendeskAccount',_0x29119d);logger[_0x18cc('0xe')](_0x18cc('0x22'),_0x29119d,JSON[_0x18cc('0x1f')](_0x3ae09e));_0x5bb35e(_0x3ae09e);})[_0x18cc('0x20')](function(_0xe2ab32){logger['error'](_0x18cc('0x22'),_0xe2ab32[_0x18cc('0x11')],_0x29119d);_0xd98c63(_0x399d07[_0x18cc('0x10')](0x1f4,_0xe2ab32['message']));});});};
\ No newline at end of file
+var _0x5d99=['stringify','error','code','ZendeskAccount,\x20%s,\x20%s','message','result','GetZendeskAccount','findAll','options','raw','where','attributes','include','map','model','catch','ShowZendeskAccount','ZendeskAccount','find','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','then','info','request\x20sent','debug'];(function(_0x5c6c42,_0x5105b0){var _0x1f1775=function(_0x4cef47){while(--_0x4cef47){_0x5c6c42['push'](_0x5c6c42['shift']());}};_0x1f1775(++_0x5105b0);}(_0x5d99,0x1b7));var _0x95d9=function(_0x328b1c,_0xec0b4f){_0x328b1c=_0x328b1c-0x0;var _0x4dbeaa=_0x5d99[_0x328b1c];return _0x4dbeaa;};'use strict';var _=require(_0x95d9('0x0'));var util=require(_0x95d9('0x1'));var moment=require(_0x95d9('0x2'));var BPromise=require(_0x95d9('0x3'));var rs=require(_0x95d9('0x4'));var fs=require('fs');var Redis=require(_0x95d9('0x5'));var db=require(_0x95d9('0x6'))['db'];var utils=require(_0x95d9('0x7'));var logger=require(_0x95d9('0x8'))(_0x95d9('0x9'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x95d9('0xa')][_0x95d9('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x159b28,_0x5ca01b,_0x5925f9){return new BPromise(function(_0xc7413,_0x272135){return client['request'](_0x159b28,_0x5925f9)[_0x95d9('0xc')](function(_0x467f87){logger[_0x95d9('0xd')]('ZendeskAccount,\x20%s,\x20%s',_0x5ca01b,_0x95d9('0xe'));logger[_0x95d9('0xf')]('ZendeskAccount,\x20%s,\x20%s,\x20%s',_0x5ca01b,'request\x20sent',JSON[_0x95d9('0x10')](_0x467f87));if(_0x467f87[_0x95d9('0x11')]){if(_0x467f87[_0x95d9('0x11')][_0x95d9('0x12')]===0x1f4){logger[_0x95d9('0x11')](_0x95d9('0x13'),_0x5ca01b,_0x467f87[_0x95d9('0x11')][_0x95d9('0x14')]);return _0x272135(_0x467f87['error'][_0x95d9('0x14')]);}logger[_0x95d9('0x11')]('ZendeskAccount,\x20%s,\x20%s',_0x5ca01b,_0x467f87[_0x95d9('0x11')][_0x95d9('0x14')]);return _0xc7413(_0x467f87[_0x95d9('0x11')][_0x95d9('0x14')]);}else{logger[_0x95d9('0xd')]('ZendeskAccount,\x20%s,\x20%s',_0x5ca01b,_0x95d9('0xe'));_0xc7413(_0x467f87[_0x95d9('0x15')][_0x95d9('0x14')]);}})['catch'](function(_0x173ae9){logger[_0x95d9('0x11')](_0x95d9('0x13'),_0x5ca01b,_0x173ae9);_0x272135(_0x173ae9);});});}exports[_0x95d9('0x16')]=function(_0xb3b52a){var _0x3ccc59=this;return new Promise(function(_0x1f58b5,_0x311e4b){return db['ZendeskAccount'][_0x95d9('0x17')]({'raw':_0xb3b52a['options']?_0xb3b52a[_0x95d9('0x18')][_0x95d9('0x19')]===undefined?!![]:![]:!![],'where':_0xb3b52a['options']?_0xb3b52a[_0x95d9('0x18')][_0x95d9('0x1a')]||null:null,'attributes':_0xb3b52a[_0x95d9('0x18')]?_0xb3b52a[_0x95d9('0x18')][_0x95d9('0x1b')]||null:null,'limit':_0xb3b52a['options']?_0xb3b52a[_0x95d9('0x18')]['limit']||null:null,'include':_0xb3b52a[_0x95d9('0x18')]?_0xb3b52a[_0x95d9('0x18')][_0x95d9('0x1c')]?_[_0x95d9('0x1d')](_0xb3b52a[_0x95d9('0x18')]['include'],function(_0x102777){return{'model':db[_0x102777[_0x95d9('0x1e')]],'as':_0x102777['as'],'attributes':_0x102777[_0x95d9('0x1b')],'include':_0x102777[_0x95d9('0x1c')]?_['map'](_0x102777[_0x95d9('0x1c')],function(_0x420041){return{'model':db[_0x420041['model']],'as':_0x420041['as'],'attributes':_0x420041[_0x95d9('0x1b')],'include':_0x420041[_0x95d9('0x1c')]?_[_0x95d9('0x1d')](_0x420041['include'],function(_0x12091c){return{'model':db[_0x12091c[_0x95d9('0x1e')]],'as':_0x12091c['as'],'attributes':_0x12091c['attributes']};}):[]};}):[]};}):[]:[]})[_0x95d9('0xc')](function(_0x5c96ad){logger['info'](_0x95d9('0x16'),_0xb3b52a);logger[_0x95d9('0xf')](_0x95d9('0x16'),_0xb3b52a,JSON['stringify'](_0x5c96ad));_0x1f58b5(_0x5c96ad);})[_0x95d9('0x1f')](function(_0x5cda53){logger[_0x95d9('0x11')](_0x95d9('0x16'),_0x5cda53[_0x95d9('0x14')],_0xb3b52a);_0x311e4b(_0x3ccc59['error'](0x1f4,_0x5cda53[_0x95d9('0x14')]));});});};exports[_0x95d9('0x20')]=function(_0xe710fb){var _0xa72afa=this;return new Promise(function(_0x38c7d6,_0x5de7ec){return db[_0x95d9('0x21')][_0x95d9('0x22')]({'raw':_0xe710fb['options']?_0xe710fb[_0x95d9('0x18')][_0x95d9('0x19')]===undefined?!![]:![]:!![],'where':_0xe710fb['options']?_0xe710fb[_0x95d9('0x18')][_0x95d9('0x1a')]||null:null,'attributes':_0xe710fb[_0x95d9('0x18')]?_0xe710fb[_0x95d9('0x18')][_0x95d9('0x1b')]||null:null,'include':_0xe710fb[_0x95d9('0x18')]?_0xe710fb[_0x95d9('0x18')][_0x95d9('0x1c')]?_[_0x95d9('0x1d')](_0xe710fb[_0x95d9('0x18')][_0x95d9('0x1c')],function(_0x98d4c4){return{'model':db[_0x98d4c4['model']],'as':_0x98d4c4['as'],'attributes':_0x98d4c4['attributes'],'include':_0x98d4c4['include']?_[_0x95d9('0x1d')](_0x98d4c4['include'],function(_0x16a5b8){return{'model':db[_0x16a5b8[_0x95d9('0x1e')]],'as':_0x16a5b8['as'],'attributes':_0x16a5b8['attributes'],'include':_0x16a5b8['include']?_[_0x95d9('0x1d')](_0x16a5b8[_0x95d9('0x1c')],function(_0x58e7f8){return{'model':db[_0x58e7f8[_0x95d9('0x1e')]],'as':_0x58e7f8['as'],'attributes':_0x58e7f8[_0x95d9('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x95d9('0xc')](function(_0x125833){logger['info'](_0x95d9('0x20'),_0xe710fb);logger[_0x95d9('0xf')](_0x95d9('0x20'),_0xe710fb,JSON[_0x95d9('0x10')](_0x125833));_0x38c7d6(_0x125833);})[_0x95d9('0x1f')](function(_0x332880){logger['error']('ShowZendeskAccount',_0x332880['message'],_0xe710fb);_0x5de7ec(_0xa72afa[_0x95d9('0x11')](0x1f4,_0x332880['message']));});});};
\ No newline at end of file
index 6d257d0..02b9d04 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4fc2=['get','/:id/fields','/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','/:id/tags','post','create','put','update','destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../config/environment','./intZendeskConfiguration.controller','isAuthenticated','index','/:id','show'];(function(_0x28bddc,_0x1883e5){var _0x547ba5=function(_0x4fbffb){while(--_0x4fbffb){_0x28bddc['push'](_0x28bddc['shift']());}};_0x547ba5(++_0x1883e5);}(_0x4fc2,0x111));var _0x24fc=function(_0x875527,_0x2234fb){_0x875527=_0x875527-0x0;var _0x23c22c=_0x4fc2[_0x875527];return _0x23c22c;};'use strict';var multer=require(_0x24fc('0x0'));var util=require(_0x24fc('0x1'));var path=require(_0x24fc('0x2'));var timeout=require(_0x24fc('0x3'));var express=require('express');var router=express[_0x24fc('0x4')]();var fs_extra=require(_0x24fc('0x5'));var auth=require(_0x24fc('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x24fc('0x7'));var controller=require(_0x24fc('0x8'));router['get']('/',auth[_0x24fc('0x9')](),controller[_0x24fc('0xa')]);router['get'](_0x24fc('0xb'),auth[_0x24fc('0x9')](),controller[_0x24fc('0xc')]);router[_0x24fc('0xd')](_0x24fc('0xe'),auth[_0x24fc('0x9')](),controller['getFields']);router[_0x24fc('0xd')](_0x24fc('0xf'),auth[_0x24fc('0x9')](),controller[_0x24fc('0x10')]);router[_0x24fc('0xd')](_0x24fc('0x11'),auth[_0x24fc('0x9')](),controller[_0x24fc('0x12')]);router['get'](_0x24fc('0x13'),auth[_0x24fc('0x9')](),controller['getTags']);router[_0x24fc('0x14')]('/',auth[_0x24fc('0x9')](),controller[_0x24fc('0x15')]);router[_0x24fc('0x14')](_0x24fc('0x13'),auth[_0x24fc('0x9')](),controller['setTags']);router[_0x24fc('0x16')](_0x24fc('0xb'),auth[_0x24fc('0x9')](),controller[_0x24fc('0x17')]);router['delete'](_0x24fc('0xb'),auth['isAuthenticated'](),controller[_0x24fc('0x18')]);module[_0x24fc('0x19')]=router;
\ No newline at end of file
+var _0xe706=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZendeskConfiguration.controller','get','isAuthenticated','index','/:id','show','/:id/fields','getFields','/:id/subjects','getSubjects','/:id/descriptions','/:id/tags','getTags','post','create','put','update','delete','exports','multer','util','path','express','Router'];(function(_0xb33eae,_0x18d02d){var _0x59c7a6=function(_0x18841b){while(--_0x18841b){_0xb33eae['push'](_0xb33eae['shift']());}};_0x59c7a6(++_0x18d02d);}(_0xe706,0xa3));var _0x6e70=function(_0x1ba5ba,_0x566734){_0x1ba5ba=_0x1ba5ba-0x0;var _0x5991c6=_0xe706[_0x1ba5ba];return _0x5991c6;};'use strict';var multer=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var path=require(_0x6e70('0x2'));var timeout=require('connect-timeout');var express=require(_0x6e70('0x3'));var router=express[_0x6e70('0x4')]();var fs_extra=require(_0x6e70('0x5'));var auth=require(_0x6e70('0x6'));var interaction=require(_0x6e70('0x7'));var config=require(_0x6e70('0x8'));var controller=require(_0x6e70('0x9'));router[_0x6e70('0xa')]('/',auth[_0x6e70('0xb')](),controller[_0x6e70('0xc')]);router[_0x6e70('0xa')](_0x6e70('0xd'),auth[_0x6e70('0xb')](),controller[_0x6e70('0xe')]);router[_0x6e70('0xa')](_0x6e70('0xf'),auth[_0x6e70('0xb')](),controller[_0x6e70('0x10')]);router[_0x6e70('0xa')](_0x6e70('0x11'),auth[_0x6e70('0xb')](),controller[_0x6e70('0x12')]);router[_0x6e70('0xa')](_0x6e70('0x13'),auth['isAuthenticated'](),controller['getDescriptions']);router[_0x6e70('0xa')](_0x6e70('0x14'),auth[_0x6e70('0xb')](),controller[_0x6e70('0x15')]);router[_0x6e70('0x16')]('/',auth[_0x6e70('0xb')](),controller[_0x6e70('0x17')]);router[_0x6e70('0x16')]('/:id/tags',auth['isAuthenticated'](),controller['setTags']);router[_0x6e70('0x18')]('/:id',auth['isAuthenticated'](),controller[_0x6e70('0x19')]);router[_0x6e70('0x1a')]('/:id',auth[_0x6e70('0xb')](),controller['destroy']);module[_0x6e70('0x1b')]=router;
\ No newline at end of file
index 8f7e855..f583c51 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4a2d=['sequelize','STRING'];(function(_0xfa634c,_0x414e0e){var _0x73e478=function(_0xac2a51){while(--_0xac2a51){_0xfa634c['push'](_0xfa634c['shift']());}};_0x73e478(++_0x414e0e);}(_0x4a2d,0x19e));var _0xd4a2=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x4a2d[_0x2641f9];return _0x585741;};'use strict';var Sequelize=require(_0xd4a2('0x0'));module['exports']={'name':{'type':Sequelize[_0xd4a2('0x1')]},'description':{'type':Sequelize[_0xd4a2('0x1')]}};
\ No newline at end of file
+var _0x112b=['STRING','sequelize','exports'];(function(_0x53d172,_0x46611b){var _0x1bd0a2=function(_0x19fb52){while(--_0x19fb52){_0x53d172['push'](_0x53d172['shift']());}};_0x1bd0a2(++_0x46611b);}(_0x112b,0xf4));var _0xb112=function(_0x1a7e4b,_0x2fbd40){_0x1a7e4b=_0x1a7e4b-0x0;var _0x37a8fd=_0x112b[_0x1a7e4b];return _0x37a8fd;};'use strict';var Sequelize=require(_0xb112('0x0'));module[_0xb112('0x1')]={'name':{'type':Sequelize[_0xb112('0x2')]},'description':{'type':Sequelize[_0xb112('0x2')]}};
\ No newline at end of file
index 58f22f9..784fed4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x62c6=['getSubjects','findOne','getDescriptions','getTags','setTags','ids','eml-format','rimraf','fast-json-patch','request-promise','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','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','offset','undefined','limit','count','set','reject','save','update','then','destroy','end','stack','name','send','index','map','ZendeskConfiguration','rawAttributes','key','model','keys','intersection','attributes','fields','query','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','type','VIRTUAL','options','includeAll','rows','catch','show','params','length','include','find','create','body','getFields','ZendeskField'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0x62c6,0x14e));var _0x662c=function(_0x270cce,_0x4e5f7f){_0x270cce=_0x270cce-0x0;var _0x19375b=_0x62c6[_0x270cce];return _0x19375b;};'use strict';var emlformat=require(_0x662c('0x0'));var rimraf=require(_0x662c('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x662c('0x2'));var rp=require(_0x662c('0x3'));var moment=require('moment');var BPromise=require(_0x662c('0x4'));var Mustache=require('mustache');var util=require(_0x662c('0x5'));var path=require(_0x662c('0x6'));var sox=require(_0x662c('0x7'));var csv=require(_0x662c('0x8'));var ejs=require(_0x662c('0x9'));var fs=require('fs');var fs_extra=require(_0x662c('0xa'));var _=require(_0x662c('0xb'));var squel=require(_0x662c('0xc'));var crypto=require(_0x662c('0xd'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x662c('0x8'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0x662c('0xe'));var authService=require(_0x662c('0xf'));var qs=require(_0x662c('0x10'));var as=require(_0x662c('0x11'));var hardwareService=require(_0x662c('0x12'));var logger=require(_0x662c('0x13'))(_0x662c('0x14'));var utils=require(_0x662c('0x15'));var config=require(_0x662c('0x16'));var licenseUtil=require(_0x662c('0x17'));var db=require(_0x662c('0x18'))['db'];function respondWithStatusCode(_0x2fce67,_0x1d2cfe){_0x1d2cfe=_0x1d2cfe||0xcc;return function(_0x5b57b1){if(_0x5b57b1){return _0x2fce67[_0x662c('0x19')](_0x1d2cfe);}return _0x2fce67[_0x662c('0x1a')](_0x1d2cfe)['end']();};}function respondWithResult(_0x247581,_0x54313c){_0x54313c=_0x54313c||0xc8;return function(_0xcd3d76){if(_0xcd3d76){return _0x247581[_0x662c('0x1a')](_0x54313c)['json'](_0xcd3d76);}};}function respondWithFilteredResult(_0x5931e9,_0x173529){return function(_0x128041){if(_0x128041){var _0x27d06e=typeof _0x173529[_0x662c('0x1b')]===_0x662c('0x1c')&&typeof _0x173529[_0x662c('0x1d')]===_0x662c('0x1c');var _0x40e4d1=_0x128041[_0x662c('0x1e')];var _0x149c28=_0x27d06e?0x0:_0x173529[_0x662c('0x1b')];var _0x6770f2=_0x27d06e?_0x128041[_0x662c('0x1e')]:_0x173529['offset']+_0x173529[_0x662c('0x1d')];var _0x59758d;if(_0x6770f2>=_0x40e4d1){_0x6770f2=_0x40e4d1;_0x59758d=0xc8;}else{_0x59758d=0xce;}_0x5931e9[_0x662c('0x1a')](_0x59758d);return _0x5931e9[_0x662c('0x1f')]('Content-Range',_0x149c28+'-'+_0x6770f2+'/'+_0x40e4d1)['json'](_0x128041);}return null;};}function patchUpdates(_0x21b1b5){return function(_0x123265){try{jsonpatch['apply'](_0x123265,_0x21b1b5,!![]);}catch(_0x2821e2){return BPromise[_0x662c('0x20')](_0x2821e2);}return _0x123265[_0x662c('0x21')]();};}function saveUpdates(_0xdcc124,_0x564372){return function(_0xb97b0e){if(_0xb97b0e){return _0xb97b0e[_0x662c('0x22')](_0xdcc124)[_0x662c('0x23')](function(_0x285d7c){return _0x285d7c;});}return null;};}function removeEntity(_0x4eb287,_0x276b3f){return function(_0x4f80a2){if(_0x4f80a2){return _0x4f80a2[_0x662c('0x24')]()[_0x662c('0x23')](function(){_0x4eb287[_0x662c('0x1a')](0xcc)[_0x662c('0x25')]();});}};}function handleEntityNotFound(_0x4bc571,_0x59bee0){return function(_0x53d445){if(!_0x53d445){_0x4bc571['sendStatus'](0x194);}return _0x53d445;};}function handleError(_0x52e8bb,_0x56f471){_0x56f471=_0x56f471||0x1f4;return function(_0x2dc8eb){logger['error'](_0x2dc8eb[_0x662c('0x26')]);if(_0x2dc8eb[_0x662c('0x27')]){delete _0x2dc8eb['name'];}_0x52e8bb[_0x662c('0x1a')](_0x56f471)[_0x662c('0x28')](_0x2dc8eb);};}exports[_0x662c('0x29')]=function(_0x141e2d,_0x45b7a8){var _0x6bc7e0={},_0x527c52={},_0x2988d1={'count':0x0,'rows':[]};var _0x4f1268=_[_0x662c('0x2a')](db[_0x662c('0x2b')][_0x662c('0x2c')],function(_0x124c68){return{'name':_0x124c68['fieldName'],'type':_0x124c68['type'][_0x662c('0x2d')]};});_0x527c52[_0x662c('0x2e')]=_[_0x662c('0x2a')](_0x4f1268,_0x662c('0x27'));_0x527c52['query']=_[_0x662c('0x2f')](_0x141e2d['query']);_0x527c52['filters']=_[_0x662c('0x30')](_0x527c52['model'],_0x527c52['query']);_0x6bc7e0[_0x662c('0x31')]=_[_0x662c('0x30')](_0x527c52[_0x662c('0x2e')],qs[_0x662c('0x32')](_0x141e2d[_0x662c('0x33')]['fields']));_0x6bc7e0[_0x662c('0x31')]=_0x6bc7e0[_0x662c('0x31')]['length']?_0x6bc7e0[_0x662c('0x31')]:_0x527c52[_0x662c('0x2e')];if(!_0x141e2d[_0x662c('0x33')][_0x662c('0x34')](_0x662c('0x35'))){_0x6bc7e0[_0x662c('0x1d')]=qs['limit'](_0x141e2d[_0x662c('0x33')][_0x662c('0x1d')]);_0x6bc7e0[_0x662c('0x1b')]=qs[_0x662c('0x1b')](_0x141e2d[_0x662c('0x33')][_0x662c('0x1b')]);}_0x6bc7e0[_0x662c('0x36')]=qs['sort'](_0x141e2d[_0x662c('0x33')][_0x662c('0x37')]);_0x6bc7e0[_0x662c('0x38')]=qs[_0x662c('0x39')](_[_0x662c('0x3a')](_0x141e2d[_0x662c('0x33')],_0x527c52['filters']),_0x4f1268);if(_0x141e2d[_0x662c('0x33')][_0x662c('0x3b')]){_0x6bc7e0['where']=_[_0x662c('0x3c')](_0x6bc7e0[_0x662c('0x38')],{'$or':_['map'](_0x4f1268,function(_0x4e2fd4){if(_0x4e2fd4[_0x662c('0x3d')]!==_0x662c('0x3e')){var _0x470d75={};_0x470d75[_0x4e2fd4[_0x662c('0x27')]]={'$like':'%'+_0x141e2d[_0x662c('0x33')][_0x662c('0x3b')]+'%'};return _0x470d75;}})});}_0x6bc7e0=_[_0x662c('0x3c')]({},_0x6bc7e0,_0x141e2d[_0x662c('0x3f')]);var _0x383564={'where':_0x6bc7e0['where']};return db[_0x662c('0x2b')][_0x662c('0x1e')](_0x383564)['then'](function(_0x42f626){_0x2988d1[_0x662c('0x1e')]=_0x42f626;if(_0x141e2d[_0x662c('0x33')][_0x662c('0x40')]){_0x6bc7e0['include']=[{'all':!![]}];}return db[_0x662c('0x2b')]['findAll'](_0x6bc7e0);})['then'](function(_0x93b474){_0x2988d1[_0x662c('0x41')]=_0x93b474;return _0x2988d1;})[_0x662c('0x23')](respondWithFilteredResult(_0x45b7a8,_0x6bc7e0))[_0x662c('0x42')](handleError(_0x45b7a8,null));};exports[_0x662c('0x43')]=function(_0x3e1f4f,_0x134de8){var _0x5b535f={'raw':![],'where':{'id':_0x3e1f4f[_0x662c('0x44')]['id']}},_0x1711ef={};_0x1711ef['model']=_[_0x662c('0x2f')](db['ZendeskConfiguration'][_0x662c('0x2c')]);_0x1711ef[_0x662c('0x33')]=_[_0x662c('0x2f')](_0x3e1f4f['query']);_0x1711ef[_0x662c('0x39')]=_['intersection'](_0x1711ef['model'],_0x1711ef[_0x662c('0x33')]);_0x5b535f[_0x662c('0x31')]=_[_0x662c('0x30')](_0x1711ef['model'],qs[_0x662c('0x32')](_0x3e1f4f[_0x662c('0x33')]['fields']));_0x5b535f[_0x662c('0x31')]=_0x5b535f[_0x662c('0x31')][_0x662c('0x45')]?_0x5b535f[_0x662c('0x31')]:_0x1711ef[_0x662c('0x2e')];if(_0x3e1f4f['query'][_0x662c('0x40')]){_0x5b535f[_0x662c('0x46')]=[{'all':!![]}];}_0x5b535f=_['merge']({},_0x5b535f,_0x3e1f4f[_0x662c('0x3f')]);return db['ZendeskConfiguration'][_0x662c('0x47')](_0x5b535f)[_0x662c('0x23')](handleEntityNotFound(_0x134de8,null))['then'](respondWithResult(_0x134de8,null))['catch'](handleError(_0x134de8,null));};exports[_0x662c('0x48')]=function(_0x305569,_0x3596dd){return db[_0x662c('0x2b')][_0x662c('0x48')](_0x305569['body'],{})['then'](respondWithResult(_0x3596dd,0xc9))[_0x662c('0x42')](handleError(_0x3596dd,null));};exports['update']=function(_0x35fbdb,_0x4690a2){if(_0x35fbdb['body']['id']){delete _0x35fbdb[_0x662c('0x49')]['id'];}return db[_0x662c('0x2b')]['find']({'where':{'id':_0x35fbdb[_0x662c('0x44')]['id']}})[_0x662c('0x23')](handleEntityNotFound(_0x4690a2,null))['then'](saveUpdates(_0x35fbdb[_0x662c('0x49')],null))[_0x662c('0x23')](respondWithResult(_0x4690a2,null))[_0x662c('0x42')](handleError(_0x4690a2,null));};exports[_0x662c('0x24')]=function(_0x116e85,_0x566628){return db[_0x662c('0x2b')][_0x662c('0x47')]({'where':{'id':_0x116e85[_0x662c('0x44')]['id']}})[_0x662c('0x23')](handleEntityNotFound(_0x566628,null))[_0x662c('0x23')](removeEntity(_0x566628,null))[_0x662c('0x42')](handleError(_0x566628,null));};exports[_0x662c('0x4a')]=function(_0x5d6b3e,_0x5cb5f0,_0x3f881e){var _0x27464f={};var _0x2370ee={};var _0x5a4246;var _0x202705;return db[_0x662c('0x2b')]['findOne']({'where':{'id':_0x5d6b3e[_0x662c('0x44')]['id']}})['then'](handleEntityNotFound(_0x5cb5f0,null))[_0x662c('0x23')](function(_0x8b368e){if(_0x8b368e){_0x5a4246=_0x8b368e;_0x2370ee['model']=_['keys'](db[_0x662c('0x4b')][_0x662c('0x2c')]);_0x2370ee['query']=_[_0x662c('0x2f')](_0x5d6b3e['query']);_0x2370ee[_0x662c('0x39')]=_[_0x662c('0x30')](_0x2370ee[_0x662c('0x2e')],_0x2370ee[_0x662c('0x33')]);_0x27464f[_0x662c('0x31')]=_['intersection'](_0x2370ee[_0x662c('0x2e')],qs[_0x662c('0x32')](_0x5d6b3e['query'][_0x662c('0x32')]));_0x27464f[_0x662c('0x31')]=_0x27464f[_0x662c('0x31')]['length']?_0x27464f[_0x662c('0x31')]:_0x2370ee[_0x662c('0x2e')];_0x27464f[_0x662c('0x36')]=qs[_0x662c('0x37')](_0x5d6b3e[_0x662c('0x33')][_0x662c('0x37')]);_0x27464f[_0x662c('0x38')]=qs[_0x662c('0x39')](_[_0x662c('0x3a')](_0x5d6b3e[_0x662c('0x33')],_0x2370ee[_0x662c('0x39')]));if(_0x5d6b3e[_0x662c('0x33')][_0x662c('0x3b')]){_0x27464f['where']=_[_0x662c('0x3c')](_0x27464f[_0x662c('0x38')],{'$or':_[_0x662c('0x2a')](_0x27464f[_0x662c('0x31')],function(_0x5c1701){var _0x42d591={};_0x42d591[_0x5c1701]={'$like':'%'+_0x5d6b3e[_0x662c('0x33')][_0x662c('0x3b')]+'%'};return _0x42d591;})});}_0x27464f=_[_0x662c('0x3c')]({},_0x27464f,_0x5d6b3e[_0x662c('0x3f')]);return _0x5a4246['getFields'](_0x27464f);}})[_0x662c('0x23')](function(_0x552703){if(_0x552703){_0x202705=_0x552703['length'];if(!_0x5d6b3e[_0x662c('0x33')]['hasOwnProperty'](_0x662c('0x35'))){_0x27464f['limit']=qs[_0x662c('0x1d')](_0x5d6b3e[_0x662c('0x33')][_0x662c('0x1d')]);_0x27464f['offset']=qs[_0x662c('0x1b')](_0x5d6b3e['query'][_0x662c('0x1b')]);}return _0x5a4246[_0x662c('0x4a')](_0x27464f);}})['then'](function(_0x3c3e28){if(_0x3c3e28){return _0x3c3e28?{'count':_0x202705,'rows':_0x3c3e28}:null;}})[_0x662c('0x23')](respondWithResult(_0x5cb5f0,null))['catch'](handleError(_0x5cb5f0,null));};exports[_0x662c('0x4c')]=function(_0xd6b18f,_0x19968d,_0xabbf31){var _0x39d3db={};var _0x540d22={};var _0x5cb0e8;var _0xb973d4;return db[_0x662c('0x2b')][_0x662c('0x4d')]({'where':{'id':_0xd6b18f['params']['id']}})[_0x662c('0x23')](handleEntityNotFound(_0x19968d,null))[_0x662c('0x23')](function(_0x4ba7dc){if(_0x4ba7dc){_0x5cb0e8=_0x4ba7dc;_0x540d22[_0x662c('0x2e')]=_[_0x662c('0x2f')](db['ZendeskField'][_0x662c('0x2c')]);_0x540d22[_0x662c('0x33')]=_[_0x662c('0x2f')](_0xd6b18f['query']);_0x540d22['filters']=_[_0x662c('0x30')](_0x540d22[_0x662c('0x2e')],_0x540d22[_0x662c('0x33')]);_0x39d3db[_0x662c('0x31')]=_[_0x662c('0x30')](_0x540d22[_0x662c('0x2e')],qs[_0x662c('0x32')](_0xd6b18f['query'][_0x662c('0x32')]));_0x39d3db[_0x662c('0x31')]=_0x39d3db['attributes']['length']?_0x39d3db[_0x662c('0x31')]:_0x540d22['model'];_0x39d3db[_0x662c('0x36')]=qs[_0x662c('0x37')](_0xd6b18f[_0x662c('0x33')][_0x662c('0x37')]);_0x39d3db[_0x662c('0x38')]=qs[_0x662c('0x39')](_[_0x662c('0x3a')](_0xd6b18f[_0x662c('0x33')],_0x540d22[_0x662c('0x39')]));if(_0xd6b18f['query'][_0x662c('0x3b')]){_0x39d3db['where']=_[_0x662c('0x3c')](_0x39d3db[_0x662c('0x38')],{'$or':_[_0x662c('0x2a')](_0x39d3db[_0x662c('0x31')],function(_0x5ab83d){var _0x3d8ad1={};_0x3d8ad1[_0x5ab83d]={'$like':'%'+_0xd6b18f[_0x662c('0x33')]['filter']+'%'};return _0x3d8ad1;})});}_0x39d3db=_['merge']({},_0x39d3db,_0xd6b18f[_0x662c('0x3f')]);return _0x5cb0e8[_0x662c('0x4c')](_0x39d3db);}})[_0x662c('0x23')](function(_0x5cb727){if(_0x5cb727){_0xb973d4=_0x5cb727['length'];if(!_0xd6b18f[_0x662c('0x33')][_0x662c('0x34')](_0x662c('0x35'))){_0x39d3db['limit']=qs[_0x662c('0x1d')](_0xd6b18f[_0x662c('0x33')][_0x662c('0x1d')]);_0x39d3db[_0x662c('0x1b')]=qs[_0x662c('0x1b')](_0xd6b18f[_0x662c('0x33')]['offset']);}return _0x5cb0e8['getSubjects'](_0x39d3db);}})['then'](function(_0x1badab){if(_0x1badab){return _0x1badab?{'count':_0xb973d4,'rows':_0x1badab}:null;}})[_0x662c('0x23')](respondWithResult(_0x19968d,null))[_0x662c('0x42')](handleError(_0x19968d,null));};exports[_0x662c('0x4e')]=function(_0x46f6cc,_0x4ee373,_0x1cc4e2){var _0x2bb4d9={};var _0x5ba991={};var _0x531612;var _0xf72df0;return db[_0x662c('0x2b')][_0x662c('0x4d')]({'where':{'id':_0x46f6cc[_0x662c('0x44')]['id']}})[_0x662c('0x23')](handleEntityNotFound(_0x4ee373,null))[_0x662c('0x23')](function(_0xbbbf90){if(_0xbbbf90){_0x531612=_0xbbbf90;_0x5ba991[_0x662c('0x2e')]=_[_0x662c('0x2f')](db[_0x662c('0x4b')]['rawAttributes']);_0x5ba991[_0x662c('0x33')]=_[_0x662c('0x2f')](_0x46f6cc['query']);_0x5ba991[_0x662c('0x39')]=_[_0x662c('0x30')](_0x5ba991[_0x662c('0x2e')],_0x5ba991['query']);_0x2bb4d9[_0x662c('0x31')]=_['intersection'](_0x5ba991['model'],qs[_0x662c('0x32')](_0x46f6cc['query'][_0x662c('0x32')]));_0x2bb4d9[_0x662c('0x31')]=_0x2bb4d9['attributes'][_0x662c('0x45')]?_0x2bb4d9[_0x662c('0x31')]:_0x5ba991['model'];_0x2bb4d9[_0x662c('0x36')]=qs['sort'](_0x46f6cc[_0x662c('0x33')][_0x662c('0x37')]);_0x2bb4d9[_0x662c('0x38')]=qs[_0x662c('0x39')](_[_0x662c('0x3a')](_0x46f6cc['query'],_0x5ba991[_0x662c('0x39')]));if(_0x46f6cc[_0x662c('0x33')]['filter']){_0x2bb4d9[_0x662c('0x38')]=_[_0x662c('0x3c')](_0x2bb4d9['where'],{'$or':_['map'](_0x2bb4d9['attributes'],function(_0x32253b){var _0x58e73a={};_0x58e73a[_0x32253b]={'$like':'%'+_0x46f6cc[_0x662c('0x33')][_0x662c('0x3b')]+'%'};return _0x58e73a;})});}_0x2bb4d9=_[_0x662c('0x3c')]({},_0x2bb4d9,_0x46f6cc[_0x662c('0x3f')]);return _0x531612['getDescriptions'](_0x2bb4d9);}})[_0x662c('0x23')](function(_0x10bf84){if(_0x10bf84){_0xf72df0=_0x10bf84[_0x662c('0x45')];if(!_0x46f6cc['query'][_0x662c('0x34')]('nolimit')){_0x2bb4d9[_0x662c('0x1d')]=qs['limit'](_0x46f6cc[_0x662c('0x33')]['limit']);_0x2bb4d9['offset']=qs[_0x662c('0x1b')](_0x46f6cc[_0x662c('0x33')]['offset']);}return _0x531612[_0x662c('0x4e')](_0x2bb4d9);}})[_0x662c('0x23')](function(_0x1c8345){if(_0x1c8345){return _0x1c8345?{'count':_0xf72df0,'rows':_0x1c8345}:null;}})[_0x662c('0x23')](respondWithResult(_0x4ee373,null))[_0x662c('0x42')](handleError(_0x4ee373,null));};exports['getTags']=function(_0x44fa2f,_0x42899f,_0x16c997){var _0x5e4fd7={};var _0x1713b2={};var _0xd9455c;var _0x177701;return db[_0x662c('0x2b')][_0x662c('0x4d')]({'where':{'id':_0x44fa2f['params']['id']}})[_0x662c('0x23')](handleEntityNotFound(_0x42899f,null))[_0x662c('0x23')](function(_0x14f667){if(_0x14f667){_0xd9455c=_0x14f667;_0x1713b2[_0x662c('0x2e')]=_[_0x662c('0x2f')](db['Tag'][_0x662c('0x2c')]);_0x1713b2[_0x662c('0x33')]=_[_0x662c('0x2f')](_0x44fa2f[_0x662c('0x33')]);_0x1713b2['filters']=_[_0x662c('0x30')](_0x1713b2['model'],_0x1713b2[_0x662c('0x33')]);_0x5e4fd7[_0x662c('0x31')]=_[_0x662c('0x30')](_0x1713b2[_0x662c('0x2e')],qs[_0x662c('0x32')](_0x44fa2f['query'][_0x662c('0x32')]));_0x5e4fd7[_0x662c('0x31')]=_0x5e4fd7[_0x662c('0x31')]['length']?_0x5e4fd7['attributes']:_0x1713b2[_0x662c('0x2e')];_0x5e4fd7[_0x662c('0x36')]=qs[_0x662c('0x37')](_0x44fa2f[_0x662c('0x33')][_0x662c('0x37')]);_0x5e4fd7[_0x662c('0x38')]=qs[_0x662c('0x39')](_[_0x662c('0x3a')](_0x44fa2f[_0x662c('0x33')],_0x1713b2[_0x662c('0x39')]));if(_0x44fa2f['query']['filter']){_0x5e4fd7['where']=_[_0x662c('0x3c')](_0x5e4fd7[_0x662c('0x38')],{'$or':_[_0x662c('0x2a')](_0x5e4fd7[_0x662c('0x31')],function(_0x306242){var _0x2232c5={};_0x2232c5[_0x306242]={'$like':'%'+_0x44fa2f[_0x662c('0x33')][_0x662c('0x3b')]+'%'};return _0x2232c5;})});}_0x5e4fd7=_['merge']({},_0x5e4fd7,_0x44fa2f[_0x662c('0x3f')]);return _0xd9455c[_0x662c('0x4f')](_0x5e4fd7);}})['then'](function(_0x1f09c7){if(_0x1f09c7){_0x177701=_0x1f09c7[_0x662c('0x45')];if(!_0x44fa2f['query']['hasOwnProperty']('nolimit')){_0x5e4fd7['limit']=qs[_0x662c('0x1d')](_0x44fa2f[_0x662c('0x33')][_0x662c('0x1d')]);_0x5e4fd7[_0x662c('0x1b')]=qs[_0x662c('0x1b')](_0x44fa2f[_0x662c('0x33')]['offset']);}return _0xd9455c[_0x662c('0x4f')](_0x5e4fd7);}})[_0x662c('0x23')](function(_0x1ddd8b){if(_0x1ddd8b){return _0x1ddd8b?{'count':_0x177701,'rows':_0x1ddd8b}:null;}})[_0x662c('0x23')](respondWithResult(_0x42899f,null))[_0x662c('0x42')](handleError(_0x42899f,null));};exports[_0x662c('0x50')]=function(_0x353aca,_0x4cf7f6,_0x454dce){if(_0x353aca['body']['id']){delete _0x353aca[_0x662c('0x49')]['id'];}return db[_0x662c('0x2b')][_0x662c('0x4d')]({'where':{'id':_0x353aca[_0x662c('0x44')]['id']}})['then'](handleEntityNotFound(_0x4cf7f6,null))[_0x662c('0x23')](function(_0x1e9b0){if(_0x1e9b0){return _0x1e9b0[_0x662c('0x50')](_0x353aca['body'][_0x662c('0x51')]||[]);}return null;})['then'](respondWithResult(_0x4cf7f6,null))[_0x662c('0x42')](handleError(_0x4cf7f6,null));};
\ No newline at end of file
+var _0x61b9=['zip-dir','request-promise','moment','bluebird','util','path','sox','ejs','fs-extra','squel','crypto','jsforce','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','save','destroy','then','error','stack','name','send','map','ZendeskConfiguration','rawAttributes','type','query','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','filters','pick','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','keys','find','create','body','getFields','findOne','ZendeskField','getSubjects','getDescriptions','getTags','setTags','ids','eml-format','rimraf'];(function(_0x4080ec,_0x5d3f21){var _0x3cce9a=function(_0x13b1b2){while(--_0x13b1b2){_0x4080ec['push'](_0x4080ec['shift']());}};_0x3cce9a(++_0x5d3f21);}(_0x61b9,0x198));var _0x961b=function(_0x2cfb58,_0x3d9412){_0x2cfb58=_0x2cfb58-0x0;var _0xd99951=_0x61b9[_0x2cfb58];return _0xd99951;};'use strict';var emlformat=require(_0x961b('0x0'));var rimraf=require(_0x961b('0x1'));var zipdir=require(_0x961b('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x961b('0x3'));var moment=require(_0x961b('0x4'));var BPromise=require(_0x961b('0x5'));var Mustache=require('mustache');var util=require(_0x961b('0x6'));var path=require(_0x961b('0x7'));var sox=require(_0x961b('0x8'));var csv=require('to-csv');var ejs=require(_0x961b('0x9'));var fs=require('fs');var fs_extra=require(_0x961b('0xa'));var _=require('lodash');var squel=require(_0x961b('0xb'));var crypto=require(_0x961b('0xc'));var jsforce=require(_0x961b('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x961b('0xe'));var querystring=require(_0x961b('0xf'));var Papa=require(_0x961b('0x10'));var Redis=require('ioredis');var authService=require(_0x961b('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x961b('0x12'));var hardwareService=require(_0x961b('0x13'));var logger=require(_0x961b('0x14'))(_0x961b('0x15'));var utils=require(_0x961b('0x16'));var config=require(_0x961b('0x17'));var licenseUtil=require(_0x961b('0x18'));var db=require(_0x961b('0x19'))['db'];function respondWithStatusCode(_0x47b9ce,_0x57e219){_0x57e219=_0x57e219||0xcc;return function(_0x1bfb10){if(_0x1bfb10){return _0x47b9ce[_0x961b('0x1a')](_0x57e219);}return _0x47b9ce[_0x961b('0x1b')](_0x57e219)[_0x961b('0x1c')]();};}function respondWithResult(_0x4f416b,_0xb21c2a){_0xb21c2a=_0xb21c2a||0xc8;return function(_0x2d3e6e){if(_0x2d3e6e){return _0x4f416b['status'](_0xb21c2a)[_0x961b('0x1d')](_0x2d3e6e);}};}function respondWithFilteredResult(_0x1d9392,_0x5eafbe){return function(_0x5ac4fc){if(_0x5ac4fc){var _0x1fefac=typeof _0x5eafbe[_0x961b('0x1e')]===_0x961b('0x1f')&&typeof _0x5eafbe[_0x961b('0x20')]===_0x961b('0x1f');var _0x170189=_0x5ac4fc[_0x961b('0x21')];var _0x12efbc=_0x1fefac?0x0:_0x5eafbe['offset'];var _0x303a65=_0x1fefac?_0x5ac4fc[_0x961b('0x21')]:_0x5eafbe[_0x961b('0x1e')]+_0x5eafbe['limit'];var _0x4cfeea;if(_0x303a65>=_0x170189){_0x303a65=_0x170189;_0x4cfeea=0xc8;}else{_0x4cfeea=0xce;}_0x1d9392[_0x961b('0x1b')](_0x4cfeea);return _0x1d9392[_0x961b('0x22')]('Content-Range',_0x12efbc+'-'+_0x303a65+'/'+_0x170189)[_0x961b('0x1d')](_0x5ac4fc);}return null;};}function patchUpdates(_0x1b0d8b){return function(_0x4210cb){try{jsonpatch[_0x961b('0x23')](_0x4210cb,_0x1b0d8b,!![]);}catch(_0x106f46){return BPromise['reject'](_0x106f46);}return _0x4210cb[_0x961b('0x24')]();};}function saveUpdates(_0x221dba,_0x480158){return function(_0xf29c5){if(_0xf29c5){return _0xf29c5['update'](_0x221dba)['then'](function(_0x22df04){return _0x22df04;});}return null;};}function removeEntity(_0x490e76,_0xb8675){return function(_0x7b13a8){if(_0x7b13a8){return _0x7b13a8[_0x961b('0x25')]()[_0x961b('0x26')](function(){_0x490e76[_0x961b('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3d72e9,_0x1a90f3){return function(_0x34fd06){if(!_0x34fd06){_0x3d72e9[_0x961b('0x1a')](0x194);}return _0x34fd06;};}function handleError(_0x19bfb4,_0x3b672e){_0x3b672e=_0x3b672e||0x1f4;return function(_0x2c7be8){logger[_0x961b('0x27')](_0x2c7be8[_0x961b('0x28')]);if(_0x2c7be8[_0x961b('0x29')]){delete _0x2c7be8[_0x961b('0x29')];}_0x19bfb4[_0x961b('0x1b')](_0x3b672e)[_0x961b('0x2a')](_0x2c7be8);};}exports['index']=function(_0x5949bd,_0x460b0d){var _0x59edec={},_0x4cb6e1={},_0x1d59c0={'count':0x0,'rows':[]};var _0x19712d=_[_0x961b('0x2b')](db[_0x961b('0x2c')][_0x961b('0x2d')],function(_0x184141){return{'name':_0x184141['fieldName'],'type':_0x184141[_0x961b('0x2e')]['key']};});_0x4cb6e1['model']=_['map'](_0x19712d,_0x961b('0x29'));_0x4cb6e1[_0x961b('0x2f')]=_['keys'](_0x5949bd[_0x961b('0x2f')]);_0x4cb6e1['filters']=_[_0x961b('0x30')](_0x4cb6e1['model'],_0x4cb6e1[_0x961b('0x2f')]);_0x59edec['attributes']=_[_0x961b('0x30')](_0x4cb6e1[_0x961b('0x31')],qs[_0x961b('0x32')](_0x5949bd[_0x961b('0x2f')][_0x961b('0x32')]));_0x59edec[_0x961b('0x33')]=_0x59edec[_0x961b('0x33')][_0x961b('0x34')]?_0x59edec[_0x961b('0x33')]:_0x4cb6e1[_0x961b('0x31')];if(!_0x5949bd[_0x961b('0x2f')][_0x961b('0x35')](_0x961b('0x36'))){_0x59edec[_0x961b('0x20')]=qs[_0x961b('0x20')](_0x5949bd[_0x961b('0x2f')][_0x961b('0x20')]);_0x59edec[_0x961b('0x1e')]=qs['offset'](_0x5949bd['query'][_0x961b('0x1e')]);}_0x59edec[_0x961b('0x37')]=qs[_0x961b('0x38')](_0x5949bd['query'][_0x961b('0x38')]);_0x59edec['where']=qs[_0x961b('0x39')](_[_0x961b('0x3a')](_0x5949bd[_0x961b('0x2f')],_0x4cb6e1[_0x961b('0x39')]),_0x19712d);if(_0x5949bd['query'][_0x961b('0x3b')]){_0x59edec[_0x961b('0x3c')]=_[_0x961b('0x3d')](_0x59edec['where'],{'$or':_['map'](_0x19712d,function(_0x487818){if(_0x487818[_0x961b('0x2e')]!==_0x961b('0x3e')){var _0x1b7b14={};_0x1b7b14[_0x487818['name']]={'$like':'%'+_0x5949bd[_0x961b('0x2f')]['filter']+'%'};return _0x1b7b14;}})});}_0x59edec=_[_0x961b('0x3d')]({},_0x59edec,_0x5949bd[_0x961b('0x3f')]);var _0x3abc8a={'where':_0x59edec[_0x961b('0x3c')]};return db[_0x961b('0x2c')][_0x961b('0x21')](_0x3abc8a)[_0x961b('0x26')](function(_0x330195){_0x1d59c0[_0x961b('0x21')]=_0x330195;if(_0x5949bd[_0x961b('0x2f')][_0x961b('0x40')]){_0x59edec[_0x961b('0x41')]=[{'all':!![]}];}return db[_0x961b('0x2c')][_0x961b('0x42')](_0x59edec);})['then'](function(_0x579610){_0x1d59c0[_0x961b('0x43')]=_0x579610;return _0x1d59c0;})['then'](respondWithFilteredResult(_0x460b0d,_0x59edec))[_0x961b('0x44')](handleError(_0x460b0d,null));};exports['show']=function(_0x50f358,_0x1c8c2d){var _0x5a40b4={'raw':![],'where':{'id':_0x50f358[_0x961b('0x45')]['id']}},_0x5e8b4a={};_0x5e8b4a[_0x961b('0x31')]=_['keys'](db[_0x961b('0x2c')][_0x961b('0x2d')]);_0x5e8b4a[_0x961b('0x2f')]=_[_0x961b('0x46')](_0x50f358[_0x961b('0x2f')]);_0x5e8b4a[_0x961b('0x39')]=_[_0x961b('0x30')](_0x5e8b4a['model'],_0x5e8b4a[_0x961b('0x2f')]);_0x5a40b4['attributes']=_[_0x961b('0x30')](_0x5e8b4a[_0x961b('0x31')],qs['fields'](_0x50f358[_0x961b('0x2f')][_0x961b('0x32')]));_0x5a40b4[_0x961b('0x33')]=_0x5a40b4[_0x961b('0x33')]['length']?_0x5a40b4[_0x961b('0x33')]:_0x5e8b4a[_0x961b('0x31')];if(_0x50f358[_0x961b('0x2f')][_0x961b('0x40')]){_0x5a40b4[_0x961b('0x41')]=[{'all':!![]}];}_0x5a40b4=_[_0x961b('0x3d')]({},_0x5a40b4,_0x50f358['options']);return db[_0x961b('0x2c')][_0x961b('0x47')](_0x5a40b4)[_0x961b('0x26')](handleEntityNotFound(_0x1c8c2d,null))[_0x961b('0x26')](respondWithResult(_0x1c8c2d,null))[_0x961b('0x44')](handleError(_0x1c8c2d,null));};exports[_0x961b('0x48')]=function(_0x3e01b2,_0x5b3254){return db['ZendeskConfiguration']['create'](_0x3e01b2[_0x961b('0x49')],{})[_0x961b('0x26')](respondWithResult(_0x5b3254,0xc9))[_0x961b('0x44')](handleError(_0x5b3254,null));};exports['update']=function(_0x5b518e,_0x3fa549){if(_0x5b518e[_0x961b('0x49')]['id']){delete _0x5b518e[_0x961b('0x49')]['id'];}return db[_0x961b('0x2c')][_0x961b('0x47')]({'where':{'id':_0x5b518e['params']['id']}})[_0x961b('0x26')](handleEntityNotFound(_0x3fa549,null))['then'](saveUpdates(_0x5b518e[_0x961b('0x49')],null))['then'](respondWithResult(_0x3fa549,null))[_0x961b('0x44')](handleError(_0x3fa549,null));};exports['destroy']=function(_0x33ddfc,_0xf45614){return db[_0x961b('0x2c')][_0x961b('0x47')]({'where':{'id':_0x33ddfc[_0x961b('0x45')]['id']}})[_0x961b('0x26')](handleEntityNotFound(_0xf45614,null))[_0x961b('0x26')](removeEntity(_0xf45614,null))[_0x961b('0x44')](handleError(_0xf45614,null));};exports[_0x961b('0x4a')]=function(_0x245a33,_0x35b227,_0x4c167c){var _0x5920b7={};var _0x394831={};var _0x292107;var _0xf5e8d5;return db[_0x961b('0x2c')][_0x961b('0x4b')]({'where':{'id':_0x245a33[_0x961b('0x45')]['id']}})['then'](handleEntityNotFound(_0x35b227,null))['then'](function(_0x878171){if(_0x878171){_0x292107=_0x878171;_0x394831['model']=_[_0x961b('0x46')](db[_0x961b('0x4c')][_0x961b('0x2d')]);_0x394831[_0x961b('0x2f')]=_[_0x961b('0x46')](_0x245a33[_0x961b('0x2f')]);_0x394831[_0x961b('0x39')]=_[_0x961b('0x30')](_0x394831[_0x961b('0x31')],_0x394831['query']);_0x5920b7[_0x961b('0x33')]=_[_0x961b('0x30')](_0x394831[_0x961b('0x31')],qs[_0x961b('0x32')](_0x245a33[_0x961b('0x2f')][_0x961b('0x32')]));_0x5920b7['attributes']=_0x5920b7[_0x961b('0x33')][_0x961b('0x34')]?_0x5920b7[_0x961b('0x33')]:_0x394831[_0x961b('0x31')];_0x5920b7[_0x961b('0x37')]=qs[_0x961b('0x38')](_0x245a33['query'][_0x961b('0x38')]);_0x5920b7[_0x961b('0x3c')]=qs['filters'](_['pick'](_0x245a33[_0x961b('0x2f')],_0x394831[_0x961b('0x39')]));if(_0x245a33['query'][_0x961b('0x3b')]){_0x5920b7[_0x961b('0x3c')]=_['merge'](_0x5920b7[_0x961b('0x3c')],{'$or':_[_0x961b('0x2b')](_0x5920b7['attributes'],function(_0x56287a){var _0x171b7a={};_0x171b7a[_0x56287a]={'$like':'%'+_0x245a33[_0x961b('0x2f')][_0x961b('0x3b')]+'%'};return _0x171b7a;})});}_0x5920b7=_['merge']({},_0x5920b7,_0x245a33[_0x961b('0x3f')]);return _0x292107[_0x961b('0x4a')](_0x5920b7);}})[_0x961b('0x26')](function(_0x49c8ed){if(_0x49c8ed){_0xf5e8d5=_0x49c8ed['length'];if(!_0x245a33[_0x961b('0x2f')][_0x961b('0x35')](_0x961b('0x36'))){_0x5920b7[_0x961b('0x20')]=qs[_0x961b('0x20')](_0x245a33[_0x961b('0x2f')][_0x961b('0x20')]);_0x5920b7[_0x961b('0x1e')]=qs[_0x961b('0x1e')](_0x245a33[_0x961b('0x2f')][_0x961b('0x1e')]);}return _0x292107[_0x961b('0x4a')](_0x5920b7);}})['then'](function(_0x379ae3){if(_0x379ae3){return _0x379ae3?{'count':_0xf5e8d5,'rows':_0x379ae3}:null;}})[_0x961b('0x26')](respondWithResult(_0x35b227,null))[_0x961b('0x44')](handleError(_0x35b227,null));};exports['getSubjects']=function(_0x3e9325,_0x5a0ee9,_0x35e89f){var _0x227634={};var _0xe32783={};var _0x512f62;var _0x54d708;return db['ZendeskConfiguration'][_0x961b('0x4b')]({'where':{'id':_0x3e9325[_0x961b('0x45')]['id']}})[_0x961b('0x26')](handleEntityNotFound(_0x5a0ee9,null))[_0x961b('0x26')](function(_0x2e40f2){if(_0x2e40f2){_0x512f62=_0x2e40f2;_0xe32783[_0x961b('0x31')]=_['keys'](db[_0x961b('0x4c')][_0x961b('0x2d')]);_0xe32783[_0x961b('0x2f')]=_[_0x961b('0x46')](_0x3e9325[_0x961b('0x2f')]);_0xe32783['filters']=_[_0x961b('0x30')](_0xe32783['model'],_0xe32783['query']);_0x227634['attributes']=_['intersection'](_0xe32783[_0x961b('0x31')],qs[_0x961b('0x32')](_0x3e9325[_0x961b('0x2f')][_0x961b('0x32')]));_0x227634[_0x961b('0x33')]=_0x227634[_0x961b('0x33')][_0x961b('0x34')]?_0x227634['attributes']:_0xe32783['model'];_0x227634['order']=qs['sort'](_0x3e9325[_0x961b('0x2f')][_0x961b('0x38')]);_0x227634[_0x961b('0x3c')]=qs[_0x961b('0x39')](_[_0x961b('0x3a')](_0x3e9325[_0x961b('0x2f')],_0xe32783[_0x961b('0x39')]));if(_0x3e9325[_0x961b('0x2f')][_0x961b('0x3b')]){_0x227634[_0x961b('0x3c')]=_[_0x961b('0x3d')](_0x227634[_0x961b('0x3c')],{'$or':_[_0x961b('0x2b')](_0x227634[_0x961b('0x33')],function(_0x5efb43){var _0x4c0b2d={};_0x4c0b2d[_0x5efb43]={'$like':'%'+_0x3e9325[_0x961b('0x2f')][_0x961b('0x3b')]+'%'};return _0x4c0b2d;})});}_0x227634=_['merge']({},_0x227634,_0x3e9325['options']);return _0x512f62[_0x961b('0x4d')](_0x227634);}})[_0x961b('0x26')](function(_0x54bd26){if(_0x54bd26){_0x54d708=_0x54bd26[_0x961b('0x34')];if(!_0x3e9325[_0x961b('0x2f')][_0x961b('0x35')](_0x961b('0x36'))){_0x227634[_0x961b('0x20')]=qs[_0x961b('0x20')](_0x3e9325[_0x961b('0x2f')][_0x961b('0x20')]);_0x227634[_0x961b('0x1e')]=qs[_0x961b('0x1e')](_0x3e9325['query'][_0x961b('0x1e')]);}return _0x512f62[_0x961b('0x4d')](_0x227634);}})[_0x961b('0x26')](function(_0x433f31){if(_0x433f31){return _0x433f31?{'count':_0x54d708,'rows':_0x433f31}:null;}})[_0x961b('0x26')](respondWithResult(_0x5a0ee9,null))[_0x961b('0x44')](handleError(_0x5a0ee9,null));};exports[_0x961b('0x4e')]=function(_0x28dd01,_0x55b3e1,_0x3e8a91){var _0x4dbf97={};var _0x5d5d2c={};var _0x348658;var _0x576381;return db[_0x961b('0x2c')][_0x961b('0x4b')]({'where':{'id':_0x28dd01['params']['id']}})[_0x961b('0x26')](handleEntityNotFound(_0x55b3e1,null))[_0x961b('0x26')](function(_0x802e2f){if(_0x802e2f){_0x348658=_0x802e2f;_0x5d5d2c[_0x961b('0x31')]=_[_0x961b('0x46')](db['ZendeskField']['rawAttributes']);_0x5d5d2c[_0x961b('0x2f')]=_[_0x961b('0x46')](_0x28dd01[_0x961b('0x2f')]);_0x5d5d2c['filters']=_[_0x961b('0x30')](_0x5d5d2c[_0x961b('0x31')],_0x5d5d2c[_0x961b('0x2f')]);_0x4dbf97[_0x961b('0x33')]=_[_0x961b('0x30')](_0x5d5d2c[_0x961b('0x31')],qs[_0x961b('0x32')](_0x28dd01['query']['fields']));_0x4dbf97['attributes']=_0x4dbf97[_0x961b('0x33')][_0x961b('0x34')]?_0x4dbf97[_0x961b('0x33')]:_0x5d5d2c[_0x961b('0x31')];_0x4dbf97[_0x961b('0x37')]=qs['sort'](_0x28dd01[_0x961b('0x2f')][_0x961b('0x38')]);_0x4dbf97[_0x961b('0x3c')]=qs[_0x961b('0x39')](_['pick'](_0x28dd01['query'],_0x5d5d2c['filters']));if(_0x28dd01['query'][_0x961b('0x3b')]){_0x4dbf97[_0x961b('0x3c')]=_[_0x961b('0x3d')](_0x4dbf97[_0x961b('0x3c')],{'$or':_[_0x961b('0x2b')](_0x4dbf97[_0x961b('0x33')],function(_0x4941c5){var _0x36e5d5={};_0x36e5d5[_0x4941c5]={'$like':'%'+_0x28dd01['query'][_0x961b('0x3b')]+'%'};return _0x36e5d5;})});}_0x4dbf97=_[_0x961b('0x3d')]({},_0x4dbf97,_0x28dd01[_0x961b('0x3f')]);return _0x348658['getDescriptions'](_0x4dbf97);}})['then'](function(_0x56b83b){if(_0x56b83b){_0x576381=_0x56b83b[_0x961b('0x34')];if(!_0x28dd01[_0x961b('0x2f')][_0x961b('0x35')](_0x961b('0x36'))){_0x4dbf97[_0x961b('0x20')]=qs[_0x961b('0x20')](_0x28dd01[_0x961b('0x2f')][_0x961b('0x20')]);_0x4dbf97[_0x961b('0x1e')]=qs[_0x961b('0x1e')](_0x28dd01['query'][_0x961b('0x1e')]);}return _0x348658['getDescriptions'](_0x4dbf97);}})[_0x961b('0x26')](function(_0x2f43b4){if(_0x2f43b4){return _0x2f43b4?{'count':_0x576381,'rows':_0x2f43b4}:null;}})[_0x961b('0x26')](respondWithResult(_0x55b3e1,null))['catch'](handleError(_0x55b3e1,null));};exports[_0x961b('0x4f')]=function(_0x203d61,_0x4bf8a8,_0x33f38b){var _0x13bc3d={};var _0x558752={};var _0x5c4ad9;var _0x214dac;return db['ZendeskConfiguration'][_0x961b('0x4b')]({'where':{'id':_0x203d61[_0x961b('0x45')]['id']}})[_0x961b('0x26')](handleEntityNotFound(_0x4bf8a8,null))[_0x961b('0x26')](function(_0xa962a4){if(_0xa962a4){_0x5c4ad9=_0xa962a4;_0x558752[_0x961b('0x31')]=_[_0x961b('0x46')](db['Tag']['rawAttributes']);_0x558752[_0x961b('0x2f')]=_[_0x961b('0x46')](_0x203d61['query']);_0x558752[_0x961b('0x39')]=_[_0x961b('0x30')](_0x558752['model'],_0x558752[_0x961b('0x2f')]);_0x13bc3d[_0x961b('0x33')]=_[_0x961b('0x30')](_0x558752[_0x961b('0x31')],qs[_0x961b('0x32')](_0x203d61[_0x961b('0x2f')][_0x961b('0x32')]));_0x13bc3d['attributes']=_0x13bc3d[_0x961b('0x33')][_0x961b('0x34')]?_0x13bc3d[_0x961b('0x33')]:_0x558752['model'];_0x13bc3d[_0x961b('0x37')]=qs[_0x961b('0x38')](_0x203d61['query'][_0x961b('0x38')]);_0x13bc3d[_0x961b('0x3c')]=qs[_0x961b('0x39')](_['pick'](_0x203d61['query'],_0x558752[_0x961b('0x39')]));if(_0x203d61['query'][_0x961b('0x3b')]){_0x13bc3d['where']=_[_0x961b('0x3d')](_0x13bc3d[_0x961b('0x3c')],{'$or':_[_0x961b('0x2b')](_0x13bc3d['attributes'],function(_0x517b1b){var _0x2b80c6={};_0x2b80c6[_0x517b1b]={'$like':'%'+_0x203d61[_0x961b('0x2f')][_0x961b('0x3b')]+'%'};return _0x2b80c6;})});}_0x13bc3d=_[_0x961b('0x3d')]({},_0x13bc3d,_0x203d61[_0x961b('0x3f')]);return _0x5c4ad9[_0x961b('0x4f')](_0x13bc3d);}})[_0x961b('0x26')](function(_0x46e046){if(_0x46e046){_0x214dac=_0x46e046[_0x961b('0x34')];if(!_0x203d61[_0x961b('0x2f')][_0x961b('0x35')](_0x961b('0x36'))){_0x13bc3d[_0x961b('0x20')]=qs[_0x961b('0x20')](_0x203d61['query'][_0x961b('0x20')]);_0x13bc3d[_0x961b('0x1e')]=qs[_0x961b('0x1e')](_0x203d61['query']['offset']);}return _0x5c4ad9[_0x961b('0x4f')](_0x13bc3d);}})[_0x961b('0x26')](function(_0x2fd30e){if(_0x2fd30e){return _0x2fd30e?{'count':_0x214dac,'rows':_0x2fd30e}:null;}})[_0x961b('0x26')](respondWithResult(_0x4bf8a8,null))[_0x961b('0x44')](handleError(_0x4bf8a8,null));};exports[_0x961b('0x50')]=function(_0x18e7f0,_0x5d2ffe,_0x419b6f){if(_0x18e7f0[_0x961b('0x49')]['id']){delete _0x18e7f0[_0x961b('0x49')]['id'];}return db[_0x961b('0x2c')][_0x961b('0x4b')]({'where':{'id':_0x18e7f0[_0x961b('0x45')]['id']}})[_0x961b('0x26')](handleEntityNotFound(_0x5d2ffe,null))[_0x961b('0x26')](function(_0x31050e){if(_0x31050e){return _0x31050e['setTags'](_0x18e7f0['body'][_0x961b('0x51')]||[]);}return null;})[_0x961b('0x26')](respondWithResult(_0x5d2ffe,null))['catch'](handleError(_0x5d2ffe,null));};
\ No newline at end of file
index 4805563..81702c1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb03e=['int_zendesk_configurations','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./intZendeskConfiguration.attributes','exports','define','ZendeskConfiguration'];(function(_0x1c6ef2,_0x8d926a){var _0x404b8c=function(_0x4fdf1e){while(--_0x4fdf1e){_0x1c6ef2['push'](_0x1c6ef2['shift']());}};_0x404b8c(++_0x8d926a);}(_0xb03e,0x1eb));var _0xeb03=function(_0x1596ba,_0x2ceb3c){_0x1596ba=_0x1596ba-0x0;var _0xbf6cee=_0xb03e[_0x1596ba];return _0xbf6cee;};'use strict';var _=require('lodash');var util=require(_0xeb03('0x0'));var logger=require(_0xeb03('0x1'))(_0xeb03('0x2'));var moment=require(_0xeb03('0x3'));var BPromise=require(_0xeb03('0x4'));var rp=require(_0xeb03('0x5'));var fs=require('fs');var path=require(_0xeb03('0x6'));var rimraf=require(_0xeb03('0x7'));var config=require(_0xeb03('0x8'));var attributes=require(_0xeb03('0x9'));module[_0xeb03('0xa')]=function(_0xee2291,_0x4e1cea){return _0xee2291[_0xeb03('0xb')](_0xeb03('0xc'),attributes,{'tableName':_0xeb03('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xfcbb=['rimraf','../../config/environment','define','ZendeskConfiguration','int_zendesk_configurations','lodash','util','../../config/logger','bluebird','request-promise','path'];(function(_0x2d89f7,_0x4e2553){var _0x3c226d=function(_0x53ad66){while(--_0x53ad66){_0x2d89f7['push'](_0x2d89f7['shift']());}};_0x3c226d(++_0x4e2553);}(_0xfcbb,0x10d));var _0xbfcb=function(_0x1f4c43,_0x11819a){_0x1f4c43=_0x1f4c43-0x0;var _0x5ec2b2=_0xfcbb[_0x1f4c43];return _0x5ec2b2;};'use strict';var _=require(_0xbfcb('0x0'));var util=require(_0xbfcb('0x1'));var logger=require(_0xbfcb('0x2'))('api');var moment=require('moment');var BPromise=require(_0xbfcb('0x3'));var rp=require(_0xbfcb('0x4'));var fs=require('fs');var path=require(_0xbfcb('0x5'));var rimraf=require(_0xbfcb('0x6'));var config=require(_0xbfcb('0x7'));var attributes=require('./intZendeskConfiguration.attributes');module['exports']=function(_0x32c2aa,_0x4990c){return _0x32c2aa[_0xbfcb('0x8')](_0xbfcb('0x9'),attributes,{'tableName':_0xbfcb('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index c6feff1..72915b0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd0a6=['ioredis','../../config/utils','../../config/environment','client','http','then','info','ZendeskConfiguration,\x20%s,\x20%s','request\x20sent','debug','error','message','result','catch','lodash','util','moment','bluebird'];(function(_0x2fef36,_0x2d9657){var _0x36cb38=function(_0xe2d130){while(--_0xe2d130){_0x2fef36['push'](_0x2fef36['shift']());}};_0x36cb38(++_0x2d9657);}(_0xd0a6,0x8c));var _0x6d0a=function(_0x131656,_0x4a6ac2){_0x131656=_0x131656-0x0;var _0x1bd163=_0xd0a6[_0x131656];return _0x1bd163;};'use strict';var _=require(_0x6d0a('0x0'));var util=require(_0x6d0a('0x1'));var moment=require(_0x6d0a('0x2'));var BPromise=require(_0x6d0a('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6d0a('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x6d0a('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x6d0a('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x6d0a('0x7')][_0x6d0a('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x52efb3,_0x449dfd,_0x335f04){return new BPromise(function(_0x5bb4fa,_0x54175e){return client['request'](_0x52efb3,_0x335f04)[_0x6d0a('0x9')](function(_0x4d688c){logger[_0x6d0a('0xa')](_0x6d0a('0xb'),_0x449dfd,_0x6d0a('0xc'));logger[_0x6d0a('0xd')]('ZendeskConfiguration,\x20%s,\x20%s,\x20%s',_0x449dfd,_0x6d0a('0xc'),JSON['stringify'](_0x4d688c));if(_0x4d688c['error']){if(_0x4d688c[_0x6d0a('0xe')]['code']===0x1f4){logger[_0x6d0a('0xe')](_0x6d0a('0xb'),_0x449dfd,_0x4d688c[_0x6d0a('0xe')][_0x6d0a('0xf')]);return _0x54175e(_0x4d688c['error'][_0x6d0a('0xf')]);}logger[_0x6d0a('0xe')]('ZendeskConfiguration,\x20%s,\x20%s',_0x449dfd,_0x4d688c[_0x6d0a('0xe')][_0x6d0a('0xf')]);return _0x5bb4fa(_0x4d688c['error'][_0x6d0a('0xf')]);}else{logger[_0x6d0a('0xa')]('ZendeskConfiguration,\x20%s,\x20%s',_0x449dfd,_0x6d0a('0xc'));_0x5bb4fa(_0x4d688c[_0x6d0a('0x10')]['message']);}})[_0x6d0a('0x11')](function(_0x236d98){logger[_0x6d0a('0xe')](_0x6d0a('0xb'),_0x449dfd,_0x236d98);_0x54175e(_0x236d98);});});}
\ No newline at end of file
+var _0x98f8=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','request','info','ZendeskConfiguration,\x20%s,\x20%s','debug','ZendeskConfiguration,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util'];(function(_0x32b92b,_0xbb85f1){var _0x38ef8e=function(_0xc12e91){while(--_0xc12e91){_0x32b92b['push'](_0x32b92b['shift']());}};_0x38ef8e(++_0xbb85f1);}(_0x98f8,0x16e));var _0x898f=function(_0x5a8f34,_0x11c27b){_0x5a8f34=_0x5a8f34-0x0;var _0x497614=_0x98f8[_0x5a8f34];return _0x497614;};'use strict';var _=require(_0x898f('0x0'));var util=require(_0x898f('0x1'));var moment=require('moment');var BPromise=require(_0x898f('0x2'));var rs=require(_0x898f('0x3'));var fs=require('fs');var Redis=require(_0x898f('0x4'));var db=require(_0x898f('0x5'))['db'];var utils=require(_0x898f('0x6'));var logger=require('../../config/logger')(_0x898f('0x7'));var config=require(_0x898f('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x898f('0x9')][_0x898f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x22bd17,_0x35f706,_0x3fc98e){return new BPromise(function(_0xe04f6f,_0x1a99f0){return client[_0x898f('0xb')](_0x22bd17,_0x3fc98e)['then'](function(_0x2629ba){logger[_0x898f('0xc')](_0x898f('0xd'),_0x35f706,'request\x20sent');logger[_0x898f('0xe')](_0x898f('0xf'),_0x35f706,_0x898f('0x10'),JSON[_0x898f('0x11')](_0x2629ba));if(_0x2629ba['error']){if(_0x2629ba[_0x898f('0x12')][_0x898f('0x13')]===0x1f4){logger['error'](_0x898f('0xd'),_0x35f706,_0x2629ba[_0x898f('0x12')][_0x898f('0x14')]);return _0x1a99f0(_0x2629ba[_0x898f('0x12')][_0x898f('0x14')]);}logger[_0x898f('0x12')](_0x898f('0xd'),_0x35f706,_0x2629ba[_0x898f('0x12')][_0x898f('0x14')]);return _0xe04f6f(_0x2629ba[_0x898f('0x12')][_0x898f('0x14')]);}else{logger['info']('ZendeskConfiguration,\x20%s,\x20%s',_0x35f706,_0x898f('0x10'));_0xe04f6f(_0x2629ba[_0x898f('0x15')][_0x898f('0x14')]);}})[_0x898f('0x16')](function(_0x88bc32){logger[_0x898f('0x12')](_0x898f('0xd'),_0x35f706,_0x88bc32);_0x1a99f0(_0x88bc32);});});}
\ No newline at end of file
index 13b4406..944ebc9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x83b2=['index','/:id','show','post','isAuthenticated','put','destroy','exports','multer','connect-timeout','express','Router','fs-extra','../../config/environment','./intZendeskField.controller','get'];(function(_0x4e4d50,_0x474f24){var _0x2bb378=function(_0x43029a){while(--_0x43029a){_0x4e4d50['push'](_0x4e4d50['shift']());}};_0x2bb378(++_0x474f24);}(_0x83b2,0xd8));var _0x283b=function(_0x265f9d,_0x39389c){_0x265f9d=_0x265f9d-0x0;var _0x235e87=_0x83b2[_0x265f9d];return _0x235e87;};'use strict';var multer=require(_0x283b('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x283b('0x1'));var express=require(_0x283b('0x2'));var router=express[_0x283b('0x3')]();var fs_extra=require(_0x283b('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x283b('0x5'));var controller=require(_0x283b('0x6'));router[_0x283b('0x7')]('/',auth['isAuthenticated'](),controller[_0x283b('0x8')]);router[_0x283b('0x7')](_0x283b('0x9'),auth['isAuthenticated'](),controller[_0x283b('0xa')]);router[_0x283b('0xb')]('/',auth[_0x283b('0xc')](),controller['create']);router[_0x283b('0xd')]('/:id',auth[_0x283b('0xc')](),controller['update']);router['delete']('/:id',auth[_0x283b('0xc')](),controller[_0x283b('0xe')]);module[_0x283b('0xf')]=router;
\ No newline at end of file
+var _0x5f09=['exports','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','index','show','create','put','isAuthenticated','update','destroy'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5f09,0x8d));var _0x95f0=function(_0x156437,_0x2d6910){_0x156437=_0x156437-0x0;var _0x74ea68=_0x5f09[_0x156437];return _0x74ea68;};'use strict';var multer=require('multer');var util=require(_0x95f0('0x0'));var path=require('path');var timeout=require(_0x95f0('0x1'));var express=require(_0x95f0('0x2'));var router=express[_0x95f0('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x95f0('0x4'));var interaction=require(_0x95f0('0x5'));var config=require('../../config/environment');var controller=require('./intZendeskField.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x95f0('0x6')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x95f0('0x7')]);router['post']('/',auth['isAuthenticated'](),controller[_0x95f0('0x8')]);router[_0x95f0('0x9')]('/:id',auth[_0x95f0('0xa')](),controller[_0x95f0('0xb')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0x95f0('0xc')]);module[_0x95f0('0xd')]=router;
\ No newline at end of file
index ed31dac..e6b2117 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf46e=['BOOLEAN','sequelize','ENUM','string','keyValue','picklist','STRING','variable'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf46e,0x1e9));var _0xef46=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0xf46e[_0x6131cd];return _0x47e916;};'use strict';var Sequelize=require(_0xef46('0x0'));module['exports']={'type':{'type':Sequelize[_0xef46('0x1')](_0xef46('0x2'),'variable','customVariable',_0xef46('0x3'),_0xef46('0x4')),'defaultValue':_0xef46('0x2')},'content':{'type':Sequelize[_0xef46('0x5')]},'key':{'type':Sequelize[_0xef46('0x5')]},'keyType':{'type':Sequelize['ENUM'](_0xef46('0x2'),_0xef46('0x6'),'customVariable')},'keyContent':{'type':Sequelize[_0xef46('0x5')]},'idField':{'type':Sequelize[_0xef46('0x5')]},'nameField':{'type':Sequelize[_0xef46('0x5')]},'customField':{'type':Sequelize[_0xef46('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xef46('0x5')]}};
\ No newline at end of file
+var _0x5741=['ENUM','BOOLEAN','exports','variable','customVariable','keyValue','picklist','string','STRING'];(function(_0x43fd8c,_0x1cc721){var _0x558a00=function(_0x15949a){while(--_0x15949a){_0x43fd8c['push'](_0x43fd8c['shift']());}};_0x558a00(++_0x1cc721);}(_0x5741,0x89));var _0x1574=function(_0x38df21,_0x288856){_0x38df21=_0x38df21-0x0;var _0x247efc=_0x5741[_0x38df21];return _0x247efc;};'use strict';var Sequelize=require('sequelize');module[_0x1574('0x0')]={'type':{'type':Sequelize['ENUM']('string',_0x1574('0x1'),_0x1574('0x2'),_0x1574('0x3'),_0x1574('0x4')),'defaultValue':_0x1574('0x5')},'content':{'type':Sequelize[_0x1574('0x6')]},'key':{'type':Sequelize[_0x1574('0x6')]},'keyType':{'type':Sequelize[_0x1574('0x7')](_0x1574('0x5'),'variable',_0x1574('0x2'))},'keyContent':{'type':Sequelize[_0x1574('0x6')]},'idField':{'type':Sequelize[_0x1574('0x6')]},'nameField':{'type':Sequelize['STRING']},'customField':{'type':Sequelize[_0x1574('0x8')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0x1574('0x6')]}};
\ No newline at end of file
index d8680ea..ebf8b19 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9ffd=['../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','set','Content-Range','update','then','destroy','error','stack','name','index','rawAttributes','fieldName','key','map','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','pick','filter','where','options','ZendeskField','includeAll','include','findAll','rows','catch','show','params','keys','merge','create','body','find','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','ejs','lodash','squel','jsforce','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch'];(function(_0x503b95,_0x43b0e0){var _0x122ac6=function(_0x15089e){while(--_0x15089e){_0x503b95['push'](_0x503b95['shift']());}};_0x122ac6(++_0x43b0e0);}(_0x9ffd,0x1d7));var _0xd9ff=function(_0x268b25,_0x37ab8f){_0x268b25=_0x268b25-0x0;var _0x3b8d84=_0x9ffd[_0x268b25];return _0x3b8d84;};'use strict';var emlformat=require(_0xd9ff('0x0'));var rimraf=require(_0xd9ff('0x1'));var zipdir=require(_0xd9ff('0x2'));var jsonpatch=require(_0xd9ff('0x3'));var rp=require('request-promise');var moment=require(_0xd9ff('0x4'));var BPromise=require(_0xd9ff('0x5'));var Mustache=require(_0xd9ff('0x6'));var util=require(_0xd9ff('0x7'));var path=require(_0xd9ff('0x8'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0xd9ff('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xd9ff('0xa'));var squel=require(_0xd9ff('0xb'));var crypto=require('crypto');var jsforce=require(_0xd9ff('0xc'));var deskjs=require(_0xd9ff('0xd'));var toCsv=require(_0xd9ff('0xe'));var querystring=require(_0xd9ff('0xf'));var Papa=require('papaparse');var Redis=require(_0xd9ff('0x10'));var authService=require(_0xd9ff('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xd9ff('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require(_0xd9ff('0x13'));var licenseUtil=require(_0xd9ff('0x14'));var db=require(_0xd9ff('0x15'))['db'];function respondWithStatusCode(_0x2bb498,_0x28c488){_0x28c488=_0x28c488||0xcc;return function(_0x41c849){if(_0x41c849){return _0x2bb498[_0xd9ff('0x16')](_0x28c488);}return _0x2bb498[_0xd9ff('0x17')](_0x28c488)[_0xd9ff('0x18')]();};}function respondWithResult(_0x1912fb,_0x470802){_0x470802=_0x470802||0xc8;return function(_0x2b4cab){if(_0x2b4cab){return _0x1912fb[_0xd9ff('0x17')](_0x470802)[_0xd9ff('0x19')](_0x2b4cab);}};}function respondWithFilteredResult(_0x3865d7,_0x40ae90){return function(_0xa44d2e){if(_0xa44d2e){var _0x34b515=typeof _0x40ae90[_0xd9ff('0x1a')]===_0xd9ff('0x1b')&&typeof _0x40ae90['limit']===_0xd9ff('0x1b');var _0x15dca0=_0xa44d2e[_0xd9ff('0x1c')];var _0x161908=_0x34b515?0x0:_0x40ae90[_0xd9ff('0x1a')];var _0x5e4b6f=_0x34b515?_0xa44d2e[_0xd9ff('0x1c')]:_0x40ae90[_0xd9ff('0x1a')]+_0x40ae90[_0xd9ff('0x1d')];var _0x195822;if(_0x5e4b6f>=_0x15dca0){_0x5e4b6f=_0x15dca0;_0x195822=0xc8;}else{_0x195822=0xce;}_0x3865d7['status'](_0x195822);return _0x3865d7[_0xd9ff('0x1e')](_0xd9ff('0x1f'),_0x161908+'-'+_0x5e4b6f+'/'+_0x15dca0)[_0xd9ff('0x19')](_0xa44d2e);}return null;};}function patchUpdates(_0x3bd1a9){return function(_0x200fb9){try{jsonpatch['apply'](_0x200fb9,_0x3bd1a9,!![]);}catch(_0x4b293e){return BPromise['reject'](_0x4b293e);}return _0x200fb9['save']();};}function saveUpdates(_0x54f9da,_0x510b79){return function(_0x19ca9b){if(_0x19ca9b){return _0x19ca9b[_0xd9ff('0x20')](_0x54f9da)[_0xd9ff('0x21')](function(_0x3430fc){return _0x3430fc;});}return null;};}function removeEntity(_0x746dc4,_0x446d1b){return function(_0x496bf0){if(_0x496bf0){return _0x496bf0[_0xd9ff('0x22')]()['then'](function(){_0x746dc4['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x26237b,_0x5dd2b1){return function(_0x195021){if(!_0x195021){_0x26237b[_0xd9ff('0x16')](0x194);}return _0x195021;};}function handleError(_0x220d9d,_0x41d0b0){_0x41d0b0=_0x41d0b0||0x1f4;return function(_0x124899){logger[_0xd9ff('0x23')](_0x124899[_0xd9ff('0x24')]);if(_0x124899[_0xd9ff('0x25')]){delete _0x124899['name'];}_0x220d9d[_0xd9ff('0x17')](_0x41d0b0)['send'](_0x124899);};}exports[_0xd9ff('0x26')]=function(_0x5afd,_0x321a87){var _0x542394={},_0x4b00a4={},_0x58281c={'count':0x0,'rows':[]};var _0x865586=_['map'](db['ZendeskField'][_0xd9ff('0x27')],function(_0xa35152){return{'name':_0xa35152[_0xd9ff('0x28')],'type':_0xa35152['type'][_0xd9ff('0x29')]};});_0x4b00a4['model']=_[_0xd9ff('0x2a')](_0x865586,_0xd9ff('0x25'));_0x4b00a4[_0xd9ff('0x2b')]=_['keys'](_0x5afd[_0xd9ff('0x2b')]);_0x4b00a4[_0xd9ff('0x2c')]=_[_0xd9ff('0x2d')](_0x4b00a4[_0xd9ff('0x2e')],_0x4b00a4['query']);_0x542394[_0xd9ff('0x2f')]=_['intersection'](_0x4b00a4[_0xd9ff('0x2e')],qs[_0xd9ff('0x30')](_0x5afd['query'][_0xd9ff('0x30')]));_0x542394[_0xd9ff('0x2f')]=_0x542394[_0xd9ff('0x2f')][_0xd9ff('0x31')]?_0x542394['attributes']:_0x4b00a4[_0xd9ff('0x2e')];if(!_0x5afd[_0xd9ff('0x2b')][_0xd9ff('0x32')]('nolimit')){_0x542394[_0xd9ff('0x1d')]=qs[_0xd9ff('0x1d')](_0x5afd[_0xd9ff('0x2b')][_0xd9ff('0x1d')]);_0x542394[_0xd9ff('0x1a')]=qs[_0xd9ff('0x1a')](_0x5afd[_0xd9ff('0x2b')][_0xd9ff('0x1a')]);}_0x542394[_0xd9ff('0x33')]=qs['sort'](_0x5afd[_0xd9ff('0x2b')][_0xd9ff('0x34')]);_0x542394['where']=qs[_0xd9ff('0x2c')](_[_0xd9ff('0x35')](_0x5afd[_0xd9ff('0x2b')],_0x4b00a4[_0xd9ff('0x2c')]),_0x865586);if(_0x5afd['query'][_0xd9ff('0x36')]){_0x542394[_0xd9ff('0x37')]=_['merge'](_0x542394['where'],{'$or':_[_0xd9ff('0x2a')](_0x865586,function(_0x271f4a){if(_0x271f4a['type']!=='VIRTUAL'){var _0x757db2={};_0x757db2[_0x271f4a['name']]={'$like':'%'+_0x5afd[_0xd9ff('0x2b')][_0xd9ff('0x36')]+'%'};return _0x757db2;}})});}_0x542394=_['merge']({},_0x542394,_0x5afd[_0xd9ff('0x38')]);var _0x559095={'where':_0x542394['where']};return db[_0xd9ff('0x39')][_0xd9ff('0x1c')](_0x559095)[_0xd9ff('0x21')](function(_0x346bdd){_0x58281c[_0xd9ff('0x1c')]=_0x346bdd;if(_0x5afd[_0xd9ff('0x2b')][_0xd9ff('0x3a')]){_0x542394[_0xd9ff('0x3b')]=[{'all':!![]}];}return db['ZendeskField'][_0xd9ff('0x3c')](_0x542394);})['then'](function(_0x3e7d1c){_0x58281c[_0xd9ff('0x3d')]=_0x3e7d1c;return _0x58281c;})['then'](respondWithFilteredResult(_0x321a87,_0x542394))[_0xd9ff('0x3e')](handleError(_0x321a87,null));};exports[_0xd9ff('0x3f')]=function(_0x217aef,_0x2b8225){var _0x383bf2={'raw':!![],'where':{'id':_0x217aef[_0xd9ff('0x40')]['id']}},_0x450416={};_0x450416[_0xd9ff('0x2e')]=_[_0xd9ff('0x41')](db[_0xd9ff('0x39')]['rawAttributes']);_0x450416[_0xd9ff('0x2b')]=_[_0xd9ff('0x41')](_0x217aef[_0xd9ff('0x2b')]);_0x450416[_0xd9ff('0x2c')]=_[_0xd9ff('0x2d')](_0x450416['model'],_0x450416[_0xd9ff('0x2b')]);_0x383bf2[_0xd9ff('0x2f')]=_[_0xd9ff('0x2d')](_0x450416[_0xd9ff('0x2e')],qs['fields'](_0x217aef[_0xd9ff('0x2b')][_0xd9ff('0x30')]));_0x383bf2['attributes']=_0x383bf2[_0xd9ff('0x2f')][_0xd9ff('0x31')]?_0x383bf2['attributes']:_0x450416['model'];if(_0x217aef[_0xd9ff('0x2b')]['includeAll']){_0x383bf2[_0xd9ff('0x3b')]=[{'all':!![]}];}_0x383bf2=_[_0xd9ff('0x42')]({},_0x383bf2,_0x217aef['options']);return db[_0xd9ff('0x39')]['find'](_0x383bf2)[_0xd9ff('0x21')](handleEntityNotFound(_0x2b8225,null))[_0xd9ff('0x21')](respondWithResult(_0x2b8225,null))['catch'](handleError(_0x2b8225,null));};exports[_0xd9ff('0x43')]=function(_0x133f21,_0x11dd75){return db['ZendeskField'][_0xd9ff('0x43')](_0x133f21[_0xd9ff('0x44')],{})[_0xd9ff('0x21')](respondWithResult(_0x11dd75,0xc9))[_0xd9ff('0x3e')](handleError(_0x11dd75,null));};exports[_0xd9ff('0x20')]=function(_0x37aa68,_0x43bcce){if(_0x37aa68[_0xd9ff('0x44')]['id']){delete _0x37aa68[_0xd9ff('0x44')]['id'];}return db[_0xd9ff('0x39')][_0xd9ff('0x45')]({'where':{'id':_0x37aa68[_0xd9ff('0x40')]['id']}})[_0xd9ff('0x21')](handleEntityNotFound(_0x43bcce,null))['then'](saveUpdates(_0x37aa68[_0xd9ff('0x44')],null))[_0xd9ff('0x21')](respondWithResult(_0x43bcce,null))[_0xd9ff('0x3e')](handleError(_0x43bcce,null));};exports[_0xd9ff('0x22')]=function(_0x51d987,_0x349738){return db[_0xd9ff('0x39')][_0xd9ff('0x45')]({'where':{'id':_0x51d987['params']['id']}})['then'](handleEntityNotFound(_0x349738,null))[_0xd9ff('0x21')](removeEntity(_0x349738,null))['catch'](handleError(_0x349738,null));};
\ No newline at end of file
+var _0xcfee=['crypto','jsforce','desk.js','to-csv','querystring','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','undefined','limit','count','offset','set','Content-Range','json','apply','reject','save','update','then','destroy','end','error','stack','name','send','map','ZendeskField','rawAttributes','fieldName','type','key','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','pick','filter','merge','options','includeAll','include','findAll','rows','catch','show','params','keys','find','create','body','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','ejs','fs-extra','squel'];(function(_0x374ddc,_0x1c612b){var _0x18575e=function(_0x1cabb6){while(--_0x1cabb6){_0x374ddc['push'](_0x374ddc['shift']());}};_0x18575e(++_0x1c612b);}(_0xcfee,0x175));var _0xecfe=function(_0x1203f,_0x554bbc){_0x1203f=_0x1203f-0x0;var _0x365f0a=_0xcfee[_0x1203f];return _0x365f0a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xecfe('0x0'));var zipdir=require(_0xecfe('0x1'));var jsonpatch=require(_0xecfe('0x2'));var rp=require(_0xecfe('0x3'));var moment=require('moment');var BPromise=require(_0xecfe('0x4'));var Mustache=require(_0xecfe('0x5'));var util=require(_0xecfe('0x6'));var path=require(_0xecfe('0x7'));var sox=require(_0xecfe('0x8'));var csv=require('to-csv');var ejs=require(_0xecfe('0x9'));var fs=require('fs');var fs_extra=require(_0xecfe('0xa'));var _=require('lodash');var squel=require(_0xecfe('0xb'));var crypto=require(_0xecfe('0xc'));var jsforce=require(_0xecfe('0xd'));var deskjs=require(_0xecfe('0xe'));var toCsv=require(_0xecfe('0xf'));var querystring=require(_0xecfe('0x10'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xecfe('0x11'));var qs=require(_0xecfe('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xecfe('0x13'));var logger=require(_0xecfe('0x14'))(_0xecfe('0x15'));var utils=require('../../config/utils');var config=require(_0xecfe('0x16'));var licenseUtil=require(_0xecfe('0x17'));var db=require(_0xecfe('0x18'))['db'];function respondWithStatusCode(_0x3abb0e,_0x244cb5){_0x244cb5=_0x244cb5||0xcc;return function(_0x493d77){if(_0x493d77){return _0x3abb0e[_0xecfe('0x19')](_0x244cb5);}return _0x3abb0e['status'](_0x244cb5)['end']();};}function respondWithResult(_0x464408,_0x38bb93){_0x38bb93=_0x38bb93||0xc8;return function(_0x38ffbf){if(_0x38ffbf){return _0x464408[_0xecfe('0x1a')](_0x38bb93)['json'](_0x38ffbf);}};}function respondWithFilteredResult(_0x42655f,_0x1128ac){return function(_0x1087d9){if(_0x1087d9){var _0x196e5a=typeof _0x1128ac['offset']===_0xecfe('0x1b')&&typeof _0x1128ac[_0xecfe('0x1c')]===_0xecfe('0x1b');var _0xedf697=_0x1087d9[_0xecfe('0x1d')];var _0x3d6ca4=_0x196e5a?0x0:_0x1128ac[_0xecfe('0x1e')];var _0x22ea0a=_0x196e5a?_0x1087d9[_0xecfe('0x1d')]:_0x1128ac[_0xecfe('0x1e')]+_0x1128ac[_0xecfe('0x1c')];var _0x7b74c0;if(_0x22ea0a>=_0xedf697){_0x22ea0a=_0xedf697;_0x7b74c0=0xc8;}else{_0x7b74c0=0xce;}_0x42655f[_0xecfe('0x1a')](_0x7b74c0);return _0x42655f[_0xecfe('0x1f')](_0xecfe('0x20'),_0x3d6ca4+'-'+_0x22ea0a+'/'+_0xedf697)[_0xecfe('0x21')](_0x1087d9);}return null;};}function patchUpdates(_0x152afa){return function(_0x150688){try{jsonpatch[_0xecfe('0x22')](_0x150688,_0x152afa,!![]);}catch(_0x4ab6ca){return BPromise[_0xecfe('0x23')](_0x4ab6ca);}return _0x150688[_0xecfe('0x24')]();};}function saveUpdates(_0x3978c1,_0x175141){return function(_0x2ed048){if(_0x2ed048){return _0x2ed048[_0xecfe('0x25')](_0x3978c1)[_0xecfe('0x26')](function(_0x479570){return _0x479570;});}return null;};}function removeEntity(_0x3d19db,_0x3fe3c4){return function(_0x105320){if(_0x105320){return _0x105320[_0xecfe('0x27')]()[_0xecfe('0x26')](function(){_0x3d19db[_0xecfe('0x1a')](0xcc)[_0xecfe('0x28')]();});}};}function handleEntityNotFound(_0x5cc2f4,_0x422c47){return function(_0x5b35a2){if(!_0x5b35a2){_0x5cc2f4[_0xecfe('0x19')](0x194);}return _0x5b35a2;};}function handleError(_0x3b9abb,_0x1f0422){_0x1f0422=_0x1f0422||0x1f4;return function(_0x370c9b){logger[_0xecfe('0x29')](_0x370c9b[_0xecfe('0x2a')]);if(_0x370c9b['name']){delete _0x370c9b[_0xecfe('0x2b')];}_0x3b9abb['status'](_0x1f0422)[_0xecfe('0x2c')](_0x370c9b);};}exports['index']=function(_0x51bac8,_0x5b337d){var _0x3d60fb={},_0x5b44bc={},_0x372105={'count':0x0,'rows':[]};var _0x5550ee=_[_0xecfe('0x2d')](db[_0xecfe('0x2e')][_0xecfe('0x2f')],function(_0x72d021){return{'name':_0x72d021[_0xecfe('0x30')],'type':_0x72d021[_0xecfe('0x31')][_0xecfe('0x32')]};});_0x5b44bc['model']=_[_0xecfe('0x2d')](_0x5550ee,_0xecfe('0x2b'));_0x5b44bc[_0xecfe('0x33')]=_['keys'](_0x51bac8[_0xecfe('0x33')]);_0x5b44bc[_0xecfe('0x34')]=_[_0xecfe('0x35')](_0x5b44bc[_0xecfe('0x36')],_0x5b44bc[_0xecfe('0x33')]);_0x3d60fb[_0xecfe('0x37')]=_['intersection'](_0x5b44bc[_0xecfe('0x36')],qs[_0xecfe('0x38')](_0x51bac8[_0xecfe('0x33')][_0xecfe('0x38')]));_0x3d60fb[_0xecfe('0x37')]=_0x3d60fb[_0xecfe('0x37')][_0xecfe('0x39')]?_0x3d60fb[_0xecfe('0x37')]:_0x5b44bc[_0xecfe('0x36')];if(!_0x51bac8[_0xecfe('0x33')][_0xecfe('0x3a')](_0xecfe('0x3b'))){_0x3d60fb[_0xecfe('0x1c')]=qs['limit'](_0x51bac8[_0xecfe('0x33')][_0xecfe('0x1c')]);_0x3d60fb[_0xecfe('0x1e')]=qs[_0xecfe('0x1e')](_0x51bac8[_0xecfe('0x33')][_0xecfe('0x1e')]);}_0x3d60fb[_0xecfe('0x3c')]=qs[_0xecfe('0x3d')](_0x51bac8[_0xecfe('0x33')][_0xecfe('0x3d')]);_0x3d60fb['where']=qs[_0xecfe('0x34')](_[_0xecfe('0x3e')](_0x51bac8[_0xecfe('0x33')],_0x5b44bc[_0xecfe('0x34')]),_0x5550ee);if(_0x51bac8['query'][_0xecfe('0x3f')]){_0x3d60fb['where']=_[_0xecfe('0x40')](_0x3d60fb['where'],{'$or':_[_0xecfe('0x2d')](_0x5550ee,function(_0x510bf6){if(_0x510bf6['type']!=='VIRTUAL'){var _0x2fbb71={};_0x2fbb71[_0x510bf6[_0xecfe('0x2b')]]={'$like':'%'+_0x51bac8[_0xecfe('0x33')][_0xecfe('0x3f')]+'%'};return _0x2fbb71;}})});}_0x3d60fb=_[_0xecfe('0x40')]({},_0x3d60fb,_0x51bac8[_0xecfe('0x41')]);var _0x43589b={'where':_0x3d60fb['where']};return db['ZendeskField'][_0xecfe('0x1d')](_0x43589b)[_0xecfe('0x26')](function(_0x2dc05d){_0x372105[_0xecfe('0x1d')]=_0x2dc05d;if(_0x51bac8['query'][_0xecfe('0x42')]){_0x3d60fb[_0xecfe('0x43')]=[{'all':!![]}];}return db[_0xecfe('0x2e')][_0xecfe('0x44')](_0x3d60fb);})['then'](function(_0x3c7fd6){_0x372105[_0xecfe('0x45')]=_0x3c7fd6;return _0x372105;})[_0xecfe('0x26')](respondWithFilteredResult(_0x5b337d,_0x3d60fb))[_0xecfe('0x46')](handleError(_0x5b337d,null));};exports[_0xecfe('0x47')]=function(_0x1f24e4,_0x4b68c2){var _0x5898e6={'raw':!![],'where':{'id':_0x1f24e4[_0xecfe('0x48')]['id']}},_0x3bb3a6={};_0x3bb3a6[_0xecfe('0x36')]=_['keys'](db[_0xecfe('0x2e')][_0xecfe('0x2f')]);_0x3bb3a6[_0xecfe('0x33')]=_[_0xecfe('0x49')](_0x1f24e4['query']);_0x3bb3a6[_0xecfe('0x34')]=_[_0xecfe('0x35')](_0x3bb3a6[_0xecfe('0x36')],_0x3bb3a6[_0xecfe('0x33')]);_0x5898e6['attributes']=_[_0xecfe('0x35')](_0x3bb3a6[_0xecfe('0x36')],qs['fields'](_0x1f24e4[_0xecfe('0x33')][_0xecfe('0x38')]));_0x5898e6[_0xecfe('0x37')]=_0x5898e6['attributes'][_0xecfe('0x39')]?_0x5898e6[_0xecfe('0x37')]:_0x3bb3a6[_0xecfe('0x36')];if(_0x1f24e4[_0xecfe('0x33')][_0xecfe('0x42')]){_0x5898e6[_0xecfe('0x43')]=[{'all':!![]}];}_0x5898e6=_[_0xecfe('0x40')]({},_0x5898e6,_0x1f24e4[_0xecfe('0x41')]);return db[_0xecfe('0x2e')][_0xecfe('0x4a')](_0x5898e6)[_0xecfe('0x26')](handleEntityNotFound(_0x4b68c2,null))[_0xecfe('0x26')](respondWithResult(_0x4b68c2,null))[_0xecfe('0x46')](handleError(_0x4b68c2,null));};exports[_0xecfe('0x4b')]=function(_0x213bb8,_0x410e88){return db[_0xecfe('0x2e')][_0xecfe('0x4b')](_0x213bb8[_0xecfe('0x4c')],{})['then'](respondWithResult(_0x410e88,0xc9))[_0xecfe('0x46')](handleError(_0x410e88,null));};exports[_0xecfe('0x25')]=function(_0x1b548b,_0x32a440){if(_0x1b548b['body']['id']){delete _0x1b548b['body']['id'];}return db[_0xecfe('0x2e')]['find']({'where':{'id':_0x1b548b[_0xecfe('0x48')]['id']}})[_0xecfe('0x26')](handleEntityNotFound(_0x32a440,null))[_0xecfe('0x26')](saveUpdates(_0x1b548b['body'],null))[_0xecfe('0x26')](respondWithResult(_0x32a440,null))['catch'](handleError(_0x32a440,null));};exports['destroy']=function(_0x15f11b,_0x501bf5){return db[_0xecfe('0x2e')][_0xecfe('0x4a')]({'where':{'id':_0x15f11b[_0xecfe('0x48')]['id']}})[_0xecfe('0x26')](handleEntityNotFound(_0x501bf5,null))[_0xecfe('0x26')](removeEntity(_0x501bf5,null))[_0xecfe('0x46')](handleError(_0x501bf5,null));};
\ No newline at end of file
index 5eefaf4..28609d0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x865c=['bluebird','request-promise','path','rimraf','../../config/environment','define','ZendeskField','int_zendesk_fields','zendesk_unique_index','idField','FieldId','lodash'];(function(_0x2ec461,_0x5f588a){var _0x28603d=function(_0x21114b){while(--_0x21114b){_0x2ec461['push'](_0x2ec461['shift']());}};_0x28603d(++_0x5f588a);}(_0x865c,0xa7));var _0xc865=function(_0xc8d11a,_0x3d085b){_0xc8d11a=_0xc8d11a-0x0;var _0x461a6e=_0x865c[_0xc8d11a];return _0x461a6e;};'use strict';var _=require(_0xc865('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0xc865('0x1'));var rp=require(_0xc865('0x2'));var fs=require('fs');var path=require(_0xc865('0x3'));var rimraf=require(_0xc865('0x4'));var config=require(_0xc865('0x5'));var attributes=require('./intZendeskField.attributes');module['exports']=function(_0x2078b0,_0x282e76){return _0x2078b0[_0xc865('0x6')](_0xc865('0x7'),attributes,{'tableName':_0xc865('0x8'),'paranoid':![],'indexes':[{'name':_0xc865('0x9'),'fields':[_0xc865('0xa'),_0xc865('0xb')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xeb7c=['../../config/environment','./intZendeskField.attributes','define','ZendeskField','int_zendesk_fields','idField','FieldId','lodash','moment','bluebird','request-promise','rimraf'];(function(_0x1d4fb5,_0x205c2f){var _0x566c83=function(_0x33fe30){while(--_0x33fe30){_0x1d4fb5['push'](_0x1d4fb5['shift']());}};_0x566c83(++_0x205c2f);}(_0xeb7c,0x17b));var _0xceb7=function(_0x545cf1,_0x22e5cd){_0x545cf1=_0x545cf1-0x0;var _0x2b0511=_0xeb7c[_0x545cf1];return _0x2b0511;};'use strict';var _=require(_0xceb7('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0xceb7('0x1'));var BPromise=require(_0xceb7('0x2'));var rp=require(_0xceb7('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xceb7('0x4'));var config=require(_0xceb7('0x5'));var attributes=require(_0xceb7('0x6'));module['exports']=function(_0x128952,_0x3ca540){return _0x128952[_0xceb7('0x7')](_0xceb7('0x8'),attributes,{'tableName':_0xceb7('0x9'),'paranoid':![],'indexes':[{'name':'zendesk_unique_index','fields':[_0xceb7('0xa'),_0xceb7('0xb')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index 8b4fb14..fc6bb95 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc0e8=['../../config/logger','../../config/environment','client','http','info','ZendeskField,\x20%s,\x20%s','request\x20sent','debug','ZendeskField,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','catch','util','moment','bluebird','ioredis','../../mysqldb'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xc0e8,0x18b));var _0x8c0e=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xc0e8[_0x20a584];return _0x4b41a8;};'use strict';var _=require('lodash');var util=require(_0x8c0e('0x0'));var moment=require(_0x8c0e('0x1'));var BPromise=require(_0x8c0e('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8c0e('0x3'));var db=require(_0x8c0e('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x8c0e('0x5'))('rpc');var config=require(_0x8c0e('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x8c0e('0x7')][_0x8c0e('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5a8e44,_0x59ed11,_0x1676a4){return new BPromise(function(_0x29ab71,_0x37ed06){return client['request'](_0x5a8e44,_0x1676a4)['then'](function(_0x22f469){logger[_0x8c0e('0x9')](_0x8c0e('0xa'),_0x59ed11,_0x8c0e('0xb'));logger[_0x8c0e('0xc')](_0x8c0e('0xd'),_0x59ed11,_0x8c0e('0xb'),JSON[_0x8c0e('0xe')](_0x22f469));if(_0x22f469['error']){if(_0x22f469['error'][_0x8c0e('0xf')]===0x1f4){logger[_0x8c0e('0x10')]('ZendeskField,\x20%s,\x20%s',_0x59ed11,_0x22f469[_0x8c0e('0x10')][_0x8c0e('0x11')]);return _0x37ed06(_0x22f469[_0x8c0e('0x10')]['message']);}logger[_0x8c0e('0x10')](_0x8c0e('0xa'),_0x59ed11,_0x22f469[_0x8c0e('0x10')][_0x8c0e('0x11')]);return _0x29ab71(_0x22f469[_0x8c0e('0x10')][_0x8c0e('0x11')]);}else{logger['info'](_0x8c0e('0xa'),_0x59ed11,_0x8c0e('0xb'));_0x29ab71(_0x22f469[_0x8c0e('0x12')][_0x8c0e('0x11')]);}})[_0x8c0e('0x13')](function(_0x5a417f){logger[_0x8c0e('0x10')](_0x8c0e('0xa'),_0x59ed11,_0x5a417f);_0x37ed06(_0x5a417f);});});}
\ No newline at end of file
+var _0xc038=['info','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','then','ZendeskField,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message'];(function(_0x117604,_0x5175b9){var _0x5cee33=function(_0x4b64b2){while(--_0x4b64b2){_0x117604['push'](_0x117604['shift']());}};_0x5cee33(++_0x5175b9);}(_0xc038,0xc8));var _0x8c03=function(_0x54fd3c,_0x4025c3){_0x54fd3c=_0x54fd3c-0x0;var _0x4f872c=_0xc038[_0x54fd3c];return _0x4f872c;};'use strict';var _=require(_0x8c03('0x0'));var util=require(_0x8c03('0x1'));var moment=require(_0x8c03('0x2'));var BPromise=require(_0x8c03('0x3'));var rs=require(_0x8c03('0x4'));var fs=require('fs');var Redis=require(_0x8c03('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x8c03('0x6'));var logger=require(_0x8c03('0x7'))(_0x8c03('0x8'));var config=require('../../config/environment');var jayson=require(_0x8c03('0x9'));var client=jayson[_0x8c03('0xa')][_0x8c03('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x244793,_0x3913b2,_0x128a82){return new BPromise(function(_0x60dcea,_0x3948a7){return client['request'](_0x244793,_0x128a82)[_0x8c03('0xc')](function(_0x10568f){logger['info'](_0x8c03('0xd'),_0x3913b2,'request\x20sent');logger[_0x8c03('0xe')]('ZendeskField,\x20%s,\x20%s,\x20%s',_0x3913b2,_0x8c03('0xf'),JSON[_0x8c03('0x10')](_0x10568f));if(_0x10568f[_0x8c03('0x11')]){if(_0x10568f[_0x8c03('0x11')][_0x8c03('0x12')]===0x1f4){logger[_0x8c03('0x11')]('ZendeskField,\x20%s,\x20%s',_0x3913b2,_0x10568f[_0x8c03('0x11')]['message']);return _0x3948a7(_0x10568f[_0x8c03('0x11')][_0x8c03('0x13')]);}logger[_0x8c03('0x11')](_0x8c03('0xd'),_0x3913b2,_0x10568f[_0x8c03('0x11')][_0x8c03('0x13')]);return _0x60dcea(_0x10568f[_0x8c03('0x11')][_0x8c03('0x13')]);}else{logger[_0x8c03('0x14')](_0x8c03('0xd'),_0x3913b2,_0x8c03('0xf'));_0x60dcea(_0x10568f['result'][_0x8c03('0x13')]);}})[_0x8c03('0x15')](function(_0x299f82){logger[_0x8c03('0x11')](_0x8c03('0xd'),_0x3913b2,_0x299f82);_0x3948a7(_0x299f82);});});}
\ No newline at end of file
index ac848a4..349563b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xba63=['post','create','addConfiguration','put','/:id','update','delete','destroy','exports','multer','util','express','Router','fs-extra','../../components/auth/service','get','isAuthenticated','index','show','/:id/configurations','getConfigurations','/:id/fields','getFields'];(function(_0x13ef48,_0x590e55){var _0xdb691d=function(_0x2a299b){while(--_0x2a299b){_0x13ef48['push'](_0x13ef48['shift']());}};_0xdb691d(++_0x590e55);}(_0xba63,0xc1));var _0x3ba6=function(_0x1cc8fe,_0x105328){_0x1cc8fe=_0x1cc8fe-0x0;var _0x230054=_0xba63[_0x1cc8fe];return _0x230054;};'use strict';var multer=require(_0x3ba6('0x0'));var util=require(_0x3ba6('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x3ba6('0x2'));var router=express[_0x3ba6('0x3')]();var fs_extra=require(_0x3ba6('0x4'));var auth=require(_0x3ba6('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./intZohoAccount.controller');router[_0x3ba6('0x6')]('/',auth[_0x3ba6('0x7')](),controller[_0x3ba6('0x8')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x3ba6('0x9')]);router[_0x3ba6('0x6')](_0x3ba6('0xa'),auth[_0x3ba6('0x7')](),controller[_0x3ba6('0xb')]);router[_0x3ba6('0x6')](_0x3ba6('0xc'),auth[_0x3ba6('0x7')](),controller[_0x3ba6('0xd')]);router[_0x3ba6('0xe')]('/',auth[_0x3ba6('0x7')](),controller[_0x3ba6('0xf')]);router[_0x3ba6('0xe')](_0x3ba6('0xa'),auth[_0x3ba6('0x7')](),controller[_0x3ba6('0x10')]);router[_0x3ba6('0x11')](_0x3ba6('0x12'),auth['isAuthenticated'](),controller[_0x3ba6('0x13')]);router[_0x3ba6('0x14')](_0x3ba6('0x12'),auth['isAuthenticated'](),controller[_0x3ba6('0x15')]);module[_0x3ba6('0x16')]=router;
\ No newline at end of file
+var _0x7044=['get','isAuthenticated','index','/:id','/:id/configurations','getConfigurations','/:id/fields','getFields','post','create','put','update','delete','destroy','exports','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x503cd5,_0x57774a){var _0x1fdf1e=function(_0x5222cc){while(--_0x5222cc){_0x503cd5['push'](_0x503cd5['shift']());}};_0x1fdf1e(++_0x57774a);}(_0x7044,0xeb));var _0x4704=function(_0x5e1990,_0x1700b2){_0x5e1990=_0x5e1990-0x0;var _0x34430c=_0x7044[_0x5e1990];return _0x34430c;};'use strict';var multer=require('multer');var util=require(_0x4704('0x0'));var path=require(_0x4704('0x1'));var timeout=require('connect-timeout');var express=require(_0x4704('0x2'));var router=express[_0x4704('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x4704('0x4'));var interaction=require(_0x4704('0x5'));var config=require(_0x4704('0x6'));var controller=require('./intZohoAccount.controller');router[_0x4704('0x7')]('/',auth[_0x4704('0x8')](),controller[_0x4704('0x9')]);router[_0x4704('0x7')](_0x4704('0xa'),auth[_0x4704('0x8')](),controller['show']);router['get'](_0x4704('0xb'),auth['isAuthenticated'](),controller[_0x4704('0xc')]);router[_0x4704('0x7')](_0x4704('0xd'),auth['isAuthenticated'](),controller[_0x4704('0xe')]);router[_0x4704('0xf')]('/',auth['isAuthenticated'](),controller[_0x4704('0x10')]);router[_0x4704('0xf')]('/:id/configurations',auth[_0x4704('0x8')](),controller['addConfiguration']);router[_0x4704('0x11')]('/:id',auth[_0x4704('0x8')](),controller[_0x4704('0x12')]);router[_0x4704('0x13')]('/:id',auth[_0x4704('0x8')](),controller[_0x4704('0x14')]);module[_0x4704('0x15')]=router;
\ No newline at end of file
index ed71a00..54a5fad 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4b84=['STRING','sequelize','exports'];(function(_0x44ed28,_0xe6ea1d){var _0x3090ad=function(_0x57b12e){while(--_0x57b12e){_0x44ed28['push'](_0x44ed28['shift']());}};_0x3090ad(++_0xe6ea1d);}(_0x4b84,0x1cc));var _0x44b8=function(_0x3c51d4,_0x36ba53){_0x3c51d4=_0x3c51d4-0x0;var _0x53c45f=_0x4b84[_0x3c51d4];return _0x53c45f;};'use strict';var Sequelize=require(_0x44b8('0x0'));module[_0x44b8('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize['STRING']},'host':{'type':Sequelize[_0x44b8('0x2')]},'zone':{'type':Sequelize['STRING']},'clientId':{'type':Sequelize['STRING']},'clientSecret':{'type':Sequelize[_0x44b8('0x2')]},'serverUrl':{'type':Sequelize[_0x44b8('0x2')],'allowNull':![]},'code':{'type':Sequelize[_0x44b8('0x2')]},'refreshToken':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xd64b=['STRING','sequelize'];(function(_0x425709,_0x36bc1e){var _0x5e548f=function(_0x12e74e){while(--_0x12e74e){_0x425709['push'](_0x425709['shift']());}};_0x5e548f(++_0x36bc1e);}(_0xd64b,0xc1));var _0xbd64=function(_0x57de2e,_0x43b244){_0x57de2e=_0x57de2e-0x0;var _0x17c67e=_0xd64b[_0x57de2e];return _0x17c67e;};'use strict';var Sequelize=require(_0xbd64('0x0'));module['exports']={'name':{'type':Sequelize[_0xbd64('0x1')]},'description':{'type':Sequelize['STRING']},'host':{'type':Sequelize[_0xbd64('0x1')]},'zone':{'type':Sequelize[_0xbd64('0x1')]},'clientId':{'type':Sequelize[_0xbd64('0x1')]},'clientSecret':{'type':Sequelize[_0xbd64('0x1')]},'serverUrl':{'type':Sequelize[_0xbd64('0x1')],'allowNull':![]},'code':{'type':Sequelize['STRING']},'refreshToken':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 6b6429f..3c4fb76 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1781=['../../config/license/util','sendStatus','status','end','offset','undefined','limit','Content-Range','json','apply','reject','save','update','then','destroy','error','name','send','index','ZohoAccount','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','options','count','include','findAll','rows','catch','find','create','body','params','ZohoConfiguration','pick','addConfiguration','findOne','AccountId','Subjects','getSubjects','channel','getDescriptions','ZohoField','Descriptions','zone','https://accounts.zoho.com.au','https://accounts.zoho.eu','https://accounts.zoho.in','https://accounts.zoho.com.cn','POST','/oauth/v2/token','refreshToken','refresh_token','access_token','Unable\x20to\x20retrieve\x20the\x20access\x20token','host','clientId','clientSecret','serverUrl','code','com','substring','lastIndexOf','GET','format','Calls','response','message','Subject','WhoId','Call_Duration','Call_Result','Call_Start_Time','Call_Type','remove','includes','system_mandatory','push','display_label','custom_field','data_type','picklist','pick_list_values','test','statusCode','getFields,\x20%s,\x20%s,\x20%s','getFields','stringify','Wrong\x20credentials','eml-format','rimraf','zip-dir','request-promise','bluebird','util','path','sox','to-csv','ejs','fs-extra','squel','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment'];(function(_0x18b9a8,_0x1770b6){var _0x4a0a8f=function(_0x80ea93){while(--_0x80ea93){_0x18b9a8['push'](_0x18b9a8['shift']());}};_0x4a0a8f(++_0x1770b6);}(_0x1781,0xeb));var _0x1178=function(_0x2c91e9,_0x2fb965){_0x2c91e9=_0x2c91e9-0x0;var _0x13f0ff=_0x1781[_0x2c91e9];return _0x13f0ff;};'use strict';var emlformat=require(_0x1178('0x0'));var rimraf=require(_0x1178('0x1'));var zipdir=require(_0x1178('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x1178('0x3'));var moment=require('moment');var BPromise=require(_0x1178('0x4'));var Mustache=require('mustache');var util=require(_0x1178('0x5'));var path=require(_0x1178('0x6'));var sox=require(_0x1178('0x7'));var csv=require(_0x1178('0x8'));var ejs=require(_0x1178('0x9'));var fs=require('fs');var fs_extra=require(_0x1178('0xa'));var _=require('lodash');var squel=require(_0x1178('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x1178('0xc'));var toCsv=require(_0x1178('0x8'));var querystring=require(_0x1178('0xd'));var Papa=require(_0x1178('0xe'));var Redis=require('ioredis');var authService=require(_0x1178('0xf'));var qs=require(_0x1178('0x10'));var as=require(_0x1178('0x11'));var hardwareService=require(_0x1178('0x12'));var logger=require(_0x1178('0x13'))(_0x1178('0x14'));var utils=require(_0x1178('0x15'));var config=require(_0x1178('0x16'));var licenseUtil=require(_0x1178('0x17'));var db=require('../../mysqldb')['db'];var integrations=require('../../components/integrations/configuration');function respondWithStatusCode(_0x156a50,_0x1c9dca){_0x1c9dca=_0x1c9dca||0xcc;return function(_0x5a7c88){if(_0x5a7c88){return _0x156a50[_0x1178('0x18')](_0x1c9dca);}return _0x156a50[_0x1178('0x19')](_0x1c9dca)[_0x1178('0x1a')]();};}function respondWithResult(_0x3b2bda,_0x5b4293){_0x5b4293=_0x5b4293||0xc8;return function(_0x50c31f){if(_0x50c31f){return _0x3b2bda[_0x1178('0x19')](_0x5b4293)['json'](_0x50c31f);}};}function respondWithFilteredResult(_0xa2f4cc,_0x3bc5fa){return function(_0x597b06){if(_0x597b06){var _0x2f3319=typeof _0x3bc5fa[_0x1178('0x1b')]===_0x1178('0x1c')&&typeof _0x3bc5fa[_0x1178('0x1d')]===_0x1178('0x1c');var _0x49fb54=_0x597b06['count'];var _0x38431b=_0x2f3319?0x0:_0x3bc5fa[_0x1178('0x1b')];var _0xb0202=_0x2f3319?_0x597b06['count']:_0x3bc5fa['offset']+_0x3bc5fa['limit'];var _0x2fa2eb;if(_0xb0202>=_0x49fb54){_0xb0202=_0x49fb54;_0x2fa2eb=0xc8;}else{_0x2fa2eb=0xce;}_0xa2f4cc[_0x1178('0x19')](_0x2fa2eb);return _0xa2f4cc['set'](_0x1178('0x1e'),_0x38431b+'-'+_0xb0202+'/'+_0x49fb54)[_0x1178('0x1f')](_0x597b06);}return null;};}function patchUpdates(_0x39ec1a){return function(_0x41f1ca){try{jsonpatch[_0x1178('0x20')](_0x41f1ca,_0x39ec1a,!![]);}catch(_0x5376e2){return BPromise[_0x1178('0x21')](_0x5376e2);}return _0x41f1ca[_0x1178('0x22')]();};}function saveUpdates(_0xc3d893,_0x47ae2d){return function(_0x10ccfd){if(_0x10ccfd){return _0x10ccfd[_0x1178('0x23')](_0xc3d893)[_0x1178('0x24')](function(_0x34e733){return _0x34e733;});}return null;};}function removeEntity(_0x4bc57a,_0x5bc0d7){return function(_0x121c67){if(_0x121c67){return _0x121c67[_0x1178('0x25')]()[_0x1178('0x24')](function(){_0x4bc57a['status'](0xcc)[_0x1178('0x1a')]();});}};}function handleEntityNotFound(_0x3e57a5,_0x3c0e40){return function(_0x24b713){if(!_0x24b713){_0x3e57a5[_0x1178('0x18')](0x194);}return _0x24b713;};}function handleError(_0x376f83,_0x15340e){_0x15340e=_0x15340e||0x1f4;return function(_0x564eb8){logger[_0x1178('0x26')](_0x564eb8['stack']);if(_0x564eb8[_0x1178('0x27')]){delete _0x564eb8[_0x1178('0x27')];}_0x376f83[_0x1178('0x19')](_0x15340e)[_0x1178('0x28')](_0x564eb8);};}exports[_0x1178('0x29')]=function(_0x3fc49f,_0x409c90){var _0x15bf2f={},_0x434856={},_0x5cc40c={'count':0x0,'rows':[]};var _0x2d0ea2=_['map'](db[_0x1178('0x2a')][_0x1178('0x2b')],function(_0x35de47){return{'name':_0x35de47[_0x1178('0x2c')],'type':_0x35de47[_0x1178('0x2d')][_0x1178('0x2e')]};});_0x434856[_0x1178('0x2f')]=_[_0x1178('0x30')](_0x2d0ea2,'name');_0x434856[_0x1178('0x31')]=_[_0x1178('0x32')](_0x3fc49f[_0x1178('0x31')]);_0x434856[_0x1178('0x33')]=_[_0x1178('0x34')](_0x434856[_0x1178('0x2f')],_0x434856[_0x1178('0x31')]);_0x15bf2f['attributes']=_[_0x1178('0x34')](_0x434856[_0x1178('0x2f')],qs[_0x1178('0x35')](_0x3fc49f[_0x1178('0x31')][_0x1178('0x35')]));_0x15bf2f[_0x1178('0x36')]=_0x15bf2f[_0x1178('0x36')][_0x1178('0x37')]?_0x15bf2f['attributes']:_0x434856[_0x1178('0x2f')];if(!_0x3fc49f[_0x1178('0x31')][_0x1178('0x38')](_0x1178('0x39'))){_0x15bf2f['limit']=qs['limit'](_0x3fc49f['query'][_0x1178('0x1d')]);_0x15bf2f[_0x1178('0x1b')]=qs[_0x1178('0x1b')](_0x3fc49f[_0x1178('0x31')]['offset']);}_0x15bf2f[_0x1178('0x3a')]=qs[_0x1178('0x3b')](_0x3fc49f[_0x1178('0x31')][_0x1178('0x3b')]);_0x15bf2f[_0x1178('0x3c')]=qs[_0x1178('0x33')](_['pick'](_0x3fc49f[_0x1178('0x31')],_0x434856[_0x1178('0x33')]),_0x2d0ea2);if(_0x3fc49f[_0x1178('0x31')][_0x1178('0x3d')]){_0x15bf2f[_0x1178('0x3c')]=_[_0x1178('0x3e')](_0x15bf2f[_0x1178('0x3c')],{'$or':_['map'](_0x2d0ea2,function(_0x2cb853){if(_0x2cb853[_0x1178('0x2d')]!=='VIRTUAL'){var _0x3daa96={};_0x3daa96[_0x2cb853[_0x1178('0x27')]]={'$like':'%'+_0x3fc49f['query'][_0x1178('0x3d')]+'%'};return _0x3daa96;}})});}_0x15bf2f=_[_0x1178('0x3e')]({},_0x15bf2f,_0x3fc49f[_0x1178('0x3f')]);var _0xf814db={'where':_0x15bf2f[_0x1178('0x3c')]};return db[_0x1178('0x2a')][_0x1178('0x40')](_0xf814db)['then'](function(_0x388739){_0x5cc40c[_0x1178('0x40')]=_0x388739;if(_0x3fc49f[_0x1178('0x31')]['includeAll']){_0x15bf2f[_0x1178('0x41')]=[{'all':!![]}];}return db[_0x1178('0x2a')][_0x1178('0x42')](_0x15bf2f);})[_0x1178('0x24')](function(_0x3046ff){_0x5cc40c[_0x1178('0x43')]=_0x3046ff;return _0x5cc40c;})[_0x1178('0x24')](respondWithFilteredResult(_0x409c90,_0x15bf2f))[_0x1178('0x44')](handleError(_0x409c90,null));};exports['show']=function(_0x2e605a,_0x3f6621){var _0x570a5d={'raw':![],'where':{'id':_0x2e605a['params']['id']}},_0x12a98f={};_0x12a98f[_0x1178('0x2f')]=_['keys'](db[_0x1178('0x2a')][_0x1178('0x2b')]);_0x12a98f['query']=_[_0x1178('0x32')](_0x2e605a[_0x1178('0x31')]);_0x12a98f[_0x1178('0x33')]=_[_0x1178('0x34')](_0x12a98f['model'],_0x12a98f[_0x1178('0x31')]);_0x570a5d['attributes']=_['intersection'](_0x12a98f[_0x1178('0x2f')],qs[_0x1178('0x35')](_0x2e605a[_0x1178('0x31')]['fields']));_0x570a5d[_0x1178('0x36')]=_0x570a5d[_0x1178('0x36')][_0x1178('0x37')]?_0x570a5d['attributes']:_0x12a98f[_0x1178('0x2f')];if(_0x2e605a[_0x1178('0x31')]['includeAll']){_0x570a5d[_0x1178('0x41')]=[{'all':!![]}];}_0x570a5d=_[_0x1178('0x3e')]({},_0x570a5d,_0x2e605a[_0x1178('0x3f')]);return db[_0x1178('0x2a')][_0x1178('0x45')](_0x570a5d)[_0x1178('0x24')](handleEntityNotFound(_0x3f6621,null))['then'](respondWithResult(_0x3f6621,null))[_0x1178('0x44')](handleError(_0x3f6621,null));};exports[_0x1178('0x46')]=function(_0x5a305e,_0x164ac6){return db['ZohoAccount'][_0x1178('0x46')](_0x5a305e[_0x1178('0x47')],{})[_0x1178('0x24')](respondWithResult(_0x164ac6,0xc9))[_0x1178('0x44')](handleError(_0x164ac6,null));};exports[_0x1178('0x23')]=function(_0x10d8eb,_0x294f67){if(_0x10d8eb[_0x1178('0x47')]['id']){delete _0x10d8eb[_0x1178('0x47')]['id'];}return db[_0x1178('0x2a')][_0x1178('0x45')]({'where':{'id':_0x10d8eb[_0x1178('0x48')]['id']}})[_0x1178('0x24')](handleEntityNotFound(_0x294f67,null))['then'](saveUpdates(_0x10d8eb[_0x1178('0x47')],null))[_0x1178('0x24')](respondWithResult(_0x294f67,null))[_0x1178('0x44')](handleError(_0x294f67,null));};exports[_0x1178('0x25')]=function(_0x3691c3,_0x2dcc74){return db['ZohoAccount']['find']({'where':{'id':_0x3691c3[_0x1178('0x48')]['id']}})['then'](handleEntityNotFound(_0x2dcc74,null))[_0x1178('0x24')](removeEntity(_0x2dcc74,null))[_0x1178('0x44')](handleError(_0x2dcc74,null));};exports['getConfigurations']=function(_0x35619c,_0xef8f06,_0xd04095){var _0x36d925={};var _0x3cc87f={};var _0x3e7ce3;var _0x3156f1;return db[_0x1178('0x2a')]['findOne']({'where':{'id':_0x35619c['params']['id']}})[_0x1178('0x24')](handleEntityNotFound(_0xef8f06,null))[_0x1178('0x24')](function(_0x2c144a){if(_0x2c144a){_0x3e7ce3=_0x2c144a;_0x3cc87f['model']=_['keys'](db[_0x1178('0x49')][_0x1178('0x2b')]);_0x3cc87f[_0x1178('0x31')]=_[_0x1178('0x32')](_0x35619c[_0x1178('0x31')]);_0x3cc87f[_0x1178('0x33')]=_['intersection'](_0x3cc87f['model'],_0x3cc87f[_0x1178('0x31')]);_0x36d925[_0x1178('0x36')]=_[_0x1178('0x34')](_0x3cc87f[_0x1178('0x2f')],qs[_0x1178('0x35')](_0x35619c[_0x1178('0x31')]['fields']));_0x36d925['attributes']=_0x36d925['attributes'][_0x1178('0x37')]?_0x36d925['attributes']:_0x3cc87f['model'];_0x36d925[_0x1178('0x3a')]=qs[_0x1178('0x3b')](_0x35619c[_0x1178('0x31')]['sort']);_0x36d925[_0x1178('0x3c')]=qs[_0x1178('0x33')](_[_0x1178('0x4a')](_0x35619c[_0x1178('0x31')],_0x3cc87f[_0x1178('0x33')]));if(_0x35619c[_0x1178('0x31')][_0x1178('0x3d')]){_0x36d925[_0x1178('0x3c')]=_[_0x1178('0x3e')](_0x36d925[_0x1178('0x3c')],{'$or':_['map'](_0x36d925[_0x1178('0x36')],function(_0x3cfbc1){var _0x3e322={};_0x3e322[_0x3cfbc1]={'$like':'%'+_0x35619c[_0x1178('0x31')]['filter']+'%'};return _0x3e322;})});}_0x36d925=_[_0x1178('0x3e')]({},_0x36d925,_0x35619c[_0x1178('0x3f')]);return _0x3e7ce3['getConfigurations'](_0x36d925);}})[_0x1178('0x24')](function(_0x563655){if(_0x563655){_0x3156f1=_0x563655[_0x1178('0x37')];if(!_0x35619c['query']['hasOwnProperty'](_0x1178('0x39'))){_0x36d925[_0x1178('0x1d')]=qs[_0x1178('0x1d')](_0x35619c[_0x1178('0x31')][_0x1178('0x1d')]);_0x36d925['offset']=qs[_0x1178('0x1b')](_0x35619c['query'][_0x1178('0x1b')]);}return _0x3e7ce3['getConfigurations'](_0x36d925);}})[_0x1178('0x24')](function(_0x5b4129){if(_0x5b4129){return _0x5b4129?{'count':_0x3156f1,'rows':_0x5b4129}:null;}})[_0x1178('0x24')](respondWithResult(_0xef8f06,null))[_0x1178('0x44')](handleError(_0xef8f06,null));};exports[_0x1178('0x4b')]=function(_0x54941a,_0x33d352,_0x10512b){if(_0x54941a[_0x1178('0x47')]['id']){delete _0x54941a[_0x1178('0x47')]['id'];}return db[_0x1178('0x2a')][_0x1178('0x4c')]({'where':{'id':_0x54941a[_0x1178('0x48')]['id']}})[_0x1178('0x24')](handleEntityNotFound(_0x33d352,null))[_0x1178('0x24')](function(_0x3a2b14){if(_0x3a2b14){_0x54941a[_0x1178('0x47')][_0x1178('0x4d')]=_0x3a2b14['id'];_0x54941a['body'][_0x1178('0x4e')]=integrations[_0x1178('0x4f')](_0x54941a[_0x1178('0x47')][_0x1178('0x50')],_0x54941a[_0x1178('0x47')]['type']);_0x54941a['body']['Descriptions']=integrations[_0x1178('0x51')](_0x54941a['body']['channel'],_0x54941a['body'][_0x1178('0x2d')]);return db[_0x1178('0x49')][_0x1178('0x46')](_0x54941a[_0x1178('0x47')],{'include':[{'model':db[_0x1178('0x52')],'as':_0x1178('0x4e')},{'model':db['ZohoField'],'as':_0x1178('0x53')}]});}return null;})[_0x1178('0x24')](respondWithResult(_0x33d352,null))[_0x1178('0x44')](handleError(_0x33d352,null));};function getAccessToken(_0x2640d0){return new Promise(function(_0x4a8cbe,_0xe9f72f){var _0x475657;switch(_0x2640d0[_0x1178('0x54')]){case'US':_0x475657='https://accounts.zoho.com';break;case'AU':_0x475657=_0x1178('0x55');break;case'EU':_0x475657=_0x1178('0x56');break;case'IN':_0x475657=_0x1178('0x57');break;case'CN':_0x475657=_0x1178('0x58');break;default:_0x475657=_0x1178('0x56');break;}var _0x5bd1e5={'method':_0x1178('0x59'),'uri':_0x475657+_0x1178('0x5a'),'qs':{'refresh_token':_0x2640d0[_0x1178('0x5b')],'client_id':_0x2640d0['clientId'],'client_secret':_0x2640d0['clientSecret'],'grant_type':_0x1178('0x5c')},'json':!![]};return rp(_0x5bd1e5)[_0x1178('0x24')](function(_0x15a1d5){if(_0x15a1d5['access_token']){_0x4a8cbe(_0x15a1d5[_0x1178('0x5d')]);}else{_0xe9f72f(_0x1178('0x5e'));}})['catch'](function(_0x37d84d){_0xe9f72f(_0x37d84d);});});}exports['getFields']=function(_0x154b8d,_0x4eecf9,_0x3b9d1f){var _0x2f973d,_0x20cf41,_0x5e3404,_0xf71e58,_0x2976ed;return db['ZohoAccount']['findOne']({'where':{'id':_0x154b8d['params']['id']},'attributes':['id',_0x1178('0x5f'),'zone',_0x1178('0x60'),_0x1178('0x61'),_0x1178('0x62'),_0x1178('0x63'),_0x1178('0x5b')]})['then'](handleEntityNotFound(_0x4eecf9,null))[_0x1178('0x24')](function(_0x598d01){_0x2976ed=_0x598d01;_0x2f973d=_0x2976ed[_0x1178('0x5f')];_0x20cf41=_0x2f973d==='zoho.eu'?'eu':_0x1178('0x64');_0x5e3404=_0x2976ed[_0x1178('0x62')];var _0x3e4d64=_0x5e3404['slice'](-0x1);if(_0x3e4d64==='/'||_0x3e4d64==='\x5c'||_0x3e4d64===':'){_0x5e3404=_0x5e3404[_0x1178('0x65')](0x0,_0x5e3404[_0x1178('0x66')](_0x3e4d64));}if(!_0x2976ed[_0x1178('0x5b')]){throw new Error('Refresh\x20Token\x20not\x20available\x20for\x20the\x20account');}return getAccessToken(_0x2976ed);})[_0x1178('0x24')](function(_0x5bb0d8){if(_0x5bb0d8){return rp({'method':_0x1178('0x67'),'uri':util[_0x1178('0x68')]('https://www.zohoapis.%s/crm/v2/settings/fields',_0x20cf41),'qs':{'module':_0x1178('0x69')},'headers':{'Authorization':'Zoho-oauthtoken\x20'+_0x5bb0d8},'json':!![]});}})['then'](function(_0x3417b0){if(_0x3417b0){if(_0x3417b0[_0x1178('0x6a')]&&_0x3417b0['response'][_0x1178('0x26')]){throw new Error(_0x3417b0[_0x1178('0x6a')]['error'][_0x1178('0x6b')]);}var _0xc45f63=[];var _0x195833=[];var _0x958f0=['Owner',_0x1178('0x6c'),'Description',_0x1178('0x6d'),_0x1178('0x6e'),_0x1178('0x6f'),_0x1178('0x70'),_0x1178('0x71')];_0x195833=_[_0x1178('0x72')](_0x3417b0['fields'],function(_0x2aeec5){return _0x958f0[_0x1178('0x73')](_0x2aeec5['api_name']);});for(var _0x38decf=0x0;_0x38decf<_0x195833['length'];_0x38decf++){if(_0x195833[_0x38decf][_0x1178('0x74')]===![]){_0xc45f63[_0x1178('0x75')]({'id':_0x195833[_0x38decf]['id'],'name':_0x195833[_0x38decf][_0x1178('0x76')],'custom':_0x195833[_0x38decf][_0x1178('0x77')],'options':_0x195833[_0x38decf][_0x1178('0x78')]===_0x1178('0x79')&&_0x195833[_0x38decf][_0x1178('0x7a')][_0x1178('0x37')]>-0x1?_[_0x1178('0x30')](_0x195833[_0x38decf][_0x1178('0x7a')],function(_0x2f3557){return{'name':_0x2f3557,'value':_0x2f3557};}):[]});}}return{'count':_0xc45f63[_0x1178('0x37')],'rows':_0xc45f63};}else{return{'count':0x0,'rows':[]};}})[_0x1178('0x24')](respondWithResult(_0x4eecf9,null))[_0x1178('0x44')](function(_0x399546){var _0x2e20c0=_0x154b8d['query'][_0x1178('0x7b')]?0x1f4:_0x399546[_0x1178('0x7c')]||0x1f4;logger['error'](_0x1178('0x7d'),_0x1178('0x7e'),_0x2e20c0,JSON[_0x1178('0x7f')](_0x399546));delete _0x399546[_0x1178('0x27')];if(_0x2e20c0===0x191){_0x2e20c0=0x190;}_0x4eecf9[_0x1178('0x19')](_0x2e20c0)[_0x1178('0x28')](_0x154b8d[_0x1178('0x31')][_0x1178('0x7b')]?{'message':_0x1178('0x80'),'statusCode':_0x399546[_0x1178('0x7c')]}:_0x399546);});};
\ No newline at end of file
+var _0xa603=['find','create','body','destroy','getConfigurations','findOne','rawAttributes','nolimit','addConfiguration','AccountId','Subjects','getSubjects','channel','Descriptions','getDescriptions','ZohoField','zone','https://accounts.zoho.eu','https://accounts.zoho.com.cn','POST','refreshToken','clientId','clientSecret','refresh_token','access_token','Unable\x20to\x20retrieve\x20the\x20access\x20token','getFields','host','serverUrl','code','zoho.eu','com','slice','substring','lastIndexOf','Refresh\x20Token\x20not\x20available\x20for\x20the\x20account','GET','format','https://www.zohoapis.%s/crm/v2/settings/fields','Zoho-oauthtoken\x20','response','Owner','Subject','Description','WhoId','Call_Duration','Call_Result','Call_Start_Time','includes','api_name','push','display_label','picklist','pick_list_values','getFields,\x20%s,\x20%s,\x20%s','send','test','Wrong\x20credentials','statusCode','eml-format','rimraf','fast-json-patch','request-promise','bluebird','path','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','../../components/integrations/configuration','json','offset','undefined','limit','count','status','set','Content-Range','apply','reject','save','update','then','error','stack','name','index','ZohoAccount','fieldName','map','query','keys','filters','intersection','model','fields','attributes','length','hasOwnProperty','order','sort','pick','where','merge','type','VIRTUAL','filter','options','include','rows','catch','show','params','includeAll'];(function(_0x568496,_0x565afd){var _0x26c5c1=function(_0x4d251e){while(--_0x4d251e){_0x568496['push'](_0x568496['shift']());}};_0x26c5c1(++_0x565afd);}(_0xa603,0x1b8));var _0x3a60=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xa603[_0x122ef9];return _0x42fba0;};'use strict';var emlformat=require(_0x3a60('0x0'));var rimraf=require(_0x3a60('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x3a60('0x2'));var rp=require(_0x3a60('0x3'));var moment=require('moment');var BPromise=require(_0x3a60('0x4'));var Mustache=require('mustache');var util=require('util');var path=require(_0x3a60('0x5'));var sox=require('sox');var csv=require(_0x3a60('0x6'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x3a60('0x7'));var _=require(_0x3a60('0x8'));var squel=require(_0x3a60('0x9'));var crypto=require(_0x3a60('0xa'));var jsforce=require(_0x3a60('0xb'));var deskjs=require(_0x3a60('0xc'));var toCsv=require(_0x3a60('0x6'));var querystring=require(_0x3a60('0xd'));var Papa=require(_0x3a60('0xe'));var Redis=require('ioredis');var authService=require(_0x3a60('0xf'));var qs=require(_0x3a60('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x3a60('0x11'));var logger=require(_0x3a60('0x12'))('api');var utils=require(_0x3a60('0x13'));var config=require(_0x3a60('0x14'));var licenseUtil=require(_0x3a60('0x15'));var db=require(_0x3a60('0x16'))['db'];var integrations=require(_0x3a60('0x17'));function respondWithStatusCode(_0x127c65,_0x295928){_0x295928=_0x295928||0xcc;return function(_0x153749){if(_0x153749){return _0x127c65['sendStatus'](_0x295928);}return _0x127c65['status'](_0x295928)['end']();};}function respondWithResult(_0x40a6b2,_0x5872e0){_0x5872e0=_0x5872e0||0xc8;return function(_0x17f431){if(_0x17f431){return _0x40a6b2['status'](_0x5872e0)[_0x3a60('0x18')](_0x17f431);}};}function respondWithFilteredResult(_0x59c837,_0x41e552){return function(_0x9fee32){if(_0x9fee32){var _0x42f109=typeof _0x41e552[_0x3a60('0x19')]===_0x3a60('0x1a')&&typeof _0x41e552[_0x3a60('0x1b')]===_0x3a60('0x1a');var _0x4d16ab=_0x9fee32[_0x3a60('0x1c')];var _0x449414=_0x42f109?0x0:_0x41e552[_0x3a60('0x19')];var _0x340a2c=_0x42f109?_0x9fee32[_0x3a60('0x1c')]:_0x41e552[_0x3a60('0x19')]+_0x41e552[_0x3a60('0x1b')];var _0x2d6fc0;if(_0x340a2c>=_0x4d16ab){_0x340a2c=_0x4d16ab;_0x2d6fc0=0xc8;}else{_0x2d6fc0=0xce;}_0x59c837[_0x3a60('0x1d')](_0x2d6fc0);return _0x59c837[_0x3a60('0x1e')](_0x3a60('0x1f'),_0x449414+'-'+_0x340a2c+'/'+_0x4d16ab)[_0x3a60('0x18')](_0x9fee32);}return null;};}function patchUpdates(_0xe03b75){return function(_0x520ecb){try{jsonpatch[_0x3a60('0x20')](_0x520ecb,_0xe03b75,!![]);}catch(_0x52331c){return BPromise[_0x3a60('0x21')](_0x52331c);}return _0x520ecb[_0x3a60('0x22')]();};}function saveUpdates(_0x3e3769,_0xda257d){return function(_0x4a8ca4){if(_0x4a8ca4){return _0x4a8ca4[_0x3a60('0x23')](_0x3e3769)['then'](function(_0x5916ec){return _0x5916ec;});}return null;};}function removeEntity(_0x588b71,_0x1d769e){return function(_0x207631){if(_0x207631){return _0x207631['destroy']()[_0x3a60('0x24')](function(){_0x588b71[_0x3a60('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x55818a,_0x123fe5){return function(_0xa24211){if(!_0xa24211){_0x55818a['sendStatus'](0x194);}return _0xa24211;};}function handleError(_0x19fa27,_0x20a9dd){_0x20a9dd=_0x20a9dd||0x1f4;return function(_0x217b5d){logger[_0x3a60('0x25')](_0x217b5d[_0x3a60('0x26')]);if(_0x217b5d[_0x3a60('0x27')]){delete _0x217b5d[_0x3a60('0x27')];}_0x19fa27[_0x3a60('0x1d')](_0x20a9dd)['send'](_0x217b5d);};}exports[_0x3a60('0x28')]=function(_0x321e23,_0x4e0de0){var _0x5e6eec={},_0x3fc365={},_0x176f35={'count':0x0,'rows':[]};var _0x5c455c=_['map'](db[_0x3a60('0x29')]['rawAttributes'],function(_0x1057a){return{'name':_0x1057a[_0x3a60('0x2a')],'type':_0x1057a['type']['key']};});_0x3fc365['model']=_[_0x3a60('0x2b')](_0x5c455c,_0x3a60('0x27'));_0x3fc365[_0x3a60('0x2c')]=_[_0x3a60('0x2d')](_0x321e23[_0x3a60('0x2c')]);_0x3fc365[_0x3a60('0x2e')]=_[_0x3a60('0x2f')](_0x3fc365[_0x3a60('0x30')],_0x3fc365['query']);_0x5e6eec['attributes']=_[_0x3a60('0x2f')](_0x3fc365[_0x3a60('0x30')],qs['fields'](_0x321e23[_0x3a60('0x2c')][_0x3a60('0x31')]));_0x5e6eec['attributes']=_0x5e6eec[_0x3a60('0x32')][_0x3a60('0x33')]?_0x5e6eec[_0x3a60('0x32')]:_0x3fc365[_0x3a60('0x30')];if(!_0x321e23['query'][_0x3a60('0x34')]('nolimit')){_0x5e6eec['limit']=qs['limit'](_0x321e23[_0x3a60('0x2c')][_0x3a60('0x1b')]);_0x5e6eec[_0x3a60('0x19')]=qs[_0x3a60('0x19')](_0x321e23[_0x3a60('0x2c')][_0x3a60('0x19')]);}_0x5e6eec[_0x3a60('0x35')]=qs[_0x3a60('0x36')](_0x321e23['query'][_0x3a60('0x36')]);_0x5e6eec['where']=qs[_0x3a60('0x2e')](_[_0x3a60('0x37')](_0x321e23[_0x3a60('0x2c')],_0x3fc365[_0x3a60('0x2e')]),_0x5c455c);if(_0x321e23[_0x3a60('0x2c')]['filter']){_0x5e6eec[_0x3a60('0x38')]=_[_0x3a60('0x39')](_0x5e6eec[_0x3a60('0x38')],{'$or':_['map'](_0x5c455c,function(_0x31ea0c){if(_0x31ea0c[_0x3a60('0x3a')]!==_0x3a60('0x3b')){var _0x1184b0={};_0x1184b0[_0x31ea0c[_0x3a60('0x27')]]={'$like':'%'+_0x321e23[_0x3a60('0x2c')][_0x3a60('0x3c')]+'%'};return _0x1184b0;}})});}_0x5e6eec=_[_0x3a60('0x39')]({},_0x5e6eec,_0x321e23[_0x3a60('0x3d')]);var _0x1bd911={'where':_0x5e6eec[_0x3a60('0x38')]};return db[_0x3a60('0x29')]['count'](_0x1bd911)[_0x3a60('0x24')](function(_0x3ab002){_0x176f35[_0x3a60('0x1c')]=_0x3ab002;if(_0x321e23[_0x3a60('0x2c')]['includeAll']){_0x5e6eec[_0x3a60('0x3e')]=[{'all':!![]}];}return db[_0x3a60('0x29')]['findAll'](_0x5e6eec);})[_0x3a60('0x24')](function(_0x8cba2c){_0x176f35[_0x3a60('0x3f')]=_0x8cba2c;return _0x176f35;})[_0x3a60('0x24')](respondWithFilteredResult(_0x4e0de0,_0x5e6eec))[_0x3a60('0x40')](handleError(_0x4e0de0,null));};exports[_0x3a60('0x41')]=function(_0x4a0ac2,_0x5694bf){var _0x582fed={'raw':![],'where':{'id':_0x4a0ac2[_0x3a60('0x42')]['id']}},_0x228da0={};_0x228da0[_0x3a60('0x30')]=_[_0x3a60('0x2d')](db[_0x3a60('0x29')]['rawAttributes']);_0x228da0[_0x3a60('0x2c')]=_[_0x3a60('0x2d')](_0x4a0ac2[_0x3a60('0x2c')]);_0x228da0[_0x3a60('0x2e')]=_['intersection'](_0x228da0[_0x3a60('0x30')],_0x228da0[_0x3a60('0x2c')]);_0x582fed['attributes']=_[_0x3a60('0x2f')](_0x228da0[_0x3a60('0x30')],qs[_0x3a60('0x31')](_0x4a0ac2[_0x3a60('0x2c')][_0x3a60('0x31')]));_0x582fed['attributes']=_0x582fed[_0x3a60('0x32')][_0x3a60('0x33')]?_0x582fed[_0x3a60('0x32')]:_0x228da0[_0x3a60('0x30')];if(_0x4a0ac2[_0x3a60('0x2c')][_0x3a60('0x43')]){_0x582fed[_0x3a60('0x3e')]=[{'all':!![]}];}_0x582fed=_['merge']({},_0x582fed,_0x4a0ac2['options']);return db[_0x3a60('0x29')][_0x3a60('0x44')](_0x582fed)['then'](handleEntityNotFound(_0x5694bf,null))[_0x3a60('0x24')](respondWithResult(_0x5694bf,null))[_0x3a60('0x40')](handleError(_0x5694bf,null));};exports[_0x3a60('0x45')]=function(_0x58269a,_0xbe2ff){return db[_0x3a60('0x29')][_0x3a60('0x45')](_0x58269a[_0x3a60('0x46')],{})[_0x3a60('0x24')](respondWithResult(_0xbe2ff,0xc9))[_0x3a60('0x40')](handleError(_0xbe2ff,null));};exports[_0x3a60('0x23')]=function(_0x22566f,_0x45bcd2){if(_0x22566f[_0x3a60('0x46')]['id']){delete _0x22566f[_0x3a60('0x46')]['id'];}return db['ZohoAccount']['find']({'where':{'id':_0x22566f[_0x3a60('0x42')]['id']}})[_0x3a60('0x24')](handleEntityNotFound(_0x45bcd2,null))[_0x3a60('0x24')](saveUpdates(_0x22566f[_0x3a60('0x46')],null))[_0x3a60('0x24')](respondWithResult(_0x45bcd2,null))['catch'](handleError(_0x45bcd2,null));};exports[_0x3a60('0x47')]=function(_0x1bef44,_0x48dec9){return db[_0x3a60('0x29')][_0x3a60('0x44')]({'where':{'id':_0x1bef44['params']['id']}})['then'](handleEntityNotFound(_0x48dec9,null))[_0x3a60('0x24')](removeEntity(_0x48dec9,null))[_0x3a60('0x40')](handleError(_0x48dec9,null));};exports[_0x3a60('0x48')]=function(_0x210eca,_0x4aa9c8,_0x2cae9e){var _0xbcbbdf={};var _0x4869f1={};var _0x24a6cd;var _0x135381;return db[_0x3a60('0x29')][_0x3a60('0x49')]({'where':{'id':_0x210eca[_0x3a60('0x42')]['id']}})[_0x3a60('0x24')](handleEntityNotFound(_0x4aa9c8,null))[_0x3a60('0x24')](function(_0x1d6f6c){if(_0x1d6f6c){_0x24a6cd=_0x1d6f6c;_0x4869f1[_0x3a60('0x30')]=_[_0x3a60('0x2d')](db['ZohoConfiguration'][_0x3a60('0x4a')]);_0x4869f1['query']=_['keys'](_0x210eca[_0x3a60('0x2c')]);_0x4869f1[_0x3a60('0x2e')]=_['intersection'](_0x4869f1[_0x3a60('0x30')],_0x4869f1[_0x3a60('0x2c')]);_0xbcbbdf['attributes']=_[_0x3a60('0x2f')](_0x4869f1[_0x3a60('0x30')],qs[_0x3a60('0x31')](_0x210eca['query'][_0x3a60('0x31')]));_0xbcbbdf[_0x3a60('0x32')]=_0xbcbbdf['attributes'][_0x3a60('0x33')]?_0xbcbbdf['attributes']:_0x4869f1[_0x3a60('0x30')];_0xbcbbdf[_0x3a60('0x35')]=qs[_0x3a60('0x36')](_0x210eca['query'][_0x3a60('0x36')]);_0xbcbbdf[_0x3a60('0x38')]=qs[_0x3a60('0x2e')](_['pick'](_0x210eca[_0x3a60('0x2c')],_0x4869f1[_0x3a60('0x2e')]));if(_0x210eca[_0x3a60('0x2c')][_0x3a60('0x3c')]){_0xbcbbdf[_0x3a60('0x38')]=_[_0x3a60('0x39')](_0xbcbbdf[_0x3a60('0x38')],{'$or':_[_0x3a60('0x2b')](_0xbcbbdf[_0x3a60('0x32')],function(_0xfc7513){var _0x374385={};_0x374385[_0xfc7513]={'$like':'%'+_0x210eca[_0x3a60('0x2c')][_0x3a60('0x3c')]+'%'};return _0x374385;})});}_0xbcbbdf=_[_0x3a60('0x39')]({},_0xbcbbdf,_0x210eca['options']);return _0x24a6cd[_0x3a60('0x48')](_0xbcbbdf);}})[_0x3a60('0x24')](function(_0x41e9d6){if(_0x41e9d6){_0x135381=_0x41e9d6['length'];if(!_0x210eca[_0x3a60('0x2c')][_0x3a60('0x34')](_0x3a60('0x4b'))){_0xbcbbdf[_0x3a60('0x1b')]=qs[_0x3a60('0x1b')](_0x210eca[_0x3a60('0x2c')][_0x3a60('0x1b')]);_0xbcbbdf[_0x3a60('0x19')]=qs[_0x3a60('0x19')](_0x210eca[_0x3a60('0x2c')]['offset']);}return _0x24a6cd[_0x3a60('0x48')](_0xbcbbdf);}})[_0x3a60('0x24')](function(_0xce9c2f){if(_0xce9c2f){return _0xce9c2f?{'count':_0x135381,'rows':_0xce9c2f}:null;}})[_0x3a60('0x24')](respondWithResult(_0x4aa9c8,null))['catch'](handleError(_0x4aa9c8,null));};exports[_0x3a60('0x4c')]=function(_0x563087,_0x2bfdea,_0x36c2a5){if(_0x563087[_0x3a60('0x46')]['id']){delete _0x563087[_0x3a60('0x46')]['id'];}return db[_0x3a60('0x29')][_0x3a60('0x49')]({'where':{'id':_0x563087[_0x3a60('0x42')]['id']}})[_0x3a60('0x24')](handleEntityNotFound(_0x2bfdea,null))[_0x3a60('0x24')](function(_0x23e49b){if(_0x23e49b){_0x563087[_0x3a60('0x46')][_0x3a60('0x4d')]=_0x23e49b['id'];_0x563087[_0x3a60('0x46')][_0x3a60('0x4e')]=integrations[_0x3a60('0x4f')](_0x563087[_0x3a60('0x46')][_0x3a60('0x50')],_0x563087[_0x3a60('0x46')][_0x3a60('0x3a')]);_0x563087[_0x3a60('0x46')][_0x3a60('0x51')]=integrations[_0x3a60('0x52')](_0x563087[_0x3a60('0x46')]['channel'],_0x563087[_0x3a60('0x46')][_0x3a60('0x3a')]);return db['ZohoConfiguration'][_0x3a60('0x45')](_0x563087['body'],{'include':[{'model':db['ZohoField'],'as':'Subjects'},{'model':db[_0x3a60('0x53')],'as':'Descriptions'}]});}return null;})[_0x3a60('0x24')](respondWithResult(_0x2bfdea,null))['catch'](handleError(_0x2bfdea,null));};function getAccessToken(_0x71ee17){return new Promise(function(_0x2d2b75,_0x5f03ec){var _0x64a901;switch(_0x71ee17[_0x3a60('0x54')]){case'US':_0x64a901='https://accounts.zoho.com';break;case'AU':_0x64a901='https://accounts.zoho.com.au';break;case'EU':_0x64a901=_0x3a60('0x55');break;case'IN':_0x64a901='https://accounts.zoho.in';break;case'CN':_0x64a901=_0x3a60('0x56');break;default:_0x64a901=_0x3a60('0x55');break;}var _0x91acc5={'method':_0x3a60('0x57'),'uri':_0x64a901+'/oauth/v2/token','qs':{'refresh_token':_0x71ee17[_0x3a60('0x58')],'client_id':_0x71ee17[_0x3a60('0x59')],'client_secret':_0x71ee17[_0x3a60('0x5a')],'grant_type':_0x3a60('0x5b')},'json':!![]};return rp(_0x91acc5)[_0x3a60('0x24')](function(_0x18c44c){if(_0x18c44c[_0x3a60('0x5c')]){_0x2d2b75(_0x18c44c['access_token']);}else{_0x5f03ec(_0x3a60('0x5d'));}})['catch'](function(_0x3ad67e){_0x5f03ec(_0x3ad67e);});});}exports[_0x3a60('0x5e')]=function(_0x36654f,_0x56a49b,_0x5523d1){var _0x2b3c41,_0x2a9b1a,_0x138ad5,_0x3390fc,_0x4f03a6;return db[_0x3a60('0x29')][_0x3a60('0x49')]({'where':{'id':_0x36654f['params']['id']},'attributes':['id',_0x3a60('0x5f'),_0x3a60('0x54'),_0x3a60('0x59'),_0x3a60('0x5a'),_0x3a60('0x60'),_0x3a60('0x61'),_0x3a60('0x58')]})[_0x3a60('0x24')](handleEntityNotFound(_0x56a49b,null))['then'](function(_0x2c7209){_0x4f03a6=_0x2c7209;_0x2b3c41=_0x4f03a6['host'];_0x2a9b1a=_0x2b3c41===_0x3a60('0x62')?'eu':_0x3a60('0x63');_0x138ad5=_0x4f03a6['serverUrl'];var _0x538aa9=_0x138ad5[_0x3a60('0x64')](-0x1);if(_0x538aa9==='/'||_0x538aa9==='\x5c'||_0x538aa9===':'){_0x138ad5=_0x138ad5[_0x3a60('0x65')](0x0,_0x138ad5[_0x3a60('0x66')](_0x538aa9));}if(!_0x4f03a6[_0x3a60('0x58')]){throw new Error(_0x3a60('0x67'));}return getAccessToken(_0x4f03a6);})[_0x3a60('0x24')](function(_0x10f39c){if(_0x10f39c){return rp({'method':_0x3a60('0x68'),'uri':util[_0x3a60('0x69')](_0x3a60('0x6a'),_0x2a9b1a),'qs':{'module':'Calls'},'headers':{'Authorization':_0x3a60('0x6b')+_0x10f39c},'json':!![]});}})[_0x3a60('0x24')](function(_0x1f6525){if(_0x1f6525){if(_0x1f6525['response']&&_0x1f6525[_0x3a60('0x6c')][_0x3a60('0x25')]){throw new Error(_0x1f6525['response'][_0x3a60('0x25')]['message']);}var _0xceef8c=[];var _0x522d1d=[];var _0x50a150=[_0x3a60('0x6d'),_0x3a60('0x6e'),_0x3a60('0x6f'),_0x3a60('0x70'),_0x3a60('0x71'),_0x3a60('0x72'),_0x3a60('0x73'),'Call_Type'];_0x522d1d=_['remove'](_0x1f6525[_0x3a60('0x31')],function(_0x112d91){return _0x50a150[_0x3a60('0x74')](_0x112d91[_0x3a60('0x75')]);});for(var _0x208b96=0x0;_0x208b96<_0x522d1d[_0x3a60('0x33')];_0x208b96++){if(_0x522d1d[_0x208b96]['system_mandatory']===![]){_0xceef8c[_0x3a60('0x76')]({'id':_0x522d1d[_0x208b96]['id'],'name':_0x522d1d[_0x208b96][_0x3a60('0x77')],'custom':_0x522d1d[_0x208b96]['custom_field'],'options':_0x522d1d[_0x208b96]['data_type']===_0x3a60('0x78')&&_0x522d1d[_0x208b96][_0x3a60('0x79')][_0x3a60('0x33')]>-0x1?_[_0x3a60('0x2b')](_0x522d1d[_0x208b96][_0x3a60('0x79')],function(_0x257b54){return{'name':_0x257b54,'value':_0x257b54};}):[]});}}return{'count':_0xceef8c[_0x3a60('0x33')],'rows':_0xceef8c};}else{return{'count':0x0,'rows':[]};}})[_0x3a60('0x24')](respondWithResult(_0x56a49b,null))['catch'](function(_0x18e75c){var _0x521c43=_0x36654f[_0x3a60('0x2c')]['test']?0x1f4:_0x18e75c['statusCode']||0x1f4;logger[_0x3a60('0x25')](_0x3a60('0x7a'),_0x3a60('0x5e'),_0x521c43,JSON['stringify'](_0x18e75c));delete _0x18e75c[_0x3a60('0x27')];if(_0x521c43===0x191){_0x521c43=0x190;}_0x56a49b[_0x3a60('0x1d')](_0x521c43)[_0x3a60('0x7b')](_0x36654f[_0x3a60('0x2c')][_0x3a60('0x7c')]?{'message':_0x3a60('0x7d'),'statusCode':_0x18e75c[_0x3a60('0x7e')]}:_0x18e75c);});};
\ No newline at end of file
index 963c225..06ad6d2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x114a=['ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d','lodash','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./intZohoAccount.attributes','../../components/integrations/configuration','exports','define','ZohoAccount','int_zoho_accounts','changed','serverUrl','clientId','clientSecret','substring','lastIndexOf','zone','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.in','https://accounts.zoho.com.cn','https://accounts.zoho.eu','POST','authorization_code','code','application/x-www-form-urlencoded','then','parse','refresh_token','info','format','name','error','inspect','catch','slice','/oauth/v2/token','refreshToken','ZohoAccount,\x20Refresh\x20token\x20successfully\x20generated\x20for\x20account\x20\x22%s\x22\x20#%d'];(function(_0x1ce8bf,_0x3e393b){var _0x3821ce=function(_0x346cc6){while(--_0x346cc6){_0x1ce8bf['push'](_0x1ce8bf['shift']());}};_0x3821ce(++_0x3e393b);}(_0x114a,0xb1));var _0xa114=function(_0x484878,_0x2b6002){_0x484878=_0x484878-0x0;var _0x550ee8=_0x114a[_0x484878];return _0x550ee8;};'use strict';var _=require(_0xa114('0x0'));var util=require('util');var logger=require(_0xa114('0x1'))(_0xa114('0x2'));var moment=require(_0xa114('0x3'));var BPromise=require(_0xa114('0x4'));var rp=require(_0xa114('0x5'));var fs=require('fs');var path=require(_0xa114('0x6'));var rimraf=require('rimraf');var config=require(_0xa114('0x7'));var attributes=require(_0xa114('0x8'));var integrations=require(_0xa114('0x9'));module[_0xa114('0xa')]=function(_0x1742fb,_0x3eef95){return _0x1742fb[_0xa114('0xb')](_0xa114('0xc'),attributes,{'tableName':_0xa114('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeCreate':function(_0x1b39e9,_0x2d688d,_0x3abbc0){if(_0x1b39e9[_0xa114('0xe')]('zone')||_0x1b39e9[_0xa114('0xe')](_0xa114('0xf'))||_0x1b39e9['changed'](_0xa114('0x10'))||_0x1b39e9[_0xa114('0xe')](_0xa114('0x11'))||_0x1b39e9[_0xa114('0xe')]('code')||_0x1b39e9[_0xa114('0xe')]('host')){var _0x5c3f84,_0x3e7ee9;_0x5c3f84=_0x1b39e9[_0xa114('0xf')];var _0x5dfabb=_0x5c3f84['slice'](-0x1);if(_0x5dfabb==='/'||_0x5dfabb==='\x5c'||_0x5dfabb===':'){_0x5c3f84=_0x5c3f84[_0xa114('0x12')](0x0,_0x5c3f84[_0xa114('0x13')](_0x5dfabb));}switch(_0x1b39e9[_0xa114('0x14')]){case'US':_0x3e7ee9=_0xa114('0x15');break;case'AU':_0x3e7ee9=_0xa114('0x16');break;case'IN':_0x3e7ee9=_0xa114('0x17');break;case'CN':_0x3e7ee9=_0xa114('0x18');break;default:_0x3e7ee9=_0xa114('0x19');break;}var _0x17359b={'method':_0xa114('0x1a'),'uri':_0x3e7ee9+'/oauth/v2/token','form':{'grant_type':_0xa114('0x1b'),'client_id':_0x1b39e9[_0xa114('0x10')],'client_secret':_0x1b39e9['clientSecret'],'redirect_uri':_0x1b39e9[_0xa114('0xf')],'code':_0x1b39e9[_0xa114('0x1c')]},'headers':{'Content-Type':_0xa114('0x1d')}};return rp(_0x17359b)[_0xa114('0x1e')](function(_0x32702d){var _0x29e7e6=JSON[_0xa114('0x1f')](_0x32702d);if(_0x29e7e6[_0xa114('0x20')]){_0x1b39e9['refreshToken']=_0x29e7e6[_0xa114('0x20')];logger[_0xa114('0x21')](util[_0xa114('0x22')]('ZohoAccount,\x20Refresh\x20token\x20successfully\x20generated\x20for\x20account\x20\x22%s\x22\x20#%d',_0x1b39e9[_0xa114('0x23')],_0x1b39e9['id']));}else{logger[_0xa114('0x24')](util[_0xa114('0x22')]('ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d',_0x1b39e9[_0xa114('0x23')],_0x1b39e9['id']),util[_0xa114('0x25')](_0x29e7e6,{'showHidden':![],'depth':null}));}return _0x3abbc0(null,_0x2d688d);})[_0xa114('0x26')](function(_0x3c10e7){logger[_0xa114('0x24')](util[_0xa114('0x22')]('ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d',_0x1b39e9[_0xa114('0x23')],_0x1b39e9['id']),util[_0xa114('0x25')](parsedResult,{'showHidden':![],'depth':null}));return _0x3abbc0(_0x3c10e7);});}else{return _0x3abbc0(null,_0x2d688d);}},'beforeUpdate':function(_0x253113,_0x2dc4ce,_0x59e8db){if(_0x253113[_0xa114('0xe')]('zone')||_0x253113[_0xa114('0xe')](_0xa114('0xf'))||_0x253113['changed'](_0xa114('0x10'))||_0x253113['changed']('clientSecret')||_0x253113[_0xa114('0xe')](_0xa114('0x1c'))||_0x253113[_0xa114('0xe')]('host')){var _0x1dbf71,_0x238e80;_0x1dbf71=_0x253113['serverUrl'];var _0x2d87ae=_0x1dbf71[_0xa114('0x27')](-0x1);if(_0x2d87ae==='/'||_0x2d87ae==='\x5c'||_0x2d87ae===':'){_0x1dbf71=_0x1dbf71[_0xa114('0x12')](0x0,_0x1dbf71[_0xa114('0x13')](_0x2d87ae));}switch(_0x253113['zone']){case'US':_0x238e80='https://accounts.zoho.com';break;case'AU':_0x238e80='https://accounts.zoho.com.au';break;case'IN':_0x238e80=_0xa114('0x17');break;case'CN':_0x238e80=_0xa114('0x18');break;default:_0x238e80=_0xa114('0x19');break;}var _0x354dc5={'method':_0xa114('0x1a'),'uri':_0x238e80+_0xa114('0x28'),'form':{'grant_type':_0xa114('0x1b'),'client_id':_0x253113['clientId'],'client_secret':_0x253113[_0xa114('0x11')],'redirect_uri':_0x253113['serverUrl'],'code':_0x253113['code']},'headers':{'Content-Type':_0xa114('0x1d')}};return rp(_0x354dc5)['then'](function(_0x32b716){var _0x4e7e54=JSON[_0xa114('0x1f')](_0x32b716);if(_0x4e7e54['refresh_token']){_0x253113[_0xa114('0x29')]=_0x4e7e54[_0xa114('0x20')];logger[_0xa114('0x21')](util[_0xa114('0x22')](_0xa114('0x2a'),_0x253113[_0xa114('0x23')],_0x253113['id']));}else{logger[_0xa114('0x24')](util[_0xa114('0x22')](_0xa114('0x2b'),_0x253113['name'],_0x253113['id']),util[_0xa114('0x25')](_0x4e7e54,{'showHidden':![],'depth':null}));}return _0x59e8db(null,_0x2dc4ce);})[_0xa114('0x26')](function(_0x388d0a){logger[_0xa114('0x24')](util[_0xa114('0x22')](_0xa114('0x2b'),_0x253113['name'],_0x253113['id']),util['inspect'](parsedResult,{'showHidden':![],'depth':null}));return _0x59e8db(_0x388d0a);});}else{return _0x59e8db(null,_0x2dc4ce);}}}});};
\ No newline at end of file
+var _0x3593=['info','inspect','lodash','util','../../config/logger','api','moment','bluebird','rimraf','../../config/environment','../../components/integrations/configuration','exports','define','ZohoAccount','int_zoho_accounts','changed','zone','serverUrl','clientId','clientSecret','code','host','slice','substring','lastIndexOf','https://accounts.zoho.com','https://accounts.zoho.com.au','https://accounts.zoho.in','application/x-www-form-urlencoded','then','parse','refresh_token','refreshToken','format','ZohoAccount,\x20Refresh\x20token\x20successfully\x20generated\x20for\x20account\x20\x22%s\x22\x20#%d','name','error','ZohoAccount,\x20Unable\x20to\x20generate\x20the\x20refresh\x20token\x20for\x20account\x20\x22%s\x22\x20#%d','catch','https://accounts.zoho.com.cn','/oauth/v2/token','authorization_code'];(function(_0x3fb72d,_0xf5c409){var _0x3ed08a=function(_0x4ff79f){while(--_0x4ff79f){_0x3fb72d['push'](_0x3fb72d['shift']());}};_0x3ed08a(++_0xf5c409);}(_0x3593,0x152));var _0x3359=function(_0x475645,_0x1f3e79){_0x475645=_0x475645-0x0;var _0x13e9e9=_0x3593[_0x475645];return _0x13e9e9;};'use strict';var _=require(_0x3359('0x0'));var util=require(_0x3359('0x1'));var logger=require(_0x3359('0x2'))(_0x3359('0x3'));var moment=require(_0x3359('0x4'));var BPromise=require(_0x3359('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x3359('0x6'));var config=require(_0x3359('0x7'));var attributes=require('./intZohoAccount.attributes');var integrations=require(_0x3359('0x8'));module[_0x3359('0x9')]=function(_0x2ec3b8,_0x3be0d3){return _0x2ec3b8[_0x3359('0xa')](_0x3359('0xb'),attributes,{'tableName':_0x3359('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeCreate':function(_0x19f859,_0x40a61a,_0x568b6e){if(_0x19f859[_0x3359('0xd')](_0x3359('0xe'))||_0x19f859[_0x3359('0xd')](_0x3359('0xf'))||_0x19f859[_0x3359('0xd')](_0x3359('0x10'))||_0x19f859[_0x3359('0xd')](_0x3359('0x11'))||_0x19f859[_0x3359('0xd')](_0x3359('0x12'))||_0x19f859[_0x3359('0xd')](_0x3359('0x13'))){var _0x3e5b1c,_0x24b2f3;_0x3e5b1c=_0x19f859['serverUrl'];var _0x2ad8b3=_0x3e5b1c[_0x3359('0x14')](-0x1);if(_0x2ad8b3==='/'||_0x2ad8b3==='\x5c'||_0x2ad8b3===':'){_0x3e5b1c=_0x3e5b1c[_0x3359('0x15')](0x0,_0x3e5b1c[_0x3359('0x16')](_0x2ad8b3));}switch(_0x19f859['zone']){case'US':_0x24b2f3=_0x3359('0x17');break;case'AU':_0x24b2f3=_0x3359('0x18');break;case'IN':_0x24b2f3=_0x3359('0x19');break;case'CN':_0x24b2f3='https://accounts.zoho.com.cn';break;default:_0x24b2f3='https://accounts.zoho.eu';break;}var _0x29ed8b={'method':'POST','uri':_0x24b2f3+'/oauth/v2/token','form':{'grant_type':'authorization_code','client_id':_0x19f859[_0x3359('0x10')],'client_secret':_0x19f859[_0x3359('0x11')],'redirect_uri':_0x19f859[_0x3359('0xf')],'code':_0x19f859['code']},'headers':{'Content-Type':_0x3359('0x1a')}};return rp(_0x29ed8b)[_0x3359('0x1b')](function(_0x494846){var _0xde7e71=JSON[_0x3359('0x1c')](_0x494846);if(_0xde7e71[_0x3359('0x1d')]){_0x19f859[_0x3359('0x1e')]=_0xde7e71[_0x3359('0x1d')];logger['info'](util[_0x3359('0x1f')](_0x3359('0x20'),_0x19f859[_0x3359('0x21')],_0x19f859['id']));}else{logger[_0x3359('0x22')](util[_0x3359('0x1f')](_0x3359('0x23'),_0x19f859['name'],_0x19f859['id']),util['inspect'](_0xde7e71,{'showHidden':![],'depth':null}));}return _0x568b6e(null,_0x40a61a);})[_0x3359('0x24')](function(_0x2390e2){logger[_0x3359('0x22')](util[_0x3359('0x1f')](_0x3359('0x23'),_0x19f859[_0x3359('0x21')],_0x19f859['id']),util['inspect'](parsedResult,{'showHidden':![],'depth':null}));return _0x568b6e(_0x2390e2);});}else{return _0x568b6e(null,_0x40a61a);}},'beforeUpdate':function(_0x31d06c,_0x77a31,_0x235593){if(_0x31d06c['changed'](_0x3359('0xe'))||_0x31d06c[_0x3359('0xd')](_0x3359('0xf'))||_0x31d06c[_0x3359('0xd')](_0x3359('0x10'))||_0x31d06c[_0x3359('0xd')]('clientSecret')||_0x31d06c[_0x3359('0xd')](_0x3359('0x12'))||_0x31d06c[_0x3359('0xd')](_0x3359('0x13'))){var _0x33ccd4,_0x56850d;_0x33ccd4=_0x31d06c[_0x3359('0xf')];var _0x2a36bb=_0x33ccd4['slice'](-0x1);if(_0x2a36bb==='/'||_0x2a36bb==='\x5c'||_0x2a36bb===':'){_0x33ccd4=_0x33ccd4['substring'](0x0,_0x33ccd4[_0x3359('0x16')](_0x2a36bb));}switch(_0x31d06c['zone']){case'US':_0x56850d=_0x3359('0x17');break;case'AU':_0x56850d=_0x3359('0x18');break;case'IN':_0x56850d=_0x3359('0x19');break;case'CN':_0x56850d=_0x3359('0x25');break;default:_0x56850d='https://accounts.zoho.eu';break;}var _0x2aff50={'method':'POST','uri':_0x56850d+_0x3359('0x26'),'form':{'grant_type':_0x3359('0x27'),'client_id':_0x31d06c[_0x3359('0x10')],'client_secret':_0x31d06c[_0x3359('0x11')],'redirect_uri':_0x31d06c[_0x3359('0xf')],'code':_0x31d06c[_0x3359('0x12')]},'headers':{'Content-Type':_0x3359('0x1a')}};return rp(_0x2aff50)[_0x3359('0x1b')](function(_0x335e66){var _0x18e1bd=JSON[_0x3359('0x1c')](_0x335e66);if(_0x18e1bd['refresh_token']){_0x31d06c[_0x3359('0x1e')]=_0x18e1bd[_0x3359('0x1d')];logger[_0x3359('0x28')](util[_0x3359('0x1f')](_0x3359('0x20'),_0x31d06c[_0x3359('0x21')],_0x31d06c['id']));}else{logger[_0x3359('0x22')](util[_0x3359('0x1f')](_0x3359('0x23'),_0x31d06c[_0x3359('0x21')],_0x31d06c['id']),util[_0x3359('0x29')](_0x18e1bd,{'showHidden':![],'depth':null}));}return _0x235593(null,_0x77a31);})[_0x3359('0x24')](function(_0x33ee83){logger[_0x3359('0x22')](util[_0x3359('0x1f')](_0x3359('0x23'),_0x31d06c[_0x3359('0x21')],_0x31d06c['id']),util['inspect'](parsedResult,{'showHidden':![],'depth':null}));return _0x235593(_0x33ee83);});}else{return _0x235593(null,_0x77a31);}}}});};
\ No newline at end of file
index 0b9817d..7900600 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6ac2=['find','raw','ShowZohoAccount','debug','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','info','ZohoAccount,\x20%s,\x20%s','request\x20sent','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','GetZohoAccount','ZohoAccount','options','attributes','limit','include','model','map','then'];(function(_0x2bf141,_0x31eac7){var _0x48277b=function(_0x9fe560){while(--_0x9fe560){_0x2bf141['push'](_0x2bf141['shift']());}};_0x48277b(++_0x31eac7);}(_0x6ac2,0x184));var _0x26ac=function(_0x3974f1,_0x1e3709){_0x3974f1=_0x3974f1-0x0;var _0x2b9f50=_0x6ac2[_0x3974f1];return _0x2b9f50;};'use strict';var _=require(_0x26ac('0x0'));var util=require('util');var moment=require(_0x26ac('0x1'));var BPromise=require(_0x26ac('0x2'));var rs=require(_0x26ac('0x3'));var fs=require('fs');var Redis=require(_0x26ac('0x4'));var db=require(_0x26ac('0x5'))['db'];var utils=require(_0x26ac('0x6'));var logger=require('../../config/logger')(_0x26ac('0x7'));var config=require('../../config/environment');var jayson=require(_0x26ac('0x8'));var client=jayson[_0x26ac('0x9')][_0x26ac('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x159ba6,_0x36389c,_0x444ca1){return new BPromise(function(_0x1906d0,_0xd8b1e5){return client['request'](_0x159ba6,_0x444ca1)['then'](function(_0x27ff15){logger[_0x26ac('0xb')](_0x26ac('0xc'),_0x36389c,_0x26ac('0xd'));logger['debug'](_0x26ac('0xe'),_0x36389c,_0x26ac('0xd'),JSON[_0x26ac('0xf')](_0x27ff15));if(_0x27ff15[_0x26ac('0x10')]){if(_0x27ff15['error']['code']===0x1f4){logger[_0x26ac('0x10')](_0x26ac('0xc'),_0x36389c,_0x27ff15[_0x26ac('0x10')][_0x26ac('0x11')]);return _0xd8b1e5(_0x27ff15[_0x26ac('0x10')][_0x26ac('0x11')]);}logger[_0x26ac('0x10')]('ZohoAccount,\x20%s,\x20%s',_0x36389c,_0x27ff15[_0x26ac('0x10')][_0x26ac('0x11')]);return _0x1906d0(_0x27ff15[_0x26ac('0x10')][_0x26ac('0x11')]);}else{logger['info'](_0x26ac('0xc'),_0x36389c,_0x26ac('0xd'));_0x1906d0(_0x27ff15['result'][_0x26ac('0x11')]);}})[_0x26ac('0x12')](function(_0x3b7c5d){logger[_0x26ac('0x10')]('ZohoAccount,\x20%s,\x20%s',_0x36389c,_0x3b7c5d);_0xd8b1e5(_0x3b7c5d);});});}exports[_0x26ac('0x13')]=function(_0xb03bbc){var _0x5cd737=this;return new Promise(function(_0x539eda,_0x111613){return db[_0x26ac('0x14')]['findAll']({'raw':_0xb03bbc[_0x26ac('0x15')]?_0xb03bbc['options']['raw']===undefined?!![]:![]:!![],'where':_0xb03bbc['options']?_0xb03bbc[_0x26ac('0x15')]['where']||null:null,'attributes':_0xb03bbc[_0x26ac('0x15')]?_0xb03bbc[_0x26ac('0x15')][_0x26ac('0x16')]||null:null,'limit':_0xb03bbc[_0x26ac('0x15')]?_0xb03bbc[_0x26ac('0x15')][_0x26ac('0x17')]||null:null,'include':_0xb03bbc[_0x26ac('0x15')]?_0xb03bbc[_0x26ac('0x15')][_0x26ac('0x18')]?_['map'](_0xb03bbc[_0x26ac('0x15')][_0x26ac('0x18')],function(_0x2b8299){return{'model':db[_0x2b8299[_0x26ac('0x19')]],'as':_0x2b8299['as'],'attributes':_0x2b8299[_0x26ac('0x16')],'include':_0x2b8299[_0x26ac('0x18')]?_[_0x26ac('0x1a')](_0x2b8299[_0x26ac('0x18')],function(_0x4172c2){return{'model':db[_0x4172c2[_0x26ac('0x19')]],'as':_0x4172c2['as'],'attributes':_0x4172c2['attributes'],'include':_0x4172c2['include']?_[_0x26ac('0x1a')](_0x4172c2['include'],function(_0x185296){return{'model':db[_0x185296[_0x26ac('0x19')]],'as':_0x185296['as'],'attributes':_0x185296[_0x26ac('0x16')]};}):[]};}):[]};}):[]:[]})[_0x26ac('0x1b')](function(_0x31cb17){logger[_0x26ac('0xb')]('GetZohoAccount',_0xb03bbc);logger['debug'](_0x26ac('0x13'),_0xb03bbc,JSON[_0x26ac('0xf')](_0x31cb17));_0x539eda(_0x31cb17);})[_0x26ac('0x12')](function(_0x4d873e){logger['error'](_0x26ac('0x13'),_0x4d873e[_0x26ac('0x11')],_0xb03bbc);_0x111613(_0x5cd737[_0x26ac('0x10')](0x1f4,_0x4d873e[_0x26ac('0x11')]));});});};exports['ShowZohoAccount']=function(_0x5e1cbc){var _0x3ea2f0=this;return new Promise(function(_0x3e2148,_0x17691a){return db[_0x26ac('0x14')][_0x26ac('0x1c')]({'raw':_0x5e1cbc[_0x26ac('0x15')]?_0x5e1cbc[_0x26ac('0x15')][_0x26ac('0x1d')]===undefined?!![]:![]:!![],'where':_0x5e1cbc[_0x26ac('0x15')]?_0x5e1cbc[_0x26ac('0x15')]['where']||null:null,'attributes':_0x5e1cbc[_0x26ac('0x15')]?_0x5e1cbc[_0x26ac('0x15')]['attributes']||null:null,'include':_0x5e1cbc[_0x26ac('0x15')]?_0x5e1cbc[_0x26ac('0x15')][_0x26ac('0x18')]?_[_0x26ac('0x1a')](_0x5e1cbc[_0x26ac('0x15')][_0x26ac('0x18')],function(_0x375f83){return{'model':db[_0x375f83[_0x26ac('0x19')]],'as':_0x375f83['as'],'attributes':_0x375f83[_0x26ac('0x16')],'include':_0x375f83[_0x26ac('0x18')]?_[_0x26ac('0x1a')](_0x375f83[_0x26ac('0x18')],function(_0x583109){return{'model':db[_0x583109[_0x26ac('0x19')]],'as':_0x583109['as'],'attributes':_0x583109[_0x26ac('0x16')],'include':_0x583109[_0x26ac('0x18')]?_['map'](_0x583109[_0x26ac('0x18')],function(_0x4a842a){return{'model':db[_0x4a842a[_0x26ac('0x19')]],'as':_0x4a842a['as'],'attributes':_0x4a842a[_0x26ac('0x16')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x66dc0c){logger[_0x26ac('0xb')](_0x26ac('0x1e'),_0x5e1cbc);logger[_0x26ac('0x1f')](_0x26ac('0x1e'),_0x5e1cbc,JSON[_0x26ac('0xf')](_0x66dc0c));_0x3e2148(_0x66dc0c);})['catch'](function(_0x76f6c4){logger['error'](_0x26ac('0x1e'),_0x76f6c4['message'],_0x5e1cbc);_0x17691a(_0x3ea2f0[_0x26ac('0x10')](0x1f4,_0x76f6c4['message']));});});};
\ No newline at end of file
+var _0xa064=['message','ZohoAccount,\x20%s,\x20%s','result','catch','ZohoAccount','findAll','options','raw','where','attributes','limit','include','map','model','GetZohoAccount','ShowZohoAccount','find','lodash','util','moment','bluebird','randomstring','../../config/utils','rpc','../../config/environment','client','http','request','then','info','request\x20sent','debug','ZohoAccount,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x5eef05,_0x1be989){var _0x56d4b8=function(_0x57993d){while(--_0x57993d){_0x5eef05['push'](_0x5eef05['shift']());}};_0x56d4b8(++_0x1be989);}(_0xa064,0x192));var _0x4a06=function(_0x4b7150,_0x5c23df){_0x4b7150=_0x4b7150-0x0;var _0x298641=_0xa064[_0x4b7150];return _0x298641;};'use strict';var _=require(_0x4a06('0x0'));var util=require(_0x4a06('0x1'));var moment=require(_0x4a06('0x2'));var BPromise=require(_0x4a06('0x3'));var rs=require(_0x4a06('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x4a06('0x5'));var logger=require('../../config/logger')(_0x4a06('0x6'));var config=require(_0x4a06('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x4a06('0x8')][_0x4a06('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x55d4e3,_0x3b01cc,_0x454574){return new BPromise(function(_0x4c966b,_0x5e3342){return client[_0x4a06('0xa')](_0x55d4e3,_0x454574)[_0x4a06('0xb')](function(_0x3a8db5){logger[_0x4a06('0xc')]('ZohoAccount,\x20%s,\x20%s',_0x3b01cc,_0x4a06('0xd'));logger[_0x4a06('0xe')](_0x4a06('0xf'),_0x3b01cc,_0x4a06('0xd'),JSON[_0x4a06('0x10')](_0x3a8db5));if(_0x3a8db5[_0x4a06('0x11')]){if(_0x3a8db5[_0x4a06('0x11')]['code']===0x1f4){logger[_0x4a06('0x11')]('ZohoAccount,\x20%s,\x20%s',_0x3b01cc,_0x3a8db5[_0x4a06('0x11')][_0x4a06('0x12')]);return _0x5e3342(_0x3a8db5[_0x4a06('0x11')]['message']);}logger[_0x4a06('0x11')](_0x4a06('0x13'),_0x3b01cc,_0x3a8db5[_0x4a06('0x11')]['message']);return _0x4c966b(_0x3a8db5[_0x4a06('0x11')][_0x4a06('0x12')]);}else{logger[_0x4a06('0xc')]('ZohoAccount,\x20%s,\x20%s',_0x3b01cc,_0x4a06('0xd'));_0x4c966b(_0x3a8db5[_0x4a06('0x14')][_0x4a06('0x12')]);}})[_0x4a06('0x15')](function(_0x15b067){logger['error'](_0x4a06('0x13'),_0x3b01cc,_0x15b067);_0x5e3342(_0x15b067);});});}exports['GetZohoAccount']=function(_0x4fd47f){var _0x9ea060=this;return new Promise(function(_0x463aca,_0x29e98b){return db[_0x4a06('0x16')][_0x4a06('0x17')]({'raw':_0x4fd47f[_0x4a06('0x18')]?_0x4fd47f[_0x4a06('0x18')][_0x4a06('0x19')]===undefined?!![]:![]:!![],'where':_0x4fd47f[_0x4a06('0x18')]?_0x4fd47f['options'][_0x4a06('0x1a')]||null:null,'attributes':_0x4fd47f[_0x4a06('0x18')]?_0x4fd47f[_0x4a06('0x18')][_0x4a06('0x1b')]||null:null,'limit':_0x4fd47f[_0x4a06('0x18')]?_0x4fd47f[_0x4a06('0x18')][_0x4a06('0x1c')]||null:null,'include':_0x4fd47f[_0x4a06('0x18')]?_0x4fd47f[_0x4a06('0x18')][_0x4a06('0x1d')]?_[_0x4a06('0x1e')](_0x4fd47f[_0x4a06('0x18')][_0x4a06('0x1d')],function(_0x5ebd7c){return{'model':db[_0x5ebd7c['model']],'as':_0x5ebd7c['as'],'attributes':_0x5ebd7c[_0x4a06('0x1b')],'include':_0x5ebd7c[_0x4a06('0x1d')]?_[_0x4a06('0x1e')](_0x5ebd7c[_0x4a06('0x1d')],function(_0x5b5a43){return{'model':db[_0x5b5a43['model']],'as':_0x5b5a43['as'],'attributes':_0x5b5a43[_0x4a06('0x1b')],'include':_0x5b5a43[_0x4a06('0x1d')]?_['map'](_0x5b5a43[_0x4a06('0x1d')],function(_0x54613e){return{'model':db[_0x54613e[_0x4a06('0x1f')]],'as':_0x54613e['as'],'attributes':_0x54613e[_0x4a06('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1a47be){logger[_0x4a06('0xc')](_0x4a06('0x20'),_0x4fd47f);logger[_0x4a06('0xe')](_0x4a06('0x20'),_0x4fd47f,JSON[_0x4a06('0x10')](_0x1a47be));_0x463aca(_0x1a47be);})['catch'](function(_0x255924){logger[_0x4a06('0x11')](_0x4a06('0x20'),_0x255924['message'],_0x4fd47f);_0x29e98b(_0x9ea060[_0x4a06('0x11')](0x1f4,_0x255924[_0x4a06('0x12')]));});});};exports[_0x4a06('0x21')]=function(_0x5de4ed){var _0x5a440c=this;return new Promise(function(_0x424e8e,_0x235804){return db[_0x4a06('0x16')][_0x4a06('0x22')]({'raw':_0x5de4ed[_0x4a06('0x18')]?_0x5de4ed[_0x4a06('0x18')][_0x4a06('0x19')]===undefined?!![]:![]:!![],'where':_0x5de4ed[_0x4a06('0x18')]?_0x5de4ed['options'][_0x4a06('0x1a')]||null:null,'attributes':_0x5de4ed[_0x4a06('0x18')]?_0x5de4ed[_0x4a06('0x18')][_0x4a06('0x1b')]||null:null,'include':_0x5de4ed[_0x4a06('0x18')]?_0x5de4ed['options'][_0x4a06('0x1d')]?_['map'](_0x5de4ed[_0x4a06('0x18')][_0x4a06('0x1d')],function(_0x4c0d58){return{'model':db[_0x4c0d58[_0x4a06('0x1f')]],'as':_0x4c0d58['as'],'attributes':_0x4c0d58[_0x4a06('0x1b')],'include':_0x4c0d58[_0x4a06('0x1d')]?_[_0x4a06('0x1e')](_0x4c0d58[_0x4a06('0x1d')],function(_0x4de43c){return{'model':db[_0x4de43c[_0x4a06('0x1f')]],'as':_0x4de43c['as'],'attributes':_0x4de43c['attributes'],'include':_0x4de43c[_0x4a06('0x1d')]?_[_0x4a06('0x1e')](_0x4de43c[_0x4a06('0x1d')],function(_0x4a0a1e){return{'model':db[_0x4a0a1e[_0x4a06('0x1f')]],'as':_0x4a0a1e['as'],'attributes':_0x4a0a1e[_0x4a06('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x4a06('0xb')](function(_0x1095f8){logger[_0x4a06('0xc')](_0x4a06('0x21'),_0x5de4ed);logger['debug'](_0x4a06('0x21'),_0x5de4ed,JSON['stringify'](_0x1095f8));_0x424e8e(_0x1095f8);})[_0x4a06('0x15')](function(_0x301bb4){logger[_0x4a06('0x11')]('ShowZohoAccount',_0x301bb4[_0x4a06('0x12')],_0x5de4ed);_0x235804(_0x5a440c['error'](0x1f4,_0x301bb4[_0x4a06('0x12')]));});});};
\ No newline at end of file
index 5a48659..dcdca69 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3043=['getFields','/:id/subjects','getSubjects','post','put','update','delete','destroy','exports','multer','path','express','Router','../../components/auth/service','index','get','/:id','isAuthenticated','show'];(function(_0x1659c1,_0x24882f){var _0xaefe5a=function(_0x41a1a6){while(--_0x41a1a6){_0x1659c1['push'](_0x1659c1['shift']());}};_0xaefe5a(++_0x24882f);}(_0x3043,0x172));var _0x3304=function(_0x504df1,_0x289598){_0x504df1=_0x504df1-0x0;var _0x1063b5=_0x3043[_0x504df1];return _0x1063b5;};'use strict';var multer=require(_0x3304('0x0'));var util=require('util');var path=require(_0x3304('0x1'));var timeout=require('connect-timeout');var express=require(_0x3304('0x2'));var router=express[_0x3304('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x3304('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require('./intZohoConfiguration.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x3304('0x5')]);router[_0x3304('0x6')](_0x3304('0x7'),auth[_0x3304('0x8')](),controller[_0x3304('0x9')]);router[_0x3304('0x6')]('/:id/fields',auth[_0x3304('0x8')](),controller[_0x3304('0xa')]);router[_0x3304('0x6')](_0x3304('0xb'),auth[_0x3304('0x8')](),controller[_0x3304('0xc')]);router['get']('/:id/descriptions',auth['isAuthenticated'](),controller['getDescriptions']);router[_0x3304('0xd')]('/',auth[_0x3304('0x8')](),controller['create']);router[_0x3304('0xe')](_0x3304('0x7'),auth['isAuthenticated'](),controller[_0x3304('0xf')]);router[_0x3304('0x10')](_0x3304('0x7'),auth[_0x3304('0x8')](),controller[_0x3304('0x11')]);module[_0x3304('0x12')]=router;
\ No newline at end of file
+var _0x6fac=['/:id/subjects','getSubjects','/:id/descriptions','getDescriptions','post','create','put','update','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./intZohoConfiguration.controller','get','isAuthenticated','/:id','show','/:id/fields','getFields'];(function(_0x52614c,_0x1dd730){var _0x583dcd=function(_0x4e98bf){while(--_0x4e98bf){_0x52614c['push'](_0x52614c['shift']());}};_0x583dcd(++_0x1dd730);}(_0x6fac,0x1d5));var _0xc6fa=function(_0x4cd5e4,_0x4daa0d){_0x4cd5e4=_0x4cd5e4-0x0;var _0x4ba6c8=_0x6fac[_0x4cd5e4];return _0x4ba6c8;};'use strict';var multer=require(_0xc6fa('0x0'));var util=require(_0xc6fa('0x1'));var path=require(_0xc6fa('0x2'));var timeout=require(_0xc6fa('0x3'));var express=require(_0xc6fa('0x4'));var router=express[_0xc6fa('0x5')]();var fs_extra=require(_0xc6fa('0x6'));var auth=require(_0xc6fa('0x7'));var interaction=require(_0xc6fa('0x8'));var config=require(_0xc6fa('0x9'));var controller=require(_0xc6fa('0xa'));router[_0xc6fa('0xb')]('/',auth[_0xc6fa('0xc')](),controller['index']);router[_0xc6fa('0xb')](_0xc6fa('0xd'),auth[_0xc6fa('0xc')](),controller[_0xc6fa('0xe')]);router[_0xc6fa('0xb')](_0xc6fa('0xf'),auth[_0xc6fa('0xc')](),controller[_0xc6fa('0x10')]);router['get'](_0xc6fa('0x11'),auth[_0xc6fa('0xc')](),controller[_0xc6fa('0x12')]);router[_0xc6fa('0xb')](_0xc6fa('0x13'),auth[_0xc6fa('0xc')](),controller[_0xc6fa('0x14')]);router[_0xc6fa('0x15')]('/',auth[_0xc6fa('0xc')](),controller[_0xc6fa('0x16')]);router[_0xc6fa('0x17')]('/:id',auth[_0xc6fa('0xc')](),controller[_0xc6fa('0x18')]);router['delete'](_0xc6fa('0xd'),auth[_0xc6fa('0xc')](),controller[_0xc6fa('0x19')]);module[_0xc6fa('0x1a')]=router;
\ No newline at end of file
index be0c70b..ddd4a58 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x130f=['lead','contact','contact_lead','STRING','sequelize','ENUM'];(function(_0x53ccf2,_0x13cb67){var _0x5a2964=function(_0x3b0514){while(--_0x3b0514){_0x53ccf2['push'](_0x53ccf2['shift']());}};_0x5a2964(++_0x13cb67);}(_0x130f,0xbe));var _0xf130=function(_0x37f6cb,_0x3fe4f6){_0x37f6cb=_0x37f6cb-0x0;var _0x1dc2ab=_0x130f[_0x37f6cb];return _0x1dc2ab;};'use strict';var Sequelize=require(_0xf130('0x0'));module['exports']={'name':{'type':Sequelize['STRING']},'moduleCreate':{'type':Sequelize[_0xf130('0x1')](_0xf130('0x2'),_0xf130('0x3'),'nothing'),'defaultValue':_0xf130('0x2')},'moduleSearch':{'type':Sequelize[_0xf130('0x1')]('contact_lead',_0xf130('0x3'),'lead'),'defaultValue':_0xf130('0x4')},'description':{'type':Sequelize[_0xf130('0x5')]}};
\ No newline at end of file
+var _0x1cfd=['sequelize','exports','STRING','ENUM','lead','contact','contact_lead'];(function(_0x226414,_0x2c6b8b){var _0x4da71b=function(_0x5d1da6){while(--_0x5d1da6){_0x226414['push'](_0x226414['shift']());}};_0x4da71b(++_0x2c6b8b);}(_0x1cfd,0x1a4));var _0xd1cf=function(_0x1e8c86,_0x524c80){_0x1e8c86=_0x1e8c86-0x0;var _0x4b7918=_0x1cfd[_0x1e8c86];return _0x4b7918;};'use strict';var Sequelize=require(_0xd1cf('0x0'));module[_0xd1cf('0x1')]={'name':{'type':Sequelize[_0xd1cf('0x2')]},'moduleCreate':{'type':Sequelize[_0xd1cf('0x3')](_0xd1cf('0x4'),_0xd1cf('0x5'),'nothing'),'defaultValue':_0xd1cf('0x4')},'moduleSearch':{'type':Sequelize[_0xd1cf('0x3')]('contact_lead',_0xd1cf('0x5'),_0xd1cf('0x4')),'defaultValue':_0xd1cf('0x6')},'description':{'type':Sequelize[_0xd1cf('0x2')]}};
\ No newline at end of file
index fe507b3..95c2560 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc756=['send','index','map','ZohoConfiguration','rawAttributes','fieldName','type','model','query','keys','attributes','intersection','fields','length','limit','order','sort','where','pick','filters','VIRTUAL','filter','merge','options','includeAll','include','findAll','show','catch','create','body','find','params','getFields','findOne','ZohoField','hasOwnProperty','getSubjects','nolimit','getDescriptions','eml-format','rimraf','fast-json-patch','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','squel','crypto','jsforce','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','sendStatus','status','json','offset','undefined','count','set','Content-Range','save','update','then','destroy','end','error','stack','name'];(function(_0x16799e,_0x546351){var _0x53e76a=function(_0x3077a9){while(--_0x3077a9){_0x16799e['push'](_0x16799e['shift']());}};_0x53e76a(++_0x546351);}(_0xc756,0x1ae));var _0x6c75=function(_0x155020,_0x2fb2ae){_0x155020=_0x155020-0x0;var _0x5dd641=_0xc756[_0x155020];return _0x5dd641;};'use strict';var emlformat=require(_0x6c75('0x0'));var rimraf=require(_0x6c75('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x6c75('0x2'));var rp=require('request-promise');var moment=require(_0x6c75('0x3'));var BPromise=require(_0x6c75('0x4'));var Mustache=require(_0x6c75('0x5'));var util=require(_0x6c75('0x6'));var path=require(_0x6c75('0x7'));var sox=require('sox');var csv=require(_0x6c75('0x8'));var ejs=require(_0x6c75('0x9'));var fs=require('fs');var fs_extra=require(_0x6c75('0xa'));var _=require('lodash');var squel=require(_0x6c75('0xb'));var crypto=require(_0x6c75('0xc'));var jsforce=require(_0x6c75('0xd'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x6c75('0xe'));var Redis=require('ioredis');var authService=require(_0x6c75('0xf'));var qs=require(_0x6c75('0x10'));var as=require(_0x6c75('0x11'));var hardwareService=require(_0x6c75('0x12'));var logger=require(_0x6c75('0x13'))(_0x6c75('0x14'));var utils=require(_0x6c75('0x15'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x44fe27,_0x39bb20){_0x39bb20=_0x39bb20||0xcc;return function(_0x402ff3){if(_0x402ff3){return _0x44fe27[_0x6c75('0x16')](_0x39bb20);}return _0x44fe27[_0x6c75('0x17')](_0x39bb20)['end']();};}function respondWithResult(_0x4fbab3,_0x971e04){_0x971e04=_0x971e04||0xc8;return function(_0x3424d4){if(_0x3424d4){return _0x4fbab3[_0x6c75('0x17')](_0x971e04)[_0x6c75('0x18')](_0x3424d4);}};}function respondWithFilteredResult(_0x2894b1,_0x3ebe33){return function(_0x34ee95){if(_0x34ee95){var _0x3972f6=typeof _0x3ebe33[_0x6c75('0x19')]===_0x6c75('0x1a')&&typeof _0x3ebe33['limit']===_0x6c75('0x1a');var _0x959723=_0x34ee95[_0x6c75('0x1b')];var _0x1657ed=_0x3972f6?0x0:_0x3ebe33['offset'];var _0x296e2f=_0x3972f6?_0x34ee95['count']:_0x3ebe33[_0x6c75('0x19')]+_0x3ebe33['limit'];var _0x4e63a9;if(_0x296e2f>=_0x959723){_0x296e2f=_0x959723;_0x4e63a9=0xc8;}else{_0x4e63a9=0xce;}_0x2894b1[_0x6c75('0x17')](_0x4e63a9);return _0x2894b1[_0x6c75('0x1c')](_0x6c75('0x1d'),_0x1657ed+'-'+_0x296e2f+'/'+_0x959723)['json'](_0x34ee95);}return null;};}function patchUpdates(_0x25bdc9){return function(_0xc3de0a){try{jsonpatch['apply'](_0xc3de0a,_0x25bdc9,!![]);}catch(_0x32fad9){return BPromise['reject'](_0x32fad9);}return _0xc3de0a[_0x6c75('0x1e')]();};}function saveUpdates(_0x8f54b3,_0xa3001b){return function(_0x2a6259){if(_0x2a6259){return _0x2a6259[_0x6c75('0x1f')](_0x8f54b3)[_0x6c75('0x20')](function(_0x2f1d76){return _0x2f1d76;});}return null;};}function removeEntity(_0x15232d,_0x263d0a){return function(_0x1dde13){if(_0x1dde13){return _0x1dde13[_0x6c75('0x21')]()[_0x6c75('0x20')](function(){_0x15232d[_0x6c75('0x17')](0xcc)[_0x6c75('0x22')]();});}};}function handleEntityNotFound(_0x5dae81,_0x145c01){return function(_0x3f89b7){if(!_0x3f89b7){_0x5dae81['sendStatus'](0x194);}return _0x3f89b7;};}function handleError(_0x548896,_0x5f3b5a){_0x5f3b5a=_0x5f3b5a||0x1f4;return function(_0x7c67ad){logger[_0x6c75('0x23')](_0x7c67ad[_0x6c75('0x24')]);if(_0x7c67ad['name']){delete _0x7c67ad[_0x6c75('0x25')];}_0x548896[_0x6c75('0x17')](_0x5f3b5a)[_0x6c75('0x26')](_0x7c67ad);};}exports[_0x6c75('0x27')]=function(_0x35883d,_0x2aa6e8){var _0x3a0432={},_0x2fcd78={},_0x1a1280={'count':0x0,'rows':[]};var _0x10d7d0=_[_0x6c75('0x28')](db[_0x6c75('0x29')][_0x6c75('0x2a')],function(_0xd26af7){return{'name':_0xd26af7[_0x6c75('0x2b')],'type':_0xd26af7[_0x6c75('0x2c')]['key']};});_0x2fcd78[_0x6c75('0x2d')]=_[_0x6c75('0x28')](_0x10d7d0,'name');_0x2fcd78[_0x6c75('0x2e')]=_[_0x6c75('0x2f')](_0x35883d[_0x6c75('0x2e')]);_0x2fcd78['filters']=_['intersection'](_0x2fcd78[_0x6c75('0x2d')],_0x2fcd78[_0x6c75('0x2e')]);_0x3a0432[_0x6c75('0x30')]=_[_0x6c75('0x31')](_0x2fcd78['model'],qs[_0x6c75('0x32')](_0x35883d['query'][_0x6c75('0x32')]));_0x3a0432['attributes']=_0x3a0432[_0x6c75('0x30')][_0x6c75('0x33')]?_0x3a0432[_0x6c75('0x30')]:_0x2fcd78[_0x6c75('0x2d')];if(!_0x35883d[_0x6c75('0x2e')]['hasOwnProperty']('nolimit')){_0x3a0432[_0x6c75('0x34')]=qs[_0x6c75('0x34')](_0x35883d[_0x6c75('0x2e')][_0x6c75('0x34')]);_0x3a0432[_0x6c75('0x19')]=qs['offset'](_0x35883d['query'][_0x6c75('0x19')]);}_0x3a0432[_0x6c75('0x35')]=qs[_0x6c75('0x36')](_0x35883d[_0x6c75('0x2e')][_0x6c75('0x36')]);_0x3a0432[_0x6c75('0x37')]=qs['filters'](_[_0x6c75('0x38')](_0x35883d[_0x6c75('0x2e')],_0x2fcd78[_0x6c75('0x39')]),_0x10d7d0);if(_0x35883d[_0x6c75('0x2e')]['filter']){_0x3a0432['where']=_['merge'](_0x3a0432[_0x6c75('0x37')],{'$or':_[_0x6c75('0x28')](_0x10d7d0,function(_0x46420b){if(_0x46420b[_0x6c75('0x2c')]!==_0x6c75('0x3a')){var _0x292962={};_0x292962[_0x46420b['name']]={'$like':'%'+_0x35883d[_0x6c75('0x2e')][_0x6c75('0x3b')]+'%'};return _0x292962;}})});}_0x3a0432=_[_0x6c75('0x3c')]({},_0x3a0432,_0x35883d[_0x6c75('0x3d')]);var _0x61f971={'where':_0x3a0432[_0x6c75('0x37')]};return db[_0x6c75('0x29')][_0x6c75('0x1b')](_0x61f971)['then'](function(_0x1be7f2){_0x1a1280[_0x6c75('0x1b')]=_0x1be7f2;if(_0x35883d[_0x6c75('0x2e')][_0x6c75('0x3e')]){_0x3a0432[_0x6c75('0x3f')]=[{'all':!![]}];}return db[_0x6c75('0x29')][_0x6c75('0x40')](_0x3a0432);})['then'](function(_0x2f3946){_0x1a1280['rows']=_0x2f3946;return _0x1a1280;})[_0x6c75('0x20')](respondWithFilteredResult(_0x2aa6e8,_0x3a0432))['catch'](handleError(_0x2aa6e8,null));};exports[_0x6c75('0x41')]=function(_0x33b972,_0x2da95a){var _0x59f02f={'raw':![],'where':{'id':_0x33b972['params']['id']}},_0x262dda={};_0x262dda[_0x6c75('0x2d')]=_[_0x6c75('0x2f')](db[_0x6c75('0x29')][_0x6c75('0x2a')]);_0x262dda[_0x6c75('0x2e')]=_['keys'](_0x33b972[_0x6c75('0x2e')]);_0x262dda[_0x6c75('0x39')]=_[_0x6c75('0x31')](_0x262dda[_0x6c75('0x2d')],_0x262dda['query']);_0x59f02f[_0x6c75('0x30')]=_[_0x6c75('0x31')](_0x262dda[_0x6c75('0x2d')],qs[_0x6c75('0x32')](_0x33b972[_0x6c75('0x2e')][_0x6c75('0x32')]));_0x59f02f[_0x6c75('0x30')]=_0x59f02f[_0x6c75('0x30')][_0x6c75('0x33')]?_0x59f02f[_0x6c75('0x30')]:_0x262dda['model'];if(_0x33b972[_0x6c75('0x2e')]['includeAll']){_0x59f02f[_0x6c75('0x3f')]=[{'all':!![]}];}_0x59f02f=_[_0x6c75('0x3c')]({},_0x59f02f,_0x33b972[_0x6c75('0x3d')]);return db[_0x6c75('0x29')]['find'](_0x59f02f)[_0x6c75('0x20')](handleEntityNotFound(_0x2da95a,null))[_0x6c75('0x20')](respondWithResult(_0x2da95a,null))[_0x6c75('0x42')](handleError(_0x2da95a,null));};exports[_0x6c75('0x43')]=function(_0x50edcf,_0x3082d4){return db[_0x6c75('0x29')][_0x6c75('0x43')](_0x50edcf[_0x6c75('0x44')],{})[_0x6c75('0x20')](respondWithResult(_0x3082d4,0xc9))[_0x6c75('0x42')](handleError(_0x3082d4,null));};exports[_0x6c75('0x1f')]=function(_0x413e2a,_0x4bce74){if(_0x413e2a[_0x6c75('0x44')]['id']){delete _0x413e2a[_0x6c75('0x44')]['id'];}return db[_0x6c75('0x29')]['find']({'where':{'id':_0x413e2a['params']['id']}})[_0x6c75('0x20')](handleEntityNotFound(_0x4bce74,null))[_0x6c75('0x20')](saveUpdates(_0x413e2a[_0x6c75('0x44')],null))[_0x6c75('0x20')](respondWithResult(_0x4bce74,null))['catch'](handleError(_0x4bce74,null));};exports['destroy']=function(_0x53858e,_0x1c620b){return db['ZohoConfiguration'][_0x6c75('0x45')]({'where':{'id':_0x53858e[_0x6c75('0x46')]['id']}})[_0x6c75('0x20')](handleEntityNotFound(_0x1c620b,null))[_0x6c75('0x20')](removeEntity(_0x1c620b,null))[_0x6c75('0x42')](handleError(_0x1c620b,null));};exports[_0x6c75('0x47')]=function(_0x5c8b04,_0x4ef9be,_0x26aa40){var _0x5eac1c={};var _0x2f87bc={};var _0x2e01e5;var _0x1bc420;return db[_0x6c75('0x29')][_0x6c75('0x48')]({'where':{'id':_0x5c8b04['params']['id']}})['then'](handleEntityNotFound(_0x4ef9be,null))[_0x6c75('0x20')](function(_0xe4c058){if(_0xe4c058){_0x2e01e5=_0xe4c058;_0x2f87bc[_0x6c75('0x2d')]=_[_0x6c75('0x2f')](db[_0x6c75('0x49')][_0x6c75('0x2a')]);_0x2f87bc[_0x6c75('0x2e')]=_['keys'](_0x5c8b04[_0x6c75('0x2e')]);_0x2f87bc[_0x6c75('0x39')]=_[_0x6c75('0x31')](_0x2f87bc[_0x6c75('0x2d')],_0x2f87bc[_0x6c75('0x2e')]);_0x5eac1c['attributes']=_[_0x6c75('0x31')](_0x2f87bc[_0x6c75('0x2d')],qs['fields'](_0x5c8b04['query'][_0x6c75('0x32')]));_0x5eac1c[_0x6c75('0x30')]=_0x5eac1c[_0x6c75('0x30')][_0x6c75('0x33')]?_0x5eac1c[_0x6c75('0x30')]:_0x2f87bc[_0x6c75('0x2d')];_0x5eac1c[_0x6c75('0x35')]=qs['sort'](_0x5c8b04[_0x6c75('0x2e')][_0x6c75('0x36')]);_0x5eac1c['where']=qs[_0x6c75('0x39')](_[_0x6c75('0x38')](_0x5c8b04[_0x6c75('0x2e')],_0x2f87bc[_0x6c75('0x39')]));if(_0x5c8b04[_0x6c75('0x2e')][_0x6c75('0x3b')]){_0x5eac1c[_0x6c75('0x37')]=_[_0x6c75('0x3c')](_0x5eac1c[_0x6c75('0x37')],{'$or':_[_0x6c75('0x28')](_0x5eac1c[_0x6c75('0x30')],function(_0x3dd78d){var _0x408ba2={};_0x408ba2[_0x3dd78d]={'$like':'%'+_0x5c8b04[_0x6c75('0x2e')][_0x6c75('0x3b')]+'%'};return _0x408ba2;})});}_0x5eac1c=_[_0x6c75('0x3c')]({},_0x5eac1c,_0x5c8b04['options']);return _0x2e01e5[_0x6c75('0x47')](_0x5eac1c);}})[_0x6c75('0x20')](function(_0x3d787d){if(_0x3d787d){_0x1bc420=_0x3d787d[_0x6c75('0x33')];if(!_0x5c8b04[_0x6c75('0x2e')][_0x6c75('0x4a')]('nolimit')){_0x5eac1c[_0x6c75('0x34')]=qs[_0x6c75('0x34')](_0x5c8b04[_0x6c75('0x2e')]['limit']);_0x5eac1c[_0x6c75('0x19')]=qs[_0x6c75('0x19')](_0x5c8b04[_0x6c75('0x2e')][_0x6c75('0x19')]);}return _0x2e01e5[_0x6c75('0x47')](_0x5eac1c);}})[_0x6c75('0x20')](function(_0x48660c){if(_0x48660c){return _0x48660c?{'count':_0x1bc420,'rows':_0x48660c}:null;}})[_0x6c75('0x20')](respondWithResult(_0x4ef9be,null))['catch'](handleError(_0x4ef9be,null));};exports[_0x6c75('0x4b')]=function(_0x468e28,_0x162998,_0x1593f6){var _0x40fe30={};var _0x12efe6={};var _0x4ac5ff;var _0x4727cc;return db[_0x6c75('0x29')]['findOne']({'where':{'id':_0x468e28['params']['id']}})[_0x6c75('0x20')](handleEntityNotFound(_0x162998,null))['then'](function(_0x1271f2){if(_0x1271f2){_0x4ac5ff=_0x1271f2;_0x12efe6[_0x6c75('0x2d')]=_['keys'](db['ZohoField'][_0x6c75('0x2a')]);_0x12efe6[_0x6c75('0x2e')]=_[_0x6c75('0x2f')](_0x468e28[_0x6c75('0x2e')]);_0x12efe6[_0x6c75('0x39')]=_['intersection'](_0x12efe6[_0x6c75('0x2d')],_0x12efe6[_0x6c75('0x2e')]);_0x40fe30[_0x6c75('0x30')]=_[_0x6c75('0x31')](_0x12efe6['model'],qs['fields'](_0x468e28[_0x6c75('0x2e')][_0x6c75('0x32')]));_0x40fe30['attributes']=_0x40fe30[_0x6c75('0x30')][_0x6c75('0x33')]?_0x40fe30[_0x6c75('0x30')]:_0x12efe6[_0x6c75('0x2d')];_0x40fe30[_0x6c75('0x35')]=qs[_0x6c75('0x36')](_0x468e28[_0x6c75('0x2e')]['sort']);_0x40fe30[_0x6c75('0x37')]=qs[_0x6c75('0x39')](_[_0x6c75('0x38')](_0x468e28[_0x6c75('0x2e')],_0x12efe6[_0x6c75('0x39')]));if(_0x468e28[_0x6c75('0x2e')][_0x6c75('0x3b')]){_0x40fe30[_0x6c75('0x37')]=_[_0x6c75('0x3c')](_0x40fe30[_0x6c75('0x37')],{'$or':_[_0x6c75('0x28')](_0x40fe30[_0x6c75('0x30')],function(_0x332f6f){var _0x402336={};_0x402336[_0x332f6f]={'$like':'%'+_0x468e28[_0x6c75('0x2e')][_0x6c75('0x3b')]+'%'};return _0x402336;})});}_0x40fe30=_[_0x6c75('0x3c')]({},_0x40fe30,_0x468e28[_0x6c75('0x3d')]);return _0x4ac5ff['getSubjects'](_0x40fe30);}})[_0x6c75('0x20')](function(_0xe1ef7){if(_0xe1ef7){_0x4727cc=_0xe1ef7[_0x6c75('0x33')];if(!_0x468e28[_0x6c75('0x2e')]['hasOwnProperty'](_0x6c75('0x4c'))){_0x40fe30[_0x6c75('0x34')]=qs[_0x6c75('0x34')](_0x468e28[_0x6c75('0x2e')][_0x6c75('0x34')]);_0x40fe30[_0x6c75('0x19')]=qs[_0x6c75('0x19')](_0x468e28[_0x6c75('0x2e')][_0x6c75('0x19')]);}return _0x4ac5ff[_0x6c75('0x4b')](_0x40fe30);}})[_0x6c75('0x20')](function(_0x5a76d1){if(_0x5a76d1){return _0x5a76d1?{'count':_0x4727cc,'rows':_0x5a76d1}:null;}})['then'](respondWithResult(_0x162998,null))[_0x6c75('0x42')](handleError(_0x162998,null));};exports[_0x6c75('0x4d')]=function(_0x1dfa8e,_0x3bd7cb,_0x51f675){var _0x54cf64={};var _0x5bab35={};var _0x32b4f3;var _0x288511;return db[_0x6c75('0x29')][_0x6c75('0x48')]({'where':{'id':_0x1dfa8e['params']['id']}})['then'](handleEntityNotFound(_0x3bd7cb,null))[_0x6c75('0x20')](function(_0x171a17){if(_0x171a17){_0x32b4f3=_0x171a17;_0x5bab35['model']=_['keys'](db[_0x6c75('0x49')][_0x6c75('0x2a')]);_0x5bab35[_0x6c75('0x2e')]=_[_0x6c75('0x2f')](_0x1dfa8e[_0x6c75('0x2e')]);_0x5bab35[_0x6c75('0x39')]=_[_0x6c75('0x31')](_0x5bab35[_0x6c75('0x2d')],_0x5bab35[_0x6c75('0x2e')]);_0x54cf64[_0x6c75('0x30')]=_[_0x6c75('0x31')](_0x5bab35[_0x6c75('0x2d')],qs[_0x6c75('0x32')](_0x1dfa8e['query'][_0x6c75('0x32')]));_0x54cf64[_0x6c75('0x30')]=_0x54cf64[_0x6c75('0x30')]['length']?_0x54cf64[_0x6c75('0x30')]:_0x5bab35[_0x6c75('0x2d')];_0x54cf64[_0x6c75('0x35')]=qs[_0x6c75('0x36')](_0x1dfa8e[_0x6c75('0x2e')][_0x6c75('0x36')]);_0x54cf64['where']=qs['filters'](_[_0x6c75('0x38')](_0x1dfa8e['query'],_0x5bab35[_0x6c75('0x39')]));if(_0x1dfa8e[_0x6c75('0x2e')][_0x6c75('0x3b')]){_0x54cf64[_0x6c75('0x37')]=_[_0x6c75('0x3c')](_0x54cf64[_0x6c75('0x37')],{'$or':_[_0x6c75('0x28')](_0x54cf64[_0x6c75('0x30')],function(_0x36260){var _0x102a78={};_0x102a78[_0x36260]={'$like':'%'+_0x1dfa8e[_0x6c75('0x2e')][_0x6c75('0x3b')]+'%'};return _0x102a78;})});}_0x54cf64=_[_0x6c75('0x3c')]({},_0x54cf64,_0x1dfa8e[_0x6c75('0x3d')]);return _0x32b4f3[_0x6c75('0x4d')](_0x54cf64);}})[_0x6c75('0x20')](function(_0xe14b9c){if(_0xe14b9c){_0x288511=_0xe14b9c[_0x6c75('0x33')];if(!_0x1dfa8e['query'][_0x6c75('0x4a')]('nolimit')){_0x54cf64[_0x6c75('0x34')]=qs[_0x6c75('0x34')](_0x1dfa8e[_0x6c75('0x2e')][_0x6c75('0x34')]);_0x54cf64[_0x6c75('0x19')]=qs['offset'](_0x1dfa8e[_0x6c75('0x2e')][_0x6c75('0x19')]);}return _0x32b4f3[_0x6c75('0x4d')](_0x54cf64);}})['then'](function(_0x129cdc){if(_0x129cdc){return _0x129cdc?{'count':_0x288511,'rows':_0x129cdc}:null;}})[_0x6c75('0x20')](respondWithResult(_0x3bd7cb,null))[_0x6c75('0x42')](handleError(_0x3bd7cb,null));};
\ No newline at end of file
+var _0x19ed=['filters','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','catch','params','keys','find','create','body','getFields','findOne','ZohoField','getSubjects','getDescriptions','zip-dir','fast-json-patch','bluebird','mustache','path','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','end','status','undefined','count','offset','limit','set','Content-Range','json','apply','reject','save','update','then','destroy','error','name','send','index','map','ZohoConfiguration','rawAttributes','fieldName','type','key','model'];(function(_0x92d580,_0x4928fb){var _0x4ee344=function(_0x55aa0c){while(--_0x55aa0c){_0x92d580['push'](_0x92d580['shift']());}};_0x4ee344(++_0x4928fb);}(_0x19ed,0x156));var _0xd19e=function(_0x70504d,_0x34e810){_0x70504d=_0x70504d-0x0;var _0x47e29b=_0x19ed[_0x70504d];return _0x47e29b;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xd19e('0x0'));var jsonpatch=require(_0xd19e('0x1'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xd19e('0x2'));var Mustache=require(_0xd19e('0x3'));var util=require('util');var path=require(_0xd19e('0x4'));var sox=require(_0xd19e('0x5'));var csv=require(_0xd19e('0x6'));var ejs=require(_0xd19e('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xd19e('0x8'));var crypto=require(_0xd19e('0x9'));var jsforce=require(_0xd19e('0xa'));var deskjs=require(_0xd19e('0xb'));var toCsv=require(_0xd19e('0x6'));var querystring=require(_0xd19e('0xc'));var Papa=require(_0xd19e('0xd'));var Redis=require(_0xd19e('0xe'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xd19e('0xf'));var hardwareService=require(_0xd19e('0x10'));var logger=require('../../config/logger')(_0xd19e('0x11'));var utils=require(_0xd19e('0x12'));var config=require(_0xd19e('0x13'));var licenseUtil=require(_0xd19e('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x326e94,_0x2fa6fa){_0x2fa6fa=_0x2fa6fa||0xcc;return function(_0x4e710a){if(_0x4e710a){return _0x326e94[_0xd19e('0x15')](_0x2fa6fa);}return _0x326e94['status'](_0x2fa6fa)[_0xd19e('0x16')]();};}function respondWithResult(_0x29f1fc,_0x4cd9da){_0x4cd9da=_0x4cd9da||0xc8;return function(_0x28e7f4){if(_0x28e7f4){return _0x29f1fc[_0xd19e('0x17')](_0x4cd9da)['json'](_0x28e7f4);}};}function respondWithFilteredResult(_0x3052d6,_0x2f7c9a){return function(_0x70a1d9){if(_0x70a1d9){var _0x41985c=typeof _0x2f7c9a['offset']===_0xd19e('0x18')&&typeof _0x2f7c9a['limit']===_0xd19e('0x18');var _0x4eb67b=_0x70a1d9[_0xd19e('0x19')];var _0x3c9db2=_0x41985c?0x0:_0x2f7c9a['offset'];var _0x4d62c2=_0x41985c?_0x70a1d9[_0xd19e('0x19')]:_0x2f7c9a[_0xd19e('0x1a')]+_0x2f7c9a[_0xd19e('0x1b')];var _0x3a0923;if(_0x4d62c2>=_0x4eb67b){_0x4d62c2=_0x4eb67b;_0x3a0923=0xc8;}else{_0x3a0923=0xce;}_0x3052d6[_0xd19e('0x17')](_0x3a0923);return _0x3052d6[_0xd19e('0x1c')](_0xd19e('0x1d'),_0x3c9db2+'-'+_0x4d62c2+'/'+_0x4eb67b)[_0xd19e('0x1e')](_0x70a1d9);}return null;};}function patchUpdates(_0x5d8616){return function(_0x8fe15a){try{jsonpatch[_0xd19e('0x1f')](_0x8fe15a,_0x5d8616,!![]);}catch(_0x271889){return BPromise[_0xd19e('0x20')](_0x271889);}return _0x8fe15a[_0xd19e('0x21')]();};}function saveUpdates(_0x50eb32,_0x5ac9be){return function(_0x555ef7){if(_0x555ef7){return _0x555ef7[_0xd19e('0x22')](_0x50eb32)[_0xd19e('0x23')](function(_0x4a0d83){return _0x4a0d83;});}return null;};}function removeEntity(_0xf7c2d5,_0x35832b){return function(_0x3fef9f){if(_0x3fef9f){return _0x3fef9f[_0xd19e('0x24')]()[_0xd19e('0x23')](function(){_0xf7c2d5['status'](0xcc)[_0xd19e('0x16')]();});}};}function handleEntityNotFound(_0x5dfb55,_0x4f38ba){return function(_0x5f4ca5){if(!_0x5f4ca5){_0x5dfb55[_0xd19e('0x15')](0x194);}return _0x5f4ca5;};}function handleError(_0xfd786a,_0x4b303c){_0x4b303c=_0x4b303c||0x1f4;return function(_0x14f4cc){logger[_0xd19e('0x25')](_0x14f4cc['stack']);if(_0x14f4cc[_0xd19e('0x26')]){delete _0x14f4cc['name'];}_0xfd786a[_0xd19e('0x17')](_0x4b303c)[_0xd19e('0x27')](_0x14f4cc);};}exports[_0xd19e('0x28')]=function(_0x32d2ba,_0x4849cb){var _0xcc0242={},_0x368c46={},_0x4b9e22={'count':0x0,'rows':[]};var _0x2eb17e=_[_0xd19e('0x29')](db[_0xd19e('0x2a')][_0xd19e('0x2b')],function(_0x56eea5){return{'name':_0x56eea5[_0xd19e('0x2c')],'type':_0x56eea5[_0xd19e('0x2d')][_0xd19e('0x2e')]};});_0x368c46[_0xd19e('0x2f')]=_[_0xd19e('0x29')](_0x2eb17e,_0xd19e('0x26'));_0x368c46['query']=_['keys'](_0x32d2ba['query']);_0x368c46[_0xd19e('0x30')]=_[_0xd19e('0x31')](_0x368c46[_0xd19e('0x2f')],_0x368c46[_0xd19e('0x32')]);_0xcc0242[_0xd19e('0x33')]=_['intersection'](_0x368c46['model'],qs[_0xd19e('0x34')](_0x32d2ba[_0xd19e('0x32')][_0xd19e('0x34')]));_0xcc0242[_0xd19e('0x33')]=_0xcc0242[_0xd19e('0x33')][_0xd19e('0x35')]?_0xcc0242[_0xd19e('0x33')]:_0x368c46['model'];if(!_0x32d2ba['query'][_0xd19e('0x36')](_0xd19e('0x37'))){_0xcc0242[_0xd19e('0x1b')]=qs['limit'](_0x32d2ba[_0xd19e('0x32')][_0xd19e('0x1b')]);_0xcc0242['offset']=qs['offset'](_0x32d2ba[_0xd19e('0x32')][_0xd19e('0x1a')]);}_0xcc0242[_0xd19e('0x38')]=qs[_0xd19e('0x39')](_0x32d2ba[_0xd19e('0x32')][_0xd19e('0x39')]);_0xcc0242[_0xd19e('0x3a')]=qs[_0xd19e('0x30')](_[_0xd19e('0x3b')](_0x32d2ba[_0xd19e('0x32')],_0x368c46[_0xd19e('0x30')]),_0x2eb17e);if(_0x32d2ba['query'][_0xd19e('0x3c')]){_0xcc0242[_0xd19e('0x3a')]=_[_0xd19e('0x3d')](_0xcc0242[_0xd19e('0x3a')],{'$or':_[_0xd19e('0x29')](_0x2eb17e,function(_0x2fb6cf){if(_0x2fb6cf['type']!==_0xd19e('0x3e')){var _0x1eccb2={};_0x1eccb2[_0x2fb6cf[_0xd19e('0x26')]]={'$like':'%'+_0x32d2ba['query'][_0xd19e('0x3c')]+'%'};return _0x1eccb2;}})});}_0xcc0242=_[_0xd19e('0x3d')]({},_0xcc0242,_0x32d2ba[_0xd19e('0x3f')]);var _0xaa6f04={'where':_0xcc0242[_0xd19e('0x3a')]};return db[_0xd19e('0x2a')]['count'](_0xaa6f04)[_0xd19e('0x23')](function(_0x4da980){_0x4b9e22[_0xd19e('0x19')]=_0x4da980;if(_0x32d2ba[_0xd19e('0x32')][_0xd19e('0x40')]){_0xcc0242['include']=[{'all':!![]}];}return db[_0xd19e('0x2a')][_0xd19e('0x41')](_0xcc0242);})[_0xd19e('0x23')](function(_0x3bc2ea){_0x4b9e22[_0xd19e('0x42')]=_0x3bc2ea;return _0x4b9e22;})[_0xd19e('0x23')](respondWithFilteredResult(_0x4849cb,_0xcc0242))[_0xd19e('0x43')](handleError(_0x4849cb,null));};exports['show']=function(_0x335269,_0x1b2d16){var _0x101003={'raw':![],'where':{'id':_0x335269[_0xd19e('0x44')]['id']}},_0xaf0d77={};_0xaf0d77[_0xd19e('0x2f')]=_['keys'](db[_0xd19e('0x2a')]['rawAttributes']);_0xaf0d77[_0xd19e('0x32')]=_[_0xd19e('0x45')](_0x335269[_0xd19e('0x32')]);_0xaf0d77[_0xd19e('0x30')]=_[_0xd19e('0x31')](_0xaf0d77[_0xd19e('0x2f')],_0xaf0d77['query']);_0x101003[_0xd19e('0x33')]=_[_0xd19e('0x31')](_0xaf0d77['model'],qs[_0xd19e('0x34')](_0x335269[_0xd19e('0x32')][_0xd19e('0x34')]));_0x101003[_0xd19e('0x33')]=_0x101003['attributes']['length']?_0x101003['attributes']:_0xaf0d77[_0xd19e('0x2f')];if(_0x335269[_0xd19e('0x32')][_0xd19e('0x40')]){_0x101003['include']=[{'all':!![]}];}_0x101003=_[_0xd19e('0x3d')]({},_0x101003,_0x335269['options']);return db[_0xd19e('0x2a')][_0xd19e('0x46')](_0x101003)[_0xd19e('0x23')](handleEntityNotFound(_0x1b2d16,null))[_0xd19e('0x23')](respondWithResult(_0x1b2d16,null))[_0xd19e('0x43')](handleError(_0x1b2d16,null));};exports[_0xd19e('0x47')]=function(_0x22430d,_0x597eb3){return db[_0xd19e('0x2a')][_0xd19e('0x47')](_0x22430d['body'],{})[_0xd19e('0x23')](respondWithResult(_0x597eb3,0xc9))['catch'](handleError(_0x597eb3,null));};exports[_0xd19e('0x22')]=function(_0x1a555c,_0x18863c){if(_0x1a555c[_0xd19e('0x48')]['id']){delete _0x1a555c['body']['id'];}return db['ZohoConfiguration'][_0xd19e('0x46')]({'where':{'id':_0x1a555c['params']['id']}})[_0xd19e('0x23')](handleEntityNotFound(_0x18863c,null))[_0xd19e('0x23')](saveUpdates(_0x1a555c[_0xd19e('0x48')],null))['then'](respondWithResult(_0x18863c,null))['catch'](handleError(_0x18863c,null));};exports[_0xd19e('0x24')]=function(_0x4965b2,_0x5bb0b1){return db[_0xd19e('0x2a')][_0xd19e('0x46')]({'where':{'id':_0x4965b2['params']['id']}})[_0xd19e('0x23')](handleEntityNotFound(_0x5bb0b1,null))[_0xd19e('0x23')](removeEntity(_0x5bb0b1,null))[_0xd19e('0x43')](handleError(_0x5bb0b1,null));};exports[_0xd19e('0x49')]=function(_0xd1b19b,_0x29dc11,_0x314888){var _0x14f65b={};var _0x5be18a={};var _0x580403;var _0x2e5c85;return db[_0xd19e('0x2a')][_0xd19e('0x4a')]({'where':{'id':_0xd1b19b[_0xd19e('0x44')]['id']}})[_0xd19e('0x23')](handleEntityNotFound(_0x29dc11,null))[_0xd19e('0x23')](function(_0x3063ae){if(_0x3063ae){_0x580403=_0x3063ae;_0x5be18a[_0xd19e('0x2f')]=_[_0xd19e('0x45')](db[_0xd19e('0x4b')][_0xd19e('0x2b')]);_0x5be18a['query']=_['keys'](_0xd1b19b['query']);_0x5be18a['filters']=_[_0xd19e('0x31')](_0x5be18a[_0xd19e('0x2f')],_0x5be18a[_0xd19e('0x32')]);_0x14f65b[_0xd19e('0x33')]=_[_0xd19e('0x31')](_0x5be18a[_0xd19e('0x2f')],qs[_0xd19e('0x34')](_0xd1b19b[_0xd19e('0x32')][_0xd19e('0x34')]));_0x14f65b[_0xd19e('0x33')]=_0x14f65b['attributes']['length']?_0x14f65b['attributes']:_0x5be18a['model'];_0x14f65b[_0xd19e('0x38')]=qs[_0xd19e('0x39')](_0xd1b19b[_0xd19e('0x32')]['sort']);_0x14f65b[_0xd19e('0x3a')]=qs[_0xd19e('0x30')](_['pick'](_0xd1b19b[_0xd19e('0x32')],_0x5be18a[_0xd19e('0x30')]));if(_0xd1b19b['query'][_0xd19e('0x3c')]){_0x14f65b['where']=_[_0xd19e('0x3d')](_0x14f65b['where'],{'$or':_['map'](_0x14f65b[_0xd19e('0x33')],function(_0x5e4a5e){var _0x2f2de1={};_0x2f2de1[_0x5e4a5e]={'$like':'%'+_0xd1b19b[_0xd19e('0x32')][_0xd19e('0x3c')]+'%'};return _0x2f2de1;})});}_0x14f65b=_[_0xd19e('0x3d')]({},_0x14f65b,_0xd1b19b['options']);return _0x580403[_0xd19e('0x49')](_0x14f65b);}})[_0xd19e('0x23')](function(_0x4ef0f9){if(_0x4ef0f9){_0x2e5c85=_0x4ef0f9[_0xd19e('0x35')];if(!_0xd1b19b[_0xd19e('0x32')][_0xd19e('0x36')]('nolimit')){_0x14f65b['limit']=qs[_0xd19e('0x1b')](_0xd1b19b['query'][_0xd19e('0x1b')]);_0x14f65b['offset']=qs['offset'](_0xd1b19b[_0xd19e('0x32')][_0xd19e('0x1a')]);}return _0x580403[_0xd19e('0x49')](_0x14f65b);}})[_0xd19e('0x23')](function(_0xb6aa49){if(_0xb6aa49){return _0xb6aa49?{'count':_0x2e5c85,'rows':_0xb6aa49}:null;}})[_0xd19e('0x23')](respondWithResult(_0x29dc11,null))['catch'](handleError(_0x29dc11,null));};exports[_0xd19e('0x4c')]=function(_0x33852b,_0xdd7046,_0x3d6eca){var _0x22a369={};var _0x43f19e={};var _0x28c448;var _0x1fe285;return db[_0xd19e('0x2a')][_0xd19e('0x4a')]({'where':{'id':_0x33852b[_0xd19e('0x44')]['id']}})[_0xd19e('0x23')](handleEntityNotFound(_0xdd7046,null))[_0xd19e('0x23')](function(_0x44ad94){if(_0x44ad94){_0x28c448=_0x44ad94;_0x43f19e[_0xd19e('0x2f')]=_['keys'](db['ZohoField'][_0xd19e('0x2b')]);_0x43f19e[_0xd19e('0x32')]=_[_0xd19e('0x45')](_0x33852b['query']);_0x43f19e[_0xd19e('0x30')]=_['intersection'](_0x43f19e[_0xd19e('0x2f')],_0x43f19e[_0xd19e('0x32')]);_0x22a369[_0xd19e('0x33')]=_[_0xd19e('0x31')](_0x43f19e[_0xd19e('0x2f')],qs[_0xd19e('0x34')](_0x33852b[_0xd19e('0x32')][_0xd19e('0x34')]));_0x22a369[_0xd19e('0x33')]=_0x22a369[_0xd19e('0x33')][_0xd19e('0x35')]?_0x22a369[_0xd19e('0x33')]:_0x43f19e[_0xd19e('0x2f')];_0x22a369['order']=qs[_0xd19e('0x39')](_0x33852b[_0xd19e('0x32')]['sort']);_0x22a369[_0xd19e('0x3a')]=qs[_0xd19e('0x30')](_[_0xd19e('0x3b')](_0x33852b[_0xd19e('0x32')],_0x43f19e['filters']));if(_0x33852b[_0xd19e('0x32')]['filter']){_0x22a369[_0xd19e('0x3a')]=_[_0xd19e('0x3d')](_0x22a369[_0xd19e('0x3a')],{'$or':_[_0xd19e('0x29')](_0x22a369['attributes'],function(_0x162a48){var _0x5f48cc={};_0x5f48cc[_0x162a48]={'$like':'%'+_0x33852b[_0xd19e('0x32')]['filter']+'%'};return _0x5f48cc;})});}_0x22a369=_[_0xd19e('0x3d')]({},_0x22a369,_0x33852b['options']);return _0x28c448[_0xd19e('0x4c')](_0x22a369);}})[_0xd19e('0x23')](function(_0x8427e6){if(_0x8427e6){_0x1fe285=_0x8427e6[_0xd19e('0x35')];if(!_0x33852b[_0xd19e('0x32')][_0xd19e('0x36')](_0xd19e('0x37'))){_0x22a369[_0xd19e('0x1b')]=qs['limit'](_0x33852b[_0xd19e('0x32')][_0xd19e('0x1b')]);_0x22a369[_0xd19e('0x1a')]=qs[_0xd19e('0x1a')](_0x33852b[_0xd19e('0x32')][_0xd19e('0x1a')]);}return _0x28c448[_0xd19e('0x4c')](_0x22a369);}})[_0xd19e('0x23')](function(_0x26f46e){if(_0x26f46e){return _0x26f46e?{'count':_0x1fe285,'rows':_0x26f46e}:null;}})[_0xd19e('0x23')](respondWithResult(_0xdd7046,null))[_0xd19e('0x43')](handleError(_0xdd7046,null));};exports[_0xd19e('0x4d')]=function(_0x535c64,_0x1c4ec2,_0x521228){var _0x5b2962={};var _0x2dc8c7={};var _0x4700b3;var _0x4c742a;return db[_0xd19e('0x2a')]['findOne']({'where':{'id':_0x535c64[_0xd19e('0x44')]['id']}})['then'](handleEntityNotFound(_0x1c4ec2,null))[_0xd19e('0x23')](function(_0x576f9e){if(_0x576f9e){_0x4700b3=_0x576f9e;_0x2dc8c7[_0xd19e('0x2f')]=_['keys'](db[_0xd19e('0x4b')][_0xd19e('0x2b')]);_0x2dc8c7[_0xd19e('0x32')]=_['keys'](_0x535c64[_0xd19e('0x32')]);_0x2dc8c7[_0xd19e('0x30')]=_[_0xd19e('0x31')](_0x2dc8c7[_0xd19e('0x2f')],_0x2dc8c7[_0xd19e('0x32')]);_0x5b2962[_0xd19e('0x33')]=_[_0xd19e('0x31')](_0x2dc8c7[_0xd19e('0x2f')],qs['fields'](_0x535c64[_0xd19e('0x32')]['fields']));_0x5b2962['attributes']=_0x5b2962['attributes'][_0xd19e('0x35')]?_0x5b2962[_0xd19e('0x33')]:_0x2dc8c7[_0xd19e('0x2f')];_0x5b2962[_0xd19e('0x38')]=qs[_0xd19e('0x39')](_0x535c64[_0xd19e('0x32')][_0xd19e('0x39')]);_0x5b2962[_0xd19e('0x3a')]=qs[_0xd19e('0x30')](_['pick'](_0x535c64[_0xd19e('0x32')],_0x2dc8c7[_0xd19e('0x30')]));if(_0x535c64[_0xd19e('0x32')]['filter']){_0x5b2962[_0xd19e('0x3a')]=_[_0xd19e('0x3d')](_0x5b2962[_0xd19e('0x3a')],{'$or':_[_0xd19e('0x29')](_0x5b2962[_0xd19e('0x33')],function(_0x37321b){var _0x1bbd9d={};_0x1bbd9d[_0x37321b]={'$like':'%'+_0x535c64['query'][_0xd19e('0x3c')]+'%'};return _0x1bbd9d;})});}_0x5b2962=_['merge']({},_0x5b2962,_0x535c64['options']);return _0x4700b3['getDescriptions'](_0x5b2962);}})['then'](function(_0x9757fb){if(_0x9757fb){_0x4c742a=_0x9757fb[_0xd19e('0x35')];if(!_0x535c64['query'][_0xd19e('0x36')](_0xd19e('0x37'))){_0x5b2962[_0xd19e('0x1b')]=qs['limit'](_0x535c64[_0xd19e('0x32')][_0xd19e('0x1b')]);_0x5b2962[_0xd19e('0x1a')]=qs['offset'](_0x535c64['query'][_0xd19e('0x1a')]);}return _0x4700b3[_0xd19e('0x4d')](_0x5b2962);}})[_0xd19e('0x23')](function(_0x17c740){if(_0x17c740){return _0x17c740?{'count':_0x4c742a,'rows':_0x17c740}:null;}})['then'](respondWithResult(_0x1c4ec2,null))[_0xd19e('0x43')](handleError(_0x1c4ec2,null));};
\ No newline at end of file
index 79afb66..1dbff07 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6d18=['./intZohoConfiguration.attributes','ZohoConfiguration','int_zoho_configurations','../../config/logger','api','moment','request-promise','path','rimraf'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x6d18,0xf6));var _0x86d1=function(_0x45aa87,_0x5eca09){_0x45aa87=_0x45aa87-0x0;var _0x24cc34=_0x6d18[_0x45aa87];return _0x24cc34;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x86d1('0x0'))(_0x86d1('0x1'));var moment=require(_0x86d1('0x2'));var BPromise=require('bluebird');var rp=require(_0x86d1('0x3'));var fs=require('fs');var path=require(_0x86d1('0x4'));var rimraf=require(_0x86d1('0x5'));var config=require('../../config/environment');var attributes=require(_0x86d1('0x6'));module['exports']=function(_0x180693,_0x4f653b){return _0x180693['define'](_0x86d1('0x7'),attributes,{'tableName':_0x86d1('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x6e96=['rimraf','../../config/environment','./intZohoConfiguration.attributes','ZohoConfiguration','int_zoho_configurations','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0xac9b71,_0x4c8fa2){var _0x276103=function(_0x97a41a){while(--_0x97a41a){_0xac9b71['push'](_0xac9b71['shift']());}};_0x276103(++_0x4c8fa2);}(_0x6e96,0xd6));var _0x66e9=function(_0x477d1b,_0x2a673b){_0x477d1b=_0x477d1b-0x0;var _0x56349f=_0x6e96[_0x477d1b];return _0x56349f;};'use strict';var _=require('lodash');var util=require(_0x66e9('0x0'));var logger=require(_0x66e9('0x1'))(_0x66e9('0x2'));var moment=require(_0x66e9('0x3'));var BPromise=require(_0x66e9('0x4'));var rp=require(_0x66e9('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x66e9('0x6'));var config=require(_0x66e9('0x7'));var attributes=require(_0x66e9('0x8'));module['exports']=function(_0x5dc9c3,_0x1e3673){return _0x5dc9c3['define'](_0x66e9('0x9'),attributes,{'tableName':_0x66e9('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 5a25086..eebb9e7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8333=['bluebird','ioredis','../../config/utils','../../config/logger','../../config/environment','client','http','request','then','info','request\x20sent','ZohoConfiguration,\x20%s,\x20%s,\x20%s','stringify','error','code','ZohoConfiguration,\x20%s,\x20%s','message','catch','lodash','util'];(function(_0x49088a,_0xa2b35c){var _0x3a522d=function(_0x19cf27){while(--_0x19cf27){_0x49088a['push'](_0x49088a['shift']());}};_0x3a522d(++_0xa2b35c);}(_0x8333,0xc6));var _0x3833=function(_0x542333,_0x27051e){_0x542333=_0x542333-0x0;var _0x5d34b2=_0x8333[_0x542333];return _0x5d34b2;};'use strict';var _=require(_0x3833('0x0'));var util=require(_0x3833('0x1'));var moment=require('moment');var BPromise=require(_0x3833('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3833('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x3833('0x4'));var logger=require(_0x3833('0x5'))('rpc');var config=require(_0x3833('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x3833('0x7')][_0x3833('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2ab351,_0x13ce7a,_0xa98d70){return new BPromise(function(_0x2232d6,_0x30c0ea){return client[_0x3833('0x9')](_0x2ab351,_0xa98d70)[_0x3833('0xa')](function(_0x191d7b){logger[_0x3833('0xb')]('ZohoConfiguration,\x20%s,\x20%s',_0x13ce7a,_0x3833('0xc'));logger['debug'](_0x3833('0xd'),_0x13ce7a,_0x3833('0xc'),JSON[_0x3833('0xe')](_0x191d7b));if(_0x191d7b[_0x3833('0xf')]){if(_0x191d7b[_0x3833('0xf')][_0x3833('0x10')]===0x1f4){logger[_0x3833('0xf')](_0x3833('0x11'),_0x13ce7a,_0x191d7b[_0x3833('0xf')][_0x3833('0x12')]);return _0x30c0ea(_0x191d7b[_0x3833('0xf')][_0x3833('0x12')]);}logger['error']('ZohoConfiguration,\x20%s,\x20%s',_0x13ce7a,_0x191d7b[_0x3833('0xf')][_0x3833('0x12')]);return _0x2232d6(_0x191d7b[_0x3833('0xf')][_0x3833('0x12')]);}else{logger[_0x3833('0xb')](_0x3833('0x11'),_0x13ce7a,_0x3833('0xc'));_0x2232d6(_0x191d7b['result'][_0x3833('0x12')]);}})[_0x3833('0x13')](function(_0x1e3cce){logger['error'](_0x3833('0x11'),_0x13ce7a,_0x1e3cce);_0x30c0ea(_0x1e3cce);});});}
\ No newline at end of file
+var _0x4574=['then','info','request\x20sent','debug','stringify','error','ZohoConfiguration,\x20%s,\x20%s','message','result','catch','util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','jayson/promise','http','request'];(function(_0x1ee0a1,_0x51058e){var _0x1d2d5b=function(_0x35cfb5){while(--_0x35cfb5){_0x1ee0a1['push'](_0x1ee0a1['shift']());}};_0x1d2d5b(++_0x51058e);}(_0x4574,0x82));var _0x4457=function(_0x1ef458,_0x1f4eaa){_0x1ef458=_0x1ef458-0x0;var _0x6a1ec4=_0x4574[_0x1ef458];return _0x6a1ec4;};'use strict';var _=require('lodash');var util=require(_0x4457('0x0'));var moment=require(_0x4457('0x1'));var BPromise=require(_0x4457('0x2'));var rs=require(_0x4457('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x4457('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x4457('0x5'))(_0x4457('0x6'));var config=require('../../config/environment');var jayson=require(_0x4457('0x7'));var client=jayson['client'][_0x4457('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x233845,_0x13da08,_0x5da438){return new BPromise(function(_0x30a74c,_0x521f7c){return client[_0x4457('0x9')](_0x233845,_0x5da438)[_0x4457('0xa')](function(_0x12ce6c){logger[_0x4457('0xb')]('ZohoConfiguration,\x20%s,\x20%s',_0x13da08,_0x4457('0xc'));logger[_0x4457('0xd')]('ZohoConfiguration,\x20%s,\x20%s,\x20%s',_0x13da08,'request\x20sent',JSON[_0x4457('0xe')](_0x12ce6c));if(_0x12ce6c['error']){if(_0x12ce6c[_0x4457('0xf')]['code']===0x1f4){logger[_0x4457('0xf')](_0x4457('0x10'),_0x13da08,_0x12ce6c[_0x4457('0xf')]['message']);return _0x521f7c(_0x12ce6c[_0x4457('0xf')][_0x4457('0x11')]);}logger[_0x4457('0xf')](_0x4457('0x10'),_0x13da08,_0x12ce6c[_0x4457('0xf')][_0x4457('0x11')]);return _0x30a74c(_0x12ce6c[_0x4457('0xf')][_0x4457('0x11')]);}else{logger[_0x4457('0xb')](_0x4457('0x10'),_0x13da08,_0x4457('0xc'));_0x30a74c(_0x12ce6c[_0x4457('0x12')][_0x4457('0x11')]);}})[_0x4457('0x13')](function(_0x152057){logger[_0x4457('0xf')](_0x4457('0x10'),_0x13da08,_0x152057);_0x521f7c(_0x152057);});});}
\ No newline at end of file
index 08bd5df..bc382c2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6211=['isAuthenticated','post','put','update','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./intZohoField.controller','/:id'];(function(_0x3322e4,_0x473b9d){var _0x292653=function(_0x2e12c6){while(--_0x2e12c6){_0x3322e4['push'](_0x3322e4['shift']());}};_0x292653(++_0x473b9d);}(_0x6211,0xc2));var _0x1621=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0x6211[_0x19e35c];return _0x3e1fe8;};'use strict';var multer=require('multer');var util=require(_0x1621('0x0'));var path=require(_0x1621('0x1'));var timeout=require(_0x1621('0x2'));var express=require(_0x1621('0x3'));var router=express[_0x1621('0x4')]();var fs_extra=require(_0x1621('0x5'));var auth=require(_0x1621('0x6'));var interaction=require(_0x1621('0x7'));var config=require('../../config/environment');var controller=require(_0x1621('0x8'));router['get']('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x1621('0x9'),auth[_0x1621('0xa')](),controller['show']);router[_0x1621('0xb')]('/',auth['isAuthenticated'](),controller['create']);router[_0x1621('0xc')](_0x1621('0x9'),auth[_0x1621('0xa')](),controller[_0x1621('0xd')]);router[_0x1621('0xe')]('/:id',auth['isAuthenticated'](),controller[_0x1621('0xf')]);module[_0x1621('0x10')]=router;
\ No newline at end of file
+var _0xd0e3=['connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','isAuthenticated','index','get','show','create','put','/:id','update','delete','multer','util','path'];(function(_0x4ffa03,_0x363a82){var _0x30d661=function(_0x36ba86){while(--_0x36ba86){_0x4ffa03['push'](_0x4ffa03['shift']());}};_0x30d661(++_0x363a82);}(_0xd0e3,0x19b));var _0x3d0e=function(_0x172cf3,_0x310b51){_0x172cf3=_0x172cf3-0x0;var _0x62ec22=_0xd0e3[_0x172cf3];return _0x62ec22;};'use strict';var multer=require(_0x3d0e('0x0'));var util=require(_0x3d0e('0x1'));var path=require(_0x3d0e('0x2'));var timeout=require(_0x3d0e('0x3'));var express=require(_0x3d0e('0x4'));var router=express[_0x3d0e('0x5')]();var fs_extra=require(_0x3d0e('0x6'));var auth=require(_0x3d0e('0x7'));var interaction=require(_0x3d0e('0x8'));var config=require('../../config/environment');var controller=require('./intZohoField.controller');router['get']('/',auth[_0x3d0e('0x9')](),controller[_0x3d0e('0xa')]);router[_0x3d0e('0xb')]('/:id',auth[_0x3d0e('0x9')](),controller[_0x3d0e('0xc')]);router['post']('/',auth[_0x3d0e('0x9')](),controller[_0x3d0e('0xd')]);router[_0x3d0e('0xe')](_0x3d0e('0xf'),auth[_0x3d0e('0x9')](),controller[_0x3d0e('0x10')]);router[_0x3d0e('0x11')](_0x3d0e('0xf'),auth[_0x3d0e('0x9')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
index 6eeb6a8..85af9e6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdc0a=['sequelize','ENUM','string','variable','customVariable','keyValue','STRING','BOOLEAN'];(function(_0x344d05,_0x5e73b1){var _0x22ece5=function(_0x6a9bc){while(--_0x6a9bc){_0x344d05['push'](_0x344d05['shift']());}};_0x22ece5(++_0x5e73b1);}(_0xdc0a,0x70));var _0xadc0=function(_0x5498d6,_0x210612){_0x5498d6=_0x5498d6-0x0;var _0x275f87=_0xdc0a[_0x5498d6];return _0x275f87;};'use strict';var Sequelize=require(_0xadc0('0x0'));module['exports']={'type':{'type':Sequelize[_0xadc0('0x1')](_0xadc0('0x2'),_0xadc0('0x3'),_0xadc0('0x4'),_0xadc0('0x5'),'picklist'),'defaultValue':_0xadc0('0x2')},'content':{'type':Sequelize['STRING']},'key':{'type':Sequelize['STRING']},'keyType':{'type':Sequelize[_0xadc0('0x1')]('string',_0xadc0('0x3'),'customVariable')},'keyContent':{'type':Sequelize[_0xadc0('0x6')]},'idField':{'type':Sequelize[_0xadc0('0x6')]},'nameField':{'type':Sequelize[_0xadc0('0x6')]},'customField':{'type':Sequelize[_0xadc0('0x7')],'defaultValue':!![]},'variableName':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x571d=['variable','customVariable','keyValue','picklist','STRING','ENUM','BOOLEAN','sequelize','exports','string'];(function(_0x3d91fd,_0x3a768b){var _0x137a3a=function(_0x19f617){while(--_0x19f617){_0x3d91fd['push'](_0x3d91fd['shift']());}};_0x137a3a(++_0x3a768b);}(_0x571d,0x6b));var _0xd571=function(_0x571521,_0x50cb39){_0x571521=_0x571521-0x0;var _0x55f6dd=_0x571d[_0x571521];return _0x55f6dd;};'use strict';var Sequelize=require(_0xd571('0x0'));module[_0xd571('0x1')]={'type':{'type':Sequelize['ENUM'](_0xd571('0x2'),_0xd571('0x3'),_0xd571('0x4'),_0xd571('0x5'),_0xd571('0x6')),'defaultValue':'string'},'content':{'type':Sequelize[_0xd571('0x7')]},'key':{'type':Sequelize[_0xd571('0x7')]},'keyType':{'type':Sequelize[_0xd571('0x8')](_0xd571('0x2'),_0xd571('0x3'),'customVariable')},'keyContent':{'type':Sequelize[_0xd571('0x7')]},'idField':{'type':Sequelize['STRING']},'nameField':{'type':Sequelize[_0xd571('0x7')]},'customField':{'type':Sequelize[_0xd571('0x9')],'defaultValue':!![]},'variableName':{'type':Sequelize[_0xd571('0x7')]}};
\ No newline at end of file
index 03e9def..081229b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x357d=['offset','limit','undefined','count','status','Content-Range','json','apply','reject','save','update','then','destroy','error','index','ZohoField','rawAttributes','fieldName','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','sort','filter','where','type','VIRTUAL','name','merge','options','includeAll','include','findAll','catch','show','length','find','body','params','eml-format','rimraf','request-promise','mustache','util','path','sox','to-csv','fs-extra','crypto','jsforce','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end'];(function(_0x1bd51d,_0x46f25e){var _0x116b83=function(_0x2d447c){while(--_0x2d447c){_0x1bd51d['push'](_0x1bd51d['shift']());}};_0x116b83(++_0x46f25e);}(_0x357d,0x17a));var _0xd357=function(_0x447fa9,_0x3c995c){_0x447fa9=_0x447fa9-0x0;var _0x2c7bb6=_0x357d[_0x447fa9];return _0x2c7bb6;};'use strict';var emlformat=require(_0xd357('0x0'));var rimraf=require(_0xd357('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xd357('0x2'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xd357('0x3'));var util=require(_0xd357('0x4'));var path=require(_0xd357('0x5'));var sox=require(_0xd357('0x6'));var csv=require(_0xd357('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xd357('0x8'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xd357('0x9'));var jsforce=require(_0xd357('0xa'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xd357('0xb'));var Redis=require(_0xd357('0xc'));var authService=require('../../components/auth/service');var qs=require(_0xd357('0xd'));var as=require(_0xd357('0xe'));var hardwareService=require(_0xd357('0xf'));var logger=require(_0xd357('0x10'))(_0xd357('0x11'));var utils=require(_0xd357('0x12'));var config=require(_0xd357('0x13'));var licenseUtil=require(_0xd357('0x14'));var db=require(_0xd357('0x15'))['db'];function respondWithStatusCode(_0x2a28f6,_0xe74393){_0xe74393=_0xe74393||0xcc;return function(_0x2beef8){if(_0x2beef8){return _0x2a28f6[_0xd357('0x16')](_0xe74393);}return _0x2a28f6['status'](_0xe74393)[_0xd357('0x17')]();};}function respondWithResult(_0x12f3b4,_0x1c9abe){_0x1c9abe=_0x1c9abe||0xc8;return function(_0x2a4d50){if(_0x2a4d50){return _0x12f3b4['status'](_0x1c9abe)['json'](_0x2a4d50);}};}function respondWithFilteredResult(_0x3e2393,_0x3308c1){return function(_0x28dbc2){if(_0x28dbc2){var _0x511753=typeof _0x3308c1[_0xd357('0x18')]==='undefined'&&typeof _0x3308c1[_0xd357('0x19')]===_0xd357('0x1a');var _0x236b3a=_0x28dbc2[_0xd357('0x1b')];var _0x31f6b2=_0x511753?0x0:_0x3308c1[_0xd357('0x18')];var _0x14dc23=_0x511753?_0x28dbc2['count']:_0x3308c1['offset']+_0x3308c1[_0xd357('0x19')];var _0x5d8b30;if(_0x14dc23>=_0x236b3a){_0x14dc23=_0x236b3a;_0x5d8b30=0xc8;}else{_0x5d8b30=0xce;}_0x3e2393[_0xd357('0x1c')](_0x5d8b30);return _0x3e2393['set'](_0xd357('0x1d'),_0x31f6b2+'-'+_0x14dc23+'/'+_0x236b3a)[_0xd357('0x1e')](_0x28dbc2);}return null;};}function patchUpdates(_0x55e797){return function(_0x4cecb0){try{jsonpatch[_0xd357('0x1f')](_0x4cecb0,_0x55e797,!![]);}catch(_0x48d61d){return BPromise[_0xd357('0x20')](_0x48d61d);}return _0x4cecb0[_0xd357('0x21')]();};}function saveUpdates(_0x23039d,_0x44a855){return function(_0x22b17c){if(_0x22b17c){return _0x22b17c[_0xd357('0x22')](_0x23039d)[_0xd357('0x23')](function(_0xbe1db5){return _0xbe1db5;});}return null;};}function removeEntity(_0x533086,_0x51311e){return function(_0x48cdb3){if(_0x48cdb3){return _0x48cdb3[_0xd357('0x24')]()[_0xd357('0x23')](function(){_0x533086['status'](0xcc)[_0xd357('0x17')]();});}};}function handleEntityNotFound(_0x15fa6f,_0xa1fb27){return function(_0x5bf3fe){if(!_0x5bf3fe){_0x15fa6f[_0xd357('0x16')](0x194);}return _0x5bf3fe;};}function handleError(_0x150d02,_0x179144){_0x179144=_0x179144||0x1f4;return function(_0x3f5239){logger[_0xd357('0x25')](_0x3f5239['stack']);if(_0x3f5239['name']){delete _0x3f5239['name'];}_0x150d02[_0xd357('0x1c')](_0x179144)['send'](_0x3f5239);};}exports[_0xd357('0x26')]=function(_0x1610a9,_0x4790d6){var _0x5c9f07={},_0x22507c={},_0x15c608={'count':0x0,'rows':[]};var _0x4cf919=_['map'](db[_0xd357('0x27')][_0xd357('0x28')],function(_0x37de43){return{'name':_0x37de43[_0xd357('0x29')],'type':_0x37de43['type']['key']};});_0x22507c[_0xd357('0x2a')]=_['map'](_0x4cf919,'name');_0x22507c[_0xd357('0x2b')]=_[_0xd357('0x2c')](_0x1610a9[_0xd357('0x2b')]);_0x22507c[_0xd357('0x2d')]=_[_0xd357('0x2e')](_0x22507c['model'],_0x22507c['query']);_0x5c9f07[_0xd357('0x2f')]=_[_0xd357('0x2e')](_0x22507c['model'],qs[_0xd357('0x30')](_0x1610a9[_0xd357('0x2b')][_0xd357('0x30')]));_0x5c9f07['attributes']=_0x5c9f07[_0xd357('0x2f')]['length']?_0x5c9f07[_0xd357('0x2f')]:_0x22507c[_0xd357('0x2a')];if(!_0x1610a9[_0xd357('0x2b')][_0xd357('0x31')]('nolimit')){_0x5c9f07[_0xd357('0x19')]=qs[_0xd357('0x19')](_0x1610a9['query'][_0xd357('0x19')]);_0x5c9f07['offset']=qs['offset'](_0x1610a9[_0xd357('0x2b')][_0xd357('0x18')]);}_0x5c9f07['order']=qs[_0xd357('0x32')](_0x1610a9[_0xd357('0x2b')][_0xd357('0x32')]);_0x5c9f07['where']=qs[_0xd357('0x2d')](_['pick'](_0x1610a9[_0xd357('0x2b')],_0x22507c[_0xd357('0x2d')]),_0x4cf919);if(_0x1610a9[_0xd357('0x2b')][_0xd357('0x33')]){_0x5c9f07[_0xd357('0x34')]=_['merge'](_0x5c9f07[_0xd357('0x34')],{'$or':_['map'](_0x4cf919,function(_0x5ab9f2){if(_0x5ab9f2[_0xd357('0x35')]!==_0xd357('0x36')){var _0x58a07a={};_0x58a07a[_0x5ab9f2[_0xd357('0x37')]]={'$like':'%'+_0x1610a9[_0xd357('0x2b')][_0xd357('0x33')]+'%'};return _0x58a07a;}})});}_0x5c9f07=_[_0xd357('0x38')]({},_0x5c9f07,_0x1610a9[_0xd357('0x39')]);var _0x17ec5e={'where':_0x5c9f07['where']};return db[_0xd357('0x27')]['count'](_0x17ec5e)[_0xd357('0x23')](function(_0x5b7b7d){_0x15c608[_0xd357('0x1b')]=_0x5b7b7d;if(_0x1610a9[_0xd357('0x2b')][_0xd357('0x3a')]){_0x5c9f07[_0xd357('0x3b')]=[{'all':!![]}];}return db[_0xd357('0x27')][_0xd357('0x3c')](_0x5c9f07);})['then'](function(_0x3990fc){_0x15c608['rows']=_0x3990fc;return _0x15c608;})['then'](respondWithFilteredResult(_0x4790d6,_0x5c9f07))[_0xd357('0x3d')](handleError(_0x4790d6,null));};exports[_0xd357('0x3e')]=function(_0x1e1ff3,_0x49b997){var _0x477f8d={'raw':!![],'where':{'id':_0x1e1ff3['params']['id']}},_0x182373={};_0x182373[_0xd357('0x2a')]=_[_0xd357('0x2c')](db[_0xd357('0x27')][_0xd357('0x28')]);_0x182373[_0xd357('0x2b')]=_[_0xd357('0x2c')](_0x1e1ff3[_0xd357('0x2b')]);_0x182373['filters']=_[_0xd357('0x2e')](_0x182373[_0xd357('0x2a')],_0x182373['query']);_0x477f8d[_0xd357('0x2f')]=_['intersection'](_0x182373[_0xd357('0x2a')],qs[_0xd357('0x30')](_0x1e1ff3['query'][_0xd357('0x30')]));_0x477f8d['attributes']=_0x477f8d['attributes'][_0xd357('0x3f')]?_0x477f8d['attributes']:_0x182373[_0xd357('0x2a')];if(_0x1e1ff3['query'][_0xd357('0x3a')]){_0x477f8d[_0xd357('0x3b')]=[{'all':!![]}];}_0x477f8d=_[_0xd357('0x38')]({},_0x477f8d,_0x1e1ff3['options']);return db[_0xd357('0x27')][_0xd357('0x40')](_0x477f8d)['then'](handleEntityNotFound(_0x49b997,null))[_0xd357('0x23')](respondWithResult(_0x49b997,null))[_0xd357('0x3d')](handleError(_0x49b997,null));};exports['create']=function(_0x6fcb41,_0x2f4bf9){return db[_0xd357('0x27')]['create'](_0x6fcb41[_0xd357('0x41')],{})[_0xd357('0x23')](respondWithResult(_0x2f4bf9,0xc9))['catch'](handleError(_0x2f4bf9,null));};exports[_0xd357('0x22')]=function(_0x51514a,_0x46ad75){if(_0x51514a['body']['id']){delete _0x51514a['body']['id'];}return db[_0xd357('0x27')][_0xd357('0x40')]({'where':{'id':_0x51514a[_0xd357('0x42')]['id']}})[_0xd357('0x23')](handleEntityNotFound(_0x46ad75,null))[_0xd357('0x23')](saveUpdates(_0x51514a['body'],null))['then'](respondWithResult(_0x46ad75,null))['catch'](handleError(_0x46ad75,null));};exports[_0xd357('0x24')]=function(_0x27b532,_0x47a8f0){return db[_0xd357('0x27')]['find']({'where':{'id':_0x27b532[_0xd357('0x42')]['id']}})['then'](handleEntityNotFound(_0x47a8f0,null))[_0xd357('0x23')](removeEntity(_0x47a8f0,null))[_0xd357('0x3d')](handleError(_0x47a8f0,null));};
\ No newline at end of file
+var _0x6eeb=['model','map','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','pick','merge','VIRTUAL','filter','options','includeAll','include','findAll','rows','catch','show','params','keys','rawAttributes','find','create','body','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','end','sendStatus','error','stack','name','send','ZohoField','fieldName','type','key'];(function(_0x201740,_0x3de1f0){var _0x5b62a1=function(_0x532b0f){while(--_0x532b0f){_0x201740['push'](_0x201740['shift']());}};_0x5b62a1(++_0x3de1f0);}(_0x6eeb,0x1f1));var _0xb6ee=function(_0x42f41b,_0x67e11f){_0x42f41b=_0x42f41b-0x0;var _0x4a4e89=_0x6eeb[_0x42f41b];return _0x4a4e89;};'use strict';var emlformat=require(_0xb6ee('0x0'));var rimraf=require(_0xb6ee('0x1'));var zipdir=require(_0xb6ee('0x2'));var jsonpatch=require(_0xb6ee('0x3'));var rp=require(_0xb6ee('0x4'));var moment=require('moment');var BPromise=require(_0xb6ee('0x5'));var Mustache=require('mustache');var util=require(_0xb6ee('0x6'));var path=require('path');var sox=require(_0xb6ee('0x7'));var csv=require(_0xb6ee('0x8'));var ejs=require(_0xb6ee('0x9'));var fs=require('fs');var fs_extra=require(_0xb6ee('0xa'));var _=require(_0xb6ee('0xb'));var squel=require(_0xb6ee('0xc'));var crypto=require(_0xb6ee('0xd'));var jsforce=require(_0xb6ee('0xe'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xb6ee('0xf'));var Redis=require(_0xb6ee('0x10'));var authService=require(_0xb6ee('0x11'));var qs=require(_0xb6ee('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0xb6ee('0x13'))(_0xb6ee('0x14'));var utils=require(_0xb6ee('0x15'));var config=require(_0xb6ee('0x16'));var licenseUtil=require(_0xb6ee('0x17'));var db=require(_0xb6ee('0x18'))['db'];function respondWithStatusCode(_0x7b0575,_0x5ecfe1){_0x5ecfe1=_0x5ecfe1||0xcc;return function(_0x50d325){if(_0x50d325){return _0x7b0575['sendStatus'](_0x5ecfe1);}return _0x7b0575[_0xb6ee('0x19')](_0x5ecfe1)['end']();};}function respondWithResult(_0x19e2e2,_0x5a96a8){_0x5a96a8=_0x5a96a8||0xc8;return function(_0x20a365){if(_0x20a365){return _0x19e2e2[_0xb6ee('0x19')](_0x5a96a8)[_0xb6ee('0x1a')](_0x20a365);}};}function respondWithFilteredResult(_0xcc73fb,_0x33d220){return function(_0x5e22ba){if(_0x5e22ba){var _0x23a85c=typeof _0x33d220[_0xb6ee('0x1b')]===_0xb6ee('0x1c')&&typeof _0x33d220[_0xb6ee('0x1d')]===_0xb6ee('0x1c');var _0x5a0989=_0x5e22ba[_0xb6ee('0x1e')];var _0x73bad7=_0x23a85c?0x0:_0x33d220[_0xb6ee('0x1b')];var _0x3555f6=_0x23a85c?_0x5e22ba[_0xb6ee('0x1e')]:_0x33d220[_0xb6ee('0x1b')]+_0x33d220['limit'];var _0x4aaf84;if(_0x3555f6>=_0x5a0989){_0x3555f6=_0x5a0989;_0x4aaf84=0xc8;}else{_0x4aaf84=0xce;}_0xcc73fb[_0xb6ee('0x19')](_0x4aaf84);return _0xcc73fb[_0xb6ee('0x1f')](_0xb6ee('0x20'),_0x73bad7+'-'+_0x3555f6+'/'+_0x5a0989)[_0xb6ee('0x1a')](_0x5e22ba);}return null;};}function patchUpdates(_0x59f2a1){return function(_0x236ae6){try{jsonpatch[_0xb6ee('0x21')](_0x236ae6,_0x59f2a1,!![]);}catch(_0x68f521){return BPromise[_0xb6ee('0x22')](_0x68f521);}return _0x236ae6[_0xb6ee('0x23')]();};}function saveUpdates(_0x120cb1,_0x20d70f){return function(_0x429c2){if(_0x429c2){return _0x429c2[_0xb6ee('0x24')](_0x120cb1)[_0xb6ee('0x25')](function(_0x18a659){return _0x18a659;});}return null;};}function removeEntity(_0x4bc01a,_0x3b3f45){return function(_0x313969){if(_0x313969){return _0x313969[_0xb6ee('0x26')]()['then'](function(){_0x4bc01a[_0xb6ee('0x19')](0xcc)[_0xb6ee('0x27')]();});}};}function handleEntityNotFound(_0x1ceadf,_0x56e4bf){return function(_0xa8c336){if(!_0xa8c336){_0x1ceadf[_0xb6ee('0x28')](0x194);}return _0xa8c336;};}function handleError(_0x5d3d90,_0xb4c3e0){_0xb4c3e0=_0xb4c3e0||0x1f4;return function(_0x197eeb){logger[_0xb6ee('0x29')](_0x197eeb[_0xb6ee('0x2a')]);if(_0x197eeb[_0xb6ee('0x2b')]){delete _0x197eeb[_0xb6ee('0x2b')];}_0x5d3d90[_0xb6ee('0x19')](_0xb4c3e0)[_0xb6ee('0x2c')](_0x197eeb);};}exports['index']=function(_0x37fe7b,_0x3472af){var _0x3fb31a={},_0x56dc96={},_0x3bbb4b={'count':0x0,'rows':[]};var _0x39966b=_['map'](db[_0xb6ee('0x2d')]['rawAttributes'],function(_0x93137){return{'name':_0x93137[_0xb6ee('0x2e')],'type':_0x93137[_0xb6ee('0x2f')][_0xb6ee('0x30')]};});_0x56dc96[_0xb6ee('0x31')]=_[_0xb6ee('0x32')](_0x39966b,_0xb6ee('0x2b'));_0x56dc96[_0xb6ee('0x33')]=_['keys'](_0x37fe7b[_0xb6ee('0x33')]);_0x56dc96[_0xb6ee('0x34')]=_[_0xb6ee('0x35')](_0x56dc96[_0xb6ee('0x31')],_0x56dc96['query']);_0x3fb31a['attributes']=_['intersection'](_0x56dc96[_0xb6ee('0x31')],qs[_0xb6ee('0x36')](_0x37fe7b[_0xb6ee('0x33')]['fields']));_0x3fb31a['attributes']=_0x3fb31a[_0xb6ee('0x37')][_0xb6ee('0x38')]?_0x3fb31a[_0xb6ee('0x37')]:_0x56dc96['model'];if(!_0x37fe7b[_0xb6ee('0x33')][_0xb6ee('0x39')](_0xb6ee('0x3a'))){_0x3fb31a['limit']=qs[_0xb6ee('0x1d')](_0x37fe7b['query'][_0xb6ee('0x1d')]);_0x3fb31a[_0xb6ee('0x1b')]=qs[_0xb6ee('0x1b')](_0x37fe7b[_0xb6ee('0x33')][_0xb6ee('0x1b')]);}_0x3fb31a['order']=qs[_0xb6ee('0x3b')](_0x37fe7b[_0xb6ee('0x33')][_0xb6ee('0x3b')]);_0x3fb31a[_0xb6ee('0x3c')]=qs[_0xb6ee('0x34')](_[_0xb6ee('0x3d')](_0x37fe7b[_0xb6ee('0x33')],_0x56dc96[_0xb6ee('0x34')]),_0x39966b);if(_0x37fe7b[_0xb6ee('0x33')]['filter']){_0x3fb31a[_0xb6ee('0x3c')]=_[_0xb6ee('0x3e')](_0x3fb31a['where'],{'$or':_[_0xb6ee('0x32')](_0x39966b,function(_0x367a1e){if(_0x367a1e[_0xb6ee('0x2f')]!==_0xb6ee('0x3f')){var _0xb1f2fe={};_0xb1f2fe[_0x367a1e['name']]={'$like':'%'+_0x37fe7b[_0xb6ee('0x33')][_0xb6ee('0x40')]+'%'};return _0xb1f2fe;}})});}_0x3fb31a=_[_0xb6ee('0x3e')]({},_0x3fb31a,_0x37fe7b[_0xb6ee('0x41')]);var _0x923eeb={'where':_0x3fb31a['where']};return db['ZohoField']['count'](_0x923eeb)['then'](function(_0x3dbdfa){_0x3bbb4b[_0xb6ee('0x1e')]=_0x3dbdfa;if(_0x37fe7b['query'][_0xb6ee('0x42')]){_0x3fb31a[_0xb6ee('0x43')]=[{'all':!![]}];}return db['ZohoField'][_0xb6ee('0x44')](_0x3fb31a);})[_0xb6ee('0x25')](function(_0x1ccc18){_0x3bbb4b[_0xb6ee('0x45')]=_0x1ccc18;return _0x3bbb4b;})['then'](respondWithFilteredResult(_0x3472af,_0x3fb31a))[_0xb6ee('0x46')](handleError(_0x3472af,null));};exports[_0xb6ee('0x47')]=function(_0x391273,_0x491a0b){var _0x4f86ad={'raw':!![],'where':{'id':_0x391273[_0xb6ee('0x48')]['id']}},_0x4821a4={};_0x4821a4[_0xb6ee('0x31')]=_[_0xb6ee('0x49')](db['ZohoField'][_0xb6ee('0x4a')]);_0x4821a4[_0xb6ee('0x33')]=_['keys'](_0x391273[_0xb6ee('0x33')]);_0x4821a4[_0xb6ee('0x34')]=_[_0xb6ee('0x35')](_0x4821a4['model'],_0x4821a4['query']);_0x4f86ad[_0xb6ee('0x37')]=_[_0xb6ee('0x35')](_0x4821a4[_0xb6ee('0x31')],qs[_0xb6ee('0x36')](_0x391273['query'][_0xb6ee('0x36')]));_0x4f86ad['attributes']=_0x4f86ad['attributes'][_0xb6ee('0x38')]?_0x4f86ad[_0xb6ee('0x37')]:_0x4821a4[_0xb6ee('0x31')];if(_0x391273[_0xb6ee('0x33')][_0xb6ee('0x42')]){_0x4f86ad[_0xb6ee('0x43')]=[{'all':!![]}];}_0x4f86ad=_['merge']({},_0x4f86ad,_0x391273[_0xb6ee('0x41')]);return db[_0xb6ee('0x2d')][_0xb6ee('0x4b')](_0x4f86ad)[_0xb6ee('0x25')](handleEntityNotFound(_0x491a0b,null))[_0xb6ee('0x25')](respondWithResult(_0x491a0b,null))[_0xb6ee('0x46')](handleError(_0x491a0b,null));};exports[_0xb6ee('0x4c')]=function(_0x67652e,_0x1ee4cb){return db['ZohoField'][_0xb6ee('0x4c')](_0x67652e[_0xb6ee('0x4d')],{})[_0xb6ee('0x25')](respondWithResult(_0x1ee4cb,0xc9))[_0xb6ee('0x46')](handleError(_0x1ee4cb,null));};exports[_0xb6ee('0x24')]=function(_0x35216e,_0x219e12){if(_0x35216e[_0xb6ee('0x4d')]['id']){delete _0x35216e['body']['id'];}return db[_0xb6ee('0x2d')][_0xb6ee('0x4b')]({'where':{'id':_0x35216e[_0xb6ee('0x48')]['id']}})[_0xb6ee('0x25')](handleEntityNotFound(_0x219e12,null))['then'](saveUpdates(_0x35216e[_0xb6ee('0x4d')],null))[_0xb6ee('0x25')](respondWithResult(_0x219e12,null))[_0xb6ee('0x46')](handleError(_0x219e12,null));};exports['destroy']=function(_0x4edf82,_0x50c38a){return db[_0xb6ee('0x2d')][_0xb6ee('0x4b')]({'where':{'id':_0x4edf82['params']['id']}})[_0xb6ee('0x25')](handleEntityNotFound(_0x50c38a,null))[_0xb6ee('0x25')](removeEntity(_0x50c38a,null))[_0xb6ee('0x46')](handleError(_0x50c38a,null));};
\ No newline at end of file
index ec6a088..a4b5f07 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x47c5=['ZohoField','int_zoho_fields','zoho_unique_index','idField','FieldId','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','./intZohoField.attributes','exports','define'];(function(_0x1dc0b9,_0x43ffca){var _0x20013a=function(_0x147ffa){while(--_0x147ffa){_0x1dc0b9['push'](_0x1dc0b9['shift']());}};_0x20013a(++_0x43ffca);}(_0x47c5,0x165));var _0x547c=function(_0x3dc85,_0x4f2d39){_0x3dc85=_0x3dc85-0x0;var _0x3e938e=_0x47c5[_0x3dc85];return _0x3e938e;};'use strict';var _=require(_0x547c('0x0'));var util=require(_0x547c('0x1'));var logger=require(_0x547c('0x2'))(_0x547c('0x3'));var moment=require(_0x547c('0x4'));var BPromise=require(_0x547c('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x547c('0x6'));var rimraf=require(_0x547c('0x7'));var config=require('../../config/environment');var attributes=require(_0x547c('0x8'));module[_0x547c('0x9')]=function(_0x51ab7f,_0x2e5b57){return _0x51ab7f[_0x547c('0xa')](_0x547c('0xb'),attributes,{'tableName':_0x547c('0xc'),'paranoid':![],'indexes':[{'name':_0x547c('0xd'),'fields':[_0x547c('0xe'),_0x547c('0xf')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x8952=['exports','int_zoho_fields','zoho_unique_index','idField','FieldId','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment'];(function(_0x52ce6b,_0x1272bc){var _0x220bb1=function(_0x279a4d){while(--_0x279a4d){_0x52ce6b['push'](_0x52ce6b['shift']());}};_0x220bb1(++_0x1272bc);}(_0x8952,0x17e));var _0x2895=function(_0x23792b,_0x1000d4){_0x23792b=_0x23792b-0x0;var _0x4a10be=_0x8952[_0x23792b];return _0x4a10be;};'use strict';var _=require('lodash');var util=require(_0x2895('0x0'));var logger=require(_0x2895('0x1'))(_0x2895('0x2'));var moment=require(_0x2895('0x3'));var BPromise=require(_0x2895('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2895('0x5'));var rimraf=require(_0x2895('0x6'));var config=require(_0x2895('0x7'));var attributes=require('./intZohoField.attributes');module[_0x2895('0x8')]=function(_0x73c245,_0x37305b){return _0x73c245['define']('ZohoField',attributes,{'tableName':_0x2895('0x9'),'paranoid':![],'indexes':[{'name':_0x2895('0xa'),'fields':[_0x2895('0xb'),_0x2895('0xc')],'unique':!![]}],'timestamps':!![]});};
\ No newline at end of file
index 8286a70..0bcec78 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5e1b=['http','request','then','info','ZohoField,\x20%s,\x20%s','request\x20sent','debug','ZohoField,\x20%s,\x20%s,\x20%s','error','message','result','catch','util','bluebird','randomstring','../../mysqldb','../../config/utils','jayson/promise'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0x5e1b,0x150));var _0xb5e1=function(_0x155c64,_0x26ff95){_0x155c64=_0x155c64-0x0;var _0x1f154a=_0x5e1b[_0x155c64];return _0x1f154a;};'use strict';var _=require('lodash');var util=require(_0xb5e1('0x0'));var moment=require('moment');var BPromise=require(_0xb5e1('0x1'));var rs=require(_0xb5e1('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb5e1('0x3'))['db'];var utils=require(_0xb5e1('0x4'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0xb5e1('0x5'));var client=jayson['client'][_0xb5e1('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x1944cd,_0x323d2e,_0x1e4be2){return new BPromise(function(_0x238367,_0xa98af3){return client[_0xb5e1('0x7')](_0x1944cd,_0x1e4be2)[_0xb5e1('0x8')](function(_0x36c572){logger[_0xb5e1('0x9')](_0xb5e1('0xa'),_0x323d2e,_0xb5e1('0xb'));logger[_0xb5e1('0xc')](_0xb5e1('0xd'),_0x323d2e,_0xb5e1('0xb'),JSON['stringify'](_0x36c572));if(_0x36c572['error']){if(_0x36c572[_0xb5e1('0xe')]['code']===0x1f4){logger[_0xb5e1('0xe')](_0xb5e1('0xa'),_0x323d2e,_0x36c572[_0xb5e1('0xe')][_0xb5e1('0xf')]);return _0xa98af3(_0x36c572[_0xb5e1('0xe')][_0xb5e1('0xf')]);}logger[_0xb5e1('0xe')](_0xb5e1('0xa'),_0x323d2e,_0x36c572[_0xb5e1('0xe')][_0xb5e1('0xf')]);return _0x238367(_0x36c572[_0xb5e1('0xe')][_0xb5e1('0xf')]);}else{logger[_0xb5e1('0x9')](_0xb5e1('0xa'),_0x323d2e,_0xb5e1('0xb'));_0x238367(_0x36c572[_0xb5e1('0x10')][_0xb5e1('0xf')]);}})[_0xb5e1('0x11')](function(_0x266161){logger[_0xb5e1('0xe')](_0xb5e1('0xa'),_0x323d2e,_0x266161);_0xa98af3(_0x266161);});});}
\ No newline at end of file
+var _0x70a1=['request\x20sent','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','client','http','request','ZohoField,\x20%s,\x20%s','debug','ZohoField,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info'];(function(_0x1ca9e9,_0x1c4391){var _0x309f3c=function(_0x5ab318){while(--_0x5ab318){_0x1ca9e9['push'](_0x1ca9e9['shift']());}};_0x309f3c(++_0x1c4391);}(_0x70a1,0x162));var _0x170a=function(_0x1fa759,_0x4ecdce){_0x1fa759=_0x1fa759-0x0;var _0x2da9f4=_0x70a1[_0x1fa759];return _0x2da9f4;};'use strict';var _=require(_0x170a('0x0'));var util=require(_0x170a('0x1'));var moment=require(_0x170a('0x2'));var BPromise=require(_0x170a('0x3'));var rs=require(_0x170a('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x170a('0x5'))['db'];var utils=require(_0x170a('0x6'));var logger=require(_0x170a('0x7'))(_0x170a('0x8'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x170a('0x9')][_0x170a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x23ab87,_0x4e8f01,_0x26f9f6){return new BPromise(function(_0x539714,_0x34a13b){return client[_0x170a('0xb')](_0x23ab87,_0x26f9f6)['then'](function(_0x1ff5c9){logger['info'](_0x170a('0xc'),_0x4e8f01,'request\x20sent');logger[_0x170a('0xd')](_0x170a('0xe'),_0x4e8f01,'request\x20sent',JSON[_0x170a('0xf')](_0x1ff5c9));if(_0x1ff5c9['error']){if(_0x1ff5c9[_0x170a('0x10')][_0x170a('0x11')]===0x1f4){logger[_0x170a('0x10')](_0x170a('0xc'),_0x4e8f01,_0x1ff5c9[_0x170a('0x10')]['message']);return _0x34a13b(_0x1ff5c9[_0x170a('0x10')]['message']);}logger[_0x170a('0x10')](_0x170a('0xc'),_0x4e8f01,_0x1ff5c9[_0x170a('0x10')]['message']);return _0x539714(_0x1ff5c9['error'][_0x170a('0x12')]);}else{logger[_0x170a('0x13')](_0x170a('0xc'),_0x4e8f01,_0x170a('0x14'));_0x539714(_0x1ff5c9['result'][_0x170a('0x12')]);}})[_0x170a('0x15')](function(_0x51e81a){logger['error'](_0x170a('0xc'),_0x4e8f01,_0x51e81a);_0x34a13b(_0x51e81a);});});}
\ No newline at end of file
index d0b5850..570671a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0713=['../../config/environment','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service'];(function(_0x27d442,_0x47a4b6){var _0x1ffab8=function(_0x207748){while(--_0x207748){_0x27d442['push'](_0x27d442['shift']());}};_0x1ffab8(++_0x47a4b6);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3071('0x0'));var timeout=require(_0x3071('0x1'));var express=require(_0x3071('0x2'));var router=express[_0x3071('0x3')]();var fs_extra=require(_0x3071('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));module[_0x3071('0x7')]=router;
\ No newline at end of file
+var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0x3c079e,_0x12422d){var _0x2dbc87=function(_0x507b00){while(--_0x507b00){_0x3c079e['push'](_0x3c079e['shift']());}};_0x2dbc87(++_0x12422d);}(_0x70e0,0x17b));var _0x070e=function(_0x4d5ad6,_0x25364f){_0x4d5ad6=_0x4d5ad6-0x0;var _0x367f3f=_0x70e0[_0x4d5ad6];return _0x367f3f;};'use strict';var multer=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var path=require(_0x070e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x070e('0x3')]();var fs_extra=require(_0x070e('0x4'));var auth=require(_0x070e('0x5'));var interaction=require(_0x070e('0x6'));var config=require('../../config/environment');module[_0x070e('0x7')]=router;
\ No newline at end of file
index 866e664..22c3b1f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x08ff=['BOOLEAN','state','sequelize','exports','STRING','unique_name_and_version','app.js','INTEGER'];(function(_0xb0268d,_0x19c5aa){var _0x59c8f5=function(_0x5b9b47){while(--_0x5b9b47){_0xb0268d['push'](_0xb0268d['shift']());}};_0x59c8f5(++_0x19c5aa);}(_0x08ff,0x72));var _0xf08f=function(_0x29bb0a,_0x4a49e6){_0x29bb0a=_0x29bb0a-0x0;var _0x1725e4=_0x08ff[_0x29bb0a];return _0x1725e4;};'use strict';var Sequelize=require(_0xf08f('0x0'));module[_0xf08f('0x1')]={'name':{'type':Sequelize[_0xf08f('0x2')],'allowNull':![],'unique':_0xf08f('0x3')},'version':{'type':Sequelize[_0xf08f('0x2')],'allowNull':![],'unique':_0xf08f('0x3')},'main':{'type':Sequelize[_0xf08f('0x2')],'defaultValue':_0xf08f('0x4')},'filename':{'type':Sequelize['STRING']},'path':{'type':Sequelize[_0xf08f('0x2')]},'type':{'type':Sequelize[_0xf08f('0x2')]},'size':{'type':Sequelize[_0xf08f('0x5')]},'active':{'type':Sequelize[_0xf08f('0x6')],'defaultValue':![]},'author':{'type':Sequelize['STRING']},'logo':{'type':Sequelize['STRING']},'state':{'type':Sequelize[_0xf08f('0x2')],'unique':_0xf08f('0x7')},'description':{'type':Sequelize[_0xf08f('0x2')]},'title':{'type':Sequelize[_0xf08f('0x2')]},'remoteUri':{'type':Sequelize[_0xf08f('0x2')]},'link':{'type':Sequelize[_0xf08f('0x2')],'defaultValue':'#'}};
\ No newline at end of file
+var _0x80c7=['state','sequelize','exports','STRING','unique_name_and_version','INTEGER','BOOLEAN'];(function(_0x4e6afe,_0x34dc76){var _0x43cf2d=function(_0x1f585f){while(--_0x1f585f){_0x4e6afe['push'](_0x4e6afe['shift']());}};_0x43cf2d(++_0x34dc76);}(_0x80c7,0x8d));var _0x780c=function(_0x36a475,_0x11a2ab){_0x36a475=_0x36a475-0x0;var _0x10075b=_0x80c7[_0x36a475];return _0x10075b;};'use strict';var Sequelize=require(_0x780c('0x0'));module[_0x780c('0x1')]={'name':{'type':Sequelize[_0x780c('0x2')],'allowNull':![],'unique':_0x780c('0x3')},'version':{'type':Sequelize['STRING'],'allowNull':![],'unique':'unique_name_and_version'},'main':{'type':Sequelize[_0x780c('0x2')],'defaultValue':'app.js'},'filename':{'type':Sequelize[_0x780c('0x2')]},'path':{'type':Sequelize[_0x780c('0x2')]},'type':{'type':Sequelize[_0x780c('0x2')]},'size':{'type':Sequelize[_0x780c('0x4')]},'active':{'type':Sequelize[_0x780c('0x5')],'defaultValue':![]},'author':{'type':Sequelize[_0x780c('0x2')]},'logo':{'type':Sequelize[_0x780c('0x2')]},'state':{'type':Sequelize[_0x780c('0x2')],'unique':_0x780c('0x6')},'description':{'type':Sequelize[_0x780c('0x2')]},'title':{'type':Sequelize[_0x780c('0x2')]},'remoteUri':{'type':Sequelize['STRING']},'link':{'type':Sequelize[_0x780c('0x2')],'defaultValue':'#'}};
\ No newline at end of file
index 01b54c5..26bcef9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xadb5=['model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','pick','filters','filter','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','show','params','rawAttributes','create','body','find','rimraf','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','update','then','destroy','end','stack','name','send','index','map','Integration','fieldName','type','key'];(function(_0xa148b7,_0x2f3eb2){var _0x51efd3=function(_0x34bcec){while(--_0x34bcec){_0xa148b7['push'](_0xa148b7['shift']());}};_0x51efd3(++_0x2f3eb2);}(_0xadb5,0xad));var _0x5adb=function(_0x498970,_0x19ca43){_0x498970=_0x498970-0x0;var _0x27b285=_0xadb5[_0x498970];return _0x27b285;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x5adb('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x5adb('0x1'));var rp=require(_0x5adb('0x2'));var moment=require(_0x5adb('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x5adb('0x4'));var util=require(_0x5adb('0x5'));var path=require(_0x5adb('0x6'));var sox=require('sox');var csv=require(_0x5adb('0x7'));var ejs=require(_0x5adb('0x8'));var fs=require('fs');var fs_extra=require(_0x5adb('0x9'));var _=require(_0x5adb('0xa'));var squel=require(_0x5adb('0xb'));var crypto=require(_0x5adb('0xc'));var jsforce=require(_0x5adb('0xd'));var deskjs=require(_0x5adb('0xe'));var toCsv=require(_0x5adb('0x7'));var querystring=require(_0x5adb('0xf'));var Papa=require(_0x5adb('0x10'));var Redis=require(_0x5adb('0x11'));var authService=require(_0x5adb('0x12'));var qs=require(_0x5adb('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x5adb('0x14'))(_0x5adb('0x15'));var utils=require(_0x5adb('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x5adb('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2a0b70,_0x5433bf){_0x5433bf=_0x5433bf||0xcc;return function(_0x8cfcc6){if(_0x8cfcc6){return _0x2a0b70[_0x5adb('0x18')](_0x5433bf);}return _0x2a0b70[_0x5adb('0x19')](_0x5433bf)['end']();};}function respondWithResult(_0x2a545b,_0x34af2c){_0x34af2c=_0x34af2c||0xc8;return function(_0xf82f72){if(_0xf82f72){return _0x2a545b['status'](_0x34af2c)[_0x5adb('0x1a')](_0xf82f72);}};}function respondWithFilteredResult(_0x518823,_0x367d82){return function(_0x42a482){if(_0x42a482){var _0x30614e=typeof _0x367d82[_0x5adb('0x1b')]===_0x5adb('0x1c')&&typeof _0x367d82[_0x5adb('0x1d')]===_0x5adb('0x1c');var _0x42f4c6=_0x42a482[_0x5adb('0x1e')];var _0x529b65=_0x30614e?0x0:_0x367d82[_0x5adb('0x1b')];var _0x5de028=_0x30614e?_0x42a482[_0x5adb('0x1e')]:_0x367d82['offset']+_0x367d82[_0x5adb('0x1d')];var _0x50e84f;if(_0x5de028>=_0x42f4c6){_0x5de028=_0x42f4c6;_0x50e84f=0xc8;}else{_0x50e84f=0xce;}_0x518823['status'](_0x50e84f);return _0x518823[_0x5adb('0x1f')](_0x5adb('0x20'),_0x529b65+'-'+_0x5de028+'/'+_0x42f4c6)[_0x5adb('0x1a')](_0x42a482);}return null;};}function patchUpdates(_0x1fd4a7){return function(_0x99bc6c){try{jsonpatch['apply'](_0x99bc6c,_0x1fd4a7,!![]);}catch(_0x3255b3){return BPromise['reject'](_0x3255b3);}return _0x99bc6c['save']();};}function saveUpdates(_0x3754cc,_0x379b33){return function(_0x1a38d3){if(_0x1a38d3){return _0x1a38d3[_0x5adb('0x21')](_0x3754cc)[_0x5adb('0x22')](function(_0x413911){return _0x413911;});}return null;};}function removeEntity(_0xfd9bb9,_0x4ca150){return function(_0x4b1957){if(_0x4b1957){return _0x4b1957[_0x5adb('0x23')]()[_0x5adb('0x22')](function(){_0xfd9bb9[_0x5adb('0x19')](0xcc)[_0x5adb('0x24')]();});}};}function handleEntityNotFound(_0x49f203,_0x2fee18){return function(_0x2e1e63){if(!_0x2e1e63){_0x49f203['sendStatus'](0x194);}return _0x2e1e63;};}function handleError(_0x1feecf,_0x1ded9f){_0x1ded9f=_0x1ded9f||0x1f4;return function(_0x1a0acd){logger['error'](_0x1a0acd[_0x5adb('0x25')]);if(_0x1a0acd[_0x5adb('0x26')]){delete _0x1a0acd[_0x5adb('0x26')];}_0x1feecf[_0x5adb('0x19')](_0x1ded9f)[_0x5adb('0x27')](_0x1a0acd);};}exports[_0x5adb('0x28')]=function(_0x4a5d46,_0x49992e){var _0x5d457e={},_0x39bddd={},_0x1eac55={'count':0x0,'rows':[]};var _0x60a672=_[_0x5adb('0x29')](db[_0x5adb('0x2a')]['rawAttributes'],function(_0x11ec2a){return{'name':_0x11ec2a[_0x5adb('0x2b')],'type':_0x11ec2a[_0x5adb('0x2c')][_0x5adb('0x2d')]};});_0x39bddd[_0x5adb('0x2e')]=_[_0x5adb('0x29')](_0x60a672,_0x5adb('0x26'));_0x39bddd[_0x5adb('0x2f')]=_[_0x5adb('0x30')](_0x4a5d46[_0x5adb('0x2f')]);_0x39bddd['filters']=_[_0x5adb('0x31')](_0x39bddd['model'],_0x39bddd[_0x5adb('0x2f')]);_0x5d457e[_0x5adb('0x32')]=_['intersection'](_0x39bddd[_0x5adb('0x2e')],qs[_0x5adb('0x33')](_0x4a5d46[_0x5adb('0x2f')]['fields']));_0x5d457e[_0x5adb('0x32')]=_0x5d457e[_0x5adb('0x32')]['length']?_0x5d457e['attributes']:_0x39bddd[_0x5adb('0x2e')];if(!_0x4a5d46['query'][_0x5adb('0x34')](_0x5adb('0x35'))){_0x5d457e[_0x5adb('0x1d')]=qs[_0x5adb('0x1d')](_0x4a5d46[_0x5adb('0x2f')]['limit']);_0x5d457e[_0x5adb('0x1b')]=qs[_0x5adb('0x1b')](_0x4a5d46[_0x5adb('0x2f')]['offset']);}_0x5d457e['order']=qs[_0x5adb('0x36')](_0x4a5d46[_0x5adb('0x2f')]['sort']);_0x5d457e[_0x5adb('0x37')]=qs['filters'](_[_0x5adb('0x38')](_0x4a5d46['query'],_0x39bddd[_0x5adb('0x39')]),_0x60a672);if(_0x4a5d46['query'][_0x5adb('0x3a')]){_0x5d457e[_0x5adb('0x37')]=_['merge'](_0x5d457e[_0x5adb('0x37')],{'$or':_['map'](_0x60a672,function(_0xadbe37){if(_0xadbe37[_0x5adb('0x2c')]!==_0x5adb('0x3b')){var _0x50edd1={};_0x50edd1[_0xadbe37[_0x5adb('0x26')]]={'$like':'%'+_0x4a5d46[_0x5adb('0x2f')][_0x5adb('0x3a')]+'%'};return _0x50edd1;}})});}_0x5d457e=_[_0x5adb('0x3c')]({},_0x5d457e,_0x4a5d46[_0x5adb('0x3d')]);var _0x52d74f={'where':_0x5d457e['where']};return db['Integration']['count'](_0x52d74f)[_0x5adb('0x22')](function(_0x2fbe14){_0x1eac55[_0x5adb('0x1e')]=_0x2fbe14;if(_0x4a5d46[_0x5adb('0x2f')][_0x5adb('0x3e')]){_0x5d457e[_0x5adb('0x3f')]=[{'all':!![]}];}return db[_0x5adb('0x2a')][_0x5adb('0x40')](_0x5d457e);})['then'](function(_0x53f2c6){_0x1eac55[_0x5adb('0x41')]=_0x53f2c6;return _0x1eac55;})['then'](respondWithFilteredResult(_0x49992e,_0x5d457e))[_0x5adb('0x42')](handleError(_0x49992e,null));};exports[_0x5adb('0x43')]=function(_0x299746,_0x121714){var _0xdfecfd={'raw':![],'where':{'id':_0x299746[_0x5adb('0x44')]['id']}},_0x522ee5={};_0x522ee5[_0x5adb('0x2e')]=_['keys'](db[_0x5adb('0x2a')][_0x5adb('0x45')]);_0x522ee5['query']=_[_0x5adb('0x30')](_0x299746[_0x5adb('0x2f')]);_0x522ee5[_0x5adb('0x39')]=_[_0x5adb('0x31')](_0x522ee5[_0x5adb('0x2e')],_0x522ee5[_0x5adb('0x2f')]);_0xdfecfd[_0x5adb('0x32')]=_['intersection'](_0x522ee5['model'],qs[_0x5adb('0x33')](_0x299746[_0x5adb('0x2f')][_0x5adb('0x33')]));_0xdfecfd[_0x5adb('0x32')]=_0xdfecfd['attributes']['length']?_0xdfecfd[_0x5adb('0x32')]:_0x522ee5[_0x5adb('0x2e')];if(_0x299746[_0x5adb('0x2f')][_0x5adb('0x3e')]){_0xdfecfd[_0x5adb('0x3f')]=[{'all':!![]}];}_0xdfecfd=_['merge']({},_0xdfecfd,_0x299746[_0x5adb('0x3d')]);return db[_0x5adb('0x2a')]['find'](_0xdfecfd)[_0x5adb('0x22')](handleEntityNotFound(_0x121714,null))[_0x5adb('0x22')](respondWithResult(_0x121714,null))[_0x5adb('0x42')](handleError(_0x121714,null));};exports[_0x5adb('0x46')]=function(_0x186bd2,_0x3a5409){return db[_0x5adb('0x2a')][_0x5adb('0x46')](_0x186bd2['body'],{})[_0x5adb('0x22')](respondWithResult(_0x3a5409,0xc9))['catch'](handleError(_0x3a5409,null));};exports['update']=function(_0x5015ee,_0x3cd211){if(_0x5015ee[_0x5adb('0x47')]['id']){delete _0x5015ee[_0x5adb('0x47')]['id'];}return db['Integration'][_0x5adb('0x48')]({'where':{'id':_0x5015ee['params']['id']}})[_0x5adb('0x22')](handleEntityNotFound(_0x3cd211,null))[_0x5adb('0x22')](saveUpdates(_0x5015ee[_0x5adb('0x47')],null))['then'](respondWithResult(_0x3cd211,null))[_0x5adb('0x42')](handleError(_0x3cd211,null));};exports['destroy']=function(_0x22fa54,_0x6dc067){return db['Integration'][_0x5adb('0x48')]({'where':{'id':_0x22fa54[_0x5adb('0x44')]['id']}})[_0x5adb('0x22')](handleEntityNotFound(_0x6dc067,null))[_0x5adb('0x22')](removeEntity(_0x6dc067,null))[_0x5adb('0x42')](handleError(_0x6dc067,null));};
\ No newline at end of file
+var _0x5fab=['querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','undefined','count','limit','set','Content-Range','apply','reject','save','update','destroy','end','sendStatus','name','send','index','map','Integration','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','VIRTUAL','filter','includeAll','include','findAll','then','rows','show','params','intersection','fields','options','find','catch','create','body','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','squel','crypto','jsforce'];(function(_0x32729c,_0xf5afd8){var _0x482cfd=function(_0x231471){while(--_0x231471){_0x32729c['push'](_0x32729c['shift']());}};_0x482cfd(++_0xf5afd8);}(_0x5fab,0x177));var _0xb5fa=function(_0x5a7521,_0x2d1d5e){_0x5a7521=_0x5a7521-0x0;var _0x3d6e6a=_0x5fab[_0x5a7521];return _0x3d6e6a;};'use strict';var emlformat=require(_0xb5fa('0x0'));var rimraf=require(_0xb5fa('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xb5fa('0x2'));var rp=require(_0xb5fa('0x3'));var moment=require(_0xb5fa('0x4'));var BPromise=require(_0xb5fa('0x5'));var Mustache=require(_0xb5fa('0x6'));var util=require(_0xb5fa('0x7'));var path=require(_0xb5fa('0x8'));var sox=require(_0xb5fa('0x9'));var csv=require(_0xb5fa('0xa'));var ejs=require(_0xb5fa('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xb5fa('0xc'));var crypto=require(_0xb5fa('0xd'));var jsforce=require(_0xb5fa('0xe'));var deskjs=require('desk.js');var toCsv=require(_0xb5fa('0xa'));var querystring=require(_0xb5fa('0xf'));var Papa=require(_0xb5fa('0x10'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xb5fa('0x11'));var as=require(_0xb5fa('0x12'));var hardwareService=require(_0xb5fa('0x13'));var logger=require(_0xb5fa('0x14'))(_0xb5fa('0x15'));var utils=require(_0xb5fa('0x16'));var config=require(_0xb5fa('0x17'));var licenseUtil=require(_0xb5fa('0x18'));var db=require(_0xb5fa('0x19'))['db'];function respondWithStatusCode(_0x4d3576,_0x2ad830){_0x2ad830=_0x2ad830||0xcc;return function(_0x3dad4d){if(_0x3dad4d){return _0x4d3576['sendStatus'](_0x2ad830);}return _0x4d3576[_0xb5fa('0x1a')](_0x2ad830)['end']();};}function respondWithResult(_0x265992,_0x3fc372){_0x3fc372=_0x3fc372||0xc8;return function(_0x40c914){if(_0x40c914){return _0x265992[_0xb5fa('0x1a')](_0x3fc372)[_0xb5fa('0x1b')](_0x40c914);}};}function respondWithFilteredResult(_0x5371cf,_0x567f31){return function(_0x38e964){if(_0x38e964){var _0x587043=typeof _0x567f31[_0xb5fa('0x1c')]===_0xb5fa('0x1d')&&typeof _0x567f31['limit']==='undefined';var _0x451a55=_0x38e964[_0xb5fa('0x1e')];var _0x32e9e5=_0x587043?0x0:_0x567f31[_0xb5fa('0x1c')];var _0x324ba5=_0x587043?_0x38e964[_0xb5fa('0x1e')]:_0x567f31[_0xb5fa('0x1c')]+_0x567f31[_0xb5fa('0x1f')];var _0xc14dc4;if(_0x324ba5>=_0x451a55){_0x324ba5=_0x451a55;_0xc14dc4=0xc8;}else{_0xc14dc4=0xce;}_0x5371cf[_0xb5fa('0x1a')](_0xc14dc4);return _0x5371cf[_0xb5fa('0x20')](_0xb5fa('0x21'),_0x32e9e5+'-'+_0x324ba5+'/'+_0x451a55)['json'](_0x38e964);}return null;};}function patchUpdates(_0x432bfa){return function(_0x519e20){try{jsonpatch[_0xb5fa('0x22')](_0x519e20,_0x432bfa,!![]);}catch(_0x4a6c04){return BPromise[_0xb5fa('0x23')](_0x4a6c04);}return _0x519e20[_0xb5fa('0x24')]();};}function saveUpdates(_0x4e05c0,_0x40dfdf){return function(_0x3a2ab9){if(_0x3a2ab9){return _0x3a2ab9[_0xb5fa('0x25')](_0x4e05c0)['then'](function(_0x32a85c){return _0x32a85c;});}return null;};}function removeEntity(_0xec108f,_0x444237){return function(_0x542348){if(_0x542348){return _0x542348[_0xb5fa('0x26')]()['then'](function(){_0xec108f[_0xb5fa('0x1a')](0xcc)[_0xb5fa('0x27')]();});}};}function handleEntityNotFound(_0x11053a,_0x543edf){return function(_0x2dbd22){if(!_0x2dbd22){_0x11053a[_0xb5fa('0x28')](0x194);}return _0x2dbd22;};}function handleError(_0x6a455c,_0x20d649){_0x20d649=_0x20d649||0x1f4;return function(_0x568870){logger['error'](_0x568870['stack']);if(_0x568870['name']){delete _0x568870[_0xb5fa('0x29')];}_0x6a455c[_0xb5fa('0x1a')](_0x20d649)[_0xb5fa('0x2a')](_0x568870);};}exports[_0xb5fa('0x2b')]=function(_0x534884,_0x3506a4){var _0x358549={},_0x353314={},_0x409af9={'count':0x0,'rows':[]};var _0x2a5690=_[_0xb5fa('0x2c')](db[_0xb5fa('0x2d')][_0xb5fa('0x2e')],function(_0x1f4380){return{'name':_0x1f4380[_0xb5fa('0x2f')],'type':_0x1f4380[_0xb5fa('0x30')][_0xb5fa('0x31')]};});_0x353314[_0xb5fa('0x32')]=_[_0xb5fa('0x2c')](_0x2a5690,_0xb5fa('0x29'));_0x353314[_0xb5fa('0x33')]=_[_0xb5fa('0x34')](_0x534884[_0xb5fa('0x33')]);_0x353314[_0xb5fa('0x35')]=_['intersection'](_0x353314[_0xb5fa('0x32')],_0x353314['query']);_0x358549['attributes']=_['intersection'](_0x353314[_0xb5fa('0x32')],qs['fields'](_0x534884[_0xb5fa('0x33')]['fields']));_0x358549['attributes']=_0x358549[_0xb5fa('0x36')][_0xb5fa('0x37')]?_0x358549['attributes']:_0x353314['model'];if(!_0x534884[_0xb5fa('0x33')][_0xb5fa('0x38')](_0xb5fa('0x39'))){_0x358549['limit']=qs[_0xb5fa('0x1f')](_0x534884[_0xb5fa('0x33')]['limit']);_0x358549[_0xb5fa('0x1c')]=qs[_0xb5fa('0x1c')](_0x534884[_0xb5fa('0x33')]['offset']);}_0x358549[_0xb5fa('0x3a')]=qs[_0xb5fa('0x3b')](_0x534884[_0xb5fa('0x33')]['sort']);_0x358549[_0xb5fa('0x3c')]=qs[_0xb5fa('0x35')](_[_0xb5fa('0x3d')](_0x534884[_0xb5fa('0x33')],_0x353314['filters']),_0x2a5690);if(_0x534884['query']['filter']){_0x358549['where']=_['merge'](_0x358549['where'],{'$or':_[_0xb5fa('0x2c')](_0x2a5690,function(_0x4c0a4d){if(_0x4c0a4d[_0xb5fa('0x30')]!==_0xb5fa('0x3e')){var _0x36db1a={};_0x36db1a[_0x4c0a4d[_0xb5fa('0x29')]]={'$like':'%'+_0x534884[_0xb5fa('0x33')][_0xb5fa('0x3f')]+'%'};return _0x36db1a;}})});}_0x358549=_['merge']({},_0x358549,_0x534884['options']);var _0x4c4bf0={'where':_0x358549[_0xb5fa('0x3c')]};return db['Integration'][_0xb5fa('0x1e')](_0x4c4bf0)['then'](function(_0x58aa97){_0x409af9[_0xb5fa('0x1e')]=_0x58aa97;if(_0x534884[_0xb5fa('0x33')][_0xb5fa('0x40')]){_0x358549[_0xb5fa('0x41')]=[{'all':!![]}];}return db[_0xb5fa('0x2d')][_0xb5fa('0x42')](_0x358549);})[_0xb5fa('0x43')](function(_0x83df0b){_0x409af9[_0xb5fa('0x44')]=_0x83df0b;return _0x409af9;})[_0xb5fa('0x43')](respondWithFilteredResult(_0x3506a4,_0x358549))['catch'](handleError(_0x3506a4,null));};exports[_0xb5fa('0x45')]=function(_0x4bc9df,_0x233f90){var _0x39aac3={'raw':![],'where':{'id':_0x4bc9df[_0xb5fa('0x46')]['id']}},_0x2c7c5f={};_0x2c7c5f[_0xb5fa('0x32')]=_[_0xb5fa('0x34')](db[_0xb5fa('0x2d')][_0xb5fa('0x2e')]);_0x2c7c5f['query']=_[_0xb5fa('0x34')](_0x4bc9df[_0xb5fa('0x33')]);_0x2c7c5f['filters']=_[_0xb5fa('0x47')](_0x2c7c5f['model'],_0x2c7c5f[_0xb5fa('0x33')]);_0x39aac3[_0xb5fa('0x36')]=_['intersection'](_0x2c7c5f['model'],qs[_0xb5fa('0x48')](_0x4bc9df[_0xb5fa('0x33')][_0xb5fa('0x48')]));_0x39aac3[_0xb5fa('0x36')]=_0x39aac3[_0xb5fa('0x36')][_0xb5fa('0x37')]?_0x39aac3[_0xb5fa('0x36')]:_0x2c7c5f[_0xb5fa('0x32')];if(_0x4bc9df['query'][_0xb5fa('0x40')]){_0x39aac3[_0xb5fa('0x41')]=[{'all':!![]}];}_0x39aac3=_['merge']({},_0x39aac3,_0x4bc9df[_0xb5fa('0x49')]);return db[_0xb5fa('0x2d')][_0xb5fa('0x4a')](_0x39aac3)[_0xb5fa('0x43')](handleEntityNotFound(_0x233f90,null))[_0xb5fa('0x43')](respondWithResult(_0x233f90,null))[_0xb5fa('0x4b')](handleError(_0x233f90,null));};exports[_0xb5fa('0x4c')]=function(_0x33eb2c,_0x20f5f5){return db[_0xb5fa('0x2d')][_0xb5fa('0x4c')](_0x33eb2c[_0xb5fa('0x4d')],{})[_0xb5fa('0x43')](respondWithResult(_0x20f5f5,0xc9))[_0xb5fa('0x4b')](handleError(_0x20f5f5,null));};exports[_0xb5fa('0x25')]=function(_0x3a39f2,_0x52f5d8){if(_0x3a39f2['body']['id']){delete _0x3a39f2[_0xb5fa('0x4d')]['id'];}return db['Integration'][_0xb5fa('0x4a')]({'where':{'id':_0x3a39f2[_0xb5fa('0x46')]['id']}})['then'](handleEntityNotFound(_0x52f5d8,null))[_0xb5fa('0x43')](saveUpdates(_0x3a39f2[_0xb5fa('0x4d')],null))[_0xb5fa('0x43')](respondWithResult(_0x52f5d8,null))[_0xb5fa('0x4b')](handleError(_0x52f5d8,null));};exports[_0xb5fa('0x26')]=function(_0x3ffee0,_0x51d5f7){return db[_0xb5fa('0x2d')]['find']({'where':{'id':_0x3ffee0[_0xb5fa('0x46')]['id']}})[_0xb5fa('0x43')](handleEntityNotFound(_0x51d5f7,null))[_0xb5fa('0x43')](removeEntity(_0x51d5f7,null))['catch'](handleError(_0x51d5f7,null));};
\ No newline at end of file
index dc68fe8..9073359 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6104=['./integration.attributes','exports','Integration','integrations','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x4c9296,_0x5d07f5){var _0x3d8557=function(_0x2143e6){while(--_0x2143e6){_0x4c9296['push'](_0x4c9296['shift']());}};_0x3d8557(++_0x5d07f5);}(_0x6104,0x12f));var _0x4610=function(_0x55ce43,_0x31b1f8){_0x55ce43=_0x55ce43-0x0;var _0x402dd3=_0x6104[_0x55ce43];return _0x402dd3;};'use strict';var _=require(_0x4610('0x0'));var util=require('util');var logger=require(_0x4610('0x1'))(_0x4610('0x2'));var moment=require(_0x4610('0x3'));var BPromise=require(_0x4610('0x4'));var rp=require(_0x4610('0x5'));var fs=require('fs');var path=require(_0x4610('0x6'));var rimraf=require(_0x4610('0x7'));var config=require(_0x4610('0x8'));var attributes=require(_0x4610('0x9'));module[_0x4610('0xa')]=function(_0x4f8b3c,_0x46213f){return _0x4f8b3c['define'](_0x4610('0xb'),attributes,{'tableName':_0x4610('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa1aa=['exports','define','integrations','lodash','util','api','moment','request-promise','path','rimraf','../../config/environment','./integration.attributes'];(function(_0x1e6012,_0x2cb951){var _0x18fdc4=function(_0x21b540){while(--_0x21b540){_0x1e6012['push'](_0x1e6012['shift']());}};_0x18fdc4(++_0x2cb951);}(_0xa1aa,0x1a7));var _0xaa1a=function(_0x1af548,_0x23a19e){_0x1af548=_0x1af548-0x0;var _0x2a2649=_0xa1aa[_0x1af548];return _0x2a2649;};'use strict';var _=require(_0xaa1a('0x0'));var util=require(_0xaa1a('0x1'));var logger=require('../../config/logger')(_0xaa1a('0x2'));var moment=require(_0xaa1a('0x3'));var BPromise=require('bluebird');var rp=require(_0xaa1a('0x4'));var fs=require('fs');var path=require(_0xaa1a('0x5'));var rimraf=require(_0xaa1a('0x6'));var config=require(_0xaa1a('0x7'));var attributes=require(_0xaa1a('0x8'));module[_0xaa1a('0x9')]=function(_0x43aeb3,_0x45caf3){return _0x43aeb3[_0xaa1a('0xa')]('Integration',attributes,{'tableName':_0xaa1a('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 2c2bccd..7d40864 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9f0e=['../../config/environment','jayson/promise','request','then','info','Integration,\x20%s,\x20%s','request\x20sent','debug','Integration,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc'];(function(_0x2f0534,_0xa894bc){var _0x521591=function(_0x160f1f){while(--_0x160f1f){_0x2f0534['push'](_0x2f0534['shift']());}};_0x521591(++_0xa894bc);}(_0x9f0e,0x116));var _0xe9f0=function(_0x5b84b3,_0xf74fe){_0x5b84b3=_0x5b84b3-0x0;var _0xe17246=_0x9f0e[_0x5b84b3];return _0xe17246;};'use strict';var _=require(_0xe9f0('0x0'));var util=require(_0xe9f0('0x1'));var moment=require(_0xe9f0('0x2'));var BPromise=require(_0xe9f0('0x3'));var rs=require(_0xe9f0('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xe9f0('0x5'));var logger=require(_0xe9f0('0x6'))(_0xe9f0('0x7'));var config=require(_0xe9f0('0x8'));var jayson=require(_0xe9f0('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3a17b3,_0x167198,_0xe64a79){return new BPromise(function(_0x4be6a6,_0xf4a256){return client[_0xe9f0('0xa')](_0x3a17b3,_0xe64a79)[_0xe9f0('0xb')](function(_0x3386a8){logger[_0xe9f0('0xc')](_0xe9f0('0xd'),_0x167198,_0xe9f0('0xe'));logger[_0xe9f0('0xf')](_0xe9f0('0x10'),_0x167198,'request\x20sent',JSON[_0xe9f0('0x11')](_0x3386a8));if(_0x3386a8[_0xe9f0('0x12')]){if(_0x3386a8[_0xe9f0('0x12')]['code']===0x1f4){logger[_0xe9f0('0x12')]('Integration,\x20%s,\x20%s',_0x167198,_0x3386a8[_0xe9f0('0x12')][_0xe9f0('0x13')]);return _0xf4a256(_0x3386a8[_0xe9f0('0x12')][_0xe9f0('0x13')]);}logger['error'](_0xe9f0('0xd'),_0x167198,_0x3386a8['error'][_0xe9f0('0x13')]);return _0x4be6a6(_0x3386a8[_0xe9f0('0x12')][_0xe9f0('0x13')]);}else{logger['info'](_0xe9f0('0xd'),_0x167198,_0xe9f0('0xe'));_0x4be6a6(_0x3386a8[_0xe9f0('0x14')]['message']);}})[_0xe9f0('0x15')](function(_0x1e16e0){logger[_0xe9f0('0x12')](_0xe9f0('0xd'),_0x167198,_0x1e16e0);_0xf4a256(_0x1e16e0);});});}
\ No newline at end of file
+var _0x6d38=['request','then','Integration,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','result','util','moment','bluebird','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http'];(function(_0x263b14,_0x2391ad){var _0x434143=function(_0x231681){while(--_0x231681){_0x263b14['push'](_0x263b14['shift']());}};_0x434143(++_0x2391ad);}(_0x6d38,0x1ef));var _0x86d3=function(_0xefd519,_0xc62635){_0xefd519=_0xefd519-0x0;var _0x4bb882=_0x6d38[_0xefd519];return _0x4bb882;};'use strict';var _=require('lodash');var util=require(_0x86d3('0x0'));var moment=require(_0x86d3('0x1'));var BPromise=require(_0x86d3('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0x86d3('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x86d3('0x4'))(_0x86d3('0x5'));var config=require(_0x86d3('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x86d3('0x7')][_0x86d3('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x33d4aa,_0x2eaa15,_0x47e654){return new BPromise(function(_0x552b07,_0x2aea31){return client[_0x86d3('0x9')](_0x33d4aa,_0x47e654)[_0x86d3('0xa')](function(_0x499640){logger['info'](_0x86d3('0xb'),_0x2eaa15,_0x86d3('0xc'));logger['debug']('Integration,\x20%s,\x20%s,\x20%s',_0x2eaa15,_0x86d3('0xc'),JSON[_0x86d3('0xd')](_0x499640));if(_0x499640['error']){if(_0x499640[_0x86d3('0xe')]['code']===0x1f4){logger[_0x86d3('0xe')](_0x86d3('0xb'),_0x2eaa15,_0x499640[_0x86d3('0xe')][_0x86d3('0xf')]);return _0x2aea31(_0x499640[_0x86d3('0xe')][_0x86d3('0xf')]);}logger[_0x86d3('0xe')](_0x86d3('0xb'),_0x2eaa15,_0x499640['error'][_0x86d3('0xf')]);return _0x552b07(_0x499640[_0x86d3('0xe')][_0x86d3('0xf')]);}else{logger[_0x86d3('0x10')](_0x86d3('0xb'),_0x2eaa15,_0x86d3('0xc'));_0x552b07(_0x499640[_0x86d3('0x11')][_0x86d3('0xf')]);}})['catch'](function(_0x2d5ba9){logger[_0x86d3('0xe')](_0x86d3('0xb'),_0x2eaa15,_0x2d5ba9);_0x2aea31(_0x2d5ba9);});});}
\ No newline at end of file
index 4a9fdcf..9dc7365 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xba34=['exports','multer','util','path','connect-timeout','express','../../components/interaction/service','../../config/environment','./integrationReport.controller','get','isAuthenticated','index','describe','/:id','show','post','create','put','update','delete'];(function(_0x28ada7,_0x37256e){var _0x53c1c0=function(_0x385b37){while(--_0x385b37){_0x28ada7['push'](_0x28ada7['shift']());}};_0x53c1c0(++_0x37256e);}(_0xba34,0x119));var _0x4ba3=function(_0x102306,_0x26e4ed){_0x102306=_0x102306-0x0;var _0x46c62b=_0xba34[_0x102306];return _0x46c62b;};'use strict';var multer=require(_0x4ba3('0x0'));var util=require(_0x4ba3('0x1'));var path=require(_0x4ba3('0x2'));var timeout=require(_0x4ba3('0x3'));var express=require(_0x4ba3('0x4'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x4ba3('0x5'));var config=require(_0x4ba3('0x6'));var controller=require(_0x4ba3('0x7'));router[_0x4ba3('0x8')]('/',auth[_0x4ba3('0x9')](),controller[_0x4ba3('0xa')]);router[_0x4ba3('0x8')]('/describe',auth[_0x4ba3('0x9')](),controller[_0x4ba3('0xb')]);router[_0x4ba3('0x8')](_0x4ba3('0xc'),auth[_0x4ba3('0x9')](),controller[_0x4ba3('0xd')]);router[_0x4ba3('0xe')]('/',auth[_0x4ba3('0x9')](),controller[_0x4ba3('0xf')]);router[_0x4ba3('0x10')](_0x4ba3('0xc'),auth['isAuthenticated'](),controller[_0x4ba3('0x11')]);router[_0x4ba3('0x12')]('/:id',auth[_0x4ba3('0x9')](),controller['destroy']);module[_0x4ba3('0x13')]=router;
\ No newline at end of file
+var _0xe2fe=['describe','/:id','post','update','destroy','exports','multer','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/describe'];(function(_0x460150,_0x232949){var _0x340677=function(_0x5b7e32){while(--_0x5b7e32){_0x460150['push'](_0x460150['shift']());}};_0x340677(++_0x232949);}(_0xe2fe,0x86));var _0xee2f=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xe2fe[_0x14add3];return _0x4a174f;};'use strict';var multer=require(_0xee2f('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xee2f('0x1'));var express=require('express');var router=express[_0xee2f('0x2')]();var fs_extra=require(_0xee2f('0x3'));var auth=require(_0xee2f('0x4'));var interaction=require(_0xee2f('0x5'));var config=require(_0xee2f('0x6'));var controller=require('./integrationReport.controller');router[_0xee2f('0x7')]('/',auth[_0xee2f('0x8')](),controller['index']);router[_0xee2f('0x7')](_0xee2f('0x9'),auth['isAuthenticated'](),controller[_0xee2f('0xa')]);router['get'](_0xee2f('0xb'),auth[_0xee2f('0x8')](),controller['show']);router[_0xee2f('0xc')]('/',auth[_0xee2f('0x8')](),controller['create']);router['put']('/:id',auth['isAuthenticated'](),controller[_0xee2f('0xd')]);router['delete']('/:id',auth['isAuthenticated'](),controller[_0xee2f('0xe')]);module[_0xee2f('0xf')]=router;
\ No newline at end of file
index e924f25..08431d2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1415=['STRING','INTEGER','DATE','BOOLEAN','TEXT','ENUM','SENT','SENDING','RECEIVED','FAILED','sequelize'];(function(_0x5cb608,_0x315164){var _0x2e8363=function(_0x1cf8d9){while(--_0x1cf8d9){_0x5cb608['push'](_0x5cb608['shift']());}};_0x2e8363(++_0x315164);}(_0x1415,0x78));var _0x5141=function(_0x41fb9c,_0x4e3b60){_0x41fb9c=_0x41fb9c-0x0;var _0x46099b=_0x1415[_0x41fb9c];return _0x46099b;};'use strict';var Sequelize=require(_0x5141('0x0'));module['exports']={'integration':{'type':Sequelize[_0x5141('0x1')]},'eventChannel':{'type':Sequelize[_0x5141('0x1')]},'exitStatus':{'type':Sequelize[_0x5141('0x1')]},'ticketId':{'type':Sequelize['STRING']},'integrationId':{'type':Sequelize[_0x5141('0x2')]},'contacts':{'type':Sequelize[_0x5141('0x1')]},'uniqueid':{'type':Sequelize[_0x5141('0x1')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x5141('0x1')]},'queue':{'type':Sequelize[_0x5141('0x1')]},'interface':{'type':Sequelize[_0x5141('0x1')]},'membername':{'type':Sequelize[_0x5141('0x1')]},'agentcalledAt':{'type':Sequelize[_0x5141('0x3')]},'agentconnectAt':{'type':Sequelize[_0x5141('0x3')]},'holdtime':{'type':Sequelize[_0x5141('0x2')]},'agentcomplete':{'type':Sequelize[_0x5141('0x4')],'defaultValue':![]},'agentcompleteAt':{'type':Sequelize[_0x5141('0x3')]},'talktime':{'type':Sequelize[_0x5141('0x2')]},'agentacw':{'type':Sequelize[_0x5141('0x4')],'defaultValue':![]},'acwtime':{'type':Sequelize[_0x5141('0x2')]},'reason':{'type':Sequelize[_0x5141('0x1')]},'agentringnoanswer':{'type':Sequelize[_0x5141('0x4')],'defaultValue':![]},'agentringnoanswerAt':{'type':Sequelize[_0x5141('0x3')]},'agentdump':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentdumpAt':{'type':Sequelize[_0x5141('0x3')]},'lastevent':{'type':Sequelize[_0x5141('0x1')]},'channel':{'type':Sequelize[_0x5141('0x1')]},'channelstate':{'type':Sequelize[_0x5141('0x2')]},'channelstatedesc':{'type':Sequelize[_0x5141('0x1')]},'connectedlinenum':{'type':Sequelize[_0x5141('0x1')]},'connectedlinename':{'type':Sequelize[_0x5141('0x1')]},'language':{'type':Sequelize[_0x5141('0x1')]},'accountcode':{'type':Sequelize['STRING']},'context':{'type':Sequelize[_0x5141('0x1')]},'exten':{'type':Sequelize[_0x5141('0x1')]},'priority':{'type':Sequelize[_0x5141('0x1')]},'destchannel':{'type':Sequelize[_0x5141('0x1')]},'destchannelstate':{'type':Sequelize[_0x5141('0x2')]},'destchannelstatedesc':{'type':Sequelize[_0x5141('0x1')]},'destcalleridnum':{'type':Sequelize[_0x5141('0x1')]},'destcalleridname':{'type':Sequelize[_0x5141('0x1')]},'destconnectedlinenum':{'type':Sequelize[_0x5141('0x1')]},'destconnectedlinename':{'type':Sequelize[_0x5141('0x1')]},'destlanguage':{'type':Sequelize[_0x5141('0x1')]},'destaccountcode':{'type':Sequelize[_0x5141('0x1')]},'destcontext':{'type':Sequelize[_0x5141('0x1')]},'destexten':{'type':Sequelize[_0x5141('0x1')]},'destpriority':{'type':Sequelize[_0x5141('0x1')]},'destuniqueid':{'type':Sequelize[_0x5141('0x1')]},'messageId':{'type':Sequelize[_0x5141('0x1')]},'inReplyTo':{'type':Sequelize[_0x5141('0x1')]},'subject':{'type':Sequelize[_0x5141('0x1')]},'from':{'type':Sequelize[_0x5141('0x1')]},'to':{'type':Sequelize['STRING']},'cc':{'type':Sequelize[_0x5141('0x1')]},'attachment':{'type':Sequelize[_0x5141('0x5')]},'html':{'type':Sequelize[_0x5141('0x5')]},'text':{'type':Sequelize[_0x5141('0x5')]},'status':{'type':Sequelize[_0x5141('0x6')](_0x5141('0x7'),_0x5141('0x8'),_0x5141('0x9'),_0x5141('0xa'))},'url':{'type':Sequelize[_0x5141('0x1')]},'app':{'type':Sequelize[_0x5141('0x1')]},'appdata':{'type':Sequelize[_0x5141('0x1')]},'projectId':{'type':Sequelize[_0x5141('0x2')]}};
\ No newline at end of file
+var _0xdebf=['SENT','sequelize','exports','STRING','DATE','INTEGER','BOOLEAN','TEXT','ENUM'];(function(_0x48a0e9,_0x22b8ab){var _0x563cd2=function(_0x5bf97a){while(--_0x5bf97a){_0x48a0e9['push'](_0x48a0e9['shift']());}};_0x563cd2(++_0x22b8ab);}(_0xdebf,0x172));var _0xfdeb=function(_0x3054be,_0x1bdc8b){_0x3054be=_0x3054be-0x0;var _0x3df150=_0xdebf[_0x3054be];return _0x3df150;};'use strict';var Sequelize=require(_0xfdeb('0x0'));module[_0xfdeb('0x1')]={'integration':{'type':Sequelize[_0xfdeb('0x2')]},'eventChannel':{'type':Sequelize['STRING']},'exitStatus':{'type':Sequelize['STRING']},'ticketId':{'type':Sequelize[_0xfdeb('0x2')]},'integrationId':{'type':Sequelize['INTEGER']},'contacts':{'type':Sequelize[_0xfdeb('0x2')]},'uniqueid':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0xfdeb('0x2')]},'interface':{'type':Sequelize[_0xfdeb('0x2')]},'membername':{'type':Sequelize[_0xfdeb('0x2')]},'agentcalledAt':{'type':Sequelize[_0xfdeb('0x3')]},'agentconnectAt':{'type':Sequelize[_0xfdeb('0x3')]},'holdtime':{'type':Sequelize[_0xfdeb('0x4')]},'agentcomplete':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentcompleteAt':{'type':Sequelize[_0xfdeb('0x3')]},'talktime':{'type':Sequelize[_0xfdeb('0x4')]},'agentacw':{'type':Sequelize[_0xfdeb('0x5')],'defaultValue':![]},'acwtime':{'type':Sequelize[_0xfdeb('0x4')]},'reason':{'type':Sequelize[_0xfdeb('0x2')]},'agentringnoanswer':{'type':Sequelize[_0xfdeb('0x5')],'defaultValue':![]},'agentringnoanswerAt':{'type':Sequelize['DATE']},'agentdump':{'type':Sequelize[_0xfdeb('0x5')],'defaultValue':![]},'agentdumpAt':{'type':Sequelize[_0xfdeb('0x3')]},'lastevent':{'type':Sequelize[_0xfdeb('0x2')]},'channel':{'type':Sequelize[_0xfdeb('0x2')]},'channelstate':{'type':Sequelize['INTEGER']},'channelstatedesc':{'type':Sequelize[_0xfdeb('0x2')]},'connectedlinenum':{'type':Sequelize[_0xfdeb('0x2')]},'connectedlinename':{'type':Sequelize[_0xfdeb('0x2')]},'language':{'type':Sequelize[_0xfdeb('0x2')]},'accountcode':{'type':Sequelize[_0xfdeb('0x2')]},'context':{'type':Sequelize[_0xfdeb('0x2')]},'exten':{'type':Sequelize[_0xfdeb('0x2')]},'priority':{'type':Sequelize[_0xfdeb('0x2')]},'destchannel':{'type':Sequelize['STRING']},'destchannelstate':{'type':Sequelize[_0xfdeb('0x4')]},'destchannelstatedesc':{'type':Sequelize[_0xfdeb('0x2')]},'destcalleridnum':{'type':Sequelize[_0xfdeb('0x2')]},'destcalleridname':{'type':Sequelize[_0xfdeb('0x2')]},'destconnectedlinenum':{'type':Sequelize[_0xfdeb('0x2')]},'destconnectedlinename':{'type':Sequelize['STRING']},'destlanguage':{'type':Sequelize[_0xfdeb('0x2')]},'destaccountcode':{'type':Sequelize[_0xfdeb('0x2')]},'destcontext':{'type':Sequelize[_0xfdeb('0x2')]},'destexten':{'type':Sequelize[_0xfdeb('0x2')]},'destpriority':{'type':Sequelize[_0xfdeb('0x2')]},'destuniqueid':{'type':Sequelize[_0xfdeb('0x2')]},'messageId':{'type':Sequelize['STRING']},'inReplyTo':{'type':Sequelize[_0xfdeb('0x2')]},'subject':{'type':Sequelize['STRING']},'from':{'type':Sequelize[_0xfdeb('0x2')]},'to':{'type':Sequelize[_0xfdeb('0x2')]},'cc':{'type':Sequelize['STRING']},'attachment':{'type':Sequelize[_0xfdeb('0x6')]},'html':{'type':Sequelize[_0xfdeb('0x6')]},'text':{'type':Sequelize[_0xfdeb('0x6')]},'status':{'type':Sequelize[_0xfdeb('0x7')](_0xfdeb('0x8'),'SENDING','RECEIVED','FAILED')},'url':{'type':Sequelize[_0xfdeb('0x2')]},'app':{'type':Sequelize[_0xfdeb('0x2')]},'appdata':{'type':Sequelize[_0xfdeb('0x2')]},'projectId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
index a4f40ed..2b94f96 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xefa1=['limit','set','Content-Range','apply','save','update','then','error','name','send','index','map','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','merge','type','VIRTUAL','filter','options','IntegrationReport','includeAll','include','rows','catch','show','params','find','create','body','destroy','describe','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0xefa1,0x15d));var _0x1efa=function(_0x183eee,_0x1c0246){_0x183eee=_0x183eee-0x0;var _0x247399=_0xefa1[_0x183eee];return _0x247399;};'use strict';var emlformat=require(_0x1efa('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x1efa('0x1'));var jsonpatch=require(_0x1efa('0x2'));var rp=require('request-promise');var moment=require(_0x1efa('0x3'));var BPromise=require(_0x1efa('0x4'));var Mustache=require(_0x1efa('0x5'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x1efa('0x6'));var ejs=require(_0x1efa('0x7'));var fs=require('fs');var fs_extra=require(_0x1efa('0x8'));var _=require(_0x1efa('0x9'));var squel=require(_0x1efa('0xa'));var crypto=require(_0x1efa('0xb'));var jsforce=require(_0x1efa('0xc'));var deskjs=require(_0x1efa('0xd'));var toCsv=require(_0x1efa('0x6'));var querystring=require(_0x1efa('0xe'));var Papa=require(_0x1efa('0xf'));var Redis=require(_0x1efa('0x10'));var authService=require(_0x1efa('0x11'));var qs=require(_0x1efa('0x12'));var as=require(_0x1efa('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x1efa('0x14'))('api');var utils=require(_0x1efa('0x15'));var config=require(_0x1efa('0x16'));var licenseUtil=require(_0x1efa('0x17'));var db=require(_0x1efa('0x18'))['db'];function respondWithStatusCode(_0x4a18fd,_0x5f0bf5){_0x5f0bf5=_0x5f0bf5||0xcc;return function(_0x10a0b9){if(_0x10a0b9){return _0x4a18fd[_0x1efa('0x19')](_0x5f0bf5);}return _0x4a18fd[_0x1efa('0x1a')](_0x5f0bf5)[_0x1efa('0x1b')]();};}function respondWithResult(_0x7fa10a,_0x206763){_0x206763=_0x206763||0xc8;return function(_0x32cf57){if(_0x32cf57){return _0x7fa10a['status'](_0x206763)[_0x1efa('0x1c')](_0x32cf57);}};}function respondWithFilteredResult(_0x3a2875,_0x542781){return function(_0x372f58){if(_0x372f58){var _0x2a8a9b=typeof _0x542781[_0x1efa('0x1d')]===_0x1efa('0x1e')&&typeof _0x542781[_0x1efa('0x1f')]===_0x1efa('0x1e');var _0x41cf89=_0x372f58['count'];var _0x451c19=_0x2a8a9b?0x0:_0x542781['offset'];var _0x429498=_0x2a8a9b?_0x372f58['count']:_0x542781[_0x1efa('0x1d')]+_0x542781['limit'];var _0x2b42f3;if(_0x429498>=_0x41cf89){_0x429498=_0x41cf89;_0x2b42f3=0xc8;}else{_0x2b42f3=0xce;}_0x3a2875[_0x1efa('0x1a')](_0x2b42f3);return _0x3a2875[_0x1efa('0x20')](_0x1efa('0x21'),_0x451c19+'-'+_0x429498+'/'+_0x41cf89)[_0x1efa('0x1c')](_0x372f58);}return null;};}function patchUpdates(_0x202420){return function(_0x38fd7b){try{jsonpatch[_0x1efa('0x22')](_0x38fd7b,_0x202420,!![]);}catch(_0x416e0c){return BPromise['reject'](_0x416e0c);}return _0x38fd7b[_0x1efa('0x23')]();};}function saveUpdates(_0x157775,_0x468e51){return function(_0xee370a){if(_0xee370a){return _0xee370a[_0x1efa('0x24')](_0x157775)[_0x1efa('0x25')](function(_0x515666){return _0x515666;});}return null;};}function removeEntity(_0x57a1f9,_0x24bd4c){return function(_0x14063c){if(_0x14063c){return _0x14063c['destroy']()[_0x1efa('0x25')](function(){_0x57a1f9['status'](0xcc)[_0x1efa('0x1b')]();});}};}function handleEntityNotFound(_0x50b5a7,_0x52b95a){return function(_0x2ea1c9){if(!_0x2ea1c9){_0x50b5a7[_0x1efa('0x19')](0x194);}return _0x2ea1c9;};}function handleError(_0x7ef38c,_0x3a2a93){_0x3a2a93=_0x3a2a93||0x1f4;return function(_0x595de0){logger[_0x1efa('0x26')](_0x595de0['stack']);if(_0x595de0[_0x1efa('0x27')]){delete _0x595de0[_0x1efa('0x27')];}_0x7ef38c['status'](_0x3a2a93)[_0x1efa('0x28')](_0x595de0);};}exports[_0x1efa('0x29')]=function(_0x596736,_0x1a54cb){var _0x257d9d={},_0xe12b7c={},_0x1f4f82={'count':0x0,'rows':[]};var _0x2d1b26=_[_0x1efa('0x2a')](db['IntegrationReport'][_0x1efa('0x2b')],function(_0x388ec0){return{'name':_0x388ec0[_0x1efa('0x2c')],'type':_0x388ec0['type'][_0x1efa('0x2d')]};});_0xe12b7c[_0x1efa('0x2e')]=_[_0x1efa('0x2a')](_0x2d1b26,_0x1efa('0x27'));_0xe12b7c[_0x1efa('0x2f')]=_[_0x1efa('0x30')](_0x596736[_0x1efa('0x2f')]);_0xe12b7c[_0x1efa('0x31')]=_[_0x1efa('0x32')](_0xe12b7c[_0x1efa('0x2e')],_0xe12b7c[_0x1efa('0x2f')]);_0x257d9d[_0x1efa('0x33')]=_[_0x1efa('0x32')](_0xe12b7c[_0x1efa('0x2e')],qs['fields'](_0x596736['query'][_0x1efa('0x34')]));_0x257d9d[_0x1efa('0x33')]=_0x257d9d[_0x1efa('0x33')][_0x1efa('0x35')]?_0x257d9d[_0x1efa('0x33')]:_0xe12b7c[_0x1efa('0x2e')];if(!_0x596736[_0x1efa('0x2f')][_0x1efa('0x36')](_0x1efa('0x37'))){_0x257d9d[_0x1efa('0x1f')]=qs[_0x1efa('0x1f')](_0x596736['query']['limit']);_0x257d9d['offset']=qs[_0x1efa('0x1d')](_0x596736[_0x1efa('0x2f')][_0x1efa('0x1d')]);}_0x257d9d['order']=qs[_0x1efa('0x38')](_0x596736[_0x1efa('0x2f')]['sort']);_0x257d9d[_0x1efa('0x39')]=qs[_0x1efa('0x31')](_[_0x1efa('0x3a')](_0x596736[_0x1efa('0x2f')],_0xe12b7c[_0x1efa('0x31')]),_0x2d1b26);if(_0x596736[_0x1efa('0x2f')]['filter']){_0x257d9d[_0x1efa('0x39')]=_[_0x1efa('0x3b')](_0x257d9d['where'],{'$or':_[_0x1efa('0x2a')](_0x2d1b26,function(_0x2a53c8){if(_0x2a53c8[_0x1efa('0x3c')]!==_0x1efa('0x3d')){var _0x49c13e={};_0x49c13e[_0x2a53c8[_0x1efa('0x27')]]={'$like':'%'+_0x596736[_0x1efa('0x2f')][_0x1efa('0x3e')]+'%'};return _0x49c13e;}})});}_0x257d9d=_['merge']({},_0x257d9d,_0x596736[_0x1efa('0x3f')]);var _0x5393b8={'where':_0x257d9d[_0x1efa('0x39')]};return db[_0x1efa('0x40')]['count'](_0x5393b8)[_0x1efa('0x25')](function(_0x2af2ca){_0x1f4f82['count']=_0x2af2ca;if(_0x596736['query'][_0x1efa('0x41')]){_0x257d9d[_0x1efa('0x42')]=[{'all':!![]}];}return db[_0x1efa('0x40')]['findAll'](_0x257d9d);})[_0x1efa('0x25')](function(_0x18b87d){_0x1f4f82[_0x1efa('0x43')]=_0x18b87d;return _0x1f4f82;})[_0x1efa('0x25')](respondWithFilteredResult(_0x1a54cb,_0x257d9d))[_0x1efa('0x44')](handleError(_0x1a54cb,null));};exports[_0x1efa('0x45')]=function(_0x86af38,_0x4f3811){var _0x8117d2={'raw':![],'where':{'id':_0x86af38[_0x1efa('0x46')]['id']}},_0x2758ed={};_0x2758ed['model']=_[_0x1efa('0x30')](db[_0x1efa('0x40')][_0x1efa('0x2b')]);_0x2758ed['query']=_[_0x1efa('0x30')](_0x86af38['query']);_0x2758ed[_0x1efa('0x31')]=_['intersection'](_0x2758ed['model'],_0x2758ed[_0x1efa('0x2f')]);_0x8117d2[_0x1efa('0x33')]=_['intersection'](_0x2758ed[_0x1efa('0x2e')],qs[_0x1efa('0x34')](_0x86af38[_0x1efa('0x2f')][_0x1efa('0x34')]));_0x8117d2[_0x1efa('0x33')]=_0x8117d2[_0x1efa('0x33')][_0x1efa('0x35')]?_0x8117d2[_0x1efa('0x33')]:_0x2758ed['model'];if(_0x86af38[_0x1efa('0x2f')][_0x1efa('0x41')]){_0x8117d2[_0x1efa('0x42')]=[{'all':!![]}];}_0x8117d2=_[_0x1efa('0x3b')]({},_0x8117d2,_0x86af38['options']);return db['IntegrationReport'][_0x1efa('0x47')](_0x8117d2)[_0x1efa('0x25')](handleEntityNotFound(_0x4f3811,null))[_0x1efa('0x25')](respondWithResult(_0x4f3811,null))[_0x1efa('0x44')](handleError(_0x4f3811,null));};exports[_0x1efa('0x48')]=function(_0x4f8770,_0x7446f5){return db[_0x1efa('0x40')][_0x1efa('0x48')](_0x4f8770[_0x1efa('0x49')],{})[_0x1efa('0x25')](respondWithResult(_0x7446f5,0xc9))[_0x1efa('0x44')](handleError(_0x7446f5,null));};exports[_0x1efa('0x24')]=function(_0x187dea,_0x379452){if(_0x187dea[_0x1efa('0x49')]['id']){delete _0x187dea[_0x1efa('0x49')]['id'];}return db[_0x1efa('0x40')]['find']({'where':{'id':_0x187dea[_0x1efa('0x46')]['id']}})[_0x1efa('0x25')](handleEntityNotFound(_0x379452,null))[_0x1efa('0x25')](saveUpdates(_0x187dea['body'],null))[_0x1efa('0x25')](respondWithResult(_0x379452,null))['catch'](handleError(_0x379452,null));};exports[_0x1efa('0x4a')]=function(_0x224e1b,_0xc1327d){return db[_0x1efa('0x40')][_0x1efa('0x47')]({'where':{'id':_0x224e1b[_0x1efa('0x46')]['id']}})[_0x1efa('0x25')](handleEntityNotFound(_0xc1327d,null))[_0x1efa('0x25')](removeEntity(_0xc1327d,null))[_0x1efa('0x44')](handleError(_0xc1327d,null));};exports[_0x1efa('0x4b')]=function(_0x5266ed,_0xd5bf2d){return db[_0x1efa('0x40')][_0x1efa('0x4b')]()[_0x1efa('0x25')](respondWithResult(_0xd5bf2d,null))[_0x1efa('0x44')](handleError(_0xd5bf2d,null));};
\ No newline at end of file
+var _0x7ec5=['keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filter','where','merge','options','includeAll','include','findAll','catch','show','params','create','body','update','destroy','find','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','ejs','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','../../mysqldb','sendStatus','status','end','json','offset','limit','undefined','count','set','Content-Range','save','then','error','stack','name','send','map','IntegrationReport','rawAttributes','fieldName','key','model','query'];(function(_0x1085a7,_0x4dbdb0){var _0x5052ad=function(_0x5df828){while(--_0x5df828){_0x1085a7['push'](_0x1085a7['shift']());}};_0x5052ad(++_0x4dbdb0);}(_0x7ec5,0xfb));var _0x57ec=function(_0x403e7f,_0x4912f0){_0x403e7f=_0x403e7f-0x0;var _0x18eef0=_0x7ec5[_0x403e7f];return _0x18eef0;};'use strict';var emlformat=require(_0x57ec('0x0'));var rimraf=require(_0x57ec('0x1'));var zipdir=require(_0x57ec('0x2'));var jsonpatch=require(_0x57ec('0x3'));var rp=require(_0x57ec('0x4'));var moment=require(_0x57ec('0x5'));var BPromise=require(_0x57ec('0x6'));var Mustache=require(_0x57ec('0x7'));var util=require(_0x57ec('0x8'));var path=require('path');var sox=require('sox');var csv=require(_0x57ec('0x9'));var ejs=require(_0x57ec('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x57ec('0xb'));var squel=require(_0x57ec('0xc'));var crypto=require(_0x57ec('0xd'));var jsforce=require(_0x57ec('0xe'));var deskjs=require(_0x57ec('0xf'));var toCsv=require('to-csv');var querystring=require(_0x57ec('0x10'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x57ec('0x11'));var qs=require(_0x57ec('0x12'));var as=require(_0x57ec('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x57ec('0x14'))(_0x57ec('0x15'));var utils=require(_0x57ec('0x16'));var config=require(_0x57ec('0x17'));var licenseUtil=require(_0x57ec('0x18'));var db=require(_0x57ec('0x19'))['db'];function respondWithStatusCode(_0x625fb0,_0x1f664b){_0x1f664b=_0x1f664b||0xcc;return function(_0x4008aa){if(_0x4008aa){return _0x625fb0[_0x57ec('0x1a')](_0x1f664b);}return _0x625fb0[_0x57ec('0x1b')](_0x1f664b)[_0x57ec('0x1c')]();};}function respondWithResult(_0x359932,_0x276c81){_0x276c81=_0x276c81||0xc8;return function(_0x2deeb2){if(_0x2deeb2){return _0x359932[_0x57ec('0x1b')](_0x276c81)[_0x57ec('0x1d')](_0x2deeb2);}};}function respondWithFilteredResult(_0x1045fb,_0x53c5d9){return function(_0x118b48){if(_0x118b48){var _0x41364a=typeof _0x53c5d9[_0x57ec('0x1e')]==='undefined'&&typeof _0x53c5d9[_0x57ec('0x1f')]===_0x57ec('0x20');var _0x36ef7d=_0x118b48[_0x57ec('0x21')];var _0x471c14=_0x41364a?0x0:_0x53c5d9[_0x57ec('0x1e')];var _0x4a6c1b=_0x41364a?_0x118b48['count']:_0x53c5d9[_0x57ec('0x1e')]+_0x53c5d9['limit'];var _0x3da338;if(_0x4a6c1b>=_0x36ef7d){_0x4a6c1b=_0x36ef7d;_0x3da338=0xc8;}else{_0x3da338=0xce;}_0x1045fb[_0x57ec('0x1b')](_0x3da338);return _0x1045fb[_0x57ec('0x22')](_0x57ec('0x23'),_0x471c14+'-'+_0x4a6c1b+'/'+_0x36ef7d)[_0x57ec('0x1d')](_0x118b48);}return null;};}function patchUpdates(_0xb6e879){return function(_0x4f7542){try{jsonpatch['apply'](_0x4f7542,_0xb6e879,!![]);}catch(_0x29805c){return BPromise['reject'](_0x29805c);}return _0x4f7542[_0x57ec('0x24')]();};}function saveUpdates(_0x58f4dd,_0x73e19e){return function(_0x1b4a9c){if(_0x1b4a9c){return _0x1b4a9c['update'](_0x58f4dd)[_0x57ec('0x25')](function(_0x329c5d){return _0x329c5d;});}return null;};}function removeEntity(_0x5222d3,_0x219f20){return function(_0x43825c){if(_0x43825c){return _0x43825c['destroy']()['then'](function(){_0x5222d3[_0x57ec('0x1b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x42540b,_0x745e9f){return function(_0x805052){if(!_0x805052){_0x42540b['sendStatus'](0x194);}return _0x805052;};}function handleError(_0x5af4d6,_0x151cea){_0x151cea=_0x151cea||0x1f4;return function(_0x37270a){logger[_0x57ec('0x26')](_0x37270a[_0x57ec('0x27')]);if(_0x37270a[_0x57ec('0x28')]){delete _0x37270a[_0x57ec('0x28')];}_0x5af4d6['status'](_0x151cea)[_0x57ec('0x29')](_0x37270a);};}exports['index']=function(_0xa57643,_0x6bcd66){var _0x3566b4={},_0x2c1c8a={},_0x422f0c={'count':0x0,'rows':[]};var _0x883d7c=_[_0x57ec('0x2a')](db[_0x57ec('0x2b')][_0x57ec('0x2c')],function(_0x4b68fc){return{'name':_0x4b68fc[_0x57ec('0x2d')],'type':_0x4b68fc['type'][_0x57ec('0x2e')]};});_0x2c1c8a[_0x57ec('0x2f')]=_[_0x57ec('0x2a')](_0x883d7c,'name');_0x2c1c8a[_0x57ec('0x30')]=_[_0x57ec('0x31')](_0xa57643['query']);_0x2c1c8a[_0x57ec('0x32')]=_[_0x57ec('0x33')](_0x2c1c8a[_0x57ec('0x2f')],_0x2c1c8a[_0x57ec('0x30')]);_0x3566b4[_0x57ec('0x34')]=_[_0x57ec('0x33')](_0x2c1c8a['model'],qs[_0x57ec('0x35')](_0xa57643[_0x57ec('0x30')][_0x57ec('0x35')]));_0x3566b4[_0x57ec('0x34')]=_0x3566b4['attributes'][_0x57ec('0x36')]?_0x3566b4[_0x57ec('0x34')]:_0x2c1c8a['model'];if(!_0xa57643[_0x57ec('0x30')][_0x57ec('0x37')](_0x57ec('0x38'))){_0x3566b4[_0x57ec('0x1f')]=qs[_0x57ec('0x1f')](_0xa57643[_0x57ec('0x30')][_0x57ec('0x1f')]);_0x3566b4[_0x57ec('0x1e')]=qs['offset'](_0xa57643['query'][_0x57ec('0x1e')]);}_0x3566b4[_0x57ec('0x39')]=qs['sort'](_0xa57643[_0x57ec('0x30')][_0x57ec('0x3a')]);_0x3566b4['where']=qs[_0x57ec('0x32')](_['pick'](_0xa57643[_0x57ec('0x30')],_0x2c1c8a[_0x57ec('0x32')]),_0x883d7c);if(_0xa57643[_0x57ec('0x30')][_0x57ec('0x3b')]){_0x3566b4[_0x57ec('0x3c')]=_[_0x57ec('0x3d')](_0x3566b4['where'],{'$or':_[_0x57ec('0x2a')](_0x883d7c,function(_0x2a5613){if(_0x2a5613['type']!=='VIRTUAL'){var _0x4c60d8={};_0x4c60d8[_0x2a5613[_0x57ec('0x28')]]={'$like':'%'+_0xa57643[_0x57ec('0x30')][_0x57ec('0x3b')]+'%'};return _0x4c60d8;}})});}_0x3566b4=_[_0x57ec('0x3d')]({},_0x3566b4,_0xa57643[_0x57ec('0x3e')]);var _0x283f2e={'where':_0x3566b4[_0x57ec('0x3c')]};return db[_0x57ec('0x2b')][_0x57ec('0x21')](_0x283f2e)[_0x57ec('0x25')](function(_0x3b9a3d){_0x422f0c['count']=_0x3b9a3d;if(_0xa57643['query'][_0x57ec('0x3f')]){_0x3566b4[_0x57ec('0x40')]=[{'all':!![]}];}return db[_0x57ec('0x2b')][_0x57ec('0x41')](_0x3566b4);})[_0x57ec('0x25')](function(_0xc05fef){_0x422f0c['rows']=_0xc05fef;return _0x422f0c;})[_0x57ec('0x25')](respondWithFilteredResult(_0x6bcd66,_0x3566b4))[_0x57ec('0x42')](handleError(_0x6bcd66,null));};exports[_0x57ec('0x43')]=function(_0xb653fc,_0x475cdf){var _0x582f85={'raw':![],'where':{'id':_0xb653fc[_0x57ec('0x44')]['id']}},_0xfdd9c1={};_0xfdd9c1[_0x57ec('0x2f')]=_['keys'](db[_0x57ec('0x2b')][_0x57ec('0x2c')]);_0xfdd9c1[_0x57ec('0x30')]=_[_0x57ec('0x31')](_0xb653fc[_0x57ec('0x30')]);_0xfdd9c1[_0x57ec('0x32')]=_[_0x57ec('0x33')](_0xfdd9c1['model'],_0xfdd9c1['query']);_0x582f85['attributes']=_[_0x57ec('0x33')](_0xfdd9c1[_0x57ec('0x2f')],qs[_0x57ec('0x35')](_0xb653fc[_0x57ec('0x30')][_0x57ec('0x35')]));_0x582f85['attributes']=_0x582f85[_0x57ec('0x34')]['length']?_0x582f85['attributes']:_0xfdd9c1[_0x57ec('0x2f')];if(_0xb653fc['query']['includeAll']){_0x582f85['include']=[{'all':!![]}];}_0x582f85=_[_0x57ec('0x3d')]({},_0x582f85,_0xb653fc[_0x57ec('0x3e')]);return db[_0x57ec('0x2b')]['find'](_0x582f85)[_0x57ec('0x25')](handleEntityNotFound(_0x475cdf,null))[_0x57ec('0x25')](respondWithResult(_0x475cdf,null))[_0x57ec('0x42')](handleError(_0x475cdf,null));};exports['create']=function(_0x1cb4d1,_0x14d18d){return db[_0x57ec('0x2b')][_0x57ec('0x45')](_0x1cb4d1[_0x57ec('0x46')],{})[_0x57ec('0x25')](respondWithResult(_0x14d18d,0xc9))[_0x57ec('0x42')](handleError(_0x14d18d,null));};exports[_0x57ec('0x47')]=function(_0x324c00,_0x48d8d1){if(_0x324c00[_0x57ec('0x46')]['id']){delete _0x324c00[_0x57ec('0x46')]['id'];}return db['IntegrationReport']['find']({'where':{'id':_0x324c00[_0x57ec('0x44')]['id']}})[_0x57ec('0x25')](handleEntityNotFound(_0x48d8d1,null))[_0x57ec('0x25')](saveUpdates(_0x324c00[_0x57ec('0x46')],null))['then'](respondWithResult(_0x48d8d1,null))[_0x57ec('0x42')](handleError(_0x48d8d1,null));};exports[_0x57ec('0x48')]=function(_0x2232c9,_0x3c9d70){return db[_0x57ec('0x2b')][_0x57ec('0x49')]({'where':{'id':_0x2232c9[_0x57ec('0x44')]['id']}})[_0x57ec('0x25')](handleEntityNotFound(_0x3c9d70,null))[_0x57ec('0x25')](removeEntity(_0x3c9d70,null))['catch'](handleError(_0x3c9d70,null));};exports[_0x57ec('0x4a')]=function(_0x5b24d7,_0x57e813){return db[_0x57ec('0x2b')]['describe']()[_0x57ec('0x25')](respondWithResult(_0x57e813,null))[_0x57ec('0x42')](handleError(_0x57e813,null));};
\ No newline at end of file
index be43707..4342d41 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5235=['request-promise','path','rimraf','./integrationReport.attributes','exports','define','report_integration','lodash','util','../../config/logger','api','moment'];(function(_0x36f6fc,_0x1c806b){var _0x16a908=function(_0x549d92){while(--_0x549d92){_0x36f6fc['push'](_0x36f6fc['shift']());}};_0x16a908(++_0x1c806b);}(_0x5235,0x7f));var _0x5523=function(_0x299784,_0xb0918f){_0x299784=_0x299784-0x0;var _0x5ab008=_0x5235[_0x299784];return _0x5ab008;};'use strict';var _=require(_0x5523('0x0'));var util=require(_0x5523('0x1'));var logger=require(_0x5523('0x2'))(_0x5523('0x3'));var moment=require(_0x5523('0x4'));var BPromise=require('bluebird');var rp=require(_0x5523('0x5'));var fs=require('fs');var path=require(_0x5523('0x6'));var rimraf=require(_0x5523('0x7'));var config=require('../../config/environment');var attributes=require(_0x5523('0x8'));module[_0x5523('0x9')]=function(_0x56cf8e,_0x2a9765){return _0x56cf8e[_0x5523('0xa')]('IntegrationReport',attributes,{'tableName':_0x5523('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe08c=['./integrationReport.attributes','exports','define','IntegrationReport','report_integration','util','moment','bluebird','request-promise','rimraf'];(function(_0x110c3d,_0x12ee06){var _0x226d67=function(_0x1fb6e1){while(--_0x1fb6e1){_0x110c3d['push'](_0x110c3d['shift']());}};_0x226d67(++_0x12ee06);}(_0xe08c,0x9b));var _0xce08=function(_0x590cd0,_0x11bfd4){_0x590cd0=_0x590cd0-0x0;var _0x208eb0=_0xe08c[_0x590cd0];return _0x208eb0;};'use strict';var _=require('lodash');var util=require(_0xce08('0x0'));var logger=require('../../config/logger')('api');var moment=require(_0xce08('0x1'));var BPromise=require(_0xce08('0x2'));var rp=require(_0xce08('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0xce08('0x4'));var config=require('../../config/environment');var attributes=require(_0xce08('0x5'));module[_0xce08('0x6')]=function(_0x349b71,_0x2d3f41){return _0x349b71[_0xce08('0x7')](_0xce08('0x8'),attributes,{'tableName':_0xce08('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 66ead81..a023abb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe2fe=['then','info','IntegrationReport,\x20%s,\x20%s','stringify','error','message','request\x20sent','result','lodash','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request'];(function(_0xa84d7d,_0x21e27a){var _0x1af144=function(_0x230062){while(--_0x230062){_0xa84d7d['push'](_0xa84d7d['shift']());}};_0x1af144(++_0x21e27a);}(_0xe2fe,0x86));var _0xee2f=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe2fe[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xee2f('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xee2f('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xee2f('0x2'));var db=require(_0xee2f('0x3'))['db'];var utils=require(_0xee2f('0x4'));var logger=require(_0xee2f('0x5'))(_0xee2f('0x6'));var config=require('../../config/environment');var jayson=require(_0xee2f('0x7'));var client=jayson[_0xee2f('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1533a0,_0x2e1c8c,_0x5a7975){return new BPromise(function(_0x3c4095,_0x5ea796){return client[_0xee2f('0x9')](_0x1533a0,_0x5a7975)[_0xee2f('0xa')](function(_0x53f7dd){logger[_0xee2f('0xb')](_0xee2f('0xc'),_0x2e1c8c,'request\x20sent');logger['debug']('IntegrationReport,\x20%s,\x20%s,\x20%s',_0x2e1c8c,'request\x20sent',JSON[_0xee2f('0xd')](_0x53f7dd));if(_0x53f7dd['error']){if(_0x53f7dd['error']['code']===0x1f4){logger[_0xee2f('0xe')](_0xee2f('0xc'),_0x2e1c8c,_0x53f7dd[_0xee2f('0xe')][_0xee2f('0xf')]);return _0x5ea796(_0x53f7dd[_0xee2f('0xe')][_0xee2f('0xf')]);}logger['error'](_0xee2f('0xc'),_0x2e1c8c,_0x53f7dd['error'][_0xee2f('0xf')]);return _0x3c4095(_0x53f7dd[_0xee2f('0xe')]['message']);}else{logger[_0xee2f('0xb')](_0xee2f('0xc'),_0x2e1c8c,_0xee2f('0x10'));_0x3c4095(_0x53f7dd[_0xee2f('0x11')][_0xee2f('0xf')]);}})['catch'](function(_0x3f6372){logger['error'](_0xee2f('0xc'),_0x2e1c8c,_0x3f6372);_0x5ea796(_0x3f6372);});});}
\ No newline at end of file
+var _0x2542=['info','IntegrationReport,\x20%s,\x20%s','debug','IntegrationReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then'];(function(_0x4ce5cf,_0x3d118e){var _0x194315=function(_0x58d828){while(--_0x58d828){_0x4ce5cf['push'](_0x4ce5cf['shift']());}};_0x194315(++_0x3d118e);}(_0x2542,0x169));var _0x2254=function(_0x53eff7,_0x1c08f8){_0x53eff7=_0x53eff7-0x0;var _0x320cd4=_0x2542[_0x53eff7];return _0x320cd4;};'use strict';var _=require(_0x2254('0x0'));var util=require(_0x2254('0x1'));var moment=require(_0x2254('0x2'));var BPromise=require(_0x2254('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2254('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x2254('0x5'));var logger=require(_0x2254('0x6'))(_0x2254('0x7'));var config=require(_0x2254('0x8'));var jayson=require(_0x2254('0x9'));var client=jayson['client'][_0x2254('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xe8ca50,_0x2ee7ee,_0x3c45ec){return new BPromise(function(_0x1637ad,_0x477b47){return client[_0x2254('0xb')](_0xe8ca50,_0x3c45ec)[_0x2254('0xc')](function(_0xb395da){logger[_0x2254('0xd')](_0x2254('0xe'),_0x2ee7ee,'request\x20sent');logger[_0x2254('0xf')](_0x2254('0x10'),_0x2ee7ee,_0x2254('0x11'),JSON[_0x2254('0x12')](_0xb395da));if(_0xb395da['error']){if(_0xb395da['error'][_0x2254('0x13')]===0x1f4){logger[_0x2254('0x14')](_0x2254('0xe'),_0x2ee7ee,_0xb395da[_0x2254('0x14')][_0x2254('0x15')]);return _0x477b47(_0xb395da[_0x2254('0x14')]['message']);}logger[_0x2254('0x14')](_0x2254('0xe'),_0x2ee7ee,_0xb395da['error'][_0x2254('0x15')]);return _0x1637ad(_0xb395da[_0x2254('0x14')][_0x2254('0x15')]);}else{logger[_0x2254('0xd')](_0x2254('0xe'),_0x2ee7ee,_0x2254('0x11'));_0x1637ad(_0xb395da['result'][_0x2254('0x15')]);}})['catch'](function(_0x327d6d){logger[_0x2254('0x14')](_0x2254('0xe'),_0x2ee7ee,_0x327d6d);_0x477b47(_0x327d6d);});});}
\ No newline at end of file
index 792f87d..87bedb1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf228=['../../components/interaction/service','get','index','isAuthenticated','show','/:id/sub_intervals','getIntervals','post','create','addInterval','/:id/sub_intervals/create_many','addIntervals','/:id','update','delete','destroy','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0xd3770b,_0xa0f81a){var _0x4bad1e=function(_0x151dce){while(--_0x151dce){_0xd3770b['push'](_0xd3770b['shift']());}};_0x4bad1e(++_0xa0f81a);}(_0xf228,0x1a9));var _0x8f22=function(_0x5a0ec3,_0x4477ec){_0x5a0ec3=_0x5a0ec3-0x0;var _0x287135=_0xf228[_0x5a0ec3];return _0x287135;};'use strict';var multer=require(_0x8f22('0x0'));var util=require(_0x8f22('0x1'));var path=require('path');var timeout=require(_0x8f22('0x2'));var express=require(_0x8f22('0x3'));var router=express[_0x8f22('0x4')]();var fs_extra=require(_0x8f22('0x5'));var auth=require(_0x8f22('0x6'));var interaction=require(_0x8f22('0x7'));var config=require('../../config/environment');var controller=require('./interval.controller');router[_0x8f22('0x8')]('/',auth['isAuthenticated'](),controller[_0x8f22('0x9')]);router[_0x8f22('0x8')]('/:id',auth[_0x8f22('0xa')](),controller[_0x8f22('0xb')]);router['get'](_0x8f22('0xc'),auth[_0x8f22('0xa')](),controller[_0x8f22('0xd')]);router[_0x8f22('0xe')]('/',auth[_0x8f22('0xa')](),controller[_0x8f22('0xf')]);router[_0x8f22('0xe')](_0x8f22('0xc'),auth['isAuthenticated'](),controller[_0x8f22('0x10')]);router[_0x8f22('0xe')](_0x8f22('0x11'),auth['isAuthenticated'](),controller[_0x8f22('0x12')]);router['put'](_0x8f22('0x13'),auth[_0x8f22('0xa')](),controller[_0x8f22('0x14')]);router[_0x8f22('0x15')](_0x8f22('0x13'),auth['isAuthenticated'](),controller[_0x8f22('0x16')]);module[_0x8f22('0x17')]=router;
\ No newline at end of file
+var _0x9bb8=['path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./interval.controller','get','index','/:id','isAuthenticated','show','getIntervals','post','/:id/sub_intervals/create_many','addIntervals','update','delete','destroy','exports','multer','util'];(function(_0x4ff09b,_0x53f67d){var _0x3f5c2e=function(_0x124592){while(--_0x124592){_0x4ff09b['push'](_0x4ff09b['shift']());}};_0x3f5c2e(++_0x53f67d);}(_0x9bb8,0x1ae));var _0x89bb=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x9bb8[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0x89bb('0x0'));var util=require(_0x89bb('0x1'));var path=require(_0x89bb('0x2'));var timeout=require(_0x89bb('0x3'));var express=require(_0x89bb('0x4'));var router=express[_0x89bb('0x5')]();var fs_extra=require(_0x89bb('0x6'));var auth=require(_0x89bb('0x7'));var interaction=require(_0x89bb('0x8'));var config=require(_0x89bb('0x9'));var controller=require(_0x89bb('0xa'));router[_0x89bb('0xb')]('/',auth['isAuthenticated'](),controller[_0x89bb('0xc')]);router[_0x89bb('0xb')](_0x89bb('0xd'),auth[_0x89bb('0xe')](),controller[_0x89bb('0xf')]);router[_0x89bb('0xb')]('/:id/sub_intervals',auth[_0x89bb('0xe')](),controller[_0x89bb('0x10')]);router['post']('/',auth[_0x89bb('0xe')](),controller['create']);router[_0x89bb('0x11')]('/:id/sub_intervals',auth[_0x89bb('0xe')](),controller['addInterval']);router[_0x89bb('0x11')](_0x89bb('0x12'),auth[_0x89bb('0xe')](),controller[_0x89bb('0x13')]);router['put'](_0x89bb('0xd'),auth[_0x89bb('0xe')](),controller[_0x89bb('0x14')]);router[_0x89bb('0x15')]('/:id',auth['isAuthenticated'](),controller[_0x89bb('0x16')]);module[_0x89bb('0x17')]=router;
\ No newline at end of file
index 3f6b1b5..125d1e7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x421c=['STRING','sequelize','exports'];(function(_0x176860,_0x2fbf0f){var _0x5f4a69=function(_0x54fc47){while(--_0x54fc47){_0x176860['push'](_0x176860['shift']());}};_0x5f4a69(++_0x2fbf0f);}(_0x421c,0x9d));var _0xc421=function(_0x43b784,_0x276b57){_0x43b784=_0x43b784-0x0;var _0x468fe1=_0x421c[_0x43b784];return _0x468fe1;};'use strict';var Sequelize=require(_0xc421('0x0'));module[_0xc421('0x1')]={'name':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0xc421('0x2')]},'interval':{'type':Sequelize[_0xc421('0x2')],'allowNull':!![]}};
\ No newline at end of file
+var _0x757f=['STRING','sequelize','exports'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x757f,0x91));var _0xf757=function(_0x138adb,_0x193fee){_0x138adb=_0x138adb-0x0;var _0x1b27f2=_0x757f[_0x138adb];return _0x1b27f2;};'use strict';var Sequelize=require(_0xf757('0x0'));module[_0xf757('0x1')]={'name':{'type':Sequelize[_0xf757('0x2')]},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0xf757('0x2')],'allowNull':!![]}};
\ No newline at end of file
index d9abc63..1de9b7c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0ee1=['end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','update','then','destroy','get','Intervals','UserProfileResource','error','stack','name','send','index','map','Interval','rawAttributes','fieldName','type','query','filters','model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','VIRTUAL','merge','includeAll','include','findAll','catch','show','params','intersection','options','find','create','body','user','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','addInterval','IntervalId','getIntervals','findOne','keys','sequelize','transaction','bulkCreate','eml-format','rimraf','request-promise','moment','bluebird','util','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','api','../../config/environment','../../mysqldb','../../components/extensions/rewrite','sendStatus','status'];(function(_0x172b9b,_0xebddaf){var _0x46853c=function(_0x20d902){while(--_0x20d902){_0x172b9b['push'](_0x172b9b['shift']());}};_0x46853c(++_0xebddaf);}(_0x0ee1,0xf5));var _0x10ee=function(_0x18dc32,_0x26d38e){_0x18dc32=_0x18dc32-0x0;var _0x2adfaf=_0x0ee1[_0x18dc32];return _0x2adfaf;};'use strict';var emlformat=require(_0x10ee('0x0'));var rimraf=require(_0x10ee('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x10ee('0x2'));var moment=require(_0x10ee('0x3'));var BPromise=require(_0x10ee('0x4'));var Mustache=require('mustache');var util=require(_0x10ee('0x5'));var path=require('path');var sox=require(_0x10ee('0x6'));var csv=require(_0x10ee('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x10ee('0x8'));var _=require(_0x10ee('0x9'));var squel=require(_0x10ee('0xa'));var crypto=require(_0x10ee('0xb'));var jsforce=require(_0x10ee('0xc'));var deskjs=require(_0x10ee('0xd'));var toCsv=require(_0x10ee('0x7'));var querystring=require(_0x10ee('0xe'));var Papa=require(_0x10ee('0xf'));var Redis=require(_0x10ee('0x10'));var authService=require(_0x10ee('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x10ee('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x10ee('0x13'));var utils=require('../../config/utils');var config=require(_0x10ee('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0x10ee('0x15'))['db'];var extensions=require(_0x10ee('0x16'));function respondWithStatusCode(_0x196495,_0x332174){_0x332174=_0x332174||0xcc;return function(_0x4422a0){if(_0x4422a0){return _0x196495[_0x10ee('0x17')](_0x332174);}return _0x196495[_0x10ee('0x18')](_0x332174)[_0x10ee('0x19')]();};}function respondWithResult(_0x342ac3,_0x409695){_0x409695=_0x409695||0xc8;return function(_0x503542){if(_0x503542){return _0x342ac3[_0x10ee('0x18')](_0x409695)[_0x10ee('0x1a')](_0x503542);}};}function respondWithFilteredResult(_0x40dcb8,_0xe3fec3){return function(_0x4554f8){if(_0x4554f8){var _0x15deef=typeof _0xe3fec3[_0x10ee('0x1b')]===_0x10ee('0x1c')&&typeof _0xe3fec3[_0x10ee('0x1d')]===_0x10ee('0x1c');var _0x5a2915=_0x4554f8[_0x10ee('0x1e')];var _0x333ff1=_0x15deef?0x0:_0xe3fec3['offset'];var _0xf1242b=_0x15deef?_0x4554f8[_0x10ee('0x1e')]:_0xe3fec3[_0x10ee('0x1b')]+_0xe3fec3[_0x10ee('0x1d')];var _0x133ceb;if(_0xf1242b>=_0x5a2915){_0xf1242b=_0x5a2915;_0x133ceb=0xc8;}else{_0x133ceb=0xce;}_0x40dcb8['status'](_0x133ceb);return _0x40dcb8[_0x10ee('0x1f')](_0x10ee('0x20'),_0x333ff1+'-'+_0xf1242b+'/'+_0x5a2915)['json'](_0x4554f8);}return null;};}function patchUpdates(_0x396d59){return function(_0x3e4648){try{jsonpatch[_0x10ee('0x21')](_0x3e4648,_0x396d59,!![]);}catch(_0x3d5f46){return BPromise[_0x10ee('0x22')](_0x3d5f46);}return _0x3e4648['save']();};}function saveUpdates(_0x390172,_0x6b4596){return function(_0x2c220f){if(_0x2c220f){return _0x2c220f[_0x10ee('0x23')](_0x390172)[_0x10ee('0x24')](function(_0x592a36){return _0x592a36;});}return null;};}function removeEntity(_0xf2ca54,_0x2ab907){return function(_0x3f1b81){if(_0x3f1b81){return _0x3f1b81[_0x10ee('0x25')]()[_0x10ee('0x24')](function(){var _0x208c01=_0x3f1b81[_0x10ee('0x26')]({'plain':!![]});var _0x42c1d7=_0x10ee('0x27');return db[_0x10ee('0x28')]['destroy']({'where':{'type':_0x42c1d7,'resourceId':_0x208c01['id']}})['then'](function(){return _0x3f1b81;});})[_0x10ee('0x24')](function(){_0xf2ca54['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x5b9dca,_0xf238d){return function(_0x386c94){if(!_0x386c94){_0x5b9dca['sendStatus'](0x194);}return _0x386c94;};}function handleError(_0x1c3574,_0x250356){_0x250356=_0x250356||0x1f4;return function(_0x344c28){logger[_0x10ee('0x29')](_0x344c28[_0x10ee('0x2a')]);if(_0x344c28['name']){delete _0x344c28[_0x10ee('0x2b')];}_0x1c3574['status'](_0x250356)[_0x10ee('0x2c')](_0x344c28);};}exports[_0x10ee('0x2d')]=function(_0x3e50fc,_0x36257d){var _0x2ea20e={},_0x8c4086={},_0x24f0f4={'count':0x0,'rows':[]};var _0x1504a0=_[_0x10ee('0x2e')](db[_0x10ee('0x2f')][_0x10ee('0x30')],function(_0x32d890){return{'name':_0x32d890[_0x10ee('0x31')],'type':_0x32d890[_0x10ee('0x32')]['key']};});_0x8c4086['model']=_[_0x10ee('0x2e')](_0x1504a0,_0x10ee('0x2b'));_0x8c4086[_0x10ee('0x33')]=_['keys'](_0x3e50fc[_0x10ee('0x33')]);_0x8c4086[_0x10ee('0x34')]=_['intersection'](_0x8c4086[_0x10ee('0x35')],_0x8c4086[_0x10ee('0x33')]);_0x2ea20e['attributes']=_['intersection'](_0x8c4086[_0x10ee('0x35')],qs[_0x10ee('0x36')](_0x3e50fc[_0x10ee('0x33')][_0x10ee('0x36')]));_0x2ea20e[_0x10ee('0x37')]=_0x2ea20e[_0x10ee('0x37')][_0x10ee('0x38')]?_0x2ea20e['attributes']:_0x8c4086[_0x10ee('0x35')];if(!_0x3e50fc[_0x10ee('0x33')][_0x10ee('0x39')](_0x10ee('0x3a'))){_0x2ea20e[_0x10ee('0x1d')]=qs[_0x10ee('0x1d')](_0x3e50fc[_0x10ee('0x33')][_0x10ee('0x1d')]);_0x2ea20e[_0x10ee('0x1b')]=qs['offset'](_0x3e50fc['query'][_0x10ee('0x1b')]);}_0x2ea20e[_0x10ee('0x3b')]=qs[_0x10ee('0x3c')](_0x3e50fc[_0x10ee('0x33')][_0x10ee('0x3c')]);_0x2ea20e['where']=qs[_0x10ee('0x34')](_[_0x10ee('0x3d')](_0x3e50fc[_0x10ee('0x33')],_0x8c4086[_0x10ee('0x34')]),_0x1504a0);if(_0x3e50fc['query'][_0x10ee('0x3e')]){_0x2ea20e[_0x10ee('0x3f')]=_['merge'](_0x2ea20e[_0x10ee('0x3f')],{'$or':_['map'](_0x1504a0,function(_0x382f77){if(_0x382f77[_0x10ee('0x32')]!==_0x10ee('0x40')){var _0x2002f6={};_0x2002f6[_0x382f77['name']]={'$like':'%'+_0x3e50fc[_0x10ee('0x33')][_0x10ee('0x3e')]+'%'};return _0x2002f6;}})});}_0x2ea20e=_[_0x10ee('0x41')]({},_0x2ea20e,_0x3e50fc['options']);var _0x1b113d={'where':_0x2ea20e['where']};return db[_0x10ee('0x2f')][_0x10ee('0x1e')](_0x1b113d)['then'](function(_0x1cf03e){_0x24f0f4[_0x10ee('0x1e')]=_0x1cf03e;if(_0x3e50fc['query'][_0x10ee('0x42')]){_0x2ea20e[_0x10ee('0x43')]=[{'all':!![]}];}return db[_0x10ee('0x2f')][_0x10ee('0x44')](_0x2ea20e);})[_0x10ee('0x24')](function(_0x4fbf2d){_0x24f0f4['rows']=_0x4fbf2d;return _0x24f0f4;})[_0x10ee('0x24')](respondWithFilteredResult(_0x36257d,_0x2ea20e))[_0x10ee('0x45')](handleError(_0x36257d,null));};exports[_0x10ee('0x46')]=function(_0x320130,_0x1b484d){var _0x1ee009={'raw':!![],'where':{'id':_0x320130[_0x10ee('0x47')]['id']}},_0x172f22={};_0x172f22[_0x10ee('0x35')]=_['keys'](db[_0x10ee('0x2f')][_0x10ee('0x30')]);_0x172f22[_0x10ee('0x33')]=_['keys'](_0x320130[_0x10ee('0x33')]);_0x172f22[_0x10ee('0x34')]=_[_0x10ee('0x48')](_0x172f22[_0x10ee('0x35')],_0x172f22[_0x10ee('0x33')]);_0x1ee009['attributes']=_[_0x10ee('0x48')](_0x172f22['model'],qs[_0x10ee('0x36')](_0x320130['query'][_0x10ee('0x36')]));_0x1ee009[_0x10ee('0x37')]=_0x1ee009[_0x10ee('0x37')][_0x10ee('0x38')]?_0x1ee009[_0x10ee('0x37')]:_0x172f22['model'];if(_0x320130[_0x10ee('0x33')]['includeAll']){_0x1ee009['include']=[{'all':!![]}];}_0x1ee009=_[_0x10ee('0x41')]({},_0x1ee009,_0x320130[_0x10ee('0x49')]);return db[_0x10ee('0x2f')][_0x10ee('0x4a')](_0x1ee009)['then'](handleEntityNotFound(_0x1b484d,null))[_0x10ee('0x24')](respondWithResult(_0x1b484d,null))[_0x10ee('0x45')](handleError(_0x1b484d,null));};exports[_0x10ee('0x4b')]=function(_0x1b0cd6,_0x11ca38){return db['Interval']['create'](_0x1b0cd6[_0x10ee('0x4c')],{})[_0x10ee('0x24')](function(_0x3b87d8){var _0x59417c=_0x1b0cd6[_0x10ee('0x4d')][_0x10ee('0x26')]({'plain':!![]});if(!_0x59417c)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x59417c[_0x10ee('0x4e')]===_0x10ee('0x4d')){var _0x3ee069=_0x3b87d8[_0x10ee('0x26')]({'plain':!![]});var _0x37cb95=_0x10ee('0x27');return db[_0x10ee('0x4f')][_0x10ee('0x4a')]({'where':{'name':_0x37cb95,'userProfileId':_0x59417c['userProfileId']},'raw':!![]})[_0x10ee('0x24')](function(_0x3d0af4){if(_0x3d0af4&&_0x3d0af4[_0x10ee('0x50')]===0x0){return db[_0x10ee('0x28')][_0x10ee('0x4b')]({'name':_0x3ee069[_0x10ee('0x2b')],'resourceId':_0x3ee069['id'],'type':_0x3d0af4[_0x10ee('0x2b')],'sectionId':_0x3d0af4['id']},{})[_0x10ee('0x24')](function(){return _0x3b87d8;});}else{return _0x3b87d8;}})['catch'](function(_0x3fbbb7){logger['error'](_0x10ee('0x51'),_0x3fbbb7);throw _0x3fbbb7;});}return _0x3b87d8;})[_0x10ee('0x24')](respondWithResult(_0x11ca38,0xc9))[_0x10ee('0x45')](handleError(_0x11ca38,null));};exports['update']=function(_0x3d4e53,_0x384fc){if(_0x3d4e53[_0x10ee('0x4c')]['id']){delete _0x3d4e53[_0x10ee('0x4c')]['id'];}return db['Interval'][_0x10ee('0x4a')]({'where':{'id':_0x3d4e53[_0x10ee('0x47')]['id']}})[_0x10ee('0x24')](handleEntityNotFound(_0x384fc,null))[_0x10ee('0x24')](saveUpdates(_0x3d4e53[_0x10ee('0x4c')],null))[_0x10ee('0x24')](respondWithResult(_0x384fc,null))[_0x10ee('0x45')](handleError(_0x384fc,null));};exports[_0x10ee('0x25')]=function(_0x1a7e6e,_0xf12fa6){return db['Interval']['find']({'where':{'id':_0x1a7e6e[_0x10ee('0x47')]['id']}})[_0x10ee('0x24')](handleEntityNotFound(_0xf12fa6,null))[_0x10ee('0x24')](removeEntity(_0xf12fa6,null))[_0x10ee('0x45')](handleError(_0xf12fa6,null));};exports[_0x10ee('0x52')]=function(_0x21c18c,_0x53649c,_0x50eb6d){if(_0x21c18c['body']['id']){delete _0x21c18c[_0x10ee('0x4c')]['id'];}return db[_0x10ee('0x2f')]['find']({'where':{'id':_0x21c18c[_0x10ee('0x47')]['id']}})[_0x10ee('0x24')](handleEntityNotFound(_0x53649c,null))['then'](function(_0x4fdb90){if(_0x4fdb90){_0x21c18c['body'][_0x10ee('0x53')]=_0x4fdb90['id'];return db[_0x10ee('0x2f')][_0x10ee('0x4b')](_0x21c18c[_0x10ee('0x4c')]);}})[_0x10ee('0x24')](respondWithResult(_0x53649c,null))[_0x10ee('0x45')](handleError(_0x53649c,null));};exports[_0x10ee('0x54')]=function(_0x156753,_0x1659e1,_0x3bc834){var _0x1147fd={};var _0x26850f={};var _0x125095;var _0x35c09e;return db[_0x10ee('0x2f')][_0x10ee('0x55')]({'where':{'id':_0x156753[_0x10ee('0x47')]['id']}})['then'](handleEntityNotFound(_0x1659e1,null))['then'](function(_0x125f01){if(_0x125f01){_0x125095=_0x125f01;_0x26850f[_0x10ee('0x35')]=_[_0x10ee('0x56')](db[_0x10ee('0x2f')][_0x10ee('0x30')]);_0x26850f[_0x10ee('0x33')]=_[_0x10ee('0x56')](_0x156753[_0x10ee('0x33')]);_0x26850f[_0x10ee('0x34')]=_[_0x10ee('0x48')](_0x26850f[_0x10ee('0x35')],_0x26850f[_0x10ee('0x33')]);_0x1147fd[_0x10ee('0x37')]=_[_0x10ee('0x48')](_0x26850f[_0x10ee('0x35')],qs['fields'](_0x156753[_0x10ee('0x33')][_0x10ee('0x36')]));_0x1147fd['attributes']=_0x1147fd['attributes'][_0x10ee('0x38')]?_0x1147fd['attributes']:_0x26850f[_0x10ee('0x35')];_0x1147fd[_0x10ee('0x3b')]=qs[_0x10ee('0x3c')](_0x156753['query'][_0x10ee('0x3c')]);_0x1147fd[_0x10ee('0x3f')]=qs[_0x10ee('0x34')](_['pick'](_0x156753['query'],_0x26850f[_0x10ee('0x34')]));if(_0x156753['query'][_0x10ee('0x3e')]){_0x1147fd[_0x10ee('0x3f')]=_[_0x10ee('0x41')](_0x1147fd['where'],{'$or':_['map'](_0x1147fd[_0x10ee('0x37')],function(_0x1d7789){var _0x54dcb3={};_0x54dcb3[_0x1d7789]={'$like':'%'+_0x156753['query'][_0x10ee('0x3e')]+'%'};return _0x54dcb3;})});}_0x1147fd=_['merge']({},_0x1147fd,_0x156753[_0x10ee('0x49')]);return _0x125095[_0x10ee('0x54')](_0x1147fd);}})['then'](function(_0x3163cc){if(_0x3163cc){_0x35c09e=_0x3163cc[_0x10ee('0x38')];if(!_0x156753[_0x10ee('0x33')][_0x10ee('0x39')](_0x10ee('0x3a'))){_0x1147fd['limit']=qs[_0x10ee('0x1d')](_0x156753['query']['limit']);_0x1147fd[_0x10ee('0x1b')]=qs[_0x10ee('0x1b')](_0x156753[_0x10ee('0x33')][_0x10ee('0x1b')]);}return _0x125095[_0x10ee('0x54')](_0x1147fd);}})['then'](function(_0x11d49b){if(_0x11d49b){return _0x11d49b?{'count':_0x35c09e,'rows':_0x11d49b}:null;}})['then'](respondWithResult(_0x1659e1,null))[_0x10ee('0x45')](handleError(_0x1659e1,null));};exports['addIntervals']=function(_0x2e0788,_0x904771,_0x530b76){return db[_0x10ee('0x2f')][_0x10ee('0x55')]({'where':{'id':_0x2e0788['params']['id']}})['then'](handleEntityNotFound(_0x904771,null))[_0x10ee('0x24')](function(_0x1c44e0){if(_0x1c44e0){return db[_0x10ee('0x57')][_0x10ee('0x58')](function(_0x5d4226){return db[_0x10ee('0x2f')][_0x10ee('0x25')]({'where':{'IntervalId':_0x2e0788[_0x10ee('0x47')]['id']},'transaction':_0x5d4226})[_0x10ee('0x24')](function(_0x408a6e){var _0x9e21e1=_[_0x10ee('0x2e')](_0x2e0788[_0x10ee('0x4c')],function(_0x4fcd60){delete _0x4fcd60['id'];_0x4fcd60[_0x10ee('0x53')]=_0x2e0788['params']['id'];return _0x4fcd60;});return db['Interval'][_0x10ee('0x59')](_0x9e21e1,{'transaction':_0x5d4226});});})[_0x10ee('0x24')](function(){return db[_0x10ee('0x2f')][_0x10ee('0x44')]({'where':{'IntervalId':_0x2e0788[_0x10ee('0x47')]['id']}});});}})['then'](respondWithResult(_0x904771,null))[_0x10ee('0x45')](handleError(_0x904771,null));};
\ No newline at end of file
+var _0xcff1=['limit','count','Content-Range','reject','save','update','then','get','Intervals','UserProfileResource','destroy','error','name','send','index','Interval','rawAttributes','fieldName','type','key','model','map','query','keys','intersection','attributes','fields','hasOwnProperty','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','findAll','rows','catch','params','length','includeAll','include','create','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','UserProfileSection','find','userProfileId','autoAssociation','body','addInterval','IntervalId','getIntervals','nolimit','addIntervals','findOne','transaction','bulkCreate','eml-format','rimraf','zip-dir','moment','bluebird','util','path','sox','to-csv','lodash','desk.js','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../components/extensions/rewrite','status','end','json','offset','undefined'];(function(_0x5ebc57,_0x9409db){var _0x3f841d=function(_0x2aaefc){while(--_0x2aaefc){_0x5ebc57['push'](_0x5ebc57['shift']());}};_0x3f841d(++_0x9409db);}(_0xcff1,0x191));var _0x1cff=function(_0x1030ce,_0xbe3f74){_0x1030ce=_0x1030ce-0x0;var _0x3367fd=_0xcff1[_0x1030ce];return _0x3367fd;};'use strict';var emlformat=require(_0x1cff('0x0'));var rimraf=require(_0x1cff('0x1'));var zipdir=require(_0x1cff('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x1cff('0x3'));var BPromise=require(_0x1cff('0x4'));var Mustache=require('mustache');var util=require(_0x1cff('0x5'));var path=require(_0x1cff('0x6'));var sox=require(_0x1cff('0x7'));var csv=require(_0x1cff('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x1cff('0x9'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x1cff('0xa'));var toCsv=require(_0x1cff('0x8'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x1cff('0xb'));var qs=require('../../components/parsers/qs');var as=require(_0x1cff('0xc'));var hardwareService=require(_0x1cff('0xd'));var logger=require(_0x1cff('0xe'))('api');var utils=require(_0x1cff('0xf'));var config=require(_0x1cff('0x10'));var licenseUtil=require(_0x1cff('0x11'));var db=require('../../mysqldb')['db'];var extensions=require(_0x1cff('0x12'));function respondWithStatusCode(_0x41bc92,_0x6d3668){_0x6d3668=_0x6d3668||0xcc;return function(_0x47f9bd){if(_0x47f9bd){return _0x41bc92['sendStatus'](_0x6d3668);}return _0x41bc92[_0x1cff('0x13')](_0x6d3668)[_0x1cff('0x14')]();};}function respondWithResult(_0xc18010,_0x520d58){_0x520d58=_0x520d58||0xc8;return function(_0x53e3f8){if(_0x53e3f8){return _0xc18010[_0x1cff('0x13')](_0x520d58)[_0x1cff('0x15')](_0x53e3f8);}};}function respondWithFilteredResult(_0xaeec27,_0x2e2db6){return function(_0x501d91){if(_0x501d91){var _0x26efc8=typeof _0x2e2db6[_0x1cff('0x16')]===_0x1cff('0x17')&&typeof _0x2e2db6[_0x1cff('0x18')]==='undefined';var _0x3541de=_0x501d91[_0x1cff('0x19')];var _0x192b64=_0x26efc8?0x0:_0x2e2db6['offset'];var _0x22f45f=_0x26efc8?_0x501d91[_0x1cff('0x19')]:_0x2e2db6[_0x1cff('0x16')]+_0x2e2db6[_0x1cff('0x18')];var _0x59df3b;if(_0x22f45f>=_0x3541de){_0x22f45f=_0x3541de;_0x59df3b=0xc8;}else{_0x59df3b=0xce;}_0xaeec27[_0x1cff('0x13')](_0x59df3b);return _0xaeec27['set'](_0x1cff('0x1a'),_0x192b64+'-'+_0x22f45f+'/'+_0x3541de)[_0x1cff('0x15')](_0x501d91);}return null;};}function patchUpdates(_0x1efe58){return function(_0x47b28b){try{jsonpatch['apply'](_0x47b28b,_0x1efe58,!![]);}catch(_0x12e30f){return BPromise[_0x1cff('0x1b')](_0x12e30f);}return _0x47b28b[_0x1cff('0x1c')]();};}function saveUpdates(_0x14862c,_0x849426){return function(_0x420872){if(_0x420872){return _0x420872[_0x1cff('0x1d')](_0x14862c)['then'](function(_0x2351d2){return _0x2351d2;});}return null;};}function removeEntity(_0x1b658e,_0x3285fd){return function(_0x55e18c){if(_0x55e18c){return _0x55e18c['destroy']()[_0x1cff('0x1e')](function(){var _0x2879c6=_0x55e18c[_0x1cff('0x1f')]({'plain':!![]});var _0x2b2b12=_0x1cff('0x20');return db[_0x1cff('0x21')][_0x1cff('0x22')]({'where':{'type':_0x2b2b12,'resourceId':_0x2879c6['id']}})[_0x1cff('0x1e')](function(){return _0x55e18c;});})[_0x1cff('0x1e')](function(){_0x1b658e[_0x1cff('0x13')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2ea7cf,_0x5a47a1){return function(_0x121e39){if(!_0x121e39){_0x2ea7cf['sendStatus'](0x194);}return _0x121e39;};}function handleError(_0x37797e,_0x93bbbf){_0x93bbbf=_0x93bbbf||0x1f4;return function(_0x4fff1d){logger[_0x1cff('0x23')](_0x4fff1d['stack']);if(_0x4fff1d[_0x1cff('0x24')]){delete _0x4fff1d[_0x1cff('0x24')];}_0x37797e[_0x1cff('0x13')](_0x93bbbf)[_0x1cff('0x25')](_0x4fff1d);};}exports[_0x1cff('0x26')]=function(_0x348dfe,_0xcfc51c){var _0x14cbf1={},_0x2611bb={},_0x2591c8={'count':0x0,'rows':[]};var _0x2f8a5d=_['map'](db[_0x1cff('0x27')][_0x1cff('0x28')],function(_0x472fe4){return{'name':_0x472fe4[_0x1cff('0x29')],'type':_0x472fe4[_0x1cff('0x2a')][_0x1cff('0x2b')]};});_0x2611bb[_0x1cff('0x2c')]=_[_0x1cff('0x2d')](_0x2f8a5d,_0x1cff('0x24'));_0x2611bb[_0x1cff('0x2e')]=_[_0x1cff('0x2f')](_0x348dfe[_0x1cff('0x2e')]);_0x2611bb['filters']=_[_0x1cff('0x30')](_0x2611bb[_0x1cff('0x2c')],_0x2611bb[_0x1cff('0x2e')]);_0x14cbf1[_0x1cff('0x31')]=_[_0x1cff('0x30')](_0x2611bb[_0x1cff('0x2c')],qs['fields'](_0x348dfe[_0x1cff('0x2e')][_0x1cff('0x32')]));_0x14cbf1[_0x1cff('0x31')]=_0x14cbf1['attributes']['length']?_0x14cbf1[_0x1cff('0x31')]:_0x2611bb[_0x1cff('0x2c')];if(!_0x348dfe[_0x1cff('0x2e')][_0x1cff('0x33')]('nolimit')){_0x14cbf1[_0x1cff('0x18')]=qs[_0x1cff('0x18')](_0x348dfe['query']['limit']);_0x14cbf1['offset']=qs[_0x1cff('0x16')](_0x348dfe['query'][_0x1cff('0x16')]);}_0x14cbf1[_0x1cff('0x34')]=qs[_0x1cff('0x35')](_0x348dfe[_0x1cff('0x2e')][_0x1cff('0x35')]);_0x14cbf1[_0x1cff('0x36')]=qs[_0x1cff('0x37')](_[_0x1cff('0x38')](_0x348dfe[_0x1cff('0x2e')],_0x2611bb['filters']),_0x2f8a5d);if(_0x348dfe[_0x1cff('0x2e')][_0x1cff('0x39')]){_0x14cbf1[_0x1cff('0x36')]=_[_0x1cff('0x3a')](_0x14cbf1[_0x1cff('0x36')],{'$or':_[_0x1cff('0x2d')](_0x2f8a5d,function(_0x47f02e){if(_0x47f02e['type']!==_0x1cff('0x3b')){var _0x506e71={};_0x506e71[_0x47f02e[_0x1cff('0x24')]]={'$like':'%'+_0x348dfe[_0x1cff('0x2e')][_0x1cff('0x39')]+'%'};return _0x506e71;}})});}_0x14cbf1=_[_0x1cff('0x3a')]({},_0x14cbf1,_0x348dfe[_0x1cff('0x3c')]);var _0x118d8f={'where':_0x14cbf1[_0x1cff('0x36')]};return db['Interval'][_0x1cff('0x19')](_0x118d8f)['then'](function(_0x1acc4f){_0x2591c8[_0x1cff('0x19')]=_0x1acc4f;if(_0x348dfe[_0x1cff('0x2e')]['includeAll']){_0x14cbf1['include']=[{'all':!![]}];}return db[_0x1cff('0x27')][_0x1cff('0x3d')](_0x14cbf1);})[_0x1cff('0x1e')](function(_0x30811d){_0x2591c8[_0x1cff('0x3e')]=_0x30811d;return _0x2591c8;})[_0x1cff('0x1e')](respondWithFilteredResult(_0xcfc51c,_0x14cbf1))[_0x1cff('0x3f')](handleError(_0xcfc51c,null));};exports['show']=function(_0x454f72,_0x248661){var _0x83f621={'raw':!![],'where':{'id':_0x454f72[_0x1cff('0x40')]['id']}},_0x250376={};_0x250376[_0x1cff('0x2c')]=_[_0x1cff('0x2f')](db[_0x1cff('0x27')][_0x1cff('0x28')]);_0x250376[_0x1cff('0x2e')]=_[_0x1cff('0x2f')](_0x454f72[_0x1cff('0x2e')]);_0x250376[_0x1cff('0x37')]=_[_0x1cff('0x30')](_0x250376[_0x1cff('0x2c')],_0x250376[_0x1cff('0x2e')]);_0x83f621[_0x1cff('0x31')]=_[_0x1cff('0x30')](_0x250376[_0x1cff('0x2c')],qs[_0x1cff('0x32')](_0x454f72[_0x1cff('0x2e')]['fields']));_0x83f621[_0x1cff('0x31')]=_0x83f621['attributes'][_0x1cff('0x41')]?_0x83f621[_0x1cff('0x31')]:_0x250376[_0x1cff('0x2c')];if(_0x454f72[_0x1cff('0x2e')][_0x1cff('0x42')]){_0x83f621[_0x1cff('0x43')]=[{'all':!![]}];}_0x83f621=_[_0x1cff('0x3a')]({},_0x83f621,_0x454f72[_0x1cff('0x3c')]);return db[_0x1cff('0x27')]['find'](_0x83f621)['then'](handleEntityNotFound(_0x248661,null))[_0x1cff('0x1e')](respondWithResult(_0x248661,null))[_0x1cff('0x3f')](handleError(_0x248661,null));};exports[_0x1cff('0x44')]=function(_0x195b33,_0x544dc5){return db[_0x1cff('0x27')]['create'](_0x195b33['body'],{})['then'](function(_0x415462){var _0x2b542e=_0x195b33['user'][_0x1cff('0x1f')]({'plain':!![]});if(!_0x2b542e)throw new Error(_0x1cff('0x45'));if(_0x2b542e[_0x1cff('0x46')]===_0x1cff('0x47')){var _0x238dea=_0x415462[_0x1cff('0x1f')]({'plain':!![]});var _0x55589b=_0x1cff('0x20');return db[_0x1cff('0x48')][_0x1cff('0x49')]({'where':{'name':_0x55589b,'userProfileId':_0x2b542e[_0x1cff('0x4a')]},'raw':!![]})[_0x1cff('0x1e')](function(_0xfcc1fc){if(_0xfcc1fc&&_0xfcc1fc[_0x1cff('0x4b')]===0x0){return db[_0x1cff('0x21')][_0x1cff('0x44')]({'name':_0x238dea[_0x1cff('0x24')],'resourceId':_0x238dea['id'],'type':_0xfcc1fc[_0x1cff('0x24')],'sectionId':_0xfcc1fc['id']},{})[_0x1cff('0x1e')](function(){return _0x415462;});}else{return _0x415462;}})[_0x1cff('0x3f')](function(_0x130e87){logger[_0x1cff('0x23')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x130e87);throw _0x130e87;});}return _0x415462;})[_0x1cff('0x1e')](respondWithResult(_0x544dc5,0xc9))['catch'](handleError(_0x544dc5,null));};exports['update']=function(_0x3bf8fa,_0x586fd3){if(_0x3bf8fa[_0x1cff('0x4c')]['id']){delete _0x3bf8fa[_0x1cff('0x4c')]['id'];}return db[_0x1cff('0x27')][_0x1cff('0x49')]({'where':{'id':_0x3bf8fa['params']['id']}})[_0x1cff('0x1e')](handleEntityNotFound(_0x586fd3,null))[_0x1cff('0x1e')](saveUpdates(_0x3bf8fa[_0x1cff('0x4c')],null))[_0x1cff('0x1e')](respondWithResult(_0x586fd3,null))[_0x1cff('0x3f')](handleError(_0x586fd3,null));};exports['destroy']=function(_0x19bf9c,_0xcaff36){return db[_0x1cff('0x27')]['find']({'where':{'id':_0x19bf9c['params']['id']}})['then'](handleEntityNotFound(_0xcaff36,null))['then'](removeEntity(_0xcaff36,null))[_0x1cff('0x3f')](handleError(_0xcaff36,null));};exports[_0x1cff('0x4d')]=function(_0x59fb09,_0x1330b8,_0x3b077c){if(_0x59fb09[_0x1cff('0x4c')]['id']){delete _0x59fb09['body']['id'];}return db['Interval'][_0x1cff('0x49')]({'where':{'id':_0x59fb09['params']['id']}})[_0x1cff('0x1e')](handleEntityNotFound(_0x1330b8,null))['then'](function(_0x1fba9c){if(_0x1fba9c){_0x59fb09[_0x1cff('0x4c')][_0x1cff('0x4e')]=_0x1fba9c['id'];return db[_0x1cff('0x27')][_0x1cff('0x44')](_0x59fb09[_0x1cff('0x4c')]);}})[_0x1cff('0x1e')](respondWithResult(_0x1330b8,null))[_0x1cff('0x3f')](handleError(_0x1330b8,null));};exports['getIntervals']=function(_0x54f456,_0x35ef8a,_0x4e3897){var _0x8fa38a={};var _0x534eb9={};var _0x23dbed;var _0xf3e7db;return db[_0x1cff('0x27')]['findOne']({'where':{'id':_0x54f456[_0x1cff('0x40')]['id']}})['then'](handleEntityNotFound(_0x35ef8a,null))[_0x1cff('0x1e')](function(_0x239d99){if(_0x239d99){_0x23dbed=_0x239d99;_0x534eb9[_0x1cff('0x2c')]=_[_0x1cff('0x2f')](db['Interval'][_0x1cff('0x28')]);_0x534eb9['query']=_[_0x1cff('0x2f')](_0x54f456['query']);_0x534eb9[_0x1cff('0x37')]=_[_0x1cff('0x30')](_0x534eb9['model'],_0x534eb9[_0x1cff('0x2e')]);_0x8fa38a[_0x1cff('0x31')]=_[_0x1cff('0x30')](_0x534eb9['model'],qs[_0x1cff('0x32')](_0x54f456['query'][_0x1cff('0x32')]));_0x8fa38a['attributes']=_0x8fa38a[_0x1cff('0x31')][_0x1cff('0x41')]?_0x8fa38a[_0x1cff('0x31')]:_0x534eb9[_0x1cff('0x2c')];_0x8fa38a[_0x1cff('0x34')]=qs[_0x1cff('0x35')](_0x54f456[_0x1cff('0x2e')]['sort']);_0x8fa38a['where']=qs[_0x1cff('0x37')](_[_0x1cff('0x38')](_0x54f456['query'],_0x534eb9[_0x1cff('0x37')]));if(_0x54f456['query'][_0x1cff('0x39')]){_0x8fa38a[_0x1cff('0x36')]=_[_0x1cff('0x3a')](_0x8fa38a['where'],{'$or':_['map'](_0x8fa38a[_0x1cff('0x31')],function(_0x3f87da){var _0x3e3e33={};_0x3e3e33[_0x3f87da]={'$like':'%'+_0x54f456[_0x1cff('0x2e')][_0x1cff('0x39')]+'%'};return _0x3e3e33;})});}_0x8fa38a=_[_0x1cff('0x3a')]({},_0x8fa38a,_0x54f456[_0x1cff('0x3c')]);return _0x23dbed[_0x1cff('0x4f')](_0x8fa38a);}})[_0x1cff('0x1e')](function(_0x368da1){if(_0x368da1){_0xf3e7db=_0x368da1[_0x1cff('0x41')];if(!_0x54f456[_0x1cff('0x2e')]['hasOwnProperty'](_0x1cff('0x50'))){_0x8fa38a[_0x1cff('0x18')]=qs[_0x1cff('0x18')](_0x54f456[_0x1cff('0x2e')][_0x1cff('0x18')]);_0x8fa38a['offset']=qs[_0x1cff('0x16')](_0x54f456['query'][_0x1cff('0x16')]);}return _0x23dbed['getIntervals'](_0x8fa38a);}})[_0x1cff('0x1e')](function(_0x1a0e0c){if(_0x1a0e0c){return _0x1a0e0c?{'count':_0xf3e7db,'rows':_0x1a0e0c}:null;}})['then'](respondWithResult(_0x35ef8a,null))['catch'](handleError(_0x35ef8a,null));};exports[_0x1cff('0x51')]=function(_0x1f30d2,_0x53d8c9,_0x5a5697){return db[_0x1cff('0x27')][_0x1cff('0x52')]({'where':{'id':_0x1f30d2[_0x1cff('0x40')]['id']}})[_0x1cff('0x1e')](handleEntityNotFound(_0x53d8c9,null))[_0x1cff('0x1e')](function(_0x3e4649){if(_0x3e4649){return db['sequelize'][_0x1cff('0x53')](function(_0x20df33){return db[_0x1cff('0x27')][_0x1cff('0x22')]({'where':{'IntervalId':_0x1f30d2['params']['id']},'transaction':_0x20df33})[_0x1cff('0x1e')](function(_0x26e9a2){var _0x5d8e6f=_[_0x1cff('0x2d')](_0x1f30d2['body'],function(_0x4a0cce){delete _0x4a0cce['id'];_0x4a0cce[_0x1cff('0x4e')]=_0x1f30d2['params']['id'];return _0x4a0cce;});return db[_0x1cff('0x27')][_0x1cff('0x54')](_0x5d8e6f,{'transaction':_0x20df33});});})[_0x1cff('0x1e')](function(){return db[_0x1cff('0x27')][_0x1cff('0x3d')]({'where':{'IntervalId':_0x1f30d2[_0x1cff('0x40')]['id']}});});}})['then'](respondWithResult(_0x53d8c9,null))[_0x1cff('0x3f')](handleError(_0x53d8c9,null));};
\ No newline at end of file
index 321315b..8e386fc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe3c4=['string','then','all','map','ifTime','reduce','../../components/extensions/rewrite','../../utils/iftime','iftime','exports','define','Interval','tools_intervals','rewrite','interval'];(function(_0x13ea00,_0x12f610){var _0x1f7347=function(_0x34ae63){while(--_0x34ae63){_0x13ea00['push'](_0x13ea00['shift']());}};_0x1f7347(++_0x12f610);}(_0xe3c4,0xe7));var _0x4e3c=function(_0x58c2cf,_0x2677bd){_0x58c2cf=_0x58c2cf-0x0;var _0x5b1b1a=_0xe3c4[_0x58c2cf];return _0x5b1b1a;};'use strict';var attributes=require('./interval.attributes');var extensions=require(_0x4e3c('0x0'));var iftime=require(_0x4e3c('0x1'))[_0x4e3c('0x2')];module[_0x4e3c('0x3')]=function(_0x2421a9){return _0x2421a9[_0x4e3c('0x4')](_0x4e3c('0x5'),attributes,{'tableName':_0x4e3c('0x6'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x5b2fc1){extensions['rewrite'](_0x2421a9,_0x5b2fc1);},'afterBulkCreate':function(_0x5cab6c,_0x2035dc,_0x40029a){_0x40029a();extensions[_0x4e3c('0x7')](_0x2421a9,_0x5cab6c[0x0]);},'afterUpdate':function(_0xd2692d){extensions[_0x4e3c('0x7')](_0x2421a9,_0xd2692d);},'afterDestroy':function(_0x5cc141){extensions['rewrite'](_0x2421a9,_0x5cc141);}},'instanceMethods':{'ifTime':function(_0x4fe4c8=undefined,_0x46f477=new Date()){if(typeof this[_0x4e3c('0x8')]===_0x4e3c('0x9')){return iftime(this['interval'],_0x4fe4c8,_0x46f477);}else{return this['getIntervals']()[_0x4e3c('0xa')](function(_0x20f336){return Promise[_0x4e3c('0xb')](_0x20f336[_0x4e3c('0xc')](function(_0x8d3e9c){return _0x8d3e9c[_0x4e3c('0xd')](_0x4fe4c8,_0x46f477);}));})['then'](function(_0x1726fb){return _0x1726fb[_0x4e3c('0xe')](function(_0x12de75,_0x23bc9b){return _0x12de75||_0x23bc9b;},![]);});}}}});};
\ No newline at end of file
+var _0x7a60=['../../components/extensions/rewrite','../../utils/iftime','iftime','exports','define','Interval','tools_intervals','rewrite','string','interval','getIntervals','then','all','map','ifTime','reduce'];(function(_0xd0a95d,_0xd7e320){var _0x3c8f0a=function(_0x5e5935){while(--_0x5e5935){_0xd0a95d['push'](_0xd0a95d['shift']());}};_0x3c8f0a(++_0xd7e320);}(_0x7a60,0x150));var _0x07a6=function(_0xc9cac2,_0x5a6d0b){_0xc9cac2=_0xc9cac2-0x0;var _0x13ba8a=_0x7a60[_0xc9cac2];return _0x13ba8a;};'use strict';var attributes=require('./interval.attributes');var extensions=require(_0x07a6('0x0'));var iftime=require(_0x07a6('0x1'))[_0x07a6('0x2')];module[_0x07a6('0x3')]=function(_0x15c727){return _0x15c727[_0x07a6('0x4')](_0x07a6('0x5'),attributes,{'tableName':_0x07a6('0x6'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x140399){extensions[_0x07a6('0x7')](_0x15c727,_0x140399);},'afterBulkCreate':function(_0x155b23,_0x2d5da1,_0x414fee){_0x414fee();extensions['rewrite'](_0x15c727,_0x155b23[0x0]);},'afterUpdate':function(_0x1e195c){extensions['rewrite'](_0x15c727,_0x1e195c);},'afterDestroy':function(_0x58b61c){extensions[_0x07a6('0x7')](_0x15c727,_0x58b61c);}},'instanceMethods':{'ifTime':function(_0x541111=undefined,_0x53259f=new Date()){if(typeof this['interval']===_0x07a6('0x8')){return iftime(this[_0x07a6('0x9')],_0x541111,_0x53259f);}else{return this[_0x07a6('0xa')]()[_0x07a6('0xb')](function(_0x48ac36){return Promise[_0x07a6('0xc')](_0x48ac36[_0x07a6('0xd')](function(_0x37fbf5){return _0x37fbf5[_0x07a6('0xe')](_0x541111,_0x53259f);}));})[_0x07a6('0xb')](function(_0x24ce27){return _0x24ce27[_0x07a6('0xf')](function(_0x452b99,_0x18951c){return _0x452b99||_0x18951c;},![]);});}}}});};
\ No newline at end of file
index 1918d7e..fbf5fc5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9964=['info','debug','stringify','catch','message','find','ShowInterval','error','then','all','ifTime','format','IntervalIftime:\x20intervals\x20=\x20%s\x20(ids\x20=\x20%s)','join','findById','name','IntervalIftime','intervalIds','isArray','intervals','string','timezone','length','IntervalIftime:\x20interval\x20strings\x20=\x20%s','IntervalIftime:\x20timezone\x20=\x20%s','silly','resolve','reduce','util','../../mysqldb','../../utils/iftime','iftime','../../config/logger','rpc','GetInterval','Interval','findAll','options','raw','where','attributes','limit','include','map','model'];(function(_0x33554b,_0x48162b){var _0x256954=function(_0x185f66){while(--_0x185f66){_0x33554b['push'](_0x33554b['shift']());}};_0x256954(++_0x48162b);}(_0x9964,0x76));var _0x4996=function(_0x6c0123,_0x4c8d3b){_0x6c0123=_0x6c0123-0x0;var _0x5a87d2=_0x9964[_0x6c0123];return _0x5a87d2;};'use strict';var _=require('lodash');var util=require(_0x4996('0x0'));var db=require(_0x4996('0x1'))['db'];var iftime=require(_0x4996('0x2'))[_0x4996('0x3')];var logger=require(_0x4996('0x4'))(_0x4996('0x5'));exports[_0x4996('0x6')]=function(_0xc102a6){var _0xb650ce=this;return new Promise(function(_0x2f938a,_0x2c9738){return db[_0x4996('0x7')][_0x4996('0x8')]({'raw':_0xc102a6[_0x4996('0x9')]?_0xc102a6[_0x4996('0x9')][_0x4996('0xa')]===undefined?!![]:![]:!![],'where':_0xc102a6[_0x4996('0x9')]?_0xc102a6['options'][_0x4996('0xb')]||null:null,'attributes':_0xc102a6[_0x4996('0x9')]?_0xc102a6['options'][_0x4996('0xc')]||null:null,'limit':_0xc102a6[_0x4996('0x9')]?_0xc102a6['options'][_0x4996('0xd')]||null:null,'include':_0xc102a6['options']?_0xc102a6[_0x4996('0x9')][_0x4996('0xe')]?_[_0x4996('0xf')](_0xc102a6['options']['include'],function(_0x16ff47){return{'model':db[_0x16ff47['model']],'as':_0x16ff47['as'],'attributes':_0x16ff47[_0x4996('0xc')],'include':_0x16ff47[_0x4996('0xe')]?_[_0x4996('0xf')](_0x16ff47[_0x4996('0xe')],function(_0x366fc5){return{'model':db[_0x366fc5[_0x4996('0x10')]],'as':_0x366fc5['as'],'attributes':_0x366fc5[_0x4996('0xc')],'include':_0x366fc5[_0x4996('0xe')]?_[_0x4996('0xf')](_0x366fc5['include'],function(_0x1206f0){return{'model':db[_0x1206f0[_0x4996('0x10')]],'as':_0x1206f0['as'],'attributes':_0x1206f0[_0x4996('0xc')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2a1a09){logger[_0x4996('0x11')]('GetInterval',_0xc102a6);logger[_0x4996('0x12')](_0x4996('0x6'),_0xc102a6,JSON[_0x4996('0x13')](_0x2a1a09));_0x2f938a(_0x2a1a09);})[_0x4996('0x14')](function(_0x53b109){logger['error'](_0x4996('0x6'),_0x53b109[_0x4996('0x15')],_0xc102a6);_0x2c9738(_0xb650ce['error'](0x1f4,_0x53b109[_0x4996('0x15')]));});});};exports['ShowInterval']=function(_0x55a313){var _0x54254c=this;return new Promise(function(_0x2d5e43,_0x4f2f82){return db[_0x4996('0x7')][_0x4996('0x16')]({'raw':_0x55a313[_0x4996('0x9')]?_0x55a313[_0x4996('0x9')][_0x4996('0xa')]===undefined?!![]:![]:!![],'where':_0x55a313[_0x4996('0x9')]?_0x55a313['options'][_0x4996('0xb')]||null:null,'attributes':_0x55a313[_0x4996('0x9')]?_0x55a313[_0x4996('0x9')][_0x4996('0xc')]||null:null,'include':_0x55a313[_0x4996('0x9')]?_0x55a313[_0x4996('0x9')]['include']?_[_0x4996('0xf')](_0x55a313['options'][_0x4996('0xe')],function(_0x421b51){return{'model':db[_0x421b51[_0x4996('0x10')]],'as':_0x421b51['as'],'attributes':_0x421b51['attributes'],'include':_0x421b51['include']?_[_0x4996('0xf')](_0x421b51[_0x4996('0xe')],function(_0x24c42){return{'model':db[_0x24c42[_0x4996('0x10')]],'as':_0x24c42['as'],'attributes':_0x24c42[_0x4996('0xc')],'include':_0x24c42[_0x4996('0xe')]?_[_0x4996('0xf')](_0x24c42[_0x4996('0xe')],function(_0x32121e){return{'model':db[_0x32121e[_0x4996('0x10')]],'as':_0x32121e['as'],'attributes':_0x32121e[_0x4996('0xc')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x453a92){logger[_0x4996('0x11')](_0x4996('0x17'),_0x55a313);logger[_0x4996('0x12')]('ShowInterval',_0x55a313,JSON[_0x4996('0x13')](_0x453a92));_0x2d5e43(_0x453a92);})[_0x4996('0x14')](function(_0x50d707){logger[_0x4996('0x18')](_0x4996('0x17'),_0x50d707[_0x4996('0x15')],_0x55a313);_0x4f2f82(_0x54254c[_0x4996('0x18')](0x1f4,_0x50d707[_0x4996('0x15')]));});});};function checkArrayOfIntervals(_0x1c8c25,_0x30ffbe){var _0x22ebb2=[];return db[_0x4996('0x7')][_0x4996('0x8')]({'where':{'id':_0x1c8c25}})[_0x4996('0x19')](function(_0x3ade4c){_0x22ebb2=_0x3ade4c;return Promise[_0x4996('0x1a')](_0x22ebb2[_0x4996('0xf')](function(_0x4f9781){return _0x4f9781[_0x4996('0x1b')](_0x30ffbe);}));})[_0x4996('0x19')](function(_0x1f616c){var _0x5c8497=_0x1f616c['reduce'](function(_0x22c8a0,_0x14b732){return _0x22c8a0||_0x14b732;},![]);logger[_0x4996('0x11')](util[_0x4996('0x1c')](_0x4996('0x1d'),_0x22ebb2[_0x4996('0xf')](function(_0x4a4003){return _0x4a4003['name'];})[_0x4996('0x1e')](',\x20'),_0x22ebb2[_0x4996('0xf')](function(_0x58fad5){return _0x58fad5['id'];})[_0x4996('0x1e')](',\x20')));return _0x5c8497;});}function checkSingleInterval(_0x537eb4,_0x2b833f){return db['Interval'][_0x4996('0x1f')](_0x537eb4)['then'](function(_0x447211){if(_0x447211){logger[_0x4996('0x11')](util[_0x4996('0x1c')]('IntervalIftime:\x20interval\x20=\x20%s\x20(id\x20=\x20%s)',_0x447211[_0x4996('0x20')],_0x447211['id']));return _0x447211[_0x4996('0x1b')](_0x2b833f);}});}exports[_0x4996('0x21')]=function(_0x1929e7){var _0x225342=_0x1929e7[_0x4996('0x22')];var _0x23bc7a=Array[_0x4996('0x23')](_0x1929e7['intervals'])?_0x1929e7[_0x4996('0x24')]:typeof _0x1929e7[_0x4996('0x24')]===_0x4996('0x25')?[_0x1929e7[_0x4996('0x24')]]:[];var _0xdcea16=_0x1929e7[_0x4996('0x26')]||undefined;var _0xe4f9e7=![];if(_0x23bc7a[_0x4996('0x27')]){logger[_0x4996('0x11')](util['format'](_0x4996('0x28'),_0x23bc7a[_0x4996('0x1e')](';\x20')));}if(_0xdcea16){logger[_0x4996('0x11')](util[_0x4996('0x1c')](_0x4996('0x29'),_0xdcea16));}logger[_0x4996('0x12')]('Iftime',_0xe4f9e7);logger[_0x4996('0x2a')](_0x4996('0x21'),_0x1929e7);return Promise[_0x4996('0x2b')]()[_0x4996('0x19')](function(){if(Array[_0x4996('0x23')](_0x225342)){return checkArrayOfIntervals(_0x225342,_0xdcea16);}else if(_0x225342){return checkSingleInterval(_0x225342,_0xdcea16);}})[_0x4996('0x19')](function(_0x20b3ca){var _0x4980c8=_0x23bc7a[_0x4996('0x2c')](function(_0x977f51,_0x2cb0ad){return _0x977f51||iftime(_0x2cb0ad,_0xdcea16);},![]);_0xe4f9e7=_0x20b3ca||_0x4980c8;return _0xe4f9e7;})['catch'](function(_0x2eb981){logger[_0x4996('0x18')]('IntervalIftime',_0x1929e7,_0x2eb981);throw this[_0x4996('0x18')](0x1f4,_0x2eb981['message']);});};
\ No newline at end of file
+var _0x53f4=['reduce','IntervalIftime:\x20intervals\x20=\x20%s\x20(ids\x20=\x20%s)','name','join','findById','format','IntervalIftime:\x20interval\x20=\x20%s\x20(id\x20=\x20%s)','ifTime','isArray','intervals','timezone','length','IntervalIftime:\x20interval\x20strings\x20=\x20%s','IntervalIftime:\x20timezone\x20=\x20%s','Iftime','silly','IntervalIftime','resolve','lodash','util','../../mysqldb','../../utils/iftime','iftime','../../config/logger','rpc','GetInterval','Interval','findAll','options','raw','where','attributes','limit','include','model','map','then','info','debug','catch','message','error','find','ShowInterval','stringify','all'];(function(_0xe37814,_0x3f8f6a){var _0x3d7ebc=function(_0x5c1b42){while(--_0x5c1b42){_0xe37814['push'](_0xe37814['shift']());}};_0x3d7ebc(++_0x3f8f6a);}(_0x53f4,0x154));var _0x453f=function(_0x5b06c5,_0x2f3afe){_0x5b06c5=_0x5b06c5-0x0;var _0x247879=_0x53f4[_0x5b06c5];return _0x247879;};'use strict';var _=require(_0x453f('0x0'));var util=require(_0x453f('0x1'));var db=require(_0x453f('0x2'))['db'];var iftime=require(_0x453f('0x3'))[_0x453f('0x4')];var logger=require(_0x453f('0x5'))(_0x453f('0x6'));exports[_0x453f('0x7')]=function(_0x3eaa30){var _0x4f9656=this;return new Promise(function(_0x27d5e7,_0x273a0d){return db[_0x453f('0x8')][_0x453f('0x9')]({'raw':_0x3eaa30[_0x453f('0xa')]?_0x3eaa30[_0x453f('0xa')][_0x453f('0xb')]===undefined?!![]:![]:!![],'where':_0x3eaa30[_0x453f('0xa')]?_0x3eaa30[_0x453f('0xa')][_0x453f('0xc')]||null:null,'attributes':_0x3eaa30[_0x453f('0xa')]?_0x3eaa30['options'][_0x453f('0xd')]||null:null,'limit':_0x3eaa30[_0x453f('0xa')]?_0x3eaa30[_0x453f('0xa')][_0x453f('0xe')]||null:null,'include':_0x3eaa30['options']?_0x3eaa30[_0x453f('0xa')]['include']?_['map'](_0x3eaa30[_0x453f('0xa')][_0x453f('0xf')],function(_0x145ef2){return{'model':db[_0x145ef2[_0x453f('0x10')]],'as':_0x145ef2['as'],'attributes':_0x145ef2[_0x453f('0xd')],'include':_0x145ef2[_0x453f('0xf')]?_[_0x453f('0x11')](_0x145ef2[_0x453f('0xf')],function(_0x3d78cf){return{'model':db[_0x3d78cf[_0x453f('0x10')]],'as':_0x3d78cf['as'],'attributes':_0x3d78cf[_0x453f('0xd')],'include':_0x3d78cf['include']?_[_0x453f('0x11')](_0x3d78cf['include'],function(_0x45fd31){return{'model':db[_0x45fd31[_0x453f('0x10')]],'as':_0x45fd31['as'],'attributes':_0x45fd31[_0x453f('0xd')]};}):[]};}):[]};}):[]:[]})[_0x453f('0x12')](function(_0x575e01){logger[_0x453f('0x13')]('GetInterval',_0x3eaa30);logger[_0x453f('0x14')](_0x453f('0x7'),_0x3eaa30,JSON['stringify'](_0x575e01));_0x27d5e7(_0x575e01);})[_0x453f('0x15')](function(_0x22c73d){logger['error'](_0x453f('0x7'),_0x22c73d[_0x453f('0x16')],_0x3eaa30);_0x273a0d(_0x4f9656[_0x453f('0x17')](0x1f4,_0x22c73d['message']));});});};exports['ShowInterval']=function(_0x50f64e){var _0x22bfe3=this;return new Promise(function(_0x216ab0,_0x32123a){return db['Interval'][_0x453f('0x18')]({'raw':_0x50f64e['options']?_0x50f64e['options'][_0x453f('0xb')]===undefined?!![]:![]:!![],'where':_0x50f64e[_0x453f('0xa')]?_0x50f64e[_0x453f('0xa')][_0x453f('0xc')]||null:null,'attributes':_0x50f64e['options']?_0x50f64e[_0x453f('0xa')][_0x453f('0xd')]||null:null,'include':_0x50f64e[_0x453f('0xa')]?_0x50f64e['options'][_0x453f('0xf')]?_[_0x453f('0x11')](_0x50f64e[_0x453f('0xa')][_0x453f('0xf')],function(_0x382b75){return{'model':db[_0x382b75[_0x453f('0x10')]],'as':_0x382b75['as'],'attributes':_0x382b75[_0x453f('0xd')],'include':_0x382b75[_0x453f('0xf')]?_[_0x453f('0x11')](_0x382b75[_0x453f('0xf')],function(_0x157f56){return{'model':db[_0x157f56[_0x453f('0x10')]],'as':_0x157f56['as'],'attributes':_0x157f56[_0x453f('0xd')],'include':_0x157f56[_0x453f('0xf')]?_[_0x453f('0x11')](_0x157f56[_0x453f('0xf')],function(_0x3ffdf7){return{'model':db[_0x3ffdf7['model']],'as':_0x3ffdf7['as'],'attributes':_0x3ffdf7[_0x453f('0xd')]};}):[]};}):[]};}):[]:[]})[_0x453f('0x12')](function(_0x20d35a){logger['info'](_0x453f('0x19'),_0x50f64e);logger[_0x453f('0x14')]('ShowInterval',_0x50f64e,JSON[_0x453f('0x1a')](_0x20d35a));_0x216ab0(_0x20d35a);})[_0x453f('0x15')](function(_0x5b3295){logger[_0x453f('0x17')]('ShowInterval',_0x5b3295[_0x453f('0x16')],_0x50f64e);_0x32123a(_0x22bfe3['error'](0x1f4,_0x5b3295['message']));});});};function checkArrayOfIntervals(_0x453cb3,_0x504f73){var _0xf47c28=[];return db[_0x453f('0x8')]['findAll']({'where':{'id':_0x453cb3}})[_0x453f('0x12')](function(_0x26f788){_0xf47c28=_0x26f788;return Promise[_0x453f('0x1b')](_0xf47c28['map'](function(_0x4327b3){return _0x4327b3['ifTime'](_0x504f73);}));})['then'](function(_0x486ee7){var _0x3a4c9a=_0x486ee7[_0x453f('0x1c')](function(_0x5e7c1c,_0x4372e4){return _0x5e7c1c||_0x4372e4;},![]);logger[_0x453f('0x13')](util['format'](_0x453f('0x1d'),_0xf47c28['map'](function(_0x1eae5b){return _0x1eae5b[_0x453f('0x1e')];})[_0x453f('0x1f')](',\x20'),_0xf47c28[_0x453f('0x11')](function(_0x5c23f2){return _0x5c23f2['id'];})[_0x453f('0x1f')](',\x20')));return _0x3a4c9a;});}function checkSingleInterval(_0x556b93,_0x573c9c){return db['Interval'][_0x453f('0x20')](_0x556b93)[_0x453f('0x12')](function(_0x4e0345){if(_0x4e0345){logger[_0x453f('0x13')](util[_0x453f('0x21')](_0x453f('0x22'),_0x4e0345[_0x453f('0x1e')],_0x4e0345['id']));return _0x4e0345[_0x453f('0x23')](_0x573c9c);}});}exports['IntervalIftime']=function(_0x361b79){var _0x3b871b=_0x361b79['intervalIds'];var _0x2d3bd4=Array[_0x453f('0x24')](_0x361b79['intervals'])?_0x361b79[_0x453f('0x25')]:typeof _0x361b79['intervals']==='string'?[_0x361b79[_0x453f('0x25')]]:[];var _0x5a4944=_0x361b79[_0x453f('0x26')]||undefined;var _0x1bc08d=![];if(_0x2d3bd4[_0x453f('0x27')]){logger[_0x453f('0x13')](util['format'](_0x453f('0x28'),_0x2d3bd4['join'](';\x20')));}if(_0x5a4944){logger['info'](util[_0x453f('0x21')](_0x453f('0x29'),_0x5a4944));}logger['debug'](_0x453f('0x2a'),_0x1bc08d);logger[_0x453f('0x2b')](_0x453f('0x2c'),_0x361b79);return Promise[_0x453f('0x2d')]()[_0x453f('0x12')](function(){if(Array[_0x453f('0x24')](_0x3b871b)){return checkArrayOfIntervals(_0x3b871b,_0x5a4944);}else if(_0x3b871b){return checkSingleInterval(_0x3b871b,_0x5a4944);}})[_0x453f('0x12')](function(_0x48c3d3){var _0x19b6d8=_0x2d3bd4[_0x453f('0x1c')](function(_0x3de288,_0x6690de){return _0x3de288||iftime(_0x6690de,_0x5a4944);},![]);_0x1bc08d=_0x48c3d3||_0x19b6d8;return _0x1bc08d;})[_0x453f('0x15')](function(_0x3cb859){logger['error'](_0x453f('0x2c'),_0x361b79,_0x3cb859);throw this[_0x453f('0x17')](0x1f4,_0x3cb859[_0x453f('0x16')]);});};
\ No newline at end of file
index 0d13493..4e02cb2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdb28=['isAuthenticated','send','exports','express','Router','../../components/auth/service','./jira.controller'];(function(_0x660756,_0x4ee39a){var _0x122fd2=function(_0x21a861){while(--_0x21a861){_0x660756['push'](_0x660756['shift']());}};_0x122fd2(++_0x4ee39a);}(_0xdb28,0x106));var _0x8db2=function(_0x3854c2,_0x15e92b){_0x3854c2=_0x3854c2-0x0;var _0xdf8965=_0xdb28[_0x3854c2];return _0xdf8965;};'use strict';var express=require(_0x8db2('0x0'));var router=express[_0x8db2('0x1')]();var auth=require(_0x8db2('0x2'));var controller=require(_0x8db2('0x3'));router['post']('/',auth[_0x8db2('0x4')](),controller[_0x8db2('0x5')]);module[_0x8db2('0x6')]=router;
\ No newline at end of file
+var _0x2032=['isAuthenticated','send','Router','../../components/auth/service','./jira.controller'];(function(_0x3aa8c7,_0x196daf){var _0x37f502=function(_0x5d595d){while(--_0x5d595d){_0x3aa8c7['push'](_0x3aa8c7['shift']());}};_0x37f502(++_0x196daf);}(_0x2032,0xd9));var _0x2203=function(_0x3f9b0e,_0x205b6f){_0x3f9b0e=_0x3f9b0e-0x0;var _0x2d12ec=_0x2032[_0x3f9b0e];return _0x2d12ec;};'use strict';var express=require('express');var router=express[_0x2203('0x0')]();var auth=require(_0x2203('0x1'));var controller=require(_0x2203('0x2'));router['post']('/',auth[_0x2203('0x3')](),controller[_0x2203('0x4')]);module['exports']=router;
\ No newline at end of file
index 809233f..b6e9070 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x50b4=['base64','request','setEncoding','utf8','end','status','json','parse','Error\x20during\x20license\x20request.\x20Please\x20contact\x20our\x20license\x20team\x20at\x20license@xcally.com\x20with\x20your\x20request','api.jira','write','openIssue','x-forwarded-for','connection','socket','remoteAddress','body','https','../../config/logger','api','support','3eAmWpBVP0','key','summary','Report','\x20from\x20','stringify','issuetype','Bug','fields','customfield_11500','customfield_11501','oldToken','customfield_11502','newToken','customfield_11503','name','customfield_11504','reason','customfield_10102','/rest/api/2/issue','POST'];(function(_0x5f10b4,_0x22270e){var _0x1c9424=function(_0x2ade8a){while(--_0x2ade8a){_0x5f10b4['push'](_0x5f10b4['shift']());}};_0x1c9424(++_0x22270e);}(_0x50b4,0xe3));var _0x450b=function(_0x27d0d6,_0xc29871){_0x27d0d6=_0x27d0d6-0x0;var _0x8c2773=_0x50b4[_0x27d0d6];return _0x8c2773;};'use strict';var BPromise=require('bluebird');var https=require(_0x450b('0x0'));var logger=require(_0x450b('0x1'))(_0x450b('0x2'));var USERNAME=_0x450b('0x3');var PASSWORD=_0x450b('0x4');function openIssue(_0x5c487d,_0x795248){var _0x284372={'fields':{'project':{'key':_0x5c487d[_0x450b('0x5')]||'MOTGUI'},'summary':(_0x5c487d[_0x450b('0x6')]||_0x450b('0x7'))+_0x450b('0x8')+_0x5c487d['ip'],'description':_0x5c487d['description']||JSON[_0x450b('0x9')](_0x5c487d),'issuetype':{'name':_0x5c487d[_0x450b('0xa')]||_0x450b('0xb')}}};_0x284372[_0x450b('0xc')][_0x450b('0xd')]=_0x5c487d['email'];_0x284372[_0x450b('0xc')][_0x450b('0xe')]=_0x5c487d[_0x450b('0xf')];_0x284372[_0x450b('0xc')][_0x450b('0x10')]=_0x5c487d[_0x450b('0x11')];_0x284372['fields'][_0x450b('0x12')]=_0x5c487d[_0x450b('0x13')];_0x284372[_0x450b('0xc')][_0x450b('0x14')]=_0x5c487d[_0x450b('0x15')];_0x284372[_0x450b('0xc')][_0x450b('0x16')]=_0x5c487d['ip'];var _0x22b055={'host':'track.xcallymotion.com','port':0x1bb,'path':_0x450b('0x17'),'method':_0x450b('0x18'),'timeout':0x4e20,'headers':{'Content-Type':'application/json','Authorization':'Basic\x20'+new Buffer(USERNAME+':'+PASSWORD)['toString'](_0x450b('0x19'))}};var _0x20ee4f=JSON['stringify'](_0x284372);var _0x1a3975=https[_0x450b('0x1a')](_0x22b055,function(_0x2a480b){_0x2a480b[_0x450b('0x1b')](_0x450b('0x1c'));var _0x227800='';_0x2a480b['on']('data',function(_0x2e354e){_0x227800+=_0x2e354e;});_0x2a480b['on'](_0x450b('0x1d'),function(){if(_0x795248){return _0x795248[_0x450b('0x1e')](_0x2a480b['statusCode'])[_0x450b('0x1f')](JSON[_0x450b('0x20')](_0x227800));}});});_0x1a3975['on']('error',function(_0x240164){if(_0x795248){return _0x795248[_0x450b('0x1e')](0x1f4)[_0x450b('0x1f')]({'errors':[{'message':_0x450b('0x21'),'type':_0x450b('0x22')}]});}});_0x1a3975[_0x450b('0x23')](_0x20ee4f);_0x1a3975[_0x450b('0x1d')]();}exports[_0x450b('0x24')]=openIssue;exports['send']=function(_0x4719b2,_0x27d998){_0x4719b2['body']['ip']=_0x4719b2['headers'][_0x450b('0x25')]||_0x4719b2[_0x450b('0x26')]['remoteAddress']||_0x4719b2[_0x450b('0x27')][_0x450b('0x28')]||_0x4719b2['connection'][_0x450b('0x27')][_0x450b('0x28')];return openIssue(_0x4719b2[_0x450b('0x29')],_0x27d998);};
\ No newline at end of file
+var _0x1526=['request','setEncoding','utf8','data','end','status','json','parse','error','api.jira','openIssue','body','headers','x-forwarded-for','connection','remoteAddress','socket','bluebird','https','../../config/logger','support','3eAmWpBVP0','key','MOTGUI','\x20from\x20','description','stringify','issuetype','Bug','fields','email','customfield_11501','oldToken','customfield_11502','newToken','customfield_11503','name','customfield_11504','reason','track.xcallymotion.com','POST','application/json','Basic\x20','toString','base64'];(function(_0x1fa759,_0x4ecdce){var _0x2da9f4=function(_0x463e2a){while(--_0x463e2a){_0x1fa759['push'](_0x1fa759['shift']());}};_0x2da9f4(++_0x4ecdce);}(_0x1526,0x11f));var _0x6152=function(_0xdee1f2,_0x24f55d){_0xdee1f2=_0xdee1f2-0x0;var _0x2b70a1=_0x1526[_0xdee1f2];return _0x2b70a1;};'use strict';var BPromise=require(_0x6152('0x0'));var https=require(_0x6152('0x1'));var logger=require(_0x6152('0x2'))('api');var USERNAME=_0x6152('0x3');var PASSWORD=_0x6152('0x4');function openIssue(_0x2fe6d9,_0x80da5b){var _0x1ea8a8={'fields':{'project':{'key':_0x2fe6d9[_0x6152('0x5')]||_0x6152('0x6')},'summary':(_0x2fe6d9['summary']||'Report')+_0x6152('0x7')+_0x2fe6d9['ip'],'description':_0x2fe6d9[_0x6152('0x8')]||JSON[_0x6152('0x9')](_0x2fe6d9),'issuetype':{'name':_0x2fe6d9[_0x6152('0xa')]||_0x6152('0xb')}}};_0x1ea8a8[_0x6152('0xc')]['customfield_11500']=_0x2fe6d9[_0x6152('0xd')];_0x1ea8a8[_0x6152('0xc')][_0x6152('0xe')]=_0x2fe6d9[_0x6152('0xf')];_0x1ea8a8[_0x6152('0xc')][_0x6152('0x10')]=_0x2fe6d9[_0x6152('0x11')];_0x1ea8a8[_0x6152('0xc')][_0x6152('0x12')]=_0x2fe6d9[_0x6152('0x13')];_0x1ea8a8[_0x6152('0xc')][_0x6152('0x14')]=_0x2fe6d9[_0x6152('0x15')];_0x1ea8a8['fields']['customfield_10102']=_0x2fe6d9['ip'];var _0x592ed9={'host':_0x6152('0x16'),'port':0x1bb,'path':'/rest/api/2/issue','method':_0x6152('0x17'),'timeout':0x4e20,'headers':{'Content-Type':_0x6152('0x18'),'Authorization':_0x6152('0x19')+new Buffer(USERNAME+':'+PASSWORD)[_0x6152('0x1a')](_0x6152('0x1b'))}};var _0x14232f=JSON[_0x6152('0x9')](_0x1ea8a8);var _0x33d840=https[_0x6152('0x1c')](_0x592ed9,function(_0x386abc){_0x386abc[_0x6152('0x1d')](_0x6152('0x1e'));var _0x1cdcbb='';_0x386abc['on'](_0x6152('0x1f'),function(_0x449caa){_0x1cdcbb+=_0x449caa;});_0x386abc['on'](_0x6152('0x20'),function(){if(_0x80da5b){return _0x80da5b[_0x6152('0x21')](_0x386abc['statusCode'])[_0x6152('0x22')](JSON[_0x6152('0x23')](_0x1cdcbb));}});});_0x33d840['on'](_0x6152('0x24'),function(_0x90c31){if(_0x80da5b){return _0x80da5b[_0x6152('0x21')](0x1f4)[_0x6152('0x22')]({'errors':[{'message':'Error\x20during\x20license\x20request.\x20Please\x20contact\x20our\x20license\x20team\x20at\x20license@xcally.com\x20with\x20your\x20request','type':_0x6152('0x25')}]});}});_0x33d840['write'](_0x14232f);_0x33d840[_0x6152('0x20')]();}exports[_0x6152('0x26')]=openIssue;exports['send']=function(_0x2c8f3,_0x56d854){_0x2c8f3[_0x6152('0x27')]['ip']=_0x2c8f3[_0x6152('0x28')][_0x6152('0x29')]||_0x2c8f3[_0x6152('0x2a')][_0x6152('0x2b')]||_0x2c8f3['socket'][_0x6152('0x2b')]||_0x2c8f3['connection'][_0x6152('0x2c')][_0x6152('0x2b')];return openIssue(_0x2c8f3[_0x6152('0x27')],_0x56d854);};
\ No newline at end of file
index e8185ee..f777ed0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4ea3=['multer','util','path','connect-timeout','Router','../../components/auth/service','./jscriptyAnswerReport.controller','get','isAuthenticated','index','/describe','/:id','post','update','destroy','exports'];(function(_0x59342a,_0x16827b){var _0x17abc9=function(_0x2f7bfc){while(--_0x2f7bfc){_0x59342a['push'](_0x59342a['shift']());}};_0x17abc9(++_0x16827b);}(_0x4ea3,0x70));var _0x34ea=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x4ea3[_0x3b380d];return _0x54502b;};'use strict';var multer=require(_0x34ea('0x0'));var util=require(_0x34ea('0x1'));var path=require(_0x34ea('0x2'));var timeout=require(_0x34ea('0x3'));var express=require('express');var router=express[_0x34ea('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x34ea('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x34ea('0x6'));router[_0x34ea('0x7')]('/',auth[_0x34ea('0x8')](),controller[_0x34ea('0x9')]);router[_0x34ea('0x7')](_0x34ea('0xa'),auth[_0x34ea('0x8')](),controller['describe']);router[_0x34ea('0x7')](_0x34ea('0xb'),auth[_0x34ea('0x8')](),controller['show']);router[_0x34ea('0xc')]('/',auth[_0x34ea('0x8')](),controller['create']);router['put'](_0x34ea('0xb'),auth[_0x34ea('0x8')](),controller[_0x34ea('0xd')]);router['delete'](_0x34ea('0xb'),auth[_0x34ea('0x8')](),controller[_0x34ea('0xe')]);module[_0x34ea('0xf')]=router;
\ No newline at end of file
+var _0x17ba=['/describe','describe','/:id','show','create','put','update','delete','destroy','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptyAnswerReport.controller','get','isAuthenticated','index'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x17ba,0xab));var _0xa17b=function(_0x5152b6,_0x14004e){_0x5152b6=_0x5152b6-0x0;var _0x9fadb9=_0x17ba[_0x5152b6];return _0x9fadb9;};'use strict';var multer=require(_0xa17b('0x0'));var util=require(_0xa17b('0x1'));var path=require('path');var timeout=require(_0xa17b('0x2'));var express=require(_0xa17b('0x3'));var router=express[_0xa17b('0x4')]();var fs_extra=require(_0xa17b('0x5'));var auth=require(_0xa17b('0x6'));var interaction=require(_0xa17b('0x7'));var config=require(_0xa17b('0x8'));var controller=require(_0xa17b('0x9'));router[_0xa17b('0xa')]('/',auth[_0xa17b('0xb')](),controller[_0xa17b('0xc')]);router[_0xa17b('0xa')](_0xa17b('0xd'),auth[_0xa17b('0xb')](),controller[_0xa17b('0xe')]);router[_0xa17b('0xa')](_0xa17b('0xf'),auth[_0xa17b('0xb')](),controller[_0xa17b('0x10')]);router['post']('/',auth[_0xa17b('0xb')](),controller[_0xa17b('0x11')]);router[_0xa17b('0x12')](_0xa17b('0xf'),auth[_0xa17b('0xb')](),controller[_0xa17b('0x13')]);router[_0xa17b('0x14')]('/:id',auth[_0xa17b('0xb')](),controller[_0xa17b('0x15')]);module[_0xa17b('0x16')]=router;
\ No newline at end of file
index 9f87350..23851f2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['long','STRING','sequelize','exports','TEXT'];(function(_0x2235bf,_0x3a06a7){var _0x4c3a64=function(_0x3b3bb6){while(--_0x3b3bb6){_0x2235bf['push'](_0x2235bf['shift']());}};_0x4c3a64(++_0x3a06a7);}(_0x7a54,0x106));var _0x47a5=function(_0x3eb937,_0x277135){_0x3eb937=_0x3eb937-0x0;var _0xe16869=_0x7a54[_0x3eb937];return _0xe16869;};'use strict';var Sequelize=require(_0x47a5('0x0'));module[_0x47a5('0x1')]={'question':{'type':Sequelize[_0x47a5('0x2')]},'answer':{'type':Sequelize['TEXT'](_0x47a5('0x3'))},'membername':{'type':Sequelize[_0x47a5('0x4')]},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x47a5('0x4')]},'uniqueid':{'type':Sequelize[_0x47a5('0x4')]},'calleridname':{'type':Sequelize[_0x47a5('0x4')]},'calleridnum':{'type':Sequelize[_0x47a5('0x4')]},'questionId':{'type':Sequelize[_0x47a5('0x4')]}};
\ No newline at end of file
+var _0x7a54=['long','STRING','sequelize','exports','TEXT'];(function(_0x21549c,_0x6d64d1){var _0x426cbd=function(_0x323f5b){while(--_0x323f5b){_0x21549c['push'](_0x21549c['shift']());}};_0x426cbd(++_0x6d64d1);}(_0x7a54,0x106));var _0x47a5=function(_0x507524,_0xc54ab7){_0x507524=_0x507524-0x0;var _0x45e295=_0x7a54[_0x507524];return _0x45e295;};'use strict';var Sequelize=require(_0x47a5('0x0'));module[_0x47a5('0x1')]={'question':{'type':Sequelize[_0x47a5('0x2')]},'answer':{'type':Sequelize['TEXT'](_0x47a5('0x3'))},'membername':{'type':Sequelize[_0x47a5('0x4')]},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x47a5('0x4')]},'uniqueid':{'type':Sequelize[_0x47a5('0x4')]},'calleridname':{'type':Sequelize[_0x47a5('0x4')]},'calleridnum':{'type':Sequelize[_0x47a5('0x4')]},'questionId':{'type':Sequelize[_0x47a5('0x4')]}};
\ No newline at end of file
index fe8532e..8147ecb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd9ef=['describe','eml-format','rimraf','fast-json-patch','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','update','then','error','map','fieldName','type','key','name','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','VIRTUAL','filter','options','JscriptyAnswerReport','includeAll','include','findAll','rows','catch','show','params','keys','rawAttributes','find','body','destroy'];(function(_0x19921b,_0x5c0c2d){var _0x273545=function(_0x387462){while(--_0x387462){_0x19921b['push'](_0x19921b['shift']());}};_0x273545(++_0x5c0c2d);}(_0xd9ef,0x95));var _0xfd9e=function(_0x2cfc5a,_0x4bea57){_0x2cfc5a=_0x2cfc5a-0x0;var _0x44d603=_0xd9ef[_0x2cfc5a];return _0x44d603;};'use strict';var emlformat=require(_0xfd9e('0x0'));var rimraf=require(_0xfd9e('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xfd9e('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xfd9e('0x3'));var util=require(_0xfd9e('0x4'));var path=require(_0xfd9e('0x5'));var sox=require(_0xfd9e('0x6'));var csv=require(_0xfd9e('0x7'));var ejs=require(_0xfd9e('0x8'));var fs=require('fs');var fs_extra=require(_0xfd9e('0x9'));var _=require(_0xfd9e('0xa'));var squel=require(_0xfd9e('0xb'));var crypto=require(_0xfd9e('0xc'));var jsforce=require(_0xfd9e('0xd'));var deskjs=require(_0xfd9e('0xe'));var toCsv=require(_0xfd9e('0x7'));var querystring=require('querystring');var Papa=require(_0xfd9e('0xf'));var Redis=require(_0xfd9e('0x10'));var authService=require('../../components/auth/service');var qs=require(_0xfd9e('0x11'));var as=require(_0xfd9e('0x12'));var hardwareService=require(_0xfd9e('0x13'));var logger=require('../../config/logger')(_0xfd9e('0x14'));var utils=require(_0xfd9e('0x15'));var config=require(_0xfd9e('0x16'));var licenseUtil=require(_0xfd9e('0x17'));var db=require(_0xfd9e('0x18'))['db'];function respondWithStatusCode(_0x5c2f96,_0x3d76bb){_0x3d76bb=_0x3d76bb||0xcc;return function(_0x19d0e6){if(_0x19d0e6){return _0x5c2f96[_0xfd9e('0x19')](_0x3d76bb);}return _0x5c2f96[_0xfd9e('0x1a')](_0x3d76bb)[_0xfd9e('0x1b')]();};}function respondWithResult(_0x5087b8,_0x94224a){_0x94224a=_0x94224a||0xc8;return function(_0x3df6fa){if(_0x3df6fa){return _0x5087b8[_0xfd9e('0x1a')](_0x94224a)[_0xfd9e('0x1c')](_0x3df6fa);}};}function respondWithFilteredResult(_0x585d6d,_0x1577ba){return function(_0x4cf251){if(_0x4cf251){var _0x5e7d67=typeof _0x1577ba[_0xfd9e('0x1d')]===_0xfd9e('0x1e')&&typeof _0x1577ba[_0xfd9e('0x1f')]==='undefined';var _0x3c329e=_0x4cf251[_0xfd9e('0x20')];var _0x64c8f6=_0x5e7d67?0x0:_0x1577ba[_0xfd9e('0x1d')];var _0x3de235=_0x5e7d67?_0x4cf251[_0xfd9e('0x20')]:_0x1577ba[_0xfd9e('0x1d')]+_0x1577ba['limit'];var _0x44ae3c;if(_0x3de235>=_0x3c329e){_0x3de235=_0x3c329e;_0x44ae3c=0xc8;}else{_0x44ae3c=0xce;}_0x585d6d[_0xfd9e('0x1a')](_0x44ae3c);return _0x585d6d[_0xfd9e('0x21')](_0xfd9e('0x22'),_0x64c8f6+'-'+_0x3de235+'/'+_0x3c329e)[_0xfd9e('0x1c')](_0x4cf251);}return null;};}function patchUpdates(_0x2e48da){return function(_0x16213b){try{jsonpatch[_0xfd9e('0x23')](_0x16213b,_0x2e48da,!![]);}catch(_0x46fb76){return BPromise[_0xfd9e('0x24')](_0x46fb76);}return _0x16213b['save']();};}function saveUpdates(_0x2afb3c,_0x24bc2c){return function(_0x140992){if(_0x140992){return _0x140992[_0xfd9e('0x25')](_0x2afb3c)[_0xfd9e('0x26')](function(_0x4d9ea4){return _0x4d9ea4;});}return null;};}function removeEntity(_0x19b72d,_0x40ef13){return function(_0x4c465e){if(_0x4c465e){return _0x4c465e['destroy']()[_0xfd9e('0x26')](function(){_0x19b72d[_0xfd9e('0x1a')](0xcc)[_0xfd9e('0x1b')]();});}};}function handleEntityNotFound(_0x16768a,_0x14fd94){return function(_0x4b83e0){if(!_0x4b83e0){_0x16768a[_0xfd9e('0x19')](0x194);}return _0x4b83e0;};}function handleError(_0x2c7f53,_0x9bf44f){_0x9bf44f=_0x9bf44f||0x1f4;return function(_0x33b57a){logger[_0xfd9e('0x27')](_0x33b57a['stack']);if(_0x33b57a['name']){delete _0x33b57a['name'];}_0x2c7f53[_0xfd9e('0x1a')](_0x9bf44f)['send'](_0x33b57a);};}exports['index']=function(_0x2f35ee,_0x143ae7){var _0x53272f={},_0x1f4193={},_0x2e49e2={'count':0x0,'rows':[]};var _0x303718=_[_0xfd9e('0x28')](db['JscriptyAnswerReport']['rawAttributes'],function(_0x182c58){return{'name':_0x182c58[_0xfd9e('0x29')],'type':_0x182c58[_0xfd9e('0x2a')][_0xfd9e('0x2b')]};});_0x1f4193['model']=_[_0xfd9e('0x28')](_0x303718,_0xfd9e('0x2c'));_0x1f4193['query']=_['keys'](_0x2f35ee[_0xfd9e('0x2d')]);_0x1f4193[_0xfd9e('0x2e')]=_[_0xfd9e('0x2f')](_0x1f4193[_0xfd9e('0x30')],_0x1f4193[_0xfd9e('0x2d')]);_0x53272f[_0xfd9e('0x31')]=_[_0xfd9e('0x2f')](_0x1f4193[_0xfd9e('0x30')],qs[_0xfd9e('0x32')](_0x2f35ee['query'][_0xfd9e('0x32')]));_0x53272f[_0xfd9e('0x31')]=_0x53272f[_0xfd9e('0x31')][_0xfd9e('0x33')]?_0x53272f[_0xfd9e('0x31')]:_0x1f4193[_0xfd9e('0x30')];if(!_0x2f35ee[_0xfd9e('0x2d')][_0xfd9e('0x34')](_0xfd9e('0x35'))){_0x53272f[_0xfd9e('0x1f')]=qs[_0xfd9e('0x1f')](_0x2f35ee['query']['limit']);_0x53272f['offset']=qs[_0xfd9e('0x1d')](_0x2f35ee[_0xfd9e('0x2d')]['offset']);}_0x53272f['order']=qs['sort'](_0x2f35ee[_0xfd9e('0x2d')][_0xfd9e('0x36')]);_0x53272f[_0xfd9e('0x37')]=qs[_0xfd9e('0x2e')](_[_0xfd9e('0x38')](_0x2f35ee[_0xfd9e('0x2d')],_0x1f4193[_0xfd9e('0x2e')]),_0x303718);if(_0x2f35ee['query']['filter']){_0x53272f[_0xfd9e('0x37')]=_['merge'](_0x53272f[_0xfd9e('0x37')],{'$or':_[_0xfd9e('0x28')](_0x303718,function(_0x1d2f1e){if(_0x1d2f1e[_0xfd9e('0x2a')]!==_0xfd9e('0x39')){var _0x660200={};_0x660200[_0x1d2f1e['name']]={'$like':'%'+_0x2f35ee['query'][_0xfd9e('0x3a')]+'%'};return _0x660200;}})});}_0x53272f=_['merge']({},_0x53272f,_0x2f35ee[_0xfd9e('0x3b')]);var _0x28845a={'where':_0x53272f[_0xfd9e('0x37')]};return db[_0xfd9e('0x3c')][_0xfd9e('0x20')](_0x28845a)[_0xfd9e('0x26')](function(_0x182cc8){_0x2e49e2[_0xfd9e('0x20')]=_0x182cc8;if(_0x2f35ee[_0xfd9e('0x2d')][_0xfd9e('0x3d')]){_0x53272f[_0xfd9e('0x3e')]=[{'all':!![]}];}return db['JscriptyAnswerReport'][_0xfd9e('0x3f')](_0x53272f);})[_0xfd9e('0x26')](function(_0x29e2a2){_0x2e49e2[_0xfd9e('0x40')]=_0x29e2a2;return _0x2e49e2;})[_0xfd9e('0x26')](respondWithFilteredResult(_0x143ae7,_0x53272f))[_0xfd9e('0x41')](handleError(_0x143ae7,null));};exports[_0xfd9e('0x42')]=function(_0xe7728f,_0x4272d9){var _0x101d8e={'raw':!![],'where':{'id':_0xe7728f[_0xfd9e('0x43')]['id']}},_0x27c587={};_0x27c587[_0xfd9e('0x30')]=_[_0xfd9e('0x44')](db[_0xfd9e('0x3c')][_0xfd9e('0x45')]);_0x27c587[_0xfd9e('0x2d')]=_[_0xfd9e('0x44')](_0xe7728f[_0xfd9e('0x2d')]);_0x27c587[_0xfd9e('0x2e')]=_[_0xfd9e('0x2f')](_0x27c587[_0xfd9e('0x30')],_0x27c587['query']);_0x101d8e['attributes']=_['intersection'](_0x27c587[_0xfd9e('0x30')],qs[_0xfd9e('0x32')](_0xe7728f[_0xfd9e('0x2d')][_0xfd9e('0x32')]));_0x101d8e['attributes']=_0x101d8e['attributes'][_0xfd9e('0x33')]?_0x101d8e[_0xfd9e('0x31')]:_0x27c587['model'];if(_0xe7728f['query']['includeAll']){_0x101d8e[_0xfd9e('0x3e')]=[{'all':!![]}];}_0x101d8e=_['merge']({},_0x101d8e,_0xe7728f[_0xfd9e('0x3b')]);return db['JscriptyAnswerReport'][_0xfd9e('0x46')](_0x101d8e)[_0xfd9e('0x26')](handleEntityNotFound(_0x4272d9,null))[_0xfd9e('0x26')](respondWithResult(_0x4272d9,null))[_0xfd9e('0x41')](handleError(_0x4272d9,null));};exports['create']=function(_0x2763aa,_0x103dc9){return db[_0xfd9e('0x3c')]['create'](_0x2763aa[_0xfd9e('0x47')],{})[_0xfd9e('0x26')](respondWithResult(_0x103dc9,0xc9))[_0xfd9e('0x41')](handleError(_0x103dc9,null));};exports[_0xfd9e('0x25')]=function(_0x11d471,_0x2e8834){if(_0x11d471[_0xfd9e('0x47')]['id']){delete _0x11d471[_0xfd9e('0x47')]['id'];}return db[_0xfd9e('0x3c')][_0xfd9e('0x46')]({'where':{'id':_0x11d471[_0xfd9e('0x43')]['id']}})[_0xfd9e('0x26')](handleEntityNotFound(_0x2e8834,null))[_0xfd9e('0x26')](saveUpdates(_0x11d471[_0xfd9e('0x47')],null))[_0xfd9e('0x26')](respondWithResult(_0x2e8834,null))[_0xfd9e('0x41')](handleError(_0x2e8834,null));};exports[_0xfd9e('0x48')]=function(_0xc28004,_0x8e6cd0){return db[_0xfd9e('0x3c')]['find']({'where':{'id':_0xc28004[_0xfd9e('0x43')]['id']}})[_0xfd9e('0x26')](handleEntityNotFound(_0x8e6cd0,null))['then'](removeEntity(_0x8e6cd0,null))[_0xfd9e('0x41')](handleError(_0x8e6cd0,null));};exports['describe']=function(_0x13524e,_0x23a7e9){return db[_0xfd9e('0x3c')][_0xfd9e('0x49')]()[_0xfd9e('0x26')](respondWithResult(_0x23a7e9,null))['catch'](handleError(_0x23a7e9,null));};
\ No newline at end of file
+var _0xea31=['map','rawAttributes','fieldName','type','key','query','filters','attributes','intersection','model','fields','hasOwnProperty','nolimit','order','sort','filter','where','merge','JscriptyAnswerReport','includeAll','include','findAll','catch','params','keys','length','options','create','update','body','find','describe','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','status','end','json','undefined','limit','count','offset','Content-Range','apply','reject','then','destroy','error','stack','name','send','index'];(function(_0x134c2e,_0x3573c4){var _0x2825db=function(_0x2a574d){while(--_0x2a574d){_0x134c2e['push'](_0x134c2e['shift']());}};_0x2825db(++_0x3573c4);}(_0xea31,0x6b));var _0x1ea3=function(_0x590813,_0x157b18){_0x590813=_0x590813-0x0;var _0x4161a6=_0xea31[_0x590813];return _0x4161a6;};'use strict';var emlformat=require(_0x1ea3('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x1ea3('0x1'));var jsonpatch=require(_0x1ea3('0x2'));var rp=require(_0x1ea3('0x3'));var moment=require(_0x1ea3('0x4'));var BPromise=require(_0x1ea3('0x5'));var Mustache=require(_0x1ea3('0x6'));var util=require(_0x1ea3('0x7'));var path=require('path');var sox=require(_0x1ea3('0x8'));var csv=require(_0x1ea3('0x9'));var ejs=require(_0x1ea3('0xa'));var fs=require('fs');var fs_extra=require(_0x1ea3('0xb'));var _=require(_0x1ea3('0xc'));var squel=require('squel');var crypto=require(_0x1ea3('0xd'));var jsforce=require(_0x1ea3('0xe'));var deskjs=require(_0x1ea3('0xf'));var toCsv=require(_0x1ea3('0x9'));var querystring=require(_0x1ea3('0x10'));var Papa=require(_0x1ea3('0x11'));var Redis=require('ioredis');var authService=require(_0x1ea3('0x12'));var qs=require(_0x1ea3('0x13'));var as=require(_0x1ea3('0x14'));var hardwareService=require(_0x1ea3('0x15'));var logger=require(_0x1ea3('0x16'))(_0x1ea3('0x17'));var utils=require(_0x1ea3('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0x1ea3('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3fe537,_0x2fc7f4){_0x2fc7f4=_0x2fc7f4||0xcc;return function(_0x4305d3){if(_0x4305d3){return _0x3fe537['sendStatus'](_0x2fc7f4);}return _0x3fe537[_0x1ea3('0x1a')](_0x2fc7f4)[_0x1ea3('0x1b')]();};}function respondWithResult(_0x2fd1c9,_0x4b0af9){_0x4b0af9=_0x4b0af9||0xc8;return function(_0x1624ee){if(_0x1624ee){return _0x2fd1c9[_0x1ea3('0x1a')](_0x4b0af9)[_0x1ea3('0x1c')](_0x1624ee);}};}function respondWithFilteredResult(_0x3d0e71,_0x319de8){return function(_0x3fe673){if(_0x3fe673){var _0x29ceac=typeof _0x319de8['offset']===_0x1ea3('0x1d')&&typeof _0x319de8[_0x1ea3('0x1e')]===_0x1ea3('0x1d');var _0x2f6e6f=_0x3fe673[_0x1ea3('0x1f')];var _0x541e18=_0x29ceac?0x0:_0x319de8[_0x1ea3('0x20')];var _0x2a8b47=_0x29ceac?_0x3fe673[_0x1ea3('0x1f')]:_0x319de8['offset']+_0x319de8[_0x1ea3('0x1e')];var _0x21364e;if(_0x2a8b47>=_0x2f6e6f){_0x2a8b47=_0x2f6e6f;_0x21364e=0xc8;}else{_0x21364e=0xce;}_0x3d0e71[_0x1ea3('0x1a')](_0x21364e);return _0x3d0e71['set'](_0x1ea3('0x21'),_0x541e18+'-'+_0x2a8b47+'/'+_0x2f6e6f)['json'](_0x3fe673);}return null;};}function patchUpdates(_0x276e4d){return function(_0x405ec0){try{jsonpatch[_0x1ea3('0x22')](_0x405ec0,_0x276e4d,!![]);}catch(_0x5bad21){return BPromise[_0x1ea3('0x23')](_0x5bad21);}return _0x405ec0['save']();};}function saveUpdates(_0x4582af,_0x498455){return function(_0x941a50){if(_0x941a50){return _0x941a50['update'](_0x4582af)[_0x1ea3('0x24')](function(_0x388019){return _0x388019;});}return null;};}function removeEntity(_0x246231,_0x5ad8ff){return function(_0x50703d){if(_0x50703d){return _0x50703d[_0x1ea3('0x25')]()['then'](function(){_0x246231[_0x1ea3('0x1a')](0xcc)[_0x1ea3('0x1b')]();});}};}function handleEntityNotFound(_0x3c42f3,_0x91abee){return function(_0xa2b868){if(!_0xa2b868){_0x3c42f3['sendStatus'](0x194);}return _0xa2b868;};}function handleError(_0x50e511,_0x30cf8d){_0x30cf8d=_0x30cf8d||0x1f4;return function(_0x2edfb4){logger[_0x1ea3('0x26')](_0x2edfb4[_0x1ea3('0x27')]);if(_0x2edfb4[_0x1ea3('0x28')]){delete _0x2edfb4[_0x1ea3('0x28')];}_0x50e511[_0x1ea3('0x1a')](_0x30cf8d)[_0x1ea3('0x29')](_0x2edfb4);};}exports[_0x1ea3('0x2a')]=function(_0x3d9b63,_0x3bc186){var _0x33f5f2={},_0x2c29d7={},_0x1a020e={'count':0x0,'rows':[]};var _0xdbd7e3=_[_0x1ea3('0x2b')](db['JscriptyAnswerReport'][_0x1ea3('0x2c')],function(_0x366312){return{'name':_0x366312[_0x1ea3('0x2d')],'type':_0x366312[_0x1ea3('0x2e')][_0x1ea3('0x2f')]};});_0x2c29d7['model']=_['map'](_0xdbd7e3,_0x1ea3('0x28'));_0x2c29d7[_0x1ea3('0x30')]=_['keys'](_0x3d9b63[_0x1ea3('0x30')]);_0x2c29d7[_0x1ea3('0x31')]=_['intersection'](_0x2c29d7['model'],_0x2c29d7[_0x1ea3('0x30')]);_0x33f5f2[_0x1ea3('0x32')]=_[_0x1ea3('0x33')](_0x2c29d7[_0x1ea3('0x34')],qs[_0x1ea3('0x35')](_0x3d9b63[_0x1ea3('0x30')][_0x1ea3('0x35')]));_0x33f5f2[_0x1ea3('0x32')]=_0x33f5f2[_0x1ea3('0x32')]['length']?_0x33f5f2[_0x1ea3('0x32')]:_0x2c29d7[_0x1ea3('0x34')];if(!_0x3d9b63[_0x1ea3('0x30')][_0x1ea3('0x36')](_0x1ea3('0x37'))){_0x33f5f2[_0x1ea3('0x1e')]=qs[_0x1ea3('0x1e')](_0x3d9b63[_0x1ea3('0x30')][_0x1ea3('0x1e')]);_0x33f5f2[_0x1ea3('0x20')]=qs['offset'](_0x3d9b63[_0x1ea3('0x30')]['offset']);}_0x33f5f2[_0x1ea3('0x38')]=qs['sort'](_0x3d9b63['query'][_0x1ea3('0x39')]);_0x33f5f2['where']=qs['filters'](_['pick'](_0x3d9b63[_0x1ea3('0x30')],_0x2c29d7[_0x1ea3('0x31')]),_0xdbd7e3);if(_0x3d9b63[_0x1ea3('0x30')][_0x1ea3('0x3a')]){_0x33f5f2[_0x1ea3('0x3b')]=_['merge'](_0x33f5f2[_0x1ea3('0x3b')],{'$or':_['map'](_0xdbd7e3,function(_0x441442){if(_0x441442[_0x1ea3('0x2e')]!=='VIRTUAL'){var _0x102757={};_0x102757[_0x441442[_0x1ea3('0x28')]]={'$like':'%'+_0x3d9b63[_0x1ea3('0x30')][_0x1ea3('0x3a')]+'%'};return _0x102757;}})});}_0x33f5f2=_[_0x1ea3('0x3c')]({},_0x33f5f2,_0x3d9b63['options']);var _0x12da5a={'where':_0x33f5f2['where']};return db[_0x1ea3('0x3d')][_0x1ea3('0x1f')](_0x12da5a)[_0x1ea3('0x24')](function(_0x47028d){_0x1a020e[_0x1ea3('0x1f')]=_0x47028d;if(_0x3d9b63[_0x1ea3('0x30')][_0x1ea3('0x3e')]){_0x33f5f2[_0x1ea3('0x3f')]=[{'all':!![]}];}return db['JscriptyAnswerReport'][_0x1ea3('0x40')](_0x33f5f2);})[_0x1ea3('0x24')](function(_0x2108e8){_0x1a020e['rows']=_0x2108e8;return _0x1a020e;})[_0x1ea3('0x24')](respondWithFilteredResult(_0x3bc186,_0x33f5f2))[_0x1ea3('0x41')](handleError(_0x3bc186,null));};exports['show']=function(_0x15f00a,_0x43c48d){var _0x58ba87={'raw':!![],'where':{'id':_0x15f00a[_0x1ea3('0x42')]['id']}},_0x133f48={};_0x133f48[_0x1ea3('0x34')]=_[_0x1ea3('0x43')](db[_0x1ea3('0x3d')][_0x1ea3('0x2c')]);_0x133f48['query']=_[_0x1ea3('0x43')](_0x15f00a[_0x1ea3('0x30')]);_0x133f48[_0x1ea3('0x31')]=_['intersection'](_0x133f48[_0x1ea3('0x34')],_0x133f48[_0x1ea3('0x30')]);_0x58ba87[_0x1ea3('0x32')]=_[_0x1ea3('0x33')](_0x133f48[_0x1ea3('0x34')],qs[_0x1ea3('0x35')](_0x15f00a[_0x1ea3('0x30')][_0x1ea3('0x35')]));_0x58ba87[_0x1ea3('0x32')]=_0x58ba87[_0x1ea3('0x32')][_0x1ea3('0x44')]?_0x58ba87['attributes']:_0x133f48[_0x1ea3('0x34')];if(_0x15f00a[_0x1ea3('0x30')][_0x1ea3('0x3e')]){_0x58ba87[_0x1ea3('0x3f')]=[{'all':!![]}];}_0x58ba87=_['merge']({},_0x58ba87,_0x15f00a[_0x1ea3('0x45')]);return db[_0x1ea3('0x3d')]['find'](_0x58ba87)[_0x1ea3('0x24')](handleEntityNotFound(_0x43c48d,null))[_0x1ea3('0x24')](respondWithResult(_0x43c48d,null))[_0x1ea3('0x41')](handleError(_0x43c48d,null));};exports[_0x1ea3('0x46')]=function(_0x454156,_0x28955f){return db[_0x1ea3('0x3d')]['create'](_0x454156['body'],{})['then'](respondWithResult(_0x28955f,0xc9))[_0x1ea3('0x41')](handleError(_0x28955f,null));};exports[_0x1ea3('0x47')]=function(_0xf69557,_0x2de88d){if(_0xf69557[_0x1ea3('0x48')]['id']){delete _0xf69557['body']['id'];}return db[_0x1ea3('0x3d')]['find']({'where':{'id':_0xf69557[_0x1ea3('0x42')]['id']}})[_0x1ea3('0x24')](handleEntityNotFound(_0x2de88d,null))['then'](saveUpdates(_0xf69557['body'],null))[_0x1ea3('0x24')](respondWithResult(_0x2de88d,null))[_0x1ea3('0x41')](handleError(_0x2de88d,null));};exports[_0x1ea3('0x25')]=function(_0x43f296,_0x4822b2){return db[_0x1ea3('0x3d')][_0x1ea3('0x49')]({'where':{'id':_0x43f296['params']['id']}})['then'](handleEntityNotFound(_0x4822b2,null))[_0x1ea3('0x24')](removeEntity(_0x4822b2,null))['catch'](handleError(_0x4822b2,null));};exports[_0x1ea3('0x4a')]=function(_0xee8f20,_0x409f8f){return db[_0x1ea3('0x3d')][_0x1ea3('0x4a')]()[_0x1ea3('0x24')](respondWithResult(_0x409f8f,null))[_0x1ea3('0x41')](handleError(_0x409f8f,null));};
\ No newline at end of file
index d1b058a..64e3697 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6c60=['path','rimraf','./jscriptyAnswerReport.attributes','exports','define','JscriptyAnswerReport','report_jscripty_answers','lodash','util','api','moment','bluebird','request-promise'];(function(_0x1e283d,_0x44e3fd){var _0x33a864=function(_0x30b4ff){while(--_0x30b4ff){_0x1e283d['push'](_0x1e283d['shift']());}};_0x33a864(++_0x44e3fd);}(_0x6c60,0x7c));var _0x06c6=function(_0x238671,_0x34aea0){_0x238671=_0x238671-0x0;var _0x474844=_0x6c60[_0x238671];return _0x474844;};'use strict';var _=require(_0x06c6('0x0'));var util=require(_0x06c6('0x1'));var logger=require('../../config/logger')(_0x06c6('0x2'));var moment=require(_0x06c6('0x3'));var BPromise=require(_0x06c6('0x4'));var rp=require(_0x06c6('0x5'));var fs=require('fs');var path=require(_0x06c6('0x6'));var rimraf=require(_0x06c6('0x7'));var config=require('../../config/environment');var attributes=require(_0x06c6('0x8'));module[_0x06c6('0x9')]=function(_0x247b51,_0x1e327d){return _0x247b51[_0x06c6('0xa')](_0x06c6('0xb'),attributes,{'tableName':_0x06c6('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xdc7e=['request-promise','path','../../config/environment','./jscriptyAnswerReport.attributes','JscriptyAnswerReport','report_jscripty_answers','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0xcd5a7c,_0x5281e1){var _0xea577b=function(_0x38bb4f){while(--_0x38bb4f){_0xcd5a7c['push'](_0xcd5a7c['shift']());}};_0xea577b(++_0x5281e1);}(_0xdc7e,0xa2));var _0xedc7=function(_0x57cf27,_0x30b77d){_0x57cf27=_0x57cf27-0x0;var _0x37f356=_0xdc7e[_0x57cf27];return _0x37f356;};'use strict';var _=require(_0xedc7('0x0'));var util=require(_0xedc7('0x1'));var logger=require(_0xedc7('0x2'))(_0xedc7('0x3'));var moment=require(_0xedc7('0x4'));var BPromise=require(_0xedc7('0x5'));var rp=require(_0xedc7('0x6'));var fs=require('fs');var path=require(_0xedc7('0x7'));var rimraf=require('rimraf');var config=require(_0xedc7('0x8'));var attributes=require(_0xedc7('0x9'));module['exports']=function(_0x4d98cb,_0x336e6e){return _0x4d98cb['define'](_0xedc7('0xa'),attributes,{'tableName':_0xedc7('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index e4c213f..f19a78a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7d02=['../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','JscriptyAnswerReport,\x20%s,\x20%s','debug','JscriptyAnswerReport,\x20%s,\x20%s,\x20%s','error','code','message','request\x20sent','result','catch','lodash','util','moment','bluebird','randomstring','../../config/utils'];(function(_0x3c2a60,_0x2ea767){var _0x2ea5d3=function(_0x5c6739){while(--_0x5c6739){_0x3c2a60['push'](_0x3c2a60['shift']());}};_0x2ea5d3(++_0x2ea767);}(_0x7d02,0xe0));var _0x27d0=function(_0x268e40,_0x1a77ac){_0x268e40=_0x268e40-0x0;var _0x4a6376=_0x7d02[_0x268e40];return _0x4a6376;};'use strict';var _=require(_0x27d0('0x0'));var util=require(_0x27d0('0x1'));var moment=require(_0x27d0('0x2'));var BPromise=require(_0x27d0('0x3'));var rs=require(_0x27d0('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x27d0('0x5'));var logger=require(_0x27d0('0x6'))(_0x27d0('0x7'));var config=require(_0x27d0('0x8'));var jayson=require(_0x27d0('0x9'));var client=jayson['client'][_0x27d0('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x35448e,_0x325a3d,_0x2a4f13){return new BPromise(function(_0x49474b,_0x10731c){return client[_0x27d0('0xb')](_0x35448e,_0x2a4f13)[_0x27d0('0xc')](function(_0x36d12c){logger[_0x27d0('0xd')](_0x27d0('0xe'),_0x325a3d,'request\x20sent');logger[_0x27d0('0xf')](_0x27d0('0x10'),_0x325a3d,'request\x20sent',JSON['stringify'](_0x36d12c));if(_0x36d12c[_0x27d0('0x11')]){if(_0x36d12c[_0x27d0('0x11')][_0x27d0('0x12')]===0x1f4){logger[_0x27d0('0x11')](_0x27d0('0xe'),_0x325a3d,_0x36d12c['error'][_0x27d0('0x13')]);return _0x10731c(_0x36d12c['error'][_0x27d0('0x13')]);}logger[_0x27d0('0x11')](_0x27d0('0xe'),_0x325a3d,_0x36d12c[_0x27d0('0x11')][_0x27d0('0x13')]);return _0x49474b(_0x36d12c['error']['message']);}else{logger['info'](_0x27d0('0xe'),_0x325a3d,_0x27d0('0x14'));_0x49474b(_0x36d12c[_0x27d0('0x15')][_0x27d0('0x13')]);}})[_0x27d0('0x16')](function(_0x3b01f5){logger[_0x27d0('0x11')](_0x27d0('0xe'),_0x325a3d,_0x3b01f5);_0x10731c(_0x3b01f5);});});}
\ No newline at end of file
+var _0xa9a9=['error','code','JscriptyAnswerReport,\x20%s,\x20%s','message','result','catch','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','request\x20sent','debug'];(function(_0x4c3a2f,_0x53e16c){var _0x35cec4=function(_0x3da3a5){while(--_0x3da3a5){_0x4c3a2f['push'](_0x4c3a2f['shift']());}};_0x35cec4(++_0x53e16c);}(_0xa9a9,0x12c));var _0x9a9a=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xa9a9[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x9a9a('0x0'));var util=require('util');var moment=require(_0x9a9a('0x1'));var BPromise=require(_0x9a9a('0x2'));var rs=require(_0x9a9a('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9a9a('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x9a9a('0x5'))(_0x9a9a('0x6'));var config=require(_0x9a9a('0x7'));var jayson=require(_0x9a9a('0x8'));var client=jayson[_0x9a9a('0x9')][_0x9a9a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4f13b5,_0x7e7cf9,_0x191157){return new BPromise(function(_0x365cb9,_0x14728b){return client[_0x9a9a('0xb')](_0x4f13b5,_0x191157)['then'](function(_0x2bb613){logger[_0x9a9a('0xc')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x7e7cf9,_0x9a9a('0xd'));logger[_0x9a9a('0xe')]('JscriptyAnswerReport,\x20%s,\x20%s,\x20%s',_0x7e7cf9,_0x9a9a('0xd'),JSON['stringify'](_0x2bb613));if(_0x2bb613['error']){if(_0x2bb613[_0x9a9a('0xf')][_0x9a9a('0x10')]===0x1f4){logger[_0x9a9a('0xf')](_0x9a9a('0x11'),_0x7e7cf9,_0x2bb613['error'][_0x9a9a('0x12')]);return _0x14728b(_0x2bb613[_0x9a9a('0xf')]['message']);}logger['error'](_0x9a9a('0x11'),_0x7e7cf9,_0x2bb613[_0x9a9a('0xf')]['message']);return _0x365cb9(_0x2bb613[_0x9a9a('0xf')][_0x9a9a('0x12')]);}else{logger['info'](_0x9a9a('0x11'),_0x7e7cf9,'request\x20sent');_0x365cb9(_0x2bb613[_0x9a9a('0x13')][_0x9a9a('0x12')]);}})[_0x9a9a('0x14')](function(_0x4900f8){logger[_0x9a9a('0xf')]('JscriptyAnswerReport,\x20%s,\x20%s',_0x7e7cf9,_0x4900f8);_0x14728b(_0x4900f8);});});}
\ No newline at end of file
index ec2fa6f..606593b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3f40=['getSessions','/:id/answers','getAnswers','/:id/summary','getSummary','post','create','/:id/clone','clone','delete','destroy','multer','connect-timeout','express','Router','../../components/interaction/service','../../config/environment','./jscriptyProject.controller','isAuthenticated','index','get','/:id','show','/:id/sessions'];(function(_0x467889,_0x3a7a4a){var _0x3f828e=function(_0x4b5890){while(--_0x4b5890){_0x467889['push'](_0x467889['shift']());}};_0x3f828e(++_0x3a7a4a);}(_0x3f40,0xcb));var _0x03f4=function(_0x3c1ec0,_0x1f5108){_0x3c1ec0=_0x3c1ec0-0x0;var _0x216225=_0x3f40[_0x3c1ec0];return _0x216225;};'use strict';var multer=require(_0x03f4('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x03f4('0x1'));var express=require(_0x03f4('0x2'));var router=express[_0x03f4('0x3')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x03f4('0x4'));var config=require(_0x03f4('0x5'));var controller=require(_0x03f4('0x6'));router['get']('/',auth[_0x03f4('0x7')](),controller[_0x03f4('0x8')]);router[_0x03f4('0x9')](_0x03f4('0xa'),auth['isAuthenticated'](),controller[_0x03f4('0xb')]);router[_0x03f4('0x9')](_0x03f4('0xc'),auth[_0x03f4('0x7')](),controller[_0x03f4('0xd')]);router[_0x03f4('0x9')](_0x03f4('0xe'),auth['isAuthenticated'](),controller[_0x03f4('0xf')]);router[_0x03f4('0x9')](_0x03f4('0x10'),auth[_0x03f4('0x7')](),timeout('30s'),controller[_0x03f4('0x11')]);router[_0x03f4('0x12')]('/',auth[_0x03f4('0x7')](),controller[_0x03f4('0x13')]);router[_0x03f4('0x12')](_0x03f4('0x14'),auth['isAuthenticated'](),controller[_0x03f4('0x15')]);router['put']('/:id',auth[_0x03f4('0x7')](),controller['update']);router[_0x03f4('0x16')](_0x03f4('0xa'),auth[_0x03f4('0x7')](),controller[_0x03f4('0x17')]);module['exports']=router;
\ No newline at end of file
+var _0x3594=['show','/:id/sessions','getSessions','/:id/answers','getAnswers','/:id/summary','30s','getSummary','post','clone','delete','destroy','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptyProject.controller','get','isAuthenticated','index','/:id'];(function(_0x30b845,_0x3f9133){var _0xa791f2=function(_0x111450){while(--_0x111450){_0x30b845['push'](_0x30b845['shift']());}};_0xa791f2(++_0x3f9133);}(_0x3594,0x138));var _0x4359=function(_0xe65579,_0x40803){_0xe65579=_0xe65579-0x0;var _0x299e83=_0x3594[_0xe65579];return _0x299e83;};'use strict';var multer=require(_0x4359('0x0'));var util=require(_0x4359('0x1'));var path=require(_0x4359('0x2'));var timeout=require('connect-timeout');var express=require(_0x4359('0x3'));var router=express[_0x4359('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x4359('0x5'));var interaction=require(_0x4359('0x6'));var config=require(_0x4359('0x7'));var controller=require(_0x4359('0x8'));router[_0x4359('0x9')]('/',auth[_0x4359('0xa')](),controller[_0x4359('0xb')]);router['get'](_0x4359('0xc'),auth['isAuthenticated'](),controller[_0x4359('0xd')]);router[_0x4359('0x9')](_0x4359('0xe'),auth['isAuthenticated'](),controller[_0x4359('0xf')]);router[_0x4359('0x9')](_0x4359('0x10'),auth[_0x4359('0xa')](),controller[_0x4359('0x11')]);router[_0x4359('0x9')](_0x4359('0x12'),auth[_0x4359('0xa')](),timeout(_0x4359('0x13')),controller[_0x4359('0x14')]);router[_0x4359('0x15')]('/',auth[_0x4359('0xa')](),controller['create']);router[_0x4359('0x15')]('/:id/clone',auth['isAuthenticated'](),controller[_0x4359('0x16')]);router['put'](_0x4359('0xc'),auth[_0x4359('0xa')](),controller['update']);router[_0x4359('0x17')](_0x4359('0xc'),auth[_0x4359('0xa')](),controller[_0x4359('0x18')]);module['exports']=router;
\ No newline at end of file
index 1243ff5..a4b17d4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xde8f=['format','{\x22name\x22:\x22%s\x22,\x22description\x22:\x22%s\x22,\x22pages\x22:[]}','getDataValue','description','BOOLEAN','sequelize','lodash','util','exports','name','STRING','TEXT','long','isObjectLike','setDataValue','formData','stringify','isString'];(function(_0x1c5793,_0x2027ee){var _0x561815=function(_0x3079e){while(--_0x3079e){_0x1c5793['push'](_0x1c5793['shift']());}};_0x561815(++_0x2027ee);}(_0xde8f,0x1eb));var _0xfde8=function(_0x1528cf,_0x27ef21){_0x1528cf=_0x1528cf-0x0;var _0x249f28=_0xde8f[_0x1528cf];return _0x249f28;};'use strict';var Sequelize=require(_0xfde8('0x0'));var _=require(_0xfde8('0x1'));var util=require(_0xfde8('0x2'));module[_0xfde8('0x3')]={'name':{'type':Sequelize['STRING'],'unique':_0xfde8('0x4')},'description':{'type':Sequelize[_0xfde8('0x5')]},'formData':{'type':Sequelize[_0xfde8('0x6')](_0xfde8('0x7')),'set':function(_0x2ab481){if(_[_0xfde8('0x8')](_0x2ab481)){this[_0xfde8('0x9')](_0xfde8('0xa'),JSON[_0xfde8('0xb')](_0x2ab481));}else if(_[_0xfde8('0xc')](_0x2ab481)){this[_0xfde8('0x9')](_0xfde8('0xa'),_0x2ab481);}else{this[_0xfde8('0x9')](_0xfde8('0xa'),util[_0xfde8('0xd')](_0xfde8('0xe'),this[_0xfde8('0xf')](_0xfde8('0x4'))||'',this[_0xfde8('0xf')](_0xfde8('0x10'))||''));}}},'enableUncompleteSave':{'type':Sequelize[_0xfde8('0x11')],'defaultValue':!![]},'sendUnpauseOnSubmit':{'type':Sequelize[_0xfde8('0x11')],'defaultValue':![]}};
\ No newline at end of file
+var _0x1612=['isObjectLike','setDataValue','formData','stringify','{\x22name\x22:\x22%s\x22,\x22description\x22:\x22%s\x22,\x22pages\x22:[]}','getDataValue','description','BOOLEAN','sequelize','STRING','name','TEXT'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x1612,0xa4));var _0x2161=function(_0x24fc2c,_0x47b500){_0x24fc2c=_0x24fc2c-0x0;var _0x483de4=_0x1612[_0x24fc2c];return _0x483de4;};'use strict';var Sequelize=require(_0x2161('0x0'));var _=require('lodash');var util=require('util');module['exports']={'name':{'type':Sequelize[_0x2161('0x1')],'unique':_0x2161('0x2')},'description':{'type':Sequelize[_0x2161('0x1')]},'formData':{'type':Sequelize[_0x2161('0x3')]('long'),'set':function(_0x5956fa){if(_[_0x2161('0x4')](_0x5956fa)){this[_0x2161('0x5')](_0x2161('0x6'),JSON[_0x2161('0x7')](_0x5956fa));}else if(_['isString'](_0x5956fa)){this[_0x2161('0x5')](_0x2161('0x6'),_0x5956fa);}else{this[_0x2161('0x5')](_0x2161('0x6'),util['format'](_0x2161('0x8'),this[_0x2161('0x9')](_0x2161('0x2'))||'',this[_0x2161('0x9')](_0x2161('0xa'))||''));}}},'enableUncompleteSave':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'sendUnpauseOnSubmit':{'type':Sequelize[_0x2161('0xb')],'defaultValue':![]}};
\ No newline at end of file
index 3889027..d139943 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x38c1=['question','format','SessionId','answer','now','writeFileSync','/tmp/Jscripty_Project_%d_Summary_%s.csv','setHeader','attachment;\x20filename=','Content-type','text/csv','download','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../components/parsers/qs','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','offset','undefined','count','limit','set','Content-Range','json','apply','reject','update','destroy','then','get','Projects','error','name','send','map','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','pick','filter','merge','where','VIRTUAL','options','includeAll','include','JscriptyProject','findAll','rows','catch','show','rawAttributes','create','body','user','role','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','omit','createdAt','updatedAt','Unable\x20to\x20retrieve\x20the\x20current\x20user','find','getSessions','findOne','JscriptySessionReport','order','getAnswers','JscriptyAnswerReport','number','fromCharCode','indexOf','toString','replace','startTime','starttime','JscriptyQuestionReport','-createdAt','questionId'];(function(_0x24061a,_0x1c9f4d){var _0x82054e=function(_0x2ec346){while(--_0x2ec346){_0x24061a['push'](_0x24061a['shift']());}};_0x82054e(++_0x1c9f4d);}(_0x38c1,0x7f));var _0x138c=function(_0x54c42d,_0x23975d){_0x54c42d=_0x54c42d-0x0;var _0x16d161=_0x38c1[_0x54c42d];return _0x16d161;};'use strict';var emlformat=require(_0x138c('0x0'));var rimraf=require(_0x138c('0x1'));var zipdir=require(_0x138c('0x2'));var jsonpatch=require(_0x138c('0x3'));var rp=require(_0x138c('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x138c('0x5'));var util=require(_0x138c('0x6'));var path=require(_0x138c('0x7'));var sox=require(_0x138c('0x8'));var csv=require(_0x138c('0x9'));var ejs=require(_0x138c('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x138c('0xb'));var squel=require(_0x138c('0xc'));var crypto=require(_0x138c('0xd'));var jsforce=require(_0x138c('0xe'));var deskjs=require(_0x138c('0xf'));var toCsv=require(_0x138c('0x9'));var querystring=require(_0x138c('0x10'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x138c('0x11'));var qs=require(_0x138c('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x138c('0x13'))('api');var utils=require(_0x138c('0x14'));var config=require(_0x138c('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x138c('0x16'))['db'];function respondWithStatusCode(_0x11f8b5,_0x518468){_0x518468=_0x518468||0xcc;return function(_0x2da971){if(_0x2da971){return _0x11f8b5[_0x138c('0x17')](_0x518468);}return _0x11f8b5[_0x138c('0x18')](_0x518468)[_0x138c('0x19')]();};}function respondWithResult(_0x5313c6,_0xf42e9b){_0xf42e9b=_0xf42e9b||0xc8;return function(_0x28896a){if(_0x28896a){return _0x5313c6[_0x138c('0x18')](_0xf42e9b)['json'](_0x28896a);}};}function respondWithFilteredResult(_0x2a4ae3,_0x1a3560){return function(_0x2ab6ae){if(_0x2ab6ae){var _0x2b2fd8=typeof _0x1a3560[_0x138c('0x1a')]===_0x138c('0x1b')&&typeof _0x1a3560['limit']===_0x138c('0x1b');var _0x15a778=_0x2ab6ae[_0x138c('0x1c')];var _0x1a7bdf=_0x2b2fd8?0x0:_0x1a3560[_0x138c('0x1a')];var _0x393f2a=_0x2b2fd8?_0x2ab6ae['count']:_0x1a3560[_0x138c('0x1a')]+_0x1a3560[_0x138c('0x1d')];var _0x351f5e;if(_0x393f2a>=_0x15a778){_0x393f2a=_0x15a778;_0x351f5e=0xc8;}else{_0x351f5e=0xce;}_0x2a4ae3[_0x138c('0x18')](_0x351f5e);return _0x2a4ae3[_0x138c('0x1e')](_0x138c('0x1f'),_0x1a7bdf+'-'+_0x393f2a+'/'+_0x15a778)[_0x138c('0x20')](_0x2ab6ae);}return null;};}function patchUpdates(_0x156738){return function(_0xb4b501){try{jsonpatch[_0x138c('0x21')](_0xb4b501,_0x156738,!![]);}catch(_0x4a4741){return BPromise[_0x138c('0x22')](_0x4a4741);}return _0xb4b501['save']();};}function saveUpdates(_0x9225f6,_0x5db8e0){return function(_0x5a93df){if(_0x5a93df){return _0x5a93df[_0x138c('0x23')](_0x9225f6)['then'](function(_0x377acc){return _0x377acc;});}return null;};}function removeEntity(_0x114df4,_0x2aa302){return function(_0x14ad50){if(_0x14ad50){return _0x14ad50[_0x138c('0x24')]()[_0x138c('0x25')](function(){var _0xd6cc72=_0x14ad50[_0x138c('0x26')]({'plain':!![]});var _0x1fb283=_0x138c('0x27');return db['UserProfileResource']['destroy']({'where':{'type':_0x1fb283,'resourceId':_0xd6cc72['id']}})[_0x138c('0x25')](function(){return _0x14ad50;});})[_0x138c('0x25')](function(){_0x114df4[_0x138c('0x18')](0xcc)[_0x138c('0x19')]();});}};}function handleEntityNotFound(_0x3185c9,_0x6db084){return function(_0x5da206){if(!_0x5da206){_0x3185c9[_0x138c('0x17')](0x194);}return _0x5da206;};}function handleError(_0x3fbce2,_0xe2a39e){_0xe2a39e=_0xe2a39e||0x1f4;return function(_0x12e446){logger[_0x138c('0x28')](_0x12e446['stack']);if(_0x12e446[_0x138c('0x29')]){delete _0x12e446[_0x138c('0x29')];}_0x3fbce2[_0x138c('0x18')](_0xe2a39e)[_0x138c('0x2a')](_0x12e446);};}exports['index']=function(_0x24818b,_0x4e5244){var _0x4b6d85={},_0x329d1b={},_0x54480e={'count':0x0,'rows':[]};var _0xd27648=_[_0x138c('0x2b')](db['JscriptyProject']['rawAttributes'],function(_0x38d29b){return{'name':_0x38d29b[_0x138c('0x2c')],'type':_0x38d29b[_0x138c('0x2d')][_0x138c('0x2e')]};});_0x329d1b[_0x138c('0x2f')]=_[_0x138c('0x2b')](_0xd27648,_0x138c('0x29'));_0x329d1b[_0x138c('0x30')]=_[_0x138c('0x31')](_0x24818b[_0x138c('0x30')]);_0x329d1b[_0x138c('0x32')]=_[_0x138c('0x33')](_0x329d1b[_0x138c('0x2f')],_0x329d1b[_0x138c('0x30')]);_0x4b6d85['attributes']=_[_0x138c('0x33')](_0x329d1b['model'],qs['fields'](_0x24818b[_0x138c('0x30')][_0x138c('0x34')]));_0x4b6d85['attributes']=_0x4b6d85[_0x138c('0x35')][_0x138c('0x36')]?_0x4b6d85[_0x138c('0x35')]:_0x329d1b[_0x138c('0x2f')];if(!_0x24818b[_0x138c('0x30')][_0x138c('0x37')](_0x138c('0x38'))){_0x4b6d85['limit']=qs[_0x138c('0x1d')](_0x24818b[_0x138c('0x30')][_0x138c('0x1d')]);_0x4b6d85[_0x138c('0x1a')]=qs[_0x138c('0x1a')](_0x24818b[_0x138c('0x30')][_0x138c('0x1a')]);}_0x4b6d85['order']=qs[_0x138c('0x39')](_0x24818b[_0x138c('0x30')]['sort']);_0x4b6d85['where']=qs['filters'](_[_0x138c('0x3a')](_0x24818b['query'],_0x329d1b['filters']),_0xd27648);if(_0x24818b[_0x138c('0x30')][_0x138c('0x3b')]){_0x4b6d85['where']=_[_0x138c('0x3c')](_0x4b6d85[_0x138c('0x3d')],{'$or':_['map'](_0xd27648,function(_0x380c7f){if(_0x380c7f['type']!==_0x138c('0x3e')){var _0x14b377={};_0x14b377[_0x380c7f[_0x138c('0x29')]]={'$like':'%'+_0x24818b[_0x138c('0x30')][_0x138c('0x3b')]+'%'};return _0x14b377;}})});}_0x4b6d85=_[_0x138c('0x3c')]({},_0x4b6d85,_0x24818b[_0x138c('0x3f')]);var _0x5ab18f={'where':_0x4b6d85[_0x138c('0x3d')]};return db['JscriptyProject']['count'](_0x5ab18f)['then'](function(_0x59f013){_0x54480e[_0x138c('0x1c')]=_0x59f013;if(_0x24818b[_0x138c('0x30')][_0x138c('0x40')]){_0x4b6d85[_0x138c('0x41')]=[{'all':!![]}];}return db[_0x138c('0x42')][_0x138c('0x43')](_0x4b6d85);})[_0x138c('0x25')](function(_0x120e68){_0x54480e[_0x138c('0x44')]=_0x120e68;return _0x54480e;})[_0x138c('0x25')](respondWithFilteredResult(_0x4e5244,_0x4b6d85))[_0x138c('0x45')](handleError(_0x4e5244,null));};exports[_0x138c('0x46')]=function(_0x4bba77,_0x119a62){var _0x2b091a={'raw':![],'where':{'id':_0x4bba77['params']['id']}},_0x1f9a43={};_0x1f9a43[_0x138c('0x2f')]=_[_0x138c('0x31')](db[_0x138c('0x42')][_0x138c('0x47')]);_0x1f9a43[_0x138c('0x30')]=_[_0x138c('0x31')](_0x4bba77['query']);_0x1f9a43[_0x138c('0x32')]=_[_0x138c('0x33')](_0x1f9a43['model'],_0x1f9a43[_0x138c('0x30')]);_0x2b091a['attributes']=_[_0x138c('0x33')](_0x1f9a43[_0x138c('0x2f')],qs[_0x138c('0x34')](_0x4bba77[_0x138c('0x30')]['fields']));_0x2b091a[_0x138c('0x35')]=_0x2b091a[_0x138c('0x35')][_0x138c('0x36')]?_0x2b091a[_0x138c('0x35')]:_0x1f9a43[_0x138c('0x2f')];if(_0x4bba77[_0x138c('0x30')]['includeAll']){_0x2b091a[_0x138c('0x41')]=[{'all':!![]}];}_0x2b091a=_[_0x138c('0x3c')]({},_0x2b091a,_0x4bba77[_0x138c('0x3f')]);return db[_0x138c('0x42')]['find'](_0x2b091a)['then'](handleEntityNotFound(_0x119a62,null))['then'](respondWithResult(_0x119a62,null))[_0x138c('0x45')](handleError(_0x119a62,null));};exports[_0x138c('0x48')]=function(_0x2d701c,_0x3efd7d){return db['JscriptyProject']['create'](_0x2d701c[_0x138c('0x49')],{})[_0x138c('0x25')](function(_0x29765c){var _0x178c8e=_0x2d701c[_0x138c('0x4a')][_0x138c('0x26')]({'plain':!![]});if(!_0x178c8e)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x178c8e[_0x138c('0x4b')]==='user'){var _0xfa3a08=_0x29765c[_0x138c('0x26')]({'plain':!![]});var _0x31916b=_0x138c('0x27');return db[_0x138c('0x4c')]['find']({'where':{'name':_0x31916b,'userProfileId':_0x178c8e[_0x138c('0x4d')]},'raw':!![]})[_0x138c('0x25')](function(_0x21ab56){if(_0x21ab56&&_0x21ab56[_0x138c('0x4e')]===0x0){return db[_0x138c('0x4f')]['create']({'name':_0xfa3a08[_0x138c('0x29')],'resourceId':_0xfa3a08['id'],'type':_0x21ab56[_0x138c('0x29')],'sectionId':_0x21ab56['id']},{})['then'](function(){return _0x29765c;});}else{return _0x29765c;}})['catch'](function(_0x24997b){logger[_0x138c('0x28')](_0x138c('0x50'),_0x24997b);throw _0x24997b;});}return _0x29765c;})[_0x138c('0x25')](respondWithResult(_0x3efd7d,0xc9))['catch'](handleError(_0x3efd7d,null));};exports['clone']=function(_0x124399,_0x4202fb){var _0x4a2870={'where':{'id':_0x124399[_0x138c('0x51')]['id']}},_0x136fa2={};_0x136fa2[_0x138c('0x2f')]=_[_0x138c('0x31')](db[_0x138c('0x42')][_0x138c('0x47')]);_0x4a2870[_0x138c('0x35')]=_[_0x138c('0x33')](_0x136fa2[_0x138c('0x2f')],qs['fields'](_0x124399[_0x138c('0x30')][_0x138c('0x34')]));_0x4a2870[_0x138c('0x35')]=_0x4a2870['attributes'][_0x138c('0x36')]?_0x4a2870[_0x138c('0x35')]:_0x136fa2['model'];if(_0x124399[_0x138c('0x30')][_0x138c('0x40')]){_0x4a2870[_0x138c('0x41')]=[{'all':!![]}];}_0x4a2870=_[_0x138c('0x3c')]({},_0x4a2870,_0x124399[_0x138c('0x3f')]);return db[_0x138c('0x42')]['find'](_0x4a2870)[_0x138c('0x25')](handleEntityNotFound(_0x4202fb,null))[_0x138c('0x25')](function(_0x7d0ff5){if(_0x7d0ff5){var _0xba8150=_0x7d0ff5['get']({'plain':!![]});_0xba8150=qs[_0x138c('0x52')](_0xba8150,['id',_0x138c('0x53'),_0x138c('0x54')]);_0x124399[_0x138c('0x49')]=_[_0x138c('0x52')](_0x124399['body'],['id','createdAt',_0x138c('0x54')]);return db[_0x138c('0x42')][_0x138c('0x48')](_['merge'](_0xba8150,_0x124399[_0x138c('0x49')]),{'include':_0x124399[_0x138c('0x30')][_0x138c('0x40')]?[{'all':!![]}]:undefined})[_0x138c('0x25')](function(_0x202485){var _0x3f2f5a=_0x124399[_0x138c('0x4a')][_0x138c('0x26')]({'plain':!![]});if(!_0x3f2f5a)throw new Error(_0x138c('0x55'));if(_0x3f2f5a['role']===_0x138c('0x4a')){var _0x277702=_0x202485[_0x138c('0x26')]({'plain':!![]});var _0x3eab87=_0x138c('0x27');return db[_0x138c('0x4c')][_0x138c('0x56')]({'where':{'name':_0x3eab87,'userProfileId':_0x3f2f5a[_0x138c('0x4d')]},'raw':!![]})[_0x138c('0x25')](function(_0x181510){if(_0x181510&&_0x181510[_0x138c('0x4e')]===0x0){return db[_0x138c('0x4f')]['create']({'name':_0x277702[_0x138c('0x29')],'resourceId':_0x277702['id'],'type':_0x181510[_0x138c('0x29')],'sectionId':_0x181510['id']},{})['then'](function(){return _0x202485;});}else{return _0x202485;}})[_0x138c('0x45')](function(_0x1592c7){logger['error'](_0x138c('0x50'),_0x1592c7);throw _0x1592c7;});}return _0x202485;});}})[_0x138c('0x25')](respondWithResult(_0x4202fb,0xc9))[_0x138c('0x45')](handleError(_0x4202fb,null));};exports[_0x138c('0x23')]=function(_0x4dee2d,_0x569dfc){if(_0x4dee2d[_0x138c('0x49')]['id']){delete _0x4dee2d[_0x138c('0x49')]['id'];}return db[_0x138c('0x42')]['find']({'where':{'id':_0x4dee2d[_0x138c('0x51')]['id']}})['then'](handleEntityNotFound(_0x569dfc,null))[_0x138c('0x25')](saveUpdates(_0x4dee2d[_0x138c('0x49')],null))[_0x138c('0x25')](respondWithResult(_0x569dfc,null))[_0x138c('0x45')](handleError(_0x569dfc,null));};exports['destroy']=function(_0x3cbd85,_0x2dc53a){return db['JscriptyProject'][_0x138c('0x56')]({'where':{'id':_0x3cbd85[_0x138c('0x51')]['id']}})[_0x138c('0x25')](handleEntityNotFound(_0x2dc53a,null))[_0x138c('0x25')](removeEntity(_0x2dc53a,null))['catch'](handleError(_0x2dc53a,null));};exports[_0x138c('0x57')]=function(_0x2f4f00,_0x44457a,_0x1c88ed){var _0x5eca5a={'raw':!![],'where':{}};var _0x25488a={};var _0x57fa9e={'count':0x0,'rows':[]};return db[_0x138c('0x42')][_0x138c('0x58')]({'where':{'id':_0x2f4f00['params']['id']}})[_0x138c('0x25')](handleEntityNotFound(_0x44457a,null))['then'](function(_0x2bf923){if(_0x2bf923){_0x25488a[_0x138c('0x2f')]=_[_0x138c('0x31')](db[_0x138c('0x59')][_0x138c('0x47')]);_0x25488a['query']=_['keys'](_0x2f4f00[_0x138c('0x30')]);_0x25488a['filters']=_[_0x138c('0x33')](_0x25488a[_0x138c('0x2f')],_0x25488a['query']);_0x5eca5a[_0x138c('0x35')]=_['intersection'](_0x25488a[_0x138c('0x2f')],qs['fields'](_0x2f4f00['query']['fields']));_0x5eca5a[_0x138c('0x35')]=_0x5eca5a[_0x138c('0x35')]['length']?_0x5eca5a['attributes']:_0x25488a[_0x138c('0x2f')];if(!_0x2f4f00[_0x138c('0x30')][_0x138c('0x37')](_0x138c('0x38'))){_0x5eca5a[_0x138c('0x1d')]=qs[_0x138c('0x1d')](_0x2f4f00[_0x138c('0x30')][_0x138c('0x1d')]);_0x5eca5a[_0x138c('0x1a')]=qs[_0x138c('0x1a')](_0x2f4f00[_0x138c('0x30')][_0x138c('0x1a')]);}_0x5eca5a[_0x138c('0x5a')]=qs['sort'](_0x2f4f00[_0x138c('0x30')][_0x138c('0x39')]);_0x5eca5a['where']=qs[_0x138c('0x32')](_[_0x138c('0x3a')](_0x2f4f00[_0x138c('0x30')],_0x25488a[_0x138c('0x32')]));_0x5eca5a['where']['ProjectId']=_0x2bf923['id'];if(_0x2f4f00['query']['filter']){_0x5eca5a[_0x138c('0x3d')]=_[_0x138c('0x3c')](_0x5eca5a[_0x138c('0x3d')],{'$or':_[_0x138c('0x2b')](_0x5eca5a[_0x138c('0x35')],function(_0x888d){var _0x15704b={};_0x15704b[_0x888d]={'$like':'%'+_0x2f4f00[_0x138c('0x30')][_0x138c('0x3b')]+'%'};return _0x15704b;})});}_0x5eca5a=_['merge']({},_0x5eca5a,_0x2f4f00[_0x138c('0x3f')]);return db[_0x138c('0x59')][_0x138c('0x1c')]({'where':_0x5eca5a[_0x138c('0x3d')]})['then'](function(_0x5e6503){_0x57fa9e['count']=_0x5e6503;if(_0x2f4f00[_0x138c('0x30')][_0x138c('0x40')]){_0x5eca5a[_0x138c('0x41')]=[{'all':!![]}];}return db[_0x138c('0x59')][_0x138c('0x43')](_0x5eca5a);})[_0x138c('0x25')](function(_0x2632e6){_0x57fa9e[_0x138c('0x44')]=_0x2632e6;return _0x57fa9e;});}})[_0x138c('0x25')](respondWithFilteredResult(_0x44457a,_0x5eca5a))[_0x138c('0x45')](handleError(_0x44457a,null));};exports[_0x138c('0x5b')]=function(_0x5c5093,_0x5323c6,_0x132a75){var _0x12da58={'raw':!![],'where':{}};var _0x3f0d2d={};var _0x3ab285={'count':0x0,'rows':[]};return db['JscriptyProject']['findOne']({'where':{'id':_0x5c5093[_0x138c('0x51')]['id']}})['then'](handleEntityNotFound(_0x5323c6,null))[_0x138c('0x25')](function(_0x32413e){if(_0x32413e){_0x3f0d2d[_0x138c('0x2f')]=_[_0x138c('0x31')](db[_0x138c('0x5c')][_0x138c('0x47')]);_0x3f0d2d[_0x138c('0x30')]=_[_0x138c('0x31')](_0x5c5093[_0x138c('0x30')]);_0x3f0d2d['filters']=_['intersection'](_0x3f0d2d[_0x138c('0x2f')],_0x3f0d2d[_0x138c('0x30')]);_0x12da58[_0x138c('0x35')]=_[_0x138c('0x33')](_0x3f0d2d[_0x138c('0x2f')],qs[_0x138c('0x34')](_0x5c5093['query']['fields']));_0x12da58[_0x138c('0x35')]=_0x12da58[_0x138c('0x35')][_0x138c('0x36')]?_0x12da58[_0x138c('0x35')]:_0x3f0d2d[_0x138c('0x2f')];if(!_0x5c5093[_0x138c('0x30')][_0x138c('0x37')](_0x138c('0x38'))){_0x12da58['limit']=qs['limit'](_0x5c5093[_0x138c('0x30')][_0x138c('0x1d')]);_0x12da58[_0x138c('0x1a')]=qs[_0x138c('0x1a')](_0x5c5093['query']['offset']);}_0x12da58[_0x138c('0x5a')]=qs['sort'](_0x5c5093[_0x138c('0x30')][_0x138c('0x39')]);_0x12da58['where']=qs[_0x138c('0x32')](_[_0x138c('0x3a')](_0x5c5093[_0x138c('0x30')],_0x3f0d2d[_0x138c('0x32')]));_0x12da58[_0x138c('0x3d')]['ProjectId']=_0x32413e['id'];if(_0x5c5093[_0x138c('0x30')][_0x138c('0x3b')]){_0x12da58[_0x138c('0x3d')]=_[_0x138c('0x3c')](_0x12da58[_0x138c('0x3d')],{'$or':_[_0x138c('0x2b')](_0x12da58[_0x138c('0x35')],function(_0x2ef7b6){var _0x462464={};_0x462464[_0x2ef7b6]={'$like':'%'+_0x5c5093[_0x138c('0x30')][_0x138c('0x3b')]+'%'};return _0x462464;})});}_0x12da58=_[_0x138c('0x3c')]({},_0x12da58,_0x5c5093[_0x138c('0x3f')]);return db[_0x138c('0x5c')]['count']({'where':_0x12da58[_0x138c('0x3d')]})[_0x138c('0x25')](function(_0x929e85){_0x3ab285[_0x138c('0x1c')]=_0x929e85;if(_0x5c5093[_0x138c('0x30')][_0x138c('0x40')]){_0x12da58[_0x138c('0x41')]=[{'all':!![]}];}return db[_0x138c('0x5c')][_0x138c('0x43')](_0x12da58);})[_0x138c('0x25')](function(_0x146961){_0x3ab285['rows']=_0x146961;return _0x3ab285;});}})[_0x138c('0x25')](respondWithFilteredResult(_0x5323c6,_0x12da58))[_0x138c('0x45')](handleError(_0x5323c6,null));};function char(_0x34f01){return _0x138c('0x5d')===typeof _0x34f01?String[_0x138c('0x5e')][_0x138c('0x21')](null,arguments):_0x34f01;}function needsEncapsulation(_0x5a7c52){return!!_0x5a7c52&&(_0x5a7c52['toString']()[_0x138c('0x5f')](char(0xd))>=0x0||_0x5a7c52[_0x138c('0x60')]()['indexOf'](char(0xa))>=0x0||_0x5a7c52[_0x138c('0x60')]()[_0x138c('0x5f')](char(0x2c))>=0x0||_0x5a7c52['toString']()['indexOf'](char(0x22))>=0x0);}function encapsulate(_0xd3c404){var _0x2ea16f=char(0x22),_0x3b2491='\x5c'+char(0x22),_0x5bf4dc=_0xd3c404[_0x138c('0x60')]()[_0x138c('0x61')](new RegExp(_0x2ea16f,'g'),_0x3b2491);return _0x2ea16f+_0x5bf4dc+_0x2ea16f;}exports['getSummary']=function(_0x4a511d,_0x3d6be5,_0x71eb02){var _0x228038,_0x592d22;var _0x121703={'where':{'ProjectId':_0x4a511d['params']['id']}};if(_0x4a511d[_0x138c('0x30')][_0x138c('0x62')]){_0x121703[_0x138c('0x3d')][_0x138c('0x63')]=JSON['parse'](_0x4a511d['query'][_0x138c('0x62')]);}return db['JscriptySessionReport'][_0x138c('0x43')](_0x121703)[_0x138c('0x25')](handleEntityNotFound(_0x3d6be5,null))[_0x138c('0x25')](function(_0x3ee1fa){if(_0x3ee1fa){_0x228038=_0x3ee1fa;return db[_0x138c('0x64')][_0x138c('0x43')]({'where':{'SessionId':{'$in':_['map'](_0x228038,'id')},'ProjectId':_0x4a511d['params']['id']},'order':_0x138c('0x65')});}})[_0x138c('0x25')](handleEntityNotFound(_0x3d6be5,null))[_0x138c('0x25')](function(_0x39ac57){if(_0x39ac57){_0x592d22=_0x39ac57;var _0x41f32e={};for(var _0x307c99=0x0,_0xb4e8ca=_0x592d22[_0x138c('0x36')];_0x307c99<_0xb4e8ca;_0x307c99++){if(!_0x41f32e[_0x138c('0x37')](_0x592d22[_0x307c99][_0x138c('0x66')])){_0x41f32e[_0x592d22[_0x307c99][_0x138c('0x66')]]=needsEncapsulation(_0x592d22[_0x307c99][_0x138c('0x67')])?encapsulate(_0x592d22[_0x307c99][_0x138c('0x67')]):_0x592d22[_0x307c99][_0x138c('0x67')];}}var _0x45848d=[],_0x39398f={};for(var _0x53f959=0x0,_0x4b9c1c=_0x228038[_0x138c('0x36')];_0x53f959<_0x4b9c1c;_0x53f959++){_0x39398f={'ProjectId':_0x4a511d[_0x138c('0x51')]['id'],'SessionId':_0x228038[_0x53f959]['id'],'StartTime':moment(_0x228038[_0x53f959][_0x138c('0x63')])[_0x138c('0x68')]('YYYY-MM-DD\x20HH:mm:ss')};for(var _0x18f6cb=0x0,_0xa98b2b=_0x592d22['length'];_0x18f6cb<_0xa98b2b;_0x18f6cb++){if(_0x592d22[_0x18f6cb][_0x138c('0x69')]==_0x228038[_0x53f959]['id']&&_0x41f32e[_0x138c('0x37')](_0x592d22[_0x18f6cb]['questionId'])){_0x39398f[_0x41f32e[_0x592d22[_0x18f6cb][_0x138c('0x66')]]]=_0x592d22[_0x18f6cb][_0x138c('0x6a')];}}for(var _0x48edc1 in _0x41f32e){if(!_0x39398f['hasOwnProperty'](_0x41f32e[_0x48edc1])){_0x39398f[_0x41f32e[_0x48edc1]]=null;}}_0x45848d['push'](_0x39398f);}return _0x45848d;}})[_0x138c('0x25')](function(_0x246426){if(!_['isEmpty'](_0x246426)){var _0x28496f=toCsv(_0x246426);var _0x545328=Date[_0x138c('0x6b')]();fs[_0x138c('0x6c')](util[_0x138c('0x68')](_0x138c('0x6d'),_0x4a511d['params']['id'],_0x545328),_0x28496f);_0x3d6be5[_0x138c('0x6e')]('Content-disposition',_0x138c('0x6f')+util[_0x138c('0x68')]('Jscripty_Project_%d_Summary_%s.csv',_0x4a511d[_0x138c('0x51')]['id'],_0x545328));_0x3d6be5['setHeader'](_0x138c('0x70'),_0x138c('0x71'));return _0x3d6be5[_0x138c('0x72')](util[_0x138c('0x68')](_0x138c('0x6d'),_0x4a511d[_0x138c('0x51')]['id'],_0x545328));}else{return _0x3d6be5[_0x138c('0x17')](0xcc);}})[_0x138c('0x45')](handleError(_0x3d6be5,null));};
\ No newline at end of file
+var _0x285b=['setHeader','Content-disposition','attachment;\x20filename=','Content-type','text/csv','download','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','limit','count','set','Content-Range','apply','reject','update','then','destroy','get','Projects','UserProfileResource','end','error','stack','name','index','JscriptyProject','rawAttributes','fieldName','type','map','query','keys','filters','intersection','attributes','model','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','include','findAll','rows','catch','show','params','includeAll','options','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','find','userProfileId','autoAssociation','clone','createdAt','body','updatedAt','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','findOne','JscriptySessionReport','ProjectId','getAnswers','nolimit','JscriptyAnswerReport','number','toString','indexOf','replace','getSummary','startTime','starttime','parse','JscriptyQuestionReport','-createdAt','questionId','question','format','YYYY-MM-DD\x20HH:mm:ss','SessionId','answer','push','now','writeFileSync','/tmp/Jscripty_Project_%d_Summary_%s.csv'];(function(_0x433252,_0x36db15){var _0x401f34=function(_0xa7c989){while(--_0xa7c989){_0x433252['push'](_0x433252['shift']());}};_0x401f34(++_0x36db15);}(_0x285b,0x171));var _0xb285=function(_0x1f3b8c,_0x38619e){_0x1f3b8c=_0x1f3b8c-0x0;var _0x6d00a2=_0x285b[_0x1f3b8c];return _0x6d00a2;};'use strict';var emlformat=require(_0xb285('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xb285('0x1'));var jsonpatch=require(_0xb285('0x2'));var rp=require('request-promise');var moment=require(_0xb285('0x3'));var BPromise=require(_0xb285('0x4'));var Mustache=require(_0xb285('0x5'));var util=require(_0xb285('0x6'));var path=require(_0xb285('0x7'));var sox=require(_0xb285('0x8'));var csv=require(_0xb285('0x9'));var ejs=require(_0xb285('0xa'));var fs=require('fs');var fs_extra=require(_0xb285('0xb'));var _=require(_0xb285('0xc'));var squel=require('squel');var crypto=require(_0xb285('0xd'));var jsforce=require(_0xb285('0xe'));var deskjs=require(_0xb285('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xb285('0x10'));var Redis=require(_0xb285('0x11'));var authService=require(_0xb285('0x12'));var qs=require(_0xb285('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xb285('0x14'));var logger=require('../../config/logger')(_0xb285('0x15'));var utils=require(_0xb285('0x16'));var config=require(_0xb285('0x17'));var licenseUtil=require(_0xb285('0x18'));var db=require(_0xb285('0x19'))['db'];function respondWithStatusCode(_0x151a16,_0x39eef3){_0x39eef3=_0x39eef3||0xcc;return function(_0x19b745){if(_0x19b745){return _0x151a16[_0xb285('0x1a')](_0x39eef3);}return _0x151a16[_0xb285('0x1b')](_0x39eef3)['end']();};}function respondWithResult(_0x518217,_0x31b7b8){_0x31b7b8=_0x31b7b8||0xc8;return function(_0x21b84e){if(_0x21b84e){return _0x518217[_0xb285('0x1b')](_0x31b7b8)[_0xb285('0x1c')](_0x21b84e);}};}function respondWithFilteredResult(_0x52b3d1,_0x3f90f8){return function(_0x3f104a){if(_0x3f104a){var _0x281725=typeof _0x3f90f8[_0xb285('0x1d')]==='undefined'&&typeof _0x3f90f8[_0xb285('0x1e')]==='undefined';var _0x50ae0a=_0x3f104a[_0xb285('0x1f')];var _0x1e6a55=_0x281725?0x0:_0x3f90f8['offset'];var _0x9a75cc=_0x281725?_0x3f104a[_0xb285('0x1f')]:_0x3f90f8[_0xb285('0x1d')]+_0x3f90f8[_0xb285('0x1e')];var _0x17858d;if(_0x9a75cc>=_0x50ae0a){_0x9a75cc=_0x50ae0a;_0x17858d=0xc8;}else{_0x17858d=0xce;}_0x52b3d1[_0xb285('0x1b')](_0x17858d);return _0x52b3d1[_0xb285('0x20')](_0xb285('0x21'),_0x1e6a55+'-'+_0x9a75cc+'/'+_0x50ae0a)[_0xb285('0x1c')](_0x3f104a);}return null;};}function patchUpdates(_0x5d77cb){return function(_0x2f9967){try{jsonpatch[_0xb285('0x22')](_0x2f9967,_0x5d77cb,!![]);}catch(_0x453cab){return BPromise[_0xb285('0x23')](_0x453cab);}return _0x2f9967['save']();};}function saveUpdates(_0xc99e96,_0x33cdf4){return function(_0x531f1f){if(_0x531f1f){return _0x531f1f[_0xb285('0x24')](_0xc99e96)[_0xb285('0x25')](function(_0x4f4a56){return _0x4f4a56;});}return null;};}function removeEntity(_0x5f297d,_0x40a8a2){return function(_0x3058be){if(_0x3058be){return _0x3058be[_0xb285('0x26')]()[_0xb285('0x25')](function(){var _0x3c8fbd=_0x3058be[_0xb285('0x27')]({'plain':!![]});var _0x40a994=_0xb285('0x28');return db[_0xb285('0x29')][_0xb285('0x26')]({'where':{'type':_0x40a994,'resourceId':_0x3c8fbd['id']}})[_0xb285('0x25')](function(){return _0x3058be;});})['then'](function(){_0x5f297d[_0xb285('0x1b')](0xcc)[_0xb285('0x2a')]();});}};}function handleEntityNotFound(_0x56c81f,_0x164f52){return function(_0x53edd4){if(!_0x53edd4){_0x56c81f[_0xb285('0x1a')](0x194);}return _0x53edd4;};}function handleError(_0x67bc8b,_0x19a9d3){_0x19a9d3=_0x19a9d3||0x1f4;return function(_0x4377aa){logger[_0xb285('0x2b')](_0x4377aa[_0xb285('0x2c')]);if(_0x4377aa[_0xb285('0x2d')]){delete _0x4377aa[_0xb285('0x2d')];}_0x67bc8b[_0xb285('0x1b')](_0x19a9d3)['send'](_0x4377aa);};}exports[_0xb285('0x2e')]=function(_0x3af675,_0x2b3358){var _0x348e9a={},_0x3f7139={},_0x1c6174={'count':0x0,'rows':[]};var _0x236edc=_['map'](db[_0xb285('0x2f')][_0xb285('0x30')],function(_0x284550){return{'name':_0x284550[_0xb285('0x31')],'type':_0x284550[_0xb285('0x32')]['key']};});_0x3f7139['model']=_[_0xb285('0x33')](_0x236edc,_0xb285('0x2d'));_0x3f7139[_0xb285('0x34')]=_[_0xb285('0x35')](_0x3af675[_0xb285('0x34')]);_0x3f7139[_0xb285('0x36')]=_[_0xb285('0x37')](_0x3f7139['model'],_0x3f7139[_0xb285('0x34')]);_0x348e9a[_0xb285('0x38')]=_[_0xb285('0x37')](_0x3f7139[_0xb285('0x39')],qs['fields'](_0x3af675[_0xb285('0x34')][_0xb285('0x3a')]));_0x348e9a[_0xb285('0x38')]=_0x348e9a[_0xb285('0x38')][_0xb285('0x3b')]?_0x348e9a[_0xb285('0x38')]:_0x3f7139['model'];if(!_0x3af675[_0xb285('0x34')][_0xb285('0x3c')]('nolimit')){_0x348e9a[_0xb285('0x1e')]=qs[_0xb285('0x1e')](_0x3af675['query'][_0xb285('0x1e')]);_0x348e9a[_0xb285('0x1d')]=qs['offset'](_0x3af675[_0xb285('0x34')][_0xb285('0x1d')]);}_0x348e9a[_0xb285('0x3d')]=qs[_0xb285('0x3e')](_0x3af675[_0xb285('0x34')][_0xb285('0x3e')]);_0x348e9a[_0xb285('0x3f')]=qs[_0xb285('0x36')](_[_0xb285('0x40')](_0x3af675['query'],_0x3f7139[_0xb285('0x36')]),_0x236edc);if(_0x3af675[_0xb285('0x34')][_0xb285('0x41')]){_0x348e9a[_0xb285('0x3f')]=_[_0xb285('0x42')](_0x348e9a[_0xb285('0x3f')],{'$or':_['map'](_0x236edc,function(_0x37dec0){if(_0x37dec0[_0xb285('0x32')]!==_0xb285('0x43')){var _0x22f354={};_0x22f354[_0x37dec0[_0xb285('0x2d')]]={'$like':'%'+_0x3af675[_0xb285('0x34')][_0xb285('0x41')]+'%'};return _0x22f354;}})});}_0x348e9a=_[_0xb285('0x42')]({},_0x348e9a,_0x3af675['options']);var _0x222e51={'where':_0x348e9a['where']};return db[_0xb285('0x2f')][_0xb285('0x1f')](_0x222e51)[_0xb285('0x25')](function(_0x2e8334){_0x1c6174[_0xb285('0x1f')]=_0x2e8334;if(_0x3af675['query']['includeAll']){_0x348e9a[_0xb285('0x44')]=[{'all':!![]}];}return db['JscriptyProject'][_0xb285('0x45')](_0x348e9a);})[_0xb285('0x25')](function(_0x2609c3){_0x1c6174[_0xb285('0x46')]=_0x2609c3;return _0x1c6174;})['then'](respondWithFilteredResult(_0x2b3358,_0x348e9a))[_0xb285('0x47')](handleError(_0x2b3358,null));};exports[_0xb285('0x48')]=function(_0x58bf3c,_0x46110c){var _0x2f476c={'raw':![],'where':{'id':_0x58bf3c[_0xb285('0x49')]['id']}},_0x11621b={};_0x11621b[_0xb285('0x39')]=_[_0xb285('0x35')](db[_0xb285('0x2f')][_0xb285('0x30')]);_0x11621b[_0xb285('0x34')]=_[_0xb285('0x35')](_0x58bf3c[_0xb285('0x34')]);_0x11621b[_0xb285('0x36')]=_[_0xb285('0x37')](_0x11621b[_0xb285('0x39')],_0x11621b[_0xb285('0x34')]);_0x2f476c['attributes']=_[_0xb285('0x37')](_0x11621b['model'],qs[_0xb285('0x3a')](_0x58bf3c[_0xb285('0x34')][_0xb285('0x3a')]));_0x2f476c[_0xb285('0x38')]=_0x2f476c[_0xb285('0x38')][_0xb285('0x3b')]?_0x2f476c[_0xb285('0x38')]:_0x11621b[_0xb285('0x39')];if(_0x58bf3c[_0xb285('0x34')][_0xb285('0x4a')]){_0x2f476c[_0xb285('0x44')]=[{'all':!![]}];}_0x2f476c=_[_0xb285('0x42')]({},_0x2f476c,_0x58bf3c[_0xb285('0x4b')]);return db['JscriptyProject']['find'](_0x2f476c)[_0xb285('0x25')](handleEntityNotFound(_0x46110c,null))[_0xb285('0x25')](respondWithResult(_0x46110c,null))[_0xb285('0x47')](handleError(_0x46110c,null));};exports[_0xb285('0x4c')]=function(_0x178fc9,_0x5a9bcb){return db[_0xb285('0x2f')]['create'](_0x178fc9['body'],{})['then'](function(_0x473c3f){var _0xc2fb94=_0x178fc9[_0xb285('0x4d')][_0xb285('0x27')]({'plain':!![]});if(!_0xc2fb94)throw new Error(_0xb285('0x4e'));if(_0xc2fb94[_0xb285('0x4f')]==='user'){var _0x4a7e2a=_0x473c3f[_0xb285('0x27')]({'plain':!![]});var _0x21b8af='Projects';return db['UserProfileSection'][_0xb285('0x50')]({'where':{'name':_0x21b8af,'userProfileId':_0xc2fb94[_0xb285('0x51')]},'raw':!![]})[_0xb285('0x25')](function(_0x33c042){if(_0x33c042&&_0x33c042[_0xb285('0x52')]===0x0){return db[_0xb285('0x29')][_0xb285('0x4c')]({'name':_0x4a7e2a[_0xb285('0x2d')],'resourceId':_0x4a7e2a['id'],'type':_0x33c042[_0xb285('0x2d')],'sectionId':_0x33c042['id']},{})[_0xb285('0x25')](function(){return _0x473c3f;});}else{return _0x473c3f;}})[_0xb285('0x47')](function(_0x1750ab){logger[_0xb285('0x2b')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x1750ab);throw _0x1750ab;});}return _0x473c3f;})[_0xb285('0x25')](respondWithResult(_0x5a9bcb,0xc9))[_0xb285('0x47')](handleError(_0x5a9bcb,null));};exports[_0xb285('0x53')]=function(_0x1cd6ca,_0x4cbb2d){var _0x1d9869={'where':{'id':_0x1cd6ca['params']['id']}},_0x248095={};_0x248095['model']=_['keys'](db[_0xb285('0x2f')][_0xb285('0x30')]);_0x1d9869[_0xb285('0x38')]=_[_0xb285('0x37')](_0x248095[_0xb285('0x39')],qs[_0xb285('0x3a')](_0x1cd6ca[_0xb285('0x34')]['fields']));_0x1d9869[_0xb285('0x38')]=_0x1d9869['attributes']['length']?_0x1d9869[_0xb285('0x38')]:_0x248095[_0xb285('0x39')];if(_0x1cd6ca[_0xb285('0x34')][_0xb285('0x4a')]){_0x1d9869['include']=[{'all':!![]}];}_0x1d9869=_[_0xb285('0x42')]({},_0x1d9869,_0x1cd6ca[_0xb285('0x4b')]);return db[_0xb285('0x2f')]['find'](_0x1d9869)[_0xb285('0x25')](handleEntityNotFound(_0x4cbb2d,null))[_0xb285('0x25')](function(_0x5c317f){if(_0x5c317f){var _0x3bc39d=_0x5c317f[_0xb285('0x27')]({'plain':!![]});_0x3bc39d=qs['omit'](_0x3bc39d,['id',_0xb285('0x54'),'updatedAt']);_0x1cd6ca['body']=_['omit'](_0x1cd6ca[_0xb285('0x55')],['id',_0xb285('0x54'),_0xb285('0x56')]);return db[_0xb285('0x2f')][_0xb285('0x4c')](_[_0xb285('0x42')](_0x3bc39d,_0x1cd6ca[_0xb285('0x55')]),{'include':_0x1cd6ca[_0xb285('0x34')][_0xb285('0x4a')]?[{'all':!![]}]:undefined})[_0xb285('0x25')](function(_0x5c0eb6){var _0x9c0759=_0x1cd6ca[_0xb285('0x4d')][_0xb285('0x27')]({'plain':!![]});if(!_0x9c0759)throw new Error(_0xb285('0x4e'));if(_0x9c0759[_0xb285('0x4f')]===_0xb285('0x4d')){var _0x66f6e8=_0x5c0eb6['get']({'plain':!![]});var _0x54b9d9=_0xb285('0x28');return db[_0xb285('0x57')][_0xb285('0x50')]({'where':{'name':_0x54b9d9,'userProfileId':_0x9c0759[_0xb285('0x51')]},'raw':!![]})[_0xb285('0x25')](function(_0x24bd05){if(_0x24bd05&&_0x24bd05[_0xb285('0x52')]===0x0){return db[_0xb285('0x29')][_0xb285('0x4c')]({'name':_0x66f6e8['name'],'resourceId':_0x66f6e8['id'],'type':_0x24bd05[_0xb285('0x2d')],'sectionId':_0x24bd05['id']},{})[_0xb285('0x25')](function(){return _0x5c0eb6;});}else{return _0x5c0eb6;}})[_0xb285('0x47')](function(_0x12e825){logger[_0xb285('0x2b')](_0xb285('0x58'),_0x12e825);throw _0x12e825;});}return _0x5c0eb6;});}})[_0xb285('0x25')](respondWithResult(_0x4cbb2d,0xc9))[_0xb285('0x47')](handleError(_0x4cbb2d,null));};exports[_0xb285('0x24')]=function(_0x1fb9c3,_0x29f027){if(_0x1fb9c3[_0xb285('0x55')]['id']){delete _0x1fb9c3[_0xb285('0x55')]['id'];}return db['JscriptyProject'][_0xb285('0x50')]({'where':{'id':_0x1fb9c3[_0xb285('0x49')]['id']}})[_0xb285('0x25')](handleEntityNotFound(_0x29f027,null))[_0xb285('0x25')](saveUpdates(_0x1fb9c3[_0xb285('0x55')],null))[_0xb285('0x25')](respondWithResult(_0x29f027,null))[_0xb285('0x47')](handleError(_0x29f027,null));};exports['destroy']=function(_0x20e181,_0x1ae470){return db[_0xb285('0x2f')]['find']({'where':{'id':_0x20e181['params']['id']}})[_0xb285('0x25')](handleEntityNotFound(_0x1ae470,null))[_0xb285('0x25')](removeEntity(_0x1ae470,null))['catch'](handleError(_0x1ae470,null));};exports['getSessions']=function(_0x417433,_0x2c2746,_0x1058f0){var _0x2363ee={'raw':!![],'where':{}};var _0x21cb64={};var _0xb40684={'count':0x0,'rows':[]};return db[_0xb285('0x2f')][_0xb285('0x59')]({'where':{'id':_0x417433[_0xb285('0x49')]['id']}})[_0xb285('0x25')](handleEntityNotFound(_0x2c2746,null))[_0xb285('0x25')](function(_0x1c493f){if(_0x1c493f){_0x21cb64['model']=_[_0xb285('0x35')](db[_0xb285('0x5a')][_0xb285('0x30')]);_0x21cb64['query']=_[_0xb285('0x35')](_0x417433['query']);_0x21cb64[_0xb285('0x36')]=_[_0xb285('0x37')](_0x21cb64[_0xb285('0x39')],_0x21cb64[_0xb285('0x34')]);_0x2363ee[_0xb285('0x38')]=_[_0xb285('0x37')](_0x21cb64[_0xb285('0x39')],qs[_0xb285('0x3a')](_0x417433[_0xb285('0x34')][_0xb285('0x3a')]));_0x2363ee[_0xb285('0x38')]=_0x2363ee['attributes'][_0xb285('0x3b')]?_0x2363ee[_0xb285('0x38')]:_0x21cb64[_0xb285('0x39')];if(!_0x417433[_0xb285('0x34')]['hasOwnProperty']('nolimit')){_0x2363ee[_0xb285('0x1e')]=qs[_0xb285('0x1e')](_0x417433['query'][_0xb285('0x1e')]);_0x2363ee[_0xb285('0x1d')]=qs[_0xb285('0x1d')](_0x417433['query'][_0xb285('0x1d')]);}_0x2363ee[_0xb285('0x3d')]=qs[_0xb285('0x3e')](_0x417433[_0xb285('0x34')][_0xb285('0x3e')]);_0x2363ee[_0xb285('0x3f')]=qs['filters'](_[_0xb285('0x40')](_0x417433[_0xb285('0x34')],_0x21cb64[_0xb285('0x36')]));_0x2363ee[_0xb285('0x3f')][_0xb285('0x5b')]=_0x1c493f['id'];if(_0x417433['query']['filter']){_0x2363ee[_0xb285('0x3f')]=_[_0xb285('0x42')](_0x2363ee['where'],{'$or':_[_0xb285('0x33')](_0x2363ee[_0xb285('0x38')],function(_0x33e57c){var _0x28224e={};_0x28224e[_0x33e57c]={'$like':'%'+_0x417433['query'][_0xb285('0x41')]+'%'};return _0x28224e;})});}_0x2363ee=_['merge']({},_0x2363ee,_0x417433['options']);return db[_0xb285('0x5a')][_0xb285('0x1f')]({'where':_0x2363ee[_0xb285('0x3f')]})[_0xb285('0x25')](function(_0x36945d){_0xb40684[_0xb285('0x1f')]=_0x36945d;if(_0x417433['query'][_0xb285('0x4a')]){_0x2363ee[_0xb285('0x44')]=[{'all':!![]}];}return db[_0xb285('0x5a')][_0xb285('0x45')](_0x2363ee);})[_0xb285('0x25')](function(_0x133dec){_0xb40684[_0xb285('0x46')]=_0x133dec;return _0xb40684;});}})[_0xb285('0x25')](respondWithFilteredResult(_0x2c2746,_0x2363ee))[_0xb285('0x47')](handleError(_0x2c2746,null));};exports[_0xb285('0x5c')]=function(_0x5a6c5,_0x4b7562,_0x584734){var _0x3af7aa={'raw':!![],'where':{}};var _0x1706cd={};var _0x1a9c5e={'count':0x0,'rows':[]};return db['JscriptyProject'][_0xb285('0x59')]({'where':{'id':_0x5a6c5[_0xb285('0x49')]['id']}})[_0xb285('0x25')](handleEntityNotFound(_0x4b7562,null))[_0xb285('0x25')](function(_0x2ee9a5){if(_0x2ee9a5){_0x1706cd[_0xb285('0x39')]=_[_0xb285('0x35')](db['JscriptyAnswerReport']['rawAttributes']);_0x1706cd['query']=_[_0xb285('0x35')](_0x5a6c5['query']);_0x1706cd[_0xb285('0x36')]=_[_0xb285('0x37')](_0x1706cd[_0xb285('0x39')],_0x1706cd[_0xb285('0x34')]);_0x3af7aa[_0xb285('0x38')]=_[_0xb285('0x37')](_0x1706cd[_0xb285('0x39')],qs[_0xb285('0x3a')](_0x5a6c5['query']['fields']));_0x3af7aa[_0xb285('0x38')]=_0x3af7aa[_0xb285('0x38')]['length']?_0x3af7aa[_0xb285('0x38')]:_0x1706cd[_0xb285('0x39')];if(!_0x5a6c5[_0xb285('0x34')][_0xb285('0x3c')](_0xb285('0x5d'))){_0x3af7aa[_0xb285('0x1e')]=qs[_0xb285('0x1e')](_0x5a6c5['query']['limit']);_0x3af7aa[_0xb285('0x1d')]=qs['offset'](_0x5a6c5[_0xb285('0x34')][_0xb285('0x1d')]);}_0x3af7aa[_0xb285('0x3d')]=qs[_0xb285('0x3e')](_0x5a6c5[_0xb285('0x34')]['sort']);_0x3af7aa[_0xb285('0x3f')]=qs[_0xb285('0x36')](_[_0xb285('0x40')](_0x5a6c5[_0xb285('0x34')],_0x1706cd[_0xb285('0x36')]));_0x3af7aa[_0xb285('0x3f')][_0xb285('0x5b')]=_0x2ee9a5['id'];if(_0x5a6c5['query'][_0xb285('0x41')]){_0x3af7aa[_0xb285('0x3f')]=_['merge'](_0x3af7aa['where'],{'$or':_[_0xb285('0x33')](_0x3af7aa[_0xb285('0x38')],function(_0x10126b){var _0xd6d06f={};_0xd6d06f[_0x10126b]={'$like':'%'+_0x5a6c5[_0xb285('0x34')][_0xb285('0x41')]+'%'};return _0xd6d06f;})});}_0x3af7aa=_[_0xb285('0x42')]({},_0x3af7aa,_0x5a6c5[_0xb285('0x4b')]);return db[_0xb285('0x5e')][_0xb285('0x1f')]({'where':_0x3af7aa[_0xb285('0x3f')]})['then'](function(_0x26dc21){_0x1a9c5e['count']=_0x26dc21;if(_0x5a6c5[_0xb285('0x34')][_0xb285('0x4a')]){_0x3af7aa[_0xb285('0x44')]=[{'all':!![]}];}return db[_0xb285('0x5e')][_0xb285('0x45')](_0x3af7aa);})['then'](function(_0x5aa75c){_0x1a9c5e[_0xb285('0x46')]=_0x5aa75c;return _0x1a9c5e;});}})[_0xb285('0x25')](respondWithFilteredResult(_0x4b7562,_0x3af7aa))[_0xb285('0x47')](handleError(_0x4b7562,null));};function char(_0xcef778){return _0xb285('0x5f')===typeof _0xcef778?String['fromCharCode'][_0xb285('0x22')](null,arguments):_0xcef778;}function needsEncapsulation(_0x1be39f){return!!_0x1be39f&&(_0x1be39f[_0xb285('0x60')]()[_0xb285('0x61')](char(0xd))>=0x0||_0x1be39f['toString']()[_0xb285('0x61')](char(0xa))>=0x0||_0x1be39f['toString']()[_0xb285('0x61')](char(0x2c))>=0x0||_0x1be39f[_0xb285('0x60')]()[_0xb285('0x61')](char(0x22))>=0x0);}function encapsulate(_0x46da16){var _0x348f2a=char(0x22),_0x4f2157='\x5c'+char(0x22),_0x4cc118=_0x46da16['toString']()[_0xb285('0x62')](new RegExp(_0x348f2a,'g'),_0x4f2157);return _0x348f2a+_0x4cc118+_0x348f2a;}exports[_0xb285('0x63')]=function(_0x13682d,_0x3e785a,_0x2565a0){var _0x2cb6e1,_0x1568ea;var _0x16891c={'where':{'ProjectId':_0x13682d['params']['id']}};if(_0x13682d[_0xb285('0x34')][_0xb285('0x64')]){_0x16891c[_0xb285('0x3f')][_0xb285('0x65')]=JSON[_0xb285('0x66')](_0x13682d[_0xb285('0x34')]['startTime']);}return db['JscriptySessionReport'][_0xb285('0x45')](_0x16891c)[_0xb285('0x25')](handleEntityNotFound(_0x3e785a,null))['then'](function(_0x246725){if(_0x246725){_0x2cb6e1=_0x246725;return db[_0xb285('0x67')][_0xb285('0x45')]({'where':{'SessionId':{'$in':_['map'](_0x2cb6e1,'id')},'ProjectId':_0x13682d[_0xb285('0x49')]['id']},'order':_0xb285('0x68')});}})['then'](handleEntityNotFound(_0x3e785a,null))['then'](function(_0x2ab078){if(_0x2ab078){_0x1568ea=_0x2ab078;var _0x21f8df={};for(var _0x48bc27=0x0,_0x40896f=_0x1568ea[_0xb285('0x3b')];_0x48bc27<_0x40896f;_0x48bc27++){if(!_0x21f8df[_0xb285('0x3c')](_0x1568ea[_0x48bc27]['questionId'])){_0x21f8df[_0x1568ea[_0x48bc27][_0xb285('0x69')]]=needsEncapsulation(_0x1568ea[_0x48bc27][_0xb285('0x6a')])?encapsulate(_0x1568ea[_0x48bc27][_0xb285('0x6a')]):_0x1568ea[_0x48bc27][_0xb285('0x6a')];}}var _0x501657=[],_0x3cf8e9={};for(var _0x1e812d=0x0,_0x21639a=_0x2cb6e1[_0xb285('0x3b')];_0x1e812d<_0x21639a;_0x1e812d++){_0x3cf8e9={'ProjectId':_0x13682d[_0xb285('0x49')]['id'],'SessionId':_0x2cb6e1[_0x1e812d]['id'],'StartTime':moment(_0x2cb6e1[_0x1e812d][_0xb285('0x65')])[_0xb285('0x6b')](_0xb285('0x6c'))};for(var _0x2269c5=0x0,_0x59f336=_0x1568ea['length'];_0x2269c5<_0x59f336;_0x2269c5++){if(_0x1568ea[_0x2269c5][_0xb285('0x6d')]==_0x2cb6e1[_0x1e812d]['id']&&_0x21f8df['hasOwnProperty'](_0x1568ea[_0x2269c5][_0xb285('0x69')])){_0x3cf8e9[_0x21f8df[_0x1568ea[_0x2269c5][_0xb285('0x69')]]]=_0x1568ea[_0x2269c5][_0xb285('0x6e')];}}for(var _0x408091 in _0x21f8df){if(!_0x3cf8e9[_0xb285('0x3c')](_0x21f8df[_0x408091])){_0x3cf8e9[_0x21f8df[_0x408091]]=null;}}_0x501657[_0xb285('0x6f')](_0x3cf8e9);}return _0x501657;}})[_0xb285('0x25')](function(_0x3c622e){if(!_['isEmpty'](_0x3c622e)){var _0x58e3fd=toCsv(_0x3c622e);var _0x77c466=Date[_0xb285('0x70')]();fs[_0xb285('0x71')](util[_0xb285('0x6b')](_0xb285('0x72'),_0x13682d[_0xb285('0x49')]['id'],_0x77c466),_0x58e3fd);_0x3e785a[_0xb285('0x73')](_0xb285('0x74'),_0xb285('0x75')+util['format']('Jscripty_Project_%d_Summary_%s.csv',_0x13682d[_0xb285('0x49')]['id'],_0x77c466));_0x3e785a[_0xb285('0x73')](_0xb285('0x76'),_0xb285('0x77'));return _0x3e785a[_0xb285('0x78')](util['format']('/tmp/Jscripty_Project_%d_Summary_%s.csv',_0x13682d[_0xb285('0x49')]['id'],_0x77c466));}else{return _0x3e785a[_0xb285('0x1a')](0xcc);}})[_0xb285('0x47')](handleError(_0x3e785a,null));};
\ No newline at end of file
index d8b13a5..29d30c8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x33c5=['JscriptyProject','jscripty_projects','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','./jscriptyProject.attributes','exports','define'];(function(_0x1a8f86,_0x5ed9c4){var _0x20d876=function(_0x596e1b){while(--_0x596e1b){_0x1a8f86['push'](_0x1a8f86['shift']());}};_0x20d876(++_0x5ed9c4);}(_0x33c5,0xe6));var _0x533c=function(_0x4b1032,_0x36952e){_0x4b1032=_0x4b1032-0x0;var _0x5a1d55=_0x33c5[_0x4b1032];return _0x5a1d55;};'use strict';var _=require('lodash');var util=require(_0x533c('0x0'));var logger=require(_0x533c('0x1'))('api');var moment=require(_0x533c('0x2'));var BPromise=require(_0x533c('0x3'));var rp=require(_0x533c('0x4'));var fs=require('fs');var path=require(_0x533c('0x5'));var rimraf=require(_0x533c('0x6'));var config=require('../../config/environment');var attributes=require(_0x533c('0x7'));module[_0x533c('0x8')]=function(_0x31d912,_0x151732){return _0x31d912[_0x533c('0x9')](_0x533c('0xa'),attributes,{'tableName':_0x533c('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x562d=['path','../../config/environment','define','JscriptyProject','jscripty_projects','lodash','util','../../config/logger','bluebird','request-promise'];(function(_0x384e98,_0x3ce130){var _0x385e81=function(_0x3e5af1){while(--_0x3e5af1){_0x384e98['push'](_0x384e98['shift']());}};_0x385e81(++_0x3ce130);}(_0x562d,0xe1));var _0xd562=function(_0x18f64a,_0x1c8248){_0x18f64a=_0x18f64a-0x0;var _0x44687f=_0x562d[_0x18f64a];return _0x44687f;};'use strict';var _=require(_0xd562('0x0'));var util=require(_0xd562('0x1'));var logger=require(_0xd562('0x2'))('api');var moment=require('moment');var BPromise=require(_0xd562('0x3'));var rp=require(_0xd562('0x4'));var fs=require('fs');var path=require(_0xd562('0x5'));var rimraf=require('rimraf');var config=require(_0xd562('0x6'));var attributes=require('./jscriptyProject.attributes');module['exports']=function(_0x1d05e9,_0x46bf9b){return _0x1d05e9[_0xd562('0x7')](_0xd562('0x8'),attributes,{'tableName':_0xd562('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index e687167..0c61f45 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xac4a=['JscriptyProject,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','client','then','info','debug','JscriptyProject,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0x1035c1,_0x2d8583){var _0x308d67=function(_0x58ddb6){while(--_0x58ddb6){_0x1035c1['push'](_0x1035c1['shift']());}};_0x308d67(++_0x2d8583);}(_0xac4a,0x13f));var _0xaac4=function(_0x104619,_0x8e20e5){_0x104619=_0x104619-0x0;var _0x2afbde=_0xac4a[_0x104619];return _0x2afbde;};'use strict';var _=require(_0xaac4('0x0'));var util=require(_0xaac4('0x1'));var moment=require(_0xaac4('0x2'));var BPromise=require(_0xaac4('0x3'));var rs=require(_0xaac4('0x4'));var fs=require('fs');var Redis=require(_0xaac4('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0xaac4('0x6'))(_0xaac4('0x7'));var config=require(_0xaac4('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xaac4('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1cdfc5,_0x5870e8,_0x1e4283){return new BPromise(function(_0x27354c,_0x567295){return client['request'](_0x1cdfc5,_0x1e4283)[_0xaac4('0xa')](function(_0x50d114){logger[_0xaac4('0xb')]('JscriptyProject,\x20%s,\x20%s',_0x5870e8,'request\x20sent');logger[_0xaac4('0xc')](_0xaac4('0xd'),_0x5870e8,_0xaac4('0xe'),JSON[_0xaac4('0xf')](_0x50d114));if(_0x50d114[_0xaac4('0x10')]){if(_0x50d114['error']['code']===0x1f4){logger[_0xaac4('0x10')](_0xaac4('0x11'),_0x5870e8,_0x50d114[_0xaac4('0x10')]['message']);return _0x567295(_0x50d114[_0xaac4('0x10')][_0xaac4('0x12')]);}logger['error'](_0xaac4('0x11'),_0x5870e8,_0x50d114[_0xaac4('0x10')][_0xaac4('0x12')]);return _0x27354c(_0x50d114[_0xaac4('0x10')][_0xaac4('0x12')]);}else{logger[_0xaac4('0xb')](_0xaac4('0x11'),_0x5870e8,_0xaac4('0xe'));_0x27354c(_0x50d114[_0xaac4('0x13')][_0xaac4('0x12')]);}})[_0xaac4('0x14')](function(_0x1766c2){logger[_0xaac4('0x10')]('JscriptyProject,\x20%s,\x20%s',_0x5870e8,_0x1766c2);_0x567295(_0x1766c2);});});}
\ No newline at end of file
+var _0x0713=['JscriptyProject,\x20%s,\x20%s','request\x20sent','debug','JscriptyProject,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info'];(function(_0x240e70,_0x46efa7){var _0x5d9361=function(_0x408271){while(--_0x408271){_0x240e70['push'](_0x240e70['shift']());}};_0x5d9361(++_0x46efa7);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x3071('0x0'));var BPromise=require(_0x3071('0x1'));var rs=require(_0x3071('0x2'));var fs=require('fs');var Redis=require(_0x3071('0x3'));var db=require(_0x3071('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x3071('0x5'))(_0x3071('0x6'));var config=require(_0x3071('0x7'));var jayson=require(_0x3071('0x8'));var client=jayson[_0x3071('0x9')][_0x3071('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1d3dd6,_0x2f1e87,_0xbd737f){return new BPromise(function(_0x22274c,_0x3e9a5e){return client[_0x3071('0xb')](_0x1d3dd6,_0xbd737f)[_0x3071('0xc')](function(_0x4a36ec){logger[_0x3071('0xd')](_0x3071('0xe'),_0x2f1e87,_0x3071('0xf'));logger[_0x3071('0x10')](_0x3071('0x11'),_0x2f1e87,'request\x20sent',JSON[_0x3071('0x12')](_0x4a36ec));if(_0x4a36ec[_0x3071('0x13')]){if(_0x4a36ec[_0x3071('0x13')][_0x3071('0x14')]===0x1f4){logger[_0x3071('0x13')]('JscriptyProject,\x20%s,\x20%s',_0x2f1e87,_0x4a36ec['error'][_0x3071('0x15')]);return _0x3e9a5e(_0x4a36ec['error'][_0x3071('0x15')]);}logger[_0x3071('0x13')]('JscriptyProject,\x20%s,\x20%s',_0x2f1e87,_0x4a36ec[_0x3071('0x13')]['message']);return _0x22274c(_0x4a36ec[_0x3071('0x13')][_0x3071('0x15')]);}else{logger[_0x3071('0xd')](_0x3071('0xe'),_0x2f1e87,_0x3071('0xf'));_0x22274c(_0x4a36ec[_0x3071('0x16')][_0x3071('0x15')]);}})[_0x3071('0x17')](function(_0x21aad3){logger[_0x3071('0x13')]('JscriptyProject,\x20%s,\x20%s',_0x2f1e87,_0x21aad3);_0x3e9a5e(_0x21aad3);});});}
\ No newline at end of file
index ba6c94a..68ac466 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x87f4=['update','delete','destroy','exports','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','describe','/:id','show','create'];(function(_0x338f73,_0x1945c8){var _0x163fdf=function(_0x4cd033){while(--_0x4cd033){_0x338f73['push'](_0x338f73['shift']());}};_0x163fdf(++_0x1945c8);}(_0x87f4,0x194));var _0x487f=function(_0x166146,_0x1f34c6){_0x166146=_0x166146-0x0;var _0x9c7390=_0x87f4[_0x166146];return _0x9c7390;};'use strict';var multer=require('multer');var util=require(_0x487f('0x0'));var path=require(_0x487f('0x1'));var timeout=require(_0x487f('0x2'));var express=require(_0x487f('0x3'));var router=express['Router']();var fs_extra=require(_0x487f('0x4'));var auth=require(_0x487f('0x5'));var interaction=require(_0x487f('0x6'));var config=require(_0x487f('0x7'));var controller=require('./jscriptyQuestionReport.controller');router[_0x487f('0x8')]('/',auth[_0x487f('0x9')](),controller[_0x487f('0xa')]);router['get'](_0x487f('0xb'),auth[_0x487f('0x9')](),controller[_0x487f('0xc')]);router['get'](_0x487f('0xd'),auth[_0x487f('0x9')](),controller[_0x487f('0xe')]);router['post']('/',auth[_0x487f('0x9')](),controller[_0x487f('0xf')]);router['put']('/:id',auth[_0x487f('0x9')](),controller[_0x487f('0x10')]);router[_0x487f('0x11')](_0x487f('0xd'),auth[_0x487f('0x9')](),controller[_0x487f('0x12')]);module[_0x487f('0x13')]=router;
\ No newline at end of file
+var _0xdd98=['../../config/environment','get','/describe','isAuthenticated','/:id','post','create','put','update','delete','exports','multer','util','path','express','../../components/interaction/service'];(function(_0x76641c,_0x18870c){var _0x53e88e=function(_0x515451){while(--_0x515451){_0x76641c['push'](_0x76641c['shift']());}};_0x53e88e(++_0x18870c);}(_0xdd98,0x1eb));var _0x8dd9=function(_0x50e153,_0x4e8ede){_0x50e153=_0x50e153-0x0;var _0x3f76e1=_0xdd98[_0x50e153];return _0x3f76e1;};'use strict';var multer=require(_0x8dd9('0x0'));var util=require(_0x8dd9('0x1'));var path=require(_0x8dd9('0x2'));var timeout=require('connect-timeout');var express=require(_0x8dd9('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x8dd9('0x4'));var config=require(_0x8dd9('0x5'));var controller=require('./jscriptyQuestionReport.controller');router[_0x8dd9('0x6')]('/',auth['isAuthenticated'](),controller['index']);router['get'](_0x8dd9('0x7'),auth[_0x8dd9('0x8')](),controller['describe']);router[_0x8dd9('0x6')](_0x8dd9('0x9'),auth[_0x8dd9('0x8')](),controller['show']);router[_0x8dd9('0xa')]('/',auth[_0x8dd9('0x8')](),controller[_0x8dd9('0xb')]);router[_0x8dd9('0xc')](_0x8dd9('0x9'),auth[_0x8dd9('0x8')](),controller[_0x8dd9('0xd')]);router[_0x8dd9('0xe')](_0x8dd9('0x9'),auth[_0x8dd9('0x8')](),controller['destroy']);module[_0x8dd9('0xf')]=router;
\ No newline at end of file
index 9357ace..d5396c1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['long','STRING','sequelize','exports','TEXT'];(function(_0x35885a,_0x42fed7){var _0xe86249=function(_0x98edb3){while(--_0x98edb3){_0x35885a['push'](_0x35885a['shift']());}};_0xe86249(++_0x42fed7);}(_0x7a54,0x106));var _0x47a5=function(_0x2076e3,_0x4b1581){_0x2076e3=_0x2076e3-0x0;var _0x3fe6d3=_0x7a54[_0x2076e3];return _0x3fe6d3;};'use strict';var Sequelize=require(_0x47a5('0x0'));module[_0x47a5('0x1')]={'question':{'type':Sequelize[_0x47a5('0x2')]},'answer':{'type':Sequelize['TEXT'](_0x47a5('0x3'))},'membername':{'type':Sequelize[_0x47a5('0x4')]},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x47a5('0x4')]},'uniqueid':{'type':Sequelize[_0x47a5('0x4')]},'calleridname':{'type':Sequelize[_0x47a5('0x4')]},'calleridnum':{'type':Sequelize[_0x47a5('0x4')]},'questionId':{'type':Sequelize[_0x47a5('0x4')]}};
\ No newline at end of file
+var _0x7a54=['long','STRING','sequelize','exports','TEXT'];(function(_0x51020b,_0x38c2c7){var _0x371e47=function(_0x2a538f){while(--_0x2a538f){_0x51020b['push'](_0x51020b['shift']());}};_0x371e47(++_0x38c2c7);}(_0x7a54,0x106));var _0x47a5=function(_0x4d7b34,_0x56dd22){_0x4d7b34=_0x4d7b34-0x0;var _0x300c34=_0x7a54[_0x4d7b34];return _0x300c34;};'use strict';var Sequelize=require(_0x47a5('0x0'));module[_0x47a5('0x1')]={'question':{'type':Sequelize[_0x47a5('0x2')]},'answer':{'type':Sequelize['TEXT'](_0x47a5('0x3'))},'membername':{'type':Sequelize[_0x47a5('0x4')]},'projectname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0x47a5('0x4')]},'uniqueid':{'type':Sequelize[_0x47a5('0x4')]},'calleridname':{'type':Sequelize[_0x47a5('0x4')]},'calleridnum':{'type':Sequelize[_0x47a5('0x4')]},'questionId':{'type':Sequelize[_0x47a5('0x4')]}};
\ No newline at end of file
index 467a974..084a841 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe423=['key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','map','options','includeAll','include','findAll','rows','catch','show','params','create','update','body','find','describe','eml-format','rimraf','zip-dir','moment','bluebird','mustache','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','to-csv','papaparse','ioredis','../../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','apply','save','then','destroy','error','name','send','index','JscriptyQuestionReport','rawAttributes','type'];(function(_0x2fd4a1,_0x58ad1c){var _0x4945f0=function(_0x57d45c){while(--_0x57d45c){_0x2fd4a1['push'](_0x2fd4a1['shift']());}};_0x4945f0(++_0x58ad1c);}(_0xe423,0x19b));var _0x3e42=function(_0x5e4a71,_0x108169){_0x5e4a71=_0x5e4a71-0x0;var _0x14e65e=_0xe423[_0x5e4a71];return _0x14e65e;};'use strict';var emlformat=require(_0x3e42('0x0'));var rimraf=require(_0x3e42('0x1'));var zipdir=require(_0x3e42('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x3e42('0x3'));var BPromise=require(_0x3e42('0x4'));var Mustache=require(_0x3e42('0x5'));var util=require('util');var path=require(_0x3e42('0x6'));var sox=require(_0x3e42('0x7'));var csv=require('to-csv');var ejs=require(_0x3e42('0x8'));var fs=require('fs');var fs_extra=require(_0x3e42('0x9'));var _=require(_0x3e42('0xa'));var squel=require(_0x3e42('0xb'));var crypto=require(_0x3e42('0xc'));var jsforce=require(_0x3e42('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x3e42('0xe'));var querystring=require('querystring');var Papa=require(_0x3e42('0xf'));var Redis=require(_0x3e42('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x3e42('0x11'));var as=require(_0x3e42('0x12'));var hardwareService=require(_0x3e42('0x13'));var logger=require(_0x3e42('0x14'))(_0x3e42('0x15'));var utils=require(_0x3e42('0x16'));var config=require(_0x3e42('0x17'));var licenseUtil=require(_0x3e42('0x18'));var db=require(_0x3e42('0x19'))['db'];function respondWithStatusCode(_0x29dd4d,_0x28fdec){_0x28fdec=_0x28fdec||0xcc;return function(_0x505986){if(_0x505986){return _0x29dd4d[_0x3e42('0x1a')](_0x28fdec);}return _0x29dd4d[_0x3e42('0x1b')](_0x28fdec)[_0x3e42('0x1c')]();};}function respondWithResult(_0x218ace,_0x336e37){_0x336e37=_0x336e37||0xc8;return function(_0x1992f6){if(_0x1992f6){return _0x218ace[_0x3e42('0x1b')](_0x336e37)['json'](_0x1992f6);}};}function respondWithFilteredResult(_0x324693,_0x1559bb){return function(_0x274cc6){if(_0x274cc6){var _0x2eb0bb=typeof _0x1559bb[_0x3e42('0x1d')]===_0x3e42('0x1e')&&typeof _0x1559bb[_0x3e42('0x1f')]===_0x3e42('0x1e');var _0x4b485f=_0x274cc6[_0x3e42('0x20')];var _0x54884e=_0x2eb0bb?0x0:_0x1559bb[_0x3e42('0x1d')];var _0x545420=_0x2eb0bb?_0x274cc6['count']:_0x1559bb[_0x3e42('0x1d')]+_0x1559bb[_0x3e42('0x1f')];var _0x33af8d;if(_0x545420>=_0x4b485f){_0x545420=_0x4b485f;_0x33af8d=0xc8;}else{_0x33af8d=0xce;}_0x324693[_0x3e42('0x1b')](_0x33af8d);return _0x324693[_0x3e42('0x21')]('Content-Range',_0x54884e+'-'+_0x545420+'/'+_0x4b485f)['json'](_0x274cc6);}return null;};}function patchUpdates(_0x573776){return function(_0x227c21){try{jsonpatch[_0x3e42('0x22')](_0x227c21,_0x573776,!![]);}catch(_0x3b5e79){return BPromise['reject'](_0x3b5e79);}return _0x227c21[_0x3e42('0x23')]();};}function saveUpdates(_0x54e271,_0x3ec713){return function(_0x5458c2){if(_0x5458c2){return _0x5458c2['update'](_0x54e271)[_0x3e42('0x24')](function(_0x45e751){return _0x45e751;});}return null;};}function removeEntity(_0x406190,_0x1b921c){return function(_0x3af2af){if(_0x3af2af){return _0x3af2af[_0x3e42('0x25')]()[_0x3e42('0x24')](function(){_0x406190['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x5c1a48,_0x647d72){return function(_0x46420d){if(!_0x46420d){_0x5c1a48['sendStatus'](0x194);}return _0x46420d;};}function handleError(_0x503f5c,_0x392837){_0x392837=_0x392837||0x1f4;return function(_0x5c7e66){logger[_0x3e42('0x26')](_0x5c7e66['stack']);if(_0x5c7e66[_0x3e42('0x27')]){delete _0x5c7e66[_0x3e42('0x27')];}_0x503f5c[_0x3e42('0x1b')](_0x392837)[_0x3e42('0x28')](_0x5c7e66);};}exports[_0x3e42('0x29')]=function(_0x4bcac3,_0x1b0b10){var _0x1ed7fd={},_0x1d219c={},_0x478c48={'count':0x0,'rows':[]};var _0x4d722e=_['map'](db[_0x3e42('0x2a')][_0x3e42('0x2b')],function(_0x300485){return{'name':_0x300485['fieldName'],'type':_0x300485[_0x3e42('0x2c')][_0x3e42('0x2d')]};});_0x1d219c[_0x3e42('0x2e')]=_['map'](_0x4d722e,'name');_0x1d219c[_0x3e42('0x2f')]=_[_0x3e42('0x30')](_0x4bcac3['query']);_0x1d219c['filters']=_[_0x3e42('0x31')](_0x1d219c[_0x3e42('0x2e')],_0x1d219c['query']);_0x1ed7fd[_0x3e42('0x32')]=_['intersection'](_0x1d219c[_0x3e42('0x2e')],qs['fields'](_0x4bcac3[_0x3e42('0x2f')][_0x3e42('0x33')]));_0x1ed7fd[_0x3e42('0x32')]=_0x1ed7fd[_0x3e42('0x32')][_0x3e42('0x34')]?_0x1ed7fd[_0x3e42('0x32')]:_0x1d219c[_0x3e42('0x2e')];if(!_0x4bcac3[_0x3e42('0x2f')][_0x3e42('0x35')](_0x3e42('0x36'))){_0x1ed7fd[_0x3e42('0x1f')]=qs[_0x3e42('0x1f')](_0x4bcac3[_0x3e42('0x2f')][_0x3e42('0x1f')]);_0x1ed7fd[_0x3e42('0x1d')]=qs[_0x3e42('0x1d')](_0x4bcac3[_0x3e42('0x2f')][_0x3e42('0x1d')]);}_0x1ed7fd[_0x3e42('0x37')]=qs[_0x3e42('0x38')](_0x4bcac3[_0x3e42('0x2f')][_0x3e42('0x38')]);_0x1ed7fd[_0x3e42('0x39')]=qs[_0x3e42('0x3a')](_[_0x3e42('0x3b')](_0x4bcac3[_0x3e42('0x2f')],_0x1d219c[_0x3e42('0x3a')]),_0x4d722e);if(_0x4bcac3[_0x3e42('0x2f')][_0x3e42('0x3c')]){_0x1ed7fd[_0x3e42('0x39')]=_[_0x3e42('0x3d')](_0x1ed7fd[_0x3e42('0x39')],{'$or':_[_0x3e42('0x3e')](_0x4d722e,function(_0x1edb0e){if(_0x1edb0e[_0x3e42('0x2c')]!=='VIRTUAL'){var _0x479e96={};_0x479e96[_0x1edb0e[_0x3e42('0x27')]]={'$like':'%'+_0x4bcac3[_0x3e42('0x2f')]['filter']+'%'};return _0x479e96;}})});}_0x1ed7fd=_[_0x3e42('0x3d')]({},_0x1ed7fd,_0x4bcac3[_0x3e42('0x3f')]);var _0x4a338e={'where':_0x1ed7fd[_0x3e42('0x39')]};return db[_0x3e42('0x2a')][_0x3e42('0x20')](_0x4a338e)[_0x3e42('0x24')](function(_0x54e5db){_0x478c48[_0x3e42('0x20')]=_0x54e5db;if(_0x4bcac3['query'][_0x3e42('0x40')]){_0x1ed7fd[_0x3e42('0x41')]=[{'all':!![]}];}return db[_0x3e42('0x2a')][_0x3e42('0x42')](_0x1ed7fd);})['then'](function(_0x2ec16b){_0x478c48[_0x3e42('0x43')]=_0x2ec16b;return _0x478c48;})['then'](respondWithFilteredResult(_0x1b0b10,_0x1ed7fd))[_0x3e42('0x44')](handleError(_0x1b0b10,null));};exports[_0x3e42('0x45')]=function(_0x58a6f0,_0x535617){var _0x2bed50={'raw':!![],'where':{'id':_0x58a6f0[_0x3e42('0x46')]['id']}},_0x5d21c3={};_0x5d21c3[_0x3e42('0x2e')]=_[_0x3e42('0x30')](db[_0x3e42('0x2a')][_0x3e42('0x2b')]);_0x5d21c3[_0x3e42('0x2f')]=_[_0x3e42('0x30')](_0x58a6f0[_0x3e42('0x2f')]);_0x5d21c3[_0x3e42('0x3a')]=_[_0x3e42('0x31')](_0x5d21c3[_0x3e42('0x2e')],_0x5d21c3['query']);_0x2bed50['attributes']=_[_0x3e42('0x31')](_0x5d21c3[_0x3e42('0x2e')],qs[_0x3e42('0x33')](_0x58a6f0['query'][_0x3e42('0x33')]));_0x2bed50[_0x3e42('0x32')]=_0x2bed50[_0x3e42('0x32')]['length']?_0x2bed50[_0x3e42('0x32')]:_0x5d21c3['model'];if(_0x58a6f0['query'][_0x3e42('0x40')]){_0x2bed50[_0x3e42('0x41')]=[{'all':!![]}];}_0x2bed50=_[_0x3e42('0x3d')]({},_0x2bed50,_0x58a6f0['options']);return db['JscriptyQuestionReport']['find'](_0x2bed50)['then'](handleEntityNotFound(_0x535617,null))[_0x3e42('0x24')](respondWithResult(_0x535617,null))[_0x3e42('0x44')](handleError(_0x535617,null));};exports[_0x3e42('0x47')]=function(_0x1ac913,_0x2816b9){return db['JscriptyQuestionReport'][_0x3e42('0x47')](_0x1ac913['body'],{})[_0x3e42('0x24')](respondWithResult(_0x2816b9,0xc9))[_0x3e42('0x44')](handleError(_0x2816b9,null));};exports[_0x3e42('0x48')]=function(_0x48c43d,_0x56c157){if(_0x48c43d[_0x3e42('0x49')]['id']){delete _0x48c43d[_0x3e42('0x49')]['id'];}return db[_0x3e42('0x2a')][_0x3e42('0x4a')]({'where':{'id':_0x48c43d[_0x3e42('0x46')]['id']}})['then'](handleEntityNotFound(_0x56c157,null))['then'](saveUpdates(_0x48c43d[_0x3e42('0x49')],null))[_0x3e42('0x24')](respondWithResult(_0x56c157,null))[_0x3e42('0x44')](handleError(_0x56c157,null));};exports[_0x3e42('0x25')]=function(_0x58b9c9,_0x25916a){return db['JscriptyQuestionReport'][_0x3e42('0x4a')]({'where':{'id':_0x58b9c9[_0x3e42('0x46')]['id']}})[_0x3e42('0x24')](handleEntityNotFound(_0x25916a,null))['then'](removeEntity(_0x25916a,null))[_0x3e42('0x44')](handleError(_0x25916a,null));};exports[_0x3e42('0x4b')]=function(_0x42e98c,_0x459e9b){return db['JscriptyQuestionReport'][_0x3e42('0x4b')]()['then'](respondWithResult(_0x459e9b,null))[_0x3e42('0x44')](handleError(_0x459e9b,null));};
\ No newline at end of file
+var _0xb218=['intersection','attributes','fields','length','nolimit','limit','order','sort','filters','pick','where','VIRTUAL','filter','options','includeAll','include','catch','params','find','create','body','describe','eml-format','fast-json-patch','request-promise','moment','bluebird','util','path','fs-extra','lodash','squel','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','set','Content-Range','apply','update','then','destroy','error','stack','name','send','index','map','JscriptyQuestionReport','rawAttributes','type','key','model','query','keys'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb218,0xee));var _0x8b21=function(_0x239d4f,_0x412468){_0x239d4f=_0x239d4f-0x0;var _0x393070=_0xb218[_0x239d4f];return _0x393070;};'use strict';var emlformat=require(_0x8b21('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x8b21('0x1'));var rp=require(_0x8b21('0x2'));var moment=require(_0x8b21('0x3'));var BPromise=require(_0x8b21('0x4'));var Mustache=require('mustache');var util=require(_0x8b21('0x5'));var path=require(_0x8b21('0x6'));var sox=require('sox');var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x8b21('0x7'));var _=require(_0x8b21('0x8'));var squel=require(_0x8b21('0x9'));var crypto=require('crypto');var jsforce=require(_0x8b21('0xa'));var deskjs=require(_0x8b21('0xb'));var toCsv=require(_0x8b21('0xc'));var querystring=require(_0x8b21('0xd'));var Papa=require(_0x8b21('0xe'));var Redis=require(_0x8b21('0xf'));var authService=require(_0x8b21('0x10'));var qs=require(_0x8b21('0x11'));var as=require(_0x8b21('0x12'));var hardwareService=require(_0x8b21('0x13'));var logger=require(_0x8b21('0x14'))('api');var utils=require(_0x8b21('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x8b21('0x16'));var db=require(_0x8b21('0x17'))['db'];function respondWithStatusCode(_0x21aa4d,_0x480552){_0x480552=_0x480552||0xcc;return function(_0x3c275c){if(_0x3c275c){return _0x21aa4d[_0x8b21('0x18')](_0x480552);}return _0x21aa4d[_0x8b21('0x19')](_0x480552)[_0x8b21('0x1a')]();};}function respondWithResult(_0x1faed2,_0x2048bf){_0x2048bf=_0x2048bf||0xc8;return function(_0x163a08){if(_0x163a08){return _0x1faed2[_0x8b21('0x19')](_0x2048bf)[_0x8b21('0x1b')](_0x163a08);}};}function respondWithFilteredResult(_0x2fba39,_0x1d77d9){return function(_0x4ee614){if(_0x4ee614){var _0x3034fd=typeof _0x1d77d9[_0x8b21('0x1c')]==='undefined'&&typeof _0x1d77d9['limit']===_0x8b21('0x1d');var _0x400858=_0x4ee614[_0x8b21('0x1e')];var _0x33010f=_0x3034fd?0x0:_0x1d77d9[_0x8b21('0x1c')];var _0x5b2bb9=_0x3034fd?_0x4ee614[_0x8b21('0x1e')]:_0x1d77d9['offset']+_0x1d77d9['limit'];var _0x129c1c;if(_0x5b2bb9>=_0x400858){_0x5b2bb9=_0x400858;_0x129c1c=0xc8;}else{_0x129c1c=0xce;}_0x2fba39[_0x8b21('0x19')](_0x129c1c);return _0x2fba39[_0x8b21('0x1f')](_0x8b21('0x20'),_0x33010f+'-'+_0x5b2bb9+'/'+_0x400858)[_0x8b21('0x1b')](_0x4ee614);}return null;};}function patchUpdates(_0x21f73e){return function(_0x5b438e){try{jsonpatch[_0x8b21('0x21')](_0x5b438e,_0x21f73e,!![]);}catch(_0x11707d){return BPromise['reject'](_0x11707d);}return _0x5b438e['save']();};}function saveUpdates(_0x2acef9,_0x4b2ed6){return function(_0x4ae2f1){if(_0x4ae2f1){return _0x4ae2f1[_0x8b21('0x22')](_0x2acef9)[_0x8b21('0x23')](function(_0x55c13d){return _0x55c13d;});}return null;};}function removeEntity(_0x430fcc,_0x2e25b6){return function(_0x2ff6aa){if(_0x2ff6aa){return _0x2ff6aa[_0x8b21('0x24')]()[_0x8b21('0x23')](function(){_0x430fcc['status'](0xcc)[_0x8b21('0x1a')]();});}};}function handleEntityNotFound(_0x441b35,_0x4ac323){return function(_0x241a93){if(!_0x241a93){_0x441b35[_0x8b21('0x18')](0x194);}return _0x241a93;};}function handleError(_0x1de10f,_0x427066){_0x427066=_0x427066||0x1f4;return function(_0x2eff16){logger[_0x8b21('0x25')](_0x2eff16[_0x8b21('0x26')]);if(_0x2eff16[_0x8b21('0x27')]){delete _0x2eff16['name'];}_0x1de10f['status'](_0x427066)[_0x8b21('0x28')](_0x2eff16);};}exports[_0x8b21('0x29')]=function(_0x1a44ab,_0x3c4be5){var _0x460a7e={},_0x3a5c2b={},_0x1a4ae1={'count':0x0,'rows':[]};var _0x27845b=_[_0x8b21('0x2a')](db[_0x8b21('0x2b')][_0x8b21('0x2c')],function(_0x344350){return{'name':_0x344350['fieldName'],'type':_0x344350[_0x8b21('0x2d')][_0x8b21('0x2e')]};});_0x3a5c2b[_0x8b21('0x2f')]=_['map'](_0x27845b,_0x8b21('0x27'));_0x3a5c2b[_0x8b21('0x30')]=_[_0x8b21('0x31')](_0x1a44ab[_0x8b21('0x30')]);_0x3a5c2b['filters']=_[_0x8b21('0x32')](_0x3a5c2b[_0x8b21('0x2f')],_0x3a5c2b['query']);_0x460a7e[_0x8b21('0x33')]=_[_0x8b21('0x32')](_0x3a5c2b[_0x8b21('0x2f')],qs[_0x8b21('0x34')](_0x1a44ab['query'][_0x8b21('0x34')]));_0x460a7e['attributes']=_0x460a7e['attributes'][_0x8b21('0x35')]?_0x460a7e[_0x8b21('0x33')]:_0x3a5c2b[_0x8b21('0x2f')];if(!_0x1a44ab[_0x8b21('0x30')]['hasOwnProperty'](_0x8b21('0x36'))){_0x460a7e[_0x8b21('0x37')]=qs[_0x8b21('0x37')](_0x1a44ab[_0x8b21('0x30')]['limit']);_0x460a7e[_0x8b21('0x1c')]=qs[_0x8b21('0x1c')](_0x1a44ab['query'][_0x8b21('0x1c')]);}_0x460a7e[_0x8b21('0x38')]=qs[_0x8b21('0x39')](_0x1a44ab['query']['sort']);_0x460a7e['where']=qs[_0x8b21('0x3a')](_[_0x8b21('0x3b')](_0x1a44ab[_0x8b21('0x30')],_0x3a5c2b[_0x8b21('0x3a')]),_0x27845b);if(_0x1a44ab['query']['filter']){_0x460a7e[_0x8b21('0x3c')]=_['merge'](_0x460a7e['where'],{'$or':_[_0x8b21('0x2a')](_0x27845b,function(_0x3f991f){if(_0x3f991f[_0x8b21('0x2d')]!==_0x8b21('0x3d')){var _0x4bd44c={};_0x4bd44c[_0x3f991f[_0x8b21('0x27')]]={'$like':'%'+_0x1a44ab[_0x8b21('0x30')][_0x8b21('0x3e')]+'%'};return _0x4bd44c;}})});}_0x460a7e=_['merge']({},_0x460a7e,_0x1a44ab[_0x8b21('0x3f')]);var _0xc8a66a={'where':_0x460a7e['where']};return db[_0x8b21('0x2b')][_0x8b21('0x1e')](_0xc8a66a)[_0x8b21('0x23')](function(_0x55cd86){_0x1a4ae1[_0x8b21('0x1e')]=_0x55cd86;if(_0x1a44ab[_0x8b21('0x30')][_0x8b21('0x40')]){_0x460a7e[_0x8b21('0x41')]=[{'all':!![]}];}return db['JscriptyQuestionReport']['findAll'](_0x460a7e);})[_0x8b21('0x23')](function(_0x119dff){_0x1a4ae1['rows']=_0x119dff;return _0x1a4ae1;})[_0x8b21('0x23')](respondWithFilteredResult(_0x3c4be5,_0x460a7e))[_0x8b21('0x42')](handleError(_0x3c4be5,null));};exports['show']=function(_0xc00d10,_0x2424ec){var _0x442c47={'raw':!![],'where':{'id':_0xc00d10[_0x8b21('0x43')]['id']}},_0x5e9de7={};_0x5e9de7['model']=_['keys'](db[_0x8b21('0x2b')][_0x8b21('0x2c')]);_0x5e9de7['query']=_[_0x8b21('0x31')](_0xc00d10['query']);_0x5e9de7[_0x8b21('0x3a')]=_[_0x8b21('0x32')](_0x5e9de7['model'],_0x5e9de7['query']);_0x442c47[_0x8b21('0x33')]=_[_0x8b21('0x32')](_0x5e9de7[_0x8b21('0x2f')],qs[_0x8b21('0x34')](_0xc00d10[_0x8b21('0x30')]['fields']));_0x442c47[_0x8b21('0x33')]=_0x442c47[_0x8b21('0x33')][_0x8b21('0x35')]?_0x442c47[_0x8b21('0x33')]:_0x5e9de7['model'];if(_0xc00d10[_0x8b21('0x30')][_0x8b21('0x40')]){_0x442c47[_0x8b21('0x41')]=[{'all':!![]}];}_0x442c47=_['merge']({},_0x442c47,_0xc00d10[_0x8b21('0x3f')]);return db[_0x8b21('0x2b')][_0x8b21('0x44')](_0x442c47)['then'](handleEntityNotFound(_0x2424ec,null))[_0x8b21('0x23')](respondWithResult(_0x2424ec,null))['catch'](handleError(_0x2424ec,null));};exports[_0x8b21('0x45')]=function(_0x46d6ba,_0x39dcd8){return db['JscriptyQuestionReport'][_0x8b21('0x45')](_0x46d6ba[_0x8b21('0x46')],{})[_0x8b21('0x23')](respondWithResult(_0x39dcd8,0xc9))[_0x8b21('0x42')](handleError(_0x39dcd8,null));};exports['update']=function(_0x573ee5,_0x13c3f5){if(_0x573ee5[_0x8b21('0x46')]['id']){delete _0x573ee5[_0x8b21('0x46')]['id'];}return db[_0x8b21('0x2b')][_0x8b21('0x44')]({'where':{'id':_0x573ee5[_0x8b21('0x43')]['id']}})['then'](handleEntityNotFound(_0x13c3f5,null))[_0x8b21('0x23')](saveUpdates(_0x573ee5['body'],null))[_0x8b21('0x23')](respondWithResult(_0x13c3f5,null))['catch'](handleError(_0x13c3f5,null));};exports['destroy']=function(_0x26607f,_0x39924e){return db[_0x8b21('0x2b')][_0x8b21('0x44')]({'where':{'id':_0x26607f[_0x8b21('0x43')]['id']}})[_0x8b21('0x23')](handleEntityNotFound(_0x39924e,null))[_0x8b21('0x23')](removeEntity(_0x39924e,null))['catch'](handleError(_0x39924e,null));};exports[_0x8b21('0x47')]=function(_0x4306fa,_0x598287){return db[_0x8b21('0x2b')][_0x8b21('0x47')]()['then'](respondWithResult(_0x598287,null))[_0x8b21('0x42')](handleError(_0x598287,null));};
\ No newline at end of file
index 405e62f..ea08c11 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x79cb=['bluebird','request-promise','path','rimraf','../../config/environment','./jscriptyQuestionReport.attributes','report_jscripty_questions','lodash','util','../../config/logger','api','moment'];(function(_0x1536da,_0x547393){var _0x19a38c=function(_0x1ce149){while(--_0x1ce149){_0x1536da['push'](_0x1536da['shift']());}};_0x19a38c(++_0x547393);}(_0x79cb,0xdf));var _0xb79c=function(_0x208774,_0xfd724){_0x208774=_0x208774-0x0;var _0x25bcac=_0x79cb[_0x208774];return _0x25bcac;};'use strict';var _=require(_0xb79c('0x0'));var util=require(_0xb79c('0x1'));var logger=require(_0xb79c('0x2'))(_0xb79c('0x3'));var moment=require(_0xb79c('0x4'));var BPromise=require(_0xb79c('0x5'));var rp=require(_0xb79c('0x6'));var fs=require('fs');var path=require(_0xb79c('0x7'));var rimraf=require(_0xb79c('0x8'));var config=require(_0xb79c('0x9'));var attributes=require(_0xb79c('0xa'));module['exports']=function(_0x1b0ebf,_0xe2b23f){return _0x1b0ebf['define']('JscriptyQuestionReport',attributes,{'tableName':_0xb79c('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4c9d=['JscriptyQuestionReport','report_jscripty_questions','lodash','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./jscriptyQuestionReport.attributes','exports','define'];(function(_0x1b053b,_0x4915e9){var _0x266a81=function(_0x41f6a3){while(--_0x41f6a3){_0x1b053b['push'](_0x1b053b['shift']());}};_0x266a81(++_0x4915e9);}(_0x4c9d,0x1de));var _0xd4c9=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x4c9d[_0x2dafbe];return _0x58a45a;};'use strict';var _=require(_0xd4c9('0x0'));var util=require(_0xd4c9('0x1'));var logger=require('../../config/logger')(_0xd4c9('0x2'));var moment=require(_0xd4c9('0x3'));var BPromise=require(_0xd4c9('0x4'));var rp=require(_0xd4c9('0x5'));var fs=require('fs');var path=require(_0xd4c9('0x6'));var rimraf=require(_0xd4c9('0x7'));var config=require(_0xd4c9('0x8'));var attributes=require(_0xd4c9('0x9'));module[_0xd4c9('0xa')]=function(_0x4e40a8,_0x3ee7c5){return _0x4e40a8[_0xd4c9('0xb')](_0xd4c9('0xc'),attributes,{'tableName':_0xd4c9('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 5965add..df55363 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9071=['then','info','JscriptyQuestionReport,\x20%s,\x20%s','request\x20sent','debug','JscriptyQuestionReport,\x20%s,\x20%s,\x20%s','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','../../config/environment','client','http'];(function(_0x36f29d,_0x59e8e4){var _0x675979=function(_0xdf509a){while(--_0xdf509a){_0x36f29d['push'](_0x36f29d['shift']());}};_0x675979(++_0x59e8e4);}(_0x9071,0x16f));var _0x1907=function(_0x57df36,_0x207a1b){_0x57df36=_0x57df36-0x0;var _0x59ea0a=_0x9071[_0x57df36];return _0x59ea0a;};'use strict';var _=require(_0x1907('0x0'));var util=require(_0x1907('0x1'));var moment=require(_0x1907('0x2'));var BPromise=require(_0x1907('0x3'));var rs=require(_0x1907('0x4'));var fs=require('fs');var Redis=require(_0x1907('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x1907('0x6'));var logger=require(_0x1907('0x7'))('rpc');var config=require(_0x1907('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x1907('0x9')][_0x1907('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x46fdef,_0x4a0190,_0x15f03a){return new BPromise(function(_0x2f186f,_0x9bb018){return client['request'](_0x46fdef,_0x15f03a)[_0x1907('0xb')](function(_0x334b24){logger[_0x1907('0xc')](_0x1907('0xd'),_0x4a0190,_0x1907('0xe'));logger[_0x1907('0xf')](_0x1907('0x10'),_0x4a0190,'request\x20sent',JSON['stringify'](_0x334b24));if(_0x334b24[_0x1907('0x11')]){if(_0x334b24[_0x1907('0x11')]['code']===0x1f4){logger['error'](_0x1907('0xd'),_0x4a0190,_0x334b24[_0x1907('0x11')][_0x1907('0x12')]);return _0x9bb018(_0x334b24['error']['message']);}logger[_0x1907('0x11')](_0x1907('0xd'),_0x4a0190,_0x334b24[_0x1907('0x11')][_0x1907('0x12')]);return _0x2f186f(_0x334b24[_0x1907('0x11')]['message']);}else{logger[_0x1907('0xc')](_0x1907('0xd'),_0x4a0190,_0x1907('0xe'));_0x2f186f(_0x334b24[_0x1907('0x13')][_0x1907('0x12')]);}})[_0x1907('0x14')](function(_0x40f612){logger[_0x1907('0x11')](_0x1907('0xd'),_0x4a0190,_0x40f612);_0x9bb018(_0x40f612);});});}
\ No newline at end of file
+var _0xf34f=['../../config/environment','jayson/promise','client','request','info','JscriptyQuestionReport,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x597be4,_0x27e874){var _0x2b2608=function(_0x37ca34){while(--_0x37ca34){_0x597be4['push'](_0x597be4['shift']());}};_0x2b2608(++_0x27e874);}(_0xf34f,0x1db));var _0xff34=function(_0x316ef3,_0x48bdf6){_0x316ef3=_0x316ef3-0x0;var _0x445617=_0xf34f[_0x316ef3];return _0x445617;};'use strict';var _=require('lodash');var util=require(_0xff34('0x0'));var moment=require(_0xff34('0x1'));var BPromise=require(_0xff34('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xff34('0x3'));var db=require(_0xff34('0x4'))['db'];var utils=require(_0xff34('0x5'));var logger=require(_0xff34('0x6'))(_0xff34('0x7'));var config=require(_0xff34('0x8'));var jayson=require(_0xff34('0x9'));var client=jayson[_0xff34('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x377fb9,_0x17f6c4,_0x3c3b8d){return new BPromise(function(_0x3925b9,_0x3db158){return client[_0xff34('0xb')](_0x377fb9,_0x3c3b8d)['then'](function(_0x1a1f6){logger[_0xff34('0xc')](_0xff34('0xd'),_0x17f6c4,_0xff34('0xe'));logger[_0xff34('0xf')]('JscriptyQuestionReport,\x20%s,\x20%s,\x20%s',_0x17f6c4,_0xff34('0xe'),JSON['stringify'](_0x1a1f6));if(_0x1a1f6[_0xff34('0x10')]){if(_0x1a1f6[_0xff34('0x10')][_0xff34('0x11')]===0x1f4){logger[_0xff34('0x10')](_0xff34('0xd'),_0x17f6c4,_0x1a1f6[_0xff34('0x10')]['message']);return _0x3db158(_0x1a1f6[_0xff34('0x10')][_0xff34('0x12')]);}logger[_0xff34('0x10')]('JscriptyQuestionReport,\x20%s,\x20%s',_0x17f6c4,_0x1a1f6['error'][_0xff34('0x12')]);return _0x3925b9(_0x1a1f6[_0xff34('0x10')][_0xff34('0x12')]);}else{logger[_0xff34('0xc')](_0xff34('0xd'),_0x17f6c4,_0xff34('0xe'));_0x3925b9(_0x1a1f6[_0xff34('0x13')][_0xff34('0x12')]);}})[_0xff34('0x14')](function(_0x1c76ae){logger[_0xff34('0x10')](_0xff34('0xd'),_0x17f6c4,_0x1c76ae);_0x3db158(_0x1c76ae);});});}
\ No newline at end of file
index db907b1..e608825 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa726=['exports','multer','util','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./jscriptySessionReport.controller','get','isAuthenticated','/describe','/:id','show','/:id/questions','create','update','delete','destroy'];(function(_0x3d585f,_0x20d755){var _0x453ea1=function(_0x33d5c3){while(--_0x33d5c3){_0x3d585f['push'](_0x3d585f['shift']());}};_0x453ea1(++_0x20d755);}(_0xa726,0xa1));var _0x6a72=function(_0x4e4f0e,_0x1c3892){_0x4e4f0e=_0x4e4f0e-0x0;var _0x1a7219=_0xa726[_0x4e4f0e];return _0x1a7219;};'use strict';var multer=require(_0x6a72('0x0'));var util=require(_0x6a72('0x1'));var path=require('path');var timeout=require(_0x6a72('0x2'));var express=require(_0x6a72('0x3'));var router=express[_0x6a72('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x6a72('0x5'));var interaction=require(_0x6a72('0x6'));var config=require(_0x6a72('0x7'));var controller=require(_0x6a72('0x8'));router[_0x6a72('0x9')]('/',auth[_0x6a72('0xa')](),controller['index']);router['get'](_0x6a72('0xb'),auth[_0x6a72('0xa')](),controller['describe']);router[_0x6a72('0x9')](_0x6a72('0xc'),auth[_0x6a72('0xa')](),controller[_0x6a72('0xd')]);router['get'](_0x6a72('0xe'),auth['isAuthenticated'](),controller['getQuestions']);router['post']('/',auth[_0x6a72('0xa')](),controller[_0x6a72('0xf')]);router['put'](_0x6a72('0xc'),auth[_0x6a72('0xa')](),controller[_0x6a72('0x10')]);router[_0x6a72('0x11')](_0x6a72('0xc'),auth[_0x6a72('0xa')](),controller[_0x6a72('0x12')]);module[_0x6a72('0x13')]=router;
\ No newline at end of file
+var _0x750c=['connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./jscriptySessionReport.controller','get','isAuthenticated','index','describe','show','/:id/questions','getQuestions','post','create','put','/:id','update','delete','exports','util','path'];(function(_0x21799b,_0x17a5fa){var _0x2fbda8=function(_0x3f1da4){while(--_0x3f1da4){_0x21799b['push'](_0x21799b['shift']());}};_0x2fbda8(++_0x17a5fa);}(_0x750c,0x157));var _0xc750=function(_0x20dc1c,_0x21d9e8){_0x20dc1c=_0x20dc1c-0x0;var _0x108360=_0x750c[_0x20dc1c];return _0x108360;};'use strict';var multer=require('multer');var util=require(_0xc750('0x0'));var path=require(_0xc750('0x1'));var timeout=require(_0xc750('0x2'));var express=require(_0xc750('0x3'));var router=express[_0xc750('0x4')]();var fs_extra=require(_0xc750('0x5'));var auth=require(_0xc750('0x6'));var interaction=require(_0xc750('0x7'));var config=require('../../config/environment');var controller=require(_0xc750('0x8'));router[_0xc750('0x9')]('/',auth[_0xc750('0xa')](),controller[_0xc750('0xb')]);router[_0xc750('0x9')]('/describe',auth['isAuthenticated'](),controller[_0xc750('0xc')]);router[_0xc750('0x9')]('/:id',auth[_0xc750('0xa')](),controller[_0xc750('0xd')]);router[_0xc750('0x9')](_0xc750('0xe'),auth[_0xc750('0xa')](),controller[_0xc750('0xf')]);router[_0xc750('0x10')]('/',auth[_0xc750('0xa')](),controller[_0xc750('0x11')]);router[_0xc750('0x12')](_0xc750('0x13'),auth[_0xc750('0xa')](),controller[_0xc750('0x14')]);router[_0xc750('0x15')](_0xc750('0x13'),auth[_0xc750('0xa')](),controller['destroy']);module[_0xc750('0x16')]=router;
\ No newline at end of file
index 4a7516d..a12f22a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x78e7=['DATE','setDataValue','starttime','endtime','format','STRING','BOOLEAN','moment','sequelize','exports'];(function(_0x4cba6b,_0x5584e3){var _0x49db68=function(_0x228885){while(--_0x228885){_0x4cba6b['push'](_0x4cba6b['shift']());}};_0x49db68(++_0x5584e3);}(_0x78e7,0xb1));var _0x778e=function(_0x43f39c,_0x1544e8){_0x43f39c=_0x43f39c-0x0;var _0x31b09e=_0x78e7[_0x43f39c];return _0x31b09e;};'use strict';var moment=require(_0x778e('0x0'));var Sequelize=require(_0x778e('0x1'));module[_0x778e('0x2')]={'starttime':{'type':Sequelize[_0x778e('0x3')],'set':function(_0x40434c){this[_0x778e('0x4')](_0x778e('0x5'),_0x40434c);this[_0x778e('0x4')](_0x778e('0x6'),moment()[_0x778e('0x7')]('YYYY-MM-DD\x20HH:mm:ss'));}},'endtime':{'type':Sequelize[_0x778e('0x3')]},'membername':{'type':Sequelize[_0x778e('0x8')]},'projectname':{'type':Sequelize[_0x778e('0x8')]},'queue':{'type':Sequelize[_0x778e('0x8')]},'uniqueid':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x778e('0x8')]},'calleridnum':{'type':Sequelize[_0x778e('0x8')]},'completed':{'type':Sequelize[_0x778e('0x9')],'defaultValue':![]}};
\ No newline at end of file
+var _0xa904=['moment','sequelize','starttime','setDataValue','endtime','DATE','STRING','BOOLEAN'];(function(_0x562b39,_0x574554){var _0x561dea=function(_0x453b68){while(--_0x453b68){_0x562b39['push'](_0x562b39['shift']());}};_0x561dea(++_0x574554);}(_0xa904,0xf8));var _0x4a90=function(_0x2f32c4,_0x2597ba){_0x2f32c4=_0x2f32c4-0x0;var _0x95b5dc=_0xa904[_0x2f32c4];return _0x95b5dc;};'use strict';var moment=require(_0x4a90('0x0'));var Sequelize=require(_0x4a90('0x1'));module['exports']={'starttime':{'type':Sequelize['DATE'],'set':function(_0x17d7e6){this['setDataValue'](_0x4a90('0x2'),_0x17d7e6);this[_0x4a90('0x3')](_0x4a90('0x4'),moment()['format']('YYYY-MM-DD\x20HH:mm:ss'));}},'endtime':{'type':Sequelize[_0x4a90('0x5')]},'membername':{'type':Sequelize[_0x4a90('0x6')]},'projectname':{'type':Sequelize[_0x4a90('0x6')]},'queue':{'type':Sequelize[_0x4a90('0x6')]},'uniqueid':{'type':Sequelize[_0x4a90('0x6')]},'calleridname':{'type':Sequelize[_0x4a90('0x6')]},'calleridnum':{'type':Sequelize[_0x4a90('0x6')]},'completed':{'type':Sequelize[_0x4a90('0x7')],'defaultValue':![]}};
\ No newline at end of file
index 3723a8d..640d08a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7d93=['../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','json','offset','undefined','count','limit','set','apply','save','status','end','name','send','index','map','JscriptySessionReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','then','includeAll','findAll','rows','catch','show','params','include','create','update','body','find','destroy','describe','findOne','JscriptyQuestionReport','hasOwnProperty','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','ioredis'];(function(_0x2915dd,_0xf36c26){var _0x549593=function(_0x3176ae){while(--_0x3176ae){_0x2915dd['push'](_0x2915dd['shift']());}};_0x549593(++_0xf36c26);}(_0x7d93,0x135));var _0x37d9=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7d93[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x37d9('0x0'));var rimraf=require(_0x37d9('0x1'));var zipdir=require(_0x37d9('0x2'));var jsonpatch=require(_0x37d9('0x3'));var rp=require(_0x37d9('0x4'));var moment=require(_0x37d9('0x5'));var BPromise=require(_0x37d9('0x6'));var Mustache=require(_0x37d9('0x7'));var util=require(_0x37d9('0x8'));var path=require(_0x37d9('0x9'));var sox=require('sox');var csv=require(_0x37d9('0xa'));var ejs=require(_0x37d9('0xb'));var fs=require('fs');var fs_extra=require(_0x37d9('0xc'));var _=require(_0x37d9('0xd'));var squel=require(_0x37d9('0xe'));var crypto=require(_0x37d9('0xf'));var jsforce=require('jsforce');var deskjs=require(_0x37d9('0x10'));var toCsv=require(_0x37d9('0xa'));var querystring=require(_0x37d9('0x11'));var Papa=require('papaparse');var Redis=require(_0x37d9('0x12'));var authService=require(_0x37d9('0x13'));var qs=require(_0x37d9('0x14'));var as=require(_0x37d9('0x15'));var hardwareService=require(_0x37d9('0x16'));var logger=require(_0x37d9('0x17'))(_0x37d9('0x18'));var utils=require(_0x37d9('0x19'));var config=require(_0x37d9('0x1a'));var licenseUtil=require('../../config/license/util');var db=require(_0x37d9('0x1b'))['db'];function respondWithStatusCode(_0x3dec64,_0x537573){_0x537573=_0x537573||0xcc;return function(_0x9e58ec){if(_0x9e58ec){return _0x3dec64[_0x37d9('0x1c')](_0x537573);}return _0x3dec64['status'](_0x537573)['end']();};}function respondWithResult(_0x30c082,_0x5037ba){_0x5037ba=_0x5037ba||0xc8;return function(_0x4a7081){if(_0x4a7081){return _0x30c082['status'](_0x5037ba)[_0x37d9('0x1d')](_0x4a7081);}};}function respondWithFilteredResult(_0x5b0faa,_0x821dc3){return function(_0x35bb33){if(_0x35bb33){var _0x5a5aee=typeof _0x821dc3[_0x37d9('0x1e')]==='undefined'&&typeof _0x821dc3['limit']===_0x37d9('0x1f');var _0x5679d0=_0x35bb33[_0x37d9('0x20')];var _0x32c952=_0x5a5aee?0x0:_0x821dc3[_0x37d9('0x1e')];var _0x12393b=_0x5a5aee?_0x35bb33[_0x37d9('0x20')]:_0x821dc3[_0x37d9('0x1e')]+_0x821dc3[_0x37d9('0x21')];var _0x1e8146;if(_0x12393b>=_0x5679d0){_0x12393b=_0x5679d0;_0x1e8146=0xc8;}else{_0x1e8146=0xce;}_0x5b0faa['status'](_0x1e8146);return _0x5b0faa[_0x37d9('0x22')]('Content-Range',_0x32c952+'-'+_0x12393b+'/'+_0x5679d0)[_0x37d9('0x1d')](_0x35bb33);}return null;};}function patchUpdates(_0x149bdb){return function(_0x1b78b7){try{jsonpatch[_0x37d9('0x23')](_0x1b78b7,_0x149bdb,!![]);}catch(_0x4916f7){return BPromise['reject'](_0x4916f7);}return _0x1b78b7[_0x37d9('0x24')]();};}function saveUpdates(_0x17aa74,_0x226757){return function(_0x45a8c3){if(_0x45a8c3){return _0x45a8c3['update'](_0x17aa74)['then'](function(_0x48ba94){return _0x48ba94;});}return null;};}function removeEntity(_0x3d5faf,_0x11c885){return function(_0x2cc254){if(_0x2cc254){return _0x2cc254['destroy']()['then'](function(){_0x3d5faf[_0x37d9('0x25')](0xcc)[_0x37d9('0x26')]();});}};}function handleEntityNotFound(_0x393fdb,_0x2b2b2b){return function(_0x1c25bf){if(!_0x1c25bf){_0x393fdb[_0x37d9('0x1c')](0x194);}return _0x1c25bf;};}function handleError(_0x493237,_0x28ae91){_0x28ae91=_0x28ae91||0x1f4;return function(_0x3b9ef7){logger['error'](_0x3b9ef7['stack']);if(_0x3b9ef7['name']){delete _0x3b9ef7[_0x37d9('0x27')];}_0x493237[_0x37d9('0x25')](_0x28ae91)[_0x37d9('0x28')](_0x3b9ef7);};}exports[_0x37d9('0x29')]=function(_0x348c51,_0x488b69){var _0x3b6105={},_0x2b7cd1={},_0x378b7e={'count':0x0,'rows':[]};var _0x1c79ba=_[_0x37d9('0x2a')](db[_0x37d9('0x2b')][_0x37d9('0x2c')],function(_0x36b8c6){return{'name':_0x36b8c6[_0x37d9('0x2d')],'type':_0x36b8c6[_0x37d9('0x2e')][_0x37d9('0x2f')]};});_0x2b7cd1[_0x37d9('0x30')]=_[_0x37d9('0x2a')](_0x1c79ba,'name');_0x2b7cd1[_0x37d9('0x31')]=_[_0x37d9('0x32')](_0x348c51[_0x37d9('0x31')]);_0x2b7cd1[_0x37d9('0x33')]=_[_0x37d9('0x34')](_0x2b7cd1[_0x37d9('0x30')],_0x2b7cd1['query']);_0x3b6105[_0x37d9('0x35')]=_['intersection'](_0x2b7cd1[_0x37d9('0x30')],qs[_0x37d9('0x36')](_0x348c51[_0x37d9('0x31')][_0x37d9('0x36')]));_0x3b6105[_0x37d9('0x35')]=_0x3b6105[_0x37d9('0x35')][_0x37d9('0x37')]?_0x3b6105[_0x37d9('0x35')]:_0x2b7cd1['model'];if(!_0x348c51[_0x37d9('0x31')]['hasOwnProperty'](_0x37d9('0x38'))){_0x3b6105[_0x37d9('0x21')]=qs[_0x37d9('0x21')](_0x348c51[_0x37d9('0x31')]['limit']);_0x3b6105['offset']=qs[_0x37d9('0x1e')](_0x348c51[_0x37d9('0x31')][_0x37d9('0x1e')]);}_0x3b6105[_0x37d9('0x39')]=qs[_0x37d9('0x3a')](_0x348c51[_0x37d9('0x31')]['sort']);_0x3b6105['where']=qs[_0x37d9('0x33')](_[_0x37d9('0x3b')](_0x348c51[_0x37d9('0x31')],_0x2b7cd1[_0x37d9('0x33')]),_0x1c79ba);if(_0x348c51[_0x37d9('0x31')][_0x37d9('0x3c')]){_0x3b6105[_0x37d9('0x3d')]=_[_0x37d9('0x3e')](_0x3b6105['where'],{'$or':_[_0x37d9('0x2a')](_0x1c79ba,function(_0x5f0ebe){if(_0x5f0ebe[_0x37d9('0x2e')]!==_0x37d9('0x3f')){var _0xe639fe={};_0xe639fe[_0x5f0ebe[_0x37d9('0x27')]]={'$like':'%'+_0x348c51['query'][_0x37d9('0x3c')]+'%'};return _0xe639fe;}})});}_0x3b6105=_[_0x37d9('0x3e')]({},_0x3b6105,_0x348c51[_0x37d9('0x40')]);var _0x1900d6={'where':_0x3b6105[_0x37d9('0x3d')]};return db[_0x37d9('0x2b')]['count'](_0x1900d6)[_0x37d9('0x41')](function(_0x29e48c){_0x378b7e[_0x37d9('0x20')]=_0x29e48c;if(_0x348c51['query'][_0x37d9('0x42')]){_0x3b6105['include']=[{'all':!![]}];}return db[_0x37d9('0x2b')][_0x37d9('0x43')](_0x3b6105);})[_0x37d9('0x41')](function(_0x26db88){_0x378b7e[_0x37d9('0x44')]=_0x26db88;return _0x378b7e;})[_0x37d9('0x41')](respondWithFilteredResult(_0x488b69,_0x3b6105))[_0x37d9('0x45')](handleError(_0x488b69,null));};exports[_0x37d9('0x46')]=function(_0x48ea42,_0x3c8c50){var _0x4bb050={'raw':!![],'where':{'id':_0x48ea42[_0x37d9('0x47')]['id']}},_0x6fa13={};_0x6fa13[_0x37d9('0x30')]=_[_0x37d9('0x32')](db[_0x37d9('0x2b')]['rawAttributes']);_0x6fa13[_0x37d9('0x31')]=_[_0x37d9('0x32')](_0x48ea42['query']);_0x6fa13[_0x37d9('0x33')]=_[_0x37d9('0x34')](_0x6fa13[_0x37d9('0x30')],_0x6fa13[_0x37d9('0x31')]);_0x4bb050[_0x37d9('0x35')]=_[_0x37d9('0x34')](_0x6fa13[_0x37d9('0x30')],qs[_0x37d9('0x36')](_0x48ea42[_0x37d9('0x31')][_0x37d9('0x36')]));_0x4bb050[_0x37d9('0x35')]=_0x4bb050[_0x37d9('0x35')][_0x37d9('0x37')]?_0x4bb050[_0x37d9('0x35')]:_0x6fa13[_0x37d9('0x30')];if(_0x48ea42[_0x37d9('0x31')][_0x37d9('0x42')]){_0x4bb050[_0x37d9('0x48')]=[{'all':!![]}];}_0x4bb050=_[_0x37d9('0x3e')]({},_0x4bb050,_0x48ea42[_0x37d9('0x40')]);return db[_0x37d9('0x2b')]['find'](_0x4bb050)['then'](handleEntityNotFound(_0x3c8c50,null))[_0x37d9('0x41')](respondWithResult(_0x3c8c50,null))[_0x37d9('0x45')](handleError(_0x3c8c50,null));};exports[_0x37d9('0x49')]=function(_0x3e2b52,_0x2772ae){return db[_0x37d9('0x2b')][_0x37d9('0x49')](_0x3e2b52['body'],{})[_0x37d9('0x41')](respondWithResult(_0x2772ae,0xc9))[_0x37d9('0x45')](handleError(_0x2772ae,null));};exports[_0x37d9('0x4a')]=function(_0x56a627,_0x542e75){if(_0x56a627[_0x37d9('0x4b')]['id']){delete _0x56a627['body']['id'];}return db['JscriptySessionReport'][_0x37d9('0x4c')]({'where':{'id':_0x56a627[_0x37d9('0x47')]['id']}})[_0x37d9('0x41')](handleEntityNotFound(_0x542e75,null))['then'](saveUpdates(_0x56a627[_0x37d9('0x4b')],null))['then'](respondWithResult(_0x542e75,null))[_0x37d9('0x45')](handleError(_0x542e75,null));};exports[_0x37d9('0x4d')]=function(_0x5e4813,_0x43374b){return db[_0x37d9('0x2b')][_0x37d9('0x4c')]({'where':{'id':_0x5e4813[_0x37d9('0x47')]['id']}})[_0x37d9('0x41')](handleEntityNotFound(_0x43374b,null))[_0x37d9('0x41')](removeEntity(_0x43374b,null))['catch'](handleError(_0x43374b,null));};exports['describe']=function(_0x2a95bc,_0x285ea8){return db['JscriptySessionReport'][_0x37d9('0x4e')]()[_0x37d9('0x41')](respondWithResult(_0x285ea8,null))['catch'](handleError(_0x285ea8,null));};exports['getQuestions']=function(_0x45aa77,_0x97867a,_0x5ae11f){var _0x5bfa01={'raw':!![],'where':{}};var _0x1a2f87={};var _0x2b7a72={'count':0x0,'rows':[]};return db[_0x37d9('0x2b')][_0x37d9('0x4f')]({'where':{'id':_0x45aa77[_0x37d9('0x47')]['id']}})['then'](handleEntityNotFound(_0x97867a,null))[_0x37d9('0x41')](function(_0x39a93c){if(_0x39a93c){_0x1a2f87[_0x37d9('0x30')]=_['keys'](db[_0x37d9('0x50')][_0x37d9('0x2c')]);_0x1a2f87[_0x37d9('0x31')]=_[_0x37d9('0x32')](_0x45aa77[_0x37d9('0x31')]);_0x1a2f87['filters']=_[_0x37d9('0x34')](_0x1a2f87['model'],_0x1a2f87[_0x37d9('0x31')]);_0x5bfa01[_0x37d9('0x35')]=_['intersection'](_0x1a2f87['model'],qs[_0x37d9('0x36')](_0x45aa77[_0x37d9('0x31')]['fields']));_0x5bfa01['attributes']=_0x5bfa01[_0x37d9('0x35')]['length']?_0x5bfa01[_0x37d9('0x35')]:_0x1a2f87[_0x37d9('0x30')];if(!_0x45aa77[_0x37d9('0x31')][_0x37d9('0x51')](_0x37d9('0x38'))){_0x5bfa01[_0x37d9('0x21')]=qs[_0x37d9('0x21')](_0x45aa77[_0x37d9('0x31')]['limit']);_0x5bfa01[_0x37d9('0x1e')]=qs[_0x37d9('0x1e')](_0x45aa77[_0x37d9('0x31')][_0x37d9('0x1e')]);}_0x5bfa01[_0x37d9('0x39')]=qs[_0x37d9('0x3a')](_0x45aa77['query'][_0x37d9('0x3a')]);_0x5bfa01[_0x37d9('0x3d')]=qs[_0x37d9('0x33')](_['pick'](_0x45aa77[_0x37d9('0x31')],_0x1a2f87['filters']));_0x5bfa01[_0x37d9('0x3d')]['SessionId']=_0x39a93c['id'];if(_0x45aa77[_0x37d9('0x31')][_0x37d9('0x3c')]){_0x5bfa01[_0x37d9('0x3d')]=_[_0x37d9('0x3e')](_0x5bfa01['where'],{'$or':_[_0x37d9('0x2a')](_0x5bfa01['attributes'],function(_0x5d65ee){var _0x100d71={};_0x100d71[_0x5d65ee]={'$like':'%'+_0x45aa77[_0x37d9('0x31')]['filter']+'%'};return _0x100d71;})});}_0x5bfa01=_[_0x37d9('0x3e')]({},_0x5bfa01,_0x45aa77['options']);return db[_0x37d9('0x50')]['count']({'where':_0x5bfa01[_0x37d9('0x3d')]})['then'](function(_0x59704c){_0x2b7a72[_0x37d9('0x20')]=_0x59704c;if(_0x45aa77[_0x37d9('0x31')][_0x37d9('0x42')]){_0x5bfa01[_0x37d9('0x48')]=[{'all':!![]}];}return db[_0x37d9('0x50')][_0x37d9('0x43')](_0x5bfa01);})[_0x37d9('0x41')](function(_0x2ed35b){_0x2b7a72['rows']=_0x2ed35b;return _0x2b7a72;});}})[_0x37d9('0x41')](respondWithFilteredResult(_0x97867a,_0x5bfa01))[_0x37d9('0x45')](handleError(_0x97867a,null));};
\ No newline at end of file
+var _0x935c=['JscriptySessionReport','then','includeAll','findAll','catch','params','length','include','options','find','create','body','describe','getQuestions','findOne','JscriptyQuestionReport','SessionId','filter','rows','rimraf','zip-dir','request-promise','moment','bluebird','util','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','end','offset','undefined','count','limit','status','Content-Range','apply','reject','update','destroy','error','stack','name','send','index','map','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','pick','where','merge'];(function(_0x114a4e,_0x2a2072){var _0x530744=function(_0x58875a){while(--_0x58875a){_0x114a4e['push'](_0x114a4e['shift']());}};_0x530744(++_0x2a2072);}(_0x935c,0xad));var _0xc935=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x935c[_0x20a584];return _0x4b41a8;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xc935('0x0'));var zipdir=require(_0xc935('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xc935('0x2'));var moment=require(_0xc935('0x3'));var BPromise=require(_0xc935('0x4'));var Mustache=require('mustache');var util=require(_0xc935('0x5'));var path=require('path');var sox=require(_0xc935('0x6'));var csv=require('to-csv');var ejs=require(_0xc935('0x7'));var fs=require('fs');var fs_extra=require(_0xc935('0x8'));var _=require(_0xc935('0x9'));var squel=require(_0xc935('0xa'));var crypto=require(_0xc935('0xb'));var jsforce=require(_0xc935('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xc935('0xd'));var Papa=require(_0xc935('0xe'));var Redis=require('ioredis');var authService=require(_0xc935('0xf'));var qs=require(_0xc935('0x10'));var as=require(_0xc935('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xc935('0x12'));var utils=require(_0xc935('0x13'));var config=require(_0xc935('0x14'));var licenseUtil=require(_0xc935('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x4ef33f,_0x35924b){_0x35924b=_0x35924b||0xcc;return function(_0x481658){if(_0x481658){return _0x4ef33f[_0xc935('0x16')](_0x35924b);}return _0x4ef33f['status'](_0x35924b)[_0xc935('0x17')]();};}function respondWithResult(_0x17feb1,_0x2e8659){_0x2e8659=_0x2e8659||0xc8;return function(_0x517424){if(_0x517424){return _0x17feb1['status'](_0x2e8659)['json'](_0x517424);}};}function respondWithFilteredResult(_0x393913,_0xc0a493){return function(_0x5372a7){if(_0x5372a7){var _0x2acc0a=typeof _0xc0a493[_0xc935('0x18')]===_0xc935('0x19')&&typeof _0xc0a493['limit']===_0xc935('0x19');var _0x4d1738=_0x5372a7[_0xc935('0x1a')];var _0x257224=_0x2acc0a?0x0:_0xc0a493[_0xc935('0x18')];var _0xbfffcc=_0x2acc0a?_0x5372a7['count']:_0xc0a493[_0xc935('0x18')]+_0xc0a493[_0xc935('0x1b')];var _0x12cd8e;if(_0xbfffcc>=_0x4d1738){_0xbfffcc=_0x4d1738;_0x12cd8e=0xc8;}else{_0x12cd8e=0xce;}_0x393913[_0xc935('0x1c')](_0x12cd8e);return _0x393913['set'](_0xc935('0x1d'),_0x257224+'-'+_0xbfffcc+'/'+_0x4d1738)['json'](_0x5372a7);}return null;};}function patchUpdates(_0x442f22){return function(_0x1500cb){try{jsonpatch[_0xc935('0x1e')](_0x1500cb,_0x442f22,!![]);}catch(_0x48b202){return BPromise[_0xc935('0x1f')](_0x48b202);}return _0x1500cb['save']();};}function saveUpdates(_0x3288aa,_0x46e331){return function(_0x23871b){if(_0x23871b){return _0x23871b[_0xc935('0x20')](_0x3288aa)['then'](function(_0x2c6032){return _0x2c6032;});}return null;};}function removeEntity(_0x2fbbe4,_0x333440){return function(_0x5f3548){if(_0x5f3548){return _0x5f3548[_0xc935('0x21')]()['then'](function(){_0x2fbbe4['status'](0xcc)[_0xc935('0x17')]();});}};}function handleEntityNotFound(_0xd24445,_0x38ab3c){return function(_0x423c43){if(!_0x423c43){_0xd24445['sendStatus'](0x194);}return _0x423c43;};}function handleError(_0x1ce10d,_0x59a2df){_0x59a2df=_0x59a2df||0x1f4;return function(_0x3dfa38){logger[_0xc935('0x22')](_0x3dfa38[_0xc935('0x23')]);if(_0x3dfa38[_0xc935('0x24')]){delete _0x3dfa38[_0xc935('0x24')];}_0x1ce10d[_0xc935('0x1c')](_0x59a2df)[_0xc935('0x25')](_0x3dfa38);};}exports[_0xc935('0x26')]=function(_0x5199ff,_0x1ec331){var _0x106e40={},_0x15c727={},_0x3b7da5={'count':0x0,'rows':[]};var _0x49ad87=_[_0xc935('0x27')](db['JscriptySessionReport'][_0xc935('0x28')],function(_0x37d45a){return{'name':_0x37d45a[_0xc935('0x29')],'type':_0x37d45a[_0xc935('0x2a')][_0xc935('0x2b')]};});_0x15c727[_0xc935('0x2c')]=_['map'](_0x49ad87,_0xc935('0x24'));_0x15c727[_0xc935('0x2d')]=_[_0xc935('0x2e')](_0x5199ff['query']);_0x15c727[_0xc935('0x2f')]=_[_0xc935('0x30')](_0x15c727[_0xc935('0x2c')],_0x15c727['query']);_0x106e40['attributes']=_[_0xc935('0x30')](_0x15c727[_0xc935('0x2c')],qs['fields'](_0x5199ff[_0xc935('0x2d')][_0xc935('0x31')]));_0x106e40[_0xc935('0x32')]=_0x106e40[_0xc935('0x32')]['length']?_0x106e40[_0xc935('0x32')]:_0x15c727[_0xc935('0x2c')];if(!_0x5199ff[_0xc935('0x2d')][_0xc935('0x33')](_0xc935('0x34'))){_0x106e40[_0xc935('0x1b')]=qs[_0xc935('0x1b')](_0x5199ff[_0xc935('0x2d')][_0xc935('0x1b')]);_0x106e40['offset']=qs['offset'](_0x5199ff[_0xc935('0x2d')][_0xc935('0x18')]);}_0x106e40[_0xc935('0x35')]=qs['sort'](_0x5199ff['query'][_0xc935('0x36')]);_0x106e40['where']=qs['filters'](_[_0xc935('0x37')](_0x5199ff['query'],_0x15c727[_0xc935('0x2f')]),_0x49ad87);if(_0x5199ff['query']['filter']){_0x106e40[_0xc935('0x38')]=_[_0xc935('0x39')](_0x106e40[_0xc935('0x38')],{'$or':_[_0xc935('0x27')](_0x49ad87,function(_0x343111){if(_0x343111[_0xc935('0x2a')]!=='VIRTUAL'){var _0x1be4ca={};_0x1be4ca[_0x343111['name']]={'$like':'%'+_0x5199ff[_0xc935('0x2d')]['filter']+'%'};return _0x1be4ca;}})});}_0x106e40=_[_0xc935('0x39')]({},_0x106e40,_0x5199ff['options']);var _0xcfcd90={'where':_0x106e40['where']};return db[_0xc935('0x3a')]['count'](_0xcfcd90)[_0xc935('0x3b')](function(_0x366bc1){_0x3b7da5['count']=_0x366bc1;if(_0x5199ff[_0xc935('0x2d')][_0xc935('0x3c')]){_0x106e40['include']=[{'all':!![]}];}return db[_0xc935('0x3a')][_0xc935('0x3d')](_0x106e40);})[_0xc935('0x3b')](function(_0x251ac6){_0x3b7da5['rows']=_0x251ac6;return _0x3b7da5;})['then'](respondWithFilteredResult(_0x1ec331,_0x106e40))[_0xc935('0x3e')](handleError(_0x1ec331,null));};exports['show']=function(_0x2f535f,_0x46016f){var _0x23a735={'raw':!![],'where':{'id':_0x2f535f[_0xc935('0x3f')]['id']}},_0x429976={};_0x429976[_0xc935('0x2c')]=_['keys'](db[_0xc935('0x3a')]['rawAttributes']);_0x429976[_0xc935('0x2d')]=_['keys'](_0x2f535f[_0xc935('0x2d')]);_0x429976['filters']=_['intersection'](_0x429976[_0xc935('0x2c')],_0x429976[_0xc935('0x2d')]);_0x23a735['attributes']=_[_0xc935('0x30')](_0x429976[_0xc935('0x2c')],qs[_0xc935('0x31')](_0x2f535f[_0xc935('0x2d')][_0xc935('0x31')]));_0x23a735[_0xc935('0x32')]=_0x23a735[_0xc935('0x32')][_0xc935('0x40')]?_0x23a735[_0xc935('0x32')]:_0x429976[_0xc935('0x2c')];if(_0x2f535f['query'][_0xc935('0x3c')]){_0x23a735[_0xc935('0x41')]=[{'all':!![]}];}_0x23a735=_[_0xc935('0x39')]({},_0x23a735,_0x2f535f[_0xc935('0x42')]);return db[_0xc935('0x3a')][_0xc935('0x43')](_0x23a735)[_0xc935('0x3b')](handleEntityNotFound(_0x46016f,null))[_0xc935('0x3b')](respondWithResult(_0x46016f,null))[_0xc935('0x3e')](handleError(_0x46016f,null));};exports[_0xc935('0x44')]=function(_0x1b21e5,_0x2773ae){return db['JscriptySessionReport'][_0xc935('0x44')](_0x1b21e5['body'],{})[_0xc935('0x3b')](respondWithResult(_0x2773ae,0xc9))[_0xc935('0x3e')](handleError(_0x2773ae,null));};exports[_0xc935('0x20')]=function(_0x4402cc,_0x95f896){if(_0x4402cc[_0xc935('0x45')]['id']){delete _0x4402cc[_0xc935('0x45')]['id'];}return db[_0xc935('0x3a')][_0xc935('0x43')]({'where':{'id':_0x4402cc[_0xc935('0x3f')]['id']}})[_0xc935('0x3b')](handleEntityNotFound(_0x95f896,null))[_0xc935('0x3b')](saveUpdates(_0x4402cc[_0xc935('0x45')],null))[_0xc935('0x3b')](respondWithResult(_0x95f896,null))[_0xc935('0x3e')](handleError(_0x95f896,null));};exports[_0xc935('0x21')]=function(_0x3fec6e,_0x1a3f57){return db[_0xc935('0x3a')]['find']({'where':{'id':_0x3fec6e[_0xc935('0x3f')]['id']}})[_0xc935('0x3b')](handleEntityNotFound(_0x1a3f57,null))[_0xc935('0x3b')](removeEntity(_0x1a3f57,null))[_0xc935('0x3e')](handleError(_0x1a3f57,null));};exports[_0xc935('0x46')]=function(_0x3cc877,_0x3f7d51){return db[_0xc935('0x3a')][_0xc935('0x46')]()[_0xc935('0x3b')](respondWithResult(_0x3f7d51,null))['catch'](handleError(_0x3f7d51,null));};exports[_0xc935('0x47')]=function(_0x2a238a,_0x13e147,_0x5b8885){var _0x2b0d99={'raw':!![],'where':{}};var _0x12bd75={};var _0x117129={'count':0x0,'rows':[]};return db['JscriptySessionReport'][_0xc935('0x48')]({'where':{'id':_0x2a238a['params']['id']}})[_0xc935('0x3b')](handleEntityNotFound(_0x13e147,null))[_0xc935('0x3b')](function(_0x3940cb){if(_0x3940cb){_0x12bd75['model']=_[_0xc935('0x2e')](db[_0xc935('0x49')][_0xc935('0x28')]);_0x12bd75[_0xc935('0x2d')]=_[_0xc935('0x2e')](_0x2a238a[_0xc935('0x2d')]);_0x12bd75['filters']=_['intersection'](_0x12bd75[_0xc935('0x2c')],_0x12bd75['query']);_0x2b0d99['attributes']=_[_0xc935('0x30')](_0x12bd75['model'],qs['fields'](_0x2a238a[_0xc935('0x2d')][_0xc935('0x31')]));_0x2b0d99['attributes']=_0x2b0d99[_0xc935('0x32')][_0xc935('0x40')]?_0x2b0d99[_0xc935('0x32')]:_0x12bd75['model'];if(!_0x2a238a['query'][_0xc935('0x33')](_0xc935('0x34'))){_0x2b0d99['limit']=qs[_0xc935('0x1b')](_0x2a238a[_0xc935('0x2d')][_0xc935('0x1b')]);_0x2b0d99[_0xc935('0x18')]=qs['offset'](_0x2a238a[_0xc935('0x2d')][_0xc935('0x18')]);}_0x2b0d99[_0xc935('0x35')]=qs[_0xc935('0x36')](_0x2a238a['query'][_0xc935('0x36')]);_0x2b0d99[_0xc935('0x38')]=qs['filters'](_[_0xc935('0x37')](_0x2a238a[_0xc935('0x2d')],_0x12bd75[_0xc935('0x2f')]));_0x2b0d99[_0xc935('0x38')][_0xc935('0x4a')]=_0x3940cb['id'];if(_0x2a238a[_0xc935('0x2d')][_0xc935('0x4b')]){_0x2b0d99[_0xc935('0x38')]=_[_0xc935('0x39')](_0x2b0d99['where'],{'$or':_[_0xc935('0x27')](_0x2b0d99[_0xc935('0x32')],function(_0x1ea337){var _0x444190={};_0x444190[_0x1ea337]={'$like':'%'+_0x2a238a[_0xc935('0x2d')][_0xc935('0x4b')]+'%'};return _0x444190;})});}_0x2b0d99=_[_0xc935('0x39')]({},_0x2b0d99,_0x2a238a[_0xc935('0x42')]);return db['JscriptyQuestionReport'][_0xc935('0x1a')]({'where':_0x2b0d99[_0xc935('0x38')]})['then'](function(_0x4a022b){_0x117129[_0xc935('0x1a')]=_0x4a022b;if(_0x2a238a[_0xc935('0x2d')][_0xc935('0x3c')]){_0x2b0d99[_0xc935('0x41')]=[{'all':!![]}];}return db[_0xc935('0x49')][_0xc935('0x3d')](_0x2b0d99);})[_0xc935('0x3b')](function(_0x2f165d){_0x117129[_0xc935('0x4c')]=_0x2f165d;return _0x117129;});}})[_0xc935('0x3b')](respondWithFilteredResult(_0x13e147,_0x2b0d99))[_0xc935('0x3e')](handleError(_0x13e147,null));};
\ No newline at end of file
index e251372..ccba10a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xafb9=['request-promise','path','rimraf','exports','report_jscripty_sessions','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x974b47,_0x110244){var _0x1bfabd=function(_0xdb8b4b){while(--_0xdb8b4b){_0x974b47['push'](_0x974b47['shift']());}};_0x1bfabd(++_0x110244);}(_0xafb9,0x68));var _0x9afb=function(_0x146096,_0x2968e5){_0x146096=_0x146096-0x0;var _0x3071d8=_0xafb9[_0x146096];return _0x3071d8;};'use strict';var _=require(_0x9afb('0x0'));var util=require(_0x9afb('0x1'));var logger=require(_0x9afb('0x2'))(_0x9afb('0x3'));var moment=require(_0x9afb('0x4'));var BPromise=require(_0x9afb('0x5'));var rp=require(_0x9afb('0x6'));var fs=require('fs');var path=require(_0x9afb('0x7'));var rimraf=require(_0x9afb('0x8'));var config=require('../../config/environment');var attributes=require('./jscriptySessionReport.attributes');module[_0x9afb('0x9')]=function(_0x56a139,_0x1ccf93){return _0x56a139['define']('JscriptySessionReport',attributes,{'tableName':_0x9afb('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xabce=['util','../../config/logger','api','moment','path','rimraf','../../config/environment','define','report_jscripty_sessions','lodash'];(function(_0x4a6b6b,_0x428c40){var _0x25977a=function(_0x4ce72e){while(--_0x4ce72e){_0x4a6b6b['push'](_0x4a6b6b['shift']());}};_0x25977a(++_0x428c40);}(_0xabce,0x103));var _0xeabc=function(_0x5c3c0b,_0x4ee35e){_0x5c3c0b=_0x5c3c0b-0x0;var _0x52ecd2=_0xabce[_0x5c3c0b];return _0x52ecd2;};'use strict';var _=require(_0xeabc('0x0'));var util=require(_0xeabc('0x1'));var logger=require(_0xeabc('0x2'))(_0xeabc('0x3'));var moment=require(_0xeabc('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xeabc('0x5'));var rimraf=require(_0xeabc('0x6'));var config=require(_0xeabc('0x7'));var attributes=require('./jscriptySessionReport.attributes');module['exports']=function(_0x1b07a8,_0x52a4d7){return _0x1b07a8[_0xeabc('0x8')]('JscriptySessionReport',attributes,{'tableName':_0xeabc('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index aed7995..103c0a4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2542=['info','JscriptySessionReport,\x20%s,\x20%s','debug','JscriptySessionReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then'];(function(_0x4f8192,_0x220187){var _0x1ce025=function(_0x15c68c){while(--_0x15c68c){_0x4f8192['push'](_0x4f8192['shift']());}};_0x1ce025(++_0x220187);}(_0x2542,0x169));var _0x2254=function(_0x129b59,_0x5a33ee){_0x129b59=_0x129b59-0x0;var _0x44d106=_0x2542[_0x129b59];return _0x44d106;};'use strict';var _=require(_0x2254('0x0'));var util=require(_0x2254('0x1'));var moment=require(_0x2254('0x2'));var BPromise=require(_0x2254('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2254('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x2254('0x5'));var logger=require(_0x2254('0x6'))(_0x2254('0x7'));var config=require(_0x2254('0x8'));var jayson=require(_0x2254('0x9'));var client=jayson['client'][_0x2254('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xe8ca50,_0x2ee7ee,_0x3c45ec){return new BPromise(function(_0x1637ad,_0x477b47){return client[_0x2254('0xb')](_0xe8ca50,_0x3c45ec)[_0x2254('0xc')](function(_0xb395da){logger[_0x2254('0xd')](_0x2254('0xe'),_0x2ee7ee,'request\x20sent');logger[_0x2254('0xf')](_0x2254('0x10'),_0x2ee7ee,_0x2254('0x11'),JSON[_0x2254('0x12')](_0xb395da));if(_0xb395da['error']){if(_0xb395da['error'][_0x2254('0x13')]===0x1f4){logger[_0x2254('0x14')](_0x2254('0xe'),_0x2ee7ee,_0xb395da[_0x2254('0x14')][_0x2254('0x15')]);return _0x477b47(_0xb395da[_0x2254('0x14')]['message']);}logger[_0x2254('0x14')](_0x2254('0xe'),_0x2ee7ee,_0xb395da['error'][_0x2254('0x15')]);return _0x1637ad(_0xb395da[_0x2254('0x14')][_0x2254('0x15')]);}else{logger[_0x2254('0xd')](_0x2254('0xe'),_0x2ee7ee,_0x2254('0x11'));_0x1637ad(_0xb395da['result'][_0x2254('0x15')]);}})['catch'](function(_0x327d6d){logger[_0x2254('0x14')](_0x2254('0xe'),_0x2ee7ee,_0x327d6d);_0x477b47(_0x327d6d);});});}
\ No newline at end of file
+var _0xafc4=['error','code','message','request\x20sent','catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','jayson/promise','client','http','request','then','info','JscriptySessionReport,\x20%s,\x20%s','JscriptySessionReport,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x3b84e0,_0x2572e2){var _0x5069fa=function(_0x7ec1cf){while(--_0x7ec1cf){_0x3b84e0['push'](_0x3b84e0['shift']());}};_0x5069fa(++_0x2572e2);}(_0xafc4,0x69));var _0x4afc=function(_0x2f855d,_0xfbe70e){_0x2f855d=_0x2f855d-0x0;var _0x267032=_0xafc4[_0x2f855d];return _0x267032;};'use strict';var _=require(_0x4afc('0x0'));var util=require('util');var moment=require(_0x4afc('0x1'));var BPromise=require('bluebird');var rs=require(_0x4afc('0x2'));var fs=require('fs');var Redis=require(_0x4afc('0x3'));var db=require(_0x4afc('0x4'))['db'];var utils=require(_0x4afc('0x5'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0x4afc('0x6'));var client=jayson[_0x4afc('0x7')][_0x4afc('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x1bb281,_0xc828d9,_0xaf053d){return new BPromise(function(_0x5e1e29,_0x31e165){return client[_0x4afc('0x9')](_0x1bb281,_0xaf053d)[_0x4afc('0xa')](function(_0x1e6bf5){logger[_0x4afc('0xb')](_0x4afc('0xc'),_0xc828d9,'request\x20sent');logger['debug'](_0x4afc('0xd'),_0xc828d9,'request\x20sent',JSON[_0x4afc('0xe')](_0x1e6bf5));if(_0x1e6bf5[_0x4afc('0xf')]){if(_0x1e6bf5['error'][_0x4afc('0x10')]===0x1f4){logger[_0x4afc('0xf')](_0x4afc('0xc'),_0xc828d9,_0x1e6bf5[_0x4afc('0xf')][_0x4afc('0x11')]);return _0x31e165(_0x1e6bf5[_0x4afc('0xf')][_0x4afc('0x11')]);}logger[_0x4afc('0xf')]('JscriptySessionReport,\x20%s,\x20%s',_0xc828d9,_0x1e6bf5[_0x4afc('0xf')][_0x4afc('0x11')]);return _0x5e1e29(_0x1e6bf5[_0x4afc('0xf')][_0x4afc('0x11')]);}else{logger['info']('JscriptySessionReport,\x20%s,\x20%s',_0xc828d9,_0x4afc('0x12'));_0x5e1e29(_0x1e6bf5['result'][_0x4afc('0x11')]);}})[_0x4afc('0x13')](function(_0x2b928b){logger[_0x4afc('0xf')](_0x4afc('0xc'),_0xc828d9,_0x2b928b);_0x31e165(_0x2b928b);});});}
\ No newline at end of file
index 369c3fd..732ae51 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4d9d=['get','index','/:id','isAuthenticated','update','/download_log_file','downloadLogFile','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x251e8c,_0x277c33){var _0x1e0c1d=function(_0x20b89c){while(--_0x20b89c){_0x251e8c['push'](_0x251e8c['shift']());}};_0x1e0c1d(++_0x277c33);}(_0x4d9d,0x8e));var _0xd4d9=function(_0x57411a,_0x59328f){_0x57411a=_0x57411a-0x0;var _0xd487ba=_0x4d9d[_0x57411a];return _0xd487ba;};'use strict';var multer=require(_0xd4d9('0x0'));var util=require('util');var path=require(_0xd4d9('0x1'));var timeout=require(_0xd4d9('0x2'));var express=require(_0xd4d9('0x3'));var router=express[_0xd4d9('0x4')]();var fs_extra=require(_0xd4d9('0x5'));var auth=require(_0xd4d9('0x6'));var interaction=require(_0xd4d9('0x7'));var config=require('../../config/environment');var controller=require('./license.controller');router[_0xd4d9('0x8')]('/',controller[_0xd4d9('0x9')]);router['put'](_0xd4d9('0xa'),auth[_0xd4d9('0xb')](),controller[_0xd4d9('0xc')]);router[_0xd4d9('0x8')](_0xd4d9('0xd'),auth[_0xd4d9('0xb')](),controller[_0xd4d9('0xe')]);module['exports']=router;
\ No newline at end of file
+var _0xe89f=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./license.controller','index','put','/:id','isAuthenticated','/download_log_file','downloadLogFile','util','path','connect-timeout','express'];(function(_0x208dd7,_0x188257){var _0x44c926=function(_0x175f14){while(--_0x175f14){_0x208dd7['push'](_0x208dd7['shift']());}};_0x44c926(++_0x188257);}(_0xe89f,0x14c));var _0xfe89=function(_0x2a30f6,_0x303f67){_0x2a30f6=_0x2a30f6-0x0;var _0x528f9c=_0xe89f[_0x2a30f6];return _0x528f9c;};'use strict';var multer=require('multer');var util=require(_0xfe89('0x0'));var path=require(_0xfe89('0x1'));var timeout=require(_0xfe89('0x2'));var express=require(_0xfe89('0x3'));var router=express[_0xfe89('0x4')]();var fs_extra=require(_0xfe89('0x5'));var auth=require(_0xfe89('0x6'));var interaction=require(_0xfe89('0x7'));var config=require(_0xfe89('0x8'));var controller=require(_0xfe89('0x9'));router['get']('/',controller[_0xfe89('0xa')]);router[_0xfe89('0xb')](_0xfe89('0xc'),auth[_0xfe89('0xd')](),controller['update']);router['get'](_0xfe89('0xe'),auth[_0xfe89('0xd')](),controller[_0xfe89('0xf')]);module['exports']=router;
\ No newline at end of file
index 8042a0d..ced4c0b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5fc9=['exports','TEXT','STRING','INTEGER','sequelize'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5fc9,0x77));var _0x95fc=function(_0x57adbf,_0x5ccd30){_0x57adbf=_0x57adbf-0x0;var _0x5c85f6=_0x5fc9[_0x57adbf];return _0x5c85f6;};'use strict';var Sequelize=require(_0x95fc('0x0'));module[_0x95fc('0x1')]={'license':{'type':Sequelize[_0x95fc('0x2')]},'data1':{'type':Sequelize[_0x95fc('0x3')]},'data2':{'type':Sequelize[_0x95fc('0x3')]},'chatLicenseExceeded':{'type':Sequelize[_0x95fc('0x4')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x3371=['sequelize','STRING','INTEGER'];(function(_0x1551af,_0x5223c3){var _0xd8eb82=function(_0x4b133a){while(--_0x4b133a){_0x1551af['push'](_0x1551af['shift']());}};_0xd8eb82(++_0x5223c3);}(_0x3371,0xcf));var _0x1337=function(_0x4df674,_0x56eb16){_0x4df674=_0x4df674-0x0;var _0x331e3a=_0x3371[_0x4df674];return _0x331e3a;};'use strict';var Sequelize=require(_0x1337('0x0'));module['exports']={'license':{'type':Sequelize['TEXT']},'data1':{'type':Sequelize[_0x1337('0x1')]},'data2':{'type':Sequelize[_0x1337('0x1')]},'chatLicenseExceeded':{'type':Sequelize[_0x1337('0x2')],'defaultValue':0x0}};
\ No newline at end of file
index 3266bdc..0eed5b4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x76d5=['attributes','length','merge','options','getLicense','catch','update','body','find','params','get','checkLicense','key','demo','join','log','xcally','setHeader','Content-disposition','attachment;\x20filename=','Content-Type','text/plain','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','json','offset','undefined','limit','count','set','apply','reject','save','then','destroy','error','name','../../config/license/util','index','License','rawAttributes','query','keys','intersection','model','fields'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x76d5,0x1c0));var _0x576d=function(_0x43e4a1,_0x352350){_0x43e4a1=_0x43e4a1-0x0;var _0x3ca7a9=_0x76d5[_0x43e4a1];return _0x3ca7a9;};'use strict';var emlformat=require(_0x576d('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x576d('0x1'));var jsonpatch=require(_0x576d('0x2'));var rp=require(_0x576d('0x3'));var moment=require(_0x576d('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x576d('0x5'));var util=require('util');var path=require(_0x576d('0x6'));var sox=require(_0x576d('0x7'));var csv=require('to-csv');var ejs=require(_0x576d('0x8'));var fs=require('fs');var fs_extra=require(_0x576d('0x9'));var _=require(_0x576d('0xa'));var squel=require(_0x576d('0xb'));var crypto=require('crypto');var jsforce=require(_0x576d('0xc'));var deskjs=require(_0x576d('0xd'));var toCsv=require('to-csv');var querystring=require(_0x576d('0xe'));var Papa=require(_0x576d('0xf'));var Redis=require(_0x576d('0x10'));var authService=require(_0x576d('0x11'));var qs=require(_0x576d('0x12'));var as=require(_0x576d('0x13'));var hardwareService=require(_0x576d('0x14'));var logger=require(_0x576d('0x15'))(_0x576d('0x16'));var utils=require(_0x576d('0x17'));var config=require(_0x576d('0x18'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x215090,_0x4cf861){_0x4cf861=_0x4cf861||0xcc;return function(_0x28c442){if(_0x28c442){return _0x215090[_0x576d('0x19')](_0x4cf861);}return _0x215090[_0x576d('0x1a')](_0x4cf861)['end']();};}function respondWithResult(_0x174b59,_0x57294a){_0x57294a=_0x57294a||0xc8;return function(_0x330fd5){if(_0x330fd5){return _0x174b59[_0x576d('0x1a')](_0x57294a)[_0x576d('0x1b')](_0x330fd5);}};}function respondWithFilteredResult(_0x5ed2e0,_0x398181){return function(_0x1cac59){if(_0x1cac59){var _0x1a6edc=typeof _0x398181[_0x576d('0x1c')]===_0x576d('0x1d')&&typeof _0x398181[_0x576d('0x1e')]===_0x576d('0x1d');var _0xa2c562=_0x1cac59[_0x576d('0x1f')];var _0x6c9239=_0x1a6edc?0x0:_0x398181[_0x576d('0x1c')];var _0x439505=_0x1a6edc?_0x1cac59[_0x576d('0x1f')]:_0x398181['offset']+_0x398181[_0x576d('0x1e')];var _0x4d8fdc;if(_0x439505>=_0xa2c562){_0x439505=_0xa2c562;_0x4d8fdc=0xc8;}else{_0x4d8fdc=0xce;}_0x5ed2e0[_0x576d('0x1a')](_0x4d8fdc);return _0x5ed2e0[_0x576d('0x20')]('Content-Range',_0x6c9239+'-'+_0x439505+'/'+_0xa2c562)['json'](_0x1cac59);}return null;};}function patchUpdates(_0x18a21f){return function(_0x3fd3f2){try{jsonpatch[_0x576d('0x21')](_0x3fd3f2,_0x18a21f,!![]);}catch(_0x21f9de){return BPromise[_0x576d('0x22')](_0x21f9de);}return _0x3fd3f2[_0x576d('0x23')]();};}function saveUpdates(_0x21d843,_0x45ec69){return function(_0x3b241c){if(_0x3b241c){return _0x3b241c['update'](_0x21d843)[_0x576d('0x24')](function(_0x5ddb39){return _0x5ddb39;});}return null;};}function removeEntity(_0x3bdb0c,_0x55a4c2){return function(_0x1ed71b){if(_0x1ed71b){return _0x1ed71b[_0x576d('0x25')]()[_0x576d('0x24')](function(){_0x3bdb0c[_0x576d('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0xdec607,_0x5e66fc){return function(_0x1b9a7a){if(!_0x1b9a7a){_0xdec607[_0x576d('0x19')](0x194);}return _0x1b9a7a;};}function handleError(_0x27b294,_0x160d02){_0x160d02=_0x160d02||0x1f4;return function(_0x1bf070){logger[_0x576d('0x26')](_0x1bf070['stack']);if(_0x1bf070[_0x576d('0x27')]){delete _0x1bf070['name'];}_0x27b294[_0x576d('0x1a')](_0x160d02)['send'](_0x1bf070);};}var utilLicense=require(_0x576d('0x28'));exports[_0x576d('0x29')]=function(_0x3b8da1,_0x334a55){var _0x1e82ca={'raw':!![],'where':{'id':0x1}},_0x4840f9={};_0x4840f9['model']=_['keys'](db[_0x576d('0x2a')][_0x576d('0x2b')]);_0x4840f9[_0x576d('0x2c')]=_[_0x576d('0x2d')](_0x3b8da1[_0x576d('0x2c')]);_0x4840f9['filters']=_[_0x576d('0x2e')](_0x4840f9['model'],_0x4840f9[_0x576d('0x2c')]);_0x1e82ca['attributes']=_[_0x576d('0x2e')](_0x4840f9[_0x576d('0x2f')],qs[_0x576d('0x30')](_0x3b8da1[_0x576d('0x2c')][_0x576d('0x30')]));_0x1e82ca[_0x576d('0x31')]=_0x1e82ca[_0x576d('0x31')][_0x576d('0x32')]?_0x1e82ca[_0x576d('0x31')]:_0x4840f9[_0x576d('0x2f')];_0x1e82ca=_[_0x576d('0x33')]({},_0x1e82ca,_0x3b8da1[_0x576d('0x34')]);return utilLicense[_0x576d('0x35')](_0x1e82ca)[_0x576d('0x24')](respondWithResult(_0x334a55,null))[_0x576d('0x36')](handleError(_0x334a55,null));};exports[_0x576d('0x37')]=function(_0x4baa57,_0x2c5b22){if(_0x4baa57[_0x576d('0x38')]['id']){delete _0x4baa57[_0x576d('0x38')]['id'];}return db['License'][_0x576d('0x39')]({'where':{'id':_0x4baa57[_0x576d('0x3a')]['id']}})[_0x576d('0x24')](handleEntityNotFound(_0x2c5b22,null))['then'](function(_0x16567e){var _0x4599b0=_0x16567e[_0x576d('0x3b')]({'plain':!![]});return utilLicense[_0x576d('0x3c')](_0x4599b0,_0x4baa57[_0x576d('0x38')][_0x576d('0x3d')]);})[_0x576d('0x24')](function(_0x16f846){if(!_0x16f846[_0x576d('0x3e')]){return saveUpdates(_0x4baa57[_0x576d('0x38')],null);}return _0x16f846;})[_0x576d('0x24')](respondWithResult(_0x2c5b22,null))[_0x576d('0x36')](handleError(_0x2c5b22,null));};exports['downloadLogFile']=function(_0x40a6b8,_0xa42aed){var _0xfe5844='license-info.log';var _0x5d650a=path[_0x576d('0x3f')]('/var',_0x576d('0x40'),_0x576d('0x41'),_0xfe5844);_0xa42aed[_0x576d('0x42')](_0x576d('0x43'),_0x576d('0x44')+_0xfe5844);_0xa42aed[_0x576d('0x20')](_0x576d('0x45'),_0x576d('0x46'));_0xa42aed['download'](_0x5d650a);};
\ No newline at end of file
+var _0x8ff5=['../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','sendStatus','status','end','offset','undefined','limit','count','set','json','reject','update','then','destroy','error','stack','name','send','../../config/license/util','index','rawAttributes','keys','query','filters','intersection','model','fields','attributes','length','merge','options','body','License','params','get','checkLicense','key','demo','catch','downloadLogFile','join','/var','xcally','setHeader','Content-disposition','attachment;\x20filename=','Content-Type','text/plain','download','eml-format','rimraf','zip-dir','moment','bluebird','mustache','util','path','ejs','fs-extra','lodash','squel','jsforce','desk.js','to-csv','querystring','papaparse','../../components/auth/service'];(function(_0x2c3069,_0xb2f898){var _0x2ace87=function(_0x15dae4){while(--_0x15dae4){_0x2c3069['push'](_0x2c3069['shift']());}};_0x2ace87(++_0xb2f898);}(_0x8ff5,0x156));var _0x58ff=function(_0x8c43de,_0x90ff31){_0x8c43de=_0x8c43de-0x0;var _0xa6591b=_0x8ff5[_0x8c43de];return _0xa6591b;};'use strict';var emlformat=require(_0x58ff('0x0'));var rimraf=require(_0x58ff('0x1'));var zipdir=require(_0x58ff('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x58ff('0x3'));var BPromise=require(_0x58ff('0x4'));var Mustache=require(_0x58ff('0x5'));var util=require(_0x58ff('0x6'));var path=require(_0x58ff('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x58ff('0x8'));var fs=require('fs');var fs_extra=require(_0x58ff('0x9'));var _=require(_0x58ff('0xa'));var squel=require(_0x58ff('0xb'));var crypto=require('crypto');var jsforce=require(_0x58ff('0xc'));var deskjs=require(_0x58ff('0xd'));var toCsv=require(_0x58ff('0xe'));var querystring=require(_0x58ff('0xf'));var Papa=require(_0x58ff('0x10'));var Redis=require('ioredis');var authService=require(_0x58ff('0x11'));var qs=require(_0x58ff('0x12'));var as=require(_0x58ff('0x13'));var hardwareService=require(_0x58ff('0x14'));var logger=require('../../config/logger')(_0x58ff('0x15'));var utils=require(_0x58ff('0x16'));var config=require(_0x58ff('0x17'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x51cccd,_0x202f3a){_0x202f3a=_0x202f3a||0xcc;return function(_0x1540c4){if(_0x1540c4){return _0x51cccd[_0x58ff('0x18')](_0x202f3a);}return _0x51cccd[_0x58ff('0x19')](_0x202f3a)[_0x58ff('0x1a')]();};}function respondWithResult(_0x25ec48,_0x3912ee){_0x3912ee=_0x3912ee||0xc8;return function(_0x20d69b){if(_0x20d69b){return _0x25ec48[_0x58ff('0x19')](_0x3912ee)['json'](_0x20d69b);}};}function respondWithFilteredResult(_0x4c9ad8,_0xe13724){return function(_0xec397b){if(_0xec397b){var _0x32e58a=typeof _0xe13724[_0x58ff('0x1b')]===_0x58ff('0x1c')&&typeof _0xe13724[_0x58ff('0x1d')]==='undefined';var _0x1fc36d=_0xec397b['count'];var _0x4307c4=_0x32e58a?0x0:_0xe13724[_0x58ff('0x1b')];var _0x536931=_0x32e58a?_0xec397b[_0x58ff('0x1e')]:_0xe13724[_0x58ff('0x1b')]+_0xe13724[_0x58ff('0x1d')];var _0x366123;if(_0x536931>=_0x1fc36d){_0x536931=_0x1fc36d;_0x366123=0xc8;}else{_0x366123=0xce;}_0x4c9ad8[_0x58ff('0x19')](_0x366123);return _0x4c9ad8[_0x58ff('0x1f')]('Content-Range',_0x4307c4+'-'+_0x536931+'/'+_0x1fc36d)[_0x58ff('0x20')](_0xec397b);}return null;};}function patchUpdates(_0x43e6d8){return function(_0x2bcbed){try{jsonpatch['apply'](_0x2bcbed,_0x43e6d8,!![]);}catch(_0x32366d){return BPromise[_0x58ff('0x21')](_0x32366d);}return _0x2bcbed['save']();};}function saveUpdates(_0x3fe56c,_0x2a3c0a){return function(_0x59af96){if(_0x59af96){return _0x59af96[_0x58ff('0x22')](_0x3fe56c)[_0x58ff('0x23')](function(_0x281ccf){return _0x281ccf;});}return null;};}function removeEntity(_0x4451d6,_0x574c55){return function(_0x18a74d){if(_0x18a74d){return _0x18a74d[_0x58ff('0x24')]()[_0x58ff('0x23')](function(){_0x4451d6[_0x58ff('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x5d508b,_0x510c4a){return function(_0x43f353){if(!_0x43f353){_0x5d508b[_0x58ff('0x18')](0x194);}return _0x43f353;};}function handleError(_0x5471e0,_0x48b65b){_0x48b65b=_0x48b65b||0x1f4;return function(_0x3763e9){logger[_0x58ff('0x25')](_0x3763e9[_0x58ff('0x26')]);if(_0x3763e9[_0x58ff('0x27')]){delete _0x3763e9[_0x58ff('0x27')];}_0x5471e0[_0x58ff('0x19')](_0x48b65b)[_0x58ff('0x28')](_0x3763e9);};}var utilLicense=require(_0x58ff('0x29'));exports[_0x58ff('0x2a')]=function(_0x20261d,_0x3d2490){var _0x3125d6={'raw':!![],'where':{'id':0x1}},_0x548c72={};_0x548c72['model']=_['keys'](db['License'][_0x58ff('0x2b')]);_0x548c72['query']=_[_0x58ff('0x2c')](_0x20261d[_0x58ff('0x2d')]);_0x548c72[_0x58ff('0x2e')]=_[_0x58ff('0x2f')](_0x548c72[_0x58ff('0x30')],_0x548c72[_0x58ff('0x2d')]);_0x3125d6['attributes']=_[_0x58ff('0x2f')](_0x548c72[_0x58ff('0x30')],qs[_0x58ff('0x31')](_0x20261d['query'][_0x58ff('0x31')]));_0x3125d6['attributes']=_0x3125d6[_0x58ff('0x32')][_0x58ff('0x33')]?_0x3125d6[_0x58ff('0x32')]:_0x548c72[_0x58ff('0x30')];_0x3125d6=_[_0x58ff('0x34')]({},_0x3125d6,_0x20261d[_0x58ff('0x35')]);return utilLicense['getLicense'](_0x3125d6)['then'](respondWithResult(_0x3d2490,null))['catch'](handleError(_0x3d2490,null));};exports[_0x58ff('0x22')]=function(_0xc83f90,_0x321e69){if(_0xc83f90[_0x58ff('0x36')]['id']){delete _0xc83f90[_0x58ff('0x36')]['id'];}return db[_0x58ff('0x37')]['find']({'where':{'id':_0xc83f90[_0x58ff('0x38')]['id']}})['then'](handleEntityNotFound(_0x321e69,null))[_0x58ff('0x23')](function(_0x290317){var _0x530828=_0x290317[_0x58ff('0x39')]({'plain':!![]});return utilLicense[_0x58ff('0x3a')](_0x530828,_0xc83f90[_0x58ff('0x36')][_0x58ff('0x3b')]);})[_0x58ff('0x23')](function(_0x227f0e){if(!_0x227f0e[_0x58ff('0x3c')]){return saveUpdates(_0xc83f90[_0x58ff('0x36')],null);}return _0x227f0e;})['then'](respondWithResult(_0x321e69,null))[_0x58ff('0x3d')](handleError(_0x321e69,null));};exports[_0x58ff('0x3e')]=function(_0x1aad58,_0x4cfdd4){var _0x139263='license-info.log';var _0x2dfbfc=path[_0x58ff('0x3f')](_0x58ff('0x40'),'log',_0x58ff('0x41'),_0x139263);_0x4cfdd4[_0x58ff('0x42')](_0x58ff('0x43'),_0x58ff('0x44')+_0x139263);_0x4cfdd4[_0x58ff('0x1f')](_0x58ff('0x45'),_0x58ff('0x46'));_0x4cfdd4[_0x58ff('0x47')](_0x2dfbfc);};
\ No newline at end of file
index 848fbed..82996d2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x98f2=['../../config/logger','moment','bluebird','request-promise','path','rimraf','./license.attributes','exports','define','util'];(function(_0x4d9767,_0x4a0490){var _0x43bab4=function(_0x140682){while(--_0x140682){_0x4d9767['push'](_0x4d9767['shift']());}};_0x43bab4(++_0x4a0490);}(_0x98f2,0x8b));var _0x298f=function(_0x1e7189,_0x2d1c4f){_0x1e7189=_0x1e7189-0x0;var _0x4e9f23=_0x98f2[_0x1e7189];return _0x4e9f23;};'use strict';var _=require('lodash');var util=require(_0x298f('0x0'));var logger=require(_0x298f('0x1'))('api');var moment=require(_0x298f('0x2'));var BPromise=require(_0x298f('0x3'));var rp=require(_0x298f('0x4'));var fs=require('fs');var path=require(_0x298f('0x5'));var rimraf=require(_0x298f('0x6'));var config=require('../../config/environment');var attributes=require(_0x298f('0x7'));module[_0x298f('0x8')]=function(_0x561e9f,_0x19e482){return _0x561e9f[_0x298f('0x9')]('License',attributes,{'tableName':'license','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc1ce=['../../config/environment','./license.attributes','exports','define','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf'];(function(_0x3e6737,_0x20c4d5){var _0x2c84df=function(_0x572149){while(--_0x572149){_0x3e6737['push'](_0x3e6737['shift']());}};_0x2c84df(++_0x20c4d5);}(_0xc1ce,0x163));var _0xec1c=function(_0x1b69b2,_0x492168){_0x1b69b2=_0x1b69b2-0x0;var _0x3f30d1=_0xc1ce[_0x1b69b2];return _0x3f30d1;};'use strict';var _=require(_0xec1c('0x0'));var util=require(_0xec1c('0x1'));var logger=require(_0xec1c('0x2'))(_0xec1c('0x3'));var moment=require(_0xec1c('0x4'));var BPromise=require(_0xec1c('0x5'));var rp=require(_0xec1c('0x6'));var fs=require('fs');var path=require(_0xec1c('0x7'));var rimraf=require(_0xec1c('0x8'));var config=require(_0xec1c('0x9'));var attributes=require(_0xec1c('0xa'));module[_0xec1c('0xb')]=function(_0x5c48eb,_0x17648c){return _0x5c48eb[_0xec1c('0xc')]('License',attributes,{'tableName':'license','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index b959a1a..b611ed8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaba4=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','stringify','error','code','License,\x20%s,\x20%s','message','catch','lodash','util','moment','bluebird'];(function(_0x2c7618,_0x26be9c){var _0x5ce3f0=function(_0x1837b3){while(--_0x1837b3){_0x2c7618['push'](_0x2c7618['shift']());}};_0x5ce3f0(++_0x26be9c);}(_0xaba4,0x1f0));var _0x4aba=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xaba4[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x4aba('0x0'));var util=require(_0x4aba('0x1'));var moment=require(_0x4aba('0x2'));var BPromise=require(_0x4aba('0x3'));var rs=require(_0x4aba('0x4'));var fs=require('fs');var Redis=require(_0x4aba('0x5'));var db=require(_0x4aba('0x6'))['db'];var utils=require(_0x4aba('0x7'));var logger=require(_0x4aba('0x8'))(_0x4aba('0x9'));var config=require(_0x4aba('0xa'));var jayson=require(_0x4aba('0xb'));var client=jayson[_0x4aba('0xc')][_0x4aba('0xd')]({'port':0x232a});function respondWithRpcPromise(_0x238287,_0x4bcc00,_0x5bd29e){return new BPromise(function(_0x5658a9,_0x463b1e){return client[_0x4aba('0xe')](_0x238287,_0x5bd29e)[_0x4aba('0xf')](function(_0x562161){logger[_0x4aba('0x10')]('License,\x20%s,\x20%s',_0x4bcc00,_0x4aba('0x11'));logger[_0x4aba('0x12')]('License,\x20%s,\x20%s,\x20%s',_0x4bcc00,_0x4aba('0x11'),JSON[_0x4aba('0x13')](_0x562161));if(_0x562161[_0x4aba('0x14')]){if(_0x562161[_0x4aba('0x14')][_0x4aba('0x15')]===0x1f4){logger[_0x4aba('0x14')](_0x4aba('0x16'),_0x4bcc00,_0x562161[_0x4aba('0x14')][_0x4aba('0x17')]);return _0x463b1e(_0x562161[_0x4aba('0x14')][_0x4aba('0x17')]);}logger[_0x4aba('0x14')](_0x4aba('0x16'),_0x4bcc00,_0x562161[_0x4aba('0x14')][_0x4aba('0x17')]);return _0x5658a9(_0x562161[_0x4aba('0x14')]['message']);}else{logger['info']('License,\x20%s,\x20%s',_0x4bcc00,_0x4aba('0x11'));_0x5658a9(_0x562161['result'][_0x4aba('0x17')]);}})[_0x4aba('0x18')](function(_0x5d0b51){logger['error']('License,\x20%s,\x20%s',_0x4bcc00,_0x5d0b51);_0x463b1e(_0x5d0b51);});});}
\ No newline at end of file
+var _0x8a23=['catch','lodash','util','moment','bluebird','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','request','info','request\x20sent','debug','stringify','error','code','message','License,\x20%s,\x20%s','result'];(function(_0x21ef85,_0x1d1aff){var _0x560ec8=function(_0x5eaa8f){while(--_0x5eaa8f){_0x21ef85['push'](_0x21ef85['shift']());}};_0x560ec8(++_0x1d1aff);}(_0x8a23,0x1b9));var _0x38a2=function(_0x5e77db,_0x356d1c){_0x5e77db=_0x5e77db-0x0;var _0x34b675=_0x8a23[_0x5e77db];return _0x34b675;};'use strict';var _=require(_0x38a2('0x0'));var util=require(_0x38a2('0x1'));var moment=require(_0x38a2('0x2'));var BPromise=require(_0x38a2('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x38a2('0x4'));var logger=require(_0x38a2('0x5'))('rpc');var config=require(_0x38a2('0x6'));var jayson=require(_0x38a2('0x7'));var client=jayson[_0x38a2('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x117833,_0x5f2b20,_0x296254){return new BPromise(function(_0x4e50d6,_0x18c5fd){return client[_0x38a2('0x9')](_0x117833,_0x296254)['then'](function(_0xf82da1){logger[_0x38a2('0xa')]('License,\x20%s,\x20%s',_0x5f2b20,_0x38a2('0xb'));logger[_0x38a2('0xc')]('License,\x20%s,\x20%s,\x20%s',_0x5f2b20,'request\x20sent',JSON[_0x38a2('0xd')](_0xf82da1));if(_0xf82da1[_0x38a2('0xe')]){if(_0xf82da1[_0x38a2('0xe')][_0x38a2('0xf')]===0x1f4){logger['error']('License,\x20%s,\x20%s',_0x5f2b20,_0xf82da1[_0x38a2('0xe')]['message']);return _0x18c5fd(_0xf82da1['error'][_0x38a2('0x10')]);}logger[_0x38a2('0xe')]('License,\x20%s,\x20%s',_0x5f2b20,_0xf82da1[_0x38a2('0xe')][_0x38a2('0x10')]);return _0x4e50d6(_0xf82da1['error']['message']);}else{logger['info'](_0x38a2('0x11'),_0x5f2b20,_0x38a2('0xb'));_0x4e50d6(_0xf82da1[_0x38a2('0x12')][_0x38a2('0x10')]);}})[_0x38a2('0x13')](function(_0x47c48c){logger['error'](_0x38a2('0x11'),_0x5f2b20,_0x47c48c);_0x18c5fd(_0x47c48c);});});}
\ No newline at end of file
index 2a037f9..5748ae4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4207=['delete','removeAnswers','removeImap','removeSmtp','destroy','removeAgents','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailAccount.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','/:id/in_servers','getImap','/:id/out_servers','/:id/interactions','getInteractions','getApplications','/:id/messages','/:id/verify','verifySmtp','/:id/users','getAgents','post','addDisposition','addAnswer','create','addImap','addInteraction','/:id/applications','addApplications','/:id/send','send','addAgents','update'];(function(_0x1203f,_0x554bbc){var _0x365f0a=function(_0x3531d0){while(--_0x3531d0){_0x1203f['push'](_0x1203f['shift']());}};_0x365f0a(++_0x554bbc);}(_0x4207,0x6a));var _0x7420=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0x4207[_0x1facfa];return _0x9ec701;};'use strict';var multer=require(_0x7420('0x0'));var util=require(_0x7420('0x1'));var path=require(_0x7420('0x2'));var timeout=require('connect-timeout');var express=require(_0x7420('0x3'));var router=express[_0x7420('0x4')]();var fs_extra=require(_0x7420('0x5'));var auth=require(_0x7420('0x6'));var interaction=require(_0x7420('0x7'));var config=require(_0x7420('0x8'));var controller=require(_0x7420('0x9'));router[_0x7420('0xa')]('/',auth[_0x7420('0xb')](),controller[_0x7420('0xc')]);router['get'](_0x7420('0xd'),auth[_0x7420('0xb')](),controller[_0x7420('0xe')]);router['get'](_0x7420('0xf'),auth[_0x7420('0xb')](),controller[_0x7420('0x10')]);router['get'](_0x7420('0x11'),auth[_0x7420('0xb')](),controller[_0x7420('0x12')]);router[_0x7420('0xa')](_0x7420('0x13'),auth[_0x7420('0xb')](),controller[_0x7420('0x14')]);router[_0x7420('0xa')](_0x7420('0x15'),auth[_0x7420('0xb')](),controller[_0x7420('0x16')]);router[_0x7420('0xa')](_0x7420('0x17'),auth[_0x7420('0xb')](),controller['getSmtp']);router[_0x7420('0xa')](_0x7420('0x18'),auth[_0x7420('0xb')](),controller[_0x7420('0x19')]);router[_0x7420('0xa')]('/:id/applications',auth[_0x7420('0xb')](),controller[_0x7420('0x1a')]);router[_0x7420('0xa')](_0x7420('0x1b'),auth[_0x7420('0xb')](),controller['getMessages']);router[_0x7420('0xa')](_0x7420('0x1c'),auth['isAuthenticated'](),controller[_0x7420('0x1d')]);router[_0x7420('0xa')](_0x7420('0x1e'),auth[_0x7420('0xb')](),controller[_0x7420('0x1f')]);router[_0x7420('0x20')](_0x7420('0x11'),auth[_0x7420('0xb')](),controller[_0x7420('0x21')]);router['post'](_0x7420('0x13'),auth[_0x7420('0xb')](),controller[_0x7420('0x22')]);router[_0x7420('0x20')]('/',auth[_0x7420('0xb')](),controller[_0x7420('0x23')]);router[_0x7420('0x20')](_0x7420('0x15'),auth[_0x7420('0xb')](),controller[_0x7420('0x24')]);router[_0x7420('0x20')](_0x7420('0x17'),auth[_0x7420('0xb')](),controller['addSmtp']);router[_0x7420('0x20')](_0x7420('0x18'),auth[_0x7420('0xb')](),controller[_0x7420('0x25')]);router[_0x7420('0x20')](_0x7420('0x26'),auth['isAuthenticated'](),controller[_0x7420('0x27')]);router[_0x7420('0x20')](_0x7420('0x28'),auth[_0x7420('0xb')](),controller[_0x7420('0x29')]);router[_0x7420('0x20')](_0x7420('0x1e'),auth[_0x7420('0xb')](),controller[_0x7420('0x2a')]);router['put']('/:id',auth[_0x7420('0xb')](),controller[_0x7420('0x2b')]);router[_0x7420('0x2c')](_0x7420('0x11'),auth[_0x7420('0xb')](),controller['removeDispositions']);router['delete'](_0x7420('0x13'),auth['isAuthenticated'](),controller[_0x7420('0x2d')]);router[_0x7420('0x2c')](_0x7420('0x15'),auth[_0x7420('0xb')](),controller[_0x7420('0x2e')]);router[_0x7420('0x2c')](_0x7420('0x17'),auth[_0x7420('0xb')](),controller[_0x7420('0x2f')]);router[_0x7420('0x2c')](_0x7420('0xf'),auth[_0x7420('0xb')](),controller[_0x7420('0x30')]);router['delete'](_0x7420('0x1e'),auth[_0x7420('0xb')](),controller[_0x7420('0x31')]);module['exports']=router;
\ No newline at end of file
+var _0x477a=['removeImap','destroy','removeAgents','exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/describe','describe','/:id','show','/:id/dispositions','getDispositions','/:id/canned_answers','getAnswers','/:id/in_servers','getImap','/:id/out_servers','getSmtp','/:id/interactions','getInteractions','/:id/applications','getApplications','/:id/messages','/:id/verify','verifySmtp','/:id/users','addDisposition','post','addAnswer','addImap','addSmtp','/:id/send','send','addAgents','update','delete'];(function(_0x1ab0e6,_0x17ba8d){var _0x248815=function(_0x5d2b40){while(--_0x5d2b40){_0x1ab0e6['push'](_0x1ab0e6['shift']());}};_0x248815(++_0x17ba8d);}(_0x477a,0x1f3));var _0xa477=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x477a[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require(_0xa477('0x0'));var util=require(_0xa477('0x1'));var path=require(_0xa477('0x2'));var timeout=require(_0xa477('0x3'));var express=require(_0xa477('0x4'));var router=express['Router']();var fs_extra=require(_0xa477('0x5'));var auth=require(_0xa477('0x6'));var interaction=require(_0xa477('0x7'));var config=require(_0xa477('0x8'));var controller=require('./mailAccount.controller');router[_0xa477('0x9')]('/',auth[_0xa477('0xa')](),controller['index']);router[_0xa477('0x9')](_0xa477('0xb'),auth[_0xa477('0xa')](),controller[_0xa477('0xc')]);router['get'](_0xa477('0xd'),auth[_0xa477('0xa')](),controller[_0xa477('0xe')]);router[_0xa477('0x9')](_0xa477('0xf'),auth[_0xa477('0xa')](),controller[_0xa477('0x10')]);router['get'](_0xa477('0x11'),auth[_0xa477('0xa')](),controller[_0xa477('0x12')]);router[_0xa477('0x9')](_0xa477('0x13'),auth[_0xa477('0xa')](),controller[_0xa477('0x14')]);router['get'](_0xa477('0x15'),auth[_0xa477('0xa')](),controller[_0xa477('0x16')]);router['get'](_0xa477('0x17'),auth[_0xa477('0xa')](),controller[_0xa477('0x18')]);router[_0xa477('0x9')](_0xa477('0x19'),auth[_0xa477('0xa')](),controller[_0xa477('0x1a')]);router['get'](_0xa477('0x1b'),auth[_0xa477('0xa')](),controller['getMessages']);router['get'](_0xa477('0x1c'),auth[_0xa477('0xa')](),controller[_0xa477('0x1d')]);router[_0xa477('0x9')](_0xa477('0x1e'),auth[_0xa477('0xa')](),controller['getAgents']);router['post'](_0xa477('0xf'),auth[_0xa477('0xa')](),controller[_0xa477('0x1f')]);router[_0xa477('0x20')](_0xa477('0x11'),auth[_0xa477('0xa')](),controller[_0xa477('0x21')]);router[_0xa477('0x20')]('/',auth['isAuthenticated'](),controller['create']);router[_0xa477('0x20')](_0xa477('0x13'),auth['isAuthenticated'](),controller[_0xa477('0x22')]);router['post'](_0xa477('0x15'),auth[_0xa477('0xa')](),controller[_0xa477('0x23')]);router['post']('/:id/interactions',auth['isAuthenticated'](),controller['addInteraction']);router[_0xa477('0x20')](_0xa477('0x19'),auth[_0xa477('0xa')](),controller['addApplications']);router['post'](_0xa477('0x24'),auth[_0xa477('0xa')](),controller[_0xa477('0x25')]);router['post'](_0xa477('0x1e'),auth['isAuthenticated'](),controller[_0xa477('0x26')]);router['put'](_0xa477('0xd'),auth[_0xa477('0xa')](),controller[_0xa477('0x27')]);router[_0xa477('0x28')](_0xa477('0xf'),auth['isAuthenticated'](),controller['removeDispositions']);router[_0xa477('0x28')](_0xa477('0x11'),auth[_0xa477('0xa')](),controller['removeAnswers']);router['delete'](_0xa477('0x13'),auth['isAuthenticated'](),controller[_0xa477('0x29')]);router[_0xa477('0x28')](_0xa477('0x15'),auth[_0xa477('0xa')](),controller['removeSmtp']);router['delete']('/:id',auth[_0xa477('0xa')](),controller[_0xa477('0x2a')]);router['delete'](_0xa477('0x1e'),auth[_0xa477('0xa')](),controller[_0xa477('0x2b')]);module[_0xa477('0x2c')]=router;
\ No newline at end of file
index d56e6b7..797ceb4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf30d=['yahoo','outlook365','getDataValue','custom','sequelize','exports','STRING','BOOLEAN','TEXT','Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}<br/>Subject\x20:\x20{{message.subject}}','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','ENUM','gmail','hotmail'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xf30d,0x70));var _0xdf30=function(_0xad2f8f,_0x1fe6ab){_0xad2f8f=_0xad2f8f-0x0;var _0x492417=_0xf30d[_0xad2f8f];return _0x492417;};'use strict';var Sequelize=require(_0xdf30('0x0'));module[_0xdf30('0x1')]={'description':{'type':Sequelize[_0xdf30('0x2')]},'name':{'type':Sequelize[_0xdf30('0x2')],'allowNull':![]},'service':{'type':Sequelize[_0xdf30('0x3')],'defaultValue':![]},'email':{'type':Sequelize[_0xdf30('0x2')],'validate':{'isEmail':!![]}},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'key':{'type':Sequelize[_0xdf30('0x2')],'allowNull':![]},'template':{'type':Sequelize[_0xdf30('0x4')]},'markAsUnread':{'type':Sequelize[_0xdf30('0x3')],'defaultValue':![]},'fontFamily':{'type':Sequelize[_0xdf30('0x2')],'allowNull':![],'defaultValue':'Arial,Helvetica,sans-serif'},'fontSize':{'type':Sequelize['INTEGER'](0x2)['UNSIGNED'],'defaultValue':0xd,'validate':{'min':0x8,'max':0x48}},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return _0xdf30('0x5');}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0xdf30('0x3')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0xdf30('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0xdf30('0x3')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0xdf30('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xdf30('0x3')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xdf30('0x6')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0xdf30('0x6')],'allowNull':!![],'defaultValue':null,'comment':_0xdf30('0x7')},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0xdf30('0x8'),'set':function(_0x42635d){if(!_0x42635d)this[_0xdf30('0x9')](_0xdf30('0xa'),null);this[_0xdf30('0x9')]('mandatoryDisposition',_0x42635d);}},'provider':{'type':Sequelize[_0xdf30('0xb')](_0xdf30('0xc'),_0xdf30('0xd'),_0xdf30('0xe'),_0xdf30('0xf')),'defaultValue':null,'get':function(){var _0x23b1aa=this[_0xdf30('0x10')]('provider');return _0x23b1aa||_0xdf30('0x11');},'set':function(_0x1ca4b6){if(_0x1ca4b6==='custom'){_0x1ca4b6=null;}return this[_0xdf30('0x9')]('provider',_0x1ca4b6);}}};
\ No newline at end of file
+var _0xf763=['Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDisposition','ENUM','gmail','hotmail','getDataValue','provider','custom','sequelize','exports','STRING','TEXT','INTEGER','UNSIGNED','BOOLEAN','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0xf763,0x15d));var _0x3f76=function(_0x2bb3ae,_0x5c4ae3){_0x2bb3ae=_0x2bb3ae-0x0;var _0x30a067=_0xf763[_0x2bb3ae];return _0x30a067;};'use strict';var Sequelize=require(_0x3f76('0x0'));module[_0x3f76('0x1')]={'description':{'type':Sequelize[_0x3f76('0x2')]},'name':{'type':Sequelize[_0x3f76('0x2')],'allowNull':![]},'service':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'email':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]}},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'key':{'type':Sequelize[_0x3f76('0x2')],'allowNull':![]},'template':{'type':Sequelize[_0x3f76('0x3')]},'markAsUnread':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'fontFamily':{'type':Sequelize[_0x3f76('0x2')],'allowNull':![],'defaultValue':'Arial,Helvetica,sans-serif'},'fontSize':{'type':Sequelize[_0x3f76('0x4')](0x2)[_0x3f76('0x5')],'defaultValue':0xd,'validate':{'min':0x8,'max':0x48}},'notificationTemplate':{'type':Sequelize[_0x3f76('0x3')],'defaultValue':function(){return'Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}<br/>Subject\x20:\x20{{message.subject}}';}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x3f76('0x6')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x3f76('0x4')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x3f76('0x6')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x3f76('0x4')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x3f76('0x6')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x3f76('0x4')],'allowNull':!![],'defaultValue':null,'comment':_0x3f76('0x7')},'mandatoryDisposition':{'type':Sequelize[_0x3f76('0x6')],'defaultValue':![],'comment':_0x3f76('0x8'),'set':function(_0x291c8d){if(!_0x291c8d)this[_0x3f76('0x9')]('mandatoryDispositionPauseId',null);this[_0x3f76('0x9')](_0x3f76('0xa'),_0x291c8d);}},'provider':{'type':Sequelize[_0x3f76('0xb')](_0x3f76('0xc'),_0x3f76('0xd'),'yahoo','outlook365'),'defaultValue':null,'get':function(){var _0x5a6b23=this[_0x3f76('0xe')](_0x3f76('0xf'));return _0x5a6b23||_0x3f76('0x10');},'set':function(_0x506fea){if(_0x506fea===_0x3f76('0x10')){_0x506fea=null;}return this[_0x3f76('0x9')](_0x3f76('0xf'),_0x506fea);}}};
\ No newline at end of file
index bb800d7..f38fe5c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6358=['attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','MailAccount','findAll','rows','show','params','MailServerIn','includeAll','include','find','body','provider','custom','modernAuthentication','Mail\x20Account\x20not\x20found','describe','addDisposition','MailAccountId','Disposition','findOne','rawAttributes','removeDispositions','ids','addAnswer','CannedAnswer','create','getAnswers','removeAnswers','email','ListId','isNil','active','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','getImap','removeImap','setImap','getSmtp','addSmtp','removeSmtp','setSmtp','addInteraction','MailInteraction','getInteractions','length','CmContact','Contact','User','Owner','internal','Tag','Tags','tag','addApplications','sequelize','transaction','ISOLATION_LEVELS','READ_COMMITTED','MailApplication','bulkCreate','priority','finally','getApplications','getMessages','MailMessage','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','inlineCss','true','Contacts','updatedAt','CloudProvider','Smtp\x20configuration\x20not\x20found','from','%s\x20<%s>','attachments','join','root','server/files/attachments','basename','SendMail','sendMail','List','List\x20not\x20found','messageId','subject','attach','out','Interaction','Messages','VerifySmtp','verifySmtp','destroy','Sequelize','ValidationError','You\x20can\x27t\x20remove\x20the\x20mail\x20service\x20account','addAgents','spread','emit','removeAgents','isArray','userMailAccount:remove','getAgents','moment','bluebird','path','juice','../../components/parsers/qs','../../config/logger','api','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./mailAccount.socket','jayson/promise','client','http','MailAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','result','catch','sendStatus','status','offset','limit','undefined','count','Content-Range','json','update','then','get','UserProfileResource','end','stack','name','send','gmail','imap.gmail.com','yahoo','imap.mail.yahoo.com','hotmail','imap-mail.outlook.com','outlook365','outlook.office365.com','Unknown\x20email\x20service\x20provider','smtp.gmail.com','smtp.mail.yahoo.com','smtp-mail.outlook.com','smtp.office365.com','user','username','pass','CloudProviderId','password','host','port','secure','service','authentication','Imap','Smtp','index','MailServerOut','Pause','map','fieldName','key','model','query','keys','filters','intersection'];(function(_0x1f71d8,_0x278518){var _0x10b045=function(_0x57aea4){while(--_0x57aea4){_0x1f71d8['push'](_0x1f71d8['shift']());}};_0x10b045(++_0x278518);}(_0x6358,0x77));var _0x8635=function(_0x462803,_0x4c17b2){_0x462803=_0x462803-0x0;var _0x46217c=_0x6358[_0x462803];return _0x46217c;};'use strict';var moment=require(_0x8635('0x0'));var BPromise=require(_0x8635('0x1'));var util=require('util');var path=require(_0x8635('0x2'));var _=require('lodash');var juice=require(_0x8635('0x3'));var Redis=require('ioredis');var qs=require(_0x8635('0x4'));var logger=require(_0x8635('0x5'))(_0x8635('0x6'));var config=require('../../config/environment');var db=require(_0x8635('0x7'))['db'];config[_0x8635('0x8')]=_[_0x8635('0x9')](config['redis'],{'host':_0x8635('0xa'),'port':0x18eb});var socket=require(_0x8635('0xb'))(new Redis(config[_0x8635('0x8')]));require(_0x8635('0xc'))['register'](socket);var jayson=require(_0x8635('0xd'));var client=jayson[_0x8635('0xe')][_0x8635('0xf')]({'port':0x232b});function respondWithRpcPromise(_0x53ccc2,_0x10b767,_0x14938f,_0x183e4f){return new BPromise(function(_0x5ba5e7,_0x224547){var _0x3bf1d0=_0x183e4f||client;return _0x3bf1d0['request'](_0x53ccc2,_0x14938f)['then'](function(_0x5742c5){logger['info'](_0x8635('0x10'),_0x10b767,_0x8635('0x11'));logger[_0x8635('0x12')]('MailAccount,\x20%s,\x20%s,\x20%s',_0x10b767,_0x8635('0x11'),JSON[_0x8635('0x13')](_0x5742c5));if(_0x5742c5[_0x8635('0x14')]){if(_0x5742c5['error'][_0x8635('0x15')]===0x1f4){logger[_0x8635('0x14')](_0x8635('0x10'),_0x10b767,_0x5742c5[_0x8635('0x14')]['message']);return _0x224547(_0x5742c5['error'][_0x8635('0x16')]);}logger[_0x8635('0x14')](_0x8635('0x10'),_0x10b767,_0x5742c5['error'][_0x8635('0x16')]);return _0x5ba5e7(_0x5742c5[_0x8635('0x14')][_0x8635('0x16')]);}else{logger[_0x8635('0x17')](_0x8635('0x10'),_0x10b767,_0x8635('0x11'));_0x5ba5e7(_0x5742c5[_0x8635('0x18')][_0x8635('0x16')]);}})[_0x8635('0x19')](function(_0x4f11e0){logger[_0x8635('0x14')](_0x8635('0x10'),_0x10b767,_0x4f11e0);_0x224547(_0x4f11e0);});});}function respondWithStatusCode(_0x4ff5eb,_0x589e83){_0x589e83=_0x589e83||0xcc;return function(_0x43d10e){if(_0x43d10e){return _0x4ff5eb[_0x8635('0x1a')](_0x589e83);}return _0x4ff5eb['status'](_0x589e83)['end']();};}function respondWithResult(_0x22e76a,_0xa1c347){_0xa1c347=_0xa1c347||0xc8;return function(_0x1036b3){if(_0x1036b3){return _0x22e76a[_0x8635('0x1b')](_0xa1c347)['json'](_0x1036b3);}};}function respondWithFilteredResult(_0x3b55fd,_0x2fb7fd){return function(_0x190647){if(_0x190647){var _0x5a5f94=typeof _0x2fb7fd[_0x8635('0x1c')]==='undefined'&&typeof _0x2fb7fd[_0x8635('0x1d')]===_0x8635('0x1e');var _0x2ccaa3=_0x190647[_0x8635('0x1f')];var _0x168297=_0x5a5f94?0x0:_0x2fb7fd[_0x8635('0x1c')];var _0x267871=_0x5a5f94?_0x190647[_0x8635('0x1f')]:_0x2fb7fd[_0x8635('0x1c')]+_0x2fb7fd[_0x8635('0x1d')];var _0x38d3f2;if(_0x267871>=_0x2ccaa3){_0x267871=_0x2ccaa3;_0x38d3f2=0xc8;}else{_0x38d3f2=0xce;}_0x3b55fd[_0x8635('0x1b')](_0x38d3f2);return _0x3b55fd['set'](_0x8635('0x20'),_0x168297+'-'+_0x267871+'/'+_0x2ccaa3)[_0x8635('0x21')](_0x190647);}return null;};}function saveUpdates(_0x2c88b0){return function(_0x4c6b30){if(_0x4c6b30){return _0x4c6b30[_0x8635('0x22')](_0x2c88b0)['then'](function(_0x48ebed){return _0x48ebed;});}return null;};}function removeEntity(_0x2a8f31){return function(_0xb35fd3){if(_0xb35fd3){return _0xb35fd3['destroy']()[_0x8635('0x23')](function(){var _0x5c286c=_0xb35fd3[_0x8635('0x24')]({'plain':!![]});var _0x54e676='MailAccounts';return db[_0x8635('0x25')]['destroy']({'where':{'type':_0x54e676,'resourceId':_0x5c286c['id']}})[_0x8635('0x23')](function(){return _0xb35fd3;});})['then'](function(){_0x2a8f31['status'](0xcc)[_0x8635('0x26')]();});}};}function handleEntityNotFound(_0x281544){return function(_0x3f5ab9){if(!_0x3f5ab9){_0x281544[_0x8635('0x1a')](0x194);}return _0x3f5ab9;};}function handleError(_0x3053f3,_0x4faf49){_0x4faf49=_0x4faf49||0x1f4;return function(_0x18388e){logger[_0x8635('0x14')](_0x18388e[_0x8635('0x27')]);if(_0x18388e[_0x8635('0x28')]){delete _0x18388e['name'];}_0x3053f3['status'](_0x4faf49)[_0x8635('0x29')](_0x18388e);};}function getImapHost(_0x5001af){switch(_0x5001af){case _0x8635('0x2a'):return _0x8635('0x2b');case _0x8635('0x2c'):return _0x8635('0x2d');case _0x8635('0x2e'):return _0x8635('0x2f');case _0x8635('0x30'):return _0x8635('0x31');}throw new Error(_0x8635('0x32'),_0x5001af);}function getSmtpHost(_0x423161){switch(_0x423161){case _0x8635('0x2a'):return _0x8635('0x33');case _0x8635('0x2c'):return _0x8635('0x34');case _0x8635('0x2e'):return _0x8635('0x35');case'outlook365':return _0x8635('0x36');}throw new Error(_0x8635('0x32'),_0x423161);}function getAuthenticationOptions(_0x2c1602,_0x2de917){var _0x31ea72={};var _0x4fe3d7={};if(_0x2c1602){_0x31ea72[_0x8635('0x37')]=_0x4fe3d7[_0x8635('0x37')]=_0x2de917[_0x8635('0x38')];_0x31ea72['password']=_0x4fe3d7[_0x8635('0x39')]=_0x2de917['password'];if(_0x2de917['modernAuthentication']){_0x31ea72['modernAuthentication']=_0x4fe3d7['modernAuthentication']=!![];_0x31ea72['CloudProviderId']=_0x4fe3d7[_0x8635('0x3a')]=_0x2de917[_0x8635('0x3a')];_0x31ea72[_0x8635('0x3b')]=_0x4fe3d7[_0x8635('0x39')]=null;}else{_0x31ea72['CloudProviderId']=_0x4fe3d7['CloudProviderId']=null;}_0x31ea72[_0x8635('0x3c')]=getImapHost(_0x2c1602);_0x31ea72[_0x8635('0x3d')]=0x3e1;_0x4fe3d7[_0x8635('0x3c')]=getSmtpHost(_0x2c1602);_0x4fe3d7[_0x8635('0x3d')]=0x24b;_0x4fe3d7[_0x8635('0x3e')]=![];_0x31ea72[_0x8635('0x3f')]=_0x4fe3d7[_0x8635('0x3f')]=null;}else{if(_0x2de917[_0x8635('0x40')]){_0x31ea72[_0x8635('0x37')]=_0x4fe3d7[_0x8635('0x37')]=_0x2de917[_0x8635('0x38')];_0x31ea72['password']=_0x4fe3d7[_0x8635('0x39')]=_0x2de917[_0x8635('0x3b')];}else{_0x31ea72[_0x8635('0x40')]=_0x4fe3d7[_0x8635('0x40')]=![];_0x31ea72[_0x8635('0x37')]=_0x4fe3d7[_0x8635('0x37')]=null;_0x31ea72[_0x8635('0x3b')]=_0x4fe3d7[_0x8635('0x39')]=null;}_0x31ea72[_0x8635('0x3c')]=_0x2de917[_0x8635('0x41')]['host'];_0x31ea72['port']=_0x2de917[_0x8635('0x41')]['port'];_0x4fe3d7['host']=_0x2de917[_0x8635('0x42')][_0x8635('0x3c')];_0x4fe3d7[_0x8635('0x3d')]=_0x2de917[_0x8635('0x42')][_0x8635('0x3d')];}return{'Imap':_0x31ea72,'Smtp':_0x4fe3d7};}exports[_0x8635('0x43')]=function(_0x50be3c,_0xd47610){var _0x542b4b={'include':[{'model':db['MailServerIn'],'as':_0x8635('0x41')},{'model':db[_0x8635('0x44')],'as':_0x8635('0x42')},{'model':db[_0x8635('0x45')],'as':'mandatoryDispositionPause'}]},_0xd19c1={},_0x123e97={'count':0x0,'rows':[]};var _0x3e3f3a=_[_0x8635('0x46')](db['MailAccount']['rawAttributes'],function(_0x470671){return{'name':_0x470671[_0x8635('0x47')],'type':_0x470671['type'][_0x8635('0x48')]};});_0xd19c1[_0x8635('0x49')]=_['map'](_0x3e3f3a,_0x8635('0x28'));_0xd19c1[_0x8635('0x4a')]=_[_0x8635('0x4b')](_0x50be3c[_0x8635('0x4a')]);_0xd19c1[_0x8635('0x4c')]=_[_0x8635('0x4d')](_0xd19c1[_0x8635('0x49')],_0xd19c1[_0x8635('0x4a')]);_0x542b4b[_0x8635('0x4e')]=_[_0x8635('0x4d')](_0xd19c1[_0x8635('0x49')],qs['fields'](_0x50be3c['query'][_0x8635('0x4f')]));_0x542b4b[_0x8635('0x4e')]=_0x542b4b[_0x8635('0x4e')]['length']?_0x542b4b['attributes']:_0xd19c1[_0x8635('0x49')];if(!_0x50be3c[_0x8635('0x4a')][_0x8635('0x50')](_0x8635('0x51'))){_0x542b4b[_0x8635('0x1d')]=qs[_0x8635('0x1d')](_0x50be3c['query'][_0x8635('0x1d')]);_0x542b4b[_0x8635('0x1c')]=qs[_0x8635('0x1c')](_0x50be3c[_0x8635('0x4a')]['offset']);}_0x542b4b[_0x8635('0x52')]=qs['sort'](_0x50be3c[_0x8635('0x4a')][_0x8635('0x53')]);_0x542b4b[_0x8635('0x54')]=qs[_0x8635('0x4c')](_[_0x8635('0x55')](_0x50be3c[_0x8635('0x4a')],_0xd19c1[_0x8635('0x4c')]),_0x3e3f3a);if(_0x50be3c[_0x8635('0x4a')][_0x8635('0x56')]){_0x542b4b['where']=_[_0x8635('0x57')](_0x542b4b[_0x8635('0x54')],{'$or':_[_0x8635('0x46')](_0x3e3f3a,function(_0x8a9351){if(_0x8a9351[_0x8635('0x58')]!==_0x8635('0x59')){var _0x36edf4={};_0x36edf4[_0x8a9351[_0x8635('0x28')]]={'$like':'%'+_0x50be3c[_0x8635('0x4a')]['filter']+'%'};return _0x36edf4;}})});}_0x542b4b=_[_0x8635('0x57')]({},_0x542b4b,_0x50be3c[_0x8635('0x5a')]);var _0x692768={'where':_0x542b4b[_0x8635('0x54')]};return db[_0x8635('0x5b')][_0x8635('0x1f')](_0x692768)[_0x8635('0x23')](function(_0x5cab5a){_0x123e97['count']=_0x5cab5a;if(_0x50be3c[_0x8635('0x4a')]['includeAll']){_0x542b4b['include']=[{'all':!![]}];}return db[_0x8635('0x5b')][_0x8635('0x5c')](_0x542b4b);})[_0x8635('0x23')](function(_0x4fce31){_0x123e97[_0x8635('0x5d')]=_0x4fce31;return _0x123e97;})[_0x8635('0x23')](respondWithFilteredResult(_0xd47610,_0x542b4b))[_0x8635('0x19')](handleError(_0xd47610,null));};exports[_0x8635('0x5e')]=function(_0x4dfa98,_0x2453aa){var _0x3270f5={'raw':![],'where':{'id':_0x4dfa98[_0x8635('0x5f')]['id']},'include':[{'model':db[_0x8635('0x60')],'as':_0x8635('0x41')},{'model':db[_0x8635('0x44')],'as':_0x8635('0x42')},{'model':db['Pause'],'as':'mandatoryDispositionPause'}]},_0x21a6ec={};_0x21a6ec['model']=_['keys'](db[_0x8635('0x5b')]['rawAttributes']);_0x21a6ec[_0x8635('0x4a')]=_[_0x8635('0x4b')](_0x4dfa98['query']);_0x21a6ec['filters']=_[_0x8635('0x4d')](_0x21a6ec[_0x8635('0x49')],_0x21a6ec['query']);_0x3270f5[_0x8635('0x4e')]=_['intersection'](_0x21a6ec['model'],qs[_0x8635('0x4f')](_0x4dfa98['query'][_0x8635('0x4f')]));_0x3270f5[_0x8635('0x4e')]=_0x3270f5[_0x8635('0x4e')]['length']?_0x3270f5[_0x8635('0x4e')]:_0x21a6ec[_0x8635('0x49')];if(_0x4dfa98[_0x8635('0x4a')][_0x8635('0x61')]){_0x3270f5[_0x8635('0x62')]=[{'all':!![]}];}_0x3270f5=_[_0x8635('0x57')]({},_0x3270f5,_0x4dfa98[_0x8635('0x5a')]);return db[_0x8635('0x5b')][_0x8635('0x63')](_0x3270f5)[_0x8635('0x23')](handleEntityNotFound(_0x2453aa,null))[_0x8635('0x23')](respondWithResult(_0x2453aa,null))['catch'](handleError(_0x2453aa,null));};exports['update']=function(_0x188cd0,_0x41a9a1){if(_0x188cd0[_0x8635('0x64')]['id']){delete _0x188cd0[_0x8635('0x64')]['id'];}var _0x71ba8c=_0x188cd0[_0x8635('0x64')][_0x8635('0x65')]===_0x8635('0x66')?null:_0x188cd0[_0x8635('0x64')]['provider'];var _0x522fbe=_0x188cd0[_0x8635('0x64')][_0x8635('0x41')]||{};var _0x276547=_0x188cd0[_0x8635('0x64')]['Smtp']||{};if(_0x71ba8c){_0x522fbe['host']=getImapHost(_0x71ba8c);_0x522fbe[_0x8635('0x3d')]=0x3e1;_0x276547['host']=getSmtpHost(_0x71ba8c);_0x276547[_0x8635('0x3d')]=0x24b;_0x276547[_0x8635('0x3e')]=![];}if(_0x276547[_0x8635('0x67')]){_0x276547['secure']=![];}else{_0x276547[_0x8635('0x3a')]=null;}if(!_0x522fbe['modernAuthentication'])_0x522fbe[_0x8635('0x3a')]=null;_0x188cd0[_0x8635('0x64')][_0x8635('0x41')]=_0x522fbe;_0x188cd0['body'][_0x8635('0x42')]=_0x276547;return db[_0x8635('0x5b')]['find']({'where':{'id':_0x188cd0[_0x8635('0x5f')]['id']},'include':[{'model':db[_0x8635('0x60')],'as':'Imap'},{'model':db[_0x8635('0x44')],'as':_0x8635('0x42')},{'model':db[_0x8635('0x45')],'as':'mandatoryDispositionPause'}]})['then'](handleEntityNotFound(_0x41a9a1,null))[_0x8635('0x23')](function(_0x4b888c){if(!_0x4b888c)throw new Error(_0x8635('0x68'));if(_0x4b888c[_0x8635('0x3f')])delete _0x188cd0[_0x8635('0x64')][_0x8635('0x41')];return _0x4b888c;})[_0x8635('0x23')](saveUpdates(_0x188cd0[_0x8635('0x64')],null))[_0x8635('0x23')](function(_0x2eedaf){if(!_0x188cd0[_0x8635('0x64')][_0x8635('0x41')])return _0x2eedaf;return db['MailServerIn'][_0x8635('0x22')](_0x188cd0['body']['Imap'],{'where':{'MailAccountId':_0x2eedaf['id']}})[_0x8635('0x23')](function(){return _0x2eedaf;});})['then'](function(_0x54b5fc){if(!_0x188cd0['body'][_0x8635('0x42')])return _0x54b5fc;return db[_0x8635('0x44')][_0x8635('0x22')](_0x188cd0[_0x8635('0x64')][_0x8635('0x42')],{'where':{'MailAccountId':_0x54b5fc['id']}})['then'](function(){return _0x54b5fc;});})[_0x8635('0x23')](respondWithResult(_0x41a9a1,null))[_0x8635('0x19')](handleError(_0x41a9a1,null));};exports[_0x8635('0x69')]=function(_0x8ae079,_0x2f1c51){return db[_0x8635('0x5b')][_0x8635('0x69')]()['then'](respondWithResult(_0x2f1c51,null))[_0x8635('0x19')](handleError(_0x2f1c51,null));};exports[_0x8635('0x6a')]=function(_0xbf9136,_0x2e680d){if(_0xbf9136[_0x8635('0x64')]['id']){delete _0xbf9136[_0x8635('0x64')]['id'];}return db['MailAccount']['find']({'where':{'id':_0xbf9136[_0x8635('0x5f')]['id']}})[_0x8635('0x23')](handleEntityNotFound(_0x2e680d,null))[_0x8635('0x23')](function(_0x35acc3){if(_0x35acc3){_0xbf9136['body'][_0x8635('0x6b')]=_0x35acc3['id'];return db[_0x8635('0x6c')]['create'](_0xbf9136[_0x8635('0x64')]);}})[_0x8635('0x23')](respondWithResult(_0x2e680d,null))[_0x8635('0x19')](handleError(_0x2e680d,null));};exports['getDispositions']=function(_0x24cf20,_0x23cdb4){var _0x2fdba1={'raw':![],'where':{}};var _0xe008ec={};var _0x52c119={'count':0x0,'rows':[]};return db[_0x8635('0x5b')][_0x8635('0x6d')]({'where':{'id':_0x24cf20[_0x8635('0x5f')]['id']}})[_0x8635('0x23')](handleEntityNotFound(_0x23cdb4,null))['then'](function(_0x17dff1){if(_0x17dff1){_0xe008ec['model']=_[_0x8635('0x4b')](db['Disposition'][_0x8635('0x6e')]);_0xe008ec[_0x8635('0x4a')]=_[_0x8635('0x4b')](_0x24cf20[_0x8635('0x4a')]);_0xe008ec[_0x8635('0x4c')]=_[_0x8635('0x4d')](_0xe008ec['model'],_0xe008ec[_0x8635('0x4a')]);_0x2fdba1[_0x8635('0x4e')]=_['intersection'](_0xe008ec['model'],qs[_0x8635('0x4f')](_0x24cf20[_0x8635('0x4a')][_0x8635('0x4f')]));_0x2fdba1[_0x8635('0x4e')]=_0x2fdba1[_0x8635('0x4e')]['length']?_0x2fdba1[_0x8635('0x4e')]:_0xe008ec['model'];if(!_0x24cf20[_0x8635('0x4a')][_0x8635('0x50')]('nolimit')){_0x2fdba1[_0x8635('0x1d')]=qs[_0x8635('0x1d')](_0x24cf20['query']['limit']);_0x2fdba1[_0x8635('0x1c')]=qs['offset'](_0x24cf20[_0x8635('0x4a')][_0x8635('0x1c')]);}_0x2fdba1[_0x8635('0x52')]=qs[_0x8635('0x53')](_0x24cf20[_0x8635('0x4a')][_0x8635('0x53')]);_0x2fdba1[_0x8635('0x54')]=qs[_0x8635('0x4c')](_[_0x8635('0x55')](_0x24cf20['query'],_0xe008ec[_0x8635('0x4c')]));_0x2fdba1['where'][_0x8635('0x6b')]=_0x17dff1['id'];if(_0x24cf20[_0x8635('0x4a')][_0x8635('0x56')]){_0x2fdba1[_0x8635('0x54')]=_['merge'](_0x2fdba1[_0x8635('0x54')],{'$or':_[_0x8635('0x46')](_0x2fdba1['attributes'],function(_0x2bf4d9){var _0x38fefb={};_0x38fefb[_0x2bf4d9]={'$like':'%'+_0x24cf20[_0x8635('0x4a')][_0x8635('0x56')]+'%'};return _0x38fefb;})});}_0x2fdba1=_[_0x8635('0x57')]({},_0x2fdba1,_0x24cf20[_0x8635('0x5a')]);return db['Disposition'][_0x8635('0x1f')]({'where':_0x2fdba1[_0x8635('0x54')]})[_0x8635('0x23')](function(_0x41116a){_0x52c119[_0x8635('0x1f')]=_0x41116a;if(_0x24cf20[_0x8635('0x4a')]['includeAll']){_0x2fdba1[_0x8635('0x62')]=[{'all':!![]}];}return db[_0x8635('0x6c')]['findAll'](_0x2fdba1);})[_0x8635('0x23')](function(_0x31cf17){_0x52c119[_0x8635('0x5d')]=_0x31cf17;return _0x52c119;});}})[_0x8635('0x23')](respondWithFilteredResult(_0x23cdb4,_0x2fdba1))[_0x8635('0x19')](handleError(_0x23cdb4,null));};exports[_0x8635('0x6f')]=function(_0x16f969,_0x759f86){return db[_0x8635('0x5b')]['find']({'where':{'id':_0x16f969[_0x8635('0x5f')]['id']}})[_0x8635('0x23')](handleEntityNotFound(_0x759f86,null))[_0x8635('0x23')](function(_0x191955){if(_0x191955){return _0x191955[_0x8635('0x6f')](_0x16f969[_0x8635('0x4a')][_0x8635('0x70')]);}})[_0x8635('0x23')](respondWithStatusCode(_0x759f86,null))[_0x8635('0x19')](handleError(_0x759f86,null));};exports[_0x8635('0x71')]=function(_0x108e86,_0x4e8f99){if(_0x108e86[_0x8635('0x64')]['id']){delete _0x108e86[_0x8635('0x64')]['id'];}return db['MailAccount'][_0x8635('0x63')]({'where':{'id':_0x108e86['params']['id']}})[_0x8635('0x23')](handleEntityNotFound(_0x4e8f99,null))[_0x8635('0x23')](function(_0x5667bd){if(_0x5667bd){_0x108e86[_0x8635('0x64')][_0x8635('0x6b')]=_0x5667bd['id'];return db[_0x8635('0x72')][_0x8635('0x73')](_0x108e86[_0x8635('0x64')]);}})[_0x8635('0x23')](respondWithResult(_0x4e8f99,null))[_0x8635('0x19')](handleError(_0x4e8f99,null));};exports[_0x8635('0x74')]=function(_0xc53725,_0x2da60e){var _0x51b644={'raw':![],'where':{}};var _0x4918b8={};var _0x4ce1b5={'count':0x0,'rows':[]};return db[_0x8635('0x5b')][_0x8635('0x6d')]({'where':{'id':_0xc53725[_0x8635('0x5f')]['id']}})['then'](handleEntityNotFound(_0x2da60e,null))[_0x8635('0x23')](function(_0x2f35eb){if(_0x2f35eb){_0x4918b8[_0x8635('0x49')]=_[_0x8635('0x4b')](db[_0x8635('0x72')][_0x8635('0x6e')]);_0x4918b8[_0x8635('0x4a')]=_[_0x8635('0x4b')](_0xc53725[_0x8635('0x4a')]);_0x4918b8[_0x8635('0x4c')]=_['intersection'](_0x4918b8[_0x8635('0x49')],_0x4918b8[_0x8635('0x4a')]);_0x51b644[_0x8635('0x4e')]=_[_0x8635('0x4d')](_0x4918b8[_0x8635('0x49')],qs[_0x8635('0x4f')](_0xc53725[_0x8635('0x4a')][_0x8635('0x4f')]));_0x51b644[_0x8635('0x4e')]=_0x51b644[_0x8635('0x4e')]['length']?_0x51b644['attributes']:_0x4918b8[_0x8635('0x49')];if(!_0xc53725[_0x8635('0x4a')]['hasOwnProperty'](_0x8635('0x51'))){_0x51b644['limit']=qs[_0x8635('0x1d')](_0xc53725['query'][_0x8635('0x1d')]);_0x51b644[_0x8635('0x1c')]=qs[_0x8635('0x1c')](_0xc53725[_0x8635('0x4a')][_0x8635('0x1c')]);}_0x51b644['order']=qs[_0x8635('0x53')](_0xc53725[_0x8635('0x4a')][_0x8635('0x53')]);_0x51b644[_0x8635('0x54')]=qs[_0x8635('0x4c')](_[_0x8635('0x55')](_0xc53725[_0x8635('0x4a')],_0x4918b8[_0x8635('0x4c')]));_0x51b644[_0x8635('0x54')][_0x8635('0x6b')]=_0x2f35eb['id'];if(_0xc53725[_0x8635('0x4a')][_0x8635('0x56')]){_0x51b644[_0x8635('0x54')]=_['merge'](_0x51b644[_0x8635('0x54')],{'$or':_['map'](_0x51b644[_0x8635('0x4e')],function(_0xaa0853){var _0x4a875d={};_0x4a875d[_0xaa0853]={'$like':'%'+_0xc53725[_0x8635('0x4a')][_0x8635('0x56')]+'%'};return _0x4a875d;})});}_0x51b644=_[_0x8635('0x57')]({},_0x51b644,_0xc53725[_0x8635('0x5a')]);return db[_0x8635('0x72')][_0x8635('0x1f')]({'where':_0x51b644[_0x8635('0x54')]})[_0x8635('0x23')](function(_0x5b72d0){_0x4ce1b5[_0x8635('0x1f')]=_0x5b72d0;if(_0xc53725[_0x8635('0x4a')][_0x8635('0x61')]){_0x51b644[_0x8635('0x62')]=[{'all':!![]}];}return db[_0x8635('0x72')][_0x8635('0x5c')](_0x51b644);})[_0x8635('0x23')](function(_0xa49c5d){_0x4ce1b5[_0x8635('0x5d')]=_0xa49c5d;return _0x4ce1b5;});}})['then'](respondWithFilteredResult(_0x2da60e,_0x51b644))[_0x8635('0x19')](handleError(_0x2da60e,null));};exports[_0x8635('0x75')]=function(_0x1f21fc,_0xa3b8f1){return db['MailAccount']['find']({'where':{'id':_0x1f21fc[_0x8635('0x5f')]['id']}})[_0x8635('0x23')](handleEntityNotFound(_0xa3b8f1,null))[_0x8635('0x23')](function(_0x286b76){if(_0x286b76){return _0x286b76['removeAnswers'](_0x1f21fc[_0x8635('0x4a')][_0x8635('0x70')]);}})['then'](respondWithStatusCode(_0xa3b8f1,null))['catch'](handleError(_0xa3b8f1,null));};exports[_0x8635('0x73')]=function(_0x374344,_0x1c5095){var _0x8e0cd0={'name':_0x374344[_0x8635('0x64')][_0x8635('0x28')],'key':_0x374344['body'][_0x8635('0x48')],'provider':_0x374344[_0x8635('0x64')][_0x8635('0x65')]===_0x8635('0x66')?null:_0x374344[_0x8635('0x64')][_0x8635('0x65')],'email':_0x374344[_0x8635('0x64')][_0x8635('0x76')],'ListId':_0x374344['body'][_0x8635('0x77')],'active':!_[_0x8635('0x78')](_0x374344[_0x8635('0x64')][_0x8635('0x79')])?_0x374344[_0x8635('0x64')][_0x8635('0x79')]:!![],'description':_0x374344[_0x8635('0x64')]['description']||null};var _0x58134f=getAuthenticationOptions(_0x8e0cd0[_0x8635('0x65')],_0x374344['body']);_0x8e0cd0[_0x8635('0x41')]=_0x58134f[_0x8635('0x41')];_0x8e0cd0['Smtp']=_0x58134f['Smtp'];return db['MailAccount'][_0x8635('0x73')](_0x8e0cd0,{'include':[{'model':db[_0x8635('0x44')],'as':_0x8635('0x42')},{'model':db[_0x8635('0x60')],'as':_0x8635('0x41')}]})[_0x8635('0x23')](function(_0x23ed98){var _0x7c3282=_0x374344[_0x8635('0x37')][_0x8635('0x24')]({'plain':!![]});if(!_0x7c3282)throw new Error(_0x8635('0x7a'));if(_0x7c3282[_0x8635('0x7b')]==='user'){var _0x2222c6=_0x23ed98['get']({'plain':!![]});return db[_0x8635('0x7c')][_0x8635('0x63')]({'where':{'name':'MailAccounts','userProfileId':_0x7c3282[_0x8635('0x7d')]},'raw':!![]})['then'](function(_0x25c5f2){if(_0x25c5f2&&_0x25c5f2['autoAssociation']===0x0){return db[_0x8635('0x25')][_0x8635('0x73')]({'name':_0x2222c6[_0x8635('0x28')],'resourceId':_0x2222c6['id'],'type':_0x25c5f2[_0x8635('0x28')],'sectionId':_0x25c5f2['id']},{})[_0x8635('0x23')](function(){return _0x23ed98;});}else{return _0x23ed98;}})[_0x8635('0x19')](function(_0x550885){logger[_0x8635('0x14')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x550885);throw _0x550885;});}return _0x23ed98;})[_0x8635('0x23')](respondWithResult(_0x1c5095,0xc9))[_0x8635('0x19')](handleError(_0x1c5095,null));};exports[_0x8635('0x7e')]=function(_0x248e15,_0x376bf0){return db['MailAccount'][_0x8635('0x6d')]({'where':{'id':_0x248e15[_0x8635('0x5f')]['id']}})[_0x8635('0x23')](handleEntityNotFound(_0x376bf0,null))[_0x8635('0x23')](function(_0x3c8407){if(_0x3c8407){return _0x3c8407[_0x8635('0x7e')]();}return null;})['then'](respondWithResult(_0x376bf0,null))['catch'](handleError(_0x376bf0,null));};exports['addImap']=function(_0x1d7aa9,_0x1be978){if(_0x1d7aa9[_0x8635('0x64')]['id']){delete _0x1d7aa9[_0x8635('0x64')]['id'];}return db[_0x8635('0x5b')][_0x8635('0x63')]({'where':{'id':_0x1d7aa9['params']['id']}})[_0x8635('0x23')](handleEntityNotFound(_0x1be978,null))[_0x8635('0x23')](function(_0x2d75d9){if(_0x2d75d9){_0x1d7aa9[_0x8635('0x64')][_0x8635('0x6b')]=_0x2d75d9['id'];return db[_0x8635('0x60')][_0x8635('0x73')](_0x1d7aa9[_0x8635('0x64')]);}})[_0x8635('0x23')](respondWithResult(_0x1be978,null))[_0x8635('0x19')](handleError(_0x1be978,null));};exports[_0x8635('0x7f')]=function(_0x33f4ca,_0x23bf18){return db[_0x8635('0x5b')][_0x8635('0x6d')]({'where':{'id':_0x33f4ca[_0x8635('0x5f')]['id']}})[_0x8635('0x23')](handleEntityNotFound(_0x23bf18,null))['then'](function(_0xe25c12){if(_0xe25c12){return _0xe25c12[_0x8635('0x80')](null);}return null;})['then'](respondWithStatusCode(_0x23bf18,null))[_0x8635('0x19')](handleError(_0x23bf18,null));};exports[_0x8635('0x81')]=function(_0x372340,_0x4e04e8){return db['MailAccount'][_0x8635('0x6d')]({'where':{'id':_0x372340[_0x8635('0x5f')]['id']}})[_0x8635('0x23')](handleEntityNotFound(_0x4e04e8,null))[_0x8635('0x23')](function(_0x4c5a6f){if(_0x4c5a6f){return _0x4c5a6f[_0x8635('0x81')]();}return null;})[_0x8635('0x23')](respondWithResult(_0x4e04e8,null))[_0x8635('0x19')](handleError(_0x4e04e8,null));};exports[_0x8635('0x82')]=function(_0x443798,_0x407454){if(_0x443798[_0x8635('0x64')]['id']){delete _0x443798[_0x8635('0x64')]['id'];}return db[_0x8635('0x5b')][_0x8635('0x63')]({'where':{'id':_0x443798[_0x8635('0x5f')]['id']}})['then'](handleEntityNotFound(_0x407454,null))['then'](function(_0x5c5b4c){if(_0x5c5b4c){_0x443798['body']['MailAccountId']=_0x5c5b4c['id'];return db[_0x8635('0x44')][_0x8635('0x73')](_0x443798['body']);}})['then'](respondWithResult(_0x407454,null))['catch'](handleError(_0x407454,null));};exports[_0x8635('0x83')]=function(_0x3b27f7,_0x4015d6){return db[_0x8635('0x5b')][_0x8635('0x6d')]({'where':{'id':_0x3b27f7['params']['id']}})[_0x8635('0x23')](handleEntityNotFound(_0x4015d6,null))[_0x8635('0x23')](function(_0x517482){if(_0x517482){return _0x517482[_0x8635('0x84')](null);}return null;})[_0x8635('0x23')](respondWithStatusCode(_0x4015d6,null))[_0x8635('0x19')](handleError(_0x4015d6,null));};exports[_0x8635('0x85')]=function(_0x58178e,_0x4b3f0b){return db[_0x8635('0x86')][_0x8635('0x63')]({'where':{'id':_0x58178e[_0x8635('0x5f')]['id']}})[_0x8635('0x23')](handleEntityNotFound(_0x4b3f0b,null))['then'](function(_0x535049){if(_0x535049){return _0x535049['addInteraction'](_0x58178e['body'][_0x8635('0x70')],_['omit'](_0x58178e[_0x8635('0x64')],['ids','id'])||{});}})['then'](respondWithResult(_0x4b3f0b,null))[_0x8635('0x19')](handleError(_0x4b3f0b,null));};exports[_0x8635('0x87')]=function(_0x8475a8,_0xc9f09a){var _0x501247={'raw':![],'where':{}};var _0x2a054e={};var _0xed3887={'count':0x0,'rows':[]};return db[_0x8635('0x5b')]['findOne']({'where':{'id':_0x8475a8[_0x8635('0x5f')]['id']}})['then'](handleEntityNotFound(_0xc9f09a,null))['then'](function(_0x39a3d2){if(_0x39a3d2){_0x2a054e['model']=_[_0x8635('0x4b')](db[_0x8635('0x86')][_0x8635('0x6e')]);_0x2a054e['query']=_[_0x8635('0x4b')](_0x8475a8[_0x8635('0x4a')]);_0x2a054e[_0x8635('0x4c')]=_[_0x8635('0x4d')](_0x2a054e['model'],_0x2a054e[_0x8635('0x4a')]);_0x501247[_0x8635('0x4e')]=_[_0x8635('0x4d')](_0x2a054e[_0x8635('0x49')],qs[_0x8635('0x4f')](_0x8475a8[_0x8635('0x4a')][_0x8635('0x4f')]));_0x501247[_0x8635('0x4e')]=_0x501247[_0x8635('0x4e')][_0x8635('0x88')]?_0x501247['attributes']:_0x2a054e[_0x8635('0x49')];if(!_0x8475a8[_0x8635('0x4a')][_0x8635('0x50')]('nolimit')){_0x501247[_0x8635('0x1d')]=qs[_0x8635('0x1d')](_0x8475a8[_0x8635('0x4a')][_0x8635('0x1d')]);_0x501247['offset']=qs[_0x8635('0x1c')](_0x8475a8['query'][_0x8635('0x1c')]);}_0x501247[_0x8635('0x52')]=qs[_0x8635('0x53')](_0x8475a8[_0x8635('0x4a')][_0x8635('0x53')]);_0x501247['where']=qs['filters'](_[_0x8635('0x55')](_0x8475a8['query'],_0x2a054e[_0x8635('0x4c')]));_0x501247[_0x8635('0x54')][_0x8635('0x6b')]=_0x39a3d2['id'];if(_0x8475a8[_0x8635('0x4a')][_0x8635('0x56')]){_0x501247[_0x8635('0x54')]=_[_0x8635('0x57')](_0x501247[_0x8635('0x54')],{'$or':_[_0x8635('0x46')](_0x501247[_0x8635('0x4e')],function(_0x4cbd9d){var _0x1a25bb={};_0x1a25bb[_0x4cbd9d]={'$like':'%'+_0x8475a8[_0x8635('0x4a')][_0x8635('0x56')]+'%'};return _0x1a25bb;})});}_0x501247=_['merge']({},_0x501247,_0x8475a8['options']);return db[_0x8635('0x86')][_0x8635('0x1f')]({'where':_0x501247[_0x8635('0x54')]})['then'](function(_0x156037){_0xed3887[_0x8635('0x1f')]=_0x156037;if(_0x8475a8[_0x8635('0x4a')][_0x8635('0x61')]){_0x501247['include']=[{'model':db[_0x8635('0x89')],'as':_0x8635('0x8a'),'required':![]},{'model':db[_0x8635('0x8b')],'as':_0x8635('0x8c'),'attributes':[_0x8635('0x28'),'fullname',_0x8635('0x8d')],'required':![]},{'model':db[_0x8635('0x8e')],'as':_0x8635('0x8f'),'attributes':['id','name','color'],'where':_0x8475a8[_0x8635('0x4a')][_0x8635('0x90')]?{'id':_0x8475a8[_0x8635('0x4a')][_0x8635('0x90')]}:undefined,'required':_0x8475a8[_0x8635('0x4a')]['tag']?!![]:![]}];}return db[_0x8635('0x86')][_0x8635('0x5c')](_0x501247);})[_0x8635('0x23')](function(_0x41bbd0){_0xed3887[_0x8635('0x5d')]=_0x41bbd0;return _0xed3887;});}})[_0x8635('0x23')](respondWithFilteredResult(_0xc9f09a,_0x501247))[_0x8635('0x19')](handleError(_0xc9f09a,null));};exports[_0x8635('0x91')]=function addApplications(_0x4c2bec,_0x1f173c){var _0xd8bbc5=_0x4c2bec[_0x8635('0x5f')]['id'];var _0x59b925=_0x4c2bec['body'];var _0x3ef688=0xc8;var _0x2024f4=null;return db[_0x8635('0x92')][_0x8635('0x93')]({'isolationLevel':db[_0x8635('0x92')]['Transaction'][_0x8635('0x94')][_0x8635('0x95')]},function(_0x5b676b){return db['MailAccount'][_0x8635('0x6d')]({'where':{'id':_0xd8bbc5},'transaction':_0x5b676b})['then'](function(_0x1e5776){if(_0x1e5776){return db[_0x8635('0x96')]['destroy']({'where':{'MailAccountId':_0xd8bbc5},'transaction':_0x5b676b})[_0x8635('0x23')](function(){var _0x1b415b=_[_0x8635('0x46')](_0x59b925,function(_0x171482){_0x171482[_0x8635('0x6b')]=_0xd8bbc5;return _0x171482;});return db[_0x8635('0x96')][_0x8635('0x97')](_0x1b415b,{'transaction':_0x5b676b});});}else{_0x3ef688=0x194;_0x2024f4=[];}});})[_0x8635('0x23')](function(){if(_0x3ef688!==0x194){return db['MailApplication']['findAndCountAll']({'where':{'MailAccountId':_0xd8bbc5},'order':_0x8635('0x98')})[_0x8635('0x23')](function(_0x4a12b4){_0x2024f4=_0x4a12b4;});}})[_0x8635('0x19')](function(_0x4975f4){_0x3ef688=0x1f4;logger[_0x8635('0x14')](_0x4975f4[_0x8635('0x27')]);if(_0x4975f4[_0x8635('0x28')]){delete _0x4975f4[_0x8635('0x28')];}_0x2024f4=_0x4975f4;})[_0x8635('0x99')](function(){if(_0x2024f4===null){_0x1f173c['sendStatus'](_0x3ef688);}else{if(_0x3ef688===0x1f4){_0x1f173c[_0x8635('0x1b')](_0x3ef688)[_0x8635('0x29')](_0x2024f4);}else{_0x1f173c[_0x8635('0x1b')](_0x3ef688)[_0x8635('0x21')](_0x2024f4);}}});};exports[_0x8635('0x9a')]=function(_0x5c84c2,_0xc24aa6){var _0xb9cc8={};var _0xec6617={};var _0x3f4690;var _0x248e3c;return db[_0x8635('0x5b')][_0x8635('0x6d')]({'where':{'id':_0x5c84c2[_0x8635('0x5f')]['id']}})[_0x8635('0x23')](handleEntityNotFound(_0xc24aa6,null))[_0x8635('0x23')](function(_0x278f3f){if(_0x278f3f){_0x3f4690=_0x278f3f;_0xec6617[_0x8635('0x49')]=_['keys'](db[_0x8635('0x96')][_0x8635('0x6e')]);_0xec6617[_0x8635('0x4a')]=_['keys'](_0x5c84c2[_0x8635('0x4a')]);_0xec6617[_0x8635('0x4c')]=_[_0x8635('0x4d')](_0xec6617['model'],_0xec6617[_0x8635('0x4a')]);_0xb9cc8['attributes']=_['intersection'](_0xec6617['model'],qs[_0x8635('0x4f')](_0x5c84c2[_0x8635('0x4a')][_0x8635('0x4f')]));_0xb9cc8[_0x8635('0x4e')]=_0xb9cc8[_0x8635('0x4e')][_0x8635('0x88')]?_0xb9cc8[_0x8635('0x4e')]:_0xec6617[_0x8635('0x49')];_0xb9cc8[_0x8635('0x52')]=qs[_0x8635('0x53')](_0x5c84c2['query'][_0x8635('0x53')]);_0xb9cc8[_0x8635('0x54')]=qs[_0x8635('0x4c')](_[_0x8635('0x55')](_0x5c84c2['query'],_0xec6617['filters']));if(_0x5c84c2[_0x8635('0x4a')][_0x8635('0x56')]){_0xb9cc8[_0x8635('0x54')]=_['merge'](_0xb9cc8[_0x8635('0x54')],{'$or':_['map'](_0xb9cc8[_0x8635('0x4e')],function(_0x5ae2e1){var _0x3b0d7c={};_0x3b0d7c[_0x5ae2e1]={'$like':'%'+_0x5c84c2[_0x8635('0x4a')][_0x8635('0x56')]+'%'};return _0x3b0d7c;})});}_0xb9cc8=_[_0x8635('0x57')]({},_0xb9cc8,_0x5c84c2[_0x8635('0x5a')]);return _0x3f4690[_0x8635('0x9a')](_0xb9cc8);}})[_0x8635('0x23')](function(_0x560259){if(_0x560259){_0x248e3c=_0x560259[_0x8635('0x88')];if(!_0x5c84c2['query'][_0x8635('0x50')](_0x8635('0x51'))){_0xb9cc8[_0x8635('0x1d')]=qs['limit'](_0x5c84c2[_0x8635('0x4a')][_0x8635('0x1d')]);_0xb9cc8[_0x8635('0x1c')]=qs[_0x8635('0x1c')](_0x5c84c2[_0x8635('0x4a')][_0x8635('0x1c')]);}return _0x3f4690[_0x8635('0x9a')](_0xb9cc8);}})[_0x8635('0x23')](function(_0x16cf9e){if(_0x16cf9e){return _0x16cf9e?{'count':_0x248e3c,'rows':_0x16cf9e}:null;}})[_0x8635('0x23')](respondWithResult(_0xc24aa6,null))[_0x8635('0x19')](handleError(_0xc24aa6,null));};exports[_0x8635('0x9b')]=function(_0xb2e26e,_0xf2084b){var _0x627b0b={'raw':!![],'where':{}};var _0x4472a6={};var _0x19de9d={'count':0x0,'rows':[]};return db[_0x8635('0x5b')][_0x8635('0x6d')]({'where':{'id':_0xb2e26e[_0x8635('0x5f')]['id']}})[_0x8635('0x23')](handleEntityNotFound(_0xf2084b,null))[_0x8635('0x23')](function(_0xd6829d){if(_0xd6829d){_0x4472a6[_0x8635('0x49')]=_[_0x8635('0x4b')](db[_0x8635('0x9c')][_0x8635('0x6e')]);_0x4472a6[_0x8635('0x4a')]=_[_0x8635('0x4b')](_0xb2e26e[_0x8635('0x4a')]);_0x4472a6['filters']=_[_0x8635('0x4d')](_0x4472a6['model'],_0x4472a6[_0x8635('0x4a')]);_0x627b0b[_0x8635('0x4e')]=_['intersection'](_0x4472a6[_0x8635('0x49')],qs[_0x8635('0x4f')](_0xb2e26e[_0x8635('0x4a')][_0x8635('0x4f')]));_0x627b0b[_0x8635('0x4e')]=_0x627b0b[_0x8635('0x4e')]['length']?_0x627b0b['attributes']:_0x4472a6['model'];if(!_0xb2e26e[_0x8635('0x4a')][_0x8635('0x50')](_0x8635('0x51'))){_0x627b0b[_0x8635('0x1d')]=qs[_0x8635('0x1d')](_0xb2e26e[_0x8635('0x4a')][_0x8635('0x1d')]);_0x627b0b[_0x8635('0x1c')]=qs['offset'](_0xb2e26e[_0x8635('0x4a')][_0x8635('0x1c')]);}_0x627b0b[_0x8635('0x52')]=qs['sort'](_0xb2e26e[_0x8635('0x4a')]['sort']);_0x627b0b['where']=qs[_0x8635('0x4c')](_[_0x8635('0x55')](_0xb2e26e[_0x8635('0x4a')],_0x4472a6[_0x8635('0x4c')]));_0x627b0b[_0x8635('0x54')]['MailAccountId']=_0xd6829d['id'];if(_0xb2e26e[_0x8635('0x4a')][_0x8635('0x56')]){_0x627b0b[_0x8635('0x54')]=_['merge'](_0x627b0b['where'],{'$or':_[_0x8635('0x46')](_0x627b0b[_0x8635('0x4e')],function(_0x5046c8){var _0x4859f7={};_0x4859f7[_0x5046c8]={'$like':'%'+_0xb2e26e[_0x8635('0x4a')][_0x8635('0x56')]+'%'};return _0x4859f7;})});}if(_0xb2e26e[_0x8635('0x4a')][_0x8635('0x9d')]){var _0x345628=_0xb2e26e[_0x8635('0x4a')][_0x8635('0x9d')][_0x8635('0x9e')](',');var _0x426354={};_0x426354[_0x345628[0x0]]={'$gte':moment(_0x345628[0x1])[_0x8635('0x9f')](_0x8635('0xa0'))};_0x627b0b['where']=_[_0x8635('0x57')](_0x627b0b[_0x8635('0x54')],_0x426354);}_0x627b0b=_[_0x8635('0x57')]({},_0x627b0b,_0xb2e26e[_0x8635('0x5a')]);return db[_0x8635('0x9c')][_0x8635('0x1f')]({'where':_0x627b0b[_0x8635('0x54')]})[_0x8635('0x23')](function(_0x564ff4){_0x19de9d['count']=_0x564ff4;if(_0xb2e26e[_0x8635('0x4a')]['includeAll']){_0x627b0b[_0x8635('0x62')]=[{'all':!![]}];}return db[_0x8635('0x9c')][_0x8635('0x5c')](_0x627b0b);})[_0x8635('0x23')](function(_0x4eb713){if(_0xb2e26e['query'][_0x8635('0xa1')]===_0x8635('0xa2')){for(var _0x3e7c35=0x0;_0x3e7c35<_0x4eb713['length'];_0x3e7c35++){_0x4eb713[_0x3e7c35][_0x8635('0x64')]=juice(_0x4eb713[_0x3e7c35][_0x8635('0x64')]);}}_0x19de9d[_0x8635('0x5d')]=_0x4eb713;return _0x19de9d;});}})['then'](respondWithFilteredResult(_0xf2084b,_0x627b0b))[_0x8635('0x19')](handleError(_0xf2084b,null));};exports[_0x8635('0x29')]=function(_0x38435a,_0x119719){var _0x6583af,_0x3763a8={},_0x5515a8;if(_0x38435a[_0x8635('0x64')]['to']){_0x5515a8=_0x38435a[_0x8635('0x64')]['to']['split'](',')[0x0];}return db[_0x8635('0x5b')]['find']({'where':{'id':_0x38435a['params']['id']},'include':[{'model':db['CmList'],'as':'List','include':[{'model':db[_0x8635('0x89')],'as':_0x8635('0xa3'),'where':{'email':_0x5515a8},'limit':0x1,'order':[[_0x8635('0xa4'),'DESC']]}]},{'model':db['MailServerOut'],'as':_0x8635('0x42'),'raw':!![],'include':[{'model':db[_0x8635('0xa5')],'as':'CloudProvider','raw':!![]}]}]})[_0x8635('0x23')](handleEntityNotFound(_0x119719,null))[_0x8635('0x23')](function(_0x3b4301){if(!_0x3b4301)return;_0x6583af=_0x3b4301;if(!_0x3b4301[_0x8635('0x42')])throw new Error(_0x8635('0xa6'));if(_[_0x8635('0x78')](_0x38435a[_0x8635('0x64')]['from'])){_0x38435a[_0x8635('0x64')][_0x8635('0xa7')]=util[_0x8635('0x9f')](_0x8635('0xa8'),_0x3b4301[_0x8635('0x28')],_0x3b4301['email']||_0x3b4301[_0x8635('0x42')][_0x8635('0x37')]);}if(_0x38435a[_0x8635('0x64')][_0x8635('0xa9')]&&_0x38435a[_0x8635('0x64')]['attachments'][_0x8635('0x88')]){for(var _0x463443=0x0;_0x463443<_0x38435a[_0x8635('0x64')][_0x8635('0xa9')]['length'];_0x463443+=0x1){_0x38435a['body']['attachments'][_0x463443]={'filename':_0x38435a[_0x8635('0x64')][_0x8635('0xa9')][_0x463443][_0x8635('0x28')],'path':path[_0x8635('0xaa')](config[_0x8635('0xab')],_0x8635('0xac'),_0x38435a[_0x8635('0x64')][_0x8635('0xa9')][_0x463443][_0x8635('0xad')])};}}var _0x234335=_0x3b4301['getSmtpOptions']();return respondWithRpcPromise(_0x8635('0xae'),_0x8635('0xaf'),{'account':_0x234335,'message':_0x38435a[_0x8635('0x64')]});})[_0x8635('0x23')](function(_0x6b5f41){if(!_0x6b5f41)return;_0x3763a8=_0x6b5f41;if(!_0x6583af[_0x8635('0xb0')])throw new Error(_0x8635('0xb1'));if(_0x6583af[_0x8635('0xb0')][_0x8635('0xa3')]['length'])return _0x6583af[_0x8635('0xb0')]['Contacts'][0x0];return db[_0x8635('0x89')][_0x8635('0x73')](_[_0x8635('0x9')](_0x38435a[_0x8635('0x64')],{'firstName':_0x38435a['body']['to'],'email':_0x38435a[_0x8635('0x64')]['to'],'phone':_0x38435a[_0x8635('0x64')]['to'],'ListId':_0x6583af[_0x8635('0x77')]}));})['then'](function(_0x19b708){if(!_0x19b708)return;var _0x32068b={'UserId':_0x38435a[_0x8635('0x37')]['id'],'ContactId':_0x19b708['id'],'MailAccountId':_0x6583af['id'],'inReplyTo':_0x3763a8[_0x8635('0xb2')],'to':_0x38435a[_0x8635('0x64')][_0x8635('0xa7')],'cc':_0x38435a[_0x8635('0x64')]['cc'],'subject':_0x38435a[_0x8635('0x64')][_0x8635('0xb3')],'attach':_0x38435a[_0x8635('0x64')][_0x8635('0xb4')],'firstMsgDirection':_0x8635('0xb5'),'lastMsgAt':moment()[_0x8635('0x9f')](_0x8635('0xa0')),'lastMsgDirection':'out','Messages':[_[_0x8635('0x57')](_0x38435a['body'],{'messageId':_0x3763a8[_0x8635('0xb2')],'sentAt':moment()['format'](_0x8635('0xa0')),'read':!![],'MailAccountId':_0x6583af['id'],'UserId':_0x38435a['user']['id'],'ContactId':_0x19b708['id']})]};if(_0x38435a[_0x8635('0x64')][_0x8635('0xb6')]){_0x32068b=_[_0x8635('0x57')](_0x32068b,_0x38435a[_0x8635('0x64')]['Interaction']);}return db[_0x8635('0x86')][_0x8635('0x73')](_0x32068b,{'include':[{'model':db[_0x8635('0x9c')],'as':_0x8635('0xb7')}]});})[_0x8635('0x23')](respondWithResult(_0x119719,null))[_0x8635('0x19')](handleError(_0x119719,null));};exports['verifySmtp']=function(_0x55a2c4,_0x1d0a6f){return db[_0x8635('0x5b')]['find']({'where':{'id':_0x55a2c4['params']['id']},'include':[{'model':db['MailServerOut'],'as':_0x8635('0x42'),'raw':!![],'include':[{'model':db['CloudProvider'],'as':_0x8635('0xa5'),'raw':!![]}]}]})['then'](handleEntityNotFound(_0x1d0a6f,null))['then'](function(_0xd7bfcd){if(!_0xd7bfcd[_0x8635('0x42')])return;var _0x2f53c2=_0xd7bfcd['getSmtpOptions']();return respondWithRpcPromise(_0x8635('0xb8'),_0x8635('0xb9'),{'account':_0x2f53c2});})['then'](respondWithResult(_0x1d0a6f,null))[_0x8635('0x19')](handleError(_0x1d0a6f,null));};exports[_0x8635('0xba')]=function(_0x1e94ef,_0x5efab2){return db[_0x8635('0x5b')][_0x8635('0x63')]({'where':{'id':_0x1e94ef['params']['id']}})[_0x8635('0x23')](handleEntityNotFound(_0x5efab2,null))[_0x8635('0x23')](function(_0xcaed15){if(_0xcaed15&&_0xcaed15[_0x8635('0x3f')]){throw new db[(_0x8635('0xbb'))][(_0x8635('0xbc'))](_0x8635('0xbd'));}return _0xcaed15;})[_0x8635('0x23')](removeEntity(_0x5efab2,null))[_0x8635('0x19')](handleError(_0x5efab2,null));};exports[_0x8635('0xbe')]=function(_0x4a75b3,_0x1f8b33){return db[_0x8635('0x5b')][_0x8635('0x63')]({'where':{'id':_0x4a75b3[_0x8635('0x5f')]['id']}})['then'](handleEntityNotFound(_0x1f8b33,null))[_0x8635('0x23')](function(_0x3da3f7){if(_0x3da3f7){return _0x3da3f7['addAgents'](_0x4a75b3[_0x8635('0x64')][_0x8635('0x70')],_['omit'](_0x4a75b3[_0x8635('0x64')],[_0x8635('0x70'),'id'])||{})[_0x8635('0xbf')](function(_0x26ad45){for(var _0x4a7a66=0x0;_0x4a7a66<_0x4a75b3[_0x8635('0x64')][_0x8635('0x70')][_0x8635('0x88')];_0x4a7a66+=0x1){socket[_0x8635('0xc0')]('userMailAccount:save',{'UserId':Number(_0x4a75b3[_0x8635('0x64')][_0x8635('0x70')][_0x4a7a66]),'MailAccountId':Number(_0x4a75b3['params']['id'])});}return _0x26ad45;});}})[_0x8635('0x23')](respondWithResult(_0x1f8b33,null))['catch'](handleError(_0x1f8b33,null));};exports[_0x8635('0xc1')]=function(_0x527c8c,_0x16533a){return db[_0x8635('0x5b')][_0x8635('0x63')]({'where':{'id':_0x527c8c['params']['id']}})[_0x8635('0x23')](handleEntityNotFound(_0x16533a,null))[_0x8635('0x23')](function(_0x46f00e){if(_0x46f00e){return _0x46f00e['removeAgents'](_0x527c8c['query']['ids'])[_0x8635('0x23')](function(){if(_[_0x8635('0xc2')](_0x527c8c[_0x8635('0x4a')][_0x8635('0x70')])){for(var _0xa969e6=0x0;_0xa969e6<_0x527c8c['query'][_0x8635('0x70')][_0x8635('0x88')];_0xa969e6+=0x1){socket['emit']('userMailAccount:remove',{'UserId':Number(_0x527c8c['query'][_0x8635('0x70')][_0xa969e6]),'MailAccountId':Number(_0x527c8c['params']['id'])});}}else{socket['emit'](_0x8635('0xc3'),{'UserId':Number(_0x527c8c[_0x8635('0x4a')]['ids']),'MailAccountId':Number(_0x527c8c[_0x8635('0x5f')]['id'])});}});}})[_0x8635('0x23')](respondWithStatusCode(_0x16533a,null))[_0x8635('0x19')](handleError(_0x16533a,null));};exports[_0x8635('0xc4')]=function(_0xfd0b2e,_0x291440){var _0x1f4710={};var _0x48aefe={};var _0x4de3d2;var _0x287f90;return db[_0x8635('0x5b')][_0x8635('0x6d')]({'where':{'id':_0xfd0b2e['params']['id']}})[_0x8635('0x23')](handleEntityNotFound(_0x291440,null))[_0x8635('0x23')](function(_0x40b14f){if(_0x40b14f){_0x4de3d2=_0x40b14f;_0x48aefe['model']=_[_0x8635('0x4b')](db[_0x8635('0x8b')]['rawAttributes']);_0x48aefe[_0x8635('0x4a')]=_[_0x8635('0x4b')](_0xfd0b2e[_0x8635('0x4a')]);_0x48aefe['filters']=_[_0x8635('0x4d')](_0x48aefe['model'],_0x48aefe[_0x8635('0x4a')]);_0x1f4710['attributes']=_[_0x8635('0x4d')](_0x48aefe['model'],qs[_0x8635('0x4f')](_0xfd0b2e['query']['fields']));_0x1f4710[_0x8635('0x4e')]=_0x1f4710['attributes']['length']?_0x1f4710[_0x8635('0x4e')]:_0x48aefe[_0x8635('0x49')];_0x1f4710['order']=qs[_0x8635('0x53')](_0xfd0b2e[_0x8635('0x4a')]['sort']);_0x1f4710[_0x8635('0x54')]=qs[_0x8635('0x4c')](_[_0x8635('0x55')](_0xfd0b2e['query'],_0x48aefe[_0x8635('0x4c')]));if(_0xfd0b2e[_0x8635('0x4a')][_0x8635('0x56')]){_0x1f4710[_0x8635('0x54')]=_[_0x8635('0x57')](_0x1f4710[_0x8635('0x54')],{'$or':_[_0x8635('0x46')](_0x1f4710[_0x8635('0x4e')],function(_0x44d0ba){var _0x2a0a13={};_0x2a0a13[_0x44d0ba]={'$like':'%'+_0xfd0b2e['query'][_0x8635('0x56')]+'%'};return _0x2a0a13;})});}_0x1f4710=_[_0x8635('0x57')]({},_0x1f4710,_0xfd0b2e[_0x8635('0x5a')]);return _0x4de3d2[_0x8635('0xc4')](_0x1f4710);}})['then'](function(_0x3eefcf){if(_0x3eefcf){_0x287f90=_0x3eefcf[_0x8635('0x88')];if(!_0xfd0b2e[_0x8635('0x4a')][_0x8635('0x50')](_0x8635('0x51'))){_0x1f4710[_0x8635('0x1d')]=qs[_0x8635('0x1d')](_0xfd0b2e[_0x8635('0x4a')][_0x8635('0x1d')]);_0x1f4710['offset']=qs[_0x8635('0x1c')](_0xfd0b2e[_0x8635('0x4a')][_0x8635('0x1c')]);}return _0x4de3d2[_0x8635('0xc4')](_0x1f4710);}})[_0x8635('0x23')](function(_0x29521f){if(_0x29521f){return _0x29521f?{'count':_0x287f90,'rows':_0x29521f}:null;}})[_0x8635('0x23')](respondWithResult(_0x291440,null))[_0x8635('0x19')](handleError(_0x291440,null));};
\ No newline at end of file
+var _0x301a=['MailInteraction','omit','Contact','User','Owner','internal','Tag','Tags','color','tag','addApplications','transaction','sequelize','ISOLATION_LEVELS','READ_COMMITTED','MailApplication','bulkCreate','priority','getApplications','getMessages','$gte','MailMessage','inlineCss','true','List','CmContact','updatedAt','DESC','CloudProvider','Smtp\x20configuration\x20not\x20found','from','%s\x20<%s>','attachments','root','server/files/attachments','basename','SendMail','sendMail','Contacts','messageId','subject','attach','out','format','YYYY-MM-DD\x20HH:mm:ss','Interaction','Messages','verifySmtp','getSmtpOptions','VerifySmtp','Sequelize','ValidationError','You\x20can\x27t\x20remove\x20the\x20mail\x20service\x20account','addAgents','spread','removeAgents','isArray','emit','userMailAccount:remove','getAgents','bluebird','util','path','lodash','juice','ioredis','../../config/logger','api','../../mysqldb','redis','defaults','socket.io-emitter','./mailAccount.socket','register','jayson/promise','client','http','request','then','info','MailAccount,\x20%s,\x20%s','debug','MailAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','status','end','json','offset','undefined','limit','set','Content-Range','update','destroy','get','MailAccounts','sendStatus','name','send','gmail','imap.gmail.com','yahoo','imap.mail.yahoo.com','hotmail','imap-mail.outlook.com','outlook.office365.com','Unknown\x20email\x20service\x20provider','smtp.gmail.com','smtp.mail.yahoo.com','smtp-mail.outlook.com','smtp.office365.com','user','password','pass','modernAuthentication','CloudProviderId','host','port','secure','service','username','authentication','Imap','Smtp','MailServerIn','MailServerOut','Pause','mandatoryDispositionPause','map','MailAccount','rawAttributes','fieldName','type','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','order','sort','where','pick','filter','merge','findAll','rows','catch','show','params','includeAll','include','find','body','custom','provider','Mail\x20Account\x20not\x20found','describe','addDisposition','Disposition','create','getDispositions','findOne','nolimit','options','count','removeDispositions','ids','addAnswer','MailAccountId','getAnswers','CannedAnswer','key','email','ListId','isNil','active','description','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','removeImap','setImap','getSmtp','addSmtp','setSmtp','addInteraction'];(function(_0x465028,_0x4570ac){var _0xb783d4=function(_0x5458c5){while(--_0x5458c5){_0x465028['push'](_0x465028['shift']());}};_0xb783d4(++_0x4570ac);}(_0x301a,0x1c8));var _0xa301=function(_0xf8bbe9,_0x3631db){_0xf8bbe9=_0xf8bbe9-0x0;var _0xf6d2b2=_0x301a[_0xf8bbe9];return _0xf6d2b2;};'use strict';var moment=require('moment');var BPromise=require(_0xa301('0x0'));var util=require(_0xa301('0x1'));var path=require(_0xa301('0x2'));var _=require(_0xa301('0x3'));var juice=require(_0xa301('0x4'));var Redis=require(_0xa301('0x5'));var qs=require('../../components/parsers/qs');var logger=require(_0xa301('0x6'))(_0xa301('0x7'));var config=require('../../config/environment');var db=require(_0xa301('0x8'))['db'];config[_0xa301('0x9')]=_[_0xa301('0xa')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xa301('0xb'))(new Redis(config[_0xa301('0x9')]));require(_0xa301('0xc'))[_0xa301('0xd')](socket);var jayson=require(_0xa301('0xe'));var client=jayson[_0xa301('0xf')][_0xa301('0x10')]({'port':0x232b});function respondWithRpcPromise(_0x483417,_0xa9e343,_0x436325,_0x19e0e8){return new BPromise(function(_0x1dc234,_0x2540e6){var _0x1889f5=_0x19e0e8||client;return _0x1889f5[_0xa301('0x11')](_0x483417,_0x436325)[_0xa301('0x12')](function(_0x3f3a0e){logger[_0xa301('0x13')](_0xa301('0x14'),_0xa9e343,'request\x20sent');logger[_0xa301('0x15')](_0xa301('0x16'),_0xa9e343,_0xa301('0x17'),JSON[_0xa301('0x18')](_0x3f3a0e));if(_0x3f3a0e[_0xa301('0x19')]){if(_0x3f3a0e['error'][_0xa301('0x1a')]===0x1f4){logger[_0xa301('0x19')](_0xa301('0x14'),_0xa9e343,_0x3f3a0e['error'][_0xa301('0x1b')]);return _0x2540e6(_0x3f3a0e[_0xa301('0x19')][_0xa301('0x1b')]);}logger[_0xa301('0x19')](_0xa301('0x14'),_0xa9e343,_0x3f3a0e[_0xa301('0x19')]['message']);return _0x1dc234(_0x3f3a0e['error'][_0xa301('0x1b')]);}else{logger['info'](_0xa301('0x14'),_0xa9e343,_0xa301('0x17'));_0x1dc234(_0x3f3a0e[_0xa301('0x1c')][_0xa301('0x1b')]);}})['catch'](function(_0x13f9ad){logger[_0xa301('0x19')](_0xa301('0x14'),_0xa9e343,_0x13f9ad);_0x2540e6(_0x13f9ad);});});}function respondWithStatusCode(_0x13d941,_0x360deb){_0x360deb=_0x360deb||0xcc;return function(_0x1c3c28){if(_0x1c3c28){return _0x13d941['sendStatus'](_0x360deb);}return _0x13d941[_0xa301('0x1d')](_0x360deb)[_0xa301('0x1e')]();};}function respondWithResult(_0x1a3a89,_0x2efa74){_0x2efa74=_0x2efa74||0xc8;return function(_0xd55d00){if(_0xd55d00){return _0x1a3a89['status'](_0x2efa74)[_0xa301('0x1f')](_0xd55d00);}};}function respondWithFilteredResult(_0x525e30,_0x202242){return function(_0x42dcb6){if(_0x42dcb6){var _0x232a4b=typeof _0x202242[_0xa301('0x20')]===_0xa301('0x21')&&typeof _0x202242[_0xa301('0x22')]===_0xa301('0x21');var _0x375791=_0x42dcb6['count'];var _0x7126b0=_0x232a4b?0x0:_0x202242[_0xa301('0x20')];var _0x232677=_0x232a4b?_0x42dcb6['count']:_0x202242['offset']+_0x202242[_0xa301('0x22')];var _0x46a424;if(_0x232677>=_0x375791){_0x232677=_0x375791;_0x46a424=0xc8;}else{_0x46a424=0xce;}_0x525e30[_0xa301('0x1d')](_0x46a424);return _0x525e30[_0xa301('0x23')](_0xa301('0x24'),_0x7126b0+'-'+_0x232677+'/'+_0x375791)['json'](_0x42dcb6);}return null;};}function saveUpdates(_0x63609d){return function(_0x2864bc){if(_0x2864bc){return _0x2864bc[_0xa301('0x25')](_0x63609d)[_0xa301('0x12')](function(_0x2d25e6){return _0x2d25e6;});}return null;};}function removeEntity(_0x4acd38){return function(_0x520bd3){if(_0x520bd3){return _0x520bd3[_0xa301('0x26')]()['then'](function(){var _0x1318db=_0x520bd3[_0xa301('0x27')]({'plain':!![]});var _0x394357=_0xa301('0x28');return db['UserProfileResource'][_0xa301('0x26')]({'where':{'type':_0x394357,'resourceId':_0x1318db['id']}})[_0xa301('0x12')](function(){return _0x520bd3;});})[_0xa301('0x12')](function(){_0x4acd38[_0xa301('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x222427){return function(_0x186c8a){if(!_0x186c8a){_0x222427[_0xa301('0x29')](0x194);}return _0x186c8a;};}function handleError(_0x3f7e8d,_0x1ead3f){_0x1ead3f=_0x1ead3f||0x1f4;return function(_0x1eda16){logger[_0xa301('0x19')](_0x1eda16['stack']);if(_0x1eda16[_0xa301('0x2a')]){delete _0x1eda16[_0xa301('0x2a')];}_0x3f7e8d[_0xa301('0x1d')](_0x1ead3f)[_0xa301('0x2b')](_0x1eda16);};}function getImapHost(_0x2c7575){switch(_0x2c7575){case _0xa301('0x2c'):return _0xa301('0x2d');case _0xa301('0x2e'):return _0xa301('0x2f');case _0xa301('0x30'):return _0xa301('0x31');case'outlook365':return _0xa301('0x32');}throw new Error(_0xa301('0x33'),_0x2c7575);}function getSmtpHost(_0x395ab1){switch(_0x395ab1){case _0xa301('0x2c'):return _0xa301('0x34');case _0xa301('0x2e'):return _0xa301('0x35');case _0xa301('0x30'):return _0xa301('0x36');case'outlook365':return _0xa301('0x37');}throw new Error(_0xa301('0x33'),_0x395ab1);}function getAuthenticationOptions(_0x3e3361,_0xe6c9d8){var _0x574eb1={};var _0x2c719d={};if(_0x3e3361){_0x574eb1[_0xa301('0x38')]=_0x2c719d[_0xa301('0x38')]=_0xe6c9d8['username'];_0x574eb1[_0xa301('0x39')]=_0x2c719d[_0xa301('0x3a')]=_0xe6c9d8[_0xa301('0x39')];if(_0xe6c9d8['modernAuthentication']){_0x574eb1[_0xa301('0x3b')]=_0x2c719d[_0xa301('0x3b')]=!![];_0x574eb1[_0xa301('0x3c')]=_0x2c719d[_0xa301('0x3c')]=_0xe6c9d8['CloudProviderId'];_0x574eb1[_0xa301('0x39')]=_0x2c719d[_0xa301('0x3a')]=null;}else{_0x574eb1['CloudProviderId']=_0x2c719d[_0xa301('0x3c')]=null;}_0x574eb1[_0xa301('0x3d')]=getImapHost(_0x3e3361);_0x574eb1[_0xa301('0x3e')]=0x3e1;_0x2c719d[_0xa301('0x3d')]=getSmtpHost(_0x3e3361);_0x2c719d[_0xa301('0x3e')]=0x24b;_0x2c719d[_0xa301('0x3f')]=![];_0x574eb1['service']=_0x2c719d[_0xa301('0x40')]=null;}else{if(_0xe6c9d8['authentication']){_0x574eb1[_0xa301('0x38')]=_0x2c719d['user']=_0xe6c9d8[_0xa301('0x41')];_0x574eb1['password']=_0x2c719d[_0xa301('0x3a')]=_0xe6c9d8[_0xa301('0x39')];}else{_0x574eb1[_0xa301('0x42')]=_0x2c719d[_0xa301('0x42')]=![];_0x574eb1['user']=_0x2c719d[_0xa301('0x38')]=null;_0x574eb1[_0xa301('0x39')]=_0x2c719d['pass']=null;}_0x574eb1[_0xa301('0x3d')]=_0xe6c9d8[_0xa301('0x43')][_0xa301('0x3d')];_0x574eb1[_0xa301('0x3e')]=_0xe6c9d8[_0xa301('0x43')][_0xa301('0x3e')];_0x2c719d['host']=_0xe6c9d8[_0xa301('0x44')][_0xa301('0x3d')];_0x2c719d[_0xa301('0x3e')]=_0xe6c9d8[_0xa301('0x44')]['port'];}return{'Imap':_0x574eb1,'Smtp':_0x2c719d};}exports['index']=function(_0xd80068,_0x121925){var _0x25771a={'include':[{'model':db[_0xa301('0x45')],'as':_0xa301('0x43')},{'model':db[_0xa301('0x46')],'as':_0xa301('0x44')},{'model':db[_0xa301('0x47')],'as':_0xa301('0x48')}]},_0xeff0a0={},_0x530104={'count':0x0,'rows':[]};var _0x5de1f3=_[_0xa301('0x49')](db[_0xa301('0x4a')][_0xa301('0x4b')],function(_0x1179a9){return{'name':_0x1179a9[_0xa301('0x4c')],'type':_0x1179a9[_0xa301('0x4d')]['key']};});_0xeff0a0[_0xa301('0x4e')]=_[_0xa301('0x49')](_0x5de1f3,_0xa301('0x2a'));_0xeff0a0[_0xa301('0x4f')]=_[_0xa301('0x50')](_0xd80068['query']);_0xeff0a0[_0xa301('0x51')]=_[_0xa301('0x52')](_0xeff0a0[_0xa301('0x4e')],_0xeff0a0[_0xa301('0x4f')]);_0x25771a['attributes']=_[_0xa301('0x52')](_0xeff0a0[_0xa301('0x4e')],qs[_0xa301('0x53')](_0xd80068[_0xa301('0x4f')][_0xa301('0x53')]));_0x25771a[_0xa301('0x54')]=_0x25771a[_0xa301('0x54')][_0xa301('0x55')]?_0x25771a['attributes']:_0xeff0a0[_0xa301('0x4e')];if(!_0xd80068[_0xa301('0x4f')][_0xa301('0x56')]('nolimit')){_0x25771a[_0xa301('0x22')]=qs[_0xa301('0x22')](_0xd80068[_0xa301('0x4f')]['limit']);_0x25771a[_0xa301('0x20')]=qs[_0xa301('0x20')](_0xd80068['query'][_0xa301('0x20')]);}_0x25771a[_0xa301('0x57')]=qs[_0xa301('0x58')](_0xd80068[_0xa301('0x4f')][_0xa301('0x58')]);_0x25771a[_0xa301('0x59')]=qs[_0xa301('0x51')](_[_0xa301('0x5a')](_0xd80068[_0xa301('0x4f')],_0xeff0a0['filters']),_0x5de1f3);if(_0xd80068[_0xa301('0x4f')][_0xa301('0x5b')]){_0x25771a[_0xa301('0x59')]=_['merge'](_0x25771a[_0xa301('0x59')],{'$or':_[_0xa301('0x49')](_0x5de1f3,function(_0xe439a0){if(_0xe439a0[_0xa301('0x4d')]!=='VIRTUAL'){var _0x4f4b19={};_0x4f4b19[_0xe439a0[_0xa301('0x2a')]]={'$like':'%'+_0xd80068[_0xa301('0x4f')]['filter']+'%'};return _0x4f4b19;}})});}_0x25771a=_[_0xa301('0x5c')]({},_0x25771a,_0xd80068['options']);var _0x1333ab={'where':_0x25771a[_0xa301('0x59')]};return db['MailAccount']['count'](_0x1333ab)[_0xa301('0x12')](function(_0x9e1ae2){_0x530104['count']=_0x9e1ae2;if(_0xd80068[_0xa301('0x4f')]['includeAll']){_0x25771a['include']=[{'all':!![]}];}return db[_0xa301('0x4a')][_0xa301('0x5d')](_0x25771a);})['then'](function(_0x59b1fc){_0x530104[_0xa301('0x5e')]=_0x59b1fc;return _0x530104;})[_0xa301('0x12')](respondWithFilteredResult(_0x121925,_0x25771a))[_0xa301('0x5f')](handleError(_0x121925,null));};exports[_0xa301('0x60')]=function(_0x55f5a8,_0x438a19){var _0x418591={'raw':![],'where':{'id':_0x55f5a8[_0xa301('0x61')]['id']},'include':[{'model':db[_0xa301('0x45')],'as':_0xa301('0x43')},{'model':db[_0xa301('0x46')],'as':_0xa301('0x44')},{'model':db[_0xa301('0x47')],'as':_0xa301('0x48')}]},_0x397fbb={};_0x397fbb[_0xa301('0x4e')]=_[_0xa301('0x50')](db[_0xa301('0x4a')][_0xa301('0x4b')]);_0x397fbb['query']=_[_0xa301('0x50')](_0x55f5a8[_0xa301('0x4f')]);_0x397fbb[_0xa301('0x51')]=_[_0xa301('0x52')](_0x397fbb['model'],_0x397fbb[_0xa301('0x4f')]);_0x418591[_0xa301('0x54')]=_['intersection'](_0x397fbb[_0xa301('0x4e')],qs['fields'](_0x55f5a8[_0xa301('0x4f')][_0xa301('0x53')]));_0x418591['attributes']=_0x418591[_0xa301('0x54')][_0xa301('0x55')]?_0x418591[_0xa301('0x54')]:_0x397fbb['model'];if(_0x55f5a8[_0xa301('0x4f')][_0xa301('0x62')]){_0x418591[_0xa301('0x63')]=[{'all':!![]}];}_0x418591=_[_0xa301('0x5c')]({},_0x418591,_0x55f5a8['options']);return db[_0xa301('0x4a')][_0xa301('0x64')](_0x418591)[_0xa301('0x12')](handleEntityNotFound(_0x438a19,null))[_0xa301('0x12')](respondWithResult(_0x438a19,null))[_0xa301('0x5f')](handleError(_0x438a19,null));};exports[_0xa301('0x25')]=function(_0x3a2ccd,_0xf6161){if(_0x3a2ccd[_0xa301('0x65')]['id']){delete _0x3a2ccd[_0xa301('0x65')]['id'];}var _0x1df33c=_0x3a2ccd['body']['provider']===_0xa301('0x66')?null:_0x3a2ccd[_0xa301('0x65')][_0xa301('0x67')];var _0x2c9e4e=_0x3a2ccd[_0xa301('0x65')]['Imap']||{};var _0x1872af=_0x3a2ccd[_0xa301('0x65')][_0xa301('0x44')]||{};if(_0x1df33c){_0x2c9e4e[_0xa301('0x3d')]=getImapHost(_0x1df33c);_0x2c9e4e[_0xa301('0x3e')]=0x3e1;_0x1872af['host']=getSmtpHost(_0x1df33c);_0x1872af['port']=0x24b;_0x1872af[_0xa301('0x3f')]=![];}if(_0x1872af[_0xa301('0x3b')]){_0x1872af[_0xa301('0x3f')]=![];}else{_0x1872af[_0xa301('0x3c')]=null;}if(!_0x2c9e4e[_0xa301('0x3b')])_0x2c9e4e[_0xa301('0x3c')]=null;_0x3a2ccd[_0xa301('0x65')][_0xa301('0x43')]=_0x2c9e4e;_0x3a2ccd[_0xa301('0x65')]['Smtp']=_0x1872af;return db[_0xa301('0x4a')][_0xa301('0x64')]({'where':{'id':_0x3a2ccd[_0xa301('0x61')]['id']},'include':[{'model':db[_0xa301('0x45')],'as':_0xa301('0x43')},{'model':db[_0xa301('0x46')],'as':_0xa301('0x44')},{'model':db['Pause'],'as':_0xa301('0x48')}]})[_0xa301('0x12')](handleEntityNotFound(_0xf6161,null))[_0xa301('0x12')](function(_0x126a30){if(!_0x126a30)throw new Error(_0xa301('0x68'));if(_0x126a30['service'])delete _0x3a2ccd[_0xa301('0x65')][_0xa301('0x43')];return _0x126a30;})[_0xa301('0x12')](saveUpdates(_0x3a2ccd['body'],null))[_0xa301('0x12')](function(_0x53429d){if(!_0x3a2ccd[_0xa301('0x65')][_0xa301('0x43')])return _0x53429d;return db['MailServerIn'][_0xa301('0x25')](_0x3a2ccd[_0xa301('0x65')][_0xa301('0x43')],{'where':{'MailAccountId':_0x53429d['id']}})['then'](function(){return _0x53429d;});})[_0xa301('0x12')](function(_0x30024f){if(!_0x3a2ccd['body']['Smtp'])return _0x30024f;return db[_0xa301('0x46')]['update'](_0x3a2ccd[_0xa301('0x65')]['Smtp'],{'where':{'MailAccountId':_0x30024f['id']}})[_0xa301('0x12')](function(){return _0x30024f;});})['then'](respondWithResult(_0xf6161,null))[_0xa301('0x5f')](handleError(_0xf6161,null));};exports[_0xa301('0x69')]=function(_0x5635d7,_0x255c0d){return db[_0xa301('0x4a')][_0xa301('0x69')]()[_0xa301('0x12')](respondWithResult(_0x255c0d,null))['catch'](handleError(_0x255c0d,null));};exports[_0xa301('0x6a')]=function(_0x322b9e,_0x1244be){if(_0x322b9e['body']['id']){delete _0x322b9e[_0xa301('0x65')]['id'];}return db[_0xa301('0x4a')]['find']({'where':{'id':_0x322b9e[_0xa301('0x61')]['id']}})['then'](handleEntityNotFound(_0x1244be,null))[_0xa301('0x12')](function(_0x31bc9b){if(_0x31bc9b){_0x322b9e['body']['MailAccountId']=_0x31bc9b['id'];return db[_0xa301('0x6b')][_0xa301('0x6c')](_0x322b9e[_0xa301('0x65')]);}})[_0xa301('0x12')](respondWithResult(_0x1244be,null))['catch'](handleError(_0x1244be,null));};exports[_0xa301('0x6d')]=function(_0x2f8682,_0x22cd2c){var _0x169fea={'raw':![],'where':{}};var _0x56bcd8={};var _0x2e7a7f={'count':0x0,'rows':[]};return db[_0xa301('0x4a')][_0xa301('0x6e')]({'where':{'id':_0x2f8682[_0xa301('0x61')]['id']}})[_0xa301('0x12')](handleEntityNotFound(_0x22cd2c,null))[_0xa301('0x12')](function(_0x5197b8){if(_0x5197b8){_0x56bcd8['model']=_[_0xa301('0x50')](db[_0xa301('0x6b')][_0xa301('0x4b')]);_0x56bcd8[_0xa301('0x4f')]=_[_0xa301('0x50')](_0x2f8682['query']);_0x56bcd8[_0xa301('0x51')]=_[_0xa301('0x52')](_0x56bcd8[_0xa301('0x4e')],_0x56bcd8[_0xa301('0x4f')]);_0x169fea[_0xa301('0x54')]=_[_0xa301('0x52')](_0x56bcd8[_0xa301('0x4e')],qs['fields'](_0x2f8682[_0xa301('0x4f')]['fields']));_0x169fea[_0xa301('0x54')]=_0x169fea[_0xa301('0x54')][_0xa301('0x55')]?_0x169fea[_0xa301('0x54')]:_0x56bcd8[_0xa301('0x4e')];if(!_0x2f8682[_0xa301('0x4f')][_0xa301('0x56')](_0xa301('0x6f'))){_0x169fea[_0xa301('0x22')]=qs[_0xa301('0x22')](_0x2f8682[_0xa301('0x4f')][_0xa301('0x22')]);_0x169fea['offset']=qs[_0xa301('0x20')](_0x2f8682['query'][_0xa301('0x20')]);}_0x169fea[_0xa301('0x57')]=qs[_0xa301('0x58')](_0x2f8682[_0xa301('0x4f')][_0xa301('0x58')]);_0x169fea[_0xa301('0x59')]=qs[_0xa301('0x51')](_['pick'](_0x2f8682[_0xa301('0x4f')],_0x56bcd8[_0xa301('0x51')]));_0x169fea[_0xa301('0x59')]['MailAccountId']=_0x5197b8['id'];if(_0x2f8682['query'][_0xa301('0x5b')]){_0x169fea[_0xa301('0x59')]=_[_0xa301('0x5c')](_0x169fea[_0xa301('0x59')],{'$or':_[_0xa301('0x49')](_0x169fea[_0xa301('0x54')],function(_0x869906){var _0x2904e9={};_0x2904e9[_0x869906]={'$like':'%'+_0x2f8682['query']['filter']+'%'};return _0x2904e9;})});}_0x169fea=_[_0xa301('0x5c')]({},_0x169fea,_0x2f8682[_0xa301('0x70')]);return db['Disposition'][_0xa301('0x71')]({'where':_0x169fea[_0xa301('0x59')]})['then'](function(_0x47ffa7){_0x2e7a7f[_0xa301('0x71')]=_0x47ffa7;if(_0x2f8682[_0xa301('0x4f')][_0xa301('0x62')]){_0x169fea[_0xa301('0x63')]=[{'all':!![]}];}return db[_0xa301('0x6b')][_0xa301('0x5d')](_0x169fea);})['then'](function(_0x22de5f){_0x2e7a7f[_0xa301('0x5e')]=_0x22de5f;return _0x2e7a7f;});}})[_0xa301('0x12')](respondWithFilteredResult(_0x22cd2c,_0x169fea))['catch'](handleError(_0x22cd2c,null));};exports[_0xa301('0x72')]=function(_0xefd63,_0x31b9ec){return db[_0xa301('0x4a')]['find']({'where':{'id':_0xefd63[_0xa301('0x61')]['id']}})[_0xa301('0x12')](handleEntityNotFound(_0x31b9ec,null))[_0xa301('0x12')](function(_0x65d54d){if(_0x65d54d){return _0x65d54d[_0xa301('0x72')](_0xefd63[_0xa301('0x4f')][_0xa301('0x73')]);}})[_0xa301('0x12')](respondWithStatusCode(_0x31b9ec,null))[_0xa301('0x5f')](handleError(_0x31b9ec,null));};exports[_0xa301('0x74')]=function(_0x4c2d45,_0x334220){if(_0x4c2d45['body']['id']){delete _0x4c2d45[_0xa301('0x65')]['id'];}return db[_0xa301('0x4a')][_0xa301('0x64')]({'where':{'id':_0x4c2d45[_0xa301('0x61')]['id']}})[_0xa301('0x12')](handleEntityNotFound(_0x334220,null))[_0xa301('0x12')](function(_0x14ffb5){if(_0x14ffb5){_0x4c2d45[_0xa301('0x65')][_0xa301('0x75')]=_0x14ffb5['id'];return db['CannedAnswer'][_0xa301('0x6c')](_0x4c2d45[_0xa301('0x65')]);}})['then'](respondWithResult(_0x334220,null))[_0xa301('0x5f')](handleError(_0x334220,null));};exports[_0xa301('0x76')]=function(_0x2c71ba,_0x43698b){var _0x51bbc9={'raw':![],'where':{}};var _0x32ac20={};var _0x44d540={'count':0x0,'rows':[]};return db['MailAccount'][_0xa301('0x6e')]({'where':{'id':_0x2c71ba['params']['id']}})[_0xa301('0x12')](handleEntityNotFound(_0x43698b,null))[_0xa301('0x12')](function(_0x49594c){if(_0x49594c){_0x32ac20['model']=_[_0xa301('0x50')](db[_0xa301('0x77')]['rawAttributes']);_0x32ac20[_0xa301('0x4f')]=_[_0xa301('0x50')](_0x2c71ba[_0xa301('0x4f')]);_0x32ac20[_0xa301('0x51')]=_['intersection'](_0x32ac20[_0xa301('0x4e')],_0x32ac20['query']);_0x51bbc9[_0xa301('0x54')]=_[_0xa301('0x52')](_0x32ac20[_0xa301('0x4e')],qs[_0xa301('0x53')](_0x2c71ba[_0xa301('0x4f')][_0xa301('0x53')]));_0x51bbc9[_0xa301('0x54')]=_0x51bbc9['attributes'][_0xa301('0x55')]?_0x51bbc9['attributes']:_0x32ac20[_0xa301('0x4e')];if(!_0x2c71ba[_0xa301('0x4f')]['hasOwnProperty'](_0xa301('0x6f'))){_0x51bbc9[_0xa301('0x22')]=qs[_0xa301('0x22')](_0x2c71ba[_0xa301('0x4f')][_0xa301('0x22')]);_0x51bbc9[_0xa301('0x20')]=qs[_0xa301('0x20')](_0x2c71ba[_0xa301('0x4f')][_0xa301('0x20')]);}_0x51bbc9['order']=qs[_0xa301('0x58')](_0x2c71ba['query'][_0xa301('0x58')]);_0x51bbc9[_0xa301('0x59')]=qs[_0xa301('0x51')](_['pick'](_0x2c71ba[_0xa301('0x4f')],_0x32ac20[_0xa301('0x51')]));_0x51bbc9[_0xa301('0x59')][_0xa301('0x75')]=_0x49594c['id'];if(_0x2c71ba[_0xa301('0x4f')][_0xa301('0x5b')]){_0x51bbc9[_0xa301('0x59')]=_[_0xa301('0x5c')](_0x51bbc9[_0xa301('0x59')],{'$or':_[_0xa301('0x49')](_0x51bbc9['attributes'],function(_0x55a22d){var _0x4661df={};_0x4661df[_0x55a22d]={'$like':'%'+_0x2c71ba[_0xa301('0x4f')][_0xa301('0x5b')]+'%'};return _0x4661df;})});}_0x51bbc9=_['merge']({},_0x51bbc9,_0x2c71ba[_0xa301('0x70')]);return db['CannedAnswer'][_0xa301('0x71')]({'where':_0x51bbc9[_0xa301('0x59')]})['then'](function(_0x9004f5){_0x44d540[_0xa301('0x71')]=_0x9004f5;if(_0x2c71ba[_0xa301('0x4f')]['includeAll']){_0x51bbc9[_0xa301('0x63')]=[{'all':!![]}];}return db[_0xa301('0x77')][_0xa301('0x5d')](_0x51bbc9);})[_0xa301('0x12')](function(_0x537da2){_0x44d540[_0xa301('0x5e')]=_0x537da2;return _0x44d540;});}})[_0xa301('0x12')](respondWithFilteredResult(_0x43698b,_0x51bbc9))[_0xa301('0x5f')](handleError(_0x43698b,null));};exports['removeAnswers']=function(_0x12795d,_0x29543c){return db[_0xa301('0x4a')][_0xa301('0x64')]({'where':{'id':_0x12795d[_0xa301('0x61')]['id']}})[_0xa301('0x12')](handleEntityNotFound(_0x29543c,null))[_0xa301('0x12')](function(_0x35cf84){if(_0x35cf84){return _0x35cf84['removeAnswers'](_0x12795d[_0xa301('0x4f')][_0xa301('0x73')]);}})[_0xa301('0x12')](respondWithStatusCode(_0x29543c,null))[_0xa301('0x5f')](handleError(_0x29543c,null));};exports[_0xa301('0x6c')]=function(_0x7450ae,_0x3939f6){var _0x3bcb85={'name':_0x7450ae[_0xa301('0x65')]['name'],'key':_0x7450ae['body'][_0xa301('0x78')],'provider':_0x7450ae[_0xa301('0x65')][_0xa301('0x67')]==='custom'?null:_0x7450ae[_0xa301('0x65')][_0xa301('0x67')],'email':_0x7450ae[_0xa301('0x65')][_0xa301('0x79')],'ListId':_0x7450ae['body'][_0xa301('0x7a')],'active':!_[_0xa301('0x7b')](_0x7450ae[_0xa301('0x65')]['active'])?_0x7450ae[_0xa301('0x65')][_0xa301('0x7c')]:!![],'description':_0x7450ae[_0xa301('0x65')][_0xa301('0x7d')]||null};var _0x5d0c9c=getAuthenticationOptions(_0x3bcb85[_0xa301('0x67')],_0x7450ae[_0xa301('0x65')]);_0x3bcb85['Imap']=_0x5d0c9c['Imap'];_0x3bcb85[_0xa301('0x44')]=_0x5d0c9c['Smtp'];return db['MailAccount'][_0xa301('0x6c')](_0x3bcb85,{'include':[{'model':db['MailServerOut'],'as':_0xa301('0x44')},{'model':db['MailServerIn'],'as':_0xa301('0x43')}]})[_0xa301('0x12')](function(_0x12d695){var _0x35b755=_0x7450ae[_0xa301('0x38')]['get']({'plain':!![]});if(!_0x35b755)throw new Error(_0xa301('0x7e'));if(_0x35b755[_0xa301('0x7f')]==='user'){var _0x32b539=_0x12d695[_0xa301('0x27')]({'plain':!![]});return db['UserProfileSection'][_0xa301('0x64')]({'where':{'name':_0xa301('0x28'),'userProfileId':_0x35b755[_0xa301('0x80')]},'raw':!![]})['then'](function(_0x38c6ac){if(_0x38c6ac&&_0x38c6ac[_0xa301('0x81')]===0x0){return db[_0xa301('0x82')][_0xa301('0x6c')]({'name':_0x32b539[_0xa301('0x2a')],'resourceId':_0x32b539['id'],'type':_0x38c6ac[_0xa301('0x2a')],'sectionId':_0x38c6ac['id']},{})[_0xa301('0x12')](function(){return _0x12d695;});}else{return _0x12d695;}})[_0xa301('0x5f')](function(_0x5ae6c0){logger[_0xa301('0x19')](_0xa301('0x83'),_0x5ae6c0);throw _0x5ae6c0;});}return _0x12d695;})[_0xa301('0x12')](respondWithResult(_0x3939f6,0xc9))['catch'](handleError(_0x3939f6,null));};exports['getImap']=function(_0x5311bc,_0x45ab45){return db['MailAccount'][_0xa301('0x6e')]({'where':{'id':_0x5311bc[_0xa301('0x61')]['id']}})[_0xa301('0x12')](handleEntityNotFound(_0x45ab45,null))[_0xa301('0x12')](function(_0x425a51){if(_0x425a51){return _0x425a51['getImap']();}return null;})[_0xa301('0x12')](respondWithResult(_0x45ab45,null))[_0xa301('0x5f')](handleError(_0x45ab45,null));};exports['addImap']=function(_0x433463,_0x3887d8){if(_0x433463[_0xa301('0x65')]['id']){delete _0x433463[_0xa301('0x65')]['id'];}return db[_0xa301('0x4a')][_0xa301('0x64')]({'where':{'id':_0x433463[_0xa301('0x61')]['id']}})[_0xa301('0x12')](handleEntityNotFound(_0x3887d8,null))[_0xa301('0x12')](function(_0x556939){if(_0x556939){_0x433463['body'][_0xa301('0x75')]=_0x556939['id'];return db[_0xa301('0x45')][_0xa301('0x6c')](_0x433463[_0xa301('0x65')]);}})[_0xa301('0x12')](respondWithResult(_0x3887d8,null))[_0xa301('0x5f')](handleError(_0x3887d8,null));};exports[_0xa301('0x84')]=function(_0x328419,_0x3818c5){return db[_0xa301('0x4a')][_0xa301('0x6e')]({'where':{'id':_0x328419[_0xa301('0x61')]['id']}})['then'](handleEntityNotFound(_0x3818c5,null))[_0xa301('0x12')](function(_0x3d074c){if(_0x3d074c){return _0x3d074c[_0xa301('0x85')](null);}return null;})[_0xa301('0x12')](respondWithStatusCode(_0x3818c5,null))[_0xa301('0x5f')](handleError(_0x3818c5,null));};exports['getSmtp']=function(_0x4972fe,_0x56fe04){return db['MailAccount']['findOne']({'where':{'id':_0x4972fe['params']['id']}})[_0xa301('0x12')](handleEntityNotFound(_0x56fe04,null))[_0xa301('0x12')](function(_0x1aa241){if(_0x1aa241){return _0x1aa241[_0xa301('0x86')]();}return null;})[_0xa301('0x12')](respondWithResult(_0x56fe04,null))['catch'](handleError(_0x56fe04,null));};exports[_0xa301('0x87')]=function(_0x318ef2,_0x394891){if(_0x318ef2['body']['id']){delete _0x318ef2[_0xa301('0x65')]['id'];}return db[_0xa301('0x4a')][_0xa301('0x64')]({'where':{'id':_0x318ef2['params']['id']}})['then'](handleEntityNotFound(_0x394891,null))[_0xa301('0x12')](function(_0x3f3b50){if(_0x3f3b50){_0x318ef2['body'][_0xa301('0x75')]=_0x3f3b50['id'];return db[_0xa301('0x46')][_0xa301('0x6c')](_0x318ef2['body']);}})[_0xa301('0x12')](respondWithResult(_0x394891,null))[_0xa301('0x5f')](handleError(_0x394891,null));};exports['removeSmtp']=function(_0x133994,_0xa3a69b){return db[_0xa301('0x4a')][_0xa301('0x6e')]({'where':{'id':_0x133994[_0xa301('0x61')]['id']}})['then'](handleEntityNotFound(_0xa3a69b,null))[_0xa301('0x12')](function(_0x24b7c2){if(_0x24b7c2){return _0x24b7c2[_0xa301('0x88')](null);}return null;})[_0xa301('0x12')](respondWithStatusCode(_0xa3a69b,null))[_0xa301('0x5f')](handleError(_0xa3a69b,null));};exports[_0xa301('0x89')]=function(_0x3eed4a,_0xc6d95e){return db[_0xa301('0x8a')]['find']({'where':{'id':_0x3eed4a[_0xa301('0x61')]['id']}})[_0xa301('0x12')](handleEntityNotFound(_0xc6d95e,null))[_0xa301('0x12')](function(_0x16568a){if(_0x16568a){return _0x16568a[_0xa301('0x89')](_0x3eed4a[_0xa301('0x65')][_0xa301('0x73')],_[_0xa301('0x8b')](_0x3eed4a['body'],['ids','id'])||{});}})[_0xa301('0x12')](respondWithResult(_0xc6d95e,null))[_0xa301('0x5f')](handleError(_0xc6d95e,null));};exports['getInteractions']=function(_0x4f02f6,_0x3f2adb){var _0x21eeb2={'raw':![],'where':{}};var _0x293805={};var _0x58039b={'count':0x0,'rows':[]};return db['MailAccount'][_0xa301('0x6e')]({'where':{'id':_0x4f02f6[_0xa301('0x61')]['id']}})[_0xa301('0x12')](handleEntityNotFound(_0x3f2adb,null))[_0xa301('0x12')](function(_0xb0f009){if(_0xb0f009){_0x293805[_0xa301('0x4e')]=_[_0xa301('0x50')](db[_0xa301('0x8a')][_0xa301('0x4b')]);_0x293805[_0xa301('0x4f')]=_[_0xa301('0x50')](_0x4f02f6[_0xa301('0x4f')]);_0x293805[_0xa301('0x51')]=_['intersection'](_0x293805[_0xa301('0x4e')],_0x293805[_0xa301('0x4f')]);_0x21eeb2[_0xa301('0x54')]=_[_0xa301('0x52')](_0x293805[_0xa301('0x4e')],qs['fields'](_0x4f02f6[_0xa301('0x4f')][_0xa301('0x53')]));_0x21eeb2[_0xa301('0x54')]=_0x21eeb2[_0xa301('0x54')][_0xa301('0x55')]?_0x21eeb2['attributes']:_0x293805[_0xa301('0x4e')];if(!_0x4f02f6[_0xa301('0x4f')]['hasOwnProperty'](_0xa301('0x6f'))){_0x21eeb2[_0xa301('0x22')]=qs[_0xa301('0x22')](_0x4f02f6[_0xa301('0x4f')][_0xa301('0x22')]);_0x21eeb2['offset']=qs[_0xa301('0x20')](_0x4f02f6[_0xa301('0x4f')]['offset']);}_0x21eeb2[_0xa301('0x57')]=qs[_0xa301('0x58')](_0x4f02f6['query'][_0xa301('0x58')]);_0x21eeb2[_0xa301('0x59')]=qs[_0xa301('0x51')](_['pick'](_0x4f02f6[_0xa301('0x4f')],_0x293805[_0xa301('0x51')]));_0x21eeb2[_0xa301('0x59')][_0xa301('0x75')]=_0xb0f009['id'];if(_0x4f02f6[_0xa301('0x4f')][_0xa301('0x5b')]){_0x21eeb2[_0xa301('0x59')]=_[_0xa301('0x5c')](_0x21eeb2[_0xa301('0x59')],{'$or':_[_0xa301('0x49')](_0x21eeb2['attributes'],function(_0x14d869){var _0xde72bb={};_0xde72bb[_0x14d869]={'$like':'%'+_0x4f02f6[_0xa301('0x4f')][_0xa301('0x5b')]+'%'};return _0xde72bb;})});}_0x21eeb2=_[_0xa301('0x5c')]({},_0x21eeb2,_0x4f02f6[_0xa301('0x70')]);return db[_0xa301('0x8a')]['count']({'where':_0x21eeb2['where']})[_0xa301('0x12')](function(_0x109e09){_0x58039b[_0xa301('0x71')]=_0x109e09;if(_0x4f02f6[_0xa301('0x4f')][_0xa301('0x62')]){_0x21eeb2['include']=[{'model':db['CmContact'],'as':_0xa301('0x8c'),'required':![]},{'model':db[_0xa301('0x8d')],'as':_0xa301('0x8e'),'attributes':[_0xa301('0x2a'),'fullname',_0xa301('0x8f')],'required':![]},{'model':db[_0xa301('0x90')],'as':_0xa301('0x91'),'attributes':['id',_0xa301('0x2a'),_0xa301('0x92')],'where':_0x4f02f6[_0xa301('0x4f')][_0xa301('0x93')]?{'id':_0x4f02f6[_0xa301('0x4f')][_0xa301('0x93')]}:undefined,'required':_0x4f02f6[_0xa301('0x4f')][_0xa301('0x93')]?!![]:![]}];}return db[_0xa301('0x8a')][_0xa301('0x5d')](_0x21eeb2);})[_0xa301('0x12')](function(_0x887bb0){_0x58039b[_0xa301('0x5e')]=_0x887bb0;return _0x58039b;});}})[_0xa301('0x12')](respondWithFilteredResult(_0x3f2adb,_0x21eeb2))['catch'](handleError(_0x3f2adb,null));};exports[_0xa301('0x94')]=function addApplications(_0x2c7949,_0x668899){var _0x51864e=_0x2c7949[_0xa301('0x61')]['id'];var _0x43e4df=_0x2c7949['body'];var _0x34abd9=0xc8;var _0x26ded8=null;return db['sequelize'][_0xa301('0x95')]({'isolationLevel':db[_0xa301('0x96')]['Transaction'][_0xa301('0x97')][_0xa301('0x98')]},function(_0x2c2365){return db[_0xa301('0x4a')][_0xa301('0x6e')]({'where':{'id':_0x51864e},'transaction':_0x2c2365})[_0xa301('0x12')](function(_0x3aa025){if(_0x3aa025){return db[_0xa301('0x99')][_0xa301('0x26')]({'where':{'MailAccountId':_0x51864e},'transaction':_0x2c2365})[_0xa301('0x12')](function(){var _0x541c7b=_[_0xa301('0x49')](_0x43e4df,function(_0x36b6c3){_0x36b6c3['MailAccountId']=_0x51864e;return _0x36b6c3;});return db['MailApplication'][_0xa301('0x9a')](_0x541c7b,{'transaction':_0x2c2365});});}else{_0x34abd9=0x194;_0x26ded8=[];}});})[_0xa301('0x12')](function(){if(_0x34abd9!==0x194){return db[_0xa301('0x99')]['findAndCountAll']({'where':{'MailAccountId':_0x51864e},'order':_0xa301('0x9b')})[_0xa301('0x12')](function(_0x402ae5){_0x26ded8=_0x402ae5;});}})[_0xa301('0x5f')](function(_0x20c263){_0x34abd9=0x1f4;logger[_0xa301('0x19')](_0x20c263['stack']);if(_0x20c263[_0xa301('0x2a')]){delete _0x20c263[_0xa301('0x2a')];}_0x26ded8=_0x20c263;})['finally'](function(){if(_0x26ded8===null){_0x668899[_0xa301('0x29')](_0x34abd9);}else{if(_0x34abd9===0x1f4){_0x668899[_0xa301('0x1d')](_0x34abd9)[_0xa301('0x2b')](_0x26ded8);}else{_0x668899[_0xa301('0x1d')](_0x34abd9)['json'](_0x26ded8);}}});};exports[_0xa301('0x9c')]=function(_0x50c4ff,_0x346b6b){var _0x2fac40={};var _0x2f6d30={};var _0x870203;var _0x4519f1;return db[_0xa301('0x4a')]['findOne']({'where':{'id':_0x50c4ff['params']['id']}})[_0xa301('0x12')](handleEntityNotFound(_0x346b6b,null))['then'](function(_0x218aa1){if(_0x218aa1){_0x870203=_0x218aa1;_0x2f6d30['model']=_[_0xa301('0x50')](db[_0xa301('0x99')][_0xa301('0x4b')]);_0x2f6d30[_0xa301('0x4f')]=_[_0xa301('0x50')](_0x50c4ff[_0xa301('0x4f')]);_0x2f6d30['filters']=_[_0xa301('0x52')](_0x2f6d30['model'],_0x2f6d30[_0xa301('0x4f')]);_0x2fac40[_0xa301('0x54')]=_[_0xa301('0x52')](_0x2f6d30[_0xa301('0x4e')],qs[_0xa301('0x53')](_0x50c4ff[_0xa301('0x4f')][_0xa301('0x53')]));_0x2fac40[_0xa301('0x54')]=_0x2fac40[_0xa301('0x54')]['length']?_0x2fac40[_0xa301('0x54')]:_0x2f6d30['model'];_0x2fac40[_0xa301('0x57')]=qs['sort'](_0x50c4ff['query']['sort']);_0x2fac40['where']=qs[_0xa301('0x51')](_['pick'](_0x50c4ff[_0xa301('0x4f')],_0x2f6d30[_0xa301('0x51')]));if(_0x50c4ff[_0xa301('0x4f')][_0xa301('0x5b')]){_0x2fac40[_0xa301('0x59')]=_[_0xa301('0x5c')](_0x2fac40[_0xa301('0x59')],{'$or':_['map'](_0x2fac40[_0xa301('0x54')],function(_0x530b7b){var _0x26e9fc={};_0x26e9fc[_0x530b7b]={'$like':'%'+_0x50c4ff[_0xa301('0x4f')]['filter']+'%'};return _0x26e9fc;})});}_0x2fac40=_[_0xa301('0x5c')]({},_0x2fac40,_0x50c4ff[_0xa301('0x70')]);return _0x870203[_0xa301('0x9c')](_0x2fac40);}})[_0xa301('0x12')](function(_0x557c85){if(_0x557c85){_0x4519f1=_0x557c85[_0xa301('0x55')];if(!_0x50c4ff[_0xa301('0x4f')][_0xa301('0x56')](_0xa301('0x6f'))){_0x2fac40[_0xa301('0x22')]=qs[_0xa301('0x22')](_0x50c4ff[_0xa301('0x4f')][_0xa301('0x22')]);_0x2fac40[_0xa301('0x20')]=qs[_0xa301('0x20')](_0x50c4ff[_0xa301('0x4f')][_0xa301('0x20')]);}return _0x870203[_0xa301('0x9c')](_0x2fac40);}})[_0xa301('0x12')](function(_0x55a255){if(_0x55a255){return _0x55a255?{'count':_0x4519f1,'rows':_0x55a255}:null;}})['then'](respondWithResult(_0x346b6b,null))[_0xa301('0x5f')](handleError(_0x346b6b,null));};exports[_0xa301('0x9d')]=function(_0x3f2984,_0x4fe4fd){var _0x5d5681={'raw':!![],'where':{}};var _0xf0a896={};var _0x159e26={'count':0x0,'rows':[]};return db[_0xa301('0x4a')]['findOne']({'where':{'id':_0x3f2984['params']['id']}})[_0xa301('0x12')](handleEntityNotFound(_0x4fe4fd,null))[_0xa301('0x12')](function(_0x334fad){if(_0x334fad){_0xf0a896['model']=_[_0xa301('0x50')](db['MailMessage']['rawAttributes']);_0xf0a896[_0xa301('0x4f')]=_[_0xa301('0x50')](_0x3f2984[_0xa301('0x4f')]);_0xf0a896['filters']=_[_0xa301('0x52')](_0xf0a896[_0xa301('0x4e')],_0xf0a896[_0xa301('0x4f')]);_0x5d5681[_0xa301('0x54')]=_[_0xa301('0x52')](_0xf0a896[_0xa301('0x4e')],qs['fields'](_0x3f2984[_0xa301('0x4f')][_0xa301('0x53')]));_0x5d5681['attributes']=_0x5d5681[_0xa301('0x54')][_0xa301('0x55')]?_0x5d5681[_0xa301('0x54')]:_0xf0a896['model'];if(!_0x3f2984[_0xa301('0x4f')][_0xa301('0x56')]('nolimit')){_0x5d5681[_0xa301('0x22')]=qs[_0xa301('0x22')](_0x3f2984[_0xa301('0x4f')][_0xa301('0x22')]);_0x5d5681[_0xa301('0x20')]=qs['offset'](_0x3f2984[_0xa301('0x4f')][_0xa301('0x20')]);}_0x5d5681[_0xa301('0x57')]=qs[_0xa301('0x58')](_0x3f2984[_0xa301('0x4f')]['sort']);_0x5d5681[_0xa301('0x59')]=qs[_0xa301('0x51')](_[_0xa301('0x5a')](_0x3f2984[_0xa301('0x4f')],_0xf0a896[_0xa301('0x51')]));_0x5d5681['where'][_0xa301('0x75')]=_0x334fad['id'];if(_0x3f2984[_0xa301('0x4f')]['filter']){_0x5d5681[_0xa301('0x59')]=_[_0xa301('0x5c')](_0x5d5681[_0xa301('0x59')],{'$or':_[_0xa301('0x49')](_0x5d5681[_0xa301('0x54')],function(_0x38388a){var _0x4d10b6={};_0x4d10b6[_0x38388a]={'$like':'%'+_0x3f2984[_0xa301('0x4f')]['filter']+'%'};return _0x4d10b6;})});}if(_0x3f2984[_0xa301('0x4f')]['$gte']){var _0x25d52a=_0x3f2984[_0xa301('0x4f')][_0xa301('0x9e')]['split'](',');var _0x5c318c={};_0x5c318c[_0x25d52a[0x0]]={'$gte':moment(_0x25d52a[0x1])['format']('YYYY-MM-DD\x20HH:mm:ss')};_0x5d5681[_0xa301('0x59')]=_[_0xa301('0x5c')](_0x5d5681[_0xa301('0x59')],_0x5c318c);}_0x5d5681=_[_0xa301('0x5c')]({},_0x5d5681,_0x3f2984['options']);return db[_0xa301('0x9f')][_0xa301('0x71')]({'where':_0x5d5681[_0xa301('0x59')]})[_0xa301('0x12')](function(_0x1ab3d6){_0x159e26[_0xa301('0x71')]=_0x1ab3d6;if(_0x3f2984[_0xa301('0x4f')][_0xa301('0x62')]){_0x5d5681[_0xa301('0x63')]=[{'all':!![]}];}return db['MailMessage'][_0xa301('0x5d')](_0x5d5681);})[_0xa301('0x12')](function(_0xb754fa){if(_0x3f2984[_0xa301('0x4f')][_0xa301('0xa0')]===_0xa301('0xa1')){for(var _0x238539=0x0;_0x238539<_0xb754fa[_0xa301('0x55')];_0x238539++){_0xb754fa[_0x238539][_0xa301('0x65')]=juice(_0xb754fa[_0x238539][_0xa301('0x65')]);}}_0x159e26[_0xa301('0x5e')]=_0xb754fa;return _0x159e26;});}})[_0xa301('0x12')](respondWithFilteredResult(_0x4fe4fd,_0x5d5681))[_0xa301('0x5f')](handleError(_0x4fe4fd,null));};exports['send']=function(_0x4a361e,_0x561126){var _0x14cddf,_0x433141={},_0xa27fd7;if(_0x4a361e[_0xa301('0x65')]['to']){_0xa27fd7=_0x4a361e[_0xa301('0x65')]['to']['split'](',')[0x0];}return db['MailAccount'][_0xa301('0x64')]({'where':{'id':_0x4a361e['params']['id']},'include':[{'model':db['CmList'],'as':_0xa301('0xa2'),'include':[{'model':db[_0xa301('0xa3')],'as':'Contacts','where':{'email':_0xa27fd7},'limit':0x1,'order':[[_0xa301('0xa4'),_0xa301('0xa5')]]}]},{'model':db[_0xa301('0x46')],'as':_0xa301('0x44'),'raw':!![],'include':[{'model':db[_0xa301('0xa6')],'as':'CloudProvider','raw':!![]}]}]})[_0xa301('0x12')](handleEntityNotFound(_0x561126,null))[_0xa301('0x12')](function(_0x4cd7ab){if(!_0x4cd7ab)return;_0x14cddf=_0x4cd7ab;if(!_0x4cd7ab[_0xa301('0x44')])throw new Error(_0xa301('0xa7'));if(_[_0xa301('0x7b')](_0x4a361e[_0xa301('0x65')][_0xa301('0xa8')])){_0x4a361e[_0xa301('0x65')][_0xa301('0xa8')]=util['format'](_0xa301('0xa9'),_0x4cd7ab[_0xa301('0x2a')],_0x4cd7ab['email']||_0x4cd7ab[_0xa301('0x44')][_0xa301('0x38')]);}if(_0x4a361e[_0xa301('0x65')][_0xa301('0xaa')]&&_0x4a361e[_0xa301('0x65')]['attachments'][_0xa301('0x55')]){for(var _0x515855=0x0;_0x515855<_0x4a361e[_0xa301('0x65')][_0xa301('0xaa')]['length'];_0x515855+=0x1){_0x4a361e[_0xa301('0x65')]['attachments'][_0x515855]={'filename':_0x4a361e['body']['attachments'][_0x515855][_0xa301('0x2a')],'path':path['join'](config[_0xa301('0xab')],_0xa301('0xac'),_0x4a361e[_0xa301('0x65')][_0xa301('0xaa')][_0x515855][_0xa301('0xad')])};}}var _0x150cd7=_0x4cd7ab['getSmtpOptions']();return respondWithRpcPromise(_0xa301('0xae'),_0xa301('0xaf'),{'account':_0x150cd7,'message':_0x4a361e[_0xa301('0x65')]});})[_0xa301('0x12')](function(_0x5b1a8e){if(!_0x5b1a8e)return;_0x433141=_0x5b1a8e;if(!_0x14cddf[_0xa301('0xa2')])throw new Error('List\x20not\x20found');if(_0x14cddf['List'][_0xa301('0xb0')][_0xa301('0x55')])return _0x14cddf['List'][_0xa301('0xb0')][0x0];return db[_0xa301('0xa3')][_0xa301('0x6c')](_[_0xa301('0xa')](_0x4a361e[_0xa301('0x65')],{'firstName':_0x4a361e[_0xa301('0x65')]['to'],'email':_0x4a361e['body']['to'],'phone':_0x4a361e['body']['to'],'ListId':_0x14cddf[_0xa301('0x7a')]}));})['then'](function(_0x521af3){if(!_0x521af3)return;var _0x25c0f9={'UserId':_0x4a361e[_0xa301('0x38')]['id'],'ContactId':_0x521af3['id'],'MailAccountId':_0x14cddf['id'],'inReplyTo':_0x433141[_0xa301('0xb1')],'to':_0x4a361e[_0xa301('0x65')][_0xa301('0xa8')],'cc':_0x4a361e['body']['cc'],'subject':_0x4a361e['body'][_0xa301('0xb2')],'attach':_0x4a361e[_0xa301('0x65')][_0xa301('0xb3')],'firstMsgDirection':_0xa301('0xb4'),'lastMsgAt':moment()[_0xa301('0xb5')](_0xa301('0xb6')),'lastMsgDirection':_0xa301('0xb4'),'Messages':[_['merge'](_0x4a361e[_0xa301('0x65')],{'messageId':_0x433141[_0xa301('0xb1')],'sentAt':moment()[_0xa301('0xb5')]('YYYY-MM-DD\x20HH:mm:ss'),'read':!![],'MailAccountId':_0x14cddf['id'],'UserId':_0x4a361e[_0xa301('0x38')]['id'],'ContactId':_0x521af3['id']})]};if(_0x4a361e['body']['Interaction']){_0x25c0f9=_[_0xa301('0x5c')](_0x25c0f9,_0x4a361e[_0xa301('0x65')][_0xa301('0xb7')]);}return db['MailInteraction'][_0xa301('0x6c')](_0x25c0f9,{'include':[{'model':db['MailMessage'],'as':_0xa301('0xb8')}]});})['then'](respondWithResult(_0x561126,null))[_0xa301('0x5f')](handleError(_0x561126,null));};exports[_0xa301('0xb9')]=function(_0x6043b4,_0x1b048a){return db['MailAccount'][_0xa301('0x64')]({'where':{'id':_0x6043b4['params']['id']},'include':[{'model':db[_0xa301('0x46')],'as':_0xa301('0x44'),'raw':!![],'include':[{'model':db['CloudProvider'],'as':_0xa301('0xa6'),'raw':!![]}]}]})['then'](handleEntityNotFound(_0x1b048a,null))[_0xa301('0x12')](function(_0x1b4433){if(!_0x1b4433[_0xa301('0x44')])return;var _0x2cfb78=_0x1b4433[_0xa301('0xba')]();return respondWithRpcPromise(_0xa301('0xbb'),_0xa301('0xb9'),{'account':_0x2cfb78});})['then'](respondWithResult(_0x1b048a,null))['catch'](handleError(_0x1b048a,null));};exports[_0xa301('0x26')]=function(_0x1d8109,_0x2bc99f){return db['MailAccount'][_0xa301('0x64')]({'where':{'id':_0x1d8109[_0xa301('0x61')]['id']}})[_0xa301('0x12')](handleEntityNotFound(_0x2bc99f,null))[_0xa301('0x12')](function(_0x58af5c){if(_0x58af5c&&_0x58af5c[_0xa301('0x40')]){throw new db[(_0xa301('0xbc'))][(_0xa301('0xbd'))](_0xa301('0xbe'));}return _0x58af5c;})[_0xa301('0x12')](removeEntity(_0x2bc99f,null))[_0xa301('0x5f')](handleError(_0x2bc99f,null));};exports[_0xa301('0xbf')]=function(_0x5a6a5f,_0x4926d5){return db[_0xa301('0x4a')][_0xa301('0x64')]({'where':{'id':_0x5a6a5f[_0xa301('0x61')]['id']}})[_0xa301('0x12')](handleEntityNotFound(_0x4926d5,null))[_0xa301('0x12')](function(_0x568d4f){if(_0x568d4f){return _0x568d4f['addAgents'](_0x5a6a5f[_0xa301('0x65')][_0xa301('0x73')],_['omit'](_0x5a6a5f['body'],[_0xa301('0x73'),'id'])||{})[_0xa301('0xc0')](function(_0x3dda67){for(var _0x1dc088=0x0;_0x1dc088<_0x5a6a5f[_0xa301('0x65')][_0xa301('0x73')][_0xa301('0x55')];_0x1dc088+=0x1){socket['emit']('userMailAccount:save',{'UserId':Number(_0x5a6a5f[_0xa301('0x65')][_0xa301('0x73')][_0x1dc088]),'MailAccountId':Number(_0x5a6a5f[_0xa301('0x61')]['id'])});}return _0x3dda67;});}})['then'](respondWithResult(_0x4926d5,null))[_0xa301('0x5f')](handleError(_0x4926d5,null));};exports[_0xa301('0xc1')]=function(_0x964181,_0x4abb14){return db['MailAccount'][_0xa301('0x64')]({'where':{'id':_0x964181[_0xa301('0x61')]['id']}})[_0xa301('0x12')](handleEntityNotFound(_0x4abb14,null))['then'](function(_0xe8e8cf){if(_0xe8e8cf){return _0xe8e8cf['removeAgents'](_0x964181[_0xa301('0x4f')][_0xa301('0x73')])['then'](function(){if(_[_0xa301('0xc2')](_0x964181[_0xa301('0x4f')][_0xa301('0x73')])){for(var _0x285982=0x0;_0x285982<_0x964181[_0xa301('0x4f')]['ids']['length'];_0x285982+=0x1){socket['emit']('userMailAccount:remove',{'UserId':Number(_0x964181[_0xa301('0x4f')]['ids'][_0x285982]),'MailAccountId':Number(_0x964181[_0xa301('0x61')]['id'])});}}else{socket[_0xa301('0xc3')](_0xa301('0xc4'),{'UserId':Number(_0x964181[_0xa301('0x4f')][_0xa301('0x73')]),'MailAccountId':Number(_0x964181['params']['id'])});}});}})[_0xa301('0x12')](respondWithStatusCode(_0x4abb14,null))[_0xa301('0x5f')](handleError(_0x4abb14,null));};exports[_0xa301('0xc5')]=function(_0x5060b5,_0x7faf81){var _0x405bab={};var _0x56333a={};var _0x462abf;var _0x376d4a;return db['MailAccount']['findOne']({'where':{'id':_0x5060b5['params']['id']}})[_0xa301('0x12')](handleEntityNotFound(_0x7faf81,null))[_0xa301('0x12')](function(_0x18ec46){if(_0x18ec46){_0x462abf=_0x18ec46;_0x56333a[_0xa301('0x4e')]=_[_0xa301('0x50')](db[_0xa301('0x8d')][_0xa301('0x4b')]);_0x56333a[_0xa301('0x4f')]=_['keys'](_0x5060b5['query']);_0x56333a[_0xa301('0x51')]=_[_0xa301('0x52')](_0x56333a[_0xa301('0x4e')],_0x56333a[_0xa301('0x4f')]);_0x405bab['attributes']=_[_0xa301('0x52')](_0x56333a['model'],qs[_0xa301('0x53')](_0x5060b5['query']['fields']));_0x405bab[_0xa301('0x54')]=_0x405bab[_0xa301('0x54')][_0xa301('0x55')]?_0x405bab['attributes']:_0x56333a[_0xa301('0x4e')];_0x405bab[_0xa301('0x57')]=qs['sort'](_0x5060b5[_0xa301('0x4f')][_0xa301('0x58')]);_0x405bab[_0xa301('0x59')]=qs[_0xa301('0x51')](_[_0xa301('0x5a')](_0x5060b5['query'],_0x56333a['filters']));if(_0x5060b5[_0xa301('0x4f')]['filter']){_0x405bab[_0xa301('0x59')]=_['merge'](_0x405bab['where'],{'$or':_[_0xa301('0x49')](_0x405bab['attributes'],function(_0x39e260){var _0x39e762={};_0x39e762[_0x39e260]={'$like':'%'+_0x5060b5[_0xa301('0x4f')][_0xa301('0x5b')]+'%'};return _0x39e762;})});}_0x405bab=_['merge']({},_0x405bab,_0x5060b5[_0xa301('0x70')]);return _0x462abf['getAgents'](_0x405bab);}})[_0xa301('0x12')](function(_0x5b8e65){if(_0x5b8e65){_0x376d4a=_0x5b8e65[_0xa301('0x55')];if(!_0x5060b5['query'][_0xa301('0x56')](_0xa301('0x6f'))){_0x405bab[_0xa301('0x22')]=qs['limit'](_0x5060b5[_0xa301('0x4f')][_0xa301('0x22')]);_0x405bab['offset']=qs[_0xa301('0x20')](_0x5060b5[_0xa301('0x4f')][_0xa301('0x20')]);}return _0x462abf[_0xa301('0xc5')](_0x405bab);}})[_0xa301('0x12')](function(_0x415b0f){if(_0x415b0f){return _0x415b0f?{'count':_0x376d4a,'rows':_0x415b0f}:null;}})[_0xa301('0x12')](respondWithResult(_0x7faf81,null))[_0xa301('0x5f')](handleError(_0x7faf81,null));};
\ No newline at end of file
index 50d0077..f9465f8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x49fe=['remove','emit','hasOwnProperty','hook','exports','events','save','update'];(function(_0x6da129,_0x40948d){var _0x1349d6=function(_0x3b1bc){while(--_0x3b1bc){_0x6da129['push'](_0x6da129['shift']());}};_0x1349d6(++_0x40948d);}(_0x49fe,0x75));var _0xe49f=function(_0x15c382,_0x3aa93f){_0x15c382=_0x15c382-0x0;var _0x5f5649=_0x49fe[_0x15c382];return _0x5f5649;};'use strict';var EventEmitter=require(_0xe49f('0x0'));var MailAccount=require('../../mysqldb')['db']['MailAccount'];var MailAccountEvents=new EventEmitter();MailAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe49f('0x1'),'afterUpdate':_0xe49f('0x2'),'afterDestroy':_0xe49f('0x3')};function emitEvent(_0xb99c7){return function(_0x1cac40,_0x2db0ec,_0x1235f4){MailAccountEvents[_0xe49f('0x4')](_0xb99c7+':'+_0x1cac40['id'],_0x1cac40);MailAccountEvents[_0xe49f('0x4')](_0xb99c7,_0x1cac40);_0x1235f4(null);};}for(var e in events){if(events[_0xe49f('0x5')](e)){var event=events[e];MailAccount[_0xe49f('0x6')](e,emitEvent(event));}}module[_0xe49f('0x7')]=MailAccountEvents;
\ No newline at end of file
+var _0x4351=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','events','../../mysqldb','MailAccount'];(function(_0x5e6943,_0x19fe3b){var _0x435333=function(_0x284cc4){while(--_0x284cc4){_0x5e6943['push'](_0x5e6943['shift']());}};_0x435333(++_0x19fe3b);}(_0x4351,0x1b5));var _0x1435=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0x4351[_0x3bf83f];return _0x22c4a9;};'use strict';var EventEmitter=require(_0x1435('0x0'));var MailAccount=require(_0x1435('0x1'))['db'][_0x1435('0x2')];var MailAccountEvents=new EventEmitter();MailAccountEvents[_0x1435('0x3')](0x0);var events={'afterCreate':_0x1435('0x4'),'afterUpdate':_0x1435('0x5'),'afterDestroy':_0x1435('0x6')};function emitEvent(_0x1b5f1e){return function(_0x2fc1f2,_0x2fa227,_0x111bc6){MailAccountEvents[_0x1435('0x7')](_0x1b5f1e+':'+_0x2fc1f2['id'],_0x2fc1f2);MailAccountEvents[_0x1435('0x7')](_0x1b5f1e,_0x2fc1f2);_0x111bc6(null);};}for(var e in events){if(events[_0x1435('0x8')](e)){var event=events[e];MailAccount[_0x1435('0x9')](e,emitEvent(event));}}module['exports']=MailAccountEvents;
\ No newline at end of file
index 4d700b5..630fb07 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7936=['Cloud\x20Provider\x20configuration\x20not\x20found','auth','OAuth2','user','./mailAccount.attributes','exports','define','mail_accounts','custom','service','provider','Smtp','host','port','secure','authentication','CloudProvider'];(function(_0x36a947,_0x1f0510){var _0x34e818=function(_0x117bca){while(--_0x117bca){_0x36a947['push'](_0x36a947['shift']());}};_0x34e818(++_0x1f0510);}(_0x7936,0x1cf));var _0x6793=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7936[_0x3dd15e];return _0x231fd0;};'use strict';var attributes=require(_0x6793('0x0'));module[_0x6793('0x1')]=function(_0x540a07){return _0x540a07[_0x6793('0x2')]('MailAccount',attributes,{'tableName':_0x6793('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x56ce00=this;var _0x2d3904={'id':_0x56ce00['id'],'tls':{'rejectUnauthorized':![]}};if(_0x56ce00['provider']!==_0x6793('0x4')){_0x2d3904[_0x6793('0x5')]=_0x56ce00[_0x6793('0x6')];}else{_0x2d3904['host']=_0x56ce00[_0x6793('0x7')][_0x6793('0x8')];_0x2d3904[_0x6793('0x9')]=_0x56ce00['Smtp'][_0x6793('0x9')];_0x2d3904[_0x6793('0xa')]=_0x56ce00['Smtp'][_0x6793('0xa')];}if(_0x56ce00[_0x6793('0x7')][_0x6793('0xb')]){if(_0x56ce00[_0x6793('0x7')]['modernAuthentication']){if(!_0x56ce00[_0x6793('0x7')][_0x6793('0xc')])throw new Error(_0x6793('0xd'));_0x2d3904[_0x6793('0xe')]={'type':_0x6793('0xf'),'user':_0x56ce00['Smtp'][_0x6793('0x10')],'accessToken':_0x56ce00['Smtp'][_0x6793('0xc')]['data5']};}else{_0x2d3904[_0x6793('0xe')]={'user':_0x56ce00['Smtp']['user'],'pass':_0x56ce00[_0x6793('0x7')]['pass']};}}return _0x2d3904;}}});};
\ No newline at end of file
+var _0x0e0d=['user','data5','pass','exports','define','MailAccount','mail_accounts','provider','custom','service','host','Smtp','port','secure','authentication','CloudProvider','Cloud\x20Provider\x20configuration\x20not\x20found','auth','OAuth2'];(function(_0x68ee8b,_0x3cc6c5){var _0x5148f7=function(_0x5dcbd5){while(--_0x5dcbd5){_0x68ee8b['push'](_0x68ee8b['shift']());}};_0x5148f7(++_0x3cc6c5);}(_0x0e0d,0x120));var _0xd0e0=function(_0x53ccf2,_0x13cb67){_0x53ccf2=_0x53ccf2-0x0;var _0x5a2964=_0x0e0d[_0x53ccf2];return _0x5a2964;};'use strict';var attributes=require('./mailAccount.attributes');module[_0xd0e0('0x0')]=function(_0x223208){return _0x223208[_0xd0e0('0x1')](_0xd0e0('0x2'),attributes,{'tableName':_0xd0e0('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getSmtpOptions':function(){var _0x1d791b=this;var _0x3d0dde={'id':_0x1d791b['id'],'tls':{'rejectUnauthorized':![]}};if(_0x1d791b[_0xd0e0('0x4')]!==_0xd0e0('0x5')){_0x3d0dde[_0xd0e0('0x6')]=_0x1d791b[_0xd0e0('0x4')];}else{_0x3d0dde[_0xd0e0('0x7')]=_0x1d791b[_0xd0e0('0x8')]['host'];_0x3d0dde[_0xd0e0('0x9')]=_0x1d791b[_0xd0e0('0x8')]['port'];_0x3d0dde[_0xd0e0('0xa')]=_0x1d791b[_0xd0e0('0x8')][_0xd0e0('0xa')];}if(_0x1d791b[_0xd0e0('0x8')][_0xd0e0('0xb')]){if(_0x1d791b[_0xd0e0('0x8')]['modernAuthentication']){if(!_0x1d791b[_0xd0e0('0x8')][_0xd0e0('0xc')])throw new Error(_0xd0e0('0xd'));_0x3d0dde[_0xd0e0('0xe')]={'type':_0xd0e0('0xf'),'user':_0x1d791b[_0xd0e0('0x8')][_0xd0e0('0x10')],'accessToken':_0x1d791b[_0xd0e0('0x8')][_0xd0e0('0xc')][_0xd0e0('0x11')]};}else{_0x3d0dde[_0xd0e0('0xe')]={'user':_0x1d791b[_0xd0e0('0x8')][_0xd0e0('0x10')],'pass':_0x1d791b[_0xd0e0('0x8')][_0xd0e0('0x12')]};}}return _0x3d0dde;}}});};
\ No newline at end of file
index 6fd6c38..ba24d65 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3248=['GetMailAccount','findAll','options','where','attributes','limit','include','map','model','then','stringify','ShowMailAccount','MailAccount','raw','smtp','setDataValue','smtpOptions','getSmtpOptions','NotifyMailAccount','body','mail','difference','keys','CmContact','rawAttributes','createdAt','updatedAt','ListId','from\x20is\x20mandatory','isNil','body\x20is\x20mandatory\x20and\x20not\x20empty','includes','mapKey','from','account','CmList','List','Contacts','DESC','MailApplication','Applications','MailServerOut','CloudProvider','get','applications','list','orderBy','priority','asc','push','length','close','autoclose','create','List\x20not\x20found','contact','messageId','generate','subject','attach','format','YYYY-MM-DD\x20HH:mm:ss','MailInteraction','find','MailMessage','Messages','Contact\x20not\x20found','spread','update','interaction','attachments','originTo','originCc','bcc','ChatWebsiteId','originChannel','Email','ChatOfflineMessageId','Attachment','Attachments','User','name','unshift','agent','waitForTheAssignedAgent','*,*,*,*','MailQueue','waitForTheAssignedQueue','Start','startRouting','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','./mailAccount.socket','register','request','info','MailAccount,\x20%s,\x20%s','request\x20sent','debug','MailAccount,\x20%s,\x20%s,\x20%s','error','message','catch'];(function(_0x25fa25,_0x26b171){var _0x1a9bbd=function(_0x1b4d2f){while(--_0x1b4d2f){_0x25fa25['push'](_0x25fa25['shift']());}};_0x1a9bbd(++_0x26b171);}(_0x3248,0x1b0));var _0x8324=function(_0x68e7af,_0x5bfa24){_0x68e7af=_0x68e7af-0x0;var _0x318240=_0x3248[_0x68e7af];return _0x318240;};'use strict';var _=require(_0x8324('0x0'));var moment=require(_0x8324('0x1'));var BPromise=require(_0x8324('0x2'));var rs=require(_0x8324('0x3'));var Redis=require(_0x8324('0x4'));var db=require(_0x8324('0x5'))['db'];var logger=require(_0x8324('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x8324('0x7'));var client=jayson[_0x8324('0x8')]['http']({'port':0x232c});config[_0x8324('0x9')]=_[_0x8324('0xa')](config[_0x8324('0x9')],{'host':_0x8324('0xb'),'port':0x18eb});var socket=require(_0x8324('0xc'))(new Redis(config['redis']));require(_0x8324('0xd'))[_0x8324('0xe')](socket);function respondWithRpcPromise(_0x423b3f,_0x52b5f2,_0x55e1d2){return new BPromise(function(_0x1722ae,_0x3ad4e9){return client[_0x8324('0xf')](_0x423b3f,_0x55e1d2)['then'](function(_0xe358eb){logger[_0x8324('0x10')](_0x8324('0x11'),_0x52b5f2,_0x8324('0x12'));logger[_0x8324('0x13')](_0x8324('0x14'),_0x52b5f2,'request\x20sent',JSON['stringify'](_0xe358eb));if(_0xe358eb['error']){if(_0xe358eb[_0x8324('0x15')]['code']===0x1f4){logger['error'](_0x8324('0x11'),_0x52b5f2,_0xe358eb[_0x8324('0x15')][_0x8324('0x16')]);return _0x3ad4e9(_0xe358eb['error'][_0x8324('0x16')]);}logger[_0x8324('0x15')](_0x8324('0x11'),_0x52b5f2,_0xe358eb['error'][_0x8324('0x16')]);return _0x1722ae(_0xe358eb[_0x8324('0x15')][_0x8324('0x16')]);}else{logger[_0x8324('0x10')](_0x8324('0x11'),_0x52b5f2,_0x8324('0x12'));_0x1722ae(_0xe358eb['result']['message']);}})[_0x8324('0x17')](function(_0x404d16){logger[_0x8324('0x15')]('MailAccount,\x20%s,\x20%s',_0x52b5f2,_0x404d16);_0x3ad4e9(_0x404d16);});});}exports[_0x8324('0x18')]=function(_0x19a888){var _0x43df53=this;return new Promise(function(_0x3162d8,_0x3b816b){return db['MailAccount'][_0x8324('0x19')]({'raw':_0x19a888['options']?_0x19a888[_0x8324('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x19a888[_0x8324('0x1a')]?_0x19a888['options'][_0x8324('0x1b')]||null:null,'attributes':_0x19a888[_0x8324('0x1a')]?_0x19a888[_0x8324('0x1a')][_0x8324('0x1c')]||null:null,'limit':_0x19a888[_0x8324('0x1a')]?_0x19a888[_0x8324('0x1a')][_0x8324('0x1d')]||null:null,'include':_0x19a888[_0x8324('0x1a')]?_0x19a888[_0x8324('0x1a')][_0x8324('0x1e')]?_[_0x8324('0x1f')](_0x19a888[_0x8324('0x1a')][_0x8324('0x1e')],function(_0x38a09a){return{'model':db[_0x38a09a[_0x8324('0x20')]],'as':_0x38a09a['as'],'attributes':_0x38a09a[_0x8324('0x1c')],'include':_0x38a09a[_0x8324('0x1e')]?_[_0x8324('0x1f')](_0x38a09a[_0x8324('0x1e')],function(_0x2b77e4){return{'model':db[_0x2b77e4[_0x8324('0x20')]],'as':_0x2b77e4['as'],'attributes':_0x2b77e4[_0x8324('0x1c')],'include':_0x2b77e4[_0x8324('0x1e')]?_[_0x8324('0x1f')](_0x2b77e4[_0x8324('0x1e')],function(_0x4e022b){return{'model':db[_0x4e022b[_0x8324('0x20')]],'as':_0x4e022b['as'],'attributes':_0x4e022b[_0x8324('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x8324('0x21')](function(_0x17bda7){logger['info'](_0x8324('0x18'),_0x19a888);logger[_0x8324('0x13')](_0x8324('0x18'),_0x19a888,JSON[_0x8324('0x22')](_0x17bda7));_0x3162d8(_0x17bda7);})[_0x8324('0x17')](function(_0x7dc4c9){logger[_0x8324('0x15')]('GetMailAccount',_0x7dc4c9[_0x8324('0x16')],_0x19a888);_0x3b816b(_0x43df53[_0x8324('0x15')](0x1f4,_0x7dc4c9[_0x8324('0x16')]));});});};exports[_0x8324('0x23')]=function(_0x27b46d){var _0x2cb126=this;return new Promise(function(_0x50a23c,_0x39f37){return db[_0x8324('0x24')]['find']({'raw':_0x27b46d[_0x8324('0x1a')]?_0x27b46d[_0x8324('0x1a')][_0x8324('0x25')]===undefined?!![]:![]:!![],'where':_0x27b46d['options']?_0x27b46d[_0x8324('0x1a')][_0x8324('0x1b')]||null:null,'attributes':_0x27b46d['options']?_0x27b46d['options'][_0x8324('0x1c')]||null:null,'include':_0x27b46d[_0x8324('0x1a')]?_0x27b46d[_0x8324('0x1a')]['include']?_['map'](_0x27b46d['options'][_0x8324('0x1e')],function(_0x139f69){return{'model':db[_0x139f69[_0x8324('0x20')]],'as':_0x139f69['as'],'attributes':_0x139f69[_0x8324('0x1c')],'include':_0x139f69['include']?_[_0x8324('0x1f')](_0x139f69[_0x8324('0x1e')],function(_0x23c811){return{'model':db[_0x23c811[_0x8324('0x20')]],'as':_0x23c811['as'],'attributes':_0x23c811['attributes'],'include':_0x23c811[_0x8324('0x1e')]?_[_0x8324('0x1f')](_0x23c811[_0x8324('0x1e')],function(_0x3484fc){return{'model':db[_0x3484fc['model']],'as':_0x3484fc['as'],'attributes':_0x3484fc[_0x8324('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x8324('0x21')](function(_0xde725){if(_0x27b46d[_0x8324('0x1a')][_0x8324('0x26')]===!![])_0xde725[_0x8324('0x27')](_0x8324('0x28'),_0xde725[_0x8324('0x29')]());logger[_0x8324('0x10')]('ShowMailAccount',_0x27b46d);logger['debug']('ShowMailAccount',_0x27b46d,JSON[_0x8324('0x22')](_0xde725));_0x50a23c(_0xde725);})[_0x8324('0x17')](function(_0xc762f6){logger[_0x8324('0x15')]('ShowMailAccount',_0xc762f6[_0x8324('0x16')],_0x27b46d);_0x39f37(_0x2cb126['error'](0x1f4,_0xc762f6[_0x8324('0x16')]));});});};exports[_0x8324('0x2a')]=function(_0x59ad42){var _0x462f66=this;return new Promise(function(_0x21113d,_0x8fa450){var _0x391ee6={'body':_0x59ad42[_0x8324('0x2b')],'channel':_0x8324('0x2c')};var _0x21b0ce=_[_0x8324('0x2d')](_[_0x8324('0x2e')](db[_0x8324('0x2f')][_0x8324('0x30')]),[_0x8324('0x31'),_0x8324('0x32'),'CompanyId',_0x8324('0x33')]);var _0x270e95=![];if(_0x59ad42['body']['id']){delete _0x59ad42[_0x8324('0x2b')]['id'];}if(_['isNil'](_0x59ad42[_0x8324('0x2b')]['from'])){return _0x8fa450(_0x462f66[_0x8324('0x15')](0x1f4,_0x8324('0x34')));}if(_[_0x8324('0x35')](_0x59ad42[_0x8324('0x2b')][_0x8324('0x2b')])||_0x59ad42['body']['body']===''){return _0x8fa450(_0x462f66[_0x8324('0x15')](0x1f4,_0x8324('0x36')));}if(_[_0x8324('0x35')](_0x59ad42[_0x8324('0x2b')]['mapKey'])){return _0x8fa450(_0x462f66[_0x8324('0x15')](0x1f4,'mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x21b0ce));}if(!_[_0x8324('0x37')](_0x21b0ce,_0x59ad42[_0x8324('0x2b')][_0x8324('0x38')])){return _0x8fa450(_0x462f66[_0x8324('0x15')](0x1f4,'mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x21b0ce));}var _0x2d7730={};_0x2d7730[_0x59ad42['body'][_0x8324('0x38')]]=_0x59ad42[_0x8324('0x2b')][_0x8324('0x39')];return db[_0x8324('0x24')]['find']({'where':{'id':_0x59ad42[_0x8324('0x3a')]['id']},'include':[{'model':db[_0x8324('0x3b')],'as':_0x8324('0x3c'),'include':[{'model':db['CmContact'],'as':_0x8324('0x3d'),'where':_0x2d7730,'limit':0x1,'order':[['updatedAt',_0x8324('0x3e')]]}]},{'model':db[_0x8324('0x3f')],'as':_0x8324('0x40')},{'model':db[_0x8324('0x41')],'as':'Smtp','include':[{'model':db[_0x8324('0x42')],'as':_0x8324('0x42')}]}]})[_0x8324('0x21')](function(_0x18f459){if(_0x18f459&&_0x18f459[_0x8324('0x3c')]){var _0x51cf35=_0x18f459[_0x8324('0x43')]({'plain':!![]});_0x391ee6[_0x8324('0x3a')]=_['omit'](_0x51cf35,['Applications',_0x8324('0x3c')]);_0x391ee6['account']['smtpOptions']=_0x18f459[_0x8324('0x29')]();_0x391ee6[_0x8324('0x44')]=_0x51cf35['Applications'];_0x391ee6[_0x8324('0x45')]=_0x51cf35['List'];_0x391ee6['applications']=_[_0x8324('0x46')](_0x391ee6['applications'],[_0x8324('0x47')],[_0x8324('0x48')]);if(_0x391ee6[_0x8324('0x3a')]&&_0x391ee6[_0x8324('0x3a')]['autoclose']){_0x391ee6[_0x8324('0x44')][_0x8324('0x49')]({'id':0x0,'priority':_0x391ee6[_0x8324('0x44')][_0x8324('0x4a')]+0x1,'app':_0x8324('0x4b'),'appdata':_0x8324('0x4c'),'interval':'*,*,*,*'});}if(_0x391ee6['account'][_0x8324('0x40')]){delete _0x391ee6[_0x8324('0x3a')][_0x8324('0x40')];}if(_0x391ee6[_0x8324('0x3a')][_0x8324('0x3c')]){delete _0x391ee6[_0x8324('0x3a')]['List'];}if(_0x51cf35[_0x8324('0x3c')][_0x8324('0x3d')][_0x8324('0x4a')]){return _0x51cf35[_0x8324('0x3c')][_0x8324('0x3d')][0x0];}var _0xb0f321=_[_0x8324('0xa')](_0x59ad42['body'],{'firstName':_0x59ad42[_0x8324('0x2b')][_0x8324('0x39')],'ListId':_0x51cf35[_0x8324('0x33')]});_0xb0f321[_0x59ad42['body'][_0x8324('0x38')]]=_0x59ad42['body'][_0x8324('0x39')];return db[_0x8324('0x2f')][_0x8324('0x4d')](_0xb0f321);}else{throw new Error(_0x8324('0x4e'));}})[_0x8324('0x21')](function(_0x578a9f){_0x391ee6[_0x8324('0x4f')]=_0x578a9f;if(_0x578a9f){if(!_0x59ad42[_0x8324('0x2b')][_0x8324('0x16')][_0x8324('0x50')]){_0x59ad42[_0x8324('0x2b')][_0x8324('0x16')]['messageId']=rs[_0x8324('0x51')]()+'\x20'+_0x59ad42[_0x8324('0x2b')][_0x8324('0x16')][_0x8324('0x39')];}var _0x5400d8={'ContactId':_0x578a9f['id'],'MailAccountId':_0x59ad42['account']['id'],'inReplyTo':_0x59ad42['body'][_0x8324('0x16')][_0x8324('0x50')],'to':_0x59ad42['body']['message'][_0x8324('0x39')],'cc':_0x59ad42[_0x8324('0x2b')][_0x8324('0x16')]['cc'],'subject':_0x59ad42[_0x8324('0x2b')][_0x8324('0x16')][_0x8324('0x52')],'attach':_0x59ad42['body'][_0x8324('0x16')][_0x8324('0x53')],'lastMsgAt':moment()[_0x8324('0x54')](_0x8324('0x55')),'lastMsgDirection':'in'};return db[_0x8324('0x56')][_0x8324('0x57')]({'where':{'closed':![],'MailAccountId':_0x59ad42[_0x8324('0x3a')]['id']},'include':[{'model':db[_0x8324('0x58')],'as':_0x8324('0x59'),'attributes':[_0x8324('0x50')],'where':{'messageId':_0x59ad42[_0x8324('0x2b')][_0x8324('0x16')]['inReplyTo']}}]})[_0x8324('0x21')](function(_0x48f09f){if(_0x48f09f){return[_0x48f09f,![]];}return db[_0x8324('0x56')][_0x8324('0x4d')](_0x5400d8)['then'](function(_0x50e96c){return[_0x50e96c,!![]];});});}else{throw new Error(_0x8324('0x5a'));}})[_0x8324('0x5b')](function(_0x12fea6,_0x361d21){if(_0x12fea6){_0x270e95=_0x361d21;if(!_0x361d21){return _0x12fea6[_0x8324('0x5c')]({'inReplyTo':_0x59ad42['body']['message'][_0x8324('0x50')],'to':_0x59ad42['body'][_0x8324('0x16')]['from'],'cc':_0x59ad42[_0x8324('0x2b')][_0x8324('0x16')]['cc'],'subject':_0x59ad42[_0x8324('0x2b')][_0x8324('0x16')][_0x8324('0x52')],'attach':_0x12fea6['attach']?_0x12fea6[_0x8324('0x53')]:_0x59ad42[_0x8324('0x2b')]['message'][_0x8324('0x53')],'substatus':null,'substatusAt':moment()['format'](_0x8324('0x55')),'lastMsgAt':moment()['format'](_0x8324('0x55')),'lastMsgDirection':'in'});}else{return _0x12fea6;}}})[_0x8324('0x21')](function(_0x216cae){_0x391ee6[_0x8324('0x5d')]=_0x216cae[_0x8324('0x43')]({'plain':!![]});_0x391ee6[_0x8324('0x5d')]['created']=_0x270e95;return db[_0x8324('0x58')][_0x8324('0x4d')]({'body':_0x59ad42[_0x8324('0x2b')]['body'],'MailAccountId':_0x59ad42[_0x8324('0x3a')]['id'],'MailInteractionId':_0x216cae['id'],'direction':'in','ContactId':_0x391ee6[_0x8324('0x4f')]['id'],'messageId':_0x59ad42[_0x8324('0x2b')][_0x8324('0x16')][_0x8324('0x50')],'from':_0x59ad42[_0x8324('0x2b')][_0x8324('0x16')]['from'],'to':_0x59ad42[_0x8324('0x2b')][_0x8324('0x16')]['to'],'cc':_0x59ad42[_0x8324('0x2b')][_0x8324('0x16')]['cc'],'subject':_0x59ad42['body'][_0x8324('0x16')][_0x8324('0x52')],'attach':_0x59ad42[_0x8324('0x2b')]['message']['attach'],'Attachments':_0x59ad42[_0x8324('0x2b')][_0x8324('0x16')][_0x8324('0x5e')],'originTo':_0x59ad42[_0x8324('0x2b')][_0x8324('0x16')][_0x8324('0x5f')],'originCc':_0x59ad42[_0x8324('0x2b')]['message'][_0x8324('0x60')],'bcc':_0x59ad42[_0x8324('0x2b')]['message'][_0x8324('0x61')],'ChatWebsiteId':_0x59ad42[_0x8324('0x2b')][_0x8324('0x16')][_0x8324('0x62')]||null,'originChannel':_0x59ad42[_0x8324('0x2b')][_0x8324('0x16')][_0x8324('0x63')]||_0x8324('0x64'),'ChatOfflineMessageId':_0x59ad42['body']['message'][_0x8324('0x65')]||null},{'include':[{'model':db[_0x8324('0x66')],'as':_0x8324('0x67')}]});})[_0x8324('0x21')](function(_0x595ddd){_0x391ee6[_0x8324('0x16')]=_0x595ddd;if(!_0x391ee6['interaction']['UserId']){return;}return db[_0x8324('0x68')][_0x8324('0x57')]({'attributes':['id',_0x8324('0x69')],'where':{'id':_0x391ee6[_0x8324('0x5d')]['UserId']}});})[_0x8324('0x21')](function(_0x4c0e76){if(_0x4c0e76){_0x391ee6[_0x8324('0x44')][_0x8324('0x6a')]({'id':0x0,'priority':0x0,'app':_0x8324('0x6b'),'appdata':_0x4c0e76['name']+','+(_0x391ee6['account'][_0x8324('0x6c')]||0xa),'interval':_0x8324('0x6d')});}if(!_0x391ee6[_0x8324('0x5d')]['queueId']){return;}return db[_0x8324('0x6e')][_0x8324('0x57')]({'attributes':['id',_0x8324('0x69')],'where':{'id':_0x391ee6[_0x8324('0x5d')]['queueId']}});})['then'](function(_0x46af04){if(_0x46af04){_0x391ee6[_0x8324('0x44')][_0x8324('0x6a')]({'id':0x0,'priority':0x1,'app':'queue','appdata':_0x46af04[_0x8324('0x69')]+','+(_0x391ee6[_0x8324('0x3a')][_0x8324('0x6f')]||0x12c),'interval':_0x8324('0x6d')});}return respondWithRpcPromise(_0x8324('0x70'),_0x8324('0x71'),_0x391ee6);})['then'](function(_0x59c9c3){_0x21113d(_0x59c9c3);})[_0x8324('0x17')](function(_0x3625b6){_0x8fa450(_0x462f66['error'](0x1f4,_0x3625b6['message']));});});};
\ No newline at end of file
+var _0x6ec2=['ChatOfflineMessageId','Attachments','UserId','name','agent','waitForTheAssignedAgent','queueId','MailQueue','unshift','waitForTheAssignedQueue','Start','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','http','defaults','socket.io-emitter','redis','./mailAccount.socket','request','then','info','MailAccount,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','GetMailAccount','MailAccount','findAll','options','raw','where','attributes','limit','include','model','map','catch','find','setDataValue','smtpOptions','ShowMailAccount','NotifyMailAccount','body','mail','difference','keys','CmContact','createdAt','updatedAt','CompanyId','ListId','from\x20is\x20mandatory','isNil','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','from','account','DESC','MailApplication','Applications','List','omit','list','orderBy','priority','asc','autoclose','applications','length','*,*,*,*','Contacts','List\x20not\x20found','contact','messageId','generate','subject','attach','format','MailInteraction','MailMessage','Messages','inReplyTo','create','Contact\x20not\x20found','spread','YYYY-MM-DD\x20HH:mm:ss','interaction','get','created','attachments','originTo','originCc','bcc','ChatWebsiteId','Email'];(function(_0x47f7c1,_0x3f5dd2){var _0xdfa709=function(_0x3f556d){while(--_0x3f556d){_0x47f7c1['push'](_0x47f7c1['shift']());}};_0xdfa709(++_0x3f5dd2);}(_0x6ec2,0x78));var _0x26ec=function(_0x1e60f7,_0x554c4d){_0x1e60f7=_0x1e60f7-0x0;var _0x1d2b9c=_0x6ec2[_0x1e60f7];return _0x1d2b9c;};'use strict';var _=require(_0x26ec('0x0'));var moment=require(_0x26ec('0x1'));var BPromise=require(_0x26ec('0x2'));var rs=require(_0x26ec('0x3'));var Redis=require(_0x26ec('0x4'));var db=require(_0x26ec('0x5'))['db'];var logger=require('../../config/logger')(_0x26ec('0x6'));var config=require(_0x26ec('0x7'));var jayson=require(_0x26ec('0x8'));var client=jayson[_0x26ec('0x9')][_0x26ec('0xa')]({'port':0x232c});config['redis']=_[_0x26ec('0xb')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x26ec('0xc'))(new Redis(config[_0x26ec('0xd')]));require(_0x26ec('0xe'))['register'](socket);function respondWithRpcPromise(_0x1d1df3,_0x5ae60e,_0x143d9f){return new BPromise(function(_0x23b140,_0x26f0a6){return client[_0x26ec('0xf')](_0x1d1df3,_0x143d9f)[_0x26ec('0x10')](function(_0x1b24e2){logger[_0x26ec('0x11')](_0x26ec('0x12'),_0x5ae60e,_0x26ec('0x13'));logger[_0x26ec('0x14')]('MailAccount,\x20%s,\x20%s,\x20%s',_0x5ae60e,'request\x20sent',JSON[_0x26ec('0x15')](_0x1b24e2));if(_0x1b24e2[_0x26ec('0x16')]){if(_0x1b24e2[_0x26ec('0x16')][_0x26ec('0x17')]===0x1f4){logger[_0x26ec('0x16')](_0x26ec('0x12'),_0x5ae60e,_0x1b24e2[_0x26ec('0x16')]['message']);return _0x26f0a6(_0x1b24e2[_0x26ec('0x16')][_0x26ec('0x18')]);}logger[_0x26ec('0x16')](_0x26ec('0x12'),_0x5ae60e,_0x1b24e2['error']['message']);return _0x23b140(_0x1b24e2[_0x26ec('0x16')][_0x26ec('0x18')]);}else{logger[_0x26ec('0x11')](_0x26ec('0x12'),_0x5ae60e,'request\x20sent');_0x23b140(_0x1b24e2[_0x26ec('0x19')][_0x26ec('0x18')]);}})['catch'](function(_0x5ef1e5){logger['error'](_0x26ec('0x12'),_0x5ae60e,_0x5ef1e5);_0x26f0a6(_0x5ef1e5);});});}exports[_0x26ec('0x1a')]=function(_0x60511e){var _0x4f6eb5=this;return new Promise(function(_0x4ad50c,_0x289978){return db[_0x26ec('0x1b')][_0x26ec('0x1c')]({'raw':_0x60511e[_0x26ec('0x1d')]?_0x60511e[_0x26ec('0x1d')][_0x26ec('0x1e')]===undefined?!![]:![]:!![],'where':_0x60511e['options']?_0x60511e[_0x26ec('0x1d')][_0x26ec('0x1f')]||null:null,'attributes':_0x60511e[_0x26ec('0x1d')]?_0x60511e[_0x26ec('0x1d')][_0x26ec('0x20')]||null:null,'limit':_0x60511e['options']?_0x60511e['options'][_0x26ec('0x21')]||null:null,'include':_0x60511e[_0x26ec('0x1d')]?_0x60511e[_0x26ec('0x1d')]['include']?_['map'](_0x60511e[_0x26ec('0x1d')][_0x26ec('0x22')],function(_0x16aba4){return{'model':db[_0x16aba4[_0x26ec('0x23')]],'as':_0x16aba4['as'],'attributes':_0x16aba4[_0x26ec('0x20')],'include':_0x16aba4[_0x26ec('0x22')]?_[_0x26ec('0x24')](_0x16aba4['include'],function(_0x50fedc){return{'model':db[_0x50fedc['model']],'as':_0x50fedc['as'],'attributes':_0x50fedc[_0x26ec('0x20')],'include':_0x50fedc[_0x26ec('0x22')]?_[_0x26ec('0x24')](_0x50fedc[_0x26ec('0x22')],function(_0x19e0fc){return{'model':db[_0x19e0fc[_0x26ec('0x23')]],'as':_0x19e0fc['as'],'attributes':_0x19e0fc[_0x26ec('0x20')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x30231e){logger['info'](_0x26ec('0x1a'),_0x60511e);logger[_0x26ec('0x14')]('GetMailAccount',_0x60511e,JSON[_0x26ec('0x15')](_0x30231e));_0x4ad50c(_0x30231e);})[_0x26ec('0x25')](function(_0x139d24){logger[_0x26ec('0x16')](_0x26ec('0x1a'),_0x139d24[_0x26ec('0x18')],_0x60511e);_0x289978(_0x4f6eb5['error'](0x1f4,_0x139d24[_0x26ec('0x18')]));});});};exports['ShowMailAccount']=function(_0x3d8b89){var _0x5e9989=this;return new Promise(function(_0x43caa5,_0x3ce472){return db['MailAccount'][_0x26ec('0x26')]({'raw':_0x3d8b89[_0x26ec('0x1d')]?_0x3d8b89[_0x26ec('0x1d')][_0x26ec('0x1e')]===undefined?!![]:![]:!![],'where':_0x3d8b89[_0x26ec('0x1d')]?_0x3d8b89[_0x26ec('0x1d')]['where']||null:null,'attributes':_0x3d8b89['options']?_0x3d8b89['options']['attributes']||null:null,'include':_0x3d8b89['options']?_0x3d8b89[_0x26ec('0x1d')][_0x26ec('0x22')]?_[_0x26ec('0x24')](_0x3d8b89[_0x26ec('0x1d')][_0x26ec('0x22')],function(_0x4fec35){return{'model':db[_0x4fec35[_0x26ec('0x23')]],'as':_0x4fec35['as'],'attributes':_0x4fec35[_0x26ec('0x20')],'include':_0x4fec35[_0x26ec('0x22')]?_[_0x26ec('0x24')](_0x4fec35[_0x26ec('0x22')],function(_0x4e3250){return{'model':db[_0x4e3250[_0x26ec('0x23')]],'as':_0x4e3250['as'],'attributes':_0x4e3250[_0x26ec('0x20')],'include':_0x4e3250[_0x26ec('0x22')]?_[_0x26ec('0x24')](_0x4e3250[_0x26ec('0x22')],function(_0x171118){return{'model':db[_0x171118[_0x26ec('0x23')]],'as':_0x171118['as'],'attributes':_0x171118[_0x26ec('0x20')]};}):[]};}):[]};}):[]:[]})[_0x26ec('0x10')](function(_0x16c0ee){if(_0x3d8b89['options']['smtp']===!![])_0x16c0ee[_0x26ec('0x27')](_0x26ec('0x28'),_0x16c0ee['getSmtpOptions']());logger[_0x26ec('0x11')]('ShowMailAccount',_0x3d8b89);logger[_0x26ec('0x14')](_0x26ec('0x29'),_0x3d8b89,JSON[_0x26ec('0x15')](_0x16c0ee));_0x43caa5(_0x16c0ee);})[_0x26ec('0x25')](function(_0x2a0c92){logger[_0x26ec('0x16')]('ShowMailAccount',_0x2a0c92[_0x26ec('0x18')],_0x3d8b89);_0x3ce472(_0x5e9989[_0x26ec('0x16')](0x1f4,_0x2a0c92[_0x26ec('0x18')]));});});};exports[_0x26ec('0x2a')]=function(_0x1bbc5b){var _0x304194=this;return new Promise(function(_0x440ed3,_0x319a45){var _0x60c74c={'body':_0x1bbc5b[_0x26ec('0x2b')],'channel':_0x26ec('0x2c')};var _0x1d5e19=_[_0x26ec('0x2d')](_[_0x26ec('0x2e')](db[_0x26ec('0x2f')]['rawAttributes']),[_0x26ec('0x30'),_0x26ec('0x31'),_0x26ec('0x32'),_0x26ec('0x33')]);var _0x452bbb=![];if(_0x1bbc5b[_0x26ec('0x2b')]['id']){delete _0x1bbc5b['body']['id'];}if(_['isNil'](_0x1bbc5b[_0x26ec('0x2b')]['from'])){return _0x319a45(_0x304194[_0x26ec('0x16')](0x1f4,_0x26ec('0x34')));}if(_[_0x26ec('0x35')](_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x2b')])||_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x2b')]===''){return _0x319a45(_0x304194[_0x26ec('0x16')](0x1f4,'body\x20is\x20mandatory\x20and\x20not\x20empty'));}if(_[_0x26ec('0x35')](_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x36')])){return _0x319a45(_0x304194['error'](0x1f4,_0x26ec('0x37')+_0x1d5e19));}if(!_[_0x26ec('0x38')](_0x1d5e19,_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x36')])){return _0x319a45(_0x304194[_0x26ec('0x16')](0x1f4,_0x26ec('0x39')+_0x1d5e19));}var _0x42724f={};_0x42724f[_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x36')]]=_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x3a')];return db[_0x26ec('0x1b')][_0x26ec('0x26')]({'where':{'id':_0x1bbc5b[_0x26ec('0x3b')]['id']},'include':[{'model':db['CmList'],'as':'List','include':[{'model':db[_0x26ec('0x2f')],'as':'Contacts','where':_0x42724f,'limit':0x1,'order':[['updatedAt',_0x26ec('0x3c')]]}]},{'model':db[_0x26ec('0x3d')],'as':_0x26ec('0x3e')},{'model':db['MailServerOut'],'as':'Smtp','include':[{'model':db['CloudProvider'],'as':'CloudProvider'}]}]})[_0x26ec('0x10')](function(_0x583a22){if(_0x583a22&&_0x583a22[_0x26ec('0x3f')]){var _0x1220da=_0x583a22['get']({'plain':!![]});_0x60c74c['account']=_[_0x26ec('0x40')](_0x1220da,[_0x26ec('0x3e'),'List']);_0x60c74c[_0x26ec('0x3b')][_0x26ec('0x28')]=_0x583a22['getSmtpOptions']();_0x60c74c['applications']=_0x1220da[_0x26ec('0x3e')];_0x60c74c[_0x26ec('0x41')]=_0x1220da[_0x26ec('0x3f')];_0x60c74c['applications']=_[_0x26ec('0x42')](_0x60c74c['applications'],[_0x26ec('0x43')],[_0x26ec('0x44')]);if(_0x60c74c[_0x26ec('0x3b')]&&_0x60c74c[_0x26ec('0x3b')][_0x26ec('0x45')]){_0x60c74c[_0x26ec('0x46')]['push']({'id':0x0,'priority':_0x60c74c[_0x26ec('0x46')][_0x26ec('0x47')]+0x1,'app':'close','appdata':_0x26ec('0x45'),'interval':_0x26ec('0x48')});}if(_0x60c74c['account'][_0x26ec('0x3e')]){delete _0x60c74c['account']['Applications'];}if(_0x60c74c[_0x26ec('0x3b')][_0x26ec('0x3f')]){delete _0x60c74c[_0x26ec('0x3b')]['List'];}if(_0x1220da['List'][_0x26ec('0x49')][_0x26ec('0x47')]){return _0x1220da[_0x26ec('0x3f')]['Contacts'][0x0];}var _0xeec1e4=_[_0x26ec('0xb')](_0x1bbc5b['body'],{'firstName':_0x1bbc5b['body'][_0x26ec('0x3a')],'ListId':_0x1220da['ListId']});_0xeec1e4[_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x36')]]=_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x3a')];return db['CmContact']['create'](_0xeec1e4);}else{throw new Error(_0x26ec('0x4a'));}})[_0x26ec('0x10')](function(_0x2e1eec){_0x60c74c[_0x26ec('0x4b')]=_0x2e1eec;if(_0x2e1eec){if(!_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')][_0x26ec('0x4c')]){_0x1bbc5b['body'][_0x26ec('0x18')][_0x26ec('0x4c')]=rs[_0x26ec('0x4d')]()+'\x20'+_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')][_0x26ec('0x3a')];}var _0x37c62e={'ContactId':_0x2e1eec['id'],'MailAccountId':_0x1bbc5b['account']['id'],'inReplyTo':_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')][_0x26ec('0x4c')],'to':_0x1bbc5b[_0x26ec('0x2b')]['message'][_0x26ec('0x3a')],'cc':_0x1bbc5b[_0x26ec('0x2b')]['message']['cc'],'subject':_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')][_0x26ec('0x4e')],'attach':_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')][_0x26ec('0x4f')],'lastMsgAt':moment()[_0x26ec('0x50')]('YYYY-MM-DD\x20HH:mm:ss'),'lastMsgDirection':'in'};return db[_0x26ec('0x51')][_0x26ec('0x26')]({'where':{'closed':![],'MailAccountId':_0x1bbc5b['account']['id']},'include':[{'model':db[_0x26ec('0x52')],'as':_0x26ec('0x53'),'attributes':[_0x26ec('0x4c')],'where':{'messageId':_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')][_0x26ec('0x54')]}}]})[_0x26ec('0x10')](function(_0x38d350){if(_0x38d350){return[_0x38d350,![]];}return db[_0x26ec('0x51')][_0x26ec('0x55')](_0x37c62e)[_0x26ec('0x10')](function(_0x4618dc){return[_0x4618dc,!![]];});});}else{throw new Error(_0x26ec('0x56'));}})[_0x26ec('0x57')](function(_0x426c56,_0x4a8769){if(_0x426c56){_0x452bbb=_0x4a8769;if(!_0x4a8769){return _0x426c56['update']({'inReplyTo':_0x1bbc5b['body']['message'][_0x26ec('0x4c')],'to':_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')]['from'],'cc':_0x1bbc5b[_0x26ec('0x2b')]['message']['cc'],'subject':_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')][_0x26ec('0x4e')],'attach':_0x426c56['attach']?_0x426c56[_0x26ec('0x4f')]:_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')][_0x26ec('0x4f')],'substatus':null,'substatusAt':moment()[_0x26ec('0x50')]('YYYY-MM-DD\x20HH:mm:ss'),'lastMsgAt':moment()[_0x26ec('0x50')](_0x26ec('0x58')),'lastMsgDirection':'in'});}else{return _0x426c56;}}})['then'](function(_0x141119){_0x60c74c[_0x26ec('0x59')]=_0x141119[_0x26ec('0x5a')]({'plain':!![]});_0x60c74c['interaction'][_0x26ec('0x5b')]=_0x452bbb;return db[_0x26ec('0x52')][_0x26ec('0x55')]({'body':_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x2b')],'MailAccountId':_0x1bbc5b[_0x26ec('0x3b')]['id'],'MailInteractionId':_0x141119['id'],'direction':'in','ContactId':_0x60c74c[_0x26ec('0x4b')]['id'],'messageId':_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')][_0x26ec('0x4c')],'from':_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')][_0x26ec('0x3a')],'to':_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')]['to'],'cc':_0x1bbc5b[_0x26ec('0x2b')]['message']['cc'],'subject':_0x1bbc5b['body'][_0x26ec('0x18')][_0x26ec('0x4e')],'attach':_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')][_0x26ec('0x4f')],'Attachments':_0x1bbc5b[_0x26ec('0x2b')]['message'][_0x26ec('0x5c')],'originTo':_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')][_0x26ec('0x5d')],'originCc':_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')][_0x26ec('0x5e')],'bcc':_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')][_0x26ec('0x5f')],'ChatWebsiteId':_0x1bbc5b[_0x26ec('0x2b')]['message'][_0x26ec('0x60')]||null,'originChannel':_0x1bbc5b[_0x26ec('0x2b')][_0x26ec('0x18')]['originChannel']||_0x26ec('0x61'),'ChatOfflineMessageId':_0x1bbc5b[_0x26ec('0x2b')]['message'][_0x26ec('0x62')]||null},{'include':[{'model':db['Attachment'],'as':_0x26ec('0x63')}]});})[_0x26ec('0x10')](function(_0x32b4b8){_0x60c74c[_0x26ec('0x18')]=_0x32b4b8;if(!_0x60c74c[_0x26ec('0x59')][_0x26ec('0x64')]){return;}return db['User'][_0x26ec('0x26')]({'attributes':['id',_0x26ec('0x65')],'where':{'id':_0x60c74c['interaction'][_0x26ec('0x64')]}});})[_0x26ec('0x10')](function(_0x5f3d5e){if(_0x5f3d5e){_0x60c74c[_0x26ec('0x46')]['unshift']({'id':0x0,'priority':0x0,'app':_0x26ec('0x66'),'appdata':_0x5f3d5e[_0x26ec('0x65')]+','+(_0x60c74c['account'][_0x26ec('0x67')]||0xa),'interval':_0x26ec('0x48')});}if(!_0x60c74c['interaction'][_0x26ec('0x68')]){return;}return db[_0x26ec('0x69')][_0x26ec('0x26')]({'attributes':['id',_0x26ec('0x65')],'where':{'id':_0x60c74c[_0x26ec('0x59')][_0x26ec('0x68')]}});})[_0x26ec('0x10')](function(_0x5e46c8){if(_0x5e46c8){_0x60c74c[_0x26ec('0x46')][_0x26ec('0x6a')]({'id':0x0,'priority':0x1,'app':'queue','appdata':_0x5e46c8['name']+','+(_0x60c74c['account'][_0x26ec('0x6b')]||0x12c),'interval':_0x26ec('0x48')});}return respondWithRpcPromise(_0x26ec('0x6c'),'startRouting',_0x60c74c);})[_0x26ec('0x10')](function(_0x4122ce){_0x440ed3(_0x4122ce);})[_0x26ec('0x25')](function(_0x14d063){_0x319a45(_0x304194[_0x26ec('0x16')](0x1f4,_0x14d063[_0x26ec('0x18')]));});});};
\ No newline at end of file
index 4069e4d..aba832c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7d31=['removeListener','register','length','mailAccount:','./mailAccount.events','remove','update','emit'];(function(_0x49fc60,_0x1a477a){var _0x373950=function(_0x39b456){while(--_0x39b456){_0x49fc60['push'](_0x49fc60['shift']());}};_0x373950(++_0x1a477a);}(_0x7d31,0x1e4));var _0x17d3=function(_0x10346c,_0x183ce6){_0x10346c=_0x10346c-0x0;var _0x262bd4=_0x7d31[_0x10346c];return _0x262bd4;};'use strict';var MailAccountEvents=require(_0x17d3('0x0'));var events=['save',_0x17d3('0x1'),_0x17d3('0x2')];function createListener(_0x8c13b4,_0x5bf57b){return function(_0x172ed3){_0x5bf57b[_0x17d3('0x3')](_0x8c13b4,_0x172ed3);};}function removeListener(_0x1dc1a8,_0x2315cf){return function(){MailAccountEvents[_0x17d3('0x4')](_0x1dc1a8,_0x2315cf);};}exports[_0x17d3('0x5')]=function(_0x274059){for(var _0x2e5216=0x0,_0x14c515=events[_0x17d3('0x6')];_0x2e5216<_0x14c515;_0x2e5216++){var _0x59589f=events[_0x2e5216];var _0x3d7936=createListener(_0x17d3('0x7')+_0x59589f,_0x274059);MailAccountEvents['on'](_0x59589f,_0x3d7936);}};
\ No newline at end of file
+var _0x3260=['remove','update','emit','register','length','./mailAccount.events','save'];(function(_0x53972e,_0x275c){var _0xc48fcf=function(_0x1130de){while(--_0x1130de){_0x53972e['push'](_0x53972e['shift']());}};_0xc48fcf(++_0x275c);}(_0x3260,0xd7));var _0x0326=function(_0x8fd06,_0x33eea1){_0x8fd06=_0x8fd06-0x0;var _0x429e9b=_0x3260[_0x8fd06];return _0x429e9b;};'use strict';var MailAccountEvents=require(_0x0326('0x0'));var events=[_0x0326('0x1'),_0x0326('0x2'),_0x0326('0x3')];function createListener(_0x4ad390,_0x58a21c){return function(_0x4502fb){_0x58a21c[_0x0326('0x4')](_0x4ad390,_0x4502fb);};}function removeListener(_0x24cc5b,_0x34b862){return function(){MailAccountEvents['removeListener'](_0x24cc5b,_0x34b862);};}exports[_0x0326('0x5')]=function(_0x5198d5){for(var _0x4e5f8e=0x0,_0x23f016=events[_0x0326('0x6')];_0x4e5f8e<_0x23f016;_0x4e5f8e++){var _0x34c33e=events[_0x4e5f8e];var _0x20c300=createListener('mailAccount:'+_0x34c33e,_0x5198d5);MailAccountEvents['on'](_0x34c33e,_0x20c300);}};
\ No newline at end of file
index 331c113..0de6761 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2078=['isAuthenticated','show','update','delete','destroy','exports','multer','util','path','express','Router','../../components/interaction/service','./mailApplication.controller','/:id'];(function(_0xcd81b8,_0x18d9fd){var _0xc3ae18=function(_0x2bd4e0){while(--_0x2bd4e0){_0xcd81b8['push'](_0xcd81b8['shift']());}};_0xc3ae18(++_0x18d9fd);}(_0x2078,0xca));var _0x8207=function(_0x24f0fe,_0x51e150){_0x24f0fe=_0x24f0fe-0x0;var _0xcb6804=_0x2078[_0x24f0fe];return _0xcb6804;};'use strict';var multer=require(_0x8207('0x0'));var util=require(_0x8207('0x1'));var path=require(_0x8207('0x2'));var timeout=require('connect-timeout');var express=require(_0x8207('0x3'));var router=express[_0x8207('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x8207('0x5'));var config=require('../../config/environment');var controller=require(_0x8207('0x6'));router['get'](_0x8207('0x7'),auth[_0x8207('0x8')](),controller[_0x8207('0x9')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0x8207('0xa')]);router[_0x8207('0xb')]('/:id',auth[_0x8207('0x8')](),controller[_0x8207('0xc')]);module[_0x8207('0xd')]=router;
\ No newline at end of file
+var _0x398f=['exports','util','path','connect-timeout','express','Router','../../components/auth/service','../../config/environment','./mailApplication.controller','isAuthenticated','put','update','delete','destroy'];(function(_0x145b3c,_0x31ea4a){var _0x1b6e36=function(_0xfccee6){while(--_0xfccee6){_0x145b3c['push'](_0x145b3c['shift']());}};_0x1b6e36(++_0x31ea4a);}(_0x398f,0x1a5));var _0xf398=function(_0x3af1e2,_0x1bb655){_0x3af1e2=_0x3af1e2-0x0;var _0x42ee12=_0x398f[_0x3af1e2];return _0x42ee12;};'use strict';var multer=require('multer');var util=require(_0xf398('0x0'));var path=require(_0xf398('0x1'));var timeout=require(_0xf398('0x2'));var express=require(_0xf398('0x3'));var router=express[_0xf398('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xf398('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xf398('0x6'));var controller=require(_0xf398('0x7'));router['get']('/:id',auth[_0xf398('0x8')](),controller['show']);router[_0xf398('0x9')]('/:id',auth['isAuthenticated'](),controller[_0xf398('0xa')]);router[_0xf398('0xb')]('/:id',auth[_0xf398('0x8')](),controller[_0xf398('0xc')]);module[_0xf398('0xd')]=router;
\ No newline at end of file
index 9ece91c..a2c4680 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9e63=['TEXT','STRING','*,*,*,*','sequelize','exports','INTEGER','noop'];(function(_0x5d9475,_0x59b0b0){var _0x5bfa40=function(_0x52e2ce){while(--_0x52e2ce){_0x5d9475['push'](_0x5d9475['shift']());}};_0x5bfa40(++_0x59b0b0);}(_0x9e63,0x65));var _0x39e6=function(_0x139a3c,_0x4fc883){_0x139a3c=_0x139a3c-0x0;var _0x2b375b=_0x9e63[_0x139a3c];return _0x2b375b;};'use strict';var Sequelize=require(_0x39e6('0x0'));module[_0x39e6('0x1')]={'priority':{'type':Sequelize[_0x39e6('0x2')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x39e6('0x3')},'appdata':{'type':Sequelize[_0x39e6('0x4')]()},'description':{'type':Sequelize[_0x39e6('0x5')]},'interval':{'type':Sequelize[_0x39e6('0x5')],'defaultValue':_0x39e6('0x6')}};
\ No newline at end of file
+var _0xe719=['exports','INTEGER','noop','TEXT','STRING','*,*,*,*','sequelize'];(function(_0x2d565,_0x401263){var _0x2e95aa=function(_0x1f2bed){while(--_0x1f2bed){_0x2d565['push'](_0x2d565['shift']());}};_0x2e95aa(++_0x401263);}(_0xe719,0xbc));var _0x9e71=function(_0x1c868c,_0x4983cb){_0x1c868c=_0x1c868c-0x0;var _0x22b288=_0xe719[_0x1c868c];return _0x22b288;};'use strict';var Sequelize=require(_0x9e71('0x0'));module[_0x9e71('0x1')]={'priority':{'type':Sequelize[_0x9e71('0x2')],'allowNull':![]},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0x9e71('0x3')},'appdata':{'type':Sequelize[_0x9e71('0x4')]()},'description':{'type':Sequelize[_0x9e71('0x5')]},'interval':{'type':Sequelize[_0x9e71('0x5')],'defaultValue':_0x9e71('0x6')}};
\ No newline at end of file
index 7ca3b33..5ccef17 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x70e0=['util','sox','ejs','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','status','json','offset','undefined','count','limit','set','apply','save','update','then','error','stack','name','send','show','model','keys','MailApplication','query','filters','attributes','intersection','length','includeAll','include','find','catch','body','params','eml-format','rimraf','zip-dir','moment','bluebird','mustache'];(function(_0x1d5ccb,_0x136776){var _0x49fc07=function(_0x3c29c6){while(--_0x3c29c6){_0x1d5ccb['push'](_0x1d5ccb['shift']());}};_0x49fc07(++_0x136776);}(_0x70e0,0x17b));var _0x070e=function(_0x5008eb,_0x1b54aa){_0x5008eb=_0x5008eb-0x0;var _0x5caaf6=_0x70e0[_0x5008eb];return _0x5caaf6;};'use strict';var emlformat=require(_0x070e('0x0'));var rimraf=require(_0x070e('0x1'));var zipdir=require(_0x070e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x070e('0x3'));var BPromise=require(_0x070e('0x4'));var Mustache=require(_0x070e('0x5'));var util=require(_0x070e('0x6'));var path=require('path');var sox=require(_0x070e('0x7'));var csv=require('to-csv');var ejs=require(_0x070e('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require(_0x070e('0x9'));var jsforce=require(_0x070e('0xa'));var deskjs=require(_0x070e('0xb'));var toCsv=require(_0x070e('0xc'));var querystring=require(_0x070e('0xd'));var Papa=require(_0x070e('0xe'));var Redis=require(_0x070e('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x070e('0x10'));var hardwareService=require(_0x070e('0x11'));var logger=require(_0x070e('0x12'))(_0x070e('0x13'));var utils=require(_0x070e('0x14'));var config=require(_0x070e('0x15'));var licenseUtil=require(_0x070e('0x16'));var db=require(_0x070e('0x17'))['db'];function respondWithStatusCode(_0x39d2b9,_0x5bf079){_0x5bf079=_0x5bf079||0xcc;return function(_0x2930b8){if(_0x2930b8){return _0x39d2b9['sendStatus'](_0x5bf079);}return _0x39d2b9['status'](_0x5bf079)[_0x070e('0x18')]();};}function respondWithResult(_0x56c7ba,_0x4a33d2){_0x4a33d2=_0x4a33d2||0xc8;return function(_0x5bae0f){if(_0x5bae0f){return _0x56c7ba[_0x070e('0x19')](_0x4a33d2)[_0x070e('0x1a')](_0x5bae0f);}};}function respondWithFilteredResult(_0x51d14d,_0x5d3a38){return function(_0x373d86){if(_0x373d86){var _0xeae1a5=typeof _0x5d3a38[_0x070e('0x1b')]===_0x070e('0x1c')&&typeof _0x5d3a38['limit']==='undefined';var _0x17e2e4=_0x373d86[_0x070e('0x1d')];var _0x38f6e6=_0xeae1a5?0x0:_0x5d3a38[_0x070e('0x1b')];var _0x364b3f=_0xeae1a5?_0x373d86['count']:_0x5d3a38[_0x070e('0x1b')]+_0x5d3a38[_0x070e('0x1e')];var _0x1ad3de;if(_0x364b3f>=_0x17e2e4){_0x364b3f=_0x17e2e4;_0x1ad3de=0xc8;}else{_0x1ad3de=0xce;}_0x51d14d[_0x070e('0x19')](_0x1ad3de);return _0x51d14d[_0x070e('0x1f')]('Content-Range',_0x38f6e6+'-'+_0x364b3f+'/'+_0x17e2e4)['json'](_0x373d86);}return null;};}function patchUpdates(_0x4e958f){return function(_0x9907cf){try{jsonpatch[_0x070e('0x20')](_0x9907cf,_0x4e958f,!![]);}catch(_0x20dc60){return BPromise['reject'](_0x20dc60);}return _0x9907cf[_0x070e('0x21')]();};}function saveUpdates(_0x5dc5d2,_0xf8dd5d){return function(_0x3f6985){if(_0x3f6985){return _0x3f6985[_0x070e('0x22')](_0x5dc5d2)[_0x070e('0x23')](function(_0x28a1c3){return _0x28a1c3;});}return null;};}function removeEntity(_0xa86797,_0xe405e){return function(_0x164cdf){if(_0x164cdf){return _0x164cdf['destroy']()[_0x070e('0x23')](function(){_0xa86797[_0x070e('0x19')](0xcc)[_0x070e('0x18')]();});}};}function handleEntityNotFound(_0x503f4d,_0xf17c56){return function(_0x5f3e9d){if(!_0x5f3e9d){_0x503f4d['sendStatus'](0x194);}return _0x5f3e9d;};}function handleError(_0x2ccbd7,_0x25f6e){_0x25f6e=_0x25f6e||0x1f4;return function(_0x41deb1){logger[_0x070e('0x24')](_0x41deb1[_0x070e('0x25')]);if(_0x41deb1['name']){delete _0x41deb1[_0x070e('0x26')];}_0x2ccbd7[_0x070e('0x19')](_0x25f6e)[_0x070e('0x27')](_0x41deb1);};}exports[_0x070e('0x28')]=function(_0x43dd96,_0x28d7f2){var _0x1a1892={'raw':!![],'where':{'id':_0x43dd96['params']['id']}},_0x26373b={};_0x26373b[_0x070e('0x29')]=_[_0x070e('0x2a')](db[_0x070e('0x2b')]['rawAttributes']);_0x26373b['query']=_[_0x070e('0x2a')](_0x43dd96[_0x070e('0x2c')]);_0x26373b[_0x070e('0x2d')]=_['intersection'](_0x26373b[_0x070e('0x29')],_0x26373b[_0x070e('0x2c')]);_0x1a1892[_0x070e('0x2e')]=_[_0x070e('0x2f')](_0x26373b['model'],qs['fields'](_0x43dd96['query']['fields']));_0x1a1892[_0x070e('0x2e')]=_0x1a1892['attributes'][_0x070e('0x30')]?_0x1a1892[_0x070e('0x2e')]:_0x26373b['model'];if(_0x43dd96['query'][_0x070e('0x31')]){_0x1a1892[_0x070e('0x32')]=[{'all':!![]}];}_0x1a1892=_['merge']({},_0x1a1892,_0x43dd96['options']);return db[_0x070e('0x2b')][_0x070e('0x33')](_0x1a1892)[_0x070e('0x23')](handleEntityNotFound(_0x28d7f2,null))[_0x070e('0x23')](respondWithResult(_0x28d7f2,null))[_0x070e('0x34')](handleError(_0x28d7f2,null));};exports['update']=function(_0x482cc2,_0x24d17d){if(_0x482cc2[_0x070e('0x35')]['id']){delete _0x482cc2[_0x070e('0x35')]['id'];}return db[_0x070e('0x2b')][_0x070e('0x33')]({'where':{'id':_0x482cc2['params']['id']}})[_0x070e('0x23')](handleEntityNotFound(_0x24d17d,null))[_0x070e('0x23')](saveUpdates(_0x482cc2['body'],null))[_0x070e('0x23')](respondWithResult(_0x24d17d,null))[_0x070e('0x34')](handleError(_0x24d17d,null));};exports['destroy']=function(_0x4d4ee8,_0x5ddbe9){return db[_0x070e('0x2b')][_0x070e('0x33')]({'where':{'id':_0x4d4ee8[_0x070e('0x36')]['id']}})[_0x070e('0x23')](handleEntityNotFound(_0x5ddbe9,null))[_0x070e('0x23')](removeEntity(_0x5ddbe9,null))['catch'](handleError(_0x5ddbe9,null));};
\ No newline at end of file
+var _0xa9e0=['includeAll','merge','options','find','catch','body','eml-format','rimraf','zip-dir','moment','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/license/util','../../mysqldb','sendStatus','end','status','json','undefined','limit','offset','count','set','Content-Range','apply','save','update','then','destroy','stack','name','send','show','params','model','MailApplication','rawAttributes','query','keys','filters','intersection','attributes','fields','length'];(function(_0x3e5d9c,_0x885c02){var _0x103b7a=function(_0x9ec6cb){while(--_0x9ec6cb){_0x3e5d9c['push'](_0x3e5d9c['shift']());}};_0x103b7a(++_0x885c02);}(_0xa9e0,0x123));var _0x0a9e=function(_0xbe200f,_0x4b50eb){_0xbe200f=_0xbe200f-0x0;var _0x192597=_0xa9e0[_0xbe200f];return _0x192597;};'use strict';var emlformat=require(_0x0a9e('0x0'));var rimraf=require(_0x0a9e('0x1'));var zipdir=require(_0x0a9e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0a9e('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x0a9e('0x4'));var util=require(_0x0a9e('0x5'));var path=require(_0x0a9e('0x6'));var sox=require(_0x0a9e('0x7'));var csv=require(_0x0a9e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0a9e('0x9'));var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var as=require(_0x0a9e('0x11'));var hardwareService=require(_0x0a9e('0x12'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x0a9e('0x13'));var db=require(_0x0a9e('0x14'))['db'];function respondWithStatusCode(_0xd5b662,_0x26d672){_0x26d672=_0x26d672||0xcc;return function(_0x32d742){if(_0x32d742){return _0xd5b662[_0x0a9e('0x15')](_0x26d672);}return _0xd5b662['status'](_0x26d672)[_0x0a9e('0x16')]();};}function respondWithResult(_0x239b12,_0x2b4227){_0x2b4227=_0x2b4227||0xc8;return function(_0x281129){if(_0x281129){return _0x239b12[_0x0a9e('0x17')](_0x2b4227)[_0x0a9e('0x18')](_0x281129);}};}function respondWithFilteredResult(_0x52a03d,_0x22dccb){return function(_0x5d0880){if(_0x5d0880){var _0x1985b6=typeof _0x22dccb['offset']===_0x0a9e('0x19')&&typeof _0x22dccb[_0x0a9e('0x1a')]==='undefined';var _0x225616=_0x5d0880['count'];var _0x459eb1=_0x1985b6?0x0:_0x22dccb[_0x0a9e('0x1b')];var _0x106033=_0x1985b6?_0x5d0880[_0x0a9e('0x1c')]:_0x22dccb[_0x0a9e('0x1b')]+_0x22dccb[_0x0a9e('0x1a')];var _0x530eb7;if(_0x106033>=_0x225616){_0x106033=_0x225616;_0x530eb7=0xc8;}else{_0x530eb7=0xce;}_0x52a03d[_0x0a9e('0x17')](_0x530eb7);return _0x52a03d[_0x0a9e('0x1d')](_0x0a9e('0x1e'),_0x459eb1+'-'+_0x106033+'/'+_0x225616)[_0x0a9e('0x18')](_0x5d0880);}return null;};}function patchUpdates(_0x105080){return function(_0x4bb1e3){try{jsonpatch[_0x0a9e('0x1f')](_0x4bb1e3,_0x105080,!![]);}catch(_0x155cce){return BPromise['reject'](_0x155cce);}return _0x4bb1e3[_0x0a9e('0x20')]();};}function saveUpdates(_0x5a09ef,_0x588269){return function(_0x3a02e1){if(_0x3a02e1){return _0x3a02e1[_0x0a9e('0x21')](_0x5a09ef)[_0x0a9e('0x22')](function(_0x30bae6){return _0x30bae6;});}return null;};}function removeEntity(_0x4abc77,_0xfb6e48){return function(_0x2fb0e4){if(_0x2fb0e4){return _0x2fb0e4[_0x0a9e('0x23')]()[_0x0a9e('0x22')](function(){_0x4abc77[_0x0a9e('0x17')](0xcc)[_0x0a9e('0x16')]();});}};}function handleEntityNotFound(_0x16b1ca,_0x5ea472){return function(_0x59181e){if(!_0x59181e){_0x16b1ca[_0x0a9e('0x15')](0x194);}return _0x59181e;};}function handleError(_0x3a8e58,_0x40c424){_0x40c424=_0x40c424||0x1f4;return function(_0x33161b){logger['error'](_0x33161b[_0x0a9e('0x24')]);if(_0x33161b['name']){delete _0x33161b[_0x0a9e('0x25')];}_0x3a8e58['status'](_0x40c424)[_0x0a9e('0x26')](_0x33161b);};}exports[_0x0a9e('0x27')]=function(_0x25fba9,_0x14433c){var _0x140511={'raw':!![],'where':{'id':_0x25fba9[_0x0a9e('0x28')]['id']}},_0x1538a4={};_0x1538a4[_0x0a9e('0x29')]=_['keys'](db[_0x0a9e('0x2a')][_0x0a9e('0x2b')]);_0x1538a4[_0x0a9e('0x2c')]=_[_0x0a9e('0x2d')](_0x25fba9['query']);_0x1538a4[_0x0a9e('0x2e')]=_[_0x0a9e('0x2f')](_0x1538a4[_0x0a9e('0x29')],_0x1538a4[_0x0a9e('0x2c')]);_0x140511[_0x0a9e('0x30')]=_[_0x0a9e('0x2f')](_0x1538a4[_0x0a9e('0x29')],qs[_0x0a9e('0x31')](_0x25fba9[_0x0a9e('0x2c')]['fields']));_0x140511[_0x0a9e('0x30')]=_0x140511['attributes'][_0x0a9e('0x32')]?_0x140511[_0x0a9e('0x30')]:_0x1538a4[_0x0a9e('0x29')];if(_0x25fba9[_0x0a9e('0x2c')][_0x0a9e('0x33')]){_0x140511['include']=[{'all':!![]}];}_0x140511=_[_0x0a9e('0x34')]({},_0x140511,_0x25fba9[_0x0a9e('0x35')]);return db[_0x0a9e('0x2a')][_0x0a9e('0x36')](_0x140511)[_0x0a9e('0x22')](handleEntityNotFound(_0x14433c,null))[_0x0a9e('0x22')](respondWithResult(_0x14433c,null))[_0x0a9e('0x37')](handleError(_0x14433c,null));};exports[_0x0a9e('0x21')]=function(_0x5583a4,_0x44295a){if(_0x5583a4['body']['id']){delete _0x5583a4[_0x0a9e('0x38')]['id'];}return db[_0x0a9e('0x2a')][_0x0a9e('0x36')]({'where':{'id':_0x5583a4[_0x0a9e('0x28')]['id']}})['then'](handleEntityNotFound(_0x44295a,null))[_0x0a9e('0x22')](saveUpdates(_0x5583a4[_0x0a9e('0x38')],null))[_0x0a9e('0x22')](respondWithResult(_0x44295a,null))[_0x0a9e('0x37')](handleError(_0x44295a,null));};exports['destroy']=function(_0x54135e,_0x1e8694){return db['MailApplication'][_0x0a9e('0x36')]({'where':{'id':_0x54135e[_0x0a9e('0x28')]['id']}})[_0x0a9e('0x22')](handleEntityNotFound(_0x1e8694,null))[_0x0a9e('0x22')](removeEntity(_0x1e8694,null))['catch'](handleError(_0x1e8694,null));};
\ No newline at end of file
index 3c77ac8..b168a74 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x75b4=['lodash','util','../../config/logger','moment','bluebird','request-promise','rimraf','../../config/environment','./mailApplication.attributes','define','MailApplication','utf8mb4','utf8mb4_unicode_ci'];(function(_0x26ebdd,_0x383423){var _0x14a50a=function(_0x51a775){while(--_0x51a775){_0x26ebdd['push'](_0x26ebdd['shift']());}};_0x14a50a(++_0x383423);}(_0x75b4,0x12b));var _0x475b=function(_0x35d4a5,_0x2523f0){_0x35d4a5=_0x35d4a5-0x0;var _0x330e78=_0x75b4[_0x35d4a5];return _0x330e78;};'use strict';var _=require(_0x475b('0x0'));var util=require(_0x475b('0x1'));var logger=require(_0x475b('0x2'))('api');var moment=require(_0x475b('0x3'));var BPromise=require(_0x475b('0x4'));var rp=require(_0x475b('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x475b('0x6'));var config=require(_0x475b('0x7'));var attributes=require(_0x475b('0x8'));module['exports']=function(_0x19e929,_0x2017ca){return _0x19e929[_0x475b('0x9')](_0x475b('0xa'),attributes,{'tableName':'mail_applications','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x475b('0xb'),'collate':_0x475b('0xc')});};
\ No newline at end of file
+var _0x699c=['utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','exports','define','MailApplication','mail_applications','utf8mb4'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x699c,0x1d2));var _0xc699=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0x699c[_0x167cc1];return _0x10bc4b;};'use strict';var _=require(_0xc699('0x0'));var util=require(_0xc699('0x1'));var logger=require(_0xc699('0x2'))(_0xc699('0x3'));var moment=require(_0xc699('0x4'));var BPromise=require(_0xc699('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc699('0x6'));var rimraf=require(_0xc699('0x7'));var config=require(_0xc699('0x8'));var attributes=require('./mailApplication.attributes');module[_0xc699('0x9')]=function(_0x4c7cf0,_0x4d61ee){return _0x4c7cf0[_0xc699('0xa')](_0xc699('0xb'),attributes,{'tableName':_0xc699('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xc699('0xd'),'collate':_0xc699('0xe')});};
\ No newline at end of file
index fe271e6..14edaa7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x13fb=['message','info','catch','MailApplication','update','body','raw','options','limit','UpdateMailApplication','lodash','util','randomstring','../../mysqldb','../../config/logger','client','http','then','MailApplication,\x20%s,\x20%s','request\x20sent','debug','MailApplication,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x36ac6a,_0x1195e1){var _0x1f992b=function(_0x16f319){while(--_0x16f319){_0x36ac6a['push'](_0x36ac6a['shift']());}};_0x1f992b(++_0x1195e1);}(_0x13fb,0xa0));var _0xb13f=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0x13fb[_0x4565bf];return _0x5610ba;};'use strict';var _=require(_0xb13f('0x0'));var util=require(_0xb13f('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xb13f('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xb13f('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xb13f('0x4'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xb13f('0x5')][_0xb13f('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x15c710,_0x94cd87,_0x46c6e4){return new BPromise(function(_0x3a3024,_0x341019){return client['request'](_0x15c710,_0x46c6e4)[_0xb13f('0x7')](function(_0x2c7e31){logger['info'](_0xb13f('0x8'),_0x94cd87,_0xb13f('0x9'));logger[_0xb13f('0xa')](_0xb13f('0xb'),_0x94cd87,_0xb13f('0x9'),JSON[_0xb13f('0xc')](_0x2c7e31));if(_0x2c7e31[_0xb13f('0xd')]){if(_0x2c7e31[_0xb13f('0xd')][_0xb13f('0xe')]===0x1f4){logger[_0xb13f('0xd')](_0xb13f('0x8'),_0x94cd87,_0x2c7e31[_0xb13f('0xd')][_0xb13f('0xf')]);return _0x341019(_0x2c7e31[_0xb13f('0xd')][_0xb13f('0xf')]);}logger[_0xb13f('0xd')]('MailApplication,\x20%s,\x20%s',_0x94cd87,_0x2c7e31[_0xb13f('0xd')][_0xb13f('0xf')]);return _0x3a3024(_0x2c7e31['error'][_0xb13f('0xf')]);}else{logger[_0xb13f('0x10')](_0xb13f('0x8'),_0x94cd87,'request\x20sent');_0x3a3024(_0x2c7e31['result'][_0xb13f('0xf')]);}})[_0xb13f('0x11')](function(_0x2e436e){logger[_0xb13f('0xd')](_0xb13f('0x8'),_0x94cd87,_0x2e436e);_0x341019(_0x2e436e);});});}exports['UpdateMailApplication']=function(_0xf27198){var _0x4009c6=this;return new Promise(function(_0x6fa10a,_0x4ea7c6){return db[_0xb13f('0x12')][_0xb13f('0x13')](_0xf27198[_0xb13f('0x14')],{'raw':_0xf27198['options']?_0xf27198['options'][_0xb13f('0x15')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xf27198[_0xb13f('0x16')]?_0xf27198[_0xb13f('0x16')]['where']||null:null,'attributes':_0xf27198['options']?_0xf27198[_0xb13f('0x16')]['attributes']||null:null,'limit':_0xf27198[_0xb13f('0x16')]?_0xf27198[_0xb13f('0x16')][_0xb13f('0x17')]||null:null})['then'](function(_0x4e2e62){logger[_0xb13f('0x10')]('UpdateMailApplication',_0xf27198);logger[_0xb13f('0xa')](_0xb13f('0x18'),_0xf27198,JSON[_0xb13f('0xc')](_0x4e2e62));_0x6fa10a(_0x4e2e62);})[_0xb13f('0x11')](function(_0x419e8d){logger[_0xb13f('0xd')](_0xb13f('0x18'),_0x419e8d[_0xb13f('0xf')],_0xf27198);_0x4ea7c6(_0x4009c6[_0xb13f('0xd')](0x1f4,_0x419e8d['message']));});});};
\ No newline at end of file
+var _0x5880=['ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','MailApplication,\x20%s,\x20%s','debug','error','code','message','request\x20sent','result','UpdateMailApplication','MailApplication','update','body','options','raw','attributes','limit','then','lodash','util','moment','bluebird','randomstring'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5880,0xcd));var _0x0588=function(_0x442406,_0x118e15){_0x442406=_0x442406-0x0;var _0x32d78a=_0x5880[_0x442406];return _0x32d78a;};'use strict';var _=require(_0x0588('0x0'));var util=require(_0x0588('0x1'));var moment=require(_0x0588('0x2'));var BPromise=require(_0x0588('0x3'));var rs=require(_0x0588('0x4'));var fs=require('fs');var Redis=require(_0x0588('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x0588('0x6'))(_0x0588('0x7'));var config=require(_0x0588('0x8'));var jayson=require(_0x0588('0x9'));var client=jayson[_0x0588('0xa')][_0x0588('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x1d5b5c,_0x49f348,_0x5ec5e7){return new BPromise(function(_0x30e498,_0x4cfa60){return client[_0x0588('0xc')](_0x1d5b5c,_0x5ec5e7)['then'](function(_0x3cfdbd){logger[_0x0588('0xd')](_0x0588('0xe'),_0x49f348,'request\x20sent');logger[_0x0588('0xf')]('MailApplication,\x20%s,\x20%s,\x20%s',_0x49f348,'request\x20sent',JSON['stringify'](_0x3cfdbd));if(_0x3cfdbd[_0x0588('0x10')]){if(_0x3cfdbd[_0x0588('0x10')][_0x0588('0x11')]===0x1f4){logger['error'](_0x0588('0xe'),_0x49f348,_0x3cfdbd[_0x0588('0x10')][_0x0588('0x12')]);return _0x4cfa60(_0x3cfdbd['error']['message']);}logger[_0x0588('0x10')](_0x0588('0xe'),_0x49f348,_0x3cfdbd['error']['message']);return _0x30e498(_0x3cfdbd['error'][_0x0588('0x12')]);}else{logger['info']('MailApplication,\x20%s,\x20%s',_0x49f348,_0x0588('0x13'));_0x30e498(_0x3cfdbd[_0x0588('0x14')][_0x0588('0x12')]);}})['catch'](function(_0x6b76aa){logger['error'](_0x0588('0xe'),_0x49f348,_0x6b76aa);_0x4cfa60(_0x6b76aa);});});}exports[_0x0588('0x15')]=function(_0x4a5db2){var _0x314951=this;return new Promise(function(_0x2050b1,_0x3f6456){return db[_0x0588('0x16')][_0x0588('0x17')](_0x4a5db2[_0x0588('0x18')],{'raw':_0x4a5db2['options']?_0x4a5db2[_0x0588('0x19')][_0x0588('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4a5db2[_0x0588('0x19')]?_0x4a5db2[_0x0588('0x19')]['where']||null:null,'attributes':_0x4a5db2[_0x0588('0x19')]?_0x4a5db2[_0x0588('0x19')][_0x0588('0x1b')]||null:null,'limit':_0x4a5db2[_0x0588('0x19')]?_0x4a5db2[_0x0588('0x19')][_0x0588('0x1c')]||null:null})[_0x0588('0x1d')](function(_0x505703){logger[_0x0588('0xd')](_0x0588('0x15'),_0x4a5db2);logger[_0x0588('0xf')](_0x0588('0x15'),_0x4a5db2,JSON['stringify'](_0x505703));_0x2050b1(_0x505703);})['catch'](function(_0xab686d){logger[_0x0588('0x10')](_0x0588('0x15'),_0xab686d[_0x0588('0x12')],_0x4a5db2);_0x3f6456(_0x314951['error'](0x1f4,_0xab686d['message']));});});};
\ No newline at end of file
index 04b49e0..bf668d9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8605=['index','/describe','describe','/:id','show','/:id/download','download','post','create','addMessage','/:id/tags','tracked','mailinteraction:addtags','addTags','put','mailinteraction:update','update','delete','mailinteraction:destroy','destroy','exports','express','Router','../../components/auth/service','./mailInteraction.controller','get','isAuthenticated'];(function(_0x9454ca,_0x859c39){var _0x423535=function(_0x3a962f){while(--_0x3a962f){_0x9454ca['push'](_0x9454ca['shift']());}};_0x423535(++_0x859c39);}(_0x8605,0x1e0));var _0x5860=function(_0x351f42,_0x78ecd){_0x351f42=_0x351f42-0x0;var _0x91074d=_0x8605[_0x351f42];return _0x91074d;};'use strict';var express=require(_0x5860('0x0'));var router=express[_0x5860('0x1')]();var auth=require(_0x5860('0x2'));var interaction=require('../../components/interaction/service');var controller=require(_0x5860('0x3'));router[_0x5860('0x4')]('/',auth[_0x5860('0x5')](),controller[_0x5860('0x6')]);router[_0x5860('0x4')](_0x5860('0x7'),auth[_0x5860('0x5')](),controller[_0x5860('0x8')]);router['get'](_0x5860('0x9'),auth['isAuthenticated'](),controller[_0x5860('0xa')]);router[_0x5860('0x4')]('/:id/messages',auth['isAuthenticated'](),controller['getMessages']);router['get'](_0x5860('0xb'),auth[_0x5860('0x5')](),controller[_0x5860('0xc')]);router[_0x5860('0xd')]('/',auth[_0x5860('0x5')](),controller[_0x5860('0xe')]);router[_0x5860('0xd')]('/:id/messages',auth[_0x5860('0x5')](),controller[_0x5860('0xf')]);router[_0x5860('0xd')](_0x5860('0x10'),auth[_0x5860('0x5')](),interaction[_0x5860('0x11')]('mail',_0x5860('0x12')),controller[_0x5860('0x13')]);router[_0x5860('0x14')]('/:id',auth[_0x5860('0x5')](),interaction[_0x5860('0x11')]('mail',_0x5860('0x15')),controller[_0x5860('0x16')]);router[_0x5860('0x17')](_0x5860('0x9'),auth['isAuthenticated'](),interaction[_0x5860('0x11')]('mail',_0x5860('0x18')),controller[_0x5860('0x19')]);router['delete']('/:id/tags',auth[_0x5860('0x5')](),controller['removeTags']);module[_0x5860('0x1a')]=router;
\ No newline at end of file
+var _0x4d0c=['/:id/tags','mailinteraction:addtags','addTags','tracked','mail','mailinteraction:update','update','mailinteraction:destroy','destroy','removeTags','express','Router','../../components/interaction/service','./mailInteraction.controller','get','/:id','isAuthenticated','show','/:id/messages','download','create','post','addMessage'];(function(_0x3ac893,_0x3f19e5){var _0x523b07=function(_0x45c70){while(--_0x45c70){_0x3ac893['push'](_0x3ac893['shift']());}};_0x523b07(++_0x3f19e5);}(_0x4d0c,0x135));var _0xc4d0=function(_0x17e93f,_0x18581b){_0x17e93f=_0x17e93f-0x0;var _0x1c8805=_0x4d0c[_0x17e93f];return _0x1c8805;};'use strict';var express=require(_0xc4d0('0x0'));var router=express[_0xc4d0('0x1')]();var auth=require('../../components/auth/service');var interaction=require(_0xc4d0('0x2'));var controller=require(_0xc4d0('0x3'));router[_0xc4d0('0x4')]('/',auth['isAuthenticated'](),controller['index']);router['get']('/describe',auth['isAuthenticated'](),controller['describe']);router['get'](_0xc4d0('0x5'),auth[_0xc4d0('0x6')](),controller[_0xc4d0('0x7')]);router[_0xc4d0('0x4')](_0xc4d0('0x8'),auth[_0xc4d0('0x6')](),controller['getMessages']);router[_0xc4d0('0x4')]('/:id/download',auth['isAuthenticated'](),controller[_0xc4d0('0x9')]);router['post']('/',auth[_0xc4d0('0x6')](),controller[_0xc4d0('0xa')]);router[_0xc4d0('0xb')](_0xc4d0('0x8'),auth[_0xc4d0('0x6')](),controller[_0xc4d0('0xc')]);router['post'](_0xc4d0('0xd'),auth[_0xc4d0('0x6')](),interaction['tracked']('mail',_0xc4d0('0xe')),controller[_0xc4d0('0xf')]);router['put'](_0xc4d0('0x5'),auth[_0xc4d0('0x6')](),interaction[_0xc4d0('0x10')](_0xc4d0('0x11'),_0xc4d0('0x12')),controller[_0xc4d0('0x13')]);router['delete'](_0xc4d0('0x5'),auth[_0xc4d0('0x6')](),interaction[_0xc4d0('0x10')](_0xc4d0('0x11'),_0xc4d0('0x14')),controller[_0xc4d0('0x15')]);router['delete'](_0xc4d0('0xd'),auth['isAuthenticated'](),controller[_0xc4d0('0x16')]);module['exports']=router;
\ No newline at end of file
index 5688f2c..4989fe7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb571=['sequelize','iconv','DATE','STRING','TEXT','long','BOOLEAN','ENUM','out'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb571,0x19e));var _0x1b57=function(_0x395e47,_0x22d63e){_0x395e47=_0x395e47-0x0;var _0x329d09=_0xb571[_0x395e47];return _0x329d09;};'use strict';var Sequelize=require(_0x1b57('0x0'));var iconv=require(_0x1b57('0x1'));module['exports']={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x1b57('0x2')]},'disposition':{'type':Sequelize[_0x1b57('0x3')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0x1b57('0x3')]},'note':{'type':Sequelize[_0x1b57('0x3')]},'inReplyTo':{'type':Sequelize['STRING'](0x1fe)},'to':{'type':Sequelize[_0x1b57('0x3')]},'cc':{'type':Sequelize[_0x1b57('0x4')](_0x1b57('0x5'))},'subject':{'type':Sequelize[_0x1b57('0x4')]()},'attach':{'type':Sequelize[_0x1b57('0x6')],'defaultValue':![]},'read1stAt':{'type':Sequelize[_0x1b57('0x2')]},'substatus':{'type':Sequelize[_0x1b57('0x3')](0x3c)},'substatusAt':{'type':Sequelize[_0x1b57('0x2')]},'firstMsgDirection':{'type':Sequelize[_0x1b57('0x7')]('in',_0x1b57('0x8')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x1b57('0x2')]},'lastMsgDirection':{'type':Sequelize[_0x1b57('0x7')]('in',_0x1b57('0x8')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0x1b57('0x6')],'defaultValue':![]},'queueId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
+var _0x6ac6=['BOOLEAN','STRING','TEXT','long','DATE','out','ENUM','INTEGER','iconv','exports'];(function(_0x2573ac,_0x2946f7){var _0x1f6a51=function(_0x1ad47f){while(--_0x1ad47f){_0x2573ac['push'](_0x2573ac['shift']());}};_0x1f6a51(++_0x2946f7);}(_0x6ac6,0x1d4));var _0x66ac=function(_0x31748b,_0x3a08a9){_0x31748b=_0x31748b-0x0;var _0x389dd3=_0x6ac6[_0x31748b];return _0x389dd3;};'use strict';var Sequelize=require('sequelize');var iconv=require(_0x66ac('0x0'));module[_0x66ac('0x1')]={'closed':{'type':Sequelize[_0x66ac('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize[_0x66ac('0x3')]},'thirdDisposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0x66ac('0x3')]},'inReplyTo':{'type':Sequelize[_0x66ac('0x3')](0x1fe)},'to':{'type':Sequelize['STRING']},'cc':{'type':Sequelize[_0x66ac('0x4')](_0x66ac('0x5'))},'subject':{'type':Sequelize['TEXT']()},'attach':{'type':Sequelize[_0x66ac('0x2')],'defaultValue':![]},'read1stAt':{'type':Sequelize[_0x66ac('0x6')]},'substatus':{'type':Sequelize[_0x66ac('0x3')](0x3c)},'substatusAt':{'type':Sequelize[_0x66ac('0x6')]},'firstMsgDirection':{'type':Sequelize['ENUM']('in',_0x66ac('0x7')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x66ac('0x6')]},'lastMsgDirection':{'type':Sequelize[_0x66ac('0x8')]('in',_0x66ac('0x7')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0x66ac('0x2')],'defaultValue':![]},'queueId':{'type':Sequelize[_0x66ac('0x9')]}};
\ No newline at end of file
index 04937c0..8c1704b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8002=['model','keys','query','filters','intersection','fields','attributes','length','merge','options','MailInteraction','catch','create','body','find','describe','addMessage','MailMessage','ids','omit','getMessages','findOne','hasOwnProperty','nolimit','sort','where','pick','MailInteractionId','filter','$gte','split','includeAll','inlineCss','true','rows','addTags','setTags','spread','Tag','emit','removeTags','join','root','server','tmp','attachments','push','Attachment','Attachments','Messages','from','subject','createdAt','get','each','missing.recipient@your.company.com','format','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','bcc','headers','Bcc','basename','readFileSync','build','writeFileSync','message%d.eml','download','sendStatus','rimraf','zip-dir','moment','bluebird','path','ioredis','../../components/interaction/service','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','html-entities','redis','defaults','localhost','socket.io-emitter','register','end','status','undefined','limit','count','offset','set','Content-Range','json','update','then','destroy','error','name','send','index','map','rawAttributes','type','key','findAll','mail','user','show','params'];(function(_0x10995f,_0x12a3f0){var _0x40b1b3=function(_0x5ed4d0){while(--_0x5ed4d0){_0x10995f['push'](_0x10995f['shift']());}};_0x40b1b3(++_0x12a3f0);}(_0x8002,0x191));var _0x2800=function(_0x4b241f,_0x5c2fdc){_0x4b241f=_0x4b241f-0x0;var _0x47fc08=_0x8002[_0x4b241f];return _0x47fc08;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x2800('0x0'));var zipdir=require(_0x2800('0x1'));var moment=require(_0x2800('0x2'));var BPromise=require(_0x2800('0x3'));var util=require('util');var path=require(_0x2800('0x4'));var fs=require('fs');var _=require('lodash');var juice=require('juice');var Redis=require(_0x2800('0x5'));var interaction=require(_0x2800('0x6'));var qs=require(_0x2800('0x7'));var logger=require(_0x2800('0x8'))(_0x2800('0x9'));var config=require(_0x2800('0xa'));var db=require(_0x2800('0xb'))['db'];var htmlEntities=require(_0x2800('0xc'));config[_0x2800('0xd')]=_[_0x2800('0xe')](config[_0x2800('0xd')],{'host':_0x2800('0xf'),'port':0x18eb});var socket=require(_0x2800('0x10'))(new Redis(config[_0x2800('0xd')]));require('./mailInteraction.socket')[_0x2800('0x11')](socket);function respondWithStatusCode(_0x552532,_0x17d0db){_0x17d0db=_0x17d0db||0xcc;return function(_0x580b30){if(_0x580b30){return _0x552532['sendStatus'](_0x17d0db);}return _0x552532['status'](_0x17d0db)[_0x2800('0x12')]();};}function respondWithResult(_0x160792,_0x28cd83){_0x28cd83=_0x28cd83||0xc8;return function(_0x50770b){if(_0x50770b){return _0x160792[_0x2800('0x13')](_0x28cd83)['json'](_0x50770b);}};}function respondWithFilteredResult(_0x418617,_0x5a1fe0){return function(_0x3364ee){if(_0x3364ee){var _0x1aeae8=typeof _0x5a1fe0['offset']===_0x2800('0x14')&&typeof _0x5a1fe0[_0x2800('0x15')]===_0x2800('0x14');var _0x2e6a25=_0x3364ee[_0x2800('0x16')];var _0x434a09=_0x1aeae8?0x0:_0x5a1fe0[_0x2800('0x17')];var _0x5b691b=_0x1aeae8?_0x3364ee[_0x2800('0x16')]:_0x5a1fe0[_0x2800('0x17')]+_0x5a1fe0[_0x2800('0x15')];var _0x3fa783;if(_0x5b691b>=_0x2e6a25){_0x5b691b=_0x2e6a25;_0x3fa783=0xc8;}else{_0x3fa783=0xce;}_0x418617['status'](_0x3fa783);return _0x418617[_0x2800('0x18')](_0x2800('0x19'),_0x434a09+'-'+_0x5b691b+'/'+_0x2e6a25)[_0x2800('0x1a')](_0x3364ee);}return null;};}function saveUpdates(_0x36514c){return function(_0x37e09a){if(_0x37e09a){return _0x37e09a[_0x2800('0x1b')](_0x36514c)[_0x2800('0x1c')](function(_0x4d1876){return _0x4d1876;});}return null;};}function removeEntity(_0x16c14c){return function(_0x72e045){if(_0x72e045){return _0x72e045[_0x2800('0x1d')]()[_0x2800('0x1c')](function(){_0x16c14c[_0x2800('0x13')](0xcc)['end']();});}};}function handleEntityNotFound(_0x2f614d){return function(_0x2a4028){if(!_0x2a4028){_0x2f614d['sendStatus'](0x194);}return _0x2a4028;};}function handleError(_0x6337a2,_0x3860eb){_0x3860eb=_0x3860eb||0x1f4;return function(_0x405860){logger[_0x2800('0x1e')](_0x405860['stack']);if(_0x405860[_0x2800('0x1f')]){delete _0x405860[_0x2800('0x1f')];}_0x6337a2[_0x2800('0x13')](_0x3860eb)[_0x2800('0x20')](_0x405860);};}exports[_0x2800('0x21')]=function(_0x5ec8d8,_0x3858ca){var _0x1d0a53={};var _0x47f757=_[_0x2800('0x22')](db['MailInteraction'][_0x2800('0x23')],function(_0x22141a){return{'name':_0x22141a['fieldName'],'type':_0x22141a[_0x2800('0x24')][_0x2800('0x25')]};});_0x1d0a53=qs['getOptions'](_0x47f757,_0x5ec8d8);return interaction[_0x2800('0x26')](_0x2800('0x27'),_0x5ec8d8['query'],_0x5ec8d8[_0x2800('0x28')],_0x1d0a53,_0x47f757)[_0x2800('0x1c')](respondWithFilteredResult(_0x3858ca,_0x1d0a53))['catch'](handleError(_0x3858ca,null));};exports[_0x2800('0x29')]=function(_0x32fb46,_0x2bffd9){var _0x55f2d8={'raw':![],'where':{'id':_0x32fb46[_0x2800('0x2a')]['id']}},_0x489804={};_0x489804[_0x2800('0x2b')]=_[_0x2800('0x2c')](db['MailInteraction'][_0x2800('0x23')]);_0x489804[_0x2800('0x2d')]=_[_0x2800('0x2c')](_0x32fb46['query']);_0x489804[_0x2800('0x2e')]=_[_0x2800('0x2f')](_0x489804['model'],_0x489804[_0x2800('0x2d')]);_0x55f2d8['attributes']=_[_0x2800('0x2f')](_0x489804[_0x2800('0x2b')],qs[_0x2800('0x30')](_0x32fb46['query'][_0x2800('0x30')]));_0x55f2d8[_0x2800('0x31')]=_0x55f2d8[_0x2800('0x31')][_0x2800('0x32')]?_0x55f2d8[_0x2800('0x31')]:_0x489804['model'];if(_0x32fb46['query']['includeAll']){_0x55f2d8['include']=[{'all':!![]}];}_0x55f2d8=_[_0x2800('0x33')]({},_0x55f2d8,_0x32fb46[_0x2800('0x34')]);return db[_0x2800('0x35')]['find'](_0x55f2d8)[_0x2800('0x1c')](handleEntityNotFound(_0x2bffd9,null))['then'](respondWithResult(_0x2bffd9,null))[_0x2800('0x36')](handleError(_0x2bffd9,null));};exports[_0x2800('0x37')]=function(_0xc8858f,_0x340e6f){return db[_0x2800('0x35')]['create'](_0xc8858f[_0x2800('0x38')],{})[_0x2800('0x1c')](respondWithResult(_0x340e6f,0xc9))[_0x2800('0x36')](handleError(_0x340e6f,null));};exports[_0x2800('0x1b')]=function(_0x5a7a54,_0x5d11e8){if(_0x5a7a54['body']['id']){delete _0x5a7a54['body']['id'];}return db[_0x2800('0x35')][_0x2800('0x39')]({'where':{'id':_0x5a7a54[_0x2800('0x2a')]['id']}})[_0x2800('0x1c')](handleEntityNotFound(_0x5d11e8,null))[_0x2800('0x1c')](saveUpdates(_0x5a7a54[_0x2800('0x38')],null))['then'](respondWithResult(_0x5d11e8,null))[_0x2800('0x36')](handleError(_0x5d11e8,null));};exports['destroy']=function(_0x513b3a,_0x10e046){return db[_0x2800('0x35')][_0x2800('0x39')]({'where':{'id':_0x513b3a['params']['id']}})[_0x2800('0x1c')](handleEntityNotFound(_0x10e046,null))[_0x2800('0x1c')](removeEntity(_0x10e046,null))[_0x2800('0x36')](handleError(_0x10e046,null));};exports['describe']=function(_0x5bb9ce,_0x108401){return db['MailInteraction'][_0x2800('0x3a')]()['then'](respondWithResult(_0x108401,null))[_0x2800('0x36')](handleError(_0x108401,null));};exports[_0x2800('0x3b')]=function(_0x39f512,_0x14719b){return db[_0x2800('0x3c')][_0x2800('0x39')]({'where':{'id':_0x39f512[_0x2800('0x2a')]['id']}})['then'](handleEntityNotFound(_0x14719b,null))[_0x2800('0x1c')](function(_0x41a47c){if(_0x41a47c){return _0x41a47c[_0x2800('0x3b')](_0x39f512[_0x2800('0x38')][_0x2800('0x3d')],_[_0x2800('0x3e')](_0x39f512[_0x2800('0x38')],['ids','id'])||{});}})[_0x2800('0x1c')](respondWithResult(_0x14719b,null))[_0x2800('0x36')](handleError(_0x14719b,null));};exports[_0x2800('0x3f')]=function(_0x53fd04,_0xf7b25e){var _0x5897ba={'raw':![],'where':{}};var _0x4c060e={};var _0x573fd6={'count':0x0,'rows':[]};return db['MailInteraction'][_0x2800('0x40')]({'where':{'id':_0x53fd04['params']['id']}})['then'](handleEntityNotFound(_0xf7b25e,null))[_0x2800('0x1c')](function(_0x590fb8){if(_0x590fb8){_0x4c060e[_0x2800('0x2b')]=_['keys'](db[_0x2800('0x3c')]['rawAttributes']);_0x4c060e['query']=_[_0x2800('0x2c')](_0x53fd04[_0x2800('0x2d')]);_0x4c060e[_0x2800('0x2e')]=_[_0x2800('0x2f')](_0x4c060e['model'],_0x4c060e[_0x2800('0x2d')]);_0x5897ba['attributes']=_[_0x2800('0x2f')](_0x4c060e[_0x2800('0x2b')],qs['fields'](_0x53fd04[_0x2800('0x2d')][_0x2800('0x30')]));_0x5897ba[_0x2800('0x31')]=_0x5897ba[_0x2800('0x31')][_0x2800('0x32')]?_0x5897ba[_0x2800('0x31')]:_0x4c060e[_0x2800('0x2b')];if(!_0x53fd04[_0x2800('0x2d')][_0x2800('0x41')](_0x2800('0x42'))){_0x5897ba[_0x2800('0x15')]=qs[_0x2800('0x15')](_0x53fd04[_0x2800('0x2d')]['limit']);_0x5897ba[_0x2800('0x17')]=qs[_0x2800('0x17')](_0x53fd04[_0x2800('0x2d')]['offset']);}_0x5897ba['order']=qs[_0x2800('0x43')](_0x53fd04[_0x2800('0x2d')]['sort']);_0x5897ba[_0x2800('0x44')]=qs[_0x2800('0x2e')](_[_0x2800('0x45')](_0x53fd04[_0x2800('0x2d')],_0x4c060e[_0x2800('0x2e')]));_0x5897ba[_0x2800('0x44')][_0x2800('0x46')]=_0x590fb8['id'];if(_0x53fd04['query'][_0x2800('0x47')]){_0x5897ba[_0x2800('0x44')]=_[_0x2800('0x33')](_0x5897ba[_0x2800('0x44')],{'$or':_[_0x2800('0x22')](_0x5897ba[_0x2800('0x31')],function(_0x2d92bd){var _0x50836a={};_0x50836a[_0x2d92bd]={'$like':'%'+_0x53fd04[_0x2800('0x2d')][_0x2800('0x47')]+'%'};return _0x50836a;})});}if(_0x53fd04['query']['$gte']){var _0x15a26d=_0x53fd04[_0x2800('0x2d')][_0x2800('0x48')][_0x2800('0x49')](',');var _0x5de15d={};_0x5de15d[_0x15a26d[0x0]]={'$gte':moment(_0x15a26d[0x1])['format']('YYYY-MM-DD\x20HH:mm:ss')};_0x5897ba[_0x2800('0x44')]=_['merge'](_0x5897ba['where'],_0x5de15d);}_0x5897ba=_['merge']({},_0x5897ba,_0x53fd04[_0x2800('0x34')]);return db[_0x2800('0x3c')][_0x2800('0x16')]({'where':_0x5897ba[_0x2800('0x44')]})[_0x2800('0x1c')](function(_0x2c6261){_0x573fd6[_0x2800('0x16')]=_0x2c6261;if(_0x53fd04['query'][_0x2800('0x4a')]){_0x5897ba['include']=[{'all':!![]}];}return db[_0x2800('0x3c')][_0x2800('0x26')](_0x5897ba);})['then'](function(_0xbd619e){if(_0x53fd04[_0x2800('0x2d')][_0x2800('0x4b')]===_0x2800('0x4c')){for(var _0x320363=0x0;_0x320363<_0xbd619e['length'];_0x320363++){_0xbd619e[_0x320363][_0x2800('0x38')]=juice(_0xbd619e[_0x320363][_0x2800('0x38')]);}}_0x573fd6[_0x2800('0x4d')]=_0xbd619e;return _0x573fd6;});}})['then'](respondWithFilteredResult(_0xf7b25e,_0x5897ba))[_0x2800('0x36')](handleError(_0xf7b25e,null));};exports[_0x2800('0x4e')]=function(_0x480b64,_0x14ff7d){return db[_0x2800('0x35')][_0x2800('0x39')]({'where':{'id':_0x480b64[_0x2800('0x2a')]['id']}})['then'](handleEntityNotFound(_0x14ff7d,null))['then'](function(_0x20618b){if(_0x20618b){return _0x20618b[_0x2800('0x4f')](_0x480b64['body']['ids'],_[_0x2800('0x3e')](_0x480b64[_0x2800('0x38')],[_0x2800('0x3d'),'id'])||{})[_0x2800('0x50')](function(){return db[_0x2800('0x51')]['findAll']({'attributes':['id','name','color'],'where':{'id':_0x480b64[_0x2800('0x38')][_0x2800('0x3d')]}});})[_0x2800('0x1c')](function(_0x2ec835){socket[_0x2800('0x52')]('mailInteractionTags:save',{'id':Number(_0x480b64[_0x2800('0x2a')]['id']),'tags':_0x2ec835||[]});return{'id':Number(_0x480b64[_0x2800('0x2a')]['id']),'tags':_0x2ec835||[]};});}})[_0x2800('0x1c')](respondWithResult(_0x14ff7d,null))[_0x2800('0x36')](handleError(_0x14ff7d,null));};exports[_0x2800('0x53')]=function(_0x444711,_0x1162c7){return db[_0x2800('0x35')][_0x2800('0x39')]({'where':{'id':_0x444711[_0x2800('0x2a')]['id']}})[_0x2800('0x1c')](handleEntityNotFound(_0x1162c7,null))[_0x2800('0x1c')](function(_0x15925c){if(_0x15925c){return _0x15925c[_0x2800('0x53')](_0x444711['query'][_0x2800('0x3d')]);}})[_0x2800('0x1c')](respondWithStatusCode(_0x1162c7,null))[_0x2800('0x36')](handleError(_0x1162c7,null));};exports['download']=function(_0x29eb83,_0x4edba2){var _0x3f2f0a=moment()['unix']()['toString']();var _0x530027=path[_0x2800('0x54')](config[_0x2800('0x55')],_0x2800('0x56'),'files',_0x2800('0x57'));var _0x3d1711=path[_0x2800('0x54')](config['root'],_0x2800('0x56'),'files',_0x2800('0x58'));var _0x26739a=path[_0x2800('0x54')](_0x530027,_0x3f2f0a);var _0x591594=util['format']('transcript-%d-%s.zip',_0x29eb83[_0x2800('0x2a')]['id'],_0x3f2f0a);var _0x123507=path[_0x2800('0x54')](_0x530027,_0x591594);var _0x1ef03b=[];if(_0x29eb83[_0x2800('0x2d')][_0x2800('0x58')]){_0x1ef03b[_0x2800('0x59')]({'model':db[_0x2800('0x5a')],'as':_0x2800('0x5b'),'raw':!![]});}var _0x6ad567=[{'model':db['MailMessage'],'as':_0x2800('0x5c'),'attributes':['id','body',_0x2800('0x5d'),'to','cc','bcc',_0x2800('0x5e'),_0x2800('0x5f')],'where':{'secret':![]},'order':qs['sort']('id'),'include':_0x1ef03b}];return db[_0x2800('0x35')]['find']({'where':{'id':_0x29eb83[_0x2800('0x2a')]['id']},'include':_0x6ad567})[_0x2800('0x1c')](handleEntityNotFound(_0x4edba2,null))[_0x2800('0x1c')](function(_0x27a733){if(_0x27a733&&_0x27a733[_0x2800('0x5c')]){var _0x3c25ba=_0x27a733[_0x2800('0x60')]({'plain':!![]});fs['mkdirSync'](_0x26739a);return BPromise[_0x2800('0x61')](_0x3c25ba['Messages'],function(_0x29a576,_0x2000ca){var _0x12a4df={'from':_0x29a576[_0x2800('0x5d')],'to':_0x29a576['to']||_0x2800('0x62'),'subject':_0x29a576['subject'],'html':htmlEntities['decode'](_0x29a576[_0x2800('0x38')]),'headers':{'Date':moment(_0x29a576[_0x2800('0x5f')])[_0x2800('0x63')](_0x2800('0x64'))},'attachments':[]};if(_0x29a576['cc']){_0x12a4df['headers']['Cc']=_0x29a576['cc'];}if(_0x29a576[_0x2800('0x65')]){_0x12a4df[_0x2800('0x66')][_0x2800('0x67')]=_0x29a576[_0x2800('0x65')];}return new BPromise(function(_0x568995,_0x18cd30){if(_0x29a576['Attachments']){for(var _0x483ee2=0x0;_0x483ee2<_0x29a576['Attachments'][_0x2800('0x32')];_0x483ee2++){var _0xe2afda=_0x29a576[_0x2800('0x5b')][_0x483ee2];var _0x3a6b58=path[_0x2800('0x54')](_0x3d1711,_0xe2afda[_0x2800('0x68')]);if(fs['existsSync'](_0x3a6b58)){_0x12a4df[_0x2800('0x58')][_0x2800('0x59')]({'name':_0xe2afda['name'],'contentType':_0xe2afda['type'],'data':fs[_0x2800('0x69')](_0x3a6b58)});}}}emlformat[_0x2800('0x6a')](_0x12a4df,function(_0x408f8f,_0x32fb3a){if(_0x408f8f)return _0x18cd30(_0x408f8f);fs[_0x2800('0x6b')](path[_0x2800('0x54')](_0x26739a,util['format'](_0x2800('0x6c'),_0x2000ca)),_0x32fb3a);return _0x568995(_0x32fb3a);});});})[_0x2800('0x1c')](function(){return new BPromise(function(_0x5a694f,_0x5c642c){zipdir(_0x26739a,{'saveTo':_0x123507},function(_0x57f732,_0x32c44e){if(_0x57f732)return _0x5c642c(_0x57f732);return _0x5a694f(_0x32c44e);});})[_0x2800('0x1c')](function(){return new BPromise(function(_0x111d62,_0x4a9b96){rimraf(_0x26739a,function(_0x4403ee){if(_0x4403ee)_0x4a9b96(_0x4403ee);return _0x111d62();});});})[_0x2800('0x1c')](function(){return _0x4edba2[_0x2800('0x6d')](_0x123507,_0x591594,function(_0x311c73){if(!_0x311c73)fs['unlinkSync'](_0x123507);});});});}else{return _0x4edba2[_0x2800('0x6e')](0xc8);}})['catch'](handleError(_0x4edba2,null));};
\ No newline at end of file
+var _0xe2d2=['fields','attributes','length','includeAll','merge','options','find','create','body','describe','MailMessage','ids','omit','getMessages','findOne','hasOwnProperty','nolimit','order','where','pick','MailInteractionId','filter','$gte','split','YYYY-MM-DD\x20HH:mm:ss','include','inlineCss','true','addTags','setTags','spread','color','emit','mailInteractionTags:save','removeTags','download','toString','join','server','files','tmp','attachments','transcript-%d-%s.zip','push','Attachment','Attachments','Messages','subject','sort','get','each','from','missing.recipient@your.company.com','decode','createdAt','format','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','Bcc','bcc','basename','existsSync','readFileSync','writeFileSync','message%d.eml','unlinkSync','eml-format','rimraf','zip-dir','moment','path','lodash','juice','ioredis','../../components/interaction/service','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','html-entities','redis','defaults','localhost','socket.io-emitter','./mailInteraction.socket','sendStatus','end','status','offset','undefined','limit','count','set','json','update','destroy','then','error','stack','name','send','index','map','MailInteraction','rawAttributes','type','key','getOptions','findAll','mail','query','user','catch','params','model','keys','filters','intersection'];(function(_0x4fa0ea,_0x2cd534){var _0x51d027=function(_0xe67342){while(--_0xe67342){_0x4fa0ea['push'](_0x4fa0ea['shift']());}};_0x51d027(++_0x2cd534);}(_0xe2d2,0x1a7));var _0x2e2d=function(_0x169c95,_0x16914c){_0x169c95=_0x169c95-0x0;var _0x5842fa=_0xe2d2[_0x169c95];return _0x5842fa;};'use strict';var emlformat=require(_0x2e2d('0x0'));var rimraf=require(_0x2e2d('0x1'));var zipdir=require(_0x2e2d('0x2'));var moment=require(_0x2e2d('0x3'));var BPromise=require('bluebird');var util=require('util');var path=require(_0x2e2d('0x4'));var fs=require('fs');var _=require(_0x2e2d('0x5'));var juice=require(_0x2e2d('0x6'));var Redis=require(_0x2e2d('0x7'));var interaction=require(_0x2e2d('0x8'));var qs=require(_0x2e2d('0x9'));var logger=require(_0x2e2d('0xa'))(_0x2e2d('0xb'));var config=require(_0x2e2d('0xc'));var db=require(_0x2e2d('0xd'))['db'];var htmlEntities=require(_0x2e2d('0xe'));config[_0x2e2d('0xf')]=_[_0x2e2d('0x10')](config[_0x2e2d('0xf')],{'host':_0x2e2d('0x11'),'port':0x18eb});var socket=require(_0x2e2d('0x12'))(new Redis(config[_0x2e2d('0xf')]));require(_0x2e2d('0x13'))['register'](socket);function respondWithStatusCode(_0x5bd32c,_0x5ec56b){_0x5ec56b=_0x5ec56b||0xcc;return function(_0x17ce0a){if(_0x17ce0a){return _0x5bd32c[_0x2e2d('0x14')](_0x5ec56b);}return _0x5bd32c['status'](_0x5ec56b)[_0x2e2d('0x15')]();};}function respondWithResult(_0x5bcc36,_0x35a5f5){_0x35a5f5=_0x35a5f5||0xc8;return function(_0x2e3ac7){if(_0x2e3ac7){return _0x5bcc36[_0x2e2d('0x16')](_0x35a5f5)['json'](_0x2e3ac7);}};}function respondWithFilteredResult(_0x13ad04,_0x5a9773){return function(_0x1146d5){if(_0x1146d5){var _0x50a0b3=typeof _0x5a9773[_0x2e2d('0x17')]===_0x2e2d('0x18')&&typeof _0x5a9773[_0x2e2d('0x19')]===_0x2e2d('0x18');var _0x480682=_0x1146d5['count'];var _0x211b89=_0x50a0b3?0x0:_0x5a9773[_0x2e2d('0x17')];var _0x4ab692=_0x50a0b3?_0x1146d5[_0x2e2d('0x1a')]:_0x5a9773[_0x2e2d('0x17')]+_0x5a9773[_0x2e2d('0x19')];var _0x95f36e;if(_0x4ab692>=_0x480682){_0x4ab692=_0x480682;_0x95f36e=0xc8;}else{_0x95f36e=0xce;}_0x13ad04['status'](_0x95f36e);return _0x13ad04[_0x2e2d('0x1b')]('Content-Range',_0x211b89+'-'+_0x4ab692+'/'+_0x480682)[_0x2e2d('0x1c')](_0x1146d5);}return null;};}function saveUpdates(_0x1f4bd4){return function(_0x10ff3d){if(_0x10ff3d){return _0x10ff3d[_0x2e2d('0x1d')](_0x1f4bd4)['then'](function(_0x2f1ee7){return _0x2f1ee7;});}return null;};}function removeEntity(_0x49d6ec){return function(_0x396444){if(_0x396444){return _0x396444[_0x2e2d('0x1e')]()[_0x2e2d('0x1f')](function(){_0x49d6ec[_0x2e2d('0x16')](0xcc)[_0x2e2d('0x15')]();});}};}function handleEntityNotFound(_0x371356){return function(_0x3dd774){if(!_0x3dd774){_0x371356[_0x2e2d('0x14')](0x194);}return _0x3dd774;};}function handleError(_0x4449d8,_0x5e287d){_0x5e287d=_0x5e287d||0x1f4;return function(_0x1e1605){logger[_0x2e2d('0x20')](_0x1e1605[_0x2e2d('0x21')]);if(_0x1e1605[_0x2e2d('0x22')]){delete _0x1e1605[_0x2e2d('0x22')];}_0x4449d8[_0x2e2d('0x16')](_0x5e287d)[_0x2e2d('0x23')](_0x1e1605);};}exports[_0x2e2d('0x24')]=function(_0x5b03bd,_0x47b7b3){var _0xe1e95e={};var _0x338db6=_[_0x2e2d('0x25')](db[_0x2e2d('0x26')][_0x2e2d('0x27')],function(_0x5d0851){return{'name':_0x5d0851['fieldName'],'type':_0x5d0851[_0x2e2d('0x28')][_0x2e2d('0x29')]};});_0xe1e95e=qs[_0x2e2d('0x2a')](_0x338db6,_0x5b03bd);return interaction[_0x2e2d('0x2b')](_0x2e2d('0x2c'),_0x5b03bd[_0x2e2d('0x2d')],_0x5b03bd[_0x2e2d('0x2e')],_0xe1e95e,_0x338db6)[_0x2e2d('0x1f')](respondWithFilteredResult(_0x47b7b3,_0xe1e95e))[_0x2e2d('0x2f')](handleError(_0x47b7b3,null));};exports['show']=function(_0x449521,_0x165057){var _0x32471f={'raw':![],'where':{'id':_0x449521[_0x2e2d('0x30')]['id']}},_0xcc4d68={};_0xcc4d68[_0x2e2d('0x31')]=_[_0x2e2d('0x32')](db[_0x2e2d('0x26')][_0x2e2d('0x27')]);_0xcc4d68[_0x2e2d('0x2d')]=_[_0x2e2d('0x32')](_0x449521['query']);_0xcc4d68[_0x2e2d('0x33')]=_[_0x2e2d('0x34')](_0xcc4d68[_0x2e2d('0x31')],_0xcc4d68[_0x2e2d('0x2d')]);_0x32471f['attributes']=_['intersection'](_0xcc4d68['model'],qs[_0x2e2d('0x35')](_0x449521[_0x2e2d('0x2d')][_0x2e2d('0x35')]));_0x32471f[_0x2e2d('0x36')]=_0x32471f[_0x2e2d('0x36')][_0x2e2d('0x37')]?_0x32471f[_0x2e2d('0x36')]:_0xcc4d68['model'];if(_0x449521[_0x2e2d('0x2d')][_0x2e2d('0x38')]){_0x32471f['include']=[{'all':!![]}];}_0x32471f=_[_0x2e2d('0x39')]({},_0x32471f,_0x449521[_0x2e2d('0x3a')]);return db[_0x2e2d('0x26')][_0x2e2d('0x3b')](_0x32471f)[_0x2e2d('0x1f')](handleEntityNotFound(_0x165057,null))['then'](respondWithResult(_0x165057,null))[_0x2e2d('0x2f')](handleError(_0x165057,null));};exports['create']=function(_0x337b9e,_0xd8fb4){return db['MailInteraction'][_0x2e2d('0x3c')](_0x337b9e[_0x2e2d('0x3d')],{})[_0x2e2d('0x1f')](respondWithResult(_0xd8fb4,0xc9))[_0x2e2d('0x2f')](handleError(_0xd8fb4,null));};exports[_0x2e2d('0x1d')]=function(_0x199e4a,_0x3fe09a){if(_0x199e4a['body']['id']){delete _0x199e4a['body']['id'];}return db[_0x2e2d('0x26')][_0x2e2d('0x3b')]({'where':{'id':_0x199e4a[_0x2e2d('0x30')]['id']}})[_0x2e2d('0x1f')](handleEntityNotFound(_0x3fe09a,null))[_0x2e2d('0x1f')](saveUpdates(_0x199e4a[_0x2e2d('0x3d')],null))[_0x2e2d('0x1f')](respondWithResult(_0x3fe09a,null))[_0x2e2d('0x2f')](handleError(_0x3fe09a,null));};exports[_0x2e2d('0x1e')]=function(_0x32f4cf,_0x1a6066){return db[_0x2e2d('0x26')][_0x2e2d('0x3b')]({'where':{'id':_0x32f4cf[_0x2e2d('0x30')]['id']}})['then'](handleEntityNotFound(_0x1a6066,null))[_0x2e2d('0x1f')](removeEntity(_0x1a6066,null))[_0x2e2d('0x2f')](handleError(_0x1a6066,null));};exports[_0x2e2d('0x3e')]=function(_0x1b24a3,_0x2abee9){return db[_0x2e2d('0x26')][_0x2e2d('0x3e')]()['then'](respondWithResult(_0x2abee9,null))[_0x2e2d('0x2f')](handleError(_0x2abee9,null));};exports['addMessage']=function(_0x5afb73,_0x3db913){return db[_0x2e2d('0x3f')]['find']({'where':{'id':_0x5afb73['params']['id']}})[_0x2e2d('0x1f')](handleEntityNotFound(_0x3db913,null))[_0x2e2d('0x1f')](function(_0xefb518){if(_0xefb518){return _0xefb518['addMessage'](_0x5afb73['body'][_0x2e2d('0x40')],_[_0x2e2d('0x41')](_0x5afb73[_0x2e2d('0x3d')],[_0x2e2d('0x40'),'id'])||{});}})[_0x2e2d('0x1f')](respondWithResult(_0x3db913,null))[_0x2e2d('0x2f')](handleError(_0x3db913,null));};exports[_0x2e2d('0x42')]=function(_0x49dadb,_0x4547f5){var _0x183f5f={'raw':![],'where':{}};var _0x7114b7={};var _0x36de86={'count':0x0,'rows':[]};return db[_0x2e2d('0x26')][_0x2e2d('0x43')]({'where':{'id':_0x49dadb[_0x2e2d('0x30')]['id']}})[_0x2e2d('0x1f')](handleEntityNotFound(_0x4547f5,null))['then'](function(_0x12972d){if(_0x12972d){_0x7114b7[_0x2e2d('0x31')]=_[_0x2e2d('0x32')](db['MailMessage']['rawAttributes']);_0x7114b7[_0x2e2d('0x2d')]=_[_0x2e2d('0x32')](_0x49dadb['query']);_0x7114b7[_0x2e2d('0x33')]=_[_0x2e2d('0x34')](_0x7114b7['model'],_0x7114b7[_0x2e2d('0x2d')]);_0x183f5f['attributes']=_[_0x2e2d('0x34')](_0x7114b7[_0x2e2d('0x31')],qs[_0x2e2d('0x35')](_0x49dadb['query'][_0x2e2d('0x35')]));_0x183f5f[_0x2e2d('0x36')]=_0x183f5f[_0x2e2d('0x36')][_0x2e2d('0x37')]?_0x183f5f[_0x2e2d('0x36')]:_0x7114b7[_0x2e2d('0x31')];if(!_0x49dadb[_0x2e2d('0x2d')][_0x2e2d('0x44')](_0x2e2d('0x45'))){_0x183f5f['limit']=qs['limit'](_0x49dadb[_0x2e2d('0x2d')]['limit']);_0x183f5f[_0x2e2d('0x17')]=qs[_0x2e2d('0x17')](_0x49dadb[_0x2e2d('0x2d')][_0x2e2d('0x17')]);}_0x183f5f[_0x2e2d('0x46')]=qs['sort'](_0x49dadb['query']['sort']);_0x183f5f[_0x2e2d('0x47')]=qs['filters'](_[_0x2e2d('0x48')](_0x49dadb[_0x2e2d('0x2d')],_0x7114b7[_0x2e2d('0x33')]));_0x183f5f[_0x2e2d('0x47')][_0x2e2d('0x49')]=_0x12972d['id'];if(_0x49dadb['query']['filter']){_0x183f5f[_0x2e2d('0x47')]=_[_0x2e2d('0x39')](_0x183f5f[_0x2e2d('0x47')],{'$or':_[_0x2e2d('0x25')](_0x183f5f[_0x2e2d('0x36')],function(_0x46017b){var _0x1b43c2={};_0x1b43c2[_0x46017b]={'$like':'%'+_0x49dadb[_0x2e2d('0x2d')][_0x2e2d('0x4a')]+'%'};return _0x1b43c2;})});}if(_0x49dadb['query'][_0x2e2d('0x4b')]){var _0x55c558=_0x49dadb['query']['$gte'][_0x2e2d('0x4c')](',');var _0x579245={};_0x579245[_0x55c558[0x0]]={'$gte':moment(_0x55c558[0x1])['format'](_0x2e2d('0x4d'))};_0x183f5f[_0x2e2d('0x47')]=_[_0x2e2d('0x39')](_0x183f5f[_0x2e2d('0x47')],_0x579245);}_0x183f5f=_[_0x2e2d('0x39')]({},_0x183f5f,_0x49dadb[_0x2e2d('0x3a')]);return db[_0x2e2d('0x3f')][_0x2e2d('0x1a')]({'where':_0x183f5f[_0x2e2d('0x47')]})[_0x2e2d('0x1f')](function(_0x2da3af){_0x36de86[_0x2e2d('0x1a')]=_0x2da3af;if(_0x49dadb['query'][_0x2e2d('0x38')]){_0x183f5f[_0x2e2d('0x4e')]=[{'all':!![]}];}return db[_0x2e2d('0x3f')][_0x2e2d('0x2b')](_0x183f5f);})[_0x2e2d('0x1f')](function(_0x6fd9cd){if(_0x49dadb[_0x2e2d('0x2d')][_0x2e2d('0x4f')]===_0x2e2d('0x50')){for(var _0x1515b2=0x0;_0x1515b2<_0x6fd9cd[_0x2e2d('0x37')];_0x1515b2++){_0x6fd9cd[_0x1515b2][_0x2e2d('0x3d')]=juice(_0x6fd9cd[_0x1515b2][_0x2e2d('0x3d')]);}}_0x36de86['rows']=_0x6fd9cd;return _0x36de86;});}})['then'](respondWithFilteredResult(_0x4547f5,_0x183f5f))[_0x2e2d('0x2f')](handleError(_0x4547f5,null));};exports[_0x2e2d('0x51')]=function(_0x1b590c,_0x1b17ce){return db[_0x2e2d('0x26')][_0x2e2d('0x3b')]({'where':{'id':_0x1b590c[_0x2e2d('0x30')]['id']}})[_0x2e2d('0x1f')](handleEntityNotFound(_0x1b17ce,null))[_0x2e2d('0x1f')](function(_0x4dd787){if(_0x4dd787){return _0x4dd787[_0x2e2d('0x52')](_0x1b590c['body'][_0x2e2d('0x40')],_[_0x2e2d('0x41')](_0x1b590c['body'],[_0x2e2d('0x40'),'id'])||{})[_0x2e2d('0x53')](function(){return db['Tag'][_0x2e2d('0x2b')]({'attributes':['id',_0x2e2d('0x22'),_0x2e2d('0x54')],'where':{'id':_0x1b590c[_0x2e2d('0x3d')]['ids']}});})[_0x2e2d('0x1f')](function(_0x59a38c){socket[_0x2e2d('0x55')](_0x2e2d('0x56'),{'id':Number(_0x1b590c[_0x2e2d('0x30')]['id']),'tags':_0x59a38c||[]});return{'id':Number(_0x1b590c[_0x2e2d('0x30')]['id']),'tags':_0x59a38c||[]};});}})['then'](respondWithResult(_0x1b17ce,null))[_0x2e2d('0x2f')](handleError(_0x1b17ce,null));};exports['removeTags']=function(_0x4cacf8,_0x522ca2){return db[_0x2e2d('0x26')][_0x2e2d('0x3b')]({'where':{'id':_0x4cacf8['params']['id']}})['then'](handleEntityNotFound(_0x522ca2,null))[_0x2e2d('0x1f')](function(_0x4d91c6){if(_0x4d91c6){return _0x4d91c6[_0x2e2d('0x57')](_0x4cacf8['query']['ids']);}})[_0x2e2d('0x1f')](respondWithStatusCode(_0x522ca2,null))[_0x2e2d('0x2f')](handleError(_0x522ca2,null));};exports[_0x2e2d('0x58')]=function(_0x2fe0e4,_0x2b5310){var _0x3dfae0=moment()['unix']()[_0x2e2d('0x59')]();var _0x2213fb=path[_0x2e2d('0x5a')](config['root'],_0x2e2d('0x5b'),_0x2e2d('0x5c'),_0x2e2d('0x5d'));var _0x5eb2c0=path[_0x2e2d('0x5a')](config['root'],_0x2e2d('0x5b'),'files',_0x2e2d('0x5e'));var _0x1d28fa=path[_0x2e2d('0x5a')](_0x2213fb,_0x3dfae0);var _0xb7d6da=util['format'](_0x2e2d('0x5f'),_0x2fe0e4[_0x2e2d('0x30')]['id'],_0x3dfae0);var _0x3a8c61=path[_0x2e2d('0x5a')](_0x2213fb,_0xb7d6da);var _0x1e72b5=[];if(_0x2fe0e4['query']['attachments']){_0x1e72b5[_0x2e2d('0x60')]({'model':db[_0x2e2d('0x61')],'as':_0x2e2d('0x62'),'raw':!![]});}var _0x31837a=[{'model':db[_0x2e2d('0x3f')],'as':_0x2e2d('0x63'),'attributes':['id','body','from','to','cc','bcc',_0x2e2d('0x64'),'createdAt'],'where':{'secret':![]},'order':qs[_0x2e2d('0x65')]('id'),'include':_0x1e72b5}];return db[_0x2e2d('0x26')]['find']({'where':{'id':_0x2fe0e4['params']['id']},'include':_0x31837a})['then'](handleEntityNotFound(_0x2b5310,null))['then'](function(_0x56ae5d){if(_0x56ae5d&&_0x56ae5d[_0x2e2d('0x63')]){var _0x3eaa30=_0x56ae5d[_0x2e2d('0x66')]({'plain':!![]});fs['mkdirSync'](_0x1d28fa);return BPromise[_0x2e2d('0x67')](_0x3eaa30[_0x2e2d('0x63')],function(_0x558c63,_0x1a20ea){var _0x3c6b22={'from':_0x558c63[_0x2e2d('0x68')],'to':_0x558c63['to']||_0x2e2d('0x69'),'subject':_0x558c63['subject'],'html':htmlEntities[_0x2e2d('0x6a')](_0x558c63[_0x2e2d('0x3d')]),'headers':{'Date':moment(_0x558c63[_0x2e2d('0x6b')])[_0x2e2d('0x6c')](_0x2e2d('0x6d'))},'attachments':[]};if(_0x558c63['cc']){_0x3c6b22[_0x2e2d('0x6e')]['Cc']=_0x558c63['cc'];}if(_0x558c63['bcc']){_0x3c6b22[_0x2e2d('0x6e')][_0x2e2d('0x6f')]=_0x558c63[_0x2e2d('0x70')];}return new BPromise(function(_0x329bfd,_0x3c213f){if(_0x558c63['Attachments']){for(var _0x28499b=0x0;_0x28499b<_0x558c63[_0x2e2d('0x62')][_0x2e2d('0x37')];_0x28499b++){var _0x1225dd=_0x558c63[_0x2e2d('0x62')][_0x28499b];var _0x307495=path['join'](_0x5eb2c0,_0x1225dd[_0x2e2d('0x71')]);if(fs[_0x2e2d('0x72')](_0x307495)){_0x3c6b22[_0x2e2d('0x5e')][_0x2e2d('0x60')]({'name':_0x1225dd[_0x2e2d('0x22')],'contentType':_0x1225dd[_0x2e2d('0x28')],'data':fs[_0x2e2d('0x73')](_0x307495)});}}}emlformat['build'](_0x3c6b22,function(_0x20ba16,_0x2ae279){if(_0x20ba16)return _0x3c213f(_0x20ba16);fs[_0x2e2d('0x74')](path[_0x2e2d('0x5a')](_0x1d28fa,util[_0x2e2d('0x6c')](_0x2e2d('0x75'),_0x1a20ea)),_0x2ae279);return _0x329bfd(_0x2ae279);});});})[_0x2e2d('0x1f')](function(){return new BPromise(function(_0x473b44,_0x230caf){zipdir(_0x1d28fa,{'saveTo':_0x3a8c61},function(_0x150d39,_0xbeb04a){if(_0x150d39)return _0x230caf(_0x150d39);return _0x473b44(_0xbeb04a);});})[_0x2e2d('0x1f')](function(){return new BPromise(function(_0x27a3ed,_0x46bf29){rimraf(_0x1d28fa,function(_0x5d16eb){if(_0x5d16eb)_0x46bf29(_0x5d16eb);return _0x27a3ed();});});})[_0x2e2d('0x1f')](function(){return _0x2b5310['download'](_0x3a8c61,_0xb7d6da,function(_0x4e3d5f){if(!_0x4e3d5f)fs[_0x2e2d('0x76')](_0x3a8c61);});});});}else{return _0x2b5310['sendStatus'](0xc8);}})['catch'](handleError(_0x2b5310,null));};
\ No newline at end of file
index 794061c..c15a501 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4a7c=['MailMessage','setMaxListeners','save','update','getUsers','then','setDataValue','Users','unreadMessages','length','emit','catch','exports','events','../../mysqldb','MailInteraction'];(function(_0x19e829,_0x2f55b4){var _0x188db=function(_0xbeb6c9){while(--_0xbeb6c9){_0x19e829['push'](_0x19e829['shift']());}};_0x188db(++_0x2f55b4);}(_0x4a7c,0x15d));var _0xc4a7=function(_0xb77c9c,_0x49d278){_0xb77c9c=_0xb77c9c-0x0;var _0x186557=_0x4a7c[_0xb77c9c];return _0x186557;};'use strict';var EventEmitter=require(_0xc4a7('0x0'));var MailInteraction=require(_0xc4a7('0x1'))['db'][_0xc4a7('0x2')];var MailMessage=require(_0xc4a7('0x1'))['db'][_0xc4a7('0x3')];var MailInteractionEvents=new EventEmitter();MailInteractionEvents[_0xc4a7('0x4')](0x0);var events={'afterCreate':_0xc4a7('0x5'),'afterUpdate':_0xc4a7('0x6'),'afterDestroy':'remove'};function emitEvent(_0x5edc95){return function(_0x474496,_0x3775e3,_0x40d26b){_0x474496[_0xc4a7('0x7')]({'attributes':['id'],'raw':!![]})[_0xc4a7('0x8')](function(_0x191ecc){_0x474496[_0xc4a7('0x9')](_0xc4a7('0xa'),_0x191ecc['map'](function(_0x526139){return{'id':_0x526139['id']};}));return MailMessage['findAll']({'where':{'MailInteractionId':_0x474496['id'],'direction':'in','read':![]},'raw':!![]});})[_0xc4a7('0x8')](function(_0x2973dc){_0x474496[_0xc4a7('0x9')](_0xc4a7('0xb'),_0x2973dc[_0xc4a7('0xc')]);MailInteractionEvents[_0xc4a7('0xd')](_0x5edc95+':'+_0x474496['id'],_0x474496);MailInteractionEvents[_0xc4a7('0xd')](_0x5edc95,_0x474496);_0x40d26b(null);})[_0xc4a7('0xe')](_0x40d26b(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailInteraction['hook'](e,emitEvent(event));}}module[_0xc4a7('0xf')]=MailInteractionEvents;
\ No newline at end of file
+var _0x9b2a=['update','getUsers','setDataValue','Users','findAll','then','unreadMessages','emit','hook','exports','events','MailInteraction','../../mysqldb','MailMessage','save'];(function(_0x5c0393,_0x21a70b){var _0x3ca175=function(_0x4736d5){while(--_0x4736d5){_0x5c0393['push'](_0x5c0393['shift']());}};_0x3ca175(++_0x21a70b);}(_0x9b2a,0x127));var _0xa9b2=function(_0xb69614,_0x43014d){_0xb69614=_0xb69614-0x0;var _0x2fce72=_0x9b2a[_0xb69614];return _0x2fce72;};'use strict';var EventEmitter=require(_0xa9b2('0x0'));var MailInteraction=require('../../mysqldb')['db'][_0xa9b2('0x1')];var MailMessage=require(_0xa9b2('0x2'))['db'][_0xa9b2('0x3')];var MailInteractionEvents=new EventEmitter();MailInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xa9b2('0x4'),'afterUpdate':_0xa9b2('0x5'),'afterDestroy':'remove'};function emitEvent(_0x524e4b){return function(_0x31b8b3,_0x1fc128,_0x181a8f){_0x31b8b3[_0xa9b2('0x6')]({'attributes':['id'],'raw':!![]})['then'](function(_0x29afe0){_0x31b8b3[_0xa9b2('0x7')](_0xa9b2('0x8'),_0x29afe0['map'](function(_0x2f0a85){return{'id':_0x2f0a85['id']};}));return MailMessage[_0xa9b2('0x9')]({'where':{'MailInteractionId':_0x31b8b3['id'],'direction':'in','read':![]},'raw':!![]});})[_0xa9b2('0xa')](function(_0x404ad5){_0x31b8b3[_0xa9b2('0x7')](_0xa9b2('0xb'),_0x404ad5['length']);MailInteractionEvents[_0xa9b2('0xc')](_0x524e4b+':'+_0x31b8b3['id'],_0x31b8b3);MailInteractionEvents['emit'](_0x524e4b,_0x31b8b3);_0x181a8f(null);})['catch'](_0x181a8f(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailInteraction[_0xa9b2('0xd')](e,emitEvent(event));}}module[_0xa9b2('0xe')]=MailInteractionEvents;
\ No newline at end of file
index ded0dde..2be1cba 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd74f=['subject','FULLTEXT','substatus','format','closedAt','YYYY-MM-DD\x20HH:mm:ss','changed','closed','substatusAt','models','get','MailMessage','update','then','catch','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./mailInteraction.attributes','exports','define','MailInteraction','mail_interactions','fti_mail_interactions'];(function(_0x3c2a69,_0x4c8b41){var _0x596bc8=function(_0x1b4b7c){while(--_0x1b4b7c){_0x3c2a69['push'](_0x3c2a69['shift']());}};_0x596bc8(++_0x4c8b41);}(_0xd74f,0xf8));var _0xfd74=function(_0xae324d,_0xce7397){_0xae324d=_0xae324d-0x0;var _0x102407=_0xd74f[_0xae324d];return _0x102407;};'use strict';var _=require(_0xfd74('0x0'));var util=require(_0xfd74('0x1'));var logger=require(_0xfd74('0x2'))(_0xfd74('0x3'));var moment=require(_0xfd74('0x4'));var BPromise=require(_0xfd74('0x5'));var rp=require(_0xfd74('0x6'));var fs=require('fs');var path=require(_0xfd74('0x7'));var rimraf=require(_0xfd74('0x8'));var config=require(_0xfd74('0x9'));var attributes=require(_0xfd74('0xa'));module[_0xfd74('0xb')]=function(_0x57267a,_0x2e22a8){return _0x57267a[_0xfd74('0xc')](_0xfd74('0xd'),attributes,{'tableName':_0xfd74('0xe'),'paranoid':![],'indexes':[{'name':_0xfd74('0xf'),'fields':[_0xfd74('0x10'),'to'],'type':_0xfd74('0x11')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x41031c,_0x433219,_0x540b40){if(_0x41031c[_0xfd74('0x12')]){_0x41031c['substatusAt']=moment()[_0xfd74('0x13')]('YYYY-MM-DD\x20HH:mm:ss');}if(_0x41031c['closed']){_0x41031c[_0xfd74('0x14')]=moment()[_0xfd74('0x13')](_0xfd74('0x15'));}_0x540b40(null,_0x433219);},'beforeUpdate':function(_0x305b00,_0x5a7567,_0x247119){if(_0x305b00[_0xfd74('0x16')](_0xfd74('0x12'))){_0x305b00['substatusAt']=_0x305b00[_0xfd74('0x12')]?moment()[_0xfd74('0x13')]('YYYY-MM-DD\x20HH:mm:ss'):null;}if(_0x305b00[_0xfd74('0x16')](_0xfd74('0x17'))){_0x305b00[_0xfd74('0x14')]=moment()['format'](_0xfd74('0x15'));_0x305b00['substatus']=null;_0x305b00[_0xfd74('0x18')]=null;}_0x247119(null,_0x305b00);},'afterUpdate':function(_0x8bd527,_0x739362,_0x3eee33){var _0x51cabb=_0x57267a[_0xfd74('0x19')];var _0x540020=_0x8bd527[_0xfd74('0x1a')]({'plain':!![]});if(_0x540020[_0xfd74('0x17')]){return _0x51cabb[_0xfd74('0x1b')][_0xfd74('0x1c')]({'read':!![]},{'where':{'MailInteractionId':_0x540020['id']}})[_0xfd74('0x1d')](function(){_0x3eee33();})[_0xfd74('0x1e')](function(_0x5b6092){_0x3eee33(_0x5b6092);});}else{_0x3eee33();}}},'charset':_0xfd74('0x1f'),'collate':_0xfd74('0x20')});};
\ No newline at end of file
+var _0xd59c=['define','MailInteraction','mail_interactions','fti_mail_interactions','subject','substatus','substatusAt','YYYY-MM-DD\x20HH:mm:ss','closed','closedAt','format','changed','models','catch','utf8mb4','utf8mb4_unicode_ci','lodash','util','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./mailInteraction.attributes','exports'];(function(_0x4c2b60,_0x3017c7){var _0x103b88=function(_0x1ae63b){while(--_0x1ae63b){_0x4c2b60['push'](_0x4c2b60['shift']());}};_0x103b88(++_0x3017c7);}(_0xd59c,0x16f));var _0xcd59=function(_0x4f9a4f,_0x331852){_0x4f9a4f=_0x4f9a4f-0x0;var _0x1bdb5f=_0xd59c[_0x4f9a4f];return _0x1bdb5f;};'use strict';var _=require(_0xcd59('0x0'));var util=require(_0xcd59('0x1'));var logger=require('../../config/logger')(_0xcd59('0x2'));var moment=require(_0xcd59('0x3'));var BPromise=require(_0xcd59('0x4'));var rp=require(_0xcd59('0x5'));var fs=require('fs');var path=require(_0xcd59('0x6'));var rimraf=require(_0xcd59('0x7'));var config=require(_0xcd59('0x8'));var attributes=require(_0xcd59('0x9'));module[_0xcd59('0xa')]=function(_0xdb9cae,_0x36bed3){return _0xdb9cae[_0xcd59('0xb')](_0xcd59('0xc'),attributes,{'tableName':_0xcd59('0xd'),'paranoid':![],'indexes':[{'name':_0xcd59('0xe'),'fields':[_0xcd59('0xf'),'to'],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x397e81,_0x1c54fd,_0x5c6925){if(_0x397e81[_0xcd59('0x10')]){_0x397e81[_0xcd59('0x11')]=moment()['format'](_0xcd59('0x12'));}if(_0x397e81[_0xcd59('0x13')]){_0x397e81[_0xcd59('0x14')]=moment()[_0xcd59('0x15')](_0xcd59('0x12'));}_0x5c6925(null,_0x1c54fd);},'beforeUpdate':function(_0x2c31e1,_0x145259,_0xc94a6c){if(_0x2c31e1[_0xcd59('0x16')](_0xcd59('0x10'))){_0x2c31e1[_0xcd59('0x11')]=_0x2c31e1[_0xcd59('0x10')]?moment()['format'](_0xcd59('0x12')):null;}if(_0x2c31e1[_0xcd59('0x16')](_0xcd59('0x13'))){_0x2c31e1[_0xcd59('0x14')]=moment()['format'](_0xcd59('0x12'));_0x2c31e1['substatus']=null;_0x2c31e1[_0xcd59('0x11')]=null;}_0xc94a6c(null,_0x2c31e1);},'afterUpdate':function(_0x25c759,_0xb62845,_0x39ffda){var _0x12e433=_0xdb9cae[_0xcd59('0x17')];var _0x1986ce=_0x25c759['get']({'plain':!![]});if(_0x1986ce[_0xcd59('0x13')]){return _0x12e433['MailMessage']['update']({'read':!![]},{'where':{'MailInteractionId':_0x1986ce['id']}})['then'](function(){_0x39ffda();})[_0xcd59('0x18')](function(_0x26131c){_0x39ffda(_0x26131c);});}else{_0x39ffda();}}},'charset':_0xcd59('0x19'),'collate':_0xcd59('0x1a')});};
\ No newline at end of file
index 1f031c2..e8ffbe0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x66da=['defaults','localhost','socket.io-emitter','./mailInteraction.socket','register','request','MailInteraction,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','info','catch','UpdateMailInteraction','MailInteraction','update','body','options','raw','where','attributes','limit','AddTagsToMailInteraction','find','then','addTags','omit','ids','AddTags','lodash','util','moment','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis'];(function(_0x5d8631,_0x44944b){var _0x34c15e=function(_0x4448f8){while(--_0x4448f8){_0x5d8631['push'](_0x5d8631['shift']());}};_0x34c15e(++_0x44944b);}(_0x66da,0x16f));var _0xa66d=function(_0x35e92e,_0x21581b){_0x35e92e=_0x35e92e-0x0;var _0x1205a8=_0x66da[_0x35e92e];return _0x1205a8;};'use strict';var _=require(_0xa66d('0x0'));var util=require(_0xa66d('0x1'));var moment=require(_0xa66d('0x2'));var BPromise=require(_0xa66d('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xa66d('0x4'));var logger=require(_0xa66d('0x5'))(_0xa66d('0x6'));var config=require(_0xa66d('0x7'));var jayson=require(_0xa66d('0x8'));var client=jayson['client'][_0xa66d('0x9')]({'port':0x232a});config[_0xa66d('0xa')]=_[_0xa66d('0xb')](config[_0xa66d('0xa')],{'host':_0xa66d('0xc'),'port':0x18eb});var socket=require(_0xa66d('0xd'))(new Redis(config[_0xa66d('0xa')]));require(_0xa66d('0xe'))[_0xa66d('0xf')](socket);function respondWithRpcPromise(_0x9becae,_0x22b38f,_0x1e65b0){return new BPromise(function(_0x4c0dde,_0x92016b){return client[_0xa66d('0x10')](_0x9becae,_0x1e65b0)['then'](function(_0x4906cd){logger['info'](_0xa66d('0x11'),_0x22b38f,'request\x20sent');logger[_0xa66d('0x12')]('MailInteraction,\x20%s,\x20%s,\x20%s',_0x22b38f,_0xa66d('0x13'),JSON[_0xa66d('0x14')](_0x4906cd));if(_0x4906cd['error']){if(_0x4906cd[_0xa66d('0x15')][_0xa66d('0x16')]===0x1f4){logger['error'](_0xa66d('0x11'),_0x22b38f,_0x4906cd['error'][_0xa66d('0x17')]);return _0x92016b(_0x4906cd['error'][_0xa66d('0x17')]);}logger[_0xa66d('0x15')]('MailInteraction,\x20%s,\x20%s',_0x22b38f,_0x4906cd[_0xa66d('0x15')][_0xa66d('0x17')]);return _0x4c0dde(_0x4906cd[_0xa66d('0x15')][_0xa66d('0x17')]);}else{logger[_0xa66d('0x18')]('MailInteraction,\x20%s,\x20%s',_0x22b38f,_0xa66d('0x13'));_0x4c0dde(_0x4906cd['result'][_0xa66d('0x17')]);}})[_0xa66d('0x19')](function(_0x55db3b){logger[_0xa66d('0x15')](_0xa66d('0x11'),_0x22b38f,_0x55db3b);_0x92016b(_0x55db3b);});});}exports[_0xa66d('0x1a')]=function(_0x3d0219){var _0x5082de=this;return new Promise(function(_0xee7546,_0x232fe3){return db[_0xa66d('0x1b')][_0xa66d('0x1c')](_0x3d0219[_0xa66d('0x1d')],{'raw':_0x3d0219[_0xa66d('0x1e')]?_0x3d0219['options'][_0xa66d('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3d0219['options']?_0x3d0219[_0xa66d('0x1e')][_0xa66d('0x20')]||null:null,'attributes':_0x3d0219[_0xa66d('0x1e')]?_0x3d0219[_0xa66d('0x1e')][_0xa66d('0x21')]||null:null,'limit':_0x3d0219[_0xa66d('0x1e')]?_0x3d0219['options'][_0xa66d('0x22')]||null:null})['then'](function(_0x8e3fe4){logger[_0xa66d('0x18')](_0xa66d('0x1a'),_0x3d0219);logger[_0xa66d('0x12')](_0xa66d('0x1a'),_0x3d0219,JSON['stringify'](_0x8e3fe4));_0xee7546(_0x8e3fe4);})['catch'](function(_0x1d51ca){logger[_0xa66d('0x15')]('UpdateMailInteraction',_0x1d51ca[_0xa66d('0x17')],_0x3d0219);_0x232fe3(_0x5082de['error'](0x1f4,_0x1d51ca[_0xa66d('0x17')]));});});};exports[_0xa66d('0x23')]=function(_0x86e964){return new Promise(function(_0x3ff4a2,_0x2d87f1){return db['MailInteraction'][_0xa66d('0x24')]({'where':_0x86e964[_0xa66d('0x1e')]?_0x86e964[_0xa66d('0x1e')][_0xa66d('0x20')]||null:null})[_0xa66d('0x25')](function(_0x178e4a){if(_0x178e4a){return _0x178e4a[_0xa66d('0x26')](_0x86e964[_0xa66d('0x1d')]['ids'],_[_0xa66d('0x27')](_0x86e964[_0xa66d('0x1d')],[_0xa66d('0x28'),'id'])||{});}})['spread'](function(_0xd98e1d){logger['info'](_0xa66d('0x29'),_0x86e964);logger['debug'](_0xa66d('0x29'),_0x86e964,JSON[_0xa66d('0x14')](_0xd98e1d));_0x3ff4a2(_0xd98e1d);})[_0xa66d('0x19')](function(_0x17674c){logger[_0xa66d('0x15')](_0xa66d('0x29'),_0x17674c[_0xa66d('0x17')],_0x86e964);_0x2d87f1(_this[_0xa66d('0x15')](0x1f4,_0x17674c['message']));});});};
\ No newline at end of file
+var _0xbd3c=['util','moment','randomstring','ioredis','../../mysqldb','rpc','jayson/promise','client','redis','defaults','socket.io-emitter','./mailInteraction.socket','register','info','MailInteraction,\x20%s,\x20%s','request\x20sent','MailInteraction,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','MailInteraction','body','raw','options','attributes','limit','then','UpdateMailInteraction','catch','AddTagsToMailInteraction','where','addTags','ids','omit','AddTags','debug','lodash'];(function(_0x599f41,_0x4db732){var _0x2e4d58=function(_0x14c882){while(--_0x14c882){_0x599f41['push'](_0x599f41['shift']());}};_0x2e4d58(++_0x4db732);}(_0xbd3c,0xc2));var _0xcbd3=function(_0x4cf153,_0x547570){_0x4cf153=_0x4cf153-0x0;var _0x196f88=_0xbd3c[_0x4cf153];return _0x196f88;};'use strict';var _=require(_0xcbd3('0x0'));var util=require(_0xcbd3('0x1'));var moment=require(_0xcbd3('0x2'));var BPromise=require('bluebird');var rs=require(_0xcbd3('0x3'));var fs=require('fs');var Redis=require(_0xcbd3('0x4'));var db=require(_0xcbd3('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xcbd3('0x6'));var config=require('../../config/environment');var jayson=require(_0xcbd3('0x7'));var client=jayson[_0xcbd3('0x8')]['http']({'port':0x232a});config[_0xcbd3('0x9')]=_[_0xcbd3('0xa')](config[_0xcbd3('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0xcbd3('0xb'))(new Redis(config[_0xcbd3('0x9')]));require(_0xcbd3('0xc'))[_0xcbd3('0xd')](socket);function respondWithRpcPromise(_0xef8242,_0x5826e6,_0x4c4e8c){return new BPromise(function(_0x41f67b,_0x3e37d7){return client['request'](_0xef8242,_0x4c4e8c)['then'](function(_0x592385){logger[_0xcbd3('0xe')](_0xcbd3('0xf'),_0x5826e6,_0xcbd3('0x10'));logger['debug'](_0xcbd3('0x11'),_0x5826e6,_0xcbd3('0x10'),JSON[_0xcbd3('0x12')](_0x592385));if(_0x592385[_0xcbd3('0x13')]){if(_0x592385[_0xcbd3('0x13')][_0xcbd3('0x14')]===0x1f4){logger['error'](_0xcbd3('0xf'),_0x5826e6,_0x592385['error'][_0xcbd3('0x15')]);return _0x3e37d7(_0x592385[_0xcbd3('0x13')][_0xcbd3('0x15')]);}logger['error'](_0xcbd3('0xf'),_0x5826e6,_0x592385['error'][_0xcbd3('0x15')]);return _0x41f67b(_0x592385['error'][_0xcbd3('0x15')]);}else{logger[_0xcbd3('0xe')](_0xcbd3('0xf'),_0x5826e6,_0xcbd3('0x10'));_0x41f67b(_0x592385[_0xcbd3('0x16')]['message']);}})['catch'](function(_0x98710a){logger[_0xcbd3('0x13')](_0xcbd3('0xf'),_0x5826e6,_0x98710a);_0x3e37d7(_0x98710a);});});}exports['UpdateMailInteraction']=function(_0x6888ef){var _0x51e481=this;return new Promise(function(_0x389c72,_0x4c344b){return db[_0xcbd3('0x17')]['update'](_0x6888ef[_0xcbd3('0x18')],{'raw':_0x6888ef['options']?_0x6888ef['options'][_0xcbd3('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x6888ef[_0xcbd3('0x1a')]?_0x6888ef[_0xcbd3('0x1a')]['where']||null:null,'attributes':_0x6888ef[_0xcbd3('0x1a')]?_0x6888ef[_0xcbd3('0x1a')][_0xcbd3('0x1b')]||null:null,'limit':_0x6888ef[_0xcbd3('0x1a')]?_0x6888ef[_0xcbd3('0x1a')][_0xcbd3('0x1c')]||null:null})[_0xcbd3('0x1d')](function(_0x46b960){logger['info'](_0xcbd3('0x1e'),_0x6888ef);logger['debug'](_0xcbd3('0x1e'),_0x6888ef,JSON['stringify'](_0x46b960));_0x389c72(_0x46b960);})[_0xcbd3('0x1f')](function(_0x1d7d18){logger['error'](_0xcbd3('0x1e'),_0x1d7d18['message'],_0x6888ef);_0x4c344b(_0x51e481[_0xcbd3('0x13')](0x1f4,_0x1d7d18[_0xcbd3('0x15')]));});});};exports[_0xcbd3('0x20')]=function(_0x407e8e){return new Promise(function(_0x3a17a2,_0x197b00){return db[_0xcbd3('0x17')]['find']({'where':_0x407e8e[_0xcbd3('0x1a')]?_0x407e8e[_0xcbd3('0x1a')][_0xcbd3('0x21')]||null:null})[_0xcbd3('0x1d')](function(_0x9f4dc4){if(_0x9f4dc4){return _0x9f4dc4[_0xcbd3('0x22')](_0x407e8e[_0xcbd3('0x18')][_0xcbd3('0x23')],_[_0xcbd3('0x24')](_0x407e8e['body'],[_0xcbd3('0x23'),'id'])||{});}})['spread'](function(_0x51bd1d){logger[_0xcbd3('0xe')](_0xcbd3('0x25'),_0x407e8e);logger[_0xcbd3('0x26')](_0xcbd3('0x25'),_0x407e8e,JSON[_0xcbd3('0x12')](_0x51bd1d));_0x3a17a2(_0x51bd1d);})[_0xcbd3('0x1f')](function(_0x10215c){logger['error'](_0xcbd3('0x25'),_0x10215c['message'],_0x407e8e);_0x197b00(_this[_0xcbd3('0x13')](0x1f4,_0x10215c[_0xcbd3('0x15')]));});});};
\ No newline at end of file
index fc66c43..9f0cb3a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xebc6=['mailInteraction:','save','remove','update','emit','removeListener','register','length'];(function(_0xddad7e,_0x280ac1){var _0x166637=function(_0x49b229){while(--_0x49b229){_0xddad7e['push'](_0xddad7e['shift']());}};_0x166637(++_0x280ac1);}(_0xebc6,0xf1));var _0x6ebc=function(_0x3ddb2,_0x386ec3){_0x3ddb2=_0x3ddb2-0x0;var _0x41cc1f=_0xebc6[_0x3ddb2];return _0x41cc1f;};'use strict';var MailInteractionEvents=require('./mailInteraction.events');var events=[_0x6ebc('0x0'),_0x6ebc('0x1'),_0x6ebc('0x2')];function createListener(_0x4bd67f,_0x301bd1){return function(_0x1f28a8){_0x301bd1[_0x6ebc('0x3')](_0x4bd67f,_0x1f28a8);};}function removeListener(_0x1b31d7,_0x3bb836){return function(){MailInteractionEvents[_0x6ebc('0x4')](_0x1b31d7,_0x3bb836);};}exports[_0x6ebc('0x5')]=function(_0x1ecb34){for(var _0x1fcec0=0x0,_0x30e6b6=events[_0x6ebc('0x6')];_0x1fcec0<_0x30e6b6;_0x1fcec0++){var _0x3a040d=events[_0x1fcec0];var _0x4ffa87=createListener(_0x6ebc('0x7')+_0x3a040d,_0x1ecb34);MailInteractionEvents['on'](_0x3a040d,_0x4ffa87);}};
\ No newline at end of file
+var _0x7f89=['register','length','save','remove','update','emit','removeListener'];(function(_0x2bc4b9,_0x335bd9){var _0x155997=function(_0xa4d48){while(--_0xa4d48){_0x2bc4b9['push'](_0x2bc4b9['shift']());}};_0x155997(++_0x335bd9);}(_0x7f89,0x1ad));var _0x97f8=function(_0x1c270a,_0x378796){_0x1c270a=_0x1c270a-0x0;var _0x2607b8=_0x7f89[_0x1c270a];return _0x2607b8;};'use strict';var MailInteractionEvents=require('./mailInteraction.events');var events=[_0x97f8('0x0'),_0x97f8('0x1'),_0x97f8('0x2')];function createListener(_0x28597d,_0xef4ee6){return function(_0x5350fe){_0xef4ee6[_0x97f8('0x3')](_0x28597d,_0x5350fe);};}function removeListener(_0x4a0fcc,_0x244231){return function(){MailInteractionEvents[_0x97f8('0x4')](_0x4a0fcc,_0x244231);};}exports[_0x97f8('0x5')]=function(_0x2c0dfc){for(var _0xc10678=0x0,_0x216b53=events[_0x97f8('0x6')];_0xc10678<_0x216b53;_0xc10678++){var _0x3f8691=events[_0xc10678];var _0x3c2175=createListener('mailInteraction:'+_0x3f8691,_0x2c0dfc);MailInteractionEvents['on'](_0x3f8691,_0x3c2175);}};
\ No newline at end of file
index b5f0796..e63999a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa4db=['/:id','/:id/download','download','post','tracked','mail','mailmessage:create','create','put','/:id/accept','/:id/reject','destroy','exports','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./mailMessage.controller','isAuthenticated','index','get','/describe','describe'];(function(_0x20aadb,_0x5a607a){var _0x520018=function(_0x1d258a){while(--_0x1d258a){_0x20aadb['push'](_0x20aadb['shift']());}};_0x520018(++_0x5a607a);}(_0xa4db,0x139));var _0xba4d=function(_0x37c17b,_0x24e818){_0x37c17b=_0x37c17b-0x0;var _0x3102ec=_0xa4db[_0x37c17b];return _0x3102ec;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0xba4d('0x0'));var express=require(_0xba4d('0x1'));var router=express[_0xba4d('0x2')]();var fs_extra=require(_0xba4d('0x3'));var auth=require(_0xba4d('0x4'));var interaction=require(_0xba4d('0x5'));var config=require('../../config/environment');var controller=require(_0xba4d('0x6'));router['get']('/',auth[_0xba4d('0x7')](),controller[_0xba4d('0x8')]);router[_0xba4d('0x9')](_0xba4d('0xa'),auth[_0xba4d('0x7')](),controller[_0xba4d('0xb')]);router[_0xba4d('0x9')](_0xba4d('0xc'),auth[_0xba4d('0x7')](),controller['show']);router[_0xba4d('0x9')](_0xba4d('0xd'),auth[_0xba4d('0x7')](),controller[_0xba4d('0xe')]);router[_0xba4d('0xf')]('/',auth[_0xba4d('0x7')](),interaction[_0xba4d('0x10')](_0xba4d('0x11'),_0xba4d('0x12')),controller[_0xba4d('0x13')]);router[_0xba4d('0x14')](_0xba4d('0xc'),auth['isAuthenticated'](),controller['update']);router['put'](_0xba4d('0x15'),auth['isAuthenticated'](),controller['accept']);router[_0xba4d('0x14')](_0xba4d('0x16'),auth[_0xba4d('0x7')](),controller['reject']);router['delete']('/:id',auth[_0xba4d('0x7')](),controller[_0xba4d('0x17')]);module[_0xba4d('0x18')]=router;
\ No newline at end of file
+var _0x56ce=['download','post','tracked','mail','mailmessage:create','create','put','update','/:id/accept','/:id/reject','reject','delete','destroy','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','get','/describe','describe','/:id','show'];(function(_0x5a6aa,_0x496e8f){var _0x55bc63=function(_0x1327bf){while(--_0x1327bf){_0x5a6aa['push'](_0x5a6aa['shift']());}};_0x55bc63(++_0x496e8f);}(_0x56ce,0x1e9));var _0xe56c=function(_0x4dc74d,_0x3ea004){_0x4dc74d=_0x4dc74d-0x0;var _0x4e3f2d=_0x56ce[_0x4dc74d];return _0x4e3f2d;};'use strict';var multer=require(_0xe56c('0x0'));var util=require('util');var path=require(_0xe56c('0x1'));var timeout=require(_0xe56c('0x2'));var express=require(_0xe56c('0x3'));var router=express[_0xe56c('0x4')]();var fs_extra=require(_0xe56c('0x5'));var auth=require(_0xe56c('0x6'));var interaction=require(_0xe56c('0x7'));var config=require(_0xe56c('0x8'));var controller=require('./mailMessage.controller');router['get']('/',auth[_0xe56c('0x9')](),controller['index']);router[_0xe56c('0xa')](_0xe56c('0xb'),auth[_0xe56c('0x9')](),controller[_0xe56c('0xc')]);router[_0xe56c('0xa')](_0xe56c('0xd'),auth[_0xe56c('0x9')](),controller[_0xe56c('0xe')]);router[_0xe56c('0xa')]('/:id/download',auth['isAuthenticated'](),controller[_0xe56c('0xf')]);router[_0xe56c('0x10')]('/',auth[_0xe56c('0x9')](),interaction[_0xe56c('0x11')](_0xe56c('0x12'),_0xe56c('0x13')),controller[_0xe56c('0x14')]);router[_0xe56c('0x15')](_0xe56c('0xd'),auth[_0xe56c('0x9')](),controller[_0xe56c('0x16')]);router[_0xe56c('0x15')](_0xe56c('0x17'),auth[_0xe56c('0x9')](),controller['accept']);router['put'](_0xe56c('0x18'),auth[_0xe56c('0x9')](),controller[_0xe56c('0x19')]);router[_0xe56c('0x1a')]('/:id',auth['isAuthenticated'](),controller[_0xe56c('0x1b')]);module['exports']=router;
\ No newline at end of file
index 0a7ded0..031d5bf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdde5=['medium','BOOLEAN','ENUM','out','STRING','DATE','INTEGER','Chat','Email','sequelize','lodash','exports','long','TEXT'];(function(_0x1138c4,_0x841d33){var _0x200cc1=function(_0x2f6d85){while(--_0x2f6d85){_0x1138c4['push'](_0x1138c4['shift']());}};_0x200cc1(++_0x841d33);}(_0xdde5,0x87));var _0x5dde=function(_0x1ae78f,_0x122ed2){_0x1ae78f=_0x1ae78f-0x0;var _0x5baf80=_0xdde5[_0x1ae78f];return _0x5baf80;};'use strict';var Sequelize=require(_0x5dde('0x0'));var _=require(_0x5dde('0x1'));module[_0x5dde('0x2')]={'body':{'type':Sequelize['TEXT'](_0x5dde('0x3')),'allowNull':![]},'plainBody':{'type':Sequelize[_0x5dde('0x4')](_0x5dde('0x5'))},'read':{'type':Sequelize[_0x5dde('0x6')],'defaultValue':![]},'direction':{'type':Sequelize[_0x5dde('0x7')]('in',_0x5dde('0x8')),'defaultValue':_0x5dde('0x8'),'allowNull':![]},'messageId':{'type':Sequelize[_0x5dde('0x9')](0x1fe)},'from':{'type':Sequelize['STRING']},'to':{'type':Sequelize['TEXT']('long')},'cc':{'type':Sequelize[_0x5dde('0x4')]('long')},'bcc':{'type':Sequelize['TEXT'](_0x5dde('0x3'))},'subject':{'type':Sequelize[_0x5dde('0x4')]},'sentAt':{'type':Sequelize[_0x5dde('0xa')]},'attach':{'type':Sequelize[_0x5dde('0xb')],'defaultValue':0x0},'secret':{'type':Sequelize[_0x5dde('0x6')],'defaultValue':![]},'readAt':{'type':Sequelize[_0x5dde('0xa')]},'originTo':{'type':Sequelize['TEXT']('long')},'originCc':{'type':Sequelize['TEXT'](_0x5dde('0x3'))},'originChannel':{'type':Sequelize[_0x5dde('0x7')]('Email',_0x5dde('0xc')),'defaultValue':_0x5dde('0xd'),'allowNull':![]}};
\ No newline at end of file
+var _0xc4d0=['INTEGER','Email','Chat','sequelize','lodash','exports','TEXT','long','BOOLEAN','ENUM','out','STRING','DATE'];(function(_0x5e01d4,_0x4ff457){var _0x5e8a7a=function(_0x2d53ad){while(--_0x2d53ad){_0x5e01d4['push'](_0x5e01d4['shift']());}};_0x5e8a7a(++_0x4ff457);}(_0xc4d0,0x107));var _0x0c4d=function(_0x1d5ba8,_0x412a52){_0x1d5ba8=_0x1d5ba8-0x0;var _0x1022a2=_0xc4d0[_0x1d5ba8];return _0x1022a2;};'use strict';var Sequelize=require(_0x0c4d('0x0'));var _=require(_0x0c4d('0x1'));module[_0x0c4d('0x2')]={'body':{'type':Sequelize[_0x0c4d('0x3')](_0x0c4d('0x4')),'allowNull':![]},'plainBody':{'type':Sequelize[_0x0c4d('0x3')]('medium')},'read':{'type':Sequelize[_0x0c4d('0x5')],'defaultValue':![]},'direction':{'type':Sequelize[_0x0c4d('0x6')]('in',_0x0c4d('0x7')),'defaultValue':_0x0c4d('0x7'),'allowNull':![]},'messageId':{'type':Sequelize['STRING'](0x1fe)},'from':{'type':Sequelize[_0x0c4d('0x8')]},'to':{'type':Sequelize[_0x0c4d('0x3')](_0x0c4d('0x4'))},'cc':{'type':Sequelize['TEXT'](_0x0c4d('0x4'))},'bcc':{'type':Sequelize[_0x0c4d('0x3')]('long')},'subject':{'type':Sequelize[_0x0c4d('0x3')]},'sentAt':{'type':Sequelize[_0x0c4d('0x9')]},'attach':{'type':Sequelize[_0x0c4d('0xa')],'defaultValue':0x0},'secret':{'type':Sequelize[_0x0c4d('0x5')],'defaultValue':![]},'readAt':{'type':Sequelize[_0x0c4d('0x9')]},'originTo':{'type':Sequelize['TEXT'](_0x0c4d('0x4'))},'originCc':{'type':Sequelize[_0x0c4d('0x3')]('long')},'originChannel':{'type':Sequelize[_0x0c4d('0x6')](_0x0c4d('0xb'),_0x0c4d('0xc')),'defaultValue':_0x0c4d('0xb'),'allowNull':![]}};
\ No newline at end of file
index 7f98bad..4b3a3a4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7af8=['redis','localhost','socket.io-emitter','html-entities','./mailMessage.socket','register','jayson/promise','client','http','info','MailMessage,\x20%s,\x20%s','debug','MailMessage,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','json','offset','limit','undefined','count','status','set','Content-Range','update','then','destroy','end','sendStatus','stack','name','send','index','map','MailMessage','rawAttributes','type','key','keys','query','filters','model','attributes','length','hasOwnProperty','order','sort','pick','filter','where','VIRTUAL','options','includeAll','include','findAll','rows','show','params','intersection','fields','merge','find','body','catch','describe','create','direction','out','split','MailAccount','findOne','MailAccountId','List','Contacts','MailServerOut','Smtp','CloudProvider','getSmtpOptions','attachments','join','root','server/files/attachments','ListId','messageId','format','YYYY-MM-DD\x20HH:mm:ss','accept','mail','read','readAt','UserId','user','agent','get','MailInteraction','MailInteractionId','isNil','[MAILMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','interaction','null','AcceptMessage','acceptMessage','Sequelize','QueryTypes','contact','fullname','email','manual','interface','SIP/%s','channel','fromString','EventManager','acceptmessage','reject','[MAILMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','rejectMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','SELECT','User','internal','motionChannel','event','rejectmessage','download','unix','files','tmp','server','from','bcc','subject','createdAt','Attachments','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','Bcc','basename','push','readFileSync','writeFileSync','unlinkSync','bluebird','util','path','ioredis','mail-interactions','../../config/environment','../../mysqldb','defaults'];(function(_0x3b08de,_0x63ddd0){var _0x53fbe4=function(_0x16eea2){while(--_0x16eea2){_0x3b08de['push'](_0x3b08de['shift']());}};_0x53fbe4(++_0x63ddd0);}(_0x7af8,0x130));var _0x87af=function(_0x4bbdb8,_0x2f0491){_0x4bbdb8=_0x4bbdb8-0x0;var _0xa703fb=_0x7af8[_0x4bbdb8];return _0xa703fb;};'use strict';var emlformat=require('eml-format');var moment=require('moment');var BPromise=require(_0x87af('0x0'));var util=require(_0x87af('0x1'));var path=require(_0x87af('0x2'));var fs=require('fs');var _=require('lodash');var Redis=require(_0x87af('0x3'));var htmlToText=require('html-to-text');var qs=require('../../components/parsers/qs');var logger=require('../../config/logger')('api');var interaction_log=require('../../config/logger')(_0x87af('0x4'));var config=require(_0x87af('0x5'));var db=require(_0x87af('0x6'))['db'];config['redis']=_[_0x87af('0x7')](config[_0x87af('0x8')],{'host':_0x87af('0x9'),'port':0x18eb});var socket=require(_0x87af('0xa'))(new Redis(config[_0x87af('0x8')]));var htmlEntities=require(_0x87af('0xb'));require(_0x87af('0xc'))[_0x87af('0xd')](socket);var jayson=require(_0x87af('0xe'));var client=jayson[_0x87af('0xf')][_0x87af('0x10')]({'port':0x232c});var client9003=jayson['client'][_0x87af('0x10')]({'port':0x232b});var client9002=jayson[_0x87af('0xf')][_0x87af('0x10')]({'port':0x232a});function respondWithRpcPromise(_0x1e28f5,_0x426746,_0x16be2f,_0x368c9f){return new BPromise(function(_0x2ba710,_0x5a6e67){var _0x52f491=_0x368c9f||client;return _0x52f491['request'](_0x1e28f5,_0x16be2f)['then'](function(_0xda19a6){logger[_0x87af('0x11')](_0x87af('0x12'),_0x426746,'request\x20sent');logger[_0x87af('0x13')](_0x87af('0x14'),_0x426746,_0x87af('0x15'),JSON[_0x87af('0x16')](_0xda19a6));if(_0xda19a6[_0x87af('0x17')]){if(_0xda19a6[_0x87af('0x17')][_0x87af('0x18')]===0x1f4){logger[_0x87af('0x17')](_0x87af('0x12'),_0x426746,_0xda19a6[_0x87af('0x17')][_0x87af('0x19')]);return _0x5a6e67(_0xda19a6['error'][_0x87af('0x19')]);}logger[_0x87af('0x17')](_0x87af('0x12'),_0x426746,_0xda19a6[_0x87af('0x17')][_0x87af('0x19')]);return _0x2ba710(_0xda19a6[_0x87af('0x17')]['message']);}else{logger[_0x87af('0x11')]('MailMessage,\x20%s,\x20%s',_0x426746,_0x87af('0x15'));_0x2ba710(_0xda19a6[_0x87af('0x1a')][_0x87af('0x19')]);}})['catch'](function(_0x2d4856){logger[_0x87af('0x17')](_0x87af('0x12'),_0x426746,_0x2d4856);_0x5a6e67(_0x2d4856);});});}function respondWithResult(_0x337c90,_0x3d9711){_0x3d9711=_0x3d9711||0xc8;return function(_0x443cca){if(_0x443cca){return _0x337c90['status'](_0x3d9711)[_0x87af('0x1b')](_0x443cca);}};}function respondWithFilteredResult(_0x2c7226,_0x1477b8){return function(_0x3327bd){if(_0x3327bd){var _0x4df16d=typeof _0x1477b8[_0x87af('0x1c')]==='undefined'&&typeof _0x1477b8[_0x87af('0x1d')]===_0x87af('0x1e');var _0xdcbbbf=_0x3327bd[_0x87af('0x1f')];var _0x360c33=_0x4df16d?0x0:_0x1477b8[_0x87af('0x1c')];var _0x47ebc2=_0x4df16d?_0x3327bd['count']:_0x1477b8[_0x87af('0x1c')]+_0x1477b8['limit'];var _0x26c8e2;if(_0x47ebc2>=_0xdcbbbf){_0x47ebc2=_0xdcbbbf;_0x26c8e2=0xc8;}else{_0x26c8e2=0xce;}_0x2c7226[_0x87af('0x20')](_0x26c8e2);return _0x2c7226[_0x87af('0x21')](_0x87af('0x22'),_0x360c33+'-'+_0x47ebc2+'/'+_0xdcbbbf)[_0x87af('0x1b')](_0x3327bd);}return null;};}function saveUpdates(_0x451f10){return function(_0x52aa3b){if(_0x52aa3b){return _0x52aa3b[_0x87af('0x23')](_0x451f10)[_0x87af('0x24')](function(_0x8f185c){return _0x8f185c;});}return null;};}function removeEntity(_0x225d5a){return function(_0x356375){if(_0x356375){return _0x356375[_0x87af('0x25')]()[_0x87af('0x24')](function(){_0x225d5a['status'](0xcc)[_0x87af('0x26')]();});}};}function handleEntityNotFound(_0x2cebda){return function(_0x437cc2){if(!_0x437cc2){_0x2cebda[_0x87af('0x27')](0x194);}return _0x437cc2;};}function handleError(_0x4c7ffb,_0x1af476){_0x1af476=_0x1af476||0x1f4;return function(_0x2cecc2){logger[_0x87af('0x17')](_0x2cecc2[_0x87af('0x28')]);if(_0x2cecc2[_0x87af('0x29')]){delete _0x2cecc2[_0x87af('0x29')];}_0x4c7ffb['status'](_0x1af476)[_0x87af('0x2a')](_0x2cecc2);};}exports[_0x87af('0x2b')]=function(_0x307910,_0xa522ee){var _0x47f4f1={},_0x25d1dd={},_0x4ed97d={'count':0x0,'rows':[]};var _0x5d3c91=_[_0x87af('0x2c')](db[_0x87af('0x2d')][_0x87af('0x2e')],function(_0x14b06f){return{'name':_0x14b06f['fieldName'],'type':_0x14b06f[_0x87af('0x2f')][_0x87af('0x30')]};});_0x25d1dd['model']=_['map'](_0x5d3c91,_0x87af('0x29'));_0x25d1dd['query']=_[_0x87af('0x31')](_0x307910[_0x87af('0x32')]);_0x25d1dd[_0x87af('0x33')]=_['intersection'](_0x25d1dd[_0x87af('0x34')],_0x25d1dd['query']);_0x47f4f1[_0x87af('0x35')]=_['intersection'](_0x25d1dd['model'],qs['fields'](_0x307910[_0x87af('0x32')]['fields']));_0x47f4f1[_0x87af('0x35')]=_0x47f4f1[_0x87af('0x35')][_0x87af('0x36')]?_0x47f4f1[_0x87af('0x35')]:_0x25d1dd[_0x87af('0x34')];if(!_0x307910[_0x87af('0x32')][_0x87af('0x37')]('nolimit')){_0x47f4f1['limit']=qs['limit'](_0x307910[_0x87af('0x32')][_0x87af('0x1d')]);_0x47f4f1[_0x87af('0x1c')]=qs['offset'](_0x307910['query']['offset']);}_0x47f4f1[_0x87af('0x38')]=qs[_0x87af('0x39')](_0x307910[_0x87af('0x32')][_0x87af('0x39')]);_0x47f4f1['where']=qs[_0x87af('0x33')](_[_0x87af('0x3a')](_0x307910[_0x87af('0x32')],_0x25d1dd[_0x87af('0x33')]),_0x5d3c91);if(_0x307910[_0x87af('0x32')][_0x87af('0x3b')]){_0x47f4f1[_0x87af('0x3c')]=_['merge'](_0x47f4f1[_0x87af('0x3c')],{'$or':_[_0x87af('0x2c')](_0x5d3c91,function(_0x232fbe){if(_0x232fbe[_0x87af('0x2f')]!==_0x87af('0x3d')){var _0x39b8e2={};_0x39b8e2[_0x232fbe[_0x87af('0x29')]]={'$like':'%'+_0x307910[_0x87af('0x32')][_0x87af('0x3b')]+'%'};return _0x39b8e2;}})});}_0x47f4f1=_['merge']({},_0x47f4f1,_0x307910[_0x87af('0x3e')]);var _0x182687={'where':_0x47f4f1[_0x87af('0x3c')]};return db[_0x87af('0x2d')]['count'](_0x182687)[_0x87af('0x24')](function(_0x2c63bf){_0x4ed97d[_0x87af('0x1f')]=_0x2c63bf;if(_0x307910[_0x87af('0x32')][_0x87af('0x3f')]){_0x47f4f1[_0x87af('0x40')]=[{'all':!![]}];}return db[_0x87af('0x2d')][_0x87af('0x41')](_0x47f4f1);})[_0x87af('0x24')](function(_0x34112f){_0x4ed97d[_0x87af('0x42')]=_0x34112f;return _0x4ed97d;})[_0x87af('0x24')](respondWithFilteredResult(_0xa522ee,_0x47f4f1))['catch'](handleError(_0xa522ee,null));};exports[_0x87af('0x43')]=function(_0x5882a5,_0x1a4642){var _0xb3c30d={'raw':!![],'where':{'id':_0x5882a5[_0x87af('0x44')]['id']}},_0x33f336={};_0x33f336['model']=_['keys'](db[_0x87af('0x2d')][_0x87af('0x2e')]);_0x33f336[_0x87af('0x32')]=_['keys'](_0x5882a5[_0x87af('0x32')]);_0x33f336[_0x87af('0x33')]=_[_0x87af('0x45')](_0x33f336[_0x87af('0x34')],_0x33f336[_0x87af('0x32')]);_0xb3c30d['attributes']=_[_0x87af('0x45')](_0x33f336[_0x87af('0x34')],qs[_0x87af('0x46')](_0x5882a5[_0x87af('0x32')][_0x87af('0x46')]));_0xb3c30d[_0x87af('0x35')]=_0xb3c30d[_0x87af('0x35')][_0x87af('0x36')]?_0xb3c30d[_0x87af('0x35')]:_0x33f336[_0x87af('0x34')];if(_0x5882a5[_0x87af('0x32')]['includeAll']){_0xb3c30d[_0x87af('0x40')]=[{'all':!![]}];}_0xb3c30d=_[_0x87af('0x47')]({},_0xb3c30d,_0x5882a5[_0x87af('0x3e')]);return db[_0x87af('0x2d')][_0x87af('0x48')](_0xb3c30d)[_0x87af('0x24')](handleEntityNotFound(_0x1a4642,null))[_0x87af('0x24')](respondWithResult(_0x1a4642,null))['catch'](handleError(_0x1a4642,null));};exports['update']=function(_0x3c1945,_0x7a9a2c){if(_0x3c1945[_0x87af('0x49')]['id']){delete _0x3c1945['body']['id'];}return db['MailMessage'][_0x87af('0x48')]({'where':{'id':_0x3c1945[_0x87af('0x44')]['id']}})[_0x87af('0x24')](handleEntityNotFound(_0x7a9a2c,null))[_0x87af('0x24')](saveUpdates(_0x3c1945[_0x87af('0x49')],null))[_0x87af('0x24')](respondWithResult(_0x7a9a2c,null))[_0x87af('0x4a')](handleError(_0x7a9a2c,null));};exports[_0x87af('0x25')]=function(_0x55a61d,_0xec5ebb){return db['MailMessage'][_0x87af('0x48')]({'where':{'id':_0x55a61d[_0x87af('0x44')]['id']}})[_0x87af('0x24')](handleEntityNotFound(_0xec5ebb,null))['then'](removeEntity(_0xec5ebb,null))[_0x87af('0x4a')](handleError(_0xec5ebb,null));};exports[_0x87af('0x4b')]=function(_0x119765,_0x3d44f7){return db[_0x87af('0x2d')]['describe']()[_0x87af('0x24')](respondWithResult(_0x3d44f7,null))['catch'](handleError(_0x3d44f7,null));};exports[_0x87af('0x4c')]=function(_0x28a3a5,_0x1c7b5f){return db['MailMessage'][_0x87af('0x4c')](_0x28a3a5[_0x87af('0x49')])[_0x87af('0x24')](function(_0x33f001){if(_0x33f001){if(_0x33f001[_0x87af('0x4d')]===_0x87af('0x4e')&&!_0x33f001['secret']){var _0x2b068f,_0x24293e,_0x399912;if(_0x28a3a5[_0x87af('0x49')]['to']){_0x24293e=_0x28a3a5['body']['to'][_0x87af('0x4f')](',')[0x0];}return db[_0x87af('0x50')][_0x87af('0x51')]({'where':{'id':_0x33f001[_0x87af('0x52')]},'include':[{'model':db['CmList'],'as':_0x87af('0x53'),'include':[{'model':db['CmContact'],'as':_0x87af('0x54'),'where':{'email':_0x24293e},'limit':0x1,'order':[['updatedAt','DESC']]}]},{'model':db[_0x87af('0x55')],'as':_0x87af('0x56'),'raw':!![],'include':[{'model':db[_0x87af('0x57')],'as':_0x87af('0x57'),'raw':!![]}]}]})['then'](function(_0x29b83a){_0x2b068f=_0x29b83a;if(!_0x2b068f||!_0x2b068f[_0x87af('0x56')])return;var _0x5d40b2=_0x2b068f[_0x87af('0x58')]();if(_0x28a3a5[_0x87af('0x49')][_0x87af('0x59')]&&_0x28a3a5[_0x87af('0x49')][_0x87af('0x59')][_0x87af('0x36')]){for(var _0x27c660=0x0;_0x27c660<_0x28a3a5[_0x87af('0x49')][_0x87af('0x59')][_0x87af('0x36')];_0x27c660+=0x1){_0x28a3a5[_0x87af('0x49')][_0x87af('0x59')][_0x27c660]={'filename':_0x28a3a5[_0x87af('0x49')][_0x87af('0x59')][_0x27c660][_0x87af('0x29')],'path':path[_0x87af('0x5a')](config[_0x87af('0x5b')],_0x87af('0x5c'),_0x28a3a5[_0x87af('0x49')]['attachments'][_0x27c660]['basename'])};}}_0x399912={'account':_0x5d40b2,'message':_0x28a3a5['body']};return;})['then'](function(){if(_0x2b068f['List']){if(_0x2b068f['List'][_0x87af('0x54')][_0x87af('0x36')]){return _0x2b068f[_0x87af('0x53')]['Contacts'][0x0];}else{return db['CmContact']['create'](_[_0x87af('0x7')](_0x28a3a5[_0x87af('0x49')],{'firstName':_0x28a3a5[_0x87af('0x49')]['to'],'email':_0x28a3a5[_0x87af('0x49')]['to'],'phone':_0x28a3a5['body']['to'],'ListId':_0x2b068f[_0x87af('0x5d')]}));}}else{throw new Error('List\x20not\x20found');}})['then'](function(){if(_0x399912){return respondWithRpcPromise('SendMail','sendMail',_0x399912,client9003)[_0x87af('0x24')](function(_0x6df94d){return _0x33f001['update']({'read':!![],'messageId':_0x6df94d[_0x87af('0x5e')],'sentAt':moment()[_0x87af('0x5f')](_0x87af('0x60'))});})[_0x87af('0x4a')](function(_0x55add4){logger[_0x87af('0x17')]('%s',JSON[_0x87af('0x16')](_0x55add4));return _0x33f001;});}return _0x33f001;});}return _0x33f001;}})['then'](respondWithResult(_0x1c7b5f,0xc9))['catch'](handleError(_0x1c7b5f,null));};exports[_0x87af('0x61')]=function(_0x117323,_0x592873){var _0x1a3735={'agent':{},'channel':_0x87af('0x62')};if(_0x117323[_0x87af('0x49')]['id']){delete _0x117323[_0x87af('0x49')]['id'];}_0x117323[_0x87af('0x49')][_0x87af('0x63')]=!![];_0x117323[_0x87af('0x49')][_0x87af('0x64')]=moment()[_0x87af('0x5f')](_0x87af('0x60'));_0x117323[_0x87af('0x49')]['UserId']=_0x117323['body'][_0x87af('0x65')]||_0x117323[_0x87af('0x66')]['id'];_0x1a3735[_0x87af('0x67')]['id']=_0x117323[_0x87af('0x49')][_0x87af('0x65')];return db[_0x87af('0x2d')][_0x87af('0x48')]({'where':{'id':_0x117323[_0x87af('0x44')]['id'],'UserId':null}})[_0x87af('0x24')](handleEntityNotFound(_0x592873,null))[_0x87af('0x24')](saveUpdates(_0x117323[_0x87af('0x49')],null))[_0x87af('0x24')](function(_0xccd746){if(_0xccd746){_0x1a3735['message']=_0xccd746[_0x87af('0x68')]({'plain':!![]});return db[_0x87af('0x69')][_0x87af('0x48')]({'where':{'id':_0xccd746[_0x87af('0x6a')]}});}return null;})['then'](handleEntityNotFound(_0x592873,null))[_0x87af('0x24')](function(_0x3e2778){if(_0x3e2778){return _0x3e2778[_0x87af('0x23')]({'UserId':_0x117323[_0x87af('0x49')][_0x87af('0x65')],'read1stAt':_[_0x87af('0x6b')](_0x3e2778['read1stAt'])?moment()['format'](_0x87af('0x60')):undefined});}return null;})[_0x87af('0x24')](function(_0x281641){if(_0x281641){_0x1a3735['interaction']=_0x281641[_0x87af('0x68')]({'plain':!![]});interaction_log[_0x87af('0x11')](_0x87af('0x6c'),_0x117323[_0x87af('0x66')]['id'],_0x117323[_0x87af('0x66')][_0x87af('0x29')],_0x117323['user']['role'],_0x1a3735[_0x87af('0x6d')]['id'],_0x117323[_0x87af('0x49')]?JSON[_0x87af('0x16')](_0x117323[_0x87af('0x49')]):_0x87af('0x6e'));return respondWithRpcPromise(_0x87af('0x6f'),_0x87af('0x70'),_0x1a3735);}return null;})[_0x87af('0x24')](function(_0x3c101c){var _0x1fb3ef='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x3c101c[_0x87af('0x19')]['ContactId'];return db['sequelize']['query'](_0x1fb3ef,{'type':db[_0x87af('0x71')][_0x87af('0x72')]['SELECT'],'raw':!![]})[_0x87af('0x24')](function(_0x4e6416){return _0x4e6416;});})[_0x87af('0x24')](function(_0x5b1357){if(_0x5b1357){_0x1a3735[_0x87af('0x19')][_0x87af('0x73')]=_0x5b1357[0x0];if(!_0x117323[_0x87af('0x49')][_0x87af('0x65')])return;return db['User'][_0x87af('0x48')]({'where':{'id':_0x117323[_0x87af('0x49')][_0x87af('0x65')],'role':_0x87af('0x67')},'attributes':['id',_0x87af('0x29'),_0x87af('0x74'),_0x87af('0x75'),'internal'],'raw':!![]});}return null;})[_0x87af('0x24')](function(_0x12e3d0){if(!_0x12e3d0)return null;_0x1a3735[_0x87af('0x19')][_0x87af('0x67')]=_0x12e3d0;return _0x1a3735;})[_0x87af('0x24')](function(_0x261d15){if(_0x261d15){if(_0x117323[_0x87af('0x49')][_0x87af('0x76')]){_0x1a3735[_0x87af('0x19')][_0x87af('0x77')]=util[_0x87af('0x5f')](_0x87af('0x78'),_0x117323['user'][_0x87af('0x29')]);_0x1a3735[_0x87af('0x19')][_0x87af('0x79')]=_0x1a3735[_0x87af('0x79')];_0x1a3735[_0x87af('0x19')]['motionChannel']=_0x1a3735[_0x87af('0x79')];_0x1a3735[_0x87af('0x19')]['event']=_0x87af('0x61');_0x1a3735[_0x87af('0x19')][_0x87af('0x49')]=htmlToText[_0x87af('0x7a')](_0x1a3735[_0x87af('0x19')][_0x87af('0x49')]);return respondWithRpcPromise(_0x87af('0x7b'),_0x87af('0x7b'),{'event':_0x87af('0x7c'),'message':_0x1a3735['message']},client9002)[_0x87af('0x24')](function(){return _0x1a3735;});}return _0x1a3735;}return null;})[_0x87af('0x24')](respondWithResult(_0x592873,null))['catch'](handleError(_0x592873,null));};exports[_0x87af('0x7d')]=function(_0x332e59,_0x4985c9){var _0x17e27c={'agent':{},'channel':'mail'};if(_0x332e59['body']['id']){delete _0x332e59[_0x87af('0x49')]['id'];}_0x332e59['body']['UserId']=_0x332e59[_0x87af('0x49')][_0x87af('0x65')]||_0x332e59[_0x87af('0x66')]['id'];_0x17e27c[_0x87af('0x67')]['id']=_0x332e59[_0x87af('0x49')]['UserId'];return db[_0x87af('0x2d')][_0x87af('0x48')]({'where':{'id':_0x332e59['params']['id'],'UserId':null}})[_0x87af('0x24')](handleEntityNotFound(_0x4985c9,null))[_0x87af('0x24')](function(_0x127b18){if(_0x127b18){_0x17e27c['message']=_0x127b18[_0x87af('0x68')]({'plain':!![]});return db[_0x87af('0x69')][_0x87af('0x48')]({'where':{'id':_0x127b18['MailInteractionId']}});}return null;})['then'](handleEntityNotFound(_0x4985c9,null))[_0x87af('0x24')](function(_0x1da592){if(_0x1da592){_0x17e27c[_0x87af('0x6d')]=_0x1da592[_0x87af('0x68')]({'plain':!![]});interaction_log[_0x87af('0x11')](_0x87af('0x7e'),_0x332e59['user']['id'],_0x332e59['user'][_0x87af('0x29')],_0x332e59[_0x87af('0x66')][_0x87af('0x7f')],_0x17e27c[_0x87af('0x6d')]['id'],_0x332e59['body']?JSON[_0x87af('0x16')](_0x332e59['body']):_0x87af('0x6e'));return respondWithRpcPromise('RejectMessage',_0x87af('0x80'),_0x17e27c);}return null;})['then'](function(_0x49562c){var _0x119854=_0x87af('0x81')+_0x49562c[_0x87af('0x19')][_0x87af('0x82')];return db[_0x87af('0x83')][_0x87af('0x32')](_0x119854,{'type':db[_0x87af('0x71')][_0x87af('0x72')][_0x87af('0x84')],'raw':!![]})[_0x87af('0x24')](function(_0x523d82){return _0x523d82;});})['then'](function(_0x5ad8bd){if(_0x5ad8bd){_0x17e27c['message']['contact']=_0x5ad8bd[0x0];if(!_0x332e59[_0x87af('0x49')]['UserId'])return;return db[_0x87af('0x85')]['find']({'where':{'id':_0x332e59[_0x87af('0x49')][_0x87af('0x65')],'role':_0x87af('0x67')},'attributes':['id',_0x87af('0x29'),_0x87af('0x74'),_0x87af('0x75'),_0x87af('0x86')],'raw':!![]});}return null;})[_0x87af('0x24')](function(_0x2b27d5){if(!_0x2b27d5)return null;_0x17e27c[_0x87af('0x19')][_0x87af('0x67')]=_0x2b27d5;return _0x17e27c;})[_0x87af('0x24')](function(_0x1e9225){if(_0x1e9225){_0x1e9225['message'][_0x87af('0x77')]=util[_0x87af('0x5f')]('SIP/%s',_0x332e59[_0x87af('0x66')][_0x87af('0x29')]);_0x1e9225[_0x87af('0x19')][_0x87af('0x79')]=_0x17e27c['channel'];_0x1e9225[_0x87af('0x19')][_0x87af('0x87')]=_0x17e27c[_0x87af('0x79')];_0x1e9225[_0x87af('0x19')][_0x87af('0x88')]='reject';_0x1e9225[_0x87af('0x19')][_0x87af('0x49')]=htmlToText[_0x87af('0x7a')](_0x17e27c[_0x87af('0x19')][_0x87af('0x49')]);respondWithRpcPromise(_0x87af('0x7b'),_0x87af('0x7b'),{'event':_0x87af('0x89'),'message':_0x1e9225[_0x87af('0x19')]},client9002);return _0x17e27c;}return null;})['then'](respondWithResult(_0x4985c9,null))[_0x87af('0x4a')](handleError(_0x4985c9,null));};exports[_0x87af('0x8a')]=function(_0x127b6b,_0x4f6ce1){var _0x36f7d3=moment()[_0x87af('0x8b')]()['toString']();var _0x21ee31=path['join'](config[_0x87af('0x5b')],'server',_0x87af('0x8c'),_0x87af('0x8d'));var _0x38ebe2=path['join'](config[_0x87af('0x5b')],_0x87af('0x8e'),'files',_0x87af('0x59'));var _0x2fb819=util[_0x87af('0x5f')]('message-%s.eml',_0x36f7d3);return db[_0x87af('0x2d')]['find']({'where':{'id':_0x127b6b['params']['id']},'attributes':['id',_0x87af('0x49'),_0x87af('0x8f'),'to','cc',_0x87af('0x90'),_0x87af('0x91'),_0x87af('0x92')],'include':_0x127b6b[_0x87af('0x32')][_0x87af('0x59')]?[{'model':db['Attachment'],'as':_0x87af('0x93')}]:undefined})[_0x87af('0x24')](handleEntityNotFound(_0x4f6ce1,null))[_0x87af('0x24')](function(_0x52581e){if(_0x52581e){var _0x54d550=_0x52581e;var _0x385808={'from':_0x54d550[_0x87af('0x8f')],'to':_0x54d550['to'],'subject':_0x54d550[_0x87af('0x91')],'html':htmlEntities['decode'](_0x54d550[_0x87af('0x49')]),'headers':{'Date':moment(_0x54d550[_0x87af('0x92')])[_0x87af('0x5f')](_0x87af('0x94'))},'attachments':[]};if(_0x52581e['cc']){_0x385808[_0x87af('0x95')]['Cc']=_0x52581e['cc'];}if(_0x52581e['bcc']){_0x385808['headers'][_0x87af('0x96')]=_0x52581e['bcc'];}return new BPromise(function(_0x4d0427,_0x33eedf){if(_0x52581e[_0x87af('0x93')]){for(var _0x26e770=0x0;_0x26e770<_0x52581e[_0x87af('0x93')][_0x87af('0x36')];_0x26e770++){var _0x236f42=_0x52581e['Attachments'][_0x26e770];var _0x4cf913=path[_0x87af('0x5a')](_0x38ebe2,_0x236f42[_0x87af('0x97')]);if(fs['existsSync'](_0x4cf913)){_0x385808[_0x87af('0x59')][_0x87af('0x98')]({'name':_0x236f42[_0x87af('0x29')],'contentType':_0x236f42['type'],'data':fs[_0x87af('0x99')](_0x4cf913)});}}}emlformat['build'](_0x385808,function(_0x1d421c,_0xa88289){if(_0x1d421c)return _0x33eedf(_0x1d421c);fs[_0x87af('0x9a')](path[_0x87af('0x5a')](_0x21ee31,_0x2fb819),_0xa88289);return _0x4d0427(_0xa88289);});});}})[_0x87af('0x24')](function(_0x47a7fe){if(_0x47a7fe){return _0x4f6ce1['download'](path[_0x87af('0x5a')](_0x21ee31,_0x2fb819),_0x2fb819,function(_0x224bd2){if(!_0x224bd2)fs[_0x87af('0x9b')](path[_0x87af('0x5a')](_0x21ee31,_0x2fb819));});}})[_0x87af('0x4a')](handleError(_0x4f6ce1,null));};
\ No newline at end of file
+var _0x3a7f=['../../components/parsers/qs','../../config/logger','api','mail-interactions','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','html-entities','./mailMessage.socket','register','http','client','request','MailMessage,\x20%s,\x20%s','debug','MailMessage,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','info','status','json','offset','undefined','limit','set','Content-Range','then','destroy','end','sendStatus','stack','name','send','map','MailMessage','fieldName','type','key','model','query','keys','filters','attributes','fields','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','catch','params','rawAttributes','intersection','length','include','update','body','find','describe','create','direction','out','secret','split','MailAccount','findOne','MailAccountId','List','Contacts','updatedAt','MailServerOut','Smtp','CloudProvider','getSmtpOptions','attachments','join','root','server/files/attachments','basename','ListId','List\x20not\x20found','SendMail','sendMail','messageId','stringify','accept','mail','read','readAt','YYYY-MM-DD\x20HH:mm:ss','user','UserId','get','MailInteraction','MailInteractionId','read1stAt','format','interaction','[MAILMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','AcceptMessage','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','Sequelize','QueryTypes','SELECT','contact','User','email','agent','manual','interface','SIP/%s','channel','motionChannel','event','fromString','EventManager','acceptmessage','reject','RejectMessage','rejectMessage','sequelize','fullname','internal','rejectmessage','download','unix','toString','server','files','message-%s.eml','from','bcc','subject','createdAt','Attachments','decode','ddd,\x20DD\x20MMM\x20YYYY\x20HH:mm:ss\x20ZZ','headers','Bcc','existsSync','readFileSync','build','writeFileSync','eml-format','moment','util','path','html-to-text'];(function(_0x17feda,_0x5bf5bd){var _0x2d9024=function(_0x4456be){while(--_0x4456be){_0x17feda['push'](_0x17feda['shift']());}};_0x2d9024(++_0x5bf5bd);}(_0x3a7f,0x1e1));var _0xf3a7=function(_0x26fa25,_0x3eba1c){_0x26fa25=_0x26fa25-0x0;var _0xe16666=_0x3a7f[_0x26fa25];return _0xe16666;};'use strict';var emlformat=require(_0xf3a7('0x0'));var moment=require(_0xf3a7('0x1'));var BPromise=require('bluebird');var util=require(_0xf3a7('0x2'));var path=require(_0xf3a7('0x3'));var fs=require('fs');var _=require('lodash');var Redis=require('ioredis');var htmlToText=require(_0xf3a7('0x4'));var qs=require(_0xf3a7('0x5'));var logger=require(_0xf3a7('0x6'))(_0xf3a7('0x7'));var interaction_log=require(_0xf3a7('0x6'))(_0xf3a7('0x8'));var config=require(_0xf3a7('0x9'));var db=require(_0xf3a7('0xa'))['db'];config[_0xf3a7('0xb')]=_[_0xf3a7('0xc')](config[_0xf3a7('0xb')],{'host':_0xf3a7('0xd'),'port':0x18eb});var socket=require(_0xf3a7('0xe'))(new Redis(config[_0xf3a7('0xb')]));var htmlEntities=require(_0xf3a7('0xf'));require(_0xf3a7('0x10'))[_0xf3a7('0x11')](socket);var jayson=require('jayson/promise');var client=jayson['client'][_0xf3a7('0x12')]({'port':0x232c});var client9003=jayson['client'][_0xf3a7('0x12')]({'port':0x232b});var client9002=jayson[_0xf3a7('0x13')][_0xf3a7('0x12')]({'port':0x232a});function respondWithRpcPromise(_0x506133,_0x286259,_0x5b8fa6,_0x283c18){return new BPromise(function(_0x4f16ed,_0x4b45ce){var _0x32ac6f=_0x283c18||client;return _0x32ac6f[_0xf3a7('0x14')](_0x506133,_0x5b8fa6)['then'](function(_0x15cea0){logger['info'](_0xf3a7('0x15'),_0x286259,'request\x20sent');logger[_0xf3a7('0x16')](_0xf3a7('0x17'),_0x286259,_0xf3a7('0x18'),JSON['stringify'](_0x15cea0));if(_0x15cea0['error']){if(_0x15cea0[_0xf3a7('0x19')][_0xf3a7('0x1a')]===0x1f4){logger[_0xf3a7('0x19')]('MailMessage,\x20%s,\x20%s',_0x286259,_0x15cea0[_0xf3a7('0x19')][_0xf3a7('0x1b')]);return _0x4b45ce(_0x15cea0['error'][_0xf3a7('0x1b')]);}logger[_0xf3a7('0x19')](_0xf3a7('0x15'),_0x286259,_0x15cea0[_0xf3a7('0x19')][_0xf3a7('0x1b')]);return _0x4f16ed(_0x15cea0[_0xf3a7('0x19')][_0xf3a7('0x1b')]);}else{logger[_0xf3a7('0x1c')](_0xf3a7('0x15'),_0x286259,_0xf3a7('0x18'));_0x4f16ed(_0x15cea0['result'][_0xf3a7('0x1b')]);}})['catch'](function(_0x451d98){logger[_0xf3a7('0x19')]('MailMessage,\x20%s,\x20%s',_0x286259,_0x451d98);_0x4b45ce(_0x451d98);});});}function respondWithResult(_0x290f18,_0x2dc2e7){_0x2dc2e7=_0x2dc2e7||0xc8;return function(_0x1f05a7){if(_0x1f05a7){return _0x290f18[_0xf3a7('0x1d')](_0x2dc2e7)[_0xf3a7('0x1e')](_0x1f05a7);}};}function respondWithFilteredResult(_0x46e5b9,_0x58f803){return function(_0x39c307){if(_0x39c307){var _0x1add4c=typeof _0x58f803[_0xf3a7('0x1f')]===_0xf3a7('0x20')&&typeof _0x58f803[_0xf3a7('0x21')]===_0xf3a7('0x20');var _0x3c6749=_0x39c307['count'];var _0xb55b3b=_0x1add4c?0x0:_0x58f803['offset'];var _0x2107a5=_0x1add4c?_0x39c307['count']:_0x58f803['offset']+_0x58f803['limit'];var _0x2bd35c;if(_0x2107a5>=_0x3c6749){_0x2107a5=_0x3c6749;_0x2bd35c=0xc8;}else{_0x2bd35c=0xce;}_0x46e5b9['status'](_0x2bd35c);return _0x46e5b9[_0xf3a7('0x22')](_0xf3a7('0x23'),_0xb55b3b+'-'+_0x2107a5+'/'+_0x3c6749)['json'](_0x39c307);}return null;};}function saveUpdates(_0x315564){return function(_0x4805d5){if(_0x4805d5){return _0x4805d5['update'](_0x315564)[_0xf3a7('0x24')](function(_0x3fb9de){return _0x3fb9de;});}return null;};}function removeEntity(_0x3e89f7){return function(_0xb7aa91){if(_0xb7aa91){return _0xb7aa91[_0xf3a7('0x25')]()['then'](function(){_0x3e89f7[_0xf3a7('0x1d')](0xcc)[_0xf3a7('0x26')]();});}};}function handleEntityNotFound(_0x2f17b8){return function(_0x14a516){if(!_0x14a516){_0x2f17b8[_0xf3a7('0x27')](0x194);}return _0x14a516;};}function handleError(_0x273444,_0xc7f10b){_0xc7f10b=_0xc7f10b||0x1f4;return function(_0x257485){logger['error'](_0x257485[_0xf3a7('0x28')]);if(_0x257485[_0xf3a7('0x29')]){delete _0x257485[_0xf3a7('0x29')];}_0x273444[_0xf3a7('0x1d')](_0xc7f10b)[_0xf3a7('0x2a')](_0x257485);};}exports['index']=function(_0x4f6ba1,_0x45f0d5){var _0x48c598={},_0x1c095c={},_0x101fa4={'count':0x0,'rows':[]};var _0x3b2fb0=_[_0xf3a7('0x2b')](db[_0xf3a7('0x2c')]['rawAttributes'],function(_0x131ae4){return{'name':_0x131ae4[_0xf3a7('0x2d')],'type':_0x131ae4[_0xf3a7('0x2e')][_0xf3a7('0x2f')]};});_0x1c095c[_0xf3a7('0x30')]=_[_0xf3a7('0x2b')](_0x3b2fb0,_0xf3a7('0x29'));_0x1c095c[_0xf3a7('0x31')]=_[_0xf3a7('0x32')](_0x4f6ba1['query']);_0x1c095c[_0xf3a7('0x33')]=_['intersection'](_0x1c095c[_0xf3a7('0x30')],_0x1c095c['query']);_0x48c598[_0xf3a7('0x34')]=_['intersection'](_0x1c095c['model'],qs['fields'](_0x4f6ba1[_0xf3a7('0x31')][_0xf3a7('0x35')]));_0x48c598[_0xf3a7('0x34')]=_0x48c598[_0xf3a7('0x34')]['length']?_0x48c598[_0xf3a7('0x34')]:_0x1c095c[_0xf3a7('0x30')];if(!_0x4f6ba1[_0xf3a7('0x31')][_0xf3a7('0x36')](_0xf3a7('0x37'))){_0x48c598['limit']=qs[_0xf3a7('0x21')](_0x4f6ba1[_0xf3a7('0x31')]['limit']);_0x48c598[_0xf3a7('0x1f')]=qs[_0xf3a7('0x1f')](_0x4f6ba1[_0xf3a7('0x31')][_0xf3a7('0x1f')]);}_0x48c598['order']=qs[_0xf3a7('0x38')](_0x4f6ba1[_0xf3a7('0x31')][_0xf3a7('0x38')]);_0x48c598[_0xf3a7('0x39')]=qs['filters'](_[_0xf3a7('0x3a')](_0x4f6ba1['query'],_0x1c095c[_0xf3a7('0x33')]),_0x3b2fb0);if(_0x4f6ba1[_0xf3a7('0x31')][_0xf3a7('0x3b')]){_0x48c598[_0xf3a7('0x39')]=_[_0xf3a7('0x3c')](_0x48c598[_0xf3a7('0x39')],{'$or':_[_0xf3a7('0x2b')](_0x3b2fb0,function(_0x1887db){if(_0x1887db[_0xf3a7('0x2e')]!==_0xf3a7('0x3d')){var _0x28ef84={};_0x28ef84[_0x1887db[_0xf3a7('0x29')]]={'$like':'%'+_0x4f6ba1['query']['filter']+'%'};return _0x28ef84;}})});}_0x48c598=_['merge']({},_0x48c598,_0x4f6ba1[_0xf3a7('0x3e')]);var _0x83fd54={'where':_0x48c598[_0xf3a7('0x39')]};return db[_0xf3a7('0x2c')]['count'](_0x83fd54)[_0xf3a7('0x24')](function(_0x55c357){_0x101fa4['count']=_0x55c357;if(_0x4f6ba1[_0xf3a7('0x31')][_0xf3a7('0x3f')]){_0x48c598['include']=[{'all':!![]}];}return db[_0xf3a7('0x2c')][_0xf3a7('0x40')](_0x48c598);})[_0xf3a7('0x24')](function(_0x970a4b){_0x101fa4[_0xf3a7('0x41')]=_0x970a4b;return _0x101fa4;})['then'](respondWithFilteredResult(_0x45f0d5,_0x48c598))[_0xf3a7('0x42')](handleError(_0x45f0d5,null));};exports['show']=function(_0x1cc873,_0x402fb4){var _0x3688f4={'raw':!![],'where':{'id':_0x1cc873[_0xf3a7('0x43')]['id']}},_0x52b4ab={};_0x52b4ab[_0xf3a7('0x30')]=_[_0xf3a7('0x32')](db[_0xf3a7('0x2c')][_0xf3a7('0x44')]);_0x52b4ab[_0xf3a7('0x31')]=_['keys'](_0x1cc873[_0xf3a7('0x31')]);_0x52b4ab[_0xf3a7('0x33')]=_['intersection'](_0x52b4ab[_0xf3a7('0x30')],_0x52b4ab[_0xf3a7('0x31')]);_0x3688f4[_0xf3a7('0x34')]=_[_0xf3a7('0x45')](_0x52b4ab[_0xf3a7('0x30')],qs[_0xf3a7('0x35')](_0x1cc873[_0xf3a7('0x31')][_0xf3a7('0x35')]));_0x3688f4[_0xf3a7('0x34')]=_0x3688f4['attributes'][_0xf3a7('0x46')]?_0x3688f4[_0xf3a7('0x34')]:_0x52b4ab[_0xf3a7('0x30')];if(_0x1cc873['query'][_0xf3a7('0x3f')]){_0x3688f4[_0xf3a7('0x47')]=[{'all':!![]}];}_0x3688f4=_['merge']({},_0x3688f4,_0x1cc873[_0xf3a7('0x3e')]);return db['MailMessage']['find'](_0x3688f4)[_0xf3a7('0x24')](handleEntityNotFound(_0x402fb4,null))[_0xf3a7('0x24')](respondWithResult(_0x402fb4,null))['catch'](handleError(_0x402fb4,null));};exports[_0xf3a7('0x48')]=function(_0x2d295c,_0x4e0225){if(_0x2d295c[_0xf3a7('0x49')]['id']){delete _0x2d295c[_0xf3a7('0x49')]['id'];}return db[_0xf3a7('0x2c')]['find']({'where':{'id':_0x2d295c[_0xf3a7('0x43')]['id']}})[_0xf3a7('0x24')](handleEntityNotFound(_0x4e0225,null))[_0xf3a7('0x24')](saveUpdates(_0x2d295c[_0xf3a7('0x49')],null))[_0xf3a7('0x24')](respondWithResult(_0x4e0225,null))['catch'](handleError(_0x4e0225,null));};exports['destroy']=function(_0x1a739d,_0x4a2a50){return db['MailMessage'][_0xf3a7('0x4a')]({'where':{'id':_0x1a739d['params']['id']}})[_0xf3a7('0x24')](handleEntityNotFound(_0x4a2a50,null))[_0xf3a7('0x24')](removeEntity(_0x4a2a50,null))[_0xf3a7('0x42')](handleError(_0x4a2a50,null));};exports[_0xf3a7('0x4b')]=function(_0x1c8017,_0x472e47){return db[_0xf3a7('0x2c')][_0xf3a7('0x4b')]()[_0xf3a7('0x24')](respondWithResult(_0x472e47,null))['catch'](handleError(_0x472e47,null));};exports[_0xf3a7('0x4c')]=function(_0x402728,_0x43c294){return db[_0xf3a7('0x2c')][_0xf3a7('0x4c')](_0x402728[_0xf3a7('0x49')])['then'](function(_0x4c4695){if(_0x4c4695){if(_0x4c4695[_0xf3a7('0x4d')]===_0xf3a7('0x4e')&&!_0x4c4695[_0xf3a7('0x4f')]){var _0x32b835,_0x34ea8c,_0x6ce38b;if(_0x402728['body']['to']){_0x34ea8c=_0x402728[_0xf3a7('0x49')]['to'][_0xf3a7('0x50')](',')[0x0];}return db[_0xf3a7('0x51')][_0xf3a7('0x52')]({'where':{'id':_0x4c4695[_0xf3a7('0x53')]},'include':[{'model':db['CmList'],'as':_0xf3a7('0x54'),'include':[{'model':db['CmContact'],'as':_0xf3a7('0x55'),'where':{'email':_0x34ea8c},'limit':0x1,'order':[[_0xf3a7('0x56'),'DESC']]}]},{'model':db[_0xf3a7('0x57')],'as':_0xf3a7('0x58'),'raw':!![],'include':[{'model':db[_0xf3a7('0x59')],'as':'CloudProvider','raw':!![]}]}]})[_0xf3a7('0x24')](function(_0x2f9090){_0x32b835=_0x2f9090;if(!_0x32b835||!_0x32b835[_0xf3a7('0x58')])return;var _0x1449da=_0x32b835[_0xf3a7('0x5a')]();if(_0x402728['body'][_0xf3a7('0x5b')]&&_0x402728['body'][_0xf3a7('0x5b')][_0xf3a7('0x46')]){for(var _0x357d83=0x0;_0x357d83<_0x402728[_0xf3a7('0x49')][_0xf3a7('0x5b')][_0xf3a7('0x46')];_0x357d83+=0x1){_0x402728[_0xf3a7('0x49')][_0xf3a7('0x5b')][_0x357d83]={'filename':_0x402728[_0xf3a7('0x49')][_0xf3a7('0x5b')][_0x357d83][_0xf3a7('0x29')],'path':path[_0xf3a7('0x5c')](config[_0xf3a7('0x5d')],_0xf3a7('0x5e'),_0x402728[_0xf3a7('0x49')][_0xf3a7('0x5b')][_0x357d83][_0xf3a7('0x5f')])};}}_0x6ce38b={'account':_0x1449da,'message':_0x402728[_0xf3a7('0x49')]};return;})[_0xf3a7('0x24')](function(){if(_0x32b835[_0xf3a7('0x54')]){if(_0x32b835[_0xf3a7('0x54')][_0xf3a7('0x55')]['length']){return _0x32b835[_0xf3a7('0x54')]['Contacts'][0x0];}else{return db['CmContact']['create'](_['defaults'](_0x402728['body'],{'firstName':_0x402728[_0xf3a7('0x49')]['to'],'email':_0x402728[_0xf3a7('0x49')]['to'],'phone':_0x402728[_0xf3a7('0x49')]['to'],'ListId':_0x32b835[_0xf3a7('0x60')]}));}}else{throw new Error(_0xf3a7('0x61'));}})[_0xf3a7('0x24')](function(){if(_0x6ce38b){return respondWithRpcPromise(_0xf3a7('0x62'),_0xf3a7('0x63'),_0x6ce38b,client9003)['then'](function(_0x404dfd){return _0x4c4695[_0xf3a7('0x48')]({'read':!![],'messageId':_0x404dfd[_0xf3a7('0x64')],'sentAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')});})[_0xf3a7('0x42')](function(_0x562872){logger['error']('%s',JSON[_0xf3a7('0x65')](_0x562872));return _0x4c4695;});}return _0x4c4695;});}return _0x4c4695;}})['then'](respondWithResult(_0x43c294,0xc9))['catch'](handleError(_0x43c294,null));};exports[_0xf3a7('0x66')]=function(_0x167f47,_0x2b8c15){var _0x4abd7b={'agent':{},'channel':_0xf3a7('0x67')};if(_0x167f47[_0xf3a7('0x49')]['id']){delete _0x167f47['body']['id'];}_0x167f47[_0xf3a7('0x49')][_0xf3a7('0x68')]=!![];_0x167f47[_0xf3a7('0x49')][_0xf3a7('0x69')]=moment()['format'](_0xf3a7('0x6a'));_0x167f47[_0xf3a7('0x49')]['UserId']=_0x167f47[_0xf3a7('0x49')]['UserId']||_0x167f47[_0xf3a7('0x6b')]['id'];_0x4abd7b['agent']['id']=_0x167f47[_0xf3a7('0x49')][_0xf3a7('0x6c')];return db[_0xf3a7('0x2c')]['find']({'where':{'id':_0x167f47[_0xf3a7('0x43')]['id'],'UserId':null}})[_0xf3a7('0x24')](handleEntityNotFound(_0x2b8c15,null))[_0xf3a7('0x24')](saveUpdates(_0x167f47[_0xf3a7('0x49')],null))['then'](function(_0x8484c9){if(_0x8484c9){_0x4abd7b[_0xf3a7('0x1b')]=_0x8484c9[_0xf3a7('0x6d')]({'plain':!![]});return db[_0xf3a7('0x6e')][_0xf3a7('0x4a')]({'where':{'id':_0x8484c9[_0xf3a7('0x6f')]}});}return null;})[_0xf3a7('0x24')](handleEntityNotFound(_0x2b8c15,null))[_0xf3a7('0x24')](function(_0x5f2e6c){if(_0x5f2e6c){return _0x5f2e6c[_0xf3a7('0x48')]({'UserId':_0x167f47[_0xf3a7('0x49')][_0xf3a7('0x6c')],'read1stAt':_['isNil'](_0x5f2e6c[_0xf3a7('0x70')])?moment()[_0xf3a7('0x71')](_0xf3a7('0x6a')):undefined});}return null;})[_0xf3a7('0x24')](function(_0x49dbf2){if(_0x49dbf2){_0x4abd7b[_0xf3a7('0x72')]=_0x49dbf2[_0xf3a7('0x6d')]({'plain':!![]});interaction_log[_0xf3a7('0x1c')](_0xf3a7('0x73'),_0x167f47[_0xf3a7('0x6b')]['id'],_0x167f47['user'][_0xf3a7('0x29')],_0x167f47[_0xf3a7('0x6b')][_0xf3a7('0x74')],_0x4abd7b[_0xf3a7('0x72')]['id'],_0x167f47[_0xf3a7('0x49')]?JSON['stringify'](_0x167f47[_0xf3a7('0x49')]):'null');return respondWithRpcPromise(_0xf3a7('0x75'),_0xf3a7('0x76'),_0x4abd7b);}return null;})['then'](function(_0xe90761){var _0x8631e5=_0xf3a7('0x77')+_0xe90761['message']['ContactId'];return db['sequelize'][_0xf3a7('0x31')](_0x8631e5,{'type':db[_0xf3a7('0x78')][_0xf3a7('0x79')][_0xf3a7('0x7a')],'raw':!![]})[_0xf3a7('0x24')](function(_0x2bed51){return _0x2bed51;});})[_0xf3a7('0x24')](function(_0x74bbc6){if(_0x74bbc6){_0x4abd7b[_0xf3a7('0x1b')][_0xf3a7('0x7b')]=_0x74bbc6[0x0];if(!_0x167f47[_0xf3a7('0x49')][_0xf3a7('0x6c')])return;return db[_0xf3a7('0x7c')][_0xf3a7('0x4a')]({'where':{'id':_0x167f47[_0xf3a7('0x49')][_0xf3a7('0x6c')],'role':'agent'},'attributes':['id',_0xf3a7('0x29'),'fullname',_0xf3a7('0x7d'),'internal'],'raw':!![]});}return null;})['then'](function(_0xc69a02){if(!_0xc69a02)return null;_0x4abd7b[_0xf3a7('0x1b')][_0xf3a7('0x7e')]=_0xc69a02;return _0x4abd7b;})['then'](function(_0x275108){if(_0x275108){if(_0x167f47[_0xf3a7('0x49')][_0xf3a7('0x7f')]){_0x4abd7b['message'][_0xf3a7('0x80')]=util[_0xf3a7('0x71')](_0xf3a7('0x81'),_0x167f47['user'][_0xf3a7('0x29')]);_0x4abd7b[_0xf3a7('0x1b')][_0xf3a7('0x82')]=_0x4abd7b[_0xf3a7('0x82')];_0x4abd7b['message'][_0xf3a7('0x83')]=_0x4abd7b[_0xf3a7('0x82')];_0x4abd7b[_0xf3a7('0x1b')][_0xf3a7('0x84')]=_0xf3a7('0x66');_0x4abd7b[_0xf3a7('0x1b')][_0xf3a7('0x49')]=htmlToText[_0xf3a7('0x85')](_0x4abd7b[_0xf3a7('0x1b')][_0xf3a7('0x49')]);return respondWithRpcPromise('EventManager',_0xf3a7('0x86'),{'event':_0xf3a7('0x87'),'message':_0x4abd7b[_0xf3a7('0x1b')]},client9002)['then'](function(){return _0x4abd7b;});}return _0x4abd7b;}return null;})[_0xf3a7('0x24')](respondWithResult(_0x2b8c15,null))[_0xf3a7('0x42')](handleError(_0x2b8c15,null));};exports[_0xf3a7('0x88')]=function(_0x5d85c9,_0x4484df){var _0x4d673a={'agent':{},'channel':_0xf3a7('0x67')};if(_0x5d85c9['body']['id']){delete _0x5d85c9[_0xf3a7('0x49')]['id'];}_0x5d85c9[_0xf3a7('0x49')]['UserId']=_0x5d85c9[_0xf3a7('0x49')][_0xf3a7('0x6c')]||_0x5d85c9[_0xf3a7('0x6b')]['id'];_0x4d673a['agent']['id']=_0x5d85c9[_0xf3a7('0x49')]['UserId'];return db[_0xf3a7('0x2c')][_0xf3a7('0x4a')]({'where':{'id':_0x5d85c9[_0xf3a7('0x43')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x4484df,null))[_0xf3a7('0x24')](function(_0x20d0b6){if(_0x20d0b6){_0x4d673a[_0xf3a7('0x1b')]=_0x20d0b6['get']({'plain':!![]});return db[_0xf3a7('0x6e')][_0xf3a7('0x4a')]({'where':{'id':_0x20d0b6[_0xf3a7('0x6f')]}});}return null;})['then'](handleEntityNotFound(_0x4484df,null))[_0xf3a7('0x24')](function(_0x26f314){if(_0x26f314){_0x4d673a[_0xf3a7('0x72')]=_0x26f314['get']({'plain':!![]});interaction_log[_0xf3a7('0x1c')]('[MAILMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x5d85c9[_0xf3a7('0x6b')]['id'],_0x5d85c9[_0xf3a7('0x6b')][_0xf3a7('0x29')],_0x5d85c9[_0xf3a7('0x6b')][_0xf3a7('0x74')],_0x4d673a[_0xf3a7('0x72')]['id'],_0x5d85c9[_0xf3a7('0x49')]?JSON['stringify'](_0x5d85c9[_0xf3a7('0x49')]):'null');return respondWithRpcPromise(_0xf3a7('0x89'),_0xf3a7('0x8a'),_0x4d673a);}return null;})[_0xf3a7('0x24')](function(_0x55d73e){var _0x35d4fa='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x55d73e[_0xf3a7('0x1b')]['ContactId'];return db[_0xf3a7('0x8b')][_0xf3a7('0x31')](_0x35d4fa,{'type':db['Sequelize'][_0xf3a7('0x79')]['SELECT'],'raw':!![]})[_0xf3a7('0x24')](function(_0x370413){return _0x370413;});})['then'](function(_0xb04ca3){if(_0xb04ca3){_0x4d673a[_0xf3a7('0x1b')][_0xf3a7('0x7b')]=_0xb04ca3[0x0];if(!_0x5d85c9[_0xf3a7('0x49')][_0xf3a7('0x6c')])return;return db['User'][_0xf3a7('0x4a')]({'where':{'id':_0x5d85c9[_0xf3a7('0x49')]['UserId'],'role':_0xf3a7('0x7e')},'attributes':['id',_0xf3a7('0x29'),_0xf3a7('0x8c'),_0xf3a7('0x7d'),_0xf3a7('0x8d')],'raw':!![]});}return null;})[_0xf3a7('0x24')](function(_0x301531){if(!_0x301531)return null;_0x4d673a['message'][_0xf3a7('0x7e')]=_0x301531;return _0x4d673a;})[_0xf3a7('0x24')](function(_0x203bc0){if(_0x203bc0){_0x203bc0[_0xf3a7('0x1b')][_0xf3a7('0x80')]=util[_0xf3a7('0x71')](_0xf3a7('0x81'),_0x5d85c9[_0xf3a7('0x6b')][_0xf3a7('0x29')]);_0x203bc0['message'][_0xf3a7('0x82')]=_0x4d673a['channel'];_0x203bc0[_0xf3a7('0x1b')][_0xf3a7('0x83')]=_0x4d673a[_0xf3a7('0x82')];_0x203bc0[_0xf3a7('0x1b')][_0xf3a7('0x84')]='reject';_0x203bc0[_0xf3a7('0x1b')][_0xf3a7('0x49')]=htmlToText[_0xf3a7('0x85')](_0x4d673a[_0xf3a7('0x1b')][_0xf3a7('0x49')]);respondWithRpcPromise(_0xf3a7('0x86'),_0xf3a7('0x86'),{'event':_0xf3a7('0x8e'),'message':_0x203bc0[_0xf3a7('0x1b')]},client9002);return _0x4d673a;}return null;})[_0xf3a7('0x24')](respondWithResult(_0x4484df,null))[_0xf3a7('0x42')](handleError(_0x4484df,null));};exports[_0xf3a7('0x8f')]=function(_0x42723b,_0x469228){var _0x382509=moment()[_0xf3a7('0x90')]()[_0xf3a7('0x91')]();var _0xeccb5=path[_0xf3a7('0x5c')](config[_0xf3a7('0x5d')],_0xf3a7('0x92'),'files','tmp');var _0x33113c=path['join'](config['root'],'server',_0xf3a7('0x93'),_0xf3a7('0x5b'));var _0x25195a=util[_0xf3a7('0x71')](_0xf3a7('0x94'),_0x382509);return db['MailMessage'][_0xf3a7('0x4a')]({'where':{'id':_0x42723b[_0xf3a7('0x43')]['id']},'attributes':['id',_0xf3a7('0x49'),_0xf3a7('0x95'),'to','cc',_0xf3a7('0x96'),_0xf3a7('0x97'),_0xf3a7('0x98')],'include':_0x42723b['query'][_0xf3a7('0x5b')]?[{'model':db['Attachment'],'as':_0xf3a7('0x99')}]:undefined})[_0xf3a7('0x24')](handleEntityNotFound(_0x469228,null))[_0xf3a7('0x24')](function(_0x237ce9){if(_0x237ce9){var _0x4ef7d3=_0x237ce9;var _0x1c1e42={'from':_0x4ef7d3[_0xf3a7('0x95')],'to':_0x4ef7d3['to'],'subject':_0x4ef7d3[_0xf3a7('0x97')],'html':htmlEntities[_0xf3a7('0x9a')](_0x4ef7d3[_0xf3a7('0x49')]),'headers':{'Date':moment(_0x4ef7d3[_0xf3a7('0x98')])[_0xf3a7('0x71')](_0xf3a7('0x9b'))},'attachments':[]};if(_0x237ce9['cc']){_0x1c1e42[_0xf3a7('0x9c')]['Cc']=_0x237ce9['cc'];}if(_0x237ce9[_0xf3a7('0x96')]){_0x1c1e42[_0xf3a7('0x9c')][_0xf3a7('0x9d')]=_0x237ce9[_0xf3a7('0x96')];}return new BPromise(function(_0x26843a,_0x464da5){if(_0x237ce9['Attachments']){for(var _0x2094ee=0x0;_0x2094ee<_0x237ce9['Attachments'][_0xf3a7('0x46')];_0x2094ee++){var _0x43b7e2=_0x237ce9['Attachments'][_0x2094ee];var _0x2b30d5=path['join'](_0x33113c,_0x43b7e2[_0xf3a7('0x5f')]);if(fs[_0xf3a7('0x9e')](_0x2b30d5)){_0x1c1e42[_0xf3a7('0x5b')]['push']({'name':_0x43b7e2[_0xf3a7('0x29')],'contentType':_0x43b7e2[_0xf3a7('0x2e')],'data':fs[_0xf3a7('0x9f')](_0x2b30d5)});}}}emlformat[_0xf3a7('0xa0')](_0x1c1e42,function(_0x259330,_0x3727c1){if(_0x259330)return _0x464da5(_0x259330);fs[_0xf3a7('0xa1')](path[_0xf3a7('0x5c')](_0xeccb5,_0x25195a),_0x3727c1);return _0x26843a(_0x3727c1);});});}})['then'](function(_0x13f23b){if(_0x13f23b){return _0x469228[_0xf3a7('0x8f')](path[_0xf3a7('0x5c')](_0xeccb5,_0x25195a),_0x25195a,function(_0x37feae){if(!_0x37feae)fs['unlinkSync'](path[_0xf3a7('0x5c')](_0xeccb5,_0x25195a));});}})['catch'](handleError(_0x469228,null));};
\ No newline at end of file
index e6a2c5f..90f4a2a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb5d8=['events','remove','emit','hasOwnProperty','exports'];(function(_0xd3c928,_0x199672){var _0x343de6=function(_0x2a97b3){while(--_0x2a97b3){_0xd3c928['push'](_0xd3c928['shift']());}};_0x343de6(++_0x199672);}(_0xb5d8,0x19a));var _0x8b5d=function(_0x5d2942,_0x511f23){_0x5d2942=_0x5d2942-0x0;var _0x3329db=_0xb5d8[_0x5d2942];return _0x3329db;};'use strict';var EventEmitter=require(_0x8b5d('0x0'));var MailMessage=require('../../mysqldb')['db']['MailMessage'];var MailMessageEvents=new EventEmitter();MailMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x8b5d('0x1')};function emitEvent(_0x3a506a){return function(_0x2fa76e,_0x4874ca,_0x52c8dc){MailMessageEvents[_0x8b5d('0x2')](_0x3a506a+':'+_0x2fa76e['id'],_0x2fa76e);MailMessageEvents[_0x8b5d('0x2')](_0x3a506a,_0x2fa76e);_0x52c8dc(null);};}for(var e in events){if(events[_0x8b5d('0x3')](e)){var event=events[e];MailMessage['hook'](e,emitEvent(event));}}module[_0x8b5d('0x4')]=MailMessageEvents;
\ No newline at end of file
+var _0x674d=['hook','exports','../../mysqldb','MailMessage','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0xcd0918,_0x56bdf9){var _0x250704=function(_0x56788e){while(--_0x56788e){_0xcd0918['push'](_0xcd0918['shift']());}};_0x250704(++_0x56bdf9);}(_0x674d,0x14c));var _0xd674=function(_0x4c742f,_0x2bd40a){_0x4c742f=_0x4c742f-0x0;var _0x2913ae=_0x674d[_0x4c742f];return _0x2913ae;};'use strict';var EventEmitter=require('events');var MailMessage=require(_0xd674('0x0'))['db'][_0xd674('0x1')];var MailMessageEvents=new EventEmitter();MailMessageEvents[_0xd674('0x2')](0x0);var events={'afterCreate':_0xd674('0x3'),'afterUpdate':_0xd674('0x4'),'afterDestroy':_0xd674('0x5')};function emitEvent(_0x151dd9){return function(_0x1c8b45,_0x521228,_0x3bb240){MailMessageEvents['emit'](_0x151dd9+':'+_0x1c8b45['id'],_0x1c8b45);MailMessageEvents[_0xd674('0x6')](_0x151dd9,_0x1c8b45);_0x3bb240(null);};}for(var e in events){if(events[_0xd674('0x7')](e)){var event=events[e];MailMessage[_0xd674('0x8')](e,emitEvent(event));}}module[_0xd674('0x9')]=MailMessageEvents;
\ No newline at end of file
index 6197f55..2a48c79 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1e72=['fromString','body','models','get','direction','toLowerCase','out','secret','isNil','UserId','MailInteraction','findOne','MailInteractionId','then','update','createdAt','catch','error','utf8mb4_unicode_ci','util','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./mailMessage.attributes','exports','MailMessage','mail_messages','messageId','fti_mail_messages','FULLTEXT','plainBody'];(function(_0x33976d,_0x24729b){var _0x2723fd=function(_0x519d60){while(--_0x519d60){_0x33976d['push'](_0x33976d['shift']());}};_0x2723fd(++_0x24729b);}(_0x1e72,0x194));var _0x21e7=function(_0x153590,_0x1a426f){_0x153590=_0x153590-0x0;var _0x25bb5d=_0x1e72[_0x153590];return _0x25bb5d;};'use strict';var _=require('lodash');var util=require(_0x21e7('0x0'));var logger=require(_0x21e7('0x1'))(_0x21e7('0x2'));var moment=require(_0x21e7('0x3'));var BPromise=require(_0x21e7('0x4'));var rp=require('request-promise');var htmlToText=require('html-to-text');var fs=require('fs');var path=require(_0x21e7('0x5'));var rimraf=require(_0x21e7('0x6'));var config=require(_0x21e7('0x7'));var attributes=require(_0x21e7('0x8'));module[_0x21e7('0x9')]=function(_0x1f221b,_0x1a8275){return _0x1f221b['define'](_0x21e7('0xa'),attributes,{'tableName':_0x21e7('0xb'),'paranoid':![],'indexes':[{'name':_0x21e7('0xc'),'fields':['messageId']},{'name':_0x21e7('0xd'),'fields':['plainBody','subject'],'type':_0x21e7('0xe')}],'timestamps':!![],'hooks':{'beforeCreate':function(_0x12e7d1,_0x3cebee,_0x192e17){if(_0x12e7d1['body']){_0x12e7d1[_0x21e7('0xf')]=htmlToText[_0x21e7('0x10')](_0x12e7d1[_0x21e7('0x11')],{'preserveNewlines':!![],'singleNewLineParagraphs':!![],'uppercaseHeadings':![],'noLinkBrackets':!![],'ignoreImage':!![]});}_0x192e17(null,_0x3cebee);},'afterCreate':function(_0x3be257,_0x1d68a4,_0x19af1f){var _0x277894=_0x1f221b[_0x21e7('0x12')];var _0x17155f=_0x3be257[_0x21e7('0x13')]({'plain':!![]});if(_0x17155f[_0x21e7('0x14')][_0x21e7('0x15')]()==='in'||_0x17155f['direction']['toLowerCase']()===_0x21e7('0x16')&&!_0x17155f[_0x21e7('0x17')]&&!_[_0x21e7('0x18')](_0x17155f[_0x21e7('0x19')])){_0x277894[_0x21e7('0x1a')][_0x21e7('0x1b')]({'where':{'id':_0x17155f[_0x21e7('0x1c')]}})[_0x21e7('0x1d')](function(_0x4e2e07){if(_0x4e2e07){_0x4e2e07[_0x21e7('0x1e')]({'lastMsgAt':_0x17155f[_0x21e7('0x1f')],'lastMsgDirection':_0x17155f[_0x21e7('0x14')]['toLowerCase']()});}})[_0x21e7('0x20')](function(_0x2a2f33){console[_0x21e7('0x21')](_0x2a2f33);});}_0x19af1f();}},'charset':'utf8mb4','collate':_0x21e7('0x22')});};
\ No newline at end of file
+var _0x5434=['out','secret','isNil','UserId','MailInteractionId','update','utf8mb4','utf8mb4_unicode_ci','lodash','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./mailMessage.attributes','exports','define','mail_messages','messageId','fti_mail_messages','plainBody','subject','body','models','get','direction','toLowerCase'];(function(_0x16d10f,_0x2ba2d5){var _0x50c823=function(_0x44e43f){while(--_0x44e43f){_0x16d10f['push'](_0x16d10f['shift']());}};_0x50c823(++_0x2ba2d5);}(_0x5434,0x99));var _0x4543=function(_0xdcb378,_0xbac002){_0xdcb378=_0xdcb378-0x0;var _0x289172=_0x5434[_0xdcb378];return _0x289172;};'use strict';var _=require(_0x4543('0x0'));var util=require('util');var logger=require(_0x4543('0x1'))(_0x4543('0x2'));var moment=require('moment');var BPromise=require(_0x4543('0x3'));var rp=require(_0x4543('0x4'));var htmlToText=require('html-to-text');var fs=require('fs');var path=require(_0x4543('0x5'));var rimraf=require(_0x4543('0x6'));var config=require(_0x4543('0x7'));var attributes=require(_0x4543('0x8'));module[_0x4543('0x9')]=function(_0x5867d9,_0x1f5ee3){return _0x5867d9[_0x4543('0xa')]('MailMessage',attributes,{'tableName':_0x4543('0xb'),'paranoid':![],'indexes':[{'name':_0x4543('0xc'),'fields':['messageId']},{'name':_0x4543('0xd'),'fields':[_0x4543('0xe'),_0x4543('0xf')],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'beforeCreate':function(_0xf79bde,_0x17f2f2,_0x36a5e3){if(_0xf79bde['body']){_0xf79bde['plainBody']=htmlToText['fromString'](_0xf79bde[_0x4543('0x10')],{'preserveNewlines':!![],'singleNewLineParagraphs':!![],'uppercaseHeadings':![],'noLinkBrackets':!![],'ignoreImage':!![]});}_0x36a5e3(null,_0x17f2f2);},'afterCreate':function(_0xe64112,_0x15a025,_0xa0b497){var _0x4b4d8d=_0x5867d9[_0x4543('0x11')];var _0x2e7ae0=_0xe64112[_0x4543('0x12')]({'plain':!![]});if(_0x2e7ae0['direction']['toLowerCase']()==='in'||_0x2e7ae0[_0x4543('0x13')][_0x4543('0x14')]()===_0x4543('0x15')&&!_0x2e7ae0[_0x4543('0x16')]&&!_[_0x4543('0x17')](_0x2e7ae0[_0x4543('0x18')])){_0x4b4d8d['MailInteraction']['findOne']({'where':{'id':_0x2e7ae0[_0x4543('0x19')]}})['then'](function(_0x484450){if(_0x484450){_0x484450[_0x4543('0x1a')]({'lastMsgAt':_0x2e7ae0['createdAt'],'lastMsgDirection':_0x2e7ae0[_0x4543('0x13')]['toLowerCase']()});}})['catch'](function(_0x6d038a){console['error'](_0x6d038a);});}_0xa0b497();}},'charset':_0x4543('0x1b'),'collate':_0x4543('0x1c')});};
\ No newline at end of file
index 803fe45..43e9ab2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd4a2=['bluebird','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','./mailMessage.socket','register','MailMessage,\x20%s,\x20%s','request\x20sent','debug','MailMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','CreateMailMessage','create','body','options','raw','then','catch','lodash'];(function(_0x577e6f,_0x2d8ddb){var _0x3eaf46=function(_0x2f7ff4){while(--_0x2f7ff4){_0x577e6f['push'](_0x577e6f['shift']());}};_0x3eaf46(++_0x2d8ddb);}(_0xd4a2,0x173));var _0x2d4a=function(_0x4c81ce,_0x23f069){_0x4c81ce=_0x4c81ce-0x0;var _0x201b3b=_0xd4a2[_0x4c81ce];return _0x201b3b;};'use strict';var _=require(_0x2d4a('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x2d4a('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2d4a('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0x2d4a('0x3'));var logger=require('../../config/logger')(_0x2d4a('0x4'));var config=require(_0x2d4a('0x5'));var jayson=require(_0x2d4a('0x6'));var client=jayson[_0x2d4a('0x7')][_0x2d4a('0x8')]({'port':0x232a});config['redis']=_[_0x2d4a('0x9')](config[_0x2d4a('0xa')],{'host':_0x2d4a('0xb'),'port':0x18eb});var socket=require(_0x2d4a('0xc'))(new Redis(config[_0x2d4a('0xa')]));require(_0x2d4a('0xd'))[_0x2d4a('0xe')](socket);function respondWithRpcPromise(_0x113839,_0x33b786,_0x4738dc){return new BPromise(function(_0x3abbbd,_0xce6af6){return client['request'](_0x113839,_0x4738dc)['then'](function(_0x4002de){logger['info'](_0x2d4a('0xf'),_0x33b786,_0x2d4a('0x10'));logger[_0x2d4a('0x11')](_0x2d4a('0x12'),_0x33b786,_0x2d4a('0x10'),JSON[_0x2d4a('0x13')](_0x4002de));if(_0x4002de[_0x2d4a('0x14')]){if(_0x4002de[_0x2d4a('0x14')]['code']===0x1f4){logger['error'](_0x2d4a('0xf'),_0x33b786,_0x4002de['error'][_0x2d4a('0x15')]);return _0xce6af6(_0x4002de[_0x2d4a('0x14')][_0x2d4a('0x15')]);}logger[_0x2d4a('0x14')]('MailMessage,\x20%s,\x20%s',_0x33b786,_0x4002de[_0x2d4a('0x14')]['message']);return _0x3abbbd(_0x4002de[_0x2d4a('0x14')]['message']);}else{logger[_0x2d4a('0x16')](_0x2d4a('0xf'),_0x33b786,_0x2d4a('0x10'));_0x3abbbd(_0x4002de[_0x2d4a('0x17')]['message']);}})['catch'](function(_0x5ac74b){logger[_0x2d4a('0x14')](_0x2d4a('0xf'),_0x33b786,_0x5ac74b);_0xce6af6(_0x5ac74b);});});}exports[_0x2d4a('0x18')]=function(_0x419df5){var _0x46c331=this;return new Promise(function(_0x2e4069,_0x56445a){return db['MailMessage'][_0x2d4a('0x19')](_0x419df5[_0x2d4a('0x1a')],{'raw':_0x419df5[_0x2d4a('0x1b')]?_0x419df5[_0x2d4a('0x1b')][_0x2d4a('0x1c')]===undefined?!![]:![]:!![]})[_0x2d4a('0x1d')](function(_0x22dd0b){logger[_0x2d4a('0x16')]('CreateMailMessage',_0x419df5);logger[_0x2d4a('0x11')](_0x2d4a('0x18'),_0x419df5,JSON[_0x2d4a('0x13')](_0x22dd0b));_0x2e4069(_0x22dd0b);})[_0x2d4a('0x1e')](function(_0x2c845c){logger[_0x2d4a('0x14')](_0x2d4a('0x18'),_0x2c845c[_0x2d4a('0x15')],_0x419df5);_0x56445a(_0x46c331['error'](0x1f4,_0x2c845c['message']));});});};
\ No newline at end of file
+var _0x1775=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./mailMessage.socket','register','request','then','MailMessage,\x20%s,\x20%s','request\x20sent','debug','MailMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','MailMessage','create','body','options','raw','CreateMailMessage','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x5f3905,_0x43a651){var _0x2923b1=function(_0x3c72d8){while(--_0x3c72d8){_0x5f3905['push'](_0x5f3905['shift']());}};_0x2923b1(++_0x43a651);}(_0x1775,0x1db));var _0x5177=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x1775[_0x14add3];return _0x4a174f;};'use strict';var _=require('lodash');var util=require(_0x5177('0x0'));var moment=require(_0x5177('0x1'));var BPromise=require(_0x5177('0x2'));var rs=require(_0x5177('0x3'));var fs=require('fs');var Redis=require(_0x5177('0x4'));var db=require(_0x5177('0x5'))['db'];var utils=require(_0x5177('0x6'));var logger=require(_0x5177('0x7'))(_0x5177('0x8'));var config=require(_0x5177('0x9'));var jayson=require(_0x5177('0xa'));var client=jayson[_0x5177('0xb')][_0x5177('0xc')]({'port':0x232a});config[_0x5177('0xd')]=_[_0x5177('0xe')](config[_0x5177('0xd')],{'host':_0x5177('0xf'),'port':0x18eb});var socket=require(_0x5177('0x10'))(new Redis(config[_0x5177('0xd')]));require(_0x5177('0x11'))[_0x5177('0x12')](socket);function respondWithRpcPromise(_0x206035,_0x5bdca9,_0x4ae3d2){return new BPromise(function(_0x13c7f6,_0x1d7116){return client[_0x5177('0x13')](_0x206035,_0x4ae3d2)[_0x5177('0x14')](function(_0x301db2){logger['info'](_0x5177('0x15'),_0x5bdca9,_0x5177('0x16'));logger[_0x5177('0x17')](_0x5177('0x18'),_0x5bdca9,_0x5177('0x16'),JSON[_0x5177('0x19')](_0x301db2));if(_0x301db2[_0x5177('0x1a')]){if(_0x301db2[_0x5177('0x1a')][_0x5177('0x1b')]===0x1f4){logger[_0x5177('0x1a')](_0x5177('0x15'),_0x5bdca9,_0x301db2[_0x5177('0x1a')][_0x5177('0x1c')]);return _0x1d7116(_0x301db2[_0x5177('0x1a')][_0x5177('0x1c')]);}logger[_0x5177('0x1a')](_0x5177('0x15'),_0x5bdca9,_0x301db2[_0x5177('0x1a')][_0x5177('0x1c')]);return _0x13c7f6(_0x301db2['error'][_0x5177('0x1c')]);}else{logger[_0x5177('0x1d')](_0x5177('0x15'),_0x5bdca9,_0x5177('0x16'));_0x13c7f6(_0x301db2['result'][_0x5177('0x1c')]);}})[_0x5177('0x1e')](function(_0x13d5d4){logger['error'](_0x5177('0x15'),_0x5bdca9,_0x13d5d4);_0x1d7116(_0x13d5d4);});});}exports['CreateMailMessage']=function(_0xc2b2b5){var _0xe221b3=this;return new Promise(function(_0x219744,_0x27b732){return db[_0x5177('0x1f')][_0x5177('0x20')](_0xc2b2b5[_0x5177('0x21')],{'raw':_0xc2b2b5[_0x5177('0x22')]?_0xc2b2b5[_0x5177('0x22')][_0x5177('0x23')]===undefined?!![]:![]:!![]})[_0x5177('0x14')](function(_0x3b0c37){logger['info'](_0x5177('0x24'),_0xc2b2b5);logger['debug'](_0x5177('0x24'),_0xc2b2b5,JSON[_0x5177('0x19')](_0x3b0c37));_0x219744(_0x3b0c37);})[_0x5177('0x1e')](function(_0x2d51d0){logger['error'](_0x5177('0x24'),_0x2d51d0['message'],_0xc2b2b5);_0x27b732(_0xe221b3['error'](0x1f4,_0x2d51d0[_0x5177('0x1c')]));});});};
\ No newline at end of file
index 6cca3f0..3a4e191 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfbf0=['mailMessage:','save','remove','removeListener','length'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xfbf0,0x141));var _0x0fbf=function(_0x474bc0,_0x26989c){_0x474bc0=_0x474bc0-0x0;var _0x4b24cf=_0xfbf0[_0x474bc0];return _0x4b24cf;};'use strict';var MailMessageEvents=require('./mailMessage.events');var events=[_0x0fbf('0x0'),_0x0fbf('0x1'),'update'];function createListener(_0x55ae3f,_0x112fd3){return function(_0x15f376){_0x112fd3['emit'](_0x55ae3f,_0x15f376);};}function removeListener(_0x200f9c,_0x4a244a){return function(){MailMessageEvents[_0x0fbf('0x2')](_0x200f9c,_0x4a244a);};}exports['register']=function(_0xe258f6){for(var _0x29c1cb=0x0,_0x5210d3=events[_0x0fbf('0x3')];_0x29c1cb<_0x5210d3;_0x29c1cb++){var _0x32f4e0=events[_0x29c1cb];var _0x64e97=createListener(_0x0fbf('0x4')+_0x32f4e0,_0xe258f6);MailMessageEvents['on'](_0x32f4e0,_0x64e97);}};
\ No newline at end of file
+var _0x145c=['emit','register','length','mailMessage:','./mailMessage.events','remove','update'];(function(_0x8a6714,_0x388b5b){var _0x2eb9e2=function(_0x4643e4){while(--_0x4643e4){_0x8a6714['push'](_0x8a6714['shift']());}};_0x2eb9e2(++_0x388b5b);}(_0x145c,0x193));var _0xc145=function(_0x44f9f9,_0x331b68){_0x44f9f9=_0x44f9f9-0x0;var _0x53dcaf=_0x145c[_0x44f9f9];return _0x53dcaf;};'use strict';var MailMessageEvents=require(_0xc145('0x0'));var events=['save',_0xc145('0x1'),_0xc145('0x2')];function createListener(_0xc905a8,_0x4a00f5){return function(_0x15c223){_0x4a00f5[_0xc145('0x3')](_0xc905a8,_0x15c223);};}function removeListener(_0x2f613e,_0x31cd04){return function(){MailMessageEvents['removeListener'](_0x2f613e,_0x31cd04);};}exports[_0xc145('0x4')]=function(_0x492d38){for(var _0x322713=0x0,_0x4dafeb=events[_0xc145('0x5')];_0x322713<_0x4dafeb;_0x322713++){var _0x5f9c17=events[_0x322713];var _0x1547c6=createListener(_0xc145('0x6')+_0x5f9c17,_0x492d38);MailMessageEvents['on'](_0x5f9c17,_0x1547c6);}};
\ No newline at end of file
index bb4e091..d21e2ac 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc640=['index','/:id','show','getTeams','post','create','addTeams','put','delete','destroy','/:id/teams','removeTeams','/:id/users','util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','./mailQueue.controller','get','isAuthenticated'];(function(_0x4a94d0,_0x374e5d){var _0x50128a=function(_0x595a2c){while(--_0x595a2c){_0x4a94d0['push'](_0x4a94d0['shift']());}};_0x50128a(++_0x374e5d);}(_0xc640,0x1c5));var _0x0c64=function(_0x369f42,_0x3a9150){_0x369f42=_0x369f42-0x0;var _0x5281c4=_0xc640[_0x369f42];return _0x5281c4;};'use strict';var multer=require('multer');var util=require(_0x0c64('0x0'));var path=require(_0x0c64('0x1'));var timeout=require(_0x0c64('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x0c64('0x3'));var auth=require(_0x0c64('0x4'));var interaction=require(_0x0c64('0x5'));var config=require('../../config/environment');var controller=require(_0x0c64('0x6'));router[_0x0c64('0x7')]('/',auth[_0x0c64('0x8')](),controller[_0x0c64('0x9')]);router[_0x0c64('0x7')]('/describe',auth[_0x0c64('0x8')](),controller['describe']);router['get'](_0x0c64('0xa'),auth['isAuthenticated'](),controller[_0x0c64('0xb')]);router['get']('/:id/members',auth[_0x0c64('0x8')](),controller['getMembers']);router[_0x0c64('0x7')]('/:id/teams',auth['isAuthenticated'](),controller[_0x0c64('0xc')]);router[_0x0c64('0x7')]('/:id/users',auth[_0x0c64('0x8')](),controller['getAgents']);router[_0x0c64('0xd')]('/',auth['isAuthenticated'](),controller[_0x0c64('0xe')]);router[_0x0c64('0xd')]('/:id/teams',auth[_0x0c64('0x8')](),controller[_0x0c64('0xf')]);router[_0x0c64('0xd')]('/:id/users',auth[_0x0c64('0x8')](),controller['addAgents']);router[_0x0c64('0x10')](_0x0c64('0xa'),auth[_0x0c64('0x8')](),controller['update']);router[_0x0c64('0x11')](_0x0c64('0xa'),auth[_0x0c64('0x8')](),controller[_0x0c64('0x12')]);router[_0x0c64('0x11')](_0x0c64('0x13'),auth[_0x0c64('0x8')](),controller[_0x0c64('0x14')]);router[_0x0c64('0x11')](_0x0c64('0x15'),auth['isAuthenticated'](),controller['removeAgents']);module['exports']=router;
\ No newline at end of file
+var _0xe620=['post','/:id/teams','addTeams','/:id/users','put','update','delete','destroy','removeTeams','removeAgents','exports','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','/describe','describe','/:id','/:id/members','getMembers','getTeams','getAgents'];(function(_0x4d07cc,_0x587613){var _0x42de3b=function(_0x201f78){while(--_0x201f78){_0x4d07cc['push'](_0x4d07cc['shift']());}};_0x42de3b(++_0x587613);}(_0xe620,0x182));var _0x0e62=function(_0x5dfee3,_0x5e3bbe){_0x5dfee3=_0x5dfee3-0x0;var _0x1e1785=_0xe620[_0x5dfee3];return _0x1e1785;};'use strict';var multer=require('multer');var util=require('util');var path=require('path');var timeout=require(_0x0e62('0x0'));var express=require(_0x0e62('0x1'));var router=express['Router']();var fs_extra=require(_0x0e62('0x2'));var auth=require(_0x0e62('0x3'));var interaction=require(_0x0e62('0x4'));var config=require('../../config/environment');var controller=require('./mailQueue.controller');router[_0x0e62('0x5')]('/',auth[_0x0e62('0x6')](),controller['index']);router['get'](_0x0e62('0x7'),auth['isAuthenticated'](),controller[_0x0e62('0x8')]);router[_0x0e62('0x5')](_0x0e62('0x9'),auth[_0x0e62('0x6')](),controller['show']);router[_0x0e62('0x5')](_0x0e62('0xa'),auth['isAuthenticated'](),controller[_0x0e62('0xb')]);router[_0x0e62('0x5')]('/:id/teams',auth[_0x0e62('0x6')](),controller[_0x0e62('0xc')]);router[_0x0e62('0x5')]('/:id/users',auth[_0x0e62('0x6')](),controller[_0x0e62('0xd')]);router[_0x0e62('0xe')]('/',auth['isAuthenticated'](),controller['create']);router[_0x0e62('0xe')](_0x0e62('0xf'),auth[_0x0e62('0x6')](),controller[_0x0e62('0x10')]);router[_0x0e62('0xe')](_0x0e62('0x11'),auth['isAuthenticated'](),controller['addAgents']);router[_0x0e62('0x12')]('/:id',auth[_0x0e62('0x6')](),controller[_0x0e62('0x13')]);router[_0x0e62('0x14')]('/:id',auth[_0x0e62('0x6')](),controller[_0x0e62('0x15')]);router[_0x0e62('0x14')](_0x0e62('0xf'),auth[_0x0e62('0x6')](),controller[_0x0e62('0x16')]);router[_0x0e62('0x14')](_0x0e62('0x11'),auth[_0x0e62('0x6')](),controller[_0x0e62('0x17')]);module[_0x0e62('0x18')]=router;
\ No newline at end of file
index 4d9581e..14261cc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8f1a=['sequelize','exports','STRING','INTEGER','rrmemory','roundrobin'];(function(_0x43ef5c,_0x383a41){var _0xf8c2f1=function(_0x26b627){while(--_0x26b627){_0x43ef5c['push'](_0x43ef5c['shift']());}};_0xf8c2f1(++_0x383a41);}(_0x8f1a,0x126));var _0xa8f1=function(_0xb6c2b7,_0x6176ff){_0xb6c2b7=_0xb6c2b7-0x0;var _0x27bfe7=_0x8f1a[_0xb6c2b7];return _0x27bfe7;};'use strict';var Sequelize=require(_0xa8f1('0x0'));module[_0xa8f1('0x1')]={'name':{'type':Sequelize[_0xa8f1('0x2')],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0xa8f1('0x2')]},'timeout':{'type':Sequelize[_0xa8f1('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize['ENUM'](_0xa8f1('0x4'),'beepall',_0xa8f1('0x5'))}};
\ No newline at end of file
+var _0xae61=['beepall','roundrobin','sequelize','exports','STRING','INTEGER','ENUM','rrmemory'];(function(_0x12dd11,_0x52b882){var _0x3a502b=function(_0x1a660d){while(--_0x1a660d){_0x12dd11['push'](_0x12dd11['shift']());}};_0x3a502b(++_0x52b882);}(_0xae61,0x132));var _0x1ae6=function(_0x5e6b64,_0x5b1e25){_0x5e6b64=_0x5e6b64-0x0;var _0x2a03ce=_0xae61[_0x5e6b64];return _0x2a03ce;};'use strict';var Sequelize=require(_0x1ae6('0x0'));module[_0x1ae6('0x1')]={'name':{'type':Sequelize['STRING'],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x1ae6('0x2')]},'timeout':{'type':Sequelize[_0x1ae6('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x1ae6('0x4')](_0x1ae6('0x5'),_0x1ae6('0x6'),_0x1ae6('0x7'))}};
\ No newline at end of file
index 97360a0..8105ee6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xedd3=['lodash','squel','ioredis','../../config/logger','api','../../config/environment','redis','defaults','socket.io-emitter','./mailQueue.socket','sendStatus','end','json','offset','undefined','count','status','set','update','then','destroy','get','UserProfileResource','error','stack','name','index','map','MailQueue','rawAttributes','fieldName','type','getOptions','where','include','query','findAll','rows','catch','show','keys','filters','intersection','model','attributes','fields','length','includeAll','merge','options','body','role','user','UserProfileSection','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','find','params','describe','findOne','nolimit','limit','order','sort','pick','filter','UserMailQueue','findAndCountAll','UserId','agent','mailPause','createdAt','format','%s/%s','SIP','getTeams','hasOwnProperty','addTeams','ids','Team','User','Agents','online','voicePause','interface','flatMap','sequelize','transaction','findOrCreate','emit','removeTeams','field','tq.TeamId','from','team_has_mail_queues','join','ut.TeamId\x20=\x20tq.TeamId','ut.UserId\x20=\x20?','push','toString','QueryTypes','SELECT','every','TeamId','all','union','compact','value','isEmpty','removeAgents','forEach','userMailQueue:remove','addAgents','omit','isArray','getAgents','bluebird','util'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xedd3,0x74));var _0x3edd=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0xedd3[_0x167cc1];return _0x10bc4b;};'use strict';var BPromise=require(_0x3edd('0x0'));var util=require(_0x3edd('0x1'));var _=require(_0x3edd('0x2'));var squel=require(_0x3edd('0x3'));var Redis=require(_0x3edd('0x4'));var qs=require('../../components/parsers/qs');var logger=require(_0x3edd('0x5'))(_0x3edd('0x6'));var config=require(_0x3edd('0x7'));var db=require('../../mysqldb')['db'];config[_0x3edd('0x8')]=_[_0x3edd('0x9')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x3edd('0xa'))(new Redis(config[_0x3edd('0x8')]));require(_0x3edd('0xb'))['register'](socket);function respondWithStatusCode(_0x3d4035,_0x113893){_0x113893=_0x113893||0xcc;return function(_0x44741d){if(_0x44741d){return _0x3d4035[_0x3edd('0xc')](_0x113893);}return _0x3d4035['status'](_0x113893)[_0x3edd('0xd')]();};}function respondWithResult(_0x327341,_0x16aa03){_0x16aa03=_0x16aa03||0xc8;return function(_0x467255){if(_0x467255){return _0x327341['status'](_0x16aa03)[_0x3edd('0xe')](_0x467255);}};}function respondWithFilteredResult(_0x2ab012,_0x3f25fd){return function(_0x27fdd9){if(_0x27fdd9){var _0x1f28bd=typeof _0x3f25fd[_0x3edd('0xf')]===_0x3edd('0x10')&&typeof _0x3f25fd['limit']==='undefined';var _0x433d3c=_0x27fdd9[_0x3edd('0x11')];var _0x4a6587=_0x1f28bd?0x0:_0x3f25fd[_0x3edd('0xf')];var _0x4b67d7=_0x1f28bd?_0x27fdd9['count']:_0x3f25fd[_0x3edd('0xf')]+_0x3f25fd['limit'];var _0x4a29f6;if(_0x4b67d7>=_0x433d3c){_0x4b67d7=_0x433d3c;_0x4a29f6=0xc8;}else{_0x4a29f6=0xce;}_0x2ab012[_0x3edd('0x12')](_0x4a29f6);return _0x2ab012[_0x3edd('0x13')]('Content-Range',_0x4a6587+'-'+_0x4b67d7+'/'+_0x433d3c)[_0x3edd('0xe')](_0x27fdd9);}return null;};}function saveUpdates(_0x5c7556){return function(_0x57beb3){if(_0x57beb3){return _0x57beb3[_0x3edd('0x14')](_0x5c7556)[_0x3edd('0x15')](function(_0x87da07){return _0x87da07;});}return null;};}function removeEntity(_0x314da6){return function(_0x3bd341){if(_0x3bd341){return _0x3bd341[_0x3edd('0x16')]()[_0x3edd('0x15')](function(){var _0x1a14f7=_0x3bd341[_0x3edd('0x17')]({'plain':!![]});var _0x2ec717='MailQueues';return db[_0x3edd('0x18')]['destroy']({'where':{'type':_0x2ec717,'resourceId':_0x1a14f7['id']}})['then'](function(){return _0x3bd341;});})['then'](function(){_0x314da6[_0x3edd('0x12')](0xcc)[_0x3edd('0xd')]();});}};}function handleEntityNotFound(_0x43c5ce){return function(_0x2e23c9){if(!_0x2e23c9){_0x43c5ce['sendStatus'](0x194);}return _0x2e23c9;};}function handleError(_0x7d3b2b,_0x5f3aa9){_0x5f3aa9=_0x5f3aa9||0x1f4;return function(_0x458c9b){logger[_0x3edd('0x19')](_0x458c9b[_0x3edd('0x1a')]);if(_0x458c9b[_0x3edd('0x1b')]){delete _0x458c9b[_0x3edd('0x1b')];}_0x7d3b2b['status'](_0x5f3aa9)['send'](_0x458c9b);};}exports[_0x3edd('0x1c')]=function(_0x36c85c,_0x16827d){var _0x22305c={};var _0x247b96={'count':0x0,'rows':[]};var _0x21433b=_[_0x3edd('0x1d')](db[_0x3edd('0x1e')][_0x3edd('0x1f')],function(_0x12f152){return{'name':_0x12f152[_0x3edd('0x20')],'type':_0x12f152[_0x3edd('0x21')]['key']};});_0x22305c=qs[_0x3edd('0x22')](_0x21433b,_0x36c85c);var _0x538a47={'where':_0x22305c[_0x3edd('0x23')]};return db[_0x3edd('0x1e')][_0x3edd('0x11')](_0x538a47)[_0x3edd('0x15')](function(_0x338760){_0x247b96[_0x3edd('0x11')]=_0x338760;_0x22305c[_0x3edd('0x24')]=qs[_0x3edd('0x24')](_0x36c85c[_0x3edd('0x25')]);return db[_0x3edd('0x1e')][_0x3edd('0x26')](_0x22305c);})[_0x3edd('0x15')](function(_0x4ad8e2){_0x247b96[_0x3edd('0x27')]=_0x4ad8e2;return _0x247b96;})[_0x3edd('0x15')](respondWithFilteredResult(_0x16827d,_0x22305c))[_0x3edd('0x28')](handleError(_0x16827d,null));};exports[_0x3edd('0x29')]=function(_0x264b0f,_0x5ef4cf){var _0x52e4bb={'raw':!![],'where':{'id':_0x264b0f['params']['id']}},_0x501cd5={};_0x501cd5['model']=_[_0x3edd('0x2a')](db['MailQueue'][_0x3edd('0x1f')]);_0x501cd5[_0x3edd('0x25')]=_[_0x3edd('0x2a')](_0x264b0f['query']);_0x501cd5[_0x3edd('0x2b')]=_[_0x3edd('0x2c')](_0x501cd5[_0x3edd('0x2d')],_0x501cd5[_0x3edd('0x25')]);_0x52e4bb[_0x3edd('0x2e')]=_['intersection'](_0x501cd5['model'],qs[_0x3edd('0x2f')](_0x264b0f[_0x3edd('0x25')][_0x3edd('0x2f')]));_0x52e4bb[_0x3edd('0x2e')]=_0x52e4bb['attributes'][_0x3edd('0x30')]?_0x52e4bb[_0x3edd('0x2e')]:_0x501cd5[_0x3edd('0x2d')];if(_0x264b0f['query'][_0x3edd('0x31')]){_0x52e4bb['include']=[{'all':!![]}];}_0x52e4bb=_[_0x3edd('0x32')]({},_0x52e4bb,_0x264b0f[_0x3edd('0x33')]);return db[_0x3edd('0x1e')]['find'](_0x52e4bb)['then'](handleEntityNotFound(_0x5ef4cf,null))[_0x3edd('0x15')](respondWithResult(_0x5ef4cf,null))[_0x3edd('0x28')](handleError(_0x5ef4cf,null));};exports['create']=function(_0x5a065c,_0x1c078b){return db[_0x3edd('0x1e')]['create'](_0x5a065c[_0x3edd('0x34')],{})[_0x3edd('0x15')](function(_0x4e7e03){var _0x5efc9b=_0x5a065c['user'][_0x3edd('0x17')]({'plain':!![]});if(!_0x5efc9b)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x5efc9b[_0x3edd('0x35')]===_0x3edd('0x36')){var _0x39c418=_0x4e7e03[_0x3edd('0x17')]({'plain':!![]});var _0x5405f5='MailQueues';return db[_0x3edd('0x37')]['find']({'where':{'name':_0x5405f5,'userProfileId':_0x5efc9b['userProfileId']},'raw':!![]})[_0x3edd('0x15')](function(_0xec9e3d){if(_0xec9e3d&&_0xec9e3d['autoAssociation']===0x0){return db[_0x3edd('0x18')][_0x3edd('0x38')]({'name':_0x39c418[_0x3edd('0x1b')],'resourceId':_0x39c418['id'],'type':_0xec9e3d[_0x3edd('0x1b')],'sectionId':_0xec9e3d['id']},{})[_0x3edd('0x15')](function(){return _0x4e7e03;});}else{return _0x4e7e03;}})[_0x3edd('0x28')](function(_0x2abc10){logger['error'](_0x3edd('0x39'),_0x2abc10);throw _0x2abc10;});}return _0x4e7e03;})['then'](respondWithResult(_0x1c078b,0xc9))[_0x3edd('0x28')](handleError(_0x1c078b,null));};exports[_0x3edd('0x14')]=function(_0x217425,_0x2b82c9){if(_0x217425['body']['id']){delete _0x217425[_0x3edd('0x34')]['id'];}return db[_0x3edd('0x1e')]['find']({'where':{'id':_0x217425['params']['id']}})['then'](handleEntityNotFound(_0x2b82c9,null))[_0x3edd('0x15')](saveUpdates(_0x217425[_0x3edd('0x34')],null))[_0x3edd('0x15')](respondWithResult(_0x2b82c9,null))[_0x3edd('0x28')](handleError(_0x2b82c9,null));};exports[_0x3edd('0x16')]=function(_0x37506f,_0x2b6558){return db[_0x3edd('0x1e')][_0x3edd('0x3a')]({'where':{'id':_0x37506f[_0x3edd('0x3b')]['id']}})['then'](handleEntityNotFound(_0x2b6558,null))[_0x3edd('0x15')](removeEntity(_0x2b6558,null))['catch'](handleError(_0x2b6558,null));};exports[_0x3edd('0x3c')]=function(_0x46a813,_0x356db5){return db[_0x3edd('0x1e')]['describe']()[_0x3edd('0x15')](respondWithResult(_0x356db5,null))['catch'](handleError(_0x356db5,null));};exports['getMembers']=function(_0x4f3cd2,_0x497efa){var _0x5eb9b4={'raw':!![],'where':{}},_0x58ab2d={},_0x44e8fd;return db[_0x3edd('0x1e')][_0x3edd('0x3d')]({'where':{'id':_0x4f3cd2[_0x3edd('0x3b')]['id']}})[_0x3edd('0x15')](handleEntityNotFound(_0x497efa,null))['then'](function(_0x380979){if(_0x380979){_0x44e8fd=_0x380979[_0x3edd('0x17')]({'plain':!![]});_0x58ab2d[_0x3edd('0x2d')]=_[_0x3edd('0x2a')](db['UserMailQueue']['rawAttributes']);_0x58ab2d['query']=_['keys'](_0x4f3cd2[_0x3edd('0x25')]);_0x58ab2d[_0x3edd('0x2b')]=_[_0x3edd('0x2c')](_0x58ab2d[_0x3edd('0x2d')],_0x58ab2d[_0x3edd('0x25')]);_0x5eb9b4[_0x3edd('0x2e')]=_[_0x3edd('0x2c')](_0x58ab2d[_0x3edd('0x2d')],qs[_0x3edd('0x2f')](_0x4f3cd2[_0x3edd('0x25')][_0x3edd('0x2f')]));_0x5eb9b4[_0x3edd('0x2e')]=_0x5eb9b4[_0x3edd('0x2e')][_0x3edd('0x30')]?_0x5eb9b4[_0x3edd('0x2e')]:_0x58ab2d['model'];if(!_0x4f3cd2[_0x3edd('0x25')]['hasOwnProperty'](_0x3edd('0x3e'))){_0x5eb9b4[_0x3edd('0x3f')]=qs[_0x3edd('0x3f')](_0x4f3cd2[_0x3edd('0x25')][_0x3edd('0x3f')]);_0x5eb9b4[_0x3edd('0xf')]=qs['offset'](_0x4f3cd2[_0x3edd('0x25')][_0x3edd('0xf')]);}_0x5eb9b4[_0x3edd('0x40')]=qs['sort'](_0x4f3cd2['query'][_0x3edd('0x41')]);_0x5eb9b4[_0x3edd('0x23')]=qs[_0x3edd('0x2b')](_[_0x3edd('0x42')](_0x4f3cd2[_0x3edd('0x25')],_0x58ab2d[_0x3edd('0x2b')]));_0x5eb9b4['where']['MailQueueId']=_0x380979['id'];if(_0x4f3cd2[_0x3edd('0x25')][_0x3edd('0x43')]){_0x5eb9b4[_0x3edd('0x23')]=_[_0x3edd('0x32')](_0x5eb9b4['where'],{'$or':_[_0x3edd('0x1d')](_0x5eb9b4[_0x3edd('0x2e')],function(_0x2907c9){var _0x555fb9={};_0x555fb9[_0x2907c9]={'$like':'%'+_0x4f3cd2[_0x3edd('0x25')][_0x3edd('0x43')]+'%'};return _0x555fb9;})});}_0x5eb9b4=_[_0x3edd('0x32')]({},_0x5eb9b4,_0x4f3cd2[_0x3edd('0x33')]);return db[_0x3edd('0x44')]['findAll'](_0x5eb9b4);}})[_0x3edd('0x15')](function(_0x11183e){if(_0x11183e){return db['User'][_0x3edd('0x45')]({'where':{'id':_[_0x3edd('0x1d')](_0x11183e,_0x3edd('0x46')),'role':_0x3edd('0x47')},'attributes':['id',_0x3edd('0x1b'),_0x3edd('0x48'),'updatedAt',_0x3edd('0x49')]});}})['then'](function(_0x56a7f4){if(_0x56a7f4){return{'count':_0x56a7f4[_0x3edd('0x11')],'rows':_[_0x3edd('0x1d')](_0x56a7f4['rows'],function(_0x129d40){return{'membername':_0x129d40[_0x3edd('0x1b')],'UserId':_0x129d40['id'],'queue_name':_0x44e8fd['name'],'MailQueueId':_0x44e8fd['id'],'interface':util[_0x3edd('0x4a')](_0x3edd('0x4b'),_0x3edd('0x4c'),_0x129d40['name']),'penalty':0x0,'paused':_0x129d40['mailPause'],'createdAt':_0x129d40[_0x3edd('0x49')],'updatedAt':_0x129d40['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0x3edd('0x15')](respondWithFilteredResult(_0x497efa,_0x5eb9b4))[_0x3edd('0x28')](handleError(_0x497efa,null));};exports[_0x3edd('0x4d')]=function(_0x34cbcf,_0xbac34e){var _0x3b3043={};var _0xfe3420={};var _0x2bc3b4;var _0x44c908;return db[_0x3edd('0x1e')]['findOne']({'where':{'id':_0x34cbcf[_0x3edd('0x3b')]['id']}})[_0x3edd('0x15')](handleEntityNotFound(_0xbac34e,null))[_0x3edd('0x15')](function(_0x151f17){if(_0x151f17){_0x2bc3b4=_0x151f17;_0xfe3420['model']=_[_0x3edd('0x2a')](db['Team'][_0x3edd('0x1f')]);_0xfe3420['query']=_['keys'](_0x34cbcf['query']);_0xfe3420[_0x3edd('0x2b')]=_['intersection'](_0xfe3420[_0x3edd('0x2d')],_0xfe3420[_0x3edd('0x25')]);_0x3b3043[_0x3edd('0x2e')]=_[_0x3edd('0x2c')](_0xfe3420['model'],qs['fields'](_0x34cbcf[_0x3edd('0x25')][_0x3edd('0x2f')]));_0x3b3043[_0x3edd('0x2e')]=_0x3b3043[_0x3edd('0x2e')][_0x3edd('0x30')]?_0x3b3043[_0x3edd('0x2e')]:_0xfe3420[_0x3edd('0x2d')];_0x3b3043[_0x3edd('0x40')]=qs[_0x3edd('0x41')](_0x34cbcf[_0x3edd('0x25')][_0x3edd('0x41')]);_0x3b3043[_0x3edd('0x23')]=qs[_0x3edd('0x2b')](_['pick'](_0x34cbcf[_0x3edd('0x25')],_0xfe3420['filters']));if(_0x34cbcf[_0x3edd('0x25')][_0x3edd('0x43')]){_0x3b3043['where']=_[_0x3edd('0x32')](_0x3b3043[_0x3edd('0x23')],{'$or':_['map'](_0x3b3043[_0x3edd('0x2e')],function(_0x241823){var _0x116ef4={};_0x116ef4[_0x241823]={'$like':'%'+_0x34cbcf['query'][_0x3edd('0x43')]+'%'};return _0x116ef4;})});}_0x3b3043=_[_0x3edd('0x32')]({},_0x3b3043,_0x34cbcf[_0x3edd('0x33')]);return _0x2bc3b4[_0x3edd('0x4d')](_0x3b3043);}})['then'](function(_0x4e4613){if(_0x4e4613){_0x44c908=_0x4e4613[_0x3edd('0x30')];if(!_0x34cbcf['query'][_0x3edd('0x4e')](_0x3edd('0x3e'))){_0x3b3043[_0x3edd('0x3f')]=qs[_0x3edd('0x3f')](_0x34cbcf[_0x3edd('0x25')][_0x3edd('0x3f')]);_0x3b3043[_0x3edd('0xf')]=qs[_0x3edd('0xf')](_0x34cbcf[_0x3edd('0x25')]['offset']);}return _0x2bc3b4['getTeams'](_0x3b3043);}})[_0x3edd('0x15')](function(_0x150672){if(_0x150672){return _0x150672?{'count':_0x44c908,'rows':_0x150672}:null;}})[_0x3edd('0x15')](respondWithResult(_0xbac34e,null))['catch'](handleError(_0xbac34e,null));};exports[_0x3edd('0x4f')]=function(_0x5b5a0e,_0x1ad5fb){var _0x99c3c9=_0x5b5a0e[_0x3edd('0x34')][_0x3edd('0x50')];return db[_0x3edd('0x51')]['findAll']({'where':{'id':_0x99c3c9},'attributes':['id'],'include':[{'model':db[_0x3edd('0x52')],'as':_0x3edd('0x53'),'attributes':['id',_0x3edd('0x1b'),_0x3edd('0x54'),_0x3edd('0x55'),_0x3edd('0x56')],'raw':!![]}]})['then'](function(_0xd325de){if(_0xd325de){var _0x4382eb=_[_0x3edd('0x57')](_0xd325de,function(_0x636dfb){var _0x5e7b2d=_0x636dfb[_0x3edd('0x17')]({'plain':!![]});return _0x5e7b2d[_0x3edd('0x53')];});return db[_0x3edd('0x1e')][_0x3edd('0x3a')]({'where':{'id':_0x5b5a0e[_0x3edd('0x3b')]['id']}})[_0x3edd('0x15')](function(_0x54308d){return db[_0x3edd('0x58')][_0x3edd('0x59')](function(_0x5101b1){return _0x54308d[_0x3edd('0x4f')](_0x99c3c9,{'transaction':_0x5101b1})[_0x3edd('0x15')](function(){return BPromise['each'](_0x4382eb,function(_0x4663ce){return db[_0x3edd('0x44')][_0x3edd('0x5a')]({'where':{'UserId':_0x4663ce['id'],'MailQueueId':_0x5b5a0e['params']['id']},'transaction':_0x5101b1});});})[_0x3edd('0x15')](function(){_0x4382eb['forEach'](function(_0x3cb28a){socket[_0x3edd('0x5b')]('userMailQueue:save',{'UserId':_0x3cb28a['id'],'MailQueueId':_0x54308d['id']});});});});});}})['then'](respondWithStatusCode(_0x1ad5fb,null))[_0x3edd('0x28')](handleError(_0x1ad5fb,null));};exports[_0x3edd('0x5c')]=function(_0x51af86,_0x43babd){return db[_0x3edd('0x51')]['findAll']({'where':{'id':_0x51af86[_0x3edd('0x25')][_0x3edd('0x50')]},'attributes':['id'],'include':[{'model':db['User'],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0x3edd('0x15')](handleEntityNotFound(_0x43babd,null))[_0x3edd('0x15')](function(_0x284b1f){var _0x3ca6f6=_['map'](_0x284b1f,'id');var _0x327ca8=[];var _0x11353c=[];var _0x1b5e81=squel['select']();_0x1b5e81[_0x3edd('0x5d')](_0x3edd('0x5e'))[_0x3edd('0x5f')](_0x3edd('0x60'),'tq')[_0x3edd('0x61')]('user_has_teams','ut',_0x3edd('0x62'))[_0x3edd('0x23')]('MailQueueId\x20=\x20?',_0x51af86[_0x3edd('0x3b')]['id']);for(var _0x598554=0x0;_0x598554<_0x284b1f['length'];_0x598554+=0x1){let _0xa4e22e=_0x284b1f[_0x598554];for(var _0x3a1258=0x0;_0x3a1258<_0xa4e22e[_0x3edd('0x53')][_0x3edd('0x30')];_0x3a1258+=0x1){let _0x3edf17=_0xa4e22e[_0x3edd('0x53')][_0x3a1258];var _0x3f597f=_0x1b5e81['clone']();_0x3f597f[_0x3edd('0x23')](_0x3edd('0x63'),_0x3edf17['id']);_0x11353c[_0x3edd('0x64')](db[_0x3edd('0x58')]['query'](_0x3f597f[_0x3edd('0x65')](),{'type':db[_0x3edd('0x58')][_0x3edd('0x66')][_0x3edd('0x67')]})[_0x3edd('0x15')](function(_0x3ffc26){if(_0x3ffc26[_0x3edd('0x30')]===0x1){return _0x3edf17['id'];}else{var _0x5c716f=_[_0x3edd('0x68')](_[_0x3edd('0x1d')](_0x3ffc26,_0x3edd('0x69')),function(_0x2bec27){return _['includes'](_0x3ca6f6,_0x2bec27);});if(_0x5c716f){return _0x3edf17['id'];}}}));}}return BPromise[_0x3edd('0x6a')](_0x11353c)[_0x3edd('0x15')](function(_0x406fb2){_0x327ca8=_(_0x327ca8)[_0x3edd('0x6b')](_0x406fb2)[_0x3edd('0x6c')]()[_0x3edd('0x6d')]();return db['MailQueue'][_0x3edd('0x3a')]({'where':{'id':_0x51af86[_0x3edd('0x3b')]['id']}})[_0x3edd('0x15')](function(_0x1d8d77){return db[_0x3edd('0x58')][_0x3edd('0x59')](function(_0x5b264a){return _0x1d8d77[_0x3edd('0x5c')](_0x51af86[_0x3edd('0x25')][_0x3edd('0x50')],{'transaction':_0x5b264a})['then'](function(){if(!_[_0x3edd('0x6e')](_0x327ca8)){return _0x1d8d77[_0x3edd('0x6f')](_0x327ca8,{'transaction':_0x5b264a});}})['then'](function(){_0x327ca8[_0x3edd('0x70')](function(_0x361a0e){socket[_0x3edd('0x5b')](_0x3edd('0x71'),{'UserId':_0x361a0e,'MailQueueId':_0x1d8d77['id']});});});});});});})[_0x3edd('0x15')](respondWithStatusCode(_0x43babd,null))[_0x3edd('0x28')](handleError(_0x43babd,null));};exports['addAgents']=function(_0x5d6977,_0x121ef7){return db[_0x3edd('0x1e')][_0x3edd('0x3a')]({'where':{'id':_0x5d6977['params']['id']}})[_0x3edd('0x15')](handleEntityNotFound(_0x121ef7,null))[_0x3edd('0x15')](function(_0xdfb12){if(_0xdfb12){return _0xdfb12[_0x3edd('0x72')](_0x5d6977[_0x3edd('0x34')][_0x3edd('0x50')],_[_0x3edd('0x73')](_0x5d6977[_0x3edd('0x34')],[_0x3edd('0x50'),'id'])||{})['spread'](function(_0xa7de0c){for(var _0x250b37=0x0;_0x250b37<_0x5d6977[_0x3edd('0x34')][_0x3edd('0x50')][_0x3edd('0x30')];_0x250b37+=0x1){socket[_0x3edd('0x5b')]('userMailQueue:save',{'UserId':Number(_0x5d6977[_0x3edd('0x34')][_0x3edd('0x50')][_0x250b37]),'MailQueueId':Number(_0x5d6977[_0x3edd('0x3b')]['id'])});}return _0xa7de0c;});}})['then'](respondWithResult(_0x121ef7,null))[_0x3edd('0x28')](handleError(_0x121ef7,null));};exports[_0x3edd('0x6f')]=function(_0x184d87,_0x21f81f){return db[_0x3edd('0x1e')][_0x3edd('0x3a')]({'where':{'id':_0x184d87[_0x3edd('0x3b')]['id']}})[_0x3edd('0x15')](handleEntityNotFound(_0x21f81f,null))[_0x3edd('0x15')](function(_0x55c4d){if(_0x55c4d){return _0x55c4d[_0x3edd('0x6f')](_0x184d87[_0x3edd('0x25')]['ids'])['then'](function(){if(_[_0x3edd('0x74')](_0x184d87[_0x3edd('0x25')][_0x3edd('0x50')])){for(var _0x85d427=0x0;_0x85d427<_0x184d87[_0x3edd('0x25')][_0x3edd('0x50')][_0x3edd('0x30')];_0x85d427+=0x1){socket['emit'](_0x3edd('0x71'),{'UserId':Number(_0x184d87[_0x3edd('0x25')][_0x3edd('0x50')][_0x85d427]),'MailQueueId':Number(_0x184d87[_0x3edd('0x3b')]['id'])});}}else{socket[_0x3edd('0x5b')](_0x3edd('0x71'),{'UserId':Number(_0x184d87['query'][_0x3edd('0x50')]),'MailQueueId':Number(_0x184d87[_0x3edd('0x3b')]['id'])});}});}})['then'](respondWithStatusCode(_0x21f81f,null))['catch'](handleError(_0x21f81f,null));};exports[_0x3edd('0x75')]=function(_0x3a0fcc,_0x5a82a3){var _0x49a2f7={};var _0x11d8f0={};var _0x561f1a;var _0x4d96cc;return db['MailQueue'][_0x3edd('0x3d')]({'where':{'id':_0x3a0fcc[_0x3edd('0x3b')]['id']}})[_0x3edd('0x15')](handleEntityNotFound(_0x5a82a3,null))[_0x3edd('0x15')](function(_0x2cce68){if(_0x2cce68){_0x561f1a=_0x2cce68;_0x11d8f0[_0x3edd('0x2d')]=_[_0x3edd('0x2a')](db[_0x3edd('0x52')][_0x3edd('0x1f')]);_0x11d8f0['query']=_[_0x3edd('0x2a')](_0x3a0fcc[_0x3edd('0x25')]);_0x11d8f0['filters']=_[_0x3edd('0x2c')](_0x11d8f0['model'],_0x11d8f0[_0x3edd('0x25')]);_0x49a2f7[_0x3edd('0x2e')]=_[_0x3edd('0x2c')](_0x11d8f0['model'],qs[_0x3edd('0x2f')](_0x3a0fcc[_0x3edd('0x25')][_0x3edd('0x2f')]));_0x49a2f7[_0x3edd('0x2e')]=_0x49a2f7[_0x3edd('0x2e')][_0x3edd('0x30')]?_0x49a2f7[_0x3edd('0x2e')]:_0x11d8f0[_0x3edd('0x2d')];_0x49a2f7['order']=qs['sort'](_0x3a0fcc[_0x3edd('0x25')][_0x3edd('0x41')]);_0x49a2f7['where']=qs[_0x3edd('0x2b')](_['pick'](_0x3a0fcc['query'],_0x11d8f0[_0x3edd('0x2b')]));if(_0x3a0fcc[_0x3edd('0x25')]['filter']){_0x49a2f7[_0x3edd('0x23')]=_['merge'](_0x49a2f7[_0x3edd('0x23')],{'$or':_[_0x3edd('0x1d')](_0x49a2f7['attributes'],function(_0x30037a){var _0xbacb59={};_0xbacb59[_0x30037a]={'$like':'%'+_0x3a0fcc[_0x3edd('0x25')]['filter']+'%'};return _0xbacb59;})});}_0x49a2f7=_['merge']({},_0x49a2f7,_0x3a0fcc[_0x3edd('0x33')]);return _0x561f1a[_0x3edd('0x75')](_0x49a2f7);}})[_0x3edd('0x15')](function(_0x43902d){if(_0x43902d){_0x4d96cc=_0x43902d[_0x3edd('0x30')];if(!_0x3a0fcc[_0x3edd('0x25')]['hasOwnProperty'](_0x3edd('0x3e'))){_0x49a2f7[_0x3edd('0x3f')]=qs['limit'](_0x3a0fcc[_0x3edd('0x25')][_0x3edd('0x3f')]);_0x49a2f7[_0x3edd('0xf')]=qs[_0x3edd('0xf')](_0x3a0fcc[_0x3edd('0x25')][_0x3edd('0xf')]);}return _0x561f1a[_0x3edd('0x75')](_0x49a2f7);}})['then'](function(_0x11ebb5){if(_0x11ebb5){return _0x11ebb5?{'count':_0x4d96cc,'rows':_0x11ebb5}:null;}})[_0x3edd('0x15')](respondWithResult(_0x5a82a3,null))[_0x3edd('0x28')](handleError(_0x5a82a3,null));};
\ No newline at end of file
+var _0x8cfd=['sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','update','then','get','UserProfileResource','destroy','stack','name','send','index','map','fieldName','type','key','getOptions','MailQueue','include','query','findAll','rows','catch','params','model','keys','rawAttributes','filters','intersection','fields','attributes','includeAll','merge','options','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','MailQueues','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','getMembers','findOne','UserMailQueue','length','nolimit','order','sort','where','pick','MailQueueId','filter','findAndCountAll','UserId','agent','mailPause','updatedAt','createdAt','format','SIP','getTeams','Team','addTeams','ids','User','Agents','online','voicePause','flatMap','transaction','each','findOrCreate','forEach','userMailQueue:save','removeTeams','field','tq.TeamId','from','clone','push','sequelize','toString','QueryTypes','SELECT','every','TeamId','includes','all','union','compact','value','isEmpty','removeAgents','emit','userMailQueue:remove','addAgents','omit','isArray','getAgents','hasOwnProperty','bluebird','util','lodash','squel','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/environment','defaults','localhost','socket.io-emitter','redis'];(function(_0x231412,_0x3cff7c){var _0x4a9bf8=function(_0x5e4569){while(--_0x5e4569){_0x231412['push'](_0x231412['shift']());}};_0x4a9bf8(++_0x3cff7c);}(_0x8cfd,0x1e7));var _0xd8cf=function(_0x264b9b,_0xa1181e){_0x264b9b=_0x264b9b-0x0;var _0x4c7a0e=_0x8cfd[_0x264b9b];return _0x4c7a0e;};'use strict';var BPromise=require(_0xd8cf('0x0'));var util=require(_0xd8cf('0x1'));var _=require(_0xd8cf('0x2'));var squel=require(_0xd8cf('0x3'));var Redis=require(_0xd8cf('0x4'));var qs=require(_0xd8cf('0x5'));var logger=require(_0xd8cf('0x6'))(_0xd8cf('0x7'));var config=require(_0xd8cf('0x8'));var db=require('../../mysqldb')['db'];config['redis']=_[_0xd8cf('0x9')](config['redis'],{'host':_0xd8cf('0xa'),'port':0x18eb});var socket=require(_0xd8cf('0xb'))(new Redis(config[_0xd8cf('0xc')]));require('./mailQueue.socket')['register'](socket);function respondWithStatusCode(_0x2d336f,_0x241ea5){_0x241ea5=_0x241ea5||0xcc;return function(_0x22f908){if(_0x22f908){return _0x2d336f[_0xd8cf('0xd')](_0x241ea5);}return _0x2d336f['status'](_0x241ea5)[_0xd8cf('0xe')]();};}function respondWithResult(_0x283292,_0x1633df){_0x1633df=_0x1633df||0xc8;return function(_0x55b296){if(_0x55b296){return _0x283292[_0xd8cf('0xf')](_0x1633df)[_0xd8cf('0x10')](_0x55b296);}};}function respondWithFilteredResult(_0x854149,_0x1cfd38){return function(_0xa5290e){if(_0xa5290e){var _0x53e417=typeof _0x1cfd38[_0xd8cf('0x11')]===_0xd8cf('0x12')&&typeof _0x1cfd38[_0xd8cf('0x13')]===_0xd8cf('0x12');var _0x1330e8=_0xa5290e[_0xd8cf('0x14')];var _0x23a893=_0x53e417?0x0:_0x1cfd38[_0xd8cf('0x11')];var _0x5c60ed=_0x53e417?_0xa5290e[_0xd8cf('0x14')]:_0x1cfd38[_0xd8cf('0x11')]+_0x1cfd38['limit'];var _0x223e6c;if(_0x5c60ed>=_0x1330e8){_0x5c60ed=_0x1330e8;_0x223e6c=0xc8;}else{_0x223e6c=0xce;}_0x854149[_0xd8cf('0xf')](_0x223e6c);return _0x854149[_0xd8cf('0x15')](_0xd8cf('0x16'),_0x23a893+'-'+_0x5c60ed+'/'+_0x1330e8)[_0xd8cf('0x10')](_0xa5290e);}return null;};}function saveUpdates(_0x103ee6){return function(_0x1bc8ef){if(_0x1bc8ef){return _0x1bc8ef[_0xd8cf('0x17')](_0x103ee6)['then'](function(_0x528d09){return _0x528d09;});}return null;};}function removeEntity(_0xfe0a55){return function(_0x4ff7ae){if(_0x4ff7ae){return _0x4ff7ae['destroy']()[_0xd8cf('0x18')](function(){var _0x31ed41=_0x4ff7ae[_0xd8cf('0x19')]({'plain':!![]});var _0x2208d9='MailQueues';return db[_0xd8cf('0x1a')][_0xd8cf('0x1b')]({'where':{'type':_0x2208d9,'resourceId':_0x31ed41['id']}})[_0xd8cf('0x18')](function(){return _0x4ff7ae;});})['then'](function(){_0xfe0a55[_0xd8cf('0xf')](0xcc)[_0xd8cf('0xe')]();});}};}function handleEntityNotFound(_0x7a47de){return function(_0x4404fe){if(!_0x4404fe){_0x7a47de['sendStatus'](0x194);}return _0x4404fe;};}function handleError(_0x29b1a1,_0x3fdb93){_0x3fdb93=_0x3fdb93||0x1f4;return function(_0x2ee3fd){logger['error'](_0x2ee3fd[_0xd8cf('0x1c')]);if(_0x2ee3fd[_0xd8cf('0x1d')]){delete _0x2ee3fd[_0xd8cf('0x1d')];}_0x29b1a1[_0xd8cf('0xf')](_0x3fdb93)[_0xd8cf('0x1e')](_0x2ee3fd);};}exports[_0xd8cf('0x1f')]=function(_0xada016,_0x3c5b17){var _0x1005d8={};var _0x4e806c={'count':0x0,'rows':[]};var _0x106827=_[_0xd8cf('0x20')](db['MailQueue']['rawAttributes'],function(_0x37dba9){return{'name':_0x37dba9[_0xd8cf('0x21')],'type':_0x37dba9[_0xd8cf('0x22')][_0xd8cf('0x23')]};});_0x1005d8=qs[_0xd8cf('0x24')](_0x106827,_0xada016);var _0x1f0ce6={'where':_0x1005d8['where']};return db[_0xd8cf('0x25')][_0xd8cf('0x14')](_0x1f0ce6)['then'](function(_0x1bd756){_0x4e806c[_0xd8cf('0x14')]=_0x1bd756;_0x1005d8['include']=qs[_0xd8cf('0x26')](_0xada016[_0xd8cf('0x27')]);return db[_0xd8cf('0x25')][_0xd8cf('0x28')](_0x1005d8);})['then'](function(_0x332c48){_0x4e806c[_0xd8cf('0x29')]=_0x332c48;return _0x4e806c;})[_0xd8cf('0x18')](respondWithFilteredResult(_0x3c5b17,_0x1005d8))[_0xd8cf('0x2a')](handleError(_0x3c5b17,null));};exports['show']=function(_0x4ed51e,_0x20c3c1){var _0x3f3846={'raw':!![],'where':{'id':_0x4ed51e[_0xd8cf('0x2b')]['id']}},_0x1f3cf4={};_0x1f3cf4[_0xd8cf('0x2c')]=_[_0xd8cf('0x2d')](db['MailQueue'][_0xd8cf('0x2e')]);_0x1f3cf4[_0xd8cf('0x27')]=_[_0xd8cf('0x2d')](_0x4ed51e['query']);_0x1f3cf4[_0xd8cf('0x2f')]=_[_0xd8cf('0x30')](_0x1f3cf4[_0xd8cf('0x2c')],_0x1f3cf4[_0xd8cf('0x27')]);_0x3f3846['attributes']=_[_0xd8cf('0x30')](_0x1f3cf4[_0xd8cf('0x2c')],qs[_0xd8cf('0x31')](_0x4ed51e[_0xd8cf('0x27')][_0xd8cf('0x31')]));_0x3f3846[_0xd8cf('0x32')]=_0x3f3846['attributes']['length']?_0x3f3846[_0xd8cf('0x32')]:_0x1f3cf4[_0xd8cf('0x2c')];if(_0x4ed51e[_0xd8cf('0x27')][_0xd8cf('0x33')]){_0x3f3846['include']=[{'all':!![]}];}_0x3f3846=_[_0xd8cf('0x34')]({},_0x3f3846,_0x4ed51e[_0xd8cf('0x35')]);return db[_0xd8cf('0x25')][_0xd8cf('0x36')](_0x3f3846)['then'](handleEntityNotFound(_0x20c3c1,null))[_0xd8cf('0x18')](respondWithResult(_0x20c3c1,null))['catch'](handleError(_0x20c3c1,null));};exports[_0xd8cf('0x37')]=function(_0x1b1db9,_0x2c50ca){return db[_0xd8cf('0x25')][_0xd8cf('0x37')](_0x1b1db9[_0xd8cf('0x38')],{})[_0xd8cf('0x18')](function(_0x36f20a){var _0x31be13=_0x1b1db9[_0xd8cf('0x39')][_0xd8cf('0x19')]({'plain':!![]});if(!_0x31be13)throw new Error(_0xd8cf('0x3a'));if(_0x31be13[_0xd8cf('0x3b')]===_0xd8cf('0x39')){var _0x32f36a=_0x36f20a[_0xd8cf('0x19')]({'plain':!![]});var _0x5bde4c=_0xd8cf('0x3c');return db[_0xd8cf('0x3d')][_0xd8cf('0x36')]({'where':{'name':_0x5bde4c,'userProfileId':_0x31be13[_0xd8cf('0x3e')]},'raw':!![]})[_0xd8cf('0x18')](function(_0x575e31){if(_0x575e31&&_0x575e31[_0xd8cf('0x3f')]===0x0){return db[_0xd8cf('0x1a')]['create']({'name':_0x32f36a[_0xd8cf('0x1d')],'resourceId':_0x32f36a['id'],'type':_0x575e31[_0xd8cf('0x1d')],'sectionId':_0x575e31['id']},{})[_0xd8cf('0x18')](function(){return _0x36f20a;});}else{return _0x36f20a;}})[_0xd8cf('0x2a')](function(_0x4d827e){logger['error'](_0xd8cf('0x40'),_0x4d827e);throw _0x4d827e;});}return _0x36f20a;})[_0xd8cf('0x18')](respondWithResult(_0x2c50ca,0xc9))[_0xd8cf('0x2a')](handleError(_0x2c50ca,null));};exports[_0xd8cf('0x17')]=function(_0x349b9e,_0xc43605){if(_0x349b9e['body']['id']){delete _0x349b9e[_0xd8cf('0x38')]['id'];}return db[_0xd8cf('0x25')]['find']({'where':{'id':_0x349b9e[_0xd8cf('0x2b')]['id']}})['then'](handleEntityNotFound(_0xc43605,null))[_0xd8cf('0x18')](saveUpdates(_0x349b9e['body'],null))['then'](respondWithResult(_0xc43605,null))[_0xd8cf('0x2a')](handleError(_0xc43605,null));};exports[_0xd8cf('0x1b')]=function(_0x703cb7,_0x2624b7){return db[_0xd8cf('0x25')]['find']({'where':{'id':_0x703cb7[_0xd8cf('0x2b')]['id']}})[_0xd8cf('0x18')](handleEntityNotFound(_0x2624b7,null))[_0xd8cf('0x18')](removeEntity(_0x2624b7,null))[_0xd8cf('0x2a')](handleError(_0x2624b7,null));};exports[_0xd8cf('0x41')]=function(_0xb592e5,_0x52045b){return db['MailQueue'][_0xd8cf('0x41')]()[_0xd8cf('0x18')](respondWithResult(_0x52045b,null))[_0xd8cf('0x2a')](handleError(_0x52045b,null));};exports[_0xd8cf('0x42')]=function(_0x3f3570,_0x168c95){var _0x104f91={'raw':!![],'where':{}},_0x4f4902={},_0x3c31cb;return db['MailQueue'][_0xd8cf('0x43')]({'where':{'id':_0x3f3570[_0xd8cf('0x2b')]['id']}})['then'](handleEntityNotFound(_0x168c95,null))[_0xd8cf('0x18')](function(_0x42d220){if(_0x42d220){_0x3c31cb=_0x42d220[_0xd8cf('0x19')]({'plain':!![]});_0x4f4902[_0xd8cf('0x2c')]=_[_0xd8cf('0x2d')](db[_0xd8cf('0x44')][_0xd8cf('0x2e')]);_0x4f4902[_0xd8cf('0x27')]=_[_0xd8cf('0x2d')](_0x3f3570[_0xd8cf('0x27')]);_0x4f4902['filters']=_['intersection'](_0x4f4902['model'],_0x4f4902[_0xd8cf('0x27')]);_0x104f91['attributes']=_[_0xd8cf('0x30')](_0x4f4902['model'],qs[_0xd8cf('0x31')](_0x3f3570[_0xd8cf('0x27')]['fields']));_0x104f91[_0xd8cf('0x32')]=_0x104f91[_0xd8cf('0x32')][_0xd8cf('0x45')]?_0x104f91[_0xd8cf('0x32')]:_0x4f4902[_0xd8cf('0x2c')];if(!_0x3f3570[_0xd8cf('0x27')]['hasOwnProperty'](_0xd8cf('0x46'))){_0x104f91[_0xd8cf('0x13')]=qs[_0xd8cf('0x13')](_0x3f3570[_0xd8cf('0x27')][_0xd8cf('0x13')]);_0x104f91[_0xd8cf('0x11')]=qs[_0xd8cf('0x11')](_0x3f3570[_0xd8cf('0x27')][_0xd8cf('0x11')]);}_0x104f91[_0xd8cf('0x47')]=qs[_0xd8cf('0x48')](_0x3f3570['query'][_0xd8cf('0x48')]);_0x104f91[_0xd8cf('0x49')]=qs[_0xd8cf('0x2f')](_[_0xd8cf('0x4a')](_0x3f3570[_0xd8cf('0x27')],_0x4f4902['filters']));_0x104f91[_0xd8cf('0x49')][_0xd8cf('0x4b')]=_0x42d220['id'];if(_0x3f3570['query']['filter']){_0x104f91[_0xd8cf('0x49')]=_[_0xd8cf('0x34')](_0x104f91[_0xd8cf('0x49')],{'$or':_[_0xd8cf('0x20')](_0x104f91[_0xd8cf('0x32')],function(_0x3e385c){var _0x191bbc={};_0x191bbc[_0x3e385c]={'$like':'%'+_0x3f3570['query'][_0xd8cf('0x4c')]+'%'};return _0x191bbc;})});}_0x104f91=_[_0xd8cf('0x34')]({},_0x104f91,_0x3f3570[_0xd8cf('0x35')]);return db[_0xd8cf('0x44')][_0xd8cf('0x28')](_0x104f91);}})[_0xd8cf('0x18')](function(_0x3599dc){if(_0x3599dc){return db['User'][_0xd8cf('0x4d')]({'where':{'id':_[_0xd8cf('0x20')](_0x3599dc,_0xd8cf('0x4e')),'role':_0xd8cf('0x4f')},'attributes':['id','name',_0xd8cf('0x50'),_0xd8cf('0x51'),_0xd8cf('0x52')]});}})[_0xd8cf('0x18')](function(_0x265727){if(_0x265727){return{'count':_0x265727[_0xd8cf('0x14')],'rows':_[_0xd8cf('0x20')](_0x265727[_0xd8cf('0x29')],function(_0xd4cc26){return{'membername':_0xd4cc26[_0xd8cf('0x1d')],'UserId':_0xd4cc26['id'],'queue_name':_0x3c31cb[_0xd8cf('0x1d')],'MailQueueId':_0x3c31cb['id'],'interface':util[_0xd8cf('0x53')]('%s/%s',_0xd8cf('0x54'),_0xd4cc26[_0xd8cf('0x1d')]),'penalty':0x0,'paused':_0xd4cc26[_0xd8cf('0x50')],'createdAt':_0xd4cc26[_0xd8cf('0x52')],'updatedAt':_0xd4cc26[_0xd8cf('0x51')]};})};}else{return{'count':0x0,'rows':[]};}})[_0xd8cf('0x18')](respondWithFilteredResult(_0x168c95,_0x104f91))[_0xd8cf('0x2a')](handleError(_0x168c95,null));};exports[_0xd8cf('0x55')]=function(_0xaf6c3a,_0x24ccdf){var _0x39d2b2={};var _0x438471={};var _0x353cae;var _0x12a8c8;return db[_0xd8cf('0x25')][_0xd8cf('0x43')]({'where':{'id':_0xaf6c3a[_0xd8cf('0x2b')]['id']}})[_0xd8cf('0x18')](handleEntityNotFound(_0x24ccdf,null))['then'](function(_0x557c04){if(_0x557c04){_0x353cae=_0x557c04;_0x438471['model']=_[_0xd8cf('0x2d')](db[_0xd8cf('0x56')][_0xd8cf('0x2e')]);_0x438471[_0xd8cf('0x27')]=_[_0xd8cf('0x2d')](_0xaf6c3a[_0xd8cf('0x27')]);_0x438471[_0xd8cf('0x2f')]=_['intersection'](_0x438471['model'],_0x438471[_0xd8cf('0x27')]);_0x39d2b2[_0xd8cf('0x32')]=_[_0xd8cf('0x30')](_0x438471[_0xd8cf('0x2c')],qs[_0xd8cf('0x31')](_0xaf6c3a[_0xd8cf('0x27')][_0xd8cf('0x31')]));_0x39d2b2[_0xd8cf('0x32')]=_0x39d2b2['attributes']['length']?_0x39d2b2[_0xd8cf('0x32')]:_0x438471[_0xd8cf('0x2c')];_0x39d2b2[_0xd8cf('0x47')]=qs['sort'](_0xaf6c3a[_0xd8cf('0x27')][_0xd8cf('0x48')]);_0x39d2b2[_0xd8cf('0x49')]=qs[_0xd8cf('0x2f')](_[_0xd8cf('0x4a')](_0xaf6c3a[_0xd8cf('0x27')],_0x438471[_0xd8cf('0x2f')]));if(_0xaf6c3a[_0xd8cf('0x27')]['filter']){_0x39d2b2['where']=_['merge'](_0x39d2b2[_0xd8cf('0x49')],{'$or':_[_0xd8cf('0x20')](_0x39d2b2[_0xd8cf('0x32')],function(_0x1d5da5){var _0x561cac={};_0x561cac[_0x1d5da5]={'$like':'%'+_0xaf6c3a['query'][_0xd8cf('0x4c')]+'%'};return _0x561cac;})});}_0x39d2b2=_[_0xd8cf('0x34')]({},_0x39d2b2,_0xaf6c3a[_0xd8cf('0x35')]);return _0x353cae[_0xd8cf('0x55')](_0x39d2b2);}})['then'](function(_0x341380){if(_0x341380){_0x12a8c8=_0x341380[_0xd8cf('0x45')];if(!_0xaf6c3a['query']['hasOwnProperty'](_0xd8cf('0x46'))){_0x39d2b2[_0xd8cf('0x13')]=qs[_0xd8cf('0x13')](_0xaf6c3a['query']['limit']);_0x39d2b2[_0xd8cf('0x11')]=qs[_0xd8cf('0x11')](_0xaf6c3a[_0xd8cf('0x27')][_0xd8cf('0x11')]);}return _0x353cae[_0xd8cf('0x55')](_0x39d2b2);}})[_0xd8cf('0x18')](function(_0x4390d7){if(_0x4390d7){return _0x4390d7?{'count':_0x12a8c8,'rows':_0x4390d7}:null;}})[_0xd8cf('0x18')](respondWithResult(_0x24ccdf,null))[_0xd8cf('0x2a')](handleError(_0x24ccdf,null));};exports[_0xd8cf('0x57')]=function(_0x2fe3e1,_0x571eec){var _0x37b577=_0x2fe3e1[_0xd8cf('0x38')][_0xd8cf('0x58')];return db['Team']['findAll']({'where':{'id':_0x37b577},'attributes':['id'],'include':[{'model':db[_0xd8cf('0x59')],'as':_0xd8cf('0x5a'),'attributes':['id',_0xd8cf('0x1d'),_0xd8cf('0x5b'),_0xd8cf('0x5c'),'interface'],'raw':!![]}]})[_0xd8cf('0x18')](function(_0x4f6878){if(_0x4f6878){var _0x569bf1=_[_0xd8cf('0x5d')](_0x4f6878,function(_0x5ef052){var _0x5303d2=_0x5ef052['get']({'plain':!![]});return _0x5303d2['Agents'];});return db['MailQueue']['find']({'where':{'id':_0x2fe3e1[_0xd8cf('0x2b')]['id']}})[_0xd8cf('0x18')](function(_0x4f07cb){return db['sequelize'][_0xd8cf('0x5e')](function(_0x4c26f3){return _0x4f07cb[_0xd8cf('0x57')](_0x37b577,{'transaction':_0x4c26f3})[_0xd8cf('0x18')](function(){return BPromise[_0xd8cf('0x5f')](_0x569bf1,function(_0x25896b){return db['UserMailQueue'][_0xd8cf('0x60')]({'where':{'UserId':_0x25896b['id'],'MailQueueId':_0x2fe3e1['params']['id']},'transaction':_0x4c26f3});});})[_0xd8cf('0x18')](function(){_0x569bf1[_0xd8cf('0x61')](function(_0x531ef0){socket['emit'](_0xd8cf('0x62'),{'UserId':_0x531ef0['id'],'MailQueueId':_0x4f07cb['id']});});});});});}})[_0xd8cf('0x18')](respondWithStatusCode(_0x571eec,null))[_0xd8cf('0x2a')](handleError(_0x571eec,null));};exports[_0xd8cf('0x63')]=function(_0x148217,_0x472138){return db[_0xd8cf('0x56')][_0xd8cf('0x28')]({'where':{'id':_0x148217['query'][_0xd8cf('0x58')]},'attributes':['id'],'include':[{'model':db[_0xd8cf('0x59')],'as':_0xd8cf('0x5a'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x472138,null))[_0xd8cf('0x18')](function(_0x471b42){var _0x586245=_[_0xd8cf('0x20')](_0x471b42,'id');var _0x2fd8c4=[];var _0x720cb7=[];var _0x548962=squel['select']();_0x548962[_0xd8cf('0x64')](_0xd8cf('0x65'))[_0xd8cf('0x66')]('team_has_mail_queues','tq')['join']('user_has_teams','ut','ut.TeamId\x20=\x20tq.TeamId')[_0xd8cf('0x49')]('MailQueueId\x20=\x20?',_0x148217[_0xd8cf('0x2b')]['id']);for(var _0x280721=0x0;_0x280721<_0x471b42[_0xd8cf('0x45')];_0x280721+=0x1){let _0x3eded5=_0x471b42[_0x280721];for(var _0x14c8aa=0x0;_0x14c8aa<_0x3eded5[_0xd8cf('0x5a')]['length'];_0x14c8aa+=0x1){let _0x42907b=_0x3eded5['Agents'][_0x14c8aa];var _0x841187=_0x548962[_0xd8cf('0x67')]();_0x841187[_0xd8cf('0x49')]('ut.UserId\x20=\x20?',_0x42907b['id']);_0x720cb7[_0xd8cf('0x68')](db[_0xd8cf('0x69')][_0xd8cf('0x27')](_0x841187[_0xd8cf('0x6a')](),{'type':db['sequelize'][_0xd8cf('0x6b')][_0xd8cf('0x6c')]})[_0xd8cf('0x18')](function(_0x486701){if(_0x486701[_0xd8cf('0x45')]===0x1){return _0x42907b['id'];}else{var _0x562b75=_[_0xd8cf('0x6d')](_[_0xd8cf('0x20')](_0x486701,_0xd8cf('0x6e')),function(_0xf5fe00){return _[_0xd8cf('0x6f')](_0x586245,_0xf5fe00);});if(_0x562b75){return _0x42907b['id'];}}}));}}return BPromise[_0xd8cf('0x70')](_0x720cb7)[_0xd8cf('0x18')](function(_0xfe9ac1){_0x2fd8c4=_(_0x2fd8c4)[_0xd8cf('0x71')](_0xfe9ac1)[_0xd8cf('0x72')]()[_0xd8cf('0x73')]();return db['MailQueue']['find']({'where':{'id':_0x148217['params']['id']}})[_0xd8cf('0x18')](function(_0x125b62){return db[_0xd8cf('0x69')][_0xd8cf('0x5e')](function(_0x1c533f){return _0x125b62['removeTeams'](_0x148217[_0xd8cf('0x27')][_0xd8cf('0x58')],{'transaction':_0x1c533f})['then'](function(){if(!_[_0xd8cf('0x74')](_0x2fd8c4)){return _0x125b62[_0xd8cf('0x75')](_0x2fd8c4,{'transaction':_0x1c533f});}})['then'](function(){_0x2fd8c4[_0xd8cf('0x61')](function(_0x3cce54){socket[_0xd8cf('0x76')](_0xd8cf('0x77'),{'UserId':_0x3cce54,'MailQueueId':_0x125b62['id']});});});});});});})['then'](respondWithStatusCode(_0x472138,null))['catch'](handleError(_0x472138,null));};exports[_0xd8cf('0x78')]=function(_0x38192f,_0x3e26bd){return db['MailQueue'][_0xd8cf('0x36')]({'where':{'id':_0x38192f['params']['id']}})[_0xd8cf('0x18')](handleEntityNotFound(_0x3e26bd,null))[_0xd8cf('0x18')](function(_0x5249e1){if(_0x5249e1){return _0x5249e1[_0xd8cf('0x78')](_0x38192f['body'][_0xd8cf('0x58')],_[_0xd8cf('0x79')](_0x38192f['body'],['ids','id'])||{})['spread'](function(_0x17d4bf){for(var _0x41fd18=0x0;_0x41fd18<_0x38192f['body']['ids'][_0xd8cf('0x45')];_0x41fd18+=0x1){socket[_0xd8cf('0x76')](_0xd8cf('0x62'),{'UserId':Number(_0x38192f[_0xd8cf('0x38')][_0xd8cf('0x58')][_0x41fd18]),'MailQueueId':Number(_0x38192f['params']['id'])});}return _0x17d4bf;});}})[_0xd8cf('0x18')](respondWithResult(_0x3e26bd,null))[_0xd8cf('0x2a')](handleError(_0x3e26bd,null));};exports[_0xd8cf('0x75')]=function(_0x34e921,_0x28f265){return db[_0xd8cf('0x25')]['find']({'where':{'id':_0x34e921[_0xd8cf('0x2b')]['id']}})[_0xd8cf('0x18')](handleEntityNotFound(_0x28f265,null))[_0xd8cf('0x18')](function(_0x6924e9){if(_0x6924e9){return _0x6924e9['removeAgents'](_0x34e921[_0xd8cf('0x27')][_0xd8cf('0x58')])['then'](function(){if(_[_0xd8cf('0x7a')](_0x34e921[_0xd8cf('0x27')]['ids'])){for(var _0x87fda2=0x0;_0x87fda2<_0x34e921[_0xd8cf('0x27')][_0xd8cf('0x58')][_0xd8cf('0x45')];_0x87fda2+=0x1){socket[_0xd8cf('0x76')](_0xd8cf('0x77'),{'UserId':Number(_0x34e921[_0xd8cf('0x27')][_0xd8cf('0x58')][_0x87fda2]),'MailQueueId':Number(_0x34e921['params']['id'])});}}else{socket['emit'](_0xd8cf('0x77'),{'UserId':Number(_0x34e921[_0xd8cf('0x27')][_0xd8cf('0x58')]),'MailQueueId':Number(_0x34e921[_0xd8cf('0x2b')]['id'])});}});}})[_0xd8cf('0x18')](respondWithStatusCode(_0x28f265,null))[_0xd8cf('0x2a')](handleError(_0x28f265,null));};exports[_0xd8cf('0x7b')]=function(_0x29052a,_0x259018){var _0x485342={};var _0x3270f3={};var _0x3b1f1e;var _0x2db9a9;return db[_0xd8cf('0x25')]['findOne']({'where':{'id':_0x29052a[_0xd8cf('0x2b')]['id']}})[_0xd8cf('0x18')](handleEntityNotFound(_0x259018,null))['then'](function(_0x1444ae){if(_0x1444ae){_0x3b1f1e=_0x1444ae;_0x3270f3[_0xd8cf('0x2c')]=_[_0xd8cf('0x2d')](db['User'][_0xd8cf('0x2e')]);_0x3270f3['query']=_[_0xd8cf('0x2d')](_0x29052a[_0xd8cf('0x27')]);_0x3270f3['filters']=_[_0xd8cf('0x30')](_0x3270f3[_0xd8cf('0x2c')],_0x3270f3[_0xd8cf('0x27')]);_0x485342[_0xd8cf('0x32')]=_[_0xd8cf('0x30')](_0x3270f3[_0xd8cf('0x2c')],qs['fields'](_0x29052a[_0xd8cf('0x27')][_0xd8cf('0x31')]));_0x485342['attributes']=_0x485342[_0xd8cf('0x32')]['length']?_0x485342['attributes']:_0x3270f3['model'];_0x485342[_0xd8cf('0x47')]=qs[_0xd8cf('0x48')](_0x29052a['query'][_0xd8cf('0x48')]);_0x485342['where']=qs['filters'](_[_0xd8cf('0x4a')](_0x29052a[_0xd8cf('0x27')],_0x3270f3[_0xd8cf('0x2f')]));if(_0x29052a[_0xd8cf('0x27')][_0xd8cf('0x4c')]){_0x485342[_0xd8cf('0x49')]=_[_0xd8cf('0x34')](_0x485342[_0xd8cf('0x49')],{'$or':_['map'](_0x485342[_0xd8cf('0x32')],function(_0x31afa5){var _0x181164={};_0x181164[_0x31afa5]={'$like':'%'+_0x29052a[_0xd8cf('0x27')]['filter']+'%'};return _0x181164;})});}_0x485342=_[_0xd8cf('0x34')]({},_0x485342,_0x29052a[_0xd8cf('0x35')]);return _0x3b1f1e[_0xd8cf('0x7b')](_0x485342);}})[_0xd8cf('0x18')](function(_0xab0943){if(_0xab0943){_0x2db9a9=_0xab0943['length'];if(!_0x29052a[_0xd8cf('0x27')][_0xd8cf('0x7c')](_0xd8cf('0x46'))){_0x485342[_0xd8cf('0x13')]=qs[_0xd8cf('0x13')](_0x29052a[_0xd8cf('0x27')][_0xd8cf('0x13')]);_0x485342[_0xd8cf('0x11')]=qs[_0xd8cf('0x11')](_0x29052a[_0xd8cf('0x27')][_0xd8cf('0x11')]);}return _0x3b1f1e[_0xd8cf('0x7b')](_0x485342);}})[_0xd8cf('0x18')](function(_0xd3c2de){if(_0xd3c2de){return _0xd3c2de?{'count':_0x2db9a9,'rows':_0xd3c2de}:null;}})[_0xd8cf('0x18')](respondWithResult(_0x259018,null))['catch'](handleError(_0x259018,null));};
\ No newline at end of file
index f02873c..bb7c9e4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x843a=['setMaxListeners','update','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','MailQueue'];(function(_0x3cd888,_0x2a370a){var _0x449b3c=function(_0x2aadb5){while(--_0x2aadb5){_0x3cd888['push'](_0x3cd888['shift']());}};_0x449b3c(++_0x2a370a);}(_0x843a,0x13d));var _0xa843=function(_0x4ff2ad,_0x1a6927){_0x4ff2ad=_0x4ff2ad-0x0;var _0x379fd3=_0x843a[_0x4ff2ad];return _0x379fd3;};'use strict';var EventEmitter=require(_0xa843('0x0'));var MailQueue=require(_0xa843('0x1'))['db'][_0xa843('0x2')];var MailQueueEvents=new EventEmitter();MailQueueEvents[_0xa843('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xa843('0x4'),'afterDestroy':_0xa843('0x5')};function emitEvent(_0x145c02){return function(_0x352226,_0x1c73ee,_0x52c8ff){MailQueueEvents['emit'](_0x145c02+':'+_0x352226['id'],_0x352226);MailQueueEvents[_0xa843('0x6')](_0x145c02,_0x352226);_0x52c8ff(null);};}for(var e in events){if(events[_0xa843('0x7')](e)){var event=events[e];MailQueue[_0xa843('0x8')](e,emitEvent(event));}}module[_0xa843('0x9')]=MailQueueEvents;
\ No newline at end of file
+var _0x0546=['MailQueue','save','remove','emit','events','../../mysqldb'];(function(_0xc473b,_0x260edd){var _0x4f4cc5=function(_0x3d7d65){while(--_0x3d7d65){_0xc473b['push'](_0xc473b['shift']());}};_0x4f4cc5(++_0x260edd);}(_0x0546,0xa6));var _0x6054=function(_0x5d61b4,_0x4f7b91){_0x5d61b4=_0x5d61b4-0x0;var _0x183fc5=_0x0546[_0x5d61b4];return _0x183fc5;};'use strict';var EventEmitter=require(_0x6054('0x0'));var MailQueue=require(_0x6054('0x1'))['db'][_0x6054('0x2')];var MailQueueEvents=new EventEmitter();MailQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x6054('0x3'),'afterUpdate':'update','afterDestroy':_0x6054('0x4')};function emitEvent(_0x36d410){return function(_0x2da397,_0x48f4fb,_0x38bd86){MailQueueEvents['emit'](_0x36d410+':'+_0x2da397['id'],_0x2da397);MailQueueEvents[_0x6054('0x5')](_0x36d410,_0x2da397);_0x38bd86(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];MailQueue['hook'](e,emitEvent(event));}}module['exports']=MailQueueEvents;
\ No newline at end of file
index aa0cfaa..93a4ee3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0515=['path','../../config/environment','./mailQueue.attributes','exports','MailQueue','lodash','util','../../config/logger','moment','bluebird','request-promise'];(function(_0x19b84f,_0x48765e){var _0x18067b=function(_0x1c69aa){while(--_0x1c69aa){_0x19b84f['push'](_0x19b84f['shift']());}};_0x18067b(++_0x48765e);}(_0x0515,0x1d3));var _0x5051=function(_0x4db22b,_0x30003f){_0x4db22b=_0x4db22b-0x0;var _0x534552=_0x0515[_0x4db22b];return _0x534552;};'use strict';var _=require(_0x5051('0x0'));var util=require(_0x5051('0x1'));var logger=require(_0x5051('0x2'))('api');var moment=require(_0x5051('0x3'));var BPromise=require(_0x5051('0x4'));var rp=require(_0x5051('0x5'));var fs=require('fs');var path=require(_0x5051('0x6'));var rimraf=require('rimraf');var config=require(_0x5051('0x7'));var attributes=require(_0x5051('0x8'));module[_0x5051('0x9')]=function(_0x256bae,_0x1a1891){return _0x256bae['define'](_0x5051('0xa'),attributes,{'tableName':'mail_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7a15=['exports','MailQueue','lodash','util','../../config/logger','api','moment','request-promise','path'];(function(_0x390ef6,_0x1d401c){var _0x2fdaac=function(_0x692ab7){while(--_0x692ab7){_0x390ef6['push'](_0x390ef6['shift']());}};_0x2fdaac(++_0x1d401c);}(_0x7a15,0xa4));var _0x57a1=function(_0xa9ad76,_0x36bb01){_0xa9ad76=_0xa9ad76-0x0;var _0x45bc4d=_0x7a15[_0xa9ad76];return _0x45bc4d;};'use strict';var _=require(_0x57a1('0x0'));var util=require(_0x57a1('0x1'));var logger=require(_0x57a1('0x2'))(_0x57a1('0x3'));var moment=require(_0x57a1('0x4'));var BPromise=require('bluebird');var rp=require(_0x57a1('0x5'));var fs=require('fs');var path=require(_0x57a1('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./mailQueue.attributes');module[_0x57a1('0x7')]=function(_0x5e5b17,_0x56d65c){return _0x5e5b17['define'](_0x57a1('0x8'),attributes,{'tableName':'mail_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 681a931..9d6a4cb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x01ab=['MailQueue,\x20%s,\x20%s','request\x20sent','debug','MailQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','result','GetMailQueue','findAll','options','raw','where','attributes','limit','include','map','model','catch','ShowMailQueue','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','./mailQueue.socket','register','request','then','info'];(function(_0x32c15f,_0x4935d6){var _0x40a545=function(_0x38b98c){while(--_0x38b98c){_0x32c15f['push'](_0x32c15f['shift']());}};_0x40a545(++_0x4935d6);}(_0x01ab,0x1ab));var _0xb01a=function(_0x276ab9,_0x13fc29){_0x276ab9=_0x276ab9-0x0;var _0x58317d=_0x01ab[_0x276ab9];return _0x58317d;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xb01a('0x0'));var rs=require(_0xb01a('0x1'));var fs=require('fs');var Redis=require(_0xb01a('0x2'));var db=require(_0xb01a('0x3'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xb01a('0x4'));var config=require(_0xb01a('0x5'));var jayson=require('jayson/promise');var client=jayson[_0xb01a('0x6')][_0xb01a('0x7')]({'port':0x232a});config[_0xb01a('0x8')]=_[_0xb01a('0x9')](config['redis'],{'host':_0xb01a('0xa'),'port':0x18eb});var socket=require(_0xb01a('0xb'))(new Redis(config[_0xb01a('0x8')]));require(_0xb01a('0xc'))[_0xb01a('0xd')](socket);function respondWithRpcPromise(_0x430ae9,_0x1a8db8,_0x1b23b1){return new BPromise(function(_0x2ae3b2,_0x249063){return client[_0xb01a('0xe')](_0x430ae9,_0x1b23b1)[_0xb01a('0xf')](function(_0x8cb2bf){logger[_0xb01a('0x10')](_0xb01a('0x11'),_0x1a8db8,_0xb01a('0x12'));logger[_0xb01a('0x13')](_0xb01a('0x14'),_0x1a8db8,_0xb01a('0x12'),JSON[_0xb01a('0x15')](_0x8cb2bf));if(_0x8cb2bf[_0xb01a('0x16')]){if(_0x8cb2bf[_0xb01a('0x16')]['code']===0x1f4){logger['error']('MailQueue,\x20%s,\x20%s',_0x1a8db8,_0x8cb2bf['error'][_0xb01a('0x17')]);return _0x249063(_0x8cb2bf['error']['message']);}logger[_0xb01a('0x16')]('MailQueue,\x20%s,\x20%s',_0x1a8db8,_0x8cb2bf[_0xb01a('0x16')]['message']);return _0x2ae3b2(_0x8cb2bf[_0xb01a('0x16')][_0xb01a('0x17')]);}else{logger[_0xb01a('0x10')](_0xb01a('0x11'),_0x1a8db8,'request\x20sent');_0x2ae3b2(_0x8cb2bf[_0xb01a('0x18')]['message']);}})['catch'](function(_0x2f8eff){logger[_0xb01a('0x16')](_0xb01a('0x11'),_0x1a8db8,_0x2f8eff);_0x249063(_0x2f8eff);});});}exports[_0xb01a('0x19')]=function(_0x185b24){var _0x39f195=this;return new Promise(function(_0x2cd80a,_0x283ba){return db['MailQueue'][_0xb01a('0x1a')]({'raw':_0x185b24[_0xb01a('0x1b')]?_0x185b24[_0xb01a('0x1b')][_0xb01a('0x1c')]===undefined?!![]:![]:!![],'where':_0x185b24[_0xb01a('0x1b')]?_0x185b24[_0xb01a('0x1b')][_0xb01a('0x1d')]||null:null,'attributes':_0x185b24[_0xb01a('0x1b')]?_0x185b24['options'][_0xb01a('0x1e')]||null:null,'limit':_0x185b24[_0xb01a('0x1b')]?_0x185b24[_0xb01a('0x1b')][_0xb01a('0x1f')]||null:null,'include':_0x185b24[_0xb01a('0x1b')]?_0x185b24[_0xb01a('0x1b')]['include']?_['map'](_0x185b24[_0xb01a('0x1b')][_0xb01a('0x20')],function(_0x102e57){return{'model':db[_0x102e57['model']],'as':_0x102e57['as'],'attributes':_0x102e57['attributes'],'include':_0x102e57[_0xb01a('0x20')]?_[_0xb01a('0x21')](_0x102e57[_0xb01a('0x20')],function(_0x32b902){return{'model':db[_0x32b902[_0xb01a('0x22')]],'as':_0x32b902['as'],'attributes':_0x32b902[_0xb01a('0x1e')],'include':_0x32b902['include']?_['map'](_0x32b902[_0xb01a('0x20')],function(_0x5b2fb7){return{'model':db[_0x5b2fb7[_0xb01a('0x22')]],'as':_0x5b2fb7['as'],'attributes':_0x5b2fb7[_0xb01a('0x1e')]};}):[]};}):[]};}):[]:[]})[_0xb01a('0xf')](function(_0x55c39e){logger[_0xb01a('0x10')](_0xb01a('0x19'),_0x185b24);logger[_0xb01a('0x13')]('GetMailQueue',_0x185b24,JSON['stringify'](_0x55c39e));_0x2cd80a(_0x55c39e);})[_0xb01a('0x23')](function(_0x28f413){logger[_0xb01a('0x16')](_0xb01a('0x19'),_0x28f413['message'],_0x185b24);_0x283ba(_0x39f195[_0xb01a('0x16')](0x1f4,_0x28f413[_0xb01a('0x17')]));});});};exports[_0xb01a('0x24')]=function(_0x1699a4){var _0x29a045=this;return new Promise(function(_0x244d0a,_0x19b07d){return db['MailQueue']['find']({'raw':_0x1699a4[_0xb01a('0x1b')]?_0x1699a4['options'][_0xb01a('0x1c')]===undefined?!![]:![]:!![],'where':_0x1699a4['options']?_0x1699a4['options']['where']||null:null,'attributes':_0x1699a4[_0xb01a('0x1b')]?_0x1699a4[_0xb01a('0x1b')][_0xb01a('0x1e')]||null:null,'include':_0x1699a4['options']?_0x1699a4['options'][_0xb01a('0x20')]?_['map'](_0x1699a4[_0xb01a('0x1b')][_0xb01a('0x20')],function(_0x5d60d5){return{'model':db[_0x5d60d5[_0xb01a('0x22')]],'as':_0x5d60d5['as'],'attributes':_0x5d60d5[_0xb01a('0x1e')],'include':_0x5d60d5[_0xb01a('0x20')]?_[_0xb01a('0x21')](_0x5d60d5[_0xb01a('0x20')],function(_0x1ac4ea){return{'model':db[_0x1ac4ea[_0xb01a('0x22')]],'as':_0x1ac4ea['as'],'attributes':_0x1ac4ea[_0xb01a('0x1e')],'include':_0x1ac4ea['include']?_[_0xb01a('0x21')](_0x1ac4ea[_0xb01a('0x20')],function(_0x44f4d5){return{'model':db[_0x44f4d5['model']],'as':_0x44f4d5['as'],'attributes':_0x44f4d5[_0xb01a('0x1e')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2ee30a){logger[_0xb01a('0x10')](_0xb01a('0x24'),_0x1699a4);logger[_0xb01a('0x13')](_0xb01a('0x24'),_0x1699a4,JSON[_0xb01a('0x15')](_0x2ee30a));_0x244d0a(_0x2ee30a);})[_0xb01a('0x23')](function(_0x546d6c){logger[_0xb01a('0x16')](_0xb01a('0x24'),_0x546d6c[_0xb01a('0x17')],_0x1699a4);_0x19b07d(_0x29a045['error'](0x1f4,_0x546d6c['message']));});});};
\ No newline at end of file
+var _0xaa9c=['code','message','catch','GetMailQueue','MailQueue','options','limit','include','model','attributes','map','ShowMailQueue','find','raw','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','defaults','redis','localhost','./mailQueue.socket','register','request','then','info','MailQueue,\x20%s,\x20%s','request\x20sent','debug','MailQueue,\x20%s,\x20%s,\x20%s','stringify','error'];(function(_0x1aa423,_0x4460e1){var _0x15ef07=function(_0x14c7f1){while(--_0x14c7f1){_0x1aa423['push'](_0x1aa423['shift']());}};_0x15ef07(++_0x4460e1);}(_0xaa9c,0x1e2));var _0xcaa9=function(_0x4a53d,_0x58a95e){_0x4a53d=_0x4a53d-0x0;var _0x27410e=_0xaa9c[_0x4a53d];return _0x27410e;};'use strict';var _=require(_0xcaa9('0x0'));var util=require(_0xcaa9('0x1'));var moment=require(_0xcaa9('0x2'));var BPromise=require(_0xcaa9('0x3'));var rs=require(_0xcaa9('0x4'));var fs=require('fs');var Redis=require(_0xcaa9('0x5'));var db=require(_0xcaa9('0x6'))['db'];var utils=require(_0xcaa9('0x7'));var logger=require(_0xcaa9('0x8'))(_0xcaa9('0x9'));var config=require(_0xcaa9('0xa'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});config['redis']=_[_0xcaa9('0xb')](config[_0xcaa9('0xc')],{'host':_0xcaa9('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xcaa9('0xc')]));require(_0xcaa9('0xe'))[_0xcaa9('0xf')](socket);function respondWithRpcPromise(_0x5a3e8a,_0x1e14f9,_0x35615a){return new BPromise(function(_0x4302a7,_0xe3017f){return client[_0xcaa9('0x10')](_0x5a3e8a,_0x35615a)[_0xcaa9('0x11')](function(_0x183d78){logger[_0xcaa9('0x12')](_0xcaa9('0x13'),_0x1e14f9,_0xcaa9('0x14'));logger[_0xcaa9('0x15')](_0xcaa9('0x16'),_0x1e14f9,_0xcaa9('0x14'),JSON[_0xcaa9('0x17')](_0x183d78));if(_0x183d78[_0xcaa9('0x18')]){if(_0x183d78[_0xcaa9('0x18')][_0xcaa9('0x19')]===0x1f4){logger[_0xcaa9('0x18')]('MailQueue,\x20%s,\x20%s',_0x1e14f9,_0x183d78['error'][_0xcaa9('0x1a')]);return _0xe3017f(_0x183d78[_0xcaa9('0x18')][_0xcaa9('0x1a')]);}logger[_0xcaa9('0x18')](_0xcaa9('0x13'),_0x1e14f9,_0x183d78[_0xcaa9('0x18')][_0xcaa9('0x1a')]);return _0x4302a7(_0x183d78[_0xcaa9('0x18')][_0xcaa9('0x1a')]);}else{logger[_0xcaa9('0x12')]('MailQueue,\x20%s,\x20%s',_0x1e14f9,_0xcaa9('0x14'));_0x4302a7(_0x183d78['result'][_0xcaa9('0x1a')]);}})[_0xcaa9('0x1b')](function(_0x5b1426){logger['error'](_0xcaa9('0x13'),_0x1e14f9,_0x5b1426);_0xe3017f(_0x5b1426);});});}exports[_0xcaa9('0x1c')]=function(_0x5e4c9a){var _0x33d892=this;return new Promise(function(_0x4eaaa3,_0x352ca2){return db[_0xcaa9('0x1d')]['findAll']({'raw':_0x5e4c9a[_0xcaa9('0x1e')]?_0x5e4c9a[_0xcaa9('0x1e')]['raw']===undefined?!![]:![]:!![],'where':_0x5e4c9a[_0xcaa9('0x1e')]?_0x5e4c9a['options']['where']||null:null,'attributes':_0x5e4c9a[_0xcaa9('0x1e')]?_0x5e4c9a['options']['attributes']||null:null,'limit':_0x5e4c9a[_0xcaa9('0x1e')]?_0x5e4c9a[_0xcaa9('0x1e')][_0xcaa9('0x1f')]||null:null,'include':_0x5e4c9a[_0xcaa9('0x1e')]?_0x5e4c9a['options'][_0xcaa9('0x20')]?_['map'](_0x5e4c9a[_0xcaa9('0x1e')][_0xcaa9('0x20')],function(_0x15e6ed){return{'model':db[_0x15e6ed[_0xcaa9('0x21')]],'as':_0x15e6ed['as'],'attributes':_0x15e6ed[_0xcaa9('0x22')],'include':_0x15e6ed['include']?_['map'](_0x15e6ed['include'],function(_0x34c88e){return{'model':db[_0x34c88e[_0xcaa9('0x21')]],'as':_0x34c88e['as'],'attributes':_0x34c88e[_0xcaa9('0x22')],'include':_0x34c88e[_0xcaa9('0x20')]?_[_0xcaa9('0x23')](_0x34c88e[_0xcaa9('0x20')],function(_0x13be38){return{'model':db[_0x13be38[_0xcaa9('0x21')]],'as':_0x13be38['as'],'attributes':_0x13be38[_0xcaa9('0x22')]};}):[]};}):[]};}):[]:[]})['then'](function(_0xf817fe){logger['info'](_0xcaa9('0x1c'),_0x5e4c9a);logger[_0xcaa9('0x15')](_0xcaa9('0x1c'),_0x5e4c9a,JSON['stringify'](_0xf817fe));_0x4eaaa3(_0xf817fe);})[_0xcaa9('0x1b')](function(_0xdc5c04){logger['error'](_0xcaa9('0x1c'),_0xdc5c04['message'],_0x5e4c9a);_0x352ca2(_0x33d892[_0xcaa9('0x18')](0x1f4,_0xdc5c04[_0xcaa9('0x1a')]));});});};exports[_0xcaa9('0x24')]=function(_0x355601){var _0x1bb829=this;return new Promise(function(_0x540615,_0x571f0c){return db[_0xcaa9('0x1d')][_0xcaa9('0x25')]({'raw':_0x355601[_0xcaa9('0x1e')]?_0x355601[_0xcaa9('0x1e')][_0xcaa9('0x26')]===undefined?!![]:![]:!![],'where':_0x355601[_0xcaa9('0x1e')]?_0x355601[_0xcaa9('0x1e')]['where']||null:null,'attributes':_0x355601[_0xcaa9('0x1e')]?_0x355601[_0xcaa9('0x1e')][_0xcaa9('0x22')]||null:null,'include':_0x355601[_0xcaa9('0x1e')]?_0x355601[_0xcaa9('0x1e')][_0xcaa9('0x20')]?_[_0xcaa9('0x23')](_0x355601[_0xcaa9('0x1e')][_0xcaa9('0x20')],function(_0x29e7aa){return{'model':db[_0x29e7aa[_0xcaa9('0x21')]],'as':_0x29e7aa['as'],'attributes':_0x29e7aa['attributes'],'include':_0x29e7aa[_0xcaa9('0x20')]?_['map'](_0x29e7aa['include'],function(_0x2586e1){return{'model':db[_0x2586e1[_0xcaa9('0x21')]],'as':_0x2586e1['as'],'attributes':_0x2586e1[_0xcaa9('0x22')],'include':_0x2586e1['include']?_['map'](_0x2586e1[_0xcaa9('0x20')],function(_0x8aa5d3){return{'model':db[_0x8aa5d3[_0xcaa9('0x21')]],'as':_0x8aa5d3['as'],'attributes':_0x8aa5d3['attributes']};}):[]};}):[]};}):[]:[]})[_0xcaa9('0x11')](function(_0x460d4f){logger['info'](_0xcaa9('0x24'),_0x355601);logger[_0xcaa9('0x15')](_0xcaa9('0x24'),_0x355601,JSON[_0xcaa9('0x17')](_0x460d4f));_0x540615(_0x460d4f);})['catch'](function(_0x4ade8b){logger[_0xcaa9('0x18')](_0xcaa9('0x24'),_0x4ade8b[_0xcaa9('0x1a')],_0x355601);_0x571f0c(_0x1bb829['error'](0x1f4,_0x4ade8b[_0xcaa9('0x1a')]));});});};
\ No newline at end of file
index e939d2b..6c6961b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x24b3=['length','./mailQueue.events','save','remove','register'];(function(_0x54b723,_0xeb0f22){var _0x3c88ee=function(_0x3c9dec){while(--_0x3c9dec){_0x54b723['push'](_0x54b723['shift']());}};_0x3c88ee(++_0xeb0f22);}(_0x24b3,0xd3));var _0x324b=function(_0x113a23,_0x8d4f9d){_0x113a23=_0x113a23-0x0;var _0x41f9dc=_0x24b3[_0x113a23];return _0x41f9dc;};'use strict';var MailQueueEvents=require(_0x324b('0x0'));var events=[_0x324b('0x1'),_0x324b('0x2'),'update'];function createListener(_0x369824,_0x5691ab){return function(_0x49ce20){_0x5691ab['emit'](_0x369824,_0x49ce20);};}function removeListener(_0xd7068f,_0x1c3e34){return function(){MailQueueEvents['removeListener'](_0xd7068f,_0x1c3e34);};}exports[_0x324b('0x3')]=function(_0x4ff65e){for(var _0x5a244c=0x0,_0x563222=events[_0x324b('0x4')];_0x5a244c<_0x563222;_0x5a244c++){var _0x39d42c=events[_0x5a244c];var _0x7da7d0=createListener('mailQueue:'+_0x39d42c,_0x4ff65e);MailQueueEvents['on'](_0x39d42c,_0x7da7d0);}};
\ No newline at end of file
+var _0xcc04=['length','./mailQueue.events','save','remove','update','emit','register'];(function(_0x4689d0,_0x5a28c5){var _0xb61270=function(_0x290db1){while(--_0x290db1){_0x4689d0['push'](_0x4689d0['shift']());}};_0xb61270(++_0x5a28c5);}(_0xcc04,0x1c8));var _0x4cc0=function(_0x3394fc,_0x20ce38){_0x3394fc=_0x3394fc-0x0;var _0x1abe8b=_0xcc04[_0x3394fc];return _0x1abe8b;};'use strict';var MailQueueEvents=require(_0x4cc0('0x0'));var events=[_0x4cc0('0x1'),_0x4cc0('0x2'),_0x4cc0('0x3')];function createListener(_0x186182,_0x22b308){return function(_0x317e23){_0x22b308[_0x4cc0('0x4')](_0x186182,_0x317e23);};}function removeListener(_0x38248a,_0x2ab193){return function(){MailQueueEvents['removeListener'](_0x38248a,_0x2ab193);};}exports[_0x4cc0('0x5')]=function(_0x374412){for(var _0x5d774b=0x0,_0x34f8a9=events[_0x4cc0('0x6')];_0x5d774b<_0x34f8a9;_0x5d774b++){var _0x17f22f=events[_0x5d774b];var _0x434b93=createListener('mailQueue:'+_0x17f22f,_0x374412);MailQueueEvents['on'](_0x17f22f,_0x434b93);}};
\ No newline at end of file
index 355c11c..6bcae90 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3691=['/:id','show','post','create','put','update','delete','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailQueueReport.controller','get','isAuthenticated','index','/describe','describe'];(function(_0x40015a,_0x415db5){var _0x42f8a4=function(_0x5685ad){while(--_0x5685ad){_0x40015a['push'](_0x40015a['shift']());}};_0x42f8a4(++_0x415db5);}(_0x3691,0x8b));var _0x1369=function(_0x5d7ab0,_0x473b27){_0x5d7ab0=_0x5d7ab0-0x0;var _0xbbbf7f=_0x3691[_0x5d7ab0];return _0xbbbf7f;};'use strict';var multer=require(_0x1369('0x0'));var util=require(_0x1369('0x1'));var path=require(_0x1369('0x2'));var timeout=require('connect-timeout');var express=require(_0x1369('0x3'));var router=express[_0x1369('0x4')]();var fs_extra=require(_0x1369('0x5'));var auth=require(_0x1369('0x6'));var interaction=require(_0x1369('0x7'));var config=require(_0x1369('0x8'));var controller=require(_0x1369('0x9'));router[_0x1369('0xa')]('/',auth[_0x1369('0xb')](),controller[_0x1369('0xc')]);router[_0x1369('0xa')](_0x1369('0xd'),auth['isAuthenticated'](),controller[_0x1369('0xe')]);router[_0x1369('0xa')](_0x1369('0xf'),auth[_0x1369('0xb')](),controller[_0x1369('0x10')]);router[_0x1369('0x11')]('/',auth['isAuthenticated'](),controller[_0x1369('0x12')]);router[_0x1369('0x13')](_0x1369('0xf'),auth[_0x1369('0xb')](),controller[_0x1369('0x14')]);router[_0x1369('0x15')](_0x1369('0xf'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x881e=['fs-extra','../../components/interaction/service','./mailQueueReport.controller','get','isAuthenticated','index','/describe','describe','show','post','create','put','/:id','update','destroy','exports','multer','util','connect-timeout'];(function(_0x200776,_0x47a291){var _0x250234=function(_0x4de3fa){while(--_0x4de3fa){_0x200776['push'](_0x200776['shift']());}};_0x250234(++_0x47a291);}(_0x881e,0x11a));var _0xe881=function(_0xb3d808,_0x3b3224){_0xb3d808=_0xb3d808-0x0;var _0x5bddaa=_0x881e[_0xb3d808];return _0x5bddaa;};'use strict';var multer=require(_0xe881('0x0'));var util=require(_0xe881('0x1'));var path=require('path');var timeout=require(_0xe881('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0xe881('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0xe881('0x4'));var config=require('../../config/environment');var controller=require(_0xe881('0x5'));router[_0xe881('0x6')]('/',auth[_0xe881('0x7')](),controller[_0xe881('0x8')]);router[_0xe881('0x6')](_0xe881('0x9'),auth[_0xe881('0x7')](),controller[_0xe881('0xa')]);router[_0xe881('0x6')]('/:id',auth[_0xe881('0x7')](),controller[_0xe881('0xb')]);router[_0xe881('0xc')]('/',auth['isAuthenticated'](),controller[_0xe881('0xd')]);router[_0xe881('0xe')](_0xe881('0xf'),auth[_0xe881('0x7')](),controller[_0xe881('0x10')]);router['delete'](_0xe881('0xf'),auth[_0xe881('0x7')](),controller[_0xe881('0x11')]);module[_0xe881('0x12')]=router;
\ No newline at end of file
index b900500..e33db75 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4c83=['STRING','DATE','moment','sequelize','exports'];(function(_0x819464,_0x46fc91){var _0x49dcc0=function(_0x36b2b2){while(--_0x36b2b2){_0x819464['push'](_0x819464['shift']());}};_0x49dcc0(++_0x46fc91);}(_0x4c83,0x183));var _0x34c8=function(_0x1c8ca1,_0x5b8884){_0x1c8ca1=_0x1c8ca1-0x0;var _0x32af96=_0x4c83[_0x1c8ca1];return _0x32af96;};'use strict';var moment=require(_0x34c8('0x0'));var Sequelize=require(_0x34c8('0x1'));module[_0x34c8('0x2')]={'uniqueid':{'type':Sequelize[_0x34c8('0x3')],'allowNull':![]},'from':{'type':Sequelize[_0x34c8('0x3')]},'joinAt':{'type':Sequelize[_0x34c8('0x4')]},'leaveAt':{'type':Sequelize[_0x34c8('0x4')]},'acceptAt':{'type':Sequelize[_0x34c8('0x4')]},'exitAt':{'type':Sequelize[_0x34c8('0x4')]},'reason':{'type':Sequelize[_0x34c8('0x3')]}};
\ No newline at end of file
+var _0xacd0=['DATE','moment','sequelize','exports','STRING'];(function(_0xab0faf,_0x2ea57f){var _0x2032ff=function(_0x49c224){while(--_0x49c224){_0xab0faf['push'](_0xab0faf['shift']());}};_0x2032ff(++_0x2ea57f);}(_0xacd0,0xc9));var _0x0acd=function(_0x408de5,_0x24fa7b){_0x408de5=_0x408de5-0x0;var _0x2015a1=_0xacd0[_0x408de5];return _0x2015a1;};'use strict';var moment=require(_0x0acd('0x0'));var Sequelize=require(_0x0acd('0x1'));module[_0x0acd('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'from':{'type':Sequelize[_0x0acd('0x3')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x0acd('0x4')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x0acd('0x4')]},'reason':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 97c8e02..490f8af 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5fdc=['papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','end','json','count','offset','set','Content-Range','apply','reject','update','then','destroy','error','stack','name','send','index','map','MailQueueReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','sort','where','pick','filter','VIRTUAL','merge','options','includeAll','include','findAll','rows','catch','show','create','body','find','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','desk.js','querystring'];(function(_0x1d9aa0,_0x272488){var _0x226868=function(_0x17127c){while(--_0x17127c){_0x1d9aa0['push'](_0x1d9aa0['shift']());}};_0x226868(++_0x272488);}(_0x5fdc,0x127));var _0xc5fd=function(_0x3fee7c,_0x37147a){_0x3fee7c=_0x3fee7c-0x0;var _0xcb00e4=_0x5fdc[_0x3fee7c];return _0xcb00e4;};'use strict';var emlformat=require(_0xc5fd('0x0'));var rimraf=require(_0xc5fd('0x1'));var zipdir=require(_0xc5fd('0x2'));var jsonpatch=require(_0xc5fd('0x3'));var rp=require(_0xc5fd('0x4'));var moment=require(_0xc5fd('0x5'));var BPromise=require(_0xc5fd('0x6'));var Mustache=require(_0xc5fd('0x7'));var util=require(_0xc5fd('0x8'));var path=require(_0xc5fd('0x9'));var sox=require(_0xc5fd('0xa'));var csv=require(_0xc5fd('0xb'));var ejs=require(_0xc5fd('0xc'));var fs=require('fs');var fs_extra=require(_0xc5fd('0xd'));var _=require(_0xc5fd('0xe'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xc5fd('0xf'));var toCsv=require(_0xc5fd('0xb'));var querystring=require(_0xc5fd('0x10'));var Papa=require(_0xc5fd('0x11'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0xc5fd('0x12'));var as=require(_0xc5fd('0x13'));var hardwareService=require(_0xc5fd('0x14'));var logger=require(_0xc5fd('0x15'))(_0xc5fd('0x16'));var utils=require(_0xc5fd('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0xc5fd('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x558939,_0x1b1b2b){_0x1b1b2b=_0x1b1b2b||0xcc;return function(_0x1bc6d1){if(_0x1bc6d1){return _0x558939[_0xc5fd('0x19')](_0x1b1b2b);}return _0x558939[_0xc5fd('0x1a')](_0x1b1b2b)[_0xc5fd('0x1b')]();};}function respondWithResult(_0x40b0f8,_0x27447e){_0x27447e=_0x27447e||0xc8;return function(_0xa7a954){if(_0xa7a954){return _0x40b0f8['status'](_0x27447e)[_0xc5fd('0x1c')](_0xa7a954);}};}function respondWithFilteredResult(_0x103c3d,_0x2221da){return function(_0x3404e0){if(_0x3404e0){var _0x4d3636=typeof _0x2221da['offset']==='undefined'&&typeof _0x2221da['limit']==='undefined';var _0x35a9d0=_0x3404e0[_0xc5fd('0x1d')];var _0x27f611=_0x4d3636?0x0:_0x2221da[_0xc5fd('0x1e')];var _0x2ee392=_0x4d3636?_0x3404e0[_0xc5fd('0x1d')]:_0x2221da[_0xc5fd('0x1e')]+_0x2221da['limit'];var _0xb7bab1;if(_0x2ee392>=_0x35a9d0){_0x2ee392=_0x35a9d0;_0xb7bab1=0xc8;}else{_0xb7bab1=0xce;}_0x103c3d[_0xc5fd('0x1a')](_0xb7bab1);return _0x103c3d[_0xc5fd('0x1f')](_0xc5fd('0x20'),_0x27f611+'-'+_0x2ee392+'/'+_0x35a9d0)[_0xc5fd('0x1c')](_0x3404e0);}return null;};}function patchUpdates(_0x48024e){return function(_0x3966a2){try{jsonpatch[_0xc5fd('0x21')](_0x3966a2,_0x48024e,!![]);}catch(_0x18048e){return BPromise[_0xc5fd('0x22')](_0x18048e);}return _0x3966a2['save']();};}function saveUpdates(_0x4c85d5,_0x13cc42){return function(_0x2ab935){if(_0x2ab935){return _0x2ab935[_0xc5fd('0x23')](_0x4c85d5)[_0xc5fd('0x24')](function(_0x334401){return _0x334401;});}return null;};}function removeEntity(_0x311952,_0x56d473){return function(_0x1a3f21){if(_0x1a3f21){return _0x1a3f21[_0xc5fd('0x25')]()[_0xc5fd('0x24')](function(){_0x311952[_0xc5fd('0x1a')](0xcc)[_0xc5fd('0x1b')]();});}};}function handleEntityNotFound(_0x4020af,_0x475b91){return function(_0x527018){if(!_0x527018){_0x4020af[_0xc5fd('0x19')](0x194);}return _0x527018;};}function handleError(_0x48cd1d,_0x2ee700){_0x2ee700=_0x2ee700||0x1f4;return function(_0x231368){logger[_0xc5fd('0x26')](_0x231368[_0xc5fd('0x27')]);if(_0x231368['name']){delete _0x231368[_0xc5fd('0x28')];}_0x48cd1d[_0xc5fd('0x1a')](_0x2ee700)[_0xc5fd('0x29')](_0x231368);};}exports[_0xc5fd('0x2a')]=function(_0x19df33,_0x209975){var _0x541c12={},_0x412ef7={},_0x5d4f70={'count':0x0,'rows':[]};var _0x4859f7=_[_0xc5fd('0x2b')](db[_0xc5fd('0x2c')][_0xc5fd('0x2d')],function(_0x38db1d){return{'name':_0x38db1d[_0xc5fd('0x2e')],'type':_0x38db1d[_0xc5fd('0x2f')][_0xc5fd('0x30')]};});_0x412ef7[_0xc5fd('0x31')]=_['map'](_0x4859f7,_0xc5fd('0x28'));_0x412ef7[_0xc5fd('0x32')]=_[_0xc5fd('0x33')](_0x19df33[_0xc5fd('0x32')]);_0x412ef7[_0xc5fd('0x34')]=_[_0xc5fd('0x35')](_0x412ef7[_0xc5fd('0x31')],_0x412ef7[_0xc5fd('0x32')]);_0x541c12[_0xc5fd('0x36')]=_[_0xc5fd('0x35')](_0x412ef7[_0xc5fd('0x31')],qs[_0xc5fd('0x37')](_0x19df33['query'][_0xc5fd('0x37')]));_0x541c12[_0xc5fd('0x36')]=_0x541c12[_0xc5fd('0x36')][_0xc5fd('0x38')]?_0x541c12[_0xc5fd('0x36')]:_0x412ef7[_0xc5fd('0x31')];if(!_0x19df33[_0xc5fd('0x32')][_0xc5fd('0x39')](_0xc5fd('0x3a'))){_0x541c12['limit']=qs[_0xc5fd('0x3b')](_0x19df33[_0xc5fd('0x32')][_0xc5fd('0x3b')]);_0x541c12[_0xc5fd('0x1e')]=qs[_0xc5fd('0x1e')](_0x19df33[_0xc5fd('0x32')][_0xc5fd('0x1e')]);}_0x541c12['order']=qs[_0xc5fd('0x3c')](_0x19df33[_0xc5fd('0x32')]['sort']);_0x541c12[_0xc5fd('0x3d')]=qs['filters'](_[_0xc5fd('0x3e')](_0x19df33[_0xc5fd('0x32')],_0x412ef7[_0xc5fd('0x34')]),_0x4859f7);if(_0x19df33['query'][_0xc5fd('0x3f')]){_0x541c12[_0xc5fd('0x3d')]=_['merge'](_0x541c12[_0xc5fd('0x3d')],{'$or':_[_0xc5fd('0x2b')](_0x4859f7,function(_0x31b457){if(_0x31b457[_0xc5fd('0x2f')]!==_0xc5fd('0x40')){var _0x33f669={};_0x33f669[_0x31b457['name']]={'$like':'%'+_0x19df33[_0xc5fd('0x32')][_0xc5fd('0x3f')]+'%'};return _0x33f669;}})});}_0x541c12=_[_0xc5fd('0x41')]({},_0x541c12,_0x19df33[_0xc5fd('0x42')]);var _0x5d3fce={'where':_0x541c12['where']};return db['MailQueueReport'][_0xc5fd('0x1d')](_0x5d3fce)[_0xc5fd('0x24')](function(_0x2dd4ca){_0x5d4f70[_0xc5fd('0x1d')]=_0x2dd4ca;if(_0x19df33[_0xc5fd('0x32')][_0xc5fd('0x43')]){_0x541c12[_0xc5fd('0x44')]=[{'all':!![]}];}return db[_0xc5fd('0x2c')][_0xc5fd('0x45')](_0x541c12);})['then'](function(_0x5a2199){_0x5d4f70[_0xc5fd('0x46')]=_0x5a2199;return _0x5d4f70;})['then'](respondWithFilteredResult(_0x209975,_0x541c12))[_0xc5fd('0x47')](handleError(_0x209975,null));};exports[_0xc5fd('0x48')]=function(_0x2259e4,_0x57fd81){var _0x6ebcbf={'raw':!![],'where':{'id':_0x2259e4['params']['id']}},_0x350753={};_0x350753[_0xc5fd('0x31')]=_[_0xc5fd('0x33')](db['MailQueueReport'][_0xc5fd('0x2d')]);_0x350753['query']=_[_0xc5fd('0x33')](_0x2259e4[_0xc5fd('0x32')]);_0x350753['filters']=_[_0xc5fd('0x35')](_0x350753[_0xc5fd('0x31')],_0x350753[_0xc5fd('0x32')]);_0x6ebcbf['attributes']=_[_0xc5fd('0x35')](_0x350753[_0xc5fd('0x31')],qs['fields'](_0x2259e4['query'][_0xc5fd('0x37')]));_0x6ebcbf['attributes']=_0x6ebcbf['attributes']['length']?_0x6ebcbf[_0xc5fd('0x36')]:_0x350753[_0xc5fd('0x31')];if(_0x2259e4[_0xc5fd('0x32')][_0xc5fd('0x43')]){_0x6ebcbf[_0xc5fd('0x44')]=[{'all':!![]}];}_0x6ebcbf=_[_0xc5fd('0x41')]({},_0x6ebcbf,_0x2259e4['options']);return db['MailQueueReport']['find'](_0x6ebcbf)[_0xc5fd('0x24')](handleEntityNotFound(_0x57fd81,null))[_0xc5fd('0x24')](respondWithResult(_0x57fd81,null))[_0xc5fd('0x47')](handleError(_0x57fd81,null));};exports['create']=function(_0x1a2200,_0x51641b){return db[_0xc5fd('0x2c')][_0xc5fd('0x49')](_0x1a2200[_0xc5fd('0x4a')],{})[_0xc5fd('0x24')](respondWithResult(_0x51641b,0xc9))[_0xc5fd('0x47')](handleError(_0x51641b,null));};exports[_0xc5fd('0x23')]=function(_0x54d86c,_0x6b2f77){if(_0x54d86c[_0xc5fd('0x4a')]['id']){delete _0x54d86c['body']['id'];}return db['MailQueueReport'][_0xc5fd('0x4b')]({'where':{'id':_0x54d86c['params']['id']}})['then'](handleEntityNotFound(_0x6b2f77,null))[_0xc5fd('0x24')](saveUpdates(_0x54d86c[_0xc5fd('0x4a')],null))['then'](respondWithResult(_0x6b2f77,null))[_0xc5fd('0x47')](handleError(_0x6b2f77,null));};exports[_0xc5fd('0x25')]=function(_0x5c49e7,_0x21d418){return db[_0xc5fd('0x2c')][_0xc5fd('0x4b')]({'where':{'id':_0x5c49e7[_0xc5fd('0x4c')]['id']}})[_0xc5fd('0x24')](handleEntityNotFound(_0x21d418,null))[_0xc5fd('0x24')](removeEntity(_0x21d418,null))[_0xc5fd('0x47')](handleError(_0x21d418,null));};exports[_0xc5fd('0x4d')]=function(_0x4217f7,_0x32721e){return db[_0xc5fd('0x2c')]['describe']()[_0xc5fd('0x24')](respondWithResult(_0x32721e,null))[_0xc5fd('0x47')](handleError(_0x32721e,null));};
\ No newline at end of file
+var _0xc2c7=['merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','keys','find','params','describe','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','to-csv','ejs','fs-extra','jsforce','desk.js','querystring','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','json','offset','limit','count','set','Content-Range','reject','save','update','destroy','then','error','name','send','index','map','MailQueueReport','rawAttributes','fieldName','type','key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','filter','where'];(function(_0x155b1b,_0x36df28){var _0x156e37=function(_0x56bda0){while(--_0x56bda0){_0x155b1b['push'](_0x155b1b['shift']());}};_0x156e37(++_0x36df28);}(_0xc2c7,0x134));var _0x7c2c=function(_0x5c71c2,_0xbf7c88){_0x5c71c2=_0x5c71c2-0x0;var _0x432239=_0xc2c7[_0x5c71c2];return _0x432239;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x7c2c('0x0'));var zipdir=require(_0x7c2c('0x1'));var jsonpatch=require(_0x7c2c('0x2'));var rp=require(_0x7c2c('0x3'));var moment=require(_0x7c2c('0x4'));var BPromise=require(_0x7c2c('0x5'));var Mustache=require(_0x7c2c('0x6'));var util=require(_0x7c2c('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0x7c2c('0x8'));var ejs=require(_0x7c2c('0x9'));var fs=require('fs');var fs_extra=require(_0x7c2c('0xa'));var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x7c2c('0xb'));var deskjs=require(_0x7c2c('0xc'));var toCsv=require(_0x7c2c('0x8'));var querystring=require(_0x7c2c('0xd'));var Papa=require(_0x7c2c('0xe'));var Redis=require('ioredis');var authService=require(_0x7c2c('0xf'));var qs=require(_0x7c2c('0x10'));var as=require(_0x7c2c('0x11'));var hardwareService=require(_0x7c2c('0x12'));var logger=require(_0x7c2c('0x13'))(_0x7c2c('0x14'));var utils=require(_0x7c2c('0x15'));var config=require(_0x7c2c('0x16'));var licenseUtil=require(_0x7c2c('0x17'));var db=require(_0x7c2c('0x18'))['db'];function respondWithStatusCode(_0xae8441,_0x45847d){_0x45847d=_0x45847d||0xcc;return function(_0x68398a){if(_0x68398a){return _0xae8441[_0x7c2c('0x19')](_0x45847d);}return _0xae8441[_0x7c2c('0x1a')](_0x45847d)[_0x7c2c('0x1b')]();};}function respondWithResult(_0x4c4aaf,_0x5b5729){_0x5b5729=_0x5b5729||0xc8;return function(_0x102778){if(_0x102778){return _0x4c4aaf[_0x7c2c('0x1a')](_0x5b5729)[_0x7c2c('0x1c')](_0x102778);}};}function respondWithFilteredResult(_0x5ae94f,_0x11424c){return function(_0x206ecd){if(_0x206ecd){var _0x5e55e0=typeof _0x11424c[_0x7c2c('0x1d')]==='undefined'&&typeof _0x11424c[_0x7c2c('0x1e')]==='undefined';var _0x342ea2=_0x206ecd[_0x7c2c('0x1f')];var _0x14453f=_0x5e55e0?0x0:_0x11424c[_0x7c2c('0x1d')];var _0x17df4a=_0x5e55e0?_0x206ecd[_0x7c2c('0x1f')]:_0x11424c[_0x7c2c('0x1d')]+_0x11424c[_0x7c2c('0x1e')];var _0x2d356e;if(_0x17df4a>=_0x342ea2){_0x17df4a=_0x342ea2;_0x2d356e=0xc8;}else{_0x2d356e=0xce;}_0x5ae94f[_0x7c2c('0x1a')](_0x2d356e);return _0x5ae94f[_0x7c2c('0x20')](_0x7c2c('0x21'),_0x14453f+'-'+_0x17df4a+'/'+_0x342ea2)['json'](_0x206ecd);}return null;};}function patchUpdates(_0x1c5491){return function(_0x4adb62){try{jsonpatch['apply'](_0x4adb62,_0x1c5491,!![]);}catch(_0x15ae33){return BPromise[_0x7c2c('0x22')](_0x15ae33);}return _0x4adb62[_0x7c2c('0x23')]();};}function saveUpdates(_0x38ae30,_0x41552f){return function(_0x1883b5){if(_0x1883b5){return _0x1883b5[_0x7c2c('0x24')](_0x38ae30)['then'](function(_0x10c356){return _0x10c356;});}return null;};}function removeEntity(_0x4dedd8,_0x302c93){return function(_0x57f510){if(_0x57f510){return _0x57f510[_0x7c2c('0x25')]()[_0x7c2c('0x26')](function(){_0x4dedd8[_0x7c2c('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4d6ec7,_0x31a50c){return function(_0x30c53e){if(!_0x30c53e){_0x4d6ec7[_0x7c2c('0x19')](0x194);}return _0x30c53e;};}function handleError(_0x150690,_0x31d8f3){_0x31d8f3=_0x31d8f3||0x1f4;return function(_0xa8e145){logger[_0x7c2c('0x27')](_0xa8e145['stack']);if(_0xa8e145[_0x7c2c('0x28')]){delete _0xa8e145[_0x7c2c('0x28')];}_0x150690[_0x7c2c('0x1a')](_0x31d8f3)[_0x7c2c('0x29')](_0xa8e145);};}exports[_0x7c2c('0x2a')]=function(_0x1f8846,_0xf2bfd1){var _0x26f472={},_0xa040ff={},_0x5769ec={'count':0x0,'rows':[]};var _0x465ad6=_[_0x7c2c('0x2b')](db[_0x7c2c('0x2c')][_0x7c2c('0x2d')],function(_0x53ad23){return{'name':_0x53ad23[_0x7c2c('0x2e')],'type':_0x53ad23[_0x7c2c('0x2f')][_0x7c2c('0x30')]};});_0xa040ff[_0x7c2c('0x31')]=_[_0x7c2c('0x2b')](_0x465ad6,_0x7c2c('0x28'));_0xa040ff[_0x7c2c('0x32')]=_['keys'](_0x1f8846[_0x7c2c('0x32')]);_0xa040ff[_0x7c2c('0x33')]=_[_0x7c2c('0x34')](_0xa040ff[_0x7c2c('0x31')],_0xa040ff[_0x7c2c('0x32')]);_0x26f472['attributes']=_['intersection'](_0xa040ff[_0x7c2c('0x31')],qs['fields'](_0x1f8846['query'][_0x7c2c('0x35')]));_0x26f472[_0x7c2c('0x36')]=_0x26f472[_0x7c2c('0x36')][_0x7c2c('0x37')]?_0x26f472['attributes']:_0xa040ff[_0x7c2c('0x31')];if(!_0x1f8846[_0x7c2c('0x32')][_0x7c2c('0x38')](_0x7c2c('0x39'))){_0x26f472[_0x7c2c('0x1e')]=qs[_0x7c2c('0x1e')](_0x1f8846[_0x7c2c('0x32')][_0x7c2c('0x1e')]);_0x26f472[_0x7c2c('0x1d')]=qs[_0x7c2c('0x1d')](_0x1f8846[_0x7c2c('0x32')][_0x7c2c('0x1d')]);}_0x26f472[_0x7c2c('0x3a')]=qs['sort'](_0x1f8846['query'][_0x7c2c('0x3b')]);_0x26f472['where']=qs['filters'](_['pick'](_0x1f8846[_0x7c2c('0x32')],_0xa040ff[_0x7c2c('0x33')]),_0x465ad6);if(_0x1f8846[_0x7c2c('0x32')][_0x7c2c('0x3c')]){_0x26f472[_0x7c2c('0x3d')]=_[_0x7c2c('0x3e')](_0x26f472[_0x7c2c('0x3d')],{'$or':_[_0x7c2c('0x2b')](_0x465ad6,function(_0x2b6520){if(_0x2b6520[_0x7c2c('0x2f')]!==_0x7c2c('0x3f')){var _0x58696a={};_0x58696a[_0x2b6520['name']]={'$like':'%'+_0x1f8846[_0x7c2c('0x32')][_0x7c2c('0x3c')]+'%'};return _0x58696a;}})});}_0x26f472=_[_0x7c2c('0x3e')]({},_0x26f472,_0x1f8846[_0x7c2c('0x40')]);var _0x5e8c96={'where':_0x26f472[_0x7c2c('0x3d')]};return db[_0x7c2c('0x2c')][_0x7c2c('0x1f')](_0x5e8c96)[_0x7c2c('0x26')](function(_0x18e288){_0x5769ec[_0x7c2c('0x1f')]=_0x18e288;if(_0x1f8846[_0x7c2c('0x32')][_0x7c2c('0x41')]){_0x26f472[_0x7c2c('0x42')]=[{'all':!![]}];}return db['MailQueueReport'][_0x7c2c('0x43')](_0x26f472);})['then'](function(_0x2c3f40){_0x5769ec[_0x7c2c('0x44')]=_0x2c3f40;return _0x5769ec;})['then'](respondWithFilteredResult(_0xf2bfd1,_0x26f472))[_0x7c2c('0x45')](handleError(_0xf2bfd1,null));};exports['show']=function(_0x3014fb,_0x33b2be){var _0x9b9813={'raw':!![],'where':{'id':_0x3014fb['params']['id']}},_0x26351e={};_0x26351e[_0x7c2c('0x31')]=_['keys'](db['MailQueueReport'][_0x7c2c('0x2d')]);_0x26351e[_0x7c2c('0x32')]=_[_0x7c2c('0x46')](_0x3014fb['query']);_0x26351e[_0x7c2c('0x33')]=_[_0x7c2c('0x34')](_0x26351e['model'],_0x26351e[_0x7c2c('0x32')]);_0x9b9813['attributes']=_[_0x7c2c('0x34')](_0x26351e[_0x7c2c('0x31')],qs['fields'](_0x3014fb['query'][_0x7c2c('0x35')]));_0x9b9813[_0x7c2c('0x36')]=_0x9b9813['attributes'][_0x7c2c('0x37')]?_0x9b9813['attributes']:_0x26351e['model'];if(_0x3014fb[_0x7c2c('0x32')][_0x7c2c('0x41')]){_0x9b9813[_0x7c2c('0x42')]=[{'all':!![]}];}_0x9b9813=_[_0x7c2c('0x3e')]({},_0x9b9813,_0x3014fb[_0x7c2c('0x40')]);return db[_0x7c2c('0x2c')][_0x7c2c('0x47')](_0x9b9813)[_0x7c2c('0x26')](handleEntityNotFound(_0x33b2be,null))[_0x7c2c('0x26')](respondWithResult(_0x33b2be,null))['catch'](handleError(_0x33b2be,null));};exports['create']=function(_0xeb067b,_0x3091bd){return db[_0x7c2c('0x2c')]['create'](_0xeb067b['body'],{})[_0x7c2c('0x26')](respondWithResult(_0x3091bd,0xc9))[_0x7c2c('0x45')](handleError(_0x3091bd,null));};exports[_0x7c2c('0x24')]=function(_0x2b79d5,_0x5f3de8){if(_0x2b79d5['body']['id']){delete _0x2b79d5['body']['id'];}return db[_0x7c2c('0x2c')][_0x7c2c('0x47')]({'where':{'id':_0x2b79d5[_0x7c2c('0x48')]['id']}})[_0x7c2c('0x26')](handleEntityNotFound(_0x5f3de8,null))[_0x7c2c('0x26')](saveUpdates(_0x2b79d5['body'],null))[_0x7c2c('0x26')](respondWithResult(_0x5f3de8,null))[_0x7c2c('0x45')](handleError(_0x5f3de8,null));};exports['destroy']=function(_0x19621a,_0x56e09d){return db[_0x7c2c('0x2c')][_0x7c2c('0x47')]({'where':{'id':_0x19621a[_0x7c2c('0x48')]['id']}})['then'](handleEntityNotFound(_0x56e09d,null))['then'](removeEntity(_0x56e09d,null))[_0x7c2c('0x45')](handleError(_0x56e09d,null));};exports['describe']=function(_0x13e0bf,_0x11d337){return db['MailQueueReport'][_0x7c2c('0x49')]()[_0x7c2c('0x26')](respondWithResult(_0x11d337,null))['catch'](handleError(_0x11d337,null));};
\ No newline at end of file
index 5e06619..afef8e6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9e99=['exports','report_mail_queue','uniqueid','lodash','../../config/logger','api','bluebird','request-promise','../../config/environment','./mailQueueReport.attributes'];(function(_0x28382e,_0x4c82ae){var _0xf2998a=function(_0x21f324){while(--_0x21f324){_0x28382e['push'](_0x28382e['shift']());}};_0xf2998a(++_0x4c82ae);}(_0x9e99,0x99));var _0x99e9=function(_0xfe10a1,_0x2a08dc){_0xfe10a1=_0xfe10a1-0x0;var _0x37028a=_0x9e99[_0xfe10a1];return _0x37028a;};'use strict';var _=require(_0x99e9('0x0'));var util=require('util');var logger=require(_0x99e9('0x1'))(_0x99e9('0x2'));var moment=require('moment');var BPromise=require(_0x99e9('0x3'));var rp=require(_0x99e9('0x4'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x99e9('0x5'));var attributes=require(_0x99e9('0x6'));module[_0x99e9('0x7')]=function(_0x2bb1cf,_0x542dca){return _0x2bb1cf['define']('MailQueueReport',attributes,{'tableName':_0x99e9('0x8'),'paranoid':![],'indexes':[{'name':_0x99e9('0x9'),'fields':[_0x99e9('0x9')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x3663=['lodash','util','../../config/logger','moment','bluebird','request-promise','path','../../config/environment','./mailQueueReport.attributes','exports','define','report_mail_queue','uniqueid'];(function(_0x4cfc1d,_0x2c0927){var _0x1c01a0=function(_0x264a74){while(--_0x264a74){_0x4cfc1d['push'](_0x4cfc1d['shift']());}};_0x1c01a0(++_0x2c0927);}(_0x3663,0x1ee));var _0x3366=function(_0x3cb5f1,_0x48c50e){_0x3cb5f1=_0x3cb5f1-0x0;var _0x31d0c9=_0x3663[_0x3cb5f1];return _0x31d0c9;};'use strict';var _=require(_0x3366('0x0'));var util=require(_0x3366('0x1'));var logger=require(_0x3366('0x2'))('api');var moment=require(_0x3366('0x3'));var BPromise=require(_0x3366('0x4'));var rp=require(_0x3366('0x5'));var fs=require('fs');var path=require(_0x3366('0x6'));var rimraf=require('rimraf');var config=require(_0x3366('0x7'));var attributes=require(_0x3366('0x8'));module[_0x3366('0x9')]=function(_0x133760,_0x4331d9){return _0x133760[_0x3366('0xa')]('MailQueueReport',attributes,{'tableName':_0x3366('0xb'),'paranoid':![],'indexes':[{'name':_0x3366('0xc'),'fields':[_0x3366('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
index 50078ac..ffff559 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc4aa=['create','body','options','raw','update','where','attributes','limit','UpdateMailQueueReport','stringify','lodash','util','moment','bluebird','randomstring','ioredis','rpc','../../config/environment','jayson/promise','client','http','request','then','MailQueueReport,\x20%s,\x20%s','request\x20sent','debug','error','code','message','info','catch','CreateMailQueueReport','MailQueueReport'];(function(_0x2c6fe7,_0x122d06){var _0x4b6a0d=function(_0x3185a8){while(--_0x3185a8){_0x2c6fe7['push'](_0x2c6fe7['shift']());}};_0x4b6a0d(++_0x122d06);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x1caf6a,_0x26a5bf){_0x1caf6a=_0x1caf6a-0x0;var _0x1bf493=_0xc4aa[_0x1caf6a];return _0x1bf493;};'use strict';var _=require(_0xac4a('0x0'));var util=require(_0xac4a('0x1'));var moment=require(_0xac4a('0x2'));var BPromise=require(_0xac4a('0x3'));var rs=require(_0xac4a('0x4'));var fs=require('fs');var Redis=require(_0xac4a('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xac4a('0x6'));var config=require(_0xac4a('0x7'));var jayson=require(_0xac4a('0x8'));var client=jayson[_0xac4a('0x9')][_0xac4a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x15cd34,_0x3ef77c,_0x10525b){return new BPromise(function(_0x5c6179,_0x5b8339){return client[_0xac4a('0xb')](_0x15cd34,_0x10525b)[_0xac4a('0xc')](function(_0x26ec84){logger['info'](_0xac4a('0xd'),_0x3ef77c,_0xac4a('0xe'));logger[_0xac4a('0xf')]('MailQueueReport,\x20%s,\x20%s,\x20%s',_0x3ef77c,_0xac4a('0xe'),JSON['stringify'](_0x26ec84));if(_0x26ec84[_0xac4a('0x10')]){if(_0x26ec84['error'][_0xac4a('0x11')]===0x1f4){logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x26ec84['error'][_0xac4a('0x12')]);return _0x5b8339(_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);}logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);return _0x5c6179(_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);}else{logger[_0xac4a('0x13')](_0xac4a('0xd'),_0x3ef77c,_0xac4a('0xe'));_0x5c6179(_0x26ec84['result'][_0xac4a('0x12')]);}})[_0xac4a('0x14')](function(_0x23eb66){logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x23eb66);_0x5b8339(_0x23eb66);});});}exports[_0xac4a('0x15')]=function(_0x28e304){var _0x44ec59=this;return new Promise(function(_0x546c5d,_0x5ac21e){return db[_0xac4a('0x16')][_0xac4a('0x17')](_0x28e304[_0xac4a('0x18')],{'raw':_0x28e304['options']?_0x28e304[_0xac4a('0x19')][_0xac4a('0x1a')]===undefined?!![]:![]:!![]})[_0xac4a('0xc')](function(_0x3a3cdb){logger[_0xac4a('0x13')](_0xac4a('0x15'),_0x28e304);logger[_0xac4a('0xf')](_0xac4a('0x15'),_0x28e304,JSON['stringify'](_0x3a3cdb));_0x546c5d(_0x3a3cdb);})[_0xac4a('0x14')](function(_0x3204ad){logger['error'](_0xac4a('0x15'),_0x3204ad[_0xac4a('0x12')],_0x28e304);_0x5ac21e(_0x44ec59[_0xac4a('0x10')](0x1f4,_0x3204ad[_0xac4a('0x12')]));});});};exports['UpdateMailQueueReport']=function(_0x1b7998){var _0x2503d8=this;return new Promise(function(_0x15435c,_0x412494){return db[_0xac4a('0x16')][_0xac4a('0x1b')](_0x1b7998[_0xac4a('0x18')],{'raw':_0x1b7998[_0xac4a('0x19')]?_0x1b7998[_0xac4a('0x19')][_0xac4a('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1b7998[_0xac4a('0x19')]?_0x1b7998[_0xac4a('0x19')][_0xac4a('0x1c')]||null:null,'attributes':_0x1b7998[_0xac4a('0x19')]?_0x1b7998[_0xac4a('0x19')][_0xac4a('0x1d')]||null:null,'limit':_0x1b7998['options']?_0x1b7998[_0xac4a('0x19')][_0xac4a('0x1e')]||null:null})[_0xac4a('0xc')](function(_0x2772fe){logger[_0xac4a('0x13')]('UpdateMailQueueReport',_0x1b7998);logger['debug'](_0xac4a('0x1f'),_0x1b7998,JSON[_0xac4a('0x20')](_0x2772fe));_0x15435c(_0x2772fe);})[_0xac4a('0x14')](function(_0x546b65){logger['error'](_0xac4a('0x1f'),_0x546b65[_0xac4a('0x12')],_0x1b7998);_0x412494(_0x2503d8[_0xac4a('0x10')](0x1f4,_0x546b65[_0xac4a('0x12')]));});});};
\ No newline at end of file
+var _0x7a54=['moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','info','MailQueueReport,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','MailQueueReport','create','body','options','raw','CreateMailQueueReport','UpdateMailQueueReport','update','where','attributes','limit','then','lodash','util'];(function(_0x45d2e8,_0x3c9572){var _0xfbdeb9=function(_0x252899){while(--_0x252899){_0x45d2e8['push'](_0x45d2e8['shift']());}};_0xfbdeb9(++_0x3c9572);}(_0x7a54,0x106));var _0x47a5=function(_0x563d87,_0x4d954f){_0x563d87=_0x563d87-0x0;var _0x8f6edf=_0x7a54[_0x563d87];return _0x8f6edf;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var BPromise=require('bluebird');var rs=require(_0x47a5('0x3'));var fs=require('fs');var Redis=require(_0x47a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x47a5('0x5'));var logger=require(_0x47a5('0x6'))(_0x47a5('0x7'));var config=require(_0x47a5('0x8'));var jayson=require(_0x47a5('0x9'));var client=jayson['client'][_0x47a5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x59199c,_0x343372,_0x30e405){return new BPromise(function(_0x506eda,_0x194fb0){return client['request'](_0x59199c,_0x30e405)['then'](function(_0x582352){logger[_0x47a5('0xb')](_0x47a5('0xc'),_0x343372,'request\x20sent');logger[_0x47a5('0xd')]('MailQueueReport,\x20%s,\x20%s,\x20%s',_0x343372,'request\x20sent',JSON[_0x47a5('0xe')](_0x582352));if(_0x582352[_0x47a5('0xf')]){if(_0x582352[_0x47a5('0xf')][_0x47a5('0x10')]===0x1f4){logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')]['message']);return _0x194fb0(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);return _0x506eda(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}else{logger['info'](_0x47a5('0xc'),_0x343372,_0x47a5('0x12'));_0x506eda(_0x582352[_0x47a5('0x13')][_0x47a5('0x11')]);}})[_0x47a5('0x14')](function(_0x574af6){logger['error'](_0x47a5('0xc'),_0x343372,_0x574af6);_0x194fb0(_0x574af6);});});}exports['CreateMailQueueReport']=function(_0x5247fd){var _0x423a81=this;return new Promise(function(_0xaf70a6,_0x2ce454){return db[_0x47a5('0x15')][_0x47a5('0x16')](_0x5247fd[_0x47a5('0x17')],{'raw':_0x5247fd[_0x47a5('0x18')]?_0x5247fd[_0x47a5('0x18')][_0x47a5('0x19')]===undefined?!![]:![]:!![]})['then'](function(_0x1570bc){logger[_0x47a5('0xb')]('CreateMailQueueReport',_0x5247fd);logger[_0x47a5('0xd')](_0x47a5('0x1a'),_0x5247fd,JSON[_0x47a5('0xe')](_0x1570bc));_0xaf70a6(_0x1570bc);})['catch'](function(_0xb8ae6c){logger[_0x47a5('0xf')](_0x47a5('0x1a'),_0xb8ae6c[_0x47a5('0x11')],_0x5247fd);_0x2ce454(_0x423a81['error'](0x1f4,_0xb8ae6c[_0x47a5('0x11')]));});});};exports[_0x47a5('0x1b')]=function(_0x513981){var _0x28747d=this;return new Promise(function(_0xc4cd63,_0x4437f1){return db[_0x47a5('0x15')][_0x47a5('0x1c')](_0x513981['body'],{'raw':_0x513981['options']?_0x513981[_0x47a5('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x513981[_0x47a5('0x18')]?_0x513981['options'][_0x47a5('0x1d')]||null:null,'attributes':_0x513981[_0x47a5('0x18')]?_0x513981[_0x47a5('0x18')][_0x47a5('0x1e')]||null:null,'limit':_0x513981[_0x47a5('0x18')]?_0x513981[_0x47a5('0x18')][_0x47a5('0x1f')]||null:null})[_0x47a5('0x20')](function(_0x16631f){logger[_0x47a5('0xb')](_0x47a5('0x1b'),_0x513981);logger[_0x47a5('0xd')](_0x47a5('0x1b'),_0x513981,JSON['stringify'](_0x16631f));_0xc4cd63(_0x16631f);})[_0x47a5('0x14')](function(_0x51833b){logger[_0x47a5('0xf')](_0x47a5('0x1b'),_0x51833b[_0x47a5('0x11')],_0x513981);_0x4437f1(_0x28747d['error'](0x1f4,_0x51833b[_0x47a5('0x11')]));});});};
\ No newline at end of file
index b282d11..7236670 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0713=['../../config/environment','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service'];(function(_0x1d7b87,_0x1da526){var _0x57e64d=function(_0x18060f){while(--_0x18060f){_0x1d7b87['push'](_0x1d7b87['shift']());}};_0x57e64d(++_0x1da526);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3071('0x0'));var timeout=require(_0x3071('0x1'));var express=require(_0x3071('0x2'));var router=express[_0x3071('0x3')]();var fs_extra=require(_0x3071('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));module[_0x3071('0x7')]=router;
\ No newline at end of file
+var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0x2ea9ea,_0x330ee5){var _0x58feae=function(_0x1a48b5){while(--_0x1a48b5){_0x2ea9ea['push'](_0x2ea9ea['shift']());}};_0x58feae(++_0x330ee5);}(_0x70e0,0x17b));var _0x070e=function(_0x3f3b7b,_0x3238d6){_0x3f3b7b=_0x3f3b7b-0x0;var _0x288802=_0x70e0[_0x3f3b7b];return _0x288802;};'use strict';var multer=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var path=require(_0x070e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x070e('0x3')]();var fs_extra=require(_0x070e('0x4'));var auth=require(_0x070e('0x5'));var interaction=require(_0x070e('0x6'));var config=require('../../config/environment');module[_0x070e('0x7')]=router;
\ No newline at end of file
index 9e8106d..4d0b423 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc38b=['sequelize','exports','STRING','BOOLEAN','INTEGER','INBOX'];(function(_0x6cef85,_0x3614e4){var _0x521f19=function(_0xb4398f){while(--_0xb4398f){_0x6cef85['push'](_0x6cef85['shift']());}};_0x521f19(++_0x3614e4);}(_0xc38b,0x192));var _0xbc38=function(_0x480801,_0x49d868){_0x480801=_0x480801-0x0;var _0x4d7c75=_0xc38b[_0x480801];return _0x4d7c75;};'use strict';var Sequelize=require(_0xbc38('0x0'));module[_0xbc38('0x1')]={'description':{'type':Sequelize[_0xbc38('0x2')]},'host':{'type':Sequelize['STRING']},'authentication':{'type':Sequelize[_0xbc38('0x3')],'defaultValue':!![]},'user':{'type':Sequelize[_0xbc38('0x2')]},'password':{'type':Sequelize[_0xbc38('0x2')]},'port':{'type':Sequelize[_0xbc38('0x4')]},'tls':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'mailbox':{'type':Sequelize[_0xbc38('0x2')],'defaultValue':_0xbc38('0x5')},'connTimeout':{'type':Sequelize[_0xbc38('0x4')],'defaultValue':0xa},'authTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x5},'service':{'type':Sequelize[_0xbc38('0x2')]},'modernAuthentication':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}};
\ No newline at end of file
+var _0x7262=['sequelize','exports','STRING','BOOLEAN','INTEGER'];(function(_0x46aff0,_0x122890){var _0x9d78cf=function(_0x3f14cb){while(--_0x3f14cb){_0x46aff0['push'](_0x46aff0['shift']());}};_0x9d78cf(++_0x122890);}(_0x7262,0x1cc));var _0x2726=function(_0x1c9a80,_0x32424f){_0x1c9a80=_0x1c9a80-0x0;var _0x3d98d6=_0x7262[_0x1c9a80];return _0x3d98d6;};'use strict';var Sequelize=require(_0x2726('0x0'));module[_0x2726('0x1')]={'description':{'type':Sequelize[_0x2726('0x2')]},'host':{'type':Sequelize[_0x2726('0x2')]},'authentication':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'user':{'type':Sequelize['STRING']},'password':{'type':Sequelize[_0x2726('0x2')]},'port':{'type':Sequelize['INTEGER']},'tls':{'type':Sequelize[_0x2726('0x3')],'defaultValue':!![]},'mailbox':{'type':Sequelize[_0x2726('0x2')],'defaultValue':'INBOX'},'connTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0xa},'authTimeout':{'type':Sequelize[_0x2726('0x4')],'defaultValue':0x5},'service':{'type':Sequelize[_0x2726('0x2')]},'modernAuthentication':{'type':Sequelize[_0x2726('0x3')],'defaultValue':![]}};
\ No newline at end of file
index 246b739..1bf52c6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf0bf=['../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','MailServerIn','mail_servers_in','util'];(function(_0x498b38,_0x2d9583){var _0x10feb7=function(_0x5a4949){while(--_0x5a4949){_0x498b38['push'](_0x498b38['shift']());}};_0x10feb7(++_0x2d9583);}(_0xf0bf,0x1f3));var _0xff0b=function(_0x59d0cc,_0xa7c52b){_0x59d0cc=_0x59d0cc-0x0;var _0x2ae79f=_0xf0bf[_0x59d0cc];return _0x2ae79f;};'use strict';var _=require('lodash');var util=require(_0xff0b('0x0'));var logger=require(_0xff0b('0x1'))(_0xff0b('0x2'));var moment=require('moment');var BPromise=require(_0xff0b('0x3'));var rp=require(_0xff0b('0x4'));var fs=require('fs');var path=require(_0xff0b('0x5'));var rimraf=require(_0xff0b('0x6'));var config=require(_0xff0b('0x7'));var attributes=require('./mailServerIn.attributes');module['exports']=function(_0x3c4ab4,_0x352252){return _0x3c4ab4['define'](_0xff0b('0x8'),attributes,{'tableName':_0xff0b('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x2b6a=['request-promise','./mailServerIn.attributes','exports','define','lodash','util','../../config/logger','api','moment'];(function(_0x49cc34,_0x1d978c){var _0x9e56eb=function(_0x45646a){while(--_0x45646a){_0x49cc34['push'](_0x49cc34['shift']());}};_0x9e56eb(++_0x1d978c);}(_0x2b6a,0x1c6));var _0xa2b6=function(_0x23ae30,_0x2c2eb2){_0x23ae30=_0x23ae30-0x0;var _0x34facd=_0x2b6a[_0x23ae30];return _0x34facd;};'use strict';var _=require(_0xa2b6('0x0'));var util=require(_0xa2b6('0x1'));var logger=require(_0xa2b6('0x2'))(_0xa2b6('0x3'));var moment=require(_0xa2b6('0x4'));var BPromise=require('bluebird');var rp=require(_0xa2b6('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xa2b6('0x6'));module[_0xa2b6('0x7')]=function(_0xf31814,_0x53abe1){return _0xf31814[_0xa2b6('0x8')]('MailServerIn',attributes,{'tableName':'mail_servers_in','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index a30a8db..f1e0d48 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbb35=['jayson/promise','client','http','info','MailServerIn,\x20%s,\x20%s','debug','MailServerIn,\x20%s,\x20%s,\x20%s','stringify','error','code','message','GetMailServerIn','options','raw','where','limit','include','map','model','attributes','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment'];(function(_0x1ff92d,_0x3bfdeb){var _0x129a98=function(_0x45a90b){while(--_0x45a90b){_0x1ff92d['push'](_0x1ff92d['shift']());}};_0x129a98(++_0x3bfdeb);}(_0xbb35,0x88));var _0x5bb3=function(_0xbfc9a7,_0x3ff6fb){_0xbfc9a7=_0xbfc9a7-0x0;var _0x1140e3=_0xbb35[_0xbfc9a7];return _0x1140e3;};'use strict';var _=require('lodash');var util=require(_0x5bb3('0x0'));var moment=require(_0x5bb3('0x1'));var BPromise=require(_0x5bb3('0x2'));var rs=require(_0x5bb3('0x3'));var fs=require('fs');var Redis=require(_0x5bb3('0x4'));var db=require(_0x5bb3('0x5'))['db'];var utils=require(_0x5bb3('0x6'));var logger=require(_0x5bb3('0x7'))('rpc');var config=require(_0x5bb3('0x8'));var jayson=require(_0x5bb3('0x9'));var client=jayson[_0x5bb3('0xa')][_0x5bb3('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x4e7ae3,_0x8af987,_0x1b5307){return new BPromise(function(_0x19d5e6,_0x53cb89){return client['request'](_0x4e7ae3,_0x1b5307)['then'](function(_0x501589){logger[_0x5bb3('0xc')](_0x5bb3('0xd'),_0x8af987,'request\x20sent');logger[_0x5bb3('0xe')](_0x5bb3('0xf'),_0x8af987,'request\x20sent',JSON[_0x5bb3('0x10')](_0x501589));if(_0x501589[_0x5bb3('0x11')]){if(_0x501589[_0x5bb3('0x11')][_0x5bb3('0x12')]===0x1f4){logger[_0x5bb3('0x11')](_0x5bb3('0xd'),_0x8af987,_0x501589[_0x5bb3('0x11')][_0x5bb3('0x13')]);return _0x53cb89(_0x501589[_0x5bb3('0x11')][_0x5bb3('0x13')]);}logger[_0x5bb3('0x11')](_0x5bb3('0xd'),_0x8af987,_0x501589[_0x5bb3('0x11')][_0x5bb3('0x13')]);return _0x19d5e6(_0x501589[_0x5bb3('0x11')][_0x5bb3('0x13')]);}else{logger[_0x5bb3('0xc')]('MailServerIn,\x20%s,\x20%s',_0x8af987,'request\x20sent');_0x19d5e6(_0x501589['result'][_0x5bb3('0x13')]);}})['catch'](function(_0x591c40){logger['error']('MailServerIn,\x20%s,\x20%s',_0x8af987,_0x591c40);_0x53cb89(_0x591c40);});});}exports[_0x5bb3('0x14')]=function(_0x27b88f){var _0x588ca7=this;return new Promise(function(_0x22547a,_0x3dee69){return db['MailServerIn']['findAll']({'raw':_0x27b88f['options']?_0x27b88f[_0x5bb3('0x15')][_0x5bb3('0x16')]===undefined?!![]:![]:!![],'where':_0x27b88f[_0x5bb3('0x15')]?_0x27b88f[_0x5bb3('0x15')][_0x5bb3('0x17')]||null:null,'attributes':_0x27b88f[_0x5bb3('0x15')]?_0x27b88f[_0x5bb3('0x15')]['attributes']||null:null,'limit':_0x27b88f['options']?_0x27b88f[_0x5bb3('0x15')][_0x5bb3('0x18')]||null:null,'include':_0x27b88f[_0x5bb3('0x15')]?_0x27b88f[_0x5bb3('0x15')][_0x5bb3('0x19')]?_[_0x5bb3('0x1a')](_0x27b88f['options'][_0x5bb3('0x19')],function(_0x5b99e1){return{'model':db[_0x5b99e1[_0x5bb3('0x1b')]],'as':_0x5b99e1['as'],'attributes':_0x5b99e1[_0x5bb3('0x1c')],'include':_0x5b99e1[_0x5bb3('0x19')]?_[_0x5bb3('0x1a')](_0x5b99e1[_0x5bb3('0x19')],function(_0x5ad827){return{'model':db[_0x5ad827[_0x5bb3('0x1b')]],'as':_0x5ad827['as'],'attributes':_0x5ad827['attributes'],'include':_0x5ad827[_0x5bb3('0x19')]?_['map'](_0x5ad827['include'],function(_0x4b0efb){return{'model':db[_0x4b0efb[_0x5bb3('0x1b')]],'as':_0x4b0efb['as'],'attributes':_0x4b0efb['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x2dc16f){logger[_0x5bb3('0xc')](_0x5bb3('0x14'),_0x27b88f);logger['debug'](_0x5bb3('0x14'),_0x27b88f,JSON['stringify'](_0x2dc16f));_0x22547a(_0x2dc16f);})['catch'](function(_0x38ced4){logger[_0x5bb3('0x11')](_0x5bb3('0x14'),_0x38ced4[_0x5bb3('0x13')],_0x27b88f);_0x3dee69(_0x588ca7[_0x5bb3('0x11')](0x1f4,_0x38ced4['message']));});});};
\ No newline at end of file
+var _0xb6b8=['result','catch','GetMailServerIn','MailServerIn','options','where','attributes','include','model','map','debug','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','request','then','info','MailServerIn,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','MailServerIn,\x20%s,\x20%s','message'];(function(_0x2dea24,_0x2fc021){var _0x309d58=function(_0x2eb89f){while(--_0x2eb89f){_0x2dea24['push'](_0x2dea24['shift']());}};_0x309d58(++_0x2fc021);}(_0xb6b8,0xc5));var _0x8b6b=function(_0x289a98,_0x4ecccd){_0x289a98=_0x289a98-0x0;var _0x862eb5=_0xb6b8[_0x289a98];return _0x862eb5;};'use strict';var _=require('lodash');var util=require(_0x8b6b('0x0'));var moment=require(_0x8b6b('0x1'));var BPromise=require(_0x8b6b('0x2'));var rs=require(_0x8b6b('0x3'));var fs=require('fs');var Redis=require(_0x8b6b('0x4'));var db=require(_0x8b6b('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x8b6b('0x6'))(_0x8b6b('0x7'));var config=require(_0x8b6b('0x8'));var jayson=require('jayson/promise');var client=jayson[_0x8b6b('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x56da2a,_0x21bbc2,_0x303c21){return new BPromise(function(_0x142239,_0x21c84e){return client[_0x8b6b('0xa')](_0x56da2a,_0x303c21)[_0x8b6b('0xb')](function(_0x1f2c39){logger[_0x8b6b('0xc')]('MailServerIn,\x20%s,\x20%s',_0x21bbc2,'request\x20sent');logger['debug'](_0x8b6b('0xd'),_0x21bbc2,_0x8b6b('0xe'),JSON[_0x8b6b('0xf')](_0x1f2c39));if(_0x1f2c39['error']){if(_0x1f2c39[_0x8b6b('0x10')][_0x8b6b('0x11')]===0x1f4){logger['error'](_0x8b6b('0x12'),_0x21bbc2,_0x1f2c39['error'][_0x8b6b('0x13')]);return _0x21c84e(_0x1f2c39[_0x8b6b('0x10')]['message']);}logger['error'](_0x8b6b('0x12'),_0x21bbc2,_0x1f2c39['error'][_0x8b6b('0x13')]);return _0x142239(_0x1f2c39[_0x8b6b('0x10')][_0x8b6b('0x13')]);}else{logger[_0x8b6b('0xc')](_0x8b6b('0x12'),_0x21bbc2,'request\x20sent');_0x142239(_0x1f2c39[_0x8b6b('0x14')][_0x8b6b('0x13')]);}})[_0x8b6b('0x15')](function(_0x2d16c7){logger[_0x8b6b('0x10')](_0x8b6b('0x12'),_0x21bbc2,_0x2d16c7);_0x21c84e(_0x2d16c7);});});}exports[_0x8b6b('0x16')]=function(_0x4ab006){var _0x3d15d1=this;return new Promise(function(_0x106b3f,_0x11e588){return db[_0x8b6b('0x17')]['findAll']({'raw':_0x4ab006[_0x8b6b('0x18')]?_0x4ab006[_0x8b6b('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x4ab006['options']?_0x4ab006[_0x8b6b('0x18')][_0x8b6b('0x19')]||null:null,'attributes':_0x4ab006[_0x8b6b('0x18')]?_0x4ab006['options'][_0x8b6b('0x1a')]||null:null,'limit':_0x4ab006[_0x8b6b('0x18')]?_0x4ab006[_0x8b6b('0x18')]['limit']||null:null,'include':_0x4ab006[_0x8b6b('0x18')]?_0x4ab006[_0x8b6b('0x18')][_0x8b6b('0x1b')]?_['map'](_0x4ab006['options'][_0x8b6b('0x1b')],function(_0x47df9e){return{'model':db[_0x47df9e[_0x8b6b('0x1c')]],'as':_0x47df9e['as'],'attributes':_0x47df9e['attributes'],'include':_0x47df9e[_0x8b6b('0x1b')]?_[_0x8b6b('0x1d')](_0x47df9e[_0x8b6b('0x1b')],function(_0x2753fc){return{'model':db[_0x2753fc[_0x8b6b('0x1c')]],'as':_0x2753fc['as'],'attributes':_0x2753fc['attributes'],'include':_0x2753fc['include']?_[_0x8b6b('0x1d')](_0x2753fc[_0x8b6b('0x1b')],function(_0x434631){return{'model':db[_0x434631[_0x8b6b('0x1c')]],'as':_0x434631['as'],'attributes':_0x434631[_0x8b6b('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x8b6b('0xb')](function(_0x4a6dae){logger['info'](_0x8b6b('0x16'),_0x4ab006);logger[_0x8b6b('0x1e')](_0x8b6b('0x16'),_0x4ab006,JSON[_0x8b6b('0xf')](_0x4a6dae));_0x106b3f(_0x4a6dae);})[_0x8b6b('0x15')](function(_0x157350){logger[_0x8b6b('0x10')](_0x8b6b('0x16'),_0x157350[_0x8b6b('0x13')],_0x4ab006);_0x11e588(_0x3d15d1['error'](0x1f4,_0x157350[_0x8b6b('0x13')]));});});};
\ No newline at end of file
index 363c89b..960db15 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9957=['multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./mailServerOut.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy','exports'];(function(_0x373dee,_0x1a8c45){var _0x46798f=function(_0xc389f0){while(--_0xc389f0){_0x373dee['push'](_0x373dee['shift']());}};_0x46798f(++_0x1a8c45);}(_0x9957,0x93));var _0x7995=function(_0xbca1b1,_0x33f0ce){_0xbca1b1=_0xbca1b1-0x0;var _0x4e1686=_0x9957[_0xbca1b1];return _0x4e1686;};'use strict';var multer=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var path=require(_0x7995('0x2'));var timeout=require(_0x7995('0x3'));var express=require('express');var router=express[_0x7995('0x4')]();var fs_extra=require(_0x7995('0x5'));var auth=require(_0x7995('0x6'));var interaction=require(_0x7995('0x7'));var config=require('../../config/environment');var controller=require(_0x7995('0x8'));router[_0x7995('0x9')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0xb')]);router[_0x7995('0x9')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0xd')]);router[_0x7995('0xe')]('/',auth['isAuthenticated'](),controller[_0x7995('0xf')]);router[_0x7995('0x10')](_0x7995('0xc'),auth[_0x7995('0xa')](),controller[_0x7995('0x11')]);router[_0x7995('0x12')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0x13')]);module[_0x7995('0x14')]=router;
\ No newline at end of file
+var _0x7a54=['index','/:id','isAuthenticated','post','delete','destroy','exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailServerOut.controller','get'];(function(_0x5b561d,_0x422b7c){var _0x431060=function(_0x401409){while(--_0x401409){_0x5b561d['push'](_0x5b561d['shift']());}};_0x431060(++_0x422b7c);}(_0x7a54,0x106));var _0x47a5=function(_0x2f6992,_0x565206){_0x2f6992=_0x2f6992-0x0;var _0x34c36a=_0x7a54[_0x2f6992];return _0x34c36a;};'use strict';var multer=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var path=require(_0x47a5('0x2'));var timeout=require('connect-timeout');var express=require(_0x47a5('0x3'));var router=express[_0x47a5('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x47a5('0x5'));var interaction=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var controller=require(_0x47a5('0x8'));router[_0x47a5('0x9')]('/',auth['isAuthenticated'](),controller[_0x47a5('0xa')]);router['get'](_0x47a5('0xb'),auth[_0x47a5('0xc')](),controller['show']);router[_0x47a5('0xd')]('/',auth['isAuthenticated'](),controller['create']);router['put'](_0x47a5('0xb'),auth[_0x47a5('0xc')](),controller['update']);router[_0x47a5('0xe')]('/:id',auth['isAuthenticated'](),controller[_0x47a5('0xf')]);module[_0x47a5('0x10')]=router;
\ No newline at end of file
index 35c5bdf..9a57ac7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x087b=['INTEGER','BOOLEAN','sequelize','exports','STRING'];(function(_0x2fc5ce,_0x177847){var _0xcb2f1=function(_0xc56076){while(--_0xc56076){_0x2fc5ce['push'](_0x2fc5ce['shift']());}};_0xcb2f1(++_0x177847);}(_0x087b,0x11a));var _0xb087=function(_0x47fd36,_0x41535d){_0x47fd36=_0x47fd36-0x0;var _0x21a0fc=_0x087b[_0x47fd36];return _0x21a0fc;};'use strict';var Sequelize=require(_0xb087('0x0'));module[_0xb087('0x1')]={'description':{'type':Sequelize['STRING']},'host':{'type':Sequelize['STRING']},'user':{'type':Sequelize[_0xb087('0x2')]},'pass':{'type':Sequelize['STRING']},'port':{'type':Sequelize[_0xb087('0x3')]},'secure':{'type':Sequelize[_0xb087('0x4')],'defaultValue':![]},'service':{'type':Sequelize[_0xb087('0x2')]},'authentication':{'type':Sequelize[_0xb087('0x4')],'defaultValue':!![]},'modernAuthentication':{'type':Sequelize[_0xb087('0x4')],'defaultValue':![]}};
\ No newline at end of file
+var _0xd4f4=['exports','STRING','INTEGER','BOOLEAN','sequelize'];(function(_0x3a53dd,_0x250708){var _0x1c1261=function(_0x2ff6cc){while(--_0x2ff6cc){_0x3a53dd['push'](_0x3a53dd['shift']());}};_0x1c1261(++_0x250708);}(_0xd4f4,0x8b));var _0x4d4f=function(_0x54355c,_0x4e7bfa){_0x54355c=_0x54355c-0x0;var _0x43ca41=_0xd4f4[_0x54355c];return _0x43ca41;};'use strict';var Sequelize=require(_0x4d4f('0x0'));module[_0x4d4f('0x1')]={'description':{'type':Sequelize[_0x4d4f('0x2')]},'host':{'type':Sequelize[_0x4d4f('0x2')]},'user':{'type':Sequelize[_0x4d4f('0x2')]},'pass':{'type':Sequelize[_0x4d4f('0x2')]},'port':{'type':Sequelize[_0x4d4f('0x3')]},'secure':{'type':Sequelize[_0x4d4f('0x4')],'defaultValue':![]},'service':{'type':Sequelize[_0x4d4f('0x2')]},'authentication':{'type':Sequelize[_0x4d4f('0x4')],'defaultValue':!![]},'modernAuthentication':{'type':Sequelize[_0x4d4f('0x4')],'defaultValue':![]}};
\ No newline at end of file
index 8d64140..a62db2f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6e4c=['stack','name','send','map','MailServerOut','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','VIRTUAL','includeAll','findAll','rows','catch','show','params','rawAttributes','include','merge','options','find','create','body','rimraf','zip-dir','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','count','limit','set','Content-Range','reject','save','update','then','destroy','error'];(function(_0x55aaff,_0x219ab0){var _0x58c67d=function(_0x583506){while(--_0x583506){_0x55aaff['push'](_0x55aaff['shift']());}};_0x58c67d(++_0x219ab0);}(_0x6e4c,0xbc));var _0xc6e4=function(_0x43bed9,_0x26adca){_0x43bed9=_0x43bed9-0x0;var _0x27b03d=_0x6e4c[_0x43bed9];return _0x27b03d;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xc6e4('0x0'));var zipdir=require(_0xc6e4('0x1'));var jsonpatch=require(_0xc6e4('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xc6e4('0x3'));var Mustache=require(_0xc6e4('0x4'));var util=require(_0xc6e4('0x5'));var path=require(_0xc6e4('0x6'));var sox=require(_0xc6e4('0x7'));var csv=require(_0xc6e4('0x8'));var ejs=require(_0xc6e4('0x9'));var fs=require('fs');var fs_extra=require(_0xc6e4('0xa'));var _=require('lodash');var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xc6e4('0xb'));var deskjs=require(_0xc6e4('0xc'));var toCsv=require(_0xc6e4('0x8'));var querystring=require(_0xc6e4('0xd'));var Papa=require(_0xc6e4('0xe'));var Redis=require(_0xc6e4('0xf'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xc6e4('0x10'));var hardwareService=require(_0xc6e4('0x11'));var logger=require(_0xc6e4('0x12'))(_0xc6e4('0x13'));var utils=require(_0xc6e4('0x14'));var config=require(_0xc6e4('0x15'));var licenseUtil=require(_0xc6e4('0x16'));var db=require(_0xc6e4('0x17'))['db'];function respondWithStatusCode(_0x3148c6,_0x20c10e){_0x20c10e=_0x20c10e||0xcc;return function(_0x274b82){if(_0x274b82){return _0x3148c6[_0xc6e4('0x18')](_0x20c10e);}return _0x3148c6['status'](_0x20c10e)[_0xc6e4('0x19')]();};}function respondWithResult(_0x3a3b37,_0x16cce){_0x16cce=_0x16cce||0xc8;return function(_0x433039){if(_0x433039){return _0x3a3b37[_0xc6e4('0x1a')](_0x16cce)[_0xc6e4('0x1b')](_0x433039);}};}function respondWithFilteredResult(_0x5aad01,_0x5134dc){return function(_0x4eebe3){if(_0x4eebe3){var _0x4b64aa=typeof _0x5134dc[_0xc6e4('0x1c')]===_0xc6e4('0x1d')&&typeof _0x5134dc['limit']===_0xc6e4('0x1d');var _0xa38827=_0x4eebe3[_0xc6e4('0x1e')];var _0x47d5a7=_0x4b64aa?0x0:_0x5134dc[_0xc6e4('0x1c')];var _0x1dbc1a=_0x4b64aa?_0x4eebe3[_0xc6e4('0x1e')]:_0x5134dc['offset']+_0x5134dc[_0xc6e4('0x1f')];var _0x2ec474;if(_0x1dbc1a>=_0xa38827){_0x1dbc1a=_0xa38827;_0x2ec474=0xc8;}else{_0x2ec474=0xce;}_0x5aad01[_0xc6e4('0x1a')](_0x2ec474);return _0x5aad01[_0xc6e4('0x20')](_0xc6e4('0x21'),_0x47d5a7+'-'+_0x1dbc1a+'/'+_0xa38827)['json'](_0x4eebe3);}return null;};}function patchUpdates(_0x2dab86){return function(_0x2b3c58){try{jsonpatch['apply'](_0x2b3c58,_0x2dab86,!![]);}catch(_0x5cfd68){return BPromise[_0xc6e4('0x22')](_0x5cfd68);}return _0x2b3c58[_0xc6e4('0x23')]();};}function saveUpdates(_0x123ef5,_0x2baef3){return function(_0x5515d3){if(_0x5515d3){return _0x5515d3[_0xc6e4('0x24')](_0x123ef5)[_0xc6e4('0x25')](function(_0x24ad53){return _0x24ad53;});}return null;};}function removeEntity(_0x1a0f01,_0x446610){return function(_0x11c6d5){if(_0x11c6d5){return _0x11c6d5[_0xc6e4('0x26')]()['then'](function(){_0x1a0f01['status'](0xcc)[_0xc6e4('0x19')]();});}};}function handleEntityNotFound(_0x5a6ee0,_0x2bf6fa){return function(_0x4e6b2b){if(!_0x4e6b2b){_0x5a6ee0['sendStatus'](0x194);}return _0x4e6b2b;};}function handleError(_0x1c6d56,_0x3b0d58){_0x3b0d58=_0x3b0d58||0x1f4;return function(_0x69c8b9){logger[_0xc6e4('0x27')](_0x69c8b9[_0xc6e4('0x28')]);if(_0x69c8b9[_0xc6e4('0x29')]){delete _0x69c8b9[_0xc6e4('0x29')];}_0x1c6d56['status'](_0x3b0d58)[_0xc6e4('0x2a')](_0x69c8b9);};}exports['index']=function(_0x124aa9,_0x2afd7b){var _0x21930e={},_0x1a8c12={},_0x3b5ea3={'count':0x0,'rows':[]};var _0x2b3a01=_[_0xc6e4('0x2b')](db[_0xc6e4('0x2c')]['rawAttributes'],function(_0x51040a){return{'name':_0x51040a[_0xc6e4('0x2d')],'type':_0x51040a[_0xc6e4('0x2e')][_0xc6e4('0x2f')]};});_0x1a8c12[_0xc6e4('0x30')]=_[_0xc6e4('0x2b')](_0x2b3a01,_0xc6e4('0x29'));_0x1a8c12[_0xc6e4('0x31')]=_[_0xc6e4('0x32')](_0x124aa9[_0xc6e4('0x31')]);_0x1a8c12[_0xc6e4('0x33')]=_[_0xc6e4('0x34')](_0x1a8c12[_0xc6e4('0x30')],_0x1a8c12[_0xc6e4('0x31')]);_0x21930e[_0xc6e4('0x35')]=_[_0xc6e4('0x34')](_0x1a8c12['model'],qs[_0xc6e4('0x36')](_0x124aa9[_0xc6e4('0x31')]['fields']));_0x21930e[_0xc6e4('0x35')]=_0x21930e[_0xc6e4('0x35')][_0xc6e4('0x37')]?_0x21930e[_0xc6e4('0x35')]:_0x1a8c12[_0xc6e4('0x30')];if(!_0x124aa9[_0xc6e4('0x31')][_0xc6e4('0x38')](_0xc6e4('0x39'))){_0x21930e[_0xc6e4('0x1f')]=qs[_0xc6e4('0x1f')](_0x124aa9[_0xc6e4('0x31')][_0xc6e4('0x1f')]);_0x21930e[_0xc6e4('0x1c')]=qs[_0xc6e4('0x1c')](_0x124aa9[_0xc6e4('0x31')][_0xc6e4('0x1c')]);}_0x21930e[_0xc6e4('0x3a')]=qs[_0xc6e4('0x3b')](_0x124aa9[_0xc6e4('0x31')][_0xc6e4('0x3b')]);_0x21930e[_0xc6e4('0x3c')]=qs['filters'](_['pick'](_0x124aa9[_0xc6e4('0x31')],_0x1a8c12[_0xc6e4('0x33')]),_0x2b3a01);if(_0x124aa9[_0xc6e4('0x31')][_0xc6e4('0x3d')]){_0x21930e[_0xc6e4('0x3c')]=_['merge'](_0x21930e[_0xc6e4('0x3c')],{'$or':_[_0xc6e4('0x2b')](_0x2b3a01,function(_0xd06c05){if(_0xd06c05['type']!==_0xc6e4('0x3e')){var _0xc76079={};_0xc76079[_0xd06c05[_0xc6e4('0x29')]]={'$like':'%'+_0x124aa9[_0xc6e4('0x31')][_0xc6e4('0x3d')]+'%'};return _0xc76079;}})});}_0x21930e=_['merge']({},_0x21930e,_0x124aa9['options']);var _0x1c49a3={'where':_0x21930e[_0xc6e4('0x3c')]};return db['MailServerOut']['count'](_0x1c49a3)[_0xc6e4('0x25')](function(_0x80e14e){_0x3b5ea3[_0xc6e4('0x1e')]=_0x80e14e;if(_0x124aa9[_0xc6e4('0x31')][_0xc6e4('0x3f')]){_0x21930e['include']=[{'all':!![]}];}return db[_0xc6e4('0x2c')][_0xc6e4('0x40')](_0x21930e);})[_0xc6e4('0x25')](function(_0x44b2a7){_0x3b5ea3[_0xc6e4('0x41')]=_0x44b2a7;return _0x3b5ea3;})[_0xc6e4('0x25')](respondWithFilteredResult(_0x2afd7b,_0x21930e))[_0xc6e4('0x42')](handleError(_0x2afd7b,null));};exports[_0xc6e4('0x43')]=function(_0x3df2c3,_0x4d5c98){var _0x34aec4={'raw':!![],'where':{'id':_0x3df2c3[_0xc6e4('0x44')]['id']}},_0xb5dd6c={};_0xb5dd6c[_0xc6e4('0x30')]=_[_0xc6e4('0x32')](db['MailServerOut'][_0xc6e4('0x45')]);_0xb5dd6c[_0xc6e4('0x31')]=_[_0xc6e4('0x32')](_0x3df2c3[_0xc6e4('0x31')]);_0xb5dd6c[_0xc6e4('0x33')]=_[_0xc6e4('0x34')](_0xb5dd6c[_0xc6e4('0x30')],_0xb5dd6c[_0xc6e4('0x31')]);_0x34aec4[_0xc6e4('0x35')]=_['intersection'](_0xb5dd6c['model'],qs['fields'](_0x3df2c3[_0xc6e4('0x31')][_0xc6e4('0x36')]));_0x34aec4[_0xc6e4('0x35')]=_0x34aec4[_0xc6e4('0x35')][_0xc6e4('0x37')]?_0x34aec4[_0xc6e4('0x35')]:_0xb5dd6c[_0xc6e4('0x30')];if(_0x3df2c3[_0xc6e4('0x31')][_0xc6e4('0x3f')]){_0x34aec4[_0xc6e4('0x46')]=[{'all':!![]}];}_0x34aec4=_[_0xc6e4('0x47')]({},_0x34aec4,_0x3df2c3[_0xc6e4('0x48')]);return db['MailServerOut'][_0xc6e4('0x49')](_0x34aec4)[_0xc6e4('0x25')](handleEntityNotFound(_0x4d5c98,null))[_0xc6e4('0x25')](respondWithResult(_0x4d5c98,null))[_0xc6e4('0x42')](handleError(_0x4d5c98,null));};exports['create']=function(_0x1d277e,_0x30f872){return db[_0xc6e4('0x2c')][_0xc6e4('0x4a')](_0x1d277e[_0xc6e4('0x4b')],{})[_0xc6e4('0x25')](respondWithResult(_0x30f872,0xc9))['catch'](handleError(_0x30f872,null));};exports[_0xc6e4('0x24')]=function(_0x53c96f,_0x43206c){if(_0x53c96f[_0xc6e4('0x4b')]['id']){delete _0x53c96f['body']['id'];}return db[_0xc6e4('0x2c')][_0xc6e4('0x49')]({'where':{'id':_0x53c96f['params']['id']}})[_0xc6e4('0x25')](handleEntityNotFound(_0x43206c,null))['then'](saveUpdates(_0x53c96f[_0xc6e4('0x4b')],null))['then'](respondWithResult(_0x43206c,null))['catch'](handleError(_0x43206c,null));};exports[_0xc6e4('0x26')]=function(_0x44c8ce,_0x30345e){return db[_0xc6e4('0x2c')][_0xc6e4('0x49')]({'where':{'id':_0x44c8ce[_0xc6e4('0x44')]['id']}})[_0xc6e4('0x25')](handleEntityNotFound(_0x30345e,null))[_0xc6e4('0x25')](removeEntity(_0x30345e,null))[_0xc6e4('0x42')](handleError(_0x30345e,null));};
\ No newline at end of file
+var _0xa117=['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','end','json','offset','undefined','limit','count','Content-Range','reject','save','update','then','stack','name','send','index','MailServerOut','fieldName','type','key','keys','query','filters','model','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','map','VIRTUAL','options','include','findAll','rows','catch','rawAttributes','includeAll','create','body','params','destroy','find','zip-dir','request-promise','moment','bluebird','mustache','util','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','papaparse'];(function(_0x560b93,_0x2d05fc){var _0x1d7bbb=function(_0x54003f){while(--_0x54003f){_0x560b93['push'](_0x560b93['shift']());}};_0x1d7bbb(++_0x2d05fc);}(_0xa117,0x122));var _0x7a11=function(_0x471102,_0x5518cb){_0x471102=_0x471102-0x0;var _0x57b492=_0xa117[_0x471102];return _0x57b492;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x7a11('0x0'));var jsonpatch=require('fast-json-patch');var rp=require(_0x7a11('0x1'));var moment=require(_0x7a11('0x2'));var BPromise=require(_0x7a11('0x3'));var Mustache=require(_0x7a11('0x4'));var util=require(_0x7a11('0x5'));var path=require('path');var sox=require('sox');var csv=require(_0x7a11('0x6'));var ejs=require(_0x7a11('0x7'));var fs=require('fs');var fs_extra=require(_0x7a11('0x8'));var _=require(_0x7a11('0x9'));var squel=require(_0x7a11('0xa'));var crypto=require(_0x7a11('0xb'));var jsforce=require(_0x7a11('0xc'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x7a11('0xd'));var Redis=require(_0x7a11('0xe'));var authService=require(_0x7a11('0xf'));var qs=require(_0x7a11('0x10'));var as=require(_0x7a11('0x11'));var hardwareService=require(_0x7a11('0x12'));var logger=require(_0x7a11('0x13'))(_0x7a11('0x14'));var utils=require(_0x7a11('0x15'));var config=require(_0x7a11('0x16'));var licenseUtil=require(_0x7a11('0x17'));var db=require(_0x7a11('0x18'))['db'];function respondWithStatusCode(_0x15fc5b,_0x1e0821){_0x1e0821=_0x1e0821||0xcc;return function(_0x1435cf){if(_0x1435cf){return _0x15fc5b[_0x7a11('0x19')](_0x1e0821);}return _0x15fc5b[_0x7a11('0x1a')](_0x1e0821)[_0x7a11('0x1b')]();};}function respondWithResult(_0x2bd62a,_0x1a8171){_0x1a8171=_0x1a8171||0xc8;return function(_0x2faed6){if(_0x2faed6){return _0x2bd62a[_0x7a11('0x1a')](_0x1a8171)[_0x7a11('0x1c')](_0x2faed6);}};}function respondWithFilteredResult(_0x2a2847,_0x479e4d){return function(_0x2bc8e9){if(_0x2bc8e9){var _0x126c78=typeof _0x479e4d[_0x7a11('0x1d')]===_0x7a11('0x1e')&&typeof _0x479e4d[_0x7a11('0x1f')]==='undefined';var _0x1a957b=_0x2bc8e9[_0x7a11('0x20')];var _0x84ff11=_0x126c78?0x0:_0x479e4d['offset'];var _0x22f035=_0x126c78?_0x2bc8e9['count']:_0x479e4d[_0x7a11('0x1d')]+_0x479e4d[_0x7a11('0x1f')];var _0x5e0225;if(_0x22f035>=_0x1a957b){_0x22f035=_0x1a957b;_0x5e0225=0xc8;}else{_0x5e0225=0xce;}_0x2a2847[_0x7a11('0x1a')](_0x5e0225);return _0x2a2847['set'](_0x7a11('0x21'),_0x84ff11+'-'+_0x22f035+'/'+_0x1a957b)[_0x7a11('0x1c')](_0x2bc8e9);}return null;};}function patchUpdates(_0x39023d){return function(_0x11080a){try{jsonpatch['apply'](_0x11080a,_0x39023d,!![]);}catch(_0x43a88b){return BPromise[_0x7a11('0x22')](_0x43a88b);}return _0x11080a[_0x7a11('0x23')]();};}function saveUpdates(_0x2d73a9,_0x22aaed){return function(_0x17b5d2){if(_0x17b5d2){return _0x17b5d2[_0x7a11('0x24')](_0x2d73a9)[_0x7a11('0x25')](function(_0x4ff659){return _0x4ff659;});}return null;};}function removeEntity(_0x356411,_0x49a8fd){return function(_0x367af9){if(_0x367af9){return _0x367af9['destroy']()['then'](function(){_0x356411[_0x7a11('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1dff34,_0x4b0bb6){return function(_0x3f04ce){if(!_0x3f04ce){_0x1dff34[_0x7a11('0x19')](0x194);}return _0x3f04ce;};}function handleError(_0x29f6e6,_0x1e32ca){_0x1e32ca=_0x1e32ca||0x1f4;return function(_0x458712){logger['error'](_0x458712[_0x7a11('0x26')]);if(_0x458712[_0x7a11('0x27')]){delete _0x458712[_0x7a11('0x27')];}_0x29f6e6['status'](_0x1e32ca)[_0x7a11('0x28')](_0x458712);};}exports[_0x7a11('0x29')]=function(_0x1c34e8,_0x4e3a6d){var _0x404474={},_0x5ac061={},_0x11410d={'count':0x0,'rows':[]};var _0x537e17=_['map'](db[_0x7a11('0x2a')]['rawAttributes'],function(_0x2e9795){return{'name':_0x2e9795[_0x7a11('0x2b')],'type':_0x2e9795[_0x7a11('0x2c')][_0x7a11('0x2d')]};});_0x5ac061['model']=_['map'](_0x537e17,'name');_0x5ac061['query']=_[_0x7a11('0x2e')](_0x1c34e8[_0x7a11('0x2f')]);_0x5ac061[_0x7a11('0x30')]=_['intersection'](_0x5ac061[_0x7a11('0x31')],_0x5ac061[_0x7a11('0x2f')]);_0x404474['attributes']=_[_0x7a11('0x32')](_0x5ac061[_0x7a11('0x31')],qs['fields'](_0x1c34e8[_0x7a11('0x2f')][_0x7a11('0x33')]));_0x404474['attributes']=_0x404474[_0x7a11('0x34')][_0x7a11('0x35')]?_0x404474[_0x7a11('0x34')]:_0x5ac061[_0x7a11('0x31')];if(!_0x1c34e8[_0x7a11('0x2f')][_0x7a11('0x36')](_0x7a11('0x37'))){_0x404474['limit']=qs[_0x7a11('0x1f')](_0x1c34e8['query'][_0x7a11('0x1f')]);_0x404474['offset']=qs[_0x7a11('0x1d')](_0x1c34e8[_0x7a11('0x2f')][_0x7a11('0x1d')]);}_0x404474[_0x7a11('0x38')]=qs['sort'](_0x1c34e8[_0x7a11('0x2f')][_0x7a11('0x39')]);_0x404474['where']=qs[_0x7a11('0x30')](_[_0x7a11('0x3a')](_0x1c34e8[_0x7a11('0x2f')],_0x5ac061[_0x7a11('0x30')]),_0x537e17);if(_0x1c34e8['query'][_0x7a11('0x3b')]){_0x404474[_0x7a11('0x3c')]=_[_0x7a11('0x3d')](_0x404474['where'],{'$or':_[_0x7a11('0x3e')](_0x537e17,function(_0x4583c4){if(_0x4583c4[_0x7a11('0x2c')]!==_0x7a11('0x3f')){var _0x14f8ac={};_0x14f8ac[_0x4583c4[_0x7a11('0x27')]]={'$like':'%'+_0x1c34e8[_0x7a11('0x2f')][_0x7a11('0x3b')]+'%'};return _0x14f8ac;}})});}_0x404474=_[_0x7a11('0x3d')]({},_0x404474,_0x1c34e8[_0x7a11('0x40')]);var _0x3afe78={'where':_0x404474[_0x7a11('0x3c')]};return db['MailServerOut'][_0x7a11('0x20')](_0x3afe78)[_0x7a11('0x25')](function(_0x1ce160){_0x11410d[_0x7a11('0x20')]=_0x1ce160;if(_0x1c34e8[_0x7a11('0x2f')]['includeAll']){_0x404474[_0x7a11('0x41')]=[{'all':!![]}];}return db[_0x7a11('0x2a')][_0x7a11('0x42')](_0x404474);})[_0x7a11('0x25')](function(_0x5ababc){_0x11410d[_0x7a11('0x43')]=_0x5ababc;return _0x11410d;})[_0x7a11('0x25')](respondWithFilteredResult(_0x4e3a6d,_0x404474))[_0x7a11('0x44')](handleError(_0x4e3a6d,null));};exports['show']=function(_0x544547,_0x36302c){var _0x27946a={'raw':!![],'where':{'id':_0x544547['params']['id']}},_0x139ca0={};_0x139ca0['model']=_['keys'](db[_0x7a11('0x2a')][_0x7a11('0x45')]);_0x139ca0[_0x7a11('0x2f')]=_[_0x7a11('0x2e')](_0x544547[_0x7a11('0x2f')]);_0x139ca0['filters']=_[_0x7a11('0x32')](_0x139ca0['model'],_0x139ca0[_0x7a11('0x2f')]);_0x27946a[_0x7a11('0x34')]=_['intersection'](_0x139ca0[_0x7a11('0x31')],qs[_0x7a11('0x33')](_0x544547[_0x7a11('0x2f')][_0x7a11('0x33')]));_0x27946a[_0x7a11('0x34')]=_0x27946a[_0x7a11('0x34')][_0x7a11('0x35')]?_0x27946a[_0x7a11('0x34')]:_0x139ca0[_0x7a11('0x31')];if(_0x544547[_0x7a11('0x2f')][_0x7a11('0x46')]){_0x27946a[_0x7a11('0x41')]=[{'all':!![]}];}_0x27946a=_[_0x7a11('0x3d')]({},_0x27946a,_0x544547[_0x7a11('0x40')]);return db[_0x7a11('0x2a')]['find'](_0x27946a)[_0x7a11('0x25')](handleEntityNotFound(_0x36302c,null))[_0x7a11('0x25')](respondWithResult(_0x36302c,null))[_0x7a11('0x44')](handleError(_0x36302c,null));};exports[_0x7a11('0x47')]=function(_0x22a7b0,_0x28cde7){return db[_0x7a11('0x2a')][_0x7a11('0x47')](_0x22a7b0[_0x7a11('0x48')],{})['then'](respondWithResult(_0x28cde7,0xc9))[_0x7a11('0x44')](handleError(_0x28cde7,null));};exports['update']=function(_0x1d9dd9,_0x15922f){if(_0x1d9dd9['body']['id']){delete _0x1d9dd9[_0x7a11('0x48')]['id'];}return db['MailServerOut']['find']({'where':{'id':_0x1d9dd9[_0x7a11('0x49')]['id']}})['then'](handleEntityNotFound(_0x15922f,null))[_0x7a11('0x25')](saveUpdates(_0x1d9dd9[_0x7a11('0x48')],null))[_0x7a11('0x25')](respondWithResult(_0x15922f,null))[_0x7a11('0x44')](handleError(_0x15922f,null));};exports[_0x7a11('0x4a')]=function(_0x2f8ffc,_0x51ffa3){return db[_0x7a11('0x2a')][_0x7a11('0x4b')]({'where':{'id':_0x2f8ffc[_0x7a11('0x49')]['id']}})[_0x7a11('0x25')](handleEntityNotFound(_0x51ffa3,null))[_0x7a11('0x25')](removeEntity(_0x51ffa3,null))['catch'](handleError(_0x51ffa3,null));};
\ No newline at end of file
index 70cc083..1dcd9b2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbc90=['mail_servers_out','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','exports','define','MailServerOut'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xbc90,0x1d5));var _0x0bc9=function(_0x1ccdf7,_0x215d5a){_0x1ccdf7=_0x1ccdf7-0x0;var _0x52a0ae=_0xbc90[_0x1ccdf7];return _0x52a0ae;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x0bc9('0x0'))(_0x0bc9('0x1'));var moment=require(_0x0bc9('0x2'));var BPromise=require(_0x0bc9('0x3'));var rp=require(_0x0bc9('0x4'));var fs=require('fs');var path=require(_0x0bc9('0x5'));var rimraf=require(_0x0bc9('0x6'));var config=require(_0x0bc9('0x7'));var attributes=require('./mailServerOut.attributes');module[_0x0bc9('0x8')]=function(_0x4a5dd9,_0x2b1b74){return _0x4a5dd9[_0x0bc9('0x9')](_0x0bc9('0xa'),attributes,{'tableName':_0x0bc9('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xb4cd=['MailServerOut','mail_servers_out','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./mailServerOut.attributes','exports'];(function(_0x17dc7d,_0x107272){var _0x4fd0c2=function(_0x36723f){while(--_0x36723f){_0x17dc7d['push'](_0x17dc7d['shift']());}};_0x4fd0c2(++_0x107272);}(_0xb4cd,0x86));var _0xdb4c=function(_0x54ff06,_0x416580){_0x54ff06=_0x54ff06-0x0;var _0x26c033=_0xb4cd[_0x54ff06];return _0x26c033;};'use strict';var _=require(_0xdb4c('0x0'));var util=require('util');var logger=require(_0xdb4c('0x1'))(_0xdb4c('0x2'));var moment=require(_0xdb4c('0x3'));var BPromise=require(_0xdb4c('0x4'));var rp=require(_0xdb4c('0x5'));var fs=require('fs');var path=require(_0xdb4c('0x6'));var rimraf=require(_0xdb4c('0x7'));var config=require('../../config/environment');var attributes=require(_0xdb4c('0x8'));module[_0xdb4c('0x9')]=function(_0x1e3f6d,_0x182af3){return _0x1e3f6d['define'](_0xdb4c('0xa'),attributes,{'tableName':_0xdb4c('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index b85844a..7f94310 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc4aa=['moment','bluebird','randomstring','ioredis','rpc','../../config/environment','jayson/promise','client','http','request','then','MailServerOut,\x20%s,\x20%s','request\x20sent','debug','error','code','message','info','catch','lodash','util'];(function(_0x1a0e4d,_0x477e6f){var _0x302af1=function(_0x412821){while(--_0x412821){_0x1a0e4d['push'](_0x1a0e4d['shift']());}};_0x302af1(++_0x477e6f);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x17b6e3,_0x4522ed){_0x17b6e3=_0x17b6e3-0x0;var _0x3906f3=_0xc4aa[_0x17b6e3];return _0x3906f3;};'use strict';var _=require(_0xac4a('0x0'));var util=require(_0xac4a('0x1'));var moment=require(_0xac4a('0x2'));var BPromise=require(_0xac4a('0x3'));var rs=require(_0xac4a('0x4'));var fs=require('fs');var Redis=require(_0xac4a('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xac4a('0x6'));var config=require(_0xac4a('0x7'));var jayson=require(_0xac4a('0x8'));var client=jayson[_0xac4a('0x9')][_0xac4a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x15cd34,_0x3ef77c,_0x10525b){return new BPromise(function(_0x5c6179,_0x5b8339){return client[_0xac4a('0xb')](_0x15cd34,_0x10525b)[_0xac4a('0xc')](function(_0x26ec84){logger['info'](_0xac4a('0xd'),_0x3ef77c,_0xac4a('0xe'));logger[_0xac4a('0xf')]('MailServerOut,\x20%s,\x20%s,\x20%s',_0x3ef77c,_0xac4a('0xe'),JSON['stringify'](_0x26ec84));if(_0x26ec84[_0xac4a('0x10')]){if(_0x26ec84['error'][_0xac4a('0x11')]===0x1f4){logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x26ec84['error'][_0xac4a('0x12')]);return _0x5b8339(_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);}logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);return _0x5c6179(_0x26ec84[_0xac4a('0x10')][_0xac4a('0x12')]);}else{logger[_0xac4a('0x13')](_0xac4a('0xd'),_0x3ef77c,_0xac4a('0xe'));_0x5c6179(_0x26ec84['result'][_0xac4a('0x12')]);}})[_0xac4a('0x14')](function(_0x23eb66){logger[_0xac4a('0x10')](_0xac4a('0xd'),_0x3ef77c,_0x23eb66);_0x5b8339(_0x23eb66);});});}
\ No newline at end of file
+var _0xadb5=['error','code','message','result','catch','util','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','MailServerOut,\x20%s,\x20%s','request\x20sent','stringify'];(function(_0x30f910,_0x8e3a23){var _0x836515=function(_0x1742eb){while(--_0x1742eb){_0x30f910['push'](_0x30f910['shift']());}};_0x836515(++_0x8e3a23);}(_0xadb5,0xad));var _0x5adb=function(_0x4a71ad,_0x148ba4){_0x4a71ad=_0x4a71ad-0x0;var _0x2402f9=_0xadb5[_0x4a71ad];return _0x2402f9;};'use strict';var _=require('lodash');var util=require(_0x5adb('0x0'));var moment=require('moment');var BPromise=require(_0x5adb('0x1'));var rs=require(_0x5adb('0x2'));var fs=require('fs');var Redis=require(_0x5adb('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x5adb('0x4'));var logger=require(_0x5adb('0x5'))(_0x5adb('0x6'));var config=require('../../config/environment');var jayson=require(_0x5adb('0x7'));var client=jayson[_0x5adb('0x8')][_0x5adb('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x3213e8,_0xdf3776,_0x353885){return new BPromise(function(_0x47228a,_0x6d1b45){return client[_0x5adb('0xa')](_0x3213e8,_0x353885)[_0x5adb('0xb')](function(_0x34f59d){logger[_0x5adb('0xc')](_0x5adb('0xd'),_0xdf3776,_0x5adb('0xe'));logger['debug']('MailServerOut,\x20%s,\x20%s,\x20%s',_0xdf3776,_0x5adb('0xe'),JSON[_0x5adb('0xf')](_0x34f59d));if(_0x34f59d[_0x5adb('0x10')]){if(_0x34f59d['error'][_0x5adb('0x11')]===0x1f4){logger['error'](_0x5adb('0xd'),_0xdf3776,_0x34f59d['error'][_0x5adb('0x12')]);return _0x6d1b45(_0x34f59d[_0x5adb('0x10')][_0x5adb('0x12')]);}logger['error'](_0x5adb('0xd'),_0xdf3776,_0x34f59d[_0x5adb('0x10')][_0x5adb('0x12')]);return _0x47228a(_0x34f59d['error'][_0x5adb('0x12')]);}else{logger['info'](_0x5adb('0xd'),_0xdf3776,_0x5adb('0xe'));_0x47228a(_0x34f59d[_0x5adb('0x13')][_0x5adb('0x12')]);}})[_0x5adb('0x14')](function(_0x39d24d){logger[_0x5adb('0x10')](_0x5adb('0xd'),_0xdf3776,_0x39d24d);_0x6d1b45(_0x39d24d);});});}
\ No newline at end of file
index 17532af..0f908a7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaedc=['/describe','/:id','show','post','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./mailSubstatus.controller','get','isAuthenticated','index'];(function(_0x52a768,_0x44b395){var _0x2059d9=function(_0x224093){while(--_0x224093){_0x52a768['push'](_0x52a768['shift']());}};_0x2059d9(++_0x44b395);}(_0xaedc,0xfa));var _0xcaed=function(_0x4b1dcd,_0x24091c){_0x4b1dcd=_0x4b1dcd-0x0;var _0x4038bb=_0xaedc[_0x4b1dcd];return _0x4038bb;};'use strict';var multer=require(_0xcaed('0x0'));var util=require(_0xcaed('0x1'));var path=require(_0xcaed('0x2'));var timeout=require(_0xcaed('0x3'));var express=require(_0xcaed('0x4'));var router=express[_0xcaed('0x5')]();var fs_extra=require(_0xcaed('0x6'));var auth=require(_0xcaed('0x7'));var interaction=require(_0xcaed('0x8'));var config=require(_0xcaed('0x9'));var controller=require(_0xcaed('0xa'));router[_0xcaed('0xb')]('/',auth[_0xcaed('0xc')](),controller[_0xcaed('0xd')]);router[_0xcaed('0xb')](_0xcaed('0xe'),auth[_0xcaed('0xc')](),controller['describe']);router['get'](_0xcaed('0xf'),auth[_0xcaed('0xc')](),controller[_0xcaed('0x10')]);router[_0xcaed('0x11')]('/',auth[_0xcaed('0xc')](),controller[_0xcaed('0x12')]);router[_0xcaed('0x13')]('/:id',auth[_0xcaed('0xc')](),controller[_0xcaed('0x14')]);router[_0xcaed('0x15')]('/:id',auth[_0xcaed('0xc')](),controller[_0xcaed('0x16')]);module[_0xcaed('0x17')]=router;
\ No newline at end of file
+var _0x5899=['./mailSubstatus.controller','get','isAuthenticated','index','/describe','describe','/:id','delete','destroy','exports','multer','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x80d9f4,_0x34882b){var _0x1f78f1=function(_0x45db65){while(--_0x45db65){_0x80d9f4['push'](_0x80d9f4['shift']());}};_0x1f78f1(++_0x34882b);}(_0x5899,0xb4));var _0x9589=function(_0x38c897,_0x250282){_0x38c897=_0x38c897-0x0;var _0x382b25=_0x5899[_0x38c897];return _0x382b25;};'use strict';var multer=require(_0x9589('0x0'));var util=require('util');var path=require(_0x9589('0x1'));var timeout=require(_0x9589('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x9589('0x3'));var auth=require(_0x9589('0x4'));var interaction=require(_0x9589('0x5'));var config=require(_0x9589('0x6'));var controller=require(_0x9589('0x7'));router[_0x9589('0x8')]('/',auth[_0x9589('0x9')](),controller[_0x9589('0xa')]);router[_0x9589('0x8')](_0x9589('0xb'),auth[_0x9589('0x9')](),controller[_0x9589('0xc')]);router['get'](_0x9589('0xd'),auth['isAuthenticated'](),controller['show']);router['post']('/',auth[_0x9589('0x9')](),controller['create']);router['put']('/:id',auth[_0x9589('0x9')](),controller['update']);router[_0x9589('0xe')](_0x9589('0xd'),auth['isAuthenticated'](),controller[_0x9589('0xf')]);module[_0x9589('0x10')]=router;
\ No newline at end of file
index 4413cdc..d3d83a1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x687b=['STRING','name','sequelize','exports'];(function(_0x3b79c4,_0x25f59d){var _0xb7fc89=function(_0x2b24ee){while(--_0x2b24ee){_0x3b79c4['push'](_0x3b79c4['shift']());}};_0xb7fc89(++_0x25f59d);}(_0x687b,0x14a));var _0xb687=function(_0x55cf9d,_0x2795b3){_0x55cf9d=_0x55cf9d-0x0;var _0x2fd425=_0x687b[_0x55cf9d];return _0x2fd425;};'use strict';var Sequelize=require(_0xb687('0x0'));module[_0xb687('0x1')]={'name':{'type':Sequelize[_0xb687('0x2')],'unique':_0xb687('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xeae8=['sequelize','exports','STRING'];(function(_0x27d402,_0x26a705){var _0x383012=function(_0x3b406f){while(--_0x3b406f){_0x27d402['push'](_0x27d402['shift']());}};_0x383012(++_0x26a705);}(_0xeae8,0x66));var _0x8eae=function(_0x22e162,_0x44ab53){_0x22e162=_0x22e162-0x0;var _0x1db28e=_0xeae8[_0x22e162];return _0x1db28e;};'use strict';var Sequelize=require(_0x8eae('0x0'));module[_0x8eae('0x1')]={'name':{'type':Sequelize[_0x8eae('0x2')],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0x8eae('0x2')]}};
\ No newline at end of file
index b676404..ff52d35 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xce6a=['hasOwnProperty','nolimit','order','sort','pick','filter','merge','where','type','VIRTUAL','options','includeAll','findAll','rows','catch','show','params','keys','include','find','create','body','destroy','describe','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','to-csv','fs-extra','lodash','jsforce','desk.js','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','stack','name','send','index','map','MailSubstatus','rawAttributes','key','query','filters','intersection','model','attributes','fields','length'];(function(_0x962cfd,_0x1dc549){var _0x389071=function(_0x23efc7){while(--_0x23efc7){_0x962cfd['push'](_0x962cfd['shift']());}};_0x389071(++_0x1dc549);}(_0xce6a,0x1c8));var _0xace6=function(_0xfb3645,_0xcfe2c5){_0xfb3645=_0xfb3645-0x0;var _0x36aef8=_0xce6a[_0xfb3645];return _0x36aef8;};'use strict';var emlformat=require(_0xace6('0x0'));var rimraf=require(_0xace6('0x1'));var zipdir=require(_0xace6('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xace6('0x3'));var moment=require(_0xace6('0x4'));var BPromise=require(_0xace6('0x5'));var Mustache=require(_0xace6('0x6'));var util=require(_0xace6('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0xace6('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xace6('0x9'));var _=require(_0xace6('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xace6('0xb'));var deskjs=require(_0xace6('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xace6('0xd'));var qs=require(_0xace6('0xe'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xace6('0xf'));var logger=require(_0xace6('0x10'))(_0xace6('0x11'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5b91fd,_0x40def7){_0x40def7=_0x40def7||0xcc;return function(_0x44f8b7){if(_0x44f8b7){return _0x5b91fd[_0xace6('0x12')](_0x40def7);}return _0x5b91fd['status'](_0x40def7)[_0xace6('0x13')]();};}function respondWithResult(_0x187279,_0x1bda05){_0x1bda05=_0x1bda05||0xc8;return function(_0x109988){if(_0x109988){return _0x187279[_0xace6('0x14')](_0x1bda05)[_0xace6('0x15')](_0x109988);}};}function respondWithFilteredResult(_0x3a3954,_0x13fff0){return function(_0x129b46){if(_0x129b46){var _0x4a3dbd=typeof _0x13fff0[_0xace6('0x16')]===_0xace6('0x17')&&typeof _0x13fff0[_0xace6('0x18')]===_0xace6('0x17');var _0x559b35=_0x129b46[_0xace6('0x19')];var _0x345d31=_0x4a3dbd?0x0:_0x13fff0[_0xace6('0x16')];var _0x249e03=_0x4a3dbd?_0x129b46[_0xace6('0x19')]:_0x13fff0[_0xace6('0x16')]+_0x13fff0[_0xace6('0x18')];var _0x1b9e13;if(_0x249e03>=_0x559b35){_0x249e03=_0x559b35;_0x1b9e13=0xc8;}else{_0x1b9e13=0xce;}_0x3a3954[_0xace6('0x14')](_0x1b9e13);return _0x3a3954[_0xace6('0x1a')](_0xace6('0x1b'),_0x345d31+'-'+_0x249e03+'/'+_0x559b35)[_0xace6('0x15')](_0x129b46);}return null;};}function patchUpdates(_0x2817d8){return function(_0x4dc66f){try{jsonpatch[_0xace6('0x1c')](_0x4dc66f,_0x2817d8,!![]);}catch(_0x78f79){return BPromise[_0xace6('0x1d')](_0x78f79);}return _0x4dc66f[_0xace6('0x1e')]();};}function saveUpdates(_0x4796ca,_0x3e5921){return function(_0x2c7f93){if(_0x2c7f93){return _0x2c7f93[_0xace6('0x1f')](_0x4796ca)[_0xace6('0x20')](function(_0x2fcc29){return _0x2fcc29;});}return null;};}function removeEntity(_0x2944e9,_0x3fb3eb){return function(_0x365357){if(_0x365357){return _0x365357['destroy']()['then'](function(){_0x2944e9[_0xace6('0x14')](0xcc)[_0xace6('0x13')]();});}};}function handleEntityNotFound(_0x5e652d,_0x5002a6){return function(_0x34bcd1){if(!_0x34bcd1){_0x5e652d[_0xace6('0x12')](0x194);}return _0x34bcd1;};}function handleError(_0x56ba79,_0x3bf2fa){_0x3bf2fa=_0x3bf2fa||0x1f4;return function(_0x2536b6){logger['error'](_0x2536b6[_0xace6('0x21')]);if(_0x2536b6[_0xace6('0x22')]){delete _0x2536b6['name'];}_0x56ba79['status'](_0x3bf2fa)[_0xace6('0x23')](_0x2536b6);};}exports[_0xace6('0x24')]=function(_0x574a4d,_0x509f74){var _0x177e36={},_0x10d8d2={},_0x2a7b57={'count':0x0,'rows':[]};var _0x488c9d=_[_0xace6('0x25')](db[_0xace6('0x26')][_0xace6('0x27')],function(_0x5e3a93){return{'name':_0x5e3a93['fieldName'],'type':_0x5e3a93['type'][_0xace6('0x28')]};});_0x10d8d2['model']=_[_0xace6('0x25')](_0x488c9d,'name');_0x10d8d2[_0xace6('0x29')]=_['keys'](_0x574a4d[_0xace6('0x29')]);_0x10d8d2[_0xace6('0x2a')]=_[_0xace6('0x2b')](_0x10d8d2[_0xace6('0x2c')],_0x10d8d2[_0xace6('0x29')]);_0x177e36[_0xace6('0x2d')]=_[_0xace6('0x2b')](_0x10d8d2[_0xace6('0x2c')],qs[_0xace6('0x2e')](_0x574a4d[_0xace6('0x29')][_0xace6('0x2e')]));_0x177e36[_0xace6('0x2d')]=_0x177e36[_0xace6('0x2d')][_0xace6('0x2f')]?_0x177e36['attributes']:_0x10d8d2['model'];if(!_0x574a4d[_0xace6('0x29')][_0xace6('0x30')](_0xace6('0x31'))){_0x177e36[_0xace6('0x18')]=qs[_0xace6('0x18')](_0x574a4d[_0xace6('0x29')][_0xace6('0x18')]);_0x177e36[_0xace6('0x16')]=qs['offset'](_0x574a4d['query']['offset']);}_0x177e36[_0xace6('0x32')]=qs['sort'](_0x574a4d['query'][_0xace6('0x33')]);_0x177e36['where']=qs[_0xace6('0x2a')](_[_0xace6('0x34')](_0x574a4d[_0xace6('0x29')],_0x10d8d2[_0xace6('0x2a')]),_0x488c9d);if(_0x574a4d[_0xace6('0x29')][_0xace6('0x35')]){_0x177e36['where']=_[_0xace6('0x36')](_0x177e36[_0xace6('0x37')],{'$or':_[_0xace6('0x25')](_0x488c9d,function(_0x57a3ae){if(_0x57a3ae[_0xace6('0x38')]!==_0xace6('0x39')){var _0x5de40f={};_0x5de40f[_0x57a3ae[_0xace6('0x22')]]={'$like':'%'+_0x574a4d[_0xace6('0x29')][_0xace6('0x35')]+'%'};return _0x5de40f;}})});}_0x177e36=_[_0xace6('0x36')]({},_0x177e36,_0x574a4d[_0xace6('0x3a')]);var _0x5533a5={'where':_0x177e36['where']};return db[_0xace6('0x26')][_0xace6('0x19')](_0x5533a5)[_0xace6('0x20')](function(_0xf0844){_0x2a7b57[_0xace6('0x19')]=_0xf0844;if(_0x574a4d[_0xace6('0x29')][_0xace6('0x3b')]){_0x177e36['include']=[{'all':!![]}];}return db[_0xace6('0x26')][_0xace6('0x3c')](_0x177e36);})[_0xace6('0x20')](function(_0x962192){_0x2a7b57[_0xace6('0x3d')]=_0x962192;return _0x2a7b57;})[_0xace6('0x20')](respondWithFilteredResult(_0x509f74,_0x177e36))[_0xace6('0x3e')](handleError(_0x509f74,null));};exports[_0xace6('0x3f')]=function(_0x1d67b3,_0x4816b4){var _0x22ea82={'raw':!![],'where':{'id':_0x1d67b3[_0xace6('0x40')]['id']}},_0x5ddf0d={};_0x5ddf0d[_0xace6('0x2c')]=_['keys'](db['MailSubstatus'][_0xace6('0x27')]);_0x5ddf0d[_0xace6('0x29')]=_[_0xace6('0x41')](_0x1d67b3['query']);_0x5ddf0d[_0xace6('0x2a')]=_['intersection'](_0x5ddf0d[_0xace6('0x2c')],_0x5ddf0d[_0xace6('0x29')]);_0x22ea82[_0xace6('0x2d')]=_[_0xace6('0x2b')](_0x5ddf0d[_0xace6('0x2c')],qs[_0xace6('0x2e')](_0x1d67b3['query']['fields']));_0x22ea82[_0xace6('0x2d')]=_0x22ea82[_0xace6('0x2d')][_0xace6('0x2f')]?_0x22ea82[_0xace6('0x2d')]:_0x5ddf0d[_0xace6('0x2c')];if(_0x1d67b3[_0xace6('0x29')]['includeAll']){_0x22ea82[_0xace6('0x42')]=[{'all':!![]}];}_0x22ea82=_[_0xace6('0x36')]({},_0x22ea82,_0x1d67b3[_0xace6('0x3a')]);return db['MailSubstatus'][_0xace6('0x43')](_0x22ea82)[_0xace6('0x20')](handleEntityNotFound(_0x4816b4,null))[_0xace6('0x20')](respondWithResult(_0x4816b4,null))[_0xace6('0x3e')](handleError(_0x4816b4,null));};exports[_0xace6('0x44')]=function(_0x45ae88,_0x49950a){return db['MailSubstatus'][_0xace6('0x44')](_0x45ae88['body'],{})[_0xace6('0x20')](respondWithResult(_0x49950a,0xc9))['catch'](handleError(_0x49950a,null));};exports['update']=function(_0x2b940e,_0x313a2b){if(_0x2b940e['body']['id']){delete _0x2b940e['body']['id'];}return db[_0xace6('0x26')][_0xace6('0x43')]({'where':{'id':_0x2b940e[_0xace6('0x40')]['id']}})['then'](handleEntityNotFound(_0x313a2b,null))[_0xace6('0x20')](saveUpdates(_0x2b940e[_0xace6('0x45')],null))[_0xace6('0x20')](respondWithResult(_0x313a2b,null))[_0xace6('0x3e')](handleError(_0x313a2b,null));};exports[_0xace6('0x46')]=function(_0x4a215b,_0x308720){return db[_0xace6('0x26')][_0xace6('0x43')]({'where':{'id':_0x4a215b['params']['id']}})[_0xace6('0x20')](handleEntityNotFound(_0x308720,null))[_0xace6('0x20')](removeEntity(_0x308720,null))['catch'](handleError(_0x308720,null));};exports[_0xace6('0x47')]=function(_0x46df75,_0x5cdc70){return db[_0xace6('0x26')][_0xace6('0x47')]()[_0xace6('0x20')](respondWithResult(_0x5cdc70,null))[_0xace6('0x3e')](handleError(_0x5cdc70,null));};
\ No newline at end of file
+var _0x9a14=['limit','count','offset','status','set','Content-Range','json','apply','reject','save','then','destroy','end','error','stack','name','index','map','MailSubstatus','rawAttributes','type','key','model','query','keys','fields','attributes','length','hasOwnProperty','order','sort','where','filters','filter','merge','includeAll','include','findAll','show','params','intersection','options','find','create','body','update','catch','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','squel','crypto','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','undefined'];(function(_0x3686f4,_0xd4a373){var _0x168f2b=function(_0x352038){while(--_0x352038){_0x3686f4['push'](_0x3686f4['shift']());}};_0x168f2b(++_0xd4a373);}(_0x9a14,0xc8));var _0x49a1=function(_0xb250b2,_0x38bb44){_0xb250b2=_0xb250b2-0x0;var _0x37c987=_0x9a14[_0xb250b2];return _0x37c987;};'use strict';var emlformat=require(_0x49a1('0x0'));var rimraf=require(_0x49a1('0x1'));var zipdir=require(_0x49a1('0x2'));var jsonpatch=require(_0x49a1('0x3'));var rp=require('request-promise');var moment=require(_0x49a1('0x4'));var BPromise=require(_0x49a1('0x5'));var Mustache=require(_0x49a1('0x6'));var util=require('util');var path=require(_0x49a1('0x7'));var sox=require(_0x49a1('0x8'));var csv=require(_0x49a1('0x9'));var ejs=require(_0x49a1('0xa'));var fs=require('fs');var fs_extra=require(_0x49a1('0xb'));var _=require('lodash');var squel=require(_0x49a1('0xc'));var crypto=require(_0x49a1('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x49a1('0xe'));var toCsv=require(_0x49a1('0x9'));var querystring=require(_0x49a1('0xf'));var Papa=require(_0x49a1('0x10'));var Redis=require(_0x49a1('0x11'));var authService=require('../../components/auth/service');var qs=require(_0x49a1('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x49a1('0x13'));var logger=require(_0x49a1('0x14'))(_0x49a1('0x15'));var utils=require(_0x49a1('0x16'));var config=require(_0x49a1('0x17'));var licenseUtil=require(_0x49a1('0x18'));var db=require(_0x49a1('0x19'))['db'];function respondWithStatusCode(_0x4cf2e7,_0x4647c6){_0x4647c6=_0x4647c6||0xcc;return function(_0x45d187){if(_0x45d187){return _0x4cf2e7[_0x49a1('0x1a')](_0x4647c6);}return _0x4cf2e7['status'](_0x4647c6)['end']();};}function respondWithResult(_0x54ac34,_0x122f5f){_0x122f5f=_0x122f5f||0xc8;return function(_0x497dac){if(_0x497dac){return _0x54ac34['status'](_0x122f5f)['json'](_0x497dac);}};}function respondWithFilteredResult(_0x194ae4,_0x21fbac){return function(_0x2f3c9f){if(_0x2f3c9f){var _0x25a660=typeof _0x21fbac['offset']===_0x49a1('0x1b')&&typeof _0x21fbac[_0x49a1('0x1c')]===_0x49a1('0x1b');var _0x3169bb=_0x2f3c9f['count'];var _0x518572=_0x25a660?0x0:_0x21fbac['offset'];var _0x576236=_0x25a660?_0x2f3c9f[_0x49a1('0x1d')]:_0x21fbac[_0x49a1('0x1e')]+_0x21fbac['limit'];var _0x24827f;if(_0x576236>=_0x3169bb){_0x576236=_0x3169bb;_0x24827f=0xc8;}else{_0x24827f=0xce;}_0x194ae4[_0x49a1('0x1f')](_0x24827f);return _0x194ae4[_0x49a1('0x20')](_0x49a1('0x21'),_0x518572+'-'+_0x576236+'/'+_0x3169bb)[_0x49a1('0x22')](_0x2f3c9f);}return null;};}function patchUpdates(_0x52d955){return function(_0x45a9ca){try{jsonpatch[_0x49a1('0x23')](_0x45a9ca,_0x52d955,!![]);}catch(_0x5ec965){return BPromise[_0x49a1('0x24')](_0x5ec965);}return _0x45a9ca[_0x49a1('0x25')]();};}function saveUpdates(_0x521e52,_0x1ab82d){return function(_0xc6cec6){if(_0xc6cec6){return _0xc6cec6['update'](_0x521e52)[_0x49a1('0x26')](function(_0x1871f9){return _0x1871f9;});}return null;};}function removeEntity(_0xce293b,_0x3a4e41){return function(_0x42c8ff){if(_0x42c8ff){return _0x42c8ff[_0x49a1('0x27')]()[_0x49a1('0x26')](function(){_0xce293b[_0x49a1('0x1f')](0xcc)[_0x49a1('0x28')]();});}};}function handleEntityNotFound(_0x1399da,_0x24a28b){return function(_0x125fe7){if(!_0x125fe7){_0x1399da[_0x49a1('0x1a')](0x194);}return _0x125fe7;};}function handleError(_0x35f967,_0x4a17d9){_0x4a17d9=_0x4a17d9||0x1f4;return function(_0x527cd4){logger[_0x49a1('0x29')](_0x527cd4[_0x49a1('0x2a')]);if(_0x527cd4[_0x49a1('0x2b')]){delete _0x527cd4[_0x49a1('0x2b')];}_0x35f967['status'](_0x4a17d9)['send'](_0x527cd4);};}exports[_0x49a1('0x2c')]=function(_0x4d548f,_0x151c8c){var _0x20ea1d={},_0x544f55={},_0x446900={'count':0x0,'rows':[]};var _0x22e71b=_[_0x49a1('0x2d')](db[_0x49a1('0x2e')][_0x49a1('0x2f')],function(_0x7363a6){return{'name':_0x7363a6['fieldName'],'type':_0x7363a6[_0x49a1('0x30')][_0x49a1('0x31')]};});_0x544f55[_0x49a1('0x32')]=_[_0x49a1('0x2d')](_0x22e71b,_0x49a1('0x2b'));_0x544f55[_0x49a1('0x33')]=_[_0x49a1('0x34')](_0x4d548f[_0x49a1('0x33')]);_0x544f55['filters']=_['intersection'](_0x544f55['model'],_0x544f55[_0x49a1('0x33')]);_0x20ea1d['attributes']=_['intersection'](_0x544f55[_0x49a1('0x32')],qs[_0x49a1('0x35')](_0x4d548f[_0x49a1('0x33')][_0x49a1('0x35')]));_0x20ea1d['attributes']=_0x20ea1d[_0x49a1('0x36')][_0x49a1('0x37')]?_0x20ea1d['attributes']:_0x544f55[_0x49a1('0x32')];if(!_0x4d548f['query'][_0x49a1('0x38')]('nolimit')){_0x20ea1d[_0x49a1('0x1c')]=qs[_0x49a1('0x1c')](_0x4d548f[_0x49a1('0x33')][_0x49a1('0x1c')]);_0x20ea1d[_0x49a1('0x1e')]=qs[_0x49a1('0x1e')](_0x4d548f[_0x49a1('0x33')]['offset']);}_0x20ea1d[_0x49a1('0x39')]=qs[_0x49a1('0x3a')](_0x4d548f[_0x49a1('0x33')][_0x49a1('0x3a')]);_0x20ea1d[_0x49a1('0x3b')]=qs[_0x49a1('0x3c')](_['pick'](_0x4d548f[_0x49a1('0x33')],_0x544f55[_0x49a1('0x3c')]),_0x22e71b);if(_0x4d548f['query'][_0x49a1('0x3d')]){_0x20ea1d[_0x49a1('0x3b')]=_[_0x49a1('0x3e')](_0x20ea1d[_0x49a1('0x3b')],{'$or':_[_0x49a1('0x2d')](_0x22e71b,function(_0x4e0b7e){if(_0x4e0b7e['type']!=='VIRTUAL'){var _0x864031={};_0x864031[_0x4e0b7e['name']]={'$like':'%'+_0x4d548f[_0x49a1('0x33')][_0x49a1('0x3d')]+'%'};return _0x864031;}})});}_0x20ea1d=_[_0x49a1('0x3e')]({},_0x20ea1d,_0x4d548f['options']);var _0x295969={'where':_0x20ea1d[_0x49a1('0x3b')]};return db[_0x49a1('0x2e')][_0x49a1('0x1d')](_0x295969)[_0x49a1('0x26')](function(_0x40a49e){_0x446900[_0x49a1('0x1d')]=_0x40a49e;if(_0x4d548f[_0x49a1('0x33')][_0x49a1('0x3f')]){_0x20ea1d[_0x49a1('0x40')]=[{'all':!![]}];}return db['MailSubstatus'][_0x49a1('0x41')](_0x20ea1d);})[_0x49a1('0x26')](function(_0x52fcad){_0x446900['rows']=_0x52fcad;return _0x446900;})[_0x49a1('0x26')](respondWithFilteredResult(_0x151c8c,_0x20ea1d))['catch'](handleError(_0x151c8c,null));};exports[_0x49a1('0x42')]=function(_0x561f4d,_0x2da524){var _0x4a691c={'raw':!![],'where':{'id':_0x561f4d[_0x49a1('0x43')]['id']}},_0x37b56a={};_0x37b56a[_0x49a1('0x32')]=_['keys'](db[_0x49a1('0x2e')]['rawAttributes']);_0x37b56a[_0x49a1('0x33')]=_[_0x49a1('0x34')](_0x561f4d[_0x49a1('0x33')]);_0x37b56a[_0x49a1('0x3c')]=_['intersection'](_0x37b56a[_0x49a1('0x32')],_0x37b56a[_0x49a1('0x33')]);_0x4a691c['attributes']=_[_0x49a1('0x44')](_0x37b56a[_0x49a1('0x32')],qs[_0x49a1('0x35')](_0x561f4d[_0x49a1('0x33')][_0x49a1('0x35')]));_0x4a691c[_0x49a1('0x36')]=_0x4a691c[_0x49a1('0x36')][_0x49a1('0x37')]?_0x4a691c[_0x49a1('0x36')]:_0x37b56a[_0x49a1('0x32')];if(_0x561f4d['query'][_0x49a1('0x3f')]){_0x4a691c[_0x49a1('0x40')]=[{'all':!![]}];}_0x4a691c=_[_0x49a1('0x3e')]({},_0x4a691c,_0x561f4d[_0x49a1('0x45')]);return db[_0x49a1('0x2e')][_0x49a1('0x46')](_0x4a691c)[_0x49a1('0x26')](handleEntityNotFound(_0x2da524,null))[_0x49a1('0x26')](respondWithResult(_0x2da524,null))['catch'](handleError(_0x2da524,null));};exports[_0x49a1('0x47')]=function(_0xb4e486,_0x367176){return db[_0x49a1('0x2e')]['create'](_0xb4e486[_0x49a1('0x48')],{})[_0x49a1('0x26')](respondWithResult(_0x367176,0xc9))['catch'](handleError(_0x367176,null));};exports[_0x49a1('0x49')]=function(_0xc26981,_0x42298d){if(_0xc26981[_0x49a1('0x48')]['id']){delete _0xc26981[_0x49a1('0x48')]['id'];}return db[_0x49a1('0x2e')][_0x49a1('0x46')]({'where':{'id':_0xc26981[_0x49a1('0x43')]['id']}})['then'](handleEntityNotFound(_0x42298d,null))['then'](saveUpdates(_0xc26981[_0x49a1('0x48')],null))[_0x49a1('0x26')](respondWithResult(_0x42298d,null))[_0x49a1('0x4a')](handleError(_0x42298d,null));};exports[_0x49a1('0x27')]=function(_0x490e8a,_0x2ee999){return db[_0x49a1('0x2e')]['find']({'where':{'id':_0x490e8a['params']['id']}})['then'](handleEntityNotFound(_0x2ee999,null))[_0x49a1('0x26')](removeEntity(_0x2ee999,null))[_0x49a1('0x4a')](handleError(_0x2ee999,null));};exports[_0x49a1('0x4b')]=function(_0x1ed754,_0x2f571f){return db[_0x49a1('0x2e')][_0x49a1('0x4b')]()[_0x49a1('0x26')](respondWithResult(_0x2f571f,null))[_0x49a1('0x4a')](handleError(_0x2f571f,null));};
\ No newline at end of file
index a2e0b65..b4462ca 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x65f7=['events','../../mysqldb','MailSubstatus','setMaxListeners','update','hasOwnProperty','hook','exports'];(function(_0x1d088a,_0x481c76){var _0x59b5ac=function(_0x487582){while(--_0x487582){_0x1d088a['push'](_0x1d088a['shift']());}};_0x59b5ac(++_0x481c76);}(_0x65f7,0xa8));var _0x765f=function(_0x2dfea8,_0x1fc7c5){_0x2dfea8=_0x2dfea8-0x0;var _0x4653b7=_0x65f7[_0x2dfea8];return _0x4653b7;};'use strict';var EventEmitter=require(_0x765f('0x0'));var MailSubstatus=require(_0x765f('0x1'))['db'][_0x765f('0x2')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x765f('0x3')](0x0);var events={'afterUpdate':_0x765f('0x4')};function emitEvent(_0x1bdb2e){return function(_0x33939a,_0x5d35e7,_0x1aee11){MailSubstatusEvents['emit'](_0x1bdb2e+':'+_0x33939a['id'],_0x33939a);MailSubstatusEvents['emit'](_0x1bdb2e,_0x33939a);_0x1aee11(null);};}for(var e in events){if(events[_0x765f('0x5')](e)){var event=events[e];MailSubstatus[_0x765f('0x6')](e,emitEvent(event));}}module[_0x765f('0x7')]=MailSubstatusEvents;
\ No newline at end of file
+var _0x6831=['hasOwnProperty','hook','events','MailSubstatus','setMaxListeners','update','emit'];(function(_0x40063e,_0x542fae){var _0x2b6c67=function(_0x47d559){while(--_0x47d559){_0x40063e['push'](_0x40063e['shift']());}};_0x2b6c67(++_0x542fae);}(_0x6831,0x87));var _0x1683=function(_0x19950b,_0x53d0d7){_0x19950b=_0x19950b-0x0;var _0x3c6b41=_0x6831[_0x19950b];return _0x3c6b41;};'use strict';var EventEmitter=require(_0x1683('0x0'));var MailSubstatus=require('../../mysqldb')['db'][_0x1683('0x1')];var MailSubstatusEvents=new EventEmitter();MailSubstatusEvents[_0x1683('0x2')](0x0);var events={'afterUpdate':_0x1683('0x3')};function emitEvent(_0xe23752){return function(_0x13f44a,_0xaf0d5c,_0x476638){MailSubstatusEvents[_0x1683('0x4')](_0xe23752+':'+_0x13f44a['id'],_0x13f44a);MailSubstatusEvents[_0x1683('0x4')](_0xe23752,_0x13f44a);_0x476638(null);};}for(var e in events){if(events[_0x1683('0x5')](e)){var event=events[e];MailSubstatus[_0x1683('0x6')](e,emitEvent(event));}}module['exports']=MailSubstatusEvents;
\ No newline at end of file
index 7b4334e..301fdaa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1d66=['models','define','mail_substatuses','Condition','update','name','mailSubstatus','_previousDataValues','then','catch','./mailSubstatus.attributes','exports'];(function(_0xfbf699,_0x235ce1){var _0x3e8b28=function(_0x4b4a4f){while(--_0x4b4a4f){_0xfbf699['push'](_0xfbf699['shift']());}};_0x3e8b28(++_0x235ce1);}(_0x1d66,0x1c6));var _0x61d6=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x1d66[_0x122ef9];return _0x42fba0;};'use strict';var attributes=require(_0x61d6('0x0'));module[_0x61d6('0x1')]=function(_0x581302){var _0x4f4571=_0x581302[_0x61d6('0x2')];return _0x581302[_0x61d6('0x3')]('MailSubstatus',attributes,{'tableName':_0x61d6('0x4'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x4de9da,_0x3d9f26,_0x104bfa){return _0x4f4571[_0x61d6('0x5')][_0x61d6('0x6')]({'value':_0x4de9da[_0x61d6('0x7')]},{'where':{'field':_0x61d6('0x8'),'value':_0x4de9da[_0x61d6('0x9')][_0x61d6('0x7')]}})[_0x61d6('0xa')](function(){_0x104bfa();})[_0x61d6('0xb')](function(_0x1a2b0b){_0x104bfa(_0x1a2b0b);});}}});};
\ No newline at end of file
+var _0xa3e5=['name','_previousDataValues','catch','./mailSubstatus.attributes','models','define','MailSubstatus','Condition','update'];(function(_0x328305,_0x19098d){var _0xf0347=function(_0xa391c1){while(--_0xa391c1){_0x328305['push'](_0x328305['shift']());}};_0xf0347(++_0x19098d);}(_0xa3e5,0x198));var _0x5a3e=function(_0xa1e3e3,_0x29fe0e){_0xa1e3e3=_0xa1e3e3-0x0;var _0xc980e9=_0xa3e5[_0xa1e3e3];return _0xc980e9;};'use strict';var attributes=require(_0x5a3e('0x0'));module['exports']=function(_0xc0d69){var _0x51d643=_0xc0d69[_0x5a3e('0x1')];return _0xc0d69[_0x5a3e('0x2')](_0x5a3e('0x3'),attributes,{'tableName':'mail_substatuses','paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterUpdate':function(_0x4d65bb,_0x1e3d56,_0x5ba185){return _0x51d643[_0x5a3e('0x4')][_0x5a3e('0x5')]({'value':_0x4d65bb[_0x5a3e('0x6')]},{'where':{'field':'mailSubstatus','value':_0x4d65bb[_0x5a3e('0x7')]['name']}})['then'](function(){_0x5ba185();})[_0x5a3e('0x8')](function(_0x2d3c39){_0x5ba185(_0x2d3c39);});}}});};
\ No newline at end of file
index f7ae917..8a077b5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1a93=['lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','jayson/promise','client','http','info','MailSubstatus,\x20%s,\x20%s','request\x20sent','MailSubstatus,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch'];(function(_0x57fa70,_0x3d8b79){var _0x39e896=function(_0x5cbf3a){while(--_0x5cbf3a){_0x57fa70['push'](_0x57fa70['shift']());}};_0x39e896(++_0x3d8b79);}(_0x1a93,0xa0));var _0x31a9=function(_0x58cb7a,_0x3ef62b){_0x58cb7a=_0x58cb7a-0x0;var _0x246cf1=_0x1a93[_0x58cb7a];return _0x246cf1;};'use strict';var _=require(_0x31a9('0x0'));var util=require(_0x31a9('0x1'));var moment=require(_0x31a9('0x2'));var BPromise=require(_0x31a9('0x3'));var rs=require(_0x31a9('0x4'));var fs=require('fs');var Redis=require(_0x31a9('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x31a9('0x6'));var logger=require('../../config/logger')(_0x31a9('0x7'));var config=require('../../config/environment');var jayson=require(_0x31a9('0x8'));var client=jayson[_0x31a9('0x9')][_0x31a9('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2bc299,_0x485763,_0x49f25c){return new BPromise(function(_0x470fd5,_0x5dc737){return client['request'](_0x2bc299,_0x49f25c)['then'](function(_0x24b30a){logger[_0x31a9('0xb')](_0x31a9('0xc'),_0x485763,_0x31a9('0xd'));logger['debug'](_0x31a9('0xe'),_0x485763,'request\x20sent',JSON[_0x31a9('0xf')](_0x24b30a));if(_0x24b30a['error']){if(_0x24b30a[_0x31a9('0x10')][_0x31a9('0x11')]===0x1f4){logger[_0x31a9('0x10')](_0x31a9('0xc'),_0x485763,_0x24b30a[_0x31a9('0x10')][_0x31a9('0x12')]);return _0x5dc737(_0x24b30a[_0x31a9('0x10')]['message']);}logger[_0x31a9('0x10')]('MailSubstatus,\x20%s,\x20%s',_0x485763,_0x24b30a[_0x31a9('0x10')]['message']);return _0x470fd5(_0x24b30a[_0x31a9('0x10')][_0x31a9('0x12')]);}else{logger[_0x31a9('0xb')]('MailSubstatus,\x20%s,\x20%s',_0x485763,_0x31a9('0xd'));_0x470fd5(_0x24b30a['result'][_0x31a9('0x12')]);}})[_0x31a9('0x13')](function(_0x248113){logger[_0x31a9('0x10')]('MailSubstatus,\x20%s,\x20%s',_0x485763,_0x248113);_0x5dc737(_0x248113);});});}
\ No newline at end of file
+var _0x5c48=['../../config/environment','jayson/promise','http','request','info','MailSubstatus,\x20%s,\x20%s','request\x20sent','MailSubstatus,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger'];(function(_0x3a7306,_0x5b0a08){var _0x15736a=function(_0x5245b4){while(--_0x5245b4){_0x3a7306['push'](_0x3a7306['shift']());}};_0x15736a(++_0x5b0a08);}(_0x5c48,0x172));var _0x85c4=function(_0x3b7d07,_0x593043){_0x3b7d07=_0x3b7d07-0x0;var _0x1a3e2c=_0x5c48[_0x3b7d07];return _0x1a3e2c;};'use strict';var _=require(_0x85c4('0x0'));var util=require(_0x85c4('0x1'));var moment=require(_0x85c4('0x2'));var BPromise=require(_0x85c4('0x3'));var rs=require(_0x85c4('0x4'));var fs=require('fs');var Redis=require(_0x85c4('0x5'));var db=require(_0x85c4('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x85c4('0x7'))('rpc');var config=require(_0x85c4('0x8'));var jayson=require(_0x85c4('0x9'));var client=jayson['client'][_0x85c4('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4666cf,_0x193dc9,_0x1eff96){return new BPromise(function(_0x41a648,_0x2ee4e1){return client[_0x85c4('0xb')](_0x4666cf,_0x1eff96)['then'](function(_0x4d4d64){logger[_0x85c4('0xc')](_0x85c4('0xd'),_0x193dc9,_0x85c4('0xe'));logger['debug'](_0x85c4('0xf'),_0x193dc9,'request\x20sent',JSON[_0x85c4('0x10')](_0x4d4d64));if(_0x4d4d64[_0x85c4('0x11')]){if(_0x4d4d64['error']['code']===0x1f4){logger[_0x85c4('0x11')](_0x85c4('0xd'),_0x193dc9,_0x4d4d64[_0x85c4('0x11')][_0x85c4('0x12')]);return _0x2ee4e1(_0x4d4d64[_0x85c4('0x11')][_0x85c4('0x12')]);}logger['error']('MailSubstatus,\x20%s,\x20%s',_0x193dc9,_0x4d4d64['error']['message']);return _0x41a648(_0x4d4d64['error'][_0x85c4('0x12')]);}else{logger[_0x85c4('0xc')](_0x85c4('0xd'),_0x193dc9,_0x85c4('0xe'));_0x41a648(_0x4d4d64[_0x85c4('0x13')][_0x85c4('0x12')]);}})[_0x85c4('0x14')](function(_0x76e9ce){logger[_0x85c4('0x11')](_0x85c4('0xd'),_0x193dc9,_0x76e9ce);_0x2ee4e1(_0x76e9ce);});});}
\ No newline at end of file
index 624901f..c78622b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeb1f=['../../config/environment','./mailTransferReport.controller','get','isAuthenticated','index','describe','/:id','post','create','update','delete','destroy','exports','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x163040,_0x38a58c){var _0x364667=function(_0x3b104f){while(--_0x3b104f){_0x163040['push'](_0x163040['shift']());}};_0x364667(++_0x38a58c);}(_0xeb1f,0x12a));var _0xfeb1=function(_0x5ca160,_0x952390){_0x5ca160=_0x5ca160-0x0;var _0x5cb8e0=_0xeb1f[_0x5ca160];return _0x5cb8e0;};'use strict';var multer=require(_0xfeb1('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xfeb1('0x1'));var express=require(_0xfeb1('0x2'));var router=express[_0xfeb1('0x3')]();var fs_extra=require(_0xfeb1('0x4'));var auth=require(_0xfeb1('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0xfeb1('0x6'));var controller=require(_0xfeb1('0x7'));router[_0xfeb1('0x8')]('/',auth[_0xfeb1('0x9')](),controller[_0xfeb1('0xa')]);router['get']('/describe',auth[_0xfeb1('0x9')](),controller[_0xfeb1('0xb')]);router[_0xfeb1('0x8')](_0xfeb1('0xc'),auth[_0xfeb1('0x9')](),controller['show']);router[_0xfeb1('0xd')]('/',auth[_0xfeb1('0x9')](),controller[_0xfeb1('0xe')]);router['put'](_0xfeb1('0xc'),auth[_0xfeb1('0x9')](),controller[_0xfeb1('0xf')]);router[_0xfeb1('0x10')](_0xfeb1('0xc'),auth['isAuthenticated'](),controller[_0xfeb1('0x11')]);module[_0xfeb1('0x12')]=router;
\ No newline at end of file
+var _0xe475=['/:id','post','create','put','update','destroy','exports','util','path','Router','fs-extra','../../components/interaction/service','../../config/environment','./mailTransferReport.controller','get','isAuthenticated','/describe'];(function(_0x3f3743,_0x8f8644){var _0x305f8a=function(_0xa4507f){while(--_0xa4507f){_0x3f3743['push'](_0x3f3743['shift']());}};_0x305f8a(++_0x8f8644);}(_0xe475,0x19f));var _0x5e47=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe475[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require(_0x5e47('0x0'));var path=require(_0x5e47('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x5e47('0x2')]();var fs_extra=require(_0x5e47('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x5e47('0x4'));var config=require(_0x5e47('0x5'));var controller=require(_0x5e47('0x6'));router[_0x5e47('0x7')]('/',auth[_0x5e47('0x8')](),controller['index']);router[_0x5e47('0x7')](_0x5e47('0x9'),auth['isAuthenticated'](),controller['describe']);router[_0x5e47('0x7')](_0x5e47('0xa'),auth[_0x5e47('0x8')](),controller['show']);router[_0x5e47('0xb')]('/',auth[_0x5e47('0x8')](),controller[_0x5e47('0xc')]);router[_0x5e47('0xd')](_0x5e47('0xa'),auth[_0x5e47('0x8')](),controller[_0x5e47('0xe')]);router['delete'](_0x5e47('0xa'),auth[_0x5e47('0x8')](),controller[_0x5e47('0xf')]);module[_0x5e47('0x10')]=router;
\ No newline at end of file
index 7329139..7ec721d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9bde=['NOW','sequelize','STRING','account','agent','queue','DATE'];(function(_0x437d7f,_0x1feb46){var _0x31058c=function(_0x49dd1a){while(--_0x49dd1a){_0x437d7f['push'](_0x437d7f['shift']());}};_0x31058c(++_0x1feb46);}(_0x9bde,0xe1));var _0xe9bd=function(_0x5b845b,_0x5f5cc0){_0x5b845b=_0x5b845b-0x0;var _0x9ffc64=_0x9bde[_0x5b845b];return _0x9ffc64;};'use strict';var moment=require('moment');var Sequelize=require(_0xe9bd('0x0'));module['exports']={'uniqueid':{'type':Sequelize[_0xe9bd('0x1')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0xe9bd('0x2'),_0xe9bd('0x3'),_0xe9bd('0x4')),'allowNull':![],'defaultValue':_0xe9bd('0x4')},'transferredAt':{'type':Sequelize[_0xe9bd('0x5')],'allowNull':![],'defaultValue':Sequelize[_0xe9bd('0x6')]}};
\ No newline at end of file
+var _0x70e0=['NOW','moment','sequelize','exports','account','agent','queue'];(function(_0x4fd43b,_0x55e475){var _0xf556f0=function(_0x5c39ba){while(--_0x5c39ba){_0x4fd43b['push'](_0x4fd43b['shift']());}};_0xf556f0(++_0x55e475);}(_0x70e0,0x17b));var _0x070e=function(_0x11231b,_0x4ab493){_0x11231b=_0x11231b-0x0;var _0x569eda=_0x70e0[_0x11231b];return _0x569eda;};'use strict';var moment=require(_0x070e('0x0'));var Sequelize=require(_0x070e('0x1'));module[_0x070e('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x070e('0x3'),_0x070e('0x4'),_0x070e('0x5')),'allowNull':![],'defaultValue':_0x070e('0x5')},'transferredAt':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':Sequelize[_0x070e('0x6')]}};
\ No newline at end of file
index 40a20b5..539195b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x207d=['body','update','params','describe','zip-dir','fast-json-patch','moment','bluebird','path','sox','ejs','fs-extra','lodash','squel','crypto','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','limit','count','set','Content-Range','json','apply','reject','save','destroy','error','stack','name','send','index','MailTransferReport','rawAttributes','fieldName','type','model','map','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','pick','filter','merge','where','options','then','include','rows','catch','includeAll','find','create'];(function(_0xcecc7d,_0x2f2899){var _0x5883ba=function(_0x4f618d){while(--_0x4f618d){_0xcecc7d['push'](_0xcecc7d['shift']());}};_0x5883ba(++_0x2f2899);}(_0x207d,0xdf));var _0xd207=function(_0x3d2288,_0x32731a){_0x3d2288=_0x3d2288-0x0;var _0x50f7f2=_0x207d[_0x3d2288];return _0x50f7f2;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0xd207('0x0'));var jsonpatch=require(_0xd207('0x1'));var rp=require('request-promise');var moment=require(_0xd207('0x2'));var BPromise=require(_0xd207('0x3'));var Mustache=require('mustache');var util=require('util');var path=require(_0xd207('0x4'));var sox=require(_0xd207('0x5'));var csv=require('to-csv');var ejs=require(_0xd207('0x6'));var fs=require('fs');var fs_extra=require(_0xd207('0x7'));var _=require(_0xd207('0x8'));var squel=require(_0xd207('0x9'));var crypto=require(_0xd207('0xa'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0xd207('0xb'));var querystring=require(_0xd207('0xc'));var Papa=require(_0xd207('0xd'));var Redis=require(_0xd207('0xe'));var authService=require('../../components/auth/service');var qs=require(_0xd207('0xf'));var as=require(_0xd207('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xd207('0x11'))(_0xd207('0x12'));var utils=require(_0xd207('0x13'));var config=require(_0xd207('0x14'));var licenseUtil=require(_0xd207('0x15'));var db=require(_0xd207('0x16'))['db'];function respondWithStatusCode(_0x4f6752,_0x10454f){_0x10454f=_0x10454f||0xcc;return function(_0x26568e){if(_0x26568e){return _0x4f6752[_0xd207('0x17')](_0x10454f);}return _0x4f6752[_0xd207('0x18')](_0x10454f)[_0xd207('0x19')]();};}function respondWithResult(_0x25b1d4,_0x547ce5){_0x547ce5=_0x547ce5||0xc8;return function(_0x5ce91b){if(_0x5ce91b){return _0x25b1d4[_0xd207('0x18')](_0x547ce5)['json'](_0x5ce91b);}};}function respondWithFilteredResult(_0x5532cb,_0x125d76){return function(_0x3c7df5){if(_0x3c7df5){var _0x178cef=typeof _0x125d76[_0xd207('0x1a')]==='undefined'&&typeof _0x125d76[_0xd207('0x1b')]==='undefined';var _0x33a25e=_0x3c7df5[_0xd207('0x1c')];var _0x409bd0=_0x178cef?0x0:_0x125d76['offset'];var _0x5232bc=_0x178cef?_0x3c7df5[_0xd207('0x1c')]:_0x125d76[_0xd207('0x1a')]+_0x125d76[_0xd207('0x1b')];var _0x4765ae;if(_0x5232bc>=_0x33a25e){_0x5232bc=_0x33a25e;_0x4765ae=0xc8;}else{_0x4765ae=0xce;}_0x5532cb['status'](_0x4765ae);return _0x5532cb[_0xd207('0x1d')](_0xd207('0x1e'),_0x409bd0+'-'+_0x5232bc+'/'+_0x33a25e)[_0xd207('0x1f')](_0x3c7df5);}return null;};}function patchUpdates(_0x398a3d){return function(_0x29a4dd){try{jsonpatch[_0xd207('0x20')](_0x29a4dd,_0x398a3d,!![]);}catch(_0x2f46e0){return BPromise[_0xd207('0x21')](_0x2f46e0);}return _0x29a4dd[_0xd207('0x22')]();};}function saveUpdates(_0x5a338c,_0x5f3d0e){return function(_0x397637){if(_0x397637){return _0x397637['update'](_0x5a338c)['then'](function(_0x1d5321){return _0x1d5321;});}return null;};}function removeEntity(_0x3ef153,_0x1c6b45){return function(_0x55fc1c){if(_0x55fc1c){return _0x55fc1c[_0xd207('0x23')]()['then'](function(){_0x3ef153[_0xd207('0x18')](0xcc)[_0xd207('0x19')]();});}};}function handleEntityNotFound(_0x37a19c,_0x42a599){return function(_0x29135c){if(!_0x29135c){_0x37a19c['sendStatus'](0x194);}return _0x29135c;};}function handleError(_0x90dc4b,_0x1a2662){_0x1a2662=_0x1a2662||0x1f4;return function(_0x2d28eb){logger[_0xd207('0x24')](_0x2d28eb[_0xd207('0x25')]);if(_0x2d28eb[_0xd207('0x26')]){delete _0x2d28eb['name'];}_0x90dc4b[_0xd207('0x18')](_0x1a2662)[_0xd207('0x27')](_0x2d28eb);};}exports[_0xd207('0x28')]=function(_0x3738f4,_0x38aa70){var _0x5b9d79={},_0xbfc587={},_0x11a959={'count':0x0,'rows':[]};var _0x56f201=_['map'](db[_0xd207('0x29')][_0xd207('0x2a')],function(_0x1895be){return{'name':_0x1895be[_0xd207('0x2b')],'type':_0x1895be[_0xd207('0x2c')]['key']};});_0xbfc587[_0xd207('0x2d')]=_[_0xd207('0x2e')](_0x56f201,_0xd207('0x26'));_0xbfc587[_0xd207('0x2f')]=_[_0xd207('0x30')](_0x3738f4['query']);_0xbfc587[_0xd207('0x31')]=_[_0xd207('0x32')](_0xbfc587[_0xd207('0x2d')],_0xbfc587[_0xd207('0x2f')]);_0x5b9d79[_0xd207('0x33')]=_[_0xd207('0x32')](_0xbfc587['model'],qs[_0xd207('0x34')](_0x3738f4[_0xd207('0x2f')][_0xd207('0x34')]));_0x5b9d79['attributes']=_0x5b9d79[_0xd207('0x33')]['length']?_0x5b9d79[_0xd207('0x33')]:_0xbfc587[_0xd207('0x2d')];if(!_0x3738f4['query'][_0xd207('0x35')](_0xd207('0x36'))){_0x5b9d79['limit']=qs[_0xd207('0x1b')](_0x3738f4[_0xd207('0x2f')][_0xd207('0x1b')]);_0x5b9d79[_0xd207('0x1a')]=qs['offset'](_0x3738f4[_0xd207('0x2f')][_0xd207('0x1a')]);}_0x5b9d79[_0xd207('0x37')]=qs[_0xd207('0x38')](_0x3738f4[_0xd207('0x2f')][_0xd207('0x38')]);_0x5b9d79['where']=qs['filters'](_[_0xd207('0x39')](_0x3738f4[_0xd207('0x2f')],_0xbfc587[_0xd207('0x31')]),_0x56f201);if(_0x3738f4['query'][_0xd207('0x3a')]){_0x5b9d79['where']=_[_0xd207('0x3b')](_0x5b9d79[_0xd207('0x3c')],{'$or':_[_0xd207('0x2e')](_0x56f201,function(_0x83d4f0){if(_0x83d4f0[_0xd207('0x2c')]!=='VIRTUAL'){var _0xe593c9={};_0xe593c9[_0x83d4f0[_0xd207('0x26')]]={'$like':'%'+_0x3738f4[_0xd207('0x2f')][_0xd207('0x3a')]+'%'};return _0xe593c9;}})});}_0x5b9d79=_[_0xd207('0x3b')]({},_0x5b9d79,_0x3738f4[_0xd207('0x3d')]);var _0x27ccb9={'where':_0x5b9d79[_0xd207('0x3c')]};return db[_0xd207('0x29')][_0xd207('0x1c')](_0x27ccb9)[_0xd207('0x3e')](function(_0x25ce54){_0x11a959[_0xd207('0x1c')]=_0x25ce54;if(_0x3738f4[_0xd207('0x2f')]['includeAll']){_0x5b9d79[_0xd207('0x3f')]=[{'all':!![]}];}return db[_0xd207('0x29')]['findAll'](_0x5b9d79);})['then'](function(_0x1d2d5d){_0x11a959[_0xd207('0x40')]=_0x1d2d5d;return _0x11a959;})[_0xd207('0x3e')](respondWithFilteredResult(_0x38aa70,_0x5b9d79))[_0xd207('0x41')](handleError(_0x38aa70,null));};exports['show']=function(_0x41b94f,_0xe152d5){var _0x4e12bc={'raw':!![],'where':{'id':_0x41b94f['params']['id']}},_0x50928a={};_0x50928a['model']=_['keys'](db[_0xd207('0x29')][_0xd207('0x2a')]);_0x50928a[_0xd207('0x2f')]=_[_0xd207('0x30')](_0x41b94f[_0xd207('0x2f')]);_0x50928a['filters']=_[_0xd207('0x32')](_0x50928a[_0xd207('0x2d')],_0x50928a[_0xd207('0x2f')]);_0x4e12bc[_0xd207('0x33')]=_[_0xd207('0x32')](_0x50928a[_0xd207('0x2d')],qs['fields'](_0x41b94f[_0xd207('0x2f')][_0xd207('0x34')]));_0x4e12bc[_0xd207('0x33')]=_0x4e12bc[_0xd207('0x33')]['length']?_0x4e12bc[_0xd207('0x33')]:_0x50928a[_0xd207('0x2d')];if(_0x41b94f[_0xd207('0x2f')][_0xd207('0x42')]){_0x4e12bc[_0xd207('0x3f')]=[{'all':!![]}];}_0x4e12bc=_[_0xd207('0x3b')]({},_0x4e12bc,_0x41b94f['options']);return db[_0xd207('0x29')][_0xd207('0x43')](_0x4e12bc)[_0xd207('0x3e')](handleEntityNotFound(_0xe152d5,null))['then'](respondWithResult(_0xe152d5,null))[_0xd207('0x41')](handleError(_0xe152d5,null));};exports[_0xd207('0x44')]=function(_0x3f01c5,_0x8e5118){return db['MailTransferReport'][_0xd207('0x44')](_0x3f01c5[_0xd207('0x45')],{})[_0xd207('0x3e')](respondWithResult(_0x8e5118,0xc9))['catch'](handleError(_0x8e5118,null));};exports[_0xd207('0x46')]=function(_0x7ef6aa,_0x501c69){if(_0x7ef6aa['body']['id']){delete _0x7ef6aa['body']['id'];}return db[_0xd207('0x29')][_0xd207('0x43')]({'where':{'id':_0x7ef6aa[_0xd207('0x47')]['id']}})[_0xd207('0x3e')](handleEntityNotFound(_0x501c69,null))[_0xd207('0x3e')](saveUpdates(_0x7ef6aa['body'],null))[_0xd207('0x3e')](respondWithResult(_0x501c69,null))[_0xd207('0x41')](handleError(_0x501c69,null));};exports[_0xd207('0x23')]=function(_0x2c1dc9,_0x47a5d0){return db[_0xd207('0x29')][_0xd207('0x43')]({'where':{'id':_0x2c1dc9[_0xd207('0x47')]['id']}})[_0xd207('0x3e')](handleEntityNotFound(_0x47a5d0,null))['then'](removeEntity(_0x47a5d0,null))[_0xd207('0x41')](handleError(_0x47a5d0,null));};exports[_0xd207('0x48')]=function(_0x465e13,_0x15d931){return db[_0xd207('0x29')][_0xd207('0x48')]()[_0xd207('0x3e')](respondWithResult(_0x15d931,null))[_0xd207('0x41')](handleError(_0x15d931,null));};
\ No newline at end of file
+var _0xf6a3=['send','index','map','MailTransferReport','rawAttributes','fieldName','type','key','query','keys','filters','model','attributes','intersection','fields','length','where','filter','merge','VIRTUAL','options','include','rows','show','params','includeAll','find','catch','create','body','destroy','describe','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','error','name'];(function(_0x5874d1,_0x40c2e2){var _0x44cda3=function(_0x13ec25){while(--_0x13ec25){_0x5874d1['push'](_0x5874d1['shift']());}};_0x44cda3(++_0x40c2e2);}(_0xf6a3,0xf2));var _0x3f6a=function(_0x1ff391,_0x5bca49){_0x1ff391=_0x1ff391-0x0;var _0x4bcad8=_0xf6a3[_0x1ff391];return _0x4bcad8;};'use strict';var emlformat=require(_0x3f6a('0x0'));var rimraf=require(_0x3f6a('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x3f6a('0x2'));var rp=require(_0x3f6a('0x3'));var moment=require(_0x3f6a('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x3f6a('0x5'));var util=require('util');var path=require('path');var sox=require(_0x3f6a('0x6'));var csv=require(_0x3f6a('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x3f6a('0x8'));var _=require(_0x3f6a('0x9'));var squel=require(_0x3f6a('0xa'));var crypto=require(_0x3f6a('0xb'));var jsforce=require(_0x3f6a('0xc'));var deskjs=require('desk.js');var toCsv=require(_0x3f6a('0x7'));var querystring=require('querystring');var Papa=require(_0x3f6a('0xd'));var Redis=require(_0x3f6a('0xe'));var authService=require(_0x3f6a('0xf'));var qs=require(_0x3f6a('0x10'));var as=require(_0x3f6a('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x3f6a('0x12'))(_0x3f6a('0x13'));var utils=require(_0x3f6a('0x14'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3c468d,_0x36b14e){_0x36b14e=_0x36b14e||0xcc;return function(_0x3f04e5){if(_0x3f04e5){return _0x3c468d[_0x3f6a('0x15')](_0x36b14e);}return _0x3c468d['status'](_0x36b14e)[_0x3f6a('0x16')]();};}function respondWithResult(_0x1aef96,_0x193ad6){_0x193ad6=_0x193ad6||0xc8;return function(_0x2f8812){if(_0x2f8812){return _0x1aef96[_0x3f6a('0x17')](_0x193ad6)[_0x3f6a('0x18')](_0x2f8812);}};}function respondWithFilteredResult(_0x8f4c67,_0x1a1b58){return function(_0x263770){if(_0x263770){var _0x1607a0=typeof _0x1a1b58[_0x3f6a('0x19')]===_0x3f6a('0x1a')&&typeof _0x1a1b58[_0x3f6a('0x1b')]===_0x3f6a('0x1a');var _0x4c2d0=_0x263770[_0x3f6a('0x1c')];var _0x1ab851=_0x1607a0?0x0:_0x1a1b58[_0x3f6a('0x19')];var _0x233e31=_0x1607a0?_0x263770[_0x3f6a('0x1c')]:_0x1a1b58[_0x3f6a('0x19')]+_0x1a1b58[_0x3f6a('0x1b')];var _0x2f0e46;if(_0x233e31>=_0x4c2d0){_0x233e31=_0x4c2d0;_0x2f0e46=0xc8;}else{_0x2f0e46=0xce;}_0x8f4c67['status'](_0x2f0e46);return _0x8f4c67[_0x3f6a('0x1d')](_0x3f6a('0x1e'),_0x1ab851+'-'+_0x233e31+'/'+_0x4c2d0)['json'](_0x263770);}return null;};}function patchUpdates(_0x2b53ed){return function(_0x54e9a2){try{jsonpatch[_0x3f6a('0x1f')](_0x54e9a2,_0x2b53ed,!![]);}catch(_0xeb180d){return BPromise[_0x3f6a('0x20')](_0xeb180d);}return _0x54e9a2[_0x3f6a('0x21')]();};}function saveUpdates(_0x1ee474,_0xb9fbc2){return function(_0x540e5e){if(_0x540e5e){return _0x540e5e[_0x3f6a('0x22')](_0x1ee474)['then'](function(_0x1a7ac3){return _0x1a7ac3;});}return null;};}function removeEntity(_0x58dc8c,_0xf3ddea){return function(_0x11f341){if(_0x11f341){return _0x11f341['destroy']()[_0x3f6a('0x23')](function(){_0x58dc8c['status'](0xcc)[_0x3f6a('0x16')]();});}};}function handleEntityNotFound(_0x13476e,_0x3694de){return function(_0x506421){if(!_0x506421){_0x13476e[_0x3f6a('0x15')](0x194);}return _0x506421;};}function handleError(_0x33cbb2,_0x1779b3){_0x1779b3=_0x1779b3||0x1f4;return function(_0x22d874){logger[_0x3f6a('0x24')](_0x22d874['stack']);if(_0x22d874[_0x3f6a('0x25')]){delete _0x22d874[_0x3f6a('0x25')];}_0x33cbb2[_0x3f6a('0x17')](_0x1779b3)[_0x3f6a('0x26')](_0x22d874);};}exports[_0x3f6a('0x27')]=function(_0x76e6c1,_0x37c510){var _0x1ccd29={},_0x187b5a={},_0x28102f={'count':0x0,'rows':[]};var _0x18a48b=_[_0x3f6a('0x28')](db[_0x3f6a('0x29')][_0x3f6a('0x2a')],function(_0x144b3f){return{'name':_0x144b3f[_0x3f6a('0x2b')],'type':_0x144b3f[_0x3f6a('0x2c')][_0x3f6a('0x2d')]};});_0x187b5a['model']=_[_0x3f6a('0x28')](_0x18a48b,'name');_0x187b5a[_0x3f6a('0x2e')]=_[_0x3f6a('0x2f')](_0x76e6c1[_0x3f6a('0x2e')]);_0x187b5a[_0x3f6a('0x30')]=_['intersection'](_0x187b5a[_0x3f6a('0x31')],_0x187b5a[_0x3f6a('0x2e')]);_0x1ccd29[_0x3f6a('0x32')]=_[_0x3f6a('0x33')](_0x187b5a['model'],qs[_0x3f6a('0x34')](_0x76e6c1[_0x3f6a('0x2e')][_0x3f6a('0x34')]));_0x1ccd29[_0x3f6a('0x32')]=_0x1ccd29[_0x3f6a('0x32')][_0x3f6a('0x35')]?_0x1ccd29[_0x3f6a('0x32')]:_0x187b5a[_0x3f6a('0x31')];if(!_0x76e6c1[_0x3f6a('0x2e')]['hasOwnProperty']('nolimit')){_0x1ccd29[_0x3f6a('0x1b')]=qs[_0x3f6a('0x1b')](_0x76e6c1[_0x3f6a('0x2e')][_0x3f6a('0x1b')]);_0x1ccd29[_0x3f6a('0x19')]=qs[_0x3f6a('0x19')](_0x76e6c1[_0x3f6a('0x2e')]['offset']);}_0x1ccd29['order']=qs['sort'](_0x76e6c1[_0x3f6a('0x2e')]['sort']);_0x1ccd29[_0x3f6a('0x36')]=qs[_0x3f6a('0x30')](_['pick'](_0x76e6c1[_0x3f6a('0x2e')],_0x187b5a['filters']),_0x18a48b);if(_0x76e6c1['query'][_0x3f6a('0x37')]){_0x1ccd29['where']=_[_0x3f6a('0x38')](_0x1ccd29[_0x3f6a('0x36')],{'$or':_['map'](_0x18a48b,function(_0x3e45c3){if(_0x3e45c3[_0x3f6a('0x2c')]!==_0x3f6a('0x39')){var _0x2dba43={};_0x2dba43[_0x3e45c3[_0x3f6a('0x25')]]={'$like':'%'+_0x76e6c1['query'][_0x3f6a('0x37')]+'%'};return _0x2dba43;}})});}_0x1ccd29=_[_0x3f6a('0x38')]({},_0x1ccd29,_0x76e6c1[_0x3f6a('0x3a')]);var _0x475771={'where':_0x1ccd29[_0x3f6a('0x36')]};return db[_0x3f6a('0x29')][_0x3f6a('0x1c')](_0x475771)[_0x3f6a('0x23')](function(_0xd9fa09){_0x28102f[_0x3f6a('0x1c')]=_0xd9fa09;if(_0x76e6c1[_0x3f6a('0x2e')]['includeAll']){_0x1ccd29[_0x3f6a('0x3b')]=[{'all':!![]}];}return db[_0x3f6a('0x29')]['findAll'](_0x1ccd29);})[_0x3f6a('0x23')](function(_0x114e8c){_0x28102f[_0x3f6a('0x3c')]=_0x114e8c;return _0x28102f;})[_0x3f6a('0x23')](respondWithFilteredResult(_0x37c510,_0x1ccd29))['catch'](handleError(_0x37c510,null));};exports[_0x3f6a('0x3d')]=function(_0x46efa4,_0x4b3fd7){var _0x74c5a9={'raw':!![],'where':{'id':_0x46efa4[_0x3f6a('0x3e')]['id']}},_0x52cf4e={};_0x52cf4e[_0x3f6a('0x31')]=_[_0x3f6a('0x2f')](db['MailTransferReport'][_0x3f6a('0x2a')]);_0x52cf4e[_0x3f6a('0x2e')]=_['keys'](_0x46efa4[_0x3f6a('0x2e')]);_0x52cf4e['filters']=_[_0x3f6a('0x33')](_0x52cf4e['model'],_0x52cf4e[_0x3f6a('0x2e')]);_0x74c5a9[_0x3f6a('0x32')]=_[_0x3f6a('0x33')](_0x52cf4e['model'],qs[_0x3f6a('0x34')](_0x46efa4[_0x3f6a('0x2e')][_0x3f6a('0x34')]));_0x74c5a9['attributes']=_0x74c5a9[_0x3f6a('0x32')][_0x3f6a('0x35')]?_0x74c5a9[_0x3f6a('0x32')]:_0x52cf4e[_0x3f6a('0x31')];if(_0x46efa4['query'][_0x3f6a('0x3f')]){_0x74c5a9['include']=[{'all':!![]}];}_0x74c5a9=_[_0x3f6a('0x38')]({},_0x74c5a9,_0x46efa4['options']);return db[_0x3f6a('0x29')][_0x3f6a('0x40')](_0x74c5a9)['then'](handleEntityNotFound(_0x4b3fd7,null))['then'](respondWithResult(_0x4b3fd7,null))[_0x3f6a('0x41')](handleError(_0x4b3fd7,null));};exports['create']=function(_0x25257e,_0x27d7aa){return db[_0x3f6a('0x29')][_0x3f6a('0x42')](_0x25257e[_0x3f6a('0x43')],{})[_0x3f6a('0x23')](respondWithResult(_0x27d7aa,0xc9))[_0x3f6a('0x41')](handleError(_0x27d7aa,null));};exports[_0x3f6a('0x22')]=function(_0x2ecfba,_0x4476ab){if(_0x2ecfba['body']['id']){delete _0x2ecfba[_0x3f6a('0x43')]['id'];}return db[_0x3f6a('0x29')][_0x3f6a('0x40')]({'where':{'id':_0x2ecfba[_0x3f6a('0x3e')]['id']}})[_0x3f6a('0x23')](handleEntityNotFound(_0x4476ab,null))[_0x3f6a('0x23')](saveUpdates(_0x2ecfba[_0x3f6a('0x43')],null))[_0x3f6a('0x23')](respondWithResult(_0x4476ab,null))[_0x3f6a('0x41')](handleError(_0x4476ab,null));};exports[_0x3f6a('0x44')]=function(_0x22a261,_0x2077f5){return db['MailTransferReport']['find']({'where':{'id':_0x22a261[_0x3f6a('0x3e')]['id']}})[_0x3f6a('0x23')](handleEntityNotFound(_0x2077f5,null))[_0x3f6a('0x23')](removeEntity(_0x2077f5,null))[_0x3f6a('0x41')](handleError(_0x2077f5,null));};exports[_0x3f6a('0x45')]=function(_0x2d6095,_0x281d91){return db[_0x3f6a('0x29')][_0x3f6a('0x45')]()[_0x3f6a('0x23')](respondWithResult(_0x281d91,null))['catch'](handleError(_0x281d91,null));};
\ No newline at end of file
index 05cebdd..1a4fe62 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4a81=['util','../../config/logger','api','request-promise','rimraf','../../config/environment','define','report_mail_transfer','uniqueid','lodash'];(function(_0x5db8e5,_0x35e3d5){var _0x4f800d=function(_0x54d993){while(--_0x54d993){_0x5db8e5['push'](_0x5db8e5['shift']());}};_0x4f800d(++_0x35e3d5);}(_0x4a81,0x1b7));var _0x14a8=function(_0x4f2dc3,_0x52b529){_0x4f2dc3=_0x4f2dc3-0x0;var _0x246103=_0x4a81[_0x4f2dc3];return _0x246103;};'use strict';var _=require(_0x14a8('0x0'));var util=require(_0x14a8('0x1'));var logger=require(_0x14a8('0x2'))(_0x14a8('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x14a8('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x14a8('0x5'));var config=require(_0x14a8('0x6'));var attributes=require('./mailTransferReport.attributes');module['exports']=function(_0x2cd6d2,_0x4aa19e){return _0x2cd6d2[_0x14a8('0x7')]('MailTransferReport',attributes,{'tableName':_0x14a8('0x8'),'paranoid':![],'indexes':[{'name':_0x14a8('0x9'),'fields':[_0x14a8('0x9')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x6666=['lodash','bluebird','request-promise','../../config/environment','./mailTransferReport.attributes','exports','define','MailTransferReport','report_mail_transfer','uniqueid'];(function(_0x207811,_0x3420a6){var _0x170d56=function(_0x4340b7){while(--_0x4340b7){_0x207811['push'](_0x207811['shift']());}};_0x170d56(++_0x3420a6);}(_0x6666,0x6e));var _0x6666=function(_0xf04c6d,_0xe98786){_0xf04c6d=_0xf04c6d-0x0;var _0x4a804e=_0x6666[_0xf04c6d];return _0x4a804e;};'use strict';var _=require(_0x6666('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x6666('0x1'));var rp=require(_0x6666('0x2'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x6666('0x3'));var attributes=require(_0x6666('0x4'));module[_0x6666('0x5')]=function(_0x1cf748,_0xfb7053){return _0x1cf748[_0x6666('0x6')](_0x6666('0x7'),attributes,{'tableName':_0x6666('0x8'),'paranoid':![],'indexes':[{'name':_0x6666('0x9'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
index 837a40e..bdebc16 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8b4c=['../../config/environment','http','request','MailTransferReport,\x20%s,\x20%s','request\x20sent','debug','MailTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','message','result','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc'];(function(_0xd3c0e9,_0x2a4782){var _0x512d90=function(_0x19b183){while(--_0x19b183){_0xd3c0e9['push'](_0xd3c0e9['shift']());}};_0x512d90(++_0x2a4782);}(_0x8b4c,0x1f1));var _0xc8b4=function(_0xdd20f,_0x326d15){_0xdd20f=_0xdd20f-0x0;var _0x13093d=_0x8b4c[_0xdd20f];return _0x13093d;};'use strict';var _=require('lodash');var util=require(_0xc8b4('0x0'));var moment=require(_0xc8b4('0x1'));var BPromise=require(_0xc8b4('0x2'));var rs=require(_0xc8b4('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xc8b4('0x4'))['db'];var utils=require(_0xc8b4('0x5'));var logger=require('../../config/logger')(_0xc8b4('0x6'));var config=require(_0xc8b4('0x7'));var jayson=require('jayson/promise');var client=jayson['client'][_0xc8b4('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x37a389,_0x5bbbd3,_0x597a6b){return new BPromise(function(_0x16f697,_0x9ac724){return client[_0xc8b4('0x9')](_0x37a389,_0x597a6b)['then'](function(_0x715e52){logger['info'](_0xc8b4('0xa'),_0x5bbbd3,_0xc8b4('0xb'));logger[_0xc8b4('0xc')](_0xc8b4('0xd'),_0x5bbbd3,_0xc8b4('0xb'),JSON[_0xc8b4('0xe')](_0x715e52));if(_0x715e52[_0xc8b4('0xf')]){if(_0x715e52[_0xc8b4('0xf')]['code']===0x1f4){logger[_0xc8b4('0xf')](_0xc8b4('0xa'),_0x5bbbd3,_0x715e52[_0xc8b4('0xf')]['message']);return _0x9ac724(_0x715e52[_0xc8b4('0xf')][_0xc8b4('0x10')]);}logger[_0xc8b4('0xf')]('MailTransferReport,\x20%s,\x20%s',_0x5bbbd3,_0x715e52[_0xc8b4('0xf')][_0xc8b4('0x10')]);return _0x16f697(_0x715e52['error'][_0xc8b4('0x10')]);}else{logger['info'](_0xc8b4('0xa'),_0x5bbbd3,_0xc8b4('0xb'));_0x16f697(_0x715e52[_0xc8b4('0x11')][_0xc8b4('0x10')]);}})['catch'](function(_0x307e0f){logger[_0xc8b4('0xf')](_0xc8b4('0xa'),_0x5bbbd3,_0x307e0f);_0x9ac724(_0x307e0f);});});}
\ No newline at end of file
+var _0x500b=['then','info','MailTransferReport,\x20%s,\x20%s','request\x20sent','debug','MailTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x44c193,_0x5d61a2){var _0x454a14=function(_0x18ea25){while(--_0x18ea25){_0x44c193['push'](_0x44c193['shift']());}};_0x454a14(++_0x5d61a2);}(_0x500b,0xa2));var _0xb500=function(_0x4d1dcb,_0x49df03){_0x4d1dcb=_0x4d1dcb-0x0;var _0x3088a7=_0x500b[_0x4d1dcb];return _0x3088a7;};'use strict';var _=require('lodash');var util=require(_0xb500('0x0'));var moment=require(_0xb500('0x1'));var BPromise=require(_0xb500('0x2'));var rs=require(_0xb500('0x3'));var fs=require('fs');var Redis=require(_0xb500('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xb500('0x5'));var logger=require(_0xb500('0x6'))(_0xb500('0x7'));var config=require(_0xb500('0x8'));var jayson=require(_0xb500('0x9'));var client=jayson[_0xb500('0xa')][_0xb500('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xa03a1a,_0x5b445c,_0x7652e){return new BPromise(function(_0x3b877c,_0x109ad6){return client[_0xb500('0xc')](_0xa03a1a,_0x7652e)[_0xb500('0xd')](function(_0x1c1e67){logger[_0xb500('0xe')](_0xb500('0xf'),_0x5b445c,_0xb500('0x10'));logger[_0xb500('0x11')](_0xb500('0x12'),_0x5b445c,_0xb500('0x10'),JSON[_0xb500('0x13')](_0x1c1e67));if(_0x1c1e67['error']){if(_0x1c1e67[_0xb500('0x14')][_0xb500('0x15')]===0x1f4){logger[_0xb500('0x14')](_0xb500('0xf'),_0x5b445c,_0x1c1e67['error'][_0xb500('0x16')]);return _0x109ad6(_0x1c1e67[_0xb500('0x14')][_0xb500('0x16')]);}logger[_0xb500('0x14')](_0xb500('0xf'),_0x5b445c,_0x1c1e67[_0xb500('0x14')][_0xb500('0x16')]);return _0x3b877c(_0x1c1e67['error'][_0xb500('0x16')]);}else{logger[_0xb500('0xe')](_0xb500('0xf'),_0x5b445c,_0xb500('0x10'));_0x3b877c(_0x1c1e67[_0xb500('0x17')][_0xb500('0x16')]);}})[_0xb500('0x18')](function(_0x37bf34){logger[_0xb500('0x14')](_0xb500('0xf'),_0x5b445c,_0x37bf34);_0x109ad6(_0x37bf34);});});}
\ No newline at end of file
index a6c8340..0d87b94 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6840=['delete','destroy','exports','util','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./memberReport.controller','get','isAuthenticated','index','/describe','/:id','show','create','put','update'];(function(_0x2ea66f,_0x195499){var _0x2386dc=function(_0x1d0336){while(--_0x1d0336){_0x2ea66f['push'](_0x2ea66f['shift']());}};_0x2386dc(++_0x195499);}(_0x6840,0x12f));var _0x0684=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x6840[_0x122ef9];return _0x42fba0;};'use strict';var multer=require('multer');var util=require(_0x0684('0x0'));var path=require('path');var timeout=require(_0x0684('0x1'));var express=require('express');var router=express[_0x0684('0x2')]();var fs_extra=require(_0x0684('0x3'));var auth=require(_0x0684('0x4'));var interaction=require(_0x0684('0x5'));var config=require(_0x0684('0x6'));var controller=require(_0x0684('0x7'));router[_0x0684('0x8')]('/',auth[_0x0684('0x9')](),controller[_0x0684('0xa')]);router[_0x0684('0x8')](_0x0684('0xb'),auth['isAuthenticated'](),controller['describe']);router['get'](_0x0684('0xc'),auth['isAuthenticated'](),controller[_0x0684('0xd')]);router['post']('/',auth[_0x0684('0x9')](),controller[_0x0684('0xe')]);router[_0x0684('0xf')](_0x0684('0xc'),auth[_0x0684('0x9')](),controller[_0x0684('0x10')]);router[_0x0684('0x11')](_0x0684('0xc'),auth[_0x0684('0x9')](),controller[_0x0684('0x12')]);module[_0x0684('0x13')]=router;
\ No newline at end of file
+var _0x5d64=['../../components/auth/service','../../components/interaction/service','../../config/environment','./memberReport.controller','get','isAuthenticated','index','/describe','show','create','put','delete','/:id','exports','multer','util','connect-timeout','Router','fs-extra'];(function(_0x2dcec8,_0x4d998d){var _0x9a610d=function(_0x5cc449){while(--_0x5cc449){_0x2dcec8['push'](_0x2dcec8['shift']());}};_0x9a610d(++_0x4d998d);}(_0x5d64,0x13e));var _0x45d6=function(_0x45659c,_0xc3a04){_0x45659c=_0x45659c-0x0;var _0x4cc33f=_0x5d64[_0x45659c];return _0x4cc33f;};'use strict';var multer=require(_0x45d6('0x0'));var util=require(_0x45d6('0x1'));var path=require('path');var timeout=require(_0x45d6('0x2'));var express=require('express');var router=express[_0x45d6('0x3')]();var fs_extra=require(_0x45d6('0x4'));var auth=require(_0x45d6('0x5'));var interaction=require(_0x45d6('0x6'));var config=require(_0x45d6('0x7'));var controller=require(_0x45d6('0x8'));router[_0x45d6('0x9')]('/',auth[_0x45d6('0xa')](),controller[_0x45d6('0xb')]);router[_0x45d6('0x9')](_0x45d6('0xc'),auth[_0x45d6('0xa')](),controller['describe']);router['get']('/:id',auth['isAuthenticated'](),controller[_0x45d6('0xd')]);router['post']('/',auth[_0x45d6('0xa')](),controller[_0x45d6('0xe')]);router[_0x45d6('0xf')]('/:id',auth['isAuthenticated'](),controller['update']);router[_0x45d6('0x10')](_0x45d6('0x11'),auth[_0x45d6('0xa')](),controller['destroy']);module[_0x45d6('0x12')]=router;
\ No newline at end of file
index 3fba4f1..3ab05a9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe02e=['LOGIN,\x20PAUSE,\x20TALKING','DATE','getDataValue','enterAt','diff','seconds','setDataValue','exitAt','duration','talk:[inbound,\x20outbound],\x20pause:[reason]','talk:[start]','talk:[destination]','talk:[dial\x20string]','talk:[queue]','INTEGER','sequelize','moment','exports','STRING','DEFAULT\x20PAUSE'];(function(_0x1b45d0,_0x4a1bbc){var _0x5ba92f=function(_0x2efac6){while(--_0x2efac6){_0x1b45d0['push'](_0x1b45d0['shift']());}};_0x5ba92f(++_0x4a1bbc);}(_0xe02e,0x1b3));var _0xee02=function(_0x2b5eae,_0x55010d){_0x2b5eae=_0x2b5eae-0x0;var _0x5f3ac9=_0xe02e[_0x2b5eae];return _0x5f3ac9;};'use strict';var Sequelize=require(_0xee02('0x0'));var moment=require(_0xee02('0x1'));module[_0xee02('0x2')]={'channel':{'type':Sequelize['STRING']},'membername':{'type':Sequelize['STRING']},'interface':{'type':Sequelize[_0xee02('0x3')]},'type':{'type':Sequelize[_0xee02('0x3')],'defaultValue':_0xee02('0x4'),'comment':_0xee02('0x5')},'duration':{'type':Sequelize['INTEGER']},'enterAt':{'type':Sequelize[_0xee02('0x6')]},'exitAt':{'type':Sequelize[_0xee02('0x6')],'set':function(_0x55ba54){var _0x1ab8ec=moment(_0x55ba54);var _0x472c85=moment(this[_0xee02('0x7')](_0xee02('0x8')));var _0x2d9c4c=_0x1ab8ec[_0xee02('0x9')](_0x472c85,_0xee02('0xa'));this[_0xee02('0xb')](_0xee02('0xc'),_0x55ba54);this[_0xee02('0xb')](_0xee02('0xd'),_0x2d9c4c>=0x0?_0x2d9c4c:null);}},'data1':{'type':Sequelize[_0xee02('0x3')],'comment':_0xee02('0xe')},'data2':{'type':Sequelize['STRING'],'comment':_0xee02('0xf')},'data3':{'type':Sequelize['STRING'],'comment':_0xee02('0x10')},'data4':{'type':Sequelize[_0xee02('0x3')],'comment':_0xee02('0x11')},'data5':{'type':Sequelize[_0xee02('0x3')],'comment':_0xee02('0x12')},'role':{'type':Sequelize['STRING']},'internal':{'type':Sequelize[_0xee02('0x13')]},'uniqueid':{'type':Sequelize[_0xee02('0x3')]}};
\ No newline at end of file
+var _0x12d0=['STRING','DEFAULT\x20PAUSE','INTEGER','DATE','getDataValue','enterAt','diff','seconds','setDataValue','exitAt','duration','talk:[inbound,\x20outbound],\x20pause:[reason]','talk:[start]','talk:[destination]','talk:[dial\x20string]','talk:[queue]','sequelize','exports'];(function(_0x2bc6be,_0x9bf473){var _0x3a1197=function(_0x35d452){while(--_0x35d452){_0x2bc6be['push'](_0x2bc6be['shift']());}};_0x3a1197(++_0x9bf473);}(_0x12d0,0x1d2));var _0x012d=function(_0xb7ba3f,_0x3b4b15){_0xb7ba3f=_0xb7ba3f-0x0;var _0x47c212=_0x12d0[_0xb7ba3f];return _0x47c212;};'use strict';var Sequelize=require(_0x012d('0x0'));var moment=require('moment');module[_0x012d('0x1')]={'channel':{'type':Sequelize[_0x012d('0x2')]},'membername':{'type':Sequelize[_0x012d('0x2')]},'interface':{'type':Sequelize[_0x012d('0x2')]},'type':{'type':Sequelize[_0x012d('0x2')],'defaultValue':_0x012d('0x3'),'comment':'LOGIN,\x20PAUSE,\x20TALKING'},'duration':{'type':Sequelize[_0x012d('0x4')]},'enterAt':{'type':Sequelize[_0x012d('0x5')]},'exitAt':{'type':Sequelize[_0x012d('0x5')],'set':function(_0x482f03){var _0x23245c=moment(_0x482f03);var _0x2cccce=moment(this[_0x012d('0x6')](_0x012d('0x7')));var _0xe209bf=_0x23245c[_0x012d('0x8')](_0x2cccce,_0x012d('0x9'));this[_0x012d('0xa')](_0x012d('0xb'),_0x482f03);this[_0x012d('0xa')](_0x012d('0xc'),_0xe209bf>=0x0?_0xe209bf:null);}},'data1':{'type':Sequelize[_0x012d('0x2')],'comment':_0x012d('0xd')},'data2':{'type':Sequelize[_0x012d('0x2')],'comment':_0x012d('0xe')},'data3':{'type':Sequelize[_0x012d('0x2')],'comment':_0x012d('0xf')},'data4':{'type':Sequelize['STRING'],'comment':_0x012d('0x10')},'data5':{'type':Sequelize['STRING'],'comment':_0x012d('0x11')},'role':{'type':Sequelize['STRING']},'internal':{'type':Sequelize['INTEGER']},'uniqueid':{'type':Sequelize[_0x012d('0x2')]}};
\ No newline at end of file
index d68cab0..cbfb987 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x55ca=['merge','filter','includeAll','include','findAll','rawAttributes','options','create','body','find','params','catch','destroy','describe','eml-format','rimraf','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','undefined','limit','count','reject','update','then','end','sendStatus','error','stack','name','send','index','map','MemberReport','type','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where'];(function(_0x46e363,_0x45d7e2){var _0x3fb059=function(_0x5e6274){while(--_0x5e6274){_0x46e363['push'](_0x46e363['shift']());}};_0x3fb059(++_0x45d7e2);}(_0x55ca,0x126));var _0xa55c=function(_0x1b08d4,_0x8a710c){_0x1b08d4=_0x1b08d4-0x0;var _0x9aef3e=_0x55ca[_0x1b08d4];return _0x9aef3e;};'use strict';var emlformat=require(_0xa55c('0x0'));var rimraf=require(_0xa55c('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xa55c('0x2'));var BPromise=require(_0xa55c('0x3'));var Mustache=require('mustache');var util=require(_0xa55c('0x4'));var path=require(_0xa55c('0x5'));var sox=require(_0xa55c('0x6'));var csv=require(_0xa55c('0x7'));var ejs=require(_0xa55c('0x8'));var fs=require('fs');var fs_extra=require(_0xa55c('0x9'));var _=require(_0xa55c('0xa'));var squel=require('squel');var crypto=require(_0xa55c('0xb'));var jsforce=require(_0xa55c('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xa55c('0x7'));var querystring=require(_0xa55c('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xa55c('0xe'));var qs=require(_0xa55c('0xf'));var as=require(_0xa55c('0x10'));var hardwareService=require(_0xa55c('0x11'));var logger=require(_0xa55c('0x12'))(_0xa55c('0x13'));var utils=require(_0xa55c('0x14'));var config=require(_0xa55c('0x15'));var licenseUtil=require(_0xa55c('0x16'));var db=require(_0xa55c('0x17'))['db'];function respondWithStatusCode(_0x5d47ff,_0x59d84a){_0x59d84a=_0x59d84a||0xcc;return function(_0x2a35be){if(_0x2a35be){return _0x5d47ff['sendStatus'](_0x59d84a);}return _0x5d47ff['status'](_0x59d84a)['end']();};}function respondWithResult(_0x18ee85,_0x3930e4){_0x3930e4=_0x3930e4||0xc8;return function(_0x462cd6){if(_0x462cd6){return _0x18ee85[_0xa55c('0x18')](_0x3930e4)[_0xa55c('0x19')](_0x462cd6);}};}function respondWithFilteredResult(_0x247e77,_0x4e0b2f){return function(_0x3ccf65){if(_0x3ccf65){var _0x3dcf4f=typeof _0x4e0b2f[_0xa55c('0x1a')]===_0xa55c('0x1b')&&typeof _0x4e0b2f[_0xa55c('0x1c')]===_0xa55c('0x1b');var _0x51590e=_0x3ccf65[_0xa55c('0x1d')];var _0x24783b=_0x3dcf4f?0x0:_0x4e0b2f['offset'];var _0x3d4c9e=_0x3dcf4f?_0x3ccf65[_0xa55c('0x1d')]:_0x4e0b2f[_0xa55c('0x1a')]+_0x4e0b2f[_0xa55c('0x1c')];var _0x23a1ae;if(_0x3d4c9e>=_0x51590e){_0x3d4c9e=_0x51590e;_0x23a1ae=0xc8;}else{_0x23a1ae=0xce;}_0x247e77[_0xa55c('0x18')](_0x23a1ae);return _0x247e77['set']('Content-Range',_0x24783b+'-'+_0x3d4c9e+'/'+_0x51590e)[_0xa55c('0x19')](_0x3ccf65);}return null;};}function patchUpdates(_0x3776ac){return function(_0xade4c4){try{jsonpatch['apply'](_0xade4c4,_0x3776ac,!![]);}catch(_0x383d92){return BPromise[_0xa55c('0x1e')](_0x383d92);}return _0xade4c4['save']();};}function saveUpdates(_0x187a87,_0x133096){return function(_0x940f28){if(_0x940f28){return _0x940f28[_0xa55c('0x1f')](_0x187a87)[_0xa55c('0x20')](function(_0x49ed04){return _0x49ed04;});}return null;};}function removeEntity(_0x1fc828,_0x504c24){return function(_0x5ba836){if(_0x5ba836){return _0x5ba836['destroy']()[_0xa55c('0x20')](function(){_0x1fc828['status'](0xcc)[_0xa55c('0x21')]();});}};}function handleEntityNotFound(_0x190757,_0x3f64de){return function(_0xf0e574){if(!_0xf0e574){_0x190757[_0xa55c('0x22')](0x194);}return _0xf0e574;};}function handleError(_0x170ba4,_0x1da633){_0x1da633=_0x1da633||0x1f4;return function(_0x11e7f7){logger[_0xa55c('0x23')](_0x11e7f7[_0xa55c('0x24')]);if(_0x11e7f7[_0xa55c('0x25')]){delete _0x11e7f7['name'];}_0x170ba4[_0xa55c('0x18')](_0x1da633)[_0xa55c('0x26')](_0x11e7f7);};}exports[_0xa55c('0x27')]=function(_0x906caa,_0x5d940d){var _0x1377b0={},_0x22f6b6={},_0x1b8388={'count':0x0,'rows':[]};var _0x201941=_[_0xa55c('0x28')](db[_0xa55c('0x29')]['rawAttributes'],function(_0x23e698){return{'name':_0x23e698['fieldName'],'type':_0x23e698[_0xa55c('0x2a')][_0xa55c('0x2b')]};});_0x22f6b6[_0xa55c('0x2c')]=_[_0xa55c('0x28')](_0x201941,'name');_0x22f6b6[_0xa55c('0x2d')]=_[_0xa55c('0x2e')](_0x906caa[_0xa55c('0x2d')]);_0x22f6b6[_0xa55c('0x2f')]=_[_0xa55c('0x30')](_0x22f6b6[_0xa55c('0x2c')],_0x22f6b6[_0xa55c('0x2d')]);_0x1377b0[_0xa55c('0x31')]=_[_0xa55c('0x30')](_0x22f6b6[_0xa55c('0x2c')],qs[_0xa55c('0x32')](_0x906caa['query']['fields']));_0x1377b0[_0xa55c('0x31')]=_0x1377b0[_0xa55c('0x31')]['length']?_0x1377b0[_0xa55c('0x31')]:_0x22f6b6[_0xa55c('0x2c')];if(!_0x906caa[_0xa55c('0x2d')][_0xa55c('0x33')](_0xa55c('0x34'))){_0x1377b0[_0xa55c('0x1c')]=qs[_0xa55c('0x1c')](_0x906caa[_0xa55c('0x2d')][_0xa55c('0x1c')]);_0x1377b0['offset']=qs['offset'](_0x906caa['query'][_0xa55c('0x1a')]);}_0x1377b0[_0xa55c('0x35')]=qs[_0xa55c('0x36')](_0x906caa['query'][_0xa55c('0x36')]);_0x1377b0['where']=qs[_0xa55c('0x2f')](_['pick'](_0x906caa[_0xa55c('0x2d')],_0x22f6b6[_0xa55c('0x2f')]),_0x201941);if(_0x906caa[_0xa55c('0x2d')]['filter']){_0x1377b0[_0xa55c('0x37')]=_[_0xa55c('0x38')](_0x1377b0['where'],{'$or':_[_0xa55c('0x28')](_0x201941,function(_0x194e78){if(_0x194e78['type']!=='VIRTUAL'){var _0x235f6b={};_0x235f6b[_0x194e78['name']]={'$like':'%'+_0x906caa[_0xa55c('0x2d')][_0xa55c('0x39')]+'%'};return _0x235f6b;}})});}_0x1377b0=_['merge']({},_0x1377b0,_0x906caa['options']);var _0x5e50b6={'where':_0x1377b0['where']};return db[_0xa55c('0x29')][_0xa55c('0x1d')](_0x5e50b6)[_0xa55c('0x20')](function(_0x99c4f8){_0x1b8388[_0xa55c('0x1d')]=_0x99c4f8;if(_0x906caa['query'][_0xa55c('0x3a')]){_0x1377b0[_0xa55c('0x3b')]=[{'all':!![]}];}return db[_0xa55c('0x29')][_0xa55c('0x3c')](_0x1377b0);})[_0xa55c('0x20')](function(_0x23cef5){_0x1b8388['rows']=_0x23cef5;return _0x1b8388;})[_0xa55c('0x20')](respondWithFilteredResult(_0x5d940d,_0x1377b0))['catch'](handleError(_0x5d940d,null));};exports['show']=function(_0x404e7f,_0x1f63d8){var _0x496920={'raw':!![],'where':{'id':_0x404e7f['params']['id']}},_0x2bd98b={};_0x2bd98b['model']=_[_0xa55c('0x2e')](db[_0xa55c('0x29')][_0xa55c('0x3d')]);_0x2bd98b['query']=_[_0xa55c('0x2e')](_0x404e7f[_0xa55c('0x2d')]);_0x2bd98b['filters']=_[_0xa55c('0x30')](_0x2bd98b['model'],_0x2bd98b[_0xa55c('0x2d')]);_0x496920[_0xa55c('0x31')]=_['intersection'](_0x2bd98b[_0xa55c('0x2c')],qs[_0xa55c('0x32')](_0x404e7f['query'][_0xa55c('0x32')]));_0x496920[_0xa55c('0x31')]=_0x496920[_0xa55c('0x31')]['length']?_0x496920[_0xa55c('0x31')]:_0x2bd98b['model'];if(_0x404e7f[_0xa55c('0x2d')][_0xa55c('0x3a')]){_0x496920[_0xa55c('0x3b')]=[{'all':!![]}];}_0x496920=_['merge']({},_0x496920,_0x404e7f[_0xa55c('0x3e')]);return db[_0xa55c('0x29')]['find'](_0x496920)[_0xa55c('0x20')](handleEntityNotFound(_0x1f63d8,null))[_0xa55c('0x20')](respondWithResult(_0x1f63d8,null))['catch'](handleError(_0x1f63d8,null));};exports[_0xa55c('0x3f')]=function(_0xd3fe78,_0x52f9a7){return db[_0xa55c('0x29')][_0xa55c('0x3f')](_0xd3fe78[_0xa55c('0x40')],{})[_0xa55c('0x20')](respondWithResult(_0x52f9a7,0xc9))['catch'](handleError(_0x52f9a7,null));};exports[_0xa55c('0x1f')]=function(_0x58a7ea,_0x2157d6){if(_0x58a7ea[_0xa55c('0x40')]['id']){delete _0x58a7ea[_0xa55c('0x40')]['id'];}return db['MemberReport'][_0xa55c('0x41')]({'where':{'id':_0x58a7ea[_0xa55c('0x42')]['id']}})['then'](handleEntityNotFound(_0x2157d6,null))[_0xa55c('0x20')](saveUpdates(_0x58a7ea[_0xa55c('0x40')],null))[_0xa55c('0x20')](respondWithResult(_0x2157d6,null))[_0xa55c('0x43')](handleError(_0x2157d6,null));};exports[_0xa55c('0x44')]=function(_0x1c84d9,_0x1e1293){return db[_0xa55c('0x29')][_0xa55c('0x41')]({'where':{'id':_0x1c84d9[_0xa55c('0x42')]['id']}})['then'](handleEntityNotFound(_0x1e1293,null))[_0xa55c('0x20')](removeEntity(_0x1e1293,null))[_0xa55c('0x43')](handleError(_0x1e1293,null));};exports[_0xa55c('0x45')]=function(_0x4f73b6,_0x4c3095){return db[_0xa55c('0x29')]['describe']()[_0xa55c('0x20')](respondWithResult(_0x4c3095,null))['catch'](handleError(_0x4c3095,null));};
\ No newline at end of file
+var _0x9c44=['catch','params','find','create','body','describe','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','sox','ejs','fs-extra','lodash','squel','crypto','desk.js','to-csv','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','destroy','sendStatus','stack','name','send','index','map','MemberReport','rawAttributes','fieldName','type','query','keys','filters','model','attributes','intersection','fields','length','hasOwnProperty','order','sort','pick','filter','where','merge','VIRTUAL','options','then','includeAll','include','findAll','rows'];(function(_0x3ffc30,_0x3ae8ff){var _0x57c8d9=function(_0x33bfa7){while(--_0x33bfa7){_0x3ffc30['push'](_0x3ffc30['shift']());}};_0x57c8d9(++_0x3ae8ff);}(_0x9c44,0x178));var _0x49c4=function(_0x4b055c,_0x4b870b){_0x4b055c=_0x4b055c-0x0;var _0x4b62bb=_0x9c44[_0x4b055c];return _0x4b62bb;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x49c4('0x0'));var jsonpatch=require(_0x49c4('0x1'));var rp=require(_0x49c4('0x2'));var moment=require(_0x49c4('0x3'));var BPromise=require(_0x49c4('0x4'));var Mustache=require(_0x49c4('0x5'));var util=require('util');var path=require('path');var sox=require(_0x49c4('0x6'));var csv=require('to-csv');var ejs=require(_0x49c4('0x7'));var fs=require('fs');var fs_extra=require(_0x49c4('0x8'));var _=require(_0x49c4('0x9'));var squel=require(_0x49c4('0xa'));var crypto=require(_0x49c4('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x49c4('0xc'));var toCsv=require(_0x49c4('0xd'));var querystring=require(_0x49c4('0xe'));var Papa=require(_0x49c4('0xf'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x49c4('0x10'));var as=require(_0x49c4('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x49c4('0x12'))(_0x49c4('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x49c4('0x14'));var db=require(_0x49c4('0x15'))['db'];function respondWithStatusCode(_0x5487cd,_0x7df3a9){_0x7df3a9=_0x7df3a9||0xcc;return function(_0x403bfb){if(_0x403bfb){return _0x5487cd['sendStatus'](_0x7df3a9);}return _0x5487cd[_0x49c4('0x16')](_0x7df3a9)[_0x49c4('0x17')]();};}function respondWithResult(_0x21f15a,_0x2decee){_0x2decee=_0x2decee||0xc8;return function(_0x12777c){if(_0x12777c){return _0x21f15a[_0x49c4('0x16')](_0x2decee)[_0x49c4('0x18')](_0x12777c);}};}function respondWithFilteredResult(_0x3de397,_0x58d177){return function(_0x3acd06){if(_0x3acd06){var _0x141003=typeof _0x58d177[_0x49c4('0x19')]===_0x49c4('0x1a')&&typeof _0x58d177[_0x49c4('0x1b')]==='undefined';var _0x44e607=_0x3acd06[_0x49c4('0x1c')];var _0x4c3253=_0x141003?0x0:_0x58d177['offset'];var _0x3c782d=_0x141003?_0x3acd06[_0x49c4('0x1c')]:_0x58d177[_0x49c4('0x19')]+_0x58d177['limit'];var _0x24856d;if(_0x3c782d>=_0x44e607){_0x3c782d=_0x44e607;_0x24856d=0xc8;}else{_0x24856d=0xce;}_0x3de397['status'](_0x24856d);return _0x3de397[_0x49c4('0x1d')](_0x49c4('0x1e'),_0x4c3253+'-'+_0x3c782d+'/'+_0x44e607)[_0x49c4('0x18')](_0x3acd06);}return null;};}function patchUpdates(_0x291526){return function(_0x382040){try{jsonpatch[_0x49c4('0x1f')](_0x382040,_0x291526,!![]);}catch(_0x280893){return BPromise[_0x49c4('0x20')](_0x280893);}return _0x382040[_0x49c4('0x21')]();};}function saveUpdates(_0x578447,_0x527126){return function(_0x57f502){if(_0x57f502){return _0x57f502[_0x49c4('0x22')](_0x578447)['then'](function(_0x592bb8){return _0x592bb8;});}return null;};}function removeEntity(_0x2263ae,_0x15581b){return function(_0x26c640){if(_0x26c640){return _0x26c640[_0x49c4('0x23')]()['then'](function(){_0x2263ae['status'](0xcc)[_0x49c4('0x17')]();});}};}function handleEntityNotFound(_0x9cb797,_0x565423){return function(_0x207358){if(!_0x207358){_0x9cb797[_0x49c4('0x24')](0x194);}return _0x207358;};}function handleError(_0x210159,_0xa7a826){_0xa7a826=_0xa7a826||0x1f4;return function(_0x531d92){logger['error'](_0x531d92[_0x49c4('0x25')]);if(_0x531d92['name']){delete _0x531d92[_0x49c4('0x26')];}_0x210159[_0x49c4('0x16')](_0xa7a826)[_0x49c4('0x27')](_0x531d92);};}exports[_0x49c4('0x28')]=function(_0x5987ae,_0x889909){var _0x2b2793={},_0x46e04d={},_0x4f28a2={'count':0x0,'rows':[]};var _0x6329b3=_[_0x49c4('0x29')](db[_0x49c4('0x2a')][_0x49c4('0x2b')],function(_0x17b50f){return{'name':_0x17b50f[_0x49c4('0x2c')],'type':_0x17b50f[_0x49c4('0x2d')]['key']};});_0x46e04d['model']=_['map'](_0x6329b3,_0x49c4('0x26'));_0x46e04d[_0x49c4('0x2e')]=_[_0x49c4('0x2f')](_0x5987ae[_0x49c4('0x2e')]);_0x46e04d[_0x49c4('0x30')]=_['intersection'](_0x46e04d[_0x49c4('0x31')],_0x46e04d[_0x49c4('0x2e')]);_0x2b2793[_0x49c4('0x32')]=_[_0x49c4('0x33')](_0x46e04d['model'],qs['fields'](_0x5987ae[_0x49c4('0x2e')][_0x49c4('0x34')]));_0x2b2793[_0x49c4('0x32')]=_0x2b2793[_0x49c4('0x32')][_0x49c4('0x35')]?_0x2b2793['attributes']:_0x46e04d[_0x49c4('0x31')];if(!_0x5987ae[_0x49c4('0x2e')][_0x49c4('0x36')]('nolimit')){_0x2b2793['limit']=qs[_0x49c4('0x1b')](_0x5987ae[_0x49c4('0x2e')][_0x49c4('0x1b')]);_0x2b2793[_0x49c4('0x19')]=qs[_0x49c4('0x19')](_0x5987ae[_0x49c4('0x2e')][_0x49c4('0x19')]);}_0x2b2793[_0x49c4('0x37')]=qs[_0x49c4('0x38')](_0x5987ae['query'][_0x49c4('0x38')]);_0x2b2793['where']=qs[_0x49c4('0x30')](_[_0x49c4('0x39')](_0x5987ae[_0x49c4('0x2e')],_0x46e04d[_0x49c4('0x30')]),_0x6329b3);if(_0x5987ae['query'][_0x49c4('0x3a')]){_0x2b2793[_0x49c4('0x3b')]=_[_0x49c4('0x3c')](_0x2b2793['where'],{'$or':_[_0x49c4('0x29')](_0x6329b3,function(_0x21d8c7){if(_0x21d8c7[_0x49c4('0x2d')]!==_0x49c4('0x3d')){var _0x1ba7a0={};_0x1ba7a0[_0x21d8c7[_0x49c4('0x26')]]={'$like':'%'+_0x5987ae[_0x49c4('0x2e')][_0x49c4('0x3a')]+'%'};return _0x1ba7a0;}})});}_0x2b2793=_[_0x49c4('0x3c')]({},_0x2b2793,_0x5987ae[_0x49c4('0x3e')]);var _0x1e506a={'where':_0x2b2793['where']};return db[_0x49c4('0x2a')][_0x49c4('0x1c')](_0x1e506a)[_0x49c4('0x3f')](function(_0x23aa32){_0x4f28a2[_0x49c4('0x1c')]=_0x23aa32;if(_0x5987ae[_0x49c4('0x2e')][_0x49c4('0x40')]){_0x2b2793[_0x49c4('0x41')]=[{'all':!![]}];}return db[_0x49c4('0x2a')][_0x49c4('0x42')](_0x2b2793);})[_0x49c4('0x3f')](function(_0xa3d59e){_0x4f28a2[_0x49c4('0x43')]=_0xa3d59e;return _0x4f28a2;})['then'](respondWithFilteredResult(_0x889909,_0x2b2793))[_0x49c4('0x44')](handleError(_0x889909,null));};exports['show']=function(_0x104efb,_0x4915bc){var _0x28d4fb={'raw':!![],'where':{'id':_0x104efb[_0x49c4('0x45')]['id']}},_0x1480da={};_0x1480da[_0x49c4('0x31')]=_['keys'](db['MemberReport'][_0x49c4('0x2b')]);_0x1480da[_0x49c4('0x2e')]=_[_0x49c4('0x2f')](_0x104efb[_0x49c4('0x2e')]);_0x1480da['filters']=_[_0x49c4('0x33')](_0x1480da[_0x49c4('0x31')],_0x1480da[_0x49c4('0x2e')]);_0x28d4fb[_0x49c4('0x32')]=_[_0x49c4('0x33')](_0x1480da[_0x49c4('0x31')],qs[_0x49c4('0x34')](_0x104efb[_0x49c4('0x2e')][_0x49c4('0x34')]));_0x28d4fb['attributes']=_0x28d4fb[_0x49c4('0x32')]['length']?_0x28d4fb[_0x49c4('0x32')]:_0x1480da[_0x49c4('0x31')];if(_0x104efb[_0x49c4('0x2e')][_0x49c4('0x40')]){_0x28d4fb[_0x49c4('0x41')]=[{'all':!![]}];}_0x28d4fb=_['merge']({},_0x28d4fb,_0x104efb[_0x49c4('0x3e')]);return db[_0x49c4('0x2a')][_0x49c4('0x46')](_0x28d4fb)[_0x49c4('0x3f')](handleEntityNotFound(_0x4915bc,null))[_0x49c4('0x3f')](respondWithResult(_0x4915bc,null))[_0x49c4('0x44')](handleError(_0x4915bc,null));};exports[_0x49c4('0x47')]=function(_0x4d89e0,_0x3bac1b){return db['MemberReport'][_0x49c4('0x47')](_0x4d89e0[_0x49c4('0x48')],{})[_0x49c4('0x3f')](respondWithResult(_0x3bac1b,0xc9))[_0x49c4('0x44')](handleError(_0x3bac1b,null));};exports[_0x49c4('0x22')]=function(_0x30bea5,_0x2c6be1){if(_0x30bea5['body']['id']){delete _0x30bea5[_0x49c4('0x48')]['id'];}return db[_0x49c4('0x2a')]['find']({'where':{'id':_0x30bea5[_0x49c4('0x45')]['id']}})[_0x49c4('0x3f')](handleEntityNotFound(_0x2c6be1,null))[_0x49c4('0x3f')](saveUpdates(_0x30bea5[_0x49c4('0x48')],null))['then'](respondWithResult(_0x2c6be1,null))['catch'](handleError(_0x2c6be1,null));};exports[_0x49c4('0x23')]=function(_0x4e8221,_0x4597c3){return db[_0x49c4('0x2a')][_0x49c4('0x46')]({'where':{'id':_0x4e8221[_0x49c4('0x45')]['id']}})[_0x49c4('0x3f')](handleEntityNotFound(_0x4597c3,null))[_0x49c4('0x3f')](removeEntity(_0x4597c3,null))[_0x49c4('0x44')](handleError(_0x4597c3,null));};exports['describe']=function(_0x1f26c2,_0x1550ce){return db[_0x49c4('0x2a')][_0x49c4('0x49')]()[_0x49c4('0x3f')](respondWithResult(_0x1550ce,null))[_0x49c4('0x44')](handleError(_0x1550ce,null));};
\ No newline at end of file
index c47e9eb..431ddd7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1d64=['rimraf','../../config/environment','exports','MemberReport','membername_interface','membername','lodash','util','../../config/logger','api','moment','request-promise','path'];(function(_0x50f019,_0x12c95f){var _0x4c5b50=function(_0x235865){while(--_0x235865){_0x50f019['push'](_0x50f019['shift']());}};_0x4c5b50(++_0x12c95f);}(_0x1d64,0x1cd));var _0x41d6=function(_0x25a42a,_0x3d489b){_0x25a42a=_0x25a42a-0x0;var _0x1129b1=_0x1d64[_0x25a42a];return _0x1129b1;};'use strict';var _=require(_0x41d6('0x0'));var util=require(_0x41d6('0x1'));var logger=require(_0x41d6('0x2'))(_0x41d6('0x3'));var moment=require(_0x41d6('0x4'));var BPromise=require('bluebird');var rp=require(_0x41d6('0x5'));var fs=require('fs');var path=require(_0x41d6('0x6'));var rimraf=require(_0x41d6('0x7'));var config=require(_0x41d6('0x8'));var attributes=require('./memberReport.attributes');module[_0x41d6('0x9')]=function(_0x639309,_0x570d14){return _0x639309['define'](_0x41d6('0xa'),attributes,{'tableName':'report_member','paranoid':![],'indexes':[{'name':_0x41d6('0xb'),'fields':[_0x41d6('0xc'),'interface']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xe4e5=['moment','path','rimraf','../../config/environment','./memberReport.attributes','exports','define','MemberReport','report_member','membername_interface','interface','api'];(function(_0x29af75,_0x152b87){var _0x32b56b=function(_0x5460fe){while(--_0x5460fe){_0x29af75['push'](_0x29af75['shift']());}};_0x32b56b(++_0x152b87);}(_0xe4e5,0xfb));var _0x5e4e=function(_0x3a04c6,_0x12a482){_0x3a04c6=_0x3a04c6-0x0;var _0xf4131a=_0xe4e5[_0x3a04c6];return _0xf4131a;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0x5e4e('0x0'));var moment=require(_0x5e4e('0x1'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x5e4e('0x2'));var rimraf=require(_0x5e4e('0x3'));var config=require(_0x5e4e('0x4'));var attributes=require(_0x5e4e('0x5'));module[_0x5e4e('0x6')]=function(_0x3d2c63,_0x2977cf){return _0x3d2c63[_0x5e4e('0x7')](_0x5e4e('0x8'),attributes,{'tableName':_0x5e4e('0x9'),'paranoid':![],'indexes':[{'name':_0x5e4e('0xa'),'fields':['membername',_0x5e4e('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
index 645a3c4..731de89 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x27a0=['map','model','then','catch','CreateMemberReport','create','body','raw','UpdateMemberReport','update','where','util','moment','bluebird','randomstring','ioredis','../../config/environment','jayson/promise','client','http','request','info','MemberReport,\x20%s,\x20%s','debug','MemberReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','GetMemberReport','MemberReport','options','attributes','limit','include'];(function(_0xac399a,_0x3f0514){var _0x2e4c79=function(_0x5e5b47){while(--_0x5e5b47){_0xac399a['push'](_0xac399a['shift']());}};_0x2e4c79(++_0x3f0514);}(_0x27a0,0xbf));var _0x027a=function(_0x185dc2,_0xdba755){_0x185dc2=_0x185dc2-0x0;var _0x4d87a2=_0x27a0[_0x185dc2];return _0x4d87a2;};'use strict';var _=require('lodash');var util=require(_0x027a('0x0'));var moment=require(_0x027a('0x1'));var BPromise=require(_0x027a('0x2'));var rs=require(_0x027a('0x3'));var fs=require('fs');var Redis=require(_0x027a('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')('rpc');var config=require(_0x027a('0x5'));var jayson=require(_0x027a('0x6'));var client=jayson[_0x027a('0x7')][_0x027a('0x8')]({'port':0x232a});function respondWithRpcPromise(_0xe233ed,_0x3c7d67,_0x550fbb){return new BPromise(function(_0x3d1429,_0x271dfe){return client[_0x027a('0x9')](_0xe233ed,_0x550fbb)['then'](function(_0x44c56a){logger[_0x027a('0xa')](_0x027a('0xb'),_0x3c7d67,'request\x20sent');logger[_0x027a('0xc')](_0x027a('0xd'),_0x3c7d67,_0x027a('0xe'),JSON[_0x027a('0xf')](_0x44c56a));if(_0x44c56a[_0x027a('0x10')]){if(_0x44c56a[_0x027a('0x10')][_0x027a('0x11')]===0x1f4){logger[_0x027a('0x10')](_0x027a('0xb'),_0x3c7d67,_0x44c56a[_0x027a('0x10')][_0x027a('0x12')]);return _0x271dfe(_0x44c56a['error'][_0x027a('0x12')]);}logger[_0x027a('0x10')](_0x027a('0xb'),_0x3c7d67,_0x44c56a[_0x027a('0x10')][_0x027a('0x12')]);return _0x3d1429(_0x44c56a['error']['message']);}else{logger[_0x027a('0xa')]('MemberReport,\x20%s,\x20%s',_0x3c7d67,_0x027a('0xe'));_0x3d1429(_0x44c56a['result'][_0x027a('0x12')]);}})['catch'](function(_0x4dc3ab){logger['error'](_0x027a('0xb'),_0x3c7d67,_0x4dc3ab);_0x271dfe(_0x4dc3ab);});});}exports[_0x027a('0x13')]=function(_0x826d19){var _0x1fb40b=this;return new Promise(function(_0x52125e,_0x282e70){return db[_0x027a('0x14')]['findAll']({'raw':_0x826d19['options']?_0x826d19[_0x027a('0x15')]['raw']===undefined?!![]:![]:!![],'where':_0x826d19[_0x027a('0x15')]?_0x826d19['options']['where']||null:null,'attributes':_0x826d19['options']?_0x826d19['options'][_0x027a('0x16')]||null:null,'limit':_0x826d19[_0x027a('0x15')]?_0x826d19[_0x027a('0x15')][_0x027a('0x17')]||null:null,'include':_0x826d19['options']?_0x826d19[_0x027a('0x15')][_0x027a('0x18')]?_[_0x027a('0x19')](_0x826d19[_0x027a('0x15')][_0x027a('0x18')],function(_0x3bbd46){return{'model':db[_0x3bbd46['model']],'as':_0x3bbd46['as'],'attributes':_0x3bbd46[_0x027a('0x16')],'include':_0x3bbd46['include']?_[_0x027a('0x19')](_0x3bbd46[_0x027a('0x18')],function(_0x1b1a13){return{'model':db[_0x1b1a13[_0x027a('0x1a')]],'as':_0x1b1a13['as'],'attributes':_0x1b1a13['attributes'],'include':_0x1b1a13['include']?_[_0x027a('0x19')](_0x1b1a13[_0x027a('0x18')],function(_0x338141){return{'model':db[_0x338141[_0x027a('0x1a')]],'as':_0x338141['as'],'attributes':_0x338141['attributes']};}):[]};}):[]};}):[]:[]})[_0x027a('0x1b')](function(_0x55a8cd){logger[_0x027a('0xa')]('GetMemberReport',_0x826d19);logger[_0x027a('0xc')]('GetMemberReport',_0x826d19,JSON['stringify'](_0x55a8cd));_0x52125e(_0x55a8cd);})[_0x027a('0x1c')](function(_0x5782ac){logger['error'](_0x027a('0x13'),_0x5782ac['message'],_0x826d19);_0x282e70(_0x1fb40b[_0x027a('0x10')](0x1f4,_0x5782ac['message']));});});};exports[_0x027a('0x1d')]=function(_0xc99acc){var _0x4d9a29=this;return new Promise(function(_0xe4ea7d,_0x4b4ac4){return db[_0x027a('0x14')][_0x027a('0x1e')](_0xc99acc[_0x027a('0x1f')],{'raw':_0xc99acc[_0x027a('0x15')]?_0xc99acc[_0x027a('0x15')][_0x027a('0x20')]===undefined?!![]:![]:!![]})['then'](function(_0x3926e8){logger['info'](_0x027a('0x1d'),_0xc99acc);logger['debug'](_0x027a('0x1d'),_0xc99acc,JSON[_0x027a('0xf')](_0x3926e8));_0xe4ea7d(_0x3926e8);})[_0x027a('0x1c')](function(_0x307e3c){logger[_0x027a('0x10')]('CreateMemberReport',_0x307e3c[_0x027a('0x12')],_0xc99acc);_0x4b4ac4(_0x4d9a29[_0x027a('0x10')](0x1f4,_0x307e3c[_0x027a('0x12')]));});});};exports[_0x027a('0x21')]=function(_0x14cb87){var _0x476ab8=this;return new Promise(function(_0x1bc29f,_0xd09e6){return db[_0x027a('0x14')][_0x027a('0x22')](_0x14cb87[_0x027a('0x1f')],{'raw':_0x14cb87['options']?_0x14cb87[_0x027a('0x15')][_0x027a('0x20')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x14cb87[_0x027a('0x15')]?_0x14cb87[_0x027a('0x15')][_0x027a('0x23')]||null:null,'attributes':_0x14cb87[_0x027a('0x15')]?_0x14cb87[_0x027a('0x15')]['attributes']||null:null,'limit':_0x14cb87[_0x027a('0x15')]?_0x14cb87[_0x027a('0x15')][_0x027a('0x17')]||null:null})['then'](function(_0x22f96b){logger['info'](_0x027a('0x21'),_0x14cb87);logger[_0x027a('0xc')](_0x027a('0x21'),_0x14cb87,JSON['stringify'](_0x22f96b));_0x1bc29f(_0x22f96b);})['catch'](function(_0x32a44e){logger[_0x027a('0x10')]('UpdateMemberReport',_0x32a44e[_0x027a('0x12')],_0x14cb87);_0xd09e6(_0x476ab8[_0x027a('0x10')](0x1f4,_0x32a44e[_0x027a('0x12')]));});});};
\ No newline at end of file
+var _0x7e02=['GetMemberReport','body','CreateMemberReport','limit','UpdateMemberReport','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','jayson/promise','client','http','then','info','MemberReport,\x20%s,\x20%s','debug','MemberReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','MemberReport','findAll','options','raw','where','attributes','map','include','model'];(function(_0x4718bc,_0x3fd2be){var _0x40e411=function(_0x1a928e){while(--_0x1a928e){_0x4718bc['push'](_0x4718bc['shift']());}};_0x40e411(++_0x3fd2be);}(_0x7e02,0x71));var _0x27e0=function(_0x1657c0,_0x2e07e5){_0x1657c0=_0x1657c0-0x0;var _0x40912a=_0x7e02[_0x1657c0];return _0x40912a;};'use strict';var _=require(_0x27e0('0x0'));var util=require(_0x27e0('0x1'));var moment=require(_0x27e0('0x2'));var BPromise=require(_0x27e0('0x3'));var rs=require(_0x27e0('0x4'));var fs=require('fs');var Redis=require(_0x27e0('0x5'));var db=require(_0x27e0('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x27e0('0x7'));var config=require('../../config/environment');var jayson=require(_0x27e0('0x8'));var client=jayson[_0x27e0('0x9')][_0x27e0('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1cc944,_0x32bc79,_0x2dff51){return new BPromise(function(_0x44ae54,_0x272efb){return client['request'](_0x1cc944,_0x2dff51)[_0x27e0('0xb')](function(_0x5ec050){logger[_0x27e0('0xc')](_0x27e0('0xd'),_0x32bc79,'request\x20sent');logger[_0x27e0('0xe')](_0x27e0('0xf'),_0x32bc79,_0x27e0('0x10'),JSON[_0x27e0('0x11')](_0x5ec050));if(_0x5ec050[_0x27e0('0x12')]){if(_0x5ec050[_0x27e0('0x12')][_0x27e0('0x13')]===0x1f4){logger[_0x27e0('0x12')](_0x27e0('0xd'),_0x32bc79,_0x5ec050['error'][_0x27e0('0x14')]);return _0x272efb(_0x5ec050[_0x27e0('0x12')][_0x27e0('0x14')]);}logger['error'](_0x27e0('0xd'),_0x32bc79,_0x5ec050[_0x27e0('0x12')][_0x27e0('0x14')]);return _0x44ae54(_0x5ec050['error'][_0x27e0('0x14')]);}else{logger[_0x27e0('0xc')](_0x27e0('0xd'),_0x32bc79,_0x27e0('0x10'));_0x44ae54(_0x5ec050['result']['message']);}})[_0x27e0('0x15')](function(_0xe6b7b1){logger[_0x27e0('0x12')](_0x27e0('0xd'),_0x32bc79,_0xe6b7b1);_0x272efb(_0xe6b7b1);});});}exports['GetMemberReport']=function(_0x32597b){var _0x20a4cc=this;return new Promise(function(_0x12a91f,_0x1e141f){return db[_0x27e0('0x16')][_0x27e0('0x17')]({'raw':_0x32597b['options']?_0x32597b[_0x27e0('0x18')][_0x27e0('0x19')]===undefined?!![]:![]:!![],'where':_0x32597b['options']?_0x32597b[_0x27e0('0x18')][_0x27e0('0x1a')]||null:null,'attributes':_0x32597b[_0x27e0('0x18')]?_0x32597b[_0x27e0('0x18')][_0x27e0('0x1b')]||null:null,'limit':_0x32597b['options']?_0x32597b['options']['limit']||null:null,'include':_0x32597b[_0x27e0('0x18')]?_0x32597b[_0x27e0('0x18')]['include']?_[_0x27e0('0x1c')](_0x32597b[_0x27e0('0x18')][_0x27e0('0x1d')],function(_0x6f83ee){return{'model':db[_0x6f83ee[_0x27e0('0x1e')]],'as':_0x6f83ee['as'],'attributes':_0x6f83ee[_0x27e0('0x1b')],'include':_0x6f83ee[_0x27e0('0x1d')]?_[_0x27e0('0x1c')](_0x6f83ee[_0x27e0('0x1d')],function(_0x3068c4){return{'model':db[_0x3068c4[_0x27e0('0x1e')]],'as':_0x3068c4['as'],'attributes':_0x3068c4[_0x27e0('0x1b')],'include':_0x3068c4[_0x27e0('0x1d')]?_[_0x27e0('0x1c')](_0x3068c4[_0x27e0('0x1d')],function(_0x581ec9){return{'model':db[_0x581ec9[_0x27e0('0x1e')]],'as':_0x581ec9['as'],'attributes':_0x581ec9[_0x27e0('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x27e0('0xb')](function(_0x7e00da){logger[_0x27e0('0xc')]('GetMemberReport',_0x32597b);logger['debug'](_0x27e0('0x1f'),_0x32597b,JSON[_0x27e0('0x11')](_0x7e00da));_0x12a91f(_0x7e00da);})[_0x27e0('0x15')](function(_0x304fe6){logger['error']('GetMemberReport',_0x304fe6[_0x27e0('0x14')],_0x32597b);_0x1e141f(_0x20a4cc[_0x27e0('0x12')](0x1f4,_0x304fe6['message']));});});};exports['CreateMemberReport']=function(_0x551794){var _0xdedb73=this;return new Promise(function(_0x384e11,_0x24605a){return db[_0x27e0('0x16')]['create'](_0x551794[_0x27e0('0x20')],{'raw':_0x551794[_0x27e0('0x18')]?_0x551794[_0x27e0('0x18')][_0x27e0('0x19')]===undefined?!![]:![]:!![]})[_0x27e0('0xb')](function(_0x2c98bd){logger[_0x27e0('0xc')](_0x27e0('0x21'),_0x551794);logger[_0x27e0('0xe')](_0x27e0('0x21'),_0x551794,JSON['stringify'](_0x2c98bd));_0x384e11(_0x2c98bd);})[_0x27e0('0x15')](function(_0xecebf7){logger['error']('CreateMemberReport',_0xecebf7[_0x27e0('0x14')],_0x551794);_0x24605a(_0xdedb73[_0x27e0('0x12')](0x1f4,_0xecebf7[_0x27e0('0x14')]));});});};exports['UpdateMemberReport']=function(_0x17e020){var _0x10eb01=this;return new Promise(function(_0x4d26f7,_0x352679){return db[_0x27e0('0x16')]['update'](_0x17e020[_0x27e0('0x20')],{'raw':_0x17e020[_0x27e0('0x18')]?_0x17e020['options'][_0x27e0('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x17e020[_0x27e0('0x18')]?_0x17e020['options']['where']||null:null,'attributes':_0x17e020[_0x27e0('0x18')]?_0x17e020[_0x27e0('0x18')][_0x27e0('0x1b')]||null:null,'limit':_0x17e020[_0x27e0('0x18')]?_0x17e020['options'][_0x27e0('0x22')]||null:null})['then'](function(_0x3f1d73){logger[_0x27e0('0xc')](_0x27e0('0x23'),_0x17e020);logger['debug'](_0x27e0('0x23'),_0x17e020,JSON[_0x27e0('0x11')](_0x3f1d73));_0x4d26f7(_0x3f1d73);})['catch'](function(_0x4cf35f){logger[_0x27e0('0x12')](_0x27e0('0x23'),_0x4cf35f[_0x27e0('0x14')],_0x17e020);_0x352679(_0x10eb01[_0x27e0('0x12')](0x1f4,_0x4cf35f['message']));});});};
\ No newline at end of file
index f1a02c1..7df3898 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x76fd=['../../components/interaction/service','../../config/environment','get','index','exports','multer','util','path','connect-timeout','fs-extra','../../components/auth/service'];(function(_0xac0284,_0xe5bea8){var _0x5e2b81=function(_0x1cb4f3){while(--_0x1cb4f3){_0xac0284['push'](_0xac0284['shift']());}};_0x5e2b81(++_0xe5bea8);}(_0x76fd,0x186));var _0xd76f=function(_0x4d05f8,_0x3efc70){_0x4d05f8=_0x4d05f8-0x0;var _0x220513=_0x76fd[_0x4d05f8];return _0x220513;};'use strict';var multer=require(_0xd76f('0x0'));var util=require(_0xd76f('0x1'));var path=require(_0xd76f('0x2'));var timeout=require(_0xd76f('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require(_0xd76f('0x4'));var auth=require(_0xd76f('0x5'));var interaction=require(_0xd76f('0x6'));var config=require(_0xd76f('0x7'));var controller=require('./migration.controller');router[_0xd76f('0x8')]('/',controller[_0xd76f('0x9')]);module[_0xd76f('0xa')]=router;
\ No newline at end of file
+var _0xa43a=['express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./migration.controller','exports','multer','util','path','connect-timeout'];(function(_0x405385,_0x56f573){var _0x43837b=function(_0x30e20e){while(--_0x30e20e){_0x405385['push'](_0x405385['shift']());}};_0x43837b(++_0x56f573);}(_0xa43a,0xe3));var _0xaa43=function(_0xce5e5c,_0x175633){_0xce5e5c=_0xce5e5c-0x0;var _0x93ebc1=_0xa43a[_0xce5e5c];return _0x93ebc1;};'use strict';var multer=require(_0xaa43('0x0'));var util=require(_0xaa43('0x1'));var path=require(_0xaa43('0x2'));var timeout=require(_0xaa43('0x3'));var express=require(_0xaa43('0x4'));var router=express[_0xaa43('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0xaa43('0x6'));var interaction=require(_0xaa43('0x7'));var config=require(_0xaa43('0x8'));var controller=require(_0xaa43('0x9'));router['get']('/',controller['index']);module[_0xaa43('0xa')]=router;
\ No newline at end of file
index a851e00..c539a80 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb643=['version','sequelize','exports','STRING'];(function(_0x50e593,_0x3ae998){var _0x3821d0=function(_0x53c295){while(--_0x53c295){_0x50e593['push'](_0x50e593['shift']());}};_0x3821d0(++_0x3ae998);}(_0xb643,0x111));var _0x3b64=function(_0x296c48,_0x20816a){_0x296c48=_0x296c48-0x0;var _0x234dea=_0xb643[_0x296c48];return _0x234dea;};'use strict';var Sequelize=require(_0x3b64('0x0'));module[_0x3b64('0x1')]={'version':{'type':Sequelize[_0x3b64('0x2')],'unique':_0x3b64('0x3')}};
\ No newline at end of file
+var _0xb5f5=['STRING','version'];(function(_0x48ee35,_0x58daa7){var _0x58f2df=function(_0x5d2075){while(--_0x5d2075){_0x48ee35['push'](_0x48ee35['shift']());}};_0x58f2df(++_0x58daa7);}(_0xb5f5,0x1da));var _0x5b5f=function(_0x1af715,_0x5209a3){_0x1af715=_0x1af715-0x0;var _0x438c68=_0xb5f5[_0x1af715];return _0x438c68;};'use strict';var Sequelize=require('sequelize');module['exports']={'version':{'type':Sequelize[_0x5b5f('0x0')],'unique':_0x5b5f('0x1')}};
\ No newline at end of file
index 23fe266..ba9bee0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xad05=['eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','json','undefined','count','offset','limit','set','Content-Range','save','update','then','destroy','end','error','stack','send','map','Migration','fieldName','type','key','model','name','query','keys','filters','intersection','fields','attributes','length','nolimit','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','catch'];(function(_0x4178af,_0x388652){var _0x20f4b1=function(_0x504188){while(--_0x504188){_0x4178af['push'](_0x4178af['shift']());}};_0x20f4b1(++_0x388652);}(_0xad05,0xcc));var _0x5ad0=function(_0x5a7d41,_0x4447e2){_0x5a7d41=_0x5a7d41-0x0;var _0x98d8fa=_0xad05[_0x5a7d41];return _0x98d8fa;};'use strict';var emlformat=require(_0x5ad0('0x0'));var rimraf=require(_0x5ad0('0x1'));var zipdir=require(_0x5ad0('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x5ad0('0x3'));var moment=require(_0x5ad0('0x4'));var BPromise=require(_0x5ad0('0x5'));var Mustache=require(_0x5ad0('0x6'));var util=require(_0x5ad0('0x7'));var path=require(_0x5ad0('0x8'));var sox=require(_0x5ad0('0x9'));var csv=require(_0x5ad0('0xa'));var ejs=require(_0x5ad0('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x5ad0('0xc'));var squel=require('squel');var crypto=require(_0x5ad0('0xd'));var jsforce=require(_0x5ad0('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x5ad0('0xa'));var querystring=require(_0x5ad0('0xf'));var Papa=require('papaparse');var Redis=require(_0x5ad0('0x10'));var authService=require(_0x5ad0('0x11'));var qs=require(_0x5ad0('0x12'));var as=require(_0x5ad0('0x13'));var hardwareService=require(_0x5ad0('0x14'));var logger=require(_0x5ad0('0x15'))(_0x5ad0('0x16'));var utils=require(_0x5ad0('0x17'));var config=require(_0x5ad0('0x18'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x430326,_0x56d640){_0x56d640=_0x56d640||0xcc;return function(_0x1e6836){if(_0x1e6836){return _0x430326[_0x5ad0('0x19')](_0x56d640);}return _0x430326[_0x5ad0('0x1a')](_0x56d640)['end']();};}function respondWithResult(_0x27860e,_0x18b137){_0x18b137=_0x18b137||0xc8;return function(_0x513b07){if(_0x513b07){return _0x27860e['status'](_0x18b137)[_0x5ad0('0x1b')](_0x513b07);}};}function respondWithFilteredResult(_0x5bacee,_0x42308b){return function(_0x4b301f){if(_0x4b301f){var _0x172bd3=typeof _0x42308b['offset']===_0x5ad0('0x1c')&&typeof _0x42308b['limit']===_0x5ad0('0x1c');var _0x87a821=_0x4b301f[_0x5ad0('0x1d')];var _0x4b02ff=_0x172bd3?0x0:_0x42308b[_0x5ad0('0x1e')];var _0x3ead85=_0x172bd3?_0x4b301f[_0x5ad0('0x1d')]:_0x42308b[_0x5ad0('0x1e')]+_0x42308b[_0x5ad0('0x1f')];var _0x3fadf4;if(_0x3ead85>=_0x87a821){_0x3ead85=_0x87a821;_0x3fadf4=0xc8;}else{_0x3fadf4=0xce;}_0x5bacee[_0x5ad0('0x1a')](_0x3fadf4);return _0x5bacee[_0x5ad0('0x20')](_0x5ad0('0x21'),_0x4b02ff+'-'+_0x3ead85+'/'+_0x87a821)[_0x5ad0('0x1b')](_0x4b301f);}return null;};}function patchUpdates(_0x109a49){return function(_0x1b5000){try{jsonpatch['apply'](_0x1b5000,_0x109a49,!![]);}catch(_0xe0566d){return BPromise['reject'](_0xe0566d);}return _0x1b5000[_0x5ad0('0x22')]();};}function saveUpdates(_0x89dc3c,_0x2b6858){return function(_0x997404){if(_0x997404){return _0x997404[_0x5ad0('0x23')](_0x89dc3c)[_0x5ad0('0x24')](function(_0x1376dd){return _0x1376dd;});}return null;};}function removeEntity(_0x30cd98,_0xc50aeb){return function(_0x29d7cc){if(_0x29d7cc){return _0x29d7cc[_0x5ad0('0x25')]()[_0x5ad0('0x24')](function(){_0x30cd98['status'](0xcc)[_0x5ad0('0x26')]();});}};}function handleEntityNotFound(_0xee2345,_0x51c4f7){return function(_0x5eda2f){if(!_0x5eda2f){_0xee2345[_0x5ad0('0x19')](0x194);}return _0x5eda2f;};}function handleError(_0x4631c4,_0x3ae89e){_0x3ae89e=_0x3ae89e||0x1f4;return function(_0x2aa2de){logger[_0x5ad0('0x27')](_0x2aa2de[_0x5ad0('0x28')]);if(_0x2aa2de['name']){delete _0x2aa2de['name'];}_0x4631c4['status'](_0x3ae89e)[_0x5ad0('0x29')](_0x2aa2de);};}exports['index']=function(_0x148728,_0x384f51){var _0x288ae1={},_0x4abb7f={},_0x405444={'count':0x0,'rows':[]};var _0x27785a=_[_0x5ad0('0x2a')](db[_0x5ad0('0x2b')]['rawAttributes'],function(_0x135ffc){return{'name':_0x135ffc[_0x5ad0('0x2c')],'type':_0x135ffc[_0x5ad0('0x2d')][_0x5ad0('0x2e')]};});_0x4abb7f[_0x5ad0('0x2f')]=_['map'](_0x27785a,_0x5ad0('0x30'));_0x4abb7f[_0x5ad0('0x31')]=_[_0x5ad0('0x32')](_0x148728[_0x5ad0('0x31')]);_0x4abb7f[_0x5ad0('0x33')]=_[_0x5ad0('0x34')](_0x4abb7f[_0x5ad0('0x2f')],_0x4abb7f[_0x5ad0('0x31')]);_0x288ae1['attributes']=_[_0x5ad0('0x34')](_0x4abb7f['model'],qs[_0x5ad0('0x35')](_0x148728['query'][_0x5ad0('0x35')]));_0x288ae1[_0x5ad0('0x36')]=_0x288ae1[_0x5ad0('0x36')][_0x5ad0('0x37')]?_0x288ae1[_0x5ad0('0x36')]:_0x4abb7f['model'];if(!_0x148728['query']['hasOwnProperty'](_0x5ad0('0x38'))){_0x288ae1['limit']=qs[_0x5ad0('0x1f')](_0x148728[_0x5ad0('0x31')][_0x5ad0('0x1f')]);_0x288ae1[_0x5ad0('0x1e')]=qs[_0x5ad0('0x1e')](_0x148728[_0x5ad0('0x31')][_0x5ad0('0x1e')]);}_0x288ae1[_0x5ad0('0x39')]=qs['sort'](_0x148728[_0x5ad0('0x31')][_0x5ad0('0x3a')]);_0x288ae1[_0x5ad0('0x3b')]=qs[_0x5ad0('0x33')](_[_0x5ad0('0x3c')](_0x148728['query'],_0x4abb7f[_0x5ad0('0x33')]),_0x27785a);if(_0x148728['query'][_0x5ad0('0x3d')]){_0x288ae1[_0x5ad0('0x3b')]=_[_0x5ad0('0x3e')](_0x288ae1[_0x5ad0('0x3b')],{'$or':_[_0x5ad0('0x2a')](_0x27785a,function(_0x2fb29a){if(_0x2fb29a[_0x5ad0('0x2d')]!=='VIRTUAL'){var _0x1c16a5={};_0x1c16a5[_0x2fb29a[_0x5ad0('0x30')]]={'$like':'%'+_0x148728[_0x5ad0('0x31')]['filter']+'%'};return _0x1c16a5;}})});}_0x288ae1=_[_0x5ad0('0x3e')]({},_0x288ae1,_0x148728[_0x5ad0('0x3f')]);var _0x14d05a={'where':_0x288ae1[_0x5ad0('0x3b')]};return db[_0x5ad0('0x2b')][_0x5ad0('0x1d')](_0x14d05a)[_0x5ad0('0x24')](function(_0xd02f24){_0x405444[_0x5ad0('0x1d')]=_0xd02f24;if(_0x148728[_0x5ad0('0x31')][_0x5ad0('0x40')]){_0x288ae1[_0x5ad0('0x41')]=[{'all':!![]}];}return db[_0x5ad0('0x2b')][_0x5ad0('0x42')](_0x288ae1);})[_0x5ad0('0x24')](function(_0x1d7ded){_0x405444['rows']=_0x1d7ded;return _0x405444;})[_0x5ad0('0x24')](respondWithFilteredResult(_0x384f51,_0x288ae1))[_0x5ad0('0x43')](handleError(_0x384f51,null));};
\ No newline at end of file
+var _0xe2b7=['sort','where','filter','merge','type','VIRTUAL','options','findAll','rows','catch','eml-format','fast-json-patch','moment','bluebird','mustache','util','sox','ejs','lodash','squel','crypto','jsforce','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','end','offset','undefined','count','limit','status','set','Content-Range','json','apply','reject','save','update','then','destroy','error','name','send','map','Migration','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','hasOwnProperty','order'];(function(_0x4f1c96,_0x49aa12){var _0x2a7ba8=function(_0x4bb7c3){while(--_0x4bb7c3){_0x4f1c96['push'](_0x4f1c96['shift']());}};_0x2a7ba8(++_0x49aa12);}(_0xe2b7,0x8c));var _0x7e2b=function(_0x41cf8d,_0x8be49){_0x41cf8d=_0x41cf8d-0x0;var _0x5111c1=_0xe2b7[_0x41cf8d];return _0x5111c1;};'use strict';var emlformat=require(_0x7e2b('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x7e2b('0x1'));var rp=require('request-promise');var moment=require(_0x7e2b('0x2'));var BPromise=require(_0x7e2b('0x3'));var Mustache=require(_0x7e2b('0x4'));var util=require(_0x7e2b('0x5'));var path=require('path');var sox=require(_0x7e2b('0x6'));var csv=require('to-csv');var ejs=require(_0x7e2b('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x7e2b('0x8'));var squel=require(_0x7e2b('0x9'));var crypto=require(_0x7e2b('0xa'));var jsforce=require(_0x7e2b('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x7e2b('0xc'));var querystring=require('querystring');var Papa=require(_0x7e2b('0xd'));var Redis=require(_0x7e2b('0xe'));var authService=require(_0x7e2b('0xf'));var qs=require(_0x7e2b('0x10'));var as=require(_0x7e2b('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x7e2b('0x12'));var utils=require('../../config/utils');var config=require(_0x7e2b('0x13'));var licenseUtil=require(_0x7e2b('0x14'));var db=require(_0x7e2b('0x15'))['db'];function respondWithStatusCode(_0x8e4297,_0xa3a638){_0xa3a638=_0xa3a638||0xcc;return function(_0x337467){if(_0x337467){return _0x8e4297[_0x7e2b('0x16')](_0xa3a638);}return _0x8e4297['status'](_0xa3a638)[_0x7e2b('0x17')]();};}function respondWithResult(_0x3ecada,_0x25c61c){_0x25c61c=_0x25c61c||0xc8;return function(_0x552794){if(_0x552794){return _0x3ecada['status'](_0x25c61c)['json'](_0x552794);}};}function respondWithFilteredResult(_0x1f18d9,_0x11580a){return function(_0x3fa599){if(_0x3fa599){var _0x3ce9b3=typeof _0x11580a[_0x7e2b('0x18')]===_0x7e2b('0x19')&&typeof _0x11580a['limit']===_0x7e2b('0x19');var _0x434740=_0x3fa599[_0x7e2b('0x1a')];var _0x1a4c15=_0x3ce9b3?0x0:_0x11580a[_0x7e2b('0x18')];var _0x2cf4da=_0x3ce9b3?_0x3fa599[_0x7e2b('0x1a')]:_0x11580a[_0x7e2b('0x18')]+_0x11580a[_0x7e2b('0x1b')];var _0x568ffe;if(_0x2cf4da>=_0x434740){_0x2cf4da=_0x434740;_0x568ffe=0xc8;}else{_0x568ffe=0xce;}_0x1f18d9[_0x7e2b('0x1c')](_0x568ffe);return _0x1f18d9[_0x7e2b('0x1d')](_0x7e2b('0x1e'),_0x1a4c15+'-'+_0x2cf4da+'/'+_0x434740)[_0x7e2b('0x1f')](_0x3fa599);}return null;};}function patchUpdates(_0x3a0268){return function(_0x252af0){try{jsonpatch[_0x7e2b('0x20')](_0x252af0,_0x3a0268,!![]);}catch(_0xf16536){return BPromise[_0x7e2b('0x21')](_0xf16536);}return _0x252af0[_0x7e2b('0x22')]();};}function saveUpdates(_0xc9888,_0x167b0e){return function(_0x2f7b56){if(_0x2f7b56){return _0x2f7b56[_0x7e2b('0x23')](_0xc9888)[_0x7e2b('0x24')](function(_0x4f4b94){return _0x4f4b94;});}return null;};}function removeEntity(_0x8ca28c,_0x3f9259){return function(_0xee1d8f){if(_0xee1d8f){return _0xee1d8f[_0x7e2b('0x25')]()[_0x7e2b('0x24')](function(){_0x8ca28c[_0x7e2b('0x1c')](0xcc)[_0x7e2b('0x17')]();});}};}function handleEntityNotFound(_0x48f67a,_0x41f28e){return function(_0x5675b4){if(!_0x5675b4){_0x48f67a['sendStatus'](0x194);}return _0x5675b4;};}function handleError(_0x468f37,_0x21545a){_0x21545a=_0x21545a||0x1f4;return function(_0x31bb4a){logger[_0x7e2b('0x26')](_0x31bb4a['stack']);if(_0x31bb4a['name']){delete _0x31bb4a[_0x7e2b('0x27')];}_0x468f37['status'](_0x21545a)[_0x7e2b('0x28')](_0x31bb4a);};}exports['index']=function(_0x1fcf38,_0x57730b){var _0x19524e={},_0x4b0411={},_0x5e42fa={'count':0x0,'rows':[]};var _0x21eeae=_[_0x7e2b('0x29')](db[_0x7e2b('0x2a')][_0x7e2b('0x2b')],function(_0x2be298){return{'name':_0x2be298[_0x7e2b('0x2c')],'type':_0x2be298['type'][_0x7e2b('0x2d')]};});_0x4b0411[_0x7e2b('0x2e')]=_[_0x7e2b('0x29')](_0x21eeae,_0x7e2b('0x27'));_0x4b0411[_0x7e2b('0x2f')]=_[_0x7e2b('0x30')](_0x1fcf38['query']);_0x4b0411[_0x7e2b('0x31')]=_[_0x7e2b('0x32')](_0x4b0411[_0x7e2b('0x2e')],_0x4b0411[_0x7e2b('0x2f')]);_0x19524e[_0x7e2b('0x33')]=_[_0x7e2b('0x32')](_0x4b0411[_0x7e2b('0x2e')],qs[_0x7e2b('0x34')](_0x1fcf38[_0x7e2b('0x2f')][_0x7e2b('0x34')]));_0x19524e[_0x7e2b('0x33')]=_0x19524e[_0x7e2b('0x33')]['length']?_0x19524e['attributes']:_0x4b0411[_0x7e2b('0x2e')];if(!_0x1fcf38[_0x7e2b('0x2f')][_0x7e2b('0x35')]('nolimit')){_0x19524e[_0x7e2b('0x1b')]=qs[_0x7e2b('0x1b')](_0x1fcf38[_0x7e2b('0x2f')][_0x7e2b('0x1b')]);_0x19524e[_0x7e2b('0x18')]=qs[_0x7e2b('0x18')](_0x1fcf38['query']['offset']);}_0x19524e[_0x7e2b('0x36')]=qs[_0x7e2b('0x37')](_0x1fcf38[_0x7e2b('0x2f')]['sort']);_0x19524e[_0x7e2b('0x38')]=qs[_0x7e2b('0x31')](_['pick'](_0x1fcf38[_0x7e2b('0x2f')],_0x4b0411['filters']),_0x21eeae);if(_0x1fcf38['query'][_0x7e2b('0x39')]){_0x19524e['where']=_[_0x7e2b('0x3a')](_0x19524e['where'],{'$or':_['map'](_0x21eeae,function(_0x1f4f2f){if(_0x1f4f2f[_0x7e2b('0x3b')]!==_0x7e2b('0x3c')){var _0xda798b={};_0xda798b[_0x1f4f2f['name']]={'$like':'%'+_0x1fcf38['query'][_0x7e2b('0x39')]+'%'};return _0xda798b;}})});}_0x19524e=_[_0x7e2b('0x3a')]({},_0x19524e,_0x1fcf38[_0x7e2b('0x3d')]);var _0x5994b5={'where':_0x19524e['where']};return db[_0x7e2b('0x2a')][_0x7e2b('0x1a')](_0x5994b5)['then'](function(_0xb843f1){_0x5e42fa[_0x7e2b('0x1a')]=_0xb843f1;if(_0x1fcf38[_0x7e2b('0x2f')]['includeAll']){_0x19524e['include']=[{'all':!![]}];}return db[_0x7e2b('0x2a')][_0x7e2b('0x3e')](_0x19524e);})[_0x7e2b('0x24')](function(_0x5d7d6a){_0x5e42fa[_0x7e2b('0x3f')]=_0x5d7d6a;return _0x5e42fa;})[_0x7e2b('0x24')](respondWithFilteredResult(_0x57730b,_0x19524e))[_0x7e2b('0x40')](handleError(_0x57730b,null));};
\ No newline at end of file
index 1a0a16b..6214f60 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1890=['rimraf','./migration.attributes','exports','define','migrations','util','../../config/logger','moment','bluebird','request-promise','path'];(function(_0x27c24e,_0x5db1c7){var _0x39004a=function(_0x44286d){while(--_0x44286d){_0x27c24e['push'](_0x27c24e['shift']());}};_0x39004a(++_0x5db1c7);}(_0x1890,0xcb));var _0x0189=function(_0x284408,_0x257e80){_0x284408=_0x284408-0x0;var _0x4985d5=_0x1890[_0x284408];return _0x4985d5;};'use strict';var _=require('lodash');var util=require(_0x0189('0x0'));var logger=require(_0x0189('0x1'))('api');var moment=require(_0x0189('0x2'));var BPromise=require(_0x0189('0x3'));var rp=require(_0x0189('0x4'));var fs=require('fs');var path=require(_0x0189('0x5'));var rimraf=require(_0x0189('0x6'));var config=require('../../config/environment');var attributes=require(_0x0189('0x7'));module[_0x0189('0x8')]=function(_0x5c06b1,_0x2356a0){return _0x5c06b1[_0x0189('0x9')]('Migration',attributes,{'tableName':_0x0189('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7c1d=['api','moment','bluebird','request-promise','path','./migration.attributes','exports','define','Migration','migrations','util','../../config/logger'];(function(_0x1beab1,_0x27951e){var _0x4fbc4f=function(_0xfaf85a){while(--_0xfaf85a){_0x1beab1['push'](_0x1beab1['shift']());}};_0x4fbc4f(++_0x27951e);}(_0x7c1d,0x82));var _0xd7c1=function(_0x52fa96,_0x520949){_0x52fa96=_0x52fa96-0x0;var _0x370b00=_0x7c1d[_0x52fa96];return _0x370b00;};'use strict';var _=require('lodash');var util=require(_0xd7c1('0x0'));var logger=require(_0xd7c1('0x1'))(_0xd7c1('0x2'));var moment=require(_0xd7c1('0x3'));var BPromise=require(_0xd7c1('0x4'));var rp=require(_0xd7c1('0x5'));var fs=require('fs');var path=require(_0xd7c1('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xd7c1('0x7'));module[_0xd7c1('0x8')]=function(_0x4a17b2,_0x5dc871){return _0x4a17b2[_0xd7c1('0x9')](_0xd7c1('0xa'),attributes,{'tableName':_0xd7c1('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 8b74d5f..2757542 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc964=['request\x20sent','stringify','error','Migration,\x20%s,\x20%s','message','result','lodash','util','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','info','Migration,\x20%s,\x20%s,\x20%s'];(function(_0x3fb041,_0x559f76){var _0x17b10e=function(_0x1c24a6){while(--_0x1c24a6){_0x3fb041['push'](_0x3fb041['shift']());}};_0x17b10e(++_0x559f76);}(_0xc964,0x7e));var _0x4c96=function(_0x3b7ad9,_0x2ba56f){_0x3b7ad9=_0x3b7ad9-0x0;var _0x552bd2=_0xc964[_0x3b7ad9];return _0x552bd2;};'use strict';var _=require(_0x4c96('0x0'));var util=require(_0x4c96('0x1'));var moment=require('moment');var BPromise=require(_0x4c96('0x2'));var rs=require(_0x4c96('0x3'));var fs=require('fs');var Redis=require(_0x4c96('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x4c96('0x5'));var logger=require('../../config/logger')(_0x4c96('0x6'));var config=require(_0x4c96('0x7'));var jayson=require(_0x4c96('0x8'));var client=jayson[_0x4c96('0x9')][_0x4c96('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x1fa8a0,_0x4070a5,_0x493618){return new BPromise(function(_0x19ed76,_0xaa3f20){return client[_0x4c96('0xb')](_0x1fa8a0,_0x493618)['then'](function(_0x208911){logger[_0x4c96('0xc')]('Migration,\x20%s,\x20%s',_0x4070a5,'request\x20sent');logger['debug'](_0x4c96('0xd'),_0x4070a5,_0x4c96('0xe'),JSON[_0x4c96('0xf')](_0x208911));if(_0x208911['error']){if(_0x208911[_0x4c96('0x10')]['code']===0x1f4){logger['error'](_0x4c96('0x11'),_0x4070a5,_0x208911[_0x4c96('0x10')][_0x4c96('0x12')]);return _0xaa3f20(_0x208911['error']['message']);}logger[_0x4c96('0x10')](_0x4c96('0x11'),_0x4070a5,_0x208911[_0x4c96('0x10')]['message']);return _0x19ed76(_0x208911[_0x4c96('0x10')][_0x4c96('0x12')]);}else{logger[_0x4c96('0xc')](_0x4c96('0x11'),_0x4070a5,_0x4c96('0xe'));_0x19ed76(_0x208911[_0x4c96('0x13')][_0x4c96('0x12')]);}})['catch'](function(_0x388237){logger['error'](_0x4c96('0x11'),_0x4070a5,_0x388237);_0xaa3f20(_0x388237);});});}
\ No newline at end of file
+var _0xf12a=['info','request\x20sent','Migration,\x20%s,\x20%s,\x20%s','stringify','code','error','Migration,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','jayson/promise','http','request','then'];(function(_0x5f1391,_0x19c132){var _0x50ebe3=function(_0x3d00a3){while(--_0x3d00a3){_0x5f1391['push'](_0x5f1391['shift']());}};_0x50ebe3(++_0x19c132);}(_0xf12a,0x8e));var _0xaf12=function(_0xdafc1b,_0x2e33a2){_0xdafc1b=_0xdafc1b-0x0;var _0x31de5b=_0xf12a[_0xdafc1b];return _0x31de5b;};'use strict';var _=require(_0xaf12('0x0'));var util=require(_0xaf12('0x1'));var moment=require(_0xaf12('0x2'));var BPromise=require(_0xaf12('0x3'));var rs=require(_0xaf12('0x4'));var fs=require('fs');var Redis=require(_0xaf12('0x5'));var db=require(_0xaf12('0x6'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xaf12('0x7'));var config=require('../../config/environment');var jayson=require(_0xaf12('0x8'));var client=jayson['client'][_0xaf12('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x581819,_0x38389d,_0x418c64){return new BPromise(function(_0x3b6626,_0xff1952){return client[_0xaf12('0xa')](_0x581819,_0x418c64)[_0xaf12('0xb')](function(_0x3d733d){logger[_0xaf12('0xc')]('Migration,\x20%s,\x20%s',_0x38389d,_0xaf12('0xd'));logger['debug'](_0xaf12('0xe'),_0x38389d,'request\x20sent',JSON[_0xaf12('0xf')](_0x3d733d));if(_0x3d733d['error']){if(_0x3d733d['error'][_0xaf12('0x10')]===0x1f4){logger[_0xaf12('0x11')](_0xaf12('0x12'),_0x38389d,_0x3d733d[_0xaf12('0x11')][_0xaf12('0x13')]);return _0xff1952(_0x3d733d[_0xaf12('0x11')][_0xaf12('0x13')]);}logger[_0xaf12('0x11')](_0xaf12('0x12'),_0x38389d,_0x3d733d[_0xaf12('0x11')][_0xaf12('0x13')]);return _0x3b6626(_0x3d733d[_0xaf12('0x11')][_0xaf12('0x13')]);}else{logger[_0xaf12('0xc')](_0xaf12('0x12'),_0x38389d,_0xaf12('0xd'));_0x3b6626(_0x3d733d[_0xaf12('0x14')]['message']);}})[_0xaf12('0x15')](function(_0x31a420){logger['error']('Migration,\x20%s,\x20%s',_0x38389d,_0x31a420);_0xff1952(_0x31a420);});});}
\ No newline at end of file
index e030b5a..8cd8267 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4815=['Router','fs-extra','../../config/environment','./network.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','destroy','exports','multer','util','path','connect-timeout','express'];(function(_0xa3fadc,_0xd1e16){var _0x23ecb8=function(_0x2c71f7){while(--_0x2c71f7){_0xa3fadc['push'](_0xa3fadc['shift']());}};_0x23ecb8(++_0xd1e16);}(_0x4815,0xff));var _0x5481=function(_0x39238a,_0x32ac0c){_0x39238a=_0x39238a-0x0;var _0x5ecc32=_0x4815[_0x39238a];return _0x5ecc32;};'use strict';var multer=require(_0x5481('0x0'));var util=require(_0x5481('0x1'));var path=require(_0x5481('0x2'));var timeout=require(_0x5481('0x3'));var express=require(_0x5481('0x4'));var router=express[_0x5481('0x5')]();var fs_extra=require(_0x5481('0x6'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x5481('0x7'));var controller=require(_0x5481('0x8'));router[_0x5481('0x9')]('/',auth[_0x5481('0xa')](),controller[_0x5481('0xb')]);router[_0x5481('0x9')](_0x5481('0xc'),auth[_0x5481('0xa')](),controller[_0x5481('0xd')]);router[_0x5481('0xe')]('/',auth[_0x5481('0xa')](),controller[_0x5481('0xf')]);router[_0x5481('0x10')](_0x5481('0xc'),auth[_0x5481('0xa')](),controller[_0x5481('0x11')]);router['delete']('/:id',auth[_0x5481('0xa')](),controller[_0x5481('0x12')]);module[_0x5481('0x13')]=router;
\ No newline at end of file
+var _0xba6f=['update','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./network.controller','get','isAuthenticated','index','show','put','/:id'];(function(_0x1107cd,_0x69d5cb){var _0x104de2=function(_0x52b364){while(--_0x52b364){_0x1107cd['push'](_0x1107cd['shift']());}};_0x104de2(++_0x69d5cb);}(_0xba6f,0x1d0));var _0xfba6=function(_0x37d225,_0x2ed664){_0x37d225=_0x37d225-0x0;var _0x26834b=_0xba6f[_0x37d225];return _0x26834b;};'use strict';var multer=require(_0xfba6('0x0'));var util=require('util');var path=require(_0xfba6('0x1'));var timeout=require(_0xfba6('0x2'));var express=require(_0xfba6('0x3'));var router=express[_0xfba6('0x4')]();var fs_extra=require(_0xfba6('0x5'));var auth=require(_0xfba6('0x6'));var interaction=require(_0xfba6('0x7'));var config=require(_0xfba6('0x8'));var controller=require(_0xfba6('0x9'));router[_0xfba6('0xa')]('/',auth[_0xfba6('0xb')](),controller[_0xfba6('0xc')]);router[_0xfba6('0xa')]('/:id',auth[_0xfba6('0xb')](),controller[_0xfba6('0xd')]);router['post']('/',auth['isAuthenticated'](),controller['create']);router[_0xfba6('0xe')](_0xfba6('0xf'),auth[_0xfba6('0xb')](),controller[_0xfba6('0x10')]);router[_0xfba6('0x11')](_0xfba6('0xf'),auth[_0xfba6('0xb')](),controller[_0xfba6('0x12')]);module[_0xfba6('0x13')]=router;
\ No newline at end of file
index 6ba431b..3d96c47 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x17dc=['stun','turn','STRING','sequelize','exports','externip'];(function(_0x39c684,_0x1e0093){var _0x3da800=function(_0x2ac946){while(--_0x2ac946){_0x39c684['push'](_0x39c684['shift']());}};_0x3da800(++_0x1e0093);}(_0x17dc,0x1cb));var _0xc17d=function(_0x3bbef8,_0x12e461){_0x3bbef8=_0x3bbef8-0x0;var _0x653d1c=_0x17dc[_0x3bbef8];return _0x653d1c;};'use strict';var Sequelize=require(_0xc17d('0x0'));module[_0xc17d('0x1')]={'type':{'type':Sequelize['ENUM']('localnet',_0xc17d('0x2'),_0xc17d('0x3'),_0xc17d('0x4'))},'value':{'type':Sequelize[_0xc17d('0x5')]},'username':{'type':Sequelize[_0xc17d('0x5')]},'password':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xfeeb=['ENUM','localnet','externip','stun','STRING','sequelize','exports'];(function(_0x3b2365,_0x14f220){var _0x1379b8=function(_0x1e72fa){while(--_0x1e72fa){_0x3b2365['push'](_0x3b2365['shift']());}};_0x1379b8(++_0x14f220);}(_0xfeeb,0x186));var _0xbfee=function(_0x18f458,_0x1424eb){_0x18f458=_0x18f458-0x0;var _0x206e01=_0xfeeb[_0x18f458];return _0x206e01;};'use strict';var Sequelize=require(_0xbfee('0x0'));module[_0xbfee('0x1')]={'type':{'type':Sequelize[_0xbfee('0x2')](_0xbfee('0x3'),_0xbfee('0x4'),_0xbfee('0x5'),'turn')},'value':{'type':Sequelize[_0xbfee('0x6')]},'username':{'type':Sequelize[_0xbfee('0x6')]},'password':{'type':Sequelize[_0xbfee('0x6')]}};
\ No newline at end of file
index 48b453f..f8b953b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x68f6=['options','includeAll','include','findAll','rows','show','params','find','create','body','toUpperCase','STUN','readFileSync','join','server/files/templates/stun_multiple.ejs','utf8','render','writeFileSync','/etc/asterisk/stun_xcally.conf','res_stun_monitor.so','TURN','Reload','root','server/files/templates/network.ejs','format','/etc/asterisk/sip_xcally_%s.conf','server/files/templates/turn_multiple.ejs','chan_sip.so','/etc/asterisk/turn_xcally.conf','util','path','ejs','../../components/parsers/qs','../../config/logger','api','../../config/environment','jayson/promise','client','http','request','then','info','Network,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','status','json','undefined','limit','count','offset','Content-Range','update','destroy','sendStatus','stack','name','send','index','map','Network','rawAttributes','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','VIRTUAL','merge'];(function(_0x4dbdec,_0x44e0df){var _0x1b4fde=function(_0xad190b){while(--_0xad190b){_0x4dbdec['push'](_0x4dbdec['shift']());}};_0x1b4fde(++_0x44e0df);}(_0x68f6,0x1d0));var _0x668f=function(_0xdc49e4,_0x1d1193){_0xdc49e4=_0xdc49e4-0x0;var _0xc93c80=_0x68f6[_0xdc49e4];return _0xc93c80;};'use strict';var util=require(_0x668f('0x0'));var path=require(_0x668f('0x1'));var ejs=require(_0x668f('0x2'));var fs=require('fs');var _=require('lodash');var qs=require(_0x668f('0x3'));var logger=require(_0x668f('0x4'))(_0x668f('0x5'));var config=require(_0x668f('0x6'));var db=require('../../mysqldb')['db'];var jayson=require(_0x668f('0x7'));var client=jayson[_0x668f('0x8')][_0x668f('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1af241,_0x2e61d9,_0x342190,_0x20a050){return new Promise(function(_0x124807,_0x822361){var _0x4cb19c=_0x20a050||client;return _0x4cb19c[_0x668f('0xa')](_0x1af241,_0x342190)[_0x668f('0xb')](function(_0x5b438e){logger[_0x668f('0xc')](_0x668f('0xd'),_0x2e61d9,_0x668f('0xe'));logger[_0x668f('0xf')]('Network,\x20%s,\x20%s,\x20%s',_0x2e61d9,_0x668f('0xe'),JSON[_0x668f('0x10')](_0x5b438e));if(_0x5b438e['error']){if(_0x5b438e[_0x668f('0x11')][_0x668f('0x12')]===0x1f4){logger[_0x668f('0x11')]('Network,\x20%s,\x20%s',_0x2e61d9,_0x5b438e[_0x668f('0x11')][_0x668f('0x13')]);return _0x822361(_0x5b438e[_0x668f('0x11')][_0x668f('0x13')]);}logger[_0x668f('0x11')](_0x668f('0xd'),_0x2e61d9,_0x5b438e[_0x668f('0x11')]['message']);return _0x124807(_0x5b438e[_0x668f('0x11')][_0x668f('0x13')]);}else{logger[_0x668f('0xc')](_0x668f('0xd'),_0x2e61d9,'request\x20sent');_0x124807(_0x5b438e[_0x668f('0x14')][_0x668f('0x13')]);}})[_0x668f('0x15')](function(_0x35c6d4){logger[_0x668f('0x11')](_0x668f('0xd'),_0x2e61d9,_0x35c6d4);_0x822361(_0x35c6d4);});});}function respondWithResult(_0x57d177,_0x1c8664){_0x1c8664=_0x1c8664||0xc8;return function(_0x5b0605){if(_0x5b0605){return _0x57d177[_0x668f('0x16')](_0x1c8664)[_0x668f('0x17')](_0x5b0605);}};}function respondWithFilteredResult(_0xb2b5e9,_0x5a7cb1){return function(_0x54258c){if(_0x54258c){var _0x43c92b=typeof _0x5a7cb1['offset']===_0x668f('0x18')&&typeof _0x5a7cb1[_0x668f('0x19')]==='undefined';var _0xd287a8=_0x54258c[_0x668f('0x1a')];var _0x1a46f9=_0x43c92b?0x0:_0x5a7cb1['offset'];var _0x3ad282=_0x43c92b?_0x54258c[_0x668f('0x1a')]:_0x5a7cb1[_0x668f('0x1b')]+_0x5a7cb1[_0x668f('0x19')];var _0x3608bb;if(_0x3ad282>=_0xd287a8){_0x3ad282=_0xd287a8;_0x3608bb=0xc8;}else{_0x3608bb=0xce;}_0xb2b5e9[_0x668f('0x16')](_0x3608bb);return _0xb2b5e9['set'](_0x668f('0x1c'),_0x1a46f9+'-'+_0x3ad282+'/'+_0xd287a8)[_0x668f('0x17')](_0x54258c);}return null;};}function saveUpdates(_0x2d081d){return function(_0x5bc728){if(_0x5bc728){return _0x5bc728[_0x668f('0x1d')](_0x2d081d)[_0x668f('0xb')](function(_0x313c3e){return _0x313c3e;});}return null;};}function removeEntity(_0xbe59b6){return function(_0x5407e6){if(_0x5407e6){return _0x5407e6[_0x668f('0x1e')]()[_0x668f('0xb')](function(){_0xbe59b6[_0x668f('0x16')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4b7cb5){return function(_0x3222bb){if(!_0x3222bb){_0x4b7cb5[_0x668f('0x1f')](0x194);}return _0x3222bb;};}function handleError(_0x1721d9,_0x36bf77){_0x36bf77=_0x36bf77||0x1f4;return function(_0x2fc122){logger['error'](_0x2fc122[_0x668f('0x20')]);if(_0x2fc122[_0x668f('0x21')]){delete _0x2fc122[_0x668f('0x21')];}_0x1721d9[_0x668f('0x16')](_0x36bf77)[_0x668f('0x22')](_0x2fc122);};}exports[_0x668f('0x23')]=function(_0xe2753,_0xcd8af3){var _0xefddb0={},_0xd1b7dc={},_0x1bc3f1={'count':0x0,'rows':[]};var _0x23f712=_[_0x668f('0x24')](db[_0x668f('0x25')][_0x668f('0x26')],function(_0x4bffd9){return{'name':_0x4bffd9['fieldName'],'type':_0x4bffd9[_0x668f('0x27')][_0x668f('0x28')]};});_0xd1b7dc[_0x668f('0x29')]=_[_0x668f('0x24')](_0x23f712,'name');_0xd1b7dc[_0x668f('0x2a')]=_[_0x668f('0x2b')](_0xe2753[_0x668f('0x2a')]);_0xd1b7dc[_0x668f('0x2c')]=_['intersection'](_0xd1b7dc[_0x668f('0x29')],_0xd1b7dc[_0x668f('0x2a')]);_0xefddb0['attributes']=_[_0x668f('0x2d')](_0xd1b7dc[_0x668f('0x29')],qs[_0x668f('0x2e')](_0xe2753[_0x668f('0x2a')][_0x668f('0x2e')]));_0xefddb0['attributes']=_0xefddb0[_0x668f('0x2f')][_0x668f('0x30')]?_0xefddb0[_0x668f('0x2f')]:_0xd1b7dc[_0x668f('0x29')];if(!_0xe2753['query'][_0x668f('0x31')](_0x668f('0x32'))){_0xefddb0[_0x668f('0x19')]=qs[_0x668f('0x19')](_0xe2753[_0x668f('0x2a')][_0x668f('0x19')]);_0xefddb0[_0x668f('0x1b')]=qs[_0x668f('0x1b')](_0xe2753['query'][_0x668f('0x1b')]);}_0xefddb0[_0x668f('0x33')]=qs[_0x668f('0x34')](_0xe2753[_0x668f('0x2a')][_0x668f('0x34')]);_0xefddb0[_0x668f('0x35')]=qs[_0x668f('0x2c')](_[_0x668f('0x36')](_0xe2753[_0x668f('0x2a')],_0xd1b7dc[_0x668f('0x2c')]),_0x23f712);if(_0xe2753[_0x668f('0x2a')][_0x668f('0x37')]){_0xefddb0[_0x668f('0x35')]=_['merge'](_0xefddb0[_0x668f('0x35')],{'$or':_['map'](_0x23f712,function(_0x3d29c5){if(_0x3d29c5[_0x668f('0x27')]!==_0x668f('0x38')){var _0x29fbcf={};_0x29fbcf[_0x3d29c5['name']]={'$like':'%'+_0xe2753[_0x668f('0x2a')][_0x668f('0x37')]+'%'};return _0x29fbcf;}})});}_0xefddb0=_[_0x668f('0x39')]({},_0xefddb0,_0xe2753[_0x668f('0x3a')]);var _0x5d102a={'where':_0xefddb0[_0x668f('0x35')]};return db[_0x668f('0x25')][_0x668f('0x1a')](_0x5d102a)[_0x668f('0xb')](function(_0x3c2239){_0x1bc3f1[_0x668f('0x1a')]=_0x3c2239;if(_0xe2753['query'][_0x668f('0x3b')]){_0xefddb0[_0x668f('0x3c')]=[{'all':!![]}];}return db[_0x668f('0x25')][_0x668f('0x3d')](_0xefddb0);})['then'](function(_0x326ad1){_0x1bc3f1[_0x668f('0x3e')]=_0x326ad1;return _0x1bc3f1;})[_0x668f('0xb')](respondWithFilteredResult(_0xcd8af3,_0xefddb0))['catch'](handleError(_0xcd8af3,null));};exports[_0x668f('0x3f')]=function(_0x5a127,_0x2f3ace){var _0x1f8e30={'raw':!![],'where':{'id':_0x5a127[_0x668f('0x40')]['id']}},_0x2ca57c={};_0x2ca57c[_0x668f('0x29')]=_[_0x668f('0x2b')](db[_0x668f('0x25')][_0x668f('0x26')]);_0x2ca57c[_0x668f('0x2a')]=_[_0x668f('0x2b')](_0x5a127[_0x668f('0x2a')]);_0x2ca57c[_0x668f('0x2c')]=_[_0x668f('0x2d')](_0x2ca57c[_0x668f('0x29')],_0x2ca57c[_0x668f('0x2a')]);_0x1f8e30['attributes']=_['intersection'](_0x2ca57c[_0x668f('0x29')],qs[_0x668f('0x2e')](_0x5a127['query'][_0x668f('0x2e')]));_0x1f8e30[_0x668f('0x2f')]=_0x1f8e30[_0x668f('0x2f')][_0x668f('0x30')]?_0x1f8e30[_0x668f('0x2f')]:_0x2ca57c['model'];if(_0x5a127['query'][_0x668f('0x3b')]){_0x1f8e30['include']=[{'all':!![]}];}_0x1f8e30=_[_0x668f('0x39')]({},_0x1f8e30,_0x5a127['options']);return db[_0x668f('0x25')][_0x668f('0x41')](_0x1f8e30)[_0x668f('0xb')](handleEntityNotFound(_0x2f3ace,null))[_0x668f('0xb')](respondWithResult(_0x2f3ace,null))[_0x668f('0x15')](handleError(_0x2f3ace,null));};exports['create']=function(_0x3c1e3a,_0x236251){var _0x27bc9f;return db[_0x668f('0x25')][_0x668f('0x42')](_0x3c1e3a[_0x668f('0x43')],{'raw':!![]})[_0x668f('0xb')](function(_0x485bf6){_0x27bc9f=_0x485bf6;return db[_0x668f('0x25')][_0x668f('0x3d')]({'where':{'type':_0x3c1e3a['body']['type']},'raw':!![]});})[_0x668f('0xb')](function(_0x158bdc){if(_0x27bc9f['type'][_0x668f('0x44')]()==_0x668f('0x45')){var _0x65e930=fs[_0x668f('0x46')](path[_0x668f('0x47')](config['root'],_0x668f('0x48')),_0x668f('0x49'));var _0x48c814=ejs[_0x668f('0x4a')](_0x65e930,{'networks':_0x158bdc||[]});fs[_0x668f('0x4b')](_0x668f('0x4c'),_0x48c814);return respondWithRpcPromise('Reload',_0x668f('0x42'),{'module':_0x668f('0x4d')});}else if(_0x27bc9f[_0x668f('0x27')][_0x668f('0x44')]()==_0x668f('0x4e')){var _0x105c7f=fs[_0x668f('0x46')](path[_0x668f('0x47')](config['root'],'server/files/templates/turn_multiple.ejs'),_0x668f('0x49'));var _0x394549=ejs[_0x668f('0x4a')](_0x105c7f,{'networks':_0x158bdc||[]});fs[_0x668f('0x4b')]('/etc/asterisk/turn_xcally.conf',_0x394549);return respondWithRpcPromise(_0x668f('0x4f'),'create',{'module':'res_stun_monitor.so'});}else{var _0x2be092=fs[_0x668f('0x46')](path['join'](config[_0x668f('0x50')],_0x668f('0x51')),_0x668f('0x49'));var _0x7976d0=ejs[_0x668f('0x4a')](_0x2be092,{'networks':_0x158bdc||[]});fs['writeFileSync'](util[_0x668f('0x52')](_0x668f('0x53'),_0x3c1e3a['body'][_0x668f('0x27')]['toLowerCase']()),_0x7976d0);return respondWithRpcPromise('Reload',_0x668f('0x42'),{'module':'chan_sip.so'});}})['then'](function(){return _0x27bc9f;})['then'](respondWithResult(_0x236251,0xc9))[_0x668f('0x15')](handleError(_0x236251,null));};exports[_0x668f('0x1d')]=function(_0x34df95,_0xa381ca){var _0x3c11b5;return db[_0x668f('0x25')][_0x668f('0x41')]({'where':{'id':_0x34df95[_0x668f('0x40')]['id']}})[_0x668f('0xb')](handleEntityNotFound(_0xa381ca,null))['then'](saveUpdates(_0x34df95[_0x668f('0x43')],null))[_0x668f('0xb')](function(_0x351627){if(_0x351627){_0x3c11b5=_0x351627;return db[_0x668f('0x25')][_0x668f('0x3d')]({'where':{'type':_0x3c11b5[_0x668f('0x27')]},'raw':!![]});}return null;})[_0x668f('0xb')](function(_0x208280){if(_0x3c11b5[_0x668f('0x27')]['toUpperCase']()==_0x668f('0x45')){var _0x1510f1=fs[_0x668f('0x46')](path[_0x668f('0x47')](config[_0x668f('0x50')],_0x668f('0x48')),_0x668f('0x49'));var _0x2f16cc=ejs[_0x668f('0x4a')](_0x1510f1,{'networks':_0x208280||[]});fs['writeFileSync'](_0x668f('0x4c'),_0x2f16cc);return respondWithRpcPromise(_0x668f('0x4f'),'update',{'module':_0x668f('0x4d')});}else if(_0x3c11b5[_0x668f('0x27')]['toUpperCase']()=='TURN'){var _0x153537=fs['readFileSync'](path[_0x668f('0x47')](config[_0x668f('0x50')],_0x668f('0x54')),'utf8');var _0x104d1f=ejs[_0x668f('0x4a')](_0x153537,{'networks':_0x208280||[]});fs[_0x668f('0x4b')]('/etc/asterisk/turn_xcally.conf',_0x104d1f);return respondWithRpcPromise(_0x668f('0x4f'),_0x668f('0x1d'),{'module':_0x668f('0x4d')});}else{var _0x43100a=fs['readFileSync'](path[_0x668f('0x47')](config[_0x668f('0x50')],_0x668f('0x51')),_0x668f('0x49'));var _0x133048=ejs[_0x668f('0x4a')](_0x43100a,{'networks':_0x208280||[]});fs['writeFileSync'](util['format'](_0x668f('0x53'),_0x34df95[_0x668f('0x43')][_0x668f('0x27')]['toLowerCase']()),_0x133048);return respondWithRpcPromise(_0x668f('0x4f'),'update',{'module':_0x668f('0x55')});}})[_0x668f('0xb')](function(_0x5749e0){if(_0x5749e0){return _0x3c11b5;}return null;})[_0x668f('0xb')](respondWithResult(_0xa381ca,null))[_0x668f('0x15')](handleError(_0xa381ca,null));};exports['destroy']=function(_0x1ee9ae,_0x294a80){var _0x50b8dc;return db[_0x668f('0x25')]['find']({'where':{'id':_0x1ee9ae['params']['id']}})[_0x668f('0xb')](function(_0x5944d5){_0x50b8dc=_0x5944d5;return _0x5944d5;})[_0x668f('0xb')](handleEntityNotFound(_0x294a80,null))[_0x668f('0xb')](removeEntity(_0x294a80,null))[_0x668f('0xb')](function(){if(_0x50b8dc){return db[_0x668f('0x25')][_0x668f('0x3d')]({'where':{'type':_0x50b8dc['type']},'raw':!![]});}})[_0x668f('0xb')](function(_0x2e0b00){if(_0x50b8dc[_0x668f('0x27')][_0x668f('0x44')]()==_0x668f('0x45')){var _0x4cb21b=fs['readFileSync'](path[_0x668f('0x47')](config[_0x668f('0x50')],_0x668f('0x48')),_0x668f('0x49'));var _0x45da2d=ejs[_0x668f('0x4a')](_0x4cb21b,{'networks':_0x2e0b00||[]});fs[_0x668f('0x4b')](_0x668f('0x4c'),_0x45da2d);return respondWithRpcPromise(_0x668f('0x4f'),_0x668f('0x1e'),{'module':'res_stun_monitor.so'});}else if(_0x50b8dc[_0x668f('0x27')][_0x668f('0x44')]()=='TURN'){var _0x10a2cf=fs[_0x668f('0x46')](path[_0x668f('0x47')](config[_0x668f('0x50')],_0x668f('0x54')),'utf8');var _0x36c164=ejs['render'](_0x10a2cf,{'networks':_0x2e0b00||[]});fs[_0x668f('0x4b')](_0x668f('0x56'),_0x36c164);return respondWithRpcPromise(_0x668f('0x4f'),'destroy',{'module':'res_stun_monitor.so'});}else{var _0x5d750a=fs[_0x668f('0x46')](path['join'](config['root'],_0x668f('0x51')),_0x668f('0x49'));var _0x521a45=ejs[_0x668f('0x4a')](_0x5d750a,{'networks':_0x2e0b00||[]});fs['writeFileSync'](util[_0x668f('0x52')](_0x668f('0x53'),_0x50b8dc[_0x668f('0x27')]['toLowerCase']()),_0x521a45);return respondWithRpcPromise('Reload',_0x668f('0x1e'),{'module':_0x668f('0x55')});}})[_0x668f('0x15')](handleError(_0x294a80,null));};
\ No newline at end of file
+var _0xb6a0=['pick','filters','filter','merge','VIRTUAL','include','findAll','rows','show','params','includeAll','options','find','create','body','toUpperCase','readFileSync','join','root','server/files/templates/stun_multiple.ejs','render','writeFileSync','/etc/asterisk/stun_xcally.conf','Reload','res_stun_monitor.so','TURN','utf8','/etc/asterisk/turn_xcally.conf','server/files/templates/network.ejs','format','/etc/asterisk/sip_xcally_%s.conf','STUN','toLowerCase','chan_sip.so','destroy','server/files/templates/turn_multiple.ejs','util','path','ejs','../../components/parsers/qs','../../config/logger','api','../../mysqldb','client','http','request','then','info','Network,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','catch','status','json','offset','undefined','count','set','Content-Range','update','end','sendStatus','name','send','index','map','Network','rawAttributes','fieldName','type','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','limit','order','sort','where'];(function(_0x50cf46,_0x4c7e15){var _0x118e26=function(_0x46083e){while(--_0x46083e){_0x50cf46['push'](_0x50cf46['shift']());}};_0x118e26(++_0x4c7e15);}(_0xb6a0,0x126));var _0x0b6a=function(_0x47afb2,_0x42dad3){_0x47afb2=_0x47afb2-0x0;var _0x39486a=_0xb6a0[_0x47afb2];return _0x39486a;};'use strict';var util=require(_0x0b6a('0x0'));var path=require(_0x0b6a('0x1'));var ejs=require(_0x0b6a('0x2'));var fs=require('fs');var _=require('lodash');var qs=require(_0x0b6a('0x3'));var logger=require(_0x0b6a('0x4'))(_0x0b6a('0x5'));var config=require('../../config/environment');var db=require(_0x0b6a('0x6'))['db'];var jayson=require('jayson/promise');var client=jayson[_0x0b6a('0x7')][_0x0b6a('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2faea4,_0x422d76,_0x16dd40,_0x73dc3d){return new Promise(function(_0x248faa,_0xf3ca34){var _0x464003=_0x73dc3d||client;return _0x464003[_0x0b6a('0x9')](_0x2faea4,_0x16dd40)[_0x0b6a('0xa')](function(_0x30e8e1){logger[_0x0b6a('0xb')](_0x0b6a('0xc'),_0x422d76,_0x0b6a('0xd'));logger[_0x0b6a('0xe')]('Network,\x20%s,\x20%s,\x20%s',_0x422d76,_0x0b6a('0xd'),JSON[_0x0b6a('0xf')](_0x30e8e1));if(_0x30e8e1[_0x0b6a('0x10')]){if(_0x30e8e1['error']['code']===0x1f4){logger[_0x0b6a('0x10')](_0x0b6a('0xc'),_0x422d76,_0x30e8e1[_0x0b6a('0x10')][_0x0b6a('0x11')]);return _0xf3ca34(_0x30e8e1[_0x0b6a('0x10')][_0x0b6a('0x11')]);}logger[_0x0b6a('0x10')](_0x0b6a('0xc'),_0x422d76,_0x30e8e1[_0x0b6a('0x10')][_0x0b6a('0x11')]);return _0x248faa(_0x30e8e1[_0x0b6a('0x10')][_0x0b6a('0x11')]);}else{logger['info'](_0x0b6a('0xc'),_0x422d76,'request\x20sent');_0x248faa(_0x30e8e1[_0x0b6a('0x12')][_0x0b6a('0x11')]);}})[_0x0b6a('0x13')](function(_0x3c6bfd){logger[_0x0b6a('0x10')](_0x0b6a('0xc'),_0x422d76,_0x3c6bfd);_0xf3ca34(_0x3c6bfd);});});}function respondWithResult(_0x40d786,_0x1152b0){_0x1152b0=_0x1152b0||0xc8;return function(_0x38214e){if(_0x38214e){return _0x40d786[_0x0b6a('0x14')](_0x1152b0)[_0x0b6a('0x15')](_0x38214e);}};}function respondWithFilteredResult(_0x4aea5e,_0x1dec83){return function(_0x182ff3){if(_0x182ff3){var _0x48d044=typeof _0x1dec83[_0x0b6a('0x16')]===_0x0b6a('0x17')&&typeof _0x1dec83['limit']===_0x0b6a('0x17');var _0x5b891e=_0x182ff3[_0x0b6a('0x18')];var _0x4d1220=_0x48d044?0x0:_0x1dec83[_0x0b6a('0x16')];var _0x30a908=_0x48d044?_0x182ff3['count']:_0x1dec83['offset']+_0x1dec83['limit'];var _0x5957b4;if(_0x30a908>=_0x5b891e){_0x30a908=_0x5b891e;_0x5957b4=0xc8;}else{_0x5957b4=0xce;}_0x4aea5e[_0x0b6a('0x14')](_0x5957b4);return _0x4aea5e[_0x0b6a('0x19')](_0x0b6a('0x1a'),_0x4d1220+'-'+_0x30a908+'/'+_0x5b891e)['json'](_0x182ff3);}return null;};}function saveUpdates(_0x56442c){return function(_0x30ddec){if(_0x30ddec){return _0x30ddec[_0x0b6a('0x1b')](_0x56442c)[_0x0b6a('0xa')](function(_0x498501){return _0x498501;});}return null;};}function removeEntity(_0x1fadc4){return function(_0x1624f8){if(_0x1624f8){return _0x1624f8['destroy']()[_0x0b6a('0xa')](function(){_0x1fadc4[_0x0b6a('0x14')](0xcc)[_0x0b6a('0x1c')]();});}};}function handleEntityNotFound(_0x48244f){return function(_0x51ddfb){if(!_0x51ddfb){_0x48244f[_0x0b6a('0x1d')](0x194);}return _0x51ddfb;};}function handleError(_0x467fa2,_0x240348){_0x240348=_0x240348||0x1f4;return function(_0x18d10e){logger[_0x0b6a('0x10')](_0x18d10e['stack']);if(_0x18d10e[_0x0b6a('0x1e')]){delete _0x18d10e[_0x0b6a('0x1e')];}_0x467fa2[_0x0b6a('0x14')](_0x240348)[_0x0b6a('0x1f')](_0x18d10e);};}exports[_0x0b6a('0x20')]=function(_0x11b11b,_0x552b83){var _0xd49254={},_0x5a96b2={},_0x666a51={'count':0x0,'rows':[]};var _0x4f38a1=_[_0x0b6a('0x21')](db[_0x0b6a('0x22')][_0x0b6a('0x23')],function(_0x112ed4){return{'name':_0x112ed4[_0x0b6a('0x24')],'type':_0x112ed4[_0x0b6a('0x25')]['key']};});_0x5a96b2[_0x0b6a('0x26')]=_[_0x0b6a('0x21')](_0x4f38a1,'name');_0x5a96b2[_0x0b6a('0x27')]=_[_0x0b6a('0x28')](_0x11b11b[_0x0b6a('0x27')]);_0x5a96b2['filters']=_[_0x0b6a('0x29')](_0x5a96b2[_0x0b6a('0x26')],_0x5a96b2[_0x0b6a('0x27')]);_0xd49254[_0x0b6a('0x2a')]=_[_0x0b6a('0x29')](_0x5a96b2[_0x0b6a('0x26')],qs[_0x0b6a('0x2b')](_0x11b11b[_0x0b6a('0x27')][_0x0b6a('0x2b')]));_0xd49254[_0x0b6a('0x2a')]=_0xd49254[_0x0b6a('0x2a')]['length']?_0xd49254[_0x0b6a('0x2a')]:_0x5a96b2[_0x0b6a('0x26')];if(!_0x11b11b[_0x0b6a('0x27')][_0x0b6a('0x2c')](_0x0b6a('0x2d'))){_0xd49254[_0x0b6a('0x2e')]=qs[_0x0b6a('0x2e')](_0x11b11b['query'][_0x0b6a('0x2e')]);_0xd49254['offset']=qs[_0x0b6a('0x16')](_0x11b11b[_0x0b6a('0x27')][_0x0b6a('0x16')]);}_0xd49254[_0x0b6a('0x2f')]=qs['sort'](_0x11b11b[_0x0b6a('0x27')][_0x0b6a('0x30')]);_0xd49254[_0x0b6a('0x31')]=qs['filters'](_[_0x0b6a('0x32')](_0x11b11b[_0x0b6a('0x27')],_0x5a96b2[_0x0b6a('0x33')]),_0x4f38a1);if(_0x11b11b[_0x0b6a('0x27')][_0x0b6a('0x34')]){_0xd49254[_0x0b6a('0x31')]=_[_0x0b6a('0x35')](_0xd49254[_0x0b6a('0x31')],{'$or':_[_0x0b6a('0x21')](_0x4f38a1,function(_0x4014ee){if(_0x4014ee['type']!==_0x0b6a('0x36')){var _0x5775b8={};_0x5775b8[_0x4014ee[_0x0b6a('0x1e')]]={'$like':'%'+_0x11b11b[_0x0b6a('0x27')]['filter']+'%'};return _0x5775b8;}})});}_0xd49254=_[_0x0b6a('0x35')]({},_0xd49254,_0x11b11b['options']);var _0xd238fb={'where':_0xd49254[_0x0b6a('0x31')]};return db[_0x0b6a('0x22')][_0x0b6a('0x18')](_0xd238fb)[_0x0b6a('0xa')](function(_0x1b5496){_0x666a51[_0x0b6a('0x18')]=_0x1b5496;if(_0x11b11b[_0x0b6a('0x27')]['includeAll']){_0xd49254[_0x0b6a('0x37')]=[{'all':!![]}];}return db['Network'][_0x0b6a('0x38')](_0xd49254);})[_0x0b6a('0xa')](function(_0x35904e){_0x666a51[_0x0b6a('0x39')]=_0x35904e;return _0x666a51;})['then'](respondWithFilteredResult(_0x552b83,_0xd49254))['catch'](handleError(_0x552b83,null));};exports[_0x0b6a('0x3a')]=function(_0x260f07,_0x39d66b){var _0x53c4ff={'raw':!![],'where':{'id':_0x260f07[_0x0b6a('0x3b')]['id']}},_0x34cdeb={};_0x34cdeb['model']=_[_0x0b6a('0x28')](db[_0x0b6a('0x22')]['rawAttributes']);_0x34cdeb[_0x0b6a('0x27')]=_[_0x0b6a('0x28')](_0x260f07[_0x0b6a('0x27')]);_0x34cdeb['filters']=_[_0x0b6a('0x29')](_0x34cdeb[_0x0b6a('0x26')],_0x34cdeb[_0x0b6a('0x27')]);_0x53c4ff[_0x0b6a('0x2a')]=_[_0x0b6a('0x29')](_0x34cdeb[_0x0b6a('0x26')],qs[_0x0b6a('0x2b')](_0x260f07[_0x0b6a('0x27')][_0x0b6a('0x2b')]));_0x53c4ff[_0x0b6a('0x2a')]=_0x53c4ff[_0x0b6a('0x2a')]['length']?_0x53c4ff['attributes']:_0x34cdeb['model'];if(_0x260f07[_0x0b6a('0x27')][_0x0b6a('0x3c')]){_0x53c4ff[_0x0b6a('0x37')]=[{'all':!![]}];}_0x53c4ff=_[_0x0b6a('0x35')]({},_0x53c4ff,_0x260f07[_0x0b6a('0x3d')]);return db[_0x0b6a('0x22')][_0x0b6a('0x3e')](_0x53c4ff)[_0x0b6a('0xa')](handleEntityNotFound(_0x39d66b,null))[_0x0b6a('0xa')](respondWithResult(_0x39d66b,null))[_0x0b6a('0x13')](handleError(_0x39d66b,null));};exports[_0x0b6a('0x3f')]=function(_0xc7a7ff,_0x4fb1b2){var _0x2af718;return db[_0x0b6a('0x22')][_0x0b6a('0x3f')](_0xc7a7ff[_0x0b6a('0x40')],{'raw':!![]})[_0x0b6a('0xa')](function(_0x17146c){_0x2af718=_0x17146c;return db['Network']['findAll']({'where':{'type':_0xc7a7ff['body'][_0x0b6a('0x25')]},'raw':!![]});})[_0x0b6a('0xa')](function(_0x104903){if(_0x2af718[_0x0b6a('0x25')][_0x0b6a('0x41')]()=='STUN'){var _0x2b1ea4=fs[_0x0b6a('0x42')](path[_0x0b6a('0x43')](config[_0x0b6a('0x44')],_0x0b6a('0x45')),'utf8');var _0x4cc8d9=ejs[_0x0b6a('0x46')](_0x2b1ea4,{'networks':_0x104903||[]});fs[_0x0b6a('0x47')](_0x0b6a('0x48'),_0x4cc8d9);return respondWithRpcPromise(_0x0b6a('0x49'),_0x0b6a('0x3f'),{'module':_0x0b6a('0x4a')});}else if(_0x2af718[_0x0b6a('0x25')][_0x0b6a('0x41')]()==_0x0b6a('0x4b')){var _0x1387aa=fs[_0x0b6a('0x42')](path[_0x0b6a('0x43')](config[_0x0b6a('0x44')],'server/files/templates/turn_multiple.ejs'),_0x0b6a('0x4c'));var _0x99015f=ejs[_0x0b6a('0x46')](_0x1387aa,{'networks':_0x104903||[]});fs[_0x0b6a('0x47')](_0x0b6a('0x4d'),_0x99015f);return respondWithRpcPromise(_0x0b6a('0x49'),_0x0b6a('0x3f'),{'module':_0x0b6a('0x4a')});}else{var _0x3b3697=fs['readFileSync'](path[_0x0b6a('0x43')](config[_0x0b6a('0x44')],_0x0b6a('0x4e')),_0x0b6a('0x4c'));var _0x279de4=ejs[_0x0b6a('0x46')](_0x3b3697,{'networks':_0x104903||[]});fs['writeFileSync'](util[_0x0b6a('0x4f')](_0x0b6a('0x50'),_0xc7a7ff[_0x0b6a('0x40')][_0x0b6a('0x25')]['toLowerCase']()),_0x279de4);return respondWithRpcPromise(_0x0b6a('0x49'),_0x0b6a('0x3f'),{'module':'chan_sip.so'});}})['then'](function(){return _0x2af718;})[_0x0b6a('0xa')](respondWithResult(_0x4fb1b2,0xc9))[_0x0b6a('0x13')](handleError(_0x4fb1b2,null));};exports[_0x0b6a('0x1b')]=function(_0x1b2174,_0x8838cf){var _0x1055fc;return db[_0x0b6a('0x22')][_0x0b6a('0x3e')]({'where':{'id':_0x1b2174[_0x0b6a('0x3b')]['id']}})['then'](handleEntityNotFound(_0x8838cf,null))['then'](saveUpdates(_0x1b2174['body'],null))['then'](function(_0x4d7a76){if(_0x4d7a76){_0x1055fc=_0x4d7a76;return db[_0x0b6a('0x22')][_0x0b6a('0x38')]({'where':{'type':_0x1055fc[_0x0b6a('0x25')]},'raw':!![]});}return null;})[_0x0b6a('0xa')](function(_0x424cb8){if(_0x1055fc[_0x0b6a('0x25')][_0x0b6a('0x41')]()==_0x0b6a('0x51')){var _0x6c0ddf=fs[_0x0b6a('0x42')](path[_0x0b6a('0x43')](config[_0x0b6a('0x44')],_0x0b6a('0x45')),_0x0b6a('0x4c'));var _0x34728d=ejs[_0x0b6a('0x46')](_0x6c0ddf,{'networks':_0x424cb8||[]});fs[_0x0b6a('0x47')](_0x0b6a('0x48'),_0x34728d);return respondWithRpcPromise(_0x0b6a('0x49'),_0x0b6a('0x1b'),{'module':_0x0b6a('0x4a')});}else if(_0x1055fc[_0x0b6a('0x25')][_0x0b6a('0x41')]()=='TURN'){var _0x3eb444=fs['readFileSync'](path[_0x0b6a('0x43')](config[_0x0b6a('0x44')],'server/files/templates/turn_multiple.ejs'),_0x0b6a('0x4c'));var _0x61823f=ejs[_0x0b6a('0x46')](_0x3eb444,{'networks':_0x424cb8||[]});fs['writeFileSync'](_0x0b6a('0x4d'),_0x61823f);return respondWithRpcPromise('Reload',_0x0b6a('0x1b'),{'module':'res_stun_monitor.so'});}else{var _0x12d980=fs['readFileSync'](path[_0x0b6a('0x43')](config[_0x0b6a('0x44')],'server/files/templates/network.ejs'),'utf8');var _0x5aac6a=ejs[_0x0b6a('0x46')](_0x12d980,{'networks':_0x424cb8||[]});fs[_0x0b6a('0x47')](util[_0x0b6a('0x4f')](_0x0b6a('0x50'),_0x1b2174[_0x0b6a('0x40')][_0x0b6a('0x25')][_0x0b6a('0x52')]()),_0x5aac6a);return respondWithRpcPromise(_0x0b6a('0x49'),_0x0b6a('0x1b'),{'module':_0x0b6a('0x53')});}})[_0x0b6a('0xa')](function(_0x10cd1a){if(_0x10cd1a){return _0x1055fc;}return null;})[_0x0b6a('0xa')](respondWithResult(_0x8838cf,null))[_0x0b6a('0x13')](handleError(_0x8838cf,null));};exports[_0x0b6a('0x54')]=function(_0x381b01,_0x199be1){var _0xf03b9d;return db[_0x0b6a('0x22')]['find']({'where':{'id':_0x381b01[_0x0b6a('0x3b')]['id']}})[_0x0b6a('0xa')](function(_0x16b18c){_0xf03b9d=_0x16b18c;return _0x16b18c;})[_0x0b6a('0xa')](handleEntityNotFound(_0x199be1,null))[_0x0b6a('0xa')](removeEntity(_0x199be1,null))[_0x0b6a('0xa')](function(){if(_0xf03b9d){return db[_0x0b6a('0x22')][_0x0b6a('0x38')]({'where':{'type':_0xf03b9d[_0x0b6a('0x25')]},'raw':!![]});}})[_0x0b6a('0xa')](function(_0x1ef954){if(_0xf03b9d[_0x0b6a('0x25')]['toUpperCase']()==_0x0b6a('0x51')){var _0x2aadb7=fs['readFileSync'](path[_0x0b6a('0x43')](config[_0x0b6a('0x44')],'server/files/templates/stun_multiple.ejs'),'utf8');var _0x40d370=ejs['render'](_0x2aadb7,{'networks':_0x1ef954||[]});fs[_0x0b6a('0x47')]('/etc/asterisk/stun_xcally.conf',_0x40d370);return respondWithRpcPromise('Reload',_0x0b6a('0x54'),{'module':'res_stun_monitor.so'});}else if(_0xf03b9d[_0x0b6a('0x25')][_0x0b6a('0x41')]()==_0x0b6a('0x4b')){var _0x309198=fs['readFileSync'](path[_0x0b6a('0x43')](config[_0x0b6a('0x44')],_0x0b6a('0x55')),_0x0b6a('0x4c'));var _0x5fda87=ejs[_0x0b6a('0x46')](_0x309198,{'networks':_0x1ef954||[]});fs[_0x0b6a('0x47')]('/etc/asterisk/turn_xcally.conf',_0x5fda87);return respondWithRpcPromise(_0x0b6a('0x49'),_0x0b6a('0x54'),{'module':'res_stun_monitor.so'});}else{var _0x3b67d5=fs[_0x0b6a('0x42')](path[_0x0b6a('0x43')](config[_0x0b6a('0x44')],_0x0b6a('0x4e')),'utf8');var _0x316c6c=ejs[_0x0b6a('0x46')](_0x3b67d5,{'networks':_0x1ef954||[]});fs['writeFileSync'](util[_0x0b6a('0x4f')](_0x0b6a('0x50'),_0xf03b9d[_0x0b6a('0x25')][_0x0b6a('0x52')]()),_0x316c6c);return respondWithRpcPromise(_0x0b6a('0x49'),_0x0b6a('0x54'),{'module':_0x0b6a('0x53')});}})[_0x0b6a('0x13')](handleError(_0x199be1,null));};
\ No newline at end of file
index 20bc1df..f78798c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfe57=['Network','network','lodash','util','moment','bluebird','request-promise','path','rimraf','../../config/environment','./network.attributes','exports','define'];(function(_0x1405bb,_0x3a0a72){var _0x13b172=function(_0x27abdb){while(--_0x27abdb){_0x1405bb['push'](_0x1405bb['shift']());}};_0x13b172(++_0x3a0a72);}(_0xfe57,0x195));var _0x7fe5=function(_0x2984d0,_0x1a7211){_0x2984d0=_0x2984d0-0x0;var _0x2885f2=_0xfe57[_0x2984d0];return _0x2885f2;};'use strict';var _=require(_0x7fe5('0x0'));var util=require(_0x7fe5('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x7fe5('0x2'));var BPromise=require(_0x7fe5('0x3'));var rp=require(_0x7fe5('0x4'));var fs=require('fs');var path=require(_0x7fe5('0x5'));var rimraf=require(_0x7fe5('0x6'));var config=require(_0x7fe5('0x7'));var attributes=require(_0x7fe5('0x8'));module[_0x7fe5('0x9')]=function(_0x22e850,_0x188cfb){return _0x22e850[_0x7fe5('0xa')](_0x7fe5('0xb'),attributes,{'tableName':_0x7fe5('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x4ded=['path','rimraf','../../config/environment','./network.attributes','exports','define','Network','network','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x564a85,_0x60711c){var _0x500962=function(_0x59dfa6){while(--_0x59dfa6){_0x564a85['push'](_0x564a85['shift']());}};_0x500962(++_0x60711c);}(_0x4ded,0x116));var _0xd4de=function(_0x5e937f,_0x524a70){_0x5e937f=_0x5e937f-0x0;var _0x5bbb7c=_0x4ded[_0x5e937f];return _0x5bbb7c;};'use strict';var _=require(_0xd4de('0x0'));var util=require(_0xd4de('0x1'));var logger=require(_0xd4de('0x2'))(_0xd4de('0x3'));var moment=require(_0xd4de('0x4'));var BPromise=require(_0xd4de('0x5'));var rp=require(_0xd4de('0x6'));var fs=require('fs');var path=require(_0xd4de('0x7'));var rimraf=require(_0xd4de('0x8'));var config=require(_0xd4de('0x9'));var attributes=require(_0xd4de('0xa'));module[_0xd4de('0xb')]=function(_0x554a51,_0x23e5b9){return _0x554a51[_0xd4de('0xc')](_0xd4de('0xd'),attributes,{'tableName':_0xd4de('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 74d572e..fc722c1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['info','Network,\x20%s,\x20%s','debug','stringify','error','code','message','request\x20sent','result','catch','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x7a54,0x106));var _0x47a5=function(_0x452433,_0x49a0af){_0x452433=_0x452433-0x0;var _0x32a3f4=_0x7a54[_0x452433];return _0x32a3f4;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var moment=require(_0x47a5('0x2'));var BPromise=require('bluebird');var rs=require(_0x47a5('0x3'));var fs=require('fs');var Redis=require(_0x47a5('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x47a5('0x5'));var logger=require(_0x47a5('0x6'))(_0x47a5('0x7'));var config=require(_0x47a5('0x8'));var jayson=require(_0x47a5('0x9'));var client=jayson['client'][_0x47a5('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x59199c,_0x343372,_0x30e405){return new BPromise(function(_0x506eda,_0x194fb0){return client['request'](_0x59199c,_0x30e405)['then'](function(_0x582352){logger[_0x47a5('0xb')](_0x47a5('0xc'),_0x343372,'request\x20sent');logger[_0x47a5('0xd')]('Network,\x20%s,\x20%s,\x20%s',_0x343372,'request\x20sent',JSON[_0x47a5('0xe')](_0x582352));if(_0x582352[_0x47a5('0xf')]){if(_0x582352[_0x47a5('0xf')][_0x47a5('0x10')]===0x1f4){logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')]['message']);return _0x194fb0(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}logger[_0x47a5('0xf')](_0x47a5('0xc'),_0x343372,_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);return _0x506eda(_0x582352[_0x47a5('0xf')][_0x47a5('0x11')]);}else{logger['info'](_0x47a5('0xc'),_0x343372,_0x47a5('0x12'));_0x506eda(_0x582352[_0x47a5('0x13')][_0x47a5('0x11')]);}})[_0x47a5('0x14')](function(_0x574af6){logger['error'](_0x47a5('0xc'),_0x343372,_0x574af6);_0x194fb0(_0x574af6);});});}
\ No newline at end of file
+var _0x9957=['message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','Network,\x20%s,\x20%s','request\x20sent','debug','Network,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x525d59,_0x4e959d){var _0x3761bc=function(_0x4a4ba0){while(--_0x4a4ba0){_0x525d59['push'](_0x525d59['shift']());}};_0x3761bc(++_0x4e959d);}(_0x9957,0x93));var _0x7995=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0x9957[_0x5ddb1c];return _0x354adc;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var moment=require(_0x7995('0x2'));var BPromise=require(_0x7995('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7995('0x4'));var db=require(_0x7995('0x5'))['db'];var utils=require(_0x7995('0x6'));var logger=require(_0x7995('0x7'))('rpc');var config=require(_0x7995('0x8'));var jayson=require(_0x7995('0x9'));var client=jayson[_0x7995('0xa')][_0x7995('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xbda126,_0x326741,_0x4996ca){return new BPromise(function(_0x465276,_0x1cad37){return client['request'](_0xbda126,_0x4996ca)[_0x7995('0xc')](function(_0x3116fb){logger[_0x7995('0xd')](_0x7995('0xe'),_0x326741,_0x7995('0xf'));logger[_0x7995('0x10')](_0x7995('0x11'),_0x326741,'request\x20sent',JSON[_0x7995('0x12')](_0x3116fb));if(_0x3116fb[_0x7995('0x13')]){if(_0x3116fb['error'][_0x7995('0x14')]===0x1f4){logger[_0x7995('0x13')](_0x7995('0xe'),_0x326741,_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);return _0x1cad37(_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);}logger['error']('Network,\x20%s,\x20%s',_0x326741,_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);return _0x465276(_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);}else{logger[_0x7995('0xd')](_0x7995('0xe'),_0x326741,_0x7995('0xf'));_0x465276(_0x3116fb[_0x7995('0x16')]['message']);}})[_0x7995('0x17')](function(_0x565d97){logger[_0x7995('0x13')](_0x7995('0xe'),_0x326741,_0x565d97);_0x1cad37(_0x565d97);});});}
\ No newline at end of file
index 3b9e00b..c08b05e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8603=['/:id/users','getAgents','create','post','addDisposition','addAnswer','/:id/notify','/:id/applications','addApplications','addAgents','/:id/send','send','put','/:id','update','delete','destroy','removeDispositions','removeAnswers','removeAgents','util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','./openchannelAccount.controller','isAuthenticated','index','get','/describe','show','/:id/dispositions','/:id/canned_answers','getAnswers','getApplications','/:id/interactions','getInteractions'];(function(_0x3f465d,_0xbd2037){var _0x121ad1=function(_0x5b13d6){while(--_0x5b13d6){_0x3f465d['push'](_0x3f465d['shift']());}};_0x121ad1(++_0xbd2037);}(_0x8603,0x190));var _0x3860=function(_0x1742b8,_0x2a48dd){_0x1742b8=_0x1742b8-0x0;var _0x64cd5a=_0x8603[_0x1742b8];return _0x64cd5a;};'use strict';var multer=require('multer');var util=require(_0x3860('0x0'));var path=require(_0x3860('0x1'));var timeout=require(_0x3860('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x3860('0x3'));var auth=require(_0x3860('0x4'));var interaction=require(_0x3860('0x5'));var config=require('../../config/environment');var controller=require(_0x3860('0x6'));router['get']('/',auth[_0x3860('0x7')](),controller[_0x3860('0x8')]);router[_0x3860('0x9')](_0x3860('0xa'),auth[_0x3860('0x7')](),controller['describe']);router['get']('/:id',auth[_0x3860('0x7')](),controller[_0x3860('0xb')]);router['get'](_0x3860('0xc'),auth[_0x3860('0x7')](),controller['getDispositions']);router[_0x3860('0x9')](_0x3860('0xd'),auth['isAuthenticated'](),controller[_0x3860('0xe')]);router[_0x3860('0x9')]('/:id/applications',auth[_0x3860('0x7')](),controller[_0x3860('0xf')]);router[_0x3860('0x9')](_0x3860('0x10'),auth[_0x3860('0x7')](),controller[_0x3860('0x11')]);router[_0x3860('0x9')](_0x3860('0x12'),auth[_0x3860('0x7')](),controller[_0x3860('0x13')]);router['post']('/',auth[_0x3860('0x7')](),controller[_0x3860('0x14')]);router[_0x3860('0x15')](_0x3860('0xc'),auth[_0x3860('0x7')](),controller[_0x3860('0x16')]);router[_0x3860('0x15')](_0x3860('0xd'),auth[_0x3860('0x7')](),controller[_0x3860('0x17')]);router[_0x3860('0x15')](_0x3860('0x18'),controller['notify']);router['post'](_0x3860('0x19'),auth[_0x3860('0x7')](),controller[_0x3860('0x1a')]);router['post'](_0x3860('0x12'),auth[_0x3860('0x7')](),controller[_0x3860('0x1b')]);router[_0x3860('0x15')](_0x3860('0x1c'),auth[_0x3860('0x7')](),controller[_0x3860('0x1d')]);router[_0x3860('0x1e')](_0x3860('0x1f'),auth[_0x3860('0x7')](),controller[_0x3860('0x20')]);router[_0x3860('0x21')](_0x3860('0x1f'),auth[_0x3860('0x7')](),controller[_0x3860('0x22')]);router['delete'](_0x3860('0xc'),auth[_0x3860('0x7')](),controller[_0x3860('0x23')]);router[_0x3860('0x21')](_0x3860('0xd'),auth['isAuthenticated'](),controller[_0x3860('0x24')]);router['delete']('/:id/users',auth[_0x3860('0x7')](),controller[_0x3860('0x25')]);module['exports']=router;
\ No newline at end of file
+var _0x781d=['../../components/interaction/service','../../config/environment','./openchannelAccount.controller','get','isAuthenticated','index','/describe','describe','/:id/dispositions','getDispositions','getAnswers','/:id/applications','getApplications','/:id/interactions','getInteractions','/:id/users','getAgents','post','create','addDisposition','/:id/canned_answers','addAnswer','/:id/notify','notify','addApplications','addAgents','/:id/send','send','put','/:id','update','delete','removeDispositions','removeAnswers','removeAgents','exports','multer','util','express','Router','fs-extra','../../components/auth/service'];(function(_0x1cf9ba,_0x1b2f9b){var _0xaab5c3=function(_0x4214e8){while(--_0x4214e8){_0x1cf9ba['push'](_0x1cf9ba['shift']());}};_0xaab5c3(++_0x1b2f9b);}(_0x781d,0x14a));var _0xd781=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0x781d[_0x397e5f];return _0x5302b8;};'use strict';var multer=require(_0xd781('0x0'));var util=require(_0xd781('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xd781('0x2'));var router=express[_0xd781('0x3')]();var fs_extra=require(_0xd781('0x4'));var auth=require(_0xd781('0x5'));var interaction=require(_0xd781('0x6'));var config=require(_0xd781('0x7'));var controller=require(_0xd781('0x8'));router[_0xd781('0x9')]('/',auth[_0xd781('0xa')](),controller[_0xd781('0xb')]);router['get'](_0xd781('0xc'),auth[_0xd781('0xa')](),controller[_0xd781('0xd')]);router[_0xd781('0x9')]('/:id',auth[_0xd781('0xa')](),controller['show']);router[_0xd781('0x9')](_0xd781('0xe'),auth['isAuthenticated'](),controller[_0xd781('0xf')]);router[_0xd781('0x9')]('/:id/canned_answers',auth['isAuthenticated'](),controller[_0xd781('0x10')]);router[_0xd781('0x9')](_0xd781('0x11'),auth[_0xd781('0xa')](),controller[_0xd781('0x12')]);router[_0xd781('0x9')](_0xd781('0x13'),auth[_0xd781('0xa')](),controller[_0xd781('0x14')]);router[_0xd781('0x9')](_0xd781('0x15'),auth['isAuthenticated'](),controller[_0xd781('0x16')]);router[_0xd781('0x17')]('/',auth['isAuthenticated'](),controller[_0xd781('0x18')]);router['post'](_0xd781('0xe'),auth[_0xd781('0xa')](),controller[_0xd781('0x19')]);router[_0xd781('0x17')](_0xd781('0x1a'),auth[_0xd781('0xa')](),controller[_0xd781('0x1b')]);router['post'](_0xd781('0x1c'),controller[_0xd781('0x1d')]);router[_0xd781('0x17')](_0xd781('0x11'),auth[_0xd781('0xa')](),controller[_0xd781('0x1e')]);router[_0xd781('0x17')](_0xd781('0x15'),auth['isAuthenticated'](),controller[_0xd781('0x1f')]);router[_0xd781('0x17')](_0xd781('0x20'),auth[_0xd781('0xa')](),controller[_0xd781('0x21')]);router[_0xd781('0x22')](_0xd781('0x23'),auth['isAuthenticated'](),controller[_0xd781('0x24')]);router['delete']('/:id',auth[_0xd781('0xa')](),controller['destroy']);router[_0xd781('0x25')](_0xd781('0xe'),auth[_0xd781('0xa')](),controller[_0xd781('0x26')]);router[_0xd781('0x25')](_0xd781('0x1a'),auth[_0xd781('0xa')](),controller[_0xd781('0x27')]);router[_0xd781('0x25')]('/:id/users',auth['isAuthenticated'](),controller[_0xd781('0x28')]);module[_0xd781('0x29')]=router;
\ No newline at end of file
index cdba9c2..7a25584 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x47ea=['BOOLEAN','INTEGER','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','randomstring','exports','STRING','generate','TEXT'];(function(_0x4be094,_0x326265){var _0x1c272a=function(_0x32984b){while(--_0x32984b){_0x4be094['push'](_0x4be094['shift']());}};_0x1c272a(++_0x326265);}(_0x47ea,0xde));var _0xa47e=function(_0x2ca9d4,_0x51d5c6){_0x2ca9d4=_0x2ca9d4-0x0;var _0x258956=_0x47ea[_0x2ca9d4];return _0x258956;};'use strict';var Sequelize=require(_0xa47e('0x0'));var rs=require(_0xa47e('0x1'));module[_0xa47e('0x2')]={'name':{'type':Sequelize[_0xa47e('0x3')],'unique':'name','allowNull':![]},'description':{'type':Sequelize['STRING']},'token':{'type':Sequelize[_0xa47e('0x3')],'defaultValue':function(){return rs[_0xa47e('0x4')]();}},'replyUri':{'type':Sequelize[_0xa47e('0x3')],'validate':{'isUrl':!![]}},'key':{'type':Sequelize[_0xa47e('0x3')],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0xa47e('0x5')],'defaultValue':function(){return'Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}';}},'notificationSound':{'type':Sequelize[_0xa47e('0x6')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0xa47e('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0xa47e('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'mapKey':{'type':Sequelize[_0xa47e('0x3')]},'queueTransfer':{'type':Sequelize[_0xa47e('0x6')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xa47e('0x6')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xa47e('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'allowNull':!![],'defaultValue':null,'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0xa47e('0x6')],'defaultValue':![],'comment':_0xa47e('0x8'),'set':function(_0x26135f){if(!_0x26135f)this[_0xa47e('0x9')](_0xa47e('0xa'),null);this[_0xa47e('0x9')](_0xa47e('0xb'),_0x26135f);}}};
\ No newline at end of file
+var _0x6544=['setDataValue','mandatoryDisposition','sequelize','randomstring','exports','STRING','generate','TEXT','BOOLEAN','INTEGER','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue'];(function(_0xb24a3e,_0x4a3594){var _0x4038d7=function(_0x1ea3c3){while(--_0x1ea3c3){_0xb24a3e['push'](_0xb24a3e['shift']());}};_0x4038d7(++_0x4a3594);}(_0x6544,0xc8));var _0x4654=function(_0x20d435,_0x1c5415){_0x20d435=_0x20d435-0x0;var _0x54288d=_0x6544[_0x20d435];return _0x54288d;};'use strict';var Sequelize=require(_0x4654('0x0'));var rs=require(_0x4654('0x1'));module[_0x4654('0x2')]={'name':{'type':Sequelize['STRING'],'unique':'name','allowNull':![]},'description':{'type':Sequelize[_0x4654('0x3')]},'token':{'type':Sequelize['STRING'],'defaultValue':function(){return rs[_0x4654('0x4')]();}},'replyUri':{'type':Sequelize[_0x4654('0x3')],'validate':{'isUrl':!![]}},'key':{'type':Sequelize[_0x4654('0x3')],'allowNull':![]},'notificationTemplate':{'type':Sequelize[_0x4654('0x5')],'defaultValue':function(){return'Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}';}},'notificationSound':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0x4654('0x6')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x4654('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x4654('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'mapKey':{'type':Sequelize[_0x4654('0x3')]},'queueTransfer':{'type':Sequelize[_0x4654('0x6')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x4654('0x7')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x4654('0x7')],'allowNull':!![],'defaultValue':null,'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0x4654('0x6')],'defaultValue':![],'comment':_0x4654('0x8'),'set':function(_0x57ec00){if(!_0x57ec00)this[_0x4654('0x9')]('mandatoryDispositionPauseId',null);this[_0x4654('0x9')](_0x4654('0xa'),_0x57ec00);}}};
\ No newline at end of file
index 600a349..f303d14 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4300=['notify','addApplications','transaction','sequelize','Transaction','ISOLATION_LEVELS','findOne','bulkCreate','findAndCountAll','finally','getApplications','getInteractions','Contact','Owner','fullname','internal','Tags','tag','omit','spread','userOpenchannelAccount:save','removeAgents','isArray','userOpenchannelAccount:remove','emit','getAgents','DESC','out','Messages','dataValues','eml-format','moment','bluebird','mustache','util','path','to-csv','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','./openchannelAccount.socket','register','jayson/promise','http','client','request','then','info','OpenchannelAccount,\x20%s,\x20%s','OpenchannelAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','status','end','json','offset','count','limit','Content-Range','apply','reject','save','update','get','UserProfileResource','destroy','sendStatus','stack','name','send','index','Pause','mandatoryDispositionPause','map','OpenchannelAccount','rawAttributes','fieldName','type','key','model','query','keys','filters','attributes','intersection','fields','length','nolimit','order','sort','where','merge','filter','options','includeAll','include','findAll','rows','show','params','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','OpenchannelAccounts','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','addDisposition','OpenchannelAccountId','Disposition','getDispositions','hasOwnProperty','pick','removeDispositions','ids','addAnswer','getAnswers','CannedAnswer','removeAnswers','CmContact','Sequelize','no\x20available\x20attributes','difference','createdAt','updatedAt','CompanyId','ListId','isNil','ValidationError','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey','from','CmList','List','Contacts','OpenchannelApplication','Applications','applications','list','priority','account','defaults','contact','firstName','lastName','threadId','OpenchannelInteraction','externalUrl','ContactId','interaction','created','autoclose','unmanaged','*,*,*,*','OpenchannelMessage','AttachmentId','UserId','User','unshift','agent','waitForTheAssignedAgent','queueId','OpenchannelQueue','queue','waitForTheAssignedQueue','Start','EventManager'];(function(_0x45e43,_0x338d7b){var _0xd93d4a=function(_0x37a238){while(--_0x37a238){_0x45e43['push'](_0x45e43['shift']());}};_0xd93d4a(++_0x338d7b);}(_0x4300,0x1a6));var _0x0430=function(_0x305cde,_0x4c2437){_0x305cde=_0x305cde-0x0;var _0x45b651=_0x4300[_0x305cde];return _0x45b651;};'use strict';var emlformat=require(_0x0430('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0430('0x1'));var BPromise=require(_0x0430('0x2'));var Mustache=require(_0x0430('0x3'));var util=require(_0x0430('0x4'));var path=require(_0x0430('0x5'));var sox=require('sox');var csv=require(_0x0430('0x6'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0430('0x7'));var _=require('lodash');var squel=require(_0x0430('0x8'));var crypto=require(_0x0430('0x9'));var jsforce=require(_0x0430('0xa'));var deskjs=require(_0x0430('0xb'));var toCsv=require(_0x0430('0x6'));var querystring=require(_0x0430('0xc'));var Papa=require(_0x0430('0xd'));var Redis=require(_0x0430('0xe'));var authService=require(_0x0430('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x0430('0x10'));var hardwareService=require(_0x0430('0x11'));var logger=require(_0x0430('0x12'))(_0x0430('0x13'));var utils=require(_0x0430('0x14'));var config=require(_0x0430('0x15'));var licenseUtil=require(_0x0430('0x16'));var db=require(_0x0430('0x17'))['db'];config['redis']=_['defaults'](config[_0x0430('0x18')],{'host':_0x0430('0x19'),'port':0x18eb});var socket=require(_0x0430('0x1a'))(new Redis(config[_0x0430('0x18')]));require(_0x0430('0x1b'))[_0x0430('0x1c')](socket);var jayson=require(_0x0430('0x1d'));var client=jayson['client'][_0x0430('0x1e')]({'port':0x232c});var client9002=jayson[_0x0430('0x1f')][_0x0430('0x1e')]({'port':0x232a});function respondWithRpcPromise(_0x3b34af,_0x5c98c9,_0x57b648,_0x48568a){return new BPromise(function(_0x54fbf8,_0x5ecd6b){var _0x495094=_0x48568a||client;return _0x495094[_0x0430('0x20')](_0x3b34af,_0x57b648)[_0x0430('0x21')](function(_0x391791){logger[_0x0430('0x22')](_0x0430('0x23'),_0x5c98c9,'request\x20sent');logger['debug'](_0x0430('0x24'),_0x5c98c9,_0x0430('0x25'),JSON[_0x0430('0x26')](_0x391791));if(_0x391791[_0x0430('0x27')]){if(_0x391791['error']['code']===0x1f4){logger[_0x0430('0x27')](_0x0430('0x23'),_0x5c98c9,_0x391791[_0x0430('0x27')][_0x0430('0x28')]);return _0x5ecd6b(_0x391791[_0x0430('0x27')][_0x0430('0x28')]);}logger['error'](_0x0430('0x23'),_0x5c98c9,_0x391791[_0x0430('0x27')][_0x0430('0x28')]);return _0x54fbf8(_0x391791[_0x0430('0x27')]['message']);}else{logger[_0x0430('0x22')](_0x0430('0x23'),_0x5c98c9,_0x0430('0x25'));_0x54fbf8(_0x391791[_0x0430('0x29')][_0x0430('0x28')]);}})[_0x0430('0x2a')](function(_0x345b8c){logger[_0x0430('0x27')](_0x0430('0x23'),_0x5c98c9,_0x345b8c);_0x5ecd6b(_0x345b8c);});});}function respondWithStatusCode(_0x58b343,_0x375e54){_0x375e54=_0x375e54||0xcc;return function(_0x531611){if(_0x531611){return _0x58b343['sendStatus'](_0x375e54);}return _0x58b343[_0x0430('0x2b')](_0x375e54)[_0x0430('0x2c')]();};}function respondWithResult(_0x54b07c,_0x2d302b){_0x2d302b=_0x2d302b||0xc8;return function(_0x175fb1){if(_0x175fb1){return _0x54b07c[_0x0430('0x2b')](_0x2d302b)[_0x0430('0x2d')](_0x175fb1);}};}function respondWithFilteredResult(_0x2b94e4,_0x3805f7){return function(_0x1df9ec){if(_0x1df9ec){var _0xd6b31a=typeof _0x3805f7[_0x0430('0x2e')]==='undefined'&&typeof _0x3805f7['limit']==='undefined';var _0x1e888d=_0x1df9ec['count'];var _0x41645c=_0xd6b31a?0x0:_0x3805f7['offset'];var _0x52d382=_0xd6b31a?_0x1df9ec[_0x0430('0x2f')]:_0x3805f7[_0x0430('0x2e')]+_0x3805f7[_0x0430('0x30')];var _0x2be726;if(_0x52d382>=_0x1e888d){_0x52d382=_0x1e888d;_0x2be726=0xc8;}else{_0x2be726=0xce;}_0x2b94e4['status'](_0x2be726);return _0x2b94e4['set'](_0x0430('0x31'),_0x41645c+'-'+_0x52d382+'/'+_0x1e888d)[_0x0430('0x2d')](_0x1df9ec);}return null;};}function patchUpdates(_0x530a09){return function(_0x582eec){try{jsonpatch[_0x0430('0x32')](_0x582eec,_0x530a09,!![]);}catch(_0x2010fd){return BPromise[_0x0430('0x33')](_0x2010fd);}return _0x582eec[_0x0430('0x34')]();};}function saveUpdates(_0x1b75cf,_0x28f9cc){return function(_0x124354){if(_0x124354){return _0x124354[_0x0430('0x35')](_0x1b75cf)[_0x0430('0x21')](function(_0x57a621){return _0x57a621;});}return null;};}function removeEntity(_0x548071,_0xcfe157){return function(_0x472f54){if(_0x472f54){return _0x472f54['destroy']()[_0x0430('0x21')](function(){var _0x5bd2b7=_0x472f54[_0x0430('0x36')]({'plain':!![]});var _0x504b68='OpenchannelAccounts';return db[_0x0430('0x37')][_0x0430('0x38')]({'where':{'type':_0x504b68,'resourceId':_0x5bd2b7['id']}})[_0x0430('0x21')](function(){return _0x472f54;});})[_0x0430('0x21')](function(){_0x548071[_0x0430('0x2b')](0xcc)[_0x0430('0x2c')]();});}};}function handleEntityNotFound(_0x56072c,_0x659aca){return function(_0x8169b6){if(!_0x8169b6){_0x56072c[_0x0430('0x39')](0x194);}return _0x8169b6;};}function handleError(_0xb2baa5,_0x4224e4){_0x4224e4=_0x4224e4||0x1f4;return function(_0x41490f){logger[_0x0430('0x27')](_0x41490f[_0x0430('0x3a')]);if(_0x41490f[_0x0430('0x3b')]){delete _0x41490f[_0x0430('0x3b')];}_0xb2baa5['status'](_0x4224e4)[_0x0430('0x3c')](_0x41490f);};}exports[_0x0430('0x3d')]=function(_0x418255,_0x314b27){var _0x1eed1a={'include':[{'model':db[_0x0430('0x3e')],'as':_0x0430('0x3f')}]},_0x29854f={},_0x5d1a80={'count':0x0,'rows':[]};var _0x50cdcd=_[_0x0430('0x40')](db[_0x0430('0x41')][_0x0430('0x42')],function(_0x2ef408){return{'name':_0x2ef408[_0x0430('0x43')],'type':_0x2ef408[_0x0430('0x44')][_0x0430('0x45')]};});_0x29854f[_0x0430('0x46')]=_[_0x0430('0x40')](_0x50cdcd,'name');_0x29854f[_0x0430('0x47')]=_[_0x0430('0x48')](_0x418255[_0x0430('0x47')]);_0x29854f[_0x0430('0x49')]=_['intersection'](_0x29854f[_0x0430('0x46')],_0x29854f[_0x0430('0x47')]);_0x1eed1a[_0x0430('0x4a')]=_[_0x0430('0x4b')](_0x29854f[_0x0430('0x46')],qs[_0x0430('0x4c')](_0x418255[_0x0430('0x47')][_0x0430('0x4c')]));_0x1eed1a[_0x0430('0x4a')]=_0x1eed1a[_0x0430('0x4a')][_0x0430('0x4d')]?_0x1eed1a['attributes']:_0x29854f[_0x0430('0x46')];if(!_0x418255['query']['hasOwnProperty'](_0x0430('0x4e'))){_0x1eed1a['limit']=qs['limit'](_0x418255[_0x0430('0x47')]['limit']);_0x1eed1a['offset']=qs[_0x0430('0x2e')](_0x418255['query']['offset']);}_0x1eed1a[_0x0430('0x4f')]=qs['sort'](_0x418255['query'][_0x0430('0x50')]);_0x1eed1a[_0x0430('0x51')]=qs[_0x0430('0x49')](_['pick'](_0x418255[_0x0430('0x47')],_0x29854f[_0x0430('0x49')]),_0x50cdcd);if(_0x418255[_0x0430('0x47')]['filter']){_0x1eed1a['where']=_[_0x0430('0x52')](_0x1eed1a[_0x0430('0x51')],{'$or':_[_0x0430('0x40')](_0x50cdcd,function(_0x3c79a2){if(_0x3c79a2['type']!=='VIRTUAL'){var _0x5b107e={};_0x5b107e[_0x3c79a2[_0x0430('0x3b')]]={'$like':'%'+_0x418255[_0x0430('0x47')][_0x0430('0x53')]+'%'};return _0x5b107e;}})});}_0x1eed1a=_[_0x0430('0x52')]({},_0x1eed1a,_0x418255[_0x0430('0x54')]);var _0x421280={'where':_0x1eed1a['where']};return db['OpenchannelAccount'][_0x0430('0x2f')](_0x421280)[_0x0430('0x21')](function(_0x4761b0){_0x5d1a80[_0x0430('0x2f')]=_0x4761b0;if(_0x418255[_0x0430('0x47')][_0x0430('0x55')]){_0x1eed1a[_0x0430('0x56')]=[{'all':!![]}];}return db[_0x0430('0x41')][_0x0430('0x57')](_0x1eed1a);})[_0x0430('0x21')](function(_0x4387db){_0x5d1a80[_0x0430('0x58')]=_0x4387db;return _0x5d1a80;})['then'](respondWithFilteredResult(_0x314b27,_0x1eed1a))['catch'](handleError(_0x314b27,null));};exports[_0x0430('0x59')]=function(_0x37d77b,_0x25dbb4){var _0x1c769a={'raw':![],'where':{'id':_0x37d77b[_0x0430('0x5a')]['id']},'include':[{'model':db[_0x0430('0x3e')],'as':_0x0430('0x3f')}]},_0xdff52b={};_0xdff52b[_0x0430('0x46')]=_[_0x0430('0x48')](db[_0x0430('0x41')][_0x0430('0x42')]);_0xdff52b[_0x0430('0x47')]=_[_0x0430('0x48')](_0x37d77b[_0x0430('0x47')]);_0xdff52b[_0x0430('0x49')]=_[_0x0430('0x4b')](_0xdff52b[_0x0430('0x46')],_0xdff52b['query']);_0x1c769a[_0x0430('0x4a')]=_[_0x0430('0x4b')](_0xdff52b[_0x0430('0x46')],qs[_0x0430('0x4c')](_0x37d77b[_0x0430('0x47')][_0x0430('0x4c')]));_0x1c769a[_0x0430('0x4a')]=_0x1c769a[_0x0430('0x4a')][_0x0430('0x4d')]?_0x1c769a['attributes']:_0xdff52b[_0x0430('0x46')];if(_0x37d77b[_0x0430('0x47')][_0x0430('0x55')]){_0x1c769a['include']=[{'all':!![]}];}_0x1c769a=_[_0x0430('0x52')]({},_0x1c769a,_0x37d77b['options']);return db[_0x0430('0x41')][_0x0430('0x5b')](_0x1c769a)[_0x0430('0x21')](handleEntityNotFound(_0x25dbb4,null))[_0x0430('0x21')](respondWithResult(_0x25dbb4,null))[_0x0430('0x2a')](handleError(_0x25dbb4,null));};exports[_0x0430('0x5c')]=function(_0x4d40c4,_0x1b0f0b){return db[_0x0430('0x41')][_0x0430('0x5c')](_0x4d40c4[_0x0430('0x5d')],{})[_0x0430('0x21')](function(_0x41b49c){var _0x110d1c=_0x4d40c4[_0x0430('0x5e')][_0x0430('0x36')]({'plain':!![]});if(!_0x110d1c)throw new Error(_0x0430('0x5f'));if(_0x110d1c[_0x0430('0x60')]===_0x0430('0x5e')){var _0x4f5a5e=_0x41b49c[_0x0430('0x36')]({'plain':!![]});var _0x2102b0=_0x0430('0x61');return db[_0x0430('0x62')][_0x0430('0x5b')]({'where':{'name':_0x2102b0,'userProfileId':_0x110d1c[_0x0430('0x63')]},'raw':!![]})[_0x0430('0x21')](function(_0x33c896){if(_0x33c896&&_0x33c896[_0x0430('0x64')]===0x0){return db['UserProfileResource'][_0x0430('0x5c')]({'name':_0x4f5a5e[_0x0430('0x3b')],'resourceId':_0x4f5a5e['id'],'type':_0x33c896[_0x0430('0x3b')],'sectionId':_0x33c896['id']},{})[_0x0430('0x21')](function(){return _0x41b49c;});}else{return _0x41b49c;}})[_0x0430('0x2a')](function(_0x693d30){logger[_0x0430('0x27')](_0x0430('0x65'),_0x693d30);throw _0x693d30;});}return _0x41b49c;})[_0x0430('0x21')](respondWithResult(_0x1b0f0b,0xc9))[_0x0430('0x2a')](handleError(_0x1b0f0b,null));};exports[_0x0430('0x35')]=function(_0xfd43d9,_0x168ea6){if(_0xfd43d9[_0x0430('0x5d')]['id']){delete _0xfd43d9['body']['id'];}return db[_0x0430('0x41')][_0x0430('0x5b')]({'where':{'id':_0xfd43d9[_0x0430('0x5a')]['id']},'include':[{'model':db[_0x0430('0x3e')],'as':_0x0430('0x3f')}]})['then'](handleEntityNotFound(_0x168ea6,null))['then'](saveUpdates(_0xfd43d9[_0x0430('0x5d')],null))[_0x0430('0x21')](respondWithResult(_0x168ea6,null))[_0x0430('0x2a')](handleError(_0x168ea6,null));};exports[_0x0430('0x38')]=function(_0x415304,_0x49eef5){return db[_0x0430('0x41')][_0x0430('0x5b')]({'where':{'id':_0x415304['params']['id']}})[_0x0430('0x21')](handleEntityNotFound(_0x49eef5,null))[_0x0430('0x21')](removeEntity(_0x49eef5,null))[_0x0430('0x2a')](handleError(_0x49eef5,null));};exports['describe']=function(_0x40d2a1,_0x106e55){return db[_0x0430('0x41')][_0x0430('0x66')]()[_0x0430('0x21')](respondWithResult(_0x106e55,null))[_0x0430('0x2a')](handleError(_0x106e55,null));};exports[_0x0430('0x67')]=function(_0x10d3d3,_0x1b1a89,_0x147440){if(_0x10d3d3[_0x0430('0x5d')]['id']){delete _0x10d3d3['body']['id'];}return db[_0x0430('0x41')][_0x0430('0x5b')]({'where':{'id':_0x10d3d3[_0x0430('0x5a')]['id']}})['then'](handleEntityNotFound(_0x1b1a89,null))[_0x0430('0x21')](function(_0x475e84){if(_0x475e84){_0x10d3d3[_0x0430('0x5d')][_0x0430('0x68')]=_0x475e84['id'];return db[_0x0430('0x69')][_0x0430('0x5c')](_0x10d3d3[_0x0430('0x5d')]);}})[_0x0430('0x21')](respondWithResult(_0x1b1a89,null))[_0x0430('0x2a')](handleError(_0x1b1a89,null));};exports[_0x0430('0x6a')]=function(_0x1b850f,_0xeade32,_0x2f8c11){var _0x53ec5f={'raw':![],'where':{}};var _0x3e72a7={};var _0x1fa22d={'count':0x0,'rows':[]};return db['OpenchannelAccount']['findOne']({'where':{'id':_0x1b850f[_0x0430('0x5a')]['id']}})[_0x0430('0x21')](handleEntityNotFound(_0xeade32,null))[_0x0430('0x21')](function(_0x526673){if(_0x526673){_0x3e72a7[_0x0430('0x46')]=_['keys'](db[_0x0430('0x69')][_0x0430('0x42')]);_0x3e72a7[_0x0430('0x47')]=_[_0x0430('0x48')](_0x1b850f['query']);_0x3e72a7[_0x0430('0x49')]=_['intersection'](_0x3e72a7[_0x0430('0x46')],_0x3e72a7[_0x0430('0x47')]);_0x53ec5f[_0x0430('0x4a')]=_[_0x0430('0x4b')](_0x3e72a7[_0x0430('0x46')],qs[_0x0430('0x4c')](_0x1b850f[_0x0430('0x47')]['fields']));_0x53ec5f['attributes']=_0x53ec5f[_0x0430('0x4a')][_0x0430('0x4d')]?_0x53ec5f[_0x0430('0x4a')]:_0x3e72a7[_0x0430('0x46')];if(!_0x1b850f['query'][_0x0430('0x6b')](_0x0430('0x4e'))){_0x53ec5f[_0x0430('0x30')]=qs['limit'](_0x1b850f[_0x0430('0x47')][_0x0430('0x30')]);_0x53ec5f['offset']=qs['offset'](_0x1b850f['query'][_0x0430('0x2e')]);}_0x53ec5f[_0x0430('0x4f')]=qs[_0x0430('0x50')](_0x1b850f[_0x0430('0x47')][_0x0430('0x50')]);_0x53ec5f[_0x0430('0x51')]=qs[_0x0430('0x49')](_[_0x0430('0x6c')](_0x1b850f[_0x0430('0x47')],_0x3e72a7['filters']));_0x53ec5f['where'][_0x0430('0x68')]=_0x526673['id'];if(_0x1b850f[_0x0430('0x47')][_0x0430('0x53')]){_0x53ec5f[_0x0430('0x51')]=_['merge'](_0x53ec5f[_0x0430('0x51')],{'$or':_[_0x0430('0x40')](_0x53ec5f[_0x0430('0x4a')],function(_0x528ef3){var _0x51b52b={};_0x51b52b[_0x528ef3]={'$like':'%'+_0x1b850f[_0x0430('0x47')][_0x0430('0x53')]+'%'};return _0x51b52b;})});}_0x53ec5f=_[_0x0430('0x52')]({},_0x53ec5f,_0x1b850f[_0x0430('0x54')]);return db[_0x0430('0x69')][_0x0430('0x2f')]({'where':_0x53ec5f['where']})[_0x0430('0x21')](function(_0xd86bbd){_0x1fa22d[_0x0430('0x2f')]=_0xd86bbd;if(_0x1b850f[_0x0430('0x47')][_0x0430('0x55')]){_0x53ec5f['include']=[{'all':!![]}];}return db['Disposition'][_0x0430('0x57')](_0x53ec5f);})[_0x0430('0x21')](function(_0x5b9971){_0x1fa22d[_0x0430('0x58')]=_0x5b9971;return _0x1fa22d;});}})['then'](respondWithFilteredResult(_0xeade32,_0x53ec5f))[_0x0430('0x2a')](handleError(_0xeade32,null));};exports[_0x0430('0x6d')]=function(_0x1b7369,_0xcb5448,_0x19da9c){return db['OpenchannelAccount']['find']({'where':{'id':_0x1b7369[_0x0430('0x5a')]['id']}})['then'](handleEntityNotFound(_0xcb5448,null))[_0x0430('0x21')](function(_0x177987){if(_0x177987){return _0x177987[_0x0430('0x6d')](_0x1b7369[_0x0430('0x47')][_0x0430('0x6e')]);}})[_0x0430('0x21')](respondWithStatusCode(_0xcb5448,null))[_0x0430('0x2a')](handleError(_0xcb5448,null));};exports[_0x0430('0x6f')]=function(_0x4f91cc,_0x162766,_0x1bb341){if(_0x4f91cc['body']['id']){delete _0x4f91cc[_0x0430('0x5d')]['id'];}return db[_0x0430('0x41')][_0x0430('0x5b')]({'where':{'id':_0x4f91cc[_0x0430('0x5a')]['id']}})[_0x0430('0x21')](handleEntityNotFound(_0x162766,null))[_0x0430('0x21')](function(_0x43cb2a){if(_0x43cb2a){_0x4f91cc[_0x0430('0x5d')][_0x0430('0x68')]=_0x43cb2a['id'];return db['CannedAnswer'][_0x0430('0x5c')](_0x4f91cc[_0x0430('0x5d')]);}})[_0x0430('0x21')](respondWithResult(_0x162766,null))[_0x0430('0x2a')](handleError(_0x162766,null));};exports[_0x0430('0x70')]=function(_0xd974ef,_0x4c7b9e,_0x1afabe){var _0x5655bb={'raw':![],'where':{}};var _0x321606={};var _0x164369={'count':0x0,'rows':[]};return db['OpenchannelAccount']['findOne']({'where':{'id':_0xd974ef['params']['id']}})[_0x0430('0x21')](handleEntityNotFound(_0x4c7b9e,null))[_0x0430('0x21')](function(_0x5b7009){if(_0x5b7009){_0x321606[_0x0430('0x46')]=_[_0x0430('0x48')](db[_0x0430('0x71')][_0x0430('0x42')]);_0x321606[_0x0430('0x47')]=_['keys'](_0xd974ef[_0x0430('0x47')]);_0x321606['filters']=_[_0x0430('0x4b')](_0x321606[_0x0430('0x46')],_0x321606['query']);_0x5655bb['attributes']=_[_0x0430('0x4b')](_0x321606[_0x0430('0x46')],qs[_0x0430('0x4c')](_0xd974ef[_0x0430('0x47')][_0x0430('0x4c')]));_0x5655bb[_0x0430('0x4a')]=_0x5655bb[_0x0430('0x4a')][_0x0430('0x4d')]?_0x5655bb['attributes']:_0x321606[_0x0430('0x46')];if(!_0xd974ef[_0x0430('0x47')][_0x0430('0x6b')]('nolimit')){_0x5655bb[_0x0430('0x30')]=qs[_0x0430('0x30')](_0xd974ef[_0x0430('0x47')][_0x0430('0x30')]);_0x5655bb[_0x0430('0x2e')]=qs[_0x0430('0x2e')](_0xd974ef[_0x0430('0x47')][_0x0430('0x2e')]);}_0x5655bb[_0x0430('0x4f')]=qs[_0x0430('0x50')](_0xd974ef[_0x0430('0x47')][_0x0430('0x50')]);_0x5655bb[_0x0430('0x51')]=qs['filters'](_[_0x0430('0x6c')](_0xd974ef[_0x0430('0x47')],_0x321606[_0x0430('0x49')]));_0x5655bb['where']['OpenchannelAccountId']=_0x5b7009['id'];if(_0xd974ef[_0x0430('0x47')][_0x0430('0x53')]){_0x5655bb['where']=_['merge'](_0x5655bb[_0x0430('0x51')],{'$or':_[_0x0430('0x40')](_0x5655bb[_0x0430('0x4a')],function(_0x42d6b1){var _0x24338b={};_0x24338b[_0x42d6b1]={'$like':'%'+_0xd974ef['query'][_0x0430('0x53')]+'%'};return _0x24338b;})});}_0x5655bb=_[_0x0430('0x52')]({},_0x5655bb,_0xd974ef[_0x0430('0x54')]);return db[_0x0430('0x71')][_0x0430('0x2f')]({'where':_0x5655bb[_0x0430('0x51')]})[_0x0430('0x21')](function(_0xbfedbf){_0x164369[_0x0430('0x2f')]=_0xbfedbf;if(_0xd974ef[_0x0430('0x47')][_0x0430('0x55')]){_0x5655bb[_0x0430('0x56')]=[{'all':!![]}];}return db['CannedAnswer'][_0x0430('0x57')](_0x5655bb);})[_0x0430('0x21')](function(_0x3353f5){_0x164369[_0x0430('0x58')]=_0x3353f5;return _0x164369;});}})['then'](respondWithFilteredResult(_0x4c7b9e,_0x5655bb))[_0x0430('0x2a')](handleError(_0x4c7b9e,null));};exports[_0x0430('0x72')]=function(_0x1130dc,_0x5be3e2,_0x34cdba){return db[_0x0430('0x41')]['find']({'where':{'id':_0x1130dc[_0x0430('0x5a')]['id']}})[_0x0430('0x21')](handleEntityNotFound(_0x5be3e2,null))['then'](function(_0x31a344){if(_0x31a344){return _0x31a344[_0x0430('0x72')](_0x1130dc[_0x0430('0x47')][_0x0430('0x6e')]);}})[_0x0430('0x21')](respondWithStatusCode(_0x5be3e2,null))[_0x0430('0x2a')](handleError(_0x5be3e2,null));};exports['notify']=function(_0x566259,_0x4f4654,_0x398179){var _0x4b5960={'body':_0x566259['body'],'channel':'openchannel'};var _0x47378f=[];var _0x11881f=[];var _0x17ba00={};var _0x5635e1=![];return db[_0x0430('0x73')]['describe']()[_0x0430('0x21')](function(_0x4af092){if(!_0x4af092){throw new db[(_0x0430('0x74'))]['ValidationError'](_0x0430('0x75'));}_0x47378f=_[_0x0430('0x76')](_['keys'](_0x4af092),[_0x0430('0x77'),_0x0430('0x78')]);_0x11881f=_['difference'](_[_0x0430('0x48')](_0x4af092),['createdAt',_0x0430('0x78'),_0x0430('0x79'),_0x0430('0x7a')]);if(_0x566259[_0x0430('0x5d')]['id']){delete _0x566259[_0x0430('0x5d')]['id'];}if(_[_0x0430('0x7b')](_0x566259['body']['from'])){throw new db[(_0x0430('0x74'))][(_0x0430('0x7c'))](_0x0430('0x7d'));}if(_[_0x0430('0x7b')](_0x566259[_0x0430('0x5d')][_0x0430('0x5d')])||_0x566259[_0x0430('0x5d')]['body']===''){throw new db[(_0x0430('0x74'))]['ValidationError'](_0x0430('0x7e'));}if(_[_0x0430('0x7b')](_0x566259[_0x0430('0x5d')]['mapKey'])){throw new db['Sequelize'][(_0x0430('0x7c'))](_0x0430('0x7f')+_0x11881f);}if(!_[_0x0430('0x80')](_0x11881f,_0x566259[_0x0430('0x5d')][_0x0430('0x81')])){throw new db['Sequelize']['ValidationError']('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x11881f);}_0x17ba00[_0x566259[_0x0430('0x5d')][_0x0430('0x81')]]=_0x566259[_0x0430('0x5d')][_0x0430('0x82')];})[_0x0430('0x21')](function(){return db['OpenchannelAccount']['find']({'where':{'id':_0x566259[_0x0430('0x5a')]['id']},'include':[{'model':db[_0x0430('0x83')],'as':_0x0430('0x84'),'include':[{'model':db['CmContact'],'as':_0x0430('0x85'),'where':_0x17ba00,'limit':0x1,'order':[[_0x0430('0x78'),'DESC']]}]},{'model':db[_0x0430('0x86')],'as':_0x0430('0x87')}]});})['then'](handleEntityNotFound(_0x4f4654,null))[_0x0430('0x21')](function(_0x23e34a){if(_0x23e34a&&_0x23e34a[_0x0430('0x84')]){_0x4b5960['account']=_0x23e34a;_0x4b5960[_0x0430('0x88')]=_0x23e34a[_0x0430('0x87')];_0x4b5960[_0x0430('0x89')]=_0x23e34a[_0x0430('0x84')];_0x4b5960[_0x0430('0x88')]=_['orderBy'](_0x4b5960[_0x0430('0x88')],[_0x0430('0x8a')],['asc']);if(_0x4b5960[_0x0430('0x8b')][_0x0430('0x87')]){delete _0x4b5960[_0x0430('0x8b')][_0x0430('0x87')];}if(_0x4b5960['account']['List']&&_0x4b5960[_0x0430('0x8b')][_0x0430('0x84')][_0x0430('0x85')][_0x0430('0x4d')]){return _0x4b5960['account'][_0x0430('0x84')][_0x0430('0x85')][0x0];}var _0x25f5ef=_[_0x0430('0x8c')](_0x566259[_0x0430('0x5d')],{'firstName':_0x566259[_0x0430('0x5d')][_0x0430('0x82')],'ListId':_0x23e34a[_0x0430('0x7a')]});_0x25f5ef[_0x566259[_0x0430('0x5d')][_0x0430('0x81')]]=_0x566259['body'][_0x0430('0x82')];return db[_0x0430('0x73')][_0x0430('0x5c')](_0x25f5ef,{'fields':_0x47378f,'raw':!![]});}})[_0x0430('0x21')](handleEntityNotFound(_0x4f4654,null))[_0x0430('0x21')](function(_0xe1bbeb){_0x4b5960[_0x0430('0x8d')]=_0xe1bbeb;if(_0xe1bbeb){var _0x5213f7={'ContactId':_0xe1bbeb['id'],'OpenchannelAccountId':_0x566259[_0x0430('0x5a')]['id'],'from':(_0xe1bbeb[_0x0430('0x8e')]||'')+'\x20'+(_0xe1bbeb[_0x0430('0x8f')]||'')};var _0x4da76b={'OpenchannelAccountId':_0x566259['params']['id'],'closed':![]};if(_0x566259[_0x0430('0x5d')][_0x0430('0x90')]){_0x4da76b['threadId']=_0x566259[_0x0430('0x5d')][_0x0430('0x90')];return db[_0x0430('0x91')][_0x0430('0x5b')]({'where':_0x4da76b})[_0x0430('0x21')](function(_0x3f75db){if(_0x3f75db){return[_0x3f75db,![]];}_0x5213f7[_0x0430('0x90')]=_0x566259[_0x0430('0x5d')]['threadId'];_0x5213f7[_0x0430('0x92')]=_0x566259[_0x0430('0x5d')][_0x0430('0x92')];return db[_0x0430('0x91')]['create'](_0x5213f7)[_0x0430('0x21')](function(_0x6f0fea){return[_0x6f0fea,!![]];});});}else{_0x4da76b[_0x0430('0x90')]=null;}_0x4da76b[_0x0430('0x93')]=_0xe1bbeb['id'];return db[_0x0430('0x91')][_0x0430('0x5b')]({'where':_0x4da76b})[_0x0430('0x21')](function(_0x37eb03){if(_0x37eb03){return[_0x37eb03,![]];}return db[_0x0430('0x91')][_0x0430('0x5c')](_0x5213f7)[_0x0430('0x21')](function(_0xd1d1c9){return[_0xd1d1c9,!![]];});});}})['spread'](function(_0x11163d,_0xca1b3e){if(_0x11163d){_0x5635e1=_0xca1b3e;if(!_0xca1b3e){var _0x15b94a={'from':(_0x4b5960[_0x0430('0x8d')][_0x0430('0x8e')]||'')+'\x20'+(_0x4b5960[_0x0430('0x8d')]['lastName']||'')};if(_0x566259['body'][_0x0430('0x90')]&&_0x566259[_0x0430('0x5d')]['messageId']&&_0x566259[_0x0430('0x5d')][_0x0430('0x90')]!=_0x566259['body']['messageId']){_0x15b94a[_0x0430('0x90')]=_0x566259[_0x0430('0x5d')]['messageId'];}return _0x11163d['update'](_0x15b94a);}else{return _0x11163d;}}})[_0x0430('0x21')](function(_0x13939a){_0x4b5960['interaction']=_0x13939a[_0x0430('0x36')]({'plain':!![]});_0x4b5960[_0x0430('0x94')][_0x0430('0x95')]=_0x5635e1;if(_0x4b5960[_0x0430('0x94')][_0x0430('0x95')]){if(_0x4b5960[_0x0430('0x8b')][_0x0430('0x96')]){_0x4b5960[_0x0430('0x88')]['push']({'id':0x0,'priority':_0x4b5960[_0x0430('0x88')]['length']+0x1,'app':'close','appdata':_0x0430('0x97'),'interval':_0x0430('0x98')});}}return db[_0x0430('0x99')][_0x0430('0x5c')]({'body':_0x566259[_0x0430('0x5d')][_0x0430('0x5d')],'OpenchannelAccountId':_0x566259[_0x0430('0x5a')]['id'],'OpenchannelInteractionId':_0x13939a['id'],'direction':'in','ContactId':_0x4b5960[_0x0430('0x8d')]['id'],'AttachmentId':_0x566259['body'][_0x0430('0x9a')]});})[_0x0430('0x21')](function(_0x109174){_0x4b5960[_0x0430('0x28')]=_0x109174;if(!_0x4b5960['interaction'][_0x0430('0x9b')])return;return db[_0x0430('0x9c')][_0x0430('0x5b')]({'attributes':['id','name'],'where':{'id':_0x4b5960[_0x0430('0x94')]['UserId']}});})[_0x0430('0x21')](function(_0xe9187c){if(_0xe9187c){_0x4b5960[_0x0430('0x88')][_0x0430('0x9d')]({'id':0x0,'priority':0x0,'app':_0x0430('0x9e'),'appdata':_0xe9187c[_0x0430('0x3b')]+','+(_0x4b5960['account'][_0x0430('0x9f')]||0xa),'interval':'*,*,*,*'});}if(!_0x4b5960[_0x0430('0x94')][_0x0430('0xa0')])return;return db[_0x0430('0xa1')][_0x0430('0x5b')]({'attributes':['id','name'],'where':{'id':_0x4b5960[_0x0430('0x94')][_0x0430('0xa0')]}});})[_0x0430('0x21')](function(_0x3a80f1){if(_0x3a80f1){_0x4b5960['applications']['unshift']({'id':0x0,'priority':0x1,'app':_0x0430('0xa2'),'appdata':_0x3a80f1[_0x0430('0x3b')]+','+(_0x4b5960[_0x0430('0x8b')][_0x0430('0xa3')]||0x12c),'interval':_0x0430('0x98')});}return respondWithRpcPromise(_0x0430('0xa4'),'startRouting',_0x4b5960);})[_0x0430('0x21')](function(_0x178884){respondWithRpcPromise(_0x0430('0xa5'),_0x0430('0xa5'),{'event':_0x0430('0xa6'),'message':_0x178884},client9002);return _0x178884;})[_0x0430('0x21')](respondWithResult(_0x4f4654,null))[_0x0430('0x2a')](handleError(_0x4f4654,null));};exports[_0x0430('0xa7')]=function(_0x3358e7,_0x2ef21e){var _0x3c5ef2=_0x3358e7[_0x0430('0x5a')]['id'];var _0xac196b=_0x3358e7[_0x0430('0x5d')];var _0x2fa934=0xc8;var _0xa01902=null;return db['sequelize'][_0x0430('0xa8')]({'isolationLevel':db[_0x0430('0xa9')][_0x0430('0xaa')][_0x0430('0xab')]['READ_COMMITTED']},function(_0x2f6488){return db[_0x0430('0x41')][_0x0430('0xac')]({'where':{'id':_0x3c5ef2},'transaction':_0x2f6488})[_0x0430('0x21')](function(_0x23f9ff){if(_0x23f9ff){return db[_0x0430('0x86')]['destroy']({'where':{'OpenchannelAccountId':_0x3c5ef2},'transaction':_0x2f6488})[_0x0430('0x21')](function(){var _0x48cb44=_['map'](_0xac196b,function(_0x147926){_0x147926['OpenchannelAccountId']=_0x3c5ef2;return _0x147926;});return db['OpenchannelApplication'][_0x0430('0xad')](_0x48cb44,{'transaction':_0x2f6488});});}else{_0x2fa934=0x194;_0xa01902=[];}});})['then'](function(){if(_0x2fa934!==0x194){return db[_0x0430('0x86')][_0x0430('0xae')]({'where':{'OpenchannelAccountId':_0x3c5ef2},'order':_0x0430('0x8a')})[_0x0430('0x21')](function(_0x3103c9){_0xa01902=_0x3103c9;});}})['catch'](function(_0x46b130){_0x2fa934=0x1f4;logger['error'](_0x46b130[_0x0430('0x3a')]);if(_0x46b130[_0x0430('0x3b')]){delete _0x46b130[_0x0430('0x3b')];}_0xa01902=_0x46b130;})[_0x0430('0xaf')](function(){if(_0xa01902===null){_0x2ef21e[_0x0430('0x39')](_0x2fa934);}else{if(_0x2fa934===0x1f4){_0x2ef21e[_0x0430('0x2b')](_0x2fa934)[_0x0430('0x3c')](_0xa01902);}else{_0x2ef21e['status'](_0x2fa934)[_0x0430('0x2d')](_0xa01902);}}});};exports[_0x0430('0xb0')]=function(_0x5dd404,_0x37e0fa,_0x227b84){var _0x4d0bcd={};var _0x369cc5={};var _0x4a113f;var _0x488ca7;return db['OpenchannelAccount']['findOne']({'where':{'id':_0x5dd404[_0x0430('0x5a')]['id']}})[_0x0430('0x21')](handleEntityNotFound(_0x37e0fa,null))['then'](function(_0x51db2d){if(_0x51db2d){_0x4a113f=_0x51db2d;_0x369cc5[_0x0430('0x46')]=_[_0x0430('0x48')](db[_0x0430('0x86')][_0x0430('0x42')]);_0x369cc5[_0x0430('0x47')]=_[_0x0430('0x48')](_0x5dd404[_0x0430('0x47')]);_0x369cc5['filters']=_[_0x0430('0x4b')](_0x369cc5['model'],_0x369cc5[_0x0430('0x47')]);_0x4d0bcd[_0x0430('0x4a')]=_[_0x0430('0x4b')](_0x369cc5['model'],qs[_0x0430('0x4c')](_0x5dd404[_0x0430('0x47')]['fields']));_0x4d0bcd[_0x0430('0x4a')]=_0x4d0bcd[_0x0430('0x4a')]['length']?_0x4d0bcd[_0x0430('0x4a')]:_0x369cc5[_0x0430('0x46')];_0x4d0bcd[_0x0430('0x4f')]=qs[_0x0430('0x50')](_0x5dd404[_0x0430('0x47')][_0x0430('0x50')]);_0x4d0bcd[_0x0430('0x51')]=qs[_0x0430('0x49')](_['pick'](_0x5dd404[_0x0430('0x47')],_0x369cc5[_0x0430('0x49')]));if(_0x5dd404[_0x0430('0x47')]['filter']){_0x4d0bcd['where']=_[_0x0430('0x52')](_0x4d0bcd[_0x0430('0x51')],{'$or':_[_0x0430('0x40')](_0x4d0bcd[_0x0430('0x4a')],function(_0x3b11ce){var _0x2a4840={};_0x2a4840[_0x3b11ce]={'$like':'%'+_0x5dd404['query'][_0x0430('0x53')]+'%'};return _0x2a4840;})});}_0x4d0bcd=_['merge']({},_0x4d0bcd,_0x5dd404['options']);return _0x4a113f[_0x0430('0xb0')](_0x4d0bcd);}})[_0x0430('0x21')](function(_0x2ef4f6){if(_0x2ef4f6){_0x488ca7=_0x2ef4f6['length'];if(!_0x5dd404['query'][_0x0430('0x6b')](_0x0430('0x4e'))){_0x4d0bcd[_0x0430('0x30')]=qs['limit'](_0x5dd404[_0x0430('0x47')][_0x0430('0x30')]);_0x4d0bcd[_0x0430('0x2e')]=qs[_0x0430('0x2e')](_0x5dd404[_0x0430('0x47')]['offset']);}return _0x4a113f[_0x0430('0xb0')](_0x4d0bcd);}})[_0x0430('0x21')](function(_0x68f689){if(_0x68f689){return _0x68f689?{'count':_0x488ca7,'rows':_0x68f689}:null;}})[_0x0430('0x21')](respondWithResult(_0x37e0fa,null))[_0x0430('0x2a')](handleError(_0x37e0fa,null));};exports[_0x0430('0xb1')]=function(_0x24fafa,_0x42e960,_0x513b9c){var _0x58121b={'raw':![],'where':{}};var _0x121e21={};var _0x5b24e2={'count':0x0,'rows':[]};return db[_0x0430('0x41')][_0x0430('0xac')]({'where':{'id':_0x24fafa['params']['id']}})[_0x0430('0x21')](handleEntityNotFound(_0x42e960,null))[_0x0430('0x21')](function(_0x207de7){if(_0x207de7){_0x121e21[_0x0430('0x46')]=_[_0x0430('0x48')](db[_0x0430('0x91')]['rawAttributes']);_0x121e21[_0x0430('0x47')]=_[_0x0430('0x48')](_0x24fafa['query']);_0x121e21['filters']=_['intersection'](_0x121e21[_0x0430('0x46')],_0x121e21['query']);_0x58121b['attributes']=_['intersection'](_0x121e21[_0x0430('0x46')],qs[_0x0430('0x4c')](_0x24fafa[_0x0430('0x47')]['fields']));_0x58121b['attributes']=_0x58121b[_0x0430('0x4a')][_0x0430('0x4d')]?_0x58121b[_0x0430('0x4a')]:_0x121e21[_0x0430('0x46')];if(!_0x24fafa[_0x0430('0x47')][_0x0430('0x6b')](_0x0430('0x4e'))){_0x58121b['limit']=qs[_0x0430('0x30')](_0x24fafa[_0x0430('0x47')]['limit']);_0x58121b[_0x0430('0x2e')]=qs[_0x0430('0x2e')](_0x24fafa[_0x0430('0x47')][_0x0430('0x2e')]);}_0x58121b['order']=qs[_0x0430('0x50')](_0x24fafa[_0x0430('0x47')][_0x0430('0x50')]);_0x58121b[_0x0430('0x51')]=qs[_0x0430('0x49')](_['pick'](_0x24fafa[_0x0430('0x47')],_0x121e21['filters']));_0x58121b[_0x0430('0x51')][_0x0430('0x68')]=_0x207de7['id'];if(_0x24fafa['query'][_0x0430('0x53')]){_0x58121b[_0x0430('0x51')]=_['merge'](_0x58121b[_0x0430('0x51')],{'$or':_['map'](_0x58121b[_0x0430('0x4a')],function(_0x413ba1){var _0x325474={};_0x325474[_0x413ba1]={'$like':'%'+_0x24fafa[_0x0430('0x47')][_0x0430('0x53')]+'%'};return _0x325474;})});}_0x58121b=_[_0x0430('0x52')]({},_0x58121b,_0x24fafa[_0x0430('0x54')]);return db['OpenchannelInteraction'][_0x0430('0x2f')]({'where':_0x58121b[_0x0430('0x51')]})['then'](function(_0x3a8a4c){_0x5b24e2[_0x0430('0x2f')]=_0x3a8a4c;if(_0x24fafa['query']['includeAll']){_0x58121b[_0x0430('0x56')]=[{'model':db[_0x0430('0x73')],'as':_0x0430('0xb2'),'required':![]},{'model':db[_0x0430('0x9c')],'as':_0x0430('0xb3'),'attributes':[_0x0430('0x3b'),_0x0430('0xb4'),_0x0430('0xb5')],'required':![]},{'model':db['Tag'],'as':_0x0430('0xb6'),'attributes':['id',_0x0430('0x3b'),'color'],'where':_0x24fafa[_0x0430('0x47')]['tag']?{'id':_0x24fafa[_0x0430('0x47')][_0x0430('0xb7')]}:undefined,'required':_0x24fafa[_0x0430('0x47')]['tag']?!![]:![]}];}return db[_0x0430('0x91')][_0x0430('0x57')](_0x58121b);})[_0x0430('0x21')](function(_0x6542fc){_0x5b24e2[_0x0430('0x58')]=_0x6542fc;return _0x5b24e2;});}})[_0x0430('0x21')](respondWithFilteredResult(_0x42e960,_0x58121b))[_0x0430('0x2a')](handleError(_0x42e960,null));};exports['addAgents']=function(_0x409884,_0x1ff496,_0x3e57a3){return db[_0x0430('0x41')][_0x0430('0x5b')]({'where':{'id':_0x409884['params']['id']}})['then'](handleEntityNotFound(_0x1ff496,null))[_0x0430('0x21')](function(_0x458504){if(_0x458504){return _0x458504['addAgents'](_0x409884[_0x0430('0x5d')][_0x0430('0x6e')],_[_0x0430('0xb8')](_0x409884[_0x0430('0x5d')],[_0x0430('0x6e'),'id'])||{})[_0x0430('0xb9')](function(_0x36301a){for(var _0x3863bd=0x0;_0x3863bd<_0x409884[_0x0430('0x5d')][_0x0430('0x6e')][_0x0430('0x4d')];_0x3863bd+=0x1){socket['emit'](_0x0430('0xba'),{'UserId':Number(_0x409884[_0x0430('0x5d')]['ids'][_0x3863bd]),'OpenchannelAccountId':Number(_0x409884['params']['id'])});}return _0x36301a;});}})[_0x0430('0x21')](respondWithResult(_0x1ff496,null))[_0x0430('0x2a')](handleError(_0x1ff496,null));};exports[_0x0430('0xbb')]=function(_0x5ce9e9,_0x400eee,_0x30932d){return db['OpenchannelAccount'][_0x0430('0x5b')]({'where':{'id':_0x5ce9e9[_0x0430('0x5a')]['id']}})[_0x0430('0x21')](handleEntityNotFound(_0x400eee,null))[_0x0430('0x21')](function(_0x3c2009){if(_0x3c2009){return _0x3c2009[_0x0430('0xbb')](_0x5ce9e9[_0x0430('0x47')][_0x0430('0x6e')])[_0x0430('0x21')](function(){if(_[_0x0430('0xbc')](_0x5ce9e9['query'][_0x0430('0x6e')])){for(var _0x5ffe4c=0x0;_0x5ffe4c<_0x5ce9e9[_0x0430('0x47')]['ids'][_0x0430('0x4d')];_0x5ffe4c+=0x1){socket['emit'](_0x0430('0xbd'),{'UserId':Number(_0x5ce9e9['query'][_0x0430('0x6e')][_0x5ffe4c]),'OpenchannelAccountId':Number(_0x5ce9e9['params']['id'])});}}else{socket[_0x0430('0xbe')](_0x0430('0xbd'),{'UserId':Number(_0x5ce9e9['query'][_0x0430('0x6e')]),'OpenchannelAccountId':Number(_0x5ce9e9[_0x0430('0x5a')]['id'])});}});}})['then'](respondWithStatusCode(_0x400eee,null))[_0x0430('0x2a')](handleError(_0x400eee,null));};exports[_0x0430('0xbf')]=function(_0x1f4d9f,_0x1beb8f,_0x45c600){var _0x133aa6={};var _0x3d52d3={};var _0x5c1fb3;var _0x3136e5;return db['OpenchannelAccount'][_0x0430('0xac')]({'where':{'id':_0x1f4d9f[_0x0430('0x5a')]['id']}})[_0x0430('0x21')](handleEntityNotFound(_0x1beb8f,null))[_0x0430('0x21')](function(_0x374635){if(_0x374635){_0x5c1fb3=_0x374635;_0x3d52d3['model']=_[_0x0430('0x48')](db['User'][_0x0430('0x42')]);_0x3d52d3[_0x0430('0x47')]=_[_0x0430('0x48')](_0x1f4d9f[_0x0430('0x47')]);_0x3d52d3[_0x0430('0x49')]=_[_0x0430('0x4b')](_0x3d52d3[_0x0430('0x46')],_0x3d52d3[_0x0430('0x47')]);_0x133aa6['attributes']=_[_0x0430('0x4b')](_0x3d52d3[_0x0430('0x46')],qs[_0x0430('0x4c')](_0x1f4d9f[_0x0430('0x47')][_0x0430('0x4c')]));_0x133aa6['attributes']=_0x133aa6[_0x0430('0x4a')][_0x0430('0x4d')]?_0x133aa6[_0x0430('0x4a')]:_0x3d52d3[_0x0430('0x46')];_0x133aa6[_0x0430('0x4f')]=qs[_0x0430('0x50')](_0x1f4d9f['query']['sort']);_0x133aa6[_0x0430('0x51')]=qs[_0x0430('0x49')](_[_0x0430('0x6c')](_0x1f4d9f[_0x0430('0x47')],_0x3d52d3[_0x0430('0x49')]));if(_0x1f4d9f[_0x0430('0x47')]['filter']){_0x133aa6[_0x0430('0x51')]=_[_0x0430('0x52')](_0x133aa6[_0x0430('0x51')],{'$or':_[_0x0430('0x40')](_0x133aa6[_0x0430('0x4a')],function(_0x8e3603){var _0x753fda={};_0x753fda[_0x8e3603]={'$like':'%'+_0x1f4d9f[_0x0430('0x47')][_0x0430('0x53')]+'%'};return _0x753fda;})});}_0x133aa6=_[_0x0430('0x52')]({},_0x133aa6,_0x1f4d9f[_0x0430('0x54')]);return _0x5c1fb3[_0x0430('0xbf')](_0x133aa6);}})[_0x0430('0x21')](function(_0x23349c){if(_0x23349c){_0x3136e5=_0x23349c[_0x0430('0x4d')];if(!_0x1f4d9f[_0x0430('0x47')]['hasOwnProperty'](_0x0430('0x4e'))){_0x133aa6['limit']=qs[_0x0430('0x30')](_0x1f4d9f[_0x0430('0x47')][_0x0430('0x30')]);_0x133aa6[_0x0430('0x2e')]=qs[_0x0430('0x2e')](_0x1f4d9f[_0x0430('0x47')][_0x0430('0x2e')]);}return _0x5c1fb3[_0x0430('0xbf')](_0x133aa6);}})[_0x0430('0x21')](function(_0x50c544){if(_0x50c544){return _0x50c544?{'count':_0x3136e5,'rows':_0x50c544}:null;}})[_0x0430('0x21')](respondWithResult(_0x1beb8f,null))['catch'](handleError(_0x1beb8f,null));};exports[_0x0430('0x3c')]=function(_0x49dede,_0x2775f6,_0x21a3f8){var _0x5c828a,_0x2a6351,_0x43e066;if(_[_0x0430('0x7b')](_0x49dede[_0x0430('0x5d')][_0x0430('0x5d')])||_0x49dede['body'][_0x0430('0x5d')]===''){throw new db[(_0x0430('0x74'))][(_0x0430('0x7c'))](_0x0430('0x7e'));}if(_[_0x0430('0x7b')](_0x49dede['body']['to'])){}_0x5c828a=_0x49dede[_0x0430('0x5d')]['to'];return db[_0x0430('0x41')][_0x0430('0xac')]({'where':{'id':_0x49dede[_0x0430('0x5a')]['id']}})[_0x0430('0x21')](handleEntityNotFound(_0x2775f6,null))[_0x0430('0x21')](function(_0x39fed4){if(_0x39fed4){return db[_0x0430('0x41')][_0x0430('0x5b')]({'where':{'id':_0x39fed4['id']},'include':[{'model':db[_0x0430('0x83')],'as':_0x0430('0x84'),'include':[{'model':db[_0x0430('0x73')],'as':_0x0430('0x85'),'where':{[_0x39fed4[_0x0430('0x81')]]:_0x5c828a},'limit':0x1,'order':[[_0x0430('0x78'),_0x0430('0xc0')]]}]}]})[_0x0430('0x21')](handleEntityNotFound(_0x2775f6,null))[_0x0430('0x21')](function(_0x55cd2d){if(_0x55cd2d&&_0x55cd2d[_0x0430('0x84')]){_0x2a6351=_0x55cd2d['get']({'plain':!![]});if(_0x2a6351[_0x0430('0x84')]&&_0x2a6351[_0x0430('0x84')][_0x0430('0x85')][_0x0430('0x4d')]){return _0x2a6351[_0x0430('0x84')][_0x0430('0x85')][0x0];}return db[_0x0430('0x73')][_0x0430('0x5c')](_[_0x0430('0x8c')](_0x49dede[_0x0430('0x5d')],{'firstName':_0x5c828a,[_0x55cd2d['mapKey']]:_0x5c828a,'phone':_0x5c828a,'ListId':_0x2a6351[_0x0430('0x7a')]}));}})['then'](handleEntityNotFound(_0x2775f6,null))['then'](function(_0x18cd3d){if(_0x18cd3d){_0x43e066=_0x18cd3d;return db[_0x0430('0x91')][_0x0430('0x5b')]({'where':{'ContactId':_0x43e066['id'],'closed':![],'OpenchannelAccountId':_0x2a6351['id']}})[_0x0430('0x21')](function(_0x1dd333){if(_0x1dd333){return[_0x1dd333,![]];}return db['OpenchannelInteraction'][_0x0430('0x5c')]({'UserId':_0x49dede[_0x0430('0x5e')]['id'],'ContactId':_0x43e066['id'],'OpenchannelAccountId':_0x2a6351['id'],'lastMsgDirection':_0x0430('0xc1'),'firstMsgDirection':_0x0430('0xc1'),'Messages':[_[_0x0430('0x52')](_0x49dede[_0x0430('0x5d')],{'read':![],'body':_0x49dede[_0x0430('0x5d')][_0x0430('0x5d')],'OpenchannelAccountId':_0x2a6351['id'],'UserId':_0x49dede[_0x0430('0x5e')]['id'],'ContactId':_0x43e066['id']})]},{'include':[{'model':db[_0x0430('0x99')],'as':_0x0430('0xc2')}]})['then'](function(_0x6e7c80){return[_0x6e7c80,!![]];});});}})[_0x0430('0xb9')](function(_0x47d321,_0x3a548d){if(_0x3a548d){return _0x47d321;}return db['OpenchannelMessage'][_0x0430('0x5c')](_[_0x0430('0x52')](_0x49dede[_0x0430('0x5d')],{'read':![],'body':_0x49dede[_0x0430('0x5d')][_0x0430('0x5d')],'OpenchannelAccountId':_0x2a6351['id'],'OpenchannelInteractionId':_0x47d321['id'],'UserId':_0x49dede['user']['id'],'ContactId':_0x43e066['id']}))[_0x0430('0x21')](function(_0x58da19){_0x47d321[_0x0430('0xc3')][_0x0430('0xc2')]=[];_0x47d321[_0x0430('0xc3')][_0x0430('0xc2')]['push'](_0x58da19['dataValues']);return _0x47d321;});});}})[_0x0430('0x21')](respondWithResult(_0x2775f6,null))[_0x0430('0x2a')](handleError(_0x2775f6,null));};
\ No newline at end of file
+var _0x6ec2=['filters','pick','filter','VIRTUAL','include','rows','show','params','Pause','includeAll','merge','options','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','describe','addDisposition','OpenchannelAccountId','Disposition','getDispositions','findAll','removeDispositions','ids','addAnswer','CannedAnswer','getAnswers','removeAnswers','notify','openchannel','CmContact','ValidationError','no\x20available\x20attributes','createdAt','updatedAt','difference','CompanyId','isNil','from','from\x20is\x20mandatory','Sequelize','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','mapKey','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','Contacts','DESC','OpenchannelApplication','Applications','List','applications','orderBy','priority','account','ListId','contact','threadId','OpenchannelInteraction','externalUrl','ContactId','spread','firstName','lastName','messageId','interaction','created','autoclose','push','close','unmanaged','*,*,*,*','OpenchannelMessage','AttachmentId','UserId','unshift','agent','waitForTheAssignedAgent','queueId','OpenchannelQueue','queue','waitForTheAssignedQueue','Start','EventManager','addApplications','sequelize','Transaction','ISOLATION_LEVELS','READ_COMMITTED','findOne','findAndCountAll','getApplications','getInteractions','Contact','Owner','fullname','internal','Tag','Tags','color','tag','addAgents','omit','emit','removeAgents','isArray','userOpenchannelAccount:remove','getAgents','User','out','Messages','dataValues','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','fs-extra','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','defaults','redis','localhost','socket.io-emitter','./openchannelAccount.socket','register','client','http','request','then','request\x20sent','debug','OpenchannelAccount,\x20%s,\x20%s,\x20%s','error','code','OpenchannelAccount,\x20%s,\x20%s','message','info','catch','end','status','json','offset','undefined','count','set','Content-Range','apply','reject','save','destroy','get','OpenchannelAccounts','UserProfileResource','sendStatus','stack','name','index','mandatoryDispositionPause','map','OpenchannelAccount','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where'];(function(_0x40a03b,_0x5e8be0){var _0x26cb65=function(_0x4a184a){while(--_0x4a184a){_0x40a03b['push'](_0x40a03b['shift']());}};_0x26cb65(++_0x5e8be0);}(_0x6ec2,0x78));var _0x26ec=function(_0x3732c1,_0x434590){_0x3732c1=_0x3732c1-0x0;var _0x5e4f18=_0x6ec2[_0x3732c1];return _0x5e4f18;};'use strict';var emlformat=require(_0x26ec('0x0'));var rimraf=require(_0x26ec('0x1'));var zipdir=require(_0x26ec('0x2'));var jsonpatch=require(_0x26ec('0x3'));var rp=require(_0x26ec('0x4'));var moment=require(_0x26ec('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x26ec('0x6'));var util=require(_0x26ec('0x7'));var path=require(_0x26ec('0x8'));var sox=require(_0x26ec('0x9'));var csv=require(_0x26ec('0xa'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x26ec('0xb'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x26ec('0xc'));var jsforce=require(_0x26ec('0xd'));var deskjs=require(_0x26ec('0xe'));var toCsv=require('to-csv');var querystring=require(_0x26ec('0xf'));var Papa=require('papaparse');var Redis=require(_0x26ec('0x10'));var authService=require(_0x26ec('0x11'));var qs=require(_0x26ec('0x12'));var as=require(_0x26ec('0x13'));var hardwareService=require(_0x26ec('0x14'));var logger=require(_0x26ec('0x15'))(_0x26ec('0x16'));var utils=require(_0x26ec('0x17'));var config=require(_0x26ec('0x18'));var licenseUtil=require(_0x26ec('0x19'));var db=require('../../mysqldb')['db'];config['redis']=_[_0x26ec('0x1a')](config[_0x26ec('0x1b')],{'host':_0x26ec('0x1c'),'port':0x18eb});var socket=require(_0x26ec('0x1d'))(new Redis(config[_0x26ec('0x1b')]));require(_0x26ec('0x1e'))[_0x26ec('0x1f')](socket);var jayson=require('jayson/promise');var client=jayson[_0x26ec('0x20')][_0x26ec('0x21')]({'port':0x232c});var client9002=jayson[_0x26ec('0x20')][_0x26ec('0x21')]({'port':0x232a});function respondWithRpcPromise(_0x4f9950,_0x4d366c,_0x438985,_0x127385){return new BPromise(function(_0x4bdced,_0x20c407){var _0x49dc68=_0x127385||client;return _0x49dc68[_0x26ec('0x22')](_0x4f9950,_0x438985)[_0x26ec('0x23')](function(_0x50c9de){logger['info']('OpenchannelAccount,\x20%s,\x20%s',_0x4d366c,_0x26ec('0x24'));logger[_0x26ec('0x25')](_0x26ec('0x26'),_0x4d366c,'request\x20sent',JSON['stringify'](_0x50c9de));if(_0x50c9de[_0x26ec('0x27')]){if(_0x50c9de[_0x26ec('0x27')][_0x26ec('0x28')]===0x1f4){logger[_0x26ec('0x27')](_0x26ec('0x29'),_0x4d366c,_0x50c9de[_0x26ec('0x27')]['message']);return _0x20c407(_0x50c9de[_0x26ec('0x27')][_0x26ec('0x2a')]);}logger[_0x26ec('0x27')](_0x26ec('0x29'),_0x4d366c,_0x50c9de[_0x26ec('0x27')]['message']);return _0x4bdced(_0x50c9de['error'][_0x26ec('0x2a')]);}else{logger[_0x26ec('0x2b')](_0x26ec('0x29'),_0x4d366c,'request\x20sent');_0x4bdced(_0x50c9de['result'][_0x26ec('0x2a')]);}})[_0x26ec('0x2c')](function(_0x16aba4){logger[_0x26ec('0x27')](_0x26ec('0x29'),_0x4d366c,_0x16aba4);_0x20c407(_0x16aba4);});});}function respondWithStatusCode(_0x89bd5f,_0x439f78){_0x439f78=_0x439f78||0xcc;return function(_0x4e9cf8){if(_0x4e9cf8){return _0x89bd5f['sendStatus'](_0x439f78);}return _0x89bd5f['status'](_0x439f78)[_0x26ec('0x2d')]();};}function respondWithResult(_0xddd5fc,_0x352bef){_0x352bef=_0x352bef||0xc8;return function(_0x3fd842){if(_0x3fd842){return _0xddd5fc[_0x26ec('0x2e')](_0x352bef)[_0x26ec('0x2f')](_0x3fd842);}};}function respondWithFilteredResult(_0x3268e9,_0x4a1371){return function(_0x30231e){if(_0x30231e){var _0x5d10ba=typeof _0x4a1371[_0x26ec('0x30')]===_0x26ec('0x31')&&typeof _0x4a1371['limit']===_0x26ec('0x31');var _0x2d30e6=_0x30231e[_0x26ec('0x32')];var _0x18999a=_0x5d10ba?0x0:_0x4a1371[_0x26ec('0x30')];var _0x24d390=_0x5d10ba?_0x30231e['count']:_0x4a1371[_0x26ec('0x30')]+_0x4a1371['limit'];var _0x3d8b89;if(_0x24d390>=_0x2d30e6){_0x24d390=_0x2d30e6;_0x3d8b89=0xc8;}else{_0x3d8b89=0xce;}_0x3268e9['status'](_0x3d8b89);return _0x3268e9[_0x26ec('0x33')](_0x26ec('0x34'),_0x18999a+'-'+_0x24d390+'/'+_0x2d30e6)['json'](_0x30231e);}return null;};}function patchUpdates(_0x4555ea){return function(_0x13c4c3){try{jsonpatch[_0x26ec('0x35')](_0x13c4c3,_0x4555ea,!![]);}catch(_0x5fe57f){return BPromise[_0x26ec('0x36')](_0x5fe57f);}return _0x13c4c3[_0x26ec('0x37')]();};}function saveUpdates(_0x4f1806,_0x5bf0b8){return function(_0x56e03c){if(_0x56e03c){return _0x56e03c['update'](_0x4f1806)['then'](function(_0x187e7d){return _0x187e7d;});}return null;};}function removeEntity(_0x2543a6,_0x2737c6){return function(_0x27652d){if(_0x27652d){return _0x27652d[_0x26ec('0x38')]()['then'](function(){var _0xfdd95=_0x27652d[_0x26ec('0x39')]({'plain':!![]});var _0x35a745=_0x26ec('0x3a');return db[_0x26ec('0x3b')]['destroy']({'where':{'type':_0x35a745,'resourceId':_0xfdd95['id']}})[_0x26ec('0x23')](function(){return _0x27652d;});})[_0x26ec('0x23')](function(){_0x2543a6[_0x26ec('0x2e')](0xcc)[_0x26ec('0x2d')]();});}};}function handleEntityNotFound(_0x6b217f,_0x171118){return function(_0x39c514){if(!_0x39c514){_0x6b217f[_0x26ec('0x3c')](0x194);}return _0x39c514;};}function handleError(_0x354adf,_0x16c0ee){_0x16c0ee=_0x16c0ee||0x1f4;return function(_0x48d7cf){logger['error'](_0x48d7cf[_0x26ec('0x3d')]);if(_0x48d7cf[_0x26ec('0x3e')]){delete _0x48d7cf['name'];}_0x354adf[_0x26ec('0x2e')](_0x16c0ee)['send'](_0x48d7cf);};}exports[_0x26ec('0x3f')]=function(_0x1244aa,_0x11fc8c){var _0xb4942e={'include':[{'model':db['Pause'],'as':_0x26ec('0x40')}]},_0x2a0c92={},_0xfb68c9={'count':0x0,'rows':[]};var _0x3441f4=_[_0x26ec('0x41')](db[_0x26ec('0x42')][_0x26ec('0x43')],function(_0x304194){return{'name':_0x304194[_0x26ec('0x44')],'type':_0x304194[_0x26ec('0x45')][_0x26ec('0x46')]};});_0x2a0c92[_0x26ec('0x47')]=_[_0x26ec('0x41')](_0x3441f4,_0x26ec('0x3e'));_0x2a0c92[_0x26ec('0x48')]=_[_0x26ec('0x49')](_0x1244aa[_0x26ec('0x48')]);_0x2a0c92['filters']=_[_0x26ec('0x4a')](_0x2a0c92[_0x26ec('0x47')],_0x2a0c92[_0x26ec('0x48')]);_0xb4942e[_0x26ec('0x4b')]=_[_0x26ec('0x4a')](_0x2a0c92[_0x26ec('0x47')],qs['fields'](_0x1244aa['query'][_0x26ec('0x4c')]));_0xb4942e['attributes']=_0xb4942e[_0x26ec('0x4b')][_0x26ec('0x4d')]?_0xb4942e[_0x26ec('0x4b')]:_0x2a0c92[_0x26ec('0x47')];if(!_0x1244aa[_0x26ec('0x48')][_0x26ec('0x4e')](_0x26ec('0x4f'))){_0xb4942e[_0x26ec('0x50')]=qs['limit'](_0x1244aa[_0x26ec('0x48')][_0x26ec('0x50')]);_0xb4942e[_0x26ec('0x30')]=qs['offset'](_0x1244aa[_0x26ec('0x48')][_0x26ec('0x30')]);}_0xb4942e[_0x26ec('0x51')]=qs[_0x26ec('0x52')](_0x1244aa[_0x26ec('0x48')][_0x26ec('0x52')]);_0xb4942e[_0x26ec('0x53')]=qs[_0x26ec('0x54')](_[_0x26ec('0x55')](_0x1244aa[_0x26ec('0x48')],_0x2a0c92[_0x26ec('0x54')]),_0x3441f4);if(_0x1244aa[_0x26ec('0x48')][_0x26ec('0x56')]){_0xb4942e[_0x26ec('0x53')]=_['merge'](_0xb4942e['where'],{'$or':_[_0x26ec('0x41')](_0x3441f4,function(_0x5be55c){if(_0x5be55c['type']!==_0x26ec('0x57')){var _0xc9eda3={};_0xc9eda3[_0x5be55c[_0x26ec('0x3e')]]={'$like':'%'+_0x1244aa['query']['filter']+'%'};return _0xc9eda3;}})});}_0xb4942e=_['merge']({},_0xb4942e,_0x1244aa['options']);var _0x3faf2b={'where':_0xb4942e['where']};return db[_0x26ec('0x42')][_0x26ec('0x32')](_0x3faf2b)['then'](function(_0x4c1355){_0xfb68c9[_0x26ec('0x32')]=_0x4c1355;if(_0x1244aa[_0x26ec('0x48')]['includeAll']){_0xb4942e[_0x26ec('0x58')]=[{'all':!![]}];}return db[_0x26ec('0x42')]['findAll'](_0xb4942e);})['then'](function(_0x34ee55){_0xfb68c9[_0x26ec('0x59')]=_0x34ee55;return _0xfb68c9;})[_0x26ec('0x23')](respondWithFilteredResult(_0x11fc8c,_0xb4942e))['catch'](handleError(_0x11fc8c,null));};exports[_0x26ec('0x5a')]=function(_0x584c35,_0x3c743a){var _0x179f9f={'raw':![],'where':{'id':_0x584c35[_0x26ec('0x5b')]['id']},'include':[{'model':db[_0x26ec('0x5c')],'as':_0x26ec('0x40')}]},_0x2af53a={};_0x2af53a['model']=_[_0x26ec('0x49')](db[_0x26ec('0x42')]['rawAttributes']);_0x2af53a[_0x26ec('0x48')]=_[_0x26ec('0x49')](_0x584c35['query']);_0x2af53a[_0x26ec('0x54')]=_['intersection'](_0x2af53a['model'],_0x2af53a[_0x26ec('0x48')]);_0x179f9f[_0x26ec('0x4b')]=_[_0x26ec('0x4a')](_0x2af53a['model'],qs['fields'](_0x584c35[_0x26ec('0x48')][_0x26ec('0x4c')]));_0x179f9f[_0x26ec('0x4b')]=_0x179f9f['attributes'][_0x26ec('0x4d')]?_0x179f9f[_0x26ec('0x4b')]:_0x2af53a['model'];if(_0x584c35['query'][_0x26ec('0x5d')]){_0x179f9f['include']=[{'all':!![]}];}_0x179f9f=_[_0x26ec('0x5e')]({},_0x179f9f,_0x584c35[_0x26ec('0x5f')]);return db[_0x26ec('0x42')][_0x26ec('0x60')](_0x179f9f)['then'](handleEntityNotFound(_0x3c743a,null))['then'](respondWithResult(_0x3c743a,null))[_0x26ec('0x2c')](handleError(_0x3c743a,null));};exports[_0x26ec('0x61')]=function(_0x2e1eec,_0x11440c){return db[_0x26ec('0x42')][_0x26ec('0x61')](_0x2e1eec[_0x26ec('0x62')],{})['then'](function(_0x92dd6f){var _0x4a67e4=_0x2e1eec[_0x26ec('0x63')][_0x26ec('0x39')]({'plain':!![]});if(!_0x4a67e4)throw new Error(_0x26ec('0x64'));if(_0x4a67e4[_0x26ec('0x65')]===_0x26ec('0x63')){var _0x5f599c=_0x92dd6f[_0x26ec('0x39')]({'plain':!![]});var _0xefa3aa=_0x26ec('0x3a');return db[_0x26ec('0x66')]['find']({'where':{'name':_0xefa3aa,'userProfileId':_0x4a67e4[_0x26ec('0x67')]},'raw':!![]})[_0x26ec('0x23')](function(_0x4bd26b){if(_0x4bd26b&&_0x4bd26b[_0x26ec('0x68')]===0x0){return db[_0x26ec('0x3b')][_0x26ec('0x61')]({'name':_0x5f599c[_0x26ec('0x3e')],'resourceId':_0x5f599c['id'],'type':_0x4bd26b[_0x26ec('0x3e')],'sectionId':_0x4bd26b['id']},{})[_0x26ec('0x23')](function(){return _0x92dd6f;});}else{return _0x92dd6f;}})[_0x26ec('0x2c')](function(_0x4a9218){logger[_0x26ec('0x27')](_0x26ec('0x69'),_0x4a9218);throw _0x4a9218;});}return _0x92dd6f;})['then'](respondWithResult(_0x11440c,0xc9))[_0x26ec('0x2c')](handleError(_0x11440c,null));};exports[_0x26ec('0x6a')]=function(_0x329899,_0x2d93e9){if(_0x329899[_0x26ec('0x62')]['id']){delete _0x329899[_0x26ec('0x62')]['id'];}return db[_0x26ec('0x42')][_0x26ec('0x60')]({'where':{'id':_0x329899[_0x26ec('0x5b')]['id']},'include':[{'model':db[_0x26ec('0x5c')],'as':_0x26ec('0x40')}]})[_0x26ec('0x23')](handleEntityNotFound(_0x2d93e9,null))[_0x26ec('0x23')](saveUpdates(_0x329899[_0x26ec('0x62')],null))[_0x26ec('0x23')](respondWithResult(_0x2d93e9,null))['catch'](handleError(_0x2d93e9,null));};exports['destroy']=function(_0x4b3718,_0x57144c){return db[_0x26ec('0x42')][_0x26ec('0x60')]({'where':{'id':_0x4b3718[_0x26ec('0x5b')]['id']}})['then'](handleEntityNotFound(_0x57144c,null))[_0x26ec('0x23')](removeEntity(_0x57144c,null))['catch'](handleError(_0x57144c,null));};exports[_0x26ec('0x6b')]=function(_0x80a521,_0x364d24){return db['OpenchannelAccount'][_0x26ec('0x6b')]()[_0x26ec('0x23')](respondWithResult(_0x364d24,null))[_0x26ec('0x2c')](handleError(_0x364d24,null));};exports[_0x26ec('0x6c')]=function(_0x1c0c79,_0x48de36,_0x169a12){if(_0x1c0c79[_0x26ec('0x62')]['id']){delete _0x1c0c79['body']['id'];}return db[_0x26ec('0x42')][_0x26ec('0x60')]({'where':{'id':_0x1c0c79[_0x26ec('0x5b')]['id']}})['then'](handleEntityNotFound(_0x48de36,null))[_0x26ec('0x23')](function(_0xb64f7a){if(_0xb64f7a){_0x1c0c79[_0x26ec('0x62')][_0x26ec('0x6d')]=_0xb64f7a['id'];return db[_0x26ec('0x6e')][_0x26ec('0x61')](_0x1c0c79[_0x26ec('0x62')]);}})[_0x26ec('0x23')](respondWithResult(_0x48de36,null))[_0x26ec('0x2c')](handleError(_0x48de36,null));};exports[_0x26ec('0x6f')]=function(_0x1ab092,_0x6ab7d4,_0x1f5fc4){var _0x2ad951={'raw':![],'where':{}};var _0x20d69e={};var _0x463cba={'count':0x0,'rows':[]};return db['OpenchannelAccount']['findOne']({'where':{'id':_0x1ab092[_0x26ec('0x5b')]['id']}})[_0x26ec('0x23')](handleEntityNotFound(_0x6ab7d4,null))[_0x26ec('0x23')](function(_0x3ca5ce){if(_0x3ca5ce){_0x20d69e[_0x26ec('0x47')]=_[_0x26ec('0x49')](db['Disposition'][_0x26ec('0x43')]);_0x20d69e[_0x26ec('0x48')]=_[_0x26ec('0x49')](_0x1ab092[_0x26ec('0x48')]);_0x20d69e[_0x26ec('0x54')]=_[_0x26ec('0x4a')](_0x20d69e[_0x26ec('0x47')],_0x20d69e[_0x26ec('0x48')]);_0x2ad951[_0x26ec('0x4b')]=_[_0x26ec('0x4a')](_0x20d69e[_0x26ec('0x47')],qs['fields'](_0x1ab092[_0x26ec('0x48')][_0x26ec('0x4c')]));_0x2ad951[_0x26ec('0x4b')]=_0x2ad951['attributes'][_0x26ec('0x4d')]?_0x2ad951[_0x26ec('0x4b')]:_0x20d69e['model'];if(!_0x1ab092[_0x26ec('0x48')]['hasOwnProperty'](_0x26ec('0x4f'))){_0x2ad951[_0x26ec('0x50')]=qs[_0x26ec('0x50')](_0x1ab092[_0x26ec('0x48')][_0x26ec('0x50')]);_0x2ad951[_0x26ec('0x30')]=qs['offset'](_0x1ab092[_0x26ec('0x48')][_0x26ec('0x30')]);}_0x2ad951['order']=qs[_0x26ec('0x52')](_0x1ab092[_0x26ec('0x48')]['sort']);_0x2ad951[_0x26ec('0x53')]=qs['filters'](_[_0x26ec('0x55')](_0x1ab092[_0x26ec('0x48')],_0x20d69e['filters']));_0x2ad951[_0x26ec('0x53')][_0x26ec('0x6d')]=_0x3ca5ce['id'];if(_0x1ab092['query'][_0x26ec('0x56')]){_0x2ad951[_0x26ec('0x53')]=_[_0x26ec('0x5e')](_0x2ad951[_0x26ec('0x53')],{'$or':_[_0x26ec('0x41')](_0x2ad951[_0x26ec('0x4b')],function(_0x2765bc){var _0x5e46c8={};_0x5e46c8[_0x2765bc]={'$like':'%'+_0x1ab092[_0x26ec('0x48')][_0x26ec('0x56')]+'%'};return _0x5e46c8;})});}_0x2ad951=_['merge']({},_0x2ad951,_0x1ab092['options']);return db['Disposition'][_0x26ec('0x32')]({'where':_0x2ad951[_0x26ec('0x53')]})[_0x26ec('0x23')](function(_0x51cf47){_0x463cba[_0x26ec('0x32')]=_0x51cf47;if(_0x1ab092[_0x26ec('0x48')][_0x26ec('0x5d')]){_0x2ad951[_0x26ec('0x58')]=[{'all':!![]}];}return db[_0x26ec('0x6e')][_0x26ec('0x70')](_0x2ad951);})[_0x26ec('0x23')](function(_0x597c97){_0x463cba[_0x26ec('0x59')]=_0x597c97;return _0x463cba;});}})[_0x26ec('0x23')](respondWithFilteredResult(_0x6ab7d4,_0x2ad951))[_0x26ec('0x2c')](handleError(_0x6ab7d4,null));};exports[_0x26ec('0x71')]=function(_0x18a155,_0x457b03,_0x3bbd9c){return db[_0x26ec('0x42')][_0x26ec('0x60')]({'where':{'id':_0x18a155[_0x26ec('0x5b')]['id']}})[_0x26ec('0x23')](handleEntityNotFound(_0x457b03,null))[_0x26ec('0x23')](function(_0x260436){if(_0x260436){return _0x260436[_0x26ec('0x71')](_0x18a155[_0x26ec('0x48')][_0x26ec('0x72')]);}})[_0x26ec('0x23')](respondWithStatusCode(_0x457b03,null))[_0x26ec('0x2c')](handleError(_0x457b03,null));};exports[_0x26ec('0x73')]=function(_0x289ca2,_0x3d197f,_0x15d5dd){if(_0x289ca2[_0x26ec('0x62')]['id']){delete _0x289ca2[_0x26ec('0x62')]['id'];}return db[_0x26ec('0x42')][_0x26ec('0x60')]({'where':{'id':_0x289ca2['params']['id']}})[_0x26ec('0x23')](handleEntityNotFound(_0x3d197f,null))[_0x26ec('0x23')](function(_0x42ae13){if(_0x42ae13){_0x289ca2[_0x26ec('0x62')][_0x26ec('0x6d')]=_0x42ae13['id'];return db[_0x26ec('0x74')][_0x26ec('0x61')](_0x289ca2[_0x26ec('0x62')]);}})[_0x26ec('0x23')](respondWithResult(_0x3d197f,null))['catch'](handleError(_0x3d197f,null));};exports[_0x26ec('0x75')]=function(_0x3ce8eb,_0x248ca0,_0xa43ab5){var _0x101cfc={'raw':![],'where':{}};var _0x9eaa77={};var _0x13ca0b={'count':0x0,'rows':[]};return db[_0x26ec('0x42')]['findOne']({'where':{'id':_0x3ce8eb[_0x26ec('0x5b')]['id']}})[_0x26ec('0x23')](handleEntityNotFound(_0x248ca0,null))['then'](function(_0x2b14c8){if(_0x2b14c8){_0x9eaa77[_0x26ec('0x47')]=_['keys'](db['CannedAnswer'][_0x26ec('0x43')]);_0x9eaa77[_0x26ec('0x48')]=_[_0x26ec('0x49')](_0x3ce8eb[_0x26ec('0x48')]);_0x9eaa77[_0x26ec('0x54')]=_[_0x26ec('0x4a')](_0x9eaa77[_0x26ec('0x47')],_0x9eaa77[_0x26ec('0x48')]);_0x101cfc[_0x26ec('0x4b')]=_[_0x26ec('0x4a')](_0x9eaa77[_0x26ec('0x47')],qs[_0x26ec('0x4c')](_0x3ce8eb['query'][_0x26ec('0x4c')]));_0x101cfc['attributes']=_0x101cfc['attributes']['length']?_0x101cfc['attributes']:_0x9eaa77[_0x26ec('0x47')];if(!_0x3ce8eb[_0x26ec('0x48')][_0x26ec('0x4e')](_0x26ec('0x4f'))){_0x101cfc[_0x26ec('0x50')]=qs['limit'](_0x3ce8eb['query']['limit']);_0x101cfc[_0x26ec('0x30')]=qs[_0x26ec('0x30')](_0x3ce8eb[_0x26ec('0x48')][_0x26ec('0x30')]);}_0x101cfc['order']=qs[_0x26ec('0x52')](_0x3ce8eb['query'][_0x26ec('0x52')]);_0x101cfc[_0x26ec('0x53')]=qs[_0x26ec('0x54')](_[_0x26ec('0x55')](_0x3ce8eb[_0x26ec('0x48')],_0x9eaa77['filters']));_0x101cfc[_0x26ec('0x53')]['OpenchannelAccountId']=_0x2b14c8['id'];if(_0x3ce8eb[_0x26ec('0x48')][_0x26ec('0x56')]){_0x101cfc[_0x26ec('0x53')]=_[_0x26ec('0x5e')](_0x101cfc[_0x26ec('0x53')],{'$or':_['map'](_0x101cfc[_0x26ec('0x4b')],function(_0x5c9f1f){var _0x19ac76={};_0x19ac76[_0x5c9f1f]={'$like':'%'+_0x3ce8eb[_0x26ec('0x48')][_0x26ec('0x56')]+'%'};return _0x19ac76;})});}_0x101cfc=_[_0x26ec('0x5e')]({},_0x101cfc,_0x3ce8eb['options']);return db[_0x26ec('0x74')]['count']({'where':_0x101cfc[_0x26ec('0x53')]})[_0x26ec('0x23')](function(_0x1f3972){_0x13ca0b['count']=_0x1f3972;if(_0x3ce8eb['query'][_0x26ec('0x5d')]){_0x101cfc[_0x26ec('0x58')]=[{'all':!![]}];}return db[_0x26ec('0x74')][_0x26ec('0x70')](_0x101cfc);})['then'](function(_0x53471c){_0x13ca0b[_0x26ec('0x59')]=_0x53471c;return _0x13ca0b;});}})['then'](respondWithFilteredResult(_0x248ca0,_0x101cfc))[_0x26ec('0x2c')](handleError(_0x248ca0,null));};exports['removeAnswers']=function(_0x430bb4,_0x4da032,_0x136140){return db[_0x26ec('0x42')][_0x26ec('0x60')]({'where':{'id':_0x430bb4[_0x26ec('0x5b')]['id']}})['then'](handleEntityNotFound(_0x4da032,null))[_0x26ec('0x23')](function(_0x24f3b8){if(_0x24f3b8){return _0x24f3b8[_0x26ec('0x76')](_0x430bb4['query'][_0x26ec('0x72')]);}})['then'](respondWithStatusCode(_0x4da032,null))[_0x26ec('0x2c')](handleError(_0x4da032,null));};exports[_0x26ec('0x77')]=function(_0x2a6c21,_0x48d67c,_0x1c885f){var _0x6cd0f6={'body':_0x2a6c21[_0x26ec('0x62')],'channel':_0x26ec('0x78')};var _0x44de7e=[];var _0x594632=[];var _0x13ef95={};var _0x14dd26=![];return db[_0x26ec('0x79')]['describe']()[_0x26ec('0x23')](function(_0x4b5cf8){if(!_0x4b5cf8){throw new db['Sequelize'][(_0x26ec('0x7a'))](_0x26ec('0x7b'));}_0x44de7e=_['difference'](_['keys'](_0x4b5cf8),[_0x26ec('0x7c'),_0x26ec('0x7d')]);_0x594632=_[_0x26ec('0x7e')](_['keys'](_0x4b5cf8),[_0x26ec('0x7c'),_0x26ec('0x7d'),_0x26ec('0x7f'),'ListId']);if(_0x2a6c21[_0x26ec('0x62')]['id']){delete _0x2a6c21['body']['id'];}if(_[_0x26ec('0x80')](_0x2a6c21[_0x26ec('0x62')][_0x26ec('0x81')])){throw new db['Sequelize'][(_0x26ec('0x7a'))](_0x26ec('0x82'));}if(_[_0x26ec('0x80')](_0x2a6c21[_0x26ec('0x62')]['body'])||_0x2a6c21[_0x26ec('0x62')][_0x26ec('0x62')]===''){throw new db[(_0x26ec('0x83'))]['ValidationError'](_0x26ec('0x84'));}if(_[_0x26ec('0x80')](_0x2a6c21[_0x26ec('0x62')]['mapKey'])){throw new db[(_0x26ec('0x83'))][(_0x26ec('0x7a'))](_0x26ec('0x85')+_0x594632);}if(!_[_0x26ec('0x86')](_0x594632,_0x2a6c21[_0x26ec('0x62')][_0x26ec('0x87')])){throw new db[(_0x26ec('0x83'))][(_0x26ec('0x7a'))](_0x26ec('0x88')+_0x594632);}_0x13ef95[_0x2a6c21[_0x26ec('0x62')][_0x26ec('0x87')]]=_0x2a6c21[_0x26ec('0x62')][_0x26ec('0x81')];})['then'](function(){return db[_0x26ec('0x42')]['find']({'where':{'id':_0x2a6c21[_0x26ec('0x5b')]['id']},'include':[{'model':db[_0x26ec('0x89')],'as':'List','include':[{'model':db[_0x26ec('0x79')],'as':_0x26ec('0x8a'),'where':_0x13ef95,'limit':0x1,'order':[[_0x26ec('0x7d'),_0x26ec('0x8b')]]}]},{'model':db[_0x26ec('0x8c')],'as':_0x26ec('0x8d')}]});})[_0x26ec('0x23')](handleEntityNotFound(_0x48d67c,null))[_0x26ec('0x23')](function(_0x4978d0){if(_0x4978d0&&_0x4978d0[_0x26ec('0x8e')]){_0x6cd0f6['account']=_0x4978d0;_0x6cd0f6['applications']=_0x4978d0[_0x26ec('0x8d')];_0x6cd0f6['list']=_0x4978d0[_0x26ec('0x8e')];_0x6cd0f6[_0x26ec('0x8f')]=_[_0x26ec('0x90')](_0x6cd0f6[_0x26ec('0x8f')],[_0x26ec('0x91')],['asc']);if(_0x6cd0f6['account']['Applications']){delete _0x6cd0f6[_0x26ec('0x92')][_0x26ec('0x8d')];}if(_0x6cd0f6[_0x26ec('0x92')][_0x26ec('0x8e')]&&_0x6cd0f6[_0x26ec('0x92')][_0x26ec('0x8e')][_0x26ec('0x8a')][_0x26ec('0x4d')]){return _0x6cd0f6[_0x26ec('0x92')][_0x26ec('0x8e')]['Contacts'][0x0];}var _0x486a4e=_[_0x26ec('0x1a')](_0x2a6c21[_0x26ec('0x62')],{'firstName':_0x2a6c21['body']['from'],'ListId':_0x4978d0[_0x26ec('0x93')]});_0x486a4e[_0x2a6c21[_0x26ec('0x62')][_0x26ec('0x87')]]=_0x2a6c21[_0x26ec('0x62')]['from'];return db[_0x26ec('0x79')]['create'](_0x486a4e,{'fields':_0x44de7e,'raw':!![]});}})[_0x26ec('0x23')](handleEntityNotFound(_0x48d67c,null))[_0x26ec('0x23')](function(_0x33a744){_0x6cd0f6[_0x26ec('0x94')]=_0x33a744;if(_0x33a744){var _0x5574c9={'ContactId':_0x33a744['id'],'OpenchannelAccountId':_0x2a6c21['params']['id'],'from':(_0x33a744['firstName']||'')+'\x20'+(_0x33a744['lastName']||'')};var _0x1373ce={'OpenchannelAccountId':_0x2a6c21['params']['id'],'closed':![]};if(_0x2a6c21[_0x26ec('0x62')]['threadId']){_0x1373ce[_0x26ec('0x95')]=_0x2a6c21[_0x26ec('0x62')]['threadId'];return db[_0x26ec('0x96')][_0x26ec('0x60')]({'where':_0x1373ce})[_0x26ec('0x23')](function(_0x18f802){if(_0x18f802){return[_0x18f802,![]];}_0x5574c9[_0x26ec('0x95')]=_0x2a6c21[_0x26ec('0x62')][_0x26ec('0x95')];_0x5574c9[_0x26ec('0x97')]=_0x2a6c21['body'][_0x26ec('0x97')];return db[_0x26ec('0x96')]['create'](_0x5574c9)['then'](function(_0x2b0b3e){return[_0x2b0b3e,!![]];});});}else{_0x1373ce[_0x26ec('0x95')]=null;}_0x1373ce[_0x26ec('0x98')]=_0x33a744['id'];return db['OpenchannelInteraction']['find']({'where':_0x1373ce})['then'](function(_0x50e1ab){if(_0x50e1ab){return[_0x50e1ab,![]];}return db['OpenchannelInteraction'][_0x26ec('0x61')](_0x5574c9)[_0x26ec('0x23')](function(_0x2f8396){return[_0x2f8396,!![]];});});}})[_0x26ec('0x99')](function(_0x1c9101,_0x3f6943){if(_0x1c9101){_0x14dd26=_0x3f6943;if(!_0x3f6943){var _0x207ea5={'from':(_0x6cd0f6['contact'][_0x26ec('0x9a')]||'')+'\x20'+(_0x6cd0f6[_0x26ec('0x94')][_0x26ec('0x9b')]||'')};if(_0x2a6c21[_0x26ec('0x62')][_0x26ec('0x95')]&&_0x2a6c21[_0x26ec('0x62')][_0x26ec('0x9c')]&&_0x2a6c21['body']['threadId']!=_0x2a6c21['body']['messageId']){_0x207ea5[_0x26ec('0x95')]=_0x2a6c21[_0x26ec('0x62')]['messageId'];}return _0x1c9101[_0x26ec('0x6a')](_0x207ea5);}else{return _0x1c9101;}}})['then'](function(_0x1b0f41){_0x6cd0f6['interaction']=_0x1b0f41[_0x26ec('0x39')]({'plain':!![]});_0x6cd0f6[_0x26ec('0x9d')][_0x26ec('0x9e')]=_0x14dd26;if(_0x6cd0f6['interaction'][_0x26ec('0x9e')]){if(_0x6cd0f6[_0x26ec('0x92')][_0x26ec('0x9f')]){_0x6cd0f6[_0x26ec('0x8f')][_0x26ec('0xa0')]({'id':0x0,'priority':_0x6cd0f6['applications']['length']+0x1,'app':_0x26ec('0xa1'),'appdata':_0x26ec('0xa2'),'interval':_0x26ec('0xa3')});}}return db[_0x26ec('0xa4')][_0x26ec('0x61')]({'body':_0x2a6c21['body']['body'],'OpenchannelAccountId':_0x2a6c21[_0x26ec('0x5b')]['id'],'OpenchannelInteractionId':_0x1b0f41['id'],'direction':'in','ContactId':_0x6cd0f6[_0x26ec('0x94')]['id'],'AttachmentId':_0x2a6c21[_0x26ec('0x62')][_0x26ec('0xa5')]});})[_0x26ec('0x23')](function(_0x2ee8e7){_0x6cd0f6[_0x26ec('0x2a')]=_0x2ee8e7;if(!_0x6cd0f6['interaction'][_0x26ec('0xa6')])return;return db['User'][_0x26ec('0x60')]({'attributes':['id',_0x26ec('0x3e')],'where':{'id':_0x6cd0f6[_0x26ec('0x9d')]['UserId']}});})[_0x26ec('0x23')](function(_0x143591){if(_0x143591){_0x6cd0f6[_0x26ec('0x8f')][_0x26ec('0xa7')]({'id':0x0,'priority':0x0,'app':_0x26ec('0xa8'),'appdata':_0x143591['name']+','+(_0x6cd0f6[_0x26ec('0x92')][_0x26ec('0xa9')]||0xa),'interval':_0x26ec('0xa3')});}if(!_0x6cd0f6[_0x26ec('0x9d')][_0x26ec('0xaa')])return;return db[_0x26ec('0xab')]['find']({'attributes':['id',_0x26ec('0x3e')],'where':{'id':_0x6cd0f6[_0x26ec('0x9d')][_0x26ec('0xaa')]}});})[_0x26ec('0x23')](function(_0xdef8cd){if(_0xdef8cd){_0x6cd0f6['applications'][_0x26ec('0xa7')]({'id':0x0,'priority':0x1,'app':_0x26ec('0xac'),'appdata':_0xdef8cd[_0x26ec('0x3e')]+','+(_0x6cd0f6[_0x26ec('0x92')][_0x26ec('0xad')]||0x12c),'interval':_0x26ec('0xa3')});}return respondWithRpcPromise(_0x26ec('0xae'),'startRouting',_0x6cd0f6);})[_0x26ec('0x23')](function(_0x21b8e7){respondWithRpcPromise(_0x26ec('0xaf'),_0x26ec('0xaf'),{'event':'notify','message':_0x21b8e7},client9002);return _0x21b8e7;})[_0x26ec('0x23')](respondWithResult(_0x48d67c,null))[_0x26ec('0x2c')](handleError(_0x48d67c,null));};exports[_0x26ec('0xb0')]=function(_0xd7195f,_0x1debd5){var _0x3c0ed1=_0xd7195f['params']['id'];var _0x4d439d=_0xd7195f[_0x26ec('0x62')];var _0x4abd0e=0xc8;var _0x46d2b3=null;return db[_0x26ec('0xb1')]['transaction']({'isolationLevel':db['sequelize'][_0x26ec('0xb2')][_0x26ec('0xb3')][_0x26ec('0xb4')]},function(_0x17a503){return db['OpenchannelAccount'][_0x26ec('0xb5')]({'where':{'id':_0x3c0ed1},'transaction':_0x17a503})[_0x26ec('0x23')](function(_0x229948){if(_0x229948){return db[_0x26ec('0x8c')][_0x26ec('0x38')]({'where':{'OpenchannelAccountId':_0x3c0ed1},'transaction':_0x17a503})[_0x26ec('0x23')](function(){var _0x243a65=_[_0x26ec('0x41')](_0x4d439d,function(_0x4af2f4){_0x4af2f4[_0x26ec('0x6d')]=_0x3c0ed1;return _0x4af2f4;});return db[_0x26ec('0x8c')]['bulkCreate'](_0x243a65,{'transaction':_0x17a503});});}else{_0x4abd0e=0x194;_0x46d2b3=[];}});})[_0x26ec('0x23')](function(){if(_0x4abd0e!==0x194){return db[_0x26ec('0x8c')][_0x26ec('0xb6')]({'where':{'OpenchannelAccountId':_0x3c0ed1},'order':'priority'})[_0x26ec('0x23')](function(_0x4ee48e){_0x46d2b3=_0x4ee48e;});}})[_0x26ec('0x2c')](function(_0x2de290){_0x4abd0e=0x1f4;logger[_0x26ec('0x27')](_0x2de290['stack']);if(_0x2de290['name']){delete _0x2de290['name'];}_0x46d2b3=_0x2de290;})['finally'](function(){if(_0x46d2b3===null){_0x1debd5[_0x26ec('0x3c')](_0x4abd0e);}else{if(_0x4abd0e===0x1f4){_0x1debd5[_0x26ec('0x2e')](_0x4abd0e)['send'](_0x46d2b3);}else{_0x1debd5[_0x26ec('0x2e')](_0x4abd0e)[_0x26ec('0x2f')](_0x46d2b3);}}});};exports[_0x26ec('0xb7')]=function(_0x10513b,_0x27492d,_0x43b770){var _0x33f661={};var _0x4968a5={};var _0x40c72b;var _0x1c28b4;return db[_0x26ec('0x42')][_0x26ec('0xb5')]({'where':{'id':_0x10513b[_0x26ec('0x5b')]['id']}})[_0x26ec('0x23')](handleEntityNotFound(_0x27492d,null))['then'](function(_0x3faae3){if(_0x3faae3){_0x40c72b=_0x3faae3;_0x4968a5[_0x26ec('0x47')]=_['keys'](db['OpenchannelApplication']['rawAttributes']);_0x4968a5[_0x26ec('0x48')]=_[_0x26ec('0x49')](_0x10513b[_0x26ec('0x48')]);_0x4968a5[_0x26ec('0x54')]=_[_0x26ec('0x4a')](_0x4968a5[_0x26ec('0x47')],_0x4968a5[_0x26ec('0x48')]);_0x33f661[_0x26ec('0x4b')]=_[_0x26ec('0x4a')](_0x4968a5['model'],qs[_0x26ec('0x4c')](_0x10513b[_0x26ec('0x48')][_0x26ec('0x4c')]));_0x33f661[_0x26ec('0x4b')]=_0x33f661[_0x26ec('0x4b')]['length']?_0x33f661[_0x26ec('0x4b')]:_0x4968a5[_0x26ec('0x47')];_0x33f661[_0x26ec('0x51')]=qs[_0x26ec('0x52')](_0x10513b[_0x26ec('0x48')][_0x26ec('0x52')]);_0x33f661['where']=qs[_0x26ec('0x54')](_['pick'](_0x10513b[_0x26ec('0x48')],_0x4968a5['filters']));if(_0x10513b[_0x26ec('0x48')]['filter']){_0x33f661[_0x26ec('0x53')]=_[_0x26ec('0x5e')](_0x33f661['where'],{'$or':_['map'](_0x33f661[_0x26ec('0x4b')],function(_0x3730dd){var _0x550ef1={};_0x550ef1[_0x3730dd]={'$like':'%'+_0x10513b[_0x26ec('0x48')][_0x26ec('0x56')]+'%'};return _0x550ef1;})});}_0x33f661=_['merge']({},_0x33f661,_0x10513b['options']);return _0x40c72b[_0x26ec('0xb7')](_0x33f661);}})['then'](function(_0x21089c){if(_0x21089c){_0x1c28b4=_0x21089c['length'];if(!_0x10513b[_0x26ec('0x48')][_0x26ec('0x4e')](_0x26ec('0x4f'))){_0x33f661['limit']=qs['limit'](_0x10513b[_0x26ec('0x48')][_0x26ec('0x50')]);_0x33f661[_0x26ec('0x30')]=qs[_0x26ec('0x30')](_0x10513b['query'][_0x26ec('0x30')]);}return _0x40c72b[_0x26ec('0xb7')](_0x33f661);}})[_0x26ec('0x23')](function(_0x18db24){if(_0x18db24){return _0x18db24?{'count':_0x1c28b4,'rows':_0x18db24}:null;}})[_0x26ec('0x23')](respondWithResult(_0x27492d,null))[_0x26ec('0x2c')](handleError(_0x27492d,null));};exports[_0x26ec('0xb8')]=function(_0x44416b,_0x344173,_0x46cfd4){var _0x4fdf95={'raw':![],'where':{}};var _0xa8a550={};var _0x1768e3={'count':0x0,'rows':[]};return db[_0x26ec('0x42')]['findOne']({'where':{'id':_0x44416b[_0x26ec('0x5b')]['id']}})[_0x26ec('0x23')](handleEntityNotFound(_0x344173,null))[_0x26ec('0x23')](function(_0x4e5a0d){if(_0x4e5a0d){_0xa8a550[_0x26ec('0x47')]=_['keys'](db['OpenchannelInteraction'][_0x26ec('0x43')]);_0xa8a550['query']=_[_0x26ec('0x49')](_0x44416b[_0x26ec('0x48')]);_0xa8a550[_0x26ec('0x54')]=_[_0x26ec('0x4a')](_0xa8a550[_0x26ec('0x47')],_0xa8a550[_0x26ec('0x48')]);_0x4fdf95[_0x26ec('0x4b')]=_[_0x26ec('0x4a')](_0xa8a550[_0x26ec('0x47')],qs[_0x26ec('0x4c')](_0x44416b[_0x26ec('0x48')][_0x26ec('0x4c')]));_0x4fdf95['attributes']=_0x4fdf95[_0x26ec('0x4b')][_0x26ec('0x4d')]?_0x4fdf95[_0x26ec('0x4b')]:_0xa8a550[_0x26ec('0x47')];if(!_0x44416b[_0x26ec('0x48')][_0x26ec('0x4e')](_0x26ec('0x4f'))){_0x4fdf95[_0x26ec('0x50')]=qs['limit'](_0x44416b['query'][_0x26ec('0x50')]);_0x4fdf95['offset']=qs[_0x26ec('0x30')](_0x44416b['query'][_0x26ec('0x30')]);}_0x4fdf95[_0x26ec('0x51')]=qs[_0x26ec('0x52')](_0x44416b['query'][_0x26ec('0x52')]);_0x4fdf95[_0x26ec('0x53')]=qs[_0x26ec('0x54')](_[_0x26ec('0x55')](_0x44416b[_0x26ec('0x48')],_0xa8a550[_0x26ec('0x54')]));_0x4fdf95[_0x26ec('0x53')][_0x26ec('0x6d')]=_0x4e5a0d['id'];if(_0x44416b['query'][_0x26ec('0x56')]){_0x4fdf95['where']=_[_0x26ec('0x5e')](_0x4fdf95['where'],{'$or':_[_0x26ec('0x41')](_0x4fdf95[_0x26ec('0x4b')],function(_0x438af7){var _0x306a80={};_0x306a80[_0x438af7]={'$like':'%'+_0x44416b['query'][_0x26ec('0x56')]+'%'};return _0x306a80;})});}_0x4fdf95=_[_0x26ec('0x5e')]({},_0x4fdf95,_0x44416b['options']);return db[_0x26ec('0x96')][_0x26ec('0x32')]({'where':_0x4fdf95[_0x26ec('0x53')]})['then'](function(_0xed753d){_0x1768e3['count']=_0xed753d;if(_0x44416b[_0x26ec('0x48')]['includeAll']){_0x4fdf95[_0x26ec('0x58')]=[{'model':db[_0x26ec('0x79')],'as':_0x26ec('0xb9'),'required':![]},{'model':db['User'],'as':_0x26ec('0xba'),'attributes':[_0x26ec('0x3e'),_0x26ec('0xbb'),_0x26ec('0xbc')],'required':![]},{'model':db[_0x26ec('0xbd')],'as':_0x26ec('0xbe'),'attributes':['id','name',_0x26ec('0xbf')],'where':_0x44416b[_0x26ec('0x48')][_0x26ec('0xc0')]?{'id':_0x44416b[_0x26ec('0x48')]['tag']}:undefined,'required':_0x44416b[_0x26ec('0x48')][_0x26ec('0xc0')]?!![]:![]}];}return db['OpenchannelInteraction'][_0x26ec('0x70')](_0x4fdf95);})[_0x26ec('0x23')](function(_0x4e3431){_0x1768e3[_0x26ec('0x59')]=_0x4e3431;return _0x1768e3;});}})['then'](respondWithFilteredResult(_0x344173,_0x4fdf95))['catch'](handleError(_0x344173,null));};exports[_0x26ec('0xc1')]=function(_0x18dbcf,_0xda0a78,_0x2e9dd2){return db[_0x26ec('0x42')][_0x26ec('0x60')]({'where':{'id':_0x18dbcf['params']['id']}})[_0x26ec('0x23')](handleEntityNotFound(_0xda0a78,null))[_0x26ec('0x23')](function(_0xcda910){if(_0xcda910){return _0xcda910[_0x26ec('0xc1')](_0x18dbcf[_0x26ec('0x62')][_0x26ec('0x72')],_[_0x26ec('0xc2')](_0x18dbcf['body'],[_0x26ec('0x72'),'id'])||{})[_0x26ec('0x99')](function(_0x55747d){for(var _0x50ef82=0x0;_0x50ef82<_0x18dbcf[_0x26ec('0x62')]['ids']['length'];_0x50ef82+=0x1){socket[_0x26ec('0xc3')]('userOpenchannelAccount:save',{'UserId':Number(_0x18dbcf[_0x26ec('0x62')][_0x26ec('0x72')][_0x50ef82]),'OpenchannelAccountId':Number(_0x18dbcf[_0x26ec('0x5b')]['id'])});}return _0x55747d;});}})[_0x26ec('0x23')](respondWithResult(_0xda0a78,null))[_0x26ec('0x2c')](handleError(_0xda0a78,null));};exports['removeAgents']=function(_0x5cec80,_0x203b3a,_0x62297e){return db[_0x26ec('0x42')]['find']({'where':{'id':_0x5cec80[_0x26ec('0x5b')]['id']}})[_0x26ec('0x23')](handleEntityNotFound(_0x203b3a,null))[_0x26ec('0x23')](function(_0x3f616b){if(_0x3f616b){return _0x3f616b[_0x26ec('0xc4')](_0x5cec80[_0x26ec('0x48')][_0x26ec('0x72')])[_0x26ec('0x23')](function(){if(_[_0x26ec('0xc5')](_0x5cec80[_0x26ec('0x48')][_0x26ec('0x72')])){for(var _0x4b6e33=0x0;_0x4b6e33<_0x5cec80[_0x26ec('0x48')]['ids']['length'];_0x4b6e33+=0x1){socket['emit'](_0x26ec('0xc6'),{'UserId':Number(_0x5cec80[_0x26ec('0x48')][_0x26ec('0x72')][_0x4b6e33]),'OpenchannelAccountId':Number(_0x5cec80[_0x26ec('0x5b')]['id'])});}}else{socket['emit'](_0x26ec('0xc6'),{'UserId':Number(_0x5cec80['query']['ids']),'OpenchannelAccountId':Number(_0x5cec80[_0x26ec('0x5b')]['id'])});}});}})['then'](respondWithStatusCode(_0x203b3a,null))['catch'](handleError(_0x203b3a,null));};exports[_0x26ec('0xc7')]=function(_0x4c0f82,_0x2d060e,_0xa31d01){var _0x1ab6f9={};var _0x4a823e={};var _0x3b92d9;var _0x564c00;return db['OpenchannelAccount'][_0x26ec('0xb5')]({'where':{'id':_0x4c0f82['params']['id']}})['then'](handleEntityNotFound(_0x2d060e,null))[_0x26ec('0x23')](function(_0x1a7b51){if(_0x1a7b51){_0x3b92d9=_0x1a7b51;_0x4a823e[_0x26ec('0x47')]=_['keys'](db[_0x26ec('0xc8')][_0x26ec('0x43')]);_0x4a823e[_0x26ec('0x48')]=_[_0x26ec('0x49')](_0x4c0f82[_0x26ec('0x48')]);_0x4a823e[_0x26ec('0x54')]=_['intersection'](_0x4a823e[_0x26ec('0x47')],_0x4a823e[_0x26ec('0x48')]);_0x1ab6f9['attributes']=_[_0x26ec('0x4a')](_0x4a823e[_0x26ec('0x47')],qs[_0x26ec('0x4c')](_0x4c0f82[_0x26ec('0x48')]['fields']));_0x1ab6f9[_0x26ec('0x4b')]=_0x1ab6f9['attributes']['length']?_0x1ab6f9['attributes']:_0x4a823e[_0x26ec('0x47')];_0x1ab6f9[_0x26ec('0x51')]=qs[_0x26ec('0x52')](_0x4c0f82['query'][_0x26ec('0x52')]);_0x1ab6f9[_0x26ec('0x53')]=qs[_0x26ec('0x54')](_['pick'](_0x4c0f82['query'],_0x4a823e[_0x26ec('0x54')]));if(_0x4c0f82['query'][_0x26ec('0x56')]){_0x1ab6f9[_0x26ec('0x53')]=_[_0x26ec('0x5e')](_0x1ab6f9[_0x26ec('0x53')],{'$or':_[_0x26ec('0x41')](_0x1ab6f9[_0x26ec('0x4b')],function(_0x106f13){var _0x210cc5={};_0x210cc5[_0x106f13]={'$like':'%'+_0x4c0f82['query']['filter']+'%'};return _0x210cc5;})});}_0x1ab6f9=_[_0x26ec('0x5e')]({},_0x1ab6f9,_0x4c0f82['options']);return _0x3b92d9[_0x26ec('0xc7')](_0x1ab6f9);}})[_0x26ec('0x23')](function(_0x4697c6){if(_0x4697c6){_0x564c00=_0x4697c6[_0x26ec('0x4d')];if(!_0x4c0f82[_0x26ec('0x48')][_0x26ec('0x4e')](_0x26ec('0x4f'))){_0x1ab6f9['limit']=qs[_0x26ec('0x50')](_0x4c0f82['query'][_0x26ec('0x50')]);_0x1ab6f9[_0x26ec('0x30')]=qs[_0x26ec('0x30')](_0x4c0f82[_0x26ec('0x48')][_0x26ec('0x30')]);}return _0x3b92d9['getAgents'](_0x1ab6f9);}})[_0x26ec('0x23')](function(_0x4e383b){if(_0x4e383b){return _0x4e383b?{'count':_0x564c00,'rows':_0x4e383b}:null;}})[_0x26ec('0x23')](respondWithResult(_0x2d060e,null))[_0x26ec('0x2c')](handleError(_0x2d060e,null));};exports['send']=function(_0x5cce32,_0x5a9be4,_0x4cad1f){var _0x425a36,_0x1ac026,_0xbdc050;if(_[_0x26ec('0x80')](_0x5cce32[_0x26ec('0x62')]['body'])||_0x5cce32[_0x26ec('0x62')]['body']===''){throw new db[(_0x26ec('0x83'))][(_0x26ec('0x7a'))](_0x26ec('0x84'));}if(_['isNil'](_0x5cce32[_0x26ec('0x62')]['to'])){}_0x425a36=_0x5cce32[_0x26ec('0x62')]['to'];return db[_0x26ec('0x42')][_0x26ec('0xb5')]({'where':{'id':_0x5cce32[_0x26ec('0x5b')]['id']}})[_0x26ec('0x23')](handleEntityNotFound(_0x5a9be4,null))[_0x26ec('0x23')](function(_0x2bca8c){if(_0x2bca8c){return db[_0x26ec('0x42')][_0x26ec('0x60')]({'where':{'id':_0x2bca8c['id']},'include':[{'model':db[_0x26ec('0x89')],'as':_0x26ec('0x8e'),'include':[{'model':db[_0x26ec('0x79')],'as':'Contacts','where':{[_0x2bca8c[_0x26ec('0x87')]]:_0x425a36},'limit':0x1,'order':[[_0x26ec('0x7d'),_0x26ec('0x8b')]]}]}]})[_0x26ec('0x23')](handleEntityNotFound(_0x5a9be4,null))['then'](function(_0x182b74){if(_0x182b74&&_0x182b74[_0x26ec('0x8e')]){_0x1ac026=_0x182b74[_0x26ec('0x39')]({'plain':!![]});if(_0x1ac026[_0x26ec('0x8e')]&&_0x1ac026[_0x26ec('0x8e')][_0x26ec('0x8a')]['length']){return _0x1ac026['List'][_0x26ec('0x8a')][0x0];}return db[_0x26ec('0x79')][_0x26ec('0x61')](_[_0x26ec('0x1a')](_0x5cce32['body'],{'firstName':_0x425a36,[_0x182b74[_0x26ec('0x87')]]:_0x425a36,'phone':_0x425a36,'ListId':_0x1ac026[_0x26ec('0x93')]}));}})['then'](handleEntityNotFound(_0x5a9be4,null))[_0x26ec('0x23')](function(_0x56df70){if(_0x56df70){_0xbdc050=_0x56df70;return db[_0x26ec('0x96')][_0x26ec('0x60')]({'where':{'ContactId':_0xbdc050['id'],'closed':![],'OpenchannelAccountId':_0x1ac026['id']}})[_0x26ec('0x23')](function(_0x322847){if(_0x322847){return[_0x322847,![]];}return db[_0x26ec('0x96')][_0x26ec('0x61')]({'UserId':_0x5cce32[_0x26ec('0x63')]['id'],'ContactId':_0xbdc050['id'],'OpenchannelAccountId':_0x1ac026['id'],'lastMsgDirection':_0x26ec('0xc9'),'firstMsgDirection':_0x26ec('0xc9'),'Messages':[_[_0x26ec('0x5e')](_0x5cce32[_0x26ec('0x62')],{'read':![],'body':_0x5cce32[_0x26ec('0x62')][_0x26ec('0x62')],'OpenchannelAccountId':_0x1ac026['id'],'UserId':_0x5cce32[_0x26ec('0x63')]['id'],'ContactId':_0xbdc050['id']})]},{'include':[{'model':db['OpenchannelMessage'],'as':_0x26ec('0xca')}]})[_0x26ec('0x23')](function(_0xfe2b1c){return[_0xfe2b1c,!![]];});});}})[_0x26ec('0x99')](function(_0x34b736,_0x5a2220){if(_0x5a2220){return _0x34b736;}return db[_0x26ec('0xa4')]['create'](_[_0x26ec('0x5e')](_0x5cce32[_0x26ec('0x62')],{'read':![],'body':_0x5cce32['body'][_0x26ec('0x62')],'OpenchannelAccountId':_0x1ac026['id'],'OpenchannelInteractionId':_0x34b736['id'],'UserId':_0x5cce32['user']['id'],'ContactId':_0xbdc050['id']}))[_0x26ec('0x23')](function(_0x5c04d8){_0x34b736[_0x26ec('0xcb')][_0x26ec('0xca')]=[];_0x34b736[_0x26ec('0xcb')][_0x26ec('0xca')]['push'](_0x5c04d8[_0x26ec('0xcb')]);return _0x34b736;});});}})[_0x26ec('0x23')](respondWithResult(_0x5a9be4,null))[_0x26ec('0x2c')](handleError(_0x5a9be4,null));};
\ No newline at end of file
index 2d80403..96c6a3b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x13f6=['save','update','remove','emit','hasOwnProperty','events','../../mysqldb'];(function(_0xf647d5,_0x3f26a4){var _0xa37852=function(_0x3c82a8){while(--_0x3c82a8){_0xf647d5['push'](_0xf647d5['shift']());}};_0xa37852(++_0x3f26a4);}(_0x13f6,0x124));var _0x613f=function(_0x137827,_0x46fbdd){_0x137827=_0x137827-0x0;var _0x1dbc3c=_0x13f6[_0x137827];return _0x1dbc3c;};'use strict';var EventEmitter=require(_0x613f('0x0'));var OpenchannelAccount=require(_0x613f('0x1'))['db']['OpenchannelAccount'];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x613f('0x2'),'afterUpdate':_0x613f('0x3'),'afterDestroy':_0x613f('0x4')};function emitEvent(_0x5414ff){return function(_0x179f6e,_0x1e01e3,_0x20af2f){OpenchannelAccountEvents['emit'](_0x5414ff+':'+_0x179f6e['id'],_0x179f6e);OpenchannelAccountEvents[_0x613f('0x5')](_0x5414ff,_0x179f6e);_0x20af2f(null);};}for(var e in events){if(events[_0x613f('0x6')](e)){var event=events[e];OpenchannelAccount['hook'](e,emitEvent(event));}}module['exports']=OpenchannelAccountEvents;
\ No newline at end of file
+var _0xee5b=['remove','emit','hasOwnProperty','hook','events','OpenchannelAccount','setMaxListeners','update'];(function(_0x2a3316,_0xe22ce9){var _0xd2f9e4=function(_0x108cc0){while(--_0x108cc0){_0x2a3316['push'](_0x2a3316['shift']());}};_0xd2f9e4(++_0xe22ce9);}(_0xee5b,0x1f4));var _0xbee5=function(_0x43c98e,_0x329106){_0x43c98e=_0x43c98e-0x0;var _0x5f18db=_0xee5b[_0x43c98e];return _0x5f18db;};'use strict';var EventEmitter=require(_0xbee5('0x0'));var OpenchannelAccount=require('../../mysqldb')['db'][_0xbee5('0x1')];var OpenchannelAccountEvents=new EventEmitter();OpenchannelAccountEvents[_0xbee5('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0xbee5('0x3'),'afterDestroy':_0xbee5('0x4')};function emitEvent(_0x2eb857){return function(_0x210159,_0x4bd202,_0x5200b1){OpenchannelAccountEvents[_0xbee5('0x5')](_0x2eb857+':'+_0x210159['id'],_0x210159);OpenchannelAccountEvents[_0xbee5('0x5')](_0x2eb857,_0x210159);_0x5200b1(null);};}for(var e in events){if(events[_0xbee5('0x6')](e)){var event=events[e];OpenchannelAccount[_0xbee5('0x7')](e,emitEvent(event));}}module['exports']=OpenchannelAccountEvents;
\ No newline at end of file
index 731d0f7..0fdd838 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['../../config/environment','./openchannelAccount.attributes','exports','define','OpenchannelAccount','lodash','util','../../config/logger','bluebird','path','rimraf'];(function(_0x3a8bc6,_0xf954e5){var _0x397b1e=function(_0x27f15b){while(--_0x27f15b){_0x3a8bc6['push'](_0x3a8bc6['shift']());}};_0x397b1e(++_0xf954e5);}(_0xa9e0,0x123));var _0x0a9e=function(_0x376b45,_0x5964fb){_0x376b45=_0x376b45-0x0;var _0x2341b3=_0xa9e0[_0x376b45];return _0x2341b3;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var logger=require(_0x0a9e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x0a9e('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0a9e('0x4'));var rimraf=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var attributes=require(_0x0a9e('0x7'));module[_0x0a9e('0x8')]=function(_0x57b080,_0x219af0){return _0x57b080[_0x0a9e('0x9')](_0x0a9e('0xa'),attributes,{'tableName':'openchannel_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa9e0=['../../config/environment','./openchannelAccount.attributes','exports','define','OpenchannelAccount','lodash','util','../../config/logger','bluebird','path','rimraf'];(function(_0xe9a244,_0x2a6804){var _0x5c52cf=function(_0x4a0b2a){while(--_0x4a0b2a){_0xe9a244['push'](_0xe9a244['shift']());}};_0x5c52cf(++_0x2a6804);}(_0xa9e0,0x123));var _0x0a9e=function(_0xbb091,_0x3fe7ee){_0xbb091=_0xbb091-0x0;var _0x467a04=_0xa9e0[_0xbb091];return _0x467a04;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var logger=require(_0x0a9e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x0a9e('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0a9e('0x4'));var rimraf=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var attributes=require(_0x0a9e('0x7'));module[_0x0a9e('0x8')]=function(_0x57b080,_0x219af0){return _0x57b080[_0x0a9e('0x9')](_0x0a9e('0xa'),attributes,{'tableName':'openchannel_accounts','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 1e9d571..32fcf57 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9ffd=['OpenchannelAccount,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','redis','defaults','localhost','socket.io-emitter','./openchannelAccount.socket','request','then','info'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x9ffd,0xaa));var _0xd9ff=function(_0x5f1dc6,_0x25c24c){_0x5f1dc6=_0x5f1dc6-0x0;var _0x2bfc69=_0x9ffd[_0x5f1dc6];return _0x2bfc69;};'use strict';var _=require(_0xd9ff('0x0'));var util=require(_0xd9ff('0x1'));var moment=require(_0xd9ff('0x2'));var BPromise=require('bluebird');var rs=require(_0xd9ff('0x3'));var fs=require('fs');var Redis=require(_0xd9ff('0x4'));var db=require(_0xd9ff('0x5'))['db'];var utils=require(_0xd9ff('0x6'));var logger=require('../../config/logger')(_0xd9ff('0x7'));var config=require(_0xd9ff('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xd9ff('0x9')][_0xd9ff('0xa')]({'port':0x232a});config[_0xd9ff('0xb')]=_[_0xd9ff('0xc')](config[_0xd9ff('0xb')],{'host':_0xd9ff('0xd'),'port':0x18eb});var socket=require(_0xd9ff('0xe'))(new Redis(config[_0xd9ff('0xb')]));require(_0xd9ff('0xf'))['register'](socket);function respondWithRpcPromise(_0x54a555,_0x567f79,_0x5aa954){return new BPromise(function(_0x2355ab,_0x2fd77a){return client[_0xd9ff('0x10')](_0x54a555,_0x5aa954)[_0xd9ff('0x11')](function(_0x37d2c0){logger[_0xd9ff('0x12')](_0xd9ff('0x13'),_0x567f79,_0xd9ff('0x14'));logger['debug']('OpenchannelAccount,\x20%s,\x20%s,\x20%s',_0x567f79,_0xd9ff('0x14'),JSON[_0xd9ff('0x15')](_0x37d2c0));if(_0x37d2c0[_0xd9ff('0x16')]){if(_0x37d2c0[_0xd9ff('0x16')][_0xd9ff('0x17')]===0x1f4){logger['error'](_0xd9ff('0x13'),_0x567f79,_0x37d2c0[_0xd9ff('0x16')]['message']);return _0x2fd77a(_0x37d2c0[_0xd9ff('0x16')]['message']);}logger['error']('OpenchannelAccount,\x20%s,\x20%s',_0x567f79,_0x37d2c0['error'][_0xd9ff('0x18')]);return _0x2355ab(_0x37d2c0['error'][_0xd9ff('0x18')]);}else{logger[_0xd9ff('0x12')](_0xd9ff('0x13'),_0x567f79,_0xd9ff('0x14'));_0x2355ab(_0x37d2c0[_0xd9ff('0x19')][_0xd9ff('0x18')]);}})[_0xd9ff('0x1a')](function(_0x128588){logger[_0xd9ff('0x16')](_0xd9ff('0x13'),_0x567f79,_0x128588);_0x2fd77a(_0x128588);});});}
\ No newline at end of file
+var _0x3495=['../../config/logger','../../config/environment','jayson/promise','http','defaults','localhost','redis','./openchannelAccount.socket','register','request','info','OpenchannelAccount,\x20%s,\x20%s','request\x20sent','debug','OpenchannelAccount,\x20%s,\x20%s,\x20%s','stringify','error','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x774575,_0x189c9a){var _0x4b03ea=function(_0x2df665){while(--_0x2df665){_0x774575['push'](_0x774575['shift']());}};_0x4b03ea(++_0x189c9a);}(_0x3495,0x1de));var _0x5349=function(_0x1db0c7,_0x17154e){_0x1db0c7=_0x1db0c7-0x0;var _0x3402bb=_0x3495[_0x1db0c7];return _0x3402bb;};'use strict';var _=require(_0x5349('0x0'));var util=require(_0x5349('0x1'));var moment=require(_0x5349('0x2'));var BPromise=require(_0x5349('0x3'));var rs=require(_0x5349('0x4'));var fs=require('fs');var Redis=require(_0x5349('0x5'));var db=require(_0x5349('0x6'))['db'];var utils=require(_0x5349('0x7'));var logger=require(_0x5349('0x8'))('rpc');var config=require(_0x5349('0x9'));var jayson=require(_0x5349('0xa'));var client=jayson['client'][_0x5349('0xb')]({'port':0x232a});config['redis']=_[_0x5349('0xc')](config['redis'],{'host':_0x5349('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x5349('0xe')]));require(_0x5349('0xf'))[_0x5349('0x10')](socket);function respondWithRpcPromise(_0x23a1c7,_0x21bf91,_0x3a416e){return new BPromise(function(_0x35d425,_0x4bf160){return client[_0x5349('0x11')](_0x23a1c7,_0x3a416e)['then'](function(_0x2cbd83){logger[_0x5349('0x12')](_0x5349('0x13'),_0x21bf91,_0x5349('0x14'));logger[_0x5349('0x15')](_0x5349('0x16'),_0x21bf91,_0x5349('0x14'),JSON[_0x5349('0x17')](_0x2cbd83));if(_0x2cbd83[_0x5349('0x18')]){if(_0x2cbd83[_0x5349('0x18')]['code']===0x1f4){logger[_0x5349('0x18')](_0x5349('0x13'),_0x21bf91,_0x2cbd83['error'][_0x5349('0x19')]);return _0x4bf160(_0x2cbd83[_0x5349('0x18')][_0x5349('0x19')]);}logger['error']('OpenchannelAccount,\x20%s,\x20%s',_0x21bf91,_0x2cbd83['error'][_0x5349('0x19')]);return _0x35d425(_0x2cbd83['error'][_0x5349('0x19')]);}else{logger['info'](_0x5349('0x13'),_0x21bf91,_0x5349('0x14'));_0x35d425(_0x2cbd83[_0x5349('0x1a')][_0x5349('0x19')]);}})['catch'](function(_0x22d1ca){logger[_0x5349('0x18')](_0x5349('0x13'),_0x21bf91,_0x22d1ca);_0x4bf160(_0x22d1ca);});});}
\ No newline at end of file
index bebe4a1..3f26207 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe3ee=['register','length','openchannelAccount:','remove','update'];(function(_0x43cccb,_0x16be52){var _0x814975=function(_0x56c353){while(--_0x56c353){_0x43cccb['push'](_0x43cccb['shift']());}};_0x814975(++_0x16be52);}(_0xe3ee,0x116));var _0xee3e=function(_0x53a966,_0x522f55){_0x53a966=_0x53a966-0x0;var _0x5d9463=_0xe3ee[_0x53a966];return _0x5d9463;};'use strict';var OpenchannelAccountEvents=require('./openchannelAccount.events');var events=['save',_0xee3e('0x0'),_0xee3e('0x1')];function createListener(_0x5927b6,_0x52bcf2){return function(_0x45bf25){_0x52bcf2['emit'](_0x5927b6,_0x45bf25);};}function removeListener(_0x4c48ed,_0x12b41d){return function(){OpenchannelAccountEvents['removeListener'](_0x4c48ed,_0x12b41d);};}exports[_0xee3e('0x2')]=function(_0x352eca){for(var _0x3907a7=0x0,_0xd893ca=events[_0xee3e('0x3')];_0x3907a7<_0xd893ca;_0x3907a7++){var _0x39a770=events[_0x3907a7];var _0x43ab67=createListener(_0xee3e('0x4')+_0x39a770,_0x352eca);OpenchannelAccountEvents['on'](_0x39a770,_0x43ab67);}};
\ No newline at end of file
+var _0xa74f=['emit','removeListener','length','openchannelAccount:','remove'];(function(_0x1b5d83,_0x4c27b2){var _0x182a50=function(_0x446098){while(--_0x446098){_0x1b5d83['push'](_0x1b5d83['shift']());}};_0x182a50(++_0x4c27b2);}(_0xa74f,0x9a));var _0xfa74=function(_0x53bcc3,_0x364374){_0x53bcc3=_0x53bcc3-0x0;var _0x47c959=_0xa74f[_0x53bcc3];return _0x47c959;};'use strict';var OpenchannelAccountEvents=require('./openchannelAccount.events');var events=['save',_0xfa74('0x0'),'update'];function createListener(_0x4b5765,_0x29e4c8){return function(_0x110824){_0x29e4c8[_0xfa74('0x1')](_0x4b5765,_0x110824);};}function removeListener(_0x25a9b7,_0x5b367b){return function(){OpenchannelAccountEvents[_0xfa74('0x2')](_0x25a9b7,_0x5b367b);};}exports['register']=function(_0x543cfe){for(var _0x43dd2f=0x0,_0x9ddbd2=events[_0xfa74('0x3')];_0x43dd2f<_0x9ddbd2;_0x43dd2f++){var _0x2d9fa9=events[_0x43dd2f];var _0x287921=createListener(_0xfa74('0x4')+_0x2d9fa9,_0x543cfe);OpenchannelAccountEvents['on'](_0x2d9fa9,_0x287921);}};
\ No newline at end of file
index 7e86ae6..ec264bb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc31b=['isAuthenticated','index','/:id','show','post','create','put','update','delete','multer','path','Router','../../components/auth/service','./openchannelApplication.controller','get'];(function(_0x85b56f,_0x274ebf){var _0x2f3d98=function(_0x1386b5){while(--_0x1386b5){_0x85b56f['push'](_0x85b56f['shift']());}};_0x2f3d98(++_0x274ebf);}(_0xc31b,0x153));var _0xbc31=function(_0x411283,_0x56809f){_0x411283=_0x411283-0x0;var _0x3340bd=_0xc31b[_0x411283];return _0x3340bd;};'use strict';var multer=require(_0xbc31('0x0'));var util=require('util');var path=require(_0xbc31('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0xbc31('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0xbc31('0x3'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xbc31('0x4'));router[_0xbc31('0x5')]('/',auth[_0xbc31('0x6')](),controller[_0xbc31('0x7')]);router[_0xbc31('0x5')](_0xbc31('0x8'),auth['isAuthenticated'](),controller[_0xbc31('0x9')]);router[_0xbc31('0xa')]('/',auth[_0xbc31('0x6')](),controller[_0xbc31('0xb')]);router[_0xbc31('0xc')]('/:id',auth[_0xbc31('0x6')](),controller[_0xbc31('0xd')]);router[_0xbc31('0xe')](_0xbc31('0x8'),auth[_0xbc31('0x6')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0xc533=['show','post','update','destroy','exports','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','./openchannelApplication.controller','get','/:id','isAuthenticated'];(function(_0x3a2c7f,_0x8ba887){var _0x119342=function(_0x3ce891){while(--_0x3ce891){_0x3a2c7f['push'](_0x3a2c7f['shift']());}};_0x119342(++_0x8ba887);}(_0xc533,0x14f));var _0x3c53=function(_0x40bffc,_0x3a45d7){_0x40bffc=_0x40bffc-0x0;var _0x3007e9=_0xc533[_0x40bffc];return _0x3007e9;};'use strict';var multer=require(_0x3c53('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x3c53('0x1'));var express=require(_0x3c53('0x2'));var router=express[_0x3c53('0x3')]();var fs_extra=require(_0x3c53('0x4'));var auth=require(_0x3c53('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x3c53('0x6'));router['get']('/',auth['isAuthenticated'](),controller['index']);router[_0x3c53('0x7')](_0x3c53('0x8'),auth[_0x3c53('0x9')](),controller[_0x3c53('0xa')]);router[_0x3c53('0xb')]('/',auth[_0x3c53('0x9')](),controller['create']);router['put']('/:id',auth[_0x3c53('0x9')](),controller[_0x3c53('0xc')]);router['delete']('/:id',auth[_0x3c53('0x9')](),controller[_0x3c53('0xd')]);module[_0x3c53('0xe')]=router;
\ No newline at end of file
index a73421e..42f6766 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0b2a=['INTEGER','STRING','TEXT','sequelize','exports'];(function(_0x22e402,_0x1d0979){var _0x27c7dc=function(_0x393ac5){while(--_0x393ac5){_0x22e402['push'](_0x22e402['shift']());}};_0x27c7dc(++_0x1d0979);}(_0x0b2a,0x189));var _0xa0b2=function(_0x2a1db5,_0x1b7707){_0x2a1db5=_0x2a1db5-0x0;var _0x16cc55=_0x0b2a[_0x2a1db5];return _0x16cc55;};'use strict';var Sequelize=require(_0xa0b2('0x0'));module[_0xa0b2('0x1')]={'priority':{'type':Sequelize[_0xa0b2('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0xa0b2('0x3')],'allowNull':![],'defaultValue':'noop'},'appdata':{'type':Sequelize[_0xa0b2('0x4')]()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize['STRING'],'defaultValue':'*,*,*,*'}};
\ No newline at end of file
+var _0xade1=['TEXT','*,*,*,*','sequelize','exports','STRING','noop'];(function(_0x1a342a,_0x1b22e6){var _0x4cfd16=function(_0x281eb3){while(--_0x281eb3){_0x1a342a['push'](_0x1a342a['shift']());}};_0x4cfd16(++_0x1b22e6);}(_0xade1,0x86));var _0x1ade=function(_0x1c93dd,_0x512f76){_0x1c93dd=_0x1c93dd-0x0;var _0x3fed3e=_0xade1[_0x1c93dd];return _0x3fed3e;};'use strict';var Sequelize=require(_0x1ade('0x0'));module[_0x1ade('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0x1ade('0x2')],'allowNull':![],'defaultValue':_0x1ade('0x3')},'appdata':{'type':Sequelize[_0x1ade('0x4')]()},'description':{'type':Sequelize['STRING']},'interval':{'type':Sequelize[_0x1ade('0x2')],'defaultValue':_0x1ade('0x5')}};
\ No newline at end of file
index d0849d7..0432c0e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc5f8=['limit','offset','count','set','apply','save','then','destroy','sendStatus','error','stack','name','send','index','map','OpenchannelApplication','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','pick','merge','type','VIRTUAL','filter','options','include','findAll','rows','catch','show','params','includeAll','find','create','body','update','eml-format','zip-dir','request-promise','bluebird','util','path','to-csv','ejs','fs-extra','lodash','squel','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','status','end','json','undefined'];(function(_0x3c96e9,_0x5a8abd){var _0x546772=function(_0x55a7b6){while(--_0x55a7b6){_0x3c96e9['push'](_0x3c96e9['shift']());}};_0x546772(++_0x5a8abd);}(_0xc5f8,0x15c));var _0x8c5f=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc5f8[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0x8c5f('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x8c5f('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x8c5f('0x2'));var moment=require('moment');var BPromise=require(_0x8c5f('0x3'));var Mustache=require('mustache');var util=require(_0x8c5f('0x4'));var path=require(_0x8c5f('0x5'));var sox=require('sox');var csv=require(_0x8c5f('0x6'));var ejs=require(_0x8c5f('0x7'));var fs=require('fs');var fs_extra=require(_0x8c5f('0x8'));var _=require(_0x8c5f('0x9'));var squel=require(_0x8c5f('0xa'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x8c5f('0xb'));var Redis=require(_0x8c5f('0xc'));var authService=require(_0x8c5f('0xd'));var qs=require(_0x8c5f('0xe'));var as=require(_0x8c5f('0xf'));var hardwareService=require(_0x8c5f('0x10'));var logger=require(_0x8c5f('0x11'))(_0x8c5f('0x12'));var utils=require(_0x8c5f('0x13'));var config=require(_0x8c5f('0x14'));var licenseUtil=require(_0x8c5f('0x15'));var db=require(_0x8c5f('0x16'))['db'];function respondWithStatusCode(_0x4e76e7,_0x58915d){_0x58915d=_0x58915d||0xcc;return function(_0x5df27d){if(_0x5df27d){return _0x4e76e7['sendStatus'](_0x58915d);}return _0x4e76e7[_0x8c5f('0x17')](_0x58915d)[_0x8c5f('0x18')]();};}function respondWithResult(_0x4f789b,_0x500841){_0x500841=_0x500841||0xc8;return function(_0x489671){if(_0x489671){return _0x4f789b[_0x8c5f('0x17')](_0x500841)[_0x8c5f('0x19')](_0x489671);}};}function respondWithFilteredResult(_0x1dd1ee,_0x32207e){return function(_0x82f33a){if(_0x82f33a){var _0x1e885b=typeof _0x32207e['offset']===_0x8c5f('0x1a')&&typeof _0x32207e[_0x8c5f('0x1b')]===_0x8c5f('0x1a');var _0x32a2ef=_0x82f33a['count'];var _0x2dae74=_0x1e885b?0x0:_0x32207e[_0x8c5f('0x1c')];var _0x414742=_0x1e885b?_0x82f33a[_0x8c5f('0x1d')]:_0x32207e[_0x8c5f('0x1c')]+_0x32207e[_0x8c5f('0x1b')];var _0x1a9761;if(_0x414742>=_0x32a2ef){_0x414742=_0x32a2ef;_0x1a9761=0xc8;}else{_0x1a9761=0xce;}_0x1dd1ee[_0x8c5f('0x17')](_0x1a9761);return _0x1dd1ee[_0x8c5f('0x1e')]('Content-Range',_0x2dae74+'-'+_0x414742+'/'+_0x32a2ef)[_0x8c5f('0x19')](_0x82f33a);}return null;};}function patchUpdates(_0x18b826){return function(_0x18ed2c){try{jsonpatch[_0x8c5f('0x1f')](_0x18ed2c,_0x18b826,!![]);}catch(_0x10ead6){return BPromise['reject'](_0x10ead6);}return _0x18ed2c[_0x8c5f('0x20')]();};}function saveUpdates(_0x1e4045,_0x444b94){return function(_0x2fe4a7){if(_0x2fe4a7){return _0x2fe4a7['update'](_0x1e4045)[_0x8c5f('0x21')](function(_0x4823fb){return _0x4823fb;});}return null;};}function removeEntity(_0x17f39c,_0x3f1887){return function(_0x4e2adf){if(_0x4e2adf){return _0x4e2adf[_0x8c5f('0x22')]()[_0x8c5f('0x21')](function(){_0x17f39c[_0x8c5f('0x17')](0xcc)[_0x8c5f('0x18')]();});}};}function handleEntityNotFound(_0x189f5b,_0xf8a5fb){return function(_0x499c9a){if(!_0x499c9a){_0x189f5b[_0x8c5f('0x23')](0x194);}return _0x499c9a;};}function handleError(_0x3ebf31,_0x19069b){_0x19069b=_0x19069b||0x1f4;return function(_0x2cb402){logger[_0x8c5f('0x24')](_0x2cb402[_0x8c5f('0x25')]);if(_0x2cb402[_0x8c5f('0x26')]){delete _0x2cb402[_0x8c5f('0x26')];}_0x3ebf31['status'](_0x19069b)[_0x8c5f('0x27')](_0x2cb402);};}exports[_0x8c5f('0x28')]=function(_0x5557a6,_0x4982c2){var _0x464117={},_0xab145b={},_0x424519={'count':0x0,'rows':[]};var _0x534e6c=_[_0x8c5f('0x29')](db[_0x8c5f('0x2a')][_0x8c5f('0x2b')],function(_0x3157a3){return{'name':_0x3157a3[_0x8c5f('0x2c')],'type':_0x3157a3['type'][_0x8c5f('0x2d')]};});_0xab145b[_0x8c5f('0x2e')]=_['map'](_0x534e6c,'name');_0xab145b[_0x8c5f('0x2f')]=_[_0x8c5f('0x30')](_0x5557a6[_0x8c5f('0x2f')]);_0xab145b[_0x8c5f('0x31')]=_[_0x8c5f('0x32')](_0xab145b[_0x8c5f('0x2e')],_0xab145b[_0x8c5f('0x2f')]);_0x464117[_0x8c5f('0x33')]=_['intersection'](_0xab145b[_0x8c5f('0x2e')],qs['fields'](_0x5557a6[_0x8c5f('0x2f')][_0x8c5f('0x34')]));_0x464117[_0x8c5f('0x33')]=_0x464117[_0x8c5f('0x33')][_0x8c5f('0x35')]?_0x464117['attributes']:_0xab145b[_0x8c5f('0x2e')];if(!_0x5557a6[_0x8c5f('0x2f')][_0x8c5f('0x36')]('nolimit')){_0x464117[_0x8c5f('0x1b')]=qs[_0x8c5f('0x1b')](_0x5557a6[_0x8c5f('0x2f')]['limit']);_0x464117['offset']=qs[_0x8c5f('0x1c')](_0x5557a6['query'][_0x8c5f('0x1c')]);}_0x464117[_0x8c5f('0x37')]=qs[_0x8c5f('0x38')](_0x5557a6['query'][_0x8c5f('0x38')]);_0x464117[_0x8c5f('0x39')]=qs[_0x8c5f('0x31')](_[_0x8c5f('0x3a')](_0x5557a6[_0x8c5f('0x2f')],_0xab145b['filters']),_0x534e6c);if(_0x5557a6['query']['filter']){_0x464117[_0x8c5f('0x39')]=_[_0x8c5f('0x3b')](_0x464117[_0x8c5f('0x39')],{'$or':_[_0x8c5f('0x29')](_0x534e6c,function(_0x12bb51){if(_0x12bb51[_0x8c5f('0x3c')]!==_0x8c5f('0x3d')){var _0x11c633={};_0x11c633[_0x12bb51['name']]={'$like':'%'+_0x5557a6[_0x8c5f('0x2f')][_0x8c5f('0x3e')]+'%'};return _0x11c633;}})});}_0x464117=_['merge']({},_0x464117,_0x5557a6[_0x8c5f('0x3f')]);var _0x4ed3a7={'where':_0x464117['where']};return db[_0x8c5f('0x2a')][_0x8c5f('0x1d')](_0x4ed3a7)[_0x8c5f('0x21')](function(_0x2f0ed5){_0x424519[_0x8c5f('0x1d')]=_0x2f0ed5;if(_0x5557a6[_0x8c5f('0x2f')]['includeAll']){_0x464117[_0x8c5f('0x40')]=[{'all':!![]}];}return db['OpenchannelApplication'][_0x8c5f('0x41')](_0x464117);})[_0x8c5f('0x21')](function(_0x38361f){_0x424519[_0x8c5f('0x42')]=_0x38361f;return _0x424519;})[_0x8c5f('0x21')](respondWithFilteredResult(_0x4982c2,_0x464117))[_0x8c5f('0x43')](handleError(_0x4982c2,null));};exports[_0x8c5f('0x44')]=function(_0x421e33,_0x1c0366){var _0x1ea923={'raw':!![],'where':{'id':_0x421e33[_0x8c5f('0x45')]['id']}},_0x372647={};_0x372647[_0x8c5f('0x2e')]=_[_0x8c5f('0x30')](db['OpenchannelApplication'][_0x8c5f('0x2b')]);_0x372647[_0x8c5f('0x2f')]=_['keys'](_0x421e33['query']);_0x372647[_0x8c5f('0x31')]=_['intersection'](_0x372647[_0x8c5f('0x2e')],_0x372647[_0x8c5f('0x2f')]);_0x1ea923[_0x8c5f('0x33')]=_[_0x8c5f('0x32')](_0x372647['model'],qs[_0x8c5f('0x34')](_0x421e33[_0x8c5f('0x2f')][_0x8c5f('0x34')]));_0x1ea923[_0x8c5f('0x33')]=_0x1ea923[_0x8c5f('0x33')]['length']?_0x1ea923['attributes']:_0x372647[_0x8c5f('0x2e')];if(_0x421e33[_0x8c5f('0x2f')][_0x8c5f('0x46')]){_0x1ea923[_0x8c5f('0x40')]=[{'all':!![]}];}_0x1ea923=_[_0x8c5f('0x3b')]({},_0x1ea923,_0x421e33[_0x8c5f('0x3f')]);return db[_0x8c5f('0x2a')][_0x8c5f('0x47')](_0x1ea923)[_0x8c5f('0x21')](handleEntityNotFound(_0x1c0366,null))[_0x8c5f('0x21')](respondWithResult(_0x1c0366,null))[_0x8c5f('0x43')](handleError(_0x1c0366,null));};exports[_0x8c5f('0x48')]=function(_0x477ddc,_0x2a80fa){return db[_0x8c5f('0x2a')]['create'](_0x477ddc[_0x8c5f('0x49')],{})[_0x8c5f('0x21')](respondWithResult(_0x2a80fa,0xc9))[_0x8c5f('0x43')](handleError(_0x2a80fa,null));};exports[_0x8c5f('0x4a')]=function(_0x9d94db,_0x170aff){if(_0x9d94db['body']['id']){delete _0x9d94db[_0x8c5f('0x49')]['id'];}return db[_0x8c5f('0x2a')]['find']({'where':{'id':_0x9d94db[_0x8c5f('0x45')]['id']}})[_0x8c5f('0x21')](handleEntityNotFound(_0x170aff,null))[_0x8c5f('0x21')](saveUpdates(_0x9d94db[_0x8c5f('0x49')],null))[_0x8c5f('0x21')](respondWithResult(_0x170aff,null))[_0x8c5f('0x43')](handleError(_0x170aff,null));};exports[_0x8c5f('0x22')]=function(_0xc77c6a,_0x40b8b1){return db[_0x8c5f('0x2a')][_0x8c5f('0x47')]({'where':{'id':_0xc77c6a[_0x8c5f('0x45')]['id']}})[_0x8c5f('0x21')](handleEntityNotFound(_0x40b8b1,null))[_0x8c5f('0x21')](removeEntity(_0x40b8b1,null))[_0x8c5f('0x43')](handleError(_0x40b8b1,null));};
\ No newline at end of file
+var _0xf5a4=['count','status','set','Content-Range','reject','destroy','error','stack','name','send','map','OpenchannelApplication','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','pick','filter','where','merge','VIRTUAL','options','then','includeAll','findAll','rows','show','params','rawAttributes','catch','create','body','update','find','eml-format','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','json','offset','limit','undefined'];(function(_0x254849,_0x321ff6){var _0x4f73d1=function(_0x489d88){while(--_0x489d88){_0x254849['push'](_0x254849['shift']());}};_0x4f73d1(++_0x321ff6);}(_0xf5a4,0x111));var _0x4f5a=function(_0x476752,_0x969dcd){_0x476752=_0x476752-0x0;var _0xe74053=_0xf5a4[_0x476752];return _0xe74053;};'use strict';var emlformat=require(_0x4f5a('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x4f5a('0x1'));var jsonpatch=require(_0x4f5a('0x2'));var rp=require(_0x4f5a('0x3'));var moment=require(_0x4f5a('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x4f5a('0x5'));var util=require(_0x4f5a('0x6'));var path=require(_0x4f5a('0x7'));var sox=require(_0x4f5a('0x8'));var csv=require(_0x4f5a('0x9'));var ejs=require(_0x4f5a('0xa'));var fs=require('fs');var fs_extra=require(_0x4f5a('0xb'));var _=require(_0x4f5a('0xc'));var squel=require(_0x4f5a('0xd'));var crypto=require('crypto');var jsforce=require(_0x4f5a('0xe'));var deskjs=require(_0x4f5a('0xf'));var toCsv=require('to-csv');var querystring=require(_0x4f5a('0x10'));var Papa=require(_0x4f5a('0x11'));var Redis=require(_0x4f5a('0x12'));var authService=require(_0x4f5a('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0x4f5a('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x4f5a('0x15'))('api');var utils=require(_0x4f5a('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x4f5a('0x17'));var db=require(_0x4f5a('0x18'))['db'];function respondWithStatusCode(_0x12ffed,_0x546626){_0x546626=_0x546626||0xcc;return function(_0x5c9c6e){if(_0x5c9c6e){return _0x12ffed[_0x4f5a('0x19')](_0x546626);}return _0x12ffed['status'](_0x546626)[_0x4f5a('0x1a')]();};}function respondWithResult(_0xc1f8de,_0x2386e6){_0x2386e6=_0x2386e6||0xc8;return function(_0x1ff129){if(_0x1ff129){return _0xc1f8de['status'](_0x2386e6)[_0x4f5a('0x1b')](_0x1ff129);}};}function respondWithFilteredResult(_0x3570d9,_0x5b1ca2){return function(_0x258a2a){if(_0x258a2a){var _0x4fa16d=typeof _0x5b1ca2[_0x4f5a('0x1c')]==='undefined'&&typeof _0x5b1ca2[_0x4f5a('0x1d')]===_0x4f5a('0x1e');var _0x287477=_0x258a2a[_0x4f5a('0x1f')];var _0x6b53d6=_0x4fa16d?0x0:_0x5b1ca2[_0x4f5a('0x1c')];var _0x2d0e22=_0x4fa16d?_0x258a2a['count']:_0x5b1ca2[_0x4f5a('0x1c')]+_0x5b1ca2[_0x4f5a('0x1d')];var _0x1af086;if(_0x2d0e22>=_0x287477){_0x2d0e22=_0x287477;_0x1af086=0xc8;}else{_0x1af086=0xce;}_0x3570d9[_0x4f5a('0x20')](_0x1af086);return _0x3570d9[_0x4f5a('0x21')](_0x4f5a('0x22'),_0x6b53d6+'-'+_0x2d0e22+'/'+_0x287477)[_0x4f5a('0x1b')](_0x258a2a);}return null;};}function patchUpdates(_0x26a435){return function(_0x214954){try{jsonpatch['apply'](_0x214954,_0x26a435,!![]);}catch(_0x59f702){return BPromise[_0x4f5a('0x23')](_0x59f702);}return _0x214954['save']();};}function saveUpdates(_0x1628d3,_0x15fa58){return function(_0x2bbcfd){if(_0x2bbcfd){return _0x2bbcfd['update'](_0x1628d3)['then'](function(_0x1fd5fd){return _0x1fd5fd;});}return null;};}function removeEntity(_0x50f90b,_0x6ee05b){return function(_0x3427a6){if(_0x3427a6){return _0x3427a6[_0x4f5a('0x24')]()['then'](function(){_0x50f90b[_0x4f5a('0x20')](0xcc)[_0x4f5a('0x1a')]();});}};}function handleEntityNotFound(_0x10166c,_0xe5ea2d){return function(_0x59db16){if(!_0x59db16){_0x10166c['sendStatus'](0x194);}return _0x59db16;};}function handleError(_0x1a4b18,_0x55765b){_0x55765b=_0x55765b||0x1f4;return function(_0x1cf819){logger[_0x4f5a('0x25')](_0x1cf819[_0x4f5a('0x26')]);if(_0x1cf819['name']){delete _0x1cf819[_0x4f5a('0x27')];}_0x1a4b18[_0x4f5a('0x20')](_0x55765b)[_0x4f5a('0x28')](_0x1cf819);};}exports['index']=function(_0x26d717,_0xf34fab){var _0x78b135={},_0x4b8772={},_0x1adee0={'count':0x0,'rows':[]};var _0xc13e1a=_[_0x4f5a('0x29')](db[_0x4f5a('0x2a')]['rawAttributes'],function(_0x5371e0){return{'name':_0x5371e0[_0x4f5a('0x2b')],'type':_0x5371e0[_0x4f5a('0x2c')][_0x4f5a('0x2d')]};});_0x4b8772[_0x4f5a('0x2e')]=_[_0x4f5a('0x29')](_0xc13e1a,_0x4f5a('0x27'));_0x4b8772[_0x4f5a('0x2f')]=_[_0x4f5a('0x30')](_0x26d717[_0x4f5a('0x2f')]);_0x4b8772[_0x4f5a('0x31')]=_[_0x4f5a('0x32')](_0x4b8772[_0x4f5a('0x2e')],_0x4b8772[_0x4f5a('0x2f')]);_0x78b135['attributes']=_[_0x4f5a('0x32')](_0x4b8772[_0x4f5a('0x2e')],qs[_0x4f5a('0x33')](_0x26d717[_0x4f5a('0x2f')][_0x4f5a('0x33')]));_0x78b135[_0x4f5a('0x34')]=_0x78b135[_0x4f5a('0x34')][_0x4f5a('0x35')]?_0x78b135[_0x4f5a('0x34')]:_0x4b8772['model'];if(!_0x26d717[_0x4f5a('0x2f')][_0x4f5a('0x36')](_0x4f5a('0x37'))){_0x78b135[_0x4f5a('0x1d')]=qs[_0x4f5a('0x1d')](_0x26d717[_0x4f5a('0x2f')][_0x4f5a('0x1d')]);_0x78b135[_0x4f5a('0x1c')]=qs[_0x4f5a('0x1c')](_0x26d717[_0x4f5a('0x2f')][_0x4f5a('0x1c')]);}_0x78b135[_0x4f5a('0x38')]=qs[_0x4f5a('0x39')](_0x26d717[_0x4f5a('0x2f')][_0x4f5a('0x39')]);_0x78b135['where']=qs[_0x4f5a('0x31')](_[_0x4f5a('0x3a')](_0x26d717[_0x4f5a('0x2f')],_0x4b8772['filters']),_0xc13e1a);if(_0x26d717[_0x4f5a('0x2f')][_0x4f5a('0x3b')]){_0x78b135[_0x4f5a('0x3c')]=_[_0x4f5a('0x3d')](_0x78b135['where'],{'$or':_[_0x4f5a('0x29')](_0xc13e1a,function(_0x5d9ca6){if(_0x5d9ca6[_0x4f5a('0x2c')]!==_0x4f5a('0x3e')){var _0x3b9582={};_0x3b9582[_0x5d9ca6[_0x4f5a('0x27')]]={'$like':'%'+_0x26d717[_0x4f5a('0x2f')]['filter']+'%'};return _0x3b9582;}})});}_0x78b135=_[_0x4f5a('0x3d')]({},_0x78b135,_0x26d717[_0x4f5a('0x3f')]);var _0x1338aa={'where':_0x78b135[_0x4f5a('0x3c')]};return db[_0x4f5a('0x2a')][_0x4f5a('0x1f')](_0x1338aa)[_0x4f5a('0x40')](function(_0x2f2674){_0x1adee0[_0x4f5a('0x1f')]=_0x2f2674;if(_0x26d717[_0x4f5a('0x2f')][_0x4f5a('0x41')]){_0x78b135['include']=[{'all':!![]}];}return db['OpenchannelApplication'][_0x4f5a('0x42')](_0x78b135);})['then'](function(_0x3569f4){_0x1adee0[_0x4f5a('0x43')]=_0x3569f4;return _0x1adee0;})[_0x4f5a('0x40')](respondWithFilteredResult(_0xf34fab,_0x78b135))['catch'](handleError(_0xf34fab,null));};exports[_0x4f5a('0x44')]=function(_0x1b4448,_0x5ae4a7){var _0x487fd9={'raw':!![],'where':{'id':_0x1b4448[_0x4f5a('0x45')]['id']}},_0x37681d={};_0x37681d['model']=_['keys'](db[_0x4f5a('0x2a')][_0x4f5a('0x46')]);_0x37681d[_0x4f5a('0x2f')]=_[_0x4f5a('0x30')](_0x1b4448[_0x4f5a('0x2f')]);_0x37681d[_0x4f5a('0x31')]=_['intersection'](_0x37681d[_0x4f5a('0x2e')],_0x37681d[_0x4f5a('0x2f')]);_0x487fd9['attributes']=_[_0x4f5a('0x32')](_0x37681d[_0x4f5a('0x2e')],qs['fields'](_0x1b4448[_0x4f5a('0x2f')][_0x4f5a('0x33')]));_0x487fd9[_0x4f5a('0x34')]=_0x487fd9[_0x4f5a('0x34')][_0x4f5a('0x35')]?_0x487fd9[_0x4f5a('0x34')]:_0x37681d[_0x4f5a('0x2e')];if(_0x1b4448[_0x4f5a('0x2f')]['includeAll']){_0x487fd9['include']=[{'all':!![]}];}_0x487fd9=_[_0x4f5a('0x3d')]({},_0x487fd9,_0x1b4448[_0x4f5a('0x3f')]);return db[_0x4f5a('0x2a')]['find'](_0x487fd9)[_0x4f5a('0x40')](handleEntityNotFound(_0x5ae4a7,null))[_0x4f5a('0x40')](respondWithResult(_0x5ae4a7,null))[_0x4f5a('0x47')](handleError(_0x5ae4a7,null));};exports['create']=function(_0x4ecc86,_0x2f5662){return db[_0x4f5a('0x2a')][_0x4f5a('0x48')](_0x4ecc86[_0x4f5a('0x49')],{})[_0x4f5a('0x40')](respondWithResult(_0x2f5662,0xc9))[_0x4f5a('0x47')](handleError(_0x2f5662,null));};exports[_0x4f5a('0x4a')]=function(_0xbd99b4,_0x54f90c){if(_0xbd99b4[_0x4f5a('0x49')]['id']){delete _0xbd99b4[_0x4f5a('0x49')]['id'];}return db[_0x4f5a('0x2a')][_0x4f5a('0x4b')]({'where':{'id':_0xbd99b4[_0x4f5a('0x45')]['id']}})[_0x4f5a('0x40')](handleEntityNotFound(_0x54f90c,null))['then'](saveUpdates(_0xbd99b4[_0x4f5a('0x49')],null))[_0x4f5a('0x40')](respondWithResult(_0x54f90c,null))[_0x4f5a('0x47')](handleError(_0x54f90c,null));};exports[_0x4f5a('0x24')]=function(_0x214e0f,_0x405ab5){return db[_0x4f5a('0x2a')]['find']({'where':{'id':_0x214e0f[_0x4f5a('0x45')]['id']}})['then'](handleEntityNotFound(_0x405ab5,null))[_0x4f5a('0x40')](removeEntity(_0x405ab5,null))[_0x4f5a('0x47')](handleError(_0x405ab5,null));};
\ No newline at end of file
index 094e4db..35b048d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc746=['exports','define','OpenchannelApplication','openchannel_applications','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./openchannelApplication.attributes'];(function(_0xbe0844,_0x467903){var _0x2a75b8=function(_0x1e8745){while(--_0x1e8745){_0xbe0844['push'](_0xbe0844['shift']());}};_0x2a75b8(++_0x467903);}(_0xc746,0xd6));var _0x6c74=function(_0x3aa658,_0x49b23b){_0x3aa658=_0x3aa658-0x0;var _0x338b9f=_0xc746[_0x3aa658];return _0x338b9f;};'use strict';var _=require(_0x6c74('0x0'));var util=require(_0x6c74('0x1'));var logger=require(_0x6c74('0x2'))(_0x6c74('0x3'));var moment=require(_0x6c74('0x4'));var BPromise=require(_0x6c74('0x5'));var rp=require(_0x6c74('0x6'));var fs=require('fs');var path=require(_0x6c74('0x7'));var rimraf=require(_0x6c74('0x8'));var config=require('../../config/environment');var attributes=require(_0x6c74('0x9'));module[_0x6c74('0xa')]=function(_0x2ad790,_0x420ab0){return _0x2ad790[_0x6c74('0xb')](_0x6c74('0xc'),attributes,{'tableName':_0x6c74('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x6c74('0xe'),'collate':_0x6c74('0xf')});};
\ No newline at end of file
+var _0x84a2=['bluebird','request-promise','path','define','OpenchannelApplication','openchannel_applications','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger'];(function(_0x1c4903,_0x2c8ecd){var _0x1f0af5=function(_0x90ceaa){while(--_0x90ceaa){_0x1c4903['push'](_0x1c4903['shift']());}};_0x1f0af5(++_0x2c8ecd);}(_0x84a2,0xad));var _0x284a=function(_0x420516,_0x5ce5ca){_0x420516=_0x420516-0x0;var _0x16484e=_0x84a2[_0x420516];return _0x16484e;};'use strict';var _=require(_0x284a('0x0'));var util=require(_0x284a('0x1'));var logger=require(_0x284a('0x2'))('api');var moment=require('moment');var BPromise=require(_0x284a('0x3'));var rp=require(_0x284a('0x4'));var fs=require('fs');var path=require(_0x284a('0x5'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./openchannelApplication.attributes');module['exports']=function(_0x202b28,_0x269962){return _0x202b28[_0x284a('0x6')](_0x284a('0x7'),attributes,{'tableName':_0x284a('0x8'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x284a('0x9'),'collate':_0x284a('0xa')});};
\ No newline at end of file
index 0ed548c..cebb212 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x680c=['update','body','options','raw','where','limit','then','UpdateOpenchannelApplication','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','client','http','info','OpenchannelApplication,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','OpenchannelApplication'];(function(_0x5d80de,_0x2cf15d){var _0x1c7556=function(_0x5bd806){while(--_0x5bd806){_0x5d80de['push'](_0x5d80de['shift']());}};_0x1c7556(++_0x2cf15d);}(_0x680c,0x1d8));var _0xc680=function(_0x202cfe,_0x4684eb){_0x202cfe=_0x202cfe-0x0;var _0x1b5f7e=_0x680c[_0x202cfe];return _0x1b5f7e;};'use strict';var _=require(_0xc680('0x0'));var util=require(_0xc680('0x1'));var moment=require(_0xc680('0x2'));var BPromise=require(_0xc680('0x3'));var rs=require(_0xc680('0x4'));var fs=require('fs');var Redis=require(_0xc680('0x5'));var db=require(_0xc680('0x6'))['db'];var utils=require(_0xc680('0x7'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xc680('0x8')][_0xc680('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4a5732,_0xc6ef4d,_0x30e40c){return new BPromise(function(_0x25559f,_0x2ef833){return client['request'](_0x4a5732,_0x30e40c)['then'](function(_0x2d892a){logger[_0xc680('0xa')](_0xc680('0xb'),_0xc6ef4d,_0xc680('0xc'));logger[_0xc680('0xd')]('OpenchannelApplication,\x20%s,\x20%s,\x20%s',_0xc6ef4d,_0xc680('0xc'),JSON[_0xc680('0xe')](_0x2d892a));if(_0x2d892a[_0xc680('0xf')]){if(_0x2d892a[_0xc680('0xf')][_0xc680('0x10')]===0x1f4){logger[_0xc680('0xf')]('OpenchannelApplication,\x20%s,\x20%s',_0xc6ef4d,_0x2d892a[_0xc680('0xf')][_0xc680('0x11')]);return _0x2ef833(_0x2d892a[_0xc680('0xf')][_0xc680('0x11')]);}logger[_0xc680('0xf')](_0xc680('0xb'),_0xc6ef4d,_0x2d892a[_0xc680('0xf')][_0xc680('0x11')]);return _0x25559f(_0x2d892a['error'][_0xc680('0x11')]);}else{logger[_0xc680('0xa')]('OpenchannelApplication,\x20%s,\x20%s',_0xc6ef4d,_0xc680('0xc'));_0x25559f(_0x2d892a[_0xc680('0x12')][_0xc680('0x11')]);}})[_0xc680('0x13')](function(_0x5b8674){logger[_0xc680('0xf')](_0xc680('0xb'),_0xc6ef4d,_0x5b8674);_0x2ef833(_0x5b8674);});});}exports['UpdateOpenchannelApplication']=function(_0x417c9f){var _0x24ed4b=this;return new Promise(function(_0x44766a,_0x5c73b0){return db[_0xc680('0x14')][_0xc680('0x15')](_0x417c9f[_0xc680('0x16')],{'raw':_0x417c9f[_0xc680('0x17')]?_0x417c9f['options'][_0xc680('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x417c9f[_0xc680('0x17')]?_0x417c9f[_0xc680('0x17')][_0xc680('0x19')]||null:null,'attributes':_0x417c9f[_0xc680('0x17')]?_0x417c9f[_0xc680('0x17')]['attributes']||null:null,'limit':_0x417c9f[_0xc680('0x17')]?_0x417c9f[_0xc680('0x17')][_0xc680('0x1a')]||null:null})[_0xc680('0x1b')](function(_0x4a4628){logger[_0xc680('0xa')]('UpdateOpenchannelApplication',_0x417c9f);logger[_0xc680('0xd')](_0xc680('0x1c'),_0x417c9f,JSON[_0xc680('0xe')](_0x4a4628));_0x44766a(_0x4a4628);})['catch'](function(_0x42e4f4){logger[_0xc680('0xf')]('UpdateOpenchannelApplication',_0x42e4f4[_0xc680('0x11')],_0x417c9f);_0x5c73b0(_0x24ed4b['error'](0x1f4,_0x42e4f4[_0xc680('0x11')]));});});};
\ No newline at end of file
+var _0xbe39=['../../config/logger','rpc','client','http','request','then','info','request\x20sent','debug','stringify','error','code','OpenchannelApplication,\x20%s,\x20%s','message','result','catch','UpdateOpenchannelApplication','OpenchannelApplication','update','body','options','raw','lodash','moment'];(function(_0x1973a8,_0x111bcc){var _0x3033e3=function(_0x2173ad){while(--_0x2173ad){_0x1973a8['push'](_0x1973a8['shift']());}};_0x3033e3(++_0x111bcc);}(_0xbe39,0x14e));var _0x9be3=function(_0x58d939,_0x5cfdae){_0x58d939=_0x58d939-0x0;var _0x1e5115=_0xbe39[_0x58d939];return _0x1e5115;};'use strict';var _=require(_0x9be3('0x0'));var util=require('util');var moment=require(_0x9be3('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x9be3('0x2'))(_0x9be3('0x3'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x9be3('0x4')][_0x9be3('0x5')]({'port':0x232a});function respondWithRpcPromise(_0x2c9625,_0x4c3c6d,_0xedf782){return new BPromise(function(_0x51622a,_0x44eebe){return client[_0x9be3('0x6')](_0x2c9625,_0xedf782)[_0x9be3('0x7')](function(_0x13ade5){logger[_0x9be3('0x8')]('OpenchannelApplication,\x20%s,\x20%s',_0x4c3c6d,_0x9be3('0x9'));logger[_0x9be3('0xa')]('OpenchannelApplication,\x20%s,\x20%s,\x20%s',_0x4c3c6d,_0x9be3('0x9'),JSON[_0x9be3('0xb')](_0x13ade5));if(_0x13ade5[_0x9be3('0xc')]){if(_0x13ade5[_0x9be3('0xc')][_0x9be3('0xd')]===0x1f4){logger['error'](_0x9be3('0xe'),_0x4c3c6d,_0x13ade5[_0x9be3('0xc')]['message']);return _0x44eebe(_0x13ade5[_0x9be3('0xc')][_0x9be3('0xf')]);}logger[_0x9be3('0xc')]('OpenchannelApplication,\x20%s,\x20%s',_0x4c3c6d,_0x13ade5[_0x9be3('0xc')][_0x9be3('0xf')]);return _0x51622a(_0x13ade5[_0x9be3('0xc')][_0x9be3('0xf')]);}else{logger[_0x9be3('0x8')](_0x9be3('0xe'),_0x4c3c6d,_0x9be3('0x9'));_0x51622a(_0x13ade5[_0x9be3('0x10')][_0x9be3('0xf')]);}})[_0x9be3('0x11')](function(_0xe2e371){logger[_0x9be3('0xc')](_0x9be3('0xe'),_0x4c3c6d,_0xe2e371);_0x44eebe(_0xe2e371);});});}exports[_0x9be3('0x12')]=function(_0x450933){var _0x5588f9=this;return new Promise(function(_0x4447f1,_0x2da9c6){return db[_0x9be3('0x13')][_0x9be3('0x14')](_0x450933[_0x9be3('0x15')],{'raw':_0x450933['options']?_0x450933[_0x9be3('0x16')][_0x9be3('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x450933['options']?_0x450933[_0x9be3('0x16')]['where']||null:null,'attributes':_0x450933[_0x9be3('0x16')]?_0x450933[_0x9be3('0x16')]['attributes']||null:null,'limit':_0x450933[_0x9be3('0x16')]?_0x450933['options']['limit']||null:null})[_0x9be3('0x7')](function(_0x3a0186){logger['info'](_0x9be3('0x12'),_0x450933);logger[_0x9be3('0xa')](_0x9be3('0x12'),_0x450933,JSON[_0x9be3('0xb')](_0x3a0186));_0x4447f1(_0x3a0186);})['catch'](function(_0x359479){logger['error'](_0x9be3('0x12'),_0x359479[_0x9be3('0xf')],_0x450933);_0x2da9c6(_0x5588f9[_0x9be3('0xc')](0x1f4,_0x359479[_0x9be3('0xf')]));});});};
\ No newline at end of file
index 3e6632e..bb02c20 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa074=['./openchannelInteraction.controller','get','isAuthenticated','index','/describe','describe','/:id','/:id/messages','/:id/download','download','post','create','addMessage','tracked','openchannel','openchannelinteraction:addtags','addTags','put','openchannelinteraction:update','update','delete','destroy','/:id/tags','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x15f311,_0x40eedf){var _0x2545d1=function(_0x49c648){while(--_0x49c648){_0x15f311['push'](_0x15f311['shift']());}};_0x2545d1(++_0x40eedf);}(_0xa074,0xd7));var _0x4a07=function(_0x46e363,_0x45d7e2){_0x46e363=_0x46e363-0x0;var _0x3fb059=_0xa074[_0x46e363];return _0x3fb059;};'use strict';var multer=require(_0x4a07('0x0'));var util=require(_0x4a07('0x1'));var path=require(_0x4a07('0x2'));var timeout=require(_0x4a07('0x3'));var express=require('express');var router=express[_0x4a07('0x4')]();var fs_extra=require(_0x4a07('0x5'));var auth=require(_0x4a07('0x6'));var interaction=require(_0x4a07('0x7'));var config=require(_0x4a07('0x8'));var controller=require(_0x4a07('0x9'));router[_0x4a07('0xa')]('/',auth[_0x4a07('0xb')](),controller[_0x4a07('0xc')]);router[_0x4a07('0xa')](_0x4a07('0xd'),auth[_0x4a07('0xb')](),controller[_0x4a07('0xe')]);router[_0x4a07('0xa')](_0x4a07('0xf'),auth[_0x4a07('0xb')](),controller['show']);router[_0x4a07('0xa')](_0x4a07('0x10'),auth['isAuthenticated'](),controller['getMessages']);router[_0x4a07('0xa')](_0x4a07('0x11'),auth[_0x4a07('0xb')](),controller[_0x4a07('0x12')]);router[_0x4a07('0x13')]('/',auth[_0x4a07('0xb')](),controller[_0x4a07('0x14')]);router[_0x4a07('0x13')]('/:id/messages',auth['isAuthenticated'](),controller[_0x4a07('0x15')]);router['post']('/:id/tags',auth[_0x4a07('0xb')](),interaction[_0x4a07('0x16')](_0x4a07('0x17'),_0x4a07('0x18')),controller[_0x4a07('0x19')]);router[_0x4a07('0x1a')]('/:id',auth[_0x4a07('0xb')](),interaction[_0x4a07('0x16')](_0x4a07('0x17'),_0x4a07('0x1b')),controller[_0x4a07('0x1c')]);router[_0x4a07('0x1d')](_0x4a07('0xf'),auth[_0x4a07('0xb')](),interaction[_0x4a07('0x16')](_0x4a07('0x17'),'openchannelinteraction:destroy'),controller[_0x4a07('0x1e')]);router[_0x4a07('0x1d')](_0x4a07('0x1f'),auth[_0x4a07('0xb')](),controller['removeTags']);module['exports']=router;
\ No newline at end of file
+var _0x69a1=['multer','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelInteraction.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/messages','getMessages','download','post','create','addMessage','/:id/tags','tracked','openchannel','openchannelinteraction:addtags','addTags','put','update','delete','openchannelinteraction:destroy','removeTags'];(function(_0x3b1b23,_0x21bccd){var _0x1efc85=function(_0x102a95){while(--_0x102a95){_0x3b1b23['push'](_0x3b1b23['shift']());}};_0x1efc85(++_0x21bccd);}(_0x69a1,0x7c));var _0x169a=function(_0x1c3225,_0x3c2951){_0x1c3225=_0x1c3225-0x0;var _0x338191=_0x69a1[_0x1c3225];return _0x338191;};'use strict';var multer=require(_0x169a('0x0'));var util=require('util');var path=require(_0x169a('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x169a('0x2')]();var fs_extra=require(_0x169a('0x3'));var auth=require(_0x169a('0x4'));var interaction=require(_0x169a('0x5'));var config=require(_0x169a('0x6'));var controller=require(_0x169a('0x7'));router[_0x169a('0x8')]('/',auth[_0x169a('0x9')](),controller[_0x169a('0xa')]);router['get'](_0x169a('0xb'),auth['isAuthenticated'](),controller[_0x169a('0xc')]);router[_0x169a('0x8')](_0x169a('0xd'),auth[_0x169a('0x9')](),controller[_0x169a('0xe')]);router[_0x169a('0x8')](_0x169a('0xf'),auth[_0x169a('0x9')](),controller[_0x169a('0x10')]);router[_0x169a('0x8')]('/:id/download',auth[_0x169a('0x9')](),controller[_0x169a('0x11')]);router[_0x169a('0x12')]('/',auth[_0x169a('0x9')](),controller[_0x169a('0x13')]);router[_0x169a('0x12')](_0x169a('0xf'),auth['isAuthenticated'](),controller[_0x169a('0x14')]);router[_0x169a('0x12')](_0x169a('0x15'),auth['isAuthenticated'](),interaction[_0x169a('0x16')](_0x169a('0x17'),_0x169a('0x18')),controller[_0x169a('0x19')]);router[_0x169a('0x1a')](_0x169a('0xd'),auth[_0x169a('0x9')](),interaction['tracked'](_0x169a('0x17'),'openchannelinteraction:update'),controller[_0x169a('0x1b')]);router[_0x169a('0x1c')](_0x169a('0xd'),auth[_0x169a('0x9')](),interaction[_0x169a('0x16')](_0x169a('0x17'),_0x169a('0x1d')),controller['destroy']);router[_0x169a('0x1c')](_0x169a('0x15'),auth[_0x169a('0x9')](),controller[_0x169a('0x1e')]);module['exports']=router;
\ No newline at end of file
index caafba2..c7b8e02 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7348=['BOOLEAN','STRING','DATE','ENUM','out','INTEGER','exports'];(function(_0x3d42d8,_0x4cffaa){var _0x27fc41=function(_0x3a363b){while(--_0x3a363b){_0x3d42d8['push'](_0x3d42d8['shift']());}};_0x27fc41(++_0x4cffaa);}(_0x7348,0x16b));var _0x8734=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0x7348[_0x167cc1];return _0x10bc4b;};'use strict';var Sequelize=require('sequelize');module[_0x8734('0x0')]={'closed':{'type':Sequelize[_0x8734('0x1')],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0x8734('0x2')]},'secondDisposition':{'type':Sequelize[_0x8734('0x2')]},'thirdDisposition':{'type':Sequelize[_0x8734('0x2')]},'note':{'type':Sequelize[_0x8734('0x2')]},'read1stAt':{'type':Sequelize[_0x8734('0x3')]},'threadId':{'type':Sequelize['STRING']},'externalUrl':{'type':Sequelize[_0x8734('0x2')]},'lastMsgAt':{'type':Sequelize['DATE']},'firstMsgDirection':{'type':Sequelize[_0x8734('0x4')]('in','out'),'defaultValue':'in','allowNull':![]},'lastMsgDirection':{'type':Sequelize[_0x8734('0x4')]('in',_0x8734('0x5')),'defaultValue':'in','allowNull':![]},'from':{'type':Sequelize[_0x8734('0x2')]},'autoreplyExecuted':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueId':{'type':Sequelize[_0x8734('0x6')]}};
\ No newline at end of file
+var _0x9037=['BOOLEAN','INTEGER','exports','DATE','STRING','ENUM','out'];(function(_0x2ecc65,_0xd75c48){var _0x103cc3=function(_0x3f856b){while(--_0x3f856b){_0x2ecc65['push'](_0x2ecc65['shift']());}};_0x103cc3(++_0xd75c48);}(_0x9037,0xbf));var _0x7903=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x9037[_0x14add3];return _0x4a174f;};'use strict';var Sequelize=require('sequelize');module[_0x7903('0x0')]={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'closedAt':{'type':Sequelize[_0x7903('0x1')]},'disposition':{'type':Sequelize[_0x7903('0x2')]},'secondDisposition':{'type':Sequelize[_0x7903('0x2')]},'thirdDisposition':{'type':Sequelize[_0x7903('0x2')]},'note':{'type':Sequelize[_0x7903('0x2')]},'read1stAt':{'type':Sequelize[_0x7903('0x1')]},'threadId':{'type':Sequelize[_0x7903('0x2')]},'externalUrl':{'type':Sequelize[_0x7903('0x2')]},'lastMsgAt':{'type':Sequelize[_0x7903('0x1')]},'firstMsgDirection':{'type':Sequelize[_0x7903('0x3')]('in',_0x7903('0x4')),'defaultValue':'in','allowNull':![]},'lastMsgDirection':{'type':Sequelize[_0x7903('0x3')]('in','out'),'defaultValue':'in','allowNull':![]},'from':{'type':Sequelize[_0x7903('0x2')]},'autoreplyExecuted':{'type':Sequelize[_0x7903('0x5')],'defaultValue':![]},'queueId':{'type':Sequelize[_0x7903('0x6')]}};
\ No newline at end of file
index 115a71a..89f46d5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1f0b=['direction','read','OpenchannelAccount','Account','get','mkdirSync','Openchannel','Owner','N.A.','createdAt','closed','closedAt','threadId','Public','basename','existsSync','createReadStream','pipe','createWriteStream','out','secret','value','downloadInteraction.ejs','transcript-','.pdf','download','rimraf','zip-dir','util','ejs','ioredis','../../components/interaction/service','../../components/parsers/qs','../../components/export/pdf','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','./openchannelInteraction.socket','register','status','end','json','offset','undefined','limit','count','Content-Range','then','destroy','sendStatus','error','name','send','index','map','OpenchannelInteraction','rawAttributes','key','getOptions','openchannel','query','user','show','type','from','params','keys','filters','intersection','model','fields','length','attributes','includeAll','merge','options','find','catch','body','update','describe','addMessage','ids','omit','OpenchannelMessage','hasOwnProperty','nolimit','order','sort','where','pick','OpenchannelInteractionId','filter','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','findAll','addTags','setTags','Tag','color','emit','openchannelInteractionTags:save','removeTags','unix','toString','join','server','files','tmp','root','attachments','transcript-%d-%s.zip','User','fullname','push','CmContact','Contact','firstName','Attachment','Messages'];(function(_0x58836f,_0x5351e2){var _0x28f9b1=function(_0x30a6cc){while(--_0x30a6cc){_0x58836f['push'](_0x58836f['shift']());}};_0x28f9b1(++_0x5351e2);}(_0x1f0b,0x114));var _0xb1f0=function(_0x42bf9e,_0x54a2f0){_0x42bf9e=_0x42bf9e-0x0;var _0x48b8f0=_0x1f0b[_0x42bf9e];return _0x48b8f0;};'use strict';var rimraf=require(_0xb1f0('0x0'));var zipdir=require(_0xb1f0('0x1'));var moment=require('moment');var util=require(_0xb1f0('0x2'));var path=require('path');var ejs=require(_0xb1f0('0x3'));var fs=require('fs');var _=require('lodash');var Redis=require(_0xb1f0('0x4'));var interaction=require(_0xb1f0('0x5'));var qs=require(_0xb1f0('0x6'));var pdf=require(_0xb1f0('0x7'));var logger=require(_0xb1f0('0x8'))(_0xb1f0('0x9'));var config=require(_0xb1f0('0xa'));var db=require(_0xb1f0('0xb'))['db'];config[_0xb1f0('0xc')]=_[_0xb1f0('0xd')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xb1f0('0xe'))[_0xb1f0('0xf')](socket);function respondWithStatusCode(_0x233a87,_0x4180b7){_0x4180b7=_0x4180b7||0xcc;return function(_0x5b984e){if(_0x5b984e){return _0x233a87['sendStatus'](_0x4180b7);}return _0x233a87[_0xb1f0('0x10')](_0x4180b7)[_0xb1f0('0x11')]();};}function respondWithResult(_0xbd11e5,_0x8e6e8){_0x8e6e8=_0x8e6e8||0xc8;return function(_0x2b248c){if(_0x2b248c){return _0xbd11e5[_0xb1f0('0x10')](_0x8e6e8)[_0xb1f0('0x12')](_0x2b248c);}};}function respondWithFilteredResult(_0x590ee8,_0x223208){return function(_0x5dedf4){if(_0x5dedf4){var _0x282ce4=typeof _0x223208[_0xb1f0('0x13')]===_0xb1f0('0x14')&&typeof _0x223208[_0xb1f0('0x15')]===_0xb1f0('0x14');var _0x5a6a1a=_0x5dedf4[_0xb1f0('0x16')];var _0x422b3b=_0x282ce4?0x0:_0x223208[_0xb1f0('0x13')];var _0xfa13c3=_0x282ce4?_0x5dedf4[_0xb1f0('0x16')]:_0x223208[_0xb1f0('0x13')]+_0x223208[_0xb1f0('0x15')];var _0x13a928;if(_0xfa13c3>=_0x5a6a1a){_0xfa13c3=_0x5a6a1a;_0x13a928=0xc8;}else{_0x13a928=0xce;}_0x590ee8[_0xb1f0('0x10')](_0x13a928);return _0x590ee8['set'](_0xb1f0('0x17'),_0x422b3b+'-'+_0xfa13c3+'/'+_0x5a6a1a)[_0xb1f0('0x12')](_0x5dedf4);}return null;};}function saveUpdates(_0xec7ba2){return function(_0x3cfe3c){if(_0x3cfe3c){return _0x3cfe3c['update'](_0xec7ba2)[_0xb1f0('0x18')](function(_0x3c7469){return _0x3c7469;});}return null;};}function removeEntity(_0x42eb75){return function(_0x1021ee){if(_0x1021ee){return _0x1021ee[_0xb1f0('0x19')]()[_0xb1f0('0x18')](function(){_0x42eb75[_0xb1f0('0x10')](0xcc)[_0xb1f0('0x11')]();});}};}function handleEntityNotFound(_0x9cd817){return function(_0x39cc70){if(!_0x39cc70){_0x9cd817[_0xb1f0('0x1a')](0x194);}return _0x39cc70;};}function handleError(_0x3bacab,_0x13882f){_0x13882f=_0x13882f||0x1f4;return function(_0x1068cb){logger[_0xb1f0('0x1b')](_0x1068cb['stack']);if(_0x1068cb[_0xb1f0('0x1c')]){delete _0x1068cb[_0xb1f0('0x1c')];}_0x3bacab['status'](_0x13882f)[_0xb1f0('0x1d')](_0x1068cb);};}exports[_0xb1f0('0x1e')]=function(_0x3ac22c,_0x50e492){var _0x296fd7={};var _0xa70278=_[_0xb1f0('0x1f')](db[_0xb1f0('0x20')][_0xb1f0('0x21')],function(_0x22335b){return{'name':_0x22335b['fieldName'],'type':_0x22335b['type'][_0xb1f0('0x22')]};});_0x296fd7=qs[_0xb1f0('0x23')](_0xa70278,_0x3ac22c);return interaction['findAll'](_0xb1f0('0x24'),_0x3ac22c[_0xb1f0('0x25')],_0x3ac22c[_0xb1f0('0x26')],_0x296fd7,_0xa70278)[_0xb1f0('0x18')](respondWithFilteredResult(_0x50e492,_0x296fd7))['catch'](handleError(_0x50e492,null));};exports[_0xb1f0('0x27')]=function(_0x535097,_0x487bf3){var _0x3cb157={};if(_0x535097['query'][_0xb1f0('0x28')]&&_0x535097[_0xb1f0('0x25')][_0xb1f0('0x28')]===_0xb1f0('0x29')){_0x3cb157[_0xb1f0('0x29')]=_0x535097[_0xb1f0('0x2a')]['id'];}else{_0x3cb157['id']=_0x535097[_0xb1f0('0x2a')]['id'];}var _0x3efaea={'raw':![],'where':_0x3cb157},_0x4cfca5={};_0x4cfca5['model']=_['keys'](db[_0xb1f0('0x20')][_0xb1f0('0x21')]);_0x4cfca5[_0xb1f0('0x25')]=_[_0xb1f0('0x2b')](_0x535097['query']);_0x4cfca5[_0xb1f0('0x2c')]=_[_0xb1f0('0x2d')](_0x4cfca5[_0xb1f0('0x2e')],_0x4cfca5['query']);_0x3efaea['attributes']=_[_0xb1f0('0x2d')](_0x4cfca5[_0xb1f0('0x2e')],qs[_0xb1f0('0x2f')](_0x535097['query'][_0xb1f0('0x2f')]));_0x3efaea['attributes']=_0x3efaea['attributes'][_0xb1f0('0x30')]?_0x3efaea[_0xb1f0('0x31')]:_0x4cfca5['model'];if(_0x535097[_0xb1f0('0x25')][_0xb1f0('0x32')]){_0x3efaea['include']=[{'all':!![]}];}_0x3efaea=_[_0xb1f0('0x33')]({},_0x3efaea,_0x535097[_0xb1f0('0x34')]);return db['OpenchannelInteraction'][_0xb1f0('0x35')](_0x3efaea)[_0xb1f0('0x18')](handleEntityNotFound(_0x487bf3,null))['then'](respondWithResult(_0x487bf3,null))[_0xb1f0('0x36')](handleError(_0x487bf3,null));};exports['create']=function(_0x21e839,_0x356243){return db['OpenchannelInteraction']['create'](_0x21e839[_0xb1f0('0x37')],{})[_0xb1f0('0x18')](respondWithResult(_0x356243,0xc9))[_0xb1f0('0x36')](handleError(_0x356243,null));};exports[_0xb1f0('0x38')]=function(_0x2b8261,_0x665c1e){if(_0x2b8261[_0xb1f0('0x37')]['id']){delete _0x2b8261[_0xb1f0('0x37')]['id'];}return db['OpenchannelInteraction'][_0xb1f0('0x35')]({'where':{'id':_0x2b8261['params']['id']}})[_0xb1f0('0x18')](handleEntityNotFound(_0x665c1e,null))[_0xb1f0('0x18')](saveUpdates(_0x2b8261[_0xb1f0('0x37')],null))[_0xb1f0('0x18')](respondWithResult(_0x665c1e,null))[_0xb1f0('0x36')](handleError(_0x665c1e,null));};exports[_0xb1f0('0x19')]=function(_0x3a6432,_0x22b419){return db[_0xb1f0('0x20')]['find']({'where':{'id':_0x3a6432[_0xb1f0('0x2a')]['id']}})[_0xb1f0('0x18')](handleEntityNotFound(_0x22b419,null))[_0xb1f0('0x18')](removeEntity(_0x22b419,null))[_0xb1f0('0x36')](handleError(_0x22b419,null));};exports[_0xb1f0('0x39')]=function(_0x29304d,_0x4872be){return db[_0xb1f0('0x20')]['describe']()[_0xb1f0('0x18')](respondWithResult(_0x4872be,null))['catch'](handleError(_0x4872be,null));};exports[_0xb1f0('0x3a')]=function(_0xd57e52,_0x3632e2){return db['OpenchannelMessage'][_0xb1f0('0x35')]({'where':{'id':_0xd57e52[_0xb1f0('0x2a')]['id']}})[_0xb1f0('0x18')](handleEntityNotFound(_0x3632e2,null))[_0xb1f0('0x18')](function(_0x10cbc7){if(_0x10cbc7){return _0x10cbc7[_0xb1f0('0x3a')](_0xd57e52['body'][_0xb1f0('0x3b')],_[_0xb1f0('0x3c')](_0xd57e52['body'],[_0xb1f0('0x3b'),'id'])||{});}})['then'](respondWithResult(_0x3632e2,null))[_0xb1f0('0x36')](handleError(_0x3632e2,null));};exports['getMessages']=function(_0xf3f06d,_0x1781aa){var _0x48d8bc={'raw':![],'where':{}};var _0x5194fe={};var _0x5cf29d={'count':0x0,'rows':[]};return db[_0xb1f0('0x20')]['findOne']({'where':{'id':_0xf3f06d[_0xb1f0('0x2a')]['id']}})[_0xb1f0('0x18')](handleEntityNotFound(_0x1781aa,null))[_0xb1f0('0x18')](function(_0x36cbfe){if(_0x36cbfe){_0x5194fe[_0xb1f0('0x2e')]=_[_0xb1f0('0x2b')](db[_0xb1f0('0x3d')]['rawAttributes']);_0x5194fe[_0xb1f0('0x25')]=_[_0xb1f0('0x2b')](_0xf3f06d[_0xb1f0('0x25')]);_0x5194fe[_0xb1f0('0x2c')]=_['intersection'](_0x5194fe[_0xb1f0('0x2e')],_0x5194fe[_0xb1f0('0x25')]);_0x48d8bc[_0xb1f0('0x31')]=_['intersection'](_0x5194fe[_0xb1f0('0x2e')],qs[_0xb1f0('0x2f')](_0xf3f06d[_0xb1f0('0x25')][_0xb1f0('0x2f')]));_0x48d8bc[_0xb1f0('0x31')]=_0x48d8bc[_0xb1f0('0x31')][_0xb1f0('0x30')]?_0x48d8bc[_0xb1f0('0x31')]:_0x5194fe[_0xb1f0('0x2e')];if(!_0xf3f06d[_0xb1f0('0x25')][_0xb1f0('0x3e')](_0xb1f0('0x3f'))){_0x48d8bc[_0xb1f0('0x15')]=qs[_0xb1f0('0x15')](_0xf3f06d['query'][_0xb1f0('0x15')]);_0x48d8bc[_0xb1f0('0x13')]=qs[_0xb1f0('0x13')](_0xf3f06d[_0xb1f0('0x25')][_0xb1f0('0x13')]);}_0x48d8bc[_0xb1f0('0x40')]=qs[_0xb1f0('0x41')](_0xf3f06d[_0xb1f0('0x25')][_0xb1f0('0x41')]);_0x48d8bc[_0xb1f0('0x42')]=qs[_0xb1f0('0x2c')](_[_0xb1f0('0x43')](_0xf3f06d[_0xb1f0('0x25')],_0x5194fe[_0xb1f0('0x2c')]));_0x48d8bc[_0xb1f0('0x42')][_0xb1f0('0x44')]=_0x36cbfe['id'];if(_0xf3f06d['query'][_0xb1f0('0x45')]){_0x48d8bc[_0xb1f0('0x42')]=_[_0xb1f0('0x33')](_0x48d8bc[_0xb1f0('0x42')],{'$or':_[_0xb1f0('0x1f')](_0x48d8bc['attributes'],function(_0x24b411){var _0x57f1d8={};_0x57f1d8[_0x24b411]={'$like':'%'+_0xf3f06d[_0xb1f0('0x25')][_0xb1f0('0x45')]+'%'};return _0x57f1d8;})});}if(_0xf3f06d[_0xb1f0('0x25')][_0xb1f0('0x46')]){var _0x3f27c4=_0xf3f06d['query'][_0xb1f0('0x46')][_0xb1f0('0x47')](',');var _0xcad636={};_0xcad636[_0x3f27c4[0x0]]={'$gte':moment(_0x3f27c4[0x1])[_0xb1f0('0x48')](_0xb1f0('0x49'))};_0x48d8bc[_0xb1f0('0x42')]=_[_0xb1f0('0x33')](_0x48d8bc[_0xb1f0('0x42')],_0xcad636);}_0x48d8bc=_[_0xb1f0('0x33')]({},_0x48d8bc,_0xf3f06d[_0xb1f0('0x34')]);return db[_0xb1f0('0x3d')][_0xb1f0('0x16')]({'where':_0x48d8bc[_0xb1f0('0x42')]})[_0xb1f0('0x18')](function(_0x304c25){_0x5cf29d[_0xb1f0('0x16')]=_0x304c25;if(_0xf3f06d['query'][_0xb1f0('0x32')]){_0x48d8bc['include']=[{'all':!![]}];}return db[_0xb1f0('0x3d')][_0xb1f0('0x4a')](_0x48d8bc);})[_0xb1f0('0x18')](function(_0x5df6da){_0x5cf29d['rows']=_0x5df6da;return _0x5cf29d;});}})[_0xb1f0('0x18')](respondWithFilteredResult(_0x1781aa,_0x48d8bc))['catch'](handleError(_0x1781aa,null));};exports[_0xb1f0('0x4b')]=function(_0x334ed1,_0x3c3198){return db[_0xb1f0('0x20')][_0xb1f0('0x35')]({'where':{'id':_0x334ed1[_0xb1f0('0x2a')]['id']}})[_0xb1f0('0x18')](handleEntityNotFound(_0x3c3198,null))[_0xb1f0('0x18')](function(_0x441ff3){if(_0x441ff3){return _0x441ff3[_0xb1f0('0x4c')](_0x334ed1['body'][_0xb1f0('0x3b')],_[_0xb1f0('0x3c')](_0x334ed1[_0xb1f0('0x37')],[_0xb1f0('0x3b'),'id'])||{})['spread'](function(){return db[_0xb1f0('0x4d')][_0xb1f0('0x4a')]({'attributes':['id',_0xb1f0('0x1c'),_0xb1f0('0x4e')],'where':{'id':_0x334ed1['body'][_0xb1f0('0x3b')]}});})['then'](function(_0x4f9ed4){socket[_0xb1f0('0x4f')](_0xb1f0('0x50'),{'id':Number(_0x334ed1[_0xb1f0('0x2a')]['id']),'tags':_0x4f9ed4||[]});return{'id':Number(_0x334ed1['params']['id']),'tags':_0x4f9ed4||[]};});}})['then'](respondWithResult(_0x3c3198,null))['catch'](handleError(_0x3c3198,null));};exports['removeTags']=function(_0x364bcd,_0x56886e){return db[_0xb1f0('0x20')]['find']({'where':{'id':_0x364bcd[_0xb1f0('0x2a')]['id']}})[_0xb1f0('0x18')](handleEntityNotFound(_0x56886e,null))['then'](function(_0x3ae491){if(_0x3ae491){return _0x3ae491[_0xb1f0('0x51')](_0x364bcd['query'][_0xb1f0('0x3b')]);}})[_0xb1f0('0x18')](respondWithStatusCode(_0x56886e,null))[_0xb1f0('0x36')](handleError(_0x56886e,null));};exports['download']=function(_0x3ec290,_0x40f202){var _0x186e1e=moment()[_0xb1f0('0x52')]()[_0xb1f0('0x53')]();var _0x24d133=path[_0xb1f0('0x54')](config['root'],_0xb1f0('0x55'),_0xb1f0('0x56'),_0xb1f0('0x57'));var _0x2031bf=path[_0xb1f0('0x54')](config[_0xb1f0('0x58')],_0xb1f0('0x55'),'files',_0xb1f0('0x59'));var _0x58447b=path[_0xb1f0('0x54')](_0x24d133,_0x186e1e);var _0x14fbec=util[_0xb1f0('0x48')](_0xb1f0('0x5a'),_0x3ec290['params']['id'],_0x186e1e);var _0x5cf4e4=path['join'](_0x24d133,_0x14fbec);var _0x5e3c6c=[];_0x5e3c6c['push']({'model':db['User'],'as':_0xb1f0('0x5b'),'attributes':['id',_0xb1f0('0x5c')],'raw':!![]});_0x5e3c6c[_0xb1f0('0x5d')]({'model':db[_0xb1f0('0x5e')],'as':_0xb1f0('0x5f'),'attributes':['id',_0xb1f0('0x60'),'lastName'],'raw':!![]});if(_0x3ec290[_0xb1f0('0x25')][_0xb1f0('0x59')]){_0x5e3c6c[_0xb1f0('0x5d')]({'model':db[_0xb1f0('0x61')],'as':_0xb1f0('0x61'),'raw':!![]});}var _0x29ab9f=[{'model':db[_0xb1f0('0x3d')],'as':_0xb1f0('0x62'),'attributes':['id',_0xb1f0('0x37'),'createdAt',_0xb1f0('0x63'),'secret',_0xb1f0('0x64')],'include':_0x5e3c6c}];_0x29ab9f['push']({'model':db[_0xb1f0('0x65')],'as':_0xb1f0('0x66'),'attributes':['id',_0xb1f0('0x1c')]});_0x29ab9f[_0xb1f0('0x5d')]({'model':db[_0xb1f0('0x5b')],'as':'Owner','attributes':['id',_0xb1f0('0x5c')]});return db[_0xb1f0('0x20')][_0xb1f0('0x35')]({'where':{'id':_0x3ec290[_0xb1f0('0x2a')]['id']},'include':_0x29ab9f})[_0xb1f0('0x18')](handleEntityNotFound(_0x40f202,null))[_0xb1f0('0x18')](function(_0x56e21f){if(_0x56e21f){var _0x1fc007=_0x56e21f[_0xb1f0('0x67')]({'plain':!![]});fs[_0xb1f0('0x68')](_0x58447b);var _0x3b863d={'channel':_0xb1f0('0x69'),'account':_0x1fc007[_0xb1f0('0x66')][_0xb1f0('0x1c')],'agent':_0x1fc007[_0xb1f0('0x6a')]?_0x1fc007[_0xb1f0('0x6a')]['fullname']:_0xb1f0('0x6b'),'createdAt':moment(_0x1fc007[_0xb1f0('0x6c')])[_0xb1f0('0x48')](_0xb1f0('0x49'))['toString'](),'closedAt':_0x1fc007[_0xb1f0('0x6d')]?moment(_0x1fc007[_0xb1f0('0x6e')])['format'](_0xb1f0('0x49'))[_0xb1f0('0x53')]():'','disposition':_0x1fc007['disposition'],'visibility':_0x1fc007[_0xb1f0('0x6f')]?_0xb1f0('0x70'):'Private','messages':_(_0x1fc007[_0xb1f0('0x62')])[_0xb1f0('0x45')]({'secret':![]})[_0xb1f0('0x1f')](function(_0x2b40f6){if(_0x2b40f6['Attachment']){var _0x5e8263=path[_0xb1f0('0x54')](_0x2031bf,_0x2b40f6[_0xb1f0('0x61')][_0xb1f0('0x71')]);if(fs[_0xb1f0('0x72')](_0x5e8263)){fs[_0xb1f0('0x73')](_0x5e8263)[_0xb1f0('0x74')](fs[_0xb1f0('0x75')](path[_0xb1f0('0x54')](_0x58447b,_0x2b40f6[_0xb1f0('0x61')]['basename'])));}}return{'date':moment(_0x2b40f6['createdAt'])[_0xb1f0('0x48')](_0xb1f0('0x49'))[_0xb1f0('0x53')](),'sender':_0x2b40f6['direction']===_0xb1f0('0x76')?_0x2b40f6[_0xb1f0('0x5b')]?_0x2b40f6[_0xb1f0('0x5b')][_0xb1f0('0x5c')]:'System':_0x2b40f6[_0xb1f0('0x5f')][_0xb1f0('0x60')]+(_0x2b40f6[_0xb1f0('0x5f')]['lastName']?'\x20'+_0x2b40f6['Contact']['lastName']:''),'body':_0x2b40f6['Attachment']?_0x2b40f6['Attachment']['basename']:_0x2b40f6[_0xb1f0('0x37')],'direction':_0x2b40f6[_0xb1f0('0x63')]===_0xb1f0('0x76')?'A':'C','secret':_0x2b40f6[_0xb1f0('0x77')],'read':_0x2b40f6[_0xb1f0('0x64')],'attachment':_0x2b40f6[_0xb1f0('0x61')]};})[_0xb1f0('0x78')]()};return ejs['renderFile'](path['join'](config[_0xb1f0('0x58')],_0xb1f0('0x55'),'views',_0xb1f0('0x79')),{'interaction':_0x3b863d})[_0xb1f0('0x18')](function(_0x355aab){var _0x32811a=path[_0xb1f0('0x54')](_0x58447b,_0xb1f0('0x7a')+_0x1fc007['id']+'-'+_0x186e1e+_0xb1f0('0x7b'));var _0x373e84={'path':_0x32811a,'channel':_0xb1f0('0x69'),'interactionId':_0x1fc007['id']};return pdf['createPdfFromHTML'](_0x355aab,_0x373e84);})['then'](function(){return new Promise(function(_0x2ca58a,_0x3548b4){zipdir(_0x58447b,{'saveTo':_0x5cf4e4},function(_0x5318f4,_0x425dbb){if(_0x5318f4)return _0x3548b4(_0x5318f4);return _0x2ca58a(_0x425dbb);});})[_0xb1f0('0x18')](function(){return new Promise(function(_0x3c6339,_0x49cb67){rimraf(_0x58447b,function(_0x4d4ba1){if(_0x4d4ba1)_0x49cb67(_0x4d4ba1);return _0x3c6339();});});})[_0xb1f0('0x18')](function(){return _0x40f202[_0xb1f0('0x7c')](_0x5cf4e4,_0x14fbec,function(_0x3a8d77){if(_0x3a8d77){logger[_0xb1f0('0x1b')]('Unable\x20to\x20delete\x20zip\x20file',_0x3a8d77);}else{fs['unlinkSync'](_0x5cf4e4);}});});});}else{return _0x40f202[_0xb1f0('0x1a')](0xc8);}})['catch'](handleError(_0x40f202,null));};
\ No newline at end of file
+var _0xd11f=['index','map','OpenchannelInteraction','rawAttributes','fieldName','getOptions','findAll','openchannel','user','catch','show','query','type','from','params','keys','intersection','model','fields','attributes','length','includeAll','merge','options','find','create','body','describe','addMessage','ids','getMessages','OpenchannelMessage','filters','nolimit','order','sort','where','pick','OpenchannelInteractionId','filter','$gte','split','format','include','rows','addTags','setTags','spread','Tag','color','removeTags','download','root','server','files','tmp','join','attachments','transcript-%d-%s.zip','push','User','fullname','CmContact','Contact','firstName','lastName','Attachment','Messages','createdAt','direction','secret','read','OpenchannelAccount','Account','get','mkdirSync','Openchannel','Owner','N.A.','YYYY-MM-DD\x20HH:mm:ss','toString','disposition','threadId','Public','Private','existsSync','createReadStream','pipe','createWriteStream','basename','out','System','renderFile','views','downloadInteraction.ejs','transcript-','createPdfFromHTML','Unable\x20to\x20delete\x20zip\x20file','unlinkSync','sendStatus','zip-dir','moment','path','ejs','../../components/interaction/service','../../components/parsers/qs','../../components/export/pdf','../../config/logger','../../config/environment','../../mysqldb','redis','localhost','register','status','undefined','limit','offset','count','set','Content-Range','json','update','then','destroy','end','error','stack','name','send'];(function(_0x326c79,_0x3c202a){var _0x52412e=function(_0x488689){while(--_0x488689){_0x326c79['push'](_0x326c79['shift']());}};_0x52412e(++_0x3c202a);}(_0xd11f,0x1e7));var _0xfd11=function(_0x25b24a,_0x1c0163){_0x25b24a=_0x25b24a-0x0;var _0x224e68=_0xd11f[_0x25b24a];return _0x224e68;};'use strict';var rimraf=require('rimraf');var zipdir=require(_0xfd11('0x0'));var moment=require(_0xfd11('0x1'));var util=require('util');var path=require(_0xfd11('0x2'));var ejs=require(_0xfd11('0x3'));var fs=require('fs');var _=require('lodash');var Redis=require('ioredis');var interaction=require(_0xfd11('0x4'));var qs=require(_0xfd11('0x5'));var pdf=require(_0xfd11('0x6'));var logger=require(_0xfd11('0x7'))('api');var config=require(_0xfd11('0x8'));var db=require(_0xfd11('0x9'))['db'];config[_0xfd11('0xa')]=_['defaults'](config[_0xfd11('0xa')],{'host':_0xfd11('0xb'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xfd11('0xa')]));require('./openchannelInteraction.socket')[_0xfd11('0xc')](socket);function respondWithStatusCode(_0x5c18db,_0x56d364){_0x56d364=_0x56d364||0xcc;return function(_0x13a853){if(_0x13a853){return _0x5c18db['sendStatus'](_0x56d364);}return _0x5c18db['status'](_0x56d364)['end']();};}function respondWithResult(_0x19ba6b,_0x245a75){_0x245a75=_0x245a75||0xc8;return function(_0x2293e3){if(_0x2293e3){return _0x19ba6b[_0xfd11('0xd')](_0x245a75)['json'](_0x2293e3);}};}function respondWithFilteredResult(_0x828f3b,_0x3f0fe0){return function(_0x5488b6){if(_0x5488b6){var _0x33b261=typeof _0x3f0fe0['offset']===_0xfd11('0xe')&&typeof _0x3f0fe0[_0xfd11('0xf')]===_0xfd11('0xe');var _0x2cd8e8=_0x5488b6['count'];var _0x14a953=_0x33b261?0x0:_0x3f0fe0[_0xfd11('0x10')];var _0x5154c1=_0x33b261?_0x5488b6[_0xfd11('0x11')]:_0x3f0fe0[_0xfd11('0x10')]+_0x3f0fe0[_0xfd11('0xf')];var _0x1e80e9;if(_0x5154c1>=_0x2cd8e8){_0x5154c1=_0x2cd8e8;_0x1e80e9=0xc8;}else{_0x1e80e9=0xce;}_0x828f3b[_0xfd11('0xd')](_0x1e80e9);return _0x828f3b[_0xfd11('0x12')](_0xfd11('0x13'),_0x14a953+'-'+_0x5154c1+'/'+_0x2cd8e8)[_0xfd11('0x14')](_0x5488b6);}return null;};}function saveUpdates(_0x4821eb){return function(_0x542078){if(_0x542078){return _0x542078[_0xfd11('0x15')](_0x4821eb)[_0xfd11('0x16')](function(_0x2cd2e6){return _0x2cd2e6;});}return null;};}function removeEntity(_0x3eb578){return function(_0x40ae91){if(_0x40ae91){return _0x40ae91[_0xfd11('0x17')]()[_0xfd11('0x16')](function(){_0x3eb578['status'](0xcc)[_0xfd11('0x18')]();});}};}function handleEntityNotFound(_0x40d2d0){return function(_0x5a5818){if(!_0x5a5818){_0x40d2d0['sendStatus'](0x194);}return _0x5a5818;};}function handleError(_0x1b4d95,_0x5806db){_0x5806db=_0x5806db||0x1f4;return function(_0x17e8d2){logger[_0xfd11('0x19')](_0x17e8d2[_0xfd11('0x1a')]);if(_0x17e8d2[_0xfd11('0x1b')]){delete _0x17e8d2[_0xfd11('0x1b')];}_0x1b4d95[_0xfd11('0xd')](_0x5806db)[_0xfd11('0x1c')](_0x17e8d2);};}exports[_0xfd11('0x1d')]=function(_0x3a663f,_0x192b94){var _0x2883c5={};var _0xd4880c=_[_0xfd11('0x1e')](db[_0xfd11('0x1f')][_0xfd11('0x20')],function(_0x1237a8){return{'name':_0x1237a8[_0xfd11('0x21')],'type':_0x1237a8['type']['key']};});_0x2883c5=qs[_0xfd11('0x22')](_0xd4880c,_0x3a663f);return interaction[_0xfd11('0x23')](_0xfd11('0x24'),_0x3a663f['query'],_0x3a663f[_0xfd11('0x25')],_0x2883c5,_0xd4880c)[_0xfd11('0x16')](respondWithFilteredResult(_0x192b94,_0x2883c5))[_0xfd11('0x26')](handleError(_0x192b94,null));};exports[_0xfd11('0x27')]=function(_0x14ad91,_0x4a289d){var _0x4f5bfb={};if(_0x14ad91[_0xfd11('0x28')][_0xfd11('0x29')]&&_0x14ad91[_0xfd11('0x28')][_0xfd11('0x29')]==='from'){_0x4f5bfb[_0xfd11('0x2a')]=_0x14ad91[_0xfd11('0x2b')]['id'];}else{_0x4f5bfb['id']=_0x14ad91[_0xfd11('0x2b')]['id'];}var _0x2b72a9={'raw':![],'where':_0x4f5bfb},_0x598610={};_0x598610['model']=_[_0xfd11('0x2c')](db['OpenchannelInteraction']['rawAttributes']);_0x598610[_0xfd11('0x28')]=_[_0xfd11('0x2c')](_0x14ad91[_0xfd11('0x28')]);_0x598610['filters']=_[_0xfd11('0x2d')](_0x598610[_0xfd11('0x2e')],_0x598610[_0xfd11('0x28')]);_0x2b72a9['attributes']=_[_0xfd11('0x2d')](_0x598610['model'],qs[_0xfd11('0x2f')](_0x14ad91['query'][_0xfd11('0x2f')]));_0x2b72a9['attributes']=_0x2b72a9[_0xfd11('0x30')][_0xfd11('0x31')]?_0x2b72a9[_0xfd11('0x30')]:_0x598610[_0xfd11('0x2e')];if(_0x14ad91[_0xfd11('0x28')][_0xfd11('0x32')]){_0x2b72a9['include']=[{'all':!![]}];}_0x2b72a9=_[_0xfd11('0x33')]({},_0x2b72a9,_0x14ad91[_0xfd11('0x34')]);return db[_0xfd11('0x1f')][_0xfd11('0x35')](_0x2b72a9)[_0xfd11('0x16')](handleEntityNotFound(_0x4a289d,null))[_0xfd11('0x16')](respondWithResult(_0x4a289d,null))[_0xfd11('0x26')](handleError(_0x4a289d,null));};exports[_0xfd11('0x36')]=function(_0x52b380,_0x463d95){return db[_0xfd11('0x1f')][_0xfd11('0x36')](_0x52b380['body'],{})[_0xfd11('0x16')](respondWithResult(_0x463d95,0xc9))[_0xfd11('0x26')](handleError(_0x463d95,null));};exports[_0xfd11('0x15')]=function(_0x4c6941,_0x4c2445){if(_0x4c6941[_0xfd11('0x37')]['id']){delete _0x4c6941[_0xfd11('0x37')]['id'];}return db[_0xfd11('0x1f')][_0xfd11('0x35')]({'where':{'id':_0x4c6941['params']['id']}})['then'](handleEntityNotFound(_0x4c2445,null))['then'](saveUpdates(_0x4c6941[_0xfd11('0x37')],null))[_0xfd11('0x16')](respondWithResult(_0x4c2445,null))[_0xfd11('0x26')](handleError(_0x4c2445,null));};exports['destroy']=function(_0x36178f,_0x3b3864){return db['OpenchannelInteraction'][_0xfd11('0x35')]({'where':{'id':_0x36178f[_0xfd11('0x2b')]['id']}})[_0xfd11('0x16')](handleEntityNotFound(_0x3b3864,null))['then'](removeEntity(_0x3b3864,null))[_0xfd11('0x26')](handleError(_0x3b3864,null));};exports['describe']=function(_0x3f83bc,_0x212dc8){return db['OpenchannelInteraction'][_0xfd11('0x38')]()['then'](respondWithResult(_0x212dc8,null))['catch'](handleError(_0x212dc8,null));};exports[_0xfd11('0x39')]=function(_0x23cb46,_0x432e4b){return db['OpenchannelMessage'][_0xfd11('0x35')]({'where':{'id':_0x23cb46[_0xfd11('0x2b')]['id']}})[_0xfd11('0x16')](handleEntityNotFound(_0x432e4b,null))[_0xfd11('0x16')](function(_0x348400){if(_0x348400){return _0x348400[_0xfd11('0x39')](_0x23cb46['body'][_0xfd11('0x3a')],_['omit'](_0x23cb46[_0xfd11('0x37')],[_0xfd11('0x3a'),'id'])||{});}})['then'](respondWithResult(_0x432e4b,null))[_0xfd11('0x26')](handleError(_0x432e4b,null));};exports[_0xfd11('0x3b')]=function(_0x29b78c,_0x3d4fdc){var _0x31ca0f={'raw':![],'where':{}};var _0x345476={};var _0xb66663={'count':0x0,'rows':[]};return db[_0xfd11('0x1f')]['findOne']({'where':{'id':_0x29b78c[_0xfd11('0x2b')]['id']}})[_0xfd11('0x16')](handleEntityNotFound(_0x3d4fdc,null))[_0xfd11('0x16')](function(_0x65beec){if(_0x65beec){_0x345476['model']=_[_0xfd11('0x2c')](db[_0xfd11('0x3c')][_0xfd11('0x20')]);_0x345476['query']=_['keys'](_0x29b78c[_0xfd11('0x28')]);_0x345476[_0xfd11('0x3d')]=_[_0xfd11('0x2d')](_0x345476['model'],_0x345476[_0xfd11('0x28')]);_0x31ca0f['attributes']=_[_0xfd11('0x2d')](_0x345476[_0xfd11('0x2e')],qs['fields'](_0x29b78c[_0xfd11('0x28')][_0xfd11('0x2f')]));_0x31ca0f[_0xfd11('0x30')]=_0x31ca0f[_0xfd11('0x30')][_0xfd11('0x31')]?_0x31ca0f['attributes']:_0x345476[_0xfd11('0x2e')];if(!_0x29b78c[_0xfd11('0x28')]['hasOwnProperty'](_0xfd11('0x3e'))){_0x31ca0f['limit']=qs[_0xfd11('0xf')](_0x29b78c['query'][_0xfd11('0xf')]);_0x31ca0f[_0xfd11('0x10')]=qs[_0xfd11('0x10')](_0x29b78c['query'][_0xfd11('0x10')]);}_0x31ca0f[_0xfd11('0x3f')]=qs[_0xfd11('0x40')](_0x29b78c[_0xfd11('0x28')][_0xfd11('0x40')]);_0x31ca0f[_0xfd11('0x41')]=qs[_0xfd11('0x3d')](_[_0xfd11('0x42')](_0x29b78c[_0xfd11('0x28')],_0x345476[_0xfd11('0x3d')]));_0x31ca0f[_0xfd11('0x41')][_0xfd11('0x43')]=_0x65beec['id'];if(_0x29b78c['query'][_0xfd11('0x44')]){_0x31ca0f[_0xfd11('0x41')]=_['merge'](_0x31ca0f[_0xfd11('0x41')],{'$or':_[_0xfd11('0x1e')](_0x31ca0f['attributes'],function(_0x5e54e3){var _0x496ff9={};_0x496ff9[_0x5e54e3]={'$like':'%'+_0x29b78c[_0xfd11('0x28')][_0xfd11('0x44')]+'%'};return _0x496ff9;})});}if(_0x29b78c[_0xfd11('0x28')][_0xfd11('0x45')]){var _0x234217=_0x29b78c[_0xfd11('0x28')][_0xfd11('0x45')][_0xfd11('0x46')](',');var _0x297e2c={};_0x297e2c[_0x234217[0x0]]={'$gte':moment(_0x234217[0x1])[_0xfd11('0x47')]('YYYY-MM-DD\x20HH:mm:ss')};_0x31ca0f[_0xfd11('0x41')]=_[_0xfd11('0x33')](_0x31ca0f['where'],_0x297e2c);}_0x31ca0f=_[_0xfd11('0x33')]({},_0x31ca0f,_0x29b78c[_0xfd11('0x34')]);return db[_0xfd11('0x3c')]['count']({'where':_0x31ca0f[_0xfd11('0x41')]})[_0xfd11('0x16')](function(_0x241e10){_0xb66663[_0xfd11('0x11')]=_0x241e10;if(_0x29b78c[_0xfd11('0x28')][_0xfd11('0x32')]){_0x31ca0f[_0xfd11('0x48')]=[{'all':!![]}];}return db[_0xfd11('0x3c')][_0xfd11('0x23')](_0x31ca0f);})[_0xfd11('0x16')](function(_0x1823dc){_0xb66663[_0xfd11('0x49')]=_0x1823dc;return _0xb66663;});}})[_0xfd11('0x16')](respondWithFilteredResult(_0x3d4fdc,_0x31ca0f))['catch'](handleError(_0x3d4fdc,null));};exports[_0xfd11('0x4a')]=function(_0x1505fb,_0x56ae44){return db[_0xfd11('0x1f')]['find']({'where':{'id':_0x1505fb['params']['id']}})[_0xfd11('0x16')](handleEntityNotFound(_0x56ae44,null))['then'](function(_0xae2dfc){if(_0xae2dfc){return _0xae2dfc[_0xfd11('0x4b')](_0x1505fb[_0xfd11('0x37')][_0xfd11('0x3a')],_['omit'](_0x1505fb[_0xfd11('0x37')],[_0xfd11('0x3a'),'id'])||{})[_0xfd11('0x4c')](function(){return db[_0xfd11('0x4d')][_0xfd11('0x23')]({'attributes':['id','name',_0xfd11('0x4e')],'where':{'id':_0x1505fb['body'][_0xfd11('0x3a')]}});})[_0xfd11('0x16')](function(_0x205a49){socket['emit']('openchannelInteractionTags:save',{'id':Number(_0x1505fb[_0xfd11('0x2b')]['id']),'tags':_0x205a49||[]});return{'id':Number(_0x1505fb[_0xfd11('0x2b')]['id']),'tags':_0x205a49||[]};});}})[_0xfd11('0x16')](respondWithResult(_0x56ae44,null))[_0xfd11('0x26')](handleError(_0x56ae44,null));};exports['removeTags']=function(_0x3b9884,_0x54b847){return db[_0xfd11('0x1f')][_0xfd11('0x35')]({'where':{'id':_0x3b9884[_0xfd11('0x2b')]['id']}})[_0xfd11('0x16')](handleEntityNotFound(_0x54b847,null))[_0xfd11('0x16')](function(_0x4e0f77){if(_0x4e0f77){return _0x4e0f77[_0xfd11('0x4f')](_0x3b9884[_0xfd11('0x28')]['ids']);}})[_0xfd11('0x16')](respondWithStatusCode(_0x54b847,null))[_0xfd11('0x26')](handleError(_0x54b847,null));};exports[_0xfd11('0x50')]=function(_0x5492d0,_0x28c782){var _0x2c7fb9=moment()['unix']()['toString']();var _0x9b5ba0=path['join'](config[_0xfd11('0x51')],_0xfd11('0x52'),_0xfd11('0x53'),_0xfd11('0x54'));var _0x534f44=path[_0xfd11('0x55')](config['root'],_0xfd11('0x52'),_0xfd11('0x53'),_0xfd11('0x56'));var _0x3b7de9=path[_0xfd11('0x55')](_0x9b5ba0,_0x2c7fb9);var _0xc56cae=util[_0xfd11('0x47')](_0xfd11('0x57'),_0x5492d0['params']['id'],_0x2c7fb9);var _0x22ff21=path[_0xfd11('0x55')](_0x9b5ba0,_0xc56cae);var _0x5b7f3b=[];_0x5b7f3b[_0xfd11('0x58')]({'model':db['User'],'as':_0xfd11('0x59'),'attributes':['id',_0xfd11('0x5a')],'raw':!![]});_0x5b7f3b[_0xfd11('0x58')]({'model':db[_0xfd11('0x5b')],'as':_0xfd11('0x5c'),'attributes':['id',_0xfd11('0x5d'),_0xfd11('0x5e')],'raw':!![]});if(_0x5492d0[_0xfd11('0x28')]['attachments']){_0x5b7f3b[_0xfd11('0x58')]({'model':db['Attachment'],'as':_0xfd11('0x5f'),'raw':!![]});}var _0x25de8f=[{'model':db[_0xfd11('0x3c')],'as':_0xfd11('0x60'),'attributes':['id',_0xfd11('0x37'),_0xfd11('0x61'),_0xfd11('0x62'),_0xfd11('0x63'),_0xfd11('0x64')],'include':_0x5b7f3b}];_0x25de8f[_0xfd11('0x58')]({'model':db[_0xfd11('0x65')],'as':_0xfd11('0x66'),'attributes':['id',_0xfd11('0x1b')]});_0x25de8f[_0xfd11('0x58')]({'model':db[_0xfd11('0x59')],'as':'Owner','attributes':['id','fullname']});return db[_0xfd11('0x1f')][_0xfd11('0x35')]({'where':{'id':_0x5492d0[_0xfd11('0x2b')]['id']},'include':_0x25de8f})[_0xfd11('0x16')](handleEntityNotFound(_0x28c782,null))[_0xfd11('0x16')](function(_0x5d993c){if(_0x5d993c){var _0x514474=_0x5d993c[_0xfd11('0x67')]({'plain':!![]});fs[_0xfd11('0x68')](_0x3b7de9);var _0x595cfb={'channel':_0xfd11('0x69'),'account':_0x514474[_0xfd11('0x66')][_0xfd11('0x1b')],'agent':_0x514474[_0xfd11('0x6a')]?_0x514474[_0xfd11('0x6a')][_0xfd11('0x5a')]:_0xfd11('0x6b'),'createdAt':moment(_0x514474[_0xfd11('0x61')])[_0xfd11('0x47')](_0xfd11('0x6c'))[_0xfd11('0x6d')](),'closedAt':_0x514474['closed']?moment(_0x514474['closedAt'])[_0xfd11('0x47')](_0xfd11('0x6c'))[_0xfd11('0x6d')]():'','disposition':_0x514474[_0xfd11('0x6e')],'visibility':_0x514474[_0xfd11('0x6f')]?_0xfd11('0x70'):_0xfd11('0x71'),'messages':_(_0x514474[_0xfd11('0x60')])[_0xfd11('0x44')]({'secret':![]})[_0xfd11('0x1e')](function(_0x51332f){if(_0x51332f[_0xfd11('0x5f')]){var _0x4b56da=path['join'](_0x534f44,_0x51332f[_0xfd11('0x5f')]['basename']);if(fs[_0xfd11('0x72')](_0x4b56da)){fs[_0xfd11('0x73')](_0x4b56da)[_0xfd11('0x74')](fs[_0xfd11('0x75')](path['join'](_0x3b7de9,_0x51332f['Attachment'][_0xfd11('0x76')])));}}return{'date':moment(_0x51332f['createdAt'])[_0xfd11('0x47')](_0xfd11('0x6c'))[_0xfd11('0x6d')](),'sender':_0x51332f['direction']===_0xfd11('0x77')?_0x51332f[_0xfd11('0x59')]?_0x51332f[_0xfd11('0x59')]['fullname']:_0xfd11('0x78'):_0x51332f[_0xfd11('0x5c')]['firstName']+(_0x51332f['Contact'][_0xfd11('0x5e')]?'\x20'+_0x51332f[_0xfd11('0x5c')]['lastName']:''),'body':_0x51332f[_0xfd11('0x5f')]?_0x51332f[_0xfd11('0x5f')]['basename']:_0x51332f[_0xfd11('0x37')],'direction':_0x51332f['direction']==='out'?'A':'C','secret':_0x51332f[_0xfd11('0x63')],'read':_0x51332f['read'],'attachment':_0x51332f[_0xfd11('0x5f')]};})['value']()};return ejs[_0xfd11('0x79')](path['join'](config[_0xfd11('0x51')],_0xfd11('0x52'),_0xfd11('0x7a'),_0xfd11('0x7b')),{'interaction':_0x595cfb})[_0xfd11('0x16')](function(_0x2d6930){var _0x175ab4=path[_0xfd11('0x55')](_0x3b7de9,_0xfd11('0x7c')+_0x514474['id']+'-'+_0x2c7fb9+'.pdf');var _0x330cca={'path':_0x175ab4,'channel':'Openchannel','interactionId':_0x514474['id']};return pdf[_0xfd11('0x7d')](_0x2d6930,_0x330cca);})[_0xfd11('0x16')](function(){return new Promise(function(_0x406efd,_0x3e1b94){zipdir(_0x3b7de9,{'saveTo':_0x22ff21},function(_0x44cea8,_0x57f129){if(_0x44cea8)return _0x3e1b94(_0x44cea8);return _0x406efd(_0x57f129);});})[_0xfd11('0x16')](function(){return new Promise(function(_0xea4e26,_0x113839){rimraf(_0x3b7de9,function(_0x201c10){if(_0x201c10)_0x113839(_0x201c10);return _0xea4e26();});});})['then'](function(){return _0x28c782['download'](_0x22ff21,_0xc56cae,function(_0x4d40dc){if(_0x4d40dc){logger[_0xfd11('0x19')](_0xfd11('0x7e'),_0x4d40dc);}else{fs[_0xfd11('0x7f')](_0x22ff21);}});});});}else{return _0x28c782[_0xfd11('0x80')](0xc8);}})[_0xfd11('0x26')](handleError(_0x28c782,null));};
\ No newline at end of file
index d84c2b4..3eb38a2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3f2b=['Users','map','findAll','unreadMessages','length','emit','catch','hasOwnProperty','hook','exports','events','../../mysqldb','OpenchannelMessage','save','update','getUsers','then','setDataValue'];(function(_0x24cc72,_0x4dc73a){var _0xd49f1e=function(_0x39f581){while(--_0x39f581){_0x24cc72['push'](_0x24cc72['shift']());}};_0xd49f1e(++_0x4dc73a);}(_0x3f2b,0x64));var _0xb3f2=function(_0x4208c4,_0x4fa88e){_0x4208c4=_0x4208c4-0x0;var _0x31457c=_0x3f2b[_0x4208c4];return _0x31457c;};'use strict';var EventEmitter=require(_0xb3f2('0x0'));var OpenchannelInteraction=require(_0xb3f2('0x1'))['db']['OpenchannelInteraction'];var OpenchannelMessage=require(_0xb3f2('0x1'))['db'][_0xb3f2('0x2')];var OpenchannelInteractionEvents=new EventEmitter();OpenchannelInteractionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xb3f2('0x3'),'afterUpdate':_0xb3f2('0x4'),'afterDestroy':'remove'};function emitEvent(_0x21693d){return function(_0x26de8c,_0x58967d,_0x25987b){_0x26de8c[_0xb3f2('0x5')]({'attributes':['id'],'raw':!![]})[_0xb3f2('0x6')](function(_0x26f05e){_0x26de8c[_0xb3f2('0x7')](_0xb3f2('0x8'),_0x26f05e[_0xb3f2('0x9')](function(_0x31eb2d){return{'id':_0x31eb2d['id']};}));return OpenchannelMessage[_0xb3f2('0xa')]({'where':{'OpenchannelInteractionId':_0x26de8c['id'],'direction':'in','read':![]},'raw':!![]});})[_0xb3f2('0x6')](function(_0x2369db){_0x26de8c[_0xb3f2('0x7')](_0xb3f2('0xb'),_0x2369db[_0xb3f2('0xc')]);OpenchannelInteractionEvents[_0xb3f2('0xd')](_0x21693d+':'+_0x26de8c['id'],_0x26de8c);OpenchannelInteractionEvents['emit'](_0x21693d,_0x26de8c);_0x25987b(null);})[_0xb3f2('0xe')](_0x25987b(null));};}for(var e in events){if(events[_0xb3f2('0xf')](e)){var event=events[e];OpenchannelInteraction[_0xb3f2('0x10')](e,emitEvent(event));}}module[_0xb3f2('0x11')]=OpenchannelInteractionEvents;
\ No newline at end of file
+var _0x38e5=['OpenchannelMessage','setMaxListeners','save','remove','getUsers','then','setDataValue','map','emit','catch','hasOwnProperty','exports','events','../../mysqldb'];(function(_0x219d87,_0x1cb6f7){var _0x22823d=function(_0x5357bf){while(--_0x5357bf){_0x219d87['push'](_0x219d87['shift']());}};_0x22823d(++_0x1cb6f7);}(_0x38e5,0x14e));var _0x538e=function(_0x563f7a,_0x47170c){_0x563f7a=_0x563f7a-0x0;var _0x25930e=_0x38e5[_0x563f7a];return _0x25930e;};'use strict';var EventEmitter=require(_0x538e('0x0'));var OpenchannelInteraction=require(_0x538e('0x1'))['db']['OpenchannelInteraction'];var OpenchannelMessage=require(_0x538e('0x1'))['db'][_0x538e('0x2')];var OpenchannelInteractionEvents=new EventEmitter();OpenchannelInteractionEvents[_0x538e('0x3')](0x0);var events={'afterCreate':_0x538e('0x4'),'afterUpdate':'update','afterDestroy':_0x538e('0x5')};function emitEvent(_0x46c190){return function(_0x20d6f4,_0x1b6d87,_0x228cb7){_0x20d6f4[_0x538e('0x6')]({'attributes':['id'],'raw':!![]})[_0x538e('0x7')](function(_0x2c8556){_0x20d6f4[_0x538e('0x8')]('Users',_0x2c8556[_0x538e('0x9')](function(_0x20f339){return{'id':_0x20f339['id']};}));return OpenchannelMessage['findAll']({'where':{'OpenchannelInteractionId':_0x20d6f4['id'],'direction':'in','read':![]},'raw':!![]});})[_0x538e('0x7')](function(_0x429f36){_0x20d6f4['setDataValue']('unreadMessages',_0x429f36['length']);OpenchannelInteractionEvents[_0x538e('0xa')](_0x46c190+':'+_0x20d6f4['id'],_0x20d6f4);OpenchannelInteractionEvents[_0x538e('0xa')](_0x46c190,_0x20d6f4);_0x228cb7(null);})[_0x538e('0xb')](_0x228cb7(null));};}for(var e in events){if(events[_0x538e('0xc')](e)){var event=events[e];OpenchannelInteraction['hook'](e,emitEvent(event));}}module[_0x538e('0xd')]=OpenchannelInteractionEvents;
\ No newline at end of file
index a9b7bdf..ffc8194 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0309=['utf8mb4_unicode_ci','changed','closed','closedAt','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./openchannelInteraction.attributes','define','openchannel_interactions'];(function(_0x47568e,_0x5ccdaf){var _0x33815b=function(_0x56b026){while(--_0x56b026){_0x47568e['push'](_0x47568e['shift']());}};_0x33815b(++_0x5ccdaf);}(_0x0309,0x165));var _0x9030=function(_0x33d2be,_0x4e11c0){_0x33d2be=_0x33d2be-0x0;var _0x5ddb9b=_0x0309[_0x33d2be];return _0x5ddb9b;};'use strict';var _=require(_0x9030('0x0'));var util=require('util');var logger=require(_0x9030('0x1'))('api');var moment=require(_0x9030('0x2'));var BPromise=require(_0x9030('0x3'));var rp=require(_0x9030('0x4'));var fs=require('fs');var path=require(_0x9030('0x5'));var rimraf=require(_0x9030('0x6'));var config=require(_0x9030('0x7'));var attributes=require(_0x9030('0x8'));module['exports']=function(_0x5a3334,_0x1c9c7b){return _0x5a3334[_0x9030('0x9')]('OpenchannelInteraction',attributes,{'tableName':_0x9030('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':_0x9030('0xb'),'hooks':{'beforeUpdate':function(_0x32d47d,_0x289add,_0x5711b4){if(_0x32d47d[_0x9030('0xc')](_0x9030('0xd'))){_0x32d47d[_0x9030('0xe')]=moment()['format'](_0x9030('0xf'));}_0x5711b4(null,_0x32d47d);}}});};
\ No newline at end of file
+var _0x2c12=['path','../../config/environment','./openchannelInteraction.attributes','exports','define','OpenchannelInteraction','utf8mb4','changed','closed','closedAt','format','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0xbbf68e,_0x39b9b4){var _0x26363c=function(_0xf637ae){while(--_0xf637ae){_0xbbf68e['push'](_0xbbf68e['shift']());}};_0x26363c(++_0x39b9b4);}(_0x2c12,0x1bb));var _0x22c1=function(_0x2e4cbf,_0x8763d3){_0x2e4cbf=_0x2e4cbf-0x0;var _0x52840f=_0x2c12[_0x2e4cbf];return _0x52840f;};'use strict';var _=require(_0x22c1('0x0'));var util=require(_0x22c1('0x1'));var logger=require(_0x22c1('0x2'))(_0x22c1('0x3'));var moment=require(_0x22c1('0x4'));var BPromise=require(_0x22c1('0x5'));var rp=require(_0x22c1('0x6'));var fs=require('fs');var path=require(_0x22c1('0x7'));var rimraf=require('rimraf');var config=require(_0x22c1('0x8'));var attributes=require(_0x22c1('0x9'));module[_0x22c1('0xa')]=function(_0x4d137f,_0x3e9d43){return _0x4d137f[_0x22c1('0xb')](_0x22c1('0xc'),attributes,{'tableName':'openchannel_interactions','paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x22c1('0xd'),'collate':'utf8mb4_unicode_ci','hooks':{'beforeUpdate':function(_0xa91abd,_0x402002,_0x31ed9c){if(_0xa91abd[_0x22c1('0xe')](_0x22c1('0xf'))){_0xa91abd[_0x22c1('0x10')]=moment()[_0x22c1('0x11')]('YYYY-MM-DD\x20HH:mm:ss');}_0x31ed9c(null,_0xa91abd);}}});};
\ No newline at end of file
index 4bcc989..7c1dbb9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xafa7=['limit','catch','find','ids','omit','spread','AddTags','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','client','redis','localhost','socket.io-emitter','./openchannelInteraction.socket','request','then','info','OpenchannelInteraction,\x20%s,\x20%s','debug','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','UpdateOpenchannelInteraction','OpenchannelInteraction','update','body','options','where','attributes'];(function(_0x4435c2,_0x3c12f2){var _0x160402=function(_0x45e34b){while(--_0x45e34b){_0x4435c2['push'](_0x4435c2['shift']());}};_0x160402(++_0x3c12f2);}(_0xafa7,0x126));var _0x7afa=function(_0xb8cfbe,_0x2e81b6){_0xb8cfbe=_0xb8cfbe-0x0;var _0x227d51=_0xafa7[_0xb8cfbe];return _0x227d51;};'use strict';var _=require(_0x7afa('0x0'));var util=require(_0x7afa('0x1'));var moment=require(_0x7afa('0x2'));var BPromise=require(_0x7afa('0x3'));var rs=require(_0x7afa('0x4'));var fs=require('fs');var Redis=require(_0x7afa('0x5'));var db=require(_0x7afa('0x6'))['db'];var utils=require(_0x7afa('0x7'));var logger=require(_0x7afa('0x8'))(_0x7afa('0x9'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x7afa('0xa')]['http']({'port':0x232a});config[_0x7afa('0xb')]=_['defaults'](config[_0x7afa('0xb')],{'host':_0x7afa('0xc'),'port':0x18eb});var socket=require(_0x7afa('0xd'))(new Redis(config[_0x7afa('0xb')]));require(_0x7afa('0xe'))['register'](socket);function respondWithRpcPromise(_0x454b95,_0x1c3206,_0x58a8ad){return new BPromise(function(_0x5e2530,_0x53fd0a){return client[_0x7afa('0xf')](_0x454b95,_0x58a8ad)[_0x7afa('0x10')](function(_0x6b0ac5){logger[_0x7afa('0x11')](_0x7afa('0x12'),_0x1c3206,'request\x20sent');logger[_0x7afa('0x13')](_0x7afa('0x14'),_0x1c3206,_0x7afa('0x15'),JSON[_0x7afa('0x16')](_0x6b0ac5));if(_0x6b0ac5['error']){if(_0x6b0ac5[_0x7afa('0x17')][_0x7afa('0x18')]===0x1f4){logger[_0x7afa('0x17')](_0x7afa('0x12'),_0x1c3206,_0x6b0ac5[_0x7afa('0x17')]['message']);return _0x53fd0a(_0x6b0ac5[_0x7afa('0x17')][_0x7afa('0x19')]);}logger[_0x7afa('0x17')](_0x7afa('0x12'),_0x1c3206,_0x6b0ac5[_0x7afa('0x17')]['message']);return _0x5e2530(_0x6b0ac5['error'][_0x7afa('0x19')]);}else{logger['info']('OpenchannelInteraction,\x20%s,\x20%s',_0x1c3206,_0x7afa('0x15'));_0x5e2530(_0x6b0ac5[_0x7afa('0x1a')]['message']);}})['catch'](function(_0xb78f14){logger[_0x7afa('0x17')](_0x7afa('0x12'),_0x1c3206,_0xb78f14);_0x53fd0a(_0xb78f14);});});}exports[_0x7afa('0x1b')]=function(_0x2eeb41){var _0x31237e=this;return new Promise(function(_0x1b0ee9,_0x2be454){return db[_0x7afa('0x1c')][_0x7afa('0x1d')](_0x2eeb41[_0x7afa('0x1e')],{'raw':_0x2eeb41[_0x7afa('0x1f')]?_0x2eeb41[_0x7afa('0x1f')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2eeb41['options']?_0x2eeb41[_0x7afa('0x1f')][_0x7afa('0x20')]||null:null,'attributes':_0x2eeb41[_0x7afa('0x1f')]?_0x2eeb41[_0x7afa('0x1f')][_0x7afa('0x21')]||null:null,'limit':_0x2eeb41[_0x7afa('0x1f')]?_0x2eeb41[_0x7afa('0x1f')][_0x7afa('0x22')]||null:null})[_0x7afa('0x10')](function(_0x13e4f5){logger[_0x7afa('0x11')]('UpdateOpenchannelInteraction',_0x2eeb41);logger['debug'](_0x7afa('0x1b'),_0x2eeb41,JSON[_0x7afa('0x16')](_0x13e4f5));_0x1b0ee9(_0x13e4f5);})[_0x7afa('0x23')](function(_0x4eadee){logger['error'](_0x7afa('0x1b'),_0x4eadee[_0x7afa('0x19')],_0x2eeb41);_0x2be454(_0x31237e['error'](0x1f4,_0x4eadee[_0x7afa('0x19')]));});});};exports['AddTagsToOpenchannelInteraction']=function(_0x576f91){return new Promise(function(_0x20ec14,_0x1f5c45){return db[_0x7afa('0x1c')][_0x7afa('0x24')]({'where':_0x576f91[_0x7afa('0x1f')]?_0x576f91[_0x7afa('0x1f')][_0x7afa('0x20')]||null:null})[_0x7afa('0x10')](function(_0x5871ec){if(_0x5871ec){return _0x5871ec['addTags'](_0x576f91[_0x7afa('0x1e')][_0x7afa('0x25')],_[_0x7afa('0x26')](_0x576f91[_0x7afa('0x1e')],[_0x7afa('0x25'),'id'])||{});}})[_0x7afa('0x27')](function(_0x2fcec3){logger['info'](_0x7afa('0x28'),_0x576f91);logger[_0x7afa('0x13')]('AddTags',_0x576f91,JSON['stringify'](_0x2fcec3));_0x20ec14(_0x2fcec3);})[_0x7afa('0x23')](function(_0x2b1a40){logger[_0x7afa('0x17')]('AddTags',_0x2b1a40[_0x7afa('0x19')],_0x576f91);_0x1f5c45(_this['error'](0x1f4,_0x2b1a40[_0x7afa('0x19')]));});});};
\ No newline at end of file
+var _0x2ed4=['result','catch','UpdateOpenchannelInteraction','OpenchannelInteraction','update','body','options','where','attributes','limit','AddTagsToOpenchannelInteraction','find','then','addTags','ids','omit','spread','AddTags','debug','lodash','util','moment','bluebird','ioredis','../../config/utils','rpc','../../config/environment','client','http','defaults','redis','localhost','socket.io-emitter','./openchannelInteraction.socket','register','info','OpenchannelInteraction,\x20%s,\x20%s','OpenchannelInteraction,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message'];(function(_0x5be23c,_0x287809){var _0x329fc7=function(_0x2d2d07){while(--_0x2d2d07){_0x5be23c['push'](_0x5be23c['shift']());}};_0x329fc7(++_0x287809);}(_0x2ed4,0x115));var _0x42ed=function(_0x4d8a8f,_0x2afd4c){_0x4d8a8f=_0x4d8a8f-0x0;var _0xfc4adc=_0x2ed4[_0x4d8a8f];return _0xfc4adc;};'use strict';var _=require(_0x42ed('0x0'));var util=require(_0x42ed('0x1'));var moment=require(_0x42ed('0x2'));var BPromise=require(_0x42ed('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x42ed('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x42ed('0x5'));var logger=require('../../config/logger')(_0x42ed('0x6'));var config=require(_0x42ed('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x42ed('0x8')][_0x42ed('0x9')]({'port':0x232a});config['redis']=_[_0x42ed('0xa')](config[_0x42ed('0xb')],{'host':_0x42ed('0xc'),'port':0x18eb});var socket=require(_0x42ed('0xd'))(new Redis(config[_0x42ed('0xb')]));require(_0x42ed('0xe'))[_0x42ed('0xf')](socket);function respondWithRpcPromise(_0x17d059,_0x170d70,_0x107bd2){return new BPromise(function(_0x518364,_0x22809b){return client['request'](_0x17d059,_0x107bd2)['then'](function(_0x226484){logger[_0x42ed('0x10')](_0x42ed('0x11'),_0x170d70,'request\x20sent');logger['debug'](_0x42ed('0x12'),_0x170d70,_0x42ed('0x13'),JSON[_0x42ed('0x14')](_0x226484));if(_0x226484[_0x42ed('0x15')]){if(_0x226484[_0x42ed('0x15')][_0x42ed('0x16')]===0x1f4){logger[_0x42ed('0x15')](_0x42ed('0x11'),_0x170d70,_0x226484[_0x42ed('0x15')][_0x42ed('0x17')]);return _0x22809b(_0x226484['error'][_0x42ed('0x17')]);}logger[_0x42ed('0x15')](_0x42ed('0x11'),_0x170d70,_0x226484[_0x42ed('0x15')]['message']);return _0x518364(_0x226484[_0x42ed('0x15')][_0x42ed('0x17')]);}else{logger[_0x42ed('0x10')](_0x42ed('0x11'),_0x170d70,_0x42ed('0x13'));_0x518364(_0x226484[_0x42ed('0x18')][_0x42ed('0x17')]);}})[_0x42ed('0x19')](function(_0xe4cd55){logger[_0x42ed('0x15')](_0x42ed('0x11'),_0x170d70,_0xe4cd55);_0x22809b(_0xe4cd55);});});}exports[_0x42ed('0x1a')]=function(_0x4e82f8){var _0x134c9f=this;return new Promise(function(_0x49e106,_0x433300){return db[_0x42ed('0x1b')][_0x42ed('0x1c')](_0x4e82f8[_0x42ed('0x1d')],{'raw':_0x4e82f8[_0x42ed('0x1e')]?_0x4e82f8[_0x42ed('0x1e')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x4e82f8[_0x42ed('0x1e')]?_0x4e82f8['options'][_0x42ed('0x1f')]||null:null,'attributes':_0x4e82f8[_0x42ed('0x1e')]?_0x4e82f8[_0x42ed('0x1e')][_0x42ed('0x20')]||null:null,'limit':_0x4e82f8[_0x42ed('0x1e')]?_0x4e82f8[_0x42ed('0x1e')][_0x42ed('0x21')]||null:null})['then'](function(_0x4df914){logger['info'](_0x42ed('0x1a'),_0x4e82f8);logger['debug'](_0x42ed('0x1a'),_0x4e82f8,JSON['stringify'](_0x4df914));_0x49e106(_0x4df914);})[_0x42ed('0x19')](function(_0x1386e9){logger[_0x42ed('0x15')](_0x42ed('0x1a'),_0x1386e9[_0x42ed('0x17')],_0x4e82f8);_0x433300(_0x134c9f[_0x42ed('0x15')](0x1f4,_0x1386e9['message']));});});};exports[_0x42ed('0x22')]=function(_0x3a6a92){return new Promise(function(_0x393e73,_0xe3ed29){return db['OpenchannelInteraction'][_0x42ed('0x23')]({'where':_0x3a6a92[_0x42ed('0x1e')]?_0x3a6a92[_0x42ed('0x1e')]['where']||null:null})[_0x42ed('0x24')](function(_0x286488){if(_0x286488){return _0x286488[_0x42ed('0x25')](_0x3a6a92[_0x42ed('0x1d')][_0x42ed('0x26')],_[_0x42ed('0x27')](_0x3a6a92[_0x42ed('0x1d')],[_0x42ed('0x26'),'id'])||{});}})[_0x42ed('0x28')](function(_0x44135d){logger['info'](_0x42ed('0x29'),_0x3a6a92);logger[_0x42ed('0x2a')](_0x42ed('0x29'),_0x3a6a92,JSON[_0x42ed('0x14')](_0x44135d));_0x393e73(_0x44135d);})[_0x42ed('0x19')](function(_0x126915){logger[_0x42ed('0x15')](_0x42ed('0x29'),_0x126915[_0x42ed('0x17')],_0x3a6a92);_0xe3ed29(_this[_0x42ed('0x15')](0x1f4,_0x126915[_0x42ed('0x17')]));});});};
\ No newline at end of file
index 0a6667a..dd0d3e4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf237=['openchannelInteraction:','save','remove','update','emit','removeListener','register','length'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0xf237,0x1d9));var _0x7f23=function(_0x23456d,_0x3a0fbd){_0x23456d=_0x23456d-0x0;var _0x3b9517=_0xf237[_0x23456d];return _0x3b9517;};'use strict';var OpenchannelInteractionEvents=require('./openchannelInteraction.events');var events=[_0x7f23('0x0'),_0x7f23('0x1'),_0x7f23('0x2')];function createListener(_0x24e545,_0x3806d9){return function(_0x9a69ef){_0x3806d9[_0x7f23('0x3')](_0x24e545,_0x9a69ef);};}function removeListener(_0x28fc86,_0x1825d0){return function(){OpenchannelInteractionEvents[_0x7f23('0x4')](_0x28fc86,_0x1825d0);};}exports[_0x7f23('0x5')]=function(_0x171675){for(var _0x2c3001=0x0,_0x2bf21c=events[_0x7f23('0x6')];_0x2c3001<_0x2bf21c;_0x2c3001++){var _0x22d4e2=events[_0x2c3001];var _0x166184=createListener(_0x7f23('0x7')+_0x22d4e2,_0x171675);OpenchannelInteractionEvents['on'](_0x22d4e2,_0x166184);}};
\ No newline at end of file
+var _0x7279=['removeListener','register','length','openchannelInteraction:','./openchannelInteraction.events','save','remove','update'];(function(_0xcca49b,_0x377ee8){var _0x2ad172=function(_0x33e6e2){while(--_0x33e6e2){_0xcca49b['push'](_0xcca49b['shift']());}};_0x2ad172(++_0x377ee8);}(_0x7279,0x18c));var _0x9727=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x7279[_0x3dd15e];return _0x231fd0;};'use strict';var OpenchannelInteractionEvents=require(_0x9727('0x0'));var events=[_0x9727('0x1'),_0x9727('0x2'),_0x9727('0x3')];function createListener(_0x4f7fba,_0x1c60ce){return function(_0x51084f){_0x1c60ce['emit'](_0x4f7fba,_0x51084f);};}function removeListener(_0x59a2b9,_0x3b9376){return function(){OpenchannelInteractionEvents[_0x9727('0x4')](_0x59a2b9,_0x3b9376);};}exports[_0x9727('0x5')]=function(_0x5566dc){for(var _0x20c621=0x0,_0x4f0ec4=events[_0x9727('0x6')];_0x20c621<_0x4f0ec4;_0x20c621++){var _0x10156d=events[_0x20c621];var _0x3f877a=createListener(_0x9727('0x7')+_0x10156d,_0x5566dc);OpenchannelInteractionEvents['on'](_0x10156d,_0x3f877a);}};
\ No newline at end of file
index 1245e89..fa92d02 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcb91=['openchannelmessage:create','put','update','/:id/reject','reject','destroy','exports','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./openchannelMessage.controller','get','index','isAuthenticated','describe','/:id','post','tracked','openchannel'];(function(_0x1da46b,_0x109ac4){var _0x3a94ef=function(_0x31a2b4){while(--_0x31a2b4){_0x1da46b['push'](_0x1da46b['shift']());}};_0x3a94ef(++_0x109ac4);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x26b5ff,_0x92009a){_0x26b5ff=_0x26b5ff-0x0;var _0x58603e=_0xcb91[_0x26b5ff];return _0x58603e;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x1cb9('0x0'));var timeout=require(_0x1cb9('0x1'));var express=require(_0x1cb9('0x2'));var router=express[_0x1cb9('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x1cb9('0x4'));var interaction=require(_0x1cb9('0x5'));var config=require('../../config/environment');var controller=require(_0x1cb9('0x6'));router[_0x1cb9('0x7')]('/',auth['isAuthenticated'](),controller[_0x1cb9('0x8')]);router[_0x1cb9('0x7')]('/describe',auth[_0x1cb9('0x9')](),controller[_0x1cb9('0xa')]);router['get'](_0x1cb9('0xb'),auth['isAuthenticated'](),controller['show']);router[_0x1cb9('0xc')]('/',auth[_0x1cb9('0x9')](),interaction[_0x1cb9('0xd')](_0x1cb9('0xe'),_0x1cb9('0xf')),controller['create']);router[_0x1cb9('0x10')](_0x1cb9('0xb'),auth[_0x1cb9('0x9')](),controller[_0x1cb9('0x11')]);router[_0x1cb9('0x10')]('/:id/accept',auth['isAuthenticated'](),controller['accept']);router[_0x1cb9('0x10')](_0x1cb9('0x12'),auth[_0x1cb9('0x9')](),controller[_0x1cb9('0x13')]);router['delete'](_0x1cb9('0xb'),auth[_0x1cb9('0x9')](),controller[_0x1cb9('0x14')]);module[_0x1cb9('0x15')]=router;
\ No newline at end of file
+var _0x0713=['get','isAuthenticated','index','/describe','describe','/:id','post','tracked','openchannel','openchannelmessage:create','put','update','accept','/:id/reject','delete','destroy','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./openchannelMessage.controller'];(function(_0x465a0c,_0x19d4d5){var _0x1e202e=function(_0x27bd8a){while(--_0x27bd8a){_0x465a0c['push'](_0x465a0c['shift']());}};_0x1e202e(++_0x19d4d5);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3071('0x0'));var timeout=require(_0x3071('0x1'));var express=require(_0x3071('0x2'));var router=express[_0x3071('0x3')]();var fs_extra=require(_0x3071('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));var controller=require(_0x3071('0x7'));router[_0x3071('0x8')]('/',auth[_0x3071('0x9')](),controller[_0x3071('0xa')]);router[_0x3071('0x8')](_0x3071('0xb'),auth[_0x3071('0x9')](),controller[_0x3071('0xc')]);router[_0x3071('0x8')](_0x3071('0xd'),auth[_0x3071('0x9')](),controller['show']);router[_0x3071('0xe')]('/',auth[_0x3071('0x9')](),interaction[_0x3071('0xf')](_0x3071('0x10'),_0x3071('0x11')),controller['create']);router[_0x3071('0x12')](_0x3071('0xd'),auth[_0x3071('0x9')](),controller[_0x3071('0x13')]);router[_0x3071('0x12')]('/:id/accept',auth['isAuthenticated'](),controller[_0x3071('0x14')]);router['put'](_0x3071('0x15'),auth[_0x3071('0x9')](),controller['reject']);router[_0x3071('0x16')]('/:id',auth[_0x3071('0x9')](),controller[_0x3071('0x17')]);module[_0x3071('0x18')]=router;
\ No newline at end of file
index 7588a20..b8a758d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x676c=['out','DATE','sequelize','exports','TEXT','BOOLEAN','ENUM'];(function(_0x1732a4,_0x596d24){var _0x4687de=function(_0x363e01){while(--_0x363e01){_0x1732a4['push'](_0x1732a4['shift']());}};_0x4687de(++_0x596d24);}(_0x676c,0x198));var _0xc676=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x676c[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0xc676('0x0'));module[_0xc676('0x1')]={'body':{'type':Sequelize[_0xc676('0x2')]('medium'),'allowNull':![]},'read':{'type':Sequelize[_0xc676('0x3')],'defaultValue':![]},'secret':{'type':Sequelize[_0xc676('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0xc676('0x4')]('in',_0xc676('0x5')),'defaultValue':_0xc676('0x5'),'allowNull':![]},'readAt':{'type':Sequelize[_0xc676('0x6')]},'providerName':{'type':Sequelize['STRING']},'providerResponse':{'type':Sequelize[_0xc676('0x2')]}};
\ No newline at end of file
+var _0x81cb=['DATE','TEXT','sequelize','exports','medium','BOOLEAN','ENUM','out'];(function(_0x359e6c,_0x125100){var _0x310428=function(_0x5e7f1a){while(--_0x5e7f1a){_0x359e6c['push'](_0x359e6c['shift']());}};_0x310428(++_0x125100);}(_0x81cb,0xaa));var _0xb81c=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x81cb[_0x14add3];return _0x4a174f;};'use strict';var Sequelize=require(_0xb81c('0x0'));module[_0xb81c('0x1')]={'body':{'type':Sequelize['TEXT'](_0xb81c('0x2')),'allowNull':![]},'read':{'type':Sequelize[_0xb81c('0x3')],'defaultValue':![]},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize[_0xb81c('0x4')]('in',_0xb81c('0x5')),'defaultValue':_0xb81c('0x5'),'allowNull':![]},'readAt':{'type':Sequelize[_0xb81c('0x6')]},'providerName':{'type':Sequelize['STRING']},'providerResponse':{'type':Sequelize[_0xb81c('0x7')]}};
\ No newline at end of file
index 002cfc9..b3d12fb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1bc3=['fullname','manual','interface','channel','event','EventManager','acceptmessage','[OPENCHANNELMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','rejectMessage','ContactId','sequelize','SELECT','internal','SIP/%s','rejectmessage','eml-format','rimraf','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','socket.io-emitter','./openchannelMessage.socket','jayson/promise','http','client','then','info','OpenchannelMessage,\x20%s,\x20%s','request\x20sent','debug','OpenchannelMessage,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','sendStatus','status','end','json','undefined','limit','offset','set','Content-Range','apply','reject','save','stack','name','send','index','rawAttributes','fieldName','model','map','query','keys','filters','intersection','attributes','length','sort','where','filter','merge','type','VIRTUAL','options','OpenchannelMessage','count','includeAll','findAll','rows','show','params','fields','find','create','body','update','describe','openchannel-interactions','accept','openchannel','read','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','OpenchannelInteraction','OpenchannelInteractionId','isNil','format','interaction','get','[OPENCHANNELMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','null','acceptMessage','Sequelize','QueryTypes','contact','User'];(function(_0x2a0c5c,_0x2cf076){var _0x3cc675=function(_0x4f6779){while(--_0x4f6779){_0x2a0c5c['push'](_0x2a0c5c['shift']());}};_0x3cc675(++_0x2cf076);}(_0x1bc3,0x8d));var _0x31bc=function(_0x4536e8,_0x51ce7a){_0x4536e8=_0x4536e8-0x0;var _0x59a52f=_0x1bc3[_0x4536e8];return _0x59a52f;};'use strict';var emlformat=require(_0x31bc('0x0'));var rimraf=require(_0x31bc('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x31bc('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x31bc('0x3'));var Mustache=require(_0x31bc('0x4'));var util=require(_0x31bc('0x5'));var path=require(_0x31bc('0x6'));var sox=require(_0x31bc('0x7'));var csv=require(_0x31bc('0x8'));var ejs=require(_0x31bc('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x31bc('0xa'));var squel=require(_0x31bc('0xb'));var crypto=require(_0x31bc('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x31bc('0xd'));var toCsv=require(_0x31bc('0x8'));var querystring=require(_0x31bc('0xe'));var Papa=require(_0x31bc('0xf'));var Redis=require('ioredis');var authService=require(_0x31bc('0x10'));var qs=require(_0x31bc('0x11'));var as=require(_0x31bc('0x12'));var hardwareService=require(_0x31bc('0x13'));var logger=require(_0x31bc('0x14'))(_0x31bc('0x15'));var utils=require(_0x31bc('0x16'));var config=require(_0x31bc('0x17'));var licenseUtil=require(_0x31bc('0x18'));var db=require(_0x31bc('0x19'))['db'];config[_0x31bc('0x1a')]=_[_0x31bc('0x1b')](config[_0x31bc('0x1a')],{'host':'localhost','port':0x18eb});var socket=require(_0x31bc('0x1c'))(new Redis(config[_0x31bc('0x1a')]));require(_0x31bc('0x1d'))['register'](socket);var jayson=require(_0x31bc('0x1e'));var client=jayson['client'][_0x31bc('0x1f')]({'port':0x232c});var client9002=jayson[_0x31bc('0x20')][_0x31bc('0x1f')]({'port':0x232a});function respondWithRpcPromise(_0x2cc21b,_0x2bc0da,_0x3e4df7,_0x5b438a){return new BPromise(function(_0x12bf57,_0x2c47b5){var _0x1fedbc=_0x5b438a||client;return _0x1fedbc['request'](_0x2cc21b,_0x3e4df7)[_0x31bc('0x21')](function(_0x4d7603){logger[_0x31bc('0x22')](_0x31bc('0x23'),_0x2bc0da,_0x31bc('0x24'));logger[_0x31bc('0x25')](_0x31bc('0x26'),_0x2bc0da,_0x31bc('0x24'),JSON[_0x31bc('0x27')](_0x4d7603));if(_0x4d7603['error']){if(_0x4d7603[_0x31bc('0x28')]['code']===0x1f4){logger['error'](_0x31bc('0x23'),_0x2bc0da,_0x4d7603['error']['message']);return _0x2c47b5(_0x4d7603[_0x31bc('0x28')][_0x31bc('0x29')]);}logger['error'](_0x31bc('0x23'),_0x2bc0da,_0x4d7603[_0x31bc('0x28')][_0x31bc('0x29')]);return _0x12bf57(_0x4d7603[_0x31bc('0x28')][_0x31bc('0x29')]);}else{logger[_0x31bc('0x22')](_0x31bc('0x23'),_0x2bc0da,'request\x20sent');_0x12bf57(_0x4d7603[_0x31bc('0x2a')]['message']);}})[_0x31bc('0x2b')](function(_0x4c64e1){logger[_0x31bc('0x28')](_0x31bc('0x23'),_0x2bc0da,_0x4c64e1);_0x2c47b5(_0x4c64e1);});});}function respondWithStatusCode(_0x5141aa,_0x27f519){_0x27f519=_0x27f519||0xcc;return function(_0xe4b21f){if(_0xe4b21f){return _0x5141aa[_0x31bc('0x2c')](_0x27f519);}return _0x5141aa[_0x31bc('0x2d')](_0x27f519)[_0x31bc('0x2e')]();};}function respondWithResult(_0x148a48,_0x532410){_0x532410=_0x532410||0xc8;return function(_0x280652){if(_0x280652){return _0x148a48[_0x31bc('0x2d')](_0x532410)[_0x31bc('0x2f')](_0x280652);}};}function respondWithFilteredResult(_0x3c8b40,_0x136c5b){return function(_0x5cc57c){if(_0x5cc57c){var _0x9e31f5=typeof _0x136c5b['offset']===_0x31bc('0x30')&&typeof _0x136c5b[_0x31bc('0x31')]==='undefined';var _0x33f963=_0x5cc57c['count'];var _0x2bb539=_0x9e31f5?0x0:_0x136c5b[_0x31bc('0x32')];var _0x4e9c78=_0x9e31f5?_0x5cc57c['count']:_0x136c5b[_0x31bc('0x32')]+_0x136c5b[_0x31bc('0x31')];var _0x250bc9;if(_0x4e9c78>=_0x33f963){_0x4e9c78=_0x33f963;_0x250bc9=0xc8;}else{_0x250bc9=0xce;}_0x3c8b40['status'](_0x250bc9);return _0x3c8b40[_0x31bc('0x33')](_0x31bc('0x34'),_0x2bb539+'-'+_0x4e9c78+'/'+_0x33f963)[_0x31bc('0x2f')](_0x5cc57c);}return null;};}function patchUpdates(_0x35fe6c){return function(_0x523f1c){try{jsonpatch[_0x31bc('0x35')](_0x523f1c,_0x35fe6c,!![]);}catch(_0x31586c){return BPromise[_0x31bc('0x36')](_0x31586c);}return _0x523f1c[_0x31bc('0x37')]();};}function saveUpdates(_0x37ba17,_0x1df46f){return function(_0x266fb7){if(_0x266fb7){return _0x266fb7['update'](_0x37ba17)[_0x31bc('0x21')](function(_0x3816da){return _0x3816da;});}return null;};}function removeEntity(_0x2359da,_0x2744c0){return function(_0x9247d8){if(_0x9247d8){return _0x9247d8['destroy']()['then'](function(){_0x2359da[_0x31bc('0x2d')](0xcc)[_0x31bc('0x2e')]();});}};}function handleEntityNotFound(_0x5162bf,_0x4353c2){return function(_0x478f5c){if(!_0x478f5c){_0x5162bf['sendStatus'](0x194);}return _0x478f5c;};}function handleError(_0x14e402,_0x5b2728){_0x5b2728=_0x5b2728||0x1f4;return function(_0x4e4d5e){logger[_0x31bc('0x28')](_0x4e4d5e[_0x31bc('0x38')]);if(_0x4e4d5e[_0x31bc('0x39')]){delete _0x4e4d5e[_0x31bc('0x39')];}_0x14e402['status'](_0x5b2728)[_0x31bc('0x3a')](_0x4e4d5e);};}exports[_0x31bc('0x3b')]=function(_0x51383a,_0x6f423){var _0x465fba={},_0x4cbc39={},_0x2df7f9={'count':0x0,'rows':[]};var _0x18f613=_['map'](db['OpenchannelMessage'][_0x31bc('0x3c')],function(_0x20df36){return{'name':_0x20df36[_0x31bc('0x3d')],'type':_0x20df36['type']['key']};});_0x4cbc39[_0x31bc('0x3e')]=_[_0x31bc('0x3f')](_0x18f613,_0x31bc('0x39'));_0x4cbc39[_0x31bc('0x40')]=_[_0x31bc('0x41')](_0x51383a[_0x31bc('0x40')]);_0x4cbc39[_0x31bc('0x42')]=_[_0x31bc('0x43')](_0x4cbc39[_0x31bc('0x3e')],_0x4cbc39[_0x31bc('0x40')]);_0x465fba[_0x31bc('0x44')]=_[_0x31bc('0x43')](_0x4cbc39[_0x31bc('0x3e')],qs['fields'](_0x51383a['query']['fields']));_0x465fba[_0x31bc('0x44')]=_0x465fba['attributes'][_0x31bc('0x45')]?_0x465fba[_0x31bc('0x44')]:_0x4cbc39[_0x31bc('0x3e')];if(!_0x51383a[_0x31bc('0x40')]['hasOwnProperty']('nolimit')){_0x465fba[_0x31bc('0x31')]=qs[_0x31bc('0x31')](_0x51383a[_0x31bc('0x40')][_0x31bc('0x31')]);_0x465fba['offset']=qs[_0x31bc('0x32')](_0x51383a[_0x31bc('0x40')][_0x31bc('0x32')]);}_0x465fba['order']=qs[_0x31bc('0x46')](_0x51383a[_0x31bc('0x40')]['sort']);_0x465fba[_0x31bc('0x47')]=qs[_0x31bc('0x42')](_['pick'](_0x51383a['query'],_0x4cbc39[_0x31bc('0x42')]),_0x18f613);if(_0x51383a['query'][_0x31bc('0x48')]){_0x465fba[_0x31bc('0x47')]=_[_0x31bc('0x49')](_0x465fba['where'],{'$or':_['map'](_0x18f613,function(_0x25e4fa){if(_0x25e4fa[_0x31bc('0x4a')]!==_0x31bc('0x4b')){var _0x533cfa={};_0x533cfa[_0x25e4fa[_0x31bc('0x39')]]={'$like':'%'+_0x51383a[_0x31bc('0x40')]['filter']+'%'};return _0x533cfa;}})});}_0x465fba=_[_0x31bc('0x49')]({},_0x465fba,_0x51383a[_0x31bc('0x4c')]);var _0x568b8b={'where':_0x465fba[_0x31bc('0x47')]};return db[_0x31bc('0x4d')][_0x31bc('0x4e')](_0x568b8b)['then'](function(_0x47734d){_0x2df7f9[_0x31bc('0x4e')]=_0x47734d;if(_0x51383a[_0x31bc('0x40')][_0x31bc('0x4f')]){_0x465fba['include']=[{'all':!![]}];}return db[_0x31bc('0x4d')][_0x31bc('0x50')](_0x465fba);})[_0x31bc('0x21')](function(_0x408077){_0x2df7f9[_0x31bc('0x51')]=_0x408077;return _0x2df7f9;})['then'](respondWithFilteredResult(_0x6f423,_0x465fba))['catch'](handleError(_0x6f423,null));};exports[_0x31bc('0x52')]=function(_0x2f9359,_0x234f19){var _0xc991fd={'raw':!![],'where':{'id':_0x2f9359[_0x31bc('0x53')]['id']}},_0x395a7c={};_0x395a7c[_0x31bc('0x3e')]=_[_0x31bc('0x41')](db[_0x31bc('0x4d')]['rawAttributes']);_0x395a7c['query']=_['keys'](_0x2f9359[_0x31bc('0x40')]);_0x395a7c[_0x31bc('0x42')]=_[_0x31bc('0x43')](_0x395a7c[_0x31bc('0x3e')],_0x395a7c[_0x31bc('0x40')]);_0xc991fd[_0x31bc('0x44')]=_[_0x31bc('0x43')](_0x395a7c[_0x31bc('0x3e')],qs[_0x31bc('0x54')](_0x2f9359[_0x31bc('0x40')]['fields']));_0xc991fd['attributes']=_0xc991fd['attributes'][_0x31bc('0x45')]?_0xc991fd[_0x31bc('0x44')]:_0x395a7c[_0x31bc('0x3e')];if(_0x2f9359[_0x31bc('0x40')]['includeAll']){_0xc991fd['include']=[{'all':!![]}];}_0xc991fd=_[_0x31bc('0x49')]({},_0xc991fd,_0x2f9359['options']);return db[_0x31bc('0x4d')][_0x31bc('0x55')](_0xc991fd)[_0x31bc('0x21')](handleEntityNotFound(_0x234f19,null))[_0x31bc('0x21')](respondWithResult(_0x234f19,null))['catch'](handleError(_0x234f19,null));};exports['create']=function(_0x3e2d31,_0x4a9d12){return db[_0x31bc('0x4d')][_0x31bc('0x56')](_0x3e2d31[_0x31bc('0x57')],{})['then'](respondWithResult(_0x4a9d12,0xc9))[_0x31bc('0x2b')](handleError(_0x4a9d12,null));};exports[_0x31bc('0x58')]=function(_0x5f188b,_0xfb9646){if(_0x5f188b[_0x31bc('0x57')]['id']){delete _0x5f188b[_0x31bc('0x57')]['id'];}return db['OpenchannelMessage']['find']({'where':{'id':_0x5f188b['params']['id']}})[_0x31bc('0x21')](handleEntityNotFound(_0xfb9646,null))['then'](saveUpdates(_0x5f188b[_0x31bc('0x57')],null))[_0x31bc('0x21')](respondWithResult(_0xfb9646,null))['catch'](handleError(_0xfb9646,null));};exports['destroy']=function(_0x6ec8fb,_0x29e70f){return db[_0x31bc('0x4d')][_0x31bc('0x55')]({'where':{'id':_0x6ec8fb[_0x31bc('0x53')]['id']}})[_0x31bc('0x21')](handleEntityNotFound(_0x29e70f,null))[_0x31bc('0x21')](removeEntity(_0x29e70f,null))[_0x31bc('0x2b')](handleError(_0x29e70f,null));};exports[_0x31bc('0x59')]=function(_0x28b548,_0x1db1a8){return db['OpenchannelMessage']['describe']()[_0x31bc('0x21')](respondWithResult(_0x1db1a8,null))[_0x31bc('0x2b')](handleError(_0x1db1a8,null));};var interaction_log=require(_0x31bc('0x14'))(_0x31bc('0x5a'));exports[_0x31bc('0x5b')]=function(_0x5c848c,_0x1281bb,_0x16a5f6){var _0xc9d97b={'agent':{},'channel':_0x31bc('0x5c')};if(_0x5c848c[_0x31bc('0x57')]['id']){delete _0x5c848c[_0x31bc('0x57')]['id'];}_0x5c848c['body'][_0x31bc('0x5d')]=!![];_0x5c848c[_0x31bc('0x57')]['readAt']=moment()['format'](_0x31bc('0x5e'));_0x5c848c[_0x31bc('0x57')][_0x31bc('0x5f')]=_0x5c848c['body'][_0x31bc('0x5f')]||_0x5c848c[_0x31bc('0x60')]['id'];_0xc9d97b[_0x31bc('0x61')]['id']=_0x5c848c[_0x31bc('0x57')][_0x31bc('0x5f')];return db[_0x31bc('0x4d')][_0x31bc('0x55')]({'where':{'id':_0x5c848c['params']['id'],'UserId':null}})['then'](handleEntityNotFound(_0x1281bb,null))[_0x31bc('0x21')](saveUpdates(_0x5c848c[_0x31bc('0x57')],null))[_0x31bc('0x21')](function(_0x250cb5){if(_0x250cb5){_0xc9d97b[_0x31bc('0x29')]=_0x250cb5['get']({'plain':!![]});return db[_0x31bc('0x62')][_0x31bc('0x55')]({'where':{'id':_0x250cb5[_0x31bc('0x63')]}});}return null;})[_0x31bc('0x21')](handleEntityNotFound(_0x1281bb,null))[_0x31bc('0x21')](function(_0x2618f2){if(_0x2618f2){return _0x2618f2[_0x31bc('0x58')]({'UserId':_0x5c848c[_0x31bc('0x57')][_0x31bc('0x5f')],'read1stAt':_[_0x31bc('0x64')](_0x2618f2['read1stAt'])?moment()[_0x31bc('0x65')](_0x31bc('0x5e')):undefined});}return null;})[_0x31bc('0x21')](function(_0x59d540){if(_0x59d540){_0xc9d97b[_0x31bc('0x66')]=_0x59d540[_0x31bc('0x67')]({'plain':!![]});interaction_log[_0x31bc('0x22')](_0x31bc('0x68'),_0x5c848c[_0x31bc('0x60')]['id'],_0x5c848c['user'][_0x31bc('0x39')],_0x5c848c['user']['role'],_0xc9d97b['interaction']['id'],_0x5c848c[_0x31bc('0x57')]?JSON[_0x31bc('0x27')](_0x5c848c[_0x31bc('0x57')]):_0x31bc('0x69'));return respondWithRpcPromise('AcceptMessage',_0x31bc('0x6a'),_0xc9d97b);}return null;})['then'](function(_0x28c1ad){var _0x306bbe='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x28c1ad['message']['ContactId'];return db['sequelize']['query'](_0x306bbe,{'type':db[_0x31bc('0x6b')][_0x31bc('0x6c')]['SELECT'],'raw':!![]})[_0x31bc('0x21')](function(_0x4c59fa){return _0x4c59fa;});})['then'](function(_0x6cd037){if(_0x6cd037){_0xc9d97b['message'][_0x31bc('0x6d')]=_0x6cd037[0x0];if(!_0x5c848c['body'][_0x31bc('0x5f')])return;return db[_0x31bc('0x6e')][_0x31bc('0x55')]({'where':{'id':_0x5c848c[_0x31bc('0x57')]['UserId'],'role':_0x31bc('0x61')},'attributes':['id',_0x31bc('0x39'),_0x31bc('0x6f'),'email','internal'],'raw':!![]});}return null;})['then'](function(_0x26ca29){if(!_0x26ca29)return null;_0xc9d97b['message'][_0x31bc('0x61')]=_0x26ca29;return _0xc9d97b;})[_0x31bc('0x21')](function(_0x23ef99){if(_0x23ef99){if(_0x5c848c[_0x31bc('0x57')][_0x31bc('0x70')]){_0xc9d97b[_0x31bc('0x29')][_0x31bc('0x71')]=util['format']('SIP/%s',_0x5c848c[_0x31bc('0x60')][_0x31bc('0x39')]);_0xc9d97b[_0x31bc('0x29')][_0x31bc('0x72')]=_0xc9d97b['channel'];_0xc9d97b[_0x31bc('0x29')]['motionChannel']=_0xc9d97b[_0x31bc('0x72')];_0xc9d97b[_0x31bc('0x29')][_0x31bc('0x73')]=_0x31bc('0x5b');return respondWithRpcPromise(_0x31bc('0x74'),_0x31bc('0x74'),{'event':_0x31bc('0x75'),'message':_0xc9d97b[_0x31bc('0x29')]},client9002)[_0x31bc('0x21')](function(){return _0xc9d97b;});}return _0xc9d97b;}return null;})[_0x31bc('0x21')](respondWithResult(_0x1281bb,null))[_0x31bc('0x2b')](handleError(_0x1281bb,null));};var interaction_log=require('../../config/logger')(_0x31bc('0x5a'));exports[_0x31bc('0x36')]=function(_0x4788a6,_0x494af4,_0x48eb26){var _0x13088b={'agent':{},'channel':_0x31bc('0x5c')};if(_0x4788a6[_0x31bc('0x57')]['id']){delete _0x4788a6[_0x31bc('0x57')]['id'];}_0x4788a6[_0x31bc('0x57')]['UserId']=_0x4788a6['body'][_0x31bc('0x5f')]||_0x4788a6[_0x31bc('0x60')]['id'];_0x13088b['agent']['id']=_0x4788a6[_0x31bc('0x57')][_0x31bc('0x5f')];return db[_0x31bc('0x4d')]['find']({'where':{'id':_0x4788a6['params']['id'],'UserId':null}})['then'](handleEntityNotFound(_0x494af4,null))['then'](function(_0x162222){if(_0x162222){_0x13088b[_0x31bc('0x29')]=_0x162222[_0x31bc('0x67')]({'plain':!![]});return db['OpenchannelInteraction'][_0x31bc('0x55')]({'where':{'id':_0x162222['OpenchannelInteractionId']}});}return null;})[_0x31bc('0x21')](handleEntityNotFound(_0x494af4,null))['then'](function(_0x3a4e62){if(_0x3a4e62){_0x13088b['interaction']=_0x3a4e62[_0x31bc('0x67')]({'plain':!![]});interaction_log['info'](_0x31bc('0x76'),_0x4788a6[_0x31bc('0x60')]['id'],_0x4788a6[_0x31bc('0x60')]['name'],_0x4788a6[_0x31bc('0x60')]['role'],_0x13088b['interaction']['id'],_0x4788a6[_0x31bc('0x57')]?JSON['stringify'](_0x4788a6[_0x31bc('0x57')]):'null');return respondWithRpcPromise('RejectMessage',_0x31bc('0x77'),_0x13088b);}return null;})[_0x31bc('0x21')](function(_0x45a5d4){var _0x16a2c7='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x45a5d4[_0x31bc('0x29')][_0x31bc('0x78')];return db[_0x31bc('0x79')][_0x31bc('0x40')](_0x16a2c7,{'type':db[_0x31bc('0x6b')][_0x31bc('0x6c')][_0x31bc('0x7a')],'raw':!![]})[_0x31bc('0x21')](function(_0x3fd6cf){return _0x3fd6cf;});})[_0x31bc('0x21')](function(_0x1de610){if(_0x1de610){_0x13088b['message'][_0x31bc('0x6d')]=_0x1de610[0x0];if(!_0x4788a6[_0x31bc('0x57')][_0x31bc('0x5f')])return;return db[_0x31bc('0x6e')][_0x31bc('0x55')]({'where':{'id':_0x4788a6[_0x31bc('0x57')][_0x31bc('0x5f')],'role':'agent'},'attributes':['id','name','fullname','email',_0x31bc('0x7b')],'raw':!![]});}return null;})[_0x31bc('0x21')](function(_0x575bab){if(!_0x575bab)return null;_0x13088b[_0x31bc('0x29')]['agent']=_0x575bab;return _0x13088b;})[_0x31bc('0x21')](function(_0x494416){if(_0x494416){_0x494416[_0x31bc('0x29')][_0x31bc('0x71')]=util[_0x31bc('0x65')](_0x31bc('0x7c'),_0x4788a6[_0x31bc('0x60')][_0x31bc('0x39')]);_0x494416[_0x31bc('0x29')][_0x31bc('0x72')]=_0x13088b['channel'];_0x494416['message']['motionChannel']=_0x13088b[_0x31bc('0x72')];_0x494416[_0x31bc('0x29')][_0x31bc('0x73')]=_0x31bc('0x36');respondWithRpcPromise(_0x31bc('0x74'),_0x31bc('0x74'),{'event':_0x31bc('0x7d'),'message':_0x494416[_0x31bc('0x29')]},client9002);return _0x13088b;}return null;})['then'](respondWithResult(_0x494af4,null))[_0x31bc('0x2b')](handleError(_0x494af4,null));};
\ No newline at end of file
+var _0xc015=['RejectMessage','fullname','SIP/%s','reject','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','desk.js','querystring','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','jayson/promise','client','then','info','OpenchannelMessage,\x20%s,\x20%s','request\x20sent','debug','OpenchannelMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','sendStatus','end','status','offset','undefined','count','limit','Content-Range','apply','save','destroy','name','send','index','map','OpenchannelMessage','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','includeAll','include','findAll','rows','catch','show','params','length','options','find','create','body','update','describe','openchannel','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','get','OpenchannelInteraction','OpenchannelInteractionId','isNil','[OPENCHANNELMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','interaction','stringify','null','AcceptMessage','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','QueryTypes','SELECT','contact','User','internal','interface','channel','motionChannel','accept','EventManager','acceptmessage','openchannel-interactions','[OPENCHANNELMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s'];(function(_0x4f1da5,_0x4ced17){var _0xe972a8=function(_0x278ba3){while(--_0x278ba3){_0x4f1da5['push'](_0x4f1da5['shift']());}};_0xe972a8(++_0x4ced17);}(_0xc015,0x106));var _0x5c01=function(_0x411e71,_0xf9652){_0x411e71=_0x411e71-0x0;var _0x226ae3=_0xc015[_0x411e71];return _0x226ae3;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x5c01('0x0'));var zipdir=require(_0x5c01('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x5c01('0x2'));var moment=require('moment');var BPromise=require(_0x5c01('0x3'));var Mustache=require(_0x5c01('0x4'));var util=require(_0x5c01('0x5'));var path=require(_0x5c01('0x6'));var sox=require(_0x5c01('0x7'));var csv=require(_0x5c01('0x8'));var ejs=require(_0x5c01('0x9'));var fs=require('fs');var fs_extra=require(_0x5c01('0xa'));var _=require(_0x5c01('0xb'));var squel=require('squel');var crypto=require(_0x5c01('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x5c01('0xd'));var toCsv=require('to-csv');var querystring=require(_0x5c01('0xe'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x5c01('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x5c01('0x10'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x5c01('0x11'))(_0x5c01('0x12'));var utils=require(_0x5c01('0x13'));var config=require(_0x5c01('0x14'));var licenseUtil=require(_0x5c01('0x15'));var db=require(_0x5c01('0x16'))['db'];config[_0x5c01('0x17')]=_[_0x5c01('0x18')](config[_0x5c01('0x17')],{'host':_0x5c01('0x19'),'port':0x18eb});var socket=require(_0x5c01('0x1a'))(new Redis(config[_0x5c01('0x17')]));require('./openchannelMessage.socket')['register'](socket);var jayson=require(_0x5c01('0x1b'));var client=jayson[_0x5c01('0x1c')]['http']({'port':0x232c});var client9002=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x5c789c,_0xe290e9,_0x2c7777,_0x3ffe15){return new BPromise(function(_0x2c5dc1,_0x15f628){var _0x40b28f=_0x3ffe15||client;return _0x40b28f['request'](_0x5c789c,_0x2c7777)[_0x5c01('0x1d')](function(_0x2cadf0){logger[_0x5c01('0x1e')](_0x5c01('0x1f'),_0xe290e9,_0x5c01('0x20'));logger[_0x5c01('0x21')](_0x5c01('0x22'),_0xe290e9,'request\x20sent',JSON['stringify'](_0x2cadf0));if(_0x2cadf0['error']){if(_0x2cadf0[_0x5c01('0x23')][_0x5c01('0x24')]===0x1f4){logger[_0x5c01('0x23')](_0x5c01('0x1f'),_0xe290e9,_0x2cadf0[_0x5c01('0x23')][_0x5c01('0x25')]);return _0x15f628(_0x2cadf0[_0x5c01('0x23')][_0x5c01('0x25')]);}logger[_0x5c01('0x23')](_0x5c01('0x1f'),_0xe290e9,_0x2cadf0[_0x5c01('0x23')][_0x5c01('0x25')]);return _0x2c5dc1(_0x2cadf0[_0x5c01('0x23')][_0x5c01('0x25')]);}else{logger[_0x5c01('0x1e')]('OpenchannelMessage,\x20%s,\x20%s',_0xe290e9,_0x5c01('0x20'));_0x2c5dc1(_0x2cadf0[_0x5c01('0x26')][_0x5c01('0x25')]);}})['catch'](function(_0x1529aa){logger[_0x5c01('0x23')]('OpenchannelMessage,\x20%s,\x20%s',_0xe290e9,_0x1529aa);_0x15f628(_0x1529aa);});});}function respondWithStatusCode(_0x95520e,_0x50ba07){_0x50ba07=_0x50ba07||0xcc;return function(_0x5c494e){if(_0x5c494e){return _0x95520e[_0x5c01('0x27')](_0x50ba07);}return _0x95520e['status'](_0x50ba07)[_0x5c01('0x28')]();};}function respondWithResult(_0x307449,_0x14cdc4){_0x14cdc4=_0x14cdc4||0xc8;return function(_0x3578f9){if(_0x3578f9){return _0x307449[_0x5c01('0x29')](_0x14cdc4)['json'](_0x3578f9);}};}function respondWithFilteredResult(_0x273cb7,_0x36ed8f){return function(_0x4fe714){if(_0x4fe714){var _0x5c3dc0=typeof _0x36ed8f[_0x5c01('0x2a')]===_0x5c01('0x2b')&&typeof _0x36ed8f['limit']===_0x5c01('0x2b');var _0x241233=_0x4fe714[_0x5c01('0x2c')];var _0x2a0cf7=_0x5c3dc0?0x0:_0x36ed8f['offset'];var _0x1637cc=_0x5c3dc0?_0x4fe714['count']:_0x36ed8f['offset']+_0x36ed8f[_0x5c01('0x2d')];var _0x367900;if(_0x1637cc>=_0x241233){_0x1637cc=_0x241233;_0x367900=0xc8;}else{_0x367900=0xce;}_0x273cb7[_0x5c01('0x29')](_0x367900);return _0x273cb7['set'](_0x5c01('0x2e'),_0x2a0cf7+'-'+_0x1637cc+'/'+_0x241233)['json'](_0x4fe714);}return null;};}function patchUpdates(_0x4917dc){return function(_0x363050){try{jsonpatch[_0x5c01('0x2f')](_0x363050,_0x4917dc,!![]);}catch(_0x5c2fae){return BPromise['reject'](_0x5c2fae);}return _0x363050[_0x5c01('0x30')]();};}function saveUpdates(_0x3139c6,_0x3339bf){return function(_0x18c8de){if(_0x18c8de){return _0x18c8de['update'](_0x3139c6)[_0x5c01('0x1d')](function(_0x1af069){return _0x1af069;});}return null;};}function removeEntity(_0x1396dc,_0x268c43){return function(_0x3eb4d3){if(_0x3eb4d3){return _0x3eb4d3[_0x5c01('0x31')]()['then'](function(){_0x1396dc[_0x5c01('0x29')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3c1913,_0x170c36){return function(_0xb65dca){if(!_0xb65dca){_0x3c1913[_0x5c01('0x27')](0x194);}return _0xb65dca;};}function handleError(_0x32ee86,_0x2a2874){_0x2a2874=_0x2a2874||0x1f4;return function(_0x11fbd2){logger[_0x5c01('0x23')](_0x11fbd2['stack']);if(_0x11fbd2[_0x5c01('0x32')]){delete _0x11fbd2[_0x5c01('0x32')];}_0x32ee86[_0x5c01('0x29')](_0x2a2874)[_0x5c01('0x33')](_0x11fbd2);};}exports[_0x5c01('0x34')]=function(_0x2bd33d,_0x55e455){var _0x529a74={},_0x325897={},_0x5db14c={'count':0x0,'rows':[]};var _0x1c68f8=_[_0x5c01('0x35')](db[_0x5c01('0x36')][_0x5c01('0x37')],function(_0x248216){return{'name':_0x248216[_0x5c01('0x38')],'type':_0x248216[_0x5c01('0x39')][_0x5c01('0x3a')]};});_0x325897[_0x5c01('0x3b')]=_[_0x5c01('0x35')](_0x1c68f8,_0x5c01('0x32'));_0x325897[_0x5c01('0x3c')]=_[_0x5c01('0x3d')](_0x2bd33d[_0x5c01('0x3c')]);_0x325897['filters']=_[_0x5c01('0x3e')](_0x325897[_0x5c01('0x3b')],_0x325897[_0x5c01('0x3c')]);_0x529a74[_0x5c01('0x3f')]=_[_0x5c01('0x3e')](_0x325897[_0x5c01('0x3b')],qs[_0x5c01('0x40')](_0x2bd33d[_0x5c01('0x3c')][_0x5c01('0x40')]));_0x529a74[_0x5c01('0x3f')]=_0x529a74[_0x5c01('0x3f')]['length']?_0x529a74[_0x5c01('0x3f')]:_0x325897[_0x5c01('0x3b')];if(!_0x2bd33d[_0x5c01('0x3c')][_0x5c01('0x41')](_0x5c01('0x42'))){_0x529a74[_0x5c01('0x2d')]=qs[_0x5c01('0x2d')](_0x2bd33d[_0x5c01('0x3c')][_0x5c01('0x2d')]);_0x529a74[_0x5c01('0x2a')]=qs[_0x5c01('0x2a')](_0x2bd33d['query'][_0x5c01('0x2a')]);}_0x529a74[_0x5c01('0x43')]=qs[_0x5c01('0x44')](_0x2bd33d[_0x5c01('0x3c')]['sort']);_0x529a74[_0x5c01('0x45')]=qs[_0x5c01('0x46')](_[_0x5c01('0x47')](_0x2bd33d[_0x5c01('0x3c')],_0x325897[_0x5c01('0x46')]),_0x1c68f8);if(_0x2bd33d[_0x5c01('0x3c')][_0x5c01('0x48')]){_0x529a74[_0x5c01('0x45')]=_[_0x5c01('0x49')](_0x529a74[_0x5c01('0x45')],{'$or':_[_0x5c01('0x35')](_0x1c68f8,function(_0x1c9958){if(_0x1c9958['type']!==_0x5c01('0x4a')){var _0x323b7c={};_0x323b7c[_0x1c9958[_0x5c01('0x32')]]={'$like':'%'+_0x2bd33d[_0x5c01('0x3c')][_0x5c01('0x48')]+'%'};return _0x323b7c;}})});}_0x529a74=_['merge']({},_0x529a74,_0x2bd33d['options']);var _0x454708={'where':_0x529a74['where']};return db[_0x5c01('0x36')][_0x5c01('0x2c')](_0x454708)['then'](function(_0x59b98d){_0x5db14c['count']=_0x59b98d;if(_0x2bd33d[_0x5c01('0x3c')][_0x5c01('0x4b')]){_0x529a74[_0x5c01('0x4c')]=[{'all':!![]}];}return db[_0x5c01('0x36')][_0x5c01('0x4d')](_0x529a74);})[_0x5c01('0x1d')](function(_0x17b1b0){_0x5db14c[_0x5c01('0x4e')]=_0x17b1b0;return _0x5db14c;})[_0x5c01('0x1d')](respondWithFilteredResult(_0x55e455,_0x529a74))[_0x5c01('0x4f')](handleError(_0x55e455,null));};exports[_0x5c01('0x50')]=function(_0x4abd2b,_0x1501fa){var _0x50737e={'raw':!![],'where':{'id':_0x4abd2b[_0x5c01('0x51')]['id']}},_0x4e947b={};_0x4e947b['model']=_[_0x5c01('0x3d')](db[_0x5c01('0x36')][_0x5c01('0x37')]);_0x4e947b[_0x5c01('0x3c')]=_[_0x5c01('0x3d')](_0x4abd2b[_0x5c01('0x3c')]);_0x4e947b[_0x5c01('0x46')]=_[_0x5c01('0x3e')](_0x4e947b['model'],_0x4e947b[_0x5c01('0x3c')]);_0x50737e[_0x5c01('0x3f')]=_[_0x5c01('0x3e')](_0x4e947b[_0x5c01('0x3b')],qs['fields'](_0x4abd2b[_0x5c01('0x3c')][_0x5c01('0x40')]));_0x50737e[_0x5c01('0x3f')]=_0x50737e[_0x5c01('0x3f')][_0x5c01('0x52')]?_0x50737e[_0x5c01('0x3f')]:_0x4e947b[_0x5c01('0x3b')];if(_0x4abd2b[_0x5c01('0x3c')]['includeAll']){_0x50737e[_0x5c01('0x4c')]=[{'all':!![]}];}_0x50737e=_[_0x5c01('0x49')]({},_0x50737e,_0x4abd2b[_0x5c01('0x53')]);return db[_0x5c01('0x36')][_0x5c01('0x54')](_0x50737e)[_0x5c01('0x1d')](handleEntityNotFound(_0x1501fa,null))[_0x5c01('0x1d')](respondWithResult(_0x1501fa,null))[_0x5c01('0x4f')](handleError(_0x1501fa,null));};exports[_0x5c01('0x55')]=function(_0x24a263,_0x3b2ce5){return db[_0x5c01('0x36')][_0x5c01('0x55')](_0x24a263[_0x5c01('0x56')],{})['then'](respondWithResult(_0x3b2ce5,0xc9))[_0x5c01('0x4f')](handleError(_0x3b2ce5,null));};exports[_0x5c01('0x57')]=function(_0x1ec667,_0x4906bc){if(_0x1ec667['body']['id']){delete _0x1ec667[_0x5c01('0x56')]['id'];}return db[_0x5c01('0x36')][_0x5c01('0x54')]({'where':{'id':_0x1ec667[_0x5c01('0x51')]['id']}})[_0x5c01('0x1d')](handleEntityNotFound(_0x4906bc,null))['then'](saveUpdates(_0x1ec667[_0x5c01('0x56')],null))[_0x5c01('0x1d')](respondWithResult(_0x4906bc,null))[_0x5c01('0x4f')](handleError(_0x4906bc,null));};exports[_0x5c01('0x31')]=function(_0x5fec8b,_0x3e8681){return db[_0x5c01('0x36')][_0x5c01('0x54')]({'where':{'id':_0x5fec8b['params']['id']}})[_0x5c01('0x1d')](handleEntityNotFound(_0x3e8681,null))['then'](removeEntity(_0x3e8681,null))['catch'](handleError(_0x3e8681,null));};exports[_0x5c01('0x58')]=function(_0x2679b1,_0x231b15){return db[_0x5c01('0x36')][_0x5c01('0x58')]()['then'](respondWithResult(_0x231b15,null))['catch'](handleError(_0x231b15,null));};var interaction_log=require(_0x5c01('0x11'))('openchannel-interactions');exports['accept']=function(_0x4af88c,_0x147990,_0x46fcdd){var _0x1c646f={'agent':{},'channel':_0x5c01('0x59')};if(_0x4af88c[_0x5c01('0x56')]['id']){delete _0x4af88c['body']['id'];}_0x4af88c[_0x5c01('0x56')][_0x5c01('0x5a')]=!![];_0x4af88c['body'][_0x5c01('0x5b')]=moment()[_0x5c01('0x5c')](_0x5c01('0x5d'));_0x4af88c[_0x5c01('0x56')][_0x5c01('0x5e')]=_0x4af88c['body']['UserId']||_0x4af88c[_0x5c01('0x5f')]['id'];_0x1c646f[_0x5c01('0x60')]['id']=_0x4af88c[_0x5c01('0x56')][_0x5c01('0x5e')];return db['OpenchannelMessage']['find']({'where':{'id':_0x4af88c['params']['id'],'UserId':null}})[_0x5c01('0x1d')](handleEntityNotFound(_0x147990,null))[_0x5c01('0x1d')](saveUpdates(_0x4af88c[_0x5c01('0x56')],null))['then'](function(_0x4aaae4){if(_0x4aaae4){_0x1c646f[_0x5c01('0x25')]=_0x4aaae4[_0x5c01('0x61')]({'plain':!![]});return db[_0x5c01('0x62')][_0x5c01('0x54')]({'where':{'id':_0x4aaae4[_0x5c01('0x63')]}});}return null;})[_0x5c01('0x1d')](handleEntityNotFound(_0x147990,null))['then'](function(_0x27e8cb){if(_0x27e8cb){return _0x27e8cb[_0x5c01('0x57')]({'UserId':_0x4af88c['body'][_0x5c01('0x5e')],'read1stAt':_[_0x5c01('0x64')](_0x27e8cb['read1stAt'])?moment()['format'](_0x5c01('0x5d')):undefined});}return null;})[_0x5c01('0x1d')](function(_0x5758f3){if(_0x5758f3){_0x1c646f['interaction']=_0x5758f3['get']({'plain':!![]});interaction_log[_0x5c01('0x1e')](_0x5c01('0x65'),_0x4af88c[_0x5c01('0x5f')]['id'],_0x4af88c[_0x5c01('0x5f')][_0x5c01('0x32')],_0x4af88c[_0x5c01('0x5f')][_0x5c01('0x66')],_0x1c646f[_0x5c01('0x67')]['id'],_0x4af88c[_0x5c01('0x56')]?JSON[_0x5c01('0x68')](_0x4af88c['body']):_0x5c01('0x69'));return respondWithRpcPromise(_0x5c01('0x6a'),_0x5c01('0x6b'),_0x1c646f);}return null;})[_0x5c01('0x1d')](function(_0x9e384f){var _0x45cade=_0x5c01('0x6c')+_0x9e384f[_0x5c01('0x25')][_0x5c01('0x6d')];return db[_0x5c01('0x6e')][_0x5c01('0x3c')](_0x45cade,{'type':db[_0x5c01('0x6f')][_0x5c01('0x70')][_0x5c01('0x71')],'raw':!![]})[_0x5c01('0x1d')](function(_0xac46be){return _0xac46be;});})['then'](function(_0x357f3a){if(_0x357f3a){_0x1c646f[_0x5c01('0x25')][_0x5c01('0x72')]=_0x357f3a[0x0];if(!_0x4af88c[_0x5c01('0x56')][_0x5c01('0x5e')])return;return db[_0x5c01('0x73')]['find']({'where':{'id':_0x4af88c[_0x5c01('0x56')][_0x5c01('0x5e')],'role':'agent'},'attributes':['id',_0x5c01('0x32'),'fullname','email',_0x5c01('0x74')],'raw':!![]});}return null;})[_0x5c01('0x1d')](function(_0x311b81){if(!_0x311b81)return null;_0x1c646f[_0x5c01('0x25')][_0x5c01('0x60')]=_0x311b81;return _0x1c646f;})[_0x5c01('0x1d')](function(_0x13fd19){if(_0x13fd19){if(_0x4af88c[_0x5c01('0x56')]['manual']){_0x1c646f[_0x5c01('0x25')][_0x5c01('0x75')]=util[_0x5c01('0x5c')]('SIP/%s',_0x4af88c[_0x5c01('0x5f')][_0x5c01('0x32')]);_0x1c646f[_0x5c01('0x25')][_0x5c01('0x76')]=_0x1c646f['channel'];_0x1c646f['message'][_0x5c01('0x77')]=_0x1c646f['channel'];_0x1c646f[_0x5c01('0x25')]['event']=_0x5c01('0x78');return respondWithRpcPromise(_0x5c01('0x79'),_0x5c01('0x79'),{'event':_0x5c01('0x7a'),'message':_0x1c646f[_0x5c01('0x25')]},client9002)['then'](function(){return _0x1c646f;});}return _0x1c646f;}return null;})['then'](respondWithResult(_0x147990,null))[_0x5c01('0x4f')](handleError(_0x147990,null));};var interaction_log=require(_0x5c01('0x11'))(_0x5c01('0x7b'));exports['reject']=function(_0x2dcc90,_0x2062fd,_0xa3170c){var _0x2a1a7e={'agent':{},'channel':_0x5c01('0x59')};if(_0x2dcc90[_0x5c01('0x56')]['id']){delete _0x2dcc90[_0x5c01('0x56')]['id'];}_0x2dcc90['body'][_0x5c01('0x5e')]=_0x2dcc90[_0x5c01('0x56')][_0x5c01('0x5e')]||_0x2dcc90['user']['id'];_0x2a1a7e[_0x5c01('0x60')]['id']=_0x2dcc90['body'][_0x5c01('0x5e')];return db[_0x5c01('0x36')]['find']({'where':{'id':_0x2dcc90[_0x5c01('0x51')]['id'],'UserId':null}})[_0x5c01('0x1d')](handleEntityNotFound(_0x2062fd,null))[_0x5c01('0x1d')](function(_0x95738e){if(_0x95738e){_0x2a1a7e[_0x5c01('0x25')]=_0x95738e[_0x5c01('0x61')]({'plain':!![]});return db[_0x5c01('0x62')]['find']({'where':{'id':_0x95738e[_0x5c01('0x63')]}});}return null;})['then'](handleEntityNotFound(_0x2062fd,null))[_0x5c01('0x1d')](function(_0x4a1a59){if(_0x4a1a59){_0x2a1a7e[_0x5c01('0x67')]=_0x4a1a59[_0x5c01('0x61')]({'plain':!![]});interaction_log[_0x5c01('0x1e')](_0x5c01('0x7c'),_0x2dcc90[_0x5c01('0x5f')]['id'],_0x2dcc90[_0x5c01('0x5f')][_0x5c01('0x32')],_0x2dcc90[_0x5c01('0x5f')][_0x5c01('0x66')],_0x2a1a7e['interaction']['id'],_0x2dcc90['body']?JSON[_0x5c01('0x68')](_0x2dcc90[_0x5c01('0x56')]):'null');return respondWithRpcPromise(_0x5c01('0x7d'),'rejectMessage',_0x2a1a7e);}return null;})[_0x5c01('0x1d')](function(_0x174b62){var _0x4539a1=_0x5c01('0x6c')+_0x174b62[_0x5c01('0x25')]['ContactId'];return db[_0x5c01('0x6e')][_0x5c01('0x3c')](_0x4539a1,{'type':db[_0x5c01('0x6f')][_0x5c01('0x70')]['SELECT'],'raw':!![]})[_0x5c01('0x1d')](function(_0x5d1547){return _0x5d1547;});})[_0x5c01('0x1d')](function(_0x24e435){if(_0x24e435){_0x2a1a7e['message'][_0x5c01('0x72')]=_0x24e435[0x0];if(!_0x2dcc90['body'][_0x5c01('0x5e')])return;return db[_0x5c01('0x73')][_0x5c01('0x54')]({'where':{'id':_0x2dcc90[_0x5c01('0x56')][_0x5c01('0x5e')],'role':'agent'},'attributes':['id',_0x5c01('0x32'),_0x5c01('0x7e'),'email',_0x5c01('0x74')],'raw':!![]});}return null;})['then'](function(_0x29fcae){if(!_0x29fcae)return null;_0x2a1a7e[_0x5c01('0x25')]['agent']=_0x29fcae;return _0x2a1a7e;})[_0x5c01('0x1d')](function(_0x36babd){if(_0x36babd){_0x36babd[_0x5c01('0x25')][_0x5c01('0x75')]=util[_0x5c01('0x5c')](_0x5c01('0x7f'),_0x2dcc90[_0x5c01('0x5f')][_0x5c01('0x32')]);_0x36babd[_0x5c01('0x25')][_0x5c01('0x76')]=_0x2a1a7e[_0x5c01('0x76')];_0x36babd[_0x5c01('0x25')]['motionChannel']=_0x2a1a7e[_0x5c01('0x76')];_0x36babd[_0x5c01('0x25')]['event']=_0x5c01('0x80');respondWithRpcPromise(_0x5c01('0x79'),_0x5c01('0x79'),{'event':'rejectmessage','message':_0x36babd[_0x5c01('0x25')]},client9002);return _0x2a1a7e;}return null;})[_0x5c01('0x1d')](respondWithResult(_0x2062fd,null))[_0x5c01('0x4f')](handleError(_0x2062fd,null));};
\ No newline at end of file
index 5427391..e26a0f2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x330d=['exports','events','../../mysqldb','OpenchannelMessage','save','update','emit','hasOwnProperty'];(function(_0x29b609,_0x19d388){var _0x54c952=function(_0xb3c38d){while(--_0xb3c38d){_0x29b609['push'](_0x29b609['shift']());}};_0x54c952(++_0x19d388);}(_0x330d,0x1b1));var _0xd330=function(_0x4565bf,_0x5ad9d6){_0x4565bf=_0x4565bf-0x0;var _0x5610ba=_0x330d[_0x4565bf];return _0x5610ba;};'use strict';var EventEmitter=require(_0xd330('0x0'));var OpenchannelMessage=require(_0xd330('0x1'))['db'][_0xd330('0x2')];var OpenchannelMessageEvents=new EventEmitter();OpenchannelMessageEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xd330('0x3'),'afterUpdate':_0xd330('0x4'),'afterDestroy':'remove'};function emitEvent(_0x4f573b){return function(_0x40e093,_0x898536,_0x377a7e){OpenchannelMessageEvents['emit'](_0x4f573b+':'+_0x40e093['id'],_0x40e093);OpenchannelMessageEvents[_0xd330('0x5')](_0x4f573b,_0x40e093);_0x377a7e(null);};}for(var e in events){if(events[_0xd330('0x6')](e)){var event=events[e];OpenchannelMessage['hook'](e,emitEvent(event));}}module[_0xd330('0x7')]=OpenchannelMessageEvents;
\ No newline at end of file
+var _0x811e=['events','../../mysqldb','setMaxListeners','save','update','remove','emit'];(function(_0x2b346e,_0x2c9c6d){var _0xd36d24=function(_0x3c1f35){while(--_0x3c1f35){_0x2b346e['push'](_0x2b346e['shift']());}};_0xd36d24(++_0x2c9c6d);}(_0x811e,0x1d5));var _0xe811=function(_0x146d9d,_0x58b69a){_0x146d9d=_0x146d9d-0x0;var _0xe0b432=_0x811e[_0x146d9d];return _0xe0b432;};'use strict';var EventEmitter=require(_0xe811('0x0'));var OpenchannelMessage=require(_0xe811('0x1'))['db']['OpenchannelMessage'];var OpenchannelMessageEvents=new EventEmitter();OpenchannelMessageEvents[_0xe811('0x2')](0x0);var events={'afterCreate':_0xe811('0x3'),'afterUpdate':_0xe811('0x4'),'afterDestroy':_0xe811('0x5')};function emitEvent(_0x56c0a1){return function(_0x4e4c95,_0x1690c9,_0x57c9cb){OpenchannelMessageEvents[_0xe811('0x6')](_0x56c0a1+':'+_0x4e4c95['id'],_0x4e4c95);OpenchannelMessageEvents[_0xe811('0x6')](_0x56c0a1,_0x4e4c95);_0x57c9cb(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];OpenchannelMessage['hook'](e,emitEvent(event));}}module['exports']=OpenchannelMessageEvents;
\ No newline at end of file
index c39eb2e..aa5035c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdd31=['CmContact','describe','then','OpenchannelAccount','find','Interactions','Contact','keys','get','replyUri','info','OpenchannelMessage,\x20%s,\x20%s','afterCreate','format','Forwarding\x20message\x20%d\x20to\x20%s','Interaction','omit','POST','body','threadId','inspect','finally','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','request-promise','path','../../config/environment','./openchannelMessage.attributes','exports','OpenchannelMessage','openchannel_messages','fti_openchannel_messages','FULLTEXT','models','toLowerCase','direction','out','secret','isNil','OpenchannelInteraction','findOne','OpenchannelInteractionId','update','createdAt','catch','error'];(function(_0x4a96ad,_0x44e88d){var _0x21f0e2=function(_0x2bf007){while(--_0x2bf007){_0x4a96ad['push'](_0x4a96ad['shift']());}};_0x21f0e2(++_0x44e88d);}(_0xdd31,0x1a7));var _0x1dd3=function(_0x31f553,_0x460ea4){_0x31f553=_0x31f553-0x0;var _0x36d548=_0xdd31[_0x31f553];return _0x36d548;};'use strict';var _=require(_0x1dd3('0x0'));var util=require(_0x1dd3('0x1'));var logger=require(_0x1dd3('0x2'))(_0x1dd3('0x3'));var moment=require(_0x1dd3('0x4'));var BPromise=require('bluebird');var rp=require(_0x1dd3('0x5'));var fs=require('fs');var path=require(_0x1dd3('0x6'));var rimraf=require('rimraf');var config=require(_0x1dd3('0x7'));var attributes=require(_0x1dd3('0x8'));module[_0x1dd3('0x9')]=function(_0xfdc1b6,_0x505c7b){return _0xfdc1b6['define'](_0x1dd3('0xa'),attributes,{'tableName':_0x1dd3('0xb'),'paranoid':![],'indexes':[{'name':_0x1dd3('0xc'),'fields':['body'],'type':_0x1dd3('0xd')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x15908d,_0x5b627c,_0x56c2fb){var _0x455cdd=_0xfdc1b6[_0x1dd3('0xe')];var _0x43b2ab=_0x15908d['get']({'plain':!![]});if(_0x43b2ab['direction'][_0x1dd3('0xf')]()==='in'||_0x43b2ab[_0x1dd3('0x10')][_0x1dd3('0xf')]()===_0x1dd3('0x11')&&!_0x43b2ab[_0x1dd3('0x12')]&&!_[_0x1dd3('0x13')](_0x43b2ab['UserId'])){_0x455cdd[_0x1dd3('0x14')][_0x1dd3('0x15')]({'where':{'id':_0x43b2ab[_0x1dd3('0x16')]}})['then'](function(_0xafd905){if(_0xafd905){_0xafd905[_0x1dd3('0x17')]({'lastMsgAt':_0x43b2ab[_0x1dd3('0x18')],'lastMsgDirection':_0x43b2ab[_0x1dd3('0x10')]['toLowerCase']()});}})[_0x1dd3('0x19')](function(_0x56941c){console[_0x1dd3('0x1a')](_0x56941c);});}if(_0x43b2ab['direction']===_0x1dd3('0x11')&&!_0x43b2ab[_0x1dd3('0x12')]){var _0x1cfc6f;_0x455cdd[_0x1dd3('0x1b')][_0x1dd3('0x1c')]()[_0x1dd3('0x1d')](function(_0x309773){return _0x455cdd[_0x1dd3('0x1e')][_0x1dd3('0x1f')]({'where':{'id':_0x43b2ab['OpenchannelAccountId']},'include':[{'model':_0x455cdd[_0x1dd3('0x14')],'as':_0x1dd3('0x20'),'where':{'id':_0x43b2ab[_0x1dd3('0x16')]},'limit':0x1,'include':[{'model':_0x455cdd['CmContact'],'as':_0x1dd3('0x21'),'attributes':_[_0x1dd3('0x22')](_0x309773)}]}]});})[_0x1dd3('0x1d')](function(_0x15b35f){_0x1cfc6f=_0x15b35f[_0x1dd3('0x23')]({'plain':!![]});if(_0x1cfc6f&&_0x1cfc6f[_0x1dd3('0x24')]){logger[_0x1dd3('0x25')](_0x1dd3('0x26'),_0x1dd3('0x27'),util[_0x1dd3('0x28')](_0x1dd3('0x29'),_0x43b2ab['id'],_0x1cfc6f['replyUri']));if(_0x1cfc6f[_0x1dd3('0x20')]&&_0x1cfc6f[_0x1dd3('0x20')]['length']){_0x43b2ab[_0x1dd3('0x2a')]=_[_0x1dd3('0x2b')](_0x1cfc6f[_0x1dd3('0x20')][0x0],_0x1dd3('0x21'));_0x43b2ab[_0x1dd3('0x21')]=_0x1cfc6f[_0x1dd3('0x20')][0x0][_0x1dd3('0x21')];}var _0x5b627c={'method':_0x1dd3('0x2c'),'uri':encodeURI(_0x1cfc6f[_0x1dd3('0x24')]),'json':!![],'resolveWithFullResponse':!![]};switch(_0x5b627c['method']){case'GET':_0x5b627c['qs']=_0x43b2ab;break;case _0x1dd3('0x2c'):_0x5b627c[_0x1dd3('0x2d')]=_0x43b2ab;break;}return rp(_0x5b627c)[_0x1dd3('0x1d')](function(_0x5a941a){logger[_0x1dd3('0x25')](_0x1dd3('0x26'),_0x1dd3('0x27'),util[_0x1dd3('0x28')]('Message\x20%d\x20forwarded\x20to\x20%s',_0x43b2ab['id'],_0x1cfc6f[_0x1dd3('0x24')]));if(_0x5a941a[_0x1dd3('0x2d')][_0x1dd3('0x2e')]&&_0x5a941a['body'][_0x1dd3('0x2e')]!=_0x43b2ab[_0x1dd3('0x2a')]['threadId']){return _0x455cdd[_0x1dd3('0x14')][_0x1dd3('0x17')]({'threadId':_0x5a941a[_0x1dd3('0x2d')]['threadId']},{'where':{'id':_0x43b2ab[_0x1dd3('0x2a')]['id']}});}else{return;}})['then'](function(){return _0x15908d['update']({'read':!![]});})[_0x1dd3('0x19')](function(_0x2aaf5e){logger[_0x1dd3('0x1a')](_0x1dd3('0x26'),'afterCreate',util[_0x1dd3('0x2f')](_0x2aaf5e,{'showHidden':![],'depth':null}));_0x56c2fb();});}else{_0x56c2fb();}})[_0x1dd3('0x30')](function(){_0x56c2fb();});}else{_0x56c2fb();}}},'charset':'utf8mb4','collate':_0x1dd3('0x31')});};
\ No newline at end of file
+var _0xfcd1=['Forwarding\x20message\x20%d\x20to\x20%s','Interactions','length','Interaction','omit','Contact','method','GET','OpenchannelMessage,\x20%s,\x20%s','Message\x20%d\x20forwarded\x20to\x20%s','threadId','update','afterCreate','inspect','finally','utf8mb4','utf8mb4_unicode_ci','lodash','util','api','moment','bluebird','request-promise','path','../../config/environment','exports','define','OpenchannelMessage','openchannel_messages','body','FULLTEXT','models','get','direction','toLowerCase','out','secret','isNil','UserId','findOne','OpenchannelInteractionId','then','createdAt','catch','error','CmContact','describe','find','OpenchannelInteraction','keys','replyUri','info','format'];(function(_0x529c45,_0x3a2462){var _0x3ba70c=function(_0x1e61fa){while(--_0x1e61fa){_0x529c45['push'](_0x529c45['shift']());}};_0x3ba70c(++_0x3a2462);}(_0xfcd1,0x7b));var _0x1fcd=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xfcd1[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x1fcd('0x0'));var util=require(_0x1fcd('0x1'));var logger=require('../../config/logger')(_0x1fcd('0x2'));var moment=require(_0x1fcd('0x3'));var BPromise=require(_0x1fcd('0x4'));var rp=require(_0x1fcd('0x5'));var fs=require('fs');var path=require(_0x1fcd('0x6'));var rimraf=require('rimraf');var config=require(_0x1fcd('0x7'));var attributes=require('./openchannelMessage.attributes');module[_0x1fcd('0x8')]=function(_0x22591d,_0x3c1629){return _0x22591d[_0x1fcd('0x9')](_0x1fcd('0xa'),attributes,{'tableName':_0x1fcd('0xb'),'paranoid':![],'indexes':[{'name':'fti_openchannel_messages','fields':[_0x1fcd('0xc')],'type':_0x1fcd('0xd')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x4243dd,_0x3b939b,_0x4f741d){var _0x514864=_0x22591d[_0x1fcd('0xe')];var _0x3009d1=_0x4243dd[_0x1fcd('0xf')]({'plain':!![]});if(_0x3009d1[_0x1fcd('0x10')][_0x1fcd('0x11')]()==='in'||_0x3009d1[_0x1fcd('0x10')][_0x1fcd('0x11')]()===_0x1fcd('0x12')&&!_0x3009d1[_0x1fcd('0x13')]&&!_[_0x1fcd('0x14')](_0x3009d1[_0x1fcd('0x15')])){_0x514864['OpenchannelInteraction'][_0x1fcd('0x16')]({'where':{'id':_0x3009d1[_0x1fcd('0x17')]}})[_0x1fcd('0x18')](function(_0x51cede){if(_0x51cede){_0x51cede['update']({'lastMsgAt':_0x3009d1[_0x1fcd('0x19')],'lastMsgDirection':_0x3009d1[_0x1fcd('0x10')][_0x1fcd('0x11')]()});}})[_0x1fcd('0x1a')](function(_0x24e347){console[_0x1fcd('0x1b')](_0x24e347);});}if(_0x3009d1['direction']===_0x1fcd('0x12')&&!_0x3009d1['secret']){var _0x47d75c;_0x514864[_0x1fcd('0x1c')][_0x1fcd('0x1d')]()[_0x1fcd('0x18')](function(_0xf3531f){return _0x514864['OpenchannelAccount'][_0x1fcd('0x1e')]({'where':{'id':_0x3009d1['OpenchannelAccountId']},'include':[{'model':_0x514864[_0x1fcd('0x1f')],'as':'Interactions','where':{'id':_0x3009d1[_0x1fcd('0x17')]},'limit':0x1,'include':[{'model':_0x514864['CmContact'],'as':'Contact','attributes':_[_0x1fcd('0x20')](_0xf3531f)}]}]});})[_0x1fcd('0x18')](function(_0x455940){_0x47d75c=_0x455940[_0x1fcd('0xf')]({'plain':!![]});if(_0x47d75c&&_0x47d75c[_0x1fcd('0x21')]){logger[_0x1fcd('0x22')]('OpenchannelMessage,\x20%s,\x20%s','afterCreate',util[_0x1fcd('0x23')](_0x1fcd('0x24'),_0x3009d1['id'],_0x47d75c[_0x1fcd('0x21')]));if(_0x47d75c[_0x1fcd('0x25')]&&_0x47d75c['Interactions'][_0x1fcd('0x26')]){_0x3009d1[_0x1fcd('0x27')]=_[_0x1fcd('0x28')](_0x47d75c['Interactions'][0x0],_0x1fcd('0x29'));_0x3009d1[_0x1fcd('0x29')]=_0x47d75c[_0x1fcd('0x25')][0x0][_0x1fcd('0x29')];}var _0x3b939b={'method':'POST','uri':encodeURI(_0x47d75c[_0x1fcd('0x21')]),'json':!![],'resolveWithFullResponse':!![]};switch(_0x3b939b[_0x1fcd('0x2a')]){case _0x1fcd('0x2b'):_0x3b939b['qs']=_0x3009d1;break;case'POST':_0x3b939b[_0x1fcd('0xc')]=_0x3009d1;break;}return rp(_0x3b939b)[_0x1fcd('0x18')](function(_0x370609){logger[_0x1fcd('0x22')](_0x1fcd('0x2c'),'afterCreate',util[_0x1fcd('0x23')](_0x1fcd('0x2d'),_0x3009d1['id'],_0x47d75c['replyUri']));if(_0x370609[_0x1fcd('0xc')]['threadId']&&_0x370609[_0x1fcd('0xc')][_0x1fcd('0x2e')]!=_0x3009d1[_0x1fcd('0x27')][_0x1fcd('0x2e')]){return _0x514864[_0x1fcd('0x1f')]['update']({'threadId':_0x370609['body'][_0x1fcd('0x2e')]},{'where':{'id':_0x3009d1[_0x1fcd('0x27')]['id']}});}else{return;}})['then'](function(){return _0x4243dd[_0x1fcd('0x2f')]({'read':!![]});})['catch'](function(_0x3796a0){logger[_0x1fcd('0x1b')](_0x1fcd('0x2c'),_0x1fcd('0x30'),util[_0x1fcd('0x31')](_0x3796a0,{'showHidden':![],'depth':null}));_0x4f741d();});}else{_0x4f741d();}})[_0x1fcd('0x32')](function(){_0x4f741d();});}else{_0x4f741d();}}},'charset':_0x1fcd('0x33'),'collate':_0x1fcd('0x34')});};
\ No newline at end of file
index 2c27782..24e9cc2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5f66=['stringify','error','code','message','info','result','OpenchannelMessage','create','body','options','raw','CreateOpenchannelMessage','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','defaults','redis','localhost','socket.io-emitter','./openchannelMessage.socket','then','OpenchannelMessage,\x20%s,\x20%s','debug','request\x20sent'];(function(_0x471a86,_0x2c4ae1){var _0x4520d9=function(_0x338494){while(--_0x338494){_0x471a86['push'](_0x471a86['shift']());}};_0x4520d9(++_0x2c4ae1);}(_0x5f66,0x1a0));var _0x65f6=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0x5f66[_0x2f5ac5];return _0x37c9a8;};'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});config['redis']=_[_0x65f6('0x9')](config[_0x65f6('0xa')],{'host':_0x65f6('0xb'),'port':0x18eb});var socket=require(_0x65f6('0xc'))(new Redis(config[_0x65f6('0xa')]));require(_0x65f6('0xd'))['register'](socket);function respondWithRpcPromise(_0x5123ee,_0x18fea1,_0x2f6d5b){return new BPromise(function(_0x264647,_0x25c416){return client['request'](_0x5123ee,_0x2f6d5b)[_0x65f6('0xe')](function(_0x571436){logger['info'](_0x65f6('0xf'),_0x18fea1,'request\x20sent');logger[_0x65f6('0x10')]('OpenchannelMessage,\x20%s,\x20%s,\x20%s',_0x18fea1,_0x65f6('0x11'),JSON[_0x65f6('0x12')](_0x571436));if(_0x571436[_0x65f6('0x13')]){if(_0x571436[_0x65f6('0x13')][_0x65f6('0x14')]===0x1f4){logger[_0x65f6('0x13')](_0x65f6('0xf'),_0x18fea1,_0x571436[_0x65f6('0x13')][_0x65f6('0x15')]);return _0x25c416(_0x571436[_0x65f6('0x13')]['message']);}logger[_0x65f6('0x13')]('OpenchannelMessage,\x20%s,\x20%s',_0x18fea1,_0x571436['error'][_0x65f6('0x15')]);return _0x264647(_0x571436[_0x65f6('0x13')][_0x65f6('0x15')]);}else{logger[_0x65f6('0x16')](_0x65f6('0xf'),_0x18fea1,_0x65f6('0x11'));_0x264647(_0x571436[_0x65f6('0x17')][_0x65f6('0x15')]);}})['catch'](function(_0x4d79a1){logger[_0x65f6('0x13')]('OpenchannelMessage,\x20%s,\x20%s',_0x18fea1,_0x4d79a1);_0x25c416(_0x4d79a1);});});}exports['CreateOpenchannelMessage']=function(_0x5c5b91){var _0x365159=this;return new Promise(function(_0x21ea88,_0x5114a4){return db[_0x65f6('0x18')][_0x65f6('0x19')](_0x5c5b91[_0x65f6('0x1a')],{'raw':_0x5c5b91[_0x65f6('0x1b')]?_0x5c5b91[_0x65f6('0x1b')][_0x65f6('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x197a49){logger['info']('CreateOpenchannelMessage',_0x5c5b91);logger[_0x65f6('0x10')](_0x65f6('0x1d'),_0x5c5b91,JSON['stringify'](_0x197a49));_0x21ea88(_0x197a49);})[_0x65f6('0x1e')](function(_0x471a33){logger[_0x65f6('0x13')](_0x65f6('0x1d'),_0x471a33['message'],_0x5c5b91);_0x5114a4(_0x365159[_0x65f6('0x13')](0x1f4,_0x471a33[_0x65f6('0x15')]));});});};
\ No newline at end of file
+var _0x1261=['../../config/utils','../../config/logger','rpc','../../config/environment','http','redis','localhost','socket.io-emitter','./openchannelMessage.socket','OpenchannelMessage,\x20%s,\x20%s','request\x20sent','debug','OpenchannelMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','catch','OpenchannelMessage','options','raw','then','CreateOpenchannelMessage','util','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x45cb57,_0x40230d){var _0x2f0aa1=function(_0x8df780){while(--_0x8df780){_0x45cb57['push'](_0x45cb57['shift']());}};_0x2f0aa1(++_0x40230d);}(_0x1261,0x144));var _0x1126=function(_0x95b616,_0x296372){_0x95b616=_0x95b616-0x0;var _0x596532=_0x1261[_0x95b616];return _0x596532;};'use strict';var _=require('lodash');var util=require(_0x1126('0x0'));var moment=require(_0x1126('0x1'));var BPromise=require(_0x1126('0x2'));var rs=require(_0x1126('0x3'));var fs=require('fs');var Redis=require(_0x1126('0x4'));var db=require(_0x1126('0x5'))['db'];var utils=require(_0x1126('0x6'));var logger=require(_0x1126('0x7'))(_0x1126('0x8'));var config=require(_0x1126('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0x1126('0xa')]({'port':0x232a});config[_0x1126('0xb')]=_['defaults'](config[_0x1126('0xb')],{'host':_0x1126('0xc'),'port':0x18eb});var socket=require(_0x1126('0xd'))(new Redis(config[_0x1126('0xb')]));require(_0x1126('0xe'))['register'](socket);function respondWithRpcPromise(_0x3f09ac,_0x18dbe6,_0x167ef1){return new BPromise(function(_0x5e72e2,_0x34571c){return client['request'](_0x3f09ac,_0x167ef1)['then'](function(_0x15c071){logger['info'](_0x1126('0xf'),_0x18dbe6,_0x1126('0x10'));logger[_0x1126('0x11')](_0x1126('0x12'),_0x18dbe6,_0x1126('0x10'),JSON[_0x1126('0x13')](_0x15c071));if(_0x15c071[_0x1126('0x14')]){if(_0x15c071[_0x1126('0x14')][_0x1126('0x15')]===0x1f4){logger['error']('OpenchannelMessage,\x20%s,\x20%s',_0x18dbe6,_0x15c071[_0x1126('0x14')][_0x1126('0x16')]);return _0x34571c(_0x15c071[_0x1126('0x14')]['message']);}logger[_0x1126('0x14')]('OpenchannelMessage,\x20%s,\x20%s',_0x18dbe6,_0x15c071[_0x1126('0x14')][_0x1126('0x16')]);return _0x5e72e2(_0x15c071[_0x1126('0x14')]['message']);}else{logger[_0x1126('0x17')](_0x1126('0xf'),_0x18dbe6,'request\x20sent');_0x5e72e2(_0x15c071['result'][_0x1126('0x16')]);}})[_0x1126('0x18')](function(_0x58d11a){logger['error'](_0x1126('0xf'),_0x18dbe6,_0x58d11a);_0x34571c(_0x58d11a);});});}exports['CreateOpenchannelMessage']=function(_0x22ed37){var _0x1d6d19=this;return new Promise(function(_0x2f70ac,_0x54400a){return db[_0x1126('0x19')]['create'](_0x22ed37['body'],{'raw':_0x22ed37[_0x1126('0x1a')]?_0x22ed37[_0x1126('0x1a')][_0x1126('0x1b')]===undefined?!![]:![]:!![]})[_0x1126('0x1c')](function(_0x526ca1){logger[_0x1126('0x17')](_0x1126('0x1d'),_0x22ed37);logger['debug'](_0x1126('0x1d'),_0x22ed37,JSON['stringify'](_0x526ca1));_0x2f70ac(_0x526ca1);})['catch'](function(_0x4b57ab){logger[_0x1126('0x14')](_0x1126('0x1d'),_0x4b57ab[_0x1126('0x16')],_0x22ed37);_0x54400a(_0x1d6d19[_0x1126('0x14')](0x1f4,_0x4b57ab[_0x1126('0x16')]));});});};
\ No newline at end of file
index 9e7b372..1c04f1d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe6a5=['update','removeListener','register','length','openchannelMessage:'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xe6a5,0x13b));var _0x5e6a=function(_0x32561a,_0x29eacb){_0x32561a=_0x32561a-0x0;var _0x3b2981=_0xe6a5[_0x32561a];return _0x3b2981;};'use strict';var OpenchannelMessageEvents=require('./openchannelMessage.events');var events=['save','remove',_0x5e6a('0x0')];function createListener(_0x22e563,_0x242e6d){return function(_0xf72b24){_0x242e6d['emit'](_0x22e563,_0xf72b24);};}function removeListener(_0x4641c6,_0x5a464f){return function(){OpenchannelMessageEvents[_0x5e6a('0x1')](_0x4641c6,_0x5a464f);};}exports[_0x5e6a('0x2')]=function(_0x15db90){for(var _0x346e04=0x0,_0x1aa798=events[_0x5e6a('0x3')];_0x346e04<_0x1aa798;_0x346e04++){var _0x2f34a0=events[_0x346e04];var _0x26ea18=createListener(_0x5e6a('0x4')+_0x2f34a0,_0x15db90);OpenchannelMessageEvents['on'](_0x2f34a0,_0x26ea18);}};
\ No newline at end of file
+var _0x08f5=['./openchannelMessage.events','save','removeListener','register','length'];(function(_0x190c8e,_0x12bede){var _0xfe6da0=function(_0x45b62a){while(--_0x45b62a){_0x190c8e['push'](_0x190c8e['shift']());}};_0xfe6da0(++_0x12bede);}(_0x08f5,0x172));var _0x508f=function(_0x1a8ff0,_0x20788d){_0x1a8ff0=_0x1a8ff0-0x0;var _0x3588bf=_0x08f5[_0x1a8ff0];return _0x3588bf;};'use strict';var OpenchannelMessageEvents=require(_0x508f('0x0'));var events=[_0x508f('0x1'),'remove','update'];function createListener(_0x31c465,_0x3a1204){return function(_0x56c652){_0x3a1204['emit'](_0x31c465,_0x56c652);};}function removeListener(_0x263833,_0x4e2dbf){return function(){OpenchannelMessageEvents[_0x508f('0x2')](_0x263833,_0x4e2dbf);};}exports[_0x508f('0x3')]=function(_0x485f59){for(var _0x45008f=0x0,_0xe9c8f5=events[_0x508f('0x4')];_0x45008f<_0xe9c8f5;_0x45008f++){var _0x1d73b2=events[_0x45008f];var _0x4d260a=createListener('openchannelMessage:'+_0x1d73b2,_0x485f59);OpenchannelMessageEvents['on'](_0x1d73b2,_0x4d260a);}};
\ No newline at end of file
index 9699c33..d813c68 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd985=['multer','util','path','../../components/interaction/service','../../config/environment','./openchannelQueue.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/members','getMembers','/:id/teams','/:id/users','getAgents','post','create','addTeams','addAgents','put','update','delete','destroy','removeAgents','exports'];(function(_0x20ef64,_0x4a8fe9){var _0x3707d8=function(_0x5b9a88){while(--_0x5b9a88){_0x20ef64['push'](_0x20ef64['shift']());}};_0x3707d8(++_0x4a8fe9);}(_0xd985,0x16c));var _0x5d98=function(_0x4ae829,_0x2c842c){_0x4ae829=_0x4ae829-0x0;var _0x256b31=_0xd985[_0x4ae829];return _0x256b31;};'use strict';var multer=require(_0x5d98('0x0'));var util=require(_0x5d98('0x1'));var path=require(_0x5d98('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x5d98('0x3'));var config=require(_0x5d98('0x4'));var controller=require(_0x5d98('0x5'));router[_0x5d98('0x6')]('/',auth[_0x5d98('0x7')](),controller[_0x5d98('0x8')]);router[_0x5d98('0x6')](_0x5d98('0x9'),auth[_0x5d98('0x7')](),controller[_0x5d98('0xa')]);router['get'](_0x5d98('0xb'),auth[_0x5d98('0x7')](),controller[_0x5d98('0xc')]);router[_0x5d98('0x6')](_0x5d98('0xd'),auth[_0x5d98('0x7')](),controller[_0x5d98('0xe')]);router[_0x5d98('0x6')](_0x5d98('0xf'),auth[_0x5d98('0x7')](),controller['getTeams']);router[_0x5d98('0x6')](_0x5d98('0x10'),auth[_0x5d98('0x7')](),controller[_0x5d98('0x11')]);router[_0x5d98('0x12')]('/',auth[_0x5d98('0x7')](),controller[_0x5d98('0x13')]);router[_0x5d98('0x12')](_0x5d98('0xf'),auth[_0x5d98('0x7')](),controller[_0x5d98('0x14')]);router[_0x5d98('0x12')](_0x5d98('0x10'),auth[_0x5d98('0x7')](),controller[_0x5d98('0x15')]);router[_0x5d98('0x16')]('/:id',auth[_0x5d98('0x7')](),controller[_0x5d98('0x17')]);router[_0x5d98('0x18')](_0x5d98('0xb'),auth[_0x5d98('0x7')](),controller[_0x5d98('0x19')]);router[_0x5d98('0x18')](_0x5d98('0xf'),auth[_0x5d98('0x7')](),controller['removeTeams']);router['delete']('/:id/users',auth[_0x5d98('0x7')](),controller[_0x5d98('0x1a')]);module[_0x5d98('0x1b')]=router;
\ No newline at end of file
+var _0xef89=['show','/:id/members','/:id/teams','getTeams','/:id/users','getAgents','post','create','addTeams','put','update','destroy','delete','removeTeams','removeAgents','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelQueue.controller','get','/describe','isAuthenticated','/:id'];(function(_0x1ebf51,_0x2e0997){var _0x23a06a=function(_0x4ae73b){while(--_0x4ae73b){_0x1ebf51['push'](_0x1ebf51['shift']());}};_0x23a06a(++_0x2e0997);}(_0xef89,0x6a));var _0x9ef8=function(_0x4271f1,_0xdbdc80){_0x4271f1=_0x4271f1-0x0;var _0x1bc9c9=_0xef89[_0x4271f1];return _0x1bc9c9;};'use strict';var multer=require(_0x9ef8('0x0'));var util=require(_0x9ef8('0x1'));var path=require(_0x9ef8('0x2'));var timeout=require(_0x9ef8('0x3'));var express=require('express');var router=express[_0x9ef8('0x4')]();var fs_extra=require(_0x9ef8('0x5'));var auth=require(_0x9ef8('0x6'));var interaction=require(_0x9ef8('0x7'));var config=require(_0x9ef8('0x8'));var controller=require(_0x9ef8('0x9'));router[_0x9ef8('0xa')]('/',auth['isAuthenticated'](),controller['index']);router[_0x9ef8('0xa')](_0x9ef8('0xb'),auth[_0x9ef8('0xc')](),controller['describe']);router[_0x9ef8('0xa')](_0x9ef8('0xd'),auth['isAuthenticated'](),controller[_0x9ef8('0xe')]);router[_0x9ef8('0xa')](_0x9ef8('0xf'),auth['isAuthenticated'](),controller['getMembers']);router[_0x9ef8('0xa')](_0x9ef8('0x10'),auth['isAuthenticated'](),controller[_0x9ef8('0x11')]);router['get'](_0x9ef8('0x12'),auth[_0x9ef8('0xc')](),controller[_0x9ef8('0x13')]);router[_0x9ef8('0x14')]('/',auth['isAuthenticated'](),controller[_0x9ef8('0x15')]);router[_0x9ef8('0x14')](_0x9ef8('0x10'),auth[_0x9ef8('0xc')](),controller[_0x9ef8('0x16')]);router['post'](_0x9ef8('0x12'),auth['isAuthenticated'](),controller['addAgents']);router[_0x9ef8('0x17')](_0x9ef8('0xd'),auth[_0x9ef8('0xc')](),controller[_0x9ef8('0x18')]);router['delete'](_0x9ef8('0xd'),auth['isAuthenticated'](),controller[_0x9ef8('0x19')]);router[_0x9ef8('0x1a')](_0x9ef8('0x10'),auth[_0x9ef8('0xc')](),controller[_0x9ef8('0x1b')]);router['delete'](_0x9ef8('0x12'),auth[_0x9ef8('0xc')](),controller[_0x9ef8('0x1c')]);module[_0x9ef8('0x1d')]=router;
\ No newline at end of file
index 4daef39..adf63bf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xecd9=['rrmemory','beepall','roundrobin','sequelize','STRING','ENUM'];(function(_0xe18b7d,_0x23bac4){var _0x5e5af1=function(_0x49393f){while(--_0x49393f){_0xe18b7d['push'](_0xe18b7d['shift']());}};_0x5e5af1(++_0x23bac4);}(_0xecd9,0x1a7));var _0x9ecd=function(_0x6e573e,_0x124bd4){_0x6e573e=_0x6e573e-0x0;var _0x3fa5d3=_0xecd9[_0x6e573e];return _0x3fa5d3;};'use strict';var Sequelize=require(_0x9ecd('0x0'));module['exports']={'name':{'type':Sequelize[_0x9ecd('0x1')],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0x9ecd('0x1')]},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x9ecd('0x2')](_0x9ecd('0x3'),_0x9ecd('0x4'),_0x9ecd('0x5'))}};
\ No newline at end of file
+var _0xaa5d=['name','ENUM','sequelize','STRING'];(function(_0x39096d,_0x51f8a0){var _0x13da4f=function(_0x11e6b2){while(--_0x11e6b2){_0x39096d['push'](_0x39096d['shift']());}};_0x13da4f(++_0x51f8a0);}(_0xaa5d,0x6e));var _0xdaa5=function(_0x5b3b9b,_0x1c71b0){_0x5b3b9b=_0x5b3b9b-0x0;var _0x47c1d7=_0xaa5d[_0x5b3b9b];return _0x47c1d7;};'use strict';var Sequelize=require(_0xdaa5('0x0'));module['exports']={'name':{'type':Sequelize[_0xdaa5('0x1')],'unique':_0xdaa5('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize['STRING']},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xdaa5('0x3')]('rrmemory','beepall','roundrobin')}};
\ No newline at end of file
index 54b5eb1..c8ffd5d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2a6b=['limit','count','set','Content-Range','json','then','destroy','get','OpenchannelQueues','UserProfileResource','stack','name','send','index','OpenchannelQueue','rawAttributes','fieldName','key','getOptions','where','include','query','rows','show','params','model','keys','filters','fields','attributes','length','includeAll','merge','options','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','describe','getMembers','UserOpenchannelQueue','intersection','hasOwnProperty','nolimit','order','sort','pick','filter','map','findAll','User','UserId','agent','openchannelPause','createdAt','format','getTeams','findOne','addTeams','ids','Team','Agents','interface','flatMap','sequelize','findOrCreate','forEach','emit','userOpenchannelQueue:save','removeTeams','select','field','tq.TeamId','from','team_has_openchannel_queues','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','clone','ut.UserId\x20=\x20?','push','toString','SELECT','every','TeamId','includes','all','union','compact','value','transaction','isEmpty','removeAgents','addAgents','spread','isArray','userOpenchannelQueue:remove','getAgents','bluebird','lodash','squel','../../config/logger','../../config/environment','../../mysqldb','redis','defaults','localhost','./openchannelQueue.socket','register','sendStatus','status','end','offset','undefined'];(function(_0x4b2436,_0x452299){var _0x4f5ab2=function(_0x5c6679){while(--_0x5c6679){_0x4b2436['push'](_0x4b2436['shift']());}};_0x4f5ab2(++_0x452299);}(_0x2a6b,0x68));var _0xb2a6=function(_0x24ebe1,_0x43cb13){_0x24ebe1=_0x24ebe1-0x0;var _0xe82341=_0x2a6b[_0x24ebe1];return _0xe82341;};'use strict';var BPromise=require(_0xb2a6('0x0'));var util=require('util');var _=require(_0xb2a6('0x1'));var squel=require(_0xb2a6('0x2'));var Redis=require('ioredis');var qs=require('../../components/parsers/qs');var logger=require(_0xb2a6('0x3'))('api');var config=require(_0xb2a6('0x4'));var db=require(_0xb2a6('0x5'))['db'];config[_0xb2a6('0x6')]=_[_0xb2a6('0x7')](config['redis'],{'host':_0xb2a6('0x8'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xb2a6('0x6')]));require(_0xb2a6('0x9'))[_0xb2a6('0xa')](socket);function respondWithStatusCode(_0x5b2e8b,_0x1f22a1){_0x1f22a1=_0x1f22a1||0xcc;return function(_0x308c6a){if(_0x308c6a){return _0x5b2e8b[_0xb2a6('0xb')](_0x1f22a1);}return _0x5b2e8b[_0xb2a6('0xc')](_0x1f22a1)[_0xb2a6('0xd')]();};}function respondWithResult(_0x23727a,_0x207752){_0x207752=_0x207752||0xc8;return function(_0x19d76d){if(_0x19d76d){return _0x23727a['status'](_0x207752)['json'](_0x19d76d);}};}function respondWithFilteredResult(_0x285155,_0xc3f682){return function(_0x302eb9){if(_0x302eb9){var _0x9cbeeb=typeof _0xc3f682[_0xb2a6('0xe')]===_0xb2a6('0xf')&&typeof _0xc3f682[_0xb2a6('0x10')]===_0xb2a6('0xf');var _0x447462=_0x302eb9[_0xb2a6('0x11')];var _0x345254=_0x9cbeeb?0x0:_0xc3f682[_0xb2a6('0xe')];var _0x22c428=_0x9cbeeb?_0x302eb9['count']:_0xc3f682[_0xb2a6('0xe')]+_0xc3f682['limit'];var _0x57f700;if(_0x22c428>=_0x447462){_0x22c428=_0x447462;_0x57f700=0xc8;}else{_0x57f700=0xce;}_0x285155[_0xb2a6('0xc')](_0x57f700);return _0x285155[_0xb2a6('0x12')](_0xb2a6('0x13'),_0x345254+'-'+_0x22c428+'/'+_0x447462)[_0xb2a6('0x14')](_0x302eb9);}return null;};}function saveUpdates(_0x3ec6cb){return function(_0x43f50b){if(_0x43f50b){return _0x43f50b['update'](_0x3ec6cb)[_0xb2a6('0x15')](function(_0x252638){return _0x252638;});}return null;};}function removeEntity(_0x496745){return function(_0x5b5ddb){if(_0x5b5ddb){return _0x5b5ddb[_0xb2a6('0x16')]()[_0xb2a6('0x15')](function(){var _0x4996b3=_0x5b5ddb[_0xb2a6('0x17')]({'plain':!![]});var _0xbef634=_0xb2a6('0x18');return db[_0xb2a6('0x19')][_0xb2a6('0x16')]({'where':{'type':_0xbef634,'resourceId':_0x4996b3['id']}})[_0xb2a6('0x15')](function(){return _0x5b5ddb;});})[_0xb2a6('0x15')](function(){_0x496745[_0xb2a6('0xc')](0xcc)[_0xb2a6('0xd')]();});}};}function handleEntityNotFound(_0xfdb1cc){return function(_0x51d67f){if(!_0x51d67f){_0xfdb1cc[_0xb2a6('0xb')](0x194);}return _0x51d67f;};}function handleError(_0x11d4d7,_0x9db22f){_0x9db22f=_0x9db22f||0x1f4;return function(_0x8c9023){logger['error'](_0x8c9023[_0xb2a6('0x1a')]);if(_0x8c9023[_0xb2a6('0x1b')]){delete _0x8c9023['name'];}_0x11d4d7['status'](_0x9db22f)[_0xb2a6('0x1c')](_0x8c9023);};}exports[_0xb2a6('0x1d')]=function(_0x5e488d,_0x5624fc){var _0x4995ed={};var _0x5b284a={'count':0x0,'rows':[]};var _0x476ab1=_['map'](db[_0xb2a6('0x1e')][_0xb2a6('0x1f')],function(_0x1d83c8){return{'name':_0x1d83c8[_0xb2a6('0x20')],'type':_0x1d83c8['type'][_0xb2a6('0x21')]};});_0x4995ed=qs[_0xb2a6('0x22')](_0x476ab1,_0x5e488d);var _0x3b8ceb={'where':_0x4995ed[_0xb2a6('0x23')]};return db[_0xb2a6('0x1e')][_0xb2a6('0x11')](_0x3b8ceb)[_0xb2a6('0x15')](function(_0x19f2b9){_0x5b284a['count']=_0x19f2b9;_0x4995ed[_0xb2a6('0x24')]=qs[_0xb2a6('0x24')](_0x5e488d[_0xb2a6('0x25')]);return db['OpenchannelQueue']['findAll'](_0x4995ed);})[_0xb2a6('0x15')](function(_0x47ec7b){_0x5b284a[_0xb2a6('0x26')]=_0x47ec7b;return _0x5b284a;})[_0xb2a6('0x15')](respondWithFilteredResult(_0x5624fc,_0x4995ed))['catch'](handleError(_0x5624fc,null));};exports[_0xb2a6('0x27')]=function(_0x14d4aa,_0x465af2){var _0x34d190={'raw':!![],'where':{'id':_0x14d4aa[_0xb2a6('0x28')]['id']}},_0xe67456={};_0xe67456[_0xb2a6('0x29')]=_[_0xb2a6('0x2a')](db[_0xb2a6('0x1e')][_0xb2a6('0x1f')]);_0xe67456['query']=_[_0xb2a6('0x2a')](_0x14d4aa[_0xb2a6('0x25')]);_0xe67456[_0xb2a6('0x2b')]=_['intersection'](_0xe67456[_0xb2a6('0x29')],_0xe67456['query']);_0x34d190['attributes']=_['intersection'](_0xe67456[_0xb2a6('0x29')],qs[_0xb2a6('0x2c')](_0x14d4aa['query']['fields']));_0x34d190[_0xb2a6('0x2d')]=_0x34d190[_0xb2a6('0x2d')][_0xb2a6('0x2e')]?_0x34d190[_0xb2a6('0x2d')]:_0xe67456['model'];if(_0x14d4aa[_0xb2a6('0x25')][_0xb2a6('0x2f')]){_0x34d190[_0xb2a6('0x24')]=[{'all':!![]}];}_0x34d190=_[_0xb2a6('0x30')]({},_0x34d190,_0x14d4aa[_0xb2a6('0x31')]);return db[_0xb2a6('0x1e')][_0xb2a6('0x32')](_0x34d190)[_0xb2a6('0x15')](handleEntityNotFound(_0x465af2,null))[_0xb2a6('0x15')](respondWithResult(_0x465af2,null))[_0xb2a6('0x33')](handleError(_0x465af2,null));};exports[_0xb2a6('0x34')]=function(_0x54ce38,_0x5da384){return db[_0xb2a6('0x1e')][_0xb2a6('0x34')](_0x54ce38[_0xb2a6('0x35')],{})[_0xb2a6('0x15')](function(_0x5bd947){var _0x261477=_0x54ce38[_0xb2a6('0x36')][_0xb2a6('0x17')]({'plain':!![]});if(!_0x261477)throw new Error(_0xb2a6('0x37'));if(_0x261477[_0xb2a6('0x38')]===_0xb2a6('0x36')){var _0x137b0e=_0x5bd947[_0xb2a6('0x17')]({'plain':!![]});var _0x57d0e6=_0xb2a6('0x18');return db['UserProfileSection'][_0xb2a6('0x32')]({'where':{'name':_0x57d0e6,'userProfileId':_0x261477[_0xb2a6('0x39')]},'raw':!![]})[_0xb2a6('0x15')](function(_0x4add06){if(_0x4add06&&_0x4add06['autoAssociation']===0x0){return db[_0xb2a6('0x19')]['create']({'name':_0x137b0e['name'],'resourceId':_0x137b0e['id'],'type':_0x4add06[_0xb2a6('0x1b')],'sectionId':_0x4add06['id']},{})[_0xb2a6('0x15')](function(){return _0x5bd947;});}else{return _0x5bd947;}})[_0xb2a6('0x33')](function(_0x56481d){logger[_0xb2a6('0x3a')](_0xb2a6('0x3b'),_0x56481d);throw _0x56481d;});}return _0x5bd947;})['then'](respondWithResult(_0x5da384,0xc9))['catch'](handleError(_0x5da384,null));};exports[_0xb2a6('0x3c')]=function(_0x4d8da9,_0x2bba27){if(_0x4d8da9[_0xb2a6('0x35')]['id']){delete _0x4d8da9['body']['id'];}return db[_0xb2a6('0x1e')][_0xb2a6('0x32')]({'where':{'id':_0x4d8da9[_0xb2a6('0x28')]['id']}})['then'](handleEntityNotFound(_0x2bba27,null))[_0xb2a6('0x15')](saveUpdates(_0x4d8da9[_0xb2a6('0x35')],null))[_0xb2a6('0x15')](respondWithResult(_0x2bba27,null))[_0xb2a6('0x33')](handleError(_0x2bba27,null));};exports['destroy']=function(_0x57c075,_0x2a98f3){return db['OpenchannelQueue']['find']({'where':{'id':_0x57c075[_0xb2a6('0x28')]['id']}})['then'](handleEntityNotFound(_0x2a98f3,null))[_0xb2a6('0x15')](removeEntity(_0x2a98f3,null))[_0xb2a6('0x33')](handleError(_0x2a98f3,null));};exports[_0xb2a6('0x3d')]=function(_0x2cb3a4,_0x755b61){return db[_0xb2a6('0x1e')][_0xb2a6('0x3d')]()[_0xb2a6('0x15')](respondWithResult(_0x755b61,null))[_0xb2a6('0x33')](handleError(_0x755b61,null));};exports[_0xb2a6('0x3e')]=function(_0xd583ef,_0x462aef){var _0x4083ba={'raw':!![],'where':{}},_0xb9ef1f={},_0x633963;return db[_0xb2a6('0x1e')]['findOne']({'where':{'id':_0xd583ef[_0xb2a6('0x28')]['id']}})[_0xb2a6('0x15')](handleEntityNotFound(_0x462aef,null))[_0xb2a6('0x15')](function(_0x32776a){if(_0x32776a){_0x633963=_0x32776a['get']({'plain':!![]});_0xb9ef1f['model']=_['keys'](db[_0xb2a6('0x3f')][_0xb2a6('0x1f')]);_0xb9ef1f['query']=_[_0xb2a6('0x2a')](_0xd583ef[_0xb2a6('0x25')]);_0xb9ef1f[_0xb2a6('0x2b')]=_['intersection'](_0xb9ef1f['model'],_0xb9ef1f[_0xb2a6('0x25')]);_0x4083ba['attributes']=_[_0xb2a6('0x40')](_0xb9ef1f[_0xb2a6('0x29')],qs[_0xb2a6('0x2c')](_0xd583ef[_0xb2a6('0x25')]['fields']));_0x4083ba[_0xb2a6('0x2d')]=_0x4083ba[_0xb2a6('0x2d')]['length']?_0x4083ba[_0xb2a6('0x2d')]:_0xb9ef1f['model'];if(!_0xd583ef[_0xb2a6('0x25')][_0xb2a6('0x41')](_0xb2a6('0x42'))){_0x4083ba['limit']=qs[_0xb2a6('0x10')](_0xd583ef[_0xb2a6('0x25')][_0xb2a6('0x10')]);_0x4083ba[_0xb2a6('0xe')]=qs[_0xb2a6('0xe')](_0xd583ef[_0xb2a6('0x25')]['offset']);}_0x4083ba[_0xb2a6('0x43')]=qs[_0xb2a6('0x44')](_0xd583ef[_0xb2a6('0x25')][_0xb2a6('0x44')]);_0x4083ba[_0xb2a6('0x23')]=qs[_0xb2a6('0x2b')](_[_0xb2a6('0x45')](_0xd583ef[_0xb2a6('0x25')],_0xb9ef1f[_0xb2a6('0x2b')]));_0x4083ba['where']['OpenchannelQueueId']=_0x32776a['id'];if(_0xd583ef['query'][_0xb2a6('0x46')]){_0x4083ba['where']=_[_0xb2a6('0x30')](_0x4083ba['where'],{'$or':_[_0xb2a6('0x47')](_0x4083ba[_0xb2a6('0x2d')],function(_0x291512){var _0x1da491={};_0x1da491[_0x291512]={'$like':'%'+_0xd583ef[_0xb2a6('0x25')]['filter']+'%'};return _0x1da491;})});}_0x4083ba=_[_0xb2a6('0x30')]({},_0x4083ba,_0xd583ef[_0xb2a6('0x31')]);return db[_0xb2a6('0x3f')][_0xb2a6('0x48')](_0x4083ba);}})[_0xb2a6('0x15')](function(_0x371874){if(_0x371874){return db[_0xb2a6('0x49')]['findAndCountAll']({'where':{'id':_[_0xb2a6('0x47')](_0x371874,_0xb2a6('0x4a')),'role':_0xb2a6('0x4b')},'attributes':['id',_0xb2a6('0x1b'),_0xb2a6('0x4c'),'updatedAt',_0xb2a6('0x4d')]});}})['then'](function(_0x3e53a7){if(_0x3e53a7){return{'count':_0x3e53a7[_0xb2a6('0x11')],'rows':_[_0xb2a6('0x47')](_0x3e53a7['rows'],function(_0x4adc38){return{'membername':_0x4adc38[_0xb2a6('0x1b')],'UserId':_0x4adc38['id'],'queue_name':_0x633963['name'],'OpenchannelQueueId':_0x633963['id'],'interface':util[_0xb2a6('0x4e')]('%s/%s','SIP',_0x4adc38['name']),'penalty':0x0,'paused':_0x4adc38[_0xb2a6('0x4c')],'createdAt':_0x4adc38[_0xb2a6('0x4d')],'updatedAt':_0x4adc38['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})['then'](respondWithFilteredResult(_0x462aef,_0x4083ba))[_0xb2a6('0x33')](handleError(_0x462aef,null));};exports[_0xb2a6('0x4f')]=function(_0x427537,_0x1e4c4a){var _0x5b99b1={};var _0xe21432={};var _0x4f72c8;var _0x4a3750;return db['OpenchannelQueue'][_0xb2a6('0x50')]({'where':{'id':_0x427537[_0xb2a6('0x28')]['id']}})[_0xb2a6('0x15')](handleEntityNotFound(_0x1e4c4a,null))[_0xb2a6('0x15')](function(_0x321be5){if(_0x321be5){_0x4f72c8=_0x321be5;_0xe21432[_0xb2a6('0x29')]=_[_0xb2a6('0x2a')](db['Team'][_0xb2a6('0x1f')]);_0xe21432[_0xb2a6('0x25')]=_[_0xb2a6('0x2a')](_0x427537[_0xb2a6('0x25')]);_0xe21432['filters']=_[_0xb2a6('0x40')](_0xe21432[_0xb2a6('0x29')],_0xe21432[_0xb2a6('0x25')]);_0x5b99b1[_0xb2a6('0x2d')]=_['intersection'](_0xe21432['model'],qs[_0xb2a6('0x2c')](_0x427537[_0xb2a6('0x25')][_0xb2a6('0x2c')]));_0x5b99b1[_0xb2a6('0x2d')]=_0x5b99b1['attributes'][_0xb2a6('0x2e')]?_0x5b99b1[_0xb2a6('0x2d')]:_0xe21432['model'];_0x5b99b1[_0xb2a6('0x43')]=qs['sort'](_0x427537[_0xb2a6('0x25')][_0xb2a6('0x44')]);_0x5b99b1[_0xb2a6('0x23')]=qs[_0xb2a6('0x2b')](_['pick'](_0x427537[_0xb2a6('0x25')],_0xe21432[_0xb2a6('0x2b')]));if(_0x427537[_0xb2a6('0x25')][_0xb2a6('0x46')]){_0x5b99b1['where']=_['merge'](_0x5b99b1[_0xb2a6('0x23')],{'$or':_[_0xb2a6('0x47')](_0x5b99b1[_0xb2a6('0x2d')],function(_0x262ba9){var _0x3eeed2={};_0x3eeed2[_0x262ba9]={'$like':'%'+_0x427537['query'][_0xb2a6('0x46')]+'%'};return _0x3eeed2;})});}_0x5b99b1=_[_0xb2a6('0x30')]({},_0x5b99b1,_0x427537[_0xb2a6('0x31')]);return _0x4f72c8['getTeams'](_0x5b99b1);}})[_0xb2a6('0x15')](function(_0x1aae83){if(_0x1aae83){_0x4a3750=_0x1aae83[_0xb2a6('0x2e')];if(!_0x427537[_0xb2a6('0x25')]['hasOwnProperty'](_0xb2a6('0x42'))){_0x5b99b1[_0xb2a6('0x10')]=qs[_0xb2a6('0x10')](_0x427537[_0xb2a6('0x25')][_0xb2a6('0x10')]);_0x5b99b1[_0xb2a6('0xe')]=qs['offset'](_0x427537[_0xb2a6('0x25')]['offset']);}return _0x4f72c8[_0xb2a6('0x4f')](_0x5b99b1);}})[_0xb2a6('0x15')](function(_0x19bbda){if(_0x19bbda){return _0x19bbda?{'count':_0x4a3750,'rows':_0x19bbda}:null;}})['then'](respondWithResult(_0x1e4c4a,null))['catch'](handleError(_0x1e4c4a,null));};exports[_0xb2a6('0x51')]=function(_0x981768,_0xdeccbe){var _0x57c3e7=_0x981768[_0xb2a6('0x35')][_0xb2a6('0x52')];return db[_0xb2a6('0x53')]['findAll']({'where':{'id':_0x57c3e7},'attributes':['id'],'include':[{'model':db['User'],'as':_0xb2a6('0x54'),'attributes':['id','name','online','voicePause',_0xb2a6('0x55')],'raw':!![]}]})[_0xb2a6('0x15')](function(_0x44b407){if(_0x44b407){var _0x2544e2=_[_0xb2a6('0x56')](_0x44b407,function(_0x3a2514){var _0x1ad08f=_0x3a2514['get']({'plain':!![]});return _0x1ad08f[_0xb2a6('0x54')];});return db[_0xb2a6('0x1e')][_0xb2a6('0x32')]({'where':{'id':_0x981768[_0xb2a6('0x28')]['id']}})[_0xb2a6('0x15')](function(_0x14eaec){return db[_0xb2a6('0x57')]['transaction'](function(_0xc6d282){return _0x14eaec[_0xb2a6('0x51')](_0x57c3e7,{'transaction':_0xc6d282})['then'](function(){return BPromise['each'](_0x2544e2,function(_0x234c66){return db[_0xb2a6('0x3f')][_0xb2a6('0x58')]({'where':{'UserId':_0x234c66['id'],'OpenchannelQueueId':_0x981768[_0xb2a6('0x28')]['id']},'transaction':_0xc6d282});});})['then'](function(){_0x2544e2[_0xb2a6('0x59')](function(_0x474d86){socket[_0xb2a6('0x5a')](_0xb2a6('0x5b'),{'UserId':_0x474d86['id'],'OpenchannelQueueId':_0x14eaec['id']});});});});});}})[_0xb2a6('0x15')](respondWithStatusCode(_0xdeccbe,null))[_0xb2a6('0x33')](handleError(_0xdeccbe,null));};exports[_0xb2a6('0x5c')]=function(_0x4c15e5,_0x4f0e17){return db[_0xb2a6('0x53')]['findAll']({'where':{'id':_0x4c15e5[_0xb2a6('0x25')][_0xb2a6('0x52')]},'attributes':['id'],'include':[{'model':db[_0xb2a6('0x49')],'as':'Agents','attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x4f0e17,null))[_0xb2a6('0x15')](function(_0x2b6acf){var _0x4812a6=_['map'](_0x2b6acf,'id');var _0x3db285=[];var _0x2a6c76=[];var _0x2abc86=squel[_0xb2a6('0x5d')]();_0x2abc86[_0xb2a6('0x5e')](_0xb2a6('0x5f'))[_0xb2a6('0x60')](_0xb2a6('0x61'),'tq')['join'](_0xb2a6('0x62'),'ut',_0xb2a6('0x63'))[_0xb2a6('0x23')]('OpenchannelQueueId\x20=\x20?',_0x4c15e5[_0xb2a6('0x28')]['id']);for(var _0x4556b4=0x0;_0x4556b4<_0x2b6acf['length'];_0x4556b4+=0x1){let _0x58f1d2=_0x2b6acf[_0x4556b4];for(var _0x4909e8=0x0;_0x4909e8<_0x58f1d2[_0xb2a6('0x54')]['length'];_0x4909e8+=0x1){let _0x579ff9=_0x58f1d2[_0xb2a6('0x54')][_0x4909e8];var _0x1b02c9=_0x2abc86[_0xb2a6('0x64')]();_0x1b02c9[_0xb2a6('0x23')](_0xb2a6('0x65'),_0x579ff9['id']);_0x2a6c76[_0xb2a6('0x66')](db['sequelize'][_0xb2a6('0x25')](_0x1b02c9[_0xb2a6('0x67')](),{'type':db['sequelize']['QueryTypes'][_0xb2a6('0x68')]})[_0xb2a6('0x15')](function(_0x17d376){if(_0x17d376[_0xb2a6('0x2e')]===0x1){return _0x579ff9['id'];}else{var _0x51ce0c=_[_0xb2a6('0x69')](_[_0xb2a6('0x47')](_0x17d376,_0xb2a6('0x6a')),function(_0x321978){return _[_0xb2a6('0x6b')](_0x4812a6,_0x321978);});if(_0x51ce0c){return _0x579ff9['id'];}}}));}}return BPromise[_0xb2a6('0x6c')](_0x2a6c76)[_0xb2a6('0x15')](function(_0x572694){_0x3db285=_(_0x3db285)[_0xb2a6('0x6d')](_0x572694)[_0xb2a6('0x6e')]()[_0xb2a6('0x6f')]();return db[_0xb2a6('0x1e')]['find']({'where':{'id':_0x4c15e5[_0xb2a6('0x28')]['id']}})[_0xb2a6('0x15')](function(_0x4c3d6d){return db[_0xb2a6('0x57')][_0xb2a6('0x70')](function(_0xa03d1c){return _0x4c3d6d[_0xb2a6('0x5c')](_0x4c15e5[_0xb2a6('0x25')][_0xb2a6('0x52')],{'transaction':_0xa03d1c})[_0xb2a6('0x15')](function(){if(!_[_0xb2a6('0x71')](_0x3db285)){return _0x4c3d6d[_0xb2a6('0x72')](_0x3db285,{'transaction':_0xa03d1c});}})[_0xb2a6('0x15')](function(){_0x3db285['forEach'](function(_0x2e7f53){socket[_0xb2a6('0x5a')]('userOpenchannelQueue:remove',{'UserId':_0x2e7f53,'OpenchannelQueueId':_0x4c3d6d['id']});});});});});});})[_0xb2a6('0x15')](respondWithStatusCode(_0x4f0e17,null))[_0xb2a6('0x33')](handleError(_0x4f0e17,null));};exports['addAgents']=function(_0x43ce83,_0x5f2842){return db['OpenchannelQueue'][_0xb2a6('0x32')]({'where':{'id':_0x43ce83['params']['id']}})[_0xb2a6('0x15')](handleEntityNotFound(_0x5f2842,null))[_0xb2a6('0x15')](function(_0x50f3f4){if(_0x50f3f4){return _0x50f3f4[_0xb2a6('0x73')](_0x43ce83[_0xb2a6('0x35')][_0xb2a6('0x52')],_['omit'](_0x43ce83[_0xb2a6('0x35')],[_0xb2a6('0x52'),'id'])||{})[_0xb2a6('0x74')](function(_0x5e0ee7){for(var _0x23eb14=0x0;_0x23eb14<_0x43ce83[_0xb2a6('0x35')][_0xb2a6('0x52')][_0xb2a6('0x2e')];_0x23eb14+=0x1){socket['emit']('userOpenchannelQueue:save',{'UserId':Number(_0x43ce83[_0xb2a6('0x35')][_0xb2a6('0x52')][_0x23eb14]),'OpenchannelQueueId':Number(_0x43ce83['params']['id'])});}return _0x5e0ee7;});}})[_0xb2a6('0x15')](respondWithResult(_0x5f2842,null))[_0xb2a6('0x33')](handleError(_0x5f2842,null));};exports['removeAgents']=function(_0x365e1b,_0x16dd8c){return db[_0xb2a6('0x1e')][_0xb2a6('0x32')]({'where':{'id':_0x365e1b['params']['id']}})[_0xb2a6('0x15')](handleEntityNotFound(_0x16dd8c,null))[_0xb2a6('0x15')](function(_0x322b65){if(_0x322b65){return _0x322b65[_0xb2a6('0x72')](_0x365e1b[_0xb2a6('0x25')][_0xb2a6('0x52')])[_0xb2a6('0x15')](function(){if(_[_0xb2a6('0x75')](_0x365e1b[_0xb2a6('0x25')]['ids'])){for(var _0x3c05d7=0x0;_0x3c05d7<_0x365e1b['query'][_0xb2a6('0x52')][_0xb2a6('0x2e')];_0x3c05d7+=0x1){socket[_0xb2a6('0x5a')](_0xb2a6('0x76'),{'UserId':Number(_0x365e1b[_0xb2a6('0x25')][_0xb2a6('0x52')][_0x3c05d7]),'OpenchannelQueueId':Number(_0x365e1b[_0xb2a6('0x28')]['id'])});}}else{socket[_0xb2a6('0x5a')](_0xb2a6('0x76'),{'UserId':Number(_0x365e1b['query']['ids']),'OpenchannelQueueId':Number(_0x365e1b[_0xb2a6('0x28')]['id'])});}});}})['then'](respondWithStatusCode(_0x16dd8c,null))[_0xb2a6('0x33')](handleError(_0x16dd8c,null));};exports[_0xb2a6('0x77')]=function(_0x46e9aa,_0x216499){var _0x41eba8={};var _0xdb70b8={};var _0x40b1df;var _0x189ec4;return db[_0xb2a6('0x1e')]['findOne']({'where':{'id':_0x46e9aa[_0xb2a6('0x28')]['id']}})['then'](handleEntityNotFound(_0x216499,null))['then'](function(_0x356993){if(_0x356993){_0x40b1df=_0x356993;_0xdb70b8[_0xb2a6('0x29')]=_[_0xb2a6('0x2a')](db[_0xb2a6('0x49')][_0xb2a6('0x1f')]);_0xdb70b8[_0xb2a6('0x25')]=_['keys'](_0x46e9aa['query']);_0xdb70b8[_0xb2a6('0x2b')]=_['intersection'](_0xdb70b8[_0xb2a6('0x29')],_0xdb70b8[_0xb2a6('0x25')]);_0x41eba8['attributes']=_[_0xb2a6('0x40')](_0xdb70b8[_0xb2a6('0x29')],qs['fields'](_0x46e9aa['query'][_0xb2a6('0x2c')]));_0x41eba8[_0xb2a6('0x2d')]=_0x41eba8['attributes'][_0xb2a6('0x2e')]?_0x41eba8[_0xb2a6('0x2d')]:_0xdb70b8['model'];_0x41eba8[_0xb2a6('0x43')]=qs[_0xb2a6('0x44')](_0x46e9aa[_0xb2a6('0x25')][_0xb2a6('0x44')]);_0x41eba8[_0xb2a6('0x23')]=qs[_0xb2a6('0x2b')](_[_0xb2a6('0x45')](_0x46e9aa[_0xb2a6('0x25')],_0xdb70b8[_0xb2a6('0x2b')]));if(_0x46e9aa['query'][_0xb2a6('0x46')]){_0x41eba8[_0xb2a6('0x23')]=_[_0xb2a6('0x30')](_0x41eba8[_0xb2a6('0x23')],{'$or':_[_0xb2a6('0x47')](_0x41eba8[_0xb2a6('0x2d')],function(_0x5006ef){var _0x50da6b={};_0x50da6b[_0x5006ef]={'$like':'%'+_0x46e9aa[_0xb2a6('0x25')][_0xb2a6('0x46')]+'%'};return _0x50da6b;})});}_0x41eba8=_[_0xb2a6('0x30')]({},_0x41eba8,_0x46e9aa['options']);return _0x40b1df[_0xb2a6('0x77')](_0x41eba8);}})[_0xb2a6('0x15')](function(_0x5e70e3){if(_0x5e70e3){_0x189ec4=_0x5e70e3[_0xb2a6('0x2e')];if(!_0x46e9aa['query'][_0xb2a6('0x41')](_0xb2a6('0x42'))){_0x41eba8['limit']=qs[_0xb2a6('0x10')](_0x46e9aa[_0xb2a6('0x25')][_0xb2a6('0x10')]);_0x41eba8[_0xb2a6('0xe')]=qs[_0xb2a6('0xe')](_0x46e9aa[_0xb2a6('0x25')]['offset']);}return _0x40b1df['getAgents'](_0x41eba8);}})['then'](function(_0x3474f8){if(_0x3474f8){return _0x3474f8?{'count':_0x189ec4,'rows':_0x3474f8}:null;}})[_0xb2a6('0x15')](respondWithResult(_0x216499,null))['catch'](handleError(_0x216499,null));};
\ No newline at end of file
+var _0x3a79=['./openchannelQueue.socket','register','end','status','json','offset','undefined','limit','count','set','Content-Range','OpenchannelQueues','UserProfileResource','destroy','then','error','stack','name','send','map','OpenchannelQueue','rawAttributes','fieldName','type','key','getOptions','where','include','query','findAll','rows','catch','params','model','keys','filters','intersection','attributes','fields','length','merge','options','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','describe','getMembers','findOne','UserOpenchannelQueue','hasOwnProperty','nolimit','order','sort','pick','filter','User','findAndCountAll','UserId','agent','openchannelPause','updatedAt','createdAt','format','%s/%s','SIP','Team','getTeams','ids','Agents','online','interface','findOrCreate','forEach','emit','removeTeams','select','tq.TeamId','from','team_has_openchannel_queues','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','OpenchannelQueueId\x20=\x20?','ut.UserId\x20=\x20?','sequelize','toString','QueryTypes','TeamId','includes','union','compact','transaction','isEmpty','removeAgents','addAgents','omit','spread','userOpenchannelQueue:save','isArray','userOpenchannelQueue:remove','getAgents','util','ioredis','../../components/parsers/qs','../../config/logger','api','../../config/environment','redis','defaults'];(function(_0x4c6080,_0x31ba8c){var _0x4b86f9=function(_0x5db233){while(--_0x5db233){_0x4c6080['push'](_0x4c6080['shift']());}};_0x4b86f9(++_0x31ba8c);}(_0x3a79,0xe0));var _0x93a7=function(_0x216ced,_0x5ad19e){_0x216ced=_0x216ced-0x0;var _0x3fed2b=_0x3a79[_0x216ced];return _0x3fed2b;};'use strict';var BPromise=require('bluebird');var util=require(_0x93a7('0x0'));var _=require('lodash');var squel=require('squel');var Redis=require(_0x93a7('0x1'));var qs=require(_0x93a7('0x2'));var logger=require(_0x93a7('0x3'))(_0x93a7('0x4'));var config=require(_0x93a7('0x5'));var db=require('../../mysqldb')['db'];config[_0x93a7('0x6')]=_[_0x93a7('0x7')](config[_0x93a7('0x6')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x93a7('0x6')]));require(_0x93a7('0x8'))[_0x93a7('0x9')](socket);function respondWithStatusCode(_0x4726c5,_0x13ebe2){_0x13ebe2=_0x13ebe2||0xcc;return function(_0x5e6baa){if(_0x5e6baa){return _0x4726c5['sendStatus'](_0x13ebe2);}return _0x4726c5['status'](_0x13ebe2)[_0x93a7('0xa')]();};}function respondWithResult(_0x56115c,_0x4fb369){_0x4fb369=_0x4fb369||0xc8;return function(_0x41a9f2){if(_0x41a9f2){return _0x56115c[_0x93a7('0xb')](_0x4fb369)[_0x93a7('0xc')](_0x41a9f2);}};}function respondWithFilteredResult(_0x1a0422,_0x41c244){return function(_0x2a74f1){if(_0x2a74f1){var _0x892616=typeof _0x41c244[_0x93a7('0xd')]===_0x93a7('0xe')&&typeof _0x41c244[_0x93a7('0xf')]===_0x93a7('0xe');var _0x2b35c0=_0x2a74f1[_0x93a7('0x10')];var _0x44ad56=_0x892616?0x0:_0x41c244['offset'];var _0x12b6c0=_0x892616?_0x2a74f1[_0x93a7('0x10')]:_0x41c244[_0x93a7('0xd')]+_0x41c244['limit'];var _0x21e640;if(_0x12b6c0>=_0x2b35c0){_0x12b6c0=_0x2b35c0;_0x21e640=0xc8;}else{_0x21e640=0xce;}_0x1a0422[_0x93a7('0xb')](_0x21e640);return _0x1a0422[_0x93a7('0x11')](_0x93a7('0x12'),_0x44ad56+'-'+_0x12b6c0+'/'+_0x2b35c0)[_0x93a7('0xc')](_0x2a74f1);}return null;};}function saveUpdates(_0x77a106){return function(_0x13c3aa){if(_0x13c3aa){return _0x13c3aa['update'](_0x77a106)['then'](function(_0x1712e1){return _0x1712e1;});}return null;};}function removeEntity(_0x2222e2){return function(_0x2cec0e){if(_0x2cec0e){return _0x2cec0e['destroy']()['then'](function(){var _0x3de31e=_0x2cec0e['get']({'plain':!![]});var _0x2b35e0=_0x93a7('0x13');return db[_0x93a7('0x14')][_0x93a7('0x15')]({'where':{'type':_0x2b35e0,'resourceId':_0x3de31e['id']}})[_0x93a7('0x16')](function(){return _0x2cec0e;});})['then'](function(){_0x2222e2[_0x93a7('0xb')](0xcc)[_0x93a7('0xa')]();});}};}function handleEntityNotFound(_0x280841){return function(_0x49948c){if(!_0x49948c){_0x280841['sendStatus'](0x194);}return _0x49948c;};}function handleError(_0x50584c,_0x56a129){_0x56a129=_0x56a129||0x1f4;return function(_0x41e2ff){logger[_0x93a7('0x17')](_0x41e2ff[_0x93a7('0x18')]);if(_0x41e2ff[_0x93a7('0x19')]){delete _0x41e2ff[_0x93a7('0x19')];}_0x50584c[_0x93a7('0xb')](_0x56a129)[_0x93a7('0x1a')](_0x41e2ff);};}exports['index']=function(_0x490b81,_0x44dc34){var _0x2d389c={};var _0x362942={'count':0x0,'rows':[]};var _0x127fd8=_[_0x93a7('0x1b')](db[_0x93a7('0x1c')][_0x93a7('0x1d')],function(_0x45fbcf){return{'name':_0x45fbcf[_0x93a7('0x1e')],'type':_0x45fbcf[_0x93a7('0x1f')][_0x93a7('0x20')]};});_0x2d389c=qs[_0x93a7('0x21')](_0x127fd8,_0x490b81);var _0x51565f={'where':_0x2d389c[_0x93a7('0x22')]};return db[_0x93a7('0x1c')][_0x93a7('0x10')](_0x51565f)[_0x93a7('0x16')](function(_0x181f44){_0x362942[_0x93a7('0x10')]=_0x181f44;_0x2d389c[_0x93a7('0x23')]=qs[_0x93a7('0x23')](_0x490b81[_0x93a7('0x24')]);return db['OpenchannelQueue'][_0x93a7('0x25')](_0x2d389c);})[_0x93a7('0x16')](function(_0x3b0748){_0x362942[_0x93a7('0x26')]=_0x3b0748;return _0x362942;})[_0x93a7('0x16')](respondWithFilteredResult(_0x44dc34,_0x2d389c))[_0x93a7('0x27')](handleError(_0x44dc34,null));};exports['show']=function(_0xc68e82,_0x8075a1){var _0x2143fe={'raw':!![],'where':{'id':_0xc68e82[_0x93a7('0x28')]['id']}},_0x17ef83={};_0x17ef83[_0x93a7('0x29')]=_[_0x93a7('0x2a')](db[_0x93a7('0x1c')]['rawAttributes']);_0x17ef83[_0x93a7('0x24')]=_[_0x93a7('0x2a')](_0xc68e82[_0x93a7('0x24')]);_0x17ef83[_0x93a7('0x2b')]=_[_0x93a7('0x2c')](_0x17ef83['model'],_0x17ef83['query']);_0x2143fe[_0x93a7('0x2d')]=_[_0x93a7('0x2c')](_0x17ef83[_0x93a7('0x29')],qs[_0x93a7('0x2e')](_0xc68e82['query'][_0x93a7('0x2e')]));_0x2143fe[_0x93a7('0x2d')]=_0x2143fe[_0x93a7('0x2d')][_0x93a7('0x2f')]?_0x2143fe['attributes']:_0x17ef83['model'];if(_0xc68e82[_0x93a7('0x24')]['includeAll']){_0x2143fe[_0x93a7('0x23')]=[{'all':!![]}];}_0x2143fe=_[_0x93a7('0x30')]({},_0x2143fe,_0xc68e82[_0x93a7('0x31')]);return db[_0x93a7('0x1c')][_0x93a7('0x32')](_0x2143fe)[_0x93a7('0x16')](handleEntityNotFound(_0x8075a1,null))['then'](respondWithResult(_0x8075a1,null))['catch'](handleError(_0x8075a1,null));};exports['create']=function(_0x303942,_0x43e7bb){return db[_0x93a7('0x1c')][_0x93a7('0x33')](_0x303942[_0x93a7('0x34')],{})[_0x93a7('0x16')](function(_0x4a85a8){var _0x22f756=_0x303942[_0x93a7('0x35')][_0x93a7('0x36')]({'plain':!![]});if(!_0x22f756)throw new Error(_0x93a7('0x37'));if(_0x22f756['role']==='user'){var _0x124667=_0x4a85a8[_0x93a7('0x36')]({'plain':!![]});var _0x2a3e28=_0x93a7('0x13');return db[_0x93a7('0x38')][_0x93a7('0x32')]({'where':{'name':_0x2a3e28,'userProfileId':_0x22f756[_0x93a7('0x39')]},'raw':!![]})['then'](function(_0xfb0eba){if(_0xfb0eba&&_0xfb0eba[_0x93a7('0x3a')]===0x0){return db[_0x93a7('0x14')]['create']({'name':_0x124667[_0x93a7('0x19')],'resourceId':_0x124667['id'],'type':_0xfb0eba[_0x93a7('0x19')],'sectionId':_0xfb0eba['id']},{})[_0x93a7('0x16')](function(){return _0x4a85a8;});}else{return _0x4a85a8;}})[_0x93a7('0x27')](function(_0x3bd6f7){logger[_0x93a7('0x17')](_0x93a7('0x3b'),_0x3bd6f7);throw _0x3bd6f7;});}return _0x4a85a8;})['then'](respondWithResult(_0x43e7bb,0xc9))[_0x93a7('0x27')](handleError(_0x43e7bb,null));};exports[_0x93a7('0x3c')]=function(_0x4058b8,_0x4d5b34){if(_0x4058b8[_0x93a7('0x34')]['id']){delete _0x4058b8[_0x93a7('0x34')]['id'];}return db[_0x93a7('0x1c')][_0x93a7('0x32')]({'where':{'id':_0x4058b8[_0x93a7('0x28')]['id']}})[_0x93a7('0x16')](handleEntityNotFound(_0x4d5b34,null))['then'](saveUpdates(_0x4058b8[_0x93a7('0x34')],null))[_0x93a7('0x16')](respondWithResult(_0x4d5b34,null))[_0x93a7('0x27')](handleError(_0x4d5b34,null));};exports[_0x93a7('0x15')]=function(_0x270c44,_0x280d56){return db[_0x93a7('0x1c')][_0x93a7('0x32')]({'where':{'id':_0x270c44['params']['id']}})[_0x93a7('0x16')](handleEntityNotFound(_0x280d56,null))['then'](removeEntity(_0x280d56,null))[_0x93a7('0x27')](handleError(_0x280d56,null));};exports['describe']=function(_0x30b06d,_0x2fb05a){return db['OpenchannelQueue'][_0x93a7('0x3d')]()[_0x93a7('0x16')](respondWithResult(_0x2fb05a,null))['catch'](handleError(_0x2fb05a,null));};exports[_0x93a7('0x3e')]=function(_0x598986,_0x3d72f8){var _0x2bce23={'raw':!![],'where':{}},_0x1caf18={},_0x5a9c36;return db[_0x93a7('0x1c')][_0x93a7('0x3f')]({'where':{'id':_0x598986[_0x93a7('0x28')]['id']}})[_0x93a7('0x16')](handleEntityNotFound(_0x3d72f8,null))[_0x93a7('0x16')](function(_0x28a5ee){if(_0x28a5ee){_0x5a9c36=_0x28a5ee[_0x93a7('0x36')]({'plain':!![]});_0x1caf18['model']=_['keys'](db[_0x93a7('0x40')]['rawAttributes']);_0x1caf18['query']=_['keys'](_0x598986[_0x93a7('0x24')]);_0x1caf18[_0x93a7('0x2b')]=_[_0x93a7('0x2c')](_0x1caf18['model'],_0x1caf18[_0x93a7('0x24')]);_0x2bce23['attributes']=_['intersection'](_0x1caf18['model'],qs['fields'](_0x598986[_0x93a7('0x24')][_0x93a7('0x2e')]));_0x2bce23[_0x93a7('0x2d')]=_0x2bce23[_0x93a7('0x2d')][_0x93a7('0x2f')]?_0x2bce23['attributes']:_0x1caf18['model'];if(!_0x598986[_0x93a7('0x24')][_0x93a7('0x41')](_0x93a7('0x42'))){_0x2bce23[_0x93a7('0xf')]=qs[_0x93a7('0xf')](_0x598986[_0x93a7('0x24')][_0x93a7('0xf')]);_0x2bce23[_0x93a7('0xd')]=qs['offset'](_0x598986[_0x93a7('0x24')][_0x93a7('0xd')]);}_0x2bce23[_0x93a7('0x43')]=qs[_0x93a7('0x44')](_0x598986[_0x93a7('0x24')]['sort']);_0x2bce23[_0x93a7('0x22')]=qs['filters'](_[_0x93a7('0x45')](_0x598986[_0x93a7('0x24')],_0x1caf18[_0x93a7('0x2b')]));_0x2bce23['where']['OpenchannelQueueId']=_0x28a5ee['id'];if(_0x598986[_0x93a7('0x24')][_0x93a7('0x46')]){_0x2bce23['where']=_[_0x93a7('0x30')](_0x2bce23[_0x93a7('0x22')],{'$or':_[_0x93a7('0x1b')](_0x2bce23['attributes'],function(_0x1aaae6){var _0x249ab7={};_0x249ab7[_0x1aaae6]={'$like':'%'+_0x598986[_0x93a7('0x24')][_0x93a7('0x46')]+'%'};return _0x249ab7;})});}_0x2bce23=_[_0x93a7('0x30')]({},_0x2bce23,_0x598986[_0x93a7('0x31')]);return db[_0x93a7('0x40')][_0x93a7('0x25')](_0x2bce23);}})[_0x93a7('0x16')](function(_0x1b819e){if(_0x1b819e){return db[_0x93a7('0x47')][_0x93a7('0x48')]({'where':{'id':_[_0x93a7('0x1b')](_0x1b819e,_0x93a7('0x49')),'role':_0x93a7('0x4a')},'attributes':['id',_0x93a7('0x19'),_0x93a7('0x4b'),_0x93a7('0x4c'),_0x93a7('0x4d')]});}})[_0x93a7('0x16')](function(_0x3d3776){if(_0x3d3776){return{'count':_0x3d3776[_0x93a7('0x10')],'rows':_[_0x93a7('0x1b')](_0x3d3776[_0x93a7('0x26')],function(_0xc3c092){return{'membername':_0xc3c092['name'],'UserId':_0xc3c092['id'],'queue_name':_0x5a9c36[_0x93a7('0x19')],'OpenchannelQueueId':_0x5a9c36['id'],'interface':util[_0x93a7('0x4e')](_0x93a7('0x4f'),_0x93a7('0x50'),_0xc3c092[_0x93a7('0x19')]),'penalty':0x0,'paused':_0xc3c092[_0x93a7('0x4b')],'createdAt':_0xc3c092['createdAt'],'updatedAt':_0xc3c092[_0x93a7('0x4c')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x93a7('0x16')](respondWithFilteredResult(_0x3d72f8,_0x2bce23))[_0x93a7('0x27')](handleError(_0x3d72f8,null));};exports['getTeams']=function(_0x43accc,_0x14dd8c){var _0x2ae023={};var _0x410f56={};var _0x322134;var _0x50baa4;return db['OpenchannelQueue'][_0x93a7('0x3f')]({'where':{'id':_0x43accc[_0x93a7('0x28')]['id']}})[_0x93a7('0x16')](handleEntityNotFound(_0x14dd8c,null))[_0x93a7('0x16')](function(_0x2e829b){if(_0x2e829b){_0x322134=_0x2e829b;_0x410f56['model']=_['keys'](db[_0x93a7('0x51')][_0x93a7('0x1d')]);_0x410f56['query']=_[_0x93a7('0x2a')](_0x43accc[_0x93a7('0x24')]);_0x410f56[_0x93a7('0x2b')]=_[_0x93a7('0x2c')](_0x410f56['model'],_0x410f56['query']);_0x2ae023[_0x93a7('0x2d')]=_['intersection'](_0x410f56[_0x93a7('0x29')],qs['fields'](_0x43accc[_0x93a7('0x24')][_0x93a7('0x2e')]));_0x2ae023[_0x93a7('0x2d')]=_0x2ae023[_0x93a7('0x2d')][_0x93a7('0x2f')]?_0x2ae023[_0x93a7('0x2d')]:_0x410f56['model'];_0x2ae023[_0x93a7('0x43')]=qs[_0x93a7('0x44')](_0x43accc[_0x93a7('0x24')][_0x93a7('0x44')]);_0x2ae023[_0x93a7('0x22')]=qs[_0x93a7('0x2b')](_[_0x93a7('0x45')](_0x43accc[_0x93a7('0x24')],_0x410f56[_0x93a7('0x2b')]));if(_0x43accc[_0x93a7('0x24')][_0x93a7('0x46')]){_0x2ae023['where']=_[_0x93a7('0x30')](_0x2ae023['where'],{'$or':_[_0x93a7('0x1b')](_0x2ae023[_0x93a7('0x2d')],function(_0x1c8767){var _0x541368={};_0x541368[_0x1c8767]={'$like':'%'+_0x43accc[_0x93a7('0x24')][_0x93a7('0x46')]+'%'};return _0x541368;})});}_0x2ae023=_[_0x93a7('0x30')]({},_0x2ae023,_0x43accc['options']);return _0x322134['getTeams'](_0x2ae023);}})['then'](function(_0x59291c){if(_0x59291c){_0x50baa4=_0x59291c[_0x93a7('0x2f')];if(!_0x43accc[_0x93a7('0x24')][_0x93a7('0x41')](_0x93a7('0x42'))){_0x2ae023[_0x93a7('0xf')]=qs['limit'](_0x43accc[_0x93a7('0x24')]['limit']);_0x2ae023[_0x93a7('0xd')]=qs[_0x93a7('0xd')](_0x43accc[_0x93a7('0x24')][_0x93a7('0xd')]);}return _0x322134[_0x93a7('0x52')](_0x2ae023);}})[_0x93a7('0x16')](function(_0x44e6f8){if(_0x44e6f8){return _0x44e6f8?{'count':_0x50baa4,'rows':_0x44e6f8}:null;}})[_0x93a7('0x16')](respondWithResult(_0x14dd8c,null))[_0x93a7('0x27')](handleError(_0x14dd8c,null));};exports['addTeams']=function(_0x16e178,_0x4d976d){var _0x463967=_0x16e178[_0x93a7('0x34')][_0x93a7('0x53')];return db[_0x93a7('0x51')][_0x93a7('0x25')]({'where':{'id':_0x463967},'attributes':['id'],'include':[{'model':db[_0x93a7('0x47')],'as':_0x93a7('0x54'),'attributes':['id',_0x93a7('0x19'),_0x93a7('0x55'),'voicePause',_0x93a7('0x56')],'raw':!![]}]})['then'](function(_0x1891a0){if(_0x1891a0){var _0x2e00f7=_['flatMap'](_0x1891a0,function(_0x44839f){var _0x2316f7=_0x44839f[_0x93a7('0x36')]({'plain':!![]});return _0x2316f7[_0x93a7('0x54')];});return db['OpenchannelQueue']['find']({'where':{'id':_0x16e178['params']['id']}})[_0x93a7('0x16')](function(_0xb31daa){return db['sequelize']['transaction'](function(_0x5a12f0){return _0xb31daa['addTeams'](_0x463967,{'transaction':_0x5a12f0})['then'](function(){return BPromise['each'](_0x2e00f7,function(_0x563a7b){return db['UserOpenchannelQueue'][_0x93a7('0x57')]({'where':{'UserId':_0x563a7b['id'],'OpenchannelQueueId':_0x16e178['params']['id']},'transaction':_0x5a12f0});});})[_0x93a7('0x16')](function(){_0x2e00f7[_0x93a7('0x58')](function(_0x5284c7){socket[_0x93a7('0x59')]('userOpenchannelQueue:save',{'UserId':_0x5284c7['id'],'OpenchannelQueueId':_0xb31daa['id']});});});});});}})[_0x93a7('0x16')](respondWithStatusCode(_0x4d976d,null))[_0x93a7('0x27')](handleError(_0x4d976d,null));};exports[_0x93a7('0x5a')]=function(_0x577a63,_0x222c80){return db[_0x93a7('0x51')]['findAll']({'where':{'id':_0x577a63['query']['ids']},'attributes':['id'],'include':[{'model':db[_0x93a7('0x47')],'as':'Agents','attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x222c80,null))[_0x93a7('0x16')](function(_0x2b9a76){var _0x1bb7c2=_[_0x93a7('0x1b')](_0x2b9a76,'id');var _0x639bf7=[];var _0x30ba97=[];var _0x38699a=squel[_0x93a7('0x5b')]();_0x38699a['field'](_0x93a7('0x5c'))[_0x93a7('0x5d')](_0x93a7('0x5e'),'tq')['join'](_0x93a7('0x5f'),'ut',_0x93a7('0x60'))['where'](_0x93a7('0x61'),_0x577a63[_0x93a7('0x28')]['id']);for(var _0x2f0c28=0x0;_0x2f0c28<_0x2b9a76[_0x93a7('0x2f')];_0x2f0c28+=0x1){let _0x1e72e6=_0x2b9a76[_0x2f0c28];for(var _0x5edfda=0x0;_0x5edfda<_0x1e72e6[_0x93a7('0x54')][_0x93a7('0x2f')];_0x5edfda+=0x1){let _0x526249=_0x1e72e6[_0x93a7('0x54')][_0x5edfda];var _0x15075c=_0x38699a['clone']();_0x15075c[_0x93a7('0x22')](_0x93a7('0x62'),_0x526249['id']);_0x30ba97['push'](db[_0x93a7('0x63')][_0x93a7('0x24')](_0x15075c[_0x93a7('0x64')](),{'type':db[_0x93a7('0x63')][_0x93a7('0x65')]['SELECT']})['then'](function(_0x249516){if(_0x249516['length']===0x1){return _0x526249['id'];}else{var _0x24f93b=_['every'](_['map'](_0x249516,_0x93a7('0x66')),function(_0xe57b90){return _[_0x93a7('0x67')](_0x1bb7c2,_0xe57b90);});if(_0x24f93b){return _0x526249['id'];}}}));}}return BPromise['all'](_0x30ba97)[_0x93a7('0x16')](function(_0x4782e3){_0x639bf7=_(_0x639bf7)[_0x93a7('0x68')](_0x4782e3)[_0x93a7('0x69')]()['value']();return db[_0x93a7('0x1c')][_0x93a7('0x32')]({'where':{'id':_0x577a63[_0x93a7('0x28')]['id']}})[_0x93a7('0x16')](function(_0xaaeb4){return db['sequelize'][_0x93a7('0x6a')](function(_0x2b2222){return _0xaaeb4[_0x93a7('0x5a')](_0x577a63['query'][_0x93a7('0x53')],{'transaction':_0x2b2222})['then'](function(){if(!_[_0x93a7('0x6b')](_0x639bf7)){return _0xaaeb4[_0x93a7('0x6c')](_0x639bf7,{'transaction':_0x2b2222});}})[_0x93a7('0x16')](function(){_0x639bf7['forEach'](function(_0x4e0b4b){socket[_0x93a7('0x59')]('userOpenchannelQueue:remove',{'UserId':_0x4e0b4b,'OpenchannelQueueId':_0xaaeb4['id']});});});});});});})['then'](respondWithStatusCode(_0x222c80,null))[_0x93a7('0x27')](handleError(_0x222c80,null));};exports['addAgents']=function(_0x3a526a,_0x4c1ca9){return db['OpenchannelQueue'][_0x93a7('0x32')]({'where':{'id':_0x3a526a[_0x93a7('0x28')]['id']}})[_0x93a7('0x16')](handleEntityNotFound(_0x4c1ca9,null))[_0x93a7('0x16')](function(_0xf8c119){if(_0xf8c119){return _0xf8c119[_0x93a7('0x6d')](_0x3a526a[_0x93a7('0x34')][_0x93a7('0x53')],_[_0x93a7('0x6e')](_0x3a526a[_0x93a7('0x34')],[_0x93a7('0x53'),'id'])||{})[_0x93a7('0x6f')](function(_0x68d686){for(var _0xcc4b6e=0x0;_0xcc4b6e<_0x3a526a[_0x93a7('0x34')]['ids'][_0x93a7('0x2f')];_0xcc4b6e+=0x1){socket['emit'](_0x93a7('0x70'),{'UserId':Number(_0x3a526a[_0x93a7('0x34')]['ids'][_0xcc4b6e]),'OpenchannelQueueId':Number(_0x3a526a[_0x93a7('0x28')]['id'])});}return _0x68d686;});}})[_0x93a7('0x16')](respondWithResult(_0x4c1ca9,null))[_0x93a7('0x27')](handleError(_0x4c1ca9,null));};exports[_0x93a7('0x6c')]=function(_0x2fa5ba,_0x3337c6){return db[_0x93a7('0x1c')]['find']({'where':{'id':_0x2fa5ba['params']['id']}})[_0x93a7('0x16')](handleEntityNotFound(_0x3337c6,null))[_0x93a7('0x16')](function(_0x18c608){if(_0x18c608){return _0x18c608[_0x93a7('0x6c')](_0x2fa5ba[_0x93a7('0x24')]['ids'])[_0x93a7('0x16')](function(){if(_[_0x93a7('0x71')](_0x2fa5ba['query'][_0x93a7('0x53')])){for(var _0x39071f=0x0;_0x39071f<_0x2fa5ba['query'][_0x93a7('0x53')][_0x93a7('0x2f')];_0x39071f+=0x1){socket[_0x93a7('0x59')]('userOpenchannelQueue:remove',{'UserId':Number(_0x2fa5ba['query'][_0x93a7('0x53')][_0x39071f]),'OpenchannelQueueId':Number(_0x2fa5ba[_0x93a7('0x28')]['id'])});}}else{socket[_0x93a7('0x59')](_0x93a7('0x72'),{'UserId':Number(_0x2fa5ba[_0x93a7('0x24')][_0x93a7('0x53')]),'OpenchannelQueueId':Number(_0x2fa5ba[_0x93a7('0x28')]['id'])});}});}})[_0x93a7('0x16')](respondWithStatusCode(_0x3337c6,null))[_0x93a7('0x27')](handleError(_0x3337c6,null));};exports[_0x93a7('0x73')]=function(_0x3d4241,_0x3dd75d){var _0xff62f5={};var _0xa71136={};var _0x20212a;var _0x374e79;return db['OpenchannelQueue'][_0x93a7('0x3f')]({'where':{'id':_0x3d4241[_0x93a7('0x28')]['id']}})[_0x93a7('0x16')](handleEntityNotFound(_0x3dd75d,null))[_0x93a7('0x16')](function(_0x34459f){if(_0x34459f){_0x20212a=_0x34459f;_0xa71136[_0x93a7('0x29')]=_[_0x93a7('0x2a')](db['User'][_0x93a7('0x1d')]);_0xa71136[_0x93a7('0x24')]=_[_0x93a7('0x2a')](_0x3d4241[_0x93a7('0x24')]);_0xa71136[_0x93a7('0x2b')]=_[_0x93a7('0x2c')](_0xa71136[_0x93a7('0x29')],_0xa71136[_0x93a7('0x24')]);_0xff62f5[_0x93a7('0x2d')]=_[_0x93a7('0x2c')](_0xa71136['model'],qs[_0x93a7('0x2e')](_0x3d4241[_0x93a7('0x24')][_0x93a7('0x2e')]));_0xff62f5[_0x93a7('0x2d')]=_0xff62f5[_0x93a7('0x2d')][_0x93a7('0x2f')]?_0xff62f5['attributes']:_0xa71136[_0x93a7('0x29')];_0xff62f5[_0x93a7('0x43')]=qs[_0x93a7('0x44')](_0x3d4241[_0x93a7('0x24')][_0x93a7('0x44')]);_0xff62f5[_0x93a7('0x22')]=qs[_0x93a7('0x2b')](_['pick'](_0x3d4241['query'],_0xa71136['filters']));if(_0x3d4241[_0x93a7('0x24')]['filter']){_0xff62f5[_0x93a7('0x22')]=_[_0x93a7('0x30')](_0xff62f5[_0x93a7('0x22')],{'$or':_['map'](_0xff62f5[_0x93a7('0x2d')],function(_0x210f4b){var _0x4e9384={};_0x4e9384[_0x210f4b]={'$like':'%'+_0x3d4241['query'][_0x93a7('0x46')]+'%'};return _0x4e9384;})});}_0xff62f5=_[_0x93a7('0x30')]({},_0xff62f5,_0x3d4241[_0x93a7('0x31')]);return _0x20212a[_0x93a7('0x73')](_0xff62f5);}})[_0x93a7('0x16')](function(_0x5cadd7){if(_0x5cadd7){_0x374e79=_0x5cadd7[_0x93a7('0x2f')];if(!_0x3d4241['query'][_0x93a7('0x41')](_0x93a7('0x42'))){_0xff62f5[_0x93a7('0xf')]=qs[_0x93a7('0xf')](_0x3d4241[_0x93a7('0x24')][_0x93a7('0xf')]);_0xff62f5[_0x93a7('0xd')]=qs[_0x93a7('0xd')](_0x3d4241['query'][_0x93a7('0xd')]);}return _0x20212a[_0x93a7('0x73')](_0xff62f5);}})['then'](function(_0x45c5d4){if(_0x45c5d4){return _0x45c5d4?{'count':_0x374e79,'rows':_0x45c5d4}:null;}})['then'](respondWithResult(_0x3dd75d,null))[_0x93a7('0x27')](handleError(_0x3dd75d,null));};
\ No newline at end of file
index 949ebe1..1910781 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3afc=['exports','events','../../mysqldb','OpenchannelQueue','setMaxListeners','save','remove','emit','hasOwnProperty'];(function(_0x1eb193,_0x2dea5b){var _0x52dab2=function(_0x34005){while(--_0x34005){_0x1eb193['push'](_0x1eb193['shift']());}};_0x52dab2(++_0x2dea5b);}(_0x3afc,0x172));var _0xc3af=function(_0x5e2248,_0x140e9d){_0x5e2248=_0x5e2248-0x0;var _0x2bdb09=_0x3afc[_0x5e2248];return _0x2bdb09;};'use strict';var EventEmitter=require(_0xc3af('0x0'));var OpenchannelQueue=require(_0xc3af('0x1'))['db'][_0xc3af('0x2')];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0xc3af('0x3')](0x0);var events={'afterCreate':_0xc3af('0x4'),'afterUpdate':'update','afterDestroy':_0xc3af('0x5')};function emitEvent(_0xdb5fd4){return function(_0xdec2e4,_0x2ed1c3,_0x33a09c){OpenchannelQueueEvents[_0xc3af('0x6')](_0xdb5fd4+':'+_0xdec2e4['id'],_0xdec2e4);OpenchannelQueueEvents[_0xc3af('0x6')](_0xdb5fd4,_0xdec2e4);_0x33a09c(null);};}for(var e in events){if(events[_0xc3af('0x7')](e)){var event=events[e];OpenchannelQueue['hook'](e,emitEvent(event));}}module[_0xc3af('0x8')]=OpenchannelQueueEvents;
\ No newline at end of file
+var _0x1445=['hasOwnProperty','hook','exports','events','../../mysqldb','setMaxListeners','save','update','remove','emit'];(function(_0x815c23,_0x577e3a){var _0x357aa1=function(_0x289b7a){while(--_0x289b7a){_0x815c23['push'](_0x815c23['shift']());}};_0x357aa1(++_0x577e3a);}(_0x1445,0xa3));var _0x5144=function(_0x5a2e3e,_0x34dcf9){_0x5a2e3e=_0x5a2e3e-0x0;var _0x2c8a57=_0x1445[_0x5a2e3e];return _0x2c8a57;};'use strict';var EventEmitter=require(_0x5144('0x0'));var OpenchannelQueue=require(_0x5144('0x1'))['db']['OpenchannelQueue'];var OpenchannelQueueEvents=new EventEmitter();OpenchannelQueueEvents[_0x5144('0x2')](0x0);var events={'afterCreate':_0x5144('0x3'),'afterUpdate':_0x5144('0x4'),'afterDestroy':_0x5144('0x5')};function emitEvent(_0x3fa388){return function(_0x57b220,_0x104eb7,_0x56202e){OpenchannelQueueEvents[_0x5144('0x6')](_0x3fa388+':'+_0x57b220['id'],_0x57b220);OpenchannelQueueEvents[_0x5144('0x6')](_0x3fa388,_0x57b220);_0x56202e(null);};}for(var e in events){if(events[_0x5144('0x7')](e)){var event=events[e];OpenchannelQueue[_0x5144('0x8')](e,emitEvent(event));}}module[_0x5144('0x9')]=OpenchannelQueueEvents;
\ No newline at end of file
index 80a0e9e..94fb9de 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x33a7=['bluebird','request-promise','path','rimraf','./openchannelQueue.attributes','define','openchannel_queues','util','../../config/logger','moment'];(function(_0xed4881,_0x45771c){var _0x7fcbd5=function(_0x36b960){while(--_0x36b960){_0xed4881['push'](_0xed4881['shift']());}};_0x7fcbd5(++_0x45771c);}(_0x33a7,0x115));var _0x733a=function(_0x18776a,_0x4fecab){_0x18776a=_0x18776a-0x0;var _0x484e4a=_0x33a7[_0x18776a];return _0x484e4a;};'use strict';var _=require('lodash');var util=require(_0x733a('0x0'));var logger=require(_0x733a('0x1'))('api');var moment=require(_0x733a('0x2'));var BPromise=require(_0x733a('0x3'));var rp=require(_0x733a('0x4'));var fs=require('fs');var path=require(_0x733a('0x5'));var rimraf=require(_0x733a('0x6'));var config=require('../../config/environment');var attributes=require(_0x733a('0x7'));module['exports']=function(_0x56356f,_0x398dc2){return _0x56356f[_0x733a('0x8')]('OpenchannelQueue',attributes,{'tableName':_0x733a('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x956b=['../../config/logger','api','bluebird','path','rimraf','./openchannelQueue.attributes','exports','define','OpenchannelQueue','openchannel_queues','lodash'];(function(_0x49330c,_0x33369c){var _0x4f72b8=function(_0x3ac5f4){while(--_0x3ac5f4){_0x49330c['push'](_0x49330c['shift']());}};_0x4f72b8(++_0x33369c);}(_0x956b,0x99));var _0xb956=function(_0x1cd356,_0x5b32d4){_0x1cd356=_0x1cd356-0x0;var _0x3c8235=_0x956b[_0x1cd356];return _0x3c8235;};'use strict';var _=require(_0xb956('0x0'));var util=require('util');var logger=require(_0xb956('0x1'))(_0xb956('0x2'));var moment=require('moment');var BPromise=require(_0xb956('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb956('0x4'));var rimraf=require(_0xb956('0x5'));var config=require('../../config/environment');var attributes=require(_0xb956('0x6'));module[_0xb956('0x7')]=function(_0x4ff54a,_0x182fbc){return _0x4ff54a[_0xb956('0x8')](_0xb956('0x9'),attributes,{'tableName':_0xb956('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 709ca62..56f45dd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4082=['../../config/logger','rpc','../../config/environment','jayson/promise','http','defaults','redis','localhost','socket.io-emitter','./openchannelQueue.socket','register','info','OpenchannelQueue,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','catch','GetOpenchannelQueue','OpenchannelQueue','findAll','options','raw','attributes','limit','map','include','model','then','debug','find','where','ShowOpenchannelQueue','util','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0x47269d,_0x3fdba1){var _0x186a6e=function(_0x38d4){while(--_0x38d4){_0x47269d['push'](_0x47269d['shift']());}};_0x186a6e(++_0x3fdba1);}(_0x4082,0x1cf));var _0x2408=function(_0xbe200f,_0x4b50eb){_0xbe200f=_0xbe200f-0x0;var _0x192597=_0x4082[_0xbe200f];return _0x192597;};'use strict';var _=require('lodash');var util=require(_0x2408('0x0'));var moment=require('moment');var BPromise=require(_0x2408('0x1'));var rs=require(_0x2408('0x2'));var fs=require('fs');var Redis=require(_0x2408('0x3'));var db=require(_0x2408('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x2408('0x5'))(_0x2408('0x6'));var config=require(_0x2408('0x7'));var jayson=require(_0x2408('0x8'));var client=jayson['client'][_0x2408('0x9')]({'port':0x232a});config['redis']=_[_0x2408('0xa')](config[_0x2408('0xb')],{'host':_0x2408('0xc'),'port':0x18eb});var socket=require(_0x2408('0xd'))(new Redis(config[_0x2408('0xb')]));require(_0x2408('0xe'))[_0x2408('0xf')](socket);function respondWithRpcPromise(_0x304b8b,_0x139d7a,_0x4ec76e){return new BPromise(function(_0x51105a,_0x40c996){return client['request'](_0x304b8b,_0x4ec76e)['then'](function(_0xdcfd65){logger[_0x2408('0x10')](_0x2408('0x11'),_0x139d7a,_0x2408('0x12'));logger['debug']('OpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x139d7a,_0x2408('0x12'),JSON[_0x2408('0x13')](_0xdcfd65));if(_0xdcfd65[_0x2408('0x14')]){if(_0xdcfd65[_0x2408('0x14')]['code']===0x1f4){logger[_0x2408('0x14')](_0x2408('0x11'),_0x139d7a,_0xdcfd65[_0x2408('0x14')]['message']);return _0x40c996(_0xdcfd65[_0x2408('0x14')]['message']);}logger[_0x2408('0x14')](_0x2408('0x11'),_0x139d7a,_0xdcfd65['error'][_0x2408('0x15')]);return _0x51105a(_0xdcfd65[_0x2408('0x14')]['message']);}else{logger[_0x2408('0x10')](_0x2408('0x11'),_0x139d7a,_0x2408('0x12'));_0x51105a(_0xdcfd65[_0x2408('0x16')][_0x2408('0x15')]);}})[_0x2408('0x17')](function(_0x3416f9){logger[_0x2408('0x14')](_0x2408('0x11'),_0x139d7a,_0x3416f9);_0x40c996(_0x3416f9);});});}exports[_0x2408('0x18')]=function(_0x123135){var _0x458553=this;return new Promise(function(_0x525f4c,_0x2f8e82){return db[_0x2408('0x19')][_0x2408('0x1a')]({'raw':_0x123135[_0x2408('0x1b')]?_0x123135['options'][_0x2408('0x1c')]===undefined?!![]:![]:!![],'where':_0x123135[_0x2408('0x1b')]?_0x123135[_0x2408('0x1b')]['where']||null:null,'attributes':_0x123135[_0x2408('0x1b')]?_0x123135[_0x2408('0x1b')][_0x2408('0x1d')]||null:null,'limit':_0x123135[_0x2408('0x1b')]?_0x123135[_0x2408('0x1b')][_0x2408('0x1e')]||null:null,'include':_0x123135[_0x2408('0x1b')]?_0x123135[_0x2408('0x1b')]['include']?_[_0x2408('0x1f')](_0x123135[_0x2408('0x1b')][_0x2408('0x20')],function(_0x554e70){return{'model':db[_0x554e70[_0x2408('0x21')]],'as':_0x554e70['as'],'attributes':_0x554e70['attributes'],'include':_0x554e70['include']?_['map'](_0x554e70['include'],function(_0x276961){return{'model':db[_0x276961[_0x2408('0x21')]],'as':_0x276961['as'],'attributes':_0x276961[_0x2408('0x1d')],'include':_0x276961[_0x2408('0x20')]?_[_0x2408('0x1f')](_0x276961['include'],function(_0x44f746){return{'model':db[_0x44f746[_0x2408('0x21')]],'as':_0x44f746['as'],'attributes':_0x44f746[_0x2408('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x2408('0x22')](function(_0x68b86c){logger[_0x2408('0x10')]('GetOpenchannelQueue',_0x123135);logger[_0x2408('0x23')](_0x2408('0x18'),_0x123135,JSON['stringify'](_0x68b86c));_0x525f4c(_0x68b86c);})[_0x2408('0x17')](function(_0x4422f8){logger[_0x2408('0x14')](_0x2408('0x18'),_0x4422f8['message'],_0x123135);_0x2f8e82(_0x458553[_0x2408('0x14')](0x1f4,_0x4422f8[_0x2408('0x15')]));});});};exports['ShowOpenchannelQueue']=function(_0x25aeaa){var _0x43f84f=this;return new Promise(function(_0x599fbd,_0x3813db){return db[_0x2408('0x19')][_0x2408('0x24')]({'raw':_0x25aeaa[_0x2408('0x1b')]?_0x25aeaa[_0x2408('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x25aeaa[_0x2408('0x1b')]?_0x25aeaa[_0x2408('0x1b')][_0x2408('0x25')]||null:null,'attributes':_0x25aeaa[_0x2408('0x1b')]?_0x25aeaa[_0x2408('0x1b')][_0x2408('0x1d')]||null:null,'include':_0x25aeaa[_0x2408('0x1b')]?_0x25aeaa[_0x2408('0x1b')][_0x2408('0x20')]?_['map'](_0x25aeaa[_0x2408('0x1b')][_0x2408('0x20')],function(_0x497706){return{'model':db[_0x497706[_0x2408('0x21')]],'as':_0x497706['as'],'attributes':_0x497706['attributes'],'include':_0x497706[_0x2408('0x20')]?_[_0x2408('0x1f')](_0x497706[_0x2408('0x20')],function(_0x3d96d7){return{'model':db[_0x3d96d7[_0x2408('0x21')]],'as':_0x3d96d7['as'],'attributes':_0x3d96d7['attributes'],'include':_0x3d96d7[_0x2408('0x20')]?_['map'](_0x3d96d7[_0x2408('0x20')],function(_0x5accf8){return{'model':db[_0x5accf8[_0x2408('0x21')]],'as':_0x5accf8['as'],'attributes':_0x5accf8[_0x2408('0x1d')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x50addc){logger[_0x2408('0x10')](_0x2408('0x26'),_0x25aeaa);logger[_0x2408('0x23')](_0x2408('0x26'),_0x25aeaa,JSON[_0x2408('0x13')](_0x50addc));_0x599fbd(_0x50addc);})[_0x2408('0x17')](function(_0x2f0bde){logger['error'](_0x2408('0x26'),_0x2f0bde[_0x2408('0x15')],_0x25aeaa);_0x3813db(_0x43f84f[_0x2408('0x14')](0x1f4,_0x2f0bde[_0x2408('0x15')]));});});};
\ No newline at end of file
+var _0xa85a=['raw','where','limit','include','map','model','attributes','ShowOpenchannelQueue','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','register','request','then','info','request\x20sent','debug','OpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','OpenchannelQueue,\x20%s,\x20%s','GetOpenchannelQueue','OpenchannelQueue','findAll','options'];(function(_0x54ea43,_0xaec904){var _0x1ecfaa=function(_0x45e574){while(--_0x45e574){_0x54ea43['push'](_0x54ea43['shift']());}};_0x1ecfaa(++_0xaec904);}(_0xa85a,0x104));var _0xaa85=function(_0x5d2803,_0xf375bd){_0x5d2803=_0x5d2803-0x0;var _0xdcad2c=_0xa85a[_0x5d2803];return _0xdcad2c;};'use strict';var _=require(_0xaa85('0x0'));var util=require(_0xaa85('0x1'));var moment=require(_0xaa85('0x2'));var BPromise=require('bluebird');var rs=require(_0xaa85('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xaa85('0x4'))['db'];var utils=require(_0xaa85('0x5'));var logger=require(_0xaa85('0x6'))(_0xaa85('0x7'));var config=require(_0xaa85('0x8'));var jayson=require(_0xaa85('0x9'));var client=jayson[_0xaa85('0xa')][_0xaa85('0xb')]({'port':0x232a});config['redis']=_[_0xaa85('0xc')](config[_0xaa85('0xd')],{'host':_0xaa85('0xe'),'port':0x18eb});var socket=require(_0xaa85('0xf'))(new Redis(config['redis']));require('./openchannelQueue.socket')[_0xaa85('0x10')](socket);function respondWithRpcPromise(_0x10417b,_0x930f66,_0x5b49a0){return new BPromise(function(_0x319322,_0x46d71c){return client[_0xaa85('0x11')](_0x10417b,_0x5b49a0)[_0xaa85('0x12')](function(_0x56df24){logger[_0xaa85('0x13')]('OpenchannelQueue,\x20%s,\x20%s',_0x930f66,_0xaa85('0x14'));logger[_0xaa85('0x15')](_0xaa85('0x16'),_0x930f66,'request\x20sent',JSON[_0xaa85('0x17')](_0x56df24));if(_0x56df24['error']){if(_0x56df24[_0xaa85('0x18')][_0xaa85('0x19')]===0x1f4){logger[_0xaa85('0x18')]('OpenchannelQueue,\x20%s,\x20%s',_0x930f66,_0x56df24[_0xaa85('0x18')][_0xaa85('0x1a')]);return _0x46d71c(_0x56df24[_0xaa85('0x18')][_0xaa85('0x1a')]);}logger[_0xaa85('0x18')]('OpenchannelQueue,\x20%s,\x20%s',_0x930f66,_0x56df24[_0xaa85('0x18')]['message']);return _0x319322(_0x56df24[_0xaa85('0x18')]['message']);}else{logger[_0xaa85('0x13')]('OpenchannelQueue,\x20%s,\x20%s',_0x930f66,_0xaa85('0x14'));_0x319322(_0x56df24[_0xaa85('0x1b')][_0xaa85('0x1a')]);}})[_0xaa85('0x1c')](function(_0x295146){logger['error'](_0xaa85('0x1d'),_0x930f66,_0x295146);_0x46d71c(_0x295146);});});}exports[_0xaa85('0x1e')]=function(_0x43b976){var _0x1bd5e1=this;return new Promise(function(_0x2f88e4,_0x57b338){return db[_0xaa85('0x1f')][_0xaa85('0x20')]({'raw':_0x43b976['options']?_0x43b976[_0xaa85('0x21')][_0xaa85('0x22')]===undefined?!![]:![]:!![],'where':_0x43b976[_0xaa85('0x21')]?_0x43b976[_0xaa85('0x21')][_0xaa85('0x23')]||null:null,'attributes':_0x43b976[_0xaa85('0x21')]?_0x43b976[_0xaa85('0x21')]['attributes']||null:null,'limit':_0x43b976[_0xaa85('0x21')]?_0x43b976[_0xaa85('0x21')][_0xaa85('0x24')]||null:null,'include':_0x43b976[_0xaa85('0x21')]?_0x43b976[_0xaa85('0x21')][_0xaa85('0x25')]?_[_0xaa85('0x26')](_0x43b976[_0xaa85('0x21')]['include'],function(_0x5f5519){return{'model':db[_0x5f5519[_0xaa85('0x27')]],'as':_0x5f5519['as'],'attributes':_0x5f5519[_0xaa85('0x28')],'include':_0x5f5519['include']?_[_0xaa85('0x26')](_0x5f5519[_0xaa85('0x25')],function(_0x30ab90){return{'model':db[_0x30ab90[_0xaa85('0x27')]],'as':_0x30ab90['as'],'attributes':_0x30ab90['attributes'],'include':_0x30ab90[_0xaa85('0x25')]?_[_0xaa85('0x26')](_0x30ab90['include'],function(_0x5645a0){return{'model':db[_0x5645a0[_0xaa85('0x27')]],'as':_0x5645a0['as'],'attributes':_0x5645a0[_0xaa85('0x28')]};}):[]};}):[]};}):[]:[]})[_0xaa85('0x12')](function(_0x2d3937){logger['info']('GetOpenchannelQueue',_0x43b976);logger[_0xaa85('0x15')](_0xaa85('0x1e'),_0x43b976,JSON['stringify'](_0x2d3937));_0x2f88e4(_0x2d3937);})[_0xaa85('0x1c')](function(_0x5cee0a){logger['error'](_0xaa85('0x1e'),_0x5cee0a[_0xaa85('0x1a')],_0x43b976);_0x57b338(_0x1bd5e1[_0xaa85('0x18')](0x1f4,_0x5cee0a[_0xaa85('0x1a')]));});});};exports[_0xaa85('0x29')]=function(_0x2ef7ba){var _0x1514be=this;return new Promise(function(_0x5a618d,_0x1a399d){return db[_0xaa85('0x1f')]['find']({'raw':_0x2ef7ba[_0xaa85('0x21')]?_0x2ef7ba['options'][_0xaa85('0x22')]===undefined?!![]:![]:!![],'where':_0x2ef7ba['options']?_0x2ef7ba['options'][_0xaa85('0x23')]||null:null,'attributes':_0x2ef7ba[_0xaa85('0x21')]?_0x2ef7ba['options']['attributes']||null:null,'include':_0x2ef7ba[_0xaa85('0x21')]?_0x2ef7ba[_0xaa85('0x21')]['include']?_[_0xaa85('0x26')](_0x2ef7ba['options'][_0xaa85('0x25')],function(_0x2da278){return{'model':db[_0x2da278[_0xaa85('0x27')]],'as':_0x2da278['as'],'attributes':_0x2da278['attributes'],'include':_0x2da278[_0xaa85('0x25')]?_[_0xaa85('0x26')](_0x2da278[_0xaa85('0x25')],function(_0x2371ec){return{'model':db[_0x2371ec[_0xaa85('0x27')]],'as':_0x2371ec['as'],'attributes':_0x2371ec[_0xaa85('0x28')],'include':_0x2371ec['include']?_[_0xaa85('0x26')](_0x2371ec[_0xaa85('0x25')],function(_0x21e4a5){return{'model':db[_0x21e4a5[_0xaa85('0x27')]],'as':_0x21e4a5['as'],'attributes':_0x21e4a5[_0xaa85('0x28')]};}):[]};}):[]};}):[]:[]})[_0xaa85('0x12')](function(_0x1009a8){logger['info'](_0xaa85('0x29'),_0x2ef7ba);logger[_0xaa85('0x15')](_0xaa85('0x29'),_0x2ef7ba,JSON[_0xaa85('0x17')](_0x1009a8));_0x5a618d(_0x1009a8);})[_0xaa85('0x1c')](function(_0x54bc3d){logger[_0xaa85('0x18')]('ShowOpenchannelQueue',_0x54bc3d['message'],_0x2ef7ba);_0x1a399d(_0x1514be['error'](0x1f4,_0x54bc3d[_0xaa85('0x1a')]));});});};
\ No newline at end of file
index c7aa6bb..83ca355 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc3cd=['./openchannelQueue.events','remove','update','removeListener','length','openchannelQueue:'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xc3cd,0x186));var _0xdc3c=function(_0x2c2b74,_0x47e891){_0x2c2b74=_0x2c2b74-0x0;var _0x27cb17=_0xc3cd[_0x2c2b74];return _0x27cb17;};'use strict';var OpenchannelQueueEvents=require(_0xdc3c('0x0'));var events=['save',_0xdc3c('0x1'),_0xdc3c('0x2')];function createListener(_0x4dfa6a,_0x5a985f){return function(_0x3867ed){_0x5a985f['emit'](_0x4dfa6a,_0x3867ed);};}function removeListener(_0x33d5a0,_0x33d0ea){return function(){OpenchannelQueueEvents[_0xdc3c('0x3')](_0x33d5a0,_0x33d0ea);};}exports['register']=function(_0x5e75d8){for(var _0x139029=0x0,_0x47f400=events[_0xdc3c('0x4')];_0x139029<_0x47f400;_0x139029++){var _0x49cc7d=events[_0x139029];var _0x44c563=createListener(_0xdc3c('0x5')+_0x49cc7d,_0x5e75d8);OpenchannelQueueEvents['on'](_0x49cc7d,_0x44c563);}};
\ No newline at end of file
+var _0xe235=['emit','register','length','openchannelQueue:','./openchannelQueue.events','save','remove','update'];(function(_0x2f53c7,_0x121298){var _0x5ee2c3=function(_0x1c88b3){while(--_0x1c88b3){_0x2f53c7['push'](_0x2f53c7['shift']());}};_0x5ee2c3(++_0x121298);}(_0xe235,0xe4));var _0x5e23=function(_0x47db33,_0x55110f){_0x47db33=_0x47db33-0x0;var _0x333cef=_0xe235[_0x47db33];return _0x333cef;};'use strict';var OpenchannelQueueEvents=require(_0x5e23('0x0'));var events=[_0x5e23('0x1'),_0x5e23('0x2'),_0x5e23('0x3')];function createListener(_0x49fc1b,_0x57e9e8){return function(_0x31faa4){_0x57e9e8[_0x5e23('0x4')](_0x49fc1b,_0x31faa4);};}function removeListener(_0x14eee2,_0x5ba17a){return function(){OpenchannelQueueEvents['removeListener'](_0x14eee2,_0x5ba17a);};}exports[_0x5e23('0x5')]=function(_0x37c8a7){for(var _0x1b49b2=0x0,_0x1c9b2b=events[_0x5e23('0x6')];_0x1b49b2<_0x1c9b2b;_0x1b49b2++){var _0xd7f262=events[_0x1b49b2];var _0x1f0008=createListener(_0x5e23('0x7')+_0xd7f262,_0x37c8a7);OpenchannelQueueEvents['on'](_0xd7f262,_0x1f0008);}};
\ No newline at end of file
index c37b6b7..5ad77ed 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8246=['connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./openchannelQueueReport.controller','isAuthenticated','index','get','/describe','describe','/:id','show','post','create','put','update','delete','exports','util','path'];(function(_0x4f4ee0,_0x16d4a4){var _0x19fc3f=function(_0x2b9d42){while(--_0x2b9d42){_0x4f4ee0['push'](_0x4f4ee0['shift']());}};_0x19fc3f(++_0x16d4a4);}(_0x8246,0xd0));var _0x6824=function(_0x56d6de,_0xa3500d){_0x56d6de=_0x56d6de-0x0;var _0x437187=_0x8246[_0x56d6de];return _0x437187;};'use strict';var multer=require('multer');var util=require(_0x6824('0x0'));var path=require(_0x6824('0x1'));var timeout=require(_0x6824('0x2'));var express=require(_0x6824('0x3'));var router=express[_0x6824('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x6824('0x5'));var interaction=require(_0x6824('0x6'));var config=require('../../config/environment');var controller=require(_0x6824('0x7'));router['get']('/',auth[_0x6824('0x8')](),controller[_0x6824('0x9')]);router[_0x6824('0xa')](_0x6824('0xb'),auth['isAuthenticated'](),controller[_0x6824('0xc')]);router[_0x6824('0xa')](_0x6824('0xd'),auth['isAuthenticated'](),controller[_0x6824('0xe')]);router[_0x6824('0xf')]('/',auth[_0x6824('0x8')](),controller[_0x6824('0x10')]);router[_0x6824('0x11')](_0x6824('0xd'),auth[_0x6824('0x8')](),controller[_0x6824('0x12')]);router[_0x6824('0x13')](_0x6824('0xd'),auth[_0x6824('0x8')](),controller['destroy']);module[_0x6824('0x14')]=router;
\ No newline at end of file
+var _0x0318=['update','delete','destroy','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./openchannelQueueReport.controller','get','isAuthenticated','/describe','describe','/:id','post','create','put'];(function(_0x55c344,_0x1ab810){var _0x301c07=function(_0x40099a){while(--_0x40099a){_0x55c344['push'](_0x55c344['shift']());}};_0x301c07(++_0x1ab810);}(_0x0318,0xe0));var _0x8031=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x0318[_0x20a584];return _0x4b41a8;};'use strict';var multer=require('multer');var util=require(_0x8031('0x0'));var path=require(_0x8031('0x1'));var timeout=require(_0x8031('0x2'));var express=require(_0x8031('0x3'));var router=express[_0x8031('0x4')]();var fs_extra=require(_0x8031('0x5'));var auth=require(_0x8031('0x6'));var interaction=require(_0x8031('0x7'));var config=require(_0x8031('0x8'));var controller=require(_0x8031('0x9'));router[_0x8031('0xa')]('/',auth[_0x8031('0xb')](),controller['index']);router['get'](_0x8031('0xc'),auth[_0x8031('0xb')](),controller[_0x8031('0xd')]);router['get'](_0x8031('0xe'),auth[_0x8031('0xb')](),controller['show']);router[_0x8031('0xf')]('/',auth[_0x8031('0xb')](),controller[_0x8031('0x10')]);router[_0x8031('0x11')](_0x8031('0xe'),auth[_0x8031('0xb')](),controller[_0x8031('0x12')]);router[_0x8031('0x13')]('/:id',auth[_0x8031('0xb')](),controller[_0x8031('0x14')]);module[_0x8031('0x15')]=router;
\ No newline at end of file
index 04d6bfa..bbd48fd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf1a0=['DATE','exports','STRING'];(function(_0x37862a,_0x2bc98e){var _0x5b0104=function(_0x391413){while(--_0x391413){_0x37862a['push'](_0x37862a['shift']());}};_0x5b0104(++_0x2bc98e);}(_0xf1a0,0x1a2));var _0x0f1a=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf1a0[_0x3dd15e];return _0x231fd0;};'use strict';var moment=require('moment');var Sequelize=require('sequelize');module[_0x0f1a('0x0')]={'uniqueid':{'type':Sequelize[_0x0f1a('0x1')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0x0f1a('0x2')]},'leaveAt':{'type':Sequelize[_0x0f1a('0x2')]},'acceptAt':{'type':Sequelize[_0x0f1a('0x2')]},'exitAt':{'type':Sequelize[_0x0f1a('0x2')]},'reason':{'type':Sequelize[_0x0f1a('0x1')]}};
\ No newline at end of file
+var _0x2b17=['STRING','DATE','moment','sequelize','exports'];(function(_0x2bf141,_0x31eac7){var _0x48277b=function(_0x9fe560){while(--_0x9fe560){_0x2bf141['push'](_0x2bf141['shift']());}};_0x48277b(++_0x31eac7);}(_0x2b17,0xca));var _0x72b1=function(_0x439ddd,_0x5d9d2e){_0x439ddd=_0x439ddd-0x0;var _0x33b584=_0x2b17[_0x439ddd];return _0x33b584;};'use strict';var moment=require(_0x72b1('0x0'));var Sequelize=require(_0x72b1('0x1'));module[_0x72b1('0x2')]={'uniqueid':{'type':Sequelize[_0x72b1('0x3')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize['DATE']},'acceptAt':{'type':Sequelize[_0x72b1('0x4')]},'exitAt':{'type':Sequelize[_0x72b1('0x4')]},'reason':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 337a7c3..e2dd216 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf2ec=['then','error','name','send','OpenchannelQueueReport','rawAttributes','fieldName','type','map','keys','query','filters','intersection','attributes','model','fields','length','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','include','findAll','catch','show','params','options','find','create','body','destroy','describe','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','ejs','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','limit','undefined','offset','count','Content-Range','apply','reject','update'];(function(_0x4a47c7,_0x5ea713){var _0x2c1d1d=function(_0x56fca1){while(--_0x56fca1){_0x4a47c7['push'](_0x4a47c7['shift']());}};_0x2c1d1d(++_0x5ea713);}(_0xf2ec,0xb5));var _0xcf2e=function(_0x23ef63,_0x12a70b){_0x23ef63=_0x23ef63-0x0;var _0x2fe5ef=_0xf2ec[_0x23ef63];return _0x2fe5ef;};'use strict';var emlformat=require(_0xcf2e('0x0'));var rimraf=require(_0xcf2e('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xcf2e('0x2'));var rp=require(_0xcf2e('0x3'));var moment=require(_0xcf2e('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xcf2e('0x5'));var util=require(_0xcf2e('0x6'));var path=require('path');var sox=require(_0xcf2e('0x7'));var csv=require(_0xcf2e('0x8'));var ejs=require(_0xcf2e('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xcf2e('0xa'));var crypto=require(_0xcf2e('0xb'));var jsforce=require(_0xcf2e('0xc'));var deskjs=require(_0xcf2e('0xd'));var toCsv=require(_0xcf2e('0x8'));var querystring=require(_0xcf2e('0xe'));var Papa=require('papaparse');var Redis=require(_0xcf2e('0xf'));var authService=require(_0xcf2e('0x10'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xcf2e('0x11'));var logger=require(_0xcf2e('0x12'))('api');var utils=require(_0xcf2e('0x13'));var config=require(_0xcf2e('0x14'));var licenseUtil=require(_0xcf2e('0x15'));var db=require(_0xcf2e('0x16'))['db'];function respondWithStatusCode(_0x44617a,_0x1395a3){_0x1395a3=_0x1395a3||0xcc;return function(_0x2d1c3a){if(_0x2d1c3a){return _0x44617a[_0xcf2e('0x17')](_0x1395a3);}return _0x44617a[_0xcf2e('0x18')](_0x1395a3)[_0xcf2e('0x19')]();};}function respondWithResult(_0x360cfc,_0x424069){_0x424069=_0x424069||0xc8;return function(_0x305f3f){if(_0x305f3f){return _0x360cfc[_0xcf2e('0x18')](_0x424069)[_0xcf2e('0x1a')](_0x305f3f);}};}function respondWithFilteredResult(_0x5787e5,_0x151319){return function(_0x157547){if(_0x157547){var _0x3f805e=typeof _0x151319['offset']==='undefined'&&typeof _0x151319[_0xcf2e('0x1b')]===_0xcf2e('0x1c');var _0x5bf130=_0x157547['count'];var _0x29646a=_0x3f805e?0x0:_0x151319[_0xcf2e('0x1d')];var _0x2db3a4=_0x3f805e?_0x157547[_0xcf2e('0x1e')]:_0x151319[_0xcf2e('0x1d')]+_0x151319[_0xcf2e('0x1b')];var _0x1631c9;if(_0x2db3a4>=_0x5bf130){_0x2db3a4=_0x5bf130;_0x1631c9=0xc8;}else{_0x1631c9=0xce;}_0x5787e5[_0xcf2e('0x18')](_0x1631c9);return _0x5787e5['set'](_0xcf2e('0x1f'),_0x29646a+'-'+_0x2db3a4+'/'+_0x5bf130)['json'](_0x157547);}return null;};}function patchUpdates(_0x1f90d7){return function(_0x1697a0){try{jsonpatch[_0xcf2e('0x20')](_0x1697a0,_0x1f90d7,!![]);}catch(_0x120336){return BPromise[_0xcf2e('0x21')](_0x120336);}return _0x1697a0['save']();};}function saveUpdates(_0xdbe61c,_0x5b17c7){return function(_0x4c47d5){if(_0x4c47d5){return _0x4c47d5[_0xcf2e('0x22')](_0xdbe61c)[_0xcf2e('0x23')](function(_0x271ac3){return _0x271ac3;});}return null;};}function removeEntity(_0x121915,_0x20cb42){return function(_0x597ea7){if(_0x597ea7){return _0x597ea7['destroy']()['then'](function(){_0x121915[_0xcf2e('0x18')](0xcc)[_0xcf2e('0x19')]();});}};}function handleEntityNotFound(_0x15c3fe,_0x4c685c){return function(_0x46668c){if(!_0x46668c){_0x15c3fe[_0xcf2e('0x17')](0x194);}return _0x46668c;};}function handleError(_0x5eb4d9,_0x1ad104){_0x1ad104=_0x1ad104||0x1f4;return function(_0x46a58e){logger[_0xcf2e('0x24')](_0x46a58e['stack']);if(_0x46a58e[_0xcf2e('0x25')]){delete _0x46a58e[_0xcf2e('0x25')];}_0x5eb4d9[_0xcf2e('0x18')](_0x1ad104)[_0xcf2e('0x26')](_0x46a58e);};}exports['index']=function(_0x47f022,_0x29691c){var _0x14a2c8={},_0x19dff8={},_0x20f038={'count':0x0,'rows':[]};var _0x33ebce=_['map'](db[_0xcf2e('0x27')][_0xcf2e('0x28')],function(_0xbb4f0f){return{'name':_0xbb4f0f[_0xcf2e('0x29')],'type':_0xbb4f0f[_0xcf2e('0x2a')]['key']};});_0x19dff8['model']=_[_0xcf2e('0x2b')](_0x33ebce,_0xcf2e('0x25'));_0x19dff8['query']=_[_0xcf2e('0x2c')](_0x47f022[_0xcf2e('0x2d')]);_0x19dff8[_0xcf2e('0x2e')]=_[_0xcf2e('0x2f')](_0x19dff8['model'],_0x19dff8[_0xcf2e('0x2d')]);_0x14a2c8[_0xcf2e('0x30')]=_['intersection'](_0x19dff8[_0xcf2e('0x31')],qs[_0xcf2e('0x32')](_0x47f022[_0xcf2e('0x2d')][_0xcf2e('0x32')]));_0x14a2c8[_0xcf2e('0x30')]=_0x14a2c8[_0xcf2e('0x30')][_0xcf2e('0x33')]?_0x14a2c8[_0xcf2e('0x30')]:_0x19dff8[_0xcf2e('0x31')];if(!_0x47f022['query']['hasOwnProperty'](_0xcf2e('0x34'))){_0x14a2c8[_0xcf2e('0x1b')]=qs[_0xcf2e('0x1b')](_0x47f022[_0xcf2e('0x2d')][_0xcf2e('0x1b')]);_0x14a2c8[_0xcf2e('0x1d')]=qs['offset'](_0x47f022[_0xcf2e('0x2d')][_0xcf2e('0x1d')]);}_0x14a2c8[_0xcf2e('0x35')]=qs[_0xcf2e('0x36')](_0x47f022['query'][_0xcf2e('0x36')]);_0x14a2c8[_0xcf2e('0x37')]=qs[_0xcf2e('0x2e')](_[_0xcf2e('0x38')](_0x47f022[_0xcf2e('0x2d')],_0x19dff8['filters']),_0x33ebce);if(_0x47f022['query'][_0xcf2e('0x39')]){_0x14a2c8[_0xcf2e('0x37')]=_[_0xcf2e('0x3a')](_0x14a2c8[_0xcf2e('0x37')],{'$or':_[_0xcf2e('0x2b')](_0x33ebce,function(_0x1f0e03){if(_0x1f0e03['type']!==_0xcf2e('0x3b')){var _0x2ed2a6={};_0x2ed2a6[_0x1f0e03['name']]={'$like':'%'+_0x47f022[_0xcf2e('0x2d')]['filter']+'%'};return _0x2ed2a6;}})});}_0x14a2c8=_[_0xcf2e('0x3a')]({},_0x14a2c8,_0x47f022['options']);var _0x20f0b6={'where':_0x14a2c8['where']};return db['OpenchannelQueueReport'][_0xcf2e('0x1e')](_0x20f0b6)[_0xcf2e('0x23')](function(_0x5adc62){_0x20f038[_0xcf2e('0x1e')]=_0x5adc62;if(_0x47f022[_0xcf2e('0x2d')][_0xcf2e('0x3c')]){_0x14a2c8[_0xcf2e('0x3d')]=[{'all':!![]}];}return db[_0xcf2e('0x27')][_0xcf2e('0x3e')](_0x14a2c8);})[_0xcf2e('0x23')](function(_0x426859){_0x20f038['rows']=_0x426859;return _0x20f038;})[_0xcf2e('0x23')](respondWithFilteredResult(_0x29691c,_0x14a2c8))[_0xcf2e('0x3f')](handleError(_0x29691c,null));};exports[_0xcf2e('0x40')]=function(_0x417837,_0x201e76){var _0x2996a2={'raw':!![],'where':{'id':_0x417837[_0xcf2e('0x41')]['id']}},_0x32e0dd={};_0x32e0dd[_0xcf2e('0x31')]=_[_0xcf2e('0x2c')](db[_0xcf2e('0x27')][_0xcf2e('0x28')]);_0x32e0dd[_0xcf2e('0x2d')]=_['keys'](_0x417837[_0xcf2e('0x2d')]);_0x32e0dd[_0xcf2e('0x2e')]=_['intersection'](_0x32e0dd[_0xcf2e('0x31')],_0x32e0dd['query']);_0x2996a2[_0xcf2e('0x30')]=_[_0xcf2e('0x2f')](_0x32e0dd['model'],qs[_0xcf2e('0x32')](_0x417837[_0xcf2e('0x2d')][_0xcf2e('0x32')]));_0x2996a2[_0xcf2e('0x30')]=_0x2996a2[_0xcf2e('0x30')][_0xcf2e('0x33')]?_0x2996a2[_0xcf2e('0x30')]:_0x32e0dd[_0xcf2e('0x31')];if(_0x417837[_0xcf2e('0x2d')][_0xcf2e('0x3c')]){_0x2996a2['include']=[{'all':!![]}];}_0x2996a2=_[_0xcf2e('0x3a')]({},_0x2996a2,_0x417837[_0xcf2e('0x42')]);return db[_0xcf2e('0x27')][_0xcf2e('0x43')](_0x2996a2)[_0xcf2e('0x23')](handleEntityNotFound(_0x201e76,null))[_0xcf2e('0x23')](respondWithResult(_0x201e76,null))[_0xcf2e('0x3f')](handleError(_0x201e76,null));};exports[_0xcf2e('0x44')]=function(_0x413e4f,_0x2bc475){return db[_0xcf2e('0x27')][_0xcf2e('0x44')](_0x413e4f[_0xcf2e('0x45')],{})[_0xcf2e('0x23')](respondWithResult(_0x2bc475,0xc9))[_0xcf2e('0x3f')](handleError(_0x2bc475,null));};exports[_0xcf2e('0x22')]=function(_0x37a94f,_0x1bae79){if(_0x37a94f[_0xcf2e('0x45')]['id']){delete _0x37a94f[_0xcf2e('0x45')]['id'];}return db[_0xcf2e('0x27')]['find']({'where':{'id':_0x37a94f[_0xcf2e('0x41')]['id']}})['then'](handleEntityNotFound(_0x1bae79,null))[_0xcf2e('0x23')](saveUpdates(_0x37a94f[_0xcf2e('0x45')],null))[_0xcf2e('0x23')](respondWithResult(_0x1bae79,null))['catch'](handleError(_0x1bae79,null));};exports[_0xcf2e('0x46')]=function(_0x2d4f01,_0x2bcc7c){return db[_0xcf2e('0x27')][_0xcf2e('0x43')]({'where':{'id':_0x2d4f01[_0xcf2e('0x41')]['id']}})[_0xcf2e('0x23')](handleEntityNotFound(_0x2bcc7c,null))[_0xcf2e('0x23')](removeEntity(_0x2bcc7c,null))[_0xcf2e('0x3f')](handleError(_0x2bcc7c,null));};exports[_0xcf2e('0x47')]=function(_0x5b9731,_0x59ba90){return db['OpenchannelQueueReport']['describe']()[_0xcf2e('0x23')](respondWithResult(_0x59ba90,null))[_0xcf2e('0x3f')](handleError(_0x59ba90,null));};
\ No newline at end of file
+var _0xcd62=['ejs','lodash','squel','crypto','jsforce','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','../../mysqldb','status','json','offset','undefined','limit','count','set','apply','reject','save','update','then','destroy','end','sendStatus','stack','name','send','index','map','OpenchannelQueueReport','fieldName','key','model','keys','query','filters','intersection','attributes','fields','length','hasOwnProperty','sort','where','pick','filter','type','merge','options','includeAll','include','findAll','rows','rawAttributes','catch','create','body','find','params','describe','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv'];(function(_0x263a74,_0xc31414){var _0x2aa86c=function(_0x382896){while(--_0x382896){_0x263a74['push'](_0x263a74['shift']());}};_0x2aa86c(++_0xc31414);}(_0xcd62,0x95));var _0x2cd6=function(_0x4ef8f9,_0x125a20){_0x4ef8f9=_0x4ef8f9-0x0;var _0x29cd38=_0xcd62[_0x4ef8f9];return _0x29cd38;};'use strict';var emlformat=require(_0x2cd6('0x0'));var rimraf=require(_0x2cd6('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x2cd6('0x2'));var rp=require(_0x2cd6('0x3'));var moment=require(_0x2cd6('0x4'));var BPromise=require(_0x2cd6('0x5'));var Mustache=require(_0x2cd6('0x6'));var util=require(_0x2cd6('0x7'));var path=require(_0x2cd6('0x8'));var sox=require(_0x2cd6('0x9'));var csv=require(_0x2cd6('0xa'));var ejs=require(_0x2cd6('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x2cd6('0xc'));var squel=require(_0x2cd6('0xd'));var crypto=require(_0x2cd6('0xe'));var jsforce=require(_0x2cd6('0xf'));var deskjs=require(_0x2cd6('0x10'));var toCsv=require(_0x2cd6('0xa'));var querystring=require(_0x2cd6('0x11'));var Papa=require(_0x2cd6('0x12'));var Redis=require(_0x2cd6('0x13'));var authService=require(_0x2cd6('0x14'));var qs=require(_0x2cd6('0x15'));var as=require(_0x2cd6('0x16'));var hardwareService=require(_0x2cd6('0x17'));var logger=require(_0x2cd6('0x18'))(_0x2cd6('0x19'));var utils=require(_0x2cd6('0x1a'));var config=require(_0x2cd6('0x1b'));var licenseUtil=require(_0x2cd6('0x1c'));var db=require(_0x2cd6('0x1d'))['db'];function respondWithStatusCode(_0x54eec3,_0x2f6687){_0x2f6687=_0x2f6687||0xcc;return function(_0x3a82a4){if(_0x3a82a4){return _0x54eec3['sendStatus'](_0x2f6687);}return _0x54eec3[_0x2cd6('0x1e')](_0x2f6687)['end']();};}function respondWithResult(_0x314008,_0x360e2){_0x360e2=_0x360e2||0xc8;return function(_0xa88a7e){if(_0xa88a7e){return _0x314008[_0x2cd6('0x1e')](_0x360e2)[_0x2cd6('0x1f')](_0xa88a7e);}};}function respondWithFilteredResult(_0xd1114e,_0x2f21c4){return function(_0x44acc4){if(_0x44acc4){var _0x39be1b=typeof _0x2f21c4[_0x2cd6('0x20')]===_0x2cd6('0x21')&&typeof _0x2f21c4[_0x2cd6('0x22')]===_0x2cd6('0x21');var _0x382b1a=_0x44acc4[_0x2cd6('0x23')];var _0xff6b18=_0x39be1b?0x0:_0x2f21c4[_0x2cd6('0x20')];var _0x28ff28=_0x39be1b?_0x44acc4[_0x2cd6('0x23')]:_0x2f21c4[_0x2cd6('0x20')]+_0x2f21c4[_0x2cd6('0x22')];var _0x55f61b;if(_0x28ff28>=_0x382b1a){_0x28ff28=_0x382b1a;_0x55f61b=0xc8;}else{_0x55f61b=0xce;}_0xd1114e['status'](_0x55f61b);return _0xd1114e[_0x2cd6('0x24')]('Content-Range',_0xff6b18+'-'+_0x28ff28+'/'+_0x382b1a)[_0x2cd6('0x1f')](_0x44acc4);}return null;};}function patchUpdates(_0xcd5689){return function(_0x2a3265){try{jsonpatch[_0x2cd6('0x25')](_0x2a3265,_0xcd5689,!![]);}catch(_0x4db2bc){return BPromise[_0x2cd6('0x26')](_0x4db2bc);}return _0x2a3265[_0x2cd6('0x27')]();};}function saveUpdates(_0x866096,_0x251475){return function(_0x12b91e){if(_0x12b91e){return _0x12b91e[_0x2cd6('0x28')](_0x866096)[_0x2cd6('0x29')](function(_0x3109e9){return _0x3109e9;});}return null;};}function removeEntity(_0x2f9d34,_0x3cbb59){return function(_0x3d1daa){if(_0x3d1daa){return _0x3d1daa[_0x2cd6('0x2a')]()['then'](function(){_0x2f9d34[_0x2cd6('0x1e')](0xcc)[_0x2cd6('0x2b')]();});}};}function handleEntityNotFound(_0x378b5a,_0x4766f2){return function(_0x248eff){if(!_0x248eff){_0x378b5a[_0x2cd6('0x2c')](0x194);}return _0x248eff;};}function handleError(_0x3b1442,_0x273758){_0x273758=_0x273758||0x1f4;return function(_0x4d3c64){logger['error'](_0x4d3c64[_0x2cd6('0x2d')]);if(_0x4d3c64['name']){delete _0x4d3c64[_0x2cd6('0x2e')];}_0x3b1442[_0x2cd6('0x1e')](_0x273758)[_0x2cd6('0x2f')](_0x4d3c64);};}exports[_0x2cd6('0x30')]=function(_0x1df69c,_0x4097e4){var _0x37b2fd={},_0x3c906d={},_0x5dc927={'count':0x0,'rows':[]};var _0x188cdd=_[_0x2cd6('0x31')](db[_0x2cd6('0x32')]['rawAttributes'],function(_0x1dec1b){return{'name':_0x1dec1b[_0x2cd6('0x33')],'type':_0x1dec1b['type'][_0x2cd6('0x34')]};});_0x3c906d[_0x2cd6('0x35')]=_[_0x2cd6('0x31')](_0x188cdd,_0x2cd6('0x2e'));_0x3c906d['query']=_[_0x2cd6('0x36')](_0x1df69c[_0x2cd6('0x37')]);_0x3c906d[_0x2cd6('0x38')]=_[_0x2cd6('0x39')](_0x3c906d[_0x2cd6('0x35')],_0x3c906d[_0x2cd6('0x37')]);_0x37b2fd[_0x2cd6('0x3a')]=_['intersection'](_0x3c906d[_0x2cd6('0x35')],qs[_0x2cd6('0x3b')](_0x1df69c[_0x2cd6('0x37')]['fields']));_0x37b2fd[_0x2cd6('0x3a')]=_0x37b2fd[_0x2cd6('0x3a')][_0x2cd6('0x3c')]?_0x37b2fd['attributes']:_0x3c906d['model'];if(!_0x1df69c[_0x2cd6('0x37')][_0x2cd6('0x3d')]('nolimit')){_0x37b2fd['limit']=qs[_0x2cd6('0x22')](_0x1df69c[_0x2cd6('0x37')][_0x2cd6('0x22')]);_0x37b2fd[_0x2cd6('0x20')]=qs[_0x2cd6('0x20')](_0x1df69c[_0x2cd6('0x37')][_0x2cd6('0x20')]);}_0x37b2fd['order']=qs['sort'](_0x1df69c[_0x2cd6('0x37')][_0x2cd6('0x3e')]);_0x37b2fd[_0x2cd6('0x3f')]=qs[_0x2cd6('0x38')](_[_0x2cd6('0x40')](_0x1df69c['query'],_0x3c906d[_0x2cd6('0x38')]),_0x188cdd);if(_0x1df69c['query'][_0x2cd6('0x41')]){_0x37b2fd[_0x2cd6('0x3f')]=_['merge'](_0x37b2fd[_0x2cd6('0x3f')],{'$or':_['map'](_0x188cdd,function(_0x1972db){if(_0x1972db[_0x2cd6('0x42')]!=='VIRTUAL'){var _0x154b57={};_0x154b57[_0x1972db[_0x2cd6('0x2e')]]={'$like':'%'+_0x1df69c[_0x2cd6('0x37')][_0x2cd6('0x41')]+'%'};return _0x154b57;}})});}_0x37b2fd=_[_0x2cd6('0x43')]({},_0x37b2fd,_0x1df69c[_0x2cd6('0x44')]);var _0xc9a2fe={'where':_0x37b2fd[_0x2cd6('0x3f')]};return db[_0x2cd6('0x32')]['count'](_0xc9a2fe)[_0x2cd6('0x29')](function(_0xf7e60e){_0x5dc927['count']=_0xf7e60e;if(_0x1df69c[_0x2cd6('0x37')][_0x2cd6('0x45')]){_0x37b2fd[_0x2cd6('0x46')]=[{'all':!![]}];}return db[_0x2cd6('0x32')][_0x2cd6('0x47')](_0x37b2fd);})['then'](function(_0x217609){_0x5dc927[_0x2cd6('0x48')]=_0x217609;return _0x5dc927;})[_0x2cd6('0x29')](respondWithFilteredResult(_0x4097e4,_0x37b2fd))['catch'](handleError(_0x4097e4,null));};exports['show']=function(_0x44f1f1,_0x2a5375){var _0x493115={'raw':!![],'where':{'id':_0x44f1f1['params']['id']}},_0x115cb7={};_0x115cb7[_0x2cd6('0x35')]=_[_0x2cd6('0x36')](db[_0x2cd6('0x32')][_0x2cd6('0x49')]);_0x115cb7[_0x2cd6('0x37')]=_['keys'](_0x44f1f1['query']);_0x115cb7[_0x2cd6('0x38')]=_[_0x2cd6('0x39')](_0x115cb7[_0x2cd6('0x35')],_0x115cb7[_0x2cd6('0x37')]);_0x493115['attributes']=_[_0x2cd6('0x39')](_0x115cb7[_0x2cd6('0x35')],qs[_0x2cd6('0x3b')](_0x44f1f1[_0x2cd6('0x37')][_0x2cd6('0x3b')]));_0x493115[_0x2cd6('0x3a')]=_0x493115[_0x2cd6('0x3a')][_0x2cd6('0x3c')]?_0x493115[_0x2cd6('0x3a')]:_0x115cb7[_0x2cd6('0x35')];if(_0x44f1f1[_0x2cd6('0x37')][_0x2cd6('0x45')]){_0x493115[_0x2cd6('0x46')]=[{'all':!![]}];}_0x493115=_['merge']({},_0x493115,_0x44f1f1[_0x2cd6('0x44')]);return db[_0x2cd6('0x32')]['find'](_0x493115)['then'](handleEntityNotFound(_0x2a5375,null))['then'](respondWithResult(_0x2a5375,null))[_0x2cd6('0x4a')](handleError(_0x2a5375,null));};exports['create']=function(_0x21e948,_0x2fa4eb){return db[_0x2cd6('0x32')][_0x2cd6('0x4b')](_0x21e948[_0x2cd6('0x4c')],{})[_0x2cd6('0x29')](respondWithResult(_0x2fa4eb,0xc9))[_0x2cd6('0x4a')](handleError(_0x2fa4eb,null));};exports['update']=function(_0x35ad72,_0x254488){if(_0x35ad72[_0x2cd6('0x4c')]['id']){delete _0x35ad72[_0x2cd6('0x4c')]['id'];}return db[_0x2cd6('0x32')][_0x2cd6('0x4d')]({'where':{'id':_0x35ad72[_0x2cd6('0x4e')]['id']}})[_0x2cd6('0x29')](handleEntityNotFound(_0x254488,null))[_0x2cd6('0x29')](saveUpdates(_0x35ad72[_0x2cd6('0x4c')],null))['then'](respondWithResult(_0x254488,null))['catch'](handleError(_0x254488,null));};exports[_0x2cd6('0x2a')]=function(_0x41cdf1,_0x449609){return db[_0x2cd6('0x32')]['find']({'where':{'id':_0x41cdf1[_0x2cd6('0x4e')]['id']}})[_0x2cd6('0x29')](handleEntityNotFound(_0x449609,null))[_0x2cd6('0x29')](removeEntity(_0x449609,null))['catch'](handleError(_0x449609,null));};exports[_0x2cd6('0x4f')]=function(_0x1caa0f,_0x23cfd1){return db[_0x2cd6('0x32')]['describe']()[_0x2cd6('0x29')](respondWithResult(_0x23cfd1,null))[_0x2cd6('0x4a')](handleError(_0x23cfd1,null));};
\ No newline at end of file
index 41e55b2..2d48593 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe14b=['bluebird','path','./openchannelQueueReport.attributes','exports','define','OpenchannelQueueReport','report_openchannel_queue','lodash','util','moment'];(function(_0xc89191,_0x189c00){var _0x3f5bff=function(_0x1ca6a6){while(--_0x1ca6a6){_0xc89191['push'](_0xc89191['shift']());}};_0x3f5bff(++_0x189c00);}(_0xe14b,0x93));var _0xbe14=function(_0xbcc6ec,_0x353c59){_0xbcc6ec=_0xbcc6ec-0x0;var _0x177f39=_0xe14b[_0xbcc6ec];return _0x177f39;};'use strict';var _=require(_0xbe14('0x0'));var util=require(_0xbe14('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xbe14('0x2'));var BPromise=require(_0xbe14('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xbe14('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xbe14('0x5'));module[_0xbe14('0x6')]=function(_0x1fe204,_0x1ff100){return _0x1fe204[_0xbe14('0x7')](_0xbe14('0x8'),attributes,{'tableName':_0xbe14('0x9'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x5fc3=['util','api','moment','bluebird','request-promise','path','../../config/environment','./openchannelQueueReport.attributes','exports','define','report_openchannel_queue','uniqueid','lodash'];(function(_0x3b9c71,_0x52bd2f){var _0x419087=function(_0x474819){while(--_0x474819){_0x3b9c71['push'](_0x3b9c71['shift']());}};_0x419087(++_0x52bd2f);}(_0x5fc3,0xa8));var _0x35fc=function(_0x39ffd1,_0x299703){_0x39ffd1=_0x39ffd1-0x0;var _0x31267e=_0x5fc3[_0x39ffd1];return _0x31267e;};'use strict';var _=require(_0x35fc('0x0'));var util=require(_0x35fc('0x1'));var logger=require('../../config/logger')(_0x35fc('0x2'));var moment=require(_0x35fc('0x3'));var BPromise=require(_0x35fc('0x4'));var rp=require(_0x35fc('0x5'));var fs=require('fs');var path=require(_0x35fc('0x6'));var rimraf=require('rimraf');var config=require(_0x35fc('0x7'));var attributes=require(_0x35fc('0x8'));module[_0x35fc('0x9')]=function(_0x5b85ad,_0x5754be){return _0x5b85ad[_0x35fc('0xa')]('OpenchannelQueueReport',attributes,{'tableName':_0x35fc('0xb'),'paranoid':![],'indexes':[{'name':_0x35fc('0xc'),'fields':[_0x35fc('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
index c95df29..2342c0d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7fea=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','info','OpenchannelQueueReport,\x20%s,\x20%s','request\x20sent','OpenchannelQueueReport,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','CreateOpenchannelQueueReport','OpenchannelQueueReport','create','options','raw','then','debug','stringify','update','body','where','attributes','limit','UpdateOpenchannelQueueReport','util'];(function(_0x29f6e6,_0x5e1b32){var _0x1a1e72=function(_0x4ee062){while(--_0x4ee062){_0x29f6e6['push'](_0x29f6e6['shift']());}};_0x1a1e72(++_0x5e1b32);}(_0x7fea,0x149));var _0xa7fe=function(_0x117cfa,_0x2ca9cb){_0x117cfa=_0x117cfa-0x0;var _0x4d014b=_0x7fea[_0x117cfa];return _0x4d014b;};'use strict';var _=require('lodash');var util=require(_0xa7fe('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xa7fe('0x1'));var fs=require('fs');var Redis=require(_0xa7fe('0x2'));var db=require(_0xa7fe('0x3'))['db'];var utils=require(_0xa7fe('0x4'));var logger=require(_0xa7fe('0x5'))(_0xa7fe('0x6'));var config=require('../../config/environment');var jayson=require(_0xa7fe('0x7'));var client=jayson[_0xa7fe('0x8')][_0xa7fe('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1132f1,_0x45f967,_0x3597b0){return new BPromise(function(_0x4668f0,_0x3d9135){return client['request'](_0x1132f1,_0x3597b0)['then'](function(_0x1db10e){logger[_0xa7fe('0xa')](_0xa7fe('0xb'),_0x45f967,_0xa7fe('0xc'));logger['debug'](_0xa7fe('0xd'),_0x45f967,_0xa7fe('0xc'),JSON['stringify'](_0x1db10e));if(_0x1db10e[_0xa7fe('0xe')]){if(_0x1db10e['error'][_0xa7fe('0xf')]===0x1f4){logger['error']('OpenchannelQueueReport,\x20%s,\x20%s',_0x45f967,_0x1db10e[_0xa7fe('0xe')][_0xa7fe('0x10')]);return _0x3d9135(_0x1db10e[_0xa7fe('0xe')][_0xa7fe('0x10')]);}logger[_0xa7fe('0xe')]('OpenchannelQueueReport,\x20%s,\x20%s',_0x45f967,_0x1db10e['error'][_0xa7fe('0x10')]);return _0x4668f0(_0x1db10e[_0xa7fe('0xe')][_0xa7fe('0x10')]);}else{logger[_0xa7fe('0xa')](_0xa7fe('0xb'),_0x45f967,'request\x20sent');_0x4668f0(_0x1db10e[_0xa7fe('0x11')][_0xa7fe('0x10')]);}})[_0xa7fe('0x12')](function(_0x253293){logger[_0xa7fe('0xe')]('OpenchannelQueueReport,\x20%s,\x20%s',_0x45f967,_0x253293);_0x3d9135(_0x253293);});});}exports[_0xa7fe('0x13')]=function(_0x1e4966){var _0x2bf8db=this;return new Promise(function(_0x2ef53c,_0x179b9e){return db[_0xa7fe('0x14')][_0xa7fe('0x15')](_0x1e4966['body'],{'raw':_0x1e4966['options']?_0x1e4966[_0xa7fe('0x16')][_0xa7fe('0x17')]===undefined?!![]:![]:!![]})[_0xa7fe('0x18')](function(_0x529990){logger[_0xa7fe('0xa')](_0xa7fe('0x13'),_0x1e4966);logger[_0xa7fe('0x19')]('CreateOpenchannelQueueReport',_0x1e4966,JSON[_0xa7fe('0x1a')](_0x529990));_0x2ef53c(_0x529990);})[_0xa7fe('0x12')](function(_0x1619c1){logger[_0xa7fe('0xe')](_0xa7fe('0x13'),_0x1619c1[_0xa7fe('0x10')],_0x1e4966);_0x179b9e(_0x2bf8db[_0xa7fe('0xe')](0x1f4,_0x1619c1[_0xa7fe('0x10')]));});});};exports['UpdateOpenchannelQueueReport']=function(_0x3415b8){var _0x4fb801=this;return new Promise(function(_0x4ce2e7,_0x37c8fa){return db[_0xa7fe('0x14')][_0xa7fe('0x1b')](_0x3415b8[_0xa7fe('0x1c')],{'raw':_0x3415b8[_0xa7fe('0x16')]?_0x3415b8['options'][_0xa7fe('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3415b8[_0xa7fe('0x16')]?_0x3415b8[_0xa7fe('0x16')][_0xa7fe('0x1d')]||null:null,'attributes':_0x3415b8[_0xa7fe('0x16')]?_0x3415b8[_0xa7fe('0x16')][_0xa7fe('0x1e')]||null:null,'limit':_0x3415b8[_0xa7fe('0x16')]?_0x3415b8[_0xa7fe('0x16')][_0xa7fe('0x1f')]||null:null})[_0xa7fe('0x18')](function(_0x19dd83){logger[_0xa7fe('0xa')](_0xa7fe('0x20'),_0x3415b8);logger[_0xa7fe('0x19')](_0xa7fe('0x20'),_0x3415b8,JSON[_0xa7fe('0x1a')](_0x19dd83));_0x4ce2e7(_0x19dd83);})[_0xa7fe('0x12')](function(_0x1c9e5a){logger[_0xa7fe('0xe')]('UpdateOpenchannelQueueReport',_0x1c9e5a[_0xa7fe('0x10')],_0x3415b8);_0x37c8fa(_0x4fb801[_0xa7fe('0xe')](0x1f4,_0x1c9e5a['message']));});});};
\ No newline at end of file
+var _0xb10b=['then','info','OpenchannelQueueReport,\x20%s,\x20%s','OpenchannelQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','CreateOpenchannelQueueReport','OpenchannelQueueReport','create','options','raw','debug','UpdateOpenchannelQueueReport','where','attributes','limit','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb10b,0x12a));var _0xbb10=function(_0xe6e3e2,_0x2b01da){_0xe6e3e2=_0xe6e3e2-0x0;var _0x126571=_0xb10b[_0xe6e3e2];return _0x126571;};'use strict';var _=require(_0xbb10('0x0'));var util=require('util');var moment=require(_0xbb10('0x1'));var BPromise=require(_0xbb10('0x2'));var rs=require(_0xbb10('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbb10('0x4'))['db'];var utils=require(_0xbb10('0x5'));var logger=require(_0xbb10('0x6'))(_0xbb10('0x7'));var config=require(_0xbb10('0x8'));var jayson=require(_0xbb10('0x9'));var client=jayson['client'][_0xbb10('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3cdd53,_0x513741,_0x1b9e94){return new BPromise(function(_0x3fb675,_0x21370f){return client[_0xbb10('0xb')](_0x3cdd53,_0x1b9e94)[_0xbb10('0xc')](function(_0x1ce33e){logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,'request\x20sent');logger['debug'](_0xbb10('0xf'),_0x513741,_0xbb10('0x10'),JSON[_0xbb10('0x11')](_0x1ce33e));if(_0x1ce33e['error']){if(_0x1ce33e[_0xbb10('0x12')]['code']===0x1f4){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x21370f(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}logger['error'](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x3fb675(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}else{logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,_0xbb10('0x10'));_0x3fb675(_0x1ce33e[_0xbb10('0x14')][_0xbb10('0x13')]);}})['catch'](function(_0x2eca0f){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x2eca0f);_0x21370f(_0x2eca0f);});});}exports[_0xbb10('0x15')]=function(_0x378da8){var _0x1682a4=this;return new Promise(function(_0x575cca,_0x30efc6){return db[_0xbb10('0x16')][_0xbb10('0x17')](_0x378da8['body'],{'raw':_0x378da8[_0xbb10('0x18')]?_0x378da8[_0xbb10('0x18')][_0xbb10('0x19')]===undefined?!![]:![]:!![]})[_0xbb10('0xc')](function(_0xdf237d){logger[_0xbb10('0xd')]('CreateOpenchannelQueueReport',_0x378da8);logger[_0xbb10('0x1a')](_0xbb10('0x15'),_0x378da8,JSON['stringify'](_0xdf237d));_0x575cca(_0xdf237d);})['catch'](function(_0x8e2b97){logger[_0xbb10('0x12')](_0xbb10('0x15'),_0x8e2b97[_0xbb10('0x13')],_0x378da8);_0x30efc6(_0x1682a4[_0xbb10('0x12')](0x1f4,_0x8e2b97[_0xbb10('0x13')]));});});};exports[_0xbb10('0x1b')]=function(_0x436104){var _0x7f2377=this;return new Promise(function(_0x395404,_0x3ba6cd){return db[_0xbb10('0x16')]['update'](_0x436104['body'],{'raw':_0x436104['options']?_0x436104[_0xbb10('0x18')][_0xbb10('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x436104[_0xbb10('0x18')]?_0x436104['options'][_0xbb10('0x1c')]||null:null,'attributes':_0x436104[_0xbb10('0x18')]?_0x436104[_0xbb10('0x18')][_0xbb10('0x1d')]||null:null,'limit':_0x436104[_0xbb10('0x18')]?_0x436104[_0xbb10('0x18')][_0xbb10('0x1e')]||null:null})['then'](function(_0x3796c7){logger[_0xbb10('0xd')](_0xbb10('0x1b'),_0x436104);logger[_0xbb10('0x1a')](_0xbb10('0x1b'),_0x436104,JSON[_0xbb10('0x11')](_0x3796c7));_0x395404(_0x3796c7);})['catch'](function(_0x221624){logger['error'](_0xbb10('0x1b'),_0x221624['message'],_0x436104);_0x3ba6cd(_0x7f2377[_0xbb10('0x12')](0x1f4,_0x221624[_0xbb10('0x13')]));});});};
\ No newline at end of file
index 0a5b7b7..24eb513 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c99=['get','isAuthenticated','index','/describe','show','post','create','put','/:id','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','./openchannelTransferReport.controller'];(function(_0x29d621,_0x5a003f){var _0x3c6864=function(_0x7d1a15){while(--_0x7d1a15){_0x29d621['push'](_0x29d621['shift']());}};_0x3c6864(++_0x5a003f);}(_0x9c99,0x91));var _0x99c9=function(_0x210b93,_0x133e6d){_0x210b93=_0x210b93-0x0;var _0x2b020f=_0x9c99[_0x210b93];return _0x2b020f;};'use strict';var multer=require(_0x99c9('0x0'));var util=require('util');var path=require(_0x99c9('0x1'));var timeout=require(_0x99c9('0x2'));var express=require(_0x99c9('0x3'));var router=express[_0x99c9('0x4')]();var fs_extra=require(_0x99c9('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0x99c9('0x6'));router[_0x99c9('0x7')]('/',auth[_0x99c9('0x8')](),controller[_0x99c9('0x9')]);router['get'](_0x99c9('0xa'),auth[_0x99c9('0x8')](),controller['describe']);router['get']('/:id',auth[_0x99c9('0x8')](),controller[_0x99c9('0xb')]);router[_0x99c9('0xc')]('/',auth[_0x99c9('0x8')](),controller[_0x99c9('0xd')]);router[_0x99c9('0xe')](_0x99c9('0xf'),auth[_0x99c9('0x8')](),controller['update']);router[_0x99c9('0x10')](_0x99c9('0xf'),auth[_0x99c9('0x8')](),controller[_0x99c9('0x11')]);module[_0x99c9('0x12')]=router;
\ No newline at end of file
+var _0xe827=['post','create','delete','destroy','exports','multer','path','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','describe','/:id'];(function(_0x47e86f,_0xcec17e){var _0xc749bb=function(_0x57bf84){while(--_0x57bf84){_0x47e86f['push'](_0x47e86f['shift']());}};_0xc749bb(++_0xcec17e);}(_0xe827,0x165));var _0x7e82=function(_0x2f8c0b,_0x52ad37){_0x2f8c0b=_0x2f8c0b-0x0;var _0x166059=_0xe827[_0x2f8c0b];return _0x166059;};'use strict';var multer=require(_0x7e82('0x0'));var util=require('util');var path=require(_0x7e82('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x7e82('0x2')]();var fs_extra=require(_0x7e82('0x3'));var auth=require(_0x7e82('0x4'));var interaction=require(_0x7e82('0x5'));var config=require('../../config/environment');var controller=require('./openchannelTransferReport.controller');router[_0x7e82('0x6')]('/',auth[_0x7e82('0x7')](),controller[_0x7e82('0x8')]);router[_0x7e82('0x6')]('/describe',auth[_0x7e82('0x7')](),controller[_0x7e82('0x9')]);router[_0x7e82('0x6')](_0x7e82('0xa'),auth[_0x7e82('0x7')](),controller['show']);router[_0x7e82('0xb')]('/',auth[_0x7e82('0x7')](),controller[_0x7e82('0xc')]);router['put'](_0x7e82('0xa'),auth[_0x7e82('0x7')](),controller['update']);router[_0x7e82('0xd')](_0x7e82('0xa'),auth['isAuthenticated'](),controller[_0x7e82('0xe')]);module[_0x7e82('0xf')]=router;
\ No newline at end of file
index d67e807..b2d08de 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaa88=['account','agent','queue','DATE','NOW','moment','sequelize','exports','STRING'];(function(_0xd9f47,_0x20ccd4){var _0x377f4f=function(_0x13ab38){while(--_0x13ab38){_0xd9f47['push'](_0xd9f47['shift']());}};_0x377f4f(++_0x20ccd4);}(_0xaa88,0x137));var _0x8aa8=function(_0x316904,_0x1e8b77){_0x316904=_0x316904-0x0;var _0xfa9a21=_0xaa88[_0x316904];return _0xfa9a21;};'use strict';var moment=require(_0x8aa8('0x0'));var Sequelize=require(_0x8aa8('0x1'));module[_0x8aa8('0x2')]={'uniqueid':{'type':Sequelize[_0x8aa8('0x3')],'allowNull':![]},'type':{'type':Sequelize['ENUM'](_0x8aa8('0x4'),_0x8aa8('0x5'),_0x8aa8('0x6')),'allowNull':![],'defaultValue':_0x8aa8('0x6')},'transferredAt':{'type':Sequelize[_0x8aa8('0x7')],'allowNull':![],'defaultValue':Sequelize[_0x8aa8('0x8')]}};
\ No newline at end of file
+var _0x00bb=['moment','sequelize','exports','ENUM','agent','queue','DATE','NOW'];(function(_0x51fa3e,_0xd41d0b){var _0x534719=function(_0x86d3e9){while(--_0x86d3e9){_0x51fa3e['push'](_0x51fa3e['shift']());}};_0x534719(++_0xd41d0b);}(_0x00bb,0x1d8));var _0xb00b=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x00bb[_0x5b644e];return _0x49c6bf;};'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
index 60d9d8f..e215197 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3f6f=['request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','sendStatus','end','status','offset','undefined','limit','count','set','json','apply','reject','update','then','destroy','error','stack','name','send','index','map','OpenchannelTransferReport','fieldName','key','model','query','keys','filters','intersection','attributes','fields','nolimit','pick','where','merge','type','VIRTUAL','filter','includeAll','findAll','catch','rawAttributes','length','include','find','create','body','params','describe','eml-format','rimraf','fast-json-patch'];(function(_0x133851,_0x4d6780){var _0x188215=function(_0x1aa541){while(--_0x1aa541){_0x133851['push'](_0x133851['shift']());}};_0x188215(++_0x4d6780);}(_0x3f6f,0x1cb));var _0xf3f6=function(_0x4ef6c4,_0x20c957){_0x4ef6c4=_0x4ef6c4-0x0;var _0x2073ab=_0x3f6f[_0x4ef6c4];return _0x2073ab;};'use strict';var emlformat=require(_0xf3f6('0x0'));var rimraf=require(_0xf3f6('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xf3f6('0x2'));var rp=require(_0xf3f6('0x3'));var moment=require(_0xf3f6('0x4'));var BPromise=require(_0xf3f6('0x5'));var Mustache=require(_0xf3f6('0x6'));var util=require(_0xf3f6('0x7'));var path=require(_0xf3f6('0x8'));var sox=require(_0xf3f6('0x9'));var csv=require(_0xf3f6('0xa'));var ejs=require(_0xf3f6('0xb'));var fs=require('fs');var fs_extra=require(_0xf3f6('0xc'));var _=require(_0xf3f6('0xd'));var squel=require(_0xf3f6('0xe'));var crypto=require(_0xf3f6('0xf'));var jsforce=require(_0xf3f6('0x10'));var deskjs=require(_0xf3f6('0x11'));var toCsv=require(_0xf3f6('0xa'));var querystring=require(_0xf3f6('0x12'));var Papa=require(_0xf3f6('0x13'));var Redis=require(_0xf3f6('0x14'));var authService=require(_0xf3f6('0x15'));var qs=require(_0xf3f6('0x16'));var as=require(_0xf3f6('0x17'));var hardwareService=require(_0xf3f6('0x18'));var logger=require(_0xf3f6('0x19'))('api');var utils=require(_0xf3f6('0x1a'));var config=require(_0xf3f6('0x1b'));var licenseUtil=require(_0xf3f6('0x1c'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2b5d1a,_0x453c64){_0x453c64=_0x453c64||0xcc;return function(_0xcdc519){if(_0xcdc519){return _0x2b5d1a[_0xf3f6('0x1d')](_0x453c64);}return _0x2b5d1a['status'](_0x453c64)[_0xf3f6('0x1e')]();};}function respondWithResult(_0x437e0d,_0x7b1b7f){_0x7b1b7f=_0x7b1b7f||0xc8;return function(_0x20db3d){if(_0x20db3d){return _0x437e0d[_0xf3f6('0x1f')](_0x7b1b7f)['json'](_0x20db3d);}};}function respondWithFilteredResult(_0x4e60fa,_0x3b3404){return function(_0xdffa2f){if(_0xdffa2f){var _0x558986=typeof _0x3b3404[_0xf3f6('0x20')]===_0xf3f6('0x21')&&typeof _0x3b3404[_0xf3f6('0x22')]===_0xf3f6('0x21');var _0x267040=_0xdffa2f[_0xf3f6('0x23')];var _0x12bea3=_0x558986?0x0:_0x3b3404[_0xf3f6('0x20')];var _0x37b8f1=_0x558986?_0xdffa2f['count']:_0x3b3404[_0xf3f6('0x20')]+_0x3b3404['limit'];var _0x364f5a;if(_0x37b8f1>=_0x267040){_0x37b8f1=_0x267040;_0x364f5a=0xc8;}else{_0x364f5a=0xce;}_0x4e60fa[_0xf3f6('0x1f')](_0x364f5a);return _0x4e60fa[_0xf3f6('0x24')]('Content-Range',_0x12bea3+'-'+_0x37b8f1+'/'+_0x267040)[_0xf3f6('0x25')](_0xdffa2f);}return null;};}function patchUpdates(_0x258228){return function(_0x44aa6f){try{jsonpatch[_0xf3f6('0x26')](_0x44aa6f,_0x258228,!![]);}catch(_0x3e6a71){return BPromise[_0xf3f6('0x27')](_0x3e6a71);}return _0x44aa6f['save']();};}function saveUpdates(_0x4c313a,_0x491f76){return function(_0x404a6d){if(_0x404a6d){return _0x404a6d[_0xf3f6('0x28')](_0x4c313a)[_0xf3f6('0x29')](function(_0x37f576){return _0x37f576;});}return null;};}function removeEntity(_0x4e54d2,_0x505844){return function(_0x45d76d){if(_0x45d76d){return _0x45d76d[_0xf3f6('0x2a')]()[_0xf3f6('0x29')](function(){_0x4e54d2[_0xf3f6('0x1f')](0xcc)[_0xf3f6('0x1e')]();});}};}function handleEntityNotFound(_0x3f5984,_0x32cbc7){return function(_0x4fe1eb){if(!_0x4fe1eb){_0x3f5984[_0xf3f6('0x1d')](0x194);}return _0x4fe1eb;};}function handleError(_0x3595c7,_0x4c6146){_0x4c6146=_0x4c6146||0x1f4;return function(_0x37c35d){logger[_0xf3f6('0x2b')](_0x37c35d[_0xf3f6('0x2c')]);if(_0x37c35d[_0xf3f6('0x2d')]){delete _0x37c35d[_0xf3f6('0x2d')];}_0x3595c7['status'](_0x4c6146)[_0xf3f6('0x2e')](_0x37c35d);};}exports[_0xf3f6('0x2f')]=function(_0x30accb,_0x966f9b){var _0x3a15d8={},_0x4f671e={},_0x1586e5={'count':0x0,'rows':[]};var _0x3a28de=_[_0xf3f6('0x30')](db[_0xf3f6('0x31')]['rawAttributes'],function(_0x159ea6){return{'name':_0x159ea6[_0xf3f6('0x32')],'type':_0x159ea6['type'][_0xf3f6('0x33')]};});_0x4f671e[_0xf3f6('0x34')]=_[_0xf3f6('0x30')](_0x3a28de,_0xf3f6('0x2d'));_0x4f671e[_0xf3f6('0x35')]=_[_0xf3f6('0x36')](_0x30accb[_0xf3f6('0x35')]);_0x4f671e[_0xf3f6('0x37')]=_[_0xf3f6('0x38')](_0x4f671e[_0xf3f6('0x34')],_0x4f671e[_0xf3f6('0x35')]);_0x3a15d8[_0xf3f6('0x39')]=_[_0xf3f6('0x38')](_0x4f671e[_0xf3f6('0x34')],qs[_0xf3f6('0x3a')](_0x30accb[_0xf3f6('0x35')][_0xf3f6('0x3a')]));_0x3a15d8[_0xf3f6('0x39')]=_0x3a15d8[_0xf3f6('0x39')]['length']?_0x3a15d8[_0xf3f6('0x39')]:_0x4f671e[_0xf3f6('0x34')];if(!_0x30accb[_0xf3f6('0x35')]['hasOwnProperty'](_0xf3f6('0x3b'))){_0x3a15d8[_0xf3f6('0x22')]=qs[_0xf3f6('0x22')](_0x30accb['query'][_0xf3f6('0x22')]);_0x3a15d8[_0xf3f6('0x20')]=qs[_0xf3f6('0x20')](_0x30accb[_0xf3f6('0x35')][_0xf3f6('0x20')]);}_0x3a15d8['order']=qs['sort'](_0x30accb['query']['sort']);_0x3a15d8['where']=qs['filters'](_[_0xf3f6('0x3c')](_0x30accb[_0xf3f6('0x35')],_0x4f671e[_0xf3f6('0x37')]),_0x3a28de);if(_0x30accb[_0xf3f6('0x35')]['filter']){_0x3a15d8[_0xf3f6('0x3d')]=_[_0xf3f6('0x3e')](_0x3a15d8[_0xf3f6('0x3d')],{'$or':_['map'](_0x3a28de,function(_0x547925){if(_0x547925[_0xf3f6('0x3f')]!==_0xf3f6('0x40')){var _0x5b8fb9={};_0x5b8fb9[_0x547925[_0xf3f6('0x2d')]]={'$like':'%'+_0x30accb[_0xf3f6('0x35')][_0xf3f6('0x41')]+'%'};return _0x5b8fb9;}})});}_0x3a15d8=_[_0xf3f6('0x3e')]({},_0x3a15d8,_0x30accb['options']);var _0x33b117={'where':_0x3a15d8['where']};return db[_0xf3f6('0x31')]['count'](_0x33b117)['then'](function(_0x21a6bf){_0x1586e5['count']=_0x21a6bf;if(_0x30accb[_0xf3f6('0x35')][_0xf3f6('0x42')]){_0x3a15d8['include']=[{'all':!![]}];}return db['OpenchannelTransferReport'][_0xf3f6('0x43')](_0x3a15d8);})[_0xf3f6('0x29')](function(_0x38a100){_0x1586e5['rows']=_0x38a100;return _0x1586e5;})[_0xf3f6('0x29')](respondWithFilteredResult(_0x966f9b,_0x3a15d8))[_0xf3f6('0x44')](handleError(_0x966f9b,null));};exports['show']=function(_0x150a1b,_0x507d6f){var _0x278252={'raw':!![],'where':{'id':_0x150a1b['params']['id']}},_0x20bca9={};_0x20bca9[_0xf3f6('0x34')]=_[_0xf3f6('0x36')](db[_0xf3f6('0x31')][_0xf3f6('0x45')]);_0x20bca9[_0xf3f6('0x35')]=_[_0xf3f6('0x36')](_0x150a1b[_0xf3f6('0x35')]);_0x20bca9[_0xf3f6('0x37')]=_[_0xf3f6('0x38')](_0x20bca9[_0xf3f6('0x34')],_0x20bca9[_0xf3f6('0x35')]);_0x278252[_0xf3f6('0x39')]=_[_0xf3f6('0x38')](_0x20bca9[_0xf3f6('0x34')],qs[_0xf3f6('0x3a')](_0x150a1b[_0xf3f6('0x35')][_0xf3f6('0x3a')]));_0x278252[_0xf3f6('0x39')]=_0x278252[_0xf3f6('0x39')][_0xf3f6('0x46')]?_0x278252[_0xf3f6('0x39')]:_0x20bca9[_0xf3f6('0x34')];if(_0x150a1b[_0xf3f6('0x35')]['includeAll']){_0x278252[_0xf3f6('0x47')]=[{'all':!![]}];}_0x278252=_[_0xf3f6('0x3e')]({},_0x278252,_0x150a1b['options']);return db[_0xf3f6('0x31')][_0xf3f6('0x48')](_0x278252)[_0xf3f6('0x29')](handleEntityNotFound(_0x507d6f,null))[_0xf3f6('0x29')](respondWithResult(_0x507d6f,null))['catch'](handleError(_0x507d6f,null));};exports['create']=function(_0x490ff3,_0x40eb3b){return db[_0xf3f6('0x31')][_0xf3f6('0x49')](_0x490ff3[_0xf3f6('0x4a')],{})[_0xf3f6('0x29')](respondWithResult(_0x40eb3b,0xc9))['catch'](handleError(_0x40eb3b,null));};exports[_0xf3f6('0x28')]=function(_0x544b29,_0xeadb1a){if(_0x544b29[_0xf3f6('0x4a')]['id']){delete _0x544b29[_0xf3f6('0x4a')]['id'];}return db[_0xf3f6('0x31')][_0xf3f6('0x48')]({'where':{'id':_0x544b29[_0xf3f6('0x4b')]['id']}})[_0xf3f6('0x29')](handleEntityNotFound(_0xeadb1a,null))[_0xf3f6('0x29')](saveUpdates(_0x544b29[_0xf3f6('0x4a')],null))['then'](respondWithResult(_0xeadb1a,null))[_0xf3f6('0x44')](handleError(_0xeadb1a,null));};exports['destroy']=function(_0x5c06ba,_0x5974af){return db['OpenchannelTransferReport']['find']({'where':{'id':_0x5c06ba['params']['id']}})[_0xf3f6('0x29')](handleEntityNotFound(_0x5974af,null))[_0xf3f6('0x29')](removeEntity(_0x5974af,null))['catch'](handleError(_0x5974af,null));};exports[_0xf3f6('0x4c')]=function(_0x2fbc93,_0x533760){return db['OpenchannelTransferReport'][_0xf3f6('0x4c')]()[_0xf3f6('0x29')](respondWithResult(_0x533760,null))['catch'](handleError(_0x533760,null));};
\ No newline at end of file
+var _0xa4d7=['../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','undefined','limit','count','reject','update','then','destroy','sendStatus','error','stack','name','send','map','OpenchannelTransferReport','rawAttributes','fieldName','type','model','query','keys','filters','attributes','intersection','fields','hasOwnProperty','nolimit','order','sort','where','pick','VIRTUAL','filter','merge','options','includeAll','include','findAll','catch','params','find','create','body','describe','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','papaparse'];(function(_0x3817a9,_0x29e215){var _0x443f30=function(_0x13940b){while(--_0x13940b){_0x3817a9['push'](_0x3817a9['shift']());}};_0x443f30(++_0x29e215);}(_0xa4d7,0xc8));var _0x7a4d=function(_0x54ed00,_0x253ac2){_0x54ed00=_0x54ed00-0x0;var _0x2f9a44=_0xa4d7[_0x54ed00];return _0x2f9a44;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x7a4d('0x0'));var jsonpatch=require(_0x7a4d('0x1'));var rp=require(_0x7a4d('0x2'));var moment=require('moment');var BPromise=require(_0x7a4d('0x3'));var Mustache=require(_0x7a4d('0x4'));var util=require(_0x7a4d('0x5'));var path=require(_0x7a4d('0x6'));var sox=require(_0x7a4d('0x7'));var csv=require(_0x7a4d('0x8'));var ejs=require(_0x7a4d('0x9'));var fs=require('fs');var fs_extra=require(_0x7a4d('0xa'));var _=require(_0x7a4d('0xb'));var squel=require(_0x7a4d('0xc'));var crypto=require(_0x7a4d('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x7a4d('0xe'));var toCsv=require(_0x7a4d('0x8'));var querystring=require('querystring');var Papa=require(_0x7a4d('0xf'));var Redis=require('ioredis');var authService=require(_0x7a4d('0x10'));var qs=require(_0x7a4d('0x11'));var as=require(_0x7a4d('0x12'));var hardwareService=require(_0x7a4d('0x13'));var logger=require(_0x7a4d('0x14'))(_0x7a4d('0x15'));var utils=require('../../config/utils');var config=require(_0x7a4d('0x16'));var licenseUtil=require(_0x7a4d('0x17'));var db=require(_0x7a4d('0x18'))['db'];function respondWithStatusCode(_0x575fdb,_0x56a0cb){_0x56a0cb=_0x56a0cb||0xcc;return function(_0x2bf21c){if(_0x2bf21c){return _0x575fdb['sendStatus'](_0x56a0cb);}return _0x575fdb[_0x7a4d('0x19')](_0x56a0cb)[_0x7a4d('0x1a')]();};}function respondWithResult(_0x43244b,_0x35cf11){_0x35cf11=_0x35cf11||0xc8;return function(_0x59538d){if(_0x59538d){return _0x43244b[_0x7a4d('0x19')](_0x35cf11)[_0x7a4d('0x1b')](_0x59538d);}};}function respondWithFilteredResult(_0x45320c,_0x4cfa10){return function(_0x168904){if(_0x168904){var _0x5aa7e1=typeof _0x4cfa10[_0x7a4d('0x1c')]===_0x7a4d('0x1d')&&typeof _0x4cfa10[_0x7a4d('0x1e')]===_0x7a4d('0x1d');var _0x74a288=_0x168904[_0x7a4d('0x1f')];var _0x3e2528=_0x5aa7e1?0x0:_0x4cfa10['offset'];var _0x2ce3a2=_0x5aa7e1?_0x168904['count']:_0x4cfa10[_0x7a4d('0x1c')]+_0x4cfa10[_0x7a4d('0x1e')];var _0x177ca3;if(_0x2ce3a2>=_0x74a288){_0x2ce3a2=_0x74a288;_0x177ca3=0xc8;}else{_0x177ca3=0xce;}_0x45320c[_0x7a4d('0x19')](_0x177ca3);return _0x45320c['set']('Content-Range',_0x3e2528+'-'+_0x2ce3a2+'/'+_0x74a288)[_0x7a4d('0x1b')](_0x168904);}return null;};}function patchUpdates(_0x73cd01){return function(_0x28b4ba){try{jsonpatch['apply'](_0x28b4ba,_0x73cd01,!![]);}catch(_0x18cd3d){return BPromise[_0x7a4d('0x20')](_0x18cd3d);}return _0x28b4ba['save']();};}function saveUpdates(_0x54a995,_0xfea0ab){return function(_0x2e10bf){if(_0x2e10bf){return _0x2e10bf[_0x7a4d('0x21')](_0x54a995)[_0x7a4d('0x22')](function(_0x3619b9){return _0x3619b9;});}return null;};}function removeEntity(_0xffaa59,_0x57fcd5){return function(_0x551daf){if(_0x551daf){return _0x551daf[_0x7a4d('0x23')]()[_0x7a4d('0x22')](function(){_0xffaa59['status'](0xcc)[_0x7a4d('0x1a')]();});}};}function handleEntityNotFound(_0x4a5c6f,_0x35b9cb){return function(_0x593b12){if(!_0x593b12){_0x4a5c6f[_0x7a4d('0x24')](0x194);}return _0x593b12;};}function handleError(_0x5728f2,_0x1c9d08){_0x1c9d08=_0x1c9d08||0x1f4;return function(_0x283a34){logger[_0x7a4d('0x25')](_0x283a34[_0x7a4d('0x26')]);if(_0x283a34[_0x7a4d('0x27')]){delete _0x283a34[_0x7a4d('0x27')];}_0x5728f2[_0x7a4d('0x19')](_0x1c9d08)[_0x7a4d('0x28')](_0x283a34);};}exports['index']=function(_0x4aec0b,_0x33bbaa){var _0x2d21c2={},_0x482e0a={},_0xfa136={'count':0x0,'rows':[]};var _0x2ff7eb=_[_0x7a4d('0x29')](db[_0x7a4d('0x2a')][_0x7a4d('0x2b')],function(_0x2ad4c5){return{'name':_0x2ad4c5[_0x7a4d('0x2c')],'type':_0x2ad4c5[_0x7a4d('0x2d')]['key']};});_0x482e0a[_0x7a4d('0x2e')]=_[_0x7a4d('0x29')](_0x2ff7eb,'name');_0x482e0a[_0x7a4d('0x2f')]=_[_0x7a4d('0x30')](_0x4aec0b[_0x7a4d('0x2f')]);_0x482e0a[_0x7a4d('0x31')]=_['intersection'](_0x482e0a[_0x7a4d('0x2e')],_0x482e0a[_0x7a4d('0x2f')]);_0x2d21c2[_0x7a4d('0x32')]=_[_0x7a4d('0x33')](_0x482e0a['model'],qs[_0x7a4d('0x34')](_0x4aec0b[_0x7a4d('0x2f')]['fields']));_0x2d21c2['attributes']=_0x2d21c2[_0x7a4d('0x32')]['length']?_0x2d21c2[_0x7a4d('0x32')]:_0x482e0a[_0x7a4d('0x2e')];if(!_0x4aec0b[_0x7a4d('0x2f')][_0x7a4d('0x35')](_0x7a4d('0x36'))){_0x2d21c2[_0x7a4d('0x1e')]=qs[_0x7a4d('0x1e')](_0x4aec0b['query'][_0x7a4d('0x1e')]);_0x2d21c2[_0x7a4d('0x1c')]=qs['offset'](_0x4aec0b[_0x7a4d('0x2f')][_0x7a4d('0x1c')]);}_0x2d21c2[_0x7a4d('0x37')]=qs[_0x7a4d('0x38')](_0x4aec0b[_0x7a4d('0x2f')][_0x7a4d('0x38')]);_0x2d21c2[_0x7a4d('0x39')]=qs[_0x7a4d('0x31')](_[_0x7a4d('0x3a')](_0x4aec0b[_0x7a4d('0x2f')],_0x482e0a[_0x7a4d('0x31')]),_0x2ff7eb);if(_0x4aec0b[_0x7a4d('0x2f')]['filter']){_0x2d21c2[_0x7a4d('0x39')]=_['merge'](_0x2d21c2[_0x7a4d('0x39')],{'$or':_['map'](_0x2ff7eb,function(_0x220c18){if(_0x220c18[_0x7a4d('0x2d')]!==_0x7a4d('0x3b')){var _0x21e33e={};_0x21e33e[_0x220c18['name']]={'$like':'%'+_0x4aec0b[_0x7a4d('0x2f')][_0x7a4d('0x3c')]+'%'};return _0x21e33e;}})});}_0x2d21c2=_[_0x7a4d('0x3d')]({},_0x2d21c2,_0x4aec0b[_0x7a4d('0x3e')]);var _0x546e64={'where':_0x2d21c2[_0x7a4d('0x39')]};return db[_0x7a4d('0x2a')][_0x7a4d('0x1f')](_0x546e64)[_0x7a4d('0x22')](function(_0x4ca323){_0xfa136[_0x7a4d('0x1f')]=_0x4ca323;if(_0x4aec0b[_0x7a4d('0x2f')][_0x7a4d('0x3f')]){_0x2d21c2[_0x7a4d('0x40')]=[{'all':!![]}];}return db[_0x7a4d('0x2a')][_0x7a4d('0x41')](_0x2d21c2);})[_0x7a4d('0x22')](function(_0x24ac9a){_0xfa136['rows']=_0x24ac9a;return _0xfa136;})['then'](respondWithFilteredResult(_0x33bbaa,_0x2d21c2))[_0x7a4d('0x42')](handleError(_0x33bbaa,null));};exports['show']=function(_0x570ffb,_0x157c3a){var _0x30d1e0={'raw':!![],'where':{'id':_0x570ffb[_0x7a4d('0x43')]['id']}},_0x3b1e6d={};_0x3b1e6d[_0x7a4d('0x2e')]=_[_0x7a4d('0x30')](db[_0x7a4d('0x2a')]['rawAttributes']);_0x3b1e6d[_0x7a4d('0x2f')]=_[_0x7a4d('0x30')](_0x570ffb[_0x7a4d('0x2f')]);_0x3b1e6d[_0x7a4d('0x31')]=_['intersection'](_0x3b1e6d[_0x7a4d('0x2e')],_0x3b1e6d[_0x7a4d('0x2f')]);_0x30d1e0['attributes']=_['intersection'](_0x3b1e6d['model'],qs['fields'](_0x570ffb[_0x7a4d('0x2f')]['fields']));_0x30d1e0[_0x7a4d('0x32')]=_0x30d1e0[_0x7a4d('0x32')]['length']?_0x30d1e0['attributes']:_0x3b1e6d['model'];if(_0x570ffb['query'][_0x7a4d('0x3f')]){_0x30d1e0[_0x7a4d('0x40')]=[{'all':!![]}];}_0x30d1e0=_[_0x7a4d('0x3d')]({},_0x30d1e0,_0x570ffb['options']);return db[_0x7a4d('0x2a')][_0x7a4d('0x44')](_0x30d1e0)['then'](handleEntityNotFound(_0x157c3a,null))[_0x7a4d('0x22')](respondWithResult(_0x157c3a,null))[_0x7a4d('0x42')](handleError(_0x157c3a,null));};exports[_0x7a4d('0x45')]=function(_0x37af21,_0x87a1bd){return db[_0x7a4d('0x2a')]['create'](_0x37af21[_0x7a4d('0x46')],{})[_0x7a4d('0x22')](respondWithResult(_0x87a1bd,0xc9))[_0x7a4d('0x42')](handleError(_0x87a1bd,null));};exports['update']=function(_0x5eee8f,_0x5521fb){if(_0x5eee8f[_0x7a4d('0x46')]['id']){delete _0x5eee8f[_0x7a4d('0x46')]['id'];}return db[_0x7a4d('0x2a')][_0x7a4d('0x44')]({'where':{'id':_0x5eee8f[_0x7a4d('0x43')]['id']}})[_0x7a4d('0x22')](handleEntityNotFound(_0x5521fb,null))[_0x7a4d('0x22')](saveUpdates(_0x5eee8f[_0x7a4d('0x46')],null))[_0x7a4d('0x22')](respondWithResult(_0x5521fb,null))['catch'](handleError(_0x5521fb,null));};exports['destroy']=function(_0x2a4787,_0x501228){return db[_0x7a4d('0x2a')][_0x7a4d('0x44')]({'where':{'id':_0x2a4787[_0x7a4d('0x43')]['id']}})[_0x7a4d('0x22')](handleEntityNotFound(_0x501228,null))['then'](removeEntity(_0x501228,null))['catch'](handleError(_0x501228,null));};exports[_0x7a4d('0x47')]=function(_0x22fd14,_0x5240d7){return db[_0x7a4d('0x2a')]['describe']()['then'](respondWithResult(_0x5240d7,null))[_0x7a4d('0x42')](handleError(_0x5240d7,null));};
\ No newline at end of file
index 8ffb299..a533f04 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4aa2=['lodash','util','../../config/logger','api','moment','request-promise','path','../../config/environment','OpenchannelTransferReport','report_openchannel_transfer','uniqueid'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0x4aa2,0x134));var _0x24aa=function(_0x19aac7,_0x278e23){_0x19aac7=_0x19aac7-0x0;var _0x395ecf=_0x4aa2[_0x19aac7];return _0x395ecf;};'use strict';var _=require(_0x24aa('0x0'));var util=require(_0x24aa('0x1'));var logger=require(_0x24aa('0x2'))(_0x24aa('0x3'));var moment=require(_0x24aa('0x4'));var BPromise=require('bluebird');var rp=require(_0x24aa('0x5'));var fs=require('fs');var path=require(_0x24aa('0x6'));var rimraf=require('rimraf');var config=require(_0x24aa('0x7'));var attributes=require('./openchannelTransferReport.attributes');module['exports']=function(_0x32552e,_0x4eb932){return _0x32552e['define'](_0x24aa('0x8'),attributes,{'tableName':_0x24aa('0x9'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0x24aa('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x5121=['bluebird','request-promise','path','rimraf','./openchannelTransferReport.attributes','exports','define','OpenchannelTransferReport','report_openchannel_transfer','uniqueid','lodash','util','../../config/logger','api','moment'];(function(_0x498877,_0x324062){var _0x17672e=function(_0x3cd840){while(--_0x3cd840){_0x498877['push'](_0x498877['shift']());}};_0x17672e(++_0x324062);}(_0x5121,0xcd));var _0x1512=function(_0x2b0a86,_0x2ecebd){_0x2b0a86=_0x2b0a86-0x0;var _0x955940=_0x5121[_0x2b0a86];return _0x955940;};'use strict';var _=require(_0x1512('0x0'));var util=require(_0x1512('0x1'));var logger=require(_0x1512('0x2'))(_0x1512('0x3'));var moment=require(_0x1512('0x4'));var BPromise=require(_0x1512('0x5'));var rp=require(_0x1512('0x6'));var fs=require('fs');var path=require(_0x1512('0x7'));var rimraf=require(_0x1512('0x8'));var config=require('../../config/environment');var attributes=require(_0x1512('0x9'));module[_0x1512('0xa')]=function(_0x212d0a,_0x22d7c8){return _0x212d0a[_0x1512('0xb')](_0x1512('0xc'),attributes,{'tableName':_0x1512('0xd'),'paranoid':![],'indexes':[{'name':_0x1512('0xe'),'fields':[_0x1512('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
index cf2b6ab..aec6267 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x615a=['catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','client','then','info','OpenchannelTransferReport,\x20%s,\x20%s','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result'];(function(_0x105e3e,_0x4cb667){var _0x5b0125=function(_0x877866){while(--_0x877866){_0x105e3e['push'](_0x105e3e['shift']());}};_0x5b0125(++_0x4cb667);}(_0x615a,0x119));var _0xa615=function(_0x16b962,_0x1e8b75){_0x16b962=_0x16b962-0x0;var _0x5b8877=_0x615a[_0x16b962];return _0x5b8877;};'use strict';var _=require(_0xa615('0x0'));var util=require('util');var moment=require(_0xa615('0x1'));var BPromise=require('bluebird');var rs=require(_0xa615('0x2'));var fs=require('fs');var Redis=require(_0xa615('0x3'));var db=require(_0xa615('0x4'))['db'];var utils=require(_0xa615('0x5'));var logger=require('../../config/logger')(_0xa615('0x6'));var config=require(_0xa615('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xa615('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x44afda,_0x389dd4,_0x2db48d){return new BPromise(function(_0x1e714d,_0x2eae10){return client['request'](_0x44afda,_0x2db48d)[_0xa615('0x9')](function(_0x52470e){logger[_0xa615('0xa')](_0xa615('0xb'),_0x389dd4,'request\x20sent');logger[_0xa615('0xc')](_0xa615('0xd'),_0x389dd4,_0xa615('0xe'),JSON[_0xa615('0xf')](_0x52470e));if(_0x52470e[_0xa615('0x10')]){if(_0x52470e['error']['code']===0x1f4){logger[_0xa615('0x10')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x389dd4,_0x52470e[_0xa615('0x10')][_0xa615('0x11')]);return _0x2eae10(_0x52470e[_0xa615('0x10')][_0xa615('0x11')]);}logger['error']('OpenchannelTransferReport,\x20%s,\x20%s',_0x389dd4,_0x52470e[_0xa615('0x10')][_0xa615('0x11')]);return _0x1e714d(_0x52470e[_0xa615('0x10')][_0xa615('0x11')]);}else{logger[_0xa615('0xa')](_0xa615('0xb'),_0x389dd4,_0xa615('0xe'));_0x1e714d(_0x52470e[_0xa615('0x12')][_0xa615('0x11')]);}})[_0xa615('0x13')](function(_0xa86873){logger[_0xa615('0x10')](_0xa615('0xb'),_0x389dd4,_0xa86873);_0x2eae10(_0xa86873);});});}
\ No newline at end of file
+var _0x04de=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','request','then','info','request\x20sent','debug','OpenchannelTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','OpenchannelTransferReport,\x20%s,\x20%s','result','catch','lodash'];(function(_0x5e9d31,_0x5c1932){var _0x55374a=function(_0x489d23){while(--_0x489d23){_0x5e9d31['push'](_0x5e9d31['shift']());}};_0x55374a(++_0x5c1932);}(_0x04de,0x107));var _0xe04d=function(_0x566250,_0x35ade6){_0x566250=_0x566250-0x0;var _0x30b8e4=_0x04de[_0x566250];return _0x30b8e4;};'use strict';var _=require(_0xe04d('0x0'));var util=require(_0xe04d('0x1'));var moment=require(_0xe04d('0x2'));var BPromise=require(_0xe04d('0x3'));var rs=require(_0xe04d('0x4'));var fs=require('fs');var Redis=require(_0xe04d('0x5'));var db=require(_0xe04d('0x6'))['db'];var utils=require(_0xe04d('0x7'));var logger=require(_0xe04d('0x8'))(_0xe04d('0x9'));var config=require(_0xe04d('0xa'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x531688,_0x55efb5,_0x210e93){return new BPromise(function(_0x72b1ce,_0x1be121){return client[_0xe04d('0xb')](_0x531688,_0x210e93)[_0xe04d('0xc')](function(_0x2ae3c9){logger[_0xe04d('0xd')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x55efb5,_0xe04d('0xe'));logger[_0xe04d('0xf')](_0xe04d('0x10'),_0x55efb5,_0xe04d('0xe'),JSON[_0xe04d('0x11')](_0x2ae3c9));if(_0x2ae3c9[_0xe04d('0x12')]){if(_0x2ae3c9[_0xe04d('0x12')][_0xe04d('0x13')]===0x1f4){logger[_0xe04d('0x12')]('OpenchannelTransferReport,\x20%s,\x20%s',_0x55efb5,_0x2ae3c9[_0xe04d('0x12')][_0xe04d('0x14')]);return _0x1be121(_0x2ae3c9[_0xe04d('0x12')][_0xe04d('0x14')]);}logger[_0xe04d('0x12')](_0xe04d('0x15'),_0x55efb5,_0x2ae3c9[_0xe04d('0x12')][_0xe04d('0x14')]);return _0x72b1ce(_0x2ae3c9[_0xe04d('0x12')][_0xe04d('0x14')]);}else{logger[_0xe04d('0xd')](_0xe04d('0x15'),_0x55efb5,'request\x20sent');_0x72b1ce(_0x2ae3c9[_0xe04d('0x16')]['message']);}})[_0xe04d('0x17')](function(_0x49c063){logger[_0xe04d('0x12')](_0xe04d('0x15'),_0x55efb5,_0x49c063);_0x1be121(_0x49c063);});});}
\ No newline at end of file
index 9fb5315..c65ad19 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa656=['show','put','delete','destroy','exports','multer','util','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./pause.controller','get','index','/:id','isAuthenticated'];(function(_0x2039fe,_0x58b9c8){var _0x5ae38b=function(_0x15bf76){while(--_0x15bf76){_0x2039fe['push'](_0x2039fe['shift']());}};_0x5ae38b(++_0x58b9c8);}(_0xa656,0x115));var _0x6a65=function(_0x351595,_0x1a335a){_0x351595=_0x351595-0x0;var _0x31ea4c=_0xa656[_0x351595];return _0x31ea4c;};'use strict';var multer=require(_0x6a65('0x0'));var util=require(_0x6a65('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x6a65('0x2')]();var fs_extra=require(_0x6a65('0x3'));var auth=require(_0x6a65('0x4'));var interaction=require(_0x6a65('0x5'));var config=require(_0x6a65('0x6'));var controller=require(_0x6a65('0x7'));router[_0x6a65('0x8')]('/',auth['isAuthenticated'](),controller[_0x6a65('0x9')]);router[_0x6a65('0x8')](_0x6a65('0xa'),auth[_0x6a65('0xb')](),controller[_0x6a65('0xc')]);router['post']('/',auth[_0x6a65('0xb')](),controller['create']);router[_0x6a65('0xd')](_0x6a65('0xa'),auth['isAuthenticated'](),controller['update']);router[_0x6a65('0xe')](_0x6a65('0xa'),auth[_0x6a65('0xb')](),controller[_0x6a65('0xf')]);module[_0x6a65('0x10')]=router;
\ No newline at end of file
+var _0x359d=['../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/:id','put','update','delete','destroy','exports','util','connect-timeout','express','Router','fs-extra'];(function(_0x51f78b,_0x3ecad7){var _0x1a83d2=function(_0x3dfea4){while(--_0x3dfea4){_0x51f78b['push'](_0x51f78b['shift']());}};_0x1a83d2(++_0x3ecad7);}(_0x359d,0xeb));var _0xd359=function(_0x5d9ceb,_0x1a49f5){_0x5d9ceb=_0x5d9ceb-0x0;var _0x33ce82=_0x359d[_0x5d9ceb];return _0x33ce82;};'use strict';var multer=require('multer');var util=require(_0xd359('0x0'));var path=require('path');var timeout=require(_0xd359('0x1'));var express=require(_0xd359('0x2'));var router=express[_0xd359('0x3')]();var fs_extra=require(_0xd359('0x4'));var auth=require(_0xd359('0x5'));var interaction=require(_0xd359('0x6'));var config=require('../../config/environment');var controller=require('./pause.controller');router[_0xd359('0x7')]('/',auth[_0xd359('0x8')](),controller[_0xd359('0x9')]);router['get'](_0xd359('0xa'),auth['isAuthenticated'](),controller['show']);router['post']('/',auth['isAuthenticated'](),controller['create']);router[_0xd359('0xb')](_0xd359('0xa'),auth[_0xd359('0x8')](),controller[_0xd359('0xc')]);router[_0xd359('0xd')](_0xd359('0xa'),auth['isAuthenticated'](),controller[_0xd359('0xe')]);module[_0xd359('0xf')]=router;
\ No newline at end of file
index cfb4db1..dc68c3b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf202=['name','sequelize','exports'];(function(_0x2f8c4e,_0xcaa470){var _0xc64b81=function(_0x39dedd){while(--_0x39dedd){_0x2f8c4e['push'](_0x2f8c4e['shift']());}};_0xc64b81(++_0xcaa470);}(_0xf202,0x15d));var _0x2f20=function(_0x53dee1,_0xf86314){_0x53dee1=_0x53dee1-0x0;var _0xfdb4c6=_0xf202[_0x53dee1];return _0xfdb4c6;};'use strict';var Sequelize=require(_0x2f20('0x0'));module[_0x2f20('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x2f20('0x2'),'allowNull':![]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xdd3b=['exports','STRING','sequelize'];(function(_0x161ad6,_0x426d20){var _0x1eb373=function(_0x353bad){while(--_0x353bad){_0x161ad6['push'](_0x161ad6['shift']());}};_0x1eb373(++_0x426d20);}(_0xdd3b,0xfe));var _0xbdd3=function(_0x199ebf,_0x48b072){_0x199ebf=_0x199ebf-0x0;var _0x110cff=_0xdd3b[_0x199ebf];return _0x110cff;};'use strict';var Sequelize=require(_0xbdd3('0x0'));module[_0xbdd3('0x1')]={'name':{'type':Sequelize[_0xbdd3('0x2')],'unique':'name','allowNull':![]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
index a08962a..74806e4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x09ca=['../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','limit','undefined','count','Content-Range','apply','reject','save','then','destroy','get','Pauses','error','stack','name','index','map','rawAttributes','fieldName','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filters','pick','filter','merge','VIRTUAL','includeAll','include','Pause','rows','catch','params','options','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','ioredis'];(function(_0x200152,_0x2c9a47){var _0xdbba14=function(_0x349a75){while(--_0x349a75){_0x200152['push'](_0x200152['shift']());}};_0xdbba14(++_0x2c9a47);}(_0x09ca,0x1e5));var _0xa09c=function(_0x510ee8,_0x519bc6){_0x510ee8=_0x510ee8-0x0;var _0x5280c1=_0x09ca[_0x510ee8];return _0x5280c1;};'use strict';var emlformat=require(_0xa09c('0x0'));var rimraf=require(_0xa09c('0x1'));var zipdir=require(_0xa09c('0x2'));var jsonpatch=require(_0xa09c('0x3'));var rp=require(_0xa09c('0x4'));var moment=require('moment');var BPromise=require(_0xa09c('0x5'));var Mustache=require(_0xa09c('0x6'));var util=require(_0xa09c('0x7'));var path=require(_0xa09c('0x8'));var sox=require(_0xa09c('0x9'));var csv=require(_0xa09c('0xa'));var ejs=require(_0xa09c('0xb'));var fs=require('fs');var fs_extra=require(_0xa09c('0xc'));var _=require(_0xa09c('0xd'));var squel=require(_0xa09c('0xe'));var crypto=require(_0xa09c('0xf'));var jsforce=require('jsforce');var deskjs=require(_0xa09c('0x10'));var toCsv=require('to-csv');var querystring=require(_0xa09c('0x11'));var Papa=require('papaparse');var Redis=require(_0xa09c('0x12'));var authService=require(_0xa09c('0x13'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xa09c('0x14'));var logger=require(_0xa09c('0x15'))(_0xa09c('0x16'));var utils=require(_0xa09c('0x17'));var config=require(_0xa09c('0x18'));var licenseUtil=require(_0xa09c('0x19'));var db=require(_0xa09c('0x1a'))['db'];function respondWithStatusCode(_0x1c3c76,_0x3502f7){_0x3502f7=_0x3502f7||0xcc;return function(_0x19f4af){if(_0x19f4af){return _0x1c3c76[_0xa09c('0x1b')](_0x3502f7);}return _0x1c3c76[_0xa09c('0x1c')](_0x3502f7)[_0xa09c('0x1d')]();};}function respondWithResult(_0x266b82,_0x44d630){_0x44d630=_0x44d630||0xc8;return function(_0x408871){if(_0x408871){return _0x266b82['status'](_0x44d630)[_0xa09c('0x1e')](_0x408871);}};}function respondWithFilteredResult(_0x41b65d,_0x406289){return function(_0x4936e2){if(_0x4936e2){var _0x231060=typeof _0x406289[_0xa09c('0x1f')]==='undefined'&&typeof _0x406289[_0xa09c('0x20')]===_0xa09c('0x21');var _0x51216d=_0x4936e2[_0xa09c('0x22')];var _0x9fec1d=_0x231060?0x0:_0x406289[_0xa09c('0x1f')];var _0x14f5c6=_0x231060?_0x4936e2[_0xa09c('0x22')]:_0x406289['offset']+_0x406289['limit'];var _0x6ae886;if(_0x14f5c6>=_0x51216d){_0x14f5c6=_0x51216d;_0x6ae886=0xc8;}else{_0x6ae886=0xce;}_0x41b65d[_0xa09c('0x1c')](_0x6ae886);return _0x41b65d['set'](_0xa09c('0x23'),_0x9fec1d+'-'+_0x14f5c6+'/'+_0x51216d)[_0xa09c('0x1e')](_0x4936e2);}return null;};}function patchUpdates(_0x5864ea){return function(_0x431ac0){try{jsonpatch[_0xa09c('0x24')](_0x431ac0,_0x5864ea,!![]);}catch(_0xa40c70){return BPromise[_0xa09c('0x25')](_0xa40c70);}return _0x431ac0[_0xa09c('0x26')]();};}function saveUpdates(_0x12bc97,_0x4b3320){return function(_0x4fb286){if(_0x4fb286){return _0x4fb286['update'](_0x12bc97)[_0xa09c('0x27')](function(_0xf0f42f){return _0xf0f42f;});}return null;};}function removeEntity(_0x2d1f7f,_0x585acc){return function(_0x585c03){if(_0x585c03){return _0x585c03[_0xa09c('0x28')]()[_0xa09c('0x27')](function(){var _0x5e436d=_0x585c03[_0xa09c('0x29')]({'plain':!![]});var _0x4d1ff9=_0xa09c('0x2a');return db['UserProfileResource'][_0xa09c('0x28')]({'where':{'type':_0x4d1ff9,'resourceId':_0x5e436d['id']}})[_0xa09c('0x27')](function(){return _0x585c03;});})[_0xa09c('0x27')](function(){_0x2d1f7f['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x2bc413,_0xf7adef){return function(_0x45dd96){if(!_0x45dd96){_0x2bc413[_0xa09c('0x1b')](0x194);}return _0x45dd96;};}function handleError(_0x334392,_0x1bcfe3){_0x1bcfe3=_0x1bcfe3||0x1f4;return function(_0x3381d2){logger[_0xa09c('0x2b')](_0x3381d2[_0xa09c('0x2c')]);if(_0x3381d2[_0xa09c('0x2d')]){delete _0x3381d2['name'];}_0x334392[_0xa09c('0x1c')](_0x1bcfe3)['send'](_0x3381d2);};}exports[_0xa09c('0x2e')]=function(_0x23a158,_0x2f4ba9){var _0x3abe74={},_0x2a1e81={},_0x339512={'count':0x0,'rows':[]};var _0x38b6e9=_[_0xa09c('0x2f')](db['Pause'][_0xa09c('0x30')],function(_0x5c3195){return{'name':_0x5c3195[_0xa09c('0x31')],'type':_0x5c3195['type']['key']};});_0x2a1e81[_0xa09c('0x32')]=_[_0xa09c('0x2f')](_0x38b6e9,_0xa09c('0x2d'));_0x2a1e81[_0xa09c('0x33')]=_[_0xa09c('0x34')](_0x23a158['query']);_0x2a1e81['filters']=_[_0xa09c('0x35')](_0x2a1e81[_0xa09c('0x32')],_0x2a1e81[_0xa09c('0x33')]);_0x3abe74[_0xa09c('0x36')]=_['intersection'](_0x2a1e81[_0xa09c('0x32')],qs[_0xa09c('0x37')](_0x23a158[_0xa09c('0x33')][_0xa09c('0x37')]));_0x3abe74[_0xa09c('0x36')]=_0x3abe74[_0xa09c('0x36')][_0xa09c('0x38')]?_0x3abe74[_0xa09c('0x36')]:_0x2a1e81[_0xa09c('0x32')];if(!_0x23a158[_0xa09c('0x33')][_0xa09c('0x39')](_0xa09c('0x3a'))){_0x3abe74[_0xa09c('0x20')]=qs[_0xa09c('0x20')](_0x23a158['query'][_0xa09c('0x20')]);_0x3abe74[_0xa09c('0x1f')]=qs[_0xa09c('0x1f')](_0x23a158['query'][_0xa09c('0x1f')]);}_0x3abe74['order']=qs['sort'](_0x23a158[_0xa09c('0x33')][_0xa09c('0x3b')]);_0x3abe74[_0xa09c('0x3c')]=qs[_0xa09c('0x3d')](_[_0xa09c('0x3e')](_0x23a158[_0xa09c('0x33')],_0x2a1e81[_0xa09c('0x3d')]),_0x38b6e9);if(_0x23a158[_0xa09c('0x33')][_0xa09c('0x3f')]){_0x3abe74[_0xa09c('0x3c')]=_[_0xa09c('0x40')](_0x3abe74['where'],{'$or':_[_0xa09c('0x2f')](_0x38b6e9,function(_0x4f7f51){if(_0x4f7f51['type']!==_0xa09c('0x41')){var _0x24285d={};_0x24285d[_0x4f7f51['name']]={'$like':'%'+_0x23a158[_0xa09c('0x33')][_0xa09c('0x3f')]+'%'};return _0x24285d;}})});}_0x3abe74=_[_0xa09c('0x40')]({},_0x3abe74,_0x23a158['options']);var _0x55990c={'where':_0x3abe74['where']};return db['Pause']['count'](_0x55990c)[_0xa09c('0x27')](function(_0x392616){_0x339512[_0xa09c('0x22')]=_0x392616;if(_0x23a158[_0xa09c('0x33')][_0xa09c('0x42')]){_0x3abe74[_0xa09c('0x43')]=[{'all':!![]}];}return db[_0xa09c('0x44')]['findAll'](_0x3abe74);})['then'](function(_0x48fa79){_0x339512[_0xa09c('0x45')]=_0x48fa79;return _0x339512;})[_0xa09c('0x27')](respondWithFilteredResult(_0x2f4ba9,_0x3abe74))[_0xa09c('0x46')](handleError(_0x2f4ba9,null));};exports['show']=function(_0x12e6ea,_0x3e7859){var _0x35c778={'raw':!![],'where':{'id':_0x12e6ea[_0xa09c('0x47')]['id']}},_0xffda4d={};_0xffda4d[_0xa09c('0x32')]=_[_0xa09c('0x34')](db[_0xa09c('0x44')]['rawAttributes']);_0xffda4d['query']=_[_0xa09c('0x34')](_0x12e6ea[_0xa09c('0x33')]);_0xffda4d[_0xa09c('0x3d')]=_[_0xa09c('0x35')](_0xffda4d['model'],_0xffda4d['query']);_0x35c778['attributes']=_[_0xa09c('0x35')](_0xffda4d[_0xa09c('0x32')],qs[_0xa09c('0x37')](_0x12e6ea[_0xa09c('0x33')]['fields']));_0x35c778[_0xa09c('0x36')]=_0x35c778['attributes'][_0xa09c('0x38')]?_0x35c778[_0xa09c('0x36')]:_0xffda4d[_0xa09c('0x32')];if(_0x12e6ea[_0xa09c('0x33')][_0xa09c('0x42')]){_0x35c778[_0xa09c('0x43')]=[{'all':!![]}];}_0x35c778=_['merge']({},_0x35c778,_0x12e6ea[_0xa09c('0x48')]);return db['Pause'][_0xa09c('0x49')](_0x35c778)['then'](handleEntityNotFound(_0x3e7859,null))['then'](respondWithResult(_0x3e7859,null))[_0xa09c('0x46')](handleError(_0x3e7859,null));};exports[_0xa09c('0x4a')]=function(_0x18a026,_0x3ba349){return db[_0xa09c('0x44')][_0xa09c('0x4a')](_0x18a026[_0xa09c('0x4b')],{})['then'](function(_0x339e69){var _0x2a478c=_0x18a026[_0xa09c('0x4c')]['get']({'plain':!![]});if(!_0x2a478c)throw new Error(_0xa09c('0x4d'));if(_0x2a478c[_0xa09c('0x4e')]===_0xa09c('0x4c')){var _0x6620b1=_0x339e69[_0xa09c('0x29')]({'plain':!![]});var _0x2bda1f=_0xa09c('0x2a');return db['UserProfileSection']['find']({'where':{'name':_0x2bda1f,'userProfileId':_0x2a478c[_0xa09c('0x4f')]},'raw':!![]})['then'](function(_0x49e230){if(_0x49e230&&_0x49e230[_0xa09c('0x50')]===0x0){return db[_0xa09c('0x51')][_0xa09c('0x4a')]({'name':_0x6620b1[_0xa09c('0x2d')],'resourceId':_0x6620b1['id'],'type':_0x49e230['name'],'sectionId':_0x49e230['id']},{})[_0xa09c('0x27')](function(){return _0x339e69;});}else{return _0x339e69;}})[_0xa09c('0x46')](function(_0x2260ff){logger['error'](_0xa09c('0x52'),_0x2260ff);throw _0x2260ff;});}return _0x339e69;})[_0xa09c('0x27')](respondWithResult(_0x3ba349,0xc9))[_0xa09c('0x46')](handleError(_0x3ba349,null));};exports[_0xa09c('0x53')]=function(_0x2b4c7e,_0x454c25){if(_0x2b4c7e[_0xa09c('0x4b')]['id']){delete _0x2b4c7e[_0xa09c('0x4b')]['id'];}return db[_0xa09c('0x44')][_0xa09c('0x49')]({'where':{'id':_0x2b4c7e[_0xa09c('0x47')]['id']}})[_0xa09c('0x27')](handleEntityNotFound(_0x454c25,null))['then'](saveUpdates(_0x2b4c7e[_0xa09c('0x4b')],null))['then'](respondWithResult(_0x454c25,null))['catch'](handleError(_0x454c25,null));};exports[_0xa09c('0x28')]=function(_0x1114fc,_0x22a3d6){return db['Pause']['find']({'where':{'id':_0x1114fc['params']['id']}})[_0xa09c('0x27')](handleEntityNotFound(_0x22a3d6,null))[_0xa09c('0x27')](removeEntity(_0x22a3d6,null))[_0xa09c('0x46')](handleError(_0x22a3d6,null));};
\ No newline at end of file
+var _0x1944=['key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','keys','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','get','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','ejs','fs-extra','lodash','crypto','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','offset','undefined','limit','count','status','set','json','apply','save','then','destroy','Pauses','UserProfileResource','end','error','stack','name','send','index','map','Pause','rawAttributes'];(function(_0x2bab3f,_0x4ac846){var _0x5b2837=function(_0x41d799){while(--_0x41d799){_0x2bab3f['push'](_0x2bab3f['shift']());}};_0x5b2837(++_0x4ac846);}(_0x1944,0x171));var _0x4194=function(_0x5d5b8f,_0x31cbe2){_0x5d5b8f=_0x5d5b8f-0x0;var _0x3b2c6f=_0x1944[_0x5d5b8f];return _0x3b2c6f;};'use strict';var emlformat=require(_0x4194('0x0'));var rimraf=require(_0x4194('0x1'));var zipdir=require(_0x4194('0x2'));var jsonpatch=require(_0x4194('0x3'));var rp=require(_0x4194('0x4'));var moment=require(_0x4194('0x5'));var BPromise=require(_0x4194('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0x4194('0x7'));var sox=require(_0x4194('0x8'));var csv=require('to-csv');var ejs=require(_0x4194('0x9'));var fs=require('fs');var fs_extra=require(_0x4194('0xa'));var _=require(_0x4194('0xb'));var squel=require('squel');var crypto=require(_0x4194('0xc'));var jsforce=require('jsforce');var deskjs=require('desk.js');var toCsv=require(_0x4194('0xd'));var querystring=require('querystring');var Papa=require(_0x4194('0xe'));var Redis=require(_0x4194('0xf'));var authService=require(_0x4194('0x10'));var qs=require(_0x4194('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4194('0x12'));var logger=require('../../config/logger')(_0x4194('0x13'));var utils=require('../../config/utils');var config=require(_0x4194('0x14'));var licenseUtil=require(_0x4194('0x15'));var db=require(_0x4194('0x16'))['db'];function respondWithStatusCode(_0x44f61a,_0x1b9d8d){_0x1b9d8d=_0x1b9d8d||0xcc;return function(_0x3ae853){if(_0x3ae853){return _0x44f61a[_0x4194('0x17')](_0x1b9d8d);}return _0x44f61a['status'](_0x1b9d8d)['end']();};}function respondWithResult(_0x31d432,_0x35d5bc){_0x35d5bc=_0x35d5bc||0xc8;return function(_0x381438){if(_0x381438){return _0x31d432['status'](_0x35d5bc)['json'](_0x381438);}};}function respondWithFilteredResult(_0x5bb6f3,_0xd57c05){return function(_0x302d3b){if(_0x302d3b){var _0x134902=typeof _0xd57c05[_0x4194('0x18')]===_0x4194('0x19')&&typeof _0xd57c05[_0x4194('0x1a')]==='undefined';var _0x11ab55=_0x302d3b[_0x4194('0x1b')];var _0x1eb94e=_0x134902?0x0:_0xd57c05[_0x4194('0x18')];var _0x10e7ce=_0x134902?_0x302d3b[_0x4194('0x1b')]:_0xd57c05[_0x4194('0x18')]+_0xd57c05[_0x4194('0x1a')];var _0x1963ba;if(_0x10e7ce>=_0x11ab55){_0x10e7ce=_0x11ab55;_0x1963ba=0xc8;}else{_0x1963ba=0xce;}_0x5bb6f3[_0x4194('0x1c')](_0x1963ba);return _0x5bb6f3[_0x4194('0x1d')]('Content-Range',_0x1eb94e+'-'+_0x10e7ce+'/'+_0x11ab55)[_0x4194('0x1e')](_0x302d3b);}return null;};}function patchUpdates(_0x5c5092){return function(_0x4dc92a){try{jsonpatch[_0x4194('0x1f')](_0x4dc92a,_0x5c5092,!![]);}catch(_0x50f121){return BPromise['reject'](_0x50f121);}return _0x4dc92a[_0x4194('0x20')]();};}function saveUpdates(_0x4565d5,_0x87113b){return function(_0x168a89){if(_0x168a89){return _0x168a89['update'](_0x4565d5)[_0x4194('0x21')](function(_0x1fe27c){return _0x1fe27c;});}return null;};}function removeEntity(_0x3dd3c9,_0xb7378e){return function(_0x584e59){if(_0x584e59){return _0x584e59[_0x4194('0x22')]()[_0x4194('0x21')](function(){var _0x3e136e=_0x584e59['get']({'plain':!![]});var _0x10b1b0=_0x4194('0x23');return db[_0x4194('0x24')][_0x4194('0x22')]({'where':{'type':_0x10b1b0,'resourceId':_0x3e136e['id']}})[_0x4194('0x21')](function(){return _0x584e59;});})[_0x4194('0x21')](function(){_0x3dd3c9[_0x4194('0x1c')](0xcc)[_0x4194('0x25')]();});}};}function handleEntityNotFound(_0x2d4082,_0x429d75){return function(_0x141a2c){if(!_0x141a2c){_0x2d4082[_0x4194('0x17')](0x194);}return _0x141a2c;};}function handleError(_0xc3290f,_0x219f89){_0x219f89=_0x219f89||0x1f4;return function(_0x404b0f){logger[_0x4194('0x26')](_0x404b0f[_0x4194('0x27')]);if(_0x404b0f[_0x4194('0x28')]){delete _0x404b0f[_0x4194('0x28')];}_0xc3290f[_0x4194('0x1c')](_0x219f89)[_0x4194('0x29')](_0x404b0f);};}exports[_0x4194('0x2a')]=function(_0x2bc18d,_0x537d7d){var _0x4b009c={},_0x476061={},_0x16af41={'count':0x0,'rows':[]};var _0x6249a1=_[_0x4194('0x2b')](db[_0x4194('0x2c')][_0x4194('0x2d')],function(_0x2d3951){return{'name':_0x2d3951['fieldName'],'type':_0x2d3951['type'][_0x4194('0x2e')]};});_0x476061[_0x4194('0x2f')]=_[_0x4194('0x2b')](_0x6249a1,'name');_0x476061[_0x4194('0x30')]=_['keys'](_0x2bc18d[_0x4194('0x30')]);_0x476061[_0x4194('0x31')]=_[_0x4194('0x32')](_0x476061['model'],_0x476061[_0x4194('0x30')]);_0x4b009c['attributes']=_['intersection'](_0x476061[_0x4194('0x2f')],qs[_0x4194('0x33')](_0x2bc18d[_0x4194('0x30')][_0x4194('0x33')]));_0x4b009c[_0x4194('0x34')]=_0x4b009c['attributes'][_0x4194('0x35')]?_0x4b009c[_0x4194('0x34')]:_0x476061[_0x4194('0x2f')];if(!_0x2bc18d[_0x4194('0x30')][_0x4194('0x36')]('nolimit')){_0x4b009c[_0x4194('0x1a')]=qs['limit'](_0x2bc18d[_0x4194('0x30')][_0x4194('0x1a')]);_0x4b009c[_0x4194('0x18')]=qs[_0x4194('0x18')](_0x2bc18d[_0x4194('0x30')]['offset']);}_0x4b009c[_0x4194('0x37')]=qs[_0x4194('0x38')](_0x2bc18d['query']['sort']);_0x4b009c[_0x4194('0x39')]=qs[_0x4194('0x31')](_[_0x4194('0x3a')](_0x2bc18d[_0x4194('0x30')],_0x476061['filters']),_0x6249a1);if(_0x2bc18d[_0x4194('0x30')][_0x4194('0x3b')]){_0x4b009c['where']=_[_0x4194('0x3c')](_0x4b009c['where'],{'$or':_[_0x4194('0x2b')](_0x6249a1,function(_0x5af776){if(_0x5af776['type']!==_0x4194('0x3d')){var _0x36f524={};_0x36f524[_0x5af776[_0x4194('0x28')]]={'$like':'%'+_0x2bc18d[_0x4194('0x30')][_0x4194('0x3b')]+'%'};return _0x36f524;}})});}_0x4b009c=_['merge']({},_0x4b009c,_0x2bc18d[_0x4194('0x3e')]);var _0x24fbee={'where':_0x4b009c[_0x4194('0x39')]};return db[_0x4194('0x2c')][_0x4194('0x1b')](_0x24fbee)[_0x4194('0x21')](function(_0x4557e0){_0x16af41[_0x4194('0x1b')]=_0x4557e0;if(_0x2bc18d[_0x4194('0x30')][_0x4194('0x3f')]){_0x4b009c[_0x4194('0x40')]=[{'all':!![]}];}return db[_0x4194('0x2c')][_0x4194('0x41')](_0x4b009c);})[_0x4194('0x21')](function(_0x384030){_0x16af41[_0x4194('0x42')]=_0x384030;return _0x16af41;})[_0x4194('0x21')](respondWithFilteredResult(_0x537d7d,_0x4b009c))[_0x4194('0x43')](handleError(_0x537d7d,null));};exports[_0x4194('0x44')]=function(_0x18ee7a,_0xc30053){var _0xe42865={'raw':!![],'where':{'id':_0x18ee7a[_0x4194('0x45')]['id']}},_0x3e4a6f={};_0x3e4a6f['model']=_['keys'](db['Pause'][_0x4194('0x2d')]);_0x3e4a6f[_0x4194('0x30')]=_[_0x4194('0x46')](_0x18ee7a[_0x4194('0x30')]);_0x3e4a6f[_0x4194('0x31')]=_[_0x4194('0x32')](_0x3e4a6f[_0x4194('0x2f')],_0x3e4a6f['query']);_0xe42865['attributes']=_[_0x4194('0x32')](_0x3e4a6f[_0x4194('0x2f')],qs['fields'](_0x18ee7a['query'][_0x4194('0x33')]));_0xe42865[_0x4194('0x34')]=_0xe42865[_0x4194('0x34')][_0x4194('0x35')]?_0xe42865[_0x4194('0x34')]:_0x3e4a6f['model'];if(_0x18ee7a[_0x4194('0x30')]['includeAll']){_0xe42865[_0x4194('0x40')]=[{'all':!![]}];}_0xe42865=_[_0x4194('0x3c')]({},_0xe42865,_0x18ee7a[_0x4194('0x3e')]);return db[_0x4194('0x2c')][_0x4194('0x47')](_0xe42865)[_0x4194('0x21')](handleEntityNotFound(_0xc30053,null))[_0x4194('0x21')](respondWithResult(_0xc30053,null))['catch'](handleError(_0xc30053,null));};exports[_0x4194('0x48')]=function(_0x140e96,_0x174e52){return db[_0x4194('0x2c')][_0x4194('0x48')](_0x140e96[_0x4194('0x49')],{})[_0x4194('0x21')](function(_0x5a4459){var _0x56424e=_0x140e96[_0x4194('0x4a')]['get']({'plain':!![]});if(!_0x56424e)throw new Error(_0x4194('0x4b'));if(_0x56424e[_0x4194('0x4c')]==='user'){var _0x25d528=_0x5a4459[_0x4194('0x4d')]({'plain':!![]});var _0x1ba313=_0x4194('0x23');return db[_0x4194('0x4e')][_0x4194('0x47')]({'where':{'name':_0x1ba313,'userProfileId':_0x56424e[_0x4194('0x4f')]},'raw':!![]})[_0x4194('0x21')](function(_0x1ee8d0){if(_0x1ee8d0&&_0x1ee8d0[_0x4194('0x50')]===0x0){return db['UserProfileResource']['create']({'name':_0x25d528[_0x4194('0x28')],'resourceId':_0x25d528['id'],'type':_0x1ee8d0[_0x4194('0x28')],'sectionId':_0x1ee8d0['id']},{})[_0x4194('0x21')](function(){return _0x5a4459;});}else{return _0x5a4459;}})[_0x4194('0x43')](function(_0x372e6a){logger['error'](_0x4194('0x51'),_0x372e6a);throw _0x372e6a;});}return _0x5a4459;})[_0x4194('0x21')](respondWithResult(_0x174e52,0xc9))[_0x4194('0x43')](handleError(_0x174e52,null));};exports[_0x4194('0x52')]=function(_0x563869,_0x531fbc){if(_0x563869[_0x4194('0x49')]['id']){delete _0x563869[_0x4194('0x49')]['id'];}return db[_0x4194('0x2c')][_0x4194('0x47')]({'where':{'id':_0x563869[_0x4194('0x45')]['id']}})['then'](handleEntityNotFound(_0x531fbc,null))[_0x4194('0x21')](saveUpdates(_0x563869[_0x4194('0x49')],null))[_0x4194('0x21')](respondWithResult(_0x531fbc,null))[_0x4194('0x43')](handleError(_0x531fbc,null));};exports['destroy']=function(_0x4a7fa9,_0x153aae){return db[_0x4194('0x2c')][_0x4194('0x47')]({'where':{'id':_0x4a7fa9[_0x4194('0x45')]['id']}})[_0x4194('0x21')](handleEntityNotFound(_0x153aae,null))[_0x4194('0x21')](removeEntity(_0x153aae,null))[_0x4194('0x43')](handleError(_0x153aae,null));};
\ No newline at end of file
index 81b6504..acb1d22 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf494=['../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./pause.attributes','exports','define','lodash','util'];(function(_0x43ca06,_0x1fa6df){var _0x50798f=function(_0xeb818){while(--_0xeb818){_0x43ca06['push'](_0x43ca06['shift']());}};_0x50798f(++_0x1fa6df);}(_0xf494,0x1c6));var _0x4f49=function(_0x1e06f7,_0x516888){_0x1e06f7=_0x1e06f7-0x0;var _0x23010d=_0xf494[_0x1e06f7];return _0x23010d;};'use strict';var _=require(_0x4f49('0x0'));var util=require(_0x4f49('0x1'));var logger=require(_0x4f49('0x2'))('api');var moment=require(_0x4f49('0x3'));var BPromise=require(_0x4f49('0x4'));var rp=require(_0x4f49('0x5'));var fs=require('fs');var path=require(_0x4f49('0x6'));var rimraf=require(_0x4f49('0x7'));var config=require(_0x4f49('0x8'));var attributes=require(_0x4f49('0x9'));module[_0x4f49('0xa')]=function(_0xc5e778,_0x413530){return _0xc5e778[_0x4f49('0xb')]('Pause',attributes,{'tableName':'tools_pauses','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe14b=['bluebird','path','./pause.attributes','exports','define','Pause','tools_pauses','lodash','util','moment'];(function(_0x563cf9,_0x6f7d23){var _0x4d7ed0=function(_0x59b564){while(--_0x59b564){_0x563cf9['push'](_0x563cf9['shift']());}};_0x4d7ed0(++_0x6f7d23);}(_0xe14b,0x93));var _0xbe14=function(_0x13e5d8,_0x144c9b){_0x13e5d8=_0x13e5d8-0x0;var _0x5b464a=_0xe14b[_0x13e5d8];return _0x5b464a;};'use strict';var _=require(_0xbe14('0x0'));var util=require(_0xbe14('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0xbe14('0x2'));var BPromise=require(_0xbe14('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xbe14('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xbe14('0x5'));module[_0xbe14('0x6')]=function(_0x1fe204,_0x1ff100){return _0x1fe204[_0xbe14('0x7')](_0xbe14('0x8'),attributes,{'tableName':_0xbe14('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 8f79533..432f584 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb10b=['catch','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','Pause,\x20%s,\x20%s','Pause,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','ShowPause','Pause','find','options','raw','where','attributes','map','include','model','debug'];(function(_0x5f15a9,_0x56c353){var _0x3f3686=function(_0x330dd2){while(--_0x330dd2){_0x5f15a9['push'](_0x5f15a9['shift']());}};_0x3f3686(++_0x56c353);}(_0xb10b,0x12a));var _0xbb10=function(_0x3a0585,_0x12062b){_0x3a0585=_0x3a0585-0x0;var _0xbdc3fc=_0xb10b[_0x3a0585];return _0xbdc3fc;};'use strict';var _=require(_0xbb10('0x0'));var util=require('util');var moment=require(_0xbb10('0x1'));var BPromise=require(_0xbb10('0x2'));var rs=require(_0xbb10('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbb10('0x4'))['db'];var utils=require(_0xbb10('0x5'));var logger=require(_0xbb10('0x6'))(_0xbb10('0x7'));var config=require(_0xbb10('0x8'));var jayson=require(_0xbb10('0x9'));var client=jayson['client'][_0xbb10('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3cdd53,_0x513741,_0x1b9e94){return new BPromise(function(_0x3fb675,_0x21370f){return client[_0xbb10('0xb')](_0x3cdd53,_0x1b9e94)[_0xbb10('0xc')](function(_0x1ce33e){logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,'request\x20sent');logger['debug'](_0xbb10('0xf'),_0x513741,_0xbb10('0x10'),JSON[_0xbb10('0x11')](_0x1ce33e));if(_0x1ce33e['error']){if(_0x1ce33e[_0xbb10('0x12')]['code']===0x1f4){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x21370f(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}logger['error'](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x3fb675(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}else{logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,_0xbb10('0x10'));_0x3fb675(_0x1ce33e[_0xbb10('0x14')][_0xbb10('0x13')]);}})['catch'](function(_0x2eca0f){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x2eca0f);_0x21370f(_0x2eca0f);});});}exports[_0xbb10('0x15')]=function(_0x378da8){var _0x1682a4=this;return new Promise(function(_0x575cca,_0x30efc6){return db[_0xbb10('0x16')][_0xbb10('0x17')]({'raw':_0x378da8['options']?_0x378da8[_0xbb10('0x18')][_0xbb10('0x19')]===undefined?!![]:![]:!![],'where':_0x378da8[_0xbb10('0x18')]?_0x378da8[_0xbb10('0x18')][_0xbb10('0x1a')]||null:null,'attributes':_0x378da8[_0xbb10('0x18')]?_0x378da8['options'][_0xbb10('0x1b')]||null:null,'include':_0x378da8[_0xbb10('0x18')]?_0x378da8['options']['include']?_[_0xbb10('0x1c')](_0x378da8[_0xbb10('0x18')][_0xbb10('0x1d')],function(_0x317da4){return{'model':db[_0x317da4[_0xbb10('0x1e')]],'as':_0x317da4['as'],'attributes':_0x317da4[_0xbb10('0x1b')],'include':_0x317da4[_0xbb10('0x1d')]?_[_0xbb10('0x1c')](_0x317da4[_0xbb10('0x1d')],function(_0x395404){return{'model':db[_0x395404[_0xbb10('0x1e')]],'as':_0x395404['as'],'attributes':_0x395404[_0xbb10('0x1b')],'include':_0x395404['include']?_['map'](_0x395404['include'],function(_0xc93a04){return{'model':db[_0xc93a04[_0xbb10('0x1e')]],'as':_0xc93a04['as'],'attributes':_0xc93a04[_0xbb10('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2fdde9){logger[_0xbb10('0xd')](_0xbb10('0x15'),_0x378da8);logger[_0xbb10('0x1f')](_0xbb10('0x15'),_0x378da8,JSON[_0xbb10('0x11')](_0x2fdde9));_0x575cca(_0x2fdde9);})[_0xbb10('0x20')](function(_0x4aabb9){logger[_0xbb10('0x12')](_0xbb10('0x15'),_0x4aabb9[_0xbb10('0x13')],_0x378da8);_0x30efc6(_0x1682a4[_0xbb10('0x12')](0x1f4,_0x4aabb9[_0xbb10('0x13')]));});});};
\ No newline at end of file
+var _0xb10b=['catch','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','Pause,\x20%s,\x20%s','Pause,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','result','ShowPause','Pause','find','options','raw','where','attributes','map','include','model','debug'];(function(_0x2e781e,_0x1b5395){var _0x3071b3=function(_0x2b9440){while(--_0x2b9440){_0x2e781e['push'](_0x2e781e['shift']());}};_0x3071b3(++_0x1b5395);}(_0xb10b,0x12a));var _0xbb10=function(_0xd63b06,_0x34850f){_0xd63b06=_0xd63b06-0x0;var _0x343035=_0xb10b[_0xd63b06];return _0x343035;};'use strict';var _=require(_0xbb10('0x0'));var util=require('util');var moment=require(_0xbb10('0x1'));var BPromise=require(_0xbb10('0x2'));var rs=require(_0xbb10('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbb10('0x4'))['db'];var utils=require(_0xbb10('0x5'));var logger=require(_0xbb10('0x6'))(_0xbb10('0x7'));var config=require(_0xbb10('0x8'));var jayson=require(_0xbb10('0x9'));var client=jayson['client'][_0xbb10('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3cdd53,_0x513741,_0x1b9e94){return new BPromise(function(_0x3fb675,_0x21370f){return client[_0xbb10('0xb')](_0x3cdd53,_0x1b9e94)[_0xbb10('0xc')](function(_0x1ce33e){logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,'request\x20sent');logger['debug'](_0xbb10('0xf'),_0x513741,_0xbb10('0x10'),JSON[_0xbb10('0x11')](_0x1ce33e));if(_0x1ce33e['error']){if(_0x1ce33e[_0xbb10('0x12')]['code']===0x1f4){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x21370f(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}logger['error'](_0xbb10('0xe'),_0x513741,_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);return _0x3fb675(_0x1ce33e[_0xbb10('0x12')][_0xbb10('0x13')]);}else{logger[_0xbb10('0xd')](_0xbb10('0xe'),_0x513741,_0xbb10('0x10'));_0x3fb675(_0x1ce33e[_0xbb10('0x14')][_0xbb10('0x13')]);}})['catch'](function(_0x2eca0f){logger[_0xbb10('0x12')](_0xbb10('0xe'),_0x513741,_0x2eca0f);_0x21370f(_0x2eca0f);});});}exports[_0xbb10('0x15')]=function(_0x378da8){var _0x1682a4=this;return new Promise(function(_0x575cca,_0x30efc6){return db[_0xbb10('0x16')][_0xbb10('0x17')]({'raw':_0x378da8['options']?_0x378da8[_0xbb10('0x18')][_0xbb10('0x19')]===undefined?!![]:![]:!![],'where':_0x378da8[_0xbb10('0x18')]?_0x378da8[_0xbb10('0x18')][_0xbb10('0x1a')]||null:null,'attributes':_0x378da8[_0xbb10('0x18')]?_0x378da8['options'][_0xbb10('0x1b')]||null:null,'include':_0x378da8[_0xbb10('0x18')]?_0x378da8['options']['include']?_[_0xbb10('0x1c')](_0x378da8[_0xbb10('0x18')][_0xbb10('0x1d')],function(_0x317da4){return{'model':db[_0x317da4[_0xbb10('0x1e')]],'as':_0x317da4['as'],'attributes':_0x317da4[_0xbb10('0x1b')],'include':_0x317da4[_0xbb10('0x1d')]?_[_0xbb10('0x1c')](_0x317da4[_0xbb10('0x1d')],function(_0x395404){return{'model':db[_0x395404[_0xbb10('0x1e')]],'as':_0x395404['as'],'attributes':_0x395404[_0xbb10('0x1b')],'include':_0x395404['include']?_['map'](_0x395404['include'],function(_0xc93a04){return{'model':db[_0xc93a04[_0xbb10('0x1e')]],'as':_0xc93a04['as'],'attributes':_0xc93a04[_0xbb10('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x2fdde9){logger[_0xbb10('0xd')](_0xbb10('0x15'),_0x378da8);logger[_0xbb10('0x1f')](_0xbb10('0x15'),_0x378da8,JSON[_0xbb10('0x11')](_0x2fdde9));_0x575cca(_0x2fdde9);})[_0xbb10('0x20')](function(_0x4aabb9){logger[_0xbb10('0x12')](_0xbb10('0x15'),_0x4aabb9[_0xbb10('0x13')],_0x378da8);_0x30efc6(_0x1682a4[_0xbb10('0x12')](0x1f4,_0x4aabb9[_0xbb10('0x13')]));});});};
\ No newline at end of file
index dd4e234..e4c2756 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xac9d=['put','update','delete','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/webhook','webhookGet','/:id','show','/:id/download','download','diskStorage','root','server/files/plugins','originalname','replace','format','%s-%s%s','extname','post','single','file','upload'];(function(_0x3877c1,_0x238c29){var _0x59056a=function(_0x3567cd){while(--_0x3567cd){_0x3877c1['push'](_0x3877c1['shift']());}};_0x59056a(++_0x238c29);}(_0xac9d,0x14d));var _0xdac9=function(_0x55d893,_0x325ebe){_0x55d893=_0x55d893-0x0;var _0x52d152=_0xac9d[_0x55d893];return _0x52d152;};'use strict';var multer=require(_0xdac9('0x0'));var util=require(_0xdac9('0x1'));var path=require(_0xdac9('0x2'));var timeout=require(_0xdac9('0x3'));var express=require(_0xdac9('0x4'));var router=express[_0xdac9('0x5')]();var fs_extra=require(_0xdac9('0x6'));var auth=require(_0xdac9('0x7'));var interaction=require('../../components/interaction/service');var config=require(_0xdac9('0x8'));var controller=require('./plugin.controller');router[_0xdac9('0x9')]('/',auth[_0xdac9('0xa')](),controller[_0xdac9('0xb')]);router[_0xdac9('0x9')](_0xdac9('0xc'),controller[_0xdac9('0xd')]);router['get'](_0xdac9('0xe'),auth['isAuthenticated'](),controller[_0xdac9('0xf')]);router[_0xdac9('0x9')](_0xdac9('0x10'),auth[_0xdac9('0xa')](),controller[_0xdac9('0x11')]);var upload=multer({'storage':multer[_0xdac9('0x12')]({'destination':function(_0x255627,_0x1b604a,_0xbb5615){_0xbb5615(null,path['join'](config[_0xdac9('0x13')],_0xdac9('0x14')));},'filename':function(_0x5a9bde,_0x3d8e97,_0xeddbc1){_0x3d8e97[_0xdac9('0x15')]=_0x3d8e97['originalname'][_0xdac9('0x16')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0xeddbc1(null,util[_0xdac9('0x17')](_0xdac9('0x18'),path['basename'](_0x3d8e97['originalname'],path[_0xdac9('0x19')](_0x3d8e97[_0xdac9('0x15')])),Date['now'](),path[_0xdac9('0x19')](_0x3d8e97[_0xdac9('0x15')])));}})});router[_0xdac9('0x1a')]('/',upload[_0xdac9('0x1b')](_0xdac9('0x1c')),controller[_0xdac9('0x1d')]);router[_0xdac9('0x1a')](_0xdac9('0xc'),controller['webhookPost']);router[_0xdac9('0x1e')](_0xdac9('0xe'),auth['isAuthenticated'](),controller[_0xdac9('0x1f')]);router[_0xdac9('0x20')](_0xdac9('0xe'),auth[_0xdac9('0xa')](),controller['delete']);module['exports']=router;
\ No newline at end of file
+var _0x4b19=['path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','./plugin.controller','get','index','webhookGet','/:id','show','isAuthenticated','download','diskStorage','root','server/files/plugins','originalname','replace','basename','post','single','file','/webhook','webhookPost','put','update','delete','multer'];(function(_0x1f239e,_0x367b43){var _0x826971=function(_0x2c5777){while(--_0x2c5777){_0x1f239e['push'](_0x1f239e['shift']());}};_0x826971(++_0x367b43);}(_0x4b19,0x195));var _0x94b1=function(_0x23cb78,_0x24dbe6){_0x23cb78=_0x23cb78-0x0;var _0x14aed3=_0x4b19[_0x23cb78];return _0x14aed3;};'use strict';var multer=require(_0x94b1('0x0'));var util=require('util');var path=require(_0x94b1('0x1'));var timeout=require(_0x94b1('0x2'));var express=require(_0x94b1('0x3'));var router=express['Router']();var fs_extra=require(_0x94b1('0x4'));var auth=require(_0x94b1('0x5'));var interaction=require(_0x94b1('0x6'));var config=require('../../config/environment');var controller=require(_0x94b1('0x7'));router[_0x94b1('0x8')]('/',auth['isAuthenticated'](),controller[_0x94b1('0x9')]);router[_0x94b1('0x8')]('/webhook',controller[_0x94b1('0xa')]);router[_0x94b1('0x8')](_0x94b1('0xb'),auth['isAuthenticated'](),controller[_0x94b1('0xc')]);router['get']('/:id/download',auth[_0x94b1('0xd')](),controller[_0x94b1('0xe')]);var upload=multer({'storage':multer[_0x94b1('0xf')]({'destination':function(_0x8ddf47,_0x162995,_0x3aeb91){_0x3aeb91(null,path['join'](config[_0x94b1('0x10')],_0x94b1('0x11')));},'filename':function(_0x340a29,_0x2b378c,_0x5cbf96){_0x2b378c['originalname']=_0x2b378c[_0x94b1('0x12')][_0x94b1('0x13')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x5cbf96(null,util['format']('%s-%s%s',path[_0x94b1('0x14')](_0x2b378c[_0x94b1('0x12')],path['extname'](_0x2b378c[_0x94b1('0x12')])),Date['now'](),path['extname'](_0x2b378c[_0x94b1('0x12')])));}})});router[_0x94b1('0x15')]('/',upload[_0x94b1('0x16')](_0x94b1('0x17')),controller['upload']);router[_0x94b1('0x15')](_0x94b1('0x18'),controller[_0x94b1('0x19')]);router[_0x94b1('0x1a')](_0x94b1('0xb'),auth[_0x94b1('0xd')](),controller[_0x94b1('0x1b')]);router['delete'](_0x94b1('0xb'),auth[_0x94b1('0xd')](),controller[_0x94b1('0x1c')]);module['exports']=router;
\ No newline at end of file
index ec55145..5e9bf0b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x04e9=['always','sequelize','html','script','TEXT','STRING','The\x20physical\x20path\x20where\x20the\x20plugin\x20is\x20stored.','Indicates\x20whether\x20the\x20plugin\x20is\x20installed.\x20Updated\x20when\x20the\x20plugin\x20is\x20installed/uninstalled.','ENUM','adminOnly'];(function(_0x3efc2b,_0x30e89e){var _0x143578=function(_0x506c2d){while(--_0x506c2d){_0x3efc2b['push'](_0x3efc2b['shift']());}};_0x143578(++_0x30e89e);}(_0x04e9,0xe7));var _0x904e=function(_0x2cf53d,_0x37dc0d){_0x2cf53d=_0x2cf53d-0x0;var _0x5cd359=_0x04e9[_0x2cf53d];return _0x5cd359;};'use strict';var Sequelize=require(_0x904e('0x0'));module['exports']={'name':{'type':Sequelize['STRING']},'type':{'type':Sequelize['ENUM'](_0x904e('0x1'),_0x904e('0x2'))},'description':{'type':Sequelize[_0x904e('0x3')]},'version':{'type':Sequelize[_0x904e('0x3')]},'path':{'type':Sequelize[_0x904e('0x4')],'comment':_0x904e('0x5')},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':_0x904e('0x6')},'sidebar':{'type':Sequelize[_0x904e('0x7')](_0x904e('0x8'),'agentOnly',_0x904e('0x9'),'never'),'defaultValue':'always','comment':'Indicates\x20whether\x20to\x20display\x20the\x20plugin\x20in\x20the\x20sidebar.'},'icon':{'type':Sequelize['STRING']},'adminUrl':{'type':Sequelize[_0x904e('0x4')]},'agentUrl':{'type':Sequelize[_0x904e('0x4')]},'scriptName':{'type':Sequelize[_0x904e('0x4')]},'scriptPath':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x25e4=['agentOnly','always','never','Indicates\x20whether\x20to\x20display\x20the\x20plugin\x20in\x20the\x20sidebar.','sequelize','STRING','ENUM','html','script','TEXT'];(function(_0x15ea60,_0x3fc946){var _0x5a7d49=function(_0x4ade00){while(--_0x4ade00){_0x15ea60['push'](_0x15ea60['shift']());}};_0x5a7d49(++_0x3fc946);}(_0x25e4,0x112));var _0x425e=function(_0x1cde7d,_0x249890){_0x1cde7d=_0x1cde7d-0x0;var _0x1f8edc=_0x25e4[_0x1cde7d];return _0x1f8edc;};'use strict';var Sequelize=require(_0x425e('0x0'));module['exports']={'name':{'type':Sequelize[_0x425e('0x1')]},'type':{'type':Sequelize[_0x425e('0x2')](_0x425e('0x3'),_0x425e('0x4'))},'description':{'type':Sequelize[_0x425e('0x5')]},'version':{'type':Sequelize[_0x425e('0x5')]},'path':{'type':Sequelize[_0x425e('0x1')],'comment':'The\x20physical\x20path\x20where\x20the\x20plugin\x20is\x20stored.'},'active':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':'Indicates\x20whether\x20the\x20plugin\x20is\x20installed.\x20Updated\x20when\x20the\x20plugin\x20is\x20installed/uninstalled.'},'sidebar':{'type':Sequelize[_0x425e('0x2')]('adminOnly',_0x425e('0x6'),_0x425e('0x7'),_0x425e('0x8')),'defaultValue':'always','comment':_0x425e('0x9')},'icon':{'type':Sequelize[_0x425e('0x1')]},'adminUrl':{'type':Sequelize[_0x425e('0x1')]},'agentUrl':{'type':Sequelize['STRING']},'scriptName':{'type':Sequelize['STRING']},'scriptPath':{'type':Sequelize[_0x425e('0x1')]}};
\ No newline at end of file
index 1616e9f..2651cdd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8729=['desk.js','querystring','papaparse','extract-zip','archiver','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','./plugin.socket','register','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','then','destroy','UserProfileResource','error','name','send','index','map','Plugin','fieldName','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','type','options','includeAll','include','findAll','rows','show','params','rawAttributes','find','catch','join','format','%s.zip','basename','zip','warning','code','Sequelize','Error','Error\x20while\x20generating\x20the\x20zip\x20archive','**/*','root','server/files/plugins','dirname','node_modules/**/*','attachments/**/*','finalize','existsSync','Plugin\x20not\x20found','download','Error\x20while\x20downloading\x20the\x20plugin','info','Download\x20completed','Temporary\x20file\x20removed','upload','file','extname','filename','Plugin\x20upload\x20filepath:\x20%s','Plugin\x20upload\x20destination:\x20%s','chmodSync','readdirSync','Invalid\x20plugin\x20structure','lstatSync','isFile','some','manifest.json','Plugin\x20manifest\x20missing','readFileSync','Invalid\x20manifest:\x20type\x20missing','version','Invalid\x20manifest:\x20version\x20not\x20specified','parameters','Invalid\x20manifest:\x20parameters\x20missing','html','views','Invalid\x20manifest:\x20views\x20missing','admin','agent','Invalid\x20manifest:\x20no\x20view\x20specified','script','Invalid\x20manifest:\x20script\x20name\x20missing','scriptPath','Invalid\x20manifest:\x20script\x20path\x20missing','Invalid\x20manifest:\x20invalid\x20type','description','sidebar','always','icon','icon-apps','test','plugins','Warning:\x20admin\x20view\x20not\x20specified','Warning:\x20agent\x20view\x20not\x20specified','create','body','role','userProfileId','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','Zip\x20archive\x20removed','Extracted\x20folder\x20removed','update','delete','webhookGet','\x27PATH\x27\x20parameter\x20not\x20specified','port','\x27PORT\x27\x20parameter\x20not\x20specified','hostname','http://localhost:','encoding','method','headers','content-length','content-type','set','endsWith','statusCode','webhookPost','eml-format','rimraf','fast-json-patch','request-promise','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce'];(function(_0x2bc3f4,_0x470b26){var _0x14ac53=function(_0x5121bd){while(--_0x5121bd){_0x2bc3f4['push'](_0x2bc3f4['shift']());}};_0x14ac53(++_0x470b26);}(_0x8729,0x9f));var _0x9872=function(_0x3ce002,_0x59b88f){_0x3ce002=_0x3ce002-0x0;var _0x2fe98d=_0x8729[_0x3ce002];return _0x2fe98d;};'use strict';var emlformat=require(_0x9872('0x0'));var rimraf=require(_0x9872('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x9872('0x2'));var rp=require(_0x9872('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x9872('0x4'));var util=require(_0x9872('0x5'));var path=require(_0x9872('0x6'));var sox=require(_0x9872('0x7'));var csv=require(_0x9872('0x8'));var ejs=require(_0x9872('0x9'));var fs=require('fs');var fs_extra=require(_0x9872('0xa'));var _=require(_0x9872('0xb'));var squel=require(_0x9872('0xc'));var crypto=require(_0x9872('0xd'));var jsforce=require(_0x9872('0xe'));var deskjs=require(_0x9872('0xf'));var toCsv=require('to-csv');var querystring=require(_0x9872('0x10'));var Papa=require(_0x9872('0x11'));var extract=require(_0x9872('0x12'));var rimraf=require(_0x9872('0x1'));var archiver=require(_0x9872('0x13'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x9872('0x14'));var as=require(_0x9872('0x15'));var hardwareService=require(_0x9872('0x16'));var logger=require(_0x9872('0x17'))(_0x9872('0x18'));var utils=require(_0x9872('0x19'));var config=require(_0x9872('0x1a'));var licenseUtil=require(_0x9872('0x1b'));var db=require(_0x9872('0x1c'))['db'];config[_0x9872('0x1d')]=_[_0x9872('0x1e')](config[_0x9872('0x1d')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x9872('0x1d')]));require(_0x9872('0x1f'))[_0x9872('0x20')](socket);function respondWithStatusCode(_0x236006,_0xfe63f5){_0xfe63f5=_0xfe63f5||0xcc;return function(_0x504fa2){if(_0x504fa2){return _0x236006[_0x9872('0x21')](_0xfe63f5);}return _0x236006[_0x9872('0x22')](_0xfe63f5)[_0x9872('0x23')]();};}function respondWithResult(_0x366b09,_0x41b090){_0x41b090=_0x41b090||0xc8;return function(_0xfbcff9){if(_0xfbcff9){return _0x366b09[_0x9872('0x22')](_0x41b090)[_0x9872('0x24')](_0xfbcff9);}};}function respondWithFilteredResult(_0x33b56e,_0x50fded){return function(_0x5026c3){if(_0x5026c3){var _0x2e4804=typeof _0x50fded[_0x9872('0x25')]===_0x9872('0x26')&&typeof _0x50fded[_0x9872('0x27')]===_0x9872('0x26');var _0x70128d=_0x5026c3['count'];var _0x509abc=_0x2e4804?0x0:_0x50fded[_0x9872('0x25')];var _0x5829c8=_0x2e4804?_0x5026c3[_0x9872('0x28')]:_0x50fded[_0x9872('0x25')]+_0x50fded[_0x9872('0x27')];var _0x2bb673;if(_0x5829c8>=_0x70128d){_0x5829c8=_0x70128d;_0x2bb673=0xc8;}else{_0x2bb673=0xce;}_0x33b56e[_0x9872('0x22')](_0x2bb673);return _0x33b56e['set'](_0x9872('0x29'),_0x509abc+'-'+_0x5829c8+'/'+_0x70128d)[_0x9872('0x24')](_0x5026c3);}return null;};}function patchUpdates(_0x48a232){return function(_0x485871){try{jsonpatch[_0x9872('0x2a')](_0x485871,_0x48a232,!![]);}catch(_0x5249f7){return BPromise[_0x9872('0x2b')](_0x5249f7);}return _0x485871[_0x9872('0x2c')]();};}function saveUpdates(_0x57e2b1,_0x30b44d){return function(_0x26c200){if(_0x26c200){return _0x26c200['update'](_0x57e2b1)[_0x9872('0x2d')](function(_0x4eb748){return _0x4eb748;});}return null;};}function removeEntity(_0x255518,_0x512035){return function(_0x4ccaf9){if(_0x4ccaf9){return _0x4ccaf9[_0x9872('0x2e')]()[_0x9872('0x2d')](function(){var _0x46e6d7=_0x4ccaf9['get']({'plain':!![]});var _0x236d5b='Plugins';return db[_0x9872('0x2f')][_0x9872('0x2e')]({'where':{'type':_0x236d5b,'resourceId':_0x46e6d7['id']}})[_0x9872('0x2d')](function(){return _0x4ccaf9;});})[_0x9872('0x2d')](function(){_0x255518[_0x9872('0x22')](0xcc)[_0x9872('0x23')]();});}};}function handleEntityNotFound(_0x8f7946,_0x477345){return function(_0x5bd61e){if(!_0x5bd61e){_0x8f7946[_0x9872('0x21')](0x194);}return _0x5bd61e;};}function handleError(_0x159126,_0x5543a8){_0x5543a8=_0x5543a8||0x1f4;return function(_0x140385){logger[_0x9872('0x30')](_0x140385['stack']);if(_0x140385[_0x9872('0x31')]){delete _0x140385[_0x9872('0x31')];}_0x159126[_0x9872('0x22')](_0x5543a8)[_0x9872('0x32')](_0x140385);};}exports[_0x9872('0x33')]=function(_0x204d4f,_0x1b51fc){var _0x274d24={},_0x267b4c={},_0x463725={'count':0x0,'rows':[]};var _0x34c14f=_[_0x9872('0x34')](db[_0x9872('0x35')]['rawAttributes'],function(_0x59d7a8){return{'name':_0x59d7a8[_0x9872('0x36')],'type':_0x59d7a8['type'][_0x9872('0x37')]};});_0x267b4c[_0x9872('0x38')]=_['map'](_0x34c14f,_0x9872('0x31'));_0x267b4c[_0x9872('0x39')]=_[_0x9872('0x3a')](_0x204d4f['query']);_0x267b4c[_0x9872('0x3b')]=_[_0x9872('0x3c')](_0x267b4c[_0x9872('0x38')],_0x267b4c[_0x9872('0x39')]);_0x274d24['attributes']=_['intersection'](_0x267b4c[_0x9872('0x38')],qs['fields'](_0x204d4f['query'][_0x9872('0x3d')]));_0x274d24[_0x9872('0x3e')]=_0x274d24[_0x9872('0x3e')][_0x9872('0x3f')]?_0x274d24['attributes']:_0x267b4c[_0x9872('0x38')];if(!_0x204d4f[_0x9872('0x39')][_0x9872('0x40')](_0x9872('0x41'))){_0x274d24[_0x9872('0x27')]=qs['limit'](_0x204d4f[_0x9872('0x39')][_0x9872('0x27')]);_0x274d24[_0x9872('0x25')]=qs[_0x9872('0x25')](_0x204d4f[_0x9872('0x39')]['offset']);}_0x274d24[_0x9872('0x42')]=qs[_0x9872('0x43')](_0x204d4f[_0x9872('0x39')][_0x9872('0x43')]);_0x274d24[_0x9872('0x44')]=qs['filters'](_[_0x9872('0x45')](_0x204d4f[_0x9872('0x39')],_0x267b4c['filters']),_0x34c14f);if(_0x204d4f[_0x9872('0x39')][_0x9872('0x46')]){_0x274d24[_0x9872('0x44')]=_[_0x9872('0x47')](_0x274d24[_0x9872('0x44')],{'$or':_['map'](_0x34c14f,function(_0x26efc3){if(_0x26efc3[_0x9872('0x48')]!=='VIRTUAL'){var _0x3c79e7={};_0x3c79e7[_0x26efc3[_0x9872('0x31')]]={'$like':'%'+_0x204d4f[_0x9872('0x39')][_0x9872('0x46')]+'%'};return _0x3c79e7;}})});}_0x274d24=_[_0x9872('0x47')]({},_0x274d24,_0x204d4f[_0x9872('0x49')]);var _0x18d081={'where':_0x274d24[_0x9872('0x44')]};return db['Plugin'][_0x9872('0x28')](_0x18d081)[_0x9872('0x2d')](function(_0x48026a){_0x463725[_0x9872('0x28')]=_0x48026a;if(_0x204d4f[_0x9872('0x39')][_0x9872('0x4a')]){_0x274d24[_0x9872('0x4b')]=[{'all':!![]}];}return db[_0x9872('0x35')][_0x9872('0x4c')](_0x274d24);})['then'](function(_0x53acf0){_0x463725[_0x9872('0x4d')]=_0x53acf0;return _0x463725;})[_0x9872('0x2d')](respondWithFilteredResult(_0x1b51fc,_0x274d24))['catch'](handleError(_0x1b51fc,null));};exports[_0x9872('0x4e')]=function(_0x33bce9,_0x12f94b){var _0x58ce48={'raw':!![],'where':{'id':_0x33bce9[_0x9872('0x4f')]['id']}},_0x3f63a3={};_0x3f63a3['model']=_['keys'](db[_0x9872('0x35')][_0x9872('0x50')]);_0x3f63a3[_0x9872('0x39')]=_[_0x9872('0x3a')](_0x33bce9['query']);_0x3f63a3[_0x9872('0x3b')]=_[_0x9872('0x3c')](_0x3f63a3[_0x9872('0x38')],_0x3f63a3[_0x9872('0x39')]);_0x58ce48['attributes']=_[_0x9872('0x3c')](_0x3f63a3['model'],qs['fields'](_0x33bce9[_0x9872('0x39')][_0x9872('0x3d')]));_0x58ce48[_0x9872('0x3e')]=_0x58ce48[_0x9872('0x3e')][_0x9872('0x3f')]?_0x58ce48[_0x9872('0x3e')]:_0x3f63a3[_0x9872('0x38')];if(_0x33bce9[_0x9872('0x39')][_0x9872('0x4a')]){_0x58ce48[_0x9872('0x4b')]=[{'all':!![]}];}_0x58ce48=_['merge']({},_0x58ce48,_0x33bce9[_0x9872('0x49')]);return db[_0x9872('0x35')][_0x9872('0x51')](_0x58ce48)[_0x9872('0x2d')](handleEntityNotFound(_0x12f94b,null))['then'](respondWithResult(_0x12f94b,null))[_0x9872('0x52')](handleError(_0x12f94b,null));};exports['download']=function(_0x1885de,_0x5d8ef1,_0x1f4902){return db['Plugin'][_0x9872('0x51')]({'where':{'id':_0x1885de[_0x9872('0x4f')]['id']},'attributes':[_0x9872('0x31'),_0x9872('0x6')],'raw':!![]})[_0x9872('0x2d')](handleEntityNotFound(_0x5d8ef1,null))[_0x9872('0x2d')](function(_0x16aaf9){if(_0x16aaf9){var _0x261cc4=path[_0x9872('0x53')](config['root'],'server/files/plugins',util[_0x9872('0x54')](_0x9872('0x55'),path[_0x9872('0x56')](_0x16aaf9[_0x9872('0x6')])));var _0x36c42f=fs['createWriteStream'](_0x261cc4);var _0x4cce98=archiver(_0x9872('0x57'),{'zlib':{'level':0x9}});_0x4cce98['on'](_0x9872('0x58'),function(_0x2978c1){if(_0x2978c1[_0x9872('0x59')]==='ENOENT'){logger[_0x9872('0x30')](_0x2978c1);}else{throw new db[(_0x9872('0x5a'))][(_0x9872('0x5b'))](_0x9872('0x5c'));}});_0x4cce98['on']('error',function(_0x11dc55){throw new db[(_0x9872('0x5a'))][(_0x9872('0x5b'))](_0x9872('0x5c'));});_0x4cce98['pipe'](_0x36c42f);_0x4cce98['glob'](_0x9872('0x5d'),{'cwd':path[_0x9872('0x53')](config[_0x9872('0x5e')],_0x9872('0x5f'),path[_0x9872('0x60')](_0x16aaf9['path'])),'ignore':[path[_0x9872('0x53')](path['basename'](_0x16aaf9[_0x9872('0x6')]),_0x9872('0x61')),path['join'](path['basename'](_0x16aaf9[_0x9872('0x6')]),_0x9872('0x62'))],'nodir':!![]})[_0x9872('0x63')]();_0x36c42f['on']('close',function(){if(!fs[_0x9872('0x64')](_0x261cc4)){throw new db['Sequelize'][(_0x9872('0x5b'))](_0x9872('0x65'));}return _0x5d8ef1[_0x9872('0x66')](_0x261cc4,util[_0x9872('0x54')](_0x9872('0x55'),path['basename'](_0x16aaf9[_0x9872('0x6')])),function(_0x30b0e9){if(_0x30b0e9){throw new db['Sequelize'][(_0x9872('0x5b'))](_0x9872('0x67'));}fs['unlinkSync'](_0x261cc4);logger[_0x9872('0x68')](_0x9872('0x69'));logger[_0x9872('0x68')](_0x9872('0x6a'));});});}return null;})[_0x9872('0x52')](handleError(_0x5d8ef1,null));};exports[_0x9872('0x6b')]=function(_0x275a34,_0x46fdc2,_0x113d8b){var _0x5769f8=path[_0x9872('0x56')](_0x275a34[_0x9872('0x6c')]['filename'],path[_0x9872('0x6d')](_0x275a34[_0x9872('0x6c')][_0x9872('0x6e')]));var _0x1e237a=path['join'](config[_0x9872('0x5e')],_0x9872('0x5f'),_0x275a34[_0x9872('0x6c')]['filename']);var _0x5e3172=path[_0x9872('0x53')](config[_0x9872('0x5e')],'server/files/plugins',_0x5769f8);logger[_0x9872('0x68')](_0x9872('0x6f'),_0x1e237a);logger[_0x9872('0x68')](_0x9872('0x70'),_0x5e3172);try{fs[_0x9872('0x71')](_0x1e237a,parseInt('0777',0x8));extract(_0x1e237a,{'dir':_0x5e3172},function(_0x572e47){if(_0x572e47){logger[_0x9872('0x30')](_0x572e47);handleError(_0x572e47,!![]);};var _0x58fb3f=fs[_0x9872('0x72')](_0x5e3172);if(_0x58fb3f['length']>0x1){removeReferences(_0x1e237a,_0x5e3172);logger[_0x9872('0x30')](_0x9872('0x73'));return _0x113d8b(new Error('Invalid\x20plugin\x20structure'));}var _0x1a3825=fs[_0x9872('0x74')](path[_0x9872('0x53')](_0x5e3172,_0x58fb3f[0x0]));if(_0x1a3825[_0x9872('0x75')]()){removeReferences(_0x1e237a,_0x5e3172);logger[_0x9872('0x30')]('Invalid\x20plugin\x20structure');return _0x113d8b(new Error(_0x9872('0x73')));}if(_0x1a3825['isDirectory']()){var _0x44d5e9=fs[_0x9872('0x72')](path[_0x9872('0x53')](_0x5e3172,_0x58fb3f[0x0]));if(_0x44d5e9['length']===0x0){removeReferences(_0x1e237a,_0x5e3172);logger[_0x9872('0x30')]('Invalid\x20plugin\x20structure');return _0x113d8b(new Error(_0x9872('0x73')));}var _0x346e82=_0x44d5e9[_0x9872('0x76')](function(_0x42a4be){return _0x42a4be===_0x9872('0x77');});if(!_0x346e82){return _0x113d8b(new Error(_0x9872('0x78')));}var _0x1020c4=fs[_0x9872('0x79')](path[_0x9872('0x53')](_0x5e3172,_0x58fb3f[0x0],_0x9872('0x77')));var _0x33de07=JSON['parse'](_0x1020c4);if(_0x9872('0x26')==typeof _0x33de07[_0x9872('0x31')]){return _0x113d8b(new Error('Invalid\x20manifest:\x20name\x20missing'));}if(_0x9872('0x26')==typeof _0x33de07[_0x9872('0x48')]){return _0x113d8b(new Error(_0x9872('0x7a')));}if('undefined'==typeof _0x33de07[_0x9872('0x7b')]){return _0x113d8b(new Error(_0x9872('0x7c')));}if('undefined'==typeof _0x33de07[_0x9872('0x7d')]){return _0x113d8b(new Error(_0x9872('0x7e')));}if(_0x33de07[_0x9872('0x48')]===_0x9872('0x7f')){if(_0x9872('0x26')==typeof _0x33de07[_0x9872('0x7d')][_0x9872('0x80')]){return _0x113d8b(new Error(_0x9872('0x81')));}if('undefined'==typeof _0x33de07[_0x9872('0x7d')][_0x9872('0x80')][_0x9872('0x82')]&&'undefined'==typeof _0x33de07['parameters'][_0x9872('0x80')][_0x9872('0x83')]){return _0x113d8b(new Error(_0x9872('0x84')));}}else if(_0x33de07[_0x9872('0x48')]===_0x9872('0x85')){if(_0x9872('0x26')==typeof _0x33de07[_0x9872('0x7d')]['scriptName']){return _0x113d8b(new Error(_0x9872('0x86')));}if(_0x9872('0x26')==typeof _0x33de07['parameters'][_0x9872('0x87')]){return _0x113d8b(new Error(_0x9872('0x88')));}}else{return _0x113d8b(new Error(_0x9872('0x89')));}var _0x34c1f1=_0x33de07[_0x9872('0x31')];var _0x3fda92=_0x33de07[_0x9872('0x8a')];var _0x237642=_0x33de07[_0x9872('0x48')];var _0x291e12=_0x33de07[_0x9872('0x8b')]?_0x33de07[_0x9872('0x8b')]:_0x9872('0x8c');var _0x417c7b=_0x33de07[_0x9872('0x8d')]?_0x33de07[_0x9872('0x8d')]:_0x9872('0x8e');var _0xc8d11e='';var _0x5a85b8='';var _0x204ea6='';var _0x1e5d5b='';var _0xe0cd40=_0x33de07[_0x9872('0x7b')];if(_0x237642===_0x9872('0x7f')){if('undefined'!=typeof _0x33de07['parameters'][_0x9872('0x80')][_0x9872('0x82')]){var _0x20f7f3=_0x33de07['parameters'][_0x9872('0x80')][_0x9872('0x82')];if(!/^(f|ht)tps?:\/\//i[_0x9872('0x8f')](_0x20f7f3)){_0xc8d11e=path[_0x9872('0x53')](_0x9872('0x90'),_0x5769f8,_0x58fb3f[0x0],_0x20f7f3);}else{_0xc8d11e=_0x20f7f3;}}else{logger[_0x9872('0x68')](_0x9872('0x91'));}if(_0x9872('0x26')!=typeof _0x33de07['parameters'][_0x9872('0x80')][_0x9872('0x83')]){var _0x3587e8=_0x33de07[_0x9872('0x7d')]['views']['agent'];if(!/^(f|ht)tps?:\/\//i[_0x9872('0x8f')](_0x3587e8)){_0x5a85b8=path[_0x9872('0x53')](_0x9872('0x90'),_0x5769f8,_0x58fb3f[0x0],_0x3587e8);}else{_0x5a85b8=_0x3587e8;}}else{logger[_0x9872('0x68')](_0x9872('0x92'));}}else if(_0x237642===_0x9872('0x85')){_0x204ea6=_0x33de07['parameters']['scriptName'];_0x1e5d5b=_0x33de07[_0x9872('0x7d')][_0x9872('0x87')];if(_0x9872('0x26')!=typeof _0x33de07['parameters'][_0x9872('0x80')]){if(_0x9872('0x26')!=typeof _0x33de07[_0x9872('0x7d')]['views'][_0x9872('0x82')]){var _0x20f7f3=_0x33de07[_0x9872('0x7d')][_0x9872('0x80')]['admin'];if(!/^(f|ht)tps?:\/\//i['test'](_0x20f7f3)){_0xc8d11e=path[_0x9872('0x53')](_0x9872('0x90'),_0x5769f8,_0x58fb3f[0x0],_0x20f7f3);}else{_0xc8d11e=_0x20f7f3;}}if(_0x9872('0x26')!=typeof _0x33de07[_0x9872('0x7d')][_0x9872('0x80')][_0x9872('0x83')]){var _0x3587e8=_0x33de07[_0x9872('0x7d')][_0x9872('0x80')][_0x9872('0x83')];if(!/^(f|ht)tps?:\/\//i[_0x9872('0x8f')](_0x3587e8)){_0x5a85b8=path[_0x9872('0x53')](_0x9872('0x90'),_0x5769f8,_0x58fb3f[0x0],_0x3587e8);}else{_0x5a85b8=_0x3587e8;}}}}var _0xd04d6a={'name':_0x34c1f1,'description':_0x3fda92,'path':path[_0x9872('0x53')](_0x5769f8,_0x58fb3f[0x0]),'type':_0x237642,'sidebar':_0x291e12,'icon':_0x417c7b,'adminUrl':_0xc8d11e,'agentUrl':_0x5a85b8,'scriptName':_0x204ea6,'scriptPath':_0x1e5d5b,'version':_0xe0cd40};removeReferences(_0x1e237a,null);return db[_0x9872('0x35')][_0x9872('0x93')](_0xd04d6a)[_0x9872('0x2d')](function(_0x311571){var _0x186a79={'role':_0x275a34[_0x9872('0x94')][_0x9872('0x95')],'userProfileId':_0x275a34['body'][_0x9872('0x96')]};if(!_0x186a79)throw new Error(_0x9872('0x97'));if(_0x186a79[_0x9872('0x95')]===_0x9872('0x98')){var _0x570b82=_0x311571['get']({'plain':!![]});return db['UserProfileSection'][_0x9872('0x51')]({'where':{'name':'Plugins','userProfileId':_0x186a79[_0x9872('0x96')]},'raw':!![]})[_0x9872('0x2d')](function(_0x2b3a88){if(_0x2b3a88&&_0x2b3a88[_0x9872('0x99')]===0x0){return db[_0x9872('0x2f')][_0x9872('0x93')]({'name':_0x570b82[_0x9872('0x31')],'resourceId':_0x570b82['id'],'type':_0x2b3a88[_0x9872('0x31')],'sectionId':_0x2b3a88['id']},{})['then'](function(){return _0x311571;});}else{return _0x311571;}})[_0x9872('0x52')](function(_0xa29ef){logger['error'](_0x9872('0x9a'),_0xa29ef);throw _0xa29ef;});}return _0x311571;})[_0x9872('0x2d')](respondWithResult(_0x46fdc2,null))['catch'](handleError(_0x46fdc2,null));}});}catch(_0x593043){_0x46fdc2[_0x9872('0x22')](0x1f4)['send'](_0x593043);}};function removeReferences(_0x525217,_0x37b517){try{if(_0x525217){fs['unlinkSync'](_0x525217);logger['info'](_0x9872('0x9b'));}if(_0x37b517){rimraf(_0x37b517,function(){});logger[_0x9872('0x68')](_0x9872('0x9c'));}}catch(_0x136e98){logger[_0x9872('0x30')](_0x136e98);}}exports[_0x9872('0x9d')]=function(_0x33b09f,_0x37d186,_0x41b608){return db[_0x9872('0x35')][_0x9872('0x51')]({'where':{'id':_0x33b09f['params']['id']}})['then'](handleEntityNotFound(_0x37d186,null))['then'](saveUpdates(_0x33b09f[_0x9872('0x94')],null))[_0x9872('0x2d')](respondWithResult(_0x37d186,null))[_0x9872('0x52')](handleError(_0x37d186,null));};exports[_0x9872('0x9e')]=function(_0x568154,_0x42ea1b,_0x242bd0){return db[_0x9872('0x35')][_0x9872('0x51')]({'where':{'id':_0x568154[_0x9872('0x4f')]['id']}})[_0x9872('0x2d')](function(_0x588ecf){if(_0x588ecf){return _0x588ecf['destroy']();}})['then'](function(_0x78aa86){rimraf(path['join'](config['root'],'server/files/plugins',path[_0x9872('0x60')](_0x78aa86[_0x9872('0x6')])),function(){});return _0x78aa86;})[_0x9872('0x2d')](handleEntityNotFound(_0x42ea1b,null))[_0x9872('0x2d')](respondWithStatusCode(_0x42ea1b,null))['catch'](handleError(_0x42ea1b,null));};exports[_0x9872('0x9f')]=function(_0x5a2377,_0x2e3969,_0xf9ce8){return BPromise['resolve']()[_0x9872('0x2d')](function(){if(!_0x5a2377['query'][_0x9872('0x6')]){throw new Error(_0x9872('0xa0'));}if(!_0x5a2377['query'][_0x9872('0xa1')]){throw new Error(_0x9872('0xa2'));}var _0x36c7f6=_0x5a2377[_0x9872('0x39')][_0x9872('0xa3')]?_0x5a2377[_0x9872('0x39')][_0x9872('0xa3')]+':'+_0x5a2377['query'][_0x9872('0xa1')]:_0x9872('0xa4')+_0x5a2377[_0x9872('0x39')][_0x9872('0xa1')];var _0x284c12=_0x5a2377[_0x9872('0x39')][_0x9872('0x24')]?_0x5a2377[_0x9872('0x39')][_0x9872('0x24')]:!![];var _0x2bc3af=_0x5a2377[_0x9872('0x39')][_0x9872('0xa5')]?_0x5a2377[_0x9872('0x39')][_0x9872('0xa5')]:null;var _0x9a29ff={'method':_0x5a2377[_0x9872('0xa6')],'uri':util[_0x9872('0x54')]('%s%s',_0x36c7f6,_0x5a2377[_0x9872('0x39')][_0x9872('0x6')]),'json':_0x284c12,'resolveWithFullResponse':!![],'encoding':_0x2bc3af,'qs':_0x5a2377['query']};if(_0x5a2377['headers']){_0x9a29ff[_0x9872('0xa7')]=_0x5a2377[_0x9872('0xa7')];if(_0x9a29ff['headers']['content-length']){delete _0x9a29ff['headers'][_0x9872('0xa8')];}}if(_0x9a29ff[_0x9872('0xa7')][_0x9872('0xa9')]){delete _0x9a29ff[_0x9872('0xa7')]['content-type'];}return rp(_0x9a29ff);})[_0x9872('0x2d')](function(_0x4d8c9a){if(_0x4d8c9a){_0x2e3969[_0x9872('0xaa')](_0x4d8c9a[_0x9872('0xa7')]);logger[_0x9872('0x68')](_0x4d8c9a[_0x9872('0x94')]);if(_[_0x9872('0xab')](_0x5a2377[_0x9872('0x39')]['path'],_0x9872('0x66'))&&_0x4d8c9a['statusCode']==0x1f4){return _0x2e3969['sendStatus'](_0x4d8c9a[_0x9872('0xac')]);}else{return _0x2e3969['status'](_0x4d8c9a['statusCode'])[_0x9872('0x32')](_0x4d8c9a[_0x9872('0x94')]);}}else{return _0x2e3969[_0x9872('0x21')](0xc8);}})[_0x9872('0x52')](handleError(_0x2e3969,null));};exports[_0x9872('0xad')]=function(_0x152200,_0x4c916f,_0x5e9e04){return BPromise['resolve']()['then'](function(){if(!_0x152200[_0x9872('0x39')][_0x9872('0x6')]){throw new Error(_0x9872('0xa0'));}if(!_0x152200[_0x9872('0x39')][_0x9872('0xa1')]){throw new Error(_0x9872('0xa2'));}var _0x581d97=_0x152200[_0x9872('0x39')][_0x9872('0xa3')]?_0x152200[_0x9872('0x39')][_0x9872('0xa3')]+':'+_0x152200[_0x9872('0x39')][_0x9872('0xa1')]:_0x9872('0xa4')+_0x152200[_0x9872('0x39')]['port'];var _0x4e792f=_0x152200['query'][_0x9872('0x24')]?_0x152200[_0x9872('0x39')][_0x9872('0x24')]:!![];var _0x85f48c=_0x152200[_0x9872('0x39')]['encoding']?_0x152200[_0x9872('0x39')]['encoding']:null;var _0x3f0e5e={'method':_0x152200[_0x9872('0xa6')],'uri':util[_0x9872('0x54')]('%s%s',_0x581d97,_0x152200[_0x9872('0x39')][_0x9872('0x6')]),'json':_0x4e792f,'resolveWithFullResponse':!![],'encoding':_0x85f48c,'body':_0x152200[_0x9872('0x94')]};if(_0x152200[_0x9872('0xa7')]){_0x3f0e5e[_0x9872('0xa7')]=_0x152200[_0x9872('0xa7')];if(_0x3f0e5e[_0x9872('0xa7')][_0x9872('0xa8')]){delete _0x3f0e5e[_0x9872('0xa7')][_0x9872('0xa8')];}}if(_0x3f0e5e['headers'][_0x9872('0xa9')]){delete _0x3f0e5e[_0x9872('0xa7')]['content-type'];}return rp(_0x3f0e5e);})['then'](function(_0x2ec4d1){if(_0x2ec4d1){_0x4c916f[_0x9872('0xaa')](_0x2ec4d1[_0x9872('0xa7')]);logger[_0x9872('0x68')](_0x2ec4d1[_0x9872('0x94')]);return _0x4c916f['status'](_0x2ec4d1['statusCode'])[_0x9872('0x32')](_0x2ec4d1['body']);}else{return _0x4c916f[_0x9872('0x21')](0xc8);}})[_0x9872('0x52')](handleError(_0x4c916f,null));};
\ No newline at end of file
+var _0xc9e4=['../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','json','offset','limit','undefined','count','Content-Range','save','then','destroy','get','UserProfileResource','error','stack','name','send','index','map','Plugin','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','nolimit','order','sort','where','filters','pick','filter','VIRTUAL','merge','options','includeAll','findAll','rows','include','find','catch','download','params','root','format','basename','zip','warning','code','ENOENT','Sequelize','Error','Error\x20while\x20generating\x20the\x20zip\x20archive','pipe','**/*','server/files/plugins','dirname','node_modules/**/*','join','attachments/**/*','close','existsSync','%s.zip','Error\x20while\x20downloading\x20the\x20plugin','unlinkSync','info','Download\x20completed','Temporary\x20file\x20removed','upload','file','extname','filename','Plugin\x20upload\x20filepath:\x20%s','0777','Invalid\x20plugin\x20structure','lstatSync','isFile','isDirectory','readdirSync','some','manifest.json','Plugin\x20manifest\x20missing','readFileSync','Invalid\x20manifest:\x20name\x20missing','Invalid\x20manifest:\x20type\x20missing','version','parameters','html','views','Invalid\x20manifest:\x20views\x20missing','admin','agent','Invalid\x20manifest:\x20no\x20view\x20specified','script','scriptName','Invalid\x20manifest:\x20script\x20name\x20missing','scriptPath','Invalid\x20manifest:\x20script\x20path\x20missing','Invalid\x20manifest:\x20invalid\x20type','description','sidebar','always','icon','icon-apps','test','plugins','Warning:\x20admin\x20view\x20not\x20specified','create','body','role','userProfileId','user','UserProfileSection','Plugins','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','Zip\x20archive\x20removed','update','webhookGet','resolve','hostname','http://localhost:','port','encoding','%s%s','headers','content-length','content-type','set','statusCode','webhookPost','\x27PATH\x27\x20parameter\x20not\x20specified','method','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','extract-zip','rimraf','archiver'];(function(_0x499bd9,_0x51a209){var _0x5eb275=function(_0x4ce722){while(--_0x4ce722){_0x499bd9['push'](_0x499bd9['shift']());}};_0x5eb275(++_0x51a209);}(_0xc9e4,0x1ec));var _0x4c9e=function(_0x4ae578,_0x47156f){_0x4ae578=_0x4ae578-0x0;var _0x386e83=_0xc9e4[_0x4ae578];return _0x386e83;};'use strict';var emlformat=require(_0x4c9e('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x4c9e('0x1'));var jsonpatch=require(_0x4c9e('0x2'));var rp=require(_0x4c9e('0x3'));var moment=require(_0x4c9e('0x4'));var BPromise=require(_0x4c9e('0x5'));var Mustache=require(_0x4c9e('0x6'));var util=require(_0x4c9e('0x7'));var path=require(_0x4c9e('0x8'));var sox=require('sox');var csv=require(_0x4c9e('0x9'));var ejs=require(_0x4c9e('0xa'));var fs=require('fs');var fs_extra=require(_0x4c9e('0xb'));var _=require(_0x4c9e('0xc'));var squel=require('squel');var crypto=require(_0x4c9e('0xd'));var jsforce=require(_0x4c9e('0xe'));var deskjs=require(_0x4c9e('0xf'));var toCsv=require(_0x4c9e('0x9'));var querystring=require(_0x4c9e('0x10'));var Papa=require(_0x4c9e('0x11'));var extract=require(_0x4c9e('0x12'));var rimraf=require(_0x4c9e('0x13'));var archiver=require(_0x4c9e('0x14'));var Redis=require('ioredis');var authService=require(_0x4c9e('0x15'));var qs=require(_0x4c9e('0x16'));var as=require(_0x4c9e('0x17'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x4c9e('0x18'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x4c9e('0x19'));var db=require(_0x4c9e('0x1a'))['db'];config[_0x4c9e('0x1b')]=_[_0x4c9e('0x1c')](config[_0x4c9e('0x1b')],{'host':_0x4c9e('0x1d'),'port':0x18eb});var socket=require(_0x4c9e('0x1e'))(new Redis(config[_0x4c9e('0x1b')]));require('./plugin.socket')[_0x4c9e('0x1f')](socket);function respondWithStatusCode(_0x425cea,_0x4d0507){_0x4d0507=_0x4d0507||0xcc;return function(_0x531114){if(_0x531114){return _0x425cea[_0x4c9e('0x20')](_0x4d0507);}return _0x425cea[_0x4c9e('0x21')](_0x4d0507)[_0x4c9e('0x22')]();};}function respondWithResult(_0x4a7535,_0x27ba29){_0x27ba29=_0x27ba29||0xc8;return function(_0x378edf){if(_0x378edf){return _0x4a7535['status'](_0x27ba29)[_0x4c9e('0x23')](_0x378edf);}};}function respondWithFilteredResult(_0x3b88a3,_0x59b178){return function(_0xc4409a){if(_0xc4409a){var _0x5a0680=typeof _0x59b178[_0x4c9e('0x24')]==='undefined'&&typeof _0x59b178[_0x4c9e('0x25')]===_0x4c9e('0x26');var _0x3ddf44=_0xc4409a[_0x4c9e('0x27')];var _0x53ee4c=_0x5a0680?0x0:_0x59b178['offset'];var _0xfd3adf=_0x5a0680?_0xc4409a['count']:_0x59b178[_0x4c9e('0x24')]+_0x59b178[_0x4c9e('0x25')];var _0x3b3b1e;if(_0xfd3adf>=_0x3ddf44){_0xfd3adf=_0x3ddf44;_0x3b3b1e=0xc8;}else{_0x3b3b1e=0xce;}_0x3b88a3['status'](_0x3b3b1e);return _0x3b88a3['set'](_0x4c9e('0x28'),_0x53ee4c+'-'+_0xfd3adf+'/'+_0x3ddf44)[_0x4c9e('0x23')](_0xc4409a);}return null;};}function patchUpdates(_0xe81c83){return function(_0x3085a1){try{jsonpatch['apply'](_0x3085a1,_0xe81c83,!![]);}catch(_0x3e8fbf){return BPromise['reject'](_0x3e8fbf);}return _0x3085a1[_0x4c9e('0x29')]();};}function saveUpdates(_0x4ee89c,_0x2bb709){return function(_0x547745){if(_0x547745){return _0x547745['update'](_0x4ee89c)[_0x4c9e('0x2a')](function(_0x178fc6){return _0x178fc6;});}return null;};}function removeEntity(_0x366c2c,_0x384623){return function(_0x20776c){if(_0x20776c){return _0x20776c[_0x4c9e('0x2b')]()['then'](function(){var _0x2d7e07=_0x20776c[_0x4c9e('0x2c')]({'plain':!![]});var _0x1afaf7='Plugins';return db[_0x4c9e('0x2d')][_0x4c9e('0x2b')]({'where':{'type':_0x1afaf7,'resourceId':_0x2d7e07['id']}})['then'](function(){return _0x20776c;});})[_0x4c9e('0x2a')](function(){_0x366c2c[_0x4c9e('0x21')](0xcc)[_0x4c9e('0x22')]();});}};}function handleEntityNotFound(_0x9a169c,_0x515f53){return function(_0x5821cd){if(!_0x5821cd){_0x9a169c['sendStatus'](0x194);}return _0x5821cd;};}function handleError(_0x307f5b,_0x449c67){_0x449c67=_0x449c67||0x1f4;return function(_0x298563){logger[_0x4c9e('0x2e')](_0x298563[_0x4c9e('0x2f')]);if(_0x298563['name']){delete _0x298563[_0x4c9e('0x30')];}_0x307f5b[_0x4c9e('0x21')](_0x449c67)[_0x4c9e('0x31')](_0x298563);};}exports[_0x4c9e('0x32')]=function(_0x199f0d,_0x1d5b2b){var _0x930894={},_0x2ffaf7={},_0x32c841={'count':0x0,'rows':[]};var _0x5b6121=_[_0x4c9e('0x33')](db[_0x4c9e('0x34')][_0x4c9e('0x35')],function(_0x26adee){return{'name':_0x26adee[_0x4c9e('0x36')],'type':_0x26adee[_0x4c9e('0x37')][_0x4c9e('0x38')]};});_0x2ffaf7[_0x4c9e('0x39')]=_[_0x4c9e('0x33')](_0x5b6121,_0x4c9e('0x30'));_0x2ffaf7[_0x4c9e('0x3a')]=_[_0x4c9e('0x3b')](_0x199f0d['query']);_0x2ffaf7['filters']=_[_0x4c9e('0x3c')](_0x2ffaf7[_0x4c9e('0x39')],_0x2ffaf7[_0x4c9e('0x3a')]);_0x930894[_0x4c9e('0x3d')]=_['intersection'](_0x2ffaf7[_0x4c9e('0x39')],qs[_0x4c9e('0x3e')](_0x199f0d[_0x4c9e('0x3a')][_0x4c9e('0x3e')]));_0x930894['attributes']=_0x930894[_0x4c9e('0x3d')][_0x4c9e('0x3f')]?_0x930894[_0x4c9e('0x3d')]:_0x2ffaf7['model'];if(!_0x199f0d['query']['hasOwnProperty'](_0x4c9e('0x40'))){_0x930894[_0x4c9e('0x25')]=qs[_0x4c9e('0x25')](_0x199f0d[_0x4c9e('0x3a')][_0x4c9e('0x25')]);_0x930894[_0x4c9e('0x24')]=qs[_0x4c9e('0x24')](_0x199f0d[_0x4c9e('0x3a')][_0x4c9e('0x24')]);}_0x930894[_0x4c9e('0x41')]=qs[_0x4c9e('0x42')](_0x199f0d[_0x4c9e('0x3a')][_0x4c9e('0x42')]);_0x930894[_0x4c9e('0x43')]=qs[_0x4c9e('0x44')](_[_0x4c9e('0x45')](_0x199f0d[_0x4c9e('0x3a')],_0x2ffaf7[_0x4c9e('0x44')]),_0x5b6121);if(_0x199f0d[_0x4c9e('0x3a')][_0x4c9e('0x46')]){_0x930894[_0x4c9e('0x43')]=_['merge'](_0x930894[_0x4c9e('0x43')],{'$or':_['map'](_0x5b6121,function(_0xefc4bb){if(_0xefc4bb['type']!==_0x4c9e('0x47')){var _0x1d83b7={};_0x1d83b7[_0xefc4bb['name']]={'$like':'%'+_0x199f0d[_0x4c9e('0x3a')]['filter']+'%'};return _0x1d83b7;}})});}_0x930894=_[_0x4c9e('0x48')]({},_0x930894,_0x199f0d[_0x4c9e('0x49')]);var _0x9c0f5d={'where':_0x930894['where']};return db['Plugin'][_0x4c9e('0x27')](_0x9c0f5d)[_0x4c9e('0x2a')](function(_0x2ea007){_0x32c841[_0x4c9e('0x27')]=_0x2ea007;if(_0x199f0d[_0x4c9e('0x3a')][_0x4c9e('0x4a')]){_0x930894['include']=[{'all':!![]}];}return db[_0x4c9e('0x34')][_0x4c9e('0x4b')](_0x930894);})[_0x4c9e('0x2a')](function(_0x23953d){_0x32c841[_0x4c9e('0x4c')]=_0x23953d;return _0x32c841;})[_0x4c9e('0x2a')](respondWithFilteredResult(_0x1d5b2b,_0x930894))['catch'](handleError(_0x1d5b2b,null));};exports['show']=function(_0x867da1,_0x53388a){var _0x7d5213={'raw':!![],'where':{'id':_0x867da1['params']['id']}},_0x16e3a3={};_0x16e3a3['model']=_['keys'](db[_0x4c9e('0x34')][_0x4c9e('0x35')]);_0x16e3a3[_0x4c9e('0x3a')]=_[_0x4c9e('0x3b')](_0x867da1[_0x4c9e('0x3a')]);_0x16e3a3['filters']=_[_0x4c9e('0x3c')](_0x16e3a3[_0x4c9e('0x39')],_0x16e3a3[_0x4c9e('0x3a')]);_0x7d5213[_0x4c9e('0x3d')]=_[_0x4c9e('0x3c')](_0x16e3a3[_0x4c9e('0x39')],qs[_0x4c9e('0x3e')](_0x867da1['query'][_0x4c9e('0x3e')]));_0x7d5213['attributes']=_0x7d5213[_0x4c9e('0x3d')][_0x4c9e('0x3f')]?_0x7d5213[_0x4c9e('0x3d')]:_0x16e3a3[_0x4c9e('0x39')];if(_0x867da1['query'][_0x4c9e('0x4a')]){_0x7d5213[_0x4c9e('0x4d')]=[{'all':!![]}];}_0x7d5213=_[_0x4c9e('0x48')]({},_0x7d5213,_0x867da1['options']);return db[_0x4c9e('0x34')][_0x4c9e('0x4e')](_0x7d5213)[_0x4c9e('0x2a')](handleEntityNotFound(_0x53388a,null))['then'](respondWithResult(_0x53388a,null))[_0x4c9e('0x4f')](handleError(_0x53388a,null));};exports[_0x4c9e('0x50')]=function(_0x2907a5,_0x2ea86c,_0x2ceb1b){return db[_0x4c9e('0x34')][_0x4c9e('0x4e')]({'where':{'id':_0x2907a5[_0x4c9e('0x51')]['id']},'attributes':[_0x4c9e('0x30'),_0x4c9e('0x8')],'raw':!![]})[_0x4c9e('0x2a')](handleEntityNotFound(_0x2ea86c,null))[_0x4c9e('0x2a')](function(_0x30a42e){if(_0x30a42e){var _0x1f43b2=path['join'](config[_0x4c9e('0x52')],'server/files/plugins',util[_0x4c9e('0x53')]('%s.zip',path[_0x4c9e('0x54')](_0x30a42e['path'])));var _0x2dfdee=fs['createWriteStream'](_0x1f43b2);var _0x2abea2=archiver(_0x4c9e('0x55'),{'zlib':{'level':0x9}});_0x2abea2['on'](_0x4c9e('0x56'),function(_0x7406ba){if(_0x7406ba[_0x4c9e('0x57')]===_0x4c9e('0x58')){logger[_0x4c9e('0x2e')](_0x7406ba);}else{throw new db[(_0x4c9e('0x59'))][(_0x4c9e('0x5a'))]('Error\x20while\x20generating\x20the\x20zip\x20archive');}});_0x2abea2['on'](_0x4c9e('0x2e'),function(_0x61a51d){throw new db[(_0x4c9e('0x59'))]['Error'](_0x4c9e('0x5b'));});_0x2abea2[_0x4c9e('0x5c')](_0x2dfdee);_0x2abea2['glob'](_0x4c9e('0x5d'),{'cwd':path['join'](config[_0x4c9e('0x52')],_0x4c9e('0x5e'),path[_0x4c9e('0x5f')](_0x30a42e['path'])),'ignore':[path['join'](path['basename'](_0x30a42e[_0x4c9e('0x8')]),_0x4c9e('0x60')),path[_0x4c9e('0x61')](path[_0x4c9e('0x54')](_0x30a42e[_0x4c9e('0x8')]),_0x4c9e('0x62'))],'nodir':!![]})['finalize']();_0x2dfdee['on'](_0x4c9e('0x63'),function(){if(!fs[_0x4c9e('0x64')](_0x1f43b2)){throw new db['Sequelize'][(_0x4c9e('0x5a'))]('Plugin\x20not\x20found');}return _0x2ea86c[_0x4c9e('0x50')](_0x1f43b2,util[_0x4c9e('0x53')](_0x4c9e('0x65'),path[_0x4c9e('0x54')](_0x30a42e[_0x4c9e('0x8')])),function(_0x18a99c){if(_0x18a99c){throw new db[(_0x4c9e('0x59'))]['Error'](_0x4c9e('0x66'));}fs[_0x4c9e('0x67')](_0x1f43b2);logger[_0x4c9e('0x68')](_0x4c9e('0x69'));logger[_0x4c9e('0x68')](_0x4c9e('0x6a'));});});}return null;})[_0x4c9e('0x4f')](handleError(_0x2ea86c,null));};exports[_0x4c9e('0x6b')]=function(_0x3e44c6,_0x233edd,_0x53c49e){var _0x1240d1=path[_0x4c9e('0x54')](_0x3e44c6[_0x4c9e('0x6c')]['filename'],path[_0x4c9e('0x6d')](_0x3e44c6[_0x4c9e('0x6c')][_0x4c9e('0x6e')]));var _0x495c5e=path['join'](config['root'],_0x4c9e('0x5e'),_0x3e44c6[_0x4c9e('0x6c')][_0x4c9e('0x6e')]);var _0x17ffaf=path[_0x4c9e('0x61')](config[_0x4c9e('0x52')],_0x4c9e('0x5e'),_0x1240d1);logger[_0x4c9e('0x68')](_0x4c9e('0x6f'),_0x495c5e);logger[_0x4c9e('0x68')]('Plugin\x20upload\x20destination:\x20%s',_0x17ffaf);try{fs['chmodSync'](_0x495c5e,parseInt(_0x4c9e('0x70'),0x8));extract(_0x495c5e,{'dir':_0x17ffaf},function(_0x351816){if(_0x351816){logger[_0x4c9e('0x2e')](_0x351816);handleError(_0x351816,!![]);};var _0x2f7726=fs['readdirSync'](_0x17ffaf);if(_0x2f7726['length']>0x1){removeReferences(_0x495c5e,_0x17ffaf);logger[_0x4c9e('0x2e')](_0x4c9e('0x71'));return _0x53c49e(new Error(_0x4c9e('0x71')));}var _0x254857=fs[_0x4c9e('0x72')](path[_0x4c9e('0x61')](_0x17ffaf,_0x2f7726[0x0]));if(_0x254857[_0x4c9e('0x73')]()){removeReferences(_0x495c5e,_0x17ffaf);logger[_0x4c9e('0x2e')](_0x4c9e('0x71'));return _0x53c49e(new Error(_0x4c9e('0x71')));}if(_0x254857[_0x4c9e('0x74')]()){var _0x50b483=fs[_0x4c9e('0x75')](path[_0x4c9e('0x61')](_0x17ffaf,_0x2f7726[0x0]));if(_0x50b483[_0x4c9e('0x3f')]===0x0){removeReferences(_0x495c5e,_0x17ffaf);logger[_0x4c9e('0x2e')](_0x4c9e('0x71'));return _0x53c49e(new Error(_0x4c9e('0x71')));}var _0x435969=_0x50b483[_0x4c9e('0x76')](function(_0x278f5e){return _0x278f5e===_0x4c9e('0x77');});if(!_0x435969){return _0x53c49e(new Error(_0x4c9e('0x78')));}var _0x3ab643=fs[_0x4c9e('0x79')](path['join'](_0x17ffaf,_0x2f7726[0x0],_0x4c9e('0x77')));var _0x1b111a=JSON['parse'](_0x3ab643);if(_0x4c9e('0x26')==typeof _0x1b111a['name']){return _0x53c49e(new Error(_0x4c9e('0x7a')));}if(_0x4c9e('0x26')==typeof _0x1b111a[_0x4c9e('0x37')]){return _0x53c49e(new Error(_0x4c9e('0x7b')));}if(_0x4c9e('0x26')==typeof _0x1b111a[_0x4c9e('0x7c')]){return _0x53c49e(new Error('Invalid\x20manifest:\x20version\x20not\x20specified'));}if(_0x4c9e('0x26')==typeof _0x1b111a[_0x4c9e('0x7d')]){return _0x53c49e(new Error('Invalid\x20manifest:\x20parameters\x20missing'));}if(_0x1b111a['type']===_0x4c9e('0x7e')){if('undefined'==typeof _0x1b111a[_0x4c9e('0x7d')][_0x4c9e('0x7f')]){return _0x53c49e(new Error(_0x4c9e('0x80')));}if(_0x4c9e('0x26')==typeof _0x1b111a[_0x4c9e('0x7d')][_0x4c9e('0x7f')][_0x4c9e('0x81')]&&_0x4c9e('0x26')==typeof _0x1b111a['parameters'][_0x4c9e('0x7f')][_0x4c9e('0x82')]){return _0x53c49e(new Error(_0x4c9e('0x83')));}}else if(_0x1b111a['type']===_0x4c9e('0x84')){if('undefined'==typeof _0x1b111a[_0x4c9e('0x7d')][_0x4c9e('0x85')]){return _0x53c49e(new Error(_0x4c9e('0x86')));}if('undefined'==typeof _0x1b111a[_0x4c9e('0x7d')][_0x4c9e('0x87')]){return _0x53c49e(new Error(_0x4c9e('0x88')));}}else{return _0x53c49e(new Error(_0x4c9e('0x89')));}var _0x2c9bf0=_0x1b111a[_0x4c9e('0x30')];var _0x489e1a=_0x1b111a[_0x4c9e('0x8a')];var _0x4f4c73=_0x1b111a['type'];var _0x2c1002=_0x1b111a[_0x4c9e('0x8b')]?_0x1b111a[_0x4c9e('0x8b')]:_0x4c9e('0x8c');var _0x40b2af=_0x1b111a[_0x4c9e('0x8d')]?_0x1b111a['icon']:_0x4c9e('0x8e');var _0x206ebd='';var _0x2715b9='';var _0xc454b6='';var _0x5a9434='';var _0x50ffd6=_0x1b111a[_0x4c9e('0x7c')];if(_0x4f4c73===_0x4c9e('0x7e')){if(_0x4c9e('0x26')!=typeof _0x1b111a['parameters']['views'][_0x4c9e('0x81')]){var _0x2187c9=_0x1b111a['parameters'][_0x4c9e('0x7f')][_0x4c9e('0x81')];if(!/^(f|ht)tps?:\/\//i[_0x4c9e('0x8f')](_0x2187c9)){_0x206ebd=path[_0x4c9e('0x61')](_0x4c9e('0x90'),_0x1240d1,_0x2f7726[0x0],_0x2187c9);}else{_0x206ebd=_0x2187c9;}}else{logger[_0x4c9e('0x68')](_0x4c9e('0x91'));}if('undefined'!=typeof _0x1b111a[_0x4c9e('0x7d')][_0x4c9e('0x7f')]['agent']){var _0x514115=_0x1b111a['parameters'][_0x4c9e('0x7f')][_0x4c9e('0x82')];if(!/^(f|ht)tps?:\/\//i[_0x4c9e('0x8f')](_0x514115)){_0x2715b9=path[_0x4c9e('0x61')]('plugins',_0x1240d1,_0x2f7726[0x0],_0x514115);}else{_0x2715b9=_0x514115;}}else{logger[_0x4c9e('0x68')]('Warning:\x20agent\x20view\x20not\x20specified');}}else if(_0x4f4c73===_0x4c9e('0x84')){_0xc454b6=_0x1b111a['parameters']['scriptName'];_0x5a9434=_0x1b111a[_0x4c9e('0x7d')][_0x4c9e('0x87')];if(_0x4c9e('0x26')!=typeof _0x1b111a[_0x4c9e('0x7d')][_0x4c9e('0x7f')]){if(_0x4c9e('0x26')!=typeof _0x1b111a['parameters'][_0x4c9e('0x7f')]['admin']){var _0x2187c9=_0x1b111a[_0x4c9e('0x7d')][_0x4c9e('0x7f')]['admin'];if(!/^(f|ht)tps?:\/\//i[_0x4c9e('0x8f')](_0x2187c9)){_0x206ebd=path['join'](_0x4c9e('0x90'),_0x1240d1,_0x2f7726[0x0],_0x2187c9);}else{_0x206ebd=_0x2187c9;}}if(_0x4c9e('0x26')!=typeof _0x1b111a[_0x4c9e('0x7d')][_0x4c9e('0x7f')][_0x4c9e('0x82')]){var _0x514115=_0x1b111a[_0x4c9e('0x7d')]['views'][_0x4c9e('0x82')];if(!/^(f|ht)tps?:\/\//i[_0x4c9e('0x8f')](_0x514115)){_0x2715b9=path[_0x4c9e('0x61')](_0x4c9e('0x90'),_0x1240d1,_0x2f7726[0x0],_0x514115);}else{_0x2715b9=_0x514115;}}}}var _0x361fd8={'name':_0x2c9bf0,'description':_0x489e1a,'path':path[_0x4c9e('0x61')](_0x1240d1,_0x2f7726[0x0]),'type':_0x4f4c73,'sidebar':_0x2c1002,'icon':_0x40b2af,'adminUrl':_0x206ebd,'agentUrl':_0x2715b9,'scriptName':_0xc454b6,'scriptPath':_0x5a9434,'version':_0x50ffd6};removeReferences(_0x495c5e,null);return db[_0x4c9e('0x34')][_0x4c9e('0x92')](_0x361fd8)[_0x4c9e('0x2a')](function(_0x20c810){var _0x405e0b={'role':_0x3e44c6[_0x4c9e('0x93')][_0x4c9e('0x94')],'userProfileId':_0x3e44c6[_0x4c9e('0x93')][_0x4c9e('0x95')]};if(!_0x405e0b)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x405e0b['role']===_0x4c9e('0x96')){var _0x5348d0=_0x20c810[_0x4c9e('0x2c')]({'plain':!![]});return db[_0x4c9e('0x97')][_0x4c9e('0x4e')]({'where':{'name':_0x4c9e('0x98'),'userProfileId':_0x405e0b[_0x4c9e('0x95')]},'raw':!![]})['then'](function(_0xaa2516){if(_0xaa2516&&_0xaa2516['autoAssociation']===0x0){return db[_0x4c9e('0x2d')][_0x4c9e('0x92')]({'name':_0x5348d0[_0x4c9e('0x30')],'resourceId':_0x5348d0['id'],'type':_0xaa2516[_0x4c9e('0x30')],'sectionId':_0xaa2516['id']},{})[_0x4c9e('0x2a')](function(){return _0x20c810;});}else{return _0x20c810;}})[_0x4c9e('0x4f')](function(_0x4271a7){logger['error'](_0x4c9e('0x99'),_0x4271a7);throw _0x4271a7;});}return _0x20c810;})[_0x4c9e('0x2a')](respondWithResult(_0x233edd,null))['catch'](handleError(_0x233edd,null));}});}catch(_0x14efd4){_0x233edd[_0x4c9e('0x21')](0x1f4)[_0x4c9e('0x31')](_0x14efd4);}};function removeReferences(_0x5d567c,_0xff9041){try{if(_0x5d567c){fs[_0x4c9e('0x67')](_0x5d567c);logger[_0x4c9e('0x68')](_0x4c9e('0x9a'));}if(_0xff9041){rimraf(_0xff9041,function(){});logger[_0x4c9e('0x68')]('Extracted\x20folder\x20removed');}}catch(_0x5e9082){logger[_0x4c9e('0x2e')](_0x5e9082);}}exports[_0x4c9e('0x9b')]=function(_0x1f81cc,_0x19f81b,_0x3b0d69){return db[_0x4c9e('0x34')][_0x4c9e('0x4e')]({'where':{'id':_0x1f81cc[_0x4c9e('0x51')]['id']}})[_0x4c9e('0x2a')](handleEntityNotFound(_0x19f81b,null))[_0x4c9e('0x2a')](saveUpdates(_0x1f81cc[_0x4c9e('0x93')],null))['then'](respondWithResult(_0x19f81b,null))[_0x4c9e('0x4f')](handleError(_0x19f81b,null));};exports['delete']=function(_0x360db6,_0x31bb18,_0x468023){return db[_0x4c9e('0x34')][_0x4c9e('0x4e')]({'where':{'id':_0x360db6['params']['id']}})[_0x4c9e('0x2a')](function(_0xeb74e1){if(_0xeb74e1){return _0xeb74e1[_0x4c9e('0x2b')]();}})['then'](function(_0x511971){rimraf(path[_0x4c9e('0x61')](config[_0x4c9e('0x52')],_0x4c9e('0x5e'),path['dirname'](_0x511971[_0x4c9e('0x8')])),function(){});return _0x511971;})['then'](handleEntityNotFound(_0x31bb18,null))[_0x4c9e('0x2a')](respondWithStatusCode(_0x31bb18,null))[_0x4c9e('0x4f')](handleError(_0x31bb18,null));};exports[_0x4c9e('0x9c')]=function(_0x2ae181,_0x1eb183,_0x4bbd8e){return BPromise[_0x4c9e('0x9d')]()[_0x4c9e('0x2a')](function(){if(!_0x2ae181[_0x4c9e('0x3a')]['path']){throw new Error('\x27PATH\x27\x20parameter\x20not\x20specified');}if(!_0x2ae181['query']['port']){throw new Error('\x27PORT\x27\x20parameter\x20not\x20specified');}var _0x49181b=_0x2ae181[_0x4c9e('0x3a')][_0x4c9e('0x9e')]?_0x2ae181['query'][_0x4c9e('0x9e')]+':'+_0x2ae181[_0x4c9e('0x3a')]['port']:_0x4c9e('0x9f')+_0x2ae181[_0x4c9e('0x3a')][_0x4c9e('0xa0')];var _0x18e438=_0x2ae181[_0x4c9e('0x3a')][_0x4c9e('0x23')]?_0x2ae181[_0x4c9e('0x3a')][_0x4c9e('0x23')]:!![];var _0x465360=_0x2ae181['query'][_0x4c9e('0xa1')]?_0x2ae181[_0x4c9e('0x3a')]['encoding']:null;var _0x1afc92={'method':_0x2ae181['method'],'uri':util['format'](_0x4c9e('0xa2'),_0x49181b,_0x2ae181[_0x4c9e('0x3a')][_0x4c9e('0x8')]),'json':_0x18e438,'resolveWithFullResponse':!![],'encoding':_0x465360,'qs':_0x2ae181[_0x4c9e('0x3a')]};if(_0x2ae181[_0x4c9e('0xa3')]){_0x1afc92[_0x4c9e('0xa3')]=_0x2ae181['headers'];if(_0x1afc92[_0x4c9e('0xa3')][_0x4c9e('0xa4')]){delete _0x1afc92[_0x4c9e('0xa3')][_0x4c9e('0xa4')];}}if(_0x1afc92[_0x4c9e('0xa3')][_0x4c9e('0xa5')]){delete _0x1afc92[_0x4c9e('0xa3')][_0x4c9e('0xa5')];}return rp(_0x1afc92);})['then'](function(_0x1ecf29){if(_0x1ecf29){_0x1eb183[_0x4c9e('0xa6')](_0x1ecf29['headers']);logger[_0x4c9e('0x68')](_0x1ecf29[_0x4c9e('0x93')]);if(_['endsWith'](_0x2ae181[_0x4c9e('0x3a')][_0x4c9e('0x8')],_0x4c9e('0x50'))&&_0x1ecf29[_0x4c9e('0xa7')]==0x1f4){return _0x1eb183[_0x4c9e('0x20')](_0x1ecf29[_0x4c9e('0xa7')]);}else{return _0x1eb183['status'](_0x1ecf29[_0x4c9e('0xa7')])['send'](_0x1ecf29['body']);}}else{return _0x1eb183[_0x4c9e('0x20')](0xc8);}})[_0x4c9e('0x4f')](handleError(_0x1eb183,null));};exports[_0x4c9e('0xa8')]=function(_0x444f71,_0x42a536,_0x35e944){return BPromise[_0x4c9e('0x9d')]()[_0x4c9e('0x2a')](function(){if(!_0x444f71[_0x4c9e('0x3a')]['path']){throw new Error(_0x4c9e('0xa9'));}if(!_0x444f71[_0x4c9e('0x3a')][_0x4c9e('0xa0')]){throw new Error('\x27PORT\x27\x20parameter\x20not\x20specified');}var _0xda6487=_0x444f71[_0x4c9e('0x3a')][_0x4c9e('0x9e')]?_0x444f71[_0x4c9e('0x3a')][_0x4c9e('0x9e')]+':'+_0x444f71[_0x4c9e('0x3a')][_0x4c9e('0xa0')]:_0x4c9e('0x9f')+_0x444f71[_0x4c9e('0x3a')]['port'];var _0x584bbe=_0x444f71[_0x4c9e('0x3a')][_0x4c9e('0x23')]?_0x444f71[_0x4c9e('0x3a')][_0x4c9e('0x23')]:!![];var _0x5da11d=_0x444f71[_0x4c9e('0x3a')][_0x4c9e('0xa1')]?_0x444f71[_0x4c9e('0x3a')][_0x4c9e('0xa1')]:null;var _0x275d2e={'method':_0x444f71[_0x4c9e('0xaa')],'uri':util[_0x4c9e('0x53')](_0x4c9e('0xa2'),_0xda6487,_0x444f71[_0x4c9e('0x3a')][_0x4c9e('0x8')]),'json':_0x584bbe,'resolveWithFullResponse':!![],'encoding':_0x5da11d,'body':_0x444f71[_0x4c9e('0x93')]};if(_0x444f71[_0x4c9e('0xa3')]){_0x275d2e[_0x4c9e('0xa3')]=_0x444f71[_0x4c9e('0xa3')];if(_0x275d2e[_0x4c9e('0xa3')][_0x4c9e('0xa4')]){delete _0x275d2e[_0x4c9e('0xa3')][_0x4c9e('0xa4')];}}if(_0x275d2e[_0x4c9e('0xa3')][_0x4c9e('0xa5')]){delete _0x275d2e[_0x4c9e('0xa3')][_0x4c9e('0xa5')];}return rp(_0x275d2e);})['then'](function(_0x36ce3b){if(_0x36ce3b){_0x42a536[_0x4c9e('0xa6')](_0x36ce3b[_0x4c9e('0xa3')]);logger[_0x4c9e('0x68')](_0x36ce3b[_0x4c9e('0x93')]);return _0x42a536[_0x4c9e('0x21')](_0x36ce3b['statusCode'])[_0x4c9e('0x31')](_0x36ce3b[_0x4c9e('0x93')]);}else{return _0x42a536[_0x4c9e('0x20')](0xc8);}})[_0x4c9e('0x4f')](handleError(_0x42a536,null));};
\ No newline at end of file
index 1805f28..d0d3933 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfd6e=['save','update','emit','hasOwnProperty','hook','exports','events','Plugin'];(function(_0xa1e3e3,_0x29fe0e){var _0xc980e9=function(_0x1f5adc){while(--_0x1f5adc){_0xa1e3e3['push'](_0xa1e3e3['shift']());}};_0xc980e9(++_0x29fe0e);}(_0xfd6e,0x16e));var _0xefd6=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0xfd6e[_0x2641f9];return _0x585741;};'use strict';var EventEmitter=require(_0xefd6('0x0'));var Plugin=require('../../mysqldb')['db'][_0xefd6('0x1')];var PluginEvents=new EventEmitter();PluginEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xefd6('0x2'),'afterUpdate':_0xefd6('0x3'),'afterDestroy':'remove'};function emitEvent(_0x4a87f5){return function(_0x5f4c49,_0x27d881,_0x54da40){PluginEvents['emit'](_0x4a87f5+':'+_0x5f4c49['id'],_0x5f4c49);PluginEvents[_0xefd6('0x4')](_0x4a87f5,_0x5f4c49);_0x54da40(null);};}for(var e in events){if(events[_0xefd6('0x5')](e)){var event=events[e];Plugin[_0xefd6('0x6')](e,emitEvent(event));}}module[_0xefd6('0x7')]=PluginEvents;
\ No newline at end of file
+var _0x4af9=['hasOwnProperty','hook','exports','events','../../mysqldb','save','update','remove','emit'];(function(_0x550c7d,_0x51b189){var _0x322722=function(_0x357025){while(--_0x357025){_0x550c7d['push'](_0x550c7d['shift']());}};_0x322722(++_0x51b189);}(_0x4af9,0x12c));var _0x94af=function(_0x3bf83f,_0x181cac){_0x3bf83f=_0x3bf83f-0x0;var _0x22c4a9=_0x4af9[_0x3bf83f];return _0x22c4a9;};'use strict';var EventEmitter=require(_0x94af('0x0'));var Plugin=require(_0x94af('0x1'))['db']['Plugin'];var PluginEvents=new EventEmitter();PluginEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x94af('0x2'),'afterUpdate':_0x94af('0x3'),'afterDestroy':_0x94af('0x4')};function emitEvent(_0x2a6642){return function(_0x1362cc,_0x14d407,_0x1a548e){PluginEvents['emit'](_0x2a6642+':'+_0x1362cc['id'],_0x1362cc);PluginEvents[_0x94af('0x5')](_0x2a6642,_0x1362cc);_0x1a548e(null);};}for(var e in events){if(events[_0x94af('0x6')](e)){var event=events[e];Plugin[_0x94af('0x7')](e,emitEvent(event));}}module[_0x94af('0x8')]=PluginEvents;
\ No newline at end of file
index 0c813c1..655c109 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5da4=['bluebird','path','../../config/environment','./plugin.attributes','exports','define','Plugin','plugins','lodash','util','../../config/logger','api','moment'];(function(_0x1934a9,_0x4c2f22){var _0x1b80a8=function(_0x3fd0e9){while(--_0x3fd0e9){_0x1934a9['push'](_0x1934a9['shift']());}};_0x1b80a8(++_0x4c2f22);}(_0x5da4,0x174));var _0x45da=function(_0x397e5f,_0x454c8f){_0x397e5f=_0x397e5f-0x0;var _0x5302b8=_0x5da4[_0x397e5f];return _0x5302b8;};'use strict';var _=require(_0x45da('0x0'));var util=require(_0x45da('0x1'));var logger=require(_0x45da('0x2'))(_0x45da('0x3'));var moment=require(_0x45da('0x4'));var BPromise=require(_0x45da('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x45da('0x6'));var rimraf=require('rimraf');var config=require(_0x45da('0x7'));var attributes=require(_0x45da('0x8'));module[_0x45da('0x9')]=function(_0x41ecc4,_0x1025e7){return _0x41ecc4[_0x45da('0xa')](_0x45da('0xb'),attributes,{'tableName':_0x45da('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xab1d=['exports','define','Plugin','plugins','lodash','util','../../config/logger','api','bluebird','request-promise','rimraf','./plugin.attributes'];(function(_0x205e6a,_0xfa8d0d){var _0x330d5c=function(_0x1856c5){while(--_0x1856c5){_0x205e6a['push'](_0x205e6a['shift']());}};_0x330d5c(++_0xfa8d0d);}(_0xab1d,0x130));var _0xdab1=function(_0x329982,_0x7db665){_0x329982=_0x329982-0x0;var _0x265562=_0xab1d[_0x329982];return _0x265562;};'use strict';var _=require(_0xdab1('0x0'));var util=require(_0xdab1('0x1'));var logger=require(_0xdab1('0x2'))(_0xdab1('0x3'));var moment=require('moment');var BPromise=require(_0xdab1('0x4'));var rp=require(_0xdab1('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xdab1('0x6'));var config=require('../../config/environment');var attributes=require(_0xdab1('0x7'));module[_0xdab1('0x8')]=function(_0x220554,_0xd0382a){return _0x220554[_0xdab1('0x9')](_0xdab1('0xa'),attributes,{'tableName':_0xdab1('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 08b7c8c..556aa2d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xae2b=['Plugin','create','options','raw','then','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','redis','./plugin.socket','register','Plugin,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','info','result','CreatePlugin'];(function(_0x194500,_0x275ba4){var _0x25c901=function(_0x3757f1){while(--_0x3757f1){_0x194500['push'](_0x194500['shift']());}};_0x25c901(++_0x275ba4);}(_0xae2b,0xb3));var _0xbae2=function(_0x9e08c8,_0x4ebe76){_0x9e08c8=_0x9e08c8-0x0;var _0x5628c3=_0xae2b[_0x9e08c8];return _0x5628c3;};'use strict';var _=require(_0xbae2('0x0'));var util=require(_0xbae2('0x1'));var moment=require('moment');var BPromise=require(_0xbae2('0x2'));var rs=require(_0xbae2('0x3'));var fs=require('fs');var Redis=require(_0xbae2('0x4'));var db=require(_0xbae2('0x5'))['db'];var utils=require(_0xbae2('0x6'));var logger=require(_0xbae2('0x7'))('rpc');var config=require(_0xbae2('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xbae2('0x9')][_0xbae2('0xa')]({'port':0x232a});config[_0xbae2('0xb')]=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xbae2('0xb')]));require(_0xbae2('0xc'))[_0xbae2('0xd')](socket);function respondWithRpcPromise(_0xf470fd,_0x27ea94,_0x193185){return new BPromise(function(_0x843207,_0x5a6d1f){return client['request'](_0xf470fd,_0x193185)['then'](function(_0x2087ed){logger['info'](_0xbae2('0xe'),_0x27ea94,_0xbae2('0xf'));logger[_0xbae2('0x10')]('Plugin,\x20%s,\x20%s,\x20%s',_0x27ea94,_0xbae2('0xf'),JSON[_0xbae2('0x11')](_0x2087ed));if(_0x2087ed['error']){if(_0x2087ed[_0xbae2('0x12')][_0xbae2('0x13')]===0x1f4){logger[_0xbae2('0x12')](_0xbae2('0xe'),_0x27ea94,_0x2087ed[_0xbae2('0x12')][_0xbae2('0x14')]);return _0x5a6d1f(_0x2087ed[_0xbae2('0x12')]['message']);}logger[_0xbae2('0x12')]('Plugin,\x20%s,\x20%s',_0x27ea94,_0x2087ed[_0xbae2('0x12')][_0xbae2('0x14')]);return _0x843207(_0x2087ed['error'][_0xbae2('0x14')]);}else{logger[_0xbae2('0x15')]('Plugin,\x20%s,\x20%s',_0x27ea94,_0xbae2('0xf'));_0x843207(_0x2087ed[_0xbae2('0x16')][_0xbae2('0x14')]);}})['catch'](function(_0x21c9fa){logger['error']('Plugin,\x20%s,\x20%s',_0x27ea94,_0x21c9fa);_0x5a6d1f(_0x21c9fa);});});}exports[_0xbae2('0x17')]=function(_0x2c40ea){var _0x114fbe=this;return new Promise(function(_0x17433d,_0x53b581){return db[_0xbae2('0x18')][_0xbae2('0x19')](_0x2c40ea['body'],{'raw':_0x2c40ea['options']?_0x2c40ea[_0xbae2('0x1a')][_0xbae2('0x1b')]===undefined?!![]:![]:!![]})[_0xbae2('0x1c')](function(_0x1b9b24){logger[_0xbae2('0x15')]('CreatePlugin',_0x2c40ea);logger['debug'](_0xbae2('0x17'),_0x2c40ea,JSON[_0xbae2('0x11')](_0x1b9b24));_0x17433d(_0x1b9b24);})['catch'](function(_0x2f1da9){logger[_0xbae2('0x12')](_0xbae2('0x17'),_0x2f1da9[_0xbae2('0x14')],_0x2c40ea);_0x53b581(_0x114fbe['error'](0x1f4,_0x2f1da9[_0xbae2('0x14')]));});});};
\ No newline at end of file
+var _0x8138=['code','message','result','catch','CreatePlugin','Plugin','create','body','options','raw','debug','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','client','http','localhost','socket.io-emitter','./plugin.socket','register','request','then','info','Plugin,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0xfe2951,_0x383c6a){var _0x279db8=function(_0x150beb){while(--_0x150beb){_0xfe2951['push'](_0xfe2951['shift']());}};_0x279db8(++_0x383c6a);}(_0x8138,0x155));var _0x8813=function(_0x1da527,_0x2dc953){_0x1da527=_0x1da527-0x0;var _0x40fc7c=_0x8138[_0x1da527];return _0x40fc7c;};'use strict';var _=require(_0x8813('0x0'));var util=require(_0x8813('0x1'));var moment=require(_0x8813('0x2'));var BPromise=require('bluebird');var rs=require(_0x8813('0x3'));var fs=require('fs');var Redis=require(_0x8813('0x4'));var db=require(_0x8813('0x5'))['db'];var utils=require(_0x8813('0x6'));var logger=require(_0x8813('0x7'))('rpc');var config=require('../../config/environment');var jayson=require(_0x8813('0x8'));var client=jayson[_0x8813('0x9')][_0x8813('0xa')]({'port':0x232a});config['redis']=_['defaults'](config['redis'],{'host':_0x8813('0xb'),'port':0x18eb});var socket=require(_0x8813('0xc'))(new Redis(config['redis']));require(_0x8813('0xd'))[_0x8813('0xe')](socket);function respondWithRpcPromise(_0x37733f,_0x5c94da,_0x519cab){return new BPromise(function(_0x587fa8,_0x5bb1be){return client[_0x8813('0xf')](_0x37733f,_0x519cab)[_0x8813('0x10')](function(_0x2517db){logger[_0x8813('0x11')](_0x8813('0x12'),_0x5c94da,_0x8813('0x13'));logger['debug']('Plugin,\x20%s,\x20%s,\x20%s',_0x5c94da,_0x8813('0x13'),JSON[_0x8813('0x14')](_0x2517db));if(_0x2517db[_0x8813('0x15')]){if(_0x2517db[_0x8813('0x15')][_0x8813('0x16')]===0x1f4){logger[_0x8813('0x15')](_0x8813('0x12'),_0x5c94da,_0x2517db['error'][_0x8813('0x17')]);return _0x5bb1be(_0x2517db['error'][_0x8813('0x17')]);}logger[_0x8813('0x15')](_0x8813('0x12'),_0x5c94da,_0x2517db[_0x8813('0x15')]['message']);return _0x587fa8(_0x2517db[_0x8813('0x15')]['message']);}else{logger['info']('Plugin,\x20%s,\x20%s',_0x5c94da,_0x8813('0x13'));_0x587fa8(_0x2517db[_0x8813('0x18')]['message']);}})[_0x8813('0x19')](function(_0x4e89a5){logger[_0x8813('0x15')](_0x8813('0x12'),_0x5c94da,_0x4e89a5);_0x5bb1be(_0x4e89a5);});});}exports[_0x8813('0x1a')]=function(_0x556f8d){var _0x421d95=this;return new Promise(function(_0x1eeaa9,_0x4358ce){return db[_0x8813('0x1b')][_0x8813('0x1c')](_0x556f8d[_0x8813('0x1d')],{'raw':_0x556f8d[_0x8813('0x1e')]?_0x556f8d['options'][_0x8813('0x1f')]===undefined?!![]:![]:!![]})[_0x8813('0x10')](function(_0xea0532){logger[_0x8813('0x11')](_0x8813('0x1a'),_0x556f8d);logger[_0x8813('0x20')](_0x8813('0x1a'),_0x556f8d,JSON[_0x8813('0x14')](_0xea0532));_0x1eeaa9(_0xea0532);})[_0x8813('0x19')](function(_0x22388f){logger[_0x8813('0x15')](_0x8813('0x1a'),_0x22388f[_0x8813('0x17')],_0x556f8d);_0x4358ce(_0x421d95[_0x8813('0x15')](0x1f4,_0x22388f[_0x8813('0x17')]));});});};
\ No newline at end of file
index 201cde9..8458f83 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x123a=['register','length','plugin:','./plugin.events','update','emit','removeListener'];(function(_0x38cd1a,_0xfd5008){var _0x43b6ce=function(_0xd25289){while(--_0xd25289){_0x38cd1a['push'](_0x38cd1a['shift']());}};_0x43b6ce(++_0xfd5008);}(_0x123a,0x14c));var _0xa123=function(_0x5d0772,_0xca6ec4){_0x5d0772=_0x5d0772-0x0;var _0xde4b2e=_0x123a[_0x5d0772];return _0xde4b2e;};'use strict';var PluginEvents=require(_0xa123('0x0'));var events=['save','remove',_0xa123('0x1')];function createListener(_0x3ab3d9,_0x5b5ae3){return function(_0x1e7a43){_0x5b5ae3[_0xa123('0x2')](_0x3ab3d9,_0x1e7a43);};}function removeListener(_0x5c4438,_0x52351f){return function(){PluginEvents[_0xa123('0x3')](_0x5c4438,_0x52351f);};}exports[_0xa123('0x4')]=function(_0x1dc211){for(var _0x3a6864=0x0,_0x485d0e=events[_0xa123('0x5')];_0x3a6864<_0x485d0e;_0x3a6864++){var _0x3ef21a=events[_0x3a6864];var _0x17b4e3=createListener(_0xa123('0x6')+_0x3ef21a,_0x1dc211);PluginEvents['on'](_0x3ef21a,_0x17b4e3);}};
\ No newline at end of file
+var _0xd96b=['plugin:','./plugin.events','save','emit','removeListener','register'];(function(_0x3abee2,_0x4a21c4){var _0x5031bf=function(_0x1c38a3){while(--_0x1c38a3){_0x3abee2['push'](_0x3abee2['shift']());}};_0x5031bf(++_0x4a21c4);}(_0xd96b,0x127));var _0xbd96=function(_0x520d95,_0x5d6895){_0x520d95=_0x520d95-0x0;var _0x7e0c24=_0xd96b[_0x520d95];return _0x7e0c24;};'use strict';var PluginEvents=require(_0xbd96('0x0'));var events=[_0xbd96('0x1'),'remove','update'];function createListener(_0xcab14d,_0x3c99c5){return function(_0x5cad7e){_0x3c99c5[_0xbd96('0x2')](_0xcab14d,_0x5cad7e);};}function removeListener(_0x354ba7,_0x270894){return function(){PluginEvents[_0xbd96('0x3')](_0x354ba7,_0x270894);};}exports[_0xbd96('0x4')]=function(_0x3382c1){for(var _0x4b1199=0x0,_0x1cc5be=events['length'];_0x4b1199<_0x1cc5be;_0x4b1199++){var _0x599622=events[_0x4b1199];var _0x457112=createListener(_0xbd96('0x5')+_0x599622,_0x3382c1);PluginEvents['on'](_0x599622,_0x457112);}};
\ No newline at end of file
index b867d7c..b24c4f2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['create','put','delete','destroy','exports','express','Router','../../components/auth/service','isAuthenticated','get','/:id','show','post'];(function(_0x352108,_0xb5cdc3){var _0x2c901c=function(_0x4e0a61){while(--_0x4e0a61){_0x352108['push'](_0x352108['shift']());}};_0x2c901c(++_0xb5cdc3);}(_0xa9e0,0x123));var _0x0a9e=function(_0xf50820,_0x56f041){_0xf50820=_0xf50820-0x0;var _0x2a9b10=_0xa9e0[_0xf50820];return _0x2a9b10;};'use strict';var express=require(_0x0a9e('0x0'));var router=express[_0x0a9e('0x1')]();var auth=require(_0x0a9e('0x2'));var controller=require('./pm2.controller');router['get']('/',auth[_0x0a9e('0x3')](),controller['index']);router[_0x0a9e('0x4')](_0x0a9e('0x5'),auth[_0x0a9e('0x3')](),controller[_0x0a9e('0x6')]);router[_0x0a9e('0x7')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x8')]);router[_0x0a9e('0x9')](_0x0a9e('0x5'),auth['isAuthenticated'](),controller['update']);router[_0x0a9e('0xa')]('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);module[_0x0a9e('0xc')]=router;
\ No newline at end of file
+var _0xa9e0=['create','put','delete','destroy','exports','express','Router','../../components/auth/service','isAuthenticated','get','/:id','show','post'];(function(_0x286dbb,_0x106444){var _0x21ad93=function(_0xa59160){while(--_0xa59160){_0x286dbb['push'](_0x286dbb['shift']());}};_0x21ad93(++_0x106444);}(_0xa9e0,0x123));var _0x0a9e=function(_0x139a3c,_0x4fc883){_0x139a3c=_0x139a3c-0x0;var _0x2b375b=_0xa9e0[_0x139a3c];return _0x2b375b;};'use strict';var express=require(_0x0a9e('0x0'));var router=express[_0x0a9e('0x1')]();var auth=require(_0x0a9e('0x2'));var controller=require('./pm2.controller');router['get']('/',auth[_0x0a9e('0x3')](),controller['index']);router[_0x0a9e('0x4')](_0x0a9e('0x5'),auth[_0x0a9e('0x3')](),controller[_0x0a9e('0x6')]);router[_0x0a9e('0x7')]('/',auth['isAuthenticated'](),controller[_0x0a9e('0x8')]);router[_0x0a9e('0x9')](_0x0a9e('0x5'),auth['isAuthenticated'](),controller['update']);router[_0x0a9e('0xa')]('/:id',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);module[_0x0a9e('0xc')]=router;
\ No newline at end of file
index 184302c..8f0c0da 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb4e6=['express','motion2','length','describe','params','catch','create','body','script','join','cwd','chdir','dirname','dump','update','restart','hasOwnProperty','Unknown\x20status','delete','lodash','../../config/logger','api','path','child_process','exec','bluebird','sendStatus','error','stack','name','status','send','npm\x20install','info','index','then','reject'];(function(_0xa3e7e,_0x4a4d80){var _0x50fbb2=function(_0x3a9cb8){while(--_0x3a9cb8){_0xa3e7e['push'](_0xa3e7e['shift']());}};_0x50fbb2(++_0x4a4d80);}(_0xb4e6,0x1f4));var _0x6b4e=function(_0x3a8db5,_0x31cff7){_0x3a8db5=_0x3a8db5-0x0;var _0x2c03cd=_0xb4e6[_0x3a8db5];return _0x2c03cd;};'use strict';var _=require(_0x6b4e('0x0'));var pm2=require('../../config/pm2');var logger=require(_0x6b4e('0x1'))(_0x6b4e('0x2'));var path=require(_0x6b4e('0x3'));var exec=require(_0x6b4e('0x4'))[_0x6b4e('0x5')];var BPromise=require(_0x6b4e('0x6'));function handleEntityNotFound(_0x1929b8,_0x52313b){return function(_0x40da90){if(!_0x40da90){_0x1929b8[_0x6b4e('0x7')](0x194);;}return _0x40da90;};}function respondWithResult(_0x1f67a2,_0x49de51){_0x49de51=_0x49de51||0xc8;return function(_0xd3138f){if(_0xd3138f){return _0x1f67a2['status'](_0x49de51)['json'](_0xd3138f);}return null;};}function handleError(_0x2311d9,_0x48c870){_0x48c870=_0x48c870||0x1f4;return function(_0x53a71f){logger[_0x6b4e('0x8')](_0x53a71f[_0x6b4e('0x9')]);if(_0x53a71f[_0x6b4e('0xa')]){delete _0x53a71f[_0x6b4e('0xa')];}_0x2311d9[_0x6b4e('0xb')](_0x48c870)[_0x6b4e('0xc')](_0x53a71f);};}function execChildProcess(){return new BPromise(function(_0x323487,_0x49c734){exec(_0x6b4e('0xd'),function(_0x3bba86,_0x58c67d,_0x2a4d0f){logger[_0x6b4e('0xe')](_0x58c67d);logger[_0x6b4e('0xe')](_0x2a4d0f);if(_0x3bba86){logger[_0x6b4e('0x8')](_0x3bba86);return _0x49c734(_0x3bba86);}return _0x323487(_0x58c67d);});});}exports[_0x6b4e('0xf')]=function(_0xa3d358,_0x1db513){return pm2['list']()[_0x6b4e('0x10')](function(_0x29bdee){if(_0x29bdee){var _0x4788cf=_[_0x6b4e('0x11')](_0x29bdee,function(_0x4b62ad){return _0x4b62ad[_0x6b4e('0xa')]===_0x6b4e('0x12')||_0x4b62ad[_0x6b4e('0xa')]===_0x6b4e('0x13');});return{'rows':_0x4788cf,'count':_0x4788cf[_0x6b4e('0x14')]};}return null;})[_0x6b4e('0x10')](respondWithResult(_0x1db513,null))['catch'](handleError(_0x1db513,null));};exports['show']=function(_0x67496d,_0x1beb73){return pm2[_0x6b4e('0x15')](_0x67496d[_0x6b4e('0x16')]['id'])[_0x6b4e('0x10')](respondWithResult(_0x1beb73,null))[_0x6b4e('0x10')](handleEntityNotFound(_0x1beb73,null))[_0x6b4e('0x17')](handleError(_0x1beb73,null));};exports[_0x6b4e('0x18')]=function(_0x35aee1,_0x20a178){if(_0x35aee1[_0x6b4e('0x19')]['name']&&_0x35aee1[_0x6b4e('0x19')][_0x6b4e('0x1a')]){var _0x31fb9d=path[_0x6b4e('0x1b')](__dirname,'../../files/plugins',_0x35aee1[_0x6b4e('0x19')]['script']);var _0x2503a5=process[_0x6b4e('0x1c')]();process[_0x6b4e('0x1d')](path[_0x6b4e('0x1e')](_0x31fb9d));return execChildProcess()[_0x6b4e('0x10')](function(_0x346566){process[_0x6b4e('0x1d')](_0x2503a5);return pm2['start']({'name':_0x35aee1[_0x6b4e('0x19')]['name'],'script':_0x31fb9d});})[_0x6b4e('0x10')](function(_0x884b7e){pm2[_0x6b4e('0x1f')]();return _0x884b7e[0x0];})[_0x6b4e('0x10')](respondWithResult(_0x20a178,0xc9))['catch'](handleError(_0x20a178,null));}else{return _0x20a178[_0x6b4e('0xb')](0x1f4)[_0x6b4e('0xc')]({'message':'Missing\x20name\x20and/or\x20path'});}};exports[_0x6b4e('0x20')]=function(_0x381ff0,_0x3513b2){if(_0x381ff0[_0x6b4e('0x19')]['id']){delete _0x381ff0['body']['id'];}var _0x2d42be={'online':_0x6b4e('0x21'),'stopped':'stop'};if(_0x2d42be[_0x6b4e('0x22')](_0x381ff0[_0x6b4e('0x19')][_0x6b4e('0xb')])){return pm2[_0x2d42be[_0x381ff0[_0x6b4e('0x19')]['status']]](_0x381ff0[_0x6b4e('0x16')]['id'])[_0x6b4e('0x10')](respondWithResult(_0x3513b2,0xc8))['catch'](handleError(_0x3513b2,null));}else{return _0x3513b2[_0x6b4e('0xb')](0x1f4)[_0x6b4e('0xc')]({'message':_0x6b4e('0x23')});}};exports['destroy']=function(_0x5c2200,_0x11156e){if(_0x5c2200[_0x6b4e('0x19')]['id']){delete _0x5c2200[_0x6b4e('0x19')]['id'];}if(_0x5c2200['params']['id']){return pm2[_0x6b4e('0x24')](_0x5c2200[_0x6b4e('0x16')]['id'])[_0x6b4e('0x10')](function(_0x5c1444){pm2['dump']();return _0x5c1444[0x0];})[_0x6b4e('0x10')](respondWithResult(_0x11156e,null))['catch'](handleError(_0x11156e,null));}else{return _0x11156e[_0x6b4e('0xb')](0x1f4)[_0x6b4e('0xc')]({'message':'Unknown\x20id'});}};
\ No newline at end of file
+var _0x54ef=['bluebird','status','error','name','send','npm\x20install','info','index','list','reject','express','motion2','catch','show','describe','params','then','create','script','join','../../files/plugins','body','cwd','chdir','dirname','dump','Missing\x20name\x20and/or\x20path','update','restart','hasOwnProperty','Unknown\x20status','destroy','delete','Unknown\x20id','lodash','../../config/pm2','../../config/logger','path','child_process','exec'];(function(_0x510b98,_0x4c4cbb){var _0x45e775=function(_0x29ec11){while(--_0x29ec11){_0x510b98['push'](_0x510b98['shift']());}};_0x45e775(++_0x4c4cbb);}(_0x54ef,0x112));var _0xf54e=function(_0x20e709,_0x5917ff){_0x20e709=_0x20e709-0x0;var _0x14b9ef=_0x54ef[_0x20e709];return _0x14b9ef;};'use strict';var _=require(_0xf54e('0x0'));var pm2=require(_0xf54e('0x1'));var logger=require(_0xf54e('0x2'))('api');var path=require(_0xf54e('0x3'));var exec=require(_0xf54e('0x4'))[_0xf54e('0x5')];var BPromise=require(_0xf54e('0x6'));function handleEntityNotFound(_0x8b6bb6,_0x431e36){return function(_0x12d43f){if(!_0x12d43f){_0x8b6bb6['sendStatus'](0x194);;}return _0x12d43f;};}function respondWithResult(_0x55e611,_0x18e84e){_0x18e84e=_0x18e84e||0xc8;return function(_0x99cf9){if(_0x99cf9){return _0x55e611[_0xf54e('0x7')](_0x18e84e)['json'](_0x99cf9);}return null;};}function handleError(_0x27e69b,_0x57a1ce){_0x57a1ce=_0x57a1ce||0x1f4;return function(_0x40a75d){logger[_0xf54e('0x8')](_0x40a75d['stack']);if(_0x40a75d[_0xf54e('0x9')]){delete _0x40a75d[_0xf54e('0x9')];}_0x27e69b[_0xf54e('0x7')](_0x57a1ce)[_0xf54e('0xa')](_0x40a75d);};}function execChildProcess(){return new BPromise(function(_0x5f232a,_0x558502){exec(_0xf54e('0xb'),function(_0x143d66,_0x326eef,_0x553759){logger[_0xf54e('0xc')](_0x326eef);logger['info'](_0x553759);if(_0x143d66){logger['error'](_0x143d66);return _0x558502(_0x143d66);}return _0x5f232a(_0x326eef);});});}exports[_0xf54e('0xd')]=function(_0x2033e9,_0x28f776){return pm2[_0xf54e('0xe')]()['then'](function(_0x331732){if(_0x331732){var _0x1bbeaa=_[_0xf54e('0xf')](_0x331732,function(_0x15f639){return _0x15f639['name']===_0xf54e('0x10')||_0x15f639[_0xf54e('0x9')]===_0xf54e('0x11');});return{'rows':_0x1bbeaa,'count':_0x1bbeaa['length']};}return null;})['then'](respondWithResult(_0x28f776,null))[_0xf54e('0x12')](handleError(_0x28f776,null));};exports[_0xf54e('0x13')]=function(_0x1c02e7,_0x9647f){return pm2[_0xf54e('0x14')](_0x1c02e7[_0xf54e('0x15')]['id'])[_0xf54e('0x16')](respondWithResult(_0x9647f,null))[_0xf54e('0x16')](handleEntityNotFound(_0x9647f,null))[_0xf54e('0x12')](handleError(_0x9647f,null));};exports[_0xf54e('0x17')]=function(_0x226c96,_0x50fc66){if(_0x226c96['body'][_0xf54e('0x9')]&&_0x226c96['body'][_0xf54e('0x18')]){var _0x1bfe99=path[_0xf54e('0x19')](__dirname,_0xf54e('0x1a'),_0x226c96[_0xf54e('0x1b')][_0xf54e('0x18')]);var _0x388aa0=process[_0xf54e('0x1c')]();process[_0xf54e('0x1d')](path[_0xf54e('0x1e')](_0x1bfe99));return execChildProcess()[_0xf54e('0x16')](function(_0x5b83df){process[_0xf54e('0x1d')](_0x388aa0);return pm2['start']({'name':_0x226c96[_0xf54e('0x1b')][_0xf54e('0x9')],'script':_0x1bfe99});})[_0xf54e('0x16')](function(_0x474b61){pm2[_0xf54e('0x1f')]();return _0x474b61[0x0];})[_0xf54e('0x16')](respondWithResult(_0x50fc66,0xc9))[_0xf54e('0x12')](handleError(_0x50fc66,null));}else{return _0x50fc66[_0xf54e('0x7')](0x1f4)[_0xf54e('0xa')]({'message':_0xf54e('0x20')});}};exports[_0xf54e('0x21')]=function(_0x39c0ae,_0x2ea001){if(_0x39c0ae['body']['id']){delete _0x39c0ae[_0xf54e('0x1b')]['id'];}var _0x4cbf7c={'online':_0xf54e('0x22'),'stopped':'stop'};if(_0x4cbf7c[_0xf54e('0x23')](_0x39c0ae[_0xf54e('0x1b')][_0xf54e('0x7')])){return pm2[_0x4cbf7c[_0x39c0ae[_0xf54e('0x1b')][_0xf54e('0x7')]]](_0x39c0ae[_0xf54e('0x15')]['id'])[_0xf54e('0x16')](respondWithResult(_0x2ea001,0xc8))['catch'](handleError(_0x2ea001,null));}else{return _0x2ea001['status'](0x1f4)[_0xf54e('0xa')]({'message':_0xf54e('0x24')});}};exports[_0xf54e('0x25')]=function(_0x16d00f,_0xb2d4c4){if(_0x16d00f[_0xf54e('0x1b')]['id']){delete _0x16d00f[_0xf54e('0x1b')]['id'];}if(_0x16d00f[_0xf54e('0x15')]['id']){return pm2[_0xf54e('0x26')](_0x16d00f[_0xf54e('0x15')]['id'])['then'](function(_0x5f29d3){pm2[_0xf54e('0x1f')]();return _0x5f29d3[0x0];})[_0xf54e('0x16')](respondWithResult(_0xb2d4c4,null))['catch'](handleError(_0xb2d4c4,null));}else{return _0xb2d4c4[_0xf54e('0x7')](0x1f4)[_0xf54e('0xa')]({'message':_0xf54e('0x27')});}};
\ No newline at end of file
index e0d813f..3b9aff2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5428=['isAuthenticated','getAgents','/queues','getQueues','exports','express','../../components/auth/service','./realtime.controller','/agents'];(function(_0x8426a0,_0x183ad8){var _0x4f71e3=function(_0x3df1bb){while(--_0x3df1bb){_0x8426a0['push'](_0x8426a0['shift']());}};_0x4f71e3(++_0x183ad8);}(_0x5428,0x9e));var _0x8542=function(_0x1447e9,_0x56d9a2){_0x1447e9=_0x1447e9-0x0;var _0x499e29=_0x5428[_0x1447e9];return _0x499e29;};'use strict';var express=require(_0x8542('0x0'));var router=express['Router']();var auth=require(_0x8542('0x1'));var controller=require(_0x8542('0x2'));router['get'](_0x8542('0x3'),auth[_0x8542('0x4')](),controller[_0x8542('0x5')]);router['get'](_0x8542('0x6'),auth[_0x8542('0x4')](),controller[_0x8542('0x7')]);module[_0x8542('0x8')]=router;
\ No newline at end of file
+var _0xbb0c=['get','/agents','isAuthenticated','getAgents','/queues','getQueues','express','../../components/auth/service','./realtime.controller'];(function(_0x4d593e,_0x131776){var _0x31e2df=function(_0x4787ec){while(--_0x4787ec){_0x4d593e['push'](_0x4d593e['shift']());}};_0x31e2df(++_0x131776);}(_0xbb0c,0x12f));var _0xcbb0=function(_0x2d687a,_0x2e06ee){_0x2d687a=_0x2d687a-0x0;var _0x17e15d=_0xbb0c[_0x2d687a];return _0x17e15d;};'use strict';var express=require(_0xcbb0('0x0'));var router=express['Router']();var auth=require(_0xcbb0('0x1'));var controller=require(_0xcbb0('0x2'));router[_0xcbb0('0x3')](_0xcbb0('0x4'),auth[_0xcbb0('0x5')](),controller[_0xcbb0('0x6')]);router[_0xcbb0('0x3')](_0xcbb0('0x7'),auth[_0xcbb0('0x5')](),controller[_0xcbb0('0x8')]);module['exports']=router;
\ No newline at end of file
index b9bad89..b372cbd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x01e6=['status','set','Content-Range','json','getAgents','query','globalQueueFilter','pause','*pause','resolve','then','channel','isValidChannel','format','sort','globalStatus','getUpdatedSortOptions','fields','join','order','getAgentIdsByQueues','rows','getSortedAgentsIdsByStatus','getAgentIdsByStatus','length','map','User','rawAttributes','type','role','raw','sequelize','literal','forEach','Pause','push','where','merge','user','userProfileId','Agents','agent','online','assign','UserProfile','getResources','findAndCountAll','find','getAgentStatus','includes','talking','voiceStatus','Status','sortAgentsByStatus','getRealtimeAgentsQueryFields','catch','getQueues','toLowerCase','startCase','Queue','key','name','voice','dialActive','dialMethod','QueueCampaigns','Queues','filter','getRealtimeQueues','initializeQueues','lodash','util','../../components/realtime/agents','../../config/utils','../../mysqldb','../../errors/api','APIBadRequestError','handleError','offset','undefined','limit','count'];(function(_0x4377c5,_0x5b49a4){var _0x16bdcf=function(_0x217eff){while(--_0x217eff){_0x4377c5['push'](_0x4377c5['shift']());}};_0x16bdcf(++_0x5b49a4);}(_0x01e6,0x98));var _0x601e=function(_0x37ab34,_0x59efc6){_0x37ab34=_0x37ab34-0x0;var _0x1f8f3f=_0x01e6[_0x37ab34];return _0x1f8f3f;};'use strict';var _=require(_0x601e('0x0'));var util=require(_0x601e('0x1'));var rta=require(_0x601e('0x2'));var rtq=require('../../components/realtime/queues');var qs=require('../../components/parsers/qs');var utils=require(_0x601e('0x3'));var db=require(_0x601e('0x4'))['db'];var APIBadRequestError=require(_0x601e('0x5'))[_0x601e('0x6')];var APIHandleError=require(_0x601e('0x5'))[_0x601e('0x7')];function respondWithFilteredResult(_0x1b30af,_0x167216){return function(_0x5a397d){if(_0x5a397d){var _0x20fc00=typeof _0x167216[_0x601e('0x8')]===_0x601e('0x9')&&typeof _0x167216[_0x601e('0xa')]===_0x601e('0x9');var _0x331b1d=_0x5a397d[_0x601e('0xb')];var _0x595a63=_0x20fc00?0x0:_0x167216[_0x601e('0x8')];var _0x2e898b=_0x20fc00?_0x5a397d['count']:_0x167216['offset']+_0x167216['limit'];var _0x2b86bb;if(_0x2e898b>=_0x331b1d){_0x2e898b=_0x331b1d;_0x2b86bb=0xc8;}else{_0x2b86bb=0xce;}_0x1b30af[_0x601e('0xc')](_0x2b86bb);return _0x1b30af[_0x601e('0xd')](_0x601e('0xe'),_0x595a63+'-'+_0x2e898b+'/'+_0x331b1d)[_0x601e('0xf')](_0x5a397d);}return null;};}exports[_0x601e('0x10')]=function(_0x279dfc,_0x506fbd){var _0xeb9467={'count':0x0,'rows':[]};var _0x23bea4={};var _0x271c6e;var _0x4894ca=utils['getChannels']();var _0x21003d;var _0x34b6f0;var _0x5bb8ed=_0x279dfc[_0x601e('0x11')][_0x601e('0x12')];var _0xf2a46b=_0x279dfc['query']['globalStatusFilter'];var _0x580643=_0x279dfc[_0x601e('0x11')]['pauseTypeFilter'];var _0x38b01d=_0xf2a46b===_0x601e('0x13')||_0xf2a46b===_0x601e('0x14')?!![]:![];var _0x131c73=[];var _0x276420;var _0x3bb3c0;Promise[_0x601e('0x15')]()[_0x601e('0x16')](function(){if(_0x279dfc['query'][_0x601e('0x17')]){if(!utils[_0x601e('0x18')](_0x279dfc[_0x601e('0x11')]['channel'])){throw new APIBadRequestError(util[_0x601e('0x19')]('Channel\x20parameter\x20%s\x20is\x20invalid',_0x279dfc[_0x601e('0x11')][_0x601e('0x17')]));}_0x271c6e=_0x279dfc[_0x601e('0x11')][_0x601e('0x17')]['toLowerCase']();}if(!_0x279dfc[_0x601e('0x11')][_0x601e('0x1a')]||!_0x279dfc[_0x601e('0x11')][_0x601e('0x1a')]['includes'](_0x601e('0x1b'))){_0x279dfc[_0x601e('0x11')][_0x601e('0x1a')]=rta['validateSortParameter'](_0x279dfc[_0x601e('0x11')][_0x601e('0x1a')]);return;}var _0x56e2c4=rta[_0x601e('0x1c')](_0x279dfc['query']['sort']);_0x279dfc[_0x601e('0x11')][_0x601e('0x1a')]=_0x56e2c4[_0x601e('0x1d')][_0x601e('0x1e')](',');_0x276420=_0x56e2c4[_0x601e('0x1f')];})[_0x601e('0x16')](function(){if(!_0x5bb8ed){return[];}return rta[_0x601e('0x20')](_0x5bb8ed,_0x271c6e);})['then'](function(_0x34e537){_0x131c73=_0x34e537;return rta['getRealtimeAgents']();})[_0x601e('0x16')](function(_0x5a1f3b){_0x34b6f0=_0x5a1f3b[_0x601e('0x21')];if((!_0xf2a46b||_0x38b01d)&&!_0x276420){return _0x131c73;}if(_0x276420&&!_0xf2a46b){return rta[_0x601e('0x22')](_0x34b6f0,_0x131c73,_0x276420);}else{return rta[_0x601e('0x23')](_0x34b6f0,_0x131c73,_0xf2a46b);}})[_0x601e('0x16')](function(_0xe782e4){_0x131c73=_0xe782e4;var _0x9dd810=![];if(_0x131c73[_0x601e('0x24')]===0x0){if(_0x5bb8ed||_0xf2a46b){_0x9dd810=!![];}if(_0x38b01d){_0x9dd810=![];}}if(_0x9dd810){return _0xeb9467;}var _0x48fd92=_[_0x601e('0x25')](db[_0x601e('0x26')][_0x601e('0x27')],function(_0x2d8f37){return{'name':_0x2d8f37['fieldName'],'type':_0x2d8f37[_0x601e('0x28')]['key']};});_0x279dfc['query'][_0x601e('0x29')]='agent';_0x23bea4=qs['getOptions'](_0x48fd92,_0x279dfc);_0x23bea4[_0x601e('0x2a')]=!![];var _0x21d3dd=[];if(_0x131c73[_0x601e('0x24')]>0x0){_0x21d3dd['push']({'id':{'$in':_0x131c73}});if(_0x276420&&!_0xf2a46b){_0x3bb3c0=[db[_0x601e('0x2b')][_0x601e('0x2c')]('FIELD(id,'+_0x131c73+')')];_0x23bea4[_0x601e('0x1f')]=_0x3bb3c0;}}if(_0x38b01d){_0x4894ca[_0x601e('0x2d')](function(_0xa12b4d){var _0x16d17c=!![];if(_0xf2a46b==='*pause'&&_0x271c6e!==_0xa12b4d){_0x16d17c=![];}_0x21d3dd['push']({[_0xa12b4d+_0x601e('0x2e')]:_0x16d17c});});if(_0x580643){_0x21d3dd['push']({'pauseType':_0x580643});}}else if(_0xf2a46b){_0x4894ca['forEach'](function(_0x51d067){_0x21d3dd[_0x601e('0x2f')]({[_0x51d067+_0x601e('0x2e')]:![]});});}_0x23bea4[_0x601e('0x30')]=_[_0x601e('0x31')](_0x23bea4[_0x601e('0x30')],{'$and':_0x21d3dd});if(_0x279dfc[_0x601e('0x32')][_0x601e('0x29')]===_0x601e('0x32')){var _0x7d2cbb={'params':{'id':_0x279dfc['user'][_0x601e('0x33')]},'query':{'section':_0x601e('0x34'),'role':_0x601e('0x35'),'raw':!![],'ids':_0x131c73,'customSorting':_0x3bb3c0}};if(_0x279dfc[_0x601e('0x11')][_0x601e('0x36')]){_0x7d2cbb[_0x601e('0x11')][_0x601e('0x36')]=!![];}if(_0x38b01d){_0x7d2cbb[_0x601e('0x11')]['extraQueryConditions']=_0x21d3dd;}_0x7d2cbb['query']=Object[_0x601e('0x37')](_0x7d2cbb[_0x601e('0x11')],_0x279dfc[_0x601e('0x11')]);return db[_0x601e('0x38')][_0x601e('0x39')](_0x7d2cbb);}return db[_0x601e('0x26')][_0x601e('0x3a')](_0x23bea4);})[_0x601e('0x16')](function(_0x2fbb43){_0xeb9467[_0x601e('0xb')]=_0x2fbb43[_0x601e('0xb')];_0x21003d=_0x2fbb43[_0x601e('0x21')];return _0x21003d['map'](function(_0x4f477b){var _0x26e47c=_[_0x601e('0x3b')](_0x34b6f0,['id',_0x4f477b['id']]);if(_0x26e47c){var _0xb30a3c=rta['filterAgentAttributes'](_0x26e47c);_['merge'](_0x4f477b,_0xb30a3c);}_0x4f477b[_0x601e('0x1b')]=rta[_0x601e('0x3c')](_0x4f477b);if(_0x4f477b['globalStatus'][_0x601e('0x3d')](_0x601e('0x13'))){_0x4894ca['forEach'](function(_0xc88cd5){if(_0x4f477b[_0xc88cd5+_0x601e('0x2e')]){if(_0xc88cd5==='voice'){if(_0x4f477b['voiceStatus']!==_0x601e('0x3e')){_0x4f477b[_0x601e('0x3f')]=_0x601e('0x13');}}else{_0x4f477b[_0xc88cd5+_0x601e('0x40')]=_0x601e('0x13');}}});}return _0x4f477b;});})[_0x601e('0x16')](function(_0x32dc49){if(!_0x276420||_0x3bb3c0){return _0x32dc49;}return rta[_0x601e('0x41')](_0x32dc49,_0x276420);})['then'](function(_0x2b5c4c){var _0x4257d1=rta[_0x601e('0x42')]();_0xeb9467['rows']=_0x2b5c4c['map'](function(_0xa4aa6d){return _['pick'](_0xa4aa6d,_0x4257d1);});return _0xeb9467;})[_0x601e('0x16')](respondWithFilteredResult(_0x506fbd,_0x23bea4))[_0x601e('0x43')](APIHandleError(_0x506fbd));};exports[_0x601e('0x44')]=function(_0x1f479a,_0x46111a){var _0x3113a5={'count':0x0,'rows':[]};var _0x1eadea={};var _0x49c838;var _0x25ab37;var _0x240fe7;Promise['resolve']()[_0x601e('0x16')](function(){if(_0x1f479a[_0x601e('0x11')][_0x601e('0x17')]){if(!utils['isValidChannel'](_0x1f479a[_0x601e('0x11')][_0x601e('0x17')])){throw new APIBadRequestError(util[_0x601e('0x19')]('Channel\x20parameter\x20%s\x20is\x20invalid',_0x1f479a['query'][_0x601e('0x17')]));}_0x49c838=_0x1f479a['query'][_0x601e('0x17')][_0x601e('0x45')]();}var _0x409b58=_[_0x601e('0x46')](_0x49c838)+_0x601e('0x47');var _0x5bf732=_['map'](db[_0x409b58][_0x601e('0x27')],function(_0x5f4997){return{'name':_0x5f4997['fieldName'],'type':_0x5f4997[_0x601e('0x28')][_0x601e('0x48')]};});if(!_0x1f479a['query'][_0x601e('0x1d')]){var _0x4adcc2=['id',_0x601e('0x49')];if(_0x49c838===_0x601e('0x4a')){_0x4adcc2[_0x601e('0x2f')]('type');if(_0x1f479a[_0x601e('0x11')][_0x601e('0x28')]==='outbound'){_0x4adcc2['push']([_0x601e('0x4b'),_0x601e('0x4c')]);}}_0x1f479a[_0x601e('0x11')][_0x601e('0x1d')]=_0x4adcc2['join'](',');}_0x1eadea=qs['getOptions'](_0x5bf732,_0x1f479a);if(_0x1f479a[_0x601e('0x32')]['role']==='user'){var _0x3bc1b1={'params':{'id':_0x1f479a[_0x601e('0x32')][_0x601e('0x33')]},'query':{'section':_0x49c838===_0x601e('0x4a')&&_0x1f479a[_0x601e('0x11')][_0x601e('0x28')]==='outbound'?_0x601e('0x4d'):_[_0x601e('0x46')](_0x49c838)+_0x601e('0x4e'),'type':_0x1f479a['query']['type'],'nolimit':!![],'sort':_0x601e('0x49'),'filter':_0x1f479a['query'][_0x601e('0x4f')]}};_0x3bc1b1['query']=Object[_0x601e('0x37')](_0x3bc1b1[_0x601e('0x11')],_0x1f479a[_0x601e('0x11')]);delete _0x3bc1b1['query']['id'];return db[_0x601e('0x38')][_0x601e('0x39')](_0x3bc1b1);}return db[_0x409b58][_0x601e('0x3a')](_0x1eadea);})[_0x601e('0x16')](function(_0x620e8e){_0x3113a5[_0x601e('0xb')]=_0x620e8e[_0x601e('0xb')];_0x25ab37=_0x620e8e[_0x601e('0x21')];return rtq[_0x601e('0x50')](_0x1f479a,_0x49c838);})[_0x601e('0x16')](function(_0x44d0ec){_0x240fe7=_0x44d0ec[_0x601e('0x21')];return rtq[_0x601e('0x51')](_0x25ab37,_0x240fe7,_0x49c838,_0x1f479a[_0x601e('0x11')][_0x601e('0x28')]);})[_0x601e('0x16')](function(_0x588986){_0x3113a5[_0x601e('0x21')]=_0x588986;return _0x3113a5;})[_0x601e('0x16')](respondWithFilteredResult(_0x46111a,_0x1eadea))[_0x601e('0x43')](APIHandleError(_0x46111a));};
\ No newline at end of file
+var _0xa7ad=['rawAttributes','fieldName','type','role','agent','getOptions','push','sequelize','literal','Pause','forEach','where','merge','user','userProfileId','Agents','online','extraQueryConditions','assign','UserProfile','getResources','findAndCountAll','find','filterAgentAttributes','getAgentStatus','voice','voiceStatus','Status','getRealtimeAgentsQueryFields','catch','getQueues','toLowerCase','key','name','outbound','dialActive','dialMethod','QueueCampaigns','startCase','Queues','filter','getRealtimeQueues','initializeQueues','lodash','util','../../components/realtime/agents','../../config/utils','../../errors/api','APIBadRequestError','offset','undefined','count','limit','status','set','json','getAgents','getChannels','query','globalQueueFilter','globalStatusFilter','pauseTypeFilter','pause','*pause','isValidChannel','format','Channel\x20parameter\x20%s\x20is\x20invalid','channel','sort','includes','globalStatus','validateSortParameter','fields','join','order','then','getRealtimeAgents','rows','getAgentIdsByStatus','length','map','User'];(function(_0x459e7c,_0x15cc0e){var _0x2aca2e=function(_0x36b8b3){while(--_0x36b8b3){_0x459e7c['push'](_0x459e7c['shift']());}};_0x2aca2e(++_0x15cc0e);}(_0xa7ad,0x173));var _0xda7a=function(_0x24f31b,_0x44b8f3){_0x24f31b=_0x24f31b-0x0;var _0x488401=_0xa7ad[_0x24f31b];return _0x488401;};'use strict';var _=require(_0xda7a('0x0'));var util=require(_0xda7a('0x1'));var rta=require(_0xda7a('0x2'));var rtq=require('../../components/realtime/queues');var qs=require('../../components/parsers/qs');var utils=require(_0xda7a('0x3'));var db=require('../../mysqldb')['db'];var APIBadRequestError=require(_0xda7a('0x4'))[_0xda7a('0x5')];var APIHandleError=require('../../errors/api')['handleError'];function respondWithFilteredResult(_0x26ead1,_0x597772){return function(_0x2c4e96){if(_0x2c4e96){var _0x4a2c8b=typeof _0x597772[_0xda7a('0x6')]===_0xda7a('0x7')&&typeof _0x597772['limit']===_0xda7a('0x7');var _0xf6cfb0=_0x2c4e96[_0xda7a('0x8')];var _0x417441=_0x4a2c8b?0x0:_0x597772[_0xda7a('0x6')];var _0x193b30=_0x4a2c8b?_0x2c4e96['count']:_0x597772[_0xda7a('0x6')]+_0x597772[_0xda7a('0x9')];var _0x1cf589;if(_0x193b30>=_0xf6cfb0){_0x193b30=_0xf6cfb0;_0x1cf589=0xc8;}else{_0x1cf589=0xce;}_0x26ead1[_0xda7a('0xa')](_0x1cf589);return _0x26ead1[_0xda7a('0xb')]('Content-Range',_0x417441+'-'+_0x193b30+'/'+_0xf6cfb0)[_0xda7a('0xc')](_0x2c4e96);}return null;};}exports[_0xda7a('0xd')]=function(_0x1dd3b2,_0x19e6b4){var _0x158b6e={'count':0x0,'rows':[]};var _0x38b818={};var _0x68c01e;var _0x4719e1=utils[_0xda7a('0xe')]();var _0x592248;var _0x4e8814;var _0x5ef5ef=_0x1dd3b2[_0xda7a('0xf')][_0xda7a('0x10')];var _0x403779=_0x1dd3b2[_0xda7a('0xf')][_0xda7a('0x11')];var _0x2dc54f=_0x1dd3b2['query'][_0xda7a('0x12')];var _0x59f803=_0x403779===_0xda7a('0x13')||_0x403779===_0xda7a('0x14')?!![]:![];var _0x1f5a21=[];var _0x29dd04;var _0x177ac7;Promise['resolve']()['then'](function(){if(_0x1dd3b2[_0xda7a('0xf')]['channel']){if(!utils[_0xda7a('0x15')](_0x1dd3b2[_0xda7a('0xf')]['channel'])){throw new APIBadRequestError(util[_0xda7a('0x16')](_0xda7a('0x17'),_0x1dd3b2[_0xda7a('0xf')][_0xda7a('0x18')]));}_0x68c01e=_0x1dd3b2['query'][_0xda7a('0x18')]['toLowerCase']();}if(!_0x1dd3b2[_0xda7a('0xf')][_0xda7a('0x19')]||!_0x1dd3b2[_0xda7a('0xf')][_0xda7a('0x19')][_0xda7a('0x1a')](_0xda7a('0x1b'))){_0x1dd3b2[_0xda7a('0xf')][_0xda7a('0x19')]=rta[_0xda7a('0x1c')](_0x1dd3b2[_0xda7a('0xf')][_0xda7a('0x19')]);return;}var _0x4a93c5=rta['getUpdatedSortOptions'](_0x1dd3b2[_0xda7a('0xf')]['sort']);_0x1dd3b2[_0xda7a('0xf')][_0xda7a('0x19')]=_0x4a93c5[_0xda7a('0x1d')][_0xda7a('0x1e')](',');_0x29dd04=_0x4a93c5[_0xda7a('0x1f')];})[_0xda7a('0x20')](function(){if(!_0x5ef5ef){return[];}return rta['getAgentIdsByQueues'](_0x5ef5ef,_0x68c01e);})[_0xda7a('0x20')](function(_0x5e1062){_0x1f5a21=_0x5e1062;return rta[_0xda7a('0x21')]();})[_0xda7a('0x20')](function(_0x56b566){_0x4e8814=_0x56b566[_0xda7a('0x22')];if((!_0x403779||_0x59f803)&&!_0x29dd04){return _0x1f5a21;}if(_0x29dd04&&!_0x403779){return rta['getSortedAgentsIdsByStatus'](_0x4e8814,_0x1f5a21,_0x29dd04);}else{return rta[_0xda7a('0x23')](_0x4e8814,_0x1f5a21,_0x403779);}})['then'](function(_0xe8a52e){_0x1f5a21=_0xe8a52e;var _0x30c491=![];if(_0x1f5a21[_0xda7a('0x24')]===0x0){if(_0x5ef5ef||_0x403779){_0x30c491=!![];}if(_0x59f803){_0x30c491=![];}}if(_0x30c491){return _0x158b6e;}var _0x2f8828=_[_0xda7a('0x25')](db[_0xda7a('0x26')][_0xda7a('0x27')],function(_0x3118d3){return{'name':_0x3118d3[_0xda7a('0x28')],'type':_0x3118d3[_0xda7a('0x29')]['key']};});_0x1dd3b2[_0xda7a('0xf')][_0xda7a('0x2a')]=_0xda7a('0x2b');_0x38b818=qs[_0xda7a('0x2c')](_0x2f8828,_0x1dd3b2);_0x38b818['raw']=!![];var _0x404d1b=[];if(_0x1f5a21[_0xda7a('0x24')]>0x0){_0x404d1b[_0xda7a('0x2d')]({'id':{'$in':_0x1f5a21}});if(_0x29dd04&&!_0x403779){_0x177ac7=[db[_0xda7a('0x2e')][_0xda7a('0x2f')]('FIELD(id,'+_0x1f5a21+')')];_0x38b818['order']=_0x177ac7;}}if(_0x59f803){_0x4719e1['forEach'](function(_0x4cf399){var _0x46a152=!![];if(_0x403779===_0xda7a('0x14')&&_0x68c01e!==_0x4cf399){_0x46a152=![];}_0x404d1b[_0xda7a('0x2d')]({[_0x4cf399+_0xda7a('0x30')]:_0x46a152});});if(_0x2dc54f){_0x404d1b[_0xda7a('0x2d')]({'pauseType':_0x2dc54f});}}else if(_0x403779){_0x4719e1[_0xda7a('0x31')](function(_0x43166e){_0x404d1b[_0xda7a('0x2d')]({[_0x43166e+'Pause']:![]});});}_0x38b818[_0xda7a('0x32')]=_[_0xda7a('0x33')](_0x38b818['where'],{'$and':_0x404d1b});if(_0x1dd3b2[_0xda7a('0x34')][_0xda7a('0x2a')]===_0xda7a('0x34')){var _0x350d91={'params':{'id':_0x1dd3b2[_0xda7a('0x34')][_0xda7a('0x35')]},'query':{'section':_0xda7a('0x36'),'role':'agent','raw':!![],'ids':_0x1f5a21,'customSorting':_0x177ac7}};if(_0x1dd3b2[_0xda7a('0xf')][_0xda7a('0x37')]){_0x350d91['query'][_0xda7a('0x37')]=!![];}if(_0x59f803){_0x350d91['query'][_0xda7a('0x38')]=_0x404d1b;}_0x350d91[_0xda7a('0xf')]=Object[_0xda7a('0x39')](_0x350d91[_0xda7a('0xf')],_0x1dd3b2[_0xda7a('0xf')]);return db[_0xda7a('0x3a')][_0xda7a('0x3b')](_0x350d91);}return db[_0xda7a('0x26')][_0xda7a('0x3c')](_0x38b818);})['then'](function(_0x3795a2){_0x158b6e[_0xda7a('0x8')]=_0x3795a2[_0xda7a('0x8')];_0x592248=_0x3795a2[_0xda7a('0x22')];return _0x592248[_0xda7a('0x25')](function(_0x57d209){var _0x12e144=_[_0xda7a('0x3d')](_0x4e8814,['id',_0x57d209['id']]);if(_0x12e144){var _0x4c5971=rta[_0xda7a('0x3e')](_0x12e144);_['merge'](_0x57d209,_0x4c5971);}_0x57d209['globalStatus']=rta[_0xda7a('0x3f')](_0x57d209);if(_0x57d209[_0xda7a('0x1b')][_0xda7a('0x1a')](_0xda7a('0x13'))){_0x4719e1[_0xda7a('0x31')](function(_0x35009c){if(_0x57d209[_0x35009c+_0xda7a('0x30')]){if(_0x35009c===_0xda7a('0x40')){if(_0x57d209[_0xda7a('0x41')]!=='talking'){_0x57d209[_0xda7a('0x41')]=_0xda7a('0x13');}}else{_0x57d209[_0x35009c+_0xda7a('0x42')]=_0xda7a('0x13');}}});}return _0x57d209;});})[_0xda7a('0x20')](function(_0x35d8e1){if(!_0x29dd04||_0x177ac7){return _0x35d8e1;}return rta['sortAgentsByStatus'](_0x35d8e1,_0x29dd04);})[_0xda7a('0x20')](function(_0x3815da){var _0x1dfe11=rta[_0xda7a('0x43')]();_0x158b6e[_0xda7a('0x22')]=_0x3815da[_0xda7a('0x25')](function(_0x52113d){return _['pick'](_0x52113d,_0x1dfe11);});return _0x158b6e;})[_0xda7a('0x20')](respondWithFilteredResult(_0x19e6b4,_0x38b818))[_0xda7a('0x44')](APIHandleError(_0x19e6b4));};exports[_0xda7a('0x45')]=function(_0x5caeac,_0x23eca5){var _0x6563ac={'count':0x0,'rows':[]};var _0x4d2209={};var _0x197a0f;var _0x5d6685;var _0x206133;Promise['resolve']()[_0xda7a('0x20')](function(){if(_0x5caeac[_0xda7a('0xf')][_0xda7a('0x18')]){if(!utils[_0xda7a('0x15')](_0x5caeac[_0xda7a('0xf')][_0xda7a('0x18')])){throw new APIBadRequestError(util['format'](_0xda7a('0x17'),_0x5caeac[_0xda7a('0xf')][_0xda7a('0x18')]));}_0x197a0f=_0x5caeac['query'][_0xda7a('0x18')][_0xda7a('0x46')]();}var _0x14ba66=_['startCase'](_0x197a0f)+'Queue';var _0x2de14e=_[_0xda7a('0x25')](db[_0x14ba66]['rawAttributes'],function(_0x3ca0a8){return{'name':_0x3ca0a8[_0xda7a('0x28')],'type':_0x3ca0a8[_0xda7a('0x29')][_0xda7a('0x47')]};});if(!_0x5caeac['query'][_0xda7a('0x1d')]){var _0x3ada8e=['id',_0xda7a('0x48')];if(_0x197a0f===_0xda7a('0x40')){_0x3ada8e[_0xda7a('0x2d')](_0xda7a('0x29'));if(_0x5caeac['query'][_0xda7a('0x29')]===_0xda7a('0x49')){_0x3ada8e[_0xda7a('0x2d')]([_0xda7a('0x4a'),_0xda7a('0x4b')]);}}_0x5caeac[_0xda7a('0xf')][_0xda7a('0x1d')]=_0x3ada8e[_0xda7a('0x1e')](',');}_0x4d2209=qs[_0xda7a('0x2c')](_0x2de14e,_0x5caeac);if(_0x5caeac[_0xda7a('0x34')][_0xda7a('0x2a')]===_0xda7a('0x34')){var _0x3ec210={'params':{'id':_0x5caeac[_0xda7a('0x34')]['userProfileId']},'query':{'section':_0x197a0f===_0xda7a('0x40')&&_0x5caeac['query'][_0xda7a('0x29')]===_0xda7a('0x49')?_0xda7a('0x4c'):_[_0xda7a('0x4d')](_0x197a0f)+_0xda7a('0x4e'),'type':_0x5caeac[_0xda7a('0xf')][_0xda7a('0x29')],'nolimit':!![],'sort':'name','filter':_0x5caeac[_0xda7a('0xf')][_0xda7a('0x4f')]}};_0x3ec210[_0xda7a('0xf')]=Object[_0xda7a('0x39')](_0x3ec210['query'],_0x5caeac[_0xda7a('0xf')]);delete _0x3ec210[_0xda7a('0xf')]['id'];return db[_0xda7a('0x3a')]['getResources'](_0x3ec210);}return db[_0x14ba66][_0xda7a('0x3c')](_0x4d2209);})[_0xda7a('0x20')](function(_0x19b23a){_0x6563ac[_0xda7a('0x8')]=_0x19b23a[_0xda7a('0x8')];_0x5d6685=_0x19b23a['rows'];return rtq[_0xda7a('0x50')](_0x5caeac,_0x197a0f);})['then'](function(_0x1bb573){_0x206133=_0x1bb573[_0xda7a('0x22')];return rtq[_0xda7a('0x51')](_0x5d6685,_0x206133,_0x197a0f,_0x5caeac[_0xda7a('0xf')][_0xda7a('0x29')]);})[_0xda7a('0x20')](function(_0xdad613){_0x6563ac['rows']=_0xdad613;return _0x6563ac;})[_0xda7a('0x20')](respondWithFilteredResult(_0x23eca5,_0x4d2209))['catch'](APIHandleError(_0x23eca5));};
\ No newline at end of file
index fa9cda5..28f5a3c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c44=['express','Router','fs-extra','../../components/auth/service','exports','path','connect-timeout'];(function(_0x3eae7f,_0x33064f){var _0x353603=function(_0x127d6b){while(--_0x127d6b){_0x3eae7f['push'](_0x3eae7f['shift']());}};_0x353603(++_0x33064f);}(_0x9c44,0x178));var _0x49c4=function(_0x1694f5,_0x49b7c3){_0x1694f5=_0x1694f5-0x0;var _0x5b4321=_0x9c44[_0x1694f5];return _0x5b4321;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x49c4('0x0'));var timeout=require(_0x49c4('0x1'));var express=require(_0x49c4('0x2'));var router=express[_0x49c4('0x3')]();var fs_extra=require(_0x49c4('0x4'));var auth=require(_0x49c4('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');module[_0x49c4('0x6')]=router;
\ No newline at end of file
+var _0x0713=['../../config/environment','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service'];(function(_0x18806b,_0x1b9505){var _0x527c1e=function(_0x46becc){while(--_0x46becc){_0x18806b['push'](_0x18806b['shift']());}};_0x527c1e(++_0x1b9505);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3071('0x0'));var timeout=require(_0x3071('0x1'));var express=require(_0x3071('0x2'));var router=express[_0x3071('0x3')]();var fs_extra=require(_0x3071('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));module[_0x3071('0x7')]=router;
\ No newline at end of file
index 7fc4892..ef032e6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcd05=['STRING','sequelize','DATE'];(function(_0x172747,_0x1732bd){var _0x509692=function(_0x448c56){while(--_0x448c56){_0x172747['push'](_0x172747['shift']());}};_0x509692(++_0x1732bd);}(_0xcd05,0x163));var _0x5cd0=function(_0x4dab14,_0x164ea0){_0x4dab14=_0x4dab14-0x0;var _0xf41aa=_0xcd05[_0x4dab14];return _0xf41aa;};'use strict';var Sequelize=require(_0x5cd0('0x0'));module['exports']={'state':{'type':Sequelize['INTEGER'](0x2)},'statedesc':{'type':Sequelize['STRING']},'scheduledat':{'type':Sequelize[_0x5cd0('0x1')]},'uniqueid':{'type':Sequelize[_0x5cd0('0x2')]},'starttime':{'type':Sequelize[_0x5cd0('0x1')]},'responsetime':{'type':Sequelize[_0x5cd0('0x1')]},'ringtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'campaign':{'type':Sequelize[_0x5cd0('0x2')]},'campaigntype':{'type':Sequelize[_0x5cd0('0x2')]},'membername':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x972c=['STRING','DATE','INTEGER'];(function(_0x8c366,_0x4fe9f7){var _0x2ca038=function(_0x1d5197){while(--_0x1d5197){_0x8c366['push'](_0x8c366['shift']());}};_0x2ca038(++_0x4fe9f7);}(_0x972c,0xf2));var _0xc972=function(_0x47b08f,_0xa05c34){_0x47b08f=_0x47b08f-0x0;var _0x215509=_0x972c[_0x47b08f];return _0x215509;};'use strict';var Sequelize=require('sequelize');module['exports']={'state':{'type':Sequelize[_0xc972('0x0')](0x2)},'statedesc':{'type':Sequelize[_0xc972('0x1')]},'scheduledat':{'type':Sequelize['DATE']},'uniqueid':{'type':Sequelize[_0xc972('0x1')]},'starttime':{'type':Sequelize[_0xc972('0x2')]},'responsetime':{'type':Sequelize['DATE']},'ringtime':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'campaign':{'type':Sequelize[_0xc972('0x1')]},'campaigntype':{'type':Sequelize[_0xc972('0x1')]},'membername':{'type':Sequelize[_0xc972('0x1')]}};
\ No newline at end of file
index 08ae3ac..4351fbc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe34a=['../../config/logger','moment','bluebird','request-promise','path','../../config/environment','./reportAgentPreview.attributes','define','ReportAgentPreview','report_agent_preview','lodash','util'];(function(_0x150711,_0x589172){var _0x4f24f5=function(_0x45c8c5){while(--_0x45c8c5){_0x150711['push'](_0x150711['shift']());}};_0x4f24f5(++_0x589172);}(_0xe34a,0x8e));var _0xae34=function(_0x5ecadc,_0x1cf9f1){_0x5ecadc=_0x5ecadc-0x0;var _0x565037=_0xe34a[_0x5ecadc];return _0x565037;};'use strict';var _=require(_0xae34('0x0'));var util=require(_0xae34('0x1'));var logger=require(_0xae34('0x2'))('api');var moment=require(_0xae34('0x3'));var BPromise=require(_0xae34('0x4'));var rp=require(_0xae34('0x5'));var fs=require('fs');var path=require(_0xae34('0x6'));var rimraf=require('rimraf');var config=require(_0xae34('0x7'));var attributes=require(_0xae34('0x8'));module['exports']=function(_0x23744c,_0x549b76){return _0x23744c[_0xae34('0x9')](_0xae34('0xa'),attributes,{'tableName':_0xae34('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xe4e3=['api','moment','bluebird','request-promise','path','rimraf','./reportAgentPreview.attributes','define','ReportAgentPreview','report_agent_preview','lodash','util','../../config/logger'];(function(_0x101350,_0x5854ee){var _0x214977=function(_0x493346){while(--_0x493346){_0x101350['push'](_0x101350['shift']());}};_0x214977(++_0x5854ee);}(_0xe4e3,0x128));var _0x3e4e=function(_0x25102b,_0x28fe76){_0x25102b=_0x25102b-0x0;var _0x4e38a9=_0xe4e3[_0x25102b];return _0x4e38a9;};'use strict';var _=require(_0x3e4e('0x0'));var util=require(_0x3e4e('0x1'));var logger=require(_0x3e4e('0x2'))(_0x3e4e('0x3'));var moment=require(_0x3e4e('0x4'));var BPromise=require(_0x3e4e('0x5'));var rp=require(_0x3e4e('0x6'));var fs=require('fs');var path=require(_0x3e4e('0x7'));var rimraf=require(_0x3e4e('0x8'));var config=require('../../config/environment');var attributes=require(_0x3e4e('0x9'));module['exports']=function(_0x31da25,_0x3c3984){return _0x31da25[_0x3e4e('0xa')](_0x3e4e('0xb'),attributes,{'tableName':_0x3e4e('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 369d422..9b9dbce 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2ac3=['info','debug','request\x20sent','stringify','error','code','ReportAgentPreview,\x20%s,\x20%s','message','result','catch','ReportAgentPreview','create','body','options','raw','CreateReportAgentPreview','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then'];(function(_0x589bab,_0x46a0bf){var _0x50c677=function(_0x1a71a7){while(--_0x1a71a7){_0x589bab['push'](_0x589bab['shift']());}};_0x50c677(++_0x46a0bf);}(_0x2ac3,0x198));var _0x32ac=function(_0x13d07a,_0x41efc3){_0x13d07a=_0x13d07a-0x0;var _0x5ee0ee=_0x2ac3[_0x13d07a];return _0x5ee0ee;};'use strict';var _=require(_0x32ac('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x32ac('0x1'));var rs=require(_0x32ac('0x2'));var fs=require('fs');var Redis=require(_0x32ac('0x3'));var db=require(_0x32ac('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x32ac('0x5'))(_0x32ac('0x6'));var config=require(_0x32ac('0x7'));var jayson=require(_0x32ac('0x8'));var client=jayson['client'][_0x32ac('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5c4115,_0x404a2b,_0x4a09c5){return new BPromise(function(_0x34caf4,_0x26c9c9){return client[_0x32ac('0xa')](_0x5c4115,_0x4a09c5)[_0x32ac('0xb')](function(_0x1b5e25){logger[_0x32ac('0xc')]('ReportAgentPreview,\x20%s,\x20%s',_0x404a2b,'request\x20sent');logger[_0x32ac('0xd')]('ReportAgentPreview,\x20%s,\x20%s,\x20%s',_0x404a2b,_0x32ac('0xe'),JSON[_0x32ac('0xf')](_0x1b5e25));if(_0x1b5e25[_0x32ac('0x10')]){if(_0x1b5e25[_0x32ac('0x10')][_0x32ac('0x11')]===0x1f4){logger['error'](_0x32ac('0x12'),_0x404a2b,_0x1b5e25[_0x32ac('0x10')][_0x32ac('0x13')]);return _0x26c9c9(_0x1b5e25[_0x32ac('0x10')][_0x32ac('0x13')]);}logger[_0x32ac('0x10')](_0x32ac('0x12'),_0x404a2b,_0x1b5e25['error'][_0x32ac('0x13')]);return _0x34caf4(_0x1b5e25['error']['message']);}else{logger['info'](_0x32ac('0x12'),_0x404a2b,_0x32ac('0xe'));_0x34caf4(_0x1b5e25[_0x32ac('0x14')][_0x32ac('0x13')]);}})[_0x32ac('0x15')](function(_0x4d620e){logger[_0x32ac('0x10')](_0x32ac('0x12'),_0x404a2b,_0x4d620e);_0x26c9c9(_0x4d620e);});});}exports['CreateReportAgentPreview']=function(_0xd64f28){var _0x4724d9=this;return new Promise(function(_0x21a0ef,_0x5700f7){return db[_0x32ac('0x16')][_0x32ac('0x17')](_0xd64f28[_0x32ac('0x18')],{'raw':_0xd64f28[_0x32ac('0x19')]?_0xd64f28[_0x32ac('0x19')][_0x32ac('0x1a')]===undefined?!![]:![]:!![]})[_0x32ac('0xb')](function(_0x510fb4){logger['info']('CreateReportAgentPreview',_0xd64f28);logger[_0x32ac('0xd')](_0x32ac('0x1b'),_0xd64f28,JSON[_0x32ac('0xf')](_0x510fb4));_0x21a0ef(_0x510fb4);})[_0x32ac('0x15')](function(_0x3c0368){logger[_0x32ac('0x10')]('CreateReportAgentPreview',_0x3c0368['message'],_0xd64f28);_0x5700f7(_0x4724d9['error'](0x1f4,_0x3c0368[_0x32ac('0x13')]));});});};
\ No newline at end of file
+var _0x4d5b=['ReportAgentPreview,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','CreateReportAgentPreview','body','options','raw','stringify','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','request','then','info','ReportAgentPreview,\x20%s,\x20%s','request\x20sent','debug'];(function(_0x379a7f,_0x11fb50){var _0x3d3194=function(_0x1a992d){while(--_0x1a992d){_0x379a7f['push'](_0x379a7f['shift']());}};_0x3d3194(++_0x11fb50);}(_0x4d5b,0x1af));var _0xb4d5=function(_0x3c8891,_0x3fa7bb){_0x3c8891=_0x3c8891-0x0;var _0x4c6e00=_0x4d5b[_0x3c8891];return _0x4c6e00;};'use strict';var _=require(_0xb4d5('0x0'));var util=require(_0xb4d5('0x1'));var moment=require(_0xb4d5('0x2'));var BPromise=require('bluebird');var rs=require(_0xb4d5('0x3'));var fs=require('fs');var Redis=require(_0xb4d5('0x4'));var db=require(_0xb4d5('0x5'))['db'];var utils=require(_0xb4d5('0x6'));var logger=require('../../config/logger')(_0xb4d5('0x7'));var config=require(_0xb4d5('0x8'));var jayson=require(_0xb4d5('0x9'));var client=jayson[_0xb4d5('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1964aa,_0x4286b,_0x354f14){return new BPromise(function(_0x8431ae,_0x1f6783){return client[_0xb4d5('0xb')](_0x1964aa,_0x354f14)[_0xb4d5('0xc')](function(_0x42d37b){logger[_0xb4d5('0xd')](_0xb4d5('0xe'),_0x4286b,_0xb4d5('0xf'));logger[_0xb4d5('0x10')](_0xb4d5('0x11'),_0x4286b,_0xb4d5('0xf'),JSON['stringify'](_0x42d37b));if(_0x42d37b[_0xb4d5('0x12')]){if(_0x42d37b[_0xb4d5('0x12')][_0xb4d5('0x13')]===0x1f4){logger[_0xb4d5('0x12')](_0xb4d5('0xe'),_0x4286b,_0x42d37b['error'][_0xb4d5('0x14')]);return _0x1f6783(_0x42d37b['error']['message']);}logger[_0xb4d5('0x12')]('ReportAgentPreview,\x20%s,\x20%s',_0x4286b,_0x42d37b['error'][_0xb4d5('0x14')]);return _0x8431ae(_0x42d37b[_0xb4d5('0x12')]['message']);}else{logger['info']('ReportAgentPreview,\x20%s,\x20%s',_0x4286b,_0xb4d5('0xf'));_0x8431ae(_0x42d37b[_0xb4d5('0x15')]['message']);}})[_0xb4d5('0x16')](function(_0xec97f0){logger[_0xb4d5('0x12')](_0xb4d5('0xe'),_0x4286b,_0xec97f0);_0x1f6783(_0xec97f0);});});}exports[_0xb4d5('0x17')]=function(_0x3fe8c9){var _0x39ce48=this;return new Promise(function(_0x669ed4,_0x511a9a){return db['ReportAgentPreview']['create'](_0x3fe8c9[_0xb4d5('0x18')],{'raw':_0x3fe8c9[_0xb4d5('0x19')]?_0x3fe8c9[_0xb4d5('0x19')][_0xb4d5('0x1a')]===undefined?!![]:![]:!![]})[_0xb4d5('0xc')](function(_0x68bc20){logger[_0xb4d5('0xd')](_0xb4d5('0x17'),_0x3fe8c9);logger[_0xb4d5('0x10')](_0xb4d5('0x17'),_0x3fe8c9,JSON[_0xb4d5('0x1b')](_0x68bc20));_0x669ed4(_0x68bc20);})['catch'](function(_0x284f85){logger['error'](_0xb4d5('0x17'),_0x284f85[_0xb4d5('0x14')],_0x3fe8c9);_0x511a9a(_0x39ce48['error'](0x1f4,_0x284f85['message']));});});};
\ No newline at end of file
index 584cfd1..a53e24d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xefa1=['/mail/queues/:id/notify','queueNotify','mail','/mail/queues/:id','showMailQueues','post','/chat/queues/:id/notify','/chat/queues/:id','showChatQueues','fax','/fax/queues/:id','showFaxQueues','/openchannel/queues/:id/notify','openchannel','/openchannel/queues/:id','showOpenchannelQueues','/sms/queues/:id/notify','sms','/whatsapp/queues/:id/notify','whatsapp','/sms/queues/:id','showSmsQueues','/whatsapp/queues/:id','showWhatsappQueues','/agents/:id/notify','agentNotify','exports','multer','util','path','express','get','isAuthenticated','/voice/channels/:uniqueid/mixmonitor','/voice/channels/:uniqueid/stopmixmonitor','voiceChannelStopMixMonitor','voiceQueues','/chat/queues','chatQueues','/mail/queues','mailQueues','mailAccounts','/openchannel/queues','openchannelQueues','/sms/queues','smsQueues','/whatsapp/queues','faxQueues','/voice/queues/preview/:id','voiceQueuesPreview','/voice/queues/channels','voiceQueuesChannels','voiceQueuesChannel','/voice/queues/channels/:uniqueid/hangup','/voice/queues/channels/:uniqueid/redirect/:exten','voiceQueuesChannelRedirect','/voice/queues/:id','showVoiceQueues','put','updateVoiceQueue','/outbound','outbound','/outbound/channels','outboundChannels','/agents','agents','/agents/:id/capacity','agentCapacity','/telephones','telephones','/trunks','/campaigns','/fax/accounts','faxAccounts','/chat/queues/waitinginteractions','chatQueuesWaitingInteractions','/mail/queues/waitinginteractions','mailQueuesWaitingInteractions','/openchannel/queues/waitinginteractions','openchannelQueuesWaitingInteractions','/openchannel/queues/:id/waitinginteractions','openchannelQueuesIdWaitingInteractions','smsQueuesWaitingInteractions','/whatsapp/queues/waitinginteractions','/fax/queues/waitinginteractions','faxQueuesWaitingInteractions'];(function(_0x13d07a,_0x41efc3){var _0x5ee0ee=function(_0x4ca94a){while(--_0x4ca94a){_0x13d07a['push'](_0x13d07a['shift']());}};_0x5ee0ee(++_0x41efc3);}(_0xefa1,0xc7));var _0x1efa=function(_0x21b30a,_0x5aafbd){_0x21b30a=_0x21b30a-0x0;var _0x2f8816=_0xefa1[_0x21b30a];return _0x2f8816;};'use strict';var multer=require(_0x1efa('0x0'));var util=require(_0x1efa('0x1'));var path=require(_0x1efa('0x2'));var express=require(_0x1efa('0x3'));var router=express['Router']();var auth=require('../../components/auth/service');var controller=require('./rpc.controller');router[_0x1efa('0x4')]('/voice/channels',auth[_0x1efa('0x5')](),controller['voiceChannels']);router['get'](_0x1efa('0x6'),auth['isAuthenticated'](),controller['voiceChannelMixMonitor']);router['get'](_0x1efa('0x7'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x8')]);router[_0x1efa('0x4')]('/voice/queues',auth[_0x1efa('0x5')](),controller[_0x1efa('0x9')]);router[_0x1efa('0x4')](_0x1efa('0xa'),auth[_0x1efa('0x5')](),controller[_0x1efa('0xb')]);router[_0x1efa('0x4')](_0x1efa('0xc'),auth[_0x1efa('0x5')](),controller[_0x1efa('0xd')]);router[_0x1efa('0x4')]('/mail/accounts',auth[_0x1efa('0x5')](),controller[_0x1efa('0xe')]);router[_0x1efa('0x4')](_0x1efa('0xf'),auth['isAuthenticated'](),controller[_0x1efa('0x10')]);router[_0x1efa('0x4')](_0x1efa('0x11'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x12')]);router[_0x1efa('0x4')](_0x1efa('0x13'),auth['isAuthenticated'](),controller['whatsappQueues']);router['get']('/fax/queues',auth[_0x1efa('0x5')](),controller[_0x1efa('0x14')]);router[_0x1efa('0x4')](_0x1efa('0x15'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x16')]);router['get'](_0x1efa('0x17'),auth['isAuthenticated'](),controller[_0x1efa('0x18')]);router[_0x1efa('0x4')]('/voice/queues/channels/:uniqueid',auth[_0x1efa('0x5')](),controller[_0x1efa('0x19')]);router[_0x1efa('0x4')](_0x1efa('0x1a'),auth[_0x1efa('0x5')](),controller['voiceQueuesChannelHangup']);router[_0x1efa('0x4')](_0x1efa('0x1b'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x1c')]);router['get'](_0x1efa('0x1d'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x1e')]);router[_0x1efa('0x1f')]('/voice/queues/:id',auth[_0x1efa('0x5')](),controller[_0x1efa('0x20')]);router[_0x1efa('0x4')](_0x1efa('0x21'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x22')]);router[_0x1efa('0x4')](_0x1efa('0x23'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x24')]);router[_0x1efa('0x4')](_0x1efa('0x25'),auth['isAuthenticated'](),controller[_0x1efa('0x26')]);router[_0x1efa('0x1f')](_0x1efa('0x27'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x28')]);router[_0x1efa('0x4')](_0x1efa('0x29'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x2a')]);router[_0x1efa('0x4')](_0x1efa('0x2b'),auth[_0x1efa('0x5')](),controller['trunks']);router['get'](_0x1efa('0x2c'),auth[_0x1efa('0x5')](),controller['campaigns']);router[_0x1efa('0x4')](_0x1efa('0x2d'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x2e')]);router['get'](_0x1efa('0x2f'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x30')]);router[_0x1efa('0x4')](_0x1efa('0x31'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x32')]);router[_0x1efa('0x4')](_0x1efa('0x33'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x34')]);router[_0x1efa('0x4')](_0x1efa('0x35'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x36')]);router[_0x1efa('0x4')]('/sms/queues/waitinginteractions',auth[_0x1efa('0x5')](),controller[_0x1efa('0x37')]);router[_0x1efa('0x4')](_0x1efa('0x38'),auth[_0x1efa('0x5')](),controller['whatsappQueuesWaitingInteractions']);router['get'](_0x1efa('0x39'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x3a')]);router['post'](_0x1efa('0x3b'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x3c')](_0x1efa('0x3d')));router['get'](_0x1efa('0x3e'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x3f')]);router[_0x1efa('0x40')](_0x1efa('0x41'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x3c')]('chat'));router['get'](_0x1efa('0x42'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x43')]);router[_0x1efa('0x40')]('/fax/queues/:id/notify',auth[_0x1efa('0x5')](),controller[_0x1efa('0x3c')](_0x1efa('0x44')));router[_0x1efa('0x4')](_0x1efa('0x45'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x46')]);router[_0x1efa('0x40')](_0x1efa('0x47'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x3c')](_0x1efa('0x48')));router[_0x1efa('0x4')](_0x1efa('0x49'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x4a')]);router[_0x1efa('0x40')](_0x1efa('0x4b'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x3c')](_0x1efa('0x4c')));router[_0x1efa('0x40')](_0x1efa('0x4d'),auth[_0x1efa('0x5')](),controller['queueNotify'](_0x1efa('0x4e')));router['get'](_0x1efa('0x4f'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x50')]);router[_0x1efa('0x4')](_0x1efa('0x51'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x52')]);router[_0x1efa('0x40')](_0x1efa('0x53'),auth[_0x1efa('0x5')](),controller[_0x1efa('0x54')]);module[_0x1efa('0x55')]=router;
\ No newline at end of file
+var _0xc61b=['/openchannel/queues/:id/notify','openchannel','/openchannel/queues/:id','/sms/queues/:id/notify','sms','/whatsapp/queues/:id/notify','whatsapp','/sms/queues/:id','showSmsQueues','/whatsapp/queues/:id','showWhatsappQueues','/agents/:id/notify','agentNotify','exports','util','path','express','../../components/auth/service','./rpc.controller','get','/voice/channels','isAuthenticated','voiceChannelMixMonitor','/voice/channels/:uniqueid/stopmixmonitor','voiceChannelStopMixMonitor','/voice/queues','/chat/queues','/mail/queues','mailQueues','/mail/accounts','mailAccounts','/openchannel/queues','openchannelQueues','/sms/queues','/whatsapp/queues','whatsappQueues','/fax/queues','faxQueues','/voice/queues/preview/:id','voiceQueuesPreview','voiceQueuesChannels','/voice/queues/channels/:uniqueid/redirect/:exten','voiceQueuesChannelRedirect','/voice/queues/:id','put','updateVoiceQueue','/outbound','outbound','/outbound/channels','outboundChannels','agentCapacity','/telephones','telephones','trunks','campaigns','/fax/accounts','faxAccounts','/chat/queues/waitinginteractions','chatQueuesWaitingInteractions','/mail/queues/waitinginteractions','mailQueuesWaitingInteractions','/openchannel/queues/waitinginteractions','openchannelQueuesIdWaitingInteractions','smsQueuesWaitingInteractions','/whatsapp/queues/waitinginteractions','/fax/queues/waitinginteractions','faxQueuesWaitingInteractions','post','queueNotify','mail','/mail/queues/:id','showMailQueues','/chat/queues/:id/notify','/fax/queues/:id/notify','fax','/fax/queues/:id','showFaxQueues'];(function(_0x1425c8,_0x284f88){var _0x218bd5=function(_0x115571){while(--_0x115571){_0x1425c8['push'](_0x1425c8['shift']());}};_0x218bd5(++_0x284f88);}(_0xc61b,0x1dc));var _0xbc61=function(_0x217ba8,_0x2fd0ae){_0x217ba8=_0x217ba8-0x0;var _0x1ab871=_0xc61b[_0x217ba8];return _0x1ab871;};'use strict';var multer=require('multer');var util=require(_0xbc61('0x0'));var path=require(_0xbc61('0x1'));var express=require(_0xbc61('0x2'));var router=express['Router']();var auth=require(_0xbc61('0x3'));var controller=require(_0xbc61('0x4'));router[_0xbc61('0x5')](_0xbc61('0x6'),auth[_0xbc61('0x7')](),controller['voiceChannels']);router['get']('/voice/channels/:uniqueid/mixmonitor',auth[_0xbc61('0x7')](),controller[_0xbc61('0x8')]);router['get'](_0xbc61('0x9'),auth[_0xbc61('0x7')](),controller[_0xbc61('0xa')]);router[_0xbc61('0x5')](_0xbc61('0xb'),auth[_0xbc61('0x7')](),controller['voiceQueues']);router['get'](_0xbc61('0xc'),auth['isAuthenticated'](),controller['chatQueues']);router[_0xbc61('0x5')](_0xbc61('0xd'),auth[_0xbc61('0x7')](),controller[_0xbc61('0xe')]);router['get'](_0xbc61('0xf'),auth[_0xbc61('0x7')](),controller[_0xbc61('0x10')]);router[_0xbc61('0x5')](_0xbc61('0x11'),auth[_0xbc61('0x7')](),controller[_0xbc61('0x12')]);router[_0xbc61('0x5')](_0xbc61('0x13'),auth[_0xbc61('0x7')](),controller['smsQueues']);router[_0xbc61('0x5')](_0xbc61('0x14'),auth[_0xbc61('0x7')](),controller[_0xbc61('0x15')]);router[_0xbc61('0x5')](_0xbc61('0x16'),auth[_0xbc61('0x7')](),controller[_0xbc61('0x17')]);router[_0xbc61('0x5')](_0xbc61('0x18'),auth[_0xbc61('0x7')](),controller[_0xbc61('0x19')]);router['get']('/voice/queues/channels',auth[_0xbc61('0x7')](),controller[_0xbc61('0x1a')]);router[_0xbc61('0x5')]('/voice/queues/channels/:uniqueid',auth[_0xbc61('0x7')](),controller['voiceQueuesChannel']);router['get']('/voice/queues/channels/:uniqueid/hangup',auth['isAuthenticated'](),controller['voiceQueuesChannelHangup']);router[_0xbc61('0x5')](_0xbc61('0x1b'),auth['isAuthenticated'](),controller[_0xbc61('0x1c')]);router[_0xbc61('0x5')](_0xbc61('0x1d'),auth[_0xbc61('0x7')](),controller['showVoiceQueues']);router[_0xbc61('0x1e')](_0xbc61('0x1d'),auth[_0xbc61('0x7')](),controller[_0xbc61('0x1f')]);router[_0xbc61('0x5')](_0xbc61('0x20'),auth[_0xbc61('0x7')](),controller[_0xbc61('0x21')]);router[_0xbc61('0x5')](_0xbc61('0x22'),auth[_0xbc61('0x7')](),controller[_0xbc61('0x23')]);router[_0xbc61('0x5')]('/agents',auth[_0xbc61('0x7')](),controller['agents']);router[_0xbc61('0x1e')]('/agents/:id/capacity',auth[_0xbc61('0x7')](),controller[_0xbc61('0x24')]);router[_0xbc61('0x5')](_0xbc61('0x25'),auth[_0xbc61('0x7')](),controller[_0xbc61('0x26')]);router[_0xbc61('0x5')]('/trunks',auth['isAuthenticated'](),controller[_0xbc61('0x27')]);router[_0xbc61('0x5')]('/campaigns',auth[_0xbc61('0x7')](),controller[_0xbc61('0x28')]);router['get'](_0xbc61('0x29'),auth[_0xbc61('0x7')](),controller[_0xbc61('0x2a')]);router[_0xbc61('0x5')](_0xbc61('0x2b'),auth['isAuthenticated'](),controller[_0xbc61('0x2c')]);router[_0xbc61('0x5')](_0xbc61('0x2d'),auth[_0xbc61('0x7')](),controller[_0xbc61('0x2e')]);router[_0xbc61('0x5')](_0xbc61('0x2f'),auth['isAuthenticated'](),controller['openchannelQueuesWaitingInteractions']);router[_0xbc61('0x5')]('/openchannel/queues/:id/waitinginteractions',auth['isAuthenticated'](),controller[_0xbc61('0x30')]);router[_0xbc61('0x5')]('/sms/queues/waitinginteractions',auth[_0xbc61('0x7')](),controller[_0xbc61('0x31')]);router['get'](_0xbc61('0x32'),auth['isAuthenticated'](),controller['whatsappQueuesWaitingInteractions']);router[_0xbc61('0x5')](_0xbc61('0x33'),auth['isAuthenticated'](),controller[_0xbc61('0x34')]);router[_0xbc61('0x35')]('/mail/queues/:id/notify',auth[_0xbc61('0x7')](),controller[_0xbc61('0x36')](_0xbc61('0x37')));router[_0xbc61('0x5')](_0xbc61('0x38'),auth[_0xbc61('0x7')](),controller[_0xbc61('0x39')]);router[_0xbc61('0x35')](_0xbc61('0x3a'),auth[_0xbc61('0x7')](),controller['queueNotify']('chat'));router[_0xbc61('0x5')]('/chat/queues/:id',auth[_0xbc61('0x7')](),controller['showChatQueues']);router[_0xbc61('0x35')](_0xbc61('0x3b'),auth[_0xbc61('0x7')](),controller[_0xbc61('0x36')](_0xbc61('0x3c')));router['get'](_0xbc61('0x3d'),auth['isAuthenticated'](),controller[_0xbc61('0x3e')]);router[_0xbc61('0x35')](_0xbc61('0x3f'),auth[_0xbc61('0x7')](),controller['queueNotify'](_0xbc61('0x40')));router[_0xbc61('0x5')](_0xbc61('0x41'),auth[_0xbc61('0x7')](),controller['showOpenchannelQueues']);router[_0xbc61('0x35')](_0xbc61('0x42'),auth[_0xbc61('0x7')](),controller[_0xbc61('0x36')](_0xbc61('0x43')));router['post'](_0xbc61('0x44'),auth[_0xbc61('0x7')](),controller[_0xbc61('0x36')](_0xbc61('0x45')));router['get'](_0xbc61('0x46'),auth[_0xbc61('0x7')](),controller[_0xbc61('0x47')]);router[_0xbc61('0x5')](_0xbc61('0x48'),auth['isAuthenticated'](),controller[_0xbc61('0x49')]);router[_0xbc61('0x35')](_0xbc61('0x4a'),auth['isAuthenticated'](),controller[_0xbc61('0x4b')]);module[_0xbc61('0x4c')]=router;
\ No newline at end of file
index 970785f..afa63db 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['mailQueuesWaitingInteractions','MailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','OpenchannelQueuesWaitingInteractions','filter','map','queue_id','uniq','indexOf','smsQueuesWaitingInteractions','SmsQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','WhatsappQueuesWaitingInteractions','faxQueuesWaitingInteractions','queueNotify','chat','Website','Account','findOne','\x20Queue\x20not\x20found','Message','Interaction','\x20Message\x20not\x20found','MessageId','InteractionId','From','QueueId','create','Start','queue','queueTransferTimeout','*,*,*,*','agentNotify','Channel\x20field\x20is\x20mandatory','channel','capitalize','User','messageId','update','bluebird','moment','lodash','../../config/logger','jayson/promise','client','http','then','error','code','catch','status','sendStatus','stack','name','send','isNil','find','rows','voiceChannels','VoiceChannels','query','voiceChannelMixMonitor','VoiceChannelMixMonitor','merge','params','voiceChannelStopMixMonitor','VoiceChannelStopMixMonitor','voiceQueues','showVoiceQueues','VoiceQueues','updateVoiceQueue','UpdateVoiceQueue','body','voiceQueuesPreview','VoiceQueuesPreview','voiceQueuesChannels','voiceQueuesChannel','VoiceQueuesChannel','voiceQueuesChannelHangup','VoiceQueuesChannelHangup','voiceQueuesChannelRedirect','VoiceQueuesChannelRedirect','outbound','Outbound','outboundChannels','Agents','agentCapacity','interaction','user','hasOwnProperty','MemberReport','findAll','length','format','YYYY-MM-DD\x20HH:mm:ss','updateAttributes','INTERACTION','interface','SIP/%s','agent','internal','AgentCapacity','telephones','Telephones','Trunks','campaigns','ChatQueues','mailQueues','showMailQueues','MailQueues','mailAccounts','MailAccounts','openchannelQueues','OpenchannelQueues','SmsQueues','showSmsQueues','whatsappQueues','WhatsappQueues','showWhatsappQueues','faxQueues','FaxQueues','showFaxQueues','faxAccounts','FaxAccounts','chatQueuesWaitingInteractions','ChatQueuesWaitingInteractions'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4709c0,_0x3396c7){_0x4709c0=_0x4709c0-0x0;var _0x13348b=_0xa9e0[_0x4709c0];return _0x13348b;};'use strict';var BPromise=require(_0x0a9e('0x0'));var moment=require(_0x0a9e('0x1'));var _=require(_0x0a9e('0x2'));var util=require('util');var db=require('../../mysqldb')['db'];var logger=require(_0x0a9e('0x3'))('api');var jayson=require(_0x0a9e('0x4'));var amiClient=jayson[_0x0a9e('0x5')][_0x0a9e('0x6')]({'port':0x232a});var mailClient=jayson[_0x0a9e('0x5')][_0x0a9e('0x6')]({'port':0x232b});var routingClient=jayson['client'][_0x0a9e('0x6')]({'port':0x232c});function respondWithRpcPromise(_0x441e3a,_0x2cc193,_0x5f41ea){return new BPromise(function(_0x503809,_0xe42b77){var _0x56465b=_0x5f41ea?_0x5f41ea:amiClient;return _0x56465b['request'](_0x441e3a,_0x2cc193)[_0x0a9e('0x7')](function(_0xf81284){if(_0xf81284[_0x0a9e('0x8')]){if(_0xf81284[_0x0a9e('0x8')][_0x0a9e('0x9')]===0x1f4){return _0xe42b77(_0xf81284[_0x0a9e('0x8')]['message']);}return _0x503809(_0xf81284['error']['message']);}else{_0x503809(_0xf81284['result']);}})[_0x0a9e('0xa')](function(_0x36471c){_0xe42b77(_0x36471c);});});}function respondWithResult(_0xd5b662,_0x26d672){_0x26d672=_0x26d672||0xc8;return function(_0x32d742){if(_0x32d742){return _0xd5b662[_0x0a9e('0xb')](_0x26d672)['json'](_0x32d742);}return _0xd5b662[_0x0a9e('0xc')](0x194);};}function handleError(_0x239b12,_0x2b4227){_0x2b4227=_0x2b4227||0x1f4;return function(_0x281129){logger[_0x0a9e('0x8')](_0x281129[_0x0a9e('0xd')]);if(_0x281129['name']){delete _0x281129[_0x0a9e('0xe')];}_0x239b12['status'](_0x2b4227)[_0x0a9e('0xf')](_0x281129);};}function findById(_0x519dfd){return function(_0x16033c){if(!_[_0x0a9e('0x10')](_0x519dfd)&&!_['isNil'](_0x16033c)&&!_[_0x0a9e('0x10')](_0x16033c['rows'])){return _[_0x0a9e('0x11')](_0x16033c[_0x0a9e('0x12')],function(_0x106033){return _0x106033['id']==_0x519dfd;});}return null;};}exports[_0x0a9e('0x13')]=function(_0x31b1ca,_0x2eb11f){return respondWithRpcPromise(_0x0a9e('0x14'),_0x31b1ca[_0x0a9e('0x15')])[_0x0a9e('0x7')](respondWithResult(_0x2eb11f,null))[_0x0a9e('0xa')](handleError(_0x2eb11f,null));};exports[_0x0a9e('0x16')]=function(_0x105080,_0x4bb1e3){return respondWithRpcPromise(_0x0a9e('0x17'),_[_0x0a9e('0x18')](_0x105080['query'],_0x105080[_0x0a9e('0x19')]))['then'](respondWithResult(_0x4bb1e3,null))['catch'](handleError(_0x4bb1e3,null));};exports[_0x0a9e('0x1a')]=function(_0x432e56,_0x38e7c4){return respondWithRpcPromise(_0x0a9e('0x1b'),_['merge'](_0x432e56[_0x0a9e('0x15')],_0x432e56[_0x0a9e('0x19')]))[_0x0a9e('0x7')](respondWithResult(_0x38e7c4,null))[_0x0a9e('0xa')](handleError(_0x38e7c4,null));};exports[_0x0a9e('0x1c')]=function(_0x42ac8f,_0x16b1ca){return respondWithRpcPromise('VoiceQueues',_0x42ac8f['query'])[_0x0a9e('0x7')](respondWithResult(_0x16b1ca,null))[_0x0a9e('0xa')](handleError(_0x16b1ca,null));};exports[_0x0a9e('0x1d')]=function(_0x33161b,_0x526cf3){return respondWithRpcPromise(_0x0a9e('0x1e'),_0x33161b['query'])[_0x0a9e('0x7')](findById(_0x33161b['params']['id']))[_0x0a9e('0x7')](respondWithResult(_0x526cf3,null))[_0x0a9e('0xa')](handleError(_0x526cf3,null));};exports[_0x0a9e('0x1f')]=function(_0x14433c,_0x140511){return respondWithRpcPromise(_0x0a9e('0x20'),_[_0x0a9e('0x18')](_0x14433c[_0x0a9e('0x21')],_0x14433c['params']))[_0x0a9e('0x7')](respondWithResult(_0x140511,null))[_0x0a9e('0xa')](handleError(_0x140511,null));};exports[_0x0a9e('0x22')]=function(_0x2ec755,_0x5c877d){return respondWithRpcPromise(_0x0a9e('0x23'),_[_0x0a9e('0x18')](_0x2ec755[_0x0a9e('0x15')],_0x2ec755[_0x0a9e('0x19')]))[_0x0a9e('0x7')](respondWithResult(_0x5c877d,null))[_0x0a9e('0xa')](handleError(_0x5c877d,null));};exports[_0x0a9e('0x24')]=function(_0x2e8759,_0x1dbde2){return respondWithRpcPromise('VoiceQueuesChannels',_0x2e8759[_0x0a9e('0x15')])['then'](respondWithResult(_0x1dbde2,null))[_0x0a9e('0xa')](handleError(_0x1dbde2,null));};exports[_0x0a9e('0x25')]=function(_0x1122db,_0x33bdb7){return respondWithRpcPromise(_0x0a9e('0x26'),_['merge'](_0x1122db[_0x0a9e('0x15')],_0x1122db[_0x0a9e('0x19')]))[_0x0a9e('0x7')](respondWithResult(_0x33bdb7,null))[_0x0a9e('0xa')](handleError(_0x33bdb7,null));};exports[_0x0a9e('0x27')]=function(_0x409319,_0x332d35){return respondWithRpcPromise(_0x0a9e('0x28'),_['merge'](_0x409319[_0x0a9e('0x15')],_0x409319['params']))[_0x0a9e('0x7')](respondWithResult(_0x332d35,null))[_0x0a9e('0xa')](handleError(_0x332d35,null));};exports[_0x0a9e('0x29')]=function(_0x3f3d41,_0x567193){return respondWithRpcPromise(_0x0a9e('0x2a'),_[_0x0a9e('0x18')](_0x3f3d41[_0x0a9e('0x15')],_0x3f3d41[_0x0a9e('0x19')]))['then'](respondWithResult(_0x567193,null))['catch'](handleError(_0x567193,null));};exports[_0x0a9e('0x2b')]=function(_0x5640eb,_0x24936a){return respondWithRpcPromise(_0x0a9e('0x2c'),_0x5640eb[_0x0a9e('0x15')])[_0x0a9e('0x7')](respondWithResult(_0x24936a,null))['catch'](handleError(_0x24936a,null));};exports[_0x0a9e('0x2d')]=function(_0x3bfce8,_0x3cae){return respondWithRpcPromise('OutboundChannels',_0x3bfce8[_0x0a9e('0x15')])[_0x0a9e('0x7')](respondWithResult(_0x3cae,null))[_0x0a9e('0xa')](handleError(_0x3cae,null));};exports['agents']=function(_0x546ef8,_0x11b61d){var _0x40d766;return respondWithRpcPromise('Agents',_0x546ef8[_0x0a9e('0x15')])[_0x0a9e('0x7')](function(_0x2e1b3a){_0x40d766=_0x2e1b3a;return respondWithRpcPromise(_0x0a9e('0x2e'),_0x546ef8['query'],routingClient);})['then'](function(_0x15e37d){return _[_0x0a9e('0x18')]({},_0x15e37d,_0x40d766);})['then'](respondWithResult(_0x11b61d,null))[_0x0a9e('0xa')](handleError(_0x11b61d,null));};exports[_0x0a9e('0x2f')]=function(_0x1459bb,_0x5b4f5e){if(_0x1459bb[_0x0a9e('0x21')]&&_0x1459bb[_0x0a9e('0x21')][_0x0a9e('0x30')]&&_0x1459bb[_0x0a9e('0x31')]&&_0x1459bb[_0x0a9e('0x31')][_0x0a9e('0xe')]){for(var _0x2881b3 in _0x1459bb[_0x0a9e('0x21')][_0x0a9e('0x30')]){if(_0x1459bb[_0x0a9e('0x21')][_0x0a9e('0x30')][_0x0a9e('0x32')](_0x2881b3)){db[_0x0a9e('0x33')][_0x0a9e('0x34')]({'where':{'channel':_0x2881b3,'membername':_0x1459bb[_0x0a9e('0x31')]['name'],'type':'INTERACTION','exitAt':null,'uniqueid':_0x1459bb[_0x0a9e('0x21')][_0x0a9e('0x30')][_0x2881b3]&&_0x1459bb[_0x0a9e('0x21')][_0x0a9e('0x30')][_0x2881b3][_0x0a9e('0x35')]?{'$notIn':_0x1459bb[_0x0a9e('0x21')][_0x0a9e('0x30')][_0x2881b3]}:{'$ne':null}}})[_0x0a9e('0x7')](function(_0x432fcc){var _0x25c6e6=moment()[_0x0a9e('0x36')](_0x0a9e('0x37'));for(var _0x5026aa=0x0,_0x117c99=_0x432fcc[_0x0a9e('0x35')];_0x5026aa<_0x117c99;_0x5026aa+=0x1){_0x432fcc[_0x5026aa][_0x0a9e('0x38')]({'exitAt':_0x25c6e6});}});for(var _0xfbd5ad=0x0;_0xfbd5ad<_0x1459bb[_0x0a9e('0x21')][_0x0a9e('0x30')][_0x2881b3][_0x0a9e('0x35')];_0xfbd5ad+=0x1){db[_0x0a9e('0x33')]['findOrCreate']({'where':{'channel':_0x2881b3,'membername':_0x1459bb[_0x0a9e('0x31')]['name'],'type':_0x0a9e('0x39'),'uniqueid':_0x1459bb[_0x0a9e('0x21')][_0x0a9e('0x30')][_0x2881b3][_0xfbd5ad],'exitAt':null},'defaults':{'channel':_0x2881b3,'membername':_0x1459bb['user'][_0x0a9e('0xe')],'interface':_[_0x0a9e('0x10')](_0x1459bb[_0x0a9e('0x31')][_0x0a9e('0x3a')])?util[_0x0a9e('0x36')](_0x0a9e('0x3b'),_0x1459bb[_0x0a9e('0x31')]['name']):_0x1459bb[_0x0a9e('0x31')][_0x0a9e('0x3a')],'type':_0x0a9e('0x39'),'enterAt':moment()[_0x0a9e('0x36')](_0x0a9e('0x37')),'role':_0x0a9e('0x3c'),'internal':_0x1459bb[_0x0a9e('0x31')][_0x0a9e('0x3d')],'uniqueid':_0x1459bb[_0x0a9e('0x21')]['interaction'][_0x2881b3][_0xfbd5ad]}});}}}}return respondWithRpcPromise(_0x0a9e('0x3e'),{'id':_0x1459bb[_0x0a9e('0x19')]['id'],'capacity':_0x1459bb['body']['capacity']},routingClient)['then'](respondWithResult(_0x5b4f5e,null))[_0x0a9e('0xa')](handleError(_0x5b4f5e,null));};exports[_0x0a9e('0x3f')]=function(_0x37edaa,_0x11545a){return respondWithRpcPromise(_0x0a9e('0x40'),_0x37edaa[_0x0a9e('0x15')])[_0x0a9e('0x7')](respondWithResult(_0x11545a,null))[_0x0a9e('0xa')](handleError(_0x11545a,null));};exports['trunks']=function(_0x4b1b9f,_0x53975a){return respondWithRpcPromise(_0x0a9e('0x41'),_0x4b1b9f[_0x0a9e('0x15')])[_0x0a9e('0x7')](respondWithResult(_0x53975a,null))['catch'](handleError(_0x53975a,null));};exports[_0x0a9e('0x42')]=function(_0x161aa7,_0x53d113){return respondWithRpcPromise('Campaigns',_0x161aa7[_0x0a9e('0x15')])['then'](respondWithResult(_0x53d113,null))[_0x0a9e('0xa')](handleError(_0x53d113,null));};exports['chatQueues']=function(_0x2e5e62,_0x3c20b2){return respondWithRpcPromise(_0x0a9e('0x43'),_0x2e5e62['query'],routingClient)[_0x0a9e('0x7')](respondWithResult(_0x3c20b2,null))[_0x0a9e('0xa')](handleError(_0x3c20b2,null));};exports['showChatQueues']=function(_0x50f687,_0x128aa6){return respondWithRpcPromise(_0x0a9e('0x43'),_0x50f687['query'],routingClient)[_0x0a9e('0x7')](findById(_0x50f687['params']['id']))[_0x0a9e('0x7')](respondWithResult(_0x128aa6,null))['catch'](handleError(_0x128aa6,null));};exports[_0x0a9e('0x44')]=function(_0x4a6deb,_0x5da27d){return respondWithRpcPromise('MailQueues',_0x4a6deb[_0x0a9e('0x15')],routingClient)['then'](respondWithResult(_0x5da27d,null))[_0x0a9e('0xa')](handleError(_0x5da27d,null));};exports[_0x0a9e('0x45')]=function(_0x3cfd00,_0x19b4df){return respondWithRpcPromise(_0x0a9e('0x46'),_0x3cfd00[_0x0a9e('0x15')],routingClient)[_0x0a9e('0x7')](findById(_0x3cfd00[_0x0a9e('0x19')]['id']))['then'](respondWithResult(_0x19b4df,null))[_0x0a9e('0xa')](handleError(_0x19b4df,null));};exports[_0x0a9e('0x47')]=function(_0x2642bb,_0x30c491){return respondWithRpcPromise(_0x0a9e('0x48'),_0x2642bb[_0x0a9e('0x15')],mailClient)['then'](respondWithResult(_0x30c491,null))[_0x0a9e('0xa')](handleError(_0x30c491,null));};exports[_0x0a9e('0x49')]=function(_0x5239ef,_0x3649cc){return respondWithRpcPromise('OpenchannelQueues',_0x5239ef[_0x0a9e('0x15')],routingClient)['then'](respondWithResult(_0x3649cc,null))['catch'](handleError(_0x3649cc,null));};exports['showOpenchannelQueues']=function(_0x273cb5,_0x49d231){return respondWithRpcPromise(_0x0a9e('0x4a'),_0x273cb5[_0x0a9e('0x15')],routingClient)[_0x0a9e('0x7')](findById(_0x273cb5[_0x0a9e('0x19')]['id']))[_0x0a9e('0x7')](respondWithResult(_0x49d231,null))[_0x0a9e('0xa')](handleError(_0x49d231,null));};exports['smsQueues']=function(_0x1627a7,_0x5854cc){return respondWithRpcPromise(_0x0a9e('0x4b'),_0x1627a7[_0x0a9e('0x15')],routingClient)[_0x0a9e('0x7')](respondWithResult(_0x5854cc,null))['catch'](handleError(_0x5854cc,null));};exports[_0x0a9e('0x4c')]=function(_0x156f1c,_0x119677){return respondWithRpcPromise(_0x0a9e('0x4b'),_0x156f1c['query'],routingClient)[_0x0a9e('0x7')](findById(_0x156f1c[_0x0a9e('0x19')]['id']))['then'](respondWithResult(_0x119677,null))[_0x0a9e('0xa')](handleError(_0x119677,null));};exports[_0x0a9e('0x4d')]=function(_0x88dcbf,_0x409b29){return respondWithRpcPromise(_0x0a9e('0x4e'),_0x88dcbf['query'],routingClient)[_0x0a9e('0x7')](respondWithResult(_0x409b29,null))[_0x0a9e('0xa')](handleError(_0x409b29,null));};exports[_0x0a9e('0x4f')]=function(_0x47bb43,_0x3528b7){return respondWithRpcPromise('WhatsappQueues',_0x47bb43['query'],routingClient)[_0x0a9e('0x7')](findById(_0x47bb43[_0x0a9e('0x19')]['id']))[_0x0a9e('0x7')](respondWithResult(_0x3528b7,null))[_0x0a9e('0xa')](handleError(_0x3528b7,null));};exports[_0x0a9e('0x50')]=function(_0xc8c264,_0x387489){return respondWithRpcPromise(_0x0a9e('0x51'),_0xc8c264[_0x0a9e('0x15')],routingClient)[_0x0a9e('0x7')](respondWithResult(_0x387489,null))[_0x0a9e('0xa')](handleError(_0x387489,null));};exports[_0x0a9e('0x52')]=function(_0x2bbb86,_0x2b8192){return respondWithRpcPromise(_0x0a9e('0x51'),_0x2bbb86[_0x0a9e('0x15')],routingClient)[_0x0a9e('0x7')](findById(_0x2bbb86[_0x0a9e('0x19')]['id']))['then'](respondWithResult(_0x2b8192,null))[_0x0a9e('0xa')](handleError(_0x2b8192,null));};exports[_0x0a9e('0x53')]=function(_0x243d12,_0x4edbb0){return respondWithRpcPromise(_0x0a9e('0x54'),_0x243d12[_0x0a9e('0x15')])['then'](respondWithResult(_0x4edbb0,null))[_0x0a9e('0xa')](handleError(_0x4edbb0,null));};exports[_0x0a9e('0x55')]=function(_0x3ef315,_0x427946){return respondWithRpcPromise(_0x0a9e('0x56'),_0x3ef315['query'],routingClient)['then'](respondWithResult(_0x427946,null))['catch'](handleError(_0x427946,null));};exports[_0x0a9e('0x57')]=function(_0x18bf5d,_0x1104ad){return respondWithRpcPromise(_0x0a9e('0x58'),_0x18bf5d[_0x0a9e('0x15')],routingClient)[_0x0a9e('0x7')](respondWithResult(_0x1104ad,null))[_0x0a9e('0xa')](handleError(_0x1104ad,null));};exports[_0x0a9e('0x59')]=function(_0x5512d1,_0x235f8f){return respondWithRpcPromise(_0x0a9e('0x5a'),_0x5512d1[_0x0a9e('0x15')],routingClient)['then'](respondWithResult(_0x235f8f,null))[_0x0a9e('0xa')](handleError(_0x235f8f,null));};exports['openchannelQueuesIdWaitingInteractions']=function(_0x4437ff,_0x44351d){return respondWithRpcPromise('OpenchannelQueuesWaitingInteractions',_0x4437ff[_0x0a9e('0x15')],routingClient)[_0x0a9e('0x7')](function(_0x2cc7a7){if(_0x4437ff[_0x0a9e('0x15')]['type']!==undefined){var _0x1d442c=_(_0x2cc7a7[_0x0a9e('0x12')])[_0x0a9e('0x5b')]([_0x4437ff[_0x0a9e('0x15')]['type'],_0x4437ff[_0x0a9e('0x19')]['id']])[_0x0a9e('0x5c')](_0x0a9e('0x5d'))[_0x0a9e('0x5e')]()['value']();return _0x2cc7a7[_0x0a9e('0x12')][_0x0a9e('0x5b')](function(_0x30a4c7){return _0x1d442c[_0x0a9e('0x5f')](_0x30a4c7[_0x0a9e('0x5d')])>-0x1;});}else{return _0x2cc7a7[_0x0a9e('0x12')][_0x0a9e('0x5b')](function(_0x3df0e3){return _0x3df0e3[_0x0a9e('0x5d')]===parseInt(_0x4437ff[_0x0a9e('0x19')]['id']);});}})[_0x0a9e('0x7')](respondWithResult(_0x44351d,null))[_0x0a9e('0xa')](handleError(_0x44351d,null));};exports[_0x0a9e('0x60')]=function(_0xe0749e,_0x5b35db){return respondWithRpcPromise(_0x0a9e('0x61'),_0xe0749e[_0x0a9e('0x15')],routingClient)[_0x0a9e('0x7')](respondWithResult(_0x5b35db,null))['catch'](handleError(_0x5b35db,null));};exports[_0x0a9e('0x62')]=function(_0x33dda0,_0x8cea96){return respondWithRpcPromise(_0x0a9e('0x63'),_0x33dda0['query'],routingClient)['then'](respondWithResult(_0x8cea96,null))[_0x0a9e('0xa')](handleError(_0x8cea96,null));};exports[_0x0a9e('0x64')]=function(_0x4c54fa,_0x45108c){return respondWithRpcPromise('FaxQueuesWaitingInteractions',_0x4c54fa[_0x0a9e('0x15')],routingClient)[_0x0a9e('0x7')](respondWithResult(_0x45108c,null))['catch'](handleError(_0x45108c,null));};exports[_0x0a9e('0x65')]=function(_0x41cf12){return function(_0x2d2286,_0x42b959){var _0x3755fe,_0x1f42a0;var _0x444f1f=_['capitalize'](_0x41cf12);var _0x2973d3=_0x41cf12===_0x0a9e('0x66')?_0x0a9e('0x67'):_0x0a9e('0x68');return db[_0x444f1f+'Queue'][_0x0a9e('0x69')]({'raw':!![],'where':{'id':_0x2d2286[_0x0a9e('0x19')]['id']}})['then'](function(_0x1d6834){if(_['isNil'](_0x1d6834)){throw new Error(_0x444f1f+_0x0a9e('0x6a'));}_0x3755fe=_0x1d6834;return db[_0x444f1f+_0x0a9e('0x6b')][_0x0a9e('0x69')]({'where':{'id':_0x2d2286[_0x0a9e('0x21')]['messageId']},'include':[{'model':db[_0x444f1f+'Interaction'],'as':_0x0a9e('0x6c')},{'model':db[_0x444f1f+_0x2973d3],'as':_0x0a9e('0x68')}]});})[_0x0a9e('0x7')](function(_0x5ac73d){if(_[_0x0a9e('0x10')](_0x5ac73d)){throw new Error(_0x444f1f+_0x0a9e('0x6d'));}_0x1f42a0=_0x5ac73d;return _0x5ac73d['update']({'read':0x0,'readAt':null,'UserId':null});})['then'](function(){var _0xf0a802={'uniqueid':_0x41cf12+'.'+_0x1f42a0['id']+'.'+_0x1f42a0['Interaction']['id'],'FromUserId':_0x2d2286['user']['id'],'type':'queue'};_0xf0a802[_0x444f1f+_0x0a9e('0x6e')]=_0x1f42a0['id'];_0xf0a802[_0x444f1f+_0x0a9e('0x6f')]=_0x1f42a0[_0x0a9e('0x6c')]['id'];_0xf0a802[_0x0a9e('0x70')+_0x444f1f+_0x2973d3+'Id']=_0x1f42a0[_0x0a9e('0x68')]['id'];_0xf0a802['To'+_0x444f1f+_0x0a9e('0x71')]=_0x3755fe['id'];return db[_0x444f1f+'TransferReport'][_0x0a9e('0x72')](_0xf0a802);})['then'](function(){return respondWithRpcPromise(_0x0a9e('0x73'),{'channel':_0x41cf12,'interaction':_0x1f42a0[_0x0a9e('0x6c')],'message':_0x1f42a0,'account':_0x1f42a0[_0x0a9e('0x68')],'applications':[{'id':0x0,'priority':0x1,'app':_0x0a9e('0x74'),'appdata':_0x3755fe['name']+','+(_0x1f42a0[_0x0a9e('0x68')][_0x0a9e('0x75')]||0x12c),'interval':_0x0a9e('0x76')}],'transfer':!![]},routingClient);})['then'](respondWithResult(_0x42b959,null))[_0x0a9e('0xa')](handleError(_0x42b959,null));};};exports[_0x0a9e('0x77')]=function(_0x2a563d,_0x22063c){var _0x255e49,_0x1910bf;if(_[_0x0a9e('0x10')](_0x2a563d[_0x0a9e('0x21')]['channel'])){throw new Error(_0x0a9e('0x78'));}var _0x3325c5=_0x2a563d['body'][_0x0a9e('0x79')];var _0x982340=_[_0x0a9e('0x7a')](_0x3325c5);var _0x5a26c8=_0x3325c5===_0x0a9e('0x66')?'Website':_0x0a9e('0x68');return db[_0x0a9e('0x7b')][_0x0a9e('0x69')]({'raw':!![],'where':{'id':_0x2a563d[_0x0a9e('0x19')]['id'],'role':_0x0a9e('0x3c')}})[_0x0a9e('0x7')](function(_0x16a039){if(_[_0x0a9e('0x10')](_0x16a039)){throw new Error('Agent\x20not\x20found');}_0x255e49=_0x16a039;return db[_0x982340+_0x0a9e('0x6b')][_0x0a9e('0x69')]({'where':{'id':_0x2a563d[_0x0a9e('0x21')][_0x0a9e('0x7c')]},'include':[{'model':db[_0x982340+_0x0a9e('0x6c')],'as':_0x0a9e('0x6c')},{'model':db[_0x982340+_0x5a26c8],'as':_0x0a9e('0x68')}]});})[_0x0a9e('0x7')](function(_0x1808ba){if(_[_0x0a9e('0x10')](_0x1808ba)){throw new Error(_0x982340+_0x0a9e('0x6d'));}_0x1910bf=_0x1808ba;return _0x1808ba[_0x0a9e('0x7d')]({'read':0x0,'readAt':null,'UserId':null});})[_0x0a9e('0x7')](function(){var _0x4989f9={'uniqueid':_0x3325c5+'.'+_0x1910bf['id']+'.'+_0x1910bf[_0x0a9e('0x6c')]['id'],'FromUserId':_0x2a563d[_0x0a9e('0x31')]['id'],'type':_0x0a9e('0x3c'),'ToUserId':_0x255e49['id']};_0x4989f9[_0x982340+_0x0a9e('0x6e')]=_0x1910bf['id'];_0x4989f9[_0x982340+_0x0a9e('0x6f')]=_0x1910bf['Interaction']['id'];_0x4989f9[_0x0a9e('0x70')+_0x982340+_0x5a26c8+'Id']=_0x1910bf[_0x0a9e('0x68')]['id'];return db[_0x982340+'TransferReport'][_0x0a9e('0x72')](_0x4989f9);})['then'](function(){return respondWithRpcPromise(_0x0a9e('0x73'),{'channel':_0x3325c5,'interaction':_0x1910bf[_0x0a9e('0x6c')],'message':_0x1910bf,'account':_0x1910bf[_0x0a9e('0x68')],'applications':[{'id':0x0,'priority':0x1,'app':_0x0a9e('0x3c'),'appdata':_0x255e49['name']+','+(_0x1910bf[_0x0a9e('0x68')]['agentTransferTimeout']||0x12c),'interval':_0x0a9e('0x76')}],'transfer':!![]},routingClient);})[_0x0a9e('0x7')](respondWithResult(_0x22063c,null))['catch'](handleError(_0x22063c,null));};
\ No newline at end of file
+var _0xe706=['indexOf','queue_id','smsQueuesWaitingInteractions','SmsQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','WhatsappQueuesWaitingInteractions','faxQueuesWaitingInteractions','FaxQueuesWaitingInteractions','queueNotify','capitalize','Website','Queue','\x20Queue\x20not\x20found','Message','findOne','Interaction','Account','update','queue','MessageId','InteractionId','TransferReport','*,*,*,*','agentNotify','channel','Channel\x20field\x20is\x20mandatory','chat','User','Agent\x20not\x20found','messageId','\x20Message\x20not\x20found','From','create','Start','agentTransferTimeout','bluebird','moment','lodash','../../mysqldb','../../config/logger','api','jayson/promise','client','http','request','then','error','code','message','result','catch','status','json','name','send','isNil','rows','VoiceChannels','query','voiceChannelMixMonitor','VoiceChannelMixMonitor','merge','params','VoiceChannelStopMixMonitor','voiceQueues','VoiceQueues','showVoiceQueues','UpdateVoiceQueue','body','voiceQueuesPreview','VoiceQueuesPreview','voiceQueuesChannels','VoiceQueuesChannels','VoiceQueuesChannel','voiceQueuesChannelHangup','VoiceQueuesChannelHangup','voiceQueuesChannelRedirect','VoiceQueuesChannelRedirect','Outbound','outboundChannels','OutboundChannels','agents','Agents','agentCapacity','user','hasOwnProperty','MemberReport','findAll','INTERACTION','interaction','length','format','YYYY-MM-DD\x20HH:mm:ss','updateAttributes','SIP/%s','interface','agent','internal','capacity','Telephones','trunks','Trunks','campaigns','Campaigns','chatQueues','ChatQueues','showChatQueues','mailQueues','MailQueues','showMailQueues','OpenchannelQueues','showOpenchannelQueues','showSmsQueues','SmsQueues','whatsappQueues','WhatsappQueues','faxQueues','showFaxQueues','faxAccounts','FaxAccounts','chatQueuesWaitingInteractions','ChatQueuesWaitingInteractions','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','OpenchannelQueuesWaitingInteractions','type','filter','uniq'];(function(_0x2e7c2a,_0x375a1d){var _0x55f9bb=function(_0x1b8d06){while(--_0x1b8d06){_0x2e7c2a['push'](_0x2e7c2a['shift']());}};_0x55f9bb(++_0x375a1d);}(_0xe706,0xa3));var _0x6e70=function(_0x23e5ce,_0x57584d){_0x23e5ce=_0x23e5ce-0x0;var _0x2ce19b=_0xe706[_0x23e5ce];return _0x2ce19b;};'use strict';var BPromise=require(_0x6e70('0x0'));var moment=require(_0x6e70('0x1'));var _=require(_0x6e70('0x2'));var util=require('util');var db=require(_0x6e70('0x3'))['db'];var logger=require(_0x6e70('0x4'))(_0x6e70('0x5'));var jayson=require(_0x6e70('0x6'));var amiClient=jayson[_0x6e70('0x7')][_0x6e70('0x8')]({'port':0x232a});var mailClient=jayson[_0x6e70('0x7')][_0x6e70('0x8')]({'port':0x232b});var routingClient=jayson[_0x6e70('0x7')][_0x6e70('0x8')]({'port':0x232c});function respondWithRpcPromise(_0x36357b,_0x293ce7,_0x45a2d4){return new BPromise(function(_0x188ed3,_0x3c4843){var _0x449b48=_0x45a2d4?_0x45a2d4:amiClient;return _0x449b48[_0x6e70('0x9')](_0x36357b,_0x293ce7)[_0x6e70('0xa')](function(_0x100eb7){if(_0x100eb7[_0x6e70('0xb')]){if(_0x100eb7[_0x6e70('0xb')][_0x6e70('0xc')]===0x1f4){return _0x3c4843(_0x100eb7[_0x6e70('0xb')][_0x6e70('0xd')]);}return _0x188ed3(_0x100eb7['error']['message']);}else{_0x188ed3(_0x100eb7[_0x6e70('0xe')]);}})[_0x6e70('0xf')](function(_0x18cf27){_0x3c4843(_0x18cf27);});});}function respondWithResult(_0x27dd9b,_0x3b38f3){_0x3b38f3=_0x3b38f3||0xc8;return function(_0x310eb7){if(_0x310eb7){return _0x27dd9b[_0x6e70('0x10')](_0x3b38f3)[_0x6e70('0x11')](_0x310eb7);}return _0x27dd9b['sendStatus'](0x194);};}function handleError(_0x52737e,_0x48bc72){_0x48bc72=_0x48bc72||0x1f4;return function(_0x257e81){logger['error'](_0x257e81['stack']);if(_0x257e81[_0x6e70('0x12')]){delete _0x257e81[_0x6e70('0x12')];}_0x52737e['status'](_0x48bc72)[_0x6e70('0x13')](_0x257e81);};}function findById(_0x5c3fe7){return function(_0x2efc0f){if(!_[_0x6e70('0x14')](_0x5c3fe7)&&!_['isNil'](_0x2efc0f)&&!_['isNil'](_0x2efc0f[_0x6e70('0x15')])){return _['find'](_0x2efc0f[_0x6e70('0x15')],function(_0x173afe){return _0x173afe['id']==_0x5c3fe7;});}return null;};}exports['voiceChannels']=function(_0x497d61,_0xc238ba){return respondWithRpcPromise(_0x6e70('0x16'),_0x497d61[_0x6e70('0x17')])[_0x6e70('0xa')](respondWithResult(_0xc238ba,null))[_0x6e70('0xf')](handleError(_0xc238ba,null));};exports[_0x6e70('0x18')]=function(_0x1b2453,_0x44a49f){return respondWithRpcPromise(_0x6e70('0x19'),_[_0x6e70('0x1a')](_0x1b2453['query'],_0x1b2453[_0x6e70('0x1b')]))[_0x6e70('0xa')](respondWithResult(_0x44a49f,null))[_0x6e70('0xf')](handleError(_0x44a49f,null));};exports['voiceChannelStopMixMonitor']=function(_0x3ccd87,_0xa5d49){return respondWithRpcPromise(_0x6e70('0x1c'),_['merge'](_0x3ccd87[_0x6e70('0x17')],_0x3ccd87['params']))['then'](respondWithResult(_0xa5d49,null))['catch'](handleError(_0xa5d49,null));};exports[_0x6e70('0x1d')]=function(_0x19c5ae,_0x51d292){return respondWithRpcPromise(_0x6e70('0x1e'),_0x19c5ae[_0x6e70('0x17')])['then'](respondWithResult(_0x51d292,null))[_0x6e70('0xf')](handleError(_0x51d292,null));};exports[_0x6e70('0x1f')]=function(_0x2bb231,_0x4a67ac){return respondWithRpcPromise('VoiceQueues',_0x2bb231[_0x6e70('0x17')])[_0x6e70('0xa')](findById(_0x2bb231[_0x6e70('0x1b')]['id']))[_0x6e70('0xa')](respondWithResult(_0x4a67ac,null))[_0x6e70('0xf')](handleError(_0x4a67ac,null));};exports['updateVoiceQueue']=function(_0x1952ea,_0x406f29){return respondWithRpcPromise(_0x6e70('0x20'),_[_0x6e70('0x1a')](_0x1952ea[_0x6e70('0x21')],_0x1952ea[_0x6e70('0x1b')]))[_0x6e70('0xa')](respondWithResult(_0x406f29,null))[_0x6e70('0xf')](handleError(_0x406f29,null));};exports[_0x6e70('0x22')]=function(_0x3a5d30,_0x4b1229){return respondWithRpcPromise(_0x6e70('0x23'),_['merge'](_0x3a5d30[_0x6e70('0x17')],_0x3a5d30['params']))[_0x6e70('0xa')](respondWithResult(_0x4b1229,null))[_0x6e70('0xf')](handleError(_0x4b1229,null));};exports[_0x6e70('0x24')]=function(_0x56f6f7,_0x38c40d){return respondWithRpcPromise(_0x6e70('0x25'),_0x56f6f7['query'])[_0x6e70('0xa')](respondWithResult(_0x38c40d,null))[_0x6e70('0xf')](handleError(_0x38c40d,null));};exports['voiceQueuesChannel']=function(_0x10d8f6,_0x3665a1){return respondWithRpcPromise(_0x6e70('0x26'),_[_0x6e70('0x1a')](_0x10d8f6[_0x6e70('0x17')],_0x10d8f6[_0x6e70('0x1b')]))[_0x6e70('0xa')](respondWithResult(_0x3665a1,null))[_0x6e70('0xf')](handleError(_0x3665a1,null));};exports[_0x6e70('0x27')]=function(_0x419a41,_0x4d32d8){return respondWithRpcPromise(_0x6e70('0x28'),_['merge'](_0x419a41[_0x6e70('0x17')],_0x419a41[_0x6e70('0x1b')]))[_0x6e70('0xa')](respondWithResult(_0x4d32d8,null))[_0x6e70('0xf')](handleError(_0x4d32d8,null));};exports[_0x6e70('0x29')]=function(_0x989b80,_0x2440be){return respondWithRpcPromise(_0x6e70('0x2a'),_[_0x6e70('0x1a')](_0x989b80[_0x6e70('0x17')],_0x989b80[_0x6e70('0x1b')]))[_0x6e70('0xa')](respondWithResult(_0x2440be,null))[_0x6e70('0xf')](handleError(_0x2440be,null));};exports['outbound']=function(_0x5446a2,_0x5424eb){return respondWithRpcPromise(_0x6e70('0x2b'),_0x5446a2[_0x6e70('0x17')])[_0x6e70('0xa')](respondWithResult(_0x5424eb,null))[_0x6e70('0xf')](handleError(_0x5424eb,null));};exports[_0x6e70('0x2c')]=function(_0x3bdd87,_0x572a71){return respondWithRpcPromise(_0x6e70('0x2d'),_0x3bdd87[_0x6e70('0x17')])[_0x6e70('0xa')](respondWithResult(_0x572a71,null))[_0x6e70('0xf')](handleError(_0x572a71,null));};exports[_0x6e70('0x2e')]=function(_0x37bf46,_0x246e61){var _0x16fc7d;return respondWithRpcPromise('Agents',_0x37bf46[_0x6e70('0x17')])[_0x6e70('0xa')](function(_0x22fce9){_0x16fc7d=_0x22fce9;return respondWithRpcPromise(_0x6e70('0x2f'),_0x37bf46[_0x6e70('0x17')],routingClient);})[_0x6e70('0xa')](function(_0x21b0e7){return _['merge']({},_0x21b0e7,_0x16fc7d);})['then'](respondWithResult(_0x246e61,null))['catch'](handleError(_0x246e61,null));};exports[_0x6e70('0x30')]=function(_0x2b63cc,_0x83847b){if(_0x2b63cc[_0x6e70('0x21')]&&_0x2b63cc[_0x6e70('0x21')]['interaction']&&_0x2b63cc[_0x6e70('0x31')]&&_0x2b63cc[_0x6e70('0x31')][_0x6e70('0x12')]){for(var _0x52b197 in _0x2b63cc['body']['interaction']){if(_0x2b63cc[_0x6e70('0x21')]['interaction'][_0x6e70('0x32')](_0x52b197)){db[_0x6e70('0x33')][_0x6e70('0x34')]({'where':{'channel':_0x52b197,'membername':_0x2b63cc[_0x6e70('0x31')]['name'],'type':_0x6e70('0x35'),'exitAt':null,'uniqueid':_0x2b63cc['body'][_0x6e70('0x36')][_0x52b197]&&_0x2b63cc[_0x6e70('0x21')][_0x6e70('0x36')][_0x52b197][_0x6e70('0x37')]?{'$notIn':_0x2b63cc['body'][_0x6e70('0x36')][_0x52b197]}:{'$ne':null}}})[_0x6e70('0xa')](function(_0x3d39c3){var _0xac87d6=moment()[_0x6e70('0x38')](_0x6e70('0x39'));for(var _0x3d9c5=0x0,_0x552e7e=_0x3d39c3[_0x6e70('0x37')];_0x3d9c5<_0x552e7e;_0x3d9c5+=0x1){_0x3d39c3[_0x3d9c5][_0x6e70('0x3a')]({'exitAt':_0xac87d6});}});for(var _0x10de2a=0x0;_0x10de2a<_0x2b63cc[_0x6e70('0x21')][_0x6e70('0x36')][_0x52b197][_0x6e70('0x37')];_0x10de2a+=0x1){db[_0x6e70('0x33')]['findOrCreate']({'where':{'channel':_0x52b197,'membername':_0x2b63cc[_0x6e70('0x31')]['name'],'type':_0x6e70('0x35'),'uniqueid':_0x2b63cc[_0x6e70('0x21')]['interaction'][_0x52b197][_0x10de2a],'exitAt':null},'defaults':{'channel':_0x52b197,'membername':_0x2b63cc['user'][_0x6e70('0x12')],'interface':_[_0x6e70('0x14')](_0x2b63cc[_0x6e70('0x31')]['interface'])?util['format'](_0x6e70('0x3b'),_0x2b63cc[_0x6e70('0x31')][_0x6e70('0x12')]):_0x2b63cc[_0x6e70('0x31')][_0x6e70('0x3c')],'type':_0x6e70('0x35'),'enterAt':moment()['format'](_0x6e70('0x39')),'role':_0x6e70('0x3d'),'internal':_0x2b63cc[_0x6e70('0x31')][_0x6e70('0x3e')],'uniqueid':_0x2b63cc[_0x6e70('0x21')]['interaction'][_0x52b197][_0x10de2a]}});}}}}return respondWithRpcPromise('AgentCapacity',{'id':_0x2b63cc[_0x6e70('0x1b')]['id'],'capacity':_0x2b63cc[_0x6e70('0x21')][_0x6e70('0x3f')]},routingClient)[_0x6e70('0xa')](respondWithResult(_0x83847b,null))[_0x6e70('0xf')](handleError(_0x83847b,null));};exports['telephones']=function(_0x41bd0b,_0x232366){return respondWithRpcPromise(_0x6e70('0x40'),_0x41bd0b[_0x6e70('0x17')])[_0x6e70('0xa')](respondWithResult(_0x232366,null))['catch'](handleError(_0x232366,null));};exports[_0x6e70('0x41')]=function(_0x1dd242,_0x2c20d3){return respondWithRpcPromise(_0x6e70('0x42'),_0x1dd242[_0x6e70('0x17')])[_0x6e70('0xa')](respondWithResult(_0x2c20d3,null))['catch'](handleError(_0x2c20d3,null));};exports[_0x6e70('0x43')]=function(_0x8d425d,_0x5c2396){return respondWithRpcPromise(_0x6e70('0x44'),_0x8d425d[_0x6e70('0x17')])['then'](respondWithResult(_0x5c2396,null))[_0x6e70('0xf')](handleError(_0x5c2396,null));};exports[_0x6e70('0x45')]=function(_0x2134c4,_0x46d536){return respondWithRpcPromise(_0x6e70('0x46'),_0x2134c4['query'],routingClient)[_0x6e70('0xa')](respondWithResult(_0x46d536,null))[_0x6e70('0xf')](handleError(_0x46d536,null));};exports[_0x6e70('0x47')]=function(_0x13be81,_0x1c02d7){return respondWithRpcPromise(_0x6e70('0x46'),_0x13be81[_0x6e70('0x17')],routingClient)[_0x6e70('0xa')](findById(_0x13be81[_0x6e70('0x1b')]['id']))[_0x6e70('0xa')](respondWithResult(_0x1c02d7,null))[_0x6e70('0xf')](handleError(_0x1c02d7,null));};exports[_0x6e70('0x48')]=function(_0xb8f78,_0x1fd9a6){return respondWithRpcPromise(_0x6e70('0x49'),_0xb8f78[_0x6e70('0x17')],routingClient)[_0x6e70('0xa')](respondWithResult(_0x1fd9a6,null))[_0x6e70('0xf')](handleError(_0x1fd9a6,null));};exports[_0x6e70('0x4a')]=function(_0x1c7dca,_0x4c6aab){return respondWithRpcPromise(_0x6e70('0x49'),_0x1c7dca[_0x6e70('0x17')],routingClient)[_0x6e70('0xa')](findById(_0x1c7dca[_0x6e70('0x1b')]['id']))[_0x6e70('0xa')](respondWithResult(_0x4c6aab,null))[_0x6e70('0xf')](handleError(_0x4c6aab,null));};exports['mailAccounts']=function(_0x42bd85,_0x6cabf0){return respondWithRpcPromise('MailAccounts',_0x42bd85[_0x6e70('0x17')],mailClient)[_0x6e70('0xa')](respondWithResult(_0x6cabf0,null))[_0x6e70('0xf')](handleError(_0x6cabf0,null));};exports['openchannelQueues']=function(_0x51f268,_0x2f9be4){return respondWithRpcPromise(_0x6e70('0x4b'),_0x51f268[_0x6e70('0x17')],routingClient)[_0x6e70('0xa')](respondWithResult(_0x2f9be4,null))[_0x6e70('0xf')](handleError(_0x2f9be4,null));};exports[_0x6e70('0x4c')]=function(_0x30cd88,_0x57bfe5){return respondWithRpcPromise('OpenchannelQueues',_0x30cd88[_0x6e70('0x17')],routingClient)[_0x6e70('0xa')](findById(_0x30cd88[_0x6e70('0x1b')]['id']))[_0x6e70('0xa')](respondWithResult(_0x57bfe5,null))['catch'](handleError(_0x57bfe5,null));};exports['smsQueues']=function(_0x2e972b,_0x4e5545){return respondWithRpcPromise('SmsQueues',_0x2e972b['query'],routingClient)[_0x6e70('0xa')](respondWithResult(_0x4e5545,null))['catch'](handleError(_0x4e5545,null));};exports[_0x6e70('0x4d')]=function(_0x23900b,_0x3b4da0){return respondWithRpcPromise(_0x6e70('0x4e'),_0x23900b[_0x6e70('0x17')],routingClient)[_0x6e70('0xa')](findById(_0x23900b[_0x6e70('0x1b')]['id']))[_0x6e70('0xa')](respondWithResult(_0x3b4da0,null))['catch'](handleError(_0x3b4da0,null));};exports[_0x6e70('0x4f')]=function(_0x6a560f,_0x22c836){return respondWithRpcPromise(_0x6e70('0x50'),_0x6a560f[_0x6e70('0x17')],routingClient)['then'](respondWithResult(_0x22c836,null))['catch'](handleError(_0x22c836,null));};exports['showWhatsappQueues']=function(_0x1bb338,_0xd91b9){return respondWithRpcPromise(_0x6e70('0x50'),_0x1bb338['query'],routingClient)['then'](findById(_0x1bb338[_0x6e70('0x1b')]['id']))[_0x6e70('0xa')](respondWithResult(_0xd91b9,null))[_0x6e70('0xf')](handleError(_0xd91b9,null));};exports[_0x6e70('0x51')]=function(_0x2285f1,_0x32b884){return respondWithRpcPromise('FaxQueues',_0x2285f1[_0x6e70('0x17')],routingClient)[_0x6e70('0xa')](respondWithResult(_0x32b884,null))[_0x6e70('0xf')](handleError(_0x32b884,null));};exports[_0x6e70('0x52')]=function(_0x515c0c,_0xce964b){return respondWithRpcPromise('FaxQueues',_0x515c0c['query'],routingClient)[_0x6e70('0xa')](findById(_0x515c0c[_0x6e70('0x1b')]['id']))[_0x6e70('0xa')](respondWithResult(_0xce964b,null))[_0x6e70('0xf')](handleError(_0xce964b,null));};exports[_0x6e70('0x53')]=function(_0x2be0fc,_0x4b5b19){return respondWithRpcPromise(_0x6e70('0x54'),_0x2be0fc[_0x6e70('0x17')])[_0x6e70('0xa')](respondWithResult(_0x4b5b19,null))[_0x6e70('0xf')](handleError(_0x4b5b19,null));};exports[_0x6e70('0x55')]=function(_0x13c092,_0x363722){return respondWithRpcPromise(_0x6e70('0x56'),_0x13c092[_0x6e70('0x17')],routingClient)[_0x6e70('0xa')](respondWithResult(_0x363722,null))['catch'](handleError(_0x363722,null));};exports[_0x6e70('0x57')]=function(_0x303c5a,_0x577c3b){return respondWithRpcPromise('MailQueuesWaitingInteractions',_0x303c5a['query'],routingClient)[_0x6e70('0xa')](respondWithResult(_0x577c3b,null))[_0x6e70('0xf')](handleError(_0x577c3b,null));};exports[_0x6e70('0x58')]=function(_0x14bb74,_0x5a3dcb){return respondWithRpcPromise('OpenchannelQueuesWaitingInteractions',_0x14bb74['query'],routingClient)[_0x6e70('0xa')](respondWithResult(_0x5a3dcb,null))[_0x6e70('0xf')](handleError(_0x5a3dcb,null));};exports['openchannelQueuesIdWaitingInteractions']=function(_0x58666a,_0x1c7c5f){return respondWithRpcPromise(_0x6e70('0x59'),_0x58666a[_0x6e70('0x17')],routingClient)[_0x6e70('0xa')](function(_0x44bf96){if(_0x58666a[_0x6e70('0x17')][_0x6e70('0x5a')]!==undefined){var _0x3650e9=_(_0x44bf96[_0x6e70('0x15')])[_0x6e70('0x5b')]([_0x58666a[_0x6e70('0x17')][_0x6e70('0x5a')],_0x58666a[_0x6e70('0x1b')]['id']])['map']('queue_id')[_0x6e70('0x5c')]()['value']();return _0x44bf96[_0x6e70('0x15')]['filter'](function(_0x5b5471){return _0x3650e9[_0x6e70('0x5d')](_0x5b5471['queue_id'])>-0x1;});}else{return _0x44bf96['rows'][_0x6e70('0x5b')](function(_0x21e4c2){return _0x21e4c2[_0x6e70('0x5e')]===parseInt(_0x58666a['params']['id']);});}})['then'](respondWithResult(_0x1c7c5f,null))['catch'](handleError(_0x1c7c5f,null));};exports[_0x6e70('0x5f')]=function(_0x512b0a,_0x2e8ed3){return respondWithRpcPromise(_0x6e70('0x60'),_0x512b0a[_0x6e70('0x17')],routingClient)[_0x6e70('0xa')](respondWithResult(_0x2e8ed3,null))[_0x6e70('0xf')](handleError(_0x2e8ed3,null));};exports[_0x6e70('0x61')]=function(_0x214a8f,_0x50046a){return respondWithRpcPromise(_0x6e70('0x62'),_0x214a8f[_0x6e70('0x17')],routingClient)[_0x6e70('0xa')](respondWithResult(_0x50046a,null))['catch'](handleError(_0x50046a,null));};exports[_0x6e70('0x63')]=function(_0x227d94,_0x11a615){return respondWithRpcPromise(_0x6e70('0x64'),_0x227d94[_0x6e70('0x17')],routingClient)[_0x6e70('0xa')](respondWithResult(_0x11a615,null))[_0x6e70('0xf')](handleError(_0x11a615,null));};exports[_0x6e70('0x65')]=function(_0x461ec0){return function(_0x48f6fd,_0x463eed){var _0x39e6db,_0x53acc8;var _0x252f07=_[_0x6e70('0x66')](_0x461ec0);var _0x51be27=_0x461ec0==='chat'?_0x6e70('0x67'):'Account';return db[_0x252f07+_0x6e70('0x68')]['findOne']({'raw':!![],'where':{'id':_0x48f6fd[_0x6e70('0x1b')]['id']}})[_0x6e70('0xa')](function(_0x106f32){if(_[_0x6e70('0x14')](_0x106f32)){throw new Error(_0x252f07+_0x6e70('0x69'));}_0x39e6db=_0x106f32;return db[_0x252f07+_0x6e70('0x6a')][_0x6e70('0x6b')]({'where':{'id':_0x48f6fd['body']['messageId']},'include':[{'model':db[_0x252f07+_0x6e70('0x6c')],'as':'Interaction'},{'model':db[_0x252f07+_0x51be27],'as':_0x6e70('0x6d')}]});})[_0x6e70('0xa')](function(_0x28e5b1){if(_[_0x6e70('0x14')](_0x28e5b1)){throw new Error(_0x252f07+'\x20Message\x20not\x20found');}_0x53acc8=_0x28e5b1;return _0x28e5b1[_0x6e70('0x6e')]({'read':0x0,'readAt':null,'UserId':null});})['then'](function(){var _0x260dfa={'uniqueid':_0x461ec0+'.'+_0x53acc8['id']+'.'+_0x53acc8[_0x6e70('0x6c')]['id'],'FromUserId':_0x48f6fd[_0x6e70('0x31')]['id'],'type':_0x6e70('0x6f')};_0x260dfa[_0x252f07+_0x6e70('0x70')]=_0x53acc8['id'];_0x260dfa[_0x252f07+_0x6e70('0x71')]=_0x53acc8[_0x6e70('0x6c')]['id'];_0x260dfa['From'+_0x252f07+_0x51be27+'Id']=_0x53acc8[_0x6e70('0x6d')]['id'];_0x260dfa['To'+_0x252f07+'QueueId']=_0x39e6db['id'];return db[_0x252f07+_0x6e70('0x72')]['create'](_0x260dfa);})['then'](function(){return respondWithRpcPromise('Start',{'channel':_0x461ec0,'interaction':_0x53acc8[_0x6e70('0x6c')],'message':_0x53acc8,'account':_0x53acc8[_0x6e70('0x6d')],'applications':[{'id':0x0,'priority':0x1,'app':_0x6e70('0x6f'),'appdata':_0x39e6db[_0x6e70('0x12')]+','+(_0x53acc8[_0x6e70('0x6d')]['queueTransferTimeout']||0x12c),'interval':_0x6e70('0x73')}],'transfer':!![]},routingClient);})[_0x6e70('0xa')](respondWithResult(_0x463eed,null))['catch'](handleError(_0x463eed,null));};};exports[_0x6e70('0x74')]=function(_0x50e494,_0x17d3a4){var _0x5d0585,_0x4a87e2;if(_[_0x6e70('0x14')](_0x50e494[_0x6e70('0x21')][_0x6e70('0x75')])){throw new Error(_0x6e70('0x76'));}var _0x3e6661=_0x50e494[_0x6e70('0x21')][_0x6e70('0x75')];var _0x5c0276=_[_0x6e70('0x66')](_0x3e6661);var _0x4f4a16=_0x3e6661===_0x6e70('0x77')?_0x6e70('0x67'):_0x6e70('0x6d');return db[_0x6e70('0x78')][_0x6e70('0x6b')]({'raw':!![],'where':{'id':_0x50e494[_0x6e70('0x1b')]['id'],'role':_0x6e70('0x3d')}})['then'](function(_0x4466f0){if(_['isNil'](_0x4466f0)){throw new Error(_0x6e70('0x79'));}_0x5d0585=_0x4466f0;return db[_0x5c0276+_0x6e70('0x6a')][_0x6e70('0x6b')]({'where':{'id':_0x50e494[_0x6e70('0x21')][_0x6e70('0x7a')]},'include':[{'model':db[_0x5c0276+_0x6e70('0x6c')],'as':_0x6e70('0x6c')},{'model':db[_0x5c0276+_0x4f4a16],'as':_0x6e70('0x6d')}]});})[_0x6e70('0xa')](function(_0x162bc3){if(_['isNil'](_0x162bc3)){throw new Error(_0x5c0276+_0x6e70('0x7b'));}_0x4a87e2=_0x162bc3;return _0x162bc3[_0x6e70('0x6e')]({'read':0x0,'readAt':null,'UserId':null});})[_0x6e70('0xa')](function(){var _0x181802={'uniqueid':_0x3e6661+'.'+_0x4a87e2['id']+'.'+_0x4a87e2[_0x6e70('0x6c')]['id'],'FromUserId':_0x50e494['user']['id'],'type':'agent','ToUserId':_0x5d0585['id']};_0x181802[_0x5c0276+'MessageId']=_0x4a87e2['id'];_0x181802[_0x5c0276+_0x6e70('0x71')]=_0x4a87e2[_0x6e70('0x6c')]['id'];_0x181802[_0x6e70('0x7c')+_0x5c0276+_0x4f4a16+'Id']=_0x4a87e2[_0x6e70('0x6d')]['id'];return db[_0x5c0276+_0x6e70('0x72')][_0x6e70('0x7d')](_0x181802);})[_0x6e70('0xa')](function(){return respondWithRpcPromise(_0x6e70('0x7e'),{'channel':_0x3e6661,'interaction':_0x4a87e2[_0x6e70('0x6c')],'message':_0x4a87e2,'account':_0x4a87e2[_0x6e70('0x6d')],'applications':[{'id':0x0,'priority':0x1,'app':_0x6e70('0x3d'),'appdata':_0x5d0585[_0x6e70('0x12')]+','+(_0x4a87e2[_0x6e70('0x6d')][_0x6e70('0x7f')]||0x12c),'interval':_0x6e70('0x73')}],'transfer':!![]},routingClient);})['then'](respondWithResult(_0x17d3a4,null))[_0x6e70('0xf')](handleError(_0x17d3a4,null));};
\ No newline at end of file
index 1406c02..d562aeb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd4b1=['fs-extra','../../components/interaction/service','../../config/environment','./schedule.controller','get','isAuthenticated','index','/:id','show','/:id/run','run','post','create','update','delete','destroy','util','connect-timeout','express','Router'];(function(_0x261f0a,_0x459261){var _0x39bdd5=function(_0x15d10f){while(--_0x15d10f){_0x261f0a['push'](_0x261f0a['shift']());}};_0x39bdd5(++_0x459261);}(_0xd4b1,0xec));var _0x1d4b=function(_0x4c7323,_0x14b207){_0x4c7323=_0x4c7323-0x0;var _0xb09ac5=_0xd4b1[_0x4c7323];return _0xb09ac5;};'use strict';var multer=require('multer');var util=require(_0x1d4b('0x0'));var path=require('path');var timeout=require(_0x1d4b('0x1'));var express=require(_0x1d4b('0x2'));var router=express[_0x1d4b('0x3')]();var fs_extra=require(_0x1d4b('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x1d4b('0x5'));var config=require(_0x1d4b('0x6'));var controller=require(_0x1d4b('0x7'));router[_0x1d4b('0x8')]('/',auth[_0x1d4b('0x9')](),controller[_0x1d4b('0xa')]);router[_0x1d4b('0x8')](_0x1d4b('0xb'),auth[_0x1d4b('0x9')](),controller[_0x1d4b('0xc')]);router['get'](_0x1d4b('0xd'),auth['isAuthenticated'](),controller[_0x1d4b('0xe')]);router[_0x1d4b('0xf')]('/',auth[_0x1d4b('0x9')](),controller[_0x1d4b('0x10')]);router['put'](_0x1d4b('0xb'),auth[_0x1d4b('0x9')](),controller[_0x1d4b('0x11')]);router[_0x1d4b('0x12')](_0x1d4b('0xb'),auth[_0x1d4b('0x9')](),controller[_0x1d4b('0x13')]);module['exports']=router;
\ No newline at end of file
+var _0x14c7=['multer','util','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./schedule.controller','get','isAuthenticated','/:id','/:id/run','run','post','create','put','update','delete','destroy','exports'];(function(_0x5134d9,_0x9f56e9){var _0x2cb90f=function(_0x24ece5){while(--_0x24ece5){_0x5134d9['push'](_0x5134d9['shift']());}};_0x2cb90f(++_0x9f56e9);}(_0x14c7,0x104));var _0x714c=function(_0x31fe49,_0x414cf0){_0x31fe49=_0x31fe49-0x0;var _0x456084=_0x14c7[_0x31fe49];return _0x456084;};'use strict';var multer=require(_0x714c('0x0'));var util=require(_0x714c('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x714c('0x2'));var router=express[_0x714c('0x3')]();var fs_extra=require(_0x714c('0x4'));var auth=require(_0x714c('0x5'));var interaction=require(_0x714c('0x6'));var config=require('../../config/environment');var controller=require(_0x714c('0x7'));router[_0x714c('0x8')]('/',auth[_0x714c('0x9')](),controller['index']);router[_0x714c('0x8')](_0x714c('0xa'),auth[_0x714c('0x9')](),controller['show']);router[_0x714c('0x8')](_0x714c('0xb'),auth['isAuthenticated'](),controller[_0x714c('0xc')]);router[_0x714c('0xd')]('/',auth[_0x714c('0x9')](),controller[_0x714c('0xe')]);router[_0x714c('0xf')](_0x714c('0xa'),auth[_0x714c('0x9')](),controller[_0x714c('0x10')]);router[_0x714c('0x11')](_0x714c('0xa'),auth['isAuthenticated'](),controller[_0x714c('0x12')]);module[_0x714c('0x13')]=router;
\ No newline at end of file
index 652d27c..50edbaa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe068=['BOOLEAN','sequelize','exports','STRING','DATE','INTEGER','years','quarters','weeks','hours','minutes','days','ENUM','csv','pdf','custom','default','TEXT'];(function(_0x1fb94f,_0x2812e7){var _0x2a1bd0=function(_0x591ce1){while(--_0x591ce1){_0x1fb94f['push'](_0x1fb94f['shift']());}};_0x2a1bd0(++_0x2812e7);}(_0xe068,0xd9));var _0x8e06=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe068[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0x8e06('0x0'));module[_0x8e06('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize[_0x8e06('0x2')]},'active':{'type':Sequelize['BOOLEAN'],'allowNull':![],'defaultValue':![]},'cron':{'type':Sequelize[_0x8e06('0x2')],'allowNull':![],'defaultValue':'0\x200\x20*\x20*\x20*'},'startAt':{'type':Sequelize[_0x8e06('0x3')],'allowNull':![]},'endAt':{'type':Sequelize[_0x8e06('0x3')],'allowNull':![]},'subtractNumber':{'type':Sequelize[_0x8e06('0x4')],'allowNull':![],'defaultValue':0x1,'validate':{'min':0x1}},'subtractUnit':{'type':Sequelize['ENUM'](_0x8e06('0x5'),_0x8e06('0x6'),'months',_0x8e06('0x7'),'days',_0x8e06('0x8'),_0x8e06('0x9')),'allowNull':![],'defaultValue':_0x8e06('0xa')},'output':{'type':Sequelize[_0x8e06('0xb')](_0x8e06('0xc'),_0x8e06('0xd'),'xlsx'),'allowNull':![],'defaultValue':_0x8e06('0xc')},'type':{'type':Sequelize[_0x8e06('0xb')](_0x8e06('0xe'),_0x8e06('0xf')),'allowNull':![],'defaultValue':_0x8e06('0xe')},'sendMail':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'email':{'type':Sequelize[_0x8e06('0x2')]},'cc':{'type':Sequelize[_0x8e06('0x10')]},'bcc':{'type':Sequelize[_0x8e06('0x10')]},'sendIfEmpty':{'type':Sequelize[_0x8e06('0x11')],'defaultValue':!![]}};
\ No newline at end of file
+var _0xcdc6=['weeks','days','minutes','csv','xlsx','TEXT','sequelize','exports','BOOLEAN','STRING','0\x200\x20*\x20*\x20*','DATE','ENUM','months'];(function(_0x5ee71e,_0x28e6bf){var _0x1675b1=function(_0x5f543c){while(--_0x5f543c){_0x5ee71e['push'](_0x5ee71e['shift']());}};_0x1675b1(++_0x28e6bf);}(_0xcdc6,0x68));var _0x6cdc=function(_0x121eee,_0x94ea3e){_0x121eee=_0x121eee-0x0;var _0x1351c3=_0xcdc6[_0x121eee];return _0x1351c3;};'use strict';var Sequelize=require(_0x6cdc('0x0'));module[_0x6cdc('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![]},'description':{'type':Sequelize['STRING']},'active':{'type':Sequelize[_0x6cdc('0x2')],'allowNull':![],'defaultValue':![]},'cron':{'type':Sequelize[_0x6cdc('0x3')],'allowNull':![],'defaultValue':_0x6cdc('0x4')},'startAt':{'type':Sequelize[_0x6cdc('0x5')],'allowNull':![]},'endAt':{'type':Sequelize[_0x6cdc('0x5')],'allowNull':![]},'subtractNumber':{'type':Sequelize['INTEGER'],'allowNull':![],'defaultValue':0x1,'validate':{'min':0x1}},'subtractUnit':{'type':Sequelize[_0x6cdc('0x6')]('years','quarters',_0x6cdc('0x7'),_0x6cdc('0x8'),_0x6cdc('0x9'),'hours',_0x6cdc('0xa')),'allowNull':![],'defaultValue':_0x6cdc('0x9')},'output':{'type':Sequelize[_0x6cdc('0x6')](_0x6cdc('0xb'),'pdf',_0x6cdc('0xc')),'allowNull':![],'defaultValue':'csv'},'type':{'type':Sequelize[_0x6cdc('0x6')]('custom','default'),'allowNull':![],'defaultValue':'custom'},'sendMail':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'email':{'type':Sequelize[_0x6cdc('0x3')]},'cc':{'type':Sequelize[_0x6cdc('0xd')]},'bcc':{'type':Sequelize['TEXT']},'sendIfEmpty':{'type':Sequelize[_0x6cdc('0x2')],'defaultValue':!![]}};
\ No newline at end of file
index cec5e77..bfa3986 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaa10=['fields','length','hasOwnProperty','order','sort','where','pick','filter','VIRTUAL','merge','options','Schedule','includeAll','include','findAll','rows','catch','show','rawAttributes','find','create','user','role','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','run','../../config/schedule','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','squel','crypto','jsforce','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','status','json','undefined','limit','count','offset','set','Content-Range','apply','reject','update','then','destroy','get','Scheduler','end','sendStatus','error','stack','name','map','fieldName','type','model','query','keys','filters','intersection','attributes'];(function(_0x298b3,_0x2c7ce8){var _0x2d76dd=function(_0x554cf1){while(--_0x554cf1){_0x298b3['push'](_0x298b3['shift']());}};_0x2d76dd(++_0x2c7ce8);}(_0xaa10,0x70));var _0x0aa1=function(_0x23f9e5,_0x151725){_0x23f9e5=_0x23f9e5-0x0;var _0x566273=_0xaa10[_0x23f9e5];return _0x566273;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x0aa1('0x0'));var zipdir=require(_0x0aa1('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x0aa1('0x2'));var moment=require(_0x0aa1('0x3'));var BPromise=require(_0x0aa1('0x4'));var Mustache=require(_0x0aa1('0x5'));var util=require('util');var path=require(_0x0aa1('0x6'));var sox=require('sox');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(_0x0aa1('0x7'));var crypto=require(_0x0aa1('0x8'));var jsforce=require(_0x0aa1('0x9'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x0aa1('0xa'));var Papa=require(_0x0aa1('0xb'));var Redis=require(_0x0aa1('0xc'));var authService=require(_0x0aa1('0xd'));var qs=require(_0x0aa1('0xe'));var as=require(_0x0aa1('0xf'));var hardwareService=require(_0x0aa1('0x10'));var logger=require(_0x0aa1('0x11'))(_0x0aa1('0x12'));var utils=require(_0x0aa1('0x13'));var config=require(_0x0aa1('0x14'));var licenseUtil=require(_0x0aa1('0x15'));var db=require(_0x0aa1('0x16'))['db'];function respondWithStatusCode(_0x279a86,_0x5c977f){_0x5c977f=_0x5c977f||0xcc;return function(_0x10cc43){if(_0x10cc43){return _0x279a86['sendStatus'](_0x5c977f);}return _0x279a86[_0x0aa1('0x17')](_0x5c977f)['end']();};}function respondWithResult(_0x2fcc9a,_0x3e7927){_0x3e7927=_0x3e7927||0xc8;return function(_0x40f321){if(_0x40f321){return _0x2fcc9a['status'](_0x3e7927)[_0x0aa1('0x18')](_0x40f321);}};}function respondWithFilteredResult(_0x1f6d9d,_0x2d55bd){return function(_0x110aa8){if(_0x110aa8){var _0x99af9f=typeof _0x2d55bd['offset']===_0x0aa1('0x19')&&typeof _0x2d55bd[_0x0aa1('0x1a')]===_0x0aa1('0x19');var _0x59b6f2=_0x110aa8[_0x0aa1('0x1b')];var _0xdd3e38=_0x99af9f?0x0:_0x2d55bd['offset'];var _0x9be291=_0x99af9f?_0x110aa8[_0x0aa1('0x1b')]:_0x2d55bd[_0x0aa1('0x1c')]+_0x2d55bd[_0x0aa1('0x1a')];var _0x92de7b;if(_0x9be291>=_0x59b6f2){_0x9be291=_0x59b6f2;_0x92de7b=0xc8;}else{_0x92de7b=0xce;}_0x1f6d9d[_0x0aa1('0x17')](_0x92de7b);return _0x1f6d9d[_0x0aa1('0x1d')](_0x0aa1('0x1e'),_0xdd3e38+'-'+_0x9be291+'/'+_0x59b6f2)['json'](_0x110aa8);}return null;};}function patchUpdates(_0x330f10){return function(_0x49335d){try{jsonpatch[_0x0aa1('0x1f')](_0x49335d,_0x330f10,!![]);}catch(_0x1b87d2){return BPromise[_0x0aa1('0x20')](_0x1b87d2);}return _0x49335d['save']();};}function saveUpdates(_0x43181c,_0x177339){return function(_0x334ef1){if(_0x334ef1){return _0x334ef1[_0x0aa1('0x21')](_0x43181c)[_0x0aa1('0x22')](function(_0x1506bc){return _0x1506bc;});}return null;};}function removeEntity(_0x567a57,_0x1ea1f3){return function(_0x5abe5a){if(_0x5abe5a){return _0x5abe5a[_0x0aa1('0x23')]()[_0x0aa1('0x22')](function(){var _0x26414a=_0x5abe5a[_0x0aa1('0x24')]({'plain':!![]});var _0x17e93f=_0x0aa1('0x25');return db['UserProfileResource']['destroy']({'where':{'type':_0x17e93f,'resourceId':_0x26414a['id']}})[_0x0aa1('0x22')](function(){return _0x5abe5a;});})[_0x0aa1('0x22')](function(){_0x567a57[_0x0aa1('0x17')](0xcc)[_0x0aa1('0x26')]();});}};}function handleEntityNotFound(_0x51187e,_0x490a7e){return function(_0x2a55af){if(!_0x2a55af){_0x51187e[_0x0aa1('0x27')](0x194);}return _0x2a55af;};}function handleError(_0x27e6a5,_0x36ff1e){_0x36ff1e=_0x36ff1e||0x1f4;return function(_0x10ac01){logger[_0x0aa1('0x28')](_0x10ac01[_0x0aa1('0x29')]);if(_0x10ac01['name']){delete _0x10ac01[_0x0aa1('0x2a')];}_0x27e6a5[_0x0aa1('0x17')](_0x36ff1e)['send'](_0x10ac01);};}exports['index']=function(_0x353bed,_0x3f1747){var _0x500ac8={},_0x59ae7f={},_0x4fa4a7={'count':0x0,'rows':[]};var _0x1c883e=_[_0x0aa1('0x2b')](db['Schedule']['rawAttributes'],function(_0x8ca1f0){return{'name':_0x8ca1f0[_0x0aa1('0x2c')],'type':_0x8ca1f0[_0x0aa1('0x2d')]['key']};});_0x59ae7f[_0x0aa1('0x2e')]=_[_0x0aa1('0x2b')](_0x1c883e,_0x0aa1('0x2a'));_0x59ae7f[_0x0aa1('0x2f')]=_[_0x0aa1('0x30')](_0x353bed[_0x0aa1('0x2f')]);_0x59ae7f[_0x0aa1('0x31')]=_[_0x0aa1('0x32')](_0x59ae7f[_0x0aa1('0x2e')],_0x59ae7f['query']);_0x500ac8[_0x0aa1('0x33')]=_[_0x0aa1('0x32')](_0x59ae7f['model'],qs['fields'](_0x353bed[_0x0aa1('0x2f')][_0x0aa1('0x34')]));_0x500ac8[_0x0aa1('0x33')]=_0x500ac8[_0x0aa1('0x33')][_0x0aa1('0x35')]?_0x500ac8[_0x0aa1('0x33')]:_0x59ae7f[_0x0aa1('0x2e')];if(!_0x353bed[_0x0aa1('0x2f')][_0x0aa1('0x36')]('nolimit')){_0x500ac8['limit']=qs[_0x0aa1('0x1a')](_0x353bed[_0x0aa1('0x2f')][_0x0aa1('0x1a')]);_0x500ac8[_0x0aa1('0x1c')]=qs[_0x0aa1('0x1c')](_0x353bed['query'][_0x0aa1('0x1c')]);}_0x500ac8[_0x0aa1('0x37')]=qs[_0x0aa1('0x38')](_0x353bed[_0x0aa1('0x2f')][_0x0aa1('0x38')]);_0x500ac8[_0x0aa1('0x39')]=qs[_0x0aa1('0x31')](_[_0x0aa1('0x3a')](_0x353bed[_0x0aa1('0x2f')],_0x59ae7f[_0x0aa1('0x31')]),_0x1c883e);if(_0x353bed[_0x0aa1('0x2f')][_0x0aa1('0x3b')]){_0x500ac8['where']=_['merge'](_0x500ac8[_0x0aa1('0x39')],{'$or':_[_0x0aa1('0x2b')](_0x1c883e,function(_0x4d16b2){if(_0x4d16b2[_0x0aa1('0x2d')]!==_0x0aa1('0x3c')){var _0x30212d={};_0x30212d[_0x4d16b2[_0x0aa1('0x2a')]]={'$like':'%'+_0x353bed['query'][_0x0aa1('0x3b')]+'%'};return _0x30212d;}})});}_0x500ac8=_[_0x0aa1('0x3d')]({},_0x500ac8,_0x353bed[_0x0aa1('0x3e')]);var _0x4fd1b3={'where':_0x500ac8[_0x0aa1('0x39')]};return db[_0x0aa1('0x3f')]['count'](_0x4fd1b3)[_0x0aa1('0x22')](function(_0x59922e){_0x4fa4a7[_0x0aa1('0x1b')]=_0x59922e;if(_0x353bed[_0x0aa1('0x2f')][_0x0aa1('0x40')]){_0x500ac8[_0x0aa1('0x41')]=[{'all':!![]}];}return db[_0x0aa1('0x3f')][_0x0aa1('0x42')](_0x500ac8);})[_0x0aa1('0x22')](function(_0x192aa3){_0x4fa4a7[_0x0aa1('0x43')]=_0x192aa3;return _0x4fa4a7;})[_0x0aa1('0x22')](respondWithFilteredResult(_0x3f1747,_0x500ac8))[_0x0aa1('0x44')](handleError(_0x3f1747,null));};exports[_0x0aa1('0x45')]=function(_0x138b62,_0x575117){var _0xaddca0={'raw':![],'where':{'id':_0x138b62['params']['id']}},_0x10d8ca={};_0x10d8ca[_0x0aa1('0x2e')]=_[_0x0aa1('0x30')](db['Schedule'][_0x0aa1('0x46')]);_0x10d8ca['query']=_[_0x0aa1('0x30')](_0x138b62[_0x0aa1('0x2f')]);_0x10d8ca[_0x0aa1('0x31')]=_[_0x0aa1('0x32')](_0x10d8ca[_0x0aa1('0x2e')],_0x10d8ca[_0x0aa1('0x2f')]);_0xaddca0[_0x0aa1('0x33')]=_[_0x0aa1('0x32')](_0x10d8ca['model'],qs['fields'](_0x138b62['query']['fields']));_0xaddca0[_0x0aa1('0x33')]=_0xaddca0[_0x0aa1('0x33')][_0x0aa1('0x35')]?_0xaddca0[_0x0aa1('0x33')]:_0x10d8ca[_0x0aa1('0x2e')];if(_0x138b62['query'][_0x0aa1('0x40')]){_0xaddca0[_0x0aa1('0x41')]=[{'all':!![]}];}_0xaddca0=_[_0x0aa1('0x3d')]({},_0xaddca0,_0x138b62[_0x0aa1('0x3e')]);return db[_0x0aa1('0x3f')][_0x0aa1('0x47')](_0xaddca0)[_0x0aa1('0x22')](handleEntityNotFound(_0x575117,null))[_0x0aa1('0x22')](respondWithResult(_0x575117,null))[_0x0aa1('0x44')](handleError(_0x575117,null));};exports[_0x0aa1('0x48')]=function(_0x25c5c0,_0x15f8e6){return db['Schedule']['create'](_0x25c5c0['body'],{})['then'](function(_0x50d107){var _0x719df8=_0x25c5c0[_0x0aa1('0x49')][_0x0aa1('0x24')]({'plain':!![]});if(!_0x719df8)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x719df8[_0x0aa1('0x4a')]===_0x0aa1('0x49')){var _0x14f862=_0x50d107[_0x0aa1('0x24')]({'plain':!![]});var _0x3498aa='Scheduler';return db['UserProfileSection'][_0x0aa1('0x47')]({'where':{'name':_0x3498aa,'userProfileId':_0x719df8[_0x0aa1('0x4b')]},'raw':!![]})[_0x0aa1('0x22')](function(_0x4e2de3){if(_0x4e2de3&&_0x4e2de3[_0x0aa1('0x4c')]===0x0){return db['UserProfileResource'][_0x0aa1('0x48')]({'name':_0x14f862[_0x0aa1('0x2a')],'resourceId':_0x14f862['id'],'type':_0x4e2de3[_0x0aa1('0x2a')],'sectionId':_0x4e2de3['id']},{})[_0x0aa1('0x22')](function(){return _0x50d107;});}else{return _0x50d107;}})[_0x0aa1('0x44')](function(_0x375114){logger['error'](_0x0aa1('0x4d'),_0x375114);throw _0x375114;});}return _0x50d107;})[_0x0aa1('0x22')](respondWithResult(_0x15f8e6,0xc9))[_0x0aa1('0x44')](handleError(_0x15f8e6,null));};exports[_0x0aa1('0x21')]=function(_0x2d8182,_0x257436){if(_0x2d8182[_0x0aa1('0x4e')]['id']){delete _0x2d8182[_0x0aa1('0x4e')]['id'];}return db[_0x0aa1('0x3f')][_0x0aa1('0x47')]({'where':{'id':_0x2d8182[_0x0aa1('0x4f')]['id']}})[_0x0aa1('0x22')](handleEntityNotFound(_0x257436,null))[_0x0aa1('0x22')](saveUpdates(_0x2d8182[_0x0aa1('0x4e')],null))['then'](respondWithResult(_0x257436,null))[_0x0aa1('0x44')](handleError(_0x257436,null));};exports['destroy']=function(_0x2edbd5,_0x4a5e65){return db[_0x0aa1('0x3f')][_0x0aa1('0x47')]({'where':{'id':_0x2edbd5[_0x0aa1('0x4f')]['id']}})[_0x0aa1('0x22')](handleEntityNotFound(_0x4a5e65,null))[_0x0aa1('0x22')](removeEntity(_0x4a5e65,null))[_0x0aa1('0x44')](handleError(_0x4a5e65,null));};exports[_0x0aa1('0x50')]=function(_0x1aef50,_0x486c59,_0x31a5f8){var _0x4f4869=require(_0x0aa1('0x51'));return db[_0x0aa1('0x3f')][_0x0aa1('0x47')]({'where':{'id':_0x1aef50[_0x0aa1('0x4f')]['id']},'raw':!![]})[_0x0aa1('0x22')](handleEntityNotFound(_0x486c59,null))['then'](function(){_0x4f4869[_0x0aa1('0x50')](_0x1aef50['params']['id']);})[_0x0aa1('0x22')](respondWithStatusCode(_0x486c59,null))[_0x0aa1('0x44')](handleError(_0x486c59,null));};
\ No newline at end of file
+var _0x1334=['crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','update','then','destroy','get','Scheduler','error','name','index','map','rawAttributes','fieldName','type','key','model','query','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','filter','merge','VIRTUAL','includeAll','Schedule','findAll','rows','catch','show','params','keys','options','create','user','role','UserProfileSection','find','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','../../config/schedule','run','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel'];(function(_0x590ef3,_0x3b2dd2){var _0x4502be=function(_0x2c8011){while(--_0x2c8011){_0x590ef3['push'](_0x590ef3['shift']());}};_0x4502be(++_0x3b2dd2);}(_0x1334,0x1e9));var _0x4133=function(_0x507ac5,_0x33aaee){_0x507ac5=_0x507ac5-0x0;var _0x12c1bc=_0x1334[_0x507ac5];return _0x12c1bc;};'use strict';var emlformat=require(_0x4133('0x0'));var rimraf=require(_0x4133('0x1'));var zipdir=require(_0x4133('0x2'));var jsonpatch=require(_0x4133('0x3'));var rp=require(_0x4133('0x4'));var moment=require(_0x4133('0x5'));var BPromise=require(_0x4133('0x6'));var Mustache=require(_0x4133('0x7'));var util=require('util');var path=require(_0x4133('0x8'));var sox=require(_0x4133('0x9'));var csv=require(_0x4133('0xa'));var ejs=require(_0x4133('0xb'));var fs=require('fs');var fs_extra=require(_0x4133('0xc'));var _=require(_0x4133('0xd'));var squel=require(_0x4133('0xe'));var crypto=require(_0x4133('0xf'));var jsforce=require(_0x4133('0x10'));var deskjs=require('desk.js');var toCsv=require(_0x4133('0xa'));var querystring=require(_0x4133('0x11'));var Papa=require(_0x4133('0x12'));var Redis=require('ioredis');var authService=require(_0x4133('0x13'));var qs=require(_0x4133('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4133('0x15'));var logger=require(_0x4133('0x16'))(_0x4133('0x17'));var utils=require(_0x4133('0x18'));var config=require(_0x4133('0x19'));var licenseUtil=require(_0x4133('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x451ad6,_0x48e6d4){_0x48e6d4=_0x48e6d4||0xcc;return function(_0xa111eb){if(_0xa111eb){return _0x451ad6[_0x4133('0x1b')](_0x48e6d4);}return _0x451ad6[_0x4133('0x1c')](_0x48e6d4)[_0x4133('0x1d')]();};}function respondWithResult(_0x1de420,_0x30c7d3){_0x30c7d3=_0x30c7d3||0xc8;return function(_0x51b9f1){if(_0x51b9f1){return _0x1de420[_0x4133('0x1c')](_0x30c7d3)[_0x4133('0x1e')](_0x51b9f1);}};}function respondWithFilteredResult(_0x5ecea4,_0x3320cf){return function(_0x1b482a){if(_0x1b482a){var _0x5b4255=typeof _0x3320cf[_0x4133('0x1f')]===_0x4133('0x20')&&typeof _0x3320cf[_0x4133('0x21')]==='undefined';var _0x3fe59d=_0x1b482a[_0x4133('0x22')];var _0x3f1eff=_0x5b4255?0x0:_0x3320cf[_0x4133('0x1f')];var _0x555404=_0x5b4255?_0x1b482a[_0x4133('0x22')]:_0x3320cf[_0x4133('0x1f')]+_0x3320cf[_0x4133('0x21')];var _0x24551c;if(_0x555404>=_0x3fe59d){_0x555404=_0x3fe59d;_0x24551c=0xc8;}else{_0x24551c=0xce;}_0x5ecea4[_0x4133('0x1c')](_0x24551c);return _0x5ecea4[_0x4133('0x23')](_0x4133('0x24'),_0x3f1eff+'-'+_0x555404+'/'+_0x3fe59d)[_0x4133('0x1e')](_0x1b482a);}return null;};}function patchUpdates(_0x5771fb){return function(_0x2ac0a5){try{jsonpatch['apply'](_0x2ac0a5,_0x5771fb,!![]);}catch(_0x1dcc9a){return BPromise['reject'](_0x1dcc9a);}return _0x2ac0a5['save']();};}function saveUpdates(_0x1aff31,_0x3575d8){return function(_0x50a7c4){if(_0x50a7c4){return _0x50a7c4[_0x4133('0x25')](_0x1aff31)[_0x4133('0x26')](function(_0x537f4b){return _0x537f4b;});}return null;};}function removeEntity(_0x57651d,_0x1c8bb2){return function(_0x15f256){if(_0x15f256){return _0x15f256[_0x4133('0x27')]()[_0x4133('0x26')](function(){var _0x5e3057=_0x15f256[_0x4133('0x28')]({'plain':!![]});var _0xd17728=_0x4133('0x29');return db['UserProfileResource'][_0x4133('0x27')]({'where':{'type':_0xd17728,'resourceId':_0x5e3057['id']}})[_0x4133('0x26')](function(){return _0x15f256;});})[_0x4133('0x26')](function(){_0x57651d['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x4dcb9d,_0x1c60f3){return function(_0x40021a){if(!_0x40021a){_0x4dcb9d['sendStatus'](0x194);}return _0x40021a;};}function handleError(_0x1657bc,_0x1d199d){_0x1d199d=_0x1d199d||0x1f4;return function(_0x2238c3){logger[_0x4133('0x2a')](_0x2238c3['stack']);if(_0x2238c3[_0x4133('0x2b')]){delete _0x2238c3[_0x4133('0x2b')];}_0x1657bc['status'](_0x1d199d)['send'](_0x2238c3);};}exports[_0x4133('0x2c')]=function(_0x23651d,_0x130e43){var _0x415d37={},_0x1602b5={},_0x5b451b={'count':0x0,'rows':[]};var _0x4f70d6=_[_0x4133('0x2d')](db['Schedule'][_0x4133('0x2e')],function(_0x4ea027){return{'name':_0x4ea027[_0x4133('0x2f')],'type':_0x4ea027[_0x4133('0x30')][_0x4133('0x31')]};});_0x1602b5[_0x4133('0x32')]=_[_0x4133('0x2d')](_0x4f70d6,_0x4133('0x2b'));_0x1602b5['query']=_['keys'](_0x23651d[_0x4133('0x33')]);_0x1602b5[_0x4133('0x34')]=_[_0x4133('0x35')](_0x1602b5['model'],_0x1602b5[_0x4133('0x33')]);_0x415d37['attributes']=_[_0x4133('0x35')](_0x1602b5['model'],qs[_0x4133('0x36')](_0x23651d[_0x4133('0x33')][_0x4133('0x36')]));_0x415d37[_0x4133('0x37')]=_0x415d37[_0x4133('0x37')][_0x4133('0x38')]?_0x415d37[_0x4133('0x37')]:_0x1602b5['model'];if(!_0x23651d[_0x4133('0x33')][_0x4133('0x39')](_0x4133('0x3a'))){_0x415d37[_0x4133('0x21')]=qs[_0x4133('0x21')](_0x23651d['query'][_0x4133('0x21')]);_0x415d37[_0x4133('0x1f')]=qs[_0x4133('0x1f')](_0x23651d[_0x4133('0x33')][_0x4133('0x1f')]);}_0x415d37['order']=qs[_0x4133('0x3b')](_0x23651d[_0x4133('0x33')]['sort']);_0x415d37[_0x4133('0x3c')]=qs[_0x4133('0x34')](_['pick'](_0x23651d['query'],_0x1602b5[_0x4133('0x34')]),_0x4f70d6);if(_0x23651d['query'][_0x4133('0x3d')]){_0x415d37['where']=_[_0x4133('0x3e')](_0x415d37[_0x4133('0x3c')],{'$or':_[_0x4133('0x2d')](_0x4f70d6,function(_0x871a04){if(_0x871a04['type']!==_0x4133('0x3f')){var _0x39454f={};_0x39454f[_0x871a04[_0x4133('0x2b')]]={'$like':'%'+_0x23651d[_0x4133('0x33')][_0x4133('0x3d')]+'%'};return _0x39454f;}})});}_0x415d37=_[_0x4133('0x3e')]({},_0x415d37,_0x23651d['options']);var _0x5ec1ce={'where':_0x415d37[_0x4133('0x3c')]};return db['Schedule']['count'](_0x5ec1ce)[_0x4133('0x26')](function(_0x111d58){_0x5b451b['count']=_0x111d58;if(_0x23651d[_0x4133('0x33')][_0x4133('0x40')]){_0x415d37['include']=[{'all':!![]}];}return db[_0x4133('0x41')][_0x4133('0x42')](_0x415d37);})[_0x4133('0x26')](function(_0x122170){_0x5b451b[_0x4133('0x43')]=_0x122170;return _0x5b451b;})[_0x4133('0x26')](respondWithFilteredResult(_0x130e43,_0x415d37))[_0x4133('0x44')](handleError(_0x130e43,null));};exports[_0x4133('0x45')]=function(_0x5755e5,_0x5198e2){var _0x1dc72c={'raw':![],'where':{'id':_0x5755e5[_0x4133('0x46')]['id']}},_0x5a07a0={};_0x5a07a0['model']=_[_0x4133('0x47')](db[_0x4133('0x41')][_0x4133('0x2e')]);_0x5a07a0[_0x4133('0x33')]=_[_0x4133('0x47')](_0x5755e5[_0x4133('0x33')]);_0x5a07a0['filters']=_[_0x4133('0x35')](_0x5a07a0['model'],_0x5a07a0[_0x4133('0x33')]);_0x1dc72c[_0x4133('0x37')]=_[_0x4133('0x35')](_0x5a07a0[_0x4133('0x32')],qs[_0x4133('0x36')](_0x5755e5['query'][_0x4133('0x36')]));_0x1dc72c['attributes']=_0x1dc72c['attributes']['length']?_0x1dc72c[_0x4133('0x37')]:_0x5a07a0['model'];if(_0x5755e5[_0x4133('0x33')][_0x4133('0x40')]){_0x1dc72c['include']=[{'all':!![]}];}_0x1dc72c=_[_0x4133('0x3e')]({},_0x1dc72c,_0x5755e5[_0x4133('0x48')]);return db[_0x4133('0x41')]['find'](_0x1dc72c)[_0x4133('0x26')](handleEntityNotFound(_0x5198e2,null))[_0x4133('0x26')](respondWithResult(_0x5198e2,null))[_0x4133('0x44')](handleError(_0x5198e2,null));};exports[_0x4133('0x49')]=function(_0x19bda0,_0x4aa062){return db[_0x4133('0x41')][_0x4133('0x49')](_0x19bda0['body'],{})[_0x4133('0x26')](function(_0x34788c){var _0x22097f=_0x19bda0[_0x4133('0x4a')][_0x4133('0x28')]({'plain':!![]});if(!_0x22097f)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x22097f[_0x4133('0x4b')]===_0x4133('0x4a')){var _0x56dcfd=_0x34788c['get']({'plain':!![]});var _0x1051a4=_0x4133('0x29');return db[_0x4133('0x4c')][_0x4133('0x4d')]({'where':{'name':_0x1051a4,'userProfileId':_0x22097f['userProfileId']},'raw':!![]})[_0x4133('0x26')](function(_0x275a5a){if(_0x275a5a&&_0x275a5a[_0x4133('0x4e')]===0x0){return db[_0x4133('0x4f')][_0x4133('0x49')]({'name':_0x56dcfd[_0x4133('0x2b')],'resourceId':_0x56dcfd['id'],'type':_0x275a5a[_0x4133('0x2b')],'sectionId':_0x275a5a['id']},{})[_0x4133('0x26')](function(){return _0x34788c;});}else{return _0x34788c;}})['catch'](function(_0x2aa015){logger[_0x4133('0x2a')](_0x4133('0x50'),_0x2aa015);throw _0x2aa015;});}return _0x34788c;})['then'](respondWithResult(_0x4aa062,0xc9))[_0x4133('0x44')](handleError(_0x4aa062,null));};exports['update']=function(_0xb77eb0,_0x26b2aa){if(_0xb77eb0[_0x4133('0x51')]['id']){delete _0xb77eb0[_0x4133('0x51')]['id'];}return db[_0x4133('0x41')][_0x4133('0x4d')]({'where':{'id':_0xb77eb0['params']['id']}})['then'](handleEntityNotFound(_0x26b2aa,null))[_0x4133('0x26')](saveUpdates(_0xb77eb0[_0x4133('0x51')],null))['then'](respondWithResult(_0x26b2aa,null))[_0x4133('0x44')](handleError(_0x26b2aa,null));};exports[_0x4133('0x27')]=function(_0x18d751,_0x49a2e1){return db[_0x4133('0x41')]['find']({'where':{'id':_0x18d751[_0x4133('0x46')]['id']}})[_0x4133('0x26')](handleEntityNotFound(_0x49a2e1,null))[_0x4133('0x26')](removeEntity(_0x49a2e1,null))[_0x4133('0x44')](handleError(_0x49a2e1,null));};exports['run']=function(_0xf9d41d,_0x5659cd,_0x30f496){var _0x2731b9=require(_0x4133('0x52'));return db[_0x4133('0x41')][_0x4133('0x4d')]({'where':{'id':_0xf9d41d['params']['id']},'raw':!![]})['then'](handleEntityNotFound(_0x5659cd,null))['then'](function(){_0x2731b9[_0x4133('0x53')](_0xf9d41d['params']['id']);})[_0x4133('0x26')](respondWithStatusCode(_0x5659cd,null))[_0x4133('0x44')](handleError(_0x5659cd,null));};
\ No newline at end of file
index 15c4a36..900a078 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x86b6=['api','moment','path','rimraf','../../config/environment','./schedule.attributes','define','Schedule','util','../../config/logger'];(function(_0x301344,_0x2483fe){var _0x3a900c=function(_0x4eb654){while(--_0x4eb654){_0x301344['push'](_0x301344['shift']());}};_0x3a900c(++_0x2483fe);}(_0x86b6,0x198));var _0x686b=function(_0x3df21d,_0xa44265){_0x3df21d=_0x3df21d-0x0;var _0x37ab8a=_0x86b6[_0x3df21d];return _0x37ab8a;};'use strict';var _=require('lodash');var util=require(_0x686b('0x0'));var logger=require(_0x686b('0x1'))(_0x686b('0x2'));var moment=require(_0x686b('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x686b('0x4'));var rimraf=require(_0x686b('0x5'));var config=require(_0x686b('0x6'));var attributes=require(_0x686b('0x7'));module['exports']=function(_0x51984b,_0x2f5f3b){return _0x51984b[_0x686b('0x8')](_0x686b('0x9'),attributes,{'tableName':'tools_schedules','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x646c=['moment','bluebird','rimraf','../../config/environment','./schedule.attributes','exports','define','Schedule','tools_schedules','lodash','util','../../config/logger','api'];(function(_0x326ee5,_0x1e9d4f){var _0x905911=function(_0x1a9f14){while(--_0x1a9f14){_0x326ee5['push'](_0x326ee5['shift']());}};_0x905911(++_0x1e9d4f);}(_0x646c,0x182));var _0xc646=function(_0x2c7618,_0x26be9c){_0x2c7618=_0x2c7618-0x0;var _0x5ce3f0=_0x646c[_0x2c7618];return _0x5ce3f0;};'use strict';var _=require(_0xc646('0x0'));var util=require(_0xc646('0x1'));var logger=require(_0xc646('0x2'))(_0xc646('0x3'));var moment=require(_0xc646('0x4'));var BPromise=require(_0xc646('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xc646('0x6'));var config=require(_0xc646('0x7'));var attributes=require(_0xc646('0x8'));module[_0xc646('0x9')]=function(_0x20c922,_0x34197f){return _0x20c922[_0xc646('0xa')](_0xc646('0xb'),attributes,{'tableName':_0xc646('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 083a19d..0033cf8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xda36=['info','Schedule,\x20%s,\x20%s','request\x20sent','debug','Schedule,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0xda36,0x12a));var _0x6da3=function(_0xb032bf,_0x3c95ea){_0xb032bf=_0xb032bf-0x0;var _0x484dc2=_0xda36[_0xb032bf];return _0x484dc2;};'use strict';var _=require(_0x6da3('0x0'));var util=require(_0x6da3('0x1'));var moment=require(_0x6da3('0x2'));var BPromise=require('bluebird');var rs=require(_0x6da3('0x3'));var fs=require('fs');var Redis=require(_0x6da3('0x4'));var db=require(_0x6da3('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x6da3('0x6'))(_0x6da3('0x7'));var config=require(_0x6da3('0x8'));var jayson=require(_0x6da3('0x9'));var client=jayson[_0x6da3('0xa')][_0x6da3('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x167a23,_0x4747bd,_0x172f04){return new BPromise(function(_0x4d882a,_0x51d61c){return client[_0x6da3('0xc')](_0x167a23,_0x172f04)[_0x6da3('0xd')](function(_0xf550b3){logger[_0x6da3('0xe')](_0x6da3('0xf'),_0x4747bd,_0x6da3('0x10'));logger[_0x6da3('0x11')](_0x6da3('0x12'),_0x4747bd,_0x6da3('0x10'),JSON[_0x6da3('0x13')](_0xf550b3));if(_0xf550b3[_0x6da3('0x14')]){if(_0xf550b3[_0x6da3('0x14')][_0x6da3('0x15')]===0x1f4){logger[_0x6da3('0x14')](_0x6da3('0xf'),_0x4747bd,_0xf550b3[_0x6da3('0x14')]['message']);return _0x51d61c(_0xf550b3['error'][_0x6da3('0x16')]);}logger['error'](_0x6da3('0xf'),_0x4747bd,_0xf550b3[_0x6da3('0x14')][_0x6da3('0x16')]);return _0x4d882a(_0xf550b3['error']['message']);}else{logger['info'](_0x6da3('0xf'),_0x4747bd,_0x6da3('0x10'));_0x4d882a(_0xf550b3[_0x6da3('0x17')]['message']);}})['catch'](function(_0x5be870){logger['error']('Schedule,\x20%s,\x20%s',_0x4747bd,_0x5be870);_0x51d61c(_0x5be870);});});}
\ No newline at end of file
+var _0x9991=['result','catch','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','request\x20sent','debug','stringify','error','Schedule,\x20%s,\x20%s','message','info'];(function(_0x27488f,_0x58085d){var _0x3a0d9d=function(_0x4e62a8){while(--_0x4e62a8){_0x27488f['push'](_0x27488f['shift']());}};_0x3a0d9d(++_0x58085d);}(_0x9991,0x86));var _0x1999=function(_0x46e3c4,_0x1f888e){_0x46e3c4=_0x46e3c4-0x0;var _0x112169=_0x9991[_0x46e3c4];return _0x112169;};'use strict';var _=require(_0x1999('0x0'));var util=require(_0x1999('0x1'));var moment=require(_0x1999('0x2'));var BPromise=require('bluebird');var rs=require(_0x1999('0x3'));var fs=require('fs');var Redis=require(_0x1999('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x1999('0x5'));var logger=require(_0x1999('0x6'))(_0x1999('0x7'));var config=require(_0x1999('0x8'));var jayson=require(_0x1999('0x9'));var client=jayson[_0x1999('0xa')][_0x1999('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2851f8,_0x33ee80,_0x273e48){return new BPromise(function(_0x2d350b,_0x17089a){return client['request'](_0x2851f8,_0x273e48)[_0x1999('0xc')](function(_0x12efbc){logger['info']('Schedule,\x20%s,\x20%s',_0x33ee80,_0x1999('0xd'));logger[_0x1999('0xe')]('Schedule,\x20%s,\x20%s,\x20%s',_0x33ee80,'request\x20sent',JSON[_0x1999('0xf')](_0x12efbc));if(_0x12efbc[_0x1999('0x10')]){if(_0x12efbc['error']['code']===0x1f4){logger[_0x1999('0x10')](_0x1999('0x11'),_0x33ee80,_0x12efbc[_0x1999('0x10')][_0x1999('0x12')]);return _0x17089a(_0x12efbc['error'][_0x1999('0x12')]);}logger[_0x1999('0x10')](_0x1999('0x11'),_0x33ee80,_0x12efbc[_0x1999('0x10')][_0x1999('0x12')]);return _0x2d350b(_0x12efbc[_0x1999('0x10')]['message']);}else{logger[_0x1999('0x13')]('Schedule,\x20%s,\x20%s',_0x33ee80,'request\x20sent');_0x2d350b(_0x12efbc[_0x1999('0x14')][_0x1999('0x12')]);}})[_0x1999('0x15')](function(_0x2fc6ec){logger[_0x1999('0x10')](_0x1999('0x11'),_0x33ee80,_0x2fc6ec);_0x17089a(_0x2fc6ec);});});}
\ No newline at end of file
index 2ad254f..ed29838 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x669b=['isAuthenticated','index','get','/describe','describe','/:id','show','/:id/download','download','post','put','delete','destroy','exports','multer','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./screenRecording.controller'];(function(_0x4c62db,_0x31f9bf){var _0x48e398=function(_0x3003b8){while(--_0x3003b8){_0x4c62db['push'](_0x4c62db['shift']());}};_0x48e398(++_0x31f9bf);}(_0x669b,0x17e));var _0xb669=function(_0x1563ce,_0x25113c){_0x1563ce=_0x1563ce-0x0;var _0x41cfad=_0x669b[_0x1563ce];return _0x41cfad;};'use strict';var multer=require(_0xb669('0x0'));var util=require('util');var path=require(_0xb669('0x1'));var timeout=require(_0xb669('0x2'));var express=require('express');var router=express[_0xb669('0x3')]();var fs_extra=require(_0xb669('0x4'));var auth=require(_0xb669('0x5'));var interaction=require(_0xb669('0x6'));var config=require(_0xb669('0x7'));var controller=require(_0xb669('0x8'));router['get']('/',auth[_0xb669('0x9')](),controller[_0xb669('0xa')]);router[_0xb669('0xb')](_0xb669('0xc'),auth[_0xb669('0x9')](),controller[_0xb669('0xd')]);router[_0xb669('0xb')](_0xb669('0xe'),auth['isAuthenticated'](),controller[_0xb669('0xf')]);router[_0xb669('0xb')](_0xb669('0x10'),auth[_0xb669('0x9')](),controller[_0xb669('0x11')]);router[_0xb669('0x12')]('/',auth[_0xb669('0x9')](),controller['create']);router[_0xb669('0x13')]('/:id',auth[_0xb669('0x9')](),controller['update']);router[_0xb669('0x14')](_0xb669('0xe'),auth[_0xb669('0x9')](),controller[_0xb669('0x15')]);module[_0xb669('0x16')]=router;
\ No newline at end of file
+var _0xe1ce=['destroy','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/interaction/service','../../config/environment','./screenRecording.controller','get','isAuthenticated','index','/describe','describe','show','/:id/download','download','post','/:id','delete'];(function(_0x2ebecb,_0x45c433){var _0x2ee886=function(_0x59165f){while(--_0x59165f){_0x2ebecb['push'](_0x2ebecb['shift']());}};_0x2ee886(++_0x45c433);}(_0xe1ce,0x9c));var _0xee1c=function(_0x2aec52,_0x59d962){_0x2aec52=_0x2aec52-0x0;var _0x3b8835=_0xe1ce[_0x2aec52];return _0x3b8835;};'use strict';var multer=require(_0xee1c('0x0'));var util=require(_0xee1c('0x1'));var path=require(_0xee1c('0x2'));var timeout=require(_0xee1c('0x3'));var express=require('express');var router=express[_0xee1c('0x4')]();var fs_extra=require(_0xee1c('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xee1c('0x6'));var config=require(_0xee1c('0x7'));var controller=require(_0xee1c('0x8'));router[_0xee1c('0x9')]('/',auth[_0xee1c('0xa')](),controller[_0xee1c('0xb')]);router['get'](_0xee1c('0xc'),auth[_0xee1c('0xa')](),controller[_0xee1c('0xd')]);router[_0xee1c('0x9')]('/:id',auth[_0xee1c('0xa')](),controller[_0xee1c('0xe')]);router[_0xee1c('0x9')](_0xee1c('0xf'),auth[_0xee1c('0xa')](),controller[_0xee1c('0x10')]);router[_0xee1c('0x11')]('/',auth[_0xee1c('0xa')](),controller['create']);router['put'](_0xee1c('0x12'),auth[_0xee1c('0xa')](),controller['update']);router[_0xee1c('0x13')](_0xee1c('0x12'),auth[_0xee1c('0xa')](),controller[_0xee1c('0x14')]);module[_0xee1c('0x15')]=router;
\ No newline at end of file
index fa0ad1e..db34a7f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf970=['DATE','format','MM-DD-YYYY\x20HH:mm','closedAt','toString','sequelize','path','../../config/environment','exports','VIRTUAL','getDataValue','value','extname','STRING','replace','setDataValue','startedAt','subtract'];(function(_0x27530d,_0x46480a){var _0x59e561=function(_0x395fe9){while(--_0x395fe9){_0x27530d['push'](_0x27530d['shift']());}};_0x59e561(++_0x46480a);}(_0xf970,0x1d9));var _0x0f97=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xf970[_0x14add3];return _0x4a174f;};'use strict';var Sequelize=require(_0x0f97('0x0'));var moment=require('moment');var path=require(_0x0f97('0x1'));var config=require(_0x0f97('0x2'));module[_0x0f97('0x3')]={'format':{'type':Sequelize[_0x0f97('0x4')],'get':function(){return this[_0x0f97('0x5')](_0x0f97('0x6'))?path[_0x0f97('0x7')](this['getDataValue'](_0x0f97('0x6'))):undefined;}},'interactionid':{'type':Sequelize[_0x0f97('0x8')]},'channel':{'type':Sequelize[_0x0f97('0x8')]},'value':{'type':Sequelize[_0x0f97('0x8')],'set':function(_0x2e3515){var _0x3244a6=_0x2e3515[_0x0f97('0x9')](/\\/g,'/');this[_0x0f97('0xa')](_0x0f97('0x6'),_0x3244a6);}},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize['INTEGER'],'set':function(_0x12397b){this['setDataValue'](_0x0f97('0xb'),moment()[_0x0f97('0xc')](_0x12397b,'ms'));this[_0x0f97('0xa')]('closedAt',moment());this[_0x0f97('0xa')]('duration',_0x12397b);}},'startedAt':{'type':Sequelize[_0x0f97('0xd')],'get':function(){return moment(this[_0x0f97('0x5')](_0x0f97('0xb')))[_0x0f97('0xe')](_0x0f97('0xf'))['toString']();}},'closedAt':{'type':Sequelize[_0x0f97('0xd')],'get':function(){return moment(this[_0x0f97('0x5')](_0x0f97('0x10')))[_0x0f97('0xe')](_0x0f97('0xf'))[_0x0f97('0x11')]();}},'createdAt':{'type':Sequelize[_0x0f97('0xd')],'get':function(){return moment(this['getDataValue']('createdAt'))[_0x0f97('0xe')](_0x0f97('0xf'))[_0x0f97('0x11')]();}},'updatedAt':{'type':Sequelize[_0x0f97('0xd')],'get':function(){return moment(this['getDataValue']('updatedAt'))[_0x0f97('0xe')](_0x0f97('0xf'))[_0x0f97('0x11')]();}}};
\ No newline at end of file
+var _0x81cb=['moment','../../config/environment','exports','getDataValue','value','extname','STRING','replace','setDataValue','INTEGER','startedAt','subtract','closedAt','DATE','format','MM-DD-YYYY\x20HH:mm','toString','createdAt','sequelize'];(function(_0x218aa6,_0x39bca7){var _0x4365ca=function(_0x4e47c4){while(--_0x4e47c4){_0x218aa6['push'](_0x218aa6['shift']());}};_0x4365ca(++_0x39bca7);}(_0x81cb,0xaa));var _0xb81c=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x81cb[_0x3dd15e];return _0x231fd0;};'use strict';var Sequelize=require(_0xb81c('0x0'));var moment=require(_0xb81c('0x1'));var path=require('path');var config=require(_0xb81c('0x2'));module[_0xb81c('0x3')]={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0xb81c('0x4')](_0xb81c('0x5'))?path[_0xb81c('0x6')](this[_0xb81c('0x4')]('value')):undefined;}},'interactionid':{'type':Sequelize[_0xb81c('0x7')]},'channel':{'type':Sequelize['STRING']},'value':{'type':Sequelize['STRING'],'set':function(_0x2666f6){var _0x2a06b2=_0x2666f6[_0xb81c('0x8')](/\\/g,'/');this[_0xb81c('0x9')](_0xb81c('0x5'),_0x2a06b2);}},'rating':{'type':Sequelize[_0xb81c('0xa')],'validate':{'max':0x5,'min':0x0}},'duration':{'type':Sequelize[_0xb81c('0xa')],'set':function(_0x14b1bf){this[_0xb81c('0x9')](_0xb81c('0xb'),moment()[_0xb81c('0xc')](_0x14b1bf,'ms'));this[_0xb81c('0x9')](_0xb81c('0xd'),moment());this[_0xb81c('0x9')]('duration',_0x14b1bf);}},'startedAt':{'type':Sequelize[_0xb81c('0xe')],'get':function(){return moment(this[_0xb81c('0x4')](_0xb81c('0xb')))[_0xb81c('0xf')](_0xb81c('0x10'))['toString']();}},'closedAt':{'type':Sequelize[_0xb81c('0xe')],'get':function(){return moment(this['getDataValue'](_0xb81c('0xd')))[_0xb81c('0xf')]('MM-DD-YYYY\x20HH:mm')[_0xb81c('0x11')]();}},'createdAt':{'type':Sequelize[_0xb81c('0xe')],'get':function(){return moment(this['getDataValue'](_0xb81c('0x12')))[_0xb81c('0xf')](_0xb81c('0x10'))['toString']();}},'updatedAt':{'type':Sequelize[_0xb81c('0xe')],'get':function(){return moment(this[_0xb81c('0x4')]('updatedAt'))[_0xb81c('0xf')](_0xb81c('0x10'))[_0xb81c('0x11')]();}}};
\ No newline at end of file
index 9ef5e80..d6a3899 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5636=['rawAttributes','fieldName','type','key','model','differenceBy','map','format','keys','query','filters','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','filter','merge','VIRTUAL','options','ScreenRecording','count','includeAll','include','findAll','rows','catch','show','find','create','body','duration','createdAt','closedAt','value','describe','uniqueid','params','join','root','server/files/screen_recordings','%s.cypher','existsSync','secrets','recording','Sequelize','ValidationError','download','filename','extname','unlink','isNil','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','eml-format','rimraf','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','limit','set','Content-Range','reject','save','update','then','destroy','stack','name','index'];(function(_0x37b6fd,_0x5eafa8){var _0x3fb552=function(_0x570c6a){while(--_0x570c6a){_0x37b6fd['push'](_0x37b6fd['shift']());}};_0x3fb552(++_0x5eafa8);}(_0x5636,0x102));var _0x6563=function(_0x4003a0,_0x79233c){_0x4003a0=_0x4003a0-0x0;var _0x3aad33=_0x5636[_0x4003a0];return _0x3aad33;};'use strict';var emlformat=require(_0x6563('0x0'));var rimraf=require(_0x6563('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x6563('0x2'));var BPromise=require(_0x6563('0x3'));var Mustache=require(_0x6563('0x4'));var util=require('util');var path=require(_0x6563('0x5'));var sox=require(_0x6563('0x6'));var csv=require(_0x6563('0x7'));var ejs=require(_0x6563('0x8'));var fs=require('fs');var fs_extra=require(_0x6563('0x9'));var _=require(_0x6563('0xa'));var squel=require(_0x6563('0xb'));var crypto=require(_0x6563('0xc'));var jsforce=require(_0x6563('0xd'));var deskjs=require(_0x6563('0xe'));var toCsv=require(_0x6563('0x7'));var querystring=require(_0x6563('0xf'));var Papa=require(_0x6563('0x10'));var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require(_0x6563('0x11'));var as=require(_0x6563('0x12'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')('api');var utils=require(_0x6563('0x13'));var config=require(_0x6563('0x14'));var licenseUtil=require(_0x6563('0x15'));var db=require(_0x6563('0x16'))['db'];function respondWithStatusCode(_0x33816e,_0x2ed676){_0x2ed676=_0x2ed676||0xcc;return function(_0x31d3fa){if(_0x31d3fa){return _0x33816e[_0x6563('0x17')](_0x2ed676);}return _0x33816e[_0x6563('0x18')](_0x2ed676)['end']();};}function respondWithResult(_0xa0a0b6,_0x5e9329){_0x5e9329=_0x5e9329||0xc8;return function(_0x37131e){if(_0x37131e){return _0xa0a0b6[_0x6563('0x18')](_0x5e9329)[_0x6563('0x19')](_0x37131e);}};}function respondWithFilteredResult(_0x10d08c,_0x5af5d0){return function(_0x26f26e){if(_0x26f26e){var _0x11baa2=typeof _0x5af5d0[_0x6563('0x1a')]===_0x6563('0x1b')&&typeof _0x5af5d0['limit']===_0x6563('0x1b');var _0x589632=_0x26f26e['count'];var _0x47972a=_0x11baa2?0x0:_0x5af5d0[_0x6563('0x1a')];var _0x4f5609=_0x11baa2?_0x26f26e['count']:_0x5af5d0[_0x6563('0x1a')]+_0x5af5d0[_0x6563('0x1c')];var _0x17a29f;if(_0x4f5609>=_0x589632){_0x4f5609=_0x589632;_0x17a29f=0xc8;}else{_0x17a29f=0xce;}_0x10d08c[_0x6563('0x18')](_0x17a29f);return _0x10d08c[_0x6563('0x1d')](_0x6563('0x1e'),_0x47972a+'-'+_0x4f5609+'/'+_0x589632)[_0x6563('0x19')](_0x26f26e);}return null;};}function patchUpdates(_0x93a45){return function(_0x2a70f0){try{jsonpatch['apply'](_0x2a70f0,_0x93a45,!![]);}catch(_0x2f2905){return BPromise[_0x6563('0x1f')](_0x2f2905);}return _0x2a70f0[_0x6563('0x20')]();};}function saveUpdates(_0x5a335c,_0x293db2){return function(_0x5c37bb){if(_0x5c37bb){return _0x5c37bb[_0x6563('0x21')](_0x5a335c)[_0x6563('0x22')](function(_0x5610b0){return _0x5610b0;});}return null;};}function removeEntity(_0x5773e2,_0x3ab7f6){return function(_0x492f45){if(_0x492f45){return _0x492f45[_0x6563('0x23')]()[_0x6563('0x22')](function(){_0x5773e2[_0x6563('0x18')](0xcc)['end']();});}};}function handleEntityNotFound(_0xd860d5,_0x51ff06){return function(_0x7ea857){if(!_0x7ea857){_0xd860d5[_0x6563('0x17')](0x194);}return _0x7ea857;};}function handleError(_0x5e5aeb,_0x365b16){_0x365b16=_0x365b16||0x1f4;return function(_0x28252d){logger['error'](_0x28252d[_0x6563('0x24')]);if(_0x28252d['name']){delete _0x28252d[_0x6563('0x25')];}_0x5e5aeb['status'](_0x365b16)['send'](_0x28252d);};}exports[_0x6563('0x26')]=function(_0x118d31,_0x17326c){var _0x2a1550={},_0x3eb23b={},_0x4b4d3b={'count':0x0,'rows':[]};var _0x3c8bd1=_['map'](db['ScreenRecording'][_0x6563('0x27')],function(_0x35af37){return{'name':_0x35af37[_0x6563('0x28')],'type':_0x35af37[_0x6563('0x29')][_0x6563('0x2a')]};});_0x3eb23b[_0x6563('0x2b')]=_[_0x6563('0x2c')](_[_0x6563('0x2d')](_0x3c8bd1,_0x6563('0x25')),[_0x6563('0x2e')]);_0x3eb23b['query']=_[_0x6563('0x2f')](_0x118d31[_0x6563('0x30')]);_0x3eb23b[_0x6563('0x31')]=_[_0x6563('0x32')](_0x3eb23b[_0x6563('0x2b')],_0x3eb23b[_0x6563('0x30')]);_0x2a1550[_0x6563('0x33')]=_['intersection'](_0x3eb23b[_0x6563('0x2b')],qs[_0x6563('0x34')](_0x118d31[_0x6563('0x30')][_0x6563('0x34')]));_0x2a1550[_0x6563('0x33')]=_0x2a1550[_0x6563('0x33')]['length']?_0x2a1550[_0x6563('0x33')]:_0x3eb23b[_0x6563('0x2b')];if(!_0x118d31[_0x6563('0x30')][_0x6563('0x35')](_0x6563('0x36'))){_0x2a1550[_0x6563('0x1c')]=qs[_0x6563('0x1c')](_0x118d31['query'][_0x6563('0x1c')]);_0x2a1550[_0x6563('0x1a')]=qs['offset'](_0x118d31[_0x6563('0x30')][_0x6563('0x1a')]);}_0x2a1550['order']=qs['sort'](_0x118d31[_0x6563('0x30')][_0x6563('0x37')]);_0x2a1550[_0x6563('0x38')]=qs[_0x6563('0x31')](_['pick'](_0x118d31[_0x6563('0x30')],_0x3eb23b[_0x6563('0x31')]),_0x3c8bd1);if(_0x118d31['query'][_0x6563('0x39')]){_0x2a1550[_0x6563('0x38')]=_[_0x6563('0x3a')](_0x2a1550[_0x6563('0x38')],{'$or':_[_0x6563('0x2d')](_0x3c8bd1,function(_0x1f6341){if(_0x1f6341[_0x6563('0x29')]!==_0x6563('0x3b')){var _0x2e4177={};_0x2e4177[_0x1f6341['name']]={'$like':'%'+_0x118d31[_0x6563('0x30')][_0x6563('0x39')]+'%'};return _0x2e4177;}})});}_0x2a1550=_[_0x6563('0x3a')]({},_0x2a1550,_0x118d31[_0x6563('0x3c')]);var _0x5ebe88={'where':_0x2a1550['where']};return db[_0x6563('0x3d')][_0x6563('0x3e')](_0x5ebe88)[_0x6563('0x22')](function(_0x5db29d){_0x4b4d3b[_0x6563('0x3e')]=_0x5db29d;if(_0x118d31['query'][_0x6563('0x3f')]){_0x2a1550[_0x6563('0x40')]=[{'all':!![]}];}return db['ScreenRecording'][_0x6563('0x41')](_0x2a1550);})[_0x6563('0x22')](function(_0xea186){_0x4b4d3b[_0x6563('0x42')]=_0xea186;return _0x4b4d3b;})[_0x6563('0x22')](respondWithFilteredResult(_0x17326c,_0x2a1550))[_0x6563('0x43')](handleError(_0x17326c,null));};exports[_0x6563('0x44')]=function(_0x32932f,_0xd30789){var _0xfc7eb1={'raw':![],'where':{'id':_0x32932f['params']['id']}},_0x2acb52={};_0x2acb52['model']=_[_0x6563('0x2f')](db[_0x6563('0x3d')][_0x6563('0x27')]);_0x2acb52[_0x6563('0x30')]=_[_0x6563('0x2f')](_0x32932f[_0x6563('0x30')]);_0x2acb52[_0x6563('0x31')]=_['intersection'](_0x2acb52[_0x6563('0x2b')],_0x2acb52[_0x6563('0x30')]);_0xfc7eb1[_0x6563('0x33')]=_[_0x6563('0x32')](_0x2acb52['model'],qs[_0x6563('0x34')](_0x32932f[_0x6563('0x30')][_0x6563('0x34')]));_0xfc7eb1[_0x6563('0x33')]=_0xfc7eb1[_0x6563('0x33')]['length']?_0xfc7eb1['attributes']:_0x2acb52[_0x6563('0x2b')];if(_0x32932f[_0x6563('0x30')][_0x6563('0x3f')]){_0xfc7eb1['include']=[{'all':!![]}];}_0xfc7eb1=_[_0x6563('0x3a')]({},_0xfc7eb1,_0x32932f[_0x6563('0x3c')]);return db[_0x6563('0x3d')][_0x6563('0x45')](_0xfc7eb1)['then'](handleEntityNotFound(_0xd30789,null))[_0x6563('0x22')](respondWithResult(_0xd30789,null))[_0x6563('0x43')](handleError(_0xd30789,null));};exports[_0x6563('0x46')]=function(_0x55e927,_0x35b0ce){return db['ScreenRecording'][_0x6563('0x46')](_0x55e927['body'],{})['then'](respondWithResult(_0x35b0ce,0xc9))[_0x6563('0x43')](handleError(_0x35b0ce,null));};exports[_0x6563('0x21')]=function(_0x2ebab0,_0xb84325){if(_0x2ebab0[_0x6563('0x47')]['id']){delete _0x2ebab0[_0x6563('0x47')]['id'];}delete _0x2ebab0[_0x6563('0x47')][_0x6563('0x48')];delete _0x2ebab0[_0x6563('0x47')][_0x6563('0x49')];delete _0x2ebab0['body'][_0x6563('0x4a')];delete _0x2ebab0['body'][_0x6563('0x4b')];return db[_0x6563('0x3d')][_0x6563('0x45')]({'where':{'id':_0x2ebab0['params']['id']}})[_0x6563('0x22')](handleEntityNotFound(_0xb84325,null))[_0x6563('0x22')](saveUpdates(_0x2ebab0['body'],null))[_0x6563('0x22')](respondWithResult(_0xb84325,null))[_0x6563('0x43')](handleError(_0xb84325,null));};exports[_0x6563('0x4c')]=function(_0x3883f3,_0xbd920a){return db['ScreenRecording'][_0x6563('0x4c')]()['then'](respondWithResult(_0xbd920a,null))[_0x6563('0x43')](handleError(_0xbd920a,null));};exports['download']=function(_0xd2ed6b,_0x5992c8,_0x55e002){var _0x5c8274=require('../../components/encryptor');var _0x270667=![];var _0x5ade56={};if(_0xd2ed6b[_0x6563('0x30')]['type']&&_0xd2ed6b[_0x6563('0x30')][_0x6563('0x29')]===_0x6563('0x4d')){_0x5ade56[_0x6563('0x4d')]=_0xd2ed6b[_0x6563('0x4e')]['id'];}else{_0x5ade56['id']=_0xd2ed6b[_0x6563('0x4e')]['id'];}return db[_0x6563('0x3d')][_0x6563('0x45')]({'where':_0x5ade56,'attributes':['id',_0x6563('0x4b')],'raw':!![]})['then'](handleEntityNotFound(_0x5992c8,null))[_0x6563('0x22')](function(_0x28b1c6){if(_0x28b1c6){var _0x97ee3=path[_0x6563('0x4f')](config[_0x6563('0x50')],_0x6563('0x51'),_0x28b1c6[_0x6563('0x4b')]);var _0x32c715=util[_0x6563('0x2e')](_0x6563('0x52'),_0x97ee3);if(fs[_0x6563('0x53')](_0x32c715)){_0x270667=!![];return _0x5c8274['decryptFile'](_0x32c715,_0x97ee3,config[_0x6563('0x54')][_0x6563('0x55')])[_0x6563('0x22')](function(){return _0x28b1c6;});}return _0x28b1c6;}})[_0x6563('0x22')](function(_0x46c26c){if(_0x46c26c){var _0x3c06ac=path[_0x6563('0x4f')](config[_0x6563('0x50')],'server/files/screen_recordings',_0x46c26c[_0x6563('0x4b')]);if(!fs['existsSync'](_0x3c06ac)){throw new db[(_0x6563('0x56'))][(_0x6563('0x57'))]('ScreenRecording\x20not\x20found');}if(_0x46c26c['filename']){return _0x5992c8[_0x6563('0x58')](_0x3c06ac,_0x46c26c[_0x6563('0x59')]+path[_0x6563('0x5a')](_0x3c06ac),function(){if(_0x270667){fs[_0x6563('0x5b')](_0x3c06ac);}});}else{return _0x5992c8['download'](_0x3c06ac,function(_0x2a3df0){if(_0x270667){fs['unlink'](_0x3c06ac);}});}}})[_0x6563('0x43')](function(_0x29aecb){if(_0x29aecb['message']==='ScreenRecording\x20not\x20found'){_0x5992c8[_0x6563('0x18')](0x194)['send']('Not\x20found');}else{return handleError(_0x5992c8,null);}});};exports[_0x6563('0x23')]=function(_0x49d6a5,_0x356010){return db[_0x6563('0x3d')][_0x6563('0x45')]({'where':{'id':_0x49d6a5[_0x6563('0x4e')]['id']}})['then'](function(_0x83d5c){if(_[_0x6563('0x5c')](_0x83d5c)){throw new ReferenceError(_0x6563('0x5d'));}return _0x83d5c;})[_0x6563('0x22')](function(_0x3ffb7f){var _0x2d4694=path[_0x6563('0x4f')](config[_0x6563('0x50')],'server/files/screen_recordings',_0x3ffb7f['value']);logger[_0x6563('0x5e')](_0x6563('0x5f'),_0x2d4694);if(!_['isNil'](_0x3ffb7f['value'])&&fs['existsSync'](_0x2d4694)){logger[_0x6563('0x5e')](_0x6563('0x60')+_0x2d4694+_0x6563('0x61'));fs[_0x6563('0x62')](_0x2d4694);}_0x2d4694=_0x2d4694+'.cypher';if(!_[_0x6563('0x5c')](_0x3ffb7f[_0x6563('0x4b')])&&fs[_0x6563('0x53')](_0x2d4694)){logger[_0x6563('0x5e')](_0x6563('0x60')+_0x2d4694+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs['unlinkSync'](_0x2d4694);}return _0x3ffb7f;})[_0x6563('0x22')](function(_0x1d7b5d){if(!_0x1d7b5d)throw new InternalError();return _0x1d7b5d[_0x6563('0x23')]();})['then'](function(){_0x356010[_0x6563('0x18')](0xcc)['end']();})[_0x6563('0x43')](handleError(_0x356010,null));};
\ No newline at end of file
+var _0x46ed=['intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','includeAll','findAll','rows','catch','show','keys','include','options','find','create','body','createdAt','closedAt','describe','download','../../components/encryptor','uniqueid','params','value','join','root','server/files/screen_recordings','%s.cypher','decryptFile','secrets','recording','existsSync','ScreenRecording\x20not\x20found','filename','unlink','message','Not\x20found','destroy','isNil','info','cancellazione\x20fisica\x20documento\x20%s','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','end','eml-format','rimraf','fast-json-patch','request-promise','moment','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','offset','limit','undefined','set','Content-Range','json','apply','reject','update','then','stack','name','send','index','map','ScreenRecording','rawAttributes','fieldName','type','key','model','format','query','filters'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0x46ed,0x168));var _0xd46e=function(_0x2c7618,_0x26be9c){_0x2c7618=_0x2c7618-0x0;var _0x5ce3f0=_0x46ed[_0x2c7618];return _0x5ce3f0;};'use strict';var emlformat=require(_0xd46e('0x0'));var rimraf=require(_0xd46e('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xd46e('0x2'));var rp=require(_0xd46e('0x3'));var moment=require(_0xd46e('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xd46e('0x5'));var util=require(_0xd46e('0x6'));var path=require('path');var sox=require(_0xd46e('0x7'));var csv=require(_0xd46e('0x8'));var ejs=require(_0xd46e('0x9'));var fs=require('fs');var fs_extra=require(_0xd46e('0xa'));var _=require(_0xd46e('0xb'));var squel=require(_0xd46e('0xc'));var crypto=require(_0xd46e('0xd'));var jsforce=require(_0xd46e('0xe'));var deskjs=require(_0xd46e('0xf'));var toCsv=require(_0xd46e('0x8'));var querystring=require(_0xd46e('0x10'));var Papa=require('papaparse');var Redis=require(_0xd46e('0x11'));var authService=require(_0xd46e('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0xd46e('0x13'));var hardwareService=require(_0xd46e('0x14'));var logger=require(_0xd46e('0x15'))(_0xd46e('0x16'));var utils=require(_0xd46e('0x17'));var config=require(_0xd46e('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0xd46e('0x19'))['db'];function respondWithStatusCode(_0x5bc1da,_0x48550b){_0x48550b=_0x48550b||0xcc;return function(_0xf3048c){if(_0xf3048c){return _0x5bc1da[_0xd46e('0x1a')](_0x48550b);}return _0x5bc1da['status'](_0x48550b)['end']();};}function respondWithResult(_0xacd799,_0x4688ae){_0x4688ae=_0x4688ae||0xc8;return function(_0x1e9aae){if(_0x1e9aae){return _0xacd799[_0xd46e('0x1b')](_0x4688ae)['json'](_0x1e9aae);}};}function respondWithFilteredResult(_0x3b6d25,_0x44a620){return function(_0x417402){if(_0x417402){var _0x3d72ce=typeof _0x44a620[_0xd46e('0x1c')]==='undefined'&&typeof _0x44a620[_0xd46e('0x1d')]===_0xd46e('0x1e');var _0x3583a5=_0x417402['count'];var _0x5ddd04=_0x3d72ce?0x0:_0x44a620[_0xd46e('0x1c')];var _0x1bd574=_0x3d72ce?_0x417402['count']:_0x44a620['offset']+_0x44a620[_0xd46e('0x1d')];var _0x2f2571;if(_0x1bd574>=_0x3583a5){_0x1bd574=_0x3583a5;_0x2f2571=0xc8;}else{_0x2f2571=0xce;}_0x3b6d25[_0xd46e('0x1b')](_0x2f2571);return _0x3b6d25[_0xd46e('0x1f')](_0xd46e('0x20'),_0x5ddd04+'-'+_0x1bd574+'/'+_0x3583a5)[_0xd46e('0x21')](_0x417402);}return null;};}function patchUpdates(_0x3b5fa4){return function(_0x327b7e){try{jsonpatch[_0xd46e('0x22')](_0x327b7e,_0x3b5fa4,!![]);}catch(_0x3c7e91){return BPromise[_0xd46e('0x23')](_0x3c7e91);}return _0x327b7e['save']();};}function saveUpdates(_0x259072,_0x1c83fa){return function(_0x79aa51){if(_0x79aa51){return _0x79aa51[_0xd46e('0x24')](_0x259072)[_0xd46e('0x25')](function(_0xc1af7f){return _0xc1af7f;});}return null;};}function removeEntity(_0x33c2e0,_0x8a1be){return function(_0x62dea5){if(_0x62dea5){return _0x62dea5['destroy']()[_0xd46e('0x25')](function(){_0x33c2e0['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x371054,_0x2a5271){return function(_0x21135f){if(!_0x21135f){_0x371054[_0xd46e('0x1a')](0x194);}return _0x21135f;};}function handleError(_0x247b9f,_0x180851){_0x180851=_0x180851||0x1f4;return function(_0x1740d1){logger['error'](_0x1740d1[_0xd46e('0x26')]);if(_0x1740d1[_0xd46e('0x27')]){delete _0x1740d1[_0xd46e('0x27')];}_0x247b9f[_0xd46e('0x1b')](_0x180851)[_0xd46e('0x28')](_0x1740d1);};}exports[_0xd46e('0x29')]=function(_0x58aeef,_0x465d54){var _0x3a1ced={},_0x2d1afe={},_0xa716ce={'count':0x0,'rows':[]};var _0x106edc=_[_0xd46e('0x2a')](db[_0xd46e('0x2b')][_0xd46e('0x2c')],function(_0x18f060){return{'name':_0x18f060[_0xd46e('0x2d')],'type':_0x18f060[_0xd46e('0x2e')][_0xd46e('0x2f')]};});_0x2d1afe[_0xd46e('0x30')]=_['differenceBy'](_[_0xd46e('0x2a')](_0x106edc,_0xd46e('0x27')),[_0xd46e('0x31')]);_0x2d1afe[_0xd46e('0x32')]=_['keys'](_0x58aeef[_0xd46e('0x32')]);_0x2d1afe[_0xd46e('0x33')]=_['intersection'](_0x2d1afe[_0xd46e('0x30')],_0x2d1afe[_0xd46e('0x32')]);_0x3a1ced['attributes']=_[_0xd46e('0x34')](_0x2d1afe[_0xd46e('0x30')],qs[_0xd46e('0x35')](_0x58aeef['query']['fields']));_0x3a1ced[_0xd46e('0x36')]=_0x3a1ced[_0xd46e('0x36')][_0xd46e('0x37')]?_0x3a1ced[_0xd46e('0x36')]:_0x2d1afe[_0xd46e('0x30')];if(!_0x58aeef[_0xd46e('0x32')][_0xd46e('0x38')](_0xd46e('0x39'))){_0x3a1ced['limit']=qs[_0xd46e('0x1d')](_0x58aeef[_0xd46e('0x32')][_0xd46e('0x1d')]);_0x3a1ced[_0xd46e('0x1c')]=qs[_0xd46e('0x1c')](_0x58aeef[_0xd46e('0x32')][_0xd46e('0x1c')]);}_0x3a1ced['order']=qs[_0xd46e('0x3a')](_0x58aeef[_0xd46e('0x32')]['sort']);_0x3a1ced[_0xd46e('0x3b')]=qs[_0xd46e('0x33')](_[_0xd46e('0x3c')](_0x58aeef[_0xd46e('0x32')],_0x2d1afe['filters']),_0x106edc);if(_0x58aeef[_0xd46e('0x32')][_0xd46e('0x3d')]){_0x3a1ced[_0xd46e('0x3b')]=_[_0xd46e('0x3e')](_0x3a1ced[_0xd46e('0x3b')],{'$or':_[_0xd46e('0x2a')](_0x106edc,function(_0x220c57){if(_0x220c57[_0xd46e('0x2e')]!=='VIRTUAL'){var _0x232e6f={};_0x232e6f[_0x220c57[_0xd46e('0x27')]]={'$like':'%'+_0x58aeef[_0xd46e('0x32')][_0xd46e('0x3d')]+'%'};return _0x232e6f;}})});}_0x3a1ced=_[_0xd46e('0x3e')]({},_0x3a1ced,_0x58aeef['options']);var _0x964c66={'where':_0x3a1ced['where']};return db['ScreenRecording']['count'](_0x964c66)['then'](function(_0x17c3d9){_0xa716ce['count']=_0x17c3d9;if(_0x58aeef[_0xd46e('0x32')][_0xd46e('0x3f')]){_0x3a1ced['include']=[{'all':!![]}];}return db[_0xd46e('0x2b')][_0xd46e('0x40')](_0x3a1ced);})[_0xd46e('0x25')](function(_0x31ba12){_0xa716ce[_0xd46e('0x41')]=_0x31ba12;return _0xa716ce;})[_0xd46e('0x25')](respondWithFilteredResult(_0x465d54,_0x3a1ced))[_0xd46e('0x42')](handleError(_0x465d54,null));};exports[_0xd46e('0x43')]=function(_0x3a98e4,_0xec367d){var _0x259e2={'raw':![],'where':{'id':_0x3a98e4['params']['id']}},_0x5ea048={};_0x5ea048['model']=_[_0xd46e('0x44')](db['ScreenRecording'][_0xd46e('0x2c')]);_0x5ea048[_0xd46e('0x32')]=_[_0xd46e('0x44')](_0x3a98e4[_0xd46e('0x32')]);_0x5ea048[_0xd46e('0x33')]=_[_0xd46e('0x34')](_0x5ea048[_0xd46e('0x30')],_0x5ea048[_0xd46e('0x32')]);_0x259e2['attributes']=_[_0xd46e('0x34')](_0x5ea048['model'],qs[_0xd46e('0x35')](_0x3a98e4[_0xd46e('0x32')][_0xd46e('0x35')]));_0x259e2[_0xd46e('0x36')]=_0x259e2[_0xd46e('0x36')]['length']?_0x259e2[_0xd46e('0x36')]:_0x5ea048[_0xd46e('0x30')];if(_0x3a98e4[_0xd46e('0x32')][_0xd46e('0x3f')]){_0x259e2[_0xd46e('0x45')]=[{'all':!![]}];}_0x259e2=_['merge']({},_0x259e2,_0x3a98e4[_0xd46e('0x46')]);return db[_0xd46e('0x2b')][_0xd46e('0x47')](_0x259e2)[_0xd46e('0x25')](handleEntityNotFound(_0xec367d,null))[_0xd46e('0x25')](respondWithResult(_0xec367d,null))['catch'](handleError(_0xec367d,null));};exports[_0xd46e('0x48')]=function(_0x3ea9e6,_0x45baf1){return db[_0xd46e('0x2b')][_0xd46e('0x48')](_0x3ea9e6[_0xd46e('0x49')],{})[_0xd46e('0x25')](respondWithResult(_0x45baf1,0xc9))[_0xd46e('0x42')](handleError(_0x45baf1,null));};exports['update']=function(_0xf9dab,_0x71a8dc){if(_0xf9dab[_0xd46e('0x49')]['id']){delete _0xf9dab[_0xd46e('0x49')]['id'];}delete _0xf9dab[_0xd46e('0x49')]['duration'];delete _0xf9dab['body'][_0xd46e('0x4a')];delete _0xf9dab[_0xd46e('0x49')][_0xd46e('0x4b')];delete _0xf9dab['body']['value'];return db[_0xd46e('0x2b')][_0xd46e('0x47')]({'where':{'id':_0xf9dab['params']['id']}})[_0xd46e('0x25')](handleEntityNotFound(_0x71a8dc,null))[_0xd46e('0x25')](saveUpdates(_0xf9dab[_0xd46e('0x49')],null))[_0xd46e('0x25')](respondWithResult(_0x71a8dc,null))[_0xd46e('0x42')](handleError(_0x71a8dc,null));};exports[_0xd46e('0x4c')]=function(_0x80ed51,_0x16ca0e){return db['ScreenRecording'][_0xd46e('0x4c')]()[_0xd46e('0x25')](respondWithResult(_0x16ca0e,null))[_0xd46e('0x42')](handleError(_0x16ca0e,null));};exports[_0xd46e('0x4d')]=function(_0x4ec295,_0x56dd9a,_0xced102){var _0x5a4a44=require(_0xd46e('0x4e'));var _0x2af20b=![];var _0x393cb9={};if(_0x4ec295[_0xd46e('0x32')][_0xd46e('0x2e')]&&_0x4ec295[_0xd46e('0x32')]['type']===_0xd46e('0x4f')){_0x393cb9[_0xd46e('0x4f')]=_0x4ec295[_0xd46e('0x50')]['id'];}else{_0x393cb9['id']=_0x4ec295['params']['id'];}return db[_0xd46e('0x2b')][_0xd46e('0x47')]({'where':_0x393cb9,'attributes':['id',_0xd46e('0x51')],'raw':!![]})[_0xd46e('0x25')](handleEntityNotFound(_0x56dd9a,null))[_0xd46e('0x25')](function(_0x2cc676){if(_0x2cc676){var _0x2760ef=path[_0xd46e('0x52')](config[_0xd46e('0x53')],_0xd46e('0x54'),_0x2cc676[_0xd46e('0x51')]);var _0x411b19=util[_0xd46e('0x31')](_0xd46e('0x55'),_0x2760ef);if(fs['existsSync'](_0x411b19)){_0x2af20b=!![];return _0x5a4a44[_0xd46e('0x56')](_0x411b19,_0x2760ef,config[_0xd46e('0x57')][_0xd46e('0x58')])[_0xd46e('0x25')](function(){return _0x2cc676;});}return _0x2cc676;}})['then'](function(_0x636f15){if(_0x636f15){var _0x36e18a=path[_0xd46e('0x52')](config[_0xd46e('0x53')],'server/files/screen_recordings',_0x636f15[_0xd46e('0x51')]);if(!fs[_0xd46e('0x59')](_0x36e18a)){throw new db['Sequelize']['ValidationError'](_0xd46e('0x5a'));}if(_0x636f15[_0xd46e('0x5b')]){return _0x56dd9a[_0xd46e('0x4d')](_0x36e18a,_0x636f15['filename']+path['extname'](_0x36e18a),function(){if(_0x2af20b){fs[_0xd46e('0x5c')](_0x36e18a);}});}else{return _0x56dd9a[_0xd46e('0x4d')](_0x36e18a,function(_0x1f310d){if(_0x2af20b){fs[_0xd46e('0x5c')](_0x36e18a);}});}}})[_0xd46e('0x42')](function(_0x2f9fcb){if(_0x2f9fcb[_0xd46e('0x5d')]===_0xd46e('0x5a')){_0x56dd9a[_0xd46e('0x1b')](0x194)[_0xd46e('0x28')](_0xd46e('0x5e'));}else{return handleError(_0x56dd9a,null);}});};exports[_0xd46e('0x5f')]=function(_0x272514,_0x329204){return db[_0xd46e('0x2b')][_0xd46e('0x47')]({'where':{'id':_0x272514['params']['id']}})[_0xd46e('0x25')](function(_0x1a3771){if(_[_0xd46e('0x60')](_0x1a3771)){throw new ReferenceError('Entity\x20not\x20found');}return _0x1a3771;})[_0xd46e('0x25')](function(_0x313c7e){var _0x4dec29=path[_0xd46e('0x52')](config[_0xd46e('0x53')],_0xd46e('0x54'),_0x313c7e['value']);logger[_0xd46e('0x61')](_0xd46e('0x62'),_0x4dec29);if(!_[_0xd46e('0x60')](_0x313c7e['value'])&&fs[_0xd46e('0x59')](_0x4dec29)){logger['info'](_0xd46e('0x63')+_0x4dec29+_0xd46e('0x64'));fs[_0xd46e('0x65')](_0x4dec29);}_0x4dec29=_0x4dec29+'.cypher';if(!_[_0xd46e('0x60')](_0x313c7e[_0xd46e('0x51')])&&fs[_0xd46e('0x59')](_0x4dec29)){logger[_0xd46e('0x61')](_0xd46e('0x63')+_0x4dec29+_0xd46e('0x64'));fs[_0xd46e('0x65')](_0x4dec29);}return _0x313c7e;})[_0xd46e('0x25')](function(_0x300ee9){if(!_0x300ee9)throw new InternalError();return _0x300ee9[_0xd46e('0x5f')]();})[_0xd46e('0x25')](function(){_0x329204[_0xd46e('0x1b')](0xcc)[_0xd46e('0x66')]();})[_0xd46e('0x42')](handleError(_0x329204,null));};
\ No newline at end of file
index 7865c4c..50c0312 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe4a6=['screen_recordings','interactionid','lodash','api','moment','bluebird','path','rimraf','./screenRecording.attributes','exports','define','ScreenRecording'];(function(_0x4da46d,_0x40ce82){var _0x5c3f2e=function(_0x16490f){while(--_0x16490f){_0x4da46d['push'](_0x4da46d['shift']());}};_0x5c3f2e(++_0x40ce82);}(_0xe4a6,0x92));var _0x6e4a=function(_0x4527f1,_0x2d1dec){_0x4527f1=_0x4527f1-0x0;var _0x107e4d=_0xe4a6[_0x4527f1];return _0x107e4d;};'use strict';var _=require(_0x6e4a('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x6e4a('0x1'));var moment=require(_0x6e4a('0x2'));var BPromise=require(_0x6e4a('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x6e4a('0x4'));var rimraf=require(_0x6e4a('0x5'));var config=require('../../config/environment');var attributes=require(_0x6e4a('0x6'));module[_0x6e4a('0x7')]=function(_0x2a91d7,_0x405087){return _0x2a91d7[_0x6e4a('0x8')](_0x6e4a('0x9'),attributes,{'tableName':_0x6e4a('0xa'),'paranoid':![],'indexes':[{'name':'interactionid','fields':[_0x6e4a('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x82bc=['bluebird','request-promise','path','rimraf','./screenRecording.attributes','exports','define','ScreenRecording','interactionid','util','../../config/logger','api'];(function(_0x1c3386,_0x2868c0){var _0x2cc8e9=function(_0x556aa2){while(--_0x556aa2){_0x1c3386['push'](_0x1c3386['shift']());}};_0x2cc8e9(++_0x2868c0);}(_0x82bc,0xed));var _0xc82b=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x82bc[_0x321bb2];return _0x9c12ed;};'use strict';var _=require('lodash');var util=require(_0xc82b('0x0'));var logger=require(_0xc82b('0x1'))(_0xc82b('0x2'));var moment=require('moment');var BPromise=require(_0xc82b('0x3'));var rp=require(_0xc82b('0x4'));var fs=require('fs');var path=require(_0xc82b('0x5'));var rimraf=require(_0xc82b('0x6'));var config=require('../../config/environment');var attributes=require(_0xc82b('0x7'));module[_0xc82b('0x8')]=function(_0x2f16c6,_0x2c0187){return _0x2f16c6[_0xc82b('0x9')](_0xc82b('0xa'),attributes,{'tableName':'screen_recordings','paranoid':![],'indexes':[{'name':'interactionid','fields':[_0xc82b('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
index 44105d7..be596e5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2686=['ScreenRecording,\x20%s,\x20%s','message','catch','lodash','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','then','info','request\x20sent','debug','error'];(function(_0x405541,_0x2945cc){var _0x194a1e=function(_0x46fffe){while(--_0x46fffe){_0x405541['push'](_0x405541['shift']());}};_0x194a1e(++_0x2945cc);}(_0x2686,0xe0));var _0x6268=function(_0xb39737,_0x526a4c){_0xb39737=_0xb39737-0x0;var _0x5b8c98=_0x2686[_0xb39737];return _0x5b8c98;};'use strict';var _=require(_0x6268('0x0'));var util=require('util');var moment=require(_0x6268('0x1'));var BPromise=require(_0x6268('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x6268('0x3'));var db=require(_0x6268('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x6268('0x5'))(_0x6268('0x6'));var config=require(_0x6268('0x7'));var jayson=require(_0x6268('0x8'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x118201,_0x684972,_0x1c4a81){return new BPromise(function(_0xfd10be,_0x327408){return client['request'](_0x118201,_0x1c4a81)[_0x6268('0x9')](function(_0x1795c3){logger[_0x6268('0xa')]('ScreenRecording,\x20%s,\x20%s',_0x684972,_0x6268('0xb'));logger[_0x6268('0xc')]('ScreenRecording,\x20%s,\x20%s,\x20%s',_0x684972,_0x6268('0xb'),JSON['stringify'](_0x1795c3));if(_0x1795c3[_0x6268('0xd')]){if(_0x1795c3[_0x6268('0xd')]['code']===0x1f4){logger[_0x6268('0xd')](_0x6268('0xe'),_0x684972,_0x1795c3['error'][_0x6268('0xf')]);return _0x327408(_0x1795c3[_0x6268('0xd')][_0x6268('0xf')]);}logger[_0x6268('0xd')]('ScreenRecording,\x20%s,\x20%s',_0x684972,_0x1795c3['error'][_0x6268('0xf')]);return _0xfd10be(_0x1795c3[_0x6268('0xd')][_0x6268('0xf')]);}else{logger[_0x6268('0xa')]('ScreenRecording,\x20%s,\x20%s',_0x684972,_0x6268('0xb'));_0xfd10be(_0x1795c3['result']['message']);}})[_0x6268('0x10')](function(_0x5ee213){logger[_0x6268('0xd')](_0x6268('0xe'),_0x684972,_0x5ee213);_0x327408(_0x5ee213);});});}
\ No newline at end of file
+var _0xf605=['request\x20sent','stringify','error','code','message','info','ScreenRecording,\x20%s,\x20%s','result','catch','moment','bluebird','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','then'];(function(_0x3c9e43,_0x4f60c9){var _0x2678bf=function(_0x180be2){while(--_0x180be2){_0x3c9e43['push'](_0x3c9e43['shift']());}};_0x2678bf(++_0x4f60c9);}(_0xf605,0x139));var _0x5f60=function(_0x5af97c,_0x24a49f){_0x5af97c=_0x5af97c-0x0;var _0x3472ae=_0xf605[_0x5af97c];return _0x3472ae;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x5f60('0x0'));var BPromise=require(_0x5f60('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x5f60('0x2'));var logger=require('../../config/logger')(_0x5f60('0x3'));var config=require(_0x5f60('0x4'));var jayson=require(_0x5f60('0x5'));var client=jayson[_0x5f60('0x6')][_0x5f60('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x3b5c7e,_0x3a8c2d,_0x4b82cc){return new BPromise(function(_0x625a72,_0x5448dd){return client[_0x5f60('0x8')](_0x3b5c7e,_0x4b82cc)[_0x5f60('0x9')](function(_0x420791){logger['info']('ScreenRecording,\x20%s,\x20%s',_0x3a8c2d,_0x5f60('0xa'));logger['debug']('ScreenRecording,\x20%s,\x20%s,\x20%s',_0x3a8c2d,_0x5f60('0xa'),JSON[_0x5f60('0xb')](_0x420791));if(_0x420791[_0x5f60('0xc')]){if(_0x420791[_0x5f60('0xc')][_0x5f60('0xd')]===0x1f4){logger[_0x5f60('0xc')]('ScreenRecording,\x20%s,\x20%s',_0x3a8c2d,_0x420791[_0x5f60('0xc')][_0x5f60('0xe')]);return _0x5448dd(_0x420791['error'][_0x5f60('0xe')]);}logger[_0x5f60('0xc')]('ScreenRecording,\x20%s,\x20%s',_0x3a8c2d,_0x420791[_0x5f60('0xc')][_0x5f60('0xe')]);return _0x625a72(_0x420791[_0x5f60('0xc')][_0x5f60('0xe')]);}else{logger[_0x5f60('0xf')](_0x5f60('0x10'),_0x3a8c2d,'request\x20sent');_0x625a72(_0x420791[_0x5f60('0x11')][_0x5f60('0xe')]);}})[_0x5f60('0x12')](function(_0x16eae7){logger[_0x5f60('0xc')](_0x5f60('0x10'),_0x3a8c2d,_0x16eae7);_0x5448dd(_0x16eae7);});});}
\ No newline at end of file
index aa99fbb..e451749 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4fea=['index','/:id','show','/:id/logo','getLogo','/:id/logo_login','getLogoLogin','/:id/gdpr','gdpr','/:id/preferred','getFavicon','diskStorage','root','server/files/images/logos/','format','%s%s','logo','extname','originalname','post','single','addLogo','join','logologin','file','addPreferred','favicon','addFavicon','update','multer','util','path','connect-timeout','express','Router','../../config/environment','./setting.controller','get','isAuthenticated'];(function(_0x479160,_0x3ab560){var _0x47ac6d=function(_0x3f7314){while(--_0x3f7314){_0x479160['push'](_0x479160['shift']());}};_0x47ac6d(++_0x3ab560);}(_0x4fea,0x1f1));var _0xa4fe=function(_0x1eec2c,_0x4e0338){_0x1eec2c=_0x1eec2c-0x0;var _0x418ed1=_0x4fea[_0x1eec2c];return _0x418ed1;};'use strict';var multer=require(_0xa4fe('0x0'));var util=require(_0xa4fe('0x1'));var path=require(_0xa4fe('0x2'));var timeout=require(_0xa4fe('0x3'));var express=require(_0xa4fe('0x4'));var router=express[_0xa4fe('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xa4fe('0x6'));var controller=require(_0xa4fe('0x7'));router[_0xa4fe('0x8')]('/',auth[_0xa4fe('0x9')](),controller[_0xa4fe('0xa')]);router[_0xa4fe('0x8')]('/now',controller['getDate']);router[_0xa4fe('0x8')](_0xa4fe('0xb'),controller[_0xa4fe('0xc')]);router[_0xa4fe('0x8')](_0xa4fe('0xd'),controller[_0xa4fe('0xe')]);router['get'](_0xa4fe('0xf'),controller[_0xa4fe('0x10')]);router[_0xa4fe('0x8')](_0xa4fe('0x11'),controller[_0xa4fe('0x12')]);router['get'](_0xa4fe('0x13'),controller['getPreferred']);router[_0xa4fe('0x8')]('/:id/favicon',controller[_0xa4fe('0x14')]);var upload=multer({'storage':multer[_0xa4fe('0x15')]({'destination':function(_0x4a9e4b,_0x11b9c8,_0x6119c7){_0x6119c7(null,path['join'](config[_0xa4fe('0x16')],_0xa4fe('0x17')));},'filename':function(_0xe2cd7b,_0x3b6d96,_0x4be09c){_0x4be09c(null,util[_0xa4fe('0x18')](_0xa4fe('0x19'),_0xa4fe('0x1a'),path[_0xa4fe('0x1b')](_0x3b6d96[_0xa4fe('0x1c')])));}})});router[_0xa4fe('0x1d')](_0xa4fe('0xd'),upload[_0xa4fe('0x1e')]('file'),controller[_0xa4fe('0x1f')]);var upload=multer({'storage':multer[_0xa4fe('0x15')]({'destination':function(_0x3f9971,_0x5ccc64,_0x41eb6a){_0x41eb6a(null,path[_0xa4fe('0x20')](config[_0xa4fe('0x16')],_0xa4fe('0x17')));},'filename':function(_0x41b55e,_0x5e293c,_0x43067a){_0x43067a(null,util[_0xa4fe('0x18')](_0xa4fe('0x19'),_0xa4fe('0x21'),path[_0xa4fe('0x1b')](_0x5e293c[_0xa4fe('0x1c')])));}})});router['post']('/:id/logo_login',upload[_0xa4fe('0x1e')](_0xa4fe('0x22')),controller['addLogoLogin']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0xdd9f7c,_0x47573d,_0x1a588a){_0x1a588a(null,path[_0xa4fe('0x20')](config['root'],_0xa4fe('0x17')));},'filename':function(_0x1ad5f9,_0x1ba3c9,_0x48d248){_0x48d248(null,util[_0xa4fe('0x18')]('%s%s','preferred',path[_0xa4fe('0x1b')](_0x1ba3c9['originalname'])));}})});router[_0xa4fe('0x1d')](_0xa4fe('0x13'),upload[_0xa4fe('0x1e')](_0xa4fe('0x22')),controller[_0xa4fe('0x23')]);var upload=multer({'storage':multer[_0xa4fe('0x15')]({'destination':function(_0x59c90c,_0xeab867,_0x2d2496){_0x2d2496(null,path[_0xa4fe('0x20')](config[_0xa4fe('0x16')],_0xa4fe('0x17')));},'filename':function(_0x38d0d1,_0x22744a,_0x2693c9){_0x2693c9(null,util[_0xa4fe('0x18')]('%s%s',_0xa4fe('0x24'),path[_0xa4fe('0x1b')](_0x22744a[_0xa4fe('0x1c')])));}})});router[_0xa4fe('0x1d')]('/:id/favicon',upload[_0xa4fe('0x1e')](_0xa4fe('0x22')),controller[_0xa4fe('0x25')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0xa4fe('0x26')]);module['exports']=router;
\ No newline at end of file
+var _0x0065=['logologin','extname','originalname','single','preferred','favicon','addFavicon','update','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./setting.controller','isAuthenticated','index','/now','get','/:id','show','/:id/logo','getLogo','/:id/logo_login','/:id/gdpr','gdpr','/:id/preferred','getPreferred','/:id/favicon','getFavicon','diskStorage','join','root','%s%s','post','file','addLogo','server/files/images/logos/','format'];(function(_0x3edc09,_0x1af697){var _0x1aeece=function(_0x2515e5){while(--_0x2515e5){_0x3edc09['push'](_0x3edc09['shift']());}};_0x1aeece(++_0x1af697);}(_0x0065,0xb0));var _0x5006=function(_0x2239c6,_0x43d551){_0x2239c6=_0x2239c6-0x0;var _0xc9ca7b=_0x0065[_0x2239c6];return _0xc9ca7b;};'use strict';var multer=require(_0x5006('0x0'));var util=require(_0x5006('0x1'));var path=require(_0x5006('0x2'));var timeout=require(_0x5006('0x3'));var express=require('express');var router=express[_0x5006('0x4')]();var fs_extra=require(_0x5006('0x5'));var auth=require(_0x5006('0x6'));var interaction=require(_0x5006('0x7'));var config=require(_0x5006('0x8'));var controller=require(_0x5006('0x9'));router['get']('/',auth[_0x5006('0xa')](),controller[_0x5006('0xb')]);router['get'](_0x5006('0xc'),controller['getDate']);router[_0x5006('0xd')](_0x5006('0xe'),controller[_0x5006('0xf')]);router['get'](_0x5006('0x10'),controller[_0x5006('0x11')]);router['get'](_0x5006('0x12'),controller['getLogoLogin']);router['get'](_0x5006('0x13'),controller[_0x5006('0x14')]);router[_0x5006('0xd')](_0x5006('0x15'),controller[_0x5006('0x16')]);router[_0x5006('0xd')](_0x5006('0x17'),controller[_0x5006('0x18')]);var upload=multer({'storage':multer[_0x5006('0x19')]({'destination':function(_0x3879bb,_0x446e87,_0x35ec2b){_0x35ec2b(null,path[_0x5006('0x1a')](config[_0x5006('0x1b')],'server/files/images/logos/'));},'filename':function(_0x11319f,_0x12d993,_0x129042){_0x129042(null,util['format'](_0x5006('0x1c'),'logo',path['extname'](_0x12d993['originalname'])));}})});router[_0x5006('0x1d')](_0x5006('0x10'),upload['single'](_0x5006('0x1e')),controller[_0x5006('0x1f')]);var upload=multer({'storage':multer[_0x5006('0x19')]({'destination':function(_0x198f80,_0x17095f,_0x3091e1){_0x3091e1(null,path['join'](config[_0x5006('0x1b')],_0x5006('0x20')));},'filename':function(_0x38268a,_0xcd21ab,_0x20d654){_0x20d654(null,util[_0x5006('0x21')](_0x5006('0x1c'),_0x5006('0x22'),path[_0x5006('0x23')](_0xcd21ab[_0x5006('0x24')])));}})});router['post'](_0x5006('0x12'),upload[_0x5006('0x25')](_0x5006('0x1e')),controller['addLogoLogin']);var upload=multer({'storage':multer[_0x5006('0x19')]({'destination':function(_0x4322ac,_0x2a2d95,_0xd928f9){_0xd928f9(null,path['join'](config['root'],_0x5006('0x20')));},'filename':function(_0xfb11ab,_0x1a772a,_0x1846a0){_0x1846a0(null,util[_0x5006('0x21')](_0x5006('0x1c'),_0x5006('0x26'),path['extname'](_0x1a772a[_0x5006('0x24')])));}})});router[_0x5006('0x1d')](_0x5006('0x15'),upload[_0x5006('0x25')](_0x5006('0x1e')),controller['addPreferred']);var upload=multer({'storage':multer[_0x5006('0x19')]({'destination':function(_0x4695b3,_0x46b109,_0x276fd2){_0x276fd2(null,path[_0x5006('0x1a')](config['root'],_0x5006('0x20')));},'filename':function(_0x2a0bb8,_0x4ee40c,_0x1f7152){_0x1f7152(null,util[_0x5006('0x21')](_0x5006('0x1c'),_0x5006('0x27'),path[_0x5006('0x23')](_0x4ee40c[_0x5006('0x24')])));}})});router[_0x5006('0x1d')](_0x5006('0x17'),upload[_0x5006('0x25')](_0x5006('0x1e')),controller[_0x5006('0x28')]);router['put'](_0x5006('0xe'),auth['isAuthenticated'](),controller[_0x5006('0x29')]);module['exports']=router;
\ No newline at end of file
index 3365a2f..37dde03 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4c09=['https://www.xcally.com/bar/phonebar/autoupdater.xml','alternate','UNSIGNED','sequelize','exports','INTEGER','min_mailbox','/var/opt/motion2/server/files/sounds/converted','STRING','BOOLEAN'];(function(_0xd71f06,_0x1a56a5){var _0x2529c6=function(_0x3feecf){while(--_0x3feecf){_0xd71f06['push'](_0xd71f06['shift']());}};_0x2529c6(++_0x1a56a5);}(_0x4c09,0x1a7));var _0x94c0=function(_0x354803,_0x3b56d8){_0x354803=_0x354803-0x0;var _0x2e30ba=_0x4c09[_0x354803];return _0x2e30ba;};'use strict';var Sequelize=require(_0x94c0('0x0'));module[_0x94c0('0x1')]={'min_internal':{'type':Sequelize[_0x94c0('0x2')](0xb),'unique':'min_internal','defaultValue':0x3e8},'min_mailbox':{'type':Sequelize[_0x94c0('0x2')](0xb),'unique':_0x94c0('0x3'),'defaultValue':0x3e8},'agi_port':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x11dd},'soundPath':{'type':Sequelize['STRING'],'defaultValue':_0x94c0('0x4')},'logo':{'type':Sequelize[_0x94c0('0x5')]},'defaultLogo':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'loginLogo':{'type':Sequelize[_0x94c0('0x5')]},'defaultLoginLogo':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'headerWhiteLabel':{'type':Sequelize[_0x94c0('0x5')]},'defaultHeaderWhiteLabel':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':!![]},'securePassword':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':!![]},'firstSetup':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':!![]},'stunaddr':{'type':Sequelize[_0x94c0('0x5')]},'turnaddr':{'type':Sequelize[_0x94c0('0x5')]},'turnusername':{'type':Sequelize[_0x94c0('0x5')]},'turnpassword':{'type':Sequelize[_0x94c0('0x5')]},'pageTitle':{'type':Sequelize['STRING']},'defaultPageTitle':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':!![]},'callRecordingEncryption':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':![]},'passwordExpiresDays':{'type':Sequelize[_0x94c0('0x2')](0xb),'defaultValue':0x5a},'phoneBarAutoUpdater':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':!![]},'phoneBarAutoUpdaterUrl':{'type':Sequelize['STRING'],'defaultValue':_0x94c0('0x7')},'enableEmailPreview':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'split':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':!![]},'splitSizeCsv':{'type':Sequelize[_0x94c0('0x2')],'defaultValue':0x1388},'splitSizePdf':{'type':Sequelize['INTEGER'],'defaultValue':0x1388},'splitSizeXlsx':{'type':Sequelize[_0x94c0('0x2')],'defaultValue':0x1388},'messagesAlignment':{'type':Sequelize[_0x94c0('0x5')],'defaultValue':_0x94c0('0x8')},'chatTimeout':{'type':Sequelize[_0x94c0('0x2')],'defaultValue':0x1e},'phoneBarRememberMeEnabled':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':!![]},'preferred':{'type':Sequelize[_0x94c0('0x5')]},'defaultPreferred':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':!![]},'rtlSupport':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':![]},'defaultScreenRecordingPath':{'type':Sequelize['STRING']},'allowedLoginAttempts':{'type':Sequelize[_0x94c0('0x2')],'defaultValue':0x5},'blockDuration':{'type':Sequelize[_0x94c0('0x2')],'defaultValue':0xa},'favicon':{'type':Sequelize[_0x94c0('0x5')]},'defaultFavicon':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':!![]},'loginMailFrequency':{'type':Sequelize[_0x94c0('0x2')],'defaultValue':0xa,'validate':{'min':0xa}},'transcribe':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':![]},'automaticTranscribe':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'transcribeAccountId':{'type':Sequelize['INTEGER']},'transcribeRegion':{'type':Sequelize[_0x94c0('0x5')]},'sentiment':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':![]},'automaticSentiment':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'sentimentAccountId':{'type':Sequelize[_0x94c0('0x2')]},'sentimentRegion':{'type':Sequelize['STRING']},'language':{'type':Sequelize['STRING']},'bucket':{'type':Sequelize['STRING']},'googleSsoEnabled':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':![]},'adSsoEnabled':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':![]},'enforcePasswordHistory':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':!![]},'passwordHistoryLimit':{'type':Sequelize[_0x94c0('0x2')](0x2)[_0x94c0('0x9')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5}},'privacyPolicyEmail':{'type':Sequelize[_0x94c0('0x2')](0x2)[_0x94c0('0x9')],'defaultValue':0x0},'privacyPolicyName':{'type':Sequelize['INTEGER'](0x2)[_0x94c0('0x9')],'defaultValue':0x0},'privacyPolicyNumber':{'type':Sequelize[_0x94c0('0x2')](0x2)[_0x94c0('0x9')],'defaultValue':0x0},'searchOnEnterKey':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':!![]},'chatInteractionsReloadTimeout':{'type':Sequelize[_0x94c0('0x2')],'defaultValue':0x0},'mailInteractionsReloadTimeout':{'type':Sequelize[_0x94c0('0x2')],'defaultValue':0x0},'openchannelInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'smsInteractionsReloadTimeout':{'type':Sequelize[_0x94c0('0x2')],'defaultValue':0x0},'whatsappInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'stopRecordingOnTransfer':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':![]},'secureCookieEnabled':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':!![]},'viewHelpSection':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':!![]},'previewRecallmeReminderInterval':{'type':Sequelize[_0x94c0('0x2')],'defaultValue':0x5,'validate':{'min':0x1}},'disabledCookie':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':![]},'limitTabs':{'type':Sequelize[_0x94c0('0x2')],'defaultValue':0x14},'filterFullName':{'type':Sequelize[_0x94c0('0x6')],'defaultValue':![]}};
\ No newline at end of file
+var _0x3a25=['/var/opt/motion2/server/files/sounds/converted','BOOLEAN','https://www.xcally.com/bar/phonebar/autoupdater.xml','alternate','UNSIGNED','exports','INTEGER','min_internal','STRING'];(function(_0x4dc7b9,_0x319d5a){var _0x3ab114=function(_0x51a9df){while(--_0x51a9df){_0x4dc7b9['push'](_0x4dc7b9['shift']());}};_0x3ab114(++_0x319d5a);}(_0x3a25,0x101));var _0x53a2=function(_0x5730ca,_0xc70b2c){_0x5730ca=_0x5730ca-0x0;var _0x171dde=_0x3a25[_0x5730ca];return _0x171dde;};'use strict';var Sequelize=require('sequelize');module[_0x53a2('0x0')]={'min_internal':{'type':Sequelize[_0x53a2('0x1')](0xb),'unique':_0x53a2('0x2'),'defaultValue':0x3e8},'min_mailbox':{'type':Sequelize[_0x53a2('0x1')](0xb),'unique':'min_mailbox','defaultValue':0x3e8},'agi_port':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x11dd},'soundPath':{'type':Sequelize[_0x53a2('0x3')],'defaultValue':_0x53a2('0x4')},'logo':{'type':Sequelize['STRING']},'defaultLogo':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'loginLogo':{'type':Sequelize[_0x53a2('0x3')]},'defaultLoginLogo':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':!![]},'headerWhiteLabel':{'type':Sequelize[_0x53a2('0x3')]},'defaultHeaderWhiteLabel':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'securePassword':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':!![]},'firstSetup':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':!![]},'stunaddr':{'type':Sequelize['STRING']},'turnaddr':{'type':Sequelize[_0x53a2('0x3')]},'turnusername':{'type':Sequelize[_0x53a2('0x3')]},'turnpassword':{'type':Sequelize['STRING']},'pageTitle':{'type':Sequelize[_0x53a2('0x3')]},'defaultPageTitle':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':!![]},'callRecordingEncryption':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'passwordExpiresDays':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x5a},'phoneBarAutoUpdater':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':!![]},'phoneBarAutoUpdaterUrl':{'type':Sequelize[_0x53a2('0x3')],'defaultValue':_0x53a2('0x6')},'enableEmailPreview':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':![]},'split':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':!![]},'splitSizeCsv':{'type':Sequelize[_0x53a2('0x1')],'defaultValue':0x1388},'splitSizePdf':{'type':Sequelize[_0x53a2('0x1')],'defaultValue':0x1388},'splitSizeXlsx':{'type':Sequelize['INTEGER'],'defaultValue':0x1388},'messagesAlignment':{'type':Sequelize[_0x53a2('0x3')],'defaultValue':_0x53a2('0x7')},'chatTimeout':{'type':Sequelize[_0x53a2('0x1')],'defaultValue':0x1e},'phoneBarRememberMeEnabled':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':!![]},'preferred':{'type':Sequelize[_0x53a2('0x3')]},'defaultPreferred':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'rtlSupport':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'defaultScreenRecordingPath':{'type':Sequelize['STRING']},'allowedLoginAttempts':{'type':Sequelize['INTEGER'],'defaultValue':0x5},'blockDuration':{'type':Sequelize[_0x53a2('0x1')],'defaultValue':0xa},'favicon':{'type':Sequelize[_0x53a2('0x3')]},'defaultFavicon':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':!![]},'loginMailFrequency':{'type':Sequelize[_0x53a2('0x1')],'defaultValue':0xa,'validate':{'min':0xa}},'transcribe':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'automaticTranscribe':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':![]},'transcribeAccountId':{'type':Sequelize['INTEGER']},'transcribeRegion':{'type':Sequelize[_0x53a2('0x3')]},'sentiment':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':![]},'automaticSentiment':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'sentimentAccountId':{'type':Sequelize[_0x53a2('0x1')]},'sentimentRegion':{'type':Sequelize[_0x53a2('0x3')]},'language':{'type':Sequelize['STRING']},'bucket':{'type':Sequelize[_0x53a2('0x3')]},'googleSsoEnabled':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':![]},'adSsoEnabled':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':![]},'enforcePasswordHistory':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':!![]},'passwordHistoryLimit':{'type':Sequelize[_0x53a2('0x1')](0x2)[_0x53a2('0x8')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5}},'privacyPolicyEmail':{'type':Sequelize[_0x53a2('0x1')](0x2)[_0x53a2('0x8')],'defaultValue':0x0},'privacyPolicyName':{'type':Sequelize['INTEGER'](0x2)[_0x53a2('0x8')],'defaultValue':0x0},'privacyPolicyNumber':{'type':Sequelize['INTEGER'](0x2)[_0x53a2('0x8')],'defaultValue':0x0},'searchOnEnterKey':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':!![]},'chatInteractionsReloadTimeout':{'type':Sequelize[_0x53a2('0x1')],'defaultValue':0x0},'mailInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'openchannelInteractionsReloadTimeout':{'type':Sequelize[_0x53a2('0x1')],'defaultValue':0x0},'smsInteractionsReloadTimeout':{'type':Sequelize[_0x53a2('0x1')],'defaultValue':0x0},'whatsappInteractionsReloadTimeout':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'stopRecordingOnTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'secureCookieEnabled':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'viewHelpSection':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':!![]},'previewRecallmeReminderInterval':{'type':Sequelize[_0x53a2('0x1')],'defaultValue':0x5,'validate':{'min':0x1}},'disabledCookie':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'limitTabs':{'type':Sequelize['INTEGER'],'defaultValue':0x14},'filterFullName':{'type':Sequelize[_0x53a2('0x5')],'defaultValue':![]}};
\ No newline at end of file
index efafcb1..d6ae5d6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3036=['count','reject','update','destroy','end','stack','name','index','Setting','rawAttributes','key','map','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','order','where','merge','type','VIRTUAL','filter','options','includeAll','include','rows','show','params','keys','find','body','addLogo','file','filename','logo','loginLogo','../../config/license/util','getLogo','server/files/images/logos','getLicense','preferred','favicon','defaultLogo','defaultPreferred','defaultFavicon','existsSync','join','root','toLower','default_logo.svg','default','upperFirst','custom','Sequelize','\x20not\x20found','getLogoLogin','default_loginLogo.svg','ValidationError','securePassword','addPreferred','getPreferred','default_preferred.png','download','defaultLoginLogo','default_favicon.ico','getDate','utcOffset','now','format','send','zip-dir','fast-json-patch','request-promise','bluebird','sox','ejs','fs-extra','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','jayson/promise','client','http','request','then','info','Setting,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','sendStatus','status','json','offset','undefined','limit'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x3036,0x1a9));var _0x6303=function(_0x51a013,_0x241f6c){_0x51a013=_0x51a013-0x0;var _0x1fd84e=_0x3036[_0x51a013];return _0x1fd84e;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x6303('0x0'));var jsonpatch=require(_0x6303('0x1'));var rp=require(_0x6303('0x2'));var moment=require('moment');var BPromise=require(_0x6303('0x3'));var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0x6303('0x4'));var csv=require('to-csv');var ejs=require(_0x6303('0x5'));var fs=require('fs');var fs_extra=require(_0x6303('0x6'));var _=require(_0x6303('0x7'));var squel=require('squel');var crypto=require(_0x6303('0x8'));var jsforce=require(_0x6303('0x9'));var deskjs=require(_0x6303('0xa'));var toCsv=require(_0x6303('0xb'));var querystring=require(_0x6303('0xc'));var Papa=require(_0x6303('0xd'));var Redis=require(_0x6303('0xe'));var authService=require(_0x6303('0xf'));var qs=require(_0x6303('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x6303('0x11'));var logger=require(_0x6303('0x12'))(_0x6303('0x13'));var utils=require(_0x6303('0x14'));var config=require(_0x6303('0x15'));var licenseUtil=require('../../config/license/util');var db=require(_0x6303('0x16'))['db'];var jayson=require(_0x6303('0x17'));var client=jayson[_0x6303('0x18')][_0x6303('0x19')]({'port':0x232a});function respondWithRpcPromise(_0x284a8b,_0x48462d,_0x5ef678,_0x5d75c1){return new BPromise(function(_0x2726ef,_0x3f8f56){var _0x251995=_0x5d75c1||client;return _0x251995[_0x6303('0x1a')](_0x284a8b,_0x5ef678)[_0x6303('0x1b')](function(_0x43526d){logger[_0x6303('0x1c')](_0x6303('0x1d'),_0x48462d,_0x6303('0x1e'));logger['debug']('Setting,\x20%s,\x20%s,\x20%s',_0x48462d,_0x6303('0x1e'),JSON[_0x6303('0x1f')](_0x43526d));if(_0x43526d[_0x6303('0x20')]){if(_0x43526d[_0x6303('0x20')][_0x6303('0x21')]===0x1f4){logger['error'](_0x6303('0x1d'),_0x48462d,_0x43526d[_0x6303('0x20')][_0x6303('0x22')]);return _0x3f8f56(_0x43526d[_0x6303('0x20')][_0x6303('0x22')]);}logger[_0x6303('0x20')](_0x6303('0x1d'),_0x48462d,_0x43526d[_0x6303('0x20')][_0x6303('0x22')]);return _0x2726ef(_0x43526d[_0x6303('0x20')][_0x6303('0x22')]);}else{logger['info']('Setting,\x20%s,\x20%s',_0x48462d,_0x6303('0x1e'));_0x2726ef(_0x43526d[_0x6303('0x23')][_0x6303('0x22')]);}})[_0x6303('0x24')](function(_0x52235a){logger[_0x6303('0x20')](_0x6303('0x1d'),_0x48462d,_0x52235a);_0x3f8f56(_0x52235a);});});}function respondWithStatusCode(_0x2872e8,_0x18b80a){_0x18b80a=_0x18b80a||0xcc;return function(_0x1336de){if(_0x1336de){return _0x2872e8[_0x6303('0x25')](_0x18b80a);}return _0x2872e8[_0x6303('0x26')](_0x18b80a)['end']();};}function respondWithResult(_0x5cb1b5,_0x135434){_0x135434=_0x135434||0xc8;return function(_0x3fed67){if(_0x3fed67){return _0x5cb1b5['status'](_0x135434)[_0x6303('0x27')](_0x3fed67);}};}function respondWithFilteredResult(_0x38605f,_0x294049){return function(_0x53adbd){if(_0x53adbd){var _0x1e7d33=typeof _0x294049[_0x6303('0x28')]===_0x6303('0x29')&&typeof _0x294049[_0x6303('0x2a')]===_0x6303('0x29');var _0x24b2fc=_0x53adbd[_0x6303('0x2b')];var _0x3bcf79=_0x1e7d33?0x0:_0x294049[_0x6303('0x28')];var _0x29cd61=_0x1e7d33?_0x53adbd[_0x6303('0x2b')]:_0x294049['offset']+_0x294049[_0x6303('0x2a')];var _0x4d1e98;if(_0x29cd61>=_0x24b2fc){_0x29cd61=_0x24b2fc;_0x4d1e98=0xc8;}else{_0x4d1e98=0xce;}_0x38605f[_0x6303('0x26')](_0x4d1e98);return _0x38605f['set']('Content-Range',_0x3bcf79+'-'+_0x29cd61+'/'+_0x24b2fc)[_0x6303('0x27')](_0x53adbd);}return null;};}function patchUpdates(_0x45b623){return function(_0x24f68a){try{jsonpatch['apply'](_0x24f68a,_0x45b623,!![]);}catch(_0x5e8200){return BPromise[_0x6303('0x2c')](_0x5e8200);}return _0x24f68a['save']();};}function saveUpdates(_0x4a9d34,_0x57f803){return function(_0x37ff87){if(_0x37ff87){return _0x37ff87[_0x6303('0x2d')](_0x4a9d34)[_0x6303('0x1b')](function(_0x16df21){return _0x16df21;});}return null;};}function removeEntity(_0x52dfc7,_0x3d00da){return function(_0x32ac2e){if(_0x32ac2e){return _0x32ac2e[_0x6303('0x2e')]()['then'](function(){_0x52dfc7['status'](0xcc)[_0x6303('0x2f')]();});}};}function handleEntityNotFound(_0x561766,_0x1afd81){return function(_0x11b368){if(!_0x11b368){_0x561766[_0x6303('0x25')](0x194);}return _0x11b368;};}function handleError(_0x2db401,_0x470f56){_0x470f56=_0x470f56||0x1f4;return function(_0x57dc5d){logger[_0x6303('0x20')](_0x57dc5d[_0x6303('0x30')]);if(_0x57dc5d[_0x6303('0x31')]){delete _0x57dc5d[_0x6303('0x31')];}_0x2db401[_0x6303('0x26')](_0x470f56)['send'](_0x57dc5d);};}exports[_0x6303('0x32')]=function(_0x3df648,_0x3407f8){var _0x127fd5={},_0x2a4e20={},_0x540eb5={'count':0x0,'rows':[]};var _0x11f497=_['map'](db[_0x6303('0x33')][_0x6303('0x34')],function(_0x38f5f3){return{'name':_0x38f5f3['fieldName'],'type':_0x38f5f3['type'][_0x6303('0x35')]};});_0x2a4e20['model']=_[_0x6303('0x36')](_0x11f497,_0x6303('0x31'));_0x2a4e20[_0x6303('0x37')]=_['keys'](_0x3df648['query']);_0x2a4e20[_0x6303('0x38')]=_[_0x6303('0x39')](_0x2a4e20[_0x6303('0x3a')],_0x2a4e20[_0x6303('0x37')]);_0x127fd5[_0x6303('0x3b')]=_[_0x6303('0x39')](_0x2a4e20['model'],qs[_0x6303('0x3c')](_0x3df648['query'][_0x6303('0x3c')]));_0x127fd5['attributes']=_0x127fd5[_0x6303('0x3b')][_0x6303('0x3d')]?_0x127fd5[_0x6303('0x3b')]:_0x2a4e20[_0x6303('0x3a')];if(!_0x3df648['query'][_0x6303('0x3e')]('nolimit')){_0x127fd5[_0x6303('0x2a')]=qs[_0x6303('0x2a')](_0x3df648['query'][_0x6303('0x2a')]);_0x127fd5[_0x6303('0x28')]=qs['offset'](_0x3df648[_0x6303('0x37')]['offset']);}_0x127fd5[_0x6303('0x3f')]=qs['sort'](_0x3df648['query']['sort']);_0x127fd5[_0x6303('0x40')]=qs[_0x6303('0x38')](_['pick'](_0x3df648['query'],_0x2a4e20[_0x6303('0x38')]),_0x11f497);if(_0x3df648[_0x6303('0x37')]['filter']){_0x127fd5[_0x6303('0x40')]=_[_0x6303('0x41')](_0x127fd5[_0x6303('0x40')],{'$or':_[_0x6303('0x36')](_0x11f497,function(_0x5e2d51){if(_0x5e2d51[_0x6303('0x42')]!==_0x6303('0x43')){var _0x85ff3c={};_0x85ff3c[_0x5e2d51['name']]={'$like':'%'+_0x3df648[_0x6303('0x37')][_0x6303('0x44')]+'%'};return _0x85ff3c;}})});}_0x127fd5=_[_0x6303('0x41')]({},_0x127fd5,_0x3df648[_0x6303('0x45')]);var _0x692daa={'where':_0x127fd5[_0x6303('0x40')]};return db['Setting']['count'](_0x692daa)[_0x6303('0x1b')](function(_0x3e8366){_0x540eb5['count']=_0x3e8366;if(_0x3df648[_0x6303('0x37')][_0x6303('0x46')]){_0x127fd5[_0x6303('0x47')]=[{'all':!![]}];}return db[_0x6303('0x33')]['findAll'](_0x127fd5);})[_0x6303('0x1b')](function(_0x154df3){_0x540eb5[_0x6303('0x48')]=_0x154df3;return _0x540eb5;})[_0x6303('0x1b')](respondWithFilteredResult(_0x3407f8,_0x127fd5))['catch'](handleError(_0x3407f8,null));};exports[_0x6303('0x49')]=function(_0x29c701,_0x51a7ac){var _0x31f0e7={'raw':![],'where':{'id':_0x29c701[_0x6303('0x4a')]['id']}},_0x174121={};_0x174121[_0x6303('0x3a')]=_[_0x6303('0x4b')](db[_0x6303('0x33')][_0x6303('0x34')]);_0x174121[_0x6303('0x37')]=_[_0x6303('0x4b')](_0x29c701[_0x6303('0x37')]);_0x174121[_0x6303('0x38')]=_[_0x6303('0x39')](_0x174121[_0x6303('0x3a')],_0x174121['query']);_0x31f0e7[_0x6303('0x3b')]=_['intersection'](_0x174121[_0x6303('0x3a')],qs[_0x6303('0x3c')](_0x29c701['query']['fields']));_0x31f0e7[_0x6303('0x3b')]=_0x31f0e7[_0x6303('0x3b')][_0x6303('0x3d')]?_0x31f0e7[_0x6303('0x3b')]:_0x174121[_0x6303('0x3a')];if(_0x29c701[_0x6303('0x37')][_0x6303('0x46')]){_0x31f0e7[_0x6303('0x47')]=[{'all':!![]}];}_0x31f0e7=_[_0x6303('0x41')]({},_0x31f0e7,_0x29c701[_0x6303('0x45')]);return db[_0x6303('0x33')][_0x6303('0x4c')](_0x31f0e7)[_0x6303('0x1b')](handleEntityNotFound(_0x51a7ac,null))['then'](respondWithResult(_0x51a7ac,null))[_0x6303('0x24')](handleError(_0x51a7ac,null));};exports['update']=function(_0x5d3e0f,_0x59e6ea){if(_0x5d3e0f[_0x6303('0x4d')]['id']){delete _0x5d3e0f['body']['id'];}return db['Setting']['find']({'where':{'id':_0x5d3e0f[_0x6303('0x4a')]['id']}})[_0x6303('0x1b')](handleEntityNotFound(_0x59e6ea,null))['then'](saveUpdates(_0x5d3e0f[_0x6303('0x4d')],null))['then'](respondWithResult(_0x59e6ea,null))['catch'](handleError(_0x59e6ea,null));};exports[_0x6303('0x4e')]=function(_0x1cd73d,_0x180188,_0x15ae67){if(_0x1cd73d[_0x6303('0x4f')]&&_0x1cd73d[_0x6303('0x4f')][_0x6303('0x50')]){_0x1cd73d[_0x6303('0x4d')][_0x6303('0x51')]=_0x1cd73d[_0x6303('0x4f')]['filename'];}return db[_0x6303('0x33')]['find']({'where':{'id':_0x1cd73d[_0x6303('0x4a')]['id']}})[_0x6303('0x1b')](handleEntityNotFound(_0x180188,null))[_0x6303('0x1b')](saveUpdates(_0x1cd73d[_0x6303('0x4d')],null))[_0x6303('0x1b')](respondWithResult(_0x180188,null))['catch'](handleError(_0x180188,null));};exports['addLogoLogin']=function(_0x3de3a4,_0x502eb0,_0x36dc30){if(_0x3de3a4['file']&&_0x3de3a4[_0x6303('0x4f')]['filename']){_0x3de3a4['body'][_0x6303('0x52')]=_0x3de3a4[_0x6303('0x4f')]['filename'];}return db[_0x6303('0x33')][_0x6303('0x4c')]({'where':{'id':_0x3de3a4[_0x6303('0x4a')]['id']}})[_0x6303('0x1b')](handleEntityNotFound(_0x502eb0,null))['then'](saveUpdates(_0x3de3a4[_0x6303('0x4d')],null))[_0x6303('0x1b')](respondWithResult(_0x502eb0,null))[_0x6303('0x24')](handleError(_0x502eb0,null));};var utilLicense=require(_0x6303('0x53'));exports[_0x6303('0x54')]=function(_0x4d3d24,_0x5d8bea,_0x3f9fb4){var _0x42d5d5=_0x6303('0x55');var _0x576e13={'custom':![]};return utilLicense[_0x6303('0x56')]()[_0x6303('0x1b')](function(_0x35c787){if(_0x35c787){_0x576e13=_0x35c787;}return db[_0x6303('0x33')][_0x6303('0x4c')]({'where':{'id':_0x4d3d24[_0x6303('0x4a')]['id']},'attributes':[_0x6303('0x51'),'loginLogo',_0x6303('0x57'),_0x6303('0x58'),_0x6303('0x59'),'defaultLoginLogo',_0x6303('0x5a'),_0x6303('0x5b')],'raw':!![]});})['then'](handleEntityNotFound(_0x5d8bea,null))[_0x6303('0x1b')](function(_0x2335ef){if(_0x2335ef){var _0x5c8adf=_0x2335ef[_0x6303('0x51')]&&fs[_0x6303('0x5c')](path[_0x6303('0x5d')](config[_0x6303('0x5e')],_0x42d5d5,_[_0x6303('0x5f')](_0x2335ef[_0x6303('0x51')])))?path[_0x6303('0x5d')](config[_0x6303('0x5e')],_0x42d5d5,_['toLower'](_0x2335ef[_0x6303('0x51')])):path[_0x6303('0x5d')](config[_0x6303('0x5e')],_0x42d5d5,_[_0x6303('0x5f')](_0x6303('0x60')));var _0xe708ef=_0x6303('0x61')+_[_0x6303('0x62')](_0x6303('0x51'));if(_0x2335ef[_0xe708ef]||!_0x576e13[_0x6303('0x63')]){_0x5c8adf=path[_0x6303('0x5d')](config['root'],_0x42d5d5,_['toLower'](_0x6303('0x60')));}if(!fs[_0x6303('0x5c')](_0x5c8adf)){throw new db[(_0x6303('0x64'))]['ValidationError'](_['upperFirst'](_0x6303('0x51'))+_0x6303('0x65'));}return _0x5d8bea['download'](_0x5c8adf);}})[_0x6303('0x24')](handleError(_0x5d8bea,null));};var utilLicense=require('../../config/license/util');exports[_0x6303('0x66')]=function(_0x2641eb,_0x4f0277,_0x4876a2){var _0x289885='server/files/images/logos';var _0x3cdfce={'custom':![]};return utilLicense[_0x6303('0x56')]()[_0x6303('0x1b')](function(_0x12c84c){if(_0x12c84c){_0x3cdfce=_0x12c84c;}return db['Setting']['find']({'where':{'id':_0x2641eb[_0x6303('0x4a')]['id']},'attributes':[_0x6303('0x51'),_0x6303('0x52'),_0x6303('0x57'),'favicon','defaultLogo','defaultLoginLogo','defaultPreferred',_0x6303('0x5b')],'raw':!![]});})[_0x6303('0x1b')](handleEntityNotFound(_0x4f0277,null))['then'](function(_0x34b8cd){if(_0x34b8cd){var _0x4e3d25=_0x34b8cd[_0x6303('0x52')]&&fs[_0x6303('0x5c')](path[_0x6303('0x5d')](config['root'],_0x289885,_['toLower'](_0x34b8cd[_0x6303('0x52')])))?path[_0x6303('0x5d')](config['root'],_0x289885,_[_0x6303('0x5f')](_0x34b8cd[_0x6303('0x52')])):path[_0x6303('0x5d')](config[_0x6303('0x5e')],_0x289885,_[_0x6303('0x5f')]('default_loginLogo.svg'));var _0x50b695=_0x6303('0x61')+_[_0x6303('0x62')]('loginLogo');if(_0x34b8cd[_0x50b695]||!_0x3cdfce['custom']){_0x4e3d25=path['join'](config[_0x6303('0x5e')],_0x289885,_['toLower'](_0x6303('0x67')));}if(!fs[_0x6303('0x5c')](_0x4e3d25)){throw new db[(_0x6303('0x64'))][(_0x6303('0x68'))](_[_0x6303('0x62')]('loginLogo')+_0x6303('0x65'));}return _0x4f0277['download'](_0x4e3d25);}})[_0x6303('0x24')](handleError(_0x4f0277,null));};exports['gdpr']=function(_0x17ac20,_0x10692a){return db[_0x6303('0x33')]['find']({'where':{'id':_0x17ac20[_0x6303('0x4a')]['id']},'attributes':[_0x6303('0x69')]})[_0x6303('0x1b')](respondWithResult(_0x10692a,null))[_0x6303('0x24')](handleError(_0x10692a,null));};exports[_0x6303('0x6a')]=function(_0x16729e,_0x292026,_0x55e808){if(_0x16729e[_0x6303('0x4f')]&&_0x16729e[_0x6303('0x4f')][_0x6303('0x50')]){_0x16729e[_0x6303('0x4d')][_0x6303('0x57')]=_0x16729e[_0x6303('0x4f')][_0x6303('0x50')];}return db['Setting'][_0x6303('0x4c')]({'where':{'id':_0x16729e['params']['id']}})['then'](handleEntityNotFound(_0x292026,null))[_0x6303('0x1b')](saveUpdates(_0x16729e[_0x6303('0x4d')],null))['then'](respondWithResult(_0x292026,null))['catch'](handleError(_0x292026,null));};var utilLicense=require('../../config/license/util');exports[_0x6303('0x6b')]=function(_0xeb08a,_0x3908b2,_0x2784fb){var _0x1ca960=_0x6303('0x55');var _0xc321db={'custom':![]};return utilLicense[_0x6303('0x56')]()['then'](function(_0x44a4d4){if(_0x44a4d4){_0xc321db=_0x44a4d4;}return db[_0x6303('0x33')]['find']({'where':{'id':_0xeb08a[_0x6303('0x4a')]['id']},'attributes':[_0x6303('0x51'),_0x6303('0x52'),'preferred',_0x6303('0x58'),'defaultLogo','defaultLoginLogo',_0x6303('0x5a'),_0x6303('0x5b')],'raw':!![]});})[_0x6303('0x1b')](handleEntityNotFound(_0x3908b2,null))['then'](function(_0xe2c579){if(_0xe2c579){var _0x4973df=_0xe2c579[_0x6303('0x57')]&&fs[_0x6303('0x5c')](path[_0x6303('0x5d')](config[_0x6303('0x5e')],_0x1ca960,_[_0x6303('0x5f')](_0xe2c579['preferred'])))?path['join'](config[_0x6303('0x5e')],_0x1ca960,_[_0x6303('0x5f')](_0xe2c579[_0x6303('0x57')])):path['join'](config[_0x6303('0x5e')],_0x1ca960,_['toLower']('default_preferred.png'));var _0x5437a4=_0x6303('0x61')+_['upperFirst']('preferred');if(_0xe2c579[_0x5437a4]||!_0xc321db['custom']||!_0xc321db[_0x6303('0x57')]){_0x4973df=path[_0x6303('0x5d')](config[_0x6303('0x5e')],_0x1ca960,_[_0x6303('0x5f')](_0x6303('0x6c')));}if(!fs[_0x6303('0x5c')](_0x4973df)){throw new db[(_0x6303('0x64'))][(_0x6303('0x68'))](_[_0x6303('0x62')](_0x6303('0x57'))+_0x6303('0x65'));}return _0x3908b2[_0x6303('0x6d')](_0x4973df);}})[_0x6303('0x24')](handleError(_0x3908b2,null));};exports['addFavicon']=function(_0x302c2f,_0x624f1e,_0x5d0417){if(_0x302c2f[_0x6303('0x4f')]&&_0x302c2f[_0x6303('0x4f')]['filename']){_0x302c2f['body'][_0x6303('0x58')]=_0x302c2f[_0x6303('0x4f')][_0x6303('0x50')];}return db['Setting'][_0x6303('0x4c')]({'where':{'id':_0x302c2f[_0x6303('0x4a')]['id']}})['then'](handleEntityNotFound(_0x624f1e,null))['then'](saveUpdates(_0x302c2f['body'],null))[_0x6303('0x1b')](respondWithResult(_0x624f1e,null))['catch'](handleError(_0x624f1e,null));};var utilLicense=require(_0x6303('0x53'));exports['getFavicon']=function(_0x22e82b,_0x138107,_0x525f66){var _0x4e8ddc=_0x6303('0x55');var _0x11170b={'custom':![]};return utilLicense[_0x6303('0x56')]()['then'](function(_0xc46c7e){if(_0xc46c7e){_0x11170b=_0xc46c7e;}return db[_0x6303('0x33')][_0x6303('0x4c')]({'where':{'id':_0x22e82b[_0x6303('0x4a')]['id']},'attributes':[_0x6303('0x51'),_0x6303('0x52'),_0x6303('0x57'),_0x6303('0x58'),_0x6303('0x59'),_0x6303('0x6e'),'defaultPreferred',_0x6303('0x5b')],'raw':!![]});})['then'](handleEntityNotFound(_0x138107,null))[_0x6303('0x1b')](function(_0x205261){if(_0x205261){var _0x1179f9=_0x205261[_0x6303('0x58')]&&fs[_0x6303('0x5c')](path[_0x6303('0x5d')](config[_0x6303('0x5e')],_0x4e8ddc,_[_0x6303('0x5f')](_0x205261[_0x6303('0x58')])))?path[_0x6303('0x5d')](config[_0x6303('0x5e')],_0x4e8ddc,_[_0x6303('0x5f')](_0x205261[_0x6303('0x58')])):path[_0x6303('0x5d')](config['root'],_0x4e8ddc,_['toLower']('default_favicon.ico'));var _0x27c09f=_0x6303('0x61')+_['upperFirst'](_0x6303('0x58'));if(_0x205261[_0x27c09f]||!_0x11170b[_0x6303('0x63')]){_0x1179f9=path[_0x6303('0x5d')](config[_0x6303('0x5e')],_0x4e8ddc,_[_0x6303('0x5f')](_0x6303('0x6f')));}if(!fs[_0x6303('0x5c')](_0x1179f9)){throw new db[(_0x6303('0x64'))][(_0x6303('0x68'))](_[_0x6303('0x62')](_0x6303('0x58'))+_0x6303('0x65'));}return _0x138107[_0x6303('0x6d')](_0x1179f9);}})[_0x6303('0x24')](handleError(_0x138107,null));};exports[_0x6303('0x70')]=function(_0x162178,_0x1a76b7){var _0x59157c={'offset':moment()[_0x6303('0x71')]()};_0x59157c[_0x6303('0x72')]=moment()[_0x6303('0x71')](_0x59157c[_0x6303('0x28')])[_0x6303('0x73')]('YYYY-MM-DD\x20HH:mm:ss:SSS');return _0x1a76b7[_0x6303('0x26')](0xc8)[_0x6303('0x74')](_0x59157c);};
\ No newline at end of file
+var _0xe20e=['getLogo','getLicense','logo','loginLogo','preferred','favicon','defaultLogo','defaultLoginLogo','defaultPreferred','defaultFavicon','existsSync','join','toLower','root','default_logo.svg','Sequelize','ValidationError','upperFirst','\x20not\x20found','download','getLogoLogin','server/files/images/logos','default_loginLogo.svg','custom','securePassword','addPreferred','default_preferred.png','default','addFavicon','default_favicon.ico','getDate','utcOffset','send','eml-format','rimraf','fast-json-patch','request-promise','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','jayson/promise','client','http','request','info','Setting,\x20%s,\x20%s','request\x20sent','debug','stringify','code','error','message','result','sendStatus','status','limit','undefined','count','offset','set','Content-Range','json','apply','save','update','then','destroy','end','stack','name','index','map','type','key','model','query','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','Setting','includeAll','findAll','rows','catch','show','params','keys','rawAttributes','length','include','find','body','addLogo','file','filename','addLogoLogin'];(function(_0x1fce4a,_0x1177be){var _0x3ea026=function(_0x532214){while(--_0x532214){_0x1fce4a['push'](_0x1fce4a['shift']());}};_0x3ea026(++_0x1177be);}(_0xe20e,0x195));var _0xee20=function(_0x7d8e66,_0x599dbd){_0x7d8e66=_0x7d8e66-0x0;var _0x190e52=_0xe20e[_0x7d8e66];return _0x190e52;};'use strict';var emlformat=require(_0xee20('0x0'));var rimraf=require(_0xee20('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xee20('0x2'));var rp=require(_0xee20('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xee20('0x4'));var util=require('util');var path=require(_0xee20('0x5'));var sox=require(_0xee20('0x6'));var csv=require(_0xee20('0x7'));var ejs=require(_0xee20('0x8'));var fs=require('fs');var fs_extra=require(_0xee20('0x9'));var _=require(_0xee20('0xa'));var squel=require(_0xee20('0xb'));var crypto=require(_0xee20('0xc'));var jsforce=require(_0xee20('0xd'));var deskjs=require(_0xee20('0xe'));var toCsv=require(_0xee20('0x7'));var querystring=require(_0xee20('0xf'));var Papa=require('papaparse');var Redis=require(_0xee20('0x10'));var authService=require(_0xee20('0x11'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xee20('0x12'));var logger=require(_0xee20('0x13'))(_0xee20('0x14'));var utils=require(_0xee20('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xee20('0x16'));var db=require(_0xee20('0x17'))['db'];var jayson=require(_0xee20('0x18'));var client=jayson[_0xee20('0x19')][_0xee20('0x1a')]({'port':0x232a});function respondWithRpcPromise(_0x3d61e8,_0x190e86,_0x5eb7b7,_0x3da816){return new BPromise(function(_0x4e1e75,_0x3f6df3){var _0x18e765=_0x3da816||client;return _0x18e765[_0xee20('0x1b')](_0x3d61e8,_0x5eb7b7)['then'](function(_0x6a910e){logger[_0xee20('0x1c')](_0xee20('0x1d'),_0x190e86,_0xee20('0x1e'));logger[_0xee20('0x1f')]('Setting,\x20%s,\x20%s,\x20%s',_0x190e86,_0xee20('0x1e'),JSON[_0xee20('0x20')](_0x6a910e));if(_0x6a910e['error']){if(_0x6a910e['error'][_0xee20('0x21')]===0x1f4){logger['error'](_0xee20('0x1d'),_0x190e86,_0x6a910e[_0xee20('0x22')][_0xee20('0x23')]);return _0x3f6df3(_0x6a910e[_0xee20('0x22')][_0xee20('0x23')]);}logger['error']('Setting,\x20%s,\x20%s',_0x190e86,_0x6a910e[_0xee20('0x22')][_0xee20('0x23')]);return _0x4e1e75(_0x6a910e[_0xee20('0x22')]['message']);}else{logger[_0xee20('0x1c')](_0xee20('0x1d'),_0x190e86,_0xee20('0x1e'));_0x4e1e75(_0x6a910e[_0xee20('0x24')][_0xee20('0x23')]);}})['catch'](function(_0x337826){logger['error'](_0xee20('0x1d'),_0x190e86,_0x337826);_0x3f6df3(_0x337826);});});}function respondWithStatusCode(_0x4b4134,_0x53a158){_0x53a158=_0x53a158||0xcc;return function(_0xc9af6c){if(_0xc9af6c){return _0x4b4134[_0xee20('0x25')](_0x53a158);}return _0x4b4134[_0xee20('0x26')](_0x53a158)['end']();};}function respondWithResult(_0x47b507,_0x5d0db3){_0x5d0db3=_0x5d0db3||0xc8;return function(_0x1030de){if(_0x1030de){return _0x47b507[_0xee20('0x26')](_0x5d0db3)['json'](_0x1030de);}};}function respondWithFilteredResult(_0x989704,_0x256250){return function(_0xc0e06b){if(_0xc0e06b){var _0x789af8=typeof _0x256250['offset']==='undefined'&&typeof _0x256250[_0xee20('0x27')]===_0xee20('0x28');var _0x378f40=_0xc0e06b[_0xee20('0x29')];var _0x1c3ccf=_0x789af8?0x0:_0x256250[_0xee20('0x2a')];var _0x5c2079=_0x789af8?_0xc0e06b[_0xee20('0x29')]:_0x256250[_0xee20('0x2a')]+_0x256250[_0xee20('0x27')];var _0x5d994a;if(_0x5c2079>=_0x378f40){_0x5c2079=_0x378f40;_0x5d994a=0xc8;}else{_0x5d994a=0xce;}_0x989704[_0xee20('0x26')](_0x5d994a);return _0x989704[_0xee20('0x2b')](_0xee20('0x2c'),_0x1c3ccf+'-'+_0x5c2079+'/'+_0x378f40)[_0xee20('0x2d')](_0xc0e06b);}return null;};}function patchUpdates(_0x458cd9){return function(_0x18cb44){try{jsonpatch[_0xee20('0x2e')](_0x18cb44,_0x458cd9,!![]);}catch(_0x47ac08){return BPromise['reject'](_0x47ac08);}return _0x18cb44[_0xee20('0x2f')]();};}function saveUpdates(_0x151425,_0x5c0078){return function(_0x31cf1a){if(_0x31cf1a){return _0x31cf1a[_0xee20('0x30')](_0x151425)[_0xee20('0x31')](function(_0x3f01d2){return _0x3f01d2;});}return null;};}function removeEntity(_0xd41556,_0x516633){return function(_0x5e49d6){if(_0x5e49d6){return _0x5e49d6[_0xee20('0x32')]()['then'](function(){_0xd41556[_0xee20('0x26')](0xcc)[_0xee20('0x33')]();});}};}function handleEntityNotFound(_0x1f0b8b,_0x1ec302){return function(_0x358e39){if(!_0x358e39){_0x1f0b8b[_0xee20('0x25')](0x194);}return _0x358e39;};}function handleError(_0xe9f98,_0x3bd190){_0x3bd190=_0x3bd190||0x1f4;return function(_0x33a779){logger['error'](_0x33a779[_0xee20('0x34')]);if(_0x33a779[_0xee20('0x35')]){delete _0x33a779[_0xee20('0x35')];}_0xe9f98[_0xee20('0x26')](_0x3bd190)['send'](_0x33a779);};}exports[_0xee20('0x36')]=function(_0x2b52b1,_0x657da7){var _0x4fc165={},_0x348c4f={},_0x806f13={'count':0x0,'rows':[]};var _0x3a212c=_[_0xee20('0x37')](db['Setting']['rawAttributes'],function(_0x3c4628){return{'name':_0x3c4628['fieldName'],'type':_0x3c4628[_0xee20('0x38')][_0xee20('0x39')]};});_0x348c4f[_0xee20('0x3a')]=_[_0xee20('0x37')](_0x3a212c,_0xee20('0x35'));_0x348c4f[_0xee20('0x3b')]=_['keys'](_0x2b52b1[_0xee20('0x3b')]);_0x348c4f[_0xee20('0x3c')]=_['intersection'](_0x348c4f[_0xee20('0x3a')],_0x348c4f[_0xee20('0x3b')]);_0x4fc165['attributes']=_[_0xee20('0x3d')](_0x348c4f[_0xee20('0x3a')],qs[_0xee20('0x3e')](_0x2b52b1['query']['fields']));_0x4fc165['attributes']=_0x4fc165[_0xee20('0x3f')]['length']?_0x4fc165[_0xee20('0x3f')]:_0x348c4f[_0xee20('0x3a')];if(!_0x2b52b1[_0xee20('0x3b')][_0xee20('0x40')](_0xee20('0x41'))){_0x4fc165[_0xee20('0x27')]=qs[_0xee20('0x27')](_0x2b52b1[_0xee20('0x3b')]['limit']);_0x4fc165['offset']=qs[_0xee20('0x2a')](_0x2b52b1[_0xee20('0x3b')][_0xee20('0x2a')]);}_0x4fc165[_0xee20('0x42')]=qs[_0xee20('0x43')](_0x2b52b1['query'][_0xee20('0x43')]);_0x4fc165[_0xee20('0x44')]=qs['filters'](_[_0xee20('0x45')](_0x2b52b1[_0xee20('0x3b')],_0x348c4f[_0xee20('0x3c')]),_0x3a212c);if(_0x2b52b1[_0xee20('0x3b')][_0xee20('0x46')]){_0x4fc165[_0xee20('0x44')]=_[_0xee20('0x47')](_0x4fc165[_0xee20('0x44')],{'$or':_[_0xee20('0x37')](_0x3a212c,function(_0x546de4){if(_0x546de4[_0xee20('0x38')]!==_0xee20('0x48')){var _0x9f556f={};_0x9f556f[_0x546de4['name']]={'$like':'%'+_0x2b52b1[_0xee20('0x3b')][_0xee20('0x46')]+'%'};return _0x9f556f;}})});}_0x4fc165=_[_0xee20('0x47')]({},_0x4fc165,_0x2b52b1[_0xee20('0x49')]);var _0x494b9b={'where':_0x4fc165['where']};return db[_0xee20('0x4a')][_0xee20('0x29')](_0x494b9b)['then'](function(_0x4e20c8){_0x806f13[_0xee20('0x29')]=_0x4e20c8;if(_0x2b52b1['query'][_0xee20('0x4b')]){_0x4fc165['include']=[{'all':!![]}];}return db['Setting'][_0xee20('0x4c')](_0x4fc165);})[_0xee20('0x31')](function(_0x597d10){_0x806f13[_0xee20('0x4d')]=_0x597d10;return _0x806f13;})[_0xee20('0x31')](respondWithFilteredResult(_0x657da7,_0x4fc165))[_0xee20('0x4e')](handleError(_0x657da7,null));};exports[_0xee20('0x4f')]=function(_0x3cac09,_0x10a5c4){var _0x4842aa={'raw':![],'where':{'id':_0x3cac09[_0xee20('0x50')]['id']}},_0x177240={};_0x177240['model']=_[_0xee20('0x51')](db[_0xee20('0x4a')][_0xee20('0x52')]);_0x177240[_0xee20('0x3b')]=_['keys'](_0x3cac09['query']);_0x177240[_0xee20('0x3c')]=_[_0xee20('0x3d')](_0x177240[_0xee20('0x3a')],_0x177240[_0xee20('0x3b')]);_0x4842aa[_0xee20('0x3f')]=_[_0xee20('0x3d')](_0x177240[_0xee20('0x3a')],qs[_0xee20('0x3e')](_0x3cac09[_0xee20('0x3b')][_0xee20('0x3e')]));_0x4842aa[_0xee20('0x3f')]=_0x4842aa[_0xee20('0x3f')][_0xee20('0x53')]?_0x4842aa[_0xee20('0x3f')]:_0x177240['model'];if(_0x3cac09[_0xee20('0x3b')][_0xee20('0x4b')]){_0x4842aa[_0xee20('0x54')]=[{'all':!![]}];}_0x4842aa=_[_0xee20('0x47')]({},_0x4842aa,_0x3cac09[_0xee20('0x49')]);return db['Setting'][_0xee20('0x55')](_0x4842aa)[_0xee20('0x31')](handleEntityNotFound(_0x10a5c4,null))[_0xee20('0x31')](respondWithResult(_0x10a5c4,null))[_0xee20('0x4e')](handleError(_0x10a5c4,null));};exports[_0xee20('0x30')]=function(_0x2fde89,_0x2e3ccc){if(_0x2fde89[_0xee20('0x56')]['id']){delete _0x2fde89['body']['id'];}return db[_0xee20('0x4a')][_0xee20('0x55')]({'where':{'id':_0x2fde89[_0xee20('0x50')]['id']}})[_0xee20('0x31')](handleEntityNotFound(_0x2e3ccc,null))[_0xee20('0x31')](saveUpdates(_0x2fde89[_0xee20('0x56')],null))['then'](respondWithResult(_0x2e3ccc,null))['catch'](handleError(_0x2e3ccc,null));};exports[_0xee20('0x57')]=function(_0x318a1d,_0x5c6288,_0x4c0501){if(_0x318a1d[_0xee20('0x58')]&&_0x318a1d['file'][_0xee20('0x59')]){_0x318a1d['body']['logo']=_0x318a1d[_0xee20('0x58')][_0xee20('0x59')];}return db[_0xee20('0x4a')]['find']({'where':{'id':_0x318a1d[_0xee20('0x50')]['id']}})[_0xee20('0x31')](handleEntityNotFound(_0x5c6288,null))['then'](saveUpdates(_0x318a1d[_0xee20('0x56')],null))[_0xee20('0x31')](respondWithResult(_0x5c6288,null))['catch'](handleError(_0x5c6288,null));};exports[_0xee20('0x5a')]=function(_0x34c846,_0x2f2012,_0x2884b8){if(_0x34c846['file']&&_0x34c846[_0xee20('0x58')][_0xee20('0x59')]){_0x34c846[_0xee20('0x56')]['loginLogo']=_0x34c846[_0xee20('0x58')][_0xee20('0x59')];}return db[_0xee20('0x4a')]['find']({'where':{'id':_0x34c846[_0xee20('0x50')]['id']}})[_0xee20('0x31')](handleEntityNotFound(_0x2f2012,null))[_0xee20('0x31')](saveUpdates(_0x34c846['body'],null))[_0xee20('0x31')](respondWithResult(_0x2f2012,null))['catch'](handleError(_0x2f2012,null));};var utilLicense=require(_0xee20('0x16'));exports[_0xee20('0x5b')]=function(_0x4ad4cf,_0x232002,_0x362084){var _0x39aa5e='server/files/images/logos';var _0x5a3759={'custom':![]};return utilLicense[_0xee20('0x5c')]()[_0xee20('0x31')](function(_0x42e8f5){if(_0x42e8f5){_0x5a3759=_0x42e8f5;}return db[_0xee20('0x4a')][_0xee20('0x55')]({'where':{'id':_0x4ad4cf['params']['id']},'attributes':[_0xee20('0x5d'),_0xee20('0x5e'),_0xee20('0x5f'),_0xee20('0x60'),_0xee20('0x61'),_0xee20('0x62'),_0xee20('0x63'),_0xee20('0x64')],'raw':!![]});})['then'](handleEntityNotFound(_0x232002,null))[_0xee20('0x31')](function(_0x38f94a){if(_0x38f94a){var _0x34c3e1=_0x38f94a['logo']&&fs[_0xee20('0x65')](path[_0xee20('0x66')](config['root'],_0x39aa5e,_[_0xee20('0x67')](_0x38f94a[_0xee20('0x5d')])))?path[_0xee20('0x66')](config[_0xee20('0x68')],_0x39aa5e,_[_0xee20('0x67')](_0x38f94a[_0xee20('0x5d')])):path[_0xee20('0x66')](config['root'],_0x39aa5e,_[_0xee20('0x67')]('default_logo.svg'));var _0x5bac94='default'+_['upperFirst'](_0xee20('0x5d'));if(_0x38f94a[_0x5bac94]||!_0x5a3759['custom']){_0x34c3e1=path[_0xee20('0x66')](config[_0xee20('0x68')],_0x39aa5e,_[_0xee20('0x67')](_0xee20('0x69')));}if(!fs['existsSync'](_0x34c3e1)){throw new db[(_0xee20('0x6a'))][(_0xee20('0x6b'))](_[_0xee20('0x6c')](_0xee20('0x5d'))+_0xee20('0x6d'));}return _0x232002[_0xee20('0x6e')](_0x34c3e1);}})[_0xee20('0x4e')](handleError(_0x232002,null));};var utilLicense=require(_0xee20('0x16'));exports[_0xee20('0x6f')]=function(_0x44c842,_0x250908,_0x58d1d2){var _0x418ba4=_0xee20('0x70');var _0x3881dc={'custom':![]};return utilLicense[_0xee20('0x5c')]()[_0xee20('0x31')](function(_0x22b507){if(_0x22b507){_0x3881dc=_0x22b507;}return db[_0xee20('0x4a')][_0xee20('0x55')]({'where':{'id':_0x44c842[_0xee20('0x50')]['id']},'attributes':[_0xee20('0x5d'),'loginLogo','preferred','favicon',_0xee20('0x61'),_0xee20('0x62'),_0xee20('0x63'),_0xee20('0x64')],'raw':!![]});})[_0xee20('0x31')](handleEntityNotFound(_0x250908,null))[_0xee20('0x31')](function(_0x15b51a){if(_0x15b51a){var _0x4b1d45=_0x15b51a[_0xee20('0x5e')]&&fs[_0xee20('0x65')](path['join'](config['root'],_0x418ba4,_['toLower'](_0x15b51a[_0xee20('0x5e')])))?path[_0xee20('0x66')](config[_0xee20('0x68')],_0x418ba4,_['toLower'](_0x15b51a['loginLogo'])):path['join'](config[_0xee20('0x68')],_0x418ba4,_[_0xee20('0x67')](_0xee20('0x71')));var _0x5b67db='default'+_[_0xee20('0x6c')]('loginLogo');if(_0x15b51a[_0x5b67db]||!_0x3881dc[_0xee20('0x72')]){_0x4b1d45=path['join'](config[_0xee20('0x68')],_0x418ba4,_[_0xee20('0x67')](_0xee20('0x71')));}if(!fs['existsSync'](_0x4b1d45)){throw new db[(_0xee20('0x6a'))][(_0xee20('0x6b'))](_[_0xee20('0x6c')](_0xee20('0x5e'))+'\x20not\x20found');}return _0x250908[_0xee20('0x6e')](_0x4b1d45);}})[_0xee20('0x4e')](handleError(_0x250908,null));};exports['gdpr']=function(_0x5c74d7,_0x28e804){return db[_0xee20('0x4a')]['find']({'where':{'id':_0x5c74d7['params']['id']},'attributes':[_0xee20('0x73')]})[_0xee20('0x31')](respondWithResult(_0x28e804,null))[_0xee20('0x4e')](handleError(_0x28e804,null));};exports[_0xee20('0x74')]=function(_0x16ac4b,_0x2b61c6,_0x50142a){if(_0x16ac4b[_0xee20('0x58')]&&_0x16ac4b[_0xee20('0x58')]['filename']){_0x16ac4b[_0xee20('0x56')][_0xee20('0x5f')]=_0x16ac4b[_0xee20('0x58')][_0xee20('0x59')];}return db[_0xee20('0x4a')][_0xee20('0x55')]({'where':{'id':_0x16ac4b[_0xee20('0x50')]['id']}})[_0xee20('0x31')](handleEntityNotFound(_0x2b61c6,null))[_0xee20('0x31')](saveUpdates(_0x16ac4b['body'],null))[_0xee20('0x31')](respondWithResult(_0x2b61c6,null))[_0xee20('0x4e')](handleError(_0x2b61c6,null));};var utilLicense=require(_0xee20('0x16'));exports['getPreferred']=function(_0x2d8866,_0x176382,_0x25ad10){var _0x63ea68=_0xee20('0x70');var _0x4ecaa4={'custom':![]};return utilLicense[_0xee20('0x5c')]()['then'](function(_0x5257b5){if(_0x5257b5){_0x4ecaa4=_0x5257b5;}return db[_0xee20('0x4a')][_0xee20('0x55')]({'where':{'id':_0x2d8866[_0xee20('0x50')]['id']},'attributes':[_0xee20('0x5d'),_0xee20('0x5e'),_0xee20('0x5f'),_0xee20('0x60'),_0xee20('0x61'),_0xee20('0x62'),'defaultPreferred','defaultFavicon'],'raw':!![]});})['then'](handleEntityNotFound(_0x176382,null))[_0xee20('0x31')](function(_0x235edd){if(_0x235edd){var _0x5d6302=_0x235edd[_0xee20('0x5f')]&&fs['existsSync'](path[_0xee20('0x66')](config[_0xee20('0x68')],_0x63ea68,_[_0xee20('0x67')](_0x235edd[_0xee20('0x5f')])))?path[_0xee20('0x66')](config[_0xee20('0x68')],_0x63ea68,_[_0xee20('0x67')](_0x235edd[_0xee20('0x5f')])):path[_0xee20('0x66')](config[_0xee20('0x68')],_0x63ea68,_[_0xee20('0x67')](_0xee20('0x75')));var _0x5e54ba=_0xee20('0x76')+_[_0xee20('0x6c')](_0xee20('0x5f'));if(_0x235edd[_0x5e54ba]||!_0x4ecaa4[_0xee20('0x72')]||!_0x4ecaa4[_0xee20('0x5f')]){_0x5d6302=path[_0xee20('0x66')](config['root'],_0x63ea68,_['toLower'](_0xee20('0x75')));}if(!fs[_0xee20('0x65')](_0x5d6302)){throw new db[(_0xee20('0x6a'))]['ValidationError'](_[_0xee20('0x6c')](_0xee20('0x5f'))+_0xee20('0x6d'));}return _0x176382[_0xee20('0x6e')](_0x5d6302);}})[_0xee20('0x4e')](handleError(_0x176382,null));};exports[_0xee20('0x77')]=function(_0xf14001,_0x30dc05,_0x1190c0){if(_0xf14001[_0xee20('0x58')]&&_0xf14001[_0xee20('0x58')][_0xee20('0x59')]){_0xf14001[_0xee20('0x56')][_0xee20('0x60')]=_0xf14001[_0xee20('0x58')]['filename'];}return db[_0xee20('0x4a')][_0xee20('0x55')]({'where':{'id':_0xf14001['params']['id']}})[_0xee20('0x31')](handleEntityNotFound(_0x30dc05,null))[_0xee20('0x31')](saveUpdates(_0xf14001['body'],null))['then'](respondWithResult(_0x30dc05,null))[_0xee20('0x4e')](handleError(_0x30dc05,null));};var utilLicense=require(_0xee20('0x16'));exports['getFavicon']=function(_0x200477,_0x21bf71,_0x414c39){var _0x1dadc7=_0xee20('0x70');var _0x53cff0={'custom':![]};return utilLicense[_0xee20('0x5c')]()[_0xee20('0x31')](function(_0x4e4cee){if(_0x4e4cee){_0x53cff0=_0x4e4cee;}return db[_0xee20('0x4a')]['find']({'where':{'id':_0x200477[_0xee20('0x50')]['id']},'attributes':[_0xee20('0x5d'),_0xee20('0x5e'),_0xee20('0x5f'),_0xee20('0x60'),_0xee20('0x61'),_0xee20('0x62'),_0xee20('0x63'),_0xee20('0x64')],'raw':!![]});})[_0xee20('0x31')](handleEntityNotFound(_0x21bf71,null))[_0xee20('0x31')](function(_0x123804){if(_0x123804){var _0x3cd103=_0x123804[_0xee20('0x60')]&&fs[_0xee20('0x65')](path[_0xee20('0x66')](config[_0xee20('0x68')],_0x1dadc7,_[_0xee20('0x67')](_0x123804[_0xee20('0x60')])))?path[_0xee20('0x66')](config[_0xee20('0x68')],_0x1dadc7,_[_0xee20('0x67')](_0x123804[_0xee20('0x60')])):path[_0xee20('0x66')](config[_0xee20('0x68')],_0x1dadc7,_[_0xee20('0x67')](_0xee20('0x78')));var _0x2055da=_0xee20('0x76')+_[_0xee20('0x6c')](_0xee20('0x60'));if(_0x123804[_0x2055da]||!_0x53cff0[_0xee20('0x72')]){_0x3cd103=path[_0xee20('0x66')](config[_0xee20('0x68')],_0x1dadc7,_[_0xee20('0x67')](_0xee20('0x78')));}if(!fs[_0xee20('0x65')](_0x3cd103)){throw new db[(_0xee20('0x6a'))][(_0xee20('0x6b'))](_[_0xee20('0x6c')]('favicon')+_0xee20('0x6d'));}return _0x21bf71[_0xee20('0x6e')](_0x3cd103);}})['catch'](handleError(_0x21bf71,null));};exports[_0xee20('0x79')]=function(_0xb47286,_0x4c8b5c){var _0x29f341={'offset':moment()[_0xee20('0x7a')]()};_0x29f341['now']=moment()[_0xee20('0x7a')](_0x29f341['offset'])['format']('YYYY-MM-DD\x20HH:mm:ss:SSS');return _0x4c8b5c[_0xee20('0x26')](0xc8)[_0xee20('0x7b')](_0x29f341);};
\ No newline at end of file
index f66dc85..f071288 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3e74=['exports','Setting','settings','lodash','../../config/logger','api','moment','path','../../config/environment','./setting.attributes'];(function(_0xfb42e6,_0x5f5d4b){var _0x27265b=function(_0x163e81){while(--_0x163e81){_0xfb42e6['push'](_0xfb42e6['shift']());}};_0x27265b(++_0x5f5d4b);}(_0x3e74,0x175));var _0x43e7=function(_0x1171e9,_0x2e1bb8){_0x1171e9=_0x1171e9-0x0;var _0x5c9373=_0x3e74[_0x1171e9];return _0x5c9373;};'use strict';var _=require(_0x43e7('0x0'));var util=require('util');var logger=require(_0x43e7('0x1'))(_0x43e7('0x2'));var moment=require(_0x43e7('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x43e7('0x4'));var rimraf=require('rimraf');var config=require(_0x43e7('0x5'));var attributes=require(_0x43e7('0x6'));module[_0x43e7('0x7')]=function(_0x1c503b,_0xc98b9c){return _0x1c503b['define'](_0x43e7('0x8'),attributes,{'tableName':_0x43e7('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x9957=['exports','define','Setting','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','./setting.attributes'];(function(_0x2f45ea,_0x15c656){var _0x485a84=function(_0x4a1fe3){while(--_0x4a1fe3){_0x2f45ea['push'](_0x2f45ea['shift']());}};_0x485a84(++_0x15c656);}(_0x9957,0x93));var _0x7995=function(_0x6131cd,_0x4c26a1){_0x6131cd=_0x6131cd-0x0;var _0x47e916=_0x9957[_0x6131cd];return _0x47e916;};'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':'settings','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 2bcbc5a..b30acee 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfd62=['moment','randomstring','ioredis','rpc','jayson/promise','client','request','then','info','Setting,\x20%s,\x20%s','request\x20sent','Setting,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','ShowSetting','Setting','raw','options','where','attributes','include','map','model','debug','lodash'];(function(_0x5ea6c2,_0x137660){var _0x30a7b1=function(_0x67e739){while(--_0x67e739){_0x5ea6c2['push'](_0x5ea6c2['shift']());}};_0x30a7b1(++_0x137660);}(_0xfd62,0x16b));var _0x2fd6=function(_0x3ac882,_0x563ff0){_0x3ac882=_0x3ac882-0x0;var _0x4d6353=_0xfd62[_0x3ac882];return _0x4d6353;};'use strict';var _=require(_0x2fd6('0x0'));var util=require('util');var moment=require(_0x2fd6('0x1'));var BPromise=require('bluebird');var rs=require(_0x2fd6('0x2'));var fs=require('fs');var Redis=require(_0x2fd6('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x2fd6('0x4'));var config=require('../../config/environment');var jayson=require(_0x2fd6('0x5'));var client=jayson[_0x2fd6('0x6')]['http']({'port':0x232a});function respondWithRpcPromise(_0x4601ad,_0x281b68,_0x256c8b){return new BPromise(function(_0x3cc4fd,_0x565791){return client[_0x2fd6('0x7')](_0x4601ad,_0x256c8b)[_0x2fd6('0x8')](function(_0x5a9df5){logger[_0x2fd6('0x9')](_0x2fd6('0xa'),_0x281b68,_0x2fd6('0xb'));logger['debug'](_0x2fd6('0xc'),_0x281b68,_0x2fd6('0xb'),JSON[_0x2fd6('0xd')](_0x5a9df5));if(_0x5a9df5['error']){if(_0x5a9df5[_0x2fd6('0xe')][_0x2fd6('0xf')]===0x1f4){logger[_0x2fd6('0xe')](_0x2fd6('0xa'),_0x281b68,_0x5a9df5['error'][_0x2fd6('0x10')]);return _0x565791(_0x5a9df5[_0x2fd6('0xe')][_0x2fd6('0x10')]);}logger[_0x2fd6('0xe')]('Setting,\x20%s,\x20%s',_0x281b68,_0x5a9df5[_0x2fd6('0xe')][_0x2fd6('0x10')]);return _0x3cc4fd(_0x5a9df5[_0x2fd6('0xe')][_0x2fd6('0x10')]);}else{logger[_0x2fd6('0x9')]('Setting,\x20%s,\x20%s',_0x281b68,_0x2fd6('0xb'));_0x3cc4fd(_0x5a9df5['result']['message']);}})[_0x2fd6('0x11')](function(_0xc23abe){logger[_0x2fd6('0xe')](_0x2fd6('0xa'),_0x281b68,_0xc23abe);_0x565791(_0xc23abe);});});}exports[_0x2fd6('0x12')]=function(_0x3a6ed4){var _0x1be3fe=this;return new Promise(function(_0x3a4afa,_0xa37d14){return db[_0x2fd6('0x13')]['find']({'raw':_0x3a6ed4['options']?_0x3a6ed4['options'][_0x2fd6('0x14')]===undefined?!![]:![]:!![],'where':_0x3a6ed4[_0x2fd6('0x15')]?_0x3a6ed4[_0x2fd6('0x15')][_0x2fd6('0x16')]||null:null,'attributes':_0x3a6ed4['options']?_0x3a6ed4[_0x2fd6('0x15')][_0x2fd6('0x17')]||null:null,'include':_0x3a6ed4['options']?_0x3a6ed4['options'][_0x2fd6('0x18')]?_[_0x2fd6('0x19')](_0x3a6ed4[_0x2fd6('0x15')][_0x2fd6('0x18')],function(_0x46b3fc){return{'model':db[_0x46b3fc[_0x2fd6('0x1a')]],'as':_0x46b3fc['as'],'attributes':_0x46b3fc[_0x2fd6('0x17')],'include':_0x46b3fc[_0x2fd6('0x18')]?_[_0x2fd6('0x19')](_0x46b3fc[_0x2fd6('0x18')],function(_0x5dad2d){return{'model':db[_0x5dad2d[_0x2fd6('0x1a')]],'as':_0x5dad2d['as'],'attributes':_0x5dad2d['attributes'],'include':_0x5dad2d[_0x2fd6('0x18')]?_[_0x2fd6('0x19')](_0x5dad2d[_0x2fd6('0x18')],function(_0x4269ce){return{'model':db[_0x4269ce[_0x2fd6('0x1a')]],'as':_0x4269ce['as'],'attributes':_0x4269ce[_0x2fd6('0x17')]};}):[]};}):[]};}):[]:[]})[_0x2fd6('0x8')](function(_0x113c0a){logger[_0x2fd6('0x9')](_0x2fd6('0x12'),_0x3a6ed4);logger[_0x2fd6('0x1b')](_0x2fd6('0x12'),_0x3a6ed4,JSON[_0x2fd6('0xd')](_0x113c0a));_0x3a4afa(_0x113c0a);})[_0x2fd6('0x11')](function(_0x24889b){logger[_0x2fd6('0xe')](_0x2fd6('0x12'),_0x24889b[_0x2fd6('0x10')],_0x3a6ed4);_0xa37d14(_0x1be3fe[_0x2fd6('0xe')](0x1f4,_0x24889b[_0x2fd6('0x10')]));});});};
\ No newline at end of file
+var _0xd33b=['../../config/logger','../../config/environment','jayson/promise','client','request','info','Setting,\x20%s,\x20%s','request\x20sent','Setting,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','ShowSetting','Setting','find','options','raw','where','attributes','include','map','model','then','debug','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xd33b,0xbf));var _0xbd33=function(_0x4915a2,_0x562f66){_0x4915a2=_0x4915a2-0x0;var _0x294cd3=_0xd33b[_0x4915a2];return _0x294cd3;};'use strict';var _=require(_0xbd33('0x0'));var util=require(_0xbd33('0x1'));var moment=require('moment');var BPromise=require(_0xbd33('0x2'));var rs=require(_0xbd33('0x3'));var fs=require('fs');var Redis=require(_0xbd33('0x4'));var db=require(_0xbd33('0x5'))['db'];var utils=require(_0xbd33('0x6'));var logger=require(_0xbd33('0x7'))('rpc');var config=require(_0xbd33('0x8'));var jayson=require(_0xbd33('0x9'));var client=jayson[_0xbd33('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x8a3603,_0x4d7503,_0x454d85){return new BPromise(function(_0x341def,_0x270aca){return client[_0xbd33('0xb')](_0x8a3603,_0x454d85)['then'](function(_0x53f5f9){logger[_0xbd33('0xc')](_0xbd33('0xd'),_0x4d7503,_0xbd33('0xe'));logger['debug'](_0xbd33('0xf'),_0x4d7503,_0xbd33('0xe'),JSON[_0xbd33('0x10')](_0x53f5f9));if(_0x53f5f9[_0xbd33('0x11')]){if(_0x53f5f9[_0xbd33('0x11')][_0xbd33('0x12')]===0x1f4){logger['error']('Setting,\x20%s,\x20%s',_0x4d7503,_0x53f5f9[_0xbd33('0x11')][_0xbd33('0x13')]);return _0x270aca(_0x53f5f9['error'][_0xbd33('0x13')]);}logger[_0xbd33('0x11')](_0xbd33('0xd'),_0x4d7503,_0x53f5f9['error'][_0xbd33('0x13')]);return _0x341def(_0x53f5f9[_0xbd33('0x11')][_0xbd33('0x13')]);}else{logger[_0xbd33('0xc')]('Setting,\x20%s,\x20%s',_0x4d7503,_0xbd33('0xe'));_0x341def(_0x53f5f9['result']['message']);}})[_0xbd33('0x14')](function(_0x54f4fd){logger['error'](_0xbd33('0xd'),_0x4d7503,_0x54f4fd);_0x270aca(_0x54f4fd);});});}exports[_0xbd33('0x15')]=function(_0x5c2171){var _0x5d0e6f=this;return new Promise(function(_0x46310c,_0x413210){return db[_0xbd33('0x16')][_0xbd33('0x17')]({'raw':_0x5c2171[_0xbd33('0x18')]?_0x5c2171[_0xbd33('0x18')][_0xbd33('0x19')]===undefined?!![]:![]:!![],'where':_0x5c2171[_0xbd33('0x18')]?_0x5c2171[_0xbd33('0x18')][_0xbd33('0x1a')]||null:null,'attributes':_0x5c2171['options']?_0x5c2171[_0xbd33('0x18')][_0xbd33('0x1b')]||null:null,'include':_0x5c2171['options']?_0x5c2171['options']['include']?_['map'](_0x5c2171[_0xbd33('0x18')][_0xbd33('0x1c')],function(_0x35e14e){return{'model':db[_0x35e14e['model']],'as':_0x35e14e['as'],'attributes':_0x35e14e[_0xbd33('0x1b')],'include':_0x35e14e['include']?_[_0xbd33('0x1d')](_0x35e14e[_0xbd33('0x1c')],function(_0x4b8c8f){return{'model':db[_0x4b8c8f[_0xbd33('0x1e')]],'as':_0x4b8c8f['as'],'attributes':_0x4b8c8f[_0xbd33('0x1b')],'include':_0x4b8c8f[_0xbd33('0x1c')]?_[_0xbd33('0x1d')](_0x4b8c8f[_0xbd33('0x1c')],function(_0x9c863d){return{'model':db[_0x9c863d['model']],'as':_0x9c863d['as'],'attributes':_0x9c863d[_0xbd33('0x1b')]};}):[]};}):[]};}):[]:[]})[_0xbd33('0x1f')](function(_0x1f2ba2){logger[_0xbd33('0xc')]('ShowSetting',_0x5c2171);logger[_0xbd33('0x20')]('ShowSetting',_0x5c2171,JSON[_0xbd33('0x10')](_0x1f2ba2));_0x46310c(_0x1f2ba2);})[_0xbd33('0x14')](function(_0x1045da){logger[_0xbd33('0x11')](_0xbd33('0x15'),_0x1045da[_0xbd33('0x13')],_0x5c2171);_0x413210(_0x5d0e6f[_0xbd33('0x11')](0x1f4,_0x1045da[_0xbd33('0x13')]));});});};
\ No newline at end of file
index 834860e..a22bc38 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['getInteractions','/:id/status','statusGet','/:id/users','post','create','addAnswer','/:id/notify','notify','addApplications','send','status','addAgents','put','/:id','update','delete','destroy','/:id/canned_answers','removeAnswers','removeAgents','exports','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsAccount.controller','get','index','/describe','isAuthenticated','/:id/dispositions','getDispositions','getAnswers','/:id/applications','getApplications'];(function(_0x1572d8,_0x39e328){var _0x182d7f=function(_0x28c424){while(--_0x28c424){_0x1572d8['push'](_0x1572d8['shift']());}};_0x182d7f(++_0x39e328);}(_0x7a54,0x106));var _0x47a5=function(_0xa2a662,_0x229986){_0xa2a662=_0xa2a662-0x0;var _0xd35ad5=_0x7a54[_0xa2a662];return _0xd35ad5;};'use strict';var multer=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var path=require(_0x47a5('0x2'));var timeout=require('connect-timeout');var express=require(_0x47a5('0x3'));var router=express[_0x47a5('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x47a5('0x5'));var interaction=require(_0x47a5('0x6'));var config=require(_0x47a5('0x7'));var controller=require(_0x47a5('0x8'));router[_0x47a5('0x9')]('/',auth['isAuthenticated'](),controller[_0x47a5('0xa')]);router['get'](_0x47a5('0xb'),auth[_0x47a5('0xc')](),controller['describe']);router[_0x47a5('0x9')]('/:id',auth['isAuthenticated'](),controller['show']);router[_0x47a5('0x9')](_0x47a5('0xd'),auth['isAuthenticated'](),controller[_0x47a5('0xe')]);router['get']('/:id/canned_answers',auth[_0x47a5('0xc')](),controller[_0x47a5('0xf')]);router[_0x47a5('0x9')](_0x47a5('0x10'),auth[_0x47a5('0xc')](),controller[_0x47a5('0x11')]);router[_0x47a5('0x9')]('/:id/interactions',auth[_0x47a5('0xc')](),controller[_0x47a5('0x12')]);router[_0x47a5('0x9')](_0x47a5('0x13'),controller[_0x47a5('0x14')]);router[_0x47a5('0x9')](_0x47a5('0x15'),auth[_0x47a5('0xc')](),controller['getAgents']);router[_0x47a5('0x16')]('/',auth[_0x47a5('0xc')](),controller[_0x47a5('0x17')]);router[_0x47a5('0x16')](_0x47a5('0xd'),auth['isAuthenticated'](),controller['addDisposition']);router[_0x47a5('0x16')]('/:id/canned_answers',auth['isAuthenticated'](),controller[_0x47a5('0x18')]);router[_0x47a5('0x16')](_0x47a5('0x19'),controller[_0x47a5('0x1a')]);router[_0x47a5('0x16')](_0x47a5('0x10'),auth[_0x47a5('0xc')](),controller[_0x47a5('0x1b')]);router[_0x47a5('0x16')]('/:id/send',auth[_0x47a5('0xc')](),controller[_0x47a5('0x1c')]);router['post'](_0x47a5('0x13'),controller[_0x47a5('0x1d')]);router[_0x47a5('0x16')]('/:id/users',auth[_0x47a5('0xc')](),controller[_0x47a5('0x1e')]);router[_0x47a5('0x1f')](_0x47a5('0x20'),auth['isAuthenticated'](),controller[_0x47a5('0x21')]);router[_0x47a5('0x22')]('/:id',auth[_0x47a5('0xc')](),controller[_0x47a5('0x23')]);router[_0x47a5('0x22')](_0x47a5('0xd'),auth[_0x47a5('0xc')](),controller['removeDispositions']);router['delete'](_0x47a5('0x24'),auth['isAuthenticated'](),controller[_0x47a5('0x25')]);router['delete'](_0x47a5('0x15'),auth[_0x47a5('0xc')](),controller[_0x47a5('0x26')]);module[_0x47a5('0x27')]=router;
\ No newline at end of file
+var _0x9957=['getInteractions','statusGet','/:id/users','getAgents','post','create','addDisposition','/:id/canned_answers','addAnswer','addApplications','/:id/status','status','addAgents','/:id','update','delete','destroy','removeDispositions','removeAnswers','removeAgents','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./smsAccount.controller','get','isAuthenticated','index','/describe','describe','show','/:id/dispositions','getDispositions','getAnswers','/:id/applications','getApplications','/:id/interactions'];(function(_0x54fc1f,_0x1703c2){var _0x53f699=function(_0x3fad74){while(--_0x3fad74){_0x54fc1f['push'](_0x54fc1f['shift']());}};_0x53f699(++_0x1703c2);}(_0x9957,0x93));var _0x7995=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x9957[_0x5b644e];return _0x49c6bf;};'use strict';var multer=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var path=require(_0x7995('0x2'));var timeout=require(_0x7995('0x3'));var express=require('express');var router=express[_0x7995('0x4')]();var fs_extra=require(_0x7995('0x5'));var auth=require(_0x7995('0x6'));var interaction=require(_0x7995('0x7'));var config=require('../../config/environment');var controller=require(_0x7995('0x8'));router[_0x7995('0x9')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0xb')]);router[_0x7995('0x9')](_0x7995('0xc'),auth['isAuthenticated'](),controller[_0x7995('0xd')]);router[_0x7995('0x9')]('/:id',auth[_0x7995('0xa')](),controller[_0x7995('0xe')]);router[_0x7995('0x9')](_0x7995('0xf'),auth[_0x7995('0xa')](),controller[_0x7995('0x10')]);router[_0x7995('0x9')]('/:id/canned_answers',auth[_0x7995('0xa')](),controller[_0x7995('0x11')]);router['get'](_0x7995('0x12'),auth[_0x7995('0xa')](),controller[_0x7995('0x13')]);router[_0x7995('0x9')](_0x7995('0x14'),auth[_0x7995('0xa')](),controller[_0x7995('0x15')]);router['get']('/:id/status',controller[_0x7995('0x16')]);router[_0x7995('0x9')](_0x7995('0x17'),auth[_0x7995('0xa')](),controller[_0x7995('0x18')]);router[_0x7995('0x19')]('/',auth[_0x7995('0xa')](),controller[_0x7995('0x1a')]);router['post'](_0x7995('0xf'),auth['isAuthenticated'](),controller[_0x7995('0x1b')]);router[_0x7995('0x19')](_0x7995('0x1c'),auth[_0x7995('0xa')](),controller[_0x7995('0x1d')]);router[_0x7995('0x19')]('/:id/notify',controller['notify']);router[_0x7995('0x19')]('/:id/applications',auth['isAuthenticated'](),controller[_0x7995('0x1e')]);router[_0x7995('0x19')]('/:id/send',auth[_0x7995('0xa')](),controller['send']);router['post'](_0x7995('0x1f'),controller[_0x7995('0x20')]);router[_0x7995('0x19')](_0x7995('0x17'),auth[_0x7995('0xa')](),controller[_0x7995('0x21')]);router['put'](_0x7995('0x22'),auth[_0x7995('0xa')](),controller[_0x7995('0x23')]);router[_0x7995('0x24')](_0x7995('0x22'),auth[_0x7995('0xa')](),controller[_0x7995('0x25')]);router[_0x7995('0x24')]('/:id/dispositions',auth[_0x7995('0xa')](),controller[_0x7995('0x26')]);router[_0x7995('0x24')](_0x7995('0x1c'),auth[_0x7995('0xa')](),controller[_0x7995('0x27')]);router['delete'](_0x7995('0x17'),auth['isAuthenticated'](),controller[_0x7995('0x28')]);module[_0x7995('0x29')]=router;
\ No newline at end of file
index 49e214c..efc8808 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x27ed=['skebby','clicksend','plivo','clickatell','infobip','intelepeer','BOOLEAN','Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}','INTEGER','mandatoryDispositionPauseId','mandatoryDisposition','sequelize','randomstring','STRING','generate','ENUM'];(function(_0x1035c1,_0x2d8583){var _0x308d67=function(_0x58ddb6){while(--_0x58ddb6){_0x1035c1['push'](_0x1035c1['shift']());}};_0x308d67(++_0x2d8583);}(_0x27ed,0x7b));var _0xd27e=function(_0x5b9cc5,_0x18e69b){_0x5b9cc5=_0x5b9cc5-0x0;var _0x2d679f=_0x27ed[_0x5b9cc5];return _0x2d679f;};'use strict';var Sequelize=require(_0xd27e('0x0'));var rs=require(_0xd27e('0x1'));module['exports']={'name':{'type':Sequelize[_0xd27e('0x2')],'unique':'name','allowNull':![]},'key':{'type':Sequelize['STRING'],'allowNull':![]},'remote':{'type':Sequelize[_0xd27e('0x2')],'allowNull':![]},'token':{'type':Sequelize[_0xd27e('0x2')],'defaultValue':function(){return rs[_0xd27e('0x3')]();}},'phone':{'type':Sequelize[_0xd27e('0x2')]},'type':{'type':Sequelize[_0xd27e('0x4')]('twilio',_0xd27e('0x5'),'connectel',_0xd27e('0x6'),_0xd27e('0x7'),_0xd27e('0x8'),'bandwidth','csc',_0xd27e('0x9'),_0xd27e('0xa'))},'accountSid':{'type':Sequelize['STRING']},'authId':{'type':Sequelize[_0xd27e('0x2')]},'authToken':{'type':Sequelize[_0xd27e('0x2')]},'smsMethod':{'type':Sequelize[_0xd27e('0x4')]('SI','TI','GP')},'username':{'type':Sequelize[_0xd27e('0x2')]},'password':{'type':Sequelize[_0xd27e('0x2')]},'apiKey':{'type':Sequelize['STRING']},'applicationId':{'type':Sequelize[_0xd27e('0x2')]},'accountId':{'type':Sequelize[_0xd27e('0x2')]},'senderString':{'type':Sequelize[_0xd27e('0x2')]},'deliveryReport':{'type':Sequelize[_0xd27e('0xb')],'defaultValue':![]},'description':{'type':Sequelize[_0xd27e('0x2')]},'notificationTemplate':{'type':Sequelize['TEXT'],'defaultValue':function(){return _0xd27e('0xc');}},'notificationSound':{'type':Sequelize[_0xd27e('0xb')],'defaultValue':!![]},'notificationShake':{'type':Sequelize[_0xd27e('0xb')],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0xd27e('0xd')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0xd27e('0xd')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0xd27e('0xb')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0xd27e('0xb')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xd27e('0xd')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'baseUrl':{'type':Sequelize[_0xd27e('0x2')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0xd27e('0xd')],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize[_0xd27e('0xb')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x4e6f3b){if(!_0x4e6f3b)this['setDataValue'](_0xd27e('0xe'),null);this['setDataValue'](_0xd27e('0xf'),_0x4e6f3b);}}};
\ No newline at end of file
+var _0x5f4f=['name','generate','ENUM','skebby','connectel','clicksend','plivo','clickatell','bandwidth','csc','infobip','intelepeer','BOOLEAN','TEXT','Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}','INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','setDataValue','mandatoryDisposition','sequelize','randomstring','exports','STRING'];(function(_0x3041b7,_0x3a9223){var _0x2d6953=function(_0x30eccf){while(--_0x30eccf){_0x3041b7['push'](_0x3041b7['shift']());}};_0x2d6953(++_0x3a9223);}(_0x5f4f,0xf9));var _0xf5f4=function(_0x5cbace,_0x33943c){_0x5cbace=_0x5cbace-0x0;var _0x6de5b8=_0x5f4f[_0x5cbace];return _0x6de5b8;};'use strict';var Sequelize=require(_0xf5f4('0x0'));var rs=require(_0xf5f4('0x1'));module[_0xf5f4('0x2')]={'name':{'type':Sequelize[_0xf5f4('0x3')],'unique':_0xf5f4('0x4'),'allowNull':![]},'key':{'type':Sequelize['STRING'],'allowNull':![]},'remote':{'type':Sequelize['STRING'],'allowNull':![]},'token':{'type':Sequelize[_0xf5f4('0x3')],'defaultValue':function(){return rs[_0xf5f4('0x5')]();}},'phone':{'type':Sequelize[_0xf5f4('0x3')]},'type':{'type':Sequelize[_0xf5f4('0x6')]('twilio',_0xf5f4('0x7'),_0xf5f4('0x8'),_0xf5f4('0x9'),_0xf5f4('0xa'),_0xf5f4('0xb'),_0xf5f4('0xc'),_0xf5f4('0xd'),_0xf5f4('0xe'),_0xf5f4('0xf'))},'accountSid':{'type':Sequelize[_0xf5f4('0x3')]},'authId':{'type':Sequelize[_0xf5f4('0x3')]},'authToken':{'type':Sequelize[_0xf5f4('0x3')]},'smsMethod':{'type':Sequelize[_0xf5f4('0x6')]('SI','TI','GP')},'username':{'type':Sequelize[_0xf5f4('0x3')]},'password':{'type':Sequelize['STRING']},'apiKey':{'type':Sequelize[_0xf5f4('0x3')]},'applicationId':{'type':Sequelize['STRING']},'accountId':{'type':Sequelize[_0xf5f4('0x3')]},'senderString':{'type':Sequelize[_0xf5f4('0x3')]},'deliveryReport':{'type':Sequelize[_0xf5f4('0x10')],'defaultValue':![]},'description':{'type':Sequelize['STRING']},'notificationTemplate':{'type':Sequelize[_0xf5f4('0x11')],'defaultValue':function(){return _0xf5f4('0x12');}},'notificationSound':{'type':Sequelize[_0xf5f4('0x10')],'defaultValue':!![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0xf5f4('0x13')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0xf5f4('0x13')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0xf5f4('0x10')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0xf5f4('0x13')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0xf5f4('0x13')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'baseUrl':{'type':Sequelize[_0xf5f4('0x3')]},'mandatoryDispositionPauseId':{'type':Sequelize[_0xf5f4('0x13')],'comment':_0xf5f4('0x14')},'mandatoryDisposition':{'type':Sequelize[_0xf5f4('0x10')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0x28fc39){if(!_0x28fc39)this[_0xf5f4('0x15')]('mandatoryDispositionPauseId',null);this[_0xf5f4('0x15')](_0xf5f4('0x16'),_0x28fc39);}}};
\ No newline at end of file
index 24b4535..4b805ca 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaa74=['from','sender','text','clicksend','Text','MessageUUID','infobip','results','csc','originatingAddress','fromNumber','replyMessageId','bandwidth','intelepeer','refid','isNil','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20','CmList','ListId','Contacts','list','omit','CmContact','contact','SmsInteraction','spread','interaction','autoclose','push','applications','close','ContactId','AttachmentId','UserId','User','unshift','waitForTheAssignedAgent','*,*,*,*','queueId','SmsQueue','queue','waitForTheAssignedQueue','Start','startRouting','entity\x20found','SmsAccount,\x20%s,\x20%s,\x20%s,\x20%s','text/xml','addApplications','sequelize','transaction','Transaction','ISOLATION_LEVELS','READ_COMMITTED','bulkCreate','findAndCountAll','stack','finally','getApplications','getInteractions','Contact','fullname','internal','Tag','Tags','color','tag','to\x20is\x20mandatory','List','DESC','defaults','out','SmsMessage','Messages','dataValues','received\x20delivery\x20report\x20from','inspect','skebby_dispatch_id','connectel','statusInt','requestid','message_id','status_code','groupName','DELIVERED','clickatell','redif','error_code','DELIVERED_TO_GATEWAY','DELIVRD','statusGet','message-id','state','addAgents','ids','emit','isArray','userSmsAccount:remove','getAgents','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/environment','../../mysqldb','redis','socket.io-emitter','./smsAccount.socket','register','jayson/promise','client','http','request','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','SmsAccount,\x20%s,\x20%s,\x20%s','stringify','code','error','message','info','result','catch','sendStatus','status','json','undefined','limit','offset','count','set','Content-Range','apply','reject','update','destroy','then','get','SmsAccounts','UserProfileResource','name','send','index','Pause','mandatoryDispositionPause','map','SmsAccount','rawAttributes','fieldName','type','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','merge','VIRTUAL','options','includeAll','rows','find','create','body','user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','describe','addDisposition','Disposition','getDispositions','findOne','pick','SmsAccountId','include','findAll','removeDispositions','addAnswer','CannedAnswer','getAnswers','removeAnswers','notify','SmsApplication','Applications','account','priority','asc','Sequelize','ValidationError','no\x20available\x20attributes','createdAt','updatedAt','difference','CompanyId','mobile','twilio','messageId','skebby'];(function(_0x354399,_0xaf53c0){var _0x19e1a2=function(_0x280616){while(--_0x280616){_0x354399['push'](_0x354399['shift']());}};_0x19e1a2(++_0xaf53c0);}(_0xaa74,0x14e));var _0x4aa7=function(_0x55c1be,_0x5b4b3e){_0x55c1be=_0x55c1be-0x0;var _0x1f1114=_0xaa74[_0x55c1be];return _0x1f1114;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x4aa7('0x0'));var zipdir=require(_0x4aa7('0x1'));var jsonpatch=require(_0x4aa7('0x2'));var rp=require(_0x4aa7('0x3'));var moment=require(_0x4aa7('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x4aa7('0x5'));var util=require(_0x4aa7('0x6'));var path=require(_0x4aa7('0x7'));var sox=require('sox');var csv=require(_0x4aa7('0x8'));var ejs=require(_0x4aa7('0x9'));var fs=require('fs');var fs_extra=require(_0x4aa7('0xa'));var _=require(_0x4aa7('0xb'));var squel=require(_0x4aa7('0xc'));var crypto=require(_0x4aa7('0xd'));var jsforce=require(_0x4aa7('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x4aa7('0x8'));var querystring=require(_0x4aa7('0xf'));var Papa=require(_0x4aa7('0x10'));var Redis=require(_0x4aa7('0x11'));var authService=require(_0x4aa7('0x12'));var qs=require(_0x4aa7('0x13'));var as=require(_0x4aa7('0x14'));var hardwareService=require(_0x4aa7('0x15'));var logger=require('../../config/logger')('api');var utils=require(_0x4aa7('0x16'));var config=require(_0x4aa7('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x4aa7('0x18'))['db'];config[_0x4aa7('0x19')]=_['defaults'](config[_0x4aa7('0x19')],{'host':'localhost','port':0x18eb});var socket=require(_0x4aa7('0x1a'))(new Redis(config['redis']));require(_0x4aa7('0x1b'))[_0x4aa7('0x1c')](socket);var jayson=require(_0x4aa7('0x1d'));var client=jayson[_0x4aa7('0x1e')][_0x4aa7('0x1f')]({'port':0x232c});function respondWithRpcPromise(_0x22ba1f,_0x167596,_0x27504,_0x459b9e){return new BPromise(function(_0x112497,_0x3b67ec){var _0x23bea5=_0x459b9e||client;return _0x23bea5[_0x4aa7('0x20')](_0x22ba1f,_0x27504)['then'](function(_0x8d20f1){logger['info'](_0x4aa7('0x21'),_0x167596,_0x4aa7('0x22'));logger[_0x4aa7('0x23')](_0x4aa7('0x24'),_0x167596,_0x4aa7('0x22'),JSON[_0x4aa7('0x25')](_0x8d20f1));if(_0x8d20f1['error']){if(_0x8d20f1['error'][_0x4aa7('0x26')]===0x1f4){logger[_0x4aa7('0x27')](_0x4aa7('0x21'),_0x167596,_0x8d20f1[_0x4aa7('0x27')][_0x4aa7('0x28')]);return _0x3b67ec(_0x8d20f1['error'][_0x4aa7('0x28')]);}logger[_0x4aa7('0x27')](_0x4aa7('0x21'),_0x167596,_0x8d20f1[_0x4aa7('0x27')][_0x4aa7('0x28')]);return _0x112497(_0x8d20f1[_0x4aa7('0x27')]['message']);}else{logger[_0x4aa7('0x29')](_0x4aa7('0x21'),_0x167596,_0x4aa7('0x22'));_0x112497(_0x8d20f1[_0x4aa7('0x2a')][_0x4aa7('0x28')]);}})[_0x4aa7('0x2b')](function(_0x54108d){logger['error'](_0x4aa7('0x21'),_0x167596,_0x54108d);_0x3b67ec(_0x54108d);});});}function respondWithStatusCode(_0x4e7396,_0x349503){_0x349503=_0x349503||0xcc;return function(_0xf48061){if(_0xf48061){return _0x4e7396[_0x4aa7('0x2c')](_0x349503);}return _0x4e7396[_0x4aa7('0x2d')](_0x349503)['end']();};}function respondWithResult(_0x2b6301,_0x65c797){_0x65c797=_0x65c797||0xc8;return function(_0x46bd76){if(_0x46bd76){return _0x2b6301[_0x4aa7('0x2d')](_0x65c797)[_0x4aa7('0x2e')](_0x46bd76);}};}function respondWithFilteredResult(_0x5c8f2e,_0x572d23){return function(_0x5bd383){if(_0x5bd383){var _0x2c59f9=typeof _0x572d23['offset']===_0x4aa7('0x2f')&&typeof _0x572d23[_0x4aa7('0x30')]===_0x4aa7('0x2f');var _0x4ceb0f=_0x5bd383['count'];var _0x447d51=_0x2c59f9?0x0:_0x572d23[_0x4aa7('0x31')];var _0x553ac8=_0x2c59f9?_0x5bd383[_0x4aa7('0x32')]:_0x572d23[_0x4aa7('0x31')]+_0x572d23[_0x4aa7('0x30')];var _0x4f741f;if(_0x553ac8>=_0x4ceb0f){_0x553ac8=_0x4ceb0f;_0x4f741f=0xc8;}else{_0x4f741f=0xce;}_0x5c8f2e['status'](_0x4f741f);return _0x5c8f2e[_0x4aa7('0x33')](_0x4aa7('0x34'),_0x447d51+'-'+_0x553ac8+'/'+_0x4ceb0f)[_0x4aa7('0x2e')](_0x5bd383);}return null;};}function patchUpdates(_0x4f94c5){return function(_0x3842e9){try{jsonpatch[_0x4aa7('0x35')](_0x3842e9,_0x4f94c5,!![]);}catch(_0x6cb7c4){return BPromise[_0x4aa7('0x36')](_0x6cb7c4);}return _0x3842e9['save']();};}function saveUpdates(_0x4ce899,_0x328bbe){return function(_0x4cd1a8){if(_0x4cd1a8){return _0x4cd1a8[_0x4aa7('0x37')](_0x4ce899)['then'](function(_0x1dd62e){return _0x1dd62e;});}return null;};}function removeEntity(_0x260888,_0x1fd49f){return function(_0x2976aa){if(_0x2976aa){return _0x2976aa[_0x4aa7('0x38')]()[_0x4aa7('0x39')](function(){var _0xd8e0dd=_0x2976aa[_0x4aa7('0x3a')]({'plain':!![]});var _0x5c8573=_0x4aa7('0x3b');return db[_0x4aa7('0x3c')]['destroy']({'where':{'type':_0x5c8573,'resourceId':_0xd8e0dd['id']}})['then'](function(){return _0x2976aa;});})[_0x4aa7('0x39')](function(){_0x260888['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x529818,_0xafd049){return function(_0x50583c){if(!_0x50583c){_0x529818['sendStatus'](0x194);}return _0x50583c;};}function handleError(_0x5674c7,_0xbe47c5){_0xbe47c5=_0xbe47c5||0x1f4;return function(_0x34386f){logger[_0x4aa7('0x27')](_0x34386f['stack']);if(_0x34386f[_0x4aa7('0x3d')]){delete _0x34386f[_0x4aa7('0x3d')];}_0x5674c7[_0x4aa7('0x2d')](_0xbe47c5)[_0x4aa7('0x3e')](_0x34386f);};}exports[_0x4aa7('0x3f')]=function(_0x3b710d,_0x44f7cf){var _0x391ff8={'include':[{'model':db[_0x4aa7('0x40')],'as':_0x4aa7('0x41')}]},_0x37ab05={},_0x18320e={'count':0x0,'rows':[]};var _0x548403=_[_0x4aa7('0x42')](db[_0x4aa7('0x43')][_0x4aa7('0x44')],function(_0x3e10fa){return{'name':_0x3e10fa[_0x4aa7('0x45')],'type':_0x3e10fa[_0x4aa7('0x46')]['key']};});_0x37ab05[_0x4aa7('0x47')]=_[_0x4aa7('0x42')](_0x548403,_0x4aa7('0x3d'));_0x37ab05[_0x4aa7('0x48')]=_[_0x4aa7('0x49')](_0x3b710d[_0x4aa7('0x48')]);_0x37ab05[_0x4aa7('0x4a')]=_[_0x4aa7('0x4b')](_0x37ab05[_0x4aa7('0x47')],_0x37ab05['query']);_0x391ff8[_0x4aa7('0x4c')]=_['intersection'](_0x37ab05['model'],qs[_0x4aa7('0x4d')](_0x3b710d['query'][_0x4aa7('0x4d')]));_0x391ff8[_0x4aa7('0x4c')]=_0x391ff8['attributes'][_0x4aa7('0x4e')]?_0x391ff8[_0x4aa7('0x4c')]:_0x37ab05[_0x4aa7('0x47')];if(!_0x3b710d[_0x4aa7('0x48')][_0x4aa7('0x4f')](_0x4aa7('0x50'))){_0x391ff8['limit']=qs[_0x4aa7('0x30')](_0x3b710d['query']['limit']);_0x391ff8[_0x4aa7('0x31')]=qs[_0x4aa7('0x31')](_0x3b710d[_0x4aa7('0x48')][_0x4aa7('0x31')]);}_0x391ff8[_0x4aa7('0x51')]=qs[_0x4aa7('0x52')](_0x3b710d['query'][_0x4aa7('0x52')]);_0x391ff8[_0x4aa7('0x53')]=qs[_0x4aa7('0x4a')](_['pick'](_0x3b710d[_0x4aa7('0x48')],_0x37ab05['filters']),_0x548403);if(_0x3b710d[_0x4aa7('0x48')][_0x4aa7('0x54')]){_0x391ff8[_0x4aa7('0x53')]=_[_0x4aa7('0x55')](_0x391ff8['where'],{'$or':_[_0x4aa7('0x42')](_0x548403,function(_0x31ff4e){if(_0x31ff4e[_0x4aa7('0x46')]!==_0x4aa7('0x56')){var _0x4a51f5={};_0x4a51f5[_0x31ff4e[_0x4aa7('0x3d')]]={'$like':'%'+_0x3b710d[_0x4aa7('0x48')][_0x4aa7('0x54')]+'%'};return _0x4a51f5;}})});}_0x391ff8=_[_0x4aa7('0x55')]({},_0x391ff8,_0x3b710d[_0x4aa7('0x57')]);var _0x127653={'where':_0x391ff8[_0x4aa7('0x53')]};return db[_0x4aa7('0x43')][_0x4aa7('0x32')](_0x127653)[_0x4aa7('0x39')](function(_0x4837e1){_0x18320e['count']=_0x4837e1;if(_0x3b710d[_0x4aa7('0x48')][_0x4aa7('0x58')]){_0x391ff8['include']=[{'all':!![]}];}return db[_0x4aa7('0x43')]['findAll'](_0x391ff8);})[_0x4aa7('0x39')](function(_0x4ba56b){_0x18320e[_0x4aa7('0x59')]=_0x4ba56b;return _0x18320e;})[_0x4aa7('0x39')](respondWithFilteredResult(_0x44f7cf,_0x391ff8))[_0x4aa7('0x2b')](handleError(_0x44f7cf,null));};exports['show']=function(_0x2803b6,_0x1e4f96){var _0x10dd49={'raw':![],'where':{'id':_0x2803b6['params']['id']},'include':[{'model':db[_0x4aa7('0x40')],'as':_0x4aa7('0x41')}]},_0x17707c={};_0x17707c[_0x4aa7('0x47')]=_[_0x4aa7('0x49')](db['SmsAccount'][_0x4aa7('0x44')]);_0x17707c[_0x4aa7('0x48')]=_[_0x4aa7('0x49')](_0x2803b6[_0x4aa7('0x48')]);_0x17707c[_0x4aa7('0x4a')]=_['intersection'](_0x17707c[_0x4aa7('0x47')],_0x17707c[_0x4aa7('0x48')]);_0x10dd49[_0x4aa7('0x4c')]=_[_0x4aa7('0x4b')](_0x17707c[_0x4aa7('0x47')],qs[_0x4aa7('0x4d')](_0x2803b6[_0x4aa7('0x48')]['fields']));_0x10dd49[_0x4aa7('0x4c')]=_0x10dd49[_0x4aa7('0x4c')][_0x4aa7('0x4e')]?_0x10dd49[_0x4aa7('0x4c')]:_0x17707c[_0x4aa7('0x47')];if(_0x2803b6[_0x4aa7('0x48')][_0x4aa7('0x58')]){_0x10dd49['include']=[{'all':!![]}];}_0x10dd49=_[_0x4aa7('0x55')]({},_0x10dd49,_0x2803b6['options']);return db['SmsAccount'][_0x4aa7('0x5a')](_0x10dd49)['then'](handleEntityNotFound(_0x1e4f96,null))[_0x4aa7('0x39')](respondWithResult(_0x1e4f96,null))[_0x4aa7('0x2b')](handleError(_0x1e4f96,null));};exports[_0x4aa7('0x5b')]=function(_0x57b58d,_0x5f5283){return db[_0x4aa7('0x43')][_0x4aa7('0x5b')](_0x57b58d[_0x4aa7('0x5c')],{})[_0x4aa7('0x39')](function(_0x1e8a84){var _0x64620b=_0x57b58d[_0x4aa7('0x5d')][_0x4aa7('0x3a')]({'plain':!![]});if(!_0x64620b)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x64620b['role']==='user'){var _0x1bff90=_0x1e8a84[_0x4aa7('0x3a')]({'plain':!![]});var _0x3ff749=_0x4aa7('0x3b');return db[_0x4aa7('0x5e')][_0x4aa7('0x5a')]({'where':{'name':_0x3ff749,'userProfileId':_0x64620b[_0x4aa7('0x5f')]},'raw':!![]})['then'](function(_0x43abbf){if(_0x43abbf&&_0x43abbf[_0x4aa7('0x60')]===0x0){return db[_0x4aa7('0x3c')][_0x4aa7('0x5b')]({'name':_0x1bff90['name'],'resourceId':_0x1bff90['id'],'type':_0x43abbf['name'],'sectionId':_0x43abbf['id']},{})['then'](function(){return _0x1e8a84;});}else{return _0x1e8a84;}})['catch'](function(_0x468c04){logger[_0x4aa7('0x27')](_0x4aa7('0x61'),_0x468c04);throw _0x468c04;});}return _0x1e8a84;})[_0x4aa7('0x39')](respondWithResult(_0x5f5283,0xc9))[_0x4aa7('0x2b')](handleError(_0x5f5283,null));};exports[_0x4aa7('0x37')]=function(_0x10eb1e,_0x2f62f9){if(_0x10eb1e[_0x4aa7('0x5c')]['id']){delete _0x10eb1e[_0x4aa7('0x5c')]['id'];}return db[_0x4aa7('0x43')]['find']({'where':{'id':_0x10eb1e['params']['id']},'include':[{'model':db[_0x4aa7('0x40')],'as':_0x4aa7('0x41')}]})['then'](handleEntityNotFound(_0x2f62f9,null))[_0x4aa7('0x39')](saveUpdates(_0x10eb1e[_0x4aa7('0x5c')],null))[_0x4aa7('0x39')](respondWithResult(_0x2f62f9,null))[_0x4aa7('0x2b')](handleError(_0x2f62f9,null));};exports[_0x4aa7('0x38')]=function(_0x4f2f08,_0x8bec2d){return db[_0x4aa7('0x43')]['find']({'where':{'id':_0x4f2f08[_0x4aa7('0x62')]['id']}})[_0x4aa7('0x39')](handleEntityNotFound(_0x8bec2d,null))['then'](removeEntity(_0x8bec2d,null))['catch'](handleError(_0x8bec2d,null));};exports[_0x4aa7('0x63')]=function(_0x178171,_0x24daeb){return db['SmsAccount'][_0x4aa7('0x63')]()[_0x4aa7('0x39')](respondWithResult(_0x24daeb,null))[_0x4aa7('0x2b')](handleError(_0x24daeb,null));};exports[_0x4aa7('0x64')]=function(_0xd81602,_0x4df9bc,_0x371c64){if(_0xd81602[_0x4aa7('0x5c')]['id']){delete _0xd81602['body']['id'];}return db[_0x4aa7('0x43')][_0x4aa7('0x5a')]({'where':{'id':_0xd81602[_0x4aa7('0x62')]['id']}})['then'](handleEntityNotFound(_0x4df9bc,null))[_0x4aa7('0x39')](function(_0x1554d1){if(_0x1554d1){_0xd81602[_0x4aa7('0x5c')]['SmsAccountId']=_0x1554d1['id'];return db[_0x4aa7('0x65')][_0x4aa7('0x5b')](_0xd81602[_0x4aa7('0x5c')]);}})[_0x4aa7('0x39')](respondWithResult(_0x4df9bc,null))[_0x4aa7('0x2b')](handleError(_0x4df9bc,null));};exports[_0x4aa7('0x66')]=function(_0x4725e9,_0x612d68,_0x15f5e2){var _0x21e065={'raw':![],'where':{}};var _0x4eb135={};var _0x2abc30={'count':0x0,'rows':[]};return db['SmsAccount'][_0x4aa7('0x67')]({'where':{'id':_0x4725e9[_0x4aa7('0x62')]['id']}})['then'](handleEntityNotFound(_0x612d68,null))[_0x4aa7('0x39')](function(_0x24181f){if(_0x24181f){_0x4eb135[_0x4aa7('0x47')]=_[_0x4aa7('0x49')](db['Disposition']['rawAttributes']);_0x4eb135[_0x4aa7('0x48')]=_[_0x4aa7('0x49')](_0x4725e9[_0x4aa7('0x48')]);_0x4eb135[_0x4aa7('0x4a')]=_[_0x4aa7('0x4b')](_0x4eb135[_0x4aa7('0x47')],_0x4eb135[_0x4aa7('0x48')]);_0x21e065[_0x4aa7('0x4c')]=_[_0x4aa7('0x4b')](_0x4eb135[_0x4aa7('0x47')],qs[_0x4aa7('0x4d')](_0x4725e9[_0x4aa7('0x48')][_0x4aa7('0x4d')]));_0x21e065[_0x4aa7('0x4c')]=_0x21e065[_0x4aa7('0x4c')][_0x4aa7('0x4e')]?_0x21e065[_0x4aa7('0x4c')]:_0x4eb135[_0x4aa7('0x47')];if(!_0x4725e9[_0x4aa7('0x48')][_0x4aa7('0x4f')]('nolimit')){_0x21e065[_0x4aa7('0x30')]=qs['limit'](_0x4725e9['query']['limit']);_0x21e065[_0x4aa7('0x31')]=qs[_0x4aa7('0x31')](_0x4725e9['query']['offset']);}_0x21e065[_0x4aa7('0x51')]=qs['sort'](_0x4725e9[_0x4aa7('0x48')][_0x4aa7('0x52')]);_0x21e065[_0x4aa7('0x53')]=qs[_0x4aa7('0x4a')](_[_0x4aa7('0x68')](_0x4725e9[_0x4aa7('0x48')],_0x4eb135[_0x4aa7('0x4a')]));_0x21e065[_0x4aa7('0x53')][_0x4aa7('0x69')]=_0x24181f['id'];if(_0x4725e9['query']['filter']){_0x21e065[_0x4aa7('0x53')]=_[_0x4aa7('0x55')](_0x21e065[_0x4aa7('0x53')],{'$or':_[_0x4aa7('0x42')](_0x21e065['attributes'],function(_0x5cb1ae){var _0x181fa0={};_0x181fa0[_0x5cb1ae]={'$like':'%'+_0x4725e9['query'][_0x4aa7('0x54')]+'%'};return _0x181fa0;})});}_0x21e065=_[_0x4aa7('0x55')]({},_0x21e065,_0x4725e9[_0x4aa7('0x57')]);return db['Disposition'][_0x4aa7('0x32')]({'where':_0x21e065[_0x4aa7('0x53')]})[_0x4aa7('0x39')](function(_0x5285c3){_0x2abc30[_0x4aa7('0x32')]=_0x5285c3;if(_0x4725e9['query'][_0x4aa7('0x58')]){_0x21e065[_0x4aa7('0x6a')]=[{'all':!![]}];}return db[_0x4aa7('0x65')][_0x4aa7('0x6b')](_0x21e065);})[_0x4aa7('0x39')](function(_0xba3f05){_0x2abc30[_0x4aa7('0x59')]=_0xba3f05;return _0x2abc30;});}})[_0x4aa7('0x39')](respondWithFilteredResult(_0x612d68,_0x21e065))[_0x4aa7('0x2b')](handleError(_0x612d68,null));};exports['removeDispositions']=function(_0x1989e9,_0x5b5479,_0x18e1c3){return db[_0x4aa7('0x43')]['find']({'where':{'id':_0x1989e9['params']['id']}})['then'](handleEntityNotFound(_0x5b5479,null))[_0x4aa7('0x39')](function(_0x4b9b93){if(_0x4b9b93){return _0x4b9b93[_0x4aa7('0x6c')](_0x1989e9[_0x4aa7('0x48')]['ids']);}})[_0x4aa7('0x39')](respondWithStatusCode(_0x5b5479,null))[_0x4aa7('0x2b')](handleError(_0x5b5479,null));};exports[_0x4aa7('0x6d')]=function(_0x56abaa,_0x345083,_0x15a9c9){if(_0x56abaa[_0x4aa7('0x5c')]['id']){delete _0x56abaa[_0x4aa7('0x5c')]['id'];}return db[_0x4aa7('0x43')][_0x4aa7('0x5a')]({'where':{'id':_0x56abaa[_0x4aa7('0x62')]['id']}})['then'](handleEntityNotFound(_0x345083,null))['then'](function(_0x4576f1){if(_0x4576f1){_0x56abaa[_0x4aa7('0x5c')][_0x4aa7('0x69')]=_0x4576f1['id'];return db[_0x4aa7('0x6e')]['create'](_0x56abaa[_0x4aa7('0x5c')]);}})[_0x4aa7('0x39')](respondWithResult(_0x345083,null))[_0x4aa7('0x2b')](handleError(_0x345083,null));};exports[_0x4aa7('0x6f')]=function(_0x1c38b1,_0x17c912,_0x22e30f){var _0x1db4c2={'raw':![],'where':{}};var _0xe3109f={};var _0x51eb5c={'count':0x0,'rows':[]};return db[_0x4aa7('0x43')][_0x4aa7('0x67')]({'where':{'id':_0x1c38b1[_0x4aa7('0x62')]['id']}})[_0x4aa7('0x39')](handleEntityNotFound(_0x17c912,null))[_0x4aa7('0x39')](function(_0x390040){if(_0x390040){_0xe3109f[_0x4aa7('0x47')]=_[_0x4aa7('0x49')](db[_0x4aa7('0x6e')][_0x4aa7('0x44')]);_0xe3109f[_0x4aa7('0x48')]=_[_0x4aa7('0x49')](_0x1c38b1[_0x4aa7('0x48')]);_0xe3109f[_0x4aa7('0x4a')]=_[_0x4aa7('0x4b')](_0xe3109f[_0x4aa7('0x47')],_0xe3109f[_0x4aa7('0x48')]);_0x1db4c2[_0x4aa7('0x4c')]=_[_0x4aa7('0x4b')](_0xe3109f[_0x4aa7('0x47')],qs[_0x4aa7('0x4d')](_0x1c38b1['query']['fields']));_0x1db4c2[_0x4aa7('0x4c')]=_0x1db4c2['attributes'][_0x4aa7('0x4e')]?_0x1db4c2[_0x4aa7('0x4c')]:_0xe3109f[_0x4aa7('0x47')];if(!_0x1c38b1[_0x4aa7('0x48')][_0x4aa7('0x4f')](_0x4aa7('0x50'))){_0x1db4c2[_0x4aa7('0x30')]=qs[_0x4aa7('0x30')](_0x1c38b1[_0x4aa7('0x48')][_0x4aa7('0x30')]);_0x1db4c2[_0x4aa7('0x31')]=qs[_0x4aa7('0x31')](_0x1c38b1[_0x4aa7('0x48')][_0x4aa7('0x31')]);}_0x1db4c2[_0x4aa7('0x51')]=qs[_0x4aa7('0x52')](_0x1c38b1['query'][_0x4aa7('0x52')]);_0x1db4c2['where']=qs[_0x4aa7('0x4a')](_[_0x4aa7('0x68')](_0x1c38b1[_0x4aa7('0x48')],_0xe3109f[_0x4aa7('0x4a')]));_0x1db4c2[_0x4aa7('0x53')][_0x4aa7('0x69')]=_0x390040['id'];if(_0x1c38b1[_0x4aa7('0x48')][_0x4aa7('0x54')]){_0x1db4c2[_0x4aa7('0x53')]=_[_0x4aa7('0x55')](_0x1db4c2[_0x4aa7('0x53')],{'$or':_['map'](_0x1db4c2[_0x4aa7('0x4c')],function(_0x377aaf){var _0x5cca55={};_0x5cca55[_0x377aaf]={'$like':'%'+_0x1c38b1[_0x4aa7('0x48')][_0x4aa7('0x54')]+'%'};return _0x5cca55;})});}_0x1db4c2=_[_0x4aa7('0x55')]({},_0x1db4c2,_0x1c38b1[_0x4aa7('0x57')]);return db[_0x4aa7('0x6e')][_0x4aa7('0x32')]({'where':_0x1db4c2[_0x4aa7('0x53')]})[_0x4aa7('0x39')](function(_0x461b7d){_0x51eb5c[_0x4aa7('0x32')]=_0x461b7d;if(_0x1c38b1[_0x4aa7('0x48')]['includeAll']){_0x1db4c2[_0x4aa7('0x6a')]=[{'all':!![]}];}return db['CannedAnswer'][_0x4aa7('0x6b')](_0x1db4c2);})['then'](function(_0x5115ce){_0x51eb5c['rows']=_0x5115ce;return _0x51eb5c;});}})[_0x4aa7('0x39')](respondWithFilteredResult(_0x17c912,_0x1db4c2))['catch'](handleError(_0x17c912,null));};exports[_0x4aa7('0x70')]=function(_0x4a77d0,_0x4e08af,_0x14bb82){return db[_0x4aa7('0x43')][_0x4aa7('0x5a')]({'where':{'id':_0x4a77d0[_0x4aa7('0x62')]['id']}})[_0x4aa7('0x39')](handleEntityNotFound(_0x4e08af,null))[_0x4aa7('0x39')](function(_0x5c3cd3){if(_0x5c3cd3){return _0x5c3cd3[_0x4aa7('0x70')](_0x4a77d0[_0x4aa7('0x48')]['ids']);}})['then'](respondWithStatusCode(_0x4e08af,null))['catch'](handleError(_0x4e08af,null));};exports[_0x4aa7('0x71')]=function(_0x3c2655,_0x435ad9,_0x1ad4d5){var _0x60063c={'channel':'sms'};var _0x260d14=[];var _0x33a221=[];var _0x39d3d1={};return db[_0x4aa7('0x43')][_0x4aa7('0x5a')]({'where':{'id':_0x3c2655[_0x4aa7('0x62')]['id']},'include':[{'model':db[_0x4aa7('0x72')],'as':_0x4aa7('0x73')}]})[_0x4aa7('0x39')](handleEntityNotFound(_0x435ad9,null))[_0x4aa7('0x39')](function(_0x28f355){_0x60063c[_0x4aa7('0x74')]=_0x28f355;_0x60063c['applications']=_['orderBy'](_0x28f355[_0x4aa7('0x73')],[_0x4aa7('0x75')],[_0x4aa7('0x76')]);if(_0x60063c['account'][_0x4aa7('0x73')]){delete _0x60063c['account'][_0x4aa7('0x73')];}return db['CmContact'][_0x4aa7('0x63')]();})[_0x4aa7('0x39')](function(_0x11947d){if(!_0x11947d){throw new db[(_0x4aa7('0x77'))][(_0x4aa7('0x78'))](_0x4aa7('0x79'));}_0x260d14=_['difference'](_[_0x4aa7('0x49')](_0x11947d),[_0x4aa7('0x7a'),_0x4aa7('0x7b')]);_0x33a221=_[_0x4aa7('0x7c')](_['keys'](_0x11947d),[_0x4aa7('0x7a'),_0x4aa7('0x7b'),_0x4aa7('0x7d'),'ListId']);_0x60063c[_0x4aa7('0x5c')]={'mapKey':_0x4aa7('0x7e')};if(_0x60063c[_0x4aa7('0x74')]['type']){switch(_0x60063c[_0x4aa7('0x74')][_0x4aa7('0x46')]){case _0x4aa7('0x7f'):_0x60063c[_0x4aa7('0x5c')]['from']=_0x3c2655['body']['From'];_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x5c')]=_0x3c2655[_0x4aa7('0x5c')]['Body'];_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x80')]=_0x3c2655['body']['MessageSid'];break;case _0x4aa7('0x81'):_0x60063c['body'][_0x4aa7('0x82')]='+'+_0x3c2655[_0x4aa7('0x5c')][_0x4aa7('0x83')];_0x60063c['body'][_0x4aa7('0x5c')]=_0x3c2655['body'][_0x4aa7('0x84')];break;case'connectel':_0x60063c['body'][_0x4aa7('0x82')]=_0x3c2655[_0x4aa7('0x5c')][_0x4aa7('0x82')];_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x5c')]=_0x3c2655[_0x4aa7('0x5c')][_0x4aa7('0x28')];break;case _0x4aa7('0x85'):_0x60063c[_0x4aa7('0x5c')]['from']=_0x3c2655[_0x4aa7('0x5c')][_0x4aa7('0x82')];_0x60063c[_0x4aa7('0x5c')]['body']=_0x3c2655[_0x4aa7('0x5c')][_0x4aa7('0x5c')];_0x60063c['body'][_0x4aa7('0x80')]=_0x3c2655[_0x4aa7('0x5c')]['message_id'];break;case'plivo':_0x60063c[_0x4aa7('0x5c')]['from']=_0x3c2655[_0x4aa7('0x5c')]['From'];_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x5c')]=_0x3c2655[_0x4aa7('0x5c')][_0x4aa7('0x86')];_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x80')]=_0x3c2655[_0x4aa7('0x5c')][_0x4aa7('0x87')];break;case _0x4aa7('0x88'):_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x82')]='+'+_0x3c2655[_0x4aa7('0x5c')][_0x4aa7('0x89')][0x0][_0x4aa7('0x82')];_0x60063c['body'][_0x4aa7('0x5c')]=_0x3c2655[_0x4aa7('0x5c')][_0x4aa7('0x89')][0x0][_0x4aa7('0x84')];_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x80')]=_0x3c2655[_0x4aa7('0x5c')]['results'][0x0][_0x4aa7('0x80')];break;case _0x4aa7('0x8a'):_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x82')]=_0x3c2655[_0x4aa7('0x5c')][_0x4aa7('0x8b')];_0x60063c['body'][_0x4aa7('0x5c')]=_0x3c2655[_0x4aa7('0x5c')]['segmentedMessage'][_0x4aa7('0x28')];break;case'clickatell':_0x60063c['body'][_0x4aa7('0x82')]=_0x3c2655[_0x4aa7('0x5c')][_0x4aa7('0x8c')];_0x60063c['body'][_0x4aa7('0x5c')]=_0x3c2655[_0x4aa7('0x5c')]['text'];_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x80')]=_0x3c2655[_0x4aa7('0x5c')][_0x4aa7('0x8d')];break;case _0x4aa7('0x8e'):_0x60063c['body'][_0x4aa7('0x80')]=_0x3c2655[_0x4aa7('0x5c')][0x0][_0x4aa7('0x28')]['id'];_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x82')]=_0x3c2655[_0x4aa7('0x5c')][0x0]['message'][_0x4aa7('0x82')];_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x5c')]=_0x3c2655[_0x4aa7('0x5c')][0x0][_0x4aa7('0x28')][_0x4aa7('0x84')];break;case _0x4aa7('0x8f'):_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x82')]=_0x3c2655[_0x4aa7('0x5c')][_0x4aa7('0x82')];_0x60063c[_0x4aa7('0x5c')]['body']=_0x3c2655[_0x4aa7('0x5c')][_0x4aa7('0x28')];_0x60063c['body']['messageId']=_0x3c2655[_0x4aa7('0x5c')][_0x4aa7('0x90')];break;}}if(_0x60063c[_0x4aa7('0x5c')]['id']){delete _0x60063c[_0x4aa7('0x5c')]['id'];}if(_[_0x4aa7('0x91')](_0x60063c[_0x4aa7('0x5c')]['from'])){throw new db['Sequelize'][(_0x4aa7('0x78'))](_0x4aa7('0x92'));}if(_['isNil'](_0x60063c[_0x4aa7('0x5c')]['body'])||_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x5c')]===''){throw new db[(_0x4aa7('0x77'))][(_0x4aa7('0x78'))](_0x4aa7('0x93'));}if(_[_0x4aa7('0x91')](_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x94')])){throw new db[(_0x4aa7('0x77'))][(_0x4aa7('0x78'))](_0x4aa7('0x95')+_0x33a221);}if(!_['includes'](_0x33a221,_0x60063c['body'][_0x4aa7('0x94')])){throw new db[(_0x4aa7('0x77'))][(_0x4aa7('0x78'))](_0x4aa7('0x96')+_0x33a221);}_0x39d3d1[_0x60063c['body'][_0x4aa7('0x94')]]=_0x60063c['body']['from'];return db[_0x4aa7('0x97')][_0x4aa7('0x5a')]({'where':{'id':_0x60063c[_0x4aa7('0x74')][_0x4aa7('0x98')]},'include':[{'model':db['CmContact'],'as':_0x4aa7('0x99'),'where':_0x39d3d1,'limit':0x1,'order':[[_0x4aa7('0x7b'),'DESC']]}]});})[_0x4aa7('0x39')](handleEntityNotFound(_0x435ad9,null))[_0x4aa7('0x39')](function(_0x3d1497){if(_0x3d1497){_0x60063c[_0x4aa7('0x9a')]=_[_0x4aa7('0x9b')](_0x3d1497,[_0x4aa7('0x99')]);if(_0x3d1497[_0x4aa7('0x99')]['length']){return _0x3d1497['Contacts'][0x0];}var _0x304f5c=_['defaults'](_0x60063c[_0x4aa7('0x5c')],{'firstName':_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x82')],'ListId':_0x3d1497['id']});_0x304f5c[_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x94')]]=_0x60063c['body'][_0x4aa7('0x82')];return db[_0x4aa7('0x9c')]['create'](_0x304f5c,{'fields':_0x260d14,'raw':!![]});}})[_0x4aa7('0x39')](handleEntityNotFound(_0x435ad9,null))[_0x4aa7('0x39')](function(_0x4d312e){if(_0x4d312e){_0x60063c[_0x4aa7('0x9d')]=_0x4d312e;var _0x24174b={'ContactId':_0x4d312e['id'],'phone':_0x60063c['body'][_0x4aa7('0x82')],'SmsAccountId':_0x3c2655['params']['id']};var _0x3e7d21={'ContactId':_0x4d312e['id'],'SmsAccountId':_0x3c2655[_0x4aa7('0x62')]['id'],'closed':![]};return db[_0x4aa7('0x9e')][_0x4aa7('0x5a')]({'where':_0x3e7d21})[_0x4aa7('0x39')](function(_0x2eccb7){if(_0x2eccb7){return[_0x2eccb7,![]];}return db['SmsInteraction'][_0x4aa7('0x5b')](_0x24174b)['then'](function(_0x283bd3){return[_0x283bd3,!![]];});});}})[_0x4aa7('0x9f')](function(_0x19e5a5,_0x2c6d90){_0x60063c[_0x4aa7('0xa0')]=_0x19e5a5[_0x4aa7('0x3a')]({'plain':!![]});_0x60063c[_0x4aa7('0xa0')]['created']=![];if(_0x2c6d90){if(_0x60063c[_0x4aa7('0x74')][_0x4aa7('0xa1')]){_0x60063c['applications'][_0x4aa7('0xa2')]({'id':0x0,'priority':_0x60063c[_0x4aa7('0xa3')][_0x4aa7('0x4e')]+0x1,'app':_0x4aa7('0xa4'),'appdata':'unmanaged','interval':'*,*,*,*'});}_0x60063c['interaction']['created']=!![];}return db['SmsMessage'][_0x4aa7('0x5b')]({'phone':_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x82')],'messageId':_0x60063c[_0x4aa7('0x5c')][_0x4aa7('0x80')],'body':_0x60063c['body']['body'],'SmsAccountId':_0x3c2655[_0x4aa7('0x62')]['id'],'SmsInteractionId':_0x19e5a5['id'],'direction':'in','ContactId':_0x19e5a5[_0x4aa7('0xa5')],'AttachmentId':_0x60063c['body'][_0x4aa7('0xa6')]});})[_0x4aa7('0x39')](function(_0xd1651c){_0x60063c[_0x4aa7('0x28')]=_0xd1651c;if(!_0x60063c[_0x4aa7('0xa0')][_0x4aa7('0xa7')])return;return db[_0x4aa7('0xa8')][_0x4aa7('0x5a')]({'attributes':['id','name'],'where':{'id':_0x60063c[_0x4aa7('0xa0')][_0x4aa7('0xa7')]}});})['then'](function(_0x54ff55){if(_0x54ff55){_0x60063c[_0x4aa7('0xa3')][_0x4aa7('0xa9')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x54ff55['name']+','+(_0x60063c[_0x4aa7('0x74')][_0x4aa7('0xaa')]||0xa),'interval':_0x4aa7('0xab')});}if(!_0x60063c['interaction'][_0x4aa7('0xac')])return;return db[_0x4aa7('0xad')][_0x4aa7('0x5a')]({'attributes':['id',_0x4aa7('0x3d')],'where':{'id':_0x60063c[_0x4aa7('0xa0')][_0x4aa7('0xac')]}});})[_0x4aa7('0x39')](function(_0xc005cd){if(_0xc005cd){_0x60063c[_0x4aa7('0xa3')][_0x4aa7('0xa9')]({'id':0x0,'priority':0x1,'app':_0x4aa7('0xae'),'appdata':_0xc005cd['name']+','+(_0x60063c[_0x4aa7('0x74')][_0x4aa7('0xaf')]||0x12c),'interval':'*,*,*,*'});}return respondWithRpcPromise(_0x4aa7('0xb0'),_0x4aa7('0xb1'),_0x60063c);})[_0x4aa7('0x39')](function(_0x12cf6c){if(_0x12cf6c){var _0x52faeb=0xc8;var _0x4b2688='receiveMessage';logger['info'](_0x4aa7('0x24'),_0x4b2688,_0x52faeb,_0x4aa7('0xb2'));logger[_0x4aa7('0x23')](_0x4aa7('0xb3'),_0x4b2688,_0x52faeb,_0x4aa7('0xb2'),JSON[_0x4aa7('0x25')](_0x12cf6c));if(_0x60063c['account'][_0x4aa7('0x46')]===_0x4aa7('0x7f')){return _0x435ad9[_0x4aa7('0x2d')](_0x52faeb)['set']('Content-Type',_0x4aa7('0xb4'))['send']('<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22?>\x0a<Response></Response>');}else{return _0x435ad9[_0x4aa7('0x2d')](_0x52faeb)[_0x4aa7('0x2e')](_0x12cf6c);}}})[_0x4aa7('0x2b')](handleError(_0x435ad9,null));};exports[_0x4aa7('0xb5')]=function(_0xf0fced,_0x377230){var _0x2924be=_0xf0fced['params']['id'];var _0x196ed7=_0xf0fced[_0x4aa7('0x5c')];var _0xa3028f=0xc8;var _0x1ea3fa=null;return db[_0x4aa7('0xb6')][_0x4aa7('0xb7')]({'isolationLevel':db[_0x4aa7('0xb6')][_0x4aa7('0xb8')][_0x4aa7('0xb9')][_0x4aa7('0xba')]},function(_0x4578ec){return db['SmsAccount'][_0x4aa7('0x67')]({'where':{'id':_0x2924be},'transaction':_0x4578ec})[_0x4aa7('0x39')](function(_0x49beda){if(_0x49beda){return db[_0x4aa7('0x72')]['destroy']({'where':{'SmsAccountId':_0x2924be},'transaction':_0x4578ec})[_0x4aa7('0x39')](function(){var _0x4ca240=_[_0x4aa7('0x42')](_0x196ed7,function(_0x262a3c){_0x262a3c['SmsAccountId']=_0x2924be;return _0x262a3c;});return db['SmsApplication'][_0x4aa7('0xbb')](_0x4ca240,{'transaction':_0x4578ec});});}else{_0xa3028f=0x194;_0x1ea3fa=[];}});})[_0x4aa7('0x39')](function(){if(_0xa3028f!==0x194){return db[_0x4aa7('0x72')][_0x4aa7('0xbc')]({'where':{'SmsAccountId':_0x2924be},'order':'priority'})[_0x4aa7('0x39')](function(_0x406ec0){_0x1ea3fa=_0x406ec0;});}})[_0x4aa7('0x2b')](function(_0x4a04bb){_0xa3028f=0x1f4;logger[_0x4aa7('0x27')](_0x4a04bb[_0x4aa7('0xbd')]);if(_0x4a04bb[_0x4aa7('0x3d')]){delete _0x4a04bb['name'];}_0x1ea3fa=_0x4a04bb;})[_0x4aa7('0xbe')](function(){if(_0x1ea3fa===null){_0x377230['sendStatus'](_0xa3028f);}else{if(_0xa3028f===0x1f4){_0x377230[_0x4aa7('0x2d')](_0xa3028f)['send'](_0x1ea3fa);}else{_0x377230[_0x4aa7('0x2d')](_0xa3028f)[_0x4aa7('0x2e')](_0x1ea3fa);}}});};exports[_0x4aa7('0xbf')]=function(_0x1aa856,_0x209546,_0x2bfb76){var _0x186c7b={};var _0x4762a3={};var _0x92ac19;var _0x8494ca;return db[_0x4aa7('0x43')][_0x4aa7('0x67')]({'where':{'id':_0x1aa856[_0x4aa7('0x62')]['id']}})[_0x4aa7('0x39')](handleEntityNotFound(_0x209546,null))[_0x4aa7('0x39')](function(_0x20d163){if(_0x20d163){_0x92ac19=_0x20d163;_0x4762a3[_0x4aa7('0x47')]=_[_0x4aa7('0x49')](db['SmsApplication'][_0x4aa7('0x44')]);_0x4762a3['query']=_[_0x4aa7('0x49')](_0x1aa856['query']);_0x4762a3[_0x4aa7('0x4a')]=_['intersection'](_0x4762a3['model'],_0x4762a3[_0x4aa7('0x48')]);_0x186c7b[_0x4aa7('0x4c')]=_['intersection'](_0x4762a3[_0x4aa7('0x47')],qs[_0x4aa7('0x4d')](_0x1aa856[_0x4aa7('0x48')][_0x4aa7('0x4d')]));_0x186c7b['attributes']=_0x186c7b[_0x4aa7('0x4c')][_0x4aa7('0x4e')]?_0x186c7b['attributes']:_0x4762a3['model'];_0x186c7b[_0x4aa7('0x51')]=qs[_0x4aa7('0x52')](_0x1aa856[_0x4aa7('0x48')][_0x4aa7('0x52')]);_0x186c7b['where']=qs[_0x4aa7('0x4a')](_[_0x4aa7('0x68')](_0x1aa856['query'],_0x4762a3[_0x4aa7('0x4a')]));if(_0x1aa856[_0x4aa7('0x48')][_0x4aa7('0x54')]){_0x186c7b[_0x4aa7('0x53')]=_['merge'](_0x186c7b[_0x4aa7('0x53')],{'$or':_['map'](_0x186c7b[_0x4aa7('0x4c')],function(_0xaa6793){var _0x217fed={};_0x217fed[_0xaa6793]={'$like':'%'+_0x1aa856[_0x4aa7('0x48')][_0x4aa7('0x54')]+'%'};return _0x217fed;})});}_0x186c7b=_[_0x4aa7('0x55')]({},_0x186c7b,_0x1aa856[_0x4aa7('0x57')]);return _0x92ac19[_0x4aa7('0xbf')](_0x186c7b);}})[_0x4aa7('0x39')](function(_0x18ca42){if(_0x18ca42){_0x8494ca=_0x18ca42[_0x4aa7('0x4e')];if(!_0x1aa856['query'][_0x4aa7('0x4f')](_0x4aa7('0x50'))){_0x186c7b['limit']=qs[_0x4aa7('0x30')](_0x1aa856[_0x4aa7('0x48')][_0x4aa7('0x30')]);_0x186c7b[_0x4aa7('0x31')]=qs['offset'](_0x1aa856[_0x4aa7('0x48')][_0x4aa7('0x31')]);}return _0x92ac19['getApplications'](_0x186c7b);}})['then'](function(_0x2a72d5){if(_0x2a72d5){return _0x2a72d5?{'count':_0x8494ca,'rows':_0x2a72d5}:null;}})['then'](respondWithResult(_0x209546,null))[_0x4aa7('0x2b')](handleError(_0x209546,null));};exports[_0x4aa7('0xc0')]=function(_0x323ef0,_0x15f0b8,_0x42b048){var _0x269b3b={'raw':![],'where':{}};var _0x51b278={};var _0x14bfd8={'count':0x0,'rows':[]};return db['SmsAccount']['findOne']({'where':{'id':_0x323ef0['params']['id']}})[_0x4aa7('0x39')](handleEntityNotFound(_0x15f0b8,null))[_0x4aa7('0x39')](function(_0x4d4034){if(_0x4d4034){_0x51b278[_0x4aa7('0x47')]=_[_0x4aa7('0x49')](db[_0x4aa7('0x9e')][_0x4aa7('0x44')]);_0x51b278[_0x4aa7('0x48')]=_[_0x4aa7('0x49')](_0x323ef0[_0x4aa7('0x48')]);_0x51b278['filters']=_[_0x4aa7('0x4b')](_0x51b278[_0x4aa7('0x47')],_0x51b278[_0x4aa7('0x48')]);_0x269b3b[_0x4aa7('0x4c')]=_['intersection'](_0x51b278[_0x4aa7('0x47')],qs['fields'](_0x323ef0['query'][_0x4aa7('0x4d')]));_0x269b3b[_0x4aa7('0x4c')]=_0x269b3b[_0x4aa7('0x4c')]['length']?_0x269b3b['attributes']:_0x51b278['model'];if(!_0x323ef0[_0x4aa7('0x48')][_0x4aa7('0x4f')](_0x4aa7('0x50'))){_0x269b3b['limit']=qs[_0x4aa7('0x30')](_0x323ef0[_0x4aa7('0x48')][_0x4aa7('0x30')]);_0x269b3b['offset']=qs[_0x4aa7('0x31')](_0x323ef0[_0x4aa7('0x48')][_0x4aa7('0x31')]);}_0x269b3b[_0x4aa7('0x51')]=qs[_0x4aa7('0x52')](_0x323ef0[_0x4aa7('0x48')][_0x4aa7('0x52')]);_0x269b3b[_0x4aa7('0x53')]=qs['filters'](_[_0x4aa7('0x68')](_0x323ef0['query'],_0x51b278[_0x4aa7('0x4a')]));_0x269b3b[_0x4aa7('0x53')][_0x4aa7('0x69')]=_0x4d4034['id'];if(_0x323ef0[_0x4aa7('0x48')][_0x4aa7('0x54')]){_0x269b3b['where']=_[_0x4aa7('0x55')](_0x269b3b[_0x4aa7('0x53')],{'$or':_['map'](_0x269b3b[_0x4aa7('0x4c')],function(_0x2a96fa){var _0x2d26b9={};_0x2d26b9[_0x2a96fa]={'$like':'%'+_0x323ef0['query'][_0x4aa7('0x54')]+'%'};return _0x2d26b9;})});}_0x269b3b=_[_0x4aa7('0x55')]({},_0x269b3b,_0x323ef0[_0x4aa7('0x57')]);return db[_0x4aa7('0x9e')][_0x4aa7('0x32')]({'where':_0x269b3b[_0x4aa7('0x53')]})[_0x4aa7('0x39')](function(_0x26d064){_0x14bfd8[_0x4aa7('0x32')]=_0x26d064;if(_0x323ef0[_0x4aa7('0x48')]['includeAll']){_0x269b3b['include']=[{'model':db[_0x4aa7('0x9c')],'as':_0x4aa7('0xc1'),'required':![]},{'model':db['User'],'as':'Owner','attributes':[_0x4aa7('0x3d'),_0x4aa7('0xc2'),_0x4aa7('0xc3')],'required':![]},{'model':db[_0x4aa7('0xc4')],'as':_0x4aa7('0xc5'),'attributes':['id',_0x4aa7('0x3d'),_0x4aa7('0xc6')],'where':_0x323ef0[_0x4aa7('0x48')][_0x4aa7('0xc7')]?{'id':_0x323ef0['query'][_0x4aa7('0xc7')]}:undefined,'required':_0x323ef0['query'][_0x4aa7('0xc7')]?!![]:![]}];}return db[_0x4aa7('0x9e')][_0x4aa7('0x6b')](_0x269b3b);})[_0x4aa7('0x39')](function(_0x302e0c){_0x14bfd8[_0x4aa7('0x59')]=_0x302e0c;return _0x14bfd8;});}})['then'](respondWithFilteredResult(_0x15f0b8,_0x269b3b))['catch'](handleError(_0x15f0b8,null));};exports[_0x4aa7('0x3e')]=function(_0x372dcc,_0x5c6459,_0x5cdc7d){var _0xded153,_0x51867a,_0x6c1af2;if(_[_0x4aa7('0x91')](_0x372dcc[_0x4aa7('0x5c')][_0x4aa7('0x5c')])||_0x372dcc[_0x4aa7('0x5c')][_0x4aa7('0x5c')]===''){throw new db[(_0x4aa7('0x77'))][(_0x4aa7('0x78'))](_0x4aa7('0x93'));}if(_['isNil'](_0x372dcc[_0x4aa7('0x5c')]['to'])){throw new db['Sequelize'][(_0x4aa7('0x78'))](_0x4aa7('0xc8'));}_0xded153=_0x372dcc['body']['to'];return db[_0x4aa7('0x43')][_0x4aa7('0x5a')]({'where':{'id':_0x372dcc[_0x4aa7('0x62')]['id']},'include':[{'model':db[_0x4aa7('0x97')],'as':_0x4aa7('0xc9'),'include':[{'model':db[_0x4aa7('0x9c')],'as':_0x4aa7('0x99'),'where':{'mobile':_0xded153},'limit':0x1,'order':[['updatedAt',_0x4aa7('0xca')]]}]}]})['then'](handleEntityNotFound(_0x5c6459,null))[_0x4aa7('0x39')](function(_0x302970){if(_0x302970&&_0x302970['List']){_0x51867a=_0x302970[_0x4aa7('0x3a')]({'plain':!![]});if(_0x51867a[_0x4aa7('0xc9')]&&_0x51867a['List']['Contacts'][_0x4aa7('0x4e')]){return _0x51867a['List'][_0x4aa7('0x99')][0x0];}return db[_0x4aa7('0x9c')]['create'](_[_0x4aa7('0xcb')](_0x372dcc[_0x4aa7('0x5c')],{'firstName':_0xded153,'mobile':_0xded153,'phone':_0xded153,'ListId':_0x51867a[_0x4aa7('0x98')]}));}})['then'](handleEntityNotFound(_0x5c6459,null))['then'](function(_0x44339c){if(_0x44339c){_0x6c1af2=_0x44339c;return db['SmsInteraction'][_0x4aa7('0x5a')]({'where':{'ContactId':_0x6c1af2['id'],'closed':![],'SmsAccountId':_0x51867a['id']}})[_0x4aa7('0x39')](function(_0x104b13){if(_0x104b13){return[_0x104b13,![]];}return db[_0x4aa7('0x9e')][_0x4aa7('0x5b')]({'UserId':_0x372dcc[_0x4aa7('0x5d')]['id'],'ContactId':_0x6c1af2['id'],'SmsAccountId':_0x51867a['id'],'phone':_0xded153,'firstMsgDirection':_0x4aa7('0xcc'),'Messages':[_[_0x4aa7('0x55')](_0x372dcc['body'],{'read':![],'body':_0x372dcc[_0x4aa7('0x5c')][_0x4aa7('0x5c')],'phone':_0xded153,'SmsAccountId':_0x51867a['id'],'UserId':_0x372dcc[_0x4aa7('0x5d')]['id'],'ContactId':_0x6c1af2['id']})]},{'include':[{'model':db[_0x4aa7('0xcd')],'as':_0x4aa7('0xce')}]})[_0x4aa7('0x39')](function(_0x539b94){return[_0x539b94,!![]];});});}})[_0x4aa7('0x9f')](function(_0x1e4129,_0x333d78){if(_0x333d78){return _0x1e4129;}return db[_0x4aa7('0xcd')][_0x4aa7('0x5b')](_[_0x4aa7('0x55')](_0x372dcc[_0x4aa7('0x5c')],{'read':![],'body':_0x372dcc[_0x4aa7('0x5c')][_0x4aa7('0x5c')],'phone':_0xded153,'SmsAccountId':_0x51867a['id'],'SmsInteractionId':_0x1e4129['id'],'UserId':_0x372dcc[_0x4aa7('0x5d')]['id'],'ContactId':_0x6c1af2['id']}))[_0x4aa7('0x39')](function(_0x523d3b){_0x1e4129[_0x4aa7('0xcf')]['Messages']=[];_0x1e4129[_0x4aa7('0xcf')]['Messages']['push'](_0x523d3b[_0x4aa7('0xcf')]);return _0x1e4129;});})[_0x4aa7('0x39')](respondWithResult(_0x5c6459,null))[_0x4aa7('0x2b')](handleError(_0x5c6459,null));};exports['status']=function(_0x3bcba8,_0x4f2146,_0x32dda3){if(_0x3bcba8[_0x4aa7('0x5c')]['id']){delete _0x3bcba8[_0x4aa7('0x5c')]['id'];}var _0x29396e,_0x3562e0,_0x523f15;return db[_0x4aa7('0x43')][_0x4aa7('0x5a')]({'where':{'id':_0x3bcba8[_0x4aa7('0x62')]['id']}})[_0x4aa7('0x39')](handleEntityNotFound(_0x4f2146,null))[_0x4aa7('0x39')](function(_0x71f0d){if(_0x71f0d){_0x523f15=_0x71f0d;logger[_0x4aa7('0x23')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x4aa7('0x2d'),_0x4aa7('0xd0'),_0x71f0d['type'],util[_0x4aa7('0xd1')](_0x3bcba8['body'],{'showHidden':![],'depth':null}));switch(_0x71f0d[_0x4aa7('0x46')]){case _0x4aa7('0x81'):if(_0x3bcba8[_0x4aa7('0x5c')][_0x4aa7('0xd2')]&&_0x3bcba8[_0x4aa7('0x5c')]['status']){_0x3562e0=_0x3bcba8[_0x4aa7('0x5c')][_0x4aa7('0x2d')];return db['SmsMessage'][_0x4aa7('0x5a')]({'where':{'messageId':_0x3bcba8[_0x4aa7('0x5c')]['skebby_dispatch_id']}});}break;case _0x4aa7('0xd3'):if(_0x3bcba8[_0x4aa7('0x5c')]['requestid']&&_0x3bcba8[_0x4aa7('0x5c')]['statusInt']){_0x3562e0=_0x3bcba8[_0x4aa7('0x5c')][_0x4aa7('0xd4')];return db['SmsMessage'][_0x4aa7('0x5a')]({'where':{'messageId':_0x3bcba8[_0x4aa7('0x5c')][_0x4aa7('0xd5')]}});}break;case _0x4aa7('0x85'):if(_0x3bcba8['body'][_0x4aa7('0xd6')]&&_0x3bcba8[_0x4aa7('0x5c')][_0x4aa7('0xd7')]){_0x3562e0=_0x3bcba8[_0x4aa7('0x5c')][_0x4aa7('0xd7')];return db[_0x4aa7('0xcd')][_0x4aa7('0x5a')]({'where':{'messageId':_0x3bcba8[_0x4aa7('0x5c')][_0x4aa7('0xd6')]}});}break;case _0x4aa7('0x88'):var _0x17876e=_0x3bcba8[_0x4aa7('0x5c')][_0x4aa7('0x89')][0x0];if(_0x17876e[_0x4aa7('0x80')]&&_0x17876e[_0x4aa7('0x2d')][_0x4aa7('0xd8')]===_0x4aa7('0xd9')){_0x3562e0=_0x17876e['status'][_0x4aa7('0xd8')];return db[_0x4aa7('0xcd')][_0x4aa7('0x5a')]({'where':{'messageId':_0x17876e[_0x4aa7('0x80')]}});}break;case _0x4aa7('0xda'):if(_0x3bcba8['body'][_0x4aa7('0x80')]&&_0x3bcba8[_0x4aa7('0x5c')]['status']){_0x3562e0=_0x3bcba8[_0x4aa7('0x5c')][_0x4aa7('0x2d')];return db[_0x4aa7('0xcd')]['find']({'where':{'messageId':_0x3bcba8[_0x4aa7('0x5c')][_0x4aa7('0x80')]}});}break;case _0x4aa7('0x8e'):if(_0x3bcba8[_0x4aa7('0x5c')][0x0][_0x4aa7('0x28')]['id']){_0x3562e0=_0x3bcba8[_0x4aa7('0x5c')][0x0][_0x4aa7('0x46')];return db[_0x4aa7('0xcd')]['find']({'where':{'messageId':_0x3bcba8[_0x4aa7('0x5c')][0x0][_0x4aa7('0x28')]['id']}});}break;case _0x4aa7('0x8f'):if(_0x3bcba8[_0x4aa7('0x5c')][_0x4aa7('0xdb')]&&_0x3bcba8[_0x4aa7('0x5c')][_0x4aa7('0x2d')]){_0x3562e0=_0x3bcba8[_0x4aa7('0x5c')][_0x4aa7('0x2d')];return db[_0x4aa7('0xcd')][_0x4aa7('0x5a')]({'where':{'messageId':_0x3bcba8[_0x4aa7('0x5c')]['redif']}});}break;}}})['then'](handleEntityNotFound(_0x4f2146,null))[_0x4aa7('0x39')](function(_0x57451c){if(_0x57451c){_0x29396e=_0x57451c;switch(_0x523f15['type']){case _0x4aa7('0x81'):if(_0x3562e0===_0x4aa7('0xd9')){return _0x29396e['update']({'read':!![]});}else{logger[_0x4aa7('0x27')](_0x4aa7('0x24'),_0x4aa7('0x2d'),'skebby',util[_0x4aa7('0xd1')](_0x3bcba8[_0x4aa7('0x5c')],{'showHidden':![],'depth':null}));}break;case _0x4aa7('0xd3'):if(_0x3562e0==='1'){return _0x29396e[_0x4aa7('0x37')]({'read':!![]});}else{logger['error']('SmsAccount,\x20%s,\x20%s,\x20%s',_0x4aa7('0x2d'),_0x4aa7('0x81'),util[_0x4aa7('0xd1')](_0x3bcba8[_0x4aa7('0x5c')],{'showHidden':![],'depth':null}));}break;case _0x4aa7('0x85'):if(!_0x3bcba8[_0x4aa7('0x5c')][_0x4aa7('0xdc')]&&_0x3562e0>=0xc8&&_0x3562e0<=0xce){return _0x29396e[_0x4aa7('0x37')]({'read':!![]});}else{logger[_0x4aa7('0x27')](_0x4aa7('0x24'),'status',_0x4aa7('0x85'),util[_0x4aa7('0xd1')](_0x3bcba8[_0x4aa7('0x5c')],{'showHidden':![],'depth':null}));}break;case _0x4aa7('0x88'):var _0x559bd7=_0x3bcba8[_0x4aa7('0x5c')][_0x4aa7('0x89')][0x0];if(_0x559bd7[_0x4aa7('0x2d')][_0x4aa7('0xd8')]===_0x4aa7('0xd9')){return _0x29396e['update']({'read':!![]});}else{logger[_0x4aa7('0x27')](_0x4aa7('0x24'),'status',_0x4aa7('0x88'),util['inspect'](_0x3bcba8[_0x4aa7('0x5c')],{'showHidden':![],'depth':null}));}break;case _0x4aa7('0xda'):if(_0x3562e0==_0x4aa7('0xdd')||_0x3562e0=='RECEIVED_BY_RECIPIENT'){return _0x29396e[_0x4aa7('0x37')]({'read':!![]});}else{logger[_0x4aa7('0x27')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x4aa7('0x2d'),_0x4aa7('0xda'),util[_0x4aa7('0xd1')](_0x3bcba8[_0x4aa7('0x5c')],{'showHidden':![],'depth':null}));}break;case _0x4aa7('0x8e'):if(_0x3562e0=='message-delivered'){return _0x29396e['update']({'read':!![]});}else{logger[_0x4aa7('0x27')](_0x4aa7('0x24'),_0x4aa7('0x2d'),_0x4aa7('0x8e'),util['inspect'](_0x3bcba8[_0x4aa7('0x5c')],{'showHidden':![],'depth':null}));}break;case _0x4aa7('0x8f'):if(_0x3562e0===_0x4aa7('0xde')||_0x3562e0==='ACCEPTD'){return _0x29396e[_0x4aa7('0x37')]({'read':!![]});}else{logger[_0x4aa7('0x27')](_0x4aa7('0x24'),_0x4aa7('0x2d'),'intelepeer',util[_0x4aa7('0xd1')](_0x3bcba8[_0x4aa7('0x5c')],{'showHidden':![],'depth':null}));}break;}return _0x29396e;}})[_0x4aa7('0x39')](respondWithResult(_0x4f2146,null))['catch'](handleError(_0x4f2146,null));};exports[_0x4aa7('0xdf')]=function(_0x1e0a2f,_0x3bb4bf,_0x23409f){var _0x1b3ba5,_0x2e8e22,_0x508750;return db[_0x4aa7('0x43')][_0x4aa7('0x5a')]({'where':{'id':_0x1e0a2f[_0x4aa7('0x62')]['id']}})[_0x4aa7('0x39')](handleEntityNotFound(_0x3bb4bf,null))[_0x4aa7('0x39')](function(_0x535c67){if(_0x535c67){_0x508750=_0x535c67;logger[_0x4aa7('0x23')]('SmsAccount,\x20%s,\x20%s,\x20%s',_0x4aa7('0x2d'),_0x4aa7('0xd0'),_0x535c67[_0x4aa7('0x46')],util[_0x4aa7('0xd1')](_0x1e0a2f[_0x4aa7('0x48')],{'showHidden':![],'depth':null}));switch(_0x535c67[_0x4aa7('0x46')]){case _0x4aa7('0x8a'):if(_0x1e0a2f[_0x4aa7('0x48')][_0x4aa7('0xe0')]&&_0x1e0a2f[_0x4aa7('0x48')]['state']){_0x2e8e22=_0x1e0a2f[_0x4aa7('0x48')][_0x4aa7('0xe1')];return db['SmsMessage'][_0x4aa7('0x5a')]({'where':{'messageId':_0x1e0a2f['query'][_0x4aa7('0xe0')]}});}break;}}})[_0x4aa7('0x39')](handleEntityNotFound(_0x3bb4bf,null))[_0x4aa7('0x39')](function(_0x3b24fe){if(_0x3b24fe){_0x1b3ba5=_0x3b24fe;switch(_0x508750[_0x4aa7('0x46')]){case _0x4aa7('0x8a'):if(_0x2e8e22==='2'||_0x2e8e22==='6'){return _0x1b3ba5[_0x4aa7('0x37')]({'read':!![]});}else{logger[_0x4aa7('0x27')](_0x4aa7('0x24'),_0x4aa7('0x2d'),_0x4aa7('0x8a'),util['inspect'](_0x1e0a2f['query'],{'showHidden':![],'depth':null}));};break;}return _0x1b3ba5;}})[_0x4aa7('0x39')](respondWithResult(_0x3bb4bf,null))[_0x4aa7('0x2b')](handleError(_0x3bb4bf,null));};exports['addAgents']=function(_0x257b1b,_0x2ba888,_0x3a1be4){return db['SmsAccount'][_0x4aa7('0x5a')]({'where':{'id':_0x257b1b[_0x4aa7('0x62')]['id']}})[_0x4aa7('0x39')](handleEntityNotFound(_0x2ba888,null))['then'](function(_0x304454){if(_0x304454){return _0x304454[_0x4aa7('0xe2')](_0x257b1b[_0x4aa7('0x5c')][_0x4aa7('0xe3')],_[_0x4aa7('0x9b')](_0x257b1b[_0x4aa7('0x5c')],[_0x4aa7('0xe3'),'id'])||{})['spread'](function(_0x5d58ac){for(var _0x4d9f89=0x0;_0x4d9f89<_0x257b1b[_0x4aa7('0x5c')][_0x4aa7('0xe3')]['length'];_0x4d9f89+=0x1){socket[_0x4aa7('0xe4')]('userSmsAccount:save',{'UserId':Number(_0x257b1b['body'][_0x4aa7('0xe3')][_0x4d9f89]),'SmsAccountId':Number(_0x257b1b[_0x4aa7('0x62')]['id'])});}return _0x5d58ac;});}})[_0x4aa7('0x39')](respondWithResult(_0x2ba888,null))['catch'](handleError(_0x2ba888,null));};exports['removeAgents']=function(_0x44db7e,_0x2ed7da,_0x4a26e3){return db['SmsAccount'][_0x4aa7('0x5a')]({'where':{'id':_0x44db7e[_0x4aa7('0x62')]['id']}})[_0x4aa7('0x39')](handleEntityNotFound(_0x2ed7da,null))['then'](function(_0x66c8ab){if(_0x66c8ab){return _0x66c8ab['removeAgents'](_0x44db7e['query'][_0x4aa7('0xe3')])[_0x4aa7('0x39')](function(){if(_[_0x4aa7('0xe5')](_0x44db7e[_0x4aa7('0x48')][_0x4aa7('0xe3')])){for(var _0x2b65b5=0x0;_0x2b65b5<_0x44db7e[_0x4aa7('0x48')][_0x4aa7('0xe3')][_0x4aa7('0x4e')];_0x2b65b5+=0x1){socket[_0x4aa7('0xe4')](_0x4aa7('0xe6'),{'UserId':Number(_0x44db7e[_0x4aa7('0x48')][_0x4aa7('0xe3')][_0x2b65b5]),'SmsAccountId':Number(_0x44db7e[_0x4aa7('0x62')]['id'])});}}else{socket[_0x4aa7('0xe4')](_0x4aa7('0xe6'),{'UserId':Number(_0x44db7e['query'][_0x4aa7('0xe3')]),'SmsAccountId':Number(_0x44db7e[_0x4aa7('0x62')]['id'])});}});}})['then'](respondWithStatusCode(_0x2ed7da,null))[_0x4aa7('0x2b')](handleError(_0x2ed7da,null));};exports[_0x4aa7('0xe7')]=function(_0x3f938a,_0x46f652,_0xcdeb2b){var _0x5f4284={};var _0x5451e4={};var _0x4145aa;var _0x228995;return db[_0x4aa7('0x43')][_0x4aa7('0x67')]({'where':{'id':_0x3f938a[_0x4aa7('0x62')]['id']}})[_0x4aa7('0x39')](handleEntityNotFound(_0x46f652,null))[_0x4aa7('0x39')](function(_0x63c1b7){if(_0x63c1b7){_0x4145aa=_0x63c1b7;_0x5451e4[_0x4aa7('0x47')]=_[_0x4aa7('0x49')](db[_0x4aa7('0xa8')][_0x4aa7('0x44')]);_0x5451e4[_0x4aa7('0x48')]=_[_0x4aa7('0x49')](_0x3f938a[_0x4aa7('0x48')]);_0x5451e4[_0x4aa7('0x4a')]=_[_0x4aa7('0x4b')](_0x5451e4[_0x4aa7('0x47')],_0x5451e4['query']);_0x5f4284['attributes']=_[_0x4aa7('0x4b')](_0x5451e4[_0x4aa7('0x47')],qs['fields'](_0x3f938a[_0x4aa7('0x48')][_0x4aa7('0x4d')]));_0x5f4284[_0x4aa7('0x4c')]=_0x5f4284['attributes']['length']?_0x5f4284['attributes']:_0x5451e4['model'];_0x5f4284[_0x4aa7('0x51')]=qs[_0x4aa7('0x52')](_0x3f938a[_0x4aa7('0x48')]['sort']);_0x5f4284['where']=qs[_0x4aa7('0x4a')](_['pick'](_0x3f938a['query'],_0x5451e4[_0x4aa7('0x4a')]));if(_0x3f938a[_0x4aa7('0x48')][_0x4aa7('0x54')]){_0x5f4284[_0x4aa7('0x53')]=_[_0x4aa7('0x55')](_0x5f4284['where'],{'$or':_[_0x4aa7('0x42')](_0x5f4284[_0x4aa7('0x4c')],function(_0x2f8509){var _0x2f78a={};_0x2f78a[_0x2f8509]={'$like':'%'+_0x3f938a[_0x4aa7('0x48')][_0x4aa7('0x54')]+'%'};return _0x2f78a;})});}_0x5f4284=_[_0x4aa7('0x55')]({},_0x5f4284,_0x3f938a[_0x4aa7('0x57')]);return _0x4145aa[_0x4aa7('0xe7')](_0x5f4284);}})[_0x4aa7('0x39')](function(_0x5eebe3){if(_0x5eebe3){_0x228995=_0x5eebe3[_0x4aa7('0x4e')];if(!_0x3f938a[_0x4aa7('0x48')][_0x4aa7('0x4f')](_0x4aa7('0x50'))){_0x5f4284[_0x4aa7('0x30')]=qs['limit'](_0x3f938a[_0x4aa7('0x48')][_0x4aa7('0x30')]);_0x5f4284[_0x4aa7('0x31')]=qs[_0x4aa7('0x31')](_0x3f938a[_0x4aa7('0x48')][_0x4aa7('0x31')]);}return _0x4145aa['getAgents'](_0x5f4284);}})[_0x4aa7('0x39')](function(_0x166dff){if(_0x166dff){return _0x166dff?{'count':_0x228995,'rows':_0x166dff}:null;}})['then'](respondWithResult(_0x46f652,null))[_0x4aa7('0x2b')](handleError(_0x46f652,null));};
\ No newline at end of file
+var _0x6e9c=['fullname','internal','Tag','Tags','color','tag','to\x20is\x20mandatory','List','ListId','out','spread','dataValues','Messages','received\x20delivery\x20report\x20from','inspect','skebby_dispatch_id','requestid','statusInt','clicksend','status_code','groupName','DELIVERED','redif','error_code','DELIVERED_TO_GATEWAY','RECEIVED_BY_RECIPIENT','bandwidth','message-delivered','DELIVRD','ACCEPTD','statusGet','message-id','state','addAgents','emit','userSmsAccount:save','removeAgents','isArray','userSmsAccount:remove','getAgents','eml-format','rimraf','request-promise','moment','bluebird','mustache','util','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/environment','../../config/license/util','redis','defaults','localhost','socket.io-emitter','./smsAccount.socket','register','jayson/promise','client','http','request','then','info','SmsAccount,\x20%s,\x20%s','request\x20sent','debug','SmsAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','destroy','get','SmsAccounts','UserProfileResource','sendStatus','stack','name','send','index','mandatoryDispositionPause','map','SmsAccount','fieldName','type','model','query','keys','filters','attributes','intersection','fields','length','hasOwnProperty','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','params','Pause','rawAttributes','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','describe','SmsAccountId','Disposition','getDispositions','findOne','nolimit','removeDispositions','getAnswers','CannedAnswer','removeAnswers','ids','notify','sms','SmsApplication','Applications','account','applications','orderBy','priority','asc','Sequelize','ValidationError','no\x20available\x20attributes','difference','createdAt','updatedAt','CompanyId','mobile','twilio','from','From','Body','messageId','MessageSid','skebby','sender','text','connectel','message_id','plivo','Text','MessageUUID','infobip','results','csc','originatingAddress','clickatell','fromNumber','replyMessageId','intelepeer','from\x20is\x20mandatory','isNil','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','CmList','CmContact','Contacts','DESC','omit','contact','SmsInteraction','interaction','autoclose','push','close','unmanaged','*,*,*,*','SmsMessage','ContactId','AttachmentId','UserId','User','unshift','agent','queueId','SmsQueue','queue','waitForTheAssignedQueue','Start','startRouting','receiveMessage','SmsAccount,\x20%s,\x20%s,\x20%s,\x20%s','entity\x20found','Content-Type','<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22?>\x0a<Response></Response>','addApplications','sequelize','Transaction','ISOLATION_LEVELS','READ_COMMITTED','bulkCreate','findAndCountAll','finally','getApplications','getInteractions','Contact','Owner'];(function(_0x39d544,_0x35c14f){var _0x5a5ff2=function(_0x2271fb){while(--_0x2271fb){_0x39d544['push'](_0x39d544['shift']());}};_0x5a5ff2(++_0x35c14f);}(_0x6e9c,0x11d));var _0xc6e9=function(_0x3b8664,_0x1e4a88){_0x3b8664=_0x3b8664-0x0;var _0x27d94c=_0x6e9c[_0x3b8664];return _0x27d94c;};'use strict';var emlformat=require(_0xc6e9('0x0'));var rimraf=require(_0xc6e9('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xc6e9('0x2'));var moment=require(_0xc6e9('0x3'));var BPromise=require(_0xc6e9('0x4'));var Mustache=require(_0xc6e9('0x5'));var util=require(_0xc6e9('0x6'));var path=require('path');var sox=require(_0xc6e9('0x7'));var csv=require('to-csv');var ejs=require(_0xc6e9('0x8'));var fs=require('fs');var fs_extra=require(_0xc6e9('0x9'));var _=require(_0xc6e9('0xa'));var squel=require(_0xc6e9('0xb'));var crypto=require(_0xc6e9('0xc'));var jsforce=require(_0xc6e9('0xd'));var deskjs=require(_0xc6e9('0xe'));var toCsv=require(_0xc6e9('0xf'));var querystring=require('querystring');var Papa=require(_0xc6e9('0x10'));var Redis=require(_0xc6e9('0x11'));var authService=require(_0xc6e9('0x12'));var qs=require(_0xc6e9('0x13'));var as=require(_0xc6e9('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xc6e9('0x15'));var utils=require(_0xc6e9('0x16'));var config=require(_0xc6e9('0x17'));var licenseUtil=require(_0xc6e9('0x18'));var db=require('../../mysqldb')['db'];config[_0xc6e9('0x19')]=_[_0xc6e9('0x1a')](config[_0xc6e9('0x19')],{'host':_0xc6e9('0x1b'),'port':0x18eb});var socket=require(_0xc6e9('0x1c'))(new Redis(config[_0xc6e9('0x19')]));require(_0xc6e9('0x1d'))[_0xc6e9('0x1e')](socket);var jayson=require(_0xc6e9('0x1f'));var client=jayson[_0xc6e9('0x20')][_0xc6e9('0x21')]({'port':0x232c});function respondWithRpcPromise(_0x443438,_0x3c87c0,_0x22b409,_0x5c5950){return new BPromise(function(_0x22b75f,_0x127bf1){var _0x2e4425=_0x5c5950||client;return _0x2e4425[_0xc6e9('0x22')](_0x443438,_0x22b409)[_0xc6e9('0x23')](function(_0x387743){logger[_0xc6e9('0x24')](_0xc6e9('0x25'),_0x3c87c0,_0xc6e9('0x26'));logger[_0xc6e9('0x27')](_0xc6e9('0x28'),_0x3c87c0,_0xc6e9('0x26'),JSON[_0xc6e9('0x29')](_0x387743));if(_0x387743[_0xc6e9('0x2a')]){if(_0x387743['error'][_0xc6e9('0x2b')]===0x1f4){logger[_0xc6e9('0x2a')](_0xc6e9('0x25'),_0x3c87c0,_0x387743[_0xc6e9('0x2a')]['message']);return _0x127bf1(_0x387743[_0xc6e9('0x2a')]['message']);}logger[_0xc6e9('0x2a')](_0xc6e9('0x25'),_0x3c87c0,_0x387743[_0xc6e9('0x2a')][_0xc6e9('0x2c')]);return _0x22b75f(_0x387743[_0xc6e9('0x2a')][_0xc6e9('0x2c')]);}else{logger['info'](_0xc6e9('0x25'),_0x3c87c0,_0xc6e9('0x26'));_0x22b75f(_0x387743[_0xc6e9('0x2d')]['message']);}})['catch'](function(_0x58b919){logger[_0xc6e9('0x2a')](_0xc6e9('0x25'),_0x3c87c0,_0x58b919);_0x127bf1(_0x58b919);});});}function respondWithStatusCode(_0x49275e,_0x1b83d8){_0x1b83d8=_0x1b83d8||0xcc;return function(_0x45b763){if(_0x45b763){return _0x49275e['sendStatus'](_0x1b83d8);}return _0x49275e[_0xc6e9('0x2e')](_0x1b83d8)[_0xc6e9('0x2f')]();};}function respondWithResult(_0x5e4875,_0x94c00){_0x94c00=_0x94c00||0xc8;return function(_0x540367){if(_0x540367){return _0x5e4875[_0xc6e9('0x2e')](_0x94c00)[_0xc6e9('0x30')](_0x540367);}};}function respondWithFilteredResult(_0x6cee06,_0x46793d){return function(_0x3e85d9){if(_0x3e85d9){var _0x2d5ba5=typeof _0x46793d[_0xc6e9('0x31')]===_0xc6e9('0x32')&&typeof _0x46793d[_0xc6e9('0x33')]===_0xc6e9('0x32');var _0x176d30=_0x3e85d9[_0xc6e9('0x34')];var _0x4c7ad0=_0x2d5ba5?0x0:_0x46793d[_0xc6e9('0x31')];var _0x3853ef=_0x2d5ba5?_0x3e85d9[_0xc6e9('0x34')]:_0x46793d[_0xc6e9('0x31')]+_0x46793d[_0xc6e9('0x33')];var _0x4e57dc;if(_0x3853ef>=_0x176d30){_0x3853ef=_0x176d30;_0x4e57dc=0xc8;}else{_0x4e57dc=0xce;}_0x6cee06[_0xc6e9('0x2e')](_0x4e57dc);return _0x6cee06[_0xc6e9('0x35')](_0xc6e9('0x36'),_0x4c7ad0+'-'+_0x3853ef+'/'+_0x176d30)[_0xc6e9('0x30')](_0x3e85d9);}return null;};}function patchUpdates(_0x4ad8fa){return function(_0x299ccd){try{jsonpatch[_0xc6e9('0x37')](_0x299ccd,_0x4ad8fa,!![]);}catch(_0x5126cc){return BPromise[_0xc6e9('0x38')](_0x5126cc);}return _0x299ccd[_0xc6e9('0x39')]();};}function saveUpdates(_0x484f23,_0x1607f5){return function(_0x3ff742){if(_0x3ff742){return _0x3ff742[_0xc6e9('0x3a')](_0x484f23)[_0xc6e9('0x23')](function(_0x598587){return _0x598587;});}return null;};}function removeEntity(_0x39af0f,_0xe49737){return function(_0x539a71){if(_0x539a71){return _0x539a71[_0xc6e9('0x3b')]()[_0xc6e9('0x23')](function(){var _0x5cfcd3=_0x539a71[_0xc6e9('0x3c')]({'plain':!![]});var _0x5a7655=_0xc6e9('0x3d');return db[_0xc6e9('0x3e')][_0xc6e9('0x3b')]({'where':{'type':_0x5a7655,'resourceId':_0x5cfcd3['id']}})['then'](function(){return _0x539a71;});})[_0xc6e9('0x23')](function(){_0x39af0f[_0xc6e9('0x2e')](0xcc)[_0xc6e9('0x2f')]();});}};}function handleEntityNotFound(_0x55bae5,_0x5d86c8){return function(_0x3ef60f){if(!_0x3ef60f){_0x55bae5[_0xc6e9('0x3f')](0x194);}return _0x3ef60f;};}function handleError(_0xed70f3,_0x5ee2d8){_0x5ee2d8=_0x5ee2d8||0x1f4;return function(_0x5c18de){logger[_0xc6e9('0x2a')](_0x5c18de[_0xc6e9('0x40')]);if(_0x5c18de['name']){delete _0x5c18de[_0xc6e9('0x41')];}_0xed70f3[_0xc6e9('0x2e')](_0x5ee2d8)[_0xc6e9('0x42')](_0x5c18de);};}exports[_0xc6e9('0x43')]=function(_0x39fd8c,_0x4f0d92){var _0x2afa50={'include':[{'model':db['Pause'],'as':_0xc6e9('0x44')}]},_0x26adb6={},_0x9733da={'count':0x0,'rows':[]};var _0x30decf=_[_0xc6e9('0x45')](db[_0xc6e9('0x46')]['rawAttributes'],function(_0x2b2c32){return{'name':_0x2b2c32[_0xc6e9('0x47')],'type':_0x2b2c32[_0xc6e9('0x48')]['key']};});_0x26adb6[_0xc6e9('0x49')]=_[_0xc6e9('0x45')](_0x30decf,_0xc6e9('0x41'));_0x26adb6[_0xc6e9('0x4a')]=_[_0xc6e9('0x4b')](_0x39fd8c[_0xc6e9('0x4a')]);_0x26adb6[_0xc6e9('0x4c')]=_['intersection'](_0x26adb6[_0xc6e9('0x49')],_0x26adb6[_0xc6e9('0x4a')]);_0x2afa50[_0xc6e9('0x4d')]=_[_0xc6e9('0x4e')](_0x26adb6['model'],qs['fields'](_0x39fd8c[_0xc6e9('0x4a')][_0xc6e9('0x4f')]));_0x2afa50[_0xc6e9('0x4d')]=_0x2afa50[_0xc6e9('0x4d')][_0xc6e9('0x50')]?_0x2afa50[_0xc6e9('0x4d')]:_0x26adb6[_0xc6e9('0x49')];if(!_0x39fd8c[_0xc6e9('0x4a')][_0xc6e9('0x51')]('nolimit')){_0x2afa50[_0xc6e9('0x33')]=qs['limit'](_0x39fd8c['query'][_0xc6e9('0x33')]);_0x2afa50[_0xc6e9('0x31')]=qs[_0xc6e9('0x31')](_0x39fd8c[_0xc6e9('0x4a')][_0xc6e9('0x31')]);}_0x2afa50[_0xc6e9('0x52')]=qs['sort'](_0x39fd8c['query'][_0xc6e9('0x53')]);_0x2afa50[_0xc6e9('0x54')]=qs[_0xc6e9('0x4c')](_[_0xc6e9('0x55')](_0x39fd8c[_0xc6e9('0x4a')],_0x26adb6[_0xc6e9('0x4c')]),_0x30decf);if(_0x39fd8c[_0xc6e9('0x4a')][_0xc6e9('0x56')]){_0x2afa50[_0xc6e9('0x54')]=_[_0xc6e9('0x57')](_0x2afa50['where'],{'$or':_[_0xc6e9('0x45')](_0x30decf,function(_0x85cae8){if(_0x85cae8[_0xc6e9('0x48')]!==_0xc6e9('0x58')){var _0x183706={};_0x183706[_0x85cae8[_0xc6e9('0x41')]]={'$like':'%'+_0x39fd8c[_0xc6e9('0x4a')]['filter']+'%'};return _0x183706;}})});}_0x2afa50=_['merge']({},_0x2afa50,_0x39fd8c[_0xc6e9('0x59')]);var _0x115e3e={'where':_0x2afa50[_0xc6e9('0x54')]};return db[_0xc6e9('0x46')][_0xc6e9('0x34')](_0x115e3e)[_0xc6e9('0x23')](function(_0x46e51d){_0x9733da[_0xc6e9('0x34')]=_0x46e51d;if(_0x39fd8c[_0xc6e9('0x4a')][_0xc6e9('0x5a')]){_0x2afa50[_0xc6e9('0x5b')]=[{'all':!![]}];}return db['SmsAccount'][_0xc6e9('0x5c')](_0x2afa50);})[_0xc6e9('0x23')](function(_0x5b33c5){_0x9733da[_0xc6e9('0x5d')]=_0x5b33c5;return _0x9733da;})[_0xc6e9('0x23')](respondWithFilteredResult(_0x4f0d92,_0x2afa50))[_0xc6e9('0x5e')](handleError(_0x4f0d92,null));};exports['show']=function(_0x3ac40d,_0x39b232){var _0x3d42a6={'raw':![],'where':{'id':_0x3ac40d[_0xc6e9('0x5f')]['id']},'include':[{'model':db[_0xc6e9('0x60')],'as':_0xc6e9('0x44')}]},_0x32ab7a={};_0x32ab7a[_0xc6e9('0x49')]=_[_0xc6e9('0x4b')](db[_0xc6e9('0x46')][_0xc6e9('0x61')]);_0x32ab7a['query']=_['keys'](_0x3ac40d[_0xc6e9('0x4a')]);_0x32ab7a[_0xc6e9('0x4c')]=_[_0xc6e9('0x4e')](_0x32ab7a['model'],_0x32ab7a[_0xc6e9('0x4a')]);_0x3d42a6['attributes']=_[_0xc6e9('0x4e')](_0x32ab7a['model'],qs[_0xc6e9('0x4f')](_0x3ac40d[_0xc6e9('0x4a')][_0xc6e9('0x4f')]));_0x3d42a6[_0xc6e9('0x4d')]=_0x3d42a6[_0xc6e9('0x4d')][_0xc6e9('0x50')]?_0x3d42a6['attributes']:_0x32ab7a[_0xc6e9('0x49')];if(_0x3ac40d[_0xc6e9('0x4a')][_0xc6e9('0x5a')]){_0x3d42a6['include']=[{'all':!![]}];}_0x3d42a6=_['merge']({},_0x3d42a6,_0x3ac40d[_0xc6e9('0x59')]);return db[_0xc6e9('0x46')][_0xc6e9('0x62')](_0x3d42a6)[_0xc6e9('0x23')](handleEntityNotFound(_0x39b232,null))[_0xc6e9('0x23')](respondWithResult(_0x39b232,null))['catch'](handleError(_0x39b232,null));};exports[_0xc6e9('0x63')]=function(_0x30fbf3,_0x3f4cd9){return db[_0xc6e9('0x46')]['create'](_0x30fbf3[_0xc6e9('0x64')],{})['then'](function(_0x1109b8){var _0x14dc2b=_0x30fbf3[_0xc6e9('0x65')]['get']({'plain':!![]});if(!_0x14dc2b)throw new Error(_0xc6e9('0x66'));if(_0x14dc2b['role']===_0xc6e9('0x65')){var _0x138cfa=_0x1109b8[_0xc6e9('0x3c')]({'plain':!![]});var _0x39300a=_0xc6e9('0x3d');return db[_0xc6e9('0x67')][_0xc6e9('0x62')]({'where':{'name':_0x39300a,'userProfileId':_0x14dc2b[_0xc6e9('0x68')]},'raw':!![]})[_0xc6e9('0x23')](function(_0x2817de){if(_0x2817de&&_0x2817de[_0xc6e9('0x69')]===0x0){return db[_0xc6e9('0x3e')][_0xc6e9('0x63')]({'name':_0x138cfa[_0xc6e9('0x41')],'resourceId':_0x138cfa['id'],'type':_0x2817de[_0xc6e9('0x41')],'sectionId':_0x2817de['id']},{})[_0xc6e9('0x23')](function(){return _0x1109b8;});}else{return _0x1109b8;}})[_0xc6e9('0x5e')](function(_0x7b5181){logger[_0xc6e9('0x2a')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x7b5181);throw _0x7b5181;});}return _0x1109b8;})[_0xc6e9('0x23')](respondWithResult(_0x3f4cd9,0xc9))[_0xc6e9('0x5e')](handleError(_0x3f4cd9,null));};exports[_0xc6e9('0x3a')]=function(_0x5be2ae,_0x143255){if(_0x5be2ae[_0xc6e9('0x64')]['id']){delete _0x5be2ae[_0xc6e9('0x64')]['id'];}return db['SmsAccount'][_0xc6e9('0x62')]({'where':{'id':_0x5be2ae[_0xc6e9('0x5f')]['id']},'include':[{'model':db['Pause'],'as':_0xc6e9('0x44')}]})['then'](handleEntityNotFound(_0x143255,null))[_0xc6e9('0x23')](saveUpdates(_0x5be2ae['body'],null))[_0xc6e9('0x23')](respondWithResult(_0x143255,null))[_0xc6e9('0x5e')](handleError(_0x143255,null));};exports[_0xc6e9('0x3b')]=function(_0xf5a7d4,_0x4fb7df){return db[_0xc6e9('0x46')][_0xc6e9('0x62')]({'where':{'id':_0xf5a7d4['params']['id']}})[_0xc6e9('0x23')](handleEntityNotFound(_0x4fb7df,null))[_0xc6e9('0x23')](removeEntity(_0x4fb7df,null))[_0xc6e9('0x5e')](handleError(_0x4fb7df,null));};exports[_0xc6e9('0x6a')]=function(_0x524db6,_0x11385f){return db[_0xc6e9('0x46')][_0xc6e9('0x6a')]()[_0xc6e9('0x23')](respondWithResult(_0x11385f,null))[_0xc6e9('0x5e')](handleError(_0x11385f,null));};exports['addDisposition']=function(_0x51dc2e,_0x4703f4,_0x274587){if(_0x51dc2e[_0xc6e9('0x64')]['id']){delete _0x51dc2e[_0xc6e9('0x64')]['id'];}return db[_0xc6e9('0x46')][_0xc6e9('0x62')]({'where':{'id':_0x51dc2e['params']['id']}})[_0xc6e9('0x23')](handleEntityNotFound(_0x4703f4,null))[_0xc6e9('0x23')](function(_0x2e4fcb){if(_0x2e4fcb){_0x51dc2e[_0xc6e9('0x64')][_0xc6e9('0x6b')]=_0x2e4fcb['id'];return db[_0xc6e9('0x6c')][_0xc6e9('0x63')](_0x51dc2e[_0xc6e9('0x64')]);}})[_0xc6e9('0x23')](respondWithResult(_0x4703f4,null))[_0xc6e9('0x5e')](handleError(_0x4703f4,null));};exports[_0xc6e9('0x6d')]=function(_0x54c738,_0x56f3d2,_0x321307){var _0x380b72={'raw':![],'where':{}};var _0x2c840a={};var _0x1ab208={'count':0x0,'rows':[]};return db[_0xc6e9('0x46')][_0xc6e9('0x6e')]({'where':{'id':_0x54c738[_0xc6e9('0x5f')]['id']}})[_0xc6e9('0x23')](handleEntityNotFound(_0x56f3d2,null))['then'](function(_0x193d9b){if(_0x193d9b){_0x2c840a[_0xc6e9('0x49')]=_[_0xc6e9('0x4b')](db[_0xc6e9('0x6c')][_0xc6e9('0x61')]);_0x2c840a[_0xc6e9('0x4a')]=_['keys'](_0x54c738[_0xc6e9('0x4a')]);_0x2c840a['filters']=_['intersection'](_0x2c840a[_0xc6e9('0x49')],_0x2c840a['query']);_0x380b72[_0xc6e9('0x4d')]=_[_0xc6e9('0x4e')](_0x2c840a[_0xc6e9('0x49')],qs[_0xc6e9('0x4f')](_0x54c738[_0xc6e9('0x4a')][_0xc6e9('0x4f')]));_0x380b72[_0xc6e9('0x4d')]=_0x380b72[_0xc6e9('0x4d')][_0xc6e9('0x50')]?_0x380b72[_0xc6e9('0x4d')]:_0x2c840a['model'];if(!_0x54c738['query']['hasOwnProperty'](_0xc6e9('0x6f'))){_0x380b72[_0xc6e9('0x33')]=qs[_0xc6e9('0x33')](_0x54c738['query']['limit']);_0x380b72['offset']=qs[_0xc6e9('0x31')](_0x54c738[_0xc6e9('0x4a')][_0xc6e9('0x31')]);}_0x380b72[_0xc6e9('0x52')]=qs['sort'](_0x54c738['query']['sort']);_0x380b72[_0xc6e9('0x54')]=qs[_0xc6e9('0x4c')](_[_0xc6e9('0x55')](_0x54c738[_0xc6e9('0x4a')],_0x2c840a['filters']));_0x380b72[_0xc6e9('0x54')]['SmsAccountId']=_0x193d9b['id'];if(_0x54c738[_0xc6e9('0x4a')][_0xc6e9('0x56')]){_0x380b72[_0xc6e9('0x54')]=_[_0xc6e9('0x57')](_0x380b72[_0xc6e9('0x54')],{'$or':_[_0xc6e9('0x45')](_0x380b72['attributes'],function(_0x28ed5d){var _0x2ca584={};_0x2ca584[_0x28ed5d]={'$like':'%'+_0x54c738[_0xc6e9('0x4a')]['filter']+'%'};return _0x2ca584;})});}_0x380b72=_[_0xc6e9('0x57')]({},_0x380b72,_0x54c738[_0xc6e9('0x59')]);return db[_0xc6e9('0x6c')][_0xc6e9('0x34')]({'where':_0x380b72['where']})['then'](function(_0xcc20a6){_0x1ab208[_0xc6e9('0x34')]=_0xcc20a6;if(_0x54c738['query'][_0xc6e9('0x5a')]){_0x380b72[_0xc6e9('0x5b')]=[{'all':!![]}];}return db[_0xc6e9('0x6c')][_0xc6e9('0x5c')](_0x380b72);})['then'](function(_0x48c5a5){_0x1ab208['rows']=_0x48c5a5;return _0x1ab208;});}})[_0xc6e9('0x23')](respondWithFilteredResult(_0x56f3d2,_0x380b72))[_0xc6e9('0x5e')](handleError(_0x56f3d2,null));};exports[_0xc6e9('0x70')]=function(_0x416c2c,_0x1171ae,_0x23363a){return db[_0xc6e9('0x46')][_0xc6e9('0x62')]({'where':{'id':_0x416c2c['params']['id']}})[_0xc6e9('0x23')](handleEntityNotFound(_0x1171ae,null))[_0xc6e9('0x23')](function(_0x461122){if(_0x461122){return _0x461122[_0xc6e9('0x70')](_0x416c2c[_0xc6e9('0x4a')]['ids']);}})[_0xc6e9('0x23')](respondWithStatusCode(_0x1171ae,null))[_0xc6e9('0x5e')](handleError(_0x1171ae,null));};exports['addAnswer']=function(_0x1fd321,_0x21f863,_0x3fb516){if(_0x1fd321[_0xc6e9('0x64')]['id']){delete _0x1fd321[_0xc6e9('0x64')]['id'];}return db[_0xc6e9('0x46')][_0xc6e9('0x62')]({'where':{'id':_0x1fd321[_0xc6e9('0x5f')]['id']}})['then'](handleEntityNotFound(_0x21f863,null))[_0xc6e9('0x23')](function(_0x1f51f9){if(_0x1f51f9){_0x1fd321[_0xc6e9('0x64')][_0xc6e9('0x6b')]=_0x1f51f9['id'];return db['CannedAnswer']['create'](_0x1fd321[_0xc6e9('0x64')]);}})[_0xc6e9('0x23')](respondWithResult(_0x21f863,null))[_0xc6e9('0x5e')](handleError(_0x21f863,null));};exports[_0xc6e9('0x71')]=function(_0x38c4d8,_0x3b3591,_0x45ed07){var _0x26333d={'raw':![],'where':{}};var _0x493df9={};var _0x28ed62={'count':0x0,'rows':[]};return db[_0xc6e9('0x46')][_0xc6e9('0x6e')]({'where':{'id':_0x38c4d8[_0xc6e9('0x5f')]['id']}})[_0xc6e9('0x23')](handleEntityNotFound(_0x3b3591,null))[_0xc6e9('0x23')](function(_0x1b566f){if(_0x1b566f){_0x493df9[_0xc6e9('0x49')]=_[_0xc6e9('0x4b')](db['CannedAnswer'][_0xc6e9('0x61')]);_0x493df9['query']=_[_0xc6e9('0x4b')](_0x38c4d8[_0xc6e9('0x4a')]);_0x493df9[_0xc6e9('0x4c')]=_['intersection'](_0x493df9['model'],_0x493df9['query']);_0x26333d[_0xc6e9('0x4d')]=_[_0xc6e9('0x4e')](_0x493df9[_0xc6e9('0x49')],qs['fields'](_0x38c4d8[_0xc6e9('0x4a')][_0xc6e9('0x4f')]));_0x26333d['attributes']=_0x26333d[_0xc6e9('0x4d')][_0xc6e9('0x50')]?_0x26333d['attributes']:_0x493df9[_0xc6e9('0x49')];if(!_0x38c4d8['query']['hasOwnProperty'](_0xc6e9('0x6f'))){_0x26333d[_0xc6e9('0x33')]=qs[_0xc6e9('0x33')](_0x38c4d8[_0xc6e9('0x4a')][_0xc6e9('0x33')]);_0x26333d[_0xc6e9('0x31')]=qs[_0xc6e9('0x31')](_0x38c4d8['query'][_0xc6e9('0x31')]);}_0x26333d[_0xc6e9('0x52')]=qs[_0xc6e9('0x53')](_0x38c4d8[_0xc6e9('0x4a')]['sort']);_0x26333d[_0xc6e9('0x54')]=qs[_0xc6e9('0x4c')](_[_0xc6e9('0x55')](_0x38c4d8[_0xc6e9('0x4a')],_0x493df9[_0xc6e9('0x4c')]));_0x26333d[_0xc6e9('0x54')][_0xc6e9('0x6b')]=_0x1b566f['id'];if(_0x38c4d8[_0xc6e9('0x4a')][_0xc6e9('0x56')]){_0x26333d[_0xc6e9('0x54')]=_[_0xc6e9('0x57')](_0x26333d[_0xc6e9('0x54')],{'$or':_[_0xc6e9('0x45')](_0x26333d[_0xc6e9('0x4d')],function(_0x4b4862){var _0x3a74e9={};_0x3a74e9[_0x4b4862]={'$like':'%'+_0x38c4d8[_0xc6e9('0x4a')][_0xc6e9('0x56')]+'%'};return _0x3a74e9;})});}_0x26333d=_[_0xc6e9('0x57')]({},_0x26333d,_0x38c4d8[_0xc6e9('0x59')]);return db['CannedAnswer']['count']({'where':_0x26333d[_0xc6e9('0x54')]})[_0xc6e9('0x23')](function(_0x31cd09){_0x28ed62['count']=_0x31cd09;if(_0x38c4d8[_0xc6e9('0x4a')][_0xc6e9('0x5a')]){_0x26333d[_0xc6e9('0x5b')]=[{'all':!![]}];}return db[_0xc6e9('0x72')][_0xc6e9('0x5c')](_0x26333d);})[_0xc6e9('0x23')](function(_0x2b17c2){_0x28ed62['rows']=_0x2b17c2;return _0x28ed62;});}})[_0xc6e9('0x23')](respondWithFilteredResult(_0x3b3591,_0x26333d))[_0xc6e9('0x5e')](handleError(_0x3b3591,null));};exports[_0xc6e9('0x73')]=function(_0x917824,_0x386f5f,_0x10e3fb){return db[_0xc6e9('0x46')][_0xc6e9('0x62')]({'where':{'id':_0x917824[_0xc6e9('0x5f')]['id']}})['then'](handleEntityNotFound(_0x386f5f,null))[_0xc6e9('0x23')](function(_0x5868d4){if(_0x5868d4){return _0x5868d4['removeAnswers'](_0x917824['query'][_0xc6e9('0x74')]);}})['then'](respondWithStatusCode(_0x386f5f,null))[_0xc6e9('0x5e')](handleError(_0x386f5f,null));};exports[_0xc6e9('0x75')]=function(_0x272392,_0x42a683,_0x318ef3){var _0x33487f={'channel':_0xc6e9('0x76')};var _0x138c85=[];var _0x38529f=[];var _0x2c23ec={};return db[_0xc6e9('0x46')][_0xc6e9('0x62')]({'where':{'id':_0x272392[_0xc6e9('0x5f')]['id']},'include':[{'model':db[_0xc6e9('0x77')],'as':_0xc6e9('0x78')}]})[_0xc6e9('0x23')](handleEntityNotFound(_0x42a683,null))[_0xc6e9('0x23')](function(_0x32d6b1){_0x33487f[_0xc6e9('0x79')]=_0x32d6b1;_0x33487f[_0xc6e9('0x7a')]=_[_0xc6e9('0x7b')](_0x32d6b1[_0xc6e9('0x78')],[_0xc6e9('0x7c')],[_0xc6e9('0x7d')]);if(_0x33487f[_0xc6e9('0x79')]['Applications']){delete _0x33487f['account'][_0xc6e9('0x78')];}return db['CmContact']['describe']();})[_0xc6e9('0x23')](function(_0x5b2fe1){if(!_0x5b2fe1){throw new db[(_0xc6e9('0x7e'))][(_0xc6e9('0x7f'))](_0xc6e9('0x80'));}_0x138c85=_[_0xc6e9('0x81')](_['keys'](_0x5b2fe1),[_0xc6e9('0x82'),_0xc6e9('0x83')]);_0x38529f=_[_0xc6e9('0x81')](_['keys'](_0x5b2fe1),[_0xc6e9('0x82'),_0xc6e9('0x83'),_0xc6e9('0x84'),'ListId']);_0x33487f[_0xc6e9('0x64')]={'mapKey':_0xc6e9('0x85')};if(_0x33487f[_0xc6e9('0x79')]['type']){switch(_0x33487f[_0xc6e9('0x79')][_0xc6e9('0x48')]){case _0xc6e9('0x86'):_0x33487f['body'][_0xc6e9('0x87')]=_0x272392[_0xc6e9('0x64')][_0xc6e9('0x88')];_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x64')]=_0x272392[_0xc6e9('0x64')][_0xc6e9('0x89')];_0x33487f['body'][_0xc6e9('0x8a')]=_0x272392['body'][_0xc6e9('0x8b')];break;case _0xc6e9('0x8c'):_0x33487f['body'][_0xc6e9('0x87')]='+'+_0x272392[_0xc6e9('0x64')][_0xc6e9('0x8d')];_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x64')]=_0x272392[_0xc6e9('0x64')][_0xc6e9('0x8e')];break;case _0xc6e9('0x8f'):_0x33487f[_0xc6e9('0x64')]['from']=_0x272392[_0xc6e9('0x64')][_0xc6e9('0x87')];_0x33487f['body'][_0xc6e9('0x64')]=_0x272392[_0xc6e9('0x64')][_0xc6e9('0x2c')];break;case'clicksend':_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x87')]=_0x272392['body'][_0xc6e9('0x87')];_0x33487f['body'][_0xc6e9('0x64')]=_0x272392[_0xc6e9('0x64')][_0xc6e9('0x64')];_0x33487f[_0xc6e9('0x64')]['messageId']=_0x272392[_0xc6e9('0x64')][_0xc6e9('0x90')];break;case _0xc6e9('0x91'):_0x33487f[_0xc6e9('0x64')]['from']=_0x272392[_0xc6e9('0x64')]['From'];_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x64')]=_0x272392['body'][_0xc6e9('0x92')];_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x8a')]=_0x272392[_0xc6e9('0x64')][_0xc6e9('0x93')];break;case _0xc6e9('0x94'):_0x33487f['body'][_0xc6e9('0x87')]='+'+_0x272392[_0xc6e9('0x64')][_0xc6e9('0x95')][0x0][_0xc6e9('0x87')];_0x33487f[_0xc6e9('0x64')]['body']=_0x272392['body'][_0xc6e9('0x95')][0x0][_0xc6e9('0x8e')];_0x33487f[_0xc6e9('0x64')]['messageId']=_0x272392['body'][_0xc6e9('0x95')][0x0]['messageId'];break;case _0xc6e9('0x96'):_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x87')]=_0x272392[_0xc6e9('0x64')][_0xc6e9('0x97')];_0x33487f[_0xc6e9('0x64')]['body']=_0x272392[_0xc6e9('0x64')]['segmentedMessage']['message'];break;case _0xc6e9('0x98'):_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x87')]=_0x272392[_0xc6e9('0x64')][_0xc6e9('0x99')];_0x33487f[_0xc6e9('0x64')]['body']=_0x272392[_0xc6e9('0x64')][_0xc6e9('0x8e')];_0x33487f['body'][_0xc6e9('0x8a')]=_0x272392[_0xc6e9('0x64')][_0xc6e9('0x9a')];break;case'bandwidth':_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x8a')]=_0x272392[_0xc6e9('0x64')][0x0]['message']['id'];_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x87')]=_0x272392[_0xc6e9('0x64')][0x0][_0xc6e9('0x2c')][_0xc6e9('0x87')];_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x64')]=_0x272392[_0xc6e9('0x64')][0x0][_0xc6e9('0x2c')][_0xc6e9('0x8e')];break;case _0xc6e9('0x9b'):_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x87')]=_0x272392['body'][_0xc6e9('0x87')];_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x64')]=_0x272392[_0xc6e9('0x64')][_0xc6e9('0x2c')];_0x33487f['body'][_0xc6e9('0x8a')]=_0x272392[_0xc6e9('0x64')]['refid'];break;}}if(_0x33487f[_0xc6e9('0x64')]['id']){delete _0x33487f[_0xc6e9('0x64')]['id'];}if(_['isNil'](_0x33487f[_0xc6e9('0x64')]['from'])){throw new db[(_0xc6e9('0x7e'))][(_0xc6e9('0x7f'))](_0xc6e9('0x9c'));}if(_[_0xc6e9('0x9d')](_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x64')])||_0x33487f['body'][_0xc6e9('0x64')]===''){throw new db[(_0xc6e9('0x7e'))]['ValidationError'](_0xc6e9('0x9e'));}if(_[_0xc6e9('0x9d')](_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x9f')])){throw new db[(_0xc6e9('0x7e'))][(_0xc6e9('0x7f'))](_0xc6e9('0xa0')+_0x38529f);}if(!_[_0xc6e9('0xa1')](_0x38529f,_0x33487f['body'][_0xc6e9('0x9f')])){throw new db[(_0xc6e9('0x7e'))][(_0xc6e9('0x7f'))]('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x38529f);}_0x2c23ec[_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x9f')]]=_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x87')];return db[_0xc6e9('0xa2')][_0xc6e9('0x62')]({'where':{'id':_0x33487f[_0xc6e9('0x79')]['ListId']},'include':[{'model':db[_0xc6e9('0xa3')],'as':_0xc6e9('0xa4'),'where':_0x2c23ec,'limit':0x1,'order':[[_0xc6e9('0x83'),_0xc6e9('0xa5')]]}]});})[_0xc6e9('0x23')](handleEntityNotFound(_0x42a683,null))[_0xc6e9('0x23')](function(_0x3f1595){if(_0x3f1595){_0x33487f['list']=_[_0xc6e9('0xa6')](_0x3f1595,[_0xc6e9('0xa4')]);if(_0x3f1595[_0xc6e9('0xa4')][_0xc6e9('0x50')]){return _0x3f1595[_0xc6e9('0xa4')][0x0];}var _0x61486b=_[_0xc6e9('0x1a')](_0x33487f['body'],{'firstName':_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x87')],'ListId':_0x3f1595['id']});_0x61486b[_0x33487f['body'][_0xc6e9('0x9f')]]=_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x87')];return db[_0xc6e9('0xa3')][_0xc6e9('0x63')](_0x61486b,{'fields':_0x138c85,'raw':!![]});}})['then'](handleEntityNotFound(_0x42a683,null))['then'](function(_0x41f874){if(_0x41f874){_0x33487f[_0xc6e9('0xa7')]=_0x41f874;var _0x24939a={'ContactId':_0x41f874['id'],'phone':_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x87')],'SmsAccountId':_0x272392[_0xc6e9('0x5f')]['id']};var _0x3ebf8a={'ContactId':_0x41f874['id'],'SmsAccountId':_0x272392[_0xc6e9('0x5f')]['id'],'closed':![]};return db[_0xc6e9('0xa8')][_0xc6e9('0x62')]({'where':_0x3ebf8a})[_0xc6e9('0x23')](function(_0x1166ad){if(_0x1166ad){return[_0x1166ad,![]];}return db['SmsInteraction'][_0xc6e9('0x63')](_0x24939a)[_0xc6e9('0x23')](function(_0x1b4337){return[_0x1b4337,!![]];});});}})['spread'](function(_0x4bdb50,_0xa67f0f){_0x33487f['interaction']=_0x4bdb50[_0xc6e9('0x3c')]({'plain':!![]});_0x33487f[_0xc6e9('0xa9')]['created']=![];if(_0xa67f0f){if(_0x33487f['account'][_0xc6e9('0xaa')]){_0x33487f[_0xc6e9('0x7a')][_0xc6e9('0xab')]({'id':0x0,'priority':_0x33487f[_0xc6e9('0x7a')][_0xc6e9('0x50')]+0x1,'app':_0xc6e9('0xac'),'appdata':_0xc6e9('0xad'),'interval':_0xc6e9('0xae')});}_0x33487f[_0xc6e9('0xa9')]['created']=!![];}return db[_0xc6e9('0xaf')][_0xc6e9('0x63')]({'phone':_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x87')],'messageId':_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x8a')],'body':_0x33487f[_0xc6e9('0x64')][_0xc6e9('0x64')],'SmsAccountId':_0x272392[_0xc6e9('0x5f')]['id'],'SmsInteractionId':_0x4bdb50['id'],'direction':'in','ContactId':_0x4bdb50[_0xc6e9('0xb0')],'AttachmentId':_0x33487f['body'][_0xc6e9('0xb1')]});})[_0xc6e9('0x23')](function(_0x431142){_0x33487f['message']=_0x431142;if(!_0x33487f[_0xc6e9('0xa9')][_0xc6e9('0xb2')])return;return db[_0xc6e9('0xb3')][_0xc6e9('0x62')]({'attributes':['id',_0xc6e9('0x41')],'where':{'id':_0x33487f[_0xc6e9('0xa9')][_0xc6e9('0xb2')]}});})['then'](function(_0x4475d5){if(_0x4475d5){_0x33487f[_0xc6e9('0x7a')][_0xc6e9('0xb4')]({'id':0x0,'priority':0x0,'app':_0xc6e9('0xb5'),'appdata':_0x4475d5[_0xc6e9('0x41')]+','+(_0x33487f[_0xc6e9('0x79')]['waitForTheAssignedAgent']||0xa),'interval':'*,*,*,*'});}if(!_0x33487f[_0xc6e9('0xa9')][_0xc6e9('0xb6')])return;return db[_0xc6e9('0xb7')][_0xc6e9('0x62')]({'attributes':['id','name'],'where':{'id':_0x33487f[_0xc6e9('0xa9')][_0xc6e9('0xb6')]}});})[_0xc6e9('0x23')](function(_0x35a4c6){if(_0x35a4c6){_0x33487f[_0xc6e9('0x7a')][_0xc6e9('0xb4')]({'id':0x0,'priority':0x1,'app':_0xc6e9('0xb8'),'appdata':_0x35a4c6[_0xc6e9('0x41')]+','+(_0x33487f[_0xc6e9('0x79')][_0xc6e9('0xb9')]||0x12c),'interval':_0xc6e9('0xae')});}return respondWithRpcPromise(_0xc6e9('0xba'),_0xc6e9('0xbb'),_0x33487f);})['then'](function(_0x30563a){if(_0x30563a){var _0x790618=0xc8;var _0xbaf5b8=_0xc6e9('0xbc');logger[_0xc6e9('0x24')](_0xc6e9('0x28'),_0xbaf5b8,_0x790618,'entity\x20found');logger[_0xc6e9('0x27')](_0xc6e9('0xbd'),_0xbaf5b8,_0x790618,_0xc6e9('0xbe'),JSON[_0xc6e9('0x29')](_0x30563a));if(_0x33487f['account']['type']==='twilio'){return _0x42a683[_0xc6e9('0x2e')](_0x790618)[_0xc6e9('0x35')](_0xc6e9('0xbf'),'text/xml')['send'](_0xc6e9('0xc0'));}else{return _0x42a683[_0xc6e9('0x2e')](_0x790618)['json'](_0x30563a);}}})['catch'](handleError(_0x42a683,null));};exports[_0xc6e9('0xc1')]=function(_0x508c9,_0x50c78a){var _0x11afbf=_0x508c9['params']['id'];var _0x285fab=_0x508c9[_0xc6e9('0x64')];var _0x45f73f=0xc8;var _0x3bf6c5=null;return db[_0xc6e9('0xc2')]['transaction']({'isolationLevel':db[_0xc6e9('0xc2')][_0xc6e9('0xc3')][_0xc6e9('0xc4')][_0xc6e9('0xc5')]},function(_0x5b7feb){return db['SmsAccount'][_0xc6e9('0x6e')]({'where':{'id':_0x11afbf},'transaction':_0x5b7feb})[_0xc6e9('0x23')](function(_0x1aa7f6){if(_0x1aa7f6){return db['SmsApplication'][_0xc6e9('0x3b')]({'where':{'SmsAccountId':_0x11afbf},'transaction':_0x5b7feb})['then'](function(){var _0x133a3b=_[_0xc6e9('0x45')](_0x285fab,function(_0x2d9626){_0x2d9626[_0xc6e9('0x6b')]=_0x11afbf;return _0x2d9626;});return db['SmsApplication'][_0xc6e9('0xc6')](_0x133a3b,{'transaction':_0x5b7feb});});}else{_0x45f73f=0x194;_0x3bf6c5=[];}});})[_0xc6e9('0x23')](function(){if(_0x45f73f!==0x194){return db['SmsApplication'][_0xc6e9('0xc7')]({'where':{'SmsAccountId':_0x11afbf},'order':_0xc6e9('0x7c')})['then'](function(_0x19d441){_0x3bf6c5=_0x19d441;});}})[_0xc6e9('0x5e')](function(_0x8e2588){_0x45f73f=0x1f4;logger[_0xc6e9('0x2a')](_0x8e2588['stack']);if(_0x8e2588[_0xc6e9('0x41')]){delete _0x8e2588[_0xc6e9('0x41')];}_0x3bf6c5=_0x8e2588;})[_0xc6e9('0xc8')](function(){if(_0x3bf6c5===null){_0x50c78a[_0xc6e9('0x3f')](_0x45f73f);}else{if(_0x45f73f===0x1f4){_0x50c78a[_0xc6e9('0x2e')](_0x45f73f)[_0xc6e9('0x42')](_0x3bf6c5);}else{_0x50c78a[_0xc6e9('0x2e')](_0x45f73f)[_0xc6e9('0x30')](_0x3bf6c5);}}});};exports[_0xc6e9('0xc9')]=function(_0x4f1504,_0x4a5e4b,_0x37c739){var _0x94eba6={};var _0x51245a={};var _0x131f8b;var _0x3aa668;return db[_0xc6e9('0x46')][_0xc6e9('0x6e')]({'where':{'id':_0x4f1504['params']['id']}})[_0xc6e9('0x23')](handleEntityNotFound(_0x4a5e4b,null))[_0xc6e9('0x23')](function(_0x4d0729){if(_0x4d0729){_0x131f8b=_0x4d0729;_0x51245a[_0xc6e9('0x49')]=_[_0xc6e9('0x4b')](db[_0xc6e9('0x77')][_0xc6e9('0x61')]);_0x51245a['query']=_[_0xc6e9('0x4b')](_0x4f1504[_0xc6e9('0x4a')]);_0x51245a[_0xc6e9('0x4c')]=_[_0xc6e9('0x4e')](_0x51245a[_0xc6e9('0x49')],_0x51245a[_0xc6e9('0x4a')]);_0x94eba6['attributes']=_['intersection'](_0x51245a[_0xc6e9('0x49')],qs[_0xc6e9('0x4f')](_0x4f1504[_0xc6e9('0x4a')][_0xc6e9('0x4f')]));_0x94eba6[_0xc6e9('0x4d')]=_0x94eba6['attributes'][_0xc6e9('0x50')]?_0x94eba6[_0xc6e9('0x4d')]:_0x51245a[_0xc6e9('0x49')];_0x94eba6[_0xc6e9('0x52')]=qs[_0xc6e9('0x53')](_0x4f1504[_0xc6e9('0x4a')][_0xc6e9('0x53')]);_0x94eba6[_0xc6e9('0x54')]=qs['filters'](_[_0xc6e9('0x55')](_0x4f1504[_0xc6e9('0x4a')],_0x51245a[_0xc6e9('0x4c')]));if(_0x4f1504[_0xc6e9('0x4a')][_0xc6e9('0x56')]){_0x94eba6['where']=_[_0xc6e9('0x57')](_0x94eba6['where'],{'$or':_['map'](_0x94eba6[_0xc6e9('0x4d')],function(_0x283518){var _0x3fe9b7={};_0x3fe9b7[_0x283518]={'$like':'%'+_0x4f1504[_0xc6e9('0x4a')][_0xc6e9('0x56')]+'%'};return _0x3fe9b7;})});}_0x94eba6=_[_0xc6e9('0x57')]({},_0x94eba6,_0x4f1504[_0xc6e9('0x59')]);return _0x131f8b[_0xc6e9('0xc9')](_0x94eba6);}})['then'](function(_0x32632a){if(_0x32632a){_0x3aa668=_0x32632a['length'];if(!_0x4f1504[_0xc6e9('0x4a')][_0xc6e9('0x51')](_0xc6e9('0x6f'))){_0x94eba6[_0xc6e9('0x33')]=qs[_0xc6e9('0x33')](_0x4f1504['query'][_0xc6e9('0x33')]);_0x94eba6['offset']=qs['offset'](_0x4f1504['query'][_0xc6e9('0x31')]);}return _0x131f8b[_0xc6e9('0xc9')](_0x94eba6);}})['then'](function(_0x11da6f){if(_0x11da6f){return _0x11da6f?{'count':_0x3aa668,'rows':_0x11da6f}:null;}})[_0xc6e9('0x23')](respondWithResult(_0x4a5e4b,null))[_0xc6e9('0x5e')](handleError(_0x4a5e4b,null));};exports[_0xc6e9('0xca')]=function(_0x1931eb,_0x3425ff,_0x1b3912){var _0x5da22b={'raw':![],'where':{}};var _0x3cdf85={};var _0x2d3413={'count':0x0,'rows':[]};return db[_0xc6e9('0x46')][_0xc6e9('0x6e')]({'where':{'id':_0x1931eb['params']['id']}})[_0xc6e9('0x23')](handleEntityNotFound(_0x3425ff,null))[_0xc6e9('0x23')](function(_0x162bf3){if(_0x162bf3){_0x3cdf85[_0xc6e9('0x49')]=_[_0xc6e9('0x4b')](db[_0xc6e9('0xa8')][_0xc6e9('0x61')]);_0x3cdf85['query']=_['keys'](_0x1931eb[_0xc6e9('0x4a')]);_0x3cdf85[_0xc6e9('0x4c')]=_['intersection'](_0x3cdf85[_0xc6e9('0x49')],_0x3cdf85[_0xc6e9('0x4a')]);_0x5da22b[_0xc6e9('0x4d')]=_[_0xc6e9('0x4e')](_0x3cdf85[_0xc6e9('0x49')],qs[_0xc6e9('0x4f')](_0x1931eb[_0xc6e9('0x4a')][_0xc6e9('0x4f')]));_0x5da22b[_0xc6e9('0x4d')]=_0x5da22b[_0xc6e9('0x4d')][_0xc6e9('0x50')]?_0x5da22b['attributes']:_0x3cdf85[_0xc6e9('0x49')];if(!_0x1931eb['query']['hasOwnProperty']('nolimit')){_0x5da22b[_0xc6e9('0x33')]=qs[_0xc6e9('0x33')](_0x1931eb[_0xc6e9('0x4a')][_0xc6e9('0x33')]);_0x5da22b[_0xc6e9('0x31')]=qs['offset'](_0x1931eb[_0xc6e9('0x4a')][_0xc6e9('0x31')]);}_0x5da22b[_0xc6e9('0x52')]=qs['sort'](_0x1931eb['query'][_0xc6e9('0x53')]);_0x5da22b[_0xc6e9('0x54')]=qs['filters'](_['pick'](_0x1931eb['query'],_0x3cdf85['filters']));_0x5da22b[_0xc6e9('0x54')][_0xc6e9('0x6b')]=_0x162bf3['id'];if(_0x1931eb[_0xc6e9('0x4a')][_0xc6e9('0x56')]){_0x5da22b['where']=_[_0xc6e9('0x57')](_0x5da22b[_0xc6e9('0x54')],{'$or':_[_0xc6e9('0x45')](_0x5da22b[_0xc6e9('0x4d')],function(_0x1322a0){var _0x1230d6={};_0x1230d6[_0x1322a0]={'$like':'%'+_0x1931eb[_0xc6e9('0x4a')][_0xc6e9('0x56')]+'%'};return _0x1230d6;})});}_0x5da22b=_[_0xc6e9('0x57')]({},_0x5da22b,_0x1931eb[_0xc6e9('0x59')]);return db[_0xc6e9('0xa8')][_0xc6e9('0x34')]({'where':_0x5da22b[_0xc6e9('0x54')]})[_0xc6e9('0x23')](function(_0x1a76d4){_0x2d3413['count']=_0x1a76d4;if(_0x1931eb[_0xc6e9('0x4a')][_0xc6e9('0x5a')]){_0x5da22b[_0xc6e9('0x5b')]=[{'model':db[_0xc6e9('0xa3')],'as':_0xc6e9('0xcb'),'required':![]},{'model':db[_0xc6e9('0xb3')],'as':_0xc6e9('0xcc'),'attributes':[_0xc6e9('0x41'),_0xc6e9('0xcd'),_0xc6e9('0xce')],'required':![]},{'model':db[_0xc6e9('0xcf')],'as':_0xc6e9('0xd0'),'attributes':['id',_0xc6e9('0x41'),_0xc6e9('0xd1')],'where':_0x1931eb[_0xc6e9('0x4a')][_0xc6e9('0xd2')]?{'id':_0x1931eb[_0xc6e9('0x4a')][_0xc6e9('0xd2')]}:undefined,'required':_0x1931eb[_0xc6e9('0x4a')]['tag']?!![]:![]}];}return db[_0xc6e9('0xa8')][_0xc6e9('0x5c')](_0x5da22b);})[_0xc6e9('0x23')](function(_0x538f0b){_0x2d3413['rows']=_0x538f0b;return _0x2d3413;});}})[_0xc6e9('0x23')](respondWithFilteredResult(_0x3425ff,_0x5da22b))[_0xc6e9('0x5e')](handleError(_0x3425ff,null));};exports[_0xc6e9('0x42')]=function(_0x415576,_0x2729b2,_0x1b5ab4){var _0x285e68,_0x3e7dfa,_0x58434c;if(_[_0xc6e9('0x9d')](_0x415576[_0xc6e9('0x64')][_0xc6e9('0x64')])||_0x415576['body'][_0xc6e9('0x64')]===''){throw new db['Sequelize'][(_0xc6e9('0x7f'))](_0xc6e9('0x9e'));}if(_[_0xc6e9('0x9d')](_0x415576['body']['to'])){throw new db[(_0xc6e9('0x7e'))]['ValidationError'](_0xc6e9('0xd3'));}_0x285e68=_0x415576[_0xc6e9('0x64')]['to'];return db[_0xc6e9('0x46')][_0xc6e9('0x62')]({'where':{'id':_0x415576['params']['id']},'include':[{'model':db[_0xc6e9('0xa2')],'as':_0xc6e9('0xd4'),'include':[{'model':db[_0xc6e9('0xa3')],'as':_0xc6e9('0xa4'),'where':{'mobile':_0x285e68},'limit':0x1,'order':[[_0xc6e9('0x83'),'DESC']]}]}]})[_0xc6e9('0x23')](handleEntityNotFound(_0x2729b2,null))[_0xc6e9('0x23')](function(_0x3f7266){if(_0x3f7266&&_0x3f7266[_0xc6e9('0xd4')]){_0x3e7dfa=_0x3f7266['get']({'plain':!![]});if(_0x3e7dfa[_0xc6e9('0xd4')]&&_0x3e7dfa[_0xc6e9('0xd4')][_0xc6e9('0xa4')][_0xc6e9('0x50')]){return _0x3e7dfa['List']['Contacts'][0x0];}return db[_0xc6e9('0xa3')][_0xc6e9('0x63')](_['defaults'](_0x415576[_0xc6e9('0x64')],{'firstName':_0x285e68,'mobile':_0x285e68,'phone':_0x285e68,'ListId':_0x3e7dfa[_0xc6e9('0xd5')]}));}})[_0xc6e9('0x23')](handleEntityNotFound(_0x2729b2,null))[_0xc6e9('0x23')](function(_0x24b700){if(_0x24b700){_0x58434c=_0x24b700;return db[_0xc6e9('0xa8')][_0xc6e9('0x62')]({'where':{'ContactId':_0x58434c['id'],'closed':![],'SmsAccountId':_0x3e7dfa['id']}})[_0xc6e9('0x23')](function(_0x42bdc1){if(_0x42bdc1){return[_0x42bdc1,![]];}return db[_0xc6e9('0xa8')][_0xc6e9('0x63')]({'UserId':_0x415576[_0xc6e9('0x65')]['id'],'ContactId':_0x58434c['id'],'SmsAccountId':_0x3e7dfa['id'],'phone':_0x285e68,'firstMsgDirection':_0xc6e9('0xd6'),'Messages':[_[_0xc6e9('0x57')](_0x415576[_0xc6e9('0x64')],{'read':![],'body':_0x415576[_0xc6e9('0x64')][_0xc6e9('0x64')],'phone':_0x285e68,'SmsAccountId':_0x3e7dfa['id'],'UserId':_0x415576[_0xc6e9('0x65')]['id'],'ContactId':_0x58434c['id']})]},{'include':[{'model':db[_0xc6e9('0xaf')],'as':'Messages'}]})[_0xc6e9('0x23')](function(_0x1fc7f6){return[_0x1fc7f6,!![]];});});}})[_0xc6e9('0xd7')](function(_0x16ade7,_0x273f9c){if(_0x273f9c){return _0x16ade7;}return db[_0xc6e9('0xaf')][_0xc6e9('0x63')](_[_0xc6e9('0x57')](_0x415576[_0xc6e9('0x64')],{'read':![],'body':_0x415576[_0xc6e9('0x64')]['body'],'phone':_0x285e68,'SmsAccountId':_0x3e7dfa['id'],'SmsInteractionId':_0x16ade7['id'],'UserId':_0x415576[_0xc6e9('0x65')]['id'],'ContactId':_0x58434c['id']}))[_0xc6e9('0x23')](function(_0x4e5e79){_0x16ade7[_0xc6e9('0xd8')][_0xc6e9('0xd9')]=[];_0x16ade7[_0xc6e9('0xd8')][_0xc6e9('0xd9')][_0xc6e9('0xab')](_0x4e5e79[_0xc6e9('0xd8')]);return _0x16ade7;});})[_0xc6e9('0x23')](respondWithResult(_0x2729b2,null))['catch'](handleError(_0x2729b2,null));};exports[_0xc6e9('0x2e')]=function(_0x1dec1e,_0x1722be,_0x19729e){if(_0x1dec1e['body']['id']){delete _0x1dec1e[_0xc6e9('0x64')]['id'];}var _0x124b7e,_0x104413,_0x2f39d6;return db[_0xc6e9('0x46')][_0xc6e9('0x62')]({'where':{'id':_0x1dec1e[_0xc6e9('0x5f')]['id']}})['then'](handleEntityNotFound(_0x1722be,null))['then'](function(_0xf0ddf3){if(_0xf0ddf3){_0x2f39d6=_0xf0ddf3;logger[_0xc6e9('0x27')](_0xc6e9('0x28'),_0xc6e9('0x2e'),_0xc6e9('0xda'),_0xf0ddf3['type'],util[_0xc6e9('0xdb')](_0x1dec1e[_0xc6e9('0x64')],{'showHidden':![],'depth':null}));switch(_0xf0ddf3['type']){case _0xc6e9('0x8c'):if(_0x1dec1e[_0xc6e9('0x64')][_0xc6e9('0xdc')]&&_0x1dec1e[_0xc6e9('0x64')][_0xc6e9('0x2e')]){_0x104413=_0x1dec1e[_0xc6e9('0x64')][_0xc6e9('0x2e')];return db[_0xc6e9('0xaf')][_0xc6e9('0x62')]({'where':{'messageId':_0x1dec1e[_0xc6e9('0x64')][_0xc6e9('0xdc')]}});}break;case'connectel':if(_0x1dec1e[_0xc6e9('0x64')][_0xc6e9('0xdd')]&&_0x1dec1e['body'][_0xc6e9('0xde')]){_0x104413=_0x1dec1e[_0xc6e9('0x64')]['statusInt'];return db['SmsMessage'][_0xc6e9('0x62')]({'where':{'messageId':_0x1dec1e['body'][_0xc6e9('0xdd')]}});}break;case _0xc6e9('0xdf'):if(_0x1dec1e[_0xc6e9('0x64')][_0xc6e9('0x90')]&&_0x1dec1e['body']['status_code']){_0x104413=_0x1dec1e[_0xc6e9('0x64')][_0xc6e9('0xe0')];return db['SmsMessage']['find']({'where':{'messageId':_0x1dec1e[_0xc6e9('0x64')]['message_id']}});}break;case'infobip':var _0x9948f9=_0x1dec1e[_0xc6e9('0x64')][_0xc6e9('0x95')][0x0];if(_0x9948f9[_0xc6e9('0x8a')]&&_0x9948f9[_0xc6e9('0x2e')][_0xc6e9('0xe1')]===_0xc6e9('0xe2')){_0x104413=_0x9948f9[_0xc6e9('0x2e')][_0xc6e9('0xe1')];return db[_0xc6e9('0xaf')][_0xc6e9('0x62')]({'where':{'messageId':_0x9948f9[_0xc6e9('0x8a')]}});}break;case _0xc6e9('0x98'):if(_0x1dec1e[_0xc6e9('0x64')][_0xc6e9('0x8a')]&&_0x1dec1e[_0xc6e9('0x64')][_0xc6e9('0x2e')]){_0x104413=_0x1dec1e[_0xc6e9('0x64')][_0xc6e9('0x2e')];return db[_0xc6e9('0xaf')][_0xc6e9('0x62')]({'where':{'messageId':_0x1dec1e[_0xc6e9('0x64')]['messageId']}});}break;case'bandwidth':if(_0x1dec1e[_0xc6e9('0x64')][0x0][_0xc6e9('0x2c')]['id']){_0x104413=_0x1dec1e[_0xc6e9('0x64')][0x0][_0xc6e9('0x48')];return db[_0xc6e9('0xaf')][_0xc6e9('0x62')]({'where':{'messageId':_0x1dec1e[_0xc6e9('0x64')][0x0]['message']['id']}});}break;case _0xc6e9('0x9b'):if(_0x1dec1e['body'][_0xc6e9('0xe3')]&&_0x1dec1e[_0xc6e9('0x64')][_0xc6e9('0x2e')]){_0x104413=_0x1dec1e[_0xc6e9('0x64')]['status'];return db['SmsMessage'][_0xc6e9('0x62')]({'where':{'messageId':_0x1dec1e['body']['redif']}});}break;}}})[_0xc6e9('0x23')](handleEntityNotFound(_0x1722be,null))[_0xc6e9('0x23')](function(_0x29687d){if(_0x29687d){_0x124b7e=_0x29687d;switch(_0x2f39d6[_0xc6e9('0x48')]){case _0xc6e9('0x8c'):if(_0x104413==='DELIVERED'){return _0x124b7e[_0xc6e9('0x3a')]({'read':!![]});}else{logger[_0xc6e9('0x2a')](_0xc6e9('0x28'),_0xc6e9('0x2e'),_0xc6e9('0x8c'),util[_0xc6e9('0xdb')](_0x1dec1e[_0xc6e9('0x64')],{'showHidden':![],'depth':null}));}break;case _0xc6e9('0x8f'):if(_0x104413==='1'){return _0x124b7e['update']({'read':!![]});}else{logger[_0xc6e9('0x2a')](_0xc6e9('0x28'),_0xc6e9('0x2e'),_0xc6e9('0x8c'),util['inspect'](_0x1dec1e[_0xc6e9('0x64')],{'showHidden':![],'depth':null}));}break;case _0xc6e9('0xdf'):if(!_0x1dec1e[_0xc6e9('0x64')][_0xc6e9('0xe4')]&&_0x104413>=0xc8&&_0x104413<=0xce){return _0x124b7e[_0xc6e9('0x3a')]({'read':!![]});}else{logger[_0xc6e9('0x2a')](_0xc6e9('0x28'),_0xc6e9('0x2e'),_0xc6e9('0xdf'),util[_0xc6e9('0xdb')](_0x1dec1e[_0xc6e9('0x64')],{'showHidden':![],'depth':null}));}break;case _0xc6e9('0x94'):var _0x2394d1=_0x1dec1e[_0xc6e9('0x64')][_0xc6e9('0x95')][0x0];if(_0x2394d1[_0xc6e9('0x2e')][_0xc6e9('0xe1')]===_0xc6e9('0xe2')){return _0x124b7e[_0xc6e9('0x3a')]({'read':!![]});}else{logger[_0xc6e9('0x2a')](_0xc6e9('0x28'),_0xc6e9('0x2e'),'infobip',util[_0xc6e9('0xdb')](_0x1dec1e[_0xc6e9('0x64')],{'showHidden':![],'depth':null}));}break;case _0xc6e9('0x98'):if(_0x104413==_0xc6e9('0xe5')||_0x104413==_0xc6e9('0xe6')){return _0x124b7e[_0xc6e9('0x3a')]({'read':!![]});}else{logger[_0xc6e9('0x2a')](_0xc6e9('0x28'),_0xc6e9('0x2e'),_0xc6e9('0x98'),util[_0xc6e9('0xdb')](_0x1dec1e[_0xc6e9('0x64')],{'showHidden':![],'depth':null}));}break;case _0xc6e9('0xe7'):if(_0x104413==_0xc6e9('0xe8')){return _0x124b7e[_0xc6e9('0x3a')]({'read':!![]});}else{logger['error'](_0xc6e9('0x28'),'status','bandwidth',util['inspect'](_0x1dec1e[_0xc6e9('0x64')],{'showHidden':![],'depth':null}));}break;case'intelepeer':if(_0x104413===_0xc6e9('0xe9')||_0x104413===_0xc6e9('0xea')){return _0x124b7e[_0xc6e9('0x3a')]({'read':!![]});}else{logger[_0xc6e9('0x2a')](_0xc6e9('0x28'),_0xc6e9('0x2e'),_0xc6e9('0x9b'),util['inspect'](_0x1dec1e[_0xc6e9('0x64')],{'showHidden':![],'depth':null}));}break;}return _0x124b7e;}})['then'](respondWithResult(_0x1722be,null))['catch'](handleError(_0x1722be,null));};exports[_0xc6e9('0xeb')]=function(_0x175d33,_0x4b1003,_0x5a6d30){var _0x31dd10,_0x48f43d,_0x3a49b4;return db['SmsAccount'][_0xc6e9('0x62')]({'where':{'id':_0x175d33[_0xc6e9('0x5f')]['id']}})[_0xc6e9('0x23')](handleEntityNotFound(_0x4b1003,null))[_0xc6e9('0x23')](function(_0x2b8bf7){if(_0x2b8bf7){_0x3a49b4=_0x2b8bf7;logger[_0xc6e9('0x27')](_0xc6e9('0x28'),_0xc6e9('0x2e'),_0xc6e9('0xda'),_0x2b8bf7[_0xc6e9('0x48')],util[_0xc6e9('0xdb')](_0x175d33['query'],{'showHidden':![],'depth':null}));switch(_0x2b8bf7['type']){case _0xc6e9('0x96'):if(_0x175d33[_0xc6e9('0x4a')][_0xc6e9('0xec')]&&_0x175d33[_0xc6e9('0x4a')][_0xc6e9('0xed')]){_0x48f43d=_0x175d33['query'][_0xc6e9('0xed')];return db[_0xc6e9('0xaf')][_0xc6e9('0x62')]({'where':{'messageId':_0x175d33[_0xc6e9('0x4a')]['message-id']}});}break;}}})['then'](handleEntityNotFound(_0x4b1003,null))[_0xc6e9('0x23')](function(_0x27bc43){if(_0x27bc43){_0x31dd10=_0x27bc43;switch(_0x3a49b4[_0xc6e9('0x48')]){case'csc':if(_0x48f43d==='2'||_0x48f43d==='6'){return _0x31dd10['update']({'read':!![]});}else{logger['error'](_0xc6e9('0x28'),_0xc6e9('0x2e'),_0xc6e9('0x96'),util[_0xc6e9('0xdb')](_0x175d33[_0xc6e9('0x4a')],{'showHidden':![],'depth':null}));};break;}return _0x31dd10;}})['then'](respondWithResult(_0x4b1003,null))[_0xc6e9('0x5e')](handleError(_0x4b1003,null));};exports[_0xc6e9('0xee')]=function(_0x37211f,_0xac8e70,_0x15b833){return db[_0xc6e9('0x46')][_0xc6e9('0x62')]({'where':{'id':_0x37211f[_0xc6e9('0x5f')]['id']}})[_0xc6e9('0x23')](handleEntityNotFound(_0xac8e70,null))[_0xc6e9('0x23')](function(_0x76e4a0){if(_0x76e4a0){return _0x76e4a0[_0xc6e9('0xee')](_0x37211f[_0xc6e9('0x64')][_0xc6e9('0x74')],_[_0xc6e9('0xa6')](_0x37211f[_0xc6e9('0x64')],[_0xc6e9('0x74'),'id'])||{})['spread'](function(_0x31bfdd){for(var _0x1fa172=0x0;_0x1fa172<_0x37211f[_0xc6e9('0x64')][_0xc6e9('0x74')][_0xc6e9('0x50')];_0x1fa172+=0x1){socket[_0xc6e9('0xef')](_0xc6e9('0xf0'),{'UserId':Number(_0x37211f[_0xc6e9('0x64')][_0xc6e9('0x74')][_0x1fa172]),'SmsAccountId':Number(_0x37211f[_0xc6e9('0x5f')]['id'])});}return _0x31bfdd;});}})['then'](respondWithResult(_0xac8e70,null))['catch'](handleError(_0xac8e70,null));};exports[_0xc6e9('0xf1')]=function(_0x238884,_0x5287bb,_0x10189b){return db[_0xc6e9('0x46')][_0xc6e9('0x62')]({'where':{'id':_0x238884['params']['id']}})['then'](handleEntityNotFound(_0x5287bb,null))['then'](function(_0x2fece9){if(_0x2fece9){return _0x2fece9['removeAgents'](_0x238884[_0xc6e9('0x4a')][_0xc6e9('0x74')])[_0xc6e9('0x23')](function(){if(_[_0xc6e9('0xf2')](_0x238884[_0xc6e9('0x4a')][_0xc6e9('0x74')])){for(var _0x5c2454=0x0;_0x5c2454<_0x238884[_0xc6e9('0x4a')]['ids']['length'];_0x5c2454+=0x1){socket[_0xc6e9('0xef')](_0xc6e9('0xf3'),{'UserId':Number(_0x238884[_0xc6e9('0x4a')][_0xc6e9('0x74')][_0x5c2454]),'SmsAccountId':Number(_0x238884[_0xc6e9('0x5f')]['id'])});}}else{socket[_0xc6e9('0xef')](_0xc6e9('0xf3'),{'UserId':Number(_0x238884[_0xc6e9('0x4a')][_0xc6e9('0x74')]),'SmsAccountId':Number(_0x238884[_0xc6e9('0x5f')]['id'])});}});}})[_0xc6e9('0x23')](respondWithStatusCode(_0x5287bb,null))[_0xc6e9('0x5e')](handleError(_0x5287bb,null));};exports['getAgents']=function(_0x5beabf,_0x112a7d,_0x433586){var _0x54937a={};var _0x5d9a1c={};var _0x38b9b2;var _0x461335;return db[_0xc6e9('0x46')][_0xc6e9('0x6e')]({'where':{'id':_0x5beabf[_0xc6e9('0x5f')]['id']}})[_0xc6e9('0x23')](handleEntityNotFound(_0x112a7d,null))['then'](function(_0x131455){if(_0x131455){_0x38b9b2=_0x131455;_0x5d9a1c[_0xc6e9('0x49')]=_[_0xc6e9('0x4b')](db[_0xc6e9('0xb3')][_0xc6e9('0x61')]);_0x5d9a1c[_0xc6e9('0x4a')]=_[_0xc6e9('0x4b')](_0x5beabf['query']);_0x5d9a1c[_0xc6e9('0x4c')]=_[_0xc6e9('0x4e')](_0x5d9a1c['model'],_0x5d9a1c[_0xc6e9('0x4a')]);_0x54937a[_0xc6e9('0x4d')]=_['intersection'](_0x5d9a1c[_0xc6e9('0x49')],qs[_0xc6e9('0x4f')](_0x5beabf[_0xc6e9('0x4a')][_0xc6e9('0x4f')]));_0x54937a[_0xc6e9('0x4d')]=_0x54937a[_0xc6e9('0x4d')][_0xc6e9('0x50')]?_0x54937a['attributes']:_0x5d9a1c['model'];_0x54937a[_0xc6e9('0x52')]=qs['sort'](_0x5beabf[_0xc6e9('0x4a')][_0xc6e9('0x53')]);_0x54937a['where']=qs[_0xc6e9('0x4c')](_[_0xc6e9('0x55')](_0x5beabf[_0xc6e9('0x4a')],_0x5d9a1c[_0xc6e9('0x4c')]));if(_0x5beabf[_0xc6e9('0x4a')][_0xc6e9('0x56')]){_0x54937a['where']=_['merge'](_0x54937a[_0xc6e9('0x54')],{'$or':_[_0xc6e9('0x45')](_0x54937a[_0xc6e9('0x4d')],function(_0x32541a){var _0x3b63db={};_0x3b63db[_0x32541a]={'$like':'%'+_0x5beabf[_0xc6e9('0x4a')][_0xc6e9('0x56')]+'%'};return _0x3b63db;})});}_0x54937a=_[_0xc6e9('0x57')]({},_0x54937a,_0x5beabf[_0xc6e9('0x59')]);return _0x38b9b2[_0xc6e9('0xf4')](_0x54937a);}})['then'](function(_0x415595){if(_0x415595){_0x461335=_0x415595[_0xc6e9('0x50')];if(!_0x5beabf[_0xc6e9('0x4a')]['hasOwnProperty']('nolimit')){_0x54937a[_0xc6e9('0x33')]=qs[_0xc6e9('0x33')](_0x5beabf[_0xc6e9('0x4a')][_0xc6e9('0x33')]);_0x54937a[_0xc6e9('0x31')]=qs[_0xc6e9('0x31')](_0x5beabf[_0xc6e9('0x4a')][_0xc6e9('0x31')]);}return _0x38b9b2['getAgents'](_0x54937a);}})[_0xc6e9('0x23')](function(_0x17e00d){if(_0x17e00d){return _0x17e00d?{'count':_0x461335,'rows':_0x17e00d}:null;}})[_0xc6e9('0x23')](respondWithResult(_0x112a7d,null))[_0xc6e9('0x5e')](handleError(_0x112a7d,null));};
\ No newline at end of file
index c4856da..60d817c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7c43=['emit','hasOwnProperty','hook','exports','../../mysqldb','SmsAccount','save','update','remove'];(function(_0x1997f1,_0x2dd70c){var _0x62465d=function(_0x3de1b2){while(--_0x3de1b2){_0x1997f1['push'](_0x1997f1['shift']());}};_0x62465d(++_0x2dd70c);}(_0x7c43,0x100));var _0x37c4=function(_0x15f4af,_0x2ee361){_0x15f4af=_0x15f4af-0x0;var _0x5290f1=_0x7c43[_0x15f4af];return _0x5290f1;};'use strict';var EventEmitter=require('events');var SmsAccount=require(_0x37c4('0x0'))['db'][_0x37c4('0x1')];var SmsAccountEvents=new EventEmitter();SmsAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x37c4('0x2'),'afterUpdate':_0x37c4('0x3'),'afterDestroy':_0x37c4('0x4')};function emitEvent(_0xfef842){return function(_0x21889b,_0x2e813d,_0x1a4feb){SmsAccountEvents['emit'](_0xfef842+':'+_0x21889b['id'],_0x21889b);SmsAccountEvents[_0x37c4('0x5')](_0xfef842,_0x21889b);_0x1a4feb(null);};}for(var e in events){if(events[_0x37c4('0x6')](e)){var event=events[e];SmsAccount[_0x37c4('0x7')](e,emitEvent(event));}}module[_0x37c4('0x8')]=SmsAccountEvents;
\ No newline at end of file
+var _0x33e3=['update','emit','exports','../../mysqldb','SmsAccount','save'];(function(_0x2c9e0c,_0x552e66){var _0x45fc89=function(_0x1b444a){while(--_0x1b444a){_0x2c9e0c['push'](_0x2c9e0c['shift']());}};_0x45fc89(++_0x552e66);}(_0x33e3,0x1e9));var _0x333e=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x33e3[_0xa464c9];return _0x3d73c4;};'use strict';var EventEmitter=require('events');var SmsAccount=require(_0x333e('0x0'))['db'][_0x333e('0x1')];var SmsAccountEvents=new EventEmitter();SmsAccountEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x333e('0x2'),'afterUpdate':_0x333e('0x3'),'afterDestroy':'remove'};function emitEvent(_0x3babca){return function(_0x3ea31a,_0x36c4a3,_0x47bc77){SmsAccountEvents[_0x333e('0x4')](_0x3babca+':'+_0x3ea31a['id'],_0x3ea31a);SmsAccountEvents[_0x333e('0x4')](_0x3babca,_0x3ea31a);_0x47bc77(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsAccount['hook'](e,emitEvent(event));}}module[_0x333e('0x5')]=SmsAccountEvents;
\ No newline at end of file
index 58779b9..b21ff61 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe2dc=['moment','bluebird','request-promise','rimraf','exports','sms_accounts','lodash','api'];(function(_0x3d66f9,_0xabc1f0){var _0x473d50=function(_0xa2db03){while(--_0xa2db03){_0x3d66f9['push'](_0x3d66f9['shift']());}};_0x473d50(++_0xabc1f0);}(_0xe2dc,0xde));var _0xce2d=function(_0x20a493,_0x27c01){_0x20a493=_0x20a493-0x0;var _0x1ff689=_0xe2dc[_0x20a493];return _0x1ff689;};'use strict';var _=require(_0xce2d('0x0'));var util=require('util');var logger=require('../../config/logger')(_0xce2d('0x1'));var moment=require(_0xce2d('0x2'));var BPromise=require(_0xce2d('0x3'));var rp=require(_0xce2d('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0xce2d('0x5'));var config=require('../../config/environment');var attributes=require('./smsAccount.attributes');module[_0xce2d('0x6')]=function(_0x394865,_0x4b014a){return _0x394865['define']('SmsAccount',attributes,{'tableName':_0xce2d('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7760=['moment','request-promise','path','rimraf','../../config/environment','./smsAccount.attributes','exports','define','sms_accounts','lodash','api'];(function(_0x880051,_0x451dfc){var _0x4325d1=function(_0x243034){while(--_0x243034){_0x880051['push'](_0x880051['shift']());}};_0x4325d1(++_0x451dfc);}(_0x7760,0x1e2));var _0x0776=function(_0x1147ab,_0x10e72b){_0x1147ab=_0x1147ab-0x0;var _0x55cb5a=_0x7760[_0x1147ab];return _0x55cb5a;};'use strict';var _=require(_0x0776('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x0776('0x1'));var moment=require(_0x0776('0x2'));var BPromise=require('bluebird');var rp=require(_0x0776('0x3'));var fs=require('fs');var path=require(_0x0776('0x4'));var rimraf=require(_0x0776('0x5'));var config=require(_0x0776('0x6'));var attributes=require(_0x0776('0x7'));module[_0x0776('0x8')]=function(_0x39469a,_0x512cb8){return _0x39469a[_0x0776('0x9')]('SmsAccount',attributes,{'tableName':_0x0776('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index c6c4205..b4a44fd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf15e=['../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','localhost','./smsAccount.socket','then','info','debug','SmsAccount,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','SmsAccount,\x20%s,\x20%s','message','result','catch','SmsAccount','options','raw','attributes','include','model','map','ShowSmsAccount','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0xd5da7c,_0x3a331e){var _0x5553e9=function(_0x4705e5){while(--_0x4705e5){_0xd5da7c['push'](_0xd5da7c['shift']());}};_0x5553e9(++_0x3a331e);}(_0xf15e,0xa8));var _0xef15=function(_0x526045,_0x4fea0f){_0x526045=_0x526045-0x0;var _0x50549a=_0xf15e[_0x526045];return _0x50549a;};'use strict';var _=require(_0xef15('0x0'));var util=require(_0xef15('0x1'));var moment=require('moment');var BPromise=require(_0xef15('0x2'));var rs=require(_0xef15('0x3'));var fs=require('fs');var Redis=require(_0xef15('0x4'));var db=require(_0xef15('0x5'))['db'];var utils=require(_0xef15('0x6'));var logger=require(_0xef15('0x7'))(_0xef15('0x8'));var config=require(_0xef15('0x9'));var jayson=require(_0xef15('0xa'));var client=jayson[_0xef15('0xb')]['http']({'port':0x232a});config[_0xef15('0xc')]=_['defaults'](config['redis'],{'host':_0xef15('0xd'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xef15('0xc')]));require(_0xef15('0xe'))['register'](socket);function respondWithRpcPromise(_0x424f4d,_0x3c25ce,_0x1af73e){return new BPromise(function(_0x5b382e,_0x5c7661){return client['request'](_0x424f4d,_0x1af73e)[_0xef15('0xf')](function(_0x9a74c5){logger[_0xef15('0x10')]('SmsAccount,\x20%s,\x20%s',_0x3c25ce,'request\x20sent');logger[_0xef15('0x11')](_0xef15('0x12'),_0x3c25ce,_0xef15('0x13'),JSON[_0xef15('0x14')](_0x9a74c5));if(_0x9a74c5['error']){if(_0x9a74c5[_0xef15('0x15')][_0xef15('0x16')]===0x1f4){logger['error'](_0xef15('0x17'),_0x3c25ce,_0x9a74c5[_0xef15('0x15')][_0xef15('0x18')]);return _0x5c7661(_0x9a74c5[_0xef15('0x15')][_0xef15('0x18')]);}logger['error'](_0xef15('0x17'),_0x3c25ce,_0x9a74c5[_0xef15('0x15')][_0xef15('0x18')]);return _0x5b382e(_0x9a74c5[_0xef15('0x15')][_0xef15('0x18')]);}else{logger[_0xef15('0x10')]('SmsAccount,\x20%s,\x20%s',_0x3c25ce,_0xef15('0x13'));_0x5b382e(_0x9a74c5[_0xef15('0x19')][_0xef15('0x18')]);}})[_0xef15('0x1a')](function(_0x4a383b){logger['error'](_0xef15('0x17'),_0x3c25ce,_0x4a383b);_0x5c7661(_0x4a383b);});});}exports['ShowSmsAccount']=function(_0x3f0c46){var _0x2316d2=this;return new Promise(function(_0x59512a,_0x2eb849){return db[_0xef15('0x1b')]['find']({'raw':_0x3f0c46[_0xef15('0x1c')]?_0x3f0c46[_0xef15('0x1c')][_0xef15('0x1d')]===undefined?!![]:![]:!![],'where':_0x3f0c46[_0xef15('0x1c')]?_0x3f0c46[_0xef15('0x1c')]['where']||null:null,'attributes':_0x3f0c46['options']?_0x3f0c46['options'][_0xef15('0x1e')]||null:null,'include':_0x3f0c46['options']?_0x3f0c46[_0xef15('0x1c')][_0xef15('0x1f')]?_['map'](_0x3f0c46[_0xef15('0x1c')]['include'],function(_0x267735){return{'model':db[_0x267735[_0xef15('0x20')]],'as':_0x267735['as'],'attributes':_0x267735['attributes'],'include':_0x267735[_0xef15('0x1f')]?_[_0xef15('0x21')](_0x267735[_0xef15('0x1f')],function(_0x3f98cb){return{'model':db[_0x3f98cb[_0xef15('0x20')]],'as':_0x3f98cb['as'],'attributes':_0x3f98cb['attributes'],'include':_0x3f98cb[_0xef15('0x1f')]?_['map'](_0x3f98cb[_0xef15('0x1f')],function(_0x48b2e4){return{'model':db[_0x48b2e4[_0xef15('0x20')]],'as':_0x48b2e4['as'],'attributes':_0x48b2e4[_0xef15('0x1e')]};}):[]};}):[]};}):[]:[]})[_0xef15('0xf')](function(_0xe9b1fa){logger[_0xef15('0x10')]('ShowSmsAccount',_0x3f0c46);logger[_0xef15('0x11')](_0xef15('0x22'),_0x3f0c46,JSON['stringify'](_0xe9b1fa));_0x59512a(_0xe9b1fa);})[_0xef15('0x1a')](function(_0x2ef75b){logger[_0xef15('0x15')](_0xef15('0x22'),_0x2ef75b[_0xef15('0x18')],_0x3f0c46);_0x2eb849(_0x2316d2['error'](0x1f4,_0x2ef75b[_0xef15('0x18')]));});});};
\ No newline at end of file
+var _0x7570=['then','info','SmsAccount,\x20%s,\x20%s','debug','SmsAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','request\x20sent','result','catch','ShowSmsAccount','SmsAccount','find','options','raw','attributes','include','model','map','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./smsAccount.socket','register','request'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x7570,0x191));var _0x0757=function(_0x15e10b,_0x3ed403){_0x15e10b=_0x15e10b-0x0;var _0x587126=_0x7570[_0x15e10b];return _0x587126;};'use strict';var _=require(_0x0757('0x0'));var util=require(_0x0757('0x1'));var moment=require('moment');var BPromise=require(_0x0757('0x2'));var rs=require(_0x0757('0x3'));var fs=require('fs');var Redis=require(_0x0757('0x4'));var db=require(_0x0757('0x5'))['db'];var utils=require(_0x0757('0x6'));var logger=require('../../config/logger')('rpc');var config=require('../../config/environment');var jayson=require(_0x0757('0x7'));var client=jayson[_0x0757('0x8')][_0x0757('0x9')]({'port':0x232a});config[_0x0757('0xa')]=_[_0x0757('0xb')](config['redis'],{'host':_0x0757('0xc'),'port':0x18eb});var socket=require(_0x0757('0xd'))(new Redis(config['redis']));require(_0x0757('0xe'))[_0x0757('0xf')](socket);function respondWithRpcPromise(_0x1c37bd,_0x23619d,_0x424bce){return new BPromise(function(_0x2f6c03,_0xfd9965){return client[_0x0757('0x10')](_0x1c37bd,_0x424bce)[_0x0757('0x11')](function(_0x3472d0){logger[_0x0757('0x12')](_0x0757('0x13'),_0x23619d,'request\x20sent');logger[_0x0757('0x14')](_0x0757('0x15'),_0x23619d,'request\x20sent',JSON[_0x0757('0x16')](_0x3472d0));if(_0x3472d0['error']){if(_0x3472d0[_0x0757('0x17')][_0x0757('0x18')]===0x1f4){logger[_0x0757('0x17')](_0x0757('0x13'),_0x23619d,_0x3472d0['error'][_0x0757('0x19')]);return _0xfd9965(_0x3472d0[_0x0757('0x17')][_0x0757('0x19')]);}logger[_0x0757('0x17')](_0x0757('0x13'),_0x23619d,_0x3472d0[_0x0757('0x17')][_0x0757('0x19')]);return _0x2f6c03(_0x3472d0[_0x0757('0x17')][_0x0757('0x19')]);}else{logger['info']('SmsAccount,\x20%s,\x20%s',_0x23619d,_0x0757('0x1a'));_0x2f6c03(_0x3472d0[_0x0757('0x1b')][_0x0757('0x19')]);}})[_0x0757('0x1c')](function(_0x1c4701){logger[_0x0757('0x17')](_0x0757('0x13'),_0x23619d,_0x1c4701);_0xfd9965(_0x1c4701);});});}exports[_0x0757('0x1d')]=function(_0x2e45a6){var _0xc250d2=this;return new Promise(function(_0x22161a,_0x233a41){return db[_0x0757('0x1e')][_0x0757('0x1f')]({'raw':_0x2e45a6[_0x0757('0x20')]?_0x2e45a6[_0x0757('0x20')][_0x0757('0x21')]===undefined?!![]:![]:!![],'where':_0x2e45a6['options']?_0x2e45a6[_0x0757('0x20')]['where']||null:null,'attributes':_0x2e45a6[_0x0757('0x20')]?_0x2e45a6[_0x0757('0x20')][_0x0757('0x22')]||null:null,'include':_0x2e45a6[_0x0757('0x20')]?_0x2e45a6[_0x0757('0x20')][_0x0757('0x23')]?_['map'](_0x2e45a6[_0x0757('0x20')][_0x0757('0x23')],function(_0x5334f2){return{'model':db[_0x5334f2[_0x0757('0x24')]],'as':_0x5334f2['as'],'attributes':_0x5334f2['attributes'],'include':_0x5334f2[_0x0757('0x23')]?_[_0x0757('0x25')](_0x5334f2[_0x0757('0x23')],function(_0x1a0a9e){return{'model':db[_0x1a0a9e[_0x0757('0x24')]],'as':_0x1a0a9e['as'],'attributes':_0x1a0a9e[_0x0757('0x22')],'include':_0x1a0a9e[_0x0757('0x23')]?_[_0x0757('0x25')](_0x1a0a9e[_0x0757('0x23')],function(_0x177727){return{'model':db[_0x177727[_0x0757('0x24')]],'as':_0x177727['as'],'attributes':_0x177727[_0x0757('0x22')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x881ab7){logger[_0x0757('0x12')]('ShowSmsAccount',_0x2e45a6);logger['debug'](_0x0757('0x1d'),_0x2e45a6,JSON[_0x0757('0x16')](_0x881ab7));_0x22161a(_0x881ab7);})['catch'](function(_0x5357b1){logger[_0x0757('0x17')]('ShowSmsAccount',_0x5357b1[_0x0757('0x19')],_0x2e45a6);_0x233a41(_0xc250d2['error'](0x1f4,_0x5357b1[_0x0757('0x19')]));});});};
\ No newline at end of file
index b1684bc..72f05f8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['register','length','smsAccount:','./smsAccount.events','save','remove','emit','removeListener'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xa9e0,0x123));var _0x0a9e=function(_0x134c2e,_0x3573c4){_0x134c2e=_0x134c2e-0x0;var _0x2825db=_0xa9e0[_0x134c2e];return _0x2825db;};'use strict';var SmsAccountEvents=require(_0x0a9e('0x0'));var events=[_0x0a9e('0x1'),_0x0a9e('0x2'),'update'];function createListener(_0x550fbc,_0x18d5c9){return function(_0x4ce2f1){_0x18d5c9[_0x0a9e('0x3')](_0x550fbc,_0x4ce2f1);};}function removeListener(_0x432180,_0x2ab90b){return function(){SmsAccountEvents[_0x0a9e('0x4')](_0x432180,_0x2ab90b);};}exports[_0x0a9e('0x5')]=function(_0x57b080){for(var _0x219af0=0x0,_0x441e3a=events[_0x0a9e('0x6')];_0x219af0<_0x441e3a;_0x219af0++){var _0x5f41ea=events[_0x219af0];var _0x503809=createListener(_0x0a9e('0x7')+_0x5f41ea,_0x57b080);SmsAccountEvents['on'](_0x5f41ea,_0x503809);}};
\ No newline at end of file
+var _0xa9e0=['register','length','smsAccount:','./smsAccount.events','save','remove','emit','removeListener'];(function(_0x57b54c,_0x54ce0d){var _0x59cc19=function(_0xa33bc6){while(--_0xa33bc6){_0x57b54c['push'](_0x57b54c['shift']());}};_0x59cc19(++_0x54ce0d);}(_0xa9e0,0x123));var _0x0a9e=function(_0x56482c,_0x16118d){_0x56482c=_0x56482c-0x0;var _0x5aae7a=_0xa9e0[_0x56482c];return _0x5aae7a;};'use strict';var SmsAccountEvents=require(_0x0a9e('0x0'));var events=[_0x0a9e('0x1'),_0x0a9e('0x2'),'update'];function createListener(_0x550fbc,_0x18d5c9){return function(_0x4ce2f1){_0x18d5c9[_0x0a9e('0x3')](_0x550fbc,_0x4ce2f1);};}function removeListener(_0x432180,_0x2ab90b){return function(){SmsAccountEvents[_0x0a9e('0x4')](_0x432180,_0x2ab90b);};}exports[_0x0a9e('0x5')]=function(_0x57b080){for(var _0x219af0=0x0,_0x441e3a=events[_0x0a9e('0x6')];_0x219af0<_0x441e3a;_0x219af0++){var _0x5f41ea=events[_0x219af0];var _0x503809=createListener(_0x0a9e('0x7')+_0x5f41ea,_0x57b080);SmsAccountEvents['on'](_0x5f41ea,_0x503809);}};
\ No newline at end of file
index 728a513..09dda96 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3e74=['path','connect-timeout','express','../../components/auth/service','../../config/environment','./smsApplication.controller','get','isAuthenticated','index','/:id','show','post','put','update','delete','exports','multer'];(function(_0x399b91,_0x4c3278){var _0x4a39b2=function(_0x12dcdc){while(--_0x12dcdc){_0x399b91['push'](_0x399b91['shift']());}};_0x4a39b2(++_0x4c3278);}(_0x3e74,0x175));var _0x43e7=function(_0x1fe5bf,_0x5c7924){_0x1fe5bf=_0x1fe5bf-0x0;var _0x371898=_0x3e74[_0x1fe5bf];return _0x371898;};'use strict';var multer=require(_0x43e7('0x0'));var util=require('util');var path=require(_0x43e7('0x1'));var timeout=require(_0x43e7('0x2'));var express=require(_0x43e7('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x43e7('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x43e7('0x5'));var controller=require(_0x43e7('0x6'));router[_0x43e7('0x7')]('/',auth[_0x43e7('0x8')](),controller[_0x43e7('0x9')]);router['get'](_0x43e7('0xa'),auth[_0x43e7('0x8')](),controller[_0x43e7('0xb')]);router[_0x43e7('0xc')]('/',auth[_0x43e7('0x8')](),controller['create']);router[_0x43e7('0xd')]('/:id',auth['isAuthenticated'](),controller[_0x43e7('0xe')]);router[_0x43e7('0xf')]('/:id',auth[_0x43e7('0x8')](),controller['destroy']);module[_0x43e7('0x10')]=router;
\ No newline at end of file
+var _0x7217=['Router','fs-extra','../../config/environment','./smsApplication.controller','get','isAuthenticated','index','/:id','show','post','create','put','delete','destroy','exports','multer','path','connect-timeout','express'];(function(_0x7e992f,_0x3e7785){var _0x162b36=function(_0x2be8d7){while(--_0x2be8d7){_0x7e992f['push'](_0x7e992f['shift']());}};_0x162b36(++_0x3e7785);}(_0x7217,0x19e));var _0x7721=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0x7217[_0x4cf98e];return _0x1623ac;};'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('0xd')]('/',auth[_0x7721('0x9')](),controller[_0x7721('0xe')]);router[_0x7721('0xf')](_0x7721('0xb'),auth[_0x7721('0x9')](),controller['update']);router[_0x7721('0x10')](_0x7721('0xb'),auth[_0x7721('0x9')](),controller[_0x7721('0x11')]);module[_0x7721('0x12')]=router;
\ No newline at end of file
index 90fafeb..1dc6238 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4d00=['STRING','noop','TEXT','*,*,*,*','sequelize','exports'];(function(_0x3e8bf8,_0x4e76d6){var _0x3391ce=function(_0x4f32d6){while(--_0x4f32d6){_0x3e8bf8['push'](_0x3e8bf8['shift']());}};_0x3391ce(++_0x4e76d6);}(_0x4d00,0x7c));var _0x04d0=function(_0x5856af,_0xb50ddf){_0x5856af=_0x5856af-0x0;var _0x56d311=_0x4d00[_0x5856af];return _0x56d311;};'use strict';var Sequelize=require(_0x04d0('0x0'));module[_0x04d0('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0x04d0('0x2')],'allowNull':![],'defaultValue':_0x04d0('0x3')},'appdata':{'type':Sequelize[_0x04d0('0x4')]()},'description':{'type':Sequelize[_0x04d0('0x2')]},'interval':{'type':Sequelize[_0x04d0('0x2')],'defaultValue':_0x04d0('0x5')}};
\ No newline at end of file
+var _0x5164=['sequelize','exports','STRING','noop','TEXT','*,*,*,*'];(function(_0x36c5d6,_0x36bccb){var _0x153fd2=function(_0x247546){while(--_0x247546){_0x36c5d6['push'](_0x36c5d6['shift']());}};_0x153fd2(++_0x36bccb);}(_0x5164,0x1da));var _0x4516=function(_0x21c930,_0x61331c){_0x21c930=_0x21c930-0x0;var _0x335803=_0x5164[_0x21c930];return _0x335803;};'use strict';var Sequelize=require(_0x4516('0x0'));module[_0x4516('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0x4516('0x2')],'allowNull':![],'defaultValue':_0x4516('0x3')},'appdata':{'type':Sequelize[_0x4516('0x4')]()},'description':{'type':Sequelize[_0x4516('0x2')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x4516('0x5')}};
\ No newline at end of file
index 3b406ac..5061734 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc7f6=['index','map','SmsApplication','rawAttributes','type','key','keys','query','filters','intersection','attributes','model','fields','length','nolimit','where','filter','merge','VIRTUAL','options','count','include','findAll','rows','catch','params','includeAll','find','create','body','eml-format','rimraf','fast-json-patch','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../mysqldb','status','end','json','undefined','limit','offset','set','apply','reject','save','update','then','destroy','error','name','send'];(function(_0x2f68e3,_0x50eb28){var _0x1d525c=function(_0x460ca0){while(--_0x460ca0){_0x2f68e3['push'](_0x2f68e3['shift']());}};_0x1d525c(++_0x50eb28);}(_0xc7f6,0x136));var _0x6c7f=function(_0x2d932c,_0x22541f){_0x2d932c=_0x2d932c-0x0;var _0x57fa94=_0xc7f6[_0x2d932c];return _0x57fa94;};'use strict';var emlformat=require(_0x6c7f('0x0'));var rimraf=require(_0x6c7f('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x6c7f('0x2'));var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0x6c7f('0x3'));var Mustache=require(_0x6c7f('0x4'));var util=require(_0x6c7f('0x5'));var path=require(_0x6c7f('0x6'));var sox=require(_0x6c7f('0x7'));var csv=require(_0x6c7f('0x8'));var ejs=require(_0x6c7f('0x9'));var fs=require('fs');var fs_extra=require(_0x6c7f('0xa'));var _=require(_0x6c7f('0xb'));var squel=require(_0x6c7f('0xc'));var crypto=require(_0x6c7f('0xd'));var jsforce=require('jsforce');var deskjs=require(_0x6c7f('0xe'));var toCsv=require(_0x6c7f('0x8'));var querystring=require(_0x6c7f('0xf'));var Papa=require(_0x6c7f('0x10'));var Redis=require('ioredis');var authService=require(_0x6c7f('0x11'));var qs=require(_0x6c7f('0x12'));var as=require(_0x6c7f('0x13'));var hardwareService=require(_0x6c7f('0x14'));var logger=require(_0x6c7f('0x15'))('api');var utils=require(_0x6c7f('0x16'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x6c7f('0x17'))['db'];function respondWithStatusCode(_0x35134f,_0x3a63ec){_0x3a63ec=_0x3a63ec||0xcc;return function(_0x4e565b){if(_0x4e565b){return _0x35134f['sendStatus'](_0x3a63ec);}return _0x35134f[_0x6c7f('0x18')](_0x3a63ec)[_0x6c7f('0x19')]();};}function respondWithResult(_0x50b7a0,_0x1a691f){_0x1a691f=_0x1a691f||0xc8;return function(_0xdb7d8e){if(_0xdb7d8e){return _0x50b7a0['status'](_0x1a691f)[_0x6c7f('0x1a')](_0xdb7d8e);}};}function respondWithFilteredResult(_0x14dff9,_0x3a2d07){return function(_0x38ebaf){if(_0x38ebaf){var _0x5122fb=typeof _0x3a2d07['offset']===_0x6c7f('0x1b')&&typeof _0x3a2d07[_0x6c7f('0x1c')]===_0x6c7f('0x1b');var _0x319092=_0x38ebaf['count'];var _0x25d1bf=_0x5122fb?0x0:_0x3a2d07['offset'];var _0x1e9b24=_0x5122fb?_0x38ebaf['count']:_0x3a2d07[_0x6c7f('0x1d')]+_0x3a2d07[_0x6c7f('0x1c')];var _0x56cee8;if(_0x1e9b24>=_0x319092){_0x1e9b24=_0x319092;_0x56cee8=0xc8;}else{_0x56cee8=0xce;}_0x14dff9['status'](_0x56cee8);return _0x14dff9[_0x6c7f('0x1e')]('Content-Range',_0x25d1bf+'-'+_0x1e9b24+'/'+_0x319092)[_0x6c7f('0x1a')](_0x38ebaf);}return null;};}function patchUpdates(_0x28dbdd){return function(_0x3df87f){try{jsonpatch[_0x6c7f('0x1f')](_0x3df87f,_0x28dbdd,!![]);}catch(_0x24c084){return BPromise[_0x6c7f('0x20')](_0x24c084);}return _0x3df87f[_0x6c7f('0x21')]();};}function saveUpdates(_0x36b7e2,_0x197f48){return function(_0xc79951){if(_0xc79951){return _0xc79951[_0x6c7f('0x22')](_0x36b7e2)[_0x6c7f('0x23')](function(_0x367d48){return _0x367d48;});}return null;};}function removeEntity(_0x413e7d,_0x2c00ee){return function(_0x447351){if(_0x447351){return _0x447351[_0x6c7f('0x24')]()['then'](function(){_0x413e7d['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x6dab74,_0x2c90bb){return function(_0x22b294){if(!_0x22b294){_0x6dab74['sendStatus'](0x194);}return _0x22b294;};}function handleError(_0x366f9b,_0x1c3497){_0x1c3497=_0x1c3497||0x1f4;return function(_0x2e7ed4){logger[_0x6c7f('0x25')](_0x2e7ed4['stack']);if(_0x2e7ed4[_0x6c7f('0x26')]){delete _0x2e7ed4['name'];}_0x366f9b[_0x6c7f('0x18')](_0x1c3497)[_0x6c7f('0x27')](_0x2e7ed4);};}exports[_0x6c7f('0x28')]=function(_0xa1f5a2,_0x2f4676){var _0x18ff5e={},_0xc251f9={},_0x4e6fe7={'count':0x0,'rows':[]};var _0x1ee24b=_[_0x6c7f('0x29')](db[_0x6c7f('0x2a')][_0x6c7f('0x2b')],function(_0x3be860){return{'name':_0x3be860['fieldName'],'type':_0x3be860[_0x6c7f('0x2c')][_0x6c7f('0x2d')]};});_0xc251f9['model']=_['map'](_0x1ee24b,'name');_0xc251f9['query']=_[_0x6c7f('0x2e')](_0xa1f5a2[_0x6c7f('0x2f')]);_0xc251f9[_0x6c7f('0x30')]=_[_0x6c7f('0x31')](_0xc251f9['model'],_0xc251f9[_0x6c7f('0x2f')]);_0x18ff5e[_0x6c7f('0x32')]=_[_0x6c7f('0x31')](_0xc251f9[_0x6c7f('0x33')],qs[_0x6c7f('0x34')](_0xa1f5a2[_0x6c7f('0x2f')][_0x6c7f('0x34')]));_0x18ff5e[_0x6c7f('0x32')]=_0x18ff5e[_0x6c7f('0x32')][_0x6c7f('0x35')]?_0x18ff5e[_0x6c7f('0x32')]:_0xc251f9[_0x6c7f('0x33')];if(!_0xa1f5a2[_0x6c7f('0x2f')]['hasOwnProperty'](_0x6c7f('0x36'))){_0x18ff5e[_0x6c7f('0x1c')]=qs['limit'](_0xa1f5a2[_0x6c7f('0x2f')][_0x6c7f('0x1c')]);_0x18ff5e[_0x6c7f('0x1d')]=qs[_0x6c7f('0x1d')](_0xa1f5a2[_0x6c7f('0x2f')][_0x6c7f('0x1d')]);}_0x18ff5e['order']=qs['sort'](_0xa1f5a2[_0x6c7f('0x2f')]['sort']);_0x18ff5e[_0x6c7f('0x37')]=qs[_0x6c7f('0x30')](_['pick'](_0xa1f5a2[_0x6c7f('0x2f')],_0xc251f9[_0x6c7f('0x30')]),_0x1ee24b);if(_0xa1f5a2[_0x6c7f('0x2f')][_0x6c7f('0x38')]){_0x18ff5e[_0x6c7f('0x37')]=_[_0x6c7f('0x39')](_0x18ff5e[_0x6c7f('0x37')],{'$or':_['map'](_0x1ee24b,function(_0xd44838){if(_0xd44838['type']!==_0x6c7f('0x3a')){var _0x417c72={};_0x417c72[_0xd44838[_0x6c7f('0x26')]]={'$like':'%'+_0xa1f5a2[_0x6c7f('0x2f')][_0x6c7f('0x38')]+'%'};return _0x417c72;}})});}_0x18ff5e=_[_0x6c7f('0x39')]({},_0x18ff5e,_0xa1f5a2[_0x6c7f('0x3b')]);var _0x35b48f={'where':_0x18ff5e['where']};return db[_0x6c7f('0x2a')][_0x6c7f('0x3c')](_0x35b48f)['then'](function(_0xd88e17){_0x4e6fe7[_0x6c7f('0x3c')]=_0xd88e17;if(_0xa1f5a2[_0x6c7f('0x2f')]['includeAll']){_0x18ff5e[_0x6c7f('0x3d')]=[{'all':!![]}];}return db[_0x6c7f('0x2a')][_0x6c7f('0x3e')](_0x18ff5e);})[_0x6c7f('0x23')](function(_0x370ac5){_0x4e6fe7[_0x6c7f('0x3f')]=_0x370ac5;return _0x4e6fe7;})[_0x6c7f('0x23')](respondWithFilteredResult(_0x2f4676,_0x18ff5e))[_0x6c7f('0x40')](handleError(_0x2f4676,null));};exports['show']=function(_0x40968b,_0x32b412){var _0x54f0c4={'raw':!![],'where':{'id':_0x40968b[_0x6c7f('0x41')]['id']}},_0x12b39f={};_0x12b39f['model']=_[_0x6c7f('0x2e')](db[_0x6c7f('0x2a')]['rawAttributes']);_0x12b39f[_0x6c7f('0x2f')]=_[_0x6c7f('0x2e')](_0x40968b[_0x6c7f('0x2f')]);_0x12b39f[_0x6c7f('0x30')]=_[_0x6c7f('0x31')](_0x12b39f[_0x6c7f('0x33')],_0x12b39f[_0x6c7f('0x2f')]);_0x54f0c4['attributes']=_[_0x6c7f('0x31')](_0x12b39f[_0x6c7f('0x33')],qs[_0x6c7f('0x34')](_0x40968b[_0x6c7f('0x2f')][_0x6c7f('0x34')]));_0x54f0c4[_0x6c7f('0x32')]=_0x54f0c4[_0x6c7f('0x32')][_0x6c7f('0x35')]?_0x54f0c4[_0x6c7f('0x32')]:_0x12b39f['model'];if(_0x40968b[_0x6c7f('0x2f')][_0x6c7f('0x42')]){_0x54f0c4['include']=[{'all':!![]}];}_0x54f0c4=_[_0x6c7f('0x39')]({},_0x54f0c4,_0x40968b['options']);return db[_0x6c7f('0x2a')][_0x6c7f('0x43')](_0x54f0c4)[_0x6c7f('0x23')](handleEntityNotFound(_0x32b412,null))['then'](respondWithResult(_0x32b412,null))['catch'](handleError(_0x32b412,null));};exports[_0x6c7f('0x44')]=function(_0x4ca447,_0x56ecf6){return db['SmsApplication'][_0x6c7f('0x44')](_0x4ca447[_0x6c7f('0x45')],{})[_0x6c7f('0x23')](respondWithResult(_0x56ecf6,0xc9))['catch'](handleError(_0x56ecf6,null));};exports[_0x6c7f('0x22')]=function(_0x32da08,_0xccc439){if(_0x32da08[_0x6c7f('0x45')]['id']){delete _0x32da08[_0x6c7f('0x45')]['id'];}return db[_0x6c7f('0x2a')][_0x6c7f('0x43')]({'where':{'id':_0x32da08[_0x6c7f('0x41')]['id']}})[_0x6c7f('0x23')](handleEntityNotFound(_0xccc439,null))['then'](saveUpdates(_0x32da08[_0x6c7f('0x45')],null))[_0x6c7f('0x23')](respondWithResult(_0xccc439,null))['catch'](handleError(_0xccc439,null));};exports['destroy']=function(_0x233960,_0xa12662){return db['SmsApplication'][_0x6c7f('0x43')]({'where':{'id':_0x233960[_0x6c7f('0x41')]['id']}})['then'](handleEntityNotFound(_0xa12662,null))[_0x6c7f('0x23')](removeEntity(_0xa12662,null))[_0x6c7f('0x40')](handleError(_0xa12662,null));};
\ No newline at end of file
+var _0xc871=['rawAttributes','fieldName','type','key','query','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filters','filter','VIRTUAL','merge','options','include','rows','catch','show','keys','includeAll','find','create','body','params','eml-format','rimraf','request-promise','moment','mustache','util','path','sox','to-csv','fs-extra','crypto','desk.js','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','end','error','stack','name','index','map','SmsApplication'];(function(_0x3cfd57,_0x537cf5){var _0x527d26=function(_0x37d396){while(--_0x37d396){_0x3cfd57['push'](_0x3cfd57['shift']());}};_0x527d26(++_0x537cf5);}(_0xc871,0x1d5));var _0x1c87=function(_0xa8b178,_0x3c4d19){_0xa8b178=_0xa8b178-0x0;var _0x46d5a6=_0xc871[_0xa8b178];return _0x46d5a6;};'use strict';var emlformat=require(_0x1c87('0x0'));var rimraf=require(_0x1c87('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x1c87('0x2'));var moment=require(_0x1c87('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x1c87('0x4'));var util=require(_0x1c87('0x5'));var path=require(_0x1c87('0x6'));var sox=require(_0x1c87('0x7'));var csv=require(_0x1c87('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x1c87('0x9'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x1c87('0xa'));var jsforce=require('jsforce');var deskjs=require(_0x1c87('0xb'));var toCsv=require(_0x1c87('0x8'));var querystring=require(_0x1c87('0xc'));var Papa=require('papaparse');var Redis=require(_0x1c87('0xd'));var authService=require('../../components/auth/service');var qs=require(_0x1c87('0xe'));var as=require(_0x1c87('0xf'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x1c87('0x10'))(_0x1c87('0x11'));var utils=require('../../config/utils');var config=require(_0x1c87('0x12'));var licenseUtil=require('../../config/license/util');var db=require(_0x1c87('0x13'))['db'];function respondWithStatusCode(_0x179eee,_0x717cd6){_0x717cd6=_0x717cd6||0xcc;return function(_0x3dff63){if(_0x3dff63){return _0x179eee[_0x1c87('0x14')](_0x717cd6);}return _0x179eee[_0x1c87('0x15')](_0x717cd6)['end']();};}function respondWithResult(_0xda944d,_0x38b228){_0x38b228=_0x38b228||0xc8;return function(_0x3a1dd2){if(_0x3a1dd2){return _0xda944d['status'](_0x38b228)[_0x1c87('0x16')](_0x3a1dd2);}};}function respondWithFilteredResult(_0x3326a8,_0x2b1263){return function(_0x3fd837){if(_0x3fd837){var _0x2d68f9=typeof _0x2b1263[_0x1c87('0x17')]===_0x1c87('0x18')&&typeof _0x2b1263[_0x1c87('0x19')]==='undefined';var _0x90541f=_0x3fd837[_0x1c87('0x1a')];var _0x549c53=_0x2d68f9?0x0:_0x2b1263[_0x1c87('0x17')];var _0x10b2cd=_0x2d68f9?_0x3fd837[_0x1c87('0x1a')]:_0x2b1263[_0x1c87('0x17')]+_0x2b1263[_0x1c87('0x19')];var _0x53628e;if(_0x10b2cd>=_0x90541f){_0x10b2cd=_0x90541f;_0x53628e=0xc8;}else{_0x53628e=0xce;}_0x3326a8[_0x1c87('0x15')](_0x53628e);return _0x3326a8[_0x1c87('0x1b')](_0x1c87('0x1c'),_0x549c53+'-'+_0x10b2cd+'/'+_0x90541f)[_0x1c87('0x16')](_0x3fd837);}return null;};}function patchUpdates(_0x1faedd){return function(_0x4ce27e){try{jsonpatch[_0x1c87('0x1d')](_0x4ce27e,_0x1faedd,!![]);}catch(_0x3d2a04){return BPromise[_0x1c87('0x1e')](_0x3d2a04);}return _0x4ce27e[_0x1c87('0x1f')]();};}function saveUpdates(_0x18bcdb,_0xedca75){return function(_0x3c73ee){if(_0x3c73ee){return _0x3c73ee[_0x1c87('0x20')](_0x18bcdb)[_0x1c87('0x21')](function(_0x26cd16){return _0x26cd16;});}return null;};}function removeEntity(_0x509e2d,_0x73c797){return function(_0x3af242){if(_0x3af242){return _0x3af242[_0x1c87('0x22')]()[_0x1c87('0x21')](function(){_0x509e2d[_0x1c87('0x15')](0xcc)[_0x1c87('0x23')]();});}};}function handleEntityNotFound(_0x14cf12,_0x3ffd2d){return function(_0x255a73){if(!_0x255a73){_0x14cf12['sendStatus'](0x194);}return _0x255a73;};}function handleError(_0xe16410,_0x285355){_0x285355=_0x285355||0x1f4;return function(_0x2a05de){logger[_0x1c87('0x24')](_0x2a05de[_0x1c87('0x25')]);if(_0x2a05de[_0x1c87('0x26')]){delete _0x2a05de[_0x1c87('0x26')];}_0xe16410[_0x1c87('0x15')](_0x285355)['send'](_0x2a05de);};}exports[_0x1c87('0x27')]=function(_0x127e78,_0x4d58c8){var _0x2720c4={},_0x3e384={},_0x2f4d34={'count':0x0,'rows':[]};var _0x53c8b4=_[_0x1c87('0x28')](db[_0x1c87('0x29')][_0x1c87('0x2a')],function(_0x47a510){return{'name':_0x47a510[_0x1c87('0x2b')],'type':_0x47a510[_0x1c87('0x2c')][_0x1c87('0x2d')]};});_0x3e384['model']=_[_0x1c87('0x28')](_0x53c8b4,_0x1c87('0x26'));_0x3e384[_0x1c87('0x2e')]=_['keys'](_0x127e78[_0x1c87('0x2e')]);_0x3e384['filters']=_[_0x1c87('0x2f')](_0x3e384[_0x1c87('0x30')],_0x3e384[_0x1c87('0x2e')]);_0x2720c4[_0x1c87('0x31')]=_[_0x1c87('0x2f')](_0x3e384[_0x1c87('0x30')],qs[_0x1c87('0x32')](_0x127e78[_0x1c87('0x2e')][_0x1c87('0x32')]));_0x2720c4[_0x1c87('0x31')]=_0x2720c4[_0x1c87('0x31')][_0x1c87('0x33')]?_0x2720c4[_0x1c87('0x31')]:_0x3e384[_0x1c87('0x30')];if(!_0x127e78[_0x1c87('0x2e')][_0x1c87('0x34')](_0x1c87('0x35'))){_0x2720c4[_0x1c87('0x19')]=qs['limit'](_0x127e78[_0x1c87('0x2e')][_0x1c87('0x19')]);_0x2720c4[_0x1c87('0x17')]=qs[_0x1c87('0x17')](_0x127e78[_0x1c87('0x2e')][_0x1c87('0x17')]);}_0x2720c4[_0x1c87('0x36')]=qs[_0x1c87('0x37')](_0x127e78[_0x1c87('0x2e')][_0x1c87('0x37')]);_0x2720c4[_0x1c87('0x38')]=qs['filters'](_[_0x1c87('0x39')](_0x127e78['query'],_0x3e384[_0x1c87('0x3a')]),_0x53c8b4);if(_0x127e78['query'][_0x1c87('0x3b')]){_0x2720c4[_0x1c87('0x38')]=_['merge'](_0x2720c4[_0x1c87('0x38')],{'$or':_[_0x1c87('0x28')](_0x53c8b4,function(_0x520fa0){if(_0x520fa0[_0x1c87('0x2c')]!==_0x1c87('0x3c')){var _0x1efe75={};_0x1efe75[_0x520fa0[_0x1c87('0x26')]]={'$like':'%'+_0x127e78[_0x1c87('0x2e')][_0x1c87('0x3b')]+'%'};return _0x1efe75;}})});}_0x2720c4=_[_0x1c87('0x3d')]({},_0x2720c4,_0x127e78[_0x1c87('0x3e')]);var _0x3167e3={'where':_0x2720c4[_0x1c87('0x38')]};return db['SmsApplication'][_0x1c87('0x1a')](_0x3167e3)[_0x1c87('0x21')](function(_0x196470){_0x2f4d34['count']=_0x196470;if(_0x127e78[_0x1c87('0x2e')]['includeAll']){_0x2720c4[_0x1c87('0x3f')]=[{'all':!![]}];}return db[_0x1c87('0x29')]['findAll'](_0x2720c4);})[_0x1c87('0x21')](function(_0x19a4ec){_0x2f4d34[_0x1c87('0x40')]=_0x19a4ec;return _0x2f4d34;})[_0x1c87('0x21')](respondWithFilteredResult(_0x4d58c8,_0x2720c4))[_0x1c87('0x41')](handleError(_0x4d58c8,null));};exports[_0x1c87('0x42')]=function(_0x53c782,_0x25ba66){var _0x133c02={'raw':!![],'where':{'id':_0x53c782['params']['id']}},_0x4a6296={};_0x4a6296['model']=_[_0x1c87('0x43')](db[_0x1c87('0x29')][_0x1c87('0x2a')]);_0x4a6296['query']=_['keys'](_0x53c782['query']);_0x4a6296[_0x1c87('0x3a')]=_[_0x1c87('0x2f')](_0x4a6296[_0x1c87('0x30')],_0x4a6296[_0x1c87('0x2e')]);_0x133c02[_0x1c87('0x31')]=_[_0x1c87('0x2f')](_0x4a6296['model'],qs[_0x1c87('0x32')](_0x53c782[_0x1c87('0x2e')][_0x1c87('0x32')]));_0x133c02[_0x1c87('0x31')]=_0x133c02[_0x1c87('0x31')][_0x1c87('0x33')]?_0x133c02[_0x1c87('0x31')]:_0x4a6296[_0x1c87('0x30')];if(_0x53c782[_0x1c87('0x2e')][_0x1c87('0x44')]){_0x133c02[_0x1c87('0x3f')]=[{'all':!![]}];}_0x133c02=_[_0x1c87('0x3d')]({},_0x133c02,_0x53c782[_0x1c87('0x3e')]);return db['SmsApplication'][_0x1c87('0x45')](_0x133c02)['then'](handleEntityNotFound(_0x25ba66,null))[_0x1c87('0x21')](respondWithResult(_0x25ba66,null))[_0x1c87('0x41')](handleError(_0x25ba66,null));};exports[_0x1c87('0x46')]=function(_0x5a7993,_0x201361){return db[_0x1c87('0x29')][_0x1c87('0x46')](_0x5a7993[_0x1c87('0x47')],{})['then'](respondWithResult(_0x201361,0xc9))[_0x1c87('0x41')](handleError(_0x201361,null));};exports[_0x1c87('0x20')]=function(_0x1e82df,_0x2abcba){if(_0x1e82df[_0x1c87('0x47')]['id']){delete _0x1e82df['body']['id'];}return db[_0x1c87('0x29')][_0x1c87('0x45')]({'where':{'id':_0x1e82df[_0x1c87('0x48')]['id']}})['then'](handleEntityNotFound(_0x2abcba,null))['then'](saveUpdates(_0x1e82df[_0x1c87('0x47')],null))[_0x1c87('0x21')](respondWithResult(_0x2abcba,null))[_0x1c87('0x41')](handleError(_0x2abcba,null));};exports['destroy']=function(_0x566ad9,_0x260963){return db[_0x1c87('0x29')][_0x1c87('0x45')]({'where':{'id':_0x566ad9[_0x1c87('0x48')]['id']}})[_0x1c87('0x21')](handleEntityNotFound(_0x260963,null))[_0x1c87('0x21')](removeEntity(_0x260963,null))[_0x1c87('0x41')](handleError(_0x260963,null));};
\ No newline at end of file
index 9b1cf59..8478a6a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3077=['moment','request-promise','./smsApplication.attributes','exports','define','sms_applications','lodash','util'];(function(_0x29d94e,_0xf386d6){var _0x106237=function(_0x327501){while(--_0x327501){_0x29d94e['push'](_0x29d94e['shift']());}};_0x106237(++_0xf386d6);}(_0x3077,0xe6));var _0x7307=function(_0x54d4fe,_0x55e869){_0x54d4fe=_0x54d4fe-0x0;var _0x1ab5bb=_0x3077[_0x54d4fe];return _0x1ab5bb;};'use strict';var _=require(_0x7307('0x0'));var util=require(_0x7307('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x7307('0x2'));var BPromise=require('bluebird');var rp=require(_0x7307('0x3'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x7307('0x4'));module[_0x7307('0x5')]=function(_0x3c60f8,_0x1287e7){return _0x3c60f8[_0x7307('0x6')]('SmsApplication',attributes,{'tableName':_0x7307('0x7'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':'utf8mb4','collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x91f8=['define','sms_applications','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./smsApplication.attributes','exports'];(function(_0x31c480,_0x13f64a){var _0x3687ce=function(_0x46fbc0){while(--_0x46fbc0){_0x31c480['push'](_0x31c480['shift']());}};_0x3687ce(++_0x13f64a);}(_0x91f8,0x13f));var _0x891f=function(_0x435b2f,_0x4c44da){_0x435b2f=_0x435b2f-0x0;var _0x181648=_0x91f8[_0x435b2f];return _0x181648;};'use strict';var _=require(_0x891f('0x0'));var util=require(_0x891f('0x1'));var logger=require(_0x891f('0x2'))(_0x891f('0x3'));var moment=require(_0x891f('0x4'));var BPromise=require(_0x891f('0x5'));var rp=require(_0x891f('0x6'));var fs=require('fs');var path=require(_0x891f('0x7'));var rimraf=require('rimraf');var config=require(_0x891f('0x8'));var attributes=require(_0x891f('0x9'));module[_0x891f('0xa')]=function(_0x892594,_0x59a2e4){return _0x892594[_0x891f('0xb')]('SmsApplication',attributes,{'tableName':_0x891f('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x891f('0xd'),'collate':_0x891f('0xe')});};
\ No newline at end of file
index 1f8dc03..54f4065 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x49f8=['message','result','catch','lodash','bluebird','randomstring','../../mysqldb','../../config/logger','../../config/environment','client','http','info','SmsApplication,\x20%s,\x20%s','request\x20sent','debug','SmsApplication,\x20%s,\x20%s,\x20%s','error','code'];(function(_0x5ddc7d,_0x3ecbfb){var _0x50ce0e=function(_0x49ad52){while(--_0x49ad52){_0x5ddc7d['push'](_0x5ddc7d['shift']());}};_0x50ce0e(++_0x3ecbfb);}(_0x49f8,0xff));var _0x849f=function(_0x207061,_0xe38cda){_0x207061=_0x207061-0x0;var _0x4a2833=_0x49f8[_0x207061];return _0x4a2833;};'use strict';var _=require(_0x849f('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x849f('0x1'));var rs=require(_0x849f('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x849f('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0x849f('0x4'))('rpc');var config=require(_0x849f('0x5'));var jayson=require('jayson/promise');var client=jayson[_0x849f('0x6')][_0x849f('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x21f577,_0xb4c798,_0x33b630){return new BPromise(function(_0xc6443e,_0x565438){return client['request'](_0x21f577,_0x33b630)['then'](function(_0x306c11){logger[_0x849f('0x8')](_0x849f('0x9'),_0xb4c798,_0x849f('0xa'));logger[_0x849f('0xb')](_0x849f('0xc'),_0xb4c798,_0x849f('0xa'),JSON['stringify'](_0x306c11));if(_0x306c11[_0x849f('0xd')]){if(_0x306c11['error'][_0x849f('0xe')]===0x1f4){logger[_0x849f('0xd')](_0x849f('0x9'),_0xb4c798,_0x306c11[_0x849f('0xd')]['message']);return _0x565438(_0x306c11[_0x849f('0xd')][_0x849f('0xf')]);}logger[_0x849f('0xd')](_0x849f('0x9'),_0xb4c798,_0x306c11[_0x849f('0xd')]['message']);return _0xc6443e(_0x306c11['error'][_0x849f('0xf')]);}else{logger['info'](_0x849f('0x9'),_0xb4c798,_0x849f('0xa'));_0xc6443e(_0x306c11[_0x849f('0x10')][_0x849f('0xf')]);}})[_0x849f('0x11')](function(_0x19ba28){logger[_0x849f('0xd')]('SmsApplication,\x20%s,\x20%s',_0xb4c798,_0x19ba28);_0x565438(_0x19ba28);});});}
\ No newline at end of file
+var _0x61d0=['http','then','info','SmsApplication,\x20%s,\x20%s','debug','SmsApplication,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','lodash','moment','bluebird','ioredis','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client'];(function(_0x29ccaf,_0x2f2df3){var _0x2b0431=function(_0xb1bbd4){while(--_0xb1bbd4){_0x29ccaf['push'](_0x29ccaf['shift']());}};_0x2b0431(++_0x2f2df3);}(_0x61d0,0x187));var _0x061d=function(_0x2df4cc,_0x1233c6){_0x2df4cc=_0x2df4cc-0x0;var _0x40af8d=_0x61d0[_0x2df4cc];return _0x40af8d;};'use strict';var _=require(_0x061d('0x0'));var util=require('util');var moment=require(_0x061d('0x1'));var BPromise=require(_0x061d('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x061d('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x061d('0x4'));var logger=require(_0x061d('0x5'))('rpc');var config=require(_0x061d('0x6'));var jayson=require(_0x061d('0x7'));var client=jayson[_0x061d('0x8')][_0x061d('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x1edb0c,_0x476cbf,_0x362bdd){return new BPromise(function(_0x572b0e,_0x4b6606){return client['request'](_0x1edb0c,_0x362bdd)[_0x061d('0xa')](function(_0x5d5a4b){logger[_0x061d('0xb')](_0x061d('0xc'),_0x476cbf,'request\x20sent');logger[_0x061d('0xd')](_0x061d('0xe'),_0x476cbf,_0x061d('0xf'),JSON[_0x061d('0x10')](_0x5d5a4b));if(_0x5d5a4b[_0x061d('0x11')]){if(_0x5d5a4b[_0x061d('0x11')][_0x061d('0x12')]===0x1f4){logger['error'](_0x061d('0xc'),_0x476cbf,_0x5d5a4b[_0x061d('0x11')][_0x061d('0x13')]);return _0x4b6606(_0x5d5a4b[_0x061d('0x11')][_0x061d('0x13')]);}logger[_0x061d('0x11')](_0x061d('0xc'),_0x476cbf,_0x5d5a4b[_0x061d('0x11')][_0x061d('0x13')]);return _0x572b0e(_0x5d5a4b[_0x061d('0x11')]['message']);}else{logger[_0x061d('0xb')](_0x061d('0xc'),_0x476cbf,_0x061d('0xf'));_0x572b0e(_0x5d5a4b['result'][_0x061d('0x13')]);}})['catch'](function(_0x571fa8){logger[_0x061d('0x11')](_0x061d('0xc'),_0x476cbf,_0x571fa8);_0x4b6606(_0x571fa8);});});}
\ No newline at end of file
index 138b00a..898d1be 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9ffd=['sms','smsinteraction:addtags','put','smsinteraction:update','delete','tracked','smsinteraction:destroy','destroy','removeTags','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../config/environment','./smsInteraction.controller','isAuthenticated','index','get','/describe','describe','/:id','getMessages','/:id/download','download','post','create','addMessage','/:id/tags'];(function(_0x35825e,_0x657421){var _0x4f4d90=function(_0x160265){while(--_0x160265){_0x35825e['push'](_0x35825e['shift']());}};_0x4f4d90(++_0x657421);}(_0x9ffd,0xaa));var _0xd9ff=function(_0x262dff,_0x1a216c){_0x262dff=_0x262dff-0x0;var _0x1aec82=_0x9ffd[_0x262dff];return _0x1aec82;};'use strict';var multer=require(_0xd9ff('0x0'));var util=require(_0xd9ff('0x1'));var path=require(_0xd9ff('0x2'));var timeout=require('connect-timeout');var express=require(_0xd9ff('0x3'));var router=express[_0xd9ff('0x4')]();var fs_extra=require(_0xd9ff('0x5'));var auth=require(_0xd9ff('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0xd9ff('0x7'));var controller=require(_0xd9ff('0x8'));router['get']('/',auth[_0xd9ff('0x9')](),controller[_0xd9ff('0xa')]);router[_0xd9ff('0xb')](_0xd9ff('0xc'),auth[_0xd9ff('0x9')](),controller[_0xd9ff('0xd')]);router[_0xd9ff('0xb')](_0xd9ff('0xe'),auth[_0xd9ff('0x9')](),controller['show']);router['get']('/:id/messages',auth['isAuthenticated'](),controller[_0xd9ff('0xf')]);router[_0xd9ff('0xb')](_0xd9ff('0x10'),auth[_0xd9ff('0x9')](),controller[_0xd9ff('0x11')]);router[_0xd9ff('0x12')]('/',auth[_0xd9ff('0x9')](),controller[_0xd9ff('0x13')]);router['post']('/:id/messages',auth[_0xd9ff('0x9')](),controller[_0xd9ff('0x14')]);router[_0xd9ff('0x12')](_0xd9ff('0x15'),auth[_0xd9ff('0x9')](),interaction['tracked'](_0xd9ff('0x16'),_0xd9ff('0x17')),controller['addTags']);router[_0xd9ff('0x18')]('/:id',auth['isAuthenticated'](),interaction['tracked']('sms',_0xd9ff('0x19')),controller['update']);router[_0xd9ff('0x1a')](_0xd9ff('0xe'),auth[_0xd9ff('0x9')](),interaction[_0xd9ff('0x1b')](_0xd9ff('0x16'),_0xd9ff('0x1c')),controller[_0xd9ff('0x1d')]);router[_0xd9ff('0x1a')](_0xd9ff('0x15'),auth[_0xd9ff('0x9')](),controller[_0xd9ff('0x1e')]);module[_0xd9ff('0x1f')]=router;
\ No newline at end of file
+var _0x4fc2=['removeTags','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../config/environment','./smsInteraction.controller','isAuthenticated','index','/describe','describe','get','/:id','/:id/messages','getMessages','/:id/download','download','create','addMessage','post','/:id/tags','sms','smsinteraction:addtags','addTags','put','smsinteraction:update','update','delete','tracked','smsinteraction:destroy','destroy'];(function(_0x477db7,_0xaab0bd){var _0x46963c=function(_0x22470c){while(--_0x22470c){_0x477db7['push'](_0x477db7['shift']());}};_0x46963c(++_0xaab0bd);}(_0x4fc2,0x111));var _0x24fc=function(_0x329cde,_0x1d23b7){_0x329cde=_0x329cde-0x0;var _0x29cb1c=_0x4fc2[_0x329cde];return _0x29cb1c;};'use strict';var multer=require(_0x24fc('0x0'));var util=require(_0x24fc('0x1'));var path=require(_0x24fc('0x2'));var timeout=require(_0x24fc('0x3'));var express=require('express');var router=express[_0x24fc('0x4')]();var fs_extra=require(_0x24fc('0x5'));var auth=require(_0x24fc('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x24fc('0x7'));var controller=require(_0x24fc('0x8'));router['get']('/',auth[_0x24fc('0x9')](),controller[_0x24fc('0xa')]);router['get'](_0x24fc('0xb'),auth[_0x24fc('0x9')](),controller[_0x24fc('0xc')]);router[_0x24fc('0xd')](_0x24fc('0xe'),auth[_0x24fc('0x9')](),controller['show']);router[_0x24fc('0xd')](_0x24fc('0xf'),auth[_0x24fc('0x9')](),controller[_0x24fc('0x10')]);router[_0x24fc('0xd')](_0x24fc('0x11'),auth[_0x24fc('0x9')](),controller[_0x24fc('0x12')]);router['post']('/',auth[_0x24fc('0x9')](),controller[_0x24fc('0x13')]);router['post'](_0x24fc('0xf'),auth[_0x24fc('0x9')](),controller[_0x24fc('0x14')]);router[_0x24fc('0x15')](_0x24fc('0x16'),auth[_0x24fc('0x9')](),interaction['tracked'](_0x24fc('0x17'),_0x24fc('0x18')),controller[_0x24fc('0x19')]);router[_0x24fc('0x1a')]('/:id',auth[_0x24fc('0x9')](),interaction['tracked'](_0x24fc('0x17'),_0x24fc('0x1b')),controller[_0x24fc('0x1c')]);router[_0x24fc('0x1d')](_0x24fc('0xe'),auth['isAuthenticated'](),interaction[_0x24fc('0x1e')](_0x24fc('0x17'),_0x24fc('0x1f')),controller[_0x24fc('0x20')]);router['delete'](_0x24fc('0x16'),auth[_0x24fc('0x9')](),controller[_0x24fc('0x21')]);module['exports']=router;
\ No newline at end of file
index eb5e34b..2ecff50 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3f72=['DATE','out','BOOLEAN','INTEGER','sequelize','moment','exports','STRING','ENUM'];(function(_0x30f5e7,_0x4af375){var _0x59f279=function(_0x264d7e){while(--_0x264d7e){_0x30f5e7['push'](_0x30f5e7['shift']());}};_0x59f279(++_0x4af375);}(_0x3f72,0xaf));var _0x23f7=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x3f72[_0x2dafbe];return _0x58a45a;};'use strict';var Sequelize=require(_0x23f7('0x0'));var moment=require(_0x23f7('0x1'));module[_0x23f7('0x2')]={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0x23f7('0x3')]},'secondDisposition':{'type':Sequelize[_0x23f7('0x3')]},'thirdDisposition':{'type':Sequelize[_0x23f7('0x3')]},'note':{'type':Sequelize[_0x23f7('0x3')]},'phone':{'type':Sequelize[_0x23f7('0x3')]},'read1stAt':{'type':Sequelize['DATE']},'firstMsgDirection':{'type':Sequelize[_0x23f7('0x4')]('in','out'),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x23f7('0x5')]},'lastMsgDirection':{'type':Sequelize['ENUM']('in',_0x23f7('0x6')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0x23f7('0x7')],'defaultValue':![]},'queueId':{'type':Sequelize[_0x23f7('0x8')]}};
\ No newline at end of file
+var _0xf682=['BOOLEAN','STRING','ENUM','out','DATE','INTEGER','sequelize','moment','exports'];(function(_0xd8a8af,_0x1e93f0){var _0x5b7278=function(_0x458800){while(--_0x458800){_0xd8a8af['push'](_0xd8a8af['shift']());}};_0x5b7278(++_0x1e93f0);}(_0xf682,0x12f));var _0x2f68=function(_0xc94dce,_0x375f40){_0xc94dce=_0xc94dce-0x0;var _0x586b74=_0xf682[_0xc94dce];return _0x586b74;};'use strict';var Sequelize=require(_0x2f68('0x0'));var moment=require(_0x2f68('0x1'));module[_0x2f68('0x2')]={'closed':{'type':Sequelize[_0x2f68('0x3')],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize[_0x2f68('0x4')]},'thirdDisposition':{'type':Sequelize[_0x2f68('0x4')]},'note':{'type':Sequelize[_0x2f68('0x4')]},'phone':{'type':Sequelize[_0x2f68('0x4')]},'read1stAt':{'type':Sequelize['DATE']},'firstMsgDirection':{'type':Sequelize[_0x2f68('0x5')]('in',_0x2f68('0x6')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x2f68('0x7')]},'lastMsgDirection':{'type':Sequelize[_0x2f68('0x5')]('in','out'),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0x2f68('0x3')],'defaultValue':![]},'queueId':{'type':Sequelize[_0x2f68('0x8')]}};
\ No newline at end of file
index 663ecf7..3dc4697 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd3ea=['Contact','firstName','lastName','Messages','direction','secret','read','SmsAccount','Owner','get','Sms','Account','createdAt','closed','closedAt','toString','map','System','out','value','views','downloadInteraction.ejs','transcript-','.pdf','createPdfFromHTML','log','zip-dir','moment','path','ejs','lodash','ioredis','../../components/interaction/service','../../components/parsers/qs','../../components/export/pdf','../../config/logger','api','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./smsInteraction.socket','register','sendStatus','status','json','undefined','limit','count','offset','set','Content-Range','then','destroy','error','name','send','index','SmsInteraction','type','key','getOptions','findAll','sms','query','user','model','keys','rawAttributes','filters','intersection','attributes','includeAll','include','merge','options','find','catch','create','body','update','params','describe','addMessage','SmsMessage','ids','omit','getMessages','findOne','fields','hasOwnProperty','nolimit','order','where','SmsInteractionId','filter','split','format','YYYY-MM-DD\x20HH:mm:ss','rows','addTags','setTags','spread','Tag','emit','smsInteractionTags:save','removeTags','download','unix','root','server','files','tmp','join','push','User','fullname','CmContact'];(function(_0x158965,_0x117f97){var _0x3a3e9d=function(_0x1ee22b){while(--_0x1ee22b){_0x158965['push'](_0x158965['shift']());}};_0x3a3e9d(++_0x117f97);}(_0xd3ea,0x91));var _0xad3e=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0xd3ea[_0x6c993a];return _0x27f547;};'use strict';var rimraf=require('rimraf');var zipdir=require(_0xad3e('0x0'));var moment=require(_0xad3e('0x1'));var BPromise=require('bluebird');var util=require('util');var path=require(_0xad3e('0x2'));var ejs=require(_0xad3e('0x3'));var fs=require('fs');var _=require(_0xad3e('0x4'));var Redis=require(_0xad3e('0x5'));var interaction=require(_0xad3e('0x6'));var qs=require(_0xad3e('0x7'));var pdf=require(_0xad3e('0x8'));var logger=require(_0xad3e('0x9'))(_0xad3e('0xa'));var config=require('../../config/environment');var db=require(_0xad3e('0xb'))['db'];config[_0xad3e('0xc')]=_[_0xad3e('0xd')](config[_0xad3e('0xc')],{'host':_0xad3e('0xe'),'port':0x18eb});var socket=require(_0xad3e('0xf'))(new Redis(config[_0xad3e('0xc')]));require(_0xad3e('0x10'))[_0xad3e('0x11')](socket);function respondWithStatusCode(_0x15fbb7,_0x10666f){_0x10666f=_0x10666f||0xcc;return function(_0x5bceef){if(_0x5bceef){return _0x15fbb7[_0xad3e('0x12')](_0x10666f);}return _0x15fbb7[_0xad3e('0x13')](_0x10666f)['end']();};}function respondWithResult(_0x5e7570,_0x564118){_0x564118=_0x564118||0xc8;return function(_0x2262ec){if(_0x2262ec){return _0x5e7570[_0xad3e('0x13')](_0x564118)[_0xad3e('0x14')](_0x2262ec);}};}function respondWithFilteredResult(_0x26ffdf,_0x265339){return function(_0x7a83d0){if(_0x7a83d0){var _0x4408d0=typeof _0x265339['offset']===_0xad3e('0x15')&&typeof _0x265339[_0xad3e('0x16')]===_0xad3e('0x15');var _0x2ff98e=_0x7a83d0[_0xad3e('0x17')];var _0x3bf160=_0x4408d0?0x0:_0x265339[_0xad3e('0x18')];var _0x1382c2=_0x4408d0?_0x7a83d0[_0xad3e('0x17')]:_0x265339[_0xad3e('0x18')]+_0x265339[_0xad3e('0x16')];var _0x3e8560;if(_0x1382c2>=_0x2ff98e){_0x1382c2=_0x2ff98e;_0x3e8560=0xc8;}else{_0x3e8560=0xce;}_0x26ffdf[_0xad3e('0x13')](_0x3e8560);return _0x26ffdf[_0xad3e('0x19')](_0xad3e('0x1a'),_0x3bf160+'-'+_0x1382c2+'/'+_0x2ff98e)[_0xad3e('0x14')](_0x7a83d0);}return null;};}function saveUpdates(_0x4961aa){return function(_0xcbf938){if(_0xcbf938){return _0xcbf938['update'](_0x4961aa)[_0xad3e('0x1b')](function(_0x306e87){return _0x306e87;});}return null;};}function removeEntity(_0x3ea8ea){return function(_0x212519){if(_0x212519){return _0x212519[_0xad3e('0x1c')]()['then'](function(){_0x3ea8ea[_0xad3e('0x13')](0xcc)['end']();});}};}function handleEntityNotFound(_0x588b8c){return function(_0x5b7fd4){if(!_0x5b7fd4){_0x588b8c[_0xad3e('0x12')](0x194);}return _0x5b7fd4;};}function handleError(_0x322473,_0x1aa4b2){_0x1aa4b2=_0x1aa4b2||0x1f4;return function(_0x503d8d){logger[_0xad3e('0x1d')](_0x503d8d['stack']);if(_0x503d8d[_0xad3e('0x1e')]){delete _0x503d8d[_0xad3e('0x1e')];}_0x322473['status'](_0x1aa4b2)[_0xad3e('0x1f')](_0x503d8d);};}exports[_0xad3e('0x20')]=function(_0x11c076,_0x537479){var _0x125d06={};var _0x406ad9=_['map'](db[_0xad3e('0x21')]['rawAttributes'],function(_0x5092d7){return{'name':_0x5092d7['fieldName'],'type':_0x5092d7[_0xad3e('0x22')][_0xad3e('0x23')]};});_0x125d06=qs[_0xad3e('0x24')](_0x406ad9,_0x11c076);return interaction[_0xad3e('0x25')](_0xad3e('0x26'),_0x11c076[_0xad3e('0x27')],_0x11c076[_0xad3e('0x28')],_0x125d06,_0x406ad9)[_0xad3e('0x1b')](respondWithFilteredResult(_0x537479,_0x125d06))['catch'](handleError(_0x537479,null));};exports['show']=function(_0x136b41,_0x146223){var _0x5d5f64={'raw':![],'where':{'id':_0x136b41['params']['id']}},_0x362d96={};_0x362d96[_0xad3e('0x29')]=_[_0xad3e('0x2a')](db['SmsInteraction'][_0xad3e('0x2b')]);_0x362d96[_0xad3e('0x27')]=_[_0xad3e('0x2a')](_0x136b41[_0xad3e('0x27')]);_0x362d96[_0xad3e('0x2c')]=_[_0xad3e('0x2d')](_0x362d96['model'],_0x362d96['query']);_0x5d5f64[_0xad3e('0x2e')]=_[_0xad3e('0x2d')](_0x362d96[_0xad3e('0x29')],qs['fields'](_0x136b41[_0xad3e('0x27')]['fields']));_0x5d5f64[_0xad3e('0x2e')]=_0x5d5f64[_0xad3e('0x2e')]['length']?_0x5d5f64['attributes']:_0x362d96[_0xad3e('0x29')];if(_0x136b41[_0xad3e('0x27')][_0xad3e('0x2f')]){_0x5d5f64[_0xad3e('0x30')]=[{'all':!![]}];}_0x5d5f64=_[_0xad3e('0x31')]({},_0x5d5f64,_0x136b41[_0xad3e('0x32')]);return db[_0xad3e('0x21')][_0xad3e('0x33')](_0x5d5f64)[_0xad3e('0x1b')](handleEntityNotFound(_0x146223,null))['then'](respondWithResult(_0x146223,null))[_0xad3e('0x34')](handleError(_0x146223,null));};exports[_0xad3e('0x35')]=function(_0x4a7c50,_0x49ebc9){return db[_0xad3e('0x21')][_0xad3e('0x35')](_0x4a7c50[_0xad3e('0x36')],{})[_0xad3e('0x1b')](respondWithResult(_0x49ebc9,0xc9))[_0xad3e('0x34')](handleError(_0x49ebc9,null));};exports[_0xad3e('0x37')]=function(_0x1ea0c6,_0x39d582){if(_0x1ea0c6['body']['id']){delete _0x1ea0c6[_0xad3e('0x36')]['id'];}return db['SmsInteraction']['find']({'where':{'id':_0x1ea0c6[_0xad3e('0x38')]['id']}})[_0xad3e('0x1b')](handleEntityNotFound(_0x39d582,null))[_0xad3e('0x1b')](saveUpdates(_0x1ea0c6[_0xad3e('0x36')],null))[_0xad3e('0x1b')](respondWithResult(_0x39d582,null))['catch'](handleError(_0x39d582,null));};exports[_0xad3e('0x1c')]=function(_0x2f105f,_0x5ee6e0){return db[_0xad3e('0x21')][_0xad3e('0x33')]({'where':{'id':_0x2f105f[_0xad3e('0x38')]['id']}})[_0xad3e('0x1b')](handleEntityNotFound(_0x5ee6e0,null))[_0xad3e('0x1b')](removeEntity(_0x5ee6e0,null))[_0xad3e('0x34')](handleError(_0x5ee6e0,null));};exports[_0xad3e('0x39')]=function(_0x4abf94,_0x28c5a1){return db[_0xad3e('0x21')][_0xad3e('0x39')]()[_0xad3e('0x1b')](respondWithResult(_0x28c5a1,null))[_0xad3e('0x34')](handleError(_0x28c5a1,null));};exports[_0xad3e('0x3a')]=function(_0x32b570,_0xc09eff){return db[_0xad3e('0x3b')]['find']({'where':{'id':_0x32b570[_0xad3e('0x38')]['id']}})[_0xad3e('0x1b')](handleEntityNotFound(_0xc09eff,null))[_0xad3e('0x1b')](function(_0x42598c){if(_0x42598c){return _0x42598c[_0xad3e('0x3a')](_0x32b570[_0xad3e('0x36')][_0xad3e('0x3c')],_[_0xad3e('0x3d')](_0x32b570[_0xad3e('0x36')],[_0xad3e('0x3c'),'id'])||{});}})[_0xad3e('0x1b')](respondWithResult(_0xc09eff,null))[_0xad3e('0x34')](handleError(_0xc09eff,null));};exports[_0xad3e('0x3e')]=function(_0x3e7738,_0x1a1b7a){var _0x2d576e={'raw':![],'where':{}};var _0xfb0eb5={};var _0x31ea32={'count':0x0,'rows':[]};return db[_0xad3e('0x21')][_0xad3e('0x3f')]({'where':{'id':_0x3e7738[_0xad3e('0x38')]['id']}})['then'](handleEntityNotFound(_0x1a1b7a,null))[_0xad3e('0x1b')](function(_0x2e4b43){if(_0x2e4b43){_0xfb0eb5[_0xad3e('0x29')]=_[_0xad3e('0x2a')](db[_0xad3e('0x3b')][_0xad3e('0x2b')]);_0xfb0eb5['query']=_['keys'](_0x3e7738[_0xad3e('0x27')]);_0xfb0eb5['filters']=_[_0xad3e('0x2d')](_0xfb0eb5[_0xad3e('0x29')],_0xfb0eb5[_0xad3e('0x27')]);_0x2d576e[_0xad3e('0x2e')]=_[_0xad3e('0x2d')](_0xfb0eb5[_0xad3e('0x29')],qs[_0xad3e('0x40')](_0x3e7738['query'][_0xad3e('0x40')]));_0x2d576e['attributes']=_0x2d576e[_0xad3e('0x2e')]['length']?_0x2d576e['attributes']:_0xfb0eb5[_0xad3e('0x29')];if(!_0x3e7738['query'][_0xad3e('0x41')](_0xad3e('0x42'))){_0x2d576e[_0xad3e('0x16')]=qs['limit'](_0x3e7738['query']['limit']);_0x2d576e['offset']=qs[_0xad3e('0x18')](_0x3e7738['query']['offset']);}_0x2d576e[_0xad3e('0x43')]=qs['sort'](_0x3e7738[_0xad3e('0x27')]['sort']);_0x2d576e['where']=qs['filters'](_['pick'](_0x3e7738[_0xad3e('0x27')],_0xfb0eb5[_0xad3e('0x2c')]));_0x2d576e[_0xad3e('0x44')][_0xad3e('0x45')]=_0x2e4b43['id'];if(_0x3e7738[_0xad3e('0x27')]['filter']){_0x2d576e[_0xad3e('0x44')]=_[_0xad3e('0x31')](_0x2d576e[_0xad3e('0x44')],{'$or':_['map'](_0x2d576e[_0xad3e('0x2e')],function(_0x3a816e){var _0x1c88e1={};_0x1c88e1[_0x3a816e]={'$like':'%'+_0x3e7738[_0xad3e('0x27')][_0xad3e('0x46')]+'%'};return _0x1c88e1;})});}if(_0x3e7738[_0xad3e('0x27')]['$gte']){var _0x277fd6=_0x3e7738['query']['$gte'][_0xad3e('0x47')](',');var _0x3cb3f7={};_0x3cb3f7[_0x277fd6[0x0]]={'$gte':moment(_0x277fd6[0x1])[_0xad3e('0x48')](_0xad3e('0x49'))};_0x2d576e[_0xad3e('0x44')]=_[_0xad3e('0x31')](_0x2d576e[_0xad3e('0x44')],_0x3cb3f7);}_0x2d576e=_['merge']({},_0x2d576e,_0x3e7738[_0xad3e('0x32')]);return db['SmsMessage'][_0xad3e('0x17')]({'where':_0x2d576e['where']})['then'](function(_0x4965ee){_0x31ea32['count']=_0x4965ee;if(_0x3e7738[_0xad3e('0x27')][_0xad3e('0x2f')]){_0x2d576e['include']=[{'all':!![]}];}return db[_0xad3e('0x3b')]['findAll'](_0x2d576e);})[_0xad3e('0x1b')](function(_0x16132d){_0x31ea32[_0xad3e('0x4a')]=_0x16132d;return _0x31ea32;});}})[_0xad3e('0x1b')](respondWithFilteredResult(_0x1a1b7a,_0x2d576e))[_0xad3e('0x34')](handleError(_0x1a1b7a,null));};exports[_0xad3e('0x4b')]=function(_0x27d4ec,_0xf96faa){return db[_0xad3e('0x21')][_0xad3e('0x33')]({'where':{'id':_0x27d4ec[_0xad3e('0x38')]['id']}})[_0xad3e('0x1b')](handleEntityNotFound(_0xf96faa,null))['then'](function(_0x5e83c5){if(_0x5e83c5){return _0x5e83c5[_0xad3e('0x4c')](_0x27d4ec[_0xad3e('0x36')][_0xad3e('0x3c')],_[_0xad3e('0x3d')](_0x27d4ec[_0xad3e('0x36')],[_0xad3e('0x3c'),'id'])||{})[_0xad3e('0x4d')](function(){return db[_0xad3e('0x4e')][_0xad3e('0x25')]({'attributes':['id',_0xad3e('0x1e'),'color'],'where':{'id':_0x27d4ec[_0xad3e('0x36')][_0xad3e('0x3c')]}});})[_0xad3e('0x1b')](function(_0x4b2920){socket[_0xad3e('0x4f')](_0xad3e('0x50'),{'id':Number(_0x27d4ec[_0xad3e('0x38')]['id']),'tags':_0x4b2920||[]});return{'id':Number(_0x27d4ec[_0xad3e('0x38')]['id']),'tags':_0x4b2920||[]};});}})[_0xad3e('0x1b')](respondWithResult(_0xf96faa,null))[_0xad3e('0x34')](handleError(_0xf96faa,null));};exports[_0xad3e('0x51')]=function(_0x23e1bb,_0x446cb3){return db[_0xad3e('0x21')][_0xad3e('0x33')]({'where':{'id':_0x23e1bb[_0xad3e('0x38')]['id']}})[_0xad3e('0x1b')](handleEntityNotFound(_0x446cb3,null))['then'](function(_0x1952ad){if(_0x1952ad){return _0x1952ad[_0xad3e('0x51')](_0x23e1bb['query']['ids']);}})[_0xad3e('0x1b')](respondWithStatusCode(_0x446cb3,null))[_0xad3e('0x34')](handleError(_0x446cb3,null));};exports[_0xad3e('0x52')]=function(_0x283cae,_0x40d546){var _0x4b105a=moment()[_0xad3e('0x53')]()['toString']();var _0x4b9aa4=path['join'](config[_0xad3e('0x54')],_0xad3e('0x55'),_0xad3e('0x56'),_0xad3e('0x57'));var _0x2eadfa=path[_0xad3e('0x58')](_0x4b9aa4,_0x4b105a);var _0x5b451a=util[_0xad3e('0x48')]('transcript-%d-%s.zip',_0x283cae[_0xad3e('0x38')]['id'],_0x4b105a);var _0x367509=path['join'](_0x4b9aa4,_0x5b451a);var _0x54bed5=[];_0x54bed5[_0xad3e('0x59')]({'model':db[_0xad3e('0x5a')],'as':'User','attributes':['id',_0xad3e('0x5b')],'raw':!![]});_0x54bed5['push']({'model':db[_0xad3e('0x5c')],'as':_0xad3e('0x5d'),'attributes':['id',_0xad3e('0x5e'),_0xad3e('0x5f')],'raw':!![]});var _0xb1900=[{'model':db[_0xad3e('0x3b')],'as':_0xad3e('0x60'),'attributes':['id',_0xad3e('0x36'),'createdAt',_0xad3e('0x61'),_0xad3e('0x62'),_0xad3e('0x63')],'include':_0x54bed5}];_0xb1900[_0xad3e('0x59')]({'model':db[_0xad3e('0x64')],'as':'Account','attributes':['id','name']});_0xb1900['push']({'model':db[_0xad3e('0x5a')],'as':_0xad3e('0x65'),'attributes':['id',_0xad3e('0x5b')]});return db[_0xad3e('0x21')][_0xad3e('0x33')]({'where':{'id':_0x283cae[_0xad3e('0x38')]['id']},'include':_0xb1900})[_0xad3e('0x1b')](handleEntityNotFound(_0x40d546,null))[_0xad3e('0x1b')](function(_0x5ee880){if(_0x5ee880){var _0x24dc6a=_0x5ee880[_0xad3e('0x66')]({'plain':!![]});fs['mkdirSync'](_0x2eadfa);var _0x153ccb={'channel':_0xad3e('0x67'),'account':_0x24dc6a[_0xad3e('0x68')]['name'],'agent':_0x24dc6a[_0xad3e('0x65')]?_0x24dc6a[_0xad3e('0x65')]['fullname']:'N.A.','createdAt':moment(_0x24dc6a[_0xad3e('0x69')])[_0xad3e('0x48')](_0xad3e('0x49'))['toString'](),'closedAt':_0x24dc6a[_0xad3e('0x6a')]?moment(_0x24dc6a[_0xad3e('0x6b')])[_0xad3e('0x48')](_0xad3e('0x49'))[_0xad3e('0x6c')]():'','disposition':_0x24dc6a['disposition'],'messages':_(_0x24dc6a[_0xad3e('0x60')])[_0xad3e('0x46')]({'secret':![]})[_0xad3e('0x6d')](function(_0x1d0be4){return{'date':moment(_0x1d0be4[_0xad3e('0x69')])['format'](_0xad3e('0x49'))[_0xad3e('0x6c')](),'sender':_0x1d0be4['direction']==='out'?_0x1d0be4['User']?_0x1d0be4['User'][_0xad3e('0x5b')]:_0xad3e('0x6e'):_0x1d0be4['Contact'][_0xad3e('0x5e')]+(_0x1d0be4[_0xad3e('0x5d')]['lastName']?'\x20'+_0x1d0be4[_0xad3e('0x5d')][_0xad3e('0x5f')]:''),'body':_0x1d0be4[_0xad3e('0x36')],'direction':_0x1d0be4[_0xad3e('0x61')]===_0xad3e('0x6f')?'A':'C','secret':_0x1d0be4[_0xad3e('0x62')],'read':_0x1d0be4[_0xad3e('0x63')]};})[_0xad3e('0x70')]()};return ejs['renderFile'](path['join'](config[_0xad3e('0x54')],_0xad3e('0x55'),_0xad3e('0x71'),_0xad3e('0x72')),{'interaction':_0x153ccb})['then'](function(_0x191c7d){var _0x208fb1=path['join'](_0x2eadfa,_0xad3e('0x73')+_0x24dc6a['id']+'-'+_0x4b105a+_0xad3e('0x74'));var _0x2ef285={'path':_0x208fb1,'channel':_0xad3e('0x67'),'interactionId':_0x24dc6a['id']};return pdf[_0xad3e('0x75')](_0x191c7d,_0x2ef285);})[_0xad3e('0x1b')](function(){return new BPromise(function(_0x542546,_0x3f8e54){zipdir(_0x2eadfa,{'saveTo':_0x367509},function(_0x18e6d5,_0x2e8e6c){if(_0x18e6d5)return _0x3f8e54(_0x18e6d5);return _0x542546(_0x2e8e6c);});})['then'](function(){return new BPromise(function(_0x5554f5,_0x505a38){rimraf(_0x2eadfa,function(_0x23b188){if(_0x23b188)_0x505a38(_0x23b188);return _0x5554f5();});});})[_0xad3e('0x1b')](function(){return _0x40d546[_0xad3e('0x52')](_0x367509,_0x5b451a,function(_0x152d6c){if(_0x152d6c){console[_0xad3e('0x76')]('err',_0x152d6c);}else{fs['unlinkSync'](_0x367509);}});});});}else{return _0x40d546[_0xad3e('0x12')](0xc8);}})['catch'](handleError(_0x40d546,null));};
\ No newline at end of file
+var _0xfd87=['createPdfFromHTML','log','err','unlinkSync','rimraf','zip-dir','moment','bluebird','util','path','ejs','lodash','ioredis','../../components/interaction/service','../../components/parsers/qs','../../config/logger','api','../../mysqldb','redis','defaults','localhost','./smsInteraction.socket','register','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','update','then','destroy','error','stack','name','send','index','map','SmsInteraction','rawAttributes','fieldName','key','getOptions','findAll','sms','query','catch','show','params','keys','filters','intersection','model','attributes','fields','length','merge','options','create','body','find','describe','addMessage','SmsMessage','omit','ids','getMessages','nolimit','sort','where','SmsInteractionId','filter','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','include','rows','addTags','setTags','spread','Tag','color','emit','removeTags','download','unix','toString','join','files','tmp','transcript-%d-%s.zip','User','push','CmContact','firstName','Messages','direction','secret','Account','Owner','fullname','get','Sms','N.A.','createdAt','closed','closedAt','disposition','out','Contact','lastName','read','renderFile','root','server','views','downloadInteraction.ejs','transcript-','.pdf'];(function(_0x5ad771,_0x34186f){var _0x5b5dce=function(_0x5ad0fb){while(--_0x5ad0fb){_0x5ad771['push'](_0x5ad771['shift']());}};_0x5b5dce(++_0x34186f);}(_0xfd87,0x80));var _0x7fd8=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xfd87[_0x3dd15e];return _0x231fd0;};'use strict';var rimraf=require(_0x7fd8('0x0'));var zipdir=require(_0x7fd8('0x1'));var moment=require(_0x7fd8('0x2'));var BPromise=require(_0x7fd8('0x3'));var util=require(_0x7fd8('0x4'));var path=require(_0x7fd8('0x5'));var ejs=require(_0x7fd8('0x6'));var fs=require('fs');var _=require(_0x7fd8('0x7'));var Redis=require(_0x7fd8('0x8'));var interaction=require(_0x7fd8('0x9'));var qs=require(_0x7fd8('0xa'));var pdf=require('../../components/export/pdf');var logger=require(_0x7fd8('0xb'))(_0x7fd8('0xc'));var config=require('../../config/environment');var db=require(_0x7fd8('0xd'))['db'];config[_0x7fd8('0xe')]=_[_0x7fd8('0xf')](config[_0x7fd8('0xe')],{'host':_0x7fd8('0x10'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x7fd8('0xe')]));require(_0x7fd8('0x11'))[_0x7fd8('0x12')](socket);function respondWithStatusCode(_0x596d03,_0x5486fc){_0x5486fc=_0x5486fc||0xcc;return function(_0x4948d0){if(_0x4948d0){return _0x596d03[_0x7fd8('0x13')](_0x5486fc);}return _0x596d03['status'](_0x5486fc)[_0x7fd8('0x14')]();};}function respondWithResult(_0x1a2d5d,_0x125628){_0x125628=_0x125628||0xc8;return function(_0x566901){if(_0x566901){return _0x1a2d5d[_0x7fd8('0x15')](_0x125628)[_0x7fd8('0x16')](_0x566901);}};}function respondWithFilteredResult(_0xe84aa7,_0x9e50da){return function(_0x20d1c5){if(_0x20d1c5){var _0x5b7061=typeof _0x9e50da[_0x7fd8('0x17')]===_0x7fd8('0x18')&&typeof _0x9e50da[_0x7fd8('0x19')]===_0x7fd8('0x18');var _0x250a02=_0x20d1c5[_0x7fd8('0x1a')];var _0x1a4a52=_0x5b7061?0x0:_0x9e50da[_0x7fd8('0x17')];var _0x2a8818=_0x5b7061?_0x20d1c5[_0x7fd8('0x1a')]:_0x9e50da[_0x7fd8('0x17')]+_0x9e50da['limit'];var _0x5de005;if(_0x2a8818>=_0x250a02){_0x2a8818=_0x250a02;_0x5de005=0xc8;}else{_0x5de005=0xce;}_0xe84aa7['status'](_0x5de005);return _0xe84aa7[_0x7fd8('0x1b')](_0x7fd8('0x1c'),_0x1a4a52+'-'+_0x2a8818+'/'+_0x250a02)['json'](_0x20d1c5);}return null;};}function saveUpdates(_0x39e301){return function(_0xb6f53b){if(_0xb6f53b){return _0xb6f53b[_0x7fd8('0x1d')](_0x39e301)[_0x7fd8('0x1e')](function(_0x3ab724){return _0x3ab724;});}return null;};}function removeEntity(_0xa440a4){return function(_0x2edf31){if(_0x2edf31){return _0x2edf31[_0x7fd8('0x1f')]()['then'](function(){_0xa440a4[_0x7fd8('0x15')](0xcc)[_0x7fd8('0x14')]();});}};}function handleEntityNotFound(_0x223e62){return function(_0x13417d){if(!_0x13417d){_0x223e62[_0x7fd8('0x13')](0x194);}return _0x13417d;};}function handleError(_0x7d1205,_0x4f8563){_0x4f8563=_0x4f8563||0x1f4;return function(_0xecd3f3){logger[_0x7fd8('0x20')](_0xecd3f3[_0x7fd8('0x21')]);if(_0xecd3f3[_0x7fd8('0x22')]){delete _0xecd3f3['name'];}_0x7d1205[_0x7fd8('0x15')](_0x4f8563)[_0x7fd8('0x23')](_0xecd3f3);};}exports[_0x7fd8('0x24')]=function(_0x33ab3d,_0x561dd1){var _0x49f6cf={};var _0x54b7f0=_[_0x7fd8('0x25')](db[_0x7fd8('0x26')][_0x7fd8('0x27')],function(_0xd8168f){return{'name':_0xd8168f[_0x7fd8('0x28')],'type':_0xd8168f['type'][_0x7fd8('0x29')]};});_0x49f6cf=qs[_0x7fd8('0x2a')](_0x54b7f0,_0x33ab3d);return interaction[_0x7fd8('0x2b')](_0x7fd8('0x2c'),_0x33ab3d[_0x7fd8('0x2d')],_0x33ab3d['user'],_0x49f6cf,_0x54b7f0)['then'](respondWithFilteredResult(_0x561dd1,_0x49f6cf))[_0x7fd8('0x2e')](handleError(_0x561dd1,null));};exports[_0x7fd8('0x2f')]=function(_0x3919b1,_0x4319b8){var _0x573ed0={'raw':![],'where':{'id':_0x3919b1[_0x7fd8('0x30')]['id']}},_0x4fc63a={};_0x4fc63a['model']=_[_0x7fd8('0x31')](db[_0x7fd8('0x26')][_0x7fd8('0x27')]);_0x4fc63a['query']=_[_0x7fd8('0x31')](_0x3919b1['query']);_0x4fc63a[_0x7fd8('0x32')]=_[_0x7fd8('0x33')](_0x4fc63a[_0x7fd8('0x34')],_0x4fc63a[_0x7fd8('0x2d')]);_0x573ed0[_0x7fd8('0x35')]=_[_0x7fd8('0x33')](_0x4fc63a[_0x7fd8('0x34')],qs['fields'](_0x3919b1[_0x7fd8('0x2d')][_0x7fd8('0x36')]));_0x573ed0[_0x7fd8('0x35')]=_0x573ed0[_0x7fd8('0x35')][_0x7fd8('0x37')]?_0x573ed0[_0x7fd8('0x35')]:_0x4fc63a[_0x7fd8('0x34')];if(_0x3919b1[_0x7fd8('0x2d')]['includeAll']){_0x573ed0['include']=[{'all':!![]}];}_0x573ed0=_[_0x7fd8('0x38')]({},_0x573ed0,_0x3919b1[_0x7fd8('0x39')]);return db[_0x7fd8('0x26')]['find'](_0x573ed0)[_0x7fd8('0x1e')](handleEntityNotFound(_0x4319b8,null))['then'](respondWithResult(_0x4319b8,null))['catch'](handleError(_0x4319b8,null));};exports[_0x7fd8('0x3a')]=function(_0x3cb612,_0x298dd6){return db[_0x7fd8('0x26')][_0x7fd8('0x3a')](_0x3cb612[_0x7fd8('0x3b')],{})[_0x7fd8('0x1e')](respondWithResult(_0x298dd6,0xc9))[_0x7fd8('0x2e')](handleError(_0x298dd6,null));};exports['update']=function(_0x3766a0,_0x50acd8){if(_0x3766a0['body']['id']){delete _0x3766a0[_0x7fd8('0x3b')]['id'];}return db['SmsInteraction']['find']({'where':{'id':_0x3766a0['params']['id']}})[_0x7fd8('0x1e')](handleEntityNotFound(_0x50acd8,null))[_0x7fd8('0x1e')](saveUpdates(_0x3766a0['body'],null))[_0x7fd8('0x1e')](respondWithResult(_0x50acd8,null))[_0x7fd8('0x2e')](handleError(_0x50acd8,null));};exports[_0x7fd8('0x1f')]=function(_0x5d8d3d,_0x5b8803){return db['SmsInteraction'][_0x7fd8('0x3c')]({'where':{'id':_0x5d8d3d[_0x7fd8('0x30')]['id']}})[_0x7fd8('0x1e')](handleEntityNotFound(_0x5b8803,null))[_0x7fd8('0x1e')](removeEntity(_0x5b8803,null))[_0x7fd8('0x2e')](handleError(_0x5b8803,null));};exports[_0x7fd8('0x3d')]=function(_0x2b5abb,_0x501f59){return db['SmsInteraction']['describe']()[_0x7fd8('0x1e')](respondWithResult(_0x501f59,null))[_0x7fd8('0x2e')](handleError(_0x501f59,null));};exports[_0x7fd8('0x3e')]=function(_0x558874,_0x313df5){return db[_0x7fd8('0x3f')][_0x7fd8('0x3c')]({'where':{'id':_0x558874[_0x7fd8('0x30')]['id']}})['then'](handleEntityNotFound(_0x313df5,null))[_0x7fd8('0x1e')](function(_0x1225ec){if(_0x1225ec){return _0x1225ec['addMessage'](_0x558874[_0x7fd8('0x3b')]['ids'],_[_0x7fd8('0x40')](_0x558874[_0x7fd8('0x3b')],[_0x7fd8('0x41'),'id'])||{});}})[_0x7fd8('0x1e')](respondWithResult(_0x313df5,null))['catch'](handleError(_0x313df5,null));};exports[_0x7fd8('0x42')]=function(_0x34ffb6,_0x2b7128){var _0x3e0efd={'raw':![],'where':{}};var _0x365e6f={};var _0x26eb1c={'count':0x0,'rows':[]};return db['SmsInteraction']['findOne']({'where':{'id':_0x34ffb6['params']['id']}})[_0x7fd8('0x1e')](handleEntityNotFound(_0x2b7128,null))[_0x7fd8('0x1e')](function(_0x5364fe){if(_0x5364fe){_0x365e6f['model']=_[_0x7fd8('0x31')](db[_0x7fd8('0x3f')]['rawAttributes']);_0x365e6f[_0x7fd8('0x2d')]=_[_0x7fd8('0x31')](_0x34ffb6[_0x7fd8('0x2d')]);_0x365e6f['filters']=_[_0x7fd8('0x33')](_0x365e6f[_0x7fd8('0x34')],_0x365e6f['query']);_0x3e0efd[_0x7fd8('0x35')]=_['intersection'](_0x365e6f[_0x7fd8('0x34')],qs[_0x7fd8('0x36')](_0x34ffb6[_0x7fd8('0x2d')][_0x7fd8('0x36')]));_0x3e0efd[_0x7fd8('0x35')]=_0x3e0efd[_0x7fd8('0x35')][_0x7fd8('0x37')]?_0x3e0efd[_0x7fd8('0x35')]:_0x365e6f['model'];if(!_0x34ffb6[_0x7fd8('0x2d')]['hasOwnProperty'](_0x7fd8('0x43'))){_0x3e0efd[_0x7fd8('0x19')]=qs['limit'](_0x34ffb6[_0x7fd8('0x2d')][_0x7fd8('0x19')]);_0x3e0efd['offset']=qs['offset'](_0x34ffb6['query'][_0x7fd8('0x17')]);}_0x3e0efd['order']=qs[_0x7fd8('0x44')](_0x34ffb6[_0x7fd8('0x2d')][_0x7fd8('0x44')]);_0x3e0efd[_0x7fd8('0x45')]=qs[_0x7fd8('0x32')](_['pick'](_0x34ffb6['query'],_0x365e6f[_0x7fd8('0x32')]));_0x3e0efd[_0x7fd8('0x45')][_0x7fd8('0x46')]=_0x5364fe['id'];if(_0x34ffb6[_0x7fd8('0x2d')]['filter']){_0x3e0efd[_0x7fd8('0x45')]=_['merge'](_0x3e0efd[_0x7fd8('0x45')],{'$or':_[_0x7fd8('0x25')](_0x3e0efd[_0x7fd8('0x35')],function(_0x1a6a03){var _0x32160c={};_0x32160c[_0x1a6a03]={'$like':'%'+_0x34ffb6[_0x7fd8('0x2d')][_0x7fd8('0x47')]+'%'};return _0x32160c;})});}if(_0x34ffb6[_0x7fd8('0x2d')][_0x7fd8('0x48')]){var _0x20f460=_0x34ffb6[_0x7fd8('0x2d')]['$gte'][_0x7fd8('0x49')](',');var _0x28b0ba={};_0x28b0ba[_0x20f460[0x0]]={'$gte':moment(_0x20f460[0x1])[_0x7fd8('0x4a')](_0x7fd8('0x4b'))};_0x3e0efd[_0x7fd8('0x45')]=_['merge'](_0x3e0efd['where'],_0x28b0ba);}_0x3e0efd=_['merge']({},_0x3e0efd,_0x34ffb6[_0x7fd8('0x39')]);return db[_0x7fd8('0x3f')][_0x7fd8('0x1a')]({'where':_0x3e0efd[_0x7fd8('0x45')]})[_0x7fd8('0x1e')](function(_0x1a6d14){_0x26eb1c[_0x7fd8('0x1a')]=_0x1a6d14;if(_0x34ffb6['query']['includeAll']){_0x3e0efd[_0x7fd8('0x4c')]=[{'all':!![]}];}return db['SmsMessage'][_0x7fd8('0x2b')](_0x3e0efd);})[_0x7fd8('0x1e')](function(_0x5ed4ff){_0x26eb1c[_0x7fd8('0x4d')]=_0x5ed4ff;return _0x26eb1c;});}})[_0x7fd8('0x1e')](respondWithFilteredResult(_0x2b7128,_0x3e0efd))['catch'](handleError(_0x2b7128,null));};exports[_0x7fd8('0x4e')]=function(_0x468fbe,_0x21d235){return db[_0x7fd8('0x26')][_0x7fd8('0x3c')]({'where':{'id':_0x468fbe[_0x7fd8('0x30')]['id']}})[_0x7fd8('0x1e')](handleEntityNotFound(_0x21d235,null))['then'](function(_0x16d36e){if(_0x16d36e){return _0x16d36e[_0x7fd8('0x4f')](_0x468fbe[_0x7fd8('0x3b')][_0x7fd8('0x41')],_[_0x7fd8('0x40')](_0x468fbe['body'],[_0x7fd8('0x41'),'id'])||{})[_0x7fd8('0x50')](function(){return db[_0x7fd8('0x51')]['findAll']({'attributes':['id','name',_0x7fd8('0x52')],'where':{'id':_0x468fbe[_0x7fd8('0x3b')][_0x7fd8('0x41')]}});})[_0x7fd8('0x1e')](function(_0x16c870){socket[_0x7fd8('0x53')]('smsInteractionTags:save',{'id':Number(_0x468fbe[_0x7fd8('0x30')]['id']),'tags':_0x16c870||[]});return{'id':Number(_0x468fbe[_0x7fd8('0x30')]['id']),'tags':_0x16c870||[]};});}})[_0x7fd8('0x1e')](respondWithResult(_0x21d235,null))[_0x7fd8('0x2e')](handleError(_0x21d235,null));};exports['removeTags']=function(_0x41c9e2,_0x6118d7){return db[_0x7fd8('0x26')][_0x7fd8('0x3c')]({'where':{'id':_0x41c9e2[_0x7fd8('0x30')]['id']}})[_0x7fd8('0x1e')](handleEntityNotFound(_0x6118d7,null))[_0x7fd8('0x1e')](function(_0x118582){if(_0x118582){return _0x118582[_0x7fd8('0x54')](_0x41c9e2[_0x7fd8('0x2d')][_0x7fd8('0x41')]);}})[_0x7fd8('0x1e')](respondWithStatusCode(_0x6118d7,null))[_0x7fd8('0x2e')](handleError(_0x6118d7,null));};exports[_0x7fd8('0x55')]=function(_0x5cb9a0,_0x48e1cc){var _0x3bca72=moment()[_0x7fd8('0x56')]()[_0x7fd8('0x57')]();var _0x432d5b=path[_0x7fd8('0x58')](config['root'],'server',_0x7fd8('0x59'),_0x7fd8('0x5a'));var _0x520ea8=path['join'](_0x432d5b,_0x3bca72);var _0x489bf3=util[_0x7fd8('0x4a')](_0x7fd8('0x5b'),_0x5cb9a0[_0x7fd8('0x30')]['id'],_0x3bca72);var _0x23b3dd=path[_0x7fd8('0x58')](_0x432d5b,_0x489bf3);var _0x4fe173=[];_0x4fe173['push']({'model':db[_0x7fd8('0x5c')],'as':_0x7fd8('0x5c'),'attributes':['id','fullname'],'raw':!![]});_0x4fe173[_0x7fd8('0x5d')]({'model':db[_0x7fd8('0x5e')],'as':'Contact','attributes':['id',_0x7fd8('0x5f'),'lastName'],'raw':!![]});var _0xed205a=[{'model':db['SmsMessage'],'as':_0x7fd8('0x60'),'attributes':['id','body','createdAt',_0x7fd8('0x61'),_0x7fd8('0x62'),'read'],'include':_0x4fe173}];_0xed205a[_0x7fd8('0x5d')]({'model':db['SmsAccount'],'as':_0x7fd8('0x63'),'attributes':['id',_0x7fd8('0x22')]});_0xed205a[_0x7fd8('0x5d')]({'model':db[_0x7fd8('0x5c')],'as':_0x7fd8('0x64'),'attributes':['id',_0x7fd8('0x65')]});return db['SmsInteraction']['find']({'where':{'id':_0x5cb9a0[_0x7fd8('0x30')]['id']},'include':_0xed205a})['then'](handleEntityNotFound(_0x48e1cc,null))['then'](function(_0x19cbd8){if(_0x19cbd8){var _0x1a67b2=_0x19cbd8[_0x7fd8('0x66')]({'plain':!![]});fs['mkdirSync'](_0x520ea8);var _0x484eb0={'channel':_0x7fd8('0x67'),'account':_0x1a67b2[_0x7fd8('0x63')][_0x7fd8('0x22')],'agent':_0x1a67b2[_0x7fd8('0x64')]?_0x1a67b2[_0x7fd8('0x64')]['fullname']:_0x7fd8('0x68'),'createdAt':moment(_0x1a67b2[_0x7fd8('0x69')])[_0x7fd8('0x4a')](_0x7fd8('0x4b'))[_0x7fd8('0x57')](),'closedAt':_0x1a67b2[_0x7fd8('0x6a')]?moment(_0x1a67b2[_0x7fd8('0x6b')])[_0x7fd8('0x4a')]('YYYY-MM-DD\x20HH:mm:ss')[_0x7fd8('0x57')]():'','disposition':_0x1a67b2[_0x7fd8('0x6c')],'messages':_(_0x1a67b2[_0x7fd8('0x60')])['filter']({'secret':![]})[_0x7fd8('0x25')](function(_0x4394f3){return{'date':moment(_0x4394f3[_0x7fd8('0x69')])[_0x7fd8('0x4a')](_0x7fd8('0x4b'))[_0x7fd8('0x57')](),'sender':_0x4394f3['direction']===_0x7fd8('0x6d')?_0x4394f3[_0x7fd8('0x5c')]?_0x4394f3[_0x7fd8('0x5c')][_0x7fd8('0x65')]:'System':_0x4394f3[_0x7fd8('0x6e')][_0x7fd8('0x5f')]+(_0x4394f3[_0x7fd8('0x6e')][_0x7fd8('0x6f')]?'\x20'+_0x4394f3[_0x7fd8('0x6e')][_0x7fd8('0x6f')]:''),'body':_0x4394f3['body'],'direction':_0x4394f3['direction']==='out'?'A':'C','secret':_0x4394f3[_0x7fd8('0x62')],'read':_0x4394f3[_0x7fd8('0x70')]};})['value']()};return ejs[_0x7fd8('0x71')](path['join'](config[_0x7fd8('0x72')],_0x7fd8('0x73'),_0x7fd8('0x74'),_0x7fd8('0x75')),{'interaction':_0x484eb0})[_0x7fd8('0x1e')](function(_0x376980){var _0x158a4f=path[_0x7fd8('0x58')](_0x520ea8,_0x7fd8('0x76')+_0x1a67b2['id']+'-'+_0x3bca72+_0x7fd8('0x77'));var _0x1016b4={'path':_0x158a4f,'channel':_0x7fd8('0x67'),'interactionId':_0x1a67b2['id']};return pdf[_0x7fd8('0x78')](_0x376980,_0x1016b4);})['then'](function(){return new BPromise(function(_0x2a20d3,_0x13601e){zipdir(_0x520ea8,{'saveTo':_0x23b3dd},function(_0x286603,_0x3c353c){if(_0x286603)return _0x13601e(_0x286603);return _0x2a20d3(_0x3c353c);});})[_0x7fd8('0x1e')](function(){return new BPromise(function(_0x4e38ae,_0x38f228){rimraf(_0x520ea8,function(_0x525490){if(_0x525490)_0x38f228(_0x525490);return _0x4e38ae();});});})[_0x7fd8('0x1e')](function(){return _0x48e1cc[_0x7fd8('0x55')](_0x23b3dd,_0x489bf3,function(_0x58f956){if(_0x58f956){console[_0x7fd8('0x79')](_0x7fd8('0x7a'),_0x58f956);}else{fs[_0x7fd8('0x7b')](_0x23b3dd);}});});});}else{return _0x48e1cc[_0x7fd8('0x13')](0xc8);}})[_0x7fd8('0x2e')](handleError(_0x48e1cc,null));};
\ No newline at end of file
index d6b2642..34eea45 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5c3c=['events','../../mysqldb','SmsInteraction','setMaxListeners','save','update','remove','getUsers','Users','map','findAll','then','setDataValue','unreadMessages','emit','catch','hook','exports'];(function(_0x54991e,_0x231c1a){var _0x2c7540=function(_0x5cf6a5){while(--_0x5cf6a5){_0x54991e['push'](_0x54991e['shift']());}};_0x2c7540(++_0x231c1a);}(_0x5c3c,0x132));var _0xc5c3=function(_0x487b0c,_0x14ff74){_0x487b0c=_0x487b0c-0x0;var _0x1adbdc=_0x5c3c[_0x487b0c];return _0x1adbdc;};'use strict';var EventEmitter=require(_0xc5c3('0x0'));var SmsInteraction=require(_0xc5c3('0x1'))['db'][_0xc5c3('0x2')];var SmsMessage=require(_0xc5c3('0x1'))['db']['SmsMessage'];var SmsInteractionEvents=new EventEmitter();SmsInteractionEvents[_0xc5c3('0x3')](0x0);var events={'afterCreate':_0xc5c3('0x4'),'afterUpdate':_0xc5c3('0x5'),'afterDestroy':_0xc5c3('0x6')};function emitEvent(_0x2535e0){return function(_0x36525d,_0xe85098,_0x23a6b5){_0x36525d[_0xc5c3('0x7')]({'attributes':['id'],'raw':!![]})['then'](function(_0x4b8404){_0x36525d['setDataValue'](_0xc5c3('0x8'),_0x4b8404[_0xc5c3('0x9')](function(_0x593b35){return{'id':_0x593b35['id']};}));return SmsMessage[_0xc5c3('0xa')]({'where':{'SmsInteractionId':_0x36525d['id'],'direction':'in','read':![]},'raw':!![]});})[_0xc5c3('0xb')](function(_0x52f3eb){_0x36525d[_0xc5c3('0xc')](_0xc5c3('0xd'),_0x52f3eb['length']);SmsInteractionEvents[_0xc5c3('0xe')](_0x2535e0+':'+_0x36525d['id'],_0x36525d);SmsInteractionEvents[_0xc5c3('0xe')](_0x2535e0,_0x36525d);_0x23a6b5(null);})[_0xc5c3('0xf')](_0x23a6b5(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsInteraction[_0xc5c3('0x10')](e,emitEvent(event));}}module[_0xc5c3('0x11')]=SmsInteractionEvents;
\ No newline at end of file
+var _0x4325=['Users','map','findAll','then','setDataValue','length','emit','catch','exports','events','../../mysqldb','SmsMessage','setMaxListeners','remove','getUsers'];(function(_0x19e67f,_0x1a8a9d){var _0x1e64a2=function(_0x43aa08){while(--_0x43aa08){_0x19e67f['push'](_0x19e67f['shift']());}};_0x1e64a2(++_0x1a8a9d);}(_0x4325,0x1da));var _0x5432=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x4325[_0x4b369d];return _0x571a98;};'use strict';var EventEmitter=require(_0x5432('0x0'));var SmsInteraction=require(_0x5432('0x1'))['db']['SmsInteraction'];var SmsMessage=require(_0x5432('0x1'))['db'][_0x5432('0x2')];var SmsInteractionEvents=new EventEmitter();SmsInteractionEvents[_0x5432('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x5432('0x4')};function emitEvent(_0x36ce53){return function(_0xad26e9,_0x4acbe4,_0x209e2e){_0xad26e9[_0x5432('0x5')]({'attributes':['id'],'raw':!![]})['then'](function(_0x106ec9){_0xad26e9['setDataValue'](_0x5432('0x6'),_0x106ec9[_0x5432('0x7')](function(_0x40e756){return{'id':_0x40e756['id']};}));return SmsMessage[_0x5432('0x8')]({'where':{'SmsInteractionId':_0xad26e9['id'],'direction':'in','read':![]},'raw':!![]});})[_0x5432('0x9')](function(_0x4a9a51){_0xad26e9[_0x5432('0xa')]('unreadMessages',_0x4a9a51[_0x5432('0xb')]);SmsInteractionEvents[_0x5432('0xc')](_0x36ce53+':'+_0xad26e9['id'],_0xad26e9);SmsInteractionEvents[_0x5432('0xc')](_0x36ce53,_0xad26e9);_0x209e2e(null);})[_0x5432('0xd')](_0x209e2e(null));};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SmsInteraction['hook'](e,emitEvent(event));}}module[_0x5432('0xe')]=SmsInteractionEvents;
\ No newline at end of file
index bd04c81..cd0e81b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa25f=['sms_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','util','api','moment','bluebird','path','rimraf','exports','define','SmsInteraction'];(function(_0x3e2fcf,_0x579110){var _0x497db7=function(_0x2f713d){while(--_0x2f713d){_0x3e2fcf['push'](_0x3e2fcf['shift']());}};_0x497db7(++_0x579110);}(_0xa25f,0x186));var _0xfa25=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa25f[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xfa25('0x0'));var util=require(_0xfa25('0x1'));var logger=require('../../config/logger')(_0xfa25('0x2'));var moment=require(_0xfa25('0x3'));var BPromise=require(_0xfa25('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xfa25('0x5'));var rimraf=require(_0xfa25('0x6'));var config=require('../../config/environment');var attributes=require('./smsInteraction.attributes');module[_0xfa25('0x7')]=function(_0x38c229,_0x347e1a){return _0x38c229[_0xfa25('0x8')](_0xfa25('0x9'),attributes,{'tableName':_0xfa25('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x9a1cf4,_0x284c26,_0x5e562a){if(_0x9a1cf4[_0xfa25('0xb')](_0xfa25('0xc'))){_0x9a1cf4[_0xfa25('0xd')]=moment()[_0xfa25('0xe')](_0xfa25('0xf'));}_0x5e562a(null,_0x9a1cf4);}}});};
\ No newline at end of file
+var _0x5e96=['SmsInteraction','sms_interactions','changed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./smsInteraction.attributes','exports','define'];(function(_0x2abad8,_0xd04adf){var _0x836ca3=function(_0x5edd94){while(--_0x5edd94){_0x2abad8['push'](_0x2abad8['shift']());}};_0x836ca3(++_0xd04adf);}(_0x5e96,0x18d));var _0x65e9=function(_0x5aa518,_0x4ef60c){_0x5aa518=_0x5aa518-0x0;var _0x2e6287=_0x5e96[_0x5aa518];return _0x2e6287;};'use strict';var _=require(_0x65e9('0x0'));var util=require('util');var logger=require(_0x65e9('0x1'))(_0x65e9('0x2'));var moment=require(_0x65e9('0x3'));var BPromise=require(_0x65e9('0x4'));var rp=require(_0x65e9('0x5'));var fs=require('fs');var path=require(_0x65e9('0x6'));var rimraf=require(_0x65e9('0x7'));var config=require('../../config/environment');var attributes=require(_0x65e9('0x8'));module[_0x65e9('0x9')]=function(_0x343b2c,_0x15c900){return _0x343b2c[_0x65e9('0xa')](_0x65e9('0xb'),attributes,{'tableName':_0x65e9('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x2f2170,_0x3f219d,_0x4a3edd){if(_0x2f2170[_0x65e9('0xd')]('closed')){_0x2f2170[_0x65e9('0xe')]=moment()[_0x65e9('0xf')](_0x65e9('0x10'));}_0x4a3edd(null,_0x2f2170);}}});};
\ No newline at end of file
index 15f6122..267ef9a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2977=['message','request\x20sent','result','catch','UpdateSmsInteraction','SmsInteraction','body','raw','where','options','attributes','limit','AddTagsToSmsInteraction','addTags','ids','omit','AddTags','debug','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','defaults','socket.io-emitter','./smsInteraction.socket','register','then','info','stringify','error','code','SmsInteraction,\x20%s,\x20%s'];(function(_0x5deb35,_0x2c8188){var _0x1ecefc=function(_0x58333e){while(--_0x58333e){_0x5deb35['push'](_0x5deb35['shift']());}};_0x1ecefc(++_0x2c8188);}(_0x2977,0x1ac));var _0x7297=function(_0x3b2345,_0x2e9d7b){_0x3b2345=_0x3b2345-0x0;var _0x13970e=_0x2977[_0x3b2345];return _0x13970e;};'use strict';var _=require(_0x7297('0x0'));var util=require(_0x7297('0x1'));var moment=require(_0x7297('0x2'));var BPromise=require(_0x7297('0x3'));var rs=require(_0x7297('0x4'));var fs=require('fs');var Redis=require(_0x7297('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0x7297('0x6'));var logger=require(_0x7297('0x7'))(_0x7297('0x8'));var config=require(_0x7297('0x9'));var jayson=require(_0x7297('0xa'));var client=jayson[_0x7297('0xb')]['http']({'port':0x232a});config[_0x7297('0xc')]=_[_0x7297('0xd')](config[_0x7297('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x7297('0xe'))(new Redis(config[_0x7297('0xc')]));require(_0x7297('0xf'))[_0x7297('0x10')](socket);function respondWithRpcPromise(_0x8421f1,_0x1724b8,_0x55ea67){return new BPromise(function(_0x5be4bf,_0x27dc40){return client['request'](_0x8421f1,_0x55ea67)[_0x7297('0x11')](function(_0x5d2ad4){logger[_0x7297('0x12')]('SmsInteraction,\x20%s,\x20%s',_0x1724b8,'request\x20sent');logger['debug']('SmsInteraction,\x20%s,\x20%s,\x20%s',_0x1724b8,'request\x20sent',JSON[_0x7297('0x13')](_0x5d2ad4));if(_0x5d2ad4[_0x7297('0x14')]){if(_0x5d2ad4[_0x7297('0x14')][_0x7297('0x15')]===0x1f4){logger[_0x7297('0x14')](_0x7297('0x16'),_0x1724b8,_0x5d2ad4[_0x7297('0x14')][_0x7297('0x17')]);return _0x27dc40(_0x5d2ad4[_0x7297('0x14')][_0x7297('0x17')]);}logger[_0x7297('0x14')](_0x7297('0x16'),_0x1724b8,_0x5d2ad4[_0x7297('0x14')]['message']);return _0x5be4bf(_0x5d2ad4[_0x7297('0x14')]['message']);}else{logger[_0x7297('0x12')](_0x7297('0x16'),_0x1724b8,_0x7297('0x18'));_0x5be4bf(_0x5d2ad4[_0x7297('0x19')][_0x7297('0x17')]);}})[_0x7297('0x1a')](function(_0x12088b){logger[_0x7297('0x14')](_0x7297('0x16'),_0x1724b8,_0x12088b);_0x27dc40(_0x12088b);});});}exports[_0x7297('0x1b')]=function(_0x51f08b){var _0x2a12fd=this;return new Promise(function(_0x533c27,_0x27a8ac){return db[_0x7297('0x1c')]['update'](_0x51f08b[_0x7297('0x1d')],{'raw':_0x51f08b['options']?_0x51f08b['options'][_0x7297('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x51f08b['options']?_0x51f08b['options'][_0x7297('0x1f')]||null:null,'attributes':_0x51f08b[_0x7297('0x20')]?_0x51f08b[_0x7297('0x20')][_0x7297('0x21')]||null:null,'limit':_0x51f08b[_0x7297('0x20')]?_0x51f08b[_0x7297('0x20')][_0x7297('0x22')]||null:null})[_0x7297('0x11')](function(_0xd898bf){logger['info'](_0x7297('0x1b'),_0x51f08b);logger['debug'](_0x7297('0x1b'),_0x51f08b,JSON[_0x7297('0x13')](_0xd898bf));_0x533c27(_0xd898bf);})[_0x7297('0x1a')](function(_0x176925){logger[_0x7297('0x14')]('UpdateSmsInteraction',_0x176925[_0x7297('0x17')],_0x51f08b);_0x27a8ac(_0x2a12fd['error'](0x1f4,_0x176925['message']));});});};exports[_0x7297('0x23')]=function(_0x4beb7c){return new Promise(function(_0x5cb66a,_0x5bb9d4){return db[_0x7297('0x1c')]['find']({'where':_0x4beb7c[_0x7297('0x20')]?_0x4beb7c[_0x7297('0x20')][_0x7297('0x1f')]||null:null})[_0x7297('0x11')](function(_0x1e1b42){if(_0x1e1b42){return _0x1e1b42[_0x7297('0x24')](_0x4beb7c['body'][_0x7297('0x25')],_[_0x7297('0x26')](_0x4beb7c[_0x7297('0x1d')],[_0x7297('0x25'),'id'])||{});}})['spread'](function(_0x4ed323){logger['info'](_0x7297('0x27'),_0x4beb7c);logger[_0x7297('0x28')](_0x7297('0x27'),_0x4beb7c,JSON['stringify'](_0x4ed323));_0x5cb66a(_0x4ed323);})[_0x7297('0x1a')](function(_0x526b26){logger['error'](_0x7297('0x27'),_0x526b26[_0x7297('0x17')],_0x4beb7c);_0x5bb9d4(_this['error'](0x1f4,_0x526b26[_0x7297('0x17')]));});});};
\ No newline at end of file
+var _0x19a8=['util','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./smsInteraction.socket','register','request','then','info','SmsInteraction,\x20%s,\x20%s','request\x20sent','SmsInteraction,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','UpdateSmsInteraction','update','body','options','where','attributes','limit','debug','AddTagsToSmsInteraction','SmsInteraction','find','addTags','ids','omit','AddTags'];(function(_0x2598b3,_0x1cc0a8){var _0x55607f=function(_0x3b37fd){while(--_0x3b37fd){_0x2598b3['push'](_0x2598b3['shift']());}};_0x55607f(++_0x1cc0a8);}(_0x19a8,0x1d9));var _0x819a=function(_0x20e9a3,_0x4077ec){_0x20e9a3=_0x20e9a3-0x0;var _0x5560b5=_0x19a8[_0x20e9a3];return _0x5560b5;};'use strict';var _=require('lodash');var util=require(_0x819a('0x0'));var moment=require(_0x819a('0x1'));var BPromise=require(_0x819a('0x2'));var rs=require(_0x819a('0x3'));var fs=require('fs');var Redis=require(_0x819a('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x819a('0x5'));var logger=require(_0x819a('0x6'))(_0x819a('0x7'));var config=require(_0x819a('0x8'));var jayson=require(_0x819a('0x9'));var client=jayson['client'][_0x819a('0xa')]({'port':0x232a});config[_0x819a('0xb')]=_[_0x819a('0xc')](config[_0x819a('0xb')],{'host':_0x819a('0xd'),'port':0x18eb});var socket=require(_0x819a('0xe'))(new Redis(config[_0x819a('0xb')]));require(_0x819a('0xf'))[_0x819a('0x10')](socket);function respondWithRpcPromise(_0x362ebd,_0x278756,_0x58cda5){return new BPromise(function(_0x21e0a,_0x18fc5d){return client[_0x819a('0x11')](_0x362ebd,_0x58cda5)[_0x819a('0x12')](function(_0xc0afa4){logger[_0x819a('0x13')](_0x819a('0x14'),_0x278756,_0x819a('0x15'));logger['debug'](_0x819a('0x16'),_0x278756,_0x819a('0x15'),JSON[_0x819a('0x17')](_0xc0afa4));if(_0xc0afa4[_0x819a('0x18')]){if(_0xc0afa4[_0x819a('0x18')]['code']===0x1f4){logger[_0x819a('0x18')](_0x819a('0x14'),_0x278756,_0xc0afa4['error'][_0x819a('0x19')]);return _0x18fc5d(_0xc0afa4[_0x819a('0x18')][_0x819a('0x19')]);}logger[_0x819a('0x18')](_0x819a('0x14'),_0x278756,_0xc0afa4[_0x819a('0x18')][_0x819a('0x19')]);return _0x21e0a(_0xc0afa4[_0x819a('0x18')][_0x819a('0x19')]);}else{logger[_0x819a('0x13')]('SmsInteraction,\x20%s,\x20%s',_0x278756,_0x819a('0x15'));_0x21e0a(_0xc0afa4[_0x819a('0x1a')]['message']);}})[_0x819a('0x1b')](function(_0x2abfdd){logger['error'](_0x819a('0x14'),_0x278756,_0x2abfdd);_0x18fc5d(_0x2abfdd);});});}exports[_0x819a('0x1c')]=function(_0x186308){var _0x5f0161=this;return new Promise(function(_0x25e9b6,_0x32f38a){return db['SmsInteraction'][_0x819a('0x1d')](_0x186308[_0x819a('0x1e')],{'raw':_0x186308[_0x819a('0x1f')]?_0x186308[_0x819a('0x1f')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x186308[_0x819a('0x1f')]?_0x186308[_0x819a('0x1f')][_0x819a('0x20')]||null:null,'attributes':_0x186308[_0x819a('0x1f')]?_0x186308[_0x819a('0x1f')][_0x819a('0x21')]||null:null,'limit':_0x186308['options']?_0x186308[_0x819a('0x1f')][_0x819a('0x22')]||null:null})[_0x819a('0x12')](function(_0xa492e1){logger[_0x819a('0x13')](_0x819a('0x1c'),_0x186308);logger[_0x819a('0x23')]('UpdateSmsInteraction',_0x186308,JSON['stringify'](_0xa492e1));_0x25e9b6(_0xa492e1);})[_0x819a('0x1b')](function(_0x2d30e6){logger[_0x819a('0x18')](_0x819a('0x1c'),_0x2d30e6[_0x819a('0x19')],_0x186308);_0x32f38a(_0x5f0161[_0x819a('0x18')](0x1f4,_0x2d30e6[_0x819a('0x19')]));});});};exports[_0x819a('0x24')]=function(_0x260c38){return new Promise(function(_0x1243f7,_0x522315){return db[_0x819a('0x25')][_0x819a('0x26')]({'where':_0x260c38[_0x819a('0x1f')]?_0x260c38[_0x819a('0x1f')][_0x819a('0x20')]||null:null})[_0x819a('0x12')](function(_0x5c09d1){if(_0x5c09d1){return _0x5c09d1[_0x819a('0x27')](_0x260c38[_0x819a('0x1e')][_0x819a('0x28')],_[_0x819a('0x29')](_0x260c38['body'],[_0x819a('0x28'),'id'])||{});}})['spread'](function(_0x400cbd){logger['info'](_0x819a('0x2a'),_0x260c38);logger[_0x819a('0x23')]('AddTags',_0x260c38,JSON[_0x819a('0x17')](_0x400cbd));_0x1243f7(_0x400cbd);})[_0x819a('0x1b')](function(_0x5cc61e){logger[_0x819a('0x18')](_0x819a('0x2a'),_0x5cc61e[_0x819a('0x19')],_0x260c38);_0x522315(_this[_0x819a('0x18')](0x1f4,_0x5cc61e[_0x819a('0x19')]));});});};
\ No newline at end of file
index 70d49b1..8c74ecc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x221f=['update','emit','removeListener','length','smsInteraction:','./smsInteraction.events','save'];(function(_0x393316,_0x2755eb){var _0x1facbd=function(_0x1e27ac){while(--_0x1e27ac){_0x393316['push'](_0x393316['shift']());}};_0x1facbd(++_0x2755eb);}(_0x221f,0x1da));var _0xf221=function(_0x254b22,_0x27159f){_0x254b22=_0x254b22-0x0;var _0x1279db=_0x221f[_0x254b22];return _0x1279db;};'use strict';var SmsInteractionEvents=require(_0xf221('0x0'));var events=[_0xf221('0x1'),'remove',_0xf221('0x2')];function createListener(_0x3854fe,_0x199606){return function(_0x3cf1b2){_0x199606[_0xf221('0x3')](_0x3854fe,_0x3cf1b2);};}function removeListener(_0x45fb9c,_0xf31c8a){return function(){SmsInteractionEvents[_0xf221('0x4')](_0x45fb9c,_0xf31c8a);};}exports['register']=function(_0xab116f){for(var _0x261679=0x0,_0x2a1663=events[_0xf221('0x5')];_0x261679<_0x2a1663;_0x261679++){var _0x57bf28=events[_0x261679];var _0x4c207e=createListener(_0xf221('0x6')+_0x57bf28,_0xab116f);SmsInteractionEvents['on'](_0x57bf28,_0x4c207e);}};
\ No newline at end of file
+var _0x5984=['emit','removeListener','register','length','smsInteraction:','./smsInteraction.events','save','update'];(function(_0x57fe95,_0x4c5989){var _0x1baf35=function(_0x5522bc){while(--_0x5522bc){_0x57fe95['push'](_0x57fe95['shift']());}};_0x1baf35(++_0x4c5989);}(_0x5984,0x13d));var _0x4598=function(_0x13c377,_0x498416){_0x13c377=_0x13c377-0x0;var _0x36f033=_0x5984[_0x13c377];return _0x36f033;};'use strict';var SmsInteractionEvents=require(_0x4598('0x0'));var events=[_0x4598('0x1'),'remove',_0x4598('0x2')];function createListener(_0x39a601,_0xa3fe32){return function(_0x2deea5){_0xa3fe32[_0x4598('0x3')](_0x39a601,_0x2deea5);};}function removeListener(_0x54eb70,_0x32bb2c){return function(){SmsInteractionEvents[_0x4598('0x4')](_0x54eb70,_0x32bb2c);};}exports[_0x4598('0x5')]=function(_0x188670){for(var _0x89c25f=0x0,_0x516e65=events[_0x4598('0x6')];_0x89c25f<_0x516e65;_0x89c25f++){var _0x148416=events[_0x89c25f];var _0x1d98e3=createListener(_0x4598('0x7')+_0x148416,_0x188670);SmsInteractionEvents['on'](_0x148416,_0x1d98e3);}};
\ No newline at end of file
index 0068876..94a7893 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xafb1=['tracked','sms','smsmessage:create','create','/:id/status','put','update','/:id/accept','accept','/:id/reject','reject','delete','multer','util','connect-timeout','Router','../../config/environment','./smsMessage.controller','index','get','/describe','isAuthenticated','/:id','show','post'];(function(_0x43b08,_0x15f967){var _0x5e05f4=function(_0x4bb0cb){while(--_0x4bb0cb){_0x43b08['push'](_0x43b08['shift']());}};_0x5e05f4(++_0x15f967);}(_0xafb1,0x19c));var _0x1afb=function(_0x56aa66,_0x1ddf52){_0x56aa66=_0x56aa66-0x0;var _0xeba9ff=_0xafb1[_0x56aa66];return _0xeba9ff;};'use strict';var multer=require(_0x1afb('0x0'));var util=require(_0x1afb('0x1'));var path=require('path');var timeout=require(_0x1afb('0x2'));var express=require('express');var router=express[_0x1afb('0x3')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x1afb('0x4'));var controller=require(_0x1afb('0x5'));router['get']('/',auth['isAuthenticated'](),controller[_0x1afb('0x6')]);router[_0x1afb('0x7')](_0x1afb('0x8'),auth[_0x1afb('0x9')](),controller['describe']);router[_0x1afb('0x7')](_0x1afb('0xa'),auth['isAuthenticated'](),controller[_0x1afb('0xb')]);router[_0x1afb('0xc')]('/',auth[_0x1afb('0x9')](),interaction[_0x1afb('0xd')](_0x1afb('0xe'),_0x1afb('0xf')),controller[_0x1afb('0x10')]);router['post'](_0x1afb('0x11'),controller['status']);router[_0x1afb('0x12')](_0x1afb('0xa'),auth['isAuthenticated'](),controller[_0x1afb('0x13')]);router[_0x1afb('0x12')](_0x1afb('0x14'),auth[_0x1afb('0x9')](),controller[_0x1afb('0x15')]);router[_0x1afb('0x12')](_0x1afb('0x16'),auth['isAuthenticated'](),controller[_0x1afb('0x17')]);router[_0x1afb('0x18')](_0x1afb('0xa'),auth['isAuthenticated'](),controller['destroy']);module['exports']=router;
\ No newline at end of file
+var _0x4070=['status','update','put','accept','/:id/reject','reject','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/describe','/:id','isAuthenticated','show','post','sms','smsmessage:create','create','/:id/status'];(function(_0x1056fc,_0x42dd68){var _0x527459=function(_0x2003e6){while(--_0x2003e6){_0x1056fc['push'](_0x1056fc['shift']());}};_0x527459(++_0x42dd68);}(_0x4070,0x12b));var _0x0407=function(_0x28c807,_0x5647ac){_0x28c807=_0x28c807-0x0;var _0x1266d2=_0x4070[_0x28c807];return _0x1266d2;};'use strict';var multer=require(_0x0407('0x0'));var util=require('util');var path=require(_0x0407('0x1'));var timeout=require(_0x0407('0x2'));var express=require(_0x0407('0x3'));var router=express[_0x0407('0x4')]();var fs_extra=require(_0x0407('0x5'));var auth=require(_0x0407('0x6'));var interaction=require(_0x0407('0x7'));var config=require(_0x0407('0x8'));var controller=require('./smsMessage.controller');router[_0x0407('0x9')]('/',auth['isAuthenticated'](),controller[_0x0407('0xa')]);router[_0x0407('0x9')](_0x0407('0xb'),auth['isAuthenticated'](),controller['describe']);router[_0x0407('0x9')](_0x0407('0xc'),auth[_0x0407('0xd')](),controller[_0x0407('0xe')]);router[_0x0407('0xf')]('/',auth[_0x0407('0xd')](),interaction['tracked'](_0x0407('0x10'),_0x0407('0x11')),controller[_0x0407('0x12')]);router[_0x0407('0xf')](_0x0407('0x13'),controller[_0x0407('0x14')]);router['put']('/:id',auth[_0x0407('0xd')](),controller[_0x0407('0x15')]);router[_0x0407('0x16')]('/:id/accept',auth['isAuthenticated'](),controller[_0x0407('0x17')]);router['put'](_0x0407('0x18'),auth[_0x0407('0xd')](),controller[_0x0407('0x19')]);router[_0x0407('0x1a')](_0x0407('0xc'),auth[_0x0407('0xd')](),controller[_0x0407('0x1b')]);module[_0x0407('0x1c')]=router;
\ No newline at end of file
index db93b8e..3922c77 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc387=['sequelize','exports','TEXT','BOOLEAN','ENUM','out','DATE','STRING'];(function(_0x46bc65,_0x4278c6){var _0xf97e91=function(_0x145e57){while(--_0x145e57){_0x46bc65['push'](_0x46bc65['shift']());}};_0xf97e91(++_0x4278c6);}(_0xc387,0x168));var _0x7c38=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xc387[_0x14add3];return _0x4a174f;};'use strict';var Sequelize=require(_0x7c38('0x0'));module[_0x7c38('0x1')]={'body':{'type':Sequelize[_0x7c38('0x2')]('medium'),'allowNull':![]},'read':{'type':Sequelize[_0x7c38('0x3')],'defaultValue':![]},'direction':{'type':Sequelize[_0x7c38('0x4')]('in',_0x7c38('0x5')),'defaultValue':_0x7c38('0x5'),'allowNull':![]},'messageId':{'type':Sequelize['STRING'](0xbe)},'phone':{'type':Sequelize['STRING']},'readAt':{'type':Sequelize[_0x7c38('0x6')]},'secret':{'type':Sequelize[_0x7c38('0x3')],'defaultValue':![]},'providerName':{'type':Sequelize[_0x7c38('0x7')]},'providerResponse':{'type':Sequelize[_0x7c38('0x2')]}};
\ No newline at end of file
+var _0x80ce=['BOOLEAN','out','STRING','TEXT','medium'];(function(_0x59bcb1,_0x5a4b6c){var _0x4a737f=function(_0x546a49){while(--_0x546a49){_0x59bcb1['push'](_0x59bcb1['shift']());}};_0x4a737f(++_0x5a4b6c);}(_0x80ce,0xae));var _0xe80c=function(_0x38a83a,_0x4eff6a){_0x38a83a=_0x38a83a-0x0;var _0x349dd7=_0x80ce[_0x38a83a];return _0x349dd7;};'use strict';var Sequelize=require('sequelize');module['exports']={'body':{'type':Sequelize['TEXT'](_0xe80c('0x0')),'allowNull':![]},'read':{'type':Sequelize[_0xe80c('0x1')],'defaultValue':![]},'direction':{'type':Sequelize['ENUM']('in',_0xe80c('0x2')),'defaultValue':_0xe80c('0x2'),'allowNull':![]},'messageId':{'type':Sequelize[_0xe80c('0x3')](0xbe)},'phone':{'type':Sequelize['STRING']},'readAt':{'type':Sequelize['DATE']},'secret':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'providerName':{'type':Sequelize[_0xe80c('0x3')]},'providerResponse':{'type':Sequelize[_0xe80c('0x4')]}};
\ No newline at end of file
index 3b2a711..3ced4a8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x852c=['set','json','apply','reject','save','update','destroy','name','index','map','SmsMessage','rawAttributes','fieldName','type','key','model','keys','filters','intersection','query','attributes','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','rows','show','params','find','create','body','describe','accept','read','readAt','UserId','get','SmsInteractionId','read1stAt','format','interaction','[SMSMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','user','role','null','AcceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','SELECT','contact','User','agent','fullname','email','internal','interface','SIP/%s','channel','motionChannel','event','EventManager','sms-interactions','SmsInteraction','RejectMessage','rejectMessage','QueryTypes','rejectmessage','SmsAccount','received\x20delivery\x20report\x20from','inspect','twilio','MessageSid','SmsAccount,\x20%s,\x20%s,\x20%s','plivo','MessageUUID','messageId','indexOf','sent','delivered','Status','results','DELIVERED','eml-format','rimraf','fast-json-patch','request-promise','mustache','util','path','sox','to-csv','lodash','squel','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','defaults','redis','socket.io-emitter','./smsMessage.socket','register','jayson/promise','client','http','then','info','request\x20sent','debug','SmsMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','SmsMessage,\x20%s,\x20%s','message','result','catch','sendStatus','status','end','offset','undefined','count','limit'];(function(_0x5db4a8,_0x49c56c){var _0x472ccc=function(_0x523493){while(--_0x523493){_0x5db4a8['push'](_0x5db4a8['shift']());}};_0x472ccc(++_0x49c56c);}(_0x852c,0x179));var _0xc852=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x852c[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require(_0xc852('0x0'));var rimraf=require(_0xc852('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xc852('0x2'));var rp=require(_0xc852('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0xc852('0x4'));var util=require(_0xc852('0x5'));var path=require(_0xc852('0x6'));var sox=require(_0xc852('0x7'));var csv=require(_0xc852('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xc852('0x9'));var squel=require(_0xc852('0xa'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xc852('0xb'));var toCsv=require(_0xc852('0x8'));var querystring=require(_0xc852('0xc'));var Papa=require(_0xc852('0xd'));var Redis=require(_0xc852('0xe'));var authService=require(_0xc852('0xf'));var qs=require(_0xc852('0x10'));var as=require(_0xc852('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xc852('0x12'))('api');var utils=require(_0xc852('0x13'));var config=require(_0xc852('0x14'));var licenseUtil=require('../../config/license/util');var db=require(_0xc852('0x15'))['db'];config['redis']=_[_0xc852('0x16')](config[_0xc852('0x17')],{'host':'localhost','port':0x18eb});var socket=require(_0xc852('0x18'))(new Redis(config['redis']));require(_0xc852('0x19'))[_0xc852('0x1a')](socket);var jayson=require(_0xc852('0x1b'));var client=jayson[_0xc852('0x1c')][_0xc852('0x1d')]({'port':0x232c});var client9002=jayson[_0xc852('0x1c')][_0xc852('0x1d')]({'port':0x232a});function respondWithRpcPromise(_0x4c6429,_0x4f3095,_0x112291,_0x1c9072){return new BPromise(function(_0x4c38d7,_0x4d0e96){var _0x23968d=_0x1c9072||client;return _0x23968d['request'](_0x4c6429,_0x112291)[_0xc852('0x1e')](function(_0x4e8c45){logger[_0xc852('0x1f')]('SmsMessage,\x20%s,\x20%s',_0x4f3095,_0xc852('0x20'));logger[_0xc852('0x21')](_0xc852('0x22'),_0x4f3095,_0xc852('0x20'),JSON[_0xc852('0x23')](_0x4e8c45));if(_0x4e8c45[_0xc852('0x24')]){if(_0x4e8c45[_0xc852('0x24')][_0xc852('0x25')]===0x1f4){logger['error'](_0xc852('0x26'),_0x4f3095,_0x4e8c45[_0xc852('0x24')]['message']);return _0x4d0e96(_0x4e8c45[_0xc852('0x24')][_0xc852('0x27')]);}logger[_0xc852('0x24')](_0xc852('0x26'),_0x4f3095,_0x4e8c45[_0xc852('0x24')]['message']);return _0x4c38d7(_0x4e8c45[_0xc852('0x24')]['message']);}else{logger[_0xc852('0x1f')](_0xc852('0x26'),_0x4f3095,_0xc852('0x20'));_0x4c38d7(_0x4e8c45[_0xc852('0x28')][_0xc852('0x27')]);}})[_0xc852('0x29')](function(_0xcc516a){logger['error'](_0xc852('0x26'),_0x4f3095,_0xcc516a);_0x4d0e96(_0xcc516a);});});}function respondWithStatusCode(_0x74d88a,_0x354d67){_0x354d67=_0x354d67||0xcc;return function(_0x1a1327){if(_0x1a1327){return _0x74d88a[_0xc852('0x2a')](_0x354d67);}return _0x74d88a[_0xc852('0x2b')](_0x354d67)[_0xc852('0x2c')]();};}function respondWithResult(_0x5bac8c,_0xda00c5){_0xda00c5=_0xda00c5||0xc8;return function(_0x1c52dc){if(_0x1c52dc){return _0x5bac8c[_0xc852('0x2b')](_0xda00c5)['json'](_0x1c52dc);}};}function respondWithFilteredResult(_0x1266e0,_0x49f65){return function(_0x118df9){if(_0x118df9){var _0x18c72f=typeof _0x49f65[_0xc852('0x2d')]===_0xc852('0x2e')&&typeof _0x49f65['limit']===_0xc852('0x2e');var _0x2d6aa7=_0x118df9[_0xc852('0x2f')];var _0x53d5a1=_0x18c72f?0x0:_0x49f65[_0xc852('0x2d')];var _0x1895e0=_0x18c72f?_0x118df9['count']:_0x49f65[_0xc852('0x2d')]+_0x49f65[_0xc852('0x30')];var _0x428702;if(_0x1895e0>=_0x2d6aa7){_0x1895e0=_0x2d6aa7;_0x428702=0xc8;}else{_0x428702=0xce;}_0x1266e0[_0xc852('0x2b')](_0x428702);return _0x1266e0[_0xc852('0x31')]('Content-Range',_0x53d5a1+'-'+_0x1895e0+'/'+_0x2d6aa7)[_0xc852('0x32')](_0x118df9);}return null;};}function patchUpdates(_0x20da7f){return function(_0x47e04d){try{jsonpatch[_0xc852('0x33')](_0x47e04d,_0x20da7f,!![]);}catch(_0xbba04e){return BPromise[_0xc852('0x34')](_0xbba04e);}return _0x47e04d[_0xc852('0x35')]();};}function saveUpdates(_0x5c0a99,_0x4c6c06){return function(_0x1a86b8){if(_0x1a86b8){return _0x1a86b8[_0xc852('0x36')](_0x5c0a99)['then'](function(_0x6ef3f2){return _0x6ef3f2;});}return null;};}function removeEntity(_0x48704d,_0x5f1754){return function(_0xc16ad5){if(_0xc16ad5){return _0xc16ad5[_0xc852('0x37')]()[_0xc852('0x1e')](function(){_0x48704d['status'](0xcc)[_0xc852('0x2c')]();});}};}function handleEntityNotFound(_0x555cd1,_0x5547bf){return function(_0x23440a){if(!_0x23440a){_0x555cd1[_0xc852('0x2a')](0x194);}return _0x23440a;};}function handleError(_0x3acdbe,_0x4d606e){_0x4d606e=_0x4d606e||0x1f4;return function(_0x2d6b0c){logger[_0xc852('0x24')](_0x2d6b0c['stack']);if(_0x2d6b0c[_0xc852('0x38')]){delete _0x2d6b0c[_0xc852('0x38')];}_0x3acdbe[_0xc852('0x2b')](_0x4d606e)['send'](_0x2d6b0c);};}exports[_0xc852('0x39')]=function(_0x1b610d,_0x1001db){var _0x2cb3e0={},_0x2ed2cc={},_0x93ec8e={'count':0x0,'rows':[]};var _0x1f9c48=_[_0xc852('0x3a')](db[_0xc852('0x3b')][_0xc852('0x3c')],function(_0x17c543){return{'name':_0x17c543[_0xc852('0x3d')],'type':_0x17c543[_0xc852('0x3e')][_0xc852('0x3f')]};});_0x2ed2cc[_0xc852('0x40')]=_[_0xc852('0x3a')](_0x1f9c48,_0xc852('0x38'));_0x2ed2cc['query']=_[_0xc852('0x41')](_0x1b610d['query']);_0x2ed2cc[_0xc852('0x42')]=_[_0xc852('0x43')](_0x2ed2cc[_0xc852('0x40')],_0x2ed2cc[_0xc852('0x44')]);_0x2cb3e0[_0xc852('0x45')]=_['intersection'](_0x2ed2cc[_0xc852('0x40')],qs[_0xc852('0x46')](_0x1b610d['query'][_0xc852('0x46')]));_0x2cb3e0[_0xc852('0x45')]=_0x2cb3e0[_0xc852('0x45')][_0xc852('0x47')]?_0x2cb3e0['attributes']:_0x2ed2cc[_0xc852('0x40')];if(!_0x1b610d[_0xc852('0x44')][_0xc852('0x48')](_0xc852('0x49'))){_0x2cb3e0['limit']=qs[_0xc852('0x30')](_0x1b610d[_0xc852('0x44')][_0xc852('0x30')]);_0x2cb3e0[_0xc852('0x2d')]=qs[_0xc852('0x2d')](_0x1b610d[_0xc852('0x44')][_0xc852('0x2d')]);}_0x2cb3e0['order']=qs['sort'](_0x1b610d['query'][_0xc852('0x4a')]);_0x2cb3e0[_0xc852('0x4b')]=qs[_0xc852('0x42')](_[_0xc852('0x4c')](_0x1b610d[_0xc852('0x44')],_0x2ed2cc[_0xc852('0x42')]),_0x1f9c48);if(_0x1b610d[_0xc852('0x44')][_0xc852('0x4d')]){_0x2cb3e0[_0xc852('0x4b')]=_[_0xc852('0x4e')](_0x2cb3e0[_0xc852('0x4b')],{'$or':_['map'](_0x1f9c48,function(_0x428286){if(_0x428286[_0xc852('0x3e')]!==_0xc852('0x4f')){var _0x11fc77={};_0x11fc77[_0x428286[_0xc852('0x38')]]={'$like':'%'+_0x1b610d[_0xc852('0x44')][_0xc852('0x4d')]+'%'};return _0x11fc77;}})});}_0x2cb3e0=_[_0xc852('0x4e')]({},_0x2cb3e0,_0x1b610d[_0xc852('0x50')]);var _0x351f4f={'where':_0x2cb3e0[_0xc852('0x4b')]};return db[_0xc852('0x3b')][_0xc852('0x2f')](_0x351f4f)[_0xc852('0x1e')](function(_0x5b9164){_0x93ec8e[_0xc852('0x2f')]=_0x5b9164;if(_0x1b610d[_0xc852('0x44')][_0xc852('0x51')]){_0x2cb3e0[_0xc852('0x52')]=[{'all':!![]}];}return db[_0xc852('0x3b')]['findAll'](_0x2cb3e0);})[_0xc852('0x1e')](function(_0x96abea){_0x93ec8e[_0xc852('0x53')]=_0x96abea;return _0x93ec8e;})[_0xc852('0x1e')](respondWithFilteredResult(_0x1001db,_0x2cb3e0))[_0xc852('0x29')](handleError(_0x1001db,null));};exports[_0xc852('0x54')]=function(_0x2cbc92,_0x181752){var _0x4331e7={'raw':!![],'where':{'id':_0x2cbc92[_0xc852('0x55')]['id']}},_0xcbb110={};_0xcbb110['model']=_[_0xc852('0x41')](db[_0xc852('0x3b')]['rawAttributes']);_0xcbb110[_0xc852('0x44')]=_[_0xc852('0x41')](_0x2cbc92['query']);_0xcbb110[_0xc852('0x42')]=_[_0xc852('0x43')](_0xcbb110['model'],_0xcbb110[_0xc852('0x44')]);_0x4331e7[_0xc852('0x45')]=_['intersection'](_0xcbb110[_0xc852('0x40')],qs[_0xc852('0x46')](_0x2cbc92['query'][_0xc852('0x46')]));_0x4331e7[_0xc852('0x45')]=_0x4331e7[_0xc852('0x45')][_0xc852('0x47')]?_0x4331e7[_0xc852('0x45')]:_0xcbb110[_0xc852('0x40')];if(_0x2cbc92[_0xc852('0x44')]['includeAll']){_0x4331e7[_0xc852('0x52')]=[{'all':!![]}];}_0x4331e7=_[_0xc852('0x4e')]({},_0x4331e7,_0x2cbc92[_0xc852('0x50')]);return db[_0xc852('0x3b')][_0xc852('0x56')](_0x4331e7)[_0xc852('0x1e')](handleEntityNotFound(_0x181752,null))[_0xc852('0x1e')](respondWithResult(_0x181752,null))[_0xc852('0x29')](handleError(_0x181752,null));};exports[_0xc852('0x57')]=function(_0x1d5fd1,_0x40c171){return db[_0xc852('0x3b')][_0xc852('0x57')](_0x1d5fd1[_0xc852('0x58')],{})['then'](respondWithResult(_0x40c171,0xc9))[_0xc852('0x29')](handleError(_0x40c171,null));};exports['update']=function(_0x427f1b,_0x45af4c){if(_0x427f1b[_0xc852('0x58')]['id']){delete _0x427f1b[_0xc852('0x58')]['id'];}return db['SmsMessage']['find']({'where':{'id':_0x427f1b['params']['id']}})[_0xc852('0x1e')](handleEntityNotFound(_0x45af4c,null))[_0xc852('0x1e')](saveUpdates(_0x427f1b['body'],null))[_0xc852('0x1e')](respondWithResult(_0x45af4c,null))['catch'](handleError(_0x45af4c,null));};exports[_0xc852('0x37')]=function(_0x558b73,_0x2dcd68){return db[_0xc852('0x3b')]['find']({'where':{'id':_0x558b73[_0xc852('0x55')]['id']}})[_0xc852('0x1e')](handleEntityNotFound(_0x2dcd68,null))[_0xc852('0x1e')](removeEntity(_0x2dcd68,null))[_0xc852('0x29')](handleError(_0x2dcd68,null));};exports['describe']=function(_0x5ae986,_0x32f5ec){return db[_0xc852('0x3b')][_0xc852('0x59')]()['then'](respondWithResult(_0x32f5ec,null))[_0xc852('0x29')](handleError(_0x32f5ec,null));};var interaction_log=require(_0xc852('0x12'))('sms-interactions');exports[_0xc852('0x5a')]=function(_0x2738c1,_0x489e33,_0xde481d){var _0x4897eb={'agent':{},'channel':'sms'};if(_0x2738c1[_0xc852('0x58')]['id']){delete _0x2738c1[_0xc852('0x58')]['id'];}_0x2738c1[_0xc852('0x58')][_0xc852('0x5b')]=!![];_0x2738c1[_0xc852('0x58')][_0xc852('0x5c')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x2738c1[_0xc852('0x58')][_0xc852('0x5d')]=_0x2738c1[_0xc852('0x58')][_0xc852('0x5d')]||_0x2738c1['user']['id'];_0x4897eb['agent']['id']=_0x2738c1[_0xc852('0x58')][_0xc852('0x5d')];return db[_0xc852('0x3b')]['find']({'where':{'id':_0x2738c1[_0xc852('0x55')]['id'],'UserId':null}})[_0xc852('0x1e')](handleEntityNotFound(_0x489e33,null))['then'](saveUpdates(_0x2738c1['body'],null))[_0xc852('0x1e')](function(_0x4fcfea){if(_0x4fcfea){_0x4897eb[_0xc852('0x27')]=_0x4fcfea[_0xc852('0x5e')]({'plain':!![]});return db['SmsInteraction'][_0xc852('0x56')]({'where':{'id':_0x4fcfea[_0xc852('0x5f')]}});}return null;})['then'](handleEntityNotFound(_0x489e33,null))[_0xc852('0x1e')](function(_0x31ef41){if(_0x31ef41){return _0x31ef41[_0xc852('0x36')]({'UserId':_0x2738c1[_0xc852('0x58')][_0xc852('0x5d')],'read1stAt':_['isNil'](_0x31ef41[_0xc852('0x60')])?moment()[_0xc852('0x61')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0xc852('0x1e')](function(_0x119cb5){if(_0x119cb5){_0x4897eb[_0xc852('0x62')]=_0x119cb5['get']({'plain':!![]});interaction_log[_0xc852('0x1f')](_0xc852('0x63'),_0x2738c1[_0xc852('0x64')]['id'],_0x2738c1['user'][_0xc852('0x38')],_0x2738c1['user'][_0xc852('0x65')],_0x4897eb[_0xc852('0x62')]['id'],_0x2738c1[_0xc852('0x58')]?JSON['stringify'](_0x2738c1[_0xc852('0x58')]):_0xc852('0x66'));return respondWithRpcPromise(_0xc852('0x67'),'acceptMessage',_0x4897eb);}return null;})['then'](function(_0x4fa9b6){var _0xc106a5=_0xc852('0x68')+_0x4fa9b6['message'][_0xc852('0x69')];return db[_0xc852('0x6a')][_0xc852('0x44')](_0xc106a5,{'type':db[_0xc852('0x6b')]['QueryTypes'][_0xc852('0x6c')],'raw':!![]})[_0xc852('0x1e')](function(_0x5cfff0){return _0x5cfff0;});})[_0xc852('0x1e')](function(_0x1cc613){if(_0x1cc613){_0x4897eb[_0xc852('0x27')][_0xc852('0x6d')]=_0x1cc613[0x0];if(!_0x2738c1[_0xc852('0x58')][_0xc852('0x5d')])return;return db[_0xc852('0x6e')]['find']({'where':{'id':_0x2738c1[_0xc852('0x58')]['UserId'],'role':_0xc852('0x6f')},'attributes':['id',_0xc852('0x38'),_0xc852('0x70'),_0xc852('0x71'),_0xc852('0x72')],'raw':!![]});}return null;})[_0xc852('0x1e')](function(_0x1811ea){if(!_0x1811ea)return null;_0x4897eb[_0xc852('0x27')][_0xc852('0x6f')]=_0x1811ea;return _0x4897eb;})[_0xc852('0x1e')](function(_0x6cbcbd){if(_0x6cbcbd){if(_0x2738c1['body']['manual']){_0x4897eb[_0xc852('0x27')][_0xc852('0x73')]=util[_0xc852('0x61')](_0xc852('0x74'),_0x2738c1[_0xc852('0x64')][_0xc852('0x38')]);_0x4897eb[_0xc852('0x27')]['channel']=_0x4897eb[_0xc852('0x75')];_0x4897eb['message'][_0xc852('0x76')]=_0x4897eb['channel'];_0x4897eb['message'][_0xc852('0x77')]=_0xc852('0x5a');return respondWithRpcPromise(_0xc852('0x78'),_0xc852('0x78'),{'event':'acceptmessage','message':_0x4897eb[_0xc852('0x27')]},client9002)[_0xc852('0x1e')](function(){return _0x4897eb;});}return _0x4897eb;}return null;})[_0xc852('0x1e')](respondWithResult(_0x489e33,null))['catch'](handleError(_0x489e33,null));};var interaction_log=require('../../config/logger')(_0xc852('0x79'));exports[_0xc852('0x34')]=function(_0x312b8a,_0x6eefe0,_0x16cbed){var _0x21ac24={'agent':{},'channel':'sms'};if(_0x312b8a[_0xc852('0x58')]['id']){delete _0x312b8a['body']['id'];}_0x312b8a[_0xc852('0x58')]['UserId']=_0x312b8a['body']['UserId']||_0x312b8a[_0xc852('0x64')]['id'];_0x21ac24[_0xc852('0x6f')]['id']=_0x312b8a[_0xc852('0x58')][_0xc852('0x5d')];return db[_0xc852('0x3b')][_0xc852('0x56')]({'where':{'id':_0x312b8a['params']['id'],'UserId':null}})[_0xc852('0x1e')](handleEntityNotFound(_0x6eefe0,null))[_0xc852('0x1e')](function(_0xcdb4d1){if(_0xcdb4d1){_0x21ac24[_0xc852('0x27')]=_0xcdb4d1[_0xc852('0x5e')]({'plain':!![]});return db[_0xc852('0x7a')][_0xc852('0x56')]({'where':{'id':_0xcdb4d1['SmsInteractionId']}});}return null;})[_0xc852('0x1e')](handleEntityNotFound(_0x6eefe0,null))['then'](function(_0x3cdf8f){if(_0x3cdf8f){_0x21ac24[_0xc852('0x62')]=_0x3cdf8f['get']({'plain':!![]});interaction_log[_0xc852('0x1f')]('[SMSMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x312b8a[_0xc852('0x64')]['id'],_0x312b8a[_0xc852('0x64')][_0xc852('0x38')],_0x312b8a[_0xc852('0x64')][_0xc852('0x65')],_0x21ac24['interaction']['id'],_0x312b8a[_0xc852('0x58')]?JSON[_0xc852('0x23')](_0x312b8a[_0xc852('0x58')]):'null');return respondWithRpcPromise(_0xc852('0x7b'),_0xc852('0x7c'),_0x21ac24);}return null;})['then'](function(_0xd5dac2){var _0x373b14=_0xc852('0x68')+_0xd5dac2[_0xc852('0x27')]['ContactId'];return db['sequelize'][_0xc852('0x44')](_0x373b14,{'type':db[_0xc852('0x6b')][_0xc852('0x7d')][_0xc852('0x6c')],'raw':!![]})[_0xc852('0x1e')](function(_0x18ea1a){return _0x18ea1a;});})[_0xc852('0x1e')](function(_0x5f061c){if(_0x5f061c){_0x21ac24[_0xc852('0x27')][_0xc852('0x6d')]=_0x5f061c[0x0];if(!_0x312b8a[_0xc852('0x58')][_0xc852('0x5d')])return;return db[_0xc852('0x6e')][_0xc852('0x56')]({'where':{'id':_0x312b8a[_0xc852('0x58')][_0xc852('0x5d')],'role':_0xc852('0x6f')},'attributes':['id','name',_0xc852('0x70'),_0xc852('0x71'),_0xc852('0x72')],'raw':!![]});}return null;})['then'](function(_0x5cfbde){if(!_0x5cfbde)return null;_0x21ac24[_0xc852('0x27')][_0xc852('0x6f')]=_0x5cfbde;return _0x21ac24;})[_0xc852('0x1e')](function(_0x13d36c){if(_0x13d36c){_0x13d36c['message'][_0xc852('0x73')]=util[_0xc852('0x61')](_0xc852('0x74'),_0x312b8a[_0xc852('0x64')][_0xc852('0x38')]);_0x13d36c[_0xc852('0x27')]['channel']=_0x21ac24[_0xc852('0x75')];_0x13d36c['message']['motionChannel']=_0x21ac24[_0xc852('0x75')];_0x13d36c[_0xc852('0x27')][_0xc852('0x77')]=_0xc852('0x34');respondWithRpcPromise(_0xc852('0x78'),_0xc852('0x78'),{'event':_0xc852('0x7e'),'message':_0x13d36c[_0xc852('0x27')]},client9002);return _0x21ac24;}return null;})['then'](respondWithResult(_0x6eefe0,null))[_0xc852('0x29')](handleError(_0x6eefe0,null));};exports[_0xc852('0x2b')]=function(_0x50b582,_0x2ea5f8,_0x41bb7d){if(_0x50b582['body']['id']){delete _0x50b582[_0xc852('0x58')]['id'];}var _0x581397;return db[_0xc852('0x3b')][_0xc852('0x56')]({'where':{'id':_0x50b582[_0xc852('0x55')]['id']}})[_0xc852('0x1e')](handleEntityNotFound(_0x2ea5f8,null))['then'](function(_0x33f7cd){if(_0x33f7cd){_0x581397=_0x33f7cd;return db[_0xc852('0x7f')]['find']({'where':{'id':_0x33f7cd['SmsAccountId']}});}})[_0xc852('0x1e')](handleEntityNotFound(_0x2ea5f8,null))[_0xc852('0x1e')](function(_0x16b9cf){if(_0x16b9cf){logger[_0xc852('0x21')](_0xc852('0x22'),_0xc852('0x2b'),_0xc852('0x80'),_0x16b9cf[_0xc852('0x3e')],util[_0xc852('0x81')](_0x50b582['body'],{'showHidden':![],'depth':null}));switch(_0x16b9cf[_0xc852('0x3e')]){case _0xc852('0x82'):if(_0x50b582[_0xc852('0x58')][_0xc852('0x83')]&&_0x50b582[_0xc852('0x58')][_0xc852('0x83')]===_0x581397['messageId']){return _0x581397[_0xc852('0x36')]({'read':!![]});}else{logger[_0xc852('0x24')](_0xc852('0x84'),_0xc852('0x2b'),'twilio',util[_0xc852('0x81')](_0x50b582[_0xc852('0x58')],{'showHidden':![],'depth':null}));}break;case _0xc852('0x85'):if(_0x50b582[_0xc852('0x58')][_0xc852('0x86')]&&_0x50b582[_0xc852('0x58')][_0xc852('0x86')]===_0x581397[_0xc852('0x87')]&&_[_0xc852('0x88')]([_0xc852('0x89'),_0xc852('0x8a')],_0x50b582['body'][_0xc852('0x8b')])>=0x0){return _0x581397['update']({'read':!![]});}else{logger[_0xc852('0x24')](_0xc852('0x84'),_0xc852('0x2b'),'plivio',util[_0xc852('0x81')](_0x50b582[_0xc852('0x58')],{'showHidden':![],'depth':null}));}break;case'infobip':var _0x4c4ae5=_0x50b582[_0xc852('0x58')][_0xc852('0x8c')][0x0];if(_0x4c4ae5['status']['groupName']===_0xc852('0x8d')){return _0x581397[_0xc852('0x36')]({'read':!![]});}else{logger[_0xc852('0x24')](_0xc852('0x84'),'status','infobip',util[_0xc852('0x81')](_0x50b582[_0xc852('0x58')],{'showHidden':![],'depth':null}));}break;}return _0x581397;}})[_0xc852('0x1e')](respondWithResult(_0x2ea5f8,null))[_0xc852('0x29')](handleError(_0x2ea5f8,null));};
\ No newline at end of file
+var _0x30d4=['model','map','query','keys','filters','attributes','intersection','length','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','includeAll','findAll','rows','catch','show','params','fields','include','find','create','update','body','describe','accept','sms','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','get','SmsInteraction','SmsInteractionId','read1stAt','interaction','[SMSMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','null','AcceptMessage','acceptMessage','ContactId','Sequelize','QueryTypes','SELECT','contact','User','fullname','email','internal','manual','interface','SIP/%s','channel','motionChannel','EventManager','acceptmessage','sms-interactions','RejectMessage','rejectMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','sequelize','rejectmessage','SmsAccount','SmsMessage,\x20%s,\x20%s,\x20%s','received\x20delivery\x20report\x20from','inspect','twilio','MessageSid','messageId','plivo','indexOf','sent','delivered','Status','SmsAccount,\x20%s,\x20%s,\x20%s','plivio','infobip','results','groupName','DELIVERED','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','./smsMessage.socket','client','http','request','info','SmsMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message','result','sendStatus','end','json','offset','undefined','count','limit','Content-Range','apply','save','then','destroy','status','stack','name','send','index','SmsMessage','rawAttributes','fieldName','type','key'];(function(_0x3908ad,_0x54ccd7){var _0x22f133=function(_0xd29958){while(--_0xd29958){_0x3908ad['push'](_0x3908ad['shift']());}};_0x22f133(++_0x54ccd7);}(_0x30d4,0xed));var _0x430d=function(_0x4154a6,_0x2c0b8e){_0x4154a6=_0x4154a6-0x0;var _0x3b2786=_0x30d4[_0x4154a6];return _0x3b2786;};'use strict';var emlformat=require(_0x430d('0x0'));var rimraf=require(_0x430d('0x1'));var zipdir=require(_0x430d('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x430d('0x3'));var moment=require('moment');var BPromise=require(_0x430d('0x4'));var Mustache=require(_0x430d('0x5'));var util=require('util');var path=require(_0x430d('0x6'));var sox=require(_0x430d('0x7'));var csv=require(_0x430d('0x8'));var ejs=require(_0x430d('0x9'));var fs=require('fs');var fs_extra=require(_0x430d('0xa'));var _=require('lodash');var squel=require(_0x430d('0xb'));var crypto=require(_0x430d('0xc'));var jsforce=require(_0x430d('0xd'));var deskjs=require(_0x430d('0xe'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x430d('0xf'));var Redis=require(_0x430d('0x10'));var authService=require(_0x430d('0x11'));var qs=require(_0x430d('0x12'));var as=require(_0x430d('0x13'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x430d('0x14'))(_0x430d('0x15'));var utils=require(_0x430d('0x16'));var config=require(_0x430d('0x17'));var licenseUtil=require(_0x430d('0x18'));var db=require(_0x430d('0x19'))['db'];config[_0x430d('0x1a')]=_['defaults'](config[_0x430d('0x1a')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x430d('0x1b'))['register'](socket);var jayson=require('jayson/promise');var client=jayson[_0x430d('0x1c')][_0x430d('0x1d')]({'port':0x232c});var client9002=jayson[_0x430d('0x1c')][_0x430d('0x1d')]({'port':0x232a});function respondWithRpcPromise(_0xd58ed3,_0x597048,_0x4a67b9,_0x3e3fac){return new BPromise(function(_0x19e448,_0x4fc8de){var _0xa1b0a=_0x3e3fac||client;return _0xa1b0a[_0x430d('0x1e')](_0xd58ed3,_0x4a67b9)['then'](function(_0x573422){logger[_0x430d('0x1f')](_0x430d('0x20'),_0x597048,_0x430d('0x21'));logger[_0x430d('0x22')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x597048,_0x430d('0x21'),JSON[_0x430d('0x23')](_0x573422));if(_0x573422[_0x430d('0x24')]){if(_0x573422[_0x430d('0x24')]['code']===0x1f4){logger['error'](_0x430d('0x20'),_0x597048,_0x573422[_0x430d('0x24')]['message']);return _0x4fc8de(_0x573422[_0x430d('0x24')][_0x430d('0x25')]);}logger[_0x430d('0x24')]('SmsMessage,\x20%s,\x20%s',_0x597048,_0x573422[_0x430d('0x24')][_0x430d('0x25')]);return _0x19e448(_0x573422[_0x430d('0x24')][_0x430d('0x25')]);}else{logger[_0x430d('0x1f')]('SmsMessage,\x20%s,\x20%s',_0x597048,'request\x20sent');_0x19e448(_0x573422[_0x430d('0x26')][_0x430d('0x25')]);}})['catch'](function(_0x4622c2){logger[_0x430d('0x24')](_0x430d('0x20'),_0x597048,_0x4622c2);_0x4fc8de(_0x4622c2);});});}function respondWithStatusCode(_0x5d004c,_0x5c46e5){_0x5c46e5=_0x5c46e5||0xcc;return function(_0x5f11a1){if(_0x5f11a1){return _0x5d004c[_0x430d('0x27')](_0x5c46e5);}return _0x5d004c['status'](_0x5c46e5)[_0x430d('0x28')]();};}function respondWithResult(_0x19f1d1,_0x44da24){_0x44da24=_0x44da24||0xc8;return function(_0x5a3fa3){if(_0x5a3fa3){return _0x19f1d1['status'](_0x44da24)[_0x430d('0x29')](_0x5a3fa3);}};}function respondWithFilteredResult(_0x4bfb7b,_0x1dbca2){return function(_0x3db5c3){if(_0x3db5c3){var _0x37df46=typeof _0x1dbca2[_0x430d('0x2a')]===_0x430d('0x2b')&&typeof _0x1dbca2['limit']===_0x430d('0x2b');var _0x38bf20=_0x3db5c3[_0x430d('0x2c')];var _0x32907d=_0x37df46?0x0:_0x1dbca2[_0x430d('0x2a')];var _0x2dfe1c=_0x37df46?_0x3db5c3[_0x430d('0x2c')]:_0x1dbca2[_0x430d('0x2a')]+_0x1dbca2[_0x430d('0x2d')];var _0x4a3614;if(_0x2dfe1c>=_0x38bf20){_0x2dfe1c=_0x38bf20;_0x4a3614=0xc8;}else{_0x4a3614=0xce;}_0x4bfb7b['status'](_0x4a3614);return _0x4bfb7b['set'](_0x430d('0x2e'),_0x32907d+'-'+_0x2dfe1c+'/'+_0x38bf20)[_0x430d('0x29')](_0x3db5c3);}return null;};}function patchUpdates(_0x4d9bf1){return function(_0x1f19c1){try{jsonpatch[_0x430d('0x2f')](_0x1f19c1,_0x4d9bf1,!![]);}catch(_0xcfede5){return BPromise['reject'](_0xcfede5);}return _0x1f19c1[_0x430d('0x30')]();};}function saveUpdates(_0x28ac59,_0xe6397c){return function(_0x531785){if(_0x531785){return _0x531785['update'](_0x28ac59)[_0x430d('0x31')](function(_0x44a1d2){return _0x44a1d2;});}return null;};}function removeEntity(_0x578a3f,_0x4385d5){return function(_0x3eb8c2){if(_0x3eb8c2){return _0x3eb8c2[_0x430d('0x32')]()[_0x430d('0x31')](function(){_0x578a3f[_0x430d('0x33')](0xcc)[_0x430d('0x28')]();});}};}function handleEntityNotFound(_0x3c2278,_0x1cd9f3){return function(_0x3dbc61){if(!_0x3dbc61){_0x3c2278[_0x430d('0x27')](0x194);}return _0x3dbc61;};}function handleError(_0x23a1e6,_0x10ef06){_0x10ef06=_0x10ef06||0x1f4;return function(_0x486476){logger[_0x430d('0x24')](_0x486476[_0x430d('0x34')]);if(_0x486476[_0x430d('0x35')]){delete _0x486476[_0x430d('0x35')];}_0x23a1e6[_0x430d('0x33')](_0x10ef06)[_0x430d('0x36')](_0x486476);};}exports[_0x430d('0x37')]=function(_0x1f063a,_0x20f019){var _0x463fde={},_0x2e518d={},_0xb9987={'count':0x0,'rows':[]};var _0x5e574b=_['map'](db[_0x430d('0x38')][_0x430d('0x39')],function(_0x5c8424){return{'name':_0x5c8424[_0x430d('0x3a')],'type':_0x5c8424[_0x430d('0x3b')][_0x430d('0x3c')]};});_0x2e518d[_0x430d('0x3d')]=_[_0x430d('0x3e')](_0x5e574b,'name');_0x2e518d[_0x430d('0x3f')]=_[_0x430d('0x40')](_0x1f063a['query']);_0x2e518d[_0x430d('0x41')]=_['intersection'](_0x2e518d[_0x430d('0x3d')],_0x2e518d[_0x430d('0x3f')]);_0x463fde[_0x430d('0x42')]=_[_0x430d('0x43')](_0x2e518d[_0x430d('0x3d')],qs['fields'](_0x1f063a[_0x430d('0x3f')]['fields']));_0x463fde['attributes']=_0x463fde[_0x430d('0x42')][_0x430d('0x44')]?_0x463fde[_0x430d('0x42')]:_0x2e518d[_0x430d('0x3d')];if(!_0x1f063a[_0x430d('0x3f')]['hasOwnProperty'](_0x430d('0x45'))){_0x463fde[_0x430d('0x2d')]=qs[_0x430d('0x2d')](_0x1f063a[_0x430d('0x3f')][_0x430d('0x2d')]);_0x463fde[_0x430d('0x2a')]=qs[_0x430d('0x2a')](_0x1f063a[_0x430d('0x3f')]['offset']);}_0x463fde[_0x430d('0x46')]=qs[_0x430d('0x47')](_0x1f063a[_0x430d('0x3f')]['sort']);_0x463fde[_0x430d('0x48')]=qs[_0x430d('0x41')](_[_0x430d('0x49')](_0x1f063a[_0x430d('0x3f')],_0x2e518d[_0x430d('0x41')]),_0x5e574b);if(_0x1f063a[_0x430d('0x3f')][_0x430d('0x4a')]){_0x463fde[_0x430d('0x48')]=_[_0x430d('0x4b')](_0x463fde[_0x430d('0x48')],{'$or':_[_0x430d('0x3e')](_0x5e574b,function(_0x10a269){if(_0x10a269[_0x430d('0x3b')]!==_0x430d('0x4c')){var _0xd0b90e={};_0xd0b90e[_0x10a269['name']]={'$like':'%'+_0x1f063a[_0x430d('0x3f')][_0x430d('0x4a')]+'%'};return _0xd0b90e;}})});}_0x463fde=_[_0x430d('0x4b')]({},_0x463fde,_0x1f063a['options']);var _0x149ec8={'where':_0x463fde[_0x430d('0x48')]};return db[_0x430d('0x38')]['count'](_0x149ec8)['then'](function(_0xcba4df){_0xb9987[_0x430d('0x2c')]=_0xcba4df;if(_0x1f063a[_0x430d('0x3f')][_0x430d('0x4d')]){_0x463fde['include']=[{'all':!![]}];}return db[_0x430d('0x38')][_0x430d('0x4e')](_0x463fde);})[_0x430d('0x31')](function(_0x27e58e){_0xb9987[_0x430d('0x4f')]=_0x27e58e;return _0xb9987;})[_0x430d('0x31')](respondWithFilteredResult(_0x20f019,_0x463fde))[_0x430d('0x50')](handleError(_0x20f019,null));};exports[_0x430d('0x51')]=function(_0x27ddfd,_0x1a0b7f){var _0x2ca06a={'raw':!![],'where':{'id':_0x27ddfd[_0x430d('0x52')]['id']}},_0x5b2eba={};_0x5b2eba['model']=_[_0x430d('0x40')](db['SmsMessage']['rawAttributes']);_0x5b2eba[_0x430d('0x3f')]=_[_0x430d('0x40')](_0x27ddfd[_0x430d('0x3f')]);_0x5b2eba[_0x430d('0x41')]=_[_0x430d('0x43')](_0x5b2eba[_0x430d('0x3d')],_0x5b2eba['query']);_0x2ca06a[_0x430d('0x42')]=_['intersection'](_0x5b2eba[_0x430d('0x3d')],qs[_0x430d('0x53')](_0x27ddfd[_0x430d('0x3f')][_0x430d('0x53')]));_0x2ca06a[_0x430d('0x42')]=_0x2ca06a[_0x430d('0x42')][_0x430d('0x44')]?_0x2ca06a[_0x430d('0x42')]:_0x5b2eba[_0x430d('0x3d')];if(_0x27ddfd[_0x430d('0x3f')]['includeAll']){_0x2ca06a[_0x430d('0x54')]=[{'all':!![]}];}_0x2ca06a=_['merge']({},_0x2ca06a,_0x27ddfd['options']);return db[_0x430d('0x38')][_0x430d('0x55')](_0x2ca06a)[_0x430d('0x31')](handleEntityNotFound(_0x1a0b7f,null))['then'](respondWithResult(_0x1a0b7f,null))['catch'](handleError(_0x1a0b7f,null));};exports[_0x430d('0x56')]=function(_0x54c37b,_0x3351df){return db[_0x430d('0x38')]['create'](_0x54c37b['body'],{})['then'](respondWithResult(_0x3351df,0xc9))[_0x430d('0x50')](handleError(_0x3351df,null));};exports[_0x430d('0x57')]=function(_0xa2fef6,_0x5f4e60){if(_0xa2fef6[_0x430d('0x58')]['id']){delete _0xa2fef6['body']['id'];}return db['SmsMessage']['find']({'where':{'id':_0xa2fef6[_0x430d('0x52')]['id']}})[_0x430d('0x31')](handleEntityNotFound(_0x5f4e60,null))['then'](saveUpdates(_0xa2fef6[_0x430d('0x58')],null))[_0x430d('0x31')](respondWithResult(_0x5f4e60,null))['catch'](handleError(_0x5f4e60,null));};exports['destroy']=function(_0x437b7c,_0x2b7e0c){return db[_0x430d('0x38')][_0x430d('0x55')]({'where':{'id':_0x437b7c[_0x430d('0x52')]['id']}})['then'](handleEntityNotFound(_0x2b7e0c,null))[_0x430d('0x31')](removeEntity(_0x2b7e0c,null))[_0x430d('0x50')](handleError(_0x2b7e0c,null));};exports['describe']=function(_0x5f2e97,_0x5f064f){return db[_0x430d('0x38')][_0x430d('0x59')]()[_0x430d('0x31')](respondWithResult(_0x5f064f,null))[_0x430d('0x50')](handleError(_0x5f064f,null));};var interaction_log=require(_0x430d('0x14'))('sms-interactions');exports[_0x430d('0x5a')]=function(_0x5b3e1b,_0xa7bb3f,_0x2194d9){var _0x640f82={'agent':{},'channel':_0x430d('0x5b')};if(_0x5b3e1b[_0x430d('0x58')]['id']){delete _0x5b3e1b[_0x430d('0x58')]['id'];}_0x5b3e1b[_0x430d('0x58')][_0x430d('0x5c')]=!![];_0x5b3e1b[_0x430d('0x58')][_0x430d('0x5d')]=moment()[_0x430d('0x5e')](_0x430d('0x5f'));_0x5b3e1b[_0x430d('0x58')][_0x430d('0x60')]=_0x5b3e1b[_0x430d('0x58')][_0x430d('0x60')]||_0x5b3e1b[_0x430d('0x61')]['id'];_0x640f82[_0x430d('0x62')]['id']=_0x5b3e1b[_0x430d('0x58')][_0x430d('0x60')];return db[_0x430d('0x38')]['find']({'where':{'id':_0x5b3e1b[_0x430d('0x52')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0xa7bb3f,null))[_0x430d('0x31')](saveUpdates(_0x5b3e1b[_0x430d('0x58')],null))[_0x430d('0x31')](function(_0x1fc2de){if(_0x1fc2de){_0x640f82[_0x430d('0x25')]=_0x1fc2de[_0x430d('0x63')]({'plain':!![]});return db[_0x430d('0x64')]['find']({'where':{'id':_0x1fc2de[_0x430d('0x65')]}});}return null;})[_0x430d('0x31')](handleEntityNotFound(_0xa7bb3f,null))[_0x430d('0x31')](function(_0x3b0064){if(_0x3b0064){return _0x3b0064['update']({'UserId':_0x5b3e1b[_0x430d('0x58')][_0x430d('0x60')],'read1stAt':_['isNil'](_0x3b0064[_0x430d('0x66')])?moment()[_0x430d('0x5e')]('YYYY-MM-DD\x20HH:mm:ss'):undefined});}return null;})[_0x430d('0x31')](function(_0x366389){if(_0x366389){_0x640f82[_0x430d('0x67')]=_0x366389[_0x430d('0x63')]({'plain':!![]});interaction_log['info'](_0x430d('0x68'),_0x5b3e1b[_0x430d('0x61')]['id'],_0x5b3e1b[_0x430d('0x61')][_0x430d('0x35')],_0x5b3e1b[_0x430d('0x61')][_0x430d('0x69')],_0x640f82[_0x430d('0x67')]['id'],_0x5b3e1b[_0x430d('0x58')]?JSON[_0x430d('0x23')](_0x5b3e1b[_0x430d('0x58')]):_0x430d('0x6a'));return respondWithRpcPromise(_0x430d('0x6b'),_0x430d('0x6c'),_0x640f82);}return null;})['then'](function(_0x36aabb){var _0x3cbcbe='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0x36aabb[_0x430d('0x25')][_0x430d('0x6d')];return db['sequelize'][_0x430d('0x3f')](_0x3cbcbe,{'type':db[_0x430d('0x6e')][_0x430d('0x6f')][_0x430d('0x70')],'raw':!![]})[_0x430d('0x31')](function(_0x503a1a){return _0x503a1a;});})[_0x430d('0x31')](function(_0x3559ef){if(_0x3559ef){_0x640f82['message'][_0x430d('0x71')]=_0x3559ef[0x0];if(!_0x5b3e1b[_0x430d('0x58')]['UserId'])return;return db[_0x430d('0x72')][_0x430d('0x55')]({'where':{'id':_0x5b3e1b[_0x430d('0x58')][_0x430d('0x60')],'role':_0x430d('0x62')},'attributes':['id','name',_0x430d('0x73'),_0x430d('0x74'),_0x430d('0x75')],'raw':!![]});}return null;})['then'](function(_0x1964be){if(!_0x1964be)return null;_0x640f82['message'][_0x430d('0x62')]=_0x1964be;return _0x640f82;})[_0x430d('0x31')](function(_0x5da79c){if(_0x5da79c){if(_0x5b3e1b['body'][_0x430d('0x76')]){_0x640f82[_0x430d('0x25')][_0x430d('0x77')]=util[_0x430d('0x5e')](_0x430d('0x78'),_0x5b3e1b[_0x430d('0x61')][_0x430d('0x35')]);_0x640f82[_0x430d('0x25')]['channel']=_0x640f82[_0x430d('0x79')];_0x640f82['message'][_0x430d('0x7a')]=_0x640f82['channel'];_0x640f82[_0x430d('0x25')]['event']=_0x430d('0x5a');return respondWithRpcPromise(_0x430d('0x7b'),_0x430d('0x7b'),{'event':_0x430d('0x7c'),'message':_0x640f82[_0x430d('0x25')]},client9002)[_0x430d('0x31')](function(){return _0x640f82;});}return _0x640f82;}return null;})[_0x430d('0x31')](respondWithResult(_0xa7bb3f,null))[_0x430d('0x50')](handleError(_0xa7bb3f,null));};var interaction_log=require('../../config/logger')(_0x430d('0x7d'));exports['reject']=function(_0x34d5e5,_0x7464d7,_0x2ac9a8){var _0x5cd60a={'agent':{},'channel':_0x430d('0x5b')};if(_0x34d5e5[_0x430d('0x58')]['id']){delete _0x34d5e5[_0x430d('0x58')]['id'];}_0x34d5e5[_0x430d('0x58')][_0x430d('0x60')]=_0x34d5e5['body']['UserId']||_0x34d5e5[_0x430d('0x61')]['id'];_0x5cd60a[_0x430d('0x62')]['id']=_0x34d5e5[_0x430d('0x58')][_0x430d('0x60')];return db[_0x430d('0x38')]['find']({'where':{'id':_0x34d5e5[_0x430d('0x52')]['id'],'UserId':null}})[_0x430d('0x31')](handleEntityNotFound(_0x7464d7,null))[_0x430d('0x31')](function(_0x4b4530){if(_0x4b4530){_0x5cd60a[_0x430d('0x25')]=_0x4b4530[_0x430d('0x63')]({'plain':!![]});return db[_0x430d('0x64')][_0x430d('0x55')]({'where':{'id':_0x4b4530[_0x430d('0x65')]}});}return null;})['then'](handleEntityNotFound(_0x7464d7,null))[_0x430d('0x31')](function(_0x403935){if(_0x403935){_0x5cd60a[_0x430d('0x67')]=_0x403935[_0x430d('0x63')]({'plain':!![]});interaction_log['info']('[SMSMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x34d5e5[_0x430d('0x61')]['id'],_0x34d5e5[_0x430d('0x61')][_0x430d('0x35')],_0x34d5e5[_0x430d('0x61')]['role'],_0x5cd60a[_0x430d('0x67')]['id'],_0x34d5e5[_0x430d('0x58')]?JSON[_0x430d('0x23')](_0x34d5e5[_0x430d('0x58')]):_0x430d('0x6a'));return respondWithRpcPromise(_0x430d('0x7e'),_0x430d('0x7f'),_0x5cd60a);}return null;})[_0x430d('0x31')](function(_0x4416f2){var _0x261ce3=_0x430d('0x80')+_0x4416f2[_0x430d('0x25')][_0x430d('0x6d')];return db[_0x430d('0x81')]['query'](_0x261ce3,{'type':db[_0x430d('0x6e')][_0x430d('0x6f')][_0x430d('0x70')],'raw':!![]})[_0x430d('0x31')](function(_0x1b76fe){return _0x1b76fe;});})[_0x430d('0x31')](function(_0xe36623){if(_0xe36623){_0x5cd60a['message'][_0x430d('0x71')]=_0xe36623[0x0];if(!_0x34d5e5['body']['UserId'])return;return db['User'][_0x430d('0x55')]({'where':{'id':_0x34d5e5[_0x430d('0x58')][_0x430d('0x60')],'role':'agent'},'attributes':['id',_0x430d('0x35'),_0x430d('0x73'),_0x430d('0x74'),_0x430d('0x75')],'raw':!![]});}return null;})[_0x430d('0x31')](function(_0x383412){if(!_0x383412)return null;_0x5cd60a['message'][_0x430d('0x62')]=_0x383412;return _0x5cd60a;})[_0x430d('0x31')](function(_0x3bcb39){if(_0x3bcb39){_0x3bcb39[_0x430d('0x25')][_0x430d('0x77')]=util['format'](_0x430d('0x78'),_0x34d5e5[_0x430d('0x61')][_0x430d('0x35')]);_0x3bcb39[_0x430d('0x25')][_0x430d('0x79')]=_0x5cd60a['channel'];_0x3bcb39[_0x430d('0x25')][_0x430d('0x7a')]=_0x5cd60a[_0x430d('0x79')];_0x3bcb39['message']['event']='reject';respondWithRpcPromise(_0x430d('0x7b'),_0x430d('0x7b'),{'event':_0x430d('0x82'),'message':_0x3bcb39[_0x430d('0x25')]},client9002);return _0x5cd60a;}return null;})[_0x430d('0x31')](respondWithResult(_0x7464d7,null))[_0x430d('0x50')](handleError(_0x7464d7,null));};exports['status']=function(_0x2483bd,_0x4b5c2c,_0x4c015e){if(_0x2483bd['body']['id']){delete _0x2483bd['body']['id'];}var _0x4625f1;return db[_0x430d('0x38')]['find']({'where':{'id':_0x2483bd[_0x430d('0x52')]['id']}})[_0x430d('0x31')](handleEntityNotFound(_0x4b5c2c,null))[_0x430d('0x31')](function(_0x391d7d){if(_0x391d7d){_0x4625f1=_0x391d7d;return db[_0x430d('0x83')][_0x430d('0x55')]({'where':{'id':_0x391d7d['SmsAccountId']}});}})['then'](handleEntityNotFound(_0x4b5c2c,null))[_0x430d('0x31')](function(_0x1ea196){if(_0x1ea196){logger[_0x430d('0x22')](_0x430d('0x84'),_0x430d('0x33'),_0x430d('0x85'),_0x1ea196[_0x430d('0x3b')],util[_0x430d('0x86')](_0x2483bd['body'],{'showHidden':![],'depth':null}));switch(_0x1ea196[_0x430d('0x3b')]){case _0x430d('0x87'):if(_0x2483bd[_0x430d('0x58')][_0x430d('0x88')]&&_0x2483bd['body'][_0x430d('0x88')]===_0x4625f1[_0x430d('0x89')]){return _0x4625f1[_0x430d('0x57')]({'read':!![]});}else{logger[_0x430d('0x24')]('SmsAccount,\x20%s,\x20%s,\x20%s','status',_0x430d('0x87'),util[_0x430d('0x86')](_0x2483bd[_0x430d('0x58')],{'showHidden':![],'depth':null}));}break;case _0x430d('0x8a'):if(_0x2483bd[_0x430d('0x58')]['MessageUUID']&&_0x2483bd[_0x430d('0x58')]['MessageUUID']===_0x4625f1[_0x430d('0x89')]&&_[_0x430d('0x8b')]([_0x430d('0x8c'),_0x430d('0x8d')],_0x2483bd['body'][_0x430d('0x8e')])>=0x0){return _0x4625f1['update']({'read':!![]});}else{logger[_0x430d('0x24')](_0x430d('0x8f'),'status',_0x430d('0x90'),util[_0x430d('0x86')](_0x2483bd[_0x430d('0x58')],{'showHidden':![],'depth':null}));}break;case _0x430d('0x91'):var _0x5d6295=_0x2483bd[_0x430d('0x58')][_0x430d('0x92')][0x0];if(_0x5d6295[_0x430d('0x33')][_0x430d('0x93')]===_0x430d('0x94')){return _0x4625f1[_0x430d('0x57')]({'read':!![]});}else{logger['error'](_0x430d('0x8f'),'status',_0x430d('0x91'),util[_0x430d('0x86')](_0x2483bd[_0x430d('0x58')],{'showHidden':![],'depth':null}));}break;}return _0x4625f1;}})[_0x430d('0x31')](respondWithResult(_0x4b5c2c,null))[_0x430d('0x50')](handleError(_0x4b5c2c,null));};
\ No newline at end of file
index 5679ed8..c389e7d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc3f6=['hasOwnProperty','hook','exports','events','../../mysqldb','setMaxListeners','save','update','remove','emit'];(function(_0x45f0e2,_0x12026e){var _0x5c2103=function(_0x2eb050){while(--_0x2eb050){_0x45f0e2['push'](_0x45f0e2['shift']());}};_0x5c2103(++_0x12026e);}(_0xc3f6,0x99));var _0x6c3f=function(_0x4e5658,_0x425f21){_0x4e5658=_0x4e5658-0x0;var _0x2d6e90=_0xc3f6[_0x4e5658];return _0x2d6e90;};'use strict';var EventEmitter=require(_0x6c3f('0x0'));var SmsMessage=require(_0x6c3f('0x1'))['db']['SmsMessage'];var SmsMessageEvents=new EventEmitter();SmsMessageEvents[_0x6c3f('0x2')](0x0);var events={'afterCreate':_0x6c3f('0x3'),'afterUpdate':_0x6c3f('0x4'),'afterDestroy':_0x6c3f('0x5')};function emitEvent(_0xf62d3a){return function(_0x21fbfd,_0x524d10,_0x19a744){SmsMessageEvents['emit'](_0xf62d3a+':'+_0x21fbfd['id'],_0x21fbfd);SmsMessageEvents[_0x6c3f('0x6')](_0xf62d3a,_0x21fbfd);_0x19a744(null);};}for(var e in events){if(events[_0x6c3f('0x7')](e)){var event=events[e];SmsMessage[_0x6c3f('0x8')](e,emitEvent(event));}}module[_0x6c3f('0x9')]=SmsMessageEvents;
\ No newline at end of file
+var _0xc154=['SmsMessage','setMaxListeners','save','update','emit','hasOwnProperty','exports','events','../../mysqldb'];(function(_0x203b91,_0x32bf95){var _0x1a0b27=function(_0x31e210){while(--_0x31e210){_0x203b91['push'](_0x203b91['shift']());}};_0x1a0b27(++_0x32bf95);}(_0xc154,0x1e4));var _0x4c15=function(_0xe906b9,_0x2f2527){_0xe906b9=_0xe906b9-0x0;var _0x597872=_0xc154[_0xe906b9];return _0x597872;};'use strict';var EventEmitter=require(_0x4c15('0x0'));var SmsMessage=require(_0x4c15('0x1'))['db'][_0x4c15('0x2')];var SmsMessageEvents=new EventEmitter();SmsMessageEvents[_0x4c15('0x3')](0x0);var events={'afterCreate':_0x4c15('0x4'),'afterUpdate':_0x4c15('0x5'),'afterDestroy':'remove'};function emitEvent(_0x31d729){return function(_0x129de9,_0x1af88f,_0x3d27e1){SmsMessageEvents[_0x4c15('0x6')](_0x31d729+':'+_0x129de9['id'],_0x129de9);SmsMessageEvents[_0x4c15('0x6')](_0x31d729,_0x129de9);_0x3d27e1(null);};}for(var e in events){if(events[_0x4c15('0x7')](e)){var event=events[e];SmsMessage['hook'](e,emitEvent(event));}}module[_0x4c15('0x8')]=SmsMessageEvents;
\ No newline at end of file
index fe2c443..246cfbe 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4633=['https://platform.clickatell.com/messages','UTF-8','apiMessageId','bandwidth','https://messaging.bandwidth.com/api/v2/users/','accountId','/messages','applicationId','intelepeer','https://api.intelepeer.com/_rest/v4/app/sms/send','code','message','Bearer\x20','refid','status','Token\x20not\x20received','utf8mb4','utf8mb4_unicode_ci','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./smsMessage.attributes','SmsMessage','messageId','fti_sms_messages','body','FULLTEXT','models','get','direction','toLowerCase','out','secret','isNil','UserId','SmsInteractionId','SmsInteraction','update','createdAt','catch','find','type','twilio','accountSid','authToken','phone','messages','remote','/api/sms/messages/','/status?token=','token','SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','inspect','error','skebby','https://api.skebby.it/API/v1.0/REST/','username','password','smsMethod','sender','login?username=','&password=','GET','split','sms','user_key','then','total_sent','internal_order_id','deliveryReport','connectel','senderString','POST','https://smsapi.connectel.se/api/v2/send/','requestid','read','Missing\x20parameters:\x20authToken','clicksend','xCALLY\x20Motion','format','%s:%s','https://rest.clicksend.com/v3/sms/send','Basic\x20%s','toString','base64','http_code','data','queued_count','head','message_id','clickSend','Missing\x20parameters:\x20username,\x20password','plivo','authId','message_uuid','Missing\x20parameters:\x20authId,\x20authToken','infobip','baseUrl','/auth/1/session','/sms/2/text/advanced','application/json','IBSSO\x20','Missing\x20parameters:\x20base_url','csc','crypto','apiKey','login','text','timestamp','sort','length','createHash','md5','hex','signature=','/external/get/send.php?','keys','id_sms','Missing\x20parameters:\x20apiKey','clickatell'];(function(_0x243b59,_0x3f9495){var _0x3e1676=function(_0x354052){while(--_0x354052){_0x243b59['push'](_0x243b59['shift']());}};_0x3e1676(++_0x3f9495);}(_0x4633,0x189));var _0x3463=function(_0x31eca7,_0x5d8a6b){_0x31eca7=_0x31eca7-0x0;var _0x7c2dca=_0x4633[_0x31eca7];return _0x7c2dca;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x3463('0x0'))(_0x3463('0x1'));var moment=require('moment');var BPromise=require(_0x3463('0x2'));var rp=require(_0x3463('0x3'));var fs=require('fs');var path=require(_0x3463('0x4'));var rimraf=require(_0x3463('0x5'));var config=require(_0x3463('0x6'));var attributes=require(_0x3463('0x7'));module['exports']=function(_0x4a2931,_0x43fb0f){return _0x4a2931['define'](_0x3463('0x8'),attributes,{'tableName':'sms_messages','paranoid':![],'indexes':[{'name':_0x3463('0x9'),'fields':[_0x3463('0x9')]},{'name':_0x3463('0xa'),'fields':[_0x3463('0xb')],'type':_0x3463('0xc')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x37f95c,_0x5c0791,_0x4b6843){var _0x13e22f=_0x4a2931[_0x3463('0xd')];var _0x559154=_0x37f95c[_0x3463('0xe')]({'plain':!![]});if(_0x559154[_0x3463('0xf')]['toLowerCase']()==='in'||_0x559154[_0x3463('0xf')][_0x3463('0x10')]()===_0x3463('0x11')&&!_0x559154[_0x3463('0x12')]&&!_[_0x3463('0x13')](_0x559154[_0x3463('0x14')])&&!_[_0x3463('0x13')](_0x559154[_0x3463('0x15')])){_0x13e22f[_0x3463('0x16')]['findOne']({'where':{'id':_0x559154[_0x3463('0x15')]}})['then'](function(_0x12778c){if(_0x12778c){_0x12778c[_0x3463('0x17')]({'lastMsgAt':_0x559154[_0x3463('0x18')],'lastMsgDirection':_0x559154[_0x3463('0xf')][_0x3463('0x10')]()});}})[_0x3463('0x19')](function(_0x1e5e80){console['error'](_0x1e5e80);});}if(_0x559154[_0x3463('0xf')]==='out'&&!_0x559154[_0x3463('0x12')]){var _0x2df80e;_0x13e22f['SmsAccount'][_0x3463('0x1a')]({'where':{'id':_0x559154['SmsAccountId']},'raw':!![]})['then'](function(_0x3e3c36){_0x2df80e=_0x3e3c36;if(_0x2df80e&&_0x2df80e['type']){switch(_0x2df80e[_0x3463('0x1b')]){case'twilio':var _0x15b73e=require(_0x3463('0x1c'));if(_0x2df80e[_0x3463('0x1d')]&&_0x2df80e[_0x3463('0x1e')]&&_0x2df80e[_0x3463('0x1f')]){var _0x29a205=new _0x15b73e(_0x2df80e['accountSid'],_0x2df80e[_0x3463('0x1e')]);_0x29a205[_0x3463('0x20')]['create']({'body':_0x559154[_0x3463('0xb')],'to':_0x559154[_0x3463('0x1f')],'from':_0x2df80e['phone'],'statusCallback':_0x2df80e[_0x3463('0x21')]+_0x3463('0x22')+_0x559154['id']+_0x3463('0x23')+_0x2df80e[_0x3463('0x24')]})['then'](function(_0x3d6dc6){if(_0x3d6dc6['sid']){return _0x37f95c['update']({'messageId':_0x3d6dc6['sid']});}})[_0x3463('0x19')](function(_0x5d3cd4){logger['error'](_0x3463('0x25'),_0x3463('0x26'),_0x3463('0x1c'),util[_0x3463('0x27')](_0x5d3cd4,{'showHidden':![],'depth':null}));});}else{logger[_0x3463('0x28')](_0x3463('0x25'),_0x3463('0x26'),_0x3463('0x1c'),'Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken');}break;case _0x3463('0x29'):var _0x5cd2ff=_0x3463('0x2a');if(_0x2df80e[_0x3463('0x2b')]&&_0x2df80e[_0x3463('0x2c')]){var _0x3d7424={'recipient':[_0x559154['phone']],'message':_0x559154[_0x3463('0xb')],'message_type':_0x2df80e[_0x3463('0x2d')]};if(_0x2df80e[_0x3463('0x2d')]&&_0x2df80e[_0x3463('0x2d')]!=='SI'){_0x3d7424[_0x3463('0x2e')]=_0x2df80e[_0x3463('0x1f')];}var _0x2cddc2={'url':_0x5cd2ff+_0x3463('0x2f')+_0x2df80e[_0x3463('0x2b')]+_0x3463('0x30')+_0x2df80e[_0x3463('0x2c')],'method':_0x3463('0x31')};rp(_0x2cddc2)['then'](function(_0x4db9a7){var _0x38974f=_0x4db9a7[_0x3463('0x32')](';');var _0x26f04b={'user_key':_0x38974f[0x0],'session_key':_0x38974f[0x1]};_0x2cddc2={'url':_0x5cd2ff+_0x3463('0x33'),'method':'POST','headers':{'user_key':_0x26f04b[_0x3463('0x34')],'Session_key':_0x26f04b['session_key']},'json':!![],'body':_0x3d7424};return rp(_0x2cddc2);})[_0x3463('0x35')](function(_0x1dac55){if(_0x1dac55[_0x3463('0x36')]>=0x1){var _0xee9917={'messageId':_0x1dac55[_0x3463('0x37')]};if(_0x2df80e[_0x3463('0x2d')]!=='GP'||!_0x2df80e[_0x3463('0x38')]){_0xee9917['read']=!![];}return _0x37f95c[_0x3463('0x17')](_0xee9917);}else{return logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0x3463('0x26'),_0x3463('0x29'),util['inspect'](_0x1dac55,{'showHidden':![],'depth':null}));}})[_0x3463('0x19')](function(_0x4c2fc5){return logger[_0x3463('0x28')](_0x3463('0x25'),_0x3463('0x26'),_0x3463('0x29'),util['inspect'](_0x4c2fc5,{'showHidden':![],'depth':null}));});}else{logger[_0x3463('0x28')](_0x3463('0x25'),_0x3463('0x26'),_0x3463('0x29'),'Missing\x20parameters:\x20username,\x20password');}break;case _0x3463('0x39'):if(_0x2df80e[_0x3463('0x1e')]){var _0x405312={'recipient':_0x559154[_0x3463('0x1f')],'message':_0x559154[_0x3463('0xb')],'sender':_0x2df80e[_0x3463('0x3a')]||_0x2df80e[_0x3463('0x1f')],'authorization':_0x2df80e[_0x3463('0x1e')]};var _0x5c0791={'method':_0x3463('0x3b'),'uri':_0x3463('0x3c'),'body':_0x405312,'json':!![]};rp(_0x5c0791)['then'](function(_0x50f8da){var _0x17724a={'messageId':_0x50f8da[_0x3463('0x3d')]};if(!_0x2df80e['deliveryReport']){_0x17724a[_0x3463('0x3e')]=!![];}return _0x37f95c[_0x3463('0x17')](_0x17724a);})[_0x3463('0x19')](function(_0x368056){logger[_0x3463('0x28')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0x3463('0x39'),util[_0x3463('0x27')](_0x368056,{'showHidden':![],'depth':null}));});}else{logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0x3463('0x26'),_0x3463('0x39'),_0x3463('0x3f'));}break;case _0x3463('0x40'):if(_0x2df80e['username']&&_0x2df80e[_0x3463('0x2c')]){var _0x405312={'messages':[{'source':_0x3463('0x41'),'to':_0x559154[_0x3463('0x1f')],'body':_0x559154['body'],'from':_0x2df80e[_0x3463('0x3a')]||_0x2df80e[_0x3463('0x1f')]}]};var _0x20ee4f=util[_0x3463('0x42')](_0x3463('0x43'),_0x2df80e[_0x3463('0x2b')],_0x2df80e[_0x3463('0x2c')]);var _0x5c0791={'method':_0x3463('0x3b'),'uri':_0x3463('0x44'),'body':_0x405312,'headers':{'Authorization':util[_0x3463('0x42')](_0x3463('0x45'),new Buffer(_0x20ee4f)[_0x3463('0x46')](_0x3463('0x47')))},'json':!![]};rp(_0x5c0791)[_0x3463('0x35')](function(_0x135671){if(_0x135671[_0x3463('0x48')]>=0xc8&&_0x135671[_0x3463('0x48')]<=0xce){if(_0x135671['data']&&_0x135671[_0x3463('0x49')][_0x3463('0x4a')]>0x0){var _0x58366c=_[_0x3463('0x4b')](_0x135671[_0x3463('0x49')]['messages']);var _0x32e072={'messageId':_0x58366c[_0x3463('0x4c')]};if(!_0x2df80e[_0x3463('0x38')]){_0x32e072[_0x3463('0x3e')]=!![];}return _0x37f95c[_0x3463('0x17')](_0x32e072);}else{logger[_0x3463('0x28')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x3463('0x26'),_0x3463('0x4d'),util[_0x3463('0x27')](_0x135671,{'showHidden':![],'depth':null}));}}else{logger[_0x3463('0x28')](_0x3463('0x25'),_0x3463('0x26'),_0x3463('0x4d'),util[_0x3463('0x27')](_0x135671,{'showHidden':![],'depth':null}));}})[_0x3463('0x19')](function(_0x5bc7aa){logger[_0x3463('0x28')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x3463('0x26'),_0x3463('0x4d'),util['inspect'](_0x5bc7aa,{'showHidden':![],'depth':null}));});}else{logger[_0x3463('0x28')](_0x3463('0x25'),_0x3463('0x26'),_0x3463('0x4d'),_0x3463('0x4e'));}break;case _0x3463('0x4f'):if(_0x2df80e[_0x3463('0x50')]&&_0x2df80e[_0x3463('0x1e')]){var _0x405312={'dst':_0x559154[_0x3463('0x1f')],'text':_0x559154[_0x3463('0xb')],'src':_0x2df80e[_0x3463('0x3a')]||_0x2df80e[_0x3463('0x1f')],'url':_0x2df80e[_0x3463('0x21')]+_0x3463('0x22')+_0x559154['id']+_0x3463('0x23')+_0x2df80e[_0x3463('0x24')]};var _0x20ee4f=util[_0x3463('0x42')](_0x3463('0x43'),_0x2df80e[_0x3463('0x50')],_0x2df80e[_0x3463('0x1e')]);var _0x5c0791={'method':'POST','uri':util[_0x3463('0x42')]('https://api.plivo.com/v1/Account/%s/Message/',_0x2df80e[_0x3463('0x50')]),'body':_0x405312,'headers':{'Authorization':util['format'](_0x3463('0x45'),new Buffer(_0x20ee4f)[_0x3463('0x46')](_0x3463('0x47')))},'json':!![]};rp(_0x5c0791)[_0x3463('0x35')](function(_0x355e88){var _0x5962a4={'messageId':_0x355e88[_0x3463('0x51')][0x0]};return _0x37f95c[_0x3463('0x17')](_0x5962a4);})[_0x3463('0x19')](function(_0x21da9a){logger[_0x3463('0x28')](_0x3463('0x25'),_0x3463('0x26'),'plivo',util[_0x3463('0x27')](_0x21da9a,{'showHidden':![],'depth':null}));});}else{logger[_0x3463('0x28')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x3463('0x26'),_0x3463('0x4f'),_0x3463('0x52'));}break;case _0x3463('0x53'):if(_0x2df80e[_0x3463('0x2b')]&&_0x2df80e[_0x3463('0x2c')]){if(_0x2df80e[_0x3463('0x54')]){var _0x4db210={'method':_0x3463('0x3b'),'uri':_0x2df80e[_0x3463('0x54')]+_0x3463('0x55'),'body':{'username':_0x2df80e[_0x3463('0x2b')],'password':_0x2df80e['password']},'json':!![]};return rp(_0x4db210)[_0x3463('0x35')](function(_0x225603){var _0x1a3ff3={'method':_0x3463('0x3b'),'uri':_0x2df80e[_0x3463('0x54')]+_0x3463('0x56'),'body':{'messages':[{'from':_0x2df80e['phone'],'destinations':[{'to':_0x559154[_0x3463('0x1f')]}],'text':_0x559154[_0x3463('0xb')],'notifyUrl':_0x2df80e[_0x3463('0x21')]+'/api/sms/messages/'+_0x559154['id']+_0x3463('0x23')+_0x2df80e[_0x3463('0x24')],'notifyContentType':_0x3463('0x57'),'callbackData':_0x2df80e['phone']+';'+_0x559154[_0x3463('0xb')]}]},'headers':{'Authorization':_0x3463('0x58')+_0x225603['token']},'json':!![]};return rp(_0x1a3ff3)[_0x3463('0x35')](function(_0x6f1ef8){if(_0x6f1ef8['messages']){var _0x4709d8={'messageId':_0x6f1ef8[_0x3463('0x20')][0x0][_0x3463('0x9')]};if(!_0x2df80e[_0x3463('0x38')]){_0x4709d8[_0x3463('0x3e')]=!![];}return _0x37f95c[_0x3463('0x17')](_0x4709d8);}else{return logger[_0x3463('0x28')](_0x3463('0x25'),_0x3463('0x26'),_0x3463('0x53'),util[_0x3463('0x27')](_0x6f1ef8,{'showHidden':![],'depth':null}));}});})[_0x3463('0x19')](function(_0x1bed53){return logger[_0x3463('0x28')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x3463('0x26'),_0x3463('0x53'),util[_0x3463('0x27')](_0x1bed53,{'showHidden':![],'depth':null}));});}else{logger[_0x3463('0x28')](_0x3463('0x25'),_0x3463('0x26'),'infobip',_0x3463('0x59'));}}else{logger[_0x3463('0x28')](_0x3463('0x25'),_0x3463('0x26'),'infobip',_0x3463('0x4e'));}break;case _0x3463('0x5a'):var _0x3ec7d8=require(_0x3463('0x5b'));if(_0x2df80e[_0x3463('0x5c')]){var _0x40060c={};_0x40060c[_0x3463('0x5d')]=_0x2df80e[_0x3463('0x2b')];_0x40060c[_0x3463('0x1f')]=_0x559154[_0x3463('0x1f')];_0x40060c[_0x3463('0x2e')]=_0x2df80e[_0x3463('0x1f')];_0x40060c[_0x3463('0x5e')]=_0x559154['body'];_0x40060c[_0x3463('0x5f')]=+new Date();var _0x2da672='';var _0x15a526='';var _0x5bfebb=Object['keys'](_0x40060c);_0x5bfebb[_0x3463('0x60')]();for(var _0x52a37f=0x0;_0x52a37f<_0x5bfebb[_0x3463('0x61')];_0x52a37f++){if(_0x2da672!=''){_0x2da672+='&';}_0x2da672+=_0x5bfebb[_0x52a37f]+'='+encodeURIComponent(_0x40060c[_0x5bfebb[_0x52a37f]]);_0x15a526+=_0x40060c[_0x5bfebb[_0x52a37f]];}_0x15a526+=_0x2df80e[_0x3463('0x5c')];_0x15a526=_0x3ec7d8[_0x3463('0x62')](_0x3463('0x63'))['update'](_0x15a526)['digest'](_0x3463('0x64'));if(_0x2da672!==''){_0x2da672+='&';}_0x2da672+=_0x3463('0x65')+_0x15a526;var _0x2cddc2={'method':_0x3463('0x31'),'uri':_0x2df80e['baseUrl']+_0x3463('0x66')+_0x2da672,'json':!![]};return rp(_0x2cddc2)['then'](function(_0x48b325){var _0x3f5d3b=Object[_0x3463('0x67')](_0x48b325);if(_0x48b325[_0x3f5d3b[0x0]]['error']&&parseInt(_0x48b325[_0x3f5d3b[0x0]][_0x3463('0x28')])===0x0){var _0x52a5a4={'messageId':_0x48b325[_0x3f5d3b[0x0]][_0x3463('0x68')]};if(!_0x2df80e['deliveryReport']){_0x52a5a4['read']=!![];}return _0x37f95c[_0x3463('0x17')](_0x52a5a4);}else{return logger[_0x3463('0x28')](_0x3463('0x25'),'afterCreate',_0x3463('0x5a'),util[_0x3463('0x27')](_0x48b325[_0x3463('0x28')],{'showHidden':![],'depth':null}));}})[_0x3463('0x19')](function(_0x3bf966){return logger[_0x3463('0x28')](_0x3463('0x25'),_0x3463('0x26'),_0x3463('0x5a'),util[_0x3463('0x27')](_0x3bf966,{'showHidden':![],'depth':null}));});}else{logger[_0x3463('0x28')](_0x3463('0x25'),_0x3463('0x26'),_0x3463('0x5a'),_0x3463('0x69'));}break;case _0x3463('0x6a'):if(_0x2df80e[_0x3463('0x5c')]){var _0x43a2ab={'method':_0x3463('0x3b'),'uri':_0x3463('0x6b'),'headers':{'Authorization':_0x2df80e[_0x3463('0x5c')]},'body':{'content':_0x559154[_0x3463('0xb')],'to':[_0x559154[_0x3463('0x1f')]],'from':_0x2df80e[_0x3463('0x1f')],'binary':![],'clientMessageId':'uuid','charset':_0x3463('0x6c')},'json':!![]};rp(_0x43a2ab)['then'](function(_0x45df28){if(!_0x45df28[_0x3463('0x28')]){var _0x4b383c={'messageId':_0x45df28['messages'][0x0][_0x3463('0x6d')]};if(!_0x2df80e[_0x3463('0x38')]){_0x4b383c['read']=!![];}return _0x37f95c[_0x3463('0x17')](_0x4b383c);}else{return logger[_0x3463('0x28')](_0x3463('0x25'),'afterCreate',_0x3463('0x6a'),util[_0x3463('0x27')](_0x45df28['error'],{'showHidden':![],'depth':null}));}})[_0x3463('0x19')](function(_0x2ae44b){return logger[_0x3463('0x28')](_0x3463('0x25'),_0x3463('0x26'),'clickatell',util[_0x3463('0x27')](_0x2ae44b,{'showHidden':![],'depth':null}));});}else{logger[_0x3463('0x28')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x3463('0x26'),'clickatell',_0x3463('0x69'));}break;case _0x3463('0x6e'):if(_0x2df80e[_0x3463('0x2b')]&&_0x2df80e[_0x3463('0x2c')]){var _0x20ee4f=util['format']('%s:%s',_0x2df80e[_0x3463('0x2b')],_0x2df80e[_0x3463('0x2c')]);var _0x5c0791={'method':_0x3463('0x3b'),'uri':_0x3463('0x6f')+_0x2df80e[_0x3463('0x70')]+_0x3463('0x71'),'body':{'to':[_0x559154['phone']],'text':_0x559154[_0x3463('0xb')],'from':_0x2df80e[_0x3463('0x1f')],'applicationId':_0x2df80e[_0x3463('0x72')]},'headers':{'Authorization':util['format'](_0x3463('0x45'),new Buffer(_0x20ee4f)[_0x3463('0x46')]('base64'))},'json':!![]};rp(_0x5c0791)[_0x3463('0x35')](function(_0x42c4df){if(_0x42c4df['id']){var _0x1afd0c={'messageId':_0x42c4df['id']};return _0x37f95c['update'](_0x1afd0c);}else{logger[_0x3463('0x28')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0x3463('0x6e'),util[_0x3463('0x27')](_0x42c4df,{'showHidden':![],'depth':null}));}})['catch'](function(_0x511c1b){logger['error'](_0x3463('0x25'),_0x3463('0x26'),_0x3463('0x6e'),util[_0x3463('0x27')](_0x511c1b,{'showHidden':![],'depth':null}));});}else{logger[_0x3463('0x28')](_0x3463('0x25'),_0x3463('0x26'),_0x3463('0x6e'),'Missing\x20parameters:\x20username,\x20password');}break;case _0x3463('0x73'):if(_0x2df80e[_0x3463('0x5c')]){var _0x451de0={};var _0x2cddc2={'method':_0x3463('0x3b'),'uri':_0x3463('0x74'),'headers':{'Authorization':'Bearer\x20'+_0x2df80e[_0x3463('0x5c')],'Content-Type':_0x3463('0x57')},'body':{'from':_0x2df80e['phone'],'to':_0x559154['phone'],'text':_0x559154['body']},'json':!![]};return rp(_0x2cddc2)[_0x3463('0x35')](function(_0x3be164){if(_0x3be164[_0x3463('0x75')]==0xca){_0x451de0[_0x3463('0x76')]=_0x3be164;var _0xfd8f3d={'method':_0x3463('0x3b'),'uri':'https://api.intelepeer.com/_rest/v4/app/sms/mdr','headers':{'Authorization':_0x3463('0x77')+_0x2df80e['apiKey'],'Content-Type':_0x3463('0x57')},'body':{'refid':_0x451de0[_0x3463('0x76')][_0x3463('0x78')]},'json':!![]};return rp(_0xfd8f3d)['then'](function(_0x14302c){_0x451de0[_0x3463('0x79')]=_0x14302c;var _0x40b939={'messageId':_0x451de0[_0x3463('0x76')][_0x3463('0x78')],'read':!![]};return _0x37f95c[_0x3463('0x17')](_0x40b939);});}else{return logger[_0x3463('0x28')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0x3463('0x73'),util[_0x3463('0x27')](_0x3be164,{'showHidden':![],'depth':null}));}})['catch'](function(_0x8af194){return logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0x3463('0x26'),'intelepeer',util[_0x3463('0x27')](_0x8af194,{'showHidden':![],'depth':null}));});}else{return logger['error'](_0x3463('0x25'),'afterCreate','intelepeer',_0x3463('0x7a'));}break;}}})['finally'](function(){_0x4b6843();});}else{_0x4b6843();}}},'charset':_0x3463('0x7b'),'collate':_0x3463('0x7c')});};
\ No newline at end of file
+var _0x411e=['https://rest.clicksend.com/v3/sms/send','Basic\x20%s','toString','base64','http_code','data','queued_count','message_id','clickSend','plivo','authId','/status?token=','https://api.plivo.com/v1/Account/%s/Message/','message_uuid','Missing\x20parameters:\x20authId,\x20authToken','infobip','baseUrl','/auth/1/session','/sms/2/text/advanced','application/json','IBSSO\x20','Missing\x20parameters:\x20base_url','csc','crypto','apiKey','login','text','timestamp','keys','sort','length','md5','digest','hex','signature=','/external/get/send.php?','Missing\x20parameters:\x20apiKey','clickatell','https://platform.clickatell.com/messages','UTF-8','apiMessageId','bandwidth','https://messaging.bandwidth.com/api/v2/users/','/messages','applicationId','intelepeer','https://api.intelepeer.com/_rest/v4/app/sms/send','code','https://api.intelepeer.com/_rest/v4/app/sms/mdr','Bearer\x20','message','refid','status','Token\x20not\x20received','finally','utf8mb4','lodash','util','../../config/logger','api','moment','bluebird','path','../../config/environment','./smsMessage.attributes','exports','define','SmsMessage','sms_messages','messageId','fti_sms_messages','FULLTEXT','get','direction','toLowerCase','out','secret','isNil','UserId','SmsInteractionId','SmsInteraction','then','update','createdAt','catch','error','SmsAccount','find','SmsAccountId','type','twilio','accountSid','authToken','messages','body','phone','remote','/api/sms/messages/','token','sid','afterCreate','SmsMessage,\x20%s,\x20%s,\x20%s','skebby','https://api.skebby.it/API/v1.0/REST/','username','smsMethod','login?username=','&password=','GET','split','sms','POST','user_key','total_sent','internal_order_id','deliveryReport','inspect','Missing\x20parameters:\x20username,\x20password','connectel','senderString','https://smsapi.connectel.se/api/v2/send/','read','Missing\x20parameters:\x20authToken','clicksend','xCALLY\x20Motion','format','%s:%s','password'];(function(_0x2710c8,_0x47c204){var _0x1ac5e6=function(_0x48f013){while(--_0x48f013){_0x2710c8['push'](_0x2710c8['shift']());}};_0x1ac5e6(++_0x47c204);}(_0x411e,0x138));var _0xe411=function(_0x58b301,_0x45e991){_0x58b301=_0x58b301-0x0;var _0x2171b3=_0x411e[_0x58b301];return _0x2171b3;};'use strict';var _=require(_0xe411('0x0'));var util=require(_0xe411('0x1'));var logger=require(_0xe411('0x2'))(_0xe411('0x3'));var moment=require(_0xe411('0x4'));var BPromise=require(_0xe411('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xe411('0x6'));var rimraf=require('rimraf');var config=require(_0xe411('0x7'));var attributes=require(_0xe411('0x8'));module[_0xe411('0x9')]=function(_0x3c3a93,_0x33fd15){return _0x3c3a93[_0xe411('0xa')](_0xe411('0xb'),attributes,{'tableName':_0xe411('0xc'),'paranoid':![],'indexes':[{'name':'messageId','fields':[_0xe411('0xd')]},{'name':_0xe411('0xe'),'fields':['body'],'type':_0xe411('0xf')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x12f2fe,_0xbad2b5,_0x252892){var _0x3dc6c4=_0x3c3a93['models'];var _0x2465b2=_0x12f2fe[_0xe411('0x10')]({'plain':!![]});if(_0x2465b2[_0xe411('0x11')][_0xe411('0x12')]()==='in'||_0x2465b2['direction'][_0xe411('0x12')]()===_0xe411('0x13')&&!_0x2465b2[_0xe411('0x14')]&&!_[_0xe411('0x15')](_0x2465b2[_0xe411('0x16')])&&!_['isNil'](_0x2465b2[_0xe411('0x17')])){_0x3dc6c4[_0xe411('0x18')]['findOne']({'where':{'id':_0x2465b2[_0xe411('0x17')]}})[_0xe411('0x19')](function(_0x368469){if(_0x368469){_0x368469[_0xe411('0x1a')]({'lastMsgAt':_0x2465b2[_0xe411('0x1b')],'lastMsgDirection':_0x2465b2[_0xe411('0x11')][_0xe411('0x12')]()});}})[_0xe411('0x1c')](function(_0x1298df){console[_0xe411('0x1d')](_0x1298df);});}if(_0x2465b2[_0xe411('0x11')]===_0xe411('0x13')&&!_0x2465b2[_0xe411('0x14')]){var _0xeeeccf;_0x3dc6c4[_0xe411('0x1e')][_0xe411('0x1f')]({'where':{'id':_0x2465b2[_0xe411('0x20')]},'raw':!![]})[_0xe411('0x19')](function(_0x309833){_0xeeeccf=_0x309833;if(_0xeeeccf&&_0xeeeccf[_0xe411('0x21')]){switch(_0xeeeccf[_0xe411('0x21')]){case'twilio':var _0xde4865=require(_0xe411('0x22'));if(_0xeeeccf[_0xe411('0x23')]&&_0xeeeccf[_0xe411('0x24')]&&_0xeeeccf['phone']){var _0x3514ef=new _0xde4865(_0xeeeccf[_0xe411('0x23')],_0xeeeccf['authToken']);_0x3514ef[_0xe411('0x25')]['create']({'body':_0x2465b2[_0xe411('0x26')],'to':_0x2465b2[_0xe411('0x27')],'from':_0xeeeccf[_0xe411('0x27')],'statusCallback':_0xeeeccf[_0xe411('0x28')]+_0xe411('0x29')+_0x2465b2['id']+'/status?token='+_0xeeeccf[_0xe411('0x2a')]})[_0xe411('0x19')](function(_0x200796){if(_0x200796[_0xe411('0x2b')]){return _0x12f2fe[_0xe411('0x1a')]({'messageId':_0x200796[_0xe411('0x2b')]});}})[_0xe411('0x1c')](function(_0xad5d46){logger[_0xe411('0x1d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xe411('0x2c'),_0xe411('0x22'),util['inspect'](_0xad5d46,{'showHidden':![],'depth':null}));});}else{logger[_0xe411('0x1d')](_0xe411('0x2d'),_0xe411('0x2c'),_0xe411('0x22'),'Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken');}break;case _0xe411('0x2e'):var _0x1b8a1a=_0xe411('0x2f');if(_0xeeeccf[_0xe411('0x30')]&&_0xeeeccf['password']){var _0xaa8d16={'recipient':[_0x2465b2[_0xe411('0x27')]],'message':_0x2465b2['body'],'message_type':_0xeeeccf[_0xe411('0x31')]};if(_0xeeeccf[_0xe411('0x31')]&&_0xeeeccf[_0xe411('0x31')]!=='SI'){_0xaa8d16['sender']=_0xeeeccf[_0xe411('0x27')];}var _0x27bfc8={'url':_0x1b8a1a+_0xe411('0x32')+_0xeeeccf[_0xe411('0x30')]+_0xe411('0x33')+_0xeeeccf['password'],'method':_0xe411('0x34')};rp(_0x27bfc8)['then'](function(_0x20c0ef){var _0x41e19a=_0x20c0ef[_0xe411('0x35')](';');var _0x5ac06f={'user_key':_0x41e19a[0x0],'session_key':_0x41e19a[0x1]};_0x27bfc8={'url':_0x1b8a1a+_0xe411('0x36'),'method':_0xe411('0x37'),'headers':{'user_key':_0x5ac06f[_0xe411('0x38')],'Session_key':_0x5ac06f['session_key']},'json':!![],'body':_0xaa8d16};return rp(_0x27bfc8);})[_0xe411('0x19')](function(_0x16fcd7){if(_0x16fcd7[_0xe411('0x39')]>=0x1){var _0x10dde6={'messageId':_0x16fcd7[_0xe411('0x3a')]};if(_0xeeeccf[_0xe411('0x31')]!=='GP'||!_0xeeeccf[_0xe411('0x3b')]){_0x10dde6['read']=!![];}return _0x12f2fe[_0xe411('0x1a')](_0x10dde6);}else{return logger['error']('SmsMessage,\x20%s,\x20%s,\x20%s',_0xe411('0x2c'),_0xe411('0x2e'),util[_0xe411('0x3c')](_0x16fcd7,{'showHidden':![],'depth':null}));}})[_0xe411('0x1c')](function(_0x4816f9){return logger[_0xe411('0x1d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xe411('0x2c'),_0xe411('0x2e'),util[_0xe411('0x3c')](_0x4816f9,{'showHidden':![],'depth':null}));});}else{logger[_0xe411('0x1d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xe411('0x2c'),_0xe411('0x2e'),_0xe411('0x3d'));}break;case _0xe411('0x3e'):if(_0xeeeccf[_0xe411('0x24')]){var _0x4a2ac3={'recipient':_0x2465b2['phone'],'message':_0x2465b2[_0xe411('0x26')],'sender':_0xeeeccf[_0xe411('0x3f')]||_0xeeeccf[_0xe411('0x27')],'authorization':_0xeeeccf[_0xe411('0x24')]};var _0xbad2b5={'method':_0xe411('0x37'),'uri':_0xe411('0x40'),'body':_0x4a2ac3,'json':!![]};rp(_0xbad2b5)['then'](function(_0x281a8e){var _0xb796b1={'messageId':_0x281a8e['requestid']};if(!_0xeeeccf[_0xe411('0x3b')]){_0xb796b1[_0xe411('0x41')]=!![];}return _0x12f2fe[_0xe411('0x1a')](_0xb796b1);})[_0xe411('0x1c')](function(_0x29e92c){logger[_0xe411('0x1d')](_0xe411('0x2d'),'afterCreate',_0xe411('0x3e'),util[_0xe411('0x3c')](_0x29e92c,{'showHidden':![],'depth':null}));});}else{logger[_0xe411('0x1d')](_0xe411('0x2d'),'afterCreate','connectel',_0xe411('0x42'));}break;case _0xe411('0x43'):if(_0xeeeccf[_0xe411('0x30')]&&_0xeeeccf['password']){var _0x4a2ac3={'messages':[{'source':_0xe411('0x44'),'to':_0x2465b2['phone'],'body':_0x2465b2[_0xe411('0x26')],'from':_0xeeeccf[_0xe411('0x3f')]||_0xeeeccf['phone']}]};var _0x1720ba=util[_0xe411('0x45')](_0xe411('0x46'),_0xeeeccf[_0xe411('0x30')],_0xeeeccf[_0xe411('0x47')]);var _0xbad2b5={'method':_0xe411('0x37'),'uri':_0xe411('0x48'),'body':_0x4a2ac3,'headers':{'Authorization':util[_0xe411('0x45')](_0xe411('0x49'),new Buffer(_0x1720ba)[_0xe411('0x4a')](_0xe411('0x4b')))},'json':!![]};rp(_0xbad2b5)[_0xe411('0x19')](function(_0x4fa5e3){if(_0x4fa5e3[_0xe411('0x4c')]>=0xc8&&_0x4fa5e3[_0xe411('0x4c')]<=0xce){if(_0x4fa5e3[_0xe411('0x4d')]&&_0x4fa5e3['data'][_0xe411('0x4e')]>0x0){var _0xacb84b=_['head'](_0x4fa5e3[_0xe411('0x4d')][_0xe411('0x25')]);var _0x3f081b={'messageId':_0xacb84b[_0xe411('0x4f')]};if(!_0xeeeccf['deliveryReport']){_0x3f081b[_0xe411('0x41')]=!![];}return _0x12f2fe[_0xe411('0x1a')](_0x3f081b);}else{logger[_0xe411('0x1d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xe411('0x2c'),'clickSend',util['inspect'](_0x4fa5e3,{'showHidden':![],'depth':null}));}}else{logger[_0xe411('0x1d')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate',_0xe411('0x50'),util[_0xe411('0x3c')](_0x4fa5e3,{'showHidden':![],'depth':null}));}})[_0xe411('0x1c')](function(_0xfff012){logger['error'](_0xe411('0x2d'),_0xe411('0x2c'),_0xe411('0x50'),util[_0xe411('0x3c')](_0xfff012,{'showHidden':![],'depth':null}));});}else{logger[_0xe411('0x1d')](_0xe411('0x2d'),_0xe411('0x2c'),_0xe411('0x50'),_0xe411('0x3d'));}break;case _0xe411('0x51'):if(_0xeeeccf[_0xe411('0x52')]&&_0xeeeccf[_0xe411('0x24')]){var _0x4a2ac3={'dst':_0x2465b2[_0xe411('0x27')],'text':_0x2465b2[_0xe411('0x26')],'src':_0xeeeccf['senderString']||_0xeeeccf['phone'],'url':_0xeeeccf[_0xe411('0x28')]+_0xe411('0x29')+_0x2465b2['id']+_0xe411('0x53')+_0xeeeccf[_0xe411('0x2a')]};var _0x1720ba=util['format'](_0xe411('0x46'),_0xeeeccf['authId'],_0xeeeccf[_0xe411('0x24')]);var _0xbad2b5={'method':'POST','uri':util[_0xe411('0x45')](_0xe411('0x54'),_0xeeeccf[_0xe411('0x52')]),'body':_0x4a2ac3,'headers':{'Authorization':util[_0xe411('0x45')]('Basic\x20%s',new Buffer(_0x1720ba)[_0xe411('0x4a')]('base64'))},'json':!![]};rp(_0xbad2b5)[_0xe411('0x19')](function(_0x2489ce){var _0x1ea2fa={'messageId':_0x2489ce[_0xe411('0x55')][0x0]};return _0x12f2fe['update'](_0x1ea2fa);})['catch'](function(_0x533080){logger[_0xe411('0x1d')](_0xe411('0x2d'),_0xe411('0x2c'),_0xe411('0x51'),util[_0xe411('0x3c')](_0x533080,{'showHidden':![],'depth':null}));});}else{logger[_0xe411('0x1d')](_0xe411('0x2d'),_0xe411('0x2c'),'plivo',_0xe411('0x56'));}break;case _0xe411('0x57'):if(_0xeeeccf[_0xe411('0x30')]&&_0xeeeccf[_0xe411('0x47')]){if(_0xeeeccf[_0xe411('0x58')]){var _0x658673={'method':_0xe411('0x37'),'uri':_0xeeeccf[_0xe411('0x58')]+_0xe411('0x59'),'body':{'username':_0xeeeccf[_0xe411('0x30')],'password':_0xeeeccf[_0xe411('0x47')]},'json':!![]};return rp(_0x658673)['then'](function(_0xa4a9a5){var _0x390288={'method':_0xe411('0x37'),'uri':_0xeeeccf[_0xe411('0x58')]+_0xe411('0x5a'),'body':{'messages':[{'from':_0xeeeccf[_0xe411('0x27')],'destinations':[{'to':_0x2465b2[_0xe411('0x27')]}],'text':_0x2465b2[_0xe411('0x26')],'notifyUrl':_0xeeeccf['remote']+_0xe411('0x29')+_0x2465b2['id']+_0xe411('0x53')+_0xeeeccf['token'],'notifyContentType':_0xe411('0x5b'),'callbackData':_0xeeeccf[_0xe411('0x27')]+';'+_0x2465b2[_0xe411('0x26')]}]},'headers':{'Authorization':_0xe411('0x5c')+_0xa4a9a5[_0xe411('0x2a')]},'json':!![]};return rp(_0x390288)[_0xe411('0x19')](function(_0x33f1fe){if(_0x33f1fe['messages']){var _0x26279c={'messageId':_0x33f1fe[_0xe411('0x25')][0x0][_0xe411('0xd')]};if(!_0xeeeccf[_0xe411('0x3b')]){_0x26279c[_0xe411('0x41')]=!![];}return _0x12f2fe[_0xe411('0x1a')](_0x26279c);}else{return logger[_0xe411('0x1d')](_0xe411('0x2d'),_0xe411('0x2c'),_0xe411('0x57'),util[_0xe411('0x3c')](_0x33f1fe,{'showHidden':![],'depth':null}));}});})[_0xe411('0x1c')](function(_0x3cc44d){return logger[_0xe411('0x1d')](_0xe411('0x2d'),_0xe411('0x2c'),_0xe411('0x57'),util[_0xe411('0x3c')](_0x3cc44d,{'showHidden':![],'depth':null}));});}else{logger[_0xe411('0x1d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xe411('0x2c'),_0xe411('0x57'),_0xe411('0x5d'));}}else{logger['error'](_0xe411('0x2d'),_0xe411('0x2c'),_0xe411('0x57'),_0xe411('0x3d'));}break;case _0xe411('0x5e'):var _0x5d3d80=require(_0xe411('0x5f'));if(_0xeeeccf[_0xe411('0x60')]){var _0x170c81={};_0x170c81[_0xe411('0x61')]=_0xeeeccf['username'];_0x170c81['phone']=_0x2465b2[_0xe411('0x27')];_0x170c81['sender']=_0xeeeccf[_0xe411('0x27')];_0x170c81[_0xe411('0x62')]=_0x2465b2[_0xe411('0x26')];_0x170c81[_0xe411('0x63')]=+new Date();var _0x353909='';var _0x1f55ce='';var _0x27458c=Object[_0xe411('0x64')](_0x170c81);_0x27458c[_0xe411('0x65')]();for(var _0x1c3f90=0x0;_0x1c3f90<_0x27458c[_0xe411('0x66')];_0x1c3f90++){if(_0x353909!=''){_0x353909+='&';}_0x353909+=_0x27458c[_0x1c3f90]+'='+encodeURIComponent(_0x170c81[_0x27458c[_0x1c3f90]]);_0x1f55ce+=_0x170c81[_0x27458c[_0x1c3f90]];}_0x1f55ce+=_0xeeeccf['apiKey'];_0x1f55ce=_0x5d3d80['createHash'](_0xe411('0x67'))[_0xe411('0x1a')](_0x1f55ce)[_0xe411('0x68')](_0xe411('0x69'));if(_0x353909!==''){_0x353909+='&';}_0x353909+=_0xe411('0x6a')+_0x1f55ce;var _0x27bfc8={'method':_0xe411('0x34'),'uri':_0xeeeccf[_0xe411('0x58')]+_0xe411('0x6b')+_0x353909,'json':!![]};return rp(_0x27bfc8)[_0xe411('0x19')](function(_0x4323f8){var _0x8b38d3=Object[_0xe411('0x64')](_0x4323f8);if(_0x4323f8[_0x8b38d3[0x0]]['error']&&parseInt(_0x4323f8[_0x8b38d3[0x0]][_0xe411('0x1d')])===0x0){var _0x40c249={'messageId':_0x4323f8[_0x8b38d3[0x0]]['id_sms']};if(!_0xeeeccf['deliveryReport']){_0x40c249[_0xe411('0x41')]=!![];}return _0x12f2fe[_0xe411('0x1a')](_0x40c249);}else{return logger[_0xe411('0x1d')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0xe411('0x2c'),_0xe411('0x5e'),util[_0xe411('0x3c')](_0x4323f8[_0xe411('0x1d')],{'showHidden':![],'depth':null}));}})['catch'](function(_0x1ccd01){return logger[_0xe411('0x1d')](_0xe411('0x2d'),_0xe411('0x2c'),_0xe411('0x5e'),util[_0xe411('0x3c')](_0x1ccd01,{'showHidden':![],'depth':null}));});}else{logger['error'](_0xe411('0x2d'),_0xe411('0x2c'),_0xe411('0x5e'),_0xe411('0x6c'));}break;case _0xe411('0x6d'):if(_0xeeeccf[_0xe411('0x60')]){var _0x3d7d25={'method':_0xe411('0x37'),'uri':_0xe411('0x6e'),'headers':{'Authorization':_0xeeeccf['apiKey']},'body':{'content':_0x2465b2[_0xe411('0x26')],'to':[_0x2465b2[_0xe411('0x27')]],'from':_0xeeeccf[_0xe411('0x27')],'binary':![],'clientMessageId':'uuid','charset':_0xe411('0x6f')},'json':!![]};rp(_0x3d7d25)['then'](function(_0x474ec5){if(!_0x474ec5[_0xe411('0x1d')]){var _0x9cc788={'messageId':_0x474ec5[_0xe411('0x25')][0x0][_0xe411('0x70')]};if(!_0xeeeccf[_0xe411('0x3b')]){_0x9cc788[_0xe411('0x41')]=!![];}return _0x12f2fe['update'](_0x9cc788);}else{return logger[_0xe411('0x1d')](_0xe411('0x2d'),'afterCreate','clickatell',util[_0xe411('0x3c')](_0x474ec5[_0xe411('0x1d')],{'showHidden':![],'depth':null}));}})['catch'](function(_0x374c32){return logger['error'](_0xe411('0x2d'),_0xe411('0x2c'),_0xe411('0x6d'),util[_0xe411('0x3c')](_0x374c32,{'showHidden':![],'depth':null}));});}else{logger[_0xe411('0x1d')](_0xe411('0x2d'),_0xe411('0x2c'),_0xe411('0x6d'),_0xe411('0x6c'));}break;case _0xe411('0x71'):if(_0xeeeccf[_0xe411('0x30')]&&_0xeeeccf[_0xe411('0x47')]){var _0x1720ba=util[_0xe411('0x45')](_0xe411('0x46'),_0xeeeccf[_0xe411('0x30')],_0xeeeccf['password']);var _0xbad2b5={'method':_0xe411('0x37'),'uri':_0xe411('0x72')+_0xeeeccf['accountId']+_0xe411('0x73'),'body':{'to':[_0x2465b2[_0xe411('0x27')]],'text':_0x2465b2[_0xe411('0x26')],'from':_0xeeeccf[_0xe411('0x27')],'applicationId':_0xeeeccf[_0xe411('0x74')]},'headers':{'Authorization':util[_0xe411('0x45')](_0xe411('0x49'),new Buffer(_0x1720ba)[_0xe411('0x4a')]('base64'))},'json':!![]};rp(_0xbad2b5)[_0xe411('0x19')](function(_0x5444f6){if(_0x5444f6['id']){var _0x25219f={'messageId':_0x5444f6['id']};return _0x12f2fe[_0xe411('0x1a')](_0x25219f);}else{logger[_0xe411('0x1d')]('SmsMessage,\x20%s,\x20%s,\x20%s','afterCreate','bandwidth',util[_0xe411('0x3c')](_0x5444f6,{'showHidden':![],'depth':null}));}})[_0xe411('0x1c')](function(_0x328b20){logger[_0xe411('0x1d')](_0xe411('0x2d'),_0xe411('0x2c'),'bandwidth',util[_0xe411('0x3c')](_0x328b20,{'showHidden':![],'depth':null}));});}else{logger[_0xe411('0x1d')](_0xe411('0x2d'),_0xe411('0x2c'),_0xe411('0x71'),_0xe411('0x3d'));}break;case _0xe411('0x75'):if(_0xeeeccf[_0xe411('0x60')]){var _0x4db531={};var _0x27bfc8={'method':_0xe411('0x37'),'uri':_0xe411('0x76'),'headers':{'Authorization':'Bearer\x20'+_0xeeeccf[_0xe411('0x60')],'Content-Type':'application/json'},'body':{'from':_0xeeeccf[_0xe411('0x27')],'to':_0x2465b2[_0xe411('0x27')],'text':_0x2465b2[_0xe411('0x26')]},'json':!![]};return rp(_0x27bfc8)[_0xe411('0x19')](function(_0x3e31a1){if(_0x3e31a1[_0xe411('0x77')]==0xca){_0x4db531['message']=_0x3e31a1;var _0x587277={'method':'POST','uri':_0xe411('0x78'),'headers':{'Authorization':_0xe411('0x79')+_0xeeeccf['apiKey'],'Content-Type':_0xe411('0x5b')},'body':{'refid':_0x4db531[_0xe411('0x7a')][_0xe411('0x7b')]},'json':!![]};return rp(_0x587277)[_0xe411('0x19')](function(_0x51cf76){_0x4db531[_0xe411('0x7c')]=_0x51cf76;var _0x4d2a76={'messageId':_0x4db531[_0xe411('0x7a')]['refid'],'read':!![]};return _0x12f2fe[_0xe411('0x1a')](_0x4d2a76);});}else{return logger[_0xe411('0x1d')](_0xe411('0x2d'),_0xe411('0x2c'),_0xe411('0x75'),util[_0xe411('0x3c')](_0x3e31a1,{'showHidden':![],'depth':null}));}})[_0xe411('0x1c')](function(_0xb4379a){return logger[_0xe411('0x1d')](_0xe411('0x2d'),_0xe411('0x2c'),'intelepeer',util['inspect'](_0xb4379a,{'showHidden':![],'depth':null}));});}else{return logger[_0xe411('0x1d')](_0xe411('0x2d'),_0xe411('0x2c'),_0xe411('0x75'),_0xe411('0x7d'));}break;}}})[_0xe411('0x7e')](function(){_0x252892();});}else{_0x252892();}}},'charset':_0xe411('0x7f'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
index 8be2664..428c4ea 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x36a9=['info','catch','SmsMessage','body','options','raw','then','CreateSmsMessage','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','redis','localhost','./smsMessage.socket','register','request','SmsMessage,\x20%s,\x20%s','request\x20sent','debug','stringify','error','message'];(function(_0x2df9af,_0xef6beb){var _0x19bc2c=function(_0x24989e){while(--_0x24989e){_0x2df9af['push'](_0x2df9af['shift']());}};_0x19bc2c(++_0xef6beb);}(_0x36a9,0x1ee));var _0x936a=function(_0x58fd80,_0x41c3e3){_0x58fd80=_0x58fd80-0x0;var _0x158e6e=_0x36a9[_0x58fd80];return _0x158e6e;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x936a('0x0'));var BPromise=require(_0x936a('0x1'));var rs=require(_0x936a('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x936a('0x3'))['db'];var utils=require(_0x936a('0x4'));var logger=require(_0x936a('0x5'))(_0x936a('0x6'));var config=require('../../config/environment');var jayson=require(_0x936a('0x7'));var client=jayson['client']['http']({'port':0x232a});config[_0x936a('0x8')]=_['defaults'](config[_0x936a('0x8')],{'host':_0x936a('0x9'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x936a('0x8')]));require(_0x936a('0xa'))[_0x936a('0xb')](socket);function respondWithRpcPromise(_0x4915b3,_0x46664e,_0x4bd5a5){return new BPromise(function(_0x36c0f9,_0x2f7c55){return client[_0x936a('0xc')](_0x4915b3,_0x4bd5a5)['then'](function(_0x394681){logger['info'](_0x936a('0xd'),_0x46664e,_0x936a('0xe'));logger[_0x936a('0xf')]('SmsMessage,\x20%s,\x20%s,\x20%s',_0x46664e,_0x936a('0xe'),JSON[_0x936a('0x10')](_0x394681));if(_0x394681['error']){if(_0x394681[_0x936a('0x11')]['code']===0x1f4){logger[_0x936a('0x11')](_0x936a('0xd'),_0x46664e,_0x394681[_0x936a('0x11')]['message']);return _0x2f7c55(_0x394681[_0x936a('0x11')]['message']);}logger['error'](_0x936a('0xd'),_0x46664e,_0x394681[_0x936a('0x11')]['message']);return _0x36c0f9(_0x394681[_0x936a('0x11')][_0x936a('0x12')]);}else{logger[_0x936a('0x13')](_0x936a('0xd'),_0x46664e,'request\x20sent');_0x36c0f9(_0x394681['result'][_0x936a('0x12')]);}})[_0x936a('0x14')](function(_0x55865d){logger[_0x936a('0x11')](_0x936a('0xd'),_0x46664e,_0x55865d);_0x2f7c55(_0x55865d);});});}exports['CreateSmsMessage']=function(_0x17237f){var _0x53761a=this;return new Promise(function(_0x53d16d,_0x3e5045){return db[_0x936a('0x15')]['create'](_0x17237f[_0x936a('0x16')],{'raw':_0x17237f['options']?_0x17237f[_0x936a('0x17')][_0x936a('0x18')]===undefined?!![]:![]:!![]})[_0x936a('0x19')](function(_0x56c7be){logger[_0x936a('0x13')](_0x936a('0x1a'),_0x17237f);logger[_0x936a('0xf')](_0x936a('0x1a'),_0x17237f,JSON[_0x936a('0x10')](_0x56c7be));_0x53d16d(_0x56c7be);})[_0x936a('0x14')](function(_0x27cd99){logger[_0x936a('0x11')](_0x936a('0x1a'),_0x27cd99[_0x936a('0x12')],_0x17237f);_0x3e5045(_0x53761a['error'](0x1f4,_0x27cd99[_0x936a('0x12')]));});});};
\ No newline at end of file
+var _0xc4ad=['CreateSmsMessage','SmsMessage','create','body','options','debug','stringify','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','defaults','localhost','socket.io-emitter','./smsMessage.socket','register','then','info','SmsMessage,\x20%s,\x20%s','request\x20sent','SmsMessage,\x20%s,\x20%s,\x20%s','error','code','message','result','catch'];(function(_0x4ab992,_0x5ed1d1){var _0x908e70=function(_0x248fa5){while(--_0x248fa5){_0x4ab992['push'](_0x4ab992['shift']());}};_0x908e70(++_0x5ed1d1);}(_0xc4ad,0x93));var _0xdc4a=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc4ad[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xdc4a('0x0'));var util=require(_0xdc4a('0x1'));var moment=require(_0xdc4a('0x2'));var BPromise=require(_0xdc4a('0x3'));var rs=require(_0xdc4a('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xdc4a('0x5'))['db'];var utils=require(_0xdc4a('0x6'));var logger=require(_0xdc4a('0x7'))(_0xdc4a('0x8'));var config=require(_0xdc4a('0x9'));var jayson=require(_0xdc4a('0xa'));var client=jayson[_0xdc4a('0xb')]['http']({'port':0x232a});config[_0xdc4a('0xc')]=_[_0xdc4a('0xd')](config['redis'],{'host':_0xdc4a('0xe'),'port':0x18eb});var socket=require(_0xdc4a('0xf'))(new Redis(config[_0xdc4a('0xc')]));require(_0xdc4a('0x10'))[_0xdc4a('0x11')](socket);function respondWithRpcPromise(_0x16806b,_0x568126,_0x3282b8){return new BPromise(function(_0x18fcb9,_0x425f4d){return client['request'](_0x16806b,_0x3282b8)[_0xdc4a('0x12')](function(_0x205e0d){logger[_0xdc4a('0x13')](_0xdc4a('0x14'),_0x568126,_0xdc4a('0x15'));logger['debug'](_0xdc4a('0x16'),_0x568126,'request\x20sent',JSON['stringify'](_0x205e0d));if(_0x205e0d[_0xdc4a('0x17')]){if(_0x205e0d[_0xdc4a('0x17')][_0xdc4a('0x18')]===0x1f4){logger[_0xdc4a('0x17')](_0xdc4a('0x14'),_0x568126,_0x205e0d[_0xdc4a('0x17')][_0xdc4a('0x19')]);return _0x425f4d(_0x205e0d[_0xdc4a('0x17')][_0xdc4a('0x19')]);}logger[_0xdc4a('0x17')](_0xdc4a('0x14'),_0x568126,_0x205e0d[_0xdc4a('0x17')][_0xdc4a('0x19')]);return _0x18fcb9(_0x205e0d[_0xdc4a('0x17')][_0xdc4a('0x19')]);}else{logger[_0xdc4a('0x13')](_0xdc4a('0x14'),_0x568126,'request\x20sent');_0x18fcb9(_0x205e0d[_0xdc4a('0x1a')][_0xdc4a('0x19')]);}})[_0xdc4a('0x1b')](function(_0x2a3a4b){logger[_0xdc4a('0x17')](_0xdc4a('0x14'),_0x568126,_0x2a3a4b);_0x425f4d(_0x2a3a4b);});});}exports[_0xdc4a('0x1c')]=function(_0x34aa57){var _0x57d0a5=this;return new Promise(function(_0x459052,_0x2e5c5f){return db[_0xdc4a('0x1d')][_0xdc4a('0x1e')](_0x34aa57[_0xdc4a('0x1f')],{'raw':_0x34aa57['options']?_0x34aa57[_0xdc4a('0x20')]['raw']===undefined?!![]:![]:!![]})[_0xdc4a('0x12')](function(_0xe97d78){logger[_0xdc4a('0x13')](_0xdc4a('0x1c'),_0x34aa57);logger[_0xdc4a('0x21')](_0xdc4a('0x1c'),_0x34aa57,JSON[_0xdc4a('0x22')](_0xe97d78));_0x459052(_0xe97d78);})['catch'](function(_0x3f98cc){logger['error']('CreateSmsMessage',_0x3f98cc[_0xdc4a('0x19')],_0x34aa57);_0x2e5c5f(_0x57d0a5[_0xdc4a('0x17')](0x1f4,_0x3f98cc[_0xdc4a('0x19')]));});});};
\ No newline at end of file
index 9d88b74..da8a050 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf6be=['emit','removeListener','register','length','smsMessage:','./smsMessage.events','remove','update'];(function(_0x5cf3a3,_0x29327c){var _0x349b78=function(_0x465240){while(--_0x465240){_0x5cf3a3['push'](_0x5cf3a3['shift']());}};_0x349b78(++_0x29327c);}(_0xf6be,0xbd));var _0xef6b=function(_0x5d6e30,_0xc21d51){_0x5d6e30=_0x5d6e30-0x0;var _0x3d3f3b=_0xf6be[_0x5d6e30];return _0x3d3f3b;};'use strict';var SmsMessageEvents=require(_0xef6b('0x0'));var events=['save',_0xef6b('0x1'),_0xef6b('0x2')];function createListener(_0x3dcabc,_0x2bddd9){return function(_0x2d1b65){_0x2bddd9[_0xef6b('0x3')](_0x3dcabc,_0x2d1b65);};}function removeListener(_0x1a8e9d,_0x74fa95){return function(){SmsMessageEvents[_0xef6b('0x4')](_0x1a8e9d,_0x74fa95);};}exports[_0xef6b('0x5')]=function(_0x4332f2){for(var _0x15dd2b=0x0,_0x403ced=events[_0xef6b('0x6')];_0x15dd2b<_0x403ced;_0x15dd2b++){var _0x32cf89=events[_0x15dd2b];var _0x22477d=createListener(_0xef6b('0x7')+_0x32cf89,_0x4332f2);SmsMessageEvents['on'](_0x32cf89,_0x22477d);}};
\ No newline at end of file
+var _0x28a1=['update','removeListener','length','smsMessage:','./smsMessage.events','save','remove'];(function(_0x5c0454,_0x8aa1a5){var _0x183e03=function(_0x44b1a6){while(--_0x44b1a6){_0x5c0454['push'](_0x5c0454['shift']());}};_0x183e03(++_0x8aa1a5);}(_0x28a1,0x170));var _0x128a=function(_0x4e21ba,_0x18097f){_0x4e21ba=_0x4e21ba-0x0;var _0x55b94b=_0x28a1[_0x4e21ba];return _0x55b94b;};'use strict';var SmsMessageEvents=require(_0x128a('0x0'));var events=[_0x128a('0x1'),_0x128a('0x2'),_0x128a('0x3')];function createListener(_0x5e3d3a,_0x184222){return function(_0x39608d){_0x184222['emit'](_0x5e3d3a,_0x39608d);};}function removeListener(_0x5b4729,_0x8743d8){return function(){SmsMessageEvents[_0x128a('0x4')](_0x5b4729,_0x8743d8);};}exports['register']=function(_0x15cd78){for(var _0x4d726c=0x0,_0x3b41da=events[_0x128a('0x5')];_0x4d726c<_0x3b41da;_0x4d726c++){var _0x3e5f0a=events[_0x4d726c];var _0x2199d3=createListener(_0x128a('0x6')+_0x3e5f0a,_0x15cd78);SmsMessageEvents['on'](_0x3e5f0a,_0x2199d3);}};
\ No newline at end of file
index c347a41..4682a2e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe647=['removeTeams','removeAgents','exports','multer','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsQueue.controller','isAuthenticated','get','/describe','show','/:id/members','getMembers','/:id/teams','/:id/users','getAgents','create','post','put','/:id','delete','destroy'];(function(_0x5dd0fa,_0x1fe623){var _0x29ddea=function(_0x57d591){while(--_0x57d591){_0x5dd0fa['push'](_0x5dd0fa['shift']());}};_0x29ddea(++_0x1fe623);}(_0xe647,0x161));var _0x7e64=function(_0x1f5677,_0xb89dd3){_0x1f5677=_0x1f5677-0x0;var _0x2c0e60=_0xe647[_0x1f5677];return _0x2c0e60;};'use strict';var multer=require(_0x7e64('0x0'));var util=require('util');var path=require(_0x7e64('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x7e64('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0x7e64('0x3'));var interaction=require(_0x7e64('0x4'));var config=require(_0x7e64('0x5'));var controller=require(_0x7e64('0x6'));router['get']('/',auth[_0x7e64('0x7')](),controller['index']);router[_0x7e64('0x8')](_0x7e64('0x9'),auth[_0x7e64('0x7')](),controller['describe']);router[_0x7e64('0x8')]('/:id',auth[_0x7e64('0x7')](),controller[_0x7e64('0xa')]);router[_0x7e64('0x8')](_0x7e64('0xb'),auth[_0x7e64('0x7')](),controller[_0x7e64('0xc')]);router[_0x7e64('0x8')](_0x7e64('0xd'),auth[_0x7e64('0x7')](),controller['getTeams']);router[_0x7e64('0x8')](_0x7e64('0xe'),auth['isAuthenticated'](),controller[_0x7e64('0xf')]);router['post']('/',auth[_0x7e64('0x7')](),controller[_0x7e64('0x10')]);router[_0x7e64('0x11')](_0x7e64('0xd'),auth['isAuthenticated'](),controller['addTeams']);router[_0x7e64('0x11')](_0x7e64('0xe'),auth[_0x7e64('0x7')](),controller['addAgents']);router[_0x7e64('0x12')](_0x7e64('0x13'),auth[_0x7e64('0x7')](),controller['update']);router[_0x7e64('0x14')](_0x7e64('0x13'),auth[_0x7e64('0x7')](),controller[_0x7e64('0x15')]);router[_0x7e64('0x14')](_0x7e64('0xd'),auth[_0x7e64('0x7')](),controller[_0x7e64('0x16')]);router[_0x7e64('0x14')](_0x7e64('0xe'),auth['isAuthenticated'](),controller[_0x7e64('0x17')]);module[_0x7e64('0x18')]=router;
\ No newline at end of file
+var _0x74d1=['/:id/teams','getTeams','/:id/users','getAgents','post','addTeams','put','update','delete','destroy','removeTeams','removeAgents','exports','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../config/environment','get','isAuthenticated','index','/describe','describe','/:id'];(function(_0x5be2fe,_0x413804){var _0x41ce61=function(_0x1c6a9e){while(--_0x1c6a9e){_0x5be2fe['push'](_0x5be2fe['shift']());}};_0x41ce61(++_0x413804);}(_0x74d1,0x111));var _0x174d=function(_0x3184f0,_0x31266e){_0x3184f0=_0x3184f0-0x0;var _0x4e2094=_0x74d1[_0x3184f0];return _0x4e2094;};'use strict';var multer=require('multer');var util=require(_0x174d('0x0'));var path=require(_0x174d('0x1'));var timeout=require(_0x174d('0x2'));var express=require(_0x174d('0x3'));var router=express['Router']();var fs_extra=require(_0x174d('0x4'));var auth=require(_0x174d('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x174d('0x6'));var controller=require('./smsQueue.controller');router[_0x174d('0x7')]('/',auth[_0x174d('0x8')](),controller[_0x174d('0x9')]);router['get'](_0x174d('0xa'),auth[_0x174d('0x8')](),controller[_0x174d('0xb')]);router['get'](_0x174d('0xc'),auth[_0x174d('0x8')](),controller['show']);router[_0x174d('0x7')]('/:id/members',auth[_0x174d('0x8')](),controller['getMembers']);router['get'](_0x174d('0xd'),auth['isAuthenticated'](),controller[_0x174d('0xe')]);router[_0x174d('0x7')](_0x174d('0xf'),auth[_0x174d('0x8')](),controller[_0x174d('0x10')]);router[_0x174d('0x11')]('/',auth[_0x174d('0x8')](),controller['create']);router[_0x174d('0x11')]('/:id/teams',auth[_0x174d('0x8')](),controller[_0x174d('0x12')]);router[_0x174d('0x11')](_0x174d('0xf'),auth[_0x174d('0x8')](),controller['addAgents']);router[_0x174d('0x13')](_0x174d('0xc'),auth['isAuthenticated'](),controller[_0x174d('0x14')]);router[_0x174d('0x15')](_0x174d('0xc'),auth[_0x174d('0x8')](),controller[_0x174d('0x16')]);router[_0x174d('0x15')](_0x174d('0xd'),auth[_0x174d('0x8')](),controller[_0x174d('0x17')]);router[_0x174d('0x15')](_0x174d('0xf'),auth['isAuthenticated'](),controller[_0x174d('0x18')]);module[_0x174d('0x19')]=router;
\ No newline at end of file
index 86775a7..5d73697 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xefab=['INTEGER','ENUM','rrmemory','beepall','sequelize','STRING','name'];(function(_0x507965,_0x4944f4){var _0x3608fc=function(_0x14c8d0){while(--_0x14c8d0){_0x507965['push'](_0x507965['shift']());}};_0x3608fc(++_0x4944f4);}(_0xefab,0x9e));var _0xbefa=function(_0x122633,_0x22057b){_0x122633=_0x122633-0x0;var _0x2d02e5=_0xefab[_0x122633];return _0x2d02e5;};'use strict';var Sequelize=require(_0xbefa('0x0'));module['exports']={'name':{'type':Sequelize[_0xbefa('0x1')],'unique':_0xbefa('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0xbefa('0x1')]},'timeout':{'type':Sequelize[_0xbefa('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xbefa('0x4')](_0xbefa('0x5'),_0xbefa('0x6'),'roundrobin')}};
\ No newline at end of file
+var _0x492d=['INTEGER','rrmemory','beepall','roundrobin','sequelize','exports','STRING','name'];(function(_0x2c9056,_0x552f14){var _0x3e6959=function(_0x556247){while(--_0x556247){_0x2c9056['push'](_0x2c9056['shift']());}};_0x3e6959(++_0x552f14);}(_0x492d,0x124));var _0xd492=function(_0x275c4b,_0x4b69d3){_0x275c4b=_0x275c4b-0x0;var _0x52ae30=_0x492d[_0x275c4b];return _0x52ae30;};'use strict';var Sequelize=require(_0xd492('0x0'));module[_0xd492('0x1')]={'name':{'type':Sequelize[_0xd492('0x2')],'unique':_0xd492('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'description':{'type':Sequelize[_0xd492('0x2')]},'timeout':{'type':Sequelize[_0xd492('0x4')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize['ENUM'](_0xd492('0x5'),_0xd492('0x6'),_0xd492('0x7'))}};
\ No newline at end of file
index 391ae82..966a4e4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdb28=['userSmsQueue:save','removeTeams','select','field','from','team_has_sms_queues','join','SmsQueueId\x20=\x20?','ut.UserId\x20=\x20?','push','QueryTypes','TeamId','includes','all','union','value','isEmpty','removeAgents','forEach','addAgents','omit','spread','userSmsQueue:remove','getAgents','bluebird','util','lodash','squel','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','defaults','redis','./smsQueue.socket','register','sendStatus','end','status','json','offset','undefined','count','limit','Content-Range','update','then','get','SmsQueues','destroy','error','stack','name','map','SmsQueue','fieldName','type','key','where','include','rows','show','keys','query','filters','intersection','model','attributes','fields','length','includeAll','merge','options','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','catch','body','params','describe','getMembers','findOne','UserSmsQueue','rawAttributes','hasOwnProperty','nolimit','order','sort','SmsQueueId','filter','findAll','User','findAndCountAll','UserId','agent','smsPause','updatedAt','createdAt','format','%s/%s','getTeams','Team','pick','ids','Agents','online','voicePause','interface','sequelize','transaction','addTeams','each','emit'];(function(_0x48de4d,_0x5c4494){var _0xbb9b04=function(_0x374aaa){while(--_0x374aaa){_0x48de4d['push'](_0x48de4d['shift']());}};_0xbb9b04(++_0x5c4494);}(_0xdb28,0x106));var _0x8db2=function(_0x564b2a,_0x59967a){_0x564b2a=_0x564b2a-0x0;var _0x526c7b=_0xdb28[_0x564b2a];return _0x526c7b;};'use strict';var BPromise=require(_0x8db2('0x0'));var util=require(_0x8db2('0x1'));var _=require(_0x8db2('0x2'));var squel=require(_0x8db2('0x3'));var Redis=require('ioredis');var qs=require(_0x8db2('0x4'));var logger=require(_0x8db2('0x5'))(_0x8db2('0x6'));var config=require(_0x8db2('0x7'));var db=require(_0x8db2('0x8'))['db'];config['redis']=_[_0x8db2('0x9')](config[_0x8db2('0xa')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x8db2('0xa')]));require(_0x8db2('0xb'))[_0x8db2('0xc')](socket);function respondWithStatusCode(_0x29f698,_0x2f3f2f){_0x2f3f2f=_0x2f3f2f||0xcc;return function(_0x1ff362){if(_0x1ff362){return _0x29f698[_0x8db2('0xd')](_0x2f3f2f);}return _0x29f698['status'](_0x2f3f2f)[_0x8db2('0xe')]();};}function respondWithResult(_0x476216,_0x1f62af){_0x1f62af=_0x1f62af||0xc8;return function(_0x57015f){if(_0x57015f){return _0x476216[_0x8db2('0xf')](_0x1f62af)[_0x8db2('0x10')](_0x57015f);}};}function respondWithFilteredResult(_0x576475,_0x41beda){return function(_0x3b2faa){if(_0x3b2faa){var _0x1349f6=typeof _0x41beda[_0x8db2('0x11')]===_0x8db2('0x12')&&typeof _0x41beda['limit']==='undefined';var _0x15070d=_0x3b2faa[_0x8db2('0x13')];var _0x350d61=_0x1349f6?0x0:_0x41beda[_0x8db2('0x11')];var _0x227355=_0x1349f6?_0x3b2faa[_0x8db2('0x13')]:_0x41beda[_0x8db2('0x11')]+_0x41beda[_0x8db2('0x14')];var _0x131252;if(_0x227355>=_0x15070d){_0x227355=_0x15070d;_0x131252=0xc8;}else{_0x131252=0xce;}_0x576475[_0x8db2('0xf')](_0x131252);return _0x576475['set'](_0x8db2('0x15'),_0x350d61+'-'+_0x227355+'/'+_0x15070d)[_0x8db2('0x10')](_0x3b2faa);}return null;};}function saveUpdates(_0x48101e){return function(_0x2b3f73){if(_0x2b3f73){return _0x2b3f73[_0x8db2('0x16')](_0x48101e)[_0x8db2('0x17')](function(_0x3fddc2){return _0x3fddc2;});}return null;};}function removeEntity(_0x2efd06){return function(_0x46ce14){if(_0x46ce14){return _0x46ce14['destroy']()['then'](function(){var _0x77789=_0x46ce14[_0x8db2('0x18')]({'plain':!![]});var _0x1310d3=_0x8db2('0x19');return db['UserProfileResource'][_0x8db2('0x1a')]({'where':{'type':_0x1310d3,'resourceId':_0x77789['id']}})[_0x8db2('0x17')](function(){return _0x46ce14;});})[_0x8db2('0x17')](function(){_0x2efd06[_0x8db2('0xf')](0xcc)[_0x8db2('0xe')]();});}};}function handleEntityNotFound(_0x597260){return function(_0x124467){if(!_0x124467){_0x597260[_0x8db2('0xd')](0x194);}return _0x124467;};}function handleError(_0x18f69c,_0x125be2){_0x125be2=_0x125be2||0x1f4;return function(_0x2260d8){logger[_0x8db2('0x1b')](_0x2260d8[_0x8db2('0x1c')]);if(_0x2260d8['name']){delete _0x2260d8[_0x8db2('0x1d')];}_0x18f69c['status'](_0x125be2)['send'](_0x2260d8);};}exports['index']=function(_0x4d923c,_0xec8cd2){var _0x29b5cd={};var _0x3be281={'count':0x0,'rows':[]};var _0x2baed0=_[_0x8db2('0x1e')](db[_0x8db2('0x1f')]['rawAttributes'],function(_0x3544ba){return{'name':_0x3544ba[_0x8db2('0x20')],'type':_0x3544ba[_0x8db2('0x21')][_0x8db2('0x22')]};});_0x29b5cd=qs['getOptions'](_0x2baed0,_0x4d923c);var _0x2e0691={'where':_0x29b5cd[_0x8db2('0x23')]};return db[_0x8db2('0x1f')][_0x8db2('0x13')](_0x2e0691)[_0x8db2('0x17')](function(_0x21bae5){_0x3be281[_0x8db2('0x13')]=_0x21bae5;_0x29b5cd[_0x8db2('0x24')]=qs[_0x8db2('0x24')](_0x4d923c['query']);return db[_0x8db2('0x1f')]['findAll'](_0x29b5cd);})['then'](function(_0x302188){_0x3be281[_0x8db2('0x25')]=_0x302188;return _0x3be281;})[_0x8db2('0x17')](respondWithFilteredResult(_0xec8cd2,_0x29b5cd))['catch'](handleError(_0xec8cd2,null));};exports[_0x8db2('0x26')]=function(_0x56b71a,_0x3f7aac){var _0x2b653b={'raw':!![],'where':{'id':_0x56b71a['params']['id']}},_0x14bd12={};_0x14bd12['model']=_[_0x8db2('0x27')](db[_0x8db2('0x1f')]['rawAttributes']);_0x14bd12['query']=_[_0x8db2('0x27')](_0x56b71a[_0x8db2('0x28')]);_0x14bd12[_0x8db2('0x29')]=_[_0x8db2('0x2a')](_0x14bd12[_0x8db2('0x2b')],_0x14bd12[_0x8db2('0x28')]);_0x2b653b[_0x8db2('0x2c')]=_[_0x8db2('0x2a')](_0x14bd12[_0x8db2('0x2b')],qs[_0x8db2('0x2d')](_0x56b71a['query'][_0x8db2('0x2d')]));_0x2b653b[_0x8db2('0x2c')]=_0x2b653b['attributes'][_0x8db2('0x2e')]?_0x2b653b[_0x8db2('0x2c')]:_0x14bd12['model'];if(_0x56b71a['query'][_0x8db2('0x2f')]){_0x2b653b['include']=[{'all':!![]}];}_0x2b653b=_[_0x8db2('0x30')]({},_0x2b653b,_0x56b71a[_0x8db2('0x31')]);return db[_0x8db2('0x1f')][_0x8db2('0x32')](_0x2b653b)['then'](handleEntityNotFound(_0x3f7aac,null))[_0x8db2('0x17')](respondWithResult(_0x3f7aac,null))['catch'](handleError(_0x3f7aac,null));};exports[_0x8db2('0x33')]=function(_0xd550ae,_0x2c8bc9){return db[_0x8db2('0x1f')]['create'](_0xd550ae['body'],{})[_0x8db2('0x17')](function(_0x2c0507){var _0x5dc2b4=_0xd550ae[_0x8db2('0x34')][_0x8db2('0x18')]({'plain':!![]});if(!_0x5dc2b4)throw new Error(_0x8db2('0x35'));if(_0x5dc2b4['role']===_0x8db2('0x34')){var _0x149186=_0x2c0507[_0x8db2('0x18')]({'plain':!![]});var _0x279e74=_0x8db2('0x19');return db[_0x8db2('0x36')][_0x8db2('0x32')]({'where':{'name':_0x279e74,'userProfileId':_0x5dc2b4[_0x8db2('0x37')]},'raw':!![]})[_0x8db2('0x17')](function(_0x63c561){if(_0x63c561&&_0x63c561[_0x8db2('0x38')]===0x0){return db[_0x8db2('0x39')][_0x8db2('0x33')]({'name':_0x149186['name'],'resourceId':_0x149186['id'],'type':_0x63c561[_0x8db2('0x1d')],'sectionId':_0x63c561['id']},{})[_0x8db2('0x17')](function(){return _0x2c0507;});}else{return _0x2c0507;}})['catch'](function(_0x49a7ae){logger[_0x8db2('0x1b')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x49a7ae);throw _0x49a7ae;});}return _0x2c0507;})[_0x8db2('0x17')](respondWithResult(_0x2c8bc9,0xc9))[_0x8db2('0x3a')](handleError(_0x2c8bc9,null));};exports[_0x8db2('0x16')]=function(_0x307783,_0xb4fe2c){if(_0x307783[_0x8db2('0x3b')]['id']){delete _0x307783[_0x8db2('0x3b')]['id'];}return db['SmsQueue'][_0x8db2('0x32')]({'where':{'id':_0x307783[_0x8db2('0x3c')]['id']}})[_0x8db2('0x17')](handleEntityNotFound(_0xb4fe2c,null))[_0x8db2('0x17')](saveUpdates(_0x307783['body'],null))[_0x8db2('0x17')](respondWithResult(_0xb4fe2c,null))[_0x8db2('0x3a')](handleError(_0xb4fe2c,null));};exports[_0x8db2('0x1a')]=function(_0x2c47cc,_0x5427af){return db[_0x8db2('0x1f')]['find']({'where':{'id':_0x2c47cc[_0x8db2('0x3c')]['id']}})[_0x8db2('0x17')](handleEntityNotFound(_0x5427af,null))[_0x8db2('0x17')](removeEntity(_0x5427af,null))['catch'](handleError(_0x5427af,null));};exports['describe']=function(_0x1ec3d0,_0x47c556){return db[_0x8db2('0x1f')][_0x8db2('0x3d')]()[_0x8db2('0x17')](respondWithResult(_0x47c556,null))[_0x8db2('0x3a')](handleError(_0x47c556,null));};exports[_0x8db2('0x3e')]=function(_0x40c6e6,_0x4355e2){var _0xab6bdd={'raw':!![],'where':{}},_0x4291e3={},_0x12a1ef;return db[_0x8db2('0x1f')][_0x8db2('0x3f')]({'where':{'id':_0x40c6e6['params']['id']}})[_0x8db2('0x17')](handleEntityNotFound(_0x4355e2,null))[_0x8db2('0x17')](function(_0xdbba64){if(_0xdbba64){_0x12a1ef=_0xdbba64[_0x8db2('0x18')]({'plain':!![]});_0x4291e3['model']=_['keys'](db[_0x8db2('0x40')][_0x8db2('0x41')]);_0x4291e3[_0x8db2('0x28')]=_['keys'](_0x40c6e6['query']);_0x4291e3['filters']=_[_0x8db2('0x2a')](_0x4291e3[_0x8db2('0x2b')],_0x4291e3[_0x8db2('0x28')]);_0xab6bdd[_0x8db2('0x2c')]=_[_0x8db2('0x2a')](_0x4291e3[_0x8db2('0x2b')],qs[_0x8db2('0x2d')](_0x40c6e6['query']['fields']));_0xab6bdd[_0x8db2('0x2c')]=_0xab6bdd[_0x8db2('0x2c')][_0x8db2('0x2e')]?_0xab6bdd[_0x8db2('0x2c')]:_0x4291e3[_0x8db2('0x2b')];if(!_0x40c6e6[_0x8db2('0x28')][_0x8db2('0x42')](_0x8db2('0x43'))){_0xab6bdd[_0x8db2('0x14')]=qs[_0x8db2('0x14')](_0x40c6e6[_0x8db2('0x28')][_0x8db2('0x14')]);_0xab6bdd[_0x8db2('0x11')]=qs[_0x8db2('0x11')](_0x40c6e6[_0x8db2('0x28')]['offset']);}_0xab6bdd[_0x8db2('0x44')]=qs[_0x8db2('0x45')](_0x40c6e6['query'][_0x8db2('0x45')]);_0xab6bdd[_0x8db2('0x23')]=qs[_0x8db2('0x29')](_['pick'](_0x40c6e6[_0x8db2('0x28')],_0x4291e3[_0x8db2('0x29')]));_0xab6bdd[_0x8db2('0x23')][_0x8db2('0x46')]=_0xdbba64['id'];if(_0x40c6e6[_0x8db2('0x28')]['filter']){_0xab6bdd[_0x8db2('0x23')]=_[_0x8db2('0x30')](_0xab6bdd[_0x8db2('0x23')],{'$or':_['map'](_0xab6bdd[_0x8db2('0x2c')],function(_0x18cc13){var _0x33dddd={};_0x33dddd[_0x18cc13]={'$like':'%'+_0x40c6e6[_0x8db2('0x28')][_0x8db2('0x47')]+'%'};return _0x33dddd;})});}_0xab6bdd=_[_0x8db2('0x30')]({},_0xab6bdd,_0x40c6e6[_0x8db2('0x31')]);return db['UserSmsQueue'][_0x8db2('0x48')](_0xab6bdd);}})[_0x8db2('0x17')](function(_0x4d3c19){if(_0x4d3c19){return db[_0x8db2('0x49')][_0x8db2('0x4a')]({'where':{'id':_['map'](_0x4d3c19,_0x8db2('0x4b')),'role':_0x8db2('0x4c')},'attributes':['id',_0x8db2('0x1d'),_0x8db2('0x4d'),_0x8db2('0x4e'),_0x8db2('0x4f')]});}})[_0x8db2('0x17')](function(_0x33a600){if(_0x33a600){return{'count':_0x33a600[_0x8db2('0x13')],'rows':_[_0x8db2('0x1e')](_0x33a600[_0x8db2('0x25')],function(_0x447a47){return{'membername':_0x447a47[_0x8db2('0x1d')],'UserId':_0x447a47['id'],'queue_name':_0x12a1ef[_0x8db2('0x1d')],'SmsQueueId':_0x12a1ef['id'],'interface':util[_0x8db2('0x50')](_0x8db2('0x51'),'SIP',_0x447a47[_0x8db2('0x1d')]),'penalty':0x0,'paused':_0x447a47[_0x8db2('0x4d')],'createdAt':_0x447a47[_0x8db2('0x4f')],'updatedAt':_0x447a47[_0x8db2('0x4e')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x8db2('0x17')](respondWithFilteredResult(_0x4355e2,_0xab6bdd))['catch'](handleError(_0x4355e2,null));};exports[_0x8db2('0x52')]=function(_0x2c3087,_0x3ab670){var _0x1e1c0d={};var _0x2ad70f={};var _0x348da8;var _0x17341d;return db[_0x8db2('0x1f')][_0x8db2('0x3f')]({'where':{'id':_0x2c3087[_0x8db2('0x3c')]['id']}})[_0x8db2('0x17')](handleEntityNotFound(_0x3ab670,null))[_0x8db2('0x17')](function(_0x170a72){if(_0x170a72){_0x348da8=_0x170a72;_0x2ad70f[_0x8db2('0x2b')]=_[_0x8db2('0x27')](db[_0x8db2('0x53')][_0x8db2('0x41')]);_0x2ad70f[_0x8db2('0x28')]=_['keys'](_0x2c3087[_0x8db2('0x28')]);_0x2ad70f['filters']=_[_0x8db2('0x2a')](_0x2ad70f['model'],_0x2ad70f[_0x8db2('0x28')]);_0x1e1c0d[_0x8db2('0x2c')]=_[_0x8db2('0x2a')](_0x2ad70f[_0x8db2('0x2b')],qs[_0x8db2('0x2d')](_0x2c3087['query']['fields']));_0x1e1c0d[_0x8db2('0x2c')]=_0x1e1c0d[_0x8db2('0x2c')][_0x8db2('0x2e')]?_0x1e1c0d[_0x8db2('0x2c')]:_0x2ad70f[_0x8db2('0x2b')];_0x1e1c0d[_0x8db2('0x44')]=qs[_0x8db2('0x45')](_0x2c3087[_0x8db2('0x28')]['sort']);_0x1e1c0d[_0x8db2('0x23')]=qs[_0x8db2('0x29')](_[_0x8db2('0x54')](_0x2c3087[_0x8db2('0x28')],_0x2ad70f[_0x8db2('0x29')]));if(_0x2c3087[_0x8db2('0x28')][_0x8db2('0x47')]){_0x1e1c0d[_0x8db2('0x23')]=_['merge'](_0x1e1c0d['where'],{'$or':_[_0x8db2('0x1e')](_0x1e1c0d[_0x8db2('0x2c')],function(_0x1d2dfc){var _0x27f4cd={};_0x27f4cd[_0x1d2dfc]={'$like':'%'+_0x2c3087[_0x8db2('0x28')]['filter']+'%'};return _0x27f4cd;})});}_0x1e1c0d=_['merge']({},_0x1e1c0d,_0x2c3087[_0x8db2('0x31')]);return _0x348da8[_0x8db2('0x52')](_0x1e1c0d);}})['then'](function(_0xa698bd){if(_0xa698bd){_0x17341d=_0xa698bd[_0x8db2('0x2e')];if(!_0x2c3087[_0x8db2('0x28')]['hasOwnProperty'](_0x8db2('0x43'))){_0x1e1c0d[_0x8db2('0x14')]=qs[_0x8db2('0x14')](_0x2c3087['query'][_0x8db2('0x14')]);_0x1e1c0d[_0x8db2('0x11')]=qs[_0x8db2('0x11')](_0x2c3087[_0x8db2('0x28')][_0x8db2('0x11')]);}return _0x348da8['getTeams'](_0x1e1c0d);}})[_0x8db2('0x17')](function(_0x3023fe){if(_0x3023fe){return _0x3023fe?{'count':_0x17341d,'rows':_0x3023fe}:null;}})[_0x8db2('0x17')](respondWithResult(_0x3ab670,null))['catch'](handleError(_0x3ab670,null));};exports['addTeams']=function(_0x2cdf3c,_0xbe05ca){var _0x487dcb=_0x2cdf3c[_0x8db2('0x3b')][_0x8db2('0x55')];return db[_0x8db2('0x53')][_0x8db2('0x48')]({'where':{'id':_0x487dcb},'attributes':['id'],'include':[{'model':db[_0x8db2('0x49')],'as':_0x8db2('0x56'),'attributes':['id',_0x8db2('0x1d'),_0x8db2('0x57'),_0x8db2('0x58'),_0x8db2('0x59')],'raw':!![]}]})[_0x8db2('0x17')](function(_0x3e1478){if(_0x3e1478){var _0x24a52d=_['flatMap'](_0x3e1478,function(_0x2ba42d){var _0x4f29f1=_0x2ba42d[_0x8db2('0x18')]({'plain':!![]});return _0x4f29f1[_0x8db2('0x56')];});return db['SmsQueue'][_0x8db2('0x32')]({'where':{'id':_0x2cdf3c[_0x8db2('0x3c')]['id']}})['then'](function(_0x2159c4){return db[_0x8db2('0x5a')][_0x8db2('0x5b')](function(_0x25a3ab){return _0x2159c4[_0x8db2('0x5c')](_0x487dcb,{'transaction':_0x25a3ab})[_0x8db2('0x17')](function(){return BPromise[_0x8db2('0x5d')](_0x24a52d,function(_0x3ac0fa){return db[_0x8db2('0x40')]['findOrCreate']({'where':{'UserId':_0x3ac0fa['id'],'SmsQueueId':_0x2cdf3c['params']['id']},'transaction':_0x25a3ab});});})[_0x8db2('0x17')](function(){_0x24a52d['forEach'](function(_0xf8afa5){socket[_0x8db2('0x5e')](_0x8db2('0x5f'),{'UserId':_0xf8afa5['id'],'SmsQueueId':_0x2159c4['id']});});});});});}})['then'](respondWithStatusCode(_0xbe05ca,null))[_0x8db2('0x3a')](handleError(_0xbe05ca,null));};exports[_0x8db2('0x60')]=function(_0x3e37e7,_0x591c5d){return db[_0x8db2('0x53')][_0x8db2('0x48')]({'where':{'id':_0x3e37e7[_0x8db2('0x28')][_0x8db2('0x55')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0x8db2('0x56'),'attributes':['id'],'raw':!![]}]})[_0x8db2('0x17')](handleEntityNotFound(_0x591c5d,null))[_0x8db2('0x17')](function(_0x1edb1a){var _0xcf1c42=_[_0x8db2('0x1e')](_0x1edb1a,'id');var _0x1aadfb=[];var _0x3682bf=[];var _0x358f48=squel[_0x8db2('0x61')]();_0x358f48[_0x8db2('0x62')]('tq.TeamId')[_0x8db2('0x63')](_0x8db2('0x64'),'tq')[_0x8db2('0x65')]('user_has_teams','ut','ut.TeamId\x20=\x20tq.TeamId')['where'](_0x8db2('0x66'),_0x3e37e7[_0x8db2('0x3c')]['id']);for(var _0x3191c8=0x0;_0x3191c8<_0x1edb1a[_0x8db2('0x2e')];_0x3191c8+=0x1){let _0x2ad024=_0x1edb1a[_0x3191c8];for(var _0x313918=0x0;_0x313918<_0x2ad024[_0x8db2('0x56')][_0x8db2('0x2e')];_0x313918+=0x1){let _0x3b1929=_0x2ad024[_0x8db2('0x56')][_0x313918];var _0x46eb80=_0x358f48['clone']();_0x46eb80[_0x8db2('0x23')](_0x8db2('0x67'),_0x3b1929['id']);_0x3682bf[_0x8db2('0x68')](db[_0x8db2('0x5a')]['query'](_0x46eb80['toString'](),{'type':db[_0x8db2('0x5a')][_0x8db2('0x69')]['SELECT']})[_0x8db2('0x17')](function(_0x121f31){if(_0x121f31[_0x8db2('0x2e')]===0x1){return _0x3b1929['id'];}else{var _0x5f2ece=_['every'](_['map'](_0x121f31,_0x8db2('0x6a')),function(_0x18b4a6){return _[_0x8db2('0x6b')](_0xcf1c42,_0x18b4a6);});if(_0x5f2ece){return _0x3b1929['id'];}}}));}}return BPromise[_0x8db2('0x6c')](_0x3682bf)[_0x8db2('0x17')](function(_0x4e8aac){_0x1aadfb=_(_0x1aadfb)[_0x8db2('0x6d')](_0x4e8aac)['compact']()[_0x8db2('0x6e')]();return db[_0x8db2('0x1f')][_0x8db2('0x32')]({'where':{'id':_0x3e37e7[_0x8db2('0x3c')]['id']}})[_0x8db2('0x17')](function(_0x5d5380){return db['sequelize'][_0x8db2('0x5b')](function(_0x51afcf){return _0x5d5380[_0x8db2('0x60')](_0x3e37e7[_0x8db2('0x28')][_0x8db2('0x55')],{'transaction':_0x51afcf})[_0x8db2('0x17')](function(){if(!_[_0x8db2('0x6f')](_0x1aadfb)){return _0x5d5380[_0x8db2('0x70')](_0x1aadfb,{'transaction':_0x51afcf});}})['then'](function(){_0x1aadfb[_0x8db2('0x71')](function(_0x222ea2){socket[_0x8db2('0x5e')]('userSmsQueue:remove',{'UserId':_0x222ea2,'SmsQueueId':_0x5d5380['id']});});});});});});})[_0x8db2('0x17')](respondWithStatusCode(_0x591c5d,null))[_0x8db2('0x3a')](handleError(_0x591c5d,null));};exports['addAgents']=function(_0x2d7abf,_0x7cb97d){return db[_0x8db2('0x1f')][_0x8db2('0x32')]({'where':{'id':_0x2d7abf[_0x8db2('0x3c')]['id']}})[_0x8db2('0x17')](handleEntityNotFound(_0x7cb97d,null))[_0x8db2('0x17')](function(_0x19e25b){if(_0x19e25b){return _0x19e25b[_0x8db2('0x72')](_0x2d7abf['body'][_0x8db2('0x55')],_[_0x8db2('0x73')](_0x2d7abf[_0x8db2('0x3b')],[_0x8db2('0x55'),'id'])||{})[_0x8db2('0x74')](function(_0x345ff9){for(var _0x16d1c5=0x0;_0x16d1c5<_0x2d7abf[_0x8db2('0x3b')][_0x8db2('0x55')][_0x8db2('0x2e')];_0x16d1c5+=0x1){socket['emit'](_0x8db2('0x5f'),{'UserId':Number(_0x2d7abf[_0x8db2('0x3b')][_0x8db2('0x55')][_0x16d1c5]),'SmsQueueId':Number(_0x2d7abf[_0x8db2('0x3c')]['id'])});}return _0x345ff9;});}})['then'](respondWithResult(_0x7cb97d,null))[_0x8db2('0x3a')](handleError(_0x7cb97d,null));};exports[_0x8db2('0x70')]=function(_0x46476e,_0x4f653e){return db['SmsQueue'][_0x8db2('0x32')]({'where':{'id':_0x46476e[_0x8db2('0x3c')]['id']}})[_0x8db2('0x17')](handleEntityNotFound(_0x4f653e,null))[_0x8db2('0x17')](function(_0x4f9ce4){if(_0x4f9ce4){return _0x4f9ce4[_0x8db2('0x70')](_0x46476e[_0x8db2('0x28')][_0x8db2('0x55')])[_0x8db2('0x17')](function(){if(_['isArray'](_0x46476e[_0x8db2('0x28')][_0x8db2('0x55')])){for(var _0x3e7b24=0x0;_0x3e7b24<_0x46476e['query']['ids']['length'];_0x3e7b24+=0x1){socket[_0x8db2('0x5e')](_0x8db2('0x75'),{'UserId':Number(_0x46476e[_0x8db2('0x28')][_0x8db2('0x55')][_0x3e7b24]),'SmsQueueId':Number(_0x46476e['params']['id'])});}}else{socket['emit'](_0x8db2('0x75'),{'UserId':Number(_0x46476e[_0x8db2('0x28')][_0x8db2('0x55')]),'SmsQueueId':Number(_0x46476e[_0x8db2('0x3c')]['id'])});}});}})[_0x8db2('0x17')](respondWithStatusCode(_0x4f653e,null))[_0x8db2('0x3a')](handleError(_0x4f653e,null));};exports['getAgents']=function(_0x2942eb,_0x5f32ce){var _0x432780={};var _0x23457b={};var _0x1ef898;var _0x39f2d3;return db[_0x8db2('0x1f')]['findOne']({'where':{'id':_0x2942eb[_0x8db2('0x3c')]['id']}})[_0x8db2('0x17')](handleEntityNotFound(_0x5f32ce,null))['then'](function(_0x28beec){if(_0x28beec){_0x1ef898=_0x28beec;_0x23457b[_0x8db2('0x2b')]=_[_0x8db2('0x27')](db[_0x8db2('0x49')]['rawAttributes']);_0x23457b[_0x8db2('0x28')]=_['keys'](_0x2942eb['query']);_0x23457b[_0x8db2('0x29')]=_[_0x8db2('0x2a')](_0x23457b[_0x8db2('0x2b')],_0x23457b[_0x8db2('0x28')]);_0x432780[_0x8db2('0x2c')]=_[_0x8db2('0x2a')](_0x23457b[_0x8db2('0x2b')],qs['fields'](_0x2942eb[_0x8db2('0x28')]['fields']));_0x432780['attributes']=_0x432780[_0x8db2('0x2c')]['length']?_0x432780['attributes']:_0x23457b[_0x8db2('0x2b')];_0x432780[_0x8db2('0x44')]=qs[_0x8db2('0x45')](_0x2942eb['query'][_0x8db2('0x45')]);_0x432780[_0x8db2('0x23')]=qs[_0x8db2('0x29')](_['pick'](_0x2942eb[_0x8db2('0x28')],_0x23457b[_0x8db2('0x29')]));if(_0x2942eb[_0x8db2('0x28')][_0x8db2('0x47')]){_0x432780[_0x8db2('0x23')]=_[_0x8db2('0x30')](_0x432780[_0x8db2('0x23')],{'$or':_[_0x8db2('0x1e')](_0x432780['attributes'],function(_0xa7b208){var _0x3cb456={};_0x3cb456[_0xa7b208]={'$like':'%'+_0x2942eb[_0x8db2('0x28')][_0x8db2('0x47')]+'%'};return _0x3cb456;})});}_0x432780=_[_0x8db2('0x30')]({},_0x432780,_0x2942eb[_0x8db2('0x31')]);return _0x1ef898[_0x8db2('0x76')](_0x432780);}})[_0x8db2('0x17')](function(_0x3a53e2){if(_0x3a53e2){_0x39f2d3=_0x3a53e2[_0x8db2('0x2e')];if(!_0x2942eb[_0x8db2('0x28')]['hasOwnProperty'](_0x8db2('0x43'))){_0x432780[_0x8db2('0x14')]=qs[_0x8db2('0x14')](_0x2942eb['query'][_0x8db2('0x14')]);_0x432780[_0x8db2('0x11')]=qs[_0x8db2('0x11')](_0x2942eb['query']['offset']);}return _0x1ef898[_0x8db2('0x76')](_0x432780);}})[_0x8db2('0x17')](function(_0x296966){if(_0x296966){return _0x296966?{'count':_0x39f2d3,'rows':_0x296966}:null;}})[_0x8db2('0x17')](respondWithResult(_0x5f32ce,null))[_0x8db2('0x3a')](handleError(_0x5f32ce,null));};
\ No newline at end of file
+var _0xadb5=['%s/%s','pick','filter','getTeams','addTeams','ids','findAll','online','voicePause','interface','flatMap','Agents','sequelize','transaction','each','forEach','userSmsQueue:save','removeTeams','Team','field','tq.TeamId','from','team_has_sms_queues','join','ut.TeamId\x20=\x20tq.TeamId','SmsQueueId\x20=\x20?','ut.UserId\x20=\x20?','push','toString','QueryTypes','SELECT','every','TeamId','all','union','compact','value','find','isEmpty','removeAgents','emit','userSmsQueue:remove','addAgents','omit','spread','isArray','getAgents','util','squel','ioredis','../../components/parsers/qs','api','../../config/environment','../../mysqldb','defaults','redis','localhost','socket.io-emitter','./smsQueue.socket','register','sendStatus','status','end','json','offset','limit','undefined','set','Content-Range','update','then','destroy','SmsQueues','UserProfileResource','error','stack','name','send','index','SmsQueue','rawAttributes','type','key','getOptions','where','count','include','query','rows','catch','show','model','keys','filters','fields','attributes','length','includeAll','options','create','user','get','role','autoAssociation','body','params','describe','getMembers','findOne','intersection','hasOwnProperty','nolimit','order','sort','SmsQueueId','merge','UserSmsQueue','User','findAndCountAll','map','UserId','agent','smsPause','updatedAt','createdAt','format'];(function(_0x5ed54b,_0x3a2827){var _0x4b58c7=function(_0x19d3b6){while(--_0x19d3b6){_0x5ed54b['push'](_0x5ed54b['shift']());}};_0x4b58c7(++_0x3a2827);}(_0xadb5,0xad));var _0x5adb=function(_0x1809d6,_0x5b926e){_0x1809d6=_0x1809d6-0x0;var _0x56835a=_0xadb5[_0x1809d6];return _0x56835a;};'use strict';var BPromise=require('bluebird');var util=require(_0x5adb('0x0'));var _=require('lodash');var squel=require(_0x5adb('0x1'));var Redis=require(_0x5adb('0x2'));var qs=require(_0x5adb('0x3'));var logger=require('../../config/logger')(_0x5adb('0x4'));var config=require(_0x5adb('0x5'));var db=require(_0x5adb('0x6'))['db'];config['redis']=_[_0x5adb('0x7')](config[_0x5adb('0x8')],{'host':_0x5adb('0x9'),'port':0x18eb});var socket=require(_0x5adb('0xa'))(new Redis(config[_0x5adb('0x8')]));require(_0x5adb('0xb'))[_0x5adb('0xc')](socket);function respondWithStatusCode(_0x6d1b45,_0x41261c){_0x41261c=_0x41261c||0xcc;return function(_0x7293ab){if(_0x7293ab){return _0x6d1b45[_0x5adb('0xd')](_0x41261c);}return _0x6d1b45[_0x5adb('0xe')](_0x41261c)[_0x5adb('0xf')]();};}function respondWithResult(_0x275428,_0x563d86){_0x563d86=_0x563d86||0xc8;return function(_0x4c268d){if(_0x4c268d){return _0x275428[_0x5adb('0xe')](_0x563d86)[_0x5adb('0x10')](_0x4c268d);}};}function respondWithFilteredResult(_0x82e67e,_0x53b772){return function(_0x29f0d5){if(_0x29f0d5){var _0x56012f=typeof _0x53b772[_0x5adb('0x11')]==='undefined'&&typeof _0x53b772[_0x5adb('0x12')]===_0x5adb('0x13');var _0x44abe3=_0x29f0d5['count'];var _0x2a545b=_0x56012f?0x0:_0x53b772[_0x5adb('0x11')];var _0xf82f72=_0x56012f?_0x29f0d5['count']:_0x53b772[_0x5adb('0x11')]+_0x53b772['limit'];var _0x367d82;if(_0xf82f72>=_0x44abe3){_0xf82f72=_0x44abe3;_0x367d82=0xc8;}else{_0x367d82=0xce;}_0x82e67e[_0x5adb('0xe')](_0x367d82);return _0x82e67e[_0x5adb('0x14')](_0x5adb('0x15'),_0x2a545b+'-'+_0xf82f72+'/'+_0x44abe3)[_0x5adb('0x10')](_0x29f0d5);}return null;};}function saveUpdates(_0x39d24d){return function(_0xa29dc){if(_0xa29dc){return _0xa29dc[_0x5adb('0x16')](_0x39d24d)[_0x5adb('0x17')](function(_0x529b65){return _0x529b65;});}return null;};}function removeEntity(_0x3fff62){return function(_0x5de028){if(_0x5de028){return _0x5de028[_0x5adb('0x18')]()['then'](function(){var _0x3ef465=_0x5de028['get']({'plain':!![]});var _0x5e218c=_0x5adb('0x19');return db[_0x5adb('0x1a')][_0x5adb('0x18')]({'where':{'type':_0x5e218c,'resourceId':_0x3ef465['id']}})[_0x5adb('0x17')](function(){return _0x5de028;});})[_0x5adb('0x17')](function(){_0x3fff62['status'](0xcc)[_0x5adb('0xf')]();});}};}function handleEntityNotFound(_0x5c296e){return function(_0x4e9f16){if(!_0x4e9f16){_0x5c296e[_0x5adb('0xd')](0x194);}return _0x4e9f16;};}function handleError(_0x379b33,_0x1a38d3){_0x1a38d3=_0x1a38d3||0x1f4;return function(_0x1a8014){logger[_0x5adb('0x1b')](_0x1a8014[_0x5adb('0x1c')]);if(_0x1a8014[_0x5adb('0x1d')]){delete _0x1a8014['name'];}_0x379b33[_0x5adb('0xe')](_0x1a38d3)[_0x5adb('0x1e')](_0x1a8014);};}exports[_0x5adb('0x1f')]=function(_0x3839fb,_0xeb556c){var _0x49f203={};var _0x2fee18={'count':0x0,'rows':[]};var _0x2e1e63=_['map'](db[_0x5adb('0x20')][_0x5adb('0x21')],function(_0x1a0acd){return{'name':_0x1a0acd['fieldName'],'type':_0x1a0acd[_0x5adb('0x22')][_0x5adb('0x23')]};});_0x49f203=qs[_0x5adb('0x24')](_0x2e1e63,_0x3839fb);var _0x2c64a3={'where':_0x49f203[_0x5adb('0x25')]};return db[_0x5adb('0x20')]['count'](_0x2c64a3)['then'](function(_0x5d457e){_0x2fee18[_0x5adb('0x26')]=_0x5d457e;_0x49f203[_0x5adb('0x27')]=qs[_0x5adb('0x27')](_0x3839fb[_0x5adb('0x28')]);return db[_0x5adb('0x20')]['findAll'](_0x49f203);})[_0x5adb('0x17')](function(_0x34b793){_0x2fee18[_0x5adb('0x29')]=_0x34b793;return _0x2fee18;})[_0x5adb('0x17')](respondWithFilteredResult(_0xeb556c,_0x49f203))[_0x5adb('0x2a')](handleError(_0xeb556c,null));};exports[_0x5adb('0x2b')]=function(_0x28190d,_0x28bf1f){var _0x138bf6={'raw':!![],'where':{'id':_0x28190d['params']['id']}},_0x260295={};_0x260295[_0x5adb('0x2c')]=_['keys'](db[_0x5adb('0x20')][_0x5adb('0x21')]);_0x260295['query']=_[_0x5adb('0x2d')](_0x28190d[_0x5adb('0x28')]);_0x260295[_0x5adb('0x2e')]=_['intersection'](_0x260295[_0x5adb('0x2c')],_0x260295[_0x5adb('0x28')]);_0x138bf6['attributes']=_['intersection'](_0x260295[_0x5adb('0x2c')],qs['fields'](_0x28190d[_0x5adb('0x28')][_0x5adb('0x2f')]));_0x138bf6[_0x5adb('0x30')]=_0x138bf6[_0x5adb('0x30')][_0x5adb('0x31')]?_0x138bf6['attributes']:_0x260295[_0x5adb('0x2c')];if(_0x28190d[_0x5adb('0x28')][_0x5adb('0x32')]){_0x138bf6['include']=[{'all':!![]}];}_0x138bf6=_['merge']({},_0x138bf6,_0x28190d[_0x5adb('0x33')]);return db[_0x5adb('0x20')]['find'](_0x138bf6)[_0x5adb('0x17')](handleEntityNotFound(_0x28bf1f,null))['then'](respondWithResult(_0x28bf1f,null))[_0x5adb('0x2a')](handleError(_0x28bf1f,null));};exports['create']=function(_0x11cb37,_0x4d052f){return db[_0x5adb('0x20')][_0x5adb('0x34')](_0x11cb37['body'],{})[_0x5adb('0x17')](function(_0x5a6a79){var _0xadbe37=_0x11cb37[_0x5adb('0x35')][_0x5adb('0x36')]({'plain':!![]});if(!_0xadbe37)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xadbe37[_0x5adb('0x37')]===_0x5adb('0x35')){var _0xcdaf8e=_0x5a6a79[_0x5adb('0x36')]({'plain':!![]});var _0x22aa95='SmsQueues';return db['UserProfileSection']['find']({'where':{'name':_0x22aa95,'userProfileId':_0xadbe37['userProfileId']},'raw':!![]})[_0x5adb('0x17')](function(_0x2fbe14){if(_0x2fbe14&&_0x2fbe14[_0x5adb('0x38')]===0x0){return db[_0x5adb('0x1a')][_0x5adb('0x34')]({'name':_0xcdaf8e[_0x5adb('0x1d')],'resourceId':_0xcdaf8e['id'],'type':_0x2fbe14[_0x5adb('0x1d')],'sectionId':_0x2fbe14['id']},{})[_0x5adb('0x17')](function(){return _0x5a6a79;});}else{return _0x5a6a79;}})['catch'](function(_0x53f2c6){logger[_0x5adb('0x1b')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x53f2c6);throw _0x53f2c6;});}return _0x5a6a79;})[_0x5adb('0x17')](respondWithResult(_0x4d052f,0xc9))[_0x5adb('0x2a')](handleError(_0x4d052f,null));};exports[_0x5adb('0x16')]=function(_0x121714,_0xdfecfd){if(_0x121714['body']['id']){delete _0x121714[_0x5adb('0x39')]['id'];}return db[_0x5adb('0x20')]['find']({'where':{'id':_0x121714[_0x5adb('0x3a')]['id']}})[_0x5adb('0x17')](handleEntityNotFound(_0xdfecfd,null))['then'](saveUpdates(_0x121714[_0x5adb('0x39')],null))[_0x5adb('0x17')](respondWithResult(_0xdfecfd,null))[_0x5adb('0x2a')](handleError(_0xdfecfd,null));};exports[_0x5adb('0x18')]=function(_0xea3307,_0x4362ec){return db[_0x5adb('0x20')]['find']({'where':{'id':_0xea3307['params']['id']}})[_0x5adb('0x17')](handleEntityNotFound(_0x4362ec,null))[_0x5adb('0x17')](removeEntity(_0x4362ec,null))[_0x5adb('0x2a')](handleError(_0x4362ec,null));};exports[_0x5adb('0x3b')]=function(_0x57b8af,_0x507e48){return db[_0x5adb('0x20')][_0x5adb('0x3b')]()[_0x5adb('0x17')](respondWithResult(_0x507e48,null))[_0x5adb('0x2a')](handleError(_0x507e48,null));};exports[_0x5adb('0x3c')]=function(_0x5358c0,_0x182cbc){var _0x437f52={'raw':!![],'where':{}},_0x5b574c={},_0x7786c4;return db[_0x5adb('0x20')][_0x5adb('0x3d')]({'where':{'id':_0x5358c0[_0x5adb('0x3a')]['id']}})[_0x5adb('0x17')](handleEntityNotFound(_0x182cbc,null))[_0x5adb('0x17')](function(_0x39840e){if(_0x39840e){_0x7786c4=_0x39840e[_0x5adb('0x36')]({'plain':!![]});_0x5b574c['model']=_[_0x5adb('0x2d')](db['UserSmsQueue']['rawAttributes']);_0x5b574c['query']=_[_0x5adb('0x2d')](_0x5358c0[_0x5adb('0x28')]);_0x5b574c[_0x5adb('0x2e')]=_['intersection'](_0x5b574c[_0x5adb('0x2c')],_0x5b574c['query']);_0x437f52[_0x5adb('0x30')]=_[_0x5adb('0x3e')](_0x5b574c[_0x5adb('0x2c')],qs['fields'](_0x5358c0[_0x5adb('0x28')]['fields']));_0x437f52[_0x5adb('0x30')]=_0x437f52[_0x5adb('0x30')]['length']?_0x437f52[_0x5adb('0x30')]:_0x5b574c[_0x5adb('0x2c')];if(!_0x5358c0[_0x5adb('0x28')][_0x5adb('0x3f')](_0x5adb('0x40'))){_0x437f52['limit']=qs[_0x5adb('0x12')](_0x5358c0[_0x5adb('0x28')][_0x5adb('0x12')]);_0x437f52[_0x5adb('0x11')]=qs['offset'](_0x5358c0[_0x5adb('0x28')][_0x5adb('0x11')]);}_0x437f52[_0x5adb('0x41')]=qs['sort'](_0x5358c0[_0x5adb('0x28')][_0x5adb('0x42')]);_0x437f52[_0x5adb('0x25')]=qs[_0x5adb('0x2e')](_['pick'](_0x5358c0[_0x5adb('0x28')],_0x5b574c[_0x5adb('0x2e')]));_0x437f52[_0x5adb('0x25')][_0x5adb('0x43')]=_0x39840e['id'];if(_0x5358c0[_0x5adb('0x28')]['filter']){_0x437f52[_0x5adb('0x25')]=_['merge'](_0x437f52[_0x5adb('0x25')],{'$or':_['map'](_0x437f52[_0x5adb('0x30')],function(_0x35df22){var _0x1a9358={};_0x1a9358[_0x35df22]={'$like':'%'+_0x5358c0[_0x5adb('0x28')]['filter']+'%'};return _0x1a9358;})});}_0x437f52=_[_0x5adb('0x44')]({},_0x437f52,_0x5358c0[_0x5adb('0x33')]);return db[_0x5adb('0x45')]['findAll'](_0x437f52);}})['then'](function(_0x4ddfdf){if(_0x4ddfdf){return db[_0x5adb('0x46')][_0x5adb('0x47')]({'where':{'id':_[_0x5adb('0x48')](_0x4ddfdf,_0x5adb('0x49')),'role':_0x5adb('0x4a')},'attributes':['id',_0x5adb('0x1d'),_0x5adb('0x4b'),_0x5adb('0x4c'),_0x5adb('0x4d')]});}})[_0x5adb('0x17')](function(_0x452767){if(_0x452767){return{'count':_0x452767[_0x5adb('0x26')],'rows':_[_0x5adb('0x48')](_0x452767['rows'],function(_0x49f4c8){return{'membername':_0x49f4c8[_0x5adb('0x1d')],'UserId':_0x49f4c8['id'],'queue_name':_0x7786c4[_0x5adb('0x1d')],'SmsQueueId':_0x7786c4['id'],'interface':util[_0x5adb('0x4e')](_0x5adb('0x4f'),'SIP',_0x49f4c8[_0x5adb('0x1d')]),'penalty':0x0,'paused':_0x49f4c8[_0x5adb('0x4b')],'createdAt':_0x49f4c8['createdAt'],'updatedAt':_0x49f4c8[_0x5adb('0x4c')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x5adb('0x17')](respondWithFilteredResult(_0x182cbc,_0x437f52))[_0x5adb('0x2a')](handleError(_0x182cbc,null));};exports['getTeams']=function(_0x30d185,_0x409357){var _0x19df2f={};var _0x30c92c={};var _0x330290;var _0x428019;return db['SmsQueue'][_0x5adb('0x3d')]({'where':{'id':_0x30d185[_0x5adb('0x3a')]['id']}})[_0x5adb('0x17')](handleEntityNotFound(_0x409357,null))['then'](function(_0xcd71d2){if(_0xcd71d2){_0x330290=_0xcd71d2;_0x30c92c[_0x5adb('0x2c')]=_[_0x5adb('0x2d')](db['Team'][_0x5adb('0x21')]);_0x30c92c['query']=_[_0x5adb('0x2d')](_0x30d185[_0x5adb('0x28')]);_0x30c92c[_0x5adb('0x2e')]=_['intersection'](_0x30c92c[_0x5adb('0x2c')],_0x30c92c[_0x5adb('0x28')]);_0x19df2f['attributes']=_[_0x5adb('0x3e')](_0x30c92c[_0x5adb('0x2c')],qs[_0x5adb('0x2f')](_0x30d185[_0x5adb('0x28')]['fields']));_0x19df2f[_0x5adb('0x30')]=_0x19df2f[_0x5adb('0x30')][_0x5adb('0x31')]?_0x19df2f[_0x5adb('0x30')]:_0x30c92c['model'];_0x19df2f['order']=qs[_0x5adb('0x42')](_0x30d185['query']['sort']);_0x19df2f['where']=qs[_0x5adb('0x2e')](_[_0x5adb('0x50')](_0x30d185['query'],_0x30c92c[_0x5adb('0x2e')]));if(_0x30d185[_0x5adb('0x28')][_0x5adb('0x51')]){_0x19df2f[_0x5adb('0x25')]=_[_0x5adb('0x44')](_0x19df2f[_0x5adb('0x25')],{'$or':_[_0x5adb('0x48')](_0x19df2f[_0x5adb('0x30')],function(_0x5240c1){var _0x4b9e80={};_0x4b9e80[_0x5240c1]={'$like':'%'+_0x30d185['query'][_0x5adb('0x51')]+'%'};return _0x4b9e80;})});}_0x19df2f=_[_0x5adb('0x44')]({},_0x19df2f,_0x30d185[_0x5adb('0x33')]);return _0x330290[_0x5adb('0x52')](_0x19df2f);}})[_0x5adb('0x17')](function(_0x2f6ef7){if(_0x2f6ef7){_0x428019=_0x2f6ef7[_0x5adb('0x31')];if(!_0x30d185[_0x5adb('0x28')]['hasOwnProperty']('nolimit')){_0x19df2f[_0x5adb('0x12')]=qs[_0x5adb('0x12')](_0x30d185[_0x5adb('0x28')][_0x5adb('0x12')]);_0x19df2f[_0x5adb('0x11')]=qs[_0x5adb('0x11')](_0x30d185[_0x5adb('0x28')][_0x5adb('0x11')]);}return _0x330290[_0x5adb('0x52')](_0x19df2f);}})[_0x5adb('0x17')](function(_0x484f3d){if(_0x484f3d){return _0x484f3d?{'count':_0x428019,'rows':_0x484f3d}:null;}})[_0x5adb('0x17')](respondWithResult(_0x409357,null))[_0x5adb('0x2a')](handleError(_0x409357,null));};exports[_0x5adb('0x53')]=function(_0x5d3aa4,_0x31f041){var _0xa1bd33=_0x5d3aa4['body'][_0x5adb('0x54')];return db['Team'][_0x5adb('0x55')]({'where':{'id':_0xa1bd33},'attributes':['id'],'include':[{'model':db[_0x5adb('0x46')],'as':'Agents','attributes':['id',_0x5adb('0x1d'),_0x5adb('0x56'),_0x5adb('0x57'),_0x5adb('0x58')],'raw':!![]}]})[_0x5adb('0x17')](function(_0x10f54a){if(_0x10f54a){var _0x3cee6c=_[_0x5adb('0x59')](_0x10f54a,function(_0x49a8a6){var _0x3786b4=_0x49a8a6[_0x5adb('0x36')]({'plain':!![]});return _0x3786b4[_0x5adb('0x5a')];});return db['SmsQueue']['find']({'where':{'id':_0x5d3aa4[_0x5adb('0x3a')]['id']}})['then'](function(_0x27d3d8){return db[_0x5adb('0x5b')][_0x5adb('0x5c')](function(_0x50600f){return _0x27d3d8[_0x5adb('0x53')](_0xa1bd33,{'transaction':_0x50600f})[_0x5adb('0x17')](function(){return BPromise[_0x5adb('0x5d')](_0x3cee6c,function(_0x3ecc56){return db[_0x5adb('0x45')]['findOrCreate']({'where':{'UserId':_0x3ecc56['id'],'SmsQueueId':_0x5d3aa4[_0x5adb('0x3a')]['id']},'transaction':_0x50600f});});})[_0x5adb('0x17')](function(){_0x3cee6c[_0x5adb('0x5e')](function(_0xe3d12d){socket['emit'](_0x5adb('0x5f'),{'UserId':_0xe3d12d['id'],'SmsQueueId':_0x27d3d8['id']});});});});});}})[_0x5adb('0x17')](respondWithStatusCode(_0x31f041,null))[_0x5adb('0x2a')](handleError(_0x31f041,null));};exports[_0x5adb('0x60')]=function(_0x15d4f1,_0x20faf6){return db[_0x5adb('0x61')]['findAll']({'where':{'id':_0x15d4f1[_0x5adb('0x28')][_0x5adb('0x54')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0x5adb('0x5a'),'attributes':['id'],'raw':!![]}]})[_0x5adb('0x17')](handleEntityNotFound(_0x20faf6,null))['then'](function(_0x462fa0){var _0x50f8ed=_[_0x5adb('0x48')](_0x462fa0,'id');var _0x268df2=[];var _0x4a2ebc=[];var _0x167432=squel['select']();_0x167432[_0x5adb('0x62')](_0x5adb('0x63'))[_0x5adb('0x64')](_0x5adb('0x65'),'tq')[_0x5adb('0x66')]('user_has_teams','ut',_0x5adb('0x67'))[_0x5adb('0x25')](_0x5adb('0x68'),_0x15d4f1[_0x5adb('0x3a')]['id']);for(var _0x47c631=0x0;_0x47c631<_0x462fa0['length'];_0x47c631+=0x1){let _0x3f3db9=_0x462fa0[_0x47c631];for(var _0x461a07=0x0;_0x461a07<_0x3f3db9[_0x5adb('0x5a')][_0x5adb('0x31')];_0x461a07+=0x1){let _0x277668=_0x3f3db9[_0x5adb('0x5a')][_0x461a07];var _0x31f5b2=_0x167432['clone']();_0x31f5b2[_0x5adb('0x25')](_0x5adb('0x69'),_0x277668['id']);_0x4a2ebc[_0x5adb('0x6a')](db[_0x5adb('0x5b')]['query'](_0x31f5b2[_0x5adb('0x6b')](),{'type':db[_0x5adb('0x5b')][_0x5adb('0x6c')][_0x5adb('0x6d')]})[_0x5adb('0x17')](function(_0x188cbd){if(_0x188cbd[_0x5adb('0x31')]===0x1){return _0x277668['id'];}else{var _0x2d1b65=_[_0x5adb('0x6e')](_['map'](_0x188cbd,_0x5adb('0x6f')),function(_0x456799){return _['includes'](_0x50f8ed,_0x456799);});if(_0x2d1b65){return _0x277668['id'];}}}));}}return BPromise[_0x5adb('0x70')](_0x4a2ebc)[_0x5adb('0x17')](function(_0x2b8915){_0x268df2=_(_0x268df2)[_0x5adb('0x71')](_0x2b8915)[_0x5adb('0x72')]()[_0x5adb('0x73')]();return db[_0x5adb('0x20')][_0x5adb('0x74')]({'where':{'id':_0x15d4f1['params']['id']}})[_0x5adb('0x17')](function(_0x2386c0){return db['sequelize'][_0x5adb('0x5c')](function(_0x58a26f){return _0x2386c0[_0x5adb('0x60')](_0x15d4f1['query']['ids'],{'transaction':_0x58a26f})[_0x5adb('0x17')](function(){if(!_[_0x5adb('0x75')](_0x268df2)){return _0x2386c0[_0x5adb('0x76')](_0x268df2,{'transaction':_0x58a26f});}})['then'](function(){_0x268df2[_0x5adb('0x5e')](function(_0x321c3a){socket[_0x5adb('0x77')](_0x5adb('0x78'),{'UserId':_0x321c3a,'SmsQueueId':_0x2386c0['id']});});});});});});})[_0x5adb('0x17')](respondWithStatusCode(_0x20faf6,null))[_0x5adb('0x2a')](handleError(_0x20faf6,null));};exports[_0x5adb('0x79')]=function(_0x463e84,_0x28bd33){return db[_0x5adb('0x20')][_0x5adb('0x74')]({'where':{'id':_0x463e84[_0x5adb('0x3a')]['id']}})['then'](handleEntityNotFound(_0x28bd33,null))['then'](function(_0x312463){if(_0x312463){return _0x312463[_0x5adb('0x79')](_0x463e84['body'][_0x5adb('0x54')],_[_0x5adb('0x7a')](_0x463e84[_0x5adb('0x39')],[_0x5adb('0x54'),'id'])||{})[_0x5adb('0x7b')](function(_0x24cd3b){for(var _0x15626b=0x0;_0x15626b<_0x463e84[_0x5adb('0x39')][_0x5adb('0x54')]['length'];_0x15626b+=0x1){socket[_0x5adb('0x77')](_0x5adb('0x5f'),{'UserId':Number(_0x463e84[_0x5adb('0x39')]['ids'][_0x15626b]),'SmsQueueId':Number(_0x463e84[_0x5adb('0x3a')]['id'])});}return _0x24cd3b;});}})[_0x5adb('0x17')](respondWithResult(_0x28bd33,null))[_0x5adb('0x2a')](handleError(_0x28bd33,null));};exports[_0x5adb('0x76')]=function(_0x64475f,_0x2a78f9){return db['SmsQueue'][_0x5adb('0x74')]({'where':{'id':_0x64475f[_0x5adb('0x3a')]['id']}})[_0x5adb('0x17')](handleEntityNotFound(_0x2a78f9,null))[_0x5adb('0x17')](function(_0x2c3af8){if(_0x2c3af8){return _0x2c3af8[_0x5adb('0x76')](_0x64475f[_0x5adb('0x28')][_0x5adb('0x54')])[_0x5adb('0x17')](function(){if(_[_0x5adb('0x7c')](_0x64475f['query'][_0x5adb('0x54')])){for(var _0x5b9565=0x0;_0x5b9565<_0x64475f[_0x5adb('0x28')][_0x5adb('0x54')][_0x5adb('0x31')];_0x5b9565+=0x1){socket[_0x5adb('0x77')](_0x5adb('0x78'),{'UserId':Number(_0x64475f['query']['ids'][_0x5b9565]),'SmsQueueId':Number(_0x64475f[_0x5adb('0x3a')]['id'])});}}else{socket[_0x5adb('0x77')](_0x5adb('0x78'),{'UserId':Number(_0x64475f[_0x5adb('0x28')][_0x5adb('0x54')]),'SmsQueueId':Number(_0x64475f[_0x5adb('0x3a')]['id'])});}});}})['then'](respondWithStatusCode(_0x2a78f9,null))['catch'](handleError(_0x2a78f9,null));};exports[_0x5adb('0x7d')]=function(_0xd5b95d,_0x9d80fd){var _0x4f5721={};var _0x542626={};var _0x227c17;var _0x5982a5;return db[_0x5adb('0x20')][_0x5adb('0x3d')]({'where':{'id':_0xd5b95d['params']['id']}})['then'](handleEntityNotFound(_0x9d80fd,null))[_0x5adb('0x17')](function(_0x4bb198){if(_0x4bb198){_0x227c17=_0x4bb198;_0x542626['model']=_[_0x5adb('0x2d')](db[_0x5adb('0x46')][_0x5adb('0x21')]);_0x542626[_0x5adb('0x28')]=_[_0x5adb('0x2d')](_0xd5b95d[_0x5adb('0x28')]);_0x542626[_0x5adb('0x2e')]=_[_0x5adb('0x3e')](_0x542626[_0x5adb('0x2c')],_0x542626[_0x5adb('0x28')]);_0x4f5721[_0x5adb('0x30')]=_[_0x5adb('0x3e')](_0x542626[_0x5adb('0x2c')],qs['fields'](_0xd5b95d[_0x5adb('0x28')]['fields']));_0x4f5721[_0x5adb('0x30')]=_0x4f5721[_0x5adb('0x30')][_0x5adb('0x31')]?_0x4f5721[_0x5adb('0x30')]:_0x542626[_0x5adb('0x2c')];_0x4f5721[_0x5adb('0x41')]=qs[_0x5adb('0x42')](_0xd5b95d[_0x5adb('0x28')][_0x5adb('0x42')]);_0x4f5721[_0x5adb('0x25')]=qs[_0x5adb('0x2e')](_[_0x5adb('0x50')](_0xd5b95d['query'],_0x542626[_0x5adb('0x2e')]));if(_0xd5b95d[_0x5adb('0x28')][_0x5adb('0x51')]){_0x4f5721[_0x5adb('0x25')]=_[_0x5adb('0x44')](_0x4f5721[_0x5adb('0x25')],{'$or':_[_0x5adb('0x48')](_0x4f5721[_0x5adb('0x30')],function(_0x57c160){var _0xe7ddc4={};_0xe7ddc4[_0x57c160]={'$like':'%'+_0xd5b95d[_0x5adb('0x28')][_0x5adb('0x51')]+'%'};return _0xe7ddc4;})});}_0x4f5721=_['merge']({},_0x4f5721,_0xd5b95d[_0x5adb('0x33')]);return _0x227c17['getAgents'](_0x4f5721);}})[_0x5adb('0x17')](function(_0x50c3a3){if(_0x50c3a3){_0x5982a5=_0x50c3a3['length'];if(!_0xd5b95d[_0x5adb('0x28')][_0x5adb('0x3f')](_0x5adb('0x40'))){_0x4f5721[_0x5adb('0x12')]=qs[_0x5adb('0x12')](_0xd5b95d[_0x5adb('0x28')][_0x5adb('0x12')]);_0x4f5721[_0x5adb('0x11')]=qs[_0x5adb('0x11')](_0xd5b95d[_0x5adb('0x28')][_0x5adb('0x11')]);}return _0x227c17[_0x5adb('0x7d')](_0x4f5721);}})['then'](function(_0x364da7){if(_0x364da7){return _0x364da7?{'count':_0x5982a5,'rows':_0x364da7}:null;}})['then'](respondWithResult(_0x9d80fd,null))[_0x5adb('0x2a')](handleError(_0x9d80fd,null));};
\ No newline at end of file
index bef477e..bc24c2a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5f0d=['setMaxListeners','save','update','remove','emit','hasOwnProperty','hook','events','../../mysqldb','SmsQueue'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x5f0d,0x1dd));var _0xd5f0=function(_0x14bfd6,_0x4da565){_0x14bfd6=_0x14bfd6-0x0;var _0x41e9f1=_0x5f0d[_0x14bfd6];return _0x41e9f1;};'use strict';var EventEmitter=require(_0xd5f0('0x0'));var SmsQueue=require(_0xd5f0('0x1'))['db'][_0xd5f0('0x2')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0xd5f0('0x3')](0x0);var events={'afterCreate':_0xd5f0('0x4'),'afterUpdate':_0xd5f0('0x5'),'afterDestroy':_0xd5f0('0x6')};function emitEvent(_0x5e3e2b){return function(_0x359961,_0x2a5f5d,_0x1049af){SmsQueueEvents[_0xd5f0('0x7')](_0x5e3e2b+':'+_0x359961['id'],_0x359961);SmsQueueEvents['emit'](_0x5e3e2b,_0x359961);_0x1049af(null);};}for(var e in events){if(events[_0xd5f0('0x8')](e)){var event=events[e];SmsQueue[_0xd5f0('0x9')](e,emitEvent(event));}}module['exports']=SmsQueueEvents;
\ No newline at end of file
+var _0xf88c=['../../mysqldb','SmsQueue','setMaxListeners','save','update','emit','hasOwnProperty','hook','events'];(function(_0x185809,_0x34571d){var _0x1e87d6=function(_0x221b4a){while(--_0x221b4a){_0x185809['push'](_0x185809['shift']());}};_0x1e87d6(++_0x34571d);}(_0xf88c,0xbc));var _0xcf88=function(_0x218a1b,_0x542459){_0x218a1b=_0x218a1b-0x0;var _0x584459=_0xf88c[_0x218a1b];return _0x584459;};'use strict';var EventEmitter=require(_0xcf88('0x0'));var SmsQueue=require(_0xcf88('0x1'))['db'][_0xcf88('0x2')];var SmsQueueEvents=new EventEmitter();SmsQueueEvents[_0xcf88('0x3')](0x0);var events={'afterCreate':_0xcf88('0x4'),'afterUpdate':_0xcf88('0x5'),'afterDestroy':'remove'};function emitEvent(_0x32c624){return function(_0x27a3ef,_0x78c3b,_0x413c39){SmsQueueEvents[_0xcf88('0x6')](_0x32c624+':'+_0x27a3ef['id'],_0x27a3ef);SmsQueueEvents['emit'](_0x32c624,_0x27a3ef);_0x413c39(null);};}for(var e in events){if(events[_0xcf88('0x7')](e)){var event=events[e];SmsQueue[_0xcf88('0x8')](e,emitEvent(event));}}module['exports']=SmsQueueEvents;
\ No newline at end of file
index 1e46e2b..4d80197 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2433=['exports','define','SmsQueue','util','request-promise','rimraf'];(function(_0x2517ff,_0x2c4951){var _0x10ae7=function(_0x2d8055){while(--_0x2d8055){_0x2517ff['push'](_0x2517ff['shift']());}};_0x10ae7(++_0x2c4951);}(_0x2433,0x111));var _0x3243=function(_0x42746b,_0x1fe242){_0x42746b=_0x42746b-0x0;var _0x545552=_0x2433[_0x42746b];return _0x545552;};'use strict';var _=require('lodash');var util=require(_0x3243('0x0'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x3243('0x1'));var fs=require('fs');var path=require('path');var rimraf=require(_0x3243('0x2'));var config=require('../../config/environment');var attributes=require('./smsQueue.attributes');module[_0x3243('0x3')]=function(_0x3fb7e0,_0x51dce3){return _0x3fb7e0[_0x3243('0x4')](_0x3243('0x5'),attributes,{'tableName':'sms_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xd128=['lodash','util','bluebird','rimraf','../../config/environment','./smsQueue.attributes','exports','define','SmsQueue'];(function(_0xfb977,_0x17e051){var _0x4561f3=function(_0x3da8c6){while(--_0x3da8c6){_0xfb977['push'](_0xfb977['shift']());}};_0x4561f3(++_0x17e051);}(_0xd128,0x132));var _0x8d12=function(_0xd80de1,_0x518a43){_0xd80de1=_0xd80de1-0x0;var _0x3c47a2=_0xd128[_0xd80de1];return _0x3c47a2;};'use strict';var _=require(_0x8d12('0x0'));var util=require(_0x8d12('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x8d12('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x8d12('0x3'));var config=require(_0x8d12('0x4'));var attributes=require(_0x8d12('0x5'));module[_0x8d12('0x6')]=function(_0xb7f9f0,_0x2bffaf){return _0xb7f9f0[_0x8d12('0x7')](_0x8d12('0x8'),attributes,{'tableName':'sms_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index efb44bc..717c1fc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7552=['findAll','options','raw','where','attributes','limit','include','map','model','GetSmsQueue','stringify','ShowSmsQueue','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','redis','defaults','localhost','socket.io-emitter','./smsQueue.socket','register','then','info','SmsQueue,\x20%s,\x20%s','request\x20sent','debug','SmsQueue,\x20%s,\x20%s,\x20%s','error','message','result','catch'];(function(_0x3c9b1d,_0x38899e){var _0x52c99d=function(_0x452e48){while(--_0x452e48){_0x3c9b1d['push'](_0x3c9b1d['shift']());}};_0x52c99d(++_0x38899e);}(_0x7552,0x16b));var _0x2755=function(_0x4bb82f,_0x54c16f){_0x4bb82f=_0x4bb82f-0x0;var _0x531444=_0x7552[_0x4bb82f];return _0x531444;};'use strict';var _=require(_0x2755('0x0'));var util=require(_0x2755('0x1'));var moment=require(_0x2755('0x2'));var BPromise=require(_0x2755('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2755('0x4'));var db=require(_0x2755('0x5'))['db'];var utils=require(_0x2755('0x6'));var logger=require(_0x2755('0x7'))(_0x2755('0x8'));var config=require(_0x2755('0x9'));var jayson=require(_0x2755('0xa'));var client=jayson['client']['http']({'port':0x232a});config[_0x2755('0xb')]=_[_0x2755('0xc')](config['redis'],{'host':_0x2755('0xd'),'port':0x18eb});var socket=require(_0x2755('0xe'))(new Redis(config[_0x2755('0xb')]));require(_0x2755('0xf'))[_0x2755('0x10')](socket);function respondWithRpcPromise(_0x354dce,_0x458500,_0x179a39){return new BPromise(function(_0x5bcf72,_0xbe652b){return client['request'](_0x354dce,_0x179a39)[_0x2755('0x11')](function(_0x1a552b){logger[_0x2755('0x12')](_0x2755('0x13'),_0x458500,_0x2755('0x14'));logger[_0x2755('0x15')](_0x2755('0x16'),_0x458500,'request\x20sent',JSON['stringify'](_0x1a552b));if(_0x1a552b[_0x2755('0x17')]){if(_0x1a552b[_0x2755('0x17')]['code']===0x1f4){logger[_0x2755('0x17')](_0x2755('0x13'),_0x458500,_0x1a552b['error'][_0x2755('0x18')]);return _0xbe652b(_0x1a552b[_0x2755('0x17')][_0x2755('0x18')]);}logger['error']('SmsQueue,\x20%s,\x20%s',_0x458500,_0x1a552b[_0x2755('0x17')]['message']);return _0x5bcf72(_0x1a552b[_0x2755('0x17')][_0x2755('0x18')]);}else{logger['info']('SmsQueue,\x20%s,\x20%s',_0x458500,_0x2755('0x14'));_0x5bcf72(_0x1a552b[_0x2755('0x19')][_0x2755('0x18')]);}})[_0x2755('0x1a')](function(_0x4d1377){logger[_0x2755('0x17')]('SmsQueue,\x20%s,\x20%s',_0x458500,_0x4d1377);_0xbe652b(_0x4d1377);});});}exports['GetSmsQueue']=function(_0x552fbc){var _0x48294e=this;return new Promise(function(_0x3349ac,_0x460e8c){return db['SmsQueue'][_0x2755('0x1b')]({'raw':_0x552fbc['options']?_0x552fbc[_0x2755('0x1c')][_0x2755('0x1d')]===undefined?!![]:![]:!![],'where':_0x552fbc[_0x2755('0x1c')]?_0x552fbc[_0x2755('0x1c')][_0x2755('0x1e')]||null:null,'attributes':_0x552fbc[_0x2755('0x1c')]?_0x552fbc[_0x2755('0x1c')][_0x2755('0x1f')]||null:null,'limit':_0x552fbc[_0x2755('0x1c')]?_0x552fbc['options'][_0x2755('0x20')]||null:null,'include':_0x552fbc['options']?_0x552fbc[_0x2755('0x1c')][_0x2755('0x21')]?_[_0x2755('0x22')](_0x552fbc[_0x2755('0x1c')]['include'],function(_0x1d29b5){return{'model':db[_0x1d29b5[_0x2755('0x23')]],'as':_0x1d29b5['as'],'attributes':_0x1d29b5[_0x2755('0x1f')],'include':_0x1d29b5[_0x2755('0x21')]?_[_0x2755('0x22')](_0x1d29b5['include'],function(_0x3f2730){return{'model':db[_0x3f2730[_0x2755('0x23')]],'as':_0x3f2730['as'],'attributes':_0x3f2730['attributes'],'include':_0x3f2730[_0x2755('0x21')]?_[_0x2755('0x22')](_0x3f2730[_0x2755('0x21')],function(_0x2fd260){return{'model':db[_0x2fd260['model']],'as':_0x2fd260['as'],'attributes':_0x2fd260[_0x2755('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x2755('0x11')](function(_0x56650f){logger['info'](_0x2755('0x24'),_0x552fbc);logger['debug'](_0x2755('0x24'),_0x552fbc,JSON[_0x2755('0x25')](_0x56650f));_0x3349ac(_0x56650f);})[_0x2755('0x1a')](function(_0x609fa1){logger[_0x2755('0x17')](_0x2755('0x24'),_0x609fa1['message'],_0x552fbc);_0x460e8c(_0x48294e['error'](0x1f4,_0x609fa1[_0x2755('0x18')]));});});};exports[_0x2755('0x26')]=function(_0x1065eb){var _0x105ff9=this;return new Promise(function(_0x7c685e,_0x42b82e){return db['SmsQueue']['find']({'raw':_0x1065eb['options']?_0x1065eb[_0x2755('0x1c')][_0x2755('0x1d')]===undefined?!![]:![]:!![],'where':_0x1065eb[_0x2755('0x1c')]?_0x1065eb[_0x2755('0x1c')][_0x2755('0x1e')]||null:null,'attributes':_0x1065eb['options']?_0x1065eb[_0x2755('0x1c')]['attributes']||null:null,'include':_0x1065eb[_0x2755('0x1c')]?_0x1065eb[_0x2755('0x1c')]['include']?_[_0x2755('0x22')](_0x1065eb[_0x2755('0x1c')][_0x2755('0x21')],function(_0xaf2a65){return{'model':db[_0xaf2a65[_0x2755('0x23')]],'as':_0xaf2a65['as'],'attributes':_0xaf2a65[_0x2755('0x1f')],'include':_0xaf2a65['include']?_['map'](_0xaf2a65[_0x2755('0x21')],function(_0x5ef190){return{'model':db[_0x5ef190['model']],'as':_0x5ef190['as'],'attributes':_0x5ef190[_0x2755('0x1f')],'include':_0x5ef190[_0x2755('0x21')]?_[_0x2755('0x22')](_0x5ef190[_0x2755('0x21')],function(_0x56260a){return{'model':db[_0x56260a['model']],'as':_0x56260a['as'],'attributes':_0x56260a[_0x2755('0x1f')]};}):[]};}):[]};}):[]:[]})[_0x2755('0x11')](function(_0x163d58){logger[_0x2755('0x12')](_0x2755('0x26'),_0x1065eb);logger['debug']('ShowSmsQueue',_0x1065eb,JSON[_0x2755('0x25')](_0x163d58));_0x7c685e(_0x163d58);})[_0x2755('0x1a')](function(_0x2ddecd){logger[_0x2755('0x17')](_0x2755('0x26'),_0x2ddecd[_0x2755('0x18')],_0x1065eb);_0x42b82e(_0x105ff9[_0x2755('0x17')](0x1f4,_0x2ddecd[_0x2755('0x18')]));});});};
\ No newline at end of file
+var _0xe6ff=['register','then','info','SmsQueue,\x20%s,\x20%s','request\x20sent','debug','SmsQueue,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','findAll','options','attributes','limit','map','include','model','GetSmsQueue','raw','ShowSmsQueue','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./smsQueue.socket'];(function(_0x24fd7a,_0x473931){var _0x463ccf=function(_0x5b1e5b){while(--_0x5b1e5b){_0x24fd7a['push'](_0x24fd7a['shift']());}};_0x463ccf(++_0x473931);}(_0xe6ff,0xfa));var _0xfe6f=function(_0x82129b,_0x484ae9){_0x82129b=_0x82129b-0x0;var _0x2ae5dc=_0xe6ff[_0x82129b];return _0x2ae5dc;};'use strict';var _=require(_0xfe6f('0x0'));var util=require(_0xfe6f('0x1'));var moment=require('moment');var BPromise=require(_0xfe6f('0x2'));var rs=require(_0xfe6f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xfe6f('0x4'))['db'];var utils=require(_0xfe6f('0x5'));var logger=require('../../config/logger')(_0xfe6f('0x6'));var config=require(_0xfe6f('0x7'));var jayson=require(_0xfe6f('0x8'));var client=jayson[_0xfe6f('0x9')][_0xfe6f('0xa')]({'port':0x232a});config[_0xfe6f('0xb')]=_[_0xfe6f('0xc')](config[_0xfe6f('0xb')],{'host':_0xfe6f('0xd'),'port':0x18eb});var socket=require(_0xfe6f('0xe'))(new Redis(config[_0xfe6f('0xb')]));require(_0xfe6f('0xf'))[_0xfe6f('0x10')](socket);function respondWithRpcPromise(_0x3215b2,_0x4a4b0f,_0x6d2928){return new BPromise(function(_0x4c9088,_0x504eeb){return client['request'](_0x3215b2,_0x6d2928)[_0xfe6f('0x11')](function(_0x3e9dd5){logger[_0xfe6f('0x12')](_0xfe6f('0x13'),_0x4a4b0f,_0xfe6f('0x14'));logger[_0xfe6f('0x15')](_0xfe6f('0x16'),_0x4a4b0f,_0xfe6f('0x14'),JSON[_0xfe6f('0x17')](_0x3e9dd5));if(_0x3e9dd5['error']){if(_0x3e9dd5[_0xfe6f('0x18')]['code']===0x1f4){logger[_0xfe6f('0x18')](_0xfe6f('0x13'),_0x4a4b0f,_0x3e9dd5['error'][_0xfe6f('0x19')]);return _0x504eeb(_0x3e9dd5['error']['message']);}logger[_0xfe6f('0x18')](_0xfe6f('0x13'),_0x4a4b0f,_0x3e9dd5['error']['message']);return _0x4c9088(_0x3e9dd5['error']['message']);}else{logger[_0xfe6f('0x12')]('SmsQueue,\x20%s,\x20%s',_0x4a4b0f,'request\x20sent');_0x4c9088(_0x3e9dd5[_0xfe6f('0x1a')]['message']);}})[_0xfe6f('0x1b')](function(_0x343b4c){logger['error'](_0xfe6f('0x13'),_0x4a4b0f,_0x343b4c);_0x504eeb(_0x343b4c);});});}exports['GetSmsQueue']=function(_0x2d549d){var _0x5c8f48=this;return new Promise(function(_0x109d06,_0x27276a){return db['SmsQueue'][_0xfe6f('0x1c')]({'raw':_0x2d549d['options']?_0x2d549d[_0xfe6f('0x1d')]['raw']===undefined?!![]:![]:!![],'where':_0x2d549d[_0xfe6f('0x1d')]?_0x2d549d['options']['where']||null:null,'attributes':_0x2d549d[_0xfe6f('0x1d')]?_0x2d549d[_0xfe6f('0x1d')][_0xfe6f('0x1e')]||null:null,'limit':_0x2d549d[_0xfe6f('0x1d')]?_0x2d549d[_0xfe6f('0x1d')][_0xfe6f('0x1f')]||null:null,'include':_0x2d549d[_0xfe6f('0x1d')]?_0x2d549d[_0xfe6f('0x1d')]['include']?_[_0xfe6f('0x20')](_0x2d549d[_0xfe6f('0x1d')][_0xfe6f('0x21')],function(_0x2cb5ce){return{'model':db[_0x2cb5ce[_0xfe6f('0x22')]],'as':_0x2cb5ce['as'],'attributes':_0x2cb5ce[_0xfe6f('0x1e')],'include':_0x2cb5ce[_0xfe6f('0x21')]?_[_0xfe6f('0x20')](_0x2cb5ce['include'],function(_0x1c992d){return{'model':db[_0x1c992d[_0xfe6f('0x22')]],'as':_0x1c992d['as'],'attributes':_0x1c992d[_0xfe6f('0x1e')],'include':_0x1c992d[_0xfe6f('0x21')]?_[_0xfe6f('0x20')](_0x1c992d['include'],function(_0x1a3f47){return{'model':db[_0x1a3f47[_0xfe6f('0x22')]],'as':_0x1a3f47['as'],'attributes':_0x1a3f47[_0xfe6f('0x1e')]};}):[]};}):[]};}):[]:[]})[_0xfe6f('0x11')](function(_0x506318){logger[_0xfe6f('0x12')]('GetSmsQueue',_0x2d549d);logger[_0xfe6f('0x15')](_0xfe6f('0x23'),_0x2d549d,JSON[_0xfe6f('0x17')](_0x506318));_0x109d06(_0x506318);})[_0xfe6f('0x1b')](function(_0x279dd8){logger[_0xfe6f('0x18')](_0xfe6f('0x23'),_0x279dd8['message'],_0x2d549d);_0x27276a(_0x5c8f48[_0xfe6f('0x18')](0x1f4,_0x279dd8[_0xfe6f('0x19')]));});});};exports['ShowSmsQueue']=function(_0x5673c4){var _0x71a41e=this;return new Promise(function(_0x31cde3,_0xf5cb25){return db['SmsQueue']['find']({'raw':_0x5673c4['options']?_0x5673c4[_0xfe6f('0x1d')][_0xfe6f('0x24')]===undefined?!![]:![]:!![],'where':_0x5673c4[_0xfe6f('0x1d')]?_0x5673c4[_0xfe6f('0x1d')]['where']||null:null,'attributes':_0x5673c4[_0xfe6f('0x1d')]?_0x5673c4[_0xfe6f('0x1d')][_0xfe6f('0x1e')]||null:null,'include':_0x5673c4['options']?_0x5673c4[_0xfe6f('0x1d')][_0xfe6f('0x21')]?_[_0xfe6f('0x20')](_0x5673c4[_0xfe6f('0x1d')][_0xfe6f('0x21')],function(_0x40c551){return{'model':db[_0x40c551[_0xfe6f('0x22')]],'as':_0x40c551['as'],'attributes':_0x40c551[_0xfe6f('0x1e')],'include':_0x40c551[_0xfe6f('0x21')]?_[_0xfe6f('0x20')](_0x40c551[_0xfe6f('0x21')],function(_0x5c3737){return{'model':db[_0x5c3737[_0xfe6f('0x22')]],'as':_0x5c3737['as'],'attributes':_0x5c3737[_0xfe6f('0x1e')],'include':_0x5c3737[_0xfe6f('0x21')]?_[_0xfe6f('0x20')](_0x5c3737[_0xfe6f('0x21')],function(_0x3496a8){return{'model':db[_0x3496a8[_0xfe6f('0x22')]],'as':_0x3496a8['as'],'attributes':_0x3496a8[_0xfe6f('0x1e')]};}):[]};}):[]};}):[]:[]})[_0xfe6f('0x11')](function(_0xcb7bda){logger[_0xfe6f('0x12')](_0xfe6f('0x25'),_0x5673c4);logger[_0xfe6f('0x15')](_0xfe6f('0x25'),_0x5673c4,JSON['stringify'](_0xcb7bda));_0x31cde3(_0xcb7bda);})[_0xfe6f('0x1b')](function(_0x54d70b){logger['error'](_0xfe6f('0x25'),_0x54d70b[_0xfe6f('0x19')],_0x5673c4);_0xf5cb25(_0x71a41e[_0xfe6f('0x18')](0x1f4,_0x54d70b[_0xfe6f('0x19')]));});});};
\ No newline at end of file
index 12c860e..a99b9f4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7c0c=['removeListener','./smsQueue.events','save','remove','update','emit'];(function(_0x414b48,_0x4293a7){var _0x45ab9c=function(_0x2c13fc){while(--_0x2c13fc){_0x414b48['push'](_0x414b48['shift']());}};_0x45ab9c(++_0x4293a7);}(_0x7c0c,0x6d));var _0xc7c0=function(_0x65397d,_0xf997ae){_0x65397d=_0x65397d-0x0;var _0x357509=_0x7c0c[_0x65397d];return _0x357509;};'use strict';var SmsQueueEvents=require(_0xc7c0('0x0'));var events=[_0xc7c0('0x1'),_0xc7c0('0x2'),_0xc7c0('0x3')];function createListener(_0x223580,_0x4f7eef){return function(_0x28d789){_0x4f7eef[_0xc7c0('0x4')](_0x223580,_0x28d789);};}function removeListener(_0x36710d,_0x3b0ecf){return function(){SmsQueueEvents[_0xc7c0('0x5')](_0x36710d,_0x3b0ecf);};}exports['register']=function(_0xa016ae){for(var _0x108553=0x0,_0x5dc219=events['length'];_0x108553<_0x5dc219;_0x108553++){var _0x213383=events[_0x108553];var _0x30f8a6=createListener('smsQueue:'+_0x213383,_0xa016ae);SmsQueueEvents['on'](_0x213383,_0x30f8a6);}};
\ No newline at end of file
+var _0x6469=['update','length','smsQueue:','./smsQueue.events','remove'];(function(_0x480113,_0xebe8c7){var _0x520d93=function(_0x5c92d2){while(--_0x5c92d2){_0x480113['push'](_0x480113['shift']());}};_0x520d93(++_0xebe8c7);}(_0x6469,0x134));var _0x9646=function(_0x313691,_0x271217){_0x313691=_0x313691-0x0;var _0x5c3ea2=_0x6469[_0x313691];return _0x5c3ea2;};'use strict';var SmsQueueEvents=require(_0x9646('0x0'));var events=['save',_0x9646('0x1'),_0x9646('0x2')];function createListener(_0x25b984,_0x1028ed){return function(_0x384871){_0x1028ed['emit'](_0x25b984,_0x384871);};}function removeListener(_0x2847e1,_0x24eaf8){return function(){SmsQueueEvents['removeListener'](_0x2847e1,_0x24eaf8);};}exports['register']=function(_0x1be76f){for(var _0x599fae=0x0,_0xb4e446=events[_0x9646('0x3')];_0x599fae<_0xb4e446;_0x599fae++){var _0x51183a=events[_0x599fae];var _0x1e767c=createListener(_0x9646('0x4')+_0x51183a,_0x1be76f);SmsQueueEvents['on'](_0x51183a,_0x1e767c);}};
\ No newline at end of file
index ebe61cd..4f53c87 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x36e8=['put','update','delete','destroy','exports','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./smsQueueReport.controller','isAuthenticated','index','get','/describe','describe','/:id','post','create'];(function(_0x5ae8ac,_0xa9e5c3){var _0x2a0853=function(_0x209644){while(--_0x209644){_0x5ae8ac['push'](_0x5ae8ac['shift']());}};_0x2a0853(++_0xa9e5c3);}(_0x36e8,0x16a));var _0x836e=function(_0x19d7a6,_0x42a09d){_0x19d7a6=_0x19d7a6-0x0;var _0x3a10b7=_0x36e8[_0x19d7a6];return _0x3a10b7;};'use strict';var multer=require('multer');var util=require(_0x836e('0x0'));var path=require(_0x836e('0x1'));var timeout=require(_0x836e('0x2'));var express=require(_0x836e('0x3'));var router=express[_0x836e('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x836e('0x5'));var interaction=require(_0x836e('0x6'));var config=require('../../config/environment');var controller=require(_0x836e('0x7'));router['get']('/',auth[_0x836e('0x8')](),controller[_0x836e('0x9')]);router[_0x836e('0xa')](_0x836e('0xb'),auth[_0x836e('0x8')](),controller[_0x836e('0xc')]);router['get'](_0x836e('0xd'),auth[_0x836e('0x8')](),controller['show']);router[_0x836e('0xe')]('/',auth[_0x836e('0x8')](),controller[_0x836e('0xf')]);router[_0x836e('0x10')](_0x836e('0xd'),auth[_0x836e('0x8')](),controller[_0x836e('0x11')]);router[_0x836e('0x12')](_0x836e('0xd'),auth[_0x836e('0x8')](),controller[_0x836e('0x13')]);module[_0x836e('0x14')]=router;
\ No newline at end of file
+var _0xf3fe=['destroy','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsQueueReport.controller','get','/describe','isAuthenticated','describe','/:id','show','post','create','update','delete'];(function(_0x247a33,_0x5a517d){var _0x13d4c5=function(_0x3fa781){while(--_0x3fa781){_0x247a33['push'](_0x247a33['shift']());}};_0x13d4c5(++_0x5a517d);}(_0xf3fe,0x1cd));var _0xef3f=function(_0x6f7b07,_0x5077f6){_0x6f7b07=_0x6f7b07-0x0;var _0x299377=_0xf3fe[_0x6f7b07];return _0x299377;};'use strict';var multer=require('multer');var util=require(_0xef3f('0x0'));var path=require(_0xef3f('0x1'));var timeout=require(_0xef3f('0x2'));var express=require(_0xef3f('0x3'));var router=express[_0xef3f('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0xef3f('0x5'));var interaction=require(_0xef3f('0x6'));var config=require(_0xef3f('0x7'));var controller=require(_0xef3f('0x8'));router[_0xef3f('0x9')]('/',auth['isAuthenticated'](),controller['index']);router[_0xef3f('0x9')](_0xef3f('0xa'),auth[_0xef3f('0xb')](),controller[_0xef3f('0xc')]);router[_0xef3f('0x9')](_0xef3f('0xd'),auth[_0xef3f('0xb')](),controller[_0xef3f('0xe')]);router[_0xef3f('0xf')]('/',auth['isAuthenticated'](),controller[_0xef3f('0x10')]);router['put'](_0xef3f('0xd'),auth[_0xef3f('0xb')](),controller[_0xef3f('0x11')]);router[_0xef3f('0x12')]('/:id',auth[_0xef3f('0xb')](),controller[_0xef3f('0x13')]);module['exports']=router;
\ No newline at end of file
index 665daaa..fccbd43 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9622=['DATE','moment','sequelize','exports','STRING'];(function(_0x3755e7,_0x4613f2){var _0x779862=function(_0x1b48a3){while(--_0x1b48a3){_0x3755e7['push'](_0x3755e7['shift']());}};_0x779862(++_0x4613f2);}(_0x9622,0x8d));var _0x2962=function(_0x2bb612,_0xaedf28){_0x2bb612=_0x2bb612-0x0;var _0x4ef64c=_0x9622[_0x2bb612];return _0x4ef64c;};'use strict';var moment=require(_0x2962('0x0'));var Sequelize=require(_0x2962('0x1'));module[_0x2962('0x2')]={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'from':{'type':Sequelize[_0x2962('0x3')]},'joinAt':{'type':Sequelize[_0x2962('0x4')]},'leaveAt':{'type':Sequelize[_0x2962('0x4')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize['DATE']},'reason':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x66c7=['STRING','DATE','exports'];(function(_0x2022b7,_0x298b2e){var _0x1077ca=function(_0x47a408){while(--_0x47a408){_0x2022b7['push'](_0x2022b7['shift']());}};_0x1077ca(++_0x298b2e);}(_0x66c7,0x19d));var _0x766c=function(_0x23e004,_0x31a72b){_0x23e004=_0x23e004-0x0;var _0x3af90d=_0x66c7[_0x23e004];return _0x3af90d;};'use strict';var moment=require('moment');var Sequelize=require('sequelize');module[_0x766c('0x0')]={'uniqueid':{'type':Sequelize[_0x766c('0x1')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0x766c('0x2')]},'leaveAt':{'type':Sequelize[_0x766c('0x2')]},'acceptAt':{'type':Sequelize[_0x766c('0x2')]},'exitAt':{'type':Sequelize[_0x766c('0x2')]},'reason':{'type':Sequelize[_0x766c('0x1')]}};
\ No newline at end of file
index c3f87c0..1010292 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb069=['hasOwnProperty','nolimit','sort','where','pick','merge','VIRTUAL','filter','then','includeAll','include','rows','show','params','keys','catch','create','body','find','destroy','describe','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','api','../../config/utils','../../config/license/util','sendStatus','end','status','json','offset','undefined','limit','count','Content-Range','apply','reject','update','error','stack','name','index','map','SmsQueueReport','rawAttributes','fieldName','type','key','model','query','filters','intersection','attributes','fields','length'];(function(_0x5dc4b7,_0x63ec04){var _0x111198=function(_0xe03877){while(--_0xe03877){_0x5dc4b7['push'](_0x5dc4b7['shift']());}};_0x111198(++_0x63ec04);}(_0xb069,0x1dd));var _0x9b06=function(_0x4fa018,_0x20c04a){_0x4fa018=_0x4fa018-0x0;var _0x4344f8=_0xb069[_0x4fa018];return _0x4344f8;};'use strict';var emlformat=require(_0x9b06('0x0'));var rimraf=require(_0x9b06('0x1'));var zipdir=require(_0x9b06('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x9b06('0x3'));var moment=require(_0x9b06('0x4'));var BPromise=require(_0x9b06('0x5'));var Mustache=require('mustache');var util=require(_0x9b06('0x6'));var path=require(_0x9b06('0x7'));var sox=require(_0x9b06('0x8'));var csv=require(_0x9b06('0x9'));var ejs=require(_0x9b06('0xa'));var fs=require('fs');var fs_extra=require(_0x9b06('0xb'));var _=require(_0x9b06('0xc'));var squel=require(_0x9b06('0xd'));var crypto=require(_0x9b06('0xe'));var jsforce=require(_0x9b06('0xf'));var deskjs=require(_0x9b06('0x10'));var toCsv=require(_0x9b06('0x9'));var querystring=require(_0x9b06('0x11'));var Papa=require(_0x9b06('0x12'));var Redis=require(_0x9b06('0x13'));var authService=require(_0x9b06('0x14'));var qs=require(_0x9b06('0x15'));var as=require(_0x9b06('0x16'));var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x9b06('0x17'));var utils=require(_0x9b06('0x18'));var config=require('../../config/environment');var licenseUtil=require(_0x9b06('0x19'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xd31261,_0x20d1a1){_0x20d1a1=_0x20d1a1||0xcc;return function(_0x38d847){if(_0x38d847){return _0xd31261[_0x9b06('0x1a')](_0x20d1a1);}return _0xd31261['status'](_0x20d1a1)[_0x9b06('0x1b')]();};}function respondWithResult(_0x61f6f9,_0x48719a){_0x48719a=_0x48719a||0xc8;return function(_0x5aa269){if(_0x5aa269){return _0x61f6f9[_0x9b06('0x1c')](_0x48719a)[_0x9b06('0x1d')](_0x5aa269);}};}function respondWithFilteredResult(_0x1ff2a3,_0x89d7b1){return function(_0xdb4b51){if(_0xdb4b51){var _0x504546=typeof _0x89d7b1[_0x9b06('0x1e')]===_0x9b06('0x1f')&&typeof _0x89d7b1[_0x9b06('0x20')]==='undefined';var _0x4cfc82=_0xdb4b51[_0x9b06('0x21')];var _0x59de1a=_0x504546?0x0:_0x89d7b1[_0x9b06('0x1e')];var _0x593c12=_0x504546?_0xdb4b51['count']:_0x89d7b1['offset']+_0x89d7b1[_0x9b06('0x20')];var _0x213b8c;if(_0x593c12>=_0x4cfc82){_0x593c12=_0x4cfc82;_0x213b8c=0xc8;}else{_0x213b8c=0xce;}_0x1ff2a3['status'](_0x213b8c);return _0x1ff2a3['set'](_0x9b06('0x22'),_0x59de1a+'-'+_0x593c12+'/'+_0x4cfc82)[_0x9b06('0x1d')](_0xdb4b51);}return null;};}function patchUpdates(_0x4bf9c9){return function(_0x2ca9be){try{jsonpatch[_0x9b06('0x23')](_0x2ca9be,_0x4bf9c9,!![]);}catch(_0x230819){return BPromise[_0x9b06('0x24')](_0x230819);}return _0x2ca9be['save']();};}function saveUpdates(_0x4a6a5d,_0x5a460c){return function(_0x597abe){if(_0x597abe){return _0x597abe[_0x9b06('0x25')](_0x4a6a5d)['then'](function(_0x267ee1){return _0x267ee1;});}return null;};}function removeEntity(_0x4dcd2d,_0x2f0636){return function(_0x8232eb){if(_0x8232eb){return _0x8232eb['destroy']()['then'](function(){_0x4dcd2d[_0x9b06('0x1c')](0xcc)['end']();});}};}function handleEntityNotFound(_0x191bb,_0x3d8961){return function(_0xa40531){if(!_0xa40531){_0x191bb[_0x9b06('0x1a')](0x194);}return _0xa40531;};}function handleError(_0x4469ab,_0x1e4f00){_0x1e4f00=_0x1e4f00||0x1f4;return function(_0x21249c){logger[_0x9b06('0x26')](_0x21249c[_0x9b06('0x27')]);if(_0x21249c[_0x9b06('0x28')]){delete _0x21249c[_0x9b06('0x28')];}_0x4469ab[_0x9b06('0x1c')](_0x1e4f00)['send'](_0x21249c);};}exports[_0x9b06('0x29')]=function(_0xd2df5c,_0x3c9ee4){var _0x56bae8={},_0x37bcc2={},_0x406735={'count':0x0,'rows':[]};var _0x23392f=_[_0x9b06('0x2a')](db[_0x9b06('0x2b')][_0x9b06('0x2c')],function(_0x655688){return{'name':_0x655688[_0x9b06('0x2d')],'type':_0x655688[_0x9b06('0x2e')][_0x9b06('0x2f')]};});_0x37bcc2[_0x9b06('0x30')]=_['map'](_0x23392f,_0x9b06('0x28'));_0x37bcc2[_0x9b06('0x31')]=_['keys'](_0xd2df5c[_0x9b06('0x31')]);_0x37bcc2[_0x9b06('0x32')]=_[_0x9b06('0x33')](_0x37bcc2[_0x9b06('0x30')],_0x37bcc2[_0x9b06('0x31')]);_0x56bae8[_0x9b06('0x34')]=_[_0x9b06('0x33')](_0x37bcc2[_0x9b06('0x30')],qs[_0x9b06('0x35')](_0xd2df5c[_0x9b06('0x31')][_0x9b06('0x35')]));_0x56bae8[_0x9b06('0x34')]=_0x56bae8[_0x9b06('0x34')][_0x9b06('0x36')]?_0x56bae8['attributes']:_0x37bcc2['model'];if(!_0xd2df5c[_0x9b06('0x31')][_0x9b06('0x37')](_0x9b06('0x38'))){_0x56bae8[_0x9b06('0x20')]=qs[_0x9b06('0x20')](_0xd2df5c['query'][_0x9b06('0x20')]);_0x56bae8[_0x9b06('0x1e')]=qs['offset'](_0xd2df5c[_0x9b06('0x31')][_0x9b06('0x1e')]);}_0x56bae8['order']=qs[_0x9b06('0x39')](_0xd2df5c['query'][_0x9b06('0x39')]);_0x56bae8[_0x9b06('0x3a')]=qs[_0x9b06('0x32')](_[_0x9b06('0x3b')](_0xd2df5c[_0x9b06('0x31')],_0x37bcc2[_0x9b06('0x32')]),_0x23392f);if(_0xd2df5c[_0x9b06('0x31')]['filter']){_0x56bae8[_0x9b06('0x3a')]=_[_0x9b06('0x3c')](_0x56bae8[_0x9b06('0x3a')],{'$or':_[_0x9b06('0x2a')](_0x23392f,function(_0x2123c4){if(_0x2123c4[_0x9b06('0x2e')]!==_0x9b06('0x3d')){var _0x478cbc={};_0x478cbc[_0x2123c4[_0x9b06('0x28')]]={'$like':'%'+_0xd2df5c[_0x9b06('0x31')][_0x9b06('0x3e')]+'%'};return _0x478cbc;}})});}_0x56bae8=_[_0x9b06('0x3c')]({},_0x56bae8,_0xd2df5c['options']);var _0x1d7b6a={'where':_0x56bae8[_0x9b06('0x3a')]};return db[_0x9b06('0x2b')][_0x9b06('0x21')](_0x1d7b6a)[_0x9b06('0x3f')](function(_0x516762){_0x406735[_0x9b06('0x21')]=_0x516762;if(_0xd2df5c[_0x9b06('0x31')][_0x9b06('0x40')]){_0x56bae8[_0x9b06('0x41')]=[{'all':!![]}];}return db[_0x9b06('0x2b')]['findAll'](_0x56bae8);})[_0x9b06('0x3f')](function(_0x1d58cc){_0x406735[_0x9b06('0x42')]=_0x1d58cc;return _0x406735;})[_0x9b06('0x3f')](respondWithFilteredResult(_0x3c9ee4,_0x56bae8))['catch'](handleError(_0x3c9ee4,null));};exports[_0x9b06('0x43')]=function(_0x25fc0e,_0x4b17c4){var _0x59bc1a={'raw':!![],'where':{'id':_0x25fc0e[_0x9b06('0x44')]['id']}},_0x5a81d6={};_0x5a81d6['model']=_[_0x9b06('0x45')](db['SmsQueueReport']['rawAttributes']);_0x5a81d6['query']=_[_0x9b06('0x45')](_0x25fc0e[_0x9b06('0x31')]);_0x5a81d6['filters']=_[_0x9b06('0x33')](_0x5a81d6[_0x9b06('0x30')],_0x5a81d6[_0x9b06('0x31')]);_0x59bc1a['attributes']=_['intersection'](_0x5a81d6[_0x9b06('0x30')],qs[_0x9b06('0x35')](_0x25fc0e[_0x9b06('0x31')][_0x9b06('0x35')]));_0x59bc1a[_0x9b06('0x34')]=_0x59bc1a['attributes'][_0x9b06('0x36')]?_0x59bc1a[_0x9b06('0x34')]:_0x5a81d6[_0x9b06('0x30')];if(_0x25fc0e[_0x9b06('0x31')][_0x9b06('0x40')]){_0x59bc1a[_0x9b06('0x41')]=[{'all':!![]}];}_0x59bc1a=_[_0x9b06('0x3c')]({},_0x59bc1a,_0x25fc0e['options']);return db[_0x9b06('0x2b')]['find'](_0x59bc1a)[_0x9b06('0x3f')](handleEntityNotFound(_0x4b17c4,null))[_0x9b06('0x3f')](respondWithResult(_0x4b17c4,null))[_0x9b06('0x46')](handleError(_0x4b17c4,null));};exports['create']=function(_0x4a227c,_0x5bec00){return db[_0x9b06('0x2b')][_0x9b06('0x47')](_0x4a227c['body'],{})[_0x9b06('0x3f')](respondWithResult(_0x5bec00,0xc9))[_0x9b06('0x46')](handleError(_0x5bec00,null));};exports[_0x9b06('0x25')]=function(_0x5ec738,_0x812461){if(_0x5ec738[_0x9b06('0x48')]['id']){delete _0x5ec738['body']['id'];}return db[_0x9b06('0x2b')][_0x9b06('0x49')]({'where':{'id':_0x5ec738[_0x9b06('0x44')]['id']}})['then'](handleEntityNotFound(_0x812461,null))[_0x9b06('0x3f')](saveUpdates(_0x5ec738[_0x9b06('0x48')],null))[_0x9b06('0x3f')](respondWithResult(_0x812461,null))[_0x9b06('0x46')](handleError(_0x812461,null));};exports[_0x9b06('0x4a')]=function(_0x47ea38,_0x4b42f7){return db['SmsQueueReport'][_0x9b06('0x49')]({'where':{'id':_0x47ea38['params']['id']}})['then'](handleEntityNotFound(_0x4b42f7,null))[_0x9b06('0x3f')](removeEntity(_0x4b42f7,null))[_0x9b06('0x46')](handleError(_0x4b42f7,null));};exports[_0x9b06('0x4b')]=function(_0x5f5b5e,_0x3a0601){return db[_0x9b06('0x2b')][_0x9b06('0x4b')]()[_0x9b06('0x3f')](respondWithResult(_0x3a0601,null))['catch'](handleError(_0x3a0601,null));};
\ No newline at end of file
+var _0xecbb=['filter','options','includeAll','include','findAll','rows','catch','show','keys','create','body','update','params','destroy','find','describe','eml-format','rimraf','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','offset','undefined','count','limit','set','Content-Range','json','reject','save','then','end','error','name','send','index','SmsQueueReport','rawAttributes','fieldName','type','key','model','map','query','filters','intersection','attributes','fields','hasOwnProperty','order','sort','where','merge','VIRTUAL'];(function(_0x267f88,_0x5edf18){var _0x5932ac=function(_0x1be538){while(--_0x1be538){_0x267f88['push'](_0x267f88['shift']());}};_0x5932ac(++_0x5edf18);}(_0xecbb,0x140));var _0xbecb=function(_0x32048c,_0x3cc91d){_0x32048c=_0x32048c-0x0;var _0x3bb3e3=_0xecbb[_0x32048c];return _0x3bb3e3;};'use strict';var emlformat=require(_0xbecb('0x0'));var rimraf=require(_0xbecb('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0xbecb('0x2'));var moment=require(_0xbecb('0x3'));var BPromise=require(_0xbecb('0x4'));var Mustache=require(_0xbecb('0x5'));var util=require(_0xbecb('0x6'));var path=require(_0xbecb('0x7'));var sox=require(_0xbecb('0x8'));var csv=require(_0xbecb('0x9'));var ejs=require(_0xbecb('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xbecb('0xb'));var squel=require(_0xbecb('0xc'));var crypto=require(_0xbecb('0xd'));var jsforce=require(_0xbecb('0xe'));var deskjs=require(_0xbecb('0xf'));var toCsv=require(_0xbecb('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xbecb('0x10'));var authService=require(_0xbecb('0x11'));var qs=require(_0xbecb('0x12'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xbecb('0x13'));var logger=require(_0xbecb('0x14'))(_0xbecb('0x15'));var utils=require('../../config/utils');var config=require(_0xbecb('0x16'));var licenseUtil=require(_0xbecb('0x17'));var db=require(_0xbecb('0x18'))['db'];function respondWithStatusCode(_0xa2e1e,_0x1ea670){_0x1ea670=_0x1ea670||0xcc;return function(_0x418e0f){if(_0x418e0f){return _0xa2e1e[_0xbecb('0x19')](_0x1ea670);}return _0xa2e1e[_0xbecb('0x1a')](_0x1ea670)['end']();};}function respondWithResult(_0x37b9c1,_0x2f9f2c){_0x2f9f2c=_0x2f9f2c||0xc8;return function(_0x41102d){if(_0x41102d){return _0x37b9c1['status'](_0x2f9f2c)['json'](_0x41102d);}};}function respondWithFilteredResult(_0x1136c6,_0x9aa7b8){return function(_0x165605){if(_0x165605){var _0x36d7c8=typeof _0x9aa7b8[_0xbecb('0x1b')]===_0xbecb('0x1c')&&typeof _0x9aa7b8['limit']===_0xbecb('0x1c');var _0x55dfa4=_0x165605[_0xbecb('0x1d')];var _0xd43278=_0x36d7c8?0x0:_0x9aa7b8[_0xbecb('0x1b')];var _0x2ae741=_0x36d7c8?_0x165605[_0xbecb('0x1d')]:_0x9aa7b8[_0xbecb('0x1b')]+_0x9aa7b8[_0xbecb('0x1e')];var _0x5240fe;if(_0x2ae741>=_0x55dfa4){_0x2ae741=_0x55dfa4;_0x5240fe=0xc8;}else{_0x5240fe=0xce;}_0x1136c6['status'](_0x5240fe);return _0x1136c6[_0xbecb('0x1f')](_0xbecb('0x20'),_0xd43278+'-'+_0x2ae741+'/'+_0x55dfa4)[_0xbecb('0x21')](_0x165605);}return null;};}function patchUpdates(_0x564c51){return function(_0x199389){try{jsonpatch['apply'](_0x199389,_0x564c51,!![]);}catch(_0x429aa8){return BPromise[_0xbecb('0x22')](_0x429aa8);}return _0x199389[_0xbecb('0x23')]();};}function saveUpdates(_0x4b4d53,_0x50ab2d){return function(_0x1c5f2e){if(_0x1c5f2e){return _0x1c5f2e['update'](_0x4b4d53)[_0xbecb('0x24')](function(_0x5d5354){return _0x5d5354;});}return null;};}function removeEntity(_0x48d4cf,_0x56ef88){return function(_0x7d178b){if(_0x7d178b){return _0x7d178b['destroy']()[_0xbecb('0x24')](function(){_0x48d4cf[_0xbecb('0x1a')](0xcc)[_0xbecb('0x25')]();});}};}function handleEntityNotFound(_0x3d984e,_0x458638){return function(_0x102c86){if(!_0x102c86){_0x3d984e[_0xbecb('0x19')](0x194);}return _0x102c86;};}function handleError(_0x33cc36,_0x163889){_0x163889=_0x163889||0x1f4;return function(_0x5414fb){logger[_0xbecb('0x26')](_0x5414fb['stack']);if(_0x5414fb['name']){delete _0x5414fb[_0xbecb('0x27')];}_0x33cc36[_0xbecb('0x1a')](_0x163889)[_0xbecb('0x28')](_0x5414fb);};}exports[_0xbecb('0x29')]=function(_0x3a579b,_0x41f181){var _0xcbd7dd={},_0x3cc64c={},_0x355363={'count':0x0,'rows':[]};var _0x234942=_['map'](db[_0xbecb('0x2a')][_0xbecb('0x2b')],function(_0x39d21d){return{'name':_0x39d21d[_0xbecb('0x2c')],'type':_0x39d21d[_0xbecb('0x2d')][_0xbecb('0x2e')]};});_0x3cc64c[_0xbecb('0x2f')]=_[_0xbecb('0x30')](_0x234942,_0xbecb('0x27'));_0x3cc64c[_0xbecb('0x31')]=_['keys'](_0x3a579b['query']);_0x3cc64c[_0xbecb('0x32')]=_[_0xbecb('0x33')](_0x3cc64c[_0xbecb('0x2f')],_0x3cc64c[_0xbecb('0x31')]);_0xcbd7dd[_0xbecb('0x34')]=_[_0xbecb('0x33')](_0x3cc64c[_0xbecb('0x2f')],qs[_0xbecb('0x35')](_0x3a579b[_0xbecb('0x31')]['fields']));_0xcbd7dd['attributes']=_0xcbd7dd[_0xbecb('0x34')]['length']?_0xcbd7dd['attributes']:_0x3cc64c[_0xbecb('0x2f')];if(!_0x3a579b[_0xbecb('0x31')][_0xbecb('0x36')]('nolimit')){_0xcbd7dd[_0xbecb('0x1e')]=qs[_0xbecb('0x1e')](_0x3a579b[_0xbecb('0x31')][_0xbecb('0x1e')]);_0xcbd7dd[_0xbecb('0x1b')]=qs[_0xbecb('0x1b')](_0x3a579b['query']['offset']);}_0xcbd7dd[_0xbecb('0x37')]=qs[_0xbecb('0x38')](_0x3a579b[_0xbecb('0x31')][_0xbecb('0x38')]);_0xcbd7dd[_0xbecb('0x39')]=qs[_0xbecb('0x32')](_['pick'](_0x3a579b[_0xbecb('0x31')],_0x3cc64c['filters']),_0x234942);if(_0x3a579b[_0xbecb('0x31')]['filter']){_0xcbd7dd[_0xbecb('0x39')]=_[_0xbecb('0x3a')](_0xcbd7dd[_0xbecb('0x39')],{'$or':_[_0xbecb('0x30')](_0x234942,function(_0x2c417c){if(_0x2c417c['type']!==_0xbecb('0x3b')){var _0x1e52f6={};_0x1e52f6[_0x2c417c[_0xbecb('0x27')]]={'$like':'%'+_0x3a579b[_0xbecb('0x31')][_0xbecb('0x3c')]+'%'};return _0x1e52f6;}})});}_0xcbd7dd=_['merge']({},_0xcbd7dd,_0x3a579b[_0xbecb('0x3d')]);var _0x68dcdb={'where':_0xcbd7dd[_0xbecb('0x39')]};return db[_0xbecb('0x2a')]['count'](_0x68dcdb)[_0xbecb('0x24')](function(_0x30b162){_0x355363[_0xbecb('0x1d')]=_0x30b162;if(_0x3a579b[_0xbecb('0x31')][_0xbecb('0x3e')]){_0xcbd7dd[_0xbecb('0x3f')]=[{'all':!![]}];}return db[_0xbecb('0x2a')][_0xbecb('0x40')](_0xcbd7dd);})[_0xbecb('0x24')](function(_0x1c81f7){_0x355363[_0xbecb('0x41')]=_0x1c81f7;return _0x355363;})[_0xbecb('0x24')](respondWithFilteredResult(_0x41f181,_0xcbd7dd))[_0xbecb('0x42')](handleError(_0x41f181,null));};exports[_0xbecb('0x43')]=function(_0x2b8f6a,_0x4a212e){var _0x188723={'raw':!![],'where':{'id':_0x2b8f6a['params']['id']}},_0xef95fe={};_0xef95fe[_0xbecb('0x2f')]=_[_0xbecb('0x44')](db[_0xbecb('0x2a')][_0xbecb('0x2b')]);_0xef95fe[_0xbecb('0x31')]=_['keys'](_0x2b8f6a[_0xbecb('0x31')]);_0xef95fe['filters']=_['intersection'](_0xef95fe[_0xbecb('0x2f')],_0xef95fe[_0xbecb('0x31')]);_0x188723[_0xbecb('0x34')]=_[_0xbecb('0x33')](_0xef95fe[_0xbecb('0x2f')],qs['fields'](_0x2b8f6a[_0xbecb('0x31')]['fields']));_0x188723['attributes']=_0x188723[_0xbecb('0x34')]['length']?_0x188723[_0xbecb('0x34')]:_0xef95fe[_0xbecb('0x2f')];if(_0x2b8f6a['query'][_0xbecb('0x3e')]){_0x188723[_0xbecb('0x3f')]=[{'all':!![]}];}_0x188723=_['merge']({},_0x188723,_0x2b8f6a['options']);return db['SmsQueueReport']['find'](_0x188723)['then'](handleEntityNotFound(_0x4a212e,null))[_0xbecb('0x24')](respondWithResult(_0x4a212e,null))[_0xbecb('0x42')](handleError(_0x4a212e,null));};exports[_0xbecb('0x45')]=function(_0x1c5ebb,_0x5dbf30){return db[_0xbecb('0x2a')][_0xbecb('0x45')](_0x1c5ebb[_0xbecb('0x46')],{})[_0xbecb('0x24')](respondWithResult(_0x5dbf30,0xc9))[_0xbecb('0x42')](handleError(_0x5dbf30,null));};exports[_0xbecb('0x47')]=function(_0xe82017,_0x31f8d2){if(_0xe82017[_0xbecb('0x46')]['id']){delete _0xe82017[_0xbecb('0x46')]['id'];}return db[_0xbecb('0x2a')]['find']({'where':{'id':_0xe82017[_0xbecb('0x48')]['id']}})['then'](handleEntityNotFound(_0x31f8d2,null))[_0xbecb('0x24')](saveUpdates(_0xe82017['body'],null))[_0xbecb('0x24')](respondWithResult(_0x31f8d2,null))[_0xbecb('0x42')](handleError(_0x31f8d2,null));};exports[_0xbecb('0x49')]=function(_0x3ad9ab,_0x5a1c17){return db[_0xbecb('0x2a')][_0xbecb('0x4a')]({'where':{'id':_0x3ad9ab[_0xbecb('0x48')]['id']}})[_0xbecb('0x24')](handleEntityNotFound(_0x5a1c17,null))[_0xbecb('0x24')](removeEntity(_0x5a1c17,null))[_0xbecb('0x42')](handleError(_0x5a1c17,null));};exports['describe']=function(_0x52ef04,_0x158b11){return db[_0xbecb('0x2a')][_0xbecb('0x4b')]()[_0xbecb('0x24')](respondWithResult(_0x158b11,null))[_0xbecb('0x42')](handleError(_0x158b11,null));};
\ No newline at end of file
index 9eb73be..61138f8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe706=['../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./smsQueueReport.attributes','exports','define','SmsQueueReport','report_sms_queue','uniqueid','lodash','util'];(function(_0x105d2e,_0xefc0f9){var _0x44969d=function(_0x2fca67){while(--_0x2fca67){_0x105d2e['push'](_0x105d2e['shift']());}};_0x44969d(++_0xefc0f9);}(_0xe706,0xa3));var _0x6e70=function(_0x5ddec9,_0x209a36){_0x5ddec9=_0x5ddec9-0x0;var _0x5abb94=_0xe706[_0x5ddec9];return _0x5abb94;};'use strict';var _=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var logger=require(_0x6e70('0x2'))('api');var moment=require(_0x6e70('0x3'));var BPromise=require(_0x6e70('0x4'));var rp=require(_0x6e70('0x5'));var fs=require('fs');var path=require(_0x6e70('0x6'));var rimraf=require(_0x6e70('0x7'));var config=require(_0x6e70('0x8'));var attributes=require(_0x6e70('0x9'));module[_0x6e70('0xa')]=function(_0x1b0389,_0x4381d1){return _0x1b0389[_0x6e70('0xb')](_0x6e70('0xc'),attributes,{'tableName':_0x6e70('0xd'),'paranoid':![],'indexes':[{'name':_0x6e70('0xe'),'fields':[_0x6e70('0xe')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xd8b0=['define','report_sms_queue','uniqueid','lodash','util','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x216f3c,_0x46eb91){var _0x28f716=function(_0x5f368c){while(--_0x5f368c){_0x216f3c['push'](_0x216f3c['shift']());}};_0x28f716(++_0x46eb91);}(_0xd8b0,0xad));var _0x0d8b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xd8b0[_0x122ef9];return _0x42fba0;};'use strict';var _=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require(_0x0d8b('0x2'));var rp=require(_0x0d8b('0x3'));var fs=require('fs');var path=require(_0x0d8b('0x4'));var rimraf=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));var attributes=require('./smsQueueReport.attributes');module['exports']=function(_0x3f8b6f,_0x227c63){return _0x3f8b6f[_0x0d8b('0x7')]('SmsQueueReport',attributes,{'tableName':_0x0d8b('0x8'),'paranoid':![],'indexes':[{'name':_0x0d8b('0x9'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
index 7311a20..6bee867 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1491=['ioredis','../../config/utils','rpc','jayson/promise','http','then','info','SmsQueueReport,\x20%s,\x20%s','request\x20sent','debug','SmsQueueReport,\x20%s,\x20%s,\x20%s','stringify','code','error','message','result','CreateSmsQueueReport','options','raw','catch','UpdateSmsQueueReport','SmsQueueReport','update','body','where','attributes','lodash','moment','bluebird'];(function(_0x5ee8a6,_0x1260a4){var _0xa485d6=function(_0x1912b5){while(--_0x1912b5){_0x5ee8a6['push'](_0x5ee8a6['shift']());}};_0xa485d6(++_0x1260a4);}(_0x1491,0xc8));var _0x1149=function(_0x3ed6c8,_0x1114d9){_0x3ed6c8=_0x3ed6c8-0x0;var _0x11eaf5=_0x1491[_0x3ed6c8];return _0x11eaf5;};'use strict';var _=require(_0x1149('0x0'));var util=require('util');var moment=require(_0x1149('0x1'));var BPromise=require(_0x1149('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1149('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x1149('0x4'));var logger=require('../../config/logger')(_0x1149('0x5'));var config=require('../../config/environment');var jayson=require(_0x1149('0x6'));var client=jayson['client'][_0x1149('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x4fb2ec,_0x33f486,_0x381f55){return new BPromise(function(_0x36f750,_0x2da747){return client['request'](_0x4fb2ec,_0x381f55)[_0x1149('0x8')](function(_0x46dd33){logger[_0x1149('0x9')](_0x1149('0xa'),_0x33f486,_0x1149('0xb'));logger[_0x1149('0xc')](_0x1149('0xd'),_0x33f486,_0x1149('0xb'),JSON[_0x1149('0xe')](_0x46dd33));if(_0x46dd33['error']){if(_0x46dd33['error'][_0x1149('0xf')]===0x1f4){logger['error'](_0x1149('0xa'),_0x33f486,_0x46dd33[_0x1149('0x10')][_0x1149('0x11')]);return _0x2da747(_0x46dd33[_0x1149('0x10')][_0x1149('0x11')]);}logger[_0x1149('0x10')](_0x1149('0xa'),_0x33f486,_0x46dd33[_0x1149('0x10')][_0x1149('0x11')]);return _0x36f750(_0x46dd33[_0x1149('0x10')][_0x1149('0x11')]);}else{logger['info'](_0x1149('0xa'),_0x33f486,_0x1149('0xb'));_0x36f750(_0x46dd33[_0x1149('0x12')][_0x1149('0x11')]);}})['catch'](function(_0x4c816f){logger[_0x1149('0x10')](_0x1149('0xa'),_0x33f486,_0x4c816f);_0x2da747(_0x4c816f);});});}exports[_0x1149('0x13')]=function(_0x87d596){var _0x326724=this;return new Promise(function(_0x76e7ff,_0x5310fa){return db['SmsQueueReport']['create'](_0x87d596['body'],{'raw':_0x87d596[_0x1149('0x14')]?_0x87d596['options'][_0x1149('0x15')]===undefined?!![]:![]:!![]})['then'](function(_0xf06d60){logger[_0x1149('0x9')](_0x1149('0x13'),_0x87d596);logger[_0x1149('0xc')](_0x1149('0x13'),_0x87d596,JSON[_0x1149('0xe')](_0xf06d60));_0x76e7ff(_0xf06d60);})[_0x1149('0x16')](function(_0x26f06b){logger['error'](_0x1149('0x13'),_0x26f06b[_0x1149('0x11')],_0x87d596);_0x5310fa(_0x326724[_0x1149('0x10')](0x1f4,_0x26f06b['message']));});});};exports[_0x1149('0x17')]=function(_0x3a5b3c){var _0x242b6e=this;return new Promise(function(_0x238cc1,_0x4194f1){return db[_0x1149('0x18')][_0x1149('0x19')](_0x3a5b3c[_0x1149('0x1a')],{'raw':_0x3a5b3c['options']?_0x3a5b3c[_0x1149('0x14')][_0x1149('0x15')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x3a5b3c['options']?_0x3a5b3c[_0x1149('0x14')][_0x1149('0x1b')]||null:null,'attributes':_0x3a5b3c[_0x1149('0x14')]?_0x3a5b3c[_0x1149('0x14')][_0x1149('0x1c')]||null:null,'limit':_0x3a5b3c[_0x1149('0x14')]?_0x3a5b3c[_0x1149('0x14')]['limit']||null:null})['then'](function(_0x242cff){logger[_0x1149('0x9')](_0x1149('0x17'),_0x3a5b3c);logger[_0x1149('0xc')](_0x1149('0x17'),_0x3a5b3c,JSON['stringify'](_0x242cff));_0x238cc1(_0x242cff);})[_0x1149('0x16')](function(_0x9b9363){logger[_0x1149('0x10')](_0x1149('0x17'),_0x9b9363['message'],_0x3a5b3c);_0x4194f1(_0x242b6e['error'](0x1f4,_0x9b9363[_0x1149('0x11')]));});});};
\ No newline at end of file
+var _0x2238=['util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','client','then','info','SmsQueueReport,\x20%s,\x20%s','request\x20sent','SmsQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','CreateSmsQueueReport','SmsQueueReport','create','body','debug','UpdateSmsQueueReport','options','raw','where','attributes','limit','lodash'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0x2238,0x11f));var _0x8223=function(_0x11ae90,_0x264184){_0x11ae90=_0x11ae90-0x0;var _0x9bf663=_0x2238[_0x11ae90];return _0x9bf663;};'use strict';var _=require(_0x8223('0x0'));var util=require(_0x8223('0x1'));var moment=require(_0x8223('0x2'));var BPromise=require(_0x8223('0x3'));var rs=require(_0x8223('0x4'));var fs=require('fs');var Redis=require(_0x8223('0x5'));var db=require(_0x8223('0x6'))['db'];var utils=require(_0x8223('0x7'));var logger=require(_0x8223('0x8'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x8223('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x39c133,_0x2d17cb,_0x21beac){return new BPromise(function(_0x446092,_0x390933){return client['request'](_0x39c133,_0x21beac)[_0x8223('0xa')](function(_0x279de9){logger[_0x8223('0xb')](_0x8223('0xc'),_0x2d17cb,_0x8223('0xd'));logger['debug'](_0x8223('0xe'),_0x2d17cb,'request\x20sent',JSON[_0x8223('0xf')](_0x279de9));if(_0x279de9['error']){if(_0x279de9[_0x8223('0x10')][_0x8223('0x11')]===0x1f4){logger['error'](_0x8223('0xc'),_0x2d17cb,_0x279de9[_0x8223('0x10')][_0x8223('0x12')]);return _0x390933(_0x279de9[_0x8223('0x10')]['message']);}logger[_0x8223('0x10')](_0x8223('0xc'),_0x2d17cb,_0x279de9[_0x8223('0x10')]['message']);return _0x446092(_0x279de9[_0x8223('0x10')][_0x8223('0x12')]);}else{logger['info']('SmsQueueReport,\x20%s,\x20%s',_0x2d17cb,_0x8223('0xd'));_0x446092(_0x279de9[_0x8223('0x13')][_0x8223('0x12')]);}})[_0x8223('0x14')](function(_0x2c47c3){logger['error'](_0x8223('0xc'),_0x2d17cb,_0x2c47c3);_0x390933(_0x2c47c3);});});}exports[_0x8223('0x15')]=function(_0x16586c){var _0x2e06f4=this;return new Promise(function(_0x2d41cf,_0x3765f7){return db[_0x8223('0x16')][_0x8223('0x17')](_0x16586c[_0x8223('0x18')],{'raw':_0x16586c['options']?_0x16586c['options']['raw']===undefined?!![]:![]:!![]})[_0x8223('0xa')](function(_0x3062b4){logger[_0x8223('0xb')](_0x8223('0x15'),_0x16586c);logger[_0x8223('0x19')](_0x8223('0x15'),_0x16586c,JSON['stringify'](_0x3062b4));_0x2d41cf(_0x3062b4);})['catch'](function(_0x39090f){logger[_0x8223('0x10')](_0x8223('0x15'),_0x39090f[_0x8223('0x12')],_0x16586c);_0x3765f7(_0x2e06f4['error'](0x1f4,_0x39090f[_0x8223('0x12')]));});});};exports[_0x8223('0x1a')]=function(_0x16ff34){var _0x593e06=this;return new Promise(function(_0x45aa13,_0x5053a9){return db[_0x8223('0x16')]['update'](_0x16ff34[_0x8223('0x18')],{'raw':_0x16ff34[_0x8223('0x1b')]?_0x16ff34[_0x8223('0x1b')][_0x8223('0x1c')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x16ff34[_0x8223('0x1b')]?_0x16ff34['options'][_0x8223('0x1d')]||null:null,'attributes':_0x16ff34[_0x8223('0x1b')]?_0x16ff34[_0x8223('0x1b')][_0x8223('0x1e')]||null:null,'limit':_0x16ff34[_0x8223('0x1b')]?_0x16ff34['options'][_0x8223('0x1f')]||null:null})[_0x8223('0xa')](function(_0x478b5d){logger[_0x8223('0xb')]('UpdateSmsQueueReport',_0x16ff34);logger[_0x8223('0x19')](_0x8223('0x1a'),_0x16ff34,JSON[_0x8223('0xf')](_0x478b5d));_0x45aa13(_0x478b5d);})[_0x8223('0x14')](function(_0x96c23f){logger['error'](_0x8223('0x1a'),_0x96c23f['message'],_0x16ff34);_0x5053a9(_0x593e06['error'](0x1f4,_0x96c23f['message']));});});};
\ No newline at end of file
index 3324dc7..a185e37 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf2ca=['destroy','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','describe','/:id','show','create','put','delete'];(function(_0xc4001c,_0x1bf8f0){var _0x49f7bc=function(_0x1059b8){while(--_0x1059b8){_0xc4001c['push'](_0xc4001c['shift']());}};_0x49f7bc(++_0x1bf8f0);}(_0xf2ca,0x16a));var _0xaf2c=function(_0x494965,_0x48ace5){_0x494965=_0x494965-0x0;var _0x3e682e=_0xf2ca[_0x494965];return _0x3e682e;};'use strict';var multer=require(_0xaf2c('0x0'));var util=require(_0xaf2c('0x1'));var path=require(_0xaf2c('0x2'));var timeout=require('connect-timeout');var express=require(_0xaf2c('0x3'));var router=express[_0xaf2c('0x4')]();var fs_extra=require(_0xaf2c('0x5'));var auth=require(_0xaf2c('0x6'));var interaction=require(_0xaf2c('0x7'));var config=require(_0xaf2c('0x8'));var controller=require('./smsTransferReport.controller');router[_0xaf2c('0x9')]('/',auth[_0xaf2c('0xa')](),controller[_0xaf2c('0xb')]);router[_0xaf2c('0x9')]('/describe',auth[_0xaf2c('0xa')](),controller[_0xaf2c('0xc')]);router['get'](_0xaf2c('0xd'),auth['isAuthenticated'](),controller[_0xaf2c('0xe')]);router['post']('/',auth[_0xaf2c('0xa')](),controller[_0xaf2c('0xf')]);router[_0xaf2c('0x10')](_0xaf2c('0xd'),auth['isAuthenticated'](),controller['update']);router[_0xaf2c('0x11')](_0xaf2c('0xd'),auth[_0xaf2c('0xa')](),controller[_0xaf2c('0x12')]);module[_0xaf2c('0x13')]=router;
\ No newline at end of file
+var _0x3eea=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./smsTransferReport.controller','get','isAuthenticated','/describe','describe','/:id','show','create','put','update','destroy','exports','multer','path','connect-timeout','express'];(function(_0x2b57c1,_0x38603c){var _0x156094=function(_0x246ca5){while(--_0x246ca5){_0x2b57c1['push'](_0x2b57c1['shift']());}};_0x156094(++_0x38603c);}(_0x3eea,0x1ca));var _0xa3ee=function(_0xd80e12,_0x53c433){_0xd80e12=_0xd80e12-0x0;var _0x10cb7d=_0x3eea[_0xd80e12];return _0x10cb7d;};'use strict';var multer=require(_0xa3ee('0x0'));var util=require('util');var path=require(_0xa3ee('0x1'));var timeout=require(_0xa3ee('0x2'));var express=require(_0xa3ee('0x3'));var router=express[_0xa3ee('0x4')]();var fs_extra=require(_0xa3ee('0x5'));var auth=require(_0xa3ee('0x6'));var interaction=require(_0xa3ee('0x7'));var config=require(_0xa3ee('0x8'));var controller=require(_0xa3ee('0x9'));router[_0xa3ee('0xa')]('/',auth[_0xa3ee('0xb')](),controller['index']);router['get'](_0xa3ee('0xc'),auth['isAuthenticated'](),controller[_0xa3ee('0xd')]);router['get'](_0xa3ee('0xe'),auth['isAuthenticated'](),controller[_0xa3ee('0xf')]);router['post']('/',auth[_0xa3ee('0xb')](),controller[_0xa3ee('0x10')]);router[_0xa3ee('0x11')]('/:id',auth[_0xa3ee('0xb')](),controller[_0xa3ee('0x12')]);router['delete']('/:id',auth[_0xa3ee('0xb')](),controller[_0xa3ee('0x13')]);module[_0xa3ee('0x14')]=router;
\ No newline at end of file
index 8c8ce6f..951afa5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xedd9=['account','agent','queue','NOW','sequelize','exports','STRING','ENUM'];(function(_0x481b2f,_0x5331bb){var _0x2a97fd=function(_0x4adcef){while(--_0x4adcef){_0x481b2f['push'](_0x481b2f['shift']());}};_0x2a97fd(++_0x5331bb);}(_0xedd9,0xfc));var _0x9edd=function(_0x161b9a,_0x56cfab){_0x161b9a=_0x161b9a-0x0;var _0x1be4ab=_0xedd9[_0x161b9a];return _0x1be4ab;};'use strict';var moment=require('moment');var Sequelize=require(_0x9edd('0x0'));module[_0x9edd('0x1')]={'uniqueid':{'type':Sequelize[_0x9edd('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0x9edd('0x3')](_0x9edd('0x4'),_0x9edd('0x5'),_0x9edd('0x6')),'allowNull':![],'defaultValue':_0x9edd('0x6')},'transferredAt':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':Sequelize[_0x9edd('0x7')]}};
\ No newline at end of file
+var _0xcb91=['STRING','ENUM','account','queue','NOW','exports'];(function(_0x2a7be1,_0x172286){var _0x483a8e=function(_0x1dbffa){while(--_0x1dbffa){_0x2a7be1['push'](_0x2a7be1['shift']());}};_0x483a8e(++_0x172286);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x1147ab,_0x10e72b){_0x1147ab=_0x1147ab-0x0;var _0x55cb5a=_0xcb91[_0x1147ab];return _0x55cb5a;};'use strict';var moment=require('moment');var Sequelize=require('sequelize');module[_0x1cb9('0x0')]={'uniqueid':{'type':Sequelize[_0x1cb9('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0x1cb9('0x2')](_0x1cb9('0x3'),'agent',_0x1cb9('0x4')),'allowNull':![],'defaultValue':_0x1cb9('0x4')},'transferredAt':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':Sequelize[_0x1cb9('0x5')]}};
\ No newline at end of file
index bf85307..7a91798 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3250=['set','Content-Range','apply','save','update','then','destroy','end','stack','name','send','index','map','SmsTransferReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','order','filter','where','merge','options','include','findAll','rows','catch','params','includeAll','create','body','find','describe','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','json','offset','undefined','limit','count'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3250,0xbe));var _0x0325=function(_0x3d987b,_0x2a9a4f){_0x3d987b=_0x3d987b-0x0;var _0x588447=_0x3250[_0x3d987b];return _0x588447;};'use strict';var emlformat=require(_0x0325('0x0'));var rimraf=require(_0x0325('0x1'));var zipdir=require(_0x0325('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x0325('0x3'));var moment=require(_0x0325('0x4'));var BPromise=require(_0x0325('0x5'));var Mustache=require(_0x0325('0x6'));var util=require('util');var path=require(_0x0325('0x7'));var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x0325('0x8'));var fs=require('fs');var fs_extra=require(_0x0325('0x9'));var _=require(_0x0325('0xa'));var squel=require(_0x0325('0xb'));var crypto=require(_0x0325('0xc'));var jsforce=require(_0x0325('0xd'));var deskjs=require(_0x0325('0xe'));var toCsv=require(_0x0325('0xf'));var querystring=require(_0x0325('0x10'));var Papa=require(_0x0325('0x11'));var Redis=require(_0x0325('0x12'));var authService=require('../../components/auth/service');var qs=require(_0x0325('0x13'));var as=require(_0x0325('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0x0325('0x15'))(_0x0325('0x16'));var utils=require(_0x0325('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0x0325('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x218f43,_0x52c777){_0x52c777=_0x52c777||0xcc;return function(_0x367dd9){if(_0x367dd9){return _0x218f43[_0x0325('0x19')](_0x52c777);}return _0x218f43[_0x0325('0x1a')](_0x52c777)['end']();};}function respondWithResult(_0x51db5e,_0x2f1b84){_0x2f1b84=_0x2f1b84||0xc8;return function(_0x49aad0){if(_0x49aad0){return _0x51db5e[_0x0325('0x1a')](_0x2f1b84)[_0x0325('0x1b')](_0x49aad0);}};}function respondWithFilteredResult(_0x3ba830,_0xf2858b){return function(_0x316c97){if(_0x316c97){var _0x889ec6=typeof _0xf2858b[_0x0325('0x1c')]===_0x0325('0x1d')&&typeof _0xf2858b[_0x0325('0x1e')]===_0x0325('0x1d');var _0x35ff7c=_0x316c97['count'];var _0x453079=_0x889ec6?0x0:_0xf2858b[_0x0325('0x1c')];var _0x1fdcf4=_0x889ec6?_0x316c97[_0x0325('0x1f')]:_0xf2858b[_0x0325('0x1c')]+_0xf2858b[_0x0325('0x1e')];var _0x202fbe;if(_0x1fdcf4>=_0x35ff7c){_0x1fdcf4=_0x35ff7c;_0x202fbe=0xc8;}else{_0x202fbe=0xce;}_0x3ba830['status'](_0x202fbe);return _0x3ba830[_0x0325('0x20')](_0x0325('0x21'),_0x453079+'-'+_0x1fdcf4+'/'+_0x35ff7c)[_0x0325('0x1b')](_0x316c97);}return null;};}function patchUpdates(_0x359e6e){return function(_0x30cfc6){try{jsonpatch[_0x0325('0x22')](_0x30cfc6,_0x359e6e,!![]);}catch(_0x2ee39b){return BPromise['reject'](_0x2ee39b);}return _0x30cfc6[_0x0325('0x23')]();};}function saveUpdates(_0x4b14ed,_0x4975e7){return function(_0x439bc9){if(_0x439bc9){return _0x439bc9[_0x0325('0x24')](_0x4b14ed)[_0x0325('0x25')](function(_0x3778b4){return _0x3778b4;});}return null;};}function removeEntity(_0x3cd7ac,_0x56681a){return function(_0x5ce98b){if(_0x5ce98b){return _0x5ce98b[_0x0325('0x26')]()['then'](function(){_0x3cd7ac[_0x0325('0x1a')](0xcc)[_0x0325('0x27')]();});}};}function handleEntityNotFound(_0x430564,_0x2e1bcf){return function(_0xfd9ec){if(!_0xfd9ec){_0x430564['sendStatus'](0x194);}return _0xfd9ec;};}function handleError(_0x22c0a9,_0x48e0c0){_0x48e0c0=_0x48e0c0||0x1f4;return function(_0x551c40){logger['error'](_0x551c40[_0x0325('0x28')]);if(_0x551c40[_0x0325('0x29')]){delete _0x551c40[_0x0325('0x29')];}_0x22c0a9['status'](_0x48e0c0)[_0x0325('0x2a')](_0x551c40);};}exports[_0x0325('0x2b')]=function(_0x1ade68,_0x244f39){var _0x12c8cc={},_0x1c5f06={},_0x8bd7b5={'count':0x0,'rows':[]};var _0x2ab863=_[_0x0325('0x2c')](db[_0x0325('0x2d')][_0x0325('0x2e')],function(_0x2bc71d){return{'name':_0x2bc71d[_0x0325('0x2f')],'type':_0x2bc71d[_0x0325('0x30')][_0x0325('0x31')]};});_0x1c5f06[_0x0325('0x32')]=_[_0x0325('0x2c')](_0x2ab863,_0x0325('0x29'));_0x1c5f06[_0x0325('0x33')]=_[_0x0325('0x34')](_0x1ade68[_0x0325('0x33')]);_0x1c5f06[_0x0325('0x35')]=_[_0x0325('0x36')](_0x1c5f06['model'],_0x1c5f06[_0x0325('0x33')]);_0x12c8cc['attributes']=_['intersection'](_0x1c5f06[_0x0325('0x32')],qs[_0x0325('0x37')](_0x1ade68[_0x0325('0x33')][_0x0325('0x37')]));_0x12c8cc[_0x0325('0x38')]=_0x12c8cc[_0x0325('0x38')][_0x0325('0x39')]?_0x12c8cc[_0x0325('0x38')]:_0x1c5f06[_0x0325('0x32')];if(!_0x1ade68['query'][_0x0325('0x3a')]('nolimit')){_0x12c8cc[_0x0325('0x1e')]=qs[_0x0325('0x1e')](_0x1ade68[_0x0325('0x33')][_0x0325('0x1e')]);_0x12c8cc[_0x0325('0x1c')]=qs['offset'](_0x1ade68[_0x0325('0x33')][_0x0325('0x1c')]);}_0x12c8cc[_0x0325('0x3b')]=qs['sort'](_0x1ade68['query']['sort']);_0x12c8cc['where']=qs['filters'](_['pick'](_0x1ade68[_0x0325('0x33')],_0x1c5f06[_0x0325('0x35')]),_0x2ab863);if(_0x1ade68[_0x0325('0x33')][_0x0325('0x3c')]){_0x12c8cc[_0x0325('0x3d')]=_['merge'](_0x12c8cc[_0x0325('0x3d')],{'$or':_['map'](_0x2ab863,function(_0xbdf5f1){if(_0xbdf5f1[_0x0325('0x30')]!=='VIRTUAL'){var _0x48cab1={};_0x48cab1[_0xbdf5f1[_0x0325('0x29')]]={'$like':'%'+_0x1ade68[_0x0325('0x33')][_0x0325('0x3c')]+'%'};return _0x48cab1;}})});}_0x12c8cc=_[_0x0325('0x3e')]({},_0x12c8cc,_0x1ade68[_0x0325('0x3f')]);var _0x486c80={'where':_0x12c8cc[_0x0325('0x3d')]};return db['SmsTransferReport'][_0x0325('0x1f')](_0x486c80)[_0x0325('0x25')](function(_0x13dfbd){_0x8bd7b5[_0x0325('0x1f')]=_0x13dfbd;if(_0x1ade68[_0x0325('0x33')]['includeAll']){_0x12c8cc[_0x0325('0x40')]=[{'all':!![]}];}return db['SmsTransferReport'][_0x0325('0x41')](_0x12c8cc);})[_0x0325('0x25')](function(_0x356154){_0x8bd7b5[_0x0325('0x42')]=_0x356154;return _0x8bd7b5;})['then'](respondWithFilteredResult(_0x244f39,_0x12c8cc))[_0x0325('0x43')](handleError(_0x244f39,null));};exports['show']=function(_0x52e807,_0x1c089e){var _0x555da6={'raw':!![],'where':{'id':_0x52e807[_0x0325('0x44')]['id']}},_0x288d4f={};_0x288d4f['model']=_[_0x0325('0x34')](db[_0x0325('0x2d')][_0x0325('0x2e')]);_0x288d4f[_0x0325('0x33')]=_[_0x0325('0x34')](_0x52e807[_0x0325('0x33')]);_0x288d4f[_0x0325('0x35')]=_[_0x0325('0x36')](_0x288d4f[_0x0325('0x32')],_0x288d4f[_0x0325('0x33')]);_0x555da6[_0x0325('0x38')]=_[_0x0325('0x36')](_0x288d4f[_0x0325('0x32')],qs[_0x0325('0x37')](_0x52e807[_0x0325('0x33')][_0x0325('0x37')]));_0x555da6[_0x0325('0x38')]=_0x555da6[_0x0325('0x38')][_0x0325('0x39')]?_0x555da6[_0x0325('0x38')]:_0x288d4f['model'];if(_0x52e807[_0x0325('0x33')][_0x0325('0x45')]){_0x555da6[_0x0325('0x40')]=[{'all':!![]}];}_0x555da6=_['merge']({},_0x555da6,_0x52e807[_0x0325('0x3f')]);return db[_0x0325('0x2d')]['find'](_0x555da6)[_0x0325('0x25')](handleEntityNotFound(_0x1c089e,null))[_0x0325('0x25')](respondWithResult(_0x1c089e,null))[_0x0325('0x43')](handleError(_0x1c089e,null));};exports[_0x0325('0x46')]=function(_0x146d22,_0x191143){return db[_0x0325('0x2d')][_0x0325('0x46')](_0x146d22[_0x0325('0x47')],{})['then'](respondWithResult(_0x191143,0xc9))[_0x0325('0x43')](handleError(_0x191143,null));};exports[_0x0325('0x24')]=function(_0x5e3f99,_0x285bbb){if(_0x5e3f99[_0x0325('0x47')]['id']){delete _0x5e3f99[_0x0325('0x47')]['id'];}return db[_0x0325('0x2d')][_0x0325('0x48')]({'where':{'id':_0x5e3f99['params']['id']}})['then'](handleEntityNotFound(_0x285bbb,null))[_0x0325('0x25')](saveUpdates(_0x5e3f99[_0x0325('0x47')],null))[_0x0325('0x25')](respondWithResult(_0x285bbb,null))['catch'](handleError(_0x285bbb,null));};exports[_0x0325('0x26')]=function(_0x52b0ce,_0x54af8b){return db[_0x0325('0x2d')][_0x0325('0x48')]({'where':{'id':_0x52b0ce[_0x0325('0x44')]['id']}})[_0x0325('0x25')](handleEntityNotFound(_0x54af8b,null))[_0x0325('0x25')](removeEntity(_0x54af8b,null))[_0x0325('0x43')](handleError(_0x54af8b,null));};exports[_0x0325('0x49')]=function(_0x2b69c7,_0x94e871){return db[_0x0325('0x2d')][_0x0325('0x49')]()[_0x0325('0x25')](respondWithResult(_0x94e871,null))[_0x0325('0x43')](handleError(_0x94e871,null));};
\ No newline at end of file
+var _0x6773=['request-promise','moment','bluebird','path','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','send','index','map','SmsTransferReport','rawAttributes','fieldName','type','key','model','name','query','keys','intersection','attributes','fields','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','includeAll','include','catch','params','length','find','create','body','describe','eml-format','fast-json-patch'];(function(_0x2be0b6,_0xec5feb){var _0x159c43=function(_0x247189){while(--_0x247189){_0x2be0b6['push'](_0x2be0b6['shift']());}};_0x159c43(++_0xec5feb);}(_0x6773,0x16b));var _0x3677=function(_0x53538f,_0x3b129d){_0x53538f=_0x53538f-0x0;var _0x4a5ffc=_0x6773[_0x53538f];return _0x4a5ffc;};'use strict';var emlformat=require(_0x3677('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x3677('0x1'));var rp=require(_0x3677('0x2'));var moment=require(_0x3677('0x3'));var BPromise=require(_0x3677('0x4'));var Mustache=require('mustache');var util=require('util');var path=require(_0x3677('0x5'));var sox=require(_0x3677('0x6'));var csv=require(_0x3677('0x7'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x3677('0x8'));var squel=require(_0x3677('0x9'));var crypto=require(_0x3677('0xa'));var jsforce=require(_0x3677('0xb'));var deskjs=require(_0x3677('0xc'));var toCsv=require(_0x3677('0x7'));var querystring=require(_0x3677('0xd'));var Papa=require('papaparse');var Redis=require(_0x3677('0xe'));var authService=require(_0x3677('0xf'));var qs=require(_0x3677('0x10'));var as=require(_0x3677('0x11'));var hardwareService=require(_0x3677('0x12'));var logger=require(_0x3677('0x13'))('api');var utils=require('../../config/utils');var config=require(_0x3677('0x14'));var licenseUtil=require(_0x3677('0x15'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x5537d6,_0x2203f6){_0x2203f6=_0x2203f6||0xcc;return function(_0x557be0){if(_0x557be0){return _0x5537d6[_0x3677('0x16')](_0x2203f6);}return _0x5537d6[_0x3677('0x17')](_0x2203f6)[_0x3677('0x18')]();};}function respondWithResult(_0x4e61b5,_0x1b59bc){_0x1b59bc=_0x1b59bc||0xc8;return function(_0x42a85a){if(_0x42a85a){return _0x4e61b5['status'](_0x1b59bc)[_0x3677('0x19')](_0x42a85a);}};}function respondWithFilteredResult(_0x3d863f,_0x3d3c2c){return function(_0xdd9237){if(_0xdd9237){var _0x4f56e6=typeof _0x3d3c2c[_0x3677('0x1a')]===_0x3677('0x1b')&&typeof _0x3d3c2c[_0x3677('0x1c')]===_0x3677('0x1b');var _0x591779=_0xdd9237['count'];var _0x1a7af8=_0x4f56e6?0x0:_0x3d3c2c[_0x3677('0x1a')];var _0x5666e5=_0x4f56e6?_0xdd9237[_0x3677('0x1d')]:_0x3d3c2c['offset']+_0x3d3c2c[_0x3677('0x1c')];var _0x2bbcd3;if(_0x5666e5>=_0x591779){_0x5666e5=_0x591779;_0x2bbcd3=0xc8;}else{_0x2bbcd3=0xce;}_0x3d863f[_0x3677('0x17')](_0x2bbcd3);return _0x3d863f[_0x3677('0x1e')](_0x3677('0x1f'),_0x1a7af8+'-'+_0x5666e5+'/'+_0x591779)[_0x3677('0x19')](_0xdd9237);}return null;};}function patchUpdates(_0x58d4a7){return function(_0xa3bbfa){try{jsonpatch[_0x3677('0x20')](_0xa3bbfa,_0x58d4a7,!![]);}catch(_0x1bf191){return BPromise[_0x3677('0x21')](_0x1bf191);}return _0xa3bbfa[_0x3677('0x22')]();};}function saveUpdates(_0x186f78,_0x34bef5){return function(_0xf06e88){if(_0xf06e88){return _0xf06e88[_0x3677('0x23')](_0x186f78)[_0x3677('0x24')](function(_0x5710d5){return _0x5710d5;});}return null;};}function removeEntity(_0x53bffb,_0x3119e8){return function(_0x37ab31){if(_0x37ab31){return _0x37ab31[_0x3677('0x25')]()[_0x3677('0x24')](function(){_0x53bffb[_0x3677('0x17')](0xcc)[_0x3677('0x18')]();});}};}function handleEntityNotFound(_0x421f89,_0x9eee30){return function(_0x36be27){if(!_0x36be27){_0x421f89[_0x3677('0x16')](0x194);}return _0x36be27;};}function handleError(_0x3eb876,_0x3d2e47){_0x3d2e47=_0x3d2e47||0x1f4;return function(_0x55aaf7){logger[_0x3677('0x26')](_0x55aaf7[_0x3677('0x27')]);if(_0x55aaf7['name']){delete _0x55aaf7['name'];}_0x3eb876[_0x3677('0x17')](_0x3d2e47)[_0x3677('0x28')](_0x55aaf7);};}exports[_0x3677('0x29')]=function(_0x81dba4,_0x5e3032){var _0xe72b90={},_0x4e9e3e={},_0x17ecdb={'count':0x0,'rows':[]};var _0xb8ac3a=_[_0x3677('0x2a')](db[_0x3677('0x2b')][_0x3677('0x2c')],function(_0xfcccc1){return{'name':_0xfcccc1[_0x3677('0x2d')],'type':_0xfcccc1[_0x3677('0x2e')][_0x3677('0x2f')]};});_0x4e9e3e[_0x3677('0x30')]=_[_0x3677('0x2a')](_0xb8ac3a,_0x3677('0x31'));_0x4e9e3e[_0x3677('0x32')]=_[_0x3677('0x33')](_0x81dba4[_0x3677('0x32')]);_0x4e9e3e['filters']=_[_0x3677('0x34')](_0x4e9e3e[_0x3677('0x30')],_0x4e9e3e[_0x3677('0x32')]);_0xe72b90[_0x3677('0x35')]=_[_0x3677('0x34')](_0x4e9e3e['model'],qs['fields'](_0x81dba4[_0x3677('0x32')][_0x3677('0x36')]));_0xe72b90[_0x3677('0x35')]=_0xe72b90[_0x3677('0x35')]['length']?_0xe72b90['attributes']:_0x4e9e3e['model'];if(!_0x81dba4[_0x3677('0x32')]['hasOwnProperty'](_0x3677('0x37'))){_0xe72b90[_0x3677('0x1c')]=qs[_0x3677('0x1c')](_0x81dba4[_0x3677('0x32')]['limit']);_0xe72b90['offset']=qs[_0x3677('0x1a')](_0x81dba4[_0x3677('0x32')][_0x3677('0x1a')]);}_0xe72b90[_0x3677('0x38')]=qs[_0x3677('0x39')](_0x81dba4[_0x3677('0x32')]['sort']);_0xe72b90[_0x3677('0x3a')]=qs[_0x3677('0x3b')](_[_0x3677('0x3c')](_0x81dba4['query'],_0x4e9e3e[_0x3677('0x3b')]),_0xb8ac3a);if(_0x81dba4['query'][_0x3677('0x3d')]){_0xe72b90[_0x3677('0x3a')]=_[_0x3677('0x3e')](_0xe72b90[_0x3677('0x3a')],{'$or':_[_0x3677('0x2a')](_0xb8ac3a,function(_0x34b28a){if(_0x34b28a[_0x3677('0x2e')]!==_0x3677('0x3f')){var _0x3bcc9c={};_0x3bcc9c[_0x34b28a[_0x3677('0x31')]]={'$like':'%'+_0x81dba4[_0x3677('0x32')]['filter']+'%'};return _0x3bcc9c;}})});}_0xe72b90=_[_0x3677('0x3e')]({},_0xe72b90,_0x81dba4['options']);var _0x2ec682={'where':_0xe72b90[_0x3677('0x3a')]};return db[_0x3677('0x2b')]['count'](_0x2ec682)['then'](function(_0x566f4f){_0x17ecdb['count']=_0x566f4f;if(_0x81dba4[_0x3677('0x32')][_0x3677('0x40')]){_0xe72b90[_0x3677('0x41')]=[{'all':!![]}];}return db[_0x3677('0x2b')]['findAll'](_0xe72b90);})[_0x3677('0x24')](function(_0x112135){_0x17ecdb['rows']=_0x112135;return _0x17ecdb;})[_0x3677('0x24')](respondWithFilteredResult(_0x5e3032,_0xe72b90))[_0x3677('0x42')](handleError(_0x5e3032,null));};exports['show']=function(_0x128cd3,_0x7081ce){var _0x36d746={'raw':!![],'where':{'id':_0x128cd3[_0x3677('0x43')]['id']}},_0x5e802f={};_0x5e802f[_0x3677('0x30')]=_[_0x3677('0x33')](db[_0x3677('0x2b')][_0x3677('0x2c')]);_0x5e802f[_0x3677('0x32')]=_[_0x3677('0x33')](_0x128cd3[_0x3677('0x32')]);_0x5e802f[_0x3677('0x3b')]=_[_0x3677('0x34')](_0x5e802f[_0x3677('0x30')],_0x5e802f[_0x3677('0x32')]);_0x36d746[_0x3677('0x35')]=_['intersection'](_0x5e802f[_0x3677('0x30')],qs[_0x3677('0x36')](_0x128cd3[_0x3677('0x32')]['fields']));_0x36d746[_0x3677('0x35')]=_0x36d746[_0x3677('0x35')][_0x3677('0x44')]?_0x36d746[_0x3677('0x35')]:_0x5e802f[_0x3677('0x30')];if(_0x128cd3[_0x3677('0x32')][_0x3677('0x40')]){_0x36d746[_0x3677('0x41')]=[{'all':!![]}];}_0x36d746=_[_0x3677('0x3e')]({},_0x36d746,_0x128cd3['options']);return db['SmsTransferReport'][_0x3677('0x45')](_0x36d746)['then'](handleEntityNotFound(_0x7081ce,null))[_0x3677('0x24')](respondWithResult(_0x7081ce,null))[_0x3677('0x42')](handleError(_0x7081ce,null));};exports['create']=function(_0x4fe50d,_0x418954){return db[_0x3677('0x2b')][_0x3677('0x46')](_0x4fe50d['body'],{})[_0x3677('0x24')](respondWithResult(_0x418954,0xc9))[_0x3677('0x42')](handleError(_0x418954,null));};exports[_0x3677('0x23')]=function(_0x428419,_0x2bf960){if(_0x428419[_0x3677('0x47')]['id']){delete _0x428419[_0x3677('0x47')]['id'];}return db[_0x3677('0x2b')][_0x3677('0x45')]({'where':{'id':_0x428419[_0x3677('0x43')]['id']}})['then'](handleEntityNotFound(_0x2bf960,null))[_0x3677('0x24')](saveUpdates(_0x428419[_0x3677('0x47')],null))['then'](respondWithResult(_0x2bf960,null))[_0x3677('0x42')](handleError(_0x2bf960,null));};exports[_0x3677('0x25')]=function(_0x245eeb,_0x166344){return db[_0x3677('0x2b')][_0x3677('0x45')]({'where':{'id':_0x245eeb[_0x3677('0x43')]['id']}})[_0x3677('0x24')](handleEntityNotFound(_0x166344,null))[_0x3677('0x24')](removeEntity(_0x166344,null))[_0x3677('0x42')](handleError(_0x166344,null));};exports['describe']=function(_0x5c0dd6,_0x5b27e4){return db[_0x3677('0x2b')][_0x3677('0x48')]()[_0x3677('0x24')](respondWithResult(_0x5b27e4,null))[_0x3677('0x42')](handleError(_0x5b27e4,null));};
\ No newline at end of file
index 63f5d14..b01d9ca 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa48b=['../../config/logger','bluebird','rimraf','../../config/environment','./smsTransferReport.attributes','report_sms_transfer','uniqueid','lodash','util'];(function(_0x122096,_0x60c295){var _0x3d1966=function(_0x3d569e){while(--_0x3d569e){_0x122096['push'](_0x122096['shift']());}};_0x3d1966(++_0x60c295);}(_0xa48b,0xc4));var _0xba48=function(_0x52e422,_0x2b4a02){_0x52e422=_0x52e422-0x0;var _0xec4089=_0xa48b[_0x52e422];return _0xec4089;};'use strict';var _=require(_0xba48('0x0'));var util=require(_0xba48('0x1'));var logger=require(_0xba48('0x2'))('api');var moment=require('moment');var BPromise=require(_0xba48('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xba48('0x4'));var config=require(_0xba48('0x5'));var attributes=require(_0xba48('0x6'));module['exports']=function(_0x10c8c0,_0x297568){return _0x10c8c0['define']('SmsTransferReport',attributes,{'tableName':_0xba48('0x7'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0xba48('0x8')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x6817=['bluebird','path','rimraf','../../config/environment','./smsTransferReport.attributes','exports','define','SmsTransferReport','report_sms_transfer','uniqueid','util','../../config/logger','api','moment'];(function(_0x17b331,_0x15a809){var _0x1ef0d5=function(_0x576a49){while(--_0x576a49){_0x17b331['push'](_0x17b331['shift']());}};_0x1ef0d5(++_0x15a809);}(_0x6817,0xf8));var _0x7681=function(_0x299eb6,_0x20fd6f){_0x299eb6=_0x299eb6-0x0;var _0x4ce3d5=_0x6817[_0x299eb6];return _0x4ce3d5;};'use strict';var _=require('lodash');var util=require(_0x7681('0x0'));var logger=require(_0x7681('0x1'))(_0x7681('0x2'));var moment=require(_0x7681('0x3'));var BPromise=require(_0x7681('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x7681('0x5'));var rimraf=require(_0x7681('0x6'));var config=require(_0x7681('0x7'));var attributes=require(_0x7681('0x8'));module[_0x7681('0x9')]=function(_0x3f8b86,_0x1688f4){return _0x3f8b86[_0x7681('0xa')](_0x7681('0xb'),attributes,{'tableName':_0x7681('0xc'),'paranoid':![],'indexes':[{'name':_0x7681('0xd'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
index f71d18a..db3197c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x61df=['request','then','info','SmsTransferReport,\x20%s,\x20%s','request\x20sent','debug','SmsTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http'];(function(_0x9db4,_0x82af81){var _0x26feae=function(_0x49eec2){while(--_0x49eec2){_0x9db4['push'](_0x9db4['shift']());}};_0x26feae(++_0x82af81);}(_0x61df,0xbd));var _0xf61d=function(_0x14c193,_0x35dced){_0x14c193=_0x14c193-0x0;var _0x45ea21=_0x61df[_0x14c193];return _0x45ea21;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xf61d('0x0'));var rs=require(_0xf61d('0x1'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf61d('0x2'))['db'];var utils=require(_0xf61d('0x3'));var logger=require('../../config/logger')(_0xf61d('0x4'));var config=require(_0xf61d('0x5'));var jayson=require(_0xf61d('0x6'));var client=jayson[_0xf61d('0x7')][_0xf61d('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x3ac0ec,_0x5f0981,_0x42b382){return new BPromise(function(_0x49523e,_0x32ad93){return client[_0xf61d('0x9')](_0x3ac0ec,_0x42b382)[_0xf61d('0xa')](function(_0x1a5f29){logger[_0xf61d('0xb')](_0xf61d('0xc'),_0x5f0981,_0xf61d('0xd'));logger[_0xf61d('0xe')](_0xf61d('0xf'),_0x5f0981,_0xf61d('0xd'),JSON[_0xf61d('0x10')](_0x1a5f29));if(_0x1a5f29[_0xf61d('0x11')]){if(_0x1a5f29['error'][_0xf61d('0x12')]===0x1f4){logger['error']('SmsTransferReport,\x20%s,\x20%s',_0x5f0981,_0x1a5f29[_0xf61d('0x11')]['message']);return _0x32ad93(_0x1a5f29['error']['message']);}logger[_0xf61d('0x11')]('SmsTransferReport,\x20%s,\x20%s',_0x5f0981,_0x1a5f29['error'][_0xf61d('0x13')]);return _0x49523e(_0x1a5f29[_0xf61d('0x11')][_0xf61d('0x13')]);}else{logger[_0xf61d('0xb')]('SmsTransferReport,\x20%s,\x20%s',_0x5f0981,_0xf61d('0xd'));_0x49523e(_0x1a5f29[_0xf61d('0x14')][_0xf61d('0x13')]);}})[_0xf61d('0x15')](function(_0x51405a){logger['error'](_0xf61d('0xc'),_0x5f0981,_0x51405a);_0x32ad93(_0x51405a);});});}
\ No newline at end of file
+var _0x975f=['client','http','request','info','request\x20sent','debug','SmsTransferReport,\x20%s,\x20%s,\x20%s','stringify','error','SmsTransferReport,\x20%s,\x20%s','message','result','catch','lodash','util','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment'];(function(_0x44869f,_0x5b885f){var _0x406374=function(_0x2af400){while(--_0x2af400){_0x44869f['push'](_0x44869f['shift']());}};_0x406374(++_0x5b885f);}(_0x975f,0x109));var _0xf975=function(_0x4704dc,_0x575a5f){_0x4704dc=_0x4704dc-0x0;var _0x254d81=_0x975f[_0x4704dc];return _0x254d81;};'use strict';var _=require(_0xf975('0x0'));var util=require(_0xf975('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0xf975('0x2'));var fs=require('fs');var Redis=require(_0xf975('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0xf975('0x4'));var logger=require(_0xf975('0x5'))(_0xf975('0x6'));var config=require(_0xf975('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xf975('0x8')][_0xf975('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x36f6cf,_0x2018ea,_0x51a37c){return new BPromise(function(_0x194d30,_0x43cf7a){return client[_0xf975('0xa')](_0x36f6cf,_0x51a37c)['then'](function(_0x2e2ab1){logger[_0xf975('0xb')]('SmsTransferReport,\x20%s,\x20%s',_0x2018ea,_0xf975('0xc'));logger[_0xf975('0xd')](_0xf975('0xe'),_0x2018ea,_0xf975('0xc'),JSON[_0xf975('0xf')](_0x2e2ab1));if(_0x2e2ab1[_0xf975('0x10')]){if(_0x2e2ab1[_0xf975('0x10')]['code']===0x1f4){logger[_0xf975('0x10')](_0xf975('0x11'),_0x2018ea,_0x2e2ab1['error'][_0xf975('0x12')]);return _0x43cf7a(_0x2e2ab1[_0xf975('0x10')][_0xf975('0x12')]);}logger[_0xf975('0x10')](_0xf975('0x11'),_0x2018ea,_0x2e2ab1[_0xf975('0x10')][_0xf975('0x12')]);return _0x194d30(_0x2e2ab1['error'][_0xf975('0x12')]);}else{logger['info']('SmsTransferReport,\x20%s,\x20%s',_0x2018ea,_0xf975('0xc'));_0x194d30(_0x2e2ab1[_0xf975('0x13')][_0xf975('0x12')]);}})[_0xf975('0x14')](function(_0x300312){logger[_0xf975('0x10')](_0xf975('0x11'),_0x2018ea,_0x300312);_0x43cf7a(_0x300312);});});}
\ No newline at end of file
index a48191e..db805b9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x02e9=['util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','/:id','show','download','diskStorage','root','originalname','replace','format','%s-%s%s','extname','single','update','delete','exports','multer'];(function(_0x486e6f,_0x395450){var _0x104212=function(_0x368754){while(--_0x368754){_0x486e6f['push'](_0x486e6f['shift']());}};_0x104212(++_0x395450);}(_0x02e9,0x16b));var _0x902e=function(_0x509469,_0x45e997){_0x509469=_0x509469-0x0;var _0x317ba4=_0x02e9[_0x509469];return _0x317ba4;};'use strict';var multer=require(_0x902e('0x0'));var util=require(_0x902e('0x1'));var path=require(_0x902e('0x2'));var timeout=require(_0x902e('0x3'));var express=require(_0x902e('0x4'));var router=express[_0x902e('0x5')]();var fs_extra=require(_0x902e('0x6'));var auth=require(_0x902e('0x7'));var interaction=require(_0x902e('0x8'));var config=require('../../config/environment');var controller=require('./sound.controller');router[_0x902e('0x9')]('/',auth[_0x902e('0xa')](),controller[_0x902e('0xb')]);router['get'](_0x902e('0xc'),auth['isAuthenticated'](),controller[_0x902e('0xd')]);router['get']('/:id/download',auth[_0x902e('0xa')](),controller[_0x902e('0xe')]);var upload=multer({'storage':multer[_0x902e('0xf')]({'destination':function(_0x5ada20,_0x492069,_0x31de8d){_0x31de8d(null,path['join'](config[_0x902e('0x10')],'server/files/sounds/original/'));},'filename':function(_0x4e4372,_0x1eed15,_0x57cf95){_0x1eed15[_0x902e('0x11')]=_0x1eed15['originalname'][_0x902e('0x12')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x57cf95(null,util[_0x902e('0x13')](_0x902e('0x14'),path['basename'](_0x1eed15[_0x902e('0x11')],path[_0x902e('0x15')](_0x1eed15[_0x902e('0x11')])),Date['now'](),path[_0x902e('0x15')](_0x1eed15[_0x902e('0x11')])));}})});router['post']('/',upload[_0x902e('0x16')]('file'),controller['create']);router['put'](_0x902e('0xc'),auth[_0x902e('0xa')](),controller[_0x902e('0x17')]);router[_0x902e('0x18')](_0x902e('0xc'),auth[_0x902e('0xa')](),controller[_0x902e('0x18')]);module[_0x902e('0x19')]=router;
\ No newline at end of file
+var _0x0c12=['delete','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./sound.controller','get','isAuthenticated','index','/:id','show','join','originalname','replace','%s-%s%s','basename','extname','now','single','create','update'];(function(_0x1ac595,_0x5d2081){var _0x455fff=function(_0x3043ee){while(--_0x3043ee){_0x1ac595['push'](_0x1ac595['shift']());}};_0x455fff(++_0x5d2081);}(_0x0c12,0x153));var _0x20c1=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0x0c12[_0x57b54c];return _0x59cc19;};'use strict';var multer=require(_0x20c1('0x0'));var util=require('util');var path=require(_0x20c1('0x1'));var timeout=require(_0x20c1('0x2'));var express=require(_0x20c1('0x3'));var router=express[_0x20c1('0x4')]();var fs_extra=require(_0x20c1('0x5'));var auth=require(_0x20c1('0x6'));var interaction=require(_0x20c1('0x7'));var config=require(_0x20c1('0x8'));var controller=require(_0x20c1('0x9'));router[_0x20c1('0xa')]('/',auth[_0x20c1('0xb')](),controller[_0x20c1('0xc')]);router[_0x20c1('0xa')](_0x20c1('0xd'),auth[_0x20c1('0xb')](),controller[_0x20c1('0xe')]);router['get']('/:id/download',auth[_0x20c1('0xb')](),controller['download']);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x102e62,_0x26dca6,_0x74f727){_0x74f727(null,path[_0x20c1('0xf')](config['root'],'server/files/sounds/original/'));},'filename':function(_0x2d90fb,_0x4cfcbe,_0x20d18f){_0x4cfcbe[_0x20c1('0x10')]=_0x4cfcbe['originalname'][_0x20c1('0x11')](/[+@&\/\\#,+()$~%'":*?<>{}\s\\|]/g,'-');_0x20d18f(null,util['format'](_0x20c1('0x12'),path[_0x20c1('0x13')](_0x4cfcbe[_0x20c1('0x10')],path[_0x20c1('0x14')](_0x4cfcbe[_0x20c1('0x10')])),Date[_0x20c1('0x15')](),path[_0x20c1('0x14')](_0x4cfcbe[_0x20c1('0x10')])));}})});router['post']('/',upload[_0x20c1('0x16')]('file'),controller[_0x20c1('0x17')]);router['put']('/:id',auth[_0x20c1('0xb')](),controller[_0x20c1('0x18')]);router['delete'](_0x20c1('0xd'),auth[_0x20c1('0xb')](),controller[_0x20c1('0x19')]);module['exports']=router;
\ No newline at end of file
index 0afa7a6..3b9f695 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0285=['FLOAT','BIGINT','INTEGER','sequelize','exports','STRING','name'];(function(_0x18dc18,_0x4d7733){var _0x3b1307=function(_0x3f0b69){while(--_0x3f0b69){_0x18dc18['push'](_0x18dc18['shift']());}};_0x3b1307(++_0x4d7733);}(_0x0285,0x14c));var _0x5028=function(_0x186ac3,_0x445715){_0x186ac3=_0x186ac3-0x0;var _0x23c7ad=_0x0285[_0x186ac3];return _0x23c7ad;};'use strict';var Sequelize=require(_0x5028('0x0'));module[_0x5028('0x1')]={'name':{'type':Sequelize[_0x5028('0x2')],'unique':_0x5028('0x3'),'allowNull':![]},'save_name':{'type':Sequelize['STRING']},'display_name':{'type':Sequelize[_0x5028('0x2')],'defaultValue':''},'description':{'type':Sequelize['STRING']},'original_format':{'type':Sequelize[_0x5028('0x2')]},'original_duration':{'type':Sequelize[_0x5028('0x4')]},'original_sampleCount':{'type':Sequelize[_0x5028('0x5')]},'original_channelCount':{'type':Sequelize['INTEGER']},'original_bitRate':{'type':Sequelize[_0x5028('0x5')]},'original_sampleRate':{'type':Sequelize[_0x5028('0x6')]},'converted_format':{'type':Sequelize[_0x5028('0x2')]},'converted_duration':{'type':Sequelize[_0x5028('0x4')]},'converted_sampleCount':{'type':Sequelize[_0x5028('0x5')]},'converted_channelCount':{'type':Sequelize[_0x5028('0x6')]},'converted_bitRate':{'type':Sequelize['BIGINT']},'converted_sampleRate':{'type':Sequelize[_0x5028('0x6')]}};
\ No newline at end of file
+var _0x4495=['STRING','FLOAT','BIGINT','INTEGER','sequelize','exports'];(function(_0x258fb0,_0x5362dc){var _0x4d1afe=function(_0x1c8f24){while(--_0x1c8f24){_0x258fb0['push'](_0x258fb0['shift']());}};_0x4d1afe(++_0x5362dc);}(_0x4495,0xf4));var _0x5449=function(_0x4881f0,_0x44c214){_0x4881f0=_0x4881f0-0x0;var _0x4220ed=_0x4495[_0x4881f0];return _0x4220ed;};'use strict';var Sequelize=require(_0x5449('0x0'));module[_0x5449('0x1')]={'name':{'type':Sequelize['STRING'],'unique':'name','allowNull':![]},'save_name':{'type':Sequelize[_0x5449('0x2')]},'display_name':{'type':Sequelize[_0x5449('0x2')],'defaultValue':''},'description':{'type':Sequelize['STRING']},'original_format':{'type':Sequelize[_0x5449('0x2')]},'original_duration':{'type':Sequelize[_0x5449('0x3')]},'original_sampleCount':{'type':Sequelize[_0x5449('0x4')]},'original_channelCount':{'type':Sequelize[_0x5449('0x5')]},'original_bitRate':{'type':Sequelize['BIGINT']},'original_sampleRate':{'type':Sequelize[_0x5449('0x5')]},'converted_format':{'type':Sequelize[_0x5449('0x2')]},'converted_duration':{'type':Sequelize['FLOAT']},'converted_sampleCount':{'type':Sequelize[_0x5449('0x4')]},'converted_channelCount':{'type':Sequelize['INTEGER']},'converted_bitRate':{'type':Sequelize[_0x5449('0x4')]},'converted_sampleRate':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
index ec037f9..e1ee36b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3b42=['ejs','fs-extra','lodash','squel','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','json','undefined','limit','count','offset','status','set','Content-Range','apply','reject','update','then','destroy','get','Sounds','UserProfileResource','error','stack','name','send','Sound','rawAttributes','fieldName','type','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','map','VIRTUAL','filter','options','include','findAll','rows','catch','show','params','find','save_name','converted_format','existsSync','root','server/files/sounds/converted','Sequelize','ValidationError','Sound\x20not\x20found','download','%s.%s','format','create','basename','originalname','extname','file','filename','substring','wav','join','info','chmodSync','0777','transcode','unlinkSync','original_duration','duration','original_sampleCount','sampleCount','original_channelCount','channelCount','original_bitRate','bitRate','original_sampleRate','sampleRate','dest','converted_duration','converted_sampleCount','converted_channelCount','converted_bitRate','converted_sampleRate','body','role','userProfileId','user','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','start','delete','original_format','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv'];(function(_0x5e848d,_0x1dbd20){var _0x3785e5=function(_0xc82b39){while(--_0xc82b39){_0x5e848d['push'](_0x5e848d['shift']());}};_0x3785e5(++_0x1dbd20);}(_0x3b42,0x75));var _0x23b4=function(_0x1fa96c,_0x22f425){_0x1fa96c=_0x1fa96c-0x0;var _0x141440=_0x3b42[_0x1fa96c];return _0x141440;};'use strict';var emlformat=require(_0x23b4('0x0'));var rimraf=require(_0x23b4('0x1'));var zipdir=require(_0x23b4('0x2'));var jsonpatch=require(_0x23b4('0x3'));var rp=require(_0x23b4('0x4'));var moment=require(_0x23b4('0x5'));var BPromise=require(_0x23b4('0x6'));var Mustache=require(_0x23b4('0x7'));var util=require(_0x23b4('0x8'));var path=require(_0x23b4('0x9'));var sox=require(_0x23b4('0xa'));var csv=require(_0x23b4('0xb'));var ejs=require(_0x23b4('0xc'));var fs=require('fs');var fs_extra=require(_0x23b4('0xd'));var _=require(_0x23b4('0xe'));var squel=require(_0x23b4('0xf'));var crypto=require('crypto');var jsforce=require(_0x23b4('0x10'));var deskjs=require(_0x23b4('0x11'));var toCsv=require(_0x23b4('0xb'));var querystring=require(_0x23b4('0x12'));var Papa=require(_0x23b4('0x13'));var Redis=require('ioredis');var authService=require(_0x23b4('0x14'));var qs=require('../../components/parsers/qs');var as=require(_0x23b4('0x15'));var hardwareService=require(_0x23b4('0x16'));var logger=require(_0x23b4('0x17'))(_0x23b4('0x18'));var utils=require(_0x23b4('0x19'));var config=require('../../config/environment');var licenseUtil=require(_0x23b4('0x1a'));var db=require(_0x23b4('0x1b'))['db'];function respondWithStatusCode(_0x3f1b2d,_0x491851){_0x491851=_0x491851||0xcc;return function(_0x13049e){if(_0x13049e){return _0x3f1b2d[_0x23b4('0x1c')](_0x491851);}return _0x3f1b2d['status'](_0x491851)[_0x23b4('0x1d')]();};}function respondWithResult(_0x22ac4e,_0x216251){_0x216251=_0x216251||0xc8;return function(_0x2c09d0){if(_0x2c09d0){return _0x22ac4e['status'](_0x216251)[_0x23b4('0x1e')](_0x2c09d0);}};}function respondWithFilteredResult(_0x43d0cb,_0x2110e4){return function(_0x22ab87){if(_0x22ab87){var _0x2204b0=typeof _0x2110e4['offset']===_0x23b4('0x1f')&&typeof _0x2110e4[_0x23b4('0x20')]===_0x23b4('0x1f');var _0x169be3=_0x22ab87[_0x23b4('0x21')];var _0x347798=_0x2204b0?0x0:_0x2110e4[_0x23b4('0x22')];var _0x55c781=_0x2204b0?_0x22ab87[_0x23b4('0x21')]:_0x2110e4[_0x23b4('0x22')]+_0x2110e4[_0x23b4('0x20')];var _0x2e887b;if(_0x55c781>=_0x169be3){_0x55c781=_0x169be3;_0x2e887b=0xc8;}else{_0x2e887b=0xce;}_0x43d0cb[_0x23b4('0x23')](_0x2e887b);return _0x43d0cb[_0x23b4('0x24')](_0x23b4('0x25'),_0x347798+'-'+_0x55c781+'/'+_0x169be3)['json'](_0x22ab87);}return null;};}function patchUpdates(_0x197716){return function(_0x1ca87b){try{jsonpatch[_0x23b4('0x26')](_0x1ca87b,_0x197716,!![]);}catch(_0x5f27b3){return BPromise[_0x23b4('0x27')](_0x5f27b3);}return _0x1ca87b['save']();};}function saveUpdates(_0x118342,_0x266355){return function(_0x585605){if(_0x585605){return _0x585605[_0x23b4('0x28')](_0x118342)[_0x23b4('0x29')](function(_0x5a7696){return _0x5a7696;});}return null;};}function removeEntity(_0x35dd0f,_0x263605){return function(_0x24dbac){if(_0x24dbac){return _0x24dbac[_0x23b4('0x2a')]()[_0x23b4('0x29')](function(){var _0x123af9=_0x24dbac[_0x23b4('0x2b')]({'plain':!![]});var _0x5e6efb=_0x23b4('0x2c');return db[_0x23b4('0x2d')][_0x23b4('0x2a')]({'where':{'type':_0x5e6efb,'resourceId':_0x123af9['id']}})[_0x23b4('0x29')](function(){return _0x24dbac;});})[_0x23b4('0x29')](function(){_0x35dd0f[_0x23b4('0x23')](0xcc)[_0x23b4('0x1d')]();});}};}function handleEntityNotFound(_0x5c3dce,_0x2ff984){return function(_0x46fdfa){if(!_0x46fdfa){_0x5c3dce[_0x23b4('0x1c')](0x194);}return _0x46fdfa;};}function handleError(_0x3bf718,_0x17c67b){_0x17c67b=_0x17c67b||0x1f4;return function(_0x414838){logger[_0x23b4('0x2e')](_0x414838[_0x23b4('0x2f')]);if(_0x414838[_0x23b4('0x30')]){delete _0x414838[_0x23b4('0x30')];}_0x3bf718[_0x23b4('0x23')](_0x17c67b)[_0x23b4('0x31')](_0x414838);};}exports['index']=function(_0x18e0e1,_0x14411f){var _0x477413={},_0x21cba2={},_0x5dbe33={'count':0x0,'rows':[]};var _0x16e398=_['map'](db[_0x23b4('0x32')][_0x23b4('0x33')],function(_0x5f35e5){return{'name':_0x5f35e5[_0x23b4('0x34')],'type':_0x5f35e5[_0x23b4('0x35')]['key']};});_0x21cba2[_0x23b4('0x36')]=_['map'](_0x16e398,_0x23b4('0x30'));_0x21cba2[_0x23b4('0x37')]=_[_0x23b4('0x38')](_0x18e0e1['query']);_0x21cba2[_0x23b4('0x39')]=_['intersection'](_0x21cba2[_0x23b4('0x36')],_0x21cba2['query']);_0x477413['attributes']=_[_0x23b4('0x3a')](_0x21cba2[_0x23b4('0x36')],qs[_0x23b4('0x3b')](_0x18e0e1['query']['fields']));_0x477413['attributes']=_0x477413[_0x23b4('0x3c')][_0x23b4('0x3d')]?_0x477413[_0x23b4('0x3c')]:_0x21cba2[_0x23b4('0x36')];if(!_0x18e0e1[_0x23b4('0x37')][_0x23b4('0x3e')](_0x23b4('0x3f'))){_0x477413['limit']=qs['limit'](_0x18e0e1[_0x23b4('0x37')]['limit']);_0x477413['offset']=qs['offset'](_0x18e0e1['query'][_0x23b4('0x22')]);}_0x477413[_0x23b4('0x40')]=qs[_0x23b4('0x41')](_0x18e0e1['query']['sort']);_0x477413[_0x23b4('0x42')]=qs[_0x23b4('0x39')](_[_0x23b4('0x43')](_0x18e0e1['query'],_0x21cba2[_0x23b4('0x39')]),_0x16e398);if(_0x18e0e1[_0x23b4('0x37')]['filter']){_0x477413[_0x23b4('0x42')]=_[_0x23b4('0x44')](_0x477413[_0x23b4('0x42')],{'$or':_[_0x23b4('0x45')](_0x16e398,function(_0x1eda31){if(_0x1eda31[_0x23b4('0x35')]!==_0x23b4('0x46')){var _0x2e336a={};_0x2e336a[_0x1eda31[_0x23b4('0x30')]]={'$like':'%'+_0x18e0e1[_0x23b4('0x37')][_0x23b4('0x47')]+'%'};return _0x2e336a;}})});}_0x477413=_[_0x23b4('0x44')]({},_0x477413,_0x18e0e1[_0x23b4('0x48')]);var _0x4f80e1={'where':_0x477413['where']};return db[_0x23b4('0x32')][_0x23b4('0x21')](_0x4f80e1)[_0x23b4('0x29')](function(_0x31deab){_0x5dbe33[_0x23b4('0x21')]=_0x31deab;if(_0x18e0e1[_0x23b4('0x37')]['includeAll']){_0x477413[_0x23b4('0x49')]=[{'all':!![]}];}return db[_0x23b4('0x32')][_0x23b4('0x4a')](_0x477413);})[_0x23b4('0x29')](function(_0xc5f886){_0x5dbe33[_0x23b4('0x4b')]=_0xc5f886;return _0x5dbe33;})[_0x23b4('0x29')](respondWithFilteredResult(_0x14411f,_0x477413))[_0x23b4('0x4c')](handleError(_0x14411f,null));};exports[_0x23b4('0x4d')]=function(_0x534521,_0x5a63d7){var _0x224da7={'raw':!![],'where':{'id':_0x534521[_0x23b4('0x4e')]['id']}},_0x38cf41={};_0x38cf41[_0x23b4('0x36')]=_[_0x23b4('0x38')](db[_0x23b4('0x32')]['rawAttributes']);_0x38cf41['query']=_[_0x23b4('0x38')](_0x534521['query']);_0x38cf41[_0x23b4('0x39')]=_['intersection'](_0x38cf41[_0x23b4('0x36')],_0x38cf41[_0x23b4('0x37')]);_0x224da7[_0x23b4('0x3c')]=_[_0x23b4('0x3a')](_0x38cf41[_0x23b4('0x36')],qs[_0x23b4('0x3b')](_0x534521[_0x23b4('0x37')][_0x23b4('0x3b')]));_0x224da7['attributes']=_0x224da7[_0x23b4('0x3c')][_0x23b4('0x3d')]?_0x224da7[_0x23b4('0x3c')]:_0x38cf41[_0x23b4('0x36')];if(_0x534521[_0x23b4('0x37')]['includeAll']){_0x224da7[_0x23b4('0x49')]=[{'all':!![]}];}_0x224da7=_[_0x23b4('0x44')]({},_0x224da7,_0x534521[_0x23b4('0x48')]);return db[_0x23b4('0x32')][_0x23b4('0x4f')](_0x224da7)[_0x23b4('0x29')](handleEntityNotFound(_0x5a63d7,null))['then'](respondWithResult(_0x5a63d7,null))[_0x23b4('0x4c')](handleError(_0x5a63d7,null));};exports['download']=function(_0x5e588d,_0x5b98b8,_0x190948){return db[_0x23b4('0x32')][_0x23b4('0x4f')]({'where':{'id':_0x5e588d[_0x23b4('0x4e')]['id']},'attributes':[_0x23b4('0x30'),_0x23b4('0x50'),_0x23b4('0x51')],'raw':!![]})[_0x23b4('0x29')](handleEntityNotFound(_0x5b98b8,null))['then'](function(_0x584c9a){if(_0x584c9a){if(!fs[_0x23b4('0x52')](path['join'](config[_0x23b4('0x53')],_0x23b4('0x54'),_0x584c9a[_0x23b4('0x50')]+'.'+_0x584c9a[_0x23b4('0x51')]))){throw new db[(_0x23b4('0x55'))][(_0x23b4('0x56'))](_0x23b4('0x57'));}return _0x5b98b8[_0x23b4('0x58')](path['join'](config[_0x23b4('0x53')],_0x23b4('0x54'),util['format'](_0x23b4('0x59'),_0x584c9a['save_name'],_0x584c9a[_0x23b4('0x51')])),util[_0x23b4('0x5a')](_0x23b4('0x59'),_0x584c9a[_0x23b4('0x30')],_0x584c9a['converted_format']));}return null;})['catch'](handleError(_0x5b98b8,null));};exports[_0x23b4('0x5b')]=function(_0x45ff44,_0x3045e3,_0x3c84e1){var _0x33fcb5={'name':path[_0x23b4('0x5c')](_0x45ff44['file'][_0x23b4('0x5d')],path[_0x23b4('0x5e')](_0x45ff44['file'][_0x23b4('0x5d')])),'save_name':path[_0x23b4('0x5c')](_0x45ff44[_0x23b4('0x5f')][_0x23b4('0x60')],path[_0x23b4('0x5e')](_0x45ff44['file'][_0x23b4('0x60')])),'original_format':path[_0x23b4('0x5e')](_0x45ff44[_0x23b4('0x5f')][_0x23b4('0x5d')])[_0x23b4('0x61')](0x1),'converted_format':_0x23b4('0x62')};var _0x408d50=path['join'](config[_0x23b4('0x53')],'server/files/sounds/original',_0x45ff44['file']['filename']);var _0x42c3ff=path[_0x23b4('0x63')](config[_0x23b4('0x53')],'server/files/sounds/converted',util[_0x23b4('0x5a')]('%s.%s',path[_0x23b4('0x5c')](_0x45ff44['file'][_0x23b4('0x60')],path['extname'](_0x45ff44[_0x23b4('0x5f')]['filename'])),_0x33fcb5[_0x23b4('0x51')]));logger['info']('Sound\x20upload\x20filepath:\x20%s',_0x408d50);logger[_0x23b4('0x64')]('Sound\x20upload\x20destination:\x20%s',_0x42c3ff);try{fs[_0x23b4('0x65')](_0x408d50,parseInt(_0x23b4('0x66'),0x8));var _0x32185b=sox[_0x23b4('0x67')](_0x408d50,_0x42c3ff,{'sampleRate':0x1f40,'format':_0x23b4('0x62'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x32185b['on'](_0x23b4('0x2e'),function(_0x1af181){fs[_0x23b4('0x68')](_0x408d50);_0x3045e3[_0x23b4('0x23')](0x1f4)['send'](_0x1af181);});_0x32185b['on']('src',function(_0x3fd5e4){_0x33fcb5[_0x23b4('0x69')]=isNaN(_0x3fd5e4[_0x23b4('0x6a')])?null:_0x3fd5e4[_0x23b4('0x6a')]*0x3e8;_0x33fcb5[_0x23b4('0x6b')]=isNaN(_0x3fd5e4[_0x23b4('0x6c')])?null:_0x3fd5e4[_0x23b4('0x6c')];_0x33fcb5[_0x23b4('0x6d')]=isNaN(_0x3fd5e4[_0x23b4('0x6e')])?null:_0x3fd5e4[_0x23b4('0x6e')];_0x33fcb5[_0x23b4('0x6f')]=isNaN(_0x3fd5e4[_0x23b4('0x70')])?null:_0x3fd5e4[_0x23b4('0x70')];_0x33fcb5[_0x23b4('0x71')]=isNaN(_0x3fd5e4['sampleRate'])?null:_0x3fd5e4[_0x23b4('0x72')];});_0x32185b['on'](_0x23b4('0x73'),function(_0x5bb0ca){_0x33fcb5[_0x23b4('0x74')]=isNaN(_0x5bb0ca[_0x23b4('0x6a')])?null:_0x5bb0ca['duration']*0x3e8;_0x33fcb5[_0x23b4('0x75')]=isNaN(_0x5bb0ca['sampleCount'])?null:_0x5bb0ca[_0x23b4('0x6c')];_0x33fcb5[_0x23b4('0x76')]=isNaN(_0x5bb0ca[_0x23b4('0x6e')])?null:_0x5bb0ca[_0x23b4('0x6e')];_0x33fcb5[_0x23b4('0x77')]=isNaN(_0x5bb0ca[_0x23b4('0x70')])?null:_0x5bb0ca[_0x23b4('0x70')];_0x33fcb5[_0x23b4('0x78')]=isNaN(_0x5bb0ca[_0x23b4('0x72')])?null:_0x5bb0ca[_0x23b4('0x72')];});_0x32185b['on']('end',function(){fs[_0x23b4('0x65')](_0x42c3ff,parseInt('0777',0x8));return db[_0x23b4('0x32')][_0x23b4('0x5b')](_0x33fcb5)['then'](function(_0x442bbc){var _0x567125={'role':_0x45ff44[_0x23b4('0x79')][_0x23b4('0x7a')],'userProfileId':_0x45ff44[_0x23b4('0x79')][_0x23b4('0x7b')]};if(!_0x567125)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x567125[_0x23b4('0x7a')]===_0x23b4('0x7c')){var _0x44d87f=_0x442bbc['get']({'plain':!![]});return db['UserProfileSection']['find']({'where':{'name':'Sounds','userProfileId':_0x567125[_0x23b4('0x7b')]},'raw':!![]})['then'](function(_0x584b7e){if(_0x584b7e&&_0x584b7e['autoAssociation']===0x0){return db['UserProfileResource']['create']({'name':_0x44d87f[_0x23b4('0x30')],'resourceId':_0x44d87f['id'],'type':_0x584b7e[_0x23b4('0x30')],'sectionId':_0x584b7e['id']},{})[_0x23b4('0x29')](function(){return _0x442bbc;});}else{return _0x442bbc;}})['catch'](function(_0x2ce1a5){logger[_0x23b4('0x2e')](_0x23b4('0x7d'),_0x2ce1a5);throw _0x2ce1a5;});}return _0x442bbc;})[_0x23b4('0x29')](respondWithResult(_0x3045e3,null))[_0x23b4('0x4c')](handleError(_0x3045e3,null));});_0x32185b[_0x23b4('0x7e')]();}catch(_0x4dee8b){_0x3045e3[_0x23b4('0x23')](0x1f4)[_0x23b4('0x31')](_0x4dee8b);}};exports[_0x23b4('0x28')]=function(_0x33ff41,_0x49177d,_0x4f0fa9){return db['Sound']['find']({'where':{'id':_0x33ff41[_0x23b4('0x4e')]['id']}})[_0x23b4('0x29')](handleEntityNotFound(_0x49177d,null))[_0x23b4('0x29')](saveUpdates(_[_0x23b4('0x43')](_0x33ff41['body'],[_0x23b4('0x30'),'description']),null))[_0x23b4('0x29')](respondWithResult(_0x49177d,null))['catch'](handleError(_0x49177d,null));};exports[_0x23b4('0x7f')]=function(_0x2bdb00,_0x4f7876,_0xe0653a){return db['Sound']['find']({'where':{'id':_0x2bdb00[_0x23b4('0x4e')]['id']}})[_0x23b4('0x29')](function(_0xa9973a){if(_0xa9973a){return _0xa9973a[_0x23b4('0x2a')]();}})['then'](function(_0x4b05a5){var _0x42baed=path[_0x23b4('0x63')](config[_0x23b4('0x53')],'server/files/sounds/original',util[_0x23b4('0x5a')]('%s.%s',_0x4b05a5[_0x23b4('0x50')],_0x4b05a5[_0x23b4('0x80')]));var _0x57a1dc=path[_0x23b4('0x63')](config[_0x23b4('0x53')],_0x23b4('0x54'),util['format'](_0x23b4('0x59'),_0x4b05a5[_0x23b4('0x50')],_0x4b05a5[_0x23b4('0x51')]));fs[_0x23b4('0x68')](_0x42baed);fs[_0x23b4('0x68')](_0x57a1dc);return _0x4b05a5;})[_0x23b4('0x29')](function(_0x55f428){if(_0x55f428){return _0x4f7876['status'](0xcc)[_0x23b4('0x1d')]();}})['then'](handleEntityNotFound(_0x4f7876,null))['catch'](handleError(_0x4f7876,null));};
\ No newline at end of file
+var _0xf635=['../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','apply','reject','then','destroy','get','Sounds','UserProfileResource','error','stack','name','send','index','map','fieldName','type','key','model','query','attributes','fields','length','nolimit','order','sort','where','filters','filter','merge','VIRTUAL','options','includeAll','Sound','findAll','rows','params','keys','intersection','include','find','download','converted_format','root','server/files/sounds/converted','save_name','Sequelize','ValidationError','Sound\x20not\x20found','join','format','catch','basename','file','originalname','extname','filename','wav','server/files/sounds/original','info','Sound\x20upload\x20filepath:\x20%s','Sound\x20upload\x20destination:\x20%s','chmodSync','transcode','src','original_duration','duration','original_sampleCount','original_channelCount','channelCount','original_bitRate','bitRate','sampleRate','sampleCount','converted_channelCount','converted_bitRate','converted_sampleRate','create','body','userProfileId','role','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','start','pick','description','%s.%s','unlinkSync','eml-format','rimraf','zip-dir','request-promise','moment','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis'];(function(_0x4df6f9,_0x44bd65){var _0x4b1a73=function(_0xf5adb7){while(--_0xf5adb7){_0x4df6f9['push'](_0x4df6f9['shift']());}};_0x4b1a73(++_0x44bd65);}(_0xf635,0x15c));var _0x5f63=function(_0x261bbf,_0x567f53){_0x261bbf=_0x261bbf-0x0;var _0x3434e5=_0xf635[_0x261bbf];return _0x3434e5;};'use strict';var emlformat=require(_0x5f63('0x0'));var rimraf=require(_0x5f63('0x1'));var zipdir=require(_0x5f63('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x5f63('0x3'));var moment=require(_0x5f63('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x5f63('0x5'));var path=require(_0x5f63('0x6'));var sox=require(_0x5f63('0x7'));var csv=require(_0x5f63('0x8'));var ejs=require(_0x5f63('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x5f63('0xa'));var squel=require(_0x5f63('0xb'));var crypto=require(_0x5f63('0xc'));var jsforce=require(_0x5f63('0xd'));var deskjs=require(_0x5f63('0xe'));var toCsv=require(_0x5f63('0x8'));var querystring=require(_0x5f63('0xf'));var Papa=require(_0x5f63('0x10'));var Redis=require(_0x5f63('0x11'));var authService=require(_0x5f63('0x12'));var qs=require(_0x5f63('0x13'));var as=require(_0x5f63('0x14'));var hardwareService=require(_0x5f63('0x15'));var logger=require(_0x5f63('0x16'))('api');var utils=require(_0x5f63('0x17'));var config=require(_0x5f63('0x18'));var licenseUtil=require('../../config/license/util');var db=require(_0x5f63('0x19'))['db'];function respondWithStatusCode(_0x2847ee,_0x2f13bf){_0x2f13bf=_0x2f13bf||0xcc;return function(_0x2e7123){if(_0x2e7123){return _0x2847ee[_0x5f63('0x1a')](_0x2f13bf);}return _0x2847ee[_0x5f63('0x1b')](_0x2f13bf)[_0x5f63('0x1c')]();};}function respondWithResult(_0x3f1f09,_0x2490ee){_0x2490ee=_0x2490ee||0xc8;return function(_0x39d6e5){if(_0x39d6e5){return _0x3f1f09[_0x5f63('0x1b')](_0x2490ee)[_0x5f63('0x1d')](_0x39d6e5);}};}function respondWithFilteredResult(_0x1476be,_0x3d94ea){return function(_0x2cf5a6){if(_0x2cf5a6){var _0x25ccfd=typeof _0x3d94ea[_0x5f63('0x1e')]===_0x5f63('0x1f')&&typeof _0x3d94ea[_0x5f63('0x20')]===_0x5f63('0x1f');var _0x2ca579=_0x2cf5a6[_0x5f63('0x21')];var _0x3f2145=_0x25ccfd?0x0:_0x3d94ea[_0x5f63('0x1e')];var _0x5883f4=_0x25ccfd?_0x2cf5a6['count']:_0x3d94ea[_0x5f63('0x1e')]+_0x3d94ea[_0x5f63('0x20')];var _0x21748a;if(_0x5883f4>=_0x2ca579){_0x5883f4=_0x2ca579;_0x21748a=0xc8;}else{_0x21748a=0xce;}_0x1476be[_0x5f63('0x1b')](_0x21748a);return _0x1476be[_0x5f63('0x22')]('Content-Range',_0x3f2145+'-'+_0x5883f4+'/'+_0x2ca579)[_0x5f63('0x1d')](_0x2cf5a6);}return null;};}function patchUpdates(_0x55d52e){return function(_0x436c81){try{jsonpatch[_0x5f63('0x23')](_0x436c81,_0x55d52e,!![]);}catch(_0x1585a0){return BPromise[_0x5f63('0x24')](_0x1585a0);}return _0x436c81['save']();};}function saveUpdates(_0x1419b4,_0x55a4ef){return function(_0x3fc1b7){if(_0x3fc1b7){return _0x3fc1b7['update'](_0x1419b4)[_0x5f63('0x25')](function(_0x906fbc){return _0x906fbc;});}return null;};}function removeEntity(_0x336bfe,_0x111788){return function(_0x360846){if(_0x360846){return _0x360846[_0x5f63('0x26')]()[_0x5f63('0x25')](function(){var _0x2da191=_0x360846[_0x5f63('0x27')]({'plain':!![]});var _0x5ff077=_0x5f63('0x28');return db[_0x5f63('0x29')][_0x5f63('0x26')]({'where':{'type':_0x5ff077,'resourceId':_0x2da191['id']}})[_0x5f63('0x25')](function(){return _0x360846;});})['then'](function(){_0x336bfe[_0x5f63('0x1b')](0xcc)[_0x5f63('0x1c')]();});}};}function handleEntityNotFound(_0x2b1bf6,_0x27d305){return function(_0x37ca61){if(!_0x37ca61){_0x2b1bf6[_0x5f63('0x1a')](0x194);}return _0x37ca61;};}function handleError(_0x7ee6fa,_0x5cb57e){_0x5cb57e=_0x5cb57e||0x1f4;return function(_0x3ab2a8){logger[_0x5f63('0x2a')](_0x3ab2a8[_0x5f63('0x2b')]);if(_0x3ab2a8['name']){delete _0x3ab2a8[_0x5f63('0x2c')];}_0x7ee6fa[_0x5f63('0x1b')](_0x5cb57e)[_0x5f63('0x2d')](_0x3ab2a8);};}exports[_0x5f63('0x2e')]=function(_0x2939c1,_0x58a7aa){var _0x32308a={},_0xb0928e={},_0x281de8={'count':0x0,'rows':[]};var _0x4f5fd2=_[_0x5f63('0x2f')](db['Sound']['rawAttributes'],function(_0x2e9c48){return{'name':_0x2e9c48[_0x5f63('0x30')],'type':_0x2e9c48[_0x5f63('0x31')][_0x5f63('0x32')]};});_0xb0928e[_0x5f63('0x33')]=_[_0x5f63('0x2f')](_0x4f5fd2,_0x5f63('0x2c'));_0xb0928e[_0x5f63('0x34')]=_['keys'](_0x2939c1['query']);_0xb0928e['filters']=_['intersection'](_0xb0928e[_0x5f63('0x33')],_0xb0928e[_0x5f63('0x34')]);_0x32308a[_0x5f63('0x35')]=_['intersection'](_0xb0928e[_0x5f63('0x33')],qs['fields'](_0x2939c1[_0x5f63('0x34')][_0x5f63('0x36')]));_0x32308a[_0x5f63('0x35')]=_0x32308a[_0x5f63('0x35')][_0x5f63('0x37')]?_0x32308a[_0x5f63('0x35')]:_0xb0928e[_0x5f63('0x33')];if(!_0x2939c1[_0x5f63('0x34')]['hasOwnProperty'](_0x5f63('0x38'))){_0x32308a['limit']=qs[_0x5f63('0x20')](_0x2939c1[_0x5f63('0x34')][_0x5f63('0x20')]);_0x32308a['offset']=qs[_0x5f63('0x1e')](_0x2939c1['query'][_0x5f63('0x1e')]);}_0x32308a[_0x5f63('0x39')]=qs[_0x5f63('0x3a')](_0x2939c1[_0x5f63('0x34')][_0x5f63('0x3a')]);_0x32308a[_0x5f63('0x3b')]=qs[_0x5f63('0x3c')](_['pick'](_0x2939c1[_0x5f63('0x34')],_0xb0928e[_0x5f63('0x3c')]),_0x4f5fd2);if(_0x2939c1['query'][_0x5f63('0x3d')]){_0x32308a[_0x5f63('0x3b')]=_[_0x5f63('0x3e')](_0x32308a['where'],{'$or':_[_0x5f63('0x2f')](_0x4f5fd2,function(_0x2695ee){if(_0x2695ee[_0x5f63('0x31')]!==_0x5f63('0x3f')){var _0x17c6e3={};_0x17c6e3[_0x2695ee['name']]={'$like':'%'+_0x2939c1[_0x5f63('0x34')][_0x5f63('0x3d')]+'%'};return _0x17c6e3;}})});}_0x32308a=_[_0x5f63('0x3e')]({},_0x32308a,_0x2939c1[_0x5f63('0x40')]);var _0x208d3b={'where':_0x32308a[_0x5f63('0x3b')]};return db['Sound']['count'](_0x208d3b)[_0x5f63('0x25')](function(_0x5d54d4){_0x281de8[_0x5f63('0x21')]=_0x5d54d4;if(_0x2939c1[_0x5f63('0x34')][_0x5f63('0x41')]){_0x32308a['include']=[{'all':!![]}];}return db[_0x5f63('0x42')][_0x5f63('0x43')](_0x32308a);})[_0x5f63('0x25')](function(_0x55dfc6){_0x281de8[_0x5f63('0x44')]=_0x55dfc6;return _0x281de8;})['then'](respondWithFilteredResult(_0x58a7aa,_0x32308a))['catch'](handleError(_0x58a7aa,null));};exports['show']=function(_0x1ca923,_0x89e91e){var _0x5d74a5={'raw':!![],'where':{'id':_0x1ca923[_0x5f63('0x45')]['id']}},_0x5a2b40={};_0x5a2b40['model']=_[_0x5f63('0x46')](db[_0x5f63('0x42')]['rawAttributes']);_0x5a2b40['query']=_[_0x5f63('0x46')](_0x1ca923[_0x5f63('0x34')]);_0x5a2b40[_0x5f63('0x3c')]=_[_0x5f63('0x47')](_0x5a2b40[_0x5f63('0x33')],_0x5a2b40['query']);_0x5d74a5[_0x5f63('0x35')]=_[_0x5f63('0x47')](_0x5a2b40['model'],qs[_0x5f63('0x36')](_0x1ca923[_0x5f63('0x34')]['fields']));_0x5d74a5['attributes']=_0x5d74a5[_0x5f63('0x35')][_0x5f63('0x37')]?_0x5d74a5['attributes']:_0x5a2b40[_0x5f63('0x33')];if(_0x1ca923[_0x5f63('0x34')][_0x5f63('0x41')]){_0x5d74a5[_0x5f63('0x48')]=[{'all':!![]}];}_0x5d74a5=_[_0x5f63('0x3e')]({},_0x5d74a5,_0x1ca923[_0x5f63('0x40')]);return db[_0x5f63('0x42')][_0x5f63('0x49')](_0x5d74a5)[_0x5f63('0x25')](handleEntityNotFound(_0x89e91e,null))[_0x5f63('0x25')](respondWithResult(_0x89e91e,null))['catch'](handleError(_0x89e91e,null));};exports[_0x5f63('0x4a')]=function(_0x11eb80,_0x3cb831,_0x108d66){return db['Sound'][_0x5f63('0x49')]({'where':{'id':_0x11eb80[_0x5f63('0x45')]['id']},'attributes':[_0x5f63('0x2c'),'save_name',_0x5f63('0x4b')],'raw':!![]})[_0x5f63('0x25')](handleEntityNotFound(_0x3cb831,null))[_0x5f63('0x25')](function(_0x4ba866){if(_0x4ba866){if(!fs['existsSync'](path['join'](config[_0x5f63('0x4c')],_0x5f63('0x4d'),_0x4ba866[_0x5f63('0x4e')]+'.'+_0x4ba866['converted_format']))){throw new db[(_0x5f63('0x4f'))][(_0x5f63('0x50'))](_0x5f63('0x51'));}return _0x3cb831['download'](path[_0x5f63('0x52')](config[_0x5f63('0x4c')],_0x5f63('0x4d'),util[_0x5f63('0x53')]('%s.%s',_0x4ba866[_0x5f63('0x4e')],_0x4ba866[_0x5f63('0x4b')])),util['format']('%s.%s',_0x4ba866['name'],_0x4ba866[_0x5f63('0x4b')]));}return null;})[_0x5f63('0x54')](handleError(_0x3cb831,null));};exports['create']=function(_0x32a948,_0x3826e9,_0x4694c8){var _0x1de006={'name':path[_0x5f63('0x55')](_0x32a948[_0x5f63('0x56')][_0x5f63('0x57')],path[_0x5f63('0x58')](_0x32a948[_0x5f63('0x56')][_0x5f63('0x57')])),'save_name':path[_0x5f63('0x55')](_0x32a948[_0x5f63('0x56')][_0x5f63('0x59')],path['extname'](_0x32a948[_0x5f63('0x56')][_0x5f63('0x59')])),'original_format':path[_0x5f63('0x58')](_0x32a948[_0x5f63('0x56')][_0x5f63('0x57')])['substring'](0x1),'converted_format':_0x5f63('0x5a')};var _0x1d4446=path[_0x5f63('0x52')](config[_0x5f63('0x4c')],_0x5f63('0x5b'),_0x32a948[_0x5f63('0x56')][_0x5f63('0x59')]);var _0x4e68bb=path[_0x5f63('0x52')](config['root'],_0x5f63('0x4d'),util[_0x5f63('0x53')]('%s.%s',path[_0x5f63('0x55')](_0x32a948[_0x5f63('0x56')][_0x5f63('0x59')],path[_0x5f63('0x58')](_0x32a948['file'][_0x5f63('0x59')])),_0x1de006[_0x5f63('0x4b')]));logger[_0x5f63('0x5c')](_0x5f63('0x5d'),_0x1d4446);logger[_0x5f63('0x5c')](_0x5f63('0x5e'),_0x4e68bb);try{fs[_0x5f63('0x5f')](_0x1d4446,parseInt('0777',0x8));var _0x3b073d=sox[_0x5f63('0x60')](_0x1d4446,_0x4e68bb,{'sampleRate':0x1f40,'format':'wav','channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x3b073d['on'](_0x5f63('0x2a'),function(_0x37d439){fs['unlinkSync'](_0x1d4446);_0x3826e9[_0x5f63('0x1b')](0x1f4)[_0x5f63('0x2d')](_0x37d439);});_0x3b073d['on'](_0x5f63('0x61'),function(_0xc3bf72){_0x1de006[_0x5f63('0x62')]=isNaN(_0xc3bf72[_0x5f63('0x63')])?null:_0xc3bf72[_0x5f63('0x63')]*0x3e8;_0x1de006[_0x5f63('0x64')]=isNaN(_0xc3bf72['sampleCount'])?null:_0xc3bf72['sampleCount'];_0x1de006[_0x5f63('0x65')]=isNaN(_0xc3bf72[_0x5f63('0x66')])?null:_0xc3bf72[_0x5f63('0x66')];_0x1de006[_0x5f63('0x67')]=isNaN(_0xc3bf72[_0x5f63('0x68')])?null:_0xc3bf72[_0x5f63('0x68')];_0x1de006['original_sampleRate']=isNaN(_0xc3bf72[_0x5f63('0x69')])?null:_0xc3bf72['sampleRate'];});_0x3b073d['on']('dest',function(_0x3cacf2){_0x1de006['converted_duration']=isNaN(_0x3cacf2[_0x5f63('0x63')])?null:_0x3cacf2['duration']*0x3e8;_0x1de006['converted_sampleCount']=isNaN(_0x3cacf2[_0x5f63('0x6a')])?null:_0x3cacf2[_0x5f63('0x6a')];_0x1de006[_0x5f63('0x6b')]=isNaN(_0x3cacf2[_0x5f63('0x66')])?null:_0x3cacf2[_0x5f63('0x66')];_0x1de006[_0x5f63('0x6c')]=isNaN(_0x3cacf2['bitRate'])?null:_0x3cacf2['bitRate'];_0x1de006[_0x5f63('0x6d')]=isNaN(_0x3cacf2['sampleRate'])?null:_0x3cacf2[_0x5f63('0x69')];});_0x3b073d['on'](_0x5f63('0x1c'),function(){fs[_0x5f63('0x5f')](_0x4e68bb,parseInt('0777',0x8));return db[_0x5f63('0x42')][_0x5f63('0x6e')](_0x1de006)[_0x5f63('0x25')](function(_0x1b9190){var _0x3fcfe4={'role':_0x32a948[_0x5f63('0x6f')]['role'],'userProfileId':_0x32a948[_0x5f63('0x6f')][_0x5f63('0x70')]};if(!_0x3fcfe4)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x3fcfe4[_0x5f63('0x71')]==='user'){var _0x4412e5=_0x1b9190['get']({'plain':!![]});return db[_0x5f63('0x72')][_0x5f63('0x49')]({'where':{'name':_0x5f63('0x28'),'userProfileId':_0x3fcfe4[_0x5f63('0x70')]},'raw':!![]})[_0x5f63('0x25')](function(_0x217c99){if(_0x217c99&&_0x217c99[_0x5f63('0x73')]===0x0){return db[_0x5f63('0x29')]['create']({'name':_0x4412e5[_0x5f63('0x2c')],'resourceId':_0x4412e5['id'],'type':_0x217c99[_0x5f63('0x2c')],'sectionId':_0x217c99['id']},{})['then'](function(){return _0x1b9190;});}else{return _0x1b9190;}})['catch'](function(_0x6030ee){logger[_0x5f63('0x2a')](_0x5f63('0x74'),_0x6030ee);throw _0x6030ee;});}return _0x1b9190;})['then'](respondWithResult(_0x3826e9,null))['catch'](handleError(_0x3826e9,null));});_0x3b073d[_0x5f63('0x75')]();}catch(_0x513c23){_0x3826e9[_0x5f63('0x1b')](0x1f4)['send'](_0x513c23);}};exports['update']=function(_0x495a06,_0x5f470a,_0x190d73){return db[_0x5f63('0x42')]['find']({'where':{'id':_0x495a06[_0x5f63('0x45')]['id']}})['then'](handleEntityNotFound(_0x5f470a,null))['then'](saveUpdates(_[_0x5f63('0x76')](_0x495a06[_0x5f63('0x6f')],[_0x5f63('0x2c'),_0x5f63('0x77')]),null))[_0x5f63('0x25')](respondWithResult(_0x5f470a,null))['catch'](handleError(_0x5f470a,null));};exports['delete']=function(_0x3fb0a7,_0xd15c21,_0x4116a7){return db[_0x5f63('0x42')]['find']({'where':{'id':_0x3fb0a7[_0x5f63('0x45')]['id']}})[_0x5f63('0x25')](function(_0x1468d9){if(_0x1468d9){return _0x1468d9[_0x5f63('0x26')]();}})['then'](function(_0x544718){var _0x6c4251=path[_0x5f63('0x52')](config[_0x5f63('0x4c')],_0x5f63('0x5b'),util['format'](_0x5f63('0x78'),_0x544718[_0x5f63('0x4e')],_0x544718['original_format']));var _0x49ab74=path[_0x5f63('0x52')](config['root'],_0x5f63('0x4d'),util[_0x5f63('0x53')](_0x5f63('0x78'),_0x544718[_0x5f63('0x4e')],_0x544718[_0x5f63('0x4b')]));fs[_0x5f63('0x79')](_0x6c4251);fs[_0x5f63('0x79')](_0x49ab74);return _0x544718;})[_0x5f63('0x25')](function(_0x1fd1e0){if(_0x1fd1e0){return _0xd15c21['status'](0xcc)[_0x5f63('0x1c')]();}})[_0x5f63('0x25')](handleEntityNotFound(_0xd15c21,null))[_0x5f63('0x54')](handleError(_0xd15c21,null));};
\ No newline at end of file
index 8acede0..4894936 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa55a=['moment','bluebird','request-promise','path','../../config/environment','./sound.attributes','exports','tools_sounds','util','../../config/logger','api'];(function(_0x3f159a,_0x438191){var _0x57530c=function(_0x104738){while(--_0x104738){_0x3f159a['push'](_0x3f159a['shift']());}};_0x57530c(++_0x438191);}(_0xa55a,0xa2));var _0xaa55=function(_0x1fc079,_0x4af514){_0x1fc079=_0x1fc079-0x0;var _0x234276=_0xa55a[_0x1fc079];return _0x234276;};'use strict';var _=require('lodash');var util=require(_0xaa55('0x0'));var logger=require(_0xaa55('0x1'))(_0xaa55('0x2'));var moment=require(_0xaa55('0x3'));var BPromise=require(_0xaa55('0x4'));var rp=require(_0xaa55('0x5'));var fs=require('fs');var path=require(_0xaa55('0x6'));var rimraf=require('rimraf');var config=require(_0xaa55('0x7'));var attributes=require(_0xaa55('0x8'));module[_0xaa55('0x9')]=function(_0x59438c,_0x3550da){return _0x59438c['define']('Sound',attributes,{'tableName':_0xaa55('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x50f2=['request-promise','path','rimraf','../../config/environment','./sound.attributes','Sound','tools_sounds','lodash','../../config/logger','api','bluebird'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0x50f2,0x167));var _0x250f=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0x50f2[_0x3ab51d];return _0x29a04e;};'use strict';var _=require(_0x250f('0x0'));var util=require('util');var logger=require(_0x250f('0x1'))(_0x250f('0x2'));var moment=require('moment');var BPromise=require(_0x250f('0x3'));var rp=require(_0x250f('0x4'));var fs=require('fs');var path=require(_0x250f('0x5'));var rimraf=require(_0x250f('0x6'));var config=require(_0x250f('0x7'));var attributes=require(_0x250f('0x8'));module['exports']=function(_0x3cb112,_0x4a631e){return _0x3cb112['define'](_0x250f('0x9'),attributes,{'tableName':_0x250f('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index e94bd16..3aa8bc0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6518=['message','error','result','ShowSound','find','options','raw','attributes','map','include','model','stringify','catch','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','client','http','request','info','Sound,\x20%s,\x20%s','request\x20sent','debug','code'];(function(_0x42e39d,_0x661e6e){var _0x413003=function(_0x5ef5b0){while(--_0x5ef5b0){_0x42e39d['push'](_0x42e39d['shift']());}};_0x413003(++_0x661e6e);}(_0x6518,0x15d));var _0x8651=function(_0x5bd426,_0x4878e5){_0x5bd426=_0x5bd426-0x0;var _0x23a7eb=_0x6518[_0x5bd426];return _0x23a7eb;};'use strict';var _=require(_0x8651('0x0'));var util=require(_0x8651('0x1'));var moment=require(_0x8651('0x2'));var BPromise=require(_0x8651('0x3'));var rs=require(_0x8651('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x8651('0x5'));var logger=require(_0x8651('0x6'))('rpc');var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0x8651('0x7')][_0x8651('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x2aaddd,_0x4ef137,_0x21a652){return new BPromise(function(_0x18e338,_0x30f06c){return client[_0x8651('0x9')](_0x2aaddd,_0x21a652)['then'](function(_0x170ad3){logger[_0x8651('0xa')](_0x8651('0xb'),_0x4ef137,_0x8651('0xc'));logger[_0x8651('0xd')]('Sound,\x20%s,\x20%s,\x20%s',_0x4ef137,_0x8651('0xc'),JSON['stringify'](_0x170ad3));if(_0x170ad3['error']){if(_0x170ad3['error'][_0x8651('0xe')]===0x1f4){logger['error'](_0x8651('0xb'),_0x4ef137,_0x170ad3['error'][_0x8651('0xf')]);return _0x30f06c(_0x170ad3[_0x8651('0x10')][_0x8651('0xf')]);}logger[_0x8651('0x10')](_0x8651('0xb'),_0x4ef137,_0x170ad3[_0x8651('0x10')][_0x8651('0xf')]);return _0x18e338(_0x170ad3[_0x8651('0x10')][_0x8651('0xf')]);}else{logger[_0x8651('0xa')](_0x8651('0xb'),_0x4ef137,_0x8651('0xc'));_0x18e338(_0x170ad3[_0x8651('0x11')][_0x8651('0xf')]);}})['catch'](function(_0x9aaf16){logger[_0x8651('0x10')](_0x8651('0xb'),_0x4ef137,_0x9aaf16);_0x30f06c(_0x9aaf16);});});}exports[_0x8651('0x12')]=function(_0x23fd58){var _0x5da4ab=this;return new Promise(function(_0x391235,_0x3160a4){return db['Sound'][_0x8651('0x13')]({'raw':_0x23fd58[_0x8651('0x14')]?_0x23fd58[_0x8651('0x14')][_0x8651('0x15')]===undefined?!![]:![]:!![],'where':_0x23fd58[_0x8651('0x14')]?_0x23fd58[_0x8651('0x14')]['where']||null:null,'attributes':_0x23fd58[_0x8651('0x14')]?_0x23fd58[_0x8651('0x14')][_0x8651('0x16')]||null:null,'include':_0x23fd58[_0x8651('0x14')]?_0x23fd58['options']['include']?_[_0x8651('0x17')](_0x23fd58['options'][_0x8651('0x18')],function(_0x4b217a){return{'model':db[_0x4b217a[_0x8651('0x19')]],'as':_0x4b217a['as'],'attributes':_0x4b217a[_0x8651('0x16')],'include':_0x4b217a[_0x8651('0x18')]?_[_0x8651('0x17')](_0x4b217a[_0x8651('0x18')],function(_0x126709){return{'model':db[_0x126709[_0x8651('0x19')]],'as':_0x126709['as'],'attributes':_0x126709[_0x8651('0x16')],'include':_0x126709[_0x8651('0x18')]?_[_0x8651('0x17')](_0x126709[_0x8651('0x18')],function(_0x58146d){return{'model':db[_0x58146d[_0x8651('0x19')]],'as':_0x58146d['as'],'attributes':_0x58146d[_0x8651('0x16')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x4a9845){logger[_0x8651('0xa')](_0x8651('0x12'),_0x23fd58);logger[_0x8651('0xd')](_0x8651('0x12'),_0x23fd58,JSON[_0x8651('0x1a')](_0x4a9845));_0x391235(_0x4a9845);})[_0x8651('0x1b')](function(_0x431dc6){logger[_0x8651('0x10')](_0x8651('0x12'),_0x431dc6[_0x8651('0xf')],_0x23fd58);_0x3160a4(_0x5da4ab[_0x8651('0x10')](0x1f4,_0x431dc6['message']));});});};
\ No newline at end of file
+var _0x74ac=['where','include','map','model','attributes','lodash','util','moment','bluebird','randomstring','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','Sound,\x20%s,\x20%s','request\x20sent','debug','error','code','message','result','catch','ShowSound','Sound','find','options','raw'];(function(_0x4a4f46,_0xe93bad){var _0x5aaece=function(_0x30d23f){while(--_0x30d23f){_0x4a4f46['push'](_0x4a4f46['shift']());}};_0x5aaece(++_0xe93bad);}(_0x74ac,0x185));var _0xc74a=function(_0x1cc34f,_0x27dbf2){_0x1cc34f=_0x1cc34f-0x0;var _0x333522=_0x74ac[_0x1cc34f];return _0x333522;};'use strict';var _=require(_0xc74a('0x0'));var util=require(_0xc74a('0x1'));var moment=require(_0xc74a('0x2'));var BPromise=require(_0xc74a('0x3'));var rs=require(_0xc74a('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xc74a('0x5'));var logger=require(_0xc74a('0x6'))('rpc');var config=require(_0xc74a('0x7'));var jayson=require(_0xc74a('0x8'));var client=jayson[_0xc74a('0x9')][_0xc74a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xec4605,_0x5885f6,_0x33fcea){return new BPromise(function(_0x5c8e55,_0x7bb57c){return client[_0xc74a('0xb')](_0xec4605,_0x33fcea)[_0xc74a('0xc')](function(_0x9e0fe9){logger[_0xc74a('0xd')](_0xc74a('0xe'),_0x5885f6,_0xc74a('0xf'));logger[_0xc74a('0x10')]('Sound,\x20%s,\x20%s,\x20%s',_0x5885f6,'request\x20sent',JSON['stringify'](_0x9e0fe9));if(_0x9e0fe9[_0xc74a('0x11')]){if(_0x9e0fe9[_0xc74a('0x11')][_0xc74a('0x12')]===0x1f4){logger[_0xc74a('0x11')](_0xc74a('0xe'),_0x5885f6,_0x9e0fe9[_0xc74a('0x11')]['message']);return _0x7bb57c(_0x9e0fe9[_0xc74a('0x11')]['message']);}logger[_0xc74a('0x11')]('Sound,\x20%s,\x20%s',_0x5885f6,_0x9e0fe9[_0xc74a('0x11')][_0xc74a('0x13')]);return _0x5c8e55(_0x9e0fe9[_0xc74a('0x11')]['message']);}else{logger['info']('Sound,\x20%s,\x20%s',_0x5885f6,'request\x20sent');_0x5c8e55(_0x9e0fe9[_0xc74a('0x14')]['message']);}})[_0xc74a('0x15')](function(_0x1c8eb0){logger[_0xc74a('0x11')](_0xc74a('0xe'),_0x5885f6,_0x1c8eb0);_0x7bb57c(_0x1c8eb0);});});}exports[_0xc74a('0x16')]=function(_0x1e2e2b){var _0x4d9937=this;return new Promise(function(_0x4c33b7,_0x55fa82){return db[_0xc74a('0x17')][_0xc74a('0x18')]({'raw':_0x1e2e2b[_0xc74a('0x19')]?_0x1e2e2b[_0xc74a('0x19')][_0xc74a('0x1a')]===undefined?!![]:![]:!![],'where':_0x1e2e2b[_0xc74a('0x19')]?_0x1e2e2b['options'][_0xc74a('0x1b')]||null:null,'attributes':_0x1e2e2b[_0xc74a('0x19')]?_0x1e2e2b[_0xc74a('0x19')]['attributes']||null:null,'include':_0x1e2e2b[_0xc74a('0x19')]?_0x1e2e2b[_0xc74a('0x19')][_0xc74a('0x1c')]?_[_0xc74a('0x1d')](_0x1e2e2b['options'][_0xc74a('0x1c')],function(_0x118026){return{'model':db[_0x118026[_0xc74a('0x1e')]],'as':_0x118026['as'],'attributes':_0x118026[_0xc74a('0x1f')],'include':_0x118026[_0xc74a('0x1c')]?_[_0xc74a('0x1d')](_0x118026[_0xc74a('0x1c')],function(_0x1e834d){return{'model':db[_0x1e834d[_0xc74a('0x1e')]],'as':_0x1e834d['as'],'attributes':_0x1e834d['attributes'],'include':_0x1e834d['include']?_[_0xc74a('0x1d')](_0x1e834d[_0xc74a('0x1c')],function(_0x5eb945){return{'model':db[_0x5eb945[_0xc74a('0x1e')]],'as':_0x5eb945['as'],'attributes':_0x5eb945[_0xc74a('0x1f')]};}):[]};}):[]};}):[]:[]})[_0xc74a('0xc')](function(_0x25df91){logger['info'](_0xc74a('0x16'),_0x1e2e2b);logger[_0xc74a('0x10')](_0xc74a('0x16'),_0x1e2e2b,JSON['stringify'](_0x25df91));_0x4c33b7(_0x25df91);})[_0xc74a('0x15')](function(_0x419cc2){logger[_0xc74a('0x11')](_0xc74a('0x16'),_0x419cc2[_0xc74a('0x13')],_0x1e2e2b);_0x55fa82(_0x4d9937[_0xc74a('0x11')](0x1f4,_0x419cc2[_0xc74a('0x13')]));});});};
\ No newline at end of file
index 29e1b68..b4a2dcd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x757a=['destroy','util','path','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareMessage.controller','get','index','isAuthenticated','show','post','create','/:id','update','delete'];(function(_0x4fa6d9,_0x4dd35d){var _0xd352a8=function(_0x57de7e){while(--_0x57de7e){_0x4fa6d9['push'](_0x4fa6d9['shift']());}};_0xd352a8(++_0x4dd35d);}(_0x757a,0xde));var _0xa757=function(_0x21437e,_0x2aba17){_0x21437e=_0x21437e-0x0;var _0x1ce77b=_0x757a[_0x21437e];return _0x1ce77b;};'use strict';var multer=require('multer');var util=require(_0xa757('0x0'));var path=require(_0xa757('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0xa757('0x2'));var auth=require(_0xa757('0x3'));var interaction=require(_0xa757('0x4'));var config=require(_0xa757('0x5'));var controller=require(_0xa757('0x6'));router[_0xa757('0x7')]('/',auth['isAuthenticated'](),controller[_0xa757('0x8')]);router[_0xa757('0x7')]('/:id',auth[_0xa757('0x9')](),controller[_0xa757('0xa')]);router[_0xa757('0xb')]('/',auth[_0xa757('0x9')](),controller[_0xa757('0xc')]);router['put'](_0xa757('0xd'),auth[_0xa757('0x9')](),controller[_0xa757('0xe')]);router[_0xa757('0xf')](_0xa757('0xd'),auth[_0xa757('0x9')](),controller[_0xa757('0x10')]);module['exports']=router;
\ No newline at end of file
+var _0x0b0e=['./squareMessage.controller','get','isAuthenticated','index','show','post','create','/:id','delete','destroy','exports','multer','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x68c979,_0x431cff){var _0x4f0001=function(_0xa7595d){while(--_0xa7595d){_0x68c979['push'](_0x68c979['shift']());}};_0x4f0001(++_0x431cff);}(_0x0b0e,0x187));var _0xe0b0=function(_0x1ed010,_0x734e0b){_0x1ed010=_0x1ed010-0x0;var _0x6e22bf=_0x0b0e[_0x1ed010];return _0x6e22bf;};'use strict';var multer=require(_0xe0b0('0x0'));var util=require('util');var path=require(_0xe0b0('0x1'));var timeout=require('connect-timeout');var express=require(_0xe0b0('0x2'));var router=express[_0xe0b0('0x3')]();var fs_extra=require(_0xe0b0('0x4'));var auth=require(_0xe0b0('0x5'));var interaction=require(_0xe0b0('0x6'));var config=require(_0xe0b0('0x7'));var controller=require(_0xe0b0('0x8'));router[_0xe0b0('0x9')]('/',auth[_0xe0b0('0xa')](),controller[_0xe0b0('0xb')]);router[_0xe0b0('0x9')]('/:id',auth['isAuthenticated'](),controller[_0xe0b0('0xc')]);router[_0xe0b0('0xd')]('/',auth[_0xe0b0('0xa')](),controller[_0xe0b0('0xe')]);router['put'](_0xe0b0('0xf'),auth[_0xe0b0('0xa')](),controller['update']);router[_0xe0b0('0x10')](_0xe0b0('0xf'),auth['isAuthenticated'](),controller[_0xe0b0('0x11')]);module[_0xe0b0('0x12')]=router;
\ No newline at end of file
index 0b8b40f..32d8181 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1998=['out','STRING','sequelize','exports','TEXT','medium','ENUM'];(function(_0x3ab51d,_0x2fa01d){var _0x29a04e=function(_0x7807b0){while(--_0x7807b0){_0x3ab51d['push'](_0x3ab51d['shift']());}};_0x29a04e(++_0x2fa01d);}(_0x1998,0x1c2));var _0x8199=function(_0x17a9b5,_0x5bf022){_0x17a9b5=_0x17a9b5-0x0;var _0x5b575c=_0x1998[_0x17a9b5];return _0x5b575c;};'use strict';var Sequelize=require(_0x8199('0x0'));module[_0x8199('0x1')]={'uniqueid':{'type':Sequelize['STRING']},'body':{'type':Sequelize[_0x8199('0x2')](_0x8199('0x3')),'allowNull':![]},'direction':{'type':Sequelize[_0x8199('0x4')]('in',_0x8199('0x5')),'defaultValue':'out','allowNull':![]},'providerName':{'type':Sequelize[_0x8199('0x6')]},'providerResponse':{'type':Sequelize[_0x8199('0x2')]}};
\ No newline at end of file
+var _0x32b6=['ENUM','out','sequelize','exports','STRING','TEXT'];(function(_0xb7a459,_0xc13228){var _0x104ab5=function(_0x186a0e){while(--_0x186a0e){_0xb7a459['push'](_0xb7a459['shift']());}};_0x104ab5(++_0xc13228);}(_0x32b6,0x1e8));var _0x632b=function(_0x8b1c68,_0x194a8f){_0x8b1c68=_0x8b1c68-0x0;var _0xff63e=_0x32b6[_0x8b1c68];return _0xff63e;};'use strict';var Sequelize=require(_0x632b('0x0'));module[_0x632b('0x1')]={'uniqueid':{'type':Sequelize[_0x632b('0x2')]},'body':{'type':Sequelize[_0x632b('0x3')]('medium'),'allowNull':![]},'direction':{'type':Sequelize[_0x632b('0x4')]('in',_0x632b('0x5')),'defaultValue':'out','allowNull':![]},'providerName':{'type':Sequelize[_0x632b('0x2')]},'providerResponse':{'type':Sequelize[_0x632b('0x3')]}};
\ No newline at end of file
index ac1d562..35afce9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5454=['../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','undefined','count','Content-Range','apply','reject','save','then','destroy','error','stack','name','index','map','SquareMessage','rawAttributes','fieldName','key','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','limit','order','sort','where','pick','type','filter','merge','options','includeAll','include','findAll','rows','catch','create','body','find','params','fast-json-patch','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs'];(function(_0x18ab2a,_0x4debcd){var _0x16dcee=function(_0x10107a){while(--_0x10107a){_0x18ab2a['push'](_0x18ab2a['shift']());}};_0x16dcee(++_0x4debcd);}(_0x5454,0x15b));var _0x4545=function(_0x4e497f,_0x2c65d4){_0x4e497f=_0x4e497f-0x0;var _0xa69189=_0x5454[_0x4e497f];return _0xa69189;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0x4545('0x0'));var rp=require('request-promise');var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x4545('0x1'));var util=require(_0x4545('0x2'));var path=require(_0x4545('0x3'));var sox=require(_0x4545('0x4'));var csv=require('to-csv');var ejs=require(_0x4545('0x5'));var fs=require('fs');var fs_extra=require(_0x4545('0x6'));var _=require(_0x4545('0x7'));var squel=require(_0x4545('0x8'));var crypto=require(_0x4545('0x9'));var jsforce=require(_0x4545('0xa'));var deskjs=require(_0x4545('0xb'));var toCsv=require(_0x4545('0xc'));var querystring=require(_0x4545('0xd'));var Papa=require(_0x4545('0xe'));var Redis=require(_0x4545('0xf'));var authService=require(_0x4545('0x10'));var qs=require(_0x4545('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x4545('0x12'));var logger=require(_0x4545('0x13'))(_0x4545('0x14'));var utils=require(_0x4545('0x15'));var config=require(_0x4545('0x16'));var licenseUtil=require(_0x4545('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x3844a3,_0x20a4d8){_0x20a4d8=_0x20a4d8||0xcc;return function(_0x353e42){if(_0x353e42){return _0x3844a3[_0x4545('0x18')](_0x20a4d8);}return _0x3844a3[_0x4545('0x19')](_0x20a4d8)[_0x4545('0x1a')]();};}function respondWithResult(_0x3e7088,_0x347072){_0x347072=_0x347072||0xc8;return function(_0x36bb8e){if(_0x36bb8e){return _0x3e7088[_0x4545('0x19')](_0x347072)[_0x4545('0x1b')](_0x36bb8e);}};}function respondWithFilteredResult(_0x4b5700,_0xb10472){return function(_0x3577f5){if(_0x3577f5){var _0x2416b0=typeof _0xb10472[_0x4545('0x1c')]==='undefined'&&typeof _0xb10472['limit']===_0x4545('0x1d');var _0x29effa=_0x3577f5[_0x4545('0x1e')];var _0x2e13e0=_0x2416b0?0x0:_0xb10472[_0x4545('0x1c')];var _0x33393b=_0x2416b0?_0x3577f5[_0x4545('0x1e')]:_0xb10472[_0x4545('0x1c')]+_0xb10472['limit'];var _0x52a21c;if(_0x33393b>=_0x29effa){_0x33393b=_0x29effa;_0x52a21c=0xc8;}else{_0x52a21c=0xce;}_0x4b5700[_0x4545('0x19')](_0x52a21c);return _0x4b5700['set'](_0x4545('0x1f'),_0x2e13e0+'-'+_0x33393b+'/'+_0x29effa)[_0x4545('0x1b')](_0x3577f5);}return null;};}function patchUpdates(_0x67e408){return function(_0x6b3bc){try{jsonpatch[_0x4545('0x20')](_0x6b3bc,_0x67e408,!![]);}catch(_0x2a39cf){return BPromise[_0x4545('0x21')](_0x2a39cf);}return _0x6b3bc[_0x4545('0x22')]();};}function saveUpdates(_0x550dfb,_0x580b57){return function(_0x431b5d){if(_0x431b5d){return _0x431b5d['update'](_0x550dfb)[_0x4545('0x23')](function(_0x4f8a76){return _0x4f8a76;});}return null;};}function removeEntity(_0x293c18,_0x4c47c0){return function(_0x519489){if(_0x519489){return _0x519489[_0x4545('0x24')]()[_0x4545('0x23')](function(){_0x293c18[_0x4545('0x19')](0xcc)[_0x4545('0x1a')]();});}};}function handleEntityNotFound(_0x344633,_0x39eaa1){return function(_0x43033c){if(!_0x43033c){_0x344633[_0x4545('0x18')](0x194);}return _0x43033c;};}function handleError(_0xac3456,_0x2a6842){_0x2a6842=_0x2a6842||0x1f4;return function(_0x3e5807){logger[_0x4545('0x25')](_0x3e5807[_0x4545('0x26')]);if(_0x3e5807[_0x4545('0x27')]){delete _0x3e5807[_0x4545('0x27')];}_0xac3456[_0x4545('0x19')](_0x2a6842)['send'](_0x3e5807);};}exports[_0x4545('0x28')]=function(_0x2c256b,_0x853476){var _0x394a8e={},_0xb9c5ee={},_0x531250={'count':0x0,'rows':[]};var _0x157fe5=_[_0x4545('0x29')](db[_0x4545('0x2a')][_0x4545('0x2b')],function(_0x1da2a9){return{'name':_0x1da2a9[_0x4545('0x2c')],'type':_0x1da2a9['type'][_0x4545('0x2d')]};});_0xb9c5ee[_0x4545('0x2e')]=_[_0x4545('0x29')](_0x157fe5,_0x4545('0x27'));_0xb9c5ee[_0x4545('0x2f')]=_[_0x4545('0x30')](_0x2c256b[_0x4545('0x2f')]);_0xb9c5ee[_0x4545('0x31')]=_[_0x4545('0x32')](_0xb9c5ee[_0x4545('0x2e')],_0xb9c5ee[_0x4545('0x2f')]);_0x394a8e['attributes']=_[_0x4545('0x32')](_0xb9c5ee['model'],qs[_0x4545('0x33')](_0x2c256b[_0x4545('0x2f')]['fields']));_0x394a8e[_0x4545('0x34')]=_0x394a8e[_0x4545('0x34')][_0x4545('0x35')]?_0x394a8e[_0x4545('0x34')]:_0xb9c5ee[_0x4545('0x2e')];if(!_0x2c256b[_0x4545('0x2f')][_0x4545('0x36')]('nolimit')){_0x394a8e[_0x4545('0x37')]=qs[_0x4545('0x37')](_0x2c256b[_0x4545('0x2f')][_0x4545('0x37')]);_0x394a8e[_0x4545('0x1c')]=qs[_0x4545('0x1c')](_0x2c256b['query'][_0x4545('0x1c')]);}_0x394a8e[_0x4545('0x38')]=qs[_0x4545('0x39')](_0x2c256b[_0x4545('0x2f')][_0x4545('0x39')]);_0x394a8e[_0x4545('0x3a')]=qs[_0x4545('0x31')](_[_0x4545('0x3b')](_0x2c256b[_0x4545('0x2f')],_0xb9c5ee['filters']),_0x157fe5);if(_0x2c256b['query']['filter']){_0x394a8e[_0x4545('0x3a')]=_['merge'](_0x394a8e[_0x4545('0x3a')],{'$or':_[_0x4545('0x29')](_0x157fe5,function(_0x1d19f6){if(_0x1d19f6[_0x4545('0x3c')]!=='VIRTUAL'){var _0x5e54b7={};_0x5e54b7[_0x1d19f6[_0x4545('0x27')]]={'$like':'%'+_0x2c256b['query'][_0x4545('0x3d')]+'%'};return _0x5e54b7;}})});}_0x394a8e=_[_0x4545('0x3e')]({},_0x394a8e,_0x2c256b[_0x4545('0x3f')]);var _0x211092={'where':_0x394a8e[_0x4545('0x3a')]};return db['SquareMessage']['count'](_0x211092)[_0x4545('0x23')](function(_0x43c4ce){_0x531250[_0x4545('0x1e')]=_0x43c4ce;if(_0x2c256b['query'][_0x4545('0x40')]){_0x394a8e[_0x4545('0x41')]=[{'all':!![]}];}return db['SquareMessage'][_0x4545('0x42')](_0x394a8e);})['then'](function(_0x239246){_0x531250[_0x4545('0x43')]=_0x239246;return _0x531250;})[_0x4545('0x23')](respondWithFilteredResult(_0x853476,_0x394a8e))[_0x4545('0x44')](handleError(_0x853476,null));};exports['show']=function(_0x1ca5d3,_0x632ec1){var _0x3d308e={'raw':!![],'where':{'id':_0x1ca5d3['params']['id']}},_0x299869={};_0x299869['model']=_[_0x4545('0x30')](db['SquareMessage'][_0x4545('0x2b')]);_0x299869[_0x4545('0x2f')]=_[_0x4545('0x30')](_0x1ca5d3[_0x4545('0x2f')]);_0x299869[_0x4545('0x31')]=_[_0x4545('0x32')](_0x299869[_0x4545('0x2e')],_0x299869[_0x4545('0x2f')]);_0x3d308e['attributes']=_[_0x4545('0x32')](_0x299869[_0x4545('0x2e')],qs[_0x4545('0x33')](_0x1ca5d3['query'][_0x4545('0x33')]));_0x3d308e[_0x4545('0x34')]=_0x3d308e[_0x4545('0x34')][_0x4545('0x35')]?_0x3d308e[_0x4545('0x34')]:_0x299869[_0x4545('0x2e')];if(_0x1ca5d3[_0x4545('0x2f')][_0x4545('0x40')]){_0x3d308e['include']=[{'all':!![]}];}_0x3d308e=_[_0x4545('0x3e')]({},_0x3d308e,_0x1ca5d3['options']);return db[_0x4545('0x2a')]['find'](_0x3d308e)[_0x4545('0x23')](handleEntityNotFound(_0x632ec1,null))[_0x4545('0x23')](respondWithResult(_0x632ec1,null))[_0x4545('0x44')](handleError(_0x632ec1,null));};exports['create']=function(_0x20f054,_0x2ece03){return db[_0x4545('0x2a')][_0x4545('0x45')](_0x20f054[_0x4545('0x46')],{})[_0x4545('0x23')](respondWithResult(_0x2ece03,0xc9))['catch'](handleError(_0x2ece03,null));};exports['update']=function(_0x499246,_0x563835){if(_0x499246[_0x4545('0x46')]['id']){delete _0x499246[_0x4545('0x46')]['id'];}return db[_0x4545('0x2a')][_0x4545('0x47')]({'where':{'id':_0x499246[_0x4545('0x48')]['id']}})[_0x4545('0x23')](handleEntityNotFound(_0x563835,null))[_0x4545('0x23')](saveUpdates(_0x499246['body'],null))['then'](respondWithResult(_0x563835,null))[_0x4545('0x44')](handleError(_0x563835,null));};exports[_0x4545('0x24')]=function(_0x33a6d2,_0x2946b5){return db[_0x4545('0x2a')][_0x4545('0x47')]({'where':{'id':_0x33a6d2['params']['id']}})[_0x4545('0x23')](handleEntityNotFound(_0x2946b5,null))[_0x4545('0x23')](removeEntity(_0x2946b5,null))['catch'](handleError(_0x2946b5,null));};
\ No newline at end of file
+var _0xb36b=['attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters','merge','options','SquareMessage','includeAll','findAll','rows','show','params','keys','include','find','catch','create','body','destroy','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','reject','update','then','stack','name','index','rawAttributes','fieldName','type','key','map','query','intersection','model'];(function(_0x220f80,_0x3ae3ca){var _0x543748=function(_0x5248a3){while(--_0x5248a3){_0x220f80['push'](_0x220f80['shift']());}};_0x543748(++_0x3ae3ca);}(_0xb36b,0xac));var _0xbb36=function(_0x33b63a,_0x4572fc){_0x33b63a=_0x33b63a-0x0;var _0x44678e=_0xb36b[_0x33b63a];return _0x44678e;};'use strict';var emlformat=require(_0xbb36('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xbb36('0x1'));var jsonpatch=require(_0xbb36('0x2'));var rp=require(_0xbb36('0x3'));var moment=require(_0xbb36('0x4'));var BPromise=require(_0xbb36('0x5'));var Mustache=require('mustache');var util=require(_0xbb36('0x6'));var path=require(_0xbb36('0x7'));var sox=require(_0xbb36('0x8'));var csv=require(_0xbb36('0x9'));var ejs=require(_0xbb36('0xa'));var fs=require('fs');var fs_extra=require(_0xbb36('0xb'));var _=require(_0xbb36('0xc'));var squel=require(_0xbb36('0xd'));var crypto=require(_0xbb36('0xe'));var jsforce=require(_0xbb36('0xf'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0xbb36('0x10'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xbb36('0x11'));var qs=require(_0xbb36('0x12'));var as=require(_0xbb36('0x13'));var hardwareService=require(_0xbb36('0x14'));var logger=require(_0xbb36('0x15'))('api');var utils=require(_0xbb36('0x16'));var config=require(_0xbb36('0x17'));var licenseUtil=require(_0xbb36('0x18'));var db=require(_0xbb36('0x19'))['db'];function respondWithStatusCode(_0x55d7ba,_0x248529){_0x248529=_0x248529||0xcc;return function(_0x119403){if(_0x119403){return _0x55d7ba[_0xbb36('0x1a')](_0x248529);}return _0x55d7ba[_0xbb36('0x1b')](_0x248529)[_0xbb36('0x1c')]();};}function respondWithResult(_0x326c44,_0x3e8ceb){_0x3e8ceb=_0x3e8ceb||0xc8;return function(_0x8811d8){if(_0x8811d8){return _0x326c44[_0xbb36('0x1b')](_0x3e8ceb)[_0xbb36('0x1d')](_0x8811d8);}};}function respondWithFilteredResult(_0x8325a8,_0x4d022e){return function(_0x595c49){if(_0x595c49){var _0x3c5820=typeof _0x4d022e[_0xbb36('0x1e')]===_0xbb36('0x1f')&&typeof _0x4d022e[_0xbb36('0x20')]===_0xbb36('0x1f');var _0x18af40=_0x595c49[_0xbb36('0x21')];var _0x15c49a=_0x3c5820?0x0:_0x4d022e[_0xbb36('0x1e')];var _0x519a97=_0x3c5820?_0x595c49['count']:_0x4d022e[_0xbb36('0x1e')]+_0x4d022e[_0xbb36('0x20')];var _0x156918;if(_0x519a97>=_0x18af40){_0x519a97=_0x18af40;_0x156918=0xc8;}else{_0x156918=0xce;}_0x8325a8[_0xbb36('0x1b')](_0x156918);return _0x8325a8[_0xbb36('0x22')](_0xbb36('0x23'),_0x15c49a+'-'+_0x519a97+'/'+_0x18af40)[_0xbb36('0x1d')](_0x595c49);}return null;};}function patchUpdates(_0x22d35e){return function(_0x19a820){try{jsonpatch['apply'](_0x19a820,_0x22d35e,!![]);}catch(_0x617822){return BPromise[_0xbb36('0x24')](_0x617822);}return _0x19a820['save']();};}function saveUpdates(_0x2c92d2,_0x3b7358){return function(_0x1571f1){if(_0x1571f1){return _0x1571f1[_0xbb36('0x25')](_0x2c92d2)[_0xbb36('0x26')](function(_0x1e688b){return _0x1e688b;});}return null;};}function removeEntity(_0x5033e5,_0x523db7){return function(_0x42fd9c){if(_0x42fd9c){return _0x42fd9c['destroy']()[_0xbb36('0x26')](function(){_0x5033e5[_0xbb36('0x1b')](0xcc)[_0xbb36('0x1c')]();});}};}function handleEntityNotFound(_0xc1239,_0x218c99){return function(_0x537b24){if(!_0x537b24){_0xc1239[_0xbb36('0x1a')](0x194);}return _0x537b24;};}function handleError(_0x34c51e,_0x49b825){_0x49b825=_0x49b825||0x1f4;return function(_0x105e1d){logger['error'](_0x105e1d[_0xbb36('0x27')]);if(_0x105e1d[_0xbb36('0x28')]){delete _0x105e1d['name'];}_0x34c51e[_0xbb36('0x1b')](_0x49b825)['send'](_0x105e1d);};}exports[_0xbb36('0x29')]=function(_0x7c9948,_0x4b5f9c){var _0x4a3b55={},_0x1f6059={},_0x4e417a={'count':0x0,'rows':[]};var _0x24f231=_['map'](db['SquareMessage'][_0xbb36('0x2a')],function(_0x3df68e){return{'name':_0x3df68e[_0xbb36('0x2b')],'type':_0x3df68e[_0xbb36('0x2c')][_0xbb36('0x2d')]};});_0x1f6059['model']=_[_0xbb36('0x2e')](_0x24f231,'name');_0x1f6059[_0xbb36('0x2f')]=_['keys'](_0x7c9948[_0xbb36('0x2f')]);_0x1f6059['filters']=_[_0xbb36('0x30')](_0x1f6059[_0xbb36('0x31')],_0x1f6059[_0xbb36('0x2f')]);_0x4a3b55[_0xbb36('0x32')]=_[_0xbb36('0x30')](_0x1f6059[_0xbb36('0x31')],qs[_0xbb36('0x33')](_0x7c9948['query'][_0xbb36('0x33')]));_0x4a3b55['attributes']=_0x4a3b55[_0xbb36('0x32')][_0xbb36('0x34')]?_0x4a3b55['attributes']:_0x1f6059['model'];if(!_0x7c9948[_0xbb36('0x2f')][_0xbb36('0x35')](_0xbb36('0x36'))){_0x4a3b55[_0xbb36('0x20')]=qs[_0xbb36('0x20')](_0x7c9948['query'][_0xbb36('0x20')]);_0x4a3b55[_0xbb36('0x1e')]=qs[_0xbb36('0x1e')](_0x7c9948[_0xbb36('0x2f')]['offset']);}_0x4a3b55[_0xbb36('0x37')]=qs[_0xbb36('0x38')](_0x7c9948[_0xbb36('0x2f')]['sort']);_0x4a3b55[_0xbb36('0x39')]=qs[_0xbb36('0x3a')](_['pick'](_0x7c9948['query'],_0x1f6059[_0xbb36('0x3a')]),_0x24f231);if(_0x7c9948[_0xbb36('0x2f')]['filter']){_0x4a3b55['where']=_['merge'](_0x4a3b55['where'],{'$or':_[_0xbb36('0x2e')](_0x24f231,function(_0x43c926){if(_0x43c926['type']!=='VIRTUAL'){var _0x23cb6e={};_0x23cb6e[_0x43c926['name']]={'$like':'%'+_0x7c9948[_0xbb36('0x2f')]['filter']+'%'};return _0x23cb6e;}})});}_0x4a3b55=_[_0xbb36('0x3b')]({},_0x4a3b55,_0x7c9948[_0xbb36('0x3c')]);var _0x4f6709={'where':_0x4a3b55[_0xbb36('0x39')]};return db[_0xbb36('0x3d')]['count'](_0x4f6709)[_0xbb36('0x26')](function(_0x20c1d1){_0x4e417a[_0xbb36('0x21')]=_0x20c1d1;if(_0x7c9948['query'][_0xbb36('0x3e')]){_0x4a3b55['include']=[{'all':!![]}];}return db[_0xbb36('0x3d')][_0xbb36('0x3f')](_0x4a3b55);})[_0xbb36('0x26')](function(_0x4b4ea8){_0x4e417a[_0xbb36('0x40')]=_0x4b4ea8;return _0x4e417a;})['then'](respondWithFilteredResult(_0x4b5f9c,_0x4a3b55))['catch'](handleError(_0x4b5f9c,null));};exports[_0xbb36('0x41')]=function(_0x5622c8,_0x4433dc){var _0xbadba5={'raw':!![],'where':{'id':_0x5622c8[_0xbb36('0x42')]['id']}},_0x446b7d={};_0x446b7d['model']=_[_0xbb36('0x43')](db[_0xbb36('0x3d')]['rawAttributes']);_0x446b7d[_0xbb36('0x2f')]=_['keys'](_0x5622c8[_0xbb36('0x2f')]);_0x446b7d[_0xbb36('0x3a')]=_[_0xbb36('0x30')](_0x446b7d[_0xbb36('0x31')],_0x446b7d[_0xbb36('0x2f')]);_0xbadba5[_0xbb36('0x32')]=_[_0xbb36('0x30')](_0x446b7d['model'],qs[_0xbb36('0x33')](_0x5622c8[_0xbb36('0x2f')]['fields']));_0xbadba5[_0xbb36('0x32')]=_0xbadba5[_0xbb36('0x32')][_0xbb36('0x34')]?_0xbadba5[_0xbb36('0x32')]:_0x446b7d[_0xbb36('0x31')];if(_0x5622c8[_0xbb36('0x2f')][_0xbb36('0x3e')]){_0xbadba5[_0xbb36('0x44')]=[{'all':!![]}];}_0xbadba5=_['merge']({},_0xbadba5,_0x5622c8[_0xbb36('0x3c')]);return db[_0xbb36('0x3d')][_0xbb36('0x45')](_0xbadba5)[_0xbb36('0x26')](handleEntityNotFound(_0x4433dc,null))[_0xbb36('0x26')](respondWithResult(_0x4433dc,null))[_0xbb36('0x46')](handleError(_0x4433dc,null));};exports['create']=function(_0x4b5d9f,_0x3d7134){return db[_0xbb36('0x3d')][_0xbb36('0x47')](_0x4b5d9f['body'],{})[_0xbb36('0x26')](respondWithResult(_0x3d7134,0xc9))[_0xbb36('0x46')](handleError(_0x3d7134,null));};exports[_0xbb36('0x25')]=function(_0x422c4e,_0x4e62b3){if(_0x422c4e['body']['id']){delete _0x422c4e[_0xbb36('0x48')]['id'];}return db['SquareMessage']['find']({'where':{'id':_0x422c4e['params']['id']}})[_0xbb36('0x26')](handleEntityNotFound(_0x4e62b3,null))[_0xbb36('0x26')](saveUpdates(_0x422c4e[_0xbb36('0x48')],null))[_0xbb36('0x26')](respondWithResult(_0x4e62b3,null))['catch'](handleError(_0x4e62b3,null));};exports[_0xbb36('0x49')]=function(_0x56c6cf,_0x534ca4){return db['SquareMessage'][_0xbb36('0x45')]({'where':{'id':_0x56c6cf[_0xbb36('0x42')]['id']}})[_0xbb36('0x26')](handleEntityNotFound(_0x534ca4,null))[_0xbb36('0x26')](removeEntity(_0x534ca4,null))[_0xbb36('0x46')](handleError(_0x534ca4,null));};
\ No newline at end of file
index a736312..ab2537e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0d1b=['SquareMessage','lodash','util','../../config/logger','api','moment','request-promise','rimraf','./squareMessage.attributes','exports'];(function(_0x2da8d3,_0x3c8942){var _0x1cd226=function(_0x14a545){while(--_0x14a545){_0x2da8d3['push'](_0x2da8d3['shift']());}};_0x1cd226(++_0x3c8942);}(_0x0d1b,0x1cd));var _0xb0d1=function(_0x5c331f,_0xb99c06){_0x5c331f=_0x5c331f-0x0;var _0x3d50c6=_0x0d1b[_0x5c331f];return _0x3d50c6;};'use strict';var _=require(_0xb0d1('0x0'));var util=require(_0xb0d1('0x1'));var logger=require(_0xb0d1('0x2'))(_0xb0d1('0x3'));var moment=require(_0xb0d1('0x4'));var BPromise=require('bluebird');var rp=require(_0xb0d1('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xb0d1('0x6'));var config=require('../../config/environment');var attributes=require(_0xb0d1('0x7'));module[_0xb0d1('0x8')]=function(_0x259ef0,_0x59eedd){return _0x259ef0['define'](_0xb0d1('0x9'),attributes,{'tableName':'square_messages','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x0997=['../../config/environment','./squareMessage.attributes','exports','define','SquareMessage','square_messages','lodash','util','../../config/logger','api','moment','bluebird','request-promise','rimraf'];(function(_0x5a776b,_0x46f785){var _0xbbef59=function(_0x38313e){while(--_0x38313e){_0x5a776b['push'](_0x5a776b['shift']());}};_0xbbef59(++_0x46f785);}(_0x0997,0xd8));var _0x7099=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x0997[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x7099('0x0'));var util=require(_0x7099('0x1'));var logger=require(_0x7099('0x2'))(_0x7099('0x3'));var moment=require(_0x7099('0x4'));var BPromise=require(_0x7099('0x5'));var rp=require(_0x7099('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0x7099('0x7'));var config=require(_0x7099('0x8'));var attributes=require(_0x7099('0x9'));module[_0x7099('0xa')]=function(_0x36685f,_0x24e809){return _0x36685f[_0x7099('0xb')](_0x7099('0xc'),attributes,{'tableName':_0x7099('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 1aaa640..b6d0486 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6774=['stringify','error','SquareMessage,\x20%s,\x20%s','message','result','CreateSquareMessage','create','body','options','raw','then','catch','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','../../config/environment','client','http','info','request\x20sent','debug','SquareMessage,\x20%s,\x20%s,\x20%s'];(function(_0x9fd887,_0x47f76c){var _0x1a54ab=function(_0xb65c08){while(--_0xb65c08){_0x9fd887['push'](_0x9fd887['shift']());}};_0x1a54ab(++_0x47f76c);}(_0x6774,0xa2));var _0x4677=function(_0x38c37d,_0x1184ce){_0x38c37d=_0x38c37d-0x0;var _0x2780ed=_0x6774[_0x38c37d];return _0x2780ed;};'use strict';var _=require(_0x4677('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x4677('0x1'));var rs=require(_0x4677('0x2'));var fs=require('fs');var Redis=require(_0x4677('0x3'));var db=require(_0x4677('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x4677('0x5'))('rpc');var config=require(_0x4677('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x4677('0x7')][_0x4677('0x8')]({'port':0x232a});function respondWithRpcPromise(_0xdd64ba,_0x51c1aa,_0x4f1bc8){return new BPromise(function(_0x4ab789,_0x41937c){return client['request'](_0xdd64ba,_0x4f1bc8)['then'](function(_0xb2413f){logger[_0x4677('0x9')]('SquareMessage,\x20%s,\x20%s',_0x51c1aa,_0x4677('0xa'));logger[_0x4677('0xb')](_0x4677('0xc'),_0x51c1aa,_0x4677('0xa'),JSON[_0x4677('0xd')](_0xb2413f));if(_0xb2413f[_0x4677('0xe')]){if(_0xb2413f['error']['code']===0x1f4){logger[_0x4677('0xe')](_0x4677('0xf'),_0x51c1aa,_0xb2413f['error'][_0x4677('0x10')]);return _0x41937c(_0xb2413f['error'][_0x4677('0x10')]);}logger[_0x4677('0xe')](_0x4677('0xf'),_0x51c1aa,_0xb2413f['error'][_0x4677('0x10')]);return _0x4ab789(_0xb2413f[_0x4677('0xe')][_0x4677('0x10')]);}else{logger[_0x4677('0x9')]('SquareMessage,\x20%s,\x20%s',_0x51c1aa,_0x4677('0xa'));_0x4ab789(_0xb2413f[_0x4677('0x11')][_0x4677('0x10')]);}})['catch'](function(_0x2f933b){logger[_0x4677('0xe')](_0x4677('0xf'),_0x51c1aa,_0x2f933b);_0x41937c(_0x2f933b);});});}exports[_0x4677('0x12')]=function(_0x10ff5d){var _0x12daca=this;return new Promise(function(_0x4615ae,_0x17ff3f){return db['SquareMessage'][_0x4677('0x13')](_0x10ff5d[_0x4677('0x14')],{'raw':_0x10ff5d[_0x4677('0x15')]?_0x10ff5d[_0x4677('0x15')][_0x4677('0x16')]===undefined?!![]:![]:!![]})[_0x4677('0x17')](function(_0x36b7e1){logger[_0x4677('0x9')](_0x4677('0x12'),_0x10ff5d);logger[_0x4677('0xb')](_0x4677('0x12'),_0x10ff5d,JSON[_0x4677('0xd')](_0x36b7e1));_0x4615ae(_0x36b7e1);})[_0x4677('0x18')](function(_0x5e9191){logger[_0x4677('0xe')]('CreateSquareMessage',_0x5e9191[_0x4677('0x10')],_0x10ff5d);_0x17ff3f(_0x12daca[_0x4677('0xe')](0x1f4,_0x5e9191[_0x4677('0x10')]));});});};
\ No newline at end of file
+var _0x1111=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','SquareMessage,\x20%s,\x20%s','request\x20sent','debug','SquareMessage,\x20%s,\x20%s,\x20%s','error','code','message','CreateSquareMessage','SquareMessage','options','raw','stringify','lodash','util','moment','bluebird'];(function(_0x485b5a,_0x2b289b){var _0xd2b34d=function(_0x34dcbd){while(--_0x34dcbd){_0x485b5a['push'](_0x485b5a['shift']());}};_0xd2b34d(++_0x2b289b);}(_0x1111,0x88));var _0x1111=function(_0x2dd36b,_0x15d3e8){_0x2dd36b=_0x2dd36b-0x0;var _0x3b0124=_0x1111[_0x2dd36b];return _0x3b0124;};'use strict';var _=require(_0x1111('0x0'));var util=require(_0x1111('0x1'));var moment=require(_0x1111('0x2'));var BPromise=require(_0x1111('0x3'));var rs=require(_0x1111('0x4'));var fs=require('fs');var Redis=require(_0x1111('0x5'));var db=require(_0x1111('0x6'))['db'];var utils=require(_0x1111('0x7'));var logger=require(_0x1111('0x8'))(_0x1111('0x9'));var config=require(_0x1111('0xa'));var jayson=require(_0x1111('0xb'));var client=jayson['client'][_0x1111('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x10f81e,_0x47ddee,_0x4eecaa){return new BPromise(function(_0x1da5a6,_0x74905){return client[_0x1111('0xd')](_0x10f81e,_0x4eecaa)[_0x1111('0xe')](function(_0x4215ce){logger[_0x1111('0xf')](_0x1111('0x10'),_0x47ddee,_0x1111('0x11'));logger[_0x1111('0x12')](_0x1111('0x13'),_0x47ddee,_0x1111('0x11'),JSON['stringify'](_0x4215ce));if(_0x4215ce[_0x1111('0x14')]){if(_0x4215ce[_0x1111('0x14')][_0x1111('0x15')]===0x1f4){logger[_0x1111('0x14')](_0x1111('0x10'),_0x47ddee,_0x4215ce[_0x1111('0x14')][_0x1111('0x16')]);return _0x74905(_0x4215ce[_0x1111('0x14')][_0x1111('0x16')]);}logger[_0x1111('0x14')](_0x1111('0x10'),_0x47ddee,_0x4215ce[_0x1111('0x14')][_0x1111('0x16')]);return _0x1da5a6(_0x4215ce[_0x1111('0x14')]['message']);}else{logger['info'](_0x1111('0x10'),_0x47ddee,_0x1111('0x11'));_0x1da5a6(_0x4215ce['result'][_0x1111('0x16')]);}})['catch'](function(_0x560d4b){logger['error'](_0x1111('0x10'),_0x47ddee,_0x560d4b);_0x74905(_0x560d4b);});});}exports[_0x1111('0x17')]=function(_0x335d73){var _0xe0ea6b=this;return new Promise(function(_0x16d887,_0x1d27ad){return db[_0x1111('0x18')]['create'](_0x335d73['body'],{'raw':_0x335d73[_0x1111('0x19')]?_0x335d73['options'][_0x1111('0x1a')]===undefined?!![]:![]:!![]})[_0x1111('0xe')](function(_0x16a27e){logger[_0x1111('0xf')](_0x1111('0x17'),_0x335d73);logger[_0x1111('0x12')](_0x1111('0x17'),_0x335d73,JSON[_0x1111('0x1b')](_0x16a27e));_0x16d887(_0x16a27e);})['catch'](function(_0x1f075d){logger[_0x1111('0x14')]('CreateSquareMessage',_0x1f075d[_0x1111('0x16')],_0x335d73);_0x1d27ad(_0xe0ea6b[_0x1111('0x14')](0x1f4,_0x1f075d['message']));});});};
\ No newline at end of file
index 3f57203..310f640 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe593=['destroy','exports','util','path','Router','fs-extra','../../components/auth/service','../../config/environment','./squareOdbc.controller','get','isAuthenticated','/:id','/:id/test','15s','test','post','create','put','update'];(function(_0x2f82ec,_0x1d1c3b){var _0x2733bf=function(_0x3f36eb){while(--_0x3f36eb){_0x2f82ec['push'](_0x2f82ec['shift']());}};_0x2733bf(++_0x1d1c3b);}(_0xe593,0x9a));var _0x3e59=function(_0x3a8474,_0x11b3e2){_0x3a8474=_0x3a8474-0x0;var _0x5a6501=_0xe593[_0x3a8474];return _0x5a6501;};'use strict';var multer=require('multer');var util=require(_0x3e59('0x0'));var path=require(_0x3e59('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x3e59('0x2')]();var fs_extra=require(_0x3e59('0x3'));var auth=require(_0x3e59('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0x3e59('0x5'));var controller=require(_0x3e59('0x6'));router[_0x3e59('0x7')]('/',auth[_0x3e59('0x8')](),controller['index']);router[_0x3e59('0x7')](_0x3e59('0x9'),auth[_0x3e59('0x8')](),controller['show']);router[_0x3e59('0x7')](_0x3e59('0xa'),auth[_0x3e59('0x8')](),timeout(_0x3e59('0xb')),controller[_0x3e59('0xc')]);router[_0x3e59('0xd')]('/',auth[_0x3e59('0x8')](),controller[_0x3e59('0xe')]);router[_0x3e59('0xf')](_0x3e59('0x9'),auth[_0x3e59('0x8')](),controller[_0x3e59('0x10')]);router['delete'](_0x3e59('0x9'),auth['isAuthenticated'](),controller[_0x3e59('0x11')]);module[_0x3e59('0x12')]=router;
\ No newline at end of file
+var _0xec8c=['exports','util','connect-timeout','express','../../components/auth/service','../../config/environment','./squareOdbc.controller','get','isAuthenticated','index','/:id','show','test','post','put','delete','destroy'];(function(_0x3d2012,_0x3d02b9){var _0x53d542=function(_0x8f2be8){while(--_0x8f2be8){_0x3d2012['push'](_0x3d2012['shift']());}};_0x53d542(++_0x3d02b9);}(_0xec8c,0xde));var _0xcec8=function(_0x424c0f,_0x31a27d){_0x424c0f=_0x424c0f-0x0;var _0x265bf4=_0xec8c[_0x424c0f];return _0x265bf4;};'use strict';var multer=require('multer');var util=require(_0xcec8('0x0'));var path=require('path');var timeout=require(_0xcec8('0x1'));var express=require(_0xcec8('0x2'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xcec8('0x3'));var interaction=require('../../components/interaction/service');var config=require(_0xcec8('0x4'));var controller=require(_0xcec8('0x5'));router[_0xcec8('0x6')]('/',auth[_0xcec8('0x7')](),controller[_0xcec8('0x8')]);router[_0xcec8('0x6')](_0xcec8('0x9'),auth[_0xcec8('0x7')](),controller[_0xcec8('0xa')]);router[_0xcec8('0x6')]('/:id/test',auth[_0xcec8('0x7')](),timeout('15s'),controller[_0xcec8('0xb')]);router[_0xcec8('0xc')]('/',auth[_0xcec8('0x7')](),controller['create']);router[_0xcec8('0xd')]('/:id',auth[_0xcec8('0x7')](),controller['update']);router[_0xcec8('0xe')](_0xcec8('0x9'),auth[_0xcec8('0x7')](),controller[_0xcec8('0xf')]);module[_0xcec8('0x10')]=router;
\ No newline at end of file
index 437b69a..d36bff2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8500=['exports','STRING','name','sequelize'];(function(_0x154608,_0x2568f7){var _0x114683=function(_0x599dd){while(--_0x599dd){_0x154608['push'](_0x154608['shift']());}};_0x114683(++_0x2568f7);}(_0x8500,0x13f));var _0x0850=function(_0xc3bee3,_0x3ca68f){_0xc3bee3=_0xc3bee3-0x0;var _0x47cb50=_0x8500[_0xc3bee3];return _0x47cb50;};'use strict';var Sequelize=require(_0x0850('0x0'));module[_0x0850('0x1')]={'name':{'type':Sequelize[_0x0850('0x2')],'unique':_0x0850('0x3'),'allowNull':![]},'dsn':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x0850('0x2')]}};
\ No newline at end of file
+var _0xad8a=['STRING','sequelize','exports'];(function(_0x4241c1,_0x2993b){var _0x166ec5=function(_0x1d1a1f){while(--_0x1d1a1f){_0x4241c1['push'](_0x4241c1['shift']());}};_0x166ec5(++_0x2993b);}(_0xad8a,0x130));var _0xaad8=function(_0x5f4940,_0x299817){_0x5f4940=_0x5f4940-0x0;var _0x4e053b=_0xad8a[_0x5f4940];return _0x4e053b;};'use strict';var Sequelize=require(_0xaad8('0x0'));module[_0xaad8('0x1')]={'name':{'type':Sequelize[_0xaad8('0x2')],'unique':'name','allowNull':![]},'dsn':{'type':Sequelize[_0xaad8('0x2')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
index fab233d..81eebb1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc901=['pick','filter','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','length','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','test','dsn','rimraf','request-promise','moment','bluebird','mustache','path','sox','ejs','fs-extra','lodash','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','json','offset','undefined','limit','count','set','apply','reject','save','then','destroy','ODBC','UserProfileResource','end','error','stack','name','status','send','map','SquareOdbc','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','fields','attributes','hasOwnProperty','nolimit','order','sort','where'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xc901,0x11a));var _0x1c90=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0xc901[_0x42cae2];return _0x5f256f;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x1c90('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x1c90('0x1'));var moment=require(_0x1c90('0x2'));var BPromise=require(_0x1c90('0x3'));var Mustache=require(_0x1c90('0x4'));var util=require('util');var path=require(_0x1c90('0x5'));var sox=require(_0x1c90('0x6'));var csv=require('to-csv');var ejs=require(_0x1c90('0x7'));var fs=require('fs');var fs_extra=require(_0x1c90('0x8'));var _=require(_0x1c90('0x9'));var squel=require('squel');var crypto=require(_0x1c90('0xa'));var jsforce=require(_0x1c90('0xb'));var deskjs=require(_0x1c90('0xc'));var toCsv=require(_0x1c90('0xd'));var querystring=require(_0x1c90('0xe'));var Papa=require(_0x1c90('0xf'));var Redis=require(_0x1c90('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x1c90('0x11'));var as=require(_0x1c90('0x12'));var hardwareService=require(_0x1c90('0x13'));var logger=require('../../config/logger')(_0x1c90('0x14'));var utils=require(_0x1c90('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0x1c90('0x16'));var db=require(_0x1c90('0x17'))['db'];function respondWithStatusCode(_0xf96471,_0xbff506){_0xbff506=_0xbff506||0xcc;return function(_0x3b31e3){if(_0x3b31e3){return _0xf96471[_0x1c90('0x18')](_0xbff506);}return _0xf96471['status'](_0xbff506)['end']();};}function respondWithResult(_0x5e63c4,_0x55c389){_0x55c389=_0x55c389||0xc8;return function(_0xe3e21d){if(_0xe3e21d){return _0x5e63c4['status'](_0x55c389)[_0x1c90('0x19')](_0xe3e21d);}};}function respondWithFilteredResult(_0x49e410,_0x577383){return function(_0x1a26ed){if(_0x1a26ed){var _0x432b28=typeof _0x577383[_0x1c90('0x1a')]===_0x1c90('0x1b')&&typeof _0x577383[_0x1c90('0x1c')]===_0x1c90('0x1b');var _0x3bd104=_0x1a26ed[_0x1c90('0x1d')];var _0xc73c82=_0x432b28?0x0:_0x577383[_0x1c90('0x1a')];var _0x2396e1=_0x432b28?_0x1a26ed[_0x1c90('0x1d')]:_0x577383[_0x1c90('0x1a')]+_0x577383[_0x1c90('0x1c')];var _0x31f4a4;if(_0x2396e1>=_0x3bd104){_0x2396e1=_0x3bd104;_0x31f4a4=0xc8;}else{_0x31f4a4=0xce;}_0x49e410['status'](_0x31f4a4);return _0x49e410[_0x1c90('0x1e')]('Content-Range',_0xc73c82+'-'+_0x2396e1+'/'+_0x3bd104)[_0x1c90('0x19')](_0x1a26ed);}return null;};}function patchUpdates(_0x4c8940){return function(_0x57c3b4){try{jsonpatch[_0x1c90('0x1f')](_0x57c3b4,_0x4c8940,!![]);}catch(_0x3269d7){return BPromise[_0x1c90('0x20')](_0x3269d7);}return _0x57c3b4[_0x1c90('0x21')]();};}function saveUpdates(_0x39e17a,_0x2803df){return function(_0xd1cf82){if(_0xd1cf82){return _0xd1cf82['update'](_0x39e17a)[_0x1c90('0x22')](function(_0x1270ed){return _0x1270ed;});}return null;};}function removeEntity(_0x248284,_0x36a862){return function(_0x18277b){if(_0x18277b){return _0x18277b[_0x1c90('0x23')]()[_0x1c90('0x22')](function(){var _0x15b185=_0x18277b['get']({'plain':!![]});var _0x211150=_0x1c90('0x24');return db[_0x1c90('0x25')][_0x1c90('0x23')]({'where':{'type':_0x211150,'resourceId':_0x15b185['id']}})['then'](function(){return _0x18277b;});})[_0x1c90('0x22')](function(){_0x248284['status'](0xcc)[_0x1c90('0x26')]();});}};}function handleEntityNotFound(_0x1c408f,_0x4c80e4){return function(_0x2acfe8){if(!_0x2acfe8){_0x1c408f['sendStatus'](0x194);}return _0x2acfe8;};}function handleError(_0x7be941,_0x59adb0){_0x59adb0=_0x59adb0||0x1f4;return function(_0x93220d){logger[_0x1c90('0x27')](_0x93220d[_0x1c90('0x28')]);if(_0x93220d[_0x1c90('0x29')]){delete _0x93220d[_0x1c90('0x29')];}_0x7be941[_0x1c90('0x2a')](_0x59adb0)[_0x1c90('0x2b')](_0x93220d);};}exports['index']=function(_0x1327a4,_0x23a114){var _0x275784={},_0x5f29ea={},_0x262f9b={'count':0x0,'rows':[]};var _0x15c8b0=_[_0x1c90('0x2c')](db[_0x1c90('0x2d')][_0x1c90('0x2e')],function(_0xa8a130){return{'name':_0xa8a130[_0x1c90('0x2f')],'type':_0xa8a130[_0x1c90('0x30')][_0x1c90('0x31')]};});_0x5f29ea[_0x1c90('0x32')]=_[_0x1c90('0x2c')](_0x15c8b0,_0x1c90('0x29'));_0x5f29ea[_0x1c90('0x33')]=_[_0x1c90('0x34')](_0x1327a4[_0x1c90('0x33')]);_0x5f29ea[_0x1c90('0x35')]=_[_0x1c90('0x36')](_0x5f29ea[_0x1c90('0x32')],_0x5f29ea['query']);_0x275784['attributes']=_[_0x1c90('0x36')](_0x5f29ea[_0x1c90('0x32')],qs[_0x1c90('0x37')](_0x1327a4[_0x1c90('0x33')][_0x1c90('0x37')]));_0x275784[_0x1c90('0x38')]=_0x275784[_0x1c90('0x38')]['length']?_0x275784[_0x1c90('0x38')]:_0x5f29ea[_0x1c90('0x32')];if(!_0x1327a4[_0x1c90('0x33')][_0x1c90('0x39')](_0x1c90('0x3a'))){_0x275784[_0x1c90('0x1c')]=qs[_0x1c90('0x1c')](_0x1327a4['query'][_0x1c90('0x1c')]);_0x275784[_0x1c90('0x1a')]=qs[_0x1c90('0x1a')](_0x1327a4[_0x1c90('0x33')]['offset']);}_0x275784[_0x1c90('0x3b')]=qs[_0x1c90('0x3c')](_0x1327a4[_0x1c90('0x33')][_0x1c90('0x3c')]);_0x275784[_0x1c90('0x3d')]=qs[_0x1c90('0x35')](_[_0x1c90('0x3e')](_0x1327a4['query'],_0x5f29ea['filters']),_0x15c8b0);if(_0x1327a4[_0x1c90('0x33')][_0x1c90('0x3f')]){_0x275784['where']=_['merge'](_0x275784[_0x1c90('0x3d')],{'$or':_[_0x1c90('0x2c')](_0x15c8b0,function(_0x137248){if(_0x137248[_0x1c90('0x30')]!==_0x1c90('0x40')){var _0xd7322a={};_0xd7322a[_0x137248[_0x1c90('0x29')]]={'$like':'%'+_0x1327a4['query'][_0x1c90('0x3f')]+'%'};return _0xd7322a;}})});}_0x275784=_['merge']({},_0x275784,_0x1327a4[_0x1c90('0x41')]);var _0x249d78={'where':_0x275784[_0x1c90('0x3d')]};return db[_0x1c90('0x2d')][_0x1c90('0x1d')](_0x249d78)['then'](function(_0x2ba161){_0x262f9b[_0x1c90('0x1d')]=_0x2ba161;if(_0x1327a4[_0x1c90('0x33')][_0x1c90('0x42')]){_0x275784[_0x1c90('0x43')]=[{'all':!![]}];}return db[_0x1c90('0x2d')][_0x1c90('0x44')](_0x275784);})[_0x1c90('0x22')](function(_0x25f8d8){_0x262f9b[_0x1c90('0x45')]=_0x25f8d8;return _0x262f9b;})[_0x1c90('0x22')](respondWithFilteredResult(_0x23a114,_0x275784))[_0x1c90('0x46')](handleError(_0x23a114,null));};exports[_0x1c90('0x47')]=function(_0x489633,_0x2e4ee1){var _0x5eddb2={'raw':!![],'where':{'id':_0x489633[_0x1c90('0x48')]['id']}},_0xd70faf={};_0xd70faf[_0x1c90('0x32')]=_[_0x1c90('0x34')](db[_0x1c90('0x2d')][_0x1c90('0x2e')]);_0xd70faf[_0x1c90('0x33')]=_['keys'](_0x489633[_0x1c90('0x33')]);_0xd70faf[_0x1c90('0x35')]=_[_0x1c90('0x36')](_0xd70faf['model'],_0xd70faf[_0x1c90('0x33')]);_0x5eddb2[_0x1c90('0x38')]=_[_0x1c90('0x36')](_0xd70faf[_0x1c90('0x32')],qs[_0x1c90('0x37')](_0x489633['query'][_0x1c90('0x37')]));_0x5eddb2['attributes']=_0x5eddb2[_0x1c90('0x38')][_0x1c90('0x49')]?_0x5eddb2[_0x1c90('0x38')]:_0xd70faf[_0x1c90('0x32')];if(_0x489633[_0x1c90('0x33')][_0x1c90('0x42')]){_0x5eddb2[_0x1c90('0x43')]=[{'all':!![]}];}_0x5eddb2=_['merge']({},_0x5eddb2,_0x489633[_0x1c90('0x41')]);return db[_0x1c90('0x2d')][_0x1c90('0x4a')](_0x5eddb2)[_0x1c90('0x22')](handleEntityNotFound(_0x2e4ee1,null))['then'](respondWithResult(_0x2e4ee1,null))[_0x1c90('0x46')](handleError(_0x2e4ee1,null));};exports[_0x1c90('0x4b')]=function(_0x2f5452,_0x2bf736){return db[_0x1c90('0x2d')][_0x1c90('0x4b')](_0x2f5452[_0x1c90('0x4c')],{})['then'](function(_0x309b8c){var _0x29095a=_0x2f5452[_0x1c90('0x4d')][_0x1c90('0x4e')]({'plain':!![]});if(!_0x29095a)throw new Error(_0x1c90('0x4f'));if(_0x29095a[_0x1c90('0x50')]===_0x1c90('0x4d')){var _0x1b8b41=_0x309b8c[_0x1c90('0x4e')]({'plain':!![]});var _0x5c564f='ODBC';return db[_0x1c90('0x51')][_0x1c90('0x4a')]({'where':{'name':_0x5c564f,'userProfileId':_0x29095a['userProfileId']},'raw':!![]})[_0x1c90('0x22')](function(_0x40fc57){if(_0x40fc57&&_0x40fc57['autoAssociation']===0x0){return db['UserProfileResource'][_0x1c90('0x4b')]({'name':_0x1b8b41[_0x1c90('0x29')],'resourceId':_0x1b8b41['id'],'type':_0x40fc57[_0x1c90('0x29')],'sectionId':_0x40fc57['id']},{})['then'](function(){return _0x309b8c;});}else{return _0x309b8c;}})[_0x1c90('0x46')](function(_0x29ab65){logger[_0x1c90('0x27')](_0x1c90('0x52'),_0x29ab65);throw _0x29ab65;});}return _0x309b8c;})[_0x1c90('0x22')](respondWithResult(_0x2bf736,0xc9))[_0x1c90('0x46')](handleError(_0x2bf736,null));};exports[_0x1c90('0x53')]=function(_0x2f69bf,_0x40f8db){if(_0x2f69bf[_0x1c90('0x4c')]['id']){delete _0x2f69bf[_0x1c90('0x4c')]['id'];}return db[_0x1c90('0x2d')]['find']({'where':{'id':_0x2f69bf[_0x1c90('0x48')]['id']}})[_0x1c90('0x22')](handleEntityNotFound(_0x40f8db,null))[_0x1c90('0x22')](saveUpdates(_0x2f69bf[_0x1c90('0x4c')],null))[_0x1c90('0x22')](respondWithResult(_0x40f8db,null))[_0x1c90('0x46')](handleError(_0x40f8db,null));};exports[_0x1c90('0x23')]=function(_0x318ac2,_0x4bd50e){return db['SquareOdbc']['find']({'where':{'id':_0x318ac2[_0x1c90('0x48')]['id']}})[_0x1c90('0x22')](handleEntityNotFound(_0x4bd50e,null))[_0x1c90('0x22')](removeEntity(_0x4bd50e,null))['catch'](handleError(_0x4bd50e,null));};exports[_0x1c90('0x54')]=function(_0x286d63,_0x2eb69,_0x5c51d2){var _0x199e47;return db[_0x1c90('0x2d')][_0x1c90('0x4a')]({'where':{'id':_0x286d63['params']['id']},'attributes':['id','dsn']})['then'](handleEntityNotFound(_0x2eb69,null))[_0x1c90('0x22')](function(_0x27e04b){if(_0x27e04b){var _0x4e94aa=require('odbc')();_0x4e94aa['openSync'](_0x27e04b[_0x1c90('0x55')]);_0x4e94aa['closeSync']();return _0x27e04b;}})['then'](respondWithResult(_0x2eb69,null))[_0x1c90('0x46')](handleError(_0x2eb69,null));};
\ No newline at end of file
+var _0x92ab=['querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','status','undefined','limit','count','offset','Content-Range','json','apply','reject','save','update','then','destroy','get','UserProfileResource','stack','name','index','map','SquareOdbc','rawAttributes','fieldName','type','key','keys','query','filters','model','intersection','fields','attributes','length','hasOwnProperty','order','sort','where','filter','merge','VIRTUAL','includeAll','catch','show','params','include','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','test','odbc','openSync','dsn','closeSync','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x92ab,0x1a7));var _0xb92a=function(_0x2a9831,_0x42f7e8){_0x2a9831=_0x2a9831-0x0;var _0x184c16=_0x92ab[_0x2a9831];return _0x184c16;};'use strict';var emlformat=require(_0xb92a('0x0'));var rimraf=require(_0xb92a('0x1'));var zipdir=require(_0xb92a('0x2'));var jsonpatch=require(_0xb92a('0x3'));var rp=require(_0xb92a('0x4'));var moment=require(_0xb92a('0x5'));var BPromise=require(_0xb92a('0x6'));var Mustache=require(_0xb92a('0x7'));var util=require(_0xb92a('0x8'));var path=require('path');var sox=require(_0xb92a('0x9'));var csv=require(_0xb92a('0xa'));var ejs=require(_0xb92a('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xb92a('0xc'));var squel=require(_0xb92a('0xd'));var crypto=require(_0xb92a('0xe'));var jsforce=require(_0xb92a('0xf'));var deskjs=require(_0xb92a('0x10'));var toCsv=require(_0xb92a('0xa'));var querystring=require(_0xb92a('0x11'));var Papa=require(_0xb92a('0x12'));var Redis=require(_0xb92a('0x13'));var authService=require('../../components/auth/service');var qs=require(_0xb92a('0x14'));var as=require(_0xb92a('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xb92a('0x16'))('api');var utils=require(_0xb92a('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0xb92a('0x18'));var db=require(_0xb92a('0x19'))['db'];function respondWithStatusCode(_0xbb88e4,_0x31e3e3){_0x31e3e3=_0x31e3e3||0xcc;return function(_0x83c761){if(_0x83c761){return _0xbb88e4[_0xb92a('0x1a')](_0x31e3e3);}return _0xbb88e4['status'](_0x31e3e3)[_0xb92a('0x1b')]();};}function respondWithResult(_0x3e80de,_0x26a32d){_0x26a32d=_0x26a32d||0xc8;return function(_0x38e3ee){if(_0x38e3ee){return _0x3e80de[_0xb92a('0x1c')](_0x26a32d)['json'](_0x38e3ee);}};}function respondWithFilteredResult(_0x11b109,_0x217c02){return function(_0x3851b7){if(_0x3851b7){var _0x117625=typeof _0x217c02['offset']===_0xb92a('0x1d')&&typeof _0x217c02[_0xb92a('0x1e')]===_0xb92a('0x1d');var _0x575078=_0x3851b7[_0xb92a('0x1f')];var _0x4a0864=_0x117625?0x0:_0x217c02[_0xb92a('0x20')];var _0x26d205=_0x117625?_0x3851b7[_0xb92a('0x1f')]:_0x217c02['offset']+_0x217c02[_0xb92a('0x1e')];var _0x3ac182;if(_0x26d205>=_0x575078){_0x26d205=_0x575078;_0x3ac182=0xc8;}else{_0x3ac182=0xce;}_0x11b109[_0xb92a('0x1c')](_0x3ac182);return _0x11b109['set'](_0xb92a('0x21'),_0x4a0864+'-'+_0x26d205+'/'+_0x575078)[_0xb92a('0x22')](_0x3851b7);}return null;};}function patchUpdates(_0x3d49b8){return function(_0x16dc5e){try{jsonpatch[_0xb92a('0x23')](_0x16dc5e,_0x3d49b8,!![]);}catch(_0x39f31e){return BPromise[_0xb92a('0x24')](_0x39f31e);}return _0x16dc5e[_0xb92a('0x25')]();};}function saveUpdates(_0x736a1f,_0x9dbb2c){return function(_0x210023){if(_0x210023){return _0x210023[_0xb92a('0x26')](_0x736a1f)[_0xb92a('0x27')](function(_0x5e0fdf){return _0x5e0fdf;});}return null;};}function removeEntity(_0x3ee4f5,_0x2d06d5){return function(_0x200589){if(_0x200589){return _0x200589[_0xb92a('0x28')]()[_0xb92a('0x27')](function(){var _0xccde96=_0x200589[_0xb92a('0x29')]({'plain':!![]});var _0x35add5='ODBC';return db[_0xb92a('0x2a')][_0xb92a('0x28')]({'where':{'type':_0x35add5,'resourceId':_0xccde96['id']}})[_0xb92a('0x27')](function(){return _0x200589;});})[_0xb92a('0x27')](function(){_0x3ee4f5['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x1bef9a,_0x155170){return function(_0x53b9c0){if(!_0x53b9c0){_0x1bef9a[_0xb92a('0x1a')](0x194);}return _0x53b9c0;};}function handleError(_0x15d187,_0x37a46f){_0x37a46f=_0x37a46f||0x1f4;return function(_0x26d9f1){logger['error'](_0x26d9f1[_0xb92a('0x2b')]);if(_0x26d9f1[_0xb92a('0x2c')]){delete _0x26d9f1['name'];}_0x15d187['status'](_0x37a46f)['send'](_0x26d9f1);};}exports[_0xb92a('0x2d')]=function(_0x1c21ca,_0x3ef2e9){var _0x40e837={},_0x4d3952={},_0x4dee73={'count':0x0,'rows':[]};var _0x2c375b=_[_0xb92a('0x2e')](db[_0xb92a('0x2f')][_0xb92a('0x30')],function(_0x150895){return{'name':_0x150895[_0xb92a('0x31')],'type':_0x150895[_0xb92a('0x32')][_0xb92a('0x33')]};});_0x4d3952['model']=_[_0xb92a('0x2e')](_0x2c375b,_0xb92a('0x2c'));_0x4d3952['query']=_[_0xb92a('0x34')](_0x1c21ca[_0xb92a('0x35')]);_0x4d3952[_0xb92a('0x36')]=_['intersection'](_0x4d3952[_0xb92a('0x37')],_0x4d3952[_0xb92a('0x35')]);_0x40e837['attributes']=_[_0xb92a('0x38')](_0x4d3952[_0xb92a('0x37')],qs[_0xb92a('0x39')](_0x1c21ca['query'][_0xb92a('0x39')]));_0x40e837[_0xb92a('0x3a')]=_0x40e837[_0xb92a('0x3a')][_0xb92a('0x3b')]?_0x40e837[_0xb92a('0x3a')]:_0x4d3952[_0xb92a('0x37')];if(!_0x1c21ca['query'][_0xb92a('0x3c')]('nolimit')){_0x40e837[_0xb92a('0x1e')]=qs[_0xb92a('0x1e')](_0x1c21ca[_0xb92a('0x35')][_0xb92a('0x1e')]);_0x40e837['offset']=qs['offset'](_0x1c21ca[_0xb92a('0x35')][_0xb92a('0x20')]);}_0x40e837[_0xb92a('0x3d')]=qs[_0xb92a('0x3e')](_0x1c21ca[_0xb92a('0x35')][_0xb92a('0x3e')]);_0x40e837[_0xb92a('0x3f')]=qs[_0xb92a('0x36')](_['pick'](_0x1c21ca[_0xb92a('0x35')],_0x4d3952['filters']),_0x2c375b);if(_0x1c21ca[_0xb92a('0x35')][_0xb92a('0x40')]){_0x40e837['where']=_[_0xb92a('0x41')](_0x40e837[_0xb92a('0x3f')],{'$or':_[_0xb92a('0x2e')](_0x2c375b,function(_0x72a7c1){if(_0x72a7c1[_0xb92a('0x32')]!==_0xb92a('0x42')){var _0x2c90fe={};_0x2c90fe[_0x72a7c1[_0xb92a('0x2c')]]={'$like':'%'+_0x1c21ca['query']['filter']+'%'};return _0x2c90fe;}})});}_0x40e837=_[_0xb92a('0x41')]({},_0x40e837,_0x1c21ca['options']);var _0x3253d2={'where':_0x40e837[_0xb92a('0x3f')]};return db[_0xb92a('0x2f')][_0xb92a('0x1f')](_0x3253d2)['then'](function(_0x55fd49){_0x4dee73[_0xb92a('0x1f')]=_0x55fd49;if(_0x1c21ca['query'][_0xb92a('0x43')]){_0x40e837['include']=[{'all':!![]}];}return db[_0xb92a('0x2f')]['findAll'](_0x40e837);})['then'](function(_0x2f5d05){_0x4dee73['rows']=_0x2f5d05;return _0x4dee73;})['then'](respondWithFilteredResult(_0x3ef2e9,_0x40e837))[_0xb92a('0x44')](handleError(_0x3ef2e9,null));};exports[_0xb92a('0x45')]=function(_0x598f30,_0x37e342){var _0x16044d={'raw':!![],'where':{'id':_0x598f30[_0xb92a('0x46')]['id']}},_0x109938={};_0x109938['model']=_[_0xb92a('0x34')](db[_0xb92a('0x2f')]['rawAttributes']);_0x109938[_0xb92a('0x35')]=_['keys'](_0x598f30[_0xb92a('0x35')]);_0x109938[_0xb92a('0x36')]=_[_0xb92a('0x38')](_0x109938[_0xb92a('0x37')],_0x109938[_0xb92a('0x35')]);_0x16044d[_0xb92a('0x3a')]=_[_0xb92a('0x38')](_0x109938[_0xb92a('0x37')],qs[_0xb92a('0x39')](_0x598f30[_0xb92a('0x35')][_0xb92a('0x39')]));_0x16044d[_0xb92a('0x3a')]=_0x16044d[_0xb92a('0x3a')]['length']?_0x16044d[_0xb92a('0x3a')]:_0x109938[_0xb92a('0x37')];if(_0x598f30[_0xb92a('0x35')][_0xb92a('0x43')]){_0x16044d[_0xb92a('0x47')]=[{'all':!![]}];}_0x16044d=_[_0xb92a('0x41')]({},_0x16044d,_0x598f30['options']);return db[_0xb92a('0x2f')][_0xb92a('0x48')](_0x16044d)[_0xb92a('0x27')](handleEntityNotFound(_0x37e342,null))[_0xb92a('0x27')](respondWithResult(_0x37e342,null))[_0xb92a('0x44')](handleError(_0x37e342,null));};exports[_0xb92a('0x49')]=function(_0x5630ec,_0x2b9bda){return db[_0xb92a('0x2f')][_0xb92a('0x49')](_0x5630ec['body'],{})[_0xb92a('0x27')](function(_0x59f60c){var _0x5d681d=_0x5630ec[_0xb92a('0x4a')][_0xb92a('0x29')]({'plain':!![]});if(!_0x5d681d)throw new Error(_0xb92a('0x4b'));if(_0x5d681d[_0xb92a('0x4c')]===_0xb92a('0x4a')){var _0xd65c4d=_0x59f60c[_0xb92a('0x29')]({'plain':!![]});var _0x2c5137='ODBC';return db[_0xb92a('0x4d')][_0xb92a('0x48')]({'where':{'name':_0x2c5137,'userProfileId':_0x5d681d[_0xb92a('0x4e')]},'raw':!![]})[_0xb92a('0x27')](function(_0x2d0cd2){if(_0x2d0cd2&&_0x2d0cd2[_0xb92a('0x4f')]===0x0){return db[_0xb92a('0x2a')][_0xb92a('0x49')]({'name':_0xd65c4d[_0xb92a('0x2c')],'resourceId':_0xd65c4d['id'],'type':_0x2d0cd2['name'],'sectionId':_0x2d0cd2['id']},{})[_0xb92a('0x27')](function(){return _0x59f60c;});}else{return _0x59f60c;}})[_0xb92a('0x44')](function(_0xe672f8){logger[_0xb92a('0x50')](_0xb92a('0x51'),_0xe672f8);throw _0xe672f8;});}return _0x59f60c;})['then'](respondWithResult(_0x2b9bda,0xc9))['catch'](handleError(_0x2b9bda,null));};exports[_0xb92a('0x26')]=function(_0x18c9c2,_0x2aae01){if(_0x18c9c2[_0xb92a('0x52')]['id']){delete _0x18c9c2[_0xb92a('0x52')]['id'];}return db[_0xb92a('0x2f')][_0xb92a('0x48')]({'where':{'id':_0x18c9c2[_0xb92a('0x46')]['id']}})[_0xb92a('0x27')](handleEntityNotFound(_0x2aae01,null))['then'](saveUpdates(_0x18c9c2[_0xb92a('0x52')],null))['then'](respondWithResult(_0x2aae01,null))[_0xb92a('0x44')](handleError(_0x2aae01,null));};exports[_0xb92a('0x28')]=function(_0x2aaf8e,_0x558e24){return db[_0xb92a('0x2f')]['find']({'where':{'id':_0x2aaf8e[_0xb92a('0x46')]['id']}})[_0xb92a('0x27')](handleEntityNotFound(_0x558e24,null))[_0xb92a('0x27')](removeEntity(_0x558e24,null))[_0xb92a('0x44')](handleError(_0x558e24,null));};exports[_0xb92a('0x53')]=function(_0x2f7b21,_0x1b9ba5,_0x3814ff){var _0x20d028;return db['SquareOdbc']['find']({'where':{'id':_0x2f7b21[_0xb92a('0x46')]['id']},'attributes':['id','dsn']})[_0xb92a('0x27')](handleEntityNotFound(_0x1b9ba5,null))[_0xb92a('0x27')](function(_0x480c4b){if(_0x480c4b){var _0x237e93=require(_0xb92a('0x54'))();_0x237e93[_0xb92a('0x55')](_0x480c4b[_0xb92a('0x56')]);_0x237e93[_0xb92a('0x57')]();return _0x480c4b;}})['then'](respondWithResult(_0x1b9ba5,null))[_0xb92a('0x44')](handleError(_0x1b9ba5,null));};
\ No newline at end of file
index bff153e..9df9a85 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x26b2=['SquareOdbc','lodash','util','../../config/logger','request-promise','path','rimraf','../../config/environment','exports','define'];(function(_0x20dda3,_0xfcb775){var _0x547b71=function(_0x478410){while(--_0x478410){_0x20dda3['push'](_0x20dda3['shift']());}};_0x547b71(++_0xfcb775);}(_0x26b2,0x155));var _0x226b=function(_0x51d0ff,_0xb421e8){_0x51d0ff=_0x51d0ff-0x0;var _0x5298fb=_0x26b2[_0x51d0ff];return _0x5298fb;};'use strict';var _=require(_0x226b('0x0'));var util=require(_0x226b('0x1'));var logger=require(_0x226b('0x2'))('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x226b('0x3'));var fs=require('fs');var path=require(_0x226b('0x4'));var rimraf=require(_0x226b('0x5'));var config=require(_0x226b('0x6'));var attributes=require('./squareOdbc.attributes');module[_0x226b('0x7')]=function(_0x19d5ef,_0x3558f3){return _0x19d5ef[_0x226b('0x8')](_0x226b('0x9'),attributes,{'tableName':'square_odbc','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x8c37=['rimraf','../../config/environment','./squareOdbc.attributes','exports','define','SquareOdbc','util','../../config/logger','moment','bluebird','request-promise','path'];(function(_0x437545,_0x4ab48b){var _0x408060=function(_0x564586){while(--_0x564586){_0x437545['push'](_0x437545['shift']());}};_0x408060(++_0x4ab48b);}(_0x8c37,0x1c2));var _0x78c3=function(_0x3c0d7c,_0x4f1312){_0x3c0d7c=_0x3c0d7c-0x0;var _0x4c6271=_0x8c37[_0x3c0d7c];return _0x4c6271;};'use strict';var _=require('lodash');var util=require(_0x78c3('0x0'));var logger=require(_0x78c3('0x1'))('api');var moment=require(_0x78c3('0x2'));var BPromise=require(_0x78c3('0x3'));var rp=require(_0x78c3('0x4'));var fs=require('fs');var path=require(_0x78c3('0x5'));var rimraf=require(_0x78c3('0x6'));var config=require(_0x78c3('0x7'));var attributes=require(_0x78c3('0x8'));module[_0x78c3('0x9')]=function(_0x29e821,_0xe7ff0a){return _0x29e821[_0x78c3('0xa')](_0x78c3('0xb'),attributes,{'tableName':'square_odbc','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index e751b8c..ffcd46e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xed23=['jayson/promise','client','request','then','info','SquareOdbc,\x20%s,\x20%s','request\x20sent','debug','SquareOdbc,\x20%s,\x20%s,\x20%s','stringify','error','message','result','ShowSquareOdbc','find','options','raw','where','map','model','attributes','include','catch','lodash','util','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment'];(function(_0x4f8606,_0x250ccc){var _0x45c6f4=function(_0x3981b5){while(--_0x3981b5){_0x4f8606['push'](_0x4f8606['shift']());}};_0x45c6f4(++_0x250ccc);}(_0xed23,0x1c9));var _0x3ed2=function(_0x19ef6a,_0x29b819){_0x19ef6a=_0x19ef6a-0x0;var _0x38b2a6=_0xed23[_0x19ef6a];return _0x38b2a6;};'use strict';var _=require(_0x3ed2('0x0'));var util=require(_0x3ed2('0x1'));var moment=require('moment');var BPromise=require(_0x3ed2('0x2'));var rs=require(_0x3ed2('0x3'));var fs=require('fs');var Redis=require(_0x3ed2('0x4'));var db=require(_0x3ed2('0x5'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0x3ed2('0x6'));var config=require(_0x3ed2('0x7'));var jayson=require(_0x3ed2('0x8'));var client=jayson[_0x3ed2('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0xc9801b,_0x4691ec,_0x5d3134){return new BPromise(function(_0x2de212,_0x32e299){return client[_0x3ed2('0xa')](_0xc9801b,_0x5d3134)[_0x3ed2('0xb')](function(_0x393f04){logger[_0x3ed2('0xc')](_0x3ed2('0xd'),_0x4691ec,_0x3ed2('0xe'));logger[_0x3ed2('0xf')](_0x3ed2('0x10'),_0x4691ec,'request\x20sent',JSON[_0x3ed2('0x11')](_0x393f04));if(_0x393f04[_0x3ed2('0x12')]){if(_0x393f04['error']['code']===0x1f4){logger[_0x3ed2('0x12')](_0x3ed2('0xd'),_0x4691ec,_0x393f04[_0x3ed2('0x12')]['message']);return _0x32e299(_0x393f04[_0x3ed2('0x12')][_0x3ed2('0x13')]);}logger[_0x3ed2('0x12')]('SquareOdbc,\x20%s,\x20%s',_0x4691ec,_0x393f04[_0x3ed2('0x12')][_0x3ed2('0x13')]);return _0x2de212(_0x393f04[_0x3ed2('0x12')][_0x3ed2('0x13')]);}else{logger[_0x3ed2('0xc')](_0x3ed2('0xd'),_0x4691ec,_0x3ed2('0xe'));_0x2de212(_0x393f04[_0x3ed2('0x14')][_0x3ed2('0x13')]);}})['catch'](function(_0x7732e8){logger[_0x3ed2('0x12')]('SquareOdbc,\x20%s,\x20%s',_0x4691ec,_0x7732e8);_0x32e299(_0x7732e8);});});}exports[_0x3ed2('0x15')]=function(_0x19def7){var _0xf7cc7b=this;return new Promise(function(_0x2e44a9,_0x1460da){return db['SquareOdbc'][_0x3ed2('0x16')]({'raw':_0x19def7[_0x3ed2('0x17')]?_0x19def7[_0x3ed2('0x17')][_0x3ed2('0x18')]===undefined?!![]:![]:!![],'where':_0x19def7[_0x3ed2('0x17')]?_0x19def7[_0x3ed2('0x17')][_0x3ed2('0x19')]||null:null,'attributes':_0x19def7['options']?_0x19def7['options']['attributes']||null:null,'include':_0x19def7[_0x3ed2('0x17')]?_0x19def7[_0x3ed2('0x17')]['include']?_[_0x3ed2('0x1a')](_0x19def7[_0x3ed2('0x17')]['include'],function(_0x35799c){return{'model':db[_0x35799c[_0x3ed2('0x1b')]],'as':_0x35799c['as'],'attributes':_0x35799c[_0x3ed2('0x1c')],'include':_0x35799c[_0x3ed2('0x1d')]?_['map'](_0x35799c[_0x3ed2('0x1d')],function(_0x331a25){return{'model':db[_0x331a25['model']],'as':_0x331a25['as'],'attributes':_0x331a25['attributes'],'include':_0x331a25[_0x3ed2('0x1d')]?_[_0x3ed2('0x1a')](_0x331a25['include'],function(_0x35b0f1){return{'model':db[_0x35b0f1[_0x3ed2('0x1b')]],'as':_0x35b0f1['as'],'attributes':_0x35b0f1[_0x3ed2('0x1c')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x23e94b){logger[_0x3ed2('0xc')](_0x3ed2('0x15'),_0x19def7);logger[_0x3ed2('0xf')]('ShowSquareOdbc',_0x19def7,JSON[_0x3ed2('0x11')](_0x23e94b));_0x2e44a9(_0x23e94b);})[_0x3ed2('0x1e')](function(_0x5a9d8b){logger[_0x3ed2('0x12')](_0x3ed2('0x15'),_0x5a9d8b[_0x3ed2('0x13')],_0x19def7);_0x1460da(_0xf7cc7b[_0x3ed2('0x12')](0x1f4,_0x5a9d8b['message']));});});};
\ No newline at end of file
+var _0x5e9f=['randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','info','request\x20sent','stringify','error','code','message','SquareOdbc,\x20%s,\x20%s','result','ShowSquareOdbc','find','options','raw','where','attributes','include','model','map','debug','lodash','util','bluebird'];(function(_0x397e5f,_0x454c8f){var _0x5302b8=function(_0x1a29ef){while(--_0x1a29ef){_0x397e5f['push'](_0x397e5f['shift']());}};_0x5302b8(++_0x454c8f);}(_0x5e9f,0x171));var _0xf5e9=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0x5e9f[_0x167cc1];return _0x10bc4b;};'use strict';var _=require(_0xf5e9('0x0'));var util=require(_0xf5e9('0x1'));var moment=require('moment');var BPromise=require(_0xf5e9('0x2'));var rs=require(_0xf5e9('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf5e9('0x4'))['db'];var utils=require(_0xf5e9('0x5'));var logger=require(_0xf5e9('0x6'))(_0xf5e9('0x7'));var config=require(_0xf5e9('0x8'));var jayson=require(_0xf5e9('0x9'));var client=jayson[_0xf5e9('0xa')][_0xf5e9('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2fa41f,_0xc9560b,_0x38a3e8){return new BPromise(function(_0x3e3630,_0x4b11ea){return client['request'](_0x2fa41f,_0x38a3e8)[_0xf5e9('0xc')](function(_0x5824c2){logger[_0xf5e9('0xd')]('SquareOdbc,\x20%s,\x20%s',_0xc9560b,_0xf5e9('0xe'));logger['debug']('SquareOdbc,\x20%s,\x20%s,\x20%s',_0xc9560b,_0xf5e9('0xe'),JSON[_0xf5e9('0xf')](_0x5824c2));if(_0x5824c2['error']){if(_0x5824c2[_0xf5e9('0x10')][_0xf5e9('0x11')]===0x1f4){logger[_0xf5e9('0x10')]('SquareOdbc,\x20%s,\x20%s',_0xc9560b,_0x5824c2[_0xf5e9('0x10')]['message']);return _0x4b11ea(_0x5824c2['error'][_0xf5e9('0x12')]);}logger['error'](_0xf5e9('0x13'),_0xc9560b,_0x5824c2[_0xf5e9('0x10')][_0xf5e9('0x12')]);return _0x3e3630(_0x5824c2[_0xf5e9('0x10')][_0xf5e9('0x12')]);}else{logger['info'](_0xf5e9('0x13'),_0xc9560b,_0xf5e9('0xe'));_0x3e3630(_0x5824c2[_0xf5e9('0x14')]['message']);}})['catch'](function(_0x5eec68){logger[_0xf5e9('0x10')]('SquareOdbc,\x20%s,\x20%s',_0xc9560b,_0x5eec68);_0x4b11ea(_0x5eec68);});});}exports[_0xf5e9('0x15')]=function(_0x31f7bd){var _0x4c8ec0=this;return new Promise(function(_0x5b4dc8,_0x1281d3){return db['SquareOdbc'][_0xf5e9('0x16')]({'raw':_0x31f7bd[_0xf5e9('0x17')]?_0x31f7bd['options'][_0xf5e9('0x18')]===undefined?!![]:![]:!![],'where':_0x31f7bd[_0xf5e9('0x17')]?_0x31f7bd[_0xf5e9('0x17')][_0xf5e9('0x19')]||null:null,'attributes':_0x31f7bd['options']?_0x31f7bd[_0xf5e9('0x17')][_0xf5e9('0x1a')]||null:null,'include':_0x31f7bd[_0xf5e9('0x17')]?_0x31f7bd[_0xf5e9('0x17')][_0xf5e9('0x1b')]?_['map'](_0x31f7bd[_0xf5e9('0x17')][_0xf5e9('0x1b')],function(_0x52d49d){return{'model':db[_0x52d49d[_0xf5e9('0x1c')]],'as':_0x52d49d['as'],'attributes':_0x52d49d[_0xf5e9('0x1a')],'include':_0x52d49d[_0xf5e9('0x1b')]?_[_0xf5e9('0x1d')](_0x52d49d[_0xf5e9('0x1b')],function(_0xe6b81e){return{'model':db[_0xe6b81e[_0xf5e9('0x1c')]],'as':_0xe6b81e['as'],'attributes':_0xe6b81e[_0xf5e9('0x1a')],'include':_0xe6b81e[_0xf5e9('0x1b')]?_[_0xf5e9('0x1d')](_0xe6b81e['include'],function(_0x4d1a4a){return{'model':db[_0x4d1a4a[_0xf5e9('0x1c')]],'as':_0x4d1a4a['as'],'attributes':_0x4d1a4a['attributes']};}):[]};}):[]};}):[]:[]})[_0xf5e9('0xc')](function(_0x5b095d){logger[_0xf5e9('0xd')](_0xf5e9('0x15'),_0x31f7bd);logger[_0xf5e9('0x1e')](_0xf5e9('0x15'),_0x31f7bd,JSON['stringify'](_0x5b095d));_0x5b4dc8(_0x5b095d);})['catch'](function(_0x476a5c){logger[_0xf5e9('0x10')]('ShowSquareOdbc',_0x476a5c[_0xf5e9('0x12')],_0x31f7bd);_0x1281d3(_0x4c8ec0['error'](0x1f4,_0x476a5c[_0xf5e9('0x12')]));});});};
\ No newline at end of file
index e0bfbbb..90e23e6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6e19=['delete','/:id','destroy','exports','util','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','isAuthenticated','index','get','show','post','create','put','update'];(function(_0x5b4965,_0x507e09){var _0x104f35=function(_0x5e3768){while(--_0x5e3768){_0x5b4965['push'](_0x5b4965['shift']());}};_0x104f35(++_0x507e09);}(_0x6e19,0x82));var _0x96e1=function(_0x4cd144,_0x585da7){_0x4cd144=_0x4cd144-0x0;var _0x46efe9=_0x6e19[_0x4cd144];return _0x46efe9;};'use strict';var multer=require('multer');var util=require(_0x96e1('0x0'));var path=require(_0x96e1('0x1'));var timeout=require(_0x96e1('0x2'));var express=require('express');var router=express[_0x96e1('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x96e1('0x4'));var interaction=require(_0x96e1('0x5'));var config=require('../../config/environment');var controller=require('./squareProject.controller');router['get']('/',auth[_0x96e1('0x6')](),controller[_0x96e1('0x7')]);router[_0x96e1('0x8')]('/:id',auth['isAuthenticated'](),controller[_0x96e1('0x9')]);router[_0x96e1('0xa')]('/',auth['isAuthenticated'](),controller[_0x96e1('0xb')]);router[_0x96e1('0xc')]('/:id',auth[_0x96e1('0x6')](),controller[_0x96e1('0xd')]);router[_0x96e1('0xe')](_0x96e1('0xf'),auth[_0x96e1('0x6')](),controller[_0x96e1('0x10')]);module[_0x96e1('0x11')]=router;
\ No newline at end of file
+var _0xf831=['create','put','update','delete','destroy','exports','util','path','connect-timeout','fs-extra','../../components/auth/service','../../components/interaction/service','./squareProject.controller','get','isAuthenticated','index','/:id','show','post'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0xf831,0x65));var _0x1f83=function(_0x4fed54,_0x5da189){_0x4fed54=_0x4fed54-0x0;var _0x5b3a03=_0xf831[_0x4fed54];return _0x5b3a03;};'use strict';var multer=require('multer');var util=require(_0x1f83('0x0'));var path=require(_0x1f83('0x1'));var timeout=require(_0x1f83('0x2'));var express=require('express');var router=express['Router']();var fs_extra=require(_0x1f83('0x3'));var auth=require(_0x1f83('0x4'));var interaction=require(_0x1f83('0x5'));var config=require('../../config/environment');var controller=require(_0x1f83('0x6'));router[_0x1f83('0x7')]('/',auth[_0x1f83('0x8')](),controller[_0x1f83('0x9')]);router[_0x1f83('0x7')](_0x1f83('0xa'),auth[_0x1f83('0x8')](),controller[_0x1f83('0xb')]);router[_0x1f83('0xc')]('/',auth[_0x1f83('0x8')](),controller[_0x1f83('0xd')]);router[_0x1f83('0xe')]('/:id',auth['isAuthenticated'](),controller[_0x1f83('0xf')]);router[_0x1f83('0x10')]('/:id',auth[_0x1f83('0x8')](),controller[_0x1f83('0x11')]);module[_0x1f83('0x12')]=router;
\ No newline at end of file
index d9b21bd..9e01970 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x81a4=['exports','STRING','name','BLOB','getDataValue','preproduction','utf8','long','production','DATE','sequelize'];(function(_0x1559a5,_0x41924e){var _0x17a783=function(_0x152c63){while(--_0x152c63){_0x1559a5['push'](_0x1559a5['shift']());}};_0x17a783(++_0x41924e);}(_0x81a4,0x128));var _0x481a=function(_0xb5fc3e,_0x234703){_0xb5fc3e=_0xb5fc3e-0x0;var _0x2efc3c=_0x81a4[_0xb5fc3e];return _0x2efc3c;};'use strict';var Sequelize=require(_0x481a('0x0'));module[_0x481a('0x1')]={'name':{'type':Sequelize[_0x481a('0x2')],'unique':_0x481a('0x3'),'allowNull':![]},'description':{'type':Sequelize['STRING']},'notes':{'type':Sequelize['TEXT']},'preproduction':{'type':Sequelize[_0x481a('0x4')]('long'),'get':function(){if(this[_0x481a('0x5')](_0x481a('0x6'))){return this[_0x481a('0x5')](_0x481a('0x6'))['toString'](_0x481a('0x7'));}}},'production':{'type':Sequelize[_0x481a('0x4')](_0x481a('0x8')),'get':function(){if(this[_0x481a('0x5')](_0x481a('0x9'))){return this['getDataValue'](_0x481a('0x9'))['toString'](_0x481a('0x7'));}}},'savedAt':{'type':Sequelize[_0x481a('0xa')]},'publishedAt':{'type':Sequelize[_0x481a('0xa')]}};
\ No newline at end of file
+var _0xd0e4=['getDataValue','preproduction','production','utf8','DATE','sequelize','exports','STRING','name','BLOB','long'];(function(_0x48f3dc,_0x3d7afb){var _0x1a4dc3=function(_0xa233d6){while(--_0xa233d6){_0x48f3dc['push'](_0x48f3dc['shift']());}};_0x1a4dc3(++_0x3d7afb);}(_0xd0e4,0x1d3));var _0x4d0e=function(_0x5bd8b3,_0x26a7ac){_0x5bd8b3=_0x5bd8b3-0x0;var _0x323c25=_0xd0e4[_0x5bd8b3];return _0x323c25;};'use strict';var Sequelize=require(_0x4d0e('0x0'));module[_0x4d0e('0x1')]={'name':{'type':Sequelize[_0x4d0e('0x2')],'unique':_0x4d0e('0x3'),'allowNull':![]},'description':{'type':Sequelize['STRING']},'notes':{'type':Sequelize['TEXT']},'preproduction':{'type':Sequelize[_0x4d0e('0x4')](_0x4d0e('0x5')),'get':function(){if(this[_0x4d0e('0x6')](_0x4d0e('0x7'))){return this[_0x4d0e('0x6')]('preproduction')['toString']('utf8');}}},'production':{'type':Sequelize[_0x4d0e('0x4')](_0x4d0e('0x5')),'get':function(){if(this['getDataValue'](_0x4d0e('0x8'))){return this[_0x4d0e('0x6')]('production')['toString'](_0x4d0e('0x9'));}}},'savedAt':{'type':Sequelize['DATE']},'publishedAt':{'type':Sequelize[_0x4d0e('0xa')]}};
\ No newline at end of file
index 72ec43b..180dde9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa58e=['production','../../components/parsers/qs','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./squareProject.socket','register','status','json','offset','undefined','limit','count','then','destroy','get','SquareProjects','publish','agi','stringify','stack','name','index','map','fieldName','type','key','query','model','attributes','intersection','fields','hasOwnProperty','order','filters','pick','filter','where','VIRTUAL','options','includeAll','SquareProject','findAll','rows','catch','show','params','keys','rawAttributes','length','include','find','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','userProfileId','autoAssociation','UserProfileResource','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update'];(function(_0x268302,_0x1e181e){var _0x368175=function(_0x4e97a1){while(--_0x4e97a1){_0x268302['push'](_0x268302['shift']());}};_0x368175(++_0x1e181e);}(_0xa58e,0xcd));var _0xea58=function(_0x5f3f88,_0x562baf){_0x5f3f88=_0x5f3f88-0x0;var _0xd08119=_0xa58e[_0x5f3f88];return _0xd08119;};'use strict';var _=require('lodash');var Redis=require('ioredis');var qs=require(_0xea58('0x0'));var logger=require(_0xea58('0x1'))(_0xea58('0x2'));var config=require(_0xea58('0x3'));var db=require(_0xea58('0x4'))['db'];config[_0xea58('0x5')]=_[_0xea58('0x6')](config[_0xea58('0x5')],{'host':_0xea58('0x7'),'port':0x18eb});var socket=require(_0xea58('0x8'))(new Redis(config[_0xea58('0x5')]));require(_0xea58('0x9'))[_0xea58('0xa')](socket);function respondWithResult(_0x3e08af,_0x7239cf){_0x7239cf=_0x7239cf||0xc8;return function(_0x5843a1){if(_0x5843a1){return _0x3e08af[_0xea58('0xb')](_0x7239cf)[_0xea58('0xc')](_0x5843a1);}};}function respondWithFilteredResult(_0x474dba,_0xe3048e){return function(_0x58bea9){if(_0x58bea9){var _0x1a323f=typeof _0xe3048e[_0xea58('0xd')]===_0xea58('0xe')&&typeof _0xe3048e[_0xea58('0xf')]===_0xea58('0xe');var _0x42f5c0=_0x58bea9[_0xea58('0x10')];var _0x33e204=_0x1a323f?0x0:_0xe3048e[_0xea58('0xd')];var _0x5ded77=_0x1a323f?_0x58bea9[_0xea58('0x10')]:_0xe3048e[_0xea58('0xd')]+_0xe3048e[_0xea58('0xf')];var _0x465dfc;if(_0x5ded77>=_0x42f5c0){_0x5ded77=_0x42f5c0;_0x465dfc=0xc8;}else{_0x465dfc=0xce;}_0x474dba[_0xea58('0xb')](_0x465dfc);return _0x474dba['set']('Content-Range',_0x33e204+'-'+_0x5ded77+'/'+_0x42f5c0)[_0xea58('0xc')](_0x58bea9);}return null;};}function saveUpdates(_0xfd28c0){return function(_0x36b01c){if(_0x36b01c){return _0x36b01c['update'](_0xfd28c0)[_0xea58('0x11')](function(_0x2b47e5){return _0x2b47e5;});}return null;};}function removeEntity(_0x1da5bd){return function(_0x290675){if(_0x290675){return _0x290675[_0xea58('0x12')]()[_0xea58('0x11')](function(){var _0x289df6=_0x290675[_0xea58('0x13')]({'plain':!![]});var _0x49527b=_0xea58('0x14');return db['UserProfileResource'][_0xea58('0x12')]({'where':{'type':_0x49527b,'resourceId':_0x289df6['id']}})[_0xea58('0x11')](function(){return _0x290675;});})[_0xea58('0x11')](function(){var _0x3dfbf9=new Redis(config['redis']);_0x3dfbf9[_0xea58('0x15')](_0xea58('0x16'),JSON[_0xea58('0x17')]({'id':_0x290675['id'],'deleted':!![]}));})[_0xea58('0x11')](function(){_0x1da5bd[_0xea58('0xb')](0xcc)['end']();});}};}function handleEntityNotFound(_0x222db7){return function(_0x203e87){if(!_0x203e87){_0x222db7['sendStatus'](0x194);}return _0x203e87;};}function handleError(_0x405357,_0x29ac40){_0x29ac40=_0x29ac40||0x1f4;return function(_0x439215){logger['error'](_0x439215[_0xea58('0x18')]);if(_0x439215[_0xea58('0x19')]){delete _0x439215[_0xea58('0x19')];}_0x405357['status'](_0x29ac40)['send'](_0x439215);};}exports[_0xea58('0x1a')]=function(_0x31d65b,_0x2728e0){var _0x3b0e8e={},_0x3b9549={},_0x4fe4f2={'count':0x0,'rows':[]};var _0x251bd3=_[_0xea58('0x1b')](db['SquareProject']['rawAttributes'],function(_0x3c3bdd){return{'name':_0x3c3bdd[_0xea58('0x1c')],'type':_0x3c3bdd[_0xea58('0x1d')][_0xea58('0x1e')]};});_0x3b9549['model']=_[_0xea58('0x1b')](_0x251bd3,_0xea58('0x19'));_0x3b9549[_0xea58('0x1f')]=_['keys'](_0x31d65b[_0xea58('0x1f')]);_0x3b9549['filters']=_['intersection'](_0x3b9549[_0xea58('0x20')],_0x3b9549[_0xea58('0x1f')]);_0x3b0e8e[_0xea58('0x21')]=_[_0xea58('0x22')](_0x3b9549[_0xea58('0x20')],qs[_0xea58('0x23')](_0x31d65b['query'][_0xea58('0x23')]));_0x3b0e8e[_0xea58('0x21')]=_0x3b0e8e[_0xea58('0x21')]['length']?_0x3b0e8e[_0xea58('0x21')]:_0x3b9549[_0xea58('0x20')];if(!_0x31d65b[_0xea58('0x1f')][_0xea58('0x24')]('nolimit')){_0x3b0e8e['limit']=qs[_0xea58('0xf')](_0x31d65b['query'][_0xea58('0xf')]);_0x3b0e8e[_0xea58('0xd')]=qs['offset'](_0x31d65b[_0xea58('0x1f')]['offset']);}_0x3b0e8e[_0xea58('0x25')]=qs['sort'](_0x31d65b[_0xea58('0x1f')]['sort']);_0x3b0e8e['where']=qs[_0xea58('0x26')](_[_0xea58('0x27')](_0x31d65b[_0xea58('0x1f')],_0x3b9549[_0xea58('0x26')]),_0x251bd3);if(_0x31d65b[_0xea58('0x1f')][_0xea58('0x28')]){_0x3b0e8e[_0xea58('0x29')]=_['merge'](_0x3b0e8e[_0xea58('0x29')],{'$or':_['map'](_0x251bd3,function(_0x541ad8){if(_0x541ad8['type']!==_0xea58('0x2a')){var _0x26e146={};_0x26e146[_0x541ad8['name']]={'$like':'%'+_0x31d65b[_0xea58('0x1f')][_0xea58('0x28')]+'%'};return _0x26e146;}})});}_0x3b0e8e=_['merge']({},_0x3b0e8e,_0x31d65b[_0xea58('0x2b')]);var _0x5d49a5={'where':_0x3b0e8e[_0xea58('0x29')]};return db['SquareProject'][_0xea58('0x10')](_0x5d49a5)[_0xea58('0x11')](function(_0x1942fe){_0x4fe4f2[_0xea58('0x10')]=_0x1942fe;if(_0x31d65b[_0xea58('0x1f')][_0xea58('0x2c')]){_0x3b0e8e['include']=[{'all':!![]}];}return db[_0xea58('0x2d')][_0xea58('0x2e')](_0x3b0e8e);})[_0xea58('0x11')](function(_0x535593){_0x4fe4f2[_0xea58('0x2f')]=_0x535593;return _0x4fe4f2;})[_0xea58('0x11')](respondWithFilteredResult(_0x2728e0,_0x3b0e8e))[_0xea58('0x30')](handleError(_0x2728e0,null));};exports[_0xea58('0x31')]=function(_0x37d3a4,_0x28c365){var _0xbcf26b={'raw':![],'where':{'id':_0x37d3a4[_0xea58('0x32')]['id']}},_0x30463c={};_0x30463c['model']=_[_0xea58('0x33')](db[_0xea58('0x2d')][_0xea58('0x34')]);_0x30463c[_0xea58('0x1f')]=_['keys'](_0x37d3a4[_0xea58('0x1f')]);_0x30463c[_0xea58('0x26')]=_[_0xea58('0x22')](_0x30463c[_0xea58('0x20')],_0x30463c[_0xea58('0x1f')]);_0xbcf26b[_0xea58('0x21')]=_[_0xea58('0x22')](_0x30463c[_0xea58('0x20')],qs[_0xea58('0x23')](_0x37d3a4[_0xea58('0x1f')][_0xea58('0x23')]));_0xbcf26b[_0xea58('0x21')]=_0xbcf26b[_0xea58('0x21')][_0xea58('0x35')]?_0xbcf26b['attributes']:_0x30463c[_0xea58('0x20')];if(_0x37d3a4['query'][_0xea58('0x2c')]){_0xbcf26b[_0xea58('0x36')]=[{'all':!![]}];}_0xbcf26b=_['merge']({},_0xbcf26b,_0x37d3a4[_0xea58('0x2b')]);return db[_0xea58('0x2d')][_0xea58('0x37')](_0xbcf26b)[_0xea58('0x11')](handleEntityNotFound(_0x28c365,null))[_0xea58('0x11')](respondWithResult(_0x28c365,null))[_0xea58('0x30')](handleError(_0x28c365,null));};exports['create']=function(_0x3ea19e,_0x3fda6e){return db[_0xea58('0x2d')][_0xea58('0x38')](_0x3ea19e[_0xea58('0x39')],{})['then'](function(_0x4cc1ef){var _0x597c42=_0x3ea19e['user'][_0xea58('0x13')]({'plain':!![]});if(!_0x597c42)throw new Error(_0xea58('0x3a'));if(_0x597c42[_0xea58('0x3b')]===_0xea58('0x3c')){var _0x4ba7ca=_0x4cc1ef['get']({'plain':!![]});var _0x1aefb3=_0xea58('0x14');return db['UserProfileSection'][_0xea58('0x37')]({'where':{'name':_0x1aefb3,'userProfileId':_0x597c42[_0xea58('0x3d')]},'raw':!![]})['then'](function(_0x41e85b){if(_0x41e85b&&_0x41e85b[_0xea58('0x3e')]===0x0){return db[_0xea58('0x3f')][_0xea58('0x38')]({'name':_0x4ba7ca[_0xea58('0x19')],'resourceId':_0x4ba7ca['id'],'type':_0x41e85b[_0xea58('0x19')],'sectionId':_0x41e85b['id']},{})[_0xea58('0x11')](function(){return _0x4cc1ef;});}else{return _0x4cc1ef;}})[_0xea58('0x30')](function(_0x12c842){logger[_0xea58('0x40')](_0xea58('0x41'),_0x12c842);throw _0x12c842;});}return _0x4cc1ef;})[_0xea58('0x11')](respondWithResult(_0x3fda6e,0xc9))[_0xea58('0x30')](handleError(_0x3fda6e,null));};exports[_0xea58('0x42')]=function(_0x44468d,_0x447b0e){if(_0x44468d[_0xea58('0x39')]['id']){delete _0x44468d[_0xea58('0x39')]['id'];}return db[_0xea58('0x2d')]['find']({'where':{'id':_0x44468d[_0xea58('0x32')]['id']}})[_0xea58('0x11')](handleEntityNotFound(_0x447b0e,null))['then'](saveUpdates(_0x44468d[_0xea58('0x39')],null))['then'](function(_0x1abe93){if(!_0x1abe93)return;var _0x4db0cf=_0x1abe93[_0xea58('0x13')]({'plain':!![]});return _0x4db0cf;})[_0xea58('0x11')](function(_0x5dd565){var _0x569615=new Redis(config[_0xea58('0x5')]);_0x569615['publish']('agi',JSON['stringify'](_[_0xea58('0x27')](_0x5dd565,['id',_0xea58('0x19'),_0xea58('0x43')])));return _0x5dd565;})['then'](respondWithResult(_0x447b0e,null))[_0xea58('0x30')](handleError(_0x447b0e,null));};exports[_0xea58('0x12')]=function(_0x11a0e9,_0x454d42){return db['SquareProject'][_0xea58('0x37')]({'where':{'id':_0x11a0e9['params']['id']}})[_0xea58('0x11')](handleEntityNotFound(_0x454d42,null))[_0xea58('0x11')](removeEntity(_0x454d42,null))[_0xea58('0x30')](handleError(_0x454d42,null));};
\ No newline at end of file
+var _0xbebe=['map','filters','query','intersection','fields','attributes','length','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','options','include','SquareProject','findAll','rows','catch','show','keys','includeAll','find','body','user','role','UserProfileSection','userProfileId','create','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','params','lodash','ioredis','../../components/parsers/qs','../../config/logger','api','redis','defaults','localhost','socket.io-emitter','./squareProject.socket','register','status','json','limit','undefined','count','offset','set','Content-Range','destroy','then','get','UserProfileResource','publish','agi','stringify','end','sendStatus','stack','name','rawAttributes','fieldName','type','model'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0xbebe,0x1c1));var _0xebeb=function(_0x3d5f86,_0x16f9c8){_0x3d5f86=_0x3d5f86-0x0;var _0x90b14d=_0xbebe[_0x3d5f86];return _0x90b14d;};'use strict';var _=require(_0xebeb('0x0'));var Redis=require(_0xebeb('0x1'));var qs=require(_0xebeb('0x2'));var logger=require(_0xebeb('0x3'))(_0xebeb('0x4'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config[_0xebeb('0x5')]=_[_0xebeb('0x6')](config[_0xebeb('0x5')],{'host':_0xebeb('0x7'),'port':0x18eb});var socket=require(_0xebeb('0x8'))(new Redis(config[_0xebeb('0x5')]));require(_0xebeb('0x9'))[_0xebeb('0xa')](socket);function respondWithResult(_0x3b9666,_0x8e3361){_0x8e3361=_0x8e3361||0xc8;return function(_0x4bc306){if(_0x4bc306){return _0x3b9666[_0xebeb('0xb')](_0x8e3361)[_0xebeb('0xc')](_0x4bc306);}};}function respondWithFilteredResult(_0x59661a,_0x21eb30){return function(_0x1c1255){if(_0x1c1255){var _0x2653f1=typeof _0x21eb30['offset']==='undefined'&&typeof _0x21eb30[_0xebeb('0xd')]===_0xebeb('0xe');var _0x4e6ac0=_0x1c1255[_0xebeb('0xf')];var _0x325142=_0x2653f1?0x0:_0x21eb30[_0xebeb('0x10')];var _0xdf7b26=_0x2653f1?_0x1c1255['count']:_0x21eb30[_0xebeb('0x10')]+_0x21eb30[_0xebeb('0xd')];var _0x3ab814;if(_0xdf7b26>=_0x4e6ac0){_0xdf7b26=_0x4e6ac0;_0x3ab814=0xc8;}else{_0x3ab814=0xce;}_0x59661a['status'](_0x3ab814);return _0x59661a[_0xebeb('0x11')](_0xebeb('0x12'),_0x325142+'-'+_0xdf7b26+'/'+_0x4e6ac0)[_0xebeb('0xc')](_0x1c1255);}return null;};}function saveUpdates(_0x28f392){return function(_0x88995a){if(_0x88995a){return _0x88995a['update'](_0x28f392)['then'](function(_0x302e60){return _0x302e60;});}return null;};}function removeEntity(_0x5d1c58){return function(_0x3d0a39){if(_0x3d0a39){return _0x3d0a39[_0xebeb('0x13')]()[_0xebeb('0x14')](function(){var _0x11c78a=_0x3d0a39[_0xebeb('0x15')]({'plain':!![]});var _0x39dc75='SquareProjects';return db[_0xebeb('0x16')]['destroy']({'where':{'type':_0x39dc75,'resourceId':_0x11c78a['id']}})['then'](function(){return _0x3d0a39;});})['then'](function(){var _0x706c1f=new Redis(config[_0xebeb('0x5')]);_0x706c1f[_0xebeb('0x17')](_0xebeb('0x18'),JSON[_0xebeb('0x19')]({'id':_0x3d0a39['id'],'deleted':!![]}));})[_0xebeb('0x14')](function(){_0x5d1c58[_0xebeb('0xb')](0xcc)[_0xebeb('0x1a')]();});}};}function handleEntityNotFound(_0x283e70){return function(_0x507619){if(!_0x507619){_0x283e70[_0xebeb('0x1b')](0x194);}return _0x507619;};}function handleError(_0x27d377,_0x4d8ce){_0x4d8ce=_0x4d8ce||0x1f4;return function(_0x311afd){logger['error'](_0x311afd[_0xebeb('0x1c')]);if(_0x311afd[_0xebeb('0x1d')]){delete _0x311afd['name'];}_0x27d377['status'](_0x4d8ce)['send'](_0x311afd);};}exports['index']=function(_0x436e41,_0x54c396){var _0x2b25c7={},_0x4a126e={},_0x58f95f={'count':0x0,'rows':[]};var _0x54873c=_['map'](db['SquareProject'][_0xebeb('0x1e')],function(_0x35754f){return{'name':_0x35754f[_0xebeb('0x1f')],'type':_0x35754f[_0xebeb('0x20')]['key']};});_0x4a126e[_0xebeb('0x21')]=_[_0xebeb('0x22')](_0x54873c,_0xebeb('0x1d'));_0x4a126e['query']=_['keys'](_0x436e41['query']);_0x4a126e[_0xebeb('0x23')]=_['intersection'](_0x4a126e[_0xebeb('0x21')],_0x4a126e[_0xebeb('0x24')]);_0x2b25c7['attributes']=_[_0xebeb('0x25')](_0x4a126e[_0xebeb('0x21')],qs['fields'](_0x436e41['query'][_0xebeb('0x26')]));_0x2b25c7['attributes']=_0x2b25c7[_0xebeb('0x27')][_0xebeb('0x28')]?_0x2b25c7['attributes']:_0x4a126e[_0xebeb('0x21')];if(!_0x436e41[_0xebeb('0x24')]['hasOwnProperty'](_0xebeb('0x29'))){_0x2b25c7[_0xebeb('0xd')]=qs['limit'](_0x436e41[_0xebeb('0x24')][_0xebeb('0xd')]);_0x2b25c7['offset']=qs['offset'](_0x436e41[_0xebeb('0x24')][_0xebeb('0x10')]);}_0x2b25c7[_0xebeb('0x2a')]=qs[_0xebeb('0x2b')](_0x436e41[_0xebeb('0x24')][_0xebeb('0x2b')]);_0x2b25c7[_0xebeb('0x2c')]=qs[_0xebeb('0x23')](_[_0xebeb('0x2d')](_0x436e41[_0xebeb('0x24')],_0x4a126e['filters']),_0x54873c);if(_0x436e41[_0xebeb('0x24')]['filter']){_0x2b25c7[_0xebeb('0x2c')]=_[_0xebeb('0x2e')](_0x2b25c7['where'],{'$or':_[_0xebeb('0x22')](_0x54873c,function(_0x477c60){if(_0x477c60['type']!==_0xebeb('0x2f')){var _0x3a8db4={};_0x3a8db4[_0x477c60['name']]={'$like':'%'+_0x436e41[_0xebeb('0x24')][_0xebeb('0x30')]+'%'};return _0x3a8db4;}})});}_0x2b25c7=_[_0xebeb('0x2e')]({},_0x2b25c7,_0x436e41[_0xebeb('0x31')]);var _0x65e862={'where':_0x2b25c7[_0xebeb('0x2c')]};return db['SquareProject']['count'](_0x65e862)['then'](function(_0xba9bc1){_0x58f95f[_0xebeb('0xf')]=_0xba9bc1;if(_0x436e41[_0xebeb('0x24')]['includeAll']){_0x2b25c7[_0xebeb('0x32')]=[{'all':!![]}];}return db[_0xebeb('0x33')][_0xebeb('0x34')](_0x2b25c7);})[_0xebeb('0x14')](function(_0x1c9152){_0x58f95f[_0xebeb('0x35')]=_0x1c9152;return _0x58f95f;})[_0xebeb('0x14')](respondWithFilteredResult(_0x54c396,_0x2b25c7))[_0xebeb('0x36')](handleError(_0x54c396,null));};exports[_0xebeb('0x37')]=function(_0x1336b5,_0x39ba96){var _0x538351={'raw':![],'where':{'id':_0x1336b5['params']['id']}},_0x2bf781={};_0x2bf781[_0xebeb('0x21')]=_['keys'](db['SquareProject'][_0xebeb('0x1e')]);_0x2bf781[_0xebeb('0x24')]=_[_0xebeb('0x38')](_0x1336b5[_0xebeb('0x24')]);_0x2bf781[_0xebeb('0x23')]=_[_0xebeb('0x25')](_0x2bf781[_0xebeb('0x21')],_0x2bf781[_0xebeb('0x24')]);_0x538351['attributes']=_[_0xebeb('0x25')](_0x2bf781['model'],qs[_0xebeb('0x26')](_0x1336b5[_0xebeb('0x24')][_0xebeb('0x26')]));_0x538351[_0xebeb('0x27')]=_0x538351[_0xebeb('0x27')]['length']?_0x538351['attributes']:_0x2bf781[_0xebeb('0x21')];if(_0x1336b5[_0xebeb('0x24')][_0xebeb('0x39')]){_0x538351['include']=[{'all':!![]}];}_0x538351=_[_0xebeb('0x2e')]({},_0x538351,_0x1336b5[_0xebeb('0x31')]);return db[_0xebeb('0x33')][_0xebeb('0x3a')](_0x538351)[_0xebeb('0x14')](handleEntityNotFound(_0x39ba96,null))[_0xebeb('0x14')](respondWithResult(_0x39ba96,null))['catch'](handleError(_0x39ba96,null));};exports['create']=function(_0x4d39d9,_0x4876d8){return db['SquareProject']['create'](_0x4d39d9[_0xebeb('0x3b')],{})['then'](function(_0x121be5){var _0x10f0ad=_0x4d39d9[_0xebeb('0x3c')][_0xebeb('0x15')]({'plain':!![]});if(!_0x10f0ad)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x10f0ad[_0xebeb('0x3d')]===_0xebeb('0x3c')){var _0x2f4265=_0x121be5[_0xebeb('0x15')]({'plain':!![]});var _0x7cb2f8='SquareProjects';return db[_0xebeb('0x3e')][_0xebeb('0x3a')]({'where':{'name':_0x7cb2f8,'userProfileId':_0x10f0ad[_0xebeb('0x3f')]},'raw':!![]})[_0xebeb('0x14')](function(_0x25146d){if(_0x25146d&&_0x25146d['autoAssociation']===0x0){return db[_0xebeb('0x16')][_0xebeb('0x40')]({'name':_0x2f4265[_0xebeb('0x1d')],'resourceId':_0x2f4265['id'],'type':_0x25146d[_0xebeb('0x1d')],'sectionId':_0x25146d['id']},{})[_0xebeb('0x14')](function(){return _0x121be5;});}else{return _0x121be5;}})[_0xebeb('0x36')](function(_0x16fd92){logger[_0xebeb('0x41')](_0xebeb('0x42'),_0x16fd92);throw _0x16fd92;});}return _0x121be5;})['then'](respondWithResult(_0x4876d8,0xc9))[_0xebeb('0x36')](handleError(_0x4876d8,null));};exports[_0xebeb('0x43')]=function(_0x2a30ac,_0x572e0d){if(_0x2a30ac[_0xebeb('0x3b')]['id']){delete _0x2a30ac[_0xebeb('0x3b')]['id'];}return db[_0xebeb('0x33')][_0xebeb('0x3a')]({'where':{'id':_0x2a30ac[_0xebeb('0x44')]['id']}})[_0xebeb('0x14')](handleEntityNotFound(_0x572e0d,null))[_0xebeb('0x14')](saveUpdates(_0x2a30ac[_0xebeb('0x3b')],null))[_0xebeb('0x14')](function(_0x2ff195){if(!_0x2ff195)return;var _0x40a115=_0x2ff195['get']({'plain':!![]});return _0x40a115;})[_0xebeb('0x14')](function(_0x5d4069){var _0x3efeec=new Redis(config['redis']);_0x3efeec[_0xebeb('0x17')](_0xebeb('0x18'),JSON[_0xebeb('0x19')](_[_0xebeb('0x2d')](_0x5d4069,['id',_0xebeb('0x1d'),'production'])));return _0x5d4069;})[_0xebeb('0x14')](respondWithResult(_0x572e0d,null))[_0xebeb('0x36')](handleError(_0x572e0d,null));};exports['destroy']=function(_0x18d9a7,_0x3868f7){return db[_0xebeb('0x33')][_0xebeb('0x3a')]({'where':{'id':_0x18d9a7[_0xebeb('0x44')]['id']}})[_0xebeb('0x14')](handleEntityNotFound(_0x3868f7,null))[_0xebeb('0x14')](removeEntity(_0x3868f7,null))[_0xebeb('0x36')](handleError(_0x3868f7,null));};
\ No newline at end of file
index 544eb51..e17c697 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x20a1=['SquareProject','update','remove','emit','exports','events','../../mysqldb'];(function(_0x54a138,_0x22b82d){var _0x9c361a=function(_0x193bea){while(--_0x193bea){_0x54a138['push'](_0x54a138['shift']());}};_0x9c361a(++_0x22b82d);}(_0x20a1,0x91));var _0x120a=function(_0x5c0b29,_0x141464){_0x5c0b29=_0x5c0b29-0x0;var _0x171f16=_0x20a1[_0x5c0b29];return _0x171f16;};'use strict';var EventEmitter=require(_0x120a('0x0'));var SquareProject=require(_0x120a('0x1'))['db'][_0x120a('0x2')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x120a('0x3'),'afterDestroy':_0x120a('0x4')};function emitEvent(_0x926aa8){return function(_0x3dd005,_0x294a0b,_0x6b3564){SquareProjectEvents[_0x120a('0x5')](_0x926aa8+':'+_0x3dd005['id'],_0x3dd005);SquareProjectEvents[_0x120a('0x5')](_0x926aa8,_0x3dd005);_0x6b3564(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];SquareProject['hook'](e,emitEvent(event));}}module[_0x120a('0x6')]=SquareProjectEvents;
\ No newline at end of file
+var _0xa0f2=['hook','exports','../../mysqldb','SquareProject','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x4fdc46,_0x2a3759){var _0x2c178a=function(_0x59ead9){while(--_0x59ead9){_0x4fdc46['push'](_0x4fdc46['shift']());}};_0x2c178a(++_0x2a3759);}(_0xa0f2,0x16a));var _0x2a0f=function(_0x5be8ac,_0x1a9d12){_0x5be8ac=_0x5be8ac-0x0;var _0x2afdfd=_0xa0f2[_0x5be8ac];return _0x2afdfd;};'use strict';var EventEmitter=require('events');var SquareProject=require(_0x2a0f('0x0'))['db'][_0x2a0f('0x1')];var SquareProjectEvents=new EventEmitter();SquareProjectEvents[_0x2a0f('0x2')](0x0);var events={'afterCreate':_0x2a0f('0x3'),'afterUpdate':_0x2a0f('0x4'),'afterDestroy':_0x2a0f('0x5')};function emitEvent(_0x5cd9ca){return function(_0x3b2d88,_0x10445f,_0x4906af){SquareProjectEvents[_0x2a0f('0x6')](_0x5cd9ca+':'+_0x3b2d88['id'],_0x3b2d88);SquareProjectEvents[_0x2a0f('0x6')](_0x5cd9ca,_0x3b2d88);_0x4906af(null);};}for(var e in events){if(events[_0x2a0f('0x7')](e)){var event=events[e];SquareProject[_0x2a0f('0x8')](e,emitEvent(event));}}module[_0x2a0f('0x9')]=SquareProjectEvents;
\ No newline at end of file
index 2baee64..34a71b1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf023=['moment','bluebird','request-promise','path','rimraf','exports','define','SquareProject','square_projects','changed','preproduction','savedAt','format','YYYY-MM-DD\x20HH:mm:ss','publishedAt','lodash','../../config/logger'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xf023,0xb9));var _0x3f02=function(_0x15ff22,_0x335a4d){_0x15ff22=_0x15ff22-0x0;var _0x521190=_0xf023[_0x15ff22];return _0x521190;};'use strict';var _=require(_0x3f02('0x0'));var util=require('util');var logger=require(_0x3f02('0x1'))('api');var moment=require(_0x3f02('0x2'));var BPromise=require(_0x3f02('0x3'));var rp=require(_0x3f02('0x4'));var fs=require('fs');var path=require(_0x3f02('0x5'));var rimraf=require(_0x3f02('0x6'));var config=require('../../config/environment');var attributes=require('./squareProject.attributes');module[_0x3f02('0x7')]=function(_0x36f3fb,_0x31fe3d){return _0x36f3fb[_0x3f02('0x8')](_0x3f02('0x9'),attributes,{'tableName':_0x3f02('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x498de2,_0x1b736e,_0x3cc034){if(_0x498de2[_0x3f02('0xb')](_0x3f02('0xc'))){_0x498de2[_0x3f02('0xd')]=moment()[_0x3f02('0xe')](_0x3f02('0xf'));}if(_0x498de2[_0x3f02('0xb')]('production')){_0x498de2[_0x3f02('0x10')]=moment()['format'](_0x3f02('0xf'));}_0x3cc034(null,_0x498de2);}}});};
\ No newline at end of file
+var _0x8740=['preproduction','savedAt','format','publishedAt','YYYY-MM-DD\x20HH:mm:ss','util','api','moment','bluebird','path','rimraf','../../config/environment','./squareProject.attributes','exports','define','square_projects','changed'];(function(_0x181b8d,_0x3b3af6){var _0x5f16e9=function(_0x1fef6a){while(--_0x1fef6a){_0x181b8d['push'](_0x181b8d['shift']());}};_0x5f16e9(++_0x3b3af6);}(_0x8740,0x7c));var _0x0874=function(_0x49b207,_0x408ade){_0x49b207=_0x49b207-0x0;var _0x2dc8fa=_0x8740[_0x49b207];return _0x2dc8fa;};'use strict';var _=require('lodash');var util=require(_0x0874('0x0'));var logger=require('../../config/logger')(_0x0874('0x1'));var moment=require(_0x0874('0x2'));var BPromise=require(_0x0874('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0874('0x4'));var rimraf=require(_0x0874('0x5'));var config=require(_0x0874('0x6'));var attributes=require(_0x0874('0x7'));module[_0x0874('0x8')]=function(_0xce720f,_0x3302c2){return _0xce720f[_0x0874('0x9')]('SquareProject',attributes,{'tableName':_0x0874('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x28096a,_0x1c7d2c,_0x42f8e1){if(_0x28096a[_0x0874('0xb')](_0x0874('0xc'))){_0x28096a[_0x0874('0xd')]=moment()[_0x0874('0xe')]('YYYY-MM-DD\x20HH:mm:ss');}if(_0x28096a[_0x0874('0xb')]('production')){_0x28096a[_0x0874('0xf')]=moment()[_0x0874('0xe')](_0x0874('0x10'));}_0x42f8e1(null,_0x28096a);}}});};
\ No newline at end of file
index d9e16bf..ff9e0a9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xded1=['then','lodash','ioredis','../../mysqldb','rpc','../../config/environment','redis','defaults','localhost','register','GetSquareProjects','SquareProject','findAll','options','where','attributes','limit','include','model','map','info','debug','stringify','catch','error','message','ShowSquareProject','find','raw'];(function(_0x8dc04d,_0xaa7559){var _0x2f5f28=function(_0xdd2d1d){while(--_0xdd2d1d){_0x8dc04d['push'](_0x8dc04d['shift']());}};_0x2f5f28(++_0xaa7559);}(_0xded1,0x75));var _0x1ded=function(_0x20def7,_0x2caec4){_0x20def7=_0x20def7-0x0;var _0xdc6a3e=_0xded1[_0x20def7];return _0xdc6a3e;};'use strict';var _=require(_0x1ded('0x0'));var Redis=require(_0x1ded('0x1'));var db=require(_0x1ded('0x2'))['db'];var logger=require('../../config/logger')(_0x1ded('0x3'));var config=require(_0x1ded('0x4'));config[_0x1ded('0x5')]=_[_0x1ded('0x6')](config['redis'],{'host':_0x1ded('0x7'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require('./squareProject.socket')[_0x1ded('0x8')](socket);exports[_0x1ded('0x9')]=function(_0x475498){var _0x497b16=this;return new Promise(function(_0x560c36,_0x3a3ea8){return db[_0x1ded('0xa')][_0x1ded('0xb')]({'raw':_0x475498[_0x1ded('0xc')]?_0x475498['options']['raw']===undefined?!![]:![]:!![],'where':_0x475498['options']?_0x475498['options'][_0x1ded('0xd')]||null:null,'attributes':_0x475498[_0x1ded('0xc')]?_0x475498[_0x1ded('0xc')][_0x1ded('0xe')]||null:null,'limit':_0x475498['options']?_0x475498[_0x1ded('0xc')][_0x1ded('0xf')]||null:null,'include':_0x475498['options']?_0x475498[_0x1ded('0xc')][_0x1ded('0x10')]?_['map'](_0x475498[_0x1ded('0xc')]['include'],function(_0xda1b65){return{'model':db[_0xda1b65[_0x1ded('0x11')]],'as':_0xda1b65['as'],'attributes':_0xda1b65['attributes'],'include':_0xda1b65['include']?_[_0x1ded('0x12')](_0xda1b65[_0x1ded('0x10')],function(_0x1aac5a){return{'model':db[_0x1aac5a[_0x1ded('0x11')]],'as':_0x1aac5a['as'],'attributes':_0x1aac5a['attributes'],'include':_0x1aac5a[_0x1ded('0x10')]?_[_0x1ded('0x12')](_0x1aac5a[_0x1ded('0x10')],function(_0x3b1558){return{'model':db[_0x3b1558[_0x1ded('0x11')]],'as':_0x3b1558['as'],'attributes':_0x3b1558[_0x1ded('0xe')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x371699){logger[_0x1ded('0x13')](_0x1ded('0x9'),_0x475498);logger[_0x1ded('0x14')](_0x1ded('0x9'),_0x475498,JSON[_0x1ded('0x15')](_0x371699));_0x560c36(_0x371699);})[_0x1ded('0x16')](function(_0x3acb65){logger['error'](_0x1ded('0x9'),_0x3acb65['message'],_0x475498);_0x3a3ea8(_0x497b16[_0x1ded('0x17')](0x1f4,_0x3acb65[_0x1ded('0x18')]));});});};exports[_0x1ded('0x19')]=function(_0x5e1a42){var _0xba6b25=this;return new Promise(function(_0x2d13fa,_0x4cf505){return db['SquareProject'][_0x1ded('0x1a')]({'raw':_0x5e1a42[_0x1ded('0xc')]?_0x5e1a42[_0x1ded('0xc')][_0x1ded('0x1b')]===undefined?!![]:![]:!![],'where':_0x5e1a42[_0x1ded('0xc')]?_0x5e1a42[_0x1ded('0xc')]['where']||null:null,'attributes':_0x5e1a42[_0x1ded('0xc')]?_0x5e1a42[_0x1ded('0xc')]['attributes']||null:null,'include':_0x5e1a42[_0x1ded('0xc')]?_0x5e1a42[_0x1ded('0xc')][_0x1ded('0x10')]?_[_0x1ded('0x12')](_0x5e1a42['options'][_0x1ded('0x10')],function(_0x439ec7){return{'model':db[_0x439ec7['model']],'as':_0x439ec7['as'],'attributes':_0x439ec7[_0x1ded('0xe')],'include':_0x439ec7[_0x1ded('0x10')]?_['map'](_0x439ec7[_0x1ded('0x10')],function(_0x15ab26){return{'model':db[_0x15ab26['model']],'as':_0x15ab26['as'],'attributes':_0x15ab26[_0x1ded('0xe')],'include':_0x15ab26[_0x1ded('0x10')]?_[_0x1ded('0x12')](_0x15ab26[_0x1ded('0x10')],function(_0x205e73){return{'model':db[_0x205e73[_0x1ded('0x11')]],'as':_0x205e73['as'],'attributes':_0x205e73['attributes']};}):[]};}):[]};}):[]:[]})[_0x1ded('0x1c')](function(_0x37387c){logger[_0x1ded('0x13')](_0x1ded('0x19'),_0x5e1a42);logger[_0x1ded('0x14')](_0x1ded('0x19'),_0x5e1a42,JSON[_0x1ded('0x15')](_0x37387c));_0x2d13fa(_0x37387c);})['catch'](function(_0x16c61a){logger[_0x1ded('0x17')](_0x1ded('0x19'),_0x16c61a[_0x1ded('0x18')],_0x5e1a42);_0x4cf505(_0xba6b25['error'](0x1f4,_0x16c61a[_0x1ded('0x18')]));});});};
\ No newline at end of file
+var _0xb3f8=['socket.io-emitter','./squareProject.socket','register','GetSquareProjects','SquareProject','findAll','options','raw','where','limit','include','map','model','attributes','then','info','debug','stringify','catch','error','message','ShowSquareProject','lodash','ioredis','../../config/logger','rpc','../../config/environment','redis','defaults'];(function(_0x5504b7,_0x3c204c){var _0x393441=function(_0x1ae17f){while(--_0x1ae17f){_0x5504b7['push'](_0x5504b7['shift']());}};_0x393441(++_0x3c204c);}(_0xb3f8,0x18f));var _0x8b3f=function(_0x145b3c,_0x31ea4a){_0x145b3c=_0x145b3c-0x0;var _0x1b6e36=_0xb3f8[_0x145b3c];return _0x1b6e36;};'use strict';var _=require(_0x8b3f('0x0'));var Redis=require(_0x8b3f('0x1'));var db=require('../../mysqldb')['db'];var logger=require(_0x8b3f('0x2'))(_0x8b3f('0x3'));var config=require(_0x8b3f('0x4'));config[_0x8b3f('0x5')]=_[_0x8b3f('0x6')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x8b3f('0x7'))(new Redis(config['redis']));require(_0x8b3f('0x8'))[_0x8b3f('0x9')](socket);exports[_0x8b3f('0xa')]=function(_0x42e345){var _0x5268eb=this;return new Promise(function(_0x1d0306,_0x5672c0){return db[_0x8b3f('0xb')][_0x8b3f('0xc')]({'raw':_0x42e345[_0x8b3f('0xd')]?_0x42e345['options'][_0x8b3f('0xe')]===undefined?!![]:![]:!![],'where':_0x42e345['options']?_0x42e345[_0x8b3f('0xd')][_0x8b3f('0xf')]||null:null,'attributes':_0x42e345['options']?_0x42e345['options']['attributes']||null:null,'limit':_0x42e345['options']?_0x42e345[_0x8b3f('0xd')][_0x8b3f('0x10')]||null:null,'include':_0x42e345[_0x8b3f('0xd')]?_0x42e345[_0x8b3f('0xd')][_0x8b3f('0x11')]?_[_0x8b3f('0x12')](_0x42e345[_0x8b3f('0xd')]['include'],function(_0x183b8c){return{'model':db[_0x183b8c[_0x8b3f('0x13')]],'as':_0x183b8c['as'],'attributes':_0x183b8c[_0x8b3f('0x14')],'include':_0x183b8c[_0x8b3f('0x11')]?_['map'](_0x183b8c[_0x8b3f('0x11')],function(_0x43c99d){return{'model':db[_0x43c99d[_0x8b3f('0x13')]],'as':_0x43c99d['as'],'attributes':_0x43c99d['attributes'],'include':_0x43c99d['include']?_[_0x8b3f('0x12')](_0x43c99d[_0x8b3f('0x11')],function(_0x398ad5){return{'model':db[_0x398ad5['model']],'as':_0x398ad5['as'],'attributes':_0x398ad5[_0x8b3f('0x14')]};}):[]};}):[]};}):[]:[]})[_0x8b3f('0x15')](function(_0x5ef3d5){logger[_0x8b3f('0x16')]('GetSquareProjects',_0x42e345);logger[_0x8b3f('0x17')](_0x8b3f('0xa'),_0x42e345,JSON[_0x8b3f('0x18')](_0x5ef3d5));_0x1d0306(_0x5ef3d5);})[_0x8b3f('0x19')](function(_0x233d8d){logger[_0x8b3f('0x1a')](_0x8b3f('0xa'),_0x233d8d[_0x8b3f('0x1b')],_0x42e345);_0x5672c0(_0x5268eb['error'](0x1f4,_0x233d8d[_0x8b3f('0x1b')]));});});};exports['ShowSquareProject']=function(_0x4a5283){var _0x1eaace=this;return new Promise(function(_0x1338a1,_0x2ac880){return db[_0x8b3f('0xb')]['find']({'raw':_0x4a5283[_0x8b3f('0xd')]?_0x4a5283[_0x8b3f('0xd')]['raw']===undefined?!![]:![]:!![],'where':_0x4a5283['options']?_0x4a5283[_0x8b3f('0xd')][_0x8b3f('0xf')]||null:null,'attributes':_0x4a5283[_0x8b3f('0xd')]?_0x4a5283['options'][_0x8b3f('0x14')]||null:null,'include':_0x4a5283['options']?_0x4a5283['options'][_0x8b3f('0x11')]?_['map'](_0x4a5283[_0x8b3f('0xd')]['include'],function(_0x2c7750){return{'model':db[_0x2c7750['model']],'as':_0x2c7750['as'],'attributes':_0x2c7750['attributes'],'include':_0x2c7750[_0x8b3f('0x11')]?_[_0x8b3f('0x12')](_0x2c7750[_0x8b3f('0x11')],function(_0x2dbd31){return{'model':db[_0x2dbd31['model']],'as':_0x2dbd31['as'],'attributes':_0x2dbd31[_0x8b3f('0x14')],'include':_0x2dbd31[_0x8b3f('0x11')]?_[_0x8b3f('0x12')](_0x2dbd31[_0x8b3f('0x11')],function(_0x9e6989){return{'model':db[_0x9e6989[_0x8b3f('0x13')]],'as':_0x9e6989['as'],'attributes':_0x9e6989[_0x8b3f('0x14')]};}):[]};}):[]};}):[]:[]})[_0x8b3f('0x15')](function(_0x14ec3f){logger[_0x8b3f('0x16')]('ShowSquareProject',_0x4a5283);logger[_0x8b3f('0x17')](_0x8b3f('0x1c'),_0x4a5283,JSON[_0x8b3f('0x18')](_0x14ec3f));_0x1338a1(_0x14ec3f);})[_0x8b3f('0x19')](function(_0x381d7f){logger[_0x8b3f('0x1a')](_0x8b3f('0x1c'),_0x381d7f[_0x8b3f('0x1b')],_0x4a5283);_0x2ac880(_0x1eaace[_0x8b3f('0x1a')](0x1f4,_0x381d7f[_0x8b3f('0x1b')]));});});};
\ No newline at end of file
index d43433b..ca72f06 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5d1b=['removeListener','length','squareProject:','./squareProject.events','save','update','emit'];(function(_0x337d86,_0x12d2d4){var _0x22fd02=function(_0x1834a9){while(--_0x1834a9){_0x337d86['push'](_0x337d86['shift']());}};_0x22fd02(++_0x12d2d4);}(_0x5d1b,0x6c));var _0xb5d1=function(_0x185e6d,_0x4cce46){_0x185e6d=_0x185e6d-0x0;var _0x32f988=_0x5d1b[_0x185e6d];return _0x32f988;};'use strict';var SquareProjectEvents=require(_0xb5d1('0x0'));var events=[_0xb5d1('0x1'),'remove',_0xb5d1('0x2')];function createListener(_0x14cea7,_0x50ef4a){return function(_0xf48b46){_0x50ef4a[_0xb5d1('0x3')](_0x14cea7,_0xf48b46);};}function removeListener(_0x4225cf,_0x1fba59){return function(){SquareProjectEvents[_0xb5d1('0x4')](_0x4225cf,_0x1fba59);};}exports['register']=function(_0x4b5664){for(var _0x5a1aa6=0x0,_0x45f4b5=events[_0xb5d1('0x5')];_0x5a1aa6<_0x45f4b5;_0x5a1aa6++){var _0x6f05f3=events[_0x5a1aa6];var _0x18738d=createListener(_0xb5d1('0x6')+_0x6f05f3,_0x4b5664);SquareProjectEvents['on'](_0x6f05f3,_0x18738d);}};
\ No newline at end of file
+var _0x6549=['squareProject:','./squareProject.events','save','remove','update','emit','removeListener','register','length'];(function(_0x40e885,_0x578298){var _0xe3d727=function(_0x39267a){while(--_0x39267a){_0x40e885['push'](_0x40e885['shift']());}};_0xe3d727(++_0x578298);}(_0x6549,0x1cc));var _0x9654=function(_0x2f3810,_0xd81355){_0x2f3810=_0x2f3810-0x0;var _0x18938c=_0x6549[_0x2f3810];return _0x18938c;};'use strict';var SquareProjectEvents=require(_0x9654('0x0'));var events=[_0x9654('0x1'),_0x9654('0x2'),_0x9654('0x3')];function createListener(_0x57a40a,_0x35a5fe){return function(_0xb7429d){_0x35a5fe[_0x9654('0x4')](_0x57a40a,_0xb7429d);};}function removeListener(_0x1c68cb,_0x39d77a){return function(){SquareProjectEvents[_0x9654('0x5')](_0x1c68cb,_0x39d77a);};}exports[_0x9654('0x6')]=function(_0x59b627){for(var _0x18f73d=0x0,_0x32d817=events[_0x9654('0x7')];_0x18f73d<_0x32d817;_0x18f73d++){var _0x19bdb9=events[_0x18f73d];var _0x23c48d=createListener(_0x9654('0x8')+_0x19bdb9,_0x59b627);SquareProjectEvents['on'](_0x19bdb9,_0x23c48d);}};
\ No newline at end of file
index 0cd424c..eaf565c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc4aa=['destroy','exports','multer','util','path','connect-timeout','express','Router','../../config/environment','./squareRecording.controller','get','isAuthenticated','index','/:id','/:id/download','download','create','put','delete'];(function(_0x500730,_0x5d7f22){var _0x4fc42c=function(_0x1fd847){while(--_0x1fd847){_0x500730['push'](_0x500730['shift']());}};_0x4fc42c(++_0x5d7f22);}(_0xc4aa,0x1b7));var _0xac4a=function(_0x5d2803,_0xf375bd){_0x5d2803=_0x5d2803-0x0;var _0xdcad2c=_0xc4aa[_0x5d2803];return _0xdcad2c;};'use strict';var multer=require(_0xac4a('0x0'));var util=require(_0xac4a('0x1'));var path=require(_0xac4a('0x2'));var timeout=require(_0xac4a('0x3'));var express=require(_0xac4a('0x4'));var router=express[_0xac4a('0x5')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xac4a('0x6'));var controller=require(_0xac4a('0x7'));router[_0xac4a('0x8')]('/',auth[_0xac4a('0x9')](),controller[_0xac4a('0xa')]);router[_0xac4a('0x8')](_0xac4a('0xb'),auth[_0xac4a('0x9')](),controller['show']);router['get'](_0xac4a('0xc'),auth[_0xac4a('0x9')](),controller[_0xac4a('0xd')]);router['post']('/',auth[_0xac4a('0x9')](),controller[_0xac4a('0xe')]);router[_0xac4a('0xf')]('/:id',auth[_0xac4a('0x9')](),controller['update']);router[_0xac4a('0x10')]('/:id',auth[_0xac4a('0x9')](),controller[_0xac4a('0x11')]);module[_0xac4a('0x12')]=router;
\ No newline at end of file
+var _0x1cb9=['update','delete','destroy','exports','multer','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./squareRecording.controller','get','isAuthenticated','index','/:id','show','/:id/download','download','post','create','put'];(function(_0x242fd2,_0x562f2e){var _0x554f01=function(_0x2661d8){while(--_0x2661d8){_0x242fd2['push'](_0x242fd2['shift']());}};_0x554f01(++_0x562f2e);}(_0x1cb9,0x14e));var _0x91cb=function(_0x2ea532,_0x20e0b3){_0x2ea532=_0x2ea532-0x0;var _0x385aee=_0x1cb9[_0x2ea532];return _0x385aee;};'use strict';var multer=require(_0x91cb('0x0'));var util=require('util');var path=require(_0x91cb('0x1'));var timeout=require(_0x91cb('0x2'));var express=require(_0x91cb('0x3'));var router=express[_0x91cb('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x91cb('0x5'));var interaction=require(_0x91cb('0x6'));var config=require('../../config/environment');var controller=require(_0x91cb('0x7'));router[_0x91cb('0x8')]('/',auth[_0x91cb('0x9')](),controller[_0x91cb('0xa')]);router[_0x91cb('0x8')](_0x91cb('0xb'),auth['isAuthenticated'](),controller[_0x91cb('0xc')]);router['get'](_0x91cb('0xd'),auth['isAuthenticated'](),controller[_0x91cb('0xe')]);router[_0x91cb('0xf')]('/',auth[_0x91cb('0x9')](),controller[_0x91cb('0x10')]);router[_0x91cb('0x11')](_0x91cb('0xb'),auth[_0x91cb('0x9')](),controller[_0x91cb('0x12')]);router[_0x91cb('0x13')](_0x91cb('0xb'),auth['isAuthenticated'](),controller[_0x91cb('0x14')]);module[_0x91cb('0x15')]=router;
\ No newline at end of file
index 42b8805..a1f7c64 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xac31=['STRING','VIRTUAL','savePath','lastIndexOf','sequelize','exports'];(function(_0x1440d9,_0x4a2c7e){var _0x4a0cfb=function(_0x9dc96c){while(--_0x9dc96c){_0x1440d9['push'](_0x1440d9['shift']());}};_0x4a0cfb(++_0x4a2c7e);}(_0xac31,0xca));var _0x1ac3=function(_0x134920,_0x447c4c){_0x134920=_0x134920-0x0;var _0x18baae=_0xac31[_0x134920];return _0x18baae;};'use strict';var Sequelize=require(_0x1ac3('0x0'));module[_0x1ac3('0x1')]={'uniqueid':{'type':Sequelize[_0x1ac3('0x2')]},'callerid':{'type':Sequelize[_0x1ac3('0x2')]},'calleridname':{'type':Sequelize[_0x1ac3('0x2')]},'context':{'type':Sequelize[_0x1ac3('0x2')]},'extension':{'type':Sequelize[_0x1ac3('0x2')]},'priority':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0x1ac3('0x2')]},'dnid':{'type':Sequelize[_0x1ac3('0x2')]},'projectName':{'type':Sequelize['STRING']},'saveName':{'type':Sequelize['STRING']},'filename':{'type':Sequelize[_0x1ac3('0x2')]},'savePath':{'type':Sequelize[_0x1ac3('0x2')]},'format':{'type':Sequelize[_0x1ac3('0x3')],'get':function(){var _0x1be223='';var _0x157604=this['getDataValue'](_0x1ac3('0x4'));if(_0x157604){_0x1be223=_0x157604['substring'](_0x157604[_0x1ac3('0x5')]('.'));}return _0x1be223;}}};
\ No newline at end of file
+var _0x33c5=['STRING','VIRTUAL','getDataValue','savePath','substring','lastIndexOf','exports'];(function(_0x439e06,_0xe6d21c){var _0xaa57c1=function(_0x55fb96){while(--_0x55fb96){_0x439e06['push'](_0x439e06['shift']());}};_0xaa57c1(++_0xe6d21c);}(_0x33c5,0xe6));var _0x533c=function(_0x83609a,_0x4623de){_0x83609a=_0x83609a-0x0;var _0x3de3aa=_0x33c5[_0x83609a];return _0x3de3aa;};'use strict';var Sequelize=require('sequelize');module[_0x533c('0x0')]={'uniqueid':{'type':Sequelize[_0x533c('0x1')]},'callerid':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0x533c('0x1')]},'context':{'type':Sequelize[_0x533c('0x1')]},'extension':{'type':Sequelize[_0x533c('0x1')]},'priority':{'type':Sequelize[_0x533c('0x1')]},'accountcode':{'type':Sequelize[_0x533c('0x1')]},'dnid':{'type':Sequelize['STRING']},'projectName':{'type':Sequelize[_0x533c('0x1')]},'saveName':{'type':Sequelize[_0x533c('0x1')]},'filename':{'type':Sequelize[_0x533c('0x1')]},'savePath':{'type':Sequelize[_0x533c('0x1')]},'format':{'type':Sequelize[_0x533c('0x2')],'get':function(){var _0x1699d5='';var _0x3a009b=this[_0x533c('0x3')](_0x533c('0x4'));if(_0x3a009b){_0x1699d5=_0x3a009b[_0x533c('0x5')](_0x3a009b[_0x533c('0x6')]('.'));}return _0x1699d5;}}};
\ No newline at end of file
index a91c952..a79ba2b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd50c=['then','destroy','stack','name','send','index','SquareRecording','fieldName','model','map','query','keys','filters','intersection','fields','attributes','length','limit','order','sort','where','pick','filter','merge','type','VIRTUAL','include','rows','catch','show','params','rawAttributes','includeAll','options','find','create','body','download','../../components/encryptor','uniqueid','filename','savePath','format','existsSync','decryptFile','secrets','recording','Sequelize','ValidationError','SquareRecording\x20not\x20found','extname','unlink','message','Not\x20found','isNil','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','unlinkSync','.cypher','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','eml-format','rimraf','zip-dir','request-promise','sox','to-csv','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','set','Content-Range','apply','reject','save','update'];(function(_0x585133,_0x2412a1){var _0x18254a=function(_0x4c8aaf){while(--_0x4c8aaf){_0x585133['push'](_0x585133['shift']());}};_0x18254a(++_0x2412a1);}(_0xd50c,0x1b2));var _0xcd50=function(_0x122588,_0x5e6fa4){_0x122588=_0x122588-0x0;var _0x1d6ad9=_0xd50c[_0x122588];return _0x1d6ad9;};'use strict';var emlformat=require(_0xcd50('0x0'));var rimraf=require(_0xcd50('0x1'));var zipdir=require(_0xcd50('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xcd50('0x3'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require('path');var sox=require(_0xcd50('0x4'));var csv=require(_0xcd50('0x5'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xcd50('0x6'));var _=require(_0xcd50('0x7'));var squel=require(_0xcd50('0x8'));var crypto=require(_0xcd50('0x9'));var jsforce=require(_0xcd50('0xa'));var deskjs=require(_0xcd50('0xb'));var toCsv=require('to-csv');var querystring=require(_0xcd50('0xc'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0xcd50('0xd'));var hardwareService=require(_0xcd50('0xe'));var logger=require('../../config/logger')(_0xcd50('0xf'));var utils=require(_0xcd50('0x10'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xcd50('0x11'))['db'];function respondWithStatusCode(_0x4342d3,_0x3068de){_0x3068de=_0x3068de||0xcc;return function(_0xc8ab9c){if(_0xc8ab9c){return _0x4342d3[_0xcd50('0x12')](_0x3068de);}return _0x4342d3[_0xcd50('0x13')](_0x3068de)[_0xcd50('0x14')]();};}function respondWithResult(_0x2d9c02,_0x1dc281){_0x1dc281=_0x1dc281||0xc8;return function(_0x24352a){if(_0x24352a){return _0x2d9c02[_0xcd50('0x13')](_0x1dc281)[_0xcd50('0x15')](_0x24352a);}};}function respondWithFilteredResult(_0x2ea417,_0x4c08d4){return function(_0x128213){if(_0x128213){var _0x24ab2c=typeof _0x4c08d4[_0xcd50('0x16')]===_0xcd50('0x17')&&typeof _0x4c08d4['limit']==='undefined';var _0x491da0=_0x128213[_0xcd50('0x18')];var _0x1cb31e=_0x24ab2c?0x0:_0x4c08d4[_0xcd50('0x16')];var _0x56cc15=_0x24ab2c?_0x128213[_0xcd50('0x18')]:_0x4c08d4['offset']+_0x4c08d4['limit'];var _0x89a784;if(_0x56cc15>=_0x491da0){_0x56cc15=_0x491da0;_0x89a784=0xc8;}else{_0x89a784=0xce;}_0x2ea417[_0xcd50('0x13')](_0x89a784);return _0x2ea417[_0xcd50('0x19')](_0xcd50('0x1a'),_0x1cb31e+'-'+_0x56cc15+'/'+_0x491da0)[_0xcd50('0x15')](_0x128213);}return null;};}function patchUpdates(_0x432bfe){return function(_0x38f648){try{jsonpatch[_0xcd50('0x1b')](_0x38f648,_0x432bfe,!![]);}catch(_0x376824){return BPromise[_0xcd50('0x1c')](_0x376824);}return _0x38f648[_0xcd50('0x1d')]();};}function saveUpdates(_0x1b581f,_0x101b23){return function(_0x5c5d7c){if(_0x5c5d7c){return _0x5c5d7c[_0xcd50('0x1e')](_0x1b581f)[_0xcd50('0x1f')](function(_0x51ec71){return _0x51ec71;});}return null;};}function removeEntity(_0x3117d6,_0x1c060a){return function(_0x57994e){if(_0x57994e){return _0x57994e[_0xcd50('0x20')]()[_0xcd50('0x1f')](function(){_0x3117d6[_0xcd50('0x13')](0xcc)[_0xcd50('0x14')]();});}};}function handleEntityNotFound(_0x54ea22,_0x21b7d4){return function(_0x36ea8f){if(!_0x36ea8f){_0x54ea22[_0xcd50('0x12')](0x194);}return _0x36ea8f;};}function handleError(_0x525f75,_0xfc03bb){_0xfc03bb=_0xfc03bb||0x1f4;return function(_0x12255a){logger['error'](_0x12255a[_0xcd50('0x21')]);if(_0x12255a[_0xcd50('0x22')]){delete _0x12255a[_0xcd50('0x22')];}_0x525f75[_0xcd50('0x13')](_0xfc03bb)[_0xcd50('0x23')](_0x12255a);};}exports[_0xcd50('0x24')]=function(_0x5b4c1a,_0x183d44){var _0x5f31dd={},_0x1b7049={},_0x4c9845={'count':0x0,'rows':[]};var _0x30ab63=_['map'](db[_0xcd50('0x25')]['rawAttributes'],function(_0x5b14d2){return{'name':_0x5b14d2[_0xcd50('0x26')],'type':_0x5b14d2['type']['key']};});_0x1b7049[_0xcd50('0x27')]=_[_0xcd50('0x28')](_0x30ab63,_0xcd50('0x22'));_0x1b7049[_0xcd50('0x29')]=_[_0xcd50('0x2a')](_0x5b4c1a[_0xcd50('0x29')]);_0x1b7049[_0xcd50('0x2b')]=_[_0xcd50('0x2c')](_0x1b7049[_0xcd50('0x27')],_0x1b7049['query']);_0x5f31dd['attributes']=_[_0xcd50('0x2c')](_0x1b7049[_0xcd50('0x27')],qs[_0xcd50('0x2d')](_0x5b4c1a[_0xcd50('0x29')][_0xcd50('0x2d')]));_0x5f31dd[_0xcd50('0x2e')]=_0x5f31dd[_0xcd50('0x2e')][_0xcd50('0x2f')]?_0x5f31dd[_0xcd50('0x2e')]:_0x1b7049[_0xcd50('0x27')];if(!_0x5b4c1a['query']['hasOwnProperty']('nolimit')){_0x5f31dd[_0xcd50('0x30')]=qs[_0xcd50('0x30')](_0x5b4c1a['query'][_0xcd50('0x30')]);_0x5f31dd['offset']=qs[_0xcd50('0x16')](_0x5b4c1a[_0xcd50('0x29')][_0xcd50('0x16')]);}_0x5f31dd[_0xcd50('0x31')]=qs[_0xcd50('0x32')](_0x5b4c1a[_0xcd50('0x29')][_0xcd50('0x32')]);_0x5f31dd[_0xcd50('0x33')]=qs['filters'](_[_0xcd50('0x34')](_0x5b4c1a[_0xcd50('0x29')],_0x1b7049[_0xcd50('0x2b')]),_0x30ab63);if(_0x5b4c1a['query'][_0xcd50('0x35')]){_0x5f31dd['where']=_[_0xcd50('0x36')](_0x5f31dd['where'],{'$or':_[_0xcd50('0x28')](_0x30ab63,function(_0x4be52c){if(_0x4be52c[_0xcd50('0x37')]!==_0xcd50('0x38')){var _0x1b19ad={};_0x1b19ad[_0x4be52c[_0xcd50('0x22')]]={'$like':'%'+_0x5b4c1a['query'][_0xcd50('0x35')]+'%'};return _0x1b19ad;}})});}_0x5f31dd=_['merge']({},_0x5f31dd,_0x5b4c1a['options']);var _0x52e3b6={'where':_0x5f31dd[_0xcd50('0x33')]};return db[_0xcd50('0x25')][_0xcd50('0x18')](_0x52e3b6)[_0xcd50('0x1f')](function(_0x2edde7){_0x4c9845[_0xcd50('0x18')]=_0x2edde7;if(_0x5b4c1a[_0xcd50('0x29')]['includeAll']){_0x5f31dd[_0xcd50('0x39')]=[{'all':!![]}];}return db[_0xcd50('0x25')]['findAll'](_0x5f31dd);})[_0xcd50('0x1f')](function(_0x38ba15){_0x4c9845[_0xcd50('0x3a')]=_0x38ba15;return _0x4c9845;})['then'](respondWithFilteredResult(_0x183d44,_0x5f31dd))[_0xcd50('0x3b')](handleError(_0x183d44,null));};exports[_0xcd50('0x3c')]=function(_0x153ff7,_0x5e9026){var _0xfe4229={'raw':!![],'where':{'id':_0x153ff7[_0xcd50('0x3d')]['id']}},_0x509c0f={};_0x509c0f['model']=_['keys'](db[_0xcd50('0x25')][_0xcd50('0x3e')]);_0x509c0f[_0xcd50('0x29')]=_[_0xcd50('0x2a')](_0x153ff7[_0xcd50('0x29')]);_0x509c0f['filters']=_[_0xcd50('0x2c')](_0x509c0f[_0xcd50('0x27')],_0x509c0f[_0xcd50('0x29')]);_0xfe4229[_0xcd50('0x2e')]=_[_0xcd50('0x2c')](_0x509c0f[_0xcd50('0x27')],qs[_0xcd50('0x2d')](_0x153ff7[_0xcd50('0x29')][_0xcd50('0x2d')]));_0xfe4229[_0xcd50('0x2e')]=_0xfe4229[_0xcd50('0x2e')][_0xcd50('0x2f')]?_0xfe4229['attributes']:_0x509c0f[_0xcd50('0x27')];if(_0x153ff7[_0xcd50('0x29')][_0xcd50('0x3f')]){_0xfe4229[_0xcd50('0x39')]=[{'all':!![]}];}_0xfe4229=_[_0xcd50('0x36')]({},_0xfe4229,_0x153ff7[_0xcd50('0x40')]);return db[_0xcd50('0x25')][_0xcd50('0x41')](_0xfe4229)[_0xcd50('0x1f')](handleEntityNotFound(_0x5e9026,null))[_0xcd50('0x1f')](respondWithResult(_0x5e9026,null))['catch'](handleError(_0x5e9026,null));};exports[_0xcd50('0x42')]=function(_0xec70f8,_0x38b0a0){return db[_0xcd50('0x25')][_0xcd50('0x42')](_0xec70f8[_0xcd50('0x43')],{})['then'](respondWithResult(_0x38b0a0,0xc9))['catch'](handleError(_0x38b0a0,null));};exports[_0xcd50('0x1e')]=function(_0x12604a,_0x4757c9){if(_0x12604a['body']['id']){delete _0x12604a['body']['id'];}return db['SquareRecording'][_0xcd50('0x41')]({'where':{'id':_0x12604a['params']['id']}})[_0xcd50('0x1f')](handleEntityNotFound(_0x4757c9,null))['then'](saveUpdates(_0x12604a[_0xcd50('0x43')],null))[_0xcd50('0x1f')](respondWithResult(_0x4757c9,null))['catch'](handleError(_0x4757c9,null));};exports[_0xcd50('0x44')]=function(_0xb5effd,_0x4d1b02,_0x5a146f){var _0x2bfbf9=require(_0xcd50('0x45'));var _0x8a936a=![];var _0x261dc6={};if(_0xb5effd[_0xcd50('0x29')][_0xcd50('0x37')]&&_0xb5effd[_0xcd50('0x29')][_0xcd50('0x37')]===_0xcd50('0x46')){_0x261dc6[_0xcd50('0x46')]=_0xb5effd[_0xcd50('0x3d')]['id'];}else{_0x261dc6['id']=_0xb5effd['params']['id'];}return db[_0xcd50('0x25')]['find']({'where':_0x261dc6,'attributes':['id','savePath',_0xcd50('0x47')],'raw':!![]})['then'](handleEntityNotFound(_0x4d1b02,null))['then'](function(_0x3938cc){if(_0x3938cc){var _0x5ce320=_0x3938cc[_0xcd50('0x48')];var _0x4df815=util[_0xcd50('0x49')]('%s.cypher',_0x5ce320);if(fs[_0xcd50('0x4a')](_0x4df815)){_0x8a936a=!![];return _0x2bfbf9[_0xcd50('0x4b')](_0x4df815,_0x5ce320,config[_0xcd50('0x4c')][_0xcd50('0x4d')])['then'](function(){return _0x3938cc;});}return _0x3938cc;}})[_0xcd50('0x1f')](function(_0x1d90d4){if(_0x1d90d4){var _0x14fd6c=_0x1d90d4[_0xcd50('0x48')];if(!fs[_0xcd50('0x4a')](_0x14fd6c)){throw new db[(_0xcd50('0x4e'))][(_0xcd50('0x4f'))](_0xcd50('0x50'));}if(_0x1d90d4[_0xcd50('0x47')]){return _0x4d1b02[_0xcd50('0x44')](_0x14fd6c,_0x1d90d4[_0xcd50('0x47')]+path[_0xcd50('0x51')](_0x14fd6c),function(){if(_0x8a936a){fs[_0xcd50('0x52')](_0x14fd6c);}});}else{return _0x4d1b02['download'](_0x14fd6c,function(_0x47352e){if(_0x8a936a){fs['unlink'](_0x14fd6c);}});}}})[_0xcd50('0x3b')](function(_0x396ad1){if(_0x396ad1[_0xcd50('0x53')]==='SquareRecording\x20not\x20found'){_0x4d1b02['status'](0x194)[_0xcd50('0x23')](_0xcd50('0x54'));}else{return handleError(_0x4d1b02,null);}});};exports[_0xcd50('0x20')]=function(_0xb21699,_0x303996){return db[_0xcd50('0x25')][_0xcd50('0x41')]({'where':{'id':_0xb21699[_0xcd50('0x3d')]['id']}})[_0xcd50('0x1f')](function(_0x524d59){if(_[_0xcd50('0x55')](_0x524d59)){throw new ReferenceError(_0xcd50('0x56'));}return _0x524d59;})[_0xcd50('0x1f')](function(_0x3c60a9){var _0x432856=_0x3c60a9[_0xcd50('0x48')];logger[_0xcd50('0x57')](_0xcd50('0x58'),_0x432856);if(!_['isNil'](_0x3c60a9[_0xcd50('0x48')])&&fs['existsSync'](_0x432856)){logger[_0xcd50('0x57')]('File:\x20\x22'+_0x432856+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs[_0xcd50('0x59')](_0x432856);}_0x432856=_0x432856+_0xcd50('0x5a');if(!_[_0xcd50('0x55')](_0x3c60a9[_0xcd50('0x48')])&&fs['existsSync'](_0x432856)){logger[_0xcd50('0x57')](_0xcd50('0x5b')+_0x432856+_0xcd50('0x5c'));fs[_0xcd50('0x59')](_0x432856);}return _0x3c60a9;})[_0xcd50('0x1f')](function(_0x2adf06){if(!_0x2adf06)throw new InternalError();return _0x2adf06[_0xcd50('0x20')]();})[_0xcd50('0x1f')](function(){_0x303996[_0xcd50('0x13')](0xcc)[_0xcd50('0x14')]();})[_0xcd50('0x3b')](handleError(_0x303996,null));};
\ No newline at end of file
+var _0x7b14=['includeAll','include','findAll','rows','catch','show','create','body','../../components/encryptor','uniqueid','params','find','savePath','filename','format','decryptFile','secrets','recording','existsSync','SquareRecording\x20not\x20found','download','extname','unlink','message','Not\x20found','isNil','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','.cypher','eml-format','rimraf','fast-json-patch','moment','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','sendStatus','status','offset','undefined','limit','count','set','json','apply','save','update','destroy','then','end','error','stack','name','send','index','map','rawAttributes','fieldName','type','model','query','intersection','attributes','fields','length','nolimit','sort','pick','filters','filter','where','VIRTUAL','merge','options','SquareRecording'];(function(_0x225838,_0x29b914){var _0x1da96b=function(_0x3e54b3){while(--_0x3e54b3){_0x225838['push'](_0x225838['shift']());}};_0x1da96b(++_0x29b914);}(_0x7b14,0xdf));var _0x47b1=function(_0x596430,_0x533f8f){_0x596430=_0x596430-0x0;var _0x2b680e=_0x7b14[_0x596430];return _0x2b680e;};'use strict';var emlformat=require(_0x47b1('0x0'));var rimraf=require(_0x47b1('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x47b1('0x2'));var rp=require('request-promise');var moment=require(_0x47b1('0x3'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0x47b1('0x4'));var path=require(_0x47b1('0x5'));var sox=require(_0x47b1('0x6'));var csv=require(_0x47b1('0x7'));var ejs=require(_0x47b1('0x8'));var fs=require('fs');var fs_extra=require(_0x47b1('0x9'));var _=require(_0x47b1('0xa'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0x47b1('0xb'));var deskjs=require(_0x47b1('0xc'));var toCsv=require(_0x47b1('0x7'));var querystring=require(_0x47b1('0xd'));var Papa=require(_0x47b1('0xe'));var Redis=require(_0x47b1('0xf'));var authService=require(_0x47b1('0x10'));var qs=require(_0x47b1('0x11'));var as=require(_0x47b1('0x12'));var hardwareService=require(_0x47b1('0x13'));var logger=require(_0x47b1('0x14'))(_0x47b1('0x15'));var utils=require('../../config/utils');var config=require(_0x47b1('0x16'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1e01b6,_0x27e6de){_0x27e6de=_0x27e6de||0xcc;return function(_0x46663d){if(_0x46663d){return _0x1e01b6[_0x47b1('0x17')](_0x27e6de);}return _0x1e01b6['status'](_0x27e6de)['end']();};}function respondWithResult(_0x358258,_0xb6900a){_0xb6900a=_0xb6900a||0xc8;return function(_0x2f5a82){if(_0x2f5a82){return _0x358258[_0x47b1('0x18')](_0xb6900a)['json'](_0x2f5a82);}};}function respondWithFilteredResult(_0x2826be,_0x89978b){return function(_0x21e337){if(_0x21e337){var _0x30d9fd=typeof _0x89978b[_0x47b1('0x19')]===_0x47b1('0x1a')&&typeof _0x89978b[_0x47b1('0x1b')]===_0x47b1('0x1a');var _0x123945=_0x21e337[_0x47b1('0x1c')];var _0x4a3bc1=_0x30d9fd?0x0:_0x89978b[_0x47b1('0x19')];var _0x1ed821=_0x30d9fd?_0x21e337[_0x47b1('0x1c')]:_0x89978b[_0x47b1('0x19')]+_0x89978b[_0x47b1('0x1b')];var _0xd74b11;if(_0x1ed821>=_0x123945){_0x1ed821=_0x123945;_0xd74b11=0xc8;}else{_0xd74b11=0xce;}_0x2826be[_0x47b1('0x18')](_0xd74b11);return _0x2826be[_0x47b1('0x1d')]('Content-Range',_0x4a3bc1+'-'+_0x1ed821+'/'+_0x123945)[_0x47b1('0x1e')](_0x21e337);}return null;};}function patchUpdates(_0x44fdbf){return function(_0x167ecf){try{jsonpatch[_0x47b1('0x1f')](_0x167ecf,_0x44fdbf,!![]);}catch(_0x325bb7){return BPromise['reject'](_0x325bb7);}return _0x167ecf[_0x47b1('0x20')]();};}function saveUpdates(_0x740842,_0x4c006a){return function(_0x3a555a){if(_0x3a555a){return _0x3a555a[_0x47b1('0x21')](_0x740842)['then'](function(_0x478435){return _0x478435;});}return null;};}function removeEntity(_0x7189aa,_0x157d67){return function(_0x1807ef){if(_0x1807ef){return _0x1807ef[_0x47b1('0x22')]()[_0x47b1('0x23')](function(){_0x7189aa[_0x47b1('0x18')](0xcc)[_0x47b1('0x24')]();});}};}function handleEntityNotFound(_0xc3253e,_0x1c9114){return function(_0x17100b){if(!_0x17100b){_0xc3253e['sendStatus'](0x194);}return _0x17100b;};}function handleError(_0xc87a77,_0x35a3cc){_0x35a3cc=_0x35a3cc||0x1f4;return function(_0x57aefd){logger[_0x47b1('0x25')](_0x57aefd[_0x47b1('0x26')]);if(_0x57aefd[_0x47b1('0x27')]){delete _0x57aefd[_0x47b1('0x27')];}_0xc87a77['status'](_0x35a3cc)[_0x47b1('0x28')](_0x57aefd);};}exports[_0x47b1('0x29')]=function(_0x22a2dc,_0x292f99){var _0x29cebb={},_0x4efd58={},_0x336405={'count':0x0,'rows':[]};var _0x3f5fbd=_[_0x47b1('0x2a')](db['SquareRecording'][_0x47b1('0x2b')],function(_0x33289b){return{'name':_0x33289b[_0x47b1('0x2c')],'type':_0x33289b[_0x47b1('0x2d')]['key']};});_0x4efd58[_0x47b1('0x2e')]=_[_0x47b1('0x2a')](_0x3f5fbd,'name');_0x4efd58[_0x47b1('0x2f')]=_['keys'](_0x22a2dc[_0x47b1('0x2f')]);_0x4efd58['filters']=_[_0x47b1('0x30')](_0x4efd58[_0x47b1('0x2e')],_0x4efd58[_0x47b1('0x2f')]);_0x29cebb[_0x47b1('0x31')]=_[_0x47b1('0x30')](_0x4efd58['model'],qs[_0x47b1('0x32')](_0x22a2dc[_0x47b1('0x2f')][_0x47b1('0x32')]));_0x29cebb[_0x47b1('0x31')]=_0x29cebb[_0x47b1('0x31')][_0x47b1('0x33')]?_0x29cebb['attributes']:_0x4efd58['model'];if(!_0x22a2dc[_0x47b1('0x2f')]['hasOwnProperty'](_0x47b1('0x34'))){_0x29cebb[_0x47b1('0x1b')]=qs[_0x47b1('0x1b')](_0x22a2dc[_0x47b1('0x2f')][_0x47b1('0x1b')]);_0x29cebb[_0x47b1('0x19')]=qs[_0x47b1('0x19')](_0x22a2dc[_0x47b1('0x2f')][_0x47b1('0x19')]);}_0x29cebb['order']=qs[_0x47b1('0x35')](_0x22a2dc[_0x47b1('0x2f')][_0x47b1('0x35')]);_0x29cebb['where']=qs['filters'](_[_0x47b1('0x36')](_0x22a2dc['query'],_0x4efd58[_0x47b1('0x37')]),_0x3f5fbd);if(_0x22a2dc['query'][_0x47b1('0x38')]){_0x29cebb[_0x47b1('0x39')]=_['merge'](_0x29cebb[_0x47b1('0x39')],{'$or':_[_0x47b1('0x2a')](_0x3f5fbd,function(_0x1993a0){if(_0x1993a0[_0x47b1('0x2d')]!==_0x47b1('0x3a')){var _0x4a2726={};_0x4a2726[_0x1993a0['name']]={'$like':'%'+_0x22a2dc['query'][_0x47b1('0x38')]+'%'};return _0x4a2726;}})});}_0x29cebb=_[_0x47b1('0x3b')]({},_0x29cebb,_0x22a2dc[_0x47b1('0x3c')]);var _0x433b69={'where':_0x29cebb[_0x47b1('0x39')]};return db[_0x47b1('0x3d')]['count'](_0x433b69)[_0x47b1('0x23')](function(_0x16d689){_0x336405[_0x47b1('0x1c')]=_0x16d689;if(_0x22a2dc['query'][_0x47b1('0x3e')]){_0x29cebb[_0x47b1('0x3f')]=[{'all':!![]}];}return db['SquareRecording'][_0x47b1('0x40')](_0x29cebb);})[_0x47b1('0x23')](function(_0x7aa2fc){_0x336405[_0x47b1('0x41')]=_0x7aa2fc;return _0x336405;})[_0x47b1('0x23')](respondWithFilteredResult(_0x292f99,_0x29cebb))[_0x47b1('0x42')](handleError(_0x292f99,null));};exports[_0x47b1('0x43')]=function(_0x4744ce,_0x4db991){var _0x463410={'raw':!![],'where':{'id':_0x4744ce['params']['id']}},_0x38338a={};_0x38338a[_0x47b1('0x2e')]=_['keys'](db[_0x47b1('0x3d')][_0x47b1('0x2b')]);_0x38338a[_0x47b1('0x2f')]=_['keys'](_0x4744ce[_0x47b1('0x2f')]);_0x38338a[_0x47b1('0x37')]=_['intersection'](_0x38338a[_0x47b1('0x2e')],_0x38338a[_0x47b1('0x2f')]);_0x463410[_0x47b1('0x31')]=_[_0x47b1('0x30')](_0x38338a[_0x47b1('0x2e')],qs[_0x47b1('0x32')](_0x4744ce['query']['fields']));_0x463410[_0x47b1('0x31')]=_0x463410[_0x47b1('0x31')][_0x47b1('0x33')]?_0x463410[_0x47b1('0x31')]:_0x38338a[_0x47b1('0x2e')];if(_0x4744ce['query'][_0x47b1('0x3e')]){_0x463410[_0x47b1('0x3f')]=[{'all':!![]}];}_0x463410=_[_0x47b1('0x3b')]({},_0x463410,_0x4744ce['options']);return db['SquareRecording']['find'](_0x463410)['then'](handleEntityNotFound(_0x4db991,null))['then'](respondWithResult(_0x4db991,null))[_0x47b1('0x42')](handleError(_0x4db991,null));};exports[_0x47b1('0x44')]=function(_0x3eee68,_0x465471){return db['SquareRecording']['create'](_0x3eee68[_0x47b1('0x45')],{})[_0x47b1('0x23')](respondWithResult(_0x465471,0xc9))['catch'](handleError(_0x465471,null));};exports[_0x47b1('0x21')]=function(_0x1a3ff8,_0x44ecc4){if(_0x1a3ff8[_0x47b1('0x45')]['id']){delete _0x1a3ff8[_0x47b1('0x45')]['id'];}return db['SquareRecording']['find']({'where':{'id':_0x1a3ff8['params']['id']}})[_0x47b1('0x23')](handleEntityNotFound(_0x44ecc4,null))['then'](saveUpdates(_0x1a3ff8['body'],null))[_0x47b1('0x23')](respondWithResult(_0x44ecc4,null))['catch'](handleError(_0x44ecc4,null));};exports['download']=function(_0x324c50,_0x1be590,_0x14904f){var _0x3f1cb5=require(_0x47b1('0x46'));var _0x31b919=![];var _0x359681={};if(_0x324c50[_0x47b1('0x2f')][_0x47b1('0x2d')]&&_0x324c50[_0x47b1('0x2f')]['type']===_0x47b1('0x47')){_0x359681[_0x47b1('0x47')]=_0x324c50[_0x47b1('0x48')]['id'];}else{_0x359681['id']=_0x324c50[_0x47b1('0x48')]['id'];}return db['SquareRecording'][_0x47b1('0x49')]({'where':_0x359681,'attributes':['id',_0x47b1('0x4a'),_0x47b1('0x4b')],'raw':!![]})[_0x47b1('0x23')](handleEntityNotFound(_0x1be590,null))[_0x47b1('0x23')](function(_0x231756){if(_0x231756){var _0xf75a31=_0x231756[_0x47b1('0x4a')];var _0x521ca8=util[_0x47b1('0x4c')]('%s.cypher',_0xf75a31);if(fs['existsSync'](_0x521ca8)){_0x31b919=!![];return _0x3f1cb5[_0x47b1('0x4d')](_0x521ca8,_0xf75a31,config[_0x47b1('0x4e')][_0x47b1('0x4f')])[_0x47b1('0x23')](function(){return _0x231756;});}return _0x231756;}})[_0x47b1('0x23')](function(_0x1f4893){if(_0x1f4893){var _0x10564d=_0x1f4893['savePath'];if(!fs[_0x47b1('0x50')](_0x10564d)){throw new db['Sequelize']['ValidationError'](_0x47b1('0x51'));}if(_0x1f4893['filename']){return _0x1be590[_0x47b1('0x52')](_0x10564d,_0x1f4893[_0x47b1('0x4b')]+path[_0x47b1('0x53')](_0x10564d),function(){if(_0x31b919){fs['unlink'](_0x10564d);}});}else{return _0x1be590[_0x47b1('0x52')](_0x10564d,function(_0x4c8f55){if(_0x31b919){fs[_0x47b1('0x54')](_0x10564d);}});}}})[_0x47b1('0x42')](function(_0x3325e0){if(_0x3325e0[_0x47b1('0x55')]===_0x47b1('0x51')){_0x1be590[_0x47b1('0x18')](0x194)[_0x47b1('0x28')](_0x47b1('0x56'));}else{return handleError(_0x1be590,null);}});};exports[_0x47b1('0x22')]=function(_0x5ab8ad,_0x585f7e){return db[_0x47b1('0x3d')][_0x47b1('0x49')]({'where':{'id':_0x5ab8ad[_0x47b1('0x48')]['id']}})[_0x47b1('0x23')](function(_0x37ee25){if(_[_0x47b1('0x57')](_0x37ee25)){throw new ReferenceError(_0x47b1('0x58'));}return _0x37ee25;})[_0x47b1('0x23')](function(_0x5ee58f){var _0x3aa122=_0x5ee58f[_0x47b1('0x4a')];logger[_0x47b1('0x59')](_0x47b1('0x5a'),_0x3aa122);if(!_[_0x47b1('0x57')](_0x5ee58f[_0x47b1('0x4a')])&&fs[_0x47b1('0x50')](_0x3aa122)){logger[_0x47b1('0x59')](_0x47b1('0x5b')+_0x3aa122+_0x47b1('0x5c'));fs[_0x47b1('0x5d')](_0x3aa122);}_0x3aa122=_0x3aa122+_0x47b1('0x5e');if(!_[_0x47b1('0x57')](_0x5ee58f[_0x47b1('0x4a')])&&fs['existsSync'](_0x3aa122)){logger['info']('File:\x20\x22'+_0x3aa122+_0x47b1('0x5c'));fs['unlinkSync'](_0x3aa122);}return _0x5ee58f;})['then'](function(_0xe73968){if(!_0xe73968)throw new InternalError();return _0xe73968[_0x47b1('0x22')]();})[_0x47b1('0x23')](function(){_0x585f7e['status'](0xcc)[_0x47b1('0x24')]();})['catch'](handleError(_0x585f7e,null));};
\ No newline at end of file
index 542f68f..2b6c4ac 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1893=['rimraf','./squareRecording.attributes','exports','define','SquareRecording','square_recordings','../../config/logger','api','moment','bluebird','request-promise','path'];(function(_0x2bd609,_0x44c802){var _0x25ea48=function(_0x2b1f95){while(--_0x2b1f95){_0x2bd609['push'](_0x2bd609['shift']());}};_0x25ea48(++_0x44c802);}(_0x1893,0xa2));var _0x3189=function(_0xfa34aa,_0x1aa9b2){_0xfa34aa=_0xfa34aa-0x0;var _0x469987=_0x1893[_0xfa34aa];return _0x469987;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x3189('0x0'))(_0x3189('0x1'));var moment=require(_0x3189('0x2'));var BPromise=require(_0x3189('0x3'));var rp=require(_0x3189('0x4'));var fs=require('fs');var path=require(_0x3189('0x5'));var rimraf=require(_0x3189('0x6'));var config=require('../../config/environment');var attributes=require(_0x3189('0x7'));module[_0x3189('0x8')]=function(_0x2333e6,_0x4080a9){return _0x2333e6[_0x3189('0x9')](_0x3189('0xa'),attributes,{'tableName':_0x3189('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc6ac=['api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./squareRecording.attributes','exports','SquareRecording','square_recordings','lodash','util','../../config/logger'];(function(_0xaa6a4,_0x64b067){var _0xdc31a4=function(_0x4269d8){while(--_0x4269d8){_0xaa6a4['push'](_0xaa6a4['shift']());}};_0xdc31a4(++_0x64b067);}(_0xc6ac,0x15b));var _0xcc6a=function(_0x139a11,_0x4efd0e){_0x139a11=_0x139a11-0x0;var _0x1502e=_0xc6ac[_0x139a11];return _0x1502e;};'use strict';var _=require(_0xcc6a('0x0'));var util=require(_0xcc6a('0x1'));var logger=require(_0xcc6a('0x2'))(_0xcc6a('0x3'));var moment=require(_0xcc6a('0x4'));var BPromise=require(_0xcc6a('0x5'));var rp=require(_0xcc6a('0x6'));var fs=require('fs');var path=require(_0xcc6a('0x7'));var rimraf=require(_0xcc6a('0x8'));var config=require(_0xcc6a('0x9'));var attributes=require(_0xcc6a('0xa'));module[_0xcc6a('0xb')]=function(_0x12330e,_0x197bd7){return _0x12330e['define'](_0xcc6a('0xc'),attributes,{'tableName':_0xcc6a('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 18dbbfc..8579ca1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2587=['rpc','../../config/environment','jayson/promise','client','http','then','info','SquareRecording,\x20%s,\x20%s','debug','SquareRecording,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','catch','SquareRecording','body','options','raw','CreateSquareRecording','lodash','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x4a04de,_0x2e342c){var _0xbbe018=function(_0x39639c){while(--_0x39639c){_0x4a04de['push'](_0x4a04de['shift']());}};_0xbbe018(++_0x2e342c);}(_0x2587,0x69));var _0x7258=function(_0x5b685e,_0x3e69ad){_0x5b685e=_0x5b685e-0x0;var _0x9a0173=_0x2587[_0x5b685e];return _0x9a0173;};'use strict';var _=require(_0x7258('0x0'));var util=require('util');var moment=require(_0x7258('0x1'));var BPromise=require(_0x7258('0x2'));var rs=require(_0x7258('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x7258('0x4'))['db'];var utils=require(_0x7258('0x5'));var logger=require(_0x7258('0x6'))(_0x7258('0x7'));var config=require(_0x7258('0x8'));var jayson=require(_0x7258('0x9'));var client=jayson[_0x7258('0xa')][_0x7258('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x288a5f,_0x558927,_0x336975){return new BPromise(function(_0x3e7ca0,_0x2ce4c4){return client['request'](_0x288a5f,_0x336975)[_0x7258('0xc')](function(_0x33c8e4){logger[_0x7258('0xd')](_0x7258('0xe'),_0x558927,'request\x20sent');logger[_0x7258('0xf')](_0x7258('0x10'),_0x558927,_0x7258('0x11'),JSON[_0x7258('0x12')](_0x33c8e4));if(_0x33c8e4['error']){if(_0x33c8e4[_0x7258('0x13')][_0x7258('0x14')]===0x1f4){logger['error'](_0x7258('0xe'),_0x558927,_0x33c8e4['error']['message']);return _0x2ce4c4(_0x33c8e4[_0x7258('0x13')][_0x7258('0x15')]);}logger[_0x7258('0x13')](_0x7258('0xe'),_0x558927,_0x33c8e4[_0x7258('0x13')][_0x7258('0x15')]);return _0x3e7ca0(_0x33c8e4[_0x7258('0x13')][_0x7258('0x15')]);}else{logger[_0x7258('0xd')](_0x7258('0xe'),_0x558927,'request\x20sent');_0x3e7ca0(_0x33c8e4['result']['message']);}})[_0x7258('0x16')](function(_0x5b433c){logger[_0x7258('0x13')](_0x7258('0xe'),_0x558927,_0x5b433c);_0x2ce4c4(_0x5b433c);});});}exports['CreateSquareRecording']=function(_0x357ca8){var _0x4e7888=this;return new Promise(function(_0x2671cd,_0x5abdaa){return db[_0x7258('0x17')]['create'](_0x357ca8[_0x7258('0x18')],{'raw':_0x357ca8['options']?_0x357ca8[_0x7258('0x19')][_0x7258('0x1a')]===undefined?!![]:![]:!![]})[_0x7258('0xc')](function(_0xb69c5){logger[_0x7258('0xd')](_0x7258('0x1b'),_0x357ca8);logger[_0x7258('0xf')]('CreateSquareRecording',_0x357ca8,JSON[_0x7258('0x12')](_0xb69c5));_0x2671cd(_0xb69c5);})[_0x7258('0x16')](function(_0x1ef4ae){logger[_0x7258('0x13')](_0x7258('0x1b'),_0x1ef4ae[_0x7258('0x15')],_0x357ca8);_0x5abdaa(_0x4e7888[_0x7258('0x13')](0x1f4,_0x1ef4ae[_0x7258('0x15')]));});});};
\ No newline at end of file
+var _0x75d7=['error','message','result','catch','CreateSquareRecording','create','options','raw','then','debug','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','info','SquareRecording,\x20%s,\x20%s','request\x20sent','SquareRecording,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x5913de,_0x27ad85){var _0x3d3094=function(_0xa1b8db){while(--_0xa1b8db){_0x5913de['push'](_0x5913de['shift']());}};_0x3d3094(++_0x27ad85);}(_0x75d7,0x10e));var _0x775d=function(_0xdbd4f7,_0x4e3bdd){_0xdbd4f7=_0xdbd4f7-0x0;var _0x5c3f9d=_0x75d7[_0xdbd4f7];return _0x5c3f9d;};'use strict';var _=require(_0x775d('0x0'));var util=require(_0x775d('0x1'));var moment=require(_0x775d('0x2'));var BPromise=require(_0x775d('0x3'));var rs=require(_0x775d('0x4'));var fs=require('fs');var Redis=require(_0x775d('0x5'));var db=require(_0x775d('0x6'))['db'];var utils=require(_0x775d('0x7'));var logger=require(_0x775d('0x8'))(_0x775d('0x9'));var config=require('../../config/environment');var jayson=require(_0x775d('0xa'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x25d7ff,_0xa377ad,_0x3a247f){return new BPromise(function(_0x19a66f,_0x3ae48e){return client['request'](_0x25d7ff,_0x3a247f)['then'](function(_0x24c3c2){logger[_0x775d('0xb')](_0x775d('0xc'),_0xa377ad,_0x775d('0xd'));logger['debug'](_0x775d('0xe'),_0xa377ad,_0x775d('0xd'),JSON[_0x775d('0xf')](_0x24c3c2));if(_0x24c3c2[_0x775d('0x10')]){if(_0x24c3c2['error']['code']===0x1f4){logger['error'](_0x775d('0xc'),_0xa377ad,_0x24c3c2['error']['message']);return _0x3ae48e(_0x24c3c2[_0x775d('0x10')][_0x775d('0x11')]);}logger[_0x775d('0x10')](_0x775d('0xc'),_0xa377ad,_0x24c3c2[_0x775d('0x10')]['message']);return _0x19a66f(_0x24c3c2[_0x775d('0x10')]['message']);}else{logger[_0x775d('0xb')](_0x775d('0xc'),_0xa377ad,_0x775d('0xd'));_0x19a66f(_0x24c3c2[_0x775d('0x12')]['message']);}})[_0x775d('0x13')](function(_0x4388cc){logger[_0x775d('0x10')]('SquareRecording,\x20%s,\x20%s',_0xa377ad,_0x4388cc);_0x3ae48e(_0x4388cc);});});}exports[_0x775d('0x14')]=function(_0x142175){var _0x242c6f=this;return new Promise(function(_0x3949a6,_0x386ae1){return db['SquareRecording'][_0x775d('0x15')](_0x142175['body'],{'raw':_0x142175[_0x775d('0x16')]?_0x142175[_0x775d('0x16')][_0x775d('0x17')]===undefined?!![]:![]:!![]})[_0x775d('0x18')](function(_0x49de7f){logger[_0x775d('0xb')]('CreateSquareRecording',_0x142175);logger[_0x775d('0x19')](_0x775d('0x14'),_0x142175,JSON[_0x775d('0xf')](_0x49de7f));_0x3949a6(_0x49de7f);})['catch'](function(_0x8022b2){logger['error'](_0x775d('0x14'),_0x8022b2['message'],_0x142175);_0x386ae1(_0x242c6f[_0x775d('0x10')](0x1f4,_0x8022b2['message']));});});};
\ No newline at end of file
index 33a3161..b79dacb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe706=['/describe','describe','/:id','show','post','create','put','destroy','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./squareReport.controller','get','isAuthenticated','index'];(function(_0x2ec4d8,_0x3d9e0f){var _0x375fa9=function(_0x28330b){while(--_0x28330b){_0x2ec4d8['push'](_0x2ec4d8['shift']());}};_0x375fa9(++_0x3d9e0f);}(_0xe706,0xa3));var _0x6e70=function(_0x4dbc5d,_0x2d0a51){_0x4dbc5d=_0x4dbc5d-0x0;var _0x45b461=_0xe706[_0x4dbc5d];return _0x45b461;};'use strict';var multer=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var path=require(_0x6e70('0x2'));var timeout=require('connect-timeout');var express=require(_0x6e70('0x3'));var router=express[_0x6e70('0x4')]();var fs_extra=require(_0x6e70('0x5'));var auth=require(_0x6e70('0x6'));var interaction=require(_0x6e70('0x7'));var config=require(_0x6e70('0x8'));var controller=require(_0x6e70('0x9'));router[_0x6e70('0xa')]('/',auth[_0x6e70('0xb')](),controller[_0x6e70('0xc')]);router[_0x6e70('0xa')](_0x6e70('0xd'),auth[_0x6e70('0xb')](),controller[_0x6e70('0xe')]);router[_0x6e70('0xa')](_0x6e70('0xf'),auth[_0x6e70('0xb')](),controller[_0x6e70('0x10')]);router[_0x6e70('0x11')]('/',auth[_0x6e70('0xb')](),controller[_0x6e70('0x12')]);router[_0x6e70('0x13')](_0x6e70('0xf'),auth[_0x6e70('0xb')](),controller['update']);router['delete'](_0x6e70('0xf'),auth[_0x6e70('0xb')](),controller[_0x6e70('0x14')]);module[_0x6e70('0x15')]=router;
\ No newline at end of file
+var _0xd8b0=['destroy','exports','multer','util','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','isAuthenticated','index','get','describe','/:id','show','post','create','put','update'];(function(_0x2a0a38,_0x4a6de5){var _0x4a200e=function(_0x2ef26b){while(--_0x2ef26b){_0x2a0a38['push'](_0x2a0a38['shift']());}};_0x4a200e(++_0x4a6de5);}(_0xd8b0,0xad));var _0x0d8b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xd8b0[_0x122ef9];return _0x42fba0;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var fs_extra=require(_0x0d8b('0x3'));var auth=require(_0x0d8b('0x4'));var interaction=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));var controller=require('./squareReport.controller');router['get']('/',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x8')]);router[_0x0d8b('0x9')]('/describe',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xa')]);router['get'](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xc')]);router[_0x0d8b('0xd')]('/',auth[_0x0d8b('0x7')](),controller[_0x0d8b('0xe')]);router[_0x0d8b('0xf')](_0x0d8b('0xb'),auth['isAuthenticated'](),controller[_0x0d8b('0x10')]);router['delete'](_0x0d8b('0xb'),auth[_0x0d8b('0x7')](),controller[_0x0d8b('0x11')]);module[_0x0d8b('0x12')]=router;
\ No newline at end of file
index 0736aba..7bda945 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3199=['BOOLEAN','sequelize','STRING','DATE'];(function(_0x25afde,_0x253b4a){var _0xaceeaf=function(_0x441351){while(--_0x441351){_0x25afde['push'](_0x25afde['shift']());}};_0xaceeaf(++_0x253b4a);}(_0x3199,0x1f1));var _0x9319=function(_0x53332a,_0x5e9a43){_0x53332a=_0x53332a-0x0;var _0x4e930e=_0x3199[_0x53332a];return _0x4e930e;};'use strict';var Sequelize=require(_0x9319('0x0'));module['exports']={'network':{'type':Sequelize[_0x9319('0x1')]},'network_script':{'type':Sequelize[_0x9319('0x1')]},'request':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0x9319('0x1')]},'language':{'type':Sequelize[_0x9319('0x1')]},'type':{'type':Sequelize[_0x9319('0x1')]},'uniqueid':{'type':Sequelize['STRING']},'version':{'type':Sequelize[_0x9319('0x1')]},'callerid':{'type':Sequelize[_0x9319('0x1')]},'calleridname':{'type':Sequelize[_0x9319('0x1')]},'callingpres':{'type':Sequelize[_0x9319('0x1')]},'callingani2':{'type':Sequelize['STRING']},'callington':{'type':Sequelize[_0x9319('0x1')]},'callingtns':{'type':Sequelize[_0x9319('0x1')]},'dnid':{'type':Sequelize[_0x9319('0x1')]},'rdnis':{'type':Sequelize[_0x9319('0x1')]},'context':{'type':Sequelize['STRING']},'extension':{'type':Sequelize[_0x9319('0x1')]},'priority':{'type':Sequelize['STRING']},'enhanced':{'type':Sequelize[_0x9319('0x1')]},'accountcode':{'type':Sequelize[_0x9319('0x1')]},'threadid':{'type':Sequelize[_0x9319('0x1')]},'project_name':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x9319('0x2')]},'bot':{'type':Sequelize[_0x9319('0x3')],'defaultValue':![]}};
\ No newline at end of file
+var _0xb5c7=['DATE','sequelize','exports','STRING'];(function(_0x4ec862,_0x2379e8){var _0x13d84a=function(_0x15308a){while(--_0x15308a){_0x4ec862['push'](_0x4ec862['shift']());}};_0x13d84a(++_0x2379e8);}(_0xb5c7,0x18d));var _0x7b5c=function(_0x45e408,_0x1d4839){_0x45e408=_0x45e408-0x0;var _0x23334a=_0xb5c7[_0x45e408];return _0x23334a;};'use strict';var Sequelize=require(_0x7b5c('0x0'));module[_0x7b5c('0x1')]={'network':{'type':Sequelize[_0x7b5c('0x2')]},'network_script':{'type':Sequelize[_0x7b5c('0x2')]},'request':{'type':Sequelize[_0x7b5c('0x2')]},'channel':{'type':Sequelize[_0x7b5c('0x2')]},'language':{'type':Sequelize[_0x7b5c('0x2')]},'type':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize[_0x7b5c('0x2')]},'version':{'type':Sequelize[_0x7b5c('0x2')]},'callerid':{'type':Sequelize[_0x7b5c('0x2')]},'calleridname':{'type':Sequelize['STRING']},'callingpres':{'type':Sequelize[_0x7b5c('0x2')]},'callingani2':{'type':Sequelize['STRING']},'callington':{'type':Sequelize[_0x7b5c('0x2')]},'callingtns':{'type':Sequelize[_0x7b5c('0x2')]},'dnid':{'type':Sequelize[_0x7b5c('0x2')]},'rdnis':{'type':Sequelize[_0x7b5c('0x2')]},'context':{'type':Sequelize[_0x7b5c('0x2')]},'extension':{'type':Sequelize[_0x7b5c('0x2')]},'priority':{'type':Sequelize[_0x7b5c('0x2')]},'enhanced':{'type':Sequelize[_0x7b5c('0x2')]},'accountcode':{'type':Sequelize[_0x7b5c('0x2')]},'threadid':{'type':Sequelize[_0x7b5c('0x2')]},'project_name':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0x7b5c('0x3')]},'leaveAt':{'type':Sequelize[_0x7b5c('0x3')]},'bot':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}};
\ No newline at end of file
index ce83965..2d35785 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6646=['../../mysqldb','sendStatus','end','limit','undefined','count','offset','status','set','Content-Range','json','apply','save','update','destroy','then','error','stack','name','send','index','map','SquareReport','rawAttributes','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','include','findAll','rows','show','params','includeAll','find','create','body','catch','describe','eml-format','rimraf','zip-dir','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','../../config/license/util'];(function(_0x5ef630,_0x56b2cc){var _0x46403a=function(_0x168b62){while(--_0x168b62){_0x5ef630['push'](_0x5ef630['shift']());}};_0x46403a(++_0x56b2cc);}(_0x6646,0xd6));var _0x6664=function(_0x258c13,_0x2680e8){_0x258c13=_0x258c13-0x0;var _0x106325=_0x6646[_0x258c13];return _0x106325;};'use strict';var emlformat=require(_0x6664('0x0'));var rimraf=require(_0x6664('0x1'));var zipdir=require(_0x6664('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x6664('0x3'));var BPromise=require(_0x6664('0x4'));var Mustache=require(_0x6664('0x5'));var util=require(_0x6664('0x6'));var path=require(_0x6664('0x7'));var sox=require('sox');var csv=require(_0x6664('0x8'));var ejs=require(_0x6664('0x9'));var fs=require('fs');var fs_extra=require(_0x6664('0xa'));var _=require(_0x6664('0xb'));var squel=require(_0x6664('0xc'));var crypto=require(_0x6664('0xd'));var jsforce=require(_0x6664('0xe'));var deskjs=require(_0x6664('0xf'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x6664('0x10'));var qs=require(_0x6664('0x11'));var as=require(_0x6664('0x12'));var hardwareService=require(_0x6664('0x13'));var logger=require(_0x6664('0x14'))('api');var utils=require('../../config/utils');var config=require(_0x6664('0x15'));var licenseUtil=require(_0x6664('0x16'));var db=require(_0x6664('0x17'))['db'];function respondWithStatusCode(_0x435319,_0x11441f){_0x11441f=_0x11441f||0xcc;return function(_0x59a2ce){if(_0x59a2ce){return _0x435319[_0x6664('0x18')](_0x11441f);}return _0x435319['status'](_0x11441f)[_0x6664('0x19')]();};}function respondWithResult(_0x146861,_0x169ea5){_0x169ea5=_0x169ea5||0xc8;return function(_0x3e12e9){if(_0x3e12e9){return _0x146861['status'](_0x169ea5)['json'](_0x3e12e9);}};}function respondWithFilteredResult(_0x47542b,_0x36c7ac){return function(_0x5eb98a){if(_0x5eb98a){var _0x388ee0=typeof _0x36c7ac['offset']==='undefined'&&typeof _0x36c7ac[_0x6664('0x1a')]===_0x6664('0x1b');var _0x2e9a69=_0x5eb98a[_0x6664('0x1c')];var _0x8e5254=_0x388ee0?0x0:_0x36c7ac[_0x6664('0x1d')];var _0x3daab2=_0x388ee0?_0x5eb98a[_0x6664('0x1c')]:_0x36c7ac[_0x6664('0x1d')]+_0x36c7ac[_0x6664('0x1a')];var _0x32708a;if(_0x3daab2>=_0x2e9a69){_0x3daab2=_0x2e9a69;_0x32708a=0xc8;}else{_0x32708a=0xce;}_0x47542b[_0x6664('0x1e')](_0x32708a);return _0x47542b[_0x6664('0x1f')](_0x6664('0x20'),_0x8e5254+'-'+_0x3daab2+'/'+_0x2e9a69)[_0x6664('0x21')](_0x5eb98a);}return null;};}function patchUpdates(_0x3fddf0){return function(_0x3805be){try{jsonpatch[_0x6664('0x22')](_0x3805be,_0x3fddf0,!![]);}catch(_0x3f280f){return BPromise['reject'](_0x3f280f);}return _0x3805be[_0x6664('0x23')]();};}function saveUpdates(_0x7f1ef3,_0x1d0275){return function(_0x1bb737){if(_0x1bb737){return _0x1bb737[_0x6664('0x24')](_0x7f1ef3)['then'](function(_0x11599c){return _0x11599c;});}return null;};}function removeEntity(_0x308c0c,_0x205131){return function(_0x182203){if(_0x182203){return _0x182203[_0x6664('0x25')]()[_0x6664('0x26')](function(){_0x308c0c['status'](0xcc)[_0x6664('0x19')]();});}};}function handleEntityNotFound(_0x3b9a44,_0x30a7c8){return function(_0x1b5167){if(!_0x1b5167){_0x3b9a44[_0x6664('0x18')](0x194);}return _0x1b5167;};}function handleError(_0x5db7ec,_0x831e01){_0x831e01=_0x831e01||0x1f4;return function(_0x485844){logger[_0x6664('0x27')](_0x485844[_0x6664('0x28')]);if(_0x485844[_0x6664('0x29')]){delete _0x485844[_0x6664('0x29')];}_0x5db7ec[_0x6664('0x1e')](_0x831e01)[_0x6664('0x2a')](_0x485844);};}exports[_0x6664('0x2b')]=function(_0x5422ac,_0x41f3a8){var _0x61ba29={},_0x526a78={},_0x13e00f={'count':0x0,'rows':[]};var _0x24124e=_[_0x6664('0x2c')](db[_0x6664('0x2d')][_0x6664('0x2e')],function(_0x114fb8){return{'name':_0x114fb8[_0x6664('0x2f')],'type':_0x114fb8[_0x6664('0x30')][_0x6664('0x31')]};});_0x526a78[_0x6664('0x32')]=_[_0x6664('0x2c')](_0x24124e,_0x6664('0x29'));_0x526a78[_0x6664('0x33')]=_[_0x6664('0x34')](_0x5422ac[_0x6664('0x33')]);_0x526a78[_0x6664('0x35')]=_[_0x6664('0x36')](_0x526a78['model'],_0x526a78[_0x6664('0x33')]);_0x61ba29[_0x6664('0x37')]=_['intersection'](_0x526a78[_0x6664('0x32')],qs[_0x6664('0x38')](_0x5422ac[_0x6664('0x33')][_0x6664('0x38')]));_0x61ba29[_0x6664('0x37')]=_0x61ba29[_0x6664('0x37')][_0x6664('0x39')]?_0x61ba29[_0x6664('0x37')]:_0x526a78[_0x6664('0x32')];if(!_0x5422ac[_0x6664('0x33')][_0x6664('0x3a')](_0x6664('0x3b'))){_0x61ba29[_0x6664('0x1a')]=qs[_0x6664('0x1a')](_0x5422ac['query'][_0x6664('0x1a')]);_0x61ba29[_0x6664('0x1d')]=qs['offset'](_0x5422ac[_0x6664('0x33')][_0x6664('0x1d')]);}_0x61ba29[_0x6664('0x3c')]=qs[_0x6664('0x3d')](_0x5422ac[_0x6664('0x33')][_0x6664('0x3d')]);_0x61ba29[_0x6664('0x3e')]=qs['filters'](_[_0x6664('0x3f')](_0x5422ac[_0x6664('0x33')],_0x526a78[_0x6664('0x35')]),_0x24124e);if(_0x5422ac[_0x6664('0x33')][_0x6664('0x40')]){_0x61ba29[_0x6664('0x3e')]=_[_0x6664('0x41')](_0x61ba29[_0x6664('0x3e')],{'$or':_[_0x6664('0x2c')](_0x24124e,function(_0x26eff6){if(_0x26eff6[_0x6664('0x30')]!==_0x6664('0x42')){var _0x18030d={};_0x18030d[_0x26eff6[_0x6664('0x29')]]={'$like':'%'+_0x5422ac[_0x6664('0x33')][_0x6664('0x40')]+'%'};return _0x18030d;}})});}_0x61ba29=_[_0x6664('0x41')]({},_0x61ba29,_0x5422ac[_0x6664('0x43')]);var _0x2c2023={'where':_0x61ba29['where']};return db[_0x6664('0x2d')][_0x6664('0x1c')](_0x2c2023)[_0x6664('0x26')](function(_0x425c14){_0x13e00f[_0x6664('0x1c')]=_0x425c14;if(_0x5422ac['query']['includeAll']){_0x61ba29[_0x6664('0x44')]=[{'all':!![]}];}return db[_0x6664('0x2d')][_0x6664('0x45')](_0x61ba29);})[_0x6664('0x26')](function(_0x2892e4){_0x13e00f[_0x6664('0x46')]=_0x2892e4;return _0x13e00f;})['then'](respondWithFilteredResult(_0x41f3a8,_0x61ba29))['catch'](handleError(_0x41f3a8,null));};exports[_0x6664('0x47')]=function(_0x166ab8,_0x3ecb58){var _0x482924={'raw':!![],'where':{'id':_0x166ab8[_0x6664('0x48')]['id']}},_0x1af450={};_0x1af450[_0x6664('0x32')]=_[_0x6664('0x34')](db['SquareReport'][_0x6664('0x2e')]);_0x1af450[_0x6664('0x33')]=_[_0x6664('0x34')](_0x166ab8[_0x6664('0x33')]);_0x1af450[_0x6664('0x35')]=_[_0x6664('0x36')](_0x1af450[_0x6664('0x32')],_0x1af450[_0x6664('0x33')]);_0x482924[_0x6664('0x37')]=_[_0x6664('0x36')](_0x1af450[_0x6664('0x32')],qs[_0x6664('0x38')](_0x166ab8[_0x6664('0x33')]['fields']));_0x482924[_0x6664('0x37')]=_0x482924[_0x6664('0x37')]['length']?_0x482924[_0x6664('0x37')]:_0x1af450[_0x6664('0x32')];if(_0x166ab8[_0x6664('0x33')][_0x6664('0x49')]){_0x482924[_0x6664('0x44')]=[{'all':!![]}];}_0x482924=_[_0x6664('0x41')]({},_0x482924,_0x166ab8[_0x6664('0x43')]);return db[_0x6664('0x2d')][_0x6664('0x4a')](_0x482924)[_0x6664('0x26')](handleEntityNotFound(_0x3ecb58,null))[_0x6664('0x26')](respondWithResult(_0x3ecb58,null))['catch'](handleError(_0x3ecb58,null));};exports[_0x6664('0x4b')]=function(_0x3cce9d,_0x36798b){return db['SquareReport'][_0x6664('0x4b')](_0x3cce9d[_0x6664('0x4c')],{})[_0x6664('0x26')](respondWithResult(_0x36798b,0xc9))['catch'](handleError(_0x36798b,null));};exports[_0x6664('0x24')]=function(_0x2af14b,_0x5299d5){if(_0x2af14b[_0x6664('0x4c')]['id']){delete _0x2af14b['body']['id'];}return db[_0x6664('0x2d')][_0x6664('0x4a')]({'where':{'id':_0x2af14b[_0x6664('0x48')]['id']}})['then'](handleEntityNotFound(_0x5299d5,null))[_0x6664('0x26')](saveUpdates(_0x2af14b['body'],null))[_0x6664('0x26')](respondWithResult(_0x5299d5,null))[_0x6664('0x4d')](handleError(_0x5299d5,null));};exports['destroy']=function(_0x4f470c,_0x5d6be5){return db[_0x6664('0x2d')][_0x6664('0x4a')]({'where':{'id':_0x4f470c[_0x6664('0x48')]['id']}})['then'](handleEntityNotFound(_0x5d6be5,null))[_0x6664('0x26')](removeEntity(_0x5d6be5,null))[_0x6664('0x4d')](handleError(_0x5d6be5,null));};exports[_0x6664('0x4e')]=function(_0x5c230c,_0x47d8ff){return db[_0x6664('0x2d')]['describe']()[_0x6664('0x26')](respondWithResult(_0x47d8ff,null))[_0x6664('0x4d')](handleError(_0x47d8ff,null));};
\ No newline at end of file
+var _0xebbb=['limit','count','set','Content-Range','save','update','then','error','stack','name','send','index','map','SquareReport','rawAttributes','fieldName','keys','model','query','attributes','fields','length','hasOwnProperty','order','sort','where','filters','pick','filter','merge','type','options','includeAll','include','findAll','rows','catch','params','intersection','create','body','find','describe','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','fs-extra','lodash','squel','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined'];(function(_0x48570e,_0xbf3c6c){var _0x393daf=function(_0x546d9c){while(--_0x546d9c){_0x48570e['push'](_0x48570e['shift']());}};_0x393daf(++_0xbf3c6c);}(_0xebbb,0x75));var _0xbebb=function(_0x1a6e4e,_0x5bad07){_0x1a6e4e=_0x1a6e4e-0x0;var _0x2f2d21=_0xebbb[_0x1a6e4e];return _0x2f2d21;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xbebb('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xbebb('0x1'));var rp=require(_0xbebb('0x2'));var moment=require(_0xbebb('0x3'));var BPromise=require(_0xbebb('0x4'));var Mustache=require(_0xbebb('0x5'));var util=require(_0xbebb('0x6'));var path=require(_0xbebb('0x7'));var sox=require('sox');var csv=require(_0xbebb('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xbebb('0x9'));var _=require(_0xbebb('0xa'));var squel=require(_0xbebb('0xb'));var crypto=require('crypto');var jsforce=require(_0xbebb('0xc'));var deskjs=require(_0xbebb('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xbebb('0xe'));var Redis=require(_0xbebb('0xf'));var authService=require(_0xbebb('0x10'));var qs=require(_0xbebb('0x11'));var as=require(_0xbebb('0x12'));var hardwareService=require(_0xbebb('0x13'));var logger=require(_0xbebb('0x14'))('api');var utils=require(_0xbebb('0x15'));var config=require(_0xbebb('0x16'));var licenseUtil=require(_0xbebb('0x17'));var db=require(_0xbebb('0x18'))['db'];function respondWithStatusCode(_0x225d64,_0x296c3e){_0x296c3e=_0x296c3e||0xcc;return function(_0x73ac67){if(_0x73ac67){return _0x225d64[_0xbebb('0x19')](_0x296c3e);}return _0x225d64[_0xbebb('0x1a')](_0x296c3e)[_0xbebb('0x1b')]();};}function respondWithResult(_0x509c05,_0x470121){_0x470121=_0x470121||0xc8;return function(_0x1636ac){if(_0x1636ac){return _0x509c05['status'](_0x470121)[_0xbebb('0x1c')](_0x1636ac);}};}function respondWithFilteredResult(_0x68e4fb,_0x135059){return function(_0x378b9d){if(_0x378b9d){var _0x1f9fc3=typeof _0x135059[_0xbebb('0x1d')]===_0xbebb('0x1e')&&typeof _0x135059[_0xbebb('0x1f')]==='undefined';var _0x800b7=_0x378b9d[_0xbebb('0x20')];var _0x4d8e4f=_0x1f9fc3?0x0:_0x135059[_0xbebb('0x1d')];var _0x426497=_0x1f9fc3?_0x378b9d[_0xbebb('0x20')]:_0x135059['offset']+_0x135059[_0xbebb('0x1f')];var _0x5bb188;if(_0x426497>=_0x800b7){_0x426497=_0x800b7;_0x5bb188=0xc8;}else{_0x5bb188=0xce;}_0x68e4fb[_0xbebb('0x1a')](_0x5bb188);return _0x68e4fb[_0xbebb('0x21')](_0xbebb('0x22'),_0x4d8e4f+'-'+_0x426497+'/'+_0x800b7)[_0xbebb('0x1c')](_0x378b9d);}return null;};}function patchUpdates(_0x54310d){return function(_0x52a85d){try{jsonpatch['apply'](_0x52a85d,_0x54310d,!![]);}catch(_0x55a320){return BPromise['reject'](_0x55a320);}return _0x52a85d[_0xbebb('0x23')]();};}function saveUpdates(_0x48c200,_0x270d47){return function(_0x6102c1){if(_0x6102c1){return _0x6102c1[_0xbebb('0x24')](_0x48c200)[_0xbebb('0x25')](function(_0x15a5c4){return _0x15a5c4;});}return null;};}function removeEntity(_0x312e2c,_0x4fc40f){return function(_0x446e8c){if(_0x446e8c){return _0x446e8c['destroy']()[_0xbebb('0x25')](function(){_0x312e2c[_0xbebb('0x1a')](0xcc)[_0xbebb('0x1b')]();});}};}function handleEntityNotFound(_0x34324d,_0x34de8b){return function(_0x33552d){if(!_0x33552d){_0x34324d[_0xbebb('0x19')](0x194);}return _0x33552d;};}function handleError(_0x5b8d04,_0x28ebdc){_0x28ebdc=_0x28ebdc||0x1f4;return function(_0x66c549){logger[_0xbebb('0x26')](_0x66c549[_0xbebb('0x27')]);if(_0x66c549[_0xbebb('0x28')]){delete _0x66c549[_0xbebb('0x28')];}_0x5b8d04[_0xbebb('0x1a')](_0x28ebdc)[_0xbebb('0x29')](_0x66c549);};}exports[_0xbebb('0x2a')]=function(_0x4b274b,_0x2b6f11){var _0x230e3e={},_0x48d217={},_0x1ebeae={'count':0x0,'rows':[]};var _0x4fd07d=_[_0xbebb('0x2b')](db[_0xbebb('0x2c')][_0xbebb('0x2d')],function(_0x19e42c){return{'name':_0x19e42c[_0xbebb('0x2e')],'type':_0x19e42c['type']['key']};});_0x48d217['model']=_['map'](_0x4fd07d,_0xbebb('0x28'));_0x48d217['query']=_[_0xbebb('0x2f')](_0x4b274b['query']);_0x48d217['filters']=_['intersection'](_0x48d217[_0xbebb('0x30')],_0x48d217[_0xbebb('0x31')]);_0x230e3e[_0xbebb('0x32')]=_['intersection'](_0x48d217['model'],qs[_0xbebb('0x33')](_0x4b274b['query']['fields']));_0x230e3e[_0xbebb('0x32')]=_0x230e3e[_0xbebb('0x32')][_0xbebb('0x34')]?_0x230e3e[_0xbebb('0x32')]:_0x48d217['model'];if(!_0x4b274b['query'][_0xbebb('0x35')]('nolimit')){_0x230e3e['limit']=qs['limit'](_0x4b274b[_0xbebb('0x31')]['limit']);_0x230e3e['offset']=qs[_0xbebb('0x1d')](_0x4b274b['query']['offset']);}_0x230e3e[_0xbebb('0x36')]=qs[_0xbebb('0x37')](_0x4b274b[_0xbebb('0x31')]['sort']);_0x230e3e[_0xbebb('0x38')]=qs[_0xbebb('0x39')](_[_0xbebb('0x3a')](_0x4b274b[_0xbebb('0x31')],_0x48d217[_0xbebb('0x39')]),_0x4fd07d);if(_0x4b274b['query'][_0xbebb('0x3b')]){_0x230e3e[_0xbebb('0x38')]=_[_0xbebb('0x3c')](_0x230e3e[_0xbebb('0x38')],{'$or':_['map'](_0x4fd07d,function(_0x25a1cf){if(_0x25a1cf[_0xbebb('0x3d')]!=='VIRTUAL'){var _0x1f492e={};_0x1f492e[_0x25a1cf['name']]={'$like':'%'+_0x4b274b['query']['filter']+'%'};return _0x1f492e;}})});}_0x230e3e=_[_0xbebb('0x3c')]({},_0x230e3e,_0x4b274b[_0xbebb('0x3e')]);var _0x184d37={'where':_0x230e3e[_0xbebb('0x38')]};return db[_0xbebb('0x2c')][_0xbebb('0x20')](_0x184d37)[_0xbebb('0x25')](function(_0x477b59){_0x1ebeae[_0xbebb('0x20')]=_0x477b59;if(_0x4b274b['query'][_0xbebb('0x3f')]){_0x230e3e[_0xbebb('0x40')]=[{'all':!![]}];}return db[_0xbebb('0x2c')][_0xbebb('0x41')](_0x230e3e);})[_0xbebb('0x25')](function(_0x442894){_0x1ebeae[_0xbebb('0x42')]=_0x442894;return _0x1ebeae;})[_0xbebb('0x25')](respondWithFilteredResult(_0x2b6f11,_0x230e3e))[_0xbebb('0x43')](handleError(_0x2b6f11,null));};exports['show']=function(_0x295b52,_0x5a116a){var _0x321edb={'raw':!![],'where':{'id':_0x295b52[_0xbebb('0x44')]['id']}},_0x574f00={};_0x574f00[_0xbebb('0x30')]=_['keys'](db[_0xbebb('0x2c')][_0xbebb('0x2d')]);_0x574f00['query']=_[_0xbebb('0x2f')](_0x295b52[_0xbebb('0x31')]);_0x574f00[_0xbebb('0x39')]=_[_0xbebb('0x45')](_0x574f00[_0xbebb('0x30')],_0x574f00[_0xbebb('0x31')]);_0x321edb[_0xbebb('0x32')]=_[_0xbebb('0x45')](_0x574f00['model'],qs['fields'](_0x295b52['query'][_0xbebb('0x33')]));_0x321edb[_0xbebb('0x32')]=_0x321edb[_0xbebb('0x32')]['length']?_0x321edb[_0xbebb('0x32')]:_0x574f00['model'];if(_0x295b52[_0xbebb('0x31')][_0xbebb('0x3f')]){_0x321edb[_0xbebb('0x40')]=[{'all':!![]}];}_0x321edb=_[_0xbebb('0x3c')]({},_0x321edb,_0x295b52[_0xbebb('0x3e')]);return db['SquareReport']['find'](_0x321edb)[_0xbebb('0x25')](handleEntityNotFound(_0x5a116a,null))[_0xbebb('0x25')](respondWithResult(_0x5a116a,null))[_0xbebb('0x43')](handleError(_0x5a116a,null));};exports['create']=function(_0x154b6f,_0xcb578a){return db[_0xbebb('0x2c')][_0xbebb('0x46')](_0x154b6f['body'],{})[_0xbebb('0x25')](respondWithResult(_0xcb578a,0xc9))[_0xbebb('0x43')](handleError(_0xcb578a,null));};exports[_0xbebb('0x24')]=function(_0xd3ea7c,_0x3ec001){if(_0xd3ea7c[_0xbebb('0x47')]['id']){delete _0xd3ea7c[_0xbebb('0x47')]['id'];}return db[_0xbebb('0x2c')][_0xbebb('0x48')]({'where':{'id':_0xd3ea7c[_0xbebb('0x44')]['id']}})['then'](handleEntityNotFound(_0x3ec001,null))[_0xbebb('0x25')](saveUpdates(_0xd3ea7c[_0xbebb('0x47')],null))[_0xbebb('0x25')](respondWithResult(_0x3ec001,null))[_0xbebb('0x43')](handleError(_0x3ec001,null));};exports['destroy']=function(_0x4f21bb,_0xb5fe2b){return db[_0xbebb('0x2c')][_0xbebb('0x48')]({'where':{'id':_0x4f21bb['params']['id']}})[_0xbebb('0x25')](handleEntityNotFound(_0xb5fe2b,null))[_0xbebb('0x25')](removeEntity(_0xb5fe2b,null))[_0xbebb('0x43')](handleError(_0xb5fe2b,null));};exports['describe']=function(_0x434b6b,_0x239884){return db[_0xbebb('0x2c')][_0xbebb('0x49')]()['then'](respondWithResult(_0x239884,null))[_0xbebb('0x43')](handleError(_0x239884,null));};
\ No newline at end of file
index 1ae1801..fa9c931 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfc38=['rimraf','./squareReport.attributes','exports','define','SquareReport','report_square','uid_pname','uniqueid','project_name','leaveAt','lodash','util','../../config/logger','api','moment','bluebird','path'];(function(_0x129a05,_0x1a3093){var _0x326eae=function(_0x29ad27){while(--_0x29ad27){_0x129a05['push'](_0x129a05['shift']());}};_0x326eae(++_0x1a3093);}(_0xfc38,0xa3));var _0x8fc3=function(_0x23f3a2,_0x329e9e){_0x23f3a2=_0x23f3a2-0x0;var _0x455aa9=_0xfc38[_0x23f3a2];return _0x455aa9;};'use strict';var _=require(_0x8fc3('0x0'));var util=require(_0x8fc3('0x1'));var logger=require(_0x8fc3('0x2'))(_0x8fc3('0x3'));var moment=require(_0x8fc3('0x4'));var BPromise=require(_0x8fc3('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x8fc3('0x6'));var rimraf=require(_0x8fc3('0x7'));var config=require('../../config/environment');var attributes=require(_0x8fc3('0x8'));module[_0x8fc3('0x9')]=function(_0x3c5e7f,_0x33aa3c){return _0x3c5e7f[_0x8fc3('0xa')](_0x8fc3('0xb'),attributes,{'tableName':_0x8fc3('0xc'),'paranoid':![],'indexes':[{'name':_0x8fc3('0xd'),'fields':[_0x8fc3('0xe'),_0x8fc3('0xf')]},{'name':_0x8fc3('0x10'),'fields':[_0x8fc3('0x10')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xd4ae=['rimraf','../../config/environment','./squareReport.attributes','define','SquareReport','uid_pname','uniqueid','project_name','leaveAt','util','path'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0xd4ae,0xf0));var _0xed4a=function(_0x4a325a,_0x2c154c){_0x4a325a=_0x4a325a-0x0;var _0x2597a1=_0xd4ae[_0x4a325a];return _0x2597a1;};'use strict';var _=require('lodash');var util=require(_0xed4a('0x0'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xed4a('0x1'));var rimraf=require(_0xed4a('0x2'));var config=require(_0xed4a('0x3'));var attributes=require(_0xed4a('0x4'));module['exports']=function(_0x25fdc6,_0x8cc1c7){return _0x25fdc6[_0xed4a('0x5')](_0xed4a('0x6'),attributes,{'tableName':'report_square','paranoid':![],'indexes':[{'name':_0xed4a('0x7'),'fields':[_0xed4a('0x8'),_0xed4a('0x9')]},{'name':_0xed4a('0xa'),'fields':['leaveAt']}],'timestamps':!![]});};
\ No newline at end of file
index a7109d3..0c418d4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfd6e=['debug','SquareReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','CreateSquareReport','SquareReport','create','body','options','raw','info','UpdateSquareReport','attributes','limit','catch','lodash','moment','randomstring','ioredis','rpc','client','http','request','then','SquareReport,\x20%s,\x20%s','request\x20sent'];(function(_0x1b4912,_0x3e8bb9){var _0x48cac5=function(_0x55798b){while(--_0x55798b){_0x1b4912['push'](_0x1b4912['shift']());}};_0x48cac5(++_0x3e8bb9);}(_0xfd6e,0x16e));var _0xefd6=function(_0x42cae2,_0x284ef8){_0x42cae2=_0x42cae2-0x0;var _0x5f256f=_0xfd6e[_0x42cae2];return _0x5f256f;};'use strict';var _=require(_0xefd6('0x0'));var util=require('util');var moment=require(_0xefd6('0x1'));var BPromise=require('bluebird');var rs=require(_0xefd6('0x2'));var fs=require('fs');var Redis=require(_0xefd6('0x3'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xefd6('0x4'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xefd6('0x5')][_0xefd6('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x26e108,_0xe477f9,_0x340765){return new BPromise(function(_0x5da399,_0x59c636){return client[_0xefd6('0x7')](_0x26e108,_0x340765)[_0xefd6('0x8')](function(_0x3c941a){logger['info'](_0xefd6('0x9'),_0xe477f9,_0xefd6('0xa'));logger[_0xefd6('0xb')](_0xefd6('0xc'),_0xe477f9,'request\x20sent',JSON[_0xefd6('0xd')](_0x3c941a));if(_0x3c941a[_0xefd6('0xe')]){if(_0x3c941a[_0xefd6('0xe')][_0xefd6('0xf')]===0x1f4){logger[_0xefd6('0xe')](_0xefd6('0x9'),_0xe477f9,_0x3c941a[_0xefd6('0xe')][_0xefd6('0x10')]);return _0x59c636(_0x3c941a['error'][_0xefd6('0x10')]);}logger[_0xefd6('0xe')](_0xefd6('0x9'),_0xe477f9,_0x3c941a[_0xefd6('0xe')][_0xefd6('0x10')]);return _0x5da399(_0x3c941a['error'][_0xefd6('0x10')]);}else{logger['info'](_0xefd6('0x9'),_0xe477f9,'request\x20sent');_0x5da399(_0x3c941a[_0xefd6('0x11')][_0xefd6('0x10')]);}})['catch'](function(_0x17bf20){logger[_0xefd6('0xe')](_0xefd6('0x9'),_0xe477f9,_0x17bf20);_0x59c636(_0x17bf20);});});}exports[_0xefd6('0x12')]=function(_0xd59458){var _0x306ad1=this;return new Promise(function(_0x469c17,_0x137e6d){return db[_0xefd6('0x13')][_0xefd6('0x14')](_0xd59458[_0xefd6('0x15')],{'raw':_0xd59458['options']?_0xd59458[_0xefd6('0x16')][_0xefd6('0x17')]===undefined?!![]:![]:!![]})[_0xefd6('0x8')](function(_0x3a26c5){logger[_0xefd6('0x18')](_0xefd6('0x12'),_0xd59458);logger['debug'](_0xefd6('0x12'),_0xd59458,JSON[_0xefd6('0xd')](_0x3a26c5));_0x469c17(_0x3a26c5);})['catch'](function(_0x2b0442){logger[_0xefd6('0xe')](_0xefd6('0x12'),_0x2b0442['message'],_0xd59458);_0x137e6d(_0x306ad1['error'](0x1f4,_0x2b0442[_0xefd6('0x10')]));});});};exports[_0xefd6('0x19')]=function(_0xe763eb){var _0x587f2a=this;return new Promise(function(_0x6e7929,_0x351a6d){return db[_0xefd6('0x13')]['update'](_0xe763eb[_0xefd6('0x15')],{'raw':_0xe763eb[_0xefd6('0x16')]?_0xe763eb['options'][_0xefd6('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xe763eb[_0xefd6('0x16')]?_0xe763eb[_0xefd6('0x16')]['where']||null:null,'attributes':_0xe763eb[_0xefd6('0x16')]?_0xe763eb[_0xefd6('0x16')][_0xefd6('0x1a')]||null:null,'limit':_0xe763eb[_0xefd6('0x16')]?_0xe763eb[_0xefd6('0x16')][_0xefd6('0x1b')]||null:null})[_0xefd6('0x8')](function(_0x1783d7){logger['info'](_0xefd6('0x19'),_0xe763eb);logger[_0xefd6('0xb')](_0xefd6('0x19'),_0xe763eb,JSON[_0xefd6('0xd')](_0x1783d7));_0x6e7929(_0x1783d7);})[_0xefd6('0x1c')](function(_0x5aed31){logger[_0xefd6('0xe')](_0xefd6('0x19'),_0x5aed31[_0xefd6('0x10')],_0xe763eb);_0x351a6d(_0x587f2a[_0xefd6('0xe')](0x1f4,_0x5aed31[_0xefd6('0x10')]));});});};
\ No newline at end of file
+var _0xbff4=['ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','SquareReport,\x20%s,\x20%s','request\x20sent','debug','SquareReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','SquareReport','body','options','raw','CreateSquareReport','UpdateSquareReport','update','where','attributes','limit','lodash','moment','bluebird','randomstring'];(function(_0x569cbc,_0x5f5db2){var _0x54a5f5=function(_0xc7f075){while(--_0xc7f075){_0x569cbc['push'](_0x569cbc['shift']());}};_0x54a5f5(++_0x5f5db2);}(_0xbff4,0x88));var _0x4bff=function(_0x55abd9,_0x1148af){_0x55abd9=_0x55abd9-0x0;var _0x3e5669=_0xbff4[_0x55abd9];return _0x3e5669;};'use strict';var _=require(_0x4bff('0x0'));var util=require('util');var moment=require(_0x4bff('0x1'));var BPromise=require(_0x4bff('0x2'));var rs=require(_0x4bff('0x3'));var fs=require('fs');var Redis=require(_0x4bff('0x4'));var db=require(_0x4bff('0x5'))['db'];var utils=require(_0x4bff('0x6'));var logger=require(_0x4bff('0x7'))('rpc');var config=require(_0x4bff('0x8'));var jayson=require(_0x4bff('0x9'));var client=jayson[_0x4bff('0xa')][_0x4bff('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x26ef1d,_0xa5b205,_0x269ce8){return new BPromise(function(_0x2d4f66,_0xaff7fe){return client[_0x4bff('0xc')](_0x26ef1d,_0x269ce8)[_0x4bff('0xd')](function(_0x421ff8){logger['info'](_0x4bff('0xe'),_0xa5b205,_0x4bff('0xf'));logger[_0x4bff('0x10')](_0x4bff('0x11'),_0xa5b205,_0x4bff('0xf'),JSON[_0x4bff('0x12')](_0x421ff8));if(_0x421ff8[_0x4bff('0x13')]){if(_0x421ff8[_0x4bff('0x13')][_0x4bff('0x14')]===0x1f4){logger[_0x4bff('0x13')](_0x4bff('0xe'),_0xa5b205,_0x421ff8['error'][_0x4bff('0x15')]);return _0xaff7fe(_0x421ff8[_0x4bff('0x13')]['message']);}logger[_0x4bff('0x13')]('SquareReport,\x20%s,\x20%s',_0xa5b205,_0x421ff8['error'][_0x4bff('0x15')]);return _0x2d4f66(_0x421ff8[_0x4bff('0x13')][_0x4bff('0x15')]);}else{logger[_0x4bff('0x16')](_0x4bff('0xe'),_0xa5b205,_0x4bff('0xf'));_0x2d4f66(_0x421ff8[_0x4bff('0x17')][_0x4bff('0x15')]);}})[_0x4bff('0x18')](function(_0x1c6248){logger[_0x4bff('0x13')](_0x4bff('0xe'),_0xa5b205,_0x1c6248);_0xaff7fe(_0x1c6248);});});}exports['CreateSquareReport']=function(_0x476e6b){var _0x345c08=this;return new Promise(function(_0x12ade4,_0x4b0510){return db[_0x4bff('0x19')]['create'](_0x476e6b[_0x4bff('0x1a')],{'raw':_0x476e6b[_0x4bff('0x1b')]?_0x476e6b[_0x4bff('0x1b')][_0x4bff('0x1c')]===undefined?!![]:![]:!![]})['then'](function(_0x54c011){logger[_0x4bff('0x16')](_0x4bff('0x1d'),_0x476e6b);logger[_0x4bff('0x10')](_0x4bff('0x1d'),_0x476e6b,JSON[_0x4bff('0x12')](_0x54c011));_0x12ade4(_0x54c011);})['catch'](function(_0x27ae75){logger[_0x4bff('0x13')](_0x4bff('0x1d'),_0x27ae75[_0x4bff('0x15')],_0x476e6b);_0x4b0510(_0x345c08[_0x4bff('0x13')](0x1f4,_0x27ae75[_0x4bff('0x15')]));});});};exports[_0x4bff('0x1e')]=function(_0x1b120f){var _0x5f1434=this;return new Promise(function(_0x315769,_0x49de18){return db[_0x4bff('0x19')][_0x4bff('0x1f')](_0x1b120f[_0x4bff('0x1a')],{'raw':_0x1b120f[_0x4bff('0x1b')]?_0x1b120f[_0x4bff('0x1b')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1b120f[_0x4bff('0x1b')]?_0x1b120f[_0x4bff('0x1b')][_0x4bff('0x20')]||null:null,'attributes':_0x1b120f[_0x4bff('0x1b')]?_0x1b120f[_0x4bff('0x1b')][_0x4bff('0x21')]||null:null,'limit':_0x1b120f[_0x4bff('0x1b')]?_0x1b120f[_0x4bff('0x1b')][_0x4bff('0x22')]||null:null})[_0x4bff('0xd')](function(_0x2b816f){logger['info'](_0x4bff('0x1e'),_0x1b120f);logger[_0x4bff('0x10')](_0x4bff('0x1e'),_0x1b120f,JSON['stringify'](_0x2b816f));_0x315769(_0x2b816f);})['catch'](function(_0x54866a){logger[_0x4bff('0x13')](_0x4bff('0x1e'),_0x54866a['message'],_0x1b120f);_0x49de18(_0x5f1434[_0x4bff('0x13')](0x1f4,_0x54866a['message']));});});};
\ No newline at end of file
index c73ee1d..2cef29c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4f08=['/describe','describe','/:id','show','post','create','put','update','delete','destroy','multer','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./squareReportDetail.controller','get','isAuthenticated'];(function(_0x3a2a3c,_0x37bd31){var _0x50ac9a=function(_0x494a7f){while(--_0x494a7f){_0x3a2a3c['push'](_0x3a2a3c['shift']());}};_0x50ac9a(++_0x37bd31);}(_0x4f08,0x14a));var _0x84f0=function(_0x3ee1e8,_0x328a22){_0x3ee1e8=_0x3ee1e8-0x0;var _0x8048d4=_0x4f08[_0x3ee1e8];return _0x8048d4;};'use strict';var multer=require(_0x84f0('0x0'));var util=require('util');var path=require(_0x84f0('0x1'));var timeout=require('connect-timeout');var express=require(_0x84f0('0x2'));var router=express[_0x84f0('0x3')]();var fs_extra=require(_0x84f0('0x4'));var auth=require(_0x84f0('0x5'));var interaction=require(_0x84f0('0x6'));var config=require('../../config/environment');var controller=require(_0x84f0('0x7'));router[_0x84f0('0x8')]('/',auth[_0x84f0('0x9')](),controller['index']);router[_0x84f0('0x8')](_0x84f0('0xa'),auth['isAuthenticated'](),controller[_0x84f0('0xb')]);router[_0x84f0('0x8')](_0x84f0('0xc'),auth[_0x84f0('0x9')](),controller[_0x84f0('0xd')]);router[_0x84f0('0xe')]('/',auth[_0x84f0('0x9')](),controller[_0x84f0('0xf')]);router[_0x84f0('0x10')]('/:id',auth['isAuthenticated'](),controller[_0x84f0('0x11')]);router[_0x84f0('0x12')]('/:id',auth[_0x84f0('0x9')](),controller[_0x84f0('0x13')]);module['exports']=router;
\ No newline at end of file
+var _0xcfed=['put','update','delete','/:id','destroy','exports','multer','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./squareReportDetail.controller','get','isAuthenticated','index','/describe','describe','show','post','create'];(function(_0x25876f,_0x1cde81){var _0x12b939=function(_0x1593f8){while(--_0x1593f8){_0x25876f['push'](_0x25876f['shift']());}};_0x12b939(++_0x1cde81);}(_0xcfed,0xe2));var _0xdcfe=function(_0x432682,_0x253044){_0x432682=_0x432682-0x0;var _0x463d05=_0xcfed[_0x432682];return _0x463d05;};'use strict';var multer=require(_0xdcfe('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xdcfe('0x1'));var express=require(_0xdcfe('0x2'));var router=express[_0xdcfe('0x3')]();var fs_extra=require(_0xdcfe('0x4'));var auth=require(_0xdcfe('0x5'));var interaction=require(_0xdcfe('0x6'));var config=require('../../config/environment');var controller=require(_0xdcfe('0x7'));router[_0xdcfe('0x8')]('/',auth[_0xdcfe('0x9')](),controller[_0xdcfe('0xa')]);router[_0xdcfe('0x8')](_0xdcfe('0xb'),auth[_0xdcfe('0x9')](),controller[_0xdcfe('0xc')]);router['get']('/:id',auth[_0xdcfe('0x9')](),controller[_0xdcfe('0xd')]);router[_0xdcfe('0xe')]('/',auth['isAuthenticated'](),controller[_0xdcfe('0xf')]);router[_0xdcfe('0x10')]('/:id',auth[_0xdcfe('0x9')](),controller[_0xdcfe('0x11')]);router[_0xdcfe('0x12')](_0xdcfe('0x13'),auth[_0xdcfe('0x9')](),controller[_0xdcfe('0x14')]);module[_0xdcfe('0x15')]=router;
\ No newline at end of file
index ca24766..9465b4c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf51a=['sequelize','exports','STRING'];(function(_0x2d4065,_0x38dc95){var _0xef6016=function(_0x195cee){while(--_0x195cee){_0x2d4065['push'](_0x2d4065['shift']());}};_0xef6016(++_0x38dc95);}(_0xf51a,0x144));var _0xaf51=function(_0x5ec099,_0x5ed784){_0x5ec099=_0x5ec099-0x0;var _0x5034f4=_0xf51a[_0x5ec099];return _0x5034f4;};'use strict';var Sequelize=require(_0xaf51('0x0'));module[_0xaf51('0x1')]={'uniqueid':{'type':Sequelize[_0xaf51('0x2')]},'node':{'type':Sequelize['STRING']},'application':{'type':Sequelize[_0xaf51('0x2')]},'data':{'type':Sequelize['TEXT']},'project_name':{'type':Sequelize[_0xaf51('0x2')]},'callerid':{'type':Sequelize[_0xaf51('0x2')]}};
\ No newline at end of file
+var _0x10da=['exports','STRING','TEXT'];(function(_0x598475,_0x4405d2){var _0x304ec2=function(_0xc8cb7b){while(--_0xc8cb7b){_0x598475['push'](_0x598475['shift']());}};_0x304ec2(++_0x4405d2);}(_0x10da,0xea));var _0xa10d=function(_0x2b48a9,_0x2ff169){_0x2b48a9=_0x2b48a9-0x0;var _0x4b926c=_0x10da[_0x2b48a9];return _0x4b926c;};'use strict';var Sequelize=require('sequelize');module[_0xa10d('0x0')]={'uniqueid':{'type':Sequelize[_0xa10d('0x1')]},'node':{'type':Sequelize[_0xa10d('0x1')]},'application':{'type':Sequelize['STRING']},'data':{'type':Sequelize[_0xa10d('0x2')]},'project_name':{'type':Sequelize[_0xa10d('0x1')]},'callerid':{'type':Sequelize[_0xa10d('0x1')]}};
\ No newline at end of file
index 9e9b806..3c0b964 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x06d6=['end','error','stack','name','send','index','map','SquareDetailsReport','rawAttributes','fieldName','key','model','query','keys','filters','attributes','fields','nolimit','order','sort','where','pick','filter','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','intersection','length','merge','find','create','body','update','describe','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','ejs','lodash','crypto','jsforce','desk.js','to-csv','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/license/util','../../mysqldb','sendStatus','status','offset','undefined','limit','count','set','Content-Range','apply','save','then','destroy'];(function(_0x23c73d,_0x357b21){var _0x36ba47=function(_0x317b8e){while(--_0x317b8e){_0x23c73d['push'](_0x23c73d['shift']());}};_0x36ba47(++_0x357b21);}(_0x06d6,0x10a));var _0x606d=function(_0x34b1fa,_0x5e0184){_0x34b1fa=_0x34b1fa-0x0;var _0x18f15e=_0x06d6[_0x34b1fa];return _0x18f15e;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x606d('0x0'));var zipdir=require(_0x606d('0x1'));var jsonpatch=require(_0x606d('0x2'));var rp=require('request-promise');var moment=require(_0x606d('0x3'));var BPromise=require(_0x606d('0x4'));var Mustache=require(_0x606d('0x5'));var util=require(_0x606d('0x6'));var path=require('path');var sox=require('sox');var csv=require('to-csv');var ejs=require(_0x606d('0x7'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x606d('0x8'));var squel=require('squel');var crypto=require(_0x606d('0x9'));var jsforce=require(_0x606d('0xa'));var deskjs=require(_0x606d('0xb'));var toCsv=require(_0x606d('0xc'));var querystring=require('querystring');var Papa=require(_0x606d('0xd'));var Redis=require(_0x606d('0xe'));var authService=require('../../components/auth/service');var qs=require(_0x606d('0xf'));var as=require(_0x606d('0x10'));var hardwareService=require(_0x606d('0x11'));var logger=require(_0x606d('0x12'))(_0x606d('0x13'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x606d('0x14'));var db=require(_0x606d('0x15'))['db'];function respondWithStatusCode(_0x574f01,_0x4eaff9){_0x4eaff9=_0x4eaff9||0xcc;return function(_0x56289b){if(_0x56289b){return _0x574f01[_0x606d('0x16')](_0x4eaff9);}return _0x574f01[_0x606d('0x17')](_0x4eaff9)['end']();};}function respondWithResult(_0x2f6da5,_0xac1f62){_0xac1f62=_0xac1f62||0xc8;return function(_0x12fa84){if(_0x12fa84){return _0x2f6da5[_0x606d('0x17')](_0xac1f62)['json'](_0x12fa84);}};}function respondWithFilteredResult(_0x1e98ae,_0x4b9e68){return function(_0x1e343b){if(_0x1e343b){var _0x3bebb2=typeof _0x4b9e68[_0x606d('0x18')]===_0x606d('0x19')&&typeof _0x4b9e68[_0x606d('0x1a')]==='undefined';var _0x2f02cd=_0x1e343b[_0x606d('0x1b')];var _0x1be3dc=_0x3bebb2?0x0:_0x4b9e68['offset'];var _0x43c7c9=_0x3bebb2?_0x1e343b[_0x606d('0x1b')]:_0x4b9e68[_0x606d('0x18')]+_0x4b9e68[_0x606d('0x1a')];var _0x8bf1c2;if(_0x43c7c9>=_0x2f02cd){_0x43c7c9=_0x2f02cd;_0x8bf1c2=0xc8;}else{_0x8bf1c2=0xce;}_0x1e98ae[_0x606d('0x17')](_0x8bf1c2);return _0x1e98ae[_0x606d('0x1c')](_0x606d('0x1d'),_0x1be3dc+'-'+_0x43c7c9+'/'+_0x2f02cd)['json'](_0x1e343b);}return null;};}function patchUpdates(_0x28ecb1){return function(_0x2fe333){try{jsonpatch[_0x606d('0x1e')](_0x2fe333,_0x28ecb1,!![]);}catch(_0x1970c0){return BPromise['reject'](_0x1970c0);}return _0x2fe333[_0x606d('0x1f')]();};}function saveUpdates(_0x404608,_0x3c4068){return function(_0x46dc49){if(_0x46dc49){return _0x46dc49['update'](_0x404608)[_0x606d('0x20')](function(_0x1d7771){return _0x1d7771;});}return null;};}function removeEntity(_0x39886a,_0x1175ef){return function(_0x3fcc09){if(_0x3fcc09){return _0x3fcc09[_0x606d('0x21')]()['then'](function(){_0x39886a['status'](0xcc)[_0x606d('0x22')]();});}};}function handleEntityNotFound(_0x13bd7f,_0x2e0d6e){return function(_0x3b1529){if(!_0x3b1529){_0x13bd7f[_0x606d('0x16')](0x194);}return _0x3b1529;};}function handleError(_0xc05baf,_0x5813a4){_0x5813a4=_0x5813a4||0x1f4;return function(_0x3bbbe0){logger[_0x606d('0x23')](_0x3bbbe0[_0x606d('0x24')]);if(_0x3bbbe0[_0x606d('0x25')]){delete _0x3bbbe0[_0x606d('0x25')];}_0xc05baf[_0x606d('0x17')](_0x5813a4)[_0x606d('0x26')](_0x3bbbe0);};}exports[_0x606d('0x27')]=function(_0x3c1f48,_0x3fc2f2){var _0x5dad23={},_0x4c97ca={},_0x17a058={'count':0x0,'rows':[]};var _0x179ace=_[_0x606d('0x28')](db[_0x606d('0x29')][_0x606d('0x2a')],function(_0x54c68b){return{'name':_0x54c68b[_0x606d('0x2b')],'type':_0x54c68b['type'][_0x606d('0x2c')]};});_0x4c97ca[_0x606d('0x2d')]=_[_0x606d('0x28')](_0x179ace,_0x606d('0x25'));_0x4c97ca[_0x606d('0x2e')]=_[_0x606d('0x2f')](_0x3c1f48[_0x606d('0x2e')]);_0x4c97ca[_0x606d('0x30')]=_['intersection'](_0x4c97ca[_0x606d('0x2d')],_0x4c97ca[_0x606d('0x2e')]);_0x5dad23[_0x606d('0x31')]=_['intersection'](_0x4c97ca[_0x606d('0x2d')],qs[_0x606d('0x32')](_0x3c1f48[_0x606d('0x2e')][_0x606d('0x32')]));_0x5dad23[_0x606d('0x31')]=_0x5dad23[_0x606d('0x31')]['length']?_0x5dad23['attributes']:_0x4c97ca[_0x606d('0x2d')];if(!_0x3c1f48[_0x606d('0x2e')]['hasOwnProperty'](_0x606d('0x33'))){_0x5dad23['limit']=qs[_0x606d('0x1a')](_0x3c1f48[_0x606d('0x2e')][_0x606d('0x1a')]);_0x5dad23[_0x606d('0x18')]=qs['offset'](_0x3c1f48[_0x606d('0x2e')][_0x606d('0x18')]);}_0x5dad23[_0x606d('0x34')]=qs['sort'](_0x3c1f48['query'][_0x606d('0x35')]);_0x5dad23[_0x606d('0x36')]=qs['filters'](_[_0x606d('0x37')](_0x3c1f48[_0x606d('0x2e')],_0x4c97ca['filters']),_0x179ace);if(_0x3c1f48[_0x606d('0x2e')][_0x606d('0x38')]){_0x5dad23['where']=_['merge'](_0x5dad23[_0x606d('0x36')],{'$or':_['map'](_0x179ace,function(_0x4a3348){if(_0x4a3348[_0x606d('0x39')]!==_0x606d('0x3a')){var _0x4979f1={};_0x4979f1[_0x4a3348[_0x606d('0x25')]]={'$like':'%'+_0x3c1f48[_0x606d('0x2e')]['filter']+'%'};return _0x4979f1;}})});}_0x5dad23=_['merge']({},_0x5dad23,_0x3c1f48[_0x606d('0x3b')]);var _0x436921={'where':_0x5dad23['where']};return db['SquareDetailsReport'][_0x606d('0x1b')](_0x436921)[_0x606d('0x20')](function(_0x527b3d){_0x17a058['count']=_0x527b3d;if(_0x3c1f48[_0x606d('0x2e')][_0x606d('0x3c')]){_0x5dad23[_0x606d('0x3d')]=[{'all':!![]}];}return db[_0x606d('0x29')][_0x606d('0x3e')](_0x5dad23);})['then'](function(_0x5ccf0c){_0x17a058[_0x606d('0x3f')]=_0x5ccf0c;return _0x17a058;})[_0x606d('0x20')](respondWithFilteredResult(_0x3fc2f2,_0x5dad23))[_0x606d('0x40')](handleError(_0x3fc2f2,null));};exports[_0x606d('0x41')]=function(_0x5049b6,_0x2403ac){var _0x45027f={'raw':!![],'where':{'id':_0x5049b6[_0x606d('0x42')]['id']}},_0x5d42a6={};_0x5d42a6['model']=_[_0x606d('0x2f')](db[_0x606d('0x29')][_0x606d('0x2a')]);_0x5d42a6[_0x606d('0x2e')]=_[_0x606d('0x2f')](_0x5049b6[_0x606d('0x2e')]);_0x5d42a6[_0x606d('0x30')]=_[_0x606d('0x43')](_0x5d42a6[_0x606d('0x2d')],_0x5d42a6[_0x606d('0x2e')]);_0x45027f[_0x606d('0x31')]=_['intersection'](_0x5d42a6[_0x606d('0x2d')],qs[_0x606d('0x32')](_0x5049b6['query'][_0x606d('0x32')]));_0x45027f[_0x606d('0x31')]=_0x45027f[_0x606d('0x31')][_0x606d('0x44')]?_0x45027f['attributes']:_0x5d42a6[_0x606d('0x2d')];if(_0x5049b6[_0x606d('0x2e')][_0x606d('0x3c')]){_0x45027f['include']=[{'all':!![]}];}_0x45027f=_[_0x606d('0x45')]({},_0x45027f,_0x5049b6[_0x606d('0x3b')]);return db[_0x606d('0x29')][_0x606d('0x46')](_0x45027f)[_0x606d('0x20')](handleEntityNotFound(_0x2403ac,null))[_0x606d('0x20')](respondWithResult(_0x2403ac,null))[_0x606d('0x40')](handleError(_0x2403ac,null));};exports['create']=function(_0xbe0d33,_0x45ed84){return db[_0x606d('0x29')][_0x606d('0x47')](_0xbe0d33[_0x606d('0x48')],{})['then'](respondWithResult(_0x45ed84,0xc9))['catch'](handleError(_0x45ed84,null));};exports[_0x606d('0x49')]=function(_0xd63422,_0x335606){if(_0xd63422[_0x606d('0x48')]['id']){delete _0xd63422[_0x606d('0x48')]['id'];}return db['SquareDetailsReport'][_0x606d('0x46')]({'where':{'id':_0xd63422[_0x606d('0x42')]['id']}})[_0x606d('0x20')](handleEntityNotFound(_0x335606,null))['then'](saveUpdates(_0xd63422[_0x606d('0x48')],null))['then'](respondWithResult(_0x335606,null))['catch'](handleError(_0x335606,null));};exports[_0x606d('0x21')]=function(_0x5e8cad,_0x366189){return db[_0x606d('0x29')][_0x606d('0x46')]({'where':{'id':_0x5e8cad[_0x606d('0x42')]['id']}})[_0x606d('0x20')](handleEntityNotFound(_0x366189,null))['then'](removeEntity(_0x366189,null))['catch'](handleError(_0x366189,null));};exports['describe']=function(_0x3695e1,_0x581bfa){return db[_0x606d('0x29')][_0x606d('0x4a')]()['then'](respondWithResult(_0x581bfa,null))[_0x606d('0x40')](handleError(_0x581bfa,null));};
\ No newline at end of file
+var _0x6595=['sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','rows','catch','show','params','SquareDetailsReport','rawAttributes','fields','include','find','create','update','body','describe','eml-format','rimraf','fast-json-patch','request-promise','moment','bluebird','mustache','util','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','json','undefined','limit','count','offset','Content-Range','apply','reject','then','destroy','error','name','send','index','map','fieldName','type','key','model','query','keys','attributes','intersection','length','nolimit','order'];(function(_0x5216e0,_0x4f8cb9){var _0x5b3f40=function(_0x30c832){while(--_0x30c832){_0x5216e0['push'](_0x5216e0['shift']());}};_0x5b3f40(++_0x4f8cb9);}(_0x6595,0xb2));var _0x5659=function(_0x1c9bd0,_0x1216d6){_0x1c9bd0=_0x1c9bd0-0x0;var _0x216fa1=_0x6595[_0x1c9bd0];return _0x216fa1;};'use strict';var emlformat=require(_0x5659('0x0'));var rimraf=require(_0x5659('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x5659('0x2'));var rp=require(_0x5659('0x3'));var moment=require(_0x5659('0x4'));var BPromise=require(_0x5659('0x5'));var Mustache=require(_0x5659('0x6'));var util=require(_0x5659('0x7'));var path=require('path');var sox=require(_0x5659('0x8'));var csv=require(_0x5659('0x9'));var ejs=require(_0x5659('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x5659('0xb'));var squel=require(_0x5659('0xc'));var crypto=require(_0x5659('0xd'));var jsforce=require(_0x5659('0xe'));var deskjs=require(_0x5659('0xf'));var toCsv=require(_0x5659('0x9'));var querystring=require(_0x5659('0x10'));var Papa=require(_0x5659('0x11'));var Redis=require(_0x5659('0x12'));var authService=require(_0x5659('0x13'));var qs=require(_0x5659('0x14'));var as=require(_0x5659('0x15'));var hardwareService=require(_0x5659('0x16'));var logger=require(_0x5659('0x17'))(_0x5659('0x18'));var utils=require(_0x5659('0x19'));var config=require(_0x5659('0x1a'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x37bbd0,_0x56099c){_0x56099c=_0x56099c||0xcc;return function(_0x16e02d){if(_0x16e02d){return _0x37bbd0[_0x5659('0x1b')](_0x56099c);}return _0x37bbd0[_0x5659('0x1c')](_0x56099c)[_0x5659('0x1d')]();};}function respondWithResult(_0x3fbaf4,_0x2519b1){_0x2519b1=_0x2519b1||0xc8;return function(_0x3d9b9f){if(_0x3d9b9f){return _0x3fbaf4['status'](_0x2519b1)[_0x5659('0x1e')](_0x3d9b9f);}};}function respondWithFilteredResult(_0x11b6da,_0xe3bd63){return function(_0xf2f5a1){if(_0xf2f5a1){var _0x2ae02f=typeof _0xe3bd63['offset']===_0x5659('0x1f')&&typeof _0xe3bd63[_0x5659('0x20')]===_0x5659('0x1f');var _0x3864ec=_0xf2f5a1[_0x5659('0x21')];var _0x272cb2=_0x2ae02f?0x0:_0xe3bd63[_0x5659('0x22')];var _0x318db5=_0x2ae02f?_0xf2f5a1[_0x5659('0x21')]:_0xe3bd63[_0x5659('0x22')]+_0xe3bd63[_0x5659('0x20')];var _0xff93c2;if(_0x318db5>=_0x3864ec){_0x318db5=_0x3864ec;_0xff93c2=0xc8;}else{_0xff93c2=0xce;}_0x11b6da[_0x5659('0x1c')](_0xff93c2);return _0x11b6da['set'](_0x5659('0x23'),_0x272cb2+'-'+_0x318db5+'/'+_0x3864ec)['json'](_0xf2f5a1);}return null;};}function patchUpdates(_0x1d23ae){return function(_0x482ebd){try{jsonpatch[_0x5659('0x24')](_0x482ebd,_0x1d23ae,!![]);}catch(_0x50a3df){return BPromise[_0x5659('0x25')](_0x50a3df);}return _0x482ebd['save']();};}function saveUpdates(_0x15e7c5,_0x4410dc){return function(_0x4c4ba8){if(_0x4c4ba8){return _0x4c4ba8['update'](_0x15e7c5)[_0x5659('0x26')](function(_0x988f6c){return _0x988f6c;});}return null;};}function removeEntity(_0x2789a7,_0x585f7a){return function(_0xcfe388){if(_0xcfe388){return _0xcfe388[_0x5659('0x27')]()['then'](function(){_0x2789a7[_0x5659('0x1c')](0xcc)[_0x5659('0x1d')]();});}};}function handleEntityNotFound(_0xc05442,_0xe64aca){return function(_0x5a99fd){if(!_0x5a99fd){_0xc05442[_0x5659('0x1b')](0x194);}return _0x5a99fd;};}function handleError(_0x41c19d,_0x3cded2){_0x3cded2=_0x3cded2||0x1f4;return function(_0x22e88b){logger[_0x5659('0x28')](_0x22e88b['stack']);if(_0x22e88b[_0x5659('0x29')]){delete _0x22e88b[_0x5659('0x29')];}_0x41c19d[_0x5659('0x1c')](_0x3cded2)[_0x5659('0x2a')](_0x22e88b);};}exports[_0x5659('0x2b')]=function(_0x2eec74,_0x2df3f3){var _0x2c2183={},_0x51f154={},_0x96122e={'count':0x0,'rows':[]};var _0x15bfa9=_[_0x5659('0x2c')](db['SquareDetailsReport']['rawAttributes'],function(_0x4a3a0e){return{'name':_0x4a3a0e[_0x5659('0x2d')],'type':_0x4a3a0e[_0x5659('0x2e')][_0x5659('0x2f')]};});_0x51f154[_0x5659('0x30')]=_[_0x5659('0x2c')](_0x15bfa9,'name');_0x51f154[_0x5659('0x31')]=_[_0x5659('0x32')](_0x2eec74[_0x5659('0x31')]);_0x51f154['filters']=_['intersection'](_0x51f154[_0x5659('0x30')],_0x51f154[_0x5659('0x31')]);_0x2c2183[_0x5659('0x33')]=_[_0x5659('0x34')](_0x51f154[_0x5659('0x30')],qs['fields'](_0x2eec74[_0x5659('0x31')]['fields']));_0x2c2183['attributes']=_0x2c2183['attributes'][_0x5659('0x35')]?_0x2c2183['attributes']:_0x51f154[_0x5659('0x30')];if(!_0x2eec74[_0x5659('0x31')]['hasOwnProperty'](_0x5659('0x36'))){_0x2c2183[_0x5659('0x20')]=qs[_0x5659('0x20')](_0x2eec74[_0x5659('0x31')]['limit']);_0x2c2183[_0x5659('0x22')]=qs[_0x5659('0x22')](_0x2eec74[_0x5659('0x31')]['offset']);}_0x2c2183[_0x5659('0x37')]=qs[_0x5659('0x38')](_0x2eec74[_0x5659('0x31')]['sort']);_0x2c2183[_0x5659('0x39')]=qs[_0x5659('0x3a')](_[_0x5659('0x3b')](_0x2eec74[_0x5659('0x31')],_0x51f154[_0x5659('0x3a')]),_0x15bfa9);if(_0x2eec74['query'][_0x5659('0x3c')]){_0x2c2183['where']=_[_0x5659('0x3d')](_0x2c2183[_0x5659('0x39')],{'$or':_[_0x5659('0x2c')](_0x15bfa9,function(_0x18418d){if(_0x18418d[_0x5659('0x2e')]!==_0x5659('0x3e')){var _0x40e629={};_0x40e629[_0x18418d[_0x5659('0x29')]]={'$like':'%'+_0x2eec74[_0x5659('0x31')][_0x5659('0x3c')]+'%'};return _0x40e629;}})});}_0x2c2183=_['merge']({},_0x2c2183,_0x2eec74[_0x5659('0x3f')]);var _0x399e76={'where':_0x2c2183[_0x5659('0x39')]};return db['SquareDetailsReport'][_0x5659('0x21')](_0x399e76)[_0x5659('0x26')](function(_0x1d87a1){_0x96122e[_0x5659('0x21')]=_0x1d87a1;if(_0x2eec74[_0x5659('0x31')][_0x5659('0x40')]){_0x2c2183['include']=[{'all':!![]}];}return db['SquareDetailsReport']['findAll'](_0x2c2183);})[_0x5659('0x26')](function(_0x163904){_0x96122e[_0x5659('0x41')]=_0x163904;return _0x96122e;})[_0x5659('0x26')](respondWithFilteredResult(_0x2df3f3,_0x2c2183))[_0x5659('0x42')](handleError(_0x2df3f3,null));};exports[_0x5659('0x43')]=function(_0x283f6f,_0x3f2b4d){var _0x211169={'raw':!![],'where':{'id':_0x283f6f[_0x5659('0x44')]['id']}},_0x47c8e7={};_0x47c8e7[_0x5659('0x30')]=_[_0x5659('0x32')](db[_0x5659('0x45')][_0x5659('0x46')]);_0x47c8e7[_0x5659('0x31')]=_[_0x5659('0x32')](_0x283f6f[_0x5659('0x31')]);_0x47c8e7[_0x5659('0x3a')]=_[_0x5659('0x34')](_0x47c8e7[_0x5659('0x30')],_0x47c8e7[_0x5659('0x31')]);_0x211169[_0x5659('0x33')]=_[_0x5659('0x34')](_0x47c8e7[_0x5659('0x30')],qs[_0x5659('0x47')](_0x283f6f[_0x5659('0x31')]['fields']));_0x211169['attributes']=_0x211169[_0x5659('0x33')][_0x5659('0x35')]?_0x211169[_0x5659('0x33')]:_0x47c8e7[_0x5659('0x30')];if(_0x283f6f[_0x5659('0x31')]['includeAll']){_0x211169[_0x5659('0x48')]=[{'all':!![]}];}_0x211169=_[_0x5659('0x3d')]({},_0x211169,_0x283f6f[_0x5659('0x3f')]);return db[_0x5659('0x45')][_0x5659('0x49')](_0x211169)[_0x5659('0x26')](handleEntityNotFound(_0x3f2b4d,null))[_0x5659('0x26')](respondWithResult(_0x3f2b4d,null))[_0x5659('0x42')](handleError(_0x3f2b4d,null));};exports[_0x5659('0x4a')]=function(_0x3c4334,_0x3db4b0){return db[_0x5659('0x45')]['create'](_0x3c4334['body'],{})['then'](respondWithResult(_0x3db4b0,0xc9))[_0x5659('0x42')](handleError(_0x3db4b0,null));};exports[_0x5659('0x4b')]=function(_0x1e5258,_0x4f578){if(_0x1e5258[_0x5659('0x4c')]['id']){delete _0x1e5258[_0x5659('0x4c')]['id'];}return db[_0x5659('0x45')]['find']({'where':{'id':_0x1e5258[_0x5659('0x44')]['id']}})[_0x5659('0x26')](handleEntityNotFound(_0x4f578,null))[_0x5659('0x26')](saveUpdates(_0x1e5258[_0x5659('0x4c')],null))['then'](respondWithResult(_0x4f578,null))[_0x5659('0x42')](handleError(_0x4f578,null));};exports[_0x5659('0x27')]=function(_0x50bf04,_0x34cd24){return db[_0x5659('0x45')][_0x5659('0x49')]({'where':{'id':_0x50bf04['params']['id']}})[_0x5659('0x26')](handleEntityNotFound(_0x34cd24,null))[_0x5659('0x26')](removeEntity(_0x34cd24,null))[_0x5659('0x42')](handleError(_0x34cd24,null));};exports[_0x5659('0x4d')]=function(_0x10bc78,_0x12a506){return db[_0x5659('0x45')][_0x5659('0x4d')]()[_0x5659('0x26')](respondWithResult(_0x12a506,null))[_0x5659('0x42')](handleError(_0x12a506,null));};
\ No newline at end of file
index b924b88..eae5fd5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc0be=['./squareReportDetail.attributes','exports','define','SquareDetailsReport','report_square_details','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment'];(function(_0x46e89e,_0x54f5a3){var _0x21af73=function(_0x50e1a1){while(--_0x50e1a1){_0x46e89e['push'](_0x46e89e['shift']());}};_0x21af73(++_0x54f5a3);}(_0xc0be,0x113));var _0xec0b=function(_0x1a2c5b,_0x16cee9){_0x1a2c5b=_0x1a2c5b-0x0;var _0x1efca7=_0xc0be[_0x1a2c5b];return _0x1efca7;};'use strict';var _=require(_0xec0b('0x0'));var util=require(_0xec0b('0x1'));var logger=require(_0xec0b('0x2'))(_0xec0b('0x3'));var moment=require(_0xec0b('0x4'));var BPromise=require(_0xec0b('0x5'));var rp=require(_0xec0b('0x6'));var fs=require('fs');var path=require(_0xec0b('0x7'));var rimraf=require(_0xec0b('0x8'));var config=require(_0xec0b('0x9'));var attributes=require(_0xec0b('0xa'));module[_0xec0b('0xb')]=function(_0x2cdfe7,_0x2dcc56){return _0x2cdfe7[_0xec0b('0xc')](_0xec0b('0xd'),attributes,{'tableName':_0xec0b('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xcea0=['bluebird','request-promise','rimraf','./squareReportDetail.attributes','exports','SquareDetailsReport','util','api'];(function(_0x1eab51,_0x19070d){var _0x2e6e82=function(_0x52c699){while(--_0x52c699){_0x1eab51['push'](_0x1eab51['shift']());}};_0x2e6e82(++_0x19070d);}(_0xcea0,0x1ae));var _0x0cea=function(_0x4b055c,_0x4b870b){_0x4b055c=_0x4b055c-0x0;var _0x4b62bb=_0xcea0[_0x4b055c];return _0x4b62bb;};'use strict';var _=require('lodash');var util=require(_0x0cea('0x0'));var logger=require('../../config/logger')(_0x0cea('0x1'));var moment=require('moment');var BPromise=require(_0x0cea('0x2'));var rp=require(_0x0cea('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x0cea('0x4'));var config=require('../../config/environment');var attributes=require(_0x0cea('0x5'));module[_0x0cea('0x6')]=function(_0xc71c1a,_0x4a6481){return _0xc71c1a['define'](_0x0cea('0x7'),attributes,{'tableName':'report_square_details','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index aefbada..93c2c30 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa5fa=['../../config/environment','jayson/promise','client','http','request','info','debug','stringify','error','code','SquareDetailsReport,\x20%s,\x20%s','message','request\x20sent','result','catch','CreateSquareDetailsReport','SquareDetailsReport','create','body','options','raw','then','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc'];(function(_0x565d34,_0x4176da){var _0x3751e7=function(_0x42428b){while(--_0x42428b){_0x565d34['push'](_0x565d34['shift']());}};_0x3751e7(++_0x4176da);}(_0xa5fa,0xc4));var _0xaa5f=function(_0x3af56a,_0x3e185f){_0x3af56a=_0x3af56a-0x0;var _0x440680=_0xa5fa[_0x3af56a];return _0x440680;};'use strict';var _=require('lodash');var util=require(_0xaa5f('0x0'));var moment=require(_0xaa5f('0x1'));var BPromise=require(_0xaa5f('0x2'));var rs=require(_0xaa5f('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xaa5f('0x4'))['db'];var utils=require(_0xaa5f('0x5'));var logger=require('../../config/logger')(_0xaa5f('0x6'));var config=require(_0xaa5f('0x7'));var jayson=require(_0xaa5f('0x8'));var client=jayson[_0xaa5f('0x9')][_0xaa5f('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x13b606,_0x302138,_0xc326df){return new BPromise(function(_0x74f64f,_0x3f550e){return client[_0xaa5f('0xb')](_0x13b606,_0xc326df)['then'](function(_0x1674c2){logger[_0xaa5f('0xc')]('SquareDetailsReport,\x20%s,\x20%s',_0x302138,'request\x20sent');logger[_0xaa5f('0xd')]('SquareDetailsReport,\x20%s,\x20%s,\x20%s',_0x302138,'request\x20sent',JSON[_0xaa5f('0xe')](_0x1674c2));if(_0x1674c2['error']){if(_0x1674c2[_0xaa5f('0xf')][_0xaa5f('0x10')]===0x1f4){logger[_0xaa5f('0xf')](_0xaa5f('0x11'),_0x302138,_0x1674c2[_0xaa5f('0xf')]['message']);return _0x3f550e(_0x1674c2[_0xaa5f('0xf')]['message']);}logger[_0xaa5f('0xf')](_0xaa5f('0x11'),_0x302138,_0x1674c2[_0xaa5f('0xf')][_0xaa5f('0x12')]);return _0x74f64f(_0x1674c2[_0xaa5f('0xf')]['message']);}else{logger['info'](_0xaa5f('0x11'),_0x302138,_0xaa5f('0x13'));_0x74f64f(_0x1674c2[_0xaa5f('0x14')][_0xaa5f('0x12')]);}})[_0xaa5f('0x15')](function(_0x1fa36a){logger[_0xaa5f('0xf')](_0xaa5f('0x11'),_0x302138,_0x1fa36a);_0x3f550e(_0x1fa36a);});});}exports[_0xaa5f('0x16')]=function(_0x3d874f){var _0x22175f=this;return new Promise(function(_0x1019e8,_0x4f4cd5){return db[_0xaa5f('0x17')][_0xaa5f('0x18')](_0x3d874f[_0xaa5f('0x19')],{'raw':_0x3d874f[_0xaa5f('0x1a')]?_0x3d874f[_0xaa5f('0x1a')][_0xaa5f('0x1b')]===undefined?!![]:![]:!![]})[_0xaa5f('0x1c')](function(_0x194691){logger[_0xaa5f('0xc')](_0xaa5f('0x16'),_0x3d874f);logger[_0xaa5f('0xd')](_0xaa5f('0x16'),_0x3d874f,JSON[_0xaa5f('0xe')](_0x194691));_0x1019e8(_0x194691);})['catch'](function(_0x1e917d){logger['error'](_0xaa5f('0x16'),_0x1e917d[_0xaa5f('0x12')],_0x3d874f);_0x4f4cd5(_0x22175f['error'](0x1f4,_0x1e917d[_0xaa5f('0x12')]));});});};
\ No newline at end of file
+var _0x351d=['lodash','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','jayson/promise','client','http','request','info','request\x20sent','debug','stringify','error','SquareDetailsReport,\x20%s,\x20%s','message','result','CreateSquareDetailsReport','SquareDetailsReport','create','options','then'];(function(_0x43b584,_0x20a6bd){var _0x48f27b=function(_0x1eeb77){while(--_0x1eeb77){_0x43b584['push'](_0x43b584['shift']());}};_0x48f27b(++_0x20a6bd);}(_0x351d,0x90));var _0xd351=function(_0x2dace1,_0x554c95){_0x2dace1=_0x2dace1-0x0;var _0x401e22=_0x351d[_0x2dace1];return _0x401e22;};'use strict';var _=require(_0xd351('0x0'));var util=require('util');var moment=require(_0xd351('0x1'));var BPromise=require(_0xd351('0x2'));var rs=require(_0xd351('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xd351('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0xd351('0x5'))(_0xd351('0x6'));var config=require('../../config/environment');var jayson=require(_0xd351('0x7'));var client=jayson[_0xd351('0x8')][_0xd351('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x5318b2,_0x16b3f7,_0x235aa0){return new BPromise(function(_0x4e1b06,_0x2e9a2a){return client[_0xd351('0xa')](_0x5318b2,_0x235aa0)['then'](function(_0x586c60){logger[_0xd351('0xb')]('SquareDetailsReport,\x20%s,\x20%s',_0x16b3f7,_0xd351('0xc'));logger[_0xd351('0xd')]('SquareDetailsReport,\x20%s,\x20%s,\x20%s',_0x16b3f7,_0xd351('0xc'),JSON[_0xd351('0xe')](_0x586c60));if(_0x586c60['error']){if(_0x586c60[_0xd351('0xf')]['code']===0x1f4){logger['error'](_0xd351('0x10'),_0x16b3f7,_0x586c60[_0xd351('0xf')][_0xd351('0x11')]);return _0x2e9a2a(_0x586c60[_0xd351('0xf')]['message']);}logger[_0xd351('0xf')](_0xd351('0x10'),_0x16b3f7,_0x586c60['error'][_0xd351('0x11')]);return _0x4e1b06(_0x586c60[_0xd351('0xf')][_0xd351('0x11')]);}else{logger[_0xd351('0xb')](_0xd351('0x10'),_0x16b3f7,'request\x20sent');_0x4e1b06(_0x586c60[_0xd351('0x12')]['message']);}})['catch'](function(_0x2c6708){logger['error'](_0xd351('0x10'),_0x16b3f7,_0x2c6708);_0x2e9a2a(_0x2c6708);});});}exports[_0xd351('0x13')]=function(_0x4e0164){var _0x4c6693=this;return new Promise(function(_0x1e1a3c,_0x2bfc53){return db[_0xd351('0x14')][_0xd351('0x15')](_0x4e0164['body'],{'raw':_0x4e0164[_0xd351('0x16')]?_0x4e0164['options']['raw']===undefined?!![]:![]:!![]})[_0xd351('0x17')](function(_0x4a427b){logger[_0xd351('0xb')](_0xd351('0x13'),_0x4e0164);logger[_0xd351('0xd')](_0xd351('0x13'),_0x4e0164,JSON[_0xd351('0xe')](_0x4a427b));_0x1e1a3c(_0x4a427b);})['catch'](function(_0x18625b){logger[_0xd351('0xf')](_0xd351('0x13'),_0x18625b['message'],_0x4e0164);_0x2bfc53(_0x4c6693[_0xd351('0xf')](0x1f4,_0x18625b[_0xd351('0x11')]));});});};
\ No newline at end of file
index c5e8aec..5fe45e7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1549=['express','Router','../../components/auth/service','./system.controller','get','isAuthenticated','index','/process/:pid/kill','exports'];(function(_0x55447e,_0x5a209b){var _0x5bd6fd=function(_0x2b25e5){while(--_0x2b25e5){_0x55447e['push'](_0x55447e['shift']());}};_0x5bd6fd(++_0x5a209b);}(_0x1549,0x6c));var _0x9154=function(_0x257642,_0x270a80){_0x257642=_0x257642-0x0;var _0x3d813b=_0x1549[_0x257642];return _0x3d813b;};'use strict';var express=require(_0x9154('0x0'));var router=express[_0x9154('0x1')]();var auth=require(_0x9154('0x2'));var controller=require(_0x9154('0x3'));router[_0x9154('0x4')]('/',auth[_0x9154('0x5')](),controller[_0x9154('0x6')]);router[_0x9154('0x4')](_0x9154('0x7'),auth[_0x9154('0x5')](),controller['killProcess']);module[_0x9154('0x8')]=router;
\ No newline at end of file
+var _0x1fbc=['../../components/auth/service','./system.controller','get','isAuthenticated','index','/process/:pid/kill','killProcess','exports','express','Router'];(function(_0x26d318,_0x434d3f){var _0x331056=function(_0x4eb792){while(--_0x4eb792){_0x26d318['push'](_0x26d318['shift']());}};_0x331056(++_0x434d3f);}(_0x1fbc,0x17a));var _0xc1fb=function(_0x256163,_0x46f063){_0x256163=_0x256163-0x0;var _0xe82c63=_0x1fbc[_0x256163];return _0xe82c63;};'use strict';var express=require(_0xc1fb('0x0'));var router=express[_0xc1fb('0x1')]();var auth=require(_0xc1fb('0x2'));var controller=require(_0xc1fb('0x3'));router[_0xc1fb('0x4')]('/',auth[_0xc1fb('0x5')](),controller[_0xc1fb('0x6')]);router[_0xc1fb('0x4')](_0xc1fb('0x7'),auth[_0xc1fb('0x5')](),controller[_0xc1fb('0x8')]);module[_0xc1fb('0x9')]=router;
\ No newline at end of file
index e4f6f17..0ee5094 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe103=['length','indexOf','kill','SIGINT','Process\x20with\x20pid\x20%s\x20killed\x20correctly','catch','systeminformation','child_process','exec','../../config/logger','bluebird','lodash','error','<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','name','status','send','index','getAllData','json','killProcess','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','pid','then','split'];(function(_0x3d4e74,_0x21b4e5){var _0x57613d=function(_0x2fa3b3){while(--_0x2fa3b3){_0x3d4e74['push'](_0x3d4e74['shift']());}};_0x57613d(++_0x21b4e5);}(_0xe103,0x1f3));var _0x3e10=function(_0x278763,_0x2d06b2){_0x278763=_0x278763-0x0;var _0x4d6a31=_0xe103[_0x278763];return _0x4d6a31;};'use strict';var info=require(_0x3e10('0x0'));var exec=require(_0x3e10('0x1'))[_0x3e10('0x2')];var logger=require(_0x3e10('0x3'))('api');var util=require('util');var BPromise=require(_0x3e10('0x4'));var _=require(_0x3e10('0x5'));function handleError(_0x4a45f7,_0x3f8b8f,_0x321ffd){_0x3f8b8f=_0x3f8b8f||0x1f4;return function(_0x534c74){logger[_0x3e10('0x6')](_0x3e10('0x7'),_0x321ffd,_0x3f8b8f,util[_0x3e10('0x8')](_0x534c74,{'showHidden':![],'depth':null}));delete _0x534c74[_0x3e10('0x9')];_0x4a45f7[_0x3e10('0xa')](_0x3f8b8f)[_0x3e10('0xb')](_0x534c74);};}exports[_0x3e10('0xc')]=function(_0xce0393,_0x57c807){return info[_0x3e10('0xd')]()['then'](function(_0x149f6e){return _0x57c807['status'](0xc8)[_0x3e10('0xe')](_0x149f6e);})['catch'](function(_0x50b18f){return _0x57c807['status'](0x1f4)[_0x3e10('0xe')](_0x50b18f);});};exports[_0x3e10('0xf')]=function(_0x556c2f,_0x512b78){var _0x2bd002=[_0x3e10('0x10')];return new BPromise(function(_0x53168c,_0x4f9f73){return exec(util[_0x3e10('0x11')](_0x3e10('0x12'),_0x556c2f[_0x3e10('0x13')][_0x3e10('0x14')]),function(_0x76cc6f,_0x4311a9,_0x5b4ed8){if(_0x76cc6f){return _0x4f9f73(_0x76cc6f);}return _0x53168c(_0x4311a9);});})[_0x3e10('0x15')](function(_0x332793){var _0x1cad2d=![];var _0x5154a1=_0x332793[_0x3e10('0x16')](/\n/);for(var _0x24fc38=0x0,_0x1f7266=_0x2bd002[_0x3e10('0x17')];_0x24fc38<_0x1f7266,_0x1cad2d===![];_0x24fc38+=0x1){if(_0x332793[_0x3e10('0x18')](_0x2bd002[_0x24fc38])>=0x0){_0x1cad2d=!![];}}if(!_0x1cad2d){throw new Error(util[_0x3e10('0x11')]('Process\x20with\x20pid\x20%s\x20not\x20found!',_0x556c2f['params']['pid']));}process[_0x3e10('0x19')](_0x556c2f[_0x3e10('0x13')][_0x3e10('0x14')],_0x3e10('0x1a'));return _0x512b78[_0x3e10('0xa')](0xc8)[_0x3e10('0xe')]({'message':util[_0x3e10('0x11')](_0x3e10('0x1b'),_0x556c2f[_0x3e10('0x13')][_0x3e10('0x14')])});})[_0x3e10('0x1c')](handleError(_0x512b78,null,_0x3e10('0xf')));};
\ No newline at end of file
+var _0x1d73=['<%-\x20name\x20%>,\x20%s,\x20%s,\x20%s','inspect','name','send','index','then','status','json','catch','killProcess','components/import/cm','format','ps\x20-p\x20%s\x20-ww\x20-o\x20args','params','split','length','indexOf','Process\x20with\x20pid\x20%s\x20not\x20found!','pid','kill','SIGINT','systeminformation','child_process','exec','api','util','error'];(function(_0x976402,_0x33e986){var _0x43df52=function(_0x2101c3){while(--_0x2101c3){_0x976402['push'](_0x976402['shift']());}};_0x43df52(++_0x33e986);}(_0x1d73,0x18f));var _0x31d7=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x1d73[_0x20a584];return _0x4b41a8;};'use strict';var info=require(_0x31d7('0x0'));var exec=require(_0x31d7('0x1'))[_0x31d7('0x2')];var logger=require('../../config/logger')(_0x31d7('0x3'));var util=require(_0x31d7('0x4'));var BPromise=require('bluebird');var _=require('lodash');function handleError(_0x39f0e6,_0x3de6a4,_0x469e96){_0x3de6a4=_0x3de6a4||0x1f4;return function(_0xdfae0c){logger[_0x31d7('0x5')](_0x31d7('0x6'),_0x469e96,_0x3de6a4,util[_0x31d7('0x7')](_0xdfae0c,{'showHidden':![],'depth':null}));delete _0xdfae0c[_0x31d7('0x8')];_0x39f0e6['status'](_0x3de6a4)[_0x31d7('0x9')](_0xdfae0c);};}exports[_0x31d7('0xa')]=function(_0x132b4b,_0x18bc21){return info['getAllData']()[_0x31d7('0xb')](function(_0x363a1d){return _0x18bc21[_0x31d7('0xc')](0xc8)[_0x31d7('0xd')](_0x363a1d);})[_0x31d7('0xe')](function(_0x21ec2b){return _0x18bc21[_0x31d7('0xc')](0x1f4)['json'](_0x21ec2b);});};exports[_0x31d7('0xf')]=function(_0x302df4,_0x114bf9){var _0x36c76b=[_0x31d7('0x10')];return new BPromise(function(_0x465fb1,_0x3394dc){return exec(util[_0x31d7('0x11')](_0x31d7('0x12'),_0x302df4[_0x31d7('0x13')]['pid']),function(_0x5b84b5,_0x695390,_0x2c6301){if(_0x5b84b5){return _0x3394dc(_0x5b84b5);}return _0x465fb1(_0x695390);});})[_0x31d7('0xb')](function(_0x18bd81){var _0x565561=![];var _0x251b34=_0x18bd81[_0x31d7('0x14')](/\n/);for(var _0xb5d0d5=0x0,_0x35015c=_0x36c76b[_0x31d7('0x15')];_0xb5d0d5<_0x35015c,_0x565561===![];_0xb5d0d5+=0x1){if(_0x18bd81[_0x31d7('0x16')](_0x36c76b[_0xb5d0d5])>=0x0){_0x565561=!![];}}if(!_0x565561){throw new Error(util[_0x31d7('0x11')](_0x31d7('0x17'),_0x302df4['params'][_0x31d7('0x18')]));}process[_0x31d7('0x19')](_0x302df4[_0x31d7('0x13')][_0x31d7('0x18')],_0x31d7('0x1a'));return _0x114bf9[_0x31d7('0xc')](0xc8)['json']({'message':util[_0x31d7('0x11')]('Process\x20with\x20pid\x20%s\x20killed\x20correctly',_0x302df4[_0x31d7('0x13')][_0x31d7('0x18')])});})[_0x31d7('0xe')](handleError(_0x114bf9,null,_0x31d7('0xf')));};
\ No newline at end of file
index c6ee076..c904d5b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5dc7=['isAuthenticated','get','/:id','show','post','delete','destroy','exports','multer','util','connect-timeout','express','Router','fs-extra','../../config/environment','./tag.controller'];(function(_0x216799,_0x44b817){var _0x3661c3=function(_0x28f85e){while(--_0x28f85e){_0x216799['push'](_0x216799['shift']());}};_0x3661c3(++_0x44b817);}(_0x5dc7,0x148));var _0x75dc=function(_0x4a1861,_0x21ac91){_0x4a1861=_0x4a1861-0x0;var _0x4a4af8=_0x5dc7[_0x4a1861];return _0x4a4af8;};'use strict';var multer=require(_0x75dc('0x0'));var util=require(_0x75dc('0x1'));var path=require('path');var timeout=require(_0x75dc('0x2'));var express=require(_0x75dc('0x3'));var router=express[_0x75dc('0x4')]();var fs_extra=require(_0x75dc('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x75dc('0x6'));var controller=require(_0x75dc('0x7'));router['get']('/',auth[_0x75dc('0x8')](),controller['index']);router[_0x75dc('0x9')](_0x75dc('0xa'),auth[_0x75dc('0x8')](),controller[_0x75dc('0xb')]);router[_0x75dc('0xc')]('/',auth[_0x75dc('0x8')](),controller['create']);router['put'](_0x75dc('0xa'),auth[_0x75dc('0x8')](),controller['update']);router[_0x75dc('0xd')]('/:id',auth[_0x75dc('0x8')](),controller[_0x75dc('0xe')]);module[_0x75dc('0xf')]=router;
\ No newline at end of file
+var _0x0fe9=['Router','fs-extra','../../components/auth/service','../../config/environment','./tag.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy','multer','util','connect-timeout','express'];(function(_0x3847be,_0x32a835){var _0x62604b=function(_0xaca14c){while(--_0xaca14c){_0x3847be['push'](_0x3847be['shift']());}};_0x62604b(++_0x32a835);}(_0x0fe9,0x74));var _0x90fe=function(_0x1baed6,_0x3073f2){_0x1baed6=_0x1baed6-0x0;var _0x2998df=_0x0fe9[_0x1baed6];return _0x2998df;};'use strict';var multer=require(_0x90fe('0x0'));var util=require(_0x90fe('0x1'));var path=require('path');var timeout=require(_0x90fe('0x2'));var express=require(_0x90fe('0x3'));var router=express[_0x90fe('0x4')]();var fs_extra=require(_0x90fe('0x5'));var auth=require(_0x90fe('0x6'));var interaction=require('../../components/interaction/service');var config=require(_0x90fe('0x7'));var controller=require(_0x90fe('0x8'));router[_0x90fe('0x9')]('/',auth[_0x90fe('0xa')](),controller[_0x90fe('0xb')]);router[_0x90fe('0x9')](_0x90fe('0xc'),auth[_0x90fe('0xa')](),controller[_0x90fe('0xd')]);router[_0x90fe('0xe')]('/',auth[_0x90fe('0xa')](),controller[_0x90fe('0xf')]);router[_0x90fe('0x10')](_0x90fe('0xc'),auth[_0x90fe('0xa')](),controller[_0x90fe('0x11')]);router[_0x90fe('0x12')](_0x90fe('0xc'),auth['isAuthenticated'](),controller[_0x90fe('0x13')]);module['exports']=router;
\ No newline at end of file
index 22eeb60..442c181 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x51c5=['STRING','name','#0091EA','sequelize','exports'];(function(_0x1589dd,_0x2b9d22){var _0x1bddd1=function(_0x3687f8){while(--_0x3687f8){_0x1589dd['push'](_0x1589dd['shift']());}};_0x1bddd1(++_0x2b9d22);}(_0x51c5,0x8f));var _0x551c=function(_0x29d915,_0x54a040){_0x29d915=_0x29d915-0x0;var _0x160f86=_0x51c5[_0x29d915];return _0x160f86;};'use strict';var Sequelize=require(_0x551c('0x0'));module[_0x551c('0x1')]={'name':{'type':Sequelize[_0x551c('0x2')],'unique':_0x551c('0x3'),'allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'color':{'type':Sequelize[_0x551c('0x2')],'defaultValue':_0x551c('0x4')},'description':{'type':Sequelize[_0x551c('0x2')]}};
\ No newline at end of file
+var _0x8b1a=['STRING','#0091EA','sequelize','exports'];(function(_0x180fcb,_0x208b94){var _0x515f0d=function(_0x1be895){while(--_0x1be895){_0x180fcb['push'](_0x180fcb['shift']());}};_0x515f0d(++_0x208b94);}(_0x8b1a,0x152));var _0xa8b1=function(_0x487de0,_0x22b2a6){_0x487de0=_0x487de0-0x0;var _0x5245cf=_0x8b1a[_0x487de0];return _0x5245cf;};'use strict';var Sequelize=require(_0xa8b1('0x0'));module[_0xa8b1('0x1')]={'name':{'type':Sequelize[_0xa8b1('0x2')],'unique':'name','allowNull':![],'validate':{'is':/[A-Za-z0-9._\\+*!-]+/,'notEmpty':!![]}},'color':{'type':Sequelize[_0xa8b1('0x2')],'defaultValue':_0xa8b1('0x3')},'description':{'type':Sequelize[_0xa8b1('0x2')]}};
\ No newline at end of file
index 256badb..1cec8d9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x80d9=['offset','count','set','Content-Range','apply','save','then','Tags','UserProfileResource','destroy','error','stack','name','index','map','Tag','fieldName','type','query','intersection','model','fields','attributes','length','nolimit','filters','pick','filter','where','merge','options','include','findAll','rows','catch','show','keys','rawAttributes','includeAll','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','find','update','params','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','fs-extra','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../config/license/hardware','../../config/logger','../../config/utils','../../config/license/util','sendStatus','status','end','json','undefined','limit'];(function(_0x31a28f,_0x2eab48){var _0x3e9d8c=function(_0x10219d){while(--_0x10219d){_0x31a28f['push'](_0x31a28f['shift']());}};_0x3e9d8c(++_0x2eab48);}(_0x80d9,0x15c));var _0x980d=function(_0x5bc20e,_0x4351e){_0x5bc20e=_0x5bc20e-0x0;var _0x4c71d8=_0x80d9[_0x5bc20e];return _0x4c71d8;};'use strict';var emlformat=require(_0x980d('0x0'));var rimraf=require('rimraf');var zipdir=require(_0x980d('0x1'));var jsonpatch=require(_0x980d('0x2'));var rp=require(_0x980d('0x3'));var moment=require('moment');var BPromise=require(_0x980d('0x4'));var Mustache=require(_0x980d('0x5'));var util=require(_0x980d('0x6'));var path=require(_0x980d('0x7'));var sox=require(_0x980d('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x980d('0x9'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x980d('0xa'));var jsforce=require(_0x980d('0xb'));var deskjs=require(_0x980d('0xc'));var toCsv=require(_0x980d('0xd'));var querystring=require(_0x980d('0xe'));var Papa=require(_0x980d('0xf'));var Redis=require(_0x980d('0x10'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x980d('0x11'));var logger=require(_0x980d('0x12'))('api');var utils=require(_0x980d('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0x980d('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xc0168a,_0x19cb9b){_0x19cb9b=_0x19cb9b||0xcc;return function(_0x171a61){if(_0x171a61){return _0xc0168a[_0x980d('0x15')](_0x19cb9b);}return _0xc0168a[_0x980d('0x16')](_0x19cb9b)[_0x980d('0x17')]();};}function respondWithResult(_0x109ddf,_0x3a317b){_0x3a317b=_0x3a317b||0xc8;return function(_0x5f524e){if(_0x5f524e){return _0x109ddf[_0x980d('0x16')](_0x3a317b)[_0x980d('0x18')](_0x5f524e);}};}function respondWithFilteredResult(_0x3fc5f7,_0x3846bd){return function(_0x2f229b){if(_0x2f229b){var _0x169648=typeof _0x3846bd['offset']===_0x980d('0x19')&&typeof _0x3846bd[_0x980d('0x1a')]==='undefined';var _0x1633cf=_0x2f229b['count'];var _0x23f64c=_0x169648?0x0:_0x3846bd[_0x980d('0x1b')];var _0x39192b=_0x169648?_0x2f229b[_0x980d('0x1c')]:_0x3846bd[_0x980d('0x1b')]+_0x3846bd[_0x980d('0x1a')];var _0x3ef68b;if(_0x39192b>=_0x1633cf){_0x39192b=_0x1633cf;_0x3ef68b=0xc8;}else{_0x3ef68b=0xce;}_0x3fc5f7[_0x980d('0x16')](_0x3ef68b);return _0x3fc5f7[_0x980d('0x1d')](_0x980d('0x1e'),_0x23f64c+'-'+_0x39192b+'/'+_0x1633cf)[_0x980d('0x18')](_0x2f229b);}return null;};}function patchUpdates(_0x550741){return function(_0x58dddf){try{jsonpatch[_0x980d('0x1f')](_0x58dddf,_0x550741,!![]);}catch(_0x551339){return BPromise['reject'](_0x551339);}return _0x58dddf[_0x980d('0x20')]();};}function saveUpdates(_0x1d6286,_0x45d698){return function(_0xbb89e3){if(_0xbb89e3){return _0xbb89e3['update'](_0x1d6286)['then'](function(_0x11cb45){return _0x11cb45;});}return null;};}function removeEntity(_0x4fca61,_0x4de252){return function(_0x20cea1){if(_0x20cea1){return _0x20cea1['destroy']()[_0x980d('0x21')](function(){var _0x4798d7=_0x20cea1['get']({'plain':!![]});var _0x4ecf91=_0x980d('0x22');return db[_0x980d('0x23')][_0x980d('0x24')]({'where':{'type':_0x4ecf91,'resourceId':_0x4798d7['id']}})[_0x980d('0x21')](function(){return _0x20cea1;});})['then'](function(){_0x4fca61['status'](0xcc)[_0x980d('0x17')]();});}};}function handleEntityNotFound(_0x1d5dad,_0x97ca70){return function(_0x1da8ea){if(!_0x1da8ea){_0x1d5dad[_0x980d('0x15')](0x194);}return _0x1da8ea;};}function handleError(_0x47b11d,_0x4a51f9){_0x4a51f9=_0x4a51f9||0x1f4;return function(_0x2830e5){logger[_0x980d('0x25')](_0x2830e5[_0x980d('0x26')]);if(_0x2830e5[_0x980d('0x27')]){delete _0x2830e5[_0x980d('0x27')];}_0x47b11d[_0x980d('0x16')](_0x4a51f9)['send'](_0x2830e5);};}exports[_0x980d('0x28')]=function(_0x471f52,_0xaa9cd6){var _0xd397e3={},_0x3981d8={},_0x38470b={'count':0x0,'rows':[]};var _0x868f1f=_[_0x980d('0x29')](db[_0x980d('0x2a')]['rawAttributes'],function(_0x3671b8){return{'name':_0x3671b8[_0x980d('0x2b')],'type':_0x3671b8[_0x980d('0x2c')]['key']};});_0x3981d8['model']=_[_0x980d('0x29')](_0x868f1f,'name');_0x3981d8[_0x980d('0x2d')]=_['keys'](_0x471f52['query']);_0x3981d8['filters']=_['intersection'](_0x3981d8['model'],_0x3981d8['query']);_0xd397e3['attributes']=_[_0x980d('0x2e')](_0x3981d8[_0x980d('0x2f')],qs[_0x980d('0x30')](_0x471f52['query'][_0x980d('0x30')]));_0xd397e3[_0x980d('0x31')]=_0xd397e3[_0x980d('0x31')][_0x980d('0x32')]?_0xd397e3[_0x980d('0x31')]:_0x3981d8[_0x980d('0x2f')];if(!_0x471f52[_0x980d('0x2d')]['hasOwnProperty'](_0x980d('0x33'))){_0xd397e3[_0x980d('0x1a')]=qs['limit'](_0x471f52[_0x980d('0x2d')]['limit']);_0xd397e3[_0x980d('0x1b')]=qs[_0x980d('0x1b')](_0x471f52[_0x980d('0x2d')]['offset']);}_0xd397e3['order']=qs['sort'](_0x471f52[_0x980d('0x2d')]['sort']);_0xd397e3['where']=qs[_0x980d('0x34')](_[_0x980d('0x35')](_0x471f52[_0x980d('0x2d')],_0x3981d8['filters']),_0x868f1f);if(_0x471f52[_0x980d('0x2d')][_0x980d('0x36')]){_0xd397e3[_0x980d('0x37')]=_[_0x980d('0x38')](_0xd397e3[_0x980d('0x37')],{'$or':_['map'](_0x868f1f,function(_0x5a8515){if(_0x5a8515[_0x980d('0x2c')]!=='VIRTUAL'){var _0x5b49e2={};_0x5b49e2[_0x5a8515['name']]={'$like':'%'+_0x471f52['query'][_0x980d('0x36')]+'%'};return _0x5b49e2;}})});}_0xd397e3=_[_0x980d('0x38')]({},_0xd397e3,_0x471f52[_0x980d('0x39')]);var _0x47a4ac={'where':_0xd397e3[_0x980d('0x37')]};return db[_0x980d('0x2a')][_0x980d('0x1c')](_0x47a4ac)[_0x980d('0x21')](function(_0x20a388){_0x38470b[_0x980d('0x1c')]=_0x20a388;if(_0x471f52[_0x980d('0x2d')]['includeAll']){_0xd397e3[_0x980d('0x3a')]=[{'all':!![]}];}return db[_0x980d('0x2a')][_0x980d('0x3b')](_0xd397e3);})['then'](function(_0x2a40fd){_0x38470b[_0x980d('0x3c')]=_0x2a40fd;return _0x38470b;})[_0x980d('0x21')](respondWithFilteredResult(_0xaa9cd6,_0xd397e3))[_0x980d('0x3d')](handleError(_0xaa9cd6,null));};exports[_0x980d('0x3e')]=function(_0x45831c,_0x1ad432){var _0x4d0220={'raw':!![],'where':{'id':_0x45831c['params']['id']}},_0x473c94={};_0x473c94[_0x980d('0x2f')]=_[_0x980d('0x3f')](db[_0x980d('0x2a')][_0x980d('0x40')]);_0x473c94[_0x980d('0x2d')]=_[_0x980d('0x3f')](_0x45831c[_0x980d('0x2d')]);_0x473c94[_0x980d('0x34')]=_['intersection'](_0x473c94['model'],_0x473c94[_0x980d('0x2d')]);_0x4d0220[_0x980d('0x31')]=_[_0x980d('0x2e')](_0x473c94[_0x980d('0x2f')],qs[_0x980d('0x30')](_0x45831c['query'][_0x980d('0x30')]));_0x4d0220[_0x980d('0x31')]=_0x4d0220['attributes'][_0x980d('0x32')]?_0x4d0220[_0x980d('0x31')]:_0x473c94[_0x980d('0x2f')];if(_0x45831c[_0x980d('0x2d')][_0x980d('0x41')]){_0x4d0220[_0x980d('0x3a')]=[{'all':!![]}];}_0x4d0220=_[_0x980d('0x38')]({},_0x4d0220,_0x45831c[_0x980d('0x39')]);return db[_0x980d('0x2a')]['find'](_0x4d0220)[_0x980d('0x21')](handleEntityNotFound(_0x1ad432,null))[_0x980d('0x21')](respondWithResult(_0x1ad432,null))[_0x980d('0x3d')](handleError(_0x1ad432,null));};exports[_0x980d('0x42')]=function(_0x2e18c6,_0x7d0acf){return db[_0x980d('0x2a')]['create'](_0x2e18c6[_0x980d('0x43')],{})['then'](function(_0x33c914){var _0x6e16c1=_0x2e18c6[_0x980d('0x44')][_0x980d('0x45')]({'plain':!![]});if(!_0x6e16c1)throw new Error(_0x980d('0x46'));if(_0x6e16c1['role']===_0x980d('0x44')){var _0x448b3c=_0x33c914[_0x980d('0x45')]({'plain':!![]});var _0x12c1ea=_0x980d('0x22');return db[_0x980d('0x47')][_0x980d('0x48')]({'where':{'name':_0x12c1ea,'userProfileId':_0x6e16c1['userProfileId']},'raw':!![]})['then'](function(_0x508663){if(_0x508663&&_0x508663['autoAssociation']===0x0){return db[_0x980d('0x23')][_0x980d('0x42')]({'name':_0x448b3c[_0x980d('0x27')],'resourceId':_0x448b3c['id'],'type':_0x508663[_0x980d('0x27')],'sectionId':_0x508663['id']},{})[_0x980d('0x21')](function(){return _0x33c914;});}else{return _0x33c914;}})[_0x980d('0x3d')](function(_0x5cd6a0){logger[_0x980d('0x25')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5cd6a0);throw _0x5cd6a0;});}return _0x33c914;})[_0x980d('0x21')](respondWithResult(_0x7d0acf,0xc9))[_0x980d('0x3d')](handleError(_0x7d0acf,null));};exports[_0x980d('0x49')]=function(_0x4656f4,_0x522b28){if(_0x4656f4['body']['id']){delete _0x4656f4[_0x980d('0x43')]['id'];}return db[_0x980d('0x2a')][_0x980d('0x48')]({'where':{'id':_0x4656f4['params']['id']}})['then'](handleEntityNotFound(_0x522b28,null))[_0x980d('0x21')](saveUpdates(_0x4656f4['body'],null))[_0x980d('0x21')](respondWithResult(_0x522b28,null))[_0x980d('0x3d')](handleError(_0x522b28,null));};exports[_0x980d('0x24')]=function(_0x15427b,_0x20459e){return db[_0x980d('0x2a')][_0x980d('0x48')]({'where':{'id':_0x15427b[_0x980d('0x4a')]['id']}})['then'](handleEntityNotFound(_0x20459e,null))['then'](removeEntity(_0x20459e,null))[_0x980d('0x3d')](handleError(_0x20459e,null));};
\ No newline at end of file
+var _0xf2cb=['../../config/license/util','../../mysqldb','sendStatus','status','offset','undefined','count','limit','set','Content-Range','json','apply','reject','save','then','destroy','get','Tags','UserProfileResource','end','error','name','send','index','map','Tag','rawAttributes','fieldName','type','key','query','keys','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','find','create','user','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','params','rimraf','fast-json-patch','moment','mustache','util','to-csv','ejs','fs-extra','lodash','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment'];(function(_0x15cdcb,_0x4340e9){var _0x37b069=function(_0x304cfb){while(--_0x304cfb){_0x15cdcb['push'](_0x15cdcb['shift']());}};_0x37b069(++_0x4340e9);}(_0xf2cb,0x130));var _0xbf2c=function(_0x351865,_0x595cbe){_0x351865=_0x351865-0x0;var _0x28e5ff=_0xf2cb[_0x351865];return _0x28e5ff;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xbf2c('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0xbf2c('0x1'));var rp=require('request-promise');var moment=require(_0xbf2c('0x2'));var BPromise=require('bluebird');var Mustache=require(_0xbf2c('0x3'));var util=require(_0xbf2c('0x4'));var path=require('path');var sox=require('sox');var csv=require(_0xbf2c('0x5'));var ejs=require(_0xbf2c('0x6'));var fs=require('fs');var fs_extra=require(_0xbf2c('0x7'));var _=require(_0xbf2c('0x8'));var squel=require('squel');var crypto=require(_0xbf2c('0x9'));var jsforce=require('jsforce');var deskjs=require(_0xbf2c('0xa'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0xbf2c('0xb'));var Redis=require(_0xbf2c('0xc'));var authService=require(_0xbf2c('0xd'));var qs=require('../../components/parsers/qs');var as=require(_0xbf2c('0xe'));var hardwareService=require(_0xbf2c('0xf'));var logger=require(_0xbf2c('0x10'))(_0xbf2c('0x11'));var utils=require(_0xbf2c('0x12'));var config=require(_0xbf2c('0x13'));var licenseUtil=require(_0xbf2c('0x14'));var db=require(_0xbf2c('0x15'))['db'];function respondWithStatusCode(_0x52983d,_0x149235){_0x149235=_0x149235||0xcc;return function(_0x294d0d){if(_0x294d0d){return _0x52983d[_0xbf2c('0x16')](_0x149235);}return _0x52983d[_0xbf2c('0x17')](_0x149235)['end']();};}function respondWithResult(_0x7665b1,_0x5a160b){_0x5a160b=_0x5a160b||0xc8;return function(_0x557740){if(_0x557740){return _0x7665b1[_0xbf2c('0x17')](_0x5a160b)['json'](_0x557740);}};}function respondWithFilteredResult(_0x47df49,_0x3ed1c3){return function(_0x45412){if(_0x45412){var _0x2dc80e=typeof _0x3ed1c3[_0xbf2c('0x18')]===_0xbf2c('0x19')&&typeof _0x3ed1c3['limit']===_0xbf2c('0x19');var _0x5514b0=_0x45412[_0xbf2c('0x1a')];var _0x1df2ab=_0x2dc80e?0x0:_0x3ed1c3[_0xbf2c('0x18')];var _0x32a44d=_0x2dc80e?_0x45412[_0xbf2c('0x1a')]:_0x3ed1c3['offset']+_0x3ed1c3[_0xbf2c('0x1b')];var _0x1fbfe8;if(_0x32a44d>=_0x5514b0){_0x32a44d=_0x5514b0;_0x1fbfe8=0xc8;}else{_0x1fbfe8=0xce;}_0x47df49[_0xbf2c('0x17')](_0x1fbfe8);return _0x47df49[_0xbf2c('0x1c')](_0xbf2c('0x1d'),_0x1df2ab+'-'+_0x32a44d+'/'+_0x5514b0)[_0xbf2c('0x1e')](_0x45412);}return null;};}function patchUpdates(_0x426724){return function(_0x58caa9){try{jsonpatch[_0xbf2c('0x1f')](_0x58caa9,_0x426724,!![]);}catch(_0x2a3adf){return BPromise[_0xbf2c('0x20')](_0x2a3adf);}return _0x58caa9[_0xbf2c('0x21')]();};}function saveUpdates(_0x57873c,_0x2bc2ad){return function(_0x1f5515){if(_0x1f5515){return _0x1f5515['update'](_0x57873c)[_0xbf2c('0x22')](function(_0x356f26){return _0x356f26;});}return null;};}function removeEntity(_0x3f1cdb,_0x52ecb4){return function(_0x5de1f2){if(_0x5de1f2){return _0x5de1f2[_0xbf2c('0x23')]()[_0xbf2c('0x22')](function(){var _0xae9c7=_0x5de1f2[_0xbf2c('0x24')]({'plain':!![]});var _0x108aa8=_0xbf2c('0x25');return db[_0xbf2c('0x26')]['destroy']({'where':{'type':_0x108aa8,'resourceId':_0xae9c7['id']}})['then'](function(){return _0x5de1f2;});})[_0xbf2c('0x22')](function(){_0x3f1cdb[_0xbf2c('0x17')](0xcc)[_0xbf2c('0x27')]();});}};}function handleEntityNotFound(_0x4314d6,_0x3ed68d){return function(_0x4a0257){if(!_0x4a0257){_0x4314d6[_0xbf2c('0x16')](0x194);}return _0x4a0257;};}function handleError(_0x2976fa,_0x1f7030){_0x1f7030=_0x1f7030||0x1f4;return function(_0x4f3191){logger[_0xbf2c('0x28')](_0x4f3191['stack']);if(_0x4f3191[_0xbf2c('0x29')]){delete _0x4f3191[_0xbf2c('0x29')];}_0x2976fa[_0xbf2c('0x17')](_0x1f7030)[_0xbf2c('0x2a')](_0x4f3191);};}exports[_0xbf2c('0x2b')]=function(_0x502943,_0x1e946c){var _0xef5fc9={},_0x132365={},_0x13e238={'count':0x0,'rows':[]};var _0x2cc8cb=_[_0xbf2c('0x2c')](db[_0xbf2c('0x2d')][_0xbf2c('0x2e')],function(_0x4d731d){return{'name':_0x4d731d[_0xbf2c('0x2f')],'type':_0x4d731d[_0xbf2c('0x30')][_0xbf2c('0x31')]};});_0x132365['model']=_['map'](_0x2cc8cb,_0xbf2c('0x29'));_0x132365[_0xbf2c('0x32')]=_[_0xbf2c('0x33')](_0x502943[_0xbf2c('0x32')]);_0x132365[_0xbf2c('0x34')]=_[_0xbf2c('0x35')](_0x132365[_0xbf2c('0x36')],_0x132365[_0xbf2c('0x32')]);_0xef5fc9[_0xbf2c('0x37')]=_['intersection'](_0x132365[_0xbf2c('0x36')],qs[_0xbf2c('0x38')](_0x502943[_0xbf2c('0x32')][_0xbf2c('0x38')]));_0xef5fc9[_0xbf2c('0x37')]=_0xef5fc9[_0xbf2c('0x37')][_0xbf2c('0x39')]?_0xef5fc9[_0xbf2c('0x37')]:_0x132365['model'];if(!_0x502943[_0xbf2c('0x32')][_0xbf2c('0x3a')](_0xbf2c('0x3b'))){_0xef5fc9['limit']=qs[_0xbf2c('0x1b')](_0x502943[_0xbf2c('0x32')][_0xbf2c('0x1b')]);_0xef5fc9['offset']=qs[_0xbf2c('0x18')](_0x502943[_0xbf2c('0x32')]['offset']);}_0xef5fc9['order']=qs['sort'](_0x502943['query']['sort']);_0xef5fc9[_0xbf2c('0x3c')]=qs[_0xbf2c('0x34')](_[_0xbf2c('0x3d')](_0x502943[_0xbf2c('0x32')],_0x132365[_0xbf2c('0x34')]),_0x2cc8cb);if(_0x502943[_0xbf2c('0x32')][_0xbf2c('0x3e')]){_0xef5fc9[_0xbf2c('0x3c')]=_[_0xbf2c('0x3f')](_0xef5fc9[_0xbf2c('0x3c')],{'$or':_[_0xbf2c('0x2c')](_0x2cc8cb,function(_0x99abc8){if(_0x99abc8[_0xbf2c('0x30')]!==_0xbf2c('0x40')){var _0x4776e0={};_0x4776e0[_0x99abc8[_0xbf2c('0x29')]]={'$like':'%'+_0x502943['query'][_0xbf2c('0x3e')]+'%'};return _0x4776e0;}})});}_0xef5fc9=_[_0xbf2c('0x3f')]({},_0xef5fc9,_0x502943[_0xbf2c('0x41')]);var _0x3379d2={'where':_0xef5fc9[_0xbf2c('0x3c')]};return db[_0xbf2c('0x2d')][_0xbf2c('0x1a')](_0x3379d2)[_0xbf2c('0x22')](function(_0x500e0b){_0x13e238[_0xbf2c('0x1a')]=_0x500e0b;if(_0x502943[_0xbf2c('0x32')][_0xbf2c('0x42')]){_0xef5fc9[_0xbf2c('0x43')]=[{'all':!![]}];}return db['Tag'][_0xbf2c('0x44')](_0xef5fc9);})['then'](function(_0x369bdc){_0x13e238[_0xbf2c('0x45')]=_0x369bdc;return _0x13e238;})[_0xbf2c('0x22')](respondWithFilteredResult(_0x1e946c,_0xef5fc9))[_0xbf2c('0x46')](handleError(_0x1e946c,null));};exports[_0xbf2c('0x47')]=function(_0x14107c,_0x4c2a1e){var _0x365710={'raw':!![],'where':{'id':_0x14107c['params']['id']}},_0x55c3d7={};_0x55c3d7[_0xbf2c('0x36')]=_['keys'](db['Tag'][_0xbf2c('0x2e')]);_0x55c3d7[_0xbf2c('0x32')]=_['keys'](_0x14107c[_0xbf2c('0x32')]);_0x55c3d7['filters']=_[_0xbf2c('0x35')](_0x55c3d7['model'],_0x55c3d7[_0xbf2c('0x32')]);_0x365710[_0xbf2c('0x37')]=_[_0xbf2c('0x35')](_0x55c3d7[_0xbf2c('0x36')],qs[_0xbf2c('0x38')](_0x14107c[_0xbf2c('0x32')]['fields']));_0x365710[_0xbf2c('0x37')]=_0x365710[_0xbf2c('0x37')][_0xbf2c('0x39')]?_0x365710[_0xbf2c('0x37')]:_0x55c3d7[_0xbf2c('0x36')];if(_0x14107c['query']['includeAll']){_0x365710[_0xbf2c('0x43')]=[{'all':!![]}];}_0x365710=_['merge']({},_0x365710,_0x14107c[_0xbf2c('0x41')]);return db[_0xbf2c('0x2d')][_0xbf2c('0x48')](_0x365710)[_0xbf2c('0x22')](handleEntityNotFound(_0x4c2a1e,null))[_0xbf2c('0x22')](respondWithResult(_0x4c2a1e,null))[_0xbf2c('0x46')](handleError(_0x4c2a1e,null));};exports[_0xbf2c('0x49')]=function(_0x1c3b78,_0x128e97){return db[_0xbf2c('0x2d')][_0xbf2c('0x49')](_0x1c3b78['body'],{})[_0xbf2c('0x22')](function(_0x22af02){var _0x90276=_0x1c3b78[_0xbf2c('0x4a')]['get']({'plain':!![]});if(!_0x90276)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x90276['role']===_0xbf2c('0x4a')){var _0x2451ba=_0x22af02['get']({'plain':!![]});var _0x5a0c37='Tags';return db[_0xbf2c('0x4b')][_0xbf2c('0x48')]({'where':{'name':_0x5a0c37,'userProfileId':_0x90276[_0xbf2c('0x4c')]},'raw':!![]})[_0xbf2c('0x22')](function(_0x3a8d9a){if(_0x3a8d9a&&_0x3a8d9a[_0xbf2c('0x4d')]===0x0){return db['UserProfileResource'][_0xbf2c('0x49')]({'name':_0x2451ba[_0xbf2c('0x29')],'resourceId':_0x2451ba['id'],'type':_0x3a8d9a[_0xbf2c('0x29')],'sectionId':_0x3a8d9a['id']},{})[_0xbf2c('0x22')](function(){return _0x22af02;});}else{return _0x22af02;}})[_0xbf2c('0x46')](function(_0x3166dd){logger[_0xbf2c('0x28')](_0xbf2c('0x4e'),_0x3166dd);throw _0x3166dd;});}return _0x22af02;})['then'](respondWithResult(_0x128e97,0xc9))['catch'](handleError(_0x128e97,null));};exports['update']=function(_0x3a62f9,_0x2b0ec3){if(_0x3a62f9[_0xbf2c('0x4f')]['id']){delete _0x3a62f9[_0xbf2c('0x4f')]['id'];}return db['Tag'][_0xbf2c('0x48')]({'where':{'id':_0x3a62f9[_0xbf2c('0x50')]['id']}})['then'](handleEntityNotFound(_0x2b0ec3,null))[_0xbf2c('0x22')](saveUpdates(_0x3a62f9[_0xbf2c('0x4f')],null))[_0xbf2c('0x22')](respondWithResult(_0x2b0ec3,null))['catch'](handleError(_0x2b0ec3,null));};exports['destroy']=function(_0x4b6253,_0x49cae6){return db[_0xbf2c('0x2d')][_0xbf2c('0x48')]({'where':{'id':_0x4b6253[_0xbf2c('0x50')]['id']}})[_0xbf2c('0x22')](handleEntityNotFound(_0x49cae6,null))[_0xbf2c('0x22')](removeEntity(_0x49cae6,null))['catch'](handleError(_0x49cae6,null));};
\ No newline at end of file
index 7a2e9b2..ab7a467 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe3e0=['request-promise','path','rimraf','../../config/environment','./tag.attributes','exports','define','util','../../config/logger','api','moment'];(function(_0x3a8bf8,_0x428e96){var _0x560481=function(_0xb2fd5a){while(--_0xb2fd5a){_0x3a8bf8['push'](_0x3a8bf8['shift']());}};_0x560481(++_0x428e96);}(_0xe3e0,0x188));var _0x0e3e=function(_0x541260,_0x4c7f2e){_0x541260=_0x541260-0x0;var _0x1dd2b5=_0xe3e0[_0x541260];return _0x1dd2b5;};'use strict';var _=require('lodash');var util=require(_0x0e3e('0x0'));var logger=require(_0x0e3e('0x1'))(_0x0e3e('0x2'));var moment=require(_0x0e3e('0x3'));var BPromise=require('bluebird');var rp=require(_0x0e3e('0x4'));var fs=require('fs');var path=require(_0x0e3e('0x5'));var rimraf=require(_0x0e3e('0x6'));var config=require(_0x0e3e('0x7'));var attributes=require(_0x0e3e('0x8'));module[_0x0e3e('0x9')]=function(_0x58bcb1,_0xd13c74){return _0x58bcb1[_0x0e3e('0xa')]('Tag',attributes,{'tableName':'tools_tags','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x433e=['moment','bluebird','request-promise','path','rimraf','../../config/environment','./tag.attributes','exports','define','Tag','tools_tags','lodash','util','../../config/logger','api'];(function(_0x810025,_0x34bb04){var _0x4dbc81=function(_0x2c3907){while(--_0x2c3907){_0x810025['push'](_0x810025['shift']());}};_0x4dbc81(++_0x34bb04);}(_0x433e,0xbf));var _0xe433=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x433e[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0xe433('0x0'));var util=require(_0xe433('0x1'));var logger=require(_0xe433('0x2'))(_0xe433('0x3'));var moment=require(_0xe433('0x4'));var BPromise=require(_0xe433('0x5'));var rp=require(_0xe433('0x6'));var fs=require('fs');var path=require(_0xe433('0x7'));var rimraf=require(_0xe433('0x8'));var config=require(_0xe433('0x9'));var attributes=require(_0xe433('0xa'));module[_0xe433('0xb')]=function(_0xa9ee0c,_0x299204){return _0xa9ee0c[_0xe433('0xc')](_0xe433('0xd'),attributes,{'tableName':_0xe433('0xe'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index a1ace6a..54905b9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7341=['debug','Tag,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','Tag,\x20%s,\x20%s','request\x20sent'];(function(_0x2c1463,_0x36d98e){var _0x44b7e2=function(_0x2f2a69){while(--_0x2f2a69){_0x2c1463['push'](_0x2c1463['shift']());}};_0x44b7e2(++_0x36d98e);}(_0x7341,0xe4));var _0x1734=function(_0x21abad,_0x491a65){_0x21abad=_0x21abad-0x0;var _0x58aa5a=_0x7341[_0x21abad];return _0x58aa5a;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x1734('0x0'));var BPromise=require('bluebird');var rs=require(_0x1734('0x1'));var fs=require('fs');var Redis=require(_0x1734('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0x1734('0x3'));var logger=require(_0x1734('0x4'))(_0x1734('0x5'));var config=require(_0x1734('0x6'));var jayson=require(_0x1734('0x7'));var client=jayson[_0x1734('0x8')][_0x1734('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x4c7349,_0x1ca30b,_0x2c223d){return new BPromise(function(_0x45c529,_0x5b8977){return client[_0x1734('0xa')](_0x4c7349,_0x2c223d)['then'](function(_0x56f0d5){logger[_0x1734('0xb')](_0x1734('0xc'),_0x1ca30b,_0x1734('0xd'));logger[_0x1734('0xe')](_0x1734('0xf'),_0x1ca30b,_0x1734('0xd'),JSON[_0x1734('0x10')](_0x56f0d5));if(_0x56f0d5[_0x1734('0x11')]){if(_0x56f0d5[_0x1734('0x11')][_0x1734('0x12')]===0x1f4){logger['error'](_0x1734('0xc'),_0x1ca30b,_0x56f0d5[_0x1734('0x11')][_0x1734('0x13')]);return _0x5b8977(_0x56f0d5[_0x1734('0x11')][_0x1734('0x13')]);}logger[_0x1734('0x11')](_0x1734('0xc'),_0x1ca30b,_0x56f0d5[_0x1734('0x11')][_0x1734('0x13')]);return _0x45c529(_0x56f0d5[_0x1734('0x11')][_0x1734('0x13')]);}else{logger[_0x1734('0xb')](_0x1734('0xc'),_0x1ca30b,_0x1734('0xd'));_0x45c529(_0x56f0d5[_0x1734('0x14')][_0x1734('0x13')]);}})[_0x1734('0x15')](function(_0x1ea188){logger[_0x1734('0x11')]('Tag,\x20%s,\x20%s',_0x1ca30b,_0x1ea188);_0x5b8977(_0x1ea188);});});}
\ No newline at end of file
+var _0xac9d=['bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','jayson/promise','client','http','then','info','Tag,\x20%s,\x20%s','request\x20sent','debug','Tag,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment'];(function(_0x174db5,_0xe9f757){var _0x45d5e5=function(_0x307a0f){while(--_0x307a0f){_0x174db5['push'](_0x174db5['shift']());}};_0x45d5e5(++_0xe9f757);}(_0xac9d,0x14d));var _0xdac9=function(_0x46390e,_0x39d20f){_0x46390e=_0x46390e-0x0;var _0x4db91c=_0xac9d[_0x46390e];return _0x4db91c;};'use strict';var _=require(_0xdac9('0x0'));var util=require(_0xdac9('0x1'));var moment=require(_0xdac9('0x2'));var BPromise=require(_0xdac9('0x3'));var rs=require(_0xdac9('0x4'));var fs=require('fs');var Redis=require(_0xdac9('0x5'));var db=require(_0xdac9('0x6'))['db'];var utils=require(_0xdac9('0x7'));var logger=require('../../config/logger')(_0xdac9('0x8'));var config=require('../../config/environment');var jayson=require(_0xdac9('0x9'));var client=jayson[_0xdac9('0xa')][_0xdac9('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x776b6c,_0x1c78c5,_0x39f560){return new BPromise(function(_0x5531af,_0x2b1d6f){return client['request'](_0x776b6c,_0x39f560)[_0xdac9('0xc')](function(_0x3a013b){logger[_0xdac9('0xd')](_0xdac9('0xe'),_0x1c78c5,_0xdac9('0xf'));logger[_0xdac9('0x10')](_0xdac9('0x11'),_0x1c78c5,_0xdac9('0xf'),JSON[_0xdac9('0x12')](_0x3a013b));if(_0x3a013b['error']){if(_0x3a013b[_0xdac9('0x13')][_0xdac9('0x14')]===0x1f4){logger['error'](_0xdac9('0xe'),_0x1c78c5,_0x3a013b[_0xdac9('0x13')][_0xdac9('0x15')]);return _0x2b1d6f(_0x3a013b['error'][_0xdac9('0x15')]);}logger[_0xdac9('0x13')](_0xdac9('0xe'),_0x1c78c5,_0x3a013b['error']['message']);return _0x5531af(_0x3a013b[_0xdac9('0x13')][_0xdac9('0x15')]);}else{logger['info'](_0xdac9('0xe'),_0x1c78c5,_0xdac9('0xf'));_0x5531af(_0x3a013b[_0xdac9('0x16')][_0xdac9('0x15')]);}})[_0xdac9('0x17')](function(_0x393acc){logger[_0xdac9('0x13')](_0xdac9('0xe'),_0x1c78c5,_0x393acc);_0x2b1d6f(_0x393acc);});});}
\ No newline at end of file
index fc56631..e3a9a27 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./team.controller','get','index','/:id','getQueues','/:id/users','isAuthenticated','getAgents','post','addQueues','addAgents','update','delete','removeAgents','multer','util','path'];(function(_0x53ccf2,_0x13cb67){var _0x5a2964=function(_0x3b0514){while(--_0x3b0514){_0x53ccf2['push'](_0x53ccf2['shift']());}};_0x5a2964(++_0x13cb67);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0xa9e0[_0x5b644e];return _0x49c6bf;};'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('0x8')]('/:id/queues',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')]('/',auth['isAuthenticated'](),controller['create']);router['post']('/:id/queues',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0xf')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x11')]);router['put'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x12')]);router[_0x0a9e('0x13')](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller['destroy']);router[_0x0a9e('0x13')]('/:id/queues',auth[_0x0a9e('0xd')](),controller['removeQueues']);router[_0x0a9e('0x13')](_0x0a9e('0xc'),auth['isAuthenticated'](),controller[_0x0a9e('0x14')]);module['exports']=router;
\ No newline at end of file
+var _0xa9e0=['Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./team.controller','get','index','/:id','getQueues','/:id/users','isAuthenticated','getAgents','post','addQueues','addAgents','update','delete','removeAgents','multer','util','path'];(function(_0x53ccf2,_0x13cb67){var _0x5a2964=function(_0x3b0514){while(--_0x3b0514){_0x53ccf2['push'](_0x53ccf2['shift']());}};_0x5a2964(++_0x13cb67);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5447fd,_0x52a6b5){_0x5447fd=_0x5447fd-0x0;var _0x15b28a=_0xa9e0[_0x5447fd];return _0x15b28a;};'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('0x8')]('/:id/queues',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0xf')]('/',auth['isAuthenticated'](),controller['create']);router['post']('/:id/queues',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0xf')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x11')]);router['put'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x12')]);router[_0x0a9e('0x13')](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller['destroy']);router[_0x0a9e('0x13')]('/:id/queues',auth[_0x0a9e('0xd')](),controller['removeQueues']);router[_0x0a9e('0x13')](_0x0a9e('0xc'),auth['isAuthenticated'](),controller[_0x0a9e('0x14')]);module['exports']=router;
\ No newline at end of file
index 6b5d5dd..218a9cb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd8b0=['exports','sequelize'];(function(_0x1e4b78,_0x105a91){var _0x5cbf43=function(_0x4446b7){while(--_0x4446b7){_0x1e4b78['push'](_0x1e4b78['shift']());}};_0x5cbf43(++_0x105a91);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var Sequelize=require(_0x0d8b('0x0'));module[_0x0d8b('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':'name'},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0xd8b0=['exports','sequelize'];(function(_0x5ddc22,_0x1cea5c){var _0x34f1cd=function(_0x456cba){while(--_0x456cba){_0x5ddc22['push'](_0x5ddc22['shift']());}};_0x34f1cd(++_0x1cea5c);}(_0xd8b0,0xad));var _0x0d8b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xd8b0[_0x122ef9];return _0x42fba0;};'use strict';var Sequelize=require(_0x0d8b('0x0'));module[_0x0d8b('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':'name'},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 1f195f6..7055cb4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x042d=['rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','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','../../mysqldb','defaults','redis','socket.io-emitter','register','sendStatus','status','json','limit','undefined','offset','count','Content-Range','apply','reject','update','then','stack','name','send','index','map','Team','rawAttributes','fieldName','type','key','model','keys','query','filters','intersection','attributes','fields','nolimit','order','sort','where','pick','filter','merge','options','include','findAll','rows','catch','show','params','length','includeAll','find','create','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Teams','UserProfileSection','userProfileId','autoAssociation','UserProfileResource','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','body','destroy','transaction','Sequelize','QueryTypes','UserId','SELECT\x20VoiceQueueId\x20FROM\x20team_has_voice_queues\x20WHERE\x20TeamId\x20=\x20','sequelize','SELECT','VoiceQueueId','UserVoiceQueue','SELECT\x20MailQueueId\x20FROM\x20team_has_mail_queues\x20WHERE\x20TeamId\x20=\x20','MailQueueId','SELECT\x20SmsQueueId\x20FROM\x20team_has_sms_queues\x20WHERE\x20TeamId\x20=\x20','SmsQueueId','UserSmsQueue','SELECT\x20ChatQueueId\x20FROM\x20team_has_chat_queues\x20WHERE\x20TeamId\x20=\x20','ChatQueueId','UserChatQueue','SELECT\x20FaxQueueId\x20FROM\x20team_has_fax_queues\x20WHERE\x20TeamId\x20=\x20','FaxQueueId','UserFaxQueue','SELECT\x20OpenchannelQueueId\x20FROM\x20team_has_openchannel_queues\x20WHERE\x20TeamId\x20=\x20','OpenchannelQueueId','UserOpenchannelQueue','SELECT\x20WhatsappQueueId\x20FROM\x20team_has_whatsapp_queues\x20WHERE\x20TeamId\x20=\x20','UserWhatsappQueue','UserVoicePrefix','VoicePrefixId','end','getQueues','channel','isValidChannel','ValidationError','Unknown\x20channel','Queue','capitalize','toLowerCase','Queues','addQueues','findOne','add','ids','addAgents','isArray','Voice','Chat','Mail','Sms','Fax','Whatsapp','through','QueueId','TeamVoiceQueue','emit','User','voicePause','interface','UserVoiceQueueRt','upsert','isNil','format','penalty','all','TeamVoicePrefix','spread','removeAgents','Queue:remove','getAgents','hasOwnProperty'];(function(_0x53afa6,_0x59e786){var _0x51f86a=function(_0x368385){while(--_0x368385){_0x53afa6['push'](_0x53afa6['shift']());}};_0x51f86a(++_0x59e786);}(_0x042d,0x9f));var _0xd042=function(_0x5341ff,_0x1de6df){_0x5341ff=_0x5341ff-0x0;var _0x53be58=_0x042d[_0x5341ff];return _0x53be58;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xd042('0x0'));var zipdir=require(_0xd042('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xd042('0x2'));var moment=require(_0xd042('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xd042('0x4'));var util=require(_0xd042('0x5'));var path=require(_0xd042('0x6'));var sox=require(_0xd042('0x7'));var csv=require(_0xd042('0x8'));var ejs=require(_0xd042('0x9'));var fs=require('fs');var fs_extra=require(_0xd042('0xa'));var _=require('lodash');var squel=require(_0xd042('0xb'));var crypto=require(_0xd042('0xc'));var jsforce=require('jsforce');var deskjs=require(_0xd042('0xd'));var toCsv=require(_0xd042('0x8'));var querystring=require(_0xd042('0xe'));var Papa=require(_0xd042('0xf'));var Redis=require(_0xd042('0x10'));var authService=require(_0xd042('0x11'));var qs=require(_0xd042('0x12'));var as=require(_0xd042('0x13'));var hardwareService=require(_0xd042('0x14'));var logger=require(_0xd042('0x15'))(_0xd042('0x16'));var utils=require(_0xd042('0x17'));var config=require(_0xd042('0x18'));var licenseUtil=require(_0xd042('0x19'));var db=require(_0xd042('0x1a'))['db'];config['redis']=_[_0xd042('0x1b')](config[_0xd042('0x1c')],{'host':'localhost','port':0x18eb});var socket=require(_0xd042('0x1d'))(new Redis(config[_0xd042('0x1c')]));require('./team.socket')[_0xd042('0x1e')](socket);function respondWithStatusCode(_0x4e3d48,_0x2655f2){_0x2655f2=_0x2655f2||0xcc;return function(_0x33da05){if(_0x33da05){return _0x4e3d48[_0xd042('0x1f')](_0x2655f2);}return _0x4e3d48[_0xd042('0x20')](_0x2655f2)['end']();};}function respondWithResult(_0x23978,_0x3f870a){_0x3f870a=_0x3f870a||0xc8;return function(_0x532181){if(_0x532181){return _0x23978[_0xd042('0x20')](_0x3f870a)[_0xd042('0x21')](_0x532181);}};}function respondWithFilteredResult(_0xf164dc,_0x48517e){return function(_0x4de700){if(_0x4de700){var _0x5bc922=typeof _0x48517e['offset']==='undefined'&&typeof _0x48517e[_0xd042('0x22')]===_0xd042('0x23');var _0x43b2a5=_0x4de700['count'];var _0x33fa79=_0x5bc922?0x0:_0x48517e[_0xd042('0x24')];var _0x2ac3ea=_0x5bc922?_0x4de700[_0xd042('0x25')]:_0x48517e[_0xd042('0x24')]+_0x48517e[_0xd042('0x22')];var _0x35234d;if(_0x2ac3ea>=_0x43b2a5){_0x2ac3ea=_0x43b2a5;_0x35234d=0xc8;}else{_0x35234d=0xce;}_0xf164dc[_0xd042('0x20')](_0x35234d);return _0xf164dc['set'](_0xd042('0x26'),_0x33fa79+'-'+_0x2ac3ea+'/'+_0x43b2a5)[_0xd042('0x21')](_0x4de700);}return null;};}function patchUpdates(_0x2349ea){return function(_0x172f8c){try{jsonpatch[_0xd042('0x27')](_0x172f8c,_0x2349ea,!![]);}catch(_0xc91418){return BPromise[_0xd042('0x28')](_0xc91418);}return _0x172f8c['save']();};}function saveUpdates(_0x55c0a8,_0x235da4){return function(_0x53351b){if(_0x53351b){return _0x53351b[_0xd042('0x29')](_0x55c0a8)[_0xd042('0x2a')](function(_0x2607f3){return _0x2607f3;});}return null;};}function handleEntityNotFound(_0x31be0b,_0x50634c){return function(_0x4d87f7){if(!_0x4d87f7){_0x31be0b[_0xd042('0x1f')](0x194);}return _0x4d87f7;};}function handleError(_0x524239,_0x1c1342){_0x1c1342=_0x1c1342||0x1f4;return function(_0x20fa33){logger['error'](_0x20fa33[_0xd042('0x2b')]);if(_0x20fa33[_0xd042('0x2c')]){delete _0x20fa33[_0xd042('0x2c')];}_0x524239['status'](_0x1c1342)[_0xd042('0x2d')](_0x20fa33);};}exports[_0xd042('0x2e')]=function(_0x72406f,_0x3bb29c){var _0x2aeb6d={},_0x423cc0={},_0x50036d={'count':0x0,'rows':[]};var _0x517bae=_[_0xd042('0x2f')](db[_0xd042('0x30')][_0xd042('0x31')],function(_0x3f0fe7){return{'name':_0x3f0fe7[_0xd042('0x32')],'type':_0x3f0fe7[_0xd042('0x33')][_0xd042('0x34')]};});_0x423cc0[_0xd042('0x35')]=_[_0xd042('0x2f')](_0x517bae,_0xd042('0x2c'));_0x423cc0['query']=_[_0xd042('0x36')](_0x72406f[_0xd042('0x37')]);_0x423cc0[_0xd042('0x38')]=_[_0xd042('0x39')](_0x423cc0[_0xd042('0x35')],_0x423cc0[_0xd042('0x37')]);_0x2aeb6d[_0xd042('0x3a')]=_[_0xd042('0x39')](_0x423cc0[_0xd042('0x35')],qs[_0xd042('0x3b')](_0x72406f[_0xd042('0x37')][_0xd042('0x3b')]));_0x2aeb6d['attributes']=_0x2aeb6d[_0xd042('0x3a')]['length']?_0x2aeb6d['attributes']:_0x423cc0['model'];if(!_0x72406f['query']['hasOwnProperty'](_0xd042('0x3c'))){_0x2aeb6d[_0xd042('0x22')]=qs[_0xd042('0x22')](_0x72406f[_0xd042('0x37')][_0xd042('0x22')]);_0x2aeb6d[_0xd042('0x24')]=qs['offset'](_0x72406f['query'][_0xd042('0x24')]);}_0x2aeb6d[_0xd042('0x3d')]=qs[_0xd042('0x3e')](_0x72406f[_0xd042('0x37')][_0xd042('0x3e')]);_0x2aeb6d[_0xd042('0x3f')]=qs[_0xd042('0x38')](_[_0xd042('0x40')](_0x72406f['query'],_0x423cc0[_0xd042('0x38')]),_0x517bae);if(_0x72406f[_0xd042('0x37')][_0xd042('0x41')]){_0x2aeb6d[_0xd042('0x3f')]=_[_0xd042('0x42')](_0x2aeb6d[_0xd042('0x3f')],{'$or':_['map'](_0x517bae,function(_0x3abf93){if(_0x3abf93[_0xd042('0x33')]!=='VIRTUAL'){var _0x2483b4={};_0x2483b4[_0x3abf93[_0xd042('0x2c')]]={'$like':'%'+_0x72406f['query'][_0xd042('0x41')]+'%'};return _0x2483b4;}})});}_0x2aeb6d=_['merge']({},_0x2aeb6d,_0x72406f[_0xd042('0x43')]);var _0x1f727e={'where':_0x2aeb6d['where']};return db['Team'][_0xd042('0x25')](_0x1f727e)[_0xd042('0x2a')](function(_0x29d762){_0x50036d['count']=_0x29d762;if(_0x72406f[_0xd042('0x37')]['includeAll']){_0x2aeb6d[_0xd042('0x44')]=[{'all':!![]}];}return db[_0xd042('0x30')][_0xd042('0x45')](_0x2aeb6d);})[_0xd042('0x2a')](function(_0x3e1c6b){_0x50036d[_0xd042('0x46')]=_0x3e1c6b;return _0x50036d;})[_0xd042('0x2a')](respondWithFilteredResult(_0x3bb29c,_0x2aeb6d))[_0xd042('0x47')](handleError(_0x3bb29c,null));};exports[_0xd042('0x48')]=function(_0x161940,_0x5d1014){var _0x2cc5e3={'raw':![],'where':{'id':_0x161940[_0xd042('0x49')]['id']}},_0x1f4a41={};_0x1f4a41[_0xd042('0x35')]=_['keys'](db[_0xd042('0x30')][_0xd042('0x31')]);_0x1f4a41[_0xd042('0x37')]=_[_0xd042('0x36')](_0x161940[_0xd042('0x37')]);_0x1f4a41['filters']=_[_0xd042('0x39')](_0x1f4a41[_0xd042('0x35')],_0x1f4a41['query']);_0x2cc5e3[_0xd042('0x3a')]=_[_0xd042('0x39')](_0x1f4a41['model'],qs['fields'](_0x161940['query'][_0xd042('0x3b')]));_0x2cc5e3[_0xd042('0x3a')]=_0x2cc5e3['attributes'][_0xd042('0x4a')]?_0x2cc5e3[_0xd042('0x3a')]:_0x1f4a41['model'];if(_0x161940[_0xd042('0x37')][_0xd042('0x4b')]){_0x2cc5e3['include']=[{'all':!![]}];}_0x2cc5e3=_[_0xd042('0x42')]({},_0x2cc5e3,_0x161940[_0xd042('0x43')]);return db[_0xd042('0x30')][_0xd042('0x4c')](_0x2cc5e3)[_0xd042('0x2a')](handleEntityNotFound(_0x5d1014,null))[_0xd042('0x2a')](respondWithResult(_0x5d1014,null))['catch'](handleError(_0x5d1014,null));};exports[_0xd042('0x4d')]=function(_0xa02965,_0x45d727){return db['Team'][_0xd042('0x4d')](_0xa02965['body'],{})[_0xd042('0x2a')](function(_0x7f5561){var _0x56683e=_0xa02965[_0xd042('0x4e')][_0xd042('0x4f')]({'plain':!![]});if(!_0x56683e)throw new Error(_0xd042('0x50'));if(_0x56683e[_0xd042('0x51')]===_0xd042('0x4e')){var _0x355b58=_0x7f5561[_0xd042('0x4f')]({'plain':!![]});var _0x5c55fb=_0xd042('0x52');return db[_0xd042('0x53')][_0xd042('0x4c')]({'where':{'name':_0x5c55fb,'userProfileId':_0x56683e[_0xd042('0x54')]},'raw':!![]})[_0xd042('0x2a')](function(_0x498449){if(_0x498449&&_0x498449[_0xd042('0x55')]===0x0){return db[_0xd042('0x56')][_0xd042('0x4d')]({'name':_0x355b58[_0xd042('0x2c')],'resourceId':_0x355b58['id'],'type':_0x498449[_0xd042('0x2c')],'sectionId':_0x498449['id']},{})['then'](function(){return _0x7f5561;});}else{return _0x7f5561;}})[_0xd042('0x47')](function(_0x431ee6){logger[_0xd042('0x57')](_0xd042('0x58'),_0x431ee6);throw _0x431ee6;});}return _0x7f5561;})[_0xd042('0x2a')](respondWithResult(_0x45d727,0xc9))[_0xd042('0x47')](handleError(_0x45d727,null));};exports[_0xd042('0x29')]=function(_0x20124e,_0x4ab464){if(_0x20124e[_0xd042('0x59')]['id']){delete _0x20124e[_0xd042('0x59')]['id'];}return db[_0xd042('0x30')][_0xd042('0x4c')]({'where':{'id':_0x20124e[_0xd042('0x49')]['id']}})['then'](handleEntityNotFound(_0x4ab464,null))[_0xd042('0x2a')](saveUpdates(_0x20124e[_0xd042('0x59')],null))['then'](respondWithResult(_0x4ab464,null))[_0xd042('0x47')](handleError(_0x4ab464,null));};exports[_0xd042('0x5a')]=function(_0x19b82e,_0x3da748){var _0x263149=_0x19b82e[_0xd042('0x49')]['id'];var _0x38bd34=[];return db['sequelize'][_0xd042('0x5b')](function(_0x46aa1c){var _0x3a6183='SELECT\x20UserId\x20FROM\x20user_has_teams\x20WHERE\x20TeamId\x20=\x20'+_0x263149;return db['sequelize'][_0xd042('0x37')](_0x3a6183,{'type':db[_0xd042('0x5c')][_0xd042('0x5d')]['SELECT'],'raw':!![],'transaction':_0x46aa1c})[_0xd042('0x2a')](function(_0x10c079){_0x38bd34=_[_0xd042('0x2f')](_0x10c079,function(_0x1cd785){return Number(_0x1cd785[_0xd042('0x5e')]);});})['then'](function(){var _0x339027=_0xd042('0x5f')+_0x263149;return db[_0xd042('0x60')][_0xd042('0x37')](_0x339027,{'type':db['Sequelize'][_0xd042('0x5d')][_0xd042('0x61')],'raw':!![],'transaction':_0x46aa1c});})[_0xd042('0x2a')](function(_0x194e93){var _0x96702c=_[_0xd042('0x2f')](_0x194e93,function(_0x186c13){return Number(_0x186c13[_0xd042('0x62')]);});return db[_0xd042('0x63')]['destroy']({'where':{'UserId':{'$in':_0x38bd34},'VoiceQueueId':{'$in':_0x96702c}},'transaction':_0x46aa1c});})[_0xd042('0x2a')](function(){var _0x45538e=_0xd042('0x64')+_0x263149;return db['sequelize'][_0xd042('0x37')](_0x45538e,{'type':db['Sequelize']['QueryTypes'][_0xd042('0x61')],'raw':!![],'transaction':_0x46aa1c});})[_0xd042('0x2a')](function(_0x32ab03){var _0x527943=_[_0xd042('0x2f')](_0x32ab03,function(_0x1ffc3e){return Number(_0x1ffc3e[_0xd042('0x65')]);});return db['UserMailQueue']['destroy']({'where':{'UserId':{'$in':_0x38bd34},'MailQueueId':{'$in':_0x527943}},'transaction':_0x46aa1c});})[_0xd042('0x2a')](function(){var _0x3137a0=_0xd042('0x66')+_0x263149;return db[_0xd042('0x60')][_0xd042('0x37')](_0x3137a0,{'type':db[_0xd042('0x5c')][_0xd042('0x5d')][_0xd042('0x61')],'raw':!![],'transaction':_0x46aa1c});})[_0xd042('0x2a')](function(_0x3bd9cc){var _0x487065=_[_0xd042('0x2f')](_0x3bd9cc,function(_0x2a816b){return Number(_0x2a816b[_0xd042('0x67')]);});return db[_0xd042('0x68')][_0xd042('0x5a')]({'where':{'UserId':{'$in':_0x38bd34},'SmsQueueId':{'$in':_0x487065}},'transaction':_0x46aa1c});})[_0xd042('0x2a')](function(){var _0x43a697=_0xd042('0x69')+_0x263149;return db[_0xd042('0x60')][_0xd042('0x37')](_0x43a697,{'type':db[_0xd042('0x5c')][_0xd042('0x5d')][_0xd042('0x61')],'raw':!![],'transaction':_0x46aa1c});})[_0xd042('0x2a')](function(_0x291821){var _0x46bbba=_[_0xd042('0x2f')](_0x291821,function(_0xb22f4c){return Number(_0xb22f4c[_0xd042('0x6a')]);});return db[_0xd042('0x6b')][_0xd042('0x5a')]({'where':{'UserId':{'$in':_0x38bd34},'ChatQueueId':{'$in':_0x46bbba}},'transaction':_0x46aa1c});})[_0xd042('0x2a')](function(){var _0xf49807=_0xd042('0x6c')+_0x263149;return db[_0xd042('0x60')][_0xd042('0x37')](_0xf49807,{'type':db['Sequelize'][_0xd042('0x5d')][_0xd042('0x61')],'raw':!![],'transaction':_0x46aa1c});})[_0xd042('0x2a')](function(_0x5dfb06){var _0x2a1aba=_['map'](_0x5dfb06,function(_0x19b0b5){return Number(_0x19b0b5[_0xd042('0x6d')]);});return db[_0xd042('0x6e')][_0xd042('0x5a')]({'where':{'UserId':{'$in':_0x38bd34},'FaxQueueId':{'$in':_0x2a1aba}},'transaction':_0x46aa1c});})['then'](function(){var _0x3c5765=_0xd042('0x6f')+_0x263149;return db[_0xd042('0x60')][_0xd042('0x37')](_0x3c5765,{'type':db[_0xd042('0x5c')][_0xd042('0x5d')][_0xd042('0x61')],'raw':!![],'transaction':_0x46aa1c});})['then'](function(_0x25dc03){var _0x5554b7=_['map'](_0x25dc03,function(_0x397c59){return Number(_0x397c59[_0xd042('0x70')]);});return db[_0xd042('0x71')][_0xd042('0x5a')]({'where':{'UserId':{'$in':_0x38bd34},'OpenchannelQueueId':{'$in':_0x5554b7}},'transaction':_0x46aa1c});})[_0xd042('0x2a')](function(){var _0x2bda4a=_0xd042('0x72')+_0x263149;return db[_0xd042('0x60')][_0xd042('0x37')](_0x2bda4a,{'type':db[_0xd042('0x5c')][_0xd042('0x5d')][_0xd042('0x61')],'raw':!![],'transaction':_0x46aa1c});})[_0xd042('0x2a')](function(_0x728399){var _0x2b9cc5=_['map'](_0x728399,function(_0x2f0531){return Number(_0x2f0531['WhatsappQueueId']);});return db[_0xd042('0x73')][_0xd042('0x5a')]({'where':{'UserId':{'$in':_0x38bd34},'WhatsappQueueId':{'$in':_0x2b9cc5}},'transaction':_0x46aa1c});})[_0xd042('0x2a')](function(){return db['TeamVoicePrefix'][_0xd042('0x4c')]({'where':{'TeamId':_0x263149}});})['then'](function(_0x5a0024){if(_0x5a0024===null){return;}return db[_0xd042('0x74')][_0xd042('0x5a')]({'where':{'UserId':{'$in':_0x38bd34},'VoicePrefixId':_0x5a0024[_0xd042('0x75')]},'transaction':_0x46aa1c});})[_0xd042('0x2a')](function(){return db[_0xd042('0x30')][_0xd042('0x5a')]({'where':{'id':_0x263149},'cascade':!![],'transaction':_0x46aa1c});})[_0xd042('0x2a')](function(_0x131be4){if(_0x131be4===0x0){_0x3da748[_0xd042('0x1f')](0x194);}else{return db[_0xd042('0x56')][_0xd042('0x5a')]({'where':{'type':_0xd042('0x52'),'resourceId':_0x263149},'cascade':!![],'transaction':_0x46aa1c})[_0xd042('0x2a')](function(){_0x3da748[_0xd042('0x20')](0xcc)[_0xd042('0x76')]();});}})[_0xd042('0x47')](function(_0x24783e){_0x3da748[_0xd042('0x20')](0x1f4)[_0xd042('0x2d')](_0x24783e);});});};exports[_0xd042('0x77')]=function(_0x4a4b39,_0xc6a1d,_0x290440){return db[_0xd042('0x30')]['findOne']({'where':{'id':_0x4a4b39[_0xd042('0x49')]['id']}})[_0xd042('0x2a')](handleEntityNotFound(_0xc6a1d,null))[_0xd042('0x2a')](function(_0x4c7a07){if(!_0x4a4b39['query'][_0xd042('0x78')]||!utils[_0xd042('0x79')](_0x4a4b39[_0xd042('0x37')][_0xd042('0x78')])){throw new db[(_0xd042('0x5c'))][(_0xd042('0x7a'))](_0xd042('0x7b'));}var _0x3ec112={};var _0x4b76e6={};_0x4b76e6[_0xd042('0x35')]=_[_0xd042('0x36')](db[_['capitalize'](_0x4a4b39[_0xd042('0x37')][_0xd042('0x78')]['toLowerCase']())+_0xd042('0x7c')][_0xd042('0x31')]);_0x4b76e6['query']=_[_0xd042('0x36')](_0x4a4b39[_0xd042('0x37')]);_0x4b76e6[_0xd042('0x38')]=_[_0xd042('0x39')](_0x4b76e6[_0xd042('0x35')],_0x4b76e6['query']);_0x3ec112[_0xd042('0x3a')]=_['intersection'](_0x4b76e6[_0xd042('0x35')],qs['fields'](_0x4a4b39['query'][_0xd042('0x3b')]));_0x3ec112[_0xd042('0x3a')]=_0x3ec112[_0xd042('0x3a')][_0xd042('0x4a')]?_0x3ec112[_0xd042('0x3a')]:_0x4b76e6[_0xd042('0x35')];_0x3ec112['limit']=qs['limit'](_0x4a4b39['query'][_0xd042('0x22')]);_0x3ec112[_0xd042('0x24')]=qs[_0xd042('0x24')](_0x4a4b39[_0xd042('0x37')][_0xd042('0x24')]);_0x3ec112['order']=qs[_0xd042('0x3e')](_0x4a4b39[_0xd042('0x37')][_0xd042('0x3e')]);_0x3ec112[_0xd042('0x3f')]=qs[_0xd042('0x38')](_[_0xd042('0x40')](_0x4a4b39[_0xd042('0x37')],_0x4b76e6[_0xd042('0x38')]));_0x3ec112=_[_0xd042('0x42')]({},_0x3ec112,_0x4a4b39[_0xd042('0x43')]);return _0x4c7a07[_0xd042('0x4f')+_[_0xd042('0x7d')](_0x4a4b39[_0xd042('0x37')][_0xd042('0x78')][_0xd042('0x7e')]())+_0xd042('0x7f')](_0x3ec112);})[_0xd042('0x2a')](respondWithResult(_0xc6a1d,null))['catch'](handleError(_0xc6a1d,null));};exports[_0xd042('0x80')]=function(_0x1092f8,_0x349cc7,_0x261563){return db[_0xd042('0x30')][_0xd042('0x81')]({'where':{'id':_0x1092f8['params']['id']}})[_0xd042('0x2a')](function(_0x260b54){if(_0x260b54){if(!_0x1092f8[_0xd042('0x59')][_0xd042('0x78')]||!utils[_0xd042('0x79')](_0x1092f8['body'][_0xd042('0x78')])){throw new db['Sequelize'][(_0xd042('0x7a'))]('Unknown\x20channel');}return _0x260b54[_0xd042('0x82')+_[_0xd042('0x7d')](_0x1092f8[_0xd042('0x59')][_0xd042('0x78')]['toLowerCase']())+_0xd042('0x7f')](_0x1092f8[_0xd042('0x59')][_0xd042('0x83')]);}return null;})[_0xd042('0x2a')](handleEntityNotFound(_0x349cc7,null))[_0xd042('0x2a')](respondWithStatusCode(_0x349cc7,null))[_0xd042('0x47')](handleError(_0x349cc7,null));};exports['removeQueues']=function(_0x294e74,_0x1691bd,_0x579afb){return db[_0xd042('0x30')]['findOne']({'where':{'id':_0x294e74[_0xd042('0x49')]['id']}})[_0xd042('0x2a')](function(_0x12b765){if(_0x12b765){if(!_0x294e74[_0xd042('0x37')][_0xd042('0x78')]||!utils[_0xd042('0x79')](_0x294e74['query']['channel'])){throw new db['Sequelize']['ValidationError'](_0xd042('0x7b'));}return _0x12b765['remove'+_[_0xd042('0x7d')](_0x294e74[_0xd042('0x37')][_0xd042('0x78')][_0xd042('0x7e')]())+_0xd042('0x7f')](_0x294e74[_0xd042('0x37')][_0xd042('0x83')]);}return null;})['then'](handleEntityNotFound(_0x1691bd,null))[_0xd042('0x2a')](respondWithStatusCode(_0x1691bd,null))[_0xd042('0x47')](handleError(_0x1691bd,null));};exports[_0xd042('0x84')]=function(_0x55e068,_0x31aa46){var _0x149e8a=_[_0xd042('0x85')](_0x55e068[_0xd042('0x59')][_0xd042('0x83')])?_0x55e068[_0xd042('0x59')][_0xd042('0x83')]:[_0x55e068[_0xd042('0x59')]['ids']];var _0x1248a2=_0x55e068[_0xd042('0x49')]['id'];return db[_0xd042('0x30')][_0xd042('0x4c')]({'where':{'id':_0x1248a2}})['then'](handleEntityNotFound(_0x31aa46,null))[_0xd042('0x2a')](function(_0x3a32e8){if(_0x3a32e8){var _0x466f97=[_0xd042('0x86'),_0xd042('0x87'),_0xd042('0x88'),_0xd042('0x89'),_0xd042('0x8a'),'Openchannel',_0xd042('0x8b')];return db['sequelize'][_0xd042('0x5b')](function(_0x14b084){var _0x23d1fe=_['map'](_0x466f97,function(_0x9c2f9e){var _0x442a80={'attributes':['id',_0xd042('0x2c')]};if(_0x9c2f9e==='Voice'){_0x442a80[_0xd042('0x8c')]={'attributes':['penalty']};}return _0x3a32e8[_0xd042('0x4f')+_0x9c2f9e+_0xd042('0x7f')](_0x442a80)['then'](function(_0xdc8821){var _0x20f0ee=_['map'](_0xdc8821,function(_0x3a8b8c){var _0x123988=_[_0xd042('0x2f')](_0x149e8a,function(_0x26cbda){var _0x33522e={'where':{'UserId':_0x26cbda,[_0x9c2f9e+_0xd042('0x8d')]:_0x3a8b8c['id']},'transaction':_0x14b084};if(_0x9c2f9e==='Voice'){_0x33522e['defaults']={'penalty':_0x3a8b8c[_0xd042('0x8e')]['penalty']};}return db['User'+_0x9c2f9e+_0xd042('0x7c')]['findOrCreate'](_0x33522e)[_0xd042('0x2a')](function(){socket[_0xd042('0x8f')](_0xd042('0x4e')+_0x9c2f9e+'Queue:save',{'UserId':_0x26cbda,[_0x9c2f9e+_0xd042('0x8d')]:_0x3a8b8c['id']});if(_0x9c2f9e!==_0xd042('0x86')){return;}return db[_0xd042('0x90')][_0xd042('0x45')]({'where':{'id':_0x149e8a,'online':0x1},'attributes':['id',_0xd042('0x2c'),'online',_0xd042('0x91'),_0xd042('0x92')],'raw':!![]})[_0xd042('0x2a')](function(_0x2e4c77){var _0x118eaa=_[_0xd042('0x2f')](_0x2e4c77,function(_0x5a0348){return db[_0xd042('0x93')][_0xd042('0x94')]({'membername':_0x5a0348['name'],'UserId':_0x5a0348['id'],'queue_name':_0x3a8b8c[_0xd042('0x2c')],'VoiceQueueId':_0x3a8b8c['id'],'interface':_[_0xd042('0x95')](_0x5a0348[_0xd042('0x92')])?util[_0xd042('0x96')]('SIP/%s',_0x5a0348[_0xd042('0x2c')]):_0x5a0348[_0xd042('0x92')],'paused':_0x5a0348[_0xd042('0x91')]||![],'penalty':_0x3a8b8c['TeamVoiceQueue'][_0xd042('0x97')]},{'transaction':_0x14b084});});return Promise[_0xd042('0x98')](_0x118eaa);});});});return Promise[_0xd042('0x98')](_0x123988);});return Promise[_0xd042('0x98')](_0x20f0ee);})[_0xd042('0x2a')](function(){return db[_0xd042('0x99')][_0xd042('0x81')]({'where':{'teamId':_0x1248a2}})[_0xd042('0x2a')](function(_0x22ca26){if(_0x22ca26){var _0x2b3fb8=_[_0xd042('0x2f')](_0x149e8a,function(_0x27a7bc){db[_0xd042('0x74')][_0xd042('0x94')]({'UserId':_0x27a7bc,'VoicePrefixId':_0x22ca26[_0xd042('0x75')]});});return Promise[_0xd042('0x98')](_0x2b3fb8);}});});});return Promise['all'](_0x23d1fe)['then'](function(){return _0x3a32e8[_0xd042('0x84')](_0x149e8a,{'transaction':_0x14b084})[_0xd042('0x9a')](function(_0xbf6d6){return _0xbf6d6;});});});}})[_0xd042('0x2a')](respondWithResult(_0x31aa46,null))[_0xd042('0x47')](handleError(_0x31aa46,null));};exports[_0xd042('0x9b')]=function(_0x277bf7,_0x5192c8){var _0x7b11c2=_[_0xd042('0x85')](_0x277bf7[_0xd042('0x37')][_0xd042('0x83')])?_0x277bf7['query']['ids']:[_0x277bf7[_0xd042('0x37')][_0xd042('0x83')]];var _0x132e8d=_0x277bf7['params']['id'];return db[_0xd042('0x30')]['find']({'where':{'id':_0x132e8d}})['then'](handleEntityNotFound(_0x5192c8,null))[_0xd042('0x2a')](function(_0x4aeafd){if(_0x4aeafd){var _0x1a0d75=[_0xd042('0x86'),_0xd042('0x87'),_0xd042('0x88'),'Sms',_0xd042('0x8a'),'Openchannel','Whatsapp'];return db[_0xd042('0x60')][_0xd042('0x5b')](function(_0x2361d2){var _0x186797=_[_0xd042('0x2f')](_0x1a0d75,function(_0x570677){var _0x1c5497={'attributes':['id',_0xd042('0x2c')]};return _0x4aeafd['get'+_0x570677+_0xd042('0x7f')](_0x1c5497)[_0xd042('0x2a')](function(_0x29aaa0){var _0x2232ef=_[_0xd042('0x2f')](_0x29aaa0,function(_0x3c7b34){return _0x3c7b34['removeAgents'](_0x7b11c2,{'transaction':_0x2361d2})[_0xd042('0x2a')](function(){var _0x5c020e=_[_0xd042('0x2f')](_0x7b11c2,function(_0x96da50){socket[_0xd042('0x8f')]('user'+_0x570677+_0xd042('0x9c'),{'UserId':Number(_0x96da50),[_0x570677+_0xd042('0x8d')]:_0x3c7b34['id']});if(_0x570677!==_0xd042('0x86')){return;}return db[_0xd042('0x93')][_0xd042('0x5a')]({'where':{'VoiceQueueId':_0x3c7b34['id'],'UserId':_0x96da50},'transaction':_0x2361d2});});return Promise['all'](_0x5c020e);});});return Promise[_0xd042('0x98')](_0x2232ef);});});return Promise['all'](_0x186797)[_0xd042('0x2a')](function(){return _0x4aeafd[_0xd042('0x9b')](_0x7b11c2,{'transaction':_0x2361d2});})[_0xd042('0x2a')](function(){return db['TeamVoicePrefix'][_0xd042('0x81')]({'where':{'teamId':_0x132e8d}})[_0xd042('0x2a')](function(_0x3ef778){if(_0x3ef778){var _0x3952d5=_[_0xd042('0x2f')](_0x7b11c2,function(_0x14f143){db[_0xd042('0x74')]['destroy']({'where':{'UserId':_0x14f143,'VoicePrefixId':_0x3ef778[_0xd042('0x75')]}});});return Promise['all'](_0x3952d5);}});});});}})['then'](respondWithStatusCode(_0x5192c8,null))[_0xd042('0x47')](handleError(_0x5192c8,null));};exports['getAgents']=function(_0x2e1847,_0x43136a,_0x2e1714){var _0x5cd4c0={};var _0x34ee5a={};var _0x550a6f;var _0x46ed41;return db[_0xd042('0x30')][_0xd042('0x81')]({'where':{'id':_0x2e1847['params']['id']}})[_0xd042('0x2a')](handleEntityNotFound(_0x43136a,null))[_0xd042('0x2a')](function(_0x1345d3){if(_0x1345d3){_0x550a6f=_0x1345d3;_0x34ee5a['model']=_[_0xd042('0x36')](db[_0xd042('0x90')]['rawAttributes']);_0x34ee5a[_0xd042('0x37')]=_[_0xd042('0x36')](_0x2e1847['query']);_0x34ee5a[_0xd042('0x38')]=_[_0xd042('0x39')](_0x34ee5a['model'],_0x34ee5a['query']);_0x5cd4c0[_0xd042('0x3a')]=_['intersection'](_0x34ee5a[_0xd042('0x35')],qs[_0xd042('0x3b')](_0x2e1847[_0xd042('0x37')][_0xd042('0x3b')]));_0x5cd4c0[_0xd042('0x3a')]=_0x5cd4c0[_0xd042('0x3a')][_0xd042('0x4a')]?_0x5cd4c0[_0xd042('0x3a')]:_0x34ee5a[_0xd042('0x35')];_0x5cd4c0[_0xd042('0x3d')]=qs[_0xd042('0x3e')](_0x2e1847[_0xd042('0x37')]['sort']);_0x5cd4c0[_0xd042('0x3f')]=qs[_0xd042('0x38')](_[_0xd042('0x40')](_0x2e1847[_0xd042('0x37')],_0x34ee5a[_0xd042('0x38')]));if(_0x2e1847[_0xd042('0x37')]['filter']){_0x5cd4c0[_0xd042('0x3f')]=_[_0xd042('0x42')](_0x5cd4c0[_0xd042('0x3f')],{'$or':_[_0xd042('0x2f')](_0x5cd4c0[_0xd042('0x3a')],function(_0x4d597b){var _0x290510={};_0x290510[_0x4d597b]={'$like':'%'+_0x2e1847['query'][_0xd042('0x41')]+'%'};return _0x290510;})});}_0x5cd4c0=_['merge']({},_0x5cd4c0,_0x2e1847['options']);return _0x550a6f[_0xd042('0x9d')](_0x5cd4c0);}})['then'](function(_0x34dd7a){if(_0x34dd7a){_0x46ed41=_0x34dd7a[_0xd042('0x4a')];if(!_0x2e1847[_0xd042('0x37')][_0xd042('0x9e')](_0xd042('0x3c'))){_0x5cd4c0[_0xd042('0x22')]=qs[_0xd042('0x22')](_0x2e1847[_0xd042('0x37')][_0xd042('0x22')]);_0x5cd4c0['offset']=qs[_0xd042('0x24')](_0x2e1847[_0xd042('0x37')]['offset']);}return _0x550a6f['getAgents'](_0x5cd4c0);}})[_0xd042('0x2a')](function(_0x5cc202){if(_0x5cc202){return _0x5cc202?{'count':_0x46ed41,'rows':_0x5cc202}:null;}})[_0xd042('0x2a')](respondWithResult(_0x43136a,null))[_0xd042('0x47')](handleError(_0x43136a,null));};
\ No newline at end of file
+var _0xc8e5=['upsert','VoicePrefixId','spread','removeAgents','isArray','Queue:remove','findOne','rawAttributes','getAgents','eml-format','rimraf','zip-dir','request-promise','moment','mustache','to-csv','ejs','fs-extra','lodash','squel','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','socket.io-emitter','./team.socket','register','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','then','error','name','send','map','Team','fieldName','type','query','keys','filters','attributes','fields','length','model','hasOwnProperty','nolimit','sort','where','filter','merge','VIRTUAL','options','includeAll','rows','show','intersection','find','create','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','autoAssociation','catch','body','params','destroy','sequelize','transaction','SELECT\x20UserId\x20FROM\x20user_has_teams\x20WHERE\x20TeamId\x20=\x20','Sequelize','SELECT','UserId','QueryTypes','VoiceQueueId','SELECT\x20MailQueueId\x20FROM\x20team_has_mail_queues\x20WHERE\x20TeamId\x20=\x20','UserMailQueue','SELECT\x20SmsQueueId\x20FROM\x20team_has_sms_queues\x20WHERE\x20TeamId\x20=\x20','SmsQueueId','UserSmsQueue','SELECT\x20ChatQueueId\x20FROM\x20team_has_chat_queues\x20WHERE\x20TeamId\x20=\x20','ChatQueueId','SELECT\x20FaxQueueId\x20FROM\x20team_has_fax_queues\x20WHERE\x20TeamId\x20=\x20','FaxQueueId','UserFaxQueue','SELECT\x20OpenchannelQueueId\x20FROM\x20team_has_openchannel_queues\x20WHERE\x20TeamId\x20=\x20','SELECT\x20WhatsappQueueId\x20FROM\x20team_has_whatsapp_queues\x20WHERE\x20TeamId\x20=\x20','WhatsappQueueId','UserWhatsappQueue','TeamVoicePrefix','UserVoicePrefix','UserProfileResource','Teams','getQueues','channel','toLowerCase','Queue','order','pick','capitalize','addQueues','isValidChannel','ValidationError','Unknown\x20channel','add','Queues','ids','removeQueues','addAgents','Voice','Chat','Mail','Sms','Fax','Openchannel','Whatsapp','through','penalty','QueueId','defaults','TeamVoiceQueue','User','findOrCreate','emit','Queue:save','online','voicePause','interface','UserVoiceQueueRt','format','SIP/%s','all'];(function(_0x88cd7b,_0x4c884c){var _0x56fcc8=function(_0x513b3d){while(--_0x513b3d){_0x88cd7b['push'](_0x88cd7b['shift']());}};_0x56fcc8(++_0x4c884c);}(_0xc8e5,0x137));var _0x5c8e=function(_0x4670a6,_0x3818ee){_0x4670a6=_0x4670a6-0x0;var _0xe6fcce=_0xc8e5[_0x4670a6];return _0xe6fcce;};'use strict';var emlformat=require(_0x5c8e('0x0'));var rimraf=require(_0x5c8e('0x1'));var zipdir=require(_0x5c8e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x5c8e('0x3'));var moment=require(_0x5c8e('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x5c8e('0x5'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0x5c8e('0x6'));var ejs=require(_0x5c8e('0x7'));var fs=require('fs');var fs_extra=require(_0x5c8e('0x8'));var _=require(_0x5c8e('0x9'));var squel=require(_0x5c8e('0xa'));var crypto=require('crypto');var jsforce=require(_0x5c8e('0xb'));var deskjs=require('desk.js');var toCsv=require(_0x5c8e('0x6'));var querystring=require(_0x5c8e('0xc'));var Papa=require(_0x5c8e('0xd'));var Redis=require(_0x5c8e('0xe'));var authService=require(_0x5c8e('0xf'));var qs=require(_0x5c8e('0x10'));var as=require(_0x5c8e('0x11'));var hardwareService=require(_0x5c8e('0x12'));var logger=require(_0x5c8e('0x13'))(_0x5c8e('0x14'));var utils=require(_0x5c8e('0x15'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];config['redis']=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x5c8e('0x16'))(new Redis(config['redis']));require(_0x5c8e('0x17'))[_0x5c8e('0x18')](socket);function respondWithStatusCode(_0x19f1d7,_0x1f2684){_0x1f2684=_0x1f2684||0xcc;return function(_0x185eaa){if(_0x185eaa){return _0x19f1d7[_0x5c8e('0x19')](_0x1f2684);}return _0x19f1d7[_0x5c8e('0x1a')](_0x1f2684)[_0x5c8e('0x1b')]();};}function respondWithResult(_0x3d7cb1,_0x2ea754){_0x2ea754=_0x2ea754||0xc8;return function(_0x1d0616){if(_0x1d0616){return _0x3d7cb1[_0x5c8e('0x1a')](_0x2ea754)[_0x5c8e('0x1c')](_0x1d0616);}};}function respondWithFilteredResult(_0x30a070,_0x5bb922){return function(_0x2d7867){if(_0x2d7867){var _0x54a68c=typeof _0x5bb922[_0x5c8e('0x1d')]===_0x5c8e('0x1e')&&typeof _0x5bb922[_0x5c8e('0x1f')]===_0x5c8e('0x1e');var _0x53d9a0=_0x2d7867[_0x5c8e('0x20')];var _0xd61ccf=_0x54a68c?0x0:_0x5bb922[_0x5c8e('0x1d')];var _0xaa5ef1=_0x54a68c?_0x2d7867['count']:_0x5bb922['offset']+_0x5bb922[_0x5c8e('0x1f')];var _0x5871de;if(_0xaa5ef1>=_0x53d9a0){_0xaa5ef1=_0x53d9a0;_0x5871de=0xc8;}else{_0x5871de=0xce;}_0x30a070['status'](_0x5871de);return _0x30a070['set'](_0x5c8e('0x21'),_0xd61ccf+'-'+_0xaa5ef1+'/'+_0x53d9a0)['json'](_0x2d7867);}return null;};}function patchUpdates(_0x32372a){return function(_0x2c6fc6){try{jsonpatch[_0x5c8e('0x22')](_0x2c6fc6,_0x32372a,!![]);}catch(_0x2acec3){return BPromise[_0x5c8e('0x23')](_0x2acec3);}return _0x2c6fc6[_0x5c8e('0x24')]();};}function saveUpdates(_0x159d9a,_0x4443b1){return function(_0x17dba4){if(_0x17dba4){return _0x17dba4[_0x5c8e('0x25')](_0x159d9a)[_0x5c8e('0x26')](function(_0x56eadd){return _0x56eadd;});}return null;};}function handleEntityNotFound(_0xd13962,_0x4b426f){return function(_0x3ffc7b){if(!_0x3ffc7b){_0xd13962[_0x5c8e('0x19')](0x194);}return _0x3ffc7b;};}function handleError(_0x3e5269,_0x54cb8a){_0x54cb8a=_0x54cb8a||0x1f4;return function(_0x4c23e8){logger[_0x5c8e('0x27')](_0x4c23e8['stack']);if(_0x4c23e8[_0x5c8e('0x28')]){delete _0x4c23e8[_0x5c8e('0x28')];}_0x3e5269[_0x5c8e('0x1a')](_0x54cb8a)[_0x5c8e('0x29')](_0x4c23e8);};}exports['index']=function(_0x1908f7,_0x2521b8){var _0x28306f={},_0x126319={},_0x19605f={'count':0x0,'rows':[]};var _0x28ca5a=_[_0x5c8e('0x2a')](db[_0x5c8e('0x2b')]['rawAttributes'],function(_0x13ad86){return{'name':_0x13ad86[_0x5c8e('0x2c')],'type':_0x13ad86[_0x5c8e('0x2d')]['key']};});_0x126319['model']=_[_0x5c8e('0x2a')](_0x28ca5a,_0x5c8e('0x28'));_0x126319[_0x5c8e('0x2e')]=_[_0x5c8e('0x2f')](_0x1908f7['query']);_0x126319[_0x5c8e('0x30')]=_['intersection'](_0x126319['model'],_0x126319[_0x5c8e('0x2e')]);_0x28306f[_0x5c8e('0x31')]=_['intersection'](_0x126319['model'],qs['fields'](_0x1908f7[_0x5c8e('0x2e')][_0x5c8e('0x32')]));_0x28306f[_0x5c8e('0x31')]=_0x28306f['attributes'][_0x5c8e('0x33')]?_0x28306f[_0x5c8e('0x31')]:_0x126319[_0x5c8e('0x34')];if(!_0x1908f7[_0x5c8e('0x2e')][_0x5c8e('0x35')](_0x5c8e('0x36'))){_0x28306f[_0x5c8e('0x1f')]=qs['limit'](_0x1908f7[_0x5c8e('0x2e')][_0x5c8e('0x1f')]);_0x28306f[_0x5c8e('0x1d')]=qs['offset'](_0x1908f7[_0x5c8e('0x2e')]['offset']);}_0x28306f['order']=qs['sort'](_0x1908f7[_0x5c8e('0x2e')][_0x5c8e('0x37')]);_0x28306f[_0x5c8e('0x38')]=qs[_0x5c8e('0x30')](_['pick'](_0x1908f7[_0x5c8e('0x2e')],_0x126319[_0x5c8e('0x30')]),_0x28ca5a);if(_0x1908f7[_0x5c8e('0x2e')][_0x5c8e('0x39')]){_0x28306f[_0x5c8e('0x38')]=_[_0x5c8e('0x3a')](_0x28306f[_0x5c8e('0x38')],{'$or':_['map'](_0x28ca5a,function(_0x29a675){if(_0x29a675['type']!==_0x5c8e('0x3b')){var _0x5792b0={};_0x5792b0[_0x29a675[_0x5c8e('0x28')]]={'$like':'%'+_0x1908f7[_0x5c8e('0x2e')][_0x5c8e('0x39')]+'%'};return _0x5792b0;}})});}_0x28306f=_[_0x5c8e('0x3a')]({},_0x28306f,_0x1908f7[_0x5c8e('0x3c')]);var _0x3c5d3f={'where':_0x28306f[_0x5c8e('0x38')]};return db['Team'][_0x5c8e('0x20')](_0x3c5d3f)['then'](function(_0x46984b){_0x19605f['count']=_0x46984b;if(_0x1908f7[_0x5c8e('0x2e')][_0x5c8e('0x3d')]){_0x28306f['include']=[{'all':!![]}];}return db[_0x5c8e('0x2b')]['findAll'](_0x28306f);})[_0x5c8e('0x26')](function(_0x438263){_0x19605f[_0x5c8e('0x3e')]=_0x438263;return _0x19605f;})[_0x5c8e('0x26')](respondWithFilteredResult(_0x2521b8,_0x28306f))['catch'](handleError(_0x2521b8,null));};exports[_0x5c8e('0x3f')]=function(_0x513a58,_0x34c1b0){var _0x21fd98={'raw':![],'where':{'id':_0x513a58['params']['id']}},_0xeeb0a0={};_0xeeb0a0[_0x5c8e('0x34')]=_[_0x5c8e('0x2f')](db[_0x5c8e('0x2b')]['rawAttributes']);_0xeeb0a0[_0x5c8e('0x2e')]=_['keys'](_0x513a58[_0x5c8e('0x2e')]);_0xeeb0a0['filters']=_[_0x5c8e('0x40')](_0xeeb0a0['model'],_0xeeb0a0[_0x5c8e('0x2e')]);_0x21fd98[_0x5c8e('0x31')]=_['intersection'](_0xeeb0a0[_0x5c8e('0x34')],qs['fields'](_0x513a58[_0x5c8e('0x2e')][_0x5c8e('0x32')]));_0x21fd98[_0x5c8e('0x31')]=_0x21fd98[_0x5c8e('0x31')]['length']?_0x21fd98[_0x5c8e('0x31')]:_0xeeb0a0['model'];if(_0x513a58['query'][_0x5c8e('0x3d')]){_0x21fd98['include']=[{'all':!![]}];}_0x21fd98=_[_0x5c8e('0x3a')]({},_0x21fd98,_0x513a58[_0x5c8e('0x3c')]);return db['Team'][_0x5c8e('0x41')](_0x21fd98)[_0x5c8e('0x26')](handleEntityNotFound(_0x34c1b0,null))[_0x5c8e('0x26')](respondWithResult(_0x34c1b0,null))['catch'](handleError(_0x34c1b0,null));};exports['create']=function(_0x3d213a,_0x139f51){return db[_0x5c8e('0x2b')][_0x5c8e('0x42')](_0x3d213a['body'],{})[_0x5c8e('0x26')](function(_0x326c08){var _0x5d4118=_0x3d213a[_0x5c8e('0x43')][_0x5c8e('0x44')]({'plain':!![]});if(!_0x5d4118)throw new Error(_0x5c8e('0x45'));if(_0x5d4118[_0x5c8e('0x46')]===_0x5c8e('0x43')){var _0x5498c3=_0x326c08['get']({'plain':!![]});var _0x47b8f1='Teams';return db[_0x5c8e('0x47')][_0x5c8e('0x41')]({'where':{'name':_0x47b8f1,'userProfileId':_0x5d4118['userProfileId']},'raw':!![]})[_0x5c8e('0x26')](function(_0x4b4965){if(_0x4b4965&&_0x4b4965[_0x5c8e('0x48')]===0x0){return db['UserProfileResource'][_0x5c8e('0x42')]({'name':_0x5498c3[_0x5c8e('0x28')],'resourceId':_0x5498c3['id'],'type':_0x4b4965[_0x5c8e('0x28')],'sectionId':_0x4b4965['id']},{})[_0x5c8e('0x26')](function(){return _0x326c08;});}else{return _0x326c08;}})[_0x5c8e('0x49')](function(_0x1d8d5a){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x1d8d5a);throw _0x1d8d5a;});}return _0x326c08;})['then'](respondWithResult(_0x139f51,0xc9))['catch'](handleError(_0x139f51,null));};exports[_0x5c8e('0x25')]=function(_0x444fa0,_0x49d958){if(_0x444fa0[_0x5c8e('0x4a')]['id']){delete _0x444fa0['body']['id'];}return db[_0x5c8e('0x2b')][_0x5c8e('0x41')]({'where':{'id':_0x444fa0[_0x5c8e('0x4b')]['id']}})[_0x5c8e('0x26')](handleEntityNotFound(_0x49d958,null))[_0x5c8e('0x26')](saveUpdates(_0x444fa0[_0x5c8e('0x4a')],null))[_0x5c8e('0x26')](respondWithResult(_0x49d958,null))['catch'](handleError(_0x49d958,null));};exports[_0x5c8e('0x4c')]=function(_0x4b9fc9,_0x5f039c){var _0x37003d=_0x4b9fc9[_0x5c8e('0x4b')]['id'];var _0x21b747=[];return db[_0x5c8e('0x4d')][_0x5c8e('0x4e')](function(_0x271f8e){var _0x4793b8=_0x5c8e('0x4f')+_0x37003d;return db[_0x5c8e('0x4d')]['query'](_0x4793b8,{'type':db[_0x5c8e('0x50')]['QueryTypes'][_0x5c8e('0x51')],'raw':!![],'transaction':_0x271f8e})[_0x5c8e('0x26')](function(_0xdf88c2){_0x21b747=_['map'](_0xdf88c2,function(_0x363327){return Number(_0x363327[_0x5c8e('0x52')]);});})['then'](function(){var _0x2bee71='SELECT\x20VoiceQueueId\x20FROM\x20team_has_voice_queues\x20WHERE\x20TeamId\x20=\x20'+_0x37003d;return db[_0x5c8e('0x4d')][_0x5c8e('0x2e')](_0x2bee71,{'type':db[_0x5c8e('0x50')][_0x5c8e('0x53')][_0x5c8e('0x51')],'raw':!![],'transaction':_0x271f8e});})[_0x5c8e('0x26')](function(_0x49fdbd){var _0x40314c=_['map'](_0x49fdbd,function(_0x211877){return Number(_0x211877[_0x5c8e('0x54')]);});return db['UserVoiceQueue'][_0x5c8e('0x4c')]({'where':{'UserId':{'$in':_0x21b747},'VoiceQueueId':{'$in':_0x40314c}},'transaction':_0x271f8e});})[_0x5c8e('0x26')](function(){var _0x5e64d4=_0x5c8e('0x55')+_0x37003d;return db[_0x5c8e('0x4d')][_0x5c8e('0x2e')](_0x5e64d4,{'type':db[_0x5c8e('0x50')][_0x5c8e('0x53')][_0x5c8e('0x51')],'raw':!![],'transaction':_0x271f8e});})[_0x5c8e('0x26')](function(_0x1b9b80){var _0x56a1b9=_[_0x5c8e('0x2a')](_0x1b9b80,function(_0x455642){return Number(_0x455642['MailQueueId']);});return db[_0x5c8e('0x56')][_0x5c8e('0x4c')]({'where':{'UserId':{'$in':_0x21b747},'MailQueueId':{'$in':_0x56a1b9}},'transaction':_0x271f8e});})[_0x5c8e('0x26')](function(){var _0x12017d=_0x5c8e('0x57')+_0x37003d;return db[_0x5c8e('0x4d')][_0x5c8e('0x2e')](_0x12017d,{'type':db[_0x5c8e('0x50')][_0x5c8e('0x53')][_0x5c8e('0x51')],'raw':!![],'transaction':_0x271f8e});})[_0x5c8e('0x26')](function(_0x3bec98){var _0x1e10fa=_[_0x5c8e('0x2a')](_0x3bec98,function(_0x3465c0){return Number(_0x3465c0[_0x5c8e('0x58')]);});return db[_0x5c8e('0x59')][_0x5c8e('0x4c')]({'where':{'UserId':{'$in':_0x21b747},'SmsQueueId':{'$in':_0x1e10fa}},'transaction':_0x271f8e});})['then'](function(){var _0x3672cd=_0x5c8e('0x5a')+_0x37003d;return db[_0x5c8e('0x4d')][_0x5c8e('0x2e')](_0x3672cd,{'type':db[_0x5c8e('0x50')]['QueryTypes']['SELECT'],'raw':!![],'transaction':_0x271f8e});})[_0x5c8e('0x26')](function(_0x2e1f97){var _0x65dff9=_[_0x5c8e('0x2a')](_0x2e1f97,function(_0x5af33a){return Number(_0x5af33a[_0x5c8e('0x5b')]);});return db['UserChatQueue'][_0x5c8e('0x4c')]({'where':{'UserId':{'$in':_0x21b747},'ChatQueueId':{'$in':_0x65dff9}},'transaction':_0x271f8e});})[_0x5c8e('0x26')](function(){var _0x212fb0=_0x5c8e('0x5c')+_0x37003d;return db[_0x5c8e('0x4d')][_0x5c8e('0x2e')](_0x212fb0,{'type':db[_0x5c8e('0x50')][_0x5c8e('0x53')][_0x5c8e('0x51')],'raw':!![],'transaction':_0x271f8e});})[_0x5c8e('0x26')](function(_0x39d064){var _0x4e4c49=_[_0x5c8e('0x2a')](_0x39d064,function(_0x113087){return Number(_0x113087[_0x5c8e('0x5d')]);});return db[_0x5c8e('0x5e')]['destroy']({'where':{'UserId':{'$in':_0x21b747},'FaxQueueId':{'$in':_0x4e4c49}},'transaction':_0x271f8e});})[_0x5c8e('0x26')](function(){var _0x4419e5=_0x5c8e('0x5f')+_0x37003d;return db['sequelize'][_0x5c8e('0x2e')](_0x4419e5,{'type':db[_0x5c8e('0x50')][_0x5c8e('0x53')][_0x5c8e('0x51')],'raw':!![],'transaction':_0x271f8e});})[_0x5c8e('0x26')](function(_0x28af98){var _0x3d13fd=_[_0x5c8e('0x2a')](_0x28af98,function(_0x411389){return Number(_0x411389['OpenchannelQueueId']);});return db['UserOpenchannelQueue'][_0x5c8e('0x4c')]({'where':{'UserId':{'$in':_0x21b747},'OpenchannelQueueId':{'$in':_0x3d13fd}},'transaction':_0x271f8e});})[_0x5c8e('0x26')](function(){var _0x37c999=_0x5c8e('0x60')+_0x37003d;return db[_0x5c8e('0x4d')]['query'](_0x37c999,{'type':db['Sequelize'][_0x5c8e('0x53')][_0x5c8e('0x51')],'raw':!![],'transaction':_0x271f8e});})['then'](function(_0x1d1b46){var _0x5f5125=_['map'](_0x1d1b46,function(_0x2ced77){return Number(_0x2ced77[_0x5c8e('0x61')]);});return db[_0x5c8e('0x62')][_0x5c8e('0x4c')]({'where':{'UserId':{'$in':_0x21b747},'WhatsappQueueId':{'$in':_0x5f5125}},'transaction':_0x271f8e});})[_0x5c8e('0x26')](function(){return db[_0x5c8e('0x63')]['find']({'where':{'TeamId':_0x37003d}});})['then'](function(_0x2852ad){if(_0x2852ad===null){return;}return db[_0x5c8e('0x64')][_0x5c8e('0x4c')]({'where':{'UserId':{'$in':_0x21b747},'VoicePrefixId':_0x2852ad['VoicePrefixId']},'transaction':_0x271f8e});})[_0x5c8e('0x26')](function(){return db['Team']['destroy']({'where':{'id':_0x37003d},'cascade':!![],'transaction':_0x271f8e});})[_0x5c8e('0x26')](function(_0x2dc198){if(_0x2dc198===0x0){_0x5f039c['sendStatus'](0x194);}else{return db[_0x5c8e('0x65')][_0x5c8e('0x4c')]({'where':{'type':_0x5c8e('0x66'),'resourceId':_0x37003d},'cascade':!![],'transaction':_0x271f8e})[_0x5c8e('0x26')](function(){_0x5f039c[_0x5c8e('0x1a')](0xcc)[_0x5c8e('0x1b')]();});}})[_0x5c8e('0x49')](function(_0x37bfc3){_0x5f039c['status'](0x1f4)[_0x5c8e('0x29')](_0x37bfc3);});});};exports[_0x5c8e('0x67')]=function(_0x4d7745,_0x2ceb60,_0x54c351){return db[_0x5c8e('0x2b')]['findOne']({'where':{'id':_0x4d7745[_0x5c8e('0x4b')]['id']}})[_0x5c8e('0x26')](handleEntityNotFound(_0x2ceb60,null))['then'](function(_0x3265b4){if(!_0x4d7745[_0x5c8e('0x2e')][_0x5c8e('0x68')]||!utils['isValidChannel'](_0x4d7745[_0x5c8e('0x2e')][_0x5c8e('0x68')])){throw new db['Sequelize']['ValidationError']('Unknown\x20channel');}var _0x3e73a5={};var _0x3b00d0={};_0x3b00d0[_0x5c8e('0x34')]=_[_0x5c8e('0x2f')](db[_['capitalize'](_0x4d7745['query'][_0x5c8e('0x68')][_0x5c8e('0x69')]())+_0x5c8e('0x6a')]['rawAttributes']);_0x3b00d0[_0x5c8e('0x2e')]=_[_0x5c8e('0x2f')](_0x4d7745[_0x5c8e('0x2e')]);_0x3b00d0['filters']=_[_0x5c8e('0x40')](_0x3b00d0[_0x5c8e('0x34')],_0x3b00d0[_0x5c8e('0x2e')]);_0x3e73a5[_0x5c8e('0x31')]=_[_0x5c8e('0x40')](_0x3b00d0[_0x5c8e('0x34')],qs[_0x5c8e('0x32')](_0x4d7745['query']['fields']));_0x3e73a5[_0x5c8e('0x31')]=_0x3e73a5['attributes'][_0x5c8e('0x33')]?_0x3e73a5[_0x5c8e('0x31')]:_0x3b00d0['model'];_0x3e73a5[_0x5c8e('0x1f')]=qs['limit'](_0x4d7745['query']['limit']);_0x3e73a5[_0x5c8e('0x1d')]=qs[_0x5c8e('0x1d')](_0x4d7745[_0x5c8e('0x2e')][_0x5c8e('0x1d')]);_0x3e73a5[_0x5c8e('0x6b')]=qs[_0x5c8e('0x37')](_0x4d7745[_0x5c8e('0x2e')][_0x5c8e('0x37')]);_0x3e73a5[_0x5c8e('0x38')]=qs[_0x5c8e('0x30')](_[_0x5c8e('0x6c')](_0x4d7745[_0x5c8e('0x2e')],_0x3b00d0[_0x5c8e('0x30')]));_0x3e73a5=_[_0x5c8e('0x3a')]({},_0x3e73a5,_0x4d7745[_0x5c8e('0x3c')]);return _0x3265b4[_0x5c8e('0x44')+_[_0x5c8e('0x6d')](_0x4d7745[_0x5c8e('0x2e')][_0x5c8e('0x68')][_0x5c8e('0x69')]())+'Queues'](_0x3e73a5);})[_0x5c8e('0x26')](respondWithResult(_0x2ceb60,null))[_0x5c8e('0x49')](handleError(_0x2ceb60,null));};exports[_0x5c8e('0x6e')]=function(_0x4c536b,_0x20ca77,_0x4d94c6){return db[_0x5c8e('0x2b')]['findOne']({'where':{'id':_0x4c536b['params']['id']}})[_0x5c8e('0x26')](function(_0x2aa7c1){if(_0x2aa7c1){if(!_0x4c536b[_0x5c8e('0x4a')][_0x5c8e('0x68')]||!utils[_0x5c8e('0x6f')](_0x4c536b[_0x5c8e('0x4a')][_0x5c8e('0x68')])){throw new db[(_0x5c8e('0x50'))][(_0x5c8e('0x70'))](_0x5c8e('0x71'));}return _0x2aa7c1[_0x5c8e('0x72')+_[_0x5c8e('0x6d')](_0x4c536b[_0x5c8e('0x4a')][_0x5c8e('0x68')][_0x5c8e('0x69')]())+_0x5c8e('0x73')](_0x4c536b[_0x5c8e('0x4a')][_0x5c8e('0x74')]);}return null;})[_0x5c8e('0x26')](handleEntityNotFound(_0x20ca77,null))[_0x5c8e('0x26')](respondWithStatusCode(_0x20ca77,null))[_0x5c8e('0x49')](handleError(_0x20ca77,null));};exports[_0x5c8e('0x75')]=function(_0x123c79,_0x9de35d,_0x47db8a){return db[_0x5c8e('0x2b')]['findOne']({'where':{'id':_0x123c79[_0x5c8e('0x4b')]['id']}})[_0x5c8e('0x26')](function(_0x149437){if(_0x149437){if(!_0x123c79['query'][_0x5c8e('0x68')]||!utils['isValidChannel'](_0x123c79[_0x5c8e('0x2e')]['channel'])){throw new db['Sequelize']['ValidationError']('Unknown\x20channel');}return _0x149437['remove'+_[_0x5c8e('0x6d')](_0x123c79[_0x5c8e('0x2e')][_0x5c8e('0x68')][_0x5c8e('0x69')]())+_0x5c8e('0x73')](_0x123c79[_0x5c8e('0x2e')][_0x5c8e('0x74')]);}return null;})['then'](handleEntityNotFound(_0x9de35d,null))[_0x5c8e('0x26')](respondWithStatusCode(_0x9de35d,null))[_0x5c8e('0x49')](handleError(_0x9de35d,null));};exports[_0x5c8e('0x76')]=function(_0x3e4c19,_0xa1cf26){var _0x23058c=_['isArray'](_0x3e4c19[_0x5c8e('0x4a')][_0x5c8e('0x74')])?_0x3e4c19['body'][_0x5c8e('0x74')]:[_0x3e4c19[_0x5c8e('0x4a')]['ids']];var _0x119736=_0x3e4c19[_0x5c8e('0x4b')]['id'];return db[_0x5c8e('0x2b')]['find']({'where':{'id':_0x119736}})[_0x5c8e('0x26')](handleEntityNotFound(_0xa1cf26,null))['then'](function(_0x12073e){if(_0x12073e){var _0xde4290=[_0x5c8e('0x77'),_0x5c8e('0x78'),_0x5c8e('0x79'),_0x5c8e('0x7a'),_0x5c8e('0x7b'),_0x5c8e('0x7c'),_0x5c8e('0x7d')];return db[_0x5c8e('0x4d')]['transaction'](function(_0x5c2743){var _0x534c59=_[_0x5c8e('0x2a')](_0xde4290,function(_0x43377a){var _0x1d7496={'attributes':['id','name']};if(_0x43377a===_0x5c8e('0x77')){_0x1d7496[_0x5c8e('0x7e')]={'attributes':[_0x5c8e('0x7f')]};}return _0x12073e[_0x5c8e('0x44')+_0x43377a+_0x5c8e('0x73')](_0x1d7496)['then'](function(_0x5325a7){var _0x36d87b=_[_0x5c8e('0x2a')](_0x5325a7,function(_0x3a4b18){var _0x5857eb=_['map'](_0x23058c,function(_0xf5a1ec){var _0x2bb301={'where':{'UserId':_0xf5a1ec,[_0x43377a+_0x5c8e('0x80')]:_0x3a4b18['id']},'transaction':_0x5c2743};if(_0x43377a===_0x5c8e('0x77')){_0x2bb301[_0x5c8e('0x81')]={'penalty':_0x3a4b18[_0x5c8e('0x82')][_0x5c8e('0x7f')]};}return db[_0x5c8e('0x83')+_0x43377a+_0x5c8e('0x6a')][_0x5c8e('0x84')](_0x2bb301)['then'](function(){socket[_0x5c8e('0x85')](_0x5c8e('0x43')+_0x43377a+_0x5c8e('0x86'),{'UserId':_0xf5a1ec,[_0x43377a+'QueueId']:_0x3a4b18['id']});if(_0x43377a!==_0x5c8e('0x77')){return;}return db[_0x5c8e('0x83')]['findAll']({'where':{'id':_0x23058c,'online':0x1},'attributes':['id',_0x5c8e('0x28'),_0x5c8e('0x87'),_0x5c8e('0x88'),_0x5c8e('0x89')],'raw':!![]})['then'](function(_0x35519a){var _0x1534b1=_[_0x5c8e('0x2a')](_0x35519a,function(_0x5dff79){return db[_0x5c8e('0x8a')]['upsert']({'membername':_0x5dff79[_0x5c8e('0x28')],'UserId':_0x5dff79['id'],'queue_name':_0x3a4b18[_0x5c8e('0x28')],'VoiceQueueId':_0x3a4b18['id'],'interface':_['isNil'](_0x5dff79[_0x5c8e('0x89')])?util[_0x5c8e('0x8b')](_0x5c8e('0x8c'),_0x5dff79[_0x5c8e('0x28')]):_0x5dff79['interface'],'paused':_0x5dff79[_0x5c8e('0x88')]||![],'penalty':_0x3a4b18[_0x5c8e('0x82')]['penalty']},{'transaction':_0x5c2743});});return Promise[_0x5c8e('0x8d')](_0x1534b1);});});});return Promise[_0x5c8e('0x8d')](_0x5857eb);});return Promise[_0x5c8e('0x8d')](_0x36d87b);})[_0x5c8e('0x26')](function(){return db['TeamVoicePrefix']['findOne']({'where':{'teamId':_0x119736}})[_0x5c8e('0x26')](function(_0x60cc5c){if(_0x60cc5c){var _0x9de4c4=_[_0x5c8e('0x2a')](_0x23058c,function(_0x4dcd62){db[_0x5c8e('0x64')][_0x5c8e('0x8e')]({'UserId':_0x4dcd62,'VoicePrefixId':_0x60cc5c[_0x5c8e('0x8f')]});});return Promise[_0x5c8e('0x8d')](_0x9de4c4);}});});});return Promise[_0x5c8e('0x8d')](_0x534c59)['then'](function(){return _0x12073e[_0x5c8e('0x76')](_0x23058c,{'transaction':_0x5c2743})[_0x5c8e('0x90')](function(_0x376b00){return _0x376b00;});});});}})[_0x5c8e('0x26')](respondWithResult(_0xa1cf26,null))['catch'](handleError(_0xa1cf26,null));};exports[_0x5c8e('0x91')]=function(_0x5051a1,_0x51c9c5){var _0x425329=_[_0x5c8e('0x92')](_0x5051a1[_0x5c8e('0x2e')]['ids'])?_0x5051a1[_0x5c8e('0x2e')][_0x5c8e('0x74')]:[_0x5051a1[_0x5c8e('0x2e')]['ids']];var _0x156894=_0x5051a1['params']['id'];return db['Team'][_0x5c8e('0x41')]({'where':{'id':_0x156894}})['then'](handleEntityNotFound(_0x51c9c5,null))[_0x5c8e('0x26')](function(_0x3a9e04){if(_0x3a9e04){var _0x1eef6e=[_0x5c8e('0x77'),'Chat',_0x5c8e('0x79'),'Sms','Fax',_0x5c8e('0x7c'),_0x5c8e('0x7d')];return db['sequelize'][_0x5c8e('0x4e')](function(_0x1b5fe2){var _0x300b18=_[_0x5c8e('0x2a')](_0x1eef6e,function(_0x5cc564){var _0x45cd67={'attributes':['id',_0x5c8e('0x28')]};return _0x3a9e04['get'+_0x5cc564+'Queues'](_0x45cd67)[_0x5c8e('0x26')](function(_0x5e06ca){var _0x4af1a9=_[_0x5c8e('0x2a')](_0x5e06ca,function(_0x498339){return _0x498339['removeAgents'](_0x425329,{'transaction':_0x1b5fe2})[_0x5c8e('0x26')](function(){var _0xc7280b=_['map'](_0x425329,function(_0x5e9c69){socket[_0x5c8e('0x85')](_0x5c8e('0x43')+_0x5cc564+_0x5c8e('0x93'),{'UserId':Number(_0x5e9c69),[_0x5cc564+'QueueId']:_0x498339['id']});if(_0x5cc564!==_0x5c8e('0x77')){return;}return db['UserVoiceQueueRt'][_0x5c8e('0x4c')]({'where':{'VoiceQueueId':_0x498339['id'],'UserId':_0x5e9c69},'transaction':_0x1b5fe2});});return Promise['all'](_0xc7280b);});});return Promise[_0x5c8e('0x8d')](_0x4af1a9);});});return Promise[_0x5c8e('0x8d')](_0x300b18)['then'](function(){return _0x3a9e04[_0x5c8e('0x91')](_0x425329,{'transaction':_0x1b5fe2});})[_0x5c8e('0x26')](function(){return db[_0x5c8e('0x63')][_0x5c8e('0x94')]({'where':{'teamId':_0x156894}})[_0x5c8e('0x26')](function(_0x10a040){if(_0x10a040){var _0x6ec0eb=_[_0x5c8e('0x2a')](_0x425329,function(_0x220b26){db['UserVoicePrefix']['destroy']({'where':{'UserId':_0x220b26,'VoicePrefixId':_0x10a040[_0x5c8e('0x8f')]}});});return Promise[_0x5c8e('0x8d')](_0x6ec0eb);}});});});}})[_0x5c8e('0x26')](respondWithStatusCode(_0x51c9c5,null))[_0x5c8e('0x49')](handleError(_0x51c9c5,null));};exports['getAgents']=function(_0x2a3a92,_0x872071,_0x165bee){var _0xe20082={};var _0xdad082={};var _0x349896;var _0x50c419;return db['Team'][_0x5c8e('0x94')]({'where':{'id':_0x2a3a92[_0x5c8e('0x4b')]['id']}})['then'](handleEntityNotFound(_0x872071,null))[_0x5c8e('0x26')](function(_0x32affe){if(_0x32affe){_0x349896=_0x32affe;_0xdad082[_0x5c8e('0x34')]=_[_0x5c8e('0x2f')](db[_0x5c8e('0x83')][_0x5c8e('0x95')]);_0xdad082[_0x5c8e('0x2e')]=_[_0x5c8e('0x2f')](_0x2a3a92[_0x5c8e('0x2e')]);_0xdad082[_0x5c8e('0x30')]=_[_0x5c8e('0x40')](_0xdad082[_0x5c8e('0x34')],_0xdad082[_0x5c8e('0x2e')]);_0xe20082[_0x5c8e('0x31')]=_[_0x5c8e('0x40')](_0xdad082[_0x5c8e('0x34')],qs[_0x5c8e('0x32')](_0x2a3a92[_0x5c8e('0x2e')]['fields']));_0xe20082['attributes']=_0xe20082[_0x5c8e('0x31')][_0x5c8e('0x33')]?_0xe20082[_0x5c8e('0x31')]:_0xdad082[_0x5c8e('0x34')];_0xe20082[_0x5c8e('0x6b')]=qs[_0x5c8e('0x37')](_0x2a3a92[_0x5c8e('0x2e')][_0x5c8e('0x37')]);_0xe20082['where']=qs[_0x5c8e('0x30')](_['pick'](_0x2a3a92[_0x5c8e('0x2e')],_0xdad082[_0x5c8e('0x30')]));if(_0x2a3a92[_0x5c8e('0x2e')]['filter']){_0xe20082[_0x5c8e('0x38')]=_['merge'](_0xe20082['where'],{'$or':_['map'](_0xe20082['attributes'],function(_0x43f73d){var _0x302a18={};_0x302a18[_0x43f73d]={'$like':'%'+_0x2a3a92['query']['filter']+'%'};return _0x302a18;})});}_0xe20082=_[_0x5c8e('0x3a')]({},_0xe20082,_0x2a3a92[_0x5c8e('0x3c')]);return _0x349896[_0x5c8e('0x96')](_0xe20082);}})[_0x5c8e('0x26')](function(_0x5291f9){if(_0x5291f9){_0x50c419=_0x5291f9['length'];if(!_0x2a3a92[_0x5c8e('0x2e')][_0x5c8e('0x35')](_0x5c8e('0x36'))){_0xe20082[_0x5c8e('0x1f')]=qs[_0x5c8e('0x1f')](_0x2a3a92[_0x5c8e('0x2e')][_0x5c8e('0x1f')]);_0xe20082[_0x5c8e('0x1d')]=qs['offset'](_0x2a3a92[_0x5c8e('0x2e')][_0x5c8e('0x1d')]);}return _0x349896[_0x5c8e('0x96')](_0xe20082);}})[_0x5c8e('0x26')](function(_0x3d8a74){if(_0x3d8a74){return _0x3d8a74?{'count':_0x50c419,'rows':_0x3d8a74}:null;}})['then'](respondWithResult(_0x872071,null))[_0x5c8e('0x49')](handleError(_0x872071,null));};
\ No newline at end of file
index 3216319..a58b054 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x89e5=['exports','events','../../mysqldb','Team','setMaxListeners','save','update','remove','emit','hasOwnProperty'];(function(_0x4be24e,_0x1e9e6f){var _0x4d06ee=function(_0x18e3d2){while(--_0x18e3d2){_0x4be24e['push'](_0x4be24e['shift']());}};_0x4d06ee(++_0x1e9e6f);}(_0x89e5,0xd3));var _0x589e=function(_0x23d0bc,_0xcf5bdb){_0x23d0bc=_0x23d0bc-0x0;var _0x68bada=_0x89e5[_0x23d0bc];return _0x68bada;};'use strict';var EventEmitter=require(_0x589e('0x0'));var Team=require(_0x589e('0x1'))['db'][_0x589e('0x2')];var TeamEvents=new EventEmitter();TeamEvents[_0x589e('0x3')](0x0);var events={'afterCreate':_0x589e('0x4'),'afterUpdate':_0x589e('0x5'),'afterDestroy':_0x589e('0x6')};function emitEvent(_0x123c62){return function(_0x35b76e,_0x2394e3,_0x36165e){TeamEvents[_0x589e('0x7')](_0x123c62+':'+_0x35b76e['id'],_0x35b76e);TeamEvents[_0x589e('0x7')](_0x123c62,_0x35b76e);_0x36165e(null);};}for(var e in events){if(events[_0x589e('0x8')](e)){var event=events[e];Team['hook'](e,emitEvent(event));}}module[_0x589e('0x9')]=TeamEvents;
\ No newline at end of file
+var _0xf904=['hasOwnProperty','hook','setMaxListeners','save','remove','emit'];(function(_0x584513,_0x37c6c9){var _0xe4a14e=function(_0x4aadc0){while(--_0x4aadc0){_0x584513['push'](_0x584513['shift']());}};_0xe4a14e(++_0x37c6c9);}(_0xf904,0x164));var _0x4f90=function(_0x31b74c,_0x30f8cd){_0x31b74c=_0x31b74c-0x0;var _0x2b4f1c=_0xf904[_0x31b74c];return _0x2b4f1c;};'use strict';var EventEmitter=require('events');var Team=require('../../mysqldb')['db']['Team'];var TeamEvents=new EventEmitter();TeamEvents[_0x4f90('0x0')](0x0);var events={'afterCreate':_0x4f90('0x1'),'afterUpdate':'update','afterDestroy':_0x4f90('0x2')};function emitEvent(_0x5b2bcc){return function(_0x37ca61,_0x447163,_0x47d69a){TeamEvents[_0x4f90('0x3')](_0x5b2bcc+':'+_0x37ca61['id'],_0x37ca61);TeamEvents[_0x4f90('0x3')](_0x5b2bcc,_0x37ca61);_0x47d69a(null);};}for(var e in events){if(events[_0x4f90('0x4')](e)){var event=events[e];Team[_0x4f90('0x5')](e,emitEvent(event));}}module['exports']=TeamEvents;
\ No newline at end of file
index 9439be4..d6cb741 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6982=['exports','define','Team','Chat','Fax','Openchannel','Sms','Voice','Whatsapp','resolve','catch','lodash','./team.attributes','then','map','setDataValue','channel'];(function(_0x114de8,_0x506566){var _0x376f01=function(_0x2bdbd2){while(--_0x2bdbd2){_0x114de8['push'](_0x114de8['shift']());}};_0x376f01(++_0x506566);}(_0x6982,0xe8));var _0x2698=function(_0x66dcdf,_0x27612d){_0x66dcdf=_0x66dcdf-0x0;var _0x1292d2=_0x6982[_0x66dcdf];return _0x1292d2;};'use strict';var _=require(_0x2698('0x0'));var attributes=require(_0x2698('0x1'));function getQueuesByChannel(_0x512c0a,_0x195acf){var _0x3e92d0='get'+_0x195acf+'Queues';return _0x512c0a[_0x3e92d0]()[_0x2698('0x2')](function(_0xd2be5){return _[_0x2698('0x3')](_0xd2be5,function(_0x436d5e){_0x436d5e[_0x2698('0x4')](_0x2698('0x5'),_0x195acf);return _0x436d5e;});})['catch'](function(_0x2cb585){throw _0x2cb585;});}module[_0x2698('0x6')]=function(_0x1842d8){return _0x1842d8[_0x2698('0x7')](_0x2698('0x8'),attributes,{'tableName':'teams','paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x357100=this;var _0x232ba4=[_0x2698('0x9'),_0x2698('0xa'),'Mail',_0x2698('0xb'),_0x2698('0xc'),_0x2698('0xd'),_0x2698('0xe')];return Promise[_0x2698('0xf')]()['then'](function(){var _0x2cdcd5=_[_0x2698('0x3')](_0x232ba4,function(_0x146bbb){return getQueuesByChannel(_0x357100,_0x146bbb);});return Promise['all'](_0x2cdcd5);})[_0x2698('0x10')](function(_0x11c72e){throw _0x11c72e;});}}});};
\ No newline at end of file
+var _0x7efb=['setDataValue','channel','catch','exports','define','teams','Chat','Mail','Openchannel','Sms','Voice','Whatsapp','resolve','all','./team.attributes','get','Queues','then','map'];(function(_0x4dbaad,_0x730318){var _0x226c72=function(_0x501972){while(--_0x501972){_0x4dbaad['push'](_0x4dbaad['shift']());}};_0x226c72(++_0x730318);}(_0x7efb,0x118));var _0xb7ef=function(_0x29a0b6,_0x5af744){_0x29a0b6=_0x29a0b6-0x0;var _0x32a427=_0x7efb[_0x29a0b6];return _0x32a427;};'use strict';var _=require('lodash');var attributes=require(_0xb7ef('0x0'));function getQueuesByChannel(_0x57f3eb,_0x1ffaa7){var _0x133f05=_0xb7ef('0x1')+_0x1ffaa7+_0xb7ef('0x2');return _0x57f3eb[_0x133f05]()[_0xb7ef('0x3')](function(_0x583354){return _[_0xb7ef('0x4')](_0x583354,function(_0x1d0011){_0x1d0011[_0xb7ef('0x5')](_0xb7ef('0x6'),_0x1ffaa7);return _0x1d0011;});})[_0xb7ef('0x7')](function(_0x57dda6){throw _0x57dda6;});}module[_0xb7ef('0x8')]=function(_0x431d2a){return _0x431d2a[_0xb7ef('0x9')]('Team',attributes,{'tableName':_0xb7ef('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'getAssociatedQueues':function(){var _0x3a7efa=this;var _0x4d688f=[_0xb7ef('0xb'),'Fax',_0xb7ef('0xc'),_0xb7ef('0xd'),_0xb7ef('0xe'),_0xb7ef('0xf'),_0xb7ef('0x10')];return Promise[_0xb7ef('0x11')]()[_0xb7ef('0x3')](function(){var _0x116f61=_[_0xb7ef('0x4')](_0x4d688f,function(_0x11bbbd){return getQueuesByChannel(_0x3a7efa,_0x11bbbd);});return Promise[_0xb7ef('0x12')](_0x116f61);})[_0xb7ef('0x7')](function(_0x22f884){throw _0x22f884;});}}});};
\ No newline at end of file
index bab66c1..1af65fd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa09e=['stringify','error','code','message','catch','lodash','util','moment','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','client','http','defaults','redis','localhost','socket.io-emitter','register','request','then','info','Team,\x20%s,\x20%s','request\x20sent','debug','Team,\x20%s,\x20%s,\x20%s'];(function(_0x207140,_0x4c6556){var _0x39e8cf=function(_0x16b730){while(--_0x16b730){_0x207140['push'](_0x207140['shift']());}};_0x39e8cf(++_0x4c6556);}(_0xa09e,0x8c));var _0xea09=function(_0x54d164,_0x3be5ba){_0x54d164=_0x54d164-0x0;var _0xf58243=_0xa09e[_0x54d164];return _0xf58243;};'use strict';var _=require(_0xea09('0x0'));var util=require(_0xea09('0x1'));var moment=require(_0xea09('0x2'));var BPromise=require('bluebird');var rs=require(_0xea09('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xea09('0x4'))['db'];var utils=require(_0xea09('0x5'));var logger=require('../../config/logger')(_0xea09('0x6'));var config=require(_0xea09('0x7'));var jayson=require('jayson/promise');var client=jayson[_0xea09('0x8')][_0xea09('0x9')]({'port':0x232a});config['redis']=_[_0xea09('0xa')](config[_0xea09('0xb')],{'host':_0xea09('0xc'),'port':0x18eb});var socket=require(_0xea09('0xd'))(new Redis(config[_0xea09('0xb')]));require('./team.socket')[_0xea09('0xe')](socket);function respondWithRpcPromise(_0x394d61,_0x185b3d,_0x23cedd){return new BPromise(function(_0x1c188f,_0x522437){return client[_0xea09('0xf')](_0x394d61,_0x23cedd)[_0xea09('0x10')](function(_0x3a9504){logger[_0xea09('0x11')](_0xea09('0x12'),_0x185b3d,_0xea09('0x13'));logger[_0xea09('0x14')](_0xea09('0x15'),_0x185b3d,_0xea09('0x13'),JSON[_0xea09('0x16')](_0x3a9504));if(_0x3a9504[_0xea09('0x17')]){if(_0x3a9504[_0xea09('0x17')][_0xea09('0x18')]===0x1f4){logger[_0xea09('0x17')](_0xea09('0x12'),_0x185b3d,_0x3a9504['error'][_0xea09('0x19')]);return _0x522437(_0x3a9504['error'][_0xea09('0x19')]);}logger[_0xea09('0x17')](_0xea09('0x12'),_0x185b3d,_0x3a9504['error'][_0xea09('0x19')]);return _0x1c188f(_0x3a9504[_0xea09('0x17')]['message']);}else{logger[_0xea09('0x11')](_0xea09('0x12'),_0x185b3d,_0xea09('0x13'));_0x1c188f(_0x3a9504['result'][_0xea09('0x19')]);}})[_0xea09('0x1a')](function(_0xfbafcb){logger[_0xea09('0x17')]('Team,\x20%s,\x20%s',_0x185b3d,_0xfbafcb);_0x522437(_0xfbafcb);});});}
\ No newline at end of file
+var _0xb81e=['ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','redis','./team.socket','register','request','then','info','Team,\x20%s,\x20%s','debug','Team,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result'];(function(_0x39c087,_0x12568b){var _0x14a8fd=function(_0x12adeb){while(--_0x12adeb){_0x39c087['push'](_0x39c087['shift']());}};_0x14a8fd(++_0x12568b);}(_0xb81e,0xc6));var _0xeb81=function(_0x2f820b,_0x1ff6be){_0x2f820b=_0x2f820b-0x0;var _0x2abb4c=_0xb81e[_0x2f820b];return _0x2abb4c;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xeb81('0x0'));var db=require(_0xeb81('0x1'))['db'];var utils=require('../../config/utils');var logger=require(_0xeb81('0x2'))(_0xeb81('0x3'));var config=require(_0xeb81('0x4'));var jayson=require('jayson/promise');var client=jayson[_0xeb81('0x5')][_0xeb81('0x6')]({'port':0x232a});config[_0xeb81('0x7')]=_['defaults'](config[_0xeb81('0x7')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xeb81('0x8'))[_0xeb81('0x9')](socket);function respondWithRpcPromise(_0x59f8d5,_0x3414f2,_0x168d6d){return new BPromise(function(_0x1c197f,_0x490063){return client[_0xeb81('0xa')](_0x59f8d5,_0x168d6d)[_0xeb81('0xb')](function(_0x450e0a){logger[_0xeb81('0xc')](_0xeb81('0xd'),_0x3414f2,'request\x20sent');logger[_0xeb81('0xe')](_0xeb81('0xf'),_0x3414f2,_0xeb81('0x10'),JSON[_0xeb81('0x11')](_0x450e0a));if(_0x450e0a[_0xeb81('0x12')]){if(_0x450e0a[_0xeb81('0x12')][_0xeb81('0x13')]===0x1f4){logger[_0xeb81('0x12')](_0xeb81('0xd'),_0x3414f2,_0x450e0a[_0xeb81('0x12')][_0xeb81('0x14')]);return _0x490063(_0x450e0a['error'][_0xeb81('0x14')]);}logger[_0xeb81('0x12')](_0xeb81('0xd'),_0x3414f2,_0x450e0a['error'][_0xeb81('0x14')]);return _0x1c197f(_0x450e0a[_0xeb81('0x12')][_0xeb81('0x14')]);}else{logger[_0xeb81('0xc')](_0xeb81('0xd'),_0x3414f2,_0xeb81('0x10'));_0x1c197f(_0x450e0a[_0xeb81('0x15')][_0xeb81('0x14')]);}})['catch'](function(_0x664a97){logger[_0xeb81('0x12')](_0xeb81('0xd'),_0x3414f2,_0x664a97);_0x490063(_0x664a97);});});}
\ No newline at end of file
index 1710416..b90f305 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2182=['./team.events','save','remove','update','emit','removeListener','register','length','team:'];(function(_0x191848,_0x50371a){var _0x72567a=function(_0x21e7f5){while(--_0x21e7f5){_0x191848['push'](_0x191848['shift']());}};_0x72567a(++_0x50371a);}(_0x2182,0xea));var _0x2218=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0x2182[_0x167cc1];return _0x10bc4b;};'use strict';var TeamEvents=require(_0x2218('0x0'));var events=[_0x2218('0x1'),_0x2218('0x2'),_0x2218('0x3')];function createListener(_0x564b8e,_0x41395e){return function(_0x591036){_0x41395e[_0x2218('0x4')](_0x564b8e,_0x591036);};}function removeListener(_0x2ebe23,_0x3348af){return function(){TeamEvents[_0x2218('0x5')](_0x2ebe23,_0x3348af);};}exports[_0x2218('0x6')]=function(_0x1e2df1){for(var _0x199cb3=0x0,_0x22eab9=events[_0x2218('0x7')];_0x199cb3<_0x22eab9;_0x199cb3++){var _0x29e762=events[_0x199cb3];var _0x4b3bd1=createListener(_0x2218('0x8')+_0x29e762,_0x1e2df1);TeamEvents['on'](_0x29e762,_0x4b3bd1);}};
\ No newline at end of file
+var _0x9173=['removeListener','register','length','team:','./team.events','save','update','emit'];(function(_0x839ba5,_0x1c4d54){var _0x5babda=function(_0x271a69){while(--_0x271a69){_0x839ba5['push'](_0x839ba5['shift']());}};_0x5babda(++_0x1c4d54);}(_0x9173,0xb4));var _0x3917=function(_0x3affb2,_0x4cf1b0){_0x3affb2=_0x3affb2-0x0;var _0x3a3685=_0x9173[_0x3affb2];return _0x3a3685;};'use strict';var TeamEvents=require(_0x3917('0x0'));var events=[_0x3917('0x1'),'remove',_0x3917('0x2')];function createListener(_0x30989e,_0x282f74){return function(_0x5df798){_0x282f74[_0x3917('0x3')](_0x30989e,_0x5df798);};}function removeListener(_0x5e0739,_0xb4eb06){return function(){TeamEvents[_0x3917('0x4')](_0x5e0739,_0xb4eb06);};}exports[_0x3917('0x5')]=function(_0x403e03){for(var _0x2dace9=0x0,_0x48d592=events[_0x3917('0x6')];_0x2dace9<_0x48d592;_0x2dace9++){var _0x27f513=events[_0x2dace9];var _0x11267b=createListener(_0x3917('0x7')+_0x27f513,_0x403e03);TeamEvents['on'](_0x27f513,_0x11267b);}};
\ No newline at end of file
index 8e49776..d069139 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9bb4=['sequelize','exports','INTEGER'];(function(_0xaa0309,_0x1c8008){var _0x5de7ce=function(_0x3aa6ae){while(--_0x3aa6ae){_0xaa0309['push'](_0xaa0309['shift']());}};_0x5de7ce(++_0x1c8008);}(_0x9bb4,0xd5));var _0x49bb=function(_0x230183,_0x6e04d1){_0x230183=_0x230183-0x0;var _0x1a442c=_0x9bb4[_0x230183];return _0x1a442c;};'use strict';var Sequelize=require(_0x49bb('0x0'));module[_0x49bb('0x1')]={'TeamId':{'type':Sequelize[_0x49bb('0x2')]},'VoicePrefixId':{'type':Sequelize[_0x49bb('0x2')]}};
\ No newline at end of file
+var _0x191a=['INTEGER','sequelize'];(function(_0x3de3ec,_0x36425d){var _0x3eb1da=function(_0x323da1){while(--_0x323da1){_0x3de3ec['push'](_0x3de3ec['shift']());}};_0x3eb1da(++_0x36425d);}(_0x191a,0xef));var _0xa191=function(_0x9f374c,_0x396804){_0x9f374c=_0x9f374c-0x0;var _0x53cfbb=_0x191a[_0x9f374c];return _0x53cfbb;};'use strict';var Sequelize=require(_0xa191('0x0'));module['exports']={'TeamId':{'type':Sequelize[_0xa191('0x1')]},'VoicePrefixId':{'type':Sequelize[_0xa191('0x1')]}};
\ No newline at end of file
index 86e3701..24d5390 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0936=['request-promise','../../config/environment','./teamVoicePrefix.attributes','exports','define','TeamVoicePrefix','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x9e05d1,_0x3cef4a){var _0x4f7e97=function(_0x402f40){while(--_0x402f40){_0x9e05d1['push'](_0x9e05d1['shift']());}};_0x4f7e97(++_0x3cef4a);}(_0x0936,0xde));var _0x6093=function(_0x3178d5,_0x318400){_0x3178d5=_0x3178d5-0x0;var _0x3a71e6=_0x0936[_0x3178d5];return _0x3a71e6;};'use strict';var _=require(_0x6093('0x0'));var util=require(_0x6093('0x1'));var logger=require(_0x6093('0x2'))(_0x6093('0x3'));var moment=require(_0x6093('0x4'));var BPromise=require(_0x6093('0x5'));var rp=require(_0x6093('0x6'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x6093('0x7'));var attributes=require(_0x6093('0x8'));module[_0x6093('0x9')]=function(_0x30c8e4,_0x3bd339){return _0x30c8e4[_0x6093('0xa')](_0x6093('0xb'),attributes,{'tableName':'team_has_voice_prefixes','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x2182=['lodash','util','../../config/logger','api','bluebird','path','rimraf','../../config/environment','./teamVoicePrefix.attributes','exports','define','TeamVoicePrefix','team_has_voice_prefixes'];(function(_0x3abe53,_0x6ecab6){var _0x40151f=function(_0x1f0eab){while(--_0x1f0eab){_0x3abe53['push'](_0x3abe53['shift']());}};_0x40151f(++_0x6ecab6);}(_0x2182,0xea));var _0x2218=function(_0x5b644e,_0x2e5e07){_0x5b644e=_0x5b644e-0x0;var _0x49c6bf=_0x2182[_0x5b644e];return _0x49c6bf;};'use strict';var _=require(_0x2218('0x0'));var util=require(_0x2218('0x1'));var logger=require(_0x2218('0x2'))(_0x2218('0x3'));var moment=require('moment');var BPromise=require(_0x2218('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x2218('0x5'));var rimraf=require(_0x2218('0x6'));var config=require(_0x2218('0x7'));var attributes=require(_0x2218('0x8'));module[_0x2218('0x9')]=function(_0x1e2df1,_0x199cb3){return _0x1e2df1[_0x2218('0xa')](_0x2218('0xb'),attributes,{'tableName':_0x2218('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 1327c3c..fc3d40f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0x43568e,_0x5edbe9){var _0x55e938=function(_0x538e51){while(--_0x538e51){_0x43568e['push'](_0x43568e['shift']());}};_0x55e938(++_0x5edbe9);}(_0x70e0,0x17b));var _0x070e=function(_0x4044e0,_0x50eaff){_0x4044e0=_0x4044e0-0x0;var _0x42f3f1=_0x70e0[_0x4044e0];return _0x42f3f1;};'use strict';var multer=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var path=require(_0x070e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x070e('0x3')]();var fs_extra=require(_0x070e('0x4'));var auth=require(_0x070e('0x5'));var interaction=require(_0x070e('0x6'));var config=require('../../config/environment');module[_0x070e('0x7')]=router;
\ No newline at end of file
+var _0xe706=['../../components/interaction/service','../../config/environment','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service'];(function(_0x1b377b,_0x4d5d82){var _0x22ca1b=function(_0x1520b1){while(--_0x1520b1){_0x1b377b['push'](_0x1b377b['shift']());}};_0x22ca1b(++_0x4d5d82);}(_0xe706,0xa3));var _0x6e70=function(_0x229764,_0x3687f1){_0x229764=_0x229764-0x0;var _0x143dea=_0xe706[_0x229764];return _0x143dea;};'use strict';var multer=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var path=require(_0x6e70('0x2'));var timeout=require('connect-timeout');var express=require(_0x6e70('0x3'));var router=express[_0x6e70('0x4')]();var fs_extra=require(_0x6e70('0x5'));var auth=require(_0x6e70('0x6'));var interaction=require(_0x6e70('0x7'));var config=require(_0x6e70('0x8'));module[_0x6e70('0x9')]=router;
\ No newline at end of file
index 4e434b6..2f42851 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd3dc=['sequelize','exports','INTEGER'];(function(_0x4b055c,_0x4b870b){var _0x4b62bb=function(_0x4884c2){while(--_0x4884c2){_0x4b055c['push'](_0x4b055c['shift']());}};_0x4b62bb(++_0x4b870b);}(_0xd3dc,0x1d7));var _0xcd3d=function(_0x43e50c,_0x4b06ad){_0x43e50c=_0x43e50c-0x0;var _0x2d6cd7=_0xd3dc[_0x43e50c];return _0x2d6cd7;};'use strict';var Sequelize=require(_0xcd3d('0x0'));module[_0xcd3d('0x1')]={'penalty':{'type':Sequelize[_0xcd3d('0x2')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x1b8c=['sequelize','INTEGER'];(function(_0x1f4d0f,_0x596b2f){var _0x4e0a9e=function(_0x2a49f7){while(--_0x2a49f7){_0x1f4d0f['push'](_0x1f4d0f['shift']());}};_0x4e0a9e(++_0x596b2f);}(_0x1b8c,0x130));var _0xc1b8=function(_0x132de5,_0x1f766c){_0x132de5=_0x132de5-0x0;var _0xadbe5c=_0x1b8c[_0x132de5];return _0xadbe5c;};'use strict';var Sequelize=require(_0xc1b8('0x0'));module['exports']={'penalty':{'type':Sequelize[_0xc1b8('0x1')],'defaultValue':0x0}};
\ No newline at end of file
index 297a26b..b5c43ab 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8a28=['TeamVoiceQueue','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./teamVoiceQueue.attributes','exports'];(function(_0x1b391f,_0x3f13d0){var _0x4fd1bc=function(_0x85483e){while(--_0x85483e){_0x1b391f['push'](_0x1b391f['shift']());}};_0x4fd1bc(++_0x3f13d0);}(_0x8a28,0xfd));var _0x88a2=function(_0x4bb66f,_0x3cd682){_0x4bb66f=_0x4bb66f-0x0;var _0xf2772f=_0x8a28[_0x4bb66f];return _0xf2772f;};'use strict';var _=require(_0x88a2('0x0'));var util=require(_0x88a2('0x1'));var logger=require(_0x88a2('0x2'))(_0x88a2('0x3'));var moment=require(_0x88a2('0x4'));var BPromise=require(_0x88a2('0x5'));var rp=require(_0x88a2('0x6'));var fs=require('fs');var path=require(_0x88a2('0x7'));var rimraf=require('rimraf');var config=require(_0x88a2('0x8'));var attributes=require(_0x88a2('0x9'));module[_0x88a2('0xa')]=function(_0x438e32,_0x29ce92){return _0x438e32['define'](_0x88a2('0xb'),attributes,{'tableName':'team_has_voice_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x5a52=['team_has_voice_queues','lodash','moment','bluebird','request-promise','path','rimraf','../../config/environment','./teamVoiceQueue.attributes','exports','TeamVoiceQueue'];(function(_0x2b684a,_0x889e94){var _0x29b872=function(_0x6ee02c){while(--_0x6ee02c){_0x2b684a['push'](_0x2b684a['shift']());}};_0x29b872(++_0x889e94);}(_0x5a52,0x18d));var _0x25a5=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x5a52[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x25a5('0x0'));var util=require('util');var logger=require('../../config/logger')('api');var moment=require(_0x25a5('0x1'));var BPromise=require(_0x25a5('0x2'));var rp=require(_0x25a5('0x3'));var fs=require('fs');var path=require(_0x25a5('0x4'));var rimraf=require(_0x25a5('0x5'));var config=require(_0x25a5('0x6'));var attributes=require(_0x25a5('0x7'));module[_0x25a5('0x8')]=function(_0x5db751,_0x2c210a){return _0x5db751['define'](_0x25a5('0x9'),attributes,{'tableName':_0x25a5('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 4fc87b6..05de1ed 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xad86=['stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','then','info','TeamVoiceQueue,\x20%s,\x20%s','request\x20sent','debug','TeamVoiceQueue,\x20%s,\x20%s,\x20%s'];(function(_0x352d28,_0x444033){var _0x387d7e=function(_0x40be0e){while(--_0x40be0e){_0x352d28['push'](_0x352d28['shift']());}};_0x387d7e(++_0x444033);}(_0xad86,0x194));var _0x6ad8=function(_0x32376c,_0x13dd59){_0x32376c=_0x32376c-0x0;var _0x3cbc1e=_0xad86[_0x32376c];return _0x3cbc1e;};'use strict';var _=require(_0x6ad8('0x0'));var util=require(_0x6ad8('0x1'));var moment=require(_0x6ad8('0x2'));var BPromise=require(_0x6ad8('0x3'));var rs=require(_0x6ad8('0x4'));var fs=require('fs');var Redis=require(_0x6ad8('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x6ad8('0x6'))(_0x6ad8('0x7'));var config=require(_0x6ad8('0x8'));var jayson=require(_0x6ad8('0x9'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x1ecf3f,_0x44b48e,_0x44f61a){return new BPromise(function(_0x1f0fd3,_0x5cce0d){return client['request'](_0x1ecf3f,_0x44f61a)[_0x6ad8('0xa')](function(_0x164208){logger[_0x6ad8('0xb')](_0x6ad8('0xc'),_0x44b48e,_0x6ad8('0xd'));logger[_0x6ad8('0xe')](_0x6ad8('0xf'),_0x44b48e,_0x6ad8('0xd'),JSON[_0x6ad8('0x10')](_0x164208));if(_0x164208['error']){if(_0x164208['error']['code']===0x1f4){logger[_0x6ad8('0x11')](_0x6ad8('0xc'),_0x44b48e,_0x164208['error'][_0x6ad8('0x12')]);return _0x5cce0d(_0x164208['error'][_0x6ad8('0x12')]);}logger[_0x6ad8('0x11')]('TeamVoiceQueue,\x20%s,\x20%s',_0x44b48e,_0x164208[_0x6ad8('0x11')]['message']);return _0x1f0fd3(_0x164208[_0x6ad8('0x11')][_0x6ad8('0x12')]);}else{logger[_0x6ad8('0xb')](_0x6ad8('0xc'),_0x44b48e,'request\x20sent');_0x1f0fd3(_0x164208[_0x6ad8('0x13')][_0x6ad8('0x12')]);}})[_0x6ad8('0x14')](function(_0x300b8d){logger['error'](_0x6ad8('0xc'),_0x44b48e,_0x300b8d);_0x5cce0d(_0x300b8d);});});}
\ No newline at end of file
+var _0x238f=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','request','then','info','request\x20sent','debug','TeamVoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','TeamVoiceQueue,\x20%s,\x20%s','message','result','catch','lodash','util','moment'];(function(_0x7f1644,_0x268f86){var _0x5518b0=function(_0x977aba){while(--_0x977aba){_0x7f1644['push'](_0x7f1644['shift']());}};_0x5518b0(++_0x268f86);}(_0x238f,0xa5));var _0xf238=function(_0x795aed,_0xb01ab7){_0x795aed=_0x795aed-0x0;var _0x1f0d15=_0x238f[_0x795aed];return _0x1f0d15;};'use strict';var _=require(_0xf238('0x0'));var util=require(_0xf238('0x1'));var moment=require(_0xf238('0x2'));var BPromise=require('bluebird');var rs=require(_0xf238('0x3'));var fs=require('fs');var Redis=require(_0xf238('0x4'));var db=require(_0xf238('0x5'))['db'];var utils=require(_0xf238('0x6'));var logger=require(_0xf238('0x7'))(_0xf238('0x8'));var config=require('../../config/environment');var jayson=require(_0xf238('0x9'));var client=jayson[_0xf238('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x549a61,_0x355a13,_0x5432d0){return new BPromise(function(_0x430297,_0x2d59db){return client[_0xf238('0xb')](_0x549a61,_0x5432d0)[_0xf238('0xc')](function(_0x5a88c2){logger[_0xf238('0xd')]('TeamVoiceQueue,\x20%s,\x20%s',_0x355a13,_0xf238('0xe'));logger[_0xf238('0xf')](_0xf238('0x10'),_0x355a13,_0xf238('0xe'),JSON[_0xf238('0x11')](_0x5a88c2));if(_0x5a88c2[_0xf238('0x12')]){if(_0x5a88c2[_0xf238('0x12')][_0xf238('0x13')]===0x1f4){logger['error'](_0xf238('0x14'),_0x355a13,_0x5a88c2[_0xf238('0x12')][_0xf238('0x15')]);return _0x2d59db(_0x5a88c2['error'][_0xf238('0x15')]);}logger[_0xf238('0x12')](_0xf238('0x14'),_0x355a13,_0x5a88c2[_0xf238('0x12')][_0xf238('0x15')]);return _0x430297(_0x5a88c2['error'][_0xf238('0x15')]);}else{logger['info'](_0xf238('0x14'),_0x355a13,_0xf238('0xe'));_0x430297(_0x5a88c2[_0xf238('0x16')][_0xf238('0x15')]);}})[_0xf238('0x17')](function(_0xdcf24e){logger[_0xf238('0x12')]('TeamVoiceQueue,\x20%s,\x20%s',_0x355a13,_0xdcf24e);_0x2d59db(_0xdcf24e);});});}
\ No newline at end of file
index 9b4fc16..f9484a6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x18c9=['./template.controller','isAuthenticated','index','get','/:id','post','put','update','delete','destroy','multer','util','path','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service'];(function(_0x5b7c1a,_0x22f75b){var _0x149653=function(_0x5edffd){while(--_0x5edffd){_0x5b7c1a['push'](_0x5b7c1a['shift']());}};_0x149653(++_0x22f75b);}(_0x18c9,0x13c));var _0x918c=function(_0xd1d19a,_0x1933f0){_0xd1d19a=_0xd1d19a-0x0;var _0x52a79d=_0x18c9[_0xd1d19a];return _0x52a79d;};'use strict';var multer=require(_0x918c('0x0'));var util=require(_0x918c('0x1'));var path=require(_0x918c('0x2'));var timeout=require(_0x918c('0x3'));var express=require(_0x918c('0x4'));var router=express[_0x918c('0x5')]();var fs_extra=require('fs-extra');var auth=require(_0x918c('0x6'));var interaction=require(_0x918c('0x7'));var config=require('../../config/environment');var controller=require(_0x918c('0x8'));router['get']('/',auth[_0x918c('0x9')](),controller[_0x918c('0xa')]);router[_0x918c('0xb')](_0x918c('0xc'),auth[_0x918c('0x9')](),controller['show']);router[_0x918c('0xd')]('/',auth['isAuthenticated'](),controller['create']);router[_0x918c('0xe')](_0x918c('0xc'),auth[_0x918c('0x9')](),controller[_0x918c('0xf')]);router[_0x918c('0x10')](_0x918c('0xc'),auth[_0x918c('0x9')](),controller[_0x918c('0x11')]);module['exports']=router;
\ No newline at end of file
+var _0x9851=['../../components/interaction/service','../../config/environment','./template.controller','get','index','/:id','show','post','create','isAuthenticated','update','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service'];(function(_0x420b71,_0x520a35){var _0x4c3a20=function(_0x3f9a22){while(--_0x3f9a22){_0x420b71['push'](_0x420b71['shift']());}};_0x4c3a20(++_0x520a35);}(_0x9851,0x1f1));var _0x1985=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x9851[_0x321bb2];return _0x9c12ed;};'use strict';var multer=require(_0x1985('0x0'));var util=require('util');var path=require(_0x1985('0x1'));var timeout=require(_0x1985('0x2'));var express=require(_0x1985('0x3'));var router=express[_0x1985('0x4')]();var fs_extra=require(_0x1985('0x5'));var auth=require(_0x1985('0x6'));var interaction=require(_0x1985('0x7'));var config=require(_0x1985('0x8'));var controller=require(_0x1985('0x9'));router[_0x1985('0xa')]('/',auth['isAuthenticated'](),controller[_0x1985('0xb')]);router[_0x1985('0xa')](_0x1985('0xc'),auth['isAuthenticated'](),controller[_0x1985('0xd')]);router[_0x1985('0xe')]('/',auth['isAuthenticated'](),controller[_0x1985('0xf')]);router['put'](_0x1985('0xc'),auth[_0x1985('0x10')](),controller[_0x1985('0x11')]);router[_0x1985('0x12')](_0x1985('0xc'),auth[_0x1985('0x10')](),controller[_0x1985('0x13')]);module[_0x1985('0x14')]=router;
\ No newline at end of file
index 80430a3..802c20b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe026=['sequelize','STRING','TEXT'];(function(_0x2bb501,_0x355781){var _0xdaaeaa=function(_0x40e79e){while(--_0x40e79e){_0x2bb501['push'](_0x2bb501['shift']());}};_0xdaaeaa(++_0x355781);}(_0xe026,0x18f));var _0x6e02=function(_0x50a0c2,_0x4befab){_0x50a0c2=_0x50a0c2-0x0;var _0x5ebadd=_0xe026[_0x50a0c2];return _0x5ebadd;};'use strict';var Sequelize=require(_0x6e02('0x0'));module['exports']={'name':{'type':Sequelize[_0x6e02('0x1')]},'description':{'type':Sequelize['STRING']},'html':{'type':Sequelize[_0x6e02('0x2')]}};
\ No newline at end of file
+var _0x6cfe=['sequelize','STRING','TEXT'];(function(_0x2c41e6,_0x556d0e){var _0x15d99e=function(_0x5b01e7){while(--_0x5b01e7){_0x2c41e6['push'](_0x2c41e6['shift']());}};_0x15d99e(++_0x556d0e);}(_0x6cfe,0x144));var _0xe6cf=function(_0x152fae,_0x30c109){_0x152fae=_0x152fae-0x0;var _0x320f5e=_0x6cfe[_0x152fae];return _0x320f5e;};'use strict';var Sequelize=require(_0xe6cf('0x0'));module['exports']={'name':{'type':Sequelize[_0xe6cf('0x1')]},'description':{'type':Sequelize['STRING']},'html':{'type':Sequelize[_0xe6cf('0x2')]}};
\ No newline at end of file
index c95efdc..2f1f769 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x58dc=['pick','filter','merge','options','includeAll','include','findAll','rows','show','params','find','create','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','catch','eml-format','zip-dir','bluebird','mustache','util','path','sox','to-csv','ejs','crypto','desk.js','querystring','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','end','json','undefined','limit','offset','count','status','set','Content-Range','reject','save','update','Templates','UserProfileResource','destroy','then','sendStatus','error','stack','name','send','index','Template','rawAttributes','fieldName','type','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where'];(function(_0x2785ae,_0x5d8f5c){var _0x1a3073=function(_0x4e25ae){while(--_0x4e25ae){_0x2785ae['push'](_0x2785ae['shift']());}};_0x1a3073(++_0x5d8f5c);}(_0x58dc,0x1b5));var _0xc58d=function(_0x24babb,_0x1ff4a3){_0x24babb=_0x24babb-0x0;var _0x1ae5c4=_0x58dc[_0x24babb];return _0x1ae5c4;};'use strict';var emlformat=require(_0xc58d('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xc58d('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require('moment');var BPromise=require(_0xc58d('0x2'));var Mustache=require(_0xc58d('0x3'));var util=require(_0xc58d('0x4'));var path=require(_0xc58d('0x5'));var sox=require(_0xc58d('0x6'));var csv=require(_0xc58d('0x7'));var ejs=require(_0xc58d('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require('squel');var crypto=require(_0xc58d('0x9'));var jsforce=require('jsforce');var deskjs=require(_0xc58d('0xa'));var toCsv=require(_0xc58d('0x7'));var querystring=require(_0xc58d('0xb'));var Papa=require('papaparse');var Redis=require(_0xc58d('0xc'));var authService=require(_0xc58d('0xd'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xc58d('0xe'));var logger=require(_0xc58d('0xf'))(_0xc58d('0x10'));var utils=require(_0xc58d('0x11'));var config=require(_0xc58d('0x12'));var licenseUtil=require(_0xc58d('0x13'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x243bc5,_0x19b9a2){_0x19b9a2=_0x19b9a2||0xcc;return function(_0x5a274e){if(_0x5a274e){return _0x243bc5['sendStatus'](_0x19b9a2);}return _0x243bc5['status'](_0x19b9a2)[_0xc58d('0x14')]();};}function respondWithResult(_0x386d53,_0x509c14){_0x509c14=_0x509c14||0xc8;return function(_0x5a9c63){if(_0x5a9c63){return _0x386d53['status'](_0x509c14)[_0xc58d('0x15')](_0x5a9c63);}};}function respondWithFilteredResult(_0x1ec13c,_0x349649){return function(_0xe7009a){if(_0xe7009a){var _0x2cfe92=typeof _0x349649['offset']===_0xc58d('0x16')&&typeof _0x349649[_0xc58d('0x17')]===_0xc58d('0x16');var _0x438a61=_0xe7009a['count'];var _0x21200a=_0x2cfe92?0x0:_0x349649[_0xc58d('0x18')];var _0x33be6f=_0x2cfe92?_0xe7009a[_0xc58d('0x19')]:_0x349649[_0xc58d('0x18')]+_0x349649['limit'];var _0x47c444;if(_0x33be6f>=_0x438a61){_0x33be6f=_0x438a61;_0x47c444=0xc8;}else{_0x47c444=0xce;}_0x1ec13c[_0xc58d('0x1a')](_0x47c444);return _0x1ec13c[_0xc58d('0x1b')](_0xc58d('0x1c'),_0x21200a+'-'+_0x33be6f+'/'+_0x438a61)['json'](_0xe7009a);}return null;};}function patchUpdates(_0x723b64){return function(_0x2ccd6e){try{jsonpatch['apply'](_0x2ccd6e,_0x723b64,!![]);}catch(_0x22e54f){return BPromise[_0xc58d('0x1d')](_0x22e54f);}return _0x2ccd6e[_0xc58d('0x1e')]();};}function saveUpdates(_0x3d0d28,_0x29c6bc){return function(_0x2900dd){if(_0x2900dd){return _0x2900dd[_0xc58d('0x1f')](_0x3d0d28)['then'](function(_0x541261){return _0x541261;});}return null;};}function removeEntity(_0x1261a4,_0x27b614){return function(_0x40d1b3){if(_0x40d1b3){return _0x40d1b3['destroy']()['then'](function(){var _0xf40e8f=_0x40d1b3['get']({'plain':!![]});var _0x629e6d=_0xc58d('0x20');return db[_0xc58d('0x21')][_0xc58d('0x22')]({'where':{'type':_0x629e6d,'resourceId':_0xf40e8f['id']}})[_0xc58d('0x23')](function(){return _0x40d1b3;});})[_0xc58d('0x23')](function(){_0x1261a4[_0xc58d('0x1a')](0xcc)[_0xc58d('0x14')]();});}};}function handleEntityNotFound(_0x565982,_0x429743){return function(_0xf10d02){if(!_0xf10d02){_0x565982[_0xc58d('0x24')](0x194);}return _0xf10d02;};}function handleError(_0x27dc9e,_0x21ba08){_0x21ba08=_0x21ba08||0x1f4;return function(_0x28ffd0){logger[_0xc58d('0x25')](_0x28ffd0[_0xc58d('0x26')]);if(_0x28ffd0[_0xc58d('0x27')]){delete _0x28ffd0[_0xc58d('0x27')];}_0x27dc9e[_0xc58d('0x1a')](_0x21ba08)[_0xc58d('0x28')](_0x28ffd0);};}exports[_0xc58d('0x29')]=function(_0x3661c1,_0x1e68a7){var _0x41ac25={},_0x11b094={},_0x3fc7ae={'count':0x0,'rows':[]};var _0x2b4f43=_['map'](db[_0xc58d('0x2a')][_0xc58d('0x2b')],function(_0x3bb25a){return{'name':_0x3bb25a[_0xc58d('0x2c')],'type':_0x3bb25a[_0xc58d('0x2d')][_0xc58d('0x2e')]};});_0x11b094[_0xc58d('0x2f')]=_[_0xc58d('0x30')](_0x2b4f43,_0xc58d('0x27'));_0x11b094[_0xc58d('0x31')]=_[_0xc58d('0x32')](_0x3661c1[_0xc58d('0x31')]);_0x11b094[_0xc58d('0x33')]=_[_0xc58d('0x34')](_0x11b094[_0xc58d('0x2f')],_0x11b094['query']);_0x41ac25[_0xc58d('0x35')]=_[_0xc58d('0x34')](_0x11b094[_0xc58d('0x2f')],qs['fields'](_0x3661c1[_0xc58d('0x31')][_0xc58d('0x36')]));_0x41ac25['attributes']=_0x41ac25['attributes'][_0xc58d('0x37')]?_0x41ac25[_0xc58d('0x35')]:_0x11b094[_0xc58d('0x2f')];if(!_0x3661c1[_0xc58d('0x31')][_0xc58d('0x38')](_0xc58d('0x39'))){_0x41ac25[_0xc58d('0x17')]=qs['limit'](_0x3661c1[_0xc58d('0x31')]['limit']);_0x41ac25[_0xc58d('0x18')]=qs[_0xc58d('0x18')](_0x3661c1[_0xc58d('0x31')][_0xc58d('0x18')]);}_0x41ac25[_0xc58d('0x3a')]=qs['sort'](_0x3661c1[_0xc58d('0x31')][_0xc58d('0x3b')]);_0x41ac25[_0xc58d('0x3c')]=qs[_0xc58d('0x33')](_[_0xc58d('0x3d')](_0x3661c1[_0xc58d('0x31')],_0x11b094['filters']),_0x2b4f43);if(_0x3661c1[_0xc58d('0x31')][_0xc58d('0x3e')]){_0x41ac25[_0xc58d('0x3c')]=_[_0xc58d('0x3f')](_0x41ac25['where'],{'$or':_[_0xc58d('0x30')](_0x2b4f43,function(_0x4697db){if(_0x4697db[_0xc58d('0x2d')]!=='VIRTUAL'){var _0x52f064={};_0x52f064[_0x4697db['name']]={'$like':'%'+_0x3661c1['query'][_0xc58d('0x3e')]+'%'};return _0x52f064;}})});}_0x41ac25=_[_0xc58d('0x3f')]({},_0x41ac25,_0x3661c1[_0xc58d('0x40')]);var _0x471854={'where':_0x41ac25['where']};return db[_0xc58d('0x2a')][_0xc58d('0x19')](_0x471854)['then'](function(_0x26ca4a){_0x3fc7ae[_0xc58d('0x19')]=_0x26ca4a;if(_0x3661c1[_0xc58d('0x31')][_0xc58d('0x41')]){_0x41ac25[_0xc58d('0x42')]=[{'all':!![]}];}return db['Template'][_0xc58d('0x43')](_0x41ac25);})[_0xc58d('0x23')](function(_0x1c3e44){_0x3fc7ae[_0xc58d('0x44')]=_0x1c3e44;return _0x3fc7ae;})['then'](respondWithFilteredResult(_0x1e68a7,_0x41ac25))['catch'](handleError(_0x1e68a7,null));};exports[_0xc58d('0x45')]=function(_0x51e531,_0x1b93a8){var _0x2103f0={'raw':!![],'where':{'id':_0x51e531[_0xc58d('0x46')]['id']}},_0x35944={};_0x35944[_0xc58d('0x2f')]=_[_0xc58d('0x32')](db[_0xc58d('0x2a')][_0xc58d('0x2b')]);_0x35944[_0xc58d('0x31')]=_[_0xc58d('0x32')](_0x51e531['query']);_0x35944[_0xc58d('0x33')]=_[_0xc58d('0x34')](_0x35944['model'],_0x35944[_0xc58d('0x31')]);_0x2103f0[_0xc58d('0x35')]=_['intersection'](_0x35944[_0xc58d('0x2f')],qs[_0xc58d('0x36')](_0x51e531[_0xc58d('0x31')][_0xc58d('0x36')]));_0x2103f0[_0xc58d('0x35')]=_0x2103f0[_0xc58d('0x35')][_0xc58d('0x37')]?_0x2103f0[_0xc58d('0x35')]:_0x35944[_0xc58d('0x2f')];if(_0x51e531[_0xc58d('0x31')][_0xc58d('0x41')]){_0x2103f0[_0xc58d('0x42')]=[{'all':!![]}];}_0x2103f0=_[_0xc58d('0x3f')]({},_0x2103f0,_0x51e531['options']);return db[_0xc58d('0x2a')][_0xc58d('0x47')](_0x2103f0)[_0xc58d('0x23')](handleEntityNotFound(_0x1b93a8,null))['then'](respondWithResult(_0x1b93a8,null))['catch'](handleError(_0x1b93a8,null));};exports[_0xc58d('0x48')]=function(_0x1c5c03,_0x5de064){return db['Template']['create'](_0x1c5c03[_0xc58d('0x49')],{})[_0xc58d('0x23')](function(_0x1b4a45){var _0xb599d7=_0x1c5c03[_0xc58d('0x4a')][_0xc58d('0x4b')]({'plain':!![]});if(!_0xb599d7)throw new Error(_0xc58d('0x4c'));if(_0xb599d7[_0xc58d('0x4d')]===_0xc58d('0x4a')){var _0x25c596=_0x1b4a45[_0xc58d('0x4b')]({'plain':!![]});var _0x149b16=_0xc58d('0x20');return db[_0xc58d('0x4e')]['find']({'where':{'name':_0x149b16,'userProfileId':_0xb599d7[_0xc58d('0x4f')]},'raw':!![]})[_0xc58d('0x23')](function(_0xa55fa8){if(_0xa55fa8&&_0xa55fa8[_0xc58d('0x50')]===0x0){return db[_0xc58d('0x21')]['create']({'name':_0x25c596['name'],'resourceId':_0x25c596['id'],'type':_0xa55fa8[_0xc58d('0x27')],'sectionId':_0xa55fa8['id']},{})['then'](function(){return _0x1b4a45;});}else{return _0x1b4a45;}})['catch'](function(_0x6c6db3){logger['error'](_0xc58d('0x51'),_0x6c6db3);throw _0x6c6db3;});}return _0x1b4a45;})[_0xc58d('0x23')](respondWithResult(_0x5de064,0xc9))[_0xc58d('0x52')](handleError(_0x5de064,null));};exports[_0xc58d('0x1f')]=function(_0x1aadd9,_0x179413){if(_0x1aadd9[_0xc58d('0x49')]['id']){delete _0x1aadd9['body']['id'];}return db[_0xc58d('0x2a')][_0xc58d('0x47')]({'where':{'id':_0x1aadd9['params']['id']}})[_0xc58d('0x23')](handleEntityNotFound(_0x179413,null))[_0xc58d('0x23')](saveUpdates(_0x1aadd9[_0xc58d('0x49')],null))[_0xc58d('0x23')](respondWithResult(_0x179413,null))[_0xc58d('0x52')](handleError(_0x179413,null));};exports[_0xc58d('0x22')]=function(_0xe0a205,_0x2bd2d1){return db['Template'][_0xc58d('0x47')]({'where':{'id':_0xe0a205['params']['id']}})[_0xc58d('0x23')](handleEntityNotFound(_0x2bd2d1,null))[_0xc58d('0x23')](removeEntity(_0x2bd2d1,null))[_0xc58d('0x52')](handleError(_0x2bd2d1,null));};
\ No newline at end of file
+var _0x114a=['Content-Range','apply','reject','save','then','destroy','get','sendStatus','stack','name','index','Template','rawAttributes','fieldName','type','key','map','keys','query','filters','model','attributes','intersection','fields','length','hasOwnProperty','nolimit','limit','order','sort','pick','filter','where','merge','VIRTUAL','includeAll','include','findAll','rows','find','catch','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Templates','autoAssociation','UserProfileResource','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','params','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','end','json','offset','undefined','count','status','set'];(function(_0x61ec9a,_0x4dc173){var _0x17a1c7=function(_0x3d32a9){while(--_0x3d32a9){_0x61ec9a['push'](_0x61ec9a['shift']());}};_0x17a1c7(++_0x4dc173);}(_0x114a,0x195));var _0xa114=function(_0x305d65,_0x56e367){_0x305d65=_0x305d65-0x0;var _0x37f8cc=_0x114a[_0x305d65];return _0x37f8cc;};'use strict';var emlformat=require(_0xa114('0x0'));var rimraf=require(_0xa114('0x1'));var zipdir=require(_0xa114('0x2'));var jsonpatch=require(_0xa114('0x3'));var rp=require(_0xa114('0x4'));var moment=require(_0xa114('0x5'));var BPromise=require(_0xa114('0x6'));var Mustache=require(_0xa114('0x7'));var util=require('util');var path=require(_0xa114('0x8'));var sox=require('sox');var csv=require(_0xa114('0x9'));var ejs=require(_0xa114('0xa'));var fs=require('fs');var fs_extra=require(_0xa114('0xb'));var _=require(_0xa114('0xc'));var squel=require(_0xa114('0xd'));var crypto=require(_0xa114('0xe'));var jsforce=require(_0xa114('0xf'));var deskjs=require(_0xa114('0x10'));var toCsv=require(_0xa114('0x9'));var querystring=require('querystring');var Papa=require(_0xa114('0x11'));var Redis=require(_0xa114('0x12'));var authService=require(_0xa114('0x13'));var qs=require(_0xa114('0x14'));var as=require(_0xa114('0x15'));var hardwareService=require(_0xa114('0x16'));var logger=require(_0xa114('0x17'))('api');var utils=require(_0xa114('0x18'));var config=require(_0xa114('0x19'));var licenseUtil=require(_0xa114('0x1a'));var db=require(_0xa114('0x1b'))['db'];function respondWithStatusCode(_0x59dd2c,_0x2260d7){_0x2260d7=_0x2260d7||0xcc;return function(_0x4d50eb){if(_0x4d50eb){return _0x59dd2c['sendStatus'](_0x2260d7);}return _0x59dd2c['status'](_0x2260d7)[_0xa114('0x1c')]();};}function respondWithResult(_0x4ddb66,_0x21c6dd){_0x21c6dd=_0x21c6dd||0xc8;return function(_0x2a26b3){if(_0x2a26b3){return _0x4ddb66['status'](_0x21c6dd)[_0xa114('0x1d')](_0x2a26b3);}};}function respondWithFilteredResult(_0x16055b,_0x3033bc){return function(_0x3e1274){if(_0x3e1274){var _0x13b211=typeof _0x3033bc[_0xa114('0x1e')]===_0xa114('0x1f')&&typeof _0x3033bc['limit']==='undefined';var _0x5d11ef=_0x3e1274[_0xa114('0x20')];var _0x14f8ee=_0x13b211?0x0:_0x3033bc[_0xa114('0x1e')];var _0x47c03c=_0x13b211?_0x3e1274[_0xa114('0x20')]:_0x3033bc[_0xa114('0x1e')]+_0x3033bc['limit'];var _0x193c86;if(_0x47c03c>=_0x5d11ef){_0x47c03c=_0x5d11ef;_0x193c86=0xc8;}else{_0x193c86=0xce;}_0x16055b[_0xa114('0x21')](_0x193c86);return _0x16055b[_0xa114('0x22')](_0xa114('0x23'),_0x14f8ee+'-'+_0x47c03c+'/'+_0x5d11ef)[_0xa114('0x1d')](_0x3e1274);}return null;};}function patchUpdates(_0x36d0b9){return function(_0x4d68aa){try{jsonpatch[_0xa114('0x24')](_0x4d68aa,_0x36d0b9,!![]);}catch(_0x3d31bd){return BPromise[_0xa114('0x25')](_0x3d31bd);}return _0x4d68aa[_0xa114('0x26')]();};}function saveUpdates(_0x4ab73b,_0x3db86b){return function(_0x28ef37){if(_0x28ef37){return _0x28ef37['update'](_0x4ab73b)[_0xa114('0x27')](function(_0x3ec6e5){return _0x3ec6e5;});}return null;};}function removeEntity(_0x1dd721,_0x598c25){return function(_0x59a0b9){if(_0x59a0b9){return _0x59a0b9[_0xa114('0x28')]()[_0xa114('0x27')](function(){var _0x5130f1=_0x59a0b9[_0xa114('0x29')]({'plain':!![]});var _0x14a64e='Templates';return db['UserProfileResource'][_0xa114('0x28')]({'where':{'type':_0x14a64e,'resourceId':_0x5130f1['id']}})[_0xa114('0x27')](function(){return _0x59a0b9;});})['then'](function(){_0x1dd721[_0xa114('0x21')](0xcc)[_0xa114('0x1c')]();});}};}function handleEntityNotFound(_0x37c7be,_0x1e776b){return function(_0x33390f){if(!_0x33390f){_0x37c7be[_0xa114('0x2a')](0x194);}return _0x33390f;};}function handleError(_0x559a41,_0x211f22){_0x211f22=_0x211f22||0x1f4;return function(_0x8286a3){logger['error'](_0x8286a3[_0xa114('0x2b')]);if(_0x8286a3['name']){delete _0x8286a3[_0xa114('0x2c')];}_0x559a41[_0xa114('0x21')](_0x211f22)['send'](_0x8286a3);};}exports[_0xa114('0x2d')]=function(_0x1ab1ca,_0x15b0bb){var _0x1e4588={},_0x150ac1={},_0x36ecea={'count':0x0,'rows':[]};var _0x5249be=_['map'](db[_0xa114('0x2e')][_0xa114('0x2f')],function(_0xf09e3c){return{'name':_0xf09e3c[_0xa114('0x30')],'type':_0xf09e3c[_0xa114('0x31')][_0xa114('0x32')]};});_0x150ac1['model']=_[_0xa114('0x33')](_0x5249be,_0xa114('0x2c'));_0x150ac1['query']=_[_0xa114('0x34')](_0x1ab1ca[_0xa114('0x35')]);_0x150ac1[_0xa114('0x36')]=_['intersection'](_0x150ac1[_0xa114('0x37')],_0x150ac1['query']);_0x1e4588[_0xa114('0x38')]=_[_0xa114('0x39')](_0x150ac1[_0xa114('0x37')],qs[_0xa114('0x3a')](_0x1ab1ca['query'][_0xa114('0x3a')]));_0x1e4588[_0xa114('0x38')]=_0x1e4588[_0xa114('0x38')][_0xa114('0x3b')]?_0x1e4588[_0xa114('0x38')]:_0x150ac1[_0xa114('0x37')];if(!_0x1ab1ca[_0xa114('0x35')][_0xa114('0x3c')](_0xa114('0x3d'))){_0x1e4588[_0xa114('0x3e')]=qs[_0xa114('0x3e')](_0x1ab1ca[_0xa114('0x35')][_0xa114('0x3e')]);_0x1e4588[_0xa114('0x1e')]=qs[_0xa114('0x1e')](_0x1ab1ca[_0xa114('0x35')]['offset']);}_0x1e4588[_0xa114('0x3f')]=qs[_0xa114('0x40')](_0x1ab1ca['query'][_0xa114('0x40')]);_0x1e4588['where']=qs['filters'](_[_0xa114('0x41')](_0x1ab1ca['query'],_0x150ac1[_0xa114('0x36')]),_0x5249be);if(_0x1ab1ca[_0xa114('0x35')][_0xa114('0x42')]){_0x1e4588[_0xa114('0x43')]=_[_0xa114('0x44')](_0x1e4588[_0xa114('0x43')],{'$or':_[_0xa114('0x33')](_0x5249be,function(_0x24b080){if(_0x24b080[_0xa114('0x31')]!==_0xa114('0x45')){var _0x5ebf3c={};_0x5ebf3c[_0x24b080['name']]={'$like':'%'+_0x1ab1ca[_0xa114('0x35')]['filter']+'%'};return _0x5ebf3c;}})});}_0x1e4588=_[_0xa114('0x44')]({},_0x1e4588,_0x1ab1ca['options']);var _0xcfe67f={'where':_0x1e4588['where']};return db[_0xa114('0x2e')][_0xa114('0x20')](_0xcfe67f)[_0xa114('0x27')](function(_0x42d829){_0x36ecea[_0xa114('0x20')]=_0x42d829;if(_0x1ab1ca[_0xa114('0x35')][_0xa114('0x46')]){_0x1e4588[_0xa114('0x47')]=[{'all':!![]}];}return db[_0xa114('0x2e')][_0xa114('0x48')](_0x1e4588);})[_0xa114('0x27')](function(_0x5d9a81){_0x36ecea[_0xa114('0x49')]=_0x5d9a81;return _0x36ecea;})[_0xa114('0x27')](respondWithFilteredResult(_0x15b0bb,_0x1e4588))['catch'](handleError(_0x15b0bb,null));};exports['show']=function(_0x191be1,_0x2f8b21){var _0x624443={'raw':!![],'where':{'id':_0x191be1['params']['id']}},_0x22cf2c={};_0x22cf2c[_0xa114('0x37')]=_[_0xa114('0x34')](db[_0xa114('0x2e')]['rawAttributes']);_0x22cf2c[_0xa114('0x35')]=_[_0xa114('0x34')](_0x191be1[_0xa114('0x35')]);_0x22cf2c[_0xa114('0x36')]=_[_0xa114('0x39')](_0x22cf2c[_0xa114('0x37')],_0x22cf2c[_0xa114('0x35')]);_0x624443[_0xa114('0x38')]=_[_0xa114('0x39')](_0x22cf2c[_0xa114('0x37')],qs[_0xa114('0x3a')](_0x191be1[_0xa114('0x35')][_0xa114('0x3a')]));_0x624443[_0xa114('0x38')]=_0x624443['attributes'][_0xa114('0x3b')]?_0x624443[_0xa114('0x38')]:_0x22cf2c[_0xa114('0x37')];if(_0x191be1[_0xa114('0x35')][_0xa114('0x46')]){_0x624443['include']=[{'all':!![]}];}_0x624443=_[_0xa114('0x44')]({},_0x624443,_0x191be1['options']);return db['Template'][_0xa114('0x4a')](_0x624443)[_0xa114('0x27')](handleEntityNotFound(_0x2f8b21,null))[_0xa114('0x27')](respondWithResult(_0x2f8b21,null))[_0xa114('0x4b')](handleError(_0x2f8b21,null));};exports['create']=function(_0x2a2f1c,_0x443b81){return db['Template'][_0xa114('0x4c')](_0x2a2f1c[_0xa114('0x4d')],{})[_0xa114('0x27')](function(_0x9d2eb5){var _0x3b863f=_0x2a2f1c[_0xa114('0x4e')][_0xa114('0x29')]({'plain':!![]});if(!_0x3b863f)throw new Error(_0xa114('0x4f'));if(_0x3b863f[_0xa114('0x50')]===_0xa114('0x4e')){var _0x108934=_0x9d2eb5['get']({'plain':!![]});var _0x3aadf5=_0xa114('0x51');return db['UserProfileSection'][_0xa114('0x4a')]({'where':{'name':_0x3aadf5,'userProfileId':_0x3b863f['userProfileId']},'raw':!![]})[_0xa114('0x27')](function(_0x230d6b){if(_0x230d6b&&_0x230d6b[_0xa114('0x52')]===0x0){return db[_0xa114('0x53')][_0xa114('0x4c')]({'name':_0x108934[_0xa114('0x2c')],'resourceId':_0x108934['id'],'type':_0x230d6b['name'],'sectionId':_0x230d6b['id']},{})[_0xa114('0x27')](function(){return _0x9d2eb5;});}else{return _0x9d2eb5;}})['catch'](function(_0x407ff3){logger[_0xa114('0x54')](_0xa114('0x55'),_0x407ff3);throw _0x407ff3;});}return _0x9d2eb5;})['then'](respondWithResult(_0x443b81,0xc9))[_0xa114('0x4b')](handleError(_0x443b81,null));};exports[_0xa114('0x56')]=function(_0x20f481,_0x2b9f0a){if(_0x20f481[_0xa114('0x4d')]['id']){delete _0x20f481[_0xa114('0x4d')]['id'];}return db['Template'][_0xa114('0x4a')]({'where':{'id':_0x20f481[_0xa114('0x57')]['id']}})[_0xa114('0x27')](handleEntityNotFound(_0x2b9f0a,null))[_0xa114('0x27')](saveUpdates(_0x20f481[_0xa114('0x4d')],null))[_0xa114('0x27')](respondWithResult(_0x2b9f0a,null))[_0xa114('0x4b')](handleError(_0x2b9f0a,null));};exports[_0xa114('0x28')]=function(_0x4d4021,_0x2f298a){return db[_0xa114('0x2e')][_0xa114('0x4a')]({'where':{'id':_0x4d4021[_0xa114('0x57')]['id']}})[_0xa114('0x27')](handleEntityNotFound(_0x2f298a,null))[_0xa114('0x27')](removeEntity(_0x2f298a,null))['catch'](handleError(_0x2f298a,null));};
\ No newline at end of file
index 8022938..3eddc1a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb687=['path','./template.attributes','Template','tools_templates','util','moment','bluebird','request-promise'];(function(_0x1ff575,_0xdba21f){var _0x48fc9e=function(_0x51cf97){while(--_0x51cf97){_0x1ff575['push'](_0x1ff575['shift']());}};_0x48fc9e(++_0xdba21f);}(_0xb687,0x1c4));var _0x7b68=function(_0x181208,_0x50da12){_0x181208=_0x181208-0x0;var _0x3db3eb=_0xb687[_0x181208];return _0x3db3eb;};'use strict';var _=require('lodash');var util=require(_0x7b68('0x0'));var logger=require('../../config/logger')('api');var moment=require(_0x7b68('0x1'));var BPromise=require(_0x7b68('0x2'));var rp=require(_0x7b68('0x3'));var fs=require('fs');var path=require(_0x7b68('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0x7b68('0x5'));module['exports']=function(_0x28dbaa,_0x2829e4){return _0x28dbaa['define'](_0x7b68('0x6'),attributes,{'tableName':_0x7b68('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xef33=['util','../../config/logger','api','moment','path','../../config/environment','exports','Template','tools_templates','lodash'];(function(_0x19176b,_0x1012fd){var _0x5807b3=function(_0x3a7bd8){while(--_0x3a7bd8){_0x19176b['push'](_0x19176b['shift']());}};_0x5807b3(++_0x1012fd);}(_0xef33,0x18f));var _0x3ef3=function(_0x21dde3,_0x4c27da){_0x21dde3=_0x21dde3-0x0;var _0xabf61f=_0xef33[_0x21dde3];return _0xabf61f;};'use strict';var _=require(_0x3ef3('0x0'));var util=require(_0x3ef3('0x1'));var logger=require(_0x3ef3('0x2'))(_0x3ef3('0x3'));var moment=require(_0x3ef3('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x3ef3('0x5'));var rimraf=require('rimraf');var config=require(_0x3ef3('0x6'));var attributes=require('./template.attributes');module[_0x3ef3('0x7')]=function(_0xa867fb,_0x25d0c5){return _0xa867fb['define'](_0x3ef3('0x8'),attributes,{'tableName':_0x3ef3('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 679fb5e..e4b3444 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb4a0=['http','request','then','info','Template,\x20%s,\x20%s,\x20%s','stringify','error','code','Template,\x20%s,\x20%s','message','request\x20sent','catch','GetTemplate','Template','findAll','options','raw','where','attributes','limit','include','model','map','debug','util','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client'];(function(_0x19d043,_0x2dbb80){var _0x25c755=function(_0x22d61b){while(--_0x22d61b){_0x19d043['push'](_0x19d043['shift']());}};_0x25c755(++_0x2dbb80);}(_0xb4a0,0x128));var _0x0b4a=function(_0x3c62a7,_0x103a78){_0x3c62a7=_0x3c62a7-0x0;var _0x403ed0=_0xb4a0[_0x3c62a7];return _0x403ed0;};'use strict';var _=require('lodash');var util=require(_0x0b4a('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x0b4a('0x1'));var fs=require('fs');var Redis=require(_0x0b4a('0x2'));var db=require(_0x0b4a('0x3'))['db'];var utils=require(_0x0b4a('0x4'));var logger=require(_0x0b4a('0x5'))(_0x0b4a('0x6'));var config=require(_0x0b4a('0x7'));var jayson=require(_0x0b4a('0x8'));var client=jayson[_0x0b4a('0x9')][_0x0b4a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4f3279,_0x5a3190,_0x1b9990){return new BPromise(function(_0x19aeea,_0x2b481d){return client[_0x0b4a('0xb')](_0x4f3279,_0x1b9990)[_0x0b4a('0xc')](function(_0x2b3557){logger[_0x0b4a('0xd')]('Template,\x20%s,\x20%s',_0x5a3190,'request\x20sent');logger['debug'](_0x0b4a('0xe'),_0x5a3190,'request\x20sent',JSON[_0x0b4a('0xf')](_0x2b3557));if(_0x2b3557[_0x0b4a('0x10')]){if(_0x2b3557[_0x0b4a('0x10')][_0x0b4a('0x11')]===0x1f4){logger[_0x0b4a('0x10')](_0x0b4a('0x12'),_0x5a3190,_0x2b3557[_0x0b4a('0x10')]['message']);return _0x2b481d(_0x2b3557['error'][_0x0b4a('0x13')]);}logger[_0x0b4a('0x10')]('Template,\x20%s,\x20%s',_0x5a3190,_0x2b3557[_0x0b4a('0x10')][_0x0b4a('0x13')]);return _0x19aeea(_0x2b3557[_0x0b4a('0x10')][_0x0b4a('0x13')]);}else{logger['info'](_0x0b4a('0x12'),_0x5a3190,_0x0b4a('0x14'));_0x19aeea(_0x2b3557['result']['message']);}})[_0x0b4a('0x15')](function(_0x4624a3){logger['error']('Template,\x20%s,\x20%s',_0x5a3190,_0x4624a3);_0x2b481d(_0x4624a3);});});}exports[_0x0b4a('0x16')]=function(_0xc84ada){var _0x20a360=this;return new Promise(function(_0x574f19,_0x34766d){return db[_0x0b4a('0x17')][_0x0b4a('0x18')]({'raw':_0xc84ada[_0x0b4a('0x19')]?_0xc84ada[_0x0b4a('0x19')][_0x0b4a('0x1a')]===undefined?!![]:![]:!![],'where':_0xc84ada[_0x0b4a('0x19')]?_0xc84ada[_0x0b4a('0x19')][_0x0b4a('0x1b')]||null:null,'attributes':_0xc84ada[_0x0b4a('0x19')]?_0xc84ada[_0x0b4a('0x19')][_0x0b4a('0x1c')]||null:null,'limit':_0xc84ada['options']?_0xc84ada[_0x0b4a('0x19')][_0x0b4a('0x1d')]||null:null,'include':_0xc84ada[_0x0b4a('0x19')]?_0xc84ada[_0x0b4a('0x19')]['include']?_['map'](_0xc84ada['options'][_0x0b4a('0x1e')],function(_0x591a88){return{'model':db[_0x591a88[_0x0b4a('0x1f')]],'as':_0x591a88['as'],'attributes':_0x591a88[_0x0b4a('0x1c')],'include':_0x591a88[_0x0b4a('0x1e')]?_['map'](_0x591a88[_0x0b4a('0x1e')],function(_0x2d0fc8){return{'model':db[_0x2d0fc8[_0x0b4a('0x1f')]],'as':_0x2d0fc8['as'],'attributes':_0x2d0fc8[_0x0b4a('0x1c')],'include':_0x2d0fc8[_0x0b4a('0x1e')]?_[_0x0b4a('0x20')](_0x2d0fc8[_0x0b4a('0x1e')],function(_0x46c891){return{'model':db[_0x46c891['model']],'as':_0x46c891['as'],'attributes':_0x46c891[_0x0b4a('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x0b4a('0xc')](function(_0x1e4f29){logger[_0x0b4a('0xd')](_0x0b4a('0x16'),_0xc84ada);logger[_0x0b4a('0x21')](_0x0b4a('0x16'),_0xc84ada,JSON['stringify'](_0x1e4f29));_0x574f19(_0x1e4f29);})[_0x0b4a('0x15')](function(_0x5747e7){logger[_0x0b4a('0x10')]('GetTemplate',_0x5747e7[_0x0b4a('0x13')],_0xc84ada);_0x34766d(_0x20a360[_0x0b4a('0x10')](0x1f4,_0x5747e7['message']));});});};
\ No newline at end of file
+var _0xda8c=['client','then','info','Template,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','Template,\x20%s,\x20%s','message','result','GetTemplate','Template','findAll','options','raw','attributes','limit','include','map','model','debug','catch','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x1facfa,_0x1acf7d){var _0x9ec701=function(_0x115e37){while(--_0x115e37){_0x1facfa['push'](_0x1facfa['shift']());}};_0x9ec701(++_0x1acf7d);}(_0xda8c,0xb2));var _0xcda8=function(_0x1e5f0c,_0x31aa12){_0x1e5f0c=_0x1e5f0c-0x0;var _0x3d083b=_0xda8c[_0x1e5f0c];return _0x3d083b;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xcda8('0x0'));var rs=require(_0xcda8('0x1'));var fs=require('fs');var Redis=require(_0xcda8('0x2'));var db=require(_0xcda8('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xcda8('0x4'))(_0xcda8('0x5'));var config=require(_0xcda8('0x6'));var jayson=require(_0xcda8('0x7'));var client=jayson[_0xcda8('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3ab14a,_0x590b3f,_0x47fe0f){return new BPromise(function(_0x310518,_0x15e322){return client['request'](_0x3ab14a,_0x47fe0f)[_0xcda8('0x9')](function(_0x1f7164){logger[_0xcda8('0xa')]('Template,\x20%s,\x20%s',_0x590b3f,'request\x20sent');logger['debug'](_0xcda8('0xb'),_0x590b3f,_0xcda8('0xc'),JSON[_0xcda8('0xd')](_0x1f7164));if(_0x1f7164[_0xcda8('0xe')]){if(_0x1f7164[_0xcda8('0xe')][_0xcda8('0xf')]===0x1f4){logger[_0xcda8('0xe')](_0xcda8('0x10'),_0x590b3f,_0x1f7164['error'][_0xcda8('0x11')]);return _0x15e322(_0x1f7164[_0xcda8('0xe')][_0xcda8('0x11')]);}logger[_0xcda8('0xe')](_0xcda8('0x10'),_0x590b3f,_0x1f7164[_0xcda8('0xe')][_0xcda8('0x11')]);return _0x310518(_0x1f7164[_0xcda8('0xe')]['message']);}else{logger['info'](_0xcda8('0x10'),_0x590b3f,'request\x20sent');_0x310518(_0x1f7164[_0xcda8('0x12')][_0xcda8('0x11')]);}})['catch'](function(_0x688a59){logger['error'](_0xcda8('0x10'),_0x590b3f,_0x688a59);_0x15e322(_0x688a59);});});}exports[_0xcda8('0x13')]=function(_0x313f20){var _0x4b6ec2=this;return new Promise(function(_0x54b4e9,_0x3f6352){return db[_0xcda8('0x14')][_0xcda8('0x15')]({'raw':_0x313f20[_0xcda8('0x16')]?_0x313f20[_0xcda8('0x16')][_0xcda8('0x17')]===undefined?!![]:![]:!![],'where':_0x313f20[_0xcda8('0x16')]?_0x313f20[_0xcda8('0x16')]['where']||null:null,'attributes':_0x313f20['options']?_0x313f20['options'][_0xcda8('0x18')]||null:null,'limit':_0x313f20[_0xcda8('0x16')]?_0x313f20[_0xcda8('0x16')][_0xcda8('0x19')]||null:null,'include':_0x313f20[_0xcda8('0x16')]?_0x313f20[_0xcda8('0x16')][_0xcda8('0x1a')]?_[_0xcda8('0x1b')](_0x313f20['options'][_0xcda8('0x1a')],function(_0x534ec9){return{'model':db[_0x534ec9[_0xcda8('0x1c')]],'as':_0x534ec9['as'],'attributes':_0x534ec9[_0xcda8('0x18')],'include':_0x534ec9[_0xcda8('0x1a')]?_[_0xcda8('0x1b')](_0x534ec9[_0xcda8('0x1a')],function(_0x1015c2){return{'model':db[_0x1015c2[_0xcda8('0x1c')]],'as':_0x1015c2['as'],'attributes':_0x1015c2['attributes'],'include':_0x1015c2[_0xcda8('0x1a')]?_[_0xcda8('0x1b')](_0x1015c2[_0xcda8('0x1a')],function(_0x5041c5){return{'model':db[_0x5041c5['model']],'as':_0x5041c5['as'],'attributes':_0x5041c5['attributes']};}):[]};}):[]};}):[]:[]})[_0xcda8('0x9')](function(_0x1a01c7){logger[_0xcda8('0xa')](_0xcda8('0x13'),_0x313f20);logger[_0xcda8('0x1d')](_0xcda8('0x13'),_0x313f20,JSON['stringify'](_0x1a01c7));_0x54b4e9(_0x1a01c7);})[_0xcda8('0x1e')](function(_0x2d6bc3){logger['error'](_0xcda8('0x13'),_0x2d6bc3[_0xcda8('0x11')],_0x313f20);_0x3f6352(_0x4b6ec2[_0xcda8('0xe')](0x1f4,_0x2d6bc3[_0xcda8('0x11')]));});});};
\ No newline at end of file
index e42f68e..4df8811 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb2c8=['util','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./trigger.controller','get','isAuthenticated','/:id','/:id/all_conditions','getAllConditions','/:id/any_conditions','getAnyConditions','/:id/actions','getActions','post','addAllCondition','addAction','update','delete','destroy','exports','multer'];(function(_0x1e2638,_0x15b733){var _0x4fe16=function(_0x19ad77){while(--_0x19ad77){_0x1e2638['push'](_0x1e2638['shift']());}};_0x4fe16(++_0x15b733);}(_0xb2c8,0x197));var _0x8b2c=function(_0x206c1e,_0x416fe7){_0x206c1e=_0x206c1e-0x0;var _0x480a04=_0xb2c8[_0x206c1e];return _0x480a04;};'use strict';var multer=require(_0x8b2c('0x0'));var util=require(_0x8b2c('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x8b2c('0x2'));var router=express[_0x8b2c('0x3')]();var fs_extra=require(_0x8b2c('0x4'));var auth=require(_0x8b2c('0x5'));var interaction=require(_0x8b2c('0x6'));var config=require('../../config/environment');var controller=require(_0x8b2c('0x7'));router[_0x8b2c('0x8')]('/',auth[_0x8b2c('0x9')](),controller['index']);router[_0x8b2c('0x8')](_0x8b2c('0xa'),auth[_0x8b2c('0x9')](),controller['show']);router[_0x8b2c('0x8')](_0x8b2c('0xb'),auth['isAuthenticated'](),controller[_0x8b2c('0xc')]);router['get'](_0x8b2c('0xd'),auth[_0x8b2c('0x9')](),controller[_0x8b2c('0xe')]);router['get'](_0x8b2c('0xf'),auth[_0x8b2c('0x9')](),controller[_0x8b2c('0x10')]);router[_0x8b2c('0x11')]('/',auth[_0x8b2c('0x9')](),controller['create']);router[_0x8b2c('0x11')](_0x8b2c('0xb'),auth[_0x8b2c('0x9')](),controller[_0x8b2c('0x12')]);router[_0x8b2c('0x11')](_0x8b2c('0xd'),auth[_0x8b2c('0x9')](),controller['addAnyCondition']);router['post']('/:id/actions',auth[_0x8b2c('0x9')](),controller[_0x8b2c('0x13')]);router['put'](_0x8b2c('0xa'),auth[_0x8b2c('0x9')](),controller[_0x8b2c('0x14')]);router[_0x8b2c('0x15')]('/:id',auth['isAuthenticated'](),controller[_0x8b2c('0x16')]);module[_0x8b2c('0x17')]=router;
\ No newline at end of file
+var _0xb7e2=['../../config/environment','./trigger.controller','get','isAuthenticated','index','/:id','show','/:id/all_conditions','getAllConditions','/:id/any_conditions','/:id/actions','getActions','post','create','addAllCondition','put','update','delete','destroy','multer','path','express','fs-extra','../../components/interaction/service'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb7e2,0x103));var _0x2b7e=function(_0x1d5564,_0x152f8f){_0x1d5564=_0x1d5564-0x0;var _0x78fde0=_0xb7e2[_0x1d5564];return _0x78fde0;};'use strict';var multer=require(_0x2b7e('0x0'));var util=require('util');var path=require(_0x2b7e('0x1'));var timeout=require('connect-timeout');var express=require(_0x2b7e('0x2'));var router=express['Router']();var fs_extra=require(_0x2b7e('0x3'));var auth=require('../../components/auth/service');var interaction=require(_0x2b7e('0x4'));var config=require(_0x2b7e('0x5'));var controller=require(_0x2b7e('0x6'));router[_0x2b7e('0x7')]('/',auth[_0x2b7e('0x8')](),controller[_0x2b7e('0x9')]);router['get'](_0x2b7e('0xa'),auth[_0x2b7e('0x8')](),controller[_0x2b7e('0xb')]);router['get'](_0x2b7e('0xc'),auth[_0x2b7e('0x8')](),controller[_0x2b7e('0xd')]);router[_0x2b7e('0x7')](_0x2b7e('0xe'),auth['isAuthenticated'](),controller['getAnyConditions']);router[_0x2b7e('0x7')](_0x2b7e('0xf'),auth[_0x2b7e('0x8')](),controller[_0x2b7e('0x10')]);router[_0x2b7e('0x11')]('/',auth[_0x2b7e('0x8')](),controller[_0x2b7e('0x12')]);router['post'](_0x2b7e('0xc'),auth[_0x2b7e('0x8')](),controller[_0x2b7e('0x13')]);router[_0x2b7e('0x11')]('/:id/any_conditions',auth['isAuthenticated'](),controller['addAnyCondition']);router[_0x2b7e('0x11')]('/:id/actions',auth[_0x2b7e('0x8')](),controller['addAction']);router[_0x2b7e('0x14')]('/:id',auth[_0x2b7e('0x8')](),controller[_0x2b7e('0x15')]);router[_0x2b7e('0x16')]('/:id',auth[_0x2b7e('0x8')](),controller[_0x2b7e('0x17')]);module['exports']=router;
\ No newline at end of file
index bc099e8..a8231d5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2a65=['exports','STRING','BOOLEAN','sequelize'];(function(_0x630086,_0x12ca6d){var _0x1fdfce=function(_0x142244){while(--_0x142244){_0x630086['push'](_0x630086['shift']());}};_0x1fdfce(++_0x12ca6d);}(_0x2a65,0xdb));var _0x52a6=function(_0x54bf67,_0x5381e5){_0x54bf67=_0x54bf67-0x0;var _0x5f18a9=_0x2a65[_0x54bf67];return _0x5f18a9;};'use strict';var Sequelize=require(_0x52a6('0x0'));module[_0x52a6('0x1')]={'name':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0x52a6('0x2')]},'description':{'type':Sequelize[_0x52a6('0x2')]},'status':{'type':Sequelize[_0x52a6('0x3')],'defaultValue':![]}};
\ No newline at end of file
+var _0xb891=['BOOLEAN','sequelize','STRING'];(function(_0x296d0e,_0xe264d){var _0x45ce2f=function(_0xa1ef60){while(--_0xa1ef60){_0x296d0e['push'](_0x296d0e['shift']());}};_0x45ce2f(++_0xe264d);}(_0xb891,0x18d));var _0x1b89=function(_0x53d98f,_0x16fd94){_0x53d98f=_0x53d98f-0x0;var _0x17a75f=_0xb891[_0x53d98f];return _0x17a75f;};'use strict';var Sequelize=require(_0x1b89('0x0'));module['exports']={'name':{'type':Sequelize['STRING']},'channel':{'type':Sequelize['STRING']},'description':{'type':Sequelize[_0x1b89('0x1')]},'status':{'type':Sequelize[_0x1b89('0x2')],'defaultValue':![]}};
\ No newline at end of file
index e20a37a..e393c9b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9bd2=['options','includeAll','Trigger','findAll','rows','catch','show','params','find','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','autoAssociation','create','error','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','addAllCondition','TriggerAllId','Condition','addAnyCondition','getAllConditions','getAnyConditions','findOne','order','pick','addAction','getActions','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','desk.js','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','offset','undefined','limit','count','set','Content-Range','reject','then','destroy','Triggers','UserProfileResource','stack','name','send','map','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filters','filter','merge','VIRTUAL'];(function(_0xe9f24d,_0x1b0ec9){var _0x5f1178=function(_0x4dee44){while(--_0x4dee44){_0xe9f24d['push'](_0xe9f24d['shift']());}};_0x5f1178(++_0x1b0ec9);}(_0x9bd2,0xde));var _0x29bd=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x9bd2[_0x501510];return _0x1e6ee5;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x29bd('0x0'));var jsonpatch=require(_0x29bd('0x1'));var rp=require(_0x29bd('0x2'));var moment=require('moment');var BPromise=require(_0x29bd('0x3'));var Mustache=require(_0x29bd('0x4'));var util=require(_0x29bd('0x5'));var path=require(_0x29bd('0x6'));var sox=require(_0x29bd('0x7'));var csv=require(_0x29bd('0x8'));var ejs=require(_0x29bd('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x29bd('0xa'));var squel=require(_0x29bd('0xb'));var crypto=require(_0x29bd('0xc'));var jsforce=require('jsforce');var deskjs=require(_0x29bd('0xd'));var toCsv=require(_0x29bd('0x8'));var querystring=require(_0x29bd('0xe'));var Papa=require(_0x29bd('0xf'));var Redis=require(_0x29bd('0x10'));var authService=require(_0x29bd('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0x29bd('0x12'));var hardwareService=require(_0x29bd('0x13'));var logger=require(_0x29bd('0x14'))(_0x29bd('0x15'));var utils=require(_0x29bd('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x29bd('0x17'));var db=require(_0x29bd('0x18'))['db'];function respondWithStatusCode(_0x45acac,_0x34940e){_0x34940e=_0x34940e||0xcc;return function(_0x59a4b1){if(_0x59a4b1){return _0x45acac[_0x29bd('0x19')](_0x34940e);}return _0x45acac[_0x29bd('0x1a')](_0x34940e)[_0x29bd('0x1b')]();};}function respondWithResult(_0x86aa00,_0x4ac6ec){_0x4ac6ec=_0x4ac6ec||0xc8;return function(_0x2b9ea0){if(_0x2b9ea0){return _0x86aa00[_0x29bd('0x1a')](_0x4ac6ec)[_0x29bd('0x1c')](_0x2b9ea0);}};}function respondWithFilteredResult(_0x276a0a,_0x3fb757){return function(_0x5b95ad){if(_0x5b95ad){var _0x3e22f1=typeof _0x3fb757[_0x29bd('0x1d')]===_0x29bd('0x1e')&&typeof _0x3fb757[_0x29bd('0x1f')]===_0x29bd('0x1e');var _0x568965=_0x5b95ad[_0x29bd('0x20')];var _0x49ea54=_0x3e22f1?0x0:_0x3fb757[_0x29bd('0x1d')];var _0x4c4bb1=_0x3e22f1?_0x5b95ad[_0x29bd('0x20')]:_0x3fb757['offset']+_0x3fb757[_0x29bd('0x1f')];var _0x43ed8a;if(_0x4c4bb1>=_0x568965){_0x4c4bb1=_0x568965;_0x43ed8a=0xc8;}else{_0x43ed8a=0xce;}_0x276a0a[_0x29bd('0x1a')](_0x43ed8a);return _0x276a0a[_0x29bd('0x21')](_0x29bd('0x22'),_0x49ea54+'-'+_0x4c4bb1+'/'+_0x568965)[_0x29bd('0x1c')](_0x5b95ad);}return null;};}function patchUpdates(_0x366982){return function(_0x57c546){try{jsonpatch['apply'](_0x57c546,_0x366982,!![]);}catch(_0x171adb){return BPromise[_0x29bd('0x23')](_0x171adb);}return _0x57c546['save']();};}function saveUpdates(_0x231654,_0x32e5ed){return function(_0x312652){if(_0x312652){return _0x312652['update'](_0x231654)[_0x29bd('0x24')](function(_0x4847ce){return _0x4847ce;});}return null;};}function removeEntity(_0x586919,_0x465e91){return function(_0x16e6ad){if(_0x16e6ad){return _0x16e6ad[_0x29bd('0x25')]()['then'](function(){var _0x720685=_0x16e6ad['get']({'plain':!![]});var _0xb5d2fb=_0x29bd('0x26');return db[_0x29bd('0x27')][_0x29bd('0x25')]({'where':{'type':_0xb5d2fb,'resourceId':_0x720685['id']}})['then'](function(){return _0x16e6ad;});})[_0x29bd('0x24')](function(){_0x586919[_0x29bd('0x1a')](0xcc)[_0x29bd('0x1b')]();});}};}function handleEntityNotFound(_0x38cecd,_0x9336eb){return function(_0x45c7d8){if(!_0x45c7d8){_0x38cecd[_0x29bd('0x19')](0x194);}return _0x45c7d8;};}function handleError(_0x1f58af,_0x66285c){_0x66285c=_0x66285c||0x1f4;return function(_0x5d0dee){logger['error'](_0x5d0dee[_0x29bd('0x28')]);if(_0x5d0dee[_0x29bd('0x29')]){delete _0x5d0dee[_0x29bd('0x29')];}_0x1f58af[_0x29bd('0x1a')](_0x66285c)[_0x29bd('0x2a')](_0x5d0dee);};}exports['index']=function(_0x2cb9bb,_0x3fb5b0){var _0x1f3ea1={},_0x41c86d={},_0x1a0a38={'count':0x0,'rows':[]};var _0x484194=_[_0x29bd('0x2b')](db['Trigger'][_0x29bd('0x2c')],function(_0x22b739){return{'name':_0x22b739[_0x29bd('0x2d')],'type':_0x22b739[_0x29bd('0x2e')][_0x29bd('0x2f')]};});_0x41c86d[_0x29bd('0x30')]=_[_0x29bd('0x2b')](_0x484194,_0x29bd('0x29'));_0x41c86d[_0x29bd('0x31')]=_[_0x29bd('0x32')](_0x2cb9bb[_0x29bd('0x31')]);_0x41c86d['filters']=_[_0x29bd('0x33')](_0x41c86d['model'],_0x41c86d[_0x29bd('0x31')]);_0x1f3ea1[_0x29bd('0x34')]=_[_0x29bd('0x33')](_0x41c86d[_0x29bd('0x30')],qs[_0x29bd('0x35')](_0x2cb9bb[_0x29bd('0x31')][_0x29bd('0x35')]));_0x1f3ea1[_0x29bd('0x34')]=_0x1f3ea1['attributes'][_0x29bd('0x36')]?_0x1f3ea1[_0x29bd('0x34')]:_0x41c86d[_0x29bd('0x30')];if(!_0x2cb9bb[_0x29bd('0x31')][_0x29bd('0x37')](_0x29bd('0x38'))){_0x1f3ea1['limit']=qs['limit'](_0x2cb9bb[_0x29bd('0x31')]['limit']);_0x1f3ea1[_0x29bd('0x1d')]=qs[_0x29bd('0x1d')](_0x2cb9bb[_0x29bd('0x31')][_0x29bd('0x1d')]);}_0x1f3ea1['order']=qs[_0x29bd('0x39')](_0x2cb9bb[_0x29bd('0x31')][_0x29bd('0x39')]);_0x1f3ea1[_0x29bd('0x3a')]=qs[_0x29bd('0x3b')](_['pick'](_0x2cb9bb[_0x29bd('0x31')],_0x41c86d['filters']),_0x484194);if(_0x2cb9bb['query'][_0x29bd('0x3c')]){_0x1f3ea1['where']=_[_0x29bd('0x3d')](_0x1f3ea1[_0x29bd('0x3a')],{'$or':_['map'](_0x484194,function(_0xc23e67){if(_0xc23e67[_0x29bd('0x2e')]!==_0x29bd('0x3e')){var _0x330a1a={};_0x330a1a[_0xc23e67[_0x29bd('0x29')]]={'$like':'%'+_0x2cb9bb[_0x29bd('0x31')][_0x29bd('0x3c')]+'%'};return _0x330a1a;}})});}_0x1f3ea1=_[_0x29bd('0x3d')]({},_0x1f3ea1,_0x2cb9bb[_0x29bd('0x3f')]);var _0x1bb4ff={'where':_0x1f3ea1[_0x29bd('0x3a')]};return db['Trigger'][_0x29bd('0x20')](_0x1bb4ff)['then'](function(_0x6390c8){_0x1a0a38['count']=_0x6390c8;if(_0x2cb9bb[_0x29bd('0x31')][_0x29bd('0x40')]){_0x1f3ea1['include']=[{'all':!![]}];}return db[_0x29bd('0x41')][_0x29bd('0x42')](_0x1f3ea1);})[_0x29bd('0x24')](function(_0x5d9a1c){_0x1a0a38[_0x29bd('0x43')]=_0x5d9a1c;return _0x1a0a38;})[_0x29bd('0x24')](respondWithFilteredResult(_0x3fb5b0,_0x1f3ea1))[_0x29bd('0x44')](handleError(_0x3fb5b0,null));};exports[_0x29bd('0x45')]=function(_0x100a98,_0x5bab4a){var _0x1d051b={'raw':![],'where':{'id':_0x100a98[_0x29bd('0x46')]['id']}},_0x4420d7={};_0x4420d7['model']=_['keys'](db[_0x29bd('0x41')]['rawAttributes']);_0x4420d7['query']=_[_0x29bd('0x32')](_0x100a98[_0x29bd('0x31')]);_0x4420d7['filters']=_['intersection'](_0x4420d7[_0x29bd('0x30')],_0x4420d7[_0x29bd('0x31')]);_0x1d051b[_0x29bd('0x34')]=_[_0x29bd('0x33')](_0x4420d7['model'],qs[_0x29bd('0x35')](_0x100a98[_0x29bd('0x31')][_0x29bd('0x35')]));_0x1d051b[_0x29bd('0x34')]=_0x1d051b[_0x29bd('0x34')][_0x29bd('0x36')]?_0x1d051b['attributes']:_0x4420d7[_0x29bd('0x30')];if(_0x100a98[_0x29bd('0x31')][_0x29bd('0x40')]){_0x1d051b['include']=[{'all':!![]}];}_0x1d051b=_[_0x29bd('0x3d')]({},_0x1d051b,_0x100a98[_0x29bd('0x3f')]);return db[_0x29bd('0x41')][_0x29bd('0x47')](_0x1d051b)[_0x29bd('0x24')](handleEntityNotFound(_0x5bab4a,null))[_0x29bd('0x24')](respondWithResult(_0x5bab4a,null))['catch'](handleError(_0x5bab4a,null));};exports['create']=function(_0xf04a1c,_0x4d0088){return db[_0x29bd('0x41')]['create'](_0xf04a1c[_0x29bd('0x48')],{})[_0x29bd('0x24')](function(_0x336181){var _0x43da13=_0xf04a1c[_0x29bd('0x49')][_0x29bd('0x4a')]({'plain':!![]});if(!_0x43da13)throw new Error(_0x29bd('0x4b'));if(_0x43da13[_0x29bd('0x4c')]==='user'){var _0x4a06de=_0x336181['get']({'plain':!![]});var _0x3e538c=_0x29bd('0x26');return db[_0x29bd('0x4d')][_0x29bd('0x47')]({'where':{'name':_0x3e538c,'userProfileId':_0x43da13[_0x29bd('0x4e')]},'raw':!![]})['then'](function(_0xff45f0){if(_0xff45f0&&_0xff45f0[_0x29bd('0x4f')]===0x0){return db['UserProfileResource'][_0x29bd('0x50')]({'name':_0x4a06de[_0x29bd('0x29')],'resourceId':_0x4a06de['id'],'type':_0xff45f0['name'],'sectionId':_0xff45f0['id']},{})[_0x29bd('0x24')](function(){return _0x336181;});}else{return _0x336181;}})['catch'](function(_0x40a354){logger[_0x29bd('0x51')](_0x29bd('0x52'),_0x40a354);throw _0x40a354;});}return _0x336181;})['then'](respondWithResult(_0x4d0088,0xc9))[_0x29bd('0x44')](handleError(_0x4d0088,null));};exports[_0x29bd('0x53')]=function(_0x2049d1,_0x58d9ed){if(_0x2049d1[_0x29bd('0x48')]['id']){delete _0x2049d1[_0x29bd('0x48')]['id'];}return db[_0x29bd('0x41')][_0x29bd('0x47')]({'where':{'id':_0x2049d1['params']['id']}})[_0x29bd('0x24')](handleEntityNotFound(_0x58d9ed,null))[_0x29bd('0x24')](saveUpdates(_0x2049d1[_0x29bd('0x48')],null))['then'](respondWithResult(_0x58d9ed,null))[_0x29bd('0x44')](handleError(_0x58d9ed,null));};exports[_0x29bd('0x25')]=function(_0x1d3206,_0x1e26c7){return db[_0x29bd('0x41')]['find']({'where':{'id':_0x1d3206['params']['id']}})['then'](handleEntityNotFound(_0x1e26c7,null))[_0x29bd('0x24')](removeEntity(_0x1e26c7,null))[_0x29bd('0x44')](handleError(_0x1e26c7,null));};exports[_0x29bd('0x54')]=function(_0x24a8de,_0x565fb3,_0x357aba){if(_0x24a8de[_0x29bd('0x48')]['id']){delete _0x24a8de[_0x29bd('0x48')]['id'];}return db['Trigger']['find']({'where':{'id':_0x24a8de[_0x29bd('0x46')]['id']}})['then'](handleEntityNotFound(_0x565fb3,null))[_0x29bd('0x24')](function(_0x33c320){if(_0x33c320){_0x24a8de[_0x29bd('0x48')][_0x29bd('0x55')]=_0x33c320['id'];return db[_0x29bd('0x56')]['create'](_0x24a8de['body']);}})[_0x29bd('0x24')](respondWithResult(_0x565fb3,null))[_0x29bd('0x44')](handleError(_0x565fb3,null));};exports[_0x29bd('0x57')]=function(_0xafd2c5,_0x3a5eb4,_0x3545e7){if(_0xafd2c5[_0x29bd('0x48')]['id']){delete _0xafd2c5['body']['id'];}return db[_0x29bd('0x41')][_0x29bd('0x47')]({'where':{'id':_0xafd2c5['params']['id']}})[_0x29bd('0x24')](handleEntityNotFound(_0x3a5eb4,null))['then'](function(_0x29a917){if(_0x29a917){_0xafd2c5[_0x29bd('0x48')]['TriggerAnyId']=_0x29a917['id'];return db[_0x29bd('0x56')]['create'](_0xafd2c5['body']);}})[_0x29bd('0x24')](respondWithResult(_0x3a5eb4,null))['catch'](handleError(_0x3a5eb4,null));};exports[_0x29bd('0x58')]=function(_0x438eda,_0x12691c,_0x27a976){var _0x9d168={};var _0x3bdef8={};var _0x72a9fb;var _0xec7cbe;return db[_0x29bd('0x41')]['findOne']({'where':{'id':_0x438eda['params']['id']}})[_0x29bd('0x24')](handleEntityNotFound(_0x12691c,null))[_0x29bd('0x24')](function(_0x21e617){if(_0x21e617){_0x72a9fb=_0x21e617;_0x3bdef8[_0x29bd('0x30')]=_[_0x29bd('0x32')](db['Condition'][_0x29bd('0x2c')]);_0x3bdef8['query']=_[_0x29bd('0x32')](_0x438eda[_0x29bd('0x31')]);_0x3bdef8[_0x29bd('0x3b')]=_['intersection'](_0x3bdef8[_0x29bd('0x30')],_0x3bdef8[_0x29bd('0x31')]);_0x9d168[_0x29bd('0x34')]=_[_0x29bd('0x33')](_0x3bdef8[_0x29bd('0x30')],qs[_0x29bd('0x35')](_0x438eda['query'][_0x29bd('0x35')]));_0x9d168[_0x29bd('0x34')]=_0x9d168[_0x29bd('0x34')][_0x29bd('0x36')]?_0x9d168['attributes']:_0x3bdef8[_0x29bd('0x30')];_0x9d168['order']=qs['sort'](_0x438eda[_0x29bd('0x31')][_0x29bd('0x39')]);_0x9d168[_0x29bd('0x3a')]=qs[_0x29bd('0x3b')](_['pick'](_0x438eda[_0x29bd('0x31')],_0x3bdef8['filters']));if(_0x438eda['query']['filter']){_0x9d168[_0x29bd('0x3a')]=_[_0x29bd('0x3d')](_0x9d168[_0x29bd('0x3a')],{'$or':_[_0x29bd('0x2b')](_0x9d168[_0x29bd('0x34')],function(_0x1dfa2b){var _0x49cf1e={};_0x49cf1e[_0x1dfa2b]={'$like':'%'+_0x438eda['query'][_0x29bd('0x3c')]+'%'};return _0x49cf1e;})});}_0x9d168=_[_0x29bd('0x3d')]({},_0x9d168,_0x438eda[_0x29bd('0x3f')]);return _0x72a9fb[_0x29bd('0x58')](_0x9d168);}})[_0x29bd('0x24')](function(_0xa96b1c){if(_0xa96b1c){_0xec7cbe=_0xa96b1c['length'];if(!_0x438eda[_0x29bd('0x31')]['hasOwnProperty'](_0x29bd('0x38'))){_0x9d168[_0x29bd('0x1f')]=qs['limit'](_0x438eda[_0x29bd('0x31')][_0x29bd('0x1f')]);_0x9d168[_0x29bd('0x1d')]=qs['offset'](_0x438eda['query'][_0x29bd('0x1d')]);}return _0x72a9fb[_0x29bd('0x58')](_0x9d168);}})['then'](function(_0x2f4929){if(_0x2f4929){return _0x2f4929?{'count':_0xec7cbe,'rows':_0x2f4929}:null;}})[_0x29bd('0x24')](respondWithResult(_0x12691c,null))[_0x29bd('0x44')](handleError(_0x12691c,null));};exports[_0x29bd('0x59')]=function(_0xdf3b89,_0x188765,_0x106a1d){var _0x18b3bd={};var _0xd41914={};var _0x13eb98;var _0x222ac0;return db[_0x29bd('0x41')][_0x29bd('0x5a')]({'where':{'id':_0xdf3b89[_0x29bd('0x46')]['id']}})[_0x29bd('0x24')](handleEntityNotFound(_0x188765,null))[_0x29bd('0x24')](function(_0x44a18f){if(_0x44a18f){_0x13eb98=_0x44a18f;_0xd41914['model']=_[_0x29bd('0x32')](db[_0x29bd('0x56')][_0x29bd('0x2c')]);_0xd41914[_0x29bd('0x31')]=_['keys'](_0xdf3b89[_0x29bd('0x31')]);_0xd41914[_0x29bd('0x3b')]=_[_0x29bd('0x33')](_0xd41914[_0x29bd('0x30')],_0xd41914[_0x29bd('0x31')]);_0x18b3bd[_0x29bd('0x34')]=_['intersection'](_0xd41914[_0x29bd('0x30')],qs['fields'](_0xdf3b89[_0x29bd('0x31')][_0x29bd('0x35')]));_0x18b3bd[_0x29bd('0x34')]=_0x18b3bd[_0x29bd('0x34')][_0x29bd('0x36')]?_0x18b3bd[_0x29bd('0x34')]:_0xd41914[_0x29bd('0x30')];_0x18b3bd[_0x29bd('0x5b')]=qs[_0x29bd('0x39')](_0xdf3b89[_0x29bd('0x31')][_0x29bd('0x39')]);_0x18b3bd[_0x29bd('0x3a')]=qs[_0x29bd('0x3b')](_[_0x29bd('0x5c')](_0xdf3b89[_0x29bd('0x31')],_0xd41914[_0x29bd('0x3b')]));if(_0xdf3b89[_0x29bd('0x31')]['filter']){_0x18b3bd[_0x29bd('0x3a')]=_[_0x29bd('0x3d')](_0x18b3bd[_0x29bd('0x3a')],{'$or':_[_0x29bd('0x2b')](_0x18b3bd[_0x29bd('0x34')],function(_0x2a52a9){var _0x35c723={};_0x35c723[_0x2a52a9]={'$like':'%'+_0xdf3b89[_0x29bd('0x31')][_0x29bd('0x3c')]+'%'};return _0x35c723;})});}_0x18b3bd=_['merge']({},_0x18b3bd,_0xdf3b89['options']);return _0x13eb98[_0x29bd('0x59')](_0x18b3bd);}})[_0x29bd('0x24')](function(_0x322aee){if(_0x322aee){_0x222ac0=_0x322aee['length'];if(!_0xdf3b89['query'][_0x29bd('0x37')](_0x29bd('0x38'))){_0x18b3bd[_0x29bd('0x1f')]=qs[_0x29bd('0x1f')](_0xdf3b89[_0x29bd('0x31')][_0x29bd('0x1f')]);_0x18b3bd[_0x29bd('0x1d')]=qs[_0x29bd('0x1d')](_0xdf3b89[_0x29bd('0x31')][_0x29bd('0x1d')]);}return _0x13eb98[_0x29bd('0x59')](_0x18b3bd);}})['then'](function(_0x4a805a){if(_0x4a805a){return _0x4a805a?{'count':_0x222ac0,'rows':_0x4a805a}:null;}})[_0x29bd('0x24')](respondWithResult(_0x188765,null))[_0x29bd('0x44')](handleError(_0x188765,null));};exports[_0x29bd('0x5d')]=function(_0x32114a,_0x19ebeb,_0x2d0663){if(_0x32114a['body']['id']){delete _0x32114a[_0x29bd('0x48')]['id'];}return db['Trigger'][_0x29bd('0x47')]({'where':{'id':_0x32114a[_0x29bd('0x46')]['id']}})[_0x29bd('0x24')](handleEntityNotFound(_0x19ebeb,null))[_0x29bd('0x24')](function(_0x1164f2){if(_0x1164f2){_0x32114a['body']['TriggerId']=_0x1164f2['id'];return db['Action']['create'](_0x32114a[_0x29bd('0x48')]);}})['then'](respondWithResult(_0x19ebeb,null))[_0x29bd('0x44')](handleError(_0x19ebeb,null));};exports[_0x29bd('0x5e')]=function(_0x338844,_0x29a694,_0x1568c0){var _0x237a23={};var _0x3c148d={};var _0x174c9a;var _0x554247;return db[_0x29bd('0x41')][_0x29bd('0x5a')]({'where':{'id':_0x338844['params']['id']}})[_0x29bd('0x24')](handleEntityNotFound(_0x29a694,null))[_0x29bd('0x24')](function(_0x32d479){if(_0x32d479){_0x174c9a=_0x32d479;_0x3c148d['model']=_[_0x29bd('0x32')](db['Action']['rawAttributes']);_0x3c148d['query']=_[_0x29bd('0x32')](_0x338844[_0x29bd('0x31')]);_0x3c148d[_0x29bd('0x3b')]=_['intersection'](_0x3c148d['model'],_0x3c148d['query']);_0x237a23['attributes']=_[_0x29bd('0x33')](_0x3c148d[_0x29bd('0x30')],qs[_0x29bd('0x35')](_0x338844[_0x29bd('0x31')]['fields']));_0x237a23['attributes']=_0x237a23['attributes'][_0x29bd('0x36')]?_0x237a23['attributes']:_0x3c148d[_0x29bd('0x30')];_0x237a23[_0x29bd('0x5b')]=qs['sort'](_0x338844['query'][_0x29bd('0x39')]);_0x237a23[_0x29bd('0x3a')]=qs[_0x29bd('0x3b')](_[_0x29bd('0x5c')](_0x338844[_0x29bd('0x31')],_0x3c148d[_0x29bd('0x3b')]));if(_0x338844[_0x29bd('0x31')][_0x29bd('0x3c')]){_0x237a23['where']=_[_0x29bd('0x3d')](_0x237a23[_0x29bd('0x3a')],{'$or':_[_0x29bd('0x2b')](_0x237a23[_0x29bd('0x34')],function(_0xd77c85){var _0x5e2466={};_0x5e2466[_0xd77c85]={'$like':'%'+_0x338844[_0x29bd('0x31')][_0x29bd('0x3c')]+'%'};return _0x5e2466;})});}_0x237a23=_[_0x29bd('0x3d')]({},_0x237a23,_0x338844[_0x29bd('0x3f')]);return _0x174c9a[_0x29bd('0x5e')](_0x237a23);}})[_0x29bd('0x24')](function(_0xafc8cd){if(_0xafc8cd){_0x554247=_0xafc8cd['length'];if(!_0x338844['query'][_0x29bd('0x37')]('nolimit')){_0x237a23['limit']=qs[_0x29bd('0x1f')](_0x338844[_0x29bd('0x31')][_0x29bd('0x1f')]);_0x237a23[_0x29bd('0x1d')]=qs[_0x29bd('0x1d')](_0x338844['query'][_0x29bd('0x1d')]);}return _0x174c9a[_0x29bd('0x5e')](_0x237a23);}})[_0x29bd('0x24')](function(_0x4144f7){if(_0x4144f7){return _0x4144f7?{'count':_0x554247,'rows':_0x4144f7}:null;}})[_0x29bd('0x24')](respondWithResult(_0x29a694,null))[_0x29bd('0x44')](handleError(_0x29a694,null));};
\ No newline at end of file
+var _0x3ac9=['type','options','include','findAll','rows','catch','show','keys','attributes','includeAll','find','body','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Triggers','userProfileId','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','addAllCondition','TriggerAllId','Condition','addAnyCondition','getAllConditions','intersection','hasOwnProperty','getAnyConditions','findOne','nolimit','addAction','TriggerId','Action','getActions','eml-format','rimraf','moment','bluebird','util','sox','fs-extra','lodash','crypto','desk.js','to-csv','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','sendStatus','status','end','json','offset','undefined','count','limit','apply','reject','save','update','destroy','then','UserProfileResource','error','stack','name','send','index','map','Trigger','rawAttributes','fieldName','key','model','query','fields','length','order','sort','where','filters','pick','filter','merge'];(function(_0x24f77c,_0x305996){var _0x395cbd=function(_0x57680c){while(--_0x57680c){_0x24f77c['push'](_0x24f77c['shift']());}};_0x395cbd(++_0x305996);}(_0x3ac9,0x80));var _0x93ac=function(_0x43de93,_0x5daf15){_0x43de93=_0x43de93-0x0;var _0x168e48=_0x3ac9[_0x43de93];return _0x168e48;};'use strict';var emlformat=require(_0x93ac('0x0'));var rimraf=require(_0x93ac('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x93ac('0x2'));var BPromise=require(_0x93ac('0x3'));var Mustache=require('mustache');var util=require(_0x93ac('0x4'));var path=require('path');var sox=require(_0x93ac('0x5'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x93ac('0x6'));var _=require(_0x93ac('0x7'));var squel=require('squel');var crypto=require(_0x93ac('0x8'));var jsforce=require('jsforce');var deskjs=require(_0x93ac('0x9'));var toCsv=require(_0x93ac('0xa'));var querystring=require(_0x93ac('0xb'));var Papa=require('papaparse');var Redis=require(_0x93ac('0xc'));var authService=require(_0x93ac('0xd'));var qs=require(_0x93ac('0xe'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x93ac('0xf'));var logger=require(_0x93ac('0x10'))('api');var utils=require(_0x93ac('0x11'));var config=require(_0x93ac('0x12'));var licenseUtil=require('../../config/license/util');var db=require(_0x93ac('0x13'))['db'];function respondWithStatusCode(_0x284f3a,_0x5a90cf){_0x5a90cf=_0x5a90cf||0xcc;return function(_0x3da30d){if(_0x3da30d){return _0x284f3a[_0x93ac('0x14')](_0x5a90cf);}return _0x284f3a[_0x93ac('0x15')](_0x5a90cf)[_0x93ac('0x16')]();};}function respondWithResult(_0x2da9ee,_0x360f9d){_0x360f9d=_0x360f9d||0xc8;return function(_0x537dbf){if(_0x537dbf){return _0x2da9ee[_0x93ac('0x15')](_0x360f9d)[_0x93ac('0x17')](_0x537dbf);}};}function respondWithFilteredResult(_0x558c6c,_0x3153fb){return function(_0x45ae20){if(_0x45ae20){var _0x19f94f=typeof _0x3153fb[_0x93ac('0x18')]==='undefined'&&typeof _0x3153fb['limit']===_0x93ac('0x19');var _0x567eb4=_0x45ae20[_0x93ac('0x1a')];var _0x7a9fa8=_0x19f94f?0x0:_0x3153fb[_0x93ac('0x18')];var _0x907424=_0x19f94f?_0x45ae20[_0x93ac('0x1a')]:_0x3153fb[_0x93ac('0x18')]+_0x3153fb[_0x93ac('0x1b')];var _0x12cb79;if(_0x907424>=_0x567eb4){_0x907424=_0x567eb4;_0x12cb79=0xc8;}else{_0x12cb79=0xce;}_0x558c6c[_0x93ac('0x15')](_0x12cb79);return _0x558c6c['set']('Content-Range',_0x7a9fa8+'-'+_0x907424+'/'+_0x567eb4)[_0x93ac('0x17')](_0x45ae20);}return null;};}function patchUpdates(_0x50a043){return function(_0x24e619){try{jsonpatch[_0x93ac('0x1c')](_0x24e619,_0x50a043,!![]);}catch(_0x217527){return BPromise[_0x93ac('0x1d')](_0x217527);}return _0x24e619[_0x93ac('0x1e')]();};}function saveUpdates(_0x1d9179,_0x7f75c4){return function(_0x2982dc){if(_0x2982dc){return _0x2982dc[_0x93ac('0x1f')](_0x1d9179)['then'](function(_0x36f312){return _0x36f312;});}return null;};}function removeEntity(_0x3cecfc,_0x5be991){return function(_0x388a5b){if(_0x388a5b){return _0x388a5b[_0x93ac('0x20')]()[_0x93ac('0x21')](function(){var _0x4b1069=_0x388a5b['get']({'plain':!![]});var _0x27dd32='Triggers';return db[_0x93ac('0x22')][_0x93ac('0x20')]({'where':{'type':_0x27dd32,'resourceId':_0x4b1069['id']}})['then'](function(){return _0x388a5b;});})[_0x93ac('0x21')](function(){_0x3cecfc[_0x93ac('0x15')](0xcc)[_0x93ac('0x16')]();});}};}function handleEntityNotFound(_0x23300f,_0x4cce79){return function(_0x522119){if(!_0x522119){_0x23300f[_0x93ac('0x14')](0x194);}return _0x522119;};}function handleError(_0x537be6,_0x501d7b){_0x501d7b=_0x501d7b||0x1f4;return function(_0x442ad4){logger[_0x93ac('0x23')](_0x442ad4[_0x93ac('0x24')]);if(_0x442ad4[_0x93ac('0x25')]){delete _0x442ad4['name'];}_0x537be6[_0x93ac('0x15')](_0x501d7b)[_0x93ac('0x26')](_0x442ad4);};}exports[_0x93ac('0x27')]=function(_0x2cf54e,_0x1b1c8c){var _0x2308c2={},_0x5036c3={},_0x18b7d2={'count':0x0,'rows':[]};var _0x4962bd=_[_0x93ac('0x28')](db[_0x93ac('0x29')][_0x93ac('0x2a')],function(_0x4453e2){return{'name':_0x4453e2[_0x93ac('0x2b')],'type':_0x4453e2['type'][_0x93ac('0x2c')]};});_0x5036c3[_0x93ac('0x2d')]=_[_0x93ac('0x28')](_0x4962bd,_0x93ac('0x25'));_0x5036c3[_0x93ac('0x2e')]=_['keys'](_0x2cf54e[_0x93ac('0x2e')]);_0x5036c3['filters']=_['intersection'](_0x5036c3['model'],_0x5036c3[_0x93ac('0x2e')]);_0x2308c2['attributes']=_['intersection'](_0x5036c3[_0x93ac('0x2d')],qs[_0x93ac('0x2f')](_0x2cf54e['query'][_0x93ac('0x2f')]));_0x2308c2['attributes']=_0x2308c2['attributes'][_0x93ac('0x30')]?_0x2308c2['attributes']:_0x5036c3[_0x93ac('0x2d')];if(!_0x2cf54e['query']['hasOwnProperty']('nolimit')){_0x2308c2['limit']=qs['limit'](_0x2cf54e[_0x93ac('0x2e')][_0x93ac('0x1b')]);_0x2308c2[_0x93ac('0x18')]=qs['offset'](_0x2cf54e[_0x93ac('0x2e')]['offset']);}_0x2308c2[_0x93ac('0x31')]=qs[_0x93ac('0x32')](_0x2cf54e[_0x93ac('0x2e')][_0x93ac('0x32')]);_0x2308c2[_0x93ac('0x33')]=qs[_0x93ac('0x34')](_[_0x93ac('0x35')](_0x2cf54e['query'],_0x5036c3[_0x93ac('0x34')]),_0x4962bd);if(_0x2cf54e[_0x93ac('0x2e')][_0x93ac('0x36')]){_0x2308c2[_0x93ac('0x33')]=_[_0x93ac('0x37')](_0x2308c2[_0x93ac('0x33')],{'$or':_['map'](_0x4962bd,function(_0x572b36){if(_0x572b36[_0x93ac('0x38')]!=='VIRTUAL'){var _0x5af555={};_0x5af555[_0x572b36['name']]={'$like':'%'+_0x2cf54e['query'][_0x93ac('0x36')]+'%'};return _0x5af555;}})});}_0x2308c2=_[_0x93ac('0x37')]({},_0x2308c2,_0x2cf54e[_0x93ac('0x39')]);var _0x10f4fe={'where':_0x2308c2[_0x93ac('0x33')]};return db[_0x93ac('0x29')]['count'](_0x10f4fe)[_0x93ac('0x21')](function(_0x464053){_0x18b7d2['count']=_0x464053;if(_0x2cf54e[_0x93ac('0x2e')]['includeAll']){_0x2308c2[_0x93ac('0x3a')]=[{'all':!![]}];}return db[_0x93ac('0x29')][_0x93ac('0x3b')](_0x2308c2);})['then'](function(_0x26fcf9){_0x18b7d2[_0x93ac('0x3c')]=_0x26fcf9;return _0x18b7d2;})['then'](respondWithFilteredResult(_0x1b1c8c,_0x2308c2))[_0x93ac('0x3d')](handleError(_0x1b1c8c,null));};exports[_0x93ac('0x3e')]=function(_0x4e4dd7,_0x6fdee1){var _0xa99848={'raw':![],'where':{'id':_0x4e4dd7['params']['id']}},_0xada03f={};_0xada03f[_0x93ac('0x2d')]=_['keys'](db[_0x93ac('0x29')][_0x93ac('0x2a')]);_0xada03f[_0x93ac('0x2e')]=_[_0x93ac('0x3f')](_0x4e4dd7['query']);_0xada03f[_0x93ac('0x34')]=_['intersection'](_0xada03f['model'],_0xada03f['query']);_0xa99848['attributes']=_['intersection'](_0xada03f[_0x93ac('0x2d')],qs['fields'](_0x4e4dd7[_0x93ac('0x2e')]['fields']));_0xa99848['attributes']=_0xa99848[_0x93ac('0x40')]['length']?_0xa99848['attributes']:_0xada03f['model'];if(_0x4e4dd7[_0x93ac('0x2e')][_0x93ac('0x41')]){_0xa99848[_0x93ac('0x3a')]=[{'all':!![]}];}_0xa99848=_[_0x93ac('0x37')]({},_0xa99848,_0x4e4dd7[_0x93ac('0x39')]);return db[_0x93ac('0x29')][_0x93ac('0x42')](_0xa99848)[_0x93ac('0x21')](handleEntityNotFound(_0x6fdee1,null))[_0x93ac('0x21')](respondWithResult(_0x6fdee1,null))[_0x93ac('0x3d')](handleError(_0x6fdee1,null));};exports['create']=function(_0x4951af,_0x4b26fe){return db[_0x93ac('0x29')]['create'](_0x4951af[_0x93ac('0x43')],{})[_0x93ac('0x21')](function(_0x1ac959){var _0x396e96=_0x4951af[_0x93ac('0x44')][_0x93ac('0x45')]({'plain':!![]});if(!_0x396e96)throw new Error(_0x93ac('0x46'));if(_0x396e96[_0x93ac('0x47')]===_0x93ac('0x44')){var _0x53e4c3=_0x1ac959[_0x93ac('0x45')]({'plain':!![]});var _0x143771=_0x93ac('0x48');return db['UserProfileSection'][_0x93ac('0x42')]({'where':{'name':_0x143771,'userProfileId':_0x396e96[_0x93ac('0x49')]},'raw':!![]})[_0x93ac('0x21')](function(_0x25facf){if(_0x25facf&&_0x25facf[_0x93ac('0x4a')]===0x0){return db[_0x93ac('0x22')][_0x93ac('0x4b')]({'name':_0x53e4c3['name'],'resourceId':_0x53e4c3['id'],'type':_0x25facf[_0x93ac('0x25')],'sectionId':_0x25facf['id']},{})[_0x93ac('0x21')](function(){return _0x1ac959;});}else{return _0x1ac959;}})[_0x93ac('0x3d')](function(_0x11c9e8){logger[_0x93ac('0x23')](_0x93ac('0x4c'),_0x11c9e8);throw _0x11c9e8;});}return _0x1ac959;})[_0x93ac('0x21')](respondWithResult(_0x4b26fe,0xc9))[_0x93ac('0x3d')](handleError(_0x4b26fe,null));};exports[_0x93ac('0x1f')]=function(_0x583131,_0x2034ed){if(_0x583131[_0x93ac('0x43')]['id']){delete _0x583131[_0x93ac('0x43')]['id'];}return db['Trigger'][_0x93ac('0x42')]({'where':{'id':_0x583131[_0x93ac('0x4d')]['id']}})['then'](handleEntityNotFound(_0x2034ed,null))[_0x93ac('0x21')](saveUpdates(_0x583131[_0x93ac('0x43')],null))[_0x93ac('0x21')](respondWithResult(_0x2034ed,null))['catch'](handleError(_0x2034ed,null));};exports[_0x93ac('0x20')]=function(_0x38a4ad,_0x25bcc4){return db[_0x93ac('0x29')][_0x93ac('0x42')]({'where':{'id':_0x38a4ad['params']['id']}})[_0x93ac('0x21')](handleEntityNotFound(_0x25bcc4,null))[_0x93ac('0x21')](removeEntity(_0x25bcc4,null))[_0x93ac('0x3d')](handleError(_0x25bcc4,null));};exports[_0x93ac('0x4e')]=function(_0x499844,_0x565031,_0x2a3767){if(_0x499844[_0x93ac('0x43')]['id']){delete _0x499844[_0x93ac('0x43')]['id'];}return db[_0x93ac('0x29')][_0x93ac('0x42')]({'where':{'id':_0x499844['params']['id']}})['then'](handleEntityNotFound(_0x565031,null))[_0x93ac('0x21')](function(_0x26c378){if(_0x26c378){_0x499844[_0x93ac('0x43')][_0x93ac('0x4f')]=_0x26c378['id'];return db[_0x93ac('0x50')][_0x93ac('0x4b')](_0x499844[_0x93ac('0x43')]);}})['then'](respondWithResult(_0x565031,null))[_0x93ac('0x3d')](handleError(_0x565031,null));};exports[_0x93ac('0x51')]=function(_0x4906ae,_0x110913,_0x3d25b3){if(_0x4906ae[_0x93ac('0x43')]['id']){delete _0x4906ae[_0x93ac('0x43')]['id'];}return db['Trigger']['find']({'where':{'id':_0x4906ae['params']['id']}})[_0x93ac('0x21')](handleEntityNotFound(_0x110913,null))[_0x93ac('0x21')](function(_0x31a479){if(_0x31a479){_0x4906ae[_0x93ac('0x43')]['TriggerAnyId']=_0x31a479['id'];return db['Condition'][_0x93ac('0x4b')](_0x4906ae[_0x93ac('0x43')]);}})[_0x93ac('0x21')](respondWithResult(_0x110913,null))[_0x93ac('0x3d')](handleError(_0x110913,null));};exports[_0x93ac('0x52')]=function(_0x2c5f86,_0x5f471a,_0x4b9e58){var _0xd3f72f={};var _0x43642d={};var _0x36b176;var _0x404497;return db[_0x93ac('0x29')]['findOne']({'where':{'id':_0x2c5f86[_0x93ac('0x4d')]['id']}})[_0x93ac('0x21')](handleEntityNotFound(_0x5f471a,null))['then'](function(_0x400b55){if(_0x400b55){_0x36b176=_0x400b55;_0x43642d[_0x93ac('0x2d')]=_[_0x93ac('0x3f')](db['Condition'][_0x93ac('0x2a')]);_0x43642d['query']=_['keys'](_0x2c5f86[_0x93ac('0x2e')]);_0x43642d[_0x93ac('0x34')]=_[_0x93ac('0x53')](_0x43642d[_0x93ac('0x2d')],_0x43642d['query']);_0xd3f72f[_0x93ac('0x40')]=_[_0x93ac('0x53')](_0x43642d[_0x93ac('0x2d')],qs[_0x93ac('0x2f')](_0x2c5f86[_0x93ac('0x2e')][_0x93ac('0x2f')]));_0xd3f72f[_0x93ac('0x40')]=_0xd3f72f['attributes'][_0x93ac('0x30')]?_0xd3f72f['attributes']:_0x43642d[_0x93ac('0x2d')];_0xd3f72f[_0x93ac('0x31')]=qs['sort'](_0x2c5f86[_0x93ac('0x2e')]['sort']);_0xd3f72f['where']=qs['filters'](_[_0x93ac('0x35')](_0x2c5f86[_0x93ac('0x2e')],_0x43642d[_0x93ac('0x34')]));if(_0x2c5f86[_0x93ac('0x2e')][_0x93ac('0x36')]){_0xd3f72f[_0x93ac('0x33')]=_['merge'](_0xd3f72f[_0x93ac('0x33')],{'$or':_[_0x93ac('0x28')](_0xd3f72f[_0x93ac('0x40')],function(_0x24a513){var _0x25315d={};_0x25315d[_0x24a513]={'$like':'%'+_0x2c5f86[_0x93ac('0x2e')]['filter']+'%'};return _0x25315d;})});}_0xd3f72f=_[_0x93ac('0x37')]({},_0xd3f72f,_0x2c5f86['options']);return _0x36b176[_0x93ac('0x52')](_0xd3f72f);}})[_0x93ac('0x21')](function(_0x383b56){if(_0x383b56){_0x404497=_0x383b56[_0x93ac('0x30')];if(!_0x2c5f86[_0x93ac('0x2e')][_0x93ac('0x54')]('nolimit')){_0xd3f72f[_0x93ac('0x1b')]=qs[_0x93ac('0x1b')](_0x2c5f86[_0x93ac('0x2e')]['limit']);_0xd3f72f[_0x93ac('0x18')]=qs[_0x93ac('0x18')](_0x2c5f86[_0x93ac('0x2e')][_0x93ac('0x18')]);}return _0x36b176['getAllConditions'](_0xd3f72f);}})[_0x93ac('0x21')](function(_0x3f5722){if(_0x3f5722){return _0x3f5722?{'count':_0x404497,'rows':_0x3f5722}:null;}})[_0x93ac('0x21')](respondWithResult(_0x5f471a,null))['catch'](handleError(_0x5f471a,null));};exports[_0x93ac('0x55')]=function(_0x563d6d,_0x2a9aa8,_0x31563f){var _0x5c9f85={};var _0x35f0d5={};var _0x4db610;var _0x5fe08e;return db['Trigger'][_0x93ac('0x56')]({'where':{'id':_0x563d6d['params']['id']}})[_0x93ac('0x21')](handleEntityNotFound(_0x2a9aa8,null))[_0x93ac('0x21')](function(_0x18989d){if(_0x18989d){_0x4db610=_0x18989d;_0x35f0d5[_0x93ac('0x2d')]=_[_0x93ac('0x3f')](db[_0x93ac('0x50')][_0x93ac('0x2a')]);_0x35f0d5[_0x93ac('0x2e')]=_[_0x93ac('0x3f')](_0x563d6d[_0x93ac('0x2e')]);_0x35f0d5[_0x93ac('0x34')]=_['intersection'](_0x35f0d5[_0x93ac('0x2d')],_0x35f0d5['query']);_0x5c9f85['attributes']=_['intersection'](_0x35f0d5[_0x93ac('0x2d')],qs[_0x93ac('0x2f')](_0x563d6d[_0x93ac('0x2e')][_0x93ac('0x2f')]));_0x5c9f85[_0x93ac('0x40')]=_0x5c9f85[_0x93ac('0x40')][_0x93ac('0x30')]?_0x5c9f85[_0x93ac('0x40')]:_0x35f0d5[_0x93ac('0x2d')];_0x5c9f85[_0x93ac('0x31')]=qs[_0x93ac('0x32')](_0x563d6d[_0x93ac('0x2e')][_0x93ac('0x32')]);_0x5c9f85[_0x93ac('0x33')]=qs[_0x93ac('0x34')](_[_0x93ac('0x35')](_0x563d6d['query'],_0x35f0d5[_0x93ac('0x34')]));if(_0x563d6d[_0x93ac('0x2e')][_0x93ac('0x36')]){_0x5c9f85[_0x93ac('0x33')]=_['merge'](_0x5c9f85['where'],{'$or':_[_0x93ac('0x28')](_0x5c9f85['attributes'],function(_0x516095){var _0x1aa99a={};_0x1aa99a[_0x516095]={'$like':'%'+_0x563d6d[_0x93ac('0x2e')]['filter']+'%'};return _0x1aa99a;})});}_0x5c9f85=_[_0x93ac('0x37')]({},_0x5c9f85,_0x563d6d[_0x93ac('0x39')]);return _0x4db610[_0x93ac('0x55')](_0x5c9f85);}})['then'](function(_0x2140d0){if(_0x2140d0){_0x5fe08e=_0x2140d0['length'];if(!_0x563d6d[_0x93ac('0x2e')][_0x93ac('0x54')](_0x93ac('0x57'))){_0x5c9f85[_0x93ac('0x1b')]=qs['limit'](_0x563d6d['query'][_0x93ac('0x1b')]);_0x5c9f85[_0x93ac('0x18')]=qs[_0x93ac('0x18')](_0x563d6d[_0x93ac('0x2e')]['offset']);}return _0x4db610['getAnyConditions'](_0x5c9f85);}})[_0x93ac('0x21')](function(_0x57202e){if(_0x57202e){return _0x57202e?{'count':_0x5fe08e,'rows':_0x57202e}:null;}})[_0x93ac('0x21')](respondWithResult(_0x2a9aa8,null))['catch'](handleError(_0x2a9aa8,null));};exports[_0x93ac('0x58')]=function(_0x12a236,_0x4f3f18,_0x4e5994){if(_0x12a236[_0x93ac('0x43')]['id']){delete _0x12a236[_0x93ac('0x43')]['id'];}return db[_0x93ac('0x29')][_0x93ac('0x42')]({'where':{'id':_0x12a236[_0x93ac('0x4d')]['id']}})[_0x93ac('0x21')](handleEntityNotFound(_0x4f3f18,null))[_0x93ac('0x21')](function(_0x346923){if(_0x346923){_0x12a236['body'][_0x93ac('0x59')]=_0x346923['id'];return db[_0x93ac('0x5a')]['create'](_0x12a236['body']);}})[_0x93ac('0x21')](respondWithResult(_0x4f3f18,null))[_0x93ac('0x3d')](handleError(_0x4f3f18,null));};exports['getActions']=function(_0xd7ab3c,_0x10a869,_0x30e5fb){var _0x287a1e={};var _0x369ddf={};var _0x3f452f;var _0x376357;return db[_0x93ac('0x29')][_0x93ac('0x56')]({'where':{'id':_0xd7ab3c[_0x93ac('0x4d')]['id']}})[_0x93ac('0x21')](handleEntityNotFound(_0x10a869,null))[_0x93ac('0x21')](function(_0x4079c5){if(_0x4079c5){_0x3f452f=_0x4079c5;_0x369ddf[_0x93ac('0x2d')]=_[_0x93ac('0x3f')](db[_0x93ac('0x5a')][_0x93ac('0x2a')]);_0x369ddf[_0x93ac('0x2e')]=_[_0x93ac('0x3f')](_0xd7ab3c[_0x93ac('0x2e')]);_0x369ddf['filters']=_[_0x93ac('0x53')](_0x369ddf[_0x93ac('0x2d')],_0x369ddf[_0x93ac('0x2e')]);_0x287a1e[_0x93ac('0x40')]=_['intersection'](_0x369ddf['model'],qs[_0x93ac('0x2f')](_0xd7ab3c[_0x93ac('0x2e')][_0x93ac('0x2f')]));_0x287a1e[_0x93ac('0x40')]=_0x287a1e[_0x93ac('0x40')][_0x93ac('0x30')]?_0x287a1e['attributes']:_0x369ddf[_0x93ac('0x2d')];_0x287a1e['order']=qs[_0x93ac('0x32')](_0xd7ab3c[_0x93ac('0x2e')][_0x93ac('0x32')]);_0x287a1e[_0x93ac('0x33')]=qs[_0x93ac('0x34')](_[_0x93ac('0x35')](_0xd7ab3c[_0x93ac('0x2e')],_0x369ddf['filters']));if(_0xd7ab3c[_0x93ac('0x2e')][_0x93ac('0x36')]){_0x287a1e['where']=_[_0x93ac('0x37')](_0x287a1e[_0x93ac('0x33')],{'$or':_[_0x93ac('0x28')](_0x287a1e[_0x93ac('0x40')],function(_0x310f56){var _0x3b4a1d={};_0x3b4a1d[_0x310f56]={'$like':'%'+_0xd7ab3c[_0x93ac('0x2e')]['filter']+'%'};return _0x3b4a1d;})});}_0x287a1e=_[_0x93ac('0x37')]({},_0x287a1e,_0xd7ab3c['options']);return _0x3f452f[_0x93ac('0x5b')](_0x287a1e);}})['then'](function(_0x342b79){if(_0x342b79){_0x376357=_0x342b79[_0x93ac('0x30')];if(!_0xd7ab3c[_0x93ac('0x2e')]['hasOwnProperty'](_0x93ac('0x57'))){_0x287a1e[_0x93ac('0x1b')]=qs[_0x93ac('0x1b')](_0xd7ab3c[_0x93ac('0x2e')][_0x93ac('0x1b')]);_0x287a1e[_0x93ac('0x18')]=qs[_0x93ac('0x18')](_0xd7ab3c[_0x93ac('0x2e')]['offset']);}return _0x3f452f[_0x93ac('0x5b')](_0x287a1e);}})[_0x93ac('0x21')](function(_0x29dc73){if(_0x29dc73){return _0x29dc73?{'count':_0x376357,'rows':_0x29dc73}:null;}})[_0x93ac('0x21')](respondWithResult(_0x10a869,null))[_0x93ac('0x3d')](handleError(_0x10a869,null));};
\ No newline at end of file
index 5cc229e..492b915 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x47c7=['api','bluebird','request-promise','rimraf','../../config/environment','./trigger.attributes','exports','Trigger','tools_triggers','lodash','../../config/logger'];(function(_0x53f8d1,_0x1bf393){var _0x3d7111=function(_0x196828){while(--_0x196828){_0x53f8d1['push'](_0x53f8d1['shift']());}};_0x3d7111(++_0x1bf393);}(_0x47c7,0x1ab));var _0x747c=function(_0x3ba924,_0x3b99f0){_0x3ba924=_0x3ba924-0x0;var _0x4cc1df=_0x47c7[_0x3ba924];return _0x4cc1df;};'use strict';var _=require(_0x747c('0x0'));var util=require('util');var logger=require(_0x747c('0x1'))(_0x747c('0x2'));var moment=require('moment');var BPromise=require(_0x747c('0x3'));var rp=require(_0x747c('0x4'));var fs=require('fs');var path=require('path');var rimraf=require(_0x747c('0x5'));var config=require(_0x747c('0x6'));var attributes=require(_0x747c('0x7'));module[_0x747c('0x8')]=function(_0x5e991e,_0xa1148a){return _0x5e991e['define'](_0x747c('0x9'),attributes,{'tableName':_0x747c('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xf4d9=['./trigger.attributes','define','tools_triggers','lodash','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment'];(function(_0x2c8099,_0xbaba59){var _0x11f346=function(_0x6fe3c8){while(--_0x6fe3c8){_0x2c8099['push'](_0x2c8099['shift']());}};_0x11f346(++_0xbaba59);}(_0xf4d9,0x7c));var _0x9f4d=function(_0x1245c3,_0x3d5351){_0x1245c3=_0x1245c3-0x0;var _0x47ba48=_0xf4d9[_0x1245c3];return _0x47ba48;};'use strict';var _=require(_0x9f4d('0x0'));var util=require('util');var logger=require(_0x9f4d('0x1'))(_0x9f4d('0x2'));var moment=require(_0x9f4d('0x3'));var BPromise=require(_0x9f4d('0x4'));var rp=require(_0x9f4d('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0x9f4d('0x6'));var config=require(_0x9f4d('0x7'));var attributes=require(_0x9f4d('0x8'));module['exports']=function(_0x191f1c,_0x370059){return _0x191f1c[_0x9f4d('0x9')]('Trigger',attributes,{'tableName':_0x9f4d('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 361722c..f3aa5eb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4260=['limit','include','map','model','GetTrigger','debug','find','ShowTrigger','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','jayson/promise','client','request','then','info','Trigger,\x20%s,\x20%s','request\x20sent','Trigger,\x20%s,\x20%s,\x20%s','stringify','error','message','result','catch','Trigger','findAll','options','raw','where','attributes'];(function(_0x579c34,_0x4d0e71){var _0x1d5059=function(_0xe7badc){while(--_0xe7badc){_0x579c34['push'](_0x579c34['shift']());}};_0x1d5059(++_0x4d0e71);}(_0x4260,0x98));var _0x0426=function(_0x52e482,_0x55f548){_0x52e482=_0x52e482-0x0;var _0x117c9f=_0x4260[_0x52e482];return _0x117c9f;};'use strict';var _=require(_0x0426('0x0'));var util=require(_0x0426('0x1'));var moment=require(_0x0426('0x2'));var BPromise=require(_0x0426('0x3'));var rs=require(_0x0426('0x4'));var fs=require('fs');var Redis=require(_0x0426('0x5'));var db=require(_0x0426('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0x0426('0x7'))(_0x0426('0x8'));var config=require('../../config/environment');var jayson=require(_0x0426('0x9'));var client=jayson[_0x0426('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x324d20,_0x5a3145,_0x355b22){return new BPromise(function(_0x1b2aa9,_0xf81585){return client[_0x0426('0xb')](_0x324d20,_0x355b22)[_0x0426('0xc')](function(_0x139cd9){logger[_0x0426('0xd')](_0x0426('0xe'),_0x5a3145,_0x0426('0xf'));logger['debug'](_0x0426('0x10'),_0x5a3145,'request\x20sent',JSON[_0x0426('0x11')](_0x139cd9));if(_0x139cd9[_0x0426('0x12')]){if(_0x139cd9['error']['code']===0x1f4){logger[_0x0426('0x12')](_0x0426('0xe'),_0x5a3145,_0x139cd9[_0x0426('0x12')][_0x0426('0x13')]);return _0xf81585(_0x139cd9[_0x0426('0x12')][_0x0426('0x13')]);}logger[_0x0426('0x12')]('Trigger,\x20%s,\x20%s',_0x5a3145,_0x139cd9[_0x0426('0x12')][_0x0426('0x13')]);return _0x1b2aa9(_0x139cd9['error']['message']);}else{logger[_0x0426('0xd')]('Trigger,\x20%s,\x20%s',_0x5a3145,_0x0426('0xf'));_0x1b2aa9(_0x139cd9[_0x0426('0x14')][_0x0426('0x13')]);}})[_0x0426('0x15')](function(_0x2fe236){logger['error'](_0x0426('0xe'),_0x5a3145,_0x2fe236);_0xf81585(_0x2fe236);});});}exports['GetTrigger']=function(_0x2cb6fd){var _0x801e2c=this;return new Promise(function(_0x10c61a,_0x3d44a5){return db[_0x0426('0x16')][_0x0426('0x17')]({'raw':_0x2cb6fd['options']?_0x2cb6fd[_0x0426('0x18')][_0x0426('0x19')]===undefined?!![]:![]:!![],'where':_0x2cb6fd['options']?_0x2cb6fd['options'][_0x0426('0x1a')]||null:null,'attributes':_0x2cb6fd[_0x0426('0x18')]?_0x2cb6fd[_0x0426('0x18')][_0x0426('0x1b')]||null:null,'limit':_0x2cb6fd[_0x0426('0x18')]?_0x2cb6fd[_0x0426('0x18')][_0x0426('0x1c')]||null:null,'include':_0x2cb6fd[_0x0426('0x18')]?_0x2cb6fd[_0x0426('0x18')][_0x0426('0x1d')]?_[_0x0426('0x1e')](_0x2cb6fd[_0x0426('0x18')][_0x0426('0x1d')],function(_0x2865f2){return{'model':db[_0x2865f2[_0x0426('0x1f')]],'as':_0x2865f2['as'],'attributes':_0x2865f2[_0x0426('0x1b')],'include':_0x2865f2[_0x0426('0x1d')]?_['map'](_0x2865f2[_0x0426('0x1d')],function(_0x3d337e){return{'model':db[_0x3d337e[_0x0426('0x1f')]],'as':_0x3d337e['as'],'attributes':_0x3d337e[_0x0426('0x1b')],'include':_0x3d337e[_0x0426('0x1d')]?_['map'](_0x3d337e[_0x0426('0x1d')],function(_0x526251){return{'model':db[_0x526251[_0x0426('0x1f')]],'as':_0x526251['as'],'attributes':_0x526251[_0x0426('0x1b')]};}):[]};}):[]};}):[]:[]})[_0x0426('0xc')](function(_0x5e4bcc){logger[_0x0426('0xd')](_0x0426('0x20'),_0x2cb6fd);logger[_0x0426('0x21')](_0x0426('0x20'),_0x2cb6fd,JSON[_0x0426('0x11')](_0x5e4bcc));_0x10c61a(_0x5e4bcc);})[_0x0426('0x15')](function(_0x4030d8){logger[_0x0426('0x12')](_0x0426('0x20'),_0x4030d8[_0x0426('0x13')],_0x2cb6fd);_0x3d44a5(_0x801e2c[_0x0426('0x12')](0x1f4,_0x4030d8[_0x0426('0x13')]));});});};exports['ShowTrigger']=function(_0x520db1){var _0x5bec28=this;return new Promise(function(_0x2df7b9,_0x32c105){return db[_0x0426('0x16')][_0x0426('0x22')]({'raw':_0x520db1[_0x0426('0x18')]?_0x520db1[_0x0426('0x18')][_0x0426('0x19')]===undefined?!![]:![]:!![],'where':_0x520db1[_0x0426('0x18')]?_0x520db1[_0x0426('0x18')][_0x0426('0x1a')]||null:null,'attributes':_0x520db1[_0x0426('0x18')]?_0x520db1[_0x0426('0x18')][_0x0426('0x1b')]||null:null,'include':_0x520db1['options']?_0x520db1[_0x0426('0x18')][_0x0426('0x1d')]?_['map'](_0x520db1[_0x0426('0x18')][_0x0426('0x1d')],function(_0x4ef941){return{'model':db[_0x4ef941['model']],'as':_0x4ef941['as'],'attributes':_0x4ef941[_0x0426('0x1b')],'include':_0x4ef941[_0x0426('0x1d')]?_[_0x0426('0x1e')](_0x4ef941['include'],function(_0x2624cd){return{'model':db[_0x2624cd[_0x0426('0x1f')]],'as':_0x2624cd['as'],'attributes':_0x2624cd[_0x0426('0x1b')],'include':_0x2624cd[_0x0426('0x1d')]?_[_0x0426('0x1e')](_0x2624cd[_0x0426('0x1d')],function(_0x1ed3af){return{'model':db[_0x1ed3af[_0x0426('0x1f')]],'as':_0x1ed3af['as'],'attributes':_0x1ed3af[_0x0426('0x1b')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x12e5e7){logger[_0x0426('0xd')](_0x0426('0x23'),_0x520db1);logger[_0x0426('0x21')]('ShowTrigger',_0x520db1,JSON[_0x0426('0x11')](_0x12e5e7));_0x2df7b9(_0x12e5e7);})[_0x0426('0x15')](function(_0x545a17){logger[_0x0426('0x12')](_0x0426('0x23'),_0x545a17['message'],_0x520db1);_0x32c105(_0x5bec28[_0x0426('0x12')](0x1f4,_0x545a17[_0x0426('0x13')]));});});};
\ No newline at end of file
+var _0xba79=['error','code','message','Trigger,\x20%s,\x20%s','info','catch','GetTrigger','Trigger','options','raw','where','attributes','limit','include','model','map','debug','find','ShowTrigger','lodash','util','moment','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','request','then','Trigger,\x20%s,\x20%s,\x20%s','request\x20sent','stringify'];(function(_0x2bf141,_0x31eac7){var _0x48277b=function(_0x9fe560){while(--_0x9fe560){_0x2bf141['push'](_0x2bf141['shift']());}};_0x48277b(++_0x31eac7);}(_0xba79,0x153));var _0x9ba7=function(_0x51b51a,_0x2f156c){_0x51b51a=_0x51b51a-0x0;var _0x40bcd6=_0xba79[_0x51b51a];return _0x40bcd6;};'use strict';var _=require(_0x9ba7('0x0'));var util=require(_0x9ba7('0x1'));var moment=require(_0x9ba7('0x2'));var BPromise=require('bluebird');var rs=require(_0x9ba7('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x9ba7('0x4'));var logger=require(_0x9ba7('0x5'))(_0x9ba7('0x6'));var config=require(_0x9ba7('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x1c10fa,_0x13ebfa,_0x5e90f8){return new BPromise(function(_0x118de6,_0xb43f3d){return client[_0x9ba7('0x8')](_0x1c10fa,_0x5e90f8)[_0x9ba7('0x9')](function(_0x15869d){logger['info']('Trigger,\x20%s,\x20%s',_0x13ebfa,'request\x20sent');logger['debug'](_0x9ba7('0xa'),_0x13ebfa,_0x9ba7('0xb'),JSON[_0x9ba7('0xc')](_0x15869d));if(_0x15869d[_0x9ba7('0xd')]){if(_0x15869d[_0x9ba7('0xd')][_0x9ba7('0xe')]===0x1f4){logger[_0x9ba7('0xd')]('Trigger,\x20%s,\x20%s',_0x13ebfa,_0x15869d[_0x9ba7('0xd')]['message']);return _0xb43f3d(_0x15869d['error'][_0x9ba7('0xf')]);}logger['error'](_0x9ba7('0x10'),_0x13ebfa,_0x15869d[_0x9ba7('0xd')][_0x9ba7('0xf')]);return _0x118de6(_0x15869d[_0x9ba7('0xd')]['message']);}else{logger[_0x9ba7('0x11')](_0x9ba7('0x10'),_0x13ebfa,_0x9ba7('0xb'));_0x118de6(_0x15869d['result'][_0x9ba7('0xf')]);}})[_0x9ba7('0x12')](function(_0xb06eb1){logger[_0x9ba7('0xd')]('Trigger,\x20%s,\x20%s',_0x13ebfa,_0xb06eb1);_0xb43f3d(_0xb06eb1);});});}exports[_0x9ba7('0x13')]=function(_0x4144d0){var _0x3ce66a=this;return new Promise(function(_0x1e8b39,_0x547352){return db[_0x9ba7('0x14')]['findAll']({'raw':_0x4144d0['options']?_0x4144d0[_0x9ba7('0x15')][_0x9ba7('0x16')]===undefined?!![]:![]:!![],'where':_0x4144d0[_0x9ba7('0x15')]?_0x4144d0[_0x9ba7('0x15')][_0x9ba7('0x17')]||null:null,'attributes':_0x4144d0[_0x9ba7('0x15')]?_0x4144d0[_0x9ba7('0x15')][_0x9ba7('0x18')]||null:null,'limit':_0x4144d0[_0x9ba7('0x15')]?_0x4144d0[_0x9ba7('0x15')][_0x9ba7('0x19')]||null:null,'include':_0x4144d0[_0x9ba7('0x15')]?_0x4144d0['options']['include']?_['map'](_0x4144d0['options'][_0x9ba7('0x1a')],function(_0x285374){return{'model':db[_0x285374[_0x9ba7('0x1b')]],'as':_0x285374['as'],'attributes':_0x285374[_0x9ba7('0x18')],'include':_0x285374[_0x9ba7('0x1a')]?_[_0x9ba7('0x1c')](_0x285374[_0x9ba7('0x1a')],function(_0x3ac188){return{'model':db[_0x3ac188['model']],'as':_0x3ac188['as'],'attributes':_0x3ac188[_0x9ba7('0x18')],'include':_0x3ac188[_0x9ba7('0x1a')]?_[_0x9ba7('0x1c')](_0x3ac188['include'],function(_0x425397){return{'model':db[_0x425397['model']],'as':_0x425397['as'],'attributes':_0x425397[_0x9ba7('0x18')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x57cbd6){logger['info'](_0x9ba7('0x13'),_0x4144d0);logger[_0x9ba7('0x1d')](_0x9ba7('0x13'),_0x4144d0,JSON[_0x9ba7('0xc')](_0x57cbd6));_0x1e8b39(_0x57cbd6);})['catch'](function(_0x270da2){logger[_0x9ba7('0xd')](_0x9ba7('0x13'),_0x270da2[_0x9ba7('0xf')],_0x4144d0);_0x547352(_0x3ce66a[_0x9ba7('0xd')](0x1f4,_0x270da2['message']));});});};exports['ShowTrigger']=function(_0x13d1ed){var _0x5314a9=this;return new Promise(function(_0x54a5c4,_0x553799){return db[_0x9ba7('0x14')][_0x9ba7('0x1e')]({'raw':_0x13d1ed[_0x9ba7('0x15')]?_0x13d1ed['options'][_0x9ba7('0x16')]===undefined?!![]:![]:!![],'where':_0x13d1ed['options']?_0x13d1ed[_0x9ba7('0x15')]['where']||null:null,'attributes':_0x13d1ed['options']?_0x13d1ed['options'][_0x9ba7('0x18')]||null:null,'include':_0x13d1ed[_0x9ba7('0x15')]?_0x13d1ed[_0x9ba7('0x15')][_0x9ba7('0x1a')]?_[_0x9ba7('0x1c')](_0x13d1ed[_0x9ba7('0x15')][_0x9ba7('0x1a')],function(_0x588378){return{'model':db[_0x588378['model']],'as':_0x588378['as'],'attributes':_0x588378['attributes'],'include':_0x588378['include']?_[_0x9ba7('0x1c')](_0x588378['include'],function(_0x378b42){return{'model':db[_0x378b42[_0x9ba7('0x1b')]],'as':_0x378b42['as'],'attributes':_0x378b42['attributes'],'include':_0x378b42[_0x9ba7('0x1a')]?_[_0x9ba7('0x1c')](_0x378b42[_0x9ba7('0x1a')],function(_0x2ac067){return{'model':db[_0x2ac067[_0x9ba7('0x1b')]],'as':_0x2ac067['as'],'attributes':_0x2ac067['attributes']};}):[]};}):[]};}):[]:[]})[_0x9ba7('0x9')](function(_0x124f37){logger[_0x9ba7('0x11')]('ShowTrigger',_0x13d1ed);logger[_0x9ba7('0x1d')](_0x9ba7('0x1f'),_0x13d1ed,JSON[_0x9ba7('0xc')](_0x124f37));_0x54a5c4(_0x124f37);})[_0x9ba7('0x12')](function(_0x1dc06a){logger[_0x9ba7('0xd')](_0x9ba7('0x1f'),_0x1dc06a[_0x9ba7('0xf')],_0x13d1ed);_0x553799(_0x5314a9[_0x9ba7('0xd')](0x1f4,_0x1dc06a[_0x9ba7('0xf')]));});});};
\ No newline at end of file
index f9e150d..bee5b2d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb338=['path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./trunk.controller','get','isAuthenticated','index','show','post','/:id/clone','clone','create','/:id','delete','destroy','multer','util'];(function(_0x5c846e,_0x4063c1){var _0x375c0b=function(_0x14210e){while(--_0x14210e){_0x5c846e['push'](_0x5c846e['shift']());}};_0x375c0b(++_0x4063c1);}(_0xb338,0x102));var _0x8b33=function(_0xaaa123,_0x4c23e3){_0xaaa123=_0xaaa123-0x0;var _0x44d6d7=_0xb338[_0xaaa123];return _0x44d6d7;};'use strict';var multer=require(_0x8b33('0x0'));var util=require(_0x8b33('0x1'));var path=require(_0x8b33('0x2'));var timeout=require(_0x8b33('0x3'));var express=require('express');var router=express[_0x8b33('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x8b33('0x5'));var interaction=require(_0x8b33('0x6'));var config=require(_0x8b33('0x7'));var controller=require(_0x8b33('0x8'));router[_0x8b33('0x9')]('/',auth[_0x8b33('0xa')](),controller[_0x8b33('0xb')]);router[_0x8b33('0x9')]('/:id',auth[_0x8b33('0xa')](),controller[_0x8b33('0xc')]);router[_0x8b33('0xd')](_0x8b33('0xe'),auth[_0x8b33('0xa')](),controller[_0x8b33('0xf')]);router[_0x8b33('0xd')]('/',auth['isAuthenticated'](),controller[_0x8b33('0x10')]);router['put'](_0x8b33('0x11'),auth[_0x8b33('0xa')](),controller['update']);router[_0x8b33('0x12')](_0x8b33('0x11'),auth['isAuthenticated'](),controller[_0x8b33('0x13')]);module['exports']=router;
\ No newline at end of file
+var _0xe76f=['exports','multer','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','index','show','post','put','update','delete','/:id','destroy'];(function(_0x3789b9,_0x5c2f00){var _0x4d020d=function(_0x170650){while(--_0x170650){_0x3789b9['push'](_0x3789b9['shift']());}};_0x4d020d(++_0x5c2f00);}(_0xe76f,0x17d));var _0xfe76=function(_0xc4001c,_0x1bf8f0){_0xc4001c=_0xc4001c-0x0;var _0x49f7bc=_0xe76f[_0xc4001c];return _0x49f7bc;};'use strict';var multer=require(_0xfe76('0x0'));var util=require(_0xfe76('0x1'));var path=require(_0xfe76('0x2'));var timeout=require(_0xfe76('0x3'));var express=require(_0xfe76('0x4'));var router=express['Router']();var fs_extra=require(_0xfe76('0x5'));var auth=require(_0xfe76('0x6'));var interaction=require(_0xfe76('0x7'));var config=require('../../config/environment');var controller=require('./trunk.controller');router[_0xfe76('0x8')]('/',auth[_0xfe76('0x9')](),controller[_0xfe76('0xa')]);router[_0xfe76('0x8')]('/:id',auth['isAuthenticated'](),controller[_0xfe76('0xb')]);router['post']('/:id/clone',auth[_0xfe76('0x9')](),controller['clone']);router[_0xfe76('0xc')]('/',auth[_0xfe76('0x9')](),controller['create']);router[_0xfe76('0xd')]('/:id',auth[_0xfe76('0x9')](),controller[_0xfe76('0xe')]);router[_0xfe76('0xf')](_0xfe76('0x10'),auth[_0xfe76('0x9')](),controller[_0xfe76('0x11')]);module[_0xfe76('0x12')]=router;
\ No newline at end of file
index beb56b6..2a5500c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfaea=['join','split','ulaw;alaw;gsm','allow','port,invite','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','INTEGER','\x22\x22\x20<>','always','accept','refuse','originate','uac','uas','pai','fingerprint','certificate','active','passive','actpass','dynamic','update,nonat','BOOLEAN','sequelize','exports','STRING','name','friend','user','peer','from-voip-provider','ENUM','ALLOWED_NOT_SCREENED','ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN','ALLOWED','PROHIB_FAILED_SCREEN','PROHIB','udp','setDataValue','getDataValue','transport','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','rfc2833','info','shortinfo','inband','auto','yes','update','outgoing','force_rport,comedia','nat'];(function(_0x5f1391,_0x19c132){var _0x50ebe3=function(_0x3d00a3){while(--_0x3d00a3){_0x5f1391['push'](_0x5f1391['shift']());}};_0x50ebe3(++_0x19c132);}(_0xfaea,0x1c8));var _0xafae=function(_0x43026b,_0x928d8c){_0x43026b=_0x43026b-0x0;var _0x4a96cd=_0xfaea[_0x43026b];return _0x4a96cd;};'use strict';var Sequelize=require(_0xafae('0x0'));module[_0xafae('0x1')]={'name':{'type':Sequelize[_0xafae('0x2')],'allowNull':![],'unique':_0xafae('0x3'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize['ENUM'](_0xafae('0x4'),_0xafae('0x5'),_0xafae('0x6')),'allowNull':![],'defaultValue':_0xafae('0x4')},'context':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xafae('0x7')},'callingpres':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x9'),_0xafae('0xa'),_0xafae('0xb'),_0xafae('0xc'),'PROHIB_NOT_SCREENED','PROHIB_PASSED_SCREEN',_0xafae('0xd'),_0xafae('0xe'))},'deny':{'type':Sequelize['STRING']},'permit':{'type':Sequelize[_0xafae('0x2')]},'secret':{'type':Sequelize[_0xafae('0x2')]},'md5secret':{'type':Sequelize[_0xafae('0x2')]},'remotesecret':{'type':Sequelize[_0xafae('0x2')]},'transport':{'type':Sequelize[_0xafae('0x2')],'defaultValue':_0xafae('0xf'),'set':function(_0x5e48fc){this[_0xafae('0x10')]('transport',_0x5e48fc?_0x5e48fc['join'](','):null);},'get':function(){return this[_0xafae('0x11')]('transport')?this[_0xafae('0x11')](_0xafae('0x12'))['split'](','):null;},'comment':_0xafae('0x13')},'dtmfmode':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x14'),_0xafae('0x15'),_0xafae('0x16'),_0xafae('0x17'),_0xafae('0x18')),'defaultValue':_0xafae('0x14')},'directmedia':{'type':Sequelize['ENUM'](_0xafae('0x19'),'no','nonat',_0xafae('0x1a'),_0xafae('0x1b')),'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0xafae('0x8')]('yes','no'),'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0xafae('0x2')]},'directmediadeny':{'type':Sequelize['STRING']},'nat':{'type':Sequelize[_0xafae('0x2')],'defaultValue':_0xafae('0x1c'),'set':function(_0x3fe8a9){this['setDataValue'](_0xafae('0x1d'),_0x3fe8a9?_0x3fe8a9[_0xafae('0x1e')](','):null);},'get':function(){return this[_0xafae('0x11')](_0xafae('0x1d'))?this[_0xafae('0x11')](_0xafae('0x1d'))[_0xafae('0x1f')](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]'},'callgroup':{'type':Sequelize[_0xafae('0x2')]},'namedcallgroup':{'type':Sequelize['STRING']},'pickupgroup':{'type':Sequelize[_0xafae('0x2')]},'namedpickupgroup':{'type':Sequelize[_0xafae('0x2')]},'language':{'type':Sequelize[_0xafae('0x2')],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0xafae('0x2')],'allowNull':!![]},'disallow':{'type':Sequelize[_0xafae('0x2')],'defaultValue':'all'},'allow':{'type':Sequelize[_0xafae('0x2')],'allowNull':![],'defaultValue':_0xafae('0x20'),'set':function(_0x31c8e3){this[_0xafae('0x10')]('allow',_0x31c8e3?_0x31c8e3[_0xafae('0x1e')](';'):_0xafae('0x20'));},'get':function(){return this[_0xafae('0x11')](_0xafae('0x21'))?this[_0xafae('0x11')]('allow')[_0xafae('0x1f')](';'):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22alaw\x22]'},'autoframing':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x19'),'no')},'insecure':{'type':Sequelize['STRING'],'defaultValue':_0xafae('0x22'),'set':function(_0x333d79){this[_0xafae('0x10')](_0xafae('0x23'),_0x333d79?_0x333d79[_0xafae('0x1e')](','):null);},'get':function(){return this[_0xafae('0x11')](_0xafae('0x23'))?this[_0xafae('0x11')](_0xafae('0x23'))[_0xafae('0x1f')](','):null;},'comment':_0xafae('0x24')},'trustrpid':{'type':Sequelize[_0xafae('0x8')]('yes','no'),'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x19'),'no'),'defaultValue':'no'},'progressinband':{'type':Sequelize['ENUM'](_0xafae('0x19'),'no','never')},'promiscredir':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x19'),'no')},'useclientcode':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x19'),'no')},'accountcode':{'type':Sequelize[_0xafae('0x25')](0xb)},'setvar':{'type':Sequelize[_0xafae('0x2')]},'callerid':{'type':Sequelize[_0xafae('0x2')],'defaultValue':_0xafae('0x26')},'amaflags':{'type':Sequelize[_0xafae('0x2')]},'callcounter':{'type':Sequelize[_0xafae('0x8')]('yes','no'),'defaultValue':'yes'},'busylevel':{'type':Sequelize[_0xafae('0x25')](0xb)},'allowoverlap':{'type':Sequelize[_0xafae('0x8')]('yes','no')},'allowsubscribe':{'type':Sequelize['ENUM'](_0xafae('0x19'),'no')},'allowtransfer':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x19'),'no')},'ignoresdpversion':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x19'),'no')},'subscribecontext':{'type':Sequelize[_0xafae('0x2')]},'template':{'type':Sequelize[_0xafae('0x2')]},'videosupport':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x19'),'no',_0xafae('0x27')),'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0xafae('0x25')](0xb)},'rfc2833compensate':{'type':Sequelize['ENUM'](_0xafae('0x19'),'no')},'mailbox':{'type':Sequelize[_0xafae('0x2')]},'session_timers':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x28'),_0xafae('0x29'),_0xafae('0x2a'))},'session_expires':{'type':Sequelize[_0xafae('0x25')](0xb)},'session_minse':{'type':Sequelize[_0xafae('0x25')](0xb)},'session_refresher':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x2b'),_0xafae('0x2c')),'defaultValue':_0xafae('0x2c')},'t38pt_usertpsource':{'type':Sequelize[_0xafae('0x2')]},'regexten':{'type':Sequelize[_0xafae('0x2')]},'fromdomain':{'type':Sequelize['STRING']},'fromuser':{'type':Sequelize[_0xafae('0x2')]},'port':{'type':Sequelize[_0xafae('0x25')](0x5)},'qualify':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x19'),'no'),'defaultValue':'yes'},'keepalive':{'type':Sequelize['INTEGER'](0xb)},'defaultip':{'type':Sequelize[_0xafae('0x2')]},'defaultuser':{'type':Sequelize[_0xafae('0x2')]},'rtptimeout':{'type':Sequelize[_0xafae('0x25')](0xb)},'rtpholdtimeout':{'type':Sequelize[_0xafae('0x25')](0xb)},'rtpkeepalive':{'type':Sequelize[_0xafae('0x25')](0xb)},'sendrpid':{'type':Sequelize['ENUM'](_0xafae('0x19'),'no',_0xafae('0x2d')),'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0xafae('0x2')]},'callbackextension':{'type':Sequelize[_0xafae('0x2')]},'timert1':{'type':Sequelize[_0xafae('0x25')](0xb)},'timerb':{'type':Sequelize['INTEGER'](0xb)},'qualifyfreq':{'type':Sequelize[_0xafae('0x25')](0xb)},'contactpermit':{'type':Sequelize[_0xafae('0x2')]},'contactdeny':{'type':Sequelize[_0xafae('0x2')]},'contactacl':{'type':Sequelize['STRING']},'unsolicited_mailbox':{'type':Sequelize['STRING']},'use_q850_reason':{'type':Sequelize[_0xafae('0x2')]},'maxforwards':{'type':Sequelize[_0xafae('0x25')](0xb)},'encryption':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x19'),'no'),'defaultValue':'no'},'avpf':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x19'),'no')},'force_avp':{'type':Sequelize['ENUM']('yes','no')},'icesupport':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x19'),'no')},'dtlsenable':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x19'),'no')},'dtlsverify':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x19'),'no',_0xafae('0x2e'),_0xafae('0x2f'))},'dtlsrekey':{'type':Sequelize['INTEGER'](0xb)},'dtlscertfile':{'type':Sequelize[_0xafae('0x2')]},'dtlsprivatekey':{'type':Sequelize['STRING']},'dtlscipher':{'type':Sequelize[_0xafae('0x2')]},'dtlscafile':{'type':Sequelize[_0xafae('0x2')]},'dtlscapath':{'type':Sequelize['STRING']},'dtlssetup':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x30'),_0xafae('0x31'),_0xafae('0x32')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0xafae('0x2')]},'usereqphone':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x19'),'no'),'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0xafae('0x2')]},'recordofffeature':{'type':Sequelize[_0xafae('0x2')]},'call_limit':{'type':Sequelize[_0xafae('0x25')](0xb),'defaultValue':0x3e8},'registertrying':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x19'),'no')},'subscribemwi':{'type':Sequelize[_0xafae('0x8')](_0xafae('0x19'),'no')},'vmexten':{'type':Sequelize[_0xafae('0x2')]},'mohinterpret':{'type':Sequelize[_0xafae('0x2')]},'mohsuggest':{'type':Sequelize[_0xafae('0x2')]},'parkinglot':{'type':Sequelize[_0xafae('0x2')]},'description':{'type':Sequelize[_0xafae('0x2')]},'host':{'type':Sequelize['STRING'],'defaultValue':_0xafae('0x33')},'canreinvite':{'type':Sequelize[_0xafae('0x8')]('yes','no','nonat','update',_0xafae('0x34')),'defaultValue':'no'},'registry':{'type':Sequelize[_0xafae('0x2')]},'otherFields':{'type':Sequelize[_0xafae('0x2')]},'active':{'type':Sequelize[_0xafae('0x35')],'allowNull':![],'defaultValue':!![]},'t38pt_udptl':{'type':Sequelize[_0xafae('0x2')],'defaultValue':'no'}};
\ No newline at end of file
+var _0xddb9=['getDataValue','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','rfc2833','info','inband','auto','nonat','yes','force_rport,comedia','nat','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]','all','allow','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22alaw\x22]','port,invite','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','never','INTEGER','\x22\x22\x20<>','accept','refuse','originate','uac','uas','pai','fingerprint','certificate','passive','actpass','dynamic','sequelize','exports','name','ENUM','friend','user','STRING','from-voip-provider','ALLOWED_NOT_SCREENED','ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN','ALLOWED','PROHIB_NOT_SCREENED','PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN','PROHIB','udp','setDataValue','transport','join'];(function(_0x5b644e,_0x2e5e07){var _0x49c6bf=function(_0x3032d9){while(--_0x3032d9){_0x5b644e['push'](_0x5b644e['shift']());}};_0x49c6bf(++_0x2e5e07);}(_0xddb9,0x88));var _0x9ddb=function(_0x38fb7a,_0x3b3f40){_0x38fb7a=_0x38fb7a-0x0;var _0x139937=_0xddb9[_0x38fb7a];return _0x139937;};'use strict';var Sequelize=require(_0x9ddb('0x0'));module[_0x9ddb('0x1')]={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x9ddb('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x4'),_0x9ddb('0x5'),'peer'),'allowNull':![],'defaultValue':_0x9ddb('0x4')},'context':{'type':Sequelize[_0x9ddb('0x6')],'allowNull':![],'defaultValue':_0x9ddb('0x7')},'callingpres':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x8'),_0x9ddb('0x9'),_0x9ddb('0xa'),_0x9ddb('0xb'),_0x9ddb('0xc'),_0x9ddb('0xd'),_0x9ddb('0xe'),_0x9ddb('0xf'))},'deny':{'type':Sequelize[_0x9ddb('0x6')]},'permit':{'type':Sequelize['STRING']},'secret':{'type':Sequelize[_0x9ddb('0x6')]},'md5secret':{'type':Sequelize['STRING']},'remotesecret':{'type':Sequelize[_0x9ddb('0x6')]},'transport':{'type':Sequelize[_0x9ddb('0x6')],'defaultValue':_0x9ddb('0x10'),'set':function(_0x3fd0d8){this[_0x9ddb('0x11')](_0x9ddb('0x12'),_0x3fd0d8?_0x3fd0d8[_0x9ddb('0x13')](','):null);},'get':function(){return this[_0x9ddb('0x14')](_0x9ddb('0x12'))?this['getDataValue'](_0x9ddb('0x12'))[_0x9ddb('0x15')](','):null;},'comment':_0x9ddb('0x16')},'dtmfmode':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x17'),_0x9ddb('0x18'),'shortinfo',_0x9ddb('0x19'),_0x9ddb('0x1a')),'defaultValue':_0x9ddb('0x17')},'directmedia':{'type':Sequelize[_0x9ddb('0x3')]('yes','no',_0x9ddb('0x1b'),'update','outgoing'),'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x1c'),'no'),'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x9ddb('0x6')]},'directmediadeny':{'type':Sequelize[_0x9ddb('0x6')]},'nat':{'type':Sequelize[_0x9ddb('0x6')],'defaultValue':_0x9ddb('0x1d'),'set':function(_0x5b896d){this['setDataValue']('nat',_0x5b896d?_0x5b896d[_0x9ddb('0x13')](','):null);},'get':function(){return this[_0x9ddb('0x14')](_0x9ddb('0x1e'))?this[_0x9ddb('0x14')]('nat')['split'](','):null;},'comment':_0x9ddb('0x1f')},'callgroup':{'type':Sequelize['STRING']},'namedcallgroup':{'type':Sequelize[_0x9ddb('0x6')]},'pickupgroup':{'type':Sequelize['STRING']},'namedpickupgroup':{'type':Sequelize[_0x9ddb('0x6')]},'language':{'type':Sequelize[_0x9ddb('0x6')],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0x9ddb('0x6')],'allowNull':!![]},'disallow':{'type':Sequelize[_0x9ddb('0x6')],'defaultValue':_0x9ddb('0x20')},'allow':{'type':Sequelize[_0x9ddb('0x6')],'allowNull':![],'defaultValue':'ulaw;alaw;gsm','set':function(_0x581b79){this[_0x9ddb('0x11')]('allow',_0x581b79?_0x581b79[_0x9ddb('0x13')](';'):'ulaw;alaw;gsm');},'get':function(){return this[_0x9ddb('0x14')]('allow')?this['getDataValue'](_0x9ddb('0x21'))[_0x9ddb('0x15')](';'):null;},'comment':_0x9ddb('0x22')},'autoframing':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x1c'),'no')},'insecure':{'type':Sequelize[_0x9ddb('0x6')],'defaultValue':_0x9ddb('0x23'),'set':function(_0x216938){this[_0x9ddb('0x11')](_0x9ddb('0x24'),_0x216938?_0x216938[_0x9ddb('0x13')](','):null);},'get':function(){return this[_0x9ddb('0x14')](_0x9ddb('0x24'))?this[_0x9ddb('0x14')](_0x9ddb('0x24'))[_0x9ddb('0x15')](','):null;},'comment':_0x9ddb('0x25')},'trustrpid':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x1c'),'no'),'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x1c'),'no'),'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x1c'),'no',_0x9ddb('0x26'))},'promiscredir':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x1c'),'no')},'useclientcode':{'type':Sequelize['ENUM'](_0x9ddb('0x1c'),'no')},'accountcode':{'type':Sequelize[_0x9ddb('0x27')](0xb)},'setvar':{'type':Sequelize[_0x9ddb('0x6')]},'callerid':{'type':Sequelize[_0x9ddb('0x6')],'defaultValue':_0x9ddb('0x28')},'amaflags':{'type':Sequelize[_0x9ddb('0x6')]},'callcounter':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':_0x9ddb('0x1c')},'busylevel':{'type':Sequelize[_0x9ddb('0x27')](0xb)},'allowoverlap':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x1c'),'no')},'allowsubscribe':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x1c'),'no')},'allowtransfer':{'type':Sequelize['ENUM'](_0x9ddb('0x1c'),'no')},'ignoresdpversion':{'type':Sequelize['ENUM'](_0x9ddb('0x1c'),'no')},'subscribecontext':{'type':Sequelize[_0x9ddb('0x6')]},'template':{'type':Sequelize[_0x9ddb('0x6')]},'videosupport':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x1c'),'no','always'),'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0x9ddb('0x27')](0xb)},'rfc2833compensate':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x1c'),'no')},'mailbox':{'type':Sequelize[_0x9ddb('0x6')]},'session_timers':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x29'),_0x9ddb('0x2a'),_0x9ddb('0x2b'))},'session_expires':{'type':Sequelize['INTEGER'](0xb)},'session_minse':{'type':Sequelize[_0x9ddb('0x27')](0xb)},'session_refresher':{'type':Sequelize['ENUM'](_0x9ddb('0x2c'),_0x9ddb('0x2d')),'defaultValue':_0x9ddb('0x2d')},'t38pt_usertpsource':{'type':Sequelize[_0x9ddb('0x6')]},'regexten':{'type':Sequelize[_0x9ddb('0x6')]},'fromdomain':{'type':Sequelize[_0x9ddb('0x6')]},'fromuser':{'type':Sequelize[_0x9ddb('0x6')]},'port':{'type':Sequelize['INTEGER'](0x5)},'qualify':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x1c'),'no'),'defaultValue':_0x9ddb('0x1c')},'keepalive':{'type':Sequelize[_0x9ddb('0x27')](0xb)},'defaultip':{'type':Sequelize['STRING']},'defaultuser':{'type':Sequelize[_0x9ddb('0x6')]},'rtptimeout':{'type':Sequelize[_0x9ddb('0x27')](0xb)},'rtpholdtimeout':{'type':Sequelize[_0x9ddb('0x27')](0xb)},'rtpkeepalive':{'type':Sequelize[_0x9ddb('0x27')](0xb)},'sendrpid':{'type':Sequelize['ENUM']('yes','no',_0x9ddb('0x2e')),'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0x9ddb('0x6')]},'callbackextension':{'type':Sequelize[_0x9ddb('0x6')]},'timert1':{'type':Sequelize[_0x9ddb('0x27')](0xb)},'timerb':{'type':Sequelize[_0x9ddb('0x27')](0xb)},'qualifyfreq':{'type':Sequelize[_0x9ddb('0x27')](0xb)},'contactpermit':{'type':Sequelize[_0x9ddb('0x6')]},'contactdeny':{'type':Sequelize[_0x9ddb('0x6')]},'contactacl':{'type':Sequelize['STRING']},'unsolicited_mailbox':{'type':Sequelize[_0x9ddb('0x6')]},'use_q850_reason':{'type':Sequelize['STRING']},'maxforwards':{'type':Sequelize[_0x9ddb('0x27')](0xb)},'encryption':{'type':Sequelize[_0x9ddb('0x3')]('yes','no'),'defaultValue':'no'},'avpf':{'type':Sequelize['ENUM'](_0x9ddb('0x1c'),'no')},'force_avp':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x1c'),'no')},'icesupport':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x1c'),'no')},'dtlsenable':{'type':Sequelize[_0x9ddb('0x3')]('yes','no')},'dtlsverify':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x1c'),'no',_0x9ddb('0x2f'),_0x9ddb('0x30'))},'dtlsrekey':{'type':Sequelize[_0x9ddb('0x27')](0xb)},'dtlscertfile':{'type':Sequelize[_0x9ddb('0x6')]},'dtlsprivatekey':{'type':Sequelize[_0x9ddb('0x6')]},'dtlscipher':{'type':Sequelize[_0x9ddb('0x6')]},'dtlscafile':{'type':Sequelize[_0x9ddb('0x6')]},'dtlscapath':{'type':Sequelize[_0x9ddb('0x6')]},'dtlssetup':{'type':Sequelize['ENUM']('active',_0x9ddb('0x31'),_0x9ddb('0x32')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0x9ddb('0x6')]},'usereqphone':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x1c'),'no'),'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0x9ddb('0x6')]},'recordofffeature':{'type':Sequelize[_0x9ddb('0x6')]},'call_limit':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x3e8},'registertrying':{'type':Sequelize[_0x9ddb('0x3')](_0x9ddb('0x1c'),'no')},'subscribemwi':{'type':Sequelize['ENUM']('yes','no')},'vmexten':{'type':Sequelize['STRING']},'mohinterpret':{'type':Sequelize[_0x9ddb('0x6')]},'mohsuggest':{'type':Sequelize['STRING']},'parkinglot':{'type':Sequelize[_0x9ddb('0x6')]},'description':{'type':Sequelize[_0x9ddb('0x6')]},'host':{'type':Sequelize[_0x9ddb('0x6')],'defaultValue':_0x9ddb('0x33')},'canreinvite':{'type':Sequelize['ENUM'](_0x9ddb('0x1c'),'no','nonat','update','update,nonat'),'defaultValue':'no'},'registry':{'type':Sequelize[_0x9ddb('0x6')]},'otherFields':{'type':Sequelize['STRING']},'active':{'type':Sequelize['BOOLEAN'],'allowNull':![],'defaultValue':!![]},'t38pt_udptl':{'type':Sequelize[_0x9ddb('0x6')],'defaultValue':'no'}};
\ No newline at end of file
index 87e0a01..54b180d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x81bd=['/etc/asterisk/sip_xcally_trunks.conf','registry','render','/etc/asterisk/sip_xcally_registers.conf','Reload','chan_sip.so','update','server/files/templates/trunk.ejs','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','path','sox','ejs','fs-extra','lodash','jsforce','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','jayson/promise','http','request','then','info','Trunk,\x20%s,\x20%s','debug','Trunk,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','destroy','UserProfileResource','name','index','Trunk','rawAttributes','fieldName','key','model','map','query','keys','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','clone','find','get','omit','createdAt','updatedAt','body','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Trunks','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','readFileSync','join','root','server/files/templates/registry.ejs','utf8','writeFileSync'];(function(_0x4a9fb1,_0x273043){var _0x348672=function(_0x142b69){while(--_0x142b69){_0x4a9fb1['push'](_0x4a9fb1['shift']());}};_0x348672(++_0x273043);}(_0x81bd,0x7c));var _0xd81b=function(_0x324189,_0x202ac1){_0x324189=_0x324189-0x0;var _0x495eee=_0x81bd[_0x324189];return _0x495eee;};'use strict';var emlformat=require(_0xd81b('0x0'));var rimraf=require(_0xd81b('0x1'));var zipdir=require(_0xd81b('0x2'));var jsonpatch=require(_0xd81b('0x3'));var rp=require(_0xd81b('0x4'));var moment=require(_0xd81b('0x5'));var BPromise=require(_0xd81b('0x6'));var Mustache=require('mustache');var util=require(_0xd81b('0x7'));var path=require(_0xd81b('0x8'));var sox=require(_0xd81b('0x9'));var csv=require('to-csv');var ejs=require(_0xd81b('0xa'));var fs=require('fs');var fs_extra=require(_0xd81b('0xb'));var _=require(_0xd81b('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xd81b('0xd'));var deskjs=require('desk.js');var toCsv=require(_0xd81b('0xe'));var querystring=require(_0xd81b('0xf'));var Papa=require(_0xd81b('0x10'));var Redis=require(_0xd81b('0x11'));var authService=require(_0xd81b('0x12'));var qs=require(_0xd81b('0x13'));var as=require(_0xd81b('0x14'));var hardwareService=require(_0xd81b('0x15'));var logger=require(_0xd81b('0x16'))(_0xd81b('0x17'));var utils=require(_0xd81b('0x18'));var config=require(_0xd81b('0x19'));var licenseUtil=require(_0xd81b('0x1a'));var db=require('../../mysqldb')['db'];var jayson=require(_0xd81b('0x1b'));var client=jayson['client'][_0xd81b('0x1c')]({'port':0x232a});function respondWithRpcPromise(_0xe75568,_0x5f0b6b,_0x35a053,_0x47dd04){return new BPromise(function(_0x13dd00,_0x41bf7a){var _0x6c6041=_0x47dd04||client;return _0x6c6041[_0xd81b('0x1d')](_0xe75568,_0x35a053)[_0xd81b('0x1e')](function(_0x552215){logger[_0xd81b('0x1f')](_0xd81b('0x20'),_0x5f0b6b,'request\x20sent');logger[_0xd81b('0x21')](_0xd81b('0x22'),_0x5f0b6b,_0xd81b('0x23'),JSON[_0xd81b('0x24')](_0x552215));if(_0x552215[_0xd81b('0x25')]){if(_0x552215[_0xd81b('0x25')][_0xd81b('0x26')]===0x1f4){logger[_0xd81b('0x25')](_0xd81b('0x20'),_0x5f0b6b,_0x552215[_0xd81b('0x25')][_0xd81b('0x27')]);return _0x41bf7a(_0x552215[_0xd81b('0x25')][_0xd81b('0x27')]);}logger[_0xd81b('0x25')](_0xd81b('0x20'),_0x5f0b6b,_0x552215[_0xd81b('0x25')]['message']);return _0x13dd00(_0x552215['error'][_0xd81b('0x27')]);}else{logger[_0xd81b('0x1f')](_0xd81b('0x20'),_0x5f0b6b,'request\x20sent');_0x13dd00(_0x552215[_0xd81b('0x28')][_0xd81b('0x27')]);}})['catch'](function(_0xcd6474){logger[_0xd81b('0x25')](_0xd81b('0x20'),_0x5f0b6b,_0xcd6474);_0x41bf7a(_0xcd6474);});});}function respondWithStatusCode(_0x1ad65c,_0x279176){_0x279176=_0x279176||0xcc;return function(_0xcb4f91){if(_0xcb4f91){return _0x1ad65c[_0xd81b('0x29')](_0x279176);}return _0x1ad65c[_0xd81b('0x2a')](_0x279176)[_0xd81b('0x2b')]();};}function respondWithResult(_0x212c4e,_0x2ccedf){_0x2ccedf=_0x2ccedf||0xc8;return function(_0x1bf351){if(_0x1bf351){return _0x212c4e['status'](_0x2ccedf)[_0xd81b('0x2c')](_0x1bf351);}};}function respondWithFilteredResult(_0x99dbc9,_0xe3637a){return function(_0x31b9fd){if(_0x31b9fd){var _0x3266c2=typeof _0xe3637a[_0xd81b('0x2d')]===_0xd81b('0x2e')&&typeof _0xe3637a[_0xd81b('0x2f')]===_0xd81b('0x2e');var _0x483a3d=_0x31b9fd[_0xd81b('0x30')];var _0x4e2eff=_0x3266c2?0x0:_0xe3637a['offset'];var _0xb9ff9f=_0x3266c2?_0x31b9fd[_0xd81b('0x30')]:_0xe3637a['offset']+_0xe3637a['limit'];var _0x4093c8;if(_0xb9ff9f>=_0x483a3d){_0xb9ff9f=_0x483a3d;_0x4093c8=0xc8;}else{_0x4093c8=0xce;}_0x99dbc9[_0xd81b('0x2a')](_0x4093c8);return _0x99dbc9[_0xd81b('0x31')](_0xd81b('0x32'),_0x4e2eff+'-'+_0xb9ff9f+'/'+_0x483a3d)[_0xd81b('0x2c')](_0x31b9fd);}return null;};}function patchUpdates(_0x4654ba){return function(_0x5527ed){try{jsonpatch[_0xd81b('0x33')](_0x5527ed,_0x4654ba,!![]);}catch(_0x26f629){return BPromise['reject'](_0x26f629);}return _0x5527ed['save']();};}function saveUpdates(_0x165892,_0x1966b1){return function(_0x50472a){if(_0x50472a){return _0x50472a['update'](_0x165892)['then'](function(_0x322991){return _0x322991;});}return null;};}function removeEntity(_0x3ead68,_0x1d2f46){return function(_0x1c4cf7){if(_0x1c4cf7){return _0x1c4cf7[_0xd81b('0x34')]()[_0xd81b('0x1e')](function(){var _0x29aabf=_0x1c4cf7['get']({'plain':!![]});var _0x28782f='Trunks';return db[_0xd81b('0x35')][_0xd81b('0x34')]({'where':{'type':_0x28782f,'resourceId':_0x29aabf['id']}})[_0xd81b('0x1e')](function(){return _0x1c4cf7;});})[_0xd81b('0x1e')](function(){_0x3ead68[_0xd81b('0x2a')](0xcc)[_0xd81b('0x2b')]();});}};}function handleEntityNotFound(_0x1c20d3,_0x2d23b9){return function(_0xf9d1a5){if(!_0xf9d1a5){_0x1c20d3[_0xd81b('0x29')](0x194);}return _0xf9d1a5;};}function handleError(_0x1be4e2,_0x3c8371){_0x3c8371=_0x3c8371||0x1f4;return function(_0x346038){logger['error'](_0x346038['stack']);if(_0x346038[_0xd81b('0x36')]){delete _0x346038[_0xd81b('0x36')];}_0x1be4e2[_0xd81b('0x2a')](_0x3c8371)['send'](_0x346038);};}exports[_0xd81b('0x37')]=function(_0x37ba34,_0x5a236a){var _0x46f058={},_0xaa9e97={},_0x512e39={'count':0x0,'rows':[]};var _0xed5272=_['map'](db[_0xd81b('0x38')][_0xd81b('0x39')],function(_0x203365){return{'name':_0x203365[_0xd81b('0x3a')],'type':_0x203365['type'][_0xd81b('0x3b')]};});_0xaa9e97[_0xd81b('0x3c')]=_[_0xd81b('0x3d')](_0xed5272,_0xd81b('0x36'));_0xaa9e97[_0xd81b('0x3e')]=_[_0xd81b('0x3f')](_0x37ba34[_0xd81b('0x3e')]);_0xaa9e97['filters']=_[_0xd81b('0x40')](_0xaa9e97[_0xd81b('0x3c')],_0xaa9e97[_0xd81b('0x3e')]);_0x46f058['attributes']=_[_0xd81b('0x40')](_0xaa9e97[_0xd81b('0x3c')],qs[_0xd81b('0x41')](_0x37ba34[_0xd81b('0x3e')][_0xd81b('0x41')]));_0x46f058['attributes']=_0x46f058[_0xd81b('0x42')][_0xd81b('0x43')]?_0x46f058[_0xd81b('0x42')]:_0xaa9e97[_0xd81b('0x3c')];if(!_0x37ba34[_0xd81b('0x3e')][_0xd81b('0x44')](_0xd81b('0x45'))){_0x46f058[_0xd81b('0x2f')]=qs[_0xd81b('0x2f')](_0x37ba34[_0xd81b('0x3e')][_0xd81b('0x2f')]);_0x46f058['offset']=qs[_0xd81b('0x2d')](_0x37ba34[_0xd81b('0x3e')][_0xd81b('0x2d')]);}_0x46f058[_0xd81b('0x46')]=qs[_0xd81b('0x47')](_0x37ba34[_0xd81b('0x3e')][_0xd81b('0x47')]);_0x46f058[_0xd81b('0x48')]=qs['filters'](_['pick'](_0x37ba34[_0xd81b('0x3e')],_0xaa9e97[_0xd81b('0x49')]),_0xed5272);if(_0x37ba34[_0xd81b('0x3e')][_0xd81b('0x4a')]){_0x46f058[_0xd81b('0x48')]=_[_0xd81b('0x4b')](_0x46f058[_0xd81b('0x48')],{'$or':_[_0xd81b('0x3d')](_0xed5272,function(_0x2fa588){if(_0x2fa588[_0xd81b('0x4c')]!==_0xd81b('0x4d')){var _0x38e436={};_0x38e436[_0x2fa588['name']]={'$like':'%'+_0x37ba34[_0xd81b('0x3e')][_0xd81b('0x4a')]+'%'};return _0x38e436;}})});}_0x46f058=_[_0xd81b('0x4b')]({},_0x46f058,_0x37ba34[_0xd81b('0x4e')]);var _0x105a48={'where':_0x46f058[_0xd81b('0x48')]};return db[_0xd81b('0x38')][_0xd81b('0x30')](_0x105a48)[_0xd81b('0x1e')](function(_0x53ea36){_0x512e39[_0xd81b('0x30')]=_0x53ea36;if(_0x37ba34[_0xd81b('0x3e')][_0xd81b('0x4f')]){_0x46f058[_0xd81b('0x50')]=[{'all':!![]}];}return db['Trunk'][_0xd81b('0x51')](_0x46f058);})[_0xd81b('0x1e')](function(_0x15030b){_0x512e39[_0xd81b('0x52')]=_0x15030b;return _0x512e39;})[_0xd81b('0x1e')](respondWithFilteredResult(_0x5a236a,_0x46f058))[_0xd81b('0x53')](handleError(_0x5a236a,null));};exports[_0xd81b('0x54')]=function(_0x43d7ce,_0x133a76){var _0x49cba6={'raw':![],'where':{'id':_0x43d7ce[_0xd81b('0x55')]['id']}},_0x534d10={};_0x534d10[_0xd81b('0x3c')]=_[_0xd81b('0x3f')](db[_0xd81b('0x38')][_0xd81b('0x39')]);_0x534d10[_0xd81b('0x3e')]=_[_0xd81b('0x3f')](_0x43d7ce[_0xd81b('0x3e')]);_0x534d10['filters']=_[_0xd81b('0x40')](_0x534d10[_0xd81b('0x3c')],_0x534d10[_0xd81b('0x3e')]);_0x49cba6[_0xd81b('0x42')]=_[_0xd81b('0x40')](_0x534d10['model'],qs[_0xd81b('0x41')](_0x43d7ce[_0xd81b('0x3e')]['fields']));_0x49cba6[_0xd81b('0x42')]=_0x49cba6[_0xd81b('0x42')][_0xd81b('0x43')]?_0x49cba6[_0xd81b('0x42')]:_0x534d10[_0xd81b('0x3c')];if(_0x43d7ce[_0xd81b('0x3e')][_0xd81b('0x4f')]){_0x49cba6[_0xd81b('0x50')]=[{'all':!![]}];}_0x49cba6=_[_0xd81b('0x4b')]({},_0x49cba6,_0x43d7ce[_0xd81b('0x4e')]);return db[_0xd81b('0x38')]['find'](_0x49cba6)[_0xd81b('0x1e')](handleEntityNotFound(_0x133a76,null))['then'](respondWithResult(_0x133a76,null))[_0xd81b('0x53')](handleError(_0x133a76,null));};exports[_0xd81b('0x56')]=function(_0x390db6,_0x3c2a9f){var _0x34d2a2={'where':{'id':_0x390db6['params']['id']}},_0x1e9f73={};_0x1e9f73[_0xd81b('0x3c')]=_[_0xd81b('0x3f')](db['Trunk']['rawAttributes']);_0x34d2a2[_0xd81b('0x42')]=_['intersection'](_0x1e9f73[_0xd81b('0x3c')],qs['fields'](_0x390db6[_0xd81b('0x3e')][_0xd81b('0x41')]));_0x34d2a2[_0xd81b('0x42')]=_0x34d2a2['attributes'][_0xd81b('0x43')]?_0x34d2a2[_0xd81b('0x42')]:_0x1e9f73['model'];if(_0x390db6[_0xd81b('0x3e')][_0xd81b('0x4f')]){_0x34d2a2['include']=[{'all':!![]}];}_0x34d2a2=_[_0xd81b('0x4b')]({},_0x34d2a2,_0x390db6['options']);return db[_0xd81b('0x38')][_0xd81b('0x57')](_0x34d2a2)[_0xd81b('0x1e')](handleEntityNotFound(_0x3c2a9f,null))[_0xd81b('0x1e')](function(_0x4add79){if(_0x4add79){var _0x32eab4=_0x4add79[_0xd81b('0x58')]({'plain':!![]});_0x32eab4=qs[_0xd81b('0x59')](_0x32eab4,['id',_0xd81b('0x5a'),_0xd81b('0x5b')]);_0x390db6['body']=_[_0xd81b('0x59')](_0x390db6[_0xd81b('0x5c')],['id',_0xd81b('0x5a'),_0xd81b('0x5b')]);return db[_0xd81b('0x38')][_0xd81b('0x5d')](_[_0xd81b('0x4b')](_0x32eab4,_0x390db6['body']),{'include':_0x390db6['query']['includeAll']?[{'all':!![]}]:undefined})[_0xd81b('0x1e')](function(_0x12b0bf){var _0x37507e=_0x390db6[_0xd81b('0x5e')][_0xd81b('0x58')]({'plain':!![]});if(!_0x37507e)throw new Error(_0xd81b('0x5f'));if(_0x37507e[_0xd81b('0x60')]==='user'){var _0x3fcd8c=_0x12b0bf[_0xd81b('0x58')]({'plain':!![]});var _0x35c9cf=_0xd81b('0x61');return db[_0xd81b('0x62')][_0xd81b('0x57')]({'where':{'name':_0x35c9cf,'userProfileId':_0x37507e[_0xd81b('0x63')]},'raw':!![]})['then'](function(_0x14b187){if(_0x14b187&&_0x14b187[_0xd81b('0x64')]===0x0){return db[_0xd81b('0x35')][_0xd81b('0x5d')]({'name':_0x3fcd8c[_0xd81b('0x36')],'resourceId':_0x3fcd8c['id'],'type':_0x14b187[_0xd81b('0x36')],'sectionId':_0x14b187['id']},{})[_0xd81b('0x1e')](function(){return _0x12b0bf;});}else{return _0x12b0bf;}})[_0xd81b('0x53')](function(_0x8fa8cd){logger[_0xd81b('0x25')](_0xd81b('0x65'),_0x8fa8cd);throw _0x8fa8cd;});}return _0x12b0bf;});}})[_0xd81b('0x1e')](respondWithResult(_0x3c2a9f,0xc9))['catch'](handleError(_0x3c2a9f,null));};exports[_0xd81b('0x5d')]=function(_0x5358a6,_0x2e7141,_0x6fa974){var _0x414f40;return db[_0xd81b('0x38')][_0xd81b('0x5d')](_0x5358a6[_0xd81b('0x5c')],{'raw':!![]})[_0xd81b('0x1e')](function(_0x18f2ac){_0x414f40=_0x18f2ac;return db[_0xd81b('0x38')][_0xd81b('0x51')]({'raw':!![]});})['then'](function(_0xfa2a13){var _0x344c32=fs[_0xd81b('0x66')](path[_0xd81b('0x67')](config[_0xd81b('0x68')],'server/files/templates/trunk.ejs'),'utf8');var _0x3274d2=fs[_0xd81b('0x66')](path[_0xd81b('0x67')](config[_0xd81b('0x68')],_0xd81b('0x69')),_0xd81b('0x6a'));var _0xaee7e3=ejs['render'](_0x344c32,{'trunks':_0xfa2a13||[]});fs[_0xd81b('0x6b')](_0xd81b('0x6c'),_0xaee7e3);if(_0x414f40[_0xd81b('0x6d')]){var _0x1c6ec8=ejs[_0xd81b('0x6e')](_0x3274d2,{'trunks':_0xfa2a13||[]});fs[_0xd81b('0x6b')](_0xd81b('0x6f'),_0x1c6ec8);}})[_0xd81b('0x1e')](function(){return respondWithRpcPromise(_0xd81b('0x70'),'create',{'module':_0xd81b('0x71')});})[_0xd81b('0x1e')](function(){var _0x3858eb=_0x5358a6[_0xd81b('0x5e')][_0xd81b('0x58')]({'plain':!![]});if(!_0x3858eb)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x3858eb[_0xd81b('0x60')]===_0xd81b('0x5e')){var _0x4cc440=_0x414f40[_0xd81b('0x58')]({'plain':!![]});return db[_0xd81b('0x62')]['find']({'where':{'name':_0xd81b('0x61'),'userProfileId':_0x3858eb[_0xd81b('0x63')]},'raw':!![]})[_0xd81b('0x1e')](function(_0x483026){if(_0x483026&&_0x483026[_0xd81b('0x64')]===0x0){return db[_0xd81b('0x35')][_0xd81b('0x5d')]({'name':_0x4cc440['name'],'resourceId':_0x4cc440['id'],'type':_0x483026['name'],'sectionId':_0x483026['id']},{})[_0xd81b('0x1e')](function(){return _0x414f40;});}else{return _0x414f40;}})[_0xd81b('0x53')](function(_0x36c694){logger['error'](_0xd81b('0x65'),_0x36c694);throw _0x36c694;});}return _0x414f40;})[_0xd81b('0x1e')](respondWithResult(_0x2e7141,0xc9))[_0xd81b('0x53')](handleError(_0x2e7141,null));};exports[_0xd81b('0x72')]=function(_0x524196,_0x4f69a7,_0x42ae01){var _0x256696;return db[_0xd81b('0x38')][_0xd81b('0x57')]({'where':{'id':_0x524196['params']['id']}})[_0xd81b('0x1e')](handleEntityNotFound(_0x4f69a7,null))[_0xd81b('0x1e')](saveUpdates(_0x524196['body'],null))[_0xd81b('0x1e')](function(_0x4e5bf4){if(_0x4e5bf4){_0x256696=_0x4e5bf4;return db[_0xd81b('0x38')][_0xd81b('0x51')]({'raw':!![]});}})['then'](function(_0x1be0e6){if(_0x1be0e6){var _0x9a9634=fs[_0xd81b('0x66')](path[_0xd81b('0x67')](config[_0xd81b('0x68')],'server/files/templates/trunk.ejs'),_0xd81b('0x6a'));var _0xc0e137=fs[_0xd81b('0x66')](path[_0xd81b('0x67')](config[_0xd81b('0x68')],_0xd81b('0x69')),'utf8');var _0x5c8ea0=ejs[_0xd81b('0x6e')](_0x9a9634,{'trunks':_0x1be0e6||[]});fs[_0xd81b('0x6b')](_0xd81b('0x6c'),_0x5c8ea0);var _0x15aed5=ejs['render'](_0xc0e137,{'trunks':_0x1be0e6||[]});fs[_0xd81b('0x6b')](_0xd81b('0x6f'),_0x15aed5);return respondWithRpcPromise(_0xd81b('0x70'),_0xd81b('0x72'),{'module':_0xd81b('0x71')});}return null;})['then'](function(_0x3744bf){if(_0x3744bf){return _0x256696;}})[_0xd81b('0x1e')](respondWithResult(_0x4f69a7,null))[_0xd81b('0x53')](handleError(_0x4f69a7,null));};exports[_0xd81b('0x34')]=function(_0x1d596c,_0x288124,_0x402eb9){var _0x57179a;return db[_0xd81b('0x38')][_0xd81b('0x57')]({'where':{'id':_0x1d596c[_0xd81b('0x55')]['id']}})[_0xd81b('0x1e')](handleEntityNotFound(_0x288124,null))[_0xd81b('0x1e')](removeEntity(_0x288124,null))[_0xd81b('0x1e')](function(){return db['Trunk'][_0xd81b('0x51')]({'raw':!![]});})['then'](function(_0x11e590){var _0x9e6e05=fs[_0xd81b('0x66')](path['join'](config[_0xd81b('0x68')],_0xd81b('0x73')),_0xd81b('0x6a'));var _0x5060dc=fs[_0xd81b('0x66')](path[_0xd81b('0x67')](config['root'],_0xd81b('0x69')),'utf8');var _0x5f5514=ejs[_0xd81b('0x6e')](_0x9e6e05,{'trunks':_0x11e590});var _0x428317=ejs[_0xd81b('0x6e')](_0x5060dc,{'trunks':_0x11e590});fs['writeFileSync'](_0xd81b('0x6c'),_0x5f5514);fs[_0xd81b('0x6b')](_0xd81b('0x6f'),_0x428317);return respondWithRpcPromise(_0xd81b('0x70'),_0xd81b('0x34'),{'module':_0xd81b('0x71')});})['catch'](handleError(_0x288124,null));};
\ No newline at end of file
+var _0x55ca=['catch','status','json','offset','undefined','count','limit','Content-Range','apply','save','update','destroy','get','UserProfileResource','end','stack','name','send','Trunk','rawAttributes','type','model','map','filters','intersection','query','attributes','fields','hasOwnProperty','nolimit','order','sort','pick','where','merge','VIRTUAL','filter','includeAll','include','findAll','rows','show','params','keys','length','options','find','clone','omit','updatedAt','body','createdAt','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','Trunks','UserProfileSection','userProfileId','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','join','server/files/templates/trunk.ejs','utf8','root','server/files/templates/registry.ejs','writeFileSync','/etc/asterisk/sip_xcally_trunks.conf','registry','render','Reload','chan_sip.so','readFileSync','/etc/asterisk/sip_xcally_registers.conf','eml-format','rimraf','moment','bluebird','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','querystring','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','http','request','then','info','Trunk,\x20%s,\x20%s','request\x20sent','debug','Trunk,\x20%s,\x20%s,\x20%s','stringify','error','message','result'];(function(_0x483e25,_0x4ad841){var _0x48a61b=function(_0x30b0e3){while(--_0x30b0e3){_0x483e25['push'](_0x483e25['shift']());}};_0x48a61b(++_0x4ad841);}(_0x55ca,0x126));var _0xa55c=function(_0x154192,_0x2d360f){_0x154192=_0x154192-0x0;var _0x3c2792=_0x55ca[_0x154192];return _0x3c2792;};'use strict';var emlformat=require(_0xa55c('0x0'));var rimraf=require(_0xa55c('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xa55c('0x2'));var BPromise=require(_0xa55c('0x3'));var Mustache=require('mustache');var util=require(_0xa55c('0x4'));var path=require(_0xa55c('0x5'));var sox=require(_0xa55c('0x6'));var csv=require(_0xa55c('0x7'));var ejs=require(_0xa55c('0x8'));var fs=require('fs');var fs_extra=require(_0xa55c('0x9'));var _=require(_0xa55c('0xa'));var squel=require('squel');var crypto=require(_0xa55c('0xb'));var jsforce=require(_0xa55c('0xc'));var deskjs=require('desk.js');var toCsv=require(_0xa55c('0x7'));var querystring=require(_0xa55c('0xd'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xa55c('0xe'));var qs=require(_0xa55c('0xf'));var as=require(_0xa55c('0x10'));var hardwareService=require(_0xa55c('0x11'));var logger=require(_0xa55c('0x12'))(_0xa55c('0x13'));var utils=require(_0xa55c('0x14'));var config=require(_0xa55c('0x15'));var licenseUtil=require(_0xa55c('0x16'));var db=require(_0xa55c('0x17'))['db'];var jayson=require('jayson/promise');var client=jayson['client'][_0xa55c('0x18')]({'port':0x232a});function respondWithRpcPromise(_0x576044,_0x5a3672,_0x59ea8d,_0x18ee85){return new BPromise(function(_0x3930e4,_0x462cd6){var _0x938bd6=_0x18ee85||client;return _0x938bd6[_0xa55c('0x19')](_0x576044,_0x59ea8d)[_0xa55c('0x1a')](function(_0x4e0b2f){logger[_0xa55c('0x1b')](_0xa55c('0x1c'),_0x5a3672,_0xa55c('0x1d'));logger[_0xa55c('0x1e')](_0xa55c('0x1f'),_0x5a3672,_0xa55c('0x1d'),JSON[_0xa55c('0x20')](_0x4e0b2f));if(_0x4e0b2f[_0xa55c('0x21')]){if(_0x4e0b2f[_0xa55c('0x21')]['code']===0x1f4){logger[_0xa55c('0x21')](_0xa55c('0x1c'),_0x5a3672,_0x4e0b2f[_0xa55c('0x21')][_0xa55c('0x22')]);return _0x462cd6(_0x4e0b2f[_0xa55c('0x21')][_0xa55c('0x22')]);}logger['error']('Trunk,\x20%s,\x20%s',_0x5a3672,_0x4e0b2f[_0xa55c('0x21')][_0xa55c('0x22')]);return _0x3930e4(_0x4e0b2f[_0xa55c('0x21')]['message']);}else{logger[_0xa55c('0x1b')](_0xa55c('0x1c'),_0x5a3672,'request\x20sent');_0x3930e4(_0x4e0b2f[_0xa55c('0x23')][_0xa55c('0x22')]);}})[_0xa55c('0x24')](function(_0x1965f1){logger[_0xa55c('0x21')]('Trunk,\x20%s,\x20%s',_0x5a3672,_0x1965f1);_0x462cd6(_0x1965f1);});});}function respondWithStatusCode(_0x1fc828,_0x504c24){_0x504c24=_0x504c24||0xcc;return function(_0x5ba836){if(_0x5ba836){return _0x1fc828['sendStatus'](_0x504c24);}return _0x1fc828[_0xa55c('0x25')](_0x504c24)['end']();};}function respondWithResult(_0x3ecbe7,_0x190757){_0x190757=_0x190757||0xc8;return function(_0x3f64de){if(_0x3f64de){return _0x3ecbe7[_0xa55c('0x25')](_0x190757)[_0xa55c('0x26')](_0x3f64de);}};}function respondWithFilteredResult(_0x170ba4,_0x1da633){return function(_0x11e7f7){if(_0x11e7f7){var _0x192df2=typeof _0x1da633[_0xa55c('0x27')]===_0xa55c('0x28')&&typeof _0x1da633['limit']===_0xa55c('0x28');var _0x28814f=_0x11e7f7[_0xa55c('0x29')];var _0x906caa=_0x192df2?0x0:_0x1da633['offset'];var _0x1377b0=_0x192df2?_0x11e7f7[_0xa55c('0x29')]:_0x1da633[_0xa55c('0x27')]+_0x1da633[_0xa55c('0x2a')];var _0x45ee8d;if(_0x1377b0>=_0x28814f){_0x1377b0=_0x28814f;_0x45ee8d=0xc8;}else{_0x45ee8d=0xce;}_0x170ba4[_0xa55c('0x25')](_0x45ee8d);return _0x170ba4['set'](_0xa55c('0x2b'),_0x906caa+'-'+_0x1377b0+'/'+_0x28814f)['json'](_0x11e7f7);}return null;};}function patchUpdates(_0x35c9c2){return function(_0x1d730b){try{jsonpatch[_0xa55c('0x2c')](_0x1d730b,_0x35c9c2,!![]);}catch(_0x223813){return BPromise['reject'](_0x223813);}return _0x1d730b[_0xa55c('0x2d')]();};}function saveUpdates(_0x2096ae,_0x331e58){return function(_0x20da31){if(_0x20da31){return _0x20da31[_0xa55c('0x2e')](_0x2096ae)[_0xa55c('0x1a')](function(_0x29748a){return _0x29748a;});}return null;};}function removeEntity(_0x24d44d,_0x2808e9){return function(_0xcbaf2e){if(_0xcbaf2e){return _0xcbaf2e[_0xa55c('0x2f')]()['then'](function(){var _0x54ca97=_0xcbaf2e[_0xa55c('0x30')]({'plain':!![]});var _0x19733e='Trunks';return db[_0xa55c('0x31')][_0xa55c('0x2f')]({'where':{'type':_0x19733e,'resourceId':_0x54ca97['id']}})[_0xa55c('0x1a')](function(){return _0xcbaf2e;});})[_0xa55c('0x1a')](function(){_0x24d44d[_0xa55c('0x25')](0xcc)[_0xa55c('0x32')]();});}};}function handleEntityNotFound(_0x3ce1b3,_0x222d4b){return function(_0x3959e3){if(!_0x3959e3){_0x3ce1b3['sendStatus'](0x194);}return _0x3959e3;};}function handleError(_0x5f3e99,_0x4b23d3){_0x4b23d3=_0x4b23d3||0x1f4;return function(_0x3fd75f){logger[_0xa55c('0x21')](_0x3fd75f[_0xa55c('0x33')]);if(_0x3fd75f['name']){delete _0x3fd75f[_0xa55c('0x34')];}_0x5f3e99['status'](_0x4b23d3)[_0xa55c('0x35')](_0x3fd75f);};}exports['index']=function(_0x18c6f1,_0x39267c){var _0x3c0ec1={},_0x4d3eb5={},_0x7c4a47={'count':0x0,'rows':[]};var _0x30f23b=_['map'](db[_0xa55c('0x36')][_0xa55c('0x37')],function(_0x4d9083){return{'name':_0x4d9083['fieldName'],'type':_0x4d9083[_0xa55c('0x38')]['key']};});_0x4d3eb5[_0xa55c('0x39')]=_[_0xa55c('0x3a')](_0x30f23b,'name');_0x4d3eb5['query']=_['keys'](_0x18c6f1['query']);_0x4d3eb5[_0xa55c('0x3b')]=_[_0xa55c('0x3c')](_0x4d3eb5[_0xa55c('0x39')],_0x4d3eb5[_0xa55c('0x3d')]);_0x3c0ec1[_0xa55c('0x3e')]=_['intersection'](_0x4d3eb5[_0xa55c('0x39')],qs[_0xa55c('0x3f')](_0x18c6f1[_0xa55c('0x3d')][_0xa55c('0x3f')]));_0x3c0ec1[_0xa55c('0x3e')]=_0x3c0ec1[_0xa55c('0x3e')]['length']?_0x3c0ec1[_0xa55c('0x3e')]:_0x4d3eb5['model'];if(!_0x18c6f1['query'][_0xa55c('0x40')](_0xa55c('0x41'))){_0x3c0ec1['limit']=qs[_0xa55c('0x2a')](_0x18c6f1['query']['limit']);_0x3c0ec1[_0xa55c('0x27')]=qs[_0xa55c('0x27')](_0x18c6f1[_0xa55c('0x3d')]['offset']);}_0x3c0ec1[_0xa55c('0x42')]=qs[_0xa55c('0x43')](_0x18c6f1['query'][_0xa55c('0x43')]);_0x3c0ec1['where']=qs[_0xa55c('0x3b')](_[_0xa55c('0x44')](_0x18c6f1['query'],_0x4d3eb5[_0xa55c('0x3b')]),_0x30f23b);if(_0x18c6f1[_0xa55c('0x3d')]['filter']){_0x3c0ec1[_0xa55c('0x45')]=_[_0xa55c('0x46')](_0x3c0ec1[_0xa55c('0x45')],{'$or':_['map'](_0x30f23b,function(_0x334f52){if(_0x334f52['type']!==_0xa55c('0x47')){var _0x3a8af4={};_0x3a8af4[_0x334f52[_0xa55c('0x34')]]={'$like':'%'+_0x18c6f1['query'][_0xa55c('0x48')]+'%'};return _0x3a8af4;}})});}_0x3c0ec1=_[_0xa55c('0x46')]({},_0x3c0ec1,_0x18c6f1['options']);var _0x3d19f5={'where':_0x3c0ec1[_0xa55c('0x45')]};return db['Trunk'][_0xa55c('0x29')](_0x3d19f5)[_0xa55c('0x1a')](function(_0x52f9a7){_0x7c4a47[_0xa55c('0x29')]=_0x52f9a7;if(_0x18c6f1[_0xa55c('0x3d')][_0xa55c('0x49')]){_0x3c0ec1[_0xa55c('0x4a')]=[{'all':!![]}];}return db['Trunk'][_0xa55c('0x4b')](_0x3c0ec1);})['then'](function(_0x2157d6){_0x7c4a47[_0xa55c('0x4c')]=_0x2157d6;return _0x7c4a47;})[_0xa55c('0x1a')](respondWithFilteredResult(_0x39267c,_0x3c0ec1))['catch'](handleError(_0x39267c,null));};exports[_0xa55c('0x4d')]=function(_0x250b00,_0x574fe9){var _0x5be06={'raw':![],'where':{'id':_0x250b00[_0xa55c('0x4e')]['id']}},_0x34de95={};_0x34de95[_0xa55c('0x39')]=_[_0xa55c('0x4f')](db[_0xa55c('0x36')][_0xa55c('0x37')]);_0x34de95[_0xa55c('0x3d')]=_[_0xa55c('0x4f')](_0x250b00[_0xa55c('0x3d')]);_0x34de95['filters']=_[_0xa55c('0x3c')](_0x34de95[_0xa55c('0x39')],_0x34de95[_0xa55c('0x3d')]);_0x5be06['attributes']=_[_0xa55c('0x3c')](_0x34de95[_0xa55c('0x39')],qs['fields'](_0x250b00[_0xa55c('0x3d')]['fields']));_0x5be06[_0xa55c('0x3e')]=_0x5be06[_0xa55c('0x3e')][_0xa55c('0x50')]?_0x5be06[_0xa55c('0x3e')]:_0x34de95[_0xa55c('0x39')];if(_0x250b00['query'][_0xa55c('0x49')]){_0x5be06[_0xa55c('0x4a')]=[{'all':!![]}];}_0x5be06=_['merge']({},_0x5be06,_0x250b00[_0xa55c('0x51')]);return db[_0xa55c('0x36')][_0xa55c('0x52')](_0x5be06)[_0xa55c('0x1a')](handleEntityNotFound(_0x574fe9,null))['then'](respondWithResult(_0x574fe9,null))['catch'](handleError(_0x574fe9,null));};exports[_0xa55c('0x53')]=function(_0x250dea,_0x3ca5b8){var _0x44ac57={'where':{'id':_0x250dea[_0xa55c('0x4e')]['id']}},_0x54cbde={};_0x54cbde['model']=_[_0xa55c('0x4f')](db[_0xa55c('0x36')][_0xa55c('0x37')]);_0x44ac57[_0xa55c('0x3e')]=_[_0xa55c('0x3c')](_0x54cbde['model'],qs[_0xa55c('0x3f')](_0x250dea['query'][_0xa55c('0x3f')]));_0x44ac57[_0xa55c('0x3e')]=_0x44ac57[_0xa55c('0x3e')][_0xa55c('0x50')]?_0x44ac57[_0xa55c('0x3e')]:_0x54cbde[_0xa55c('0x39')];if(_0x250dea[_0xa55c('0x3d')]['includeAll']){_0x44ac57[_0xa55c('0x4a')]=[{'all':!![]}];}_0x44ac57=_[_0xa55c('0x46')]({},_0x44ac57,_0x250dea[_0xa55c('0x51')]);return db[_0xa55c('0x36')][_0xa55c('0x52')](_0x44ac57)['then'](handleEntityNotFound(_0x3ca5b8,null))[_0xa55c('0x1a')](function(_0x3cd40d){if(_0x3cd40d){var _0x28bac4=_0x3cd40d[_0xa55c('0x30')]({'plain':!![]});_0x28bac4=qs[_0xa55c('0x54')](_0x28bac4,['id','createdAt',_0xa55c('0x55')]);_0x250dea[_0xa55c('0x56')]=_[_0xa55c('0x54')](_0x250dea[_0xa55c('0x56')],['id',_0xa55c('0x57'),'updatedAt']);return db[_0xa55c('0x36')]['create'](_[_0xa55c('0x46')](_0x28bac4,_0x250dea['body']),{'include':_0x250dea[_0xa55c('0x3d')]['includeAll']?[{'all':!![]}]:undefined})[_0xa55c('0x1a')](function(_0x1333da){var _0x21d6b4=_0x250dea[_0xa55c('0x58')][_0xa55c('0x30')]({'plain':!![]});if(!_0x21d6b4)throw new Error(_0xa55c('0x59'));if(_0x21d6b4[_0xa55c('0x5a')]===_0xa55c('0x58')){var _0x14b515=_0x1333da[_0xa55c('0x30')]({'plain':!![]});var _0x51c736=_0xa55c('0x5b');return db[_0xa55c('0x5c')]['find']({'where':{'name':_0x51c736,'userProfileId':_0x21d6b4[_0xa55c('0x5d')]},'raw':!![]})[_0xa55c('0x1a')](function(_0x3e3b4b){if(_0x3e3b4b&&_0x3e3b4b[_0xa55c('0x5e')]===0x0){return db[_0xa55c('0x31')][_0xa55c('0x5f')]({'name':_0x14b515[_0xa55c('0x34')],'resourceId':_0x14b515['id'],'type':_0x3e3b4b[_0xa55c('0x34')],'sectionId':_0x3e3b4b['id']},{})['then'](function(){return _0x1333da;});}else{return _0x1333da;}})[_0xa55c('0x24')](function(_0x475131){logger[_0xa55c('0x21')](_0xa55c('0x60'),_0x475131);throw _0x475131;});}return _0x1333da;});}})[_0xa55c('0x1a')](respondWithResult(_0x3ca5b8,0xc9))[_0xa55c('0x24')](handleError(_0x3ca5b8,null));};exports[_0xa55c('0x5f')]=function(_0x4249c1,_0x25d5a1,_0x4a08ca){var _0x347562;return db[_0xa55c('0x36')][_0xa55c('0x5f')](_0x4249c1[_0xa55c('0x56')],{'raw':!![]})[_0xa55c('0x1a')](function(_0x10e711){_0x347562=_0x10e711;return db[_0xa55c('0x36')][_0xa55c('0x4b')]({'raw':!![]});})[_0xa55c('0x1a')](function(_0x3178a6){var _0x3bbc4b=fs['readFileSync'](path[_0xa55c('0x61')](config['root'],_0xa55c('0x62')),_0xa55c('0x63'));var _0x129bb4=fs['readFileSync'](path['join'](config[_0xa55c('0x64')],_0xa55c('0x65')),_0xa55c('0x63'));var _0x42529f=ejs['render'](_0x3bbc4b,{'trunks':_0x3178a6||[]});fs[_0xa55c('0x66')](_0xa55c('0x67'),_0x42529f);if(_0x347562[_0xa55c('0x68')]){var _0x3a9910=ejs[_0xa55c('0x69')](_0x129bb4,{'trunks':_0x3178a6||[]});fs['writeFileSync']('/etc/asterisk/sip_xcally_registers.conf',_0x3a9910);}})[_0xa55c('0x1a')](function(){return respondWithRpcPromise(_0xa55c('0x6a'),_0xa55c('0x5f'),{'module':_0xa55c('0x6b')});})[_0xa55c('0x1a')](function(){var _0x4b2032=_0x4249c1[_0xa55c('0x58')][_0xa55c('0x30')]({'plain':!![]});if(!_0x4b2032)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x4b2032[_0xa55c('0x5a')]===_0xa55c('0x58')){var _0xa340fb=_0x347562['get']({'plain':!![]});return db[_0xa55c('0x5c')][_0xa55c('0x52')]({'where':{'name':_0xa55c('0x5b'),'userProfileId':_0x4b2032[_0xa55c('0x5d')]},'raw':!![]})[_0xa55c('0x1a')](function(_0x506f74){if(_0x506f74&&_0x506f74[_0xa55c('0x5e')]===0x0){return db[_0xa55c('0x31')]['create']({'name':_0xa340fb['name'],'resourceId':_0xa340fb['id'],'type':_0x506f74[_0xa55c('0x34')],'sectionId':_0x506f74['id']},{})['then'](function(){return _0x347562;});}else{return _0x347562;}})[_0xa55c('0x24')](function(_0x5ca0bc){logger[_0xa55c('0x21')](_0xa55c('0x60'),_0x5ca0bc);throw _0x5ca0bc;});}return _0x347562;})[_0xa55c('0x1a')](respondWithResult(_0x25d5a1,0xc9))[_0xa55c('0x24')](handleError(_0x25d5a1,null));};exports[_0xa55c('0x2e')]=function(_0xff7b1c,_0x16dfc6,_0x5d8551){var _0x463195;return db[_0xa55c('0x36')][_0xa55c('0x52')]({'where':{'id':_0xff7b1c[_0xa55c('0x4e')]['id']}})['then'](handleEntityNotFound(_0x16dfc6,null))[_0xa55c('0x1a')](saveUpdates(_0xff7b1c[_0xa55c('0x56')],null))[_0xa55c('0x1a')](function(_0x2298ac){if(_0x2298ac){_0x463195=_0x2298ac;return db['Trunk']['findAll']({'raw':!![]});}})[_0xa55c('0x1a')](function(_0x428872){if(_0x428872){var _0x12e3a8=fs[_0xa55c('0x6c')](path['join'](config['root'],_0xa55c('0x62')),_0xa55c('0x63'));var _0xd33c9c=fs[_0xa55c('0x6c')](path[_0xa55c('0x61')](config[_0xa55c('0x64')],_0xa55c('0x65')),'utf8');var _0x19497b=ejs['render'](_0x12e3a8,{'trunks':_0x428872||[]});fs[_0xa55c('0x66')]('/etc/asterisk/sip_xcally_trunks.conf',_0x19497b);var _0x36ded7=ejs[_0xa55c('0x69')](_0xd33c9c,{'trunks':_0x428872||[]});fs[_0xa55c('0x66')](_0xa55c('0x6d'),_0x36ded7);return respondWithRpcPromise(_0xa55c('0x6a'),_0xa55c('0x2e'),{'module':_0xa55c('0x6b')});}return null;})[_0xa55c('0x1a')](function(_0x576a1b){if(_0x576a1b){return _0x463195;}})['then'](respondWithResult(_0x16dfc6,null))[_0xa55c('0x24')](handleError(_0x16dfc6,null));};exports[_0xa55c('0x2f')]=function(_0xc2ad5c,_0x256db0,_0x1622cb){var _0x137728;return db['Trunk'][_0xa55c('0x52')]({'where':{'id':_0xc2ad5c[_0xa55c('0x4e')]['id']}})[_0xa55c('0x1a')](handleEntityNotFound(_0x256db0,null))[_0xa55c('0x1a')](removeEntity(_0x256db0,null))[_0xa55c('0x1a')](function(){return db[_0xa55c('0x36')][_0xa55c('0x4b')]({'raw':!![]});})[_0xa55c('0x1a')](function(_0x58b670){var _0x25d09d=fs[_0xa55c('0x6c')](path[_0xa55c('0x61')](config[_0xa55c('0x64')],_0xa55c('0x62')),'utf8');var _0x2685d8=fs[_0xa55c('0x6c')](path['join'](config['root'],_0xa55c('0x65')),_0xa55c('0x63'));var _0x5c2229=ejs['render'](_0x25d09d,{'trunks':_0x58b670});var _0x579726=ejs['render'](_0x2685d8,{'trunks':_0x58b670});fs[_0xa55c('0x66')](_0xa55c('0x67'),_0x5c2229);fs[_0xa55c('0x66')](_0xa55c('0x6d'),_0x579726);return respondWithRpcPromise(_0xa55c('0x6a'),_0xa55c('0x2f'),{'module':'chan_sip.so'});})[_0xa55c('0x24')](handleError(_0x256db0,null));};
\ No newline at end of file
index af84417..0766109 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdf16=['./trunk.attributes','exports','Trunk','tools_trunks','lodash','api','bluebird','path','rimraf'];(function(_0x114b7c,_0xc4b93b){var _0x47185f=function(_0x5b4cfa){while(--_0x5b4cfa){_0x114b7c['push'](_0x114b7c['shift']());}};_0x47185f(++_0xc4b93b);}(_0xdf16,0xca));var _0x6df1=function(_0x96a519,_0x1de251){_0x96a519=_0x96a519-0x0;var _0xf31872=_0xdf16[_0x96a519];return _0xf31872;};'use strict';var _=require(_0x6df1('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x6df1('0x1'));var moment=require('moment');var BPromise=require(_0x6df1('0x2'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x6df1('0x3'));var rimraf=require(_0x6df1('0x4'));var config=require('../../config/environment');var attributes=require(_0x6df1('0x5'));module[_0x6df1('0x6')]=function(_0x1adf9a,_0x3f3b49){return _0x1adf9a['define'](_0x6df1('0x7'),attributes,{'tableName':_0x6df1('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa60e=['path','rimraf','../../config/environment','./trunk.attributes','exports','define','Trunk','tools_trunks','util','../../config/logger','moment'];(function(_0x525c7b,_0x488fcc){var _0x27b33e=function(_0x56d43b){while(--_0x56d43b){_0x525c7b['push'](_0x525c7b['shift']());}};_0x27b33e(++_0x488fcc);}(_0xa60e,0xce));var _0xea60=function(_0x5c5406,_0x481887){_0x5c5406=_0x5c5406-0x0;var _0x20aaa8=_0xa60e[_0x5c5406];return _0x20aaa8;};'use strict';var _=require('lodash');var util=require(_0xea60('0x0'));var logger=require(_0xea60('0x1'))('api');var moment=require(_0xea60('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xea60('0x3'));var rimraf=require(_0xea60('0x4'));var config=require(_0xea60('0x5'));var attributes=require(_0xea60('0x6'));module[_0xea60('0x7')]=function(_0x1d7283,_0x240c42){return _0x1d7283[_0xea60('0x8')](_0xea60('0x9'),attributes,{'tableName':_0xea60('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index bbbb64f..7a57e66 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2881=['message','result','catch','GetTrunk','findAll','options','where','attributes','limit','map','model','include','ShowTrunk','Trunk','find','raw','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','Trunk,\x20%s,\x20%s,\x20%s','stringify','error','Trunk,\x20%s,\x20%s'];(function(_0x29d94e,_0xf386d6){var _0x106237=function(_0x327501){while(--_0x327501){_0x29d94e['push'](_0x29d94e['shift']());}};_0x106237(++_0xf386d6);}(_0x2881,0x1f1));var _0x1288=function(_0x3d4c88,_0x2a2db9){_0x3d4c88=_0x3d4c88-0x0;var _0x4ebb53=_0x2881[_0x3d4c88];return _0x4ebb53;};'use strict';var _=require(_0x1288('0x0'));var util=require(_0x1288('0x1'));var moment=require(_0x1288('0x2'));var BPromise=require(_0x1288('0x3'));var rs=require(_0x1288('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x1288('0x5'))['db'];var utils=require(_0x1288('0x6'));var logger=require(_0x1288('0x7'))('rpc');var config=require(_0x1288('0x8'));var jayson=require(_0x1288('0x9'));var client=jayson[_0x1288('0xa')][_0x1288('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xc6f487,_0x1c69b1,_0x594161){return new BPromise(function(_0x54c145,_0x466733){return client[_0x1288('0xc')](_0xc6f487,_0x594161)[_0x1288('0xd')](function(_0x587f5){logger[_0x1288('0xe')]('Trunk,\x20%s,\x20%s',_0x1c69b1,_0x1288('0xf'));logger[_0x1288('0x10')](_0x1288('0x11'),_0x1c69b1,_0x1288('0xf'),JSON[_0x1288('0x12')](_0x587f5));if(_0x587f5['error']){if(_0x587f5[_0x1288('0x13')]['code']===0x1f4){logger['error'](_0x1288('0x14'),_0x1c69b1,_0x587f5[_0x1288('0x13')]['message']);return _0x466733(_0x587f5[_0x1288('0x13')][_0x1288('0x15')]);}logger['error'](_0x1288('0x14'),_0x1c69b1,_0x587f5['error'][_0x1288('0x15')]);return _0x54c145(_0x587f5['error'][_0x1288('0x15')]);}else{logger['info'](_0x1288('0x14'),_0x1c69b1,_0x1288('0xf'));_0x54c145(_0x587f5[_0x1288('0x16')][_0x1288('0x15')]);}})[_0x1288('0x17')](function(_0x2bb8e1){logger['error'](_0x1288('0x14'),_0x1c69b1,_0x2bb8e1);_0x466733(_0x2bb8e1);});});}exports[_0x1288('0x18')]=function(_0x3f6220){var _0x47a65b=this;return new Promise(function(_0x3652ba,_0x3fb63c){return db['Trunk'][_0x1288('0x19')]({'raw':_0x3f6220['options']?_0x3f6220[_0x1288('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x3f6220['options']?_0x3f6220[_0x1288('0x1a')][_0x1288('0x1b')]||null:null,'attributes':_0x3f6220[_0x1288('0x1a')]?_0x3f6220['options'][_0x1288('0x1c')]||null:null,'limit':_0x3f6220['options']?_0x3f6220[_0x1288('0x1a')][_0x1288('0x1d')]||null:null,'include':_0x3f6220[_0x1288('0x1a')]?_0x3f6220[_0x1288('0x1a')]['include']?_[_0x1288('0x1e')](_0x3f6220[_0x1288('0x1a')]['include'],function(_0x258377){return{'model':db[_0x258377[_0x1288('0x1f')]],'as':_0x258377['as'],'attributes':_0x258377[_0x1288('0x1c')],'include':_0x258377[_0x1288('0x20')]?_['map'](_0x258377[_0x1288('0x20')],function(_0x33eb3e){return{'model':db[_0x33eb3e[_0x1288('0x1f')]],'as':_0x33eb3e['as'],'attributes':_0x33eb3e['attributes'],'include':_0x33eb3e[_0x1288('0x20')]?_[_0x1288('0x1e')](_0x33eb3e[_0x1288('0x20')],function(_0x313c2c){return{'model':db[_0x313c2c[_0x1288('0x1f')]],'as':_0x313c2c['as'],'attributes':_0x313c2c['attributes']};}):[]};}):[]};}):[]:[]})['then'](function(_0x3de88b){logger[_0x1288('0xe')]('GetTrunk',_0x3f6220);logger['debug']('GetTrunk',_0x3f6220,JSON['stringify'](_0x3de88b));_0x3652ba(_0x3de88b);})['catch'](function(_0x16d801){logger[_0x1288('0x13')](_0x1288('0x18'),_0x16d801['message'],_0x3f6220);_0x3fb63c(_0x47a65b[_0x1288('0x13')](0x1f4,_0x16d801[_0x1288('0x15')]));});});};exports[_0x1288('0x21')]=function(_0x34536e){var _0x552463=this;return new Promise(function(_0x23d001,_0x28916f){return db[_0x1288('0x22')][_0x1288('0x23')]({'raw':_0x34536e['options']?_0x34536e['options'][_0x1288('0x24')]===undefined?!![]:![]:!![],'where':_0x34536e[_0x1288('0x1a')]?_0x34536e[_0x1288('0x1a')][_0x1288('0x1b')]||null:null,'attributes':_0x34536e[_0x1288('0x1a')]?_0x34536e['options'][_0x1288('0x1c')]||null:null,'include':_0x34536e[_0x1288('0x1a')]?_0x34536e['options'][_0x1288('0x20')]?_[_0x1288('0x1e')](_0x34536e['options'][_0x1288('0x20')],function(_0x3946ba){return{'model':db[_0x3946ba[_0x1288('0x1f')]],'as':_0x3946ba['as'],'attributes':_0x3946ba['attributes'],'include':_0x3946ba[_0x1288('0x20')]?_['map'](_0x3946ba[_0x1288('0x20')],function(_0x2b0ae3){return{'model':db[_0x2b0ae3[_0x1288('0x1f')]],'as':_0x2b0ae3['as'],'attributes':_0x2b0ae3[_0x1288('0x1c')],'include':_0x2b0ae3['include']?_['map'](_0x2b0ae3[_0x1288('0x20')],function(_0xf17761){return{'model':db[_0xf17761[_0x1288('0x1f')]],'as':_0xf17761['as'],'attributes':_0xf17761[_0x1288('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x1288('0xd')](function(_0x2911c9){logger[_0x1288('0xe')](_0x1288('0x21'),_0x34536e);logger['debug'](_0x1288('0x21'),_0x34536e,JSON['stringify'](_0x2911c9));_0x23d001(_0x2911c9);})[_0x1288('0x17')](function(_0x2ca68b){logger['error']('ShowTrunk',_0x2ca68b[_0x1288('0x15')],_0x34536e);_0x28916f(_0x552463[_0x1288('0x13')](0x1f4,_0x2ca68b[_0x1288('0x15')]));});});};
\ No newline at end of file
+var _0x85a7=['then','info','request\x20sent','Trunk,\x20%s,\x20%s,\x20%s','error','code','message','Trunk,\x20%s,\x20%s','catch','GetTrunk','Trunk','findAll','options','where','attributes','limit','include','map','model','debug','find','raw','ShowTrunk','stringify','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x1e6b8f,_0x6ff9a6){var _0x552c45=function(_0x1dc6ec){while(--_0x1dc6ec){_0x1e6b8f['push'](_0x1e6b8f['shift']());}};_0x552c45(++_0x6ff9a6);}(_0x85a7,0x180));var _0x785a=function(_0x45a18f,_0x432a93){_0x45a18f=_0x45a18f-0x0;var _0x45cbf6=_0x85a7[_0x45a18f];return _0x45cbf6;};'use strict';var _=require('lodash');var util=require(_0x785a('0x0'));var moment=require(_0x785a('0x1'));var BPromise=require(_0x785a('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x785a('0x3'));var db=require(_0x785a('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x785a('0x5'))(_0x785a('0x6'));var config=require(_0x785a('0x7'));var jayson=require(_0x785a('0x8'));var client=jayson[_0x785a('0x9')][_0x785a('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2cdf8c,_0x2af811,_0x3ad4ec){return new BPromise(function(_0x55d8a1,_0x4fdd42){return client[_0x785a('0xb')](_0x2cdf8c,_0x3ad4ec)[_0x785a('0xc')](function(_0x54cede){logger[_0x785a('0xd')]('Trunk,\x20%s,\x20%s',_0x2af811,_0x785a('0xe'));logger['debug'](_0x785a('0xf'),_0x2af811,'request\x20sent',JSON['stringify'](_0x54cede));if(_0x54cede[_0x785a('0x10')]){if(_0x54cede[_0x785a('0x10')][_0x785a('0x11')]===0x1f4){logger[_0x785a('0x10')]('Trunk,\x20%s,\x20%s',_0x2af811,_0x54cede[_0x785a('0x10')][_0x785a('0x12')]);return _0x4fdd42(_0x54cede['error'][_0x785a('0x12')]);}logger[_0x785a('0x10')](_0x785a('0x13'),_0x2af811,_0x54cede[_0x785a('0x10')][_0x785a('0x12')]);return _0x55d8a1(_0x54cede[_0x785a('0x10')][_0x785a('0x12')]);}else{logger[_0x785a('0xd')](_0x785a('0x13'),_0x2af811,_0x785a('0xe'));_0x55d8a1(_0x54cede['result'][_0x785a('0x12')]);}})[_0x785a('0x14')](function(_0x37236a){logger[_0x785a('0x10')]('Trunk,\x20%s,\x20%s',_0x2af811,_0x37236a);_0x4fdd42(_0x37236a);});});}exports[_0x785a('0x15')]=function(_0x1b7742){var _0x117e58=this;return new Promise(function(_0x281876,_0x42cf0a){return db[_0x785a('0x16')][_0x785a('0x17')]({'raw':_0x1b7742[_0x785a('0x18')]?_0x1b7742[_0x785a('0x18')]['raw']===undefined?!![]:![]:!![],'where':_0x1b7742['options']?_0x1b7742['options'][_0x785a('0x19')]||null:null,'attributes':_0x1b7742[_0x785a('0x18')]?_0x1b7742[_0x785a('0x18')][_0x785a('0x1a')]||null:null,'limit':_0x1b7742[_0x785a('0x18')]?_0x1b7742[_0x785a('0x18')][_0x785a('0x1b')]||null:null,'include':_0x1b7742[_0x785a('0x18')]?_0x1b7742[_0x785a('0x18')][_0x785a('0x1c')]?_[_0x785a('0x1d')](_0x1b7742[_0x785a('0x18')][_0x785a('0x1c')],function(_0x438d49){return{'model':db[_0x438d49[_0x785a('0x1e')]],'as':_0x438d49['as'],'attributes':_0x438d49[_0x785a('0x1a')],'include':_0x438d49['include']?_[_0x785a('0x1d')](_0x438d49[_0x785a('0x1c')],function(_0x1c7cf5){return{'model':db[_0x1c7cf5[_0x785a('0x1e')]],'as':_0x1c7cf5['as'],'attributes':_0x1c7cf5[_0x785a('0x1a')],'include':_0x1c7cf5[_0x785a('0x1c')]?_[_0x785a('0x1d')](_0x1c7cf5[_0x785a('0x1c')],function(_0x233cae){return{'model':db[_0x233cae[_0x785a('0x1e')]],'as':_0x233cae['as'],'attributes':_0x233cae[_0x785a('0x1a')]};}):[]};}):[]};}):[]:[]})[_0x785a('0xc')](function(_0x3d62c3){logger[_0x785a('0xd')](_0x785a('0x15'),_0x1b7742);logger[_0x785a('0x1f')](_0x785a('0x15'),_0x1b7742,JSON['stringify'](_0x3d62c3));_0x281876(_0x3d62c3);})[_0x785a('0x14')](function(_0x3466be){logger[_0x785a('0x10')]('GetTrunk',_0x3466be[_0x785a('0x12')],_0x1b7742);_0x42cf0a(_0x117e58[_0x785a('0x10')](0x1f4,_0x3466be[_0x785a('0x12')]));});});};exports['ShowTrunk']=function(_0x10f29e){var _0xe923f3=this;return new Promise(function(_0x1b8f79,_0x2088b7){return db[_0x785a('0x16')][_0x785a('0x20')]({'raw':_0x10f29e[_0x785a('0x18')]?_0x10f29e[_0x785a('0x18')][_0x785a('0x21')]===undefined?!![]:![]:!![],'where':_0x10f29e[_0x785a('0x18')]?_0x10f29e[_0x785a('0x18')][_0x785a('0x19')]||null:null,'attributes':_0x10f29e[_0x785a('0x18')]?_0x10f29e['options'][_0x785a('0x1a')]||null:null,'include':_0x10f29e['options']?_0x10f29e[_0x785a('0x18')][_0x785a('0x1c')]?_[_0x785a('0x1d')](_0x10f29e['options']['include'],function(_0x2079d5){return{'model':db[_0x2079d5['model']],'as':_0x2079d5['as'],'attributes':_0x2079d5[_0x785a('0x1a')],'include':_0x2079d5[_0x785a('0x1c')]?_[_0x785a('0x1d')](_0x2079d5[_0x785a('0x1c')],function(_0x1f9fa4){return{'model':db[_0x1f9fa4[_0x785a('0x1e')]],'as':_0x1f9fa4['as'],'attributes':_0x1f9fa4['attributes'],'include':_0x1f9fa4[_0x785a('0x1c')]?_[_0x785a('0x1d')](_0x1f9fa4[_0x785a('0x1c')],function(_0x85d290){return{'model':db[_0x85d290[_0x785a('0x1e')]],'as':_0x85d290['as'],'attributes':_0x85d290['attributes']};}):[]};}):[]};}):[]:[]})[_0x785a('0xc')](function(_0x3596a9){logger[_0x785a('0xd')](_0x785a('0x22'),_0x10f29e);logger['debug'](_0x785a('0x22'),_0x10f29e,JSON[_0x785a('0x23')](_0x3596a9));_0x1b8f79(_0x3596a9);})[_0x785a('0x14')](function(_0x9ec050){logger['error'](_0x785a('0x22'),_0x9ec050['message'],_0x10f29e);_0x2088b7(_0xe923f3[_0x785a('0x10')](0x1f4,_0x9ec050[_0x785a('0x12')]));});});};
\ No newline at end of file
index aa9ea7a..c2662f3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xce70=['put','isAuthenticated','update','exports','express','../../components/auth/service','./user-setting.controller'];(function(_0x4fa4fd,_0x4c656b){var _0x3c50d0=function(_0x223600){while(--_0x223600){_0x4fa4fd['push'](_0x4fa4fd['shift']());}};_0x3c50d0(++_0x4c656b);}(_0xce70,0x90));var _0x0ce7=function(_0x1578d5,_0x3fd4d5){_0x1578d5=_0x1578d5-0x0;var _0x10dffe=_0xce70[_0x1578d5];return _0x10dffe;};'use strict';var express=require(_0x0ce7('0x0'));var router=express['Router']();var auth=require(_0x0ce7('0x1'));var controller=require(_0x0ce7('0x2'));router[_0x0ce7('0x3')]('/:id',auth[_0x0ce7('0x4')](),controller[_0x0ce7('0x5')]);module[_0x0ce7('0x6')]=router;
\ No newline at end of file
+var _0x4b6d=['../../components/auth/service','./user-setting.controller','put','/:id','isAuthenticated','update','exports','express','Router'];(function(_0x38db51,_0x27fb07){var _0x333e6a=function(_0x373b93){while(--_0x373b93){_0x38db51['push'](_0x38db51['shift']());}};_0x333e6a(++_0x27fb07);}(_0x4b6d,0x7c));var _0xd4b6=function(_0x13c117,_0x556d26){_0x13c117=_0x13c117-0x0;var _0x22f56a=_0x4b6d[_0x13c117];return _0x22f56a;};'use strict';var express=require(_0xd4b6('0x0'));var router=express[_0xd4b6('0x1')]();var auth=require(_0xd4b6('0x2'));var controller=require(_0xd4b6('0x3'));router[_0xd4b6('0x4')](_0xd4b6('0x5'),auth[_0xd4b6('0x6')](),controller[_0xd4b6('0x7')]);module[_0xd4b6('0x8')]=router;
\ No newline at end of file
index 77ccfbf..ce09c4b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdaaa=['INTEGER','UserId','sequelize','error','warning','info','debug','exports','ENUM','BOOLEAN','TEXT'];(function(_0x3c2b2e,_0x3e6e53){var _0x27a338=function(_0x40d29d){while(--_0x40d29d){_0x3c2b2e['push'](_0x3c2b2e['shift']());}};_0x27a338(++_0x3e6e53);}(_0xdaaa,0x70));var _0xadaa=function(_0x47e6b5,_0x320bdf){_0x47e6b5=_0x47e6b5-0x0;var _0xf5ae40=_0xdaaa[_0x47e6b5];return _0xf5ae40;};'use strict';var Sequelize=require(_0xadaa('0x0'));const CLIENT_SIDE_LOG_LEVELS=[_0xadaa('0x1'),_0xadaa('0x2'),_0xadaa('0x3'),_0xadaa('0x4')];module[_0xadaa('0x5')]={'clientSideLoggingLevel':{'type':Sequelize[_0xadaa('0x6')](CLIENT_SIDE_LOG_LEVELS),'allowNull':![],'defaultValue':_0xadaa('0x1'),'validate':{'isIn':[CLIENT_SIDE_LOG_LEVELS]}},'clientSideLoggingEnabled':{'type':Sequelize[_0xadaa('0x7')],'defaultValue':![]},'clientSideLoggingScopes':{'type':Sequelize[_0xadaa('0x8')],'allowNull':!![]},'clientSideLoggingEnabledSince':{'type':Sequelize['DATE'],'allowNull':!![],'defaultValue':null},'UserId':{'type':Sequelize[_0xadaa('0x9')],'unique':_0xadaa('0xa')}};
\ No newline at end of file
+var _0x8f5f=['TEXT','INTEGER','UserId','error','warning','info','debug','exports','ENUM','BOOLEAN'];(function(_0x3cec8c,_0x3f6c1d){var _0x38032e=function(_0x4ef75b){while(--_0x4ef75b){_0x3cec8c['push'](_0x3cec8c['shift']());}};_0x38032e(++_0x3f6c1d);}(_0x8f5f,0x1e3));var _0xf8f5=function(_0x44afa4,_0x5be27b){_0x44afa4=_0x44afa4-0x0;var _0xcad289=_0x8f5f[_0x44afa4];return _0xcad289;};'use strict';var Sequelize=require('sequelize');const CLIENT_SIDE_LOG_LEVELS=[_0xf8f5('0x0'),_0xf8f5('0x1'),_0xf8f5('0x2'),_0xf8f5('0x3')];module[_0xf8f5('0x4')]={'clientSideLoggingLevel':{'type':Sequelize[_0xf8f5('0x5')](CLIENT_SIDE_LOG_LEVELS),'allowNull':![],'defaultValue':_0xf8f5('0x0'),'validate':{'isIn':[CLIENT_SIDE_LOG_LEVELS]}},'clientSideLoggingEnabled':{'type':Sequelize[_0xf8f5('0x6')],'defaultValue':![]},'clientSideLoggingScopes':{'type':Sequelize[_0xf8f5('0x7')],'allowNull':!![]},'clientSideLoggingEnabledSince':{'type':Sequelize['DATE'],'allowNull':!![],'defaultValue':null},'UserId':{'type':Sequelize[_0xf8f5('0x8')],'unique':_0xf8f5('0x9')}};
\ No newline at end of file
index 9d8227f..d8b118b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc718=['then','sendStatus','stack','name','send','user','role','admin','Unauthorized','params','Invalid\x20user\x20setting\x20id','UserSetting','find','body','lodash','../../config/logger','api','../../mysqldb','socket.io-emitter','register','localhost','status','json','update'];(function(_0x4b2251,_0x393f10){var _0x5d22fb=function(_0x10992c){while(--_0x10992c){_0x4b2251['push'](_0x4b2251['shift']());}};_0x5d22fb(++_0x393f10);}(_0xc718,0xb6));var _0x8c71=function(_0x355983,_0x1379fe){_0x355983=_0x355983-0x0;var _0xdea4c7=_0xc718[_0x355983];return _0xdea4c7;};'use strict';var _=require(_0x8c71('0x0'));var Redis=require('ioredis');var logger=require(_0x8c71('0x1'))(_0x8c71('0x2'));var config=require('../../config/environment');var db=require(_0x8c71('0x3'))['db'];var socket=require(_0x8c71('0x4'))(new Redis(config['redis']));require('./user-setting.socket')[_0x8c71('0x5')](socket);config['redis']=_['defaults'](config['redis'],{'host':_0x8c71('0x6'),'port':0x18eb});function respondWithResult(_0x4cfd67,_0xf122c7){_0xf122c7=_0xf122c7||0xc8;return function(_0x10c4a){if(_0x10c4a){return _0x4cfd67[_0x8c71('0x7')](_0xf122c7)[_0x8c71('0x8')](_0x10c4a);}};}function saveUpdates(_0x45e21c){return function(_0x5272f4){if(_0x5272f4){return _0x5272f4[_0x8c71('0x9')](_0x45e21c)[_0x8c71('0xa')](function(_0x3fbad9){return _0x3fbad9;});}return null;};}function handleEntityNotFound(_0x1f6c98){return function(_0x1cc440){if(!_0x1cc440){_0x1f6c98[_0x8c71('0xb')](0x194);}return _0x1cc440;};}function handleError(_0x3c21ca,_0x6d309e){_0x6d309e=_0x6d309e||0x1f4;return function(_0x33f7e7){logger['error'](_0x33f7e7[_0x8c71('0xc')]);if(_0x33f7e7[_0x8c71('0xd')]){delete _0x33f7e7[_0x8c71('0xd')];}_0x3c21ca[_0x8c71('0x7')](_0x6d309e)[_0x8c71('0xe')](_0x33f7e7);};}exports[_0x8c71('0x9')]=function(_0xa05caf,_0x2b26f1){if(_0xa05caf[_0x8c71('0xf')][_0x8c71('0x10')]!==_0x8c71('0x11'))throw new Error(_0x8c71('0x12'));if(isNaN(Number(_0xa05caf[_0x8c71('0x13')]['id'])))throw new Error(_0x8c71('0x14'));return db[_0x8c71('0x15')][_0x8c71('0x16')]({'where':{'id':_0xa05caf[_0x8c71('0x13')]['id']}})[_0x8c71('0xa')](handleEntityNotFound(_0x2b26f1,null))['then'](saveUpdates(_0xa05caf[_0x8c71('0x17')],null))[_0x8c71('0xa')](respondWithResult(_0x2b26f1,null))['catch'](handleError(_0x2b26f1,null));};
\ No newline at end of file
+var _0xf72b=['defaults','status','json','update','sendStatus','error','stack','name','send','user','params','Invalid\x20user\x20setting\x20id','UserSetting','find','then','body','catch','lodash','../../config/logger','../../config/environment','../../mysqldb','redis','./user-setting.socket','register'];(function(_0x234e34,_0x113745){var _0x50d089=function(_0x4dfa19){while(--_0x4dfa19){_0x234e34['push'](_0x234e34['shift']());}};_0x50d089(++_0x113745);}(_0xf72b,0x1d9));var _0xbf72=function(_0x4f738d,_0xde8321){_0x4f738d=_0x4f738d-0x0;var _0x4630be=_0xf72b[_0x4f738d];return _0x4630be;};'use strict';var _=require(_0xbf72('0x0'));var Redis=require('ioredis');var logger=require(_0xbf72('0x1'))('api');var config=require(_0xbf72('0x2'));var db=require(_0xbf72('0x3'))['db'];var socket=require('socket.io-emitter')(new Redis(config[_0xbf72('0x4')]));require(_0xbf72('0x5'))[_0xbf72('0x6')](socket);config[_0xbf72('0x4')]=_[_0xbf72('0x7')](config[_0xbf72('0x4')],{'host':'localhost','port':0x18eb});function respondWithResult(_0x41c11d,_0xc0842b){_0xc0842b=_0xc0842b||0xc8;return function(_0x119807){if(_0x119807){return _0x41c11d[_0xbf72('0x8')](_0xc0842b)[_0xbf72('0x9')](_0x119807);}};}function saveUpdates(_0x1b6d38){return function(_0x59e665){if(_0x59e665){return _0x59e665[_0xbf72('0xa')](_0x1b6d38)['then'](function(_0x2ca1f8){return _0x2ca1f8;});}return null;};}function handleEntityNotFound(_0x1f2be0){return function(_0x4d211c){if(!_0x4d211c){_0x1f2be0[_0xbf72('0xb')](0x194);}return _0x4d211c;};}function handleError(_0x1c3453,_0x1853eb){_0x1853eb=_0x1853eb||0x1f4;return function(_0x145acb){logger[_0xbf72('0xc')](_0x145acb[_0xbf72('0xd')]);if(_0x145acb[_0xbf72('0xe')]){delete _0x145acb[_0xbf72('0xe')];}_0x1c3453['status'](_0x1853eb)[_0xbf72('0xf')](_0x145acb);};}exports[_0xbf72('0xa')]=function(_0x57cccf,_0x5d8c85){if(_0x57cccf[_0xbf72('0x10')]['role']!=='admin')throw new Error('Unauthorized');if(isNaN(Number(_0x57cccf[_0xbf72('0x11')]['id'])))throw new Error(_0xbf72('0x12'));return db[_0xbf72('0x13')][_0xbf72('0x14')]({'where':{'id':_0x57cccf[_0xbf72('0x11')]['id']}})[_0xbf72('0x15')](handleEntityNotFound(_0x5d8c85,null))['then'](saveUpdates(_0x57cccf[_0xbf72('0x16')],null))[_0xbf72('0x15')](respondWithResult(_0x5d8c85,null))[_0xbf72('0x17')](handleError(_0x5d8c85,null));};
\ No newline at end of file
index 564b058..5ffc1c6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6a88=['events','UserSetting','setMaxListeners','save','remove','emit','hasOwnProperty','hook'];(function(_0x36eb8,_0x191e35){var _0x4d79e5=function(_0x5b037b){while(--_0x5b037b){_0x36eb8['push'](_0x36eb8['shift']());}};_0x4d79e5(++_0x191e35);}(_0x6a88,0x80));var _0x86a8=function(_0x19aa84,_0x549537){_0x19aa84=_0x19aa84-0x0;var _0x536146=_0x6a88[_0x19aa84];return _0x536146;};'use strict';var EventEmitter=require(_0x86a8('0x0'));var UserSetting=require('../../mysqldb')['db'][_0x86a8('0x1')];var UserSettingEvents=new EventEmitter();UserSettingEvents[_0x86a8('0x2')](0x0);var events={'afterCreate':_0x86a8('0x3'),'afterUpdate':'update','afterDestroy':_0x86a8('0x4')};function emitEvent(_0x2e7bee){return function(_0x367347,_0x3c47fd,_0x4a95c9){UserSettingEvents[_0x86a8('0x5')](_0x2e7bee+':'+_0x367347['id'],_0x367347);UserSettingEvents[_0x86a8('0x5')](_0x2e7bee,_0x367347);_0x4a95c9(null);};}for(var e in events){if(events[_0x86a8('0x6')](e)){var event=events[e];UserSetting[_0x86a8('0x7')](e,emitEvent(event));}}module['exports']=UserSettingEvents;
\ No newline at end of file
+var _0x7995=['hasOwnProperty','exports','events','../../mysqldb','UserSetting','update','emit'];(function(_0x21125f,_0x8079f8){var _0x2f421d=function(_0x231299){while(--_0x231299){_0x21125f['push'](_0x21125f['shift']());}};_0x2f421d(++_0x8079f8);}(_0x7995,0xf7));var _0x5799=function(_0x380ade,_0x3698d9){_0x380ade=_0x380ade-0x0;var _0x4d421a=_0x7995[_0x380ade];return _0x4d421a;};'use strict';var EventEmitter=require(_0x5799('0x0'));var UserSetting=require(_0x5799('0x1'))['db'][_0x5799('0x2')];var UserSettingEvents=new EventEmitter();UserSettingEvents['setMaxListeners'](0x0);var events={'afterCreate':'save','afterUpdate':_0x5799('0x3'),'afterDestroy':'remove'};function emitEvent(_0x5ad6a1){return function(_0x39c573,_0x4c0970,_0x35d4be){UserSettingEvents['emit'](_0x5ad6a1+':'+_0x39c573['id'],_0x39c573);UserSettingEvents[_0x5799('0x4')](_0x5ad6a1,_0x39c573);_0x35d4be(null);};}for(var e in events){if(events[_0x5799('0x5')](e)){var event=events[e];UserSetting['hook'](e,emitEvent(event));}}module[_0x5799('0x6')]=UserSettingEvents;
\ No newline at end of file
index 7da057d..478a990 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x153f=['exports','define','UserSetting','user_settings','clientSideLoggingEnabledSince','./user-setting.attributes'];(function(_0x46e363,_0x45d7e2){var _0x3fb059=function(_0x5e6274){while(--_0x5e6274){_0x46e363['push'](_0x46e363['shift']());}};_0x3fb059(++_0x45d7e2);}(_0x153f,0x15b));var _0xf153=function(_0x4597c3,_0x55f176){_0x4597c3=_0x4597c3-0x0;var _0x4cc619=_0x153f[_0x4597c3];return _0x4cc619;};'use strict';var attributes=require(_0xf153('0x0'));module[_0xf153('0x1')]=function(_0xde7eae){return _0xde7eae[_0xf153('0x2')](_0xf153('0x3'),attributes,{'tableName':_0xf153('0x4'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x3b85fc){if(!_0x3b85fc['clientSideLoggingEnabled'])_0x3b85fc[_0xf153('0x5')]=null;else if(_0x3b85fc['clientSideLoggingEnabledSince']===null)_0x3b85fc[_0xf153('0x5')]=new Date();}}});};
\ No newline at end of file
+var _0x049e=['clientSideLoggingEnabled','clientSideLoggingEnabledSince','./user-setting.attributes','exports','define','user_settings'];(function(_0x52de48,_0x5bc748){var _0x18f4c0=function(_0x44459e){while(--_0x44459e){_0x52de48['push'](_0x52de48['shift']());}};_0x18f4c0(++_0x5bc748);}(_0x049e,0x16a));var _0xe049=function(_0x4cba56,_0x5b2c44){_0x4cba56=_0x4cba56-0x0;var _0x3cc9f3=_0x049e[_0x4cba56];return _0x3cc9f3;};'use strict';var attributes=require(_0xe049('0x0'));module[_0xe049('0x1')]=function(_0x5efb24){return _0x5efb24[_0xe049('0x2')]('UserSetting',attributes,{'tableName':_0xe049('0x3'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x13cc6a){if(!_0x13cc6a[_0xe049('0x4')])_0x13cc6a[_0xe049('0x5')]=null;else if(_0x13cc6a[_0xe049('0x5')]===null)_0x13cc6a['clientSideLoggingEnabledSince']=new Date();}}});};
\ No newline at end of file
index 6a82e01..7d255c7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x98d6=['save','remove','update','emit','user-setting:update:user-','length','user-setting:','./user-setting.events'];(function(_0x593ce4,_0x44a5a2){var _0x111454=function(_0x2b4a2a){while(--_0x2b4a2a){_0x593ce4['push'](_0x593ce4['shift']());}};_0x111454(++_0x44a5a2);}(_0x98d6,0x147));var _0x698d=function(_0x212ce0,_0xf73fc3){_0x212ce0=_0x212ce0-0x0;var _0x32b93f=_0x98d6[_0x212ce0];return _0x32b93f;};'use strict';var UserSettingEvents=require(_0x698d('0x0'));var events=[_0x698d('0x1'),_0x698d('0x2'),_0x698d('0x3')];function createListener(_0x40f21b,_0x43646c){return function(_0x16805f){_0x43646c[_0x698d('0x4')](_0x40f21b,_0x16805f);if(_0x40f21b==='user-setting:update'){_0x43646c[_0x698d('0x4')](_0x698d('0x5')+_0x16805f['UserId'],_0x16805f);}};}exports['register']=function(_0x500ae7){for(var _0x422f33=0x0,_0x4af52f=events[_0x698d('0x6')];_0x422f33<_0x4af52f;_0x422f33++){var _0x143ac9=events[_0x422f33];var _0x264964=createListener(_0x698d('0x7')+_0x143ac9,_0x500ae7);UserSettingEvents['on'](_0x143ac9,_0x264964);}};
\ No newline at end of file
+var _0xb7d2=['user-setting:update','user-setting:update:user-','UserId','register','user-setting:','./user-setting.events','emit'];(function(_0x1862f1,_0x1cc924){var _0x51b0b9=function(_0xc1b5c5){while(--_0xc1b5c5){_0x1862f1['push'](_0x1862f1['shift']());}};_0x51b0b9(++_0x1cc924);}(_0xb7d2,0x1b7));var _0x2b7d=function(_0x46c0bb,_0x33f86a){_0x46c0bb=_0x46c0bb-0x0;var _0x75a353=_0xb7d2[_0x46c0bb];return _0x75a353;};'use strict';var UserSettingEvents=require(_0x2b7d('0x0'));var events=['save','remove','update'];function createListener(_0xac91f5,_0x46b429){return function(_0x540ebe){_0x46b429[_0x2b7d('0x1')](_0xac91f5,_0x540ebe);if(_0xac91f5===_0x2b7d('0x2')){_0x46b429[_0x2b7d('0x1')](_0x2b7d('0x3')+_0x540ebe[_0x2b7d('0x4')],_0x540ebe);}};}exports[_0x2b7d('0x5')]=function(_0x5efd6b){for(var _0x3695cb=0x0,_0x28b827=events['length'];_0x3695cb<_0x28b827;_0x3695cb++){var _0x332de2=events[_0x3695cb];var _0x11bbee=createListener(_0x2b7d('0x6')+_0x332de2,_0x5efd6b);UserSettingEvents['on'](_0x332de2,_0x11bbee);}};
\ No newline at end of file
index fa3d4c8..37fde9f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd2d2=['/:id/mail_interactions','addMailInteractions','/:id/fax_interactions','addFaxInteractions','/:id/sms_interactions','addSmsInteractions','addWhatsappInteractions','addFaxAccounts','/:id/mail_accounts','addMailAccounts','addWhatsappAccounts','/:id/api_key','/:id','update','put','/:id/password','changePassword','delete','removeQueues','removeTeams','destroy','removeChatInteractions','removeMailInteractions','removeFaxInteractions','removeSmsInteractions','/:id/openchannel_interactions','removeOpenchannelInteractions','/:id/whatsapp_interactions','removeFaxAccounts','removeMailAccounts','removeSmsAccounts','removeApiKey','/:id/messengerSoundNotification','messengerSoundNotification','exports','util','path','express','Router','fs-extra','../../components/interaction/service','../../config/environment','get','index','isAuthenticated','/whoami','whoami','/:id/avatar','getAvatar','getOpenTabs','/:id/contacts','getContacts','/:id/queues','getQueues','/:id/queues_rt','/:id/groups','getGroups','/:id/recordings','getRecordings','/:id/screen_recordings','/:id/chat/interactions','/:id/openchannel/interactions','getOpenchannelInteractions','getMailInteractions','/:id/sms/interactions','getSmsInteractions','/:id/fax/interactions','/:id/whatsapp/interactions','getWhatsappInteractions','/:id/teams','getTeams','/:id/lists','getLists','/:id/agents','getAgents','/:id/prefixes','getVoicePrefixes','/:id/fax_accounts','getFaxAccounts','getMailAccounts','/:id/openchannel_accounts','getOpenchannelAccounts','/:id/sms_accounts','getSmsAccounts','/:id/chat_websites','/:id/whatsapp_accounts','getWhatsappAccounts','/:id/scheduled_calls','getScheduledCalls','getApiKey','post','create','/create_many','bulkCreate','addQueues','join','server/files/images/','format','now','originalname','single','addAvatar','/:id/login','login','/:id/logout','logout','/:id/pause','unpause','addTeams','/:id/chat_interactions','addChatInteractions'];(function(_0x2f10e3,_0x5018fe){var _0x37264=function(_0x6e2ce1){while(--_0x6e2ce1){_0x2f10e3['push'](_0x2f10e3['shift']());}};_0x37264(++_0x5018fe);}(_0xd2d2,0x101));var _0x2d2d=function(_0x1a7553,_0x533217){_0x1a7553=_0x1a7553-0x0;var _0xfe9834=_0xd2d2[_0x1a7553];return _0xfe9834;};'use strict';var multer=require('multer');var util=require(_0x2d2d('0x0'));var path=require(_0x2d2d('0x1'));var timeout=require('connect-timeout');var express=require(_0x2d2d('0x2'));var router=express[_0x2d2d('0x3')]();var fs_extra=require(_0x2d2d('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x2d2d('0x5'));var config=require(_0x2d2d('0x6'));var controller=require('./user.controller');router[_0x2d2d('0x7')]('/',auth['isAuthenticated'](),controller[_0x2d2d('0x8')]);router[_0x2d2d('0x7')]('/describe',auth[_0x2d2d('0x9')](),controller['describe']);router[_0x2d2d('0x7')](_0x2d2d('0xa'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0xb')]);router['get']('/presence',auth['isAuthenticated'](),controller['getPresence']);router[_0x2d2d('0x7')]('/:id',auth[_0x2d2d('0x9')](),controller['show']);router[_0x2d2d('0x7')](_0x2d2d('0xc'),controller[_0x2d2d('0xd')]);router['get']('/:id/open_tabs',auth[_0x2d2d('0x9')](),controller[_0x2d2d('0xe')]);router[_0x2d2d('0x7')](_0x2d2d('0xf'),auth['isAuthenticated'](),controller[_0x2d2d('0x10')]);router['get'](_0x2d2d('0x11'),auth['isAuthenticated'](),controller[_0x2d2d('0x12')]);router[_0x2d2d('0x7')](_0x2d2d('0x13'),auth[_0x2d2d('0x9')](),controller['getVoiceQueuesRt']);router[_0x2d2d('0x7')](_0x2d2d('0x14'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x15')]);router[_0x2d2d('0x7')](_0x2d2d('0x16'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x17')]);router[_0x2d2d('0x7')](_0x2d2d('0x18'),auth['isAuthenticated'](),controller['getScreenRecordings']);router[_0x2d2d('0x7')](_0x2d2d('0x19'),auth['isAuthenticated'](),controller['getChatInteractions']);router[_0x2d2d('0x7')](_0x2d2d('0x1a'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x1b')]);router['get']('/:id/mail/interactions',auth['isAuthenticated'](),controller[_0x2d2d('0x1c')]);router['get'](_0x2d2d('0x1d'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x1e')]);router[_0x2d2d('0x7')](_0x2d2d('0x1f'),auth[_0x2d2d('0x9')](),controller['getFaxInteractions']);router[_0x2d2d('0x7')](_0x2d2d('0x20'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x21')]);router[_0x2d2d('0x7')](_0x2d2d('0x22'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x23')]);router['get'](_0x2d2d('0x24'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x25')]);router[_0x2d2d('0x7')](_0x2d2d('0x26'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x27')]);router['get'](_0x2d2d('0x28'),auth['isAuthenticated'](),controller[_0x2d2d('0x29')]);router['get'](_0x2d2d('0x2a'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x2b')]);router[_0x2d2d('0x7')]('/:id/mail_accounts',auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x2c')]);router['get'](_0x2d2d('0x2d'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x2e')]);router[_0x2d2d('0x7')](_0x2d2d('0x2f'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x30')]);router[_0x2d2d('0x7')](_0x2d2d('0x31'),auth[_0x2d2d('0x9')](),controller['getChatWebsites']);router[_0x2d2d('0x7')](_0x2d2d('0x32'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x33')]);router[_0x2d2d('0x7')](_0x2d2d('0x34'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x35')]);router[_0x2d2d('0x7')]('/:id/api_key',auth['isAuthenticated'](),controller[_0x2d2d('0x36')]);router[_0x2d2d('0x37')]('/:id/contacts',auth['isAuthenticated'](),controller['addContacts']);router[_0x2d2d('0x37')]('/',auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x38')]);router[_0x2d2d('0x37')](_0x2d2d('0x39'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x3a')]);router['post'](_0x2d2d('0x11'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x3b')]);var upload=multer({'storage':multer['diskStorage']({'destination':function(_0x4ca1f5,_0x2acf93,_0x1bdd9f){_0x1bdd9f(null,path[_0x2d2d('0x3c')](config['root'],_0x2d2d('0x3d')));},'filename':function(_0x154a8d,_0x2368ae,_0x969768){_0x969768(null,util[_0x2d2d('0x3e')]('%s-%s',Date[_0x2d2d('0x3f')](),_0x2368ae[_0x2d2d('0x40')]));}})});router[_0x2d2d('0x37')]('/:id/avatar',upload[_0x2d2d('0x41')]('file'),controller[_0x2d2d('0x42')]);router[_0x2d2d('0x37')](_0x2d2d('0x43'),auth['isAuthenticated'](),controller[_0x2d2d('0x44')]);router[_0x2d2d('0x37')](_0x2d2d('0x45'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x46')]);router[_0x2d2d('0x37')](_0x2d2d('0x47'),auth[_0x2d2d('0x9')](),controller['pause']);router[_0x2d2d('0x37')]('/:id/unpause',auth['isAuthenticated'](),controller[_0x2d2d('0x48')]);router['post'](_0x2d2d('0x22'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x49')]);router[_0x2d2d('0x37')](_0x2d2d('0x4a'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x4b')]);router[_0x2d2d('0x37')](_0x2d2d('0x4c'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x4d')]);router[_0x2d2d('0x37')](_0x2d2d('0x4e'),auth['isAuthenticated'](),controller[_0x2d2d('0x4f')]);router[_0x2d2d('0x37')](_0x2d2d('0x50'),auth['isAuthenticated'](),controller[_0x2d2d('0x51')]);router[_0x2d2d('0x37')]('/:id/openchannel_interactions',auth[_0x2d2d('0x9')](),controller['addOpenchannelInteractions']);router['post']('/:id/whatsapp_interactions',auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x52')]);router['post'](_0x2d2d('0x2a'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x53')]);router[_0x2d2d('0x37')](_0x2d2d('0x54'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x55')]);router[_0x2d2d('0x37')](_0x2d2d('0x2d'),auth[_0x2d2d('0x9')](),controller['addOpenchannelAccounts']);router['post'](_0x2d2d('0x2f'),auth[_0x2d2d('0x9')](),controller['addSmsAccounts']);router[_0x2d2d('0x37')]('/:id/chat_websites',auth[_0x2d2d('0x9')](),controller['addChatWebsites']);router[_0x2d2d('0x37')](_0x2d2d('0x32'),auth['isAuthenticated'](),controller[_0x2d2d('0x56')]);router[_0x2d2d('0x37')](_0x2d2d('0x57'),auth[_0x2d2d('0x9')](),controller['createApiKey']);router['put'](_0x2d2d('0x58'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x59')]);router[_0x2d2d('0x5a')](_0x2d2d('0x5b'),auth['isAuthenticated'](),controller[_0x2d2d('0x5c')]);router[_0x2d2d('0x5d')](_0x2d2d('0x11'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x5e')]);router[_0x2d2d('0x5d')](_0x2d2d('0x22'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x5f')]);router[_0x2d2d('0x5d')]('/:id',auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x60')]);router[_0x2d2d('0x5d')](_0x2d2d('0x4a'),auth['isAuthenticated'](),controller[_0x2d2d('0x61')]);router[_0x2d2d('0x5d')](_0x2d2d('0x4c'),auth['isAuthenticated'](),controller[_0x2d2d('0x62')]);router[_0x2d2d('0x5d')](_0x2d2d('0x4e'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x63')]);router['delete'](_0x2d2d('0x50'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x64')]);router['delete'](_0x2d2d('0x65'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x66')]);router[_0x2d2d('0x5d')](_0x2d2d('0x67'),auth['isAuthenticated'](),controller['removeWhatsappInteractions']);router[_0x2d2d('0x5d')](_0x2d2d('0x2a'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x68')]);router['delete'](_0x2d2d('0x54'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x69')]);router[_0x2d2d('0x5d')]('/:id/openchannel_accounts',auth[_0x2d2d('0x9')](),controller['removeOpenchannelAccounts']);router[_0x2d2d('0x5d')](_0x2d2d('0x2f'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x6a')]);router[_0x2d2d('0x5d')]('/:id/chat_websites',auth[_0x2d2d('0x9')](),controller['removeChatWebsites']);router[_0x2d2d('0x5d')](_0x2d2d('0x32'),auth[_0x2d2d('0x9')](),controller['removeWhatsappAccounts']);router['delete'](_0x2d2d('0x57'),auth['isAuthenticated'](),controller[_0x2d2d('0x6b')]);router[_0x2d2d('0x37')](_0x2d2d('0x6c'),auth[_0x2d2d('0x9')](),controller[_0x2d2d('0x6d')]);module[_0x2d2d('0x6e')]=router;
\ No newline at end of file
+var _0xe897=['pause','/:id/unpause','unpause','addTeams','addChatInteractions','addFaxInteractions','/:id/sms_interactions','addSmsInteractions','/:id/openchannel_interactions','/:id/whatsapp_interactions','addWhatsappInteractions','addFaxAccounts','addOpenchannelAccounts','createApiKey','put','update','/:id/password','changePassword','delete','removeQueues','removeTeams','/:id/chat_interactions','removeChatInteractions','/:id/mail_interactions','/:id/fax_interactions','removeSmsInteractions','removeOpenchannelInteractions','removeFaxAccounts','removeMailAccounts','removeOpenchannelAccounts','removeChatWebsites','removeWhatsappAccounts','removeApiKey','/:id/messengerSoundNotification','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./user.controller','get','isAuthenticated','/whoami','getPresence','/:id','show','/:id/avatar','getAvatar','/:id/open_tabs','getOpenTabs','/:id/contacts','getContacts','getQueues','/:id/groups','getGroups','/:id/recordings','getRecordings','/:id/screen_recordings','getScreenRecordings','/:id/chat/interactions','getChatInteractions','getOpenchannelInteractions','getSmsInteractions','getFaxInteractions','/:id/whatsapp/interactions','getWhatsappInteractions','/:id/teams','getTeams','/:id/lists','/:id/agents','getAgents','/:id/prefixes','getVoicePrefixes','/:id/fax_accounts','/:id/mail_accounts','getMailAccounts','/:id/openchannel_accounts','getOpenchannelAccounts','/:id/sms_accounts','/:id/chat_websites','getChatWebsites','/:id/whatsapp_accounts','getWhatsappAccounts','/:id/api_key','getApiKey','post','addContacts','create','/create_many','bulkCreate','addQueues','diskStorage','root','server/files/images/','format','%s-%s','now','originalname','single','file','addAvatar','/:id/login','login','/:id/logout','logout','/:id/pause'];(function(_0x3d8a12,_0x2e6f30){var _0x3dbb5d=function(_0x4b60aa){while(--_0x4b60aa){_0x3d8a12['push'](_0x3d8a12['shift']());}};_0x3dbb5d(++_0x2e6f30);}(_0xe897,0x16d));var _0x7e89=function(_0x52c15c,_0x2b87e0){_0x52c15c=_0x52c15c-0x0;var _0x4641bd=_0xe897[_0x52c15c];return _0x4641bd;};'use strict';var multer=require('multer');var util=require(_0x7e89('0x0'));var path=require(_0x7e89('0x1'));var timeout=require(_0x7e89('0x2'));var express=require(_0x7e89('0x3'));var router=express[_0x7e89('0x4')]();var fs_extra=require(_0x7e89('0x5'));var auth=require(_0x7e89('0x6'));var interaction=require(_0x7e89('0x7'));var config=require('../../config/environment');var controller=require(_0x7e89('0x8'));router[_0x7e89('0x9')]('/',auth[_0x7e89('0xa')](),controller['index']);router[_0x7e89('0x9')]('/describe',auth[_0x7e89('0xa')](),controller['describe']);router[_0x7e89('0x9')](_0x7e89('0xb'),auth[_0x7e89('0xa')](),controller['whoami']);router[_0x7e89('0x9')]('/presence',auth[_0x7e89('0xa')](),controller[_0x7e89('0xc')]);router['get'](_0x7e89('0xd'),auth[_0x7e89('0xa')](),controller[_0x7e89('0xe')]);router[_0x7e89('0x9')](_0x7e89('0xf'),controller[_0x7e89('0x10')]);router[_0x7e89('0x9')](_0x7e89('0x11'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x12')]);router['get'](_0x7e89('0x13'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x14')]);router[_0x7e89('0x9')]('/:id/queues',auth[_0x7e89('0xa')](),controller[_0x7e89('0x15')]);router[_0x7e89('0x9')]('/:id/queues_rt',auth[_0x7e89('0xa')](),controller['getVoiceQueuesRt']);router['get'](_0x7e89('0x16'),auth['isAuthenticated'](),controller[_0x7e89('0x17')]);router[_0x7e89('0x9')](_0x7e89('0x18'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x19')]);router[_0x7e89('0x9')](_0x7e89('0x1a'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x1b')]);router['get'](_0x7e89('0x1c'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x1d')]);router[_0x7e89('0x9')]('/:id/openchannel/interactions',auth[_0x7e89('0xa')](),controller[_0x7e89('0x1e')]);router[_0x7e89('0x9')]('/:id/mail/interactions',auth[_0x7e89('0xa')](),controller['getMailInteractions']);router[_0x7e89('0x9')]('/:id/sms/interactions',auth[_0x7e89('0xa')](),controller[_0x7e89('0x1f')]);router[_0x7e89('0x9')]('/:id/fax/interactions',auth[_0x7e89('0xa')](),controller[_0x7e89('0x20')]);router[_0x7e89('0x9')](_0x7e89('0x21'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x22')]);router[_0x7e89('0x9')](_0x7e89('0x23'),auth['isAuthenticated'](),controller[_0x7e89('0x24')]);router[_0x7e89('0x9')](_0x7e89('0x25'),auth['isAuthenticated'](),controller['getLists']);router['get'](_0x7e89('0x26'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x27')]);router[_0x7e89('0x9')](_0x7e89('0x28'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x29')]);router['get'](_0x7e89('0x2a'),auth[_0x7e89('0xa')](),controller['getFaxAccounts']);router[_0x7e89('0x9')](_0x7e89('0x2b'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x2c')]);router['get'](_0x7e89('0x2d'),auth['isAuthenticated'](),controller[_0x7e89('0x2e')]);router[_0x7e89('0x9')](_0x7e89('0x2f'),auth[_0x7e89('0xa')](),controller['getSmsAccounts']);router[_0x7e89('0x9')](_0x7e89('0x30'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x31')]);router[_0x7e89('0x9')](_0x7e89('0x32'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x33')]);router[_0x7e89('0x9')]('/:id/scheduled_calls',auth[_0x7e89('0xa')](),controller['getScheduledCalls']);router[_0x7e89('0x9')](_0x7e89('0x34'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x35')]);router[_0x7e89('0x36')](_0x7e89('0x13'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x37')]);router[_0x7e89('0x36')]('/',auth[_0x7e89('0xa')](),controller[_0x7e89('0x38')]);router['post'](_0x7e89('0x39'),auth['isAuthenticated'](),controller[_0x7e89('0x3a')]);router[_0x7e89('0x36')]('/:id/queues',auth[_0x7e89('0xa')](),controller[_0x7e89('0x3b')]);var upload=multer({'storage':multer[_0x7e89('0x3c')]({'destination':function(_0x1d7902,_0x2b1424,_0x1a1535){_0x1a1535(null,path['join'](config[_0x7e89('0x3d')],_0x7e89('0x3e')));},'filename':function(_0xf77aab,_0x4b026f,_0x205716){_0x205716(null,util[_0x7e89('0x3f')](_0x7e89('0x40'),Date[_0x7e89('0x41')](),_0x4b026f[_0x7e89('0x42')]));}})});router[_0x7e89('0x36')]('/:id/avatar',upload[_0x7e89('0x43')](_0x7e89('0x44')),controller[_0x7e89('0x45')]);router[_0x7e89('0x36')](_0x7e89('0x46'),auth['isAuthenticated'](),controller[_0x7e89('0x47')]);router[_0x7e89('0x36')](_0x7e89('0x48'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x49')]);router[_0x7e89('0x36')](_0x7e89('0x4a'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x4b')]);router[_0x7e89('0x36')](_0x7e89('0x4c'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x4d')]);router[_0x7e89('0x36')]('/:id/teams',auth[_0x7e89('0xa')](),controller[_0x7e89('0x4e')]);router['post']('/:id/chat_interactions',auth[_0x7e89('0xa')](),controller[_0x7e89('0x4f')]);router['post']('/:id/mail_interactions',auth[_0x7e89('0xa')](),controller['addMailInteractions']);router[_0x7e89('0x36')]('/:id/fax_interactions',auth[_0x7e89('0xa')](),controller[_0x7e89('0x50')]);router[_0x7e89('0x36')](_0x7e89('0x51'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x52')]);router[_0x7e89('0x36')](_0x7e89('0x53'),auth[_0x7e89('0xa')](),controller['addOpenchannelInteractions']);router[_0x7e89('0x36')](_0x7e89('0x54'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x55')]);router[_0x7e89('0x36')](_0x7e89('0x2a'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x56')]);router[_0x7e89('0x36')](_0x7e89('0x2b'),auth['isAuthenticated'](),controller['addMailAccounts']);router['post'](_0x7e89('0x2d'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x57')]);router[_0x7e89('0x36')](_0x7e89('0x2f'),auth[_0x7e89('0xa')](),controller['addSmsAccounts']);router['post'](_0x7e89('0x30'),auth[_0x7e89('0xa')](),controller['addChatWebsites']);router[_0x7e89('0x36')](_0x7e89('0x32'),auth[_0x7e89('0xa')](),controller['addWhatsappAccounts']);router[_0x7e89('0x36')](_0x7e89('0x34'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x58')]);router[_0x7e89('0x59')](_0x7e89('0xd'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x5a')]);router['put'](_0x7e89('0x5b'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x5c')]);router[_0x7e89('0x5d')]('/:id/queues',auth[_0x7e89('0xa')](),controller[_0x7e89('0x5e')]);router['delete']('/:id/teams',auth['isAuthenticated'](),controller[_0x7e89('0x5f')]);router['delete']('/:id',auth[_0x7e89('0xa')](),controller['destroy']);router[_0x7e89('0x5d')](_0x7e89('0x60'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x61')]);router[_0x7e89('0x5d')](_0x7e89('0x62'),auth['isAuthenticated'](),controller['removeMailInteractions']);router[_0x7e89('0x5d')](_0x7e89('0x63'),auth[_0x7e89('0xa')](),controller['removeFaxInteractions']);router['delete'](_0x7e89('0x51'),auth['isAuthenticated'](),controller[_0x7e89('0x64')]);router['delete'](_0x7e89('0x53'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x65')]);router['delete']('/:id/whatsapp_interactions',auth[_0x7e89('0xa')](),controller['removeWhatsappInteractions']);router[_0x7e89('0x5d')](_0x7e89('0x2a'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x66')]);router[_0x7e89('0x5d')](_0x7e89('0x2b'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x67')]);router[_0x7e89('0x5d')](_0x7e89('0x2d'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x68')]);router['delete'](_0x7e89('0x2f'),auth['isAuthenticated'](),controller['removeSmsAccounts']);router[_0x7e89('0x5d')](_0x7e89('0x30'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x69')]);router['delete'](_0x7e89('0x32'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x6a')]);router[_0x7e89('0x5d')](_0x7e89('0x34'),auth[_0x7e89('0xa')](),controller[_0x7e89('0x6b')]);router[_0x7e89('0x36')](_0x7e89('0x6c'),auth[_0x7e89('0xa')](),controller['messengerSoundNotification']);module[_0x7e89('0x6d')]=router;
\ No newline at end of file
index 41f1ed7..cbfa09b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb064=['update','TEXT','showWebBar','isArray','wss','encryption','force_avp','icesupport','dtlscertfile','dtlsprivatekey','avpf','dtlsenable','dtlsverify','/etc/pki/tls/certs/motion.crt','permissions','map','phoneBarEnableScreenRecordingByAgent','string','true','false','screenrecording','blocked','blockedAt','sequelize','moment','util','exports','STRING','name','setDataValue','defaultuser','The\x20name\x20of\x20the\x20user','fullname','callerid','format','email','admin','user','agent','telephone','local','INTEGER','internal','accountcode','\x22%s\x22\x20<%s>','getDataValue','BOOLEAN','DATE','dynamic','ENUM','friend','peer','ALLOWED_NOT_SCREENED','ALLOWED','PROHIB_NOT_SCREENED','PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN','PROHIB','udp','transport','join','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','rfc2833','info','shortinfo','inband','auto','nonat','yes','nat','all','ulaw;alaw;gsm','allow','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22gsm\x22]','insecure','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]','\x22\x22\x20<>','always','refuse','originate','uac','uas','certificate','actpass'];(function(_0x2ef822,_0x4ad97a){var _0x36dfa0=function(_0x3f215d){while(--_0x3f215d){_0x2ef822['push'](_0x2ef822['shift']());}};_0x36dfa0(++_0x4ad97a);}(_0xb064,0x1c0));var _0x4b06=function(_0xdea41a,_0x552987){_0xdea41a=_0xdea41a-0x0;var _0x15d0d8=_0xb064[_0xdea41a];return _0x15d0d8;};'use strict';var Sequelize=require(_0x4b06('0x0'));var moment=require(_0x4b06('0x1'));var util=require(_0x4b06('0x2'));var _=require('lodash');module[_0x4b06('0x3')]={'name':{'type':Sequelize[_0x4b06('0x4')],'allowNull':![],'unique':_0x4b06('0x5'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i},'set':function(_0x595d08){this[_0x4b06('0x6')](_0x4b06('0x5'),_0x595d08);this[_0x4b06('0x6')](_0x4b06('0x7'),_0x595d08);},'comment':_0x4b06('0x8')},'fullname':{'type':Sequelize[_0x4b06('0x4')],'allowNull':![],'set':function(_0x7e039d){this[_0x4b06('0x6')](_0x4b06('0x9'),_0x7e039d);this['setDataValue'](_0x4b06('0xa'),util[_0x4b06('0xb')]('\x22%s\x22\x20<%s>',_0x7e039d,this['getDataValue']('internal')));}},'alias':{'type':Sequelize[_0x4b06('0x4')]},'email':{'type':Sequelize[_0x4b06('0x4')],'allowNull':![],'unique':_0x4b06('0xc'),'validate':{'isEmail':!![]},'set':function(_0x1e9d9c){if(_0x1e9d9c){this['setDataValue']('email',_0x1e9d9c['toLowerCase']());}}},'role':{'type':Sequelize['ENUM'](_0x4b06('0xd'),_0x4b06('0xe'),_0x4b06('0xf'),_0x4b06('0x10')),'allowNull':![]},'password':{'type':Sequelize[_0x4b06('0x4')],'allowNull':![],'validate':{'notEmpty':!![]}},'provider':{'type':Sequelize['STRING'],'defaultValue':_0x4b06('0x11')},'internal':{'type':Sequelize[_0x4b06('0x12')](0xb),'allowNull':![],'unique':'internal','set':function(_0x15646d){this[_0x4b06('0x6')](_0x4b06('0x13'),_0x15646d);this[_0x4b06('0x6')](_0x4b06('0x14'),_0x15646d);this[_0x4b06('0x6')](_0x4b06('0xa'),util[_0x4b06('0xb')](_0x4b06('0x15'),this[_0x4b06('0x16')](_0x4b06('0x9')),_0x15646d));}},'salt':{'type':Sequelize[_0x4b06('0x4')]},'phone':{'type':Sequelize['STRING']},'mobile':{'type':Sequelize[_0x4b06('0x4')]},'address':{'type':Sequelize[_0x4b06('0x4')]},'zipcode':{'type':Sequelize[_0x4b06('0x4')]},'userpic':{'type':Sequelize[_0x4b06('0x4')]},'city':{'type':Sequelize[_0x4b06('0x4')]},'country':{'type':Sequelize[_0x4b06('0x4')]},'online':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'lastLoginAt':{'type':Sequelize['DATE']},'voicePause':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'chatPause':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'mailPause':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'faxPause':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'smsPause':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'whatsappPause':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'openchannelPause':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'pauseType':{'type':Sequelize[_0x4b06('0x4')],'defaultValue':'DEFAULT\x20PAUSE'},'lastPauseAt':{'type':Sequelize[_0x4b06('0x18')]},'chatCapacity':{'type':Sequelize[_0x4b06('0x12')],'defaultValue':0x0},'mailCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'faxCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'smsCapacity':{'type':Sequelize[_0x4b06('0x12')],'defaultValue':0x0},'whatsappCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'openchannelCapacity':{'type':Sequelize[_0x4b06('0x12')],'defaultValue':0x0},'phoneBarAutoAnswer':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'phoneBarEnableSettings':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':!![]},'phoneBarListenPort':{'type':Sequelize['INTEGER'](0x5),'defaultValue':0x1428},'phoneBarExpires':{'type':Sequelize[_0x4b06('0x12')](0x5),'defaultValue':0x78},'phoneBarRemoteControl':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarRemoteControlPort':{'type':Sequelize['INTEGER'],'defaultValue':0x26a0},'phoneBarEnableRecording':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarRingInUse':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'chanspy':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'description':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'host':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':_0x4b06('0x19')},'ipaddr':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'port':{'type':Sequelize['INTEGER'](0x5),'allowNull':!![]},'regseconds':{'type':Sequelize[_0x4b06('0x12')](0xb),'allowNull':!![]},'fullcontact':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'regserver':{'type':Sequelize['STRING'],'allowNull':!![]},'useragent':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'lastms':{'type':Sequelize[_0x4b06('0x12')](0xb),'allowNull':!![]},'type':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x1b'),'user',_0x4b06('0x1c')),'allowNull':!![],'defaultValue':'friend'},'context':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![],'defaultValue':'from-sip'},'callingpres':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x1d'),'ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN',_0x4b06('0x1e'),_0x4b06('0x1f'),_0x4b06('0x20'),_0x4b06('0x21'),_0x4b06('0x22')),'allowNull':!![]},'deny':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'permit':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'secret':{'type':Sequelize['STRING'],'allowNull':!![]},'md5secret':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'remotesecret':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'transport':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':_0x4b06('0x23'),'set':function(_0xb12b9d){this[_0x4b06('0x6')](_0x4b06('0x24'),_0xb12b9d?_0xb12b9d[_0x4b06('0x25')](','):null);},'get':function(){return this[_0x4b06('0x16')]('transport')?this[_0x4b06('0x16')](_0x4b06('0x24'))[_0x4b06('0x26')](','):null;},'comment':_0x4b06('0x27')},'dtmfmode':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x28'),_0x4b06('0x29'),_0x4b06('0x2a'),_0x4b06('0x2b'),_0x4b06('0x2c')),'allowNull':!![],'defaultValue':_0x4b06('0x28')},'directmedia':{'type':Sequelize[_0x4b06('0x1a')]('yes','no',_0x4b06('0x2d'),'update','outgoing'),'allowNull':!![],'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x2e'),'no'),'allowNull':!![],'defaultValue':'no'},'directmediapermit':{'type':Sequelize['STRING'],'allowNull':!![]},'directmediadeny':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'nat':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![],'defaultValue':'force_rport,comedia','set':function(_0x257b93){this[_0x4b06('0x6')](_0x4b06('0x2f'),_0x257b93?_0x257b93['join'](','):null);},'get':function(){return this['getDataValue']('nat')?this[_0x4b06('0x16')](_0x4b06('0x2f'))['split'](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]'},'callgroup':{'type':Sequelize[_0x4b06('0x4')]},'namedcallgroup':{'type':Sequelize[_0x4b06('0x4')]},'pickupgroup':{'type':Sequelize['STRING']},'namedpickupgroup':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0x4b06('0x4')],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0x4b06('0x4')]},'disallow':{'type':Sequelize[_0x4b06('0x4')],'allowNull':![],'defaultValue':_0x4b06('0x30')},'allow':{'type':Sequelize[_0x4b06('0x4')],'allowNull':![],'defaultValue':_0x4b06('0x31'),'set':function(_0x247c0e){this[_0x4b06('0x6')](_0x4b06('0x32'),_0x247c0e?_0x247c0e[_0x4b06('0x25')](';'):'ulaw;alaw;gsm');},'get':function(){return this[_0x4b06('0x16')](_0x4b06('0x32'))?this['getDataValue'](_0x4b06('0x32'))[_0x4b06('0x26')](';'):null;},'comment':_0x4b06('0x33')},'autoframing':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x2e'),'no'),'allowNull':!![]},'insecure':{'type':Sequelize['STRING'],'allowNull':!![],'set':function(_0x2213ac){this[_0x4b06('0x6')](_0x4b06('0x34'),_0x2213ac?_0x2213ac[_0x4b06('0x25')](','):null);},'get':function(){return this[_0x4b06('0x16')]('insecure')?this['getDataValue'](_0x4b06('0x34'))['split'](','):null;},'comment':_0x4b06('0x35')},'trustrpid':{'type':Sequelize[_0x4b06('0x1a')]('yes','no'),'allowNull':!![],'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x2e'),'no'),'allowNull':!![],'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x4b06('0x1a')]('yes','no','never'),'allowNull':!![]},'promiscredir':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x2e'),'no'),'allowNull':!![]},'useclientcode':{'type':Sequelize['ENUM'](_0x4b06('0x2e'),'no'),'allowNull':!![]},'accountcode':{'type':Sequelize[_0x4b06('0x12')](0xb),'allowNull':!![]},'setvar':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'callerid':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![],'defaultValue':_0x4b06('0x36')},'amaflags':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'callcounter':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x2e'),'no'),'allowNull':!![],'defaultValue':_0x4b06('0x2e')},'busylevel':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'allowoverlap':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x2e'),'no'),'allowNull':!![]},'allowsubscribe':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x2e'),'no'),'allowNull':!![]},'allowtransfer':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x2e'),'no'),'allowNull':!![]},'ignoresdpversion':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x2e'),'no'),'allowNull':!![]},'subscribecontext':{'type':Sequelize['STRING'],'allowNull':!![]},'template':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'videosupport':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x2e'),'no',_0x4b06('0x37')),'allowNull':!![],'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0x4b06('0x12')](0xb),'allowNull':!![]},'rfc2833compensate':{'type':Sequelize[_0x4b06('0x1a')]('yes','no'),'allowNull':!![]},'mailbox':{'type':Sequelize['STRING'],'allowNull':!![]},'session_timers':{'type':Sequelize[_0x4b06('0x1a')]('accept',_0x4b06('0x38'),_0x4b06('0x39')),'allowNull':!![]},'session_expires':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'session_minse':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'session_refresher':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x3a'),_0x4b06('0x3b')),'allowNull':!![],'defaultValue':_0x4b06('0x3b')},'t38pt_usertpsource':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'regexten':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'fromdomain':{'type':Sequelize['STRING'],'allowNull':!![]},'fromuser':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'qualify':{'type':Sequelize['ENUM']('yes','no'),'allowNull':!![],'defaultValue':_0x4b06('0x2e')},'keepalive':{'type':Sequelize[_0x4b06('0x12')](0xb),'allowNull':!![]},'defaultip':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'defaultuser':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'rtptimeout':{'type':Sequelize[_0x4b06('0x12')](0xb),'allowNull':!![]},'rtpholdtimeout':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'rtpkeepalive':{'type':Sequelize[_0x4b06('0x12')](0xb),'allowNull':!![]},'sendrpid':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x2e'),'no'),'allowNull':!![],'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'callbackextension':{'type':Sequelize['STRING'],'allowNull':!![]},'timert1':{'type':Sequelize[_0x4b06('0x12')](0xb),'allowNull':!![]},'timerb':{'type':Sequelize[_0x4b06('0x12')](0xb),'allowNull':!![]},'qualifyfreq':{'type':Sequelize[_0x4b06('0x12')](0xb),'allowNull':!![]},'contactpermit':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'contactdeny':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'contactacl':{'type':Sequelize['STRING'],'allowNull':!![]},'unsolicited_mailbox':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'use_q850_reason':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'maxforwards':{'type':Sequelize[_0x4b06('0x12')](0xb),'allowNull':!![]},'encryption':{'type':Sequelize['ENUM'](_0x4b06('0x2e'),'no'),'allowNull':!![],'defaultValue':'no'},'avpf':{'type':Sequelize['ENUM'](_0x4b06('0x2e'),'no'),'allowNull':!![]},'force_avp':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x2e'),'no'),'allowNull':!![]},'icesupport':{'type':Sequelize['ENUM'](_0x4b06('0x2e'),'no'),'allowNull':!![]},'dtlsenable':{'type':Sequelize['ENUM'](_0x4b06('0x2e'),'no'),'allowNull':!![]},'dtlsverify':{'type':Sequelize['ENUM']('yes','no','fingerprint',_0x4b06('0x3c')),'allowNull':!![]},'dtlsrekey':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'dtlscertfile':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'dtlsprivatekey':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'dtlscipher':{'type':Sequelize['STRING'],'allowNull':!![]},'dtlscafile':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'dtlscapath':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'dtlssetup':{'type':Sequelize[_0x4b06('0x1a')]('active','passive',_0x4b06('0x3d')),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize['STRING'],'allowNull':!![]},'usereqphone':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x2e'),'no'),'allowNull':!![],'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'recordofffeature':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'call_limit':{'type':Sequelize[_0x4b06('0x12')](0xb),'allowNull':!![],'defaultValue':0xa},'registertrying':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x2e'),'no'),'allowNull':!![]},'subscribemwi':{'type':Sequelize[_0x4b06('0x1a')](_0x4b06('0x2e'),'no'),'allowNull':!![]},'vmexten':{'type':Sequelize['STRING'],'allowNull':!![]},'mohinterpret':{'type':Sequelize['STRING'],'allowNull':!![]},'mohsuggest':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'parkinglot':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'canreinvite':{'type':Sequelize[_0x4b06('0x1a')]('yes','no','nonat',_0x4b06('0x3e'),'update,nonat'),'allowNull':!![],'defaultValue':'no'},'loginInPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'resetPasswordToken':{'type':Sequelize[_0x4b06('0x4')]},'resetPasswordExpires':{'type':Sequelize['DATE']},'passwordResetAt':{'type':Sequelize[_0x4b06('0x18')],'defaultValue':null},'previousPasswords':{'type':Sequelize[_0x4b06('0x3f')]},'showWebBar':{'type':Sequelize[_0x4b06('0x12')],'defaultValue':0x0,'set':function(_0xbd5cda){this[_0x4b06('0x6')](_0x4b06('0x40'),_0xbd5cda);var _0x5f3993=this['get']({'plain':!![]});switch(_0xbd5cda){case 0x0:case 0x1:var _0x8784b9=_0x5f3993['transport']?_[_0x4b06('0x41')](_0x5f3993[_0x4b06('0x24')])?_0x5f3993[_0x4b06('0x24')][_0x4b06('0x25')]():_0x5f3993[_0x4b06('0x24')]:_0x4b06('0x23');if(_0x8784b9===_0x4b06('0x42')){_0x8784b9=_0x4b06('0x23');}this[_0x4b06('0x6')](_0x4b06('0x24'),_0x8784b9);this['setDataValue'](_0x4b06('0x43'),'no');this[_0x4b06('0x6')]('avpf',null);this[_0x4b06('0x6')](_0x4b06('0x44'),null);this[_0x4b06('0x6')](_0x4b06('0x45'),null);this[_0x4b06('0x6')]('dtlsenable',null);this[_0x4b06('0x6')]('dtlsverify',null);this[_0x4b06('0x6')]('dtlssetup',null);this['setDataValue'](_0x4b06('0x46'),null);this[_0x4b06('0x6')](_0x4b06('0x47'),null);this['setDataValue']('rtcp_mux','no');break;case 0x2:this['setDataValue'](_0x4b06('0x24'),_0x4b06('0x42'));this[_0x4b06('0x6')]('encryption',_0x4b06('0x2e'));this['setDataValue'](_0x4b06('0x48'),_0x4b06('0x2e'));this[_0x4b06('0x6')](_0x4b06('0x44'),'yes');this['setDataValue'](_0x4b06('0x45'),_0x4b06('0x2e'));this[_0x4b06('0x6')](_0x4b06('0x49'),_0x4b06('0x2e'));this[_0x4b06('0x6')](_0x4b06('0x4a'),'no');this[_0x4b06('0x6')]('dtlssetup',_0x4b06('0x3d'));this[_0x4b06('0x6')]('dtlscertfile',_0x5f3993['dtlscertfile']||_0x4b06('0x4b'));this[_0x4b06('0x6')](_0x4b06('0x47'),_0x5f3993[_0x4b06('0x47')]||'/etc/pki/tls/private/motion.key');this['setDataValue']('rtcp_mux',_0x4b06('0x2e'));break;default:}}},'permissions':{'type':Sequelize[_0x4b06('0x3f')],'set':function(_0x77a6c7){this[_0x4b06('0x6')](_0x4b06('0x4c'),_0x77a6c7?_0x77a6c7['join'](','):[]);},'get':function(){return this[_0x4b06('0x16')](_0x4b06('0x4c'))?_[_0x4b06('0x4d')](this[_0x4b06('0x16')]('permissions')[_0x4b06('0x26')](','),function(_0x2d00f7){return parseInt(_0x2d00f7,0xa);}):[];}},'phoneBarUnconditionalNumber':{'type':Sequelize['STRING']},'phoneBarNoReplyNumber':{'type':Sequelize[_0x4b06('0x4')]},'phoneBarBusyNumber':{'type':Sequelize[_0x4b06('0x4')]},'phoneBarUnconditional':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'phoneBarNoReply':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'phoneBarBusy':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'phoneBarDnd':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':!![]},'phoneBarUnansweredCallBadge':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'phoneBarEnableDtmfTone':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarAutoAnswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'extensionMonitor':{'type':Sequelize[_0x4b06('0x4')],'defaultValue':''},'crudPermissions':{'type':Sequelize[_0x4b06('0x12')],'defaultValue':0x0},'rtcp_mux':{'type':Sequelize[_0x4b06('0x1a')]('yes','no'),'defaultValue':'no'},'allowmessenger':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':!![]},'phoneBarOutboundProxy':{'type':Sequelize[_0x4b06('0x4')]},'phoneBarEnableJaws':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'phoneBarEnableScreenRecordingByAgent':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'phoneBarEnableVideoRecording':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x4b06('0x16')](_0x4b06('0x4e'))?this['getDataValue'](_0x4b06('0x4e')):![];}},'phoneBarEnableAutomaticScreenRecording':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'phoneBarPrefixRequired':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'hotdesk':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'interface':{'type':Sequelize[_0x4b06('0x4')],'defaultValue':null},'privacyEnabled':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'apiKeyNonce':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'apiKeyIat':{'type':Sequelize[_0x4b06('0x4')],'allowNull':!![]},'screenrecording':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'set':function(_0x5284ae){if(typeof _0x5284ae===_0x4b06('0x4f')){var _0x2481f6=_0x5284ae==='1'?!![]:_0x5284ae==='0'?![]:_0x5284ae===_0x4b06('0x50')?!![]:_0x5284ae===_0x4b06('0x51')?![]:![];this[_0x4b06('0x6')]('screenrecording',_0x2481f6);}else{this['setDataValue'](_0x4b06('0x52'),_0x5284ae);}}},'blocked':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![],'set':function(_0x12a87c){this[_0x4b06('0x6')](_0x4b06('0x53'),_0x12a87c);if(_0x12a87c===!![]){this[_0x4b06('0x6')](_0x4b06('0x54'),moment());this[_0x4b06('0x6')]('loginAttempts',0x0);}else{this[_0x4b06('0x6')]('blockedAt',null);}}},'blockedAt':{'type':Sequelize[_0x4b06('0x18')],'defaultValue':null},'loginAttempts':{'type':Sequelize[_0x4b06('0x12')],'defaultValue':0x0},'disabled':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'settingsEnabled':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':!![]},'wssPort':{'type':Sequelize[_0x4b06('0x12')](0x5)['UNSIGNED'],'defaultValue':0x1f99},'downloadAttachments':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':!![]},'ignorePauseForPreviewCalls':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'selectRecallMeCampaign':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'adSsoEnabled':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'chatAutoanswer':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'chatAutoanswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'emailAutoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'emailAutoanswerDelay':{'type':Sequelize[_0x4b06('0x12')],'defaultValue':0x0},'smsAutoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'smsAutoanswerDelay':{'type':Sequelize[_0x4b06('0x12')],'defaultValue':0x0},'openchannelAutoanswer':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'openchannelAutoanswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'faxAutoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'faxAutoanswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'whatsappAutoanswer':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]},'whatsappAutoanswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'messengerSoundNotification':{'type':Sequelize[_0x4b06('0x17')],'defaultValue':![]}};
\ No newline at end of file
+var _0x1472=['udp','transport','split','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22udp\x22,\x20\x22tcp\x22]','rfc2833','shortinfo','inband','yes','nonat','update','outgoing','force_rport,comedia','nat','join','ulaw;alaw;gsm','allow','String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22ulaw\x22,\x20\x22alaw\x22,\x20\x22gsm\x22]','insecure','never','\x22\x22\x20<>','accept','refuse','originate','uac','uas','active','update,nonat','TEXT','showWebBar','get','isArray','wss','encryption','icesupport','dtlsenable','dtlsverify','dtlssetup','rtcp_mux','avpf','actpass','dtlscertfile','/etc/pki/tls/certs/motion.crt','dtlsprivatekey','/etc/pki/tls/private/motion.key','permissions','phoneBarEnableScreenRecordingByAgent','string','true','false','screenrecording','blockedAt','UNSIGNED','sequelize','moment','util','exports','STRING','name','setDataValue','callerid','format','\x22%s\x22\x20<%s>','internal','email','toLowerCase','ENUM','telephone','local','INTEGER','accountcode','getDataValue','BOOLEAN','DEFAULT\x20PAUSE','DATE','friend','user','from-sip','ALLOWED_NOT_SCREENED','ALLOWED_PASSED_SCREEN','ALLOWED_FAILED_SCREEN','ALLOWED','PROHIB_NOT_SCREENED','PROHIB_PASSED_SCREEN','PROHIB_FAILED_SCREEN','PROHIB'];(function(_0x4f99c4,_0x38bc87){var _0x9a9d6d=function(_0x334245){while(--_0x334245){_0x4f99c4['push'](_0x4f99c4['shift']());}};_0x9a9d6d(++_0x38bc87);}(_0x1472,0x188));var _0x2147=function(_0xce9195,_0x1963e1){_0xce9195=_0xce9195-0x0;var _0x530fe6=_0x1472[_0xce9195];return _0x530fe6;};'use strict';var Sequelize=require(_0x2147('0x0'));var moment=require(_0x2147('0x1'));var util=require(_0x2147('0x2'));var _=require('lodash');module[_0x2147('0x3')]={'name':{'type':Sequelize[_0x2147('0x4')],'allowNull':![],'unique':_0x2147('0x5'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i},'set':function(_0x55740d){this[_0x2147('0x6')](_0x2147('0x5'),_0x55740d);this[_0x2147('0x6')]('defaultuser',_0x55740d);},'comment':'The\x20name\x20of\x20the\x20user'},'fullname':{'type':Sequelize[_0x2147('0x4')],'allowNull':![],'set':function(_0x3ce967){this[_0x2147('0x6')]('fullname',_0x3ce967);this[_0x2147('0x6')](_0x2147('0x7'),util[_0x2147('0x8')](_0x2147('0x9'),_0x3ce967,this['getDataValue'](_0x2147('0xa'))));}},'alias':{'type':Sequelize[_0x2147('0x4')]},'email':{'type':Sequelize[_0x2147('0x4')],'allowNull':![],'unique':_0x2147('0xb'),'validate':{'isEmail':!![]},'set':function(_0x221df0){if(_0x221df0){this[_0x2147('0x6')](_0x2147('0xb'),_0x221df0[_0x2147('0xc')]());}}},'role':{'type':Sequelize[_0x2147('0xd')]('admin','user','agent',_0x2147('0xe')),'allowNull':![]},'password':{'type':Sequelize[_0x2147('0x4')],'allowNull':![],'validate':{'notEmpty':!![]}},'provider':{'type':Sequelize['STRING'],'defaultValue':_0x2147('0xf')},'internal':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':![],'unique':_0x2147('0xa'),'set':function(_0x2900d5){this[_0x2147('0x6')](_0x2147('0xa'),_0x2900d5);this[_0x2147('0x6')](_0x2147('0x11'),_0x2900d5);this[_0x2147('0x6')]('callerid',util[_0x2147('0x8')]('\x22%s\x22\x20<%s>',this[_0x2147('0x12')]('fullname'),_0x2900d5));}},'salt':{'type':Sequelize[_0x2147('0x4')]},'phone':{'type':Sequelize['STRING']},'mobile':{'type':Sequelize[_0x2147('0x4')]},'address':{'type':Sequelize[_0x2147('0x4')]},'zipcode':{'type':Sequelize[_0x2147('0x4')]},'userpic':{'type':Sequelize[_0x2147('0x4')]},'city':{'type':Sequelize[_0x2147('0x4')]},'country':{'type':Sequelize[_0x2147('0x4')]},'online':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'lastLoginAt':{'type':Sequelize['DATE']},'voicePause':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'chatPause':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'mailPause':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'faxPause':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'smsPause':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'whatsappPause':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'openchannelPause':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'pauseType':{'type':Sequelize[_0x2147('0x4')],'defaultValue':_0x2147('0x14')},'lastPauseAt':{'type':Sequelize[_0x2147('0x15')]},'chatCapacity':{'type':Sequelize[_0x2147('0x10')],'defaultValue':0x0},'mailCapacity':{'type':Sequelize[_0x2147('0x10')],'defaultValue':0x0},'faxCapacity':{'type':Sequelize[_0x2147('0x10')],'defaultValue':0x0},'smsCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'whatsappCapacity':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'openchannelCapacity':{'type':Sequelize[_0x2147('0x10')],'defaultValue':0x0},'phoneBarAutoAnswer':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'phoneBarEnableSettings':{'type':Sequelize[_0x2147('0x13')],'defaultValue':!![]},'phoneBarListenPort':{'type':Sequelize['INTEGER'](0x5),'defaultValue':0x1428},'phoneBarExpires':{'type':Sequelize['INTEGER'](0x5),'defaultValue':0x78},'phoneBarRemoteControl':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'phoneBarRemoteControlPort':{'type':Sequelize['INTEGER'],'defaultValue':0x26a0},'phoneBarEnableRecording':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'phoneBarRingInUse':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'chanspy':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'description':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'host':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':'dynamic'},'ipaddr':{'type':Sequelize['STRING'],'allowNull':!![]},'port':{'type':Sequelize[_0x2147('0x10')](0x5),'allowNull':!![]},'regseconds':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':!![]},'fullcontact':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'regserver':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'useragent':{'type':Sequelize['STRING'],'allowNull':!![]},'lastms':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':!![]},'type':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x16'),_0x2147('0x17'),'peer'),'allowNull':!![],'defaultValue':'friend'},'context':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![],'defaultValue':_0x2147('0x18')},'callingpres':{'type':Sequelize['ENUM'](_0x2147('0x19'),_0x2147('0x1a'),_0x2147('0x1b'),_0x2147('0x1c'),_0x2147('0x1d'),_0x2147('0x1e'),_0x2147('0x1f'),_0x2147('0x20')),'allowNull':!![]},'deny':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'permit':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'secret':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'md5secret':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'remotesecret':{'type':Sequelize['STRING'],'allowNull':!![]},'transport':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':_0x2147('0x21'),'set':function(_0xcfffda){this[_0x2147('0x6')](_0x2147('0x22'),_0xcfffda?_0xcfffda['join'](','):null);},'get':function(){return this[_0x2147('0x12')](_0x2147('0x22'))?this['getDataValue'](_0x2147('0x22'))[_0x2147('0x23')](','):null;},'comment':_0x2147('0x24')},'dtmfmode':{'type':Sequelize['ENUM'](_0x2147('0x25'),'info',_0x2147('0x26'),_0x2147('0x27'),'auto'),'allowNull':!![],'defaultValue':'rfc2833'},'directmedia':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no',_0x2147('0x29'),_0x2147('0x2a'),_0x2147('0x2b')),'allowNull':!![],'defaultValue':'no'},'directrtpsetup':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no'),'allowNull':!![],'defaultValue':'no'},'directmediapermit':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'directmediadeny':{'type':Sequelize['STRING'],'allowNull':!![]},'nat':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![],'defaultValue':_0x2147('0x2c'),'set':function(_0x3c76b9){this[_0x2147('0x6')](_0x2147('0x2d'),_0x3c76b9?_0x3c76b9[_0x2147('0x2e')](','):null);},'get':function(){return this[_0x2147('0x12')]('nat')?this[_0x2147('0x12')](_0x2147('0x2d'))[_0x2147('0x23')](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22force_rport\x22,\x20\x22comedia\x22]'},'callgroup':{'type':Sequelize[_0x2147('0x4')]},'namedcallgroup':{'type':Sequelize[_0x2147('0x4')]},'pickupgroup':{'type':Sequelize[_0x2147('0x4')]},'namedpickupgroup':{'type':Sequelize[_0x2147('0x4')]},'language':{'type':Sequelize[_0x2147('0x4')],'defaultValue':'en'},'tonezone':{'type':Sequelize[_0x2147('0x4')]},'disallow':{'type':Sequelize[_0x2147('0x4')],'allowNull':![],'defaultValue':'all'},'allow':{'type':Sequelize[_0x2147('0x4')],'allowNull':![],'defaultValue':_0x2147('0x2f'),'set':function(_0x3516f6){this[_0x2147('0x6')](_0x2147('0x30'),_0x3516f6?_0x3516f6['join'](';'):_0x2147('0x2f'));},'get':function(){return this[_0x2147('0x12')](_0x2147('0x30'))?this[_0x2147('0x12')](_0x2147('0x30'))['split'](';'):null;},'comment':_0x2147('0x31')},'autoframing':{'type':Sequelize['ENUM'](_0x2147('0x28'),'no'),'allowNull':!![]},'insecure':{'type':Sequelize['STRING'],'allowNull':!![],'set':function(_0x237ae3){this[_0x2147('0x6')](_0x2147('0x32'),_0x237ae3?_0x237ae3[_0x2147('0x2e')](','):null);},'get':function(){return this[_0x2147('0x12')](_0x2147('0x32'))?this['getDataValue'](_0x2147('0x32'))['split'](','):null;},'comment':'String\x20is\x20deprecated.\x20Please\x20use\x20an\x20Array\x20as\x20[\x22port\x22,\x20\x22invite\x22]'},'trustrpid':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no'),'allowNull':!![],'defaultValue':'no'},'trust_id_outbound':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no'),'allowNull':!![],'defaultValue':'no'},'progressinband':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no',_0x2147('0x33')),'allowNull':!![]},'promiscredir':{'type':Sequelize[_0x2147('0xd')]('yes','no'),'allowNull':!![]},'useclientcode':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no'),'allowNull':!![]},'accountcode':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':!![]},'setvar':{'type':Sequelize['STRING'],'allowNull':!![]},'callerid':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':_0x2147('0x34')},'amaflags':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'callcounter':{'type':Sequelize['ENUM'](_0x2147('0x28'),'no'),'allowNull':!![],'defaultValue':'yes'},'busylevel':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':!![]},'allowoverlap':{'type':Sequelize[_0x2147('0xd')]('yes','no'),'allowNull':!![]},'allowsubscribe':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no'),'allowNull':!![]},'allowtransfer':{'type':Sequelize[_0x2147('0xd')]('yes','no'),'allowNull':!![]},'ignoresdpversion':{'type':Sequelize[_0x2147('0xd')]('yes','no'),'allowNull':!![]},'subscribecontext':{'type':Sequelize['STRING'],'allowNull':!![]},'template':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'videosupport':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no','always'),'allowNull':!![],'defaultValue':'no'},'maxcallbitrate':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':!![]},'rfc2833compensate':{'type':Sequelize['ENUM'](_0x2147('0x28'),'no'),'allowNull':!![]},'mailbox':{'type':Sequelize['STRING'],'allowNull':!![]},'session_timers':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x35'),_0x2147('0x36'),_0x2147('0x37')),'allowNull':!![]},'session_expires':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':!![]},'session_minse':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':!![]},'session_refresher':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x38'),_0x2147('0x39')),'allowNull':!![],'defaultValue':_0x2147('0x39')},'t38pt_usertpsource':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'regexten':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'fromdomain':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'fromuser':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'qualify':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no'),'allowNull':!![],'defaultValue':_0x2147('0x28')},'keepalive':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':!![]},'defaultip':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'defaultuser':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'rtptimeout':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![]},'rtpholdtimeout':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':!![]},'rtpkeepalive':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':!![]},'sendrpid':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no'),'allowNull':!![],'defaultValue':'no'},'outboundproxy':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'callbackextension':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'timert1':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':!![]},'timerb':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':!![]},'qualifyfreq':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':!![]},'contactpermit':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'contactdeny':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'contactacl':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'unsolicited_mailbox':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'use_q850_reason':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'maxforwards':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':!![]},'encryption':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no'),'allowNull':!![],'defaultValue':'no'},'avpf':{'type':Sequelize[_0x2147('0xd')]('yes','no'),'allowNull':!![]},'force_avp':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no'),'allowNull':!![]},'icesupport':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no'),'allowNull':!![]},'dtlsenable':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no'),'allowNull':!![]},'dtlsverify':{'type':Sequelize['ENUM']('yes','no','fingerprint','certificate'),'allowNull':!![]},'dtlsrekey':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':!![]},'dtlscertfile':{'type':Sequelize['STRING'],'allowNull':!![]},'dtlsprivatekey':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'dtlscipher':{'type':Sequelize['STRING'],'allowNull':!![]},'dtlscafile':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'dtlscapath':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'dtlssetup':{'type':Sequelize['ENUM'](_0x2147('0x3a'),'passive','actpass'),'allowNull':!![]},'dtlsfingerprint':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'usereqphone':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no'),'allowNull':!![],'defaultValue':'no'},'recordonfeature':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'recordofffeature':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'call_limit':{'type':Sequelize[_0x2147('0x10')](0xb),'allowNull':!![],'defaultValue':0xa},'registertrying':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no'),'allowNull':!![]},'subscribemwi':{'type':Sequelize[_0x2147('0xd')](_0x2147('0x28'),'no'),'allowNull':!![]},'vmexten':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'mohinterpret':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'mohsuggest':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'parkinglot':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'canreinvite':{'type':Sequelize['ENUM']('yes','no','nonat','update',_0x2147('0x3b')),'allowNull':!![],'defaultValue':'no'},'loginInPause':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'resetPasswordToken':{'type':Sequelize['STRING']},'resetPasswordExpires':{'type':Sequelize[_0x2147('0x15')]},'passwordResetAt':{'type':Sequelize[_0x2147('0x15')],'defaultValue':null},'previousPasswords':{'type':Sequelize[_0x2147('0x3c')]},'showWebBar':{'type':Sequelize['INTEGER'],'defaultValue':0x0,'set':function(_0x27e1f5){this[_0x2147('0x6')](_0x2147('0x3d'),_0x27e1f5);var _0x3f9d74=this[_0x2147('0x3e')]({'plain':!![]});switch(_0x27e1f5){case 0x0:case 0x1:var _0x46f8f2=_0x3f9d74[_0x2147('0x22')]?_[_0x2147('0x3f')](_0x3f9d74[_0x2147('0x22')])?_0x3f9d74[_0x2147('0x22')][_0x2147('0x2e')]():_0x3f9d74['transport']:'udp';if(_0x46f8f2===_0x2147('0x40')){_0x46f8f2='udp';}this['setDataValue']('transport',_0x46f8f2);this['setDataValue'](_0x2147('0x41'),'no');this[_0x2147('0x6')]('avpf',null);this[_0x2147('0x6')]('force_avp',null);this[_0x2147('0x6')](_0x2147('0x42'),null);this['setDataValue'](_0x2147('0x43'),null);this[_0x2147('0x6')](_0x2147('0x44'),null);this[_0x2147('0x6')](_0x2147('0x45'),null);this[_0x2147('0x6')]('dtlscertfile',null);this[_0x2147('0x6')]('dtlsprivatekey',null);this[_0x2147('0x6')](_0x2147('0x46'),'no');break;case 0x2:this[_0x2147('0x6')](_0x2147('0x22'),_0x2147('0x40'));this[_0x2147('0x6')](_0x2147('0x41'),'yes');this[_0x2147('0x6')](_0x2147('0x47'),'yes');this['setDataValue']('force_avp',_0x2147('0x28'));this[_0x2147('0x6')]('icesupport','yes');this[_0x2147('0x6')](_0x2147('0x43'),_0x2147('0x28'));this[_0x2147('0x6')](_0x2147('0x44'),'no');this[_0x2147('0x6')](_0x2147('0x45'),_0x2147('0x48'));this[_0x2147('0x6')](_0x2147('0x49'),_0x3f9d74[_0x2147('0x49')]||_0x2147('0x4a'));this[_0x2147('0x6')](_0x2147('0x4b'),_0x3f9d74['dtlsprivatekey']||_0x2147('0x4c'));this['setDataValue'](_0x2147('0x46'),_0x2147('0x28'));break;default:}}},'permissions':{'type':Sequelize[_0x2147('0x3c')],'set':function(_0x41fc28){this[_0x2147('0x6')](_0x2147('0x4d'),_0x41fc28?_0x41fc28[_0x2147('0x2e')](','):[]);},'get':function(){return this['getDataValue'](_0x2147('0x4d'))?_['map'](this[_0x2147('0x12')](_0x2147('0x4d'))[_0x2147('0x23')](','),function(_0x118341){return parseInt(_0x118341,0xa);}):[];}},'phoneBarUnconditionalNumber':{'type':Sequelize[_0x2147('0x4')]},'phoneBarNoReplyNumber':{'type':Sequelize[_0x2147('0x4')]},'phoneBarBusyNumber':{'type':Sequelize[_0x2147('0x4')]},'phoneBarUnconditional':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'phoneBarNoReply':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarBusy':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'phoneBarDnd':{'type':Sequelize[_0x2147('0x13')],'defaultValue':!![]},'phoneBarUnansweredCallBadge':{'type':Sequelize[_0x2147('0x13')],'defaultValue':!![]},'phoneBarEnableDtmfTone':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'phoneBarAutoAnswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'extensionMonitor':{'type':Sequelize[_0x2147('0x4')],'defaultValue':''},'crudPermissions':{'type':Sequelize[_0x2147('0x10')],'defaultValue':0x0},'rtcp_mux':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'no'},'allowmessenger':{'type':Sequelize[_0x2147('0x13')],'defaultValue':!![]},'phoneBarOutboundProxy':{'type':Sequelize[_0x2147('0x4')]},'phoneBarEnableJaws':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'phoneBarEnableScreenRecordingByAgent':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'phoneBarEnableVideoRecording':{'type':Sequelize['VIRTUAL'],'get':function(){return this['getDataValue']('phoneBarEnableScreenRecordingByAgent')?this[_0x2147('0x12')](_0x2147('0x4e')):![];}},'phoneBarEnableAutomaticScreenRecording':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'phoneBarPrefixRequired':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'hotdesk':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'interface':{'type':Sequelize[_0x2147('0x4')],'defaultValue':null},'privacyEnabled':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'apiKeyNonce':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'apiKeyIat':{'type':Sequelize[_0x2147('0x4')],'allowNull':!![]},'screenrecording':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![],'set':function(_0x566be1){if(typeof _0x566be1===_0x2147('0x4f')){var _0x38244e=_0x566be1==='1'?!![]:_0x566be1==='0'?![]:_0x566be1===_0x2147('0x50')?!![]:_0x566be1===_0x2147('0x51')?![]:![];this[_0x2147('0x6')]('screenrecording',_0x38244e);}else{this[_0x2147('0x6')](_0x2147('0x52'),_0x566be1);}}},'blocked':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![],'set':function(_0x5e3c0d){this['setDataValue']('blocked',_0x5e3c0d);if(_0x5e3c0d===!![]){this[_0x2147('0x6')]('blockedAt',moment());this[_0x2147('0x6')]('loginAttempts',0x0);}else{this['setDataValue'](_0x2147('0x53'),null);}}},'blockedAt':{'type':Sequelize[_0x2147('0x15')],'defaultValue':null},'loginAttempts':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'disabled':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'settingsEnabled':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'wssPort':{'type':Sequelize[_0x2147('0x10')](0x5)[_0x2147('0x54')],'defaultValue':0x1f99},'downloadAttachments':{'type':Sequelize[_0x2147('0x13')],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize[_0x2147('0x13')],'defaultValue':!![]},'ignorePauseForPreviewCalls':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'selectRecallMeCampaign':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'adSsoEnabled':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'chatAutoanswer':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'chatAutoanswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'emailAutoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'emailAutoanswerDelay':{'type':Sequelize[_0x2147('0x10')],'defaultValue':0x0},'smsAutoanswer':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'smsAutoanswerDelay':{'type':Sequelize[_0x2147('0x10')],'defaultValue':0x0},'openchannelAutoanswer':{'type':Sequelize[_0x2147('0x13')],'defaultValue':![]},'openchannelAutoanswerDelay':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'faxAutoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'faxAutoanswerDelay':{'type':Sequelize[_0x2147('0x10')],'defaultValue':0x0},'whatsappAutoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'whatsappAutoanswerDelay':{'type':Sequelize[_0x2147('0x10')],'defaultValue':0x0},'messengerSoundNotification':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}};
\ No newline at end of file
index cb6f3e5..c0bb28f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3d0e=['nonce','You\x20don\x27t\x20have\x20sufficient\x20privileges\x20to\x20access\x20this\x20resource.','removeApiKey','apiKeyNonce','apiKeyIat','API\x20key\x20not\x20available','whoami','Unable\x20to\x20retrieve\x20the\x20current\x20user','getPresence','ringing','inbound','toString','asc','uniqBy','orderBy','getRealtimeAgents','offline','pause','voiceStatus','unavailable','busy','slice','charAt','toUpperCase','SELECT','field','ui.createdAt','user_has_','_interactions','ui.UserId\x20=\x20?','OpenTabs','messengerSoundNotification','enabled','moment','util','path','lodash','squel','ioredis','../../components/auth/service','../../components/contacts','../../config/logger','../../config/environment','../../config/license/util','../../errors/api','APIBadRequestError','APINotFoundError','APIForbiddenrror','handleError','../../mysqldb','socket.io-emitter','redis','./user.socket','register','defaults','sendStatus','status','json','limit','undefined','count','offset','update','then','role','agent','userNotification:recalc:','destroy','get','admin','Users','Agents','telephone','filter','ignore','map','value','includes','find','name','UserProfileResource','end','error','stack','send','User','rawAttributes','fieldName','type','key','password','salt','previousPasswords','resetPasswordToken','resetPasswordExpires','md5secret','index','getOptions','where','query','includeAll','include','UserSetting','attributes','push','findAll','rows','true','length','dataValues','sms','fax','mail','whatsapp','all','catch','show','params','userSetting','merge','openTabs','chat','body','describe','addContacts','omit','ids','internal','Setting','securePassword','validatePasswordPattern','max','isNil','min_internal','sequelize','QueryTypes','from','mailbox','VoiceMail','email','permissions','101','102','113','110','104','105','106','108','109','100','111','114','115','create','user','Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20user','Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20another\x20administrator','checkUserLimits','settingsEnabled','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','bulkCreate','Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20administrator','some','userProfileId','isEmpty','Telephones','changePassword','oldPassword','newPassword','Sequelize','ValidationError','Invalid\x20body\x20format.\x20Use\x20oldPassword\x20and\x20newPassword','authenticate','Wrong\x20credentials','New\x20password\x20must\x20be\x20different\x20from\x20old\x20password','Invalid\x20body\x20format.\x20Use\x20newPassword','Unauthorized','enforcePasswordHistory','passwordHistoryLimit','updatePasswordsHistory','channel','online','voicePause','isValidChannel','Unknown\x20channel','capitalize','toLowerCase','Queues','Queue:save','voice','VoiceQueue','interface','format','penalty','UserVoiceQueueRt','upsert','removeQueues','remove','isArray','QueueId','emit','Queue:remove','addAvatar','userpic','file','getAvatar','server/files/images/logos/default_profile.png','download','existsSync','join','root','server/files/images/','openchannel','ChatOpenTabs','CHAT','createdAt','FaxOpenTabs','FAX','OpenchannelOpenTabs','OPENCHANNEL','MailOpenTabs','MAIL','SmsOpenTabs','WHATSAPP','concat','hasOwnProperty','CmList','List','Tag','Tags','color','tag','getQueues','findOne','model','Queue','keys','filters','intersection','fields','order','sort','pick','Unknown\x20role','nolimit','getVoiceQueuesRt','options','getGroups','getRecordings','VoiceRecording','UserId','getScreenRecordings','ScreenRecording','getChatInteractions','ChatInteraction','getOpenchannelInteractions','OpenchannelInteraction','getMailInteractions','MailInteraction','getSmsInteractions','getFaxInteractions','FaxInteraction','WhatsappInteraction','getWhatsappInteractions','login','phone','mobile','LOCAL/%s@from-sip/n','SIP/%s','intrf','user:%s','headers','x-forwarded-for','connection','remoteAddress','socket','User\x20not\x20found\x20or\x20not\x20allowed\x20to\x20perform\x20login\x20method','getVoiceQueues','loginInPause','forEach','YYYY-MM-DD\x20HH:mm:ss','LOGIN','device','PAUSE','LOGININPAUSE','MemberReport','logout','getChannels','DEFAULT\x20PAUSE','unpause','Channel\x20parameter\x20%s\x20is\x20invalid','mailPause','chatPause','faxPause','openchannelPause','lastPauseAt','User\x20with\x20id\x20%s\x20not\x20found','getTeams','Team','resolve','Body\x20parameter\x20\x27ids\x27\x20is\x20required','transaction','addTeams','getAssociatedQueues','addAgent','getDataValue','Voice','TeamVoicePrefix','UserVoicePrefix','removeTeams','VoicePrefixId','getLists','getAgents','values','CmHopper','addChatInteractions','spread','user_has_chat_interactions:save','removeChatInteractions','user_has_chat_interactions:remove','addMailInteractions','user_has_mail_interactions:save','removeMailInteractions','user_has_mail_interactions:remove','addFaxInteractions','removeFaxInteractions','user_has_fax_interactions:remove','addSmsInteractions','removeSmsInteractions','user_has_sms_interactions:remove','addOpenchannelInteractions','removeOpenchannelInteractions','user_has_openchannel_interactions:remove','addWhatsappInteractions','removeWhatsappInteractions','getVoicePrefixes','VoicePrefix','FaxAccount','getFaxAccounts','addFaxAccounts','removeFaxAccounts','MailAccount','getMailAccounts','addMailAccounts','removeMailAccounts','getOpenchannelAccounts','OpenchannelAccount','addOpenchannelAccounts','getSmsAccounts','addSmsAccounts','removeSmsAccounts','getChatWebsites','ChatWebsite','addChatWebsites','removeChatWebsites','WhatsappAccount','getWhatsappAccounts','addWhatsappAccounts','removeWhatsappAccounts','$or','$gt','$gte','$lt','$lte','$ne','$eq','$not','$between','$notBetween','$in','$notIn','$like','$iLike','$notILike','$overlap','$contained','$any','lastName','CmContact','getApiKey','token','No\x20API\x20access\x20key\x20found!','createApiKey'];(function(_0x3e5086,_0x48f4a2){var _0xfeb102=function(_0x5a945f){while(--_0x5a945f){_0x3e5086['push'](_0x3e5086['shift']());}};_0xfeb102(++_0x48f4a2);}(_0x3d0e,0x1a3));var _0xe3d0=function(_0x491a7f,_0x28bb80){_0x491a7f=_0x491a7f-0x0;var _0x3d8f44=_0x3d0e[_0x491a7f];return _0x3d8f44;};'use strict';var moment=require(_0xe3d0('0x0'));var util=require(_0xe3d0('0x1'));var path=require(_0xe3d0('0x2'));var fs=require('fs');var _=require(_0xe3d0('0x3'));var squel=require(_0xe3d0('0x4'));var Redis=require(_0xe3d0('0x5'));var authService=require(_0xe3d0('0x6'));var contacts=require(_0xe3d0('0x7'));var qs=require('../../components/parsers/qs');var rta=require('../../components/realtime/agents');var logger=require(_0xe3d0('0x8'))('api');var utils=require('../../config/utils');var config=require(_0xe3d0('0x9'));var licenseUtil=require(_0xe3d0('0xa'));var APIBadRequestError=require(_0xe3d0('0xb'))[_0xe3d0('0xc')];var APINotFoundError=require(_0xe3d0('0xb'))[_0xe3d0('0xd')];var APIForbiddenError=require(_0xe3d0('0xb'))[_0xe3d0('0xe')];var APIHandleError=require(_0xe3d0('0xb'))[_0xe3d0('0xf')];var db=require(_0xe3d0('0x10'))['db'];var socket=require(_0xe3d0('0x11'))(new Redis(config[_0xe3d0('0x12')]));require(_0xe3d0('0x13'))[_0xe3d0('0x14')](socket);config['redis']=_[_0xe3d0('0x15')](config['redis'],{'host':'localhost','port':0x18eb});var values;function respondWithStatusCode(_0x4c3e3e,_0x469110){_0x469110=_0x469110||0xcc;return function(_0x282cb9){if(_0x282cb9){return _0x4c3e3e[_0xe3d0('0x16')](_0x469110);}return _0x4c3e3e[_0xe3d0('0x17')](_0x469110)['end']();};}function respondWithResult(_0x46837d,_0x25bcc0){_0x25bcc0=_0x25bcc0||0xc8;return function(_0x31ec3e){if(_0x31ec3e){return _0x46837d['status'](_0x25bcc0)[_0xe3d0('0x18')](_0x31ec3e);}};}function respondWithFilteredResult(_0x25aba5,_0x37b3e7){return function(_0xd468e6){if(_0xd468e6){var _0x3dfe5d=typeof _0x37b3e7['offset']==='undefined'&&typeof _0x37b3e7[_0xe3d0('0x19')]===_0xe3d0('0x1a');var _0x1a78a4=_0xd468e6[_0xe3d0('0x1b')];var _0x4f9557=_0x3dfe5d?0x0:_0x37b3e7[_0xe3d0('0x1c')];var _0x57aa95=_0x3dfe5d?_0xd468e6[_0xe3d0('0x1b')]:_0x37b3e7[_0xe3d0('0x1c')]+_0x37b3e7[_0xe3d0('0x19')];var _0x2395c1;if(_0x57aa95>=_0x1a78a4){_0x57aa95=_0x1a78a4;_0x2395c1=0xc8;}else{_0x2395c1=0xce;}_0x25aba5['status'](_0x2395c1);return _0x25aba5['set']('Content-Range',_0x4f9557+'-'+_0x57aa95+'/'+_0x1a78a4)[_0xe3d0('0x18')](_0xd468e6);}return null;};}function saveUpdates(_0xd9b1d0){return function(_0x2e5fd4){if(_0x2e5fd4){return _0x2e5fd4[_0xe3d0('0x1d')](_0xd9b1d0)[_0xe3d0('0x1e')](function(_0x8c5cf3){if(_0x8c5cf3[_0xe3d0('0x1f')]===_0xe3d0('0x20')){socket['emit'](_0xe3d0('0x21')+_0x8c5cf3['id'],_0x8c5cf3);}return _0x8c5cf3;});}return null;};}function removeEntity(_0x5e9e58,_0x25e525){return function(_0x20b258){if(_0x20b258){return _0x20b258[_0xe3d0('0x22')]({'transaction':_0x25e525})[_0xe3d0('0x1e')](function(){var _0x4180f2=_0x20b258[_0xe3d0('0x23')]({'plain':!![]});if(_0x4180f2[_0xe3d0('0x1f')]===_0xe3d0('0x24'))return;var _0x18282b=[{'name':_0xe3d0('0x25'),'value':'user','ignore':!![]},{'name':_0xe3d0('0x26'),'value':_0xe3d0('0x20'),'ignore':![]},{'name':'Telephones','value':_0xe3d0('0x27'),'ignore':![]}];var _0x14b6c1=_(_0x18282b)[_0xe3d0('0x28')](_0xe3d0('0x29'))[_0xe3d0('0x2a')](_0xe3d0('0x2b'))[_0xe3d0('0x2b')]();if(_[_0xe3d0('0x2c')](_0x14b6c1,_0x4180f2[_0xe3d0('0x1f')])){return;}var _0x2b5653=_[_0xe3d0('0x2d')](_0x18282b,[_0xe3d0('0x2b'),_0x4180f2[_0xe3d0('0x1f')]])[_0xe3d0('0x2e')];return db[_0xe3d0('0x2f')][_0xe3d0('0x22')]({'where':{'type':_0x2b5653,'resourceId':_0x4180f2['id']},'transaction':_0x25e525})['then'](function(){return _0x20b258;});})[_0xe3d0('0x1e')](function(){_0x5e9e58['status'](0xcc)[_0xe3d0('0x30')]();});}};}function handleEntityNotFound(_0x1ad952){return function(_0x23a763){if(!_0x23a763){_0x1ad952[_0xe3d0('0x16')](0x194);}return _0x23a763;};}function handleError(_0x51f7a7,_0x392605){_0x392605=_0x392605||0x1f4;return function(_0x50bb4a){logger[_0xe3d0('0x31')](_0x50bb4a[_0xe3d0('0x32')]);if(_0x50bb4a['name']){delete _0x50bb4a['name'];}_0x51f7a7['status'](_0x392605)[_0xe3d0('0x33')](_0x50bb4a);};}function getUserAttributes(){return _(db[_0xe3d0('0x34')][_0xe3d0('0x35')])['map'](function(_0x196bda){return{'name':_0x196bda[_0xe3d0('0x36')],'type':_0x196bda[_0xe3d0('0x37')][_0xe3d0('0x38')]};})[_0xe3d0('0x28')](function(_0x5f07a6){return![_0xe3d0('0x39'),_0xe3d0('0x3a'),_0xe3d0('0x3b'),_0xe3d0('0x3c'),_0xe3d0('0x3d'),_0xe3d0('0x3e')][_0xe3d0('0x2c')](_0x5f07a6['name']);})['value']();}exports[_0xe3d0('0x3f')]=function(_0xf58d87,_0x2cf5d3){var _0x3ea962={},_0x5f57e8={'count':0x0,'rows':[]};var _0x4ad6a=getUserAttributes();_0x3ea962=qs[_0xe3d0('0x40')](_0x4ad6a,_0xf58d87);var _0x592c59={'where':_0x3ea962[_0xe3d0('0x41')]};return db[_0xe3d0('0x34')]['count'](_0x592c59)[_0xe3d0('0x1e')](function(_0x1ec5e7){_0x5f57e8['count']=_0x1ec5e7;if(_0xf58d87[_0xe3d0('0x42')][_0xe3d0('0x43')]){_0x3ea962[_0xe3d0('0x44')]=[{'all':!![]}];}if(_0xf58d87[_0xe3d0('0x42')]['userSetting']==='true'){_0x3ea962[_0xe3d0('0x44')]=[{'model':db[_0xe3d0('0x45')],'as':'userSetting'}];}if(!_[_0xe3d0('0x2c')](_0x3ea962[_0xe3d0('0x46')],'id')){_0x3ea962[_0xe3d0('0x46')][_0xe3d0('0x47')]('id');}return db[_0xe3d0('0x34')][_0xe3d0('0x48')](_0x3ea962);})[_0xe3d0('0x1e')](function(_0x286a42){_0x5f57e8[_0xe3d0('0x49')]=_0x286a42;if(_0xf58d87[_0xe3d0('0x42')]['openTabs']===_0xe3d0('0x4a')){var _0x339aa2=[];for(var _0x1f3cc2=0x0;_0x1f3cc2<_0x5f57e8[_0xe3d0('0x49')][_0xe3d0('0x4b')];_0x1f3cc2++){_0x339aa2[_0xe3d0('0x47')](get_open_tabs('chat',_0x5f57e8['rows'][_0x1f3cc2][_0xe3d0('0x4c')]));_0x339aa2[_0xe3d0('0x47')](get_open_tabs(_0xe3d0('0x4d'),_0x5f57e8[_0xe3d0('0x49')][_0x1f3cc2]['dataValues']));_0x339aa2[_0xe3d0('0x47')](get_open_tabs(_0xe3d0('0x4e'),_0x5f57e8['rows'][_0x1f3cc2]['dataValues']));_0x339aa2[_0xe3d0('0x47')](get_open_tabs(_0xe3d0('0x4f'),_0x5f57e8['rows'][_0x1f3cc2][_0xe3d0('0x4c')]));_0x339aa2[_0xe3d0('0x47')](get_open_tabs('openchannel',_0x5f57e8[_0xe3d0('0x49')][_0x1f3cc2][_0xe3d0('0x4c')]));_0x339aa2[_0xe3d0('0x47')](get_open_tabs(_0xe3d0('0x50'),_0x5f57e8[_0xe3d0('0x49')][_0x1f3cc2][_0xe3d0('0x4c')]));}return Promise[_0xe3d0('0x51')](_0x339aa2)[_0xe3d0('0x1e')](function(){return _0x5f57e8;});}else{return _0x5f57e8;}})['then'](respondWithFilteredResult(_0x2cf5d3,_0x3ea962))[_0xe3d0('0x52')](handleError(_0x2cf5d3,null));};exports[_0xe3d0('0x53')]=function(_0x118ba3,_0x439774){var _0x3dfc0e=getUserAttributes();_0x118ba3[_0xe3d0('0x42')]['id']=_0x118ba3[_0xe3d0('0x54')]['id'];var _0x17927d=qs[_0xe3d0('0x40')](_0x3dfc0e,_0x118ba3);if(_0x118ba3[_0xe3d0('0x42')]['includeAll']){_0x17927d[_0xe3d0('0x44')]=[{'all':!![]}];}if(_0x118ba3[_0xe3d0('0x42')][_0xe3d0('0x55')]===_0xe3d0('0x4a')){_0x17927d['include']=[{'model':db[_0xe3d0('0x45')],'as':_0xe3d0('0x55')}];}_0x17927d=_[_0xe3d0('0x56')]({},_0x17927d,_0x118ba3['options']);if(!_[_0xe3d0('0x2c')](_0x17927d[_0xe3d0('0x46')],'id')){_0x17927d['attributes']['push']('id');}return db[_0xe3d0('0x34')]['find'](_0x17927d)[_0xe3d0('0x1e')](handleEntityNotFound(_0x439774,null))[_0xe3d0('0x1e')](function(_0x5cb49f){var _0x180adf=[];values=_0x5cb49f;if(_0x118ba3['query'][_0xe3d0('0x57')]==='true'){_0x180adf[_0xe3d0('0x47')](get_open_tabs(_0xe3d0('0x58'),_0x5cb49f[_0xe3d0('0x4c')]));_0x180adf['push'](get_open_tabs(_0xe3d0('0x4d'),_0x5cb49f['dataValues']));_0x180adf[_0xe3d0('0x47')](get_open_tabs('openchannel',_0x5cb49f['dataValues']));_0x180adf['push'](get_open_tabs('whatsapp',_0x5cb49f[_0xe3d0('0x4c')]));_0x180adf[_0xe3d0('0x47')](get_open_tabs('fax',_0x5cb49f[_0xe3d0('0x4c')]));_0x180adf[_0xe3d0('0x47')](get_open_tabs(_0xe3d0('0x4f'),_0x5cb49f['dataValues']));return Promise[_0xe3d0('0x51')](_0x180adf);}else{return values;}})[_0xe3d0('0x1e')](function(){return values;})[_0xe3d0('0x1e')](respondWithResult(_0x439774,null))[_0xe3d0('0x52')](handleError(_0x439774,null));};exports[_0xe3d0('0x1d')]=function(_0x556193,_0x4fa181){if(_0x556193['body']['id']){delete _0x556193[_0xe3d0('0x59')]['id'];}delete _0x556193[_0xe3d0('0x59')][_0xe3d0('0x1f')];return db['User'][_0xe3d0('0x2d')]({'where':{'id':_0x556193[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x4fa181,null))[_0xe3d0('0x1e')](saveUpdates(_0x556193[_0xe3d0('0x59')],null))[_0xe3d0('0x1e')](respondWithResult(_0x4fa181,null))[_0xe3d0('0x52')](handleError(_0x4fa181,null));};exports['describe']=function(_0x4f0a97,_0x293657){return db[_0xe3d0('0x34')][_0xe3d0('0x5a')]()[_0xe3d0('0x1e')](respondWithResult(_0x293657,null))['catch'](handleError(_0x293657,null));};exports[_0xe3d0('0x5b')]=function(_0x25a738,_0x368864){return db['User'][_0xe3d0('0x2d')]({'where':{'id':_0x25a738['params']['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x368864,null))['then'](function(_0xbeb1f){if(_0xbeb1f){return _0xbeb1f[_0xe3d0('0x5b')](_0x25a738[_0xe3d0('0x59')]['ids'],_[_0xe3d0('0x5c')](_0x25a738[_0xe3d0('0x59')],[_0xe3d0('0x5d'),'id'])||{});}})[_0xe3d0('0x1e')](respondWithResult(_0x368864,null))[_0xe3d0('0x52')](handleError(_0x368864,null));};function validateUser(_0xb37251){return new Promise(function(_0x45d619,_0x3ba28f){if(_0xb37251[_0xe3d0('0x5e')])return _0x45d619(_0xb37251);return db[_0xe3d0('0x5f')]['findById'](0x1)[_0xe3d0('0x1e')](function(_0x2018e0){if(_0x2018e0[_0xe3d0('0x60')])authService[_0xe3d0('0x61')](_0xb37251[_0xe3d0('0x39')]);db[_0xe3d0('0x34')][_0xe3d0('0x62')](_0xe3d0('0x5e'))[_0xe3d0('0x1e')](function(_0x3b1f95){if(_[_0xe3d0('0x63')](_0x3b1f95)){_0xb37251[_0xe3d0('0x5e')]=_0x2018e0[_0xe3d0('0x64')]||0x1;return;}if(_['isNil'](_0x2018e0['min_internal'])||_0x2018e0[_0xe3d0('0x64')]===_0x3b1f95){_0xb37251['internal']=_0x3b1f95+0x1;return;}if(_0x2018e0[_0xe3d0('0x64')]>_0x3b1f95){_0xb37251[_0xe3d0('0x5e')]=_0x2018e0[_0xe3d0('0x64')];return;}return db[_0xe3d0('0x65')][_0xe3d0('0x42')]('select\x20(select\x20IFNULL(max(internal)+1,1)\x20from\x20users\x20where\x20internal\x20<\x20md.internal)\x20as\x20\x27from\x27,\x20md.internal\x20-\x201\x20as\x20\x27to\x27\x20from\x20users\x20md\x20where\x20md.internal\x20!=\x201\x20and\x20not\x20exists\x20(select\x201\x20from\x20users\x20md2\x20where\x20md2.internal\x20=\x20md.internal\x20-\x201)',{'type':db['sequelize'][_0xe3d0('0x66')]['SELECT']})['then'](function(_0x385483){if(_0x385483&&_0x385483[_0xe3d0('0x4b')]){for(var _0x12292d=0x0,_0x3b0f9f=_0x385483[_0xe3d0('0x4b')];_0x12292d<_0x3b0f9f&&_[_0xe3d0('0x63')](_0xb37251[_0xe3d0('0x5e')]);_0x12292d++){if(_0x2018e0[_0xe3d0('0x64')]<=_0x385483[_0x12292d][_0xe3d0('0x67')]){_0xb37251[_0xe3d0('0x5e')]=_0x385483[_0x12292d][_0xe3d0('0x67')];}else if(_0x2018e0[_0xe3d0('0x64')]>_0x385483[_0x12292d][_0xe3d0('0x67')]&&_0x2018e0[_0xe3d0('0x64')]<=_0x385483[_0x12292d]['to']){_0xb37251['internal']=_0x2018e0[_0xe3d0('0x64')];}}}if(_[_0xe3d0('0x63')](_0xb37251[_0xe3d0('0x5e')])){_0xb37251['internal']=_0x3b1f95+0x1;}return _0x45d619(_0xb37251);});});})[_0xe3d0('0x52')](function(_0x5ce4c4){_0x3ba28f(_0x5ce4c4);});});}function updateUser(_0x192c9d){return new Promise(function(_0x41e8f3,_0x19cb85){try{if(_0x192c9d['voicemail']){_0x192c9d[_0xe3d0('0x68')]=_0x192c9d[_0xe3d0('0x5e')];_0x192c9d[_0xe3d0('0x69')]={'mailbox':_0x192c9d[_0xe3d0('0x5e')],'password':_0x192c9d['password'],'fullname':_0x192c9d['fullname'],'email':_0x192c9d[_0xe3d0('0x6a')]};}if(_0x192c9d[_0xe3d0('0x1f')]===_0xe3d0('0x20')){if(!_0x192c9d['permissions'])_0x192c9d[_0xe3d0('0x6b')]=[_0xe3d0('0x6c'),_0xe3d0('0x6d'),'103',_0xe3d0('0x6e'),_0xe3d0('0x6f'),_0xe3d0('0x70'),_0xe3d0('0x71'),_0xe3d0('0x72'),'107',_0xe3d0('0x73'),_0xe3d0('0x74'),_0xe3d0('0x75'),_0xe3d0('0x76'),_0xe3d0('0x77'),_0xe3d0('0x78')];}_0x41e8f3(_0x192c9d);}catch(_0xdf0882){_0x19cb85(_0xdf0882);}});}exports[_0xe3d0('0x79')]=function(_0x391b2c,_0xdb5fcd){if(_0x391b2c[_0xe3d0('0x7a')]['role']===_0xe3d0('0x20'))throw new Error('Unauthorized');if(_0x391b2c[_0xe3d0('0x59')][_0xe3d0('0x1f')]===_0xe3d0('0x7a')&&_0x391b2c[_0xe3d0('0x7a')][_0xe3d0('0x1f')]!=='admin'){throw new Error(_0xe3d0('0x7b'));}if(_0x391b2c['body'][_0xe3d0('0x1f')]===_0xe3d0('0x24')&&_0x391b2c['user'][_0xe3d0('0x1f')]!=='admin'){throw new Error(_0xe3d0('0x7c'));}return licenseUtil[_0xe3d0('0x7d')]([_0x391b2c[_0xe3d0('0x59')]])['then'](function(){return validateUser(_0x391b2c[_0xe3d0('0x59')]);})[_0xe3d0('0x1e')](function(_0x3ead4f){return updateUser(_0x3ead4f)[_0xe3d0('0x1e')](function(_0x33660b){if(_0x33660b[_0xe3d0('0x1f')]==='admin'){_0x33660b[_0xe3d0('0x7e')]=_0x391b2c['user'][_0xe3d0('0x7e')];delete _0x33660b['userProfileId'];}return _0x33660b;});})[_0xe3d0('0x1e')](function(_0x51f80b){return db[_0xe3d0('0x34')][_0xe3d0('0x79')](_0x51f80b,{'include':[{'model':db[_0xe3d0('0x69')],'as':_0xe3d0('0x69')}]});})['then'](function(_0x1b8ade){if(_0x391b2c[_0xe3d0('0x59')][_0xe3d0('0x1f')]===_0xe3d0('0x7a'))return _0x1b8ade;if(_0x391b2c['user'][_0xe3d0('0x1f')]!==_0xe3d0('0x7a'))return _0x1b8ade;return db[_0xe3d0('0x7f')]['find']({'where':{'name':_0x1b8ade['role']===_0xe3d0('0x20')?'Agents':'Telephones','userProfileId':_0x391b2c[_0xe3d0('0x7a')]['userProfileId']},'raw':!![]})[_0xe3d0('0x1e')](function(_0x2cc268){if(!_0x2cc268||_0x2cc268[_0xe3d0('0x80')]!=0x0)return _0x1b8ade;return db[_0xe3d0('0x2f')][_0xe3d0('0x79')]({'name':_0x1b8ade[_0xe3d0('0x2e')],'resourceId':_0x1b8ade['id'],'type':_0x2cc268[_0xe3d0('0x2e')],'sectionId':_0x2cc268['id']},{})[_0xe3d0('0x1e')](function(){return _0x1b8ade;});})['catch'](function(_0x1b0e06){logger[_0xe3d0('0x31')](_0xe3d0('0x81'),_0x1b0e06);throw _0x1b0e06;});})['then'](respondWithResult(_0xdb5fcd,0xc9))['catch'](handleError(_0xdb5fcd,null));};exports[_0xe3d0('0x82')]=function(_0x3502aa,_0x945c53){var _0x1a1ec7=_0x3502aa[_0xe3d0('0x59')];var _0x119df6=[];if(_0x3502aa[_0xe3d0('0x7a')]['role']===_0xe3d0('0x20'))throw new Error('Unauthorized');if(_['some'](_0x1a1ec7,[_0xe3d0('0x1f'),_0xe3d0('0x7a')])&&_0x3502aa[_0xe3d0('0x7a')][_0xe3d0('0x1f')]!==_0xe3d0('0x24')){throw new Error(_0xe3d0('0x7b'));}if(_['some'](_0x1a1ec7,['role',_0xe3d0('0x24')])&&_0x3502aa['user']['role']!==_0xe3d0('0x24')){throw new Error(_0xe3d0('0x83'));}return licenseUtil[_0xe3d0('0x7d')](_0x1a1ec7)['then'](function(){return validateUser(_0x1a1ec7[0x0]);})[_0xe3d0('0x1e')](function(){for(var _0xb59f57=0x1;_0xb59f57<_0x1a1ec7[_0xe3d0('0x4b')];_0xb59f57++){var _0x1c7b24=_0x1a1ec7[_0xb59f57-0x1][_0xe3d0('0x5e')];if(!_0x1a1ec7[_0xb59f57][_0xe3d0('0x5e')])_0x1a1ec7[_0xb59f57][_0xe3d0('0x5e')]=_0x1c7b24+0x1;_0x119df6['push'](validateUser(_0x1a1ec7[_0xb59f57]));}return Promise[_0xe3d0('0x51')](_0x119df6);})['then'](function(){_0x119df6=[];for(var _0x2a0824=0x0;_0x2a0824<_0x1a1ec7[_0xe3d0('0x4b')];_0x2a0824++){_0x119df6['push'](updateUser(_0x1a1ec7[_0x2a0824]));}return Promise[_0xe3d0('0x51')](_0x119df6);})[_0xe3d0('0x1e')](function(){_0x119df6=_0x1a1ec7[_0xe3d0('0x2a')](function(_0x4736bb){return db[_0xe3d0('0x34')][_0xe3d0('0x79')](_0x4736bb,{'include':[{'model':db['VoiceMail'],'as':_0xe3d0('0x69')}]})[_0xe3d0('0x1e')](function(_0xd2f8d9){_0x4736bb['id']=_0xd2f8d9['id'];return _0x4736bb;});});return Promise[_0xe3d0('0x51')](_0x119df6);})[_0xe3d0('0x1e')](function(_0x24bf49){if(_0x3502aa[_0xe3d0('0x59')][_0xe3d0('0x1f')]==='user')return _0x24bf49;if(_0x3502aa['user'][_0xe3d0('0x1f')]!==_0xe3d0('0x7a'))return _0x24bf49;var _0x2a1889=_[_0xe3d0('0x84')](_0x24bf49,function(_0x21ba85){return _0x21ba85[_0xe3d0('0x1f')]==='agent'||_0x21ba85[_0xe3d0('0x1f')]===_0xe3d0('0x27');});if(!_0x2a1889)return _0x24bf49;return db[_0xe3d0('0x7f')]['findAll']({'where':{'name':{'$or':['Agents','Telephones']},'userProfileId':_0x3502aa[_0xe3d0('0x7a')][_0xe3d0('0x85')]},'raw':!![]})[_0xe3d0('0x1e')](function(_0xd74f7c){if(_[_0xe3d0('0x86')](_0xd74f7c)||!_['some'](_0xd74f7c,[_0xe3d0('0x80'),0x0]))return _0x24bf49;_0x119df6=[];var _0x4fb565=_(_0xd74f7c)[_0xe3d0('0x2a')](function(_0x32d595){if(_0x32d595[_0xe3d0('0x80')]===0x1)return;return _0x32d595[_0xe3d0('0x2e')]==='Agents'?_0xe3d0('0x20'):_0xe3d0('0x27');})['compact']()['value']();for(var _0x13d944=0x0;_0x13d944<_0x24bf49[_0xe3d0('0x4b')];_0x13d944++){if(!_[_0xe3d0('0x2c')](_0x4fb565,_0x24bf49[_0x13d944][_0xe3d0('0x1f')]))return;var _0x59e686=_0x24bf49[_0x13d944]['role']===_0xe3d0('0x20')?_0xe3d0('0x26'):_0xe3d0('0x87');_0x119df6[_0xe3d0('0x47')](db['UserProfileResource'][_0xe3d0('0x79')]({'name':_0x24bf49[_0x13d944][_0xe3d0('0x2e')],'resourceId':_0x24bf49[_0x13d944]['id'],'type':_0x59e686,'sectionId':_[_0xe3d0('0x2d')](_0xd74f7c,[_0xe3d0('0x2e'),_0x59e686])['id']},{}));}return Promise['all'](_0x119df6);});})[_0xe3d0('0x1e')](respondWithResult(_0x945c53,0xc9))[_0xe3d0('0x52')](handleError(_0x945c53,null));};exports[_0xe3d0('0x88')]=function(_0x2c0923,_0x20f2ad){if(_0x2c0923[_0xe3d0('0x59')]['id']){delete _0x2c0923[_0xe3d0('0x59')]['id'];}return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x2c0923[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](function(_0x1a3d89){if(!_0x1a3d89)return null;if(_0x1a3d89['id']===_0x2c0923['user']['id']){if(!_0x2c0923[_0xe3d0('0x59')][_0xe3d0('0x89')]||!_0x2c0923[_0xe3d0('0x59')][_0xe3d0('0x8a')]){throw new db[(_0xe3d0('0x8b'))][(_0xe3d0('0x8c'))](_0xe3d0('0x8d'));}if(!_0x1a3d89[_0xe3d0('0x8e')](_0x2c0923['body']['oldPassword'])){throw new db[(_0xe3d0('0x8b'))][(_0xe3d0('0x8c'))](_0xe3d0('0x8f'));}if(_0x2c0923['body'][_0xe3d0('0x89')]===_0x2c0923[_0xe3d0('0x59')]['newPassword']){throw new db[(_0xe3d0('0x8b'))]['ValidationError'](_0xe3d0('0x90'));}}else if(_0x2c0923[_0xe3d0('0x7a')][_0xe3d0('0x1f')]==='admin'){if(!_0x2c0923[_0xe3d0('0x59')][_0xe3d0('0x8a')]){throw new db[(_0xe3d0('0x8b'))][(_0xe3d0('0x8c'))](_0xe3d0('0x91'));}}else if(_0x2c0923[_0xe3d0('0x7a')][_0xe3d0('0x1f')]===_0xe3d0('0x7a')){if(!_0x2c0923[_0xe3d0('0x59')][_0xe3d0('0x8a')]){throw new db['Sequelize'][(_0xe3d0('0x8c'))](_0xe3d0('0x91'));}if(_0x1a3d89[_0xe3d0('0x1f')]!==_0xe3d0('0x20')){throw new db[(_0xe3d0('0x8b'))]['ValidationError']('Unauthorized');}}else{throw new db[(_0xe3d0('0x8b'))][(_0xe3d0('0x8c'))](_0xe3d0('0x92'));}return _0x1a3d89;})[_0xe3d0('0x1e')](handleEntityNotFound(_0x20f2ad,null))['then'](function(_0x167ebc){return db[_0xe3d0('0x5f')]['findOne']({'attributes':['id',_0xe3d0('0x60'),_0xe3d0('0x93'),_0xe3d0('0x94')]})['then'](function(_0x35d59f){if(_0x35d59f[_0xe3d0('0x60')])authService[_0xe3d0('0x61')](_0x2c0923[_0xe3d0('0x59')]['newPassword']);if(!_0x35d59f['enforcePasswordHistory']||!_0x167ebc['previousPasswords'])return _0x167ebc;authService['validatePasswordHistory'](_0x2c0923['body'][_0xe3d0('0x8a')],_0x167ebc[_0xe3d0('0x3b')],_0x35d59f['passwordHistoryLimit']);return _0x167ebc;})['then'](saveUpdates({'password':_0x2c0923[_0xe3d0('0x59')][_0xe3d0('0x8a')],'passwordResetAt':_0x2c0923[_0xe3d0('0x7a')]['id']==_0x2c0923[_0xe3d0('0x54')]['id']?moment():null,'previousPasswords':authService[_0xe3d0('0x95')](_0x2c0923[_0xe3d0('0x59')][_0xe3d0('0x8a')],_0x167ebc[_0xe3d0('0x3b')])},null));})['then'](respondWithResult(_0x20f2ad,null))[_0xe3d0('0x52')](handleError(_0x20f2ad,null));};exports['addQueues']=function(_0x5582b1,_0x4b214e){var _0x29ee5d=_0x5582b1[_0xe3d0('0x59')][_0xe3d0('0x96')];return db['User'][_0xe3d0('0x2d')]({'where':{'id':_0x5582b1[_0xe3d0('0x54')]['id']},'attributes':['id',_0xe3d0('0x2e'),_0xe3d0('0x1f'),_0xe3d0('0x97'),'loginInPause',_0xe3d0('0x98'),'interface']})[_0xe3d0('0x1e')](handleEntityNotFound(_0x4b214e,null))[_0xe3d0('0x1e')](function(_0x53f704){if(_0x53f704){if(!utils[_0xe3d0('0x99')](_0x29ee5d)){throw new db[(_0xe3d0('0x8b'))]['ValidationError'](_0xe3d0('0x9a'));}return _0x53f704['add'+_[_0xe3d0('0x9b')](_0x29ee5d[_0xe3d0('0x9c')]())+_0xe3d0('0x9d')](_0x5582b1['body'][_0xe3d0('0x5d')],{'penalty':_0x5582b1[_0xe3d0('0x59')]['penalty']||0x0})['spread'](function(_0x4d6499){for(var _0x2a0e06=0x0;_0x2a0e06<_0x5582b1[_0xe3d0('0x59')][_0xe3d0('0x5d')][_0xe3d0('0x4b')];_0x2a0e06+=0x1){var _0x2136e9={'UserId':Number(_0x5582b1[_0xe3d0('0x54')]['id'])};_0x2136e9[_[_0xe3d0('0x9b')](_0x29ee5d[_0xe3d0('0x9c')]())+'QueueId']=Number(_0x5582b1[_0xe3d0('0x59')][_0xe3d0('0x5d')][_0x2a0e06]);socket['emit'](_0xe3d0('0x7a')+_[_0xe3d0('0x9b')](_0x29ee5d[_0xe3d0('0x9c')]())+_0xe3d0('0x9e'),_0x2136e9);}return _0x4d6499;})['then'](function(){if(_0x29ee5d===_0xe3d0('0x9f')){return db[_0xe3d0('0xa0')][_0xe3d0('0x48')]({'where':{'id':_0x5582b1['body']['ids']||[]},'raw':!![],'attributes':['id','name']});}})[_0xe3d0('0x1e')](function(_0x4b5b09){var _0xc265fd=_0x53f704[_0xe3d0('0x23')]({'plain':!![]});var _0x3ef58c=[];if(_0x29ee5d==='voice'&&_0xc265fd[_0xe3d0('0x1f')]===_0xe3d0('0x20')&&_0xc265fd[_0xe3d0('0x97')]){for(let _0x56d168=0x0;_0x56d168<_0x4b5b09['length'];_0x56d168+=0x1){_0x3ef58c[_0xe3d0('0x47')]({'membername':_0xc265fd[_0xe3d0('0x2e')],'UserId':_0xc265fd['id'],'queue_name':_0x4b5b09[_0x56d168][_0xe3d0('0x2e')],'VoiceQueueId':_0x4b5b09[_0x56d168]['id'],'interface':_[_0xe3d0('0x63')](_0xc265fd[_0xe3d0('0xa1')])?util[_0xe3d0('0xa2')]('SIP/%s',_0xc265fd[_0xe3d0('0x2e')]):_0xc265fd['interface'],'paused':_0xc265fd[_0xe3d0('0x98')]||![],'penalty':_0x5582b1[_0xe3d0('0x59')][_0xe3d0('0xa3')]||0x0});}return Promise[_0xe3d0('0x51')](_0x3ef58c[_0xe3d0('0x2a')](function(_0x2b2ab8){return db[_0xe3d0('0xa4')][_0xe3d0('0xa5')](_0x2b2ab8);}));}return _0x53f704;});}})[_0xe3d0('0x1e')](respondWithStatusCode(_0x4b214e,null))[_0xe3d0('0x52')](handleError(_0x4b214e,null));};exports[_0xe3d0('0xa6')]=function(_0x54ba03,_0x16a566){var _0x278141,_0x3032bc;return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x54ba03['params']['id']},'attributes':['id','name',_0xe3d0('0x1f')]})[_0xe3d0('0x1e')](handleEntityNotFound(_0x16a566,null))['then'](function(_0x52c9c2){if(_0x52c9c2){_0x278141=_0x52c9c2;if(!_0x54ba03[_0xe3d0('0x42')]['channel']||!utils[_0xe3d0('0x99')](_0x54ba03[_0xe3d0('0x42')][_0xe3d0('0x96')])){throw new db[(_0xe3d0('0x8b'))][(_0xe3d0('0x8c'))]('Unknown\x20channel');}return _0x52c9c2[_0xe3d0('0xa7')+_[_0xe3d0('0x9b')](_0x54ba03['query']['channel']['toLowerCase']())+_0xe3d0('0x9d')](_0x54ba03[_0xe3d0('0x42')]['ids']);}})[_0xe3d0('0x1e')](function(_0x1ae12b){if(_[_0xe3d0('0xa8')](_0x54ba03[_0xe3d0('0x42')][_0xe3d0('0x5d')])){for(var _0x4f726c=0x0;_0x4f726c<_0x54ba03[_0xe3d0('0x42')][_0xe3d0('0x5d')][_0xe3d0('0x4b')];_0x4f726c+=0x1){_0x3032bc={'UserId':Number(_0x54ba03['params']['id'])};_0x3032bc[_[_0xe3d0('0x9b')](_0x54ba03[_0xe3d0('0x42')]['channel'][_0xe3d0('0x9c')]())+_0xe3d0('0xa9')]=Number(_0x54ba03[_0xe3d0('0x42')][_0xe3d0('0x5d')][_0x4f726c]);socket[_0xe3d0('0xaa')](_0xe3d0('0x7a')+_[_0xe3d0('0x9b')](_0x54ba03[_0xe3d0('0x42')][_0xe3d0('0x96')]['toLowerCase']())+_0xe3d0('0xab'),_0x3032bc);}}else{_0x3032bc={'UserId':Number(_0x54ba03[_0xe3d0('0x54')]['id'])};_0x3032bc[_[_0xe3d0('0x9b')](_0x54ba03['query'][_0xe3d0('0x96')][_0xe3d0('0x9c')]())+_0xe3d0('0xa9')]=Number(_0x54ba03[_0xe3d0('0x42')][_0xe3d0('0x5d')]);socket[_0xe3d0('0xaa')]('user'+_[_0xe3d0('0x9b')](_0x54ba03[_0xe3d0('0x42')]['channel'][_0xe3d0('0x9c')]())+_0xe3d0('0xab'),_0x3032bc);}return _0x1ae12b;})[_0xe3d0('0x1e')](function(){if(_0x54ba03['query'][_0xe3d0('0x96')]==='voice'){return db[_0xe3d0('0xa4')][_0xe3d0('0x22')]({'where':{'UserId':_0x54ba03[_0xe3d0('0x54')]['id'],'VoiceQueueId':_0x54ba03[_0xe3d0('0x42')]['ids']},'individualHooks':!![]})[_0xe3d0('0x1e')](function(){return _0x278141;});}return _0x278141;})[_0xe3d0('0x1e')](respondWithStatusCode(_0x16a566,null))[_0xe3d0('0x52')](handleError(_0x16a566,null));};exports[_0xe3d0('0xac')]=function(_0x37e9c8,_0x5bbbad){_0x37e9c8[_0xe3d0('0x59')][_0xe3d0('0xad')]=_0x37e9c8[_0xe3d0('0xae')]['filename'];return db['User'][_0xe3d0('0x2d')]({'where':{'id':_0x37e9c8['params']['id']}})['then'](handleEntityNotFound(_0x5bbbad,null))[_0xe3d0('0x1e')](saveUpdates(_0x37e9c8[_0xe3d0('0x59')],null))['then'](respondWithResult(_0x5bbbad,null))[_0xe3d0('0x52')](handleError(_0x5bbbad,null));};exports[_0xe3d0('0xaf')]=function(_0x587af6,_0x1a467e){var _0x1f3deb=path['join'](config['root'],_0xe3d0('0xb0'));return db['User']['find']({'where':{'id':_0x587af6[_0xe3d0('0x54')]['id']},'attributes':['id','userpic'],'raw':!![]})['then'](handleEntityNotFound(_0x1a467e,null))['then'](function(_0x2fcd55){if(_0x2fcd55){if(_[_0xe3d0('0x63')](_0x2fcd55[_0xe3d0('0xad')])){return _0x1a467e[_0xe3d0('0xb1')](_0x1f3deb);}else{if(!fs[_0xe3d0('0xb2')](path[_0xe3d0('0xb3')](config[_0xe3d0('0xb4')],_0xe3d0('0xb5'),_0x2fcd55['userpic']))){return _0x1a467e[_0xe3d0('0xb1')](_0x1f3deb);}return _0x1a467e[_0xe3d0('0xb1')](path[_0xe3d0('0xb3')](config[_0xe3d0('0xb4')],_0xe3d0('0xb5'),_0x2fcd55[_0xe3d0('0xad')]));}}})[_0xe3d0('0x52')](handleError(_0x1a467e,null));};exports['getOpenTabs']=function(_0x21cab3,_0x54870e){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x21cab3[_0xe3d0('0x54')]['id']},'attributes':['id']})[_0xe3d0('0x1e')](handleEntityNotFound(_0x54870e,null))[_0xe3d0('0x1e')](function(_0x1776a4){var _0x98a693=[];values=_0x1776a4['dataValues'];_0x98a693[_0xe3d0('0x47')](get_open_tabs('chat',_0x1776a4[_0xe3d0('0x4c')]));_0x98a693[_0xe3d0('0x47')](get_open_tabs(_0xe3d0('0x4d'),_0x1776a4[_0xe3d0('0x4c')]));_0x98a693[_0xe3d0('0x47')](get_open_tabs(_0xe3d0('0xb6'),_0x1776a4[_0xe3d0('0x4c')]));_0x98a693[_0xe3d0('0x47')](get_open_tabs(_0xe3d0('0x50'),_0x1776a4[_0xe3d0('0x4c')]));_0x98a693[_0xe3d0('0x47')](get_open_tabs(_0xe3d0('0x4e'),_0x1776a4[_0xe3d0('0x4c')]));_0x98a693['push'](get_open_tabs('mail',_0x1776a4['dataValues']));return Promise['all'](_0x98a693);})[_0xe3d0('0x1e')](function(_0x53e0b1){if(_0x53e0b1){var _0xe81fb4=_[_0xe3d0('0x2a')](values[_0xe3d0('0xb7')],function(_0xfd5bc3){return{'channel':_0xe3d0('0xb8'),'id':_0xfd5bc3['id'],'createdAt':_0xfd5bc3[_0xe3d0('0xb9')]};});var _0xa5b41=_[_0xe3d0('0x2a')](values[_0xe3d0('0xba')],function(_0x304fd6){return{'channel':_0xe3d0('0xbb'),'id':_0x304fd6['id'],'createdAt':_0x304fd6[_0xe3d0('0xb9')]};});var _0x38b0b2=_[_0xe3d0('0x2a')](values[_0xe3d0('0xbc')],function(_0x57e704){return{'channel':_0xe3d0('0xbd'),'id':_0x57e704['id'],'createdAt':_0x57e704[_0xe3d0('0xb9')]};});var _0x272e42=_['map'](values[_0xe3d0('0xbe')],function(_0x55fb19){return{'channel':_0xe3d0('0xbf'),'id':_0x55fb19['id'],'createdAt':_0x55fb19[_0xe3d0('0xb9')]};});var _0x2d741a=_['map'](values[_0xe3d0('0xc0')],function(_0xdee284){return{'channel':'SMS','id':_0xdee284['id'],'createdAt':_0xdee284[_0xe3d0('0xb9')]};});var _0x2eee18=_[_0xe3d0('0x2a')](values['WhatsappOpenTabs'],function(_0x5ee668){return{'channel':_0xe3d0('0xc1'),'id':_0x5ee668['id'],'createdAt':_0x5ee668[_0xe3d0('0xb9')]};});var _0x30f693=_[_0xe3d0('0xc2')](_0xe81fb4,_0xa5b41,_0x38b0b2,_0x272e42,_0x2d741a,_0x2eee18);var _0x13526e={'count':_0x30f693[_0xe3d0('0x4b')],'rows':_0x30f693};return _0x13526e;}else return null;})[_0xe3d0('0x1e')](respondWithResult(_0x54870e,null))[_0xe3d0('0x52')](handleError(_0x54870e,null));};exports['getContacts']=function(_0x4c55fa,_0x10e97a){var _0x2227f2={};return db['User']['findOne']({'where':{'id':_0x4c55fa['params']['id']}})[_0xe3d0('0x1e')](function(_0xa93653){if(!_0xa93653){throw new APINotFoundError(util[_0xe3d0('0xa2')]('User\x20with\x20id\x20%s\x20not\x20found',_0x4c55fa[_0xe3d0('0x54')]['id']));}return contacts[_0xe3d0('0x5a')]();})[_0xe3d0('0x1e')](function(_0x5946c2){_0x4c55fa['query']['User']=_0x4c55fa[_0xe3d0('0x54')]['id'];_0x2227f2=qs['getOptions'](_0x5946c2,_0x4c55fa);if(_0x4c55fa['query'][_0xe3d0('0xc3')](_0xe3d0('0x43'))){_0x2227f2[_0xe3d0('0x44')]=[{'model':db[_0xe3d0('0xc4')],'as':_0xe3d0('0xc5'),'required':![]},{'model':db[_0xe3d0('0xc6')],'as':_0xe3d0('0xc7'),'attributes':['id',_0xe3d0('0x2e'),_0xe3d0('0xc8')],'where':_0x4c55fa[_0xe3d0('0x42')][_0xe3d0('0xc9')]?{'id':_0x4c55fa[_0xe3d0('0x42')][_0xe3d0('0xc9')]}:undefined,'required':_0x4c55fa['query'][_0xe3d0('0xc9')]?!![]:![]}];}return contacts[_0xe3d0('0x48')](_0x4c55fa[_0xe3d0('0x42')],_0x4c55fa[_0xe3d0('0x7a')],_0x2227f2,_0x5946c2);})[_0xe3d0('0x1e')](respondWithFilteredResult(_0x10e97a,_0x2227f2))['catch'](APIHandleError(_0x10e97a));};exports[_0xe3d0('0xca')]=function(_0x5b1ade,_0x354cfb){var _0x3b465;var _0x55cf51={};var _0x47190a;return db['User'][_0xe3d0('0xcb')]({'where':{'id':_0x5b1ade[_0xe3d0('0x54')]['id']},'attributes':['id',_0xe3d0('0x2e'),_0xe3d0('0x1f')]})['then'](handleEntityNotFound(_0x354cfb,null))['then'](function(_0x388857){if(!utils[_0xe3d0('0x99')](_0x5b1ade[_0xe3d0('0x42')][_0xe3d0('0x96')])){throw new db[(_0xe3d0('0x8b'))]['ValidationError'](_0xe3d0('0x9a'));}_0x3b465=_0x388857;var _0x2b7b71={};_0x2b7b71[_0xe3d0('0xcc')]=_['keys'](db[_[_0xe3d0('0x9b')](_0x5b1ade['query']['channel'])+_0xe3d0('0xcd')]['rawAttributes']);_0x2b7b71[_0xe3d0('0x42')]=_[_0xe3d0('0xce')](_0x5b1ade[_0xe3d0('0x42')]);_0x2b7b71[_0xe3d0('0xcf')]=_[_0xe3d0('0xd0')](_0x2b7b71['model'],_0x2b7b71[_0xe3d0('0x42')]);_0x55cf51[_0xe3d0('0x46')]=_['intersection'](_0x2b7b71[_0xe3d0('0xcc')],qs[_0xe3d0('0xd1')](_0x5b1ade[_0xe3d0('0x42')][_0xe3d0('0xd1')]));_0x55cf51[_0xe3d0('0x46')]=_0x55cf51['attributes'][_0xe3d0('0x4b')]?_0x55cf51[_0xe3d0('0x46')]:_0x2b7b71[_0xe3d0('0xcc')];_0x55cf51[_0xe3d0('0xd2')]=qs[_0xe3d0('0xd3')](_0x5b1ade[_0xe3d0('0x42')][_0xe3d0('0xd3')]);_0x55cf51[_0xe3d0('0x41')]=qs[_0xe3d0('0xcf')](_[_0xe3d0('0xd4')](_0x5b1ade['query'],_0x2b7b71[_0xe3d0('0xcf')]));if(_0x5b1ade[_0xe3d0('0x42')][_0xe3d0('0x28')]){_0x55cf51['where']=_[_0xe3d0('0x56')](_0x55cf51[_0xe3d0('0x41')],{'$or':_[_0xe3d0('0x2a')](_0x55cf51['attributes'],function(_0x27825f){var _0xfa7548={};_0xfa7548[_0x27825f]={'$like':'%'+_0x5b1ade[_0xe3d0('0x42')][_0xe3d0('0x28')]+'%'};return _0xfa7548;})});}_0x55cf51=_['merge']({},_0x55cf51,_0x5b1ade['options']);switch(_0x3b465['role']){case'admin':return db[_[_0xe3d0('0x9b')](_0x5b1ade[_0xe3d0('0x42')]['channel'])+'Queue'][_0xe3d0('0x48')](_0x55cf51);case _0xe3d0('0x7a'):case _0xe3d0('0x20'):return _0x3b465[_0xe3d0('0x23')+_[_0xe3d0('0x9b')](_0x5b1ade[_0xe3d0('0x42')][_0xe3d0('0x96')])+_0xe3d0('0x9d')](_0x55cf51);default:throw new db['Sequelize']['ValidationError'](_0xe3d0('0xd5'));}})[_0xe3d0('0x1e')](function(_0x38862a){_0x47190a=_0x38862a[_0xe3d0('0x4b')];if(!_0x5b1ade[_0xe3d0('0x42')][_0xe3d0('0xc3')](_0xe3d0('0xd6'))){_0x55cf51['limit']=qs[_0xe3d0('0x19')](_0x5b1ade[_0xe3d0('0x42')][_0xe3d0('0x19')]);_0x55cf51['offset']=qs[_0xe3d0('0x1c')](_0x5b1ade[_0xe3d0('0x42')][_0xe3d0('0x1c')]);}switch(_0x3b465[_0xe3d0('0x1f')]){case'admin':return db[_['capitalize'](_0x5b1ade[_0xe3d0('0x42')][_0xe3d0('0x96')])+_0xe3d0('0xcd')][_0xe3d0('0x48')](_0x55cf51);case _0xe3d0('0x7a'):case _0xe3d0('0x20'):return _0x3b465[_0xe3d0('0x23')+_['capitalize'](_0x5b1ade['query'][_0xe3d0('0x96')])+_0xe3d0('0x9d')](_0x55cf51);}})[_0xe3d0('0x1e')](function(_0x5af116){return{'count':_0x47190a,'rows':_0x5af116};})['then'](respondWithResult(_0x354cfb,null))[_0xe3d0('0x52')](handleError(_0x354cfb,null));};exports[_0xe3d0('0xd7')]=function(_0x4b383f,_0x397cdc){var _0x2ecd86={};var _0x1d4f5a={};var _0x185318;var _0x4883c5;return db[_0xe3d0('0x34')]['findOne']({'where':{'id':_0x4b383f[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x397cdc,null))[_0xe3d0('0x1e')](function(_0x18f64a){if(_0x18f64a){_0x185318=_0x18f64a;_0x1d4f5a[_0xe3d0('0xcc')]=_[_0xe3d0('0xce')](db[_0xe3d0('0xa4')][_0xe3d0('0x35')]);_0x1d4f5a[_0xe3d0('0x42')]=_['keys'](_0x4b383f[_0xe3d0('0x42')]);_0x1d4f5a[_0xe3d0('0xcf')]=_[_0xe3d0('0xd0')](_0x1d4f5a[_0xe3d0('0xcc')],_0x1d4f5a['query']);_0x2ecd86['attributes']=_[_0xe3d0('0xd0')](_0x1d4f5a[_0xe3d0('0xcc')],qs[_0xe3d0('0xd1')](_0x4b383f[_0xe3d0('0x42')][_0xe3d0('0xd1')]));_0x2ecd86[_0xe3d0('0x46')]=_0x2ecd86[_0xe3d0('0x46')][_0xe3d0('0x4b')]?_0x2ecd86[_0xe3d0('0x46')]:_0x1d4f5a[_0xe3d0('0xcc')];_0x2ecd86[_0xe3d0('0xd2')]=qs['sort'](_0x4b383f[_0xe3d0('0x42')][_0xe3d0('0xd3')]);_0x2ecd86[_0xe3d0('0x41')]=qs[_0xe3d0('0xcf')](_[_0xe3d0('0xd4')](_0x4b383f[_0xe3d0('0x42')],_0x1d4f5a[_0xe3d0('0xcf')]));if(_0x4b383f['query'][_0xe3d0('0x28')]){_0x2ecd86[_0xe3d0('0x41')]=_[_0xe3d0('0x56')](_0x2ecd86['where'],{'$or':_[_0xe3d0('0x2a')](_0x2ecd86['attributes'],function(_0x2a74d9){var _0x15827={};_0x15827[_0x2a74d9]={'$like':'%'+_0x4b383f[_0xe3d0('0x42')]['filter']+'%'};return _0x15827;})});}_0x2ecd86=_[_0xe3d0('0x56')]({},_0x2ecd86,_0x4b383f[_0xe3d0('0xd8')]);return _0x185318[_0xe3d0('0xd7')](_0x2ecd86);}})[_0xe3d0('0x1e')](function(_0x443cc7){if(_0x443cc7){_0x4883c5=_0x443cc7[_0xe3d0('0x4b')];if(!_0x4b383f[_0xe3d0('0x42')][_0xe3d0('0xc3')]('nolimit')){_0x2ecd86[_0xe3d0('0x19')]=qs[_0xe3d0('0x19')](_0x4b383f['query'][_0xe3d0('0x19')]);_0x2ecd86[_0xe3d0('0x1c')]=qs[_0xe3d0('0x1c')](_0x4b383f[_0xe3d0('0x42')][_0xe3d0('0x1c')]);}return _0x185318['getVoiceQueuesRt'](_0x2ecd86);}})[_0xe3d0('0x1e')](function(_0x3d6b3c){if(_0x3d6b3c){return _0x3d6b3c?{'count':_0x4883c5,'rows':_0x3d6b3c}:null;}})['then'](respondWithResult(_0x397cdc,null))[_0xe3d0('0x52')](handleError(_0x397cdc,null));};exports[_0xe3d0('0xd9')]=function(_0xab14dd,_0x1d4ba9){var _0x474a6c={};var _0x20f320={};var _0x40254a;var _0x15b2a1;return db[_0xe3d0('0x34')]['findOne']({'where':{'id':_0xab14dd[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x1d4ba9,null))[_0xe3d0('0x1e')](function(_0x4e4270){if(_0x4e4270){_0x40254a=_0x4e4270;_0x20f320[_0xe3d0('0xcc')]=_['keys'](db['ChatGroup']['rawAttributes']);_0x20f320['query']=_[_0xe3d0('0xce')](_0xab14dd['query']);_0x20f320[_0xe3d0('0xcf')]=_[_0xe3d0('0xd0')](_0x20f320['model'],_0x20f320[_0xe3d0('0x42')]);_0x474a6c['attributes']=_[_0xe3d0('0xd0')](_0x20f320[_0xe3d0('0xcc')],qs['fields'](_0xab14dd[_0xe3d0('0x42')][_0xe3d0('0xd1')]));_0x474a6c['attributes']=_0x474a6c[_0xe3d0('0x46')][_0xe3d0('0x4b')]?_0x474a6c[_0xe3d0('0x46')]:_0x20f320[_0xe3d0('0xcc')];_0x474a6c[_0xe3d0('0xd2')]=qs[_0xe3d0('0xd3')](_0xab14dd[_0xe3d0('0x42')]['sort']);_0x474a6c[_0xe3d0('0x41')]=qs[_0xe3d0('0xcf')](_[_0xe3d0('0xd4')](_0xab14dd['query'],_0x20f320[_0xe3d0('0xcf')]));if(_0xab14dd['query'][_0xe3d0('0x28')]){_0x474a6c[_0xe3d0('0x41')]=_[_0xe3d0('0x56')](_0x474a6c[_0xe3d0('0x41')],{'$or':_[_0xe3d0('0x2a')](_0x474a6c[_0xe3d0('0x46')],function(_0x3774b1){var _0x54e86e={};_0x54e86e[_0x3774b1]={'$like':'%'+_0xab14dd[_0xe3d0('0x42')][_0xe3d0('0x28')]+'%'};return _0x54e86e;})});}_0x474a6c=_[_0xe3d0('0x56')]({},_0x474a6c,_0xab14dd['options']);return _0x40254a[_0xe3d0('0xd9')](_0x474a6c);}})['then'](function(_0xbba6b8){if(_0xbba6b8){_0x15b2a1=_0xbba6b8[_0xe3d0('0x4b')];if(!_0xab14dd['query']['hasOwnProperty']('nolimit')){_0x474a6c[_0xe3d0('0x19')]=qs['limit'](_0xab14dd[_0xe3d0('0x42')][_0xe3d0('0x19')]);_0x474a6c[_0xe3d0('0x1c')]=qs[_0xe3d0('0x1c')](_0xab14dd['query'][_0xe3d0('0x1c')]);}return _0x40254a[_0xe3d0('0xd9')](_0x474a6c);}})[_0xe3d0('0x1e')](function(_0x3cd8a9){if(_0x3cd8a9){return _0x3cd8a9?{'count':_0x15b2a1,'rows':_0x3cd8a9}:null;}})[_0xe3d0('0x1e')](respondWithResult(_0x1d4ba9,null))[_0xe3d0('0x52')](handleError(_0x1d4ba9,null));};exports[_0xe3d0('0xda')]=function(_0x4ef6b2,_0xda19e4){var _0x49b351={'raw':!![],'where':{}};var _0x18b652={};var _0x37f527={'count':0x0,'rows':[]};return db[_0xe3d0('0x34')][_0xe3d0('0xcb')]({'where':{'id':_0x4ef6b2[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0xda19e4,null))[_0xe3d0('0x1e')](function(_0x5b30ec){if(_0x5b30ec){_0x18b652['model']=_['keys'](db[_0xe3d0('0xdb')][_0xe3d0('0x35')]);_0x18b652[_0xe3d0('0x42')]=_[_0xe3d0('0xce')](_0x4ef6b2['query']);_0x18b652[_0xe3d0('0xcf')]=_[_0xe3d0('0xd0')](_0x18b652['model'],_0x18b652[_0xe3d0('0x42')]);_0x49b351[_0xe3d0('0x46')]=_[_0xe3d0('0xd0')](_0x18b652[_0xe3d0('0xcc')],qs[_0xe3d0('0xd1')](_0x4ef6b2[_0xe3d0('0x42')][_0xe3d0('0xd1')]));_0x49b351['attributes']=_0x49b351[_0xe3d0('0x46')][_0xe3d0('0x4b')]?_0x49b351[_0xe3d0('0x46')]:_0x18b652[_0xe3d0('0xcc')];if(!_0x4ef6b2[_0xe3d0('0x42')][_0xe3d0('0xc3')]('nolimit')){_0x49b351['limit']=qs['limit'](_0x4ef6b2['query']['limit']);_0x49b351[_0xe3d0('0x1c')]=qs[_0xe3d0('0x1c')](_0x4ef6b2[_0xe3d0('0x42')]['offset']);}_0x49b351[_0xe3d0('0xd2')]=qs[_0xe3d0('0xd3')](_0x4ef6b2[_0xe3d0('0x42')][_0xe3d0('0xd3')]);_0x49b351[_0xe3d0('0x41')]=qs['filters'](_[_0xe3d0('0xd4')](_0x4ef6b2[_0xe3d0('0x42')],_0x18b652[_0xe3d0('0xcf')]));_0x49b351[_0xe3d0('0x41')][_0xe3d0('0xdc')]=_0x5b30ec['id'];if(_0x4ef6b2[_0xe3d0('0x42')]['filter']){_0x49b351['where']=_['merge'](_0x49b351[_0xe3d0('0x41')],{'$or':_[_0xe3d0('0x2a')](_0x49b351[_0xe3d0('0x46')],function(_0x50293c){var _0x16d3a5={};_0x16d3a5[_0x50293c]={'$like':'%'+_0x4ef6b2[_0xe3d0('0x42')][_0xe3d0('0x28')]+'%'};return _0x16d3a5;})});}_0x49b351=_[_0xe3d0('0x56')]({},_0x49b351,_0x4ef6b2[_0xe3d0('0xd8')]);return db[_0xe3d0('0xdb')][_0xe3d0('0x1b')]({'where':_0x49b351['where']})[_0xe3d0('0x1e')](function(_0x15675d){_0x37f527[_0xe3d0('0x1b')]=_0x15675d;if(_0x4ef6b2[_0xe3d0('0x42')][_0xe3d0('0x43')]){_0x49b351['include']=[{'all':!![]}];}return db[_0xe3d0('0xdb')]['findAll'](_0x49b351);})[_0xe3d0('0x1e')](function(_0x43f51c){_0x37f527[_0xe3d0('0x49')]=_0x43f51c;return _0x37f527;});}})[_0xe3d0('0x1e')](respondWithFilteredResult(_0xda19e4,_0x49b351))[_0xe3d0('0x52')](handleError(_0xda19e4,null));};exports[_0xe3d0('0xdd')]=function(_0x404b94,_0x1e5156){var _0x5f4d3e={'raw':!![],'where':{}};var _0x3c678c={};var _0x40fd74={'count':0x0,'rows':[]};return db['User'][_0xe3d0('0xcb')]({'where':{'id':_0x404b94[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x1e5156,null))[_0xe3d0('0x1e')](function(_0x20067f){if(_0x20067f){_0x3c678c['model']=_['keys'](db[_0xe3d0('0xde')]['rawAttributes']);_0x3c678c[_0xe3d0('0x42')]=_[_0xe3d0('0xce')](_0x404b94['query']);_0x3c678c['filters']=_['intersection'](_0x3c678c[_0xe3d0('0xcc')],_0x3c678c[_0xe3d0('0x42')]);_0x5f4d3e[_0xe3d0('0x46')]=_[_0xe3d0('0xd0')](_0x3c678c['model'],qs[_0xe3d0('0xd1')](_0x404b94['query'][_0xe3d0('0xd1')]));_0x5f4d3e['attributes']=_0x5f4d3e[_0xe3d0('0x46')][_0xe3d0('0x4b')]?_0x5f4d3e[_0xe3d0('0x46')]:_0x3c678c[_0xe3d0('0xcc')];if(!_0x404b94[_0xe3d0('0x42')][_0xe3d0('0xc3')](_0xe3d0('0xd6'))){_0x5f4d3e[_0xe3d0('0x19')]=qs[_0xe3d0('0x19')](_0x404b94['query'][_0xe3d0('0x19')]);_0x5f4d3e['offset']=qs['offset'](_0x404b94['query'][_0xe3d0('0x1c')]);}_0x5f4d3e['order']=qs[_0xe3d0('0xd3')](_0x404b94[_0xe3d0('0x42')][_0xe3d0('0xd3')]);_0x5f4d3e['where']=qs[_0xe3d0('0xcf')](_[_0xe3d0('0xd4')](_0x404b94['query'],_0x3c678c['filters']));_0x5f4d3e[_0xe3d0('0x41')][_0xe3d0('0xdc')]=_0x20067f['id'];if(_0x404b94[_0xe3d0('0x42')][_0xe3d0('0x28')]){_0x5f4d3e['where']=_[_0xe3d0('0x56')](_0x5f4d3e[_0xe3d0('0x41')],{'$or':_['map'](_0x5f4d3e['attributes'],function(_0x3b1433){var _0x341445={};_0x341445[_0x3b1433]={'$like':'%'+_0x404b94[_0xe3d0('0x42')][_0xe3d0('0x28')]+'%'};return _0x341445;})});}_0x5f4d3e=_[_0xe3d0('0x56')]({},_0x5f4d3e,_0x404b94[_0xe3d0('0xd8')]);return db[_0xe3d0('0xde')][_0xe3d0('0x1b')]({'where':_0x5f4d3e[_0xe3d0('0x41')]})[_0xe3d0('0x1e')](function(_0x4c4916){_0x40fd74[_0xe3d0('0x1b')]=_0x4c4916;if(_0x404b94[_0xe3d0('0x42')][_0xe3d0('0x43')]){_0x5f4d3e[_0xe3d0('0x44')]=[{'all':!![]}];}return db['ScreenRecording']['findAll'](_0x5f4d3e);})[_0xe3d0('0x1e')](function(_0x7d8f4e){_0x40fd74[_0xe3d0('0x49')]=_0x7d8f4e;return _0x40fd74;});}})[_0xe3d0('0x1e')](respondWithFilteredResult(_0x1e5156,_0x5f4d3e))[_0xe3d0('0x52')](handleError(_0x1e5156,null));};exports[_0xe3d0('0xdf')]=function(_0x3ebb22,_0x4409bf){var _0xe12954={};var _0x715aff={};var _0x3e9c18;var _0x30b83e;return db[_0xe3d0('0x34')][_0xe3d0('0xcb')]({'where':{'id':_0x3ebb22[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x4409bf,null))[_0xe3d0('0x1e')](function(_0x29045e){if(_0x29045e){_0x3e9c18=_0x29045e;_0x715aff[_0xe3d0('0xcc')]=_[_0xe3d0('0xce')](db[_0xe3d0('0xe0')][_0xe3d0('0x35')]);_0x715aff[_0xe3d0('0x42')]=_[_0xe3d0('0xce')](_0x3ebb22[_0xe3d0('0x42')]);_0x715aff[_0xe3d0('0xcf')]=_['intersection'](_0x715aff[_0xe3d0('0xcc')],_0x715aff[_0xe3d0('0x42')]);_0xe12954['attributes']=_[_0xe3d0('0xd0')](_0x715aff[_0xe3d0('0xcc')],qs['fields'](_0x3ebb22['query']['fields']));_0xe12954[_0xe3d0('0x46')]=_0xe12954[_0xe3d0('0x46')][_0xe3d0('0x4b')]?_0xe12954[_0xe3d0('0x46')]:_0x715aff[_0xe3d0('0xcc')];_0xe12954[_0xe3d0('0xd2')]=qs[_0xe3d0('0xd3')](_0x3ebb22[_0xe3d0('0x42')][_0xe3d0('0xd3')]);_0xe12954[_0xe3d0('0x41')]=qs['filters'](_['pick'](_0x3ebb22[_0xe3d0('0x42')],_0x715aff['filters']));if(_0x3ebb22['query'][_0xe3d0('0x28')]){_0xe12954[_0xe3d0('0x41')]=_[_0xe3d0('0x56')](_0xe12954[_0xe3d0('0x41')],{'$or':_[_0xe3d0('0x2a')](_0xe12954[_0xe3d0('0x46')],function(_0x2e84cd){var _0x262269={};_0x262269[_0x2e84cd]={'$like':'%'+_0x3ebb22['query'][_0xe3d0('0x28')]+'%'};return _0x262269;})});}_0xe12954=_[_0xe3d0('0x56')]({},_0xe12954,_0x3ebb22['options']);return _0x3e9c18[_0xe3d0('0xdf')](_0xe12954);}})[_0xe3d0('0x1e')](function(_0x4e294f){if(_0x4e294f){_0x30b83e=_0x4e294f[_0xe3d0('0x4b')];if(!_0x3ebb22[_0xe3d0('0x42')][_0xe3d0('0xc3')](_0xe3d0('0xd6'))){_0xe12954['limit']=qs[_0xe3d0('0x19')](_0x3ebb22[_0xe3d0('0x42')][_0xe3d0('0x19')]);_0xe12954[_0xe3d0('0x1c')]=qs[_0xe3d0('0x1c')](_0x3ebb22['query']['offset']);}return _0x3e9c18[_0xe3d0('0xdf')](_0xe12954);}})['then'](function(_0x235c82){if(_0x235c82){return _0x235c82?{'count':_0x30b83e,'rows':_0x235c82}:null;}})[_0xe3d0('0x1e')](respondWithResult(_0x4409bf,null))['catch'](handleError(_0x4409bf,null));};exports[_0xe3d0('0xe1')]=function(_0x598130,_0x10e12d){var _0x2d62f6={};var _0x4d2125={};var _0xd62ddc;var _0x4b0b96;return db[_0xe3d0('0x34')]['findOne']({'where':{'id':_0x598130[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x10e12d,null))[_0xe3d0('0x1e')](function(_0x2c2e08){if(_0x2c2e08){_0xd62ddc=_0x2c2e08;_0x4d2125[_0xe3d0('0xcc')]=_[_0xe3d0('0xce')](db[_0xe3d0('0xe2')]['rawAttributes']);_0x4d2125[_0xe3d0('0x42')]=_['keys'](_0x598130[_0xe3d0('0x42')]);_0x4d2125['filters']=_['intersection'](_0x4d2125[_0xe3d0('0xcc')],_0x4d2125[_0xe3d0('0x42')]);_0x2d62f6[_0xe3d0('0x46')]=_[_0xe3d0('0xd0')](_0x4d2125[_0xe3d0('0xcc')],qs[_0xe3d0('0xd1')](_0x598130['query']['fields']));_0x2d62f6[_0xe3d0('0x46')]=_0x2d62f6[_0xe3d0('0x46')][_0xe3d0('0x4b')]?_0x2d62f6[_0xe3d0('0x46')]:_0x4d2125[_0xe3d0('0xcc')];_0x2d62f6['order']=qs['sort'](_0x598130[_0xe3d0('0x42')][_0xe3d0('0xd3')]);_0x2d62f6['where']=qs[_0xe3d0('0xcf')](_[_0xe3d0('0xd4')](_0x598130[_0xe3d0('0x42')],_0x4d2125[_0xe3d0('0xcf')]));if(_0x598130[_0xe3d0('0x42')][_0xe3d0('0x28')]){_0x2d62f6[_0xe3d0('0x41')]=_[_0xe3d0('0x56')](_0x2d62f6['where'],{'$or':_['map'](_0x2d62f6['attributes'],function(_0x557ace){var _0x585cbe={};_0x585cbe[_0x557ace]={'$like':'%'+_0x598130[_0xe3d0('0x42')][_0xe3d0('0x28')]+'%'};return _0x585cbe;})});}_0x2d62f6=_[_0xe3d0('0x56')]({},_0x2d62f6,_0x598130['options']);return _0xd62ddc[_0xe3d0('0xe1')](_0x2d62f6);}})[_0xe3d0('0x1e')](function(_0x25cdba){if(_0x25cdba){_0x4b0b96=_0x25cdba[_0xe3d0('0x4b')];if(!_0x598130['query'][_0xe3d0('0xc3')]('nolimit')){_0x2d62f6[_0xe3d0('0x19')]=qs[_0xe3d0('0x19')](_0x598130[_0xe3d0('0x42')][_0xe3d0('0x19')]);_0x2d62f6[_0xe3d0('0x1c')]=qs['offset'](_0x598130[_0xe3d0('0x42')][_0xe3d0('0x1c')]);}return _0xd62ddc[_0xe3d0('0xe1')](_0x2d62f6);}})[_0xe3d0('0x1e')](function(_0x441931){if(_0x441931){return _0x441931?{'count':_0x4b0b96,'rows':_0x441931}:null;}})[_0xe3d0('0x1e')](respondWithResult(_0x10e12d,null))[_0xe3d0('0x52')](handleError(_0x10e12d,null));};exports[_0xe3d0('0xe3')]=function(_0x1b915e,_0x59ad1f){var _0x35bcc9={'raw':!![],'where':{}};var _0x24173e={};var _0xca3cc4={'count':0x0,'rows':[]};return db[_0xe3d0('0x34')][_0xe3d0('0xcb')]({'where':{'id':_0x1b915e[_0xe3d0('0x54')]['id']}})['then'](handleEntityNotFound(_0x59ad1f,null))['then'](function(_0x4f86de){if(_0x4f86de){_0x24173e[_0xe3d0('0xcc')]=_['keys'](db[_0xe3d0('0xe4')][_0xe3d0('0x35')]);_0x24173e[_0xe3d0('0x42')]=_['keys'](_0x1b915e[_0xe3d0('0x42')]);_0x24173e[_0xe3d0('0xcf')]=_[_0xe3d0('0xd0')](_0x24173e['model'],_0x24173e[_0xe3d0('0x42')]);_0x35bcc9[_0xe3d0('0x46')]=_[_0xe3d0('0xd0')](_0x24173e[_0xe3d0('0xcc')],qs[_0xe3d0('0xd1')](_0x1b915e['query'][_0xe3d0('0xd1')]));_0x35bcc9[_0xe3d0('0x46')]=_0x35bcc9[_0xe3d0('0x46')][_0xe3d0('0x4b')]?_0x35bcc9[_0xe3d0('0x46')]:_0x24173e[_0xe3d0('0xcc')];if(!_0x1b915e['query'][_0xe3d0('0xc3')](_0xe3d0('0xd6'))){_0x35bcc9['limit']=qs[_0xe3d0('0x19')](_0x1b915e[_0xe3d0('0x42')][_0xe3d0('0x19')]);_0x35bcc9[_0xe3d0('0x1c')]=qs[_0xe3d0('0x1c')](_0x1b915e[_0xe3d0('0x42')][_0xe3d0('0x1c')]);}_0x35bcc9[_0xe3d0('0xd2')]=qs[_0xe3d0('0xd3')](_0x1b915e[_0xe3d0('0x42')][_0xe3d0('0xd3')]);_0x35bcc9[_0xe3d0('0x41')]=qs['filters'](_['pick'](_0x1b915e[_0xe3d0('0x42')],_0x24173e[_0xe3d0('0xcf')]));_0x35bcc9[_0xe3d0('0x41')][_0xe3d0('0xdc')]=_0x4f86de['id'];if(_0x1b915e[_0xe3d0('0x42')][_0xe3d0('0x28')]){_0x35bcc9[_0xe3d0('0x41')]=_[_0xe3d0('0x56')](_0x35bcc9[_0xe3d0('0x41')],{'$or':_[_0xe3d0('0x2a')](_0x35bcc9[_0xe3d0('0x46')],function(_0x19851f){var _0x111b28={};_0x111b28[_0x19851f]={'$like':'%'+_0x1b915e[_0xe3d0('0x42')]['filter']+'%'};return _0x111b28;})});}_0x35bcc9=_[_0xe3d0('0x56')]({},_0x35bcc9,_0x1b915e[_0xe3d0('0xd8')]);return db[_0xe3d0('0xe4')][_0xe3d0('0x1b')]({'where':_0x35bcc9[_0xe3d0('0x41')]})['then'](function(_0x4445c7){_0xca3cc4[_0xe3d0('0x1b')]=_0x4445c7;if(_0x1b915e[_0xe3d0('0x42')][_0xe3d0('0x43')]){_0x35bcc9[_0xe3d0('0x44')]=[{'all':!![]}];}return db[_0xe3d0('0xe4')]['findAll'](_0x35bcc9);})[_0xe3d0('0x1e')](function(_0x9077c2){_0xca3cc4[_0xe3d0('0x49')]=_0x9077c2;return _0xca3cc4;});}})[_0xe3d0('0x1e')](respondWithFilteredResult(_0x59ad1f,_0x35bcc9))[_0xe3d0('0x52')](handleError(_0x59ad1f,null));};exports[_0xe3d0('0xe5')]=function(_0x5ea481,_0x38c1e5){var _0x1d2735={};var _0x134ab8={};var _0x5aefab;var _0x5e28f3;return db[_0xe3d0('0x34')][_0xe3d0('0xcb')]({'where':{'id':_0x5ea481[_0xe3d0('0x54')]['id']}})['then'](handleEntityNotFound(_0x38c1e5,null))[_0xe3d0('0x1e')](function(_0xe7133a){if(_0xe7133a){_0x5aefab=_0xe7133a;_0x134ab8[_0xe3d0('0xcc')]=_['keys'](db['SmsInteraction'][_0xe3d0('0x35')]);_0x134ab8['query']=_[_0xe3d0('0xce')](_0x5ea481[_0xe3d0('0x42')]);_0x134ab8[_0xe3d0('0xcf')]=_[_0xe3d0('0xd0')](_0x134ab8[_0xe3d0('0xcc')],_0x134ab8[_0xe3d0('0x42')]);_0x1d2735[_0xe3d0('0x46')]=_[_0xe3d0('0xd0')](_0x134ab8['model'],qs[_0xe3d0('0xd1')](_0x5ea481[_0xe3d0('0x42')][_0xe3d0('0xd1')]));_0x1d2735[_0xe3d0('0x46')]=_0x1d2735[_0xe3d0('0x46')][_0xe3d0('0x4b')]?_0x1d2735[_0xe3d0('0x46')]:_0x134ab8['model'];_0x1d2735[_0xe3d0('0xd2')]=qs[_0xe3d0('0xd3')](_0x5ea481[_0xe3d0('0x42')][_0xe3d0('0xd3')]);_0x1d2735[_0xe3d0('0x41')]=qs[_0xe3d0('0xcf')](_['pick'](_0x5ea481[_0xe3d0('0x42')],_0x134ab8[_0xe3d0('0xcf')]));if(_0x5ea481[_0xe3d0('0x42')][_0xe3d0('0x28')]){_0x1d2735[_0xe3d0('0x41')]=_[_0xe3d0('0x56')](_0x1d2735[_0xe3d0('0x41')],{'$or':_[_0xe3d0('0x2a')](_0x1d2735[_0xe3d0('0x46')],function(_0x1c4130){var _0x3a4aa0={};_0x3a4aa0[_0x1c4130]={'$like':'%'+_0x5ea481['query'][_0xe3d0('0x28')]+'%'};return _0x3a4aa0;})});}_0x1d2735=_[_0xe3d0('0x56')]({},_0x1d2735,_0x5ea481[_0xe3d0('0xd8')]);return _0x5aefab[_0xe3d0('0xe5')](_0x1d2735);}})[_0xe3d0('0x1e')](function(_0x6238c0){if(_0x6238c0){_0x5e28f3=_0x6238c0[_0xe3d0('0x4b')];if(!_0x5ea481['query'][_0xe3d0('0xc3')]('nolimit')){_0x1d2735[_0xe3d0('0x19')]=qs[_0xe3d0('0x19')](_0x5ea481[_0xe3d0('0x42')][_0xe3d0('0x19')]);_0x1d2735[_0xe3d0('0x1c')]=qs[_0xe3d0('0x1c')](_0x5ea481[_0xe3d0('0x42')][_0xe3d0('0x1c')]);}return _0x5aefab['getSmsInteractions'](_0x1d2735);}})['then'](function(_0x21d981){if(_0x21d981){return _0x21d981?{'count':_0x5e28f3,'rows':_0x21d981}:null;}})[_0xe3d0('0x1e')](respondWithResult(_0x38c1e5,null))[_0xe3d0('0x52')](handleError(_0x38c1e5,null));};exports[_0xe3d0('0xe6')]=function(_0x214c78,_0x162e3f){var _0x14e2c6={};var _0x172a79={};var _0x3efa80;var _0x5c5305;return db[_0xe3d0('0x34')][_0xe3d0('0xcb')]({'where':{'id':_0x214c78[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x162e3f,null))[_0xe3d0('0x1e')](function(_0x52ad5a){if(_0x52ad5a){_0x3efa80=_0x52ad5a;_0x172a79['model']=_[_0xe3d0('0xce')](db[_0xe3d0('0xe7')]['rawAttributes']);_0x172a79[_0xe3d0('0x42')]=_['keys'](_0x214c78[_0xe3d0('0x42')]);_0x172a79[_0xe3d0('0xcf')]=_[_0xe3d0('0xd0')](_0x172a79[_0xe3d0('0xcc')],_0x172a79[_0xe3d0('0x42')]);_0x14e2c6[_0xe3d0('0x46')]=_[_0xe3d0('0xd0')](_0x172a79[_0xe3d0('0xcc')],qs['fields'](_0x214c78[_0xe3d0('0x42')][_0xe3d0('0xd1')]));_0x14e2c6['attributes']=_0x14e2c6[_0xe3d0('0x46')][_0xe3d0('0x4b')]?_0x14e2c6[_0xe3d0('0x46')]:_0x172a79['model'];_0x14e2c6[_0xe3d0('0xd2')]=qs['sort'](_0x214c78['query'][_0xe3d0('0xd3')]);_0x14e2c6[_0xe3d0('0x41')]=qs[_0xe3d0('0xcf')](_[_0xe3d0('0xd4')](_0x214c78[_0xe3d0('0x42')],_0x172a79[_0xe3d0('0xcf')]));if(_0x214c78[_0xe3d0('0x42')][_0xe3d0('0x28')]){_0x14e2c6[_0xe3d0('0x41')]=_[_0xe3d0('0x56')](_0x14e2c6['where'],{'$or':_['map'](_0x14e2c6['attributes'],function(_0x486ed9){var _0x3c76fb={};_0x3c76fb[_0x486ed9]={'$like':'%'+_0x214c78[_0xe3d0('0x42')][_0xe3d0('0x28')]+'%'};return _0x3c76fb;})});}_0x14e2c6=_[_0xe3d0('0x56')]({},_0x14e2c6,_0x214c78['options']);return _0x3efa80[_0xe3d0('0xe6')](_0x14e2c6);}})[_0xe3d0('0x1e')](function(_0x23285f){if(_0x23285f){_0x5c5305=_0x23285f[_0xe3d0('0x4b')];if(!_0x214c78[_0xe3d0('0x42')]['hasOwnProperty'](_0xe3d0('0xd6'))){_0x14e2c6[_0xe3d0('0x19')]=qs[_0xe3d0('0x19')](_0x214c78[_0xe3d0('0x42')][_0xe3d0('0x19')]);_0x14e2c6['offset']=qs[_0xe3d0('0x1c')](_0x214c78['query'][_0xe3d0('0x1c')]);}return _0x3efa80['getFaxInteractions'](_0x14e2c6);}})[_0xe3d0('0x1e')](function(_0x5d04a5){if(_0x5d04a5){return _0x5d04a5?{'count':_0x5c5305,'rows':_0x5d04a5}:null;}})[_0xe3d0('0x1e')](respondWithResult(_0x162e3f,null))[_0xe3d0('0x52')](handleError(_0x162e3f,null));};exports['getWhatsappInteractions']=function(_0x4e9374,_0x4abf3c){var _0x286e04={};var _0x93ee84={};var _0x240114;var _0x5a5a5e;return db['User']['findOne']({'where':{'id':_0x4e9374['params']['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x4abf3c,null))[_0xe3d0('0x1e')](function(_0x57e032){if(_0x57e032){_0x240114=_0x57e032;_0x93ee84[_0xe3d0('0xcc')]=_[_0xe3d0('0xce')](db[_0xe3d0('0xe8')][_0xe3d0('0x35')]);_0x93ee84[_0xe3d0('0x42')]=_[_0xe3d0('0xce')](_0x4e9374[_0xe3d0('0x42')]);_0x93ee84[_0xe3d0('0xcf')]=_[_0xe3d0('0xd0')](_0x93ee84[_0xe3d0('0xcc')],_0x93ee84['query']);_0x286e04[_0xe3d0('0x46')]=_[_0xe3d0('0xd0')](_0x93ee84[_0xe3d0('0xcc')],qs[_0xe3d0('0xd1')](_0x4e9374[_0xe3d0('0x42')][_0xe3d0('0xd1')]));_0x286e04[_0xe3d0('0x46')]=_0x286e04[_0xe3d0('0x46')][_0xe3d0('0x4b')]?_0x286e04[_0xe3d0('0x46')]:_0x93ee84[_0xe3d0('0xcc')];_0x286e04[_0xe3d0('0xd2')]=qs[_0xe3d0('0xd3')](_0x4e9374[_0xe3d0('0x42')]['sort']);_0x286e04[_0xe3d0('0x41')]=qs['filters'](_[_0xe3d0('0xd4')](_0x4e9374['query'],_0x93ee84[_0xe3d0('0xcf')]));if(_0x4e9374['query']['filter']){_0x286e04[_0xe3d0('0x41')]=_[_0xe3d0('0x56')](_0x286e04[_0xe3d0('0x41')],{'$or':_[_0xe3d0('0x2a')](_0x286e04['attributes'],function(_0x43038c){var _0x1c89ee={};_0x1c89ee[_0x43038c]={'$like':'%'+_0x4e9374[_0xe3d0('0x42')]['filter']+'%'};return _0x1c89ee;})});}_0x286e04=_[_0xe3d0('0x56')]({},_0x286e04,_0x4e9374['options']);return _0x240114[_0xe3d0('0xe9')](_0x286e04);}})['then'](function(_0xac2ce8){if(_0xac2ce8){_0x5a5a5e=_0xac2ce8[_0xe3d0('0x4b')];if(!_0x4e9374['query'][_0xe3d0('0xc3')](_0xe3d0('0xd6'))){_0x286e04['limit']=qs['limit'](_0x4e9374[_0xe3d0('0x42')]['limit']);_0x286e04[_0xe3d0('0x1c')]=qs['offset'](_0x4e9374[_0xe3d0('0x42')][_0xe3d0('0x1c')]);}return _0x240114[_0xe3d0('0xe9')](_0x286e04);}})[_0xe3d0('0x1e')](function(_0x34606a){if(_0x34606a){return _0x34606a?{'count':_0x5a5a5e,'rows':_0x34606a}:null;}})[_0xe3d0('0x1e')](respondWithResult(_0x4abf3c,null))[_0xe3d0('0x52')](handleError(_0x4abf3c,null));};exports[_0xe3d0('0xea')]=function(_0x2f4b34,_0x7d0c83,_0x363a9c){var _0x14f905;var _0x1f716f;var _0x23c615;var _0x10ae91=!_[_0xe3d0('0x63')](_0x2f4b34[_0xe3d0('0x54')]['id'])?_0x2f4b34[_0xe3d0('0x54')]['id']:!_[_0xe3d0('0x63')](_0x2f4b34['user']['id'])?_0x2f4b34[_0xe3d0('0x7a')]['id']:null;return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x10ae91,'role':{'$or':['admin',_0xe3d0('0x7a'),_0xe3d0('0x20')]}},'attributes':['id',_0xe3d0('0x2e'),_0xe3d0('0xeb'),_0xe3d0('0xec'),_0xe3d0('0x1f'),_0xe3d0('0x5e'),'loginInPause']})['then'](function(_0xee202){if(_0xee202){if(_0xee202[_0xe3d0('0x1f')]===_0xe3d0('0x20')){_0x14f905=_0xee202;if(_0x2f4b34['body']['interface']){_0x23c615=util['format'](_0xe3d0('0xed'),_0x14f905[_0x2f4b34[_0xe3d0('0x59')][_0xe3d0('0xa1')]]);}else if(_0x2f4b34[_0xe3d0('0x59')]['intrf']){_0x23c615=util[_0xe3d0('0xa2')](_0xe3d0('0xee'),_0x2f4b34['body'][_0xe3d0('0xef')]);}else{_0x23c615=util[_0xe3d0('0xa2')]('SIP/%s',_0x14f905[_0xe3d0('0x2e')]);}socket['to'](util[_0xe3d0('0xa2')](_0xe3d0('0xf0'),_0x14f905[_0xe3d0('0x2e')]))['emit']('user:forcelogout',{'user':{'id':_0x14f905['id'],'name':_0x14f905['name']},'ip':_0x2f4b34[_0xe3d0('0xf1')][_0xe3d0('0xf2')]||_0x2f4b34[_0xe3d0('0xf3')][_0xe3d0('0xf4')]||_0x2f4b34['socket'][_0xe3d0('0xf4')]||_0x2f4b34['connection'][_0xe3d0('0xf5')]['remoteAddress']});return db['UserVoiceQueueRt'][_0xe3d0('0x22')]({'where':{'membername':_0x14f905[_0xe3d0('0x2e')]},'individualHooks':!![]});}}else{throw new db[(_0xe3d0('0x8b'))][(_0xe3d0('0x8c'))](_0xe3d0('0xf6'));}})[_0xe3d0('0x1e')](function(){if(_0x14f905){return _0x14f905[_0xe3d0('0xf7')]({'raw':!![]});}})[_0xe3d0('0x1e')](function(_0x1d1dd4){if(_0x14f905){if(_0x1d1dd4){_0x1f716f=_0x1d1dd4;if(_0x1f716f[_0xe3d0('0x4b')]){var _0x5def14=_0x1f716f[_0xe3d0('0x2a')](function(_0x49e549){var _0x29ce77={'membername':_0x14f905[_0xe3d0('0x2e')],'UserId':_0x14f905['id'],'queue_name':_0x49e549[_0xe3d0('0x2e')],'VoiceQueueId':_0x49e549['id'],'interface':_0x23c615,'paused':_0x14f905[_0xe3d0('0xf8')]||![],'penalty':_0x49e549['UserVoiceQueue.penalty']||0x0};return db[_0xe3d0('0xa4')][_0xe3d0('0xa5')](_0x29ce77);});return Promise[_0xe3d0('0x51')](_0x5def14);}}}})['then'](function(){if(_0x14f905){return db['MemberReport'][_0xe3d0('0x48')]({'where':{'membername':_0x14f905['name'],'exitAt':null}});}})[_0xe3d0('0x1e')](function(_0x3957e5){if(_0x14f905){var _0x168938=[];_0x3957e5[_0xe3d0('0xf9')](function(_0x19767b){_0x168938[_0xe3d0('0x47')](_0x19767b[_0xe3d0('0x1d')]({'exitAt':moment()[_0xe3d0('0xa2')](_0xe3d0('0xfa'))}));});return Promise[_0xe3d0('0x51')](_0x168938);}})['then'](function(){if(_0x14f905){var _0x3e3bff=[];var _0x330ac8=[];var _0x1b02a6=utils['getChannels']();var _0x184cc6={'membername':_0x14f905[_0xe3d0('0x2e')],'interface':_0x23c615,'enterAt':moment()[_0xe3d0('0xa2')](_0xe3d0('0xfa')),'role':_0x14f905[_0xe3d0('0x1f')],'internal':_0x14f905[_0xe3d0('0x5e')]};_0x1b02a6[_0xe3d0('0xf9')](function(_0x125276){_0x3e3bff[_0xe3d0('0x47')](_[_0xe3d0('0x56')]({'channel':_0x125276,'type':_0xe3d0('0xfb'),'data1':_0x2f4b34['body'][_0xe3d0('0xfc')],'data2':_0x23c615},_0x184cc6));if(_0x14f905[_0xe3d0('0xf8')]){_0x330ac8[_0xe3d0('0x47')](_[_0xe3d0('0x56')]({'channel':_0x125276,'type':_0xe3d0('0xfd'),'data1':_0xe3d0('0xfe')},_0x184cc6));}});return db[_0xe3d0('0xff')][_0xe3d0('0x82')](_0x3e3bff[_0xe3d0('0xc2')](_0x330ac8),{'individualHooks':!![]});}})[_0xe3d0('0x1e')](function(){if(_0x14f905){return _0x14f905[_0xe3d0('0x1d')]({'online':!![],'lastLoginAt':moment()[_0xe3d0('0xa2')](_0xe3d0('0xfa')),'voicePause':_0x14f905[_0xe3d0('0xf8')]||![],'mailPause':_0x14f905['loginInPause']||![],'chatPause':_0x14f905[_0xe3d0('0xf8')]||![],'faxPause':_0x14f905[_0xe3d0('0xf8')]||![],'smsPause':_0x14f905[_0xe3d0('0xf8')]||![],'openchannelPause':_0x14f905[_0xe3d0('0xf8')]||![],'whatsappPause':_0x14f905[_0xe3d0('0xf8')]||![],'pauseType':_0x14f905[_0xe3d0('0xf8')]?'LOGININPAUSE':null,'interface':_0x23c615,'lastPauseAt':moment()[_0xe3d0('0xa2')](_0xe3d0('0xfa'))});}})[_0xe3d0('0x1e')](function(_0x5b1018){if(_0x2f4b34['isMiddleware']){return _0x363a9c();}else{return Promise['resolve'](_0x5b1018)[_0xe3d0('0x1e')](respondWithResult(_0x7d0c83,null));}})['catch'](handleError(_0x7d0c83,null));};exports[_0xe3d0('0x100')]=function(_0x38a7df,_0x586ae6){var _0x54c2c0;return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x38a7df['params']['id'],'role':_0xe3d0('0x20')},'attributes':['id',_0xe3d0('0x2e'),_0xe3d0('0x1f')]})['then'](handleEntityNotFound(_0x586ae6,null))[_0xe3d0('0x1e')](function(_0x544d3e){if(_0x544d3e){_0x54c2c0=_0x544d3e;return db[_0xe3d0('0xa4')][_0xe3d0('0x22')]({'where':{'membername':_0x54c2c0[_0xe3d0('0x2e')]},'individualHooks':!![]});}})[_0xe3d0('0x1e')](function(){return db[_0xe3d0('0xff')][_0xe3d0('0x48')]({'where':{'membername':_0x54c2c0['name'],'exitAt':null}});})[_0xe3d0('0x1e')](function(_0x9000bf){var _0xa1a82f=[];_0x9000bf[_0xe3d0('0xf9')](function(_0x1bc0f4){_0xa1a82f['push'](_0x1bc0f4[_0xe3d0('0x1d')]({'exitAt':moment()[_0xe3d0('0xa2')](_0xe3d0('0xfa'))}));});return Promise['all'](_0xa1a82f);})['then'](function(){return _0x54c2c0[_0xe3d0('0x1d')]({'online':![],'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![],'whatsappPause':![],'interface':null});})[_0xe3d0('0x1e')](respondWithResult(_0x586ae6,null))[_0xe3d0('0x52')](handleError(_0x586ae6,null));};exports['pause']=function(_0x48b60e,_0x26fc80){var _0x4ddcbe;return db[_0xe3d0('0xa4')][_0xe3d0('0x1d')]({'paused':0x1},{'where':{'UserId':_0x48b60e[_0xe3d0('0x54')]['id']},'individualHooks':!![]})[_0xe3d0('0x1e')](function(){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x48b60e[_0xe3d0('0x54')]['id'],'role':_0xe3d0('0x20')},'attributes':['id','name','role',_0xe3d0('0x5e'),_0xe3d0('0xa1'),_0xe3d0('0x97')]});})[_0xe3d0('0x1e')](handleEntityNotFound(_0x26fc80,null))[_0xe3d0('0x1e')](function(_0x1f4d64){if(_0x1f4d64){_0x4ddcbe=_0x1f4d64;return db['MemberReport'][_0xe3d0('0x48')]({'where':{'membername':_0x4ddcbe[_0xe3d0('0x2e')],'type':'PAUSE','exitAt':null}});}})[_0xe3d0('0x1e')](function(_0x5a73d8){if(_0x5a73d8['length']){var _0x4384f3=moment()['format'](_0xe3d0('0xfa'));for(var _0x2e6776=0x0,_0x38acd3=_0x5a73d8[_0xe3d0('0x4b')];_0x2e6776<_0x38acd3;_0x2e6776++){_0x5a73d8[_0x2e6776]['updateAttributes']({'exitAt':_0x4384f3});}}})[_0xe3d0('0x1e')](function(){var _0x1b36b0=[];var _0x1851c7=utils[_0xe3d0('0x101')]();_0x1851c7[_0xe3d0('0xf9')](function(_0x5ad67b){_0x1b36b0[_0xe3d0('0x47')]({'channel':_0x5ad67b,'membername':_0x4ddcbe['name'],'interface':_[_0xe3d0('0x63')](_0x4ddcbe[_0xe3d0('0xa1')])?util[_0xe3d0('0xa2')](_0xe3d0('0xee'),_0x4ddcbe[_0xe3d0('0x2e')]):_0x4ddcbe[_0xe3d0('0xa1')],'type':_0xe3d0('0xfd'),'enterAt':moment()[_0xe3d0('0xa2')](_0xe3d0('0xfa')),'data1':_0x48b60e[_0xe3d0('0x59')][_0xe3d0('0x37')]||_0xe3d0('0x102'),'role':_0x4ddcbe[_0xe3d0('0x1f')],'internal':_0x4ddcbe['internal']});});return db[_0xe3d0('0xff')][_0xe3d0('0x82')](_0x1b36b0,{'individualHooks':!![]});})[_0xe3d0('0x1e')](function(){return _0x4ddcbe[_0xe3d0('0x1d')]({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'whatsappPause':!![],'openchannelPause':!![],'pauseType':_0x48b60e[_0xe3d0('0x59')][_0xe3d0('0x37')]||_0xe3d0('0x102'),'lastPauseAt':moment()[_0xe3d0('0xa2')](_0xe3d0('0xfa'))});})[_0xe3d0('0x1e')](respondWithResult(_0x26fc80,null))[_0xe3d0('0x52')](handleError(_0x26fc80,null));};exports[_0xe3d0('0x103')]=function(_0xf9d6e2,_0x364001){if(_0xf9d6e2[_0xe3d0('0x59')][_0xe3d0('0x96')]&&!utils[_0xe3d0('0x99')](_0xf9d6e2[_0xe3d0('0x59')][_0xe3d0('0x96')])){throw new APIBadRequestError(util[_0xe3d0('0xa2')](_0xe3d0('0x104'),_0xf9d6e2[_0xe3d0('0x59')][_0xe3d0('0x96')]));}return db[_0xe3d0('0x34')]['find']({'where':{'id':_0xf9d6e2[_0xe3d0('0x54')]['id']},'attributes':['id',_0xe3d0('0x2e'),_0xe3d0('0x1f'),_0xe3d0('0x5e'),_0xe3d0('0xa1'),_0xe3d0('0x97'),_0xe3d0('0x98'),_0xe3d0('0x105'),_0xe3d0('0x106'),_0xe3d0('0x107'),_0xe3d0('0x108'),'smsPause','whatsappPause','pauseType',_0xe3d0('0x109')]})[_0xe3d0('0x1e')](function(_0x3ac249){if(!_0x3ac249){throw new APINotFoundError(util[_0xe3d0('0xa2')](_0xe3d0('0x10a'),_0xf9d6e2[_0xe3d0('0x54')]['id']));}return _0x3ac249[_0xe3d0('0x103')](_0xf9d6e2[_0xe3d0('0x59')][_0xe3d0('0x96')]);})[_0xe3d0('0x1e')](respondWithResult(_0x364001,null))[_0xe3d0('0x52')](APIHandleError(_0x364001));};exports[_0xe3d0('0x10b')]=function(_0x61d5e3,_0x1276a5){var _0x18103b={};var _0x3d412b={};var _0x12fcf1;var _0x37774d;return db[_0xe3d0('0x34')]['findOne']({'where':{'id':_0x61d5e3['params']['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x1276a5,null))[_0xe3d0('0x1e')](function(_0x5097a9){if(_0x5097a9){_0x12fcf1=_0x5097a9;_0x3d412b[_0xe3d0('0xcc')]=_[_0xe3d0('0xce')](db[_0xe3d0('0x10c')][_0xe3d0('0x35')]);_0x3d412b[_0xe3d0('0x42')]=_[_0xe3d0('0xce')](_0x61d5e3[_0xe3d0('0x42')]);_0x3d412b[_0xe3d0('0xcf')]=_['intersection'](_0x3d412b[_0xe3d0('0xcc')],_0x3d412b[_0xe3d0('0x42')]);_0x18103b[_0xe3d0('0x46')]=_[_0xe3d0('0xd0')](_0x3d412b[_0xe3d0('0xcc')],qs[_0xe3d0('0xd1')](_0x61d5e3['query'][_0xe3d0('0xd1')]));_0x18103b['attributes']=_0x18103b[_0xe3d0('0x46')][_0xe3d0('0x4b')]?_0x18103b['attributes']:_0x3d412b[_0xe3d0('0xcc')];_0x18103b[_0xe3d0('0xd2')]=qs['sort'](_0x61d5e3[_0xe3d0('0x42')][_0xe3d0('0xd3')]);_0x18103b[_0xe3d0('0x41')]=qs[_0xe3d0('0xcf')](_[_0xe3d0('0xd4')](_0x61d5e3['query'],_0x3d412b[_0xe3d0('0xcf')]));if(_0x61d5e3[_0xe3d0('0x42')]['filter']){_0x18103b[_0xe3d0('0x41')]=_['merge'](_0x18103b[_0xe3d0('0x41')],{'$or':_[_0xe3d0('0x2a')](_0x18103b[_0xe3d0('0x46')],function(_0x1cdb08){var _0x3f0cb9={};_0x3f0cb9[_0x1cdb08]={'$like':'%'+_0x61d5e3[_0xe3d0('0x42')]['filter']+'%'};return _0x3f0cb9;})});}_0x18103b=_['merge']({},_0x18103b,_0x61d5e3[_0xe3d0('0xd8')]);return _0x12fcf1[_0xe3d0('0x10b')](_0x18103b);}})[_0xe3d0('0x1e')](function(_0x2308a7){if(_0x2308a7){_0x37774d=_0x2308a7[_0xe3d0('0x4b')];if(!_0x61d5e3[_0xe3d0('0x42')][_0xe3d0('0xc3')](_0xe3d0('0xd6'))){_0x18103b[_0xe3d0('0x19')]=qs['limit'](_0x61d5e3['query'][_0xe3d0('0x19')]);_0x18103b['offset']=qs['offset'](_0x61d5e3[_0xe3d0('0x42')]['offset']);}return _0x12fcf1['getTeams'](_0x18103b);}})[_0xe3d0('0x1e')](function(_0x40b077){if(_0x40b077){return _0x40b077?{'count':_0x37774d,'rows':_0x40b077}:null;}})[_0xe3d0('0x1e')](respondWithResult(_0x1276a5,null))[_0xe3d0('0x52')](handleError(_0x1276a5,null));};exports['addTeams']=function(_0x56cb36,_0x4fd67d){var _0x172ee7=_0x56cb36[_0xe3d0('0x54')]['id'];var _0x5cffa0=_0x56cb36['body']?_0x56cb36[_0xe3d0('0x59')][_0xe3d0('0x5d')]:null;var _0xf1c3d2=[];return Promise[_0xe3d0('0x10d')]()['then'](function(){if(!_0x5cffa0)throw new APIBadRequestError(_0xe3d0('0x10e'));})[_0xe3d0('0x1e')](function(){return db[_0xe3d0('0x34')][_0xe3d0('0xcb')]({'where':{'id':_0x172ee7}});})[_0xe3d0('0x1e')](function(_0x530bf5){if(!_0x530bf5)throw new APINotFoundError(util[_0xe3d0('0xa2')](_0xe3d0('0x10a'),_0x56cb36[_0xe3d0('0x54')]['id']));return db['sequelize'][_0xe3d0('0x10f')](function(_0xe21542){return _0x530bf5[_0xe3d0('0x110')](_0x5cffa0,{'transaction':_0xe21542})[_0xe3d0('0x1e')](function(){return db['Team'][_0xe3d0('0x48')]({'where':{'id':{'$in':_0x5cffa0}}});})[_0xe3d0('0x1e')](function(_0x2d616d){var _0xef9d12=_[_0xe3d0('0x2a')](_0x2d616d,function(_0x3f370a){return _0x3f370a[_0xe3d0('0x111')]();});return Promise[_0xe3d0('0x51')](_0xef9d12);})['then'](function(_0x261bd9){_0xf1c3d2=_['flattenDeep'](_0x261bd9);var _0x4b4157=_['map'](_0xf1c3d2,function(_0x306f0a){return _0x306f0a[_0xe3d0('0x112')](_0x530bf5['id'],{'transaction':_0xe21542});});return Promise[_0xe3d0('0x51')](_0x4b4157);})[_0xe3d0('0x1e')](function(){if(!_0x530bf5[_0xe3d0('0x97')])return;var _0x395c15=_[_0xe3d0('0x28')](_0xf1c3d2,function(_0x255b18){return _0x255b18[_0xe3d0('0x113')]('channel')===_0xe3d0('0x114');});var _0x188274=_[_0xe3d0('0x2a')](_0x395c15,function(_0x4268fb){return db['UserVoiceQueueRt'][_0xe3d0('0xa5')]({'membername':_0x530bf5[_0xe3d0('0x2e')],'UserId':_0x530bf5['id'],'queue_name':_0x4268fb[_0xe3d0('0x2e')],'VoiceQueueId':_0x4268fb['id'],'interface':_[_0xe3d0('0x63')](_0x530bf5[_0xe3d0('0xa1')])?util['format'](_0xe3d0('0xee'),_0x530bf5['name']):_0x530bf5[_0xe3d0('0xa1')],'paused':_0x530bf5['voicePause']||![],'penalty':_0x530bf5[_0xe3d0('0xa3')]},{'transaction':_0xe21542});});return Promise[_0xe3d0('0x51')](_0x188274);})[_0xe3d0('0x1e')](function(){return db[_0xe3d0('0x115')][_0xe3d0('0x48')]({'where':{'teamId':{'$in':_0x5cffa0}}});})[_0xe3d0('0x1e')](function(_0x326d36){var _0x1b6ca6=_[_0xe3d0('0x2a')](_0x326d36,function(_0x309200){return db[_0xe3d0('0x116')][_0xe3d0('0x79')]({'UserId':_0x530bf5['id'],'VoicePrefixId':_0x309200['VoicePrefixId']},{'transaction':_0xe21542});});return Promise['all'](_0x1b6ca6);});});})[_0xe3d0('0x1e')](function(){for(var _0x1e6613=0x0;_0x1e6613<_0xf1c3d2[_0xe3d0('0x4b')];_0x1e6613++){var _0x55de3c=_0xf1c3d2[_0x1e6613][_0xe3d0('0x113')]('channel');var _0x31da5c=_0x55de3c+_0xe3d0('0xa9');socket[_0xe3d0('0xaa')]('user'+_0x55de3c+_0xe3d0('0x9e'),{'UserId':_0x172ee7,['queueField']:_0xf1c3d2[_0x1e6613]['id']});}})[_0xe3d0('0x1e')](respondWithStatusCode(_0x4fd67d,null))[_0xe3d0('0x52')](APIHandleError(_0x4fd67d));};exports[_0xe3d0('0x117')]=function(_0x26afe1,_0xc736d0){var _0x2176b4=_0x26afe1[_0xe3d0('0x54')]['id'];var _0x4de346=null;if(_0x26afe1[_0xe3d0('0x42')][_0xe3d0('0x5d')]){_0x4de346=_[_0xe3d0('0xa8')](_0x26afe1[_0xe3d0('0x42')][_0xe3d0('0x5d')])?_0x26afe1[_0xe3d0('0x42')][_0xe3d0('0x5d')]:[_0x26afe1[_0xe3d0('0x42')][_0xe3d0('0x5d')]];}var _0x589f32=[];return Promise[_0xe3d0('0x10d')]()[_0xe3d0('0x1e')](function(){if(!_0x4de346)throw new APIBadRequestError('Query\x20parameter\x20\x27ids\x27\x20is\x20required');})['then'](function(){return db[_0xe3d0('0x34')][_0xe3d0('0xcb')]({'where':{'id':_0x2176b4}});})[_0xe3d0('0x1e')](function(_0x1d69e1){if(!_0x1d69e1)throw new APINotFoundError(util['format']('User\x20with\x20id\x20%s\x20not\x20found',_0x26afe1['params']['id']));return db[_0xe3d0('0x65')]['transaction'](function(_0x5a8452){return _0x1d69e1[_0xe3d0('0x117')](_0x4de346,{'transaction':_0x5a8452})['then'](function(){return db[_0xe3d0('0x10c')][_0xe3d0('0x48')]({'where':{'id':{'$in':_0x4de346}}});})[_0xe3d0('0x1e')](function(_0x1177f7){var _0x4f3ab6=_['map'](_0x1177f7,function(_0x244f9b){return _0x244f9b['getAssociatedQueues']();});return Promise[_0xe3d0('0x51')](_0x4f3ab6);})[_0xe3d0('0x1e')](function(_0x3912d1){_0x589f32=_['flattenDeep'](_0x3912d1);var _0x217376=_[_0xe3d0('0x2a')](_0x589f32,function(_0x3b899c){return _0x3b899c['removeAgent'](_0x1d69e1['id'],{'transaction':_0x5a8452});});return Promise[_0xe3d0('0x51')](_0x217376);})[_0xe3d0('0x1e')](function(){if(!_0x1d69e1[_0xe3d0('0x97')])return;var _0x344df6=_[_0xe3d0('0x28')](_0x589f32,function(_0x45f262){return _0x45f262[_0xe3d0('0x113')](_0xe3d0('0x96'))===_0xe3d0('0x114');});var _0x5c69bb=_['map'](_0x344df6,function(_0x133b10){return db[_0xe3d0('0xa4')][_0xe3d0('0x22')]({'where':{'VoiceQueueId':_0x133b10['id'],'UserId':_0x1d69e1['id']},'transaction':_0x5a8452});});return Promise[_0xe3d0('0x51')](_0x5c69bb);})[_0xe3d0('0x1e')](function(){return db[_0xe3d0('0x115')][_0xe3d0('0x48')]({'where':{'teamId':{'$in':_0x4de346}}});})[_0xe3d0('0x1e')](function(_0x428c66){var _0x4d2e89=_['map'](_0x428c66,function(_0x37e503){return db['UserVoicePrefix']['destroy']({'where':{'UserId':_0x1d69e1['id'],'VoicePrefixId':_0x37e503[_0xe3d0('0x118')]}},{'transaction':_0x5a8452});});return Promise[_0xe3d0('0x51')](_0x4d2e89);});});})[_0xe3d0('0x1e')](function(){for(var _0x4dc3c1=0x0;_0x4dc3c1<_0x589f32[_0xe3d0('0x4b')];_0x4dc3c1++){var _0x5ed286=_0x589f32[_0x4dc3c1]['getDataValue'](_0xe3d0('0x96'));var _0x409f17=_0x5ed286+_0xe3d0('0xa9');socket['emit']('user'+_0x5ed286+_0xe3d0('0xab'),{'UserId':_0x2176b4,['queueField']:_0x589f32[_0x4dc3c1]['id']});}})[_0xe3d0('0x1e')](respondWithStatusCode(_0xc736d0,null))[_0xe3d0('0x52')](APIHandleError(_0xc736d0));};exports[_0xe3d0('0x119')]=function(_0x212d5d,_0x45f2fc){var _0xcb6d2d={};var _0x48842b={};var _0x4eba95;var _0x33ca0e;return db[_0xe3d0('0x34')][_0xe3d0('0xcb')]({'where':{'id':_0x212d5d['params']['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x45f2fc,null))['then'](function(_0x1dcbe9){if(_0x1dcbe9){_0x4eba95=_0x1dcbe9;_0x48842b[_0xe3d0('0xcc')]=_[_0xe3d0('0xce')](db[_0xe3d0('0xc4')][_0xe3d0('0x35')]);_0x48842b[_0xe3d0('0x42')]=_[_0xe3d0('0xce')](_0x212d5d[_0xe3d0('0x42')]);_0x48842b[_0xe3d0('0xcf')]=_['intersection'](_0x48842b[_0xe3d0('0xcc')],_0x48842b[_0xe3d0('0x42')]);_0xcb6d2d[_0xe3d0('0x46')]=_['intersection'](_0x48842b[_0xe3d0('0xcc')],qs[_0xe3d0('0xd1')](_0x212d5d[_0xe3d0('0x42')][_0xe3d0('0xd1')]));_0xcb6d2d['attributes']=_0xcb6d2d[_0xe3d0('0x46')]['length']?_0xcb6d2d[_0xe3d0('0x46')]:_0x48842b[_0xe3d0('0xcc')];_0xcb6d2d[_0xe3d0('0xd2')]=qs[_0xe3d0('0xd3')](_0x212d5d['query'][_0xe3d0('0xd3')]);_0xcb6d2d[_0xe3d0('0x41')]=qs[_0xe3d0('0xcf')](_[_0xe3d0('0xd4')](_0x212d5d[_0xe3d0('0x42')],_0x48842b[_0xe3d0('0xcf')]));if(_0x212d5d[_0xe3d0('0x42')]['filter']){_0xcb6d2d[_0xe3d0('0x41')]=_[_0xe3d0('0x56')](_0xcb6d2d['where'],{'$or':_['map'](_0xcb6d2d['attributes'],function(_0xa3e6ed){var _0x2277aa={};_0x2277aa[_0xa3e6ed]={'$like':'%'+_0x212d5d['query'][_0xe3d0('0x28')]+'%'};return _0x2277aa;})});}_0xcb6d2d=_[_0xe3d0('0x56')]({},_0xcb6d2d,_0x212d5d[_0xe3d0('0xd8')]);return _0x4eba95[_0xe3d0('0x119')](_0xcb6d2d);}})[_0xe3d0('0x1e')](function(_0x451712){if(_0x451712){_0x33ca0e=_0x451712[_0xe3d0('0x4b')];if(!_0x212d5d[_0xe3d0('0x42')][_0xe3d0('0xc3')](_0xe3d0('0xd6'))){_0xcb6d2d[_0xe3d0('0x19')]=qs['limit'](_0x212d5d[_0xe3d0('0x42')][_0xe3d0('0x19')]);_0xcb6d2d[_0xe3d0('0x1c')]=qs['offset'](_0x212d5d['query']['offset']);}return _0x4eba95[_0xe3d0('0x119')](_0xcb6d2d);}})['then'](function(_0xd89125){if(_0xd89125){return _0xd89125?{'count':_0x33ca0e,'rows':_0xd89125}:null;}})[_0xe3d0('0x1e')](respondWithResult(_0x45f2fc,null))[_0xe3d0('0x52')](handleError(_0x45f2fc,null));};exports[_0xe3d0('0x11a')]=function(_0x26de97,_0x657797){var _0x299910={};var _0x461468={};var _0x3a529a;return db[_0xe3d0('0x34')]['findOne']({'where':{'id':_0x26de97[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x657797,null))[_0xe3d0('0x1e')](function(_0x2d1d3d){if(_0x2d1d3d){_0x3a529a=_0x2d1d3d;_0x461468[_0xe3d0('0xcc')]=_[_0xe3d0('0xce')](db[_0xe3d0('0x34')][_0xe3d0('0x35')]);_0x461468['query']=_[_0xe3d0('0xce')](_0x26de97['query']);_0x461468[_0xe3d0('0xcf')]=_['intersection'](_0x461468[_0xe3d0('0xcc')],_0x461468[_0xe3d0('0x42')]);_0x299910['attributes']=_[_0xe3d0('0xd0')](_0x461468[_0xe3d0('0xcc')],qs[_0xe3d0('0xd1')](_0x26de97[_0xe3d0('0x42')]['fields']));_0x299910[_0xe3d0('0x46')]=_0x299910[_0xe3d0('0x46')][_0xe3d0('0x4b')]?_0x299910[_0xe3d0('0x46')]:_0x461468[_0xe3d0('0xcc')];_0x299910['order']=qs[_0xe3d0('0xd3')](_0x26de97[_0xe3d0('0x42')]['sort']);_0x299910['where']=qs[_0xe3d0('0xcf')](_[_0xe3d0('0xd4')](_0x26de97[_0xe3d0('0x42')],_0x461468[_0xe3d0('0xcf')]));if(_0x26de97['query'][_0xe3d0('0x28')]){_0x299910[_0xe3d0('0x41')]=_[_0xe3d0('0x56')](_0x299910['where'],{'$or':_[_0xe3d0('0x2a')](_0x299910[_0xe3d0('0x46')],function(_0x5aeaac){var _0x5f539d={};_0x5f539d[_0x5aeaac]={'$like':'%'+_0x26de97['query'][_0xe3d0('0x28')]+'%'};return _0x5f539d;})});}_0x299910[_0xe3d0('0xcc')]=db[_0xe3d0('0x34')];_0x299910['as']=_0xe3d0('0x26');_0x299910=_[_0xe3d0('0x56')]({},_0x299910,_0x26de97[_0xe3d0('0xd8')]);return _0x3a529a['getVoiceQueues']({'include':[_0x299910]});}})[_0xe3d0('0x1e')](function(_0x1cadcd){if(_0x1cadcd){var _0x567690={},_0x2c8ca8=[];for(var _0x597e53=0x0;_0x597e53<_0x1cadcd[_0xe3d0('0x4b')];_0x597e53+=0x1){for(var _0x3f5aaf=0x0,_0x4af3a3;_0x3f5aaf<_0x1cadcd[_0x597e53]['Agents'][_0xe3d0('0x4b')];_0x3f5aaf+=0x1){_0x4af3a3=_0x1cadcd[_0x597e53]['Agents'][_0x3f5aaf][_0xe3d0('0x23')]({'plain':!![]});_0x567690[_0x4af3a3['id']]=_0x4af3a3;}}_0x567690=_[_0xe3d0('0x11b')](_0x567690);for(var _0xcfdd85=qs[_0xe3d0('0x1c')](_0x26de97[_0xe3d0('0x42')][_0xe3d0('0x1c')]);_0xcfdd85<_0x567690['length']&&_0x2c8ca8[_0xe3d0('0x4b')]<qs[_0xe3d0('0x19')](_0x26de97[_0xe3d0('0x42')]['limit']);_0xcfdd85+=0x1){if(_0x567690[_0xcfdd85]){_0x2c8ca8[_0xe3d0('0x47')](_0x567690[_0xcfdd85]);}}return{'count':_0x567690['length'],'rows':_0x2c8ca8};}})[_0xe3d0('0x1e')](respondWithResult(_0x657797,null))[_0xe3d0('0x52')](handleError(_0x657797,null));};exports[_0xe3d0('0x22')]=function(_0x67bb3d,_0x15ec2c){if(_0x67bb3d[_0xe3d0('0x7a')]['id']==_0x67bb3d['params']['id']){throw new APIForbiddenError('You\x20can\x27t\x20delete\x20yourself');}return db['User'][_0xe3d0('0x2d')]({'where':{'id':_0x67bb3d[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](function(_0x34dd3f){if(!_0x34dd3f){throw new APINotFoundError(util[_0xe3d0('0xa2')]('User\x20with\x20id\x20%s\x20not\x20found',_0x67bb3d[_0xe3d0('0x54')]['id']));}return db[_0xe3d0('0x65')][_0xe3d0('0x10f')](function(_0x198842){return db[_0xe3d0('0x11c')][_0xe3d0('0x1d')]({'recallme':![]},{'where':{'UserId':_0x67bb3d[_0xe3d0('0x54')]['id']},'transaction':_0x198842})[_0xe3d0('0x1e')](function(){return removeEntity(_0x15ec2c,_0x198842)(_0x34dd3f);});});})[_0xe3d0('0x52')](APIHandleError(_0x15ec2c));};exports[_0xe3d0('0x11d')]=function(_0x1a935c,_0x5c02de){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x1a935c[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x5c02de,null))[_0xe3d0('0x1e')](function(_0x269b83){if(_0x269b83){return _0x269b83[_0xe3d0('0x11d')](_0x1a935c[_0xe3d0('0x59')]['ids'],_[_0xe3d0('0x5c')](_0x1a935c['body'],[_0xe3d0('0x5d'),'id'])||{})[_0xe3d0('0x11e')](function(){for(var _0x4f8b36=0x0;_0x4f8b36<_0x1a935c[_0xe3d0('0x59')]['ids'][_0xe3d0('0x4b')];_0x4f8b36+=0x1){socket[_0xe3d0('0xaa')](_0xe3d0('0x11f'),{'ChatInteractionId':Number(_0x1a935c[_0xe3d0('0x59')]['ids'][_0x4f8b36]),'UserId':Number(_0x1a935c[_0xe3d0('0x54')]['id'])});}return _0x1a935c['body']['ids'];});}})[_0xe3d0('0x1e')](respondWithResult(_0x5c02de,null))['catch'](handleError(_0x5c02de,null));};exports[_0xe3d0('0x120')]=function(_0x1e12ba,_0x4a813d){return db['User'][_0xe3d0('0x2d')]({'where':{'id':_0x1e12ba[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x4a813d,null))['then'](function(_0x60d7e){if(_0x60d7e){return _0x60d7e['removeChatInteractions'](_0x1e12ba[_0xe3d0('0x42')][_0xe3d0('0x5d')])[_0xe3d0('0x1e')](function(){if(_[_0xe3d0('0xa8')](_0x1e12ba[_0xe3d0('0x42')][_0xe3d0('0x5d')])){for(var _0xa89069=0x0;_0xa89069<_0x1e12ba['query'][_0xe3d0('0x5d')][_0xe3d0('0x4b')];_0xa89069+=0x1){socket[_0xe3d0('0xaa')](_0xe3d0('0x121'),{'ChatInteractionId':Number(_0x1e12ba[_0xe3d0('0x42')]['ids'][_0xa89069]),'UserId':Number(_0x1e12ba[_0xe3d0('0x54')]['id'])});}}else{socket['emit']('user_has_chat_interactions:remove',{'ChatInteractionId':Number(_0x1e12ba['query'][_0xe3d0('0x5d')]),'UserId':Number(_0x1e12ba[_0xe3d0('0x54')]['id'])});}});}})['then'](respondWithStatusCode(_0x4a813d,null))['catch'](handleError(_0x4a813d,null));};exports[_0xe3d0('0x122')]=function(_0x359b63,_0x53ccca){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x359b63[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x53ccca,null))[_0xe3d0('0x1e')](function(_0x17c651){if(_0x17c651){return _0x17c651['addMailInteractions'](_0x359b63[_0xe3d0('0x59')][_0xe3d0('0x5d')],_[_0xe3d0('0x5c')](_0x359b63['body'],[_0xe3d0('0x5d'),'id'])||{})['spread'](function(){for(var _0xdf7962=0x0;_0xdf7962<_0x359b63[_0xe3d0('0x59')][_0xe3d0('0x5d')]['length'];_0xdf7962+=0x1){socket[_0xe3d0('0xaa')](_0xe3d0('0x123'),{'MailInteractionId':Number(_0x359b63[_0xe3d0('0x59')][_0xe3d0('0x5d')][_0xdf7962]),'UserId':Number(_0x359b63[_0xe3d0('0x54')]['id'])});}return _0x359b63[_0xe3d0('0x59')][_0xe3d0('0x5d')];});}})[_0xe3d0('0x1e')](respondWithResult(_0x53ccca,null))[_0xe3d0('0x52')](handleError(_0x53ccca,null));};exports[_0xe3d0('0x124')]=function(_0x28a73a,_0x564535){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x28a73a[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x564535,null))['then'](function(_0x4bd8ed){if(_0x4bd8ed){return _0x4bd8ed['removeMailInteractions'](_0x28a73a['query'][_0xe3d0('0x5d')])[_0xe3d0('0x1e')](function(){if(_[_0xe3d0('0xa8')](_0x28a73a[_0xe3d0('0x42')]['ids'])){for(var _0x145639=0x0;_0x145639<_0x28a73a[_0xe3d0('0x42')][_0xe3d0('0x5d')][_0xe3d0('0x4b')];_0x145639+=0x1){socket[_0xe3d0('0xaa')](_0xe3d0('0x125'),{'MailInteractionId':Number(_0x28a73a[_0xe3d0('0x42')][_0xe3d0('0x5d')][_0x145639]),'UserId':Number(_0x28a73a[_0xe3d0('0x54')]['id'])});}}else{socket[_0xe3d0('0xaa')](_0xe3d0('0x125'),{'MailInteractionId':Number(_0x28a73a[_0xe3d0('0x42')]['ids']),'UserId':Number(_0x28a73a['params']['id'])});}});}})[_0xe3d0('0x1e')](respondWithStatusCode(_0x564535,null))['catch'](handleError(_0x564535,null));};exports[_0xe3d0('0x126')]=function(_0x285987,_0x3a0e57){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x285987['params']['id']}})['then'](handleEntityNotFound(_0x3a0e57,null))[_0xe3d0('0x1e')](function(_0x4f0c9c){if(_0x4f0c9c){return _0x4f0c9c[_0xe3d0('0x126')](_0x285987['body']['ids'],_[_0xe3d0('0x5c')](_0x285987['body'],['ids','id'])||{})[_0xe3d0('0x11e')](function(){for(var _0x595b90=0x0;_0x595b90<_0x285987[_0xe3d0('0x59')][_0xe3d0('0x5d')][_0xe3d0('0x4b')];_0x595b90+=0x1){socket[_0xe3d0('0xaa')]('user_has_fax_interactions:save',{'FaxInteractionId':Number(_0x285987[_0xe3d0('0x59')][_0xe3d0('0x5d')][_0x595b90]),'UserId':Number(_0x285987['params']['id'])});}return _0x285987[_0xe3d0('0x59')][_0xe3d0('0x5d')];});}})[_0xe3d0('0x1e')](respondWithResult(_0x3a0e57,null))[_0xe3d0('0x52')](handleError(_0x3a0e57,null));};exports[_0xe3d0('0x127')]=function(_0x316ee3,_0x3b3a6e){return db['User']['find']({'where':{'id':_0x316ee3[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x3b3a6e,null))['then'](function(_0x3e3637){if(_0x3e3637){return _0x3e3637[_0xe3d0('0x127')](_0x316ee3[_0xe3d0('0x42')][_0xe3d0('0x5d')])['then'](function(){if(_['isArray'](_0x316ee3[_0xe3d0('0x42')][_0xe3d0('0x5d')])){for(var _0x23a590=0x0;_0x23a590<_0x316ee3[_0xe3d0('0x42')][_0xe3d0('0x5d')][_0xe3d0('0x4b')];_0x23a590+=0x1){socket[_0xe3d0('0xaa')](_0xe3d0('0x128'),{'FaxInteractionId':Number(_0x316ee3[_0xe3d0('0x42')][_0xe3d0('0x5d')][_0x23a590]),'UserId':Number(_0x316ee3['params']['id'])});}}else{socket[_0xe3d0('0xaa')]('user_has_fax_interactions:remove',{'FaxInteractionId':Number(_0x316ee3[_0xe3d0('0x42')][_0xe3d0('0x5d')]),'UserId':Number(_0x316ee3[_0xe3d0('0x54')]['id'])});}});}})['then'](respondWithStatusCode(_0x3b3a6e,null))[_0xe3d0('0x52')](handleError(_0x3b3a6e,null));};exports[_0xe3d0('0x129')]=function(_0x17ee4b,_0xb3d21){return db['User'][_0xe3d0('0x2d')]({'where':{'id':_0x17ee4b[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0xb3d21,null))['then'](function(_0x2b16d0){if(_0x2b16d0){return _0x2b16d0['addSmsInteractions'](_0x17ee4b['body']['ids'],_[_0xe3d0('0x5c')](_0x17ee4b[_0xe3d0('0x59')],[_0xe3d0('0x5d'),'id'])||{})['spread'](function(){for(var _0x1f1ac7=0x0;_0x1f1ac7<_0x17ee4b['body'][_0xe3d0('0x5d')][_0xe3d0('0x4b')];_0x1f1ac7+=0x1){socket['emit']('user_has_sms_interactions:save',{'SmsInteractionId':Number(_0x17ee4b[_0xe3d0('0x59')]['ids'][_0x1f1ac7]),'UserId':Number(_0x17ee4b[_0xe3d0('0x54')]['id'])});}return _0x17ee4b['body'][_0xe3d0('0x5d')];});}})[_0xe3d0('0x1e')](respondWithResult(_0xb3d21,null))[_0xe3d0('0x52')](handleError(_0xb3d21,null));};exports[_0xe3d0('0x12a')]=function(_0x13a215,_0x42e155){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x13a215[_0xe3d0('0x54')]['id']}})['then'](handleEntityNotFound(_0x42e155,null))[_0xe3d0('0x1e')](function(_0x553a2c){if(_0x553a2c){return _0x553a2c[_0xe3d0('0x12a')](_0x13a215[_0xe3d0('0x42')][_0xe3d0('0x5d')])[_0xe3d0('0x1e')](function(){if(_[_0xe3d0('0xa8')](_0x13a215[_0xe3d0('0x42')][_0xe3d0('0x5d')])){for(var _0xbc0880=0x0;_0xbc0880<_0x13a215[_0xe3d0('0x42')]['ids'][_0xe3d0('0x4b')];_0xbc0880+=0x1){socket[_0xe3d0('0xaa')](_0xe3d0('0x12b'),{'SmsInteractionId':Number(_0x13a215[_0xe3d0('0x42')][_0xe3d0('0x5d')][_0xbc0880]),'UserId':Number(_0x13a215[_0xe3d0('0x54')]['id'])});}}else{socket[_0xe3d0('0xaa')](_0xe3d0('0x12b'),{'SmsInteractionId':Number(_0x13a215['query'][_0xe3d0('0x5d')]),'UserId':Number(_0x13a215[_0xe3d0('0x54')]['id'])});}});}})[_0xe3d0('0x1e')](respondWithStatusCode(_0x42e155,null))[_0xe3d0('0x52')](handleError(_0x42e155,null));};exports['addOpenchannelInteractions']=function(_0x266319,_0x50665f){return db[_0xe3d0('0x34')]['find']({'where':{'id':_0x266319[_0xe3d0('0x54')]['id']}})['then'](handleEntityNotFound(_0x50665f,null))[_0xe3d0('0x1e')](function(_0x63ad8b){if(_0x63ad8b){return _0x63ad8b[_0xe3d0('0x12c')](_0x266319['body'][_0xe3d0('0x5d')],_[_0xe3d0('0x5c')](_0x266319['body'],[_0xe3d0('0x5d'),'id'])||{})['spread'](function(){for(var _0xdb461e=0x0;_0xdb461e<_0x266319[_0xe3d0('0x59')][_0xe3d0('0x5d')]['length'];_0xdb461e+=0x1){socket[_0xe3d0('0xaa')]('user_has_openchannel_interactions:save',{'OpenchannelInteractionId':Number(_0x266319[_0xe3d0('0x59')]['ids'][_0xdb461e]),'UserId':Number(_0x266319[_0xe3d0('0x54')]['id'])});}return _0x266319[_0xe3d0('0x59')][_0xe3d0('0x5d')];});}})[_0xe3d0('0x1e')](respondWithResult(_0x50665f,null))[_0xe3d0('0x52')](handleError(_0x50665f,null));};exports[_0xe3d0('0x12d')]=function(_0x4265df,_0x9c5a71){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x4265df[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x9c5a71,null))[_0xe3d0('0x1e')](function(_0x505a9a){if(_0x505a9a){return _0x505a9a[_0xe3d0('0x12d')](_0x4265df['query'][_0xe3d0('0x5d')])[_0xe3d0('0x1e')](function(){if(_[_0xe3d0('0xa8')](_0x4265df[_0xe3d0('0x42')][_0xe3d0('0x5d')])){for(var _0x53910c=0x0;_0x53910c<_0x4265df[_0xe3d0('0x42')][_0xe3d0('0x5d')][_0xe3d0('0x4b')];_0x53910c+=0x1){socket[_0xe3d0('0xaa')](_0xe3d0('0x12e'),{'OpenchannelInteractionId':Number(_0x4265df[_0xe3d0('0x42')][_0xe3d0('0x5d')][_0x53910c]),'UserId':Number(_0x4265df[_0xe3d0('0x54')]['id'])});}}else{socket[_0xe3d0('0xaa')]('user_has_openchannel_interactions:remove',{'OpenchannelInteractionId':Number(_0x4265df[_0xe3d0('0x42')]['ids']),'UserId':Number(_0x4265df[_0xe3d0('0x54')]['id'])});}});}})[_0xe3d0('0x1e')](respondWithStatusCode(_0x9c5a71,null))[_0xe3d0('0x52')](handleError(_0x9c5a71,null));};exports[_0xe3d0('0x12f')]=function(_0x218fb1,_0x4ba8d){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x218fb1[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x4ba8d,null))['then'](function(_0xeac483){if(_0xeac483){return _0xeac483[_0xe3d0('0x12f')](_0x218fb1[_0xe3d0('0x59')][_0xe3d0('0x5d')],_['omit'](_0x218fb1[_0xe3d0('0x59')],[_0xe3d0('0x5d'),'id'])||{})[_0xe3d0('0x11e')](function(){for(var _0x2dbb97=0x0;_0x2dbb97<_0x218fb1['body'][_0xe3d0('0x5d')][_0xe3d0('0x4b')];_0x2dbb97+=0x1){socket[_0xe3d0('0xaa')]('user_has_whatsapp_interactions:save',{'WhatsappInteractionId':Number(_0x218fb1[_0xe3d0('0x59')][_0xe3d0('0x5d')][_0x2dbb97]),'UserId':Number(_0x218fb1[_0xe3d0('0x54')]['id'])});}return _0x218fb1[_0xe3d0('0x59')][_0xe3d0('0x5d')];});}})[_0xe3d0('0x1e')](respondWithResult(_0x4ba8d,null))[_0xe3d0('0x52')](handleError(_0x4ba8d,null));};exports[_0xe3d0('0x130')]=function(_0x16fb42,_0xbf61c2){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x16fb42[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0xbf61c2,null))['then'](function(_0x19a4d8){if(_0x19a4d8){return _0x19a4d8[_0xe3d0('0x130')](_0x16fb42[_0xe3d0('0x42')][_0xe3d0('0x5d')]);}})[_0xe3d0('0x1e')](respondWithStatusCode(_0xbf61c2,null))[_0xe3d0('0x52')](handleError(_0xbf61c2,null));};exports[_0xe3d0('0x131')]=function(_0x540206,_0x5b5636){var _0x57c208={};var _0x666eb3={};var _0x386589;var _0x105730;return db[_0xe3d0('0x34')][_0xe3d0('0xcb')]({'where':{'id':_0x540206[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x5b5636,null))[_0xe3d0('0x1e')](function(_0x25e776){if(_0x25e776){_0x386589=_0x25e776;_0x666eb3[_0xe3d0('0xcc')]=_[_0xe3d0('0xce')](db[_0xe3d0('0x132')][_0xe3d0('0x35')]);_0x666eb3[_0xe3d0('0x42')]=_['keys'](_0x540206[_0xe3d0('0x42')]);_0x666eb3['filters']=_['intersection'](_0x666eb3[_0xe3d0('0xcc')],_0x666eb3[_0xe3d0('0x42')]);_0x57c208['attributes']=_[_0xe3d0('0xd0')](_0x666eb3[_0xe3d0('0xcc')],qs[_0xe3d0('0xd1')](_0x540206['query'][_0xe3d0('0xd1')]));_0x57c208[_0xe3d0('0x46')]=_0x57c208['attributes']['length']?_0x57c208[_0xe3d0('0x46')]:_0x666eb3[_0xe3d0('0xcc')];_0x57c208['order']=qs[_0xe3d0('0xd3')](_0x540206[_0xe3d0('0x42')]['sort']);_0x57c208['where']=qs[_0xe3d0('0xcf')](_[_0xe3d0('0xd4')](_0x540206[_0xe3d0('0x42')],_0x666eb3['filters']));if(_0x540206[_0xe3d0('0x42')][_0xe3d0('0x28')]){_0x57c208[_0xe3d0('0x41')]=_[_0xe3d0('0x56')](_0x57c208[_0xe3d0('0x41')],{'$or':_['map'](_0x57c208[_0xe3d0('0x46')],function(_0x29d449){var _0xc7e7c2={};_0xc7e7c2[_0x29d449]={'$like':'%'+_0x540206[_0xe3d0('0x42')]['filter']+'%'};return _0xc7e7c2;})});}_0x57c208=_[_0xe3d0('0x56')]({},_0x57c208,_0x540206[_0xe3d0('0xd8')]);return _0x386589['getVoicePrefixes'](_0x57c208);}})[_0xe3d0('0x1e')](function(_0x41f87a){if(_0x41f87a){_0x105730=_0x41f87a['length'];if(!_0x540206['query'][_0xe3d0('0xc3')](_0xe3d0('0xd6'))){_0x57c208[_0xe3d0('0x19')]=qs[_0xe3d0('0x19')](_0x540206[_0xe3d0('0x42')][_0xe3d0('0x19')]);_0x57c208['offset']=qs['offset'](_0x540206[_0xe3d0('0x42')][_0xe3d0('0x1c')]);}return _0x386589[_0xe3d0('0x131')](_0x57c208);}})[_0xe3d0('0x1e')](function(_0x5ae430){if(_0x5ae430){return _0x5ae430?{'count':_0x105730,'rows':_0x5ae430}:null;}})[_0xe3d0('0x1e')](respondWithResult(_0x5b5636,null))[_0xe3d0('0x52')](handleError(_0x5b5636,null));};exports['getFaxAccounts']=function(_0x3bfcd0,_0x54e4d){var _0x38f68d={};var _0x376b5a={};var _0x20281d;var _0x26ac24;return db[_0xe3d0('0x34')][_0xe3d0('0xcb')]({'where':{'id':_0x3bfcd0[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x54e4d,null))[_0xe3d0('0x1e')](function(_0x4f3973){if(_0x4f3973){_0x20281d=_0x4f3973;_0x376b5a[_0xe3d0('0xcc')]=_[_0xe3d0('0xce')](db[_0xe3d0('0x133')][_0xe3d0('0x35')]);_0x376b5a['query']=_[_0xe3d0('0xce')](_0x3bfcd0[_0xe3d0('0x42')]);_0x376b5a[_0xe3d0('0xcf')]=_[_0xe3d0('0xd0')](_0x376b5a['model'],_0x376b5a[_0xe3d0('0x42')]);_0x38f68d['attributes']=_[_0xe3d0('0xd0')](_0x376b5a[_0xe3d0('0xcc')],qs[_0xe3d0('0xd1')](_0x3bfcd0['query'][_0xe3d0('0xd1')]));_0x38f68d[_0xe3d0('0x46')]=_0x38f68d['attributes'][_0xe3d0('0x4b')]?_0x38f68d[_0xe3d0('0x46')]:_0x376b5a[_0xe3d0('0xcc')];_0x38f68d['order']=qs[_0xe3d0('0xd3')](_0x3bfcd0[_0xe3d0('0x42')][_0xe3d0('0xd3')]);_0x38f68d['where']=qs[_0xe3d0('0xcf')](_[_0xe3d0('0xd4')](_0x3bfcd0[_0xe3d0('0x42')],_0x376b5a['filters']));if(_0x3bfcd0[_0xe3d0('0x42')]['filter']){_0x38f68d[_0xe3d0('0x41')]=_['merge'](_0x38f68d[_0xe3d0('0x41')],{'$or':_[_0xe3d0('0x2a')](_0x38f68d[_0xe3d0('0x46')],function(_0x25c1e1){var _0xe66794={};_0xe66794[_0x25c1e1]={'$like':'%'+_0x3bfcd0[_0xe3d0('0x42')][_0xe3d0('0x28')]+'%'};return _0xe66794;})});}_0x38f68d=_[_0xe3d0('0x56')]({},_0x38f68d,_0x3bfcd0[_0xe3d0('0xd8')]);return _0x20281d[_0xe3d0('0x134')](_0x38f68d);}})[_0xe3d0('0x1e')](function(_0x5d9bdd){if(_0x5d9bdd){_0x26ac24=_0x5d9bdd[_0xe3d0('0x4b')];if(!_0x3bfcd0[_0xe3d0('0x42')]['hasOwnProperty'](_0xe3d0('0xd6'))){_0x38f68d['limit']=qs[_0xe3d0('0x19')](_0x3bfcd0['query'][_0xe3d0('0x19')]);_0x38f68d[_0xe3d0('0x1c')]=qs[_0xe3d0('0x1c')](_0x3bfcd0['query'][_0xe3d0('0x1c')]);}return _0x20281d[_0xe3d0('0x134')](_0x38f68d);}})['then'](function(_0x2f9326){if(_0x2f9326){return _0x2f9326?{'count':_0x26ac24,'rows':_0x2f9326}:null;}})[_0xe3d0('0x1e')](respondWithResult(_0x54e4d,null))[_0xe3d0('0x52')](handleError(_0x54e4d,null));};exports[_0xe3d0('0x135')]=function(_0x4b7251,_0x3d77c7){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x4b7251[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x3d77c7,null))['then'](function(_0x5b9f7e){if(_0x5b9f7e){return _0x5b9f7e[_0xe3d0('0x135')](_0x4b7251[_0xe3d0('0x59')]['ids'],_[_0xe3d0('0x5c')](_0x4b7251[_0xe3d0('0x59')],[_0xe3d0('0x5d'),'id'])||{});}})[_0xe3d0('0x1e')](respondWithResult(_0x3d77c7,null))[_0xe3d0('0x52')](handleError(_0x3d77c7,null));};exports[_0xe3d0('0x136')]=function(_0x443494,_0x876d60){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x443494[_0xe3d0('0x54')]['id']}})['then'](handleEntityNotFound(_0x876d60,null))['then'](function(_0x46a9dd){if(_0x46a9dd){return _0x46a9dd[_0xe3d0('0x136')](_0x443494[_0xe3d0('0x42')][_0xe3d0('0x5d')]);}})[_0xe3d0('0x1e')](respondWithStatusCode(_0x876d60,null))[_0xe3d0('0x52')](handleError(_0x876d60,null));};exports['getMailAccounts']=function(_0x1c8c7f,_0x2bdfb4){var _0x9823c2={};var _0x318400={};var _0x5e4a86;var _0x2b2f4b;return db[_0xe3d0('0x34')][_0xe3d0('0xcb')]({'where':{'id':_0x1c8c7f[_0xe3d0('0x54')]['id']}})['then'](handleEntityNotFound(_0x2bdfb4,null))[_0xe3d0('0x1e')](function(_0x1c35b8){if(_0x1c35b8){_0x5e4a86=_0x1c35b8;_0x318400[_0xe3d0('0xcc')]=_[_0xe3d0('0xce')](db[_0xe3d0('0x137')][_0xe3d0('0x35')]);_0x318400['query']=_['keys'](_0x1c8c7f[_0xe3d0('0x42')]);_0x318400[_0xe3d0('0xcf')]=_[_0xe3d0('0xd0')](_0x318400[_0xe3d0('0xcc')],_0x318400[_0xe3d0('0x42')]);_0x9823c2[_0xe3d0('0x46')]=_['intersection'](_0x318400[_0xe3d0('0xcc')],qs[_0xe3d0('0xd1')](_0x1c8c7f['query'][_0xe3d0('0xd1')]));_0x9823c2[_0xe3d0('0x46')]=_0x9823c2[_0xe3d0('0x46')][_0xe3d0('0x4b')]?_0x9823c2[_0xe3d0('0x46')]:_0x318400[_0xe3d0('0xcc')];_0x9823c2[_0xe3d0('0xd2')]=qs['sort'](_0x1c8c7f[_0xe3d0('0x42')][_0xe3d0('0xd3')]);_0x9823c2[_0xe3d0('0x41')]=qs[_0xe3d0('0xcf')](_[_0xe3d0('0xd4')](_0x1c8c7f[_0xe3d0('0x42')],_0x318400[_0xe3d0('0xcf')]));if(_0x1c8c7f['query'][_0xe3d0('0x28')]){_0x9823c2['where']=_[_0xe3d0('0x56')](_0x9823c2[_0xe3d0('0x41')],{'$or':_['map'](_0x9823c2[_0xe3d0('0x46')],function(_0xd521fd){var _0x4994bf={};_0x4994bf[_0xd521fd]={'$like':'%'+_0x1c8c7f[_0xe3d0('0x42')]['filter']+'%'};return _0x4994bf;})});}_0x9823c2=_[_0xe3d0('0x56')]({},_0x9823c2,_0x1c8c7f['options']);return _0x5e4a86[_0xe3d0('0x138')](_0x9823c2);}})[_0xe3d0('0x1e')](function(_0x2aecac){if(_0x2aecac){_0x2b2f4b=_0x2aecac['length'];if(!_0x1c8c7f[_0xe3d0('0x42')]['hasOwnProperty'](_0xe3d0('0xd6'))){_0x9823c2['limit']=qs['limit'](_0x1c8c7f[_0xe3d0('0x42')][_0xe3d0('0x19')]);_0x9823c2[_0xe3d0('0x1c')]=qs['offset'](_0x1c8c7f[_0xe3d0('0x42')][_0xe3d0('0x1c')]);}return _0x5e4a86['getMailAccounts'](_0x9823c2);}})[_0xe3d0('0x1e')](function(_0x2ba535){if(_0x2ba535){return _0x2ba535?{'count':_0x2b2f4b,'rows':_0x2ba535}:null;}})[_0xe3d0('0x1e')](respondWithResult(_0x2bdfb4,null))['catch'](handleError(_0x2bdfb4,null));};exports[_0xe3d0('0x139')]=function(_0xfa718b,_0x610f17){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0xfa718b[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x610f17,null))[_0xe3d0('0x1e')](function(_0x31a144){if(_0x31a144){return _0x31a144['addMailAccounts'](_0xfa718b[_0xe3d0('0x59')][_0xe3d0('0x5d')],_[_0xe3d0('0x5c')](_0xfa718b['body'],[_0xe3d0('0x5d'),'id'])||{});}})[_0xe3d0('0x1e')](respondWithResult(_0x610f17,null))[_0xe3d0('0x52')](handleError(_0x610f17,null));};exports[_0xe3d0('0x13a')]=function(_0x4ee6bf,_0x3f227d){return db[_0xe3d0('0x34')]['find']({'where':{'id':_0x4ee6bf['params']['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x3f227d,null))[_0xe3d0('0x1e')](function(_0x4a7d15){if(_0x4a7d15){return _0x4a7d15[_0xe3d0('0x13a')](_0x4ee6bf[_0xe3d0('0x42')][_0xe3d0('0x5d')]);}})[_0xe3d0('0x1e')](respondWithStatusCode(_0x3f227d,null))[_0xe3d0('0x52')](handleError(_0x3f227d,null));};exports[_0xe3d0('0x13b')]=function(_0x222092,_0x2eb7ab){var _0x5a4893={};var _0x548897={};var _0x46a6c9;var _0x44e126;return db[_0xe3d0('0x34')][_0xe3d0('0xcb')]({'where':{'id':_0x222092['params']['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x2eb7ab,null))['then'](function(_0x9d1e5b){if(_0x9d1e5b){_0x46a6c9=_0x9d1e5b;_0x548897[_0xe3d0('0xcc')]=_['keys'](db[_0xe3d0('0x13c')]['rawAttributes']);_0x548897['query']=_[_0xe3d0('0xce')](_0x222092['query']);_0x548897[_0xe3d0('0xcf')]=_[_0xe3d0('0xd0')](_0x548897['model'],_0x548897[_0xe3d0('0x42')]);_0x5a4893[_0xe3d0('0x46')]=_[_0xe3d0('0xd0')](_0x548897['model'],qs[_0xe3d0('0xd1')](_0x222092['query'][_0xe3d0('0xd1')]));_0x5a4893[_0xe3d0('0x46')]=_0x5a4893[_0xe3d0('0x46')][_0xe3d0('0x4b')]?_0x5a4893[_0xe3d0('0x46')]:_0x548897[_0xe3d0('0xcc')];_0x5a4893[_0xe3d0('0xd2')]=qs[_0xe3d0('0xd3')](_0x222092['query'][_0xe3d0('0xd3')]);_0x5a4893['where']=qs[_0xe3d0('0xcf')](_[_0xe3d0('0xd4')](_0x222092[_0xe3d0('0x42')],_0x548897['filters']));if(_0x222092[_0xe3d0('0x42')][_0xe3d0('0x28')]){_0x5a4893[_0xe3d0('0x41')]=_[_0xe3d0('0x56')](_0x5a4893['where'],{'$or':_[_0xe3d0('0x2a')](_0x5a4893[_0xe3d0('0x46')],function(_0x2f2301){var _0x16128a={};_0x16128a[_0x2f2301]={'$like':'%'+_0x222092[_0xe3d0('0x42')]['filter']+'%'};return _0x16128a;})});}_0x5a4893=_[_0xe3d0('0x56')]({},_0x5a4893,_0x222092['options']);return _0x46a6c9[_0xe3d0('0x13b')](_0x5a4893);}})[_0xe3d0('0x1e')](function(_0x5868c4){if(_0x5868c4){_0x44e126=_0x5868c4[_0xe3d0('0x4b')];if(!_0x222092[_0xe3d0('0x42')][_0xe3d0('0xc3')](_0xe3d0('0xd6'))){_0x5a4893['limit']=qs[_0xe3d0('0x19')](_0x222092['query'][_0xe3d0('0x19')]);_0x5a4893[_0xe3d0('0x1c')]=qs[_0xe3d0('0x1c')](_0x222092[_0xe3d0('0x42')][_0xe3d0('0x1c')]);}return _0x46a6c9[_0xe3d0('0x13b')](_0x5a4893);}})[_0xe3d0('0x1e')](function(_0x460f2a){if(_0x460f2a){return _0x460f2a?{'count':_0x44e126,'rows':_0x460f2a}:null;}})['then'](respondWithResult(_0x2eb7ab,null))[_0xe3d0('0x52')](handleError(_0x2eb7ab,null));};exports[_0xe3d0('0x13d')]=function(_0x563346,_0x11d959){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x563346[_0xe3d0('0x54')]['id']}})['then'](handleEntityNotFound(_0x11d959,null))[_0xe3d0('0x1e')](function(_0x45e8be){if(_0x45e8be){return _0x45e8be['addOpenchannelAccounts'](_0x563346[_0xe3d0('0x59')][_0xe3d0('0x5d')],_[_0xe3d0('0x5c')](_0x563346[_0xe3d0('0x59')],[_0xe3d0('0x5d'),'id'])||{});}})[_0xe3d0('0x1e')](respondWithResult(_0x11d959,null))[_0xe3d0('0x52')](handleError(_0x11d959,null));};exports['removeOpenchannelAccounts']=function(_0xbda47,_0x29cfe4){return db['User'][_0xe3d0('0x2d')]({'where':{'id':_0xbda47[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x29cfe4,null))['then'](function(_0x30352f){if(_0x30352f){return _0x30352f['removeOpenchannelAccounts'](_0xbda47['query'][_0xe3d0('0x5d')]);}})[_0xe3d0('0x1e')](respondWithStatusCode(_0x29cfe4,null))['catch'](handleError(_0x29cfe4,null));};exports[_0xe3d0('0x13e')]=function(_0x428396,_0x356320){var _0x34f721={};var _0x3fe54c={};var _0x1f1280;var _0x15684f;return db[_0xe3d0('0x34')][_0xe3d0('0xcb')]({'where':{'id':_0x428396['params']['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x356320,null))[_0xe3d0('0x1e')](function(_0x520359){if(_0x520359){_0x1f1280=_0x520359;_0x3fe54c[_0xe3d0('0xcc')]=_[_0xe3d0('0xce')](db['SmsAccount'][_0xe3d0('0x35')]);_0x3fe54c[_0xe3d0('0x42')]=_[_0xe3d0('0xce')](_0x428396[_0xe3d0('0x42')]);_0x3fe54c[_0xe3d0('0xcf')]=_[_0xe3d0('0xd0')](_0x3fe54c[_0xe3d0('0xcc')],_0x3fe54c['query']);_0x34f721[_0xe3d0('0x46')]=_[_0xe3d0('0xd0')](_0x3fe54c[_0xe3d0('0xcc')],qs[_0xe3d0('0xd1')](_0x428396[_0xe3d0('0x42')][_0xe3d0('0xd1')]));_0x34f721[_0xe3d0('0x46')]=_0x34f721[_0xe3d0('0x46')][_0xe3d0('0x4b')]?_0x34f721['attributes']:_0x3fe54c['model'];_0x34f721[_0xe3d0('0xd2')]=qs[_0xe3d0('0xd3')](_0x428396[_0xe3d0('0x42')][_0xe3d0('0xd3')]);_0x34f721[_0xe3d0('0x41')]=qs[_0xe3d0('0xcf')](_[_0xe3d0('0xd4')](_0x428396[_0xe3d0('0x42')],_0x3fe54c[_0xe3d0('0xcf')]));if(_0x428396[_0xe3d0('0x42')][_0xe3d0('0x28')]){_0x34f721[_0xe3d0('0x41')]=_['merge'](_0x34f721['where'],{'$or':_[_0xe3d0('0x2a')](_0x34f721['attributes'],function(_0x1d1efd){var _0x1e4434={};_0x1e4434[_0x1d1efd]={'$like':'%'+_0x428396[_0xe3d0('0x42')][_0xe3d0('0x28')]+'%'};return _0x1e4434;})});}_0x34f721=_[_0xe3d0('0x56')]({},_0x34f721,_0x428396[_0xe3d0('0xd8')]);return _0x1f1280[_0xe3d0('0x13e')](_0x34f721);}})['then'](function(_0x4d486d){if(_0x4d486d){_0x15684f=_0x4d486d['length'];if(!_0x428396['query'][_0xe3d0('0xc3')](_0xe3d0('0xd6'))){_0x34f721[_0xe3d0('0x19')]=qs[_0xe3d0('0x19')](_0x428396[_0xe3d0('0x42')][_0xe3d0('0x19')]);_0x34f721[_0xe3d0('0x1c')]=qs['offset'](_0x428396[_0xe3d0('0x42')][_0xe3d0('0x1c')]);}return _0x1f1280[_0xe3d0('0x13e')](_0x34f721);}})['then'](function(_0x1a4624){if(_0x1a4624){return _0x1a4624?{'count':_0x15684f,'rows':_0x1a4624}:null;}})['then'](respondWithResult(_0x356320,null))[_0xe3d0('0x52')](handleError(_0x356320,null));};exports[_0xe3d0('0x13f')]=function(_0x317e2f,_0x3ff616){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x317e2f[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x3ff616,null))[_0xe3d0('0x1e')](function(_0x19c6ef){if(_0x19c6ef){return _0x19c6ef[_0xe3d0('0x13f')](_0x317e2f['body'][_0xe3d0('0x5d')],_['omit'](_0x317e2f['body'],[_0xe3d0('0x5d'),'id'])||{});}})[_0xe3d0('0x1e')](respondWithResult(_0x3ff616,null))[_0xe3d0('0x52')](handleError(_0x3ff616,null));};exports[_0xe3d0('0x140')]=function(_0x4725a1,_0x5eb39f){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x4725a1[_0xe3d0('0x54')]['id']}})['then'](handleEntityNotFound(_0x5eb39f,null))[_0xe3d0('0x1e')](function(_0x1c25d5){if(_0x1c25d5){return _0x1c25d5[_0xe3d0('0x140')](_0x4725a1[_0xe3d0('0x42')][_0xe3d0('0x5d')]);}})[_0xe3d0('0x1e')](respondWithStatusCode(_0x5eb39f,null))[_0xe3d0('0x52')](handleError(_0x5eb39f,null));};exports[_0xe3d0('0x141')]=function(_0x161071,_0x24bc59){var _0x52ba71={};var _0x4d110e={};var _0x547f10;var _0x111f6f;return db[_0xe3d0('0x34')][_0xe3d0('0xcb')]({'where':{'id':_0x161071[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x24bc59,null))['then'](function(_0xc8c855){if(_0xc8c855){_0x547f10=_0xc8c855;_0x4d110e[_0xe3d0('0xcc')]=_[_0xe3d0('0xce')](db[_0xe3d0('0x142')][_0xe3d0('0x35')]);_0x4d110e['query']=_[_0xe3d0('0xce')](_0x161071[_0xe3d0('0x42')]);_0x4d110e['filters']=_[_0xe3d0('0xd0')](_0x4d110e[_0xe3d0('0xcc')],_0x4d110e[_0xe3d0('0x42')]);_0x52ba71[_0xe3d0('0x46')]=_[_0xe3d0('0xd0')](_0x4d110e[_0xe3d0('0xcc')],qs[_0xe3d0('0xd1')](_0x161071[_0xe3d0('0x42')]['fields']));_0x52ba71['attributes']=_0x52ba71[_0xe3d0('0x46')][_0xe3d0('0x4b')]?_0x52ba71['attributes']:_0x4d110e['model'];_0x52ba71[_0xe3d0('0xd2')]=qs['sort'](_0x161071[_0xe3d0('0x42')][_0xe3d0('0xd3')]);_0x52ba71[_0xe3d0('0x41')]=qs['filters'](_[_0xe3d0('0xd4')](_0x161071['query'],_0x4d110e[_0xe3d0('0xcf')]));if(_0x161071['query'][_0xe3d0('0x28')]){_0x52ba71[_0xe3d0('0x41')]=_[_0xe3d0('0x56')](_0x52ba71['where'],{'$or':_['map'](_0x52ba71[_0xe3d0('0x46')],function(_0x3bfe5a){var _0x358ef1={};_0x358ef1[_0x3bfe5a]={'$like':'%'+_0x161071[_0xe3d0('0x42')][_0xe3d0('0x28')]+'%'};return _0x358ef1;})});}_0x52ba71=_[_0xe3d0('0x56')]({},_0x52ba71,_0x161071[_0xe3d0('0xd8')]);return _0x547f10[_0xe3d0('0x141')](_0x52ba71);}})[_0xe3d0('0x1e')](function(_0x558102){if(_0x558102){_0x111f6f=_0x558102[_0xe3d0('0x4b')];if(!_0x161071[_0xe3d0('0x42')][_0xe3d0('0xc3')](_0xe3d0('0xd6'))){_0x52ba71['limit']=qs['limit'](_0x161071['query'][_0xe3d0('0x19')]);_0x52ba71[_0xe3d0('0x1c')]=qs[_0xe3d0('0x1c')](_0x161071[_0xe3d0('0x42')][_0xe3d0('0x1c')]);}return _0x547f10[_0xe3d0('0x141')](_0x52ba71);}})[_0xe3d0('0x1e')](function(_0x4c1653){if(_0x4c1653){return _0x4c1653?{'count':_0x111f6f,'rows':_0x4c1653}:null;}})[_0xe3d0('0x1e')](respondWithResult(_0x24bc59,null))[_0xe3d0('0x52')](handleError(_0x24bc59,null));};exports[_0xe3d0('0x143')]=function(_0x44be28,_0x1a9d06){return db[_0xe3d0('0x34')]['find']({'where':{'id':_0x44be28[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x1a9d06,null))[_0xe3d0('0x1e')](function(_0x2d3298){if(_0x2d3298){return _0x2d3298['addChatWebsites'](_0x44be28['body'][_0xe3d0('0x5d')],_[_0xe3d0('0x5c')](_0x44be28['body'],[_0xe3d0('0x5d'),'id'])||{});}})['then'](respondWithResult(_0x1a9d06,null))[_0xe3d0('0x52')](handleError(_0x1a9d06,null));};exports[_0xe3d0('0x144')]=function(_0x3e6968,_0x11d4ff){return db[_0xe3d0('0x34')]['find']({'where':{'id':_0x3e6968['params']['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x11d4ff,null))[_0xe3d0('0x1e')](function(_0x526c6b){if(_0x526c6b){return _0x526c6b[_0xe3d0('0x144')](_0x3e6968[_0xe3d0('0x42')][_0xe3d0('0x5d')]);}})[_0xe3d0('0x1e')](respondWithStatusCode(_0x11d4ff,null))[_0xe3d0('0x52')](handleError(_0x11d4ff,null));};exports['getWhatsappAccounts']=function(_0x20ac10,_0x3903c5){var _0x214b9e={};var _0x56ec5f={};var _0x410724;var _0x3ab0e4;return db[_0xe3d0('0x34')]['findOne']({'where':{'id':_0x20ac10[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x3903c5,null))[_0xe3d0('0x1e')](function(_0x22ec4){if(_0x22ec4){_0x410724=_0x22ec4;_0x56ec5f[_0xe3d0('0xcc')]=_[_0xe3d0('0xce')](db[_0xe3d0('0x145')][_0xe3d0('0x35')]);_0x56ec5f[_0xe3d0('0x42')]=_[_0xe3d0('0xce')](_0x20ac10[_0xe3d0('0x42')]);_0x56ec5f[_0xe3d0('0xcf')]=_['intersection'](_0x56ec5f[_0xe3d0('0xcc')],_0x56ec5f['query']);_0x214b9e[_0xe3d0('0x46')]=_['intersection'](_0x56ec5f['model'],qs[_0xe3d0('0xd1')](_0x20ac10[_0xe3d0('0x42')][_0xe3d0('0xd1')]));_0x214b9e[_0xe3d0('0x46')]=_0x214b9e['attributes']['length']?_0x214b9e[_0xe3d0('0x46')]:_0x56ec5f[_0xe3d0('0xcc')];_0x214b9e[_0xe3d0('0xd2')]=qs[_0xe3d0('0xd3')](_0x20ac10[_0xe3d0('0x42')]['sort']);_0x214b9e[_0xe3d0('0x41')]=qs[_0xe3d0('0xcf')](_[_0xe3d0('0xd4')](_0x20ac10['query'],_0x56ec5f['filters']));if(_0x20ac10[_0xe3d0('0x42')]['filter']){_0x214b9e[_0xe3d0('0x41')]=_['merge'](_0x214b9e[_0xe3d0('0x41')],{'$or':_['map'](_0x214b9e['attributes'],function(_0x3e41ad){var _0x4c7d83={};_0x4c7d83[_0x3e41ad]={'$like':'%'+_0x20ac10[_0xe3d0('0x42')][_0xe3d0('0x28')]+'%'};return _0x4c7d83;})});}_0x214b9e=_[_0xe3d0('0x56')]({},_0x214b9e,_0x20ac10['options']);return _0x410724['getWhatsappAccounts'](_0x214b9e);}})[_0xe3d0('0x1e')](function(_0x210b51){if(_0x210b51){_0x3ab0e4=_0x210b51[_0xe3d0('0x4b')];if(!_0x20ac10[_0xe3d0('0x42')]['hasOwnProperty'](_0xe3d0('0xd6'))){_0x214b9e[_0xe3d0('0x19')]=qs[_0xe3d0('0x19')](_0x20ac10['query']['limit']);_0x214b9e[_0xe3d0('0x1c')]=qs[_0xe3d0('0x1c')](_0x20ac10['query'][_0xe3d0('0x1c')]);}return _0x410724[_0xe3d0('0x146')](_0x214b9e);}})[_0xe3d0('0x1e')](function(_0xb16a33){if(_0xb16a33){return _0xb16a33?{'count':_0x3ab0e4,'rows':_0xb16a33}:null;}})['then'](respondWithResult(_0x3903c5,null))['catch'](handleError(_0x3903c5,null));};exports[_0xe3d0('0x147')]=function(_0x3ed651,_0x18cd5e){return db[_0xe3d0('0x34')]['find']({'where':{'id':_0x3ed651[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x18cd5e,null))[_0xe3d0('0x1e')](function(_0x3efe1a){if(_0x3efe1a){return _0x3efe1a[_0xe3d0('0x147')](_0x3ed651['body'][_0xe3d0('0x5d')],_[_0xe3d0('0x5c')](_0x3ed651[_0xe3d0('0x59')],['ids','id'])||{});}})[_0xe3d0('0x1e')](respondWithResult(_0x18cd5e,null))[_0xe3d0('0x52')](handleError(_0x18cd5e,null));};exports['removeWhatsappAccounts']=function(_0x23dcca,_0x44b64c){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x23dcca['params']['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0x44b64c,null))[_0xe3d0('0x1e')](function(_0x14f4b7){if(_0x14f4b7){return _0x14f4b7[_0xe3d0('0x148')](_0x23dcca[_0xe3d0('0x42')][_0xe3d0('0x5d')]);}})['then'](respondWithStatusCode(_0x44b64c,null))[_0xe3d0('0x52')](handleError(_0x44b64c,null));};exports['getScheduledCalls']=function(_0x809be6,_0x4bdfa3){var _0x3d03b1={},_0x515f84={},_0x2b86c0={'count':0x0,'rows':[]};var _0x3bbb18=db['CmHopper'][_0xe3d0('0x35')];_0x515f84['model']=_[_0xe3d0('0xce')](_0x3bbb18);_0x515f84[_0xe3d0('0x42')]=_[_0xe3d0('0xce')](_0x809be6['query']);_0x515f84[_0xe3d0('0xcf')]=_[_0xe3d0('0xd0')](_0x515f84[_0xe3d0('0xcc')],_0x515f84[_0xe3d0('0x42')]);_0x515f84[_0xe3d0('0xcf')]=_[_0xe3d0('0xc2')](_0x515f84[_0xe3d0('0xcf')],['$and',_0xe3d0('0x149'),_0xe3d0('0x14a'),_0xe3d0('0x14b'),_0xe3d0('0x14c'),_0xe3d0('0x14d'),_0xe3d0('0x14e'),_0xe3d0('0x14f'),_0xe3d0('0x150'),_0xe3d0('0x151'),_0xe3d0('0x152'),_0xe3d0('0x153'),_0xe3d0('0x154'),_0xe3d0('0x155'),'$notLike',_0xe3d0('0x156'),_0xe3d0('0x157'),'$like',_0xe3d0('0x158'),'$contains',_0xe3d0('0x159'),_0xe3d0('0x15a')]);_0x3d03b1[_0xe3d0('0x46')]=_[_0xe3d0('0xd0')](_0x515f84[_0xe3d0('0xcc')],qs[_0xe3d0('0xd1')](_0x809be6[_0xe3d0('0x42')][_0xe3d0('0xd1')]));_0x3d03b1['attributes']=_0x3d03b1['attributes'][_0xe3d0('0x4b')]?_0x3d03b1['attributes']:_0x515f84[_0xe3d0('0xcc')];if(!_0x809be6[_0xe3d0('0x42')][_0xe3d0('0xc3')]('nolimit')){_0x3d03b1['limit']=qs['limit'](_0x809be6[_0xe3d0('0x42')][_0xe3d0('0x19')]);_0x3d03b1[_0xe3d0('0x1c')]=qs[_0xe3d0('0x1c')](_0x809be6['query'][_0xe3d0('0x1c')]);}_0x3d03b1['order']=qs[_0xe3d0('0xd3')](_0x809be6[_0xe3d0('0x42')][_0xe3d0('0xd3')]);_0x3d03b1[_0xe3d0('0x41')]=qs['filters'](_['pick'](_0x809be6[_0xe3d0('0x42')],_0x515f84['filters']));if(_0x809be6[_0xe3d0('0x42')][_0xe3d0('0x28')]){_0x3d03b1[_0xe3d0('0x41')]=_[_0xe3d0('0x56')](_0x3d03b1['where'],{'$or':_[_0xe3d0('0x2a')](_0x3d03b1[_0xe3d0('0x46')],function(_0x42b8d1){var _0x5970e2={};_0x5970e2[_0x42b8d1]={'$like':'%'+_0x809be6[_0xe3d0('0x42')][_0xe3d0('0x28')]+'%'};return _0x5970e2;})});}_0x3d03b1[_0xe3d0('0x41')]={'$and':[_0x3d03b1[_0xe3d0('0x41')],{'$or':[{'UserId':_0x809be6[_0xe3d0('0x54')]['id']},{'OwnerId':_0x809be6[_0xe3d0('0x54')]['id']}]}]};_0x3d03b1=_[_0xe3d0('0x56')]({},_0x3d03b1,_0x809be6[_0xe3d0('0xd8')]);var _0x476e69={'where':_0x3d03b1['where']};return db[_0xe3d0('0x11c')]['count'](_0x476e69)['then'](function(_0x14de24){_0x2b86c0['count']=_0x14de24;if(_0x809be6[_0xe3d0('0x42')][_0xe3d0('0x43')]){_0x3d03b1[_0xe3d0('0x44')]=[{'attributes':['id','firstName',_0xe3d0('0x15b'),_0xe3d0('0xeb')],'model':db[_0xe3d0('0x15c')],'as':'Contact'},{'attributes':['id','name','dialActive'],'model':db[_0xe3d0('0xa0')],'as':_0xe3d0('0xcd')}];}return db[_0xe3d0('0x11c')][_0xe3d0('0x48')](_0x3d03b1);})['then'](function(_0x8e72ec){_0x2b86c0['rows']=_0x8e72ec;return _0x2b86c0;})[_0xe3d0('0x1e')](respondWithFilteredResult(_0x4bdfa3,_0x3d03b1))[_0xe3d0('0x52')](handleError(_0x4bdfa3,null));};exports[_0xe3d0('0x15d')]=function(_0x3cfd78,_0x336139){if(!_[_0xe3d0('0x63')](_0x3cfd78['user']['id'])&&(_0x3cfd78[_0xe3d0('0x7a')][_0xe3d0('0x1f')]==_0xe3d0('0x24')||_0x3cfd78[_0xe3d0('0x7a')]['role']==_0xe3d0('0x7a'))){return db['User']['findOne']({'where':{'id':_0x3cfd78[_0xe3d0('0x54')]['id']},'raw':!![]})[_0xe3d0('0x1e')](function(_0xfa7b9e){return authService['retrieveApiKey'](_0xfa7b9e);})[_0xe3d0('0x1e')](function(_0xa2f573){if(_0xa2f573){return _0x336139[_0xe3d0('0x17')](0xc8)[_0xe3d0('0x18')]({'api_key':_0xa2f573[_0xe3d0('0x15e')]});}else{return _0x336139[_0xe3d0('0x17')](0xcc)[_0xe3d0('0x18')]({'message':_0xe3d0('0x15f')});}})['catch'](handleError(_0x336139,0x193));}else{return _0x336139['status'](0x191)[_0xe3d0('0x18')]({'message':'You\x20don\x27t\x20have\x20sufficient\x20privileges\x20to\x20access\x20this\x20resource.'});}};exports[_0xe3d0('0x160')]=function(_0x431139,_0x22528d){if(!_[_0xe3d0('0x63')](_0x431139[_0xe3d0('0x7a')]['id'])&&(_0x431139[_0xe3d0('0x7a')][_0xe3d0('0x1f')]==_0xe3d0('0x24')||_0x431139[_0xe3d0('0x7a')][_0xe3d0('0x1f')]=='user')){return db['User'][_0xe3d0('0x2d')]({'where':{'id':_0x431139[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](function(_0x651da0){return authService['generateApiKey'](_0x651da0);})[_0xe3d0('0x1e')](function(_0x1f819f){return db[_0xe3d0('0x34')][_0xe3d0('0x1d')]({'apiKeyIat':_0x1f819f['iat'],'apiKeyNonce':_0x1f819f[_0xe3d0('0x161')]},{'where':{'id':_0x431139[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](function(){return _0x22528d[_0xe3d0('0x17')](0xc8)[_0xe3d0('0x18')]({'api_key':_0x1f819f['token']});});})[_0xe3d0('0x52')](handleError(_0x22528d,0x193));}else{return _0x22528d[_0xe3d0('0x17')](0x191)['json']({'message':_0xe3d0('0x162')});}};exports[_0xe3d0('0x163')]=function(_0x1cf90b,_0xcdc41e){if(!_[_0xe3d0('0x63')](_0x1cf90b[_0xe3d0('0x7a')]['id'])&&(_0x1cf90b[_0xe3d0('0x7a')][_0xe3d0('0x1f')]==_0xe3d0('0x24')||_0x1cf90b['user'][_0xe3d0('0x1f')]==_0xe3d0('0x7a'))){return db[_0xe3d0('0x34')][_0xe3d0('0x2d')]({'where':{'id':_0x1cf90b[_0xe3d0('0x54')]['id']}})[_0xe3d0('0x1e')](handleEntityNotFound(_0xcdc41e,null))[_0xe3d0('0x1e')](function(_0x2fb7de){if(_0x2fb7de&&_0x2fb7de[_0xe3d0('0x164')]&&_0x2fb7de[_0xe3d0('0x165')])return _0x2fb7de;else throw{'message':_0xe3d0('0x166')};})[_0xe3d0('0x1e')](function(){return db[_0xe3d0('0x34')][_0xe3d0('0x1d')]({'apiKeyNonce':null,'apiKeyIat':null},{'where':{'id':_0x1cf90b[_0xe3d0('0x54')]['id']}});})[_0xe3d0('0x1e')](respondWithStatusCode(_0xcdc41e,0xc8))['catch'](handleError(_0xcdc41e,0x193));}else{return _0xcdc41e['status'](0x191)['json']({'message':_0xe3d0('0x162')});}};exports[_0xe3d0('0x167')]=function(_0x1ffa20,_0x350209){var _0x191609=_0x1ffa20[_0xe3d0('0x7a')][_0xe3d0('0x23')]({'plain':!![]});if(!_0x191609){return _0x350209[_0xe3d0('0x17')](0x191)[_0xe3d0('0x33')](_0xe3d0('0x168'));}else{Promise[_0xe3d0('0x10d')]()[_0xe3d0('0x1e')](function(){if(_0x1ffa20[_0xe3d0('0x42')][_0xe3d0('0x55')]!==_0xe3d0('0x4a'))return;return _0x1ffa20[_0xe3d0('0x7a')]['getUserSetting']();})['then'](function(_0xb991e6){if(!_0xb991e6)return;return _0xb991e6['get']({'plain':!![]});})[_0xe3d0('0x1e')](function(_0x56cc45){_0x191609[_0xe3d0('0x55')]=_0x56cc45;return _0x350209[_0xe3d0('0x17')](0xc8)[_0xe3d0('0x18')](_0x191609);});}};exports[_0xe3d0('0x169')]=function(_0x5f546b,_0x53519e){var _0x3a1b4b={'offset':0x0};var _0x3a731c={'count':0x0,'rows':[]};var _0x4000e6=['idle','unknown',_0xe3d0('0x16a')];var _0xc76fea=[];var _0x26db8c=[];var _0x493fc6=[];var _0x2e6cfd=_0x5f546b[_0xe3d0('0x42')]['teams'];var _0x1cfe29=_0x5f546b[_0xe3d0('0x42')]['queues'];var _0x587712=_0x5f546b[_0xe3d0('0x42')][_0xe3d0('0x28')];return Promise['resolve']()[_0xe3d0('0x1e')](function(){if(!_0x2e6cfd){return[];}return db['Team'][_0xe3d0('0x48')]({'attributes':['id',_0xe3d0('0x2e')],'where':{'id':_0x2e6cfd}});})[_0xe3d0('0x1e')](function(_0x5265f6){_0x493fc6=_0x5265f6;if(!_0x1cfe29){return[];}return db['VoiceQueue']['findAll']({'attributes':['id',_0xe3d0('0x2e')],'type':_0xe3d0('0x16b'),'where':{'id':_0x1cfe29}});})[_0xe3d0('0x1e')](function(_0x10ee83){_0x26db8c=_0x10ee83;var _0x198897=_0x493fc6['concat'](_0x26db8c)[_0xe3d0('0x2a')](function(_0x44196c){return _0x44196c[_0xe3d0('0x11a')]({'attributes':['id',_0xe3d0('0x2e'),'internal','online'],'raw':!![]});});return Promise[_0xe3d0('0x51')](_0x198897);})[_0xe3d0('0x1e')](function(_0x27421){var _0x3a3bfe=_['flatten'](_0x27421);if(_0x587712){if(_0x1cfe29||_0x2e6cfd){return _0x3a3bfe[_0xe3d0('0x28')](function(_0x4664ac){return _0x4664ac[_0xe3d0('0x2e')][_0xe3d0('0x9c')]()[_0xe3d0('0x2c')](_0x587712['toLowerCase']())||_0x4664ac[_0xe3d0('0x5e')][_0xe3d0('0x16c')]()[_0xe3d0('0x2c')](_0x587712);});}else{return db['User'][_0xe3d0('0x48')]({'attributes':['id',_0xe3d0('0x2e'),_0xe3d0('0x5e'),_0xe3d0('0x97')],'where':{'role':_0xe3d0('0x20'),'$or':[db[_0xe3d0('0x65')][_0xe3d0('0x41')](db[_0xe3d0('0x65')]['fn']('lower',db[_0xe3d0('0x65')]['col'](_0xe3d0('0x2e'))),{'$like':'%'+_0x587712[_0xe3d0('0x9c')]()+'%'}),{'internal':{'$like':'%'+_0x587712+'%'}}]},'raw':!![]});}}else{return _0x3a3bfe;}})[_0xe3d0('0x1e')](function(_0x15b933){var _0x2207e7=_0xe3d0('0x2e');var _0x3b63f1='asc';if(_0x5f546b[_0xe3d0('0x42')][_0xe3d0('0xd3')]){_0x3b63f1=_0x5f546b['query'][_0xe3d0('0xd3')][0x0]==='-'?'desc':_0xe3d0('0x16d');_0x2207e7=_0x3b63f1==='asc'?_0x5f546b[_0xe3d0('0x42')]['sort']:_0x5f546b[_0xe3d0('0x42')][_0xe3d0('0xd3')]['substring'](0x1);}return _(_0x15b933)[_0xe3d0('0x16e')]('id')[_0xe3d0('0x16f')]([function(_0x35c9c5){return _0x2207e7===_0xe3d0('0x2e')?_0x35c9c5[_0x2207e7][_0xe3d0('0x9c')]():_0x35c9c5[_0x2207e7];}],[_0x3b63f1])[_0xe3d0('0x2a')](function(_0x5aa4ff){return _[_0xe3d0('0xd4')](_0x5aa4ff,['id',_0xe3d0('0x2e'),'internal',_0xe3d0('0x97')]);})[_0xe3d0('0x2b')]();})[_0xe3d0('0x1e')](function(_0x541dfa){_0xc76fea=_0x541dfa;return rta[_0xe3d0('0x170')]();})[_0xe3d0('0x1e')](function(_0x42bea2){return _0xc76fea['map'](function(_0x8d4487){var _0x52772d=_[_0xe3d0('0x2d')](_0x42bea2[_0xe3d0('0x49')],['id',_0x8d4487['id']]);if(!_0x52772d||!_0x8d4487[_0xe3d0('0x97')]){_0x8d4487[_0xe3d0('0x17')]=_0xe3d0('0x171');}else if(_0x52772d[_0xe3d0('0x98')]){_0x8d4487['status']=_0xe3d0('0x172');}else if(_0x52772d[_0xe3d0('0x173')]===_0xe3d0('0x174')||!_0x52772d[_0xe3d0('0x173')]){_0x8d4487[_0xe3d0('0x17')]=_0xe3d0('0x174');}else{_0x8d4487['status']=_0x4000e6['includes'](_0x52772d[_0xe3d0('0x173')])?_0xe3d0('0x97'):_0xe3d0('0x175');}return _0x8d4487;});})['then'](function(_0x45f647){if(!_0x5f546b[_0xe3d0('0x42')][_0xe3d0('0xc3')](_0xe3d0('0xd6'))){_0x3a1b4b[_0xe3d0('0x19')]=qs['limit'](_0x5f546b['query'][_0xe3d0('0x19')]||0xa);_0x3a1b4b[_0xe3d0('0x1c')]=qs['offset'](_0x5f546b['query'][_0xe3d0('0x1c')]);}_0x3a731c[_0xe3d0('0x1b')]=_0x45f647[_0xe3d0('0x4b')];_0x3a731c[_0xe3d0('0x49')]=_0x3a1b4b[_0xe3d0('0x19')]?_0x45f647[_0xe3d0('0x176')](_0x3a1b4b[_0xe3d0('0x1c')],_0x3a1b4b['offset']+_0x3a1b4b[_0xe3d0('0x19')]):_0x45f647;return _0x3a731c;})[_0xe3d0('0x1e')](respondWithFilteredResult(_0x53519e,_0x3a1b4b))['catch'](handleError(_0x53519e,null));};function get_open_tabs(_0x3a3f76,_0x423c03){var _0x581fe7=_0x3a3f76[_0xe3d0('0x177')](0x0)[_0xe3d0('0x178')]()+_0x3a3f76[_0xe3d0('0x176')](0x1);var _0x5b174d={'type':db[_0xe3d0('0x8b')][_0xe3d0('0x66')][_0xe3d0('0x179')],'raw':!![]};return new Promise(function(_0x58e8f9,_0x32c84b){var _0x1573fd=squel['select']()[_0xe3d0('0x17a')]('ui.'+_0x581fe7+'InteractionId','id')[_0xe3d0('0x17a')](_0xe3d0('0x17b'))['from'](_0xe3d0('0x17c')+_0x3a3f76+_0xe3d0('0x17d'),'ui')['where'](_0xe3d0('0x17e'),_0x423c03['id']);return db[_0xe3d0('0x65')][_0xe3d0('0x42')](_0x1573fd[_0xe3d0('0x16c')](),_0x5b174d)[_0xe3d0('0x1e')](function(_0x46c89a){_0x423c03[_0x581fe7+_0xe3d0('0x17f')]=_0x46c89a;_0x58e8f9(_0x46c89a);})['catch'](function(_0x4779a5){_0x32c84b(_0x4779a5);});});}exports[_0xe3d0('0x180')]=function(_0x2fa0aa,_0x1b9366){var _0x5d7c0c=_0x2fa0aa[_0xe3d0('0x54')]['id'];var _0x5f3817=_0x2fa0aa[_0xe3d0('0x59')][_0xe3d0('0x181')];return db['User']['update']({'messengerSoundNotification':_0x5f3817},{'where':{'id':_0x5d7c0c}})['then'](respondWithStatusCode(_0x1b9366,null))[_0xe3d0('0x52')](handleError(_0x1b9366,null));};
\ No newline at end of file
+var _0xc27c=['../../config/utils','../../config/license/util','../../errors/api','APINotFoundError','handleError','../../mysqldb','socket.io-emitter','redis','./user.socket','register','defaults','status','json','offset','undefined','limit','count','set','Content-Range','update','role','emit','userNotification:recalc:','destroy','then','get','Users','user','Agents','agent','filter','ignore','map','value','find','name','end','error','stack','rawAttributes','key','password','salt','previousPasswords','resetPasswordExpires','md5secret','includes','index','where','User','query','include','true','userSetting','attributes','findAll','rows','openTabs','length','push','dataValues','fax','mail','whatsapp','all','catch','show','params','getOptions','includeAll','UserSetting','merge','options','sms','openchannel','body','describe','addContacts','ids','omit','Setting','findById','securePassword','validatePasswordPattern','max','internal','min_internal','sequelize','QueryTypes','SELECT','isNil','from','voicemail','mailbox','VoiceMail','fullname','email','permissions','101','102','103','113','110','105','106','108','109','111','114','115','create','admin','Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20another\x20administrator','checkUserLimits','settingsEnabled','UserProfileSection','Telephones','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','Unauthorized','some','Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20administrator','isEmpty','compact','changePassword','oldPassword','Sequelize','ValidationError','Invalid\x20body\x20format.\x20Use\x20oldPassword\x20and\x20newPassword','authenticate','Wrong\x20credentials','newPassword','New\x20password\x20must\x20be\x20different\x20from\x20old\x20password','Invalid\x20body\x20format.\x20Use\x20newPassword','findOne','enforcePasswordHistory','passwordHistoryLimit','validatePasswordHistory','addQueues','channel','online','loginInPause','voicePause','interface','Unknown\x20channel','capitalize','toLowerCase','Queues','penalty','spread','QueueId','Queue:save','voice','VoiceQueue','format','UserVoiceQueueRt','upsert','removeQueues','isValidChannel','Queue:remove','addAvatar','file','filename','getAvatar','server/files/images/logos/default_profile.png','userpic','existsSync','root','server/files/images/','download','join','getOpenTabs','chat','CHAT','FaxOpenTabs','FAX','OpenchannelOpenTabs','OPENCHANNEL','createdAt','MailOpenTabs','SmsOpenTabs','SMS','WhatsappOpenTabs','WHATSAPP','concat','getContacts','User\x20with\x20id\x20%s\x20not\x20found','hasOwnProperty','CmList','List','Tags','color','tag','getQueues','keys','filters','intersection','fields','model','order','sort','pick','Unknown\x20role','nolimit','getVoiceQueuesRt','getGroups','ChatGroup','getRecordings','VoiceRecording','UserId','ScreenRecording','ChatInteraction','getChatInteractions','getOpenchannelInteractions','OpenchannelInteraction','MailInteraction','getFaxInteractions','FaxInteraction','WhatsappInteraction','getWhatsappInteractions','login','LOCAL/%s@from-sip/n','intrf','user:%s','user:forcelogout','headers','x-forwarded-for','connection','remoteAddress','socket','User\x20not\x20found\x20or\x20not\x20allowed\x20to\x20perform\x20login\x20method','getVoiceQueues','UserVoiceQueue.penalty','MemberReport','forEach','YYYY-MM-DD\x20HH:mm:ss','getChannels','device','PAUSE','bulkCreate','isMiddleware','resolve','pause','updateAttributes','SIP/%s','type','DEFAULT\x20PAUSE','Channel\x20parameter\x20%s\x20is\x20invalid','mailPause','chatPause','faxPause','whatsappPause','pauseType','lastPauseAt','unpause','getTeams','Team','addTeams','Body\x20parameter\x20\x27ids\x27\x20is\x20required','transaction','getAssociatedQueues','addAgent','getDataValue','TeamVoicePrefix','removeTeams','isArray','Query\x20parameter\x20\x27ids\x27\x20is\x20required','flattenDeep','UserVoicePrefix','VoicePrefixId','getLists','getAgents','You\x20can\x27t\x20delete\x20yourself','addChatInteractions','user_has_chat_interactions:save','user_has_chat_interactions:remove','addMailInteractions','user_has_mail_interactions:save','removeMailInteractions','user_has_mail_interactions:remove','addFaxInteractions','user_has_fax_interactions:save','removeFaxInteractions','user_has_fax_interactions:remove','addSmsInteractions','user_has_sms_interactions:save','removeSmsInteractions','user_has_sms_interactions:remove','addOpenchannelInteractions','user_has_openchannel_interactions:save','removeOpenchannelInteractions','user_has_openchannel_interactions:remove','addWhatsappInteractions','user_has_whatsapp_interactions:save','removeWhatsappInteractions','getVoicePrefixes','VoicePrefix','getFaxAccounts','FaxAccount','addFaxAccounts','removeFaxAccounts','getMailAccounts','MailAccount','addMailAccounts','removeMailAccounts','getOpenchannelAccounts','OpenchannelAccount','addOpenchannelAccounts','removeOpenchannelAccounts','getSmsAccounts','addSmsAccounts','ChatWebsite','getChatWebsites','addChatWebsites','removeChatWebsites','getWhatsappAccounts','WhatsappAccount','addWhatsappAccounts','removeWhatsappAccounts','getScheduledCalls','CmHopper','$and','$or','$gt','$gte','$lt','$ne','$not','$between','$notBetween','$notIn','$like','$notLike','$iLike','$contains','$contained','firstName','lastName','CmContact','Contact','dialActive','Queue','getApiKey','retrieveApiKey','No\x20API\x20access\x20key\x20found!','You\x20don\x27t\x20have\x20sufficient\x20privileges\x20to\x20access\x20this\x20resource.','createApiKey','generateApiKey','nonce','token','apiKeyNonce','API\x20key\x20not\x20available','whoami','send','Unable\x20to\x20retrieve\x20the\x20current\x20user','getUserSetting','idle','teams','queues','flatten','col','asc','desc','substring','uniqBy','orderBy','getRealtimeAgents','voiceStatus','unavailable','busy','charAt','toUpperCase','slice','select','field','ui.','InteractionId','ui.createdAt','user_has_','ui.UserId\x20=\x20?','toString','OpenTabs','messengerSoundNotification','enabled','moment','util','path','lodash','squel','ioredis','../../components/auth/service','../../components/contacts','api'];(function(_0x4011c5,_0x137d91){var _0x4b1d64=function(_0x254d64){while(--_0x254d64){_0x4011c5['push'](_0x4011c5['shift']());}};_0x4b1d64(++_0x137d91);}(_0xc27c,0x182));var _0xcc27=function(_0xfcbe93,_0x4e9582){_0xfcbe93=_0xfcbe93-0x0;var _0x4b2151=_0xc27c[_0xfcbe93];return _0x4b2151;};'use strict';var moment=require(_0xcc27('0x0'));var util=require(_0xcc27('0x1'));var path=require(_0xcc27('0x2'));var fs=require('fs');var _=require(_0xcc27('0x3'));var squel=require(_0xcc27('0x4'));var Redis=require(_0xcc27('0x5'));var authService=require(_0xcc27('0x6'));var contacts=require(_0xcc27('0x7'));var qs=require('../../components/parsers/qs');var rta=require('../../components/realtime/agents');var logger=require('../../config/logger')(_0xcc27('0x8'));var utils=require(_0xcc27('0x9'));var config=require('../../config/environment');var licenseUtil=require(_0xcc27('0xa'));var APIBadRequestError=require(_0xcc27('0xb'))['APIBadRequestError'];var APINotFoundError=require(_0xcc27('0xb'))[_0xcc27('0xc')];var APIForbiddenError=require(_0xcc27('0xb'))['APIForbiddenrror'];var APIHandleError=require('../../errors/api')[_0xcc27('0xd')];var db=require(_0xcc27('0xe'))['db'];var socket=require(_0xcc27('0xf'))(new Redis(config[_0xcc27('0x10')]));require(_0xcc27('0x11'))[_0xcc27('0x12')](socket);config['redis']=_[_0xcc27('0x13')](config['redis'],{'host':'localhost','port':0x18eb});var values;function respondWithStatusCode(_0x3eda02,_0x317e0a){_0x317e0a=_0x317e0a||0xcc;return function(_0x365525){if(_0x365525){return _0x3eda02['sendStatus'](_0x317e0a);}return _0x3eda02[_0xcc27('0x14')](_0x317e0a)['end']();};}function respondWithResult(_0x366110,_0x2067f1){_0x2067f1=_0x2067f1||0xc8;return function(_0x3867ba){if(_0x3867ba){return _0x366110[_0xcc27('0x14')](_0x2067f1)[_0xcc27('0x15')](_0x3867ba);}};}function respondWithFilteredResult(_0x1b7502,_0x1dac72){return function(_0x2c8a54){if(_0x2c8a54){var _0x28349=typeof _0x1dac72[_0xcc27('0x16')]===_0xcc27('0x17')&&typeof _0x1dac72[_0xcc27('0x18')]===_0xcc27('0x17');var _0x321822=_0x2c8a54[_0xcc27('0x19')];var _0x1ddd98=_0x28349?0x0:_0x1dac72[_0xcc27('0x16')];var _0xed70af=_0x28349?_0x2c8a54[_0xcc27('0x19')]:_0x1dac72[_0xcc27('0x16')]+_0x1dac72['limit'];var _0x3da76b;if(_0xed70af>=_0x321822){_0xed70af=_0x321822;_0x3da76b=0xc8;}else{_0x3da76b=0xce;}_0x1b7502['status'](_0x3da76b);return _0x1b7502[_0xcc27('0x1a')](_0xcc27('0x1b'),_0x1ddd98+'-'+_0xed70af+'/'+_0x321822)['json'](_0x2c8a54);}return null;};}function saveUpdates(_0x4ac9ba){return function(_0x2835e6){if(_0x2835e6){return _0x2835e6[_0xcc27('0x1c')](_0x4ac9ba)['then'](function(_0x30a7ab){if(_0x30a7ab[_0xcc27('0x1d')]==='agent'){socket[_0xcc27('0x1e')](_0xcc27('0x1f')+_0x30a7ab['id'],_0x30a7ab);}return _0x30a7ab;});}return null;};}function removeEntity(_0x4725f8,_0x52913a){return function(_0x163706){if(_0x163706){return _0x163706[_0xcc27('0x20')]({'transaction':_0x52913a})[_0xcc27('0x21')](function(){var _0x4a58d3=_0x163706[_0xcc27('0x22')]({'plain':!![]});if(_0x4a58d3[_0xcc27('0x1d')]==='admin')return;var _0x7ea148=[{'name':_0xcc27('0x23'),'value':_0xcc27('0x24'),'ignore':!![]},{'name':_0xcc27('0x25'),'value':_0xcc27('0x26'),'ignore':![]},{'name':'Telephones','value':'telephone','ignore':![]}];var _0x4abd20=_(_0x7ea148)[_0xcc27('0x27')](_0xcc27('0x28'))[_0xcc27('0x29')](_0xcc27('0x2a'))[_0xcc27('0x2a')]();if(_['includes'](_0x4abd20,_0x4a58d3[_0xcc27('0x1d')])){return;}var _0x1b9198=_[_0xcc27('0x2b')](_0x7ea148,[_0xcc27('0x2a'),_0x4a58d3[_0xcc27('0x1d')]])[_0xcc27('0x2c')];return db['UserProfileResource'][_0xcc27('0x20')]({'where':{'type':_0x1b9198,'resourceId':_0x4a58d3['id']},'transaction':_0x52913a})[_0xcc27('0x21')](function(){return _0x163706;});})[_0xcc27('0x21')](function(){_0x4725f8[_0xcc27('0x14')](0xcc)[_0xcc27('0x2d')]();});}};}function handleEntityNotFound(_0x3b2222){return function(_0x237147){if(!_0x237147){_0x3b2222['sendStatus'](0x194);}return _0x237147;};}function handleError(_0x2ef6d,_0x400727){_0x400727=_0x400727||0x1f4;return function(_0x4aebb0){logger[_0xcc27('0x2e')](_0x4aebb0[_0xcc27('0x2f')]);if(_0x4aebb0[_0xcc27('0x2c')]){delete _0x4aebb0['name'];}_0x2ef6d[_0xcc27('0x14')](_0x400727)['send'](_0x4aebb0);};}function getUserAttributes(){return _(db['User'][_0xcc27('0x30')])[_0xcc27('0x29')](function(_0xbe1a29){return{'name':_0xbe1a29['fieldName'],'type':_0xbe1a29['type'][_0xcc27('0x31')]};})[_0xcc27('0x27')](function(_0x33d73f){return![_0xcc27('0x32'),_0xcc27('0x33'),_0xcc27('0x34'),'resetPasswordToken',_0xcc27('0x35'),_0xcc27('0x36')][_0xcc27('0x37')](_0x33d73f[_0xcc27('0x2c')]);})[_0xcc27('0x2a')]();}exports[_0xcc27('0x38')]=function(_0xec82b7,_0x4f7002){var _0x255de6={},_0x34df03={'count':0x0,'rows':[]};var _0x49f843=getUserAttributes();_0x255de6=qs['getOptions'](_0x49f843,_0xec82b7);var _0xdd71c3={'where':_0x255de6[_0xcc27('0x39')]};return db[_0xcc27('0x3a')][_0xcc27('0x19')](_0xdd71c3)[_0xcc27('0x21')](function(_0x384df8){_0x34df03['count']=_0x384df8;if(_0xec82b7[_0xcc27('0x3b')]['includeAll']){_0x255de6[_0xcc27('0x3c')]=[{'all':!![]}];}if(_0xec82b7[_0xcc27('0x3b')]['userSetting']===_0xcc27('0x3d')){_0x255de6[_0xcc27('0x3c')]=[{'model':db['UserSetting'],'as':_0xcc27('0x3e')}];}if(!_[_0xcc27('0x37')](_0x255de6[_0xcc27('0x3f')],'id')){_0x255de6[_0xcc27('0x3f')]['push']('id');}return db[_0xcc27('0x3a')][_0xcc27('0x40')](_0x255de6);})['then'](function(_0x5ebc82){_0x34df03[_0xcc27('0x41')]=_0x5ebc82;if(_0xec82b7['query'][_0xcc27('0x42')]===_0xcc27('0x3d')){var _0x53ac40=[];for(var _0x4e959a=0x0;_0x4e959a<_0x34df03[_0xcc27('0x41')][_0xcc27('0x43')];_0x4e959a++){_0x53ac40[_0xcc27('0x44')](get_open_tabs('chat',_0x34df03['rows'][_0x4e959a][_0xcc27('0x45')]));_0x53ac40['push'](get_open_tabs('sms',_0x34df03['rows'][_0x4e959a][_0xcc27('0x45')]));_0x53ac40['push'](get_open_tabs(_0xcc27('0x46'),_0x34df03[_0xcc27('0x41')][_0x4e959a][_0xcc27('0x45')]));_0x53ac40['push'](get_open_tabs(_0xcc27('0x47'),_0x34df03[_0xcc27('0x41')][_0x4e959a][_0xcc27('0x45')]));_0x53ac40['push'](get_open_tabs('openchannel',_0x34df03[_0xcc27('0x41')][_0x4e959a][_0xcc27('0x45')]));_0x53ac40['push'](get_open_tabs(_0xcc27('0x48'),_0x34df03['rows'][_0x4e959a]['dataValues']));}return Promise[_0xcc27('0x49')](_0x53ac40)[_0xcc27('0x21')](function(){return _0x34df03;});}else{return _0x34df03;}})[_0xcc27('0x21')](respondWithFilteredResult(_0x4f7002,_0x255de6))[_0xcc27('0x4a')](handleError(_0x4f7002,null));};exports[_0xcc27('0x4b')]=function(_0x6a4c5d,_0x5b302f){var _0x146844=getUserAttributes();_0x6a4c5d[_0xcc27('0x3b')]['id']=_0x6a4c5d[_0xcc27('0x4c')]['id'];var _0x531eb0=qs[_0xcc27('0x4d')](_0x146844,_0x6a4c5d);if(_0x6a4c5d['query'][_0xcc27('0x4e')]){_0x531eb0[_0xcc27('0x3c')]=[{'all':!![]}];}if(_0x6a4c5d['query'][_0xcc27('0x3e')]===_0xcc27('0x3d')){_0x531eb0[_0xcc27('0x3c')]=[{'model':db[_0xcc27('0x4f')],'as':_0xcc27('0x3e')}];}_0x531eb0=_[_0xcc27('0x50')]({},_0x531eb0,_0x6a4c5d[_0xcc27('0x51')]);if(!_[_0xcc27('0x37')](_0x531eb0[_0xcc27('0x3f')],'id')){_0x531eb0['attributes'][_0xcc27('0x44')]('id');}return db[_0xcc27('0x3a')][_0xcc27('0x2b')](_0x531eb0)[_0xcc27('0x21')](handleEntityNotFound(_0x5b302f,null))['then'](function(_0x2c1486){var _0x5adae4=[];values=_0x2c1486;if(_0x6a4c5d[_0xcc27('0x3b')][_0xcc27('0x42')]===_0xcc27('0x3d')){_0x5adae4[_0xcc27('0x44')](get_open_tabs('chat',_0x2c1486[_0xcc27('0x45')]));_0x5adae4[_0xcc27('0x44')](get_open_tabs(_0xcc27('0x52'),_0x2c1486[_0xcc27('0x45')]));_0x5adae4[_0xcc27('0x44')](get_open_tabs(_0xcc27('0x53'),_0x2c1486[_0xcc27('0x45')]));_0x5adae4[_0xcc27('0x44')](get_open_tabs('whatsapp',_0x2c1486['dataValues']));_0x5adae4['push'](get_open_tabs(_0xcc27('0x46'),_0x2c1486[_0xcc27('0x45')]));_0x5adae4[_0xcc27('0x44')](get_open_tabs('mail',_0x2c1486[_0xcc27('0x45')]));return Promise[_0xcc27('0x49')](_0x5adae4);}else{return values;}})[_0xcc27('0x21')](function(){return values;})[_0xcc27('0x21')](respondWithResult(_0x5b302f,null))[_0xcc27('0x4a')](handleError(_0x5b302f,null));};exports[_0xcc27('0x1c')]=function(_0x37e98a,_0x287aa8){if(_0x37e98a[_0xcc27('0x54')]['id']){delete _0x37e98a[_0xcc27('0x54')]['id'];}delete _0x37e98a[_0xcc27('0x54')][_0xcc27('0x1d')];return db[_0xcc27('0x3a')]['find']({'where':{'id':_0x37e98a[_0xcc27('0x4c')]['id']}})['then'](handleEntityNotFound(_0x287aa8,null))[_0xcc27('0x21')](saveUpdates(_0x37e98a['body'],null))['then'](respondWithResult(_0x287aa8,null))['catch'](handleError(_0x287aa8,null));};exports[_0xcc27('0x55')]=function(_0x2292ff,_0x2d90b5){return db['User'][_0xcc27('0x55')]()['then'](respondWithResult(_0x2d90b5,null))[_0xcc27('0x4a')](handleError(_0x2d90b5,null));};exports[_0xcc27('0x56')]=function(_0x2ec9eb,_0x1896bf){return db[_0xcc27('0x3a')]['find']({'where':{'id':_0x2ec9eb[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x1896bf,null))['then'](function(_0x20e540){if(_0x20e540){return _0x20e540['addContacts'](_0x2ec9eb['body'][_0xcc27('0x57')],_[_0xcc27('0x58')](_0x2ec9eb[_0xcc27('0x54')],[_0xcc27('0x57'),'id'])||{});}})[_0xcc27('0x21')](respondWithResult(_0x1896bf,null))['catch'](handleError(_0x1896bf,null));};function validateUser(_0x472a50){return new Promise(function(_0xffee2b,_0x492cce){if(_0x472a50['internal'])return _0xffee2b(_0x472a50);return db[_0xcc27('0x59')][_0xcc27('0x5a')](0x1)[_0xcc27('0x21')](function(_0x8ea687){if(_0x8ea687[_0xcc27('0x5b')])authService[_0xcc27('0x5c')](_0x472a50[_0xcc27('0x32')]);db[_0xcc27('0x3a')][_0xcc27('0x5d')](_0xcc27('0x5e'))[_0xcc27('0x21')](function(_0x13ed98){if(_['isNil'](_0x13ed98)){_0x472a50[_0xcc27('0x5e')]=_0x8ea687[_0xcc27('0x5f')]||0x1;return;}if(_['isNil'](_0x8ea687[_0xcc27('0x5f')])||_0x8ea687[_0xcc27('0x5f')]===_0x13ed98){_0x472a50['internal']=_0x13ed98+0x1;return;}if(_0x8ea687[_0xcc27('0x5f')]>_0x13ed98){_0x472a50[_0xcc27('0x5e')]=_0x8ea687['min_internal'];return;}return db[_0xcc27('0x60')][_0xcc27('0x3b')]('select\x20(select\x20IFNULL(max(internal)+1,1)\x20from\x20users\x20where\x20internal\x20<\x20md.internal)\x20as\x20\x27from\x27,\x20md.internal\x20-\x201\x20as\x20\x27to\x27\x20from\x20users\x20md\x20where\x20md.internal\x20!=\x201\x20and\x20not\x20exists\x20(select\x201\x20from\x20users\x20md2\x20where\x20md2.internal\x20=\x20md.internal\x20-\x201)',{'type':db[_0xcc27('0x60')][_0xcc27('0x61')][_0xcc27('0x62')]})[_0xcc27('0x21')](function(_0x1b49fe){if(_0x1b49fe&&_0x1b49fe[_0xcc27('0x43')]){for(var _0x2a4205=0x0,_0x411a64=_0x1b49fe[_0xcc27('0x43')];_0x2a4205<_0x411a64&&_[_0xcc27('0x63')](_0x472a50['internal']);_0x2a4205++){if(_0x8ea687[_0xcc27('0x5f')]<=_0x1b49fe[_0x2a4205]['from']){_0x472a50[_0xcc27('0x5e')]=_0x1b49fe[_0x2a4205][_0xcc27('0x64')];}else if(_0x8ea687[_0xcc27('0x5f')]>_0x1b49fe[_0x2a4205]['from']&&_0x8ea687['min_internal']<=_0x1b49fe[_0x2a4205]['to']){_0x472a50[_0xcc27('0x5e')]=_0x8ea687['min_internal'];}}}if(_[_0xcc27('0x63')](_0x472a50[_0xcc27('0x5e')])){_0x472a50[_0xcc27('0x5e')]=_0x13ed98+0x1;}return _0xffee2b(_0x472a50);});});})[_0xcc27('0x4a')](function(_0x5a9499){_0x492cce(_0x5a9499);});});}function updateUser(_0x1ad948){return new Promise(function(_0x446a08,_0x331d33){try{if(_0x1ad948[_0xcc27('0x65')]){_0x1ad948[_0xcc27('0x66')]=_0x1ad948[_0xcc27('0x5e')];_0x1ad948[_0xcc27('0x67')]={'mailbox':_0x1ad948[_0xcc27('0x5e')],'password':_0x1ad948[_0xcc27('0x32')],'fullname':_0x1ad948[_0xcc27('0x68')],'email':_0x1ad948[_0xcc27('0x69')]};}if(_0x1ad948[_0xcc27('0x1d')]===_0xcc27('0x26')){if(!_0x1ad948['permissions'])_0x1ad948[_0xcc27('0x6a')]=[_0xcc27('0x6b'),_0xcc27('0x6c'),_0xcc27('0x6d'),_0xcc27('0x6e'),_0xcc27('0x6f'),'104',_0xcc27('0x70'),_0xcc27('0x71'),'107',_0xcc27('0x72'),_0xcc27('0x73'),'100',_0xcc27('0x74'),_0xcc27('0x75'),_0xcc27('0x76')];}_0x446a08(_0x1ad948);}catch(_0x4acbc3){_0x331d33(_0x4acbc3);}});}exports[_0xcc27('0x77')]=function(_0x52ced5,_0x268f32){if(_0x52ced5[_0xcc27('0x24')][_0xcc27('0x1d')]===_0xcc27('0x26'))throw new Error('Unauthorized');if(_0x52ced5[_0xcc27('0x54')][_0xcc27('0x1d')]==='user'&&_0x52ced5[_0xcc27('0x24')][_0xcc27('0x1d')]!==_0xcc27('0x78')){throw new Error('Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20user');}if(_0x52ced5[_0xcc27('0x54')][_0xcc27('0x1d')]===_0xcc27('0x78')&&_0x52ced5[_0xcc27('0x24')][_0xcc27('0x1d')]!==_0xcc27('0x78')){throw new Error(_0xcc27('0x79'));}return licenseUtil[_0xcc27('0x7a')]([_0x52ced5['body']])['then'](function(){return validateUser(_0x52ced5['body']);})[_0xcc27('0x21')](function(_0x46300d){return updateUser(_0x46300d)[_0xcc27('0x21')](function(_0x251a82){if(_0x251a82['role']===_0xcc27('0x78')){_0x251a82[_0xcc27('0x7b')]=_0x52ced5[_0xcc27('0x24')][_0xcc27('0x7b')];delete _0x251a82['userProfileId'];}return _0x251a82;});})[_0xcc27('0x21')](function(_0x28d15c){return db['User'][_0xcc27('0x77')](_0x28d15c,{'include':[{'model':db[_0xcc27('0x67')],'as':'VoiceMail'}]});})[_0xcc27('0x21')](function(_0x6eae6b){if(_0x52ced5[_0xcc27('0x54')]['role']===_0xcc27('0x24'))return _0x6eae6b;if(_0x52ced5[_0xcc27('0x24')][_0xcc27('0x1d')]!==_0xcc27('0x24'))return _0x6eae6b;return db[_0xcc27('0x7c')][_0xcc27('0x2b')]({'where':{'name':_0x6eae6b[_0xcc27('0x1d')]===_0xcc27('0x26')?_0xcc27('0x25'):_0xcc27('0x7d'),'userProfileId':_0x52ced5[_0xcc27('0x24')][_0xcc27('0x7e')]},'raw':!![]})[_0xcc27('0x21')](function(_0x3f57b7){if(!_0x3f57b7||_0x3f57b7[_0xcc27('0x7f')]!=0x0)return _0x6eae6b;return db[_0xcc27('0x80')][_0xcc27('0x77')]({'name':_0x6eae6b[_0xcc27('0x2c')],'resourceId':_0x6eae6b['id'],'type':_0x3f57b7[_0xcc27('0x2c')],'sectionId':_0x3f57b7['id']},{})[_0xcc27('0x21')](function(){return _0x6eae6b;});})['catch'](function(_0x33ecb5){logger[_0xcc27('0x2e')](_0xcc27('0x81'),_0x33ecb5);throw _0x33ecb5;});})[_0xcc27('0x21')](respondWithResult(_0x268f32,0xc9))[_0xcc27('0x4a')](handleError(_0x268f32,null));};exports['bulkCreate']=function(_0x3e9684,_0xdd4d3b){var _0x170267=_0x3e9684[_0xcc27('0x54')];var _0x528003=[];if(_0x3e9684[_0xcc27('0x24')]['role']==='agent')throw new Error(_0xcc27('0x82'));if(_['some'](_0x170267,['role',_0xcc27('0x24')])&&_0x3e9684['user'][_0xcc27('0x1d')]!==_0xcc27('0x78')){throw new Error('Unauthorized.\x20You\x20must\x20be\x20an\x20administrator\x20in\x20order\x20to\x20create\x20an\x20user');}if(_[_0xcc27('0x83')](_0x170267,[_0xcc27('0x1d'),_0xcc27('0x78')])&&_0x3e9684[_0xcc27('0x24')][_0xcc27('0x1d')]!==_0xcc27('0x78')){throw new Error(_0xcc27('0x84'));}return licenseUtil[_0xcc27('0x7a')](_0x170267)[_0xcc27('0x21')](function(){return validateUser(_0x170267[0x0]);})[_0xcc27('0x21')](function(){for(var _0x1b6917=0x1;_0x1b6917<_0x170267['length'];_0x1b6917++){var _0x8b658=_0x170267[_0x1b6917-0x1][_0xcc27('0x5e')];if(!_0x170267[_0x1b6917][_0xcc27('0x5e')])_0x170267[_0x1b6917][_0xcc27('0x5e')]=_0x8b658+0x1;_0x528003[_0xcc27('0x44')](validateUser(_0x170267[_0x1b6917]));}return Promise['all'](_0x528003);})['then'](function(){_0x528003=[];for(var _0x1f24a0=0x0;_0x1f24a0<_0x170267[_0xcc27('0x43')];_0x1f24a0++){_0x528003[_0xcc27('0x44')](updateUser(_0x170267[_0x1f24a0]));}return Promise[_0xcc27('0x49')](_0x528003);})['then'](function(){_0x528003=_0x170267[_0xcc27('0x29')](function(_0x4c07c6){return db[_0xcc27('0x3a')]['create'](_0x4c07c6,{'include':[{'model':db[_0xcc27('0x67')],'as':'VoiceMail'}]})[_0xcc27('0x21')](function(_0x164429){_0x4c07c6['id']=_0x164429['id'];return _0x4c07c6;});});return Promise[_0xcc27('0x49')](_0x528003);})['then'](function(_0x49021a){if(_0x3e9684[_0xcc27('0x54')]['role']===_0xcc27('0x24'))return _0x49021a;if(_0x3e9684[_0xcc27('0x24')][_0xcc27('0x1d')]!==_0xcc27('0x24'))return _0x49021a;var _0x46c00e=_[_0xcc27('0x83')](_0x49021a,function(_0x33c6da){return _0x33c6da[_0xcc27('0x1d')]===_0xcc27('0x26')||_0x33c6da[_0xcc27('0x1d')]==='telephone';});if(!_0x46c00e)return _0x49021a;return db[_0xcc27('0x7c')][_0xcc27('0x40')]({'where':{'name':{'$or':[_0xcc27('0x25'),_0xcc27('0x7d')]},'userProfileId':_0x3e9684[_0xcc27('0x24')][_0xcc27('0x7e')]},'raw':!![]})[_0xcc27('0x21')](function(_0xeecac0){if(_[_0xcc27('0x85')](_0xeecac0)||!_[_0xcc27('0x83')](_0xeecac0,[_0xcc27('0x7f'),0x0]))return _0x49021a;_0x528003=[];var _0x164916=_(_0xeecac0)[_0xcc27('0x29')](function(_0x8eb242){if(_0x8eb242[_0xcc27('0x7f')]===0x1)return;return _0x8eb242['name']===_0xcc27('0x25')?_0xcc27('0x26'):'telephone';})[_0xcc27('0x86')]()[_0xcc27('0x2a')]();for(var _0x55e232=0x0;_0x55e232<_0x49021a[_0xcc27('0x43')];_0x55e232++){if(!_[_0xcc27('0x37')](_0x164916,_0x49021a[_0x55e232][_0xcc27('0x1d')]))return;var _0x1fed44=_0x49021a[_0x55e232][_0xcc27('0x1d')]===_0xcc27('0x26')?_0xcc27('0x25'):_0xcc27('0x7d');_0x528003[_0xcc27('0x44')](db[_0xcc27('0x80')][_0xcc27('0x77')]({'name':_0x49021a[_0x55e232][_0xcc27('0x2c')],'resourceId':_0x49021a[_0x55e232]['id'],'type':_0x1fed44,'sectionId':_['find'](_0xeecac0,[_0xcc27('0x2c'),_0x1fed44])['id']},{}));}return Promise[_0xcc27('0x49')](_0x528003);});})[_0xcc27('0x21')](respondWithResult(_0xdd4d3b,0xc9))[_0xcc27('0x4a')](handleError(_0xdd4d3b,null));};exports[_0xcc27('0x87')]=function(_0x13196c,_0x12571c){if(_0x13196c[_0xcc27('0x54')]['id']){delete _0x13196c[_0xcc27('0x54')]['id'];}return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x13196c[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](function(_0x36dd2a){if(!_0x36dd2a)return null;if(_0x36dd2a['id']===_0x13196c[_0xcc27('0x24')]['id']){if(!_0x13196c[_0xcc27('0x54')][_0xcc27('0x88')]||!_0x13196c[_0xcc27('0x54')]['newPassword']){throw new db[(_0xcc27('0x89'))][(_0xcc27('0x8a'))](_0xcc27('0x8b'));}if(!_0x36dd2a[_0xcc27('0x8c')](_0x13196c[_0xcc27('0x54')][_0xcc27('0x88')])){throw new db[(_0xcc27('0x89'))][(_0xcc27('0x8a'))](_0xcc27('0x8d'));}if(_0x13196c['body'][_0xcc27('0x88')]===_0x13196c['body'][_0xcc27('0x8e')]){throw new db['Sequelize'][(_0xcc27('0x8a'))](_0xcc27('0x8f'));}}else if(_0x13196c['user'][_0xcc27('0x1d')]===_0xcc27('0x78')){if(!_0x13196c['body']['newPassword']){throw new db['Sequelize'][(_0xcc27('0x8a'))]('Invalid\x20body\x20format.\x20Use\x20newPassword');}}else if(_0x13196c[_0xcc27('0x24')]['role']==='user'){if(!_0x13196c[_0xcc27('0x54')][_0xcc27('0x8e')]){throw new db[(_0xcc27('0x89'))][(_0xcc27('0x8a'))](_0xcc27('0x90'));}if(_0x36dd2a[_0xcc27('0x1d')]!==_0xcc27('0x26')){throw new db[(_0xcc27('0x89'))][(_0xcc27('0x8a'))](_0xcc27('0x82'));}}else{throw new db['Sequelize'][(_0xcc27('0x8a'))]('Unauthorized');}return _0x36dd2a;})['then'](handleEntityNotFound(_0x12571c,null))['then'](function(_0x197b70){return db[_0xcc27('0x59')][_0xcc27('0x91')]({'attributes':['id',_0xcc27('0x5b'),_0xcc27('0x92'),_0xcc27('0x93')]})[_0xcc27('0x21')](function(_0xf9a752){if(_0xf9a752[_0xcc27('0x5b')])authService[_0xcc27('0x5c')](_0x13196c['body']['newPassword']);if(!_0xf9a752[_0xcc27('0x92')]||!_0x197b70[_0xcc27('0x34')])return _0x197b70;authService[_0xcc27('0x94')](_0x13196c['body'][_0xcc27('0x8e')],_0x197b70[_0xcc27('0x34')],_0xf9a752['passwordHistoryLimit']);return _0x197b70;})['then'](saveUpdates({'password':_0x13196c[_0xcc27('0x54')][_0xcc27('0x8e')],'passwordResetAt':_0x13196c[_0xcc27('0x24')]['id']==_0x13196c['params']['id']?moment():null,'previousPasswords':authService['updatePasswordsHistory'](_0x13196c[_0xcc27('0x54')][_0xcc27('0x8e')],_0x197b70[_0xcc27('0x34')])},null));})['then'](respondWithResult(_0x12571c,null))['catch'](handleError(_0x12571c,null));};exports[_0xcc27('0x95')]=function(_0x18531f,_0x4dbc88){var _0x153321=_0x18531f[_0xcc27('0x54')][_0xcc27('0x96')];return db['User']['find']({'where':{'id':_0x18531f[_0xcc27('0x4c')]['id']},'attributes':['id',_0xcc27('0x2c'),'role',_0xcc27('0x97'),_0xcc27('0x98'),_0xcc27('0x99'),_0xcc27('0x9a')]})[_0xcc27('0x21')](handleEntityNotFound(_0x4dbc88,null))[_0xcc27('0x21')](function(_0x11638e){if(_0x11638e){if(!utils['isValidChannel'](_0x153321)){throw new db[(_0xcc27('0x89'))]['ValidationError'](_0xcc27('0x9b'));}return _0x11638e['add'+_[_0xcc27('0x9c')](_0x153321[_0xcc27('0x9d')]())+_0xcc27('0x9e')](_0x18531f[_0xcc27('0x54')][_0xcc27('0x57')],{'penalty':_0x18531f['body'][_0xcc27('0x9f')]||0x0})[_0xcc27('0xa0')](function(_0x15dc97){for(var _0x19cde7=0x0;_0x19cde7<_0x18531f['body'][_0xcc27('0x57')][_0xcc27('0x43')];_0x19cde7+=0x1){var _0x208698={'UserId':Number(_0x18531f[_0xcc27('0x4c')]['id'])};_0x208698[_[_0xcc27('0x9c')](_0x153321[_0xcc27('0x9d')]())+_0xcc27('0xa1')]=Number(_0x18531f[_0xcc27('0x54')][_0xcc27('0x57')][_0x19cde7]);socket[_0xcc27('0x1e')](_0xcc27('0x24')+_['capitalize'](_0x153321['toLowerCase']())+_0xcc27('0xa2'),_0x208698);}return _0x15dc97;})[_0xcc27('0x21')](function(){if(_0x153321===_0xcc27('0xa3')){return db[_0xcc27('0xa4')][_0xcc27('0x40')]({'where':{'id':_0x18531f[_0xcc27('0x54')]['ids']||[]},'raw':!![],'attributes':['id',_0xcc27('0x2c')]});}})[_0xcc27('0x21')](function(_0x55f7e6){var _0x531c50=_0x11638e[_0xcc27('0x22')]({'plain':!![]});var _0x384004=[];if(_0x153321===_0xcc27('0xa3')&&_0x531c50[_0xcc27('0x1d')]==='agent'&&_0x531c50[_0xcc27('0x97')]){for(let _0x250414=0x0;_0x250414<_0x55f7e6[_0xcc27('0x43')];_0x250414+=0x1){_0x384004[_0xcc27('0x44')]({'membername':_0x531c50['name'],'UserId':_0x531c50['id'],'queue_name':_0x55f7e6[_0x250414][_0xcc27('0x2c')],'VoiceQueueId':_0x55f7e6[_0x250414]['id'],'interface':_[_0xcc27('0x63')](_0x531c50['interface'])?util[_0xcc27('0xa5')]('SIP/%s',_0x531c50[_0xcc27('0x2c')]):_0x531c50['interface'],'paused':_0x531c50[_0xcc27('0x99')]||![],'penalty':_0x18531f['body'][_0xcc27('0x9f')]||0x0});}return Promise[_0xcc27('0x49')](_0x384004['map'](function(_0xbce443){return db[_0xcc27('0xa6')][_0xcc27('0xa7')](_0xbce443);}));}return _0x11638e;});}})[_0xcc27('0x21')](respondWithStatusCode(_0x4dbc88,null))[_0xcc27('0x4a')](handleError(_0x4dbc88,null));};exports[_0xcc27('0xa8')]=function(_0x34c1dc,_0x2ca355){var _0x19b3ac,_0x5725f7;return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x34c1dc[_0xcc27('0x4c')]['id']},'attributes':['id',_0xcc27('0x2c'),'role']})[_0xcc27('0x21')](handleEntityNotFound(_0x2ca355,null))[_0xcc27('0x21')](function(_0x381622){if(_0x381622){_0x19b3ac=_0x381622;if(!_0x34c1dc[_0xcc27('0x3b')][_0xcc27('0x96')]||!utils[_0xcc27('0xa9')](_0x34c1dc['query']['channel'])){throw new db[(_0xcc27('0x89'))]['ValidationError'](_0xcc27('0x9b'));}return _0x381622['remove'+_[_0xcc27('0x9c')](_0x34c1dc['query'][_0xcc27('0x96')][_0xcc27('0x9d')]())+_0xcc27('0x9e')](_0x34c1dc[_0xcc27('0x3b')][_0xcc27('0x57')]);}})[_0xcc27('0x21')](function(_0x43c608){if(_['isArray'](_0x34c1dc[_0xcc27('0x3b')][_0xcc27('0x57')])){for(var _0x2064b6=0x0;_0x2064b6<_0x34c1dc[_0xcc27('0x3b')]['ids'][_0xcc27('0x43')];_0x2064b6+=0x1){_0x5725f7={'UserId':Number(_0x34c1dc[_0xcc27('0x4c')]['id'])};_0x5725f7[_[_0xcc27('0x9c')](_0x34c1dc[_0xcc27('0x3b')][_0xcc27('0x96')][_0xcc27('0x9d')]())+_0xcc27('0xa1')]=Number(_0x34c1dc[_0xcc27('0x3b')][_0xcc27('0x57')][_0x2064b6]);socket['emit'](_0xcc27('0x24')+_[_0xcc27('0x9c')](_0x34c1dc[_0xcc27('0x3b')][_0xcc27('0x96')]['toLowerCase']())+'Queue:remove',_0x5725f7);}}else{_0x5725f7={'UserId':Number(_0x34c1dc[_0xcc27('0x4c')]['id'])};_0x5725f7[_[_0xcc27('0x9c')](_0x34c1dc[_0xcc27('0x3b')]['channel']['toLowerCase']())+'QueueId']=Number(_0x34c1dc[_0xcc27('0x3b')]['ids']);socket['emit']('user'+_[_0xcc27('0x9c')](_0x34c1dc[_0xcc27('0x3b')][_0xcc27('0x96')][_0xcc27('0x9d')]())+_0xcc27('0xaa'),_0x5725f7);}return _0x43c608;})['then'](function(){if(_0x34c1dc[_0xcc27('0x3b')][_0xcc27('0x96')]===_0xcc27('0xa3')){return db['UserVoiceQueueRt'][_0xcc27('0x20')]({'where':{'UserId':_0x34c1dc[_0xcc27('0x4c')]['id'],'VoiceQueueId':_0x34c1dc[_0xcc27('0x3b')]['ids']},'individualHooks':!![]})[_0xcc27('0x21')](function(){return _0x19b3ac;});}return _0x19b3ac;})[_0xcc27('0x21')](respondWithStatusCode(_0x2ca355,null))[_0xcc27('0x4a')](handleError(_0x2ca355,null));};exports[_0xcc27('0xab')]=function(_0x33b95b,_0x505791){_0x33b95b[_0xcc27('0x54')]['userpic']=_0x33b95b[_0xcc27('0xac')][_0xcc27('0xad')];return db[_0xcc27('0x3a')]['find']({'where':{'id':_0x33b95b[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x505791,null))[_0xcc27('0x21')](saveUpdates(_0x33b95b['body'],null))['then'](respondWithResult(_0x505791,null))[_0xcc27('0x4a')](handleError(_0x505791,null));};exports[_0xcc27('0xae')]=function(_0x15f467,_0x3e2b51){var _0x5afa5c=path['join'](config['root'],_0xcc27('0xaf'));return db['User'][_0xcc27('0x2b')]({'where':{'id':_0x15f467[_0xcc27('0x4c')]['id']},'attributes':['id','userpic'],'raw':!![]})[_0xcc27('0x21')](handleEntityNotFound(_0x3e2b51,null))['then'](function(_0x567e9a){if(_0x567e9a){if(_[_0xcc27('0x63')](_0x567e9a[_0xcc27('0xb0')])){return _0x3e2b51['download'](_0x5afa5c);}else{if(!fs[_0xcc27('0xb1')](path['join'](config[_0xcc27('0xb2')],_0xcc27('0xb3'),_0x567e9a[_0xcc27('0xb0')]))){return _0x3e2b51['download'](_0x5afa5c);}return _0x3e2b51[_0xcc27('0xb4')](path[_0xcc27('0xb5')](config[_0xcc27('0xb2')],_0xcc27('0xb3'),_0x567e9a[_0xcc27('0xb0')]));}}})['catch'](handleError(_0x3e2b51,null));};exports[_0xcc27('0xb6')]=function(_0x44f9d4,_0x5d58ec){return db[_0xcc27('0x3a')]['find']({'where':{'id':_0x44f9d4[_0xcc27('0x4c')]['id']},'attributes':['id']})[_0xcc27('0x21')](handleEntityNotFound(_0x5d58ec,null))[_0xcc27('0x21')](function(_0x4d8341){var _0x74e247=[];values=_0x4d8341['dataValues'];_0x74e247[_0xcc27('0x44')](get_open_tabs(_0xcc27('0xb7'),_0x4d8341['dataValues']));_0x74e247['push'](get_open_tabs(_0xcc27('0x52'),_0x4d8341[_0xcc27('0x45')]));_0x74e247[_0xcc27('0x44')](get_open_tabs('openchannel',_0x4d8341[_0xcc27('0x45')]));_0x74e247[_0xcc27('0x44')](get_open_tabs('whatsapp',_0x4d8341[_0xcc27('0x45')]));_0x74e247[_0xcc27('0x44')](get_open_tabs('fax',_0x4d8341[_0xcc27('0x45')]));_0x74e247[_0xcc27('0x44')](get_open_tabs('mail',_0x4d8341[_0xcc27('0x45')]));return Promise['all'](_0x74e247);})[_0xcc27('0x21')](function(_0x51961a){if(_0x51961a){var _0x2cdaac=_[_0xcc27('0x29')](values['ChatOpenTabs'],function(_0x4b0c0e){return{'channel':_0xcc27('0xb8'),'id':_0x4b0c0e['id'],'createdAt':_0x4b0c0e['createdAt']};});var _0x225db8=_['map'](values[_0xcc27('0xb9')],function(_0x4d5a37){return{'channel':_0xcc27('0xba'),'id':_0x4d5a37['id'],'createdAt':_0x4d5a37['createdAt']};});var _0x21f285=_[_0xcc27('0x29')](values[_0xcc27('0xbb')],function(_0xfc3910){return{'channel':_0xcc27('0xbc'),'id':_0xfc3910['id'],'createdAt':_0xfc3910[_0xcc27('0xbd')]};});var _0x2ea3b6=_['map'](values[_0xcc27('0xbe')],function(_0x5cb7e9){return{'channel':'MAIL','id':_0x5cb7e9['id'],'createdAt':_0x5cb7e9[_0xcc27('0xbd')]};});var _0x4f73a8=_[_0xcc27('0x29')](values[_0xcc27('0xbf')],function(_0x37ff32){return{'channel':_0xcc27('0xc0'),'id':_0x37ff32['id'],'createdAt':_0x37ff32[_0xcc27('0xbd')]};});var _0x54cfc6=_[_0xcc27('0x29')](values[_0xcc27('0xc1')],function(_0x1ef4cb){return{'channel':_0xcc27('0xc2'),'id':_0x1ef4cb['id'],'createdAt':_0x1ef4cb[_0xcc27('0xbd')]};});var _0x1c384a=_[_0xcc27('0xc3')](_0x2cdaac,_0x225db8,_0x21f285,_0x2ea3b6,_0x4f73a8,_0x54cfc6);var _0x533e38={'count':_0x1c384a['length'],'rows':_0x1c384a};return _0x533e38;}else return null;})[_0xcc27('0x21')](respondWithResult(_0x5d58ec,null))[_0xcc27('0x4a')](handleError(_0x5d58ec,null));};exports[_0xcc27('0xc4')]=function(_0x5dd38e,_0x527f0c){var _0x31bbf1={};return db[_0xcc27('0x3a')]['findOne']({'where':{'id':_0x5dd38e[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](function(_0x57be68){if(!_0x57be68){throw new APINotFoundError(util[_0xcc27('0xa5')](_0xcc27('0xc5'),_0x5dd38e[_0xcc27('0x4c')]['id']));}return contacts[_0xcc27('0x55')]();})[_0xcc27('0x21')](function(_0x19a34c){_0x5dd38e[_0xcc27('0x3b')]['User']=_0x5dd38e[_0xcc27('0x4c')]['id'];_0x31bbf1=qs[_0xcc27('0x4d')](_0x19a34c,_0x5dd38e);if(_0x5dd38e[_0xcc27('0x3b')][_0xcc27('0xc6')](_0xcc27('0x4e'))){_0x31bbf1[_0xcc27('0x3c')]=[{'model':db[_0xcc27('0xc7')],'as':_0xcc27('0xc8'),'required':![]},{'model':db['Tag'],'as':_0xcc27('0xc9'),'attributes':['id',_0xcc27('0x2c'),_0xcc27('0xca')],'where':_0x5dd38e['query'][_0xcc27('0xcb')]?{'id':_0x5dd38e[_0xcc27('0x3b')][_0xcc27('0xcb')]}:undefined,'required':_0x5dd38e[_0xcc27('0x3b')]['tag']?!![]:![]}];}return contacts[_0xcc27('0x40')](_0x5dd38e['query'],_0x5dd38e[_0xcc27('0x24')],_0x31bbf1,_0x19a34c);})[_0xcc27('0x21')](respondWithFilteredResult(_0x527f0c,_0x31bbf1))[_0xcc27('0x4a')](APIHandleError(_0x527f0c));};exports[_0xcc27('0xcc')]=function(_0x42a13a,_0x30dfc0){var _0xfee61f;var _0x2ceb8f={};var _0x559c00;return db['User'][_0xcc27('0x91')]({'where':{'id':_0x42a13a[_0xcc27('0x4c')]['id']},'attributes':['id',_0xcc27('0x2c'),_0xcc27('0x1d')]})[_0xcc27('0x21')](handleEntityNotFound(_0x30dfc0,null))[_0xcc27('0x21')](function(_0x4c9be5){if(!utils['isValidChannel'](_0x42a13a['query']['channel'])){throw new db[(_0xcc27('0x89'))][(_0xcc27('0x8a'))](_0xcc27('0x9b'));}_0xfee61f=_0x4c9be5;var _0x330692={};_0x330692['model']=_['keys'](db[_['capitalize'](_0x42a13a['query'][_0xcc27('0x96')])+'Queue'][_0xcc27('0x30')]);_0x330692[_0xcc27('0x3b')]=_[_0xcc27('0xcd')](_0x42a13a[_0xcc27('0x3b')]);_0x330692[_0xcc27('0xce')]=_['intersection'](_0x330692['model'],_0x330692['query']);_0x2ceb8f[_0xcc27('0x3f')]=_[_0xcc27('0xcf')](_0x330692['model'],qs['fields'](_0x42a13a['query'][_0xcc27('0xd0')]));_0x2ceb8f['attributes']=_0x2ceb8f[_0xcc27('0x3f')][_0xcc27('0x43')]?_0x2ceb8f[_0xcc27('0x3f')]:_0x330692[_0xcc27('0xd1')];_0x2ceb8f[_0xcc27('0xd2')]=qs[_0xcc27('0xd3')](_0x42a13a[_0xcc27('0x3b')][_0xcc27('0xd3')]);_0x2ceb8f[_0xcc27('0x39')]=qs[_0xcc27('0xce')](_[_0xcc27('0xd4')](_0x42a13a['query'],_0x330692[_0xcc27('0xce')]));if(_0x42a13a[_0xcc27('0x3b')][_0xcc27('0x27')]){_0x2ceb8f[_0xcc27('0x39')]=_[_0xcc27('0x50')](_0x2ceb8f[_0xcc27('0x39')],{'$or':_['map'](_0x2ceb8f[_0xcc27('0x3f')],function(_0x36f994){var _0xa66ca3={};_0xa66ca3[_0x36f994]={'$like':'%'+_0x42a13a[_0xcc27('0x3b')][_0xcc27('0x27')]+'%'};return _0xa66ca3;})});}_0x2ceb8f=_['merge']({},_0x2ceb8f,_0x42a13a[_0xcc27('0x51')]);switch(_0xfee61f['role']){case'admin':return db[_[_0xcc27('0x9c')](_0x42a13a[_0xcc27('0x3b')][_0xcc27('0x96')])+'Queue'][_0xcc27('0x40')](_0x2ceb8f);case'user':case _0xcc27('0x26'):return _0xfee61f[_0xcc27('0x22')+_[_0xcc27('0x9c')](_0x42a13a['query'][_0xcc27('0x96')])+'Queues'](_0x2ceb8f);default:throw new db[(_0xcc27('0x89'))][(_0xcc27('0x8a'))](_0xcc27('0xd5'));}})[_0xcc27('0x21')](function(_0x225bf1){_0x559c00=_0x225bf1[_0xcc27('0x43')];if(!_0x42a13a[_0xcc27('0x3b')][_0xcc27('0xc6')](_0xcc27('0xd6'))){_0x2ceb8f[_0xcc27('0x18')]=qs[_0xcc27('0x18')](_0x42a13a[_0xcc27('0x3b')][_0xcc27('0x18')]);_0x2ceb8f[_0xcc27('0x16')]=qs['offset'](_0x42a13a[_0xcc27('0x3b')][_0xcc27('0x16')]);}switch(_0xfee61f[_0xcc27('0x1d')]){case'admin':return db[_[_0xcc27('0x9c')](_0x42a13a[_0xcc27('0x3b')][_0xcc27('0x96')])+'Queue'][_0xcc27('0x40')](_0x2ceb8f);case _0xcc27('0x24'):case _0xcc27('0x26'):return _0xfee61f[_0xcc27('0x22')+_[_0xcc27('0x9c')](_0x42a13a['query'][_0xcc27('0x96')])+_0xcc27('0x9e')](_0x2ceb8f);}})[_0xcc27('0x21')](function(_0x5cc45){return{'count':_0x559c00,'rows':_0x5cc45};})[_0xcc27('0x21')](respondWithResult(_0x30dfc0,null))[_0xcc27('0x4a')](handleError(_0x30dfc0,null));};exports[_0xcc27('0xd7')]=function(_0x57916b,_0x5b2dad){var _0x26fe03={};var _0x4e6dba={};var _0x274dab;var _0x26eb57;return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0x57916b[_0xcc27('0x4c')]['id']}})['then'](handleEntityNotFound(_0x5b2dad,null))[_0xcc27('0x21')](function(_0x90b883){if(_0x90b883){_0x274dab=_0x90b883;_0x4e6dba['model']=_[_0xcc27('0xcd')](db[_0xcc27('0xa6')][_0xcc27('0x30')]);_0x4e6dba[_0xcc27('0x3b')]=_[_0xcc27('0xcd')](_0x57916b[_0xcc27('0x3b')]);_0x4e6dba['filters']=_[_0xcc27('0xcf')](_0x4e6dba[_0xcc27('0xd1')],_0x4e6dba['query']);_0x26fe03[_0xcc27('0x3f')]=_[_0xcc27('0xcf')](_0x4e6dba[_0xcc27('0xd1')],qs[_0xcc27('0xd0')](_0x57916b[_0xcc27('0x3b')]['fields']));_0x26fe03[_0xcc27('0x3f')]=_0x26fe03[_0xcc27('0x3f')][_0xcc27('0x43')]?_0x26fe03[_0xcc27('0x3f')]:_0x4e6dba[_0xcc27('0xd1')];_0x26fe03[_0xcc27('0xd2')]=qs[_0xcc27('0xd3')](_0x57916b['query']['sort']);_0x26fe03[_0xcc27('0x39')]=qs[_0xcc27('0xce')](_['pick'](_0x57916b[_0xcc27('0x3b')],_0x4e6dba[_0xcc27('0xce')]));if(_0x57916b[_0xcc27('0x3b')][_0xcc27('0x27')]){_0x26fe03[_0xcc27('0x39')]=_[_0xcc27('0x50')](_0x26fe03[_0xcc27('0x39')],{'$or':_[_0xcc27('0x29')](_0x26fe03[_0xcc27('0x3f')],function(_0x1b53ff){var _0x3fd7c1={};_0x3fd7c1[_0x1b53ff]={'$like':'%'+_0x57916b[_0xcc27('0x3b')][_0xcc27('0x27')]+'%'};return _0x3fd7c1;})});}_0x26fe03=_[_0xcc27('0x50')]({},_0x26fe03,_0x57916b[_0xcc27('0x51')]);return _0x274dab[_0xcc27('0xd7')](_0x26fe03);}})[_0xcc27('0x21')](function(_0x1a21c9){if(_0x1a21c9){_0x26eb57=_0x1a21c9['length'];if(!_0x57916b[_0xcc27('0x3b')]['hasOwnProperty']('nolimit')){_0x26fe03[_0xcc27('0x18')]=qs['limit'](_0x57916b[_0xcc27('0x3b')][_0xcc27('0x18')]);_0x26fe03[_0xcc27('0x16')]=qs['offset'](_0x57916b[_0xcc27('0x3b')]['offset']);}return _0x274dab['getVoiceQueuesRt'](_0x26fe03);}})[_0xcc27('0x21')](function(_0x352ef0){if(_0x352ef0){return _0x352ef0?{'count':_0x26eb57,'rows':_0x352ef0}:null;}})['then'](respondWithResult(_0x5b2dad,null))[_0xcc27('0x4a')](handleError(_0x5b2dad,null));};exports[_0xcc27('0xd8')]=function(_0x5ac34a,_0x1f0a20){var _0x5e9051={};var _0x7ad18d={};var _0x4b2024;var _0x3cf889;return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0x5ac34a[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x1f0a20,null))[_0xcc27('0x21')](function(_0x10c3a2){if(_0x10c3a2){_0x4b2024=_0x10c3a2;_0x7ad18d[_0xcc27('0xd1')]=_[_0xcc27('0xcd')](db[_0xcc27('0xd9')][_0xcc27('0x30')]);_0x7ad18d[_0xcc27('0x3b')]=_[_0xcc27('0xcd')](_0x5ac34a[_0xcc27('0x3b')]);_0x7ad18d[_0xcc27('0xce')]=_[_0xcc27('0xcf')](_0x7ad18d[_0xcc27('0xd1')],_0x7ad18d[_0xcc27('0x3b')]);_0x5e9051[_0xcc27('0x3f')]=_[_0xcc27('0xcf')](_0x7ad18d['model'],qs[_0xcc27('0xd0')](_0x5ac34a[_0xcc27('0x3b')][_0xcc27('0xd0')]));_0x5e9051[_0xcc27('0x3f')]=_0x5e9051[_0xcc27('0x3f')][_0xcc27('0x43')]?_0x5e9051['attributes']:_0x7ad18d[_0xcc27('0xd1')];_0x5e9051[_0xcc27('0xd2')]=qs[_0xcc27('0xd3')](_0x5ac34a['query']['sort']);_0x5e9051[_0xcc27('0x39')]=qs[_0xcc27('0xce')](_[_0xcc27('0xd4')](_0x5ac34a['query'],_0x7ad18d[_0xcc27('0xce')]));if(_0x5ac34a[_0xcc27('0x3b')][_0xcc27('0x27')]){_0x5e9051[_0xcc27('0x39')]=_['merge'](_0x5e9051['where'],{'$or':_[_0xcc27('0x29')](_0x5e9051['attributes'],function(_0x144979){var _0x27e879={};_0x27e879[_0x144979]={'$like':'%'+_0x5ac34a[_0xcc27('0x3b')][_0xcc27('0x27')]+'%'};return _0x27e879;})});}_0x5e9051=_[_0xcc27('0x50')]({},_0x5e9051,_0x5ac34a[_0xcc27('0x51')]);return _0x4b2024[_0xcc27('0xd8')](_0x5e9051);}})[_0xcc27('0x21')](function(_0x4049a6){if(_0x4049a6){_0x3cf889=_0x4049a6['length'];if(!_0x5ac34a[_0xcc27('0x3b')][_0xcc27('0xc6')](_0xcc27('0xd6'))){_0x5e9051[_0xcc27('0x18')]=qs['limit'](_0x5ac34a[_0xcc27('0x3b')]['limit']);_0x5e9051[_0xcc27('0x16')]=qs[_0xcc27('0x16')](_0x5ac34a[_0xcc27('0x3b')][_0xcc27('0x16')]);}return _0x4b2024[_0xcc27('0xd8')](_0x5e9051);}})[_0xcc27('0x21')](function(_0x9372c2){if(_0x9372c2){return _0x9372c2?{'count':_0x3cf889,'rows':_0x9372c2}:null;}})['then'](respondWithResult(_0x1f0a20,null))[_0xcc27('0x4a')](handleError(_0x1f0a20,null));};exports[_0xcc27('0xda')]=function(_0x290577,_0x56083a){var _0x5a9965={'raw':!![],'where':{}};var _0xaa9bbe={};var _0x572891={'count':0x0,'rows':[]};return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0x290577[_0xcc27('0x4c')]['id']}})['then'](handleEntityNotFound(_0x56083a,null))[_0xcc27('0x21')](function(_0x4b9def){if(_0x4b9def){_0xaa9bbe['model']=_[_0xcc27('0xcd')](db[_0xcc27('0xdb')]['rawAttributes']);_0xaa9bbe[_0xcc27('0x3b')]=_[_0xcc27('0xcd')](_0x290577[_0xcc27('0x3b')]);_0xaa9bbe[_0xcc27('0xce')]=_['intersection'](_0xaa9bbe[_0xcc27('0xd1')],_0xaa9bbe[_0xcc27('0x3b')]);_0x5a9965[_0xcc27('0x3f')]=_['intersection'](_0xaa9bbe[_0xcc27('0xd1')],qs[_0xcc27('0xd0')](_0x290577[_0xcc27('0x3b')][_0xcc27('0xd0')]));_0x5a9965[_0xcc27('0x3f')]=_0x5a9965[_0xcc27('0x3f')][_0xcc27('0x43')]?_0x5a9965['attributes']:_0xaa9bbe[_0xcc27('0xd1')];if(!_0x290577[_0xcc27('0x3b')][_0xcc27('0xc6')](_0xcc27('0xd6'))){_0x5a9965[_0xcc27('0x18')]=qs[_0xcc27('0x18')](_0x290577[_0xcc27('0x3b')][_0xcc27('0x18')]);_0x5a9965[_0xcc27('0x16')]=qs['offset'](_0x290577['query']['offset']);}_0x5a9965[_0xcc27('0xd2')]=qs[_0xcc27('0xd3')](_0x290577[_0xcc27('0x3b')][_0xcc27('0xd3')]);_0x5a9965[_0xcc27('0x39')]=qs[_0xcc27('0xce')](_[_0xcc27('0xd4')](_0x290577['query'],_0xaa9bbe['filters']));_0x5a9965[_0xcc27('0x39')][_0xcc27('0xdc')]=_0x4b9def['id'];if(_0x290577['query'][_0xcc27('0x27')]){_0x5a9965[_0xcc27('0x39')]=_[_0xcc27('0x50')](_0x5a9965[_0xcc27('0x39')],{'$or':_[_0xcc27('0x29')](_0x5a9965[_0xcc27('0x3f')],function(_0x107991){var _0x1a7dcc={};_0x1a7dcc[_0x107991]={'$like':'%'+_0x290577[_0xcc27('0x3b')][_0xcc27('0x27')]+'%'};return _0x1a7dcc;})});}_0x5a9965=_['merge']({},_0x5a9965,_0x290577[_0xcc27('0x51')]);return db[_0xcc27('0xdb')][_0xcc27('0x19')]({'where':_0x5a9965[_0xcc27('0x39')]})[_0xcc27('0x21')](function(_0x55ad13){_0x572891[_0xcc27('0x19')]=_0x55ad13;if(_0x290577[_0xcc27('0x3b')][_0xcc27('0x4e')]){_0x5a9965[_0xcc27('0x3c')]=[{'all':!![]}];}return db['VoiceRecording'][_0xcc27('0x40')](_0x5a9965);})[_0xcc27('0x21')](function(_0x2d5c43){_0x572891[_0xcc27('0x41')]=_0x2d5c43;return _0x572891;});}})[_0xcc27('0x21')](respondWithFilteredResult(_0x56083a,_0x5a9965))[_0xcc27('0x4a')](handleError(_0x56083a,null));};exports['getScreenRecordings']=function(_0x39f211,_0x4a8276){var _0x1ad9fe={'raw':!![],'where':{}};var _0x2492d1={};var _0x313d76={'count':0x0,'rows':[]};return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0x39f211[_0xcc27('0x4c')]['id']}})['then'](handleEntityNotFound(_0x4a8276,null))[_0xcc27('0x21')](function(_0x44de3f){if(_0x44de3f){_0x2492d1[_0xcc27('0xd1')]=_['keys'](db[_0xcc27('0xdd')]['rawAttributes']);_0x2492d1['query']=_[_0xcc27('0xcd')](_0x39f211['query']);_0x2492d1[_0xcc27('0xce')]=_[_0xcc27('0xcf')](_0x2492d1[_0xcc27('0xd1')],_0x2492d1['query']);_0x1ad9fe['attributes']=_[_0xcc27('0xcf')](_0x2492d1[_0xcc27('0xd1')],qs[_0xcc27('0xd0')](_0x39f211[_0xcc27('0x3b')][_0xcc27('0xd0')]));_0x1ad9fe[_0xcc27('0x3f')]=_0x1ad9fe['attributes'][_0xcc27('0x43')]?_0x1ad9fe[_0xcc27('0x3f')]:_0x2492d1['model'];if(!_0x39f211[_0xcc27('0x3b')][_0xcc27('0xc6')](_0xcc27('0xd6'))){_0x1ad9fe[_0xcc27('0x18')]=qs[_0xcc27('0x18')](_0x39f211[_0xcc27('0x3b')][_0xcc27('0x18')]);_0x1ad9fe[_0xcc27('0x16')]=qs[_0xcc27('0x16')](_0x39f211['query']['offset']);}_0x1ad9fe[_0xcc27('0xd2')]=qs['sort'](_0x39f211[_0xcc27('0x3b')][_0xcc27('0xd3')]);_0x1ad9fe[_0xcc27('0x39')]=qs[_0xcc27('0xce')](_[_0xcc27('0xd4')](_0x39f211[_0xcc27('0x3b')],_0x2492d1[_0xcc27('0xce')]));_0x1ad9fe[_0xcc27('0x39')][_0xcc27('0xdc')]=_0x44de3f['id'];if(_0x39f211[_0xcc27('0x3b')][_0xcc27('0x27')]){_0x1ad9fe[_0xcc27('0x39')]=_[_0xcc27('0x50')](_0x1ad9fe[_0xcc27('0x39')],{'$or':_[_0xcc27('0x29')](_0x1ad9fe[_0xcc27('0x3f')],function(_0x2972e4){var _0x45fa65={};_0x45fa65[_0x2972e4]={'$like':'%'+_0x39f211[_0xcc27('0x3b')][_0xcc27('0x27')]+'%'};return _0x45fa65;})});}_0x1ad9fe=_[_0xcc27('0x50')]({},_0x1ad9fe,_0x39f211[_0xcc27('0x51')]);return db['ScreenRecording'][_0xcc27('0x19')]({'where':_0x1ad9fe['where']})[_0xcc27('0x21')](function(_0x326f3d){_0x313d76[_0xcc27('0x19')]=_0x326f3d;if(_0x39f211[_0xcc27('0x3b')][_0xcc27('0x4e')]){_0x1ad9fe[_0xcc27('0x3c')]=[{'all':!![]}];}return db[_0xcc27('0xdd')][_0xcc27('0x40')](_0x1ad9fe);})[_0xcc27('0x21')](function(_0x5b5791){_0x313d76['rows']=_0x5b5791;return _0x313d76;});}})[_0xcc27('0x21')](respondWithFilteredResult(_0x4a8276,_0x1ad9fe))[_0xcc27('0x4a')](handleError(_0x4a8276,null));};exports['getChatInteractions']=function(_0x582182,_0x4a84e6){var _0x3be683={};var _0x1ba9ce={};var _0x534356;var _0x4e4359;return db['User']['findOne']({'where':{'id':_0x582182[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x4a84e6,null))[_0xcc27('0x21')](function(_0x1b9a5d){if(_0x1b9a5d){_0x534356=_0x1b9a5d;_0x1ba9ce[_0xcc27('0xd1')]=_['keys'](db[_0xcc27('0xde')][_0xcc27('0x30')]);_0x1ba9ce[_0xcc27('0x3b')]=_[_0xcc27('0xcd')](_0x582182[_0xcc27('0x3b')]);_0x1ba9ce[_0xcc27('0xce')]=_[_0xcc27('0xcf')](_0x1ba9ce[_0xcc27('0xd1')],_0x1ba9ce['query']);_0x3be683[_0xcc27('0x3f')]=_['intersection'](_0x1ba9ce[_0xcc27('0xd1')],qs['fields'](_0x582182['query'][_0xcc27('0xd0')]));_0x3be683[_0xcc27('0x3f')]=_0x3be683['attributes'][_0xcc27('0x43')]?_0x3be683[_0xcc27('0x3f')]:_0x1ba9ce['model'];_0x3be683[_0xcc27('0xd2')]=qs[_0xcc27('0xd3')](_0x582182[_0xcc27('0x3b')][_0xcc27('0xd3')]);_0x3be683[_0xcc27('0x39')]=qs[_0xcc27('0xce')](_[_0xcc27('0xd4')](_0x582182[_0xcc27('0x3b')],_0x1ba9ce[_0xcc27('0xce')]));if(_0x582182[_0xcc27('0x3b')][_0xcc27('0x27')]){_0x3be683[_0xcc27('0x39')]=_[_0xcc27('0x50')](_0x3be683[_0xcc27('0x39')],{'$or':_['map'](_0x3be683[_0xcc27('0x3f')],function(_0x5ad0c5){var _0x584d7b={};_0x584d7b[_0x5ad0c5]={'$like':'%'+_0x582182['query'][_0xcc27('0x27')]+'%'};return _0x584d7b;})});}_0x3be683=_[_0xcc27('0x50')]({},_0x3be683,_0x582182[_0xcc27('0x51')]);return _0x534356['getChatInteractions'](_0x3be683);}})['then'](function(_0x33c288){if(_0x33c288){_0x4e4359=_0x33c288[_0xcc27('0x43')];if(!_0x582182['query'][_0xcc27('0xc6')](_0xcc27('0xd6'))){_0x3be683[_0xcc27('0x18')]=qs[_0xcc27('0x18')](_0x582182['query'][_0xcc27('0x18')]);_0x3be683['offset']=qs['offset'](_0x582182[_0xcc27('0x3b')][_0xcc27('0x16')]);}return _0x534356[_0xcc27('0xdf')](_0x3be683);}})[_0xcc27('0x21')](function(_0x17d841){if(_0x17d841){return _0x17d841?{'count':_0x4e4359,'rows':_0x17d841}:null;}})[_0xcc27('0x21')](respondWithResult(_0x4a84e6,null))['catch'](handleError(_0x4a84e6,null));};exports[_0xcc27('0xe0')]=function(_0x56b9bf,_0x58ea53){var _0x489207={};var _0x19a767={};var _0x14cbbd;var _0x119609;return db[_0xcc27('0x3a')]['findOne']({'where':{'id':_0x56b9bf['params']['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x58ea53,null))[_0xcc27('0x21')](function(_0x4da7a5){if(_0x4da7a5){_0x14cbbd=_0x4da7a5;_0x19a767[_0xcc27('0xd1')]=_[_0xcc27('0xcd')](db[_0xcc27('0xe1')][_0xcc27('0x30')]);_0x19a767['query']=_[_0xcc27('0xcd')](_0x56b9bf[_0xcc27('0x3b')]);_0x19a767[_0xcc27('0xce')]=_['intersection'](_0x19a767[_0xcc27('0xd1')],_0x19a767['query']);_0x489207['attributes']=_[_0xcc27('0xcf')](_0x19a767[_0xcc27('0xd1')],qs[_0xcc27('0xd0')](_0x56b9bf[_0xcc27('0x3b')][_0xcc27('0xd0')]));_0x489207['attributes']=_0x489207[_0xcc27('0x3f')]['length']?_0x489207[_0xcc27('0x3f')]:_0x19a767[_0xcc27('0xd1')];_0x489207[_0xcc27('0xd2')]=qs[_0xcc27('0xd3')](_0x56b9bf[_0xcc27('0x3b')]['sort']);_0x489207[_0xcc27('0x39')]=qs[_0xcc27('0xce')](_[_0xcc27('0xd4')](_0x56b9bf[_0xcc27('0x3b')],_0x19a767[_0xcc27('0xce')]));if(_0x56b9bf[_0xcc27('0x3b')][_0xcc27('0x27')]){_0x489207[_0xcc27('0x39')]=_[_0xcc27('0x50')](_0x489207['where'],{'$or':_[_0xcc27('0x29')](_0x489207[_0xcc27('0x3f')],function(_0x311426){var _0x52b223={};_0x52b223[_0x311426]={'$like':'%'+_0x56b9bf[_0xcc27('0x3b')][_0xcc27('0x27')]+'%'};return _0x52b223;})});}_0x489207=_['merge']({},_0x489207,_0x56b9bf[_0xcc27('0x51')]);return _0x14cbbd[_0xcc27('0xe0')](_0x489207);}})[_0xcc27('0x21')](function(_0x3d7e92){if(_0x3d7e92){_0x119609=_0x3d7e92[_0xcc27('0x43')];if(!_0x56b9bf[_0xcc27('0x3b')][_0xcc27('0xc6')](_0xcc27('0xd6'))){_0x489207['limit']=qs[_0xcc27('0x18')](_0x56b9bf[_0xcc27('0x3b')][_0xcc27('0x18')]);_0x489207[_0xcc27('0x16')]=qs['offset'](_0x56b9bf[_0xcc27('0x3b')]['offset']);}return _0x14cbbd[_0xcc27('0xe0')](_0x489207);}})[_0xcc27('0x21')](function(_0x15291a){if(_0x15291a){return _0x15291a?{'count':_0x119609,'rows':_0x15291a}:null;}})[_0xcc27('0x21')](respondWithResult(_0x58ea53,null))[_0xcc27('0x4a')](handleError(_0x58ea53,null));};exports['getMailInteractions']=function(_0x1d874d,_0x2240d4){var _0x44f177={'raw':!![],'where':{}};var _0x494128={};var _0x877685={'count':0x0,'rows':[]};return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0x1d874d[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x2240d4,null))['then'](function(_0x2c4691){if(_0x2c4691){_0x494128[_0xcc27('0xd1')]=_['keys'](db[_0xcc27('0xe2')][_0xcc27('0x30')]);_0x494128[_0xcc27('0x3b')]=_['keys'](_0x1d874d[_0xcc27('0x3b')]);_0x494128[_0xcc27('0xce')]=_['intersection'](_0x494128['model'],_0x494128[_0xcc27('0x3b')]);_0x44f177['attributes']=_[_0xcc27('0xcf')](_0x494128['model'],qs[_0xcc27('0xd0')](_0x1d874d['query'][_0xcc27('0xd0')]));_0x44f177[_0xcc27('0x3f')]=_0x44f177[_0xcc27('0x3f')]['length']?_0x44f177[_0xcc27('0x3f')]:_0x494128['model'];if(!_0x1d874d['query'][_0xcc27('0xc6')](_0xcc27('0xd6'))){_0x44f177[_0xcc27('0x18')]=qs['limit'](_0x1d874d[_0xcc27('0x3b')]['limit']);_0x44f177[_0xcc27('0x16')]=qs['offset'](_0x1d874d['query'][_0xcc27('0x16')]);}_0x44f177[_0xcc27('0xd2')]=qs[_0xcc27('0xd3')](_0x1d874d[_0xcc27('0x3b')][_0xcc27('0xd3')]);_0x44f177[_0xcc27('0x39')]=qs[_0xcc27('0xce')](_[_0xcc27('0xd4')](_0x1d874d[_0xcc27('0x3b')],_0x494128[_0xcc27('0xce')]));_0x44f177[_0xcc27('0x39')]['UserId']=_0x2c4691['id'];if(_0x1d874d[_0xcc27('0x3b')][_0xcc27('0x27')]){_0x44f177['where']=_[_0xcc27('0x50')](_0x44f177[_0xcc27('0x39')],{'$or':_['map'](_0x44f177[_0xcc27('0x3f')],function(_0x16b103){var _0x5a5667={};_0x5a5667[_0x16b103]={'$like':'%'+_0x1d874d[_0xcc27('0x3b')][_0xcc27('0x27')]+'%'};return _0x5a5667;})});}_0x44f177=_[_0xcc27('0x50')]({},_0x44f177,_0x1d874d[_0xcc27('0x51')]);return db[_0xcc27('0xe2')][_0xcc27('0x19')]({'where':_0x44f177['where']})[_0xcc27('0x21')](function(_0x53ec59){_0x877685[_0xcc27('0x19')]=_0x53ec59;if(_0x1d874d['query'][_0xcc27('0x4e')]){_0x44f177[_0xcc27('0x3c')]=[{'all':!![]}];}return db[_0xcc27('0xe2')]['findAll'](_0x44f177);})[_0xcc27('0x21')](function(_0x143853){_0x877685[_0xcc27('0x41')]=_0x143853;return _0x877685;});}})[_0xcc27('0x21')](respondWithFilteredResult(_0x2240d4,_0x44f177))[_0xcc27('0x4a')](handleError(_0x2240d4,null));};exports['getSmsInteractions']=function(_0x1bce43,_0x93fba4){var _0x5e00d8={};var _0x566e91={};var _0x329dab;var _0x13b941;return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0x1bce43[_0xcc27('0x4c')]['id']}})['then'](handleEntityNotFound(_0x93fba4,null))[_0xcc27('0x21')](function(_0x1fd308){if(_0x1fd308){_0x329dab=_0x1fd308;_0x566e91[_0xcc27('0xd1')]=_[_0xcc27('0xcd')](db['SmsInteraction'][_0xcc27('0x30')]);_0x566e91[_0xcc27('0x3b')]=_[_0xcc27('0xcd')](_0x1bce43['query']);_0x566e91[_0xcc27('0xce')]=_[_0xcc27('0xcf')](_0x566e91[_0xcc27('0xd1')],_0x566e91[_0xcc27('0x3b')]);_0x5e00d8[_0xcc27('0x3f')]=_[_0xcc27('0xcf')](_0x566e91[_0xcc27('0xd1')],qs[_0xcc27('0xd0')](_0x1bce43[_0xcc27('0x3b')][_0xcc27('0xd0')]));_0x5e00d8[_0xcc27('0x3f')]=_0x5e00d8[_0xcc27('0x3f')][_0xcc27('0x43')]?_0x5e00d8[_0xcc27('0x3f')]:_0x566e91[_0xcc27('0xd1')];_0x5e00d8['order']=qs[_0xcc27('0xd3')](_0x1bce43[_0xcc27('0x3b')][_0xcc27('0xd3')]);_0x5e00d8[_0xcc27('0x39')]=qs[_0xcc27('0xce')](_[_0xcc27('0xd4')](_0x1bce43[_0xcc27('0x3b')],_0x566e91[_0xcc27('0xce')]));if(_0x1bce43[_0xcc27('0x3b')][_0xcc27('0x27')]){_0x5e00d8[_0xcc27('0x39')]=_[_0xcc27('0x50')](_0x5e00d8[_0xcc27('0x39')],{'$or':_[_0xcc27('0x29')](_0x5e00d8[_0xcc27('0x3f')],function(_0x38aa41){var _0xffcaa5={};_0xffcaa5[_0x38aa41]={'$like':'%'+_0x1bce43[_0xcc27('0x3b')][_0xcc27('0x27')]+'%'};return _0xffcaa5;})});}_0x5e00d8=_['merge']({},_0x5e00d8,_0x1bce43[_0xcc27('0x51')]);return _0x329dab['getSmsInteractions'](_0x5e00d8);}})[_0xcc27('0x21')](function(_0x5ecbc7){if(_0x5ecbc7){_0x13b941=_0x5ecbc7[_0xcc27('0x43')];if(!_0x1bce43['query'][_0xcc27('0xc6')]('nolimit')){_0x5e00d8[_0xcc27('0x18')]=qs[_0xcc27('0x18')](_0x1bce43[_0xcc27('0x3b')]['limit']);_0x5e00d8[_0xcc27('0x16')]=qs['offset'](_0x1bce43[_0xcc27('0x3b')][_0xcc27('0x16')]);}return _0x329dab['getSmsInteractions'](_0x5e00d8);}})['then'](function(_0x743120){if(_0x743120){return _0x743120?{'count':_0x13b941,'rows':_0x743120}:null;}})['then'](respondWithResult(_0x93fba4,null))[_0xcc27('0x4a')](handleError(_0x93fba4,null));};exports[_0xcc27('0xe3')]=function(_0x445265,_0x1e71d8){var _0xc8eb04={};var _0x432a03={};var _0x245a48;var _0x3d5a52;return db[_0xcc27('0x3a')]['findOne']({'where':{'id':_0x445265[_0xcc27('0x4c')]['id']}})['then'](handleEntityNotFound(_0x1e71d8,null))[_0xcc27('0x21')](function(_0x28da65){if(_0x28da65){_0x245a48=_0x28da65;_0x432a03[_0xcc27('0xd1')]=_['keys'](db[_0xcc27('0xe4')]['rawAttributes']);_0x432a03['query']=_[_0xcc27('0xcd')](_0x445265[_0xcc27('0x3b')]);_0x432a03[_0xcc27('0xce')]=_[_0xcc27('0xcf')](_0x432a03[_0xcc27('0xd1')],_0x432a03[_0xcc27('0x3b')]);_0xc8eb04[_0xcc27('0x3f')]=_['intersection'](_0x432a03[_0xcc27('0xd1')],qs[_0xcc27('0xd0')](_0x445265[_0xcc27('0x3b')][_0xcc27('0xd0')]));_0xc8eb04[_0xcc27('0x3f')]=_0xc8eb04[_0xcc27('0x3f')][_0xcc27('0x43')]?_0xc8eb04[_0xcc27('0x3f')]:_0x432a03[_0xcc27('0xd1')];_0xc8eb04['order']=qs[_0xcc27('0xd3')](_0x445265[_0xcc27('0x3b')][_0xcc27('0xd3')]);_0xc8eb04[_0xcc27('0x39')]=qs[_0xcc27('0xce')](_['pick'](_0x445265[_0xcc27('0x3b')],_0x432a03['filters']));if(_0x445265[_0xcc27('0x3b')]['filter']){_0xc8eb04[_0xcc27('0x39')]=_['merge'](_0xc8eb04[_0xcc27('0x39')],{'$or':_[_0xcc27('0x29')](_0xc8eb04[_0xcc27('0x3f')],function(_0x471cff){var _0x1ad346={};_0x1ad346[_0x471cff]={'$like':'%'+_0x445265[_0xcc27('0x3b')]['filter']+'%'};return _0x1ad346;})});}_0xc8eb04=_[_0xcc27('0x50')]({},_0xc8eb04,_0x445265[_0xcc27('0x51')]);return _0x245a48[_0xcc27('0xe3')](_0xc8eb04);}})[_0xcc27('0x21')](function(_0x9b5532){if(_0x9b5532){_0x3d5a52=_0x9b5532[_0xcc27('0x43')];if(!_0x445265[_0xcc27('0x3b')][_0xcc27('0xc6')](_0xcc27('0xd6'))){_0xc8eb04[_0xcc27('0x18')]=qs['limit'](_0x445265[_0xcc27('0x3b')]['limit']);_0xc8eb04['offset']=qs['offset'](_0x445265[_0xcc27('0x3b')][_0xcc27('0x16')]);}return _0x245a48['getFaxInteractions'](_0xc8eb04);}})[_0xcc27('0x21')](function(_0xdd1b1d){if(_0xdd1b1d){return _0xdd1b1d?{'count':_0x3d5a52,'rows':_0xdd1b1d}:null;}})[_0xcc27('0x21')](respondWithResult(_0x1e71d8,null))['catch'](handleError(_0x1e71d8,null));};exports['getWhatsappInteractions']=function(_0xdb6086,_0x5e4695){var _0x757282={};var _0xa76fc1={};var _0x3dc225;var _0x20b3e6;return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0xdb6086[_0xcc27('0x4c')]['id']}})['then'](handleEntityNotFound(_0x5e4695,null))[_0xcc27('0x21')](function(_0x194025){if(_0x194025){_0x3dc225=_0x194025;_0xa76fc1[_0xcc27('0xd1')]=_[_0xcc27('0xcd')](db[_0xcc27('0xe5')][_0xcc27('0x30')]);_0xa76fc1[_0xcc27('0x3b')]=_[_0xcc27('0xcd')](_0xdb6086['query']);_0xa76fc1[_0xcc27('0xce')]=_[_0xcc27('0xcf')](_0xa76fc1[_0xcc27('0xd1')],_0xa76fc1[_0xcc27('0x3b')]);_0x757282[_0xcc27('0x3f')]=_['intersection'](_0xa76fc1[_0xcc27('0xd1')],qs['fields'](_0xdb6086[_0xcc27('0x3b')][_0xcc27('0xd0')]));_0x757282[_0xcc27('0x3f')]=_0x757282['attributes'][_0xcc27('0x43')]?_0x757282[_0xcc27('0x3f')]:_0xa76fc1[_0xcc27('0xd1')];_0x757282[_0xcc27('0xd2')]=qs[_0xcc27('0xd3')](_0xdb6086['query'][_0xcc27('0xd3')]);_0x757282[_0xcc27('0x39')]=qs['filters'](_[_0xcc27('0xd4')](_0xdb6086[_0xcc27('0x3b')],_0xa76fc1['filters']));if(_0xdb6086['query'][_0xcc27('0x27')]){_0x757282[_0xcc27('0x39')]=_['merge'](_0x757282[_0xcc27('0x39')],{'$or':_['map'](_0x757282[_0xcc27('0x3f')],function(_0xf36b1a){var _0x137a2b={};_0x137a2b[_0xf36b1a]={'$like':'%'+_0xdb6086['query'][_0xcc27('0x27')]+'%'};return _0x137a2b;})});}_0x757282=_['merge']({},_0x757282,_0xdb6086[_0xcc27('0x51')]);return _0x3dc225[_0xcc27('0xe6')](_0x757282);}})[_0xcc27('0x21')](function(_0x562780){if(_0x562780){_0x20b3e6=_0x562780[_0xcc27('0x43')];if(!_0xdb6086['query'][_0xcc27('0xc6')]('nolimit')){_0x757282[_0xcc27('0x18')]=qs[_0xcc27('0x18')](_0xdb6086[_0xcc27('0x3b')][_0xcc27('0x18')]);_0x757282['offset']=qs[_0xcc27('0x16')](_0xdb6086['query'][_0xcc27('0x16')]);}return _0x3dc225[_0xcc27('0xe6')](_0x757282);}})[_0xcc27('0x21')](function(_0x322726){if(_0x322726){return _0x322726?{'count':_0x20b3e6,'rows':_0x322726}:null;}})[_0xcc27('0x21')](respondWithResult(_0x5e4695,null))[_0xcc27('0x4a')](handleError(_0x5e4695,null));};exports[_0xcc27('0xe7')]=function(_0x381ba4,_0x51f340,_0x318f6a){var _0x28b057;var _0x1f6df1;var _0x3d8f94;var _0x168b5d=!_['isNil'](_0x381ba4[_0xcc27('0x4c')]['id'])?_0x381ba4[_0xcc27('0x4c')]['id']:!_[_0xcc27('0x63')](_0x381ba4['user']['id'])?_0x381ba4[_0xcc27('0x24')]['id']:null;return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x168b5d,'role':{'$or':[_0xcc27('0x78'),_0xcc27('0x24'),'agent']}},'attributes':['id','name','phone','mobile',_0xcc27('0x1d'),'internal',_0xcc27('0x98')]})[_0xcc27('0x21')](function(_0xf7a566){if(_0xf7a566){if(_0xf7a566[_0xcc27('0x1d')]==='agent'){_0x28b057=_0xf7a566;if(_0x381ba4[_0xcc27('0x54')][_0xcc27('0x9a')]){_0x3d8f94=util[_0xcc27('0xa5')](_0xcc27('0xe8'),_0x28b057[_0x381ba4[_0xcc27('0x54')][_0xcc27('0x9a')]]);}else if(_0x381ba4['body']['intrf']){_0x3d8f94=util[_0xcc27('0xa5')]('SIP/%s',_0x381ba4[_0xcc27('0x54')][_0xcc27('0xe9')]);}else{_0x3d8f94=util['format']('SIP/%s',_0x28b057[_0xcc27('0x2c')]);}socket['to'](util[_0xcc27('0xa5')](_0xcc27('0xea'),_0x28b057[_0xcc27('0x2c')]))['emit'](_0xcc27('0xeb'),{'user':{'id':_0x28b057['id'],'name':_0x28b057[_0xcc27('0x2c')]},'ip':_0x381ba4[_0xcc27('0xec')][_0xcc27('0xed')]||_0x381ba4[_0xcc27('0xee')][_0xcc27('0xef')]||_0x381ba4[_0xcc27('0xf0')][_0xcc27('0xef')]||_0x381ba4[_0xcc27('0xee')][_0xcc27('0xf0')][_0xcc27('0xef')]});return db[_0xcc27('0xa6')][_0xcc27('0x20')]({'where':{'membername':_0x28b057[_0xcc27('0x2c')]},'individualHooks':!![]});}}else{throw new db[(_0xcc27('0x89'))]['ValidationError'](_0xcc27('0xf1'));}})[_0xcc27('0x21')](function(){if(_0x28b057){return _0x28b057[_0xcc27('0xf2')]({'raw':!![]});}})[_0xcc27('0x21')](function(_0x5d6e9a){if(_0x28b057){if(_0x5d6e9a){_0x1f6df1=_0x5d6e9a;if(_0x1f6df1[_0xcc27('0x43')]){var _0x14944a=_0x1f6df1[_0xcc27('0x29')](function(_0x513ebb){var _0x4efa32={'membername':_0x28b057[_0xcc27('0x2c')],'UserId':_0x28b057['id'],'queue_name':_0x513ebb['name'],'VoiceQueueId':_0x513ebb['id'],'interface':_0x3d8f94,'paused':_0x28b057[_0xcc27('0x98')]||![],'penalty':_0x513ebb[_0xcc27('0xf3')]||0x0};return db[_0xcc27('0xa6')][_0xcc27('0xa7')](_0x4efa32);});return Promise['all'](_0x14944a);}}}})[_0xcc27('0x21')](function(){if(_0x28b057){return db[_0xcc27('0xf4')][_0xcc27('0x40')]({'where':{'membername':_0x28b057[_0xcc27('0x2c')],'exitAt':null}});}})['then'](function(_0x533821){if(_0x28b057){var _0x4cec24=[];_0x533821[_0xcc27('0xf5')](function(_0x3112d3){_0x4cec24[_0xcc27('0x44')](_0x3112d3[_0xcc27('0x1c')]({'exitAt':moment()[_0xcc27('0xa5')](_0xcc27('0xf6'))}));});return Promise[_0xcc27('0x49')](_0x4cec24);}})[_0xcc27('0x21')](function(){if(_0x28b057){var _0x56ef72=[];var _0x2e1086=[];var _0x398ea4=utils[_0xcc27('0xf7')]();var _0x3392aa={'membername':_0x28b057[_0xcc27('0x2c')],'interface':_0x3d8f94,'enterAt':moment()['format'](_0xcc27('0xf6')),'role':_0x28b057[_0xcc27('0x1d')],'internal':_0x28b057[_0xcc27('0x5e')]};_0x398ea4[_0xcc27('0xf5')](function(_0x51eafe){_0x56ef72['push'](_['merge']({'channel':_0x51eafe,'type':'LOGIN','data1':_0x381ba4[_0xcc27('0x54')][_0xcc27('0xf8')],'data2':_0x3d8f94},_0x3392aa));if(_0x28b057[_0xcc27('0x98')]){_0x2e1086['push'](_[_0xcc27('0x50')]({'channel':_0x51eafe,'type':_0xcc27('0xf9'),'data1':'LOGININPAUSE'},_0x3392aa));}});return db[_0xcc27('0xf4')][_0xcc27('0xfa')](_0x56ef72[_0xcc27('0xc3')](_0x2e1086),{'individualHooks':!![]});}})['then'](function(){if(_0x28b057){return _0x28b057[_0xcc27('0x1c')]({'online':!![],'lastLoginAt':moment()[_0xcc27('0xa5')](_0xcc27('0xf6')),'voicePause':_0x28b057['loginInPause']||![],'mailPause':_0x28b057[_0xcc27('0x98')]||![],'chatPause':_0x28b057[_0xcc27('0x98')]||![],'faxPause':_0x28b057[_0xcc27('0x98')]||![],'smsPause':_0x28b057['loginInPause']||![],'openchannelPause':_0x28b057['loginInPause']||![],'whatsappPause':_0x28b057[_0xcc27('0x98')]||![],'pauseType':_0x28b057[_0xcc27('0x98')]?'LOGININPAUSE':null,'interface':_0x3d8f94,'lastPauseAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')});}})[_0xcc27('0x21')](function(_0x24bf83){if(_0x381ba4[_0xcc27('0xfb')]){return _0x318f6a();}else{return Promise[_0xcc27('0xfc')](_0x24bf83)[_0xcc27('0x21')](respondWithResult(_0x51f340,null));}})[_0xcc27('0x4a')](handleError(_0x51f340,null));};exports['logout']=function(_0x15082a,_0x3ae490){var _0x186e31;return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x15082a[_0xcc27('0x4c')]['id'],'role':_0xcc27('0x26')},'attributes':['id',_0xcc27('0x2c'),_0xcc27('0x1d')]})['then'](handleEntityNotFound(_0x3ae490,null))[_0xcc27('0x21')](function(_0x5a9a9f){if(_0x5a9a9f){_0x186e31=_0x5a9a9f;return db[_0xcc27('0xa6')][_0xcc27('0x20')]({'where':{'membername':_0x186e31[_0xcc27('0x2c')]},'individualHooks':!![]});}})[_0xcc27('0x21')](function(){return db[_0xcc27('0xf4')]['findAll']({'where':{'membername':_0x186e31['name'],'exitAt':null}});})[_0xcc27('0x21')](function(_0x4ea6ad){var _0x6144c7=[];_0x4ea6ad['forEach'](function(_0x2d2961){_0x6144c7[_0xcc27('0x44')](_0x2d2961[_0xcc27('0x1c')]({'exitAt':moment()[_0xcc27('0xa5')]('YYYY-MM-DD\x20HH:mm:ss')}));});return Promise[_0xcc27('0x49')](_0x6144c7);})[_0xcc27('0x21')](function(){return _0x186e31[_0xcc27('0x1c')]({'online':![],'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![],'whatsappPause':![],'interface':null});})[_0xcc27('0x21')](respondWithResult(_0x3ae490,null))['catch'](handleError(_0x3ae490,null));};exports[_0xcc27('0xfd')]=function(_0x417cd4,_0x2e6ae2){var _0x4cf00e;return db[_0xcc27('0xa6')][_0xcc27('0x1c')]({'paused':0x1},{'where':{'UserId':_0x417cd4[_0xcc27('0x4c')]['id']},'individualHooks':!![]})[_0xcc27('0x21')](function(){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x417cd4['params']['id'],'role':_0xcc27('0x26')},'attributes':['id','name','role',_0xcc27('0x5e'),_0xcc27('0x9a'),_0xcc27('0x97')]});})[_0xcc27('0x21')](handleEntityNotFound(_0x2e6ae2,null))[_0xcc27('0x21')](function(_0x2ee51c){if(_0x2ee51c){_0x4cf00e=_0x2ee51c;return db[_0xcc27('0xf4')][_0xcc27('0x40')]({'where':{'membername':_0x4cf00e['name'],'type':_0xcc27('0xf9'),'exitAt':null}});}})['then'](function(_0x241f90){if(_0x241f90[_0xcc27('0x43')]){var _0x38887a=moment()[_0xcc27('0xa5')]('YYYY-MM-DD\x20HH:mm:ss');for(var _0x20aaf3=0x0,_0x37dab5=_0x241f90[_0xcc27('0x43')];_0x20aaf3<_0x37dab5;_0x20aaf3++){_0x241f90[_0x20aaf3][_0xcc27('0xfe')]({'exitAt':_0x38887a});}}})['then'](function(){var _0x44331b=[];var _0x246a1d=utils[_0xcc27('0xf7')]();_0x246a1d[_0xcc27('0xf5')](function(_0x3b173f){_0x44331b[_0xcc27('0x44')]({'channel':_0x3b173f,'membername':_0x4cf00e[_0xcc27('0x2c')],'interface':_[_0xcc27('0x63')](_0x4cf00e[_0xcc27('0x9a')])?util['format'](_0xcc27('0xff'),_0x4cf00e[_0xcc27('0x2c')]):_0x4cf00e[_0xcc27('0x9a')],'type':_0xcc27('0xf9'),'enterAt':moment()['format'](_0xcc27('0xf6')),'data1':_0x417cd4[_0xcc27('0x54')][_0xcc27('0x100')]||_0xcc27('0x101'),'role':_0x4cf00e[_0xcc27('0x1d')],'internal':_0x4cf00e[_0xcc27('0x5e')]});});return db[_0xcc27('0xf4')][_0xcc27('0xfa')](_0x44331b,{'individualHooks':!![]});})['then'](function(){return _0x4cf00e[_0xcc27('0x1c')]({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'whatsappPause':!![],'openchannelPause':!![],'pauseType':_0x417cd4['body'][_0xcc27('0x100')]||_0xcc27('0x101'),'lastPauseAt':moment()[_0xcc27('0xa5')](_0xcc27('0xf6'))});})[_0xcc27('0x21')](respondWithResult(_0x2e6ae2,null))[_0xcc27('0x4a')](handleError(_0x2e6ae2,null));};exports['unpause']=function(_0x968a78,_0x5a40dd){if(_0x968a78[_0xcc27('0x54')][_0xcc27('0x96')]&&!utils[_0xcc27('0xa9')](_0x968a78[_0xcc27('0x54')]['channel'])){throw new APIBadRequestError(util[_0xcc27('0xa5')](_0xcc27('0x102'),_0x968a78[_0xcc27('0x54')]['channel']));}return db[_0xcc27('0x3a')]['find']({'where':{'id':_0x968a78[_0xcc27('0x4c')]['id']},'attributes':['id','name',_0xcc27('0x1d'),'internal',_0xcc27('0x9a'),_0xcc27('0x97'),'voicePause',_0xcc27('0x103'),_0xcc27('0x104'),_0xcc27('0x105'),'openchannelPause','smsPause',_0xcc27('0x106'),_0xcc27('0x107'),_0xcc27('0x108')]})[_0xcc27('0x21')](function(_0x21daa3){if(!_0x21daa3){throw new APINotFoundError(util[_0xcc27('0xa5')](_0xcc27('0xc5'),_0x968a78[_0xcc27('0x4c')]['id']));}return _0x21daa3[_0xcc27('0x109')](_0x968a78[_0xcc27('0x54')]['channel']);})[_0xcc27('0x21')](respondWithResult(_0x5a40dd,null))[_0xcc27('0x4a')](APIHandleError(_0x5a40dd));};exports[_0xcc27('0x10a')]=function(_0x24e9ae,_0x1c715f){var _0x1202b0={};var _0x2259f3={};var _0x4e9c1f;var _0x372be9;return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0x24e9ae[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x1c715f,null))[_0xcc27('0x21')](function(_0x21a10e){if(_0x21a10e){_0x4e9c1f=_0x21a10e;_0x2259f3[_0xcc27('0xd1')]=_[_0xcc27('0xcd')](db[_0xcc27('0x10b')][_0xcc27('0x30')]);_0x2259f3['query']=_[_0xcc27('0xcd')](_0x24e9ae[_0xcc27('0x3b')]);_0x2259f3['filters']=_['intersection'](_0x2259f3['model'],_0x2259f3['query']);_0x1202b0[_0xcc27('0x3f')]=_[_0xcc27('0xcf')](_0x2259f3[_0xcc27('0xd1')],qs['fields'](_0x24e9ae[_0xcc27('0x3b')][_0xcc27('0xd0')]));_0x1202b0['attributes']=_0x1202b0[_0xcc27('0x3f')][_0xcc27('0x43')]?_0x1202b0[_0xcc27('0x3f')]:_0x2259f3[_0xcc27('0xd1')];_0x1202b0[_0xcc27('0xd2')]=qs[_0xcc27('0xd3')](_0x24e9ae[_0xcc27('0x3b')][_0xcc27('0xd3')]);_0x1202b0[_0xcc27('0x39')]=qs['filters'](_['pick'](_0x24e9ae[_0xcc27('0x3b')],_0x2259f3[_0xcc27('0xce')]));if(_0x24e9ae[_0xcc27('0x3b')]['filter']){_0x1202b0[_0xcc27('0x39')]=_[_0xcc27('0x50')](_0x1202b0[_0xcc27('0x39')],{'$or':_[_0xcc27('0x29')](_0x1202b0[_0xcc27('0x3f')],function(_0x1f896f){var _0x382ff4={};_0x382ff4[_0x1f896f]={'$like':'%'+_0x24e9ae['query']['filter']+'%'};return _0x382ff4;})});}_0x1202b0=_[_0xcc27('0x50')]({},_0x1202b0,_0x24e9ae['options']);return _0x4e9c1f[_0xcc27('0x10a')](_0x1202b0);}})[_0xcc27('0x21')](function(_0x21c0b1){if(_0x21c0b1){_0x372be9=_0x21c0b1[_0xcc27('0x43')];if(!_0x24e9ae[_0xcc27('0x3b')][_0xcc27('0xc6')](_0xcc27('0xd6'))){_0x1202b0[_0xcc27('0x18')]=qs[_0xcc27('0x18')](_0x24e9ae['query'][_0xcc27('0x18')]);_0x1202b0[_0xcc27('0x16')]=qs['offset'](_0x24e9ae[_0xcc27('0x3b')][_0xcc27('0x16')]);}return _0x4e9c1f[_0xcc27('0x10a')](_0x1202b0);}})['then'](function(_0x38af6a){if(_0x38af6a){return _0x38af6a?{'count':_0x372be9,'rows':_0x38af6a}:null;}})['then'](respondWithResult(_0x1c715f,null))[_0xcc27('0x4a')](handleError(_0x1c715f,null));};exports[_0xcc27('0x10c')]=function(_0x476e7b,_0x4cb7bb){var _0x29bbf2=_0x476e7b[_0xcc27('0x4c')]['id'];var _0x202a26=_0x476e7b['body']?_0x476e7b[_0xcc27('0x54')]['ids']:null;var _0x49ea21=[];return Promise['resolve']()[_0xcc27('0x21')](function(){if(!_0x202a26)throw new APIBadRequestError(_0xcc27('0x10d'));})['then'](function(){return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0x29bbf2}});})[_0xcc27('0x21')](function(_0x1d1f0f){if(!_0x1d1f0f)throw new APINotFoundError(util['format'](_0xcc27('0xc5'),_0x476e7b[_0xcc27('0x4c')]['id']));return db['sequelize'][_0xcc27('0x10e')](function(_0x9affd0){return _0x1d1f0f[_0xcc27('0x10c')](_0x202a26,{'transaction':_0x9affd0})[_0xcc27('0x21')](function(){return db[_0xcc27('0x10b')][_0xcc27('0x40')]({'where':{'id':{'$in':_0x202a26}}});})[_0xcc27('0x21')](function(_0x2e7d98){var _0x46652b=_['map'](_0x2e7d98,function(_0x4e5eb6){return _0x4e5eb6[_0xcc27('0x10f')]();});return Promise[_0xcc27('0x49')](_0x46652b);})['then'](function(_0x5e4f6d){_0x49ea21=_['flattenDeep'](_0x5e4f6d);var _0x151cd9=_[_0xcc27('0x29')](_0x49ea21,function(_0x24fdea){return _0x24fdea[_0xcc27('0x110')](_0x1d1f0f['id'],{'transaction':_0x9affd0});});return Promise['all'](_0x151cd9);})[_0xcc27('0x21')](function(){if(!_0x1d1f0f[_0xcc27('0x97')])return;var _0xbe730=_['filter'](_0x49ea21,function(_0x180adb){return _0x180adb[_0xcc27('0x111')]('channel')==='Voice';});var _0x57be76=_[_0xcc27('0x29')](_0xbe730,function(_0x303a7b){return db['UserVoiceQueueRt'][_0xcc27('0xa7')]({'membername':_0x1d1f0f[_0xcc27('0x2c')],'UserId':_0x1d1f0f['id'],'queue_name':_0x303a7b['name'],'VoiceQueueId':_0x303a7b['id'],'interface':_[_0xcc27('0x63')](_0x1d1f0f['interface'])?util[_0xcc27('0xa5')](_0xcc27('0xff'),_0x1d1f0f[_0xcc27('0x2c')]):_0x1d1f0f['interface'],'paused':_0x1d1f0f[_0xcc27('0x99')]||![],'penalty':_0x1d1f0f[_0xcc27('0x9f')]},{'transaction':_0x9affd0});});return Promise[_0xcc27('0x49')](_0x57be76);})[_0xcc27('0x21')](function(){return db[_0xcc27('0x112')][_0xcc27('0x40')]({'where':{'teamId':{'$in':_0x202a26}}});})['then'](function(_0x5166f4){var _0x221371=_['map'](_0x5166f4,function(_0x125be5){return db['UserVoicePrefix'][_0xcc27('0x77')]({'UserId':_0x1d1f0f['id'],'VoicePrefixId':_0x125be5['VoicePrefixId']},{'transaction':_0x9affd0});});return Promise[_0xcc27('0x49')](_0x221371);});});})[_0xcc27('0x21')](function(){for(var _0x36325a=0x0;_0x36325a<_0x49ea21['length'];_0x36325a++){var _0x444b5c=_0x49ea21[_0x36325a][_0xcc27('0x111')](_0xcc27('0x96'));var _0x40e5d2=_0x444b5c+_0xcc27('0xa1');socket[_0xcc27('0x1e')]('user'+_0x444b5c+_0xcc27('0xa2'),{'UserId':_0x29bbf2,['queueField']:_0x49ea21[_0x36325a]['id']});}})[_0xcc27('0x21')](respondWithStatusCode(_0x4cb7bb,null))[_0xcc27('0x4a')](APIHandleError(_0x4cb7bb));};exports[_0xcc27('0x113')]=function(_0x548386,_0x9ec0da){var _0x4f0713=_0x548386[_0xcc27('0x4c')]['id'];var _0x1c4ef0=null;if(_0x548386[_0xcc27('0x3b')][_0xcc27('0x57')]){_0x1c4ef0=_[_0xcc27('0x114')](_0x548386[_0xcc27('0x3b')][_0xcc27('0x57')])?_0x548386['query'][_0xcc27('0x57')]:[_0x548386['query'][_0xcc27('0x57')]];}var _0x2d1d60=[];return Promise[_0xcc27('0xfc')]()[_0xcc27('0x21')](function(){if(!_0x1c4ef0)throw new APIBadRequestError(_0xcc27('0x115'));})[_0xcc27('0x21')](function(){return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0x4f0713}});})[_0xcc27('0x21')](function(_0x3b8ff2){if(!_0x3b8ff2)throw new APINotFoundError(util[_0xcc27('0xa5')](_0xcc27('0xc5'),_0x548386[_0xcc27('0x4c')]['id']));return db[_0xcc27('0x60')][_0xcc27('0x10e')](function(_0xc6281a){return _0x3b8ff2[_0xcc27('0x113')](_0x1c4ef0,{'transaction':_0xc6281a})['then'](function(){return db['Team'][_0xcc27('0x40')]({'where':{'id':{'$in':_0x1c4ef0}}});})['then'](function(_0x5c2bbd){var _0x32fca3=_['map'](_0x5c2bbd,function(_0x11767b){return _0x11767b[_0xcc27('0x10f')]();});return Promise[_0xcc27('0x49')](_0x32fca3);})['then'](function(_0x149777){_0x2d1d60=_[_0xcc27('0x116')](_0x149777);var _0x447d1e=_[_0xcc27('0x29')](_0x2d1d60,function(_0x5217e4){return _0x5217e4['removeAgent'](_0x3b8ff2['id'],{'transaction':_0xc6281a});});return Promise['all'](_0x447d1e);})[_0xcc27('0x21')](function(){if(!_0x3b8ff2[_0xcc27('0x97')])return;var _0x53f71e=_[_0xcc27('0x27')](_0x2d1d60,function(_0x2150d4){return _0x2150d4['getDataValue'](_0xcc27('0x96'))==='Voice';});var _0x56de04=_[_0xcc27('0x29')](_0x53f71e,function(_0x5c8205){return db[_0xcc27('0xa6')][_0xcc27('0x20')]({'where':{'VoiceQueueId':_0x5c8205['id'],'UserId':_0x3b8ff2['id']},'transaction':_0xc6281a});});return Promise[_0xcc27('0x49')](_0x56de04);})[_0xcc27('0x21')](function(){return db[_0xcc27('0x112')]['findAll']({'where':{'teamId':{'$in':_0x1c4ef0}}});})['then'](function(_0x3fd6d4){var _0x48339b=_[_0xcc27('0x29')](_0x3fd6d4,function(_0x44a820){return db[_0xcc27('0x117')]['destroy']({'where':{'UserId':_0x3b8ff2['id'],'VoicePrefixId':_0x44a820[_0xcc27('0x118')]}},{'transaction':_0xc6281a});});return Promise['all'](_0x48339b);});});})[_0xcc27('0x21')](function(){for(var _0x233b76=0x0;_0x233b76<_0x2d1d60['length'];_0x233b76++){var _0xb36985=_0x2d1d60[_0x233b76]['getDataValue'](_0xcc27('0x96'));var _0x51dbb7=_0xb36985+_0xcc27('0xa1');socket[_0xcc27('0x1e')]('user'+_0xb36985+'Queue:remove',{'UserId':_0x4f0713,['queueField']:_0x2d1d60[_0x233b76]['id']});}})[_0xcc27('0x21')](respondWithStatusCode(_0x9ec0da,null))[_0xcc27('0x4a')](APIHandleError(_0x9ec0da));};exports[_0xcc27('0x119')]=function(_0x201d4,_0x30f113){var _0x3581ff={};var _0x4704f6={};var _0x402715;var _0x552c23;return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0x201d4[_0xcc27('0x4c')]['id']}})['then'](handleEntityNotFound(_0x30f113,null))[_0xcc27('0x21')](function(_0x2bd719){if(_0x2bd719){_0x402715=_0x2bd719;_0x4704f6['model']=_['keys'](db[_0xcc27('0xc7')][_0xcc27('0x30')]);_0x4704f6[_0xcc27('0x3b')]=_[_0xcc27('0xcd')](_0x201d4['query']);_0x4704f6[_0xcc27('0xce')]=_[_0xcc27('0xcf')](_0x4704f6['model'],_0x4704f6[_0xcc27('0x3b')]);_0x3581ff[_0xcc27('0x3f')]=_[_0xcc27('0xcf')](_0x4704f6['model'],qs[_0xcc27('0xd0')](_0x201d4[_0xcc27('0x3b')]['fields']));_0x3581ff['attributes']=_0x3581ff[_0xcc27('0x3f')][_0xcc27('0x43')]?_0x3581ff[_0xcc27('0x3f')]:_0x4704f6[_0xcc27('0xd1')];_0x3581ff[_0xcc27('0xd2')]=qs['sort'](_0x201d4[_0xcc27('0x3b')]['sort']);_0x3581ff[_0xcc27('0x39')]=qs[_0xcc27('0xce')](_[_0xcc27('0xd4')](_0x201d4[_0xcc27('0x3b')],_0x4704f6[_0xcc27('0xce')]));if(_0x201d4['query']['filter']){_0x3581ff[_0xcc27('0x39')]=_[_0xcc27('0x50')](_0x3581ff[_0xcc27('0x39')],{'$or':_[_0xcc27('0x29')](_0x3581ff['attributes'],function(_0x1724a1){var _0x42fcac={};_0x42fcac[_0x1724a1]={'$like':'%'+_0x201d4['query'][_0xcc27('0x27')]+'%'};return _0x42fcac;})});}_0x3581ff=_[_0xcc27('0x50')]({},_0x3581ff,_0x201d4[_0xcc27('0x51')]);return _0x402715[_0xcc27('0x119')](_0x3581ff);}})[_0xcc27('0x21')](function(_0x23fb8){if(_0x23fb8){_0x552c23=_0x23fb8['length'];if(!_0x201d4[_0xcc27('0x3b')][_0xcc27('0xc6')](_0xcc27('0xd6'))){_0x3581ff[_0xcc27('0x18')]=qs[_0xcc27('0x18')](_0x201d4[_0xcc27('0x3b')]['limit']);_0x3581ff[_0xcc27('0x16')]=qs['offset'](_0x201d4['query']['offset']);}return _0x402715['getLists'](_0x3581ff);}})[_0xcc27('0x21')](function(_0xb89c75){if(_0xb89c75){return _0xb89c75?{'count':_0x552c23,'rows':_0xb89c75}:null;}})[_0xcc27('0x21')](respondWithResult(_0x30f113,null))['catch'](handleError(_0x30f113,null));};exports[_0xcc27('0x11a')]=function(_0xb6efa9,_0x285637){var _0x37acfa={};var _0x19d592={};var _0x166a5e;return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0xb6efa9[_0xcc27('0x4c')]['id']}})['then'](handleEntityNotFound(_0x285637,null))['then'](function(_0x4af3f4){if(_0x4af3f4){_0x166a5e=_0x4af3f4;_0x19d592['model']=_[_0xcc27('0xcd')](db[_0xcc27('0x3a')]['rawAttributes']);_0x19d592['query']=_['keys'](_0xb6efa9[_0xcc27('0x3b')]);_0x19d592[_0xcc27('0xce')]=_[_0xcc27('0xcf')](_0x19d592[_0xcc27('0xd1')],_0x19d592['query']);_0x37acfa[_0xcc27('0x3f')]=_[_0xcc27('0xcf')](_0x19d592[_0xcc27('0xd1')],qs[_0xcc27('0xd0')](_0xb6efa9['query'][_0xcc27('0xd0')]));_0x37acfa[_0xcc27('0x3f')]=_0x37acfa[_0xcc27('0x3f')][_0xcc27('0x43')]?_0x37acfa[_0xcc27('0x3f')]:_0x19d592[_0xcc27('0xd1')];_0x37acfa[_0xcc27('0xd2')]=qs[_0xcc27('0xd3')](_0xb6efa9['query'][_0xcc27('0xd3')]);_0x37acfa[_0xcc27('0x39')]=qs['filters'](_[_0xcc27('0xd4')](_0xb6efa9[_0xcc27('0x3b')],_0x19d592[_0xcc27('0xce')]));if(_0xb6efa9[_0xcc27('0x3b')][_0xcc27('0x27')]){_0x37acfa[_0xcc27('0x39')]=_[_0xcc27('0x50')](_0x37acfa[_0xcc27('0x39')],{'$or':_[_0xcc27('0x29')](_0x37acfa[_0xcc27('0x3f')],function(_0x2fd73e){var _0x155e0b={};_0x155e0b[_0x2fd73e]={'$like':'%'+_0xb6efa9[_0xcc27('0x3b')][_0xcc27('0x27')]+'%'};return _0x155e0b;})});}_0x37acfa[_0xcc27('0xd1')]=db[_0xcc27('0x3a')];_0x37acfa['as']=_0xcc27('0x25');_0x37acfa=_[_0xcc27('0x50')]({},_0x37acfa,_0xb6efa9[_0xcc27('0x51')]);return _0x166a5e[_0xcc27('0xf2')]({'include':[_0x37acfa]});}})[_0xcc27('0x21')](function(_0x435d57){if(_0x435d57){var _0x3d0025={},_0x1c3b74=[];for(var _0x39b042=0x0;_0x39b042<_0x435d57[_0xcc27('0x43')];_0x39b042+=0x1){for(var _0x39f4f9=0x0,_0xc79972;_0x39f4f9<_0x435d57[_0x39b042][_0xcc27('0x25')][_0xcc27('0x43')];_0x39f4f9+=0x1){_0xc79972=_0x435d57[_0x39b042][_0xcc27('0x25')][_0x39f4f9]['get']({'plain':!![]});_0x3d0025[_0xc79972['id']]=_0xc79972;}}_0x3d0025=_['values'](_0x3d0025);for(var _0x17e715=qs[_0xcc27('0x16')](_0xb6efa9['query'][_0xcc27('0x16')]);_0x17e715<_0x3d0025['length']&&_0x1c3b74[_0xcc27('0x43')]<qs[_0xcc27('0x18')](_0xb6efa9[_0xcc27('0x3b')][_0xcc27('0x18')]);_0x17e715+=0x1){if(_0x3d0025[_0x17e715]){_0x1c3b74[_0xcc27('0x44')](_0x3d0025[_0x17e715]);}}return{'count':_0x3d0025[_0xcc27('0x43')],'rows':_0x1c3b74};}})['then'](respondWithResult(_0x285637,null))['catch'](handleError(_0x285637,null));};exports[_0xcc27('0x20')]=function(_0x45d929,_0x489a95){if(_0x45d929[_0xcc27('0x24')]['id']==_0x45d929[_0xcc27('0x4c')]['id']){throw new APIForbiddenError(_0xcc27('0x11b'));}return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x45d929[_0xcc27('0x4c')]['id']}})['then'](function(_0x311b98){if(!_0x311b98){throw new APINotFoundError(util['format'](_0xcc27('0xc5'),_0x45d929[_0xcc27('0x4c')]['id']));}return db[_0xcc27('0x60')][_0xcc27('0x10e')](function(_0x27876e){return db['CmHopper'][_0xcc27('0x1c')]({'recallme':![]},{'where':{'UserId':_0x45d929[_0xcc27('0x4c')]['id']},'transaction':_0x27876e})[_0xcc27('0x21')](function(){return removeEntity(_0x489a95,_0x27876e)(_0x311b98);});});})[_0xcc27('0x4a')](APIHandleError(_0x489a95));};exports['addChatInteractions']=function(_0x2fcdb5,_0x563e41){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x2fcdb5[_0xcc27('0x4c')]['id']}})['then'](handleEntityNotFound(_0x563e41,null))[_0xcc27('0x21')](function(_0x1100fa){if(_0x1100fa){return _0x1100fa[_0xcc27('0x11c')](_0x2fcdb5[_0xcc27('0x54')][_0xcc27('0x57')],_[_0xcc27('0x58')](_0x2fcdb5[_0xcc27('0x54')],[_0xcc27('0x57'),'id'])||{})[_0xcc27('0xa0')](function(){for(var _0x1508eb=0x0;_0x1508eb<_0x2fcdb5[_0xcc27('0x54')][_0xcc27('0x57')][_0xcc27('0x43')];_0x1508eb+=0x1){socket[_0xcc27('0x1e')](_0xcc27('0x11d'),{'ChatInteractionId':Number(_0x2fcdb5[_0xcc27('0x54')]['ids'][_0x1508eb]),'UserId':Number(_0x2fcdb5[_0xcc27('0x4c')]['id'])});}return _0x2fcdb5[_0xcc27('0x54')][_0xcc27('0x57')];});}})[_0xcc27('0x21')](respondWithResult(_0x563e41,null))[_0xcc27('0x4a')](handleError(_0x563e41,null));};exports['removeChatInteractions']=function(_0x3dfabf,_0x3f8241){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x3dfabf[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x3f8241,null))[_0xcc27('0x21')](function(_0x528d30){if(_0x528d30){return _0x528d30['removeChatInteractions'](_0x3dfabf[_0xcc27('0x3b')][_0xcc27('0x57')])[_0xcc27('0x21')](function(){if(_['isArray'](_0x3dfabf[_0xcc27('0x3b')][_0xcc27('0x57')])){for(var _0x4d0651=0x0;_0x4d0651<_0x3dfabf[_0xcc27('0x3b')][_0xcc27('0x57')][_0xcc27('0x43')];_0x4d0651+=0x1){socket['emit'](_0xcc27('0x11e'),{'ChatInteractionId':Number(_0x3dfabf['query'][_0xcc27('0x57')][_0x4d0651]),'UserId':Number(_0x3dfabf[_0xcc27('0x4c')]['id'])});}}else{socket[_0xcc27('0x1e')](_0xcc27('0x11e'),{'ChatInteractionId':Number(_0x3dfabf['query']['ids']),'UserId':Number(_0x3dfabf[_0xcc27('0x4c')]['id'])});}});}})[_0xcc27('0x21')](respondWithStatusCode(_0x3f8241,null))[_0xcc27('0x4a')](handleError(_0x3f8241,null));};exports[_0xcc27('0x11f')]=function(_0x486c81,_0x237d8c){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x486c81[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x237d8c,null))[_0xcc27('0x21')](function(_0x5c6855){if(_0x5c6855){return _0x5c6855[_0xcc27('0x11f')](_0x486c81['body']['ids'],_[_0xcc27('0x58')](_0x486c81[_0xcc27('0x54')],[_0xcc27('0x57'),'id'])||{})[_0xcc27('0xa0')](function(){for(var _0x33ca58=0x0;_0x33ca58<_0x486c81['body'][_0xcc27('0x57')]['length'];_0x33ca58+=0x1){socket[_0xcc27('0x1e')](_0xcc27('0x120'),{'MailInteractionId':Number(_0x486c81[_0xcc27('0x54')][_0xcc27('0x57')][_0x33ca58]),'UserId':Number(_0x486c81[_0xcc27('0x4c')]['id'])});}return _0x486c81['body'][_0xcc27('0x57')];});}})[_0xcc27('0x21')](respondWithResult(_0x237d8c,null))[_0xcc27('0x4a')](handleError(_0x237d8c,null));};exports[_0xcc27('0x121')]=function(_0x1cd3be,_0xde9234){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x1cd3be[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0xde9234,null))[_0xcc27('0x21')](function(_0x31bc65){if(_0x31bc65){return _0x31bc65['removeMailInteractions'](_0x1cd3be['query']['ids'])[_0xcc27('0x21')](function(){if(_['isArray'](_0x1cd3be[_0xcc27('0x3b')]['ids'])){for(var _0x246d95=0x0;_0x246d95<_0x1cd3be[_0xcc27('0x3b')]['ids']['length'];_0x246d95+=0x1){socket[_0xcc27('0x1e')](_0xcc27('0x122'),{'MailInteractionId':Number(_0x1cd3be[_0xcc27('0x3b')]['ids'][_0x246d95]),'UserId':Number(_0x1cd3be[_0xcc27('0x4c')]['id'])});}}else{socket['emit'](_0xcc27('0x122'),{'MailInteractionId':Number(_0x1cd3be[_0xcc27('0x3b')][_0xcc27('0x57')]),'UserId':Number(_0x1cd3be[_0xcc27('0x4c')]['id'])});}});}})[_0xcc27('0x21')](respondWithStatusCode(_0xde9234,null))[_0xcc27('0x4a')](handleError(_0xde9234,null));};exports[_0xcc27('0x123')]=function(_0x4f4c6e,_0x250274){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x4f4c6e[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x250274,null))[_0xcc27('0x21')](function(_0x18ecbb){if(_0x18ecbb){return _0x18ecbb[_0xcc27('0x123')](_0x4f4c6e['body']['ids'],_['omit'](_0x4f4c6e[_0xcc27('0x54')],[_0xcc27('0x57'),'id'])||{})[_0xcc27('0xa0')](function(){for(var _0x2d70a0=0x0;_0x2d70a0<_0x4f4c6e['body'][_0xcc27('0x57')][_0xcc27('0x43')];_0x2d70a0+=0x1){socket[_0xcc27('0x1e')](_0xcc27('0x124'),{'FaxInteractionId':Number(_0x4f4c6e[_0xcc27('0x54')]['ids'][_0x2d70a0]),'UserId':Number(_0x4f4c6e[_0xcc27('0x4c')]['id'])});}return _0x4f4c6e['body']['ids'];});}})[_0xcc27('0x21')](respondWithResult(_0x250274,null))[_0xcc27('0x4a')](handleError(_0x250274,null));};exports[_0xcc27('0x125')]=function(_0x3e86fb,_0x17e581){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x3e86fb[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x17e581,null))[_0xcc27('0x21')](function(_0x5722eb){if(_0x5722eb){return _0x5722eb['removeFaxInteractions'](_0x3e86fb[_0xcc27('0x3b')][_0xcc27('0x57')])['then'](function(){if(_['isArray'](_0x3e86fb['query'][_0xcc27('0x57')])){for(var _0x368d83=0x0;_0x368d83<_0x3e86fb['query'][_0xcc27('0x57')]['length'];_0x368d83+=0x1){socket[_0xcc27('0x1e')]('user_has_fax_interactions:remove',{'FaxInteractionId':Number(_0x3e86fb[_0xcc27('0x3b')][_0xcc27('0x57')][_0x368d83]),'UserId':Number(_0x3e86fb[_0xcc27('0x4c')]['id'])});}}else{socket[_0xcc27('0x1e')](_0xcc27('0x126'),{'FaxInteractionId':Number(_0x3e86fb[_0xcc27('0x3b')][_0xcc27('0x57')]),'UserId':Number(_0x3e86fb['params']['id'])});}});}})[_0xcc27('0x21')](respondWithStatusCode(_0x17e581,null))[_0xcc27('0x4a')](handleError(_0x17e581,null));};exports[_0xcc27('0x127')]=function(_0x263b03,_0x3c5936){return db['User'][_0xcc27('0x2b')]({'where':{'id':_0x263b03['params']['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x3c5936,null))['then'](function(_0x4f8d89){if(_0x4f8d89){return _0x4f8d89[_0xcc27('0x127')](_0x263b03[_0xcc27('0x54')][_0xcc27('0x57')],_['omit'](_0x263b03[_0xcc27('0x54')],[_0xcc27('0x57'),'id'])||{})[_0xcc27('0xa0')](function(){for(var _0x287d97=0x0;_0x287d97<_0x263b03[_0xcc27('0x54')]['ids'][_0xcc27('0x43')];_0x287d97+=0x1){socket['emit'](_0xcc27('0x128'),{'SmsInteractionId':Number(_0x263b03['body'][_0xcc27('0x57')][_0x287d97]),'UserId':Number(_0x263b03[_0xcc27('0x4c')]['id'])});}return _0x263b03[_0xcc27('0x54')][_0xcc27('0x57')];});}})[_0xcc27('0x21')](respondWithResult(_0x3c5936,null))[_0xcc27('0x4a')](handleError(_0x3c5936,null));};exports[_0xcc27('0x129')]=function(_0x1adf45,_0x5744ff){return db['User']['find']({'where':{'id':_0x1adf45[_0xcc27('0x4c')]['id']}})['then'](handleEntityNotFound(_0x5744ff,null))[_0xcc27('0x21')](function(_0x12951d){if(_0x12951d){return _0x12951d[_0xcc27('0x129')](_0x1adf45['query'][_0xcc27('0x57')])['then'](function(){if(_[_0xcc27('0x114')](_0x1adf45['query'][_0xcc27('0x57')])){for(var _0x576d9d=0x0;_0x576d9d<_0x1adf45[_0xcc27('0x3b')][_0xcc27('0x57')]['length'];_0x576d9d+=0x1){socket[_0xcc27('0x1e')]('user_has_sms_interactions:remove',{'SmsInteractionId':Number(_0x1adf45['query'][_0xcc27('0x57')][_0x576d9d]),'UserId':Number(_0x1adf45[_0xcc27('0x4c')]['id'])});}}else{socket[_0xcc27('0x1e')](_0xcc27('0x12a'),{'SmsInteractionId':Number(_0x1adf45[_0xcc27('0x3b')]['ids']),'UserId':Number(_0x1adf45['params']['id'])});}});}})['then'](respondWithStatusCode(_0x5744ff,null))[_0xcc27('0x4a')](handleError(_0x5744ff,null));};exports[_0xcc27('0x12b')]=function(_0x44aa28,_0xfa6785){return db[_0xcc27('0x3a')]['find']({'where':{'id':_0x44aa28['params']['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0xfa6785,null))[_0xcc27('0x21')](function(_0x43a15a){if(_0x43a15a){return _0x43a15a['addOpenchannelInteractions'](_0x44aa28[_0xcc27('0x54')][_0xcc27('0x57')],_['omit'](_0x44aa28['body'],[_0xcc27('0x57'),'id'])||{})[_0xcc27('0xa0')](function(){for(var _0x31a8a3=0x0;_0x31a8a3<_0x44aa28[_0xcc27('0x54')][_0xcc27('0x57')]['length'];_0x31a8a3+=0x1){socket['emit'](_0xcc27('0x12c'),{'OpenchannelInteractionId':Number(_0x44aa28['body'][_0xcc27('0x57')][_0x31a8a3]),'UserId':Number(_0x44aa28[_0xcc27('0x4c')]['id'])});}return _0x44aa28[_0xcc27('0x54')][_0xcc27('0x57')];});}})[_0xcc27('0x21')](respondWithResult(_0xfa6785,null))[_0xcc27('0x4a')](handleError(_0xfa6785,null));};exports[_0xcc27('0x12d')]=function(_0x357001,_0x33449f){return db['User']['find']({'where':{'id':_0x357001['params']['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x33449f,null))['then'](function(_0x4556ba){if(_0x4556ba){return _0x4556ba[_0xcc27('0x12d')](_0x357001[_0xcc27('0x3b')]['ids'])[_0xcc27('0x21')](function(){if(_[_0xcc27('0x114')](_0x357001[_0xcc27('0x3b')][_0xcc27('0x57')])){for(var _0x4e0356=0x0;_0x4e0356<_0x357001[_0xcc27('0x3b')]['ids'][_0xcc27('0x43')];_0x4e0356+=0x1){socket[_0xcc27('0x1e')]('user_has_openchannel_interactions:remove',{'OpenchannelInteractionId':Number(_0x357001['query'][_0xcc27('0x57')][_0x4e0356]),'UserId':Number(_0x357001[_0xcc27('0x4c')]['id'])});}}else{socket['emit'](_0xcc27('0x12e'),{'OpenchannelInteractionId':Number(_0x357001['query'][_0xcc27('0x57')]),'UserId':Number(_0x357001[_0xcc27('0x4c')]['id'])});}});}})[_0xcc27('0x21')](respondWithStatusCode(_0x33449f,null))[_0xcc27('0x4a')](handleError(_0x33449f,null));};exports[_0xcc27('0x12f')]=function(_0x46c6b2,_0x1fa94c){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x46c6b2[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x1fa94c,null))['then'](function(_0x2701ec){if(_0x2701ec){return _0x2701ec[_0xcc27('0x12f')](_0x46c6b2['body'][_0xcc27('0x57')],_[_0xcc27('0x58')](_0x46c6b2['body'],[_0xcc27('0x57'),'id'])||{})[_0xcc27('0xa0')](function(){for(var _0x39b02f=0x0;_0x39b02f<_0x46c6b2[_0xcc27('0x54')]['ids'][_0xcc27('0x43')];_0x39b02f+=0x1){socket[_0xcc27('0x1e')](_0xcc27('0x130'),{'WhatsappInteractionId':Number(_0x46c6b2[_0xcc27('0x54')][_0xcc27('0x57')][_0x39b02f]),'UserId':Number(_0x46c6b2[_0xcc27('0x4c')]['id'])});}return _0x46c6b2[_0xcc27('0x54')][_0xcc27('0x57')];});}})[_0xcc27('0x21')](respondWithResult(_0x1fa94c,null))['catch'](handleError(_0x1fa94c,null));};exports[_0xcc27('0x131')]=function(_0x7ec2e6,_0x5c8ef5){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x7ec2e6['params']['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x5c8ef5,null))[_0xcc27('0x21')](function(_0x2f7a27){if(_0x2f7a27){return _0x2f7a27[_0xcc27('0x131')](_0x7ec2e6[_0xcc27('0x3b')][_0xcc27('0x57')]);}})[_0xcc27('0x21')](respondWithStatusCode(_0x5c8ef5,null))[_0xcc27('0x4a')](handleError(_0x5c8ef5,null));};exports[_0xcc27('0x132')]=function(_0x97b188,_0x3eb5dd){var _0x4e05c9={};var _0x2a4f13={};var _0x408911;var _0x1bba57;return db[_0xcc27('0x3a')]['findOne']({'where':{'id':_0x97b188[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x3eb5dd,null))['then'](function(_0x1036a2){if(_0x1036a2){_0x408911=_0x1036a2;_0x2a4f13[_0xcc27('0xd1')]=_[_0xcc27('0xcd')](db[_0xcc27('0x133')][_0xcc27('0x30')]);_0x2a4f13[_0xcc27('0x3b')]=_[_0xcc27('0xcd')](_0x97b188[_0xcc27('0x3b')]);_0x2a4f13[_0xcc27('0xce')]=_[_0xcc27('0xcf')](_0x2a4f13[_0xcc27('0xd1')],_0x2a4f13[_0xcc27('0x3b')]);_0x4e05c9[_0xcc27('0x3f')]=_['intersection'](_0x2a4f13['model'],qs[_0xcc27('0xd0')](_0x97b188[_0xcc27('0x3b')][_0xcc27('0xd0')]));_0x4e05c9[_0xcc27('0x3f')]=_0x4e05c9[_0xcc27('0x3f')][_0xcc27('0x43')]?_0x4e05c9[_0xcc27('0x3f')]:_0x2a4f13[_0xcc27('0xd1')];_0x4e05c9[_0xcc27('0xd2')]=qs[_0xcc27('0xd3')](_0x97b188['query'][_0xcc27('0xd3')]);_0x4e05c9[_0xcc27('0x39')]=qs[_0xcc27('0xce')](_[_0xcc27('0xd4')](_0x97b188[_0xcc27('0x3b')],_0x2a4f13[_0xcc27('0xce')]));if(_0x97b188[_0xcc27('0x3b')]['filter']){_0x4e05c9['where']=_['merge'](_0x4e05c9[_0xcc27('0x39')],{'$or':_[_0xcc27('0x29')](_0x4e05c9[_0xcc27('0x3f')],function(_0x37b9e0){var _0x1caac7={};_0x1caac7[_0x37b9e0]={'$like':'%'+_0x97b188[_0xcc27('0x3b')][_0xcc27('0x27')]+'%'};return _0x1caac7;})});}_0x4e05c9=_['merge']({},_0x4e05c9,_0x97b188['options']);return _0x408911[_0xcc27('0x132')](_0x4e05c9);}})[_0xcc27('0x21')](function(_0x588258){if(_0x588258){_0x1bba57=_0x588258[_0xcc27('0x43')];if(!_0x97b188[_0xcc27('0x3b')][_0xcc27('0xc6')]('nolimit')){_0x4e05c9[_0xcc27('0x18')]=qs[_0xcc27('0x18')](_0x97b188[_0xcc27('0x3b')][_0xcc27('0x18')]);_0x4e05c9['offset']=qs[_0xcc27('0x16')](_0x97b188[_0xcc27('0x3b')][_0xcc27('0x16')]);}return _0x408911['getVoicePrefixes'](_0x4e05c9);}})[_0xcc27('0x21')](function(_0x539a27){if(_0x539a27){return _0x539a27?{'count':_0x1bba57,'rows':_0x539a27}:null;}})['then'](respondWithResult(_0x3eb5dd,null))['catch'](handleError(_0x3eb5dd,null));};exports[_0xcc27('0x134')]=function(_0x134a17,_0x1f54f7){var _0x5cc359={};var _0x104b5f={};var _0x1c505b;var _0x2dac41;return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0x134a17[_0xcc27('0x4c')]['id']}})['then'](handleEntityNotFound(_0x1f54f7,null))['then'](function(_0x33f791){if(_0x33f791){_0x1c505b=_0x33f791;_0x104b5f[_0xcc27('0xd1')]=_[_0xcc27('0xcd')](db[_0xcc27('0x135')][_0xcc27('0x30')]);_0x104b5f['query']=_[_0xcc27('0xcd')](_0x134a17['query']);_0x104b5f[_0xcc27('0xce')]=_[_0xcc27('0xcf')](_0x104b5f['model'],_0x104b5f['query']);_0x5cc359[_0xcc27('0x3f')]=_['intersection'](_0x104b5f[_0xcc27('0xd1')],qs[_0xcc27('0xd0')](_0x134a17['query'][_0xcc27('0xd0')]));_0x5cc359[_0xcc27('0x3f')]=_0x5cc359[_0xcc27('0x3f')][_0xcc27('0x43')]?_0x5cc359[_0xcc27('0x3f')]:_0x104b5f[_0xcc27('0xd1')];_0x5cc359['order']=qs[_0xcc27('0xd3')](_0x134a17[_0xcc27('0x3b')][_0xcc27('0xd3')]);_0x5cc359[_0xcc27('0x39')]=qs['filters'](_[_0xcc27('0xd4')](_0x134a17[_0xcc27('0x3b')],_0x104b5f['filters']));if(_0x134a17[_0xcc27('0x3b')]['filter']){_0x5cc359[_0xcc27('0x39')]=_[_0xcc27('0x50')](_0x5cc359[_0xcc27('0x39')],{'$or':_['map'](_0x5cc359[_0xcc27('0x3f')],function(_0x1ec053){var _0x7cebd7={};_0x7cebd7[_0x1ec053]={'$like':'%'+_0x134a17['query'][_0xcc27('0x27')]+'%'};return _0x7cebd7;})});}_0x5cc359=_[_0xcc27('0x50')]({},_0x5cc359,_0x134a17[_0xcc27('0x51')]);return _0x1c505b[_0xcc27('0x134')](_0x5cc359);}})[_0xcc27('0x21')](function(_0x1343fd){if(_0x1343fd){_0x2dac41=_0x1343fd[_0xcc27('0x43')];if(!_0x134a17[_0xcc27('0x3b')]['hasOwnProperty'](_0xcc27('0xd6'))){_0x5cc359[_0xcc27('0x18')]=qs[_0xcc27('0x18')](_0x134a17[_0xcc27('0x3b')]['limit']);_0x5cc359[_0xcc27('0x16')]=qs[_0xcc27('0x16')](_0x134a17[_0xcc27('0x3b')]['offset']);}return _0x1c505b[_0xcc27('0x134')](_0x5cc359);}})[_0xcc27('0x21')](function(_0x1295a6){if(_0x1295a6){return _0x1295a6?{'count':_0x2dac41,'rows':_0x1295a6}:null;}})['then'](respondWithResult(_0x1f54f7,null))[_0xcc27('0x4a')](handleError(_0x1f54f7,null));};exports['addFaxAccounts']=function(_0x5d73f3,_0xb0672b){return db['User'][_0xcc27('0x2b')]({'where':{'id':_0x5d73f3[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0xb0672b,null))[_0xcc27('0x21')](function(_0x263419){if(_0x263419){return _0x263419[_0xcc27('0x136')](_0x5d73f3['body'][_0xcc27('0x57')],_[_0xcc27('0x58')](_0x5d73f3[_0xcc27('0x54')],[_0xcc27('0x57'),'id'])||{});}})[_0xcc27('0x21')](respondWithResult(_0xb0672b,null))[_0xcc27('0x4a')](handleError(_0xb0672b,null));};exports[_0xcc27('0x137')]=function(_0x20f3ff,_0x20f74b){return db['User']['find']({'where':{'id':_0x20f3ff[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x20f74b,null))[_0xcc27('0x21')](function(_0x26b0cb){if(_0x26b0cb){return _0x26b0cb['removeFaxAccounts'](_0x20f3ff[_0xcc27('0x3b')][_0xcc27('0x57')]);}})['then'](respondWithStatusCode(_0x20f74b,null))[_0xcc27('0x4a')](handleError(_0x20f74b,null));};exports[_0xcc27('0x138')]=function(_0x1c4271,_0xcb42ba){var _0x4bb342={};var _0x283d02={};var _0x5071a4;var _0x41c8cf;return db['User'][_0xcc27('0x91')]({'where':{'id':_0x1c4271[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0xcb42ba,null))[_0xcc27('0x21')](function(_0x1c1db0){if(_0x1c1db0){_0x5071a4=_0x1c1db0;_0x283d02[_0xcc27('0xd1')]=_[_0xcc27('0xcd')](db[_0xcc27('0x139')]['rawAttributes']);_0x283d02[_0xcc27('0x3b')]=_[_0xcc27('0xcd')](_0x1c4271['query']);_0x283d02[_0xcc27('0xce')]=_[_0xcc27('0xcf')](_0x283d02['model'],_0x283d02['query']);_0x4bb342['attributes']=_['intersection'](_0x283d02[_0xcc27('0xd1')],qs[_0xcc27('0xd0')](_0x1c4271['query'][_0xcc27('0xd0')]));_0x4bb342[_0xcc27('0x3f')]=_0x4bb342[_0xcc27('0x3f')]['length']?_0x4bb342[_0xcc27('0x3f')]:_0x283d02[_0xcc27('0xd1')];_0x4bb342[_0xcc27('0xd2')]=qs['sort'](_0x1c4271[_0xcc27('0x3b')][_0xcc27('0xd3')]);_0x4bb342[_0xcc27('0x39')]=qs[_0xcc27('0xce')](_[_0xcc27('0xd4')](_0x1c4271[_0xcc27('0x3b')],_0x283d02[_0xcc27('0xce')]));if(_0x1c4271[_0xcc27('0x3b')][_0xcc27('0x27')]){_0x4bb342[_0xcc27('0x39')]=_['merge'](_0x4bb342[_0xcc27('0x39')],{'$or':_[_0xcc27('0x29')](_0x4bb342[_0xcc27('0x3f')],function(_0x5cff76){var _0x16cefb={};_0x16cefb[_0x5cff76]={'$like':'%'+_0x1c4271['query'][_0xcc27('0x27')]+'%'};return _0x16cefb;})});}_0x4bb342=_[_0xcc27('0x50')]({},_0x4bb342,_0x1c4271[_0xcc27('0x51')]);return _0x5071a4[_0xcc27('0x138')](_0x4bb342);}})[_0xcc27('0x21')](function(_0x2cd59f){if(_0x2cd59f){_0x41c8cf=_0x2cd59f['length'];if(!_0x1c4271[_0xcc27('0x3b')][_0xcc27('0xc6')](_0xcc27('0xd6'))){_0x4bb342['limit']=qs[_0xcc27('0x18')](_0x1c4271['query']['limit']);_0x4bb342[_0xcc27('0x16')]=qs[_0xcc27('0x16')](_0x1c4271[_0xcc27('0x3b')][_0xcc27('0x16')]);}return _0x5071a4[_0xcc27('0x138')](_0x4bb342);}})[_0xcc27('0x21')](function(_0x29e04b){if(_0x29e04b){return _0x29e04b?{'count':_0x41c8cf,'rows':_0x29e04b}:null;}})[_0xcc27('0x21')](respondWithResult(_0xcb42ba,null))[_0xcc27('0x4a')](handleError(_0xcb42ba,null));};exports['addMailAccounts']=function(_0x16ec61,_0x492900){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x16ec61['params']['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x492900,null))['then'](function(_0x3dda20){if(_0x3dda20){return _0x3dda20[_0xcc27('0x13a')](_0x16ec61['body']['ids'],_[_0xcc27('0x58')](_0x16ec61[_0xcc27('0x54')],[_0xcc27('0x57'),'id'])||{});}})[_0xcc27('0x21')](respondWithResult(_0x492900,null))[_0xcc27('0x4a')](handleError(_0x492900,null));};exports[_0xcc27('0x13b')]=function(_0xdfd4a8,_0x57f636){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0xdfd4a8['params']['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x57f636,null))['then'](function(_0x315159){if(_0x315159){return _0x315159[_0xcc27('0x13b')](_0xdfd4a8[_0xcc27('0x3b')][_0xcc27('0x57')]);}})[_0xcc27('0x21')](respondWithStatusCode(_0x57f636,null))['catch'](handleError(_0x57f636,null));};exports[_0xcc27('0x13c')]=function(_0x1c6653,_0x2349d5){var _0x54d375={};var _0x2393fc={};var _0x41e0dc;var _0x27397e;return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0x1c6653['params']['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x2349d5,null))['then'](function(_0x2bd1aa){if(_0x2bd1aa){_0x41e0dc=_0x2bd1aa;_0x2393fc[_0xcc27('0xd1')]=_[_0xcc27('0xcd')](db[_0xcc27('0x13d')][_0xcc27('0x30')]);_0x2393fc['query']=_['keys'](_0x1c6653[_0xcc27('0x3b')]);_0x2393fc[_0xcc27('0xce')]=_[_0xcc27('0xcf')](_0x2393fc[_0xcc27('0xd1')],_0x2393fc[_0xcc27('0x3b')]);_0x54d375[_0xcc27('0x3f')]=_[_0xcc27('0xcf')](_0x2393fc[_0xcc27('0xd1')],qs[_0xcc27('0xd0')](_0x1c6653[_0xcc27('0x3b')][_0xcc27('0xd0')]));_0x54d375[_0xcc27('0x3f')]=_0x54d375[_0xcc27('0x3f')][_0xcc27('0x43')]?_0x54d375[_0xcc27('0x3f')]:_0x2393fc['model'];_0x54d375['order']=qs[_0xcc27('0xd3')](_0x1c6653[_0xcc27('0x3b')]['sort']);_0x54d375[_0xcc27('0x39')]=qs[_0xcc27('0xce')](_[_0xcc27('0xd4')](_0x1c6653[_0xcc27('0x3b')],_0x2393fc[_0xcc27('0xce')]));if(_0x1c6653[_0xcc27('0x3b')]['filter']){_0x54d375[_0xcc27('0x39')]=_[_0xcc27('0x50')](_0x54d375['where'],{'$or':_[_0xcc27('0x29')](_0x54d375['attributes'],function(_0xf51984){var _0x1df046={};_0x1df046[_0xf51984]={'$like':'%'+_0x1c6653[_0xcc27('0x3b')][_0xcc27('0x27')]+'%'};return _0x1df046;})});}_0x54d375=_[_0xcc27('0x50')]({},_0x54d375,_0x1c6653[_0xcc27('0x51')]);return _0x41e0dc[_0xcc27('0x13c')](_0x54d375);}})[_0xcc27('0x21')](function(_0x561f3e){if(_0x561f3e){_0x27397e=_0x561f3e['length'];if(!_0x1c6653[_0xcc27('0x3b')]['hasOwnProperty'](_0xcc27('0xd6'))){_0x54d375[_0xcc27('0x18')]=qs[_0xcc27('0x18')](_0x1c6653[_0xcc27('0x3b')][_0xcc27('0x18')]);_0x54d375[_0xcc27('0x16')]=qs[_0xcc27('0x16')](_0x1c6653[_0xcc27('0x3b')][_0xcc27('0x16')]);}return _0x41e0dc[_0xcc27('0x13c')](_0x54d375);}})['then'](function(_0x4f222a){if(_0x4f222a){return _0x4f222a?{'count':_0x27397e,'rows':_0x4f222a}:null;}})[_0xcc27('0x21')](respondWithResult(_0x2349d5,null))[_0xcc27('0x4a')](handleError(_0x2349d5,null));};exports['addOpenchannelAccounts']=function(_0x516e7e,_0x506981){return db['User']['find']({'where':{'id':_0x516e7e[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x506981,null))[_0xcc27('0x21')](function(_0x87feba){if(_0x87feba){return _0x87feba[_0xcc27('0x13e')](_0x516e7e[_0xcc27('0x54')][_0xcc27('0x57')],_['omit'](_0x516e7e[_0xcc27('0x54')],[_0xcc27('0x57'),'id'])||{});}})[_0xcc27('0x21')](respondWithResult(_0x506981,null))[_0xcc27('0x4a')](handleError(_0x506981,null));};exports[_0xcc27('0x13f')]=function(_0x241d00,_0x4388ab){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x241d00[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x4388ab,null))[_0xcc27('0x21')](function(_0x5bb595){if(_0x5bb595){return _0x5bb595[_0xcc27('0x13f')](_0x241d00[_0xcc27('0x3b')]['ids']);}})['then'](respondWithStatusCode(_0x4388ab,null))[_0xcc27('0x4a')](handleError(_0x4388ab,null));};exports[_0xcc27('0x140')]=function(_0x4810f0,_0xe3fb39){var _0x45ae35={};var _0x33261b={};var _0x12757a;var _0x49c1f5;return db[_0xcc27('0x3a')]['findOne']({'where':{'id':_0x4810f0[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0xe3fb39,null))[_0xcc27('0x21')](function(_0x462d6c){if(_0x462d6c){_0x12757a=_0x462d6c;_0x33261b[_0xcc27('0xd1')]=_[_0xcc27('0xcd')](db['SmsAccount']['rawAttributes']);_0x33261b['query']=_[_0xcc27('0xcd')](_0x4810f0[_0xcc27('0x3b')]);_0x33261b[_0xcc27('0xce')]=_[_0xcc27('0xcf')](_0x33261b[_0xcc27('0xd1')],_0x33261b['query']);_0x45ae35[_0xcc27('0x3f')]=_['intersection'](_0x33261b[_0xcc27('0xd1')],qs[_0xcc27('0xd0')](_0x4810f0['query'][_0xcc27('0xd0')]));_0x45ae35[_0xcc27('0x3f')]=_0x45ae35['attributes'][_0xcc27('0x43')]?_0x45ae35['attributes']:_0x33261b[_0xcc27('0xd1')];_0x45ae35[_0xcc27('0xd2')]=qs[_0xcc27('0xd3')](_0x4810f0[_0xcc27('0x3b')][_0xcc27('0xd3')]);_0x45ae35[_0xcc27('0x39')]=qs[_0xcc27('0xce')](_['pick'](_0x4810f0[_0xcc27('0x3b')],_0x33261b[_0xcc27('0xce')]));if(_0x4810f0['query'][_0xcc27('0x27')]){_0x45ae35['where']=_[_0xcc27('0x50')](_0x45ae35[_0xcc27('0x39')],{'$or':_[_0xcc27('0x29')](_0x45ae35[_0xcc27('0x3f')],function(_0x4a00cd){var _0x304fc5={};_0x304fc5[_0x4a00cd]={'$like':'%'+_0x4810f0['query'][_0xcc27('0x27')]+'%'};return _0x304fc5;})});}_0x45ae35=_[_0xcc27('0x50')]({},_0x45ae35,_0x4810f0[_0xcc27('0x51')]);return _0x12757a['getSmsAccounts'](_0x45ae35);}})[_0xcc27('0x21')](function(_0x2900cd){if(_0x2900cd){_0x49c1f5=_0x2900cd[_0xcc27('0x43')];if(!_0x4810f0['query']['hasOwnProperty'](_0xcc27('0xd6'))){_0x45ae35[_0xcc27('0x18')]=qs[_0xcc27('0x18')](_0x4810f0[_0xcc27('0x3b')]['limit']);_0x45ae35[_0xcc27('0x16')]=qs[_0xcc27('0x16')](_0x4810f0['query'][_0xcc27('0x16')]);}return _0x12757a[_0xcc27('0x140')](_0x45ae35);}})[_0xcc27('0x21')](function(_0x4997a0){if(_0x4997a0){return _0x4997a0?{'count':_0x49c1f5,'rows':_0x4997a0}:null;}})[_0xcc27('0x21')](respondWithResult(_0xe3fb39,null))[_0xcc27('0x4a')](handleError(_0xe3fb39,null));};exports[_0xcc27('0x141')]=function(_0x3732d3,_0x594314){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x3732d3[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x594314,null))['then'](function(_0x197aab){if(_0x197aab){return _0x197aab['addSmsAccounts'](_0x3732d3[_0xcc27('0x54')][_0xcc27('0x57')],_[_0xcc27('0x58')](_0x3732d3[_0xcc27('0x54')],[_0xcc27('0x57'),'id'])||{});}})[_0xcc27('0x21')](respondWithResult(_0x594314,null))[_0xcc27('0x4a')](handleError(_0x594314,null));};exports['removeSmsAccounts']=function(_0x5e2a92,_0x2a6ad8){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x5e2a92[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x2a6ad8,null))['then'](function(_0x6fcaca){if(_0x6fcaca){return _0x6fcaca['removeSmsAccounts'](_0x5e2a92['query'][_0xcc27('0x57')]);}})[_0xcc27('0x21')](respondWithStatusCode(_0x2a6ad8,null))['catch'](handleError(_0x2a6ad8,null));};exports['getChatWebsites']=function(_0x5522f9,_0x3d5e32){var _0x4d22bb={};var _0x34a301={};var _0x4a45bb;var _0x35471f;return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0x5522f9[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x3d5e32,null))['then'](function(_0x1d204e){if(_0x1d204e){_0x4a45bb=_0x1d204e;_0x34a301[_0xcc27('0xd1')]=_['keys'](db[_0xcc27('0x142')][_0xcc27('0x30')]);_0x34a301[_0xcc27('0x3b')]=_['keys'](_0x5522f9[_0xcc27('0x3b')]);_0x34a301[_0xcc27('0xce')]=_[_0xcc27('0xcf')](_0x34a301['model'],_0x34a301[_0xcc27('0x3b')]);_0x4d22bb[_0xcc27('0x3f')]=_['intersection'](_0x34a301[_0xcc27('0xd1')],qs['fields'](_0x5522f9[_0xcc27('0x3b')][_0xcc27('0xd0')]));_0x4d22bb['attributes']=_0x4d22bb[_0xcc27('0x3f')][_0xcc27('0x43')]?_0x4d22bb['attributes']:_0x34a301['model'];_0x4d22bb[_0xcc27('0xd2')]=qs[_0xcc27('0xd3')](_0x5522f9[_0xcc27('0x3b')][_0xcc27('0xd3')]);_0x4d22bb['where']=qs[_0xcc27('0xce')](_[_0xcc27('0xd4')](_0x5522f9['query'],_0x34a301[_0xcc27('0xce')]));if(_0x5522f9[_0xcc27('0x3b')][_0xcc27('0x27')]){_0x4d22bb[_0xcc27('0x39')]=_[_0xcc27('0x50')](_0x4d22bb[_0xcc27('0x39')],{'$or':_[_0xcc27('0x29')](_0x4d22bb['attributes'],function(_0x6a3ce6){var _0xd1b7d3={};_0xd1b7d3[_0x6a3ce6]={'$like':'%'+_0x5522f9[_0xcc27('0x3b')][_0xcc27('0x27')]+'%'};return _0xd1b7d3;})});}_0x4d22bb=_[_0xcc27('0x50')]({},_0x4d22bb,_0x5522f9[_0xcc27('0x51')]);return _0x4a45bb[_0xcc27('0x143')](_0x4d22bb);}})[_0xcc27('0x21')](function(_0x5ea556){if(_0x5ea556){_0x35471f=_0x5ea556['length'];if(!_0x5522f9[_0xcc27('0x3b')]['hasOwnProperty'](_0xcc27('0xd6'))){_0x4d22bb[_0xcc27('0x18')]=qs['limit'](_0x5522f9[_0xcc27('0x3b')][_0xcc27('0x18')]);_0x4d22bb['offset']=qs['offset'](_0x5522f9['query'][_0xcc27('0x16')]);}return _0x4a45bb[_0xcc27('0x143')](_0x4d22bb);}})[_0xcc27('0x21')](function(_0x1d4c0c){if(_0x1d4c0c){return _0x1d4c0c?{'count':_0x35471f,'rows':_0x1d4c0c}:null;}})['then'](respondWithResult(_0x3d5e32,null))[_0xcc27('0x4a')](handleError(_0x3d5e32,null));};exports['addChatWebsites']=function(_0x2ddba0,_0x2bff67){return db[_0xcc27('0x3a')]['find']({'where':{'id':_0x2ddba0['params']['id']}})['then'](handleEntityNotFound(_0x2bff67,null))[_0xcc27('0x21')](function(_0x120edf){if(_0x120edf){return _0x120edf[_0xcc27('0x144')](_0x2ddba0[_0xcc27('0x54')]['ids'],_[_0xcc27('0x58')](_0x2ddba0[_0xcc27('0x54')],['ids','id'])||{});}})[_0xcc27('0x21')](respondWithResult(_0x2bff67,null))['catch'](handleError(_0x2bff67,null));};exports[_0xcc27('0x145')]=function(_0x2f8496,_0x1204cc){return db[_0xcc27('0x3a')]['find']({'where':{'id':_0x2f8496['params']['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x1204cc,null))[_0xcc27('0x21')](function(_0x4f3b68){if(_0x4f3b68){return _0x4f3b68[_0xcc27('0x145')](_0x2f8496[_0xcc27('0x3b')][_0xcc27('0x57')]);}})[_0xcc27('0x21')](respondWithStatusCode(_0x1204cc,null))[_0xcc27('0x4a')](handleError(_0x1204cc,null));};exports[_0xcc27('0x146')]=function(_0x3afb74,_0x3f5d05){var _0x5f474a={};var _0x82886={};var _0x27e689;var _0x3c5e9d;return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0x3afb74[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x3f5d05,null))['then'](function(_0x33315b){if(_0x33315b){_0x27e689=_0x33315b;_0x82886[_0xcc27('0xd1')]=_[_0xcc27('0xcd')](db[_0xcc27('0x147')][_0xcc27('0x30')]);_0x82886['query']=_['keys'](_0x3afb74[_0xcc27('0x3b')]);_0x82886[_0xcc27('0xce')]=_[_0xcc27('0xcf')](_0x82886[_0xcc27('0xd1')],_0x82886[_0xcc27('0x3b')]);_0x5f474a[_0xcc27('0x3f')]=_['intersection'](_0x82886['model'],qs[_0xcc27('0xd0')](_0x3afb74['query'][_0xcc27('0xd0')]));_0x5f474a[_0xcc27('0x3f')]=_0x5f474a['attributes'][_0xcc27('0x43')]?_0x5f474a[_0xcc27('0x3f')]:_0x82886[_0xcc27('0xd1')];_0x5f474a[_0xcc27('0xd2')]=qs[_0xcc27('0xd3')](_0x3afb74[_0xcc27('0x3b')]['sort']);_0x5f474a[_0xcc27('0x39')]=qs[_0xcc27('0xce')](_[_0xcc27('0xd4')](_0x3afb74[_0xcc27('0x3b')],_0x82886[_0xcc27('0xce')]));if(_0x3afb74[_0xcc27('0x3b')][_0xcc27('0x27')]){_0x5f474a[_0xcc27('0x39')]=_['merge'](_0x5f474a['where'],{'$or':_[_0xcc27('0x29')](_0x5f474a[_0xcc27('0x3f')],function(_0x51d44e){var _0x5c9729={};_0x5c9729[_0x51d44e]={'$like':'%'+_0x3afb74['query']['filter']+'%'};return _0x5c9729;})});}_0x5f474a=_[_0xcc27('0x50')]({},_0x5f474a,_0x3afb74[_0xcc27('0x51')]);return _0x27e689[_0xcc27('0x146')](_0x5f474a);}})[_0xcc27('0x21')](function(_0x2028ad){if(_0x2028ad){_0x3c5e9d=_0x2028ad[_0xcc27('0x43')];if(!_0x3afb74['query'][_0xcc27('0xc6')](_0xcc27('0xd6'))){_0x5f474a[_0xcc27('0x18')]=qs[_0xcc27('0x18')](_0x3afb74[_0xcc27('0x3b')][_0xcc27('0x18')]);_0x5f474a[_0xcc27('0x16')]=qs[_0xcc27('0x16')](_0x3afb74[_0xcc27('0x3b')][_0xcc27('0x16')]);}return _0x27e689['getWhatsappAccounts'](_0x5f474a);}})[_0xcc27('0x21')](function(_0x5356e7){if(_0x5356e7){return _0x5356e7?{'count':_0x3c5e9d,'rows':_0x5356e7}:null;}})['then'](respondWithResult(_0x3f5d05,null))[_0xcc27('0x4a')](handleError(_0x3f5d05,null));};exports[_0xcc27('0x148')]=function(_0x3ca112,_0xf328d3){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x3ca112[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0xf328d3,null))[_0xcc27('0x21')](function(_0x15fd35){if(_0x15fd35){return _0x15fd35[_0xcc27('0x148')](_0x3ca112[_0xcc27('0x54')][_0xcc27('0x57')],_[_0xcc27('0x58')](_0x3ca112['body'],[_0xcc27('0x57'),'id'])||{});}})[_0xcc27('0x21')](respondWithResult(_0xf328d3,null))[_0xcc27('0x4a')](handleError(_0xf328d3,null));};exports[_0xcc27('0x149')]=function(_0x14c358,_0x5683f9){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x14c358[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x5683f9,null))[_0xcc27('0x21')](function(_0x5fa577){if(_0x5fa577){return _0x5fa577[_0xcc27('0x149')](_0x14c358[_0xcc27('0x3b')]['ids']);}})[_0xcc27('0x21')](respondWithStatusCode(_0x5683f9,null))['catch'](handleError(_0x5683f9,null));};exports[_0xcc27('0x14a')]=function(_0x47b751,_0x17eca5){var _0x52cd43={},_0x212831={},_0x33a8fb={'count':0x0,'rows':[]};var _0x68630=db[_0xcc27('0x14b')]['rawAttributes'];_0x212831[_0xcc27('0xd1')]=_[_0xcc27('0xcd')](_0x68630);_0x212831[_0xcc27('0x3b')]=_[_0xcc27('0xcd')](_0x47b751[_0xcc27('0x3b')]);_0x212831[_0xcc27('0xce')]=_[_0xcc27('0xcf')](_0x212831[_0xcc27('0xd1')],_0x212831[_0xcc27('0x3b')]);_0x212831['filters']=_[_0xcc27('0xc3')](_0x212831[_0xcc27('0xce')],[_0xcc27('0x14c'),_0xcc27('0x14d'),_0xcc27('0x14e'),_0xcc27('0x14f'),_0xcc27('0x150'),'$lte',_0xcc27('0x151'),'$eq',_0xcc27('0x152'),_0xcc27('0x153'),_0xcc27('0x154'),'$in',_0xcc27('0x155'),_0xcc27('0x156'),_0xcc27('0x157'),_0xcc27('0x158'),'$notILike',_0xcc27('0x156'),'$overlap',_0xcc27('0x159'),_0xcc27('0x15a'),'$any']);_0x52cd43[_0xcc27('0x3f')]=_[_0xcc27('0xcf')](_0x212831['model'],qs[_0xcc27('0xd0')](_0x47b751[_0xcc27('0x3b')][_0xcc27('0xd0')]));_0x52cd43[_0xcc27('0x3f')]=_0x52cd43[_0xcc27('0x3f')][_0xcc27('0x43')]?_0x52cd43[_0xcc27('0x3f')]:_0x212831['model'];if(!_0x47b751[_0xcc27('0x3b')][_0xcc27('0xc6')](_0xcc27('0xd6'))){_0x52cd43[_0xcc27('0x18')]=qs[_0xcc27('0x18')](_0x47b751[_0xcc27('0x3b')][_0xcc27('0x18')]);_0x52cd43[_0xcc27('0x16')]=qs[_0xcc27('0x16')](_0x47b751[_0xcc27('0x3b')][_0xcc27('0x16')]);}_0x52cd43[_0xcc27('0xd2')]=qs['sort'](_0x47b751[_0xcc27('0x3b')][_0xcc27('0xd3')]);_0x52cd43['where']=qs['filters'](_[_0xcc27('0xd4')](_0x47b751['query'],_0x212831[_0xcc27('0xce')]));if(_0x47b751[_0xcc27('0x3b')][_0xcc27('0x27')]){_0x52cd43['where']=_[_0xcc27('0x50')](_0x52cd43[_0xcc27('0x39')],{'$or':_['map'](_0x52cd43[_0xcc27('0x3f')],function(_0x543e8d){var _0x150722={};_0x150722[_0x543e8d]={'$like':'%'+_0x47b751[_0xcc27('0x3b')][_0xcc27('0x27')]+'%'};return _0x150722;})});}_0x52cd43[_0xcc27('0x39')]={'$and':[_0x52cd43[_0xcc27('0x39')],{'$or':[{'UserId':_0x47b751[_0xcc27('0x4c')]['id']},{'OwnerId':_0x47b751['params']['id']}]}]};_0x52cd43=_[_0xcc27('0x50')]({},_0x52cd43,_0x47b751[_0xcc27('0x51')]);var _0x9a70c5={'where':_0x52cd43[_0xcc27('0x39')]};return db['CmHopper'][_0xcc27('0x19')](_0x9a70c5)[_0xcc27('0x21')](function(_0x4a02ae){_0x33a8fb[_0xcc27('0x19')]=_0x4a02ae;if(_0x47b751[_0xcc27('0x3b')][_0xcc27('0x4e')]){_0x52cd43[_0xcc27('0x3c')]=[{'attributes':['id',_0xcc27('0x15b'),_0xcc27('0x15c'),'phone'],'model':db[_0xcc27('0x15d')],'as':_0xcc27('0x15e')},{'attributes':['id',_0xcc27('0x2c'),_0xcc27('0x15f')],'model':db['VoiceQueue'],'as':_0xcc27('0x160')}];}return db[_0xcc27('0x14b')]['findAll'](_0x52cd43);})[_0xcc27('0x21')](function(_0x3a3e1a){_0x33a8fb['rows']=_0x3a3e1a;return _0x33a8fb;})['then'](respondWithFilteredResult(_0x17eca5,_0x52cd43))[_0xcc27('0x4a')](handleError(_0x17eca5,null));};exports[_0xcc27('0x161')]=function(_0x1f3697,_0x6f8d9){if(!_[_0xcc27('0x63')](_0x1f3697[_0xcc27('0x24')]['id'])&&(_0x1f3697[_0xcc27('0x24')][_0xcc27('0x1d')]==_0xcc27('0x78')||_0x1f3697['user'][_0xcc27('0x1d')]=='user')){return db[_0xcc27('0x3a')][_0xcc27('0x91')]({'where':{'id':_0x1f3697[_0xcc27('0x4c')]['id']},'raw':!![]})[_0xcc27('0x21')](function(_0x94cd8){return authService[_0xcc27('0x162')](_0x94cd8);})[_0xcc27('0x21')](function(_0x494b40){if(_0x494b40){return _0x6f8d9[_0xcc27('0x14')](0xc8)['json']({'api_key':_0x494b40['token']});}else{return _0x6f8d9[_0xcc27('0x14')](0xcc)[_0xcc27('0x15')]({'message':_0xcc27('0x163')});}})[_0xcc27('0x4a')](handleError(_0x6f8d9,0x193));}else{return _0x6f8d9[_0xcc27('0x14')](0x191)[_0xcc27('0x15')]({'message':_0xcc27('0x164')});}};exports[_0xcc27('0x165')]=function(_0x2af9de,_0x17adac){if(!_[_0xcc27('0x63')](_0x2af9de[_0xcc27('0x24')]['id'])&&(_0x2af9de['user'][_0xcc27('0x1d')]=='admin'||_0x2af9de[_0xcc27('0x24')][_0xcc27('0x1d')]==_0xcc27('0x24'))){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x2af9de[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](function(_0x471c37){return authService[_0xcc27('0x166')](_0x471c37);})[_0xcc27('0x21')](function(_0x2ee2fa){return db['User'][_0xcc27('0x1c')]({'apiKeyIat':_0x2ee2fa['iat'],'apiKeyNonce':_0x2ee2fa[_0xcc27('0x167')]},{'where':{'id':_0x2af9de[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](function(){return _0x17adac['status'](0xc8)[_0xcc27('0x15')]({'api_key':_0x2ee2fa[_0xcc27('0x168')]});});})[_0xcc27('0x4a')](handleError(_0x17adac,0x193));}else{return _0x17adac['status'](0x191)['json']({'message':_0xcc27('0x164')});}};exports['removeApiKey']=function(_0x2afb0c,_0x4c11bc){if(!_['isNil'](_0x2afb0c[_0xcc27('0x24')]['id'])&&(_0x2afb0c[_0xcc27('0x24')]['role']==_0xcc27('0x78')||_0x2afb0c['user']['role']=='user')){return db[_0xcc27('0x3a')][_0xcc27('0x2b')]({'where':{'id':_0x2afb0c[_0xcc27('0x4c')]['id']}})[_0xcc27('0x21')](handleEntityNotFound(_0x4c11bc,null))[_0xcc27('0x21')](function(_0x22af0d){if(_0x22af0d&&_0x22af0d[_0xcc27('0x169')]&&_0x22af0d['apiKeyIat'])return _0x22af0d;else throw{'message':_0xcc27('0x16a')};})[_0xcc27('0x21')](function(){return db['User'][_0xcc27('0x1c')]({'apiKeyNonce':null,'apiKeyIat':null},{'where':{'id':_0x2afb0c[_0xcc27('0x4c')]['id']}});})['then'](respondWithStatusCode(_0x4c11bc,0xc8))[_0xcc27('0x4a')](handleError(_0x4c11bc,0x193));}else{return _0x4c11bc['status'](0x191)['json']({'message':'You\x20don\x27t\x20have\x20sufficient\x20privileges\x20to\x20access\x20this\x20resource.'});}};exports[_0xcc27('0x16b')]=function(_0xc4d53a,_0x59bb67){var _0x1f35d6=_0xc4d53a[_0xcc27('0x24')]['get']({'plain':!![]});if(!_0x1f35d6){return _0x59bb67[_0xcc27('0x14')](0x191)[_0xcc27('0x16c')](_0xcc27('0x16d'));}else{Promise['resolve']()[_0xcc27('0x21')](function(){if(_0xc4d53a[_0xcc27('0x3b')]['userSetting']!==_0xcc27('0x3d'))return;return _0xc4d53a['user'][_0xcc27('0x16e')]();})[_0xcc27('0x21')](function(_0x284ef7){if(!_0x284ef7)return;return _0x284ef7[_0xcc27('0x22')]({'plain':!![]});})[_0xcc27('0x21')](function(_0x1050f2){_0x1f35d6['userSetting']=_0x1050f2;return _0x59bb67[_0xcc27('0x14')](0xc8)[_0xcc27('0x15')](_0x1f35d6);});}};exports['getPresence']=function(_0x31ec5b,_0x2acd50){var _0x1665c6={'offset':0x0};var _0x13eeb5={'count':0x0,'rows':[]};var _0x58792e=[_0xcc27('0x16f'),'unknown','ringing'];var _0xb755d5=[];var _0x5e0c9f=[];var _0x37ff2b=[];var _0x5c1e55=_0x31ec5b['query'][_0xcc27('0x170')];var _0x4a98cb=_0x31ec5b['query'][_0xcc27('0x171')];var _0x5d7e48=_0x31ec5b['query'][_0xcc27('0x27')];return Promise[_0xcc27('0xfc')]()['then'](function(){if(!_0x5c1e55){return[];}return db[_0xcc27('0x10b')][_0xcc27('0x40')]({'attributes':['id',_0xcc27('0x2c')],'where':{'id':_0x5c1e55}});})[_0xcc27('0x21')](function(_0x578f22){_0x37ff2b=_0x578f22;if(!_0x4a98cb){return[];}return db['VoiceQueue'][_0xcc27('0x40')]({'attributes':['id',_0xcc27('0x2c')],'type':'inbound','where':{'id':_0x4a98cb}});})[_0xcc27('0x21')](function(_0x4182ce){_0x5e0c9f=_0x4182ce;var _0x21e6ce=_0x37ff2b[_0xcc27('0xc3')](_0x5e0c9f)[_0xcc27('0x29')](function(_0x41260c){return _0x41260c[_0xcc27('0x11a')]({'attributes':['id',_0xcc27('0x2c'),_0xcc27('0x5e'),'online'],'raw':!![]});});return Promise['all'](_0x21e6ce);})[_0xcc27('0x21')](function(_0x55bb61){var _0x38a08b=_[_0xcc27('0x172')](_0x55bb61);if(_0x5d7e48){if(_0x4a98cb||_0x5c1e55){return _0x38a08b[_0xcc27('0x27')](function(_0x27376f){return _0x27376f[_0xcc27('0x2c')][_0xcc27('0x9d')]()['includes'](_0x5d7e48['toLowerCase']())||_0x27376f[_0xcc27('0x5e')]['toString']()['includes'](_0x5d7e48);});}else{return db['User'][_0xcc27('0x40')]({'attributes':['id',_0xcc27('0x2c'),'internal',_0xcc27('0x97')],'where':{'role':_0xcc27('0x26'),'$or':[db[_0xcc27('0x60')][_0xcc27('0x39')](db['sequelize']['fn']('lower',db['sequelize'][_0xcc27('0x173')](_0xcc27('0x2c'))),{'$like':'%'+_0x5d7e48[_0xcc27('0x9d')]()+'%'}),{'internal':{'$like':'%'+_0x5d7e48+'%'}}]},'raw':!![]});}}else{return _0x38a08b;}})['then'](function(_0x4e69f9){var _0x326d98='name';var _0x2a2e05=_0xcc27('0x174');if(_0x31ec5b['query'][_0xcc27('0xd3')]){_0x2a2e05=_0x31ec5b[_0xcc27('0x3b')][_0xcc27('0xd3')][0x0]==='-'?_0xcc27('0x175'):'asc';_0x326d98=_0x2a2e05===_0xcc27('0x174')?_0x31ec5b[_0xcc27('0x3b')][_0xcc27('0xd3')]:_0x31ec5b[_0xcc27('0x3b')]['sort'][_0xcc27('0x176')](0x1);}return _(_0x4e69f9)[_0xcc27('0x177')]('id')[_0xcc27('0x178')]([function(_0x219fb9){return _0x326d98===_0xcc27('0x2c')?_0x219fb9[_0x326d98]['toLowerCase']():_0x219fb9[_0x326d98];}],[_0x2a2e05])['map'](function(_0x9bb5a0){return _['pick'](_0x9bb5a0,['id','name',_0xcc27('0x5e'),_0xcc27('0x97')]);})[_0xcc27('0x2a')]();})[_0xcc27('0x21')](function(_0x3fff2c){_0xb755d5=_0x3fff2c;return rta[_0xcc27('0x179')]();})[_0xcc27('0x21')](function(_0x2351cd){return _0xb755d5['map'](function(_0x3eafde){var _0x521ee3=_[_0xcc27('0x2b')](_0x2351cd[_0xcc27('0x41')],['id',_0x3eafde['id']]);if(!_0x521ee3||!_0x3eafde[_0xcc27('0x97')]){_0x3eafde[_0xcc27('0x14')]='offline';}else if(_0x521ee3[_0xcc27('0x99')]){_0x3eafde['status']=_0xcc27('0xfd');}else if(_0x521ee3[_0xcc27('0x17a')]===_0xcc27('0x17b')||!_0x521ee3[_0xcc27('0x17a')]){_0x3eafde[_0xcc27('0x14')]=_0xcc27('0x17b');}else{_0x3eafde[_0xcc27('0x14')]=_0x58792e[_0xcc27('0x37')](_0x521ee3['voiceStatus'])?_0xcc27('0x97'):_0xcc27('0x17c');}return _0x3eafde;});})['then'](function(_0x3b1556){if(!_0x31ec5b[_0xcc27('0x3b')]['hasOwnProperty']('nolimit')){_0x1665c6[_0xcc27('0x18')]=qs['limit'](_0x31ec5b['query'][_0xcc27('0x18')]||0xa);_0x1665c6[_0xcc27('0x16')]=qs[_0xcc27('0x16')](_0x31ec5b[_0xcc27('0x3b')][_0xcc27('0x16')]);}_0x13eeb5[_0xcc27('0x19')]=_0x3b1556['length'];_0x13eeb5['rows']=_0x1665c6[_0xcc27('0x18')]?_0x3b1556['slice'](_0x1665c6[_0xcc27('0x16')],_0x1665c6['offset']+_0x1665c6[_0xcc27('0x18')]):_0x3b1556;return _0x13eeb5;})[_0xcc27('0x21')](respondWithFilteredResult(_0x2acd50,_0x1665c6))['catch'](handleError(_0x2acd50,null));};function get_open_tabs(_0x2afeed,_0x1d94cb){var _0x356eca=_0x2afeed[_0xcc27('0x17d')](0x0)[_0xcc27('0x17e')]()+_0x2afeed[_0xcc27('0x17f')](0x1);var _0x24968b={'type':db[_0xcc27('0x89')][_0xcc27('0x61')][_0xcc27('0x62')],'raw':!![]};return new Promise(function(_0x57a22c,_0x22fc80){var _0x29fc83=squel[_0xcc27('0x180')]()[_0xcc27('0x181')](_0xcc27('0x182')+_0x356eca+_0xcc27('0x183'),'id')[_0xcc27('0x181')](_0xcc27('0x184'))[_0xcc27('0x64')](_0xcc27('0x185')+_0x2afeed+'_interactions','ui')[_0xcc27('0x39')](_0xcc27('0x186'),_0x1d94cb['id']);return db['sequelize'][_0xcc27('0x3b')](_0x29fc83[_0xcc27('0x187')](),_0x24968b)[_0xcc27('0x21')](function(_0x522462){_0x1d94cb[_0x356eca+_0xcc27('0x188')]=_0x522462;_0x57a22c(_0x522462);})[_0xcc27('0x4a')](function(_0x1a31a4){_0x22fc80(_0x1a31a4);});});}exports[_0xcc27('0x189')]=function(_0x2de9ac,_0x1a8fdb){var _0x4d4282=_0x2de9ac[_0xcc27('0x4c')]['id'];var _0x538bb3=_0x2de9ac['body'][_0xcc27('0x18a')];return db[_0xcc27('0x3a')][_0xcc27('0x1c')]({'messengerSoundNotification':_0x538bb3},{'where':{'id':_0x4d4282}})[_0xcc27('0x21')](respondWithStatusCode(_0x1a8fdb,null))[_0xcc27('0x4a')](handleError(_0x1a8fdb,null));};
\ No newline at end of file
index 8ecae43..119edb7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2b40=['events','../../mysqldb','User','setMaxListeners','save','remove','hasOwnProperty','hook'];(function(_0x3ae316,_0xa7108e){var _0x53ba19=function(_0x5209d1){while(--_0x5209d1){_0x3ae316['push'](_0x3ae316['shift']());}};_0x53ba19(++_0xa7108e);}(_0x2b40,0xe0));var _0x02b4=function(_0x12123b,_0x562b58){_0x12123b=_0x12123b-0x0;var _0x1b2a48=_0x2b40[_0x12123b];return _0x1b2a48;};'use strict';var EventEmitter=require(_0x02b4('0x0'));var User=require(_0x02b4('0x1'))['db'][_0x02b4('0x2')];var UserEvents=new EventEmitter();UserEvents[_0x02b4('0x3')](0x0);var events={'afterCreate':_0x02b4('0x4'),'afterUpdate':'update','afterDestroy':_0x02b4('0x5')};function emitEvent(_0x4d7e54){return function(_0x3f8fe0,_0x58d23b,_0x133531){UserEvents['emit'](_0x4d7e54+':'+_0x3f8fe0['id'],_0x3f8fe0);UserEvents['emit'](_0x4d7e54,_0x3f8fe0);_0x133531(null);};}for(var e in events){if(events[_0x02b4('0x6')](e)){var event=events[e];User[_0x02b4('0x7')](e,emitEvent(event));}}module['exports']=UserEvents;
\ No newline at end of file
+var _0x3e67=['setMaxListeners','save','emit','hook','exports','events'];(function(_0x1f0724,_0x3a58bf){var _0x253ffb=function(_0x3b4c72){while(--_0x3b4c72){_0x1f0724['push'](_0x1f0724['shift']());}};_0x253ffb(++_0x3a58bf);}(_0x3e67,0xf5));var _0x73e6=function(_0x5b78e8,_0x55096b){_0x5b78e8=_0x5b78e8-0x0;var _0xf2c321=_0x3e67[_0x5b78e8];return _0xf2c321;};'use strict';var EventEmitter=require(_0x73e6('0x0'));var User=require('../../mysqldb')['db']['User'];var UserEvents=new EventEmitter();UserEvents[_0x73e6('0x1')](0x0);var events={'afterCreate':_0x73e6('0x2'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x333062){return function(_0x3efda8,_0xde10c3,_0x250a4e){UserEvents[_0x73e6('0x3')](_0x333062+':'+_0x3efda8['id'],_0x3efda8);UserEvents[_0x73e6('0x3')](_0x333062,_0x3efda8);_0x250a4e(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];User[_0x73e6('0x4')](e,emitEvent(event));}}module[_0x73e6('0x5')]=UserEvents;
\ No newline at end of file
index c915a41..19faed7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['%s%s','prefix','push','chanspy','record','merge','MixMonitor','recordingFormat','auth','Authenticate','password','name','options','join','StopMixMonitor','wav','WAV','gsm','from-sip','Set','extensionMonitor','_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','_XCALLY_MIXMONITOR_FORMAT=%s','Dial','SIP/%s,,tTxXU(xcally-mixmonitor-context)','SIP/%s,,tTxX','Hangup','defaults','VoiceChanSpy','findAll','then','internal','catch','exports','models','define','User','utf8','userProfileId','resolve','UserProfile','find','privacyEnabled','updateMd5Password','changed','updatePassword','concat','error','bulkCreate','VoiceExtension','destroy','system','transaction','encryptPassword','function','toString','base64','salt','pbkdf2Sync','provider','Invalid\x20password','client','http','request','Agents','Unable\x20to\x20retrieve\x20RPC\x20agent\x20(AMI)','Unable\x20to\x20retrieve\x20RPC\x20agent\x20(Routing)','manual','voice','QueuePause','Unable\x20to\x20unpause\x20agent\x20%s:$s','result','message','UserVoiceQueueRt','channel','MemberReport','isArray','map','update','YYYY-MM-DD\x20HH:mm:ss','all','voicePause','mailPause','chatPause','faxPause','whatsappPause','openchannelPause','Pause','../../config/utils','getChannels','forEach','bluebird','crypto','util','lodash','./user.attributes','google','length','context','format'];(function(_0x2fffa9,_0x2d17ae){var _0x3cc0ca=function(_0x25b4b8){while(--_0x25b4b8){_0x2fffa9['push'](_0x2fffa9['shift']());}};_0x3cc0ca(++_0x2d17ae);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3a6efd,_0x2a5102){_0x3a6efd=_0x3a6efd-0x0;var _0x487b9a=_0xa9e0[_0x3a6efd];return _0x487b9a;};'use strict';var BPromise=require(_0x0a9e('0x0'));var crypto=require(_0x0a9e('0x1'));var util=require(_0x0a9e('0x2'));var md5=require('md5');var moment=require('moment');var _=require(_0x0a9e('0x3'));var jayson=require('jayson/promise');var attributes=require(_0x0a9e('0x4'));var authTypes=[_0x0a9e('0x5')];var validatePresenceOf=function(_0x2ab90b){return _0x2ab90b&&_0x2ab90b[_0x0a9e('0x6')];};var getChanSpyApplications=function(_0x981158,_0x57b080,_0x219af0){var _0x441e3a={'context':_0x981158[_0x0a9e('0x7')]||'from-sip','type':'system','isApp':![],'UserId':_0x981158['id']};var _0xe42b77=[];for(var _0x56465b=0x0,_0x52cace=0x1;_0x56465b<_0x219af0[_0x0a9e('0x6')];_0x56465b++,_0x52cace=0x1){var _0xf81284={'exten':util[_0x0a9e('0x8')](_0x0a9e('0x9'),_0x219af0[_0x56465b][_0x0a9e('0xa')],_0x57b080),'ChanSpyId':_0x219af0[_0x56465b]['id']};_0xe42b77[_0x0a9e('0xb')](_['merge']({'app':'Set','appdata':util['format']('CDR(type)=%s',_0x0a9e('0xc')),'priority':_0x52cace++},_0x441e3a,_0xf81284));if(_0x219af0[_0x56465b][_0x0a9e('0xd')]){_0xe42b77[_0x0a9e('0xb')](_[_0x0a9e('0xe')]({'app':_0x0a9e('0xf'),'appdata':util[_0x0a9e('0x8')]('${UNIQUEID}.%s,a',_0x219af0[_0x56465b][_0x0a9e('0x10')]),'priority':_0x52cace++},_0x441e3a,_0xf81284));}if(_0x219af0[_0x56465b][_0x0a9e('0x11')]){_0xe42b77[_0x0a9e('0xb')](_[_0x0a9e('0xe')]({'app':_0x0a9e('0x12'),'appdata':_0x219af0[_0x56465b][_0x0a9e('0x13')],'priority':_0x52cace++},_0x441e3a,_0xf81284));}_0xe42b77['push'](_[_0x0a9e('0xe')]({'app':'ChanSpy','appdata':util[_0x0a9e('0x8')]('SIP/%s,%s',_0x981158[_0x0a9e('0x14')],_0x219af0[_0x56465b][_0x0a9e('0x15')]?_0x219af0[_0x56465b]['options'][_0x0a9e('0x16')](''):''),'priority':_0x52cace++},_0x441e3a,_0xf81284));if(_0x219af0[_0x56465b]['record']){_0xe42b77[_0x0a9e('0xb')](_[_0x0a9e('0xe')]({'app':_0x0a9e('0x17'),'priority':_0x52cace++},_0x441e3a,_0xf81284));}}return _0xe42b77;};var getUserApplications=function(_0x205fd6,_0x31b1ca){var _0x2eb11f=[_0x0a9e('0x18'),_0x0a9e('0x19'),_0x0a9e('0x1a')];var _0x112016={'context':_0x205fd6[_0x0a9e('0x7')]||_0x0a9e('0x1b'),'exten':_0x31b1ca,'type':'system','isApp':![],'UserId':_0x205fd6['id']};var _0x2c3407=[{'app':_0x0a9e('0x1c'),'appdata':'CDR(type)=internal'}];if(_0x205fd6[_0x0a9e('0x1d')]&&_['includes'](_0x2eb11f,_0x205fd6['extensionMonitor'])){_0x2c3407[_0x0a9e('0xb')]({'app':_0x0a9e('0x1c'),'appdata':_0x0a9e('0x1e')});_0x2c3407[_0x0a9e('0xb')]({'app':'Set','appdata':util[_0x0a9e('0x8')](_0x0a9e('0x1f'),_0x205fd6[_0x0a9e('0x1d')])});_0x2c3407[_0x0a9e('0xb')]({'app':_0x0a9e('0x20'),'appdata':util[_0x0a9e('0x8')](_0x0a9e('0x21'),_0x205fd6['name'])});}else{_0x2c3407['push']({'app':_0x0a9e('0x20'),'appdata':util[_0x0a9e('0x8')](_0x0a9e('0x22'),_0x205fd6[_0x0a9e('0x14')])});}_0x2c3407['push']({'app':_0x0a9e('0x23')});for(var _0x479bc4=0x0;_0x479bc4<_0x2c3407[_0x0a9e('0x6')];_0x479bc4++){_0x2c3407[_0x479bc4]['priority']=_0x479bc4+0x1;_0x2c3407[_0x479bc4]=_[_0x0a9e('0x24')](_0x2c3407[_0x479bc4],_0x112016);}return _0x2c3407;};var getChanSpyPromise=function(_0x34dc65,_0x25fba9){return new BPromise(function(_0x14433c,_0x140511){return _0x34dc65[_0x0a9e('0x25')][_0x0a9e('0x26')]()[_0x0a9e('0x27')](function(_0x5a101a){if(_0x5a101a){var _0x3652a7=getChanSpyApplications(_0x25fba9,_0x25fba9[_0x0a9e('0x28')],_0x5a101a);if(_0x25fba9[_0x0a9e('0x28')]!=_0x25fba9[_0x0a9e('0x14')]){_0x3652a7=_0x3652a7['concat'](getChanSpyApplications(_0x25fba9,_0x25fba9[_0x0a9e('0x14')],_0x5a101a));}return _0x14433c(_0x3652a7);}return _0x14433c([]);})[_0x0a9e('0x29')](function(_0x1843b2){_0x140511(_0x1843b2);});});};module[_0x0a9e('0x2a')]=function(_0x58b06f){var _0x563b45=_0x58b06f[_0x0a9e('0x2b')];return _0x58b06f[_0x0a9e('0x2c')](_0x0a9e('0x2d'),attributes,{'tableName':'users','charset':_0x0a9e('0x2e'),'collate':'utf8_bin','hooks':{'beforeCreate':function(_0x2407f9,_0x3ae878,_0x1122db){var _0x33bdb7=typeof _0x2407f9[_0x0a9e('0x2f')]==='undefined'?BPromise[_0x0a9e('0x30')](null):_0x563b45[_0x0a9e('0x31')][_0x0a9e('0x32')]({'where':{'id':_0x2407f9[_0x0a9e('0x2f')]}});_0x33bdb7[_0x0a9e('0x27')](function(_0x409319){if(_0x409319){_0x2407f9[_0x0a9e('0x33')]=_0x409319[_0x0a9e('0x33')];}})['then'](function(){_0x2407f9[_0x0a9e('0x34')]();_0x2407f9['updatePassword'](_0x1122db);})[_0x0a9e('0x29')](function(_0x14b13f){_0x1122db(_0x14b13f);});},'beforeUpdate':function(_0x2b7e7f,_0x3f3d41,_0x567193){Promise[_0x0a9e('0x30')]()[_0x0a9e('0x27')](function(){if(_0x2b7e7f[_0x0a9e('0x35')](_0x0a9e('0x2f'))===![])return;return _0x563b45['UserProfile']['find']({'where':{'id':_0x2b7e7f[_0x0a9e('0x2f')]}})['then'](function(_0x24936a){if(_0x24936a)_0x2b7e7f[_0x0a9e('0x33')]=_0x24936a[_0x0a9e('0x33')];return;});})[_0x0a9e('0x27')](function(){if(_0x2b7e7f['changed'](_0x0a9e('0x13'))){_0x2b7e7f[_0x0a9e('0x34')]();return _0x2b7e7f[_0x0a9e('0x36')](_0x567193);}_0x567193();})['catch'](function(_0x1dbf74){_0x567193(_0x1dbf74);});},'afterCreate':function(_0x1a180b,_0x289467,_0x4c1c0e){var _0x546ef8=getUserApplications(_0x1a180b,_0x1a180b[_0x0a9e('0x28')]);if(_0x1a180b[_0x0a9e('0x28')]!=_0x1a180b['name']){_0x546ef8=_0x546ef8[_0x0a9e('0x37')](getUserApplications(_0x1a180b,_0x1a180b[_0x0a9e('0x14')]));}return Promise[_0x0a9e('0x30')]()[_0x0a9e('0x27')](function(){if(!_0x1a180b['userSetting']){return _0x1a180b['createUserSetting']({'clientSideLoggingLevel':_0x0a9e('0x38'),'clientSideLoggingEnabled':![]});}})[_0x0a9e('0x27')](function(){return _0x563b45['VoiceExtension'][_0x0a9e('0x39')](_0x546ef8);})[_0x0a9e('0x27')](function(){if(_0x1a180b[_0x0a9e('0xc')]){return getChanSpyPromise(_0x563b45,_0x1a180b);}})['then'](function(_0x316c8f){if(_0x316c8f&&_0x316c8f[_0x0a9e('0x6')]){return _0x563b45[_0x0a9e('0x3a')][_0x0a9e('0x39')](_0x316c8f);}})[_0x0a9e('0x27')](function(){_0x4c1c0e();})[_0x0a9e('0x29')](function(_0x2881b3){_0x4c1c0e(_0x2881b3);});},'afterUpdate':function(_0x45a9b8,_0x23b089,_0x3da2cd){return BPromise[_0x0a9e('0x30')]()[_0x0a9e('0x27')](function(){if(_0x45a9b8[_0x0a9e('0x35')](_0x0a9e('0xc'))||_0x45a9b8[_0x0a9e('0x35')]('context')){return _0x563b45['VoiceExtension'][_0x0a9e('0x3b')]({'where':{'UserId':_0x45a9b8['id'],'type':_0x0a9e('0x3c'),'ChanSpyId':{'$ne':null}}})[_0x0a9e('0x27')](function(){if(_0x45a9b8[_0x0a9e('0xc')]){return getChanSpyPromise(_0x563b45,_0x45a9b8)[_0x0a9e('0x27')](function(_0xc9a702){if(_0xc9a702&&_0xc9a702[_0x0a9e('0x6')]){return _0x563b45[_0x0a9e('0x3a')][_0x0a9e('0x39')](_0xc9a702);}});}});}})[_0x0a9e('0x27')](function(){if(_0x45a9b8[_0x0a9e('0x35')](_0x0a9e('0x1d'))||_0x45a9b8['changed'](_0x0a9e('0x7'))){return _0x563b45[_0x0a9e('0x3a')][_0x0a9e('0x3b')]({'where':{'UserId':_0x45a9b8['id'],'type':_0x0a9e('0x3c'),'ChanSpyId':null}})[_0x0a9e('0x27')](function(){var _0xbe9d19=getUserApplications(_0x45a9b8,_0x45a9b8[_0x0a9e('0x28')]);if(_0x45a9b8[_0x0a9e('0x28')]!=_0x45a9b8['name']){_0xbe9d19=_0xbe9d19[_0x0a9e('0x37')](getUserApplications(_0x45a9b8,_0x45a9b8['name']));}return _0x563b45[_0x0a9e('0x3a')][_0x0a9e('0x39')](_0xbe9d19);});}})[_0x0a9e('0x27')](function(){_0x3da2cd();})['catch'](function(_0x14bec2){_0x3da2cd(_0x14bec2);});},'afterDestroy':function(_0x7f6eb1,_0x4774f4){return _0x563b45[_0x0a9e('0x3a')][_0x0a9e('0x3b')]({'where':{'UserId':_0x7f6eb1['id'],'type':_0x0a9e('0x3c')},'transaction':_0x4774f4[_0x0a9e('0x3d')]});}},'instanceMethods':{'authenticate':function(_0x5bbcde,_0x13f44d){if(!_0x13f44d){return this[_0x0a9e('0x13')]===this[_0x0a9e('0x3e')](_0x5bbcde);}var _0x16f976=this;this[_0x0a9e('0x3e')](_0x5bbcde,function(_0x992c77,_0x6054ee){if(_0x992c77){_0x13f44d(_0x992c77);}if(_0x16f976[_0x0a9e('0x13')]===_0x6054ee){_0x13f44d(null,!![]);}else{_0x13f44d(null,![]);}});},'makeSalt':function(_0x34febd,_0x58a5c2){var _0xe401a=0x10;if(typeof arguments[0x0]===_0x0a9e('0x3f')){_0x58a5c2=arguments[0x0];_0x34febd=_0xe401a;}else if(typeof arguments[0x1]==='function'){_0x58a5c2=arguments[0x1];}else{throw new Error('Missing\x20Callback');}if(!_0x34febd){_0x34febd=_0xe401a;}return crypto['randomBytes'](_0x34febd,function(_0x1adfee,_0x4317e3){if(_0x1adfee){_0x58a5c2(_0x1adfee);}return _0x58a5c2(null,_0x4317e3[_0x0a9e('0x40')](_0x0a9e('0x41')));});},'encryptPassword':function(_0x61bb17,_0x30decb){if(!_0x61bb17||!this[_0x0a9e('0x42')]){return _0x30decb?_0x30decb(null):null;}var _0x375c18=0x2710;var _0x5d38ae=0x40;var _0x4b1b9f=Buffer['from'](this[_0x0a9e('0x42')],_0x0a9e('0x41'));if(!_0x30decb){return crypto[_0x0a9e('0x43')](_0x61bb17,_0x4b1b9f,_0x375c18,_0x5d38ae,'sha1')[_0x0a9e('0x40')](_0x0a9e('0x41'));}return crypto['pbkdf2'](_0x61bb17,_0x4b1b9f,_0x375c18,_0x5d38ae,'sha1',function(_0x2ef381,_0x59c6ff){if(_0x2ef381){_0x30decb(_0x2ef381);}return _0x30decb(null,_0x59c6ff[_0x0a9e('0x40')]('base64'));});},'updatePassword':function(_0x2e5e62){if(!this[_0x0a9e('0x13')]){return _0x2e5e62(null);}if(!validatePresenceOf(this[_0x0a9e('0x13')])&&authTypes['indexOf'](this[_0x0a9e('0x44')])===-0x1){_0x2e5e62(new Error(_0x0a9e('0x45')));}var _0x508b47=this;this['makeSalt'](function(_0x128aa6,_0x3aedd0){if(_0x128aa6){return _0x2e5e62(_0x128aa6);}_0x508b47['salt']=_0x3aedd0;_0x508b47[_0x0a9e('0x3e')](_0x508b47['password'],function(_0x211ef9,_0x523cd2){if(_0x211ef9){_0x2e5e62(_0x211ef9);}_0x508b47[_0x0a9e('0x13')]=_0x523cd2;_0x2e5e62(null);});});},'updateMd5Password':function(){this['md5secret']=md5(this['name']+':asterisk:'+this[_0x0a9e('0x13')]);return this['md5secret'];},'getRealtimeData':function(){var _0x2f7092={'id':this['id']};var _0x65432=jayson[_0x0a9e('0x46')][_0x0a9e('0x47')]({'port':0x232a});var _0x232830=jayson[_0x0a9e('0x46')][_0x0a9e('0x47')]({'port':0x232c});var _0x28d814={};var _0x4e67ab={};return _0x65432[_0x0a9e('0x48')](_0x0a9e('0x49'),_0x2f7092)[_0x0a9e('0x27')](function(_0x30c491){if(_0x30c491[_0x0a9e('0x38')]){throw new Error(_0x0a9e('0x4a'));}_0x28d814=_0x30c491['result'];return _0x232830[_0x0a9e('0x48')](_0x0a9e('0x49'),_0x2f7092);})['then'](function(_0x3649cc){if(_0x3649cc['error']){throw new Error(_0x0a9e('0x4b'));}_0x4e67ab=_0x3649cc['result'];var _0x4b3c1a=_['merge']({},_0x28d814,_0x4e67ab);return _0x4b3c1a;})[_0x0a9e('0x29')](function(_0x49d231){throw _0x49d231;});},'unpause':function(_0x2244d6,_0x1fc70e=_0x0a9e('0x4c')){var _0x7be420=this;var _0x1cca9f={};return Promise[_0x0a9e('0x30')]()['then'](function(){if(!_0x2244d6||_0x2244d6===_0x0a9e('0x4d')&&_0x1fc70e==='manual'){var _0xca4ade=jayson[_0x0a9e('0x46')][_0x0a9e('0x47')]({'port':0x232a});return _0xca4ade['request'](_0x0a9e('0x4e'),{'id':_0x7be420['id'],'name':_0x7be420[_0x0a9e('0x14')],'pause':![]})[_0x0a9e('0x27')](function(_0x32e134){if(_0x32e134['error']){throw new Error(util[_0x0a9e('0x8')](_0x0a9e('0x4f'),_0x7be420['id'],_0x7be420['name']));}return _0x32e134[_0x0a9e('0x50')][_0x0a9e('0x51')];});}})[_0x0a9e('0x27')](function(){if(!_0x2244d6||_0x2244d6===_0x0a9e('0x4d')){return _0x563b45[_0x0a9e('0x52')]['update']({'paused':0x0},{'where':{'UserId':_0x7be420['id']},'individualHooks':!![]});}})[_0x0a9e('0x27')](function(){var _0x2937e0=!_0x2244d6?_0x0a9e('0x26'):'findOne';var _0x3528b7={'membername':_0x7be420['name'],'type':'PAUSE','exitAt':null};if(_0x2244d6){_0x3528b7[_0x0a9e('0x53')]=_0x2244d6;}return _0x563b45[_0x0a9e('0x54')][_0x2937e0]({'where':_0x3528b7});})[_0x0a9e('0x27')](function(_0x19c995){if(_0x19c995){var _0x186f39=Array[_0x0a9e('0x55')](_0x19c995)?_0x19c995:[_0x19c995];var _0x387489=_0x186f39[_0x0a9e('0x56')](function(_0x2d7205){return _0x2d7205[_0x0a9e('0x57')]({'exitAt':moment()[_0x0a9e('0x8')](_0x0a9e('0x58')),'data2':_0x1fc70e});});return Promise[_0x0a9e('0x59')](_0x387489);}})[_0x0a9e('0x27')](function(){if(!_0x2244d6){_0x1cca9f[_0x0a9e('0x5a')]=![];_0x1cca9f[_0x0a9e('0x5b')]=![];_0x1cca9f[_0x0a9e('0x5c')]=![];_0x1cca9f[_0x0a9e('0x5d')]=![];_0x1cca9f['smsPause']=![];_0x1cca9f[_0x0a9e('0x5e')]=![];_0x1cca9f[_0x0a9e('0x5f')]=![];}else{_0x1cca9f[_0x2244d6+_0x0a9e('0x60')]=![];}return _0x7be420['getRealtimeData']();})[_0x0a9e('0x27')](function(_0x30944e){var _0x4b341d=require(_0x0a9e('0x61'));var _0x56e31e=_0x4b341d[_0x0a9e('0x62')]();_0x56e31e[_0x0a9e('0x63')](function(_0x13b5c0){var _0x4a43a8=_0x13b5c0+'Status';_0x7be420['setDataValue']([_0x4a43a8],_0x30944e[_0x4a43a8]);});return _0x7be420[_0x0a9e('0x57')](_0x1cca9f);})[_0x0a9e('0x29')](function(_0x1104ad){throw _0x1104ad;});}}});};
\ No newline at end of file
+var _0xa9e0=['%s%s','prefix','push','chanspy','record','merge','MixMonitor','recordingFormat','auth','Authenticate','password','name','options','join','StopMixMonitor','wav','WAV','gsm','from-sip','Set','extensionMonitor','_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','_XCALLY_MIXMONITOR_FORMAT=%s','Dial','SIP/%s,,tTxXU(xcally-mixmonitor-context)','SIP/%s,,tTxX','Hangup','defaults','VoiceChanSpy','findAll','then','internal','catch','exports','models','define','User','utf8','userProfileId','resolve','UserProfile','find','privacyEnabled','updateMd5Password','changed','updatePassword','concat','error','bulkCreate','VoiceExtension','destroy','system','transaction','encryptPassword','function','toString','base64','salt','pbkdf2Sync','provider','Invalid\x20password','client','http','request','Agents','Unable\x20to\x20retrieve\x20RPC\x20agent\x20(AMI)','Unable\x20to\x20retrieve\x20RPC\x20agent\x20(Routing)','manual','voice','QueuePause','Unable\x20to\x20unpause\x20agent\x20%s:$s','result','message','UserVoiceQueueRt','channel','MemberReport','isArray','map','update','YYYY-MM-DD\x20HH:mm:ss','all','voicePause','mailPause','chatPause','faxPause','whatsappPause','openchannelPause','Pause','../../config/utils','getChannels','forEach','bluebird','crypto','util','lodash','./user.attributes','google','length','context','format'];(function(_0x4058db,_0x2ef970){var _0xe40045=function(_0x107208){while(--_0x107208){_0x4058db['push'](_0x4058db['shift']());}};_0xe40045(++_0x2ef970);}(_0xa9e0,0x123));var _0x0a9e=function(_0x25bea7,_0x49ab45){_0x25bea7=_0x25bea7-0x0;var _0x175952=_0xa9e0[_0x25bea7];return _0x175952;};'use strict';var BPromise=require(_0x0a9e('0x0'));var crypto=require(_0x0a9e('0x1'));var util=require(_0x0a9e('0x2'));var md5=require('md5');var moment=require('moment');var _=require(_0x0a9e('0x3'));var jayson=require('jayson/promise');var attributes=require(_0x0a9e('0x4'));var authTypes=[_0x0a9e('0x5')];var validatePresenceOf=function(_0x2ab90b){return _0x2ab90b&&_0x2ab90b[_0x0a9e('0x6')];};var getChanSpyApplications=function(_0x981158,_0x57b080,_0x219af0){var _0x441e3a={'context':_0x981158[_0x0a9e('0x7')]||'from-sip','type':'system','isApp':![],'UserId':_0x981158['id']};var _0xe42b77=[];for(var _0x56465b=0x0,_0x52cace=0x1;_0x56465b<_0x219af0[_0x0a9e('0x6')];_0x56465b++,_0x52cace=0x1){var _0xf81284={'exten':util[_0x0a9e('0x8')](_0x0a9e('0x9'),_0x219af0[_0x56465b][_0x0a9e('0xa')],_0x57b080),'ChanSpyId':_0x219af0[_0x56465b]['id']};_0xe42b77[_0x0a9e('0xb')](_['merge']({'app':'Set','appdata':util['format']('CDR(type)=%s',_0x0a9e('0xc')),'priority':_0x52cace++},_0x441e3a,_0xf81284));if(_0x219af0[_0x56465b][_0x0a9e('0xd')]){_0xe42b77[_0x0a9e('0xb')](_[_0x0a9e('0xe')]({'app':_0x0a9e('0xf'),'appdata':util[_0x0a9e('0x8')]('${UNIQUEID}.%s,a',_0x219af0[_0x56465b][_0x0a9e('0x10')]),'priority':_0x52cace++},_0x441e3a,_0xf81284));}if(_0x219af0[_0x56465b][_0x0a9e('0x11')]){_0xe42b77[_0x0a9e('0xb')](_[_0x0a9e('0xe')]({'app':_0x0a9e('0x12'),'appdata':_0x219af0[_0x56465b][_0x0a9e('0x13')],'priority':_0x52cace++},_0x441e3a,_0xf81284));}_0xe42b77['push'](_[_0x0a9e('0xe')]({'app':'ChanSpy','appdata':util[_0x0a9e('0x8')]('SIP/%s,%s',_0x981158[_0x0a9e('0x14')],_0x219af0[_0x56465b][_0x0a9e('0x15')]?_0x219af0[_0x56465b]['options'][_0x0a9e('0x16')](''):''),'priority':_0x52cace++},_0x441e3a,_0xf81284));if(_0x219af0[_0x56465b]['record']){_0xe42b77[_0x0a9e('0xb')](_[_0x0a9e('0xe')]({'app':_0x0a9e('0x17'),'priority':_0x52cace++},_0x441e3a,_0xf81284));}}return _0xe42b77;};var getUserApplications=function(_0x205fd6,_0x31b1ca){var _0x2eb11f=[_0x0a9e('0x18'),_0x0a9e('0x19'),_0x0a9e('0x1a')];var _0x112016={'context':_0x205fd6[_0x0a9e('0x7')]||_0x0a9e('0x1b'),'exten':_0x31b1ca,'type':'system','isApp':![],'UserId':_0x205fd6['id']};var _0x2c3407=[{'app':_0x0a9e('0x1c'),'appdata':'CDR(type)=internal'}];if(_0x205fd6[_0x0a9e('0x1d')]&&_['includes'](_0x2eb11f,_0x205fd6['extensionMonitor'])){_0x2c3407[_0x0a9e('0xb')]({'app':_0x0a9e('0x1c'),'appdata':_0x0a9e('0x1e')});_0x2c3407[_0x0a9e('0xb')]({'app':'Set','appdata':util[_0x0a9e('0x8')](_0x0a9e('0x1f'),_0x205fd6[_0x0a9e('0x1d')])});_0x2c3407[_0x0a9e('0xb')]({'app':_0x0a9e('0x20'),'appdata':util[_0x0a9e('0x8')](_0x0a9e('0x21'),_0x205fd6['name'])});}else{_0x2c3407['push']({'app':_0x0a9e('0x20'),'appdata':util[_0x0a9e('0x8')](_0x0a9e('0x22'),_0x205fd6[_0x0a9e('0x14')])});}_0x2c3407['push']({'app':_0x0a9e('0x23')});for(var _0x479bc4=0x0;_0x479bc4<_0x2c3407[_0x0a9e('0x6')];_0x479bc4++){_0x2c3407[_0x479bc4]['priority']=_0x479bc4+0x1;_0x2c3407[_0x479bc4]=_[_0x0a9e('0x24')](_0x2c3407[_0x479bc4],_0x112016);}return _0x2c3407;};var getChanSpyPromise=function(_0x34dc65,_0x25fba9){return new BPromise(function(_0x14433c,_0x140511){return _0x34dc65[_0x0a9e('0x25')][_0x0a9e('0x26')]()[_0x0a9e('0x27')](function(_0x5a101a){if(_0x5a101a){var _0x3652a7=getChanSpyApplications(_0x25fba9,_0x25fba9[_0x0a9e('0x28')],_0x5a101a);if(_0x25fba9[_0x0a9e('0x28')]!=_0x25fba9[_0x0a9e('0x14')]){_0x3652a7=_0x3652a7['concat'](getChanSpyApplications(_0x25fba9,_0x25fba9[_0x0a9e('0x14')],_0x5a101a));}return _0x14433c(_0x3652a7);}return _0x14433c([]);})[_0x0a9e('0x29')](function(_0x1843b2){_0x140511(_0x1843b2);});});};module[_0x0a9e('0x2a')]=function(_0x58b06f){var _0x563b45=_0x58b06f[_0x0a9e('0x2b')];return _0x58b06f[_0x0a9e('0x2c')](_0x0a9e('0x2d'),attributes,{'tableName':'users','charset':_0x0a9e('0x2e'),'collate':'utf8_bin','hooks':{'beforeCreate':function(_0x2407f9,_0x3ae878,_0x1122db){var _0x33bdb7=typeof _0x2407f9[_0x0a9e('0x2f')]==='undefined'?BPromise[_0x0a9e('0x30')](null):_0x563b45[_0x0a9e('0x31')][_0x0a9e('0x32')]({'where':{'id':_0x2407f9[_0x0a9e('0x2f')]}});_0x33bdb7[_0x0a9e('0x27')](function(_0x409319){if(_0x409319){_0x2407f9[_0x0a9e('0x33')]=_0x409319[_0x0a9e('0x33')];}})['then'](function(){_0x2407f9[_0x0a9e('0x34')]();_0x2407f9['updatePassword'](_0x1122db);})[_0x0a9e('0x29')](function(_0x14b13f){_0x1122db(_0x14b13f);});},'beforeUpdate':function(_0x2b7e7f,_0x3f3d41,_0x567193){Promise[_0x0a9e('0x30')]()[_0x0a9e('0x27')](function(){if(_0x2b7e7f[_0x0a9e('0x35')](_0x0a9e('0x2f'))===![])return;return _0x563b45['UserProfile']['find']({'where':{'id':_0x2b7e7f[_0x0a9e('0x2f')]}})['then'](function(_0x24936a){if(_0x24936a)_0x2b7e7f[_0x0a9e('0x33')]=_0x24936a[_0x0a9e('0x33')];return;});})[_0x0a9e('0x27')](function(){if(_0x2b7e7f['changed'](_0x0a9e('0x13'))){_0x2b7e7f[_0x0a9e('0x34')]();return _0x2b7e7f[_0x0a9e('0x36')](_0x567193);}_0x567193();})['catch'](function(_0x1dbf74){_0x567193(_0x1dbf74);});},'afterCreate':function(_0x1a180b,_0x289467,_0x4c1c0e){var _0x546ef8=getUserApplications(_0x1a180b,_0x1a180b[_0x0a9e('0x28')]);if(_0x1a180b[_0x0a9e('0x28')]!=_0x1a180b['name']){_0x546ef8=_0x546ef8[_0x0a9e('0x37')](getUserApplications(_0x1a180b,_0x1a180b[_0x0a9e('0x14')]));}return Promise[_0x0a9e('0x30')]()[_0x0a9e('0x27')](function(){if(!_0x1a180b['userSetting']){return _0x1a180b['createUserSetting']({'clientSideLoggingLevel':_0x0a9e('0x38'),'clientSideLoggingEnabled':![]});}})[_0x0a9e('0x27')](function(){return _0x563b45['VoiceExtension'][_0x0a9e('0x39')](_0x546ef8);})[_0x0a9e('0x27')](function(){if(_0x1a180b[_0x0a9e('0xc')]){return getChanSpyPromise(_0x563b45,_0x1a180b);}})['then'](function(_0x316c8f){if(_0x316c8f&&_0x316c8f[_0x0a9e('0x6')]){return _0x563b45[_0x0a9e('0x3a')][_0x0a9e('0x39')](_0x316c8f);}})[_0x0a9e('0x27')](function(){_0x4c1c0e();})[_0x0a9e('0x29')](function(_0x2881b3){_0x4c1c0e(_0x2881b3);});},'afterUpdate':function(_0x45a9b8,_0x23b089,_0x3da2cd){return BPromise[_0x0a9e('0x30')]()[_0x0a9e('0x27')](function(){if(_0x45a9b8[_0x0a9e('0x35')](_0x0a9e('0xc'))||_0x45a9b8[_0x0a9e('0x35')]('context')){return _0x563b45['VoiceExtension'][_0x0a9e('0x3b')]({'where':{'UserId':_0x45a9b8['id'],'type':_0x0a9e('0x3c'),'ChanSpyId':{'$ne':null}}})[_0x0a9e('0x27')](function(){if(_0x45a9b8[_0x0a9e('0xc')]){return getChanSpyPromise(_0x563b45,_0x45a9b8)[_0x0a9e('0x27')](function(_0xc9a702){if(_0xc9a702&&_0xc9a702[_0x0a9e('0x6')]){return _0x563b45[_0x0a9e('0x3a')][_0x0a9e('0x39')](_0xc9a702);}});}});}})[_0x0a9e('0x27')](function(){if(_0x45a9b8[_0x0a9e('0x35')](_0x0a9e('0x1d'))||_0x45a9b8['changed'](_0x0a9e('0x7'))){return _0x563b45[_0x0a9e('0x3a')][_0x0a9e('0x3b')]({'where':{'UserId':_0x45a9b8['id'],'type':_0x0a9e('0x3c'),'ChanSpyId':null}})[_0x0a9e('0x27')](function(){var _0xbe9d19=getUserApplications(_0x45a9b8,_0x45a9b8[_0x0a9e('0x28')]);if(_0x45a9b8[_0x0a9e('0x28')]!=_0x45a9b8['name']){_0xbe9d19=_0xbe9d19[_0x0a9e('0x37')](getUserApplications(_0x45a9b8,_0x45a9b8['name']));}return _0x563b45[_0x0a9e('0x3a')][_0x0a9e('0x39')](_0xbe9d19);});}})[_0x0a9e('0x27')](function(){_0x3da2cd();})['catch'](function(_0x14bec2){_0x3da2cd(_0x14bec2);});},'afterDestroy':function(_0x7f6eb1,_0x4774f4){return _0x563b45[_0x0a9e('0x3a')][_0x0a9e('0x3b')]({'where':{'UserId':_0x7f6eb1['id'],'type':_0x0a9e('0x3c')},'transaction':_0x4774f4[_0x0a9e('0x3d')]});}},'instanceMethods':{'authenticate':function(_0x5bbcde,_0x13f44d){if(!_0x13f44d){return this[_0x0a9e('0x13')]===this[_0x0a9e('0x3e')](_0x5bbcde);}var _0x16f976=this;this[_0x0a9e('0x3e')](_0x5bbcde,function(_0x992c77,_0x6054ee){if(_0x992c77){_0x13f44d(_0x992c77);}if(_0x16f976[_0x0a9e('0x13')]===_0x6054ee){_0x13f44d(null,!![]);}else{_0x13f44d(null,![]);}});},'makeSalt':function(_0x34febd,_0x58a5c2){var _0xe401a=0x10;if(typeof arguments[0x0]===_0x0a9e('0x3f')){_0x58a5c2=arguments[0x0];_0x34febd=_0xe401a;}else if(typeof arguments[0x1]==='function'){_0x58a5c2=arguments[0x1];}else{throw new Error('Missing\x20Callback');}if(!_0x34febd){_0x34febd=_0xe401a;}return crypto['randomBytes'](_0x34febd,function(_0x1adfee,_0x4317e3){if(_0x1adfee){_0x58a5c2(_0x1adfee);}return _0x58a5c2(null,_0x4317e3[_0x0a9e('0x40')](_0x0a9e('0x41')));});},'encryptPassword':function(_0x61bb17,_0x30decb){if(!_0x61bb17||!this[_0x0a9e('0x42')]){return _0x30decb?_0x30decb(null):null;}var _0x375c18=0x2710;var _0x5d38ae=0x40;var _0x4b1b9f=Buffer['from'](this[_0x0a9e('0x42')],_0x0a9e('0x41'));if(!_0x30decb){return crypto[_0x0a9e('0x43')](_0x61bb17,_0x4b1b9f,_0x375c18,_0x5d38ae,'sha1')[_0x0a9e('0x40')](_0x0a9e('0x41'));}return crypto['pbkdf2'](_0x61bb17,_0x4b1b9f,_0x375c18,_0x5d38ae,'sha1',function(_0x2ef381,_0x59c6ff){if(_0x2ef381){_0x30decb(_0x2ef381);}return _0x30decb(null,_0x59c6ff[_0x0a9e('0x40')]('base64'));});},'updatePassword':function(_0x2e5e62){if(!this[_0x0a9e('0x13')]){return _0x2e5e62(null);}if(!validatePresenceOf(this[_0x0a9e('0x13')])&&authTypes['indexOf'](this[_0x0a9e('0x44')])===-0x1){_0x2e5e62(new Error(_0x0a9e('0x45')));}var _0x508b47=this;this['makeSalt'](function(_0x128aa6,_0x3aedd0){if(_0x128aa6){return _0x2e5e62(_0x128aa6);}_0x508b47['salt']=_0x3aedd0;_0x508b47[_0x0a9e('0x3e')](_0x508b47['password'],function(_0x211ef9,_0x523cd2){if(_0x211ef9){_0x2e5e62(_0x211ef9);}_0x508b47[_0x0a9e('0x13')]=_0x523cd2;_0x2e5e62(null);});});},'updateMd5Password':function(){this['md5secret']=md5(this['name']+':asterisk:'+this[_0x0a9e('0x13')]);return this['md5secret'];},'getRealtimeData':function(){var _0x2f7092={'id':this['id']};var _0x65432=jayson[_0x0a9e('0x46')][_0x0a9e('0x47')]({'port':0x232a});var _0x232830=jayson[_0x0a9e('0x46')][_0x0a9e('0x47')]({'port':0x232c});var _0x28d814={};var _0x4e67ab={};return _0x65432[_0x0a9e('0x48')](_0x0a9e('0x49'),_0x2f7092)[_0x0a9e('0x27')](function(_0x30c491){if(_0x30c491[_0x0a9e('0x38')]){throw new Error(_0x0a9e('0x4a'));}_0x28d814=_0x30c491['result'];return _0x232830[_0x0a9e('0x48')](_0x0a9e('0x49'),_0x2f7092);})['then'](function(_0x3649cc){if(_0x3649cc['error']){throw new Error(_0x0a9e('0x4b'));}_0x4e67ab=_0x3649cc['result'];var _0x4b3c1a=_['merge']({},_0x28d814,_0x4e67ab);return _0x4b3c1a;})[_0x0a9e('0x29')](function(_0x49d231){throw _0x49d231;});},'unpause':function(_0x2244d6,_0x1fc70e=_0x0a9e('0x4c')){var _0x7be420=this;var _0x1cca9f={};return Promise[_0x0a9e('0x30')]()['then'](function(){if(!_0x2244d6||_0x2244d6===_0x0a9e('0x4d')&&_0x1fc70e==='manual'){var _0xca4ade=jayson[_0x0a9e('0x46')][_0x0a9e('0x47')]({'port':0x232a});return _0xca4ade['request'](_0x0a9e('0x4e'),{'id':_0x7be420['id'],'name':_0x7be420[_0x0a9e('0x14')],'pause':![]})[_0x0a9e('0x27')](function(_0x32e134){if(_0x32e134['error']){throw new Error(util[_0x0a9e('0x8')](_0x0a9e('0x4f'),_0x7be420['id'],_0x7be420['name']));}return _0x32e134[_0x0a9e('0x50')][_0x0a9e('0x51')];});}})[_0x0a9e('0x27')](function(){if(!_0x2244d6||_0x2244d6===_0x0a9e('0x4d')){return _0x563b45[_0x0a9e('0x52')]['update']({'paused':0x0},{'where':{'UserId':_0x7be420['id']},'individualHooks':!![]});}})[_0x0a9e('0x27')](function(){var _0x2937e0=!_0x2244d6?_0x0a9e('0x26'):'findOne';var _0x3528b7={'membername':_0x7be420['name'],'type':'PAUSE','exitAt':null};if(_0x2244d6){_0x3528b7[_0x0a9e('0x53')]=_0x2244d6;}return _0x563b45[_0x0a9e('0x54')][_0x2937e0]({'where':_0x3528b7});})[_0x0a9e('0x27')](function(_0x19c995){if(_0x19c995){var _0x186f39=Array[_0x0a9e('0x55')](_0x19c995)?_0x19c995:[_0x19c995];var _0x387489=_0x186f39[_0x0a9e('0x56')](function(_0x2d7205){return _0x2d7205[_0x0a9e('0x57')]({'exitAt':moment()[_0x0a9e('0x8')](_0x0a9e('0x58')),'data2':_0x1fc70e});});return Promise[_0x0a9e('0x59')](_0x387489);}})[_0x0a9e('0x27')](function(){if(!_0x2244d6){_0x1cca9f[_0x0a9e('0x5a')]=![];_0x1cca9f[_0x0a9e('0x5b')]=![];_0x1cca9f[_0x0a9e('0x5c')]=![];_0x1cca9f[_0x0a9e('0x5d')]=![];_0x1cca9f['smsPause']=![];_0x1cca9f[_0x0a9e('0x5e')]=![];_0x1cca9f[_0x0a9e('0x5f')]=![];}else{_0x1cca9f[_0x2244d6+_0x0a9e('0x60')]=![];}return _0x7be420['getRealtimeData']();})[_0x0a9e('0x27')](function(_0x30944e){var _0x4b341d=require(_0x0a9e('0x61'));var _0x56e31e=_0x4b341d[_0x0a9e('0x62')]();_0x56e31e[_0x0a9e('0x63')](function(_0x13b5c0){var _0x4a43a8=_0x13b5c0+'Status';_0x7be420['setDataValue']([_0x4a43a8],_0x30944e[_0x4a43a8]);});return _0x7be420[_0x0a9e('0x57')](_0x1cca9f);})[_0x0a9e('0x29')](function(_0x1104ad){throw _0x1104ad;});}}});};
\ No newline at end of file
index 62d1b8e..fcda5c5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x839e=['LoginUser','mobile','loginInPause','count','getLicense','agents','Maximum\x20login\x20has\x20been\x20reached','getVoiceQueues','UserVoiceQueue.penalty','all','merge','LOGIN','callysquare','LOGININPAUSE','concat','lodash','util','moment','bluebird','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','redis','localhost','socket.io-emitter','./user.socket','register','GetUser','User','findAll','options','raw','attributes','limit','include','map','model','then','info','stringify','error','message','ShowUser','where','debug','find','name','role','internal','interface','format','User\x20with\x20id\x20%s\x20not\x20found','params','UserVoiceQueueRt','update','MemberReport','PAUSE','YYYY-MM-DD\x20HH:mm:ss','updateAttributes','getChannels','forEach','isNil','body','type','DEFAULT\x20PAUSE','uniqueid','bulkCreate','catch','resolve','channel','isValidChannel','Channel\x20parameter\x20%s\x20is\x20invalid','online','voicePause','mailPause','chatPause','faxPause','openchannelPause','smsPause','whatsappPause','lastPauseAt','findOne','destroy','length','push'];(function(_0x20bf3a,_0x5f05c0){var _0x3c8cbb=function(_0x260acd){while(--_0x260acd){_0x20bf3a['push'](_0x20bf3a['shift']());}};_0x3c8cbb(++_0x5f05c0);}(_0x839e,0x114));var _0xe839=function(_0x48fb10,_0xa50a89){_0x48fb10=_0x48fb10-0x0;var _0x534251=_0x839e[_0x48fb10];return _0x534251;};'use strict';var _=require(_0xe839('0x0'));var util=require(_0xe839('0x1'));var moment=require(_0xe839('0x2'));var BPromise=require(_0xe839('0x3'));var Redis=require('ioredis');var db=require(_0xe839('0x4'))['db'];var utils=require(_0xe839('0x5'));var logger=require(_0xe839('0x6'))(_0xe839('0x7'));var config=require(_0xe839('0x8'));config[_0xe839('0x9')]=_['defaults'](config[_0xe839('0x9')],{'host':_0xe839('0xa'),'port':0x18eb});var socket=require(_0xe839('0xb'))(new Redis(config[_0xe839('0x9')]));require(_0xe839('0xc'))[_0xe839('0xd')](socket);exports[_0xe839('0xe')]=function(_0x50f02e){var _0x44f731=this;return new Promise(function(_0x190a26,_0x421f6b){return db[_0xe839('0xf')][_0xe839('0x10')]({'raw':_0x50f02e[_0xe839('0x11')]?_0x50f02e[_0xe839('0x11')][_0xe839('0x12')]===undefined?!![]:![]:!![],'where':_0x50f02e['options']?_0x50f02e[_0xe839('0x11')]['where']||null:null,'attributes':_0x50f02e[_0xe839('0x11')]?_0x50f02e[_0xe839('0x11')][_0xe839('0x13')]||null:null,'limit':_0x50f02e[_0xe839('0x11')]?_0x50f02e[_0xe839('0x11')][_0xe839('0x14')]||null:null,'include':_0x50f02e[_0xe839('0x11')]?_0x50f02e[_0xe839('0x11')][_0xe839('0x15')]?_[_0xe839('0x16')](_0x50f02e['options'][_0xe839('0x15')],function(_0x1b27a6){return{'model':db[_0x1b27a6[_0xe839('0x17')]],'as':_0x1b27a6['as'],'attributes':_0x1b27a6[_0xe839('0x13')],'include':_0x1b27a6[_0xe839('0x15')]?_[_0xe839('0x16')](_0x1b27a6[_0xe839('0x15')],function(_0x2dff1b){return{'model':db[_0x2dff1b[_0xe839('0x17')]],'as':_0x2dff1b['as'],'attributes':_0x2dff1b[_0xe839('0x13')],'include':_0x2dff1b[_0xe839('0x15')]?_[_0xe839('0x16')](_0x2dff1b[_0xe839('0x15')],function(_0x2ac53b){return{'model':db[_0x2ac53b[_0xe839('0x17')]],'as':_0x2ac53b['as'],'attributes':_0x2ac53b[_0xe839('0x13')]};}):[]};}):[]};}):[]:[]})[_0xe839('0x18')](function(_0x55a120){logger[_0xe839('0x19')](_0xe839('0xe'),_0x50f02e);logger['debug'](_0xe839('0xe'),_0x50f02e,JSON[_0xe839('0x1a')](_0x55a120));_0x190a26(_0x55a120);})['catch'](function(_0x438b27){logger[_0xe839('0x1b')](_0xe839('0xe'),_0x438b27[_0xe839('0x1c')],_0x50f02e);_0x421f6b(_0x44f731[_0xe839('0x1b')](0x1f4,_0x438b27[_0xe839('0x1c')]));});});};exports[_0xe839('0x1d')]=function(_0x2832cf){var _0x39097d=this;return new Promise(function(_0x1ead0f,_0x491c8b){return db[_0xe839('0xf')]['find']({'raw':_0x2832cf['options']?_0x2832cf[_0xe839('0x11')]['raw']===undefined?!![]:![]:!![],'where':_0x2832cf[_0xe839('0x11')]?_0x2832cf[_0xe839('0x11')][_0xe839('0x1e')]||null:null,'attributes':_0x2832cf['options']?_0x2832cf['options']['attributes']||null:null,'include':_0x2832cf[_0xe839('0x11')]?_0x2832cf[_0xe839('0x11')]['include']?_['map'](_0x2832cf['options'][_0xe839('0x15')],function(_0x3b00be){return{'model':db[_0x3b00be[_0xe839('0x17')]],'as':_0x3b00be['as'],'attributes':_0x3b00be[_0xe839('0x13')],'include':_0x3b00be[_0xe839('0x15')]?_[_0xe839('0x16')](_0x3b00be[_0xe839('0x15')],function(_0x3e4b4f){return{'model':db[_0x3e4b4f[_0xe839('0x17')]],'as':_0x3e4b4f['as'],'attributes':_0x3e4b4f[_0xe839('0x13')],'include':_0x3e4b4f[_0xe839('0x15')]?_[_0xe839('0x16')](_0x3e4b4f[_0xe839('0x15')],function(_0x58c9c6){return{'model':db[_0x58c9c6[_0xe839('0x17')]],'as':_0x58c9c6['as'],'attributes':_0x58c9c6[_0xe839('0x13')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x1c1cc9){logger[_0xe839('0x19')](_0xe839('0x1d'),_0x2832cf);logger[_0xe839('0x1f')](_0xe839('0x1d'),_0x2832cf,JSON[_0xe839('0x1a')](_0x1c1cc9));_0x1ead0f(_0x1c1cc9);})['catch'](function(_0x1e2fa0){logger[_0xe839('0x1b')](_0xe839('0x1d'),_0x1e2fa0[_0xe839('0x1c')],_0x2832cf);_0x491c8b(_0x39097d['error'](0x1f4,_0x1e2fa0[_0xe839('0x1c')]));});});};exports['PauseUser']=function(_0x13c214){var _0x166027;return db[_0xe839('0xf')][_0xe839('0x20')]({'where':_0x13c214[_0xe839('0x11')][_0xe839('0x1e')]||{},'attributes':['id',_0xe839('0x21'),_0xe839('0x22'),_0xe839('0x23'),_0xe839('0x24')]})[_0xe839('0x18')](function(_0x19b6f1){if(!_0x19b6f1){throw new Error(util[_0xe839('0x25')](_0xe839('0x26'),_0x13c214[_0xe839('0x27')]['id']));}_0x166027=_0x19b6f1;return db[_0xe839('0x28')][_0xe839('0x29')]({'paused':0x1},{'where':{'UserId':_0x166027['id']},'individualHooks':!![]});})[_0xe839('0x18')](function(){return db[_0xe839('0x2a')]['findAll']({'where':{'membername':_0x166027[_0xe839('0x21')],'type':_0xe839('0x2b'),'exitAt':null}});})['then'](function(_0x5c2b3b){if(_0x5c2b3b&&_0x5c2b3b['length']){var _0x8d8f4f=moment()[_0xe839('0x25')](_0xe839('0x2c'));for(var _0x482f22=0x0,_0xab945a=_0x5c2b3b['length'];_0x482f22<_0xab945a;_0x482f22++){_0x5c2b3b[_0x482f22][_0xe839('0x2d')]({'exitAt':_0x8d8f4f});}}})[_0xe839('0x18')](function(){var _0x5b2e45=[];var _0x3d736a=utils[_0xe839('0x2e')]();_0x3d736a[_0xe839('0x2f')](function(_0x4f1c14){_0x5b2e45['push']({'channel':_0x4f1c14,'membername':_0x166027[_0xe839('0x21')],'interface':_[_0xe839('0x30')](_0x166027['interface'])?util[_0xe839('0x25')]('SIP/%s',_0x166027[_0xe839('0x21')]):_0x166027[_0xe839('0x24')],'type':_0xe839('0x2b'),'enterAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss'),'data1':_0x13c214[_0xe839('0x31')][_0xe839('0x32')]||_0xe839('0x33'),'role':_0x166027[_0xe839('0x22')],'internal':_0x166027[_0xe839('0x23')],'uniqueid':_0x13c214[_0xe839('0x31')][_0xe839('0x34')]||null});});return db[_0xe839('0x2a')][_0xe839('0x35')](_0x5b2e45,{'individualHooks':!![]});})[_0xe839('0x18')](function(){return _0x166027['update']({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'openchannelPause':!![],'whatsappPause':!![],'pauseType':_0x13c214[_0xe839('0x31')][_0xe839('0x32')]||_0xe839('0x33'),'lastPauseAt':moment()[_0xe839('0x25')](_0xe839('0x2c'))});})[_0xe839('0x36')](function(_0x39a535){throw _0x39a535;});};exports['UnpauseUser']=function(_0x60ab04){return Promise[_0xe839('0x37')]()[_0xe839('0x18')](function(){if(_0x60ab04[_0xe839('0x31')][_0xe839('0x38')]&&!utils[_0xe839('0x39')](_0x60ab04['body'][_0xe839('0x38')])){throw new Error(util[_0xe839('0x25')](_0xe839('0x3a'),_0x60ab04[_0xe839('0x31')][_0xe839('0x38')]));}return db[_0xe839('0xf')]['findOne']({'where':_0x60ab04['options']['where']||{},'attributes':['id',_0xe839('0x21'),'role',_0xe839('0x23'),_0xe839('0x24'),_0xe839('0x3b'),_0xe839('0x3c'),_0xe839('0x3d'),_0xe839('0x3e'),_0xe839('0x3f'),_0xe839('0x40'),_0xe839('0x41'),_0xe839('0x42'),'pauseType',_0xe839('0x43')]});})[_0xe839('0x18')](function(_0x5d4693){if(!_0x5d4693){throw new Error(util['format']('User\x20with\x20id\x20%s\x20not\x20found',_0x60ab04[_0xe839('0x27')]['id']));}return _0x5d4693['unpause'](_0x60ab04[_0xe839('0x31')][_0xe839('0x38')],'system');})[_0xe839('0x36')](function(_0x1cb9ed){throw _0x1cb9ed;});};exports['LogoutUser']=function(_0x4b17a8){var _0x4a4e95=this;return new Promise(function(_0x48a0c4,_0x2cb82a){var _0xe72a45;return db['User'][_0xe839('0x44')]({'where':_0x4b17a8[_0xe839('0x11')][_0xe839('0x1e')]||{},'attributes':['id','name']})['then'](function(_0x16da80){if(_0x16da80){_0xe72a45=_0x16da80;return db['UserVoiceQueueRt'][_0xe839('0x45')]({'where':{'membername':_0xe72a45[_0xe839('0x21')]},'individualHooks':!![]});}})[_0xe839('0x18')](function(){if(_0xe72a45){return db[_0xe839('0x2a')][_0xe839('0x10')]({'where':{'membername':_0xe72a45[_0xe839('0x21')],'exitAt':null}});}})[_0xe839('0x18')](function(_0x228988){if(_0xe72a45){if(_0x228988&&_0x228988[_0xe839('0x46')]){var _0x58aba4=[];_0x228988[_0xe839('0x2f')](function(_0x19c8b8){_0x58aba4[_0xe839('0x47')](_0x19c8b8[_0xe839('0x29')]({'exitAt':moment()[_0xe839('0x25')]('YYYY-MM-DD\x20HH:mm:ss')}));});return BPromise['all'](_0x58aba4);}}})[_0xe839('0x18')](function(){if(_0xe72a45){return _0xe72a45[_0xe839('0x29')]({'online':![],'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![]});}})[_0xe839('0x18')](function(_0x39fb0a){_0x48a0c4(_0x39fb0a);})[_0xe839('0x36')](function(_0x30546d){_0x2cb82a(_0x4a4e95[_0xe839('0x1b')](0x1f4,_0x30546d[_0xe839('0x1c')]));});});};exports[_0xe839('0x48')]=function(_0x21a586){var _0x1c4c51=this;return new Promise(function(_0x1a5846,_0x42687b){var _0x302697;var _0x78321d;var _0x4ce4b2;var _0x2a5f1c;return db[_0xe839('0xf')][_0xe839('0x44')]({'where':_0x21a586[_0xe839('0x11')][_0xe839('0x1e')]||{},'attributes':['id',_0xe839('0x21'),_0xe839('0x22'),_0xe839('0x49'),'phone','internal',_0xe839('0x4a'),'interface']})[_0xe839('0x18')](function(_0x504ac7){if(_0x504ac7){_0x302697=_0x504ac7;_0x2a5f1c=_0x21a586[_0xe839('0x31')][_0xe839('0x24')]?_0x21a586['body'][_0xe839('0x24')]:util[_0xe839('0x25')]('SIP/%s',_0x302697[_0xe839('0x21')]);return db[_0xe839('0xf')][_0xe839('0x4b')]({'where':{'role':'agent','online':!![],'id':{'$ne':_0x302697['id']}}});}})[_0xe839('0x18')](function(_0x3b9aa6){if(_0x3b9aa6){_0x4ce4b2=_0x3b9aa6;return require('../../config/license/util')[_0xe839('0x4c')]();}})[_0xe839('0x18')](function(_0x539c86){if(_0x539c86&&_0x539c86['agents']&&_0x4ce4b2>=_0x539c86[_0xe839('0x4d')]){throw new Error(_0xe839('0x4e'));}})[_0xe839('0x18')](function(){if(_0x302697){return db[_0xe839('0x28')][_0xe839('0x45')]({'where':{'membername':_0x302697[_0xe839('0x21')]},'individualHooks':!![]});}})[_0xe839('0x18')](function(){if(_0x302697){return _0x302697[_0xe839('0x4f')]({'raw':!![]});}})[_0xe839('0x18')](function(_0x301471){if(_0x302697){if(_0x301471){var _0x245fb5=[];_0x78321d=_0x301471;if(_0x78321d[_0xe839('0x46')]){for(var _0x4e7790=0x0;_0x4e7790<_0x78321d[_0xe839('0x46')];_0x4e7790++){_0x245fb5['push'](db[_0xe839('0x28')]['upsert']({'membername':_0x302697[_0xe839('0x21')],'UserId':_0x302697['id'],'queue_name':_0x78321d[_0x4e7790][_0xe839('0x21')],'VoiceQueueId':_0x78321d[_0x4e7790]['id'],'interface':_0x2a5f1c,'paused':_0x302697[_0xe839('0x4a')]||![],'penalty':_0x78321d[_0x4e7790][_0xe839('0x50')]||0x0}));}return BPromise['all'](_0x245fb5);}}}})['then'](function(){if(_0x302697){return db[_0xe839('0x2a')]['findAll']({'where':{'membername':_0x302697['name'],'exitAt':null}});}})['then'](function(_0x369288){if(_0x302697){if(_0x369288&&_0x369288[_0xe839('0x46')]){var _0x434967=[];_0x369288[_0xe839('0x2f')](function(_0x2b81a4){_0x434967[_0xe839('0x47')](_0x2b81a4[_0xe839('0x29')]({'exitAt':moment()['format']('YYYY-MM-DD\x20HH:mm:ss')}));});return BPromise[_0xe839('0x51')](_0x434967);}}})['then'](function(){if(_0x302697){var _0x3c980f=[];var _0x174ea5=[];var _0x1709f0=utils[_0xe839('0x2e')]();var _0x134b62={'membername':_0x302697[_0xe839('0x21')],'interface':_0x2a5f1c,'enterAt':moment()['format'](_0xe839('0x2c')),'role':_0x302697[_0xe839('0x22')],'internal':_0x302697[_0xe839('0x23')]};_0x1709f0['forEach'](function(_0x3da657){_0x3c980f[_0xe839('0x47')](_[_0xe839('0x52')]({'channel':_0x3da657,'type':_0xe839('0x53'),'data1':_0xe839('0x54'),'data2':_0x2a5f1c},_0x134b62));if(_0x302697['loginInPause']){_0x174ea5['push'](_[_0xe839('0x52')]({'channel':_0x3da657,'type':_0xe839('0x2b'),'data1':_0xe839('0x55')},_0x134b62));}});return db['MemberReport'][_0xe839('0x35')](_0x3c980f[_0xe839('0x56')](_0x174ea5),{'individualHooks':!![]});}})[_0xe839('0x18')](function(){if(_0x302697){return _0x302697[_0xe839('0x29')]({'online':!![],'lastLoginAt':moment()[_0xe839('0x25')](_0xe839('0x2c')),'voicePause':_0x302697[_0xe839('0x4a')]||![],'mailPause':_0x302697[_0xe839('0x4a')]||![],'chatPause':_0x302697[_0xe839('0x4a')]||![],'faxPause':_0x302697[_0xe839('0x4a')]||![],'smsPause':_0x302697[_0xe839('0x4a')]||![],'openchannelPause':_0x302697[_0xe839('0x4a')]||![],'pauseType':_0x302697[_0xe839('0x4a')]?_0xe839('0x55'):null,'lastPauseAt':moment()[_0xe839('0x25')]('YYYY-MM-DD\x20HH:mm:ss'),'interface':_0x2a5f1c});}})['then'](function(_0xc7b598){_0x1a5846(_0xc7b598);})[_0xe839('0x36')](function(_0x355f4e){_0x42687b(_0x1c4c51[_0xe839('0x1b')](0x1f4,_0x355f4e[_0xe839('0x1c')]));});});};
\ No newline at end of file
+var _0x3580=['forEach','push','isNil','body','type','MemberReport','bulkCreate','DEFAULT\x20PAUSE','UnpauseUser','resolve','channel','isValidChannel','Channel\x20parameter\x20%s\x20is\x20invalid','interface','online','voicePause','mailPause','chatPause','faxPause','openchannelPause','smsPause','whatsappPause','pauseType','unpause','system','LogoutUser','findOne','UserVoiceQueueRt','destroy','all','LoginUser','mobile','phone','loginInPause','SIP/%s','count','agent','../../config/license/util','getLicense','Maximum\x20login\x20has\x20been\x20reached','getVoiceQueues','upsert','UserVoiceQueue.penalty','merge','LOGIN','LOGININPAUSE','concat','lodash','util','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','redis','localhost','socket.io-emitter','./user.socket','register','User','options','raw','where','limit','include','map','model','attributes','then','GetUser','stringify','catch','error','message','ShowUser','find','info','debug','PauseUser','name','role','internal','User\x20with\x20id\x20%s\x20not\x20found','params','update','findAll','PAUSE','length','format','YYYY-MM-DD\x20HH:mm:ss','updateAttributes','getChannels'];(function(_0x494d1f,_0x3f72ff){var _0x457b6e=function(_0x38cb16){while(--_0x38cb16){_0x494d1f['push'](_0x494d1f['shift']());}};_0x457b6e(++_0x3f72ff);}(_0x3580,0x1a3));var _0x0358=function(_0xadfc89,_0x2d821c){_0xadfc89=_0xadfc89-0x0;var _0x29fe9f=_0x3580[_0xadfc89];return _0x29fe9f;};'use strict';var _=require(_0x0358('0x0'));var util=require(_0x0358('0x1'));var moment=require(_0x0358('0x2'));var BPromise=require('bluebird');var Redis=require(_0x0358('0x3'));var db=require(_0x0358('0x4'))['db'];var utils=require(_0x0358('0x5'));var logger=require(_0x0358('0x6'))(_0x0358('0x7'));var config=require('../../config/environment');config[_0x0358('0x8')]=_['defaults'](config['redis'],{'host':_0x0358('0x9'),'port':0x18eb});var socket=require(_0x0358('0xa'))(new Redis(config[_0x0358('0x8')]));require(_0x0358('0xb'))[_0x0358('0xc')](socket);exports['GetUser']=function(_0x1a637a){var _0x203977=this;return new Promise(function(_0x59c259,_0x5019b6){return db[_0x0358('0xd')]['findAll']({'raw':_0x1a637a[_0x0358('0xe')]?_0x1a637a[_0x0358('0xe')][_0x0358('0xf')]===undefined?!![]:![]:!![],'where':_0x1a637a[_0x0358('0xe')]?_0x1a637a['options'][_0x0358('0x10')]||null:null,'attributes':_0x1a637a[_0x0358('0xe')]?_0x1a637a[_0x0358('0xe')]['attributes']||null:null,'limit':_0x1a637a[_0x0358('0xe')]?_0x1a637a['options'][_0x0358('0x11')]||null:null,'include':_0x1a637a[_0x0358('0xe')]?_0x1a637a[_0x0358('0xe')][_0x0358('0x12')]?_[_0x0358('0x13')](_0x1a637a[_0x0358('0xe')]['include'],function(_0x54b951){return{'model':db[_0x54b951[_0x0358('0x14')]],'as':_0x54b951['as'],'attributes':_0x54b951[_0x0358('0x15')],'include':_0x54b951[_0x0358('0x12')]?_[_0x0358('0x13')](_0x54b951[_0x0358('0x12')],function(_0x52a4d5){return{'model':db[_0x52a4d5[_0x0358('0x14')]],'as':_0x52a4d5['as'],'attributes':_0x52a4d5[_0x0358('0x15')],'include':_0x52a4d5[_0x0358('0x12')]?_[_0x0358('0x13')](_0x52a4d5['include'],function(_0x30982b){return{'model':db[_0x30982b[_0x0358('0x14')]],'as':_0x30982b['as'],'attributes':_0x30982b[_0x0358('0x15')]};}):[]};}):[]};}):[]:[]})[_0x0358('0x16')](function(_0x4d82fb){logger['info'](_0x0358('0x17'),_0x1a637a);logger['debug'](_0x0358('0x17'),_0x1a637a,JSON[_0x0358('0x18')](_0x4d82fb));_0x59c259(_0x4d82fb);})[_0x0358('0x19')](function(_0x2a6245){logger[_0x0358('0x1a')](_0x0358('0x17'),_0x2a6245[_0x0358('0x1b')],_0x1a637a);_0x5019b6(_0x203977[_0x0358('0x1a')](0x1f4,_0x2a6245['message']));});});};exports[_0x0358('0x1c')]=function(_0x2b637f){var _0x24be1f=this;return new Promise(function(_0x2e213f,_0x4c5521){return db[_0x0358('0xd')][_0x0358('0x1d')]({'raw':_0x2b637f[_0x0358('0xe')]?_0x2b637f[_0x0358('0xe')][_0x0358('0xf')]===undefined?!![]:![]:!![],'where':_0x2b637f[_0x0358('0xe')]?_0x2b637f['options'][_0x0358('0x10')]||null:null,'attributes':_0x2b637f[_0x0358('0xe')]?_0x2b637f[_0x0358('0xe')][_0x0358('0x15')]||null:null,'include':_0x2b637f[_0x0358('0xe')]?_0x2b637f[_0x0358('0xe')][_0x0358('0x12')]?_['map'](_0x2b637f[_0x0358('0xe')][_0x0358('0x12')],function(_0x4d7119){return{'model':db[_0x4d7119[_0x0358('0x14')]],'as':_0x4d7119['as'],'attributes':_0x4d7119[_0x0358('0x15')],'include':_0x4d7119['include']?_[_0x0358('0x13')](_0x4d7119['include'],function(_0x4d9cd5){return{'model':db[_0x4d9cd5[_0x0358('0x14')]],'as':_0x4d9cd5['as'],'attributes':_0x4d9cd5[_0x0358('0x15')],'include':_0x4d9cd5[_0x0358('0x12')]?_['map'](_0x4d9cd5[_0x0358('0x12')],function(_0x40370e){return{'model':db[_0x40370e[_0x0358('0x14')]],'as':_0x40370e['as'],'attributes':_0x40370e[_0x0358('0x15')]};}):[]};}):[]};}):[]:[]})[_0x0358('0x16')](function(_0x36fda4){logger[_0x0358('0x1e')](_0x0358('0x1c'),_0x2b637f);logger[_0x0358('0x1f')](_0x0358('0x1c'),_0x2b637f,JSON[_0x0358('0x18')](_0x36fda4));_0x2e213f(_0x36fda4);})[_0x0358('0x19')](function(_0x2519c4){logger[_0x0358('0x1a')](_0x0358('0x1c'),_0x2519c4['message'],_0x2b637f);_0x4c5521(_0x24be1f['error'](0x1f4,_0x2519c4[_0x0358('0x1b')]));});});};exports[_0x0358('0x20')]=function(_0xb108ce){var _0x45f1fb;return db[_0x0358('0xd')][_0x0358('0x1d')]({'where':_0xb108ce['options'][_0x0358('0x10')]||{},'attributes':['id',_0x0358('0x21'),_0x0358('0x22'),_0x0358('0x23'),'interface']})[_0x0358('0x16')](function(_0xad434f){if(!_0xad434f){throw new Error(util['format'](_0x0358('0x24'),_0xb108ce[_0x0358('0x25')]['id']));}_0x45f1fb=_0xad434f;return db['UserVoiceQueueRt'][_0x0358('0x26')]({'paused':0x1},{'where':{'UserId':_0x45f1fb['id']},'individualHooks':!![]});})[_0x0358('0x16')](function(){return db['MemberReport'][_0x0358('0x27')]({'where':{'membername':_0x45f1fb[_0x0358('0x21')],'type':_0x0358('0x28'),'exitAt':null}});})[_0x0358('0x16')](function(_0x11ed24){if(_0x11ed24&&_0x11ed24[_0x0358('0x29')]){var _0x1b1d01=moment()[_0x0358('0x2a')](_0x0358('0x2b'));for(var _0x276ef8=0x0,_0x26ef7a=_0x11ed24[_0x0358('0x29')];_0x276ef8<_0x26ef7a;_0x276ef8++){_0x11ed24[_0x276ef8][_0x0358('0x2c')]({'exitAt':_0x1b1d01});}}})[_0x0358('0x16')](function(){var _0x1ee1f9=[];var _0x22b30a=utils[_0x0358('0x2d')]();_0x22b30a[_0x0358('0x2e')](function(_0x8b139f){_0x1ee1f9[_0x0358('0x2f')]({'channel':_0x8b139f,'membername':_0x45f1fb[_0x0358('0x21')],'interface':_[_0x0358('0x30')](_0x45f1fb['interface'])?util[_0x0358('0x2a')]('SIP/%s',_0x45f1fb[_0x0358('0x21')]):_0x45f1fb['interface'],'type':'PAUSE','enterAt':moment()[_0x0358('0x2a')](_0x0358('0x2b')),'data1':_0xb108ce[_0x0358('0x31')][_0x0358('0x32')]||'DEFAULT\x20PAUSE','role':_0x45f1fb[_0x0358('0x22')],'internal':_0x45f1fb[_0x0358('0x23')],'uniqueid':_0xb108ce['body']['uniqueid']||null});});return db[_0x0358('0x33')][_0x0358('0x34')](_0x1ee1f9,{'individualHooks':!![]});})[_0x0358('0x16')](function(){return _0x45f1fb[_0x0358('0x26')]({'voicePause':!![],'mailPause':!![],'chatPause':!![],'faxPause':!![],'smsPause':!![],'openchannelPause':!![],'whatsappPause':!![],'pauseType':_0xb108ce['body']['type']||_0x0358('0x35'),'lastPauseAt':moment()[_0x0358('0x2a')](_0x0358('0x2b'))});})[_0x0358('0x19')](function(_0x230197){throw _0x230197;});};exports[_0x0358('0x36')]=function(_0x41419c){return Promise[_0x0358('0x37')]()['then'](function(){if(_0x41419c['body'][_0x0358('0x38')]&&!utils[_0x0358('0x39')](_0x41419c[_0x0358('0x31')]['channel'])){throw new Error(util['format'](_0x0358('0x3a'),_0x41419c[_0x0358('0x31')][_0x0358('0x38')]));}return db['User']['findOne']({'where':_0x41419c['options'][_0x0358('0x10')]||{},'attributes':['id','name',_0x0358('0x22'),_0x0358('0x23'),_0x0358('0x3b'),_0x0358('0x3c'),_0x0358('0x3d'),_0x0358('0x3e'),_0x0358('0x3f'),_0x0358('0x40'),_0x0358('0x41'),_0x0358('0x42'),_0x0358('0x43'),_0x0358('0x44'),'lastPauseAt']});})['then'](function(_0x1a6ccb){if(!_0x1a6ccb){throw new Error(util[_0x0358('0x2a')](_0x0358('0x24'),_0x41419c[_0x0358('0x25')]['id']));}return _0x1a6ccb[_0x0358('0x45')](_0x41419c[_0x0358('0x31')][_0x0358('0x38')],_0x0358('0x46'));})[_0x0358('0x19')](function(_0x5d1d4c){throw _0x5d1d4c;});};exports[_0x0358('0x47')]=function(_0x566c59){var _0xe6ab9c=this;return new Promise(function(_0x3eff3f,_0x3796d9){var _0x455b49;return db[_0x0358('0xd')][_0x0358('0x48')]({'where':_0x566c59[_0x0358('0xe')][_0x0358('0x10')]||{},'attributes':['id',_0x0358('0x21')]})['then'](function(_0x589007){if(_0x589007){_0x455b49=_0x589007;return db[_0x0358('0x49')][_0x0358('0x4a')]({'where':{'membername':_0x455b49[_0x0358('0x21')]},'individualHooks':!![]});}})['then'](function(){if(_0x455b49){return db['MemberReport'][_0x0358('0x27')]({'where':{'membername':_0x455b49[_0x0358('0x21')],'exitAt':null}});}})[_0x0358('0x16')](function(_0x14d56a){if(_0x455b49){if(_0x14d56a&&_0x14d56a[_0x0358('0x29')]){var _0x505efe=[];_0x14d56a['forEach'](function(_0x36b22c){_0x505efe[_0x0358('0x2f')](_0x36b22c['update']({'exitAt':moment()[_0x0358('0x2a')](_0x0358('0x2b'))}));});return BPromise[_0x0358('0x4b')](_0x505efe);}}})[_0x0358('0x16')](function(){if(_0x455b49){return _0x455b49[_0x0358('0x26')]({'online':![],'voicePause':![],'mailPause':![],'chatPause':![],'faxPause':![],'smsPause':![],'openchannelPause':![]});}})[_0x0358('0x16')](function(_0x4db26f){_0x3eff3f(_0x4db26f);})[_0x0358('0x19')](function(_0x371f11){_0x3796d9(_0xe6ab9c[_0x0358('0x1a')](0x1f4,_0x371f11[_0x0358('0x1b')]));});});};exports[_0x0358('0x4c')]=function(_0x39af38){var _0x1c148a=this;return new Promise(function(_0x32f5c4,_0x53f8c6){var _0xa80e2f;var _0x2754c8;var _0x4efb5c;var _0x15bbda;return db['User'][_0x0358('0x48')]({'where':_0x39af38[_0x0358('0xe')][_0x0358('0x10')]||{},'attributes':['id','name',_0x0358('0x22'),_0x0358('0x4d'),_0x0358('0x4e'),_0x0358('0x23'),_0x0358('0x4f'),'interface']})[_0x0358('0x16')](function(_0x1ce185){if(_0x1ce185){_0xa80e2f=_0x1ce185;_0x15bbda=_0x39af38[_0x0358('0x31')][_0x0358('0x3b')]?_0x39af38[_0x0358('0x31')]['interface']:util['format'](_0x0358('0x50'),_0xa80e2f[_0x0358('0x21')]);return db['User'][_0x0358('0x51')]({'where':{'role':_0x0358('0x52'),'online':!![],'id':{'$ne':_0xa80e2f['id']}}});}})[_0x0358('0x16')](function(_0x34a4a5){if(_0x34a4a5){_0x4efb5c=_0x34a4a5;return require(_0x0358('0x53'))[_0x0358('0x54')]();}})['then'](function(_0x596179){if(_0x596179&&_0x596179['agents']&&_0x4efb5c>=_0x596179['agents']){throw new Error(_0x0358('0x55'));}})['then'](function(){if(_0xa80e2f){return db[_0x0358('0x49')][_0x0358('0x4a')]({'where':{'membername':_0xa80e2f['name']},'individualHooks':!![]});}})[_0x0358('0x16')](function(){if(_0xa80e2f){return _0xa80e2f[_0x0358('0x56')]({'raw':!![]});}})[_0x0358('0x16')](function(_0x147585){if(_0xa80e2f){if(_0x147585){var _0x32b88d=[];_0x2754c8=_0x147585;if(_0x2754c8[_0x0358('0x29')]){for(var _0x5d2e7f=0x0;_0x5d2e7f<_0x2754c8[_0x0358('0x29')];_0x5d2e7f++){_0x32b88d[_0x0358('0x2f')](db[_0x0358('0x49')][_0x0358('0x57')]({'membername':_0xa80e2f[_0x0358('0x21')],'UserId':_0xa80e2f['id'],'queue_name':_0x2754c8[_0x5d2e7f]['name'],'VoiceQueueId':_0x2754c8[_0x5d2e7f]['id'],'interface':_0x15bbda,'paused':_0xa80e2f['loginInPause']||![],'penalty':_0x2754c8[_0x5d2e7f][_0x0358('0x58')]||0x0}));}return BPromise[_0x0358('0x4b')](_0x32b88d);}}}})['then'](function(){if(_0xa80e2f){return db[_0x0358('0x33')]['findAll']({'where':{'membername':_0xa80e2f[_0x0358('0x21')],'exitAt':null}});}})['then'](function(_0x5523a0){if(_0xa80e2f){if(_0x5523a0&&_0x5523a0[_0x0358('0x29')]){var _0x52997e=[];_0x5523a0[_0x0358('0x2e')](function(_0xe54784){_0x52997e[_0x0358('0x2f')](_0xe54784[_0x0358('0x26')]({'exitAt':moment()[_0x0358('0x2a')](_0x0358('0x2b'))}));});return BPromise['all'](_0x52997e);}}})['then'](function(){if(_0xa80e2f){var _0x4ead8c=[];var _0x387987=[];var _0x1f1a0a=utils[_0x0358('0x2d')]();var _0x3febdf={'membername':_0xa80e2f[_0x0358('0x21')],'interface':_0x15bbda,'enterAt':moment()[_0x0358('0x2a')](_0x0358('0x2b')),'role':_0xa80e2f[_0x0358('0x22')],'internal':_0xa80e2f[_0x0358('0x23')]};_0x1f1a0a[_0x0358('0x2e')](function(_0x41546e){_0x4ead8c[_0x0358('0x2f')](_[_0x0358('0x59')]({'channel':_0x41546e,'type':_0x0358('0x5a'),'data1':'callysquare','data2':_0x15bbda},_0x3febdf));if(_0xa80e2f[_0x0358('0x4f')]){_0x387987['push'](_[_0x0358('0x59')]({'channel':_0x41546e,'type':_0x0358('0x28'),'data1':_0x0358('0x5b')},_0x3febdf));}});return db['MemberReport'][_0x0358('0x34')](_0x4ead8c[_0x0358('0x5c')](_0x387987),{'individualHooks':!![]});}})['then'](function(){if(_0xa80e2f){return _0xa80e2f['update']({'online':!![],'lastLoginAt':moment()[_0x0358('0x2a')]('YYYY-MM-DD\x20HH:mm:ss'),'voicePause':_0xa80e2f[_0x0358('0x4f')]||![],'mailPause':_0xa80e2f[_0x0358('0x4f')]||![],'chatPause':_0xa80e2f[_0x0358('0x4f')]||![],'faxPause':_0xa80e2f['loginInPause']||![],'smsPause':_0xa80e2f[_0x0358('0x4f')]||![],'openchannelPause':_0xa80e2f[_0x0358('0x4f')]||![],'pauseType':_0xa80e2f[_0x0358('0x4f')]?'LOGININPAUSE':null,'lastPauseAt':moment()['format'](_0x0358('0x2b')),'interface':_0x15bbda});}})[_0x0358('0x16')](function(_0x3dbbb0){_0x32f5c4(_0x3dbbb0);})['catch'](function(_0x56818c){_0x53f8c6(_0x1c148a[_0x0358('0x1a')](0x1f4,_0x56818c['message']));});});};
\ No newline at end of file
index 913334c..614901e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4072=['update','removeListener','./user.events'];(function(_0x53758e,_0x26a255){var _0x38a698=function(_0x2a7f21){while(--_0x2a7f21){_0x53758e['push'](_0x53758e['shift']());}};_0x38a698(++_0x26a255);}(_0x4072,0x1af));var _0x2407=function(_0x540314,_0x30e8a5){_0x540314=_0x540314-0x0;var _0xff9b2a=_0x4072[_0x540314];return _0xff9b2a;};'use strict';var UserEvents=require(_0x2407('0x0'));var events=['save','remove',_0x2407('0x1')];function createListener(_0xdc66d0,_0x2ee864){return function(_0x5d0f0f){_0x2ee864['emit'](_0xdc66d0,_0x5d0f0f);};}function removeListener(_0x2d8cd4,_0x24bfc7){return function(){UserEvents[_0x2407('0x2')](_0x2d8cd4,_0x24bfc7);};}exports['register']=function(_0x5e2ffc){for(var _0x5ba948=0x0,_0x224cc8=events['length'];_0x5ba948<_0x224cc8;_0x5ba948++){var _0x50b9a9=events[_0x5ba948];var _0x108fa2=createListener('user:'+_0x50b9a9,_0x5e2ffc);UserEvents['on'](_0x50b9a9,_0x108fa2);}};
\ No newline at end of file
+var _0x23b1=['length','./user.events','save','remove','update','emit','removeListener','register'];(function(_0x2ed6a6,_0x47fcf4){var _0x12d470=function(_0x258d79){while(--_0x258d79){_0x2ed6a6['push'](_0x2ed6a6['shift']());}};_0x12d470(++_0x47fcf4);}(_0x23b1,0x161));var _0x123b=function(_0xb260b9,_0x1ccb5f){_0xb260b9=_0xb260b9-0x0;var _0x51bec8=_0x23b1[_0xb260b9];return _0x51bec8;};'use strict';var UserEvents=require(_0x123b('0x0'));var events=[_0x123b('0x1'),_0x123b('0x2'),_0x123b('0x3')];function createListener(_0x3742a2,_0x5e9393){return function(_0x5b30f3){_0x5e9393[_0x123b('0x4')](_0x3742a2,_0x5b30f3);};}function removeListener(_0x4de8bd,_0x1d15f6){return function(){UserEvents[_0x123b('0x5')](_0x4de8bd,_0x1d15f6);};}exports[_0x123b('0x6')]=function(_0x4caccd){for(var _0x4b5fc6=0x0,_0x2671e5=events[_0x123b('0x7')];_0x4b5fc6<_0x2671e5;_0x4b5fc6++){var _0x24341c=events[_0x4b5fc6];var _0x10e468=createListener('user:'+_0x24341c,_0x4caccd);UserEvents['on'](_0x24341c,_0x10e468);}};
\ No newline at end of file
index 34c4b56..f30e707 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0713=['../../config/environment','exports','path','connect-timeout','express','Router','fs-extra','../../components/interaction/service'];(function(_0x4d9b59,_0x4b102d){var _0x11a418=function(_0x164bb9){while(--_0x164bb9){_0x4d9b59['push'](_0x4d9b59['shift']());}};_0x11a418(++_0x4b102d);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x3071('0x0'));var timeout=require(_0x3071('0x1'));var express=require(_0x3071('0x2'));var router=express[_0x3071('0x3')]();var fs_extra=require(_0x3071('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x3071('0x5'));var config=require(_0x3071('0x6'));module[_0x3071('0x7')]=router;
\ No newline at end of file
+var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0x1e1c4e,_0x32fe91){var _0x560a02=function(_0x498413){while(--_0x498413){_0x1e1c4e['push'](_0x1e1c4e['shift']());}};_0x560a02(++_0x32fe91);}(_0x70e0,0x17b));var _0x070e=function(_0x2d63f5,_0x3dc038){_0x2d63f5=_0x2d63f5-0x0;var _0x45a78d=_0x70e0[_0x2d63f5];return _0x45a78d;};'use strict';var multer=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var path=require(_0x070e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x070e('0x3')]();var fs_extra=require(_0x070e('0x4'));var auth=require(_0x070e('0x5'));var interaction=require(_0x070e('0x6'));var config=require('../../config/environment');module[_0x070e('0x7')]=router;
\ No newline at end of file
index df140f1..4aeefeb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbbfa=['INTEGER','sequelize','exports'];(function(_0x484e3b,_0x5d34ac){var _0x5c017f=function(_0x565413){while(--_0x565413){_0x484e3b['push'](_0x484e3b['shift']());}};_0x5c017f(++_0x5d34ac);}(_0xbbfa,0x175));var _0xabbf=function(_0x4d82e1,_0x5ac72b){_0x4d82e1=_0x4d82e1-0x0;var _0x5f3bd9=_0xbbfa[_0x4d82e1];return _0x5f3bd9;};'use strict';var Sequelize=require(_0xabbf('0x0'));module[_0xabbf('0x1')]={'penalty':{'type':Sequelize[_0xabbf('0x2')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x903e=['INTEGER','exports'];(function(_0x42245d,_0x51758f){var _0x4b211a=function(_0x2634e){while(--_0x2634e){_0x42245d['push'](_0x42245d['shift']());}};_0x4b211a(++_0x51758f);}(_0x903e,0x195));var _0xe903=function(_0x421cf8,_0x23152c){_0x421cf8=_0x421cf8-0x0;var _0x145c48=_0x903e[_0x421cf8];return _0x145c48;};'use strict';var Sequelize=require('sequelize');module[_0xe903('0x0')]={'penalty':{'type':Sequelize[_0xe903('0x1')],'defaultValue':0x0}};
\ No newline at end of file
index d045368..7dde699 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x641c=['./userChatQueue.attributes','define','UserChatQueue','user_has_chat_queues','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0x641c,0x93));var _0xc641=function(_0x146f5a,_0xe26f2b){_0x146f5a=_0x146f5a-0x0;var _0x3b425b=_0x641c[_0x146f5a];return _0x3b425b;};'use strict';var _=require(_0xc641('0x0'));var util=require(_0xc641('0x1'));var logger=require(_0xc641('0x2'))(_0xc641('0x3'));var moment=require(_0xc641('0x4'));var BPromise=require(_0xc641('0x5'));var rp=require(_0xc641('0x6'));var fs=require('fs');var path=require(_0xc641('0x7'));var rimraf=require('rimraf');var config=require(_0xc641('0x8'));var attributes=require(_0xc641('0x9'));module['exports']=function(_0x154a1e,_0x5c32b4){return _0x154a1e[_0xc641('0xa')](_0xc641('0xb'),attributes,{'tableName':_0xc641('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x500d=['rimraf','../../config/environment','./userChatQueue.attributes','exports','UserChatQueue','user_has_chat_queues','lodash','util','../../config/logger','api','moment','request-promise','path'];(function(_0x25341e,_0x2584dc){var _0x4c12b4=function(_0x52f5d3){while(--_0x52f5d3){_0x25341e['push'](_0x25341e['shift']());}};_0x4c12b4(++_0x2584dc);}(_0x500d,0x13e));var _0xd500=function(_0x1b7171,_0x533d9a){_0x1b7171=_0x1b7171-0x0;var _0x3c3db2=_0x500d[_0x1b7171];return _0x3c3db2;};'use strict';var _=require(_0xd500('0x0'));var util=require(_0xd500('0x1'));var logger=require(_0xd500('0x2'))(_0xd500('0x3'));var moment=require(_0xd500('0x4'));var BPromise=require('bluebird');var rp=require(_0xd500('0x5'));var fs=require('fs');var path=require(_0xd500('0x6'));var rimraf=require(_0xd500('0x7'));var config=require(_0xd500('0x8'));var attributes=require(_0xd500('0x9'));module[_0xd500('0xa')]=function(_0x8a744d,_0x5f16e4){return _0x8a744d['define'](_0xd500('0xb'),attributes,{'tableName':_0xd500('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 17ab0d9..845fbde 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x41b8=['../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','then','UserChatQueue,\x20%s,\x20%s','request\x20sent','UserChatQueue,\x20%s,\x20%s,\x20%s','error','code','message','catch','lodash','util','bluebird','randomstring','ioredis'];(function(_0x444990,_0x44196a){var _0x4b99de=function(_0x93733b){while(--_0x93733b){_0x444990['push'](_0x444990['shift']());}};_0x4b99de(++_0x44196a);}(_0x41b8,0xd7));var _0x841b=function(_0x280d43,_0x2e7450){_0x280d43=_0x280d43-0x0;var _0x14446d=_0x41b8[_0x280d43];return _0x14446d;};'use strict';var _=require(_0x841b('0x0'));var util=require(_0x841b('0x1'));var moment=require('moment');var BPromise=require(_0x841b('0x2'));var rs=require(_0x841b('0x3'));var fs=require('fs');var Redis=require(_0x841b('0x4'));var db=require(_0x841b('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x841b('0x6'))(_0x841b('0x7'));var config=require(_0x841b('0x8'));var jayson=require(_0x841b('0x9'));var client=jayson[_0x841b('0xa')][_0x841b('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2ddda0,_0x4d5f6b,_0x5677a9){return new BPromise(function(_0x202ac0,_0x6454d6){return client['request'](_0x2ddda0,_0x5677a9)[_0x841b('0xc')](function(_0x2a854d){logger['info'](_0x841b('0xd'),_0x4d5f6b,_0x841b('0xe'));logger['debug'](_0x841b('0xf'),_0x4d5f6b,_0x841b('0xe'),JSON['stringify'](_0x2a854d));if(_0x2a854d[_0x841b('0x10')]){if(_0x2a854d['error'][_0x841b('0x11')]===0x1f4){logger[_0x841b('0x10')](_0x841b('0xd'),_0x4d5f6b,_0x2a854d[_0x841b('0x10')][_0x841b('0x12')]);return _0x6454d6(_0x2a854d[_0x841b('0x10')][_0x841b('0x12')]);}logger[_0x841b('0x10')](_0x841b('0xd'),_0x4d5f6b,_0x2a854d[_0x841b('0x10')]['message']);return _0x202ac0(_0x2a854d[_0x841b('0x10')]['message']);}else{logger['info'](_0x841b('0xd'),_0x4d5f6b,'request\x20sent');_0x202ac0(_0x2a854d['result'][_0x841b('0x12')]);}})[_0x841b('0x13')](function(_0x57755f){logger[_0x841b('0x10')](_0x841b('0xd'),_0x4d5f6b,_0x57755f);_0x6454d6(_0x57755f);});});}
\ No newline at end of file
+var _0xe4de=['catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','UserChatQueue,\x20%s,\x20%s','request\x20sent','UserChatQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result'];(function(_0x4f3a24,_0x12f8de){var _0x240187=function(_0x5ad39a){while(--_0x5ad39a){_0x4f3a24['push'](_0x4f3a24['shift']());}};_0x240187(++_0x12f8de);}(_0xe4de,0x171));var _0xee4d=function(_0xa42665,_0x528bb1){_0xa42665=_0xa42665-0x0;var _0x4ea856=_0xe4de[_0xa42665];return _0x4ea856;};'use strict';var _=require(_0xee4d('0x0'));var util=require('util');var moment=require(_0xee4d('0x1'));var BPromise=require(_0xee4d('0x2'));var rs=require(_0xee4d('0x3'));var fs=require('fs');var Redis=require(_0xee4d('0x4'));var db=require(_0xee4d('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xee4d('0x6'))(_0xee4d('0x7'));var config=require(_0xee4d('0x8'));var jayson=require(_0xee4d('0x9'));var client=jayson['client'][_0xee4d('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3cf65e,_0x490e87,_0x1178c9){return new BPromise(function(_0x47fd7f,_0x28159e){return client[_0xee4d('0xb')](_0x3cf65e,_0x1178c9)[_0xee4d('0xc')](function(_0x416c9f){logger[_0xee4d('0xd')](_0xee4d('0xe'),_0x490e87,_0xee4d('0xf'));logger['debug'](_0xee4d('0x10'),_0x490e87,_0xee4d('0xf'),JSON[_0xee4d('0x11')](_0x416c9f));if(_0x416c9f['error']){if(_0x416c9f[_0xee4d('0x12')][_0xee4d('0x13')]===0x1f4){logger[_0xee4d('0x12')](_0xee4d('0xe'),_0x490e87,_0x416c9f[_0xee4d('0x12')][_0xee4d('0x14')]);return _0x28159e(_0x416c9f[_0xee4d('0x12')][_0xee4d('0x14')]);}logger[_0xee4d('0x12')](_0xee4d('0xe'),_0x490e87,_0x416c9f['error']['message']);return _0x47fd7f(_0x416c9f[_0xee4d('0x12')][_0xee4d('0x14')]);}else{logger[_0xee4d('0xd')]('UserChatQueue,\x20%s,\x20%s',_0x490e87,_0xee4d('0xf'));_0x47fd7f(_0x416c9f[_0xee4d('0x15')][_0xee4d('0x14')]);}})[_0xee4d('0x16')](function(_0x53337e){logger[_0xee4d('0x12')]('UserChatQueue,\x20%s,\x20%s',_0x490e87,_0x53337e);_0x28159e(_0x53337e);});});}
\ No newline at end of file
index 32d6f06..997e503 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c44=['express','Router','fs-extra','../../components/auth/service','exports','path','connect-timeout'];(function(_0x1e33fd,_0x12d3a5){var _0x4f4ea7=function(_0x3118e0){while(--_0x3118e0){_0x1e33fd['push'](_0x1e33fd['shift']());}};_0x4f4ea7(++_0x12d3a5);}(_0x9c44,0x178));var _0x49c4=function(_0x5f1391,_0x19c132){_0x5f1391=_0x5f1391-0x0;var _0x50ebe3=_0x9c44[_0x5f1391];return _0x50ebe3;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x49c4('0x0'));var timeout=require(_0x49c4('0x1'));var express=require(_0x49c4('0x2'));var router=express[_0x49c4('0x3')]();var fs_extra=require(_0x49c4('0x4'));var auth=require(_0x49c4('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');module[_0x49c4('0x6')]=router;
\ No newline at end of file
+var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0xe34b68,_0x5c65e3){var _0x167dba=function(_0x1a1572){while(--_0x1a1572){_0xe34b68['push'](_0xe34b68['shift']());}};_0x167dba(++_0x5c65e3);}(_0x70e0,0x17b));var _0x070e=function(_0x31c772,_0x2adbc2){_0x31c772=_0x31c772-0x0;var _0x3c2c14=_0x70e0[_0x31c772];return _0x3c2c14;};'use strict';var multer=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var path=require(_0x070e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x070e('0x3')]();var fs_extra=require(_0x070e('0x4'));var auth=require(_0x070e('0x5'));var interaction=require(_0x070e('0x6'));var config=require('../../config/environment');module[_0x070e('0x7')]=router;
\ No newline at end of file
index 396e49f..fa9dcd2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeb7b=['sequelize','exports','STRING'];(function(_0x281e5e,_0xf320e2){var _0x5a22d2=function(_0x405ff9){while(--_0x405ff9){_0x281e5e['push'](_0x281e5e['shift']());}};_0x5a22d2(++_0xf320e2);}(_0xeb7b,0x1b0));var _0xbeb7=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xeb7b[_0xa464c9];return _0x3d73c4;};'use strict';var Sequelize=require(_0xbeb7('0x0'));module[_0xbeb7('0x1')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'assigned':{'type':Sequelize['INTEGER'],'defaultValue':0x0},'queue':{'type':Sequelize[_0xbeb7('0x2')]}};
\ No newline at end of file
+var _0x92d2=['INTEGER'];(function(_0x1cc8fe,_0x105328){var _0x230054=function(_0x1a1b56){while(--_0x1a1b56){_0x1cc8fe['push'](_0x1cc8fe['shift']());}};_0x230054(++_0x105328);}(_0x92d2,0x11d));var _0x292d=function(_0x219a86,_0x595831){_0x219a86=_0x219a86-0x0;var _0x2be5ad=_0x92d2[_0x219a86];return _0x2be5ad;};'use strict';var Sequelize=require('sequelize');module['exports']={'penalty':{'type':Sequelize[_0x292d('0x0')],'defaultValue':0x0},'assigned':{'type':Sequelize[_0x292d('0x0')],'defaultValue':0x0},'queue':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 153cec6..d68b36a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5df5=['util','../../config/logger','api','moment','request-promise','path','../../config/environment','./userFaxQueue.attributes','exports','define','UserFaxQueue','lodash'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0x5df5,0x15b));var _0x55df=function(_0x461dd6,_0x471091){_0x461dd6=_0x461dd6-0x0;var _0x484d5f=_0x5df5[_0x461dd6];return _0x484d5f;};'use strict';var _=require(_0x55df('0x0'));var util=require(_0x55df('0x1'));var logger=require(_0x55df('0x2'))(_0x55df('0x3'));var moment=require(_0x55df('0x4'));var BPromise=require('bluebird');var rp=require(_0x55df('0x5'));var fs=require('fs');var path=require(_0x55df('0x6'));var rimraf=require('rimraf');var config=require(_0x55df('0x7'));var attributes=require(_0x55df('0x8'));module[_0x55df('0x9')]=function(_0x1eae13,_0x480b1c){return _0x1eae13[_0x55df('0xa')](_0x55df('0xb'),attributes,{'tableName':'user_has_fax_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x57be=['../../config/environment','./userFaxQueue.attributes','exports','define','lodash','util','../../config/logger','api','moment','request-promise','rimraf'];(function(_0x58b0cd,_0x2573ec){var _0x2db2af=function(_0x468064){while(--_0x468064){_0x58b0cd['push'](_0x58b0cd['shift']());}};_0x2db2af(++_0x2573ec);}(_0x57be,0x16f));var _0xe57b=function(_0x4c0c15,_0xd0cb77){_0x4c0c15=_0x4c0c15-0x0;var _0x1492e0=_0x57be[_0x4c0c15];return _0x1492e0;};'use strict';var _=require(_0xe57b('0x0'));var util=require(_0xe57b('0x1'));var logger=require(_0xe57b('0x2'))(_0xe57b('0x3'));var moment=require(_0xe57b('0x4'));var BPromise=require('bluebird');var rp=require(_0xe57b('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xe57b('0x6'));var config=require(_0xe57b('0x7'));var attributes=require(_0xe57b('0x8'));module[_0xe57b('0x9')]=function(_0x28fb08,_0x5a86c9){return _0x28fb08[_0xe57b('0xa')]('UserFaxQueue',attributes,{'tableName':'user_has_fax_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 17727de..706e547 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf6af=['request','then','UserFaxQueue,\x20%s,\x20%s','request\x20sent','debug','UserFaxQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','bluebird','ioredis','../../config/utils','../../config/logger','../../config/environment','client','http'];(function(_0x3c4a7c,_0x2f4e3c){var _0xf13d1e=function(_0x24cb78){while(--_0x24cb78){_0x3c4a7c['push'](_0x3c4a7c['shift']());}};_0xf13d1e(++_0x2f4e3c);}(_0xf6af,0x1d3));var _0xff6a=function(_0x1cf37a,_0x57e70b){_0x1cf37a=_0x1cf37a-0x0;var _0x578eb8=_0xf6af[_0x1cf37a];return _0x578eb8;};'use strict';var _=require(_0xff6a('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xff6a('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xff6a('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0xff6a('0x3'));var logger=require(_0xff6a('0x4'))('rpc');var config=require(_0xff6a('0x5'));var jayson=require('jayson/promise');var client=jayson[_0xff6a('0x6')][_0xff6a('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x1c2d70,_0x1b7f98,_0x3a1375){return new BPromise(function(_0x508236,_0x896146){return client[_0xff6a('0x8')](_0x1c2d70,_0x3a1375)[_0xff6a('0x9')](function(_0x2677f9){logger['info'](_0xff6a('0xa'),_0x1b7f98,_0xff6a('0xb'));logger[_0xff6a('0xc')](_0xff6a('0xd'),_0x1b7f98,_0xff6a('0xb'),JSON[_0xff6a('0xe')](_0x2677f9));if(_0x2677f9[_0xff6a('0xf')]){if(_0x2677f9[_0xff6a('0xf')][_0xff6a('0x10')]===0x1f4){logger[_0xff6a('0xf')](_0xff6a('0xa'),_0x1b7f98,_0x2677f9['error'][_0xff6a('0x11')]);return _0x896146(_0x2677f9[_0xff6a('0xf')][_0xff6a('0x11')]);}logger[_0xff6a('0xf')]('UserFaxQueue,\x20%s,\x20%s',_0x1b7f98,_0x2677f9[_0xff6a('0xf')][_0xff6a('0x11')]);return _0x508236(_0x2677f9[_0xff6a('0xf')][_0xff6a('0x11')]);}else{logger['info'](_0xff6a('0xa'),_0x1b7f98,'request\x20sent');_0x508236(_0x2677f9[_0xff6a('0x12')]['message']);}})['catch'](function(_0x20dfc3){logger[_0xff6a('0xf')]('UserFaxQueue,\x20%s,\x20%s',_0x1b7f98,_0x20dfc3);_0x896146(_0x20dfc3);});});}
\ No newline at end of file
+var _0xad7a=['client','http','UserFaxQueue,\x20%s,\x20%s','request\x20sent','debug','UserFaxQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise'];(function(_0x2be8c2,_0x14a4b5){var _0x97f531=function(_0xcee58d){while(--_0xcee58d){_0x2be8c2['push'](_0x2be8c2['shift']());}};_0x97f531(++_0x14a4b5);}(_0xad7a,0x1d5));var _0xaad7=function(_0xc1db69,_0x2e5643){_0xc1db69=_0xc1db69-0x0;var _0x31a911=_0xad7a[_0xc1db69];return _0x31a911;};'use strict';var _=require(_0xaad7('0x0'));var util=require(_0xaad7('0x1'));var moment=require(_0xaad7('0x2'));var BPromise=require(_0xaad7('0x3'));var rs=require(_0xaad7('0x4'));var fs=require('fs');var Redis=require(_0xaad7('0x5'));var db=require(_0xaad7('0x6'))['db'];var utils=require(_0xaad7('0x7'));var logger=require(_0xaad7('0x8'))(_0xaad7('0x9'));var config=require('../../config/environment');var jayson=require(_0xaad7('0xa'));var client=jayson[_0xaad7('0xb')][_0xaad7('0xc')]({'port':0x232a});function respondWithRpcPromise(_0xe6c5ea,_0x27ef0a,_0x546ade){return new BPromise(function(_0xaa9986,_0x35542e){return client['request'](_0xe6c5ea,_0x546ade)['then'](function(_0x579c8d){logger['info'](_0xaad7('0xd'),_0x27ef0a,_0xaad7('0xe'));logger[_0xaad7('0xf')](_0xaad7('0x10'),_0x27ef0a,_0xaad7('0xe'),JSON[_0xaad7('0x11')](_0x579c8d));if(_0x579c8d[_0xaad7('0x12')]){if(_0x579c8d['error'][_0xaad7('0x13')]===0x1f4){logger[_0xaad7('0x12')]('UserFaxQueue,\x20%s,\x20%s',_0x27ef0a,_0x579c8d[_0xaad7('0x12')][_0xaad7('0x14')]);return _0x35542e(_0x579c8d[_0xaad7('0x12')][_0xaad7('0x14')]);}logger[_0xaad7('0x12')](_0xaad7('0xd'),_0x27ef0a,_0x579c8d['error']['message']);return _0xaa9986(_0x579c8d['error'][_0xaad7('0x14')]);}else{logger[_0xaad7('0x15')](_0xaad7('0xd'),_0x27ef0a,_0xaad7('0xe'));_0xaa9986(_0x579c8d[_0xaad7('0x16')][_0xaad7('0x14')]);}})[_0xaad7('0x17')](function(_0xe227be){logger['error'](_0xaad7('0xd'),_0x27ef0a,_0xe227be);_0x35542e(_0xe227be);});});}
\ No newline at end of file
index 2c22330..25bb36c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd8b0=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','multer','util'];(function(_0x1d9934,_0x15c292){var _0x3f8856=function(_0x2db3ea){while(--_0x2db3ea){_0x1d9934['push'](_0x1d9934['shift']());}};_0x3f8856(++_0x15c292);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var multer=require(_0x0d8b('0x0'));var util=require(_0x0d8b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require('express');var router=express[_0x0d8b('0x2')]();var fs_extra=require(_0x0d8b('0x3'));var auth=require(_0x0d8b('0x4'));var interaction=require(_0x0d8b('0x5'));var config=require(_0x0d8b('0x6'));module['exports']=router;
\ No newline at end of file
+var _0xa9e0=['../../components/interaction/service','../../config/environment','exports','multer','util','path','Router','../../components/auth/service'];(function(_0x10f6e8,_0x351db6){var _0x35bb3c=function(_0x30a39b){while(--_0x30a39b){_0x10f6e8['push'](_0x10f6e8['shift']());}};_0x35bb3c(++_0x351db6);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2160a9,_0x3cbd9e){_0x2160a9=_0x2160a9-0x0;var _0xa88cf7=_0xa9e0[_0x2160a9];return _0xa88cf7;};'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'));module[_0x0a9e('0x7')]=router;
\ No newline at end of file
index 9006424..ed6de0b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-'use strict';var Sequelize=require('sequelize');module['exports']={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}};
\ No newline at end of file
+var _0x1e6a=['exports','INTEGER','sequelize'];(function(_0x3ddb9d,_0x198e83){var _0x910650=function(_0x1e6ed9){while(--_0x1e6ed9){_0x3ddb9d['push'](_0x3ddb9d['shift']());}};_0x910650(++_0x198e83);}(_0x1e6a,0xe9));var _0xa1e6=function(_0x15f71a,_0x4a4d5f){_0x15f71a=_0x15f71a-0x0;var _0x16f0b5=_0x1e6a[_0x15f71a];return _0x16f0b5;};'use strict';var Sequelize=require(_0xa1e6('0x0'));module[_0xa1e6('0x1')]={'penalty':{'type':Sequelize[_0xa1e6('0x2')],'defaultValue':0x0}};
\ No newline at end of file
index ee353b1..d3805eb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3f3d=['lodash','../../config/logger','moment','path','rimraf','exports','define','UserMailQueue','user_has_mail_queues'];(function(_0x2c191f,_0x5b7a66){var _0x129027=function(_0x1e2043){while(--_0x1e2043){_0x2c191f['push'](_0x2c191f['shift']());}};_0x129027(++_0x5b7a66);}(_0x3f3d,0x13b));var _0xd3f3=function(_0x397ddb,_0x574faf){_0x397ddb=_0x397ddb-0x0;var _0x4af353=_0x3f3d[_0x397ddb];return _0x4af353;};'use strict';var _=require(_0xd3f3('0x0'));var util=require('util');var logger=require(_0xd3f3('0x1'))('api');var moment=require(_0xd3f3('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xd3f3('0x3'));var rimraf=require(_0xd3f3('0x4'));var config=require('../../config/environment');var attributes=require('./userMailQueue.attributes');module[_0xd3f3('0x5')]=function(_0x41babe,_0x24f70c){return _0x41babe[_0xd3f3('0x6')](_0xd3f3('0x7'),attributes,{'tableName':_0xd3f3('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x90b8=['user_has_mail_queues','lodash','util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./userMailQueue.attributes','exports','define','UserMailQueue'];(function(_0x372a6c,_0x4df0ee){var _0x51128f=function(_0x5f2a3f){while(--_0x5f2a3f){_0x372a6c['push'](_0x372a6c['shift']());}};_0x51128f(++_0x4df0ee);}(_0x90b8,0x16d));var _0x890b=function(_0x211632,_0x378e2e){_0x211632=_0x211632-0x0;var _0x5a1da1=_0x90b8[_0x211632];return _0x5a1da1;};'use strict';var _=require(_0x890b('0x0'));var util=require(_0x890b('0x1'));var logger=require(_0x890b('0x2'))(_0x890b('0x3'));var moment=require(_0x890b('0x4'));var BPromise=require('bluebird');var rp=require(_0x890b('0x5'));var fs=require('fs');var path=require(_0x890b('0x6'));var rimraf=require(_0x890b('0x7'));var config=require(_0x890b('0x8'));var attributes=require(_0x890b('0x9'));module[_0x890b('0xa')]=function(_0x1512ff,_0x243fd1){return _0x1512ff[_0x890b('0xb')](_0x890b('0xc'),attributes,{'tableName':_0x890b('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 8c1dba4..8f47911 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x55ca=['rpc','../../config/environment','jayson/promise','client','http','request','then','UserMailQueue,\x20%s,\x20%s','request\x20sent','debug','UserMailQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','ioredis','../../mysqldb','../../config/logger'];(function(_0x183cc5,_0x2bddb1){var _0x62bfd4=function(_0x25d6b3){while(--_0x25d6b3){_0x183cc5['push'](_0x183cc5['shift']());}};_0x62bfd4(++_0x2bddb1);}(_0x55ca,0x126));var _0xa55c=function(_0x4ed9ef,_0x381176){_0x4ed9ef=_0x4ed9ef-0x0;var _0x2bb85b=_0x55ca[_0x4ed9ef];return _0x2bb85b;};'use strict';var _=require(_0xa55c('0x0'));var util=require(_0xa55c('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa55c('0x2'));var db=require(_0xa55c('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xa55c('0x4'))(_0xa55c('0x5'));var config=require(_0xa55c('0x6'));var jayson=require(_0xa55c('0x7'));var client=jayson[_0xa55c('0x8')][_0xa55c('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x36b623,_0x4d0624,_0x2121fd){return new BPromise(function(_0x2537f0,_0x57e069){return client[_0xa55c('0xa')](_0x36b623,_0x2121fd)[_0xa55c('0xb')](function(_0x52a3bc){logger['info'](_0xa55c('0xc'),_0x4d0624,_0xa55c('0xd'));logger[_0xa55c('0xe')](_0xa55c('0xf'),_0x4d0624,_0xa55c('0xd'),JSON[_0xa55c('0x10')](_0x52a3bc));if(_0x52a3bc[_0xa55c('0x11')]){if(_0x52a3bc[_0xa55c('0x11')][_0xa55c('0x12')]===0x1f4){logger[_0xa55c('0x11')]('UserMailQueue,\x20%s,\x20%s',_0x4d0624,_0x52a3bc['error'][_0xa55c('0x13')]);return _0x57e069(_0x52a3bc['error']['message']);}logger['error'](_0xa55c('0xc'),_0x4d0624,_0x52a3bc[_0xa55c('0x11')][_0xa55c('0x13')]);return _0x2537f0(_0x52a3bc[_0xa55c('0x11')][_0xa55c('0x13')]);}else{logger[_0xa55c('0x14')]('UserMailQueue,\x20%s,\x20%s',_0x4d0624,_0xa55c('0xd'));_0x2537f0(_0x52a3bc[_0xa55c('0x15')][_0xa55c('0x13')]);}})[_0xa55c('0x16')](function(_0x1c4cfd){logger[_0xa55c('0x11')](_0xa55c('0xc'),_0x4d0624,_0x1c4cfd);_0x57e069(_0x1c4cfd);});});}
\ No newline at end of file
+var _0x9957=['message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','then','info','UserMailQueue,\x20%s,\x20%s','request\x20sent','debug','UserMailQueue,\x20%s,\x20%s,\x20%s','stringify','error','code'];(function(_0x5dac9a,_0x152d56){var _0x3d4eab=function(_0x5bae8f){while(--_0x5bae8f){_0x5dac9a['push'](_0x5dac9a['shift']());}};_0x3d4eab(++_0x152d56);}(_0x9957,0x93));var _0x7995=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x9957[_0x501510];return _0x1e6ee5;};'use strict';var _=require(_0x7995('0x0'));var util=require(_0x7995('0x1'));var moment=require(_0x7995('0x2'));var BPromise=require(_0x7995('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7995('0x4'));var db=require(_0x7995('0x5'))['db'];var utils=require(_0x7995('0x6'));var logger=require(_0x7995('0x7'))('rpc');var config=require(_0x7995('0x8'));var jayson=require(_0x7995('0x9'));var client=jayson[_0x7995('0xa')][_0x7995('0xb')]({'port':0x232a});function respondWithRpcPromise(_0xbda126,_0x326741,_0x4996ca){return new BPromise(function(_0x465276,_0x1cad37){return client['request'](_0xbda126,_0x4996ca)[_0x7995('0xc')](function(_0x3116fb){logger[_0x7995('0xd')](_0x7995('0xe'),_0x326741,_0x7995('0xf'));logger[_0x7995('0x10')](_0x7995('0x11'),_0x326741,'request\x20sent',JSON[_0x7995('0x12')](_0x3116fb));if(_0x3116fb[_0x7995('0x13')]){if(_0x3116fb['error'][_0x7995('0x14')]===0x1f4){logger[_0x7995('0x13')](_0x7995('0xe'),_0x326741,_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);return _0x1cad37(_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);}logger['error']('UserMailQueue,\x20%s,\x20%s',_0x326741,_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);return _0x465276(_0x3116fb[_0x7995('0x13')][_0x7995('0x15')]);}else{logger[_0x7995('0xd')](_0x7995('0xe'),_0x326741,_0x7995('0xf'));_0x465276(_0x3116fb[_0x7995('0x16')]['message']);}})[_0x7995('0x17')](function(_0x565d97){logger[_0x7995('0x13')](_0x7995('0xe'),_0x326741,_0x565d97);_0x1cad37(_0x565d97);});});}
\ No newline at end of file
index 9dd78c5..2980543 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x752f=['express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./userNotification.controller','post','isAuthenticated','sendUserNotification','path','connect-timeout'];(function(_0x325e1c,_0x52fb08){var _0x149f3f=function(_0x47bf0f){while(--_0x47bf0f){_0x325e1c['push'](_0x325e1c['shift']());}};_0x149f3f(++_0x52fb08);}(_0x752f,0x169));var _0xf752=function(_0x2c3ad5,_0x1336bf){_0x2c3ad5=_0x2c3ad5-0x0;var _0x4c08fd=_0x752f[_0x2c3ad5];return _0x4c08fd;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xf752('0x0'));var timeout=require(_0xf752('0x1'));var express=require(_0xf752('0x2'));var router=express[_0xf752('0x3')]();var fs_extra=require(_0xf752('0x4'));var auth=require(_0xf752('0x5'));var interaction=require(_0xf752('0x6'));var config=require('../../config/environment');var controller=require(_0xf752('0x7'));router[_0xf752('0x8')]('/',auth[_0xf752('0x9')](),controller[_0xf752('0xa')]);module['exports']=router;
\ No newline at end of file
+var _0x00b0=['../../components/interaction/service','../../config/environment','./userNotification.controller','isAuthenticated','exports','path','express','Router','../../components/auth/service'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0x00b0,0x1d0));var _0x000b=function(_0x35b502,_0x4b7e8a){_0x35b502=_0x35b502-0x0;var _0x36debf=_0x00b0[_0x35b502];return _0x36debf;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x000b('0x0'));var timeout=require('connect-timeout');var express=require(_0x000b('0x1'));var router=express[_0x000b('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0x000b('0x3'));var interaction=require(_0x000b('0x4'));var config=require(_0x000b('0x5'));var controller=require(_0x000b('0x6'));router['post']('/',auth[_0x000b('0x7')](),controller['sendUserNotification']);module[_0x000b('0x8')]=router;
\ No newline at end of file
index bdc2efa..36c64e1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe2de=['BOOLEAN','sequelize','exports','TEXT','STRING'];(function(_0x508891,_0x219223){var _0x2725ab=function(_0x1f2822){while(--_0x1f2822){_0x508891['push'](_0x508891['shift']());}};_0x2725ab(++_0x219223);}(_0xe2de,0x1f0));var _0xee2d=function(_0x22f945,_0x403922){_0x22f945=_0x22f945-0x0;var _0x43e7d4=_0xe2de[_0x22f945];return _0x43e7d4;};'use strict';var Sequelize=require(_0xee2d('0x0'));module[_0xee2d('0x1')]={'body':{'type':Sequelize[_0xee2d('0x2')]},'senderName':{'type':Sequelize[_0xee2d('0x3')]},'recipientsId':{'type':Sequelize[_0xee2d('0x2')]},'recipientsDescription':{'type':Sequelize[_0xee2d('0x3')]},'beep':{'type':Sequelize[_0xee2d('0x4')]}};
\ No newline at end of file
+var _0xfc6b=['BOOLEAN','sequelize','TEXT','STRING'];(function(_0x156102,_0x43debe){var _0x12fc76=function(_0x4d49ee){while(--_0x4d49ee){_0x156102['push'](_0x156102['shift']());}};_0x12fc76(++_0x43debe);}(_0xfc6b,0x105));var _0xbfc6=function(_0x17863d,_0x29ac6a){_0x17863d=_0x17863d-0x0;var _0x269c7d=_0xfc6b[_0x17863d];return _0x269c7d;};'use strict';var Sequelize=require(_0xbfc6('0x0'));module['exports']={'body':{'type':Sequelize[_0xbfc6('0x1')]},'senderName':{'type':Sequelize[_0xbfc6('0x2')]},'recipientsId':{'type':Sequelize[_0xbfc6('0x1')]},'recipientsDescription':{'type':Sequelize[_0xbfc6('0x2')]},'beep':{'type':Sequelize[_0xbfc6('0x3')]}};
\ No newline at end of file
index 9dbe091..f8422b9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x35fe=['mustache','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','api','../../config/utils','../../config/license/util','../../mysqldb','redis','socket.io-emitter','./userNotification.socket','register','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','sendUserNotification','hasOwnProperty','body','TemplateId','ValidationError','Must\x20specify\x20at\x20least\x20one\x20argument\x20for\x20\x27text\x27\x20or\x20\x27TemplateId\x27','Missing\x20\x27view\x27\x20parameter','recipients','Sequelize','Missing\x20\x27recipients\x27\x20parameter','Invalid\x20\x27recipients\x27\x20object','chatqueue','faxqueue','voicequeue','some','includes','model','toLowerCase','Invalid\x20model\x20in\x20\x27recipients\x27\x20object','senderName','user','isEmpty','recipientsDescription','beep','SenderId','recipientsId','join','sequelize','transaction','UserNotification','create','recipient','text','Template','findOne','Invalid\x20\x27TemplateId\x27\x20parameter','render','html','view','catch','forEach','startCase','User','union','ids','queue','replace','Queue','all','flatten','getAgents','map','rimraf','zip-dir','request-promise','moment'];(function(_0x282a0d,_0x268c5e){var _0xdda2fa=function(_0x40ce13){while(--_0x40ce13){_0x282a0d['push'](_0x282a0d['shift']());}};_0xdda2fa(++_0x268c5e);}(_0x35fe,0x188));var _0xe35f=function(_0xc4001c,_0x1bf8f0){_0xc4001c=_0xc4001c-0x0;var _0x49f7bc=_0x35fe[_0xc4001c];return _0x49f7bc;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xe35f('0x0'));var zipdir=require(_0xe35f('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe35f('0x2'));var moment=require(_0xe35f('0x3'));var BPromise=require('bluebird');var Mustache=require(_0xe35f('0x4'));var util=require('util');var path=require('path');var sox=require('sox');var csv=require(_0xe35f('0x5'));var ejs=require(_0xe35f('0x6'));var fs=require('fs');var fs_extra=require(_0xe35f('0x7'));var _=require(_0xe35f('0x8'));var squel=require(_0xe35f('0x9'));var crypto=require(_0xe35f('0xa'));var jsforce=require(_0xe35f('0xb'));var deskjs=require(_0xe35f('0xc'));var toCsv=require('to-csv');var querystring=require(_0xe35f('0xd'));var Papa=require(_0xe35f('0xe'));var Redis=require(_0xe35f('0xf'));var authService=require('../../components/auth/service');var qs=require(_0xe35f('0x10'));var as=require(_0xe35f('0x11'));var hardwareService=require(_0xe35f('0x12'));var logger=require(_0xe35f('0x13'))(_0xe35f('0x14'));var utils=require(_0xe35f('0x15'));var config=require('../../config/environment');var licenseUtil=require(_0xe35f('0x16'));var db=require(_0xe35f('0x17'))['db'];config[_0xe35f('0x18')]=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xe35f('0x19'))(new Redis(config['redis']));require(_0xe35f('0x1a'))[_0xe35f('0x1b')](socket);function respondWithStatusCode(_0x781e39,_0x46c017){_0x46c017=_0x46c017||0xcc;return function(_0x224ab3){if(_0x224ab3){return _0x781e39[_0xe35f('0x1c')](_0x46c017);}return _0x781e39[_0xe35f('0x1d')](_0x46c017)['end']();};}function respondWithResult(_0x5f0e5f,_0x2cb8d5){_0x2cb8d5=_0x2cb8d5||0xc8;return function(_0x3e609c){if(_0x3e609c){return _0x5f0e5f[_0xe35f('0x1d')](_0x2cb8d5)[_0xe35f('0x1e')](_0x3e609c);}};}function respondWithFilteredResult(_0x320bc9,_0x79dae1){return function(_0x5c138d){if(_0x5c138d){var _0xd1f1f5=typeof _0x79dae1[_0xe35f('0x1f')]===_0xe35f('0x20')&&typeof _0x79dae1[_0xe35f('0x21')]===_0xe35f('0x20');var _0xac606c=_0x5c138d[_0xe35f('0x22')];var _0x2c8b73=_0xd1f1f5?0x0:_0x79dae1[_0xe35f('0x1f')];var _0x2600f1=_0xd1f1f5?_0x5c138d['count']:_0x79dae1[_0xe35f('0x1f')]+_0x79dae1[_0xe35f('0x21')];var _0x469d20;if(_0x2600f1>=_0xac606c){_0x2600f1=_0xac606c;_0x469d20=0xc8;}else{_0x469d20=0xce;}_0x320bc9[_0xe35f('0x1d')](_0x469d20);return _0x320bc9[_0xe35f('0x23')](_0xe35f('0x24'),_0x2c8b73+'-'+_0x2600f1+'/'+_0xac606c)[_0xe35f('0x1e')](_0x5c138d);}return null;};}function patchUpdates(_0x3e57d4){return function(_0x3a1c5a){try{jsonpatch[_0xe35f('0x25')](_0x3a1c5a,_0x3e57d4,!![]);}catch(_0x558c50){return BPromise[_0xe35f('0x26')](_0x558c50);}return _0x3a1c5a[_0xe35f('0x27')]();};}function saveUpdates(_0x10de4e,_0x32a558){return function(_0x31f499){if(_0x31f499){return _0x31f499[_0xe35f('0x28')](_0x10de4e)[_0xe35f('0x29')](function(_0x422691){return _0x422691;});}return null;};}function removeEntity(_0x2a39af,_0x18540a){return function(_0x575a91){if(_0x575a91){return _0x575a91[_0xe35f('0x2a')]()[_0xe35f('0x29')](function(){_0x2a39af[_0xe35f('0x1d')](0xcc)['end']();});}};}function handleEntityNotFound(_0x15f7ee,_0x55cf97){return function(_0x15a9d1){if(!_0x15a9d1){_0x15f7ee['sendStatus'](0x194);}return _0x15a9d1;};}function handleError(_0x361031,_0x3e47ce){_0x3e47ce=_0x3e47ce||0x1f4;return function(_0x4e1b1d){logger[_0xe35f('0x2b')](_0x4e1b1d[_0xe35f('0x2c')]);if(_0x4e1b1d[_0xe35f('0x2d')]){delete _0x4e1b1d[_0xe35f('0x2d')];}_0x361031[_0xe35f('0x1d')](_0x3e47ce)[_0xe35f('0x2e')](_0x4e1b1d);};}exports[_0xe35f('0x2f')]=function(_0x4a3dc5,_0x115326,_0x59eda2){if(!_0x4a3dc5['body'][_0xe35f('0x30')]('text')&&!_0x4a3dc5[_0xe35f('0x31')][_0xe35f('0x30')](_0xe35f('0x32'))){throw new db['Sequelize'][(_0xe35f('0x33'))](_0xe35f('0x34'));}else{if(_0x4a3dc5[_0xe35f('0x31')]['hasOwnProperty'](_0xe35f('0x32'))&&!_0x4a3dc5[_0xe35f('0x31')]['hasOwnProperty']('view')){throw new db['Sequelize']['ValidationError'](_0xe35f('0x35'));}if(!_0x4a3dc5['body'][_0xe35f('0x30')](_0xe35f('0x36'))){throw new db[(_0xe35f('0x37'))][(_0xe35f('0x33'))](_0xe35f('0x38'));}else{try{var _0x3ddbea=JSON['parse'](_0x4a3dc5[_0xe35f('0x31')]['recipients']);}catch(_0x15adbf){logger['error'](_0x15adbf);throw new db[(_0xe35f('0x37'))][(_0xe35f('0x33'))](_0xe35f('0x39'));}var _0x1dcdcb=[_0xe35f('0x3a'),_0xe35f('0x3b'),'mailqueue','openchannelqueue','smsqueue',_0xe35f('0x3c'),'whatsappqueue','team','user'];if(_[_0xe35f('0x3d')](_0x3ddbea,function(_0x61a408){return!_[_0xe35f('0x3e')](_0x1dcdcb,_0x61a408[_0xe35f('0x3f')][_0xe35f('0x40')]());})){throw new db[(_0xe35f('0x37'))][(_0xe35f('0x33'))](_0xe35f('0x41'));}}}var _0x5d2b9b={};_0x5d2b9b[_0xe35f('0x42')]=_0x4a3dc5[_0xe35f('0x31')][_0xe35f('0x30')](_0xe35f('0x42'))?_0x4a3dc5[_0xe35f('0x31')][_0xe35f('0x42')]:_0x4a3dc5[_0xe35f('0x43')]['fullname'];_0x5d2b9b['recipientsDescription']=_[_0xe35f('0x44')](_0x4a3dc5[_0xe35f('0x31')][_0xe35f('0x45')])?null:_0x4a3dc5[_0xe35f('0x31')][_0xe35f('0x45')];_0x5d2b9b[_0xe35f('0x46')]=_0x4a3dc5[_0xe35f('0x31')][_0xe35f('0x46')]||![];_0x5d2b9b[_0xe35f('0x47')]=_0x4a3dc5[_0xe35f('0x43')]['id'];return getContent(_0x4a3dc5[_0xe35f('0x31')])['then'](function(_0x4150f6){_0x5d2b9b[_0xe35f('0x31')]=_0x4150f6;return getRecipients(_0x3ddbea);})[_0xe35f('0x29')](function(_0x2b5e8c){_0x5d2b9b[_0xe35f('0x48')]=_['sortBy'](_0x2b5e8c)[_0xe35f('0x49')](',');return db[_0xe35f('0x4a')][_0xe35f('0x4b')](function(_0x336771){return db[_0xe35f('0x4c')][_0xe35f('0x4d')](_0x5d2b9b,{'raw':!![],'transaction':_0x336771})[_0xe35f('0x29')](function(_0x20f5d2){var _0x174832={'sender':_0x5d2b9b['senderName'],'description':_0x5d2b9b[_0xe35f('0x45')],'content':_0x5d2b9b[_0xe35f('0x31')],'beep':_0x5d2b9b[_0xe35f('0x46')]};_0x2b5e8c['forEach'](function(_0x3d000c){_0x174832[_0xe35f('0x4e')]=_0x3d000c;socket['emit']('userNotification:send',_0x174832);});return _0x20f5d2;});});})[_0xe35f('0x29')](respondWithResult(_0x115326,0xc9))['catch'](handleError(_0x115326,null));};function getContent(_0x56bce0){return new BPromise(function(_0x16285d,_0x3f6248){if(_0x56bce0[_0xe35f('0x4f')]){_0x16285d(_0x56bce0[_0xe35f('0x4f')]);return;}return db[_0xe35f('0x50')][_0xe35f('0x51')]({'attributes':['html'],'where':{'id':_0x56bce0['TemplateId']},'raw':!![]})[_0xe35f('0x29')](function(_0x1c6b95){if(!_0x1c6b95)throw new db['Sequelize'][(_0xe35f('0x33'))](_0xe35f('0x52'));var _0x278754=Mustache[_0xe35f('0x53')](_0x1c6b95[_0xe35f('0x54')],_0x56bce0[_0xe35f('0x55')]);_0x16285d(_0x278754);})[_0xe35f('0x56')](function(_0x20597d){_0x3f6248(_0x20597d);});});}function getRecipients(_0x282261){return new BPromise(function(_0x1e20f7,_0x40f3d3){var _0x3171a8=[];var _0x5ead2b=[];_0x282261[_0xe35f('0x57')](function(_0x2cb78a){var _0x1923f8=_[_0xe35f('0x58')](_0x2cb78a['model'][_0xe35f('0x40')]());if(_0x1923f8===_0xe35f('0x59')){_0x3171a8=_[_0xe35f('0x5a')](_0x3171a8,_0x2cb78a[_0xe35f('0x5b')]);}else{if(_['includes'](_0x1923f8,_0xe35f('0x5c')))_0x1923f8=_0x1923f8[_0xe35f('0x5d')](_0xe35f('0x5c'),_0xe35f('0x5e'));_0x2cb78a[_0xe35f('0x5b')][_0xe35f('0x57')](function(_0x129c44){_0x5ead2b['push'](getAgents(_0x1923f8,_0x129c44));});}});return BPromise[_0xe35f('0x5f')](_0x5ead2b)[_0xe35f('0x29')](function(_0x126f8e){_0x3171a8=_[_0xe35f('0x5a')](_0x3171a8,_[_0xe35f('0x60')](_0x126f8e));_0x1e20f7(_0x3171a8);})[_0xe35f('0x56')](function(_0x5293b0){_0x40f3d3(_0x5293b0);});});}function getAgents(_0x9d285c,_0x5c3aa4){return new BPromise(function(_0x317350,_0x345d3a){return db[_0x9d285c][_0xe35f('0x51')]({'where':{'id':_0x5c3aa4}})[_0xe35f('0x29')](function(_0x2be4ec){return _0x2be4ec[_0xe35f('0x61')]({'attributes':['id'],'raw':!![]})[_0xe35f('0x29')](function(_0xd21eaa){var _0x34572a=_[_0xe35f('0x62')](_0xd21eaa,'id');_0x317350(_0x34572a);});})[_0xe35f('0x56')](function(_0x521f2f){_0x345d3a(_0x521f2f);});});}
\ No newline at end of file
+var _0x22b5=['reject','save','then','destroy','stack','name','send','sendUserNotification','body','hasOwnProperty','TemplateId','Sequelize','ValidationError','Must\x20specify\x20at\x20least\x20one\x20argument\x20for\x20\x27text\x27\x20or\x20\x27TemplateId\x27','view','Missing\x20\x27view\x27\x20parameter','recipients','Missing\x20\x27recipients\x27\x20parameter','parse','chatqueue','openchannelqueue','whatsappqueue','team','some','toLowerCase','Invalid\x20model\x20in\x20\x27recipients\x27\x20object','senderName','user','recipientsDescription','isEmpty','beep','SenderId','recipientsId','sortBy','join','sequelize','create','forEach','userNotification:send','text','findOne','html','Invalid\x20\x27TemplateId\x27\x20parameter','catch','startCase','model','union','ids','includes','queue','all','getAgents','map','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','path','sox','to-csv','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','json','offset','limit','count','Content-Range','apply'];(function(_0x476bf4,_0x5e8a43){var _0x2f170b=function(_0x2f0c5e){while(--_0x2f0c5e){_0x476bf4['push'](_0x476bf4['shift']());}};_0x2f170b(++_0x5e8a43);}(_0x22b5,0x1a5));var _0x522b=function(_0x23d160,_0x15e4dc){_0x23d160=_0x23d160-0x0;var _0x5df430=_0x22b5[_0x23d160];return _0x5df430;};'use strict';var emlformat=require(_0x522b('0x0'));var rimraf=require(_0x522b('0x1'));var zipdir=require(_0x522b('0x2'));var jsonpatch=require(_0x522b('0x3'));var rp=require(_0x522b('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x522b('0x5'));var util=require('util');var path=require(_0x522b('0x6'));var sox=require(_0x522b('0x7'));var csv=require(_0x522b('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x522b('0x9'));var squel=require(_0x522b('0xa'));var crypto=require(_0x522b('0xb'));var jsforce=require(_0x522b('0xc'));var deskjs=require(_0x522b('0xd'));var toCsv=require(_0x522b('0x8'));var querystring=require(_0x522b('0xe'));var Papa=require(_0x522b('0xf'));var Redis=require(_0x522b('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x522b('0x11'));var as=require(_0x522b('0x12'));var hardwareService=require(_0x522b('0x13'));var logger=require(_0x522b('0x14'))('api');var utils=require(_0x522b('0x15'));var config=require(_0x522b('0x16'));var licenseUtil=require(_0x522b('0x17'));var db=require(_0x522b('0x18'))['db'];config[_0x522b('0x19')]=_[_0x522b('0x1a')](config[_0x522b('0x19')],{'host':_0x522b('0x1b'),'port':0x18eb});var socket=require(_0x522b('0x1c'))(new Redis(config[_0x522b('0x19')]));require('./userNotification.socket')[_0x522b('0x1d')](socket);function respondWithStatusCode(_0x2fc3cf,_0x3fe8f3){_0x3fe8f3=_0x3fe8f3||0xcc;return function(_0x5ecccb){if(_0x5ecccb){return _0x2fc3cf[_0x522b('0x1e')](_0x3fe8f3);}return _0x2fc3cf[_0x522b('0x1f')](_0x3fe8f3)[_0x522b('0x20')]();};}function respondWithResult(_0x218d23,_0x172503){_0x172503=_0x172503||0xc8;return function(_0x30adc5){if(_0x30adc5){return _0x218d23[_0x522b('0x1f')](_0x172503)[_0x522b('0x21')](_0x30adc5);}};}function respondWithFilteredResult(_0x2ca801,_0x1766a9){return function(_0x573eed){if(_0x573eed){var _0x1230cb=typeof _0x1766a9[_0x522b('0x22')]==='undefined'&&typeof _0x1766a9[_0x522b('0x23')]==='undefined';var _0x396d47=_0x573eed['count'];var _0x21c53b=_0x1230cb?0x0:_0x1766a9['offset'];var _0x5225bc=_0x1230cb?_0x573eed[_0x522b('0x24')]:_0x1766a9[_0x522b('0x22')]+_0x1766a9[_0x522b('0x23')];var _0x71ec3e;if(_0x5225bc>=_0x396d47){_0x5225bc=_0x396d47;_0x71ec3e=0xc8;}else{_0x71ec3e=0xce;}_0x2ca801['status'](_0x71ec3e);return _0x2ca801['set'](_0x522b('0x25'),_0x21c53b+'-'+_0x5225bc+'/'+_0x396d47)[_0x522b('0x21')](_0x573eed);}return null;};}function patchUpdates(_0x3ed520){return function(_0x2d59b3){try{jsonpatch[_0x522b('0x26')](_0x2d59b3,_0x3ed520,!![]);}catch(_0x484b56){return BPromise[_0x522b('0x27')](_0x484b56);}return _0x2d59b3[_0x522b('0x28')]();};}function saveUpdates(_0x55fdd8,_0x18c587){return function(_0x5793ac){if(_0x5793ac){return _0x5793ac['update'](_0x55fdd8)[_0x522b('0x29')](function(_0x4fed08){return _0x4fed08;});}return null;};}function removeEntity(_0x43eb61,_0x57d81b){return function(_0x579456){if(_0x579456){return _0x579456[_0x522b('0x2a')]()[_0x522b('0x29')](function(){_0x43eb61[_0x522b('0x1f')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4e432f,_0x3d55fe){return function(_0x418a16){if(!_0x418a16){_0x4e432f[_0x522b('0x1e')](0x194);}return _0x418a16;};}function handleError(_0x32cef3,_0x1ca362){_0x1ca362=_0x1ca362||0x1f4;return function(_0x14f8e4){logger['error'](_0x14f8e4[_0x522b('0x2b')]);if(_0x14f8e4[_0x522b('0x2c')]){delete _0x14f8e4[_0x522b('0x2c')];}_0x32cef3[_0x522b('0x1f')](_0x1ca362)[_0x522b('0x2d')](_0x14f8e4);};}exports[_0x522b('0x2e')]=function(_0x229736,_0x14cfec,_0x306611){if(!_0x229736[_0x522b('0x2f')][_0x522b('0x30')]('text')&&!_0x229736[_0x522b('0x2f')][_0x522b('0x30')](_0x522b('0x31'))){throw new db[(_0x522b('0x32'))][(_0x522b('0x33'))](_0x522b('0x34'));}else{if(_0x229736[_0x522b('0x2f')][_0x522b('0x30')](_0x522b('0x31'))&&!_0x229736[_0x522b('0x2f')][_0x522b('0x30')](_0x522b('0x35'))){throw new db[(_0x522b('0x32'))][(_0x522b('0x33'))](_0x522b('0x36'));}if(!_0x229736['body'][_0x522b('0x30')](_0x522b('0x37'))){throw new db['Sequelize'][(_0x522b('0x33'))](_0x522b('0x38'));}else{try{var _0x421377=JSON[_0x522b('0x39')](_0x229736[_0x522b('0x2f')][_0x522b('0x37')]);}catch(_0x470be6){logger['error'](_0x470be6);throw new db[(_0x522b('0x32'))]['ValidationError']('Invalid\x20\x27recipients\x27\x20object');}var _0x2cfa16=[_0x522b('0x3a'),'faxqueue','mailqueue',_0x522b('0x3b'),'smsqueue','voicequeue',_0x522b('0x3c'),_0x522b('0x3d'),'user'];if(_[_0x522b('0x3e')](_0x421377,function(_0x97b94a){return!_['includes'](_0x2cfa16,_0x97b94a['model'][_0x522b('0x3f')]());})){throw new db[(_0x522b('0x32'))][(_0x522b('0x33'))](_0x522b('0x40'));}}}var _0x55bb79={};_0x55bb79[_0x522b('0x41')]=_0x229736[_0x522b('0x2f')]['hasOwnProperty'](_0x522b('0x41'))?_0x229736[_0x522b('0x2f')][_0x522b('0x41')]:_0x229736[_0x522b('0x42')]['fullname'];_0x55bb79[_0x522b('0x43')]=_[_0x522b('0x44')](_0x229736[_0x522b('0x2f')]['recipientsDescription'])?null:_0x229736[_0x522b('0x2f')][_0x522b('0x43')];_0x55bb79[_0x522b('0x45')]=_0x229736['body'][_0x522b('0x45')]||![];_0x55bb79[_0x522b('0x46')]=_0x229736[_0x522b('0x42')]['id'];return getContent(_0x229736['body'])[_0x522b('0x29')](function(_0x510848){_0x55bb79['body']=_0x510848;return getRecipients(_0x421377);})[_0x522b('0x29')](function(_0x46abe7){_0x55bb79[_0x522b('0x47')]=_[_0x522b('0x48')](_0x46abe7)[_0x522b('0x49')](',');return db[_0x522b('0x4a')]['transaction'](function(_0xc5c812){return db['UserNotification'][_0x522b('0x4b')](_0x55bb79,{'raw':!![],'transaction':_0xc5c812})[_0x522b('0x29')](function(_0x461339){var _0x1e8c02={'sender':_0x55bb79[_0x522b('0x41')],'description':_0x55bb79[_0x522b('0x43')],'content':_0x55bb79[_0x522b('0x2f')],'beep':_0x55bb79[_0x522b('0x45')]};_0x46abe7[_0x522b('0x4c')](function(_0xfde342){_0x1e8c02['recipient']=_0xfde342;socket['emit'](_0x522b('0x4d'),_0x1e8c02);});return _0x461339;});});})[_0x522b('0x29')](respondWithResult(_0x14cfec,0xc9))['catch'](handleError(_0x14cfec,null));};function getContent(_0x2b0985){return new BPromise(function(_0x445654,_0x253641){if(_0x2b0985[_0x522b('0x4e')]){_0x445654(_0x2b0985[_0x522b('0x4e')]);return;}return db['Template'][_0x522b('0x4f')]({'attributes':[_0x522b('0x50')],'where':{'id':_0x2b0985[_0x522b('0x31')]},'raw':!![]})[_0x522b('0x29')](function(_0xe60010){if(!_0xe60010)throw new db[(_0x522b('0x32'))][(_0x522b('0x33'))](_0x522b('0x51'));var _0x11904e=Mustache['render'](_0xe60010[_0x522b('0x50')],_0x2b0985['view']);_0x445654(_0x11904e);})[_0x522b('0x52')](function(_0x22c033){_0x253641(_0x22c033);});});}function getRecipients(_0x180564){return new BPromise(function(_0xc4889,_0xc9aebd){var _0x515367=[];var _0x490d40=[];_0x180564[_0x522b('0x4c')](function(_0x223959){var _0x9cc429=_[_0x522b('0x53')](_0x223959[_0x522b('0x54')][_0x522b('0x3f')]());if(_0x9cc429==='User'){_0x515367=_[_0x522b('0x55')](_0x515367,_0x223959[_0x522b('0x56')]);}else{if(_[_0x522b('0x57')](_0x9cc429,_0x522b('0x58')))_0x9cc429=_0x9cc429['replace'](_0x522b('0x58'),'Queue');_0x223959[_0x522b('0x56')][_0x522b('0x4c')](function(_0x2e5b2d){_0x490d40['push'](getAgents(_0x9cc429,_0x2e5b2d));});}});return BPromise[_0x522b('0x59')](_0x490d40)[_0x522b('0x29')](function(_0x273382){_0x515367=_[_0x522b('0x55')](_0x515367,_['flatten'](_0x273382));_0xc4889(_0x515367);})['catch'](function(_0x99093b){_0xc9aebd(_0x99093b);});});}function getAgents(_0x303ff3,_0xd27290){return new BPromise(function(_0x4a68db,_0x4e1d2a){return db[_0x303ff3]['findOne']({'where':{'id':_0xd27290}})['then'](function(_0x416313){return _0x416313[_0x522b('0x5a')]({'attributes':['id'],'raw':!![]})['then'](function(_0x3998cb){var _0xa83a20=_[_0x522b('0x5b')](_0x3998cb,'id');_0x4a68db(_0xa83a20);});})[_0x522b('0x52')](function(_0x5a8c88){_0x4e1d2a(_0x5a8c88);});});}
\ No newline at end of file
index 5c7ff24..f0bc782 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcdca=['setMaxListeners','save','update','emit','hasOwnProperty','hook','exports','../../mysqldb','UserNotification'];(function(_0x2237cd,_0x15bb32){var _0x41c9d7=function(_0x22fdc4){while(--_0x22fdc4){_0x2237cd['push'](_0x2237cd['shift']());}};_0x41c9d7(++_0x15bb32);}(_0xcdca,0x73));var _0xacdc=function(_0x131eff,_0x25b26a){_0x131eff=_0x131eff-0x0;var _0xf89db9=_0xcdca[_0x131eff];return _0xf89db9;};'use strict';var EventEmitter=require('events');var UserNotification=require(_0xacdc('0x0'))['db'][_0xacdc('0x1')];var UserNotificationEvents=new EventEmitter();UserNotificationEvents[_0xacdc('0x2')](0x0);var events={'afterCreate':_0xacdc('0x3'),'afterUpdate':_0xacdc('0x4'),'afterDestroy':'remove'};function emitEvent(_0x236d08){return function(_0x20ea19,_0x370a6d,_0x22039b){UserNotificationEvents[_0xacdc('0x5')](_0x236d08+':'+_0x20ea19['id'],_0x20ea19);UserNotificationEvents['emit'](_0x236d08,_0x20ea19);_0x22039b(null);};}for(var e in events){if(events[_0xacdc('0x6')](e)){var event=events[e];UserNotification[_0xacdc('0x7')](e,emitEvent(event));}}module[_0xacdc('0x8')]=UserNotificationEvents;
\ No newline at end of file
+var _0x8172=['setMaxListeners','save','emit','hasOwnProperty','exports','events','../../mysqldb','UserNotification'];(function(_0x4fbfd9,_0x3ab91a){var _0x31dc94=function(_0x11e53b){while(--_0x11e53b){_0x4fbfd9['push'](_0x4fbfd9['shift']());}};_0x31dc94(++_0x3ab91a);}(_0x8172,0x1c5));var _0x2817=function(_0x3c151d,_0x5f3cfe){_0x3c151d=_0x3c151d-0x0;var _0x5dd26e=_0x8172[_0x3c151d];return _0x5dd26e;};'use strict';var EventEmitter=require(_0x2817('0x0'));var UserNotification=require(_0x2817('0x1'))['db'][_0x2817('0x2')];var UserNotificationEvents=new EventEmitter();UserNotificationEvents[_0x2817('0x3')](0x0);var events={'afterCreate':_0x2817('0x4'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x1349c0){return function(_0x52bd5a,_0x47a30c,_0x2c65b6){UserNotificationEvents[_0x2817('0x5')](_0x1349c0+':'+_0x52bd5a['id'],_0x52bd5a);UserNotificationEvents[_0x2817('0x5')](_0x1349c0,_0x52bd5a);_0x2c65b6(null);};}for(var e in events){if(events[_0x2817('0x6')](e)){var event=events[e];UserNotification['hook'](e,emitEvent(event));}}module[_0x2817('0x7')]=UserNotificationEvents;
\ No newline at end of file
index 60a9e29..4357eee 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4d2a=['api','request-promise','path','../../config/environment','./userNotification.attributes','exports','define','UserNotification','userNotifications','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger'];(function(_0x344799,_0x422266){var _0x298d4a=function(_0x10d10f){while(--_0x10d10f){_0x344799['push'](_0x344799['shift']());}};_0x298d4a(++_0x422266);}(_0x4d2a,0x6d));var _0xa4d2=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x4d2a[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xa4d2('0x0'));var util=require(_0xa4d2('0x1'));var logger=require(_0xa4d2('0x2'))(_0xa4d2('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0xa4d2('0x4'));var fs=require('fs');var path=require(_0xa4d2('0x5'));var rimraf=require('rimraf');var config=require(_0xa4d2('0x6'));var attributes=require(_0xa4d2('0x7'));module[_0xa4d2('0x8')]=function(_0x3e06b0,_0x274269){return _0x3e06b0[_0xa4d2('0x9')](_0xa4d2('0xa'),attributes,{'tableName':_0xa4d2('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xa4d2('0xc'),'collate':_0xa4d2('0xd')});};
\ No newline at end of file
+var _0x7a3e=['exports','UserNotification','userNotifications','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./userNotification.attributes'];(function(_0x45eaaf,_0x615293){var _0x1d4947=function(_0x4f291f){while(--_0x4f291f){_0x45eaaf['push'](_0x45eaaf['shift']());}};_0x1d4947(++_0x615293);}(_0x7a3e,0x65));var _0xe7a3=function(_0x5857ce,_0x433fce){_0x5857ce=_0x5857ce-0x0;var _0x5d56a7=_0x7a3e[_0x5857ce];return _0x5d56a7;};'use strict';var _=require(_0xe7a3('0x0'));var util=require(_0xe7a3('0x1'));var logger=require(_0xe7a3('0x2'))(_0xe7a3('0x3'));var moment=require(_0xe7a3('0x4'));var BPromise=require(_0xe7a3('0x5'));var rp=require(_0xe7a3('0x6'));var fs=require('fs');var path=require(_0xe7a3('0x7'));var rimraf=require(_0xe7a3('0x8'));var config=require(_0xe7a3('0x9'));var attributes=require(_0xe7a3('0xa'));module[_0xe7a3('0xb')]=function(_0x4765b5,_0x515c1c){return _0x4765b5['define'](_0xe7a3('0xc'),attributes,{'tableName':_0xe7a3('0xd'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xe7a3('0xe'),'collate':_0xe7a3('0xf')});};
\ No newline at end of file
index 681b4e7..563a8f1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5483=['http','redis','defaults','localhost','socket.io-emitter','./userNotification.socket','register','request','then','info','UserNotification,\x20%s,\x20%s','debug','UserNotification,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','client'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0x5483,0x1c7));var _0x3548=function(_0x3a7a9c,_0x24f7d6){_0x3a7a9c=_0x3a7a9c-0x0;var _0x59156e=_0x5483[_0x3a7a9c];return _0x59156e;};'use strict';var _=require(_0x3548('0x0'));var util=require('util');var moment=require(_0x3548('0x1'));var BPromise=require('bluebird');var rs=require(_0x3548('0x2'));var fs=require('fs');var Redis=require(_0x3548('0x3'));var db=require(_0x3548('0x4'))['db'];var utils=require('../../config/utils');var logger=require(_0x3548('0x5'))(_0x3548('0x6'));var config=require(_0x3548('0x7'));var jayson=require('jayson/promise');var client=jayson[_0x3548('0x8')][_0x3548('0x9')]({'port':0x232a});config[_0x3548('0xa')]=_[_0x3548('0xb')](config['redis'],{'host':_0x3548('0xc'),'port':0x18eb});var socket=require(_0x3548('0xd'))(new Redis(config['redis']));require(_0x3548('0xe'))[_0x3548('0xf')](socket);function respondWithRpcPromise(_0x49ee95,_0x177258,_0x486f4e){return new BPromise(function(_0x1f9080,_0x102824){return client[_0x3548('0x10')](_0x49ee95,_0x486f4e)[_0x3548('0x11')](function(_0xb93c1b){logger[_0x3548('0x12')](_0x3548('0x13'),_0x177258,'request\x20sent');logger[_0x3548('0x14')](_0x3548('0x15'),_0x177258,_0x3548('0x16'),JSON[_0x3548('0x17')](_0xb93c1b));if(_0xb93c1b[_0x3548('0x18')]){if(_0xb93c1b[_0x3548('0x18')][_0x3548('0x19')]===0x1f4){logger['error'](_0x3548('0x13'),_0x177258,_0xb93c1b[_0x3548('0x18')][_0x3548('0x1a')]);return _0x102824(_0xb93c1b[_0x3548('0x18')][_0x3548('0x1a')]);}logger[_0x3548('0x18')](_0x3548('0x13'),_0x177258,_0xb93c1b[_0x3548('0x18')][_0x3548('0x1a')]);return _0x1f9080(_0xb93c1b[_0x3548('0x18')][_0x3548('0x1a')]);}else{logger[_0x3548('0x12')](_0x3548('0x13'),_0x177258,'request\x20sent');_0x1f9080(_0xb93c1b[_0x3548('0x1b')]['message']);}})[_0x3548('0x1c')](function(_0x2843e0){logger[_0x3548('0x18')]('UserNotification,\x20%s,\x20%s',_0x177258,_0x2843e0);_0x102824(_0x2843e0);});});}
\ No newline at end of file
+var _0xcc80=['info','catch','util','bluebird','../../config/utils','../../config/logger','rpc','../../config/environment','client','http','redis','defaults','socket.io-emitter','./userNotification.socket','register','request','then','request\x20sent','stringify','error','code','UserNotification,\x20%s,\x20%s','message'];(function(_0x360680,_0x4e2466){var _0x1fd2ea=function(_0x1c224e){while(--_0x1c224e){_0x360680['push'](_0x360680['shift']());}};_0x1fd2ea(++_0x4e2466);}(_0xcc80,0x75));var _0x0cc8=function(_0x5e94fe,_0x32b0f6){_0x5e94fe=_0x5e94fe-0x0;var _0x2c0114=_0xcc80[_0x5e94fe];return _0x2c0114;};'use strict';var _=require('lodash');var util=require(_0x0cc8('0x0'));var moment=require('moment');var BPromise=require(_0x0cc8('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x0cc8('0x2'));var logger=require(_0x0cc8('0x3'))(_0x0cc8('0x4'));var config=require(_0x0cc8('0x5'));var jayson=require('jayson/promise');var client=jayson[_0x0cc8('0x6')][_0x0cc8('0x7')]({'port':0x232a});config[_0x0cc8('0x8')]=_[_0x0cc8('0x9')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x0cc8('0xa'))(new Redis(config[_0x0cc8('0x8')]));require(_0x0cc8('0xb'))[_0x0cc8('0xc')](socket);function respondWithRpcPromise(_0x56ed66,_0x2268d8,_0xefcf49){return new BPromise(function(_0x533bcd,_0x3aebc2){return client[_0x0cc8('0xd')](_0x56ed66,_0xefcf49)[_0x0cc8('0xe')](function(_0x26a085){logger['info']('UserNotification,\x20%s,\x20%s',_0x2268d8,_0x0cc8('0xf'));logger['debug']('UserNotification,\x20%s,\x20%s,\x20%s',_0x2268d8,_0x0cc8('0xf'),JSON[_0x0cc8('0x10')](_0x26a085));if(_0x26a085[_0x0cc8('0x11')]){if(_0x26a085[_0x0cc8('0x11')][_0x0cc8('0x12')]===0x1f4){logger[_0x0cc8('0x11')](_0x0cc8('0x13'),_0x2268d8,_0x26a085[_0x0cc8('0x11')][_0x0cc8('0x14')]);return _0x3aebc2(_0x26a085[_0x0cc8('0x11')][_0x0cc8('0x14')]);}logger[_0x0cc8('0x11')](_0x0cc8('0x13'),_0x2268d8,_0x26a085[_0x0cc8('0x11')][_0x0cc8('0x14')]);return _0x533bcd(_0x26a085[_0x0cc8('0x11')][_0x0cc8('0x14')]);}else{logger[_0x0cc8('0x15')](_0x0cc8('0x13'),_0x2268d8,_0x0cc8('0xf'));_0x533bcd(_0x26a085['result'][_0x0cc8('0x14')]);}})[_0x0cc8('0x16')](function(_0x2d7e6e){logger[_0x0cc8('0x11')](_0x0cc8('0x13'),_0x2268d8,_0x2d7e6e);_0x3aebc2(_0x2d7e6e);});});}
\ No newline at end of file
index 709dfa7..7d20ee6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8083=['userNotification:','save','update','register','length'];(function(_0x37026f,_0x2df88f){var _0x40cb74=function(_0x5276ac){while(--_0x5276ac){_0x37026f['push'](_0x37026f['shift']());}};_0x40cb74(++_0x2df88f);}(_0x8083,0x74));var _0x3808=function(_0x5ec453,_0x30b0ba){_0x5ec453=_0x5ec453-0x0;var _0x25548f=_0x8083[_0x5ec453];return _0x25548f;};'use strict';var UserNotificationEvents=require('./userNotification.events');var events=[_0x3808('0x0'),'remove',_0x3808('0x1')];function createListener(_0x94a0f7,_0x3165e5){return function(_0x179ad3){_0x3165e5['emit'](_0x94a0f7,_0x179ad3);};}function removeListener(_0x64c66d,_0x1d4174){return function(){UserNotificationEvents['removeListener'](_0x64c66d,_0x1d4174);};}exports[_0x3808('0x2')]=function(_0x2e0734){for(var _0xe4f2d0=0x0,_0x43b3ac=events[_0x3808('0x3')];_0xe4f2d0<_0x43b3ac;_0xe4f2d0++){var _0x1e864e=events[_0xe4f2d0];var _0x114ce0=createListener(_0x3808('0x4')+_0x1e864e,_0x2e0734);UserNotificationEvents['on'](_0x1e864e,_0x114ce0);}};
\ No newline at end of file
+var _0x7984=['./userNotification.events','save','update','userNotification:'];(function(_0x11e216,_0xf7592b){var _0x51839f=function(_0xd2fa82){while(--_0xd2fa82){_0x11e216['push'](_0x11e216['shift']());}};_0x51839f(++_0xf7592b);}(_0x7984,0xac));var _0x4798=function(_0x38d4f7,_0x17c1e8){_0x38d4f7=_0x38d4f7-0x0;var _0x40428c=_0x7984[_0x38d4f7];return _0x40428c;};'use strict';var UserNotificationEvents=require(_0x4798('0x0'));var events=[_0x4798('0x1'),'remove',_0x4798('0x2')];function createListener(_0x19f494,_0x1203f8){return function(_0x28df02){_0x1203f8['emit'](_0x19f494,_0x28df02);};}function removeListener(_0x26de54,_0x5ae34d){return function(){UserNotificationEvents['removeListener'](_0x26de54,_0x5ae34d);};}exports['register']=function(_0x43f2d5){for(var _0x565f3d=0x0,_0x5777cc=events['length'];_0x565f3d<_0x5777cc;_0x565f3d++){var _0x2ca19d=events[_0x565f3d];var _0x7ba9d7=createListener(_0x4798('0x3')+_0x2ca19d,_0x43f2d5);UserNotificationEvents['on'](_0x2ca19d,_0x7ba9d7);}};
\ No newline at end of file
index 64a633b..80bca91 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xedd9=['util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','exports'];(function(_0x18ef8e,_0x1ade92){var _0x25408c=function(_0x326525){while(--_0x326525){_0x18ef8e['push'](_0x18ef8e['shift']());}};_0x25408c(++_0x1ade92);}(_0xedd9,0xfc));var _0x9edd=function(_0x577f3d,_0x43ab79){_0x577f3d=_0x577f3d-0x0;var _0x3b11f6=_0xedd9[_0x577f3d];return _0x3b11f6;};'use strict';var multer=require('multer');var util=require(_0x9edd('0x0'));var path=require(_0x9edd('0x1'));var timeout=require(_0x9edd('0x2'));var express=require(_0x9edd('0x3'));var router=express[_0x9edd('0x4')]();var fs_extra=require(_0x9edd('0x5'));var auth=require(_0x9edd('0x6'));var interaction=require(_0x9edd('0x7'));var config=require('../../config/environment');module[_0x9edd('0x8')]=router;
\ No newline at end of file
+var _0xcb91=['express','Router','../../components/auth/service','../../components/interaction/service','exports','path','connect-timeout'];(function(_0x18b115,_0x5a9467){var _0x2e504d=function(_0x42765e){while(--_0x42765e){_0x18b115['push'](_0x18b115['shift']());}};_0x2e504d(++_0x5a9467);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x553a87,_0x1d621f){_0x553a87=_0x553a87-0x0;var _0x12d1e6=_0xcb91[_0x553a87];return _0x12d1e6;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x1cb9('0x0'));var timeout=require(_0x1cb9('0x1'));var express=require(_0x1cb9('0x2'));var router=express[_0x1cb9('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x1cb9('0x4'));var interaction=require(_0x1cb9('0x5'));var config=require('../../config/environment');module[_0x1cb9('0x6')]=router;
\ No newline at end of file
index de56f9b..7f1d5a3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6cf2=['exports','INTEGER'];(function(_0x3caa36,_0x2a75a4){var _0x57577e=function(_0x233283){while(--_0x233283){_0x3caa36['push'](_0x3caa36['shift']());}};_0x57577e(++_0x2a75a4);}(_0x6cf2,0x7c));var _0x26cf=function(_0x4e3438,_0x1037f5){_0x4e3438=_0x4e3438-0x0;var _0x2bf83c=_0x6cf2[_0x4e3438];return _0x2bf83c;};'use strict';var Sequelize=require('sequelize');module[_0x26cf('0x0')]={'penalty':{'type':Sequelize[_0x26cf('0x1')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x5111=['sequelize','exports','INTEGER'];(function(_0x4057f9,_0x17c5b5){var _0x5552b7=function(_0xeb792f){while(--_0xeb792f){_0x4057f9['push'](_0x4057f9['shift']());}};_0x5552b7(++_0x17c5b5);}(_0x5111,0x132));var _0x1511=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x5111[_0x321bb2];return _0x9c12ed;};'use strict';var Sequelize=require(_0x1511('0x0'));module[_0x1511('0x1')]={'penalty':{'type':Sequelize[_0x1511('0x2')],'defaultValue':0x0}};
\ No newline at end of file
index e40f6d8..e0a636b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0073=['moment','bluebird','path','rimraf','exports','UserOpenchannelQueue','user_has_openchannel_queues','util','api'];(function(_0x1b10a6,_0x1efe89){var _0x164860=function(_0x5d332d){while(--_0x5d332d){_0x1b10a6['push'](_0x1b10a6['shift']());}};_0x164860(++_0x1efe89);}(_0x0073,0x16f));var _0x3007=function(_0x4e389b,_0x42320c){_0x4e389b=_0x4e389b-0x0;var _0x43dfcb=_0x0073[_0x4e389b];return _0x43dfcb;};'use strict';var _=require('lodash');var util=require(_0x3007('0x0'));var logger=require('../../config/logger')(_0x3007('0x1'));var moment=require(_0x3007('0x2'));var BPromise=require(_0x3007('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x3007('0x4'));var rimraf=require(_0x3007('0x5'));var config=require('../../config/environment');var attributes=require('./userOpenchannelQueue.attributes');module[_0x3007('0x6')]=function(_0x58653e,_0x49a9fc){return _0x58653e['define'](_0x3007('0x7'),attributes,{'tableName':_0x3007('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x8fa9=['lodash','util','moment','bluebird','path','../../config/environment','define','UserOpenchannelQueue'];(function(_0x1559a5,_0x41924e){var _0x17a783=function(_0x152c63){while(--_0x152c63){_0x1559a5['push'](_0x1559a5['shift']());}};_0x17a783(++_0x41924e);}(_0x8fa9,0x158));var _0x98fa=function(_0x3ed1f6,_0x22466f){_0x3ed1f6=_0x3ed1f6-0x0;var _0xe257b0=_0x8fa9[_0x3ed1f6];return _0xe257b0;};'use strict';var _=require(_0x98fa('0x0'));var util=require(_0x98fa('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x98fa('0x2'));var BPromise=require(_0x98fa('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x98fa('0x4'));var rimraf=require('rimraf');var config=require(_0x98fa('0x5'));var attributes=require('./userOpenchannelQueue.attributes');module['exports']=function(_0x41ef0e,_0x44247f){return _0x41ef0e[_0x98fa('0x6')](_0x98fa('0x7'),attributes,{'tableName':'user_has_openchannel_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 3edd2fd..979b375 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd44b=['error','code','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','then','info','UserOpenchannelQueue,\x20%s,\x20%s','request\x20sent','debug','UserOpenchannelQueue,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x4d970f,_0x1f16a9){var _0xd95c23=function(_0xf46c7f){while(--_0xf46c7f){_0x4d970f['push'](_0x4d970f['shift']());}};_0xd95c23(++_0x1f16a9);}(_0xd44b,0x1a3));var _0xbd44=function(_0x5584c6,_0x219a21){_0x5584c6=_0x5584c6-0x0;var _0x4e998f=_0xd44b[_0x5584c6];return _0x4e998f;};'use strict';var _=require(_0xbd44('0x0'));var util=require('util');var moment=require(_0xbd44('0x1'));var BPromise=require(_0xbd44('0x2'));var rs=require(_0xbd44('0x3'));var fs=require('fs');var Redis=require(_0xbd44('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xbd44('0x5'));var logger=require('../../config/logger')(_0xbd44('0x6'));var config=require(_0xbd44('0x7'));var jayson=require(_0xbd44('0x8'));var client=jayson[_0xbd44('0x9')][_0xbd44('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3c982d,_0x512909,_0x4de614){return new BPromise(function(_0x418c0f,_0x23d7e1){return client['request'](_0x3c982d,_0x4de614)[_0xbd44('0xb')](function(_0x2b89fc){logger[_0xbd44('0xc')](_0xbd44('0xd'),_0x512909,_0xbd44('0xe'));logger[_0xbd44('0xf')](_0xbd44('0x10'),_0x512909,_0xbd44('0xe'),JSON[_0xbd44('0x11')](_0x2b89fc));if(_0x2b89fc[_0xbd44('0x12')]){if(_0x2b89fc[_0xbd44('0x12')][_0xbd44('0x13')]===0x1f4){logger[_0xbd44('0x12')]('UserOpenchannelQueue,\x20%s,\x20%s',_0x512909,_0x2b89fc[_0xbd44('0x12')][_0xbd44('0x14')]);return _0x23d7e1(_0x2b89fc['error'][_0xbd44('0x14')]);}logger[_0xbd44('0x12')](_0xbd44('0xd'),_0x512909,_0x2b89fc[_0xbd44('0x12')][_0xbd44('0x14')]);return _0x418c0f(_0x2b89fc['error'][_0xbd44('0x14')]);}else{logger['info']('UserOpenchannelQueue,\x20%s,\x20%s',_0x512909,'request\x20sent');_0x418c0f(_0x2b89fc[_0xbd44('0x15')][_0xbd44('0x14')]);}})[_0xbd44('0x16')](function(_0x2e45aa){logger[_0xbd44('0x12')](_0xbd44('0xd'),_0x512909,_0x2e45aa);_0x23d7e1(_0x2e45aa);});});}
\ No newline at end of file
+var _0x0d9e=['result','util','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','http','then','info','UserOpenchannelQueue,\x20%s,\x20%s','debug','request\x20sent','error','code','message'];(function(_0x3a5112,_0x271062){var _0x3a5236=function(_0x4c74b1){while(--_0x4c74b1){_0x3a5112['push'](_0x3a5112['shift']());}};_0x3a5236(++_0x271062);}(_0x0d9e,0x91));var _0xe0d9=function(_0x27220c,_0x374d56){_0x27220c=_0x27220c-0x0;var _0x494e9d=_0x0d9e[_0x27220c];return _0x494e9d;};'use strict';var _=require('lodash');var util=require(_0xe0d9('0x0'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe0d9('0x1'))['db'];var utils=require('../../config/utils');var logger=require(_0xe0d9('0x2'))(_0xe0d9('0x3'));var config=require(_0xe0d9('0x4'));var jayson=require(_0xe0d9('0x5'));var client=jayson['client'][_0xe0d9('0x6')]({'port':0x232a});function respondWithRpcPromise(_0x1c9d2e,_0x4b30e9,_0x751593){return new BPromise(function(_0x2a964d,_0x413d78){return client['request'](_0x1c9d2e,_0x751593)[_0xe0d9('0x7')](function(_0x5215ad){logger[_0xe0d9('0x8')](_0xe0d9('0x9'),_0x4b30e9,'request\x20sent');logger[_0xe0d9('0xa')]('UserOpenchannelQueue,\x20%s,\x20%s,\x20%s',_0x4b30e9,_0xe0d9('0xb'),JSON['stringify'](_0x5215ad));if(_0x5215ad[_0xe0d9('0xc')]){if(_0x5215ad[_0xe0d9('0xc')][_0xe0d9('0xd')]===0x1f4){logger[_0xe0d9('0xc')](_0xe0d9('0x9'),_0x4b30e9,_0x5215ad[_0xe0d9('0xc')][_0xe0d9('0xe')]);return _0x413d78(_0x5215ad[_0xe0d9('0xc')][_0xe0d9('0xe')]);}logger[_0xe0d9('0xc')]('UserOpenchannelQueue,\x20%s,\x20%s',_0x4b30e9,_0x5215ad['error'][_0xe0d9('0xe')]);return _0x2a964d(_0x5215ad[_0xe0d9('0xc')][_0xe0d9('0xe')]);}else{logger[_0xe0d9('0x8')](_0xe0d9('0x9'),_0x4b30e9,'request\x20sent');_0x2a964d(_0x5215ad[_0xe0d9('0xf')][_0xe0d9('0xe')]);}})['catch'](function(_0x5de035){logger['error']('UserOpenchannelQueue,\x20%s,\x20%s',_0x4b30e9,_0x5de035);_0x413d78(_0x5de035);});});}
\ No newline at end of file
index 8305e27..8e5ca8c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4ed7=['express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./userProfile.controller','get','index','/describe','isAuthenticated','describe','show','/:id/sections','/:id/resources','getResources','post','clone','addResources','put','/:id','delete','removeSections','removeResources','exports','util','path','connect-timeout'];(function(_0x11b749,_0xd04934){var _0x1bd1f7=function(_0x301b2e){while(--_0x301b2e){_0x11b749['push'](_0x11b749['shift']());}};_0x1bd1f7(++_0xd04934);}(_0x4ed7,0x69));var _0x74ed=function(_0x277af0,_0x1f0361){_0x277af0=_0x277af0-0x0;var _0x43bd7c=_0x4ed7[_0x277af0];return _0x43bd7c;};'use strict';var multer=require('multer');var util=require(_0x74ed('0x0'));var path=require(_0x74ed('0x1'));var timeout=require(_0x74ed('0x2'));var express=require(_0x74ed('0x3'));var router=express[_0x74ed('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x74ed('0x5'));var interaction=require(_0x74ed('0x6'));var config=require(_0x74ed('0x7'));var controller=require(_0x74ed('0x8'));router[_0x74ed('0x9')]('/',auth['isAuthenticated'](),controller[_0x74ed('0xa')]);router['get'](_0x74ed('0xb'),auth[_0x74ed('0xc')](),controller[_0x74ed('0xd')]);router[_0x74ed('0x9')]('/:id',auth[_0x74ed('0xc')](),controller[_0x74ed('0xe')]);router[_0x74ed('0x9')](_0x74ed('0xf'),auth[_0x74ed('0xc')](),controller['getSections']);router[_0x74ed('0x9')](_0x74ed('0x10'),auth['isAuthenticated'](),controller[_0x74ed('0x11')]);router[_0x74ed('0x12')]('/',auth[_0x74ed('0xc')](),controller['create']);router[_0x74ed('0x12')]('/:id/clone',auth[_0x74ed('0xc')](),controller[_0x74ed('0x13')]);router[_0x74ed('0x12')](_0x74ed('0xf'),auth['isAuthenticated'](),controller['addSections']);router[_0x74ed('0x12')](_0x74ed('0x10'),auth[_0x74ed('0xc')](),controller[_0x74ed('0x14')]);router[_0x74ed('0x15')](_0x74ed('0x16'),auth[_0x74ed('0xc')](),controller['update']);router[_0x74ed('0x17')]('/:id',auth[_0x74ed('0xc')](),controller['destroy']);router['delete'](_0x74ed('0xf'),auth[_0x74ed('0xc')](),controller[_0x74ed('0x18')]);router[_0x74ed('0x17')]('/:id/resources',auth[_0x74ed('0xc')](),controller[_0x74ed('0x19')]);module[_0x74ed('0x1a')]=router;
\ No newline at end of file
+var _0x1e7a=['/:id','show','/:id/sections','/:id/resources','post','create','addSections','destroy','delete','removeSections','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','describe'];(function(_0x222b46,_0x5c894a){var _0x1f7314=function(_0x5c14e9){while(--_0x5c14e9){_0x222b46['push'](_0x222b46['shift']());}};_0x1f7314(++_0x5c894a);}(_0x1e7a,0xe3));var _0xa1e7=function(_0x5925f6,_0x291a73){_0x5925f6=_0x5925f6-0x0;var _0x4739c4=_0x1e7a[_0x5925f6];return _0x4739c4;};'use strict';var multer=require(_0xa1e7('0x0'));var util=require(_0xa1e7('0x1'));var path=require('path');var timeout=require(_0xa1e7('0x2'));var express=require(_0xa1e7('0x3'));var router=express[_0xa1e7('0x4')]();var fs_extra=require(_0xa1e7('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0xa1e7('0x6'));var config=require(_0xa1e7('0x7'));var controller=require('./userProfile.controller');router[_0xa1e7('0x8')]('/',auth[_0xa1e7('0x9')](),controller[_0xa1e7('0xa')]);router[_0xa1e7('0x8')](_0xa1e7('0xb'),auth[_0xa1e7('0x9')](),controller[_0xa1e7('0xc')]);router[_0xa1e7('0x8')](_0xa1e7('0xd'),auth['isAuthenticated'](),controller[_0xa1e7('0xe')]);router[_0xa1e7('0x8')](_0xa1e7('0xf'),auth[_0xa1e7('0x9')](),controller['getSections']);router[_0xa1e7('0x8')](_0xa1e7('0x10'),auth[_0xa1e7('0x9')](),controller['getResources']);router[_0xa1e7('0x11')]('/',auth[_0xa1e7('0x9')](),controller[_0xa1e7('0x12')]);router['post']('/:id/clone',auth[_0xa1e7('0x9')](),controller['clone']);router[_0xa1e7('0x11')](_0xa1e7('0xf'),auth['isAuthenticated'](),controller[_0xa1e7('0x13')]);router[_0xa1e7('0x11')](_0xa1e7('0x10'),auth[_0xa1e7('0x9')](),controller['addResources']);router['put'](_0xa1e7('0xd'),auth[_0xa1e7('0x9')](),controller['update']);router['delete'](_0xa1e7('0xd'),auth[_0xa1e7('0x9')](),controller[_0xa1e7('0x14')]);router[_0xa1e7('0x15')]('/:id/sections',auth[_0xa1e7('0x9')](),controller[_0xa1e7('0x16')]);router[_0xa1e7('0x15')](_0xa1e7('0x10'),auth['isAuthenticated'](),controller['removeResources']);module[_0xa1e7('0x17')]=router;
\ No newline at end of file
index 0f35370..5f733e7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x430c=['getDataValue','split','BOOLEAN','sequelize','STRING','name','setDataValue','crudPermissions','join'];(function(_0x5e40ca,_0x24b1b0){var _0x3da01e=function(_0x714c9f){while(--_0x714c9f){_0x5e40ca['push'](_0x5e40ca['shift']());}};_0x3da01e(++_0x24b1b0);}(_0x430c,0xb7));var _0xc430=function(_0x16e0c8,_0x4861eb){_0x16e0c8=_0x16e0c8-0x0;var _0xe4b5af=_0x430c[_0x16e0c8];return _0xe4b5af;};'use strict';var Sequelize=require(_0xc430('0x0'));module['exports']={'name':{'type':Sequelize[_0xc430('0x1')],'allowNull':![],'unique':_0xc430('0x2')},'crudPermissions':{'type':Sequelize[_0xc430('0x1')],'set':function(_0x44b301){this[_0xc430('0x3')](_0xc430('0x4'),_0x44b301?_0x44b301[_0xc430('0x5')](''):[]);},'get':function(){return this[_0xc430('0x6')](_0xc430('0x4'))?this[_0xc430('0x6')]('crudPermissions')[_0xc430('0x7')](''):[];},'allowNull':![],'defaultValue':'r'},'description':{'type':Sequelize[_0xc430('0x1')],'allowNull':!![]},'privacyEnabled':{'type':Sequelize[_0xc430('0x8')],'defaultValue':![]},'downloadAttachments':{'type':Sequelize[_0xc430('0x8')],'defaultValue':!![]},'downloadCallySquareRecordings':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'downloadContactManagerLists':{'type':Sequelize[_0xc430('0x8')],'defaultValue':!![]},'downloadJscriptySessions':{'type':Sequelize[_0xc430('0x8')],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize[_0xc430('0x8')],'defaultValue':!![]},'downloadScreenRecordings':{'type':Sequelize[_0xc430('0x8')],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]}};
\ No newline at end of file
+var _0x9362=['BOOLEAN','STRING','name','setDataValue','crudPermissions','join','getDataValue'];(function(_0x37320f,_0x40ac81){var _0x341eff=function(_0x3904f9){while(--_0x3904f9){_0x37320f['push'](_0x37320f['shift']());}};_0x341eff(++_0x40ac81);}(_0x9362,0xa2));var _0x2936=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x9362[_0x14add3];return _0x4a174f;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x2936('0x0')],'allowNull':![],'unique':_0x2936('0x1')},'crudPermissions':{'type':Sequelize[_0x2936('0x0')],'set':function(_0x58ac99){this[_0x2936('0x2')](_0x2936('0x3'),_0x58ac99?_0x58ac99[_0x2936('0x4')](''):[]);},'get':function(){return this[_0x2936('0x5')](_0x2936('0x3'))?this['getDataValue'](_0x2936('0x3'))['split'](''):[];},'allowNull':![],'defaultValue':'r'},'description':{'type':Sequelize[_0x2936('0x0')],'allowNull':!![]},'privacyEnabled':{'type':Sequelize[_0x2936('0x6')],'defaultValue':![]},'downloadAttachments':{'type':Sequelize[_0x2936('0x6')],'defaultValue':!![]},'downloadCallySquareRecordings':{'type':Sequelize[_0x2936('0x6')],'defaultValue':!![]},'downloadContactManagerLists':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'downloadJscriptySessions':{'type':Sequelize[_0x2936('0x6')],'defaultValue':!![]},'downloadOmnichannelInteractions':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'downloadScreenRecordings':{'type':Sequelize[_0x2936('0x6')],'defaultValue':!![]},'downloadVoiceRecordings':{'type':Sequelize[_0x2936('0x6')],'defaultValue':!![]}};
\ No newline at end of file
index f976487..44785eb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1ca5=['sort','where','pick','filters','filter','VIRTUAL','options','includeAll','include','rows','catch','show','merge','find','create','body','clone','params','omit','updatedAt','crudPermissions','get','UserProfileSection','autoAssociation','UserProfileResource','findAll','createdAt','sectionId','userProfileId','Resources','describe','addSections','push','removeSections','ids','enabled','includes','isEmpty','subsections','findOne','Dashboard','forEach','Plugin','resourceId','addResources','sequelize','transaction','bulkCreate','removeResources','getResources','section','Missing\x20section\x20parameter','No\x20User\x20Profile\x20found\x20for\x20id\x20','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','path','sox','to-csv','fs-extra','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/license/util','../../mysqldb','redis','defaults','localhost','./userProfile.socket','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','apply','reject','save','update','then','destroy','error','stack','name','send','index','map','UserProfile','rawAttributes','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','nolimit'];(function(_0x202c7a,_0x3dca8e){var _0x11d0d7=function(_0x59c4b3){while(--_0x59c4b3){_0x202c7a['push'](_0x202c7a['shift']());}};_0x11d0d7(++_0x3dca8e);}(_0x1ca5,0x11d));var _0x51ca=function(_0x24df67,_0x3a3609){_0x24df67=_0x24df67-0x0;var _0x40ac31=_0x1ca5[_0x24df67];return _0x40ac31;};'use strict';var emlformat=require(_0x51ca('0x0'));var rimraf=require(_0x51ca('0x1'));var zipdir=require(_0x51ca('0x2'));var jsonpatch=require(_0x51ca('0x3'));var rp=require(_0x51ca('0x4'));var moment=require(_0x51ca('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x51ca('0x6'));var util=require('util');var path=require(_0x51ca('0x7'));var sox=require(_0x51ca('0x8'));var csv=require(_0x51ca('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x51ca('0xa'));var _=require('lodash');var squel=require(_0x51ca('0xb'));var crypto=require(_0x51ca('0xc'));var jsforce=require(_0x51ca('0xd'));var deskjs=require('desk.js');var toCsv=require(_0x51ca('0x9'));var querystring=require(_0x51ca('0xe'));var Papa=require(_0x51ca('0xf'));var Redis=require(_0x51ca('0x10'));var authService=require(_0x51ca('0x11'));var qs=require(_0x51ca('0x12'));var as=require(_0x51ca('0x13'));var hardwareService=require(_0x51ca('0x14'));var logger=require('../../config/logger')(_0x51ca('0x15'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x51ca('0x16'));var db=require(_0x51ca('0x17'))['db'];config[_0x51ca('0x18')]=_[_0x51ca('0x19')](config['redis'],{'host':_0x51ca('0x1a'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x51ca('0x1b'))['register'](socket);function respondWithStatusCode(_0x1e355d,_0x2a8237){_0x2a8237=_0x2a8237||0xcc;return function(_0x2c9bfa){if(_0x2c9bfa){return _0x1e355d[_0x51ca('0x1c')](_0x2a8237);}return _0x1e355d[_0x51ca('0x1d')](_0x2a8237)['end']();};}function respondWithResult(_0x155c0e,_0xd1663f){_0xd1663f=_0xd1663f||0xc8;return function(_0x4cdc38){if(_0x4cdc38){return _0x155c0e[_0x51ca('0x1d')](_0xd1663f)[_0x51ca('0x1e')](_0x4cdc38);}};}function respondWithFilteredResult(_0x1ca886,_0x309ca6){return function(_0x82e76){if(_0x82e76){var _0x293a9c=typeof _0x309ca6[_0x51ca('0x1f')]==='undefined'&&typeof _0x309ca6[_0x51ca('0x20')]===_0x51ca('0x21');var _0x375c65=_0x82e76['count'];var _0xefdf7d=_0x293a9c?0x0:_0x309ca6[_0x51ca('0x1f')];var _0x8f465=_0x293a9c?_0x82e76[_0x51ca('0x22')]:_0x309ca6['offset']+_0x309ca6[_0x51ca('0x20')];var _0x56aece;if(_0x8f465>=_0x375c65){_0x8f465=_0x375c65;_0x56aece=0xc8;}else{_0x56aece=0xce;}_0x1ca886['status'](_0x56aece);return _0x1ca886[_0x51ca('0x23')](_0x51ca('0x24'),_0xefdf7d+'-'+_0x8f465+'/'+_0x375c65)['json'](_0x82e76);}return null;};}function patchUpdates(_0x142ead){return function(_0x55e862){try{jsonpatch[_0x51ca('0x25')](_0x55e862,_0x142ead,!![]);}catch(_0x13ba0b){return BPromise[_0x51ca('0x26')](_0x13ba0b);}return _0x55e862[_0x51ca('0x27')]();};}function saveUpdates(_0x1a5c3e,_0x539427){return function(_0x105fb7){if(_0x105fb7){return _0x105fb7[_0x51ca('0x28')](_0x1a5c3e)[_0x51ca('0x29')](function(_0x14d8e4){return _0x14d8e4;});}return null;};}function removeEntity(_0xba7008,_0x660d40){return function(_0x19fcab){if(_0x19fcab){return _0x19fcab[_0x51ca('0x2a')]()[_0x51ca('0x29')](function(){_0xba7008['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x3cda1d,_0x1987ad){return function(_0x53cec7){if(!_0x53cec7){_0x3cda1d[_0x51ca('0x1c')](0x194);}return _0x53cec7;};}function handleError(_0x3adcb1,_0x5b8d40){_0x5b8d40=_0x5b8d40||0x1f4;return function(_0x459e6b){logger[_0x51ca('0x2b')](_0x459e6b[_0x51ca('0x2c')]);if(_0x459e6b[_0x51ca('0x2d')]){delete _0x459e6b[_0x51ca('0x2d')];}_0x3adcb1[_0x51ca('0x1d')](_0x5b8d40)[_0x51ca('0x2e')](_0x459e6b);};}exports[_0x51ca('0x2f')]=function(_0x519c8d,_0x4f057e){var _0x2d39fe={},_0x35387d={},_0x5b3f50={'count':0x0,'rows':[]};var _0x554129=_[_0x51ca('0x30')](db[_0x51ca('0x31')][_0x51ca('0x32')],function(_0x4cae98){return{'name':_0x4cae98[_0x51ca('0x33')],'type':_0x4cae98[_0x51ca('0x34')][_0x51ca('0x35')]};});_0x35387d[_0x51ca('0x36')]=_[_0x51ca('0x30')](_0x554129,'name');_0x35387d[_0x51ca('0x37')]=_[_0x51ca('0x38')](_0x519c8d[_0x51ca('0x37')]);_0x35387d['filters']=_[_0x51ca('0x39')](_0x35387d[_0x51ca('0x36')],_0x35387d[_0x51ca('0x37')]);_0x2d39fe[_0x51ca('0x3a')]=_[_0x51ca('0x39')](_0x35387d['model'],qs['fields'](_0x519c8d[_0x51ca('0x37')][_0x51ca('0x3b')]));_0x2d39fe[_0x51ca('0x3a')]=_0x2d39fe[_0x51ca('0x3a')][_0x51ca('0x3c')]?_0x2d39fe[_0x51ca('0x3a')]:_0x35387d[_0x51ca('0x36')];if(!_0x519c8d[_0x51ca('0x37')][_0x51ca('0x3d')](_0x51ca('0x3e'))){_0x2d39fe[_0x51ca('0x20')]=qs['limit'](_0x519c8d[_0x51ca('0x37')]['limit']);_0x2d39fe[_0x51ca('0x1f')]=qs['offset'](_0x519c8d['query'][_0x51ca('0x1f')]);}_0x2d39fe['order']=qs[_0x51ca('0x3f')](_0x519c8d[_0x51ca('0x37')][_0x51ca('0x3f')]);_0x2d39fe[_0x51ca('0x40')]=qs['filters'](_[_0x51ca('0x41')](_0x519c8d[_0x51ca('0x37')],_0x35387d[_0x51ca('0x42')]),_0x554129);if(_0x519c8d[_0x51ca('0x37')][_0x51ca('0x43')]){_0x2d39fe[_0x51ca('0x40')]=_['merge'](_0x2d39fe[_0x51ca('0x40')],{'$or':_['map'](_0x554129,function(_0x498e39){if(_0x498e39[_0x51ca('0x34')]!==_0x51ca('0x44')){var _0x25d3a7={};_0x25d3a7[_0x498e39[_0x51ca('0x2d')]]={'$like':'%'+_0x519c8d[_0x51ca('0x37')][_0x51ca('0x43')]+'%'};return _0x25d3a7;}})});}_0x2d39fe=_['merge']({},_0x2d39fe,_0x519c8d[_0x51ca('0x45')]);var _0x3bf244={'where':_0x2d39fe[_0x51ca('0x40')]};return db[_0x51ca('0x31')][_0x51ca('0x22')](_0x3bf244)[_0x51ca('0x29')](function(_0x3305ec){_0x5b3f50['count']=_0x3305ec;if(_0x519c8d[_0x51ca('0x37')][_0x51ca('0x46')]){_0x2d39fe[_0x51ca('0x47')]=[{'all':!![]}];}return db[_0x51ca('0x31')]['findAll'](_0x2d39fe);})[_0x51ca('0x29')](function(_0x419dd2){_0x5b3f50[_0x51ca('0x48')]=_0x419dd2;return _0x5b3f50;})[_0x51ca('0x29')](respondWithFilteredResult(_0x4f057e,_0x2d39fe))[_0x51ca('0x49')](handleError(_0x4f057e,null));};exports[_0x51ca('0x4a')]=function(_0x4ef96c,_0x52999){var _0x5679de={'raw':![],'where':{'id':_0x4ef96c['params']['id']}},_0x43f723={};_0x43f723[_0x51ca('0x36')]=_[_0x51ca('0x38')](db[_0x51ca('0x31')][_0x51ca('0x32')]);_0x43f723['query']=_[_0x51ca('0x38')](_0x4ef96c['query']);_0x43f723[_0x51ca('0x42')]=_[_0x51ca('0x39')](_0x43f723[_0x51ca('0x36')],_0x43f723[_0x51ca('0x37')]);_0x5679de['attributes']=_[_0x51ca('0x39')](_0x43f723['model'],qs[_0x51ca('0x3b')](_0x4ef96c[_0x51ca('0x37')][_0x51ca('0x3b')]));_0x5679de[_0x51ca('0x3a')]=_0x5679de[_0x51ca('0x3a')][_0x51ca('0x3c')]?_0x5679de[_0x51ca('0x3a')]:_0x43f723[_0x51ca('0x36')];if(_0x4ef96c['query'][_0x51ca('0x46')]){_0x5679de[_0x51ca('0x47')]=[{'all':!![]}];}_0x5679de=_[_0x51ca('0x4b')]({},_0x5679de,_0x4ef96c[_0x51ca('0x45')]);return db['UserProfile'][_0x51ca('0x4c')](_0x5679de)['then'](handleEntityNotFound(_0x52999,null))['then'](respondWithResult(_0x52999,null))[_0x51ca('0x49')](handleError(_0x52999,null));};exports[_0x51ca('0x4d')]=function(_0x27fd47,_0x4a855b){return db['UserProfile']['create'](_0x27fd47[_0x51ca('0x4e')],{})[_0x51ca('0x29')](respondWithResult(_0x4a855b,0xc9))[_0x51ca('0x49')](handleError(_0x4a855b,null));};exports[_0x51ca('0x4f')]=function(_0x3685ee,_0x4d0c16){var _0x54dd33={'where':{'id':_0x3685ee[_0x51ca('0x50')]['id']}},_0x131156={};_0x131156[_0x51ca('0x36')]=_[_0x51ca('0x38')](db[_0x51ca('0x31')][_0x51ca('0x32')]);_0x54dd33[_0x51ca('0x3a')]=_[_0x51ca('0x39')](_0x131156[_0x51ca('0x36')],qs[_0x51ca('0x3b')](_0x3685ee['query'][_0x51ca('0x3b')]));_0x54dd33[_0x51ca('0x3a')]=_0x54dd33[_0x51ca('0x3a')][_0x51ca('0x3c')]?_0x54dd33['attributes']:_0x131156[_0x51ca('0x36')];if(_0x3685ee[_0x51ca('0x37')][_0x51ca('0x46')]){_0x54dd33['include']=[{'all':!![]}];}_0x54dd33=_[_0x51ca('0x4b')]({},_0x54dd33,_0x3685ee[_0x51ca('0x45')]);return db['UserProfile'][_0x51ca('0x4c')](_0x54dd33)['then'](handleEntityNotFound(_0x4d0c16,null))[_0x51ca('0x29')](function(_0x55b30e){if(_0x55b30e){var _0x51c4b3=_0x55b30e['get']({'plain':!![]});_0x51c4b3=qs[_0x51ca('0x51')](_0x51c4b3,['id','createdAt',_0x51ca('0x52'),_0x51ca('0x53')]);_0x3685ee[_0x51ca('0x4e')]=_[_0x51ca('0x51')](_0x3685ee[_0x51ca('0x4e')],['id','createdAt','updatedAt']);return db['sequelize']['transaction'](function(_0x8f49f8){return db['UserProfile'][_0x51ca('0x4d')](_[_0x51ca('0x4b')](_0x51c4b3,_0x3685ee[_0x51ca('0x4e')]),{'include':_0x3685ee[_0x51ca('0x37')][_0x51ca('0x46')]?[{'all':!![]}]:undefined,'transaction':_0x8f49f8})[_0x51ca('0x29')](function(_0x2675d9){var _0x455d92=_0x2675d9[_0x51ca('0x54')]({'plain':!![]});return db[_0x51ca('0x55')]['findAll']({'where':{'userProfileId':_0x3685ee[_0x51ca('0x50')]['id']},'raw':!![]})['then'](function(_0x5608b9){if(_0x5608b9){return BPromise['each'](_0x5608b9,function(_0x4fdbee){return new BPromise(function(_0x4843d4,_0x1cd3f3){if(_0x4fdbee[_0x51ca('0x56')]===null||_0x4fdbee['autoAssociation']===0x1)_0x4843d4(null);return db[_0x51ca('0x57')][_0x51ca('0x58')]({'where':{'sectionId':_0x4fdbee['id']},'raw':!![]})[_0x51ca('0x29')](function(_0x4c0d2f){var _0x408047=_[_0x51ca('0x30')](_0x4c0d2f,function(_0x218fc4){return qs[_0x51ca('0x51')](_0x218fc4,['id',_0x51ca('0x59'),_0x51ca('0x52'),_0x51ca('0x5a')]);});_0x4843d4(_0x408047);})[_0x51ca('0x49')](function(_0x3fb3ac){_0x1cd3f3(_0x3fb3ac);});})[_0x51ca('0x29')](function(_0x213ad0){var _0x341d71=qs[_0x51ca('0x51')](_0x4fdbee,['id',_0x51ca('0x59'),'updatedAt']);_0x341d71[_0x51ca('0x5b')]=_0x455d92['id'];if(_0x213ad0)_0x341d71[_0x51ca('0x5c')]=_0x213ad0;return _0x341d71;})['then'](function(_0x2f768b){return db['UserProfileSection'][_0x51ca('0x4d')](_0x2f768b,{'include':[{'model':db[_0x51ca('0x57')],'as':_0x51ca('0x5c')}],'raw':!![],'transaction':_0x8f49f8});});})[_0x51ca('0x29')](function(){return _0x455d92;});}});});});}})['then'](respondWithResult(_0x4d0c16,0xc9))[_0x51ca('0x49')](handleError(_0x4d0c16,null));};exports['update']=function(_0x484609,_0xf820f){if(_0x484609['body']['id']){delete _0x484609[_0x51ca('0x4e')]['id'];}return db[_0x51ca('0x31')][_0x51ca('0x4c')]({'where':{'id':_0x484609['params']['id']}})[_0x51ca('0x29')](handleEntityNotFound(_0xf820f,null))[_0x51ca('0x29')](saveUpdates(_0x484609['body'],null))[_0x51ca('0x29')](respondWithResult(_0xf820f,null))[_0x51ca('0x49')](handleError(_0xf820f,null));};exports[_0x51ca('0x2a')]=function(_0x3c992f,_0x120e71){return db[_0x51ca('0x31')][_0x51ca('0x4c')]({'where':{'id':_0x3c992f['params']['id']}})[_0x51ca('0x29')](handleEntityNotFound(_0x120e71,null))['then'](removeEntity(_0x120e71,null))[_0x51ca('0x49')](handleError(_0x120e71,null));};exports['describe']=function(_0xb4fc6f,_0x6e597c){return db[_0x51ca('0x31')][_0x51ca('0x5d')]()[_0x51ca('0x29')](respondWithResult(_0x6e597c,null))[_0x51ca('0x49')](handleError(_0x6e597c,null));};exports[_0x51ca('0x5e')]=function(_0xa202c9,_0x2b4885){var _0x13c5ab=_0xa202c9[_0x51ca('0x4e')];return db['UserProfile'][_0x51ca('0x4c')]({'where':{'id':_0xa202c9[_0x51ca('0x50')]['id']}})['then'](handleEntityNotFound(_0x2b4885,null))['then'](function(_0x5ceafa){if(_0x5ceafa){return db['sequelize']['transaction'](function(_0x98d28d){return db[_0x51ca('0x55')][_0x51ca('0x2a')]({'where':{'userProfileId':_0xa202c9[_0x51ca('0x50')]['id'],'sectionId':_['map'](_0x13c5ab,function(_0x486e2f){return _0x486e2f['sectionId'];})},'transaction':_0x98d28d})[_0x51ca('0x29')](function(){var _0x489ff3=_[_0x51ca('0x30')](_0x13c5ab,function(_0x2d6ab0){_0x2d6ab0[_0x51ca('0x5b')]=_0xa202c9['params']['id'];return _0x2d6ab0;});var _0x1d5295=[];return BPromise['each'](_0x489ff3,function(_0x2959bb){return db[_0x51ca('0x55')]['create'](_0x2959bb,{'include':[{'model':db[_0x51ca('0x57')],'as':'Resources'}],'raw':!![],'transaction':_0x98d28d})[_0x51ca('0x29')](function(_0x5a5b59){_0x1d5295[_0x51ca('0x5f')](_0x5a5b59['get']({'plain':!![]}));});})[_0x51ca('0x29')](function(){return _0x1d5295;});});});}})['then'](function(_0x42b9cd){return _0x42b9cd;})[_0x51ca('0x29')](respondWithResult(_0x2b4885,null))[_0x51ca('0x49')](handleError(_0x2b4885,null));};exports[_0x51ca('0x60')]=function(_0x1331e4,_0x279f99){var _0x228100;return db[_0x51ca('0x31')][_0x51ca('0x4c')]({'where':{'id':_0x1331e4['params']['id']},'attributes':['id','name']})['then'](handleEntityNotFound(_0x279f99,null))['then'](function(_0x51b3a9){if(_0x51b3a9){_0x228100=_0x51b3a9;return db[_0x51ca('0x55')]['destroy']({'where':{'userProfileId':_0x1331e4[_0x51ca('0x50')]['id'],'sectionId':_0x1331e4[_0x51ca('0x37')][_0x51ca('0x61')]}});}})[_0x51ca('0x29')](function(){return _0x228100;})[_0x51ca('0x29')](respondWithStatusCode(_0x279f99,null))[_0x51ca('0x49')](handleError(_0x279f99,null));};exports['getSections']=function(_0x42157e,_0x245793){var _0x3e7c0c=[];var _0x51e5e6=[];return db[_0x51ca('0x55')][_0x51ca('0x58')]({'where':{'userProfileId':_0x42157e['params']['id']},'raw':!![]})['then'](function(_0x415a6a){_0x3e7c0c=_[_0x51ca('0x43')](_0x415a6a,function(_0x23618f){return _0x23618f[_0x51ca('0x62')]===0x1||_[_0x51ca('0x63')]([0x3eb,0x709],_0x23618f[_0x51ca('0x5a')]);});if(!_[_0x51ca('0x64')](_0x3e7c0c)){return _[_0x51ca('0x30')](_0x3e7c0c,function(_0xa956cc){return _0xa956cc['sectionId'];});}else{return;}})[_0x51ca('0x29')](function(_0x4075da){if(_0x4075da)_0x51e5e6=_0x4075da;if(_[_0x51ca('0x63')](_0x51e5e6,0x64)){var _0x445182=_[_0x51ca('0x4c')](_0x3e7c0c,{'sectionId':0x64});return hasDefaultDashboard(_0x445182)[_0x51ca('0x29')](function(_0x54ba2a){return _['map'](_0x3e7c0c,function(_0xdcf20d){if(_0xdcf20d[_0x51ca('0x5a')]===0x64){_0xdcf20d[_0x51ca('0x65')]=_0x54ba2a;}return _0xdcf20d;});});}else{return;}})[_0x51ca('0x29')](function(_0x5aa40e){if(_0x5aa40e)_0x3e7c0c=_0x5aa40e;if(_[_0x51ca('0x63')](_0x51e5e6,0x3eb)){var _0x43851e=_['find'](_0x3e7c0c,{'sectionId':0x3eb});return getCustomDashboards(_0x43851e)[_0x51ca('0x29')](function(_0x18857b){return _[_0x51ca('0x30')](_0x3e7c0c,function(_0x36b6ff){if(_0x43851e[_0x51ca('0x62')]){if(_0x36b6ff['sectionId']===0x3eb){_0x36b6ff[_0x51ca('0x65')]=_0x18857b;}}else{if(_0x36b6ff[_0x51ca('0x5a')]===0x64){if(!_0x36b6ff['subsections']){_0x36b6ff[_0x51ca('0x65')]=[];}_0x36b6ff['subsections']=_0x36b6ff[_0x51ca('0x65')]['concat'](_0x18857b);}}return _0x36b6ff;});});}else{return;}})[_0x51ca('0x29')](function(_0x37f4d5){if(_0x37f4d5)_0x3e7c0c=_0x37f4d5;if(_[_0x51ca('0x63')](_0x51e5e6,0x709)){var _0x200b46=_[_0x51ca('0x4c')](_0x3e7c0c,{'sectionId':0x709});return getPlugins(_0x200b46)[_0x51ca('0x29')](function(_0x35e095){if(_0x200b46[_0x51ca('0x62')]){return _['map'](_0x3e7c0c,function(_0x53c2db){if(_0x53c2db[_0x51ca('0x5a')]===0x709){_0x53c2db[_0x51ca('0x65')]=_0x35e095;}return _0x53c2db;});}else{var _0x3d82d5={'sectionId':0x76c,'enabled':0x1,'subsections':_0x35e095};var _0x42c3a8=_[_0x51ca('0x30')](_0x3e7c0c);_0x42c3a8['push'](_0x3d82d5);return _0x42c3a8;}});}else{return;}})[_0x51ca('0x29')](function(_0x2dfc93){if(_0x2dfc93)_0x3e7c0c=_0x2dfc93;return _['filter'](_0x3e7c0c,[_0x51ca('0x62'),0x1]);})[_0x51ca('0x29')](respondWithResult(_0x245793,null))[_0x51ca('0x49')](handleError(_0x245793,null));};function hasDefaultDashboard(_0x13b344){var _0x1ca918=[0x65];return new BPromise(function(_0x1f318a,_0x4b8440){try{if(_0x13b344[_0x51ca('0x56')]){_0x1f318a(_0x1ca918);}else{return db[_0x51ca('0x57')][_0x51ca('0x66')]({'where':{'sectionId':_0x13b344['id']},'raw':!![]})[_0x51ca('0x29')](function(_0x553361){_0x553361?_0x1f318a(_0x1ca918):_0x1f318a();});}}catch(_0x4cfbe9){_0x4b8440(_0x4cfbe9);}});}function getCustomDashboards(_0x15a58b){var _0x27f420=[];return new BPromise(function(_0x3630cf,_0x52b12b){try{if(_0x15a58b['autoAssociation']){return db[_0x51ca('0x67')][_0x51ca('0x58')]({'raw':!![]})[_0x51ca('0x29')](function(_0x403db7){_0x403db7[_0x51ca('0x68')](function(_0x6046b6){_0x27f420[_0x51ca('0x5f')](_0x6046b6['id']+0x1869f);});_0x3630cf(_0x27f420);});}else{return db[_0x51ca('0x57')][_0x51ca('0x58')]({'where':{'sectionId':_0x15a58b['id']},'raw':!![]})[_0x51ca('0x29')](function(_0x5b28c9){_0x5b28c9[_0x51ca('0x68')](function(_0x44acbe){_0x27f420[_0x51ca('0x5f')](_0x44acbe['resourceId']+0x1869f);});_0x3630cf(_0x27f420);});}}catch(_0x9b2054){_0x52b12b(_0x9b2054);}});}function getPlugins(_0x1092b0){var _0x3f2e5f=[];return new BPromise(function(_0xf14775,_0x54b32c){try{if(_0x1092b0[_0x51ca('0x56')]){return db[_0x51ca('0x69')][_0x51ca('0x58')]({'raw':!![]})[_0x51ca('0x29')](function(_0x452271){_0x452271[_0x51ca('0x68')](function(_0x490daf){_0x3f2e5f['push'](_0x490daf['id']+0x15b38);});_0xf14775(_0x3f2e5f);});}else{return db[_0x51ca('0x57')][_0x51ca('0x58')]({'where':{'sectionId':_0x1092b0['id']},'raw':!![]})[_0x51ca('0x29')](function(_0x128bf4){_0x128bf4['forEach'](function(_0x41d669){_0x3f2e5f[_0x51ca('0x5f')](_0x41d669[_0x51ca('0x6a')]+0x15b38);});_0xf14775(_0x3f2e5f);});}}catch(_0x41ea53){_0x54b32c(_0x41ea53);}});}exports[_0x51ca('0x6b')]=function(_0x5beecb,_0x37ffe3){return db['UserProfile'][_0x51ca('0x4c')]({'where':{'id':_0x5beecb['params']['id']}})[_0x51ca('0x29')](handleEntityNotFound(_0x37ffe3,null))[_0x51ca('0x29')](function(_0x50d346){if(_0x50d346){return db[_0x51ca('0x6c')][_0x51ca('0x6d')](function(_0x1b4ebb){return db[_0x51ca('0x55')][_0x51ca('0x58')]({'where':{'userProfileId':_0x5beecb['params']['id']},'attributes':['id'],'raw':!![]})[_0x51ca('0x29')](function(_0x1a8037){if(_0x1a8037){return db[_0x51ca('0x55')]['destroy']({'where':{'userProfileId':_0x5beecb[_0x51ca('0x50')]['id'],'id':_['map'](_0x1a8037,function(_0x3f893a){return _0x3f893a['id'];})},'transaction':_0x1b4ebb});}})[_0x51ca('0x29')](function(_0x3f1b82){var _0x3dda59=_[_0x51ca('0x30')](_0x5beecb[_0x51ca('0x4e')],function(_0x486c06){_0x486c06[_0x51ca('0x5b')]=_0x5beecb[_0x51ca('0x50')]['id'];return _0x486c06;});return db['UserProfileSection'][_0x51ca('0x6e')](_0x3dda59,{'raw':!![],'transaction':_0x1b4ebb});})[_0x51ca('0x29')](function(_0x1c0a33){var _0x401e8e=_[_0x51ca('0x43')](_[_0x51ca('0x30')](_0x1c0a33,function(_0x423b30){return _0x423b30[_0x51ca('0x54')]({'plain':!![]});}),{'includeAll':![]});if(_0x401e8e){return db[_0x51ca('0x55')][_0x51ca('0x58')]({'where':{'userProfileId':_0x5beecb[_0x51ca('0x50')]['id'],'sectionId':_[_0x51ca('0x30')](_0x401e8e,function(_0xe77e2d){return _0xe77e2d[_0x51ca('0x5a')];})},'attributes':['id',_0x51ca('0x5a')],'raw':!![]})[_0x51ca('0x29')](function(_0x4fc660){var _0xed8414=_[_0x51ca('0x30')](_0x5beecb[_0x51ca('0x4e')],function(_0x40c1dc){_0x40c1dc[_0x51ca('0x5b')]=_0x5beecb[_0x51ca('0x50')]['id'];return _0x40c1dc;});return db[_0x51ca('0x57')]['bulkCreate'](_0xed8414,{'raw':!![],'transaction':_0x1b4ebb});});}})[_0x51ca('0x49')](handleError(_0x37ffe3,null));});}})[_0x51ca('0x29')](function(_0x4ed5b4){var _0x2926eb=_[_0x51ca('0x30')](_0x4ed5b4,function(_0x2986ee){return _0x2986ee[_0x51ca('0x54')]({'plain':!![]});});})[_0x51ca('0x29')](respondWithResult(_0x37ffe3,null))[_0x51ca('0x49')](handleError(_0x37ffe3,null));};exports['removeResources']=function(_0x1cdffe,_0x2459d8,_0x4ed700){return db[_0x51ca('0x31')][_0x51ca('0x4c')]({'where':{'id':_0x1cdffe['params']['id']}})[_0x51ca('0x29')](handleEntityNotFound(_0x2459d8,null))['then'](function(_0xf06821){if(_0xf06821){return _0xf06821[_0x51ca('0x6f')](_0x1cdffe[_0x51ca('0x37')][_0x51ca('0x61')]);}})[_0x51ca('0x29')](respondWithStatusCode(_0x2459d8,null))[_0x51ca('0x49')](handleError(_0x2459d8,null));};exports[_0x51ca('0x70')]=function(_0x309fe8,_0x200df8){var _0x3dcde2={};if(!_0x309fe8[_0x51ca('0x37')][_0x51ca('0x71')])throw new Error(_0x51ca('0x72'));if(!_0x309fe8[_0x51ca('0x37')][_0x51ca('0x3d')](_0x51ca('0x3e'))){_0x3dcde2[_0x51ca('0x20')]=qs[_0x51ca('0x20')](_0x309fe8[_0x51ca('0x37')][_0x51ca('0x20')]);_0x3dcde2[_0x51ca('0x1f')]=qs['offset'](_0x309fe8[_0x51ca('0x37')][_0x51ca('0x1f')]);}return db['UserProfile'][_0x51ca('0x4c')]({'where':{'id':_0x309fe8['params']['id']}})['then'](function(_0x5e02b6){if(!_0x5e02b6)throw new Error(_0x51ca('0x73')+_0x309fe8[_0x51ca('0x50')]['id']);return db['UserProfile']['getResources'](_0x309fe8);})[_0x51ca('0x29')](respondWithFilteredResult(_0x200df8,_0x3dcde2))[_0x51ca('0x49')](handleError(_0x200df8,null));};
\ No newline at end of file
+var _0xede2=['stack','name','send','index','map','rawAttributes','fieldName','type','key','model','keys','query','filters','intersection','fields','attributes','length','hasOwnProperty','order','sort','pick','filter','merge','where','VIRTUAL','options','UserProfile','includeAll','include','findAll','rows','show','params','find','catch','create','body','clone','get','omit','createdAt','updatedAt','crudPermissions','sequelize','transaction','autoAssociation','sectionId','userProfileId','Resources','UserProfileResource','update','destroy','describe','addSections','UserProfileSection','each','removeSections','ids','getSections','enabled','isEmpty','subsections','includes','concat','push','findOne','Dashboard','forEach','resourceId','Plugin','addResources','bulkCreate','removeResources','getResources','section','Missing\x20section\x20parameter','nolimit','No\x20User\x20Profile\x20found\x20for\x20id\x20','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','util','path','sox','fs-extra','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','localhost','socket.io-emitter','./userProfile.socket','sendStatus','end','status','offset','undefined','limit','count','Content-Range','json','apply','reject','then','error'];(function(_0x13ee7b,_0x118ca9){var _0x153c52=function(_0x2c4014){while(--_0x2c4014){_0x13ee7b['push'](_0x13ee7b['shift']());}};_0x153c52(++_0x118ca9);}(_0xede2,0x142));var _0x2ede=function(_0x25f99c,_0x31269f){_0x25f99c=_0x25f99c-0x0;var _0x1ea795=_0xede2[_0x25f99c];return _0x1ea795;};'use strict';var emlformat=require(_0x2ede('0x0'));var rimraf=require(_0x2ede('0x1'));var zipdir=require(_0x2ede('0x2'));var jsonpatch=require(_0x2ede('0x3'));var rp=require(_0x2ede('0x4'));var moment=require('moment');var BPromise=require(_0x2ede('0x5'));var Mustache=require('mustache');var util=require(_0x2ede('0x6'));var path=require(_0x2ede('0x7'));var sox=require(_0x2ede('0x8'));var csv=require('to-csv');var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x2ede('0x9'));var _=require('lodash');var squel=require(_0x2ede('0xa'));var crypto=require(_0x2ede('0xb'));var jsforce=require(_0x2ede('0xc'));var deskjs=require(_0x2ede('0xd'));var toCsv=require(_0x2ede('0xe'));var querystring=require(_0x2ede('0xf'));var Papa=require(_0x2ede('0x10'));var Redis=require(_0x2ede('0x11'));var authService=require(_0x2ede('0x12'));var qs=require(_0x2ede('0x13'));var as=require(_0x2ede('0x14'));var hardwareService=require(_0x2ede('0x15'));var logger=require('../../config/logger')(_0x2ede('0x16'));var utils=require(_0x2ede('0x17'));var config=require(_0x2ede('0x18'));var licenseUtil=require(_0x2ede('0x19'));var db=require(_0x2ede('0x1a'))['db'];config[_0x2ede('0x1b')]=_['defaults'](config[_0x2ede('0x1b')],{'host':_0x2ede('0x1c'),'port':0x18eb});var socket=require(_0x2ede('0x1d'))(new Redis(config[_0x2ede('0x1b')]));require(_0x2ede('0x1e'))['register'](socket);function respondWithStatusCode(_0x5d9488,_0x54c274){_0x54c274=_0x54c274||0xcc;return function(_0x24203f){if(_0x24203f){return _0x5d9488[_0x2ede('0x1f')](_0x54c274);}return _0x5d9488['status'](_0x54c274)[_0x2ede('0x20')]();};}function respondWithResult(_0x453733,_0x4648e4){_0x4648e4=_0x4648e4||0xc8;return function(_0x1831d7){if(_0x1831d7){return _0x453733[_0x2ede('0x21')](_0x4648e4)['json'](_0x1831d7);}};}function respondWithFilteredResult(_0x4c3f96,_0x18dc5f){return function(_0xa641ef){if(_0xa641ef){var _0x5cd393=typeof _0x18dc5f[_0x2ede('0x22')]===_0x2ede('0x23')&&typeof _0x18dc5f[_0x2ede('0x24')]===_0x2ede('0x23');var _0xa745d=_0xa641ef['count'];var _0x41ca46=_0x5cd393?0x0:_0x18dc5f[_0x2ede('0x22')];var _0x355bc5=_0x5cd393?_0xa641ef[_0x2ede('0x25')]:_0x18dc5f[_0x2ede('0x22')]+_0x18dc5f[_0x2ede('0x24')];var _0x45558b;if(_0x355bc5>=_0xa745d){_0x355bc5=_0xa745d;_0x45558b=0xc8;}else{_0x45558b=0xce;}_0x4c3f96[_0x2ede('0x21')](_0x45558b);return _0x4c3f96['set'](_0x2ede('0x26'),_0x41ca46+'-'+_0x355bc5+'/'+_0xa745d)[_0x2ede('0x27')](_0xa641ef);}return null;};}function patchUpdates(_0x985028){return function(_0x523379){try{jsonpatch[_0x2ede('0x28')](_0x523379,_0x985028,!![]);}catch(_0x5894ee){return BPromise[_0x2ede('0x29')](_0x5894ee);}return _0x523379['save']();};}function saveUpdates(_0x2abf8e,_0x4d9ac5){return function(_0x1d4a04){if(_0x1d4a04){return _0x1d4a04['update'](_0x2abf8e)[_0x2ede('0x2a')](function(_0x51bbc8){return _0x51bbc8;});}return null;};}function removeEntity(_0x2ca73b,_0x4aa6c8){return function(_0x19f581){if(_0x19f581){return _0x19f581['destroy']()[_0x2ede('0x2a')](function(){_0x2ca73b[_0x2ede('0x21')](0xcc)[_0x2ede('0x20')]();});}};}function handleEntityNotFound(_0x28aa81,_0x56f81f){return function(_0x2db5bf){if(!_0x2db5bf){_0x28aa81[_0x2ede('0x1f')](0x194);}return _0x2db5bf;};}function handleError(_0x980121,_0x34e361){_0x34e361=_0x34e361||0x1f4;return function(_0x50e2bc){logger[_0x2ede('0x2b')](_0x50e2bc[_0x2ede('0x2c')]);if(_0x50e2bc['name']){delete _0x50e2bc[_0x2ede('0x2d')];}_0x980121[_0x2ede('0x21')](_0x34e361)[_0x2ede('0x2e')](_0x50e2bc);};}exports[_0x2ede('0x2f')]=function(_0x4cba56,_0xefae3d){var _0xe280fc={},_0x5b8775={},_0x16bcf2={'count':0x0,'rows':[]};var _0x2900e4=_[_0x2ede('0x30')](db['UserProfile'][_0x2ede('0x31')],function(_0x43f71d){return{'name':_0x43f71d[_0x2ede('0x32')],'type':_0x43f71d[_0x2ede('0x33')][_0x2ede('0x34')]};});_0x5b8775[_0x2ede('0x35')]=_[_0x2ede('0x30')](_0x2900e4,_0x2ede('0x2d'));_0x5b8775['query']=_[_0x2ede('0x36')](_0x4cba56[_0x2ede('0x37')]);_0x5b8775[_0x2ede('0x38')]=_[_0x2ede('0x39')](_0x5b8775[_0x2ede('0x35')],_0x5b8775[_0x2ede('0x37')]);_0xe280fc['attributes']=_[_0x2ede('0x39')](_0x5b8775[_0x2ede('0x35')],qs[_0x2ede('0x3a')](_0x4cba56[_0x2ede('0x37')][_0x2ede('0x3a')]));_0xe280fc['attributes']=_0xe280fc[_0x2ede('0x3b')][_0x2ede('0x3c')]?_0xe280fc[_0x2ede('0x3b')]:_0x5b8775[_0x2ede('0x35')];if(!_0x4cba56[_0x2ede('0x37')][_0x2ede('0x3d')]('nolimit')){_0xe280fc[_0x2ede('0x24')]=qs['limit'](_0x4cba56['query'][_0x2ede('0x24')]);_0xe280fc[_0x2ede('0x22')]=qs[_0x2ede('0x22')](_0x4cba56[_0x2ede('0x37')]['offset']);}_0xe280fc[_0x2ede('0x3e')]=qs['sort'](_0x4cba56['query'][_0x2ede('0x3f')]);_0xe280fc['where']=qs['filters'](_[_0x2ede('0x40')](_0x4cba56[_0x2ede('0x37')],_0x5b8775[_0x2ede('0x38')]),_0x2900e4);if(_0x4cba56[_0x2ede('0x37')][_0x2ede('0x41')]){_0xe280fc['where']=_[_0x2ede('0x42')](_0xe280fc[_0x2ede('0x43')],{'$or':_[_0x2ede('0x30')](_0x2900e4,function(_0x5dca5){if(_0x5dca5[_0x2ede('0x33')]!==_0x2ede('0x44')){var _0x3240cb={};_0x3240cb[_0x5dca5[_0x2ede('0x2d')]]={'$like':'%'+_0x4cba56[_0x2ede('0x37')][_0x2ede('0x41')]+'%'};return _0x3240cb;}})});}_0xe280fc=_['merge']({},_0xe280fc,_0x4cba56[_0x2ede('0x45')]);var _0x2bfb89={'where':_0xe280fc['where']};return db[_0x2ede('0x46')][_0x2ede('0x25')](_0x2bfb89)[_0x2ede('0x2a')](function(_0x404e52){_0x16bcf2[_0x2ede('0x25')]=_0x404e52;if(_0x4cba56['query'][_0x2ede('0x47')]){_0xe280fc[_0x2ede('0x48')]=[{'all':!![]}];}return db[_0x2ede('0x46')][_0x2ede('0x49')](_0xe280fc);})[_0x2ede('0x2a')](function(_0x2ddea2){_0x16bcf2[_0x2ede('0x4a')]=_0x2ddea2;return _0x16bcf2;})[_0x2ede('0x2a')](respondWithFilteredResult(_0xefae3d,_0xe280fc))['catch'](handleError(_0xefae3d,null));};exports[_0x2ede('0x4b')]=function(_0x58456b,_0x2debd8){var _0x60ef39={'raw':![],'where':{'id':_0x58456b[_0x2ede('0x4c')]['id']}},_0x139a68={};_0x139a68[_0x2ede('0x35')]=_['keys'](db[_0x2ede('0x46')][_0x2ede('0x31')]);_0x139a68['query']=_[_0x2ede('0x36')](_0x58456b[_0x2ede('0x37')]);_0x139a68['filters']=_[_0x2ede('0x39')](_0x139a68[_0x2ede('0x35')],_0x139a68[_0x2ede('0x37')]);_0x60ef39['attributes']=_[_0x2ede('0x39')](_0x139a68[_0x2ede('0x35')],qs[_0x2ede('0x3a')](_0x58456b[_0x2ede('0x37')][_0x2ede('0x3a')]));_0x60ef39['attributes']=_0x60ef39['attributes'][_0x2ede('0x3c')]?_0x60ef39['attributes']:_0x139a68[_0x2ede('0x35')];if(_0x58456b[_0x2ede('0x37')][_0x2ede('0x47')]){_0x60ef39[_0x2ede('0x48')]=[{'all':!![]}];}_0x60ef39=_[_0x2ede('0x42')]({},_0x60ef39,_0x58456b[_0x2ede('0x45')]);return db[_0x2ede('0x46')][_0x2ede('0x4d')](_0x60ef39)[_0x2ede('0x2a')](handleEntityNotFound(_0x2debd8,null))[_0x2ede('0x2a')](respondWithResult(_0x2debd8,null))[_0x2ede('0x4e')](handleError(_0x2debd8,null));};exports['create']=function(_0x48cd77,_0xeee5e4){return db[_0x2ede('0x46')][_0x2ede('0x4f')](_0x48cd77[_0x2ede('0x50')],{})[_0x2ede('0x2a')](respondWithResult(_0xeee5e4,0xc9))[_0x2ede('0x4e')](handleError(_0xeee5e4,null));};exports[_0x2ede('0x51')]=function(_0x2f350b,_0x3994b8){var _0x395e59={'where':{'id':_0x2f350b[_0x2ede('0x4c')]['id']}},_0xd11e9f={};_0xd11e9f['model']=_[_0x2ede('0x36')](db[_0x2ede('0x46')][_0x2ede('0x31')]);_0x395e59[_0x2ede('0x3b')]=_[_0x2ede('0x39')](_0xd11e9f['model'],qs[_0x2ede('0x3a')](_0x2f350b['query'][_0x2ede('0x3a')]));_0x395e59[_0x2ede('0x3b')]=_0x395e59[_0x2ede('0x3b')][_0x2ede('0x3c')]?_0x395e59[_0x2ede('0x3b')]:_0xd11e9f[_0x2ede('0x35')];if(_0x2f350b['query']['includeAll']){_0x395e59[_0x2ede('0x48')]=[{'all':!![]}];}_0x395e59=_[_0x2ede('0x42')]({},_0x395e59,_0x2f350b['options']);return db['UserProfile'][_0x2ede('0x4d')](_0x395e59)[_0x2ede('0x2a')](handleEntityNotFound(_0x3994b8,null))[_0x2ede('0x2a')](function(_0x221b5b){if(_0x221b5b){var _0x9fc7d8=_0x221b5b[_0x2ede('0x52')]({'plain':!![]});_0x9fc7d8=qs[_0x2ede('0x53')](_0x9fc7d8,['id',_0x2ede('0x54'),_0x2ede('0x55'),_0x2ede('0x56')]);_0x2f350b[_0x2ede('0x50')]=_[_0x2ede('0x53')](_0x2f350b[_0x2ede('0x50')],['id',_0x2ede('0x54'),_0x2ede('0x55')]);return db[_0x2ede('0x57')][_0x2ede('0x58')](function(_0xae0402){return db[_0x2ede('0x46')][_0x2ede('0x4f')](_[_0x2ede('0x42')](_0x9fc7d8,_0x2f350b[_0x2ede('0x50')]),{'include':_0x2f350b[_0x2ede('0x37')]['includeAll']?[{'all':!![]}]:undefined,'transaction':_0xae0402})[_0x2ede('0x2a')](function(_0x1bf3da){var _0x57c49c=_0x1bf3da['get']({'plain':!![]});return db['UserProfileSection']['findAll']({'where':{'userProfileId':_0x2f350b['params']['id']},'raw':!![]})[_0x2ede('0x2a')](function(_0x1bf0a7){if(_0x1bf0a7){return BPromise['each'](_0x1bf0a7,function(_0x26fdd7){return new BPromise(function(_0x56ba83,_0x17f60d){if(_0x26fdd7['autoAssociation']===null||_0x26fdd7[_0x2ede('0x59')]===0x1)_0x56ba83(null);return db['UserProfileResource']['findAll']({'where':{'sectionId':_0x26fdd7['id']},'raw':!![]})[_0x2ede('0x2a')](function(_0x2cc94d){var _0x2f2f57=_[_0x2ede('0x30')](_0x2cc94d,function(_0x39f5b6){return qs['omit'](_0x39f5b6,['id',_0x2ede('0x54'),_0x2ede('0x55'),_0x2ede('0x5a')]);});_0x56ba83(_0x2f2f57);})[_0x2ede('0x4e')](function(_0x310100){_0x17f60d(_0x310100);});})[_0x2ede('0x2a')](function(_0x263b5f){var _0x44a845=qs[_0x2ede('0x53')](_0x26fdd7,['id','createdAt',_0x2ede('0x55')]);_0x44a845[_0x2ede('0x5b')]=_0x57c49c['id'];if(_0x263b5f)_0x44a845[_0x2ede('0x5c')]=_0x263b5f;return _0x44a845;})[_0x2ede('0x2a')](function(_0x4db83c){return db['UserProfileSection'][_0x2ede('0x4f')](_0x4db83c,{'include':[{'model':db[_0x2ede('0x5d')],'as':'Resources'}],'raw':!![],'transaction':_0xae0402});});})[_0x2ede('0x2a')](function(){return _0x57c49c;});}});});});}})[_0x2ede('0x2a')](respondWithResult(_0x3994b8,0xc9))[_0x2ede('0x4e')](handleError(_0x3994b8,null));};exports[_0x2ede('0x5e')]=function(_0x35dadf,_0x5aaa4b){if(_0x35dadf[_0x2ede('0x50')]['id']){delete _0x35dadf[_0x2ede('0x50')]['id'];}return db['UserProfile'][_0x2ede('0x4d')]({'where':{'id':_0x35dadf['params']['id']}})[_0x2ede('0x2a')](handleEntityNotFound(_0x5aaa4b,null))[_0x2ede('0x2a')](saveUpdates(_0x35dadf[_0x2ede('0x50')],null))[_0x2ede('0x2a')](respondWithResult(_0x5aaa4b,null))['catch'](handleError(_0x5aaa4b,null));};exports[_0x2ede('0x5f')]=function(_0x1ca7e0,_0x1f4362){return db[_0x2ede('0x46')][_0x2ede('0x4d')]({'where':{'id':_0x1ca7e0[_0x2ede('0x4c')]['id']}})[_0x2ede('0x2a')](handleEntityNotFound(_0x1f4362,null))[_0x2ede('0x2a')](removeEntity(_0x1f4362,null))[_0x2ede('0x4e')](handleError(_0x1f4362,null));};exports[_0x2ede('0x60')]=function(_0x220f52,_0x3cddf0){return db[_0x2ede('0x46')][_0x2ede('0x60')]()[_0x2ede('0x2a')](respondWithResult(_0x3cddf0,null))[_0x2ede('0x4e')](handleError(_0x3cddf0,null));};exports[_0x2ede('0x61')]=function(_0x16197e,_0x3693c6){var _0x28024a=_0x16197e['body'];return db[_0x2ede('0x46')][_0x2ede('0x4d')]({'where':{'id':_0x16197e[_0x2ede('0x4c')]['id']}})[_0x2ede('0x2a')](handleEntityNotFound(_0x3693c6,null))[_0x2ede('0x2a')](function(_0x5e4bf1){if(_0x5e4bf1){return db[_0x2ede('0x57')][_0x2ede('0x58')](function(_0x5e0511){return db[_0x2ede('0x62')][_0x2ede('0x5f')]({'where':{'userProfileId':_0x16197e['params']['id'],'sectionId':_['map'](_0x28024a,function(_0x552a2c){return _0x552a2c[_0x2ede('0x5a')];})},'transaction':_0x5e0511})['then'](function(){var _0x4ee835=_[_0x2ede('0x30')](_0x28024a,function(_0x13f93c){_0x13f93c['userProfileId']=_0x16197e[_0x2ede('0x4c')]['id'];return _0x13f93c;});var _0xbe1575=[];return BPromise[_0x2ede('0x63')](_0x4ee835,function(_0x57009b){return db['UserProfileSection'][_0x2ede('0x4f')](_0x57009b,{'include':[{'model':db['UserProfileResource'],'as':_0x2ede('0x5c')}],'raw':!![],'transaction':_0x5e0511})[_0x2ede('0x2a')](function(_0x1cb6ae){_0xbe1575['push'](_0x1cb6ae[_0x2ede('0x52')]({'plain':!![]}));});})[_0x2ede('0x2a')](function(){return _0xbe1575;});});});}})['then'](function(_0x2ad3b7){return _0x2ad3b7;})[_0x2ede('0x2a')](respondWithResult(_0x3693c6,null))['catch'](handleError(_0x3693c6,null));};exports[_0x2ede('0x64')]=function(_0x2222c8,_0x1c5342){var _0x526c30;return db[_0x2ede('0x46')]['find']({'where':{'id':_0x2222c8[_0x2ede('0x4c')]['id']},'attributes':['id','name']})[_0x2ede('0x2a')](handleEntityNotFound(_0x1c5342,null))[_0x2ede('0x2a')](function(_0x5090f0){if(_0x5090f0){_0x526c30=_0x5090f0;return db[_0x2ede('0x62')]['destroy']({'where':{'userProfileId':_0x2222c8[_0x2ede('0x4c')]['id'],'sectionId':_0x2222c8[_0x2ede('0x37')][_0x2ede('0x65')]}});}})[_0x2ede('0x2a')](function(){return _0x526c30;})[_0x2ede('0x2a')](respondWithStatusCode(_0x1c5342,null))[_0x2ede('0x4e')](handleError(_0x1c5342,null));};exports[_0x2ede('0x66')]=function(_0x1990e2,_0xf174d7){var _0xf5ab9d=[];var _0x8f4c99=[];return db[_0x2ede('0x62')][_0x2ede('0x49')]({'where':{'userProfileId':_0x1990e2['params']['id']},'raw':!![]})[_0x2ede('0x2a')](function(_0x5bf3b2){_0xf5ab9d=_[_0x2ede('0x41')](_0x5bf3b2,function(_0xd12005){return _0xd12005[_0x2ede('0x67')]===0x1||_['includes']([0x3eb,0x709],_0xd12005[_0x2ede('0x5a')]);});if(!_[_0x2ede('0x68')](_0xf5ab9d)){return _[_0x2ede('0x30')](_0xf5ab9d,function(_0x1cef6a){return _0x1cef6a[_0x2ede('0x5a')];});}else{return;}})[_0x2ede('0x2a')](function(_0x531335){if(_0x531335)_0x8f4c99=_0x531335;if(_['includes'](_0x8f4c99,0x64)){var _0x4a1070=_[_0x2ede('0x4d')](_0xf5ab9d,{'sectionId':0x64});return hasDefaultDashboard(_0x4a1070)[_0x2ede('0x2a')](function(_0x26df8b){return _[_0x2ede('0x30')](_0xf5ab9d,function(_0x5acedd){if(_0x5acedd[_0x2ede('0x5a')]===0x64){_0x5acedd[_0x2ede('0x69')]=_0x26df8b;}return _0x5acedd;});});}else{return;}})[_0x2ede('0x2a')](function(_0x30e8e9){if(_0x30e8e9)_0xf5ab9d=_0x30e8e9;if(_[_0x2ede('0x6a')](_0x8f4c99,0x3eb)){var _0x26664b=_[_0x2ede('0x4d')](_0xf5ab9d,{'sectionId':0x3eb});return getCustomDashboards(_0x26664b)[_0x2ede('0x2a')](function(_0x1b629e){return _[_0x2ede('0x30')](_0xf5ab9d,function(_0x56fa73){if(_0x26664b[_0x2ede('0x67')]){if(_0x56fa73[_0x2ede('0x5a')]===0x3eb){_0x56fa73[_0x2ede('0x69')]=_0x1b629e;}}else{if(_0x56fa73[_0x2ede('0x5a')]===0x64){if(!_0x56fa73[_0x2ede('0x69')]){_0x56fa73[_0x2ede('0x69')]=[];}_0x56fa73['subsections']=_0x56fa73[_0x2ede('0x69')][_0x2ede('0x6b')](_0x1b629e);}}return _0x56fa73;});});}else{return;}})['then'](function(_0x4a2946){if(_0x4a2946)_0xf5ab9d=_0x4a2946;if(_['includes'](_0x8f4c99,0x709)){var _0x34a049=_[_0x2ede('0x4d')](_0xf5ab9d,{'sectionId':0x709});return getPlugins(_0x34a049)[_0x2ede('0x2a')](function(_0x463d4e){if(_0x34a049[_0x2ede('0x67')]){return _[_0x2ede('0x30')](_0xf5ab9d,function(_0x57871d){if(_0x57871d[_0x2ede('0x5a')]===0x709){_0x57871d[_0x2ede('0x69')]=_0x463d4e;}return _0x57871d;});}else{var _0x1aede4={'sectionId':0x76c,'enabled':0x1,'subsections':_0x463d4e};var _0x4ca6d8=_[_0x2ede('0x30')](_0xf5ab9d);_0x4ca6d8[_0x2ede('0x6c')](_0x1aede4);return _0x4ca6d8;}});}else{return;}})[_0x2ede('0x2a')](function(_0x432978){if(_0x432978)_0xf5ab9d=_0x432978;return _[_0x2ede('0x41')](_0xf5ab9d,[_0x2ede('0x67'),0x1]);})[_0x2ede('0x2a')](respondWithResult(_0xf174d7,null))[_0x2ede('0x4e')](handleError(_0xf174d7,null));};function hasDefaultDashboard(_0x4041d1){var _0x401202=[0x65];return new BPromise(function(_0x304579,_0x248eec){try{if(_0x4041d1[_0x2ede('0x59')]){_0x304579(_0x401202);}else{return db[_0x2ede('0x5d')][_0x2ede('0x6d')]({'where':{'sectionId':_0x4041d1['id']},'raw':!![]})[_0x2ede('0x2a')](function(_0x4a6a5c){_0x4a6a5c?_0x304579(_0x401202):_0x304579();});}}catch(_0x49d34a){_0x248eec(_0x49d34a);}});}function getCustomDashboards(_0x5a8fec){var _0x14fb7f=[];return new BPromise(function(_0x1b3d42,_0x3cdac8){try{if(_0x5a8fec[_0x2ede('0x59')]){return db[_0x2ede('0x6e')][_0x2ede('0x49')]({'raw':!![]})[_0x2ede('0x2a')](function(_0x5d82d3){_0x5d82d3[_0x2ede('0x6f')](function(_0x1fce35){_0x14fb7f[_0x2ede('0x6c')](_0x1fce35['id']+0x1869f);});_0x1b3d42(_0x14fb7f);});}else{return db[_0x2ede('0x5d')]['findAll']({'where':{'sectionId':_0x5a8fec['id']},'raw':!![]})['then'](function(_0x243172){_0x243172[_0x2ede('0x6f')](function(_0x49d219){_0x14fb7f[_0x2ede('0x6c')](_0x49d219[_0x2ede('0x70')]+0x1869f);});_0x1b3d42(_0x14fb7f);});}}catch(_0x1f9a9b){_0x3cdac8(_0x1f9a9b);}});}function getPlugins(_0x14a403){var _0x42cc82=[];return new BPromise(function(_0x44b2cb,_0x2045f4){try{if(_0x14a403[_0x2ede('0x59')]){return db[_0x2ede('0x71')][_0x2ede('0x49')]({'raw':!![]})[_0x2ede('0x2a')](function(_0xaa0157){_0xaa0157[_0x2ede('0x6f')](function(_0x518fef){_0x42cc82['push'](_0x518fef['id']+0x15b38);});_0x44b2cb(_0x42cc82);});}else{return db[_0x2ede('0x5d')]['findAll']({'where':{'sectionId':_0x14a403['id']},'raw':!![]})['then'](function(_0x7b089c){_0x7b089c[_0x2ede('0x6f')](function(_0x331aa8){_0x42cc82[_0x2ede('0x6c')](_0x331aa8['resourceId']+0x15b38);});_0x44b2cb(_0x42cc82);});}}catch(_0x4038e9){_0x2045f4(_0x4038e9);}});}exports[_0x2ede('0x72')]=function(_0x16bd5a,_0x1ea821){return db[_0x2ede('0x46')][_0x2ede('0x4d')]({'where':{'id':_0x16bd5a['params']['id']}})['then'](handleEntityNotFound(_0x1ea821,null))['then'](function(_0x1c2724){if(_0x1c2724){return db['sequelize'][_0x2ede('0x58')](function(_0x35533b){return db[_0x2ede('0x62')][_0x2ede('0x49')]({'where':{'userProfileId':_0x16bd5a[_0x2ede('0x4c')]['id']},'attributes':['id'],'raw':!![]})['then'](function(_0x4298fe){if(_0x4298fe){return db[_0x2ede('0x62')][_0x2ede('0x5f')]({'where':{'userProfileId':_0x16bd5a[_0x2ede('0x4c')]['id'],'id':_[_0x2ede('0x30')](_0x4298fe,function(_0x684952){return _0x684952['id'];})},'transaction':_0x35533b});}})[_0x2ede('0x2a')](function(_0x42ebd5){var _0x3baa93=_[_0x2ede('0x30')](_0x16bd5a['body'],function(_0x41d0ba){_0x41d0ba['userProfileId']=_0x16bd5a['params']['id'];return _0x41d0ba;});return db[_0x2ede('0x62')][_0x2ede('0x73')](_0x3baa93,{'raw':!![],'transaction':_0x35533b});})[_0x2ede('0x2a')](function(_0x323c1d){var _0x327925=_[_0x2ede('0x41')](_[_0x2ede('0x30')](_0x323c1d,function(_0x3a3408){return _0x3a3408[_0x2ede('0x52')]({'plain':!![]});}),{'includeAll':![]});if(_0x327925){return db[_0x2ede('0x62')]['findAll']({'where':{'userProfileId':_0x16bd5a[_0x2ede('0x4c')]['id'],'sectionId':_['map'](_0x327925,function(_0x1f41bd){return _0x1f41bd[_0x2ede('0x5a')];})},'attributes':['id',_0x2ede('0x5a')],'raw':!![]})['then'](function(_0x4ae936){var _0x3fbee7=_[_0x2ede('0x30')](_0x16bd5a[_0x2ede('0x50')],function(_0x339607){_0x339607[_0x2ede('0x5b')]=_0x16bd5a[_0x2ede('0x4c')]['id'];return _0x339607;});return db['UserProfileResource'][_0x2ede('0x73')](_0x3fbee7,{'raw':!![],'transaction':_0x35533b});});}})[_0x2ede('0x4e')](handleError(_0x1ea821,null));});}})[_0x2ede('0x2a')](function(_0x1392cb){var _0x25450a=_[_0x2ede('0x30')](_0x1392cb,function(_0x4c3119){return _0x4c3119['get']({'plain':!![]});});})['then'](respondWithResult(_0x1ea821,null))[_0x2ede('0x4e')](handleError(_0x1ea821,null));};exports[_0x2ede('0x74')]=function(_0x2244b4,_0x2dbaba,_0x121420){return db[_0x2ede('0x46')]['find']({'where':{'id':_0x2244b4[_0x2ede('0x4c')]['id']}})['then'](handleEntityNotFound(_0x2dbaba,null))[_0x2ede('0x2a')](function(_0x61f691){if(_0x61f691){return _0x61f691['removeResources'](_0x2244b4[_0x2ede('0x37')][_0x2ede('0x65')]);}})['then'](respondWithStatusCode(_0x2dbaba,null))[_0x2ede('0x4e')](handleError(_0x2dbaba,null));};exports[_0x2ede('0x75')]=function(_0x2563dc,_0x3b3ec1){var _0x9f01bc={};if(!_0x2563dc['query'][_0x2ede('0x76')])throw new Error(_0x2ede('0x77'));if(!_0x2563dc[_0x2ede('0x37')][_0x2ede('0x3d')](_0x2ede('0x78'))){_0x9f01bc[_0x2ede('0x24')]=qs[_0x2ede('0x24')](_0x2563dc[_0x2ede('0x37')][_0x2ede('0x24')]);_0x9f01bc[_0x2ede('0x22')]=qs[_0x2ede('0x22')](_0x2563dc[_0x2ede('0x37')][_0x2ede('0x22')]);}return db[_0x2ede('0x46')][_0x2ede('0x4d')]({'where':{'id':_0x2563dc['params']['id']}})[_0x2ede('0x2a')](function(_0x19ec79){if(!_0x19ec79)throw new Error(_0x2ede('0x79')+_0x2563dc['params']['id']);return db['UserProfile']['getResources'](_0x2563dc);})['then'](respondWithFilteredResult(_0x3b3ec1,_0x9f01bc))[_0x2ede('0x4e')](handleError(_0x3b3ec1,null));};
\ No newline at end of file
index ee118c4..5d0ba16 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4910=['update','remove','emit','hasOwnProperty','hook','events','../../mysqldb','UserProfile','save'];(function(_0xf2628e,_0x521bf7){var _0x13863a=function(_0x2b04ab){while(--_0x2b04ab){_0xf2628e['push'](_0xf2628e['shift']());}};_0x13863a(++_0x521bf7);}(_0x4910,0x1d9));var _0x0491=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x4910[_0x20a584];return _0x4b41a8;};'use strict';var EventEmitter=require(_0x0491('0x0'));var UserProfile=require(_0x0491('0x1'))['db'][_0x0491('0x2')];var UserProfileEvents=new EventEmitter();UserProfileEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x0491('0x3'),'afterUpdate':_0x0491('0x4'),'afterDestroy':_0x0491('0x5')};function emitEvent(_0x2fc9e8){return function(_0x408677,_0x51f40d,_0x1ecb19){UserProfileEvents[_0x0491('0x6')](_0x2fc9e8+':'+_0x408677['id'],_0x408677);UserProfileEvents[_0x0491('0x6')](_0x2fc9e8,_0x408677);_0x1ecb19(null);};}for(var e in events){if(events[_0x0491('0x7')](e)){var event=events[e];UserProfile[_0x0491('0x8')](e,emitEvent(event));}}module['exports']=UserProfileEvents;
\ No newline at end of file
+var _0x1967=['exports','../../mysqldb','UserProfile','setMaxListeners','save','update','remove','emit','hasOwnProperty','hook'];(function(_0x2ef408,_0x19470c){var _0x36f2cc=function(_0x5d46ea){while(--_0x5d46ea){_0x2ef408['push'](_0x2ef408['shift']());}};_0x36f2cc(++_0x19470c);}(_0x1967,0x173));var _0x7196=function(_0x19c4ba,_0x3b008d){_0x19c4ba=_0x19c4ba-0x0;var _0x319c21=_0x1967[_0x19c4ba];return _0x319c21;};'use strict';var EventEmitter=require('events');var UserProfile=require(_0x7196('0x0'))['db'][_0x7196('0x1')];var UserProfileEvents=new EventEmitter();UserProfileEvents[_0x7196('0x2')](0x0);var events={'afterCreate':_0x7196('0x3'),'afterUpdate':_0x7196('0x4'),'afterDestroy':_0x7196('0x5')};function emitEvent(_0x302f34){return function(_0x1aaddd,_0x458ae8,_0x3ae43f){UserProfileEvents['emit'](_0x302f34+':'+_0x1aaddd['id'],_0x1aaddd);UserProfileEvents[_0x7196('0x6')](_0x302f34,_0x1aaddd);_0x3ae43f(null);};}for(var e in events){if(events[_0x7196('0x7')](e)){var event=events[e];UserProfile[_0x7196('0x8')](e,emitEvent(event));}}module[_0x7196('0x9')]=UserProfileEvents;
\ No newline at end of file
index 0faa30f..c9af45c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf841=['openTabs','true','dataValues','sms','fax','mail','openchannel','whatsapp','exports','filter','field','value','findAll','associatedResources','map','catch','then','name','resolve','UserProfileResource','AnalyticExtractedReport','resourceId','toLowerCase','squareprojects','childModel','SquareProject','SquareOdbc','parentSections','SquareProjects','projectName','JscriptyProject','contacts','CmContact','ListId','CmList','companies','CmCompany','globalcustomfields','CmCustomField','chatqueues','ChatQueue','chatwebsites','ChatWebsite','faxqueues','FaxQueue','faxaccounts','FaxAccount','inboundroutes','internalroutes','outboundroutes','VoiceExtension','contexts','VoiceContext','voicemails','VoiceMail','voicerecordings','VoiceRecording','Agents','membername','agent','Telephones','User','role','telephone','VoiceQueues','queue','VoiceQueue','inbound','QueueCampaigns','type','outbound','VoiceMusicOnHold','VoiceChanSpy','voiceprefixes','VoicePrefix','ivrcampaigns','mailqueues','mailaccounts','MailAccount','MailSubstatus','openchannelaccounts','OpenchannelAccount','smsqueues','SmsQueue','smsaccounts','SmsAccount','whatsappqueues','whatsappaccounts','WhatsappAccount','teams','Team','queuecampaigns','users','telephones','admin','user','zendeskaccounts','salesforceaccounts','SalesforceAccount','freshdeskaccounts','FreshdeskAccount','SugarcrmAccount','deskaccounts','DeskAccount','zohoaccounts','vtigeraccounts','cannedanswers','CannedAnswer','dispositions','Disposition','customdashboards','intervals','pauses','Pause','scheduler','tags','Tag','templates','Template','triggers','Trigger','Trunk','variables','Variable','plugins','extractedreports','Reports','reportId','metrics','charAt','Sequelize','QueryTypes','SELECT','select','ui.','InteractionId','from','user_has_','ui.UserId\x20=\x20?','sequelize','query','toString','define','UserProfile','user_profiles','../../components/parsers/qs','section','mergeResources','Invalid\x20section\x20\x27','isEmpty','length','push','UserProfileSection','params','ignore','union','find','model','all','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','limit','offset','sort','where','pick','merge','foreignKey','forEach','options','autoAssociation','includeAll','include','reportType','DefaultReports','CustomReports','ids','customSorting','order','extraQueryConditions','count','Tags','tag','rows'];(function(_0x185e44,_0x52d7f7){var _0x229c6c=function(_0x1751b0){while(--_0x1751b0){_0x185e44['push'](_0x185e44['shift']());}};_0x229c6c(++_0x52d7f7);}(_0xf841,0x182));var _0x1f84=function(_0x4e1269,_0x197395){_0x4e1269=_0x4e1269-0x0;var _0x293b6a=_0xf841[_0x4e1269];return _0x293b6a;};'use strict';var _=require('lodash');var attributes=require('./userProfile.attributes');var squel=require('squel');module[_0x1f84('0x0')]=function(_0x603ed){var _0x2de0aa=_0x603ed['models'];function _0x2e2e8e(_0x58e86e,_0x2cd810){return new Promise(function(_0x3f1804,_0x4cd767){if(!_0x2cd810)return _0x3f1804(null);var _0x1b8810=_0x2cd810['filter']?{[_0x2cd810[_0x1f84('0x1')][_0x1f84('0x2')]]:_0x2cd810[_0x1f84('0x1')][_0x1f84('0x3')]}:undefined;return _0x2de0aa[_0x58e86e][_0x1f84('0x4')]({'where':_0x1b8810,'raw':!![]})['then'](function(_0x273c20){_0x2cd810[_0x1f84('0x5')]=_[_0x1f84('0x6')](_0x273c20,'id');_0x3f1804(_0x2cd810);})[_0x1f84('0x7')](function(_0x2ba32e){_0x4cd767(_0x2ba32e);});});}function _0x43b859(_0x22aefc,_0x5a1e8a){return new Promise(function(_0x1edf71,_0x59e51e){var _0x349167=_0x22aefc[_0x1f84('0x1')]?{[_0x22aefc['filter'][_0x1f84('0x2')]]:_0x22aefc[_0x1f84('0x1')][_0x1f84('0x3')]}:undefined;return _0x2de0aa[_0x22aefc['model']][_0x1f84('0x4')]({'where':_0x349167,'raw':!![]})[_0x1f84('0x8')](function(_0x106387){_0x5a1e8a[_0x1f84('0x5')]=_[_0x1f84('0x6')](_0x106387,function(_0x4973eb){return _0x4973eb[_0x1f84('0x9')];});_0x1edf71(_0x5a1e8a);})[_0x1f84('0x7')](function(_0x2e80f6){_0x59e51e(_0x2e80f6);});});}function _0x5d0be8(_0x5b8e51,_0x319ddf,_0x4521c2){if(!_0x319ddf)return Promise[_0x1f84('0xa')](null);return new Promise(function(_0x2cda70,_0x4e4536){return _0x2de0aa[_0x1f84('0xb')][_0x1f84('0x4')]({'where':{'sectionId':_0x319ddf['id']},'raw':!![]})[_0x1f84('0x8')](function(_0x567788){if(_0x5b8e51[_0x1f84('0x2')]&&_0x5b8e51[_0x1f84('0x2')]!=='id'){_0x319ddf[_0x1f84('0x5')]=_[_0x1f84('0x6')](_0x567788,function(_0x5cc9b7){return _0x5cc9b7[_0x5b8e51['field']];});}else{if(_0x4521c2===_0x1f84('0xc')){_0x319ddf[_0x1f84('0x5')]=_[_0x1f84('0x6')](_0x567788,function(_0x4a1490){return{'id':_0x4a1490['resourceId'],'type':_0x4a1490['type']};});}else{_0x319ddf['associatedResources']=_[_0x1f84('0x6')](_0x567788,function(_0x74c766){return _0x74c766[_0x1f84('0xd')];});}}_0x2cda70(_0x319ddf);})[_0x1f84('0x7')](function(_0x5788f2){_0x4e4536(_0x5788f2);});});}function _0x4bf313(_0x22e6bc,_0x23e31f){var _0x55113f={'parentSections':[]};switch(_0x22e6bc[_0x1f84('0xe')]()){case _0x1f84('0xf'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x11');break;case'odbc':_0x55113f[_0x1f84('0x10')]=_0x1f84('0x12');break;case'squarerecordings':_0x55113f[_0x1f84('0x10')]='SquareRecording';_0x55113f[_0x1f84('0x13')]=[{'name':_0x1f84('0x14'),'field':_0x1f84('0x9'),'foreignKey':_0x1f84('0x15')}];break;case'projects':_0x55113f[_0x1f84('0x10')]=_0x1f84('0x16');break;case _0x1f84('0x17'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x18');_0x55113f['parentSections']=[{'name':'Lists','field':'id','foreignKey':_0x1f84('0x19')}];break;case'lists':_0x55113f[_0x1f84('0x10')]=_0x1f84('0x1a');break;case _0x1f84('0x1b'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x1c');break;case _0x1f84('0x1d'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x1e');break;case _0x1f84('0x1f'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x20');break;case _0x1f84('0x21'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x22');break;case _0x1f84('0x23'):_0x55113f['childModel']=_0x1f84('0x24');break;case _0x1f84('0x25'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x26');break;case _0x1f84('0x27'):case _0x1f84('0x28'):case _0x1f84('0x29'):_0x55113f['childModel']=_0x1f84('0x2a');break;case _0x1f84('0x2b'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x2c');break;case _0x1f84('0x2d'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x2e');break;case _0x1f84('0x2f'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x30');_0x55113f[_0x1f84('0x13')]=[{'name':_0x1f84('0x31'),'field':_0x1f84('0x9'),'foreignKey':_0x1f84('0x32'),'model':'User','filter':{'field':'role','value':[_0x1f84('0x33')]}},{'name':_0x1f84('0x34'),'field':_0x1f84('0x9'),'foreignKey':_0x1f84('0x32'),'model':_0x1f84('0x35'),'filter':{'field':_0x1f84('0x36'),'value':[_0x1f84('0x37')]}},{'name':_0x1f84('0x38'),'field':_0x1f84('0x9'),'foreignKey':_0x1f84('0x39'),'model':_0x1f84('0x3a'),'filter':{'field':'type','value':[_0x1f84('0x3b')]}},{'name':_0x1f84('0x3c'),'field':_0x1f84('0x9'),'foreignKey':_0x1f84('0x39'),'model':_0x1f84('0x3a'),'filter':{'field':_0x1f84('0x3d'),'value':[_0x1f84('0x3e')]}}];break;case'musiconholds':_0x55113f[_0x1f84('0x10')]=_0x1f84('0x3f');break;case'chanspies':_0x55113f['childModel']=_0x1f84('0x40');break;case _0x1f84('0x41'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x42');break;case _0x1f84('0x43'):_0x55113f['childModel']='Campaign';break;case _0x1f84('0x44'):_0x55113f['childModel']='MailQueue';break;case _0x1f84('0x45'):_0x55113f['childModel']=_0x1f84('0x46');break;case'mailsubstatuses':_0x55113f[_0x1f84('0x10')]=_0x1f84('0x47');break;case'openchannelqueues':_0x55113f[_0x1f84('0x10')]='OpenchannelQueue';break;case _0x1f84('0x48'):_0x55113f['childModel']=_0x1f84('0x49');break;case _0x1f84('0x4a'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x4b');break;case _0x1f84('0x4c'):_0x55113f['childModel']=_0x1f84('0x4d');break;case _0x1f84('0x4e'):_0x55113f['childModel']='WhatsappQueue';break;case _0x1f84('0x4f'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x50');break;case _0x1f84('0x51'):_0x55113f['childModel']=_0x1f84('0x52');break;case'voicequeues':case _0x1f84('0x53'):_0x55113f['childModel']=_0x1f84('0x3a');if(_0x23e31f){_0x55113f[_0x1f84('0x13')]=[{'name':_0x1f84('0x38')},{'name':_0x1f84('0x3c')}];}break;case _0x1f84('0x54'):case'agents':case _0x1f84('0x55'):_0x55113f['childModel']=_0x1f84('0x35');if(_0x23e31f){_0x55113f['parentSections']=[{'name':'Users','filter':{'field':'role','value':[_0x1f84('0x56'),_0x1f84('0x57')]},'ignore':!![]},{'name':_0x1f84('0x31')},{'name':'Telephones'}];}break;case _0x1f84('0x58'):_0x55113f[_0x1f84('0x10')]='ZendeskAccount';break;case _0x1f84('0x59'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x5a');break;case _0x1f84('0x5b'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x5c');break;case'sugarcrmaccounts':_0x55113f[_0x1f84('0x10')]=_0x1f84('0x5d');break;case _0x1f84('0x5e'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x5f');break;case _0x1f84('0x60'):_0x55113f[_0x1f84('0x10')]='ZohoAccount';break;case _0x1f84('0x61'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x35');break;case _0x1f84('0x62'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x63');break;case _0x1f84('0x64'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x65');break;case _0x1f84('0x66'):_0x55113f[_0x1f84('0x10')]='Dashboard';break;case _0x1f84('0x67'):_0x55113f[_0x1f84('0x10')]='Interval';break;case _0x1f84('0x68'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x69');break;case _0x1f84('0x6a'):_0x55113f[_0x1f84('0x10')]='Schedule';break;case'sounds':_0x55113f['childModel']='Sound';break;case _0x1f84('0x6b'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x6c');break;case _0x1f84('0x6d'):_0x55113f['childModel']=_0x1f84('0x6e');break;case _0x1f84('0x6f'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0x70');break;case'trunks':_0x55113f[_0x1f84('0x10')]=_0x1f84('0x71');break;case _0x1f84('0x72'):_0x55113f['childModel']=_0x1f84('0x73');break;case _0x1f84('0x74'):_0x55113f['childModel']='Plugin';break;case _0x1f84('0x75'):_0x55113f[_0x1f84('0x10')]=_0x1f84('0xc');_0x55113f['parentSections']=[{'name':_0x1f84('0x76'),'field':'id','foreignKey':_0x1f84('0x77')}];break;case _0x1f84('0x78'):_0x55113f[_0x1f84('0x10')]='AnalyticMetric';break;}return _0x55113f;}function _0x1a6343(_0x362016,_0x1d7cc7){var _0x35d59f=_0x362016[_0x1f84('0x79')](0x0)['toUpperCase']()+_0x362016['slice'](0x1);var _0xb65b41={'type':_0x2de0aa[_0x1f84('0x7a')][_0x1f84('0x7b')][_0x1f84('0x7c')],'raw':!![]};return new Promise(function(_0x1bf8cc,_0x4814a3){var _0x561064=squel[_0x1f84('0x7d')]()['field'](_0x1f84('0x7e')+_0x35d59f+_0x1f84('0x7f'),'id')[_0x1f84('0x2')]('ui.createdAt')[_0x1f84('0x80')](_0x1f84('0x81')+_0x362016+'_interactions','ui')['where'](_0x1f84('0x82'),_0x1d7cc7['id']);return _0x2de0aa[_0x1f84('0x83')][_0x1f84('0x84')](_0x561064[_0x1f84('0x85')](),_0xb65b41)[_0x1f84('0x8')](function(_0x5a581a){_0x1d7cc7[_0x35d59f+'OpenTabs']=_0x5a581a;_0x1bf8cc(_0x5a581a);})['catch'](function(_0xa6b510){_0x4814a3(_0xa6b510);});});}return _0x603ed[_0x1f84('0x86')](_0x1f84('0x87'),attributes,{'tableName':_0x1f84('0x88'),'paranoid':![],'indexes':[],'timestamps':!![],'classMethods':{'getResources':function(_0x11e2cb){var _0x4991be=require(_0x1f84('0x89'));var _0x2608e3={'raw':_0x11e2cb[_0x1f84('0x84')]['raw'],'where':{}};var _0xb192c3={};var _0x5a39cb={'count':0x0,'rows':[]};var _0x4408b8=_0x11e2cb['query'][_0x1f84('0x8a')];var _0x48fab9=_0x11e2cb[_0x1f84('0x84')][_0x1f84('0x8b')]||![];var _0x141f4a=_0x4bf313(_0x4408b8,_0x48fab9);if(!_0x141f4a[_0x1f84('0x10')])throw new Error(_0x1f84('0x8c')+_0x4408b8+'\x27');var _0x2374f5=[{'name':_0x4408b8}];if(!_[_0x1f84('0x8d')](_0x141f4a[_0x1f84('0x13')]))_0x2374f5=_0x141f4a['parentSections'];var _0xa39652=[];for(var _0x2301c3=0x0;_0x2301c3<_0x2374f5[_0x1f84('0x8e')];_0x2301c3++){_0xa39652[_0x1f84('0x8f')](_0x2de0aa[_0x1f84('0x90')]['find']({'where':{'userProfileId':_0x11e2cb[_0x1f84('0x91')]['id'],'name':_0x2374f5[_0x2301c3]['name']},'raw':!![]}));}return Promise['all'](_0xa39652)[_0x1f84('0x8')](function(_0x1303f6){var _0x17ed1d=_[_0x1f84('0x1')](_0x1303f6,function(_0x23d02d){return _0x23d02d?_0x23d02d:undefined;});var _0x2a11fb=_[_0x1f84('0x1')](_0x2374f5,[_0x1f84('0x92'),!![]]);var _0x2b0297=_[_0x1f84('0x8d')](_0x17ed1d)&&_['isEmpty'](_0x2a11fb)?null:_[_0x1f84('0x93')](_0x2a11fb,_0x17ed1d);if(!_0x2b0297)return null;var _0x2c683b=[];for(var _0x1bc55a=0x0;_0x1bc55a<_0x2b0297[_0x1f84('0x8e')];_0x1bc55a++){var _0x2e7b61=_[_0x1f84('0x94')](_0x2374f5,function(_0x49fe67){return _0x2b0297[_0x1bc55a]?_0x49fe67[_0x1f84('0x9')]===_0x2b0297[_0x1bc55a]['name']:null;});if(_0x2e7b61){if(_0x2b0297[_0x1bc55a][_0x1f84('0x92')]){_0x2c683b['push'](_0x2e2e8e(_0x141f4a['childModel'],_0x2b0297[_0x1bc55a]));}else{if(!_0x2b0297[_0x1bc55a]['autoAssociation']){_0x2c683b[_0x1f84('0x8f')](_0x5d0be8(_0x2e7b61,_0x2b0297[_0x1bc55a],_0x141f4a[_0x1f84('0x10')]));}else{if(_0x2e7b61[_0x1f84('0x95')]){_0x2c683b[_0x1f84('0x8f')](_0x43b859(_0x2e7b61,_0x2b0297[_0x1bc55a]));}}}}}return Promise[_0x1f84('0x96')](_0x2c683b);})['then'](function(_0x12b1e3){var _0x4a4328=_0x12b1e3;var _0x4689f2=null;if(_0x4a4328){_0x4689f2=_0x4a4328[_0x1f84('0x8e')]===0x1?_0x4a4328[0x0]:null;}if(!_0x4689f2&&!_0x4a4328)return _0x5a39cb;var _0x3d71c5=_0x2de0aa[_0x141f4a['childModel']]['rawAttributes'];_0xb192c3[_0x1f84('0x95')]=_[_0x1f84('0x97')](_0x3d71c5);_0xb192c3[_0x1f84('0x84')]=_['keys'](_0x11e2cb[_0x1f84('0x84')]);_0xb192c3[_0x1f84('0x98')]=_[_0x1f84('0x99')](_0xb192c3[_0x1f84('0x95')],_0xb192c3[_0x1f84('0x84')]);_0x2608e3[_0x1f84('0x9a')]=_['intersection'](_0xb192c3['model'],_0x4991be[_0x1f84('0x9b')](_0x11e2cb[_0x1f84('0x84')]['fields']));_0x2608e3[_0x1f84('0x9a')]=_0x2608e3[_0x1f84('0x9a')][_0x1f84('0x8e')]?_0x2608e3[_0x1f84('0x9a')]:_0xb192c3[_0x1f84('0x95')];if(!_0x11e2cb[_0x1f84('0x84')][_0x1f84('0x9c')](_0x1f84('0x9d'))){_0x2608e3[_0x1f84('0x9e')]=_0x4991be[_0x1f84('0x9e')](_0x11e2cb[_0x1f84('0x84')][_0x1f84('0x9e')]);_0x2608e3[_0x1f84('0x9f')]=_0x4991be[_0x1f84('0x9f')](_0x11e2cb['query'][_0x1f84('0x9f')]);}_0x2608e3['order']=_0x4991be[_0x1f84('0xa0')](_0x11e2cb[_0x1f84('0x84')][_0x1f84('0xa0')]);_0x2608e3[_0x1f84('0xa1')]=_0x4991be[_0x1f84('0x98')](_[_0x1f84('0xa2')](_0x11e2cb[_0x1f84('0x84')],_0xb192c3[_0x1f84('0x98')]));if(_0x11e2cb['query'][_0x1f84('0x1')]){_0x2608e3['where']=_[_0x1f84('0xa3')](_0x2608e3['where'],{'$or':_[_0x1f84('0x6')](_0x3d71c5,function(_0x1a99ff){if(_0x1a99ff[_0x1f84('0x3d')]['key']!=='VIRTUAL'){var _0x5d67d4={};_0x5d67d4[_0x1a99ff[_0x1f84('0x2')]]={'$like':'%'+_0x11e2cb['query'][_0x1f84('0x1')]+'%'};return _0x5d67d4;}})});}var _0x579e2d=[];var _0xfa6184=null;var _0x2339e0={};if(_0x4689f2){_0xfa6184=_[_0x1f84('0x94')](_0x2374f5,[_0x1f84('0x9'),_0x4689f2[_0x1f84('0x9')]]);if(_0xfa6184[_0x1f84('0x2')]){_0x2339e0={};if(_0x141f4a[_0x1f84('0x10')]===_0x1f84('0xc')){_0x2339e0[_0xfa6184[_0x1f84('0xa4')]]=_[_0x1f84('0x6')](_0x4689f2['associatedResources'],'id');}else{_0x2339e0[_0xfa6184[_0x1f84('0xa4')]]=_0x4689f2[_0x1f84('0x5')];}_0x579e2d[_0x1f84('0x8f')](_0x2339e0);}else{_0x2608e3[_0x1f84('0xa1')]['id']=_0x4689f2['associatedResources'];}}else{for(var _0x4630b9=0x0;_0x4630b9<_0x4a4328[_0x1f84('0x8e')];_0x4630b9++){_0xfa6184=_[_0x1f84('0x94')](_0x2374f5,[_0x1f84('0x9'),_0x4a4328[_0x4630b9][_0x1f84('0x9')]]);if(_0xfa6184[_0x1f84('0x2')]){_0x2339e0={};_0x2339e0[_0xfa6184[_0x1f84('0xa4')]]=_0x4a4328[_0x4630b9][_0x1f84('0x5')];_0x579e2d['push'](_0x2339e0);}else{if(!_0x2608e3[_0x1f84('0xa1')]['id'])_0x2608e3[_0x1f84('0xa1')]['id']=[];_0x4a4328[_0x4630b9][_0x1f84('0x5')][_0x1f84('0xa5')](function(_0x35b7a3){_0x2608e3[_0x1f84('0xa1')]['id']['push'](_0x35b7a3);});}}}if(!_[_0x1f84('0x8d')](_0x579e2d)){_0x2608e3[_0x1f84('0xa1')]=_[_0x1f84('0xa3')](_0x2608e3[_0x1f84('0xa1')],{'$and':{'$or':_0x579e2d}});}_0x2608e3=_[_0x1f84('0xa3')]({},_0x2608e3,_0x11e2cb[_0x1f84('0xa6')]);if(_0x4689f2&&!_0x4689f2[_0x1f84('0xa7')]&&_0x141f4a[_0x1f84('0x10')]===_0x1f84('0xc')){if(_0x11e2cb[_0x1f84('0x84')][_0x1f84('0xa8')]){_0x2608e3[_0x1f84('0xa9')]=[{'all':!![]}];}return _0x2de0aa[_0x141f4a[_0x1f84('0x10')]]['findAll'](_0x2608e3)[_0x1f84('0x8')](function(_0x1dd278){var _0x4ee03d=[];_0x1dd278[_0x1f84('0xa5')](function(_0x41901d){var _0x5ca0b9;switch(_0x41901d[_0x1f84('0xaa')]){case'default':_0x5ca0b9=_[_0x1f84('0x94')](_0x4689f2['associatedResources'],function(_0x896686){return _0x896686['id']===_0x41901d[_0x1f84('0x77')]&&_0x896686[_0x1f84('0x3d')]===_0x1f84('0xab');});break;case'custom':_0x5ca0b9=_[_0x1f84('0x94')](_0x4689f2[_0x1f84('0x5')],function(_0x4677fc){return _0x4677fc['id']===_0x41901d[_0x1f84('0x77')]&&_0x4677fc[_0x1f84('0x3d')]===_0x1f84('0xac');});break;}if(_0x5ca0b9)_0x4ee03d[_0x1f84('0x8f')](_0x41901d);});_0x5a39cb['count']=_0x4ee03d[_0x1f84('0x8e')];_0x5a39cb['rows']=_0x4ee03d;return _0x5a39cb;});}else{if(!_['isEmpty'](_0x11e2cb[_0x1f84('0x84')][_0x1f84('0xad')])){_0x2608e3[_0x1f84('0xa1')]['id']=_0x2608e3[_0x1f84('0xa1')]['id']?_[_0x1f84('0x99')](_0x2608e3[_0x1f84('0xa1')]['id'],_0x11e2cb[_0x1f84('0x84')][_0x1f84('0xad')]):_0x11e2cb[_0x1f84('0x84')][_0x1f84('0xad')];if(_0x11e2cb[_0x1f84('0x84')][_0x1f84('0xae')]){_0x2608e3[_0x1f84('0xaf')]=_0x11e2cb[_0x1f84('0x84')][_0x1f84('0xae')];}}if(_0x11e2cb[_0x1f84('0x84')][_0x1f84('0xb0')]){_0x2608e3[_0x1f84('0xa1')]=_['merge'](_0x2608e3[_0x1f84('0xa1')],{'$and':_0x11e2cb[_0x1f84('0x84')][_0x1f84('0xb0')]});}return _0x2de0aa[_0x141f4a[_0x1f84('0x10')]][_0x1f84('0xb1')]({'where':_0x2608e3[_0x1f84('0xa1')]})['then'](function(_0x3e03ad){_0x5a39cb[_0x1f84('0xb1')]=_0x3e03ad;if(_0x11e2cb[_0x1f84('0x84')][_0x1f84('0xa8')]){if(_0x141f4a[_0x1f84('0x10')]===_0x1f84('0x18')){_0x2608e3['include']=[{'model':_0x2de0aa[_0x1f84('0x6c')],'as':_0x1f84('0xb2'),'attributes':['id','name','color'],'required':_0x11e2cb['query']['tag']?!![]:![]},{'model':_0x2de0aa['Tag'],'as':'ThroughTags','attributes':['id',_0x1f84('0x9'),'color'],'through':_0x11e2cb[_0x1f84('0x84')][_0x1f84('0xb3')]?{'attributes':[],'where':{'TagId':_0x11e2cb['query'][_0x1f84('0xb3')]||undefined}}:{},'required':_0x11e2cb[_0x1f84('0x84')][_0x1f84('0xb3')]?!![]:![]}];}else{_0x2608e3[_0x1f84('0xa9')]=[{'all':!![]}];}}return _0x2de0aa[_0x141f4a[_0x1f84('0x10')]][_0x1f84('0x4')](_0x2608e3);})[_0x1f84('0x8')](function(_0x4d7339){_0x5a39cb[_0x1f84('0xb4')]=_0x4d7339;if(_0x4408b8===_0x1f84('0x31')&&_0x11e2cb['query'][_0x1f84('0xb5')]===_0x1f84('0xb6')){var _0x5c8de5=[];for(var _0x3fcfef=0x0;_0x3fcfef<_0x5a39cb[_0x1f84('0xb4')][_0x1f84('0x8e')];_0x3fcfef++){_0x5c8de5[_0x1f84('0x8f')](_0x1a6343('chat',_0x5a39cb['rows'][_0x3fcfef][_0x1f84('0xb7')]));_0x5c8de5[_0x1f84('0x8f')](_0x1a6343(_0x1f84('0xb8'),_0x5a39cb['rows'][_0x3fcfef][_0x1f84('0xb7')]));_0x5c8de5[_0x1f84('0x8f')](_0x1a6343(_0x1f84('0xb9'),_0x5a39cb['rows'][_0x3fcfef][_0x1f84('0xb7')]));_0x5c8de5[_0x1f84('0x8f')](_0x1a6343(_0x1f84('0xba'),_0x5a39cb['rows'][_0x3fcfef][_0x1f84('0xb7')]));_0x5c8de5['push'](_0x1a6343(_0x1f84('0xbb'),_0x5a39cb[_0x1f84('0xb4')][_0x3fcfef]['dataValues']));_0x5c8de5[_0x1f84('0x8f')](_0x1a6343(_0x1f84('0xbc'),_0x5a39cb[_0x1f84('0xb4')][_0x3fcfef][_0x1f84('0xb7')]));}return Promise['all'](_0x5c8de5)[_0x1f84('0x8')](function(){return _0x5a39cb;});}return _0x5a39cb;});}});}}});};
\ No newline at end of file
+var _0xdca0=['OpenTabs','UserProfile','user_profiles','mergeResources','Invalid\x20section\x20\x27','length','find','all','isEmpty','push','autoAssociation','keys','filters','fields','attributes','hasOwnProperty','nolimit','limit','offset','order','sort','pick','merge','key','VIRTUAL','foreignKey','forEach','includeAll','include','reportType','default','DefaultReports','custom','CustomReports','count','rows','ids','customSorting','extraQueryConditions','Tags','color','tag','Agents','openTabs','chat','sms','dataValues','mail','openchannel','lodash','./userProfile.attributes','squel','models','field','filter','value','then','map','model','findAll','name','catch','resolve','UserProfileResource','associatedResources','AnalyticExtractedReport','resourceId','type','toLowerCase','squareprojects','childModel','SquareProject','odbc','squarerecordings','parentSections','SquareProjects','projectName','JscriptyProject','contacts','ListId','lists','CmList','CmCompany','globalcustomfields','CmCustomField','ChatQueue','chatwebsites','ChatWebsite','faxqueues','FaxQueue','faxaccounts','internalroutes','contexts','voicemails','VoiceMail','voicerecordings','VoiceRecording','User','role','agent','Telephones','membername','telephone','VoiceQueues','VoiceQueue','inbound','QueueCampaigns','outbound','musiconholds','VoiceMusicOnHold','chanspies','voiceprefixes','Campaign','MailQueue','mailaccounts','openchannelqueues','OpenchannelQueue','openchannelaccounts','OpenchannelAccount','smsqueues','whatsappqueues','WhatsappQueue','whatsappaccounts','teams','voicequeues','users','agents','telephones','Users','admin','zendeskaccounts','ZendeskAccount','salesforceaccounts','SalesforceAccount','freshdeskaccounts','FreshdeskAccount','DeskAccount','zohoaccounts','ZohoAccount','vtigeraccounts','cannedanswers','CannedAnswer','dispositions','Disposition','customdashboards','Dashboard','Interval','pauses','Pause','scheduler','Schedule','sounds','tags','Tag','templates','Template','triggers','Trunk','variables','Variable','plugins','Plugin','extractedreports','Reports','reportId','metrics','AnalyticMetric','charAt','toUpperCase','slice','Sequelize','QueryTypes','SELECT','select','InteractionId','ui.createdAt','_interactions','where','ui.UserId\x20=\x20?','query','toString'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xdca0,0xe6));var _0x0dca=function(_0x1b2bd2,_0x491f68){_0x1b2bd2=_0x1b2bd2-0x0;var _0x34a271=_0xdca0[_0x1b2bd2];return _0x34a271;};'use strict';var _=require(_0x0dca('0x0'));var attributes=require(_0x0dca('0x1'));var squel=require(_0x0dca('0x2'));module['exports']=function(_0x4598b1){var _0x4fd571=_0x4598b1[_0x0dca('0x3')];function _0xa55f45(_0x1269bc,_0x576d1c){return new Promise(function(_0x475cbf,_0x454efa){if(!_0x576d1c)return _0x475cbf(null);var _0x520157=_0x576d1c['filter']?{[_0x576d1c['filter'][_0x0dca('0x4')]]:_0x576d1c[_0x0dca('0x5')][_0x0dca('0x6')]}:undefined;return _0x4fd571[_0x1269bc]['findAll']({'where':_0x520157,'raw':!![]})[_0x0dca('0x7')](function(_0x266a2d){_0x576d1c['associatedResources']=_[_0x0dca('0x8')](_0x266a2d,'id');_0x475cbf(_0x576d1c);})['catch'](function(_0x4ee1be){_0x454efa(_0x4ee1be);});});}function _0x2fa6ee(_0x12cf3d,_0x10dafd){return new Promise(function(_0x351f10,_0x8179cf){var _0x4d3b2d=_0x12cf3d[_0x0dca('0x5')]?{[_0x12cf3d[_0x0dca('0x5')][_0x0dca('0x4')]]:_0x12cf3d[_0x0dca('0x5')][_0x0dca('0x6')]}:undefined;return _0x4fd571[_0x12cf3d[_0x0dca('0x9')]][_0x0dca('0xa')]({'where':_0x4d3b2d,'raw':!![]})['then'](function(_0x547e9d){_0x10dafd['associatedResources']=_[_0x0dca('0x8')](_0x547e9d,function(_0x218980){return _0x218980[_0x0dca('0xb')];});_0x351f10(_0x10dafd);})[_0x0dca('0xc')](function(_0x55a1c2){_0x8179cf(_0x55a1c2);});});}function _0x2b23dd(_0xfbd4ad,_0x270d1b,_0x342343){if(!_0x270d1b)return Promise[_0x0dca('0xd')](null);return new Promise(function(_0x95c407,_0x5748de){return _0x4fd571[_0x0dca('0xe')][_0x0dca('0xa')]({'where':{'sectionId':_0x270d1b['id']},'raw':!![]})[_0x0dca('0x7')](function(_0x5eef13){if(_0xfbd4ad['field']&&_0xfbd4ad['field']!=='id'){_0x270d1b[_0x0dca('0xf')]=_['map'](_0x5eef13,function(_0x5c22b9){return _0x5c22b9[_0xfbd4ad['field']];});}else{if(_0x342343===_0x0dca('0x10')){_0x270d1b[_0x0dca('0xf')]=_['map'](_0x5eef13,function(_0x1a7188){return{'id':_0x1a7188[_0x0dca('0x11')],'type':_0x1a7188[_0x0dca('0x12')]};});}else{_0x270d1b[_0x0dca('0xf')]=_[_0x0dca('0x8')](_0x5eef13,function(_0x68cffd){return _0x68cffd[_0x0dca('0x11')];});}}_0x95c407(_0x270d1b);})[_0x0dca('0xc')](function(_0x201e7a){_0x5748de(_0x201e7a);});});}function _0x2e3d22(_0x36f744,_0x225984){var _0x3e0f04={'parentSections':[]};switch(_0x36f744[_0x0dca('0x13')]()){case _0x0dca('0x14'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x16');break;case _0x0dca('0x17'):_0x3e0f04[_0x0dca('0x15')]='SquareOdbc';break;case _0x0dca('0x18'):_0x3e0f04[_0x0dca('0x15')]='SquareRecording';_0x3e0f04[_0x0dca('0x19')]=[{'name':_0x0dca('0x1a'),'field':'name','foreignKey':_0x0dca('0x1b')}];break;case'projects':_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x1c');break;case _0x0dca('0x1d'):_0x3e0f04[_0x0dca('0x15')]='CmContact';_0x3e0f04['parentSections']=[{'name':'Lists','field':'id','foreignKey':_0x0dca('0x1e')}];break;case _0x0dca('0x1f'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x20');break;case'companies':_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x21');break;case _0x0dca('0x22'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x23');break;case'chatqueues':_0x3e0f04['childModel']=_0x0dca('0x24');break;case _0x0dca('0x25'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x26');break;case _0x0dca('0x27'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x28');break;case _0x0dca('0x29'):_0x3e0f04[_0x0dca('0x15')]='FaxAccount';break;case'inboundroutes':case _0x0dca('0x2a'):case'outboundroutes':_0x3e0f04['childModel']='VoiceExtension';break;case _0x0dca('0x2b'):_0x3e0f04[_0x0dca('0x15')]='VoiceContext';break;case _0x0dca('0x2c'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x2d');break;case _0x0dca('0x2e'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x2f');_0x3e0f04[_0x0dca('0x19')]=[{'name':'Agents','field':_0x0dca('0xb'),'foreignKey':'membername','model':_0x0dca('0x30'),'filter':{'field':_0x0dca('0x31'),'value':[_0x0dca('0x32')]}},{'name':_0x0dca('0x33'),'field':'name','foreignKey':_0x0dca('0x34'),'model':_0x0dca('0x30'),'filter':{'field':_0x0dca('0x31'),'value':[_0x0dca('0x35')]}},{'name':_0x0dca('0x36'),'field':_0x0dca('0xb'),'foreignKey':'queue','model':_0x0dca('0x37'),'filter':{'field':_0x0dca('0x12'),'value':[_0x0dca('0x38')]}},{'name':_0x0dca('0x39'),'field':_0x0dca('0xb'),'foreignKey':'queue','model':_0x0dca('0x37'),'filter':{'field':_0x0dca('0x12'),'value':[_0x0dca('0x3a')]}}];break;case _0x0dca('0x3b'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x3c');break;case _0x0dca('0x3d'):_0x3e0f04['childModel']='VoiceChanSpy';break;case _0x0dca('0x3e'):_0x3e0f04[_0x0dca('0x15')]='VoicePrefix';break;case'ivrcampaigns':_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x3f');break;case'mailqueues':_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x40');break;case _0x0dca('0x41'):_0x3e0f04[_0x0dca('0x15')]='MailAccount';break;case'mailsubstatuses':_0x3e0f04[_0x0dca('0x15')]='MailSubstatus';break;case _0x0dca('0x42'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x43');break;case _0x0dca('0x44'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x45');break;case _0x0dca('0x46'):_0x3e0f04[_0x0dca('0x15')]='SmsQueue';break;case'smsaccounts':_0x3e0f04['childModel']='SmsAccount';break;case _0x0dca('0x47'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x48');break;case _0x0dca('0x49'):_0x3e0f04[_0x0dca('0x15')]='WhatsappAccount';break;case _0x0dca('0x4a'):_0x3e0f04['childModel']='Team';break;case _0x0dca('0x4b'):case'queuecampaigns':_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x37');if(_0x225984){_0x3e0f04[_0x0dca('0x19')]=[{'name':_0x0dca('0x36')},{'name':_0x0dca('0x39')}];}break;case _0x0dca('0x4c'):case _0x0dca('0x4d'):case _0x0dca('0x4e'):_0x3e0f04['childModel']=_0x0dca('0x30');if(_0x225984){_0x3e0f04[_0x0dca('0x19')]=[{'name':_0x0dca('0x4f'),'filter':{'field':_0x0dca('0x31'),'value':[_0x0dca('0x50'),'user']},'ignore':!![]},{'name':'Agents'},{'name':_0x0dca('0x33')}];}break;case _0x0dca('0x51'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x52');break;case _0x0dca('0x53'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x54');break;case _0x0dca('0x55'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x56');break;case'sugarcrmaccounts':_0x3e0f04[_0x0dca('0x15')]='SugarcrmAccount';break;case'deskaccounts':_0x3e0f04['childModel']=_0x0dca('0x57');break;case _0x0dca('0x58'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x59');break;case _0x0dca('0x5a'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x30');break;case _0x0dca('0x5b'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x5c');break;case _0x0dca('0x5d'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x5e');break;case _0x0dca('0x5f'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x60');break;case'intervals':_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x61');break;case _0x0dca('0x62'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x63');break;case _0x0dca('0x64'):_0x3e0f04['childModel']=_0x0dca('0x65');break;case _0x0dca('0x66'):_0x3e0f04[_0x0dca('0x15')]='Sound';break;case _0x0dca('0x67'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x68');break;case _0x0dca('0x69'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x6a');break;case _0x0dca('0x6b'):_0x3e0f04['childModel']='Trigger';break;case'trunks':_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x6c');break;case _0x0dca('0x6d'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x6e');break;case _0x0dca('0x6f'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x70');break;case _0x0dca('0x71'):_0x3e0f04[_0x0dca('0x15')]='AnalyticExtractedReport';_0x3e0f04['parentSections']=[{'name':_0x0dca('0x72'),'field':'id','foreignKey':_0x0dca('0x73')}];break;case _0x0dca('0x74'):_0x3e0f04[_0x0dca('0x15')]=_0x0dca('0x75');break;}return _0x3e0f04;}function _0x4a1a3f(_0x1c0bbf,_0x55f5e0){var _0x47074f=_0x1c0bbf[_0x0dca('0x76')](0x0)[_0x0dca('0x77')]()+_0x1c0bbf[_0x0dca('0x78')](0x1);var _0x5a906c={'type':_0x4fd571[_0x0dca('0x79')][_0x0dca('0x7a')][_0x0dca('0x7b')],'raw':!![]};return new Promise(function(_0xd822ac,_0x14abbe){var _0xc672a5=squel[_0x0dca('0x7c')]()[_0x0dca('0x4')]('ui.'+_0x47074f+_0x0dca('0x7d'),'id')['field'](_0x0dca('0x7e'))['from']('user_has_'+_0x1c0bbf+_0x0dca('0x7f'),'ui')[_0x0dca('0x80')](_0x0dca('0x81'),_0x55f5e0['id']);return _0x4fd571['sequelize'][_0x0dca('0x82')](_0xc672a5[_0x0dca('0x83')](),_0x5a906c)['then'](function(_0x2fb7ce){_0x55f5e0[_0x47074f+_0x0dca('0x84')]=_0x2fb7ce;_0xd822ac(_0x2fb7ce);})[_0x0dca('0xc')](function(_0x1038f9){_0x14abbe(_0x1038f9);});});}return _0x4598b1['define'](_0x0dca('0x85'),attributes,{'tableName':_0x0dca('0x86'),'paranoid':![],'indexes':[],'timestamps':!![],'classMethods':{'getResources':function(_0x2f8b99){var _0x4a4a67=require('../../components/parsers/qs');var _0x273b59={'raw':_0x2f8b99[_0x0dca('0x82')]['raw'],'where':{}};var _0x114787={};var _0x2329b0={'count':0x0,'rows':[]};var _0x170a52=_0x2f8b99[_0x0dca('0x82')]['section'];var _0x559e59=_0x2f8b99[_0x0dca('0x82')][_0x0dca('0x87')]||![];var _0x44e476=_0x2e3d22(_0x170a52,_0x559e59);if(!_0x44e476['childModel'])throw new Error(_0x0dca('0x88')+_0x170a52+'\x27');var _0x309437=[{'name':_0x170a52}];if(!_['isEmpty'](_0x44e476[_0x0dca('0x19')]))_0x309437=_0x44e476[_0x0dca('0x19')];var _0x41d071=[];for(var _0x19cb6b=0x0;_0x19cb6b<_0x309437[_0x0dca('0x89')];_0x19cb6b++){_0x41d071['push'](_0x4fd571['UserProfileSection'][_0x0dca('0x8a')]({'where':{'userProfileId':_0x2f8b99['params']['id'],'name':_0x309437[_0x19cb6b][_0x0dca('0xb')]},'raw':!![]}));}return Promise[_0x0dca('0x8b')](_0x41d071)['then'](function(_0x5b6838){var _0xf97de8=_[_0x0dca('0x5')](_0x5b6838,function(_0x5953f9){return _0x5953f9?_0x5953f9:undefined;});var _0x236e86=_[_0x0dca('0x5')](_0x309437,['ignore',!![]]);var _0x2d7ff0=_[_0x0dca('0x8c')](_0xf97de8)&&_['isEmpty'](_0x236e86)?null:_['union'](_0x236e86,_0xf97de8);if(!_0x2d7ff0)return null;var _0x526d3c=[];for(var _0x215e22=0x0;_0x215e22<_0x2d7ff0[_0x0dca('0x89')];_0x215e22++){var _0x4e586c=_['find'](_0x309437,function(_0x12b43e){return _0x2d7ff0[_0x215e22]?_0x12b43e[_0x0dca('0xb')]===_0x2d7ff0[_0x215e22]['name']:null;});if(_0x4e586c){if(_0x2d7ff0[_0x215e22]['ignore']){_0x526d3c[_0x0dca('0x8d')](_0xa55f45(_0x44e476['childModel'],_0x2d7ff0[_0x215e22]));}else{if(!_0x2d7ff0[_0x215e22][_0x0dca('0x8e')]){_0x526d3c[_0x0dca('0x8d')](_0x2b23dd(_0x4e586c,_0x2d7ff0[_0x215e22],_0x44e476[_0x0dca('0x15')]));}else{if(_0x4e586c[_0x0dca('0x9')]){_0x526d3c[_0x0dca('0x8d')](_0x2fa6ee(_0x4e586c,_0x2d7ff0[_0x215e22]));}}}}}return Promise[_0x0dca('0x8b')](_0x526d3c);})[_0x0dca('0x7')](function(_0xa5348f){var _0x78fd24=_0xa5348f;var _0x455937=null;if(_0x78fd24){_0x455937=_0x78fd24[_0x0dca('0x89')]===0x1?_0x78fd24[0x0]:null;}if(!_0x455937&&!_0x78fd24)return _0x2329b0;var _0x152fcf=_0x4fd571[_0x44e476[_0x0dca('0x15')]]['rawAttributes'];_0x114787[_0x0dca('0x9')]=_[_0x0dca('0x8f')](_0x152fcf);_0x114787[_0x0dca('0x82')]=_['keys'](_0x2f8b99['query']);_0x114787[_0x0dca('0x90')]=_['intersection'](_0x114787[_0x0dca('0x9')],_0x114787[_0x0dca('0x82')]);_0x273b59['attributes']=_['intersection'](_0x114787['model'],_0x4a4a67[_0x0dca('0x91')](_0x2f8b99['query'][_0x0dca('0x91')]));_0x273b59[_0x0dca('0x92')]=_0x273b59['attributes'][_0x0dca('0x89')]?_0x273b59[_0x0dca('0x92')]:_0x114787['model'];if(!_0x2f8b99['query'][_0x0dca('0x93')](_0x0dca('0x94'))){_0x273b59[_0x0dca('0x95')]=_0x4a4a67[_0x0dca('0x95')](_0x2f8b99[_0x0dca('0x82')]['limit']);_0x273b59[_0x0dca('0x96')]=_0x4a4a67['offset'](_0x2f8b99[_0x0dca('0x82')][_0x0dca('0x96')]);}_0x273b59[_0x0dca('0x97')]=_0x4a4a67[_0x0dca('0x98')](_0x2f8b99[_0x0dca('0x82')][_0x0dca('0x98')]);_0x273b59[_0x0dca('0x80')]=_0x4a4a67[_0x0dca('0x90')](_[_0x0dca('0x99')](_0x2f8b99['query'],_0x114787[_0x0dca('0x90')]));if(_0x2f8b99[_0x0dca('0x82')][_0x0dca('0x5')]){_0x273b59['where']=_[_0x0dca('0x9a')](_0x273b59['where'],{'$or':_['map'](_0x152fcf,function(_0x5baccf){if(_0x5baccf[_0x0dca('0x12')][_0x0dca('0x9b')]!==_0x0dca('0x9c')){var _0x3b651d={};_0x3b651d[_0x5baccf[_0x0dca('0x4')]]={'$like':'%'+_0x2f8b99[_0x0dca('0x82')][_0x0dca('0x5')]+'%'};return _0x3b651d;}})});}var _0x28f765=[];var _0x55d345=null;var _0x3bcda7={};if(_0x455937){_0x55d345=_['find'](_0x309437,[_0x0dca('0xb'),_0x455937[_0x0dca('0xb')]]);if(_0x55d345[_0x0dca('0x4')]){_0x3bcda7={};if(_0x44e476['childModel']===_0x0dca('0x10')){_0x3bcda7[_0x55d345['foreignKey']]=_[_0x0dca('0x8')](_0x455937[_0x0dca('0xf')],'id');}else{_0x3bcda7[_0x55d345['foreignKey']]=_0x455937[_0x0dca('0xf')];}_0x28f765[_0x0dca('0x8d')](_0x3bcda7);}else{_0x273b59[_0x0dca('0x80')]['id']=_0x455937['associatedResources'];}}else{for(var _0xc7b47a=0x0;_0xc7b47a<_0x78fd24[_0x0dca('0x89')];_0xc7b47a++){_0x55d345=_[_0x0dca('0x8a')](_0x309437,['name',_0x78fd24[_0xc7b47a][_0x0dca('0xb')]]);if(_0x55d345[_0x0dca('0x4')]){_0x3bcda7={};_0x3bcda7[_0x55d345[_0x0dca('0x9d')]]=_0x78fd24[_0xc7b47a]['associatedResources'];_0x28f765['push'](_0x3bcda7);}else{if(!_0x273b59[_0x0dca('0x80')]['id'])_0x273b59[_0x0dca('0x80')]['id']=[];_0x78fd24[_0xc7b47a]['associatedResources'][_0x0dca('0x9e')](function(_0x483e5a){_0x273b59[_0x0dca('0x80')]['id'][_0x0dca('0x8d')](_0x483e5a);});}}}if(!_['isEmpty'](_0x28f765)){_0x273b59[_0x0dca('0x80')]=_['merge'](_0x273b59['where'],{'$and':{'$or':_0x28f765}});}_0x273b59=_['merge']({},_0x273b59,_0x2f8b99['options']);if(_0x455937&&!_0x455937[_0x0dca('0x8e')]&&_0x44e476['childModel']==='AnalyticExtractedReport'){if(_0x2f8b99[_0x0dca('0x82')][_0x0dca('0x9f')]){_0x273b59[_0x0dca('0xa0')]=[{'all':!![]}];}return _0x4fd571[_0x44e476[_0x0dca('0x15')]][_0x0dca('0xa')](_0x273b59)[_0x0dca('0x7')](function(_0x55b0ca){var _0xead0f1=[];_0x55b0ca[_0x0dca('0x9e')](function(_0xad2af0){var _0x566db4;switch(_0xad2af0[_0x0dca('0xa1')]){case _0x0dca('0xa2'):_0x566db4=_['find'](_0x455937[_0x0dca('0xf')],function(_0x203dbf){return _0x203dbf['id']===_0xad2af0[_0x0dca('0x73')]&&_0x203dbf[_0x0dca('0x12')]===_0x0dca('0xa3');});break;case _0x0dca('0xa4'):_0x566db4=_[_0x0dca('0x8a')](_0x455937[_0x0dca('0xf')],function(_0x3efb35){return _0x3efb35['id']===_0xad2af0[_0x0dca('0x73')]&&_0x3efb35['type']===_0x0dca('0xa5');});break;}if(_0x566db4)_0xead0f1[_0x0dca('0x8d')](_0xad2af0);});_0x2329b0[_0x0dca('0xa6')]=_0xead0f1[_0x0dca('0x89')];_0x2329b0[_0x0dca('0xa7')]=_0xead0f1;return _0x2329b0;});}else{if(!_[_0x0dca('0x8c')](_0x2f8b99[_0x0dca('0x82')]['ids'])){_0x273b59[_0x0dca('0x80')]['id']=_0x273b59[_0x0dca('0x80')]['id']?_['intersection'](_0x273b59[_0x0dca('0x80')]['id'],_0x2f8b99[_0x0dca('0x82')][_0x0dca('0xa8')]):_0x2f8b99[_0x0dca('0x82')][_0x0dca('0xa8')];if(_0x2f8b99['query'][_0x0dca('0xa9')]){_0x273b59[_0x0dca('0x97')]=_0x2f8b99['query'][_0x0dca('0xa9')];}}if(_0x2f8b99[_0x0dca('0x82')][_0x0dca('0xaa')]){_0x273b59[_0x0dca('0x80')]=_[_0x0dca('0x9a')](_0x273b59['where'],{'$and':_0x2f8b99['query']['extraQueryConditions']});}return _0x4fd571[_0x44e476['childModel']]['count']({'where':_0x273b59[_0x0dca('0x80')]})[_0x0dca('0x7')](function(_0x3a9d97){_0x2329b0[_0x0dca('0xa6')]=_0x3a9d97;if(_0x2f8b99[_0x0dca('0x82')][_0x0dca('0x9f')]){if(_0x44e476[_0x0dca('0x15')]==='CmContact'){_0x273b59[_0x0dca('0xa0')]=[{'model':_0x4fd571[_0x0dca('0x68')],'as':_0x0dca('0xab'),'attributes':['id','name',_0x0dca('0xac')],'required':_0x2f8b99[_0x0dca('0x82')]['tag']?!![]:![]},{'model':_0x4fd571[_0x0dca('0x68')],'as':'ThroughTags','attributes':['id',_0x0dca('0xb'),_0x0dca('0xac')],'through':_0x2f8b99[_0x0dca('0x82')][_0x0dca('0xad')]?{'attributes':[],'where':{'TagId':_0x2f8b99[_0x0dca('0x82')][_0x0dca('0xad')]||undefined}}:{},'required':_0x2f8b99[_0x0dca('0x82')][_0x0dca('0xad')]?!![]:![]}];}else{_0x273b59[_0x0dca('0xa0')]=[{'all':!![]}];}}return _0x4fd571[_0x44e476[_0x0dca('0x15')]][_0x0dca('0xa')](_0x273b59);})[_0x0dca('0x7')](function(_0x3ce531){_0x2329b0[_0x0dca('0xa7')]=_0x3ce531;if(_0x170a52===_0x0dca('0xae')&&_0x2f8b99[_0x0dca('0x82')][_0x0dca('0xaf')]==='true'){var _0x69594b=[];for(var _0x1413b2=0x0;_0x1413b2<_0x2329b0['rows']['length'];_0x1413b2++){_0x69594b['push'](_0x4a1a3f(_0x0dca('0xb0'),_0x2329b0['rows'][_0x1413b2]['dataValues']));_0x69594b[_0x0dca('0x8d')](_0x4a1a3f(_0x0dca('0xb1'),_0x2329b0[_0x0dca('0xa7')][_0x1413b2][_0x0dca('0xb2')]));_0x69594b['push'](_0x4a1a3f('fax',_0x2329b0['rows'][_0x1413b2][_0x0dca('0xb2')]));_0x69594b[_0x0dca('0x8d')](_0x4a1a3f(_0x0dca('0xb3'),_0x2329b0['rows'][_0x1413b2][_0x0dca('0xb2')]));_0x69594b[_0x0dca('0x8d')](_0x4a1a3f(_0x0dca('0xb4'),_0x2329b0[_0x0dca('0xa7')][_0x1413b2][_0x0dca('0xb2')]));_0x69594b[_0x0dca('0x8d')](_0x4a1a3f('whatsapp',_0x2329b0[_0x0dca('0xa7')][_0x1413b2]['dataValues']));}return Promise[_0x0dca('0x8b')](_0x69594b)[_0x0dca('0x7')](function(){return _0x2329b0;});}return _0x2329b0;});}});}}});};
\ No newline at end of file
index caa57ad..8512a3d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5f6f=['jayson/promise','client','http','redis','localhost','socket.io-emitter','./userProfile.socket','register','request','then','info','UserProfile,\x20%s,\x20%s','debug','request\x20sent','stringify','error','message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','../../config/environment'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x5f6f,0x1ef));var _0xf5f6=function(_0x3108d9,_0xf08d6){_0x3108d9=_0x3108d9-0x0;var _0x1455e6=_0x5f6f[_0x3108d9];return _0x1455e6;};'use strict';var _=require(_0xf5f6('0x0'));var util=require(_0xf5f6('0x1'));var moment=require(_0xf5f6('0x2'));var BPromise=require(_0xf5f6('0x3'));var rs=require(_0xf5f6('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xf5f6('0x5'))['db'];var utils=require(_0xf5f6('0x6'));var logger=require(_0xf5f6('0x7'))('rpc');var config=require(_0xf5f6('0x8'));var jayson=require(_0xf5f6('0x9'));var client=jayson[_0xf5f6('0xa')][_0xf5f6('0xb')]({'port':0x232a});config['redis']=_['defaults'](config[_0xf5f6('0xc')],{'host':_0xf5f6('0xd'),'port':0x18eb});var socket=require(_0xf5f6('0xe'))(new Redis(config[_0xf5f6('0xc')]));require(_0xf5f6('0xf'))[_0xf5f6('0x10')](socket);function respondWithRpcPromise(_0x57fc19,_0x5ba0f5,_0x988c4a){return new BPromise(function(_0x369b18,_0x491c14){return client[_0xf5f6('0x11')](_0x57fc19,_0x988c4a)[_0xf5f6('0x12')](function(_0xeb94fb){logger[_0xf5f6('0x13')](_0xf5f6('0x14'),_0x5ba0f5,'request\x20sent');logger[_0xf5f6('0x15')]('UserProfile,\x20%s,\x20%s,\x20%s',_0x5ba0f5,_0xf5f6('0x16'),JSON[_0xf5f6('0x17')](_0xeb94fb));if(_0xeb94fb[_0xf5f6('0x18')]){if(_0xeb94fb[_0xf5f6('0x18')]['code']===0x1f4){logger[_0xf5f6('0x18')](_0xf5f6('0x14'),_0x5ba0f5,_0xeb94fb[_0xf5f6('0x18')][_0xf5f6('0x19')]);return _0x491c14(_0xeb94fb['error'][_0xf5f6('0x19')]);}logger[_0xf5f6('0x18')](_0xf5f6('0x14'),_0x5ba0f5,_0xeb94fb[_0xf5f6('0x18')]['message']);return _0x369b18(_0xeb94fb['error'][_0xf5f6('0x19')]);}else{logger['info'](_0xf5f6('0x14'),_0x5ba0f5,'request\x20sent');_0x369b18(_0xeb94fb[_0xf5f6('0x1a')][_0xf5f6('0x19')]);}})[_0xf5f6('0x1b')](function(_0x301e2a){logger[_0xf5f6('0x18')](_0xf5f6('0x14'),_0x5ba0f5,_0x301e2a);_0x491c14(_0x301e2a);});});}
\ No newline at end of file
+var _0xca84=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./userProfile.socket','request','then','info','request\x20sent','error','UserProfile,\x20%s,\x20%s','message','result','catch','lodash','util','moment','randomstring','ioredis'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xca84,0xf5));var _0x4ca8=function(_0x279eef,_0x2f56ce){_0x279eef=_0x279eef-0x0;var _0x44f487=_0xca84[_0x279eef];return _0x44f487;};'use strict';var _=require(_0x4ca8('0x0'));var util=require(_0x4ca8('0x1'));var moment=require(_0x4ca8('0x2'));var BPromise=require('bluebird');var rs=require(_0x4ca8('0x3'));var fs=require('fs');var Redis=require(_0x4ca8('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x4ca8('0x5'));var logger=require(_0x4ca8('0x6'))(_0x4ca8('0x7'));var config=require(_0x4ca8('0x8'));var jayson=require(_0x4ca8('0x9'));var client=jayson[_0x4ca8('0xa')][_0x4ca8('0xb')]({'port':0x232a});config[_0x4ca8('0xc')]=_[_0x4ca8('0xd')](config[_0x4ca8('0xc')],{'host':'localhost','port':0x18eb});var socket=require(_0x4ca8('0xe'))(new Redis(config['redis']));require(_0x4ca8('0xf'))['register'](socket);function respondWithRpcPromise(_0x2f1198,_0x57db27,_0x41991d){return new BPromise(function(_0x53ffa,_0x3cc932){return client[_0x4ca8('0x10')](_0x2f1198,_0x41991d)[_0x4ca8('0x11')](function(_0x45e7d0){logger[_0x4ca8('0x12')]('UserProfile,\x20%s,\x20%s',_0x57db27,'request\x20sent');logger['debug']('UserProfile,\x20%s,\x20%s,\x20%s',_0x57db27,_0x4ca8('0x13'),JSON['stringify'](_0x45e7d0));if(_0x45e7d0[_0x4ca8('0x14')]){if(_0x45e7d0[_0x4ca8('0x14')]['code']===0x1f4){logger['error'](_0x4ca8('0x15'),_0x57db27,_0x45e7d0[_0x4ca8('0x14')][_0x4ca8('0x16')]);return _0x3cc932(_0x45e7d0[_0x4ca8('0x14')][_0x4ca8('0x16')]);}logger[_0x4ca8('0x14')](_0x4ca8('0x15'),_0x57db27,_0x45e7d0[_0x4ca8('0x14')][_0x4ca8('0x16')]);return _0x53ffa(_0x45e7d0[_0x4ca8('0x14')][_0x4ca8('0x16')]);}else{logger[_0x4ca8('0x12')]('UserProfile,\x20%s,\x20%s',_0x57db27,_0x4ca8('0x13'));_0x53ffa(_0x45e7d0[_0x4ca8('0x17')][_0x4ca8('0x16')]);}})[_0x4ca8('0x18')](function(_0x28fe2b){logger['error'](_0x4ca8('0x15'),_0x57db27,_0x28fe2b);_0x3cc932(_0x28fe2b);});});}
\ No newline at end of file
index f7199b0..fd34cd4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd4b2=['emit','removeListener','length','userProfile:','./userProfile.events','save','remove'];(function(_0x2d2153,_0x4509d6){var _0x20299e=function(_0x5cf09f){while(--_0x5cf09f){_0x2d2153['push'](_0x2d2153['shift']());}};_0x20299e(++_0x4509d6);}(_0xd4b2,0x19a));var _0x2d4b=function(_0x565569,_0x5c0375){_0x565569=_0x565569-0x0;var _0x1ac5da=_0xd4b2[_0x565569];return _0x1ac5da;};'use strict';var UserProfileEvents=require(_0x2d4b('0x0'));var events=[_0x2d4b('0x1'),_0x2d4b('0x2'),'update'];function createListener(_0x1d4bc4,_0x249732){return function(_0xb4430f){_0x249732[_0x2d4b('0x3')](_0x1d4bc4,_0xb4430f);};}function removeListener(_0x450fb3,_0x466c2a){return function(){UserProfileEvents[_0x2d4b('0x4')](_0x450fb3,_0x466c2a);};}exports['register']=function(_0x401bc1){for(var _0x52ad68=0x0,_0x332911=events[_0x2d4b('0x5')];_0x52ad68<_0x332911;_0x52ad68++){var _0x2ff4d5=events[_0x52ad68];var _0x4aafd4=createListener(_0x2d4b('0x6')+_0x2ff4d5,_0x401bc1);UserProfileEvents['on'](_0x2ff4d5,_0x4aafd4);}};
\ No newline at end of file
+var _0x9ce6=['removeListener','register','length','userProfile:','save','remove','update'];(function(_0x3a9d93,_0x360cbc){var _0x254ba7=function(_0xe716e1){while(--_0xe716e1){_0x3a9d93['push'](_0x3a9d93['shift']());}};_0x254ba7(++_0x360cbc);}(_0x9ce6,0x100));var _0x69ce=function(_0x4bcfb2,_0x43c1d1){_0x4bcfb2=_0x4bcfb2-0x0;var _0x25579b=_0x9ce6[_0x4bcfb2];return _0x25579b;};'use strict';var UserProfileEvents=require('./userProfile.events');var events=[_0x69ce('0x0'),_0x69ce('0x1'),_0x69ce('0x2')];function createListener(_0x2cfd13,_0xbcdfff){return function(_0x4c2415){_0xbcdfff['emit'](_0x2cfd13,_0x4c2415);};}function removeListener(_0x2f604b,_0x1f9e38){return function(){UserProfileEvents[_0x69ce('0x3')](_0x2f604b,_0x1f9e38);};}exports[_0x69ce('0x4')]=function(_0x39c34c){for(var _0x4d039a=0x0,_0x5e4aa7=events[_0x69ce('0x5')];_0x4d039a<_0x5e4aa7;_0x4d039a++){var _0x478e97=events[_0x4d039a];var _0xdc162a=createListener(_0x69ce('0x6')+_0x478e97,_0x39c34c);UserProfileEvents['on'](_0x478e97,_0xdc162a);}};
\ No newline at end of file
index a843c22..5608ad9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x832c=['/describe','isAuthenticated','/:id','show','post','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','index','get'];(function(_0x40eb76,_0x5b3287){var _0x5964e9=function(_0x323350){while(--_0x323350){_0x40eb76['push'](_0x40eb76['shift']());}};_0x5964e9(++_0x5b3287);}(_0x832c,0x164));var _0xc832=function(_0x407f59,_0x5720d3){_0x407f59=_0x407f59-0x0;var _0x2f839a=_0x832c[_0x407f59];return _0x2f839a;};'use strict';var multer=require(_0xc832('0x0'));var util=require(_0xc832('0x1'));var path=require(_0xc832('0x2'));var timeout=require(_0xc832('0x3'));var express=require(_0xc832('0x4'));var router=express[_0xc832('0x5')]();var fs_extra=require(_0xc832('0x6'));var auth=require(_0xc832('0x7'));var interaction=require(_0xc832('0x8'));var config=require(_0xc832('0x9'));var controller=require('./userProfileResource.controller');router['get']('/',auth['isAuthenticated'](),controller[_0xc832('0xa')]);router[_0xc832('0xb')](_0xc832('0xc'),auth[_0xc832('0xd')](),controller['describe']);router['get'](_0xc832('0xe'),auth['isAuthenticated'](),controller[_0xc832('0xf')]);router[_0xc832('0x10')]('/',auth[_0xc832('0xd')](),controller[_0xc832('0x11')]);router[_0xc832('0x12')](_0xc832('0xe'),auth[_0xc832('0xd')](),controller[_0xc832('0x13')]);router[_0xc832('0x14')](_0xc832('0xe'),auth[_0xc832('0xd')](),controller[_0xc832('0x15')]);module[_0xc832('0x16')]=router;
\ No newline at end of file
+var _0x0009=['create','put','update','destroy','multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','get','isAuthenticated','describe','/:id','show','post'];(function(_0x17d133,_0x3aebc5){var _0xf4f7a2=function(_0x30277d){while(--_0x30277d){_0x17d133['push'](_0x17d133['shift']());}};_0xf4f7a2(++_0x3aebc5);}(_0x0009,0x94));var _0x9000=function(_0x5c5f2f,_0x4325f3){_0x5c5f2f=_0x5c5f2f-0x0;var _0x4ecef=_0x0009[_0x5c5f2f];return _0x4ecef;};'use strict';var multer=require(_0x9000('0x0'));var util=require(_0x9000('0x1'));var path=require('path');var timeout=require(_0x9000('0x2'));var express=require(_0x9000('0x3'));var router=express[_0x9000('0x4')]();var fs_extra=require(_0x9000('0x5'));var auth=require(_0x9000('0x6'));var interaction=require(_0x9000('0x7'));var config=require('../../config/environment');var controller=require('./userProfileResource.controller');router[_0x9000('0x8')]('/',auth[_0x9000('0x9')](),controller['index']);router[_0x9000('0x8')]('/describe',auth[_0x9000('0x9')](),controller[_0x9000('0xa')]);router[_0x9000('0x8')](_0x9000('0xb'),auth[_0x9000('0x9')](),controller[_0x9000('0xc')]);router[_0x9000('0xd')]('/',auth[_0x9000('0x9')](),controller[_0x9000('0xe')]);router[_0x9000('0xf')](_0x9000('0xb'),auth[_0x9000('0x9')](),controller[_0x9000('0x10')]);router['delete']('/:id',auth[_0x9000('0x9')](),controller[_0x9000('0x11')]);module['exports']=router;
\ No newline at end of file
index 94bb20b..98a5e7b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe760=['exports','STRING','INTEGER','sequelize'];(function(_0x292e87,_0x9b2eb5){var _0x5186f6=function(_0x2eb5b6){while(--_0x2eb5b6){_0x292e87['push'](_0x292e87['shift']());}};_0x5186f6(++_0x9b2eb5);}(_0xe760,0x133));var _0x0e76=function(_0x5aa39e,_0x5ca516){_0x5aa39e=_0x5aa39e-0x0;var _0x2319a5=_0xe760[_0x5aa39e];return _0x2319a5;};'use strict';var Sequelize=require(_0x0e76('0x0'));module[_0x0e76('0x1')]={'name':{'type':Sequelize[_0x0e76('0x2')],'allowNull':![]},'resourceId':{'type':Sequelize[_0x0e76('0x3')],'allowNull':![]},'type':{'type':Sequelize['STRING'],'allowNull':![]}};
\ No newline at end of file
+var _0xf4d3=['STRING','sequelize','INTEGER'];(function(_0x5b4b22,_0x1191e3){var _0x2febc0=function(_0x1287e3){while(--_0x1287e3){_0x5b4b22['push'](_0x5b4b22['shift']());}};_0x2febc0(++_0x1191e3);}(_0xf4d3,0x91));var _0x3f4d=function(_0x425d67,_0x5cdb40){_0x425d67=_0x425d67-0x0;var _0x49b609=_0xf4d3[_0x425d67];return _0x49b609;};'use strict';var Sequelize=require(_0x3f4d('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![]},'resourceId':{'type':Sequelize[_0x3f4d('0x1')],'allowNull':![]},'type':{'type':Sequelize[_0x3f4d('0x2')],'allowNull':![]}};
\ No newline at end of file
index e93d660..85bffe7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe2fe=['find','body','params','describe','eml-format','fast-json-patch','moment','bluebird','mustache','util','path','to-csv','ejs','lodash','squel','jsforce','querystring','ioredis','../../components/auth/service','api','../../mysqldb','sendStatus','status','offset','limit','count','set','Content-Range','json','reject','save','update','then','destroy','end','name','send','index','map','UserProfileResource','rawAttributes','type','key','keys','query','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','includeAll','include','catch','show'];(function(_0xbcb6,_0x8e00a9){var _0x58899b=function(_0x35e0c4){while(--_0x35e0c4){_0xbcb6['push'](_0xbcb6['shift']());}};_0x58899b(++_0x8e00a9);}(_0xe2fe,0x86));var _0xee2f=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0xe2fe[_0x14add3];return _0x4a174f;};'use strict';var emlformat=require(_0xee2f('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xee2f('0x1'));var rp=require('request-promise');var moment=require(_0xee2f('0x2'));var BPromise=require(_0xee2f('0x3'));var Mustache=require(_0xee2f('0x4'));var util=require(_0xee2f('0x5'));var path=require(_0xee2f('0x6'));var sox=require('sox');var csv=require(_0xee2f('0x7'));var ejs=require(_0xee2f('0x8'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xee2f('0x9'));var squel=require(_0xee2f('0xa'));var crypto=require('crypto');var jsforce=require(_0xee2f('0xb'));var deskjs=require('desk.js');var toCsv=require(_0xee2f('0x7'));var querystring=require(_0xee2f('0xc'));var Papa=require('papaparse');var Redis=require(_0xee2f('0xd'));var authService=require(_0xee2f('0xe'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0xee2f('0xf'));var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0xee2f('0x10'))['db'];function respondWithStatusCode(_0x346dbc,_0xa13e7b){_0xa13e7b=_0xa13e7b||0xcc;return function(_0x100449){if(_0x100449){return _0x346dbc[_0xee2f('0x11')](_0xa13e7b);}return _0x346dbc[_0xee2f('0x12')](_0xa13e7b)['end']();};}function respondWithResult(_0x3861e6,_0x531c3a){_0x531c3a=_0x531c3a||0xc8;return function(_0x36db10){if(_0x36db10){return _0x3861e6[_0xee2f('0x12')](_0x531c3a)['json'](_0x36db10);}};}function respondWithFilteredResult(_0x445ba8,_0x145241){return function(_0x28b614){if(_0x28b614){var _0x1bbf7d=typeof _0x145241[_0xee2f('0x13')]==='undefined'&&typeof _0x145241[_0xee2f('0x14')]==='undefined';var _0x17d288=_0x28b614[_0xee2f('0x15')];var _0x502eb6=_0x1bbf7d?0x0:_0x145241['offset'];var _0x40b5bc=_0x1bbf7d?_0x28b614['count']:_0x145241[_0xee2f('0x13')]+_0x145241[_0xee2f('0x14')];var _0x28549d;if(_0x40b5bc>=_0x17d288){_0x40b5bc=_0x17d288;_0x28549d=0xc8;}else{_0x28549d=0xce;}_0x445ba8['status'](_0x28549d);return _0x445ba8[_0xee2f('0x16')](_0xee2f('0x17'),_0x502eb6+'-'+_0x40b5bc+'/'+_0x17d288)[_0xee2f('0x18')](_0x28b614);}return null;};}function patchUpdates(_0x21fdf4){return function(_0x3d892d){try{jsonpatch['apply'](_0x3d892d,_0x21fdf4,!![]);}catch(_0x5e73ad){return BPromise[_0xee2f('0x19')](_0x5e73ad);}return _0x3d892d[_0xee2f('0x1a')]();};}function saveUpdates(_0x1ea808,_0x203b2f){return function(_0x472e3b){if(_0x472e3b){return _0x472e3b[_0xee2f('0x1b')](_0x1ea808)[_0xee2f('0x1c')](function(_0x4d68d3){return _0x4d68d3;});}return null;};}function removeEntity(_0x250399,_0x2c47c5){return function(_0x15ceda){if(_0x15ceda){return _0x15ceda[_0xee2f('0x1d')]()[_0xee2f('0x1c')](function(){_0x250399[_0xee2f('0x12')](0xcc)[_0xee2f('0x1e')]();});}};}function handleEntityNotFound(_0x13013f,_0x382174){return function(_0x1e394f){if(!_0x1e394f){_0x13013f[_0xee2f('0x11')](0x194);}return _0x1e394f;};}function handleError(_0x168adc,_0x1c8454){_0x1c8454=_0x1c8454||0x1f4;return function(_0x45c4a0){logger['error'](_0x45c4a0['stack']);if(_0x45c4a0['name']){delete _0x45c4a0[_0xee2f('0x1f')];}_0x168adc[_0xee2f('0x12')](_0x1c8454)[_0xee2f('0x20')](_0x45c4a0);};}exports[_0xee2f('0x21')]=function(_0x892a4e,_0x3737fd){var _0x4d8398={},_0x3d3806={},_0x52e1fa={'count':0x0,'rows':[]};var _0x235697=_[_0xee2f('0x22')](db[_0xee2f('0x23')][_0xee2f('0x24')],function(_0x3ddbe3){return{'name':_0x3ddbe3['fieldName'],'type':_0x3ddbe3[_0xee2f('0x25')][_0xee2f('0x26')]};});_0x3d3806['model']=_['map'](_0x235697,_0xee2f('0x1f'));_0x3d3806['query']=_[_0xee2f('0x27')](_0x892a4e[_0xee2f('0x28')]);_0x3d3806['filters']=_[_0xee2f('0x29')](_0x3d3806['model'],_0x3d3806['query']);_0x4d8398['attributes']=_[_0xee2f('0x29')](_0x3d3806[_0xee2f('0x2a')],qs['fields'](_0x892a4e[_0xee2f('0x28')][_0xee2f('0x2b')]));_0x4d8398[_0xee2f('0x2c')]=_0x4d8398[_0xee2f('0x2c')][_0xee2f('0x2d')]?_0x4d8398['attributes']:_0x3d3806[_0xee2f('0x2a')];if(!_0x892a4e['query'][_0xee2f('0x2e')](_0xee2f('0x2f'))){_0x4d8398[_0xee2f('0x14')]=qs['limit'](_0x892a4e[_0xee2f('0x28')]['limit']);_0x4d8398[_0xee2f('0x13')]=qs['offset'](_0x892a4e[_0xee2f('0x28')][_0xee2f('0x13')]);}_0x4d8398[_0xee2f('0x30')]=qs[_0xee2f('0x31')](_0x892a4e[_0xee2f('0x28')][_0xee2f('0x31')]);_0x4d8398[_0xee2f('0x32')]=qs[_0xee2f('0x33')](_[_0xee2f('0x34')](_0x892a4e[_0xee2f('0x28')],_0x3d3806[_0xee2f('0x33')]),_0x235697);if(_0x892a4e['query'][_0xee2f('0x35')]){_0x4d8398['where']=_[_0xee2f('0x36')](_0x4d8398[_0xee2f('0x32')],{'$or':_[_0xee2f('0x22')](_0x235697,function(_0x2cbb89){if(_0x2cbb89[_0xee2f('0x25')]!==_0xee2f('0x37')){var _0x694950={};_0x694950[_0x2cbb89[_0xee2f('0x1f')]]={'$like':'%'+_0x892a4e['query']['filter']+'%'};return _0x694950;}})});}_0x4d8398=_['merge']({},_0x4d8398,_0x892a4e[_0xee2f('0x38')]);var _0x5483ae={'where':_0x4d8398[_0xee2f('0x32')]};return db['UserProfileResource']['count'](_0x5483ae)['then'](function(_0x58e361){_0x52e1fa[_0xee2f('0x15')]=_0x58e361;if(_0x892a4e[_0xee2f('0x28')][_0xee2f('0x39')]){_0x4d8398[_0xee2f('0x3a')]=[{'all':!![]}];}return db['UserProfileResource']['findAll'](_0x4d8398);})[_0xee2f('0x1c')](function(_0x5e12b7){_0x52e1fa['rows']=_0x5e12b7;return _0x52e1fa;})[_0xee2f('0x1c')](respondWithFilteredResult(_0x3737fd,_0x4d8398))[_0xee2f('0x3b')](handleError(_0x3737fd,null));};exports[_0xee2f('0x3c')]=function(_0x54130b,_0x3bc173){var _0x27c447={'raw':![],'where':{'id':_0x54130b['params']['id']}},_0x19bd4d={};_0x19bd4d['model']=_[_0xee2f('0x27')](db[_0xee2f('0x23')][_0xee2f('0x24')]);_0x19bd4d[_0xee2f('0x28')]=_['keys'](_0x54130b[_0xee2f('0x28')]);_0x19bd4d[_0xee2f('0x33')]=_[_0xee2f('0x29')](_0x19bd4d[_0xee2f('0x2a')],_0x19bd4d[_0xee2f('0x28')]);_0x27c447[_0xee2f('0x2c')]=_[_0xee2f('0x29')](_0x19bd4d[_0xee2f('0x2a')],qs[_0xee2f('0x2b')](_0x54130b[_0xee2f('0x28')]['fields']));_0x27c447['attributes']=_0x27c447['attributes']['length']?_0x27c447[_0xee2f('0x2c')]:_0x19bd4d[_0xee2f('0x2a')];if(_0x54130b[_0xee2f('0x28')][_0xee2f('0x39')]){_0x27c447[_0xee2f('0x3a')]=[{'all':!![]}];}_0x27c447=_['merge']({},_0x27c447,_0x54130b[_0xee2f('0x38')]);return db[_0xee2f('0x23')][_0xee2f('0x3d')](_0x27c447)[_0xee2f('0x1c')](handleEntityNotFound(_0x3bc173,null))['then'](respondWithResult(_0x3bc173,null))['catch'](handleError(_0x3bc173,null));};exports['create']=function(_0x1609f0,_0x54cc44){return db['UserProfileResource']['create'](_0x1609f0['body'],{})[_0xee2f('0x1c')](respondWithResult(_0x54cc44,0xc9))[_0xee2f('0x3b')](handleError(_0x54cc44,null));};exports[_0xee2f('0x1b')]=function(_0x584383,_0x22506e){if(_0x584383['body']['id']){delete _0x584383[_0xee2f('0x3e')]['id'];}return db[_0xee2f('0x23')][_0xee2f('0x3d')]({'where':{'id':_0x584383[_0xee2f('0x3f')]['id']}})[_0xee2f('0x1c')](handleEntityNotFound(_0x22506e,null))['then'](saveUpdates(_0x584383['body'],null))[_0xee2f('0x1c')](respondWithResult(_0x22506e,null))['catch'](handleError(_0x22506e,null));};exports[_0xee2f('0x1d')]=function(_0x282e89,_0x1928f8){return db[_0xee2f('0x23')]['find']({'where':{'id':_0x282e89['params']['id']}})[_0xee2f('0x1c')](handleEntityNotFound(_0x1928f8,null))[_0xee2f('0x1c')](removeEntity(_0x1928f8,null))[_0xee2f('0x3b')](handleError(_0x1928f8,null));};exports[_0xee2f('0x40')]=function(_0x3acae6,_0x2a450f){return db[_0xee2f('0x23')][_0xee2f('0x40')]()[_0xee2f('0x1c')](respondWithResult(_0x2a450f,null))[_0xee2f('0x3b')](handleError(_0x2a450f,null));};
\ No newline at end of file
+var _0xb016=['util','path','to-csv','ejs','fs-extra','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','then','destroy','end','error','name','send','index','map','UserProfileResource','type','model','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','catch','params','update','find','body','describe','eml-format','rimraf','request-promise','bluebird','mustache'];(function(_0x533fd6,_0x3a7083){var _0x5a447d=function(_0x41e7e9){while(--_0x41e7e9){_0x533fd6['push'](_0x533fd6['shift']());}};_0x5a447d(++_0x3a7083);}(_0xb016,0x159));var _0x6b01=function(_0x4d52fa,_0x2a72a2){_0x4d52fa=_0x4d52fa-0x0;var _0x4002a5=_0xb016[_0x4d52fa];return _0x4002a5;};'use strict';var emlformat=require(_0x6b01('0x0'));var rimraf=require(_0x6b01('0x1'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x6b01('0x2'));var moment=require('moment');var BPromise=require(_0x6b01('0x3'));var Mustache=require(_0x6b01('0x4'));var util=require(_0x6b01('0x5'));var path=require(_0x6b01('0x6'));var sox=require('sox');var csv=require(_0x6b01('0x7'));var ejs=require(_0x6b01('0x8'));var fs=require('fs');var fs_extra=require(_0x6b01('0x9'));var _=require('lodash');var squel=require('squel');var crypto=require(_0x6b01('0xa'));var jsforce=require(_0x6b01('0xb'));var deskjs=require('desk.js');var toCsv=require('to-csv');var querystring=require(_0x6b01('0xc'));var Papa=require(_0x6b01('0xd'));var Redis=require(_0x6b01('0xe'));var authService=require(_0x6b01('0xf'));var qs=require(_0x6b01('0x10'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x6b01('0x11'))(_0x6b01('0x12'));var utils=require(_0x6b01('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0x6b01('0x14'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x51f976,_0x26f2a0){_0x26f2a0=_0x26f2a0||0xcc;return function(_0x4fa826){if(_0x4fa826){return _0x51f976[_0x6b01('0x15')](_0x26f2a0);}return _0x51f976[_0x6b01('0x16')](_0x26f2a0)['end']();};}function respondWithResult(_0x2c305e,_0x4ea5fa){_0x4ea5fa=_0x4ea5fa||0xc8;return function(_0x50d778){if(_0x50d778){return _0x2c305e['status'](_0x4ea5fa)[_0x6b01('0x17')](_0x50d778);}};}function respondWithFilteredResult(_0x4cbd38,_0x5b2f60){return function(_0x3a259f){if(_0x3a259f){var _0x327e86=typeof _0x5b2f60[_0x6b01('0x18')]===_0x6b01('0x19')&&typeof _0x5b2f60[_0x6b01('0x1a')]===_0x6b01('0x19');var _0x122769=_0x3a259f[_0x6b01('0x1b')];var _0x9c6571=_0x327e86?0x0:_0x5b2f60[_0x6b01('0x18')];var _0x18f336=_0x327e86?_0x3a259f['count']:_0x5b2f60[_0x6b01('0x18')]+_0x5b2f60[_0x6b01('0x1a')];var _0x3b0bab;if(_0x18f336>=_0x122769){_0x18f336=_0x122769;_0x3b0bab=0xc8;}else{_0x3b0bab=0xce;}_0x4cbd38[_0x6b01('0x16')](_0x3b0bab);return _0x4cbd38[_0x6b01('0x1c')](_0x6b01('0x1d'),_0x9c6571+'-'+_0x18f336+'/'+_0x122769)[_0x6b01('0x17')](_0x3a259f);}return null;};}function patchUpdates(_0x3c0573){return function(_0x54a942){try{jsonpatch[_0x6b01('0x1e')](_0x54a942,_0x3c0573,!![]);}catch(_0xc1f453){return BPromise[_0x6b01('0x1f')](_0xc1f453);}return _0x54a942[_0x6b01('0x20')]();};}function saveUpdates(_0x1fced4,_0x181b09){return function(_0x2cea6e){if(_0x2cea6e){return _0x2cea6e['update'](_0x1fced4)[_0x6b01('0x21')](function(_0xcf9200){return _0xcf9200;});}return null;};}function removeEntity(_0x42c990,_0x51243c){return function(_0x399808){if(_0x399808){return _0x399808[_0x6b01('0x22')]()[_0x6b01('0x21')](function(){_0x42c990[_0x6b01('0x16')](0xcc)[_0x6b01('0x23')]();});}};}function handleEntityNotFound(_0x2456e9,_0x1b46fb){return function(_0x136452){if(!_0x136452){_0x2456e9[_0x6b01('0x15')](0x194);}return _0x136452;};}function handleError(_0x152dda,_0x3c0607){_0x3c0607=_0x3c0607||0x1f4;return function(_0xa846d8){logger[_0x6b01('0x24')](_0xa846d8['stack']);if(_0xa846d8[_0x6b01('0x25')]){delete _0xa846d8[_0x6b01('0x25')];}_0x152dda[_0x6b01('0x16')](_0x3c0607)[_0x6b01('0x26')](_0xa846d8);};}exports[_0x6b01('0x27')]=function(_0x528cbd,_0x54f030){var _0x3fae61={},_0x3df3d4={},_0xc574c={'count':0x0,'rows':[]};var _0x8883d1=_[_0x6b01('0x28')](db[_0x6b01('0x29')]['rawAttributes'],function(_0x39f193){return{'name':_0x39f193['fieldName'],'type':_0x39f193[_0x6b01('0x2a')]['key']};});_0x3df3d4[_0x6b01('0x2b')]=_[_0x6b01('0x28')](_0x8883d1,_0x6b01('0x25'));_0x3df3d4[_0x6b01('0x2c')]=_[_0x6b01('0x2d')](_0x528cbd['query']);_0x3df3d4[_0x6b01('0x2e')]=_[_0x6b01('0x2f')](_0x3df3d4[_0x6b01('0x2b')],_0x3df3d4['query']);_0x3fae61['attributes']=_[_0x6b01('0x2f')](_0x3df3d4['model'],qs[_0x6b01('0x30')](_0x528cbd[_0x6b01('0x2c')][_0x6b01('0x30')]));_0x3fae61['attributes']=_0x3fae61[_0x6b01('0x31')][_0x6b01('0x32')]?_0x3fae61[_0x6b01('0x31')]:_0x3df3d4['model'];if(!_0x528cbd[_0x6b01('0x2c')][_0x6b01('0x33')](_0x6b01('0x34'))){_0x3fae61[_0x6b01('0x1a')]=qs[_0x6b01('0x1a')](_0x528cbd['query'][_0x6b01('0x1a')]);_0x3fae61[_0x6b01('0x18')]=qs[_0x6b01('0x18')](_0x528cbd[_0x6b01('0x2c')][_0x6b01('0x18')]);}_0x3fae61[_0x6b01('0x35')]=qs[_0x6b01('0x36')](_0x528cbd[_0x6b01('0x2c')]['sort']);_0x3fae61[_0x6b01('0x37')]=qs['filters'](_[_0x6b01('0x38')](_0x528cbd[_0x6b01('0x2c')],_0x3df3d4[_0x6b01('0x2e')]),_0x8883d1);if(_0x528cbd[_0x6b01('0x2c')][_0x6b01('0x39')]){_0x3fae61[_0x6b01('0x37')]=_[_0x6b01('0x3a')](_0x3fae61['where'],{'$or':_[_0x6b01('0x28')](_0x8883d1,function(_0x15f274){if(_0x15f274[_0x6b01('0x2a')]!==_0x6b01('0x3b')){var _0x1ca3aa={};_0x1ca3aa[_0x15f274[_0x6b01('0x25')]]={'$like':'%'+_0x528cbd[_0x6b01('0x2c')][_0x6b01('0x39')]+'%'};return _0x1ca3aa;}})});}_0x3fae61=_['merge']({},_0x3fae61,_0x528cbd[_0x6b01('0x3c')]);var _0x55907f={'where':_0x3fae61[_0x6b01('0x37')]};return db[_0x6b01('0x29')]['count'](_0x55907f)[_0x6b01('0x21')](function(_0x2e661b){_0xc574c[_0x6b01('0x1b')]=_0x2e661b;if(_0x528cbd[_0x6b01('0x2c')][_0x6b01('0x3d')]){_0x3fae61[_0x6b01('0x3e')]=[{'all':!![]}];}return db[_0x6b01('0x29')][_0x6b01('0x3f')](_0x3fae61);})[_0x6b01('0x21')](function(_0x17f335){_0xc574c['rows']=_0x17f335;return _0xc574c;})[_0x6b01('0x21')](respondWithFilteredResult(_0x54f030,_0x3fae61))[_0x6b01('0x40')](handleError(_0x54f030,null));};exports['show']=function(_0x52cec0,_0x32b9ec){var _0xd11195={'raw':![],'where':{'id':_0x52cec0[_0x6b01('0x41')]['id']}},_0x558ec1={};_0x558ec1[_0x6b01('0x2b')]=_['keys'](db[_0x6b01('0x29')]['rawAttributes']);_0x558ec1[_0x6b01('0x2c')]=_[_0x6b01('0x2d')](_0x52cec0[_0x6b01('0x2c')]);_0x558ec1['filters']=_[_0x6b01('0x2f')](_0x558ec1[_0x6b01('0x2b')],_0x558ec1['query']);_0xd11195['attributes']=_['intersection'](_0x558ec1[_0x6b01('0x2b')],qs[_0x6b01('0x30')](_0x52cec0[_0x6b01('0x2c')][_0x6b01('0x30')]));_0xd11195[_0x6b01('0x31')]=_0xd11195[_0x6b01('0x31')]['length']?_0xd11195[_0x6b01('0x31')]:_0x558ec1[_0x6b01('0x2b')];if(_0x52cec0[_0x6b01('0x2c')][_0x6b01('0x3d')]){_0xd11195[_0x6b01('0x3e')]=[{'all':!![]}];}_0xd11195=_[_0x6b01('0x3a')]({},_0xd11195,_0x52cec0['options']);return db[_0x6b01('0x29')]['find'](_0xd11195)['then'](handleEntityNotFound(_0x32b9ec,null))[_0x6b01('0x21')](respondWithResult(_0x32b9ec,null))[_0x6b01('0x40')](handleError(_0x32b9ec,null));};exports['create']=function(_0x408bb0,_0x27442e){return db[_0x6b01('0x29')]['create'](_0x408bb0['body'],{})['then'](respondWithResult(_0x27442e,0xc9))[_0x6b01('0x40')](handleError(_0x27442e,null));};exports[_0x6b01('0x42')]=function(_0x518d94,_0x34cef6){if(_0x518d94['body']['id']){delete _0x518d94['body']['id'];}return db['UserProfileResource'][_0x6b01('0x43')]({'where':{'id':_0x518d94[_0x6b01('0x41')]['id']}})['then'](handleEntityNotFound(_0x34cef6,null))['then'](saveUpdates(_0x518d94[_0x6b01('0x44')],null))['then'](respondWithResult(_0x34cef6,null))[_0x6b01('0x40')](handleError(_0x34cef6,null));};exports[_0x6b01('0x22')]=function(_0x32d446,_0x172a56){return db[_0x6b01('0x29')]['find']({'where':{'id':_0x32d446[_0x6b01('0x41')]['id']}})[_0x6b01('0x21')](handleEntityNotFound(_0x172a56,null))[_0x6b01('0x21')](removeEntity(_0x172a56,null))['catch'](handleError(_0x172a56,null));};exports[_0x6b01('0x45')]=function(_0x13ab4f,_0x5617d7){return db[_0x6b01('0x29')][_0x6b01('0x45')]()[_0x6b01('0x21')](respondWithResult(_0x5617d7,null))[_0x6b01('0x40')](handleError(_0x5617d7,null));};
\ No newline at end of file
index d3778da..cf76b66 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5e1b=['compositeIndex','resourceId','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./userProfileResource.attributes','exports','define','UserProfileResource','user_profile_has_resources'];(function(_0x199572,_0x33e667){var _0x13cfa3=function(_0x53c075){while(--_0x53c075){_0x199572['push'](_0x199572['shift']());}};_0x13cfa3(++_0x33e667);}(_0x5e1b,0xf2));var _0xb5e1=function(_0x3e5086,_0x48f4a2){_0x3e5086=_0x3e5086-0x0;var _0xfeb102=_0x5e1b[_0x3e5086];return _0xfeb102;};'use strict';var _=require(_0xb5e1('0x0'));var util=require(_0xb5e1('0x1'));var logger=require(_0xb5e1('0x2'))(_0xb5e1('0x3'));var moment=require('moment');var BPromise=require(_0xb5e1('0x4'));var rp=require(_0xb5e1('0x5'));var fs=require('fs');var path=require(_0xb5e1('0x6'));var rimraf=require(_0xb5e1('0x7'));var config=require(_0xb5e1('0x8'));var attributes=require(_0xb5e1('0x9'));module[_0xb5e1('0xa')]=function(_0x26a595,_0x5085ef){return _0x26a595[_0xb5e1('0xb')](_0xb5e1('0xc'),attributes,{'tableName':_0xb5e1('0xd'),'paranoid':![],'indexes':[{'name':_0xb5e1('0xe'),'fields':[_0xb5e1('0xf'),'sectionId']}],'timestamps':!![]});};
\ No newline at end of file
+var _0x1106=['define','user_profile_has_resources','compositeIndex','sectionId','lodash','util','../../config/logger','moment','bluebird','path','rimraf','./userProfileResource.attributes'];(function(_0x52bd65,_0x160646){var _0x13fd57=function(_0xe84392){while(--_0xe84392){_0x52bd65['push'](_0x52bd65['shift']());}};_0x13fd57(++_0x160646);}(_0x1106,0xdc));var _0x6110=function(_0x1fd5e7,_0x176f82){_0x1fd5e7=_0x1fd5e7-0x0;var _0x3a2021=_0x1106[_0x1fd5e7];return _0x3a2021;};'use strict';var _=require(_0x6110('0x0'));var util=require(_0x6110('0x1'));var logger=require(_0x6110('0x2'))('api');var moment=require(_0x6110('0x3'));var BPromise=require(_0x6110('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x6110('0x5'));var rimraf=require(_0x6110('0x6'));var config=require('../../config/environment');var attributes=require(_0x6110('0x7'));module['exports']=function(_0x135472,_0x2bb106){return _0x135472[_0x6110('0x8')]('UserProfileResource',attributes,{'tableName':_0x6110('0x9'),'paranoid':![],'indexes':[{'name':_0x6110('0xa'),'fields':['resourceId',_0x6110('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
index 1281aee..91e5651 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdfaa=['info','UserProfileResource,\x20%s,\x20%s','request\x20sent','debug','UserProfileResource,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','rpc','jayson/promise','client','http','request','then'];(function(_0xb74c89,_0x246040){var _0xe4ccef=function(_0x12b652){while(--_0x12b652){_0xb74c89['push'](_0xb74c89['shift']());}};_0xe4ccef(++_0x246040);}(_0xdfaa,0xa5));var _0xadfa=function(_0x3e1d96,_0x9d06b){_0x3e1d96=_0x3e1d96-0x0;var _0x1f8a43=_0xdfaa[_0x3e1d96];return _0x1f8a43;};'use strict';var _=require(_0xadfa('0x0'));var util=require(_0xadfa('0x1'));var moment=require(_0xadfa('0x2'));var BPromise=require(_0xadfa('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xadfa('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xadfa('0x5'));var config=require('../../config/environment');var jayson=require(_0xadfa('0x6'));var client=jayson[_0xadfa('0x7')][_0xadfa('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x512702,_0x168806,_0x2da7eb){return new BPromise(function(_0x47904b,_0x396c91){return client[_0xadfa('0x9')](_0x512702,_0x2da7eb)[_0xadfa('0xa')](function(_0x3d4b6f){logger[_0xadfa('0xb')](_0xadfa('0xc'),_0x168806,_0xadfa('0xd'));logger[_0xadfa('0xe')](_0xadfa('0xf'),_0x168806,_0xadfa('0xd'),JSON[_0xadfa('0x10')](_0x3d4b6f));if(_0x3d4b6f['error']){if(_0x3d4b6f[_0xadfa('0x11')][_0xadfa('0x12')]===0x1f4){logger[_0xadfa('0x11')](_0xadfa('0xc'),_0x168806,_0x3d4b6f['error']['message']);return _0x396c91(_0x3d4b6f[_0xadfa('0x11')][_0xadfa('0x13')]);}logger[_0xadfa('0x11')](_0xadfa('0xc'),_0x168806,_0x3d4b6f['error'][_0xadfa('0x13')]);return _0x47904b(_0x3d4b6f[_0xadfa('0x11')][_0xadfa('0x13')]);}else{logger[_0xadfa('0xb')](_0xadfa('0xc'),_0x168806,'request\x20sent');_0x47904b(_0x3d4b6f[_0xadfa('0x14')][_0xadfa('0x13')]);}})[_0xadfa('0x15')](function(_0x4188c9){logger[_0xadfa('0x11')]('UserProfileResource,\x20%s,\x20%s',_0x168806,_0x4188c9);_0x396c91(_0x4188c9);});});}
\ No newline at end of file
+var _0x9bb6=['stringify','error','code','message','result','catch','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','info','UserProfileResource,\x20%s,\x20%s','request\x20sent','debug','UserProfileResource,\x20%s,\x20%s,\x20%s'];(function(_0x202a6d,_0x5bef9e){var _0x28fa4f=function(_0x622c88){while(--_0x622c88){_0x202a6d['push'](_0x202a6d['shift']());}};_0x28fa4f(++_0x5bef9e);}(_0x9bb6,0x15f));var _0x69bb=function(_0x1fa68b,_0x152e4e){_0x1fa68b=_0x1fa68b-0x0;var _0x32a3c6=_0x9bb6[_0x1fa68b];return _0x32a3c6;};'use strict';var _=require('lodash');var util=require(_0x69bb('0x0'));var moment=require('moment');var BPromise=require(_0x69bb('0x1'));var rs=require(_0x69bb('0x2'));var fs=require('fs');var Redis=require(_0x69bb('0x3'));var db=require(_0x69bb('0x4'))['db'];var utils=require(_0x69bb('0x5'));var logger=require(_0x69bb('0x6'))(_0x69bb('0x7'));var config=require(_0x69bb('0x8'));var jayson=require(_0x69bb('0x9'));var client=jayson['client'][_0x69bb('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x416a36,_0x545722,_0x5f262f){return new BPromise(function(_0x1c3054,_0x5b3eb7){return client[_0x69bb('0xb')](_0x416a36,_0x5f262f)['then'](function(_0x1e33ae){logger[_0x69bb('0xc')](_0x69bb('0xd'),_0x545722,_0x69bb('0xe'));logger[_0x69bb('0xf')](_0x69bb('0x10'),_0x545722,_0x69bb('0xe'),JSON[_0x69bb('0x11')](_0x1e33ae));if(_0x1e33ae[_0x69bb('0x12')]){if(_0x1e33ae[_0x69bb('0x12')][_0x69bb('0x13')]===0x1f4){logger['error'](_0x69bb('0xd'),_0x545722,_0x1e33ae['error'][_0x69bb('0x14')]);return _0x5b3eb7(_0x1e33ae[_0x69bb('0x12')]['message']);}logger[_0x69bb('0x12')]('UserProfileResource,\x20%s,\x20%s',_0x545722,_0x1e33ae[_0x69bb('0x12')][_0x69bb('0x14')]);return _0x1c3054(_0x1e33ae[_0x69bb('0x12')]['message']);}else{logger[_0x69bb('0xc')](_0x69bb('0xd'),_0x545722,'request\x20sent');_0x1c3054(_0x1e33ae[_0x69bb('0x15')][_0x69bb('0x14')]);}})[_0x69bb('0x16')](function(_0x4b9143){logger[_0x69bb('0x12')]('UserProfileResource,\x20%s,\x20%s',_0x545722,_0x4b9143);_0x5b3eb7(_0x4b9143);});});}
\ No newline at end of file
index 6db1406..a7dbc95 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeeea=['put','/:id','update','delete','exports','multer','util','path','express','../../components/auth/service','../../components/interaction/service','../../config/environment','./userProfileSection.controller','get','index','/describe','isAuthenticated','describe','show','post'];(function(_0x1a9516,_0x1fe6f7){var _0x18dcc7=function(_0x2bc9db){while(--_0x2bc9db){_0x1a9516['push'](_0x1a9516['shift']());}};_0x18dcc7(++_0x1fe6f7);}(_0xeeea,0x69));var _0xaeee=function(_0x46e69c,_0x510247){_0x46e69c=_0x46e69c-0x0;var _0x243733=_0xeeea[_0x46e69c];return _0x243733;};'use strict';var multer=require(_0xaeee('0x0'));var util=require(_0xaeee('0x1'));var path=require(_0xaeee('0x2'));var timeout=require('connect-timeout');var express=require(_0xaeee('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xaeee('0x4'));var interaction=require(_0xaeee('0x5'));var config=require(_0xaeee('0x6'));var controller=require(_0xaeee('0x7'));router[_0xaeee('0x8')]('/',auth['isAuthenticated'](),controller[_0xaeee('0x9')]);router[_0xaeee('0x8')](_0xaeee('0xa'),auth[_0xaeee('0xb')](),controller[_0xaeee('0xc')]);router[_0xaeee('0x8')]('/:id',auth[_0xaeee('0xb')](),controller[_0xaeee('0xd')]);router[_0xaeee('0xe')]('/',auth['isAuthenticated'](),controller['create']);router[_0xaeee('0xf')](_0xaeee('0x10'),auth[_0xaeee('0xb')](),controller[_0xaeee('0x11')]);router[_0xaeee('0x12')](_0xaeee('0x10'),auth[_0xaeee('0xb')](),controller['destroy']);module[_0xaeee('0x13')]=router;
\ No newline at end of file
+var _0x4359=['util','connect-timeout','express','Router','fs-extra','../../components/interaction/service','isAuthenticated','index','get','describe','/:id','show','post','create','put','update','delete','destroy'];(function(_0x274ffb,_0x5a4d27){var _0x4ccbcc=function(_0x3470d){while(--_0x3470d){_0x274ffb['push'](_0x274ffb['shift']());}};_0x4ccbcc(++_0x5a4d27);}(_0x4359,0x132));var _0x9435=function(_0x9654f6,_0x4cde9c){_0x9654f6=_0x9654f6-0x0;var _0xeba80d=_0x4359[_0x9654f6];return _0xeba80d;};'use strict';var multer=require('multer');var util=require(_0x9435('0x0'));var path=require('path');var timeout=require(_0x9435('0x1'));var express=require(_0x9435('0x2'));var router=express[_0x9435('0x3')]();var fs_extra=require(_0x9435('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x9435('0x5'));var config=require('../../config/environment');var controller=require('./userProfileSection.controller');router['get']('/',auth[_0x9435('0x6')](),controller[_0x9435('0x7')]);router[_0x9435('0x8')]('/describe',auth[_0x9435('0x6')](),controller[_0x9435('0x9')]);router[_0x9435('0x8')](_0x9435('0xa'),auth[_0x9435('0x6')](),controller[_0x9435('0xb')]);router[_0x9435('0xc')]('/',auth['isAuthenticated'](),controller[_0x9435('0xd')]);router[_0x9435('0xe')](_0x9435('0xa'),auth[_0x9435('0x6')](),controller[_0x9435('0xf')]);router[_0x9435('0x10')](_0x9435('0xa'),auth[_0x9435('0x6')](),controller[_0x9435('0x11')]);module['exports']=router;
\ No newline at end of file
index 421dfbb..f75bbed 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7d25=['INTEGER','BOOLEAN','getDataValue','crudPermissions','split','exports','STRING'];(function(_0x11de83,_0x49e1c1){var _0x45bdb0=function(_0x51041e){while(--_0x51041e){_0x11de83['push'](_0x11de83['shift']());}};_0x45bdb0(++_0x49e1c1);}(_0x7d25,0x8a));var _0x57d2=function(_0x42bdad,_0x12836c){_0x42bdad=_0x42bdad-0x0;var _0x122626=_0x7d25[_0x42bdad];return _0x122626;};'use strict';var Sequelize=require('sequelize');module[_0x57d2('0x0')]={'name':{'type':Sequelize[_0x57d2('0x1')],'allowNull':![]},'category':{'type':Sequelize[_0x57d2('0x1')],'allowNull':![]},'sectionId':{'type':Sequelize[_0x57d2('0x2')],'allowNull':![]},'enabled':{'type':Sequelize[_0x57d2('0x3')],'defaultValue':null},'autoAssociation':{'type':Sequelize[_0x57d2('0x3')],'defaultValue':null},'crudPermissions':{'type':Sequelize[_0x57d2('0x1')],'set':function(_0x5c1baa){this['setDataValue']('crudPermissions',_0x5c1baa?_0x5c1baa['join'](''):[]);},'get':function(){return this[_0x57d2('0x4')]('crudPermissions')?this[_0x57d2('0x4')](_0x57d2('0x5'))[_0x57d2('0x6')](''):[];}}};
\ No newline at end of file
+var _0x2547=['BOOLEAN','crudPermissions','join','getDataValue','split','exports','STRING','INTEGER'];(function(_0x58106d,_0x135852){var _0x3fcf5a=function(_0x1e1a1d){while(--_0x1e1a1d){_0x58106d['push'](_0x58106d['shift']());}};_0x3fcf5a(++_0x135852);}(_0x2547,0x1cd));var _0x7254=function(_0x27e0af,_0x3dcfeb){_0x27e0af=_0x27e0af-0x0;var _0x265a26=_0x2547[_0x27e0af];return _0x265a26;};'use strict';var Sequelize=require('sequelize');module[_0x7254('0x0')]={'name':{'type':Sequelize[_0x7254('0x1')],'allowNull':![]},'category':{'type':Sequelize[_0x7254('0x1')],'allowNull':![]},'sectionId':{'type':Sequelize[_0x7254('0x2')],'allowNull':![]},'enabled':{'type':Sequelize[_0x7254('0x3')],'defaultValue':null},'autoAssociation':{'type':Sequelize[_0x7254('0x3')],'defaultValue':null},'crudPermissions':{'type':Sequelize[_0x7254('0x1')],'set':function(_0x265ebf){this['setDataValue'](_0x7254('0x4'),_0x265ebf?_0x265ebf[_0x7254('0x5')](''):[]);},'get':function(){return this[_0x7254('0x6')](_0x7254('0x4'))?this['getDataValue'](_0x7254('0x4'))[_0x7254('0x7')](''):[];}}};
\ No newline at end of file
index 9f126f7..ac91b11 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe1fa=['to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','../../components/auth/service','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','offset','undefined','count','set','json','apply','reject','save','update','destroy','then','error','name','send','UserProfileSection','rawAttributes','key','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','merge','type','VIRTUAL','options','includeAll','include','findAll','rows','catch','show','params','create','body','find','describe','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox'];(function(_0x399869,_0x11b444){var _0x4ff731=function(_0x1a0cc2){while(--_0x1a0cc2){_0x399869['push'](_0x399869['shift']());}};_0x4ff731(++_0x11b444);}(_0xe1fa,0x12a));var _0xae1f=function(_0xddf1d8,_0x1f2964){_0xddf1d8=_0xddf1d8-0x0;var _0x500ed9=_0xe1fa[_0xddf1d8];return _0x500ed9;};'use strict';var emlformat=require(_0xae1f('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xae1f('0x1'));var jsonpatch=require(_0xae1f('0x2'));var rp=require(_0xae1f('0x3'));var moment=require(_0xae1f('0x4'));var BPromise=require(_0xae1f('0x5'));var Mustache=require(_0xae1f('0x6'));var util=require(_0xae1f('0x7'));var path=require(_0xae1f('0x8'));var sox=require(_0xae1f('0x9'));var csv=require(_0xae1f('0xa'));var ejs=require(_0xae1f('0xb'));var fs=require('fs');var fs_extra=require(_0xae1f('0xc'));var _=require(_0xae1f('0xd'));var squel=require(_0xae1f('0xe'));var crypto=require(_0xae1f('0xf'));var jsforce=require(_0xae1f('0x10'));var deskjs=require(_0xae1f('0x11'));var toCsv=require(_0xae1f('0xa'));var querystring=require(_0xae1f('0x12'));var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0xae1f('0x13'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xae1f('0x14'));var logger=require('../../config/logger')(_0xae1f('0x15'));var utils=require('../../config/utils');var config=require(_0xae1f('0x16'));var licenseUtil=require(_0xae1f('0x17'));var db=require(_0xae1f('0x18'))['db'];function respondWithStatusCode(_0x1cf5c8,_0x33879c){_0x33879c=_0x33879c||0xcc;return function(_0x5bc285){if(_0x5bc285){return _0x1cf5c8[_0xae1f('0x19')](_0x33879c);}return _0x1cf5c8[_0xae1f('0x1a')](_0x33879c)[_0xae1f('0x1b')]();};}function respondWithResult(_0x54126c,_0x19da98){_0x19da98=_0x19da98||0xc8;return function(_0x1bd1eb){if(_0x1bd1eb){return _0x54126c['status'](_0x19da98)['json'](_0x1bd1eb);}};}function respondWithFilteredResult(_0x1f4267,_0x5d4df5){return function(_0x31edd5){if(_0x31edd5){var _0x1f26cb=typeof _0x5d4df5[_0xae1f('0x1c')]===_0xae1f('0x1d')&&typeof _0x5d4df5['limit']==='undefined';var _0x462420=_0x31edd5[_0xae1f('0x1e')];var _0x5c3c70=_0x1f26cb?0x0:_0x5d4df5[_0xae1f('0x1c')];var _0x4e78bd=_0x1f26cb?_0x31edd5[_0xae1f('0x1e')]:_0x5d4df5['offset']+_0x5d4df5['limit'];var _0x4798c5;if(_0x4e78bd>=_0x462420){_0x4e78bd=_0x462420;_0x4798c5=0xc8;}else{_0x4798c5=0xce;}_0x1f4267[_0xae1f('0x1a')](_0x4798c5);return _0x1f4267[_0xae1f('0x1f')]('Content-Range',_0x5c3c70+'-'+_0x4e78bd+'/'+_0x462420)[_0xae1f('0x20')](_0x31edd5);}return null;};}function patchUpdates(_0x1ca0a0){return function(_0x1768fe){try{jsonpatch[_0xae1f('0x21')](_0x1768fe,_0x1ca0a0,!![]);}catch(_0x44958d){return BPromise[_0xae1f('0x22')](_0x44958d);}return _0x1768fe[_0xae1f('0x23')]();};}function saveUpdates(_0x261950,_0x4e7cec){return function(_0x336e6b){if(_0x336e6b){return _0x336e6b[_0xae1f('0x24')](_0x261950)['then'](function(_0x3e15b2){return _0x3e15b2;});}return null;};}function removeEntity(_0x3fa938,_0x5c2a7d){return function(_0x287d8c){if(_0x287d8c){return _0x287d8c[_0xae1f('0x25')]()[_0xae1f('0x26')](function(){_0x3fa938[_0xae1f('0x1a')](0xcc)[_0xae1f('0x1b')]();});}};}function handleEntityNotFound(_0x15cb55,_0x5b8d37){return function(_0x4f4b1a){if(!_0x4f4b1a){_0x15cb55[_0xae1f('0x19')](0x194);}return _0x4f4b1a;};}function handleError(_0x10be29,_0x260c96){_0x260c96=_0x260c96||0x1f4;return function(_0x4ab25c){logger[_0xae1f('0x27')](_0x4ab25c['stack']);if(_0x4ab25c[_0xae1f('0x28')]){delete _0x4ab25c[_0xae1f('0x28')];}_0x10be29['status'](_0x260c96)[_0xae1f('0x29')](_0x4ab25c);};}exports['index']=function(_0x241040,_0x4d36e8){var _0x2a9993={},_0x5007e7={},_0x2c3819={'count':0x0,'rows':[]};var _0x5d38d0=_['map'](db[_0xae1f('0x2a')][_0xae1f('0x2b')],function(_0x4cd81d){return{'name':_0x4cd81d['fieldName'],'type':_0x4cd81d['type'][_0xae1f('0x2c')]};});_0x5007e7[_0xae1f('0x2d')]=_[_0xae1f('0x2e')](_0x5d38d0,_0xae1f('0x28'));_0x5007e7[_0xae1f('0x2f')]=_[_0xae1f('0x30')](_0x241040['query']);_0x5007e7[_0xae1f('0x31')]=_[_0xae1f('0x32')](_0x5007e7['model'],_0x5007e7[_0xae1f('0x2f')]);_0x2a9993[_0xae1f('0x33')]=_[_0xae1f('0x32')](_0x5007e7[_0xae1f('0x2d')],qs[_0xae1f('0x34')](_0x241040[_0xae1f('0x2f')][_0xae1f('0x34')]));_0x2a9993[_0xae1f('0x33')]=_0x2a9993[_0xae1f('0x33')][_0xae1f('0x35')]?_0x2a9993['attributes']:_0x5007e7['model'];if(!_0x241040[_0xae1f('0x2f')][_0xae1f('0x36')](_0xae1f('0x37'))){_0x2a9993[_0xae1f('0x38')]=qs[_0xae1f('0x38')](_0x241040[_0xae1f('0x2f')][_0xae1f('0x38')]);_0x2a9993['offset']=qs['offset'](_0x241040[_0xae1f('0x2f')][_0xae1f('0x1c')]);}_0x2a9993[_0xae1f('0x39')]=qs[_0xae1f('0x3a')](_0x241040['query']['sort']);_0x2a9993[_0xae1f('0x3b')]=qs['filters'](_[_0xae1f('0x3c')](_0x241040[_0xae1f('0x2f')],_0x5007e7[_0xae1f('0x31')]),_0x5d38d0);if(_0x241040[_0xae1f('0x2f')][_0xae1f('0x3d')]){_0x2a9993[_0xae1f('0x3b')]=_[_0xae1f('0x3e')](_0x2a9993['where'],{'$or':_['map'](_0x5d38d0,function(_0x4ed91f){if(_0x4ed91f[_0xae1f('0x3f')]!==_0xae1f('0x40')){var _0x14fbfc={};_0x14fbfc[_0x4ed91f[_0xae1f('0x28')]]={'$like':'%'+_0x241040[_0xae1f('0x2f')][_0xae1f('0x3d')]+'%'};return _0x14fbfc;}})});}_0x2a9993=_[_0xae1f('0x3e')]({},_0x2a9993,_0x241040[_0xae1f('0x41')]);var _0x247b47={'where':_0x2a9993[_0xae1f('0x3b')]};return db[_0xae1f('0x2a')][_0xae1f('0x1e')](_0x247b47)[_0xae1f('0x26')](function(_0x428e0d){_0x2c3819[_0xae1f('0x1e')]=_0x428e0d;if(_0x241040['query'][_0xae1f('0x42')]){_0x2a9993[_0xae1f('0x43')]=[{'all':!![]}];}return db[_0xae1f('0x2a')][_0xae1f('0x44')](_0x2a9993);})[_0xae1f('0x26')](function(_0x153f5c){_0x2c3819[_0xae1f('0x45')]=_0x153f5c;return _0x2c3819;})['then'](respondWithFilteredResult(_0x4d36e8,_0x2a9993))[_0xae1f('0x46')](handleError(_0x4d36e8,null));};exports[_0xae1f('0x47')]=function(_0x34f1a9,_0x559bab){var _0x16d91b={'raw':![],'where':{'id':_0x34f1a9[_0xae1f('0x48')]['id']}},_0x19b242={};_0x19b242[_0xae1f('0x2d')]=_['keys'](db[_0xae1f('0x2a')]['rawAttributes']);_0x19b242[_0xae1f('0x2f')]=_[_0xae1f('0x30')](_0x34f1a9['query']);_0x19b242['filters']=_[_0xae1f('0x32')](_0x19b242[_0xae1f('0x2d')],_0x19b242[_0xae1f('0x2f')]);_0x16d91b['attributes']=_[_0xae1f('0x32')](_0x19b242[_0xae1f('0x2d')],qs['fields'](_0x34f1a9[_0xae1f('0x2f')][_0xae1f('0x34')]));_0x16d91b[_0xae1f('0x33')]=_0x16d91b['attributes'][_0xae1f('0x35')]?_0x16d91b['attributes']:_0x19b242[_0xae1f('0x2d')];if(_0x34f1a9[_0xae1f('0x2f')][_0xae1f('0x42')]){_0x16d91b['include']=[{'all':!![]}];}_0x16d91b=_[_0xae1f('0x3e')]({},_0x16d91b,_0x34f1a9[_0xae1f('0x41')]);return db['UserProfileSection']['find'](_0x16d91b)[_0xae1f('0x26')](handleEntityNotFound(_0x559bab,null))[_0xae1f('0x26')](respondWithResult(_0x559bab,null))[_0xae1f('0x46')](handleError(_0x559bab,null));};exports[_0xae1f('0x49')]=function(_0x44fe74,_0x2ebaf7){return db[_0xae1f('0x2a')][_0xae1f('0x49')](_0x44fe74[_0xae1f('0x4a')],{})[_0xae1f('0x26')](respondWithResult(_0x2ebaf7,0xc9))[_0xae1f('0x46')](handleError(_0x2ebaf7,null));};exports[_0xae1f('0x24')]=function(_0x1fb36f,_0x529000){if(_0x1fb36f[_0xae1f('0x4a')]['id']){delete _0x1fb36f[_0xae1f('0x4a')]['id'];}return db[_0xae1f('0x2a')][_0xae1f('0x4b')]({'where':{'id':_0x1fb36f[_0xae1f('0x48')]['id']}})[_0xae1f('0x26')](handleEntityNotFound(_0x529000,null))[_0xae1f('0x26')](saveUpdates(_0x1fb36f['body'],null))[_0xae1f('0x26')](respondWithResult(_0x529000,null))['catch'](handleError(_0x529000,null));};exports[_0xae1f('0x25')]=function(_0x1bdce6,_0x501fb8){return db[_0xae1f('0x2a')][_0xae1f('0x4b')]({'where':{'id':_0x1bdce6[_0xae1f('0x48')]['id']}})[_0xae1f('0x26')](handleEntityNotFound(_0x501fb8,null))[_0xae1f('0x26')](removeEntity(_0x501fb8,null))['catch'](handleError(_0x501fb8,null));};exports[_0xae1f('0x4c')]=function(_0x2ebf55,_0x58eeba){return db['UserProfileSection'][_0xae1f('0x4c')]()[_0xae1f('0x26')](respondWithResult(_0x58eeba,null))['catch'](handleError(_0x58eeba,null));};
\ No newline at end of file
+var _0x2dcc=['sendStatus','error','stack','name','send','index','map','UserProfileSection','rawAttributes','fieldName','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','filter','where','merge','VIRTUAL','options','includeAll','include','findAll','show','find','create','body','params','catch','describe','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','status','end','offset','limit','count','set','Content-Range','apply','reject','save','update','then','destroy'];(function(_0x4ceb43,_0xa9161a){var _0x32cabc=function(_0x38fd12){while(--_0x38fd12){_0x4ceb43['push'](_0x4ceb43['shift']());}};_0x32cabc(++_0xa9161a);}(_0x2dcc,0x1a2));var _0xc2dc=function(_0x142925,_0x216626){_0x142925=_0x142925-0x0;var _0x44f867=_0x2dcc[_0x142925];return _0x44f867;};'use strict';var emlformat=require(_0xc2dc('0x0'));var rimraf=require(_0xc2dc('0x1'));var zipdir=require(_0xc2dc('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xc2dc('0x3'));var moment=require(_0xc2dc('0x4'));var BPromise=require(_0xc2dc('0x5'));var Mustache=require(_0xc2dc('0x6'));var util=require('util');var path=require(_0xc2dc('0x7'));var sox=require(_0xc2dc('0x8'));var csv=require(_0xc2dc('0x9'));var ejs=require(_0xc2dc('0xa'));var fs=require('fs');var fs_extra=require(_0xc2dc('0xb'));var _=require('lodash');var squel=require(_0xc2dc('0xc'));var crypto=require(_0xc2dc('0xd'));var jsforce=require(_0xc2dc('0xe'));var deskjs=require(_0xc2dc('0xf'));var toCsv=require(_0xc2dc('0x9'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require(_0xc2dc('0x10'));var authService=require(_0xc2dc('0x11'));var qs=require('../../components/parsers/qs');var as=require(_0xc2dc('0x12'));var hardwareService=require(_0xc2dc('0x13'));var logger=require(_0xc2dc('0x14'))(_0xc2dc('0x15'));var utils=require('../../config/utils');var config=require(_0xc2dc('0x16'));var licenseUtil=require(_0xc2dc('0x17'));var db=require(_0xc2dc('0x18'))['db'];function respondWithStatusCode(_0x5284aa,_0x229e86){_0x229e86=_0x229e86||0xcc;return function(_0x2d6c75){if(_0x2d6c75){return _0x5284aa['sendStatus'](_0x229e86);}return _0x5284aa[_0xc2dc('0x19')](_0x229e86)[_0xc2dc('0x1a')]();};}function respondWithResult(_0x3338dd,_0x5bdedd){_0x5bdedd=_0x5bdedd||0xc8;return function(_0x326ae1){if(_0x326ae1){return _0x3338dd[_0xc2dc('0x19')](_0x5bdedd)['json'](_0x326ae1);}};}function respondWithFilteredResult(_0x5cfb91,_0x43675c){return function(_0x5279c2){if(_0x5279c2){var _0x22d2ca=typeof _0x43675c[_0xc2dc('0x1b')]==='undefined'&&typeof _0x43675c[_0xc2dc('0x1c')]==='undefined';var _0x3cd198=_0x5279c2[_0xc2dc('0x1d')];var _0x43718c=_0x22d2ca?0x0:_0x43675c[_0xc2dc('0x1b')];var _0x16485a=_0x22d2ca?_0x5279c2[_0xc2dc('0x1d')]:_0x43675c['offset']+_0x43675c['limit'];var _0x24ddcf;if(_0x16485a>=_0x3cd198){_0x16485a=_0x3cd198;_0x24ddcf=0xc8;}else{_0x24ddcf=0xce;}_0x5cfb91[_0xc2dc('0x19')](_0x24ddcf);return _0x5cfb91[_0xc2dc('0x1e')](_0xc2dc('0x1f'),_0x43718c+'-'+_0x16485a+'/'+_0x3cd198)['json'](_0x5279c2);}return null;};}function patchUpdates(_0x2cc641){return function(_0x482a87){try{jsonpatch[_0xc2dc('0x20')](_0x482a87,_0x2cc641,!![]);}catch(_0x316d91){return BPromise[_0xc2dc('0x21')](_0x316d91);}return _0x482a87[_0xc2dc('0x22')]();};}function saveUpdates(_0x34ee5b,_0x210cc2){return function(_0x3cdd1b){if(_0x3cdd1b){return _0x3cdd1b[_0xc2dc('0x23')](_0x34ee5b)[_0xc2dc('0x24')](function(_0x27a94f){return _0x27a94f;});}return null;};}function removeEntity(_0x10d851,_0x343984){return function(_0x5ade15){if(_0x5ade15){return _0x5ade15[_0xc2dc('0x25')]()[_0xc2dc('0x24')](function(){_0x10d851['status'](0xcc)[_0xc2dc('0x1a')]();});}};}function handleEntityNotFound(_0x42b4cc,_0x246ac5){return function(_0x32d9c7){if(!_0x32d9c7){_0x42b4cc[_0xc2dc('0x26')](0x194);}return _0x32d9c7;};}function handleError(_0x5f1551,_0x53a91a){_0x53a91a=_0x53a91a||0x1f4;return function(_0x358edc){logger[_0xc2dc('0x27')](_0x358edc[_0xc2dc('0x28')]);if(_0x358edc[_0xc2dc('0x29')]){delete _0x358edc['name'];}_0x5f1551[_0xc2dc('0x19')](_0x53a91a)[_0xc2dc('0x2a')](_0x358edc);};}exports[_0xc2dc('0x2b')]=function(_0x36b97e,_0x3ce0e5){var _0x2532f1={},_0x4e9b98={},_0x293ce6={'count':0x0,'rows':[]};var _0x1b436d=_[_0xc2dc('0x2c')](db[_0xc2dc('0x2d')][_0xc2dc('0x2e')],function(_0x580802){return{'name':_0x580802[_0xc2dc('0x2f')],'type':_0x580802['type'][_0xc2dc('0x30')]};});_0x4e9b98[_0xc2dc('0x31')]=_[_0xc2dc('0x2c')](_0x1b436d,_0xc2dc('0x29'));_0x4e9b98[_0xc2dc('0x32')]=_[_0xc2dc('0x33')](_0x36b97e['query']);_0x4e9b98[_0xc2dc('0x34')]=_[_0xc2dc('0x35')](_0x4e9b98[_0xc2dc('0x31')],_0x4e9b98['query']);_0x2532f1[_0xc2dc('0x36')]=_[_0xc2dc('0x35')](_0x4e9b98['model'],qs[_0xc2dc('0x37')](_0x36b97e[_0xc2dc('0x32')][_0xc2dc('0x37')]));_0x2532f1['attributes']=_0x2532f1['attributes'][_0xc2dc('0x38')]?_0x2532f1[_0xc2dc('0x36')]:_0x4e9b98['model'];if(!_0x36b97e[_0xc2dc('0x32')][_0xc2dc('0x39')](_0xc2dc('0x3a'))){_0x2532f1[_0xc2dc('0x1c')]=qs['limit'](_0x36b97e[_0xc2dc('0x32')][_0xc2dc('0x1c')]);_0x2532f1[_0xc2dc('0x1b')]=qs[_0xc2dc('0x1b')](_0x36b97e[_0xc2dc('0x32')]['offset']);}_0x2532f1[_0xc2dc('0x3b')]=qs[_0xc2dc('0x3c')](_0x36b97e[_0xc2dc('0x32')]['sort']);_0x2532f1['where']=qs[_0xc2dc('0x34')](_['pick'](_0x36b97e[_0xc2dc('0x32')],_0x4e9b98['filters']),_0x1b436d);if(_0x36b97e[_0xc2dc('0x32')][_0xc2dc('0x3d')]){_0x2532f1[_0xc2dc('0x3e')]=_[_0xc2dc('0x3f')](_0x2532f1['where'],{'$or':_[_0xc2dc('0x2c')](_0x1b436d,function(_0x49f7f1){if(_0x49f7f1['type']!==_0xc2dc('0x40')){var _0x36536a={};_0x36536a[_0x49f7f1['name']]={'$like':'%'+_0x36b97e['query'][_0xc2dc('0x3d')]+'%'};return _0x36536a;}})});}_0x2532f1=_[_0xc2dc('0x3f')]({},_0x2532f1,_0x36b97e[_0xc2dc('0x41')]);var _0xb70b3f={'where':_0x2532f1[_0xc2dc('0x3e')]};return db[_0xc2dc('0x2d')][_0xc2dc('0x1d')](_0xb70b3f)['then'](function(_0x50fc5d){_0x293ce6[_0xc2dc('0x1d')]=_0x50fc5d;if(_0x36b97e[_0xc2dc('0x32')][_0xc2dc('0x42')]){_0x2532f1[_0xc2dc('0x43')]=[{'all':!![]}];}return db[_0xc2dc('0x2d')][_0xc2dc('0x44')](_0x2532f1);})[_0xc2dc('0x24')](function(_0x4e6168){_0x293ce6['rows']=_0x4e6168;return _0x293ce6;})[_0xc2dc('0x24')](respondWithFilteredResult(_0x3ce0e5,_0x2532f1))['catch'](handleError(_0x3ce0e5,null));};exports[_0xc2dc('0x45')]=function(_0x440175,_0x26d4f9){var _0x2fa09c={'raw':![],'where':{'id':_0x440175['params']['id']}},_0x2ae50b={};_0x2ae50b[_0xc2dc('0x31')]=_[_0xc2dc('0x33')](db[_0xc2dc('0x2d')]['rawAttributes']);_0x2ae50b['query']=_['keys'](_0x440175['query']);_0x2ae50b[_0xc2dc('0x34')]=_[_0xc2dc('0x35')](_0x2ae50b[_0xc2dc('0x31')],_0x2ae50b[_0xc2dc('0x32')]);_0x2fa09c[_0xc2dc('0x36')]=_[_0xc2dc('0x35')](_0x2ae50b['model'],qs[_0xc2dc('0x37')](_0x440175[_0xc2dc('0x32')][_0xc2dc('0x37')]));_0x2fa09c[_0xc2dc('0x36')]=_0x2fa09c[_0xc2dc('0x36')][_0xc2dc('0x38')]?_0x2fa09c[_0xc2dc('0x36')]:_0x2ae50b[_0xc2dc('0x31')];if(_0x440175[_0xc2dc('0x32')][_0xc2dc('0x42')]){_0x2fa09c['include']=[{'all':!![]}];}_0x2fa09c=_[_0xc2dc('0x3f')]({},_0x2fa09c,_0x440175[_0xc2dc('0x41')]);return db['UserProfileSection'][_0xc2dc('0x46')](_0x2fa09c)[_0xc2dc('0x24')](handleEntityNotFound(_0x26d4f9,null))['then'](respondWithResult(_0x26d4f9,null))['catch'](handleError(_0x26d4f9,null));};exports[_0xc2dc('0x47')]=function(_0x5e689a,_0x3b573c){return db[_0xc2dc('0x2d')][_0xc2dc('0x47')](_0x5e689a['body'],{})[_0xc2dc('0x24')](respondWithResult(_0x3b573c,0xc9))['catch'](handleError(_0x3b573c,null));};exports[_0xc2dc('0x23')]=function(_0x509e12,_0x1a91be){if(_0x509e12['body']['id']){delete _0x509e12[_0xc2dc('0x48')]['id'];}return db[_0xc2dc('0x2d')][_0xc2dc('0x46')]({'where':{'id':_0x509e12[_0xc2dc('0x49')]['id']}})['then'](handleEntityNotFound(_0x1a91be,null))[_0xc2dc('0x24')](saveUpdates(_0x509e12[_0xc2dc('0x48')],null))[_0xc2dc('0x24')](respondWithResult(_0x1a91be,null))[_0xc2dc('0x4a')](handleError(_0x1a91be,null));};exports[_0xc2dc('0x25')]=function(_0x5a6cf0,_0x34c2f6){return db[_0xc2dc('0x2d')][_0xc2dc('0x46')]({'where':{'id':_0x5a6cf0['params']['id']}})[_0xc2dc('0x24')](handleEntityNotFound(_0x34c2f6,null))[_0xc2dc('0x24')](removeEntity(_0x34c2f6,null))[_0xc2dc('0x4a')](handleError(_0x34c2f6,null));};exports[_0xc2dc('0x4b')]=function(_0x34b7ec,_0x4add84){return db[_0xc2dc('0x2d')][_0xc2dc('0x4b')]()[_0xc2dc('0x24')](respondWithResult(_0x4add84,null))['catch'](handleError(_0x4add84,null));};
\ No newline at end of file
index a0a5632..5f21cbd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4511=['request-promise','path','../../config/environment','./userProfileSection.attributes','exports','define','UserProfileSection','user_profile_has_sections','compositeIndex','sectionId','userProfileId','lodash','util','api','moment','bluebird'];(function(_0x126e31,_0x54eae6){var _0x3567c8=function(_0x50ab9b){while(--_0x50ab9b){_0x126e31['push'](_0x126e31['shift']());}};_0x3567c8(++_0x54eae6);}(_0x4511,0x18b));var _0x1451=function(_0xc0882b,_0x380c97){_0xc0882b=_0xc0882b-0x0;var _0x4cec6b=_0x4511[_0xc0882b];return _0x4cec6b;};'use strict';var _=require(_0x1451('0x0'));var util=require(_0x1451('0x1'));var logger=require('../../config/logger')(_0x1451('0x2'));var moment=require(_0x1451('0x3'));var BPromise=require(_0x1451('0x4'));var rp=require(_0x1451('0x5'));var fs=require('fs');var path=require(_0x1451('0x6'));var rimraf=require('rimraf');var config=require(_0x1451('0x7'));var attributes=require(_0x1451('0x8'));module[_0x1451('0x9')]=function(_0x5e6549,_0x17003b){return _0x5e6549[_0x1451('0xa')](_0x1451('0xb'),attributes,{'tableName':_0x1451('0xc'),'paranoid':![],'indexes':[{'name':_0x1451('0xd'),'fields':[_0x1451('0xe'),_0x1451('0xf')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xd889=['util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','./userProfileSection.attributes','exports','define','user_profile_has_sections','compositeIndex','sectionId'];(function(_0xa25342,_0x24522b){var _0x52be43=function(_0x1ea0e9){while(--_0x1ea0e9){_0xa25342['push'](_0xa25342['shift']());}};_0x52be43(++_0x24522b);}(_0xd889,0x17a));var _0x9d88=function(_0x5da5db,_0x4ef4c5){_0x5da5db=_0x5da5db-0x0;var _0x4812cd=_0xd889[_0x5da5db];return _0x4812cd;};'use strict';var _=require('lodash');var util=require(_0x9d88('0x0'));var logger=require(_0x9d88('0x1'))(_0x9d88('0x2'));var moment=require(_0x9d88('0x3'));var BPromise=require('bluebird');var rp=require(_0x9d88('0x4'));var fs=require('fs');var path=require(_0x9d88('0x5'));var rimraf=require(_0x9d88('0x6'));var config=require(_0x9d88('0x7'));var attributes=require(_0x9d88('0x8'));module[_0x9d88('0x9')]=function(_0x3cb4fa,_0x386759){return _0x3cb4fa[_0x9d88('0xa')]('UserProfileSection',attributes,{'tableName':_0x9d88('0xb'),'paranoid':![],'indexes':[{'name':_0x9d88('0xc'),'fields':[_0x9d88('0xd'),'userProfileId']}],'timestamps':!![]});};
\ No newline at end of file
index 4deb8e3..661f5f7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xac8d=['../../config/logger','../../config/environment','jayson/promise','client','http','then','info','UserProfileSection,\x20%s,\x20%s','request\x20sent','debug','UserProfileSection,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x3ba748,_0x4b8fb9){var _0x5b04e2=function(_0x16bb9e){while(--_0x16bb9e){_0x3ba748['push'](_0x3ba748['shift']());}};_0x5b04e2(++_0x4b8fb9);}(_0xac8d,0x1d8));var _0xdac8=function(_0xdb80fa,_0x505df9){_0xdb80fa=_0xdb80fa-0x0;var _0x4df3e0=_0xac8d[_0xdb80fa];return _0x4df3e0;};'use strict';var _=require(_0xdac8('0x0'));var util=require(_0xdac8('0x1'));var moment=require(_0xdac8('0x2'));var BPromise=require(_0xdac8('0x3'));var rs=require(_0xdac8('0x4'));var fs=require('fs');var Redis=require(_0xdac8('0x5'));var db=require(_0xdac8('0x6'))['db'];var utils=require(_0xdac8('0x7'));var logger=require(_0xdac8('0x8'))('rpc');var config=require(_0xdac8('0x9'));var jayson=require(_0xdac8('0xa'));var client=jayson[_0xdac8('0xb')][_0xdac8('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x1e1cc7,_0x3677da,_0x8f90bd){return new BPromise(function(_0x96c908,_0x116c0a){return client['request'](_0x1e1cc7,_0x8f90bd)[_0xdac8('0xd')](function(_0x55e8ec){logger[_0xdac8('0xe')](_0xdac8('0xf'),_0x3677da,_0xdac8('0x10'));logger[_0xdac8('0x11')](_0xdac8('0x12'),_0x3677da,'request\x20sent',JSON[_0xdac8('0x13')](_0x55e8ec));if(_0x55e8ec['error']){if(_0x55e8ec[_0xdac8('0x14')][_0xdac8('0x15')]===0x1f4){logger[_0xdac8('0x14')]('UserProfileSection,\x20%s,\x20%s',_0x3677da,_0x55e8ec[_0xdac8('0x14')]['message']);return _0x116c0a(_0x55e8ec['error'][_0xdac8('0x16')]);}logger['error'](_0xdac8('0xf'),_0x3677da,_0x55e8ec[_0xdac8('0x14')][_0xdac8('0x16')]);return _0x96c908(_0x55e8ec[_0xdac8('0x14')][_0xdac8('0x16')]);}else{logger['info'](_0xdac8('0xf'),_0x3677da,_0xdac8('0x10'));_0x96c908(_0x55e8ec[_0xdac8('0x17')][_0xdac8('0x16')]);}})['catch'](function(_0x9d075f){logger[_0xdac8('0x14')](_0xdac8('0xf'),_0x3677da,_0x9d075f);_0x116c0a(_0x9d075f);});});}
\ No newline at end of file
+var _0x184d=['info','UserProfileSection,\x20%s,\x20%s','debug','UserProfileSection,\x20%s,\x20%s,\x20%s','stringify','error','message','request\x20sent','moment','bluebird','randomstring','ioredis','../../mysqldb','rpc','../../config/environment','client','http','then'];(function(_0x47b1e5,_0x323bb5){var _0x357067=function(_0x289140){while(--_0x289140){_0x47b1e5['push'](_0x47b1e5['shift']());}};_0x357067(++_0x323bb5);}(_0x184d,0x1b8));var _0xd184=function(_0x2112d4,_0x3c863c){_0x2112d4=_0x2112d4-0x0;var _0x434972=_0x184d[_0x2112d4];return _0x434972;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0xd184('0x0'));var BPromise=require(_0xd184('0x1'));var rs=require(_0xd184('0x2'));var fs=require('fs');var Redis=require(_0xd184('0x3'));var db=require(_0xd184('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xd184('0x5'));var config=require(_0xd184('0x6'));var jayson=require('jayson/promise');var client=jayson[_0xd184('0x7')][_0xd184('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x5ea48b,_0x3c54e6,_0x55350e){return new BPromise(function(_0x210a7b,_0x4a7174){return client['request'](_0x5ea48b,_0x55350e)[_0xd184('0x9')](function(_0x28ff2f){logger[_0xd184('0xa')](_0xd184('0xb'),_0x3c54e6,'request\x20sent');logger[_0xd184('0xc')](_0xd184('0xd'),_0x3c54e6,'request\x20sent',JSON[_0xd184('0xe')](_0x28ff2f));if(_0x28ff2f[_0xd184('0xf')]){if(_0x28ff2f['error']['code']===0x1f4){logger[_0xd184('0xf')](_0xd184('0xb'),_0x3c54e6,_0x28ff2f['error']['message']);return _0x4a7174(_0x28ff2f[_0xd184('0xf')]['message']);}logger[_0xd184('0xf')](_0xd184('0xb'),_0x3c54e6,_0x28ff2f[_0xd184('0xf')][_0xd184('0x10')]);return _0x210a7b(_0x28ff2f['error'][_0xd184('0x10')]);}else{logger['info'](_0xd184('0xb'),_0x3c54e6,_0xd184('0x11'));_0x210a7b(_0x28ff2f['result'][_0xd184('0x10')]);}})['catch'](function(_0x3f36b4){logger[_0xd184('0xf')](_0xd184('0xb'),_0x3c54e6,_0x3f36b4);_0x4a7174(_0x3f36b4);});});}
\ No newline at end of file
index 14178f8..bb61c31 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0x5c0c9e,_0x410be6){var _0x176458=function(_0x1ed350){while(--_0x1ed350){_0x5c0c9e['push'](_0x5c0c9e['shift']());}};_0x176458(++_0x410be6);}(_0x70e0,0x17b));var _0x070e=function(_0x3b0718,_0x42da85){_0x3b0718=_0x3b0718-0x0;var _0x5845de=_0x70e0[_0x3b0718];return _0x5845de;};'use strict';var multer=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var path=require(_0x070e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x070e('0x3')]();var fs_extra=require(_0x070e('0x4'));var auth=require(_0x070e('0x5'));var interaction=require(_0x070e('0x6'));var config=require('../../config/environment');module[_0x070e('0x7')]=router;
\ No newline at end of file
+var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0x5cc55c,_0x9d0ac3){var _0x5d1301=function(_0x3eeac4){while(--_0x3eeac4){_0x5cc55c['push'](_0x5cc55c['shift']());}};_0x5d1301(++_0x9d0ac3);}(_0x70e0,0x17b));var _0x070e=function(_0xf2d2d6,_0x3aae44){_0xf2d2d6=_0xf2d2d6-0x0;var _0x1f32d5=_0x70e0[_0xf2d2d6];return _0x1f32d5;};'use strict';var multer=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var path=require(_0x070e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x070e('0x3')]();var fs_extra=require(_0x070e('0x4'));var auth=require(_0x070e('0x5'));var interaction=require(_0x070e('0x6'));var config=require('../../config/environment');module[_0x070e('0x7')]=router;
\ No newline at end of file
index d1d844f..01ce9ba 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0689=['exports'];(function(_0x4fc1d7,_0x30e28f){var _0x43ec7f=function(_0x6c036a){while(--_0x6c036a){_0x4fc1d7['push'](_0x4fc1d7['shift']());}};_0x43ec7f(++_0x30e28f);}(_0x0689,0x161));var _0x9068=function(_0x3600e2,_0x396426){_0x3600e2=_0x3600e2-0x0;var _0x45ace2=_0x0689[_0x3600e2];return _0x45ace2;};'use strict';var Sequelize=require('sequelize');module[_0x9068('0x0')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}};
\ No newline at end of file
+var _0xbc6c=['exports'];(function(_0x18a994,_0x34f2c9){var _0x374e65=function(_0x2756b9){while(--_0x2756b9){_0x18a994['push'](_0x18a994['shift']());}};_0x374e65(++_0x34f2c9);}(_0xbc6c,0x1b1));var _0xcbc6=function(_0x5f523f,_0x3e4f04){_0x5f523f=_0x5f523f-0x0;var _0x4cfa34=_0xbc6c[_0x5f523f];return _0x4cfa34;};'use strict';var Sequelize=require('sequelize');module[_0xcbc6('0x0')]={'penalty':{'type':Sequelize['INTEGER'],'defaultValue':0x0}};
\ No newline at end of file
index 64c1841..758592d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2aa3=['user_has_sms_queues','lodash','util','../../config/logger','api','request-promise','path','rimraf','../../config/environment','./userSmsQueue.attributes','exports','define','UserSmsQueue'];(function(_0x1027c8,_0x54ec2){var _0x266bc2=function(_0x5006f3){while(--_0x5006f3){_0x1027c8['push'](_0x1027c8['shift']());}};_0x266bc2(++_0x54ec2);}(_0x2aa3,0x83));var _0x32aa=function(_0x332670,_0x2d6c46){_0x332670=_0x332670-0x0;var _0x3fdd4f=_0x2aa3[_0x332670];return _0x3fdd4f;};'use strict';var _=require(_0x32aa('0x0'));var util=require(_0x32aa('0x1'));var logger=require(_0x32aa('0x2'))(_0x32aa('0x3'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x32aa('0x4'));var fs=require('fs');var path=require(_0x32aa('0x5'));var rimraf=require(_0x32aa('0x6'));var config=require(_0x32aa('0x7'));var attributes=require(_0x32aa('0x8'));module[_0x32aa('0x9')]=function(_0x53ab98,_0x17346a){return _0x53ab98[_0x32aa('0xa')](_0x32aa('0xb'),attributes,{'tableName':_0x32aa('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xd117=['request-promise','path','rimraf','../../config/environment','./userSmsQueue.attributes','exports','define','UserSmsQueue','lodash','util','../../config/logger','api','moment','bluebird'];(function(_0x38c632,_0x14e8e6){var _0x12737e=function(_0x3e0fe4){while(--_0x3e0fe4){_0x38c632['push'](_0x38c632['shift']());}};_0x12737e(++_0x14e8e6);}(_0xd117,0x182));var _0x7d11=function(_0x60286b,_0x3247c1){_0x60286b=_0x60286b-0x0;var _0x5dff69=_0xd117[_0x60286b];return _0x5dff69;};'use strict';var _=require(_0x7d11('0x0'));var util=require(_0x7d11('0x1'));var logger=require(_0x7d11('0x2'))(_0x7d11('0x3'));var moment=require(_0x7d11('0x4'));var BPromise=require(_0x7d11('0x5'));var rp=require(_0x7d11('0x6'));var fs=require('fs');var path=require(_0x7d11('0x7'));var rimraf=require(_0x7d11('0x8'));var config=require(_0x7d11('0x9'));var attributes=require(_0x7d11('0xa'));module[_0x7d11('0xb')]=function(_0x27d7e8,_0x40c3c4){return _0x27d7e8[_0x7d11('0xc')](_0x7d11('0xd'),attributes,{'tableName':'user_has_sms_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index f70df6e..1dafb35 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeaac=['lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','request','info','request\x20sent','debug','UserSmsQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','UserSmsQueue,\x20%s,\x20%s','message','catch'];(function(_0x271d99,_0xc36da4){var _0x2fd021=function(_0x129788){while(--_0x129788){_0x271d99['push'](_0x271d99['shift']());}};_0x2fd021(++_0xc36da4);}(_0xeaac,0x1b5));var _0xceaa=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0xeaac[_0x4b369d];return _0x571a98;};'use strict';var _=require(_0xceaa('0x0'));var util=require(_0xceaa('0x1'));var moment=require(_0xceaa('0x2'));var BPromise=require(_0xceaa('0x3'));var rs=require(_0xceaa('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xceaa('0x5'))['db'];var utils=require(_0xceaa('0x6'));var logger=require('../../config/logger')(_0xceaa('0x7'));var config=require(_0xceaa('0x8'));var jayson=require(_0xceaa('0x9'));var client=jayson[_0xceaa('0xa')][_0xceaa('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x359349,_0x343808,_0x3a799b){return new BPromise(function(_0x17e1de,_0x4e78f4){return client[_0xceaa('0xc')](_0x359349,_0x3a799b)['then'](function(_0x800b2a){logger[_0xceaa('0xd')]('UserSmsQueue,\x20%s,\x20%s',_0x343808,_0xceaa('0xe'));logger[_0xceaa('0xf')](_0xceaa('0x10'),_0x343808,_0xceaa('0xe'),JSON[_0xceaa('0x11')](_0x800b2a));if(_0x800b2a[_0xceaa('0x12')]){if(_0x800b2a[_0xceaa('0x12')][_0xceaa('0x13')]===0x1f4){logger[_0xceaa('0x12')](_0xceaa('0x14'),_0x343808,_0x800b2a[_0xceaa('0x12')]['message']);return _0x4e78f4(_0x800b2a[_0xceaa('0x12')]['message']);}logger[_0xceaa('0x12')]('UserSmsQueue,\x20%s,\x20%s',_0x343808,_0x800b2a[_0xceaa('0x12')]['message']);return _0x17e1de(_0x800b2a['error'][_0xceaa('0x15')]);}else{logger[_0xceaa('0xd')](_0xceaa('0x14'),_0x343808,_0xceaa('0xe'));_0x17e1de(_0x800b2a['result'][_0xceaa('0x15')]);}})[_0xceaa('0x16')](function(_0x2af96f){logger['error'](_0xceaa('0x14'),_0x343808,_0x2af96f);_0x4e78f4(_0x2af96f);});});}
\ No newline at end of file
+var _0x58e1=['../../config/logger','rpc','../../config/environment','http','request','request\x20sent','debug','UserSmsQueue,\x20%s,\x20%s,\x20%s','error','code','message','UserSmsQueue,\x20%s,\x20%s','info','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils'];(function(_0x417155,_0x484285){var _0x25b014=function(_0x287f71){while(--_0x287f71){_0x417155['push'](_0x417155['shift']());}};_0x25b014(++_0x484285);}(_0x58e1,0x16f));var _0x158e=function(_0x2c93a2,_0x1c1e3b){_0x2c93a2=_0x2c93a2-0x0;var _0x5bde6c=_0x58e1[_0x2c93a2];return _0x5bde6c;};'use strict';var _=require('lodash');var util=require(_0x158e('0x0'));var moment=require(_0x158e('0x1'));var BPromise=require(_0x158e('0x2'));var rs=require(_0x158e('0x3'));var fs=require('fs');var Redis=require(_0x158e('0x4'));var db=require(_0x158e('0x5'))['db'];var utils=require(_0x158e('0x6'));var logger=require(_0x158e('0x7'))(_0x158e('0x8'));var config=require(_0x158e('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0x158e('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x2e3519,_0x262e84,_0x4189c1){return new BPromise(function(_0x56ce52,_0x4fdc07){return client[_0x158e('0xb')](_0x2e3519,_0x4189c1)['then'](function(_0x455d19){logger['info']('UserSmsQueue,\x20%s,\x20%s',_0x262e84,_0x158e('0xc'));logger[_0x158e('0xd')](_0x158e('0xe'),_0x262e84,_0x158e('0xc'),JSON['stringify'](_0x455d19));if(_0x455d19[_0x158e('0xf')]){if(_0x455d19[_0x158e('0xf')][_0x158e('0x10')]===0x1f4){logger['error']('UserSmsQueue,\x20%s,\x20%s',_0x262e84,_0x455d19[_0x158e('0xf')]['message']);return _0x4fdc07(_0x455d19['error'][_0x158e('0x11')]);}logger['error'](_0x158e('0x12'),_0x262e84,_0x455d19['error'][_0x158e('0x11')]);return _0x56ce52(_0x455d19[_0x158e('0xf')][_0x158e('0x11')]);}else{logger[_0x158e('0x13')](_0x158e('0x12'),_0x262e84,_0x158e('0xc'));_0x56ce52(_0x455d19[_0x158e('0x14')][_0x158e('0x11')]);}})[_0x158e('0x15')](function(_0x4a7e9f){logger[_0x158e('0xf')](_0x158e('0x12'),_0x262e84,_0x4a7e9f);_0x4fdc07(_0x4a7e9f);});});}
\ No newline at end of file
index 2290f6f..2091685 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6029=['INTEGER','sequelize'];(function(_0x5955d4,_0x28cab5){var _0x22ff03=function(_0x363963){while(--_0x363963){_0x5955d4['push'](_0x5955d4['shift']());}};_0x22ff03(++_0x28cab5);}(_0x6029,0x13d));var _0x9602=function(_0x4bc7f9,_0x5caa6b){_0x4bc7f9=_0x4bc7f9-0x0;var _0x4f42ee=_0x6029[_0x4bc7f9];return _0x4f42ee;};'use strict';var Sequelize=require(_0x9602('0x0'));module['exports']={'UserId':{'type':Sequelize[_0x9602('0x1')]},'VoicePrefixId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
+var _0x225b=['INTEGER'];(function(_0x35d8af,_0x14fd75){var _0x1d08b0=function(_0x36b437){while(--_0x36b437){_0x35d8af['push'](_0x35d8af['shift']());}};_0x1d08b0(++_0x14fd75);}(_0x225b,0x195));var _0xb225=function(_0xb136a,_0x1f5155){_0xb136a=_0xb136a-0x0;var _0xaa74f1=_0x225b[_0xb136a];return _0xaa74f1;};'use strict';var Sequelize=require('sequelize');module['exports']={'UserId':{'type':Sequelize['INTEGER']},'VoicePrefixId':{'type':Sequelize[_0xb225('0x0')]}};
\ No newline at end of file
index df9af7f..c74b90b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['../../config/environment','./userVoicePrefix.attributes','exports','define','UserVoicePrefix','lodash','util','../../config/logger','bluebird','path','rimraf'];(function(_0xfc2740,_0x2be393){var _0x44c447=function(_0x5e2b73){while(--_0x5e2b73){_0xfc2740['push'](_0xfc2740['shift']());}};_0x44c447(++_0x2be393);}(_0xa9e0,0x123));var _0x0a9e=function(_0x47e7cb,_0x4c1b8d){_0x47e7cb=_0x47e7cb-0x0;var _0x2a8874=_0xa9e0[_0x47e7cb];return _0x2a8874;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var logger=require(_0x0a9e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x0a9e('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0a9e('0x4'));var rimraf=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var attributes=require(_0x0a9e('0x7'));module[_0x0a9e('0x8')]=function(_0x57b080,_0x219af0){return _0x57b080[_0x0a9e('0x9')](_0x0a9e('0xa'),attributes,{'tableName':'user_has_voice_prefixes','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xa9e0=['../../config/environment','./userVoicePrefix.attributes','exports','define','UserVoicePrefix','lodash','util','../../config/logger','bluebird','path','rimraf'];(function(_0x51e4f9,_0x4461ee){var _0x321b46=function(_0xb5ed9b){while(--_0xb5ed9b){_0x51e4f9['push'](_0x51e4f9['shift']());}};_0x321b46(++_0x4461ee);}(_0xa9e0,0x123));var _0x0a9e=function(_0x1ddedd,_0x485606){_0x1ddedd=_0x1ddedd-0x0;var _0xa3e1ac=_0xa9e0[_0x1ddedd];return _0xa3e1ac;};'use strict';var _=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var logger=require(_0x0a9e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x0a9e('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0a9e('0x4'));var rimraf=require(_0x0a9e('0x5'));var config=require(_0x0a9e('0x6'));var attributes=require(_0x0a9e('0x7'));module[_0x0a9e('0x8')]=function(_0x57b080,_0x219af0){return _0x57b080[_0x0a9e('0x9')](_0x0a9e('0xa'),attributes,{'tableName':'user_has_voice_prefixes','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 094b933..f34e4ae 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe706=['../../components/interaction/service','../../config/environment','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service'];(function(_0x15c628,_0x821cc6){var _0x502d2e=function(_0x21325a){while(--_0x21325a){_0x15c628['push'](_0x15c628['shift']());}};_0x502d2e(++_0x821cc6);}(_0xe706,0xa3));var _0x6e70=function(_0x36cd93,_0x593481){_0x36cd93=_0x36cd93-0x0;var _0x10f6cd=_0xe706[_0x36cd93];return _0x10f6cd;};'use strict';var multer=require(_0x6e70('0x0'));var util=require(_0x6e70('0x1'));var path=require(_0x6e70('0x2'));var timeout=require('connect-timeout');var express=require(_0x6e70('0x3'));var router=express[_0x6e70('0x4')]();var fs_extra=require(_0x6e70('0x5'));var auth=require(_0x6e70('0x6'));var interaction=require(_0x6e70('0x7'));var config=require(_0x6e70('0x8'));module[_0x6e70('0x9')]=router;
\ No newline at end of file
+var _0xa9e0=['../../components/interaction/service','../../config/environment','exports','multer','util','path','Router','../../components/auth/service'];(function(_0x4fb570,_0x4236b4){var _0x5d9448=function(_0xca452d){while(--_0xca452d){_0x4fb570['push'](_0x4fb570['shift']());}};_0x5d9448(++_0x4236b4);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2bf141,_0x31eac7){_0x2bf141=_0x2bf141-0x0;var _0x48277b=_0xa9e0[_0x2bf141];return _0x48277b;};'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'));module[_0x0a9e('0x7')]=router;
\ No newline at end of file
index d0ca7eb..62ab030 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6e45=['INTEGER','sequelize','exports'];(function(_0x50f17d,_0x260de1){var _0x207fb8=function(_0x50456a){while(--_0x50456a){_0x50f17d['push'](_0x50f17d['shift']());}};_0x207fb8(++_0x260de1);}(_0x6e45,0x7c));var _0x56e4=function(_0xfa9eca,_0x599261){_0xfa9eca=_0xfa9eca-0x0;var _0x4bf5ba=_0x6e45[_0xfa9eca];return _0x4bf5ba;};'use strict';var Sequelize=require(_0x56e4('0x0'));module[_0x56e4('0x1')]={'penalty':{'type':Sequelize[_0x56e4('0x2')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x29f9=['INTEGER'];(function(_0x23a111,_0xca7e3f){var _0x5df896=function(_0x25647d){while(--_0x25647d){_0x23a111['push'](_0x23a111['shift']());}};_0x5df896(++_0xca7e3f);}(_0x29f9,0x1e2));var _0x929f=function(_0x14d79f,_0x38e42c){_0x14d79f=_0x14d79f-0x0;var _0x45c31b=_0x29f9[_0x14d79f];return _0x45c31b;};'use strict';var Sequelize=require('sequelize');module['exports']={'penalty':{'type':Sequelize[_0x929f('0x0')],'defaultValue':0x0}};
\ No newline at end of file
index 3e96296..965a104 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb131=['path','rimraf','../../config/environment','./userVoiceQueue.attributes','exports','define','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x1ab25c,_0x55e0a6){var _0x39c117=function(_0x5670c5){while(--_0x5670c5){_0x1ab25c['push'](_0x1ab25c['shift']());}};_0x39c117(++_0x55e0a6);}(_0xb131,0x1da));var _0x1b13=function(_0xe15270,_0x227d06){_0xe15270=_0xe15270-0x0;var _0x1e813b=_0xb131[_0xe15270];return _0x1e813b;};'use strict';var _=require(_0x1b13('0x0'));var util=require(_0x1b13('0x1'));var logger=require(_0x1b13('0x2'))(_0x1b13('0x3'));var moment=require(_0x1b13('0x4'));var BPromise=require(_0x1b13('0x5'));var rp=require(_0x1b13('0x6'));var fs=require('fs');var path=require(_0x1b13('0x7'));var rimraf=require(_0x1b13('0x8'));var config=require(_0x1b13('0x9'));var attributes=require(_0x1b13('0xa'));module[_0x1b13('0xb')]=function(_0x1eafae,_0x36d22e){return _0x1eafae[_0x1b13('0xc')]('UserVoiceQueue',attributes,{'tableName':'user_has_voice_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x3933=['lodash','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','../../config/environment','./userVoiceQueue.attributes','define','UserVoiceQueue'];(function(_0x13d33a,_0x1989d5){var _0x5e877f=function(_0x148b8c){while(--_0x148b8c){_0x13d33a['push'](_0x13d33a['shift']());}};_0x5e877f(++_0x1989d5);}(_0x3933,0x1d4));var _0x3393=function(_0x82ca6b,_0x283e8d){_0x82ca6b=_0x82ca6b-0x0;var _0x5cc951=_0x3933[_0x82ca6b];return _0x5cc951;};'use strict';var _=require(_0x3393('0x0'));var util=require(_0x3393('0x1'));var logger=require(_0x3393('0x2'))(_0x3393('0x3'));var moment=require(_0x3393('0x4'));var BPromise=require(_0x3393('0x5'));var rp=require(_0x3393('0x6'));var fs=require('fs');var path=require(_0x3393('0x7'));var rimraf=require(_0x3393('0x8'));var config=require(_0x3393('0x9'));var attributes=require(_0x3393('0xa'));module['exports']=function(_0xe276f2,_0x2d067e){return _0xe276f2[_0x3393('0xb')](_0x3393('0xc'),attributes,{'tableName':'user_has_voice_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 14d6814..21b4efd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3847=['client','http','request','info','UserVoiceQueue,\x20%s,\x20%s','request\x20sent','UserVoiceQueue,\x20%s,\x20%s,\x20%s','error','code','message','result','catch','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x3d0953,_0x282ef1){var _0x2a3dd8=function(_0x32062f){while(--_0x32062f){_0x3d0953['push'](_0x3d0953['shift']());}};_0x2a3dd8(++_0x282ef1);}(_0x3847,0x1d8));var _0x7384=function(_0x22f097,_0x4c3d8f){_0x22f097=_0x22f097-0x0;var _0x24e3c2=_0x3847[_0x22f097];return _0x24e3c2;};'use strict';var _=require('lodash');var util=require(_0x7384('0x0'));var moment=require(_0x7384('0x1'));var BPromise=require(_0x7384('0x2'));var rs=require(_0x7384('0x3'));var fs=require('fs');var Redis=require(_0x7384('0x4'));var db=require(_0x7384('0x5'))['db'];var utils=require(_0x7384('0x6'));var logger=require(_0x7384('0x7'))(_0x7384('0x8'));var config=require(_0x7384('0x9'));var jayson=require(_0x7384('0xa'));var client=jayson[_0x7384('0xb')][_0x7384('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x28b3da,_0x2d45c5,_0x492411){return new BPromise(function(_0xe5c10,_0x1d071a){return client[_0x7384('0xd')](_0x28b3da,_0x492411)['then'](function(_0x58d4d9){logger[_0x7384('0xe')](_0x7384('0xf'),_0x2d45c5,_0x7384('0x10'));logger['debug'](_0x7384('0x11'),_0x2d45c5,'request\x20sent',JSON['stringify'](_0x58d4d9));if(_0x58d4d9['error']){if(_0x58d4d9[_0x7384('0x12')][_0x7384('0x13')]===0x1f4){logger[_0x7384('0x12')](_0x7384('0xf'),_0x2d45c5,_0x58d4d9[_0x7384('0x12')][_0x7384('0x14')]);return _0x1d071a(_0x58d4d9[_0x7384('0x12')][_0x7384('0x14')]);}logger['error']('UserVoiceQueue,\x20%s,\x20%s',_0x2d45c5,_0x58d4d9['error'][_0x7384('0x14')]);return _0xe5c10(_0x58d4d9[_0x7384('0x12')][_0x7384('0x14')]);}else{logger['info'](_0x7384('0xf'),_0x2d45c5,_0x7384('0x10'));_0xe5c10(_0x58d4d9[_0x7384('0x15')][_0x7384('0x14')]);}})[_0x7384('0x16')](function(_0x5e14f2){logger[_0x7384('0x12')](_0x7384('0xf'),_0x2d45c5,_0x5e14f2);_0x1d071a(_0x5e14f2);});});}
\ No newline at end of file
+var _0xd9eb=['rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','UserVoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','UserVoiceQueue,\x20%s,\x20%s','message','result','catch','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger'];(function(_0x409e95,_0x3c96e2){var _0xd7fdc=function(_0x25d427){while(--_0x25d427){_0x409e95['push'](_0x409e95['shift']());}};_0xd7fdc(++_0x3c96e2);}(_0xd9eb,0x1ec));var _0xbd9e=function(_0x2a5864,_0x2b9396){_0x2a5864=_0x2a5864-0x0;var _0x490ab6=_0xd9eb[_0x2a5864];return _0x490ab6;};'use strict';var _=require(_0xbd9e('0x0'));var util=require('util');var moment=require(_0xbd9e('0x1'));var BPromise=require(_0xbd9e('0x2'));var rs=require(_0xbd9e('0x3'));var fs=require('fs');var Redis=require(_0xbd9e('0x4'));var db=require(_0xbd9e('0x5'))['db'];var utils=require(_0xbd9e('0x6'));var logger=require(_0xbd9e('0x7'))(_0xbd9e('0x8'));var config=require(_0xbd9e('0x9'));var jayson=require(_0xbd9e('0xa'));var client=jayson[_0xbd9e('0xb')][_0xbd9e('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x137264,_0x3970f6,_0x111f55){return new BPromise(function(_0x410711,_0x59db05){return client[_0xbd9e('0xd')](_0x137264,_0x111f55)[_0xbd9e('0xe')](function(_0x4db56d){logger[_0xbd9e('0xf')]('UserVoiceQueue,\x20%s,\x20%s',_0x3970f6,_0xbd9e('0x10'));logger[_0xbd9e('0x11')](_0xbd9e('0x12'),_0x3970f6,_0xbd9e('0x10'),JSON[_0xbd9e('0x13')](_0x4db56d));if(_0x4db56d[_0xbd9e('0x14')]){if(_0x4db56d[_0xbd9e('0x14')]['code']===0x1f4){logger[_0xbd9e('0x14')](_0xbd9e('0x15'),_0x3970f6,_0x4db56d[_0xbd9e('0x14')][_0xbd9e('0x16')]);return _0x59db05(_0x4db56d[_0xbd9e('0x14')][_0xbd9e('0x16')]);}logger[_0xbd9e('0x14')](_0xbd9e('0x15'),_0x3970f6,_0x4db56d[_0xbd9e('0x14')][_0xbd9e('0x16')]);return _0x410711(_0x4db56d[_0xbd9e('0x14')][_0xbd9e('0x16')]);}else{logger[_0xbd9e('0xf')](_0xbd9e('0x15'),_0x3970f6,_0xbd9e('0x10'));_0x410711(_0x4db56d[_0xbd9e('0x17')][_0xbd9e('0x16')]);}})[_0xbd9e('0x18')](function(_0x21a3c1){logger['error']('UserVoiceQueue,\x20%s,\x20%s',_0x3970f6,_0x21a3c1);_0x59db05(_0x21a3c1);});});}
\ No newline at end of file
index 689631d..2cb105c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcb91=['express','Router','../../components/auth/service','../../components/interaction/service','exports','path','connect-timeout'];(function(_0x3ebc2a,_0x2a142f){var _0x60f8a5=function(_0x40a5ae){while(--_0x40a5ae){_0x3ebc2a['push'](_0x3ebc2a['shift']());}};_0x60f8a5(++_0x2a142f);}(_0xcb91,0x1a9));var _0x1cb9=function(_0x5ebc04,_0x14a363){_0x5ebc04=_0x5ebc04-0x0;var _0x17845c=_0xcb91[_0x5ebc04];return _0x17845c;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x1cb9('0x0'));var timeout=require(_0x1cb9('0x1'));var express=require(_0x1cb9('0x2'));var router=express[_0x1cb9('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x1cb9('0x4'));var interaction=require(_0x1cb9('0x5'));var config=require('../../config/environment');module[_0x1cb9('0x6')]=router;
\ No newline at end of file
+var _0x70e0=['../../components/auth/service','../../components/interaction/service','exports','multer','util','path','Router','fs-extra'];(function(_0x5b4a57,_0x14107a){var _0x2a0c34=function(_0x51f0e6){while(--_0x51f0e6){_0x5b4a57['push'](_0x5b4a57['shift']());}};_0x2a0c34(++_0x14107a);}(_0x70e0,0x17b));var _0x070e=function(_0x57517b,_0x5547c2){_0x57517b=_0x57517b-0x0;var _0x4f1248=_0x70e0[_0x57517b];return _0x4f1248;};'use strict';var multer=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var path=require(_0x070e('0x2'));var timeout=require('connect-timeout');var express=require('express');var router=express[_0x070e('0x3')]();var fs_extra=require(_0x070e('0x4'));var auth=require(_0x070e('0x5'));var interaction=require(_0x070e('0x6'));var config=require('../../config/environment');module[_0x070e('0x7')]=router;
\ No newline at end of file
index 607afe2..b3fea66 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x98a1=['exports','INTEGER','Required\x20by\x20Asterisk','STRING','queue_interface','sequelize'];(function(_0x2e9c45,_0x35dc85){var _0x472f09=function(_0x2618e9){while(--_0x2618e9){_0x2e9c45['push'](_0x2e9c45['shift']());}};_0x472f09(++_0x35dc85);}(_0x98a1,0x10d));var _0x198a=function(_0x5ee8e4,_0x5ee5ec){_0x5ee8e4=_0x5ee8e4-0x0;var _0x22056d=_0x98a1[_0x5ee8e4];return _0x22056d;};'use strict';var Sequelize=require(_0x198a('0x0'));module[_0x198a('0x1')]={'uniqueid':{'type':Sequelize[_0x198a('0x2')],'primaryKey':!![],'autoIncrement':!![],'comment':_0x198a('0x3')},'membername':{'type':Sequelize[_0x198a('0x4')],'allowNull':![],'comment':_0x198a('0x3')},'UserId':{'type':Sequelize[_0x198a('0x2')],'allowNull':![]},'queue_name':{'type':Sequelize[_0x198a('0x4')],'allowNull':![],'unique':_0x198a('0x5'),'comment':'Required\x20by\x20Asterisk'},'VoiceQueueId':{'type':Sequelize['INTEGER'],'allowNull':![]},'interface':{'type':Sequelize[_0x198a('0x4')],'allowNull':![],'unique':_0x198a('0x5'),'comment':_0x198a('0x3')},'penalty':{'type':Sequelize[_0x198a('0x2')](0xb),'defaultValue':0x0,'comment':_0x198a('0x3')},'paused':{'type':Sequelize[_0x198a('0x2')](0xb),'defaultValue':0x0,'comment':'Required\x20by\x20Asterisk'}};
\ No newline at end of file
+var _0xd447=['exports','Required\x20by\x20Asterisk','STRING','INTEGER','queue_interface'];(function(_0x421cf8,_0x23152c){var _0x145c48=function(_0x565862){while(--_0x565862){_0x421cf8['push'](_0x421cf8['shift']());}};_0x145c48(++_0x23152c);}(_0xd447,0xc8));var _0x7d44=function(_0x3844d1,_0x1104aa){_0x3844d1=_0x3844d1-0x0;var _0x43955e=_0xd447[_0x3844d1];return _0x43955e;};'use strict';var Sequelize=require('sequelize');module[_0x7d44('0x0')]={'uniqueid':{'type':Sequelize['INTEGER'],'primaryKey':!![],'autoIncrement':!![],'comment':_0x7d44('0x1')},'membername':{'type':Sequelize[_0x7d44('0x2')],'allowNull':![],'comment':_0x7d44('0x1')},'UserId':{'type':Sequelize[_0x7d44('0x3')],'allowNull':![]},'queue_name':{'type':Sequelize[_0x7d44('0x2')],'allowNull':![],'unique':_0x7d44('0x4'),'comment':'Required\x20by\x20Asterisk'},'VoiceQueueId':{'type':Sequelize[_0x7d44('0x3')],'allowNull':![]},'interface':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x7d44('0x4'),'comment':_0x7d44('0x1')},'penalty':{'type':Sequelize[_0x7d44('0x3')](0xb),'defaultValue':0x0,'comment':_0x7d44('0x1')},'paused':{'type':Sequelize[_0x7d44('0x3')](0xb),'defaultValue':0x0,'comment':_0x7d44('0x1')}};
\ No newline at end of file
index a7a2569..ad7f095 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8dfe=['hasOwnProperty','hook','exports','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners','update','remove','emit'];(function(_0x524a80,_0xe23eb1){var _0x2a8743=function(_0x3670a8){while(--_0x3670a8){_0x524a80['push'](_0x524a80['shift']());}};_0x2a8743(++_0xe23eb1);}(_0x8dfe,0xf3));var _0xe8df=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0x8dfe[_0x3ab51d];return _0x29a04e;};'use strict';var EventEmitter=require(_0xe8df('0x0'));var UserVoiceQueueRt=require(_0xe8df('0x1'))['db'][_0xe8df('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0xe8df('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xe8df('0x4'),'afterDestroy':_0xe8df('0x5')};function emitEvent(_0x22e66a){return function(_0x4669b2,_0x300530,_0x37bd16){UserVoiceQueueRtEvents[_0xe8df('0x6')](_0x22e66a+':'+_0x4669b2['id'],_0x4669b2);UserVoiceQueueRtEvents[_0xe8df('0x6')](_0x22e66a,_0x4669b2);_0x37bd16(null);};}for(var e in events){if(events[_0xe8df('0x7')](e)){var event=events[e];UserVoiceQueueRt[_0xe8df('0x8')](e,emitEvent(event));}}module[_0xe8df('0x9')]=UserVoiceQueueRtEvents;
\ No newline at end of file
+var _0xa664=['save','remove','emit','exports','events','../../mysqldb','UserVoiceQueueRt','setMaxListeners'];(function(_0x12fa44,_0x52f3eb){var _0x5347a2=function(_0x2ab8a3){while(--_0x2ab8a3){_0x12fa44['push'](_0x12fa44['shift']());}};_0x5347a2(++_0x52f3eb);}(_0xa664,0x154));var _0x4a66=function(_0x13937c,_0x184718){_0x13937c=_0x13937c-0x0;var _0x41617b=_0xa664[_0x13937c];return _0x41617b;};'use strict';var EventEmitter=require(_0x4a66('0x0'));var UserVoiceQueueRt=require(_0x4a66('0x1'))['db'][_0x4a66('0x2')];var UserVoiceQueueRtEvents=new EventEmitter();UserVoiceQueueRtEvents[_0x4a66('0x3')](0x0);var events={'afterCreate':_0x4a66('0x4'),'afterUpdate':'update','afterDestroy':_0x4a66('0x5')};function emitEvent(_0xec2e35){return function(_0x3e440e,_0x44f8d5,_0x199065){UserVoiceQueueRtEvents[_0x4a66('0x6')](_0xec2e35+':'+_0x3e440e['id'],_0x3e440e);UserVoiceQueueRtEvents[_0x4a66('0x6')](_0xec2e35,_0x3e440e);_0x199065(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];UserVoiceQueueRt['hook'](e,emitEvent(event));}}module[_0x4a66('0x7')]=UserVoiceQueueRtEvents;
\ No newline at end of file
index b9c197c..4871101 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7935=['user_has_voice_queues_rt','lodash','util','../../config/logger','api','bluebird','path','../../config/environment','./userVoiceQueueRt.attributes','define','UserVoiceQueueRt'];(function(_0x2e3cc9,_0xf9865a){var _0x417a37=function(_0x1d3fdf){while(--_0x1d3fdf){_0x2e3cc9['push'](_0x2e3cc9['shift']());}};_0x417a37(++_0xf9865a);}(_0x7935,0x1e5));var _0x5793=function(_0x54313f,_0x2cbd66){_0x54313f=_0x54313f-0x0;var _0x4ae0a6=_0x7935[_0x54313f];return _0x4ae0a6;};'use strict';var _=require(_0x5793('0x0'));var util=require(_0x5793('0x1'));var logger=require(_0x5793('0x2'))(_0x5793('0x3'));var moment=require('moment');var BPromise=require(_0x5793('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x5793('0x5'));var rimraf=require('rimraf');var config=require(_0x5793('0x6'));var attributes=require(_0x5793('0x7'));module['exports']=function(_0x5cdd70,_0x952560){return _0x5cdd70[_0x5793('0x8')](_0x5793('0x9'),attributes,{'tableName':_0x5793('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x7250=['lodash','../../config/logger','api','moment','request-promise','path','../../config/environment','./userVoiceQueueRt.attributes','exports','UserVoiceQueueRt','user_has_voice_queues_rt'];(function(_0x57e2f6,_0x340178){var _0x5c222e=function(_0x57105c){while(--_0x57105c){_0x57e2f6['push'](_0x57e2f6['shift']());}};_0x5c222e(++_0x340178);}(_0x7250,0x13f));var _0x0725=function(_0x4abb00,_0x259cce){_0x4abb00=_0x4abb00-0x0;var _0x506274=_0x7250[_0x4abb00];return _0x506274;};'use strict';var _=require(_0x0725('0x0'));var util=require('util');var logger=require(_0x0725('0x1'))(_0x0725('0x2'));var moment=require(_0x0725('0x3'));var BPromise=require('bluebird');var rp=require(_0x0725('0x4'));var fs=require('fs');var path=require(_0x0725('0x5'));var rimraf=require('rimraf');var config=require(_0x0725('0x6'));var attributes=require(_0x0725('0x7'));module[_0x0725('0x8')]=function(_0xac4031,_0x4f8b07){return _0xac4031['define'](_0x0725('0x9'),attributes,{'tableName':_0x0725('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 030ec77..75d7813 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd041=['findAll','options','raw','where','COUNT','sequelize','`paused`\x20=\x201,\x201,\x20null','outboundQueuePauses','stringify','catch','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','request','then','UserVoiceQueueRt,\x20%s,\x20%s','debug','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','error','message','info','request\x20sent','result','GetVoiceQueueRtPauses'];(function(_0xc7348b,_0x145880){var _0x307cec=function(_0x4f1554){while(--_0x4f1554){_0xc7348b['push'](_0xc7348b['shift']());}};_0x307cec(++_0x145880);}(_0xd041,0xdc));var _0x1d04=function(_0x12d917,_0x59ddd4){_0x12d917=_0x12d917-0x0;var _0x576d1a=_0xd041[_0x12d917];return _0x576d1a;};'use strict';var _=require('lodash');var util=require(_0x1d04('0x0'));var moment=require(_0x1d04('0x1'));var BPromise=require('bluebird');var rs=require(_0x1d04('0x2'));var fs=require('fs');var Redis=require(_0x1d04('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x1d04('0x4'));var logger=require(_0x1d04('0x5'))(_0x1d04('0x6'));var config=require('../../config/environment');var jayson=require(_0x1d04('0x7'));var client=jayson[_0x1d04('0x8')][_0x1d04('0x9')]({'port':0x232a});config[_0x1d04('0xa')]=_[_0x1d04('0xb')](config['redis'],{'host':_0x1d04('0xc'),'port':0x18eb});var socket=require(_0x1d04('0xd'))(new Redis(config[_0x1d04('0xa')]));require('./userVoiceQueueRt.socket')['register'](socket);function respondWithRpcPromise(_0x4df3e2,_0x1b208c,_0x5d10da){return new BPromise(function(_0x5caf49,_0x3c4abc){return client[_0x1d04('0xe')](_0x4df3e2,_0x5d10da)[_0x1d04('0xf')](function(_0x5e689d){logger['info'](_0x1d04('0x10'),_0x1b208c,'request\x20sent');logger[_0x1d04('0x11')](_0x1d04('0x12'),_0x1b208c,'request\x20sent',JSON['stringify'](_0x5e689d));if(_0x5e689d[_0x1d04('0x13')]){if(_0x5e689d[_0x1d04('0x13')]['code']===0x1f4){logger[_0x1d04('0x13')](_0x1d04('0x10'),_0x1b208c,_0x5e689d[_0x1d04('0x13')][_0x1d04('0x14')]);return _0x3c4abc(_0x5e689d[_0x1d04('0x13')][_0x1d04('0x14')]);}logger[_0x1d04('0x13')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x1b208c,_0x5e689d[_0x1d04('0x13')][_0x1d04('0x14')]);return _0x5caf49(_0x5e689d[_0x1d04('0x13')][_0x1d04('0x14')]);}else{logger[_0x1d04('0x15')](_0x1d04('0x10'),_0x1b208c,_0x1d04('0x16'));_0x5caf49(_0x5e689d[_0x1d04('0x17')]['message']);}})['catch'](function(_0x29c9aa){logger[_0x1d04('0x13')]('UserVoiceQueueRt,\x20%s,\x20%s',_0x1b208c,_0x29c9aa);_0x3c4abc(_0x29c9aa);});});}exports[_0x1d04('0x18')]=function(_0x5ebed7){var _0x1b4dfe=this;return new Promise(function(_0x357df3,_0x2cf705){return db['UserVoiceQueueRt'][_0x1d04('0x19')]({'raw':_0x5ebed7[_0x1d04('0x1a')]?_0x5ebed7[_0x1d04('0x1a')][_0x1d04('0x1b')]===undefined?!![]:![]:!![],'where':_0x5ebed7[_0x1d04('0x1a')]?_0x5ebed7[_0x1d04('0x1a')][_0x1d04('0x1c')]||null:null,'attributes':[[db['sequelize']['fn'](_0x1d04('0x1d'),db[_0x1d04('0x1e')]['fn']('IF',db[_0x1d04('0x1e')]['literal'](_0x1d04('0x1f')))),_0x1d04('0x20')]]})['then'](function(_0x563e3f){logger[_0x1d04('0x15')](_0x1d04('0x18'),_0x5ebed7);logger['debug']('GetVoiceQueueRtPauses',_0x5ebed7,JSON[_0x1d04('0x21')](_0x563e3f));_0x357df3(_0x563e3f);})[_0x1d04('0x22')](function(_0x2a9704){logger['error']('GetVoiceQueueRtPauses',_0x2a9704[_0x1d04('0x14')],_0x5ebed7);_0x2cf705(_0x1b4dfe[_0x1d04('0x13')](0x1f4,_0x2a9704[_0x1d04('0x14')]));});});};
\ No newline at end of file
+var _0xe06b=['options','raw','where','COUNT','sequelize','literal','`paused`\x20=\x201,\x201,\x20null','then','stringify','lodash','util','bluebird','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','http','defaults','redis','localhost','socket.io-emitter','register','info','UserVoiceQueueRt,\x20%s,\x20%s','debug','UserVoiceQueueRt,\x20%s,\x20%s,\x20%s','request\x20sent','error','code','message','result','catch','GetVoiceQueueRtPauses','UserVoiceQueueRt','findAll'];(function(_0x5e9367,_0x593734){var _0x4bc030=function(_0x1a35e1){while(--_0x1a35e1){_0x5e9367['push'](_0x5e9367['shift']());}};_0x4bc030(++_0x593734);}(_0xe06b,0x14d));var _0xbe06=function(_0x37de0e,_0x5414fc){_0x37de0e=_0x37de0e-0x0;var _0x35da79=_0xe06b[_0x37de0e];return _0x35da79;};'use strict';var _=require(_0xbe06('0x0'));var util=require(_0xbe06('0x1'));var moment=require('moment');var BPromise=require(_0xbe06('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xbe06('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xbe06('0x4'))('rpc');var config=require(_0xbe06('0x5'));var jayson=require(_0xbe06('0x6'));var client=jayson[_0xbe06('0x7')][_0xbe06('0x8')]({'port':0x232a});config['redis']=_[_0xbe06('0x9')](config[_0xbe06('0xa')],{'host':_0xbe06('0xb'),'port':0x18eb});var socket=require(_0xbe06('0xc'))(new Redis(config[_0xbe06('0xa')]));require('./userVoiceQueueRt.socket')[_0xbe06('0xd')](socket);function respondWithRpcPromise(_0x51d009,_0x169c31,_0x675322){return new BPromise(function(_0x41088e,_0xffe2e2){return client['request'](_0x51d009,_0x675322)['then'](function(_0x43e11e){logger[_0xbe06('0xe')](_0xbe06('0xf'),_0x169c31,'request\x20sent');logger[_0xbe06('0x10')](_0xbe06('0x11'),_0x169c31,_0xbe06('0x12'),JSON['stringify'](_0x43e11e));if(_0x43e11e[_0xbe06('0x13')]){if(_0x43e11e[_0xbe06('0x13')][_0xbe06('0x14')]===0x1f4){logger['error'](_0xbe06('0xf'),_0x169c31,_0x43e11e['error'][_0xbe06('0x15')]);return _0xffe2e2(_0x43e11e['error'][_0xbe06('0x15')]);}logger['error'](_0xbe06('0xf'),_0x169c31,_0x43e11e[_0xbe06('0x13')][_0xbe06('0x15')]);return _0x41088e(_0x43e11e[_0xbe06('0x13')][_0xbe06('0x15')]);}else{logger[_0xbe06('0xe')](_0xbe06('0xf'),_0x169c31,_0xbe06('0x12'));_0x41088e(_0x43e11e[_0xbe06('0x16')][_0xbe06('0x15')]);}})[_0xbe06('0x17')](function(_0x1de48b){logger[_0xbe06('0x13')](_0xbe06('0xf'),_0x169c31,_0x1de48b);_0xffe2e2(_0x1de48b);});});}exports[_0xbe06('0x18')]=function(_0x34bca3){var _0x4a25d=this;return new Promise(function(_0x326f60,_0x571865){return db[_0xbe06('0x19')][_0xbe06('0x1a')]({'raw':_0x34bca3[_0xbe06('0x1b')]?_0x34bca3[_0xbe06('0x1b')][_0xbe06('0x1c')]===undefined?!![]:![]:!![],'where':_0x34bca3[_0xbe06('0x1b')]?_0x34bca3[_0xbe06('0x1b')][_0xbe06('0x1d')]||null:null,'attributes':[[db['sequelize']['fn'](_0xbe06('0x1e'),db[_0xbe06('0x1f')]['fn']('IF',db[_0xbe06('0x1f')][_0xbe06('0x20')](_0xbe06('0x21')))),'outboundQueuePauses']]})[_0xbe06('0x22')](function(_0x33fe48){logger[_0xbe06('0xe')](_0xbe06('0x18'),_0x34bca3);logger[_0xbe06('0x10')]('GetVoiceQueueRtPauses',_0x34bca3,JSON[_0xbe06('0x23')](_0x33fe48));_0x326f60(_0x33fe48);})[_0xbe06('0x17')](function(_0x2f5a7d){logger['error'](_0xbe06('0x18'),_0x2f5a7d['message'],_0x34bca3);_0x571865(_0x4a25d['error'](0x1f4,_0x2f5a7d[_0xbe06('0x15')]));});});};
\ No newline at end of file
index fd01e04..d4103dd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x96fd=['register','length','userVoiceQueueRt:','save','update','emit'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x96fd,0x1e9));var _0xd96f=function(_0x2ee9c6,_0x5cd6b7){_0x2ee9c6=_0x2ee9c6-0x0;var _0xef041f=_0x96fd[_0x2ee9c6];return _0xef041f;};'use strict';var UserVoiceQueueRtEvents=require('./userVoiceQueueRt.events');var events=[_0xd96f('0x0'),'remove',_0xd96f('0x1')];function createListener(_0x561a45,_0x4b9472){return function(_0x131315){_0x4b9472[_0xd96f('0x2')](_0x561a45,_0x131315);};}function removeListener(_0x44f63c,_0x22b39b){return function(){UserVoiceQueueRtEvents['removeListener'](_0x44f63c,_0x22b39b);};}exports[_0xd96f('0x3')]=function(_0xee38ce){for(var _0x5d65d1=0x0,_0xe6000a=events[_0xd96f('0x4')];_0x5d65d1<_0xe6000a;_0x5d65d1++){var _0x3ae72a=events[_0x5d65d1];var _0xb32b34=createListener(_0xd96f('0x5')+_0x3ae72a,_0xee38ce);UserVoiceQueueRtEvents['on'](_0x3ae72a,_0xb32b34);}};
\ No newline at end of file
+var _0xafc4=['register','length','userVoiceQueueRt:','./userVoiceQueueRt.events','remove','emit'];(function(_0x2f6f50,_0x1d21a7){var _0x2cf365=function(_0x1c40a7){while(--_0x1c40a7){_0x2f6f50['push'](_0x2f6f50['shift']());}};_0x2cf365(++_0x1d21a7);}(_0xafc4,0x69));var _0x4afc=function(_0xd3adea,_0x59280c){_0xd3adea=_0xd3adea-0x0;var _0x55dea6=_0xafc4[_0xd3adea];return _0x55dea6;};'use strict';var UserVoiceQueueRtEvents=require(_0x4afc('0x0'));var events=['save',_0x4afc('0x1'),'update'];function createListener(_0x10aede,_0x11789f){return function(_0x20e443){_0x11789f[_0x4afc('0x2')](_0x10aede,_0x20e443);};}function removeListener(_0x4d9dbd,_0x49f417){return function(){UserVoiceQueueRtEvents['removeListener'](_0x4d9dbd,_0x49f417);};}exports[_0x4afc('0x3')]=function(_0x471d45){for(var _0x16953b=0x0,_0x1bb281=events[_0x4afc('0x4')];_0x16953b<_0x1bb281;_0x16953b++){var _0xaf053d=events[_0x16953b];var _0x5e1e29=createListener(_0x4afc('0x5')+_0xaf053d,_0x471d45);UserVoiceQueueRtEvents['on'](_0xaf053d,_0x5e1e29);}};
\ No newline at end of file
index a59cff9..927d211 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c44=['express','Router','fs-extra','../../components/auth/service','exports','path','connect-timeout'];(function(_0x10c634,_0x406922){var _0x57390b=function(_0x2bce24){while(--_0x2bce24){_0x10c634['push'](_0x10c634['shift']());}};_0x57390b(++_0x406922);}(_0x9c44,0x178));var _0x49c4=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0x9c44[_0x2641f9];return _0x585741;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x49c4('0x0'));var timeout=require(_0x49c4('0x1'));var express=require(_0x49c4('0x2'));var router=express[_0x49c4('0x3')]();var fs_extra=require(_0x49c4('0x4'));var auth=require(_0x49c4('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');module[_0x49c4('0x6')]=router;
\ No newline at end of file
+var _0x9c44=['express','Router','fs-extra','../../components/auth/service','exports','path','connect-timeout'];(function(_0x5b6dd2,_0x43f939){var _0x4a62e8=function(_0xa07ca4){while(--_0xa07ca4){_0x5b6dd2['push'](_0x5b6dd2['shift']());}};_0x4a62e8(++_0x43f939);}(_0x9c44,0x178));var _0x49c4=function(_0x68c979,_0x431cff){_0x68c979=_0x68c979-0x0;var _0x4f0001=_0x9c44[_0x68c979];return _0x4f0001;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x49c4('0x0'));var timeout=require(_0x49c4('0x1'));var express=require(_0x49c4('0x2'));var router=express[_0x49c4('0x3')]();var fs_extra=require(_0x49c4('0x4'));var auth=require(_0x49c4('0x5'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');module[_0x49c4('0x6')]=router;
\ No newline at end of file
index 2457d38..c61b661 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x897b=['sequelize','exports','INTEGER'];(function(_0x6131cd,_0x4c26a1){var _0x47e916=function(_0x1f2bce){while(--_0x1f2bce){_0x6131cd['push'](_0x6131cd['shift']());}};_0x47e916(++_0x4c26a1);}(_0x897b,0x90));var _0xb897=function(_0xe59193,_0x46d344){_0xe59193=_0xe59193-0x0;var _0x59e289=_0x897b[_0xe59193];return _0x59e289;};'use strict';var Sequelize=require(_0xb897('0x0'));module[_0xb897('0x1')]={'penalty':{'type':Sequelize[_0xb897('0x2')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x0bc3=['INTEGER','sequelize'];(function(_0x2fc1d8,_0x16edcd){var _0x4015b7=function(_0x2183e6){while(--_0x2183e6){_0x2fc1d8['push'](_0x2fc1d8['shift']());}};_0x4015b7(++_0x16edcd);}(_0x0bc3,0x6f));var _0x30bc=function(_0x4c9b9d,_0x30777a){_0x4c9b9d=_0x4c9b9d-0x0;var _0x231e5a=_0x0bc3[_0x4c9b9d];return _0x231e5a;};'use strict';var Sequelize=require(_0x30bc('0x0'));module['exports']={'penalty':{'type':Sequelize[_0x30bc('0x1')],'defaultValue':0x0}};
\ No newline at end of file
index 527b85d..6f8c059 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x25ed=['../../config/environment','./userWhatsappQueue.attributes','exports','define','UserWhatsappQueue','lodash','util','api','moment','rimraf'];(function(_0x58ceb9,_0x5601df){var _0x3d0ff5=function(_0x3a79d0){while(--_0x3a79d0){_0x58ceb9['push'](_0x58ceb9['shift']());}};_0x3d0ff5(++_0x5601df);}(_0x25ed,0xc3));var _0xd25e=function(_0x210ed6,_0x3dffa7){_0x210ed6=_0x210ed6-0x0;var _0x353e65=_0x25ed[_0x210ed6];return _0x353e65;};'use strict';var _=require(_0xd25e('0x0'));var util=require(_0xd25e('0x1'));var logger=require('../../config/logger')(_0xd25e('0x2'));var moment=require(_0xd25e('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0xd25e('0x4'));var config=require(_0xd25e('0x5'));var attributes=require(_0xd25e('0x6'));module[_0xd25e('0x7')]=function(_0x546bf9,_0x5dc37c){return _0x546bf9[_0xd25e('0x8')](_0xd25e('0x9'),attributes,{'tableName':'user_has_whatsapp_queues','paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x83dc=['user_has_whatsapp_queues','lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','define','UserWhatsappQueue'];(function(_0x161e33,_0x1c7e1b){var _0x43a186=function(_0x13201f){while(--_0x13201f){_0x161e33['push'](_0x161e33['shift']());}};_0x43a186(++_0x1c7e1b);}(_0x83dc,0x85));var _0xc83d=function(_0x542f80,_0x26c87e){_0x542f80=_0x542f80-0x0;var _0x25e5d1=_0x83dc[_0x542f80];return _0x25e5d1;};'use strict';var _=require(_0xc83d('0x0'));var util=require(_0xc83d('0x1'));var logger=require(_0xc83d('0x2'))('api');var moment=require(_0xc83d('0x3'));var BPromise=require(_0xc83d('0x4'));var rp=require(_0xc83d('0x5'));var fs=require('fs');var path=require(_0xc83d('0x6'));var rimraf=require(_0xc83d('0x7'));var config=require(_0xc83d('0x8'));var attributes=require('./userWhatsappQueue.attributes');module['exports']=function(_0xc22ba2,_0x35251d){return _0xc22ba2[_0xc83d('0x9')](_0xc83d('0xa'),attributes,{'tableName':_0xc83d('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 602b896..3e839ff 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa618=['http','request','then','UserWhatsappQueue,\x20%s,\x20%s','request\x20sent','UserWhatsappQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','moment','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise'];(function(_0x281681,_0x30995a){var _0xc5e4c4=function(_0x256f8b){while(--_0x256f8b){_0x281681['push'](_0x281681['shift']());}};_0xc5e4c4(++_0x30995a);}(_0xa618,0x12b));var _0x8a61=function(_0x410e3f,_0x16c26e){_0x410e3f=_0x410e3f-0x0;var _0x131e28=_0xa618[_0x410e3f];return _0x131e28;};'use strict';var _=require(_0x8a61('0x0'));var util=require('util');var moment=require(_0x8a61('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x8a61('0x2'));var db=require(_0x8a61('0x3'))['db'];var utils=require(_0x8a61('0x4'));var logger=require(_0x8a61('0x5'))(_0x8a61('0x6'));var config=require(_0x8a61('0x7'));var jayson=require(_0x8a61('0x8'));var client=jayson['client'][_0x8a61('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x42040d,_0x50ad52,_0x3834be){return new BPromise(function(_0x7090aa,_0x15ffaf){return client[_0x8a61('0xa')](_0x42040d,_0x3834be)[_0x8a61('0xb')](function(_0x2fdd6e){logger['info'](_0x8a61('0xc'),_0x50ad52,_0x8a61('0xd'));logger['debug'](_0x8a61('0xe'),_0x50ad52,'request\x20sent',JSON[_0x8a61('0xf')](_0x2fdd6e));if(_0x2fdd6e[_0x8a61('0x10')]){if(_0x2fdd6e[_0x8a61('0x10')][_0x8a61('0x11')]===0x1f4){logger['error'](_0x8a61('0xc'),_0x50ad52,_0x2fdd6e[_0x8a61('0x10')][_0x8a61('0x12')]);return _0x15ffaf(_0x2fdd6e[_0x8a61('0x10')]['message']);}logger[_0x8a61('0x10')](_0x8a61('0xc'),_0x50ad52,_0x2fdd6e[_0x8a61('0x10')]['message']);return _0x7090aa(_0x2fdd6e[_0x8a61('0x10')][_0x8a61('0x12')]);}else{logger[_0x8a61('0x13')]('UserWhatsappQueue,\x20%s,\x20%s',_0x50ad52,_0x8a61('0xd'));_0x7090aa(_0x2fdd6e[_0x8a61('0x14')]['message']);}})[_0x8a61('0x15')](function(_0x1c49d7){logger['error'](_0x8a61('0xc'),_0x50ad52,_0x1c49d7);_0x15ffaf(_0x1c49d7);});});}
\ No newline at end of file
+var _0x0195=['../../config/environment','request','then','request\x20sent','debug','UserWhatsappQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','UserWhatsappQueue,\x20%s,\x20%s','info','result','catch','lodash','util','bluebird','randomstring','../../mysqldb','../../config/utils','rpc'];(function(_0x46cd9a,_0x2a2630){var _0x3b2905=function(_0x3b482b){while(--_0x3b482b){_0x46cd9a['push'](_0x46cd9a['shift']());}};_0x3b2905(++_0x2a2630);}(_0x0195,0x173));var _0x5019=function(_0x341041,_0x42abfb){_0x341041=_0x341041-0x0;var _0x4449e7=_0x0195[_0x341041];return _0x4449e7;};'use strict';var _=require(_0x5019('0x0'));var util=require(_0x5019('0x1'));var moment=require('moment');var BPromise=require(_0x5019('0x2'));var rs=require(_0x5019('0x3'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x5019('0x4'))['db'];var utils=require(_0x5019('0x5'));var logger=require('../../config/logger')(_0x5019('0x6'));var config=require(_0x5019('0x7'));var jayson=require('jayson/promise');var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x3cbacf,_0xda5190,_0x1590dc){return new BPromise(function(_0x46b3e5,_0xc73471){return client[_0x5019('0x8')](_0x3cbacf,_0x1590dc)[_0x5019('0x9')](function(_0x19969d){logger['info']('UserWhatsappQueue,\x20%s,\x20%s',_0xda5190,_0x5019('0xa'));logger[_0x5019('0xb')](_0x5019('0xc'),_0xda5190,_0x5019('0xa'),JSON[_0x5019('0xd')](_0x19969d));if(_0x19969d[_0x5019('0xe')]){if(_0x19969d[_0x5019('0xe')][_0x5019('0xf')]===0x1f4){logger[_0x5019('0xe')]('UserWhatsappQueue,\x20%s,\x20%s',_0xda5190,_0x19969d[_0x5019('0xe')][_0x5019('0x10')]);return _0xc73471(_0x19969d['error'][_0x5019('0x10')]);}logger[_0x5019('0xe')](_0x5019('0x11'),_0xda5190,_0x19969d[_0x5019('0xe')][_0x5019('0x10')]);return _0x46b3e5(_0x19969d['error'][_0x5019('0x10')]);}else{logger[_0x5019('0x12')](_0x5019('0x11'),_0xda5190,_0x5019('0xa'));_0x46b3e5(_0x19969d[_0x5019('0x13')][_0x5019('0x10')]);}})[_0x5019('0x14')](function(_0x4506a4){logger[_0x5019('0xe')](_0x5019('0x11'),_0xda5190,_0x4506a4);_0xc73471(_0x4506a4);});});}
\ No newline at end of file
index a29a29e..324425b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe57e=['update','delete','destroy','exports','multer','path','connect-timeout','express','../../components/auth/service','../../config/environment','./variable.controller','get','/:id','isAuthenticated','show','post','create'];(function(_0x310a1b,_0x4c9129){var _0xdea206=function(_0x1f1e8d){while(--_0x1f1e8d){_0x310a1b['push'](_0x310a1b['shift']());}};_0xdea206(++_0x4c9129);}(_0xe57e,0xf2));var _0xee57=function(_0x3a7e45,_0x1a1a14){_0x3a7e45=_0x3a7e45-0x0;var _0x4782e9=_0xe57e[_0x3a7e45];return _0x4782e9;};'use strict';var multer=require(_0xee57('0x0'));var util=require('util');var path=require(_0xee57('0x1'));var timeout=require(_0xee57('0x2'));var express=require(_0xee57('0x3'));var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0xee57('0x4'));var interaction=require('../../components/interaction/service');var config=require(_0xee57('0x5'));var controller=require(_0xee57('0x6'));router[_0xee57('0x7')]('/',auth['isAuthenticated'](),controller['index']);router[_0xee57('0x7')](_0xee57('0x8'),auth[_0xee57('0x9')](),controller[_0xee57('0xa')]);router[_0xee57('0xb')]('/',auth[_0xee57('0x9')](),controller[_0xee57('0xc')]);router['put']('/:id',auth[_0xee57('0x9')](),controller[_0xee57('0xd')]);router[_0xee57('0xe')](_0xee57('0x8'),auth[_0xee57('0x9')](),controller[_0xee57('0xf')]);module[_0xee57('0x10')]=router;
\ No newline at end of file
+var _0xd2ce=['get','index','/:id','show','isAuthenticated','create','update','delete','destroy','exports','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x4360da,_0x84f6cc){var _0x42c667=function(_0x15b2de){while(--_0x15b2de){_0x4360da['push'](_0x4360da['shift']());}};_0x42c667(++_0x84f6cc);}(_0xd2ce,0x13c));var _0xed2c=function(_0x4e1d03,_0x786f3a){_0x4e1d03=_0x4e1d03-0x0;var _0x362d4b=_0xd2ce[_0x4e1d03];return _0x362d4b;};'use strict';var multer=require('multer');var util=require(_0xed2c('0x0'));var path=require('path');var timeout=require(_0xed2c('0x1'));var express=require(_0xed2c('0x2'));var router=express[_0xed2c('0x3')]();var fs_extra=require(_0xed2c('0x4'));var auth=require(_0xed2c('0x5'));var interaction=require(_0xed2c('0x6'));var config=require(_0xed2c('0x7'));var controller=require('./variable.controller');router[_0xed2c('0x8')]('/',auth['isAuthenticated'](),controller[_0xed2c('0x9')]);router[_0xed2c('0x8')](_0xed2c('0xa'),auth['isAuthenticated'](),controller[_0xed2c('0xb')]);router['post']('/',auth[_0xed2c('0xc')](),controller[_0xed2c('0xd')]);router['put']('/:id',auth[_0xed2c('0xc')](),controller[_0xed2c('0xe')]);router[_0xed2c('0xf')](_0xed2c('0xa'),auth['isAuthenticated'](),controller[_0xed2c('0x10')]);module[_0xed2c('0x11')]=router;
\ No newline at end of file
index 299ae8e..ea40512 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x88ea=['exports','STRING'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x88ea,0x110));var _0xa88e=function(_0x3da6a8,_0x19fb8f){_0x3da6a8=_0x3da6a8-0x0;var _0x487df4=_0x88ea[_0x3da6a8];return _0x487df4;};'use strict';var Sequelize=require('sequelize');module[_0xa88e('0x0')]={'name':{'type':Sequelize['STRING'],'unique':'name','allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize[_0xa88e('0x1')]}};
\ No newline at end of file
+var _0x351f=['STRING','name','sequelize','exports'];(function(_0x4ef734,_0x5826d){var _0x33a7cb=function(_0x127a2b){while(--_0x127a2b){_0x4ef734['push'](_0x4ef734['shift']());}};_0x33a7cb(++_0x5826d);}(_0x351f,0xd6));var _0xf351=function(_0x484ccd,_0x5bce31){_0x484ccd=_0x484ccd-0x0;var _0x3a871d=_0x351f[_0x484ccd];return _0x3a871d;};'use strict';var Sequelize=require(_0xf351('0x0'));module[_0xf351('0x1')]={'name':{'type':Sequelize[_0xf351('0x2')],'unique':_0xf351('0x3'),'allowNull':![],'validate':{'notEmpty':!![]}},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 3394616..cf42183 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1a59=['path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','sendStatus','status','end','offset','undefined','limit','count','Content-Range','json','apply','reject','save','update','then','destroy','get','Variables','error','stack','name','send','index','Variable','rawAttributes','fieldName','type','model','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','include','findAll','catch','show','params','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','find','rimraf','moment'];(function(_0x3a77d,_0x392a9e){var _0x28bbdb=function(_0x2b6396){while(--_0x2b6396){_0x3a77d['push'](_0x3a77d['shift']());}};_0x28bbdb(++_0x392a9e);}(_0x1a59,0x1de));var _0x91a5=function(_0x44fc3f,_0x4774d1){_0x44fc3f=_0x44fc3f-0x0;var _0x926ba3=_0x1a59[_0x44fc3f];return _0x926ba3;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x91a5('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x91a5('0x1'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0x91a5('0x2'));var sox=require(_0x91a5('0x3'));var csv=require(_0x91a5('0x4'));var ejs=require(_0x91a5('0x5'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x91a5('0x6'));var squel=require(_0x91a5('0x7'));var crypto=require(_0x91a5('0x8'));var jsforce=require(_0x91a5('0x9'));var deskjs=require(_0x91a5('0xa'));var toCsv=require(_0x91a5('0x4'));var querystring=require(_0x91a5('0xb'));var Papa=require('papaparse');var Redis=require(_0x91a5('0xc'));var authService=require(_0x91a5('0xd'));var qs=require(_0x91a5('0xe'));var as=require(_0x91a5('0xf'));var hardwareService=require(_0x91a5('0x10'));var logger=require(_0x91a5('0x11'))(_0x91a5('0x12'));var utils=require(_0x91a5('0x13'));var config=require(_0x91a5('0x14'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x56f0f9,_0x506d0d){_0x506d0d=_0x506d0d||0xcc;return function(_0x11ee4c){if(_0x11ee4c){return _0x56f0f9[_0x91a5('0x15')](_0x506d0d);}return _0x56f0f9[_0x91a5('0x16')](_0x506d0d)[_0x91a5('0x17')]();};}function respondWithResult(_0x4fbb29,_0x455411){_0x455411=_0x455411||0xc8;return function(_0x513809){if(_0x513809){return _0x4fbb29[_0x91a5('0x16')](_0x455411)['json'](_0x513809);}};}function respondWithFilteredResult(_0x49dd34,_0x4c16cc){return function(_0x3e4d3d){if(_0x3e4d3d){var _0x90553a=typeof _0x4c16cc[_0x91a5('0x18')]===_0x91a5('0x19')&&typeof _0x4c16cc[_0x91a5('0x1a')]===_0x91a5('0x19');var _0x251a8d=_0x3e4d3d[_0x91a5('0x1b')];var _0x461d39=_0x90553a?0x0:_0x4c16cc[_0x91a5('0x18')];var _0x31dd21=_0x90553a?_0x3e4d3d[_0x91a5('0x1b')]:_0x4c16cc['offset']+_0x4c16cc[_0x91a5('0x1a')];var _0xc9903d;if(_0x31dd21>=_0x251a8d){_0x31dd21=_0x251a8d;_0xc9903d=0xc8;}else{_0xc9903d=0xce;}_0x49dd34[_0x91a5('0x16')](_0xc9903d);return _0x49dd34['set'](_0x91a5('0x1c'),_0x461d39+'-'+_0x31dd21+'/'+_0x251a8d)[_0x91a5('0x1d')](_0x3e4d3d);}return null;};}function patchUpdates(_0x2281f7){return function(_0x46a63c){try{jsonpatch[_0x91a5('0x1e')](_0x46a63c,_0x2281f7,!![]);}catch(_0x5715e3){return BPromise[_0x91a5('0x1f')](_0x5715e3);}return _0x46a63c[_0x91a5('0x20')]();};}function saveUpdates(_0x1cbce9,_0xdfab21){return function(_0x6ccccb){if(_0x6ccccb){return _0x6ccccb[_0x91a5('0x21')](_0x1cbce9)[_0x91a5('0x22')](function(_0x515913){return _0x515913;});}return null;};}function removeEntity(_0x36af32,_0xe6ecc9){return function(_0x4eef34){if(_0x4eef34){return _0x4eef34[_0x91a5('0x23')]()[_0x91a5('0x22')](function(){var _0x120216=_0x4eef34[_0x91a5('0x24')]({'plain':!![]});var _0x434fec=_0x91a5('0x25');return db['UserProfileResource']['destroy']({'where':{'type':_0x434fec,'resourceId':_0x120216['id']}})[_0x91a5('0x22')](function(){return _0x4eef34;});})['then'](function(){_0x36af32[_0x91a5('0x16')](0xcc)[_0x91a5('0x17')]();});}};}function handleEntityNotFound(_0x2bb9db,_0x466c92){return function(_0x2b443f){if(!_0x2b443f){_0x2bb9db[_0x91a5('0x15')](0x194);}return _0x2b443f;};}function handleError(_0x53db49,_0x28df84){_0x28df84=_0x28df84||0x1f4;return function(_0xcd4638){logger[_0x91a5('0x26')](_0xcd4638[_0x91a5('0x27')]);if(_0xcd4638['name']){delete _0xcd4638[_0x91a5('0x28')];}_0x53db49['status'](_0x28df84)[_0x91a5('0x29')](_0xcd4638);};}exports[_0x91a5('0x2a')]=function(_0x4ce668,_0x434b47){var _0x142813={},_0x4afee8={},_0x51ce7f={'count':0x0,'rows':[]};var _0x62b62a=_['map'](db[_0x91a5('0x2b')][_0x91a5('0x2c')],function(_0x1ffe22){return{'name':_0x1ffe22[_0x91a5('0x2d')],'type':_0x1ffe22[_0x91a5('0x2e')]['key']};});_0x4afee8[_0x91a5('0x2f')]=_[_0x91a5('0x30')](_0x62b62a,_0x91a5('0x28'));_0x4afee8[_0x91a5('0x31')]=_[_0x91a5('0x32')](_0x4ce668[_0x91a5('0x31')]);_0x4afee8[_0x91a5('0x33')]=_[_0x91a5('0x34')](_0x4afee8[_0x91a5('0x2f')],_0x4afee8[_0x91a5('0x31')]);_0x142813[_0x91a5('0x35')]=_[_0x91a5('0x34')](_0x4afee8[_0x91a5('0x2f')],qs[_0x91a5('0x36')](_0x4ce668[_0x91a5('0x31')][_0x91a5('0x36')]));_0x142813[_0x91a5('0x35')]=_0x142813['attributes'][_0x91a5('0x37')]?_0x142813[_0x91a5('0x35')]:_0x4afee8[_0x91a5('0x2f')];if(!_0x4ce668['query'][_0x91a5('0x38')](_0x91a5('0x39'))){_0x142813[_0x91a5('0x1a')]=qs['limit'](_0x4ce668[_0x91a5('0x31')]['limit']);_0x142813[_0x91a5('0x18')]=qs[_0x91a5('0x18')](_0x4ce668[_0x91a5('0x31')]['offset']);}_0x142813[_0x91a5('0x3a')]=qs[_0x91a5('0x3b')](_0x4ce668['query'][_0x91a5('0x3b')]);_0x142813[_0x91a5('0x3c')]=qs[_0x91a5('0x33')](_[_0x91a5('0x3d')](_0x4ce668[_0x91a5('0x31')],_0x4afee8['filters']),_0x62b62a);if(_0x4ce668['query'][_0x91a5('0x3e')]){_0x142813[_0x91a5('0x3c')]=_[_0x91a5('0x3f')](_0x142813[_0x91a5('0x3c')],{'$or':_[_0x91a5('0x30')](_0x62b62a,function(_0x429d94){if(_0x429d94[_0x91a5('0x2e')]!=='VIRTUAL'){var _0x4a8a9a={};_0x4a8a9a[_0x429d94[_0x91a5('0x28')]]={'$like':'%'+_0x4ce668['query'][_0x91a5('0x3e')]+'%'};return _0x4a8a9a;}})});}_0x142813=_[_0x91a5('0x3f')]({},_0x142813,_0x4ce668[_0x91a5('0x40')]);var _0x243be5={'where':_0x142813[_0x91a5('0x3c')]};return db[_0x91a5('0x2b')][_0x91a5('0x1b')](_0x243be5)['then'](function(_0x5a5b0e){_0x51ce7f['count']=_0x5a5b0e;if(_0x4ce668[_0x91a5('0x31')]['includeAll']){_0x142813[_0x91a5('0x41')]=[{'all':!![]}];}return db['Variable'][_0x91a5('0x42')](_0x142813);})[_0x91a5('0x22')](function(_0x49f651){_0x51ce7f['rows']=_0x49f651;return _0x51ce7f;})[_0x91a5('0x22')](respondWithFilteredResult(_0x434b47,_0x142813))[_0x91a5('0x43')](handleError(_0x434b47,null));};exports[_0x91a5('0x44')]=function(_0x499815,_0x27f48a){var _0x5729c3={'raw':!![],'where':{'id':_0x499815[_0x91a5('0x45')]['id']}},_0x4e672a={};_0x4e672a[_0x91a5('0x2f')]=_['keys'](db[_0x91a5('0x2b')]['rawAttributes']);_0x4e672a[_0x91a5('0x31')]=_[_0x91a5('0x32')](_0x499815[_0x91a5('0x31')]);_0x4e672a[_0x91a5('0x33')]=_['intersection'](_0x4e672a[_0x91a5('0x2f')],_0x4e672a['query']);_0x5729c3[_0x91a5('0x35')]=_[_0x91a5('0x34')](_0x4e672a[_0x91a5('0x2f')],qs[_0x91a5('0x36')](_0x499815[_0x91a5('0x31')][_0x91a5('0x36')]));_0x5729c3['attributes']=_0x5729c3[_0x91a5('0x35')][_0x91a5('0x37')]?_0x5729c3[_0x91a5('0x35')]:_0x4e672a[_0x91a5('0x2f')];if(_0x499815[_0x91a5('0x31')]['includeAll']){_0x5729c3[_0x91a5('0x41')]=[{'all':!![]}];}_0x5729c3=_[_0x91a5('0x3f')]({},_0x5729c3,_0x499815[_0x91a5('0x40')]);return db['Variable']['find'](_0x5729c3)[_0x91a5('0x22')](handleEntityNotFound(_0x27f48a,null))['then'](respondWithResult(_0x27f48a,null))['catch'](handleError(_0x27f48a,null));};exports[_0x91a5('0x46')]=function(_0x32a604,_0x322488){return db[_0x91a5('0x2b')][_0x91a5('0x46')](_0x32a604[_0x91a5('0x47')],{})[_0x91a5('0x22')](function(_0x53e33a){var _0x6177ea=_0x32a604[_0x91a5('0x48')]['get']({'plain':!![]});if(!_0x6177ea)throw new Error(_0x91a5('0x49'));if(_0x6177ea[_0x91a5('0x4a')]==='user'){var _0x8e0f=_0x53e33a[_0x91a5('0x24')]({'plain':!![]});var _0x532dcd=_0x91a5('0x25');return db[_0x91a5('0x4b')]['find']({'where':{'name':_0x532dcd,'userProfileId':_0x6177ea[_0x91a5('0x4c')]},'raw':!![]})[_0x91a5('0x22')](function(_0x1c7ded){if(_0x1c7ded&&_0x1c7ded['autoAssociation']===0x0){return db[_0x91a5('0x4d')]['create']({'name':_0x8e0f[_0x91a5('0x28')],'resourceId':_0x8e0f['id'],'type':_0x1c7ded['name'],'sectionId':_0x1c7ded['id']},{})[_0x91a5('0x22')](function(){return _0x53e33a;});}else{return _0x53e33a;}})[_0x91a5('0x43')](function(_0x3a4fd5){logger[_0x91a5('0x26')](_0x91a5('0x4e'),_0x3a4fd5);throw _0x3a4fd5;});}return _0x53e33a;})[_0x91a5('0x22')](respondWithResult(_0x322488,0xc9))[_0x91a5('0x43')](handleError(_0x322488,null));};exports[_0x91a5('0x21')]=function(_0x54b89c,_0x4c6a07){if(_0x54b89c['body']['id']){delete _0x54b89c[_0x91a5('0x47')]['id'];}return db[_0x91a5('0x2b')][_0x91a5('0x4f')]({'where':{'id':_0x54b89c[_0x91a5('0x45')]['id']}})[_0x91a5('0x22')](handleEntityNotFound(_0x4c6a07,null))[_0x91a5('0x22')](saveUpdates(_0x54b89c[_0x91a5('0x47')],null))['then'](respondWithResult(_0x4c6a07,null))['catch'](handleError(_0x4c6a07,null));};exports[_0x91a5('0x23')]=function(_0x13bc51,_0x4757f5){return db['Variable'][_0x91a5('0x4f')]({'where':{'id':_0x13bc51['params']['id']}})['then'](handleEntityNotFound(_0x4757f5,null))[_0x91a5('0x22')](removeEntity(_0x4757f5,null))['catch'](handleError(_0x4757f5,null));};
\ No newline at end of file
+var _0x6b32=['../../config/license/util','sendStatus','json','offset','undefined','limit','count','status','set','Content-Range','apply','reject','save','then','get','Variables','UserProfileResource','destroy','name','send','index','map','rawAttributes','fieldName','type','key','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','order','sort','where','filter','merge','options','Variable','includeAll','include','findAll','rows','catch','show','params','find','create','body','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','squel','crypto','jsforce','querystring','papaparse','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/environment'];(function(_0x4d6c7c,_0x27ddb6){var _0x251050=function(_0x2d54d7){while(--_0x2d54d7){_0x4d6c7c['push'](_0x4d6c7c['shift']());}};_0x251050(++_0x27ddb6);}(_0x6b32,0x183));var _0x26b3=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0x6b32[_0x20a584];return _0x4b41a8;};'use strict';var emlformat=require(_0x26b3('0x0'));var rimraf=require(_0x26b3('0x1'));var zipdir=require(_0x26b3('0x2'));var jsonpatch=require(_0x26b3('0x3'));var rp=require(_0x26b3('0x4'));var moment=require(_0x26b3('0x5'));var BPromise=require(_0x26b3('0x6'));var Mustache=require(_0x26b3('0x7'));var util=require(_0x26b3('0x8'));var path=require(_0x26b3('0x9'));var sox=require(_0x26b3('0xa'));var csv=require(_0x26b3('0xb'));var ejs=require(_0x26b3('0xc'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x26b3('0xd'));var crypto=require(_0x26b3('0xe'));var jsforce=require(_0x26b3('0xf'));var deskjs=require('desk.js');var toCsv=require(_0x26b3('0xb'));var querystring=require(_0x26b3('0x10'));var Papa=require(_0x26b3('0x11'));var Redis=require('ioredis');var authService=require(_0x26b3('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x26b3('0x13'));var hardwareService=require(_0x26b3('0x14'));var logger=require('../../config/logger')(_0x26b3('0x15'));var utils=require('../../config/utils');var config=require(_0x26b3('0x16'));var licenseUtil=require(_0x26b3('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x37d966,_0x86ee0c){_0x86ee0c=_0x86ee0c||0xcc;return function(_0x31e807){if(_0x31e807){return _0x37d966[_0x26b3('0x18')](_0x86ee0c);}return _0x37d966['status'](_0x86ee0c)['end']();};}function respondWithResult(_0x254dc3,_0x29df90){_0x29df90=_0x29df90||0xc8;return function(_0x2fbc7c){if(_0x2fbc7c){return _0x254dc3['status'](_0x29df90)[_0x26b3('0x19')](_0x2fbc7c);}};}function respondWithFilteredResult(_0x1f04e8,_0x482861){return function(_0x3a449c){if(_0x3a449c){var _0x1c851c=typeof _0x482861[_0x26b3('0x1a')]===_0x26b3('0x1b')&&typeof _0x482861[_0x26b3('0x1c')]===_0x26b3('0x1b');var _0x5d41fd=_0x3a449c[_0x26b3('0x1d')];var _0xa5a16a=_0x1c851c?0x0:_0x482861['offset'];var _0x427a03=_0x1c851c?_0x3a449c[_0x26b3('0x1d')]:_0x482861['offset']+_0x482861[_0x26b3('0x1c')];var _0x25df65;if(_0x427a03>=_0x5d41fd){_0x427a03=_0x5d41fd;_0x25df65=0xc8;}else{_0x25df65=0xce;}_0x1f04e8[_0x26b3('0x1e')](_0x25df65);return _0x1f04e8[_0x26b3('0x1f')](_0x26b3('0x20'),_0xa5a16a+'-'+_0x427a03+'/'+_0x5d41fd)[_0x26b3('0x19')](_0x3a449c);}return null;};}function patchUpdates(_0x3bb058){return function(_0x17bde3){try{jsonpatch[_0x26b3('0x21')](_0x17bde3,_0x3bb058,!![]);}catch(_0xbf27fe){return BPromise[_0x26b3('0x22')](_0xbf27fe);}return _0x17bde3[_0x26b3('0x23')]();};}function saveUpdates(_0x5565f2,_0x3dbb5f){return function(_0x4181da){if(_0x4181da){return _0x4181da['update'](_0x5565f2)[_0x26b3('0x24')](function(_0x4979f2){return _0x4979f2;});}return null;};}function removeEntity(_0x4fb9a6,_0x414996){return function(_0x3cbfd8){if(_0x3cbfd8){return _0x3cbfd8['destroy']()[_0x26b3('0x24')](function(){var _0x28df8a=_0x3cbfd8[_0x26b3('0x25')]({'plain':!![]});var _0x56df05=_0x26b3('0x26');return db[_0x26b3('0x27')][_0x26b3('0x28')]({'where':{'type':_0x56df05,'resourceId':_0x28df8a['id']}})[_0x26b3('0x24')](function(){return _0x3cbfd8;});})[_0x26b3('0x24')](function(){_0x4fb9a6[_0x26b3('0x1e')](0xcc)['end']();});}};}function handleEntityNotFound(_0x6ae55b,_0x8f7f1e){return function(_0x319a58){if(!_0x319a58){_0x6ae55b[_0x26b3('0x18')](0x194);}return _0x319a58;};}function handleError(_0x5b5b52,_0x33698c){_0x33698c=_0x33698c||0x1f4;return function(_0x89a8ec){logger['error'](_0x89a8ec['stack']);if(_0x89a8ec[_0x26b3('0x29')]){delete _0x89a8ec[_0x26b3('0x29')];}_0x5b5b52[_0x26b3('0x1e')](_0x33698c)[_0x26b3('0x2a')](_0x89a8ec);};}exports[_0x26b3('0x2b')]=function(_0x3b2690,_0x5710d0){var _0x1dafcd={},_0x2eec70={},_0x561767={'count':0x0,'rows':[]};var _0x2ee385=_[_0x26b3('0x2c')](db['Variable'][_0x26b3('0x2d')],function(_0x10adfa){return{'name':_0x10adfa[_0x26b3('0x2e')],'type':_0x10adfa[_0x26b3('0x2f')][_0x26b3('0x30')]};});_0x2eec70['model']=_[_0x26b3('0x2c')](_0x2ee385,_0x26b3('0x29'));_0x2eec70['query']=_[_0x26b3('0x31')](_0x3b2690[_0x26b3('0x32')]);_0x2eec70[_0x26b3('0x33')]=_[_0x26b3('0x34')](_0x2eec70[_0x26b3('0x35')],_0x2eec70[_0x26b3('0x32')]);_0x1dafcd[_0x26b3('0x36')]=_[_0x26b3('0x34')](_0x2eec70[_0x26b3('0x35')],qs[_0x26b3('0x37')](_0x3b2690['query'][_0x26b3('0x37')]));_0x1dafcd[_0x26b3('0x36')]=_0x1dafcd[_0x26b3('0x36')][_0x26b3('0x38')]?_0x1dafcd[_0x26b3('0x36')]:_0x2eec70['model'];if(!_0x3b2690[_0x26b3('0x32')][_0x26b3('0x39')]('nolimit')){_0x1dafcd[_0x26b3('0x1c')]=qs[_0x26b3('0x1c')](_0x3b2690['query'][_0x26b3('0x1c')]);_0x1dafcd[_0x26b3('0x1a')]=qs[_0x26b3('0x1a')](_0x3b2690[_0x26b3('0x32')][_0x26b3('0x1a')]);}_0x1dafcd[_0x26b3('0x3a')]=qs[_0x26b3('0x3b')](_0x3b2690[_0x26b3('0x32')]['sort']);_0x1dafcd[_0x26b3('0x3c')]=qs[_0x26b3('0x33')](_['pick'](_0x3b2690[_0x26b3('0x32')],_0x2eec70[_0x26b3('0x33')]),_0x2ee385);if(_0x3b2690[_0x26b3('0x32')][_0x26b3('0x3d')]){_0x1dafcd[_0x26b3('0x3c')]=_[_0x26b3('0x3e')](_0x1dafcd['where'],{'$or':_[_0x26b3('0x2c')](_0x2ee385,function(_0xf57a7c){if(_0xf57a7c[_0x26b3('0x2f')]!=='VIRTUAL'){var _0x473c27={};_0x473c27[_0xf57a7c['name']]={'$like':'%'+_0x3b2690[_0x26b3('0x32')][_0x26b3('0x3d')]+'%'};return _0x473c27;}})});}_0x1dafcd=_[_0x26b3('0x3e')]({},_0x1dafcd,_0x3b2690[_0x26b3('0x3f')]);var _0x529689={'where':_0x1dafcd[_0x26b3('0x3c')]};return db[_0x26b3('0x40')]['count'](_0x529689)[_0x26b3('0x24')](function(_0x57021d){_0x561767[_0x26b3('0x1d')]=_0x57021d;if(_0x3b2690['query'][_0x26b3('0x41')]){_0x1dafcd[_0x26b3('0x42')]=[{'all':!![]}];}return db[_0x26b3('0x40')][_0x26b3('0x43')](_0x1dafcd);})[_0x26b3('0x24')](function(_0x1242e4){_0x561767[_0x26b3('0x44')]=_0x1242e4;return _0x561767;})[_0x26b3('0x24')](respondWithFilteredResult(_0x5710d0,_0x1dafcd))[_0x26b3('0x45')](handleError(_0x5710d0,null));};exports[_0x26b3('0x46')]=function(_0x32e8e2,_0x168c16){var _0x2b2017={'raw':!![],'where':{'id':_0x32e8e2[_0x26b3('0x47')]['id']}},_0xc05346={};_0xc05346[_0x26b3('0x35')]=_[_0x26b3('0x31')](db[_0x26b3('0x40')][_0x26b3('0x2d')]);_0xc05346[_0x26b3('0x32')]=_[_0x26b3('0x31')](_0x32e8e2[_0x26b3('0x32')]);_0xc05346[_0x26b3('0x33')]=_['intersection'](_0xc05346['model'],_0xc05346[_0x26b3('0x32')]);_0x2b2017['attributes']=_['intersection'](_0xc05346[_0x26b3('0x35')],qs[_0x26b3('0x37')](_0x32e8e2[_0x26b3('0x32')][_0x26b3('0x37')]));_0x2b2017['attributes']=_0x2b2017[_0x26b3('0x36')][_0x26b3('0x38')]?_0x2b2017[_0x26b3('0x36')]:_0xc05346[_0x26b3('0x35')];if(_0x32e8e2[_0x26b3('0x32')]['includeAll']){_0x2b2017['include']=[{'all':!![]}];}_0x2b2017=_[_0x26b3('0x3e')]({},_0x2b2017,_0x32e8e2[_0x26b3('0x3f')]);return db[_0x26b3('0x40')][_0x26b3('0x48')](_0x2b2017)['then'](handleEntityNotFound(_0x168c16,null))['then'](respondWithResult(_0x168c16,null))[_0x26b3('0x45')](handleError(_0x168c16,null));};exports[_0x26b3('0x49')]=function(_0x1488c0,_0x32596e){return db[_0x26b3('0x40')]['create'](_0x1488c0[_0x26b3('0x4a')],{})[_0x26b3('0x24')](function(_0x3a6973){var _0x3c0512=_0x1488c0[_0x26b3('0x4b')][_0x26b3('0x25')]({'plain':!![]});if(!_0x3c0512)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x3c0512[_0x26b3('0x4c')]===_0x26b3('0x4b')){var _0x20c0cb=_0x3a6973[_0x26b3('0x25')]({'plain':!![]});var _0x1f621b=_0x26b3('0x26');return db[_0x26b3('0x4d')][_0x26b3('0x48')]({'where':{'name':_0x1f621b,'userProfileId':_0x3c0512[_0x26b3('0x4e')]},'raw':!![]})['then'](function(_0x8ee6a4){if(_0x8ee6a4&&_0x8ee6a4[_0x26b3('0x4f')]===0x0){return db['UserProfileResource'][_0x26b3('0x49')]({'name':_0x20c0cb['name'],'resourceId':_0x20c0cb['id'],'type':_0x8ee6a4[_0x26b3('0x29')],'sectionId':_0x8ee6a4['id']},{})[_0x26b3('0x24')](function(){return _0x3a6973;});}else{return _0x3a6973;}})[_0x26b3('0x45')](function(_0x3f537c){logger['error'](_0x26b3('0x50'),_0x3f537c);throw _0x3f537c;});}return _0x3a6973;})[_0x26b3('0x24')](respondWithResult(_0x32596e,0xc9))[_0x26b3('0x45')](handleError(_0x32596e,null));};exports[_0x26b3('0x51')]=function(_0x27675a,_0x53d851){if(_0x27675a[_0x26b3('0x4a')]['id']){delete _0x27675a[_0x26b3('0x4a')]['id'];}return db[_0x26b3('0x40')]['find']({'where':{'id':_0x27675a[_0x26b3('0x47')]['id']}})[_0x26b3('0x24')](handleEntityNotFound(_0x53d851,null))[_0x26b3('0x24')](saveUpdates(_0x27675a[_0x26b3('0x4a')],null))[_0x26b3('0x24')](respondWithResult(_0x53d851,null))[_0x26b3('0x45')](handleError(_0x53d851,null));};exports['destroy']=function(_0x238431,_0x187a77){return db[_0x26b3('0x40')][_0x26b3('0x48')]({'where':{'id':_0x238431[_0x26b3('0x47')]['id']}})[_0x26b3('0x24')](handleEntityNotFound(_0x187a77,null))[_0x26b3('0x24')](removeEntity(_0x187a77,null))[_0x26b3('0x45')](handleError(_0x187a77,null));};
\ No newline at end of file
index 40677e3..076fbda 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8bd4=['bluebird','request-promise','path','rimraf','../../config/environment','./variable.attributes','exports','define','Variable','tools_variables','util','../../config/logger','moment'];(function(_0x31f15b,_0xa486f7){var _0x15e504=function(_0x137b00){while(--_0x137b00){_0x31f15b['push'](_0x31f15b['shift']());}};_0x15e504(++_0xa486f7);}(_0x8bd4,0x142));var _0x48bd=function(_0x7e4858,_0x298cce){_0x7e4858=_0x7e4858-0x0;var _0x52ec9c=_0x8bd4[_0x7e4858];return _0x52ec9c;};'use strict';var _=require('lodash');var util=require(_0x48bd('0x0'));var logger=require(_0x48bd('0x1'))('api');var moment=require(_0x48bd('0x2'));var BPromise=require(_0x48bd('0x3'));var rp=require(_0x48bd('0x4'));var fs=require('fs');var path=require(_0x48bd('0x5'));var rimraf=require(_0x48bd('0x6'));var config=require(_0x48bd('0x7'));var attributes=require(_0x48bd('0x8'));module[_0x48bd('0x9')]=function(_0x5d8efd,_0x93f839){return _0x5d8efd[_0x48bd('0xa')](_0x48bd('0xb'),attributes,{'tableName':_0x48bd('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xb44f=['path','rimraf','../../config/environment','./variable.attributes','define','Variable','tools_variables','lodash','util','../../config/logger','api','moment','bluebird','request-promise'];(function(_0x1fcf0e,_0x4fc15f){var _0x30db67=function(_0x21e0a8){while(--_0x21e0a8){_0x1fcf0e['push'](_0x1fcf0e['shift']());}};_0x30db67(++_0x4fc15f);}(_0xb44f,0x165));var _0xfb44=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0xb44f[_0x3b380d];return _0x54502b;};'use strict';var _=require(_0xfb44('0x0'));var util=require(_0xfb44('0x1'));var logger=require(_0xfb44('0x2'))(_0xfb44('0x3'));var moment=require(_0xfb44('0x4'));var BPromise=require(_0xfb44('0x5'));var rp=require(_0xfb44('0x6'));var fs=require('fs');var path=require(_0xfb44('0x7'));var rimraf=require(_0xfb44('0x8'));var config=require(_0xfb44('0x9'));var attributes=require(_0xfb44('0xa'));module['exports']=function(_0xb881c7,_0x5a6795){return _0xb881c7[_0xfb44('0xb')](_0xfb44('0xc'),attributes,{'tableName':_0xfb44('0xd'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 9cb08ef..e98e9dc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x55ca=['options','where','attributes','include','map','model','lodash','util','ioredis','../../mysqldb','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','Variable,\x20%s,\x20%s','request\x20sent','debug','Variable,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','ShowVariable','Variable','find'];(function(_0x4e85c4,_0x447081){var _0x48b799=function(_0x13c2ce){while(--_0x13c2ce){_0x4e85c4['push'](_0x4e85c4['shift']());}};_0x48b799(++_0x447081);}(_0x55ca,0x126));var _0xa55c=function(_0x29379a,_0x16b64f){_0x29379a=_0x29379a-0x0;var _0x125b52=_0x55ca[_0x29379a];return _0x125b52;};'use strict';var _=require(_0xa55c('0x0'));var util=require(_0xa55c('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xa55c('0x2'));var db=require(_0xa55c('0x3'))['db'];var utils=require('../../config/utils');var logger=require(_0xa55c('0x4'))(_0xa55c('0x5'));var config=require(_0xa55c('0x6'));var jayson=require(_0xa55c('0x7'));var client=jayson[_0xa55c('0x8')][_0xa55c('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x36b623,_0x4d0624,_0x2121fd){return new BPromise(function(_0x2537f0,_0x57e069){return client[_0xa55c('0xa')](_0x36b623,_0x2121fd)[_0xa55c('0xb')](function(_0x52a3bc){logger['info'](_0xa55c('0xc'),_0x4d0624,_0xa55c('0xd'));logger[_0xa55c('0xe')](_0xa55c('0xf'),_0x4d0624,_0xa55c('0xd'),JSON[_0xa55c('0x10')](_0x52a3bc));if(_0x52a3bc[_0xa55c('0x11')]){if(_0x52a3bc[_0xa55c('0x11')][_0xa55c('0x12')]===0x1f4){logger[_0xa55c('0x11')]('Variable,\x20%s,\x20%s',_0x4d0624,_0x52a3bc['error'][_0xa55c('0x13')]);return _0x57e069(_0x52a3bc['error']['message']);}logger['error'](_0xa55c('0xc'),_0x4d0624,_0x52a3bc[_0xa55c('0x11')][_0xa55c('0x13')]);return _0x2537f0(_0x52a3bc[_0xa55c('0x11')][_0xa55c('0x13')]);}else{logger[_0xa55c('0x14')]('Variable,\x20%s,\x20%s',_0x4d0624,_0xa55c('0xd'));_0x2537f0(_0x52a3bc[_0xa55c('0x15')][_0xa55c('0x13')]);}})[_0xa55c('0x16')](function(_0x1c4cfd){logger[_0xa55c('0x11')](_0xa55c('0xc'),_0x4d0624,_0x1c4cfd);_0x57e069(_0x1c4cfd);});});}exports[_0xa55c('0x17')]=function(_0x24783b){var _0x4cee3c=this;return new Promise(function(_0x3d4c9e,_0x104a99){return db[_0xa55c('0x18')][_0xa55c('0x19')]({'raw':_0x24783b[_0xa55c('0x1a')]?_0x24783b[_0xa55c('0x1a')]['raw']===undefined?!![]:![]:!![],'where':_0x24783b['options']?_0x24783b[_0xa55c('0x1a')][_0xa55c('0x1b')]||null:null,'attributes':_0x24783b[_0xa55c('0x1a')]?_0x24783b['options'][_0xa55c('0x1c')]||null:null,'include':_0x24783b[_0xa55c('0x1a')]?_0x24783b['options'][_0xa55c('0x1d')]?_[_0xa55c('0x1e')](_0x24783b[_0xa55c('0x1a')][_0xa55c('0x1d')],function(_0x234372){return{'model':db[_0x234372['model']],'as':_0x234372['as'],'attributes':_0x234372[_0xa55c('0x1c')],'include':_0x234372['include']?_['map'](_0x234372['include'],function(_0x19ae88){return{'model':db[_0x19ae88['model']],'as':_0x19ae88['as'],'attributes':_0x19ae88[_0xa55c('0x1c')],'include':_0x19ae88[_0xa55c('0x1d')]?_[_0xa55c('0x1e')](_0x19ae88[_0xa55c('0x1d')],function(_0x2313a9){return{'model':db[_0x2313a9[_0xa55c('0x1f')]],'as':_0x2313a9['as'],'attributes':_0x2313a9[_0xa55c('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xa55c('0xb')](function(_0x192df2){logger[_0xa55c('0x14')](_0xa55c('0x17'),_0x24783b);logger['debug'](_0xa55c('0x17'),_0x24783b,JSON[_0xa55c('0x10')](_0x192df2));_0x3d4c9e(_0x192df2);})[_0xa55c('0x16')](function(_0x906caa){logger['error'](_0xa55c('0x17'),_0x906caa[_0xa55c('0x13')],_0x24783b);_0x104a99(_0x4cee3c[_0xa55c('0x11')](0x1f4,_0x906caa[_0xa55c('0x13')]));});});};
\ No newline at end of file
+var _0xabce=['moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','client','then','info','Variable,\x20%s,\x20%s','request\x20sent','debug','Variable,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','ShowVariable','Variable','find','options','attributes','map','include','model','catch','lodash','util'];(function(_0x38ba02,_0x512355){var _0x2a6071=function(_0x10a64f){while(--_0x10a64f){_0x38ba02['push'](_0x38ba02['shift']());}};_0x2a6071(++_0x512355);}(_0xabce,0x103));var _0xeabc=function(_0x3899d1,_0x4aa04c){_0x3899d1=_0x3899d1-0x0;var _0xeb4a7d=_0xabce[_0x3899d1];return _0xeb4a7d;};'use strict';var _=require(_0xeabc('0x0'));var util=require(_0xeabc('0x1'));var moment=require(_0xeabc('0x2'));var BPromise=require(_0xeabc('0x3'));var rs=require(_0xeabc('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xeabc('0x5'));var logger=require(_0xeabc('0x6'))(_0xeabc('0x7'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xeabc('0x8')]['http']({'port':0x232a});function respondWithRpcPromise(_0x229ba4,_0x52ede8,_0x3bdc29){return new BPromise(function(_0x9417af,_0x8434c5){return client['request'](_0x229ba4,_0x3bdc29)[_0xeabc('0x9')](function(_0x341f16){logger[_0xeabc('0xa')](_0xeabc('0xb'),_0x52ede8,_0xeabc('0xc'));logger[_0xeabc('0xd')](_0xeabc('0xe'),_0x52ede8,_0xeabc('0xc'),JSON[_0xeabc('0xf')](_0x341f16));if(_0x341f16[_0xeabc('0x10')]){if(_0x341f16[_0xeabc('0x10')][_0xeabc('0x11')]===0x1f4){logger[_0xeabc('0x10')](_0xeabc('0xb'),_0x52ede8,_0x341f16[_0xeabc('0x10')][_0xeabc('0x12')]);return _0x8434c5(_0x341f16['error'][_0xeabc('0x12')]);}logger[_0xeabc('0x10')](_0xeabc('0xb'),_0x52ede8,_0x341f16['error']['message']);return _0x9417af(_0x341f16[_0xeabc('0x10')][_0xeabc('0x12')]);}else{logger[_0xeabc('0xa')]('Variable,\x20%s,\x20%s',_0x52ede8,_0xeabc('0xc'));_0x9417af(_0x341f16[_0xeabc('0x13')]['message']);}})['catch'](function(_0x10fa8e){logger['error'](_0xeabc('0xb'),_0x52ede8,_0x10fa8e);_0x8434c5(_0x10fa8e);});});}exports[_0xeabc('0x14')]=function(_0x58a3c0){var _0x16f08b=this;return new Promise(function(_0x31dd53,_0x31f52a){return db[_0xeabc('0x15')][_0xeabc('0x16')]({'raw':_0x58a3c0['options']?_0x58a3c0[_0xeabc('0x17')]['raw']===undefined?!![]:![]:!![],'where':_0x58a3c0[_0xeabc('0x17')]?_0x58a3c0[_0xeabc('0x17')]['where']||null:null,'attributes':_0x58a3c0[_0xeabc('0x17')]?_0x58a3c0[_0xeabc('0x17')][_0xeabc('0x18')]||null:null,'include':_0x58a3c0[_0xeabc('0x17')]?_0x58a3c0[_0xeabc('0x17')]['include']?_[_0xeabc('0x19')](_0x58a3c0[_0xeabc('0x17')][_0xeabc('0x1a')],function(_0x5bdd57){return{'model':db[_0x5bdd57[_0xeabc('0x1b')]],'as':_0x5bdd57['as'],'attributes':_0x5bdd57[_0xeabc('0x18')],'include':_0x5bdd57[_0xeabc('0x1a')]?_[_0xeabc('0x19')](_0x5bdd57['include'],function(_0x109e1d){return{'model':db[_0x109e1d['model']],'as':_0x109e1d['as'],'attributes':_0x109e1d[_0xeabc('0x18')],'include':_0x109e1d['include']?_[_0xeabc('0x19')](_0x109e1d[_0xeabc('0x1a')],function(_0x269621){return{'model':db[_0x269621[_0xeabc('0x1b')]],'as':_0x269621['as'],'attributes':_0x269621[_0xeabc('0x18')]};}):[]};}):[]};}):[]:[]})[_0xeabc('0x9')](function(_0x131722){logger['info']('ShowVariable',_0x58a3c0);logger[_0xeabc('0xd')]('ShowVariable',_0x58a3c0,JSON[_0xeabc('0xf')](_0x131722));_0x31dd53(_0x131722);})[_0xeabc('0x1c')](function(_0x48fb52){logger[_0xeabc('0x10')](_0xeabc('0x14'),_0x48fb52[_0xeabc('0x12')],_0x58a3c0);_0x31f52a(_0x16f08b[_0xeabc('0x10')](0x1f4,_0x48fb52[_0xeabc('0x12')]));});});};
\ No newline at end of file
index 74390f7..4b0d247 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7f02=['/fetch','isAuthenticated','/reset','canUpdate','/pull','/restart','restart','exports','./version.controller','get','index'];(function(_0x5972de,_0x2b786b){var _0x5d1f41=function(_0x3f2901){while(--_0x3f2901){_0x5972de['push'](_0x5972de['shift']());}};_0x5d1f41(++_0x2b786b);}(_0x7f02,0x152));var _0x27f0=function(_0x52f73a,_0x4418dd){_0x52f73a=_0x52f73a-0x0;var _0x4b5d40=_0x7f02[_0x52f73a];return _0x4b5d40;};'use strict';var express=require('express');var router=express['Router']();var auth=require('../../components/auth/service');var controller=require(_0x27f0('0x0'));router[_0x27f0('0x1')]('/',controller[_0x27f0('0x2')]);router['get'](_0x27f0('0x3'),auth[_0x27f0('0x4')](),auth['canUpdate'](),controller['fetch']);router[_0x27f0('0x1')](_0x27f0('0x5'),auth['isAuthenticated'](),auth[_0x27f0('0x6')](),controller['reset']);router['get'](_0x27f0('0x7'),auth[_0x27f0('0x4')](),auth[_0x27f0('0x6')](),controller['pull']);router[_0x27f0('0x1')](_0x27f0('0x8'),auth['isAuthenticated'](),controller[_0x27f0('0x9')]);router[_0x27f0('0x1')]('/migrations',controller['migrations']);module[_0x27f0('0xa')]=router;
\ No newline at end of file
+var _0x1e4e=['migrations','express','Router','../../components/auth/service','./version.controller','get','index','/fetch','isAuthenticated','canUpdate','fetch','/reset','reset','restart','/migrations'];(function(_0x65c0bb,_0x82e7b8){var _0x320bd5=function(_0x6e1675){while(--_0x6e1675){_0x65c0bb['push'](_0x65c0bb['shift']());}};_0x320bd5(++_0x82e7b8);}(_0x1e4e,0x1c3));var _0xe1e4=function(_0x32df8b,_0x284235){_0x32df8b=_0x32df8b-0x0;var _0x4d75ec=_0x1e4e[_0x32df8b];return _0x4d75ec;};'use strict';var express=require(_0xe1e4('0x0'));var router=express[_0xe1e4('0x1')]();var auth=require(_0xe1e4('0x2'));var controller=require(_0xe1e4('0x3'));router[_0xe1e4('0x4')]('/',controller[_0xe1e4('0x5')]);router['get'](_0xe1e4('0x6'),auth[_0xe1e4('0x7')](),auth[_0xe1e4('0x8')](),controller[_0xe1e4('0x9')]);router[_0xe1e4('0x4')](_0xe1e4('0xa'),auth[_0xe1e4('0x7')](),auth[_0xe1e4('0x8')](),controller[_0xe1e4('0xb')]);router['get']('/pull',auth[_0xe1e4('0x7')](),auth['canUpdate'](),controller['pull']);router[_0xe1e4('0x4')]('/restart',auth[_0xe1e4('0x7')](),controller[_0xe1e4('0xc')]);router[_0xe1e4('0x4')](_0xe1e4('0xd'),controller[_0xe1e4('0xe')]);module['exports']=router;
\ No newline at end of file
index 676451f..58e4d6a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1a76=['pull','restart','then','migrations','readdirSync','join','root','server','length','replace','.js','push','sort','Migration','constructor','map','Database\x20migrated\x20successfully\x20from\x20version\x20','\x20to\x20','last','catch','UniqueConstraintError','Database\x20already\x20up-to-date','umzug','path','lodash','version','compare-versions','exec','../../config/pm2','../../config/logger','update','simple-git','exports','query','tags','latest','2.0.0','status','json','fetch','origin','master','error','info','git\x20fetch','reset','--hard','FETCH_HEAD','git\x20reset\x20--hard\x20FETCH_HEAD','git\x20reset\x20--hard'];(function(_0x36d703,_0x55b354){var _0x12c909=function(_0x5e846a){while(--_0x5e846a){_0x36d703['push'](_0x36d703['shift']());}};_0x12c909(++_0x55b354);}(_0x1a76,0xac));var _0x61a7=function(_0x6c993a,_0x5ea3ab){_0x6c993a=_0x6c993a-0x0;var _0x27f547=_0x1a76[_0x6c993a];return _0x27f547;};'use strict';var Umzug=require(_0x61a7('0x0'));var path=require(_0x61a7('0x1'));var fs=require('fs');var _=require(_0x61a7('0x2'));var pkginfo=require('pkginfo')(module,_0x61a7('0x3'));var compareVersions=require(_0x61a7('0x4'));var exec=require('child_process')[_0x61a7('0x5')];var db=require('../../mysqldb')['db'];var config=require('../../config/environment');var pm2=require(_0x61a7('0x6'));var logger=require(_0x61a7('0x7'))(_0x61a7('0x8'));var git=require(_0x61a7('0x9'))(config['root']);exports['index']=function(_0x240f2e,_0x2512cb){var _0x171c82={'current':module[_0x61a7('0xa')][_0x61a7('0x3')],'phonebar':0x2};if(_0x240f2e['query']&&_0x240f2e[_0x61a7('0xb')]['latest']){return git['fetch']()[_0x61a7('0xc')](function(_0x1abbcf,_0x53b760){_0x171c82[_0x61a7('0xd')]=(_0x1abbcf?module['exports'][_0x61a7('0x3')]:_0x53b760[_0x61a7('0xd')])||_0x61a7('0xe');return _0x2512cb[_0x61a7('0xf')](0xc8)[_0x61a7('0x10')](_0x171c82);});}else{return _0x2512cb[_0x61a7('0xf')](0xc8)[_0x61a7('0x10')](_0x171c82);}};exports['fetch']=function(_0x588692,_0x47468d){return git[_0x61a7('0x11')]([_0x61a7('0x12'),_0x61a7('0x13')],function(_0xfc08ea){if(_0xfc08ea){logger[_0x61a7('0x14')](_0xfc08ea);return _0x47468d['status'](0x1f4)[_0x61a7('0x10')](_0xfc08ea);}logger[_0x61a7('0x15')](_0x61a7('0x16'));return _0x47468d['status'](0xc8)['json']({'output':'git\x20fetch\x20origin\x20master'});});};exports[_0x61a7('0x17')]=function(_0x455883,_0xe4cbf){return git['reset']([_0x61a7('0x18'),_0x61a7('0x19')],function(_0x43efff){if(_0x43efff){logger[_0x61a7('0x14')](_0x43efff);return _0xe4cbf[_0x61a7('0xf')](0x1f4)[_0x61a7('0x10')](_0x43efff);}logger[_0x61a7('0x15')](_0x61a7('0x1a'));return _0xe4cbf[_0x61a7('0xf')](0xc8)[_0x61a7('0x10')]({'output':_0x61a7('0x1b')});});};exports[_0x61a7('0x1c')]=function(_0x17d7ea,_0x1846ae){exec('npm\x20install\x20--production',function(_0x5c0530,_0x278566,_0xc3ec94){logger[_0x61a7('0x15')](_0x278566);logger[_0x61a7('0x15')](_0xc3ec94);if(_0x5c0530){logger['error'](_0x5c0530);return _0x1846ae[_0x61a7('0xf')](0x1f4)[_0x61a7('0x10')](_0x5c0530);}return _0x1846ae['status'](0xc8)[_0x61a7('0x10')]({'output':_0x278566});});};exports[_0x61a7('0x1d')]=function(_0xfaded3,_0x5d7446){return pm2[_0x61a7('0x1d')]('motion2')[_0x61a7('0x1e')](function(_0x135715){logger[_0x61a7('0x15')]('pm2\x20restart\x20motion\x20%s',_0x135715);return _0x5d7446[_0x61a7('0xf')](0xc8)['json']({'output':'Your\x20system\x20has\x20been\x20restart\x20successfully'});})['catch'](function(_0x1da05b){logger['error'](_0x1da05b);return _0x5d7446['status'](0x1f4)[_0x61a7('0x10')](_0x1da05b);});};exports[_0x61a7('0x1f')]=function(_0x5cf7df,_0x39d501){var _0x8806df=fs[_0x61a7('0x20')](path[_0x61a7('0x21')](config[_0x61a7('0x22')],_0x61a7('0x23'),_0x61a7('0x1f')));var _0xbe073f=[];for(var _0x4bd18e=0x0;_0x4bd18e<_0x8806df[_0x61a7('0x24')];_0x4bd18e++){var _0x316898=_0x8806df[_0x4bd18e][_0x61a7('0x25')](_0x61a7('0x26'),'');if(compareVersions(module[_0x61a7('0xa')][_0x61a7('0x3')],_0x316898)===-0x1){_0xbe073f[_0x61a7('0x27')](_0x316898);}}if(_0xbe073f['length']){var _0x383f06=_0xbe073f[_0x61a7('0x28')](compareVersions);var _0x582b5f=new Umzug({'storage':'sequelize','storageOptions':{'model':db[_0x61a7('0x29')],'modelName':_0x61a7('0x29'),'columnName':_0x61a7('0x3')},'migrations':{'params':[db['sequelize']['getQueryInterface'](),db['sequelize'][_0x61a7('0x2a')],function(){throw new Error('Migration\x20tried\x20to\x20use\x20old\x20style\x20\x22done\x22\x20callback.\x20Please\x20upgrade\x20to\x20\x22umzug\x22\x20and\x20return\x20a\x20promise\x20instead.');}],'path':path[_0x61a7('0x21')](config[_0x61a7('0x22')],_0x61a7('0x23'),_0x61a7('0x1f')),'pattern':/\.js$/}});_0x582b5f['up']({'migrations':_[_0x61a7('0x2b')](_0x383f06,function(_0x4d71cc){return _0x4d71cc+_0x61a7('0x26');})})['then'](function(){return _0x39d501[_0x61a7('0xf')](0xc8)[_0x61a7('0x10')]({'output':_0x61a7('0x2c')+module['exports']['version']+_0x61a7('0x2d')+_[_0x61a7('0x2e')](_0x383f06),'migrations':_['join'](_0x383f06)});})[_0x61a7('0x2f')](function(_0xd8122c){if(_0xd8122c instanceof db['sequelize'][_0x61a7('0x30')]){return _0x39d501[_0x61a7('0xf')](0xc8)[_0x61a7('0x10')]({'output':_0x61a7('0x31')});}else{return _0x39d501['status'](0x1f4)[_0x61a7('0x10')](_0xd8122c);}});}else{return _0x39d501[_0x61a7('0xf')](0xc8)[_0x61a7('0x10')]({'output':_0x61a7('0x31')});}};
\ No newline at end of file
+var _0x9ca3=['json','origin','error','info','git\x20fetch\x20origin\x20master','reset','--hard','git\x20reset\x20--hard\x20FETCH_HEAD','pull','restart','motion2','then','Your\x20system\x20has\x20been\x20restart\x20successfully','catch','migrations','readdirSync','join','server','length','replace','.js','version','push','sort','sequelize','Migration','constructor','map','\x20to\x20','last','UniqueConstraintError','Database\x20already\x20up-to-date','path','lodash','compare-versions','child_process','exec','../../mysqldb','../../config/environment','../../config/logger','update','simple-git','root','index','exports','query','latest','fetch','2.0.0','status'];(function(_0x472085,_0xb4b247){var _0x5f1d0a=function(_0x2a677c){while(--_0x2a677c){_0x472085['push'](_0x472085['shift']());}};_0x5f1d0a(++_0xb4b247);}(_0x9ca3,0xb6));var _0x39ca=function(_0x210214,_0x5b921b){_0x210214=_0x210214-0x0;var _0x117145=_0x9ca3[_0x210214];return _0x117145;};'use strict';var Umzug=require('umzug');var path=require(_0x39ca('0x0'));var fs=require('fs');var _=require(_0x39ca('0x1'));var pkginfo=require('pkginfo')(module,'version');var compareVersions=require(_0x39ca('0x2'));var exec=require(_0x39ca('0x3'))[_0x39ca('0x4')];var db=require(_0x39ca('0x5'))['db'];var config=require(_0x39ca('0x6'));var pm2=require('../../config/pm2');var logger=require(_0x39ca('0x7'))(_0x39ca('0x8'));var git=require(_0x39ca('0x9'))(config[_0x39ca('0xa')]);exports[_0x39ca('0xb')]=function(_0x2f39a2,_0xa46923){var _0x3ad753={'current':module[_0x39ca('0xc')]['version'],'phonebar':0x2};if(_0x2f39a2[_0x39ca('0xd')]&&_0x2f39a2[_0x39ca('0xd')][_0x39ca('0xe')]){return git[_0x39ca('0xf')]()['tags'](function(_0x23c3ce,_0x3682b9){_0x3ad753[_0x39ca('0xe')]=(_0x23c3ce?module[_0x39ca('0xc')]['version']:_0x3682b9[_0x39ca('0xe')])||_0x39ca('0x10');return _0xa46923[_0x39ca('0x11')](0xc8)[_0x39ca('0x12')](_0x3ad753);});}else{return _0xa46923[_0x39ca('0x11')](0xc8)[_0x39ca('0x12')](_0x3ad753);}};exports[_0x39ca('0xf')]=function(_0x5aecb2,_0x28de48){return git[_0x39ca('0xf')]([_0x39ca('0x13'),'master'],function(_0x9a269b){if(_0x9a269b){logger[_0x39ca('0x14')](_0x9a269b);return _0x28de48['status'](0x1f4)[_0x39ca('0x12')](_0x9a269b);}logger[_0x39ca('0x15')]('git\x20fetch');return _0x28de48[_0x39ca('0x11')](0xc8)[_0x39ca('0x12')]({'output':_0x39ca('0x16')});});};exports['reset']=function(_0xa70975,_0x42bf03){return git[_0x39ca('0x17')]([_0x39ca('0x18'),'FETCH_HEAD'],function(_0x3bd37e){if(_0x3bd37e){logger[_0x39ca('0x14')](_0x3bd37e);return _0x42bf03[_0x39ca('0x11')](0x1f4)[_0x39ca('0x12')](_0x3bd37e);}logger['info'](_0x39ca('0x19'));return _0x42bf03[_0x39ca('0x11')](0xc8)[_0x39ca('0x12')]({'output':'git\x20reset\x20--hard'});});};exports[_0x39ca('0x1a')]=function(_0x501cf0,_0x49050c){exec('npm\x20install\x20--production',function(_0x140ed3,_0x5a85a5,_0x31c82f){logger[_0x39ca('0x15')](_0x5a85a5);logger[_0x39ca('0x15')](_0x31c82f);if(_0x140ed3){logger[_0x39ca('0x14')](_0x140ed3);return _0x49050c['status'](0x1f4)['json'](_0x140ed3);}return _0x49050c[_0x39ca('0x11')](0xc8)[_0x39ca('0x12')]({'output':_0x5a85a5});});};exports[_0x39ca('0x1b')]=function(_0x275ee2,_0x625773){return pm2[_0x39ca('0x1b')](_0x39ca('0x1c'))[_0x39ca('0x1d')](function(_0x4c1876){logger[_0x39ca('0x15')]('pm2\x20restart\x20motion\x20%s',_0x4c1876);return _0x625773[_0x39ca('0x11')](0xc8)['json']({'output':_0x39ca('0x1e')});})[_0x39ca('0x1f')](function(_0x3bff10){logger[_0x39ca('0x14')](_0x3bff10);return _0x625773[_0x39ca('0x11')](0x1f4)[_0x39ca('0x12')](_0x3bff10);});};exports[_0x39ca('0x20')]=function(_0x1d0c4e,_0x41426d){var _0x2dae96=fs[_0x39ca('0x21')](path[_0x39ca('0x22')](config[_0x39ca('0xa')],_0x39ca('0x23'),_0x39ca('0x20')));var _0x247274=[];for(var _0x63102f=0x0;_0x63102f<_0x2dae96[_0x39ca('0x24')];_0x63102f++){var _0x1d252b=_0x2dae96[_0x63102f][_0x39ca('0x25')](_0x39ca('0x26'),'');if(compareVersions(module[_0x39ca('0xc')][_0x39ca('0x27')],_0x1d252b)===-0x1){_0x247274[_0x39ca('0x28')](_0x1d252b);}}if(_0x247274['length']){var _0x33f180=_0x247274[_0x39ca('0x29')](compareVersions);var _0xcf9a1b=new Umzug({'storage':_0x39ca('0x2a'),'storageOptions':{'model':db['Migration'],'modelName':_0x39ca('0x2b'),'columnName':_0x39ca('0x27')},'migrations':{'params':[db['sequelize']['getQueryInterface'](),db[_0x39ca('0x2a')][_0x39ca('0x2c')],function(){throw new Error('Migration\x20tried\x20to\x20use\x20old\x20style\x20\x22done\x22\x20callback.\x20Please\x20upgrade\x20to\x20\x22umzug\x22\x20and\x20return\x20a\x20promise\x20instead.');}],'path':path[_0x39ca('0x22')](config[_0x39ca('0xa')],'server',_0x39ca('0x20')),'pattern':/\.js$/}});_0xcf9a1b['up']({'migrations':_[_0x39ca('0x2d')](_0x33f180,function(_0x5a178d){return _0x5a178d+'.js';})})['then'](function(){return _0x41426d[_0x39ca('0x11')](0xc8)[_0x39ca('0x12')]({'output':'Database\x20migrated\x20successfully\x20from\x20version\x20'+module[_0x39ca('0xc')]['version']+_0x39ca('0x2e')+_[_0x39ca('0x2f')](_0x33f180),'migrations':_['join'](_0x33f180)});})[_0x39ca('0x1f')](function(_0x10fa2a){if(_0x10fa2a instanceof db[_0x39ca('0x2a')][_0x39ca('0x30')]){return _0x41426d[_0x39ca('0x11')](0xc8)[_0x39ca('0x12')]({'output':_0x39ca('0x31')});}else{return _0x41426d[_0x39ca('0x11')](0x1f4)[_0x39ca('0x12')](_0x10fa2a);}});}else{return _0x41426d['status'](0xc8)[_0x39ca('0x12')]({'output':_0x39ca('0x31')});}};
\ No newline at end of file
index b2e0a1c..4ed0f05 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf289=['delete','destroy','exports','multer','util','connect-timeout','express','Router','fs-extra','../../config/environment','./voiceAgentReport.controller','get','isAuthenticated','index','/describe','describe','/:id','post','create','put','update'];(function(_0xa9f2cc,_0x3cb961){var _0x2753c2=function(_0x40d8d5){while(--_0x40d8d5){_0xa9f2cc['push'](_0xa9f2cc['shift']());}};_0x2753c2(++_0x3cb961);}(_0xf289,0x1bc));var _0x9f28=function(_0x49976b,_0x5e6bde){_0x49976b=_0x49976b-0x0;var _0x6edea0=_0xf289[_0x49976b];return _0x6edea0;};'use strict';var multer=require(_0x9f28('0x0'));var util=require(_0x9f28('0x1'));var path=require('path');var timeout=require(_0x9f28('0x2'));var express=require(_0x9f28('0x3'));var router=express[_0x9f28('0x4')]();var fs_extra=require(_0x9f28('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x9f28('0x6'));var controller=require(_0x9f28('0x7'));router[_0x9f28('0x8')]('/',auth[_0x9f28('0x9')](),controller[_0x9f28('0xa')]);router['get'](_0x9f28('0xb'),auth[_0x9f28('0x9')](),controller[_0x9f28('0xc')]);router[_0x9f28('0x8')](_0x9f28('0xd'),auth[_0x9f28('0x9')](),controller['show']);router[_0x9f28('0xe')]('/',auth['isAuthenticated'](),controller[_0x9f28('0xf')]);router[_0x9f28('0x10')](_0x9f28('0xd'),auth[_0x9f28('0x9')](),controller[_0x9f28('0x11')]);router[_0x9f28('0x12')](_0x9f28('0xd'),auth['isAuthenticated'](),controller[_0x9f28('0x13')]);module[_0x9f28('0x14')]=router;
\ No newline at end of file
+var _0x1bde=['../../components/interaction/service','../../config/environment','./voiceAgentReport.controller','get','isAuthenticated','/describe','show','create','put','/:id','update','delete','destroy','multer','path','fs-extra','../../components/auth/service'];(function(_0x4b7895,_0x3c4f5d){var _0x264180=function(_0xe0e861){while(--_0xe0e861){_0x4b7895['push'](_0x4b7895['shift']());}};_0x264180(++_0x3c4f5d);}(_0x1bde,0x11d));var _0xe1bd=function(_0x34e752,_0x32e2a2){_0x34e752=_0x34e752-0x0;var _0x7c6347=_0x1bde[_0x34e752];return _0x7c6347;};'use strict';var multer=require(_0xe1bd('0x0'));var util=require('util');var path=require(_0xe1bd('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require(_0xe1bd('0x2'));var auth=require(_0xe1bd('0x3'));var interaction=require(_0xe1bd('0x4'));var config=require(_0xe1bd('0x5'));var controller=require(_0xe1bd('0x6'));router[_0xe1bd('0x7')]('/',auth[_0xe1bd('0x8')](),controller['index']);router[_0xe1bd('0x7')](_0xe1bd('0x9'),auth['isAuthenticated'](),controller['describe']);router[_0xe1bd('0x7')]('/:id',auth[_0xe1bd('0x8')](),controller[_0xe1bd('0xa')]);router['post']('/',auth[_0xe1bd('0x8')](),controller[_0xe1bd('0xb')]);router[_0xe1bd('0xc')](_0xe1bd('0xd'),auth['isAuthenticated'](),controller[_0xe1bd('0xe')]);router[_0xe1bd('0xf')]('/:id',auth[_0xe1bd('0x8')](),controller[_0xe1bd('0x10')]);module['exports']=router;
\ No newline at end of file
index a908a3e..cba336c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x390a=['DATE','INTEGER','BOOLEAN','sequelize','exports','STRING'];(function(_0x53efa4,_0x1e673b){var _0x276274=function(_0x5a0479){while(--_0x5a0479){_0x53efa4['push'](_0x53efa4['shift']());}};_0x276274(++_0x1e673b);}(_0x390a,0xc9));var _0xa390=function(_0x194d49,_0x4f93fb){_0x194d49=_0x194d49-0x0;var _0x49b6db=_0x390a[_0x194d49];return _0x49b6db;};'use strict';var Sequelize=require(_0xa390('0x0'));module[_0xa390('0x1')]={'type':{'type':Sequelize[_0xa390('0x2')]},'uniqueid':{'type':Sequelize[_0xa390('0x2')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize[_0xa390('0x2')]},'queue':{'type':Sequelize[_0xa390('0x2')]},'interface':{'type':Sequelize[_0xa390('0x2')]},'membername':{'type':Sequelize[_0xa390('0x2')]},'agentcalledAt':{'type':Sequelize['DATE']},'agentconnectAt':{'type':Sequelize[_0xa390('0x3')]},'agentcompleteAt':{'type':Sequelize[_0xa390('0x3')]},'agentringnoanswerAt':{'type':Sequelize[_0xa390('0x3')]},'agentdumpAt':{'type':Sequelize['DATE']},'holdtime':{'type':Sequelize[_0xa390('0x4')]},'agentcomplete':{'type':Sequelize[_0xa390('0x5')],'defaultValue':![]},'agentringnoanswer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentdump':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'talktime':{'type':Sequelize[_0xa390('0x4')]},'agentacw':{'type':Sequelize[_0xa390('0x5')],'defaultValue':![]},'acwtime':{'type':Sequelize[_0xa390('0x4')]},'reason':{'type':Sequelize[_0xa390('0x2')]},'lastevent':{'type':Sequelize[_0xa390('0x2')]},'channel':{'type':Sequelize['STRING']},'channelstate':{'type':Sequelize['INTEGER']},'channelstatedesc':{'type':Sequelize[_0xa390('0x2')]},'connectedlinenum':{'type':Sequelize[_0xa390('0x2')]},'connectedlinename':{'type':Sequelize[_0xa390('0x2')]},'language':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0xa390('0x2')]},'context':{'type':Sequelize[_0xa390('0x2')]},'exten':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0xa390('0x2')]},'destchannel':{'type':Sequelize[_0xa390('0x2')]},'destchannelstate':{'type':Sequelize['INTEGER']},'destchannelstatedesc':{'type':Sequelize['STRING']},'destcalleridnum':{'type':Sequelize[_0xa390('0x2')]},'destcalleridname':{'type':Sequelize[_0xa390('0x2')]},'destconnectedlinenum':{'type':Sequelize['STRING']},'destconnectedlinename':{'type':Sequelize[_0xa390('0x2')]},'destlanguage':{'type':Sequelize['STRING']},'destaccountcode':{'type':Sequelize['STRING']},'destcontext':{'type':Sequelize['STRING']},'destexten':{'type':Sequelize[_0xa390('0x2')]},'destpriority':{'type':Sequelize['STRING']},'destuniqueid':{'type':Sequelize[_0xa390('0x2')]},'answeredelsewheredestinationuniqueid':{'type':Sequelize[_0xa390('0x2')]},'answeredelsewheremembername':{'type':Sequelize['STRING']},'transfer':{'type':Sequelize[_0xa390('0x5')],'defaultValue':![]},'transfertype':{'type':Sequelize[_0xa390('0x2')],'comment':'FORWARD,\x20BLIND,\x20ATTENDED'},'transferexten':{'type':Sequelize[_0xa390('0x2')]},'transferuniqueid':{'type':Sequelize['STRING']},'agententerreason':{'type':Sequelize[_0xa390('0x4')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x6132=['INTEGER','BOOLEAN','FORWARD,\x20BLIND,\x20ATTENDED','exports','STRING','DATE'];(function(_0x5e9d35,_0x382c91){var _0x3beb2e=function(_0x4242cf){while(--_0x4242cf){_0x5e9d35['push'](_0x5e9d35['shift']());}};_0x3beb2e(++_0x382c91);}(_0x6132,0xf3));var _0x2613=function(_0x1497cb,_0x19cc18){_0x1497cb=_0x1497cb-0x0;var _0x735cde=_0x6132[_0x1497cb];return _0x735cde;};'use strict';var Sequelize=require('sequelize');module[_0x2613('0x0')]={'type':{'type':Sequelize['STRING']},'uniqueid':{'type':Sequelize[_0x2613('0x1')]},'calleridnum':{'type':Sequelize[_0x2613('0x1')]},'calleridname':{'type':Sequelize[_0x2613('0x1')]},'queue':{'type':Sequelize['STRING']},'interface':{'type':Sequelize['STRING']},'membername':{'type':Sequelize[_0x2613('0x1')]},'agentcalledAt':{'type':Sequelize['DATE']},'agentconnectAt':{'type':Sequelize[_0x2613('0x2')]},'agentcompleteAt':{'type':Sequelize['DATE']},'agentringnoanswerAt':{'type':Sequelize[_0x2613('0x2')]},'agentdumpAt':{'type':Sequelize[_0x2613('0x2')]},'holdtime':{'type':Sequelize[_0x2613('0x3')]},'agentcomplete':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'agentringnoanswer':{'type':Sequelize[_0x2613('0x4')],'defaultValue':![]},'agentdump':{'type':Sequelize[_0x2613('0x4')],'defaultValue':![]},'talktime':{'type':Sequelize['INTEGER']},'agentacw':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'acwtime':{'type':Sequelize[_0x2613('0x3')]},'reason':{'type':Sequelize['STRING']},'lastevent':{'type':Sequelize[_0x2613('0x1')]},'channel':{'type':Sequelize[_0x2613('0x1')]},'channelstate':{'type':Sequelize[_0x2613('0x3')]},'channelstatedesc':{'type':Sequelize[_0x2613('0x1')]},'connectedlinenum':{'type':Sequelize[_0x2613('0x1')]},'connectedlinename':{'type':Sequelize[_0x2613('0x1')]},'language':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0x2613('0x1')]},'context':{'type':Sequelize[_0x2613('0x1')]},'exten':{'type':Sequelize[_0x2613('0x1')]},'priority':{'type':Sequelize[_0x2613('0x1')]},'destchannel':{'type':Sequelize['STRING']},'destchannelstate':{'type':Sequelize[_0x2613('0x3')]},'destchannelstatedesc':{'type':Sequelize[_0x2613('0x1')]},'destcalleridnum':{'type':Sequelize[_0x2613('0x1')]},'destcalleridname':{'type':Sequelize[_0x2613('0x1')]},'destconnectedlinenum':{'type':Sequelize[_0x2613('0x1')]},'destconnectedlinename':{'type':Sequelize[_0x2613('0x1')]},'destlanguage':{'type':Sequelize[_0x2613('0x1')]},'destaccountcode':{'type':Sequelize[_0x2613('0x1')]},'destcontext':{'type':Sequelize[_0x2613('0x1')]},'destexten':{'type':Sequelize[_0x2613('0x1')]},'destpriority':{'type':Sequelize[_0x2613('0x1')]},'destuniqueid':{'type':Sequelize[_0x2613('0x1')]},'answeredelsewheredestinationuniqueid':{'type':Sequelize[_0x2613('0x1')]},'answeredelsewheremembername':{'type':Sequelize[_0x2613('0x1')]},'transfer':{'type':Sequelize[_0x2613('0x4')],'defaultValue':![]},'transfertype':{'type':Sequelize[_0x2613('0x1')],'comment':_0x2613('0x5')},'transferexten':{'type':Sequelize[_0x2613('0x1')]},'transferuniqueid':{'type':Sequelize[_0x2613('0x1')]},'agententerreason':{'type':Sequelize[_0x2613('0x3')],'defaultValue':0x0}};
\ No newline at end of file
index cdb84c0..1627a1f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['type','options','includeAll','include','findAll','catch','show','params','find','body','describe','eml-format','rimraf','zip-dir','moment','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/license/util','../../mysqldb','sendStatus','end','status','json','undefined','limit','offset','count','set','Content-Range','apply','save','update','then','destroy','stack','name','send','index','VoiceAgentReport','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','filter','merge'];(function(_0x616290,_0x280b7f){var _0x453879=function(_0x27bda7){while(--_0x27bda7){_0x616290['push'](_0x616290['shift']());}};_0x453879(++_0x280b7f);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0xa9e0[_0x4cf98e];return _0x1623ac;};'use strict';var emlformat=require(_0x0a9e('0x0'));var rimraf=require(_0x0a9e('0x1'));var zipdir=require(_0x0a9e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0a9e('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x0a9e('0x4'));var util=require(_0x0a9e('0x5'));var path=require(_0x0a9e('0x6'));var sox=require(_0x0a9e('0x7'));var csv=require(_0x0a9e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0a9e('0x9'));var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var as=require(_0x0a9e('0x11'));var hardwareService=require(_0x0a9e('0x12'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x0a9e('0x13'));var db=require(_0x0a9e('0x14'))['db'];function respondWithStatusCode(_0xd5b662,_0x26d672){_0x26d672=_0x26d672||0xcc;return function(_0x32d742){if(_0x32d742){return _0xd5b662[_0x0a9e('0x15')](_0x26d672);}return _0xd5b662['status'](_0x26d672)[_0x0a9e('0x16')]();};}function respondWithResult(_0x239b12,_0x2b4227){_0x2b4227=_0x2b4227||0xc8;return function(_0x281129){if(_0x281129){return _0x239b12[_0x0a9e('0x17')](_0x2b4227)[_0x0a9e('0x18')](_0x281129);}};}function respondWithFilteredResult(_0x52a03d,_0x22dccb){return function(_0x5d0880){if(_0x5d0880){var _0x1985b6=typeof _0x22dccb['offset']===_0x0a9e('0x19')&&typeof _0x22dccb[_0x0a9e('0x1a')]==='undefined';var _0x225616=_0x5d0880['count'];var _0x459eb1=_0x1985b6?0x0:_0x22dccb[_0x0a9e('0x1b')];var _0x106033=_0x1985b6?_0x5d0880[_0x0a9e('0x1c')]:_0x22dccb[_0x0a9e('0x1b')]+_0x22dccb[_0x0a9e('0x1a')];var _0x530eb7;if(_0x106033>=_0x225616){_0x106033=_0x225616;_0x530eb7=0xc8;}else{_0x530eb7=0xce;}_0x52a03d[_0x0a9e('0x17')](_0x530eb7);return _0x52a03d[_0x0a9e('0x1d')](_0x0a9e('0x1e'),_0x459eb1+'-'+_0x106033+'/'+_0x225616)[_0x0a9e('0x18')](_0x5d0880);}return null;};}function patchUpdates(_0x105080){return function(_0x4bb1e3){try{jsonpatch[_0x0a9e('0x1f')](_0x4bb1e3,_0x105080,!![]);}catch(_0x155cce){return BPromise['reject'](_0x155cce);}return _0x4bb1e3[_0x0a9e('0x20')]();};}function saveUpdates(_0x5a09ef,_0x588269){return function(_0x3a02e1){if(_0x3a02e1){return _0x3a02e1[_0x0a9e('0x21')](_0x5a09ef)[_0x0a9e('0x22')](function(_0x30bae6){return _0x30bae6;});}return null;};}function removeEntity(_0x4abc77,_0xfb6e48){return function(_0x2fb0e4){if(_0x2fb0e4){return _0x2fb0e4[_0x0a9e('0x23')]()[_0x0a9e('0x22')](function(){_0x4abc77[_0x0a9e('0x17')](0xcc)[_0x0a9e('0x16')]();});}};}function handleEntityNotFound(_0x16b1ca,_0x5ea472){return function(_0x59181e){if(!_0x59181e){_0x16b1ca[_0x0a9e('0x15')](0x194);}return _0x59181e;};}function handleError(_0x3a8e58,_0x40c424){_0x40c424=_0x40c424||0x1f4;return function(_0x33161b){logger['error'](_0x33161b[_0x0a9e('0x24')]);if(_0x33161b['name']){delete _0x33161b[_0x0a9e('0x25')];}_0x3a8e58['status'](_0x40c424)[_0x0a9e('0x26')](_0x33161b);};}exports[_0x0a9e('0x27')]=function(_0x25fba9,_0x14433c){var _0x140511={},_0x1538a4={},_0x11c3b6={'count':0x0,'rows':[]};var _0x14de77=_['map'](db[_0x0a9e('0x28')][_0x0a9e('0x29')],function(_0x2b1f27){return{'name':_0x2b1f27[_0x0a9e('0x2a')],'type':_0x2b1f27['type'][_0x0a9e('0x2b')]};});_0x1538a4[_0x0a9e('0x2c')]=_[_0x0a9e('0x2d')](_0x14de77,_0x0a9e('0x25'));_0x1538a4[_0x0a9e('0x2e')]=_[_0x0a9e('0x2f')](_0x25fba9[_0x0a9e('0x2e')]);_0x1538a4[_0x0a9e('0x30')]=_[_0x0a9e('0x31')](_0x1538a4['model'],_0x1538a4[_0x0a9e('0x2e')]);_0x140511['attributes']=_[_0x0a9e('0x31')](_0x1538a4[_0x0a9e('0x2c')],qs[_0x0a9e('0x32')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x32')]));_0x140511['attributes']=_0x140511[_0x0a9e('0x33')][_0x0a9e('0x34')]?_0x140511[_0x0a9e('0x33')]:_0x1538a4[_0x0a9e('0x2c')];if(!_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x35')](_0x0a9e('0x36'))){_0x140511[_0x0a9e('0x1a')]=qs['limit'](_0x25fba9[_0x0a9e('0x2e')]['limit']);_0x140511[_0x0a9e('0x1b')]=qs[_0x0a9e('0x1b')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x1b')]);}_0x140511['order']=qs[_0x0a9e('0x37')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x37')]);_0x140511[_0x0a9e('0x38')]=qs['filters'](_['pick'](_0x25fba9[_0x0a9e('0x2e')],_0x1538a4['filters']),_0x14de77);if(_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x39')]){_0x140511[_0x0a9e('0x38')]=_[_0x0a9e('0x3a')](_0x140511['where'],{'$or':_[_0x0a9e('0x2d')](_0x14de77,function(_0x3bfce8){if(_0x3bfce8[_0x0a9e('0x3b')]!=='VIRTUAL'){var _0x1dbf74={};_0x1dbf74[_0x3bfce8[_0x0a9e('0x25')]]={'$like':'%'+_0x25fba9[_0x0a9e('0x2e')]['filter']+'%'};return _0x1dbf74;}})});}_0x140511=_['merge']({},_0x140511,_0x25fba9[_0x0a9e('0x3c')]);var _0x40d766={'where':_0x140511['where']};return db[_0x0a9e('0x28')][_0x0a9e('0x1c')](_0x40d766)[_0x0a9e('0x22')](function(_0x148f55){_0x11c3b6['count']=_0x148f55;if(_0x25fba9['query'][_0x0a9e('0x3d')]){_0x140511[_0x0a9e('0x3e')]=[{'all':!![]}];}return db['VoiceAgentReport'][_0x0a9e('0x3f')](_0x140511);})[_0x0a9e('0x22')](function(_0x1459bb){_0x11c3b6['rows']=_0x1459bb;return _0x11c3b6;})[_0x0a9e('0x22')](respondWithFilteredResult(_0x14433c,_0x140511))[_0x0a9e('0x40')](handleError(_0x14433c,null));};exports[_0x0a9e('0x41')]=function(_0x43dd5b,_0x13cb1f){var _0xeaa5e5={'raw':![],'where':{'id':_0x43dd5b[_0x0a9e('0x42')]['id']}},_0x2881b3={};_0x2881b3[_0x0a9e('0x2c')]=_[_0x0a9e('0x2f')](db[_0x0a9e('0x28')][_0x0a9e('0x29')]);_0x2881b3[_0x0a9e('0x2e')]=_[_0x0a9e('0x2f')](_0x43dd5b[_0x0a9e('0x2e')]);_0x2881b3['filters']=_['intersection'](_0x2881b3[_0x0a9e('0x2c')],_0x2881b3[_0x0a9e('0x2e')]);_0xeaa5e5[_0x0a9e('0x33')]=_[_0x0a9e('0x31')](_0x2881b3[_0x0a9e('0x2c')],qs[_0x0a9e('0x32')](_0x43dd5b[_0x0a9e('0x2e')][_0x0a9e('0x32')]));_0xeaa5e5[_0x0a9e('0x33')]=_0xeaa5e5[_0x0a9e('0x33')][_0x0a9e('0x34')]?_0xeaa5e5[_0x0a9e('0x33')]:_0x2881b3['model'];if(_0x43dd5b[_0x0a9e('0x2e')][_0x0a9e('0x3d')]){_0xeaa5e5[_0x0a9e('0x3e')]=[{'all':!![]}];}_0xeaa5e5=_[_0x0a9e('0x3a')]({},_0xeaa5e5,_0x43dd5b[_0x0a9e('0x3c')]);return db[_0x0a9e('0x28')][_0x0a9e('0x43')](_0xeaa5e5)[_0x0a9e('0x22')](handleEntityNotFound(_0x13cb1f,null))['then'](respondWithResult(_0x13cb1f,null))[_0x0a9e('0x40')](handleError(_0x13cb1f,null));};exports['create']=function(_0x473dc8,_0x476688){return db[_0x0a9e('0x28')]['create'](_0x473dc8[_0x0a9e('0x44')],{})[_0x0a9e('0x22')](respondWithResult(_0x476688,0xc9))[_0x0a9e('0x40')](handleError(_0x476688,null));};exports[_0x0a9e('0x21')]=function(_0x45c845,_0x37be73){if(_0x45c845[_0x0a9e('0x44')]['id']){delete _0x45c845['body']['id'];}return db[_0x0a9e('0x28')][_0x0a9e('0x43')]({'where':{'id':_0x45c845[_0x0a9e('0x42')]['id']}})[_0x0a9e('0x22')](handleEntityNotFound(_0x37be73,null))[_0x0a9e('0x22')](saveUpdates(_0x45c845[_0x0a9e('0x44')],null))[_0x0a9e('0x22')](respondWithResult(_0x37be73,null))[_0x0a9e('0x40')](handleError(_0x37be73,null));};exports[_0x0a9e('0x23')]=function(_0x58a5c2,_0xe401a){return db[_0x0a9e('0x28')]['find']({'where':{'id':_0x58a5c2['params']['id']}})['then'](handleEntityNotFound(_0xe401a,null))[_0x0a9e('0x22')](removeEntity(_0xe401a,null))[_0x0a9e('0x40')](handleError(_0xe401a,null));};exports[_0x0a9e('0x45')]=function(_0x11545a,_0x61bb17){return db[_0x0a9e('0x28')][_0x0a9e('0x45')]()[_0x0a9e('0x22')](respondWithResult(_0x61bb17,null))['catch'](handleError(_0x61bb17,null));};
\ No newline at end of file
+var _0xa9e0=['type','options','includeAll','include','findAll','catch','show','params','find','body','describe','eml-format','rimraf','zip-dir','moment','mustache','util','path','sox','to-csv','fs-extra','lodash','squel','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/license/util','../../mysqldb','sendStatus','end','status','json','undefined','limit','offset','count','set','Content-Range','apply','save','update','then','destroy','stack','name','send','index','VoiceAgentReport','rawAttributes','fieldName','key','model','map','query','keys','filters','intersection','fields','attributes','length','hasOwnProperty','nolimit','sort','where','filter','merge'];(function(_0x26462c,_0xd20a35){var _0x509a42=function(_0x1b22c9){while(--_0x1b22c9){_0x26462c['push'](_0x26462c['shift']());}};_0x509a42(++_0xd20a35);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4c7fb5,_0x2548ef){_0x4c7fb5=_0x4c7fb5-0x0;var _0x2e10ac=_0xa9e0[_0x4c7fb5];return _0x2e10ac;};'use strict';var emlformat=require(_0x0a9e('0x0'));var rimraf=require(_0x0a9e('0x1'));var zipdir=require(_0x0a9e('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x0a9e('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x0a9e('0x4'));var util=require(_0x0a9e('0x5'));var path=require(_0x0a9e('0x6'));var sox=require(_0x0a9e('0x7'));var csv=require(_0x0a9e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0x0a9e('0x9'));var _=require(_0x0a9e('0xa'));var squel=require(_0x0a9e('0xb'));var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0x0a9e('0xc'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x0a9e('0xd'));var Redis=require(_0x0a9e('0xe'));var authService=require(_0x0a9e('0xf'));var qs=require(_0x0a9e('0x10'));var as=require(_0x0a9e('0x11'));var hardwareService=require(_0x0a9e('0x12'));var logger=require('../../config/logger')('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x0a9e('0x13'));var db=require(_0x0a9e('0x14'))['db'];function respondWithStatusCode(_0xd5b662,_0x26d672){_0x26d672=_0x26d672||0xcc;return function(_0x32d742){if(_0x32d742){return _0xd5b662[_0x0a9e('0x15')](_0x26d672);}return _0xd5b662['status'](_0x26d672)[_0x0a9e('0x16')]();};}function respondWithResult(_0x239b12,_0x2b4227){_0x2b4227=_0x2b4227||0xc8;return function(_0x281129){if(_0x281129){return _0x239b12[_0x0a9e('0x17')](_0x2b4227)[_0x0a9e('0x18')](_0x281129);}};}function respondWithFilteredResult(_0x52a03d,_0x22dccb){return function(_0x5d0880){if(_0x5d0880){var _0x1985b6=typeof _0x22dccb['offset']===_0x0a9e('0x19')&&typeof _0x22dccb[_0x0a9e('0x1a')]==='undefined';var _0x225616=_0x5d0880['count'];var _0x459eb1=_0x1985b6?0x0:_0x22dccb[_0x0a9e('0x1b')];var _0x106033=_0x1985b6?_0x5d0880[_0x0a9e('0x1c')]:_0x22dccb[_0x0a9e('0x1b')]+_0x22dccb[_0x0a9e('0x1a')];var _0x530eb7;if(_0x106033>=_0x225616){_0x106033=_0x225616;_0x530eb7=0xc8;}else{_0x530eb7=0xce;}_0x52a03d[_0x0a9e('0x17')](_0x530eb7);return _0x52a03d[_0x0a9e('0x1d')](_0x0a9e('0x1e'),_0x459eb1+'-'+_0x106033+'/'+_0x225616)[_0x0a9e('0x18')](_0x5d0880);}return null;};}function patchUpdates(_0x105080){return function(_0x4bb1e3){try{jsonpatch[_0x0a9e('0x1f')](_0x4bb1e3,_0x105080,!![]);}catch(_0x155cce){return BPromise['reject'](_0x155cce);}return _0x4bb1e3[_0x0a9e('0x20')]();};}function saveUpdates(_0x5a09ef,_0x588269){return function(_0x3a02e1){if(_0x3a02e1){return _0x3a02e1[_0x0a9e('0x21')](_0x5a09ef)[_0x0a9e('0x22')](function(_0x30bae6){return _0x30bae6;});}return null;};}function removeEntity(_0x4abc77,_0xfb6e48){return function(_0x2fb0e4){if(_0x2fb0e4){return _0x2fb0e4[_0x0a9e('0x23')]()[_0x0a9e('0x22')](function(){_0x4abc77[_0x0a9e('0x17')](0xcc)[_0x0a9e('0x16')]();});}};}function handleEntityNotFound(_0x16b1ca,_0x5ea472){return function(_0x59181e){if(!_0x59181e){_0x16b1ca[_0x0a9e('0x15')](0x194);}return _0x59181e;};}function handleError(_0x3a8e58,_0x40c424){_0x40c424=_0x40c424||0x1f4;return function(_0x33161b){logger['error'](_0x33161b[_0x0a9e('0x24')]);if(_0x33161b['name']){delete _0x33161b[_0x0a9e('0x25')];}_0x3a8e58['status'](_0x40c424)[_0x0a9e('0x26')](_0x33161b);};}exports[_0x0a9e('0x27')]=function(_0x25fba9,_0x14433c){var _0x140511={},_0x1538a4={},_0x11c3b6={'count':0x0,'rows':[]};var _0x14de77=_['map'](db[_0x0a9e('0x28')][_0x0a9e('0x29')],function(_0x2b1f27){return{'name':_0x2b1f27[_0x0a9e('0x2a')],'type':_0x2b1f27['type'][_0x0a9e('0x2b')]};});_0x1538a4[_0x0a9e('0x2c')]=_[_0x0a9e('0x2d')](_0x14de77,_0x0a9e('0x25'));_0x1538a4[_0x0a9e('0x2e')]=_[_0x0a9e('0x2f')](_0x25fba9[_0x0a9e('0x2e')]);_0x1538a4[_0x0a9e('0x30')]=_[_0x0a9e('0x31')](_0x1538a4['model'],_0x1538a4[_0x0a9e('0x2e')]);_0x140511['attributes']=_[_0x0a9e('0x31')](_0x1538a4[_0x0a9e('0x2c')],qs[_0x0a9e('0x32')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x32')]));_0x140511['attributes']=_0x140511[_0x0a9e('0x33')][_0x0a9e('0x34')]?_0x140511[_0x0a9e('0x33')]:_0x1538a4[_0x0a9e('0x2c')];if(!_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x35')](_0x0a9e('0x36'))){_0x140511[_0x0a9e('0x1a')]=qs['limit'](_0x25fba9[_0x0a9e('0x2e')]['limit']);_0x140511[_0x0a9e('0x1b')]=qs[_0x0a9e('0x1b')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x1b')]);}_0x140511['order']=qs[_0x0a9e('0x37')](_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x37')]);_0x140511[_0x0a9e('0x38')]=qs['filters'](_['pick'](_0x25fba9[_0x0a9e('0x2e')],_0x1538a4['filters']),_0x14de77);if(_0x25fba9[_0x0a9e('0x2e')][_0x0a9e('0x39')]){_0x140511[_0x0a9e('0x38')]=_[_0x0a9e('0x3a')](_0x140511['where'],{'$or':_[_0x0a9e('0x2d')](_0x14de77,function(_0x3bfce8){if(_0x3bfce8[_0x0a9e('0x3b')]!=='VIRTUAL'){var _0x1dbf74={};_0x1dbf74[_0x3bfce8[_0x0a9e('0x25')]]={'$like':'%'+_0x25fba9[_0x0a9e('0x2e')]['filter']+'%'};return _0x1dbf74;}})});}_0x140511=_['merge']({},_0x140511,_0x25fba9[_0x0a9e('0x3c')]);var _0x40d766={'where':_0x140511['where']};return db[_0x0a9e('0x28')][_0x0a9e('0x1c')](_0x40d766)[_0x0a9e('0x22')](function(_0x148f55){_0x11c3b6['count']=_0x148f55;if(_0x25fba9['query'][_0x0a9e('0x3d')]){_0x140511[_0x0a9e('0x3e')]=[{'all':!![]}];}return db['VoiceAgentReport'][_0x0a9e('0x3f')](_0x140511);})[_0x0a9e('0x22')](function(_0x1459bb){_0x11c3b6['rows']=_0x1459bb;return _0x11c3b6;})[_0x0a9e('0x22')](respondWithFilteredResult(_0x14433c,_0x140511))[_0x0a9e('0x40')](handleError(_0x14433c,null));};exports[_0x0a9e('0x41')]=function(_0x43dd5b,_0x13cb1f){var _0xeaa5e5={'raw':![],'where':{'id':_0x43dd5b[_0x0a9e('0x42')]['id']}},_0x2881b3={};_0x2881b3[_0x0a9e('0x2c')]=_[_0x0a9e('0x2f')](db[_0x0a9e('0x28')][_0x0a9e('0x29')]);_0x2881b3[_0x0a9e('0x2e')]=_[_0x0a9e('0x2f')](_0x43dd5b[_0x0a9e('0x2e')]);_0x2881b3['filters']=_['intersection'](_0x2881b3[_0x0a9e('0x2c')],_0x2881b3[_0x0a9e('0x2e')]);_0xeaa5e5[_0x0a9e('0x33')]=_[_0x0a9e('0x31')](_0x2881b3[_0x0a9e('0x2c')],qs[_0x0a9e('0x32')](_0x43dd5b[_0x0a9e('0x2e')][_0x0a9e('0x32')]));_0xeaa5e5[_0x0a9e('0x33')]=_0xeaa5e5[_0x0a9e('0x33')][_0x0a9e('0x34')]?_0xeaa5e5[_0x0a9e('0x33')]:_0x2881b3['model'];if(_0x43dd5b[_0x0a9e('0x2e')][_0x0a9e('0x3d')]){_0xeaa5e5[_0x0a9e('0x3e')]=[{'all':!![]}];}_0xeaa5e5=_[_0x0a9e('0x3a')]({},_0xeaa5e5,_0x43dd5b[_0x0a9e('0x3c')]);return db[_0x0a9e('0x28')][_0x0a9e('0x43')](_0xeaa5e5)[_0x0a9e('0x22')](handleEntityNotFound(_0x13cb1f,null))['then'](respondWithResult(_0x13cb1f,null))[_0x0a9e('0x40')](handleError(_0x13cb1f,null));};exports['create']=function(_0x473dc8,_0x476688){return db[_0x0a9e('0x28')]['create'](_0x473dc8[_0x0a9e('0x44')],{})[_0x0a9e('0x22')](respondWithResult(_0x476688,0xc9))[_0x0a9e('0x40')](handleError(_0x476688,null));};exports[_0x0a9e('0x21')]=function(_0x45c845,_0x37be73){if(_0x45c845[_0x0a9e('0x44')]['id']){delete _0x45c845['body']['id'];}return db[_0x0a9e('0x28')][_0x0a9e('0x43')]({'where':{'id':_0x45c845[_0x0a9e('0x42')]['id']}})[_0x0a9e('0x22')](handleEntityNotFound(_0x37be73,null))[_0x0a9e('0x22')](saveUpdates(_0x45c845[_0x0a9e('0x44')],null))[_0x0a9e('0x22')](respondWithResult(_0x37be73,null))[_0x0a9e('0x40')](handleError(_0x37be73,null));};exports[_0x0a9e('0x23')]=function(_0x58a5c2,_0xe401a){return db[_0x0a9e('0x28')]['find']({'where':{'id':_0x58a5c2['params']['id']}})['then'](handleEntityNotFound(_0xe401a,null))[_0x0a9e('0x22')](removeEntity(_0xe401a,null))[_0x0a9e('0x40')](handleError(_0xe401a,null));};exports[_0x0a9e('0x45')]=function(_0x11545a,_0x61bb17){return db[_0x0a9e('0x28')][_0x0a9e('0x45')]()[_0x0a9e('0x22')](respondWithResult(_0x61bb17,null))['catch'](handleError(_0x61bb17,null));};
\ No newline at end of file
index 5c2683c..2a8569d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8c46=['path','rimraf','../../config/environment','./voiceAgentReport.attributes','exports','define','VoiceAgentReport','uniqueid','destuniqueid','lodash','api','request-promise'];(function(_0x46698a,_0x8de1e4){var _0x356db0=function(_0x19e83c){while(--_0x19e83c){_0x46698a['push'](_0x46698a['shift']());}};_0x356db0(++_0x8de1e4);}(_0x8c46,0x171));var _0x68c4=function(_0x1b2c11,_0x2eac9f){_0x1b2c11=_0x1b2c11-0x0;var _0x46cca9=_0x8c46[_0x1b2c11];return _0x46cca9;};'use strict';var _=require(_0x68c4('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x68c4('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x68c4('0x2'));var fs=require('fs');var path=require(_0x68c4('0x3'));var rimraf=require(_0x68c4('0x4'));var config=require(_0x68c4('0x5'));var attributes=require(_0x68c4('0x6'));module[_0x68c4('0x7')]=function(_0x40ce21,_0x1516cf){return _0x40ce21[_0x68c4('0x8')](_0x68c4('0x9'),attributes,{'tableName':'report_agent','paranoid':![],'indexes':[{'fields':[_0x68c4('0xa'),_0x68c4('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0xa74a=['../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','define','VoiceAgentReport','report_agent','destuniqueid','lodash','util'];(function(_0x57537f,_0x76ed18){var _0x58ad18=function(_0x151b0e){while(--_0x151b0e){_0x57537f['push'](_0x57537f['shift']());}};_0x58ad18(++_0x76ed18);}(_0xa74a,0x66));var _0xaa74=function(_0x39e1a8,_0x18eb95){_0x39e1a8=_0x39e1a8-0x0;var _0x456146=_0xa74a[_0x39e1a8];return _0x456146;};'use strict';var _=require(_0xaa74('0x0'));var util=require(_0xaa74('0x1'));var logger=require(_0xaa74('0x2'))(_0xaa74('0x3'));var moment=require(_0xaa74('0x4'));var BPromise=require(_0xaa74('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xaa74('0x6'));var rimraf=require(_0xaa74('0x7'));var config=require(_0xaa74('0x8'));var attributes=require('./voiceAgentReport.attributes');module['exports']=function(_0x24eee1,_0x44250c){return _0x24eee1[_0xaa74('0x9')](_0xaa74('0xa'),attributes,{'tableName':_0xaa74('0xb'),'paranoid':![],'indexes':[{'fields':['uniqueid',_0xaa74('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
index ffe2ace..895c705 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd9ee=['bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','http','request','then','info','VoiceAgentReport,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','catch','CreateVoiceAgentReport','VoiceAgentReport','create','body','options','raw','update','where','attributes','limit','UpdateVoiceAgentReport','lodash','util','moment'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xd9ee,0xc9));var _0xed9e=function(_0x17765f,_0x26c400){_0x17765f=_0x17765f-0x0;var _0x106a69=_0xd9ee[_0x17765f];return _0x106a69;};'use strict';var _=require(_0xed9e('0x0'));var util=require(_0xed9e('0x1'));var moment=require(_0xed9e('0x2'));var BPromise=require(_0xed9e('0x3'));var rs=require(_0xed9e('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xed9e('0x5'))['db'];var utils=require(_0xed9e('0x6'));var logger=require(_0xed9e('0x7'))(_0xed9e('0x8'));var config=require(_0xed9e('0x9'));var jayson=require('jayson/promise');var client=jayson['client'][_0xed9e('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x241120,_0x10aea5,_0x10fc2e){return new BPromise(function(_0x3042d6,_0x439d96){return client[_0xed9e('0xb')](_0x241120,_0x10fc2e)[_0xed9e('0xc')](function(_0x1beab3){logger[_0xed9e('0xd')](_0xed9e('0xe'),_0x10aea5,_0xed9e('0xf'));logger[_0xed9e('0x10')]('VoiceAgentReport,\x20%s,\x20%s,\x20%s',_0x10aea5,_0xed9e('0xf'),JSON[_0xed9e('0x11')](_0x1beab3));if(_0x1beab3[_0xed9e('0x12')]){if(_0x1beab3[_0xed9e('0x12')][_0xed9e('0x13')]===0x1f4){logger[_0xed9e('0x12')](_0xed9e('0xe'),_0x10aea5,_0x1beab3['error']['message']);return _0x439d96(_0x1beab3[_0xed9e('0x12')][_0xed9e('0x14')]);}logger[_0xed9e('0x12')](_0xed9e('0xe'),_0x10aea5,_0x1beab3['error'][_0xed9e('0x14')]);return _0x3042d6(_0x1beab3[_0xed9e('0x12')][_0xed9e('0x14')]);}else{logger['info'](_0xed9e('0xe'),_0x10aea5,_0xed9e('0xf'));_0x3042d6(_0x1beab3[_0xed9e('0x15')][_0xed9e('0x14')]);}})[_0xed9e('0x16')](function(_0x3b8fc2){logger[_0xed9e('0x12')](_0xed9e('0xe'),_0x10aea5,_0x3b8fc2);_0x439d96(_0x3b8fc2);});});}exports[_0xed9e('0x17')]=function(_0x3f69ac){var _0x418081=this;return new Promise(function(_0x1ee08a,_0x1625d5){return db[_0xed9e('0x18')][_0xed9e('0x19')](_0x3f69ac[_0xed9e('0x1a')],{'raw':_0x3f69ac['options']?_0x3f69ac[_0xed9e('0x1b')][_0xed9e('0x1c')]===undefined?!![]:![]:!![]})[_0xed9e('0xc')](function(_0x2a48b8){logger['info'](_0xed9e('0x17'),_0x3f69ac);logger[_0xed9e('0x10')]('CreateVoiceAgentReport',_0x3f69ac,JSON['stringify'](_0x2a48b8));_0x1ee08a(_0x2a48b8);})[_0xed9e('0x16')](function(_0x5134ae){logger[_0xed9e('0x12')](_0xed9e('0x17'),_0x5134ae[_0xed9e('0x14')],_0x3f69ac);_0x1625d5(_0x418081[_0xed9e('0x12')](0x1f4,_0x5134ae[_0xed9e('0x14')]));});});};exports['UpdateVoiceAgentReport']=function(_0x473134){var _0x36d9f9=this;return new Promise(function(_0xcbce06,_0x599443){return db['VoiceAgentReport'][_0xed9e('0x1d')](_0x473134[_0xed9e('0x1a')],{'raw':_0x473134['options']?_0x473134['options']['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x473134[_0xed9e('0x1b')]?_0x473134[_0xed9e('0x1b')][_0xed9e('0x1e')]||null:null,'attributes':_0x473134[_0xed9e('0x1b')]?_0x473134[_0xed9e('0x1b')][_0xed9e('0x1f')]||null:null,'limit':_0x473134['options']?_0x473134[_0xed9e('0x1b')][_0xed9e('0x20')]||null:null})[_0xed9e('0xc')](function(_0x5dd7bb){logger[_0xed9e('0xd')](_0xed9e('0x21'),_0x473134);logger[_0xed9e('0x10')](_0xed9e('0x21'),_0x473134,JSON[_0xed9e('0x11')](_0x5dd7bb));_0xcbce06(_0x5dd7bb);})['catch'](function(_0x2337d6){logger[_0xed9e('0x12')]('UpdateVoiceAgentReport',_0x2337d6[_0xed9e('0x14')],_0x473134);_0x599443(_0x36d9f9[_0xed9e('0x12')](0x1f4,_0x2337d6[_0xed9e('0x14')]));});});};
\ No newline at end of file
+var _0x489f=['limit','then','lodash','util','moment','bluebird','../../config/utils','../../config/logger','../../config/environment','jayson/promise','request','info','debug','request\x20sent','error','code','VoiceAgentReport,\x20%s,\x20%s','message','result','catch','CreateVoiceAgentReport','VoiceAgentReport','create','body','options','raw','stringify','UpdateVoiceAgentReport','update','where','attributes'];(function(_0x3cfbc0,_0x5960d8){var _0x319cb3=function(_0x4ecb02){while(--_0x4ecb02){_0x3cfbc0['push'](_0x3cfbc0['shift']());}};_0x319cb3(++_0x5960d8);}(_0x489f,0x138));var _0xf489=function(_0x10da24,_0x26e5ff){_0x10da24=_0x10da24-0x0;var _0x48faf5=_0x489f[_0x10da24];return _0x48faf5;};'use strict';var _=require(_0xf489('0x0'));var util=require(_0xf489('0x1'));var moment=require(_0xf489('0x2'));var BPromise=require(_0xf489('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0xf489('0x4'));var logger=require(_0xf489('0x5'))('rpc');var config=require(_0xf489('0x6'));var jayson=require(_0xf489('0x7'));var client=jayson['client']['http']({'port':0x232a});function respondWithRpcPromise(_0x22c66b,_0x1e4dc5,_0x5198c8){return new BPromise(function(_0x418067,_0x1f1bb2){return client[_0xf489('0x8')](_0x22c66b,_0x5198c8)['then'](function(_0xc4c5a7){logger[_0xf489('0x9')]('VoiceAgentReport,\x20%s,\x20%s',_0x1e4dc5,'request\x20sent');logger[_0xf489('0xa')]('VoiceAgentReport,\x20%s,\x20%s,\x20%s',_0x1e4dc5,_0xf489('0xb'),JSON['stringify'](_0xc4c5a7));if(_0xc4c5a7[_0xf489('0xc')]){if(_0xc4c5a7[_0xf489('0xc')][_0xf489('0xd')]===0x1f4){logger['error'](_0xf489('0xe'),_0x1e4dc5,_0xc4c5a7[_0xf489('0xc')][_0xf489('0xf')]);return _0x1f1bb2(_0xc4c5a7[_0xf489('0xc')]['message']);}logger[_0xf489('0xc')](_0xf489('0xe'),_0x1e4dc5,_0xc4c5a7[_0xf489('0xc')][_0xf489('0xf')]);return _0x418067(_0xc4c5a7[_0xf489('0xc')][_0xf489('0xf')]);}else{logger[_0xf489('0x9')](_0xf489('0xe'),_0x1e4dc5,_0xf489('0xb'));_0x418067(_0xc4c5a7[_0xf489('0x10')]['message']);}})[_0xf489('0x11')](function(_0x2972a6){logger[_0xf489('0xc')](_0xf489('0xe'),_0x1e4dc5,_0x2972a6);_0x1f1bb2(_0x2972a6);});});}exports[_0xf489('0x12')]=function(_0x17dd09){var _0x4f1005=this;return new Promise(function(_0x586f09,_0x594f6c){return db[_0xf489('0x13')][_0xf489('0x14')](_0x17dd09[_0xf489('0x15')],{'raw':_0x17dd09[_0xf489('0x16')]?_0x17dd09['options'][_0xf489('0x17')]===undefined?!![]:![]:!![]})['then'](function(_0x5285af){logger[_0xf489('0x9')](_0xf489('0x12'),_0x17dd09);logger[_0xf489('0xa')](_0xf489('0x12'),_0x17dd09,JSON[_0xf489('0x18')](_0x5285af));_0x586f09(_0x5285af);})[_0xf489('0x11')](function(_0x55dbb2){logger[_0xf489('0xc')](_0xf489('0x12'),_0x55dbb2[_0xf489('0xf')],_0x17dd09);_0x594f6c(_0x4f1005[_0xf489('0xc')](0x1f4,_0x55dbb2[_0xf489('0xf')]));});});};exports[_0xf489('0x19')]=function(_0x55a521){var _0x592a0c=this;return new Promise(function(_0x526a3c,_0xdedc0c){return db[_0xf489('0x13')][_0xf489('0x1a')](_0x55a521[_0xf489('0x15')],{'raw':_0x55a521[_0xf489('0x16')]?_0x55a521['options'][_0xf489('0x17')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x55a521['options']?_0x55a521['options'][_0xf489('0x1b')]||null:null,'attributes':_0x55a521[_0xf489('0x16')]?_0x55a521[_0xf489('0x16')][_0xf489('0x1c')]||null:null,'limit':_0x55a521[_0xf489('0x16')]?_0x55a521[_0xf489('0x16')][_0xf489('0x1d')]||null:null})[_0xf489('0x1e')](function(_0x5258ba){logger[_0xf489('0x9')](_0xf489('0x19'),_0x55a521);logger[_0xf489('0xa')](_0xf489('0x19'),_0x55a521,JSON['stringify'](_0x5258ba));_0x526a3c(_0x5258ba);})[_0xf489('0x11')](function(_0x157d99){logger['error'](_0xf489('0x19'),_0x157d99[_0xf489('0xf')],_0x55a521);_0xdedc0c(_0x592a0c[_0xf489('0xc')](0x1f4,_0x157d99[_0xf489('0xf')]));});});};
\ No newline at end of file
index 816747b..e253952 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc3b5=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','/describe','describe','/:id','show','post','create','put','update','exports','path','connect-timeout','express'];(function(_0x364ae3,_0x4c9102){var _0x2c2028=function(_0x57f86b){while(--_0x57f86b){_0x364ae3['push'](_0x364ae3['shift']());}};_0x2c2028(++_0x4c9102);}(_0xc3b5,0x6f));var _0x5c3b=function(_0x7bd3ef,_0x158e45){_0x7bd3ef=_0x7bd3ef-0x0;var _0xcc04f=_0xc3b5[_0x7bd3ef];return _0xcc04f;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x5c3b('0x0'));var timeout=require(_0x5c3b('0x1'));var express=require(_0x5c3b('0x2'));var router=express[_0x5c3b('0x3')]();var fs_extra=require(_0x5c3b('0x4'));var auth=require(_0x5c3b('0x5'));var interaction=require(_0x5c3b('0x6'));var config=require(_0x5c3b('0x7'));var controller=require('./voiceCallReport.controller');router[_0x5c3b('0x8')]('/',auth[_0x5c3b('0x9')](),controller['index']);router[_0x5c3b('0x8')](_0x5c3b('0xa'),auth[_0x5c3b('0x9')](),controller[_0x5c3b('0xb')]);router['get'](_0x5c3b('0xc'),auth[_0x5c3b('0x9')](),controller[_0x5c3b('0xd')]);router[_0x5c3b('0xe')]('/',auth['isAuthenticated'](),controller[_0x5c3b('0xf')]);router[_0x5c3b('0x10')](_0x5c3b('0xc'),auth[_0x5c3b('0x9')](),controller[_0x5c3b('0x11')]);router['delete'](_0x5c3b('0xc'),auth[_0x5c3b('0x9')](),controller['destroy']);module[_0x5c3b('0x12')]=router;
\ No newline at end of file
+var _0xe0ae=['exports','path','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','./voiceCallReport.controller','index','get','/describe','isAuthenticated','show','post','put','/:id','update'];(function(_0x4d2f38,_0x310b0c){var _0x4d76f2=function(_0x29cc76){while(--_0x29cc76){_0x4d2f38['push'](_0x4d2f38['shift']());}};_0x4d76f2(++_0x310b0c);}(_0xe0ae,0xa1));var _0xee0a=function(_0x5ac1e5,_0x4b5012){_0x5ac1e5=_0x5ac1e5-0x0;var _0x1bccc6=_0xe0ae[_0x5ac1e5];return _0x1bccc6;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0xee0a('0x0'));var timeout=require(_0xee0a('0x1'));var express=require('express');var router=express[_0xee0a('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0xee0a('0x3'));var interaction=require(_0xee0a('0x4'));var config=require('../../config/environment');var controller=require(_0xee0a('0x5'));router['get']('/',auth['isAuthenticated'](),controller[_0xee0a('0x6')]);router[_0xee0a('0x7')](_0xee0a('0x8'),auth[_0xee0a('0x9')](),controller['describe']);router[_0xee0a('0x7')]('/:id',auth['isAuthenticated'](),controller[_0xee0a('0xa')]);router[_0xee0a('0xb')]('/',auth[_0xee0a('0x9')](),controller['create']);router[_0xee0a('0xc')](_0xee0a('0xd'),auth['isAuthenticated'](),controller[_0xee0a('0xe')]);router['delete'](_0xee0a('0xd'),auth[_0xee0a('0x9')](),controller['destroy']);module[_0xee0a('0xf')]=router;
\ No newline at end of file
index 7b4ab27..adf188a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xca91=['STRING','ENUM','inbound','internal','outbound','inbound-fax','outbound-fax','dialer','TEXT','DATE','INTEGER','sequelize','exports'];(function(_0x176ea8,_0x30b013){var _0x40e5b3=function(_0x50470c){while(--_0x50470c){_0x176ea8['push'](_0x176ea8['shift']());}};_0x40e5b3(++_0x30b013);}(_0xca91,0x1d2));var _0x1ca9=function(_0x344a3f,_0x579a22){_0x344a3f=_0x344a3f-0x0;var _0x264712=_0xca91[_0x344a3f];return _0x264712;};'use strict';var Sequelize=require(_0x1ca9('0x0'));module[_0x1ca9('0x1')]={'uniqueid':{'type':Sequelize[_0x1ca9('0x2')]},'type':{'type':Sequelize[_0x1ca9('0x3')](_0x1ca9('0x4'),_0x1ca9('0x5'),_0x1ca9('0x6'),_0x1ca9('0x7'),_0x1ca9('0x8'),_0x1ca9('0x9'))},'tag':{'type':Sequelize[_0x1ca9('0x2')]},'accountcode':{'type':Sequelize[_0x1ca9('0x2')]},'source':{'type':Sequelize[_0x1ca9('0x2')]},'destination':{'type':Sequelize[_0x1ca9('0x2')]},'destinationcontext':{'type':Sequelize[_0x1ca9('0x2')]},'callerid':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0x1ca9('0x2')]},'destinationchannel':{'type':Sequelize[_0x1ca9('0x2')]},'lastapplication':{'type':Sequelize['STRING']},'lastdata':{'type':Sequelize[_0x1ca9('0xa')]},'starttime':{'type':Sequelize['DATE']},'systemanswertime':{'type':Sequelize[_0x1ca9('0xb')]},'answertime':{'type':Sequelize[_0x1ca9('0xb')]},'endtime':{'type':Sequelize[_0x1ca9('0xb')]},'duration':{'type':Sequelize[_0x1ca9('0xc')]},'billableseconds':{'type':Sequelize[_0x1ca9('0xc')]},'mohtime':{'type':Sequelize[_0x1ca9('0xc')],'defaultValue':0x0},'disposition':{'type':Sequelize['STRING']},'amaflags':{'type':Sequelize[_0x1ca9('0x2')]},'userfield':{'type':Sequelize['STRING']},'userDisposition':{'type':Sequelize[_0x1ca9('0x2')]},'userSecondDisposition':{'type':Sequelize['STRING']},'userThirdDisposition':{'type':Sequelize[_0x1ca9('0x2')]},'note':{'type':Sequelize[_0x1ca9('0x2')]},'prefix':{'type':Sequelize['STRING']},'routeid':{'type':Sequelize[_0x1ca9('0xc')]},'sipcallid':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x437b=['INTEGER','sequelize','ENUM','internal','outbound','inbound-fax','dialer','STRING','DATE'];(function(_0x1c8151,_0x1e51d6){var _0xf06d6e=function(_0x550ac6){while(--_0x550ac6){_0x1c8151['push'](_0x1c8151['shift']());}};_0xf06d6e(++_0x1e51d6);}(_0x437b,0x1a8));var _0xb437=function(_0x30c649,_0x2ebbac){_0x30c649=_0x30c649-0x0;var _0x3edfb9=_0x437b[_0x30c649];return _0x3edfb9;};'use strict';var Sequelize=require(_0xb437('0x0'));module['exports']={'uniqueid':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0xb437('0x1')]('inbound',_0xb437('0x2'),_0xb437('0x3'),_0xb437('0x4'),'outbound-fax',_0xb437('0x5'))},'tag':{'type':Sequelize['STRING']},'accountcode':{'type':Sequelize[_0xb437('0x6')]},'source':{'type':Sequelize['STRING']},'destination':{'type':Sequelize[_0xb437('0x6')]},'destinationcontext':{'type':Sequelize[_0xb437('0x6')]},'callerid':{'type':Sequelize[_0xb437('0x6')]},'channel':{'type':Sequelize[_0xb437('0x6')]},'destinationchannel':{'type':Sequelize[_0xb437('0x6')]},'lastapplication':{'type':Sequelize['STRING']},'lastdata':{'type':Sequelize['TEXT']},'starttime':{'type':Sequelize[_0xb437('0x7')]},'systemanswertime':{'type':Sequelize[_0xb437('0x7')]},'answertime':{'type':Sequelize[_0xb437('0x7')]},'endtime':{'type':Sequelize[_0xb437('0x7')]},'duration':{'type':Sequelize[_0xb437('0x8')]},'billableseconds':{'type':Sequelize[_0xb437('0x8')]},'mohtime':{'type':Sequelize[_0xb437('0x8')],'defaultValue':0x0},'disposition':{'type':Sequelize[_0xb437('0x6')]},'amaflags':{'type':Sequelize[_0xb437('0x6')]},'userfield':{'type':Sequelize['STRING']},'userDisposition':{'type':Sequelize['STRING']},'userSecondDisposition':{'type':Sequelize['STRING']},'userThirdDisposition':{'type':Sequelize['STRING']},'note':{'type':Sequelize[_0xb437('0x6')]},'prefix':{'type':Sequelize[_0xb437('0x6')]},'routeid':{'type':Sequelize['INTEGER']},'sipcallid':{'type':Sequelize[_0xb437('0x6')]}};
\ No newline at end of file
index 1ecb7f2..065a124 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb10b=['desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/environment','../../mysqldb','sendStatus','status','json','offset','limit','undefined','count','set','Content-Range','reject','update','then','destroy','end','error','stack','name','send','index','map','rawAttributes','fieldName','key','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','where','filters','pick','VIRTUAL','filter','merge','options','VoiceCallReport','includeAll','include','alias','User','rows','show','find','create','body','catch','params','describe','uniqueid','eml-format','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','fs-extra','lodash','crypto','jsforce'];(function(_0x569ad3,_0x53ba0f){var _0x300d43=function(_0x4782f0){while(--_0x4782f0){_0x569ad3['push'](_0x569ad3['shift']());}};_0x300d43(++_0x53ba0f);}(_0xb10b,0x12a));var _0xbb10=function(_0x4fc583,_0x1c9563){_0x4fc583=_0x4fc583-0x0;var _0x3b884d=_0xb10b[_0x4fc583];return _0x3b884d;};'use strict';var emlformat=require(_0xbb10('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xbb10('0x1'));var jsonpatch=require(_0xbb10('0x2'));var rp=require(_0xbb10('0x3'));var moment=require('moment');var BPromise=require(_0xbb10('0x4'));var Mustache=require(_0xbb10('0x5'));var util=require(_0xbb10('0x6'));var path=require(_0xbb10('0x7'));var sox=require(_0xbb10('0x8'));var csv=require(_0xbb10('0x9'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xbb10('0xa'));var _=require(_0xbb10('0xb'));var squel=require('squel');var crypto=require(_0xbb10('0xc'));var jsforce=require(_0xbb10('0xd'));var deskjs=require(_0xbb10('0xe'));var toCsv=require(_0xbb10('0x9'));var querystring=require(_0xbb10('0xf'));var Papa=require(_0xbb10('0x10'));var Redis=require(_0xbb10('0x11'));var authService=require(_0xbb10('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xbb10('0x13'));var logger=require(_0xbb10('0x14'))(_0xbb10('0x15'));var utils=require('../../config/utils');var config=require(_0xbb10('0x16'));var licenseUtil=require('../../config/license/util');var db=require(_0xbb10('0x17'))['db'];function respondWithStatusCode(_0x916a32,_0x285009){_0x285009=_0x285009||0xcc;return function(_0x193a27){if(_0x193a27){return _0x916a32[_0xbb10('0x18')](_0x285009);}return _0x916a32[_0xbb10('0x19')](_0x285009)['end']();};}function respondWithResult(_0x26e021,_0x42d7e4){_0x42d7e4=_0x42d7e4||0xc8;return function(_0x45b9d6){if(_0x45b9d6){return _0x26e021[_0xbb10('0x19')](_0x42d7e4)[_0xbb10('0x1a')](_0x45b9d6);}};}function respondWithFilteredResult(_0x2f2ebf,_0x24a57b){return function(_0x36b5e8){if(_0x36b5e8){var _0x3e26f4=typeof _0x24a57b[_0xbb10('0x1b')]==='undefined'&&typeof _0x24a57b[_0xbb10('0x1c')]===_0xbb10('0x1d');var _0x133ac2=_0x36b5e8[_0xbb10('0x1e')];var _0x378da8=_0x3e26f4?0x0:_0x24a57b[_0xbb10('0x1b')];var _0x575cca=_0x3e26f4?_0x36b5e8[_0xbb10('0x1e')]:_0x24a57b[_0xbb10('0x1b')]+_0x24a57b[_0xbb10('0x1c')];var _0x48b6e9;if(_0x575cca>=_0x133ac2){_0x575cca=_0x133ac2;_0x48b6e9=0xc8;}else{_0x48b6e9=0xce;}_0x2f2ebf[_0xbb10('0x19')](_0x48b6e9);return _0x2f2ebf[_0xbb10('0x1f')](_0xbb10('0x20'),_0x378da8+'-'+_0x575cca+'/'+_0x133ac2)[_0xbb10('0x1a')](_0x36b5e8);}return null;};}function patchUpdates(_0xdf237d){return function(_0x44e563){try{jsonpatch['apply'](_0x44e563,_0xdf237d,!![]);}catch(_0x12f888){return BPromise[_0xbb10('0x21')](_0x12f888);}return _0x44e563['save']();};}function saveUpdates(_0x4c4b0d,_0x8e2b97){return function(_0x311abe){if(_0x311abe){return _0x311abe[_0xbb10('0x22')](_0x4c4b0d)[_0xbb10('0x23')](function(_0x445761){return _0x445761;});}return null;};}function removeEntity(_0x1824b7,_0x407cb4){return function(_0x436104){if(_0x436104){return _0x436104[_0xbb10('0x24')]()[_0xbb10('0x23')](function(){_0x1824b7[_0xbb10('0x19')](0xcc)[_0xbb10('0x25')]();});}};}function handleEntityNotFound(_0x537898,_0x4fedac){return function(_0x4fb5e0){if(!_0x4fb5e0){_0x537898[_0xbb10('0x18')](0x194);}return _0x4fb5e0;};}function handleError(_0x3c5ae7,_0x2c89b9){_0x2c89b9=_0x2c89b9||0x1f4;return function(_0x4e25ff){logger[_0xbb10('0x26')](_0x4e25ff[_0xbb10('0x27')]);if(_0x4e25ff[_0xbb10('0x28')]){delete _0x4e25ff[_0xbb10('0x28')];}_0x3c5ae7[_0xbb10('0x19')](_0x2c89b9)[_0xbb10('0x29')](_0x4e25ff);};}exports[_0xbb10('0x2a')]=function(_0x4aabb9,_0x3796c7){var _0x21ac54={},_0xfc3595={},_0x2e0249={'count':0x0,'rows':[]};var _0x1d30aa=_[_0xbb10('0x2b')](db['VoiceCallReport'][_0xbb10('0x2c')],function(_0x4ee02e){return{'name':_0x4ee02e[_0xbb10('0x2d')],'type':_0x4ee02e['type'][_0xbb10('0x2e')]};});_0xfc3595[_0xbb10('0x2f')]=_[_0xbb10('0x2b')](_0x1d30aa,'name');_0xfc3595['query']=_[_0xbb10('0x30')](_0x4aabb9[_0xbb10('0x31')]);_0xfc3595['filters']=_[_0xbb10('0x32')](_0xfc3595[_0xbb10('0x2f')],_0xfc3595[_0xbb10('0x31')]);_0x21ac54[_0xbb10('0x33')]=_[_0xbb10('0x32')](_0xfc3595[_0xbb10('0x2f')],qs[_0xbb10('0x34')](_0x4aabb9['query'][_0xbb10('0x34')]));_0x21ac54[_0xbb10('0x33')]=_0x21ac54[_0xbb10('0x33')][_0xbb10('0x35')]?_0x21ac54[_0xbb10('0x33')]:_0xfc3595[_0xbb10('0x2f')];if(!_0x4aabb9[_0xbb10('0x31')][_0xbb10('0x36')](_0xbb10('0x37'))){_0x21ac54['limit']=qs[_0xbb10('0x1c')](_0x4aabb9[_0xbb10('0x31')][_0xbb10('0x1c')]);_0x21ac54[_0xbb10('0x1b')]=qs['offset'](_0x4aabb9[_0xbb10('0x31')]['offset']);}_0x21ac54['order']=qs[_0xbb10('0x38')](_0x4aabb9[_0xbb10('0x31')][_0xbb10('0x38')]);_0x21ac54[_0xbb10('0x39')]=qs[_0xbb10('0x3a')](_[_0xbb10('0x3b')](_0x4aabb9['query'],_0xfc3595[_0xbb10('0x3a')]),_0x1d30aa);if(_0x4aabb9[_0xbb10('0x31')]['filter']){_0x21ac54['where']=_['merge'](_0x21ac54[_0xbb10('0x39')],{'$or':_[_0xbb10('0x2b')](_0x1d30aa,function(_0x2b658a){if(_0x2b658a['type']!==_0xbb10('0x3c')){var _0x3e8538={};_0x3e8538[_0x2b658a[_0xbb10('0x28')]]={'$like':'%'+_0x4aabb9['query'][_0xbb10('0x3d')]+'%'};return _0x3e8538;}})});}_0x21ac54=_[_0xbb10('0x3e')]({},_0x21ac54,_0x4aabb9[_0xbb10('0x3f')]);var _0x446f49={'where':_0x21ac54['where']};return db[_0xbb10('0x40')][_0xbb10('0x1e')](_0x446f49)['then'](function(_0xe2040f){_0x2e0249[_0xbb10('0x1e')]=_0xe2040f;if(_0x4aabb9[_0xbb10('0x31')][_0xbb10('0x41')]){_0x21ac54[_0xbb10('0x42')]=[{'attributes':['id',_0xbb10('0x28'),'fullname',_0xbb10('0x43')],'model':db[_0xbb10('0x44')],'as':_0xbb10('0x44')}];}return db[_0xbb10('0x40')]['findAll'](_0x21ac54);})[_0xbb10('0x23')](function(_0x331751){_0x2e0249[_0xbb10('0x45')]=_0x331751;return _0x2e0249;})[_0xbb10('0x23')](respondWithFilteredResult(_0x3796c7,_0x21ac54))['catch'](handleError(_0x3796c7,null));};exports[_0xbb10('0x46')]=function(_0x202c60,_0x54ac18){var _0x5d9a4f={'raw':!![],'where':{'id':_0x202c60['params']['id']}},_0x38d78f={};_0x38d78f[_0xbb10('0x2f')]=_[_0xbb10('0x30')](db['VoiceCallReport'][_0xbb10('0x2c')]);_0x38d78f[_0xbb10('0x31')]=_[_0xbb10('0x30')](_0x202c60['query']);_0x38d78f[_0xbb10('0x3a')]=_[_0xbb10('0x32')](_0x38d78f[_0xbb10('0x2f')],_0x38d78f[_0xbb10('0x31')]);_0x5d9a4f[_0xbb10('0x33')]=_[_0xbb10('0x32')](_0x38d78f[_0xbb10('0x2f')],qs[_0xbb10('0x34')](_0x202c60[_0xbb10('0x31')][_0xbb10('0x34')]));_0x5d9a4f[_0xbb10('0x33')]=_0x5d9a4f[_0xbb10('0x33')]['length']?_0x5d9a4f[_0xbb10('0x33')]:_0x38d78f[_0xbb10('0x2f')];if(_0x202c60['query'][_0xbb10('0x41')]){_0x5d9a4f[_0xbb10('0x42')]=[{'all':!![]}];}_0x5d9a4f=_[_0xbb10('0x3e')]({},_0x5d9a4f,_0x202c60[_0xbb10('0x3f')]);return db[_0xbb10('0x40')][_0xbb10('0x47')](_0x5d9a4f)[_0xbb10('0x23')](handleEntityNotFound(_0x54ac18,null))['then'](respondWithResult(_0x54ac18,null))['catch'](handleError(_0x54ac18,null));};exports[_0xbb10('0x48')]=function(_0x76a208,_0x2b12bd){return db['VoiceCallReport']['create'](_0x76a208[_0xbb10('0x49')],{})[_0xbb10('0x23')](respondWithResult(_0x2b12bd,0xc9))[_0xbb10('0x4a')](handleError(_0x2b12bd,null));};exports[_0xbb10('0x24')]=function(_0x10159b,_0x22b315){return db[_0xbb10('0x40')][_0xbb10('0x47')]({'where':{'id':_0x10159b[_0xbb10('0x4b')]['id']}})[_0xbb10('0x23')](handleEntityNotFound(_0x22b315,null))['then'](removeEntity(_0x22b315,null))['catch'](handleError(_0x22b315,null));};exports[_0xbb10('0x4c')]=function(_0x467dba,_0x36ab7d){return db[_0xbb10('0x40')][_0xbb10('0x4c')]()[_0xbb10('0x23')](respondWithResult(_0x36ab7d,null))[_0xbb10('0x4a')](handleError(_0x36ab7d,null));};exports[_0xbb10('0x22')]=function(_0x1c0d8f,_0x1214f7){if(_0x1c0d8f[_0xbb10('0x49')][_0xbb10('0x4d')]){delete _0x1c0d8f[_0xbb10('0x49')][_0xbb10('0x4d')];}return db[_0xbb10('0x40')]['find']({'where':{'uniqueid':_0x1c0d8f[_0xbb10('0x4b')]['id'],'UserId':{'$or':[null,_0x1c0d8f['user']['id']]}}})[_0xbb10('0x23')](handleEntityNotFound(_0x1214f7,null))[_0xbb10('0x23')](saveUpdates(_0x1c0d8f[_0xbb10('0x49')],null))[_0xbb10('0x23')](respondWithResult(_0x1214f7,null))[_0xbb10('0x4a')](handleError(_0x1214f7,null));};
\ No newline at end of file
+var _0xadb5=['filter','VIRTUAL','merge','options','includeAll','include','fullname','User','findAll','rows','show','rawAttributes','length','find','catch','body','params','describe','uniqueid','rimraf','fast-json-patch','request-promise','moment','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/license/util','sendStatus','status','json','offset','undefined','limit','count','set','Content-Range','update','then','destroy','end','stack','name','send','index','map','VoiceCallReport','fieldName','type','key','model','query','keys','intersection','attributes','fields','hasOwnProperty','nolimit','sort','where','pick','filters'];(function(_0x3337b6,_0x42c7f9){var _0x568270=function(_0x56e5df){while(--_0x56e5df){_0x3337b6['push'](_0x3337b6['shift']());}};_0x568270(++_0x42c7f9);}(_0xadb5,0xad));var _0x5adb=function(_0x29f436,_0x17892a){_0x29f436=_0x29f436-0x0;var _0x1d3313=_0xadb5[_0x29f436];return _0x1d3313;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x5adb('0x0'));var zipdir=require('zip-dir');var jsonpatch=require(_0x5adb('0x1'));var rp=require(_0x5adb('0x2'));var moment=require(_0x5adb('0x3'));var BPromise=require('bluebird');var Mustache=require(_0x5adb('0x4'));var util=require(_0x5adb('0x5'));var path=require(_0x5adb('0x6'));var sox=require('sox');var csv=require(_0x5adb('0x7'));var ejs=require(_0x5adb('0x8'));var fs=require('fs');var fs_extra=require(_0x5adb('0x9'));var _=require(_0x5adb('0xa'));var squel=require(_0x5adb('0xb'));var crypto=require(_0x5adb('0xc'));var jsforce=require(_0x5adb('0xd'));var deskjs=require(_0x5adb('0xe'));var toCsv=require(_0x5adb('0x7'));var querystring=require(_0x5adb('0xf'));var Papa=require(_0x5adb('0x10'));var Redis=require(_0x5adb('0x11'));var authService=require(_0x5adb('0x12'));var qs=require(_0x5adb('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x5adb('0x14'))(_0x5adb('0x15'));var utils=require(_0x5adb('0x16'));var config=require('../../config/environment');var licenseUtil=require(_0x5adb('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2a0b70,_0x5433bf){_0x5433bf=_0x5433bf||0xcc;return function(_0x8cfcc6){if(_0x8cfcc6){return _0x2a0b70[_0x5adb('0x18')](_0x5433bf);}return _0x2a0b70[_0x5adb('0x19')](_0x5433bf)['end']();};}function respondWithResult(_0x2a545b,_0x34af2c){_0x34af2c=_0x34af2c||0xc8;return function(_0xf82f72){if(_0xf82f72){return _0x2a545b['status'](_0x34af2c)[_0x5adb('0x1a')](_0xf82f72);}};}function respondWithFilteredResult(_0x518823,_0x367d82){return function(_0x42a482){if(_0x42a482){var _0x30614e=typeof _0x367d82[_0x5adb('0x1b')]===_0x5adb('0x1c')&&typeof _0x367d82[_0x5adb('0x1d')]===_0x5adb('0x1c');var _0x42f4c6=_0x42a482[_0x5adb('0x1e')];var _0x529b65=_0x30614e?0x0:_0x367d82[_0x5adb('0x1b')];var _0x5de028=_0x30614e?_0x42a482[_0x5adb('0x1e')]:_0x367d82['offset']+_0x367d82[_0x5adb('0x1d')];var _0x50e84f;if(_0x5de028>=_0x42f4c6){_0x5de028=_0x42f4c6;_0x50e84f=0xc8;}else{_0x50e84f=0xce;}_0x518823['status'](_0x50e84f);return _0x518823[_0x5adb('0x1f')](_0x5adb('0x20'),_0x529b65+'-'+_0x5de028+'/'+_0x42f4c6)[_0x5adb('0x1a')](_0x42a482);}return null;};}function patchUpdates(_0x1fd4a7){return function(_0x99bc6c){try{jsonpatch['apply'](_0x99bc6c,_0x1fd4a7,!![]);}catch(_0x3255b3){return BPromise['reject'](_0x3255b3);}return _0x99bc6c['save']();};}function saveUpdates(_0x3754cc,_0x379b33){return function(_0x1a38d3){if(_0x1a38d3){return _0x1a38d3[_0x5adb('0x21')](_0x3754cc)[_0x5adb('0x22')](function(_0x413911){return _0x413911;});}return null;};}function removeEntity(_0xfd9bb9,_0x4ca150){return function(_0x4b1957){if(_0x4b1957){return _0x4b1957[_0x5adb('0x23')]()[_0x5adb('0x22')](function(){_0xfd9bb9[_0x5adb('0x19')](0xcc)[_0x5adb('0x24')]();});}};}function handleEntityNotFound(_0x49f203,_0x2fee18){return function(_0x2e1e63){if(!_0x2e1e63){_0x49f203['sendStatus'](0x194);}return _0x2e1e63;};}function handleError(_0x1feecf,_0x1ded9f){_0x1ded9f=_0x1ded9f||0x1f4;return function(_0x1a0acd){logger['error'](_0x1a0acd[_0x5adb('0x25')]);if(_0x1a0acd[_0x5adb('0x26')]){delete _0x1a0acd[_0x5adb('0x26')];}_0x1feecf[_0x5adb('0x19')](_0x1ded9f)[_0x5adb('0x27')](_0x1a0acd);};}exports[_0x5adb('0x28')]=function(_0x4a5d46,_0x49992e){var _0x5d457e={},_0x39bddd={},_0x1eac55={'count':0x0,'rows':[]};var _0x60a672=_[_0x5adb('0x29')](db[_0x5adb('0x2a')]['rawAttributes'],function(_0x11ec2a){return{'name':_0x11ec2a[_0x5adb('0x2b')],'type':_0x11ec2a[_0x5adb('0x2c')][_0x5adb('0x2d')]};});_0x39bddd[_0x5adb('0x2e')]=_[_0x5adb('0x29')](_0x60a672,_0x5adb('0x26'));_0x39bddd[_0x5adb('0x2f')]=_[_0x5adb('0x30')](_0x4a5d46[_0x5adb('0x2f')]);_0x39bddd['filters']=_[_0x5adb('0x31')](_0x39bddd['model'],_0x39bddd[_0x5adb('0x2f')]);_0x5d457e[_0x5adb('0x32')]=_['intersection'](_0x39bddd[_0x5adb('0x2e')],qs[_0x5adb('0x33')](_0x4a5d46[_0x5adb('0x2f')]['fields']));_0x5d457e[_0x5adb('0x32')]=_0x5d457e[_0x5adb('0x32')]['length']?_0x5d457e['attributes']:_0x39bddd[_0x5adb('0x2e')];if(!_0x4a5d46['query'][_0x5adb('0x34')](_0x5adb('0x35'))){_0x5d457e[_0x5adb('0x1d')]=qs[_0x5adb('0x1d')](_0x4a5d46[_0x5adb('0x2f')]['limit']);_0x5d457e[_0x5adb('0x1b')]=qs[_0x5adb('0x1b')](_0x4a5d46[_0x5adb('0x2f')]['offset']);}_0x5d457e['order']=qs[_0x5adb('0x36')](_0x4a5d46[_0x5adb('0x2f')]['sort']);_0x5d457e[_0x5adb('0x37')]=qs['filters'](_[_0x5adb('0x38')](_0x4a5d46['query'],_0x39bddd[_0x5adb('0x39')]),_0x60a672);if(_0x4a5d46['query'][_0x5adb('0x3a')]){_0x5d457e[_0x5adb('0x37')]=_['merge'](_0x5d457e[_0x5adb('0x37')],{'$or':_['map'](_0x60a672,function(_0xadbe37){if(_0xadbe37[_0x5adb('0x2c')]!==_0x5adb('0x3b')){var _0x50edd1={};_0x50edd1[_0xadbe37[_0x5adb('0x26')]]={'$like':'%'+_0x4a5d46[_0x5adb('0x2f')][_0x5adb('0x3a')]+'%'};return _0x50edd1;}})});}_0x5d457e=_[_0x5adb('0x3c')]({},_0x5d457e,_0x4a5d46[_0x5adb('0x3d')]);var _0x52d74f={'where':_0x5d457e['where']};return db['VoiceCallReport']['count'](_0x52d74f)[_0x5adb('0x22')](function(_0x2fbe14){_0x1eac55[_0x5adb('0x1e')]=_0x2fbe14;if(_0x4a5d46[_0x5adb('0x2f')][_0x5adb('0x3e')]){_0x5d457e[_0x5adb('0x3f')]=[{'attributes':['id',_0x5adb('0x26'),_0x5adb('0x40'),'alias'],'model':db['User'],'as':_0x5adb('0x41')}];}return db['VoiceCallReport'][_0x5adb('0x42')](_0x5d457e);})[_0x5adb('0x22')](function(_0x299746){_0x1eac55[_0x5adb('0x43')]=_0x299746;return _0x1eac55;})[_0x5adb('0x22')](respondWithFilteredResult(_0x49992e,_0x5d457e))['catch'](handleError(_0x49992e,null));};exports[_0x5adb('0x44')]=function(_0x565b03,_0x508690){var _0x4160ad={'raw':!![],'where':{'id':_0x565b03['params']['id']}},_0x1a256c={};_0x1a256c[_0x5adb('0x2e')]=_[_0x5adb('0x30')](db[_0x5adb('0x2a')][_0x5adb('0x45')]);_0x1a256c[_0x5adb('0x2f')]=_[_0x5adb('0x30')](_0x565b03[_0x5adb('0x2f')]);_0x1a256c['filters']=_['intersection'](_0x1a256c[_0x5adb('0x2e')],_0x1a256c[_0x5adb('0x2f')]);_0x4160ad[_0x5adb('0x32')]=_[_0x5adb('0x31')](_0x1a256c['model'],qs['fields'](_0x565b03[_0x5adb('0x2f')][_0x5adb('0x33')]));_0x4160ad[_0x5adb('0x32')]=_0x4160ad[_0x5adb('0x32')][_0x5adb('0x46')]?_0x4160ad['attributes']:_0x1a256c[_0x5adb('0x2e')];if(_0x565b03[_0x5adb('0x2f')]['includeAll']){_0x4160ad[_0x5adb('0x3f')]=[{'all':!![]}];}_0x4160ad=_[_0x5adb('0x3c')]({},_0x4160ad,_0x565b03[_0x5adb('0x3d')]);return db[_0x5adb('0x2a')][_0x5adb('0x47')](_0x4160ad)[_0x5adb('0x22')](handleEntityNotFound(_0x508690,null))[_0x5adb('0x22')](respondWithResult(_0x508690,null))[_0x5adb('0x48')](handleError(_0x508690,null));};exports['create']=function(_0x3a925b,_0x57dc8b){return db['VoiceCallReport']['create'](_0x3a925b[_0x5adb('0x49')],{})[_0x5adb('0x22')](respondWithResult(_0x57dc8b,0xc9))[_0x5adb('0x48')](handleError(_0x57dc8b,null));};exports['destroy']=function(_0x2ad69d,_0x5cbab5){return db[_0x5adb('0x2a')][_0x5adb('0x47')]({'where':{'id':_0x2ad69d[_0x5adb('0x4a')]['id']}})['then'](handleEntityNotFound(_0x5cbab5,null))[_0x5adb('0x22')](removeEntity(_0x5cbab5,null))['catch'](handleError(_0x5cbab5,null));};exports[_0x5adb('0x4b')]=function(_0x6dc067,_0x55c535){return db[_0x5adb('0x2a')][_0x5adb('0x4b')]()[_0x5adb('0x22')](respondWithResult(_0x55c535,null))[_0x5adb('0x48')](handleError(_0x55c535,null));};exports[_0x5adb('0x21')]=function(_0x4cb36c,_0x36b847){if(_0x4cb36c[_0x5adb('0x49')][_0x5adb('0x4c')]){delete _0x4cb36c[_0x5adb('0x49')]['uniqueid'];}return db[_0x5adb('0x2a')][_0x5adb('0x47')]({'where':{'uniqueid':_0x4cb36c[_0x5adb('0x4a')]['id'],'UserId':{'$or':[null,_0x4cb36c['user']['id']]}}})[_0x5adb('0x22')](handleEntityNotFound(_0x36b847,null))[_0x5adb('0x22')](saveUpdates(_0x4cb36c[_0x5adb('0x49')],null))[_0x5adb('0x22')](respondWithResult(_0x36b847,null))['catch'](handleError(_0x36b847,null));};
\ No newline at end of file
index 880140f..7987087 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb76c=['define','VoiceCallReport','report_call','uniqueid','util','../../config/logger','api','moment','bluebird','request-promise','path','rimraf','./voiceCallReport.attributes','exports'];(function(_0x1b959e,_0x5b2d5f){var _0xa5ecea=function(_0x447b07){while(--_0x447b07){_0x1b959e['push'](_0x1b959e['shift']());}};_0xa5ecea(++_0x5b2d5f);}(_0xb76c,0x74));var _0xcb76=function(_0x44a64f,_0x38475c){_0x44a64f=_0x44a64f-0x0;var _0x52024b=_0xb76c[_0x44a64f];return _0x52024b;};'use strict';var _=require('lodash');var util=require(_0xcb76('0x0'));var logger=require(_0xcb76('0x1'))(_0xcb76('0x2'));var moment=require(_0xcb76('0x3'));var BPromise=require(_0xcb76('0x4'));var rp=require(_0xcb76('0x5'));var fs=require('fs');var path=require(_0xcb76('0x6'));var rimraf=require(_0xcb76('0x7'));var config=require('../../config/environment');var attributes=require(_0xcb76('0x8'));module[_0xcb76('0x9')]=function(_0x3155c8,_0x28e27d){return _0x3155c8[_0xcb76('0xa')](_0xcb76('0xb'),attributes,{'tableName':_0xcb76('0xc'),'paranoid':![],'indexes':[{'fields':[_0xcb76('0xd')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x8954=['api','path','rimraf','../../config/environment','./voiceCallReport.attributes','exports','define','VoiceCallReport','report_call','uniqueid','lodash','../../config/logger'];(function(_0x10915f,_0x53c2c9){var _0x401079=function(_0x5ba556){while(--_0x5ba556){_0x10915f['push'](_0x10915f['shift']());}};_0x401079(++_0x53c2c9);}(_0x8954,0x136));var _0x4895=function(_0x5c846d,_0x5c02ce){_0x5c846d=_0x5c846d-0x0;var _0xd064e4=_0x8954[_0x5c846d];return _0xd064e4;};'use strict';var _=require(_0x4895('0x0'));var util=require('util');var logger=require(_0x4895('0x1'))(_0x4895('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0x4895('0x3'));var rimraf=require(_0x4895('0x4'));var config=require(_0x4895('0x5'));var attributes=require(_0x4895('0x6'));module[_0x4895('0x7')]=function(_0x48cbde,_0x179f79){return _0x48cbde[_0x4895('0x8')](_0x4895('0x9'),attributes,{'tableName':_0x4895('0xa'),'paranoid':![],'indexes':[{'fields':[_0x4895('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
index e2c9756..3ab5a6c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdb37=['bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','request','then','info','VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','GetVoiceCallReport','raw','options','attributes','include','map','model','VoiceCallReport','create','body','UpdateVoiceCallReport','where','limit','lodash'];(function(_0x27255b,_0x1c5c3b){var _0x58bcce=function(_0x37bc2c){while(--_0x37bc2c){_0x27255b['push'](_0x27255b['shift']());}};_0x58bcce(++_0x1c5c3b);}(_0xdb37,0x117));var _0x7db3=function(_0x2bc3de,_0x585f62){_0x2bc3de=_0x2bc3de-0x0;var _0x7d244f=_0xdb37[_0x2bc3de];return _0x7d244f;};'use strict';var _=require(_0x7db3('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x7db3('0x1'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7db3('0x2'));var db=require(_0x7db3('0x3'))['db'];var utils=require(_0x7db3('0x4'));var logger=require(_0x7db3('0x5'))(_0x7db3('0x6'));var config=require('../../config/environment');var jayson=require(_0x7db3('0x7'));var client=jayson[_0x7db3('0x8')][_0x7db3('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x42e269,_0x5a7f78,_0x5da00a){return new BPromise(function(_0x4d1354,_0x59cab3){return client[_0x7db3('0xa')](_0x42e269,_0x5da00a)[_0x7db3('0xb')](function(_0x5c0b37){logger[_0x7db3('0xc')](_0x7db3('0xd'),_0x5a7f78,_0x7db3('0xe'));logger[_0x7db3('0xf')](_0x7db3('0x10'),_0x5a7f78,_0x7db3('0xe'),JSON[_0x7db3('0x11')](_0x5c0b37));if(_0x5c0b37[_0x7db3('0x12')]){if(_0x5c0b37[_0x7db3('0x12')][_0x7db3('0x13')]===0x1f4){logger['error'](_0x7db3('0xd'),_0x5a7f78,_0x5c0b37[_0x7db3('0x12')][_0x7db3('0x14')]);return _0x59cab3(_0x5c0b37[_0x7db3('0x12')][_0x7db3('0x14')]);}logger['error']('VoiceCallReport,\x20%s,\x20%s',_0x5a7f78,_0x5c0b37['error'][_0x7db3('0x14')]);return _0x4d1354(_0x5c0b37[_0x7db3('0x12')][_0x7db3('0x14')]);}else{logger['info'](_0x7db3('0xd'),_0x5a7f78,_0x7db3('0xe'));_0x4d1354(_0x5c0b37['result'][_0x7db3('0x14')]);}})[_0x7db3('0x15')](function(_0x4bc2d0){logger['error'](_0x7db3('0xd'),_0x5a7f78,_0x4bc2d0);_0x59cab3(_0x4bc2d0);});});}exports[_0x7db3('0x16')]=function(_0x3552f3){var _0x570084=this;return new Promise(function(_0x1bac5b,_0x34d8ef){return db['VoiceCallReport']['findAll']({'raw':_0x3552f3['options']?_0x3552f3['options'][_0x7db3('0x17')]===undefined?!![]:![]:!![],'where':_0x3552f3[_0x7db3('0x18')]?_0x3552f3[_0x7db3('0x18')]['where']||null:null,'attributes':_0x3552f3[_0x7db3('0x18')]?_0x3552f3[_0x7db3('0x18')][_0x7db3('0x19')]||null:null,'limit':_0x3552f3[_0x7db3('0x18')]?_0x3552f3[_0x7db3('0x18')]['limit']||null:null,'include':_0x3552f3[_0x7db3('0x18')]?_0x3552f3[_0x7db3('0x18')][_0x7db3('0x1a')]?_[_0x7db3('0x1b')](_0x3552f3['options'][_0x7db3('0x1a')],function(_0x28df5f){return{'model':db[_0x28df5f[_0x7db3('0x1c')]],'as':_0x28df5f['as'],'attributes':_0x28df5f[_0x7db3('0x19')],'include':_0x28df5f[_0x7db3('0x1a')]?_[_0x7db3('0x1b')](_0x28df5f[_0x7db3('0x1a')],function(_0x52120d){return{'model':db[_0x52120d[_0x7db3('0x1c')]],'as':_0x52120d['as'],'attributes':_0x52120d[_0x7db3('0x19')],'include':_0x52120d[_0x7db3('0x1a')]?_['map'](_0x52120d['include'],function(_0x1e7576){return{'model':db[_0x1e7576['model']],'as':_0x1e7576['as'],'attributes':_0x1e7576['attributes']};}):[]};}):[]};}):[]:[]})[_0x7db3('0xb')](function(_0x5cc991){logger[_0x7db3('0xc')]('GetVoiceCallReport',_0x3552f3);logger[_0x7db3('0xf')](_0x7db3('0x16'),_0x3552f3,JSON[_0x7db3('0x11')](_0x5cc991));_0x1bac5b(_0x5cc991);})[_0x7db3('0x15')](function(_0x150827){logger[_0x7db3('0x12')](_0x7db3('0x16'),_0x150827[_0x7db3('0x14')],_0x3552f3);_0x34d8ef(_0x570084[_0x7db3('0x12')](0x1f4,_0x150827['message']));});});};exports['CreateVoiceCallReport']=function(_0x43c28d){var _0x5c4241=this;return new Promise(function(_0x4430f4,_0x5ecc77){return db[_0x7db3('0x1d')][_0x7db3('0x1e')](_0x43c28d[_0x7db3('0x1f')],{'raw':_0x43c28d['options']?_0x43c28d[_0x7db3('0x18')][_0x7db3('0x17')]===undefined?!![]:![]:!![]})[_0x7db3('0xb')](function(_0x59f903){logger['info']('CreateVoiceCallReport',_0x43c28d);logger[_0x7db3('0xf')]('CreateVoiceCallReport',_0x43c28d,JSON[_0x7db3('0x11')](_0x59f903));_0x4430f4(_0x59f903);})[_0x7db3('0x15')](function(_0x2c64c4){logger[_0x7db3('0x12')]('CreateVoiceCallReport',_0x2c64c4[_0x7db3('0x14')],_0x43c28d);_0x5ecc77(_0x5c4241['error'](0x1f4,_0x2c64c4[_0x7db3('0x14')]));});});};exports[_0x7db3('0x20')]=function(_0x280bc4){var _0x199a85=this;return new Promise(function(_0x1d5a1a,_0x4483ff){return db[_0x7db3('0x1d')]['update'](_0x280bc4[_0x7db3('0x1f')],{'raw':_0x280bc4[_0x7db3('0x18')]?_0x280bc4[_0x7db3('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x280bc4[_0x7db3('0x18')]?_0x280bc4[_0x7db3('0x18')][_0x7db3('0x21')]||null:null,'attributes':_0x280bc4[_0x7db3('0x18')]?_0x280bc4[_0x7db3('0x18')][_0x7db3('0x19')]||null:null,'limit':_0x280bc4['options']?_0x280bc4['options'][_0x7db3('0x22')]||null:null})[_0x7db3('0xb')](function(_0x3943d3){logger[_0x7db3('0xc')](_0x7db3('0x20'),_0x280bc4);logger[_0x7db3('0xf')]('UpdateVoiceCallReport',_0x280bc4,JSON[_0x7db3('0x11')](_0x3943d3));_0x1d5a1a(_0x3943d3);})[_0x7db3('0x15')](function(_0xbbeb41){logger[_0x7db3('0x12')](_0x7db3('0x20'),_0xbbeb41[_0x7db3('0x14')],_0x280bc4);_0x4483ff(_0x199a85[_0x7db3('0x12')](0x1f4,_0xbbeb41['message']));});});};
\ No newline at end of file
+var _0x9773=['VoiceCallReport,\x20%s,\x20%s','request\x20sent','debug','VoiceCallReport,\x20%s,\x20%s,\x20%s','stringify','code','error','message','info','result','GetVoiceCallReport','VoiceCallReport','options','raw','limit','map','model','include','attributes','then','catch','CreateVoiceCallReport','create','UpdateVoiceCallReport','body','where','lodash','util','moment','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request'];(function(_0x5a95fa,_0x4a2fc9){var _0x1a61b8=function(_0x59f119){while(--_0x59f119){_0x5a95fa['push'](_0x5a95fa['shift']());}};_0x1a61b8(++_0x4a2fc9);}(_0x9773,0x1bc));var _0x3977=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x9773[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x3977('0x0'));var util=require(_0x3977('0x1'));var moment=require(_0x3977('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x3977('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x3977('0x4'));var logger=require(_0x3977('0x5'))(_0x3977('0x6'));var config=require(_0x3977('0x7'));var jayson=require(_0x3977('0x8'));var client=jayson[_0x3977('0x9')][_0x3977('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3761a7,_0x209502,_0x239a88){return new BPromise(function(_0x3ba4f6,_0x1b08b5){return client[_0x3977('0xb')](_0x3761a7,_0x239a88)['then'](function(_0x408e98){logger['info'](_0x3977('0xc'),_0x209502,_0x3977('0xd'));logger[_0x3977('0xe')](_0x3977('0xf'),_0x209502,_0x3977('0xd'),JSON[_0x3977('0x10')](_0x408e98));if(_0x408e98['error']){if(_0x408e98['error'][_0x3977('0x11')]===0x1f4){logger[_0x3977('0x12')]('VoiceCallReport,\x20%s,\x20%s',_0x209502,_0x408e98[_0x3977('0x12')][_0x3977('0x13')]);return _0x1b08b5(_0x408e98['error'][_0x3977('0x13')]);}logger['error']('VoiceCallReport,\x20%s,\x20%s',_0x209502,_0x408e98[_0x3977('0x12')]['message']);return _0x3ba4f6(_0x408e98['error'][_0x3977('0x13')]);}else{logger[_0x3977('0x14')](_0x3977('0xc'),_0x209502,_0x3977('0xd'));_0x3ba4f6(_0x408e98[_0x3977('0x15')][_0x3977('0x13')]);}})['catch'](function(_0x3cd4ef){logger[_0x3977('0x12')]('VoiceCallReport,\x20%s,\x20%s',_0x209502,_0x3cd4ef);_0x1b08b5(_0x3cd4ef);});});}exports[_0x3977('0x16')]=function(_0x54835d){var _0x378aed=this;return new Promise(function(_0x402b32,_0x130816){return db[_0x3977('0x17')]['findAll']({'raw':_0x54835d[_0x3977('0x18')]?_0x54835d[_0x3977('0x18')][_0x3977('0x19')]===undefined?!![]:![]:!![],'where':_0x54835d['options']?_0x54835d[_0x3977('0x18')]['where']||null:null,'attributes':_0x54835d[_0x3977('0x18')]?_0x54835d['options']['attributes']||null:null,'limit':_0x54835d[_0x3977('0x18')]?_0x54835d['options'][_0x3977('0x1a')]||null:null,'include':_0x54835d[_0x3977('0x18')]?_0x54835d[_0x3977('0x18')]['include']?_[_0x3977('0x1b')](_0x54835d['options']['include'],function(_0x18a91a){return{'model':db[_0x18a91a[_0x3977('0x1c')]],'as':_0x18a91a['as'],'attributes':_0x18a91a['attributes'],'include':_0x18a91a[_0x3977('0x1d')]?_[_0x3977('0x1b')](_0x18a91a[_0x3977('0x1d')],function(_0x23f2d6){return{'model':db[_0x23f2d6[_0x3977('0x1c')]],'as':_0x23f2d6['as'],'attributes':_0x23f2d6[_0x3977('0x1e')],'include':_0x23f2d6[_0x3977('0x1d')]?_[_0x3977('0x1b')](_0x23f2d6[_0x3977('0x1d')],function(_0xa59838){return{'model':db[_0xa59838['model']],'as':_0xa59838['as'],'attributes':_0xa59838[_0x3977('0x1e')]};}):[]};}):[]};}):[]:[]})[_0x3977('0x1f')](function(_0x275b28){logger['info'](_0x3977('0x16'),_0x54835d);logger[_0x3977('0xe')](_0x3977('0x16'),_0x54835d,JSON[_0x3977('0x10')](_0x275b28));_0x402b32(_0x275b28);})[_0x3977('0x20')](function(_0x42d99a){logger[_0x3977('0x12')](_0x3977('0x16'),_0x42d99a['message'],_0x54835d);_0x130816(_0x378aed[_0x3977('0x12')](0x1f4,_0x42d99a[_0x3977('0x13')]));});});};exports[_0x3977('0x21')]=function(_0x5e30bd){var _0x26213a=this;return new Promise(function(_0x2dd380,_0x282e66){return db[_0x3977('0x17')][_0x3977('0x22')](_0x5e30bd['body'],{'raw':_0x5e30bd[_0x3977('0x18')]?_0x5e30bd[_0x3977('0x18')][_0x3977('0x19')]===undefined?!![]:![]:!![]})[_0x3977('0x1f')](function(_0x3e898b){logger[_0x3977('0x14')](_0x3977('0x21'),_0x5e30bd);logger['debug'](_0x3977('0x21'),_0x5e30bd,JSON[_0x3977('0x10')](_0x3e898b));_0x2dd380(_0x3e898b);})['catch'](function(_0x53e083){logger[_0x3977('0x12')]('CreateVoiceCallReport',_0x53e083[_0x3977('0x13')],_0x5e30bd);_0x282e66(_0x26213a['error'](0x1f4,_0x53e083['message']));});});};exports[_0x3977('0x23')]=function(_0x468efe){var _0x4b178f=this;return new Promise(function(_0x37993a,_0x127934){return db[_0x3977('0x17')]['update'](_0x468efe[_0x3977('0x24')],{'raw':_0x468efe['options']?_0x468efe[_0x3977('0x18')][_0x3977('0x19')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x468efe[_0x3977('0x18')]?_0x468efe[_0x3977('0x18')][_0x3977('0x25')]||null:null,'attributes':_0x468efe[_0x3977('0x18')]?_0x468efe[_0x3977('0x18')]['attributes']||null:null,'limit':_0x468efe[_0x3977('0x18')]?_0x468efe[_0x3977('0x18')][_0x3977('0x1a')]||null:null})['then'](function(_0x48384e){logger['info']('UpdateVoiceCallReport',_0x468efe);logger[_0x3977('0xe')](_0x3977('0x23'),_0x468efe,JSON[_0x3977('0x10')](_0x48384e));_0x37993a(_0x48384e);})[_0x3977('0x20')](function(_0xdc992c){logger[_0x3977('0x12')](_0x3977('0x23'),_0xdc992c[_0x3977('0x13')],_0x468efe);_0x127934(_0x4b178f[_0x3977('0x12')](0x1f4,_0xdc992c[_0x3977('0x13')]));});});};
\ No newline at end of file
index 5683742..9af7420 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8344=['get','isAuthenticated','index','post','create','update','delete','exports','multer','util','path','connect-timeout','../../components/auth/service','../../components/interaction/service'];(function(_0x4b4a7c,_0x3fdf80){var _0x45c504=function(_0x556019){while(--_0x556019){_0x4b4a7c['push'](_0x4b4a7c['shift']());}};_0x45c504(++_0x3fdf80);}(_0x8344,0x1d6));var _0x4834=function(_0x1a2f70,_0x476c9b){_0x1a2f70=_0x1a2f70-0x0;var _0x3c135d=_0x8344[_0x1a2f70];return _0x3c135d;};'use strict';var multer=require(_0x4834('0x0'));var util=require(_0x4834('0x1'));var path=require(_0x4834('0x2'));var timeout=require(_0x4834('0x3'));var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require(_0x4834('0x4'));var interaction=require(_0x4834('0x5'));var config=require('../../config/environment');var controller=require('./voiceChanSpy.controller');router[_0x4834('0x6')]('/',auth[_0x4834('0x7')](),controller[_0x4834('0x8')]);router[_0x4834('0x6')]('/:id',auth[_0x4834('0x7')](),controller['show']);router[_0x4834('0x9')]('/',auth[_0x4834('0x7')](),controller[_0x4834('0xa')]);router['put']('/:id',auth[_0x4834('0x7')](),controller[_0x4834('0xb')]);router[_0x4834('0xc')]('/:id',auth[_0x4834('0x7')](),controller['destroy']);module[_0x4834('0xd')]=router;
\ No newline at end of file
+var _0xfa16=['exports','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./voiceChanSpy.controller','isAuthenticated','index','get','/:id','show','post','create','put','update','delete','destroy'];(function(_0x2f9726,_0x256a31){var _0x49ba24=function(_0x5845d7){while(--_0x5845d7){_0x2f9726['push'](_0x2f9726['shift']());}};_0x49ba24(++_0x256a31);}(_0xfa16,0x12d));var _0x6fa1=function(_0x4b0ed8,_0x1f2b83){_0x4b0ed8=_0x4b0ed8-0x0;var _0x879519=_0xfa16[_0x4b0ed8];return _0x879519;};'use strict';var multer=require('multer');var util=require(_0x6fa1('0x0'));var path=require('path');var timeout=require(_0x6fa1('0x1'));var express=require(_0x6fa1('0x2'));var router=express[_0x6fa1('0x3')]();var fs_extra=require(_0x6fa1('0x4'));var auth=require(_0x6fa1('0x5'));var interaction=require(_0x6fa1('0x6'));var config=require('../../config/environment');var controller=require(_0x6fa1('0x7'));router['get']('/',auth[_0x6fa1('0x8')](),controller[_0x6fa1('0x9')]);router[_0x6fa1('0xa')](_0x6fa1('0xb'),auth[_0x6fa1('0x8')](),controller[_0x6fa1('0xc')]);router[_0x6fa1('0xd')]('/',auth[_0x6fa1('0x8')](),controller[_0x6fa1('0xe')]);router[_0x6fa1('0xf')]('/:id',auth[_0x6fa1('0x8')](),controller[_0x6fa1('0x10')]);router[_0x6fa1('0x11')](_0x6fa1('0xb'),auth[_0x6fa1('0x8')](),controller[_0x6fa1('0x12')]);module[_0x6fa1('0x13')]=router;
\ No newline at end of file
index 2c1d4b0..9ed3df2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x76a6=['STRING','name','setDataValue','options','join','getDataValue','BOOLEAN','exports'];(function(_0xb873ef,_0x584835){var _0x9d9fff=function(_0x29982e){while(--_0x29982e){_0xb873ef['push'](_0xb873ef['shift']());}};_0x9d9fff(++_0x584835);}(_0x76a6,0x7f));var _0x676a=function(_0xe6f4ef,_0x4e34cc){_0xe6f4ef=_0xe6f4ef-0x0;var _0x4f3447=_0x76a6[_0xe6f4ef];return _0x4f3447;};'use strict';var Sequelize=require('sequelize');module[_0x676a('0x0')]={'name':{'type':Sequelize[_0x676a('0x1')]},'prefix':{'type':Sequelize[_0x676a('0x1')],'unique':_0x676a('0x2'),'allowNull':![]},'options':{'type':Sequelize[_0x676a('0x1')],'set':function(_0x3c374f){this[_0x676a('0x3')](_0x676a('0x4'),_0x3c374f?_0x3c374f[_0x676a('0x5')](''):[]);},'get':function(){return this[_0x676a('0x6')](_0x676a('0x4'))?this['getDataValue']('options')['split'](''):[];}},'auth':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'password':{'type':Sequelize['STRING']},'record':{'type':Sequelize[_0x676a('0x7')],'defaultValue':![]},'recordingFormat':{'type':Sequelize[_0x676a('0x1')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
+var _0x4d24=['join','getDataValue','split','BOOLEAN','exports','STRING','setDataValue','options'];(function(_0x5c3ae9,_0x450f9a){var _0x3f5950=function(_0x594c1f){while(--_0x594c1f){_0x5c3ae9['push'](_0x5c3ae9['shift']());}};_0x3f5950(++_0x450f9a);}(_0x4d24,0x17c));var _0x44d2=function(_0x1d5913,_0x1fc39d){_0x1d5913=_0x1d5913-0x0;var _0x2f5e0a=_0x4d24[_0x1d5913];return _0x2f5e0a;};'use strict';var Sequelize=require('sequelize');module[_0x44d2('0x0')]={'name':{'type':Sequelize[_0x44d2('0x1')]},'prefix':{'type':Sequelize[_0x44d2('0x1')],'unique':'name','allowNull':![]},'options':{'type':Sequelize[_0x44d2('0x1')],'set':function(_0x55b273){this[_0x44d2('0x2')](_0x44d2('0x3'),_0x55b273?_0x55b273[_0x44d2('0x4')](''):[]);},'get':function(){return this[_0x44d2('0x5')](_0x44d2('0x3'))?this[_0x44d2('0x5')]('options')[_0x44d2('0x6')](''):[];}},'auth':{'type':Sequelize[_0x44d2('0x7')],'defaultValue':![]},'password':{'type':Sequelize[_0x44d2('0x1')]},'record':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'recordingFormat':{'type':Sequelize[_0x44d2('0x1')]},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 6d5f789..485f31c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x22a4=['intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','findAll','rows','catch','params','keys','create','body','user','role','UserProfileSection','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','find','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','save','update','destroy','then','get','ChanSpies','UserProfileResource','sendStatus','error','stack','send','map','VoiceChanSpy','rawAttributes','fieldName','type','key','model','name','query','filters'];(function(_0x4490f3,_0x151302){var _0x4a4e46=function(_0x5d5b22){while(--_0x5d5b22){_0x4490f3['push'](_0x4490f3['shift']());}};_0x4a4e46(++_0x151302);}(_0x22a4,0x1cb));var _0x422a=function(_0x529196,_0x521008){_0x529196=_0x529196-0x0;var _0x1b84ae=_0x22a4[_0x529196];return _0x1b84ae;};'use strict';var emlformat=require(_0x422a('0x0'));var rimraf=require(_0x422a('0x1'));var zipdir=require(_0x422a('0x2'));var jsonpatch=require(_0x422a('0x3'));var rp=require(_0x422a('0x4'));var moment=require(_0x422a('0x5'));var BPromise=require(_0x422a('0x6'));var Mustache=require(_0x422a('0x7'));var util=require('util');var path=require(_0x422a('0x8'));var sox=require(_0x422a('0x9'));var csv=require(_0x422a('0xa'));var ejs=require(_0x422a('0xb'));var fs=require('fs');var fs_extra=require(_0x422a('0xc'));var _=require('lodash');var squel=require(_0x422a('0xd'));var crypto=require(_0x422a('0xe'));var jsforce=require(_0x422a('0xf'));var deskjs=require(_0x422a('0x10'));var toCsv=require(_0x422a('0xa'));var querystring=require(_0x422a('0x11'));var Papa=require(_0x422a('0x12'));var Redis=require(_0x422a('0x13'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require(_0x422a('0x14'));var hardwareService=require(_0x422a('0x15'));var logger=require(_0x422a('0x16'))(_0x422a('0x17'));var utils=require(_0x422a('0x18'));var config=require(_0x422a('0x19'));var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xebe70d,_0x4dbed1){_0x4dbed1=_0x4dbed1||0xcc;return function(_0x5a0c59){if(_0x5a0c59){return _0xebe70d['sendStatus'](_0x4dbed1);}return _0xebe70d[_0x422a('0x1a')](_0x4dbed1)[_0x422a('0x1b')]();};}function respondWithResult(_0x11af1f,_0x2dc9b2){_0x2dc9b2=_0x2dc9b2||0xc8;return function(_0x147af5){if(_0x147af5){return _0x11af1f[_0x422a('0x1a')](_0x2dc9b2)[_0x422a('0x1c')](_0x147af5);}};}function respondWithFilteredResult(_0x3504bb,_0xf9fcf7){return function(_0x2ba53b){if(_0x2ba53b){var _0x30b6e9=typeof _0xf9fcf7[_0x422a('0x1d')]===_0x422a('0x1e')&&typeof _0xf9fcf7[_0x422a('0x1f')]===_0x422a('0x1e');var _0x2e8163=_0x2ba53b[_0x422a('0x20')];var _0x5e2507=_0x30b6e9?0x0:_0xf9fcf7[_0x422a('0x1d')];var _0x3c5d86=_0x30b6e9?_0x2ba53b['count']:_0xf9fcf7[_0x422a('0x1d')]+_0xf9fcf7['limit'];var _0x552048;if(_0x3c5d86>=_0x2e8163){_0x3c5d86=_0x2e8163;_0x552048=0xc8;}else{_0x552048=0xce;}_0x3504bb[_0x422a('0x1a')](_0x552048);return _0x3504bb[_0x422a('0x21')](_0x422a('0x22'),_0x5e2507+'-'+_0x3c5d86+'/'+_0x2e8163)[_0x422a('0x1c')](_0x2ba53b);}return null;};}function patchUpdates(_0x194c25){return function(_0x5f9720){try{jsonpatch[_0x422a('0x23')](_0x5f9720,_0x194c25,!![]);}catch(_0x26922a){return BPromise['reject'](_0x26922a);}return _0x5f9720[_0x422a('0x24')]();};}function saveUpdates(_0x3284ed,_0x211d93){return function(_0x3d3213){if(_0x3d3213){return _0x3d3213[_0x422a('0x25')](_0x3284ed)['then'](function(_0x837c81){return _0x837c81;});}return null;};}function removeEntity(_0x33bc88,_0x6e209d){return function(_0x5e3138){if(_0x5e3138){return _0x5e3138[_0x422a('0x26')]()[_0x422a('0x27')](function(){var _0x1fd126=_0x5e3138[_0x422a('0x28')]({'plain':!![]});var _0xfc8699=_0x422a('0x29');return db[_0x422a('0x2a')][_0x422a('0x26')]({'where':{'type':_0xfc8699,'resourceId':_0x1fd126['id']}})['then'](function(){return _0x5e3138;});})[_0x422a('0x27')](function(){_0x33bc88[_0x422a('0x1a')](0xcc)['end']();});}};}function handleEntityNotFound(_0x83cb4d,_0x49d75f){return function(_0x1b88ae){if(!_0x1b88ae){_0x83cb4d[_0x422a('0x2b')](0x194);}return _0x1b88ae;};}function handleError(_0x3c2e5b,_0x24b6ec){_0x24b6ec=_0x24b6ec||0x1f4;return function(_0x4badf8){logger[_0x422a('0x2c')](_0x4badf8[_0x422a('0x2d')]);if(_0x4badf8['name']){delete _0x4badf8['name'];}_0x3c2e5b[_0x422a('0x1a')](_0x24b6ec)[_0x422a('0x2e')](_0x4badf8);};}exports['index']=function(_0x494226,_0x4903d1){var _0x56c732={},_0x48fc3a={},_0x3c6a84={'count':0x0,'rows':[]};var _0x2fd9f8=_[_0x422a('0x2f')](db[_0x422a('0x30')][_0x422a('0x31')],function(_0x5cadc6){return{'name':_0x5cadc6[_0x422a('0x32')],'type':_0x5cadc6[_0x422a('0x33')][_0x422a('0x34')]};});_0x48fc3a[_0x422a('0x35')]=_[_0x422a('0x2f')](_0x2fd9f8,_0x422a('0x36'));_0x48fc3a[_0x422a('0x37')]=_['keys'](_0x494226[_0x422a('0x37')]);_0x48fc3a[_0x422a('0x38')]=_[_0x422a('0x39')](_0x48fc3a[_0x422a('0x35')],_0x48fc3a['query']);_0x56c732[_0x422a('0x3a')]=_['intersection'](_0x48fc3a[_0x422a('0x35')],qs[_0x422a('0x3b')](_0x494226['query'][_0x422a('0x3b')]));_0x56c732[_0x422a('0x3a')]=_0x56c732['attributes'][_0x422a('0x3c')]?_0x56c732[_0x422a('0x3a')]:_0x48fc3a[_0x422a('0x35')];if(!_0x494226[_0x422a('0x37')][_0x422a('0x3d')](_0x422a('0x3e'))){_0x56c732[_0x422a('0x1f')]=qs[_0x422a('0x1f')](_0x494226['query']['limit']);_0x56c732[_0x422a('0x1d')]=qs[_0x422a('0x1d')](_0x494226[_0x422a('0x37')]['offset']);}_0x56c732[_0x422a('0x3f')]=qs[_0x422a('0x40')](_0x494226['query']['sort']);_0x56c732[_0x422a('0x41')]=qs['filters'](_[_0x422a('0x42')](_0x494226[_0x422a('0x37')],_0x48fc3a[_0x422a('0x38')]),_0x2fd9f8);if(_0x494226['query'][_0x422a('0x43')]){_0x56c732[_0x422a('0x41')]=_[_0x422a('0x44')](_0x56c732['where'],{'$or':_['map'](_0x2fd9f8,function(_0x3a9a15){if(_0x3a9a15[_0x422a('0x33')]!==_0x422a('0x45')){var _0x5b3639={};_0x5b3639[_0x3a9a15[_0x422a('0x36')]]={'$like':'%'+_0x494226[_0x422a('0x37')][_0x422a('0x43')]+'%'};return _0x5b3639;}})});}_0x56c732=_[_0x422a('0x44')]({},_0x56c732,_0x494226[_0x422a('0x46')]);var _0x590c9b={'where':_0x56c732[_0x422a('0x41')]};return db[_0x422a('0x30')][_0x422a('0x20')](_0x590c9b)[_0x422a('0x27')](function(_0xfd39fa){_0x3c6a84['count']=_0xfd39fa;if(_0x494226['query'][_0x422a('0x47')]){_0x56c732['include']=[{'all':!![]}];}return db[_0x422a('0x30')][_0x422a('0x48')](_0x56c732);})[_0x422a('0x27')](function(_0x10302c){_0x3c6a84[_0x422a('0x49')]=_0x10302c;return _0x3c6a84;})[_0x422a('0x27')](respondWithFilteredResult(_0x4903d1,_0x56c732))[_0x422a('0x4a')](handleError(_0x4903d1,null));};exports['show']=function(_0x4070eb,_0x40faa7){var _0x2d456a={'raw':![],'where':{'id':_0x4070eb[_0x422a('0x4b')]['id']}},_0x29b102={};_0x29b102[_0x422a('0x35')]=_[_0x422a('0x4c')](db['VoiceChanSpy'][_0x422a('0x31')]);_0x29b102[_0x422a('0x37')]=_['keys'](_0x4070eb[_0x422a('0x37')]);_0x29b102[_0x422a('0x38')]=_[_0x422a('0x39')](_0x29b102[_0x422a('0x35')],_0x29b102[_0x422a('0x37')]);_0x2d456a[_0x422a('0x3a')]=_[_0x422a('0x39')](_0x29b102['model'],qs[_0x422a('0x3b')](_0x4070eb[_0x422a('0x37')][_0x422a('0x3b')]));_0x2d456a[_0x422a('0x3a')]=_0x2d456a[_0x422a('0x3a')][_0x422a('0x3c')]?_0x2d456a[_0x422a('0x3a')]:_0x29b102[_0x422a('0x35')];if(_0x4070eb[_0x422a('0x37')][_0x422a('0x47')]){_0x2d456a['include']=[{'all':!![]}];}_0x2d456a=_['merge']({},_0x2d456a,_0x4070eb[_0x422a('0x46')]);return db[_0x422a('0x30')]['find'](_0x2d456a)[_0x422a('0x27')](handleEntityNotFound(_0x40faa7,null))[_0x422a('0x27')](respondWithResult(_0x40faa7,null))[_0x422a('0x4a')](handleError(_0x40faa7,null));};exports[_0x422a('0x4d')]=function(_0x706497,_0x792783){return db[_0x422a('0x30')][_0x422a('0x4d')](_0x706497[_0x422a('0x4e')],{})[_0x422a('0x27')](function(_0x5c9921){var _0x565c6f=_0x706497[_0x422a('0x4f')][_0x422a('0x28')]({'plain':!![]});if(!_0x565c6f)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x565c6f[_0x422a('0x50')]===_0x422a('0x4f')){var _0x20b4d3=_0x5c9921[_0x422a('0x28')]({'plain':!![]});var _0x111e64=_0x422a('0x29');return db[_0x422a('0x51')]['find']({'where':{'name':_0x111e64,'userProfileId':_0x565c6f[_0x422a('0x52')]},'raw':!![]})[_0x422a('0x27')](function(_0xf234d){if(_0xf234d&&_0xf234d[_0x422a('0x53')]===0x0){return db[_0x422a('0x2a')][_0x422a('0x4d')]({'name':_0x20b4d3['name'],'resourceId':_0x20b4d3['id'],'type':_0xf234d['name'],'sectionId':_0xf234d['id']},{})[_0x422a('0x27')](function(){return _0x5c9921;});}else{return _0x5c9921;}})[_0x422a('0x4a')](function(_0x1ff3ad){logger[_0x422a('0x2c')](_0x422a('0x54'),_0x1ff3ad);throw _0x1ff3ad;});}return _0x5c9921;})[_0x422a('0x27')](respondWithResult(_0x792783,0xc9))[_0x422a('0x4a')](handleError(_0x792783,null));};exports[_0x422a('0x25')]=function(_0x445f7c,_0x5211ff){if(_0x445f7c['body']['id']){delete _0x445f7c['body']['id'];}return db[_0x422a('0x30')][_0x422a('0x55')]({'where':{'id':_0x445f7c[_0x422a('0x4b')]['id']}})[_0x422a('0x27')](handleEntityNotFound(_0x5211ff,null))['then'](saveUpdates(_0x445f7c[_0x422a('0x4e')],null))[_0x422a('0x27')](respondWithResult(_0x5211ff,null))[_0x422a('0x4a')](handleError(_0x5211ff,null));};exports[_0x422a('0x26')]=function(_0x1bc3c6,_0x1f2834){return db['VoiceChanSpy']['find']({'where':{'id':_0x1bc3c6[_0x422a('0x4b')]['id']}})[_0x422a('0x27')](handleEntityNotFound(_0x1f2834,null))[_0x422a('0x27')](removeEntity(_0x1f2834,null))['catch'](handleError(_0x1f2834,null));};
\ No newline at end of file
+var _0x9090=['then','destroy','get','ChanSpies','UserProfileResource','error','name','send','index','map','VoiceChanSpy','fieldName','type','key','model','query','keys','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filters','pick','VIRTUAL','filter','merge','options','count','includeAll','findAll','rows','catch','show','include','find','create','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','params','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','mustache','util','path','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','Content-Range','apply','reject','save','update'];(function(_0x4cbbdb,_0x3b3fa7){var _0x1840f1=function(_0x4082e3){while(--_0x4082e3){_0x4cbbdb['push'](_0x4cbbdb['shift']());}};_0x1840f1(++_0x3b3fa7);}(_0x9090,0x17f));var _0x0909=function(_0x564b56,_0x33a602){_0x564b56=_0x564b56-0x0;var _0x153222=_0x9090[_0x564b56];return _0x153222;};'use strict';var emlformat=require(_0x0909('0x0'));var rimraf=require(_0x0909('0x1'));var zipdir=require(_0x0909('0x2'));var jsonpatch=require(_0x0909('0x3'));var rp=require(_0x0909('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require(_0x0909('0x5'));var util=require(_0x0909('0x6'));var path=require(_0x0909('0x7'));var sox=require('sox');var csv=require(_0x0909('0x8'));var ejs=require(_0x0909('0x9'));var fs=require('fs');var fs_extra=require(_0x0909('0xa'));var _=require(_0x0909('0xb'));var squel=require(_0x0909('0xc'));var crypto=require(_0x0909('0xd'));var jsforce=require(_0x0909('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x0909('0x8'));var querystring=require(_0x0909('0xf'));var Papa=require('papaparse');var Redis=require(_0x0909('0x10'));var authService=require('../../components/auth/service');var qs=require(_0x0909('0x11'));var as=require(_0x0909('0x12'));var hardwareService=require(_0x0909('0x13'));var logger=require(_0x0909('0x14'))('api');var utils=require(_0x0909('0x15'));var config=require(_0x0909('0x16'));var licenseUtil=require(_0x0909('0x17'));var db=require(_0x0909('0x18'))['db'];function respondWithStatusCode(_0x4e900a,_0x32f71a){_0x32f71a=_0x32f71a||0xcc;return function(_0x18c223){if(_0x18c223){return _0x4e900a[_0x0909('0x19')](_0x32f71a);}return _0x4e900a[_0x0909('0x1a')](_0x32f71a)[_0x0909('0x1b')]();};}function respondWithResult(_0xad78e9,_0x3bdd30){_0x3bdd30=_0x3bdd30||0xc8;return function(_0x1811da){if(_0x1811da){return _0xad78e9[_0x0909('0x1a')](_0x3bdd30)[_0x0909('0x1c')](_0x1811da);}};}function respondWithFilteredResult(_0x48ee40,_0x2c5892){return function(_0x1eb8be){if(_0x1eb8be){var _0x96edb6=typeof _0x2c5892[_0x0909('0x1d')]===_0x0909('0x1e')&&typeof _0x2c5892[_0x0909('0x1f')]===_0x0909('0x1e');var _0x14e44c=_0x1eb8be['count'];var _0x3a7089=_0x96edb6?0x0:_0x2c5892[_0x0909('0x1d')];var _0x14976d=_0x96edb6?_0x1eb8be['count']:_0x2c5892[_0x0909('0x1d')]+_0x2c5892[_0x0909('0x1f')];var _0x11455d;if(_0x14976d>=_0x14e44c){_0x14976d=_0x14e44c;_0x11455d=0xc8;}else{_0x11455d=0xce;}_0x48ee40['status'](_0x11455d);return _0x48ee40['set'](_0x0909('0x20'),_0x3a7089+'-'+_0x14976d+'/'+_0x14e44c)['json'](_0x1eb8be);}return null;};}function patchUpdates(_0xf0efcb){return function(_0x2ccf21){try{jsonpatch[_0x0909('0x21')](_0x2ccf21,_0xf0efcb,!![]);}catch(_0x3037c1){return BPromise[_0x0909('0x22')](_0x3037c1);}return _0x2ccf21[_0x0909('0x23')]();};}function saveUpdates(_0x4eec68,_0x46b384){return function(_0x519c9f){if(_0x519c9f){return _0x519c9f[_0x0909('0x24')](_0x4eec68)[_0x0909('0x25')](function(_0x2ea745){return _0x2ea745;});}return null;};}function removeEntity(_0x3e71b9,_0x332b07){return function(_0x510ba6){if(_0x510ba6){return _0x510ba6[_0x0909('0x26')]()[_0x0909('0x25')](function(){var _0x4503db=_0x510ba6[_0x0909('0x27')]({'plain':!![]});var _0xc879d8=_0x0909('0x28');return db[_0x0909('0x29')][_0x0909('0x26')]({'where':{'type':_0xc879d8,'resourceId':_0x4503db['id']}})[_0x0909('0x25')](function(){return _0x510ba6;});})[_0x0909('0x25')](function(){_0x3e71b9['status'](0xcc)[_0x0909('0x1b')]();});}};}function handleEntityNotFound(_0x4c57c6,_0x48f73f){return function(_0x387f4d){if(!_0x387f4d){_0x4c57c6[_0x0909('0x19')](0x194);}return _0x387f4d;};}function handleError(_0x482587,_0x34f7b9){_0x34f7b9=_0x34f7b9||0x1f4;return function(_0x33ce47){logger[_0x0909('0x2a')](_0x33ce47['stack']);if(_0x33ce47[_0x0909('0x2b')]){delete _0x33ce47[_0x0909('0x2b')];}_0x482587[_0x0909('0x1a')](_0x34f7b9)[_0x0909('0x2c')](_0x33ce47);};}exports[_0x0909('0x2d')]=function(_0x5470e4,_0x1bd9ae){var _0x569ef9={},_0x250fd0={},_0x2fd839={'count':0x0,'rows':[]};var _0x4b6805=_[_0x0909('0x2e')](db[_0x0909('0x2f')]['rawAttributes'],function(_0x3c53ce){return{'name':_0x3c53ce[_0x0909('0x30')],'type':_0x3c53ce[_0x0909('0x31')][_0x0909('0x32')]};});_0x250fd0[_0x0909('0x33')]=_['map'](_0x4b6805,_0x0909('0x2b'));_0x250fd0[_0x0909('0x34')]=_[_0x0909('0x35')](_0x5470e4[_0x0909('0x34')]);_0x250fd0['filters']=_[_0x0909('0x36')](_0x250fd0[_0x0909('0x33')],_0x250fd0[_0x0909('0x34')]);_0x569ef9[_0x0909('0x37')]=_[_0x0909('0x36')](_0x250fd0[_0x0909('0x33')],qs[_0x0909('0x38')](_0x5470e4['query']['fields']));_0x569ef9[_0x0909('0x37')]=_0x569ef9[_0x0909('0x37')][_0x0909('0x39')]?_0x569ef9[_0x0909('0x37')]:_0x250fd0[_0x0909('0x33')];if(!_0x5470e4['query'][_0x0909('0x3a')]('nolimit')){_0x569ef9[_0x0909('0x1f')]=qs[_0x0909('0x1f')](_0x5470e4[_0x0909('0x34')][_0x0909('0x1f')]);_0x569ef9[_0x0909('0x1d')]=qs['offset'](_0x5470e4[_0x0909('0x34')]['offset']);}_0x569ef9[_0x0909('0x3b')]=qs[_0x0909('0x3c')](_0x5470e4[_0x0909('0x34')][_0x0909('0x3c')]);_0x569ef9[_0x0909('0x3d')]=qs[_0x0909('0x3e')](_[_0x0909('0x3f')](_0x5470e4[_0x0909('0x34')],_0x250fd0[_0x0909('0x3e')]),_0x4b6805);if(_0x5470e4[_0x0909('0x34')]['filter']){_0x569ef9[_0x0909('0x3d')]=_['merge'](_0x569ef9[_0x0909('0x3d')],{'$or':_['map'](_0x4b6805,function(_0x1b78fa){if(_0x1b78fa[_0x0909('0x31')]!==_0x0909('0x40')){var _0xeda5de={};_0xeda5de[_0x1b78fa[_0x0909('0x2b')]]={'$like':'%'+_0x5470e4[_0x0909('0x34')][_0x0909('0x41')]+'%'};return _0xeda5de;}})});}_0x569ef9=_[_0x0909('0x42')]({},_0x569ef9,_0x5470e4[_0x0909('0x43')]);var _0x57f18b={'where':_0x569ef9[_0x0909('0x3d')]};return db['VoiceChanSpy'][_0x0909('0x44')](_0x57f18b)['then'](function(_0x347bde){_0x2fd839[_0x0909('0x44')]=_0x347bde;if(_0x5470e4[_0x0909('0x34')][_0x0909('0x45')]){_0x569ef9['include']=[{'all':!![]}];}return db[_0x0909('0x2f')][_0x0909('0x46')](_0x569ef9);})[_0x0909('0x25')](function(_0x3e808e){_0x2fd839[_0x0909('0x47')]=_0x3e808e;return _0x2fd839;})['then'](respondWithFilteredResult(_0x1bd9ae,_0x569ef9))[_0x0909('0x48')](handleError(_0x1bd9ae,null));};exports[_0x0909('0x49')]=function(_0x4a55f7,_0x339857){var _0x587477={'raw':![],'where':{'id':_0x4a55f7['params']['id']}},_0x2dc419={};_0x2dc419['model']=_[_0x0909('0x35')](db[_0x0909('0x2f')]['rawAttributes']);_0x2dc419['query']=_[_0x0909('0x35')](_0x4a55f7['query']);_0x2dc419[_0x0909('0x3e')]=_[_0x0909('0x36')](_0x2dc419['model'],_0x2dc419['query']);_0x587477['attributes']=_[_0x0909('0x36')](_0x2dc419[_0x0909('0x33')],qs[_0x0909('0x38')](_0x4a55f7[_0x0909('0x34')]['fields']));_0x587477[_0x0909('0x37')]=_0x587477[_0x0909('0x37')][_0x0909('0x39')]?_0x587477[_0x0909('0x37')]:_0x2dc419['model'];if(_0x4a55f7['query'][_0x0909('0x45')]){_0x587477[_0x0909('0x4a')]=[{'all':!![]}];}_0x587477=_[_0x0909('0x42')]({},_0x587477,_0x4a55f7[_0x0909('0x43')]);return db[_0x0909('0x2f')][_0x0909('0x4b')](_0x587477)[_0x0909('0x25')](handleEntityNotFound(_0x339857,null))[_0x0909('0x25')](respondWithResult(_0x339857,null))['catch'](handleError(_0x339857,null));};exports[_0x0909('0x4c')]=function(_0x2eaf27,_0x5e8f34){return db[_0x0909('0x2f')]['create'](_0x2eaf27[_0x0909('0x4d')],{})[_0x0909('0x25')](function(_0x1de467){var _0x1b3f7c=_0x2eaf27[_0x0909('0x4e')][_0x0909('0x27')]({'plain':!![]});if(!_0x1b3f7c)throw new Error(_0x0909('0x4f'));if(_0x1b3f7c['role']===_0x0909('0x4e')){var _0x253884=_0x1de467[_0x0909('0x27')]({'plain':!![]});var _0x3ca8cf=_0x0909('0x28');return db[_0x0909('0x50')]['find']({'where':{'name':_0x3ca8cf,'userProfileId':_0x1b3f7c[_0x0909('0x51')]},'raw':!![]})['then'](function(_0x47adaf){if(_0x47adaf&&_0x47adaf['autoAssociation']===0x0){return db['UserProfileResource'][_0x0909('0x4c')]({'name':_0x253884[_0x0909('0x2b')],'resourceId':_0x253884['id'],'type':_0x47adaf['name'],'sectionId':_0x47adaf['id']},{})['then'](function(){return _0x1de467;});}else{return _0x1de467;}})[_0x0909('0x48')](function(_0x14b649){logger[_0x0909('0x2a')](_0x0909('0x52'),_0x14b649);throw _0x14b649;});}return _0x1de467;})[_0x0909('0x25')](respondWithResult(_0x5e8f34,0xc9))[_0x0909('0x48')](handleError(_0x5e8f34,null));};exports[_0x0909('0x24')]=function(_0x3502b6,_0x5c1122){if(_0x3502b6['body']['id']){delete _0x3502b6[_0x0909('0x4d')]['id'];}return db['VoiceChanSpy']['find']({'where':{'id':_0x3502b6[_0x0909('0x53')]['id']}})[_0x0909('0x25')](handleEntityNotFound(_0x5c1122,null))[_0x0909('0x25')](saveUpdates(_0x3502b6[_0x0909('0x4d')],null))[_0x0909('0x25')](respondWithResult(_0x5c1122,null))[_0x0909('0x48')](handleError(_0x5c1122,null));};exports[_0x0909('0x26')]=function(_0xe430a2,_0x1f7c1b){return db[_0x0909('0x2f')]['find']({'where':{'id':_0xe430a2[_0x0909('0x53')]['id']}})[_0x0909('0x25')](handleEntityNotFound(_0x1f7c1b,null))[_0x0909('0x25')](removeEntity(_0x1f7c1b,null))[_0x0909('0x48')](handleError(_0x1f7c1b,null));};
\ No newline at end of file
index c5afcd5..548ace0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x12e4=['util','bluebird','context','from-sip','format','%s%s','prefix','push','merge','Set','CDR(type)=%s','record','MixMonitor','${UNIQUEID}.%s,a','auth','Authenticate','password','ChanSpy','name','options','join','internal','concat','User','findAll','agent','then','exports','define','VoiceChanSpy','voice_chanspy','VoiceExtension','bulkCreate','destroy','length','catch'];(function(_0xa08526,_0xd2a376){var _0x2684eb=function(_0x2bfe3a){while(--_0x2bfe3a){_0xa08526['push'](_0xa08526['shift']());}};_0x2684eb(++_0xd2a376);}(_0x12e4,0x1d4));var _0x412e=function(_0x57ba3c,_0x49f04c){_0x57ba3c=_0x57ba3c-0x0;var _0x106183=_0x12e4[_0x57ba3c];return _0x106183;};'use strict';var _=require('lodash');var util=require(_0x412e('0x0'));var BPromise=require(_0x412e('0x1'));var attributes=require('./voiceChanSpy.attributes');var getUserApplications=function(_0x139a50,_0x4c7d01,_0x2de07f){var _0x5c2977=0x1;var _0x323084=[];var _0x5ecb51={'context':_0x4c7d01[_0x412e('0x2')]||_0x412e('0x3'),'exten':util[_0x412e('0x4')](_0x412e('0x5'),_0x139a50[_0x412e('0x6')],_0x2de07f),'type':'system','isApp':![],'ChanSpyId':_0x139a50['id'],'UserId':_0x4c7d01['id']};_0x323084[_0x412e('0x7')](_[_0x412e('0x8')]({'app':_0x412e('0x9'),'appdata':util[_0x412e('0x4')](_0x412e('0xa'),'chanspy'),'priority':_0x5c2977++},_0x5ecb51));if(_0x139a50[_0x412e('0xb')]){_0x323084['push'](_['merge']({'app':_0x412e('0xc'),'appdata':util[_0x412e('0x4')](_0x412e('0xd'),_0x139a50['recordingFormat']),'priority':_0x5c2977++},_0x5ecb51));}if(_0x139a50[_0x412e('0xe')]){_0x323084[_0x412e('0x7')](_[_0x412e('0x8')]({'app':_0x412e('0xf'),'appdata':_0x139a50[_0x412e('0x10')],'priority':_0x5c2977++},_0x5ecb51));}_0x323084[_0x412e('0x7')](_['merge']({'app':_0x412e('0x11'),'appdata':util[_0x412e('0x4')]('SIP/%s,%s',_0x4c7d01[_0x412e('0x12')],_0x139a50[_0x412e('0x13')]?_0x139a50[_0x412e('0x13')][_0x412e('0x14')](''):''),'priority':_0x5c2977++},_0x5ecb51));if(_0x139a50[_0x412e('0xb')]){_0x323084[_0x412e('0x7')](_[_0x412e('0x8')]({'app':'StopMixMonitor','priority':_0x5c2977++},_0x5ecb51));}return _0x323084;};var getChanSpyApplications=function(_0x1d4fc6,_0x2e0ac2){var _0x30e6da=[];for(var _0x59bfc8=0x0,_0x25618d=0x1;_0x59bfc8<_0x2e0ac2['length'];_0x59bfc8++,_0x25618d=0x1){_0x30e6da=_0x30e6da['concat'](getUserApplications(_0x1d4fc6,_0x2e0ac2[_0x59bfc8],_0x2e0ac2[_0x59bfc8][_0x412e('0x15')]));if(_0x2e0ac2[_0x59bfc8][_0x412e('0x15')]!=_0x2e0ac2[_0x59bfc8][_0x412e('0x12')]){_0x30e6da=_0x30e6da[_0x412e('0x16')](getUserApplications(_0x1d4fc6,_0x2e0ac2[_0x59bfc8],_0x2e0ac2[_0x59bfc8]['name']));}}return _0x30e6da;};var getChanSpyPromise=function(_0x11f9fc,_0x560cb5){return new BPromise(function(_0x2777f6,_0x5415bb){return _0x11f9fc[_0x412e('0x17')][_0x412e('0x18')]({'attributes':['id','name','internal'],'where':{'role':_0x412e('0x19'),'chanspy':!![]},'raw':!![]})[_0x412e('0x1a')](function(_0xd7fb8f){if(_0xd7fb8f){return _0x2777f6(getChanSpyApplications(_0x560cb5,_0xd7fb8f));}return _0x2777f6([]);})['catch'](function(_0x987e32){_0x5415bb(_0x987e32);});});};module[_0x412e('0x1b')]=function(_0x2a4b4e,_0x285a1a){var _0x1ad9b9=_0x2a4b4e['models'];return _0x2a4b4e[_0x412e('0x1c')](_0x412e('0x1d'),attributes,{'tableName':_0x412e('0x1e'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0xc00f4d,_0x4d876c,_0x1a6457){return getChanSpyPromise(_0x1ad9b9,_0xc00f4d)[_0x412e('0x1a')](function(_0x3a1a23){if(_0x3a1a23&&_0x3a1a23['length']){return _0x1ad9b9[_0x412e('0x1f')][_0x412e('0x20')](_0x3a1a23);}})['then'](function(){_0x1a6457();})['catch'](function(_0x3b7e94){_0x1a6457(_0x3b7e94);});},'afterUpdate':function(_0x31fb68,_0x43e765,_0x1fd921){return _0x1ad9b9['VoiceExtension'][_0x412e('0x21')]({'where':{'ChanSpyId':_0x31fb68['id']}})[_0x412e('0x1a')](function(){return getChanSpyPromise(_0x1ad9b9,_0x31fb68);})[_0x412e('0x1a')](function(_0x381cb2){if(_0x381cb2&&_0x381cb2[_0x412e('0x22')]){return _0x1ad9b9[_0x412e('0x1f')]['bulkCreate'](_0x381cb2);}})[_0x412e('0x1a')](function(){_0x1fd921();})[_0x412e('0x23')](function(_0x5df581){_0x1fd921(_0x5df581);});},'afterDestroy':function(_0x457a72,_0x34599c,_0x3ba530){return _0x1ad9b9[_0x412e('0x1f')][_0x412e('0x21')]({'where':{'ChanSpyId':_0x457a72['id']}})['then'](function(){_0x3ba530();})[_0x412e('0x23')](function(_0x212dc1){_0x3ba530(_0x212dc1);});}}});};
\ No newline at end of file
+var _0xbb2a=['context','from-sip','format','%s%s','prefix','system','push','Set','CDR(type)=%s','chanspy','merge','MixMonitor','${UNIQUEID}.%s,a','recordingFormat','auth','Authenticate','password','ChanSpy','options','join','record','StopMixMonitor','length','concat','internal','User','name','agent','then','catch','exports','models','voice_chanspy','VoiceExtension','bulkCreate','lodash','util','bluebird','./voiceChanSpy.attributes'];(function(_0x5554f3,_0x490882){var _0x3c4d1a=function(_0x356693){while(--_0x356693){_0x5554f3['push'](_0x5554f3['shift']());}};_0x3c4d1a(++_0x490882);}(_0xbb2a,0x15b));var _0xabb2=function(_0x3f7d24,_0x3ce1d5){_0x3f7d24=_0x3f7d24-0x0;var _0x143f6e=_0xbb2a[_0x3f7d24];return _0x143f6e;};'use strict';var _=require(_0xabb2('0x0'));var util=require(_0xabb2('0x1'));var BPromise=require(_0xabb2('0x2'));var attributes=require(_0xabb2('0x3'));var getUserApplications=function(_0x30df58,_0x2bf568,_0x1ca23b){var _0x38fdbc=0x1;var _0x75fef4=[];var _0x196654={'context':_0x2bf568[_0xabb2('0x4')]||_0xabb2('0x5'),'exten':util[_0xabb2('0x6')](_0xabb2('0x7'),_0x30df58[_0xabb2('0x8')],_0x1ca23b),'type':_0xabb2('0x9'),'isApp':![],'ChanSpyId':_0x30df58['id'],'UserId':_0x2bf568['id']};_0x75fef4[_0xabb2('0xa')](_['merge']({'app':_0xabb2('0xb'),'appdata':util['format'](_0xabb2('0xc'),_0xabb2('0xd')),'priority':_0x38fdbc++},_0x196654));if(_0x30df58['record']){_0x75fef4['push'](_[_0xabb2('0xe')]({'app':_0xabb2('0xf'),'appdata':util[_0xabb2('0x6')](_0xabb2('0x10'),_0x30df58[_0xabb2('0x11')]),'priority':_0x38fdbc++},_0x196654));}if(_0x30df58[_0xabb2('0x12')]){_0x75fef4['push'](_[_0xabb2('0xe')]({'app':_0xabb2('0x13'),'appdata':_0x30df58[_0xabb2('0x14')],'priority':_0x38fdbc++},_0x196654));}_0x75fef4[_0xabb2('0xa')](_[_0xabb2('0xe')]({'app':_0xabb2('0x15'),'appdata':util[_0xabb2('0x6')]('SIP/%s,%s',_0x2bf568['name'],_0x30df58[_0xabb2('0x16')]?_0x30df58[_0xabb2('0x16')][_0xabb2('0x17')](''):''),'priority':_0x38fdbc++},_0x196654));if(_0x30df58[_0xabb2('0x18')]){_0x75fef4[_0xabb2('0xa')](_[_0xabb2('0xe')]({'app':_0xabb2('0x19'),'priority':_0x38fdbc++},_0x196654));}return _0x75fef4;};var getChanSpyApplications=function(_0x21a849,_0x2418d0){var _0x4dd310=[];for(var _0x3b0e99=0x0,_0x376d44=0x1;_0x3b0e99<_0x2418d0[_0xabb2('0x1a')];_0x3b0e99++,_0x376d44=0x1){_0x4dd310=_0x4dd310[_0xabb2('0x1b')](getUserApplications(_0x21a849,_0x2418d0[_0x3b0e99],_0x2418d0[_0x3b0e99][_0xabb2('0x1c')]));if(_0x2418d0[_0x3b0e99][_0xabb2('0x1c')]!=_0x2418d0[_0x3b0e99]['name']){_0x4dd310=_0x4dd310[_0xabb2('0x1b')](getUserApplications(_0x21a849,_0x2418d0[_0x3b0e99],_0x2418d0[_0x3b0e99]['name']));}}return _0x4dd310;};var getChanSpyPromise=function(_0x1176c2,_0x59b254){return new BPromise(function(_0x39d4e6,_0x215123){return _0x1176c2[_0xabb2('0x1d')]['findAll']({'attributes':['id',_0xabb2('0x1e'),_0xabb2('0x1c')],'where':{'role':_0xabb2('0x1f'),'chanspy':!![]},'raw':!![]})[_0xabb2('0x20')](function(_0x1f1235){if(_0x1f1235){return _0x39d4e6(getChanSpyApplications(_0x59b254,_0x1f1235));}return _0x39d4e6([]);})[_0xabb2('0x21')](function(_0x477693){_0x215123(_0x477693);});});};module[_0xabb2('0x22')]=function(_0x2ca359,_0x6ff406){var _0x1f9018=_0x2ca359[_0xabb2('0x23')];return _0x2ca359['define']('VoiceChanSpy',attributes,{'tableName':_0xabb2('0x24'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'afterCreate':function(_0x258174,_0x541c52,_0x3ef4f8){return getChanSpyPromise(_0x1f9018,_0x258174)[_0xabb2('0x20')](function(_0x2bb5cb){if(_0x2bb5cb&&_0x2bb5cb['length']){return _0x1f9018[_0xabb2('0x25')][_0xabb2('0x26')](_0x2bb5cb);}})[_0xabb2('0x20')](function(){_0x3ef4f8();})[_0xabb2('0x21')](function(_0x452fe4){_0x3ef4f8(_0x452fe4);});},'afterUpdate':function(_0x29ed67,_0x56c334,_0x13af90){return _0x1f9018[_0xabb2('0x25')]['destroy']({'where':{'ChanSpyId':_0x29ed67['id']}})[_0xabb2('0x20')](function(){return getChanSpyPromise(_0x1f9018,_0x29ed67);})[_0xabb2('0x20')](function(_0x5d43f2){if(_0x5d43f2&&_0x5d43f2[_0xabb2('0x1a')]){return _0x1f9018[_0xabb2('0x25')][_0xabb2('0x26')](_0x5d43f2);}})[_0xabb2('0x20')](function(){_0x13af90();})['catch'](function(_0x28001d){_0x13af90(_0x28001d);});},'afterDestroy':function(_0x3a5aee,_0xc05711,_0x4dfce6){return _0x1f9018[_0xabb2('0x25')]['destroy']({'where':{'ChanSpyId':_0x3a5aee['id']}})[_0xabb2('0x20')](function(){_0x4dfce6();})[_0xabb2('0x21')](function(_0x399131){_0x4dfce6(_0x399131);});}}});};
\ No newline at end of file
index 0a765e2..92c264a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf45e=['result','catch','lodash','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','VoiceChanSpy,\x20%s,\x20%s,\x20%s','stringify','error','code','VoiceChanSpy,\x20%s,\x20%s','message'];(function(_0x2593fa,_0x1d220f){var _0x42f7a0=function(_0x27afe4){while(--_0x27afe4){_0x2593fa['push'](_0x2593fa['shift']());}};_0x42f7a0(++_0x1d220f);}(_0xf45e,0x115));var _0xef45=function(_0x205f24,_0x19d9ca){_0x205f24=_0x205f24-0x0;var _0xa40691=_0xf45e[_0x205f24];return _0xa40691;};'use strict';var _=require(_0xef45('0x0'));var util=require('util');var moment=require(_0xef45('0x1'));var BPromise=require('bluebird');var rs=require(_0xef45('0x2'));var fs=require('fs');var Redis=require(_0xef45('0x3'));var db=require(_0xef45('0x4'))['db'];var utils=require(_0xef45('0x5'));var logger=require(_0xef45('0x6'))(_0xef45('0x7'));var config=require(_0xef45('0x8'));var jayson=require(_0xef45('0x9'));var client=jayson[_0xef45('0xa')][_0xef45('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x2f2e92,_0x3303ad,_0x1a68c4){return new BPromise(function(_0x1e0def,_0x268ef6){return client[_0xef45('0xc')](_0x2f2e92,_0x1a68c4)[_0xef45('0xd')](function(_0x158a0b){logger[_0xef45('0xe')]('VoiceChanSpy,\x20%s,\x20%s',_0x3303ad,_0xef45('0xf'));logger[_0xef45('0x10')](_0xef45('0x11'),_0x3303ad,_0xef45('0xf'),JSON[_0xef45('0x12')](_0x158a0b));if(_0x158a0b[_0xef45('0x13')]){if(_0x158a0b['error'][_0xef45('0x14')]===0x1f4){logger[_0xef45('0x13')](_0xef45('0x15'),_0x3303ad,_0x158a0b[_0xef45('0x13')][_0xef45('0x16')]);return _0x268ef6(_0x158a0b['error']['message']);}logger[_0xef45('0x13')]('VoiceChanSpy,\x20%s,\x20%s',_0x3303ad,_0x158a0b[_0xef45('0x13')][_0xef45('0x16')]);return _0x1e0def(_0x158a0b[_0xef45('0x13')]['message']);}else{logger['info'](_0xef45('0x15'),_0x3303ad,'request\x20sent');_0x1e0def(_0x158a0b[_0xef45('0x17')][_0xef45('0x16')]);}})[_0xef45('0x18')](function(_0x3f40e5){logger['error']('VoiceChanSpy,\x20%s,\x20%s',_0x3303ad,_0x3f40e5);_0x268ef6(_0x3f40e5);});});}
\ No newline at end of file
+var _0x9348=['error','code','message','info','result','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','VoiceChanSpy,\x20%s,\x20%s','debug','VoiceChanSpy,\x20%s,\x20%s,\x20%s','request\x20sent','stringify'];(function(_0x1b745b,_0x3e2d40){var _0x120a9d=function(_0x882a6c){while(--_0x882a6c){_0x1b745b['push'](_0x1b745b['shift']());}};_0x120a9d(++_0x3e2d40);}(_0x9348,0x10d));var _0x8934=function(_0x2f9b9c,_0x4be5b9){_0x2f9b9c=_0x2f9b9c-0x0;var _0x1ef60c=_0x9348[_0x2f9b9c];return _0x1ef60c;};'use strict';var _=require(_0x8934('0x0'));var util=require(_0x8934('0x1'));var moment=require(_0x8934('0x2'));var BPromise=require(_0x8934('0x3'));var rs=require(_0x8934('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x8934('0x5'))['db'];var utils=require(_0x8934('0x6'));var logger=require('../../config/logger')(_0x8934('0x7'));var config=require(_0x8934('0x8'));var jayson=require(_0x8934('0x9'));var client=jayson[_0x8934('0xa')][_0x8934('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3ee9b9,_0x512f30,_0x284a62){return new BPromise(function(_0x3734c5,_0x1c7f03){return client['request'](_0x3ee9b9,_0x284a62)['then'](function(_0x5ec16d){logger['info'](_0x8934('0xc'),_0x512f30,'request\x20sent');logger[_0x8934('0xd')](_0x8934('0xe'),_0x512f30,_0x8934('0xf'),JSON[_0x8934('0x10')](_0x5ec16d));if(_0x5ec16d[_0x8934('0x11')]){if(_0x5ec16d[_0x8934('0x11')][_0x8934('0x12')]===0x1f4){logger[_0x8934('0x11')]('VoiceChanSpy,\x20%s,\x20%s',_0x512f30,_0x5ec16d[_0x8934('0x11')][_0x8934('0x13')]);return _0x1c7f03(_0x5ec16d[_0x8934('0x11')][_0x8934('0x13')]);}logger[_0x8934('0x11')](_0x8934('0xc'),_0x512f30,_0x5ec16d['error'][_0x8934('0x13')]);return _0x3734c5(_0x5ec16d[_0x8934('0x11')][_0x8934('0x13')]);}else{logger[_0x8934('0x14')](_0x8934('0xc'),_0x512f30,_0x8934('0xf'));_0x3734c5(_0x5ec16d[_0x8934('0x15')][_0x8934('0x13')]);}})['catch'](function(_0xb86bc9){logger[_0x8934('0x11')](_0x8934('0xc'),_0x512f30,_0xb86bc9);_0x1c7f03(_0xb86bc9);});});}
\ No newline at end of file
index be74e6d..2fe07e1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x12cd=['multer','util','express','Router','../../components/interaction/service','../../config/environment','./voiceContext.controller','isAuthenticated','index','get','/:id','post','create','destroy','exports'];(function(_0x1306e8,_0x18dec1){var _0x52a786=function(_0x53d32e){while(--_0x53d32e){_0x1306e8['push'](_0x1306e8['shift']());}};_0x52a786(++_0x18dec1);}(_0x12cd,0xe1));var _0xd12c=function(_0x55e922,_0x33bb4c){_0x55e922=_0x55e922-0x0;var _0x3236f9=_0x12cd[_0x55e922];return _0x3236f9;};'use strict';var multer=require(_0xd12c('0x0'));var util=require(_0xd12c('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xd12c('0x2'));var router=express[_0xd12c('0x3')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0xd12c('0x4'));var config=require(_0xd12c('0x5'));var controller=require(_0xd12c('0x6'));router['get']('/',auth[_0xd12c('0x7')](),controller[_0xd12c('0x8')]);router[_0xd12c('0x9')](_0xd12c('0xa'),auth['isAuthenticated'](),controller['show']);router[_0xd12c('0xb')]('/',auth['isAuthenticated'](),controller[_0xd12c('0xc')]);router['put']('/:id',auth[_0xd12c('0x7')](),controller['update']);router['delete'](_0xd12c('0xa'),auth[_0xd12c('0x7')](),controller[_0xd12c('0xd')]);module[_0xd12c('0xe')]=router;
\ No newline at end of file
+var _0x51f1=['/:id','post','create','update','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../config/environment','./voiceContext.controller','get','isAuthenticated','index'];(function(_0x426ab4,_0x3aa799){var _0x290c07=function(_0x41ffe4){while(--_0x41ffe4){_0x426ab4['push'](_0x426ab4['shift']());}};_0x290c07(++_0x3aa799);}(_0x51f1,0x115));var _0x151f=function(_0x4cc17e,_0xbff357){_0x4cc17e=_0x4cc17e-0x0;var _0x4ee2e9=_0x51f1[_0x4cc17e];return _0x4ee2e9;};'use strict';var multer=require(_0x151f('0x0'));var util=require('util');var path=require(_0x151f('0x1'));var timeout=require(_0x151f('0x2'));var express=require(_0x151f('0x3'));var router=express[_0x151f('0x4')]();var fs_extra=require(_0x151f('0x5'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0x151f('0x6'));var controller=require(_0x151f('0x7'));router[_0x151f('0x8')]('/',auth[_0x151f('0x9')](),controller[_0x151f('0xa')]);router[_0x151f('0x8')](_0x151f('0xb'),auth[_0x151f('0x9')](),controller['show']);router[_0x151f('0xc')]('/',auth[_0x151f('0x9')](),controller[_0x151f('0xd')]);router['put'](_0x151f('0xb'),auth[_0x151f('0x9')](),controller[_0x151f('0xe')]);router[_0x151f('0xf')](_0x151f('0xb'),auth[_0x151f('0x9')](),controller[_0x151f('0x10')]);module[_0x151f('0x11')]=router;
\ No newline at end of file
index 30fe57c..41e74dd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x18f7=['STRING','name','BOOLEAN','sequelize'];(function(_0x2e30cb,_0x59fcdf){var _0x562b43=function(_0x124aa4){while(--_0x124aa4){_0x2e30cb['push'](_0x2e30cb['shift']());}};_0x562b43(++_0x59fcdf);}(_0x18f7,0x173));var _0x718f=function(_0x5230eb,_0x29ec8a){_0x5230eb=_0x5230eb-0x0;var _0x23e301=_0x18f7[_0x5230eb];return _0x23e301;};'use strict';var Sequelize=require(_0x718f('0x0'));module['exports']={'name':{'type':Sequelize[_0x718f('0x1')],'unique':_0x718f('0x2')},'description':{'type':Sequelize[_0x718f('0x1')],'allowNull':!![]},'defaultEntry':{'type':Sequelize[_0x718f('0x3')],'defaultValue':0x0}};
\ No newline at end of file
+var _0xb51c=['sequelize','exports','STRING','name','BOOLEAN'];(function(_0x28cbc5,_0x326e44){var _0x310541=function(_0x23a322){while(--_0x23a322){_0x28cbc5['push'](_0x28cbc5['shift']());}};_0x310541(++_0x326e44);}(_0xb51c,0x1a9));var _0xcb51=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0xb51c[_0x2dafbe];return _0x58a45a;};'use strict';var Sequelize=require(_0xcb51('0x0'));module[_0xcb51('0x1')]={'name':{'type':Sequelize[_0xcb51('0x2')],'unique':_0xcb51('0x3')},'description':{'type':Sequelize[_0xcb51('0x2')],'allowNull':!![]},'defaultEntry':{'type':Sequelize[_0xcb51('0x4')],'defaultValue':0x0}};
\ No newline at end of file
index 37ac262..b7c750d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaecb=['type','key','model','query','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filters','pick','filter','merge','VIRTUAL','options','VoiceContext','includeAll','include','findAll','rows','show','params','keys','find','create','body','readFileSync','join','root','server/files/templates/context.ejs','utf8','render','/etc/asterisk/extensions_xcally_contexts.conf','chan_sip.so','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','UserProfileSection','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','writeFileSync','Reload','eml-format','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','path','sox','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','jayson/promise','http','then','VoiceContext,\x20%s,\x20%s','debug','VoiceContext,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','info','result','catch','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range','apply','save','update','Contexts','UserProfileResource','destroy','stack','name','send','index','map','rawAttributes','fieldName'];(function(_0x3a2118,_0x31fc3c){var _0x1d181d=function(_0x26a734){while(--_0x26a734){_0x3a2118['push'](_0x3a2118['shift']());}};_0x1d181d(++_0x31fc3c);}(_0xaecb,0xff));var _0xbaec=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0xaecb[_0xa464c9];return _0x3d73c4;};'use strict';var emlformat=require(_0xbaec('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xbaec('0x1'));var jsonpatch=require(_0xbaec('0x2'));var rp=require(_0xbaec('0x3'));var moment=require(_0xbaec('0x4'));var BPromise=require(_0xbaec('0x5'));var Mustache=require(_0xbaec('0x6'));var util=require('util');var path=require(_0xbaec('0x7'));var sox=require(_0xbaec('0x8'));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('squel');var crypto=require(_0xbaec('0x9'));var jsforce=require(_0xbaec('0xa'));var deskjs=require(_0xbaec('0xb'));var toCsv=require('to-csv');var querystring=require(_0xbaec('0xc'));var Papa=require(_0xbaec('0xd'));var Redis=require(_0xbaec('0xe'));var authService=require(_0xbaec('0xf'));var qs=require(_0xbaec('0x10'));var as=require(_0xbaec('0x11'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xbaec('0x12'))(_0xbaec('0x13'));var utils=require(_0xbaec('0x14'));var config=require(_0xbaec('0x15'));var licenseUtil=require(_0xbaec('0x16'));var db=require(_0xbaec('0x17'))['db'];var jayson=require(_0xbaec('0x18'));var client=jayson['client'][_0xbaec('0x19')]({'port':0x232a});function respondWithRpcPromise(_0x218cd2,_0xef7141,_0x3f9e88,_0x5f3309){return new BPromise(function(_0x11a048,_0x5785df){var _0x9f7996=_0x5f3309||client;return _0x9f7996['request'](_0x218cd2,_0x3f9e88)[_0xbaec('0x1a')](function(_0x15a827){logger['info'](_0xbaec('0x1b'),_0xef7141,'request\x20sent');logger[_0xbaec('0x1c')](_0xbaec('0x1d'),_0xef7141,_0xbaec('0x1e'),JSON[_0xbaec('0x1f')](_0x15a827));if(_0x15a827[_0xbaec('0x20')]){if(_0x15a827[_0xbaec('0x20')]['code']===0x1f4){logger[_0xbaec('0x20')](_0xbaec('0x1b'),_0xef7141,_0x15a827['error']['message']);return _0x5785df(_0x15a827[_0xbaec('0x20')][_0xbaec('0x21')]);}logger[_0xbaec('0x20')](_0xbaec('0x1b'),_0xef7141,_0x15a827['error'][_0xbaec('0x21')]);return _0x11a048(_0x15a827['error'][_0xbaec('0x21')]);}else{logger[_0xbaec('0x22')](_0xbaec('0x1b'),_0xef7141,_0xbaec('0x1e'));_0x11a048(_0x15a827[_0xbaec('0x23')][_0xbaec('0x21')]);}})[_0xbaec('0x24')](function(_0x10785c){logger['error'](_0xbaec('0x1b'),_0xef7141,_0x10785c);_0x5785df(_0x10785c);});});}function respondWithStatusCode(_0x33e180,_0xca66a7){_0xca66a7=_0xca66a7||0xcc;return function(_0x846cd9){if(_0x846cd9){return _0x33e180[_0xbaec('0x25')](_0xca66a7);}return _0x33e180[_0xbaec('0x26')](_0xca66a7)[_0xbaec('0x27')]();};}function respondWithResult(_0x325b9a,_0x1454f3){_0x1454f3=_0x1454f3||0xc8;return function(_0x38d671){if(_0x38d671){return _0x325b9a[_0xbaec('0x26')](_0x1454f3)[_0xbaec('0x28')](_0x38d671);}};}function respondWithFilteredResult(_0x3bc5d1,_0x1bad80){return function(_0x184c20){if(_0x184c20){var _0xa7cd75=typeof _0x1bad80['offset']===_0xbaec('0x29')&&typeof _0x1bad80[_0xbaec('0x2a')]===_0xbaec('0x29');var _0x20cfd5=_0x184c20[_0xbaec('0x2b')];var _0x5de019=_0xa7cd75?0x0:_0x1bad80[_0xbaec('0x2c')];var _0x5522f5=_0xa7cd75?_0x184c20[_0xbaec('0x2b')]:_0x1bad80[_0xbaec('0x2c')]+_0x1bad80[_0xbaec('0x2a')];var _0x361068;if(_0x5522f5>=_0x20cfd5){_0x5522f5=_0x20cfd5;_0x361068=0xc8;}else{_0x361068=0xce;}_0x3bc5d1[_0xbaec('0x26')](_0x361068);return _0x3bc5d1[_0xbaec('0x2d')](_0xbaec('0x2e'),_0x5de019+'-'+_0x5522f5+'/'+_0x20cfd5)['json'](_0x184c20);}return null;};}function patchUpdates(_0x585be0){return function(_0x5f3d14){try{jsonpatch[_0xbaec('0x2f')](_0x5f3d14,_0x585be0,!![]);}catch(_0x56ffdd){return BPromise['reject'](_0x56ffdd);}return _0x5f3d14[_0xbaec('0x30')]();};}function saveUpdates(_0x44a6ad,_0x397834){return function(_0x12ba3c){if(_0x12ba3c){return _0x12ba3c[_0xbaec('0x31')](_0x44a6ad)[_0xbaec('0x1a')](function(_0x36e4fd){return _0x36e4fd;});}return null;};}function removeEntity(_0x5dfb9e,_0x5baaff){return function(_0x4a0f1e){if(_0x4a0f1e){return _0x4a0f1e['destroy']()[_0xbaec('0x1a')](function(){var _0x4b7665=_0x4a0f1e['get']({'plain':!![]});var _0x16a371=_0xbaec('0x32');return db[_0xbaec('0x33')][_0xbaec('0x34')]({'where':{'type':_0x16a371,'resourceId':_0x4b7665['id']}})[_0xbaec('0x1a')](function(){return _0x4a0f1e;});})['then'](function(){_0x5dfb9e['status'](0xcc)[_0xbaec('0x27')]();});}};}function handleEntityNotFound(_0x2c0c92,_0x31d456){return function(_0x1eac1d){if(!_0x1eac1d){_0x2c0c92['sendStatus'](0x194);}return _0x1eac1d;};}function handleError(_0x3737fe,_0x432b78){_0x432b78=_0x432b78||0x1f4;return function(_0x40fe09){logger[_0xbaec('0x20')](_0x40fe09[_0xbaec('0x35')]);if(_0x40fe09['name']){delete _0x40fe09[_0xbaec('0x36')];}_0x3737fe['status'](_0x432b78)[_0xbaec('0x37')](_0x40fe09);};}exports[_0xbaec('0x38')]=function(_0x5129d4,_0x49a657){var _0x4d4a71={},_0xd2c3bb={},_0x5bb18c={'count':0x0,'rows':[]};var _0x52e59f=_[_0xbaec('0x39')](db['VoiceContext'][_0xbaec('0x3a')],function(_0x18f874){return{'name':_0x18f874[_0xbaec('0x3b')],'type':_0x18f874[_0xbaec('0x3c')][_0xbaec('0x3d')]};});_0xd2c3bb[_0xbaec('0x3e')]=_[_0xbaec('0x39')](_0x52e59f,_0xbaec('0x36'));_0xd2c3bb[_0xbaec('0x3f')]=_['keys'](_0x5129d4['query']);_0xd2c3bb['filters']=_[_0xbaec('0x40')](_0xd2c3bb[_0xbaec('0x3e')],_0xd2c3bb[_0xbaec('0x3f')]);_0x4d4a71[_0xbaec('0x41')]=_['intersection'](_0xd2c3bb[_0xbaec('0x3e')],qs[_0xbaec('0x42')](_0x5129d4[_0xbaec('0x3f')]['fields']));_0x4d4a71[_0xbaec('0x41')]=_0x4d4a71['attributes'][_0xbaec('0x43')]?_0x4d4a71[_0xbaec('0x41')]:_0xd2c3bb['model'];if(!_0x5129d4[_0xbaec('0x3f')][_0xbaec('0x44')]('nolimit')){_0x4d4a71[_0xbaec('0x2a')]=qs[_0xbaec('0x2a')](_0x5129d4[_0xbaec('0x3f')]['limit']);_0x4d4a71[_0xbaec('0x2c')]=qs[_0xbaec('0x2c')](_0x5129d4[_0xbaec('0x3f')][_0xbaec('0x2c')]);}_0x4d4a71[_0xbaec('0x45')]=qs['sort'](_0x5129d4[_0xbaec('0x3f')][_0xbaec('0x46')]);_0x4d4a71[_0xbaec('0x47')]=qs[_0xbaec('0x48')](_[_0xbaec('0x49')](_0x5129d4[_0xbaec('0x3f')],_0xd2c3bb[_0xbaec('0x48')]),_0x52e59f);if(_0x5129d4['query'][_0xbaec('0x4a')]){_0x4d4a71['where']=_[_0xbaec('0x4b')](_0x4d4a71[_0xbaec('0x47')],{'$or':_['map'](_0x52e59f,function(_0x3b8667){if(_0x3b8667[_0xbaec('0x3c')]!==_0xbaec('0x4c')){var _0x4b6b18={};_0x4b6b18[_0x3b8667[_0xbaec('0x36')]]={'$like':'%'+_0x5129d4[_0xbaec('0x3f')][_0xbaec('0x4a')]+'%'};return _0x4b6b18;}})});}_0x4d4a71=_['merge']({},_0x4d4a71,_0x5129d4[_0xbaec('0x4d')]);var _0x5049d9={'where':_0x4d4a71[_0xbaec('0x47')]};return db[_0xbaec('0x4e')][_0xbaec('0x2b')](_0x5049d9)[_0xbaec('0x1a')](function(_0x5c8989){_0x5bb18c[_0xbaec('0x2b')]=_0x5c8989;if(_0x5129d4[_0xbaec('0x3f')][_0xbaec('0x4f')]){_0x4d4a71[_0xbaec('0x50')]=[{'all':!![]}];}return db['VoiceContext'][_0xbaec('0x51')](_0x4d4a71);})[_0xbaec('0x1a')](function(_0x449d15){_0x5bb18c[_0xbaec('0x52')]=_0x449d15;return _0x5bb18c;})[_0xbaec('0x1a')](respondWithFilteredResult(_0x49a657,_0x4d4a71))[_0xbaec('0x24')](handleError(_0x49a657,null));};exports[_0xbaec('0x53')]=function(_0xaf4e35,_0x4d22b7){var _0x5adba9={'raw':![],'where':{'id':_0xaf4e35[_0xbaec('0x54')]['id']}},_0x39c1eb={};_0x39c1eb[_0xbaec('0x3e')]=_[_0xbaec('0x55')](db['VoiceContext'][_0xbaec('0x3a')]);_0x39c1eb[_0xbaec('0x3f')]=_[_0xbaec('0x55')](_0xaf4e35['query']);_0x39c1eb['filters']=_['intersection'](_0x39c1eb['model'],_0x39c1eb[_0xbaec('0x3f')]);_0x5adba9['attributes']=_[_0xbaec('0x40')](_0x39c1eb[_0xbaec('0x3e')],qs['fields'](_0xaf4e35[_0xbaec('0x3f')]['fields']));_0x5adba9[_0xbaec('0x41')]=_0x5adba9[_0xbaec('0x41')]['length']?_0x5adba9['attributes']:_0x39c1eb[_0xbaec('0x3e')];if(_0xaf4e35[_0xbaec('0x3f')]['includeAll']){_0x5adba9[_0xbaec('0x50')]=[{'all':!![]}];}_0x5adba9=_[_0xbaec('0x4b')]({},_0x5adba9,_0xaf4e35['options']);return db[_0xbaec('0x4e')][_0xbaec('0x56')](_0x5adba9)[_0xbaec('0x1a')](handleEntityNotFound(_0x4d22b7,null))[_0xbaec('0x1a')](respondWithResult(_0x4d22b7,null))['catch'](handleError(_0x4d22b7,null));};exports[_0xbaec('0x57')]=function(_0x146a26,_0x44f4cb,_0x344e19){var _0x1210d5;return db[_0xbaec('0x4e')][_0xbaec('0x57')](_0x146a26[_0xbaec('0x58')],{'raw':!![]})['then'](function(_0x1cfbed){_0x1210d5=_0x1cfbed;return db['VoiceContext'][_0xbaec('0x51')]({'raw':!![]});})[_0xbaec('0x1a')](function(_0x1193fd){var _0x17f1f4=fs[_0xbaec('0x59')](path[_0xbaec('0x5a')](config[_0xbaec('0x5b')],_0xbaec('0x5c')),_0xbaec('0x5d'));var _0x61f725=ejs[_0xbaec('0x5e')](_0x17f1f4,{'contexts':_0x1193fd||[]});fs['writeFileSync'](_0xbaec('0x5f'),_0x61f725);})[_0xbaec('0x1a')](function(){return respondWithRpcPromise('Reload',_0xbaec('0x57'),{'module':_0xbaec('0x60')});})['then'](function(){var _0x38a4b8=_0x146a26[_0xbaec('0x61')][_0xbaec('0x62')]({'plain':!![]});if(!_0x38a4b8)throw new Error(_0xbaec('0x63'));if(_0x38a4b8['role']==='user'){var _0x24c344=_0x1210d5[_0xbaec('0x62')]({'plain':!![]});return db[_0xbaec('0x64')][_0xbaec('0x56')]({'where':{'name':_0xbaec('0x32'),'userProfileId':_0x38a4b8['userProfileId']},'raw':!![]})[_0xbaec('0x1a')](function(_0x570a7e){if(_0x570a7e&&_0x570a7e[_0xbaec('0x65')]===0x0){return db[_0xbaec('0x33')][_0xbaec('0x57')]({'name':_0x24c344[_0xbaec('0x36')],'resourceId':_0x24c344['id'],'type':_0x570a7e[_0xbaec('0x36')],'sectionId':_0x570a7e['id']},{})[_0xbaec('0x1a')](function(){return _0x1210d5;});}else{return _0x1210d5;}})['catch'](function(_0x455702){logger['error'](_0xbaec('0x66'),_0x455702);throw _0x455702;});}return _0x1210d5;})[_0xbaec('0x1a')](respondWithResult(_0x44f4cb,0xc9))[_0xbaec('0x24')](handleError(_0x44f4cb,null));};exports[_0xbaec('0x31')]=function(_0x321909,_0x37941e,_0x25ce69){var _0x3fe634;return db[_0xbaec('0x4e')][_0xbaec('0x56')]({'where':{'id':_0x321909['params']['id']}})[_0xbaec('0x1a')](handleEntityNotFound(_0x37941e,null))[_0xbaec('0x1a')](saveUpdates(_0x321909[_0xbaec('0x58')],null))[_0xbaec('0x1a')](function(_0x5a81e7){if(_0x5a81e7){_0x3fe634=_0x5a81e7;return db['VoiceContext'][_0xbaec('0x51')]({'raw':!![]});}})[_0xbaec('0x1a')](function(_0x1f1703){var _0x15922e=fs['readFileSync'](path['join'](config[_0xbaec('0x5b')],_0xbaec('0x5c')),_0xbaec('0x5d'));var _0xd1872d=ejs[_0xbaec('0x5e')](_0x15922e,{'contexts':_0x1f1703||[]});fs[_0xbaec('0x67')](_0xbaec('0x5f'),_0xd1872d);})[_0xbaec('0x1a')](function(){return respondWithRpcPromise(_0xbaec('0x68'),'update',{'module':_0xbaec('0x60')});})[_0xbaec('0x1a')](function(){return _0x3fe634;})[_0xbaec('0x1a')](respondWithResult(_0x37941e,null))[_0xbaec('0x24')](handleError(_0x37941e,null));};exports[_0xbaec('0x34')]=function(_0x2b8a84,_0xf42f5e,_0xf36668){var _0x4a9349;return db[_0xbaec('0x4e')][_0xbaec('0x56')]({'where':{'id':_0x2b8a84[_0xbaec('0x54')]['id']}})[_0xbaec('0x1a')](handleEntityNotFound(_0xf42f5e,null))[_0xbaec('0x1a')](removeEntity(_0xf42f5e,null))[_0xbaec('0x1a')](function(){return db[_0xbaec('0x4e')][_0xbaec('0x51')]({'raw':!![]});})[_0xbaec('0x1a')](function(_0x1bdba1){var _0x916856=fs[_0xbaec('0x59')](path[_0xbaec('0x5a')](config[_0xbaec('0x5b')],_0xbaec('0x5c')),'utf8');var _0x27d9e9=ejs[_0xbaec('0x5e')](_0x916856,{'contexts':_0x1bdba1});fs['writeFileSync']('/etc/asterisk/extensions_xcally_contexts.conf',_0x27d9e9);return respondWithRpcPromise(_0xbaec('0x68'),_0xbaec('0x34'),{'module':_0xbaec('0x60')});})['catch'](handleError(_0xf42f5e,null));};
\ No newline at end of file
+var _0x67b2=['fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/logger','../../config/environment','../../config/license/util','../../mysqldb','jayson/promise','client','then','info','VoiceContext,\x20%s,\x20%s','debug','VoiceContext,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','message','result','catch','status','end','json','offset','undefined','limit','count','Content-Range','save','UserProfileResource','destroy','sendStatus','send','map','VoiceContext','rawAttributes','fieldName','key','model','name','query','keys','filters','intersection','attributes','fields','length','sort','pick','filter','where','merge','VIRTUAL','options','includeAll','include','rows','params','find','create','findAll','join','root','server/files/templates/context.ejs','utf8','render','/etc/asterisk/extensions_xcally_contexts.conf','Reload','chan_sip.so','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','Contexts','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','update','body','readFileSync','writeFileSync','rimraf','zip-dir','request-promise','moment','bluebird','path','sox','to-csv','ejs'];(function(_0x1a2926,_0x4de87d){var _0x3931d7=function(_0x59c032){while(--_0x59c032){_0x1a2926['push'](_0x1a2926['shift']());}};_0x3931d7(++_0x4de87d);}(_0x67b2,0xb9));var _0x267b=function(_0x3299d1,_0x545733){_0x3299d1=_0x3299d1-0x0;var _0x44356e=_0x67b2[_0x3299d1];return _0x44356e;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x267b('0x0'));var zipdir=require(_0x267b('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0x267b('0x2'));var moment=require(_0x267b('0x3'));var BPromise=require(_0x267b('0x4'));var Mustache=require('mustache');var util=require('util');var path=require(_0x267b('0x5'));var sox=require(_0x267b('0x6'));var csv=require(_0x267b('0x7'));var ejs=require(_0x267b('0x8'));var fs=require('fs');var fs_extra=require(_0x267b('0x9'));var _=require(_0x267b('0xa'));var squel=require('squel');var crypto=require(_0x267b('0xb'));var jsforce=require(_0x267b('0xc'));var deskjs=require(_0x267b('0xd'));var toCsv=require(_0x267b('0x7'));var querystring=require(_0x267b('0xe'));var Papa=require(_0x267b('0xf'));var Redis=require(_0x267b('0x10'));var authService=require(_0x267b('0x11'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x267b('0x12'))('api');var utils=require('../../config/utils');var config=require(_0x267b('0x13'));var licenseUtil=require(_0x267b('0x14'));var db=require(_0x267b('0x15'))['db'];var jayson=require(_0x267b('0x16'));var client=jayson[_0x267b('0x17')]['http']({'port':0x232a});function respondWithRpcPromise(_0x46835c,_0x50574c,_0x1ef084,_0x54f061){return new BPromise(function(_0x2fb0fe,_0x3ef882){var _0x2b5130=_0x54f061||client;return _0x2b5130['request'](_0x46835c,_0x1ef084)[_0x267b('0x18')](function(_0x3c533f){logger[_0x267b('0x19')](_0x267b('0x1a'),_0x50574c,'request\x20sent');logger[_0x267b('0x1b')](_0x267b('0x1c'),_0x50574c,_0x267b('0x1d'),JSON[_0x267b('0x1e')](_0x3c533f));if(_0x3c533f[_0x267b('0x1f')]){if(_0x3c533f[_0x267b('0x1f')][_0x267b('0x20')]===0x1f4){logger[_0x267b('0x1f')]('VoiceContext,\x20%s,\x20%s',_0x50574c,_0x3c533f[_0x267b('0x1f')][_0x267b('0x21')]);return _0x3ef882(_0x3c533f[_0x267b('0x1f')][_0x267b('0x21')]);}logger['error']('VoiceContext,\x20%s,\x20%s',_0x50574c,_0x3c533f[_0x267b('0x1f')]['message']);return _0x2fb0fe(_0x3c533f[_0x267b('0x1f')]['message']);}else{logger[_0x267b('0x19')]('VoiceContext,\x20%s,\x20%s',_0x50574c,_0x267b('0x1d'));_0x2fb0fe(_0x3c533f[_0x267b('0x22')][_0x267b('0x21')]);}})[_0x267b('0x23')](function(_0x53623e){logger[_0x267b('0x1f')](_0x267b('0x1a'),_0x50574c,_0x53623e);_0x3ef882(_0x53623e);});});}function respondWithStatusCode(_0x4994b0,_0x40bd08){_0x40bd08=_0x40bd08||0xcc;return function(_0x198193){if(_0x198193){return _0x4994b0['sendStatus'](_0x40bd08);}return _0x4994b0[_0x267b('0x24')](_0x40bd08)[_0x267b('0x25')]();};}function respondWithResult(_0x4e48c6,_0x116b34){_0x116b34=_0x116b34||0xc8;return function(_0x4bd15e){if(_0x4bd15e){return _0x4e48c6[_0x267b('0x24')](_0x116b34)[_0x267b('0x26')](_0x4bd15e);}};}function respondWithFilteredResult(_0x4a8567,_0x4675ec){return function(_0x4c7ba7){if(_0x4c7ba7){var _0x5879e3=typeof _0x4675ec[_0x267b('0x27')]===_0x267b('0x28')&&typeof _0x4675ec[_0x267b('0x29')]===_0x267b('0x28');var _0x30af44=_0x4c7ba7['count'];var _0x40ba3a=_0x5879e3?0x0:_0x4675ec[_0x267b('0x27')];var _0x21dca8=_0x5879e3?_0x4c7ba7[_0x267b('0x2a')]:_0x4675ec['offset']+_0x4675ec[_0x267b('0x29')];var _0x4b8e40;if(_0x21dca8>=_0x30af44){_0x21dca8=_0x30af44;_0x4b8e40=0xc8;}else{_0x4b8e40=0xce;}_0x4a8567[_0x267b('0x24')](_0x4b8e40);return _0x4a8567['set'](_0x267b('0x2b'),_0x40ba3a+'-'+_0x21dca8+'/'+_0x30af44)[_0x267b('0x26')](_0x4c7ba7);}return null;};}function patchUpdates(_0x22d390){return function(_0x4bf119){try{jsonpatch['apply'](_0x4bf119,_0x22d390,!![]);}catch(_0x52fa1a){return BPromise['reject'](_0x52fa1a);}return _0x4bf119[_0x267b('0x2c')]();};}function saveUpdates(_0x402cd4,_0x2d6467){return function(_0x4244c3){if(_0x4244c3){return _0x4244c3['update'](_0x402cd4)[_0x267b('0x18')](function(_0xaf0e32){return _0xaf0e32;});}return null;};}function removeEntity(_0x39dbda,_0x456091){return function(_0xdb6f84){if(_0xdb6f84){return _0xdb6f84['destroy']()['then'](function(){var _0x3e272c=_0xdb6f84['get']({'plain':!![]});var _0x5bda8a='Contexts';return db[_0x267b('0x2d')][_0x267b('0x2e')]({'where':{'type':_0x5bda8a,'resourceId':_0x3e272c['id']}})[_0x267b('0x18')](function(){return _0xdb6f84;});})[_0x267b('0x18')](function(){_0x39dbda['status'](0xcc)[_0x267b('0x25')]();});}};}function handleEntityNotFound(_0x335ab7,_0x28ec3b){return function(_0x4cc8b5){if(!_0x4cc8b5){_0x335ab7[_0x267b('0x2f')](0x194);}return _0x4cc8b5;};}function handleError(_0x44c14a,_0x10a0e7){_0x10a0e7=_0x10a0e7||0x1f4;return function(_0x4de6b7){logger[_0x267b('0x1f')](_0x4de6b7['stack']);if(_0x4de6b7['name']){delete _0x4de6b7['name'];}_0x44c14a['status'](_0x10a0e7)[_0x267b('0x30')](_0x4de6b7);};}exports['index']=function(_0x238824,_0x13e8b5){var _0x42f9ed={},_0x4f9c8b={},_0x317f42={'count':0x0,'rows':[]};var _0x3f76cf=_[_0x267b('0x31')](db[_0x267b('0x32')][_0x267b('0x33')],function(_0x50429e){return{'name':_0x50429e[_0x267b('0x34')],'type':_0x50429e['type'][_0x267b('0x35')]};});_0x4f9c8b[_0x267b('0x36')]=_['map'](_0x3f76cf,_0x267b('0x37'));_0x4f9c8b[_0x267b('0x38')]=_[_0x267b('0x39')](_0x238824[_0x267b('0x38')]);_0x4f9c8b[_0x267b('0x3a')]=_[_0x267b('0x3b')](_0x4f9c8b[_0x267b('0x36')],_0x4f9c8b[_0x267b('0x38')]);_0x42f9ed[_0x267b('0x3c')]=_[_0x267b('0x3b')](_0x4f9c8b[_0x267b('0x36')],qs[_0x267b('0x3d')](_0x238824['query']['fields']));_0x42f9ed[_0x267b('0x3c')]=_0x42f9ed['attributes'][_0x267b('0x3e')]?_0x42f9ed[_0x267b('0x3c')]:_0x4f9c8b[_0x267b('0x36')];if(!_0x238824[_0x267b('0x38')]['hasOwnProperty']('nolimit')){_0x42f9ed[_0x267b('0x29')]=qs[_0x267b('0x29')](_0x238824[_0x267b('0x38')]['limit']);_0x42f9ed[_0x267b('0x27')]=qs['offset'](_0x238824[_0x267b('0x38')][_0x267b('0x27')]);}_0x42f9ed['order']=qs[_0x267b('0x3f')](_0x238824[_0x267b('0x38')][_0x267b('0x3f')]);_0x42f9ed['where']=qs['filters'](_[_0x267b('0x40')](_0x238824[_0x267b('0x38')],_0x4f9c8b[_0x267b('0x3a')]),_0x3f76cf);if(_0x238824[_0x267b('0x38')][_0x267b('0x41')]){_0x42f9ed[_0x267b('0x42')]=_[_0x267b('0x43')](_0x42f9ed[_0x267b('0x42')],{'$or':_[_0x267b('0x31')](_0x3f76cf,function(_0x77207b){if(_0x77207b['type']!==_0x267b('0x44')){var _0x58e6aa={};_0x58e6aa[_0x77207b[_0x267b('0x37')]]={'$like':'%'+_0x238824[_0x267b('0x38')]['filter']+'%'};return _0x58e6aa;}})});}_0x42f9ed=_[_0x267b('0x43')]({},_0x42f9ed,_0x238824[_0x267b('0x45')]);var _0xe66cdf={'where':_0x42f9ed['where']};return db['VoiceContext'][_0x267b('0x2a')](_0xe66cdf)['then'](function(_0x346446){_0x317f42[_0x267b('0x2a')]=_0x346446;if(_0x238824['query'][_0x267b('0x46')]){_0x42f9ed[_0x267b('0x47')]=[{'all':!![]}];}return db[_0x267b('0x32')]['findAll'](_0x42f9ed);})[_0x267b('0x18')](function(_0x4074fb){_0x317f42[_0x267b('0x48')]=_0x4074fb;return _0x317f42;})['then'](respondWithFilteredResult(_0x13e8b5,_0x42f9ed))[_0x267b('0x23')](handleError(_0x13e8b5,null));};exports['show']=function(_0x4ec497,_0x2b14e3){var _0x345a6f={'raw':![],'where':{'id':_0x4ec497[_0x267b('0x49')]['id']}},_0x379b35={};_0x379b35[_0x267b('0x36')]=_[_0x267b('0x39')](db[_0x267b('0x32')][_0x267b('0x33')]);_0x379b35[_0x267b('0x38')]=_['keys'](_0x4ec497['query']);_0x379b35[_0x267b('0x3a')]=_[_0x267b('0x3b')](_0x379b35[_0x267b('0x36')],_0x379b35['query']);_0x345a6f['attributes']=_[_0x267b('0x3b')](_0x379b35[_0x267b('0x36')],qs[_0x267b('0x3d')](_0x4ec497[_0x267b('0x38')][_0x267b('0x3d')]));_0x345a6f[_0x267b('0x3c')]=_0x345a6f[_0x267b('0x3c')][_0x267b('0x3e')]?_0x345a6f['attributes']:_0x379b35['model'];if(_0x4ec497['query'][_0x267b('0x46')]){_0x345a6f[_0x267b('0x47')]=[{'all':!![]}];}_0x345a6f=_[_0x267b('0x43')]({},_0x345a6f,_0x4ec497[_0x267b('0x45')]);return db['VoiceContext'][_0x267b('0x4a')](_0x345a6f)[_0x267b('0x18')](handleEntityNotFound(_0x2b14e3,null))[_0x267b('0x18')](respondWithResult(_0x2b14e3,null))[_0x267b('0x23')](handleError(_0x2b14e3,null));};exports[_0x267b('0x4b')]=function(_0x42d600,_0x2b01d5,_0x334637){var _0x3b7717;return db[_0x267b('0x32')]['create'](_0x42d600['body'],{'raw':!![]})[_0x267b('0x18')](function(_0x2e4f18){_0x3b7717=_0x2e4f18;return db['VoiceContext'][_0x267b('0x4c')]({'raw':!![]});})['then'](function(_0x55ea93){var _0x24c3ac=fs['readFileSync'](path[_0x267b('0x4d')](config[_0x267b('0x4e')],_0x267b('0x4f')),_0x267b('0x50'));var _0x45601d=ejs[_0x267b('0x51')](_0x24c3ac,{'contexts':_0x55ea93||[]});fs['writeFileSync'](_0x267b('0x52'),_0x45601d);})[_0x267b('0x18')](function(){return respondWithRpcPromise(_0x267b('0x53'),'create',{'module':_0x267b('0x54')});})[_0x267b('0x18')](function(){var _0x529c4d=_0x42d600[_0x267b('0x55')][_0x267b('0x56')]({'plain':!![]});if(!_0x529c4d)throw new Error(_0x267b('0x57'));if(_0x529c4d[_0x267b('0x58')]==='user'){var _0x4cc326=_0x3b7717[_0x267b('0x56')]({'plain':!![]});return db[_0x267b('0x59')][_0x267b('0x4a')]({'where':{'name':_0x267b('0x5a'),'userProfileId':_0x529c4d[_0x267b('0x5b')]},'raw':!![]})['then'](function(_0xc12df1){if(_0xc12df1&&_0xc12df1['autoAssociation']===0x0){return db['UserProfileResource'][_0x267b('0x4b')]({'name':_0x4cc326[_0x267b('0x37')],'resourceId':_0x4cc326['id'],'type':_0xc12df1['name'],'sectionId':_0xc12df1['id']},{})[_0x267b('0x18')](function(){return _0x3b7717;});}else{return _0x3b7717;}})['catch'](function(_0x17795a){logger['error'](_0x267b('0x5c'),_0x17795a);throw _0x17795a;});}return _0x3b7717;})[_0x267b('0x18')](respondWithResult(_0x2b01d5,0xc9))[_0x267b('0x23')](handleError(_0x2b01d5,null));};exports[_0x267b('0x5d')]=function(_0x15c31c,_0xa7d2a0,_0x5c22a1){var _0x44964f;return db[_0x267b('0x32')][_0x267b('0x4a')]({'where':{'id':_0x15c31c[_0x267b('0x49')]['id']}})[_0x267b('0x18')](handleEntityNotFound(_0xa7d2a0,null))[_0x267b('0x18')](saveUpdates(_0x15c31c[_0x267b('0x5e')],null))['then'](function(_0x37df6c){if(_0x37df6c){_0x44964f=_0x37df6c;return db[_0x267b('0x32')][_0x267b('0x4c')]({'raw':!![]});}})[_0x267b('0x18')](function(_0xa8cf20){var _0x156e0d=fs['readFileSync'](path[_0x267b('0x4d')](config[_0x267b('0x4e')],_0x267b('0x4f')),_0x267b('0x50'));var _0x524bce=ejs['render'](_0x156e0d,{'contexts':_0xa8cf20||[]});fs['writeFileSync'](_0x267b('0x52'),_0x524bce);})[_0x267b('0x18')](function(){return respondWithRpcPromise(_0x267b('0x53'),_0x267b('0x5d'),{'module':_0x267b('0x54')});})[_0x267b('0x18')](function(){return _0x44964f;})['then'](respondWithResult(_0xa7d2a0,null))['catch'](handleError(_0xa7d2a0,null));};exports['destroy']=function(_0x332295,_0x5e31c9,_0x3569d6){var _0x5970c7;return db[_0x267b('0x32')][_0x267b('0x4a')]({'where':{'id':_0x332295[_0x267b('0x49')]['id']}})[_0x267b('0x18')](handleEntityNotFound(_0x5e31c9,null))[_0x267b('0x18')](removeEntity(_0x5e31c9,null))[_0x267b('0x18')](function(){return db[_0x267b('0x32')][_0x267b('0x4c')]({'raw':!![]});})['then'](function(_0x29264c){var _0x5b25a2=fs[_0x267b('0x5f')](path[_0x267b('0x4d')](config[_0x267b('0x4e')],_0x267b('0x4f')),_0x267b('0x50'));var _0x3ed087=ejs[_0x267b('0x51')](_0x5b25a2,{'contexts':_0x29264c});fs[_0x267b('0x60')](_0x267b('0x52'),_0x3ed087);return respondWithRpcPromise(_0x267b('0x53'),_0x267b('0x2e'),{'module':_0x267b('0x54')});})['catch'](handleError(_0x5e31c9,null));};
\ No newline at end of file
index 2f3c8b2..059523a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9efd=['../../config/environment','./voiceContext.attributes','define','VoiceContext','voice_contexts','lodash','util','../../config/logger','api','bluebird','request-promise','path','rimraf'];(function(_0x337a10,_0x5191c7){var _0x575f98=function(_0x3851cd){while(--_0x3851cd){_0x337a10['push'](_0x337a10['shift']());}};_0x575f98(++_0x5191c7);}(_0x9efd,0xae));var _0xd9ef=function(_0x4b6bd1,_0x24296d){_0x4b6bd1=_0x4b6bd1-0x0;var _0x1913be=_0x9efd[_0x4b6bd1];return _0x1913be;};'use strict';var _=require(_0xd9ef('0x0'));var util=require(_0xd9ef('0x1'));var logger=require(_0xd9ef('0x2'))(_0xd9ef('0x3'));var moment=require('moment');var BPromise=require(_0xd9ef('0x4'));var rp=require(_0xd9ef('0x5'));var fs=require('fs');var path=require(_0xd9ef('0x6'));var rimraf=require(_0xd9ef('0x7'));var config=require(_0xd9ef('0x8'));var attributes=require(_0xd9ef('0x9'));module['exports']=function(_0x5e42a6,_0x57a3eb){return _0x5e42a6[_0xd9ef('0xa')](_0xd9ef('0xb'),attributes,{'tableName':_0xd9ef('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x2080=['rimraf','./voiceContext.attributes','exports','define','voice_contexts','../../config/logger','api','moment','bluebird','path'];(function(_0x3ec818,_0x59e4dc){var _0x2aabc7=function(_0x501ae9){while(--_0x501ae9){_0x3ec818['push'](_0x3ec818['shift']());}};_0x2aabc7(++_0x59e4dc);}(_0x2080,0x19f));var _0x0208=function(_0xab8ffa,_0x29179d){_0xab8ffa=_0xab8ffa-0x0;var _0x173c69=_0x2080[_0xab8ffa];return _0x173c69;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0x0208('0x0'))(_0x0208('0x1'));var moment=require(_0x0208('0x2'));var BPromise=require(_0x0208('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x0208('0x4'));var rimraf=require(_0x0208('0x5'));var config=require('../../config/environment');var attributes=require(_0x0208('0x6'));module[_0x0208('0x7')]=function(_0x2f21c1,_0x115952){return _0x2f21c1[_0x0208('0x8')]('VoiceContext',attributes,{'tableName':_0x0208('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 1ccf1ae..b4b7318 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1c8a=['error','VoiceContext,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/logger','rpc','../../config/environment','client','http','then','info','debug','request\x20sent','code'];(function(_0x1374d7,_0x3f73de){var _0x1e5b49=function(_0x35850d){while(--_0x35850d){_0x1374d7['push'](_0x1374d7['shift']());}};_0x1e5b49(++_0x3f73de);}(_0x1c8a,0x140));var _0xa1c8=function(_0x5e43f4,_0x47ea74){_0x5e43f4=_0x5e43f4-0x0;var _0x3bcd34=_0x1c8a[_0x5e43f4];return _0x3bcd34;};'use strict';var _=require(_0xa1c8('0x0'));var util=require(_0xa1c8('0x1'));var moment=require(_0xa1c8('0x2'));var BPromise=require(_0xa1c8('0x3'));var rs=require(_0xa1c8('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa1c8('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0xa1c8('0x6'))(_0xa1c8('0x7'));var config=require(_0xa1c8('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xa1c8('0x9')][_0xa1c8('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x14d2f0,_0x57d2d4,_0x32993e){return new BPromise(function(_0xf93962,_0x44cf0d){return client['request'](_0x14d2f0,_0x32993e)[_0xa1c8('0xb')](function(_0x23d253){logger[_0xa1c8('0xc')]('VoiceContext,\x20%s,\x20%s',_0x57d2d4,'request\x20sent');logger[_0xa1c8('0xd')]('VoiceContext,\x20%s,\x20%s,\x20%s',_0x57d2d4,_0xa1c8('0xe'),JSON['stringify'](_0x23d253));if(_0x23d253['error']){if(_0x23d253['error'][_0xa1c8('0xf')]===0x1f4){logger[_0xa1c8('0x10')](_0xa1c8('0x11'),_0x57d2d4,_0x23d253[_0xa1c8('0x10')][_0xa1c8('0x12')]);return _0x44cf0d(_0x23d253[_0xa1c8('0x10')]['message']);}logger[_0xa1c8('0x10')](_0xa1c8('0x11'),_0x57d2d4,_0x23d253[_0xa1c8('0x10')][_0xa1c8('0x12')]);return _0xf93962(_0x23d253[_0xa1c8('0x10')][_0xa1c8('0x12')]);}else{logger['info'](_0xa1c8('0x11'),_0x57d2d4,_0xa1c8('0xe'));_0xf93962(_0x23d253[_0xa1c8('0x13')][_0xa1c8('0x12')]);}})[_0xa1c8('0x14')](function(_0x5ab171){logger[_0xa1c8('0x10')]('VoiceContext,\x20%s,\x20%s',_0x57d2d4,_0x5ab171);_0x44cf0d(_0x5ab171);});});}
\ No newline at end of file
+var _0x737e=['moment','bluebird','ioredis','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','VoiceContext,\x20%s,\x20%s,\x20%s','stringify','error','code','VoiceContext,\x20%s,\x20%s','message','result','lodash','util'];(function(_0x290492,_0x18cfad){var _0x52b5bf=function(_0x3c3c63){while(--_0x3c3c63){_0x290492['push'](_0x290492['shift']());}};_0x52b5bf(++_0x18cfad);}(_0x737e,0x1cc));var _0xe737=function(_0x93d656,_0x2ac5d4){_0x93d656=_0x93d656-0x0;var _0x3c851a=_0x737e[_0x93d656];return _0x3c851a;};'use strict';var _=require(_0xe737('0x0'));var util=require(_0xe737('0x1'));var moment=require(_0xe737('0x2'));var BPromise=require(_0xe737('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xe737('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0xe737('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0xe737('0x6'));var jayson=require(_0xe737('0x7'));var client=jayson[_0xe737('0x8')][_0xe737('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x2f4836,_0x57f186,_0xdb6b84){return new BPromise(function(_0x5c6c94,_0x262760){return client[_0xe737('0xa')](_0x2f4836,_0xdb6b84)[_0xe737('0xb')](function(_0x4ab21d){logger[_0xe737('0xc')]('VoiceContext,\x20%s,\x20%s',_0x57f186,_0xe737('0xd'));logger[_0xe737('0xe')](_0xe737('0xf'),_0x57f186,_0xe737('0xd'),JSON[_0xe737('0x10')](_0x4ab21d));if(_0x4ab21d[_0xe737('0x11')]){if(_0x4ab21d[_0xe737('0x11')][_0xe737('0x12')]===0x1f4){logger[_0xe737('0x11')](_0xe737('0x13'),_0x57f186,_0x4ab21d[_0xe737('0x11')][_0xe737('0x14')]);return _0x262760(_0x4ab21d[_0xe737('0x11')]['message']);}logger[_0xe737('0x11')](_0xe737('0x13'),_0x57f186,_0x4ab21d[_0xe737('0x11')][_0xe737('0x14')]);return _0x5c6c94(_0x4ab21d[_0xe737('0x11')][_0xe737('0x14')]);}else{logger[_0xe737('0xc')](_0xe737('0x13'),_0x57f186,_0xe737('0xd'));_0x5c6c94(_0x4ab21d[_0xe737('0x15')][_0xe737('0x14')]);}})['catch'](function(_0x7e5fad){logger[_0xe737('0x11')]('VoiceContext,\x20%s,\x20%s',_0x57f186,_0x7e5fad);_0x262760(_0x7e5fad);});});}
\ No newline at end of file
index 9877645..a2e13af 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb664=['update','delete','destroy','multer','util','path','express','Router','../../components/auth/service','../../components/interaction/service','./voiceDialReport.controller','isAuthenticated','index','get','/describe','describe','/:id','show','post','create','put'];(function(_0x42cae2,_0x284ef8){var _0x5f256f=function(_0x41abc8){while(--_0x41abc8){_0x42cae2['push'](_0x42cae2['shift']());}};_0x5f256f(++_0x284ef8);}(_0xb664,0x192));var _0x4b66=function(_0x1e5022,_0x2fcb3b){_0x1e5022=_0x1e5022-0x0;var _0x401398=_0xb664[_0x1e5022];return _0x401398;};'use strict';var multer=require(_0x4b66('0x0'));var util=require(_0x4b66('0x1'));var path=require(_0x4b66('0x2'));var timeout=require('connect-timeout');var express=require(_0x4b66('0x3'));var router=express[_0x4b66('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x4b66('0x5'));var interaction=require(_0x4b66('0x6'));var config=require('../../config/environment');var controller=require(_0x4b66('0x7'));router['get']('/',auth[_0x4b66('0x8')](),controller[_0x4b66('0x9')]);router[_0x4b66('0xa')](_0x4b66('0xb'),auth[_0x4b66('0x8')](),controller[_0x4b66('0xc')]);router[_0x4b66('0xa')](_0x4b66('0xd'),auth[_0x4b66('0x8')](),controller[_0x4b66('0xe')]);router[_0x4b66('0xf')]('/',auth[_0x4b66('0x8')](),controller[_0x4b66('0x10')]);router[_0x4b66('0x11')](_0x4b66('0xd'),auth[_0x4b66('0x8')](),controller[_0x4b66('0x12')]);router[_0x4b66('0x13')](_0x4b66('0xd'),auth[_0x4b66('0x8')](),controller[_0x4b66('0x14')]);module['exports']=router;
\ No newline at end of file
+var _0xa4de=['fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceDialReport.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy','exports','multer','connect-timeout','express','Router'];(function(_0x23a6b3,_0x171b52){var _0x8bca9b=function(_0x2fda9d){while(--_0x2fda9d){_0x23a6b3['push'](_0x23a6b3['shift']());}};_0x8bca9b(++_0x171b52);}(_0xa4de,0x10d));var _0xea4d=function(_0x3d880c,_0x10606e){_0x3d880c=_0x3d880c-0x0;var _0x3686df=_0xa4de[_0x3d880c];return _0x3686df;};'use strict';var multer=require(_0xea4d('0x0'));var util=require('util');var path=require('path');var timeout=require(_0xea4d('0x1'));var express=require(_0xea4d('0x2'));var router=express[_0xea4d('0x3')]();var fs_extra=require(_0xea4d('0x4'));var auth=require(_0xea4d('0x5'));var interaction=require(_0xea4d('0x6'));var config=require(_0xea4d('0x7'));var controller=require(_0xea4d('0x8'));router[_0xea4d('0x9')]('/',auth[_0xea4d('0xa')](),controller[_0xea4d('0xb')]);router[_0xea4d('0x9')]('/describe',auth[_0xea4d('0xa')](),controller['describe']);router[_0xea4d('0x9')](_0xea4d('0xc'),auth[_0xea4d('0xa')](),controller[_0xea4d('0xd')]);router[_0xea4d('0xe')]('/',auth[_0xea4d('0xa')](),controller[_0xea4d('0xf')]);router[_0xea4d('0x10')](_0xea4d('0xc'),auth[_0xea4d('0xa')](),controller[_0xea4d('0x11')]);router[_0xea4d('0x12')]('/:id',auth[_0xea4d('0xa')](),controller[_0xea4d('0x13')]);module[_0xea4d('0x14')]=router;
\ No newline at end of file
index ad38902..e47cec5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa41a=['exports','STRING','INTEGER','DATE','called,connect,complete','sequelize'];(function(_0x1f217b,_0x3b7c48){var _0x1918b3=function(_0x2e2817){while(--_0x2e2817){_0x1f217b['push'](_0x1f217b['shift']());}};_0x1918b3(++_0x3b7c48);}(_0xa41a,0x6b));var _0xaa41=function(_0x16432c,_0x209963){_0x16432c=_0x16432c-0x0;var _0x36aab0=_0xa41a[_0x16432c];return _0x36aab0;};'use strict';var Sequelize=require(_0xaa41('0x0'));module[_0xaa41('0x1')]={'privilege':{'type':Sequelize['STRING']},'channel':{'type':Sequelize[_0xaa41('0x2')]},'channelstate':{'type':Sequelize[_0xaa41('0x3')]},'channelstatedesc':{'type':Sequelize[_0xaa41('0x2')]},'calleridnum':{'type':Sequelize[_0xaa41('0x2')]},'calleridname':{'type':Sequelize[_0xaa41('0x2')]},'connectedlinenum':{'type':Sequelize[_0xaa41('0x2')]},'connectedlinename':{'type':Sequelize[_0xaa41('0x2')]},'language':{'type':Sequelize[_0xaa41('0x2')]},'accountcode':{'type':Sequelize['STRING']},'context':{'type':Sequelize[_0xaa41('0x2')]},'exten':{'type':Sequelize[_0xaa41('0x2')]},'priority':{'type':Sequelize['INTEGER']},'uniqueid':{'type':Sequelize['STRING']},'linkedid':{'type':Sequelize[_0xaa41('0x2')]},'destchannel':{'type':Sequelize[_0xaa41('0x2')]},'destchannelstate':{'type':Sequelize['INTEGER']},'destchannelstatedesc':{'type':Sequelize[_0xaa41('0x2')]},'destcalleridnum':{'type':Sequelize[_0xaa41('0x2')]},'destcalleridname':{'type':Sequelize[_0xaa41('0x2')]},'destconnectedlinenum':{'type':Sequelize[_0xaa41('0x2')]},'destconnectedlinename':{'type':Sequelize[_0xaa41('0x2')]},'destlanguage':{'type':Sequelize[_0xaa41('0x2')]},'destaccountcode':{'type':Sequelize[_0xaa41('0x2')]},'destcontext':{'type':Sequelize[_0xaa41('0x2')]},'destexten':{'type':Sequelize[_0xaa41('0x2')]},'destpriority':{'type':Sequelize['INTEGER']},'destuniqueid':{'type':Sequelize[_0xaa41('0x2')]},'destlinkedid':{'type':Sequelize[_0xaa41('0x2')]},'dialstring':{'type':Sequelize['STRING']},'dialstatus':{'type':Sequelize['STRING']},'starttime':{'type':Sequelize[_0xaa41('0x4')]},'answertime':{'type':Sequelize['DATE']},'endtime':{'type':Sequelize[_0xaa41('0x4')]},'lastevent':{'type':Sequelize[_0xaa41('0x2')],'comment':_0xaa41('0x5')},'routeId':{'type':Sequelize[_0xaa41('0x3')]},'duration':{'type':Sequelize[_0xaa41('0x3')]},'holdtime':{'type':Sequelize['INTEGER']},'billableseconds':{'type':Sequelize[_0xaa41('0x3')]}};
\ No newline at end of file
+var _0xedd9=['DATE','called,connect,complete','exports','STRING','INTEGER'];(function(_0x173a3b,_0x1202f3){var _0x491b7f=function(_0x4371f2){while(--_0x4371f2){_0x173a3b['push'](_0x173a3b['shift']());}};_0x491b7f(++_0x1202f3);}(_0xedd9,0xfc));var _0x9edd=function(_0x581361,_0x37a6c1){_0x581361=_0x581361-0x0;var _0x21a291=_0xedd9[_0x581361];return _0x21a291;};'use strict';var Sequelize=require('sequelize');module[_0x9edd('0x0')]={'privilege':{'type':Sequelize[_0x9edd('0x1')]},'channel':{'type':Sequelize[_0x9edd('0x1')]},'channelstate':{'type':Sequelize[_0x9edd('0x2')]},'channelstatedesc':{'type':Sequelize[_0x9edd('0x1')]},'calleridnum':{'type':Sequelize[_0x9edd('0x1')]},'calleridname':{'type':Sequelize[_0x9edd('0x1')]},'connectedlinenum':{'type':Sequelize[_0x9edd('0x1')]},'connectedlinename':{'type':Sequelize['STRING']},'language':{'type':Sequelize[_0x9edd('0x1')]},'accountcode':{'type':Sequelize[_0x9edd('0x1')]},'context':{'type':Sequelize[_0x9edd('0x1')]},'exten':{'type':Sequelize[_0x9edd('0x1')]},'priority':{'type':Sequelize['INTEGER']},'uniqueid':{'type':Sequelize[_0x9edd('0x1')]},'linkedid':{'type':Sequelize['STRING']},'destchannel':{'type':Sequelize[_0x9edd('0x1')]},'destchannelstate':{'type':Sequelize[_0x9edd('0x2')]},'destchannelstatedesc':{'type':Sequelize[_0x9edd('0x1')]},'destcalleridnum':{'type':Sequelize[_0x9edd('0x1')]},'destcalleridname':{'type':Sequelize['STRING']},'destconnectedlinenum':{'type':Sequelize[_0x9edd('0x1')]},'destconnectedlinename':{'type':Sequelize['STRING']},'destlanguage':{'type':Sequelize[_0x9edd('0x1')]},'destaccountcode':{'type':Sequelize[_0x9edd('0x1')]},'destcontext':{'type':Sequelize['STRING']},'destexten':{'type':Sequelize[_0x9edd('0x1')]},'destpriority':{'type':Sequelize[_0x9edd('0x2')]},'destuniqueid':{'type':Sequelize['STRING']},'destlinkedid':{'type':Sequelize[_0x9edd('0x1')]},'dialstring':{'type':Sequelize[_0x9edd('0x1')]},'dialstatus':{'type':Sequelize[_0x9edd('0x1')]},'starttime':{'type':Sequelize[_0x9edd('0x3')]},'answertime':{'type':Sequelize[_0x9edd('0x3')]},'endtime':{'type':Sequelize[_0x9edd('0x3')]},'lastevent':{'type':Sequelize[_0x9edd('0x1')],'comment':_0x9edd('0x4')},'routeId':{'type':Sequelize['INTEGER']},'duration':{'type':Sequelize[_0x9edd('0x2')]},'holdtime':{'type':Sequelize[_0x9edd('0x2')]},'billableseconds':{'type':Sequelize[_0x9edd('0x2')]}};
\ No newline at end of file
index 756309e..1763b04 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd37c=['key','map','query','keys','filters','model','attributes','intersection','fields','length','hasOwnProperty','order','where','pick','merge','VIRTUAL','filter','options','includeAll','VoiceDialReport','findAll','rows','catch','params','include','find','create','body','update','describe','eml-format','zip-dir','moment','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','save','then','destroy','error','name','send','index','rawAttributes','fieldName','type'];(function(_0x77f4a4,_0x41ac24){var _0x4b26a4=function(_0x3f43f1){while(--_0x3f43f1){_0x77f4a4['push'](_0x77f4a4['shift']());}};_0x4b26a4(++_0x41ac24);}(_0xd37c,0x69));var _0xcd37=function(_0x32f7b0,_0x218619){_0x32f7b0=_0x32f7b0-0x0;var _0x418666=_0xd37c[_0x32f7b0];return _0x418666;};'use strict';var emlformat=require(_0xcd37('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xcd37('0x1'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0xcd37('0x2'));var BPromise=require('bluebird');var Mustache=require(_0xcd37('0x3'));var util=require(_0xcd37('0x4'));var path=require('path');var sox=require(_0xcd37('0x5'));var csv=require(_0xcd37('0x6'));var ejs=require(_0xcd37('0x7'));var fs=require('fs');var fs_extra=require(_0xcd37('0x8'));var _=require(_0xcd37('0x9'));var squel=require(_0xcd37('0xa'));var crypto=require(_0xcd37('0xb'));var jsforce=require(_0xcd37('0xc'));var deskjs=require(_0xcd37('0xd'));var toCsv=require(_0xcd37('0x6'));var querystring=require('querystring');var Papa=require(_0xcd37('0xe'));var Redis=require(_0xcd37('0xf'));var authService=require('../../components/auth/service');var qs=require(_0xcd37('0x10'));var as=require(_0xcd37('0x11'));var hardwareService=require(_0xcd37('0x12'));var logger=require(_0xcd37('0x13'))(_0xcd37('0x14'));var utils=require(_0xcd37('0x15'));var config=require(_0xcd37('0x16'));var licenseUtil=require(_0xcd37('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x18e135,_0x20fc3f){_0x20fc3f=_0x20fc3f||0xcc;return function(_0x3528cc){if(_0x3528cc){return _0x18e135[_0xcd37('0x18')](_0x20fc3f);}return _0x18e135[_0xcd37('0x19')](_0x20fc3f)[_0xcd37('0x1a')]();};}function respondWithResult(_0x4260d5,_0xf0eecb){_0xf0eecb=_0xf0eecb||0xc8;return function(_0x386084){if(_0x386084){return _0x4260d5[_0xcd37('0x19')](_0xf0eecb)[_0xcd37('0x1b')](_0x386084);}};}function respondWithFilteredResult(_0x3052f7,_0x4ac382){return function(_0x4db0e3){if(_0x4db0e3){var _0xc89b3d=typeof _0x4ac382[_0xcd37('0x1c')]===_0xcd37('0x1d')&&typeof _0x4ac382[_0xcd37('0x1e')]===_0xcd37('0x1d');var _0x531a5b=_0x4db0e3[_0xcd37('0x1f')];var _0x1dc534=_0xc89b3d?0x0:_0x4ac382[_0xcd37('0x1c')];var _0x2c2271=_0xc89b3d?_0x4db0e3[_0xcd37('0x1f')]:_0x4ac382['offset']+_0x4ac382['limit'];var _0x3280f6;if(_0x2c2271>=_0x531a5b){_0x2c2271=_0x531a5b;_0x3280f6=0xc8;}else{_0x3280f6=0xce;}_0x3052f7[_0xcd37('0x19')](_0x3280f6);return _0x3052f7[_0xcd37('0x20')](_0xcd37('0x21'),_0x1dc534+'-'+_0x2c2271+'/'+_0x531a5b)['json'](_0x4db0e3);}return null;};}function patchUpdates(_0x2cf7cb){return function(_0x4c2e59){try{jsonpatch[_0xcd37('0x22')](_0x4c2e59,_0x2cf7cb,!![]);}catch(_0xc6743c){return BPromise['reject'](_0xc6743c);}return _0x4c2e59[_0xcd37('0x23')]();};}function saveUpdates(_0xe44c08,_0x32797b){return function(_0x1f72be){if(_0x1f72be){return _0x1f72be['update'](_0xe44c08)[_0xcd37('0x24')](function(_0x88888d){return _0x88888d;});}return null;};}function removeEntity(_0x392bc9,_0x3ba645){return function(_0x137496){if(_0x137496){return _0x137496[_0xcd37('0x25')]()[_0xcd37('0x24')](function(){_0x392bc9['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x75926b,_0x5e833b){return function(_0x97f4d6){if(!_0x97f4d6){_0x75926b[_0xcd37('0x18')](0x194);}return _0x97f4d6;};}function handleError(_0x4a2732,_0x1e1a88){_0x1e1a88=_0x1e1a88||0x1f4;return function(_0x20eabe){logger[_0xcd37('0x26')](_0x20eabe['stack']);if(_0x20eabe[_0xcd37('0x27')]){delete _0x20eabe[_0xcd37('0x27')];}_0x4a2732['status'](_0x1e1a88)[_0xcd37('0x28')](_0x20eabe);};}exports[_0xcd37('0x29')]=function(_0x1d875b,_0x4f746f){var _0x1bd0cd={},_0x1e3fac={},_0x46e76a={'count':0x0,'rows':[]};var _0x455794=_['map'](db['VoiceDialReport'][_0xcd37('0x2a')],function(_0xb83f55){return{'name':_0xb83f55[_0xcd37('0x2b')],'type':_0xb83f55[_0xcd37('0x2c')][_0xcd37('0x2d')]};});_0x1e3fac['model']=_[_0xcd37('0x2e')](_0x455794,_0xcd37('0x27'));_0x1e3fac[_0xcd37('0x2f')]=_[_0xcd37('0x30')](_0x1d875b['query']);_0x1e3fac[_0xcd37('0x31')]=_['intersection'](_0x1e3fac[_0xcd37('0x32')],_0x1e3fac[_0xcd37('0x2f')]);_0x1bd0cd[_0xcd37('0x33')]=_[_0xcd37('0x34')](_0x1e3fac['model'],qs[_0xcd37('0x35')](_0x1d875b[_0xcd37('0x2f')][_0xcd37('0x35')]));_0x1bd0cd[_0xcd37('0x33')]=_0x1bd0cd['attributes'][_0xcd37('0x36')]?_0x1bd0cd[_0xcd37('0x33')]:_0x1e3fac['model'];if(!_0x1d875b[_0xcd37('0x2f')][_0xcd37('0x37')]('nolimit')){_0x1bd0cd[_0xcd37('0x1e')]=qs['limit'](_0x1d875b[_0xcd37('0x2f')][_0xcd37('0x1e')]);_0x1bd0cd['offset']=qs[_0xcd37('0x1c')](_0x1d875b[_0xcd37('0x2f')]['offset']);}_0x1bd0cd[_0xcd37('0x38')]=qs['sort'](_0x1d875b[_0xcd37('0x2f')]['sort']);_0x1bd0cd[_0xcd37('0x39')]=qs[_0xcd37('0x31')](_[_0xcd37('0x3a')](_0x1d875b[_0xcd37('0x2f')],_0x1e3fac[_0xcd37('0x31')]),_0x455794);if(_0x1d875b[_0xcd37('0x2f')]['filter']){_0x1bd0cd['where']=_[_0xcd37('0x3b')](_0x1bd0cd['where'],{'$or':_['map'](_0x455794,function(_0x4d70ba){if(_0x4d70ba[_0xcd37('0x2c')]!==_0xcd37('0x3c')){var _0x11b02f={};_0x11b02f[_0x4d70ba[_0xcd37('0x27')]]={'$like':'%'+_0x1d875b[_0xcd37('0x2f')][_0xcd37('0x3d')]+'%'};return _0x11b02f;}})});}_0x1bd0cd=_[_0xcd37('0x3b')]({},_0x1bd0cd,_0x1d875b[_0xcd37('0x3e')]);var _0x4d20d7={'where':_0x1bd0cd[_0xcd37('0x39')]};return db['VoiceDialReport'][_0xcd37('0x1f')](_0x4d20d7)[_0xcd37('0x24')](function(_0x4fa21b){_0x46e76a[_0xcd37('0x1f')]=_0x4fa21b;if(_0x1d875b[_0xcd37('0x2f')][_0xcd37('0x3f')]){_0x1bd0cd['include']=[{'all':!![]}];}return db[_0xcd37('0x40')][_0xcd37('0x41')](_0x1bd0cd);})[_0xcd37('0x24')](function(_0x2fad65){_0x46e76a[_0xcd37('0x42')]=_0x2fad65;return _0x46e76a;})[_0xcd37('0x24')](respondWithFilteredResult(_0x4f746f,_0x1bd0cd))[_0xcd37('0x43')](handleError(_0x4f746f,null));};exports['show']=function(_0x20945a,_0x5f32cb){var _0x200b56={'raw':!![],'where':{'id':_0x20945a[_0xcd37('0x44')]['id']}},_0x4848e8={};_0x4848e8[_0xcd37('0x32')]=_[_0xcd37('0x30')](db[_0xcd37('0x40')][_0xcd37('0x2a')]);_0x4848e8['query']=_[_0xcd37('0x30')](_0x20945a[_0xcd37('0x2f')]);_0x4848e8['filters']=_[_0xcd37('0x34')](_0x4848e8[_0xcd37('0x32')],_0x4848e8[_0xcd37('0x2f')]);_0x200b56[_0xcd37('0x33')]=_['intersection'](_0x4848e8[_0xcd37('0x32')],qs['fields'](_0x20945a[_0xcd37('0x2f')][_0xcd37('0x35')]));_0x200b56[_0xcd37('0x33')]=_0x200b56[_0xcd37('0x33')][_0xcd37('0x36')]?_0x200b56[_0xcd37('0x33')]:_0x4848e8['model'];if(_0x20945a[_0xcd37('0x2f')][_0xcd37('0x3f')]){_0x200b56[_0xcd37('0x45')]=[{'all':!![]}];}_0x200b56=_[_0xcd37('0x3b')]({},_0x200b56,_0x20945a['options']);return db[_0xcd37('0x40')][_0xcd37('0x46')](_0x200b56)['then'](handleEntityNotFound(_0x5f32cb,null))[_0xcd37('0x24')](respondWithResult(_0x5f32cb,null))['catch'](handleError(_0x5f32cb,null));};exports['create']=function(_0x2f48ef,_0x2553ce){return db['VoiceDialReport'][_0xcd37('0x47')](_0x2f48ef[_0xcd37('0x48')],{})[_0xcd37('0x24')](respondWithResult(_0x2553ce,0xc9))[_0xcd37('0x43')](handleError(_0x2553ce,null));};exports[_0xcd37('0x49')]=function(_0x22cda5,_0x1b9718){if(_0x22cda5[_0xcd37('0x48')]['id']){delete _0x22cda5['body']['id'];}return db[_0xcd37('0x40')]['find']({'where':{'id':_0x22cda5[_0xcd37('0x44')]['id']}})['then'](handleEntityNotFound(_0x1b9718,null))[_0xcd37('0x24')](saveUpdates(_0x22cda5[_0xcd37('0x48')],null))['then'](respondWithResult(_0x1b9718,null))['catch'](handleError(_0x1b9718,null));};exports[_0xcd37('0x25')]=function(_0x309b0,_0x448a75){return db['VoiceDialReport'][_0xcd37('0x46')]({'where':{'id':_0x309b0[_0xcd37('0x44')]['id']}})[_0xcd37('0x24')](handleEntityNotFound(_0x448a75,null))[_0xcd37('0x24')](removeEntity(_0x448a75,null))['catch'](handleError(_0x448a75,null));};exports['describe']=function(_0x25baed,_0x3c5cea){return db[_0xcd37('0x40')][_0xcd37('0x4a')]()[_0xcd37('0x24')](respondWithResult(_0x3c5cea,null))[_0xcd37('0x43')](handleError(_0x3c5cea,null));};
\ No newline at end of file
+var _0x136c=['attributes','fields','length','hasOwnProperty','sort','where','pick','filter','merge','VIRTUAL','options','VoiceDialReport','includeAll','include','findAll','rows','find','catch','create','body','params','describe','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','sendStatus','status','undefined','limit','count','offset','apply','reject','update','then','destroy','end','error','name','send','map','rawAttributes','fieldName','key','model','query','keys','filters','intersection'];(function(_0x229756,_0x33e3f4){var _0x11c53f=function(_0xb87f81){while(--_0xb87f81){_0x229756['push'](_0x229756['shift']());}};_0x11c53f(++_0x33e3f4);}(_0x136c,0xf1));var _0xc136=function(_0x3a2c37,_0x4a7bc6){_0x3a2c37=_0x3a2c37-0x0;var _0x3ed66c=_0x136c[_0x3a2c37];return _0x3ed66c;};'use strict';var emlformat=require(_0xc136('0x0'));var rimraf=require(_0xc136('0x1'));var zipdir=require(_0xc136('0x2'));var jsonpatch=require(_0xc136('0x3'));var rp=require('request-promise');var moment=require(_0xc136('0x4'));var BPromise=require(_0xc136('0x5'));var Mustache=require(_0xc136('0x6'));var util=require(_0xc136('0x7'));var path=require(_0xc136('0x8'));var sox=require(_0xc136('0x9'));var csv=require(_0xc136('0xa'));var ejs=require(_0xc136('0xb'));var fs=require('fs');var fs_extra=require(_0xc136('0xc'));var _=require(_0xc136('0xd'));var squel=require('squel');var crypto=require(_0xc136('0xe'));var jsforce=require(_0xc136('0xf'));var deskjs=require(_0xc136('0x10'));var toCsv=require(_0xc136('0xa'));var querystring=require(_0xc136('0x11'));var Papa=require(_0xc136('0x12'));var Redis=require(_0xc136('0x13'));var authService=require(_0xc136('0x14'));var qs=require('../../components/parsers/qs');var as=require(_0xc136('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xc136('0x16'))(_0xc136('0x17'));var utils=require(_0xc136('0x18'));var config=require(_0xc136('0x19'));var licenseUtil=require(_0xc136('0x1a'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x9226db,_0x3aa1a4){_0x3aa1a4=_0x3aa1a4||0xcc;return function(_0x5d08aa){if(_0x5d08aa){return _0x9226db[_0xc136('0x1b')](_0x3aa1a4);}return _0x9226db[_0xc136('0x1c')](_0x3aa1a4)['end']();};}function respondWithResult(_0x33e8e4,_0x16e88b){_0x16e88b=_0x16e88b||0xc8;return function(_0x17a3a3){if(_0x17a3a3){return _0x33e8e4[_0xc136('0x1c')](_0x16e88b)['json'](_0x17a3a3);}};}function respondWithFilteredResult(_0x3fd1fc,_0x296a15){return function(_0x592f09){if(_0x592f09){var _0x2fda07=typeof _0x296a15['offset']===_0xc136('0x1d')&&typeof _0x296a15[_0xc136('0x1e')]===_0xc136('0x1d');var _0x548608=_0x592f09['count'];var _0x1538cc=_0x2fda07?0x0:_0x296a15['offset'];var _0x42cc6=_0x2fda07?_0x592f09[_0xc136('0x1f')]:_0x296a15[_0xc136('0x20')]+_0x296a15[_0xc136('0x1e')];var _0x329acb;if(_0x42cc6>=_0x548608){_0x42cc6=_0x548608;_0x329acb=0xc8;}else{_0x329acb=0xce;}_0x3fd1fc[_0xc136('0x1c')](_0x329acb);return _0x3fd1fc['set']('Content-Range',_0x1538cc+'-'+_0x42cc6+'/'+_0x548608)['json'](_0x592f09);}return null;};}function patchUpdates(_0x547ca1){return function(_0x226177){try{jsonpatch[_0xc136('0x21')](_0x226177,_0x547ca1,!![]);}catch(_0x3feef2){return BPromise[_0xc136('0x22')](_0x3feef2);}return _0x226177['save']();};}function saveUpdates(_0x47e61c,_0x2da3b6){return function(_0x2edd98){if(_0x2edd98){return _0x2edd98[_0xc136('0x23')](_0x47e61c)[_0xc136('0x24')](function(_0x57060c){return _0x57060c;});}return null;};}function removeEntity(_0x165617,_0x3fc526){return function(_0x27da0c){if(_0x27da0c){return _0x27da0c[_0xc136('0x25')]()[_0xc136('0x24')](function(){_0x165617['status'](0xcc)[_0xc136('0x26')]();});}};}function handleEntityNotFound(_0x49416a,_0x1ab7b4){return function(_0x19f663){if(!_0x19f663){_0x49416a['sendStatus'](0x194);}return _0x19f663;};}function handleError(_0x9282b1,_0x3111bd){_0x3111bd=_0x3111bd||0x1f4;return function(_0x1e6580){logger[_0xc136('0x27')](_0x1e6580['stack']);if(_0x1e6580[_0xc136('0x28')]){delete _0x1e6580[_0xc136('0x28')];}_0x9282b1[_0xc136('0x1c')](_0x3111bd)[_0xc136('0x29')](_0x1e6580);};}exports['index']=function(_0x40444a,_0x51b058){var _0x22a4fc={},_0x4e697f={},_0x5dd730={'count':0x0,'rows':[]};var _0x3bb38f=_[_0xc136('0x2a')](db['VoiceDialReport'][_0xc136('0x2b')],function(_0x236584){return{'name':_0x236584[_0xc136('0x2c')],'type':_0x236584['type'][_0xc136('0x2d')]};});_0x4e697f[_0xc136('0x2e')]=_[_0xc136('0x2a')](_0x3bb38f,_0xc136('0x28'));_0x4e697f[_0xc136('0x2f')]=_[_0xc136('0x30')](_0x40444a[_0xc136('0x2f')]);_0x4e697f[_0xc136('0x31')]=_[_0xc136('0x32')](_0x4e697f[_0xc136('0x2e')],_0x4e697f[_0xc136('0x2f')]);_0x22a4fc[_0xc136('0x33')]=_['intersection'](_0x4e697f[_0xc136('0x2e')],qs[_0xc136('0x34')](_0x40444a[_0xc136('0x2f')]['fields']));_0x22a4fc[_0xc136('0x33')]=_0x22a4fc['attributes'][_0xc136('0x35')]?_0x22a4fc[_0xc136('0x33')]:_0x4e697f[_0xc136('0x2e')];if(!_0x40444a[_0xc136('0x2f')][_0xc136('0x36')]('nolimit')){_0x22a4fc['limit']=qs[_0xc136('0x1e')](_0x40444a['query']['limit']);_0x22a4fc[_0xc136('0x20')]=qs[_0xc136('0x20')](_0x40444a[_0xc136('0x2f')][_0xc136('0x20')]);}_0x22a4fc['order']=qs[_0xc136('0x37')](_0x40444a[_0xc136('0x2f')][_0xc136('0x37')]);_0x22a4fc[_0xc136('0x38')]=qs['filters'](_[_0xc136('0x39')](_0x40444a[_0xc136('0x2f')],_0x4e697f[_0xc136('0x31')]),_0x3bb38f);if(_0x40444a['query'][_0xc136('0x3a')]){_0x22a4fc['where']=_[_0xc136('0x3b')](_0x22a4fc[_0xc136('0x38')],{'$or':_[_0xc136('0x2a')](_0x3bb38f,function(_0x3b7114){if(_0x3b7114['type']!==_0xc136('0x3c')){var _0x882a78={};_0x882a78[_0x3b7114[_0xc136('0x28')]]={'$like':'%'+_0x40444a[_0xc136('0x2f')][_0xc136('0x3a')]+'%'};return _0x882a78;}})});}_0x22a4fc=_['merge']({},_0x22a4fc,_0x40444a[_0xc136('0x3d')]);var _0x1fe2b2={'where':_0x22a4fc['where']};return db[_0xc136('0x3e')][_0xc136('0x1f')](_0x1fe2b2)[_0xc136('0x24')](function(_0x12da60){_0x5dd730[_0xc136('0x1f')]=_0x12da60;if(_0x40444a[_0xc136('0x2f')][_0xc136('0x3f')]){_0x22a4fc[_0xc136('0x40')]=[{'all':!![]}];}return db[_0xc136('0x3e')][_0xc136('0x41')](_0x22a4fc);})[_0xc136('0x24')](function(_0x1972f4){_0x5dd730[_0xc136('0x42')]=_0x1972f4;return _0x5dd730;})[_0xc136('0x24')](respondWithFilteredResult(_0x51b058,_0x22a4fc))['catch'](handleError(_0x51b058,null));};exports['show']=function(_0x34b2a1,_0x20ff66){var _0x3997f9={'raw':!![],'where':{'id':_0x34b2a1['params']['id']}},_0x4f3be5={};_0x4f3be5[_0xc136('0x2e')]=_[_0xc136('0x30')](db[_0xc136('0x3e')][_0xc136('0x2b')]);_0x4f3be5[_0xc136('0x2f')]=_[_0xc136('0x30')](_0x34b2a1[_0xc136('0x2f')]);_0x4f3be5[_0xc136('0x31')]=_[_0xc136('0x32')](_0x4f3be5[_0xc136('0x2e')],_0x4f3be5[_0xc136('0x2f')]);_0x3997f9['attributes']=_[_0xc136('0x32')](_0x4f3be5[_0xc136('0x2e')],qs[_0xc136('0x34')](_0x34b2a1[_0xc136('0x2f')][_0xc136('0x34')]));_0x3997f9[_0xc136('0x33')]=_0x3997f9[_0xc136('0x33')][_0xc136('0x35')]?_0x3997f9[_0xc136('0x33')]:_0x4f3be5[_0xc136('0x2e')];if(_0x34b2a1[_0xc136('0x2f')][_0xc136('0x3f')]){_0x3997f9[_0xc136('0x40')]=[{'all':!![]}];}_0x3997f9=_[_0xc136('0x3b')]({},_0x3997f9,_0x34b2a1[_0xc136('0x3d')]);return db[_0xc136('0x3e')][_0xc136('0x43')](_0x3997f9)[_0xc136('0x24')](handleEntityNotFound(_0x20ff66,null))['then'](respondWithResult(_0x20ff66,null))[_0xc136('0x44')](handleError(_0x20ff66,null));};exports[_0xc136('0x45')]=function(_0x362b10,_0x4ea54e){return db[_0xc136('0x3e')][_0xc136('0x45')](_0x362b10['body'],{})[_0xc136('0x24')](respondWithResult(_0x4ea54e,0xc9))[_0xc136('0x44')](handleError(_0x4ea54e,null));};exports[_0xc136('0x23')]=function(_0x3c34d8,_0x200ba0){if(_0x3c34d8[_0xc136('0x46')]['id']){delete _0x3c34d8[_0xc136('0x46')]['id'];}return db[_0xc136('0x3e')][_0xc136('0x43')]({'where':{'id':_0x3c34d8[_0xc136('0x47')]['id']}})[_0xc136('0x24')](handleEntityNotFound(_0x200ba0,null))['then'](saveUpdates(_0x3c34d8[_0xc136('0x46')],null))[_0xc136('0x24')](respondWithResult(_0x200ba0,null))['catch'](handleError(_0x200ba0,null));};exports[_0xc136('0x25')]=function(_0x455289,_0x5e3bef){return db[_0xc136('0x3e')][_0xc136('0x43')]({'where':{'id':_0x455289['params']['id']}})[_0xc136('0x24')](handleEntityNotFound(_0x5e3bef,null))['then'](removeEntity(_0x5e3bef,null))['catch'](handleError(_0x5e3bef,null));};exports[_0xc136('0x48')]=function(_0xe6e3ac,_0x382e68){return db[_0xc136('0x3e')][_0xc136('0x48')]()[_0xc136('0x24')](respondWithResult(_0x382e68,null))[_0xc136('0x44')](handleError(_0x382e68,null));};
\ No newline at end of file
index 69dd067..23d6ea6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7722=['lodash','util','../../config/logger','moment','bluebird','request-promise','path','rimraf','../../config/environment','./voiceDialReport.attributes','exports','VoiceDialReport','report_dial'];(function(_0x48fc23,_0x4b282d){var _0x512eaf=function(_0x2fd3fe){while(--_0x2fd3fe){_0x48fc23['push'](_0x48fc23['shift']());}};_0x512eaf(++_0x4b282d);}(_0x7722,0xdd));var _0x2772=function(_0x1e958d,_0x5354b1){_0x1e958d=_0x1e958d-0x0;var _0x3dd918=_0x7722[_0x1e958d];return _0x3dd918;};'use strict';var _=require(_0x2772('0x0'));var util=require(_0x2772('0x1'));var logger=require(_0x2772('0x2'))('api');var moment=require(_0x2772('0x3'));var BPromise=require(_0x2772('0x4'));var rp=require(_0x2772('0x5'));var fs=require('fs');var path=require(_0x2772('0x6'));var rimraf=require(_0x2772('0x7'));var config=require(_0x2772('0x8'));var attributes=require(_0x2772('0x9'));module[_0x2772('0xa')]=function(_0x4012c8,_0x375b5a){return _0x4012c8['define'](_0x2772('0xb'),attributes,{'tableName':_0x2772('0xc'),'paranoid':![],'indexes':[{'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xdc03=['define','report_dial','lodash','../../config/logger','api','bluebird','request-promise','path','rimraf','../../config/environment','./voiceDialReport.attributes'];(function(_0x2aa992,_0x8558f5){var _0x56e549=function(_0x312d50){while(--_0x312d50){_0x2aa992['push'](_0x2aa992['shift']());}};_0x56e549(++_0x8558f5);}(_0xdc03,0x65));var _0x3dc0=function(_0x279c57,_0x4a77a2){_0x279c57=_0x279c57-0x0;var _0x22b263=_0xdc03[_0x279c57];return _0x22b263;};'use strict';var _=require(_0x3dc0('0x0'));var util=require('util');var logger=require(_0x3dc0('0x1'))(_0x3dc0('0x2'));var moment=require('moment');var BPromise=require(_0x3dc0('0x3'));var rp=require(_0x3dc0('0x4'));var fs=require('fs');var path=require(_0x3dc0('0x5'));var rimraf=require(_0x3dc0('0x6'));var config=require(_0x3dc0('0x7'));var attributes=require(_0x3dc0('0x8'));module['exports']=function(_0x3c5407,_0x20c408){return _0x3c5407[_0x3dc0('0x9')]('VoiceDialReport',attributes,{'tableName':_0x3dc0('0xa'),'paranoid':![],'indexes':[{'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
index 6756e75..1cc755e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb388=['randomstring','ioredis','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','info','VoiceDialReport,\x20%s,\x20%s','request\x20sent','debug','VoiceDialReport,\x20%s,\x20%s,\x20%s','error','code','message','catch','VoiceDialReport','body','options','raw','then','CreateVoiceDialReport','UpdateVoiceDialReport','where','attributes','limit','stringify','lodash','moment','bluebird'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0xb388,0xdd));var _0x8b38=function(_0x59b229,_0x54d51a){_0x59b229=_0x59b229-0x0;var _0x32b4d2=_0xb388[_0x59b229];return _0x32b4d2;};'use strict';var _=require(_0x8b38('0x0'));var util=require('util');var moment=require(_0x8b38('0x1'));var BPromise=require(_0x8b38('0x2'));var rs=require(_0x8b38('0x3'));var fs=require('fs');var Redis=require(_0x8b38('0x4'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x8b38('0x5'))(_0x8b38('0x6'));var config=require(_0x8b38('0x7'));var jayson=require(_0x8b38('0x8'));var client=jayson[_0x8b38('0x9')][_0x8b38('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4c4e34,_0x45783a,_0x63d36d){return new BPromise(function(_0xb5603d,_0x12624a){return client[_0x8b38('0xb')](_0x4c4e34,_0x63d36d)['then'](function(_0xf03395){logger[_0x8b38('0xc')](_0x8b38('0xd'),_0x45783a,_0x8b38('0xe'));logger[_0x8b38('0xf')](_0x8b38('0x10'),_0x45783a,_0x8b38('0xe'),JSON['stringify'](_0xf03395));if(_0xf03395[_0x8b38('0x11')]){if(_0xf03395[_0x8b38('0x11')][_0x8b38('0x12')]===0x1f4){logger[_0x8b38('0x11')](_0x8b38('0xd'),_0x45783a,_0xf03395[_0x8b38('0x11')][_0x8b38('0x13')]);return _0x12624a(_0xf03395['error'][_0x8b38('0x13')]);}logger[_0x8b38('0x11')](_0x8b38('0xd'),_0x45783a,_0xf03395[_0x8b38('0x11')][_0x8b38('0x13')]);return _0xb5603d(_0xf03395[_0x8b38('0x11')][_0x8b38('0x13')]);}else{logger[_0x8b38('0xc')](_0x8b38('0xd'),_0x45783a,_0x8b38('0xe'));_0xb5603d(_0xf03395['result']['message']);}})[_0x8b38('0x14')](function(_0x2dc957){logger[_0x8b38('0x11')]('VoiceDialReport,\x20%s,\x20%s',_0x45783a,_0x2dc957);_0x12624a(_0x2dc957);});});}exports['CreateVoiceDialReport']=function(_0x3b3a01){var _0x3e49f3=this;return new Promise(function(_0x484149,_0x4f4491){return db[_0x8b38('0x15')]['create'](_0x3b3a01[_0x8b38('0x16')],{'raw':_0x3b3a01[_0x8b38('0x17')]?_0x3b3a01[_0x8b38('0x17')][_0x8b38('0x18')]===undefined?!![]:![]:!![]})[_0x8b38('0x19')](function(_0x4eb0c2){logger[_0x8b38('0xc')]('CreateVoiceDialReport',_0x3b3a01);logger[_0x8b38('0xf')](_0x8b38('0x1a'),_0x3b3a01,JSON['stringify'](_0x4eb0c2));_0x484149(_0x4eb0c2);})[_0x8b38('0x14')](function(_0x5d7371){logger['error']('CreateVoiceDialReport',_0x5d7371[_0x8b38('0x13')],_0x3b3a01);_0x4f4491(_0x3e49f3[_0x8b38('0x11')](0x1f4,_0x5d7371[_0x8b38('0x13')]));});});};exports[_0x8b38('0x1b')]=function(_0x431436){var _0x279898=this;return new Promise(function(_0x29e232,_0x1081a6){return db[_0x8b38('0x15')]['update'](_0x431436[_0x8b38('0x16')],{'raw':_0x431436[_0x8b38('0x17')]?_0x431436['options'][_0x8b38('0x18')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x431436['options']?_0x431436[_0x8b38('0x17')][_0x8b38('0x1c')]||null:null,'attributes':_0x431436[_0x8b38('0x17')]?_0x431436[_0x8b38('0x17')][_0x8b38('0x1d')]||null:null,'limit':_0x431436[_0x8b38('0x17')]?_0x431436['options'][_0x8b38('0x1e')]||null:null})[_0x8b38('0x19')](function(_0x546ae8){logger['info'](_0x8b38('0x1b'),_0x431436);logger[_0x8b38('0xf')](_0x8b38('0x1b'),_0x431436,JSON[_0x8b38('0x1f')](_0x546ae8));_0x29e232(_0x546ae8);})[_0x8b38('0x14')](function(_0x2dad2a){logger['error'](_0x8b38('0x1b'),_0x2dad2a[_0x8b38('0x13')],_0x431436);_0x1081a6(_0x279898['error'](0x1f4,_0x2dad2a[_0x8b38('0x13')]));});});};
\ No newline at end of file
+var _0x3bd6=['../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','debug','VoiceDialReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','code','VoiceDialReport,\x20%s,\x20%s','message','result','catch','CreateVoiceDialReport','VoiceDialReport','create','body','options','raw','info','UpdateVoiceDialReport','update','attributes','lodash','util','moment','randomstring','ioredis','../../mysqldb'];(function(_0x273219,_0x531528){var _0x233a8e=function(_0x3d779f){while(--_0x3d779f){_0x273219['push'](_0x273219['shift']());}};_0x233a8e(++_0x531528);}(_0x3bd6,0x192));var _0x63bd=function(_0x4a8c74,_0x41dc25){_0x4a8c74=_0x4a8c74-0x0;var _0x459b7f=_0x3bd6[_0x4a8c74];return _0x459b7f;};'use strict';var _=require(_0x63bd('0x0'));var util=require(_0x63bd('0x1'));var moment=require(_0x63bd('0x2'));var BPromise=require('bluebird');var rs=require(_0x63bd('0x3'));var fs=require('fs');var Redis=require(_0x63bd('0x4'));var db=require(_0x63bd('0x5'))['db'];var utils=require(_0x63bd('0x6'));var logger=require(_0x63bd('0x7'))('rpc');var config=require(_0x63bd('0x8'));var jayson=require(_0x63bd('0x9'));var client=jayson[_0x63bd('0xa')][_0x63bd('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x16d181,_0x2c4746,_0x29b595){return new BPromise(function(_0x1c4c2e,_0x46c4cc){return client[_0x63bd('0xc')](_0x16d181,_0x29b595)[_0x63bd('0xd')](function(_0x544ec1){logger['info']('VoiceDialReport,\x20%s,\x20%s',_0x2c4746,'request\x20sent');logger[_0x63bd('0xe')](_0x63bd('0xf'),_0x2c4746,_0x63bd('0x10'),JSON[_0x63bd('0x11')](_0x544ec1));if(_0x544ec1[_0x63bd('0x12')]){if(_0x544ec1['error'][_0x63bd('0x13')]===0x1f4){logger[_0x63bd('0x12')](_0x63bd('0x14'),_0x2c4746,_0x544ec1['error'][_0x63bd('0x15')]);return _0x46c4cc(_0x544ec1[_0x63bd('0x12')][_0x63bd('0x15')]);}logger[_0x63bd('0x12')](_0x63bd('0x14'),_0x2c4746,_0x544ec1[_0x63bd('0x12')][_0x63bd('0x15')]);return _0x1c4c2e(_0x544ec1[_0x63bd('0x12')]['message']);}else{logger['info'](_0x63bd('0x14'),_0x2c4746,_0x63bd('0x10'));_0x1c4c2e(_0x544ec1[_0x63bd('0x16')][_0x63bd('0x15')]);}})[_0x63bd('0x17')](function(_0x3310c6){logger[_0x63bd('0x12')](_0x63bd('0x14'),_0x2c4746,_0x3310c6);_0x46c4cc(_0x3310c6);});});}exports[_0x63bd('0x18')]=function(_0x1270ea){var _0x498553=this;return new Promise(function(_0x368252,_0x480090){return db[_0x63bd('0x19')][_0x63bd('0x1a')](_0x1270ea[_0x63bd('0x1b')],{'raw':_0x1270ea[_0x63bd('0x1c')]?_0x1270ea[_0x63bd('0x1c')][_0x63bd('0x1d')]===undefined?!![]:![]:!![]})[_0x63bd('0xd')](function(_0x16cf2d){logger[_0x63bd('0x1e')](_0x63bd('0x18'),_0x1270ea);logger[_0x63bd('0xe')]('CreateVoiceDialReport',_0x1270ea,JSON['stringify'](_0x16cf2d));_0x368252(_0x16cf2d);})[_0x63bd('0x17')](function(_0x54327b){logger[_0x63bd('0x12')](_0x63bd('0x18'),_0x54327b[_0x63bd('0x15')],_0x1270ea);_0x480090(_0x498553[_0x63bd('0x12')](0x1f4,_0x54327b[_0x63bd('0x15')]));});});};exports[_0x63bd('0x1f')]=function(_0xd57f47){var _0x2605bc=this;return new Promise(function(_0x304629,_0x39e822){return db[_0x63bd('0x19')][_0x63bd('0x20')](_0xd57f47['body'],{'raw':_0xd57f47['options']?_0xd57f47[_0x63bd('0x1c')][_0x63bd('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0xd57f47[_0x63bd('0x1c')]?_0xd57f47['options']['where']||null:null,'attributes':_0xd57f47['options']?_0xd57f47[_0x63bd('0x1c')][_0x63bd('0x21')]||null:null,'limit':_0xd57f47['options']?_0xd57f47['options']['limit']||null:null})['then'](function(_0x2aa96c){logger['info'](_0x63bd('0x1f'),_0xd57f47);logger[_0x63bd('0xe')](_0x63bd('0x1f'),_0xd57f47,JSON[_0x63bd('0x11')](_0x2aa96c));_0x304629(_0x2aa96c);})[_0x63bd('0x17')](function(_0x4dfa1c){logger[_0x63bd('0x12')]('UpdateVoiceDialReport',_0x4dfa1c[_0x63bd('0x15')],_0xd57f47);_0x39e822(_0x2605bc['error'](0x1f4,_0x4dfa1c[_0x63bd('0x15')]));});});};
\ No newline at end of file
index cc62551..147a839 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb2bb=['./voiceExtension.controller','get','isAuthenticated','index','/:id','show','post','/:id/applications','addApplications','put','delete','destroy','exports','util','path','connect-timeout','Router','../../components/auth/service'];(function(_0x3df2d3,_0x4d1e77){var _0x435e6d=function(_0x429ee6){while(--_0x429ee6){_0x3df2d3['push'](_0x3df2d3['shift']());}};_0x435e6d(++_0x4d1e77);}(_0xb2bb,0x67));var _0xbb2b=function(_0x31991b,_0xaf75d2){_0x31991b=_0x31991b-0x0;var _0x307304=_0xb2bb[_0x31991b];return _0x307304;};'use strict';var multer=require('multer');var util=require(_0xbb2b('0x0'));var path=require(_0xbb2b('0x1'));var timeout=require(_0xbb2b('0x2'));var express=require('express');var router=express[_0xbb2b('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0xbb2b('0x4'));var interaction=require('../../components/interaction/service');var config=require('../../config/environment');var controller=require(_0xbb2b('0x5'));router[_0xbb2b('0x6')]('/',auth[_0xbb2b('0x7')](),controller[_0xbb2b('0x8')]);router['get'](_0xbb2b('0x9'),auth[_0xbb2b('0x7')](),controller[_0xbb2b('0xa')]);router['post']('/',auth[_0xbb2b('0x7')](),controller['create']);router[_0xbb2b('0xb')](_0xbb2b('0xc'),auth['isAuthenticated'](),controller[_0xbb2b('0xd')]);router[_0xbb2b('0xe')](_0xbb2b('0x9'),auth[_0xbb2b('0x7')](),controller['update']);router[_0xbb2b('0xf')](_0xbb2b('0x9'),auth[_0xbb2b('0x7')](),controller[_0xbb2b('0x10')]);module[_0xbb2b('0x11')]=router;
\ No newline at end of file
+var _0xa743=['update','delete','exports','multer','connect-timeout','express','Router','../../components/auth/service','../../components/interaction/service','./voiceExtension.controller','isAuthenticated','index','get','/:id','show','post','/:id/applications','put'];(function(_0x383356,_0x33d2f5){var _0x32ee5a=function(_0x2741db){while(--_0x2741db){_0x383356['push'](_0x383356['shift']());}};_0x32ee5a(++_0x33d2f5);}(_0xa743,0x1e9));var _0x3a74=function(_0x50f0a9,_0x2b0c57){_0x50f0a9=_0x50f0a9-0x0;var _0x5a33d9=_0xa743[_0x50f0a9];return _0x5a33d9;};'use strict';var multer=require(_0x3a74('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x3a74('0x1'));var express=require(_0x3a74('0x2'));var router=express[_0x3a74('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x3a74('0x4'));var interaction=require(_0x3a74('0x5'));var config=require('../../config/environment');var controller=require(_0x3a74('0x6'));router['get']('/',auth[_0x3a74('0x7')](),controller[_0x3a74('0x8')]);router[_0x3a74('0x9')](_0x3a74('0xa'),auth[_0x3a74('0x7')](),controller[_0x3a74('0xb')]);router['post']('/',auth[_0x3a74('0x7')](),controller['create']);router[_0x3a74('0xc')](_0x3a74('0xd'),auth['isAuthenticated'](),controller['addApplications']);router[_0x3a74('0xe')]('/:id',auth[_0x3a74('0x7')](),controller[_0x3a74('0xf')]);router[_0x3a74('0x10')]('/:id',auth[_0x3a74('0x7')](),controller['destroy']);module[_0x3a74('0x11')]=router;
\ No newline at end of file
index 4104f09..0909bbc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfefa=['sequelize','exports','STRING','compositeIndex','ENUM','inbound','outbound','internal','outbound-fax','*,*,*,*','INTEGER','BOOLEAN','wav','VIRTUAL','getDataValue','exten'];(function(_0x4a7955,_0x10b2f6){var _0x2371fb=function(_0x31924e){while(--_0x31924e){_0x4a7955['push'](_0x4a7955['shift']());}};_0x2371fb(++_0x10b2f6);}(_0xfefa,0x130));var _0xafef=function(_0x512940,_0x137667){_0x512940=_0x512940-0x0;var _0xfdd8b4=_0xfefa[_0x512940];return _0xfdd8b4;};'use strict';var Sequelize=require(_0xafef('0x0'));module[_0xafef('0x1')]={'context':{'type':Sequelize[_0xafef('0x2')],'allowNull':![],'unique':'compositeIndex','validate':{'notEmpty':!![],'is':/[A-Za-z0-9._\+*!\-\[\]]+$/i}},'exten':{'type':Sequelize[_0xafef('0x2')],'allowNull':![],'unique':'compositeIndex'},'priority':{'type':Sequelize[_0xafef('0x2')],'allowNull':![],'defaultValue':'1','unique':_0xafef('0x3')},'tag':{'type':Sequelize[_0xafef('0x2')],'allowNull':![],'defaultValue':'--'},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'NoOp'},'appdata':{'type':Sequelize[_0xafef('0x2')](0x1000),'allowNull':!![],'defaultValue':''},'type':{'type':Sequelize[_0xafef('0x4')](_0xafef('0x5'),_0xafef('0x6'),_0xafef('0x7'),'inbound-fax',_0xafef('0x8'),'system','any'),'allowNull':![]},'description':{'type':Sequelize[_0xafef('0x2')]},'interval':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xafef('0x9')},'IntervalId':{'type':Sequelize[_0xafef('0xa')]},'isApp':{'type':Sequelize['BOOLEAN'],'allowNull':![],'defaultValue':![]},'appType':{'type':Sequelize[_0xafef('0x2')],'defaultValue':null},'callerID':{'type':Sequelize[_0xafef('0x2')],'allowNull':!![]},'record':{'type':Sequelize[_0xafef('0xb')],'defaultValue':![]},'cutdigits':{'type':Sequelize[_0xafef('0xa')]},'recordingFormat':{'type':Sequelize[_0xafef('0x2')],'defaultValue':_0xafef('0xc')},'answer':{'type':Sequelize[_0xafef('0xb')],'defaultValue':!![]},'name':{'type':Sequelize[_0xafef('0xd')],'get':function(_0xad1bd8){return this[_0xafef('0xe')](_0xafef('0xf'));}},'alias':{'type':Sequelize[_0xafef('0x2')],'allowNull':!![]}};
\ No newline at end of file
+var _0x2ddb=['compositeIndex','NoOp','ENUM','inbound','outbound','internal','inbound-fax','outbound-fax','system','*,*,*,*','INTEGER','BOOLEAN','wav','VIRTUAL','exten','sequelize','STRING'];(function(_0x4acd2b,_0x2f01a9){var _0x5caf90=function(_0x15b8c1){while(--_0x15b8c1){_0x4acd2b['push'](_0x4acd2b['shift']());}};_0x5caf90(++_0x2f01a9);}(_0x2ddb,0x1c9));var _0xb2dd=function(_0x2e0721,_0x10ee64){_0x2e0721=_0x2e0721-0x0;var _0x401ce1=_0x2ddb[_0x2e0721];return _0x401ce1;};'use strict';var Sequelize=require(_0xb2dd('0x0'));module['exports']={'context':{'type':Sequelize[_0xb2dd('0x1')],'allowNull':![],'unique':_0xb2dd('0x2'),'validate':{'notEmpty':!![],'is':/[A-Za-z0-9._\+*!\-\[\]]+$/i}},'exten':{'type':Sequelize[_0xb2dd('0x1')],'allowNull':![],'unique':_0xb2dd('0x2')},'priority':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'1','unique':_0xb2dd('0x2')},'tag':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':'--'},'app':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xb2dd('0x3')},'appdata':{'type':Sequelize[_0xb2dd('0x1')](0x1000),'allowNull':!![],'defaultValue':''},'type':{'type':Sequelize[_0xb2dd('0x4')](_0xb2dd('0x5'),_0xb2dd('0x6'),_0xb2dd('0x7'),_0xb2dd('0x8'),_0xb2dd('0x9'),_0xb2dd('0xa'),'any'),'allowNull':![]},'description':{'type':Sequelize[_0xb2dd('0x1')]},'interval':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':_0xb2dd('0xb')},'IntervalId':{'type':Sequelize[_0xb2dd('0xc')]},'isApp':{'type':Sequelize['BOOLEAN'],'allowNull':![],'defaultValue':![]},'appType':{'type':Sequelize[_0xb2dd('0x1')],'defaultValue':null},'callerID':{'type':Sequelize[_0xb2dd('0x1')],'allowNull':!![]},'record':{'type':Sequelize[_0xb2dd('0xd')],'defaultValue':![]},'cutdigits':{'type':Sequelize[_0xb2dd('0xc')]},'recordingFormat':{'type':Sequelize['STRING'],'defaultValue':_0xb2dd('0xe')},'answer':{'type':Sequelize[_0xb2dd('0xd')],'defaultValue':!![]},'name':{'type':Sequelize[_0xb2dd('0xf')],'get':function(_0x5cac9b){return this['getDataValue'](_0xb2dd('0x10'));}},'alias':{'type':Sequelize[_0xb2dd('0x1')],'allowNull':!![]}};
\ No newline at end of file
index 87974a7..71df242 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5db1=['exten','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','user','OutboundRoutes','outbound','autoAssociation','update','pick','description','cutdigits','alias','addApplications','transaction','sequelize','Transaction','ISOLATION_LEVELS','READ_COMMITTED','findOne','createRouting','findAndCountAll','cast(priority\x20as\x20unsigned)','ioredis','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','sendStatus','status','end','json','offset','undefined','limit','Content-Range','destroy','then','get','InboundRoutes','inbound','InternalRoutes','internal','filter','ignore','map','value','includes','type','find','name','UserProfileResource','error','stack','send','index','rawAttributes','fieldName','key','model','query','keys','filters','attributes','intersection','fields','length','nolimit','order','sort','where','VIRTUAL','merge','includeAll','include','VoiceExtension','findAll','rows','catch','params','options','create','body','startsWith'];(function(_0x4734d8,_0x479950){var _0x3b1120=function(_0x4a5d1c){while(--_0x4a5d1c){_0x4734d8['push'](_0x4734d8['shift']());}};_0x3b1120(++_0x479950);}(_0x5db1,0x118));var _0x15db=function(_0x570b50,_0x58a743){_0x570b50=_0x570b50-0x0;var _0x10742d=_0x5db1[_0x570b50];return _0x10742d;};'use strict';var _=require('lodash');var Redis=require(_0x15db('0x0'));var qs=require('../../components/parsers/qs');var logger=require('../../config/logger')(_0x15db('0x1'));var config=require(_0x15db('0x2'));var db=require(_0x15db('0x3'))['db'];config[_0x15db('0x4')]=_[_0x15db('0x5')](config[_0x15db('0x4')],{'host':_0x15db('0x6'),'port':0x18eb});var socket=require(_0x15db('0x7'))(new Redis(config['redis']));require('./voiceExtension.socket')['register'](socket);function respondWithStatusCode(_0x14cc8e,_0x30e94c){_0x30e94c=_0x30e94c||0xcc;return function(_0x24eed6){if(_0x24eed6){return _0x14cc8e[_0x15db('0x8')](_0x30e94c);}return _0x14cc8e[_0x15db('0x9')](_0x30e94c)[_0x15db('0xa')]();};}function respondWithResult(_0x595c82,_0x36d1c4){_0x36d1c4=_0x36d1c4||0xc8;return function(_0x4fe9f2){if(_0x4fe9f2){return _0x595c82[_0x15db('0x9')](_0x36d1c4)[_0x15db('0xb')](_0x4fe9f2);}};}function respondWithFilteredResult(_0x266655,_0x1061d9){return function(_0x3cebc5){if(_0x3cebc5){var _0x26684d=typeof _0x1061d9[_0x15db('0xc')]===_0x15db('0xd')&&typeof _0x1061d9['limit']===_0x15db('0xd');var _0x44ad86=_0x3cebc5['count'];var _0x2cbf68=_0x26684d?0x0:_0x1061d9[_0x15db('0xc')];var _0x27d187=_0x26684d?_0x3cebc5['count']:_0x1061d9[_0x15db('0xc')]+_0x1061d9[_0x15db('0xe')];var _0x32efc2;if(_0x27d187>=_0x44ad86){_0x27d187=_0x44ad86;_0x32efc2=0xc8;}else{_0x32efc2=0xce;}_0x266655['status'](_0x32efc2);return _0x266655['set'](_0x15db('0xf'),_0x2cbf68+'-'+_0x27d187+'/'+_0x44ad86)[_0x15db('0xb')](_0x3cebc5);}return null;};}function removeEntity(_0x360d55){return function(_0x28b60c){if(_0x28b60c){return _0x28b60c[_0x15db('0x10')]()[_0x15db('0x11')](function(){var _0x1df16f=_0x28b60c[_0x15db('0x12')]({'plain':!![]});var _0x31c341=[{'name':_0x15db('0x13'),'value':_0x15db('0x14'),'ignore':![]},{'name':'OutboundRoutes','value':'outbound','ignore':![]},{'name':_0x15db('0x15'),'value':_0x15db('0x16'),'ignore':![]}];var _0x2934b4=_(_0x31c341)[_0x15db('0x17')](_0x15db('0x18'))[_0x15db('0x19')](_0x15db('0x1a'))[_0x15db('0x1a')]();if(_[_0x15db('0x1b')](_0x2934b4,_0x1df16f[_0x15db('0x1c')])){return;}var _0x540a86=_[_0x15db('0x1d')](_0x31c341,[_0x15db('0x1a'),_0x1df16f[_0x15db('0x1c')]])[_0x15db('0x1e')];return db[_0x15db('0x1f')][_0x15db('0x10')]({'where':{'type':_0x540a86,'resourceId':_0x1df16f['id']}})['then'](function(){return _0x28b60c;});})['then'](function(){_0x360d55[_0x15db('0x9')](0xcc)[_0x15db('0xa')]();});}};}function handleEntityNotFound(_0x9597ba){return function(_0x102962){if(!_0x102962){_0x9597ba['sendStatus'](0x194);}return _0x102962;};}function handleError(_0x1a2f24,_0xb8576){_0xb8576=_0xb8576||0x1f4;return function(_0x13ee40){logger[_0x15db('0x20')](_0x13ee40[_0x15db('0x21')]);if(_0x13ee40['name']){delete _0x13ee40[_0x15db('0x1e')];}_0x1a2f24['status'](_0xb8576)[_0x15db('0x22')](_0x13ee40);};}exports[_0x15db('0x23')]=function(_0xafeeec,_0x3731c5){var _0x350079={},_0x26d1f5={},_0xccff02={'count':0x0,'rows':[]};var _0x59a0a=_[_0x15db('0x19')](db['VoiceExtension'][_0x15db('0x24')],function(_0x2f908b){return{'name':_0x2f908b[_0x15db('0x25')],'type':_0x2f908b[_0x15db('0x1c')][_0x15db('0x26')]};});_0x26d1f5[_0x15db('0x27')]=_[_0x15db('0x19')](_0x59a0a,_0x15db('0x1e'));_0x26d1f5[_0x15db('0x28')]=_[_0x15db('0x29')](_0xafeeec[_0x15db('0x28')]);_0x26d1f5[_0x15db('0x2a')]=_['intersection'](_0x26d1f5[_0x15db('0x27')],_0x26d1f5[_0x15db('0x28')]);_0x350079[_0x15db('0x2b')]=_[_0x15db('0x2c')](_0x26d1f5['model'],qs[_0x15db('0x2d')](_0xafeeec['query'][_0x15db('0x2d')]));_0x350079[_0x15db('0x2b')]=_0x350079['attributes'][_0x15db('0x2e')]?_0x350079[_0x15db('0x2b')]:_0x26d1f5['model'];if(!_0xafeeec[_0x15db('0x28')]['hasOwnProperty'](_0x15db('0x2f'))){_0x350079[_0x15db('0xe')]=qs[_0x15db('0xe')](_0xafeeec[_0x15db('0x28')][_0x15db('0xe')]);_0x350079[_0x15db('0xc')]=qs[_0x15db('0xc')](_0xafeeec[_0x15db('0x28')][_0x15db('0xc')]);}_0x350079[_0x15db('0x30')]=qs['sort'](_0xafeeec[_0x15db('0x28')][_0x15db('0x31')]);_0x350079[_0x15db('0x32')]=qs['filters'](_['pick'](_0xafeeec[_0x15db('0x28')],_0x26d1f5[_0x15db('0x2a')]),_0x59a0a);if(_0xafeeec[_0x15db('0x28')]['filter']){_0x350079[_0x15db('0x32')]=_['merge'](_0x350079[_0x15db('0x32')],{'$or':_[_0x15db('0x19')](_0x59a0a,function(_0x2dda72){if(_0x2dda72[_0x15db('0x1c')]!==_0x15db('0x33')){var _0x4ed32a={};_0x4ed32a[_0x2dda72['name']]={'$like':'%'+_0xafeeec['query'][_0x15db('0x17')]+'%'};return _0x4ed32a;}})});}_0x350079=_[_0x15db('0x34')]({},_0x350079,_0xafeeec['options']);var _0x27bfb8={'where':_0x350079[_0x15db('0x32')]};return db['VoiceExtension']['count'](_0x27bfb8)[_0x15db('0x11')](function(_0x365d58){_0xccff02['count']=_0x365d58;if(_0xafeeec[_0x15db('0x28')][_0x15db('0x35')]){_0x350079[_0x15db('0x36')]=[{'all':!![]}];}return db[_0x15db('0x37')][_0x15db('0x38')](_0x350079);})[_0x15db('0x11')](function(_0x3a1568){_0xccff02[_0x15db('0x39')]=_0x3a1568;return _0xccff02;})['then'](respondWithFilteredResult(_0x3731c5,_0x350079))[_0x15db('0x3a')](handleError(_0x3731c5,null));};exports['show']=function(_0x20e840,_0x3d89ad){var _0x1934aa={'raw':![],'where':{'id':_0x20e840[_0x15db('0x3b')]['id']}},_0x30541e={};_0x30541e['model']=_[_0x15db('0x29')](db[_0x15db('0x37')][_0x15db('0x24')]);_0x30541e['query']=_[_0x15db('0x29')](_0x20e840[_0x15db('0x28')]);_0x30541e[_0x15db('0x2a')]=_[_0x15db('0x2c')](_0x30541e[_0x15db('0x27')],_0x30541e[_0x15db('0x28')]);_0x1934aa[_0x15db('0x2b')]=_[_0x15db('0x2c')](_0x30541e[_0x15db('0x27')],qs[_0x15db('0x2d')](_0x20e840[_0x15db('0x28')][_0x15db('0x2d')]));_0x1934aa[_0x15db('0x2b')]=_0x1934aa['attributes']['length']?_0x1934aa[_0x15db('0x2b')]:_0x30541e[_0x15db('0x27')];if(_0x20e840[_0x15db('0x28')]['includeAll']){_0x1934aa['include']=[{'all':!![]}];}_0x1934aa=_[_0x15db('0x34')]({},_0x1934aa,_0x20e840[_0x15db('0x3c')]);return db[_0x15db('0x37')][_0x15db('0x1d')](_0x1934aa)[_0x15db('0x11')](handleEntityNotFound(_0x3d89ad,null))[_0x15db('0x11')](respondWithResult(_0x3d89ad,null))[_0x15db('0x3a')](handleError(_0x3d89ad,null));};exports[_0x15db('0x10')]=function(_0x22e9f8,_0x34fd7b){return db[_0x15db('0x37')][_0x15db('0x1d')]({'where':{'id':_0x22e9f8[_0x15db('0x3b')]['id']}})[_0x15db('0x11')](handleEntityNotFound(_0x34fd7b,null))[_0x15db('0x11')](removeEntity(_0x34fd7b,null))[_0x15db('0x3a')](handleError(_0x34fd7b,null));};exports[_0x15db('0x3d')]=function(_0x37d32e,_0x12a5b5){if(_0x37d32e[_0x15db('0x3e')][_0x15db('0x1c')]==='outbound'&&!_[_0x15db('0x3f')](_0x37d32e[_0x15db('0x3e')][_0x15db('0x40')],'_')){_0x37d32e[_0x15db('0x3e')][_0x15db('0x40')]='_'['concat'](_0x37d32e[_0x15db('0x3e')]['exten']);}return db[_0x15db('0x37')][_0x15db('0x3d')](_0x37d32e[_0x15db('0x3e')],{'raw':![]})['then'](function(_0x505fbe){var _0x333dc5=_0x37d32e['user']['get']({'plain':!![]});if(!_0x333dc5)throw new Error(_0x15db('0x41'));if(_0x333dc5[_0x15db('0x42')]===_0x15db('0x43')){var _0x587435=_0x505fbe[_0x15db('0x12')]({'plain':!![]});var _0x34de52=[{'name':_0x15db('0x13'),'value':_0x15db('0x14')},{'name':_0x15db('0x44'),'value':_0x15db('0x45')},{'name':_0x15db('0x15'),'value':_0x15db('0x16')}];var _0x387c72=_[_0x15db('0x1d')](_0x34de52,[_0x15db('0x1a'),_0x587435[_0x15db('0x1c')]])[_0x15db('0x1e')];return db['UserProfileSection'][_0x15db('0x1d')]({'where':{'name':_0x387c72,'userProfileId':_0x333dc5['userProfileId']},'raw':!![]})[_0x15db('0x11')](function(_0x148929){if(_0x148929&&_0x148929[_0x15db('0x46')]===0x0){return db[_0x15db('0x1f')][_0x15db('0x3d')]({'name':_0x587435['name'],'resourceId':_0x587435['id'],'type':_0x148929[_0x15db('0x1e')],'sectionId':_0x148929['id']},{})[_0x15db('0x11')](function(){return _0x505fbe;});}else{return _0x505fbe;}})['catch'](function(_0x463ccb){logger[_0x15db('0x20')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x463ccb);throw _0x463ccb;});}return _0x505fbe;})[_0x15db('0x11')](respondWithResult(_0x12a5b5,0xc9))[_0x15db('0x3a')](handleError(_0x12a5b5,null));};exports['update']=function(_0x7845d6,_0xcbb8f2){if(_0x7845d6['body']['id']){delete _0x7845d6[_0x15db('0x3e')]['id'];}return db[_0x15db('0x37')][_0x15db('0x1d')]({'where':{'id':_0x7845d6[_0x15db('0x3b')]['id']}})['then'](handleEntityNotFound(_0xcbb8f2,null))[_0x15db('0x11')](function(_0x56d2b4){if(_0x56d2b4){return db[_0x15db('0x37')][_0x15db('0x47')](_[_0x15db('0x48')](_0x7845d6[_0x15db('0x3e')],[_0x15db('0x40'),'context',_0x15db('0x49'),'recordingFormat',_0x15db('0x4a'),'mandatoryDisposition',_0x15db('0x4b')]),{'where':{'context':_0x56d2b4['context'],'exten':_0x56d2b4[_0x15db('0x40')]},'individualHooks':!![]})[_0x15db('0x11')](function(_0x19bdf6){return _0x19bdf6;});}return null;})[_0x15db('0x11')](respondWithStatusCode(_0xcbb8f2,null))[_0x15db('0x3a')](handleError(_0xcbb8f2,null));};exports[_0x15db('0x4c')]=function(_0x1b3677,_0x5cc824){var _0x330f0c=_0x1b3677[_0x15db('0x3b')]['id'];var _0x4f0a88=_0x1b3677['body'];var _0xb5ab0e=0xc8;var _0x2549f4=null;return db['sequelize'][_0x15db('0x4d')]({'isolationLevel':db[_0x15db('0x4e')][_0x15db('0x4f')][_0x15db('0x50')][_0x15db('0x51')]},function(_0x2a2d1f){return db[_0x15db('0x37')][_0x15db('0x52')]({'where':{'id':_0x330f0c},'transaction':_0x2a2d1f})[_0x15db('0x11')](function(_0x4d02ef){if(_0x4d02ef){return db[_0x15db('0x37')][_0x15db('0x10')]({'where':{'VoiceExtensionId':_0x330f0c},'transaction':_0x2a2d1f})['then'](function(){var _0x7dca64=_['map'](_0x4f0a88,function(_0x2326ec){_0x2326ec['VoiceExtensionId']=_0x330f0c;_0x2326ec['isApp']=!![];return _0x2326ec;});return _0x4d02ef[_0x15db('0x53')](_0x7dca64);})[_0x15db('0x11')](function(_0x4d913a){return db[_0x15db('0x37')]['bulkCreate'](_0x4d913a,{'transaction':_0x2a2d1f});});}else{_0xb5ab0e=0x194;_0x2549f4=[];}});})[_0x15db('0x11')](function(){if(_0xb5ab0e!==0x194){return db['VoiceExtension'][_0x15db('0x54')]({'where':{'isApp':!![],'VoiceExtensionId':_0x330f0c},'order':_0x15db('0x55')})[_0x15db('0x11')](function(_0x44d15a){_0x2549f4=_0x44d15a;});}})[_0x15db('0x3a')](function(_0xb5b29d){_0xb5ab0e=0x1f4;logger[_0x15db('0x20')](_0xb5b29d[_0x15db('0x21')]);if(_0xb5b29d[_0x15db('0x1e')]){delete _0xb5b29d[_0x15db('0x1e')];}_0x2549f4=_0xb5b29d;})['finally'](function(){if(_0x2549f4===null){_0x5cc824[_0x15db('0x8')](_0xb5ab0e);}else{if(_0xb5ab0e===0x1f4){_0x5cc824[_0x15db('0x9')](_0xb5ab0e)[_0x15db('0x22')](_0x2549f4);}else{_0x5cc824['status'](_0xb5ab0e)[_0x15db('0xb')](_0x2549f4);}}});};
\ No newline at end of file
+var _0x3c52=['description','recordingFormat','cutdigits','mandatoryDisposition','alias','addApplications','sequelize','Transaction','ISOLATION_LEVELS','READ_COMMITTED','findOne','VoiceExtensionId','createRouting','findAndCountAll','cast(priority\x20as\x20unsigned)','finally','../../components/parsers/qs','api','../../config/environment','../../mysqldb','redis','defaults','socket.io-emitter','./voiceExtension.socket','register','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','destroy','then','get','InboundRoutes','inbound','OutboundRoutes','outbound','InternalRoutes','filter','ignore','value','includes','type','name','UserProfileResource','stack','send','index','map','rawAttributes','key','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','merge','options','VoiceExtension','includeAll','include','findAll','catch','show','params','find','create','startsWith','exten','body','concat','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','internal','UserProfileSection','userProfileId','error','update','context'];(function(_0x118e84,_0x2cd37f){var _0x109798=function(_0xfcf0b6){while(--_0xfcf0b6){_0x118e84['push'](_0x118e84['shift']());}};_0x109798(++_0x2cd37f);}(_0x3c52,0x184));var _0x23c5=function(_0x4936ba,_0x56845c){_0x4936ba=_0x4936ba-0x0;var _0x3d4c39=_0x3c52[_0x4936ba];return _0x3d4c39;};'use strict';var _=require('lodash');var Redis=require('ioredis');var qs=require(_0x23c5('0x0'));var logger=require('../../config/logger')(_0x23c5('0x1'));var config=require(_0x23c5('0x2'));var db=require(_0x23c5('0x3'))['db'];config[_0x23c5('0x4')]=_[_0x23c5('0x5')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x23c5('0x6'))(new Redis(config['redis']));require(_0x23c5('0x7'))[_0x23c5('0x8')](socket);function respondWithStatusCode(_0x160d6b,_0x6d92c4){_0x6d92c4=_0x6d92c4||0xcc;return function(_0x271605){if(_0x271605){return _0x160d6b[_0x23c5('0x9')](_0x6d92c4);}return _0x160d6b[_0x23c5('0xa')](_0x6d92c4)[_0x23c5('0xb')]();};}function respondWithResult(_0x401be5,_0x378712){_0x378712=_0x378712||0xc8;return function(_0x41be87){if(_0x41be87){return _0x401be5['status'](_0x378712)[_0x23c5('0xc')](_0x41be87);}};}function respondWithFilteredResult(_0xc55f0c,_0x3b4c0e){return function(_0x23785b){if(_0x23785b){var _0x4bb579=typeof _0x3b4c0e[_0x23c5('0xd')]===_0x23c5('0xe')&&typeof _0x3b4c0e[_0x23c5('0xf')]===_0x23c5('0xe');var _0x4dfc39=_0x23785b[_0x23c5('0x10')];var _0x19c974=_0x4bb579?0x0:_0x3b4c0e[_0x23c5('0xd')];var _0x4a0dde=_0x4bb579?_0x23785b[_0x23c5('0x10')]:_0x3b4c0e['offset']+_0x3b4c0e[_0x23c5('0xf')];var _0x2fd916;if(_0x4a0dde>=_0x4dfc39){_0x4a0dde=_0x4dfc39;_0x2fd916=0xc8;}else{_0x2fd916=0xce;}_0xc55f0c[_0x23c5('0xa')](_0x2fd916);return _0xc55f0c[_0x23c5('0x11')](_0x23c5('0x12'),_0x19c974+'-'+_0x4a0dde+'/'+_0x4dfc39)[_0x23c5('0xc')](_0x23785b);}return null;};}function removeEntity(_0x45c989){return function(_0x287265){if(_0x287265){return _0x287265[_0x23c5('0x13')]()[_0x23c5('0x14')](function(){var _0x1db04d=_0x287265[_0x23c5('0x15')]({'plain':!![]});var _0x1b03e3=[{'name':_0x23c5('0x16'),'value':_0x23c5('0x17'),'ignore':![]},{'name':_0x23c5('0x18'),'value':_0x23c5('0x19'),'ignore':![]},{'name':_0x23c5('0x1a'),'value':'internal','ignore':![]}];var _0xe95d74=_(_0x1b03e3)[_0x23c5('0x1b')](_0x23c5('0x1c'))['map'](_0x23c5('0x1d'))[_0x23c5('0x1d')]();if(_[_0x23c5('0x1e')](_0xe95d74,_0x1db04d[_0x23c5('0x1f')])){return;}var _0x24598e=_['find'](_0x1b03e3,[_0x23c5('0x1d'),_0x1db04d['type']])[_0x23c5('0x20')];return db[_0x23c5('0x21')][_0x23c5('0x13')]({'where':{'type':_0x24598e,'resourceId':_0x1db04d['id']}})[_0x23c5('0x14')](function(){return _0x287265;});})[_0x23c5('0x14')](function(){_0x45c989['status'](0xcc)[_0x23c5('0xb')]();});}};}function handleEntityNotFound(_0x23cc94){return function(_0x1182bc){if(!_0x1182bc){_0x23cc94['sendStatus'](0x194);}return _0x1182bc;};}function handleError(_0x456f2d,_0x2c07b3){_0x2c07b3=_0x2c07b3||0x1f4;return function(_0x55ed97){logger['error'](_0x55ed97[_0x23c5('0x22')]);if(_0x55ed97[_0x23c5('0x20')]){delete _0x55ed97['name'];}_0x456f2d['status'](_0x2c07b3)[_0x23c5('0x23')](_0x55ed97);};}exports[_0x23c5('0x24')]=function(_0x298c6e,_0xe3b00c){var _0x26c77d={},_0x12e210={},_0x4c6a65={'count':0x0,'rows':[]};var _0x56efcf=_[_0x23c5('0x25')](db['VoiceExtension'][_0x23c5('0x26')],function(_0xd821f9){return{'name':_0xd821f9['fieldName'],'type':_0xd821f9['type'][_0x23c5('0x27')]};});_0x12e210['model']=_[_0x23c5('0x25')](_0x56efcf,_0x23c5('0x20'));_0x12e210[_0x23c5('0x28')]=_[_0x23c5('0x29')](_0x298c6e['query']);_0x12e210[_0x23c5('0x2a')]=_[_0x23c5('0x2b')](_0x12e210[_0x23c5('0x2c')],_0x12e210[_0x23c5('0x28')]);_0x26c77d[_0x23c5('0x2d')]=_['intersection'](_0x12e210['model'],qs[_0x23c5('0x2e')](_0x298c6e[_0x23c5('0x28')][_0x23c5('0x2e')]));_0x26c77d[_0x23c5('0x2d')]=_0x26c77d[_0x23c5('0x2d')]['length']?_0x26c77d[_0x23c5('0x2d')]:_0x12e210[_0x23c5('0x2c')];if(!_0x298c6e[_0x23c5('0x28')][_0x23c5('0x2f')](_0x23c5('0x30'))){_0x26c77d[_0x23c5('0xf')]=qs[_0x23c5('0xf')](_0x298c6e[_0x23c5('0x28')][_0x23c5('0xf')]);_0x26c77d[_0x23c5('0xd')]=qs[_0x23c5('0xd')](_0x298c6e[_0x23c5('0x28')]['offset']);}_0x26c77d[_0x23c5('0x31')]=qs['sort'](_0x298c6e[_0x23c5('0x28')][_0x23c5('0x32')]);_0x26c77d[_0x23c5('0x33')]=qs[_0x23c5('0x2a')](_[_0x23c5('0x34')](_0x298c6e[_0x23c5('0x28')],_0x12e210[_0x23c5('0x2a')]),_0x56efcf);if(_0x298c6e['query'][_0x23c5('0x1b')]){_0x26c77d['where']=_[_0x23c5('0x35')](_0x26c77d['where'],{'$or':_[_0x23c5('0x25')](_0x56efcf,function(_0x27708c){if(_0x27708c[_0x23c5('0x1f')]!=='VIRTUAL'){var _0x13b035={};_0x13b035[_0x27708c[_0x23c5('0x20')]]={'$like':'%'+_0x298c6e[_0x23c5('0x28')][_0x23c5('0x1b')]+'%'};return _0x13b035;}})});}_0x26c77d=_[_0x23c5('0x35')]({},_0x26c77d,_0x298c6e[_0x23c5('0x36')]);var _0xe8e65b={'where':_0x26c77d['where']};return db[_0x23c5('0x37')][_0x23c5('0x10')](_0xe8e65b)[_0x23c5('0x14')](function(_0x48e4f4){_0x4c6a65[_0x23c5('0x10')]=_0x48e4f4;if(_0x298c6e[_0x23c5('0x28')][_0x23c5('0x38')]){_0x26c77d[_0x23c5('0x39')]=[{'all':!![]}];}return db[_0x23c5('0x37')][_0x23c5('0x3a')](_0x26c77d);})['then'](function(_0x3b28a5){_0x4c6a65['rows']=_0x3b28a5;return _0x4c6a65;})['then'](respondWithFilteredResult(_0xe3b00c,_0x26c77d))[_0x23c5('0x3b')](handleError(_0xe3b00c,null));};exports[_0x23c5('0x3c')]=function(_0x1cf3bc,_0x373e3c){var _0x35ad86={'raw':![],'where':{'id':_0x1cf3bc[_0x23c5('0x3d')]['id']}},_0x1709e0={};_0x1709e0[_0x23c5('0x2c')]=_[_0x23c5('0x29')](db[_0x23c5('0x37')]['rawAttributes']);_0x1709e0[_0x23c5('0x28')]=_[_0x23c5('0x29')](_0x1cf3bc[_0x23c5('0x28')]);_0x1709e0[_0x23c5('0x2a')]=_[_0x23c5('0x2b')](_0x1709e0[_0x23c5('0x2c')],_0x1709e0[_0x23c5('0x28')]);_0x35ad86[_0x23c5('0x2d')]=_['intersection'](_0x1709e0[_0x23c5('0x2c')],qs[_0x23c5('0x2e')](_0x1cf3bc[_0x23c5('0x28')][_0x23c5('0x2e')]));_0x35ad86[_0x23c5('0x2d')]=_0x35ad86['attributes']['length']?_0x35ad86[_0x23c5('0x2d')]:_0x1709e0[_0x23c5('0x2c')];if(_0x1cf3bc[_0x23c5('0x28')]['includeAll']){_0x35ad86[_0x23c5('0x39')]=[{'all':!![]}];}_0x35ad86=_[_0x23c5('0x35')]({},_0x35ad86,_0x1cf3bc['options']);return db[_0x23c5('0x37')][_0x23c5('0x3e')](_0x35ad86)[_0x23c5('0x14')](handleEntityNotFound(_0x373e3c,null))[_0x23c5('0x14')](respondWithResult(_0x373e3c,null))['catch'](handleError(_0x373e3c,null));};exports[_0x23c5('0x13')]=function(_0x5b1829,_0x3910a2){return db[_0x23c5('0x37')][_0x23c5('0x3e')]({'where':{'id':_0x5b1829[_0x23c5('0x3d')]['id']}})['then'](handleEntityNotFound(_0x3910a2,null))[_0x23c5('0x14')](removeEntity(_0x3910a2,null))[_0x23c5('0x3b')](handleError(_0x3910a2,null));};exports[_0x23c5('0x3f')]=function(_0x591342,_0x4d0c1e){if(_0x591342['body'][_0x23c5('0x1f')]===_0x23c5('0x19')&&!_[_0x23c5('0x40')](_0x591342['body'][_0x23c5('0x41')],'_')){_0x591342[_0x23c5('0x42')][_0x23c5('0x41')]='_'[_0x23c5('0x43')](_0x591342[_0x23c5('0x42')][_0x23c5('0x41')]);}return db[_0x23c5('0x37')][_0x23c5('0x3f')](_0x591342['body'],{'raw':![]})[_0x23c5('0x14')](function(_0xc50c52){var _0x293fe6=_0x591342[_0x23c5('0x44')][_0x23c5('0x15')]({'plain':!![]});if(!_0x293fe6)throw new Error(_0x23c5('0x45'));if(_0x293fe6[_0x23c5('0x46')]===_0x23c5('0x44')){var _0x363cfe=_0xc50c52[_0x23c5('0x15')]({'plain':!![]});var _0x1aa6e9=[{'name':_0x23c5('0x16'),'value':_0x23c5('0x17')},{'name':_0x23c5('0x18'),'value':_0x23c5('0x19')},{'name':_0x23c5('0x1a'),'value':_0x23c5('0x47')}];var _0x3f5196=_['find'](_0x1aa6e9,[_0x23c5('0x1d'),_0x363cfe[_0x23c5('0x1f')]])['name'];return db[_0x23c5('0x48')][_0x23c5('0x3e')]({'where':{'name':_0x3f5196,'userProfileId':_0x293fe6[_0x23c5('0x49')]},'raw':!![]})['then'](function(_0x117fac){if(_0x117fac&&_0x117fac['autoAssociation']===0x0){return db[_0x23c5('0x21')]['create']({'name':_0x363cfe[_0x23c5('0x20')],'resourceId':_0x363cfe['id'],'type':_0x117fac[_0x23c5('0x20')],'sectionId':_0x117fac['id']},{})[_0x23c5('0x14')](function(){return _0xc50c52;});}else{return _0xc50c52;}})[_0x23c5('0x3b')](function(_0x1b108a){logger[_0x23c5('0x4a')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x1b108a);throw _0x1b108a;});}return _0xc50c52;})[_0x23c5('0x14')](respondWithResult(_0x4d0c1e,0xc9))['catch'](handleError(_0x4d0c1e,null));};exports[_0x23c5('0x4b')]=function(_0x4ade1a,_0x17b39e){if(_0x4ade1a['body']['id']){delete _0x4ade1a[_0x23c5('0x42')]['id'];}return db[_0x23c5('0x37')][_0x23c5('0x3e')]({'where':{'id':_0x4ade1a[_0x23c5('0x3d')]['id']}})['then'](handleEntityNotFound(_0x17b39e,null))[_0x23c5('0x14')](function(_0x76c77){if(_0x76c77){return db[_0x23c5('0x37')][_0x23c5('0x4b')](_[_0x23c5('0x34')](_0x4ade1a[_0x23c5('0x42')],[_0x23c5('0x41'),_0x23c5('0x4c'),_0x23c5('0x4d'),_0x23c5('0x4e'),_0x23c5('0x4f'),_0x23c5('0x50'),_0x23c5('0x51')]),{'where':{'context':_0x76c77[_0x23c5('0x4c')],'exten':_0x76c77[_0x23c5('0x41')]},'individualHooks':!![]})[_0x23c5('0x14')](function(_0x8d4e45){return _0x8d4e45;});}return null;})[_0x23c5('0x14')](respondWithStatusCode(_0x17b39e,null))[_0x23c5('0x3b')](handleError(_0x17b39e,null));};exports[_0x23c5('0x52')]=function(_0x254279,_0x5c17cb){var _0x4a085b=_0x254279[_0x23c5('0x3d')]['id'];var _0x2d0a83=_0x254279[_0x23c5('0x42')];var _0xdacafb=0xc8;var _0x2c1e55=null;return db[_0x23c5('0x53')]['transaction']({'isolationLevel':db['sequelize'][_0x23c5('0x54')][_0x23c5('0x55')][_0x23c5('0x56')]},function(_0x53c0eb){return db[_0x23c5('0x37')][_0x23c5('0x57')]({'where':{'id':_0x4a085b},'transaction':_0x53c0eb})['then'](function(_0x2a4205){if(_0x2a4205){return db['VoiceExtension'][_0x23c5('0x13')]({'where':{'VoiceExtensionId':_0x4a085b},'transaction':_0x53c0eb})[_0x23c5('0x14')](function(){var _0x36dd4a=_[_0x23c5('0x25')](_0x2d0a83,function(_0xdbe303){_0xdbe303[_0x23c5('0x58')]=_0x4a085b;_0xdbe303['isApp']=!![];return _0xdbe303;});return _0x2a4205[_0x23c5('0x59')](_0x36dd4a);})[_0x23c5('0x14')](function(_0x4aefea){return db[_0x23c5('0x37')]['bulkCreate'](_0x4aefea,{'transaction':_0x53c0eb});});}else{_0xdacafb=0x194;_0x2c1e55=[];}});})[_0x23c5('0x14')](function(){if(_0xdacafb!==0x194){return db[_0x23c5('0x37')][_0x23c5('0x5a')]({'where':{'isApp':!![],'VoiceExtensionId':_0x4a085b},'order':_0x23c5('0x5b')})[_0x23c5('0x14')](function(_0x49d4a8){_0x2c1e55=_0x49d4a8;});}})[_0x23c5('0x3b')](function(_0x937368){_0xdacafb=0x1f4;logger[_0x23c5('0x4a')](_0x937368['stack']);if(_0x937368[_0x23c5('0x20')]){delete _0x937368[_0x23c5('0x20')];}_0x2c1e55=_0x937368;})[_0x23c5('0x5c')](function(){if(_0x2c1e55===null){_0x5c17cb[_0x23c5('0x9')](_0xdacafb);}else{if(_0xdacafb===0x1f4){_0x5c17cb[_0x23c5('0xa')](_0xdacafb)['send'](_0x2c1e55);}else{_0x5c17cb['status'](_0xdacafb)['json'](_0x2c1e55);}}});};
\ No newline at end of file
index 9db181e..2a7c790 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdf34=['save','remove','emit','hasOwnProperty','hook','exports','events','VoiceExtension','setMaxListeners'];(function(_0x2b49bc,_0x47b636){var _0x43cc65=function(_0x236ec3){while(--_0x236ec3){_0x2b49bc['push'](_0x2b49bc['shift']());}};_0x43cc65(++_0x47b636);}(_0xdf34,0x1ad));var _0x4df3=function(_0x35ff9e,_0x17bf71){_0x35ff9e=_0x35ff9e-0x0;var _0x3a9e8a=_0xdf34[_0x35ff9e];return _0x3a9e8a;};'use strict';var EventEmitter=require(_0x4df3('0x0'));var VoiceExtension=require('../../mysqldb')['db'][_0x4df3('0x1')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents[_0x4df3('0x2')](0x0);var events={'afterCreate':_0x4df3('0x3'),'afterUpdate':'update','afterDestroy':_0x4df3('0x4')};function emitEvent(_0xd7b942){return function(_0x44b9ae,_0x57fbd4,_0xaf8288){VoiceExtensionEvents[_0x4df3('0x5')](_0xd7b942+':'+_0x44b9ae['id'],_0x44b9ae);VoiceExtensionEvents[_0x4df3('0x5')](_0xd7b942,_0x44b9ae);_0xaf8288(null);};}for(var e in events){if(events[_0x4df3('0x6')](e)){var event=events[e];VoiceExtension[_0x4df3('0x7')](e,emitEvent(event));}}module[_0x4df3('0x8')]=VoiceExtensionEvents;
\ No newline at end of file
+var _0xfc44=['VoiceExtension','save','remove','hasOwnProperty','exports','events','../../mysqldb'];(function(_0x5ec62e,_0x1a717b){var _0xe5416f=function(_0x38af18){while(--_0x38af18){_0x5ec62e['push'](_0x5ec62e['shift']());}};_0xe5416f(++_0x1a717b);}(_0xfc44,0x15c));var _0x4fc4=function(_0x3de690,_0x4ed3ed){_0x3de690=_0x3de690-0x0;var _0x88d098=_0xfc44[_0x3de690];return _0x88d098;};'use strict';var EventEmitter=require(_0x4fc4('0x0'));var VoiceExtension=require(_0x4fc4('0x1'))['db'][_0x4fc4('0x2')];var VoiceExtensionEvents=new EventEmitter();VoiceExtensionEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x4fc4('0x3'),'afterUpdate':'update','afterDestroy':_0x4fc4('0x4')};function emitEvent(_0x36ef4c){return function(_0x29387a,_0x12d1f0,_0x163491){VoiceExtensionEvents['emit'](_0x36ef4c+':'+_0x29387a['id'],_0x29387a);VoiceExtensionEvents['emit'](_0x36ef4c,_0x29387a);_0x163491(null);};}for(var e in events){if(events[_0x4fc4('0x5')](e)){var event=events[e];VoiceExtension['hook'](e,emitEvent(event));}}module[_0x4fc4('0x6')]=VoiceExtensionEvents;
\ No newline at end of file
index feef5a1..87406ea 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa16a=['tag','toLowerCase','CDR(tag)=','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):','callerID','NoOp(No\x20number\x20available)','queue','playback','custom','answer','$[${XCALLY-MOTION-ANSWER}=0]?Answer','XCALLY-MOTION-ANSWER=1','$[${XCALLY-MOTION-PROGRESS}=0]?Progress','XCALLY-MOTION-PROGRESS=1','GotoIfTime','appType','outboundDial','appdata','agi','XMCS-UNIQUEID=${CHANNEL(LINKEDID)}','priority','last','concat','catch','VoiceExtension','voice_extensions','lodash','./voiceExtension.attributes','exports','models','Set','CDR(type)=','type','exten','alias','NoOp','CDR(routeAlias)=','context','inbound','push','CDR(routeid)=','XCALLY-MOTION-ANSWER=0','XCALLY-MOTION-PROGRESS=0','MONITOR_OPTIONS=ab','CDR(type)=outbound','outbound','CDR(destination)=','cutdigits','${EXTEN}','ExecIf','):Goto(','CDR(prefix)=noprefix','hasOwnProperty','recordingFormat','none','_XCALLY_MIXMONITOR_FORMAT=','wav','timeout','url','split','length','name','trunk','param','phone','prefix','SIP','join','options','U(xcally-mixmonitor-context)','replace','isEmpty','Interval','findAll','interval','then','intervals','map','filter','IntervalId'];(function(_0x3d8f98,_0x1a359c){var _0x42098d=function(_0x5744de){while(--_0x5744de){_0x3d8f98['push'](_0x3d8f98['shift']());}};_0x42098d(++_0x1a359c);}(_0xa16a,0x1aa));var _0xaa16=function(_0x59d0cc,_0xa7c52b){_0x59d0cc=_0x59d0cc-0x0;var _0x2ae79f=_0xa16a[_0x59d0cc];return _0x2ae79f;};'use strict';var _=require(_0xaa16('0x0'));var attributes=require(_0xaa16('0x1'));module[_0xaa16('0x2')]=function(_0x1af401){var _0x5b32db=_0x1af401[_0xaa16('0x3')];function _0x481660(_0x55ad01){var _0x2150a4=0x2;var _0x2a94a1=[{'type':_0x55ad01['type'],'app':_0xaa16('0x4'),'appdata':_0xaa16('0x5')+_0x55ad01[_0xaa16('0x6')],'context':_0x55ad01['context'],'exten':_0x55ad01[_0xaa16('0x7')],'priority':_0x2150a4++,'VoiceExtensionId':_0x55ad01['id']},{'type':_0x55ad01[_0xaa16('0x6')],'app':_0x55ad01[_0xaa16('0x8')]?'Set':_0xaa16('0x9'),'appdata':_0x55ad01[_0xaa16('0x8')]?_0xaa16('0xa')+_0x55ad01[_0xaa16('0x8')]:'No\x20alias\x20set','context':_0x55ad01[_0xaa16('0xb')],'exten':_0x55ad01['exten'],'priority':_0x2150a4++,'VoiceExtensionId':_0x55ad01['id']}];if(_0x55ad01['type']===_0xaa16('0xc')){_0x2a94a1[_0xaa16('0xd')]({'type':_0xaa16('0xc'),'app':_0xaa16('0x4'),'appdata':_0xaa16('0xe')+_0x55ad01['id'],'context':_0x55ad01[_0xaa16('0xb')],'exten':_0x55ad01[_0xaa16('0x7')],'priority':_0x2150a4++,'VoiceExtensionId':_0x55ad01['id']});}_0x2a94a1['push']({'type':_0x55ad01[_0xaa16('0x6')],'app':'Set','appdata':_0xaa16('0xf'),'context':_0x55ad01[_0xaa16('0xb')],'exten':_0x55ad01['exten'],'priority':_0x2150a4++,'VoiceExtensionId':_0x55ad01['id']},{'type':_0x55ad01[_0xaa16('0x6')],'app':_0xaa16('0x4'),'appdata':_0xaa16('0x10'),'context':_0x55ad01[_0xaa16('0xb')],'exten':_0x55ad01[_0xaa16('0x7')],'priority':_0x2150a4++,'VoiceExtensionId':_0x55ad01['id']},{'type':_0x55ad01[_0xaa16('0x6')],'app':_0xaa16('0x4'),'appdata':_0xaa16('0x11'),'context':_0x55ad01[_0xaa16('0xb')],'exten':_0x55ad01[_0xaa16('0x7')],'priority':_0x2150a4++,'VoiceExtensionId':_0x55ad01['id']});return _0x2a94a1;}function _0x4a3494(_0x1454e3){var _0x1ac08d=0x2;var _0x16c554=[{'type':'outbound','app':'Set','appdata':_0xaa16('0x12'),'context':_0x1454e3['context'],'exten':_0x1454e3[_0xaa16('0x7')],'priority':_0x1ac08d++,'VoiceExtensionId':_0x1454e3['id']},{'type':_0xaa16('0x13'),'app':_0x1454e3[_0xaa16('0x8')]?_0xaa16('0x4'):_0xaa16('0x9'),'appdata':_0x1454e3['alias']?_0xaa16('0xa')+_0x1454e3[_0xaa16('0x8')]:'No\x20alias\x20set','context':_0x1454e3[_0xaa16('0xb')],'exten':_0x1454e3[_0xaa16('0x7')],'priority':_0x1ac08d++,'VoiceExtensionId':_0x1454e3['id']},{'type':_0xaa16('0x13'),'app':_0xaa16('0x4'),'appdata':_0xaa16('0x14')+(_0x1454e3[_0xaa16('0x15')]?'${EXTEN:'+_0x1454e3[_0xaa16('0x15')]+'}':_0xaa16('0x16')),'context':_0x1454e3[_0xaa16('0xb')],'exten':_0x1454e3['exten'],'priority':_0x1ac08d++,'VoiceExtensionId':_0x1454e3['id']},{'type':_0xaa16('0x13'),'app':_0xaa16('0x4'),'appdata':_0xaa16('0xe')+_0x1454e3['id'],'context':_0x1454e3['context'],'exten':_0x1454e3[_0xaa16('0x7')],'priority':_0x1ac08d++,'VoiceExtensionId':_0x1454e3['id']},{'type':_0xaa16('0x13'),'app':_0xaa16('0x17'),'appdata':'$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto('+(_0x1ac08d+0x2)+_0xaa16('0x18')+(_0x1ac08d+0x1)+')','context':_0x1454e3[_0xaa16('0xb')],'exten':_0x1454e3['exten'],'priority':_0x1ac08d++,'VoiceExtensionId':_0x1454e3['id']},{'type':_0xaa16('0x13'),'app':_0xaa16('0x4'),'appdata':_0x1454e3[_0xaa16('0x15')]?'CDR(prefix)=${EXTEN:0:'+_0x1454e3[_0xaa16('0x15')]+'}':_0xaa16('0x19'),'context':_0x1454e3[_0xaa16('0xb')],'exten':_0x1454e3[_0xaa16('0x7')],'priority':_0x1ac08d++,'VoiceExtensionId':_0x1454e3['id']},{'type':'outbound','app':'Set','appdata':_0xaa16('0xf'),'context':_0x1454e3['context'],'exten':_0x1454e3[_0xaa16('0x7')],'priority':_0x1ac08d++,'VoiceExtensionId':_0x1454e3['id']},{'type':_0xaa16('0x13'),'app':_0xaa16('0x4'),'appdata':'XCALLY-MOTION-PROGRESS=0','context':_0x1454e3[_0xaa16('0xb')],'exten':_0x1454e3[_0xaa16('0x7')],'priority':_0x1ac08d++,'VoiceExtensionId':_0x1454e3['id']},{'type':'outbound','app':_0xaa16('0x4'),'appdata':_0xaa16('0x11'),'context':_0x1454e3[_0xaa16('0xb')],'exten':_0x1454e3['exten'],'priority':_0x1ac08d++,'VoiceExtensionId':_0x1454e3['id']},{'type':_0xaa16('0x13'),'app':_0xaa16('0x4'),'appdata':'outboundrouteid='+_0x1454e3['id'],'context':_0x1454e3[_0xaa16('0xb')],'exten':_0x1454e3['exten'],'priority':_0x1ac08d++,'VoiceExtensionId':_0x1454e3['id']}];if(_0x1454e3[_0xaa16('0x1a')](_0xaa16('0x1b'))&&_0x1454e3[_0xaa16('0x1b')]!==_0xaa16('0x1c')){_0x16c554['push']({'type':_0xaa16('0x13'),'app':_0xaa16('0x4'),'appdata':'_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','context':_0x1454e3[_0xaa16('0xb')],'exten':_0x1454e3[_0xaa16('0x7')],'priority':_0x1ac08d++,'VoiceExtensionId':_0x1454e3['id']},{'type':_0xaa16('0x13'),'app':'Set','appdata':_0xaa16('0x1d')+_0x1454e3[_0xaa16('0x1b')]||_0xaa16('0x1e'),'context':_0x1454e3['context'],'exten':_0x1454e3[_0xaa16('0x7')],'priority':_0x1ac08d++,'VoiceExtensionId':_0x1454e3['id']});}return _0x16c554;}function _0x212733(_0x3d188a,_0x12208c){var _0x3b4170=[{'name':'trunk','param':0x0},{'name':_0xaa16('0x1f'),'param':0x1},{'name':'options','param':0x2},{'name':_0xaa16('0x20'),'param':0x3}];var _0x4d69ff={};var _0x22e2bb=_0x12208c[_0xaa16('0x21')](',');var _0x27a0b3=[];for(var _0x3a1fe6=0x0;_0x3a1fe6<_0x3b4170[_0xaa16('0x22')];_0x3a1fe6++){switch(_0x3b4170[_0x3a1fe6][_0xaa16('0x23')]){case _0xaa16('0x24'):_0x4d69ff[_0xaa16('0x24')]=_0x22e2bb[_0x3b4170[_0x3a1fe6][_0xaa16('0x25')]][_0xaa16('0x21')]('/')[0x1];_0x4d69ff[_0xaa16('0x26')]=_0x22e2bb[_0x3b4170[_0x3a1fe6]['param']][_0xaa16('0x21')]('/')[0x2];_0x4d69ff['prefix']=_0x4d69ff[_0xaa16('0x26')]?_0x4d69ff['phone']['split']('$')[0x0]:undefined;_0x4d69ff[_0xaa16('0x26')]=_0x3d188a[_0xaa16('0x15')]?(_0x4d69ff[_0xaa16('0x27')]||'')+'${EXTEN:'+_0x3d188a[_0xaa16('0x15')]+'}':(_0x4d69ff['prefix']||'')+'${EXTEN}';_0x27a0b3[_0x3b4170[_0x3a1fe6][_0xaa16('0x25')]]=[_0xaa16('0x28'),_0x4d69ff['trunk'],_0x4d69ff[_0xaa16('0x26')]][_0xaa16('0x29')]('/');break;case'options':_0x4d69ff[_0xaa16('0x2a')]=_0x22e2bb[_0x3b4170[_0x3a1fe6][_0xaa16('0x25')]];if(_0x3d188a['recordingFormat']!==_0xaa16('0x1c')){if(_0x4d69ff[_0xaa16('0x2a')]['indexOf'](_0xaa16('0x2b'))<0x0){_0x4d69ff[_0xaa16('0x2a')]+='U(xcally-mixmonitor-context)';}}else{_0x4d69ff[_0xaa16('0x2a')]=_0x4d69ff[_0xaa16('0x2a')][_0xaa16('0x2c')](_0xaa16('0x2b'),'');}_0x27a0b3[_0x3b4170[_0x3a1fe6]['param']]=_0x4d69ff[_0xaa16('0x2a')];break;default:_0x27a0b3[_0x3b4170[_0x3a1fe6]['param']]=_0x22e2bb[_0x3b4170[_0x3a1fe6][_0xaa16('0x25')]];}}return _0x27a0b3[_0xaa16('0x29')](',');}function _0x2e449b(_0x25d08d,_0x4a9a0c,_0x5961ce){return new Promise(function(_0x1c1939,_0x111bb5){var _0x3df572=[];if(_[_0xaa16('0x2d')](_0x4a9a0c))return _0x1c1939(_0x3df572);_0x5b32db[_0xaa16('0x2e')][_0xaa16('0x2f')]({'attributes':['id',_0xaa16('0x30'),'IntervalId'],'raw':!![]})[_0xaa16('0x31')](function(_0x13fff0){for(var _0x410088=0x0,_0x27766e=0x0;_0x410088<_0x4a9a0c['length'];_0x410088++,_0x27766e=0x0){var _0x48de17=_0x4a9a0c[_0x410088];var _0x2c3354=[];var _0x439a77=[];delete _0x48de17['id'];if(_0x48de17['interval']!=='*,*,*,*'){_0x48de17[_0xaa16('0x32')]=[_0x48de17[_0xaa16('0x30')]];}else{_0x48de17['intervals']=_0x48de17['IntervalId']?_[_0xaa16('0x33')](_[_0xaa16('0x34')](_0x13fff0,{'IntervalId':_0x48de17[_0xaa16('0x35')]}),'interval'):[];}_0x48de17[_0xaa16('0xb')]=_0x25d08d['context'];_0x48de17['exten']=_0x25d08d[_0xaa16('0x7')];if(_0x48de17['type'])_0x48de17[_0xaa16('0x6')]=_0x48de17[_0xaa16('0x6')]['toLowerCase']();if(_0x25d08d['type']===_0xaa16('0x13')){if(_0x48de17[_0xaa16('0x1a')]('tag')&&_0x48de17[_0xaa16('0x36')]&&_0x48de17[_0xaa16('0x36')]!=='--'){_0x2c3354[_0xaa16('0xd')]({'type':_0x48de17[_0xaa16('0x6')][_0xaa16('0x37')](),'app':_0xaa16('0x4'),'appdata':_0xaa16('0x38')+_0x48de17[_0xaa16('0x36')],'context':_0x25d08d[_0xaa16('0xb')],'exten':_0x25d08d[_0xaa16('0x7')],'priority':_0x48de17[_0xaa16('0x32')][_0xaa16('0x22')]+_0x5961ce+_0x27766e++,'VoiceExtensionId':_0x25d08d['id']});}_0x2c3354[_0xaa16('0xd')]({'type':_0x48de17[_0xaa16('0x6')][_0xaa16('0x37')](),'app':_0xaa16('0x17'),'appdata':_0xaa16('0x39')+(_0x48de17['callerID']?'Set(CALLERID(all)='+_0x48de17[_0xaa16('0x3a')]+')':_0xaa16('0x3b')),'context':_0x25d08d[_0xaa16('0xb')],'exten':_0x25d08d[_0xaa16('0x7')],'priority':_0x48de17[_0xaa16('0x32')][_0xaa16('0x22')]+_0x5961ce+_0x27766e++,'VoiceExtensionId':_0x25d08d['id']});}else{if(_0x48de17[_0xaa16('0x1a')]('answer')){if([_0xaa16('0x3c'),_0xaa16('0x3d')]['includes'](_0x48de17['app'][_0xaa16('0x37')]())&&_0x48de17['appType']!==_0xaa16('0x3e')){if(_0x48de17[_0xaa16('0x3f')]){_0x2c3354[_0xaa16('0xd')]({'type':_0x48de17[_0xaa16('0x6')][_0xaa16('0x37')](),'app':'ExecIf','appdata':_0xaa16('0x40'),'context':_0x25d08d[_0xaa16('0xb')],'exten':_0x25d08d[_0xaa16('0x7')],'priority':_0x48de17[_0xaa16('0x32')][_0xaa16('0x22')]+_0x5961ce+_0x27766e++,'VoiceExtensionId':_0x25d08d['id']});_0x2c3354[_0xaa16('0xd')]({'type':_0x48de17['type'][_0xaa16('0x37')](),'app':_0xaa16('0x4'),'appdata':_0xaa16('0x41'),'context':_0x25d08d[_0xaa16('0xb')],'exten':_0x25d08d[_0xaa16('0x7')],'priority':_0x48de17[_0xaa16('0x32')]['length']+_0x5961ce+_0x27766e++,'VoiceExtensionId':_0x25d08d['id']});}else{_0x2c3354[_0xaa16('0xd')]({'type':_0x48de17[_0xaa16('0x6')][_0xaa16('0x37')](),'app':_0xaa16('0x17'),'appdata':_0xaa16('0x42'),'context':_0x25d08d[_0xaa16('0xb')],'exten':_0x25d08d[_0xaa16('0x7')],'priority':_0x48de17['intervals'][_0xaa16('0x22')]+_0x5961ce+_0x27766e++,'VoiceExtensionId':_0x25d08d['id']});_0x2c3354[_0xaa16('0xd')]({'type':_0x48de17[_0xaa16('0x6')][_0xaa16('0x37')](),'app':_0xaa16('0x4'),'appdata':_0xaa16('0x43'),'context':_0x25d08d[_0xaa16('0xb')],'exten':_0x25d08d[_0xaa16('0x7')],'priority':_0x48de17['intervals'][_0xaa16('0x22')]+_0x5961ce+_0x27766e++,'VoiceExtensionId':_0x25d08d['id']});}}}}for(var _0x11afdc=0x0;_0x11afdc<_0x48de17['intervals'][_0xaa16('0x22')];_0x11afdc++){var _0xaeb379=_0x5961ce+_0x48de17[_0xaa16('0x32')][_0xaa16('0x22')];var _0x5e2eaf=_0x11afdc===_0x48de17[_0xaa16('0x32')][_0xaa16('0x22')]-0x1?_0x5961ce+_0x2c3354[_0xaa16('0x22')]+_0x439a77['length']+0x2:_0x5961ce+_0x11afdc+0x1;_0x2c3354['splice'](_0x11afdc,0x0,{'type':_0x25d08d['type'],'app':_0xaa16('0x44'),'appdata':_0x48de17['intervals'][_0x11afdc]+'?'+_0x25d08d[_0xaa16('0xb')]+',${EXTEN},'+_0xaeb379+':'+_0x25d08d['context']+',${EXTEN},'+_0x5e2eaf,'exten':_0x25d08d['exten'],'context':_0x25d08d[_0xaa16('0xb')],'priority':_0x5961ce+_0x11afdc,'VoiceExtensionId':_0x25d08d['id']});}if(_0x48de17[_0xaa16('0x45')]===_0xaa16('0x46')){_0x48de17[_0xaa16('0x47')]=_0x212733(_0x25d08d,_0x48de17[_0xaa16('0x47')]);}if(_0x48de17['appType']===_0xaa16('0x48')){_0x2c3354['push']({'type':_0x48de17['type'][_0xaa16('0x37')](),'app':_0xaa16('0x4'),'appdata':_0xaa16('0x49'),'context':_0x25d08d[_0xaa16('0xb')],'exten':_0x25d08d[_0xaa16('0x7')],'priority':_0x48de17['intervals'][_0xaa16('0x22')]+_0x5961ce+_0x27766e++,'VoiceExtensionId':_0x25d08d['id']});}_0x48de17[_0xaa16('0x4a')]=_0x2c3354[_0xaa16('0x22')]?_[_0xaa16('0x4b')](_0x2c3354)[_0xaa16('0x4a')]+0x1:_0x5961ce;_0x3df572=_[_0xaa16('0x4c')](_0x3df572,_0x2c3354,[_0x48de17],_0x439a77);_0x5961ce=_[_0xaa16('0x4b')](_0x3df572)[_0xaa16('0x4a')]+0x1;}return _0x1c1939(_0x3df572);})[_0xaa16('0x4d')](function(_0x546425){_0x111bb5(_0x546425);});});}return _0x1af401['define'](_0xaa16('0x4e'),attributes,{'tableName':_0xaa16('0x4f'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'createRouting':function(_0x29ec2b){var _0x267299=this['get']({'plain':!![]});var _0x2e3142=_0x267299[_0xaa16('0x6')]==='outbound'?_0x4a3494(_0x267299):_0x481660(_0x267299);return _0x2e449b(_0x267299,_0x29ec2b,_[_0xaa16('0x4b')](_0x2e3142)['priority']+0x1)[_0xaa16('0x31')](function(_0x111931){var _0x443225=_[_0xaa16('0x4c')](_0x2e3142,_0x111931);_0x443225['push']({'type':_0x267299['type'],'app':'Hangup','exten':_0x267299[_0xaa16('0x7')],'context':_0x267299[_0xaa16('0xb')],'priority':_[_0xaa16('0x4b')](_0x443225)[_0xaa16('0x4a')]+0x1,'VoiceExtensionId':_0x267299['id']});return _0x443225;});}}});};
\ No newline at end of file
+var _0x693d=['playback','includes','appType','custom','XCALLY-MOTION-ANSWER=1','$[${XCALLY-MOTION-PROGRESS}=0]?Progress','XCALLY-MOTION-PROGRESS=1','GotoIfTime',',${EXTEN},','appdata','priority','last','concat','catch','define','VoiceExtension','voice_extensions','get','Hangup','lodash','./voiceExtension.attributes','exports','models','type','Set','context','exten','alias','NoOp','CDR(routeAlias)=','No\x20alias\x20set','inbound','push','CDR(routeid)=','XCALLY-MOTION-ANSWER=0','XCALLY-MOTION-PROGRESS=0','MONITOR_OPTIONS=ab','CDR(type)=outbound','outbound','cutdigits','${EXTEN}','ExecIf','):Goto(','CDR(prefix)=${EXTEN:0:','CDR(prefix)=noprefix','outboundrouteid=','hasOwnProperty','recordingFormat','none','wav','trunk','timeout','options','url','split','phone','param','prefix','SIP','join','indexOf','U(xcally-mixmonitor-context)','isEmpty','Interval','findAll','interval','then','length','*,*,*,*','intervals','IntervalId','map','filter','toLowerCase','tag','CDR(tag)=','callerID','Set(CALLERID(all)=','NoOp(No\x20number\x20available)','answer'];(function(_0x2bbe9b,_0x5a21eb){var _0x52d000=function(_0x4f00c2){while(--_0x4f00c2){_0x2bbe9b['push'](_0x2bbe9b['shift']());}};_0x52d000(++_0x5a21eb);}(_0x693d,0x153));var _0xd693=function(_0x1fc845,_0x422760){_0x1fc845=_0x1fc845-0x0;var _0x14fd5a=_0x693d[_0x1fc845];return _0x14fd5a;};'use strict';var _=require(_0xd693('0x0'));var attributes=require(_0xd693('0x1'));module[_0xd693('0x2')]=function(_0x45370d){var _0x36e3da=_0x45370d[_0xd693('0x3')];function _0x3bd63d(_0x167a63){var _0x36f9b9=0x2;var _0x4c18df=[{'type':_0x167a63[_0xd693('0x4')],'app':_0xd693('0x5'),'appdata':'CDR(type)='+_0x167a63['type'],'context':_0x167a63[_0xd693('0x6')],'exten':_0x167a63[_0xd693('0x7')],'priority':_0x36f9b9++,'VoiceExtensionId':_0x167a63['id']},{'type':_0x167a63[_0xd693('0x4')],'app':_0x167a63[_0xd693('0x8')]?_0xd693('0x5'):_0xd693('0x9'),'appdata':_0x167a63[_0xd693('0x8')]?_0xd693('0xa')+_0x167a63[_0xd693('0x8')]:_0xd693('0xb'),'context':_0x167a63[_0xd693('0x6')],'exten':_0x167a63[_0xd693('0x7')],'priority':_0x36f9b9++,'VoiceExtensionId':_0x167a63['id']}];if(_0x167a63[_0xd693('0x4')]===_0xd693('0xc')){_0x4c18df[_0xd693('0xd')]({'type':_0xd693('0xc'),'app':_0xd693('0x5'),'appdata':_0xd693('0xe')+_0x167a63['id'],'context':_0x167a63['context'],'exten':_0x167a63['exten'],'priority':_0x36f9b9++,'VoiceExtensionId':_0x167a63['id']});}_0x4c18df[_0xd693('0xd')]({'type':_0x167a63['type'],'app':_0xd693('0x5'),'appdata':_0xd693('0xf'),'context':_0x167a63[_0xd693('0x6')],'exten':_0x167a63['exten'],'priority':_0x36f9b9++,'VoiceExtensionId':_0x167a63['id']},{'type':_0x167a63['type'],'app':_0xd693('0x5'),'appdata':_0xd693('0x10'),'context':_0x167a63[_0xd693('0x6')],'exten':_0x167a63[_0xd693('0x7')],'priority':_0x36f9b9++,'VoiceExtensionId':_0x167a63['id']},{'type':_0x167a63[_0xd693('0x4')],'app':_0xd693('0x5'),'appdata':_0xd693('0x11'),'context':_0x167a63[_0xd693('0x6')],'exten':_0x167a63[_0xd693('0x7')],'priority':_0x36f9b9++,'VoiceExtensionId':_0x167a63['id']});return _0x4c18df;}function _0xc39f4a(_0x4cf70a){var _0x13d16a=0x2;var _0x2ac52f=[{'type':'outbound','app':_0xd693('0x5'),'appdata':_0xd693('0x12'),'context':_0x4cf70a['context'],'exten':_0x4cf70a[_0xd693('0x7')],'priority':_0x13d16a++,'VoiceExtensionId':_0x4cf70a['id']},{'type':_0xd693('0x13'),'app':_0x4cf70a['alias']?_0xd693('0x5'):'NoOp','appdata':_0x4cf70a[_0xd693('0x8')]?'CDR(routeAlias)='+_0x4cf70a['alias']:'No\x20alias\x20set','context':_0x4cf70a[_0xd693('0x6')],'exten':_0x4cf70a['exten'],'priority':_0x13d16a++,'VoiceExtensionId':_0x4cf70a['id']},{'type':_0xd693('0x13'),'app':'Set','appdata':'CDR(destination)='+(_0x4cf70a['cutdigits']?'${EXTEN:'+_0x4cf70a[_0xd693('0x14')]+'}':_0xd693('0x15')),'context':_0x4cf70a[_0xd693('0x6')],'exten':_0x4cf70a[_0xd693('0x7')],'priority':_0x13d16a++,'VoiceExtensionId':_0x4cf70a['id']},{'type':_0xd693('0x13'),'app':'Set','appdata':_0xd693('0xe')+_0x4cf70a['id'],'context':_0x4cf70a[_0xd693('0x6')],'exten':_0x4cf70a[_0xd693('0x7')],'priority':_0x13d16a++,'VoiceExtensionId':_0x4cf70a['id']},{'type':_0xd693('0x13'),'app':_0xd693('0x16'),'appdata':'$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto('+(_0x13d16a+0x2)+_0xd693('0x17')+(_0x13d16a+0x1)+')','context':_0x4cf70a['context'],'exten':_0x4cf70a[_0xd693('0x7')],'priority':_0x13d16a++,'VoiceExtensionId':_0x4cf70a['id']},{'type':_0xd693('0x13'),'app':_0xd693('0x5'),'appdata':_0x4cf70a[_0xd693('0x14')]?_0xd693('0x18')+_0x4cf70a[_0xd693('0x14')]+'}':_0xd693('0x19'),'context':_0x4cf70a[_0xd693('0x6')],'exten':_0x4cf70a[_0xd693('0x7')],'priority':_0x13d16a++,'VoiceExtensionId':_0x4cf70a['id']},{'type':_0xd693('0x13'),'app':_0xd693('0x5'),'appdata':_0xd693('0xf'),'context':_0x4cf70a['context'],'exten':_0x4cf70a[_0xd693('0x7')],'priority':_0x13d16a++,'VoiceExtensionId':_0x4cf70a['id']},{'type':_0xd693('0x13'),'app':'Set','appdata':_0xd693('0x10'),'context':_0x4cf70a[_0xd693('0x6')],'exten':_0x4cf70a[_0xd693('0x7')],'priority':_0x13d16a++,'VoiceExtensionId':_0x4cf70a['id']},{'type':_0xd693('0x13'),'app':_0xd693('0x5'),'appdata':_0xd693('0x11'),'context':_0x4cf70a[_0xd693('0x6')],'exten':_0x4cf70a[_0xd693('0x7')],'priority':_0x13d16a++,'VoiceExtensionId':_0x4cf70a['id']},{'type':_0xd693('0x13'),'app':_0xd693('0x5'),'appdata':_0xd693('0x1a')+_0x4cf70a['id'],'context':_0x4cf70a[_0xd693('0x6')],'exten':_0x4cf70a[_0xd693('0x7')],'priority':_0x13d16a++,'VoiceExtensionId':_0x4cf70a['id']}];if(_0x4cf70a[_0xd693('0x1b')](_0xd693('0x1c'))&&_0x4cf70a[_0xd693('0x1c')]!==_0xd693('0x1d')){_0x2ac52f['push']({'type':_0xd693('0x13'),'app':_0xd693('0x5'),'appdata':'_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','context':_0x4cf70a[_0xd693('0x6')],'exten':_0x4cf70a[_0xd693('0x7')],'priority':_0x13d16a++,'VoiceExtensionId':_0x4cf70a['id']},{'type':_0xd693('0x13'),'app':'Set','appdata':'_XCALLY_MIXMONITOR_FORMAT='+_0x4cf70a[_0xd693('0x1c')]||_0xd693('0x1e'),'context':_0x4cf70a[_0xd693('0x6')],'exten':_0x4cf70a[_0xd693('0x7')],'priority':_0x13d16a++,'VoiceExtensionId':_0x4cf70a['id']});}return _0x2ac52f;}function _0x520576(_0x214b67,_0x3e1fa1){var _0x521066=[{'name':_0xd693('0x1f'),'param':0x0},{'name':_0xd693('0x20'),'param':0x1},{'name':_0xd693('0x21'),'param':0x2},{'name':_0xd693('0x22'),'param':0x3}];var _0x44757d={};var _0x488b64=_0x3e1fa1['split'](',');var _0x1fd7fc=[];for(var _0x306d70=0x0;_0x306d70<_0x521066['length'];_0x306d70++){switch(_0x521066[_0x306d70]['name']){case'trunk':_0x44757d[_0xd693('0x1f')]=_0x488b64[_0x521066[_0x306d70]['param']][_0xd693('0x23')]('/')[0x1];_0x44757d[_0xd693('0x24')]=_0x488b64[_0x521066[_0x306d70][_0xd693('0x25')]][_0xd693('0x23')]('/')[0x2];_0x44757d[_0xd693('0x26')]=_0x44757d[_0xd693('0x24')]?_0x44757d[_0xd693('0x24')][_0xd693('0x23')]('$')[0x0]:undefined;_0x44757d['phone']=_0x214b67[_0xd693('0x14')]?(_0x44757d[_0xd693('0x26')]||'')+'${EXTEN:'+_0x214b67[_0xd693('0x14')]+'}':(_0x44757d['prefix']||'')+_0xd693('0x15');_0x1fd7fc[_0x521066[_0x306d70][_0xd693('0x25')]]=[_0xd693('0x27'),_0x44757d[_0xd693('0x1f')],_0x44757d[_0xd693('0x24')]][_0xd693('0x28')]('/');break;case _0xd693('0x21'):_0x44757d[_0xd693('0x21')]=_0x488b64[_0x521066[_0x306d70][_0xd693('0x25')]];if(_0x214b67['recordingFormat']!==_0xd693('0x1d')){if(_0x44757d[_0xd693('0x21')][_0xd693('0x29')](_0xd693('0x2a'))<0x0){_0x44757d[_0xd693('0x21')]+=_0xd693('0x2a');}}else{_0x44757d[_0xd693('0x21')]=_0x44757d[_0xd693('0x21')]['replace']('U(xcally-mixmonitor-context)','');}_0x1fd7fc[_0x521066[_0x306d70][_0xd693('0x25')]]=_0x44757d['options'];break;default:_0x1fd7fc[_0x521066[_0x306d70][_0xd693('0x25')]]=_0x488b64[_0x521066[_0x306d70]['param']];}}return _0x1fd7fc[_0xd693('0x28')](',');}function _0x28315a(_0xe554ea,_0x28ca66,_0x29c704){return new Promise(function(_0x457ef0,_0x358034){var _0xbf255c=[];if(_[_0xd693('0x2b')](_0x28ca66))return _0x457ef0(_0xbf255c);_0x36e3da[_0xd693('0x2c')][_0xd693('0x2d')]({'attributes':['id',_0xd693('0x2e'),'IntervalId'],'raw':!![]})[_0xd693('0x2f')](function(_0x30eff4){for(var _0x23b8d7=0x0,_0x197f48=0x0;_0x23b8d7<_0x28ca66[_0xd693('0x30')];_0x23b8d7++,_0x197f48=0x0){var _0x38ab57=_0x28ca66[_0x23b8d7];var _0x85b9ea=[];var _0x3e7c46=[];delete _0x38ab57['id'];if(_0x38ab57[_0xd693('0x2e')]!==_0xd693('0x31')){_0x38ab57[_0xd693('0x32')]=[_0x38ab57[_0xd693('0x2e')]];}else{_0x38ab57[_0xd693('0x32')]=_0x38ab57[_0xd693('0x33')]?_[_0xd693('0x34')](_[_0xd693('0x35')](_0x30eff4,{'IntervalId':_0x38ab57['IntervalId']}),'interval'):[];}_0x38ab57['context']=_0xe554ea['context'];_0x38ab57[_0xd693('0x7')]=_0xe554ea['exten'];if(_0x38ab57[_0xd693('0x4')])_0x38ab57['type']=_0x38ab57['type'][_0xd693('0x36')]();if(_0xe554ea[_0xd693('0x4')]==='outbound'){if(_0x38ab57['hasOwnProperty'](_0xd693('0x37'))&&_0x38ab57[_0xd693('0x37')]&&_0x38ab57[_0xd693('0x37')]!=='--'){_0x85b9ea['push']({'type':_0x38ab57[_0xd693('0x4')]['toLowerCase'](),'app':'Set','appdata':_0xd693('0x38')+_0x38ab57[_0xd693('0x37')],'context':_0xe554ea[_0xd693('0x6')],'exten':_0xe554ea[_0xd693('0x7')],'priority':_0x38ab57[_0xd693('0x32')][_0xd693('0x30')]+_0x29c704+_0x197f48++,'VoiceExtensionId':_0xe554ea['id']});}_0x85b9ea['push']({'type':_0x38ab57['type'][_0xd693('0x36')](),'app':_0xd693('0x16'),'appdata':'$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):'+(_0x38ab57[_0xd693('0x39')]?_0xd693('0x3a')+_0x38ab57['callerID']+')':_0xd693('0x3b')),'context':_0xe554ea[_0xd693('0x6')],'exten':_0xe554ea['exten'],'priority':_0x38ab57[_0xd693('0x32')]['length']+_0x29c704+_0x197f48++,'VoiceExtensionId':_0xe554ea['id']});}else{if(_0x38ab57[_0xd693('0x1b')](_0xd693('0x3c'))){if(['queue',_0xd693('0x3d')][_0xd693('0x3e')](_0x38ab57['app'][_0xd693('0x36')]())&&_0x38ab57[_0xd693('0x3f')]!==_0xd693('0x40')){if(_0x38ab57['answer']){_0x85b9ea['push']({'type':_0x38ab57[_0xd693('0x4')][_0xd693('0x36')](),'app':_0xd693('0x16'),'appdata':'$[${XCALLY-MOTION-ANSWER}=0]?Answer','context':_0xe554ea[_0xd693('0x6')],'exten':_0xe554ea['exten'],'priority':_0x38ab57[_0xd693('0x32')][_0xd693('0x30')]+_0x29c704+_0x197f48++,'VoiceExtensionId':_0xe554ea['id']});_0x85b9ea[_0xd693('0xd')]({'type':_0x38ab57[_0xd693('0x4')][_0xd693('0x36')](),'app':_0xd693('0x5'),'appdata':_0xd693('0x41'),'context':_0xe554ea[_0xd693('0x6')],'exten':_0xe554ea[_0xd693('0x7')],'priority':_0x38ab57[_0xd693('0x32')][_0xd693('0x30')]+_0x29c704+_0x197f48++,'VoiceExtensionId':_0xe554ea['id']});}else{_0x85b9ea['push']({'type':_0x38ab57[_0xd693('0x4')][_0xd693('0x36')](),'app':_0xd693('0x16'),'appdata':_0xd693('0x42'),'context':_0xe554ea[_0xd693('0x6')],'exten':_0xe554ea['exten'],'priority':_0x38ab57[_0xd693('0x32')][_0xd693('0x30')]+_0x29c704+_0x197f48++,'VoiceExtensionId':_0xe554ea['id']});_0x85b9ea['push']({'type':_0x38ab57['type'][_0xd693('0x36')](),'app':'Set','appdata':_0xd693('0x43'),'context':_0xe554ea[_0xd693('0x6')],'exten':_0xe554ea['exten'],'priority':_0x38ab57['intervals'][_0xd693('0x30')]+_0x29c704+_0x197f48++,'VoiceExtensionId':_0xe554ea['id']});}}}}for(var _0x56b304=0x0;_0x56b304<_0x38ab57['intervals'][_0xd693('0x30')];_0x56b304++){var _0x4b1f21=_0x29c704+_0x38ab57[_0xd693('0x32')][_0xd693('0x30')];var _0x46a400=_0x56b304===_0x38ab57[_0xd693('0x32')][_0xd693('0x30')]-0x1?_0x29c704+_0x85b9ea['length']+_0x3e7c46['length']+0x2:_0x29c704+_0x56b304+0x1;_0x85b9ea['splice'](_0x56b304,0x0,{'type':_0xe554ea[_0xd693('0x4')],'app':_0xd693('0x44'),'appdata':_0x38ab57[_0xd693('0x32')][_0x56b304]+'?'+_0xe554ea['context']+',${EXTEN},'+_0x4b1f21+':'+_0xe554ea[_0xd693('0x6')]+_0xd693('0x45')+_0x46a400,'exten':_0xe554ea[_0xd693('0x7')],'context':_0xe554ea[_0xd693('0x6')],'priority':_0x29c704+_0x56b304,'VoiceExtensionId':_0xe554ea['id']});}if(_0x38ab57[_0xd693('0x3f')]==='outboundDial'){_0x38ab57[_0xd693('0x46')]=_0x520576(_0xe554ea,_0x38ab57[_0xd693('0x46')]);}if(_0x38ab57[_0xd693('0x3f')]==='agi'){_0x85b9ea[_0xd693('0xd')]({'type':_0x38ab57['type'][_0xd693('0x36')](),'app':_0xd693('0x5'),'appdata':'XMCS-UNIQUEID=${CHANNEL(LINKEDID)}','context':_0xe554ea[_0xd693('0x6')],'exten':_0xe554ea[_0xd693('0x7')],'priority':_0x38ab57['intervals']['length']+_0x29c704+_0x197f48++,'VoiceExtensionId':_0xe554ea['id']});}_0x38ab57[_0xd693('0x47')]=_0x85b9ea[_0xd693('0x30')]?_[_0xd693('0x48')](_0x85b9ea)[_0xd693('0x47')]+0x1:_0x29c704;_0xbf255c=_[_0xd693('0x49')](_0xbf255c,_0x85b9ea,[_0x38ab57],_0x3e7c46);_0x29c704=_[_0xd693('0x48')](_0xbf255c)['priority']+0x1;}return _0x457ef0(_0xbf255c);})[_0xd693('0x4a')](function(_0x1390d8){_0x358034(_0x1390d8);});});}return _0x45370d[_0xd693('0x4b')](_0xd693('0x4c'),attributes,{'tableName':_0xd693('0x4d'),'paranoid':![],'indexes':[],'timestamps':!![],'instanceMethods':{'createRouting':function(_0x373c8b){var _0x1570ee=this[_0xd693('0x4e')]({'plain':!![]});var _0x2b557f=_0x1570ee[_0xd693('0x4')]===_0xd693('0x13')?_0xc39f4a(_0x1570ee):_0x3bd63d(_0x1570ee);return _0x28315a(_0x1570ee,_0x373c8b,_[_0xd693('0x48')](_0x2b557f)[_0xd693('0x47')]+0x1)[_0xd693('0x2f')](function(_0x1184e2){var _0x4b6de6=_[_0xd693('0x49')](_0x2b557f,_0x1184e2);_0x4b6de6[_0xd693('0xd')]({'type':_0x1570ee[_0xd693('0x4')],'app':_0xd693('0x4f'),'exten':_0x1570ee[_0xd693('0x7')],'context':_0x1570ee[_0xd693('0x6')],'priority':_[_0xd693('0x48')](_0x4b6de6)['priority']+0x1,'VoiceExtensionId':_0x1570ee['id']});return _0x4b6de6;});}}});};
\ No newline at end of file
index 748d918..b36219e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc359=['options','raw','where','limit','map','include','attributes','debug','util','bluebird','randomstring','ioredis','../../config/utils','rpc','jayson/promise','redis','localhost','socket.io-emitter','./voiceExtension.socket','register','then','info','VoiceExtension,\x20%s,\x20%s','request\x20sent','VoiceExtension,\x20%s,\x20%s,\x20%s','stringify','error','message','catch','GetVoiceExtension','findAll'];(function(_0x4b7895,_0x3c4f5d){var _0x264180=function(_0xe0e861){while(--_0xe0e861){_0x4b7895['push'](_0x4b7895['shift']());}};_0x264180(++_0x3c4f5d);}(_0xc359,0x1d9));var _0x9c35=function(_0x2c2980,_0x34282a){_0x2c2980=_0x2c2980-0x0;var _0x2a20a9=_0xc359[_0x2c2980];return _0x2a20a9;};'use strict';var _=require('lodash');var util=require(_0x9c35('0x0'));var moment=require('moment');var BPromise=require(_0x9c35('0x1'));var rs=require(_0x9c35('0x2'));var fs=require('fs');var Redis=require(_0x9c35('0x3'));var db=require('../../mysqldb')['db'];var utils=require(_0x9c35('0x4'));var logger=require('../../config/logger')(_0x9c35('0x5'));var config=require('../../config/environment');var jayson=require(_0x9c35('0x6'));var client=jayson['client']['http']({'port':0x232a});config['redis']=_['defaults'](config[_0x9c35('0x7')],{'host':_0x9c35('0x8'),'port':0x18eb});var socket=require(_0x9c35('0x9'))(new Redis(config[_0x9c35('0x7')]));require(_0x9c35('0xa'))[_0x9c35('0xb')](socket);function respondWithRpcPromise(_0x56d3fb,_0x21df9a,_0x467add){return new BPromise(function(_0x500420,_0x4e3834){return client['request'](_0x56d3fb,_0x467add)[_0x9c35('0xc')](function(_0x4d012f){logger[_0x9c35('0xd')](_0x9c35('0xe'),_0x21df9a,_0x9c35('0xf'));logger['debug'](_0x9c35('0x10'),_0x21df9a,_0x9c35('0xf'),JSON[_0x9c35('0x11')](_0x4d012f));if(_0x4d012f[_0x9c35('0x12')]){if(_0x4d012f[_0x9c35('0x12')]['code']===0x1f4){logger[_0x9c35('0x12')](_0x9c35('0xe'),_0x21df9a,_0x4d012f[_0x9c35('0x12')][_0x9c35('0x13')]);return _0x4e3834(_0x4d012f[_0x9c35('0x12')][_0x9c35('0x13')]);}logger[_0x9c35('0x12')](_0x9c35('0xe'),_0x21df9a,_0x4d012f[_0x9c35('0x12')][_0x9c35('0x13')]);return _0x500420(_0x4d012f[_0x9c35('0x12')][_0x9c35('0x13')]);}else{logger[_0x9c35('0xd')](_0x9c35('0xe'),_0x21df9a,_0x9c35('0xf'));_0x500420(_0x4d012f['result'][_0x9c35('0x13')]);}})[_0x9c35('0x14')](function(_0x26911d){logger[_0x9c35('0x12')]('VoiceExtension,\x20%s,\x20%s',_0x21df9a,_0x26911d);_0x4e3834(_0x26911d);});});}exports[_0x9c35('0x15')]=function(_0x3c3858){var _0x2edb26=this;return new Promise(function(_0x50d7b8,_0x69d118){return db['VoiceExtension'][_0x9c35('0x16')]({'raw':_0x3c3858['options']?_0x3c3858[_0x9c35('0x17')][_0x9c35('0x18')]===undefined?!![]:![]:!![],'where':_0x3c3858[_0x9c35('0x17')]?_0x3c3858[_0x9c35('0x17')][_0x9c35('0x19')]||null:null,'attributes':_0x3c3858[_0x9c35('0x17')]?_0x3c3858[_0x9c35('0x17')]['attributes']||null:null,'limit':_0x3c3858['options']?_0x3c3858[_0x9c35('0x17')][_0x9c35('0x1a')]||null:null,'include':_0x3c3858[_0x9c35('0x17')]?_0x3c3858[_0x9c35('0x17')]['include']?_[_0x9c35('0x1b')](_0x3c3858['options'][_0x9c35('0x1c')],function(_0x4bf0ea){return{'model':db[_0x4bf0ea['model']],'as':_0x4bf0ea['as'],'attributes':_0x4bf0ea[_0x9c35('0x1d')],'include':_0x4bf0ea[_0x9c35('0x1c')]?_[_0x9c35('0x1b')](_0x4bf0ea['include'],function(_0x3bfdfd){return{'model':db[_0x3bfdfd['model']],'as':_0x3bfdfd['as'],'attributes':_0x3bfdfd[_0x9c35('0x1d')],'include':_0x3bfdfd[_0x9c35('0x1c')]?_[_0x9c35('0x1b')](_0x3bfdfd[_0x9c35('0x1c')],function(_0x4525c9){return{'model':db[_0x4525c9['model']],'as':_0x4525c9['as'],'attributes':_0x4525c9[_0x9c35('0x1d')]};}):[]};}):[]};}):[]:[]})[_0x9c35('0xc')](function(_0x568925){logger[_0x9c35('0xd')](_0x9c35('0x15'),_0x3c3858);logger[_0x9c35('0x1e')](_0x9c35('0x15'),_0x3c3858,JSON[_0x9c35('0x11')](_0x568925));_0x50d7b8(_0x568925);})['catch'](function(_0x37379c){logger[_0x9c35('0x12')](_0x9c35('0x15'),_0x37379c[_0x9c35('0x13')],_0x3c3858);_0x69d118(_0x2edb26[_0x9c35('0x12')](0x1f4,_0x37379c[_0x9c35('0x13')]));});});};
\ No newline at end of file
+var _0xd86a=['error','message','result','GetVoiceExtension','VoiceExtension','findAll','options','attributes','limit','include','map','model','lodash','util','moment','ioredis','../../mysqldb','rpc','../../config/environment','jayson/promise','client','redis','localhost','socket.io-emitter','./voiceExtension.socket','register','request','then','info','VoiceExtension,\x20%s,\x20%s','debug','VoiceExtension,\x20%s,\x20%s,\x20%s','stringify'];(function(_0x10bfa9,_0x2668df){var _0xc94cb0=function(_0x40fab0){while(--_0x40fab0){_0x10bfa9['push'](_0x10bfa9['shift']());}};_0xc94cb0(++_0x2668df);}(_0xd86a,0xf3));var _0xad86=function(_0x2d2ca2,_0x51873f){_0x2d2ca2=_0x2d2ca2-0x0;var _0x48489d=_0xd86a[_0x2d2ca2];return _0x48489d;};'use strict';var _=require(_0xad86('0x0'));var util=require(_0xad86('0x1'));var moment=require(_0xad86('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0xad86('0x3'));var db=require(_0xad86('0x4'))['db'];var utils=require('../../config/utils');var logger=require('../../config/logger')(_0xad86('0x5'));var config=require(_0xad86('0x6'));var jayson=require(_0xad86('0x7'));var client=jayson[_0xad86('0x8')]['http']({'port':0x232a});config['redis']=_['defaults'](config[_0xad86('0x9')],{'host':_0xad86('0xa'),'port':0x18eb});var socket=require(_0xad86('0xb'))(new Redis(config[_0xad86('0x9')]));require(_0xad86('0xc'))[_0xad86('0xd')](socket);function respondWithRpcPromise(_0x3ff5c2,_0x58a7cc,_0x2f446f){return new BPromise(function(_0x382632,_0x378249){return client[_0xad86('0xe')](_0x3ff5c2,_0x2f446f)[_0xad86('0xf')](function(_0x5c87b4){logger[_0xad86('0x10')](_0xad86('0x11'),_0x58a7cc,'request\x20sent');logger[_0xad86('0x12')](_0xad86('0x13'),_0x58a7cc,'request\x20sent',JSON[_0xad86('0x14')](_0x5c87b4));if(_0x5c87b4['error']){if(_0x5c87b4[_0xad86('0x15')]['code']===0x1f4){logger[_0xad86('0x15')](_0xad86('0x11'),_0x58a7cc,_0x5c87b4['error'][_0xad86('0x16')]);return _0x378249(_0x5c87b4[_0xad86('0x15')]['message']);}logger[_0xad86('0x15')](_0xad86('0x11'),_0x58a7cc,_0x5c87b4[_0xad86('0x15')][_0xad86('0x16')]);return _0x382632(_0x5c87b4[_0xad86('0x15')][_0xad86('0x16')]);}else{logger[_0xad86('0x10')](_0xad86('0x11'),_0x58a7cc,'request\x20sent');_0x382632(_0x5c87b4[_0xad86('0x17')][_0xad86('0x16')]);}})['catch'](function(_0xe55083){logger['error']('VoiceExtension,\x20%s,\x20%s',_0x58a7cc,_0xe55083);_0x378249(_0xe55083);});});}exports[_0xad86('0x18')]=function(_0x273e3b){var _0x17ff5a=this;return new Promise(function(_0x22ba56,_0x3447ab){return db[_0xad86('0x19')][_0xad86('0x1a')]({'raw':_0x273e3b['options']?_0x273e3b[_0xad86('0x1b')]['raw']===undefined?!![]:![]:!![],'where':_0x273e3b['options']?_0x273e3b['options']['where']||null:null,'attributes':_0x273e3b['options']?_0x273e3b[_0xad86('0x1b')][_0xad86('0x1c')]||null:null,'limit':_0x273e3b['options']?_0x273e3b[_0xad86('0x1b')][_0xad86('0x1d')]||null:null,'include':_0x273e3b[_0xad86('0x1b')]?_0x273e3b[_0xad86('0x1b')][_0xad86('0x1e')]?_[_0xad86('0x1f')](_0x273e3b[_0xad86('0x1b')][_0xad86('0x1e')],function(_0xbf74fc){return{'model':db[_0xbf74fc['model']],'as':_0xbf74fc['as'],'attributes':_0xbf74fc[_0xad86('0x1c')],'include':_0xbf74fc[_0xad86('0x1e')]?_['map'](_0xbf74fc['include'],function(_0x8693f5){return{'model':db[_0x8693f5[_0xad86('0x20')]],'as':_0x8693f5['as'],'attributes':_0x8693f5[_0xad86('0x1c')],'include':_0x8693f5['include']?_[_0xad86('0x1f')](_0x8693f5['include'],function(_0x13d725){return{'model':db[_0x13d725[_0xad86('0x20')]],'as':_0x13d725['as'],'attributes':_0x13d725[_0xad86('0x1c')]};}):[]};}):[]};}):[]:[]})[_0xad86('0xf')](function(_0x3f769b){logger[_0xad86('0x10')]('GetVoiceExtension',_0x273e3b);logger[_0xad86('0x12')](_0xad86('0x18'),_0x273e3b,JSON[_0xad86('0x14')](_0x3f769b));_0x22ba56(_0x3f769b);})['catch'](function(_0x453619){logger[_0xad86('0x15')](_0xad86('0x18'),_0x453619[_0xad86('0x16')],_0x273e3b);_0x3447ab(_0x17ff5a[_0xad86('0x15')](0x1f4,_0x453619['message']));});});};
\ No newline at end of file
index 6134388..edeaec7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5fab=['emit','removeListener','register','length','./voiceExtension.events','save','update'];(function(_0x5d3901,_0x5364db){var _0x5b7843=function(_0x3a1a44){while(--_0x3a1a44){_0x5d3901['push'](_0x5d3901['shift']());}};_0x5b7843(++_0x5364db);}(_0x5fab,0x177));var _0xb5fa=function(_0x11503f,_0x30de86){_0x11503f=_0x11503f-0x0;var _0x34caab=_0x5fab[_0x11503f];return _0x34caab;};'use strict';var VoiceExtensionEvents=require(_0xb5fa('0x0'));var events=[_0xb5fa('0x1'),'remove',_0xb5fa('0x2')];function createListener(_0x2e2a50,_0x3fc227){return function(_0x316ad0){_0x3fc227[_0xb5fa('0x3')](_0x2e2a50,_0x316ad0);};}function removeListener(_0x595d8b,_0x29390a){return function(){VoiceExtensionEvents[_0xb5fa('0x4')](_0x595d8b,_0x29390a);};}exports[_0xb5fa('0x5')]=function(_0x44df89){for(var _0x4a0249=0x0,_0x5d70f6=events[_0xb5fa('0x6')];_0x4a0249<_0x5d70f6;_0x4a0249++){var _0x1aec3e=events[_0x4a0249];var _0x9c7bce=createListener('voiceExtension:'+_0x1aec3e,_0x44df89);VoiceExtensionEvents['on'](_0x1aec3e,_0x9c7bce);}};
\ No newline at end of file
+var _0xabce=['voiceExtension:','./voiceExtension.events','save','remove','update','emit'];(function(_0xe82e26,_0x126b16){var _0x56f4d6=function(_0x244a1){while(--_0x244a1){_0xe82e26['push'](_0xe82e26['shift']());}};_0x56f4d6(++_0x126b16);}(_0xabce,0x103));var _0xeabc=function(_0x3826ad,_0x49a30d){_0x3826ad=_0x3826ad-0x0;var _0x17b900=_0xabce[_0x3826ad];return _0x17b900;};'use strict';var VoiceExtensionEvents=require(_0xeabc('0x0'));var events=[_0xeabc('0x1'),_0xeabc('0x2'),_0xeabc('0x3')];function createListener(_0x49dbcc,_0x5bd1a4){return function(_0x5ebc95){_0x5bd1a4[_0xeabc('0x4')](_0x49dbcc,_0x5ebc95);};}function removeListener(_0x1d9f37,_0x1a88a7){return function(){VoiceExtensionEvents['removeListener'](_0x1d9f37,_0x1a88a7);};}exports['register']=function(_0x1b07a8){for(var _0x52a4d7=0x0,_0x229ba4=events['length'];_0x52a4d7<_0x229ba4;_0x52a4d7++){var _0x3bdc29=events[_0x52a4d7];var _0x9417af=createListener(_0xeabc('0x5')+_0x3bdc29,_0x1b07a8);VoiceExtensionEvents['on'](_0x3bdc29,_0x9417af);}};
\ No newline at end of file
index cfcc783..bf2138f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7278=['express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceMail.controller','get','isAuthenticated','/:id','show','post','create','put','update','delete','destroy','exports','multer','util','path','connect-timeout'];(function(_0x5a6300,_0x290fb0){var _0xa246c4=function(_0x1c8188){while(--_0x1c8188){_0x5a6300['push'](_0x5a6300['shift']());}};_0xa246c4(++_0x290fb0);}(_0x7278,0x161));var _0x8727=function(_0x3b7356,_0xa0b48e){_0x3b7356=_0x3b7356-0x0;var _0x3aab37=_0x7278[_0x3b7356];return _0x3aab37;};'use strict';var multer=require(_0x8727('0x0'));var util=require(_0x8727('0x1'));var path=require(_0x8727('0x2'));var timeout=require(_0x8727('0x3'));var express=require(_0x8727('0x4'));var router=express['Router']();var fs_extra=require(_0x8727('0x5'));var auth=require(_0x8727('0x6'));var interaction=require(_0x8727('0x7'));var config=require(_0x8727('0x8'));var controller=require(_0x8727('0x9'));router[_0x8727('0xa')]('/',auth[_0x8727('0xb')](),controller['index']);router[_0x8727('0xa')](_0x8727('0xc'),auth[_0x8727('0xb')](),controller[_0x8727('0xd')]);router[_0x8727('0xa')]('/:id/messages',auth['isAuthenticated'](),controller['getMessages']);router[_0x8727('0xe')]('/',auth[_0x8727('0xb')](),controller[_0x8727('0xf')]);router[_0x8727('0x10')](_0x8727('0xc'),auth[_0x8727('0xb')](),controller[_0x8727('0x11')]);router[_0x8727('0x12')]('/:id',auth[_0x8727('0xb')](),controller[_0x8727('0x13')]);module[_0x8727('0x14')]=router;
\ No newline at end of file
+var _0xfcf0=['update','delete','destroy','exports','multer','util','connect-timeout','express','Router','fs-extra','../../components/interaction/service','../../config/environment','./voiceMail.controller','get','isAuthenticated','index','/:id','show','/:id/messages','getMessages','post','put'];(function(_0x36bfe9,_0x4e69eb){var _0x175f0e=function(_0x5f08ac){while(--_0x5f08ac){_0x36bfe9['push'](_0x36bfe9['shift']());}};_0x175f0e(++_0x4e69eb);}(_0xfcf0,0x138));var _0x0fcf=function(_0xaa6a4,_0x64b067){_0xaa6a4=_0xaa6a4-0x0;var _0xdc31a4=_0xfcf0[_0xaa6a4];return _0xdc31a4;};'use strict';var multer=require(_0x0fcf('0x0'));var util=require(_0x0fcf('0x1'));var path=require('path');var timeout=require(_0x0fcf('0x2'));var express=require(_0x0fcf('0x3'));var router=express[_0x0fcf('0x4')]();var fs_extra=require(_0x0fcf('0x5'));var auth=require('../../components/auth/service');var interaction=require(_0x0fcf('0x6'));var config=require(_0x0fcf('0x7'));var controller=require(_0x0fcf('0x8'));router[_0x0fcf('0x9')]('/',auth[_0x0fcf('0xa')](),controller[_0x0fcf('0xb')]);router[_0x0fcf('0x9')](_0x0fcf('0xc'),auth['isAuthenticated'](),controller[_0x0fcf('0xd')]);router[_0x0fcf('0x9')](_0x0fcf('0xe'),auth['isAuthenticated'](),controller[_0x0fcf('0xf')]);router[_0x0fcf('0x10')]('/',auth[_0x0fcf('0xa')](),controller['create']);router[_0x0fcf('0x11')]('/:id',auth[_0x0fcf('0xa')](),controller[_0x0fcf('0x12')]);router[_0x0fcf('0x13')]('/:id',auth['isAuthenticated'](),controller[_0x0fcf('0x14')]);module[_0x0fcf('0x15')]=router;
\ No newline at end of file
index efaf767..5ece40f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x10db=['TINYINT(4)','TIMESTAMP','INTEGER','VIRTUAL','getDataValue','fullname','\x20-\x20','sequelize','exports','STRING','contest_mailbox','setDataValue','email','string','trim','central','ENUM','yes'];(function(_0x377e92,_0x25a786){var _0x42a003=function(_0xda6d15){while(--_0xda6d15){_0x377e92['push'](_0x377e92['shift']());}};_0x42a003(++_0x25a786);}(_0x10db,0x103));var _0xb10d=function(_0x3dfae3,_0x170201){_0x3dfae3=_0x3dfae3-0x0;var _0x41095b=_0x10db[_0x3dfae3];return _0x41095b;};'use strict';var Sequelize=require(_0xb10d('0x0'));module[_0xb10d('0x1')]={'customer_id':{'type':Sequelize[_0xb10d('0x2')]},'context':{'type':Sequelize['STRING'],'defaultValue':'from-voicemail','unique':_0xb10d('0x3')},'mailbox':{'type':Sequelize['STRING'],'defaultValue':'','allowNull':![],'unique':'contest_mailbox'},'password':{'type':Sequelize[_0xb10d('0x2')]},'fullname':{'type':Sequelize[_0xb10d('0x2')]},'email':{'type':Sequelize['STRING'],'validate':{'isEmail':!![]},'set':function(_0x3e470b){this[_0xb10d('0x4')](_0xb10d('0x5'),typeof _0x3e470b===_0xb10d('0x6')&&_0x3e470b[_0xb10d('0x7')]()?_0x3e470b[_0xb10d('0x7')]():null);}},'pager':{'type':Sequelize[_0xb10d('0x2')]},'tz':{'type':Sequelize[_0xb10d('0x2')],'defaultValue':_0xb10d('0x8')},'attach':{'type':Sequelize[_0xb10d('0x9')](_0xb10d('0xa'),'no'),'defaultValue':_0xb10d('0xa'),'allowNull':![]},'saycid':{'type':Sequelize[_0xb10d('0x9')](_0xb10d('0xa'),'no'),'defaultValue':'yes','allowNull':![]},'dialout':{'type':Sequelize[_0xb10d('0x2')]},'callback':{'type':Sequelize[_0xb10d('0x2')]},'review':{'type':Sequelize['ENUM'](_0xb10d('0xa'),'no'),'defaultValue':'no','allowNull':![]},'operator':{'type':Sequelize[_0xb10d('0x9')](_0xb10d('0xa'),'no'),'defaultValue':'no','allowNull':![]},'envelope':{'type':Sequelize['ENUM'](_0xb10d('0xa'),'no'),'defaultValue':'no','allowNull':![]},'sayduration':{'type':Sequelize[_0xb10d('0x9')]('yes','no'),'defaultValue':'no','allowNull':![]},'saydurationm':{'type':_0xb10d('0xb'),'defaultValue':0x1,'allowNull':![]},'sendvoicemail':{'type':Sequelize[_0xb10d('0x9')](_0xb10d('0xa'),'no'),'defaultValue':'no','allowNull':![]},'delete':{'type':Sequelize[_0xb10d('0x9')](_0xb10d('0xa'),'no'),'defaultValue':'no','allowNull':![]},'nextaftercmd':{'type':Sequelize[_0xb10d('0x9')](_0xb10d('0xa'),'no'),'defaultValue':_0xb10d('0xa'),'allowNull':![]},'forcename':{'type':Sequelize[_0xb10d('0x9')](_0xb10d('0xa'),'no'),'defaultValue':'no','allowNull':![]},'forcegreetings':{'type':Sequelize[_0xb10d('0x9')](_0xb10d('0xa'),'no'),'defaultValue':'no','allowNull':![]},'hidefromdir':{'type':Sequelize['ENUM'](_0xb10d('0xa'),'no'),'defaultValue':_0xb10d('0xa'),'allowNull':![]},'stamp':{'type':_0xb10d('0xc')},'emailsubject':{'type':Sequelize[_0xb10d('0x2')]},'emailbody':{'type':Sequelize[_0xb10d('0x2')]},'maxsecs':{'type':Sequelize[_0xb10d('0xd')](0xff),'defaultValue':0xb4,'allowNull':![]},'maxmsg':{'type':Sequelize['INTEGER'](0xff),'defaultValue':0x64,'allowNull':![]},'name':{'type':Sequelize[_0xb10d('0xe')],'get':function(){return this[_0xb10d('0xf')](_0xb10d('0x10'))+_0xb10d('0x11')+this[_0xb10d('0xf')]('mailbox');}}};
\ No newline at end of file
+var _0xc48b=['mailbox','sequelize','STRING','from-voicemail','contest_mailbox','setDataValue','string','trim','central','ENUM','yes','TIMESTAMP','INTEGER','getDataValue','fullname'];(function(_0x1cb9ab,_0x2efaf7){var _0x480bf8=function(_0x5f3dc1){while(--_0x5f3dc1){_0x1cb9ab['push'](_0x1cb9ab['shift']());}};_0x480bf8(++_0x2efaf7);}(_0xc48b,0x88));var _0xbc48=function(_0x1c3331,_0x49ecd7){_0x1c3331=_0x1c3331-0x0;var _0x4a2b9f=_0xc48b[_0x1c3331];return _0x4a2b9f;};'use strict';var Sequelize=require(_0xbc48('0x0'));module['exports']={'customer_id':{'type':Sequelize[_0xbc48('0x1')]},'context':{'type':Sequelize[_0xbc48('0x1')],'defaultValue':_0xbc48('0x2'),'unique':_0xbc48('0x3')},'mailbox':{'type':Sequelize[_0xbc48('0x1')],'defaultValue':'','allowNull':![],'unique':'contest_mailbox'},'password':{'type':Sequelize[_0xbc48('0x1')]},'fullname':{'type':Sequelize[_0xbc48('0x1')]},'email':{'type':Sequelize[_0xbc48('0x1')],'validate':{'isEmail':!![]},'set':function(_0x3847ba){this[_0xbc48('0x4')]('email',typeof _0x3847ba===_0xbc48('0x5')&&_0x3847ba[_0xbc48('0x6')]()?_0x3847ba['trim']():null);}},'pager':{'type':Sequelize['STRING']},'tz':{'type':Sequelize[_0xbc48('0x1')],'defaultValue':_0xbc48('0x7')},'attach':{'type':Sequelize[_0xbc48('0x8')]('yes','no'),'defaultValue':_0xbc48('0x9'),'allowNull':![]},'saycid':{'type':Sequelize[_0xbc48('0x8')](_0xbc48('0x9'),'no'),'defaultValue':'yes','allowNull':![]},'dialout':{'type':Sequelize[_0xbc48('0x1')]},'callback':{'type':Sequelize['STRING']},'review':{'type':Sequelize[_0xbc48('0x8')](_0xbc48('0x9'),'no'),'defaultValue':'no','allowNull':![]},'operator':{'type':Sequelize[_0xbc48('0x8')]('yes','no'),'defaultValue':'no','allowNull':![]},'envelope':{'type':Sequelize[_0xbc48('0x8')](_0xbc48('0x9'),'no'),'defaultValue':'no','allowNull':![]},'sayduration':{'type':Sequelize['ENUM']('yes','no'),'defaultValue':'no','allowNull':![]},'saydurationm':{'type':'TINYINT(4)','defaultValue':0x1,'allowNull':![]},'sendvoicemail':{'type':Sequelize[_0xbc48('0x8')](_0xbc48('0x9'),'no'),'defaultValue':'no','allowNull':![]},'delete':{'type':Sequelize[_0xbc48('0x8')]('yes','no'),'defaultValue':'no','allowNull':![]},'nextaftercmd':{'type':Sequelize[_0xbc48('0x8')](_0xbc48('0x9'),'no'),'defaultValue':'yes','allowNull':![]},'forcename':{'type':Sequelize['ENUM'](_0xbc48('0x9'),'no'),'defaultValue':'no','allowNull':![]},'forcegreetings':{'type':Sequelize[_0xbc48('0x8')](_0xbc48('0x9'),'no'),'defaultValue':'no','allowNull':![]},'hidefromdir':{'type':Sequelize[_0xbc48('0x8')](_0xbc48('0x9'),'no'),'defaultValue':_0xbc48('0x9'),'allowNull':![]},'stamp':{'type':_0xbc48('0xa')},'emailsubject':{'type':Sequelize[_0xbc48('0x1')]},'emailbody':{'type':Sequelize[_0xbc48('0x1')]},'maxsecs':{'type':Sequelize[_0xbc48('0xb')](0xff),'defaultValue':0xb4,'allowNull':![]},'maxmsg':{'type':Sequelize[_0xbc48('0xb')](0xff),'defaultValue':0x64,'allowNull':![]},'name':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0xbc48('0xc')](_0xbc48('0xd'))+'\x20-\x20'+this[_0xbc48('0xc')](_0xbc48('0xe'));}}};
\ No newline at end of file
index e9418f3..24031ca 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb9a7=['model','keys','query','intersection','attributes','fields','length','hasOwnProperty','order','sort','where','filters','pick','merge','filter','options','VoiceMail','includeAll','include','findAll','rows','params','find','catch','create','user','role','UserProfileSection','userProfileId','autoAssociation','error','body','findOne','VoiceMailMessage','rawAttributes','nolimit','findAndCountAll','rimraf','moment','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','api','../../config/environment','../../config/license/util','../../mysqldb','status','end','json','offset','limit','count','set','Content-Range','save','update','then','destroy','get','UserProfileResource','sendStatus','stack','name','send','index','map','fieldName','type'];(function(_0x496098,_0x61dcdb){var _0x49c4d9=function(_0x421682){while(--_0x421682){_0x496098['push'](_0x496098['shift']());}};_0x49c4d9(++_0x61dcdb);}(_0xb9a7,0x112));var _0x7b9a=function(_0x36884e,_0x48008f){_0x36884e=_0x36884e-0x0;var _0x1cc367=_0xb9a7[_0x36884e];return _0x1cc367;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x7b9a('0x0'));var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x7b9a('0x1'));var BPromise=require('bluebird');var Mustache=require(_0x7b9a('0x2'));var util=require(_0x7b9a('0x3'));var path=require(_0x7b9a('0x4'));var sox=require(_0x7b9a('0x5'));var csv=require(_0x7b9a('0x6'));var ejs=require(_0x7b9a('0x7'));var fs=require('fs');var fs_extra=require(_0x7b9a('0x8'));var _=require(_0x7b9a('0x9'));var squel=require(_0x7b9a('0xa'));var crypto=require(_0x7b9a('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x7b9a('0xc'));var toCsv=require(_0x7b9a('0x6'));var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x7b9a('0xd'));var qs=require(_0x7b9a('0xe'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x7b9a('0xf'));var logger=require('../../config/logger')(_0x7b9a('0x10'));var utils=require('../../config/utils');var config=require(_0x7b9a('0x11'));var licenseUtil=require(_0x7b9a('0x12'));var db=require(_0x7b9a('0x13'))['db'];function respondWithStatusCode(_0x5948ca,_0x32f616){_0x32f616=_0x32f616||0xcc;return function(_0xec5949){if(_0xec5949){return _0x5948ca['sendStatus'](_0x32f616);}return _0x5948ca[_0x7b9a('0x14')](_0x32f616)[_0x7b9a('0x15')]();};}function respondWithResult(_0x4b7ec0,_0xb157e5){_0xb157e5=_0xb157e5||0xc8;return function(_0xde180d){if(_0xde180d){return _0x4b7ec0[_0x7b9a('0x14')](_0xb157e5)[_0x7b9a('0x16')](_0xde180d);}};}function respondWithFilteredResult(_0x344fa7,_0x346daa){return function(_0x22a7e4){if(_0x22a7e4){var _0x35e602=typeof _0x346daa[_0x7b9a('0x17')]==='undefined'&&typeof _0x346daa[_0x7b9a('0x18')]==='undefined';var _0x123921=_0x22a7e4[_0x7b9a('0x19')];var _0x271263=_0x35e602?0x0:_0x346daa[_0x7b9a('0x17')];var _0x44a232=_0x35e602?_0x22a7e4[_0x7b9a('0x19')]:_0x346daa[_0x7b9a('0x17')]+_0x346daa[_0x7b9a('0x18')];var _0x2064a0;if(_0x44a232>=_0x123921){_0x44a232=_0x123921;_0x2064a0=0xc8;}else{_0x2064a0=0xce;}_0x344fa7[_0x7b9a('0x14')](_0x2064a0);return _0x344fa7[_0x7b9a('0x1a')](_0x7b9a('0x1b'),_0x271263+'-'+_0x44a232+'/'+_0x123921)[_0x7b9a('0x16')](_0x22a7e4);}return null;};}function patchUpdates(_0x58aed7){return function(_0x993048){try{jsonpatch['apply'](_0x993048,_0x58aed7,!![]);}catch(_0x1eacbc){return BPromise['reject'](_0x1eacbc);}return _0x993048[_0x7b9a('0x1c')]();};}function saveUpdates(_0x331ae6,_0x23d812){return function(_0x54fda7){if(_0x54fda7){return _0x54fda7[_0x7b9a('0x1d')](_0x331ae6)[_0x7b9a('0x1e')](function(_0x5705b2){return _0x5705b2;});}return null;};}function removeEntity(_0x35aca7,_0x374dca){return function(_0x269c07){if(_0x269c07){return _0x269c07[_0x7b9a('0x1f')]()[_0x7b9a('0x1e')](function(){var _0x5b2f52=_0x269c07[_0x7b9a('0x20')]({'plain':!![]});var _0x23219e='Voicemails';return db[_0x7b9a('0x21')]['destroy']({'where':{'type':_0x23219e,'resourceId':_0x5b2f52['id']}})[_0x7b9a('0x1e')](function(){return _0x269c07;});})[_0x7b9a('0x1e')](function(){_0x35aca7['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x24d886,_0x55301c){return function(_0x54df8a){if(!_0x54df8a){_0x24d886[_0x7b9a('0x22')](0x194);}return _0x54df8a;};}function handleError(_0x58fec8,_0x5be740){_0x5be740=_0x5be740||0x1f4;return function(_0x3847b4){logger['error'](_0x3847b4[_0x7b9a('0x23')]);if(_0x3847b4[_0x7b9a('0x24')]){delete _0x3847b4['name'];}_0x58fec8[_0x7b9a('0x14')](_0x5be740)[_0x7b9a('0x25')](_0x3847b4);};}exports[_0x7b9a('0x26')]=function(_0x5b64d7,_0x45ccf5){var _0x2ce78b={},_0x181e9c={},_0x6c8b1f={'count':0x0,'rows':[]};var _0x5028e7=_[_0x7b9a('0x27')](db['VoiceMail']['rawAttributes'],function(_0x2d278e){return{'name':_0x2d278e[_0x7b9a('0x28')],'type':_0x2d278e[_0x7b9a('0x29')]['key']};});_0x181e9c[_0x7b9a('0x2a')]=_[_0x7b9a('0x27')](_0x5028e7,'name');_0x181e9c['query']=_[_0x7b9a('0x2b')](_0x5b64d7[_0x7b9a('0x2c')]);_0x181e9c['filters']=_[_0x7b9a('0x2d')](_0x181e9c[_0x7b9a('0x2a')],_0x181e9c[_0x7b9a('0x2c')]);_0x2ce78b[_0x7b9a('0x2e')]=_[_0x7b9a('0x2d')](_0x181e9c['model'],qs[_0x7b9a('0x2f')](_0x5b64d7[_0x7b9a('0x2c')][_0x7b9a('0x2f')]));_0x2ce78b[_0x7b9a('0x2e')]=_0x2ce78b[_0x7b9a('0x2e')][_0x7b9a('0x30')]?_0x2ce78b['attributes']:_0x181e9c['model'];if(!_0x5b64d7[_0x7b9a('0x2c')][_0x7b9a('0x31')]('nolimit')){_0x2ce78b[_0x7b9a('0x18')]=qs[_0x7b9a('0x18')](_0x5b64d7[_0x7b9a('0x2c')]['limit']);_0x2ce78b[_0x7b9a('0x17')]=qs[_0x7b9a('0x17')](_0x5b64d7['query']['offset']);}_0x2ce78b[_0x7b9a('0x32')]=qs[_0x7b9a('0x33')](_0x5b64d7[_0x7b9a('0x2c')][_0x7b9a('0x33')]);_0x2ce78b[_0x7b9a('0x34')]=qs[_0x7b9a('0x35')](_[_0x7b9a('0x36')](_0x5b64d7[_0x7b9a('0x2c')],_0x181e9c['filters']),_0x5028e7);if(_0x5b64d7[_0x7b9a('0x2c')]['filter']){_0x2ce78b[_0x7b9a('0x34')]=_[_0x7b9a('0x37')](_0x2ce78b[_0x7b9a('0x34')],{'$or':_[_0x7b9a('0x27')](_0x5028e7,function(_0x3fa4cd){if(_0x3fa4cd[_0x7b9a('0x29')]!=='VIRTUAL'){var _0x34eebe={};_0x34eebe[_0x3fa4cd[_0x7b9a('0x24')]]={'$like':'%'+_0x5b64d7[_0x7b9a('0x2c')][_0x7b9a('0x38')]+'%'};return _0x34eebe;}})});}_0x2ce78b=_['merge']({},_0x2ce78b,_0x5b64d7[_0x7b9a('0x39')]);var _0xf86939={'where':_0x2ce78b[_0x7b9a('0x34')]};return db[_0x7b9a('0x3a')]['count'](_0xf86939)[_0x7b9a('0x1e')](function(_0x53d89a){_0x6c8b1f[_0x7b9a('0x19')]=_0x53d89a;if(_0x5b64d7[_0x7b9a('0x2c')][_0x7b9a('0x3b')]){_0x2ce78b[_0x7b9a('0x3c')]=[{'all':!![]}];}return db[_0x7b9a('0x3a')][_0x7b9a('0x3d')](_0x2ce78b);})['then'](function(_0x33edc6){_0x6c8b1f[_0x7b9a('0x3e')]=_0x33edc6;return _0x6c8b1f;})[_0x7b9a('0x1e')](respondWithFilteredResult(_0x45ccf5,_0x2ce78b))['catch'](handleError(_0x45ccf5,null));};exports['show']=function(_0x3724fe,_0x454b35){var _0x995d59={'raw':!![],'where':{'id':_0x3724fe[_0x7b9a('0x3f')]['id']}},_0x5cd3dd={};_0x5cd3dd[_0x7b9a('0x2a')]=_['keys'](db['VoiceMail']['rawAttributes']);_0x5cd3dd[_0x7b9a('0x2c')]=_[_0x7b9a('0x2b')](_0x3724fe['query']);_0x5cd3dd[_0x7b9a('0x35')]=_[_0x7b9a('0x2d')](_0x5cd3dd[_0x7b9a('0x2a')],_0x5cd3dd['query']);_0x995d59[_0x7b9a('0x2e')]=_['intersection'](_0x5cd3dd[_0x7b9a('0x2a')],qs[_0x7b9a('0x2f')](_0x3724fe[_0x7b9a('0x2c')][_0x7b9a('0x2f')]));_0x995d59[_0x7b9a('0x2e')]=_0x995d59['attributes'][_0x7b9a('0x30')]?_0x995d59['attributes']:_0x5cd3dd[_0x7b9a('0x2a')];if(_0x3724fe['query']['includeAll']){_0x995d59[_0x7b9a('0x3c')]=[{'all':!![]}];}_0x995d59=_[_0x7b9a('0x37')]({},_0x995d59,_0x3724fe[_0x7b9a('0x39')]);return db[_0x7b9a('0x3a')][_0x7b9a('0x40')](_0x995d59)[_0x7b9a('0x1e')](handleEntityNotFound(_0x454b35,null))[_0x7b9a('0x1e')](respondWithResult(_0x454b35,null))[_0x7b9a('0x41')](handleError(_0x454b35,null));};exports[_0x7b9a('0x42')]=function(_0x5088c7,_0x1d7957){return db[_0x7b9a('0x3a')]['create'](_0x5088c7['body'],{})['then'](function(_0x1b3e65){var _0x30296e=_0x5088c7[_0x7b9a('0x43')][_0x7b9a('0x20')]({'plain':!![]});if(!_0x30296e)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x30296e[_0x7b9a('0x44')]===_0x7b9a('0x43')){var _0x287dea=_0x1b3e65[_0x7b9a('0x20')]({'plain':!![]});var _0x2d083b='Voicemails';return db[_0x7b9a('0x45')]['find']({'where':{'name':_0x2d083b,'userProfileId':_0x30296e[_0x7b9a('0x46')]},'raw':!![]})[_0x7b9a('0x1e')](function(_0x239146){if(_0x239146&&_0x239146[_0x7b9a('0x47')]===0x0){return db['UserProfileResource'][_0x7b9a('0x42')]({'name':_0x287dea[_0x7b9a('0x24')],'resourceId':_0x287dea['id'],'type':_0x239146[_0x7b9a('0x24')],'sectionId':_0x239146['id']},{})[_0x7b9a('0x1e')](function(){return _0x1b3e65;});}else{return _0x1b3e65;}})[_0x7b9a('0x41')](function(_0x3e2f1b){logger[_0x7b9a('0x48')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x3e2f1b);throw _0x3e2f1b;});}return _0x1b3e65;})['then'](respondWithResult(_0x1d7957,0xc9))['catch'](handleError(_0x1d7957,null));};exports[_0x7b9a('0x1d')]=function(_0x2f8929,_0x5a1b7d){if(_0x2f8929['body']['id']){delete _0x2f8929['body']['id'];}return db['VoiceMail'][_0x7b9a('0x40')]({'where':{'id':_0x2f8929[_0x7b9a('0x3f')]['id']}})[_0x7b9a('0x1e')](handleEntityNotFound(_0x5a1b7d,null))[_0x7b9a('0x1e')](saveUpdates(_0x2f8929[_0x7b9a('0x49')],null))[_0x7b9a('0x1e')](respondWithResult(_0x5a1b7d,null))[_0x7b9a('0x41')](handleError(_0x5a1b7d,null));};exports[_0x7b9a('0x1f')]=function(_0x5dc17e,_0x1f99f5){return db['VoiceMail'][_0x7b9a('0x40')]({'where':{'id':_0x5dc17e[_0x7b9a('0x3f')]['id']}})[_0x7b9a('0x1e')](handleEntityNotFound(_0x1f99f5,null))[_0x7b9a('0x1e')](removeEntity(_0x1f99f5,null))[_0x7b9a('0x41')](handleError(_0x1f99f5,null));};exports['getMessages']=function(_0x25ec82,_0x491804,_0x3d2df4){return db[_0x7b9a('0x3a')][_0x7b9a('0x4a')]({'where':{'id':_0x25ec82['params']['id']}})['then'](handleEntityNotFound(_0x491804,null))['then'](function(_0x4f6843){var _0x33375c;var _0x8a777f={},_0xb91099={};_0xb91099['model']=_[_0x7b9a('0x2b')](db[_0x7b9a('0x4b')][_0x7b9a('0x4c')]);_0xb91099[_0x7b9a('0x2c')]=_[_0x7b9a('0x2b')](_0x25ec82['query']);_0xb91099[_0x7b9a('0x35')]=_[_0x7b9a('0x2d')](_0xb91099[_0x7b9a('0x2a')],_0xb91099['query']);_0x8a777f['attributes']=_['intersection'](_0xb91099[_0x7b9a('0x2a')],qs[_0x7b9a('0x2f')](_0x25ec82[_0x7b9a('0x2c')]['fields']));_0x8a777f[_0x7b9a('0x2e')]=_0x8a777f[_0x7b9a('0x2e')]['length']?_0x8a777f[_0x7b9a('0x2e')]:_0xb91099['model'];if(!_0x25ec82[_0x7b9a('0x2c')]['hasOwnProperty'](_0x7b9a('0x4d'))){_0x8a777f[_0x7b9a('0x18')]=qs[_0x7b9a('0x18')](_0x25ec82[_0x7b9a('0x2c')]['limit']);_0x8a777f[_0x7b9a('0x17')]=qs[_0x7b9a('0x17')](_0x25ec82[_0x7b9a('0x2c')][_0x7b9a('0x17')]);}_0x8a777f['order']=qs[_0x7b9a('0x33')](_0x25ec82['query'][_0x7b9a('0x33')]);_0x8a777f['where']=qs[_0x7b9a('0x35')](_['pick'](_0x25ec82['query'],_0xb91099['filters']));if(_0x25ec82['query'][_0x7b9a('0x38')]){_0x8a777f[_0x7b9a('0x34')]=_[_0x7b9a('0x37')](_0x8a777f[_0x7b9a('0x34')],{'$or':_['map'](_0x8a777f[_0x7b9a('0x2e')],function(_0x4b9462){var _0x50b6f1={};_0x50b6f1[_0x4b9462]={'$like':'%'+_0x25ec82[_0x7b9a('0x2c')]['filter']+'%'};return _0x50b6f1;})});}_0x8a777f['where']=_[_0x7b9a('0x37')](_0x8a777f[_0x7b9a('0x34')],{'mailboxuser':_0x4f6843['mailbox']});_0x8a777f=_[_0x7b9a('0x37')]({},_0x8a777f,_0x25ec82['options']);return db[_0x7b9a('0x4b')][_0x7b9a('0x4e')](_0x8a777f)[_0x7b9a('0x1e')](respondWithFilteredResult(_0x491804,_0x8a777f));})['catch'](handleError(_0x491804,null));};
\ No newline at end of file
+var _0x5eb8=['zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','squel','crypto','jsforce','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../mysqldb','end','status','json','offset','undefined','limit','count','set','Content-Range','reject','save','update','destroy','then','get','Voicemails','UserProfileResource','sendStatus','error','name','send','index','map','rawAttributes','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','merge','VIRTUAL','includeAll','include','VoiceMail','findAll','rows','catch','show','params','options','find','body','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','userProfileId','autoAssociation','create','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','VoiceMailMessage','pick','filter','mailbox'];(function(_0x1c9b8e,_0x444821){var _0x35a635=function(_0x4c40f6){while(--_0x4c40f6){_0x1c9b8e['push'](_0x1c9b8e['shift']());}};_0x35a635(++_0x444821);}(_0x5eb8,0xb0));var _0x85eb=function(_0x77d76e,_0x106ed2){_0x77d76e=_0x77d76e-0x0;var _0x5620c8=_0x5eb8[_0x77d76e];return _0x5620c8;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x85eb('0x0'));var jsonpatch=require(_0x85eb('0x1'));var rp=require(_0x85eb('0x2'));var moment=require(_0x85eb('0x3'));var BPromise=require(_0x85eb('0x4'));var Mustache=require(_0x85eb('0x5'));var util=require(_0x85eb('0x6'));var path=require(_0x85eb('0x7'));var sox=require(_0x85eb('0x8'));var csv=require(_0x85eb('0x9'));var ejs=require(_0x85eb('0xa'));var fs=require('fs');var fs_extra=require(_0x85eb('0xb'));var _=require('lodash');var squel=require(_0x85eb('0xc'));var crypto=require(_0x85eb('0xd'));var jsforce=require(_0x85eb('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x85eb('0x9'));var querystring=require('querystring');var Papa=require(_0x85eb('0xf'));var Redis=require(_0x85eb('0x10'));var authService=require(_0x85eb('0x11'));var qs=require(_0x85eb('0x12'));var as=require(_0x85eb('0x13'));var hardwareService=require(_0x85eb('0x14'));var logger=require(_0x85eb('0x15'))('api');var utils=require(_0x85eb('0x16'));var config=require(_0x85eb('0x17'));var licenseUtil=require('../../config/license/util');var db=require(_0x85eb('0x18'))['db'];function respondWithStatusCode(_0x784583,_0x2f42ba){_0x2f42ba=_0x2f42ba||0xcc;return function(_0x259f72){if(_0x259f72){return _0x784583['sendStatus'](_0x2f42ba);}return _0x784583['status'](_0x2f42ba)[_0x85eb('0x19')]();};}function respondWithResult(_0x5c760a,_0x18ca53){_0x18ca53=_0x18ca53||0xc8;return function(_0x23a82a){if(_0x23a82a){return _0x5c760a[_0x85eb('0x1a')](_0x18ca53)[_0x85eb('0x1b')](_0x23a82a);}};}function respondWithFilteredResult(_0x183b0c,_0x49efdf){return function(_0x2e5c0a){if(_0x2e5c0a){var _0x59237b=typeof _0x49efdf[_0x85eb('0x1c')]===_0x85eb('0x1d')&&typeof _0x49efdf[_0x85eb('0x1e')]===_0x85eb('0x1d');var _0x5dbeda=_0x2e5c0a['count'];var _0x50d2a8=_0x59237b?0x0:_0x49efdf[_0x85eb('0x1c')];var _0x39ca96=_0x59237b?_0x2e5c0a[_0x85eb('0x1f')]:_0x49efdf[_0x85eb('0x1c')]+_0x49efdf[_0x85eb('0x1e')];var _0x34f875;if(_0x39ca96>=_0x5dbeda){_0x39ca96=_0x5dbeda;_0x34f875=0xc8;}else{_0x34f875=0xce;}_0x183b0c['status'](_0x34f875);return _0x183b0c[_0x85eb('0x20')](_0x85eb('0x21'),_0x50d2a8+'-'+_0x39ca96+'/'+_0x5dbeda)[_0x85eb('0x1b')](_0x2e5c0a);}return null;};}function patchUpdates(_0x4e8041){return function(_0x4b4b38){try{jsonpatch['apply'](_0x4b4b38,_0x4e8041,!![]);}catch(_0x55b9e4){return BPromise[_0x85eb('0x22')](_0x55b9e4);}return _0x4b4b38[_0x85eb('0x23')]();};}function saveUpdates(_0x329fc5,_0x255ca7){return function(_0x465c74){if(_0x465c74){return _0x465c74[_0x85eb('0x24')](_0x329fc5)['then'](function(_0x5491d5){return _0x5491d5;});}return null;};}function removeEntity(_0x5b48d9,_0x298e84){return function(_0x1426c8){if(_0x1426c8){return _0x1426c8[_0x85eb('0x25')]()[_0x85eb('0x26')](function(){var _0x312b3e=_0x1426c8[_0x85eb('0x27')]({'plain':!![]});var _0x5dfc96=_0x85eb('0x28');return db[_0x85eb('0x29')][_0x85eb('0x25')]({'where':{'type':_0x5dfc96,'resourceId':_0x312b3e['id']}})[_0x85eb('0x26')](function(){return _0x1426c8;});})[_0x85eb('0x26')](function(){_0x5b48d9['status'](0xcc)[_0x85eb('0x19')]();});}};}function handleEntityNotFound(_0x792d3a,_0x291557){return function(_0x3e7eb9){if(!_0x3e7eb9){_0x792d3a[_0x85eb('0x2a')](0x194);}return _0x3e7eb9;};}function handleError(_0x29d262,_0x50541a){_0x50541a=_0x50541a||0x1f4;return function(_0x562792){logger[_0x85eb('0x2b')](_0x562792['stack']);if(_0x562792[_0x85eb('0x2c')]){delete _0x562792['name'];}_0x29d262[_0x85eb('0x1a')](_0x50541a)[_0x85eb('0x2d')](_0x562792);};}exports[_0x85eb('0x2e')]=function(_0x1d9278,_0xa67e1c){var _0xf4ac13={},_0x41ed76={},_0x5decd5={'count':0x0,'rows':[]};var _0x237f19=_[_0x85eb('0x2f')](db['VoiceMail'][_0x85eb('0x30')],function(_0x5af2de){return{'name':_0x5af2de['fieldName'],'type':_0x5af2de[_0x85eb('0x31')][_0x85eb('0x32')]};});_0x41ed76[_0x85eb('0x33')]=_[_0x85eb('0x2f')](_0x237f19,_0x85eb('0x2c'));_0x41ed76[_0x85eb('0x34')]=_[_0x85eb('0x35')](_0x1d9278[_0x85eb('0x34')]);_0x41ed76[_0x85eb('0x36')]=_[_0x85eb('0x37')](_0x41ed76['model'],_0x41ed76[_0x85eb('0x34')]);_0xf4ac13[_0x85eb('0x38')]=_['intersection'](_0x41ed76['model'],qs[_0x85eb('0x39')](_0x1d9278[_0x85eb('0x34')][_0x85eb('0x39')]));_0xf4ac13[_0x85eb('0x38')]=_0xf4ac13[_0x85eb('0x38')][_0x85eb('0x3a')]?_0xf4ac13[_0x85eb('0x38')]:_0x41ed76[_0x85eb('0x33')];if(!_0x1d9278[_0x85eb('0x34')][_0x85eb('0x3b')](_0x85eb('0x3c'))){_0xf4ac13[_0x85eb('0x1e')]=qs[_0x85eb('0x1e')](_0x1d9278[_0x85eb('0x34')]['limit']);_0xf4ac13[_0x85eb('0x1c')]=qs[_0x85eb('0x1c')](_0x1d9278['query']['offset']);}_0xf4ac13[_0x85eb('0x3d')]=qs[_0x85eb('0x3e')](_0x1d9278['query'][_0x85eb('0x3e')]);_0xf4ac13['where']=qs[_0x85eb('0x36')](_['pick'](_0x1d9278[_0x85eb('0x34')],_0x41ed76['filters']),_0x237f19);if(_0x1d9278[_0x85eb('0x34')]['filter']){_0xf4ac13[_0x85eb('0x3f')]=_[_0x85eb('0x40')](_0xf4ac13['where'],{'$or':_[_0x85eb('0x2f')](_0x237f19,function(_0x5a1c15){if(_0x5a1c15[_0x85eb('0x31')]!==_0x85eb('0x41')){var _0x5c0156={};_0x5c0156[_0x5a1c15[_0x85eb('0x2c')]]={'$like':'%'+_0x1d9278['query']['filter']+'%'};return _0x5c0156;}})});}_0xf4ac13=_[_0x85eb('0x40')]({},_0xf4ac13,_0x1d9278['options']);var _0x17cc20={'where':_0xf4ac13[_0x85eb('0x3f')]};return db['VoiceMail']['count'](_0x17cc20)[_0x85eb('0x26')](function(_0x422ec3){_0x5decd5['count']=_0x422ec3;if(_0x1d9278['query'][_0x85eb('0x42')]){_0xf4ac13[_0x85eb('0x43')]=[{'all':!![]}];}return db[_0x85eb('0x44')][_0x85eb('0x45')](_0xf4ac13);})[_0x85eb('0x26')](function(_0x5b7411){_0x5decd5[_0x85eb('0x46')]=_0x5b7411;return _0x5decd5;})[_0x85eb('0x26')](respondWithFilteredResult(_0xa67e1c,_0xf4ac13))[_0x85eb('0x47')](handleError(_0xa67e1c,null));};exports[_0x85eb('0x48')]=function(_0x2ed39d,_0xbc43a7){var _0x40e2a2={'raw':!![],'where':{'id':_0x2ed39d[_0x85eb('0x49')]['id']}},_0x3e11a8={};_0x3e11a8['model']=_[_0x85eb('0x35')](db[_0x85eb('0x44')]['rawAttributes']);_0x3e11a8[_0x85eb('0x34')]=_[_0x85eb('0x35')](_0x2ed39d[_0x85eb('0x34')]);_0x3e11a8[_0x85eb('0x36')]=_[_0x85eb('0x37')](_0x3e11a8[_0x85eb('0x33')],_0x3e11a8['query']);_0x40e2a2[_0x85eb('0x38')]=_[_0x85eb('0x37')](_0x3e11a8[_0x85eb('0x33')],qs[_0x85eb('0x39')](_0x2ed39d[_0x85eb('0x34')][_0x85eb('0x39')]));_0x40e2a2[_0x85eb('0x38')]=_0x40e2a2[_0x85eb('0x38')]['length']?_0x40e2a2[_0x85eb('0x38')]:_0x3e11a8[_0x85eb('0x33')];if(_0x2ed39d[_0x85eb('0x34')][_0x85eb('0x42')]){_0x40e2a2[_0x85eb('0x43')]=[{'all':!![]}];}_0x40e2a2=_[_0x85eb('0x40')]({},_0x40e2a2,_0x2ed39d[_0x85eb('0x4a')]);return db[_0x85eb('0x44')][_0x85eb('0x4b')](_0x40e2a2)[_0x85eb('0x26')](handleEntityNotFound(_0xbc43a7,null))[_0x85eb('0x26')](respondWithResult(_0xbc43a7,null))[_0x85eb('0x47')](handleError(_0xbc43a7,null));};exports['create']=function(_0x11da79,_0x2c951b){return db[_0x85eb('0x44')]['create'](_0x11da79[_0x85eb('0x4c')],{})[_0x85eb('0x26')](function(_0x2cf928){var _0xd2f302=_0x11da79[_0x85eb('0x4d')]['get']({'plain':!![]});if(!_0xd2f302)throw new Error(_0x85eb('0x4e'));if(_0xd2f302[_0x85eb('0x4f')]===_0x85eb('0x4d')){var _0x50e264=_0x2cf928[_0x85eb('0x27')]({'plain':!![]});var _0x4550fd=_0x85eb('0x28');return db['UserProfileSection']['find']({'where':{'name':_0x4550fd,'userProfileId':_0xd2f302[_0x85eb('0x50')]},'raw':!![]})['then'](function(_0x5ed98a){if(_0x5ed98a&&_0x5ed98a[_0x85eb('0x51')]===0x0){return db['UserProfileResource'][_0x85eb('0x52')]({'name':_0x50e264[_0x85eb('0x2c')],'resourceId':_0x50e264['id'],'type':_0x5ed98a['name'],'sectionId':_0x5ed98a['id']},{})['then'](function(){return _0x2cf928;});}else{return _0x2cf928;}})[_0x85eb('0x47')](function(_0x249511){logger[_0x85eb('0x2b')](_0x85eb('0x53'),_0x249511);throw _0x249511;});}return _0x2cf928;})[_0x85eb('0x26')](respondWithResult(_0x2c951b,0xc9))['catch'](handleError(_0x2c951b,null));};exports[_0x85eb('0x24')]=function(_0x30062e,_0x270bb2){if(_0x30062e[_0x85eb('0x4c')]['id']){delete _0x30062e[_0x85eb('0x4c')]['id'];}return db['VoiceMail'][_0x85eb('0x4b')]({'where':{'id':_0x30062e['params']['id']}})[_0x85eb('0x26')](handleEntityNotFound(_0x270bb2,null))[_0x85eb('0x26')](saveUpdates(_0x30062e['body'],null))[_0x85eb('0x26')](respondWithResult(_0x270bb2,null))[_0x85eb('0x47')](handleError(_0x270bb2,null));};exports[_0x85eb('0x25')]=function(_0x26e04a,_0x214ef7){return db[_0x85eb('0x44')]['find']({'where':{'id':_0x26e04a[_0x85eb('0x49')]['id']}})['then'](handleEntityNotFound(_0x214ef7,null))[_0x85eb('0x26')](removeEntity(_0x214ef7,null))[_0x85eb('0x47')](handleError(_0x214ef7,null));};exports['getMessages']=function(_0x152452,_0x2a0f8b,_0x4a3af9){return db[_0x85eb('0x44')]['findOne']({'where':{'id':_0x152452[_0x85eb('0x49')]['id']}})[_0x85eb('0x26')](handleEntityNotFound(_0x2a0f8b,null))[_0x85eb('0x26')](function(_0x13c0b3){var _0x45a201;var _0x15d4a7={},_0x5a729e={};_0x5a729e[_0x85eb('0x33')]=_[_0x85eb('0x35')](db[_0x85eb('0x54')][_0x85eb('0x30')]);_0x5a729e[_0x85eb('0x34')]=_[_0x85eb('0x35')](_0x152452[_0x85eb('0x34')]);_0x5a729e[_0x85eb('0x36')]=_[_0x85eb('0x37')](_0x5a729e[_0x85eb('0x33')],_0x5a729e[_0x85eb('0x34')]);_0x15d4a7['attributes']=_[_0x85eb('0x37')](_0x5a729e[_0x85eb('0x33')],qs[_0x85eb('0x39')](_0x152452[_0x85eb('0x34')][_0x85eb('0x39')]));_0x15d4a7[_0x85eb('0x38')]=_0x15d4a7['attributes'][_0x85eb('0x3a')]?_0x15d4a7['attributes']:_0x5a729e[_0x85eb('0x33')];if(!_0x152452[_0x85eb('0x34')][_0x85eb('0x3b')](_0x85eb('0x3c'))){_0x15d4a7[_0x85eb('0x1e')]=qs['limit'](_0x152452[_0x85eb('0x34')][_0x85eb('0x1e')]);_0x15d4a7[_0x85eb('0x1c')]=qs[_0x85eb('0x1c')](_0x152452[_0x85eb('0x34')][_0x85eb('0x1c')]);}_0x15d4a7[_0x85eb('0x3d')]=qs[_0x85eb('0x3e')](_0x152452['query'][_0x85eb('0x3e')]);_0x15d4a7['where']=qs[_0x85eb('0x36')](_[_0x85eb('0x55')](_0x152452[_0x85eb('0x34')],_0x5a729e[_0x85eb('0x36')]));if(_0x152452[_0x85eb('0x34')]['filter']){_0x15d4a7[_0x85eb('0x3f')]=_[_0x85eb('0x40')](_0x15d4a7[_0x85eb('0x3f')],{'$or':_[_0x85eb('0x2f')](_0x15d4a7[_0x85eb('0x38')],function(_0x419b24){var _0x562ffa={};_0x562ffa[_0x419b24]={'$like':'%'+_0x152452['query'][_0x85eb('0x56')]+'%'};return _0x562ffa;})});}_0x15d4a7['where']=_[_0x85eb('0x40')](_0x15d4a7[_0x85eb('0x3f')],{'mailboxuser':_0x13c0b3[_0x85eb('0x57')]});_0x15d4a7=_[_0x85eb('0x40')]({},_0x15d4a7,_0x152452[_0x85eb('0x4a')]);return db[_0x85eb('0x54')]['findAndCountAll'](_0x15d4a7)[_0x85eb('0x26')](respondWithFilteredResult(_0x2a0f8b,_0x15d4a7));})[_0x85eb('0x47')](handleError(_0x2a0f8b,null));};
\ No newline at end of file
index f9795d3..77497d4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc31b=['mailbox_context','mailbox','context','util','path','rimraf','../../config/environment','./voiceMail.attributes','exports','define','VoiceMail','voice_voicemail'];(function(_0x4aa2ec,_0x3d552a){var _0x534708=function(_0x4255da){while(--_0x4255da){_0x4aa2ec['push'](_0x4aa2ec['shift']());}};_0x534708(++_0x3d552a);}(_0xc31b,0x1d7));var _0xbc31=function(_0x6c2295,_0x4cb31e){_0x6c2295=_0x6c2295-0x0;var _0x21554a=_0xc31b[_0x6c2295];return _0x21554a;};'use strict';var _=require('lodash');var util=require(_0xbc31('0x0'));var logger=require('../../config/logger')('api');var moment=require('moment');var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xbc31('0x1'));var rimraf=require(_0xbc31('0x2'));var config=require(_0xbc31('0x3'));var attributes=require(_0xbc31('0x4'));module[_0xbc31('0x5')]=function(_0x263b8e,_0x3e85e2){return _0x263b8e[_0xbc31('0x6')](_0xbc31('0x7'),attributes,{'tableName':_0xbc31('0x8'),'paranoid':![],'indexes':[{'name':_0xbc31('0x9'),'fields':[_0xbc31('0xa'),_0xbc31('0xb')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x8d3b=['rimraf','./voiceMail.attributes','exports','VoiceMail','mailbox_context','mailbox','context','util','../../config/logger','api','moment','bluebird','path'];(function(_0x26e624,_0x5f42e3){var _0x4112c9=function(_0x504dab){while(--_0x504dab){_0x26e624['push'](_0x26e624['shift']());}};_0x4112c9(++_0x5f42e3);}(_0x8d3b,0x1a7));var _0xb8d3=function(_0x25885c,_0x461da6){_0x25885c=_0x25885c-0x0;var _0x3a6e9c=_0x8d3b[_0x25885c];return _0x3a6e9c;};'use strict';var _=require('lodash');var util=require(_0xb8d3('0x0'));var logger=require(_0xb8d3('0x1'))(_0xb8d3('0x2'));var moment=require(_0xb8d3('0x3'));var BPromise=require(_0xb8d3('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xb8d3('0x5'));var rimraf=require(_0xb8d3('0x6'));var config=require('../../config/environment');var attributes=require(_0xb8d3('0x7'));module[_0xb8d3('0x8')]=function(_0x42569f,_0x1d1d1a){return _0x42569f['define'](_0xb8d3('0x9'),attributes,{'tableName':'voice_voicemail','paranoid':![],'indexes':[{'name':_0xb8d3('0xa'),'fields':[_0xb8d3('0xb'),_0xb8d3('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
index 0779899..5204714 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6a2e=['then','info','VoiceMail,\x20%s,\x20%s','request\x20sent','debug','VoiceMail,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../config/utils','rpc','../../config/environment','client','http','request'];(function(_0x25701b,_0x2a6976){var _0x3a8a2c=function(_0x1a5e78){while(--_0x1a5e78){_0x25701b['push'](_0x25701b['shift']());}};_0x3a8a2c(++_0x2a6976);}(_0x6a2e,0x1bc));var _0xe6a2=function(_0x109dbb,_0xb36e2){_0x109dbb=_0x109dbb-0x0;var _0x45dd51=_0x6a2e[_0x109dbb];return _0x45dd51;};'use strict';var _=require(_0xe6a2('0x0'));var util=require(_0xe6a2('0x1'));var moment=require(_0xe6a2('0x2'));var BPromise=require(_0xe6a2('0x3'));var rs=require(_0xe6a2('0x4'));var fs=require('fs');var Redis=require(_0xe6a2('0x5'));var db=require('../../mysqldb')['db'];var utils=require(_0xe6a2('0x6'));var logger=require('../../config/logger')(_0xe6a2('0x7'));var config=require(_0xe6a2('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xe6a2('0x9')][_0xe6a2('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x18959c,_0x22311f,_0x123ef1){return new BPromise(function(_0x4730ce,_0x578813){return client[_0xe6a2('0xb')](_0x18959c,_0x123ef1)[_0xe6a2('0xc')](function(_0xa4d0b3){logger[_0xe6a2('0xd')](_0xe6a2('0xe'),_0x22311f,_0xe6a2('0xf'));logger[_0xe6a2('0x10')](_0xe6a2('0x11'),_0x22311f,_0xe6a2('0xf'),JSON[_0xe6a2('0x12')](_0xa4d0b3));if(_0xa4d0b3[_0xe6a2('0x13')]){if(_0xa4d0b3[_0xe6a2('0x13')][_0xe6a2('0x14')]===0x1f4){logger[_0xe6a2('0x13')](_0xe6a2('0xe'),_0x22311f,_0xa4d0b3[_0xe6a2('0x13')][_0xe6a2('0x15')]);return _0x578813(_0xa4d0b3[_0xe6a2('0x13')]['message']);}logger[_0xe6a2('0x13')]('VoiceMail,\x20%s,\x20%s',_0x22311f,_0xa4d0b3[_0xe6a2('0x13')][_0xe6a2('0x15')]);return _0x4730ce(_0xa4d0b3[_0xe6a2('0x13')][_0xe6a2('0x15')]);}else{logger['info'](_0xe6a2('0xe'),_0x22311f,_0xe6a2('0xf'));_0x4730ce(_0xa4d0b3[_0xe6a2('0x16')][_0xe6a2('0x15')]);}})[_0xe6a2('0x17')](function(_0x37d052){logger['error'](_0xe6a2('0xe'),_0x22311f,_0x37d052);_0x578813(_0x37d052);});});}
\ No newline at end of file
+var _0x36fe=['../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','VoiceMail,\x20%s,\x20%s','request\x20sent','debug','VoiceMail,\x20%s,\x20%s,\x20%s','stringify','error','message','info','result','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb'];(function(_0xfb86c9,_0x5beb16){var _0x48fa5a=function(_0x45347f){while(--_0x45347f){_0xfb86c9['push'](_0xfb86c9['shift']());}};_0x48fa5a(++_0x5beb16);}(_0x36fe,0x186));var _0xe36f=function(_0x57a5e5,_0x18b0d6){_0x57a5e5=_0x57a5e5-0x0;var _0x354012=_0x36fe[_0x57a5e5];return _0x354012;};'use strict';var _=require(_0xe36f('0x0'));var util=require('util');var moment=require(_0xe36f('0x1'));var BPromise=require(_0xe36f('0x2'));var rs=require(_0xe36f('0x3'));var fs=require('fs');var Redis=require(_0xe36f('0x4'));var db=require(_0xe36f('0x5'))['db'];var utils=require(_0xe36f('0x6'));var logger=require(_0xe36f('0x7'))(_0xe36f('0x8'));var config=require(_0xe36f('0x9'));var jayson=require('jayson/promise');var client=jayson[_0xe36f('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0x5abdc8,_0x56f93a,_0x36017f){return new BPromise(function(_0x321c2f,_0x29c0e6){return client[_0xe36f('0xb')](_0x5abdc8,_0x36017f)[_0xe36f('0xc')](function(_0x1b9435){logger['info'](_0xe36f('0xd'),_0x56f93a,_0xe36f('0xe'));logger[_0xe36f('0xf')](_0xe36f('0x10'),_0x56f93a,'request\x20sent',JSON[_0xe36f('0x11')](_0x1b9435));if(_0x1b9435[_0xe36f('0x12')]){if(_0x1b9435[_0xe36f('0x12')]['code']===0x1f4){logger['error'](_0xe36f('0xd'),_0x56f93a,_0x1b9435['error'][_0xe36f('0x13')]);return _0x29c0e6(_0x1b9435[_0xe36f('0x12')][_0xe36f('0x13')]);}logger['error'](_0xe36f('0xd'),_0x56f93a,_0x1b9435[_0xe36f('0x12')]['message']);return _0x321c2f(_0x1b9435['error'][_0xe36f('0x13')]);}else{logger[_0xe36f('0x14')](_0xe36f('0xd'),_0x56f93a,_0xe36f('0xe'));_0x321c2f(_0x1b9435[_0xe36f('0x15')][_0xe36f('0x13')]);}})['catch'](function(_0x37ee1e){logger[_0xe36f('0x12')](_0xe36f('0xd'),_0x56f93a,_0x37ee1e);_0x29c0e6(_0x37ee1e);});});}
\ No newline at end of file
index 8591304..9b1a8cd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc114=['path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceMailMessage.controller','isAuthenticated','index','/:id','show','get','/:id/download','download','post','create','put','delete','destroy','exports','util'];(function(_0x2bcb84,_0x1eb577){var _0x238617=function(_0x3e8370){while(--_0x3e8370){_0x2bcb84['push'](_0x2bcb84['shift']());}};_0x238617(++_0x1eb577);}(_0xc114,0x12a));var _0x4c11=function(_0x96d5ff,_0x58f4d8){_0x96d5ff=_0x96d5ff-0x0;var _0x118b75=_0xc114[_0x96d5ff];return _0x118b75;};'use strict';var multer=require('multer');var util=require(_0x4c11('0x0'));var path=require(_0x4c11('0x1'));var timeout=require(_0x4c11('0x2'));var express=require(_0x4c11('0x3'));var router=express[_0x4c11('0x4')]();var fs_extra=require(_0x4c11('0x5'));var auth=require(_0x4c11('0x6'));var interaction=require(_0x4c11('0x7'));var config=require(_0x4c11('0x8'));var controller=require(_0x4c11('0x9'));router['get']('/',auth[_0x4c11('0xa')](),controller[_0x4c11('0xb')]);router['get'](_0x4c11('0xc'),auth['isAuthenticated'](),controller[_0x4c11('0xd')]);router[_0x4c11('0xe')](_0x4c11('0xf'),auth['isAuthenticated'](),controller[_0x4c11('0x10')]);router[_0x4c11('0x11')]('/',auth[_0x4c11('0xa')](),controller[_0x4c11('0x12')]);router[_0x4c11('0x13')](_0x4c11('0xc'),auth[_0x4c11('0xa')](),controller['update']);router[_0x4c11('0x14')](_0x4c11('0xc'),auth[_0x4c11('0xa')](),controller[_0x4c11('0x15')]);module[_0x4c11('0x16')]=router;
\ No newline at end of file
+var _0x29b9=['express','Router','fs-extra','../../components/interaction/service','../../config/environment','get','index','isAuthenticated','download','post','create','put','/:id','delete','destroy','exports','multer','connect-timeout'];(function(_0xa7f815,_0x1dc996){var _0x3e52d8=function(_0x27afbd){while(--_0x27afbd){_0xa7f815['push'](_0xa7f815['shift']());}};_0x3e52d8(++_0x1dc996);}(_0x29b9,0x154));var _0x929b=function(_0x4d95a6,_0x1f4a03){_0x4d95a6=_0x4d95a6-0x0;var _0x4855a5=_0x29b9[_0x4d95a6];return _0x4855a5;};'use strict';var multer=require(_0x929b('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x929b('0x1'));var express=require(_0x929b('0x2'));var router=express[_0x929b('0x3')]();var fs_extra=require(_0x929b('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x929b('0x5'));var config=require(_0x929b('0x6'));var controller=require('./voiceMailMessage.controller');router[_0x929b('0x7')]('/',auth['isAuthenticated'](),controller[_0x929b('0x8')]);router['get']('/:id',auth[_0x929b('0x9')](),controller['show']);router[_0x929b('0x7')]('/:id/download',auth[_0x929b('0x9')](),controller[_0x929b('0xa')]);router[_0x929b('0xb')]('/',auth[_0x929b('0x9')](),controller[_0x929b('0xc')]);router[_0x929b('0xd')](_0x929b('0xe'),auth[_0x929b('0x9')](),controller['update']);router[_0x929b('0xf')](_0x929b('0xe'),auth[_0x929b('0x9')](),controller[_0x929b('0x10')]);module[_0x929b('0x11')]=router;
\ No newline at end of file
index 473eabc..2c08b92 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8581=['long','TIMESTAMP','literal','exports','VIRTUAL','getDataValue','INTEGER','STRING'];(function(_0x45e2a7,_0x4e8fa4){var _0x1cc813=function(_0x1d3fa4){while(--_0x1d3fa4){_0x45e2a7['push'](_0x45e2a7['shift']());}};_0x1cc813(++_0x4e8fa4);}(_0x8581,0x9b));var _0x1858=function(_0x50798b,_0x22ccf8){_0x50798b=_0x50798b-0x0;var _0x4b1d26=_0x8581[_0x50798b];return _0x4b1d26;};'use strict';var Sequelize=require('sequelize');module[_0x1858('0x0')]={'name':{'type':Sequelize[_0x1858('0x1')],'get':function(_0x3584bc){return this[_0x1858('0x2')]('id');}},'msgnum':{'type':Sequelize[_0x1858('0x3')](0xb),'defaultValue':0x0,'allowNull':![]},'dir':{'type':Sequelize[_0x1858('0x4')],'defaultValue':''},'context':{'type':Sequelize[_0x1858('0x4')],'defaultValue':''},'macrocontext':{'type':Sequelize[_0x1858('0x4')],'defaultValue':''},'callerid':{'type':Sequelize[_0x1858('0x4')],'defaultValue':''},'origtime':{'type':Sequelize[_0x1858('0x4')],'defaultValue':''},'duration':{'type':Sequelize['STRING'],'defaultValue':''},'mailboxuser':{'type':Sequelize['STRING'],'defaultValue':''},'mailboxcontext':{'type':Sequelize[_0x1858('0x4')],'defaultValue':''},'recording':{'type':Sequelize['BLOB'](_0x1858('0x5')),'defaultValue':null},'flag':{'type':Sequelize[_0x1858('0x4')],'defaultValue':''},'msg_id':{'type':Sequelize[_0x1858('0x4')],'defaultValue':''},'stamp':{'type':_0x1858('0x6'),'defaultValue':Sequelize[_0x1858('0x7')]('CURRENT_TIMESTAMP\x20ON\x20UPDATE\x20CURRENT_TIMESTAMP')}};
\ No newline at end of file
+var _0xf0f8=['literal','CURRENT_TIMESTAMP\x20ON\x20UPDATE\x20CURRENT_TIMESTAMP','exports','VIRTUAL','getDataValue','INTEGER','STRING','BLOB','long','TIMESTAMP'];(function(_0x18b0ef,_0xdcc8b2){var _0x2efe01=function(_0x1cae64){while(--_0x1cae64){_0x18b0ef['push'](_0x18b0ef['shift']());}};_0x2efe01(++_0xdcc8b2);}(_0xf0f8,0x1ba));var _0x8f0f=function(_0x208d1c,_0x430e00){_0x208d1c=_0x208d1c-0x0;var _0x573991=_0xf0f8[_0x208d1c];return _0x573991;};'use strict';var Sequelize=require('sequelize');module[_0x8f0f('0x0')]={'name':{'type':Sequelize[_0x8f0f('0x1')],'get':function(_0x245cd6){return this[_0x8f0f('0x2')]('id');}},'msgnum':{'type':Sequelize[_0x8f0f('0x3')](0xb),'defaultValue':0x0,'allowNull':![]},'dir':{'type':Sequelize[_0x8f0f('0x4')],'defaultValue':''},'context':{'type':Sequelize[_0x8f0f('0x4')],'defaultValue':''},'macrocontext':{'type':Sequelize['STRING'],'defaultValue':''},'callerid':{'type':Sequelize[_0x8f0f('0x4')],'defaultValue':''},'origtime':{'type':Sequelize[_0x8f0f('0x4')],'defaultValue':''},'duration':{'type':Sequelize[_0x8f0f('0x4')],'defaultValue':''},'mailboxuser':{'type':Sequelize[_0x8f0f('0x4')],'defaultValue':''},'mailboxcontext':{'type':Sequelize[_0x8f0f('0x4')],'defaultValue':''},'recording':{'type':Sequelize[_0x8f0f('0x5')](_0x8f0f('0x6')),'defaultValue':null},'flag':{'type':Sequelize[_0x8f0f('0x4')],'defaultValue':''},'msg_id':{'type':Sequelize[_0x8f0f('0x4')],'defaultValue':''},'stamp':{'type':_0x8f0f('0x7'),'defaultValue':Sequelize[_0x8f0f('0x8')](_0x8f0f('0x9'))}};
\ No newline at end of file
index 5bf1d2a..2e39e46 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8f58=['sort','where','filter','VIRTUAL','merge','options','include','findAll','rows','show','includeAll','find','catch','create','body','update','params','download','recording','msg_id','VoiceMailMessage\x20not\x20found','audio/wav','Content-Disposition','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','util','path','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','sendStatus','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','destroy','then','error','name','send','index','VoiceMailMessage','rawAttributes','fieldName','type','key','model','differenceBy','map','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit'];(function(_0x4e4567,_0x598f1a){var _0x44eef6=function(_0x17f0e7){while(--_0x17f0e7){_0x4e4567['push'](_0x4e4567['shift']());}};_0x44eef6(++_0x598f1a);}(_0x8f58,0x16b));var _0x88f5=function(_0x6ce431,_0x51aa93){_0x6ce431=_0x6ce431-0x0;var _0x118b4a=_0x8f58[_0x6ce431];return _0x118b4a;};'use strict';var emlformat=require(_0x88f5('0x0'));var rimraf=require(_0x88f5('0x1'));var zipdir=require(_0x88f5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x88f5('0x3'));var moment=require(_0x88f5('0x4'));var BPromise=require(_0x88f5('0x5'));var Mustache=require('mustache');var util=require(_0x88f5('0x6'));var path=require(_0x88f5('0x7'));var sox=require('sox');var csv=require(_0x88f5('0x8'));var ejs=require(_0x88f5('0x9'));var fs=require('fs');var fs_extra=require(_0x88f5('0xa'));var _=require(_0x88f5('0xb'));var squel=require('squel');var crypto=require(_0x88f5('0xc'));var jsforce=require(_0x88f5('0xd'));var deskjs=require(_0x88f5('0xe'));var toCsv=require(_0x88f5('0x8'));var querystring=require(_0x88f5('0xf'));var Papa=require(_0x88f5('0x10'));var Redis=require(_0x88f5('0x11'));var authService=require(_0x88f5('0x12'));var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x88f5('0x13'));var logger=require(_0x88f5('0x14'))(_0x88f5('0x15'));var utils=require(_0x88f5('0x16'));var config=require(_0x88f5('0x17'));var licenseUtil=require(_0x88f5('0x18'));var db=require(_0x88f5('0x19'))['db'];function respondWithStatusCode(_0x2da2b3,_0x3d8b4b){_0x3d8b4b=_0x3d8b4b||0xcc;return function(_0x3ec253){if(_0x3ec253){return _0x2da2b3[_0x88f5('0x1a')](_0x3d8b4b);}return _0x2da2b3[_0x88f5('0x1b')](_0x3d8b4b)[_0x88f5('0x1c')]();};}function respondWithResult(_0x5a16a4,_0xb55d74){_0xb55d74=_0xb55d74||0xc8;return function(_0x5a5739){if(_0x5a5739){return _0x5a16a4[_0x88f5('0x1b')](_0xb55d74)[_0x88f5('0x1d')](_0x5a5739);}};}function respondWithFilteredResult(_0x2e665f,_0x1643e1){return function(_0x23cc03){if(_0x23cc03){var _0x1b05ae=typeof _0x1643e1[_0x88f5('0x1e')]===_0x88f5('0x1f')&&typeof _0x1643e1[_0x88f5('0x20')]===_0x88f5('0x1f');var _0x2db1b3=_0x23cc03[_0x88f5('0x21')];var _0x5534db=_0x1b05ae?0x0:_0x1643e1[_0x88f5('0x1e')];var _0x5cba52=_0x1b05ae?_0x23cc03[_0x88f5('0x21')]:_0x1643e1['offset']+_0x1643e1[_0x88f5('0x20')];var _0x5141b4;if(_0x5cba52>=_0x2db1b3){_0x5cba52=_0x2db1b3;_0x5141b4=0xc8;}else{_0x5141b4=0xce;}_0x2e665f[_0x88f5('0x1b')](_0x5141b4);return _0x2e665f[_0x88f5('0x22')](_0x88f5('0x23'),_0x5534db+'-'+_0x5cba52+'/'+_0x2db1b3)[_0x88f5('0x1d')](_0x23cc03);}return null;};}function patchUpdates(_0x1fe689){return function(_0x154717){try{jsonpatch[_0x88f5('0x24')](_0x154717,_0x1fe689,!![]);}catch(_0x498847){return BPromise[_0x88f5('0x25')](_0x498847);}return _0x154717[_0x88f5('0x26')]();};}function saveUpdates(_0x326f31,_0x187bdf){return function(_0x308d4d){if(_0x308d4d){return _0x308d4d['update'](_0x326f31)['then'](function(_0x2c27bb){return _0x2c27bb;});}return null;};}function removeEntity(_0x543c0c,_0x3d4309){return function(_0xd8f8f0){if(_0xd8f8f0){return _0xd8f8f0[_0x88f5('0x27')]()[_0x88f5('0x28')](function(){_0x543c0c[_0x88f5('0x1b')](0xcc)[_0x88f5('0x1c')]();});}};}function handleEntityNotFound(_0x51858c,_0x53a050){return function(_0x1d4ba7){if(!_0x1d4ba7){_0x51858c[_0x88f5('0x1a')](0x194);}return _0x1d4ba7;};}function handleError(_0x26e31c,_0x291c6d){_0x291c6d=_0x291c6d||0x1f4;return function(_0xc50880){logger[_0x88f5('0x29')](_0xc50880['stack']);if(_0xc50880['name']){delete _0xc50880[_0x88f5('0x2a')];}_0x26e31c[_0x88f5('0x1b')](_0x291c6d)[_0x88f5('0x2b')](_0xc50880);};}exports[_0x88f5('0x2c')]=function(_0x8c396,_0x26706d){var _0x4e2b39={},_0x53f3b2={},_0x2ab15b={'count':0x0,'rows':[]};var _0x544441=_['map'](db[_0x88f5('0x2d')][_0x88f5('0x2e')],function(_0x2cbb44){return{'name':_0x2cbb44[_0x88f5('0x2f')],'type':_0x2cbb44[_0x88f5('0x30')][_0x88f5('0x31')]};});_0x53f3b2[_0x88f5('0x32')]=_[_0x88f5('0x33')](_[_0x88f5('0x34')](_0x544441,_0x88f5('0x2a')),['name']);_0x53f3b2[_0x88f5('0x35')]=_[_0x88f5('0x36')](_0x8c396['query']);_0x53f3b2[_0x88f5('0x37')]=_[_0x88f5('0x38')](_0x53f3b2[_0x88f5('0x32')],_0x53f3b2[_0x88f5('0x35')]);_0x4e2b39[_0x88f5('0x39')]=_['intersection'](_0x53f3b2['model'],qs[_0x88f5('0x3a')](_0x8c396[_0x88f5('0x35')][_0x88f5('0x3a')]));_0x4e2b39[_0x88f5('0x39')]=_0x4e2b39['attributes'][_0x88f5('0x3b')]?_0x4e2b39[_0x88f5('0x39')]:_0x53f3b2['model'];if(!_0x8c396[_0x88f5('0x35')][_0x88f5('0x3c')](_0x88f5('0x3d'))){_0x4e2b39[_0x88f5('0x20')]=qs[_0x88f5('0x20')](_0x8c396[_0x88f5('0x35')][_0x88f5('0x20')]);_0x4e2b39[_0x88f5('0x1e')]=qs[_0x88f5('0x1e')](_0x8c396[_0x88f5('0x35')][_0x88f5('0x1e')]);}_0x4e2b39['order']=qs[_0x88f5('0x3e')](_0x8c396['query']['sort']);_0x4e2b39[_0x88f5('0x3f')]=qs[_0x88f5('0x37')](_['pick'](_0x8c396[_0x88f5('0x35')],_0x53f3b2['filters']),_0x544441);if(_0x8c396[_0x88f5('0x35')][_0x88f5('0x40')]){_0x4e2b39[_0x88f5('0x3f')]=_['merge'](_0x4e2b39[_0x88f5('0x3f')],{'$or':_[_0x88f5('0x34')](_0x544441,function(_0x40ee9b){if(_0x40ee9b['type']!==_0x88f5('0x41')){var _0x20c3fe={};_0x20c3fe[_0x40ee9b[_0x88f5('0x2a')]]={'$like':'%'+_0x8c396['query'][_0x88f5('0x40')]+'%'};return _0x20c3fe;}})});}_0x4e2b39=_[_0x88f5('0x42')]({},_0x4e2b39,_0x8c396[_0x88f5('0x43')]);var _0x36474c={'where':_0x4e2b39[_0x88f5('0x3f')]};return db[_0x88f5('0x2d')][_0x88f5('0x21')](_0x36474c)[_0x88f5('0x28')](function(_0x4f5faf){_0x2ab15b[_0x88f5('0x21')]=_0x4f5faf;if(_0x8c396[_0x88f5('0x35')]['includeAll']){_0x4e2b39[_0x88f5('0x44')]=[{'all':!![]}];}return db[_0x88f5('0x2d')][_0x88f5('0x45')](_0x4e2b39);})[_0x88f5('0x28')](function(_0x528052){_0x2ab15b[_0x88f5('0x46')]=_0x528052;return _0x2ab15b;})[_0x88f5('0x28')](respondWithFilteredResult(_0x26706d,_0x4e2b39))['catch'](handleError(_0x26706d,null));};exports[_0x88f5('0x47')]=function(_0x255efe,_0x338af2){var _0x567209={'raw':!![],'where':{'id':_0x255efe['params']['id']}},_0x4ab162={};_0x4ab162[_0x88f5('0x32')]=_[_0x88f5('0x36')](db[_0x88f5('0x2d')][_0x88f5('0x2e')]);_0x4ab162[_0x88f5('0x35')]=_[_0x88f5('0x36')](_0x255efe[_0x88f5('0x35')]);_0x4ab162[_0x88f5('0x37')]=_['intersection'](_0x4ab162[_0x88f5('0x32')],_0x4ab162[_0x88f5('0x35')]);_0x567209[_0x88f5('0x39')]=_[_0x88f5('0x38')](_0x4ab162[_0x88f5('0x32')],qs[_0x88f5('0x3a')](_0x255efe[_0x88f5('0x35')]['fields']));_0x567209[_0x88f5('0x39')]=_0x567209[_0x88f5('0x39')][_0x88f5('0x3b')]?_0x567209[_0x88f5('0x39')]:_0x4ab162['model'];if(_0x255efe[_0x88f5('0x35')][_0x88f5('0x48')]){_0x567209[_0x88f5('0x44')]=[{'all':!![]}];}_0x567209=_[_0x88f5('0x42')]({},_0x567209,_0x255efe[_0x88f5('0x43')]);return db[_0x88f5('0x2d')][_0x88f5('0x49')](_0x567209)['then'](handleEntityNotFound(_0x338af2,null))[_0x88f5('0x28')](respondWithResult(_0x338af2,null))[_0x88f5('0x4a')](handleError(_0x338af2,null));};exports[_0x88f5('0x4b')]=function(_0x10ae3c,_0x1a9a38){return db[_0x88f5('0x2d')][_0x88f5('0x4b')](_0x10ae3c[_0x88f5('0x4c')],{})[_0x88f5('0x28')](respondWithResult(_0x1a9a38,0xc9))['catch'](handleError(_0x1a9a38,null));};exports[_0x88f5('0x4d')]=function(_0x279161,_0x164a42){if(_0x279161[_0x88f5('0x4c')]['id']){delete _0x279161[_0x88f5('0x4c')]['id'];}return db['VoiceMailMessage']['find']({'where':{'id':_0x279161['params']['id']}})[_0x88f5('0x28')](handleEntityNotFound(_0x164a42,null))['then'](saveUpdates(_0x279161[_0x88f5('0x4c')],null))['then'](respondWithResult(_0x164a42,null))[_0x88f5('0x4a')](handleError(_0x164a42,null));};exports[_0x88f5('0x27')]=function(_0x48eed2,_0x4280af){return db[_0x88f5('0x2d')][_0x88f5('0x49')]({'where':{'id':_0x48eed2[_0x88f5('0x4e')]['id']}})[_0x88f5('0x28')](handleEntityNotFound(_0x4280af,null))[_0x88f5('0x28')](removeEntity(_0x4280af,null))['catch'](handleError(_0x4280af,null));};exports[_0x88f5('0x4f')]=function(_0x254414,_0x30f00a,_0x5db741){return db['VoiceMailMessage'][_0x88f5('0x49')]({'where':{'id':_0x254414[_0x88f5('0x4e')]['id']},'attributes':['id',_0x88f5('0x50'),_0x88f5('0x51')]})[_0x88f5('0x28')](handleEntityNotFound(_0x30f00a,null))[_0x88f5('0x28')](function(_0x260184){if(_0x260184){if(!_0x260184[_0x88f5('0x50')]){throw new db['Sequelize']['ValidationError'](_0x88f5('0x52'));}var _0x4be3fd={'Content-Type':_0x88f5('0x53'),'Content-Disposition':'attachment'};if(_0x260184[_0x88f5('0x51')]){_0x4be3fd[_0x88f5('0x54')]='attachment;\x20filename=\x22'+_0x260184['msg_id']+'.wav\x22';}_0x30f00a[_0x88f5('0x22')](_0x4be3fd);return _0x30f00a['send'](new Buffer(_0x260184[_0x88f5('0x50')]));}})[_0x88f5('0x4a')](handleError(_0x30f00a,null));};
\ No newline at end of file
+var _0x813f=['length','find','create','body','update','params','download','recording','Sequelize','ValidationError','VoiceMailMessage\x20not\x20found','audio/wav','attachment','msg_id','attachment;\x20filename=\x22','.wav\x22','send','eml-format','rimraf','zip-dir','request-promise','moment','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/logger','api','../../config/environment','../../config/license/util','../../mysqldb','status','json','offset','undefined','limit','count','set','Content-Range','apply','save','destroy','then','end','sendStatus','error','stack','name','index','map','VoiceMailMessage','fieldName','type','model','differenceBy','query','keys','filters','intersection','attributes','fields','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','options','includeAll','include','findAll','rows','catch','show','rawAttributes'];(function(_0x2ffe71,_0x488129){var _0x35d657=function(_0x33da48){while(--_0x33da48){_0x2ffe71['push'](_0x2ffe71['shift']());}};_0x35d657(++_0x488129);}(_0x813f,0x179));var _0xf813=function(_0x2d6ebc,_0x370b3c){_0x2d6ebc=_0x2d6ebc-0x0;var _0x36668c=_0x813f[_0x2d6ebc];return _0x36668c;};'use strict';var emlformat=require(_0xf813('0x0'));var rimraf=require(_0xf813('0x1'));var zipdir=require(_0xf813('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xf813('0x3'));var moment=require(_0xf813('0x4'));var BPromise=require('bluebird');var Mustache=require(_0xf813('0x5'));var util=require(_0xf813('0x6'));var path=require(_0xf813('0x7'));var sox=require(_0xf813('0x8'));var csv=require('to-csv');var ejs=require(_0xf813('0x9'));var fs=require('fs');var fs_extra=require(_0xf813('0xa'));var _=require(_0xf813('0xb'));var squel=require(_0xf813('0xc'));var crypto=require(_0xf813('0xd'));var jsforce=require(_0xf813('0xe'));var deskjs=require(_0xf813('0xf'));var toCsv=require('to-csv');var querystring=require(_0xf813('0x10'));var Papa=require(_0xf813('0x11'));var Redis=require(_0xf813('0x12'));var authService=require(_0xf813('0x13'));var qs=require(_0xf813('0x14'));var as=require(_0xf813('0x15'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xf813('0x16'))(_0xf813('0x17'));var utils=require('../../config/utils');var config=require(_0xf813('0x18'));var licenseUtil=require(_0xf813('0x19'));var db=require(_0xf813('0x1a'))['db'];function respondWithStatusCode(_0x21841f,_0x4f9a07){_0x4f9a07=_0x4f9a07||0xcc;return function(_0x29f7ef){if(_0x29f7ef){return _0x21841f['sendStatus'](_0x4f9a07);}return _0x21841f[_0xf813('0x1b')](_0x4f9a07)['end']();};}function respondWithResult(_0x450e22,_0x4bd36d){_0x4bd36d=_0x4bd36d||0xc8;return function(_0x2e459e){if(_0x2e459e){return _0x450e22[_0xf813('0x1b')](_0x4bd36d)[_0xf813('0x1c')](_0x2e459e);}};}function respondWithFilteredResult(_0x2ff2b3,_0x1580d8){return function(_0x30bee7){if(_0x30bee7){var _0x931f3=typeof _0x1580d8[_0xf813('0x1d')]===_0xf813('0x1e')&&typeof _0x1580d8[_0xf813('0x1f')]===_0xf813('0x1e');var _0x5c2f9f=_0x30bee7[_0xf813('0x20')];var _0x2b4cdb=_0x931f3?0x0:_0x1580d8[_0xf813('0x1d')];var _0x253f91=_0x931f3?_0x30bee7['count']:_0x1580d8[_0xf813('0x1d')]+_0x1580d8[_0xf813('0x1f')];var _0x19679d;if(_0x253f91>=_0x5c2f9f){_0x253f91=_0x5c2f9f;_0x19679d=0xc8;}else{_0x19679d=0xce;}_0x2ff2b3['status'](_0x19679d);return _0x2ff2b3[_0xf813('0x21')](_0xf813('0x22'),_0x2b4cdb+'-'+_0x253f91+'/'+_0x5c2f9f)[_0xf813('0x1c')](_0x30bee7);}return null;};}function patchUpdates(_0x8b6a57){return function(_0x2b273f){try{jsonpatch[_0xf813('0x23')](_0x2b273f,_0x8b6a57,!![]);}catch(_0x1619e3){return BPromise['reject'](_0x1619e3);}return _0x2b273f[_0xf813('0x24')]();};}function saveUpdates(_0x7117d9,_0x3ebe32){return function(_0x24ca98){if(_0x24ca98){return _0x24ca98['update'](_0x7117d9)['then'](function(_0x2dd70d){return _0x2dd70d;});}return null;};}function removeEntity(_0x3c60f3,_0x420f2f){return function(_0x1483ed){if(_0x1483ed){return _0x1483ed[_0xf813('0x25')]()[_0xf813('0x26')](function(){_0x3c60f3[_0xf813('0x1b')](0xcc)[_0xf813('0x27')]();});}};}function handleEntityNotFound(_0x38f4c5,_0xe904e4){return function(_0x152295){if(!_0x152295){_0x38f4c5[_0xf813('0x28')](0x194);}return _0x152295;};}function handleError(_0x3bfd07,_0x309358){_0x309358=_0x309358||0x1f4;return function(_0xe7bfa2){logger[_0xf813('0x29')](_0xe7bfa2[_0xf813('0x2a')]);if(_0xe7bfa2[_0xf813('0x2b')]){delete _0xe7bfa2[_0xf813('0x2b')];}_0x3bfd07[_0xf813('0x1b')](_0x309358)['send'](_0xe7bfa2);};}exports[_0xf813('0x2c')]=function(_0x2e7683,_0x2f1272){var _0x4b20e5={},_0x3d67b0={},_0x51170e={'count':0x0,'rows':[]};var _0x2e722a=_[_0xf813('0x2d')](db[_0xf813('0x2e')]['rawAttributes'],function(_0x17d76b){return{'name':_0x17d76b[_0xf813('0x2f')],'type':_0x17d76b[_0xf813('0x30')]['key']};});_0x3d67b0[_0xf813('0x31')]=_[_0xf813('0x32')](_['map'](_0x2e722a,_0xf813('0x2b')),[_0xf813('0x2b')]);_0x3d67b0[_0xf813('0x33')]=_[_0xf813('0x34')](_0x2e7683[_0xf813('0x33')]);_0x3d67b0[_0xf813('0x35')]=_[_0xf813('0x36')](_0x3d67b0[_0xf813('0x31')],_0x3d67b0[_0xf813('0x33')]);_0x4b20e5[_0xf813('0x37')]=_['intersection'](_0x3d67b0[_0xf813('0x31')],qs[_0xf813('0x38')](_0x2e7683['query'][_0xf813('0x38')]));_0x4b20e5['attributes']=_0x4b20e5[_0xf813('0x37')]['length']?_0x4b20e5[_0xf813('0x37')]:_0x3d67b0['model'];if(!_0x2e7683['query'][_0xf813('0x39')](_0xf813('0x3a'))){_0x4b20e5['limit']=qs['limit'](_0x2e7683['query'][_0xf813('0x1f')]);_0x4b20e5[_0xf813('0x1d')]=qs['offset'](_0x2e7683[_0xf813('0x33')][_0xf813('0x1d')]);}_0x4b20e5[_0xf813('0x3b')]=qs[_0xf813('0x3c')](_0x2e7683[_0xf813('0x33')][_0xf813('0x3c')]);_0x4b20e5[_0xf813('0x3d')]=qs[_0xf813('0x35')](_[_0xf813('0x3e')](_0x2e7683[_0xf813('0x33')],_0x3d67b0['filters']),_0x2e722a);if(_0x2e7683['query'][_0xf813('0x3f')]){_0x4b20e5[_0xf813('0x3d')]=_[_0xf813('0x40')](_0x4b20e5['where'],{'$or':_[_0xf813('0x2d')](_0x2e722a,function(_0x93b4e8){if(_0x93b4e8[_0xf813('0x30')]!=='VIRTUAL'){var _0x1802a7={};_0x1802a7[_0x93b4e8[_0xf813('0x2b')]]={'$like':'%'+_0x2e7683['query'][_0xf813('0x3f')]+'%'};return _0x1802a7;}})});}_0x4b20e5=_['merge']({},_0x4b20e5,_0x2e7683[_0xf813('0x41')]);var _0x34a90e={'where':_0x4b20e5[_0xf813('0x3d')]};return db[_0xf813('0x2e')][_0xf813('0x20')](_0x34a90e)['then'](function(_0x22c923){_0x51170e[_0xf813('0x20')]=_0x22c923;if(_0x2e7683['query'][_0xf813('0x42')]){_0x4b20e5[_0xf813('0x43')]=[{'all':!![]}];}return db[_0xf813('0x2e')][_0xf813('0x44')](_0x4b20e5);})[_0xf813('0x26')](function(_0x38299b){_0x51170e[_0xf813('0x45')]=_0x38299b;return _0x51170e;})['then'](respondWithFilteredResult(_0x2f1272,_0x4b20e5))[_0xf813('0x46')](handleError(_0x2f1272,null));};exports[_0xf813('0x47')]=function(_0x427c21,_0xf4b75a){var _0x18b114={'raw':!![],'where':{'id':_0x427c21['params']['id']}},_0x46b9c4={};_0x46b9c4[_0xf813('0x31')]=_[_0xf813('0x34')](db[_0xf813('0x2e')][_0xf813('0x48')]);_0x46b9c4[_0xf813('0x33')]=_[_0xf813('0x34')](_0x427c21[_0xf813('0x33')]);_0x46b9c4[_0xf813('0x35')]=_['intersection'](_0x46b9c4[_0xf813('0x31')],_0x46b9c4[_0xf813('0x33')]);_0x18b114[_0xf813('0x37')]=_[_0xf813('0x36')](_0x46b9c4[_0xf813('0x31')],qs[_0xf813('0x38')](_0x427c21[_0xf813('0x33')][_0xf813('0x38')]));_0x18b114['attributes']=_0x18b114['attributes'][_0xf813('0x49')]?_0x18b114[_0xf813('0x37')]:_0x46b9c4[_0xf813('0x31')];if(_0x427c21[_0xf813('0x33')][_0xf813('0x42')]){_0x18b114['include']=[{'all':!![]}];}_0x18b114=_['merge']({},_0x18b114,_0x427c21[_0xf813('0x41')]);return db[_0xf813('0x2e')][_0xf813('0x4a')](_0x18b114)[_0xf813('0x26')](handleEntityNotFound(_0xf4b75a,null))[_0xf813('0x26')](respondWithResult(_0xf4b75a,null))[_0xf813('0x46')](handleError(_0xf4b75a,null));};exports[_0xf813('0x4b')]=function(_0x2182aa,_0x175218){return db['VoiceMailMessage'][_0xf813('0x4b')](_0x2182aa[_0xf813('0x4c')],{})[_0xf813('0x26')](respondWithResult(_0x175218,0xc9))[_0xf813('0x46')](handleError(_0x175218,null));};exports[_0xf813('0x4d')]=function(_0xad0fa2,_0x48a91e){if(_0xad0fa2[_0xf813('0x4c')]['id']){delete _0xad0fa2[_0xf813('0x4c')]['id'];}return db['VoiceMailMessage'][_0xf813('0x4a')]({'where':{'id':_0xad0fa2[_0xf813('0x4e')]['id']}})['then'](handleEntityNotFound(_0x48a91e,null))[_0xf813('0x26')](saveUpdates(_0xad0fa2[_0xf813('0x4c')],null))[_0xf813('0x26')](respondWithResult(_0x48a91e,null))['catch'](handleError(_0x48a91e,null));};exports['destroy']=function(_0x30a344,_0x4d7ca2){return db[_0xf813('0x2e')][_0xf813('0x4a')]({'where':{'id':_0x30a344['params']['id']}})[_0xf813('0x26')](handleEntityNotFound(_0x4d7ca2,null))['then'](removeEntity(_0x4d7ca2,null))[_0xf813('0x46')](handleError(_0x4d7ca2,null));};exports[_0xf813('0x4f')]=function(_0x51eb60,_0x4ce8d1,_0x220cfd){return db[_0xf813('0x2e')][_0xf813('0x4a')]({'where':{'id':_0x51eb60[_0xf813('0x4e')]['id']},'attributes':['id',_0xf813('0x50'),'msg_id']})['then'](handleEntityNotFound(_0x4ce8d1,null))['then'](function(_0x22d1a7){if(_0x22d1a7){if(!_0x22d1a7[_0xf813('0x50')]){throw new db[(_0xf813('0x51'))][(_0xf813('0x52'))](_0xf813('0x53'));}var _0x2b301b={'Content-Type':_0xf813('0x54'),'Content-Disposition':_0xf813('0x55')};if(_0x22d1a7[_0xf813('0x56')]){_0x2b301b['Content-Disposition']=_0xf813('0x57')+_0x22d1a7[_0xf813('0x56')]+_0xf813('0x58');}_0x4ce8d1[_0xf813('0x21')](_0x2b301b);return _0x4ce8d1[_0xf813('0x59')](new Buffer(_0x22d1a7['recording']));}})[_0xf813('0x46')](handleError(_0x4ce8d1,null));};
\ No newline at end of file
index e73a2b6..56cabd5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd74d=['path','rimraf','./voiceMailMessage.attributes','exports','define','dir','lodash','../../config/logger','api','moment'];(function(_0x253bba,_0x14f4ee){var _0x1c83ff=function(_0xe88059){while(--_0xe88059){_0x253bba['push'](_0x253bba['shift']());}};_0x1c83ff(++_0x14f4ee);}(_0xd74d,0x150));var _0xdd74=function(_0x34d65b,_0x3f1602){_0x34d65b=_0x34d65b-0x0;var _0x515338=_0xd74d[_0x34d65b];return _0x515338;};'use strict';var _=require(_0xdd74('0x0'));var util=require('util');var logger=require(_0xdd74('0x1'))(_0xdd74('0x2'));var moment=require(_0xdd74('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xdd74('0x4'));var rimraf=require(_0xdd74('0x5'));var config=require('../../config/environment');var attributes=require(_0xdd74('0x6'));module[_0xdd74('0x7')]=function(_0x5dc401,_0x51ddd0){return _0x5dc401[_0xdd74('0x8')]('VoiceMailMessage',attributes,{'tableName':'voice_voicemail_messages','paranoid':![],'indexes':[{'name':_0xdd74('0x9'),'fields':['dir']}],'timestamps':![]});};
\ No newline at end of file
+var _0x9998=['../../config/environment','./voiceMailMessage.attributes','exports','define','VoiceMailMessage','dir','util','../../config/logger','api','moment','bluebird','path','rimraf'];(function(_0x2080a3,_0x48acfa){var _0x8d7d17=function(_0x2dbc06){while(--_0x2dbc06){_0x2080a3['push'](_0x2080a3['shift']());}};_0x8d7d17(++_0x48acfa);}(_0x9998,0xa2));var _0x8999=function(_0x33a648,_0x4bb66a){_0x33a648=_0x33a648-0x0;var _0x2f1529=_0x9998[_0x33a648];return _0x2f1529;};'use strict';var _=require('lodash');var util=require(_0x8999('0x0'));var logger=require(_0x8999('0x1'))(_0x8999('0x2'));var moment=require(_0x8999('0x3'));var BPromise=require(_0x8999('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x8999('0x5'));var rimraf=require(_0x8999('0x6'));var config=require(_0x8999('0x7'));var attributes=require(_0x8999('0x8'));module[_0x8999('0x9')]=function(_0x26239b,_0x45f813){return _0x26239b[_0x8999('0xa')](_0x8999('0xb'),attributes,{'tableName':'voice_voicemail_messages','paranoid':![],'indexes':[{'name':_0x8999('0xc'),'fields':[_0x8999('0xc')]}],'timestamps':![]});};
\ No newline at end of file
index 2db3e6d..209f90c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf759=['bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','request','then','info','request\x20sent','debug','VoiceMailMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','VoiceMailMessage,\x20%s,\x20%s','message','result','catch','lodash','util'];(function(_0x451336,_0x5ad7f1){var _0xe0eba4=function(_0x4bf2de){while(--_0x4bf2de){_0x451336['push'](_0x451336['shift']());}};_0xe0eba4(++_0x5ad7f1);}(_0xf759,0x18e));var _0x9f75=function(_0xe7f80d,_0x8223be){_0xe7f80d=_0xe7f80d-0x0;var _0x2e7171=_0xf759[_0xe7f80d];return _0x2e7171;};'use strict';var _=require(_0x9f75('0x0'));var util=require(_0x9f75('0x1'));var moment=require('moment');var BPromise=require(_0x9f75('0x2'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x9f75('0x3'));var db=require(_0x9f75('0x4'))['db'];var utils=require(_0x9f75('0x5'));var logger=require(_0x9f75('0x6'))(_0x9f75('0x7'));var config=require(_0x9f75('0x8'));var jayson=require(_0x9f75('0x9'));var client=jayson[_0x9f75('0xa')][_0x9f75('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x3fb53f,_0x408995,_0x3e85f0){return new BPromise(function(_0x1d6474,_0x3f0d09){return client[_0x9f75('0xc')](_0x3fb53f,_0x3e85f0)[_0x9f75('0xd')](function(_0x26fc0c){logger[_0x9f75('0xe')]('VoiceMailMessage,\x20%s,\x20%s',_0x408995,_0x9f75('0xf'));logger[_0x9f75('0x10')](_0x9f75('0x11'),_0x408995,_0x9f75('0xf'),JSON[_0x9f75('0x12')](_0x26fc0c));if(_0x26fc0c[_0x9f75('0x13')]){if(_0x26fc0c[_0x9f75('0x13')][_0x9f75('0x14')]===0x1f4){logger[_0x9f75('0x13')](_0x9f75('0x15'),_0x408995,_0x26fc0c[_0x9f75('0x13')][_0x9f75('0x16')]);return _0x3f0d09(_0x26fc0c['error'][_0x9f75('0x16')]);}logger['error'](_0x9f75('0x15'),_0x408995,_0x26fc0c['error'][_0x9f75('0x16')]);return _0x1d6474(_0x26fc0c[_0x9f75('0x13')]['message']);}else{logger['info'](_0x9f75('0x15'),_0x408995,'request\x20sent');_0x1d6474(_0x26fc0c[_0x9f75('0x17')][_0x9f75('0x16')]);}})[_0x9f75('0x18')](function(_0x259e94){logger['error'](_0x9f75('0x15'),_0x408995,_0x259e94);_0x3f0d09(_0x259e94);});});}
\ No newline at end of file
+var _0x853f=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','client','http','info','request\x20sent','debug','VoiceMailMessage,\x20%s,\x20%s,\x20%s','stringify','error','VoiceMailMessage,\x20%s,\x20%s','message','bluebird'];(function(_0x53f37f,_0xfb0b18){var _0x2fe5f8=function(_0x76ef2d){while(--_0x76ef2d){_0x53f37f['push'](_0x53f37f['shift']());}};_0x2fe5f8(++_0xfb0b18);}(_0x853f,0x1af));var _0xf853=function(_0x533deb,_0x5b482f){_0x533deb=_0x533deb-0x0;var _0x1ce679=_0x853f[_0x533deb];return _0x1ce679;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var BPromise=require(_0xf853('0x0'));var rs=require(_0xf853('0x1'));var fs=require('fs');var Redis=require(_0xf853('0x2'));var db=require(_0xf853('0x3'))['db'];var utils=require(_0xf853('0x4'));var logger=require(_0xf853('0x5'))(_0xf853('0x6'));var config=require('../../config/environment');var jayson=require(_0xf853('0x7'));var client=jayson[_0xf853('0x8')][_0xf853('0x9')]({'port':0x232a});function respondWithRpcPromise(_0x52368b,_0x3d0092,_0x223d55){return new BPromise(function(_0x183eca,_0x705448){return client['request'](_0x52368b,_0x223d55)['then'](function(_0x178550){logger[_0xf853('0xa')]('VoiceMailMessage,\x20%s,\x20%s',_0x3d0092,_0xf853('0xb'));logger[_0xf853('0xc')](_0xf853('0xd'),_0x3d0092,_0xf853('0xb'),JSON[_0xf853('0xe')](_0x178550));if(_0x178550[_0xf853('0xf')]){if(_0x178550[_0xf853('0xf')]['code']===0x1f4){logger[_0xf853('0xf')](_0xf853('0x10'),_0x3d0092,_0x178550['error'][_0xf853('0x11')]);return _0x705448(_0x178550[_0xf853('0xf')][_0xf853('0x11')]);}logger[_0xf853('0xf')](_0xf853('0x10'),_0x3d0092,_0x178550[_0xf853('0xf')][_0xf853('0x11')]);return _0x183eca(_0x178550[_0xf853('0xf')][_0xf853('0x11')]);}else{logger[_0xf853('0xa')](_0xf853('0x10'),_0x3d0092,_0xf853('0xb'));_0x183eca(_0x178550['result'][_0xf853('0x11')]);}})['catch'](function(_0x4b5c73){logger['error']('VoiceMailMessage,\x20%s,\x20%s',_0x3d0092,_0x4b5c73);_0x705448(_0x4b5c73);});});}
\ No newline at end of file
index 098dbd9..3605840 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8667=['../../config/environment','get','index','/:id','isAuthenticated','show','/:id/sounds','getSounds','post','addSound','put','update','delete','destroy','/:id/sounds/:id2','removeSound','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service'];(function(_0x5d8946,_0x948d3e){var _0x2c7e41=function(_0x3cac2a){while(--_0x3cac2a){_0x5d8946['push'](_0x5d8946['shift']());}};_0x2c7e41(++_0x948d3e);}(_0x8667,0x13d));var _0x7866=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0x8667[_0x3ab51d];return _0x29a04e;};'use strict';var multer=require(_0x7866('0x0'));var util=require(_0x7866('0x1'));var path=require(_0x7866('0x2'));var timeout=require(_0x7866('0x3'));var express=require('express');var router=express[_0x7866('0x4')]();var fs_extra=require(_0x7866('0x5'));var auth=require(_0x7866('0x6'));var interaction=require(_0x7866('0x7'));var config=require(_0x7866('0x8'));var controller=require('./voiceMusicOnHold.controller');router[_0x7866('0x9')]('/',auth['isAuthenticated'](),controller[_0x7866('0xa')]);router[_0x7866('0x9')](_0x7866('0xb'),auth[_0x7866('0xc')](),controller[_0x7866('0xd')]);router['get'](_0x7866('0xe'),auth[_0x7866('0xc')](),controller[_0x7866('0xf')]);router[_0x7866('0x10')]('/',auth['isAuthenticated'](),controller['create']);router[_0x7866('0x10')](_0x7866('0xe'),auth[_0x7866('0xc')](),controller[_0x7866('0x11')]);router[_0x7866('0x12')](_0x7866('0xb'),auth['isAuthenticated'](),controller[_0x7866('0x13')]);router[_0x7866('0x14')](_0x7866('0xb'),auth[_0x7866('0xc')](),controller[_0x7866('0x15')]);router[_0x7866('0x14')](_0x7866('0x16'),auth[_0x7866('0xc')](),controller[_0x7866('0x17')]);module[_0x7866('0x18')]=router;
\ No newline at end of file
+var _0xf46f=['put','delete','/:id/sounds/:id2','removeSound','exports','multer','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','./voiceMusicOnHold.controller','get','isAuthenticated','index','/:id','show','getSounds','post','/:id/sounds'];(function(_0x377da6,_0xbff901){var _0x5bfa78=function(_0x2f52a0){while(--_0x2f52a0){_0x377da6['push'](_0x377da6['shift']());}};_0x5bfa78(++_0xbff901);}(_0xf46f,0x123));var _0xff46=function(_0x16c639,_0x1ab07d){_0x16c639=_0x16c639-0x0;var _0x3ec39f=_0xf46f[_0x16c639];return _0x3ec39f;};'use strict';var multer=require(_0xff46('0x0'));var util=require(_0xff46('0x1'));var path=require(_0xff46('0x2'));var timeout=require(_0xff46('0x3'));var express=require('express');var router=express[_0xff46('0x4')]();var fs_extra=require(_0xff46('0x5'));var auth=require(_0xff46('0x6'));var interaction=require(_0xff46('0x7'));var config=require('../../config/environment');var controller=require(_0xff46('0x8'));router[_0xff46('0x9')]('/',auth[_0xff46('0xa')](),controller[_0xff46('0xb')]);router[_0xff46('0x9')](_0xff46('0xc'),auth['isAuthenticated'](),controller[_0xff46('0xd')]);router[_0xff46('0x9')]('/:id/sounds',auth['isAuthenticated'](),controller[_0xff46('0xe')]);router[_0xff46('0xf')]('/',auth[_0xff46('0xa')](),controller['create']);router[_0xff46('0xf')](_0xff46('0x10'),auth[_0xff46('0xa')](),controller['addSound']);router[_0xff46('0x11')](_0xff46('0xc'),auth['isAuthenticated'](),controller['update']);router[_0xff46('0x12')](_0xff46('0xc'),auth[_0xff46('0xa')](),controller['destroy']);router[_0xff46('0x12')](_0xff46('0x13'),auth[_0xff46('0xa')](),controller[_0xff46('0x14')]);module[_0xff46('0x15')]=router;
\ No newline at end of file
index 88ae038..c8c50fa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x04b1=['sequelize','exports','STRING','name','ENUM','custom','files','quietmp3nb','alpha','TIMESTAMP','BOOLEAN'];(function(_0x49d06a,_0x572365){var _0x256d2d=function(_0x23db2c){while(--_0x23db2c){_0x49d06a['push'](_0x49d06a['shift']());}};_0x256d2d(++_0x572365);}(_0x04b1,0x181));var _0x104b=function(_0x569caa,_0x5174ce){_0x569caa=_0x569caa-0x0;var _0x44cb5a=_0x04b1[_0x569caa];return _0x44cb5a;};'use strict';var Sequelize=require(_0x104b('0x0'));module[_0x104b('0x1')]={'name':{'type':Sequelize[_0x104b('0x2')],'allowNull':![],'unique':_0x104b('0x3')},'mode':{'type':Sequelize[_0x104b('0x4')](_0x104b('0x5'),_0x104b('0x6'),'mp3nb',_0x104b('0x7'),'quietmp3','mp3'),'allowNull':!![],'defaultValue':_0x104b('0x6')},'directory':{'type':Sequelize[_0x104b('0x2')],'allowNull':!![]},'application':{'type':Sequelize[_0x104b('0x2')],'allowNull':!![]},'digit':{'type':Sequelize[_0x104b('0x2')],'allowNull':!![]},'sort':{'type':Sequelize[_0x104b('0x2')],'allowNull':!![],'defaultValue':_0x104b('0x8')},'format':{'type':Sequelize[_0x104b('0x2')],'allowNull':!![]},'stamp':{'type':_0x104b('0x9')},'defaultEntry':{'type':Sequelize[_0x104b('0xa')],'defaultValue':0x0}};
\ No newline at end of file
+var _0x082f=['exports','STRING','name','custom','mp3nb','quietmp3nb','mp3','files','alpha','BOOLEAN','sequelize'];(function(_0xa788d6,_0x5b1ad8){var _0x336074=function(_0x43652f){while(--_0x43652f){_0xa788d6['push'](_0xa788d6['shift']());}};_0x336074(++_0x5b1ad8);}(_0x082f,0x175));var _0xf082=function(_0x220afa,_0xf5f6cc){_0x220afa=_0x220afa-0x0;var _0x1b79d1=_0x082f[_0x220afa];return _0x1b79d1;};'use strict';var Sequelize=require(_0xf082('0x0'));module[_0xf082('0x1')]={'name':{'type':Sequelize[_0xf082('0x2')],'allowNull':![],'unique':_0xf082('0x3')},'mode':{'type':Sequelize['ENUM'](_0xf082('0x4'),'files',_0xf082('0x5'),_0xf082('0x6'),'quietmp3',_0xf082('0x7')),'allowNull':!![],'defaultValue':_0xf082('0x8')},'directory':{'type':Sequelize['STRING'],'allowNull':!![]},'application':{'type':Sequelize['STRING'],'allowNull':!![]},'digit':{'type':Sequelize[_0xf082('0x2')],'allowNull':!![]},'sort':{'type':Sequelize[_0xf082('0x2')],'allowNull':!![],'defaultValue':_0xf082('0x9')},'format':{'type':Sequelize['STRING'],'allowNull':!![]},'stamp':{'type':'TIMESTAMP'},'defaultEntry':{'type':Sequelize[_0xf082('0xa')],'defaultValue':0x0}};
\ No newline at end of file
index 4e58063..3f4dd5f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7f69=['mkdirSync','user','get','role','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','destroy','transaction','readdirSync','forEach','unlinkSync','Sequelize','addSound','Sound','findOne','save_name','converted_format','createdAt','root','server/files/sounds/converted','format','%s.%s','basename','extname','ValidationError','message','removeSound','sequelize','getSounds','keys','order','eml-format','rimraf','fast-json-patch','request-promise','bluebird','util','to-csv','ejs','fs-extra','lodash','squel','crypto','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/license/util','../../mysqldb','sendStatus','end','status','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','UserProfileResource','name','send','index','VoiceMusicOnHold','rawAttributes','fieldName','type','key','model','map','query','filters','intersection','attributes','length','hasOwnProperty','nolimit','sort','pick','filter','where','VIRTUAL','merge','options','includeAll','include','catch','show','params','fields','find','body','create','mode','files','directory','join','server/files/moh'];(function(_0x1caf6a,_0x26a5bf){var _0x1bf493=function(_0x3982f5){while(--_0x3982f5){_0x1caf6a['push'](_0x1caf6a['shift']());}};_0x1bf493(++_0x26a5bf);}(_0x7f69,0x1cc));var _0x97f6=function(_0x10f6e8,_0x351db6){_0x10f6e8=_0x10f6e8-0x0;var _0x35bb3c=_0x7f69[_0x10f6e8];return _0x35bb3c;};'use strict';var emlformat=require(_0x97f6('0x0'));var rimraf=require(_0x97f6('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0x97f6('0x2'));var rp=require(_0x97f6('0x3'));var moment=require('moment');var BPromise=require(_0x97f6('0x4'));var Mustache=require('mustache');var util=require(_0x97f6('0x5'));var path=require('path');var sox=require('sox');var csv=require(_0x97f6('0x6'));var ejs=require(_0x97f6('0x7'));var fs=require('fs');var fs_extra=require(_0x97f6('0x8'));var _=require(_0x97f6('0x9'));var squel=require(_0x97f6('0xa'));var crypto=require(_0x97f6('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x97f6('0xc'));var toCsv=require(_0x97f6('0x6'));var querystring=require('querystring');var Papa=require(_0x97f6('0xd'));var Redis=require(_0x97f6('0xe'));var authService=require(_0x97f6('0xf'));var qs=require('../../components/parsers/qs');var as=require(_0x97f6('0x10'));var hardwareService=require(_0x97f6('0x11'));var logger=require(_0x97f6('0x12'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0x97f6('0x13'));var db=require(_0x97f6('0x14'))['db'];function respondWithStatusCode(_0x2dfd06,_0x4cf582){_0x4cf582=_0x4cf582||0xcc;return function(_0x274e94){if(_0x274e94){return _0x2dfd06[_0x97f6('0x15')](_0x4cf582);}return _0x2dfd06['status'](_0x4cf582)[_0x97f6('0x16')]();};}function respondWithResult(_0x49b3ef,_0xd974f7){_0xd974f7=_0xd974f7||0xc8;return function(_0x34848e){if(_0x34848e){return _0x49b3ef[_0x97f6('0x17')](_0xd974f7)[_0x97f6('0x18')](_0x34848e);}};}function respondWithFilteredResult(_0x43d945,_0x3fd5ab){return function(_0x4072d2){if(_0x4072d2){var _0x43a3d5=typeof _0x3fd5ab[_0x97f6('0x19')]===_0x97f6('0x1a')&&typeof _0x3fd5ab[_0x97f6('0x1b')]==='undefined';var _0x17cb90=_0x4072d2[_0x97f6('0x1c')];var _0x512f04=_0x43a3d5?0x0:_0x3fd5ab['offset'];var _0x76823f=_0x43a3d5?_0x4072d2['count']:_0x3fd5ab[_0x97f6('0x19')]+_0x3fd5ab['limit'];var _0x877fdc;if(_0x76823f>=_0x17cb90){_0x76823f=_0x17cb90;_0x877fdc=0xc8;}else{_0x877fdc=0xce;}_0x43d945[_0x97f6('0x17')](_0x877fdc);return _0x43d945[_0x97f6('0x1d')](_0x97f6('0x1e'),_0x512f04+'-'+_0x76823f+'/'+_0x17cb90)[_0x97f6('0x18')](_0x4072d2);}return null;};}function patchUpdates(_0x74eec4){return function(_0x15d5c5){try{jsonpatch[_0x97f6('0x1f')](_0x15d5c5,_0x74eec4,!![]);}catch(_0x14393b){return BPromise[_0x97f6('0x20')](_0x14393b);}return _0x15d5c5[_0x97f6('0x21')]();};}function saveUpdates(_0x17c3b,_0x443951){return function(_0x51304d){if(_0x51304d){return _0x51304d[_0x97f6('0x22')](_0x17c3b)[_0x97f6('0x23')](function(_0x9e4aff){return _0x9e4aff;});}return null;};}function removeEntity(_0x200788,_0x483d83){return function(_0xe55825){if(_0xe55825){return _0xe55825['destroy']()[_0x97f6('0x23')](function(){var _0x55c896=_0xe55825['get']({'plain':!![]});var _0x4a39fb='MusicOnHolds';return db[_0x97f6('0x24')]['destroy']({'where':{'type':_0x4a39fb,'resourceId':_0x55c896['id']}})['then'](function(){return _0xe55825;});})[_0x97f6('0x23')](function(){_0x200788[_0x97f6('0x17')](0xcc)[_0x97f6('0x16')]();});}};}function handleEntityNotFound(_0x394f1b,_0x56893f){return function(_0x458144){if(!_0x458144){_0x394f1b[_0x97f6('0x15')](0x194);}return _0x458144;};}function handleError(_0x4e7894,_0x3c652f){_0x3c652f=_0x3c652f||0x1f4;return function(_0x5cdf55){logger['error'](_0x5cdf55['stack']);if(_0x5cdf55[_0x97f6('0x25')]){delete _0x5cdf55[_0x97f6('0x25')];}_0x4e7894[_0x97f6('0x17')](_0x3c652f)[_0x97f6('0x26')](_0x5cdf55);};}exports[_0x97f6('0x27')]=function(_0x133085,_0x2e2f3b){var _0x1c2508={},_0x2ac20d={},_0x52f454={'count':0x0,'rows':[]};var _0x51602e=_['map'](db[_0x97f6('0x28')][_0x97f6('0x29')],function(_0x1171ca){return{'name':_0x1171ca[_0x97f6('0x2a')],'type':_0x1171ca[_0x97f6('0x2b')][_0x97f6('0x2c')]};});_0x2ac20d[_0x97f6('0x2d')]=_[_0x97f6('0x2e')](_0x51602e,_0x97f6('0x25'));_0x2ac20d[_0x97f6('0x2f')]=_['keys'](_0x133085[_0x97f6('0x2f')]);_0x2ac20d[_0x97f6('0x30')]=_[_0x97f6('0x31')](_0x2ac20d[_0x97f6('0x2d')],_0x2ac20d[_0x97f6('0x2f')]);_0x1c2508[_0x97f6('0x32')]=_[_0x97f6('0x31')](_0x2ac20d[_0x97f6('0x2d')],qs['fields'](_0x133085[_0x97f6('0x2f')]['fields']));_0x1c2508[_0x97f6('0x32')]=_0x1c2508[_0x97f6('0x32')][_0x97f6('0x33')]?_0x1c2508[_0x97f6('0x32')]:_0x2ac20d[_0x97f6('0x2d')];if(!_0x133085['query'][_0x97f6('0x34')](_0x97f6('0x35'))){_0x1c2508[_0x97f6('0x1b')]=qs[_0x97f6('0x1b')](_0x133085[_0x97f6('0x2f')][_0x97f6('0x1b')]);_0x1c2508[_0x97f6('0x19')]=qs['offset'](_0x133085[_0x97f6('0x2f')]['offset']);}_0x1c2508['order']=qs[_0x97f6('0x36')](_0x133085[_0x97f6('0x2f')][_0x97f6('0x36')]);delete _0x133085[_0x97f6('0x2f')]['sort'];_0x1c2508['where']=qs[_0x97f6('0x30')](_[_0x97f6('0x37')](_0x133085[_0x97f6('0x2f')],_0x2ac20d[_0x97f6('0x30')]),_0x51602e);if(_0x133085[_0x97f6('0x2f')][_0x97f6('0x38')]){_0x1c2508[_0x97f6('0x39')]=_['merge'](_0x1c2508[_0x97f6('0x39')],{'$or':_[_0x97f6('0x2e')](_0x51602e,function(_0x1ecf8d){if(_0x1ecf8d['type']!==_0x97f6('0x3a')){var _0x258d7e={};_0x258d7e[_0x1ecf8d[_0x97f6('0x25')]]={'$like':'%'+_0x133085['query'][_0x97f6('0x38')]+'%'};return _0x258d7e;}})});}_0x1c2508=_[_0x97f6('0x3b')]({},_0x1c2508,_0x133085[_0x97f6('0x3c')]);var _0x29139a={'where':_0x1c2508[_0x97f6('0x39')]};return db['VoiceMusicOnHold'][_0x97f6('0x1c')](_0x29139a)[_0x97f6('0x23')](function(_0x2cb541){_0x52f454[_0x97f6('0x1c')]=_0x2cb541;if(_0x133085[_0x97f6('0x2f')][_0x97f6('0x3d')]){_0x1c2508[_0x97f6('0x3e')]=[{'all':!![]}];}return db['VoiceMusicOnHold']['findAll'](_0x1c2508);})[_0x97f6('0x23')](function(_0x5b79c0){_0x52f454['rows']=_0x5b79c0;return _0x52f454;})['then'](respondWithFilteredResult(_0x2e2f3b,_0x1c2508))[_0x97f6('0x3f')](handleError(_0x2e2f3b,null));};exports[_0x97f6('0x40')]=function(_0x420fdb,_0x3b5035){var _0xd07172={'raw':![],'where':{'id':_0x420fdb[_0x97f6('0x41')]['id']}},_0x3ba56b={};_0x3ba56b[_0x97f6('0x2d')]=_['keys'](db[_0x97f6('0x28')][_0x97f6('0x29')]);_0x3ba56b[_0x97f6('0x2f')]=_['keys'](_0x420fdb['query']);_0x3ba56b['filters']=_[_0x97f6('0x31')](_0x3ba56b[_0x97f6('0x2d')],_0x3ba56b[_0x97f6('0x2f')]);_0xd07172['attributes']=_['intersection'](_0x3ba56b[_0x97f6('0x2d')],qs[_0x97f6('0x42')](_0x420fdb['query']['fields']));_0xd07172[_0x97f6('0x32')]=_0xd07172[_0x97f6('0x32')][_0x97f6('0x33')]?_0xd07172[_0x97f6('0x32')]:_0x3ba56b[_0x97f6('0x2d')];if(_0x420fdb[_0x97f6('0x2f')]['includeAll']){_0xd07172[_0x97f6('0x3e')]=[{'all':!![]}];}_0xd07172=_[_0x97f6('0x3b')]({},_0xd07172,_0x420fdb[_0x97f6('0x3c')]);return db[_0x97f6('0x28')][_0x97f6('0x43')](_0xd07172)['then'](handleEntityNotFound(_0x3b5035,null))[_0x97f6('0x23')](respondWithResult(_0x3b5035,null))[_0x97f6('0x3f')](handleError(_0x3b5035,null));};exports['update']=function(_0x100072,_0x56b877){if(_0x100072[_0x97f6('0x44')]['id']){delete _0x100072[_0x97f6('0x44')]['id'];}return db[_0x97f6('0x28')]['find']({'where':{'id':_0x100072[_0x97f6('0x41')]['id']}})[_0x97f6('0x23')](handleEntityNotFound(_0x56b877,null))[_0x97f6('0x23')](saveUpdates(_0x100072[_0x97f6('0x44')],null))[_0x97f6('0x23')](respondWithResult(_0x56b877,null))[_0x97f6('0x3f')](handleError(_0x56b877,null));};exports[_0x97f6('0x45')]=function(_0x545634,_0x5c97c5,_0x3e13a1){return db['sequelize']['transaction'](function(_0x406b93){if(_0x545634[_0x97f6('0x44')][_0x97f6('0x46')]===_0x97f6('0x47')){_0x545634[_0x97f6('0x44')][_0x97f6('0x48')]=path[_0x97f6('0x49')](config['root'],_0x97f6('0x4a'),_0x545634[_0x97f6('0x44')][_0x97f6('0x25')]);}return db['VoiceMusicOnHold'][_0x97f6('0x45')](_0x545634['body'],{'transaction':_0x406b93})[_0x97f6('0x23')](function(_0x3deb9c){if(_0x545634['body'][_0x97f6('0x46')]===_0x97f6('0x47')){fs[_0x97f6('0x4b')](_0x3deb9c[_0x97f6('0x48')],parseInt('0777',0x8));}var _0x9af2c1=_0x545634[_0x97f6('0x4c')][_0x97f6('0x4d')]({'plain':!![]});if(!_0x9af2c1)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x9af2c1[_0x97f6('0x4e')]===_0x97f6('0x4c')){var _0x4c4d56=_0x3deb9c[_0x97f6('0x4d')]({'plain':!![]});return db[_0x97f6('0x4f')][_0x97f6('0x43')]({'where':{'name':'MusicOnHolds','userProfileId':_0x9af2c1[_0x97f6('0x50')]},'raw':!![]})[_0x97f6('0x23')](function(_0x4b00d7){if(_0x4b00d7&&_0x4b00d7['autoAssociation']===0x0){return db[_0x97f6('0x24')][_0x97f6('0x45')]({'name':_0x4c4d56['name'],'resourceId':_0x4c4d56['id'],'type':_0x4b00d7[_0x97f6('0x25')],'sectionId':_0x4b00d7['id']},{})['then'](function(){return _0x3deb9c;});}else{return _0x3deb9c;}})[_0x97f6('0x3f')](function(_0x3bd5fe){logger['error'](_0x97f6('0x51'),_0x3bd5fe);});}return _0x3deb9c;});})[_0x97f6('0x23')](respondWithResult(_0x5c97c5,0xc9))[_0x97f6('0x3f')](handleError(_0x5c97c5,null));};exports[_0x97f6('0x52')]=function(_0x5b2715,_0x191314,_0x5d2776){var _0x404050;return db[_0x97f6('0x28')]['find']({'where':{'id':_0x5b2715[_0x97f6('0x41')]['id']}})[_0x97f6('0x23')](function(_0x33c249){if(_0x33c249){return db['sequelize'][_0x97f6('0x53')](function(_0x3e272d){return _0x33c249[_0x97f6('0x52')]({'transaction':_0x3e272d,'raw':!![]})[_0x97f6('0x23')](function(_0xa727ac){if(_0xa727ac['directory']){fs[_0x97f6('0x54')](_0xa727ac[_0x97f6('0x48')])[_0x97f6('0x55')](function(_0x56686c){fs[_0x97f6('0x56')](path[_0x97f6('0x49')](_0xa727ac[_0x97f6('0x48')],_0x56686c));});fs['rmdirSync'](_0xa727ac['directory']);}return _0xa727ac;});})['catch'](function(_0x18cb30){throw new db[(_0x97f6('0x57'))]['ValidationError'](_0x18cb30['message']);});}})['then'](handleEntityNotFound(_0x191314,null))[_0x97f6('0x23')](removeEntity(_0x191314,null))[_0x97f6('0x3f')](handleError(_0x191314,null));};exports[_0x97f6('0x58')]=function(_0x1b7216,_0x2629a0,_0xa10711){return db['sequelize']['transaction'](function(_0x4f99b8){var _0x922766;return db['VoiceMusicOnHold'][_0x97f6('0x43')]({'where':{'id':_0x1b7216[_0x97f6('0x41')]['id']}})[_0x97f6('0x23')](function(_0x396a71){if(_0x396a71){_0x922766=_0x396a71;return _0x396a71[_0x97f6('0x58')](_0x1b7216[_0x97f6('0x44')]['id'],{'transaction':_0x4f99b8});}})[_0x97f6('0x23')](function(_0x4c54c8){if(_0x4c54c8){return db[_0x97f6('0x59')][_0x97f6('0x5a')]({'where':{'id':_0x1b7216['body']['id']},'attributes':['id','name',_0x97f6('0x5b'),_0x97f6('0x5c'),_0x97f6('0x5d')],'raw':!![]});}})[_0x97f6('0x23')](function(_0x5b3052){if(_0x5b3052){var _0x507f96=path[_0x97f6('0x49')](config[_0x97f6('0x5e')],_0x97f6('0x5f'),util[_0x97f6('0x60')](_0x97f6('0x61'),path[_0x97f6('0x62')](_0x5b3052['save_name'],path[_0x97f6('0x63')](_0x5b3052[_0x97f6('0x5b')])),_0x5b3052[_0x97f6('0x5c')]));var _0x259385=path[_0x97f6('0x49')](config[_0x97f6('0x5e')],_0x97f6('0x4a'),_0x922766[_0x97f6('0x25')],util[_0x97f6('0x60')](_0x97f6('0x61'),_0x5b3052[_0x97f6('0x25')],_0x5b3052['converted_format']));fs['symlinkSync'](_0x507f96,_0x259385);return _0x5b3052;}})[_0x97f6('0x3f')](function(_0x22038d){throw new db[(_0x97f6('0x57'))][(_0x97f6('0x64'))](_0x22038d[_0x97f6('0x65')]);});})['then'](handleEntityNotFound(_0x2629a0,null))[_0x97f6('0x23')](respondWithResult(_0x2629a0,0xc9))[_0x97f6('0x3f')](handleError(_0x2629a0,null));};exports[_0x97f6('0x66')]=function(_0x186783,_0x58757a,_0x14ba18){return db[_0x97f6('0x67')][_0x97f6('0x53')](function(_0x2a67c4){var _0x1b373a;return db[_0x97f6('0x28')][_0x97f6('0x5a')]({'where':{'id':_0x186783[_0x97f6('0x41')]['id']}})['then'](handleEntityNotFound(_0x58757a,null))[_0x97f6('0x23')](function(_0x5ef969){if(_0x5ef969){_0x1b373a=_0x5ef969;return _0x5ef969[_0x97f6('0x66')](_0x186783['params']['id2']);}})[_0x97f6('0x23')](function(_0x432c34){if(_0x432c34){return db['Sound']['findOne']({'where':{'id':_0x186783[_0x97f6('0x41')]['id2']},'attributes':['id',_0x97f6('0x25'),'save_name',_0x97f6('0x5c'),'createdAt'],'raw':!![]});}})[_0x97f6('0x23')](function(_0x362d9a){if(_0x362d9a){fs[_0x97f6('0x56')](path[_0x97f6('0x49')](_0x1b373a[_0x97f6('0x48')],util['format'](_0x97f6('0x61'),_0x362d9a[_0x97f6('0x25')],_0x362d9a['converted_format'])));return _0x362d9a;}})[_0x97f6('0x3f')](function(_0x563ddb){throw new db[(_0x97f6('0x57'))][(_0x97f6('0x64'))](_0x563ddb[_0x97f6('0x65')]);});})[_0x97f6('0x23')](handleEntityNotFound(_0x58757a,null))['then'](respondWithStatusCode(_0x58757a,0xcc))['catch'](handleError(_0x58757a,null));};exports[_0x97f6('0x68')]=function(_0x1acd87,_0x58def1,_0xbba50c){var _0x3576bf={};var _0x2356cd={};var _0x23406a;var _0x1b9aca;return db[_0x97f6('0x28')][_0x97f6('0x5a')]({'where':{'id':_0x1acd87[_0x97f6('0x41')]['id']}})[_0x97f6('0x23')](handleEntityNotFound(_0x58def1,null))['then'](function(_0x306fda){if(_0x306fda){_0x23406a=_0x306fda;_0x2356cd[_0x97f6('0x2d')]=_['keys'](db['Sound']['rawAttributes']);_0x2356cd[_0x97f6('0x2f')]=_[_0x97f6('0x69')](_0x1acd87[_0x97f6('0x2f')]);_0x2356cd[_0x97f6('0x30')]=_[_0x97f6('0x31')](_0x2356cd['model'],_0x2356cd[_0x97f6('0x2f')]);_0x3576bf['attributes']=_[_0x97f6('0x31')](_0x2356cd[_0x97f6('0x2d')],qs['fields'](_0x1acd87[_0x97f6('0x2f')][_0x97f6('0x42')]));_0x3576bf[_0x97f6('0x32')]=_0x3576bf[_0x97f6('0x32')][_0x97f6('0x33')]?_0x3576bf['attributes']:_0x2356cd['model'];_0x3576bf[_0x97f6('0x6a')]=qs['sort'](_0x1acd87['query'][_0x97f6('0x36')]);_0x3576bf[_0x97f6('0x39')]=qs[_0x97f6('0x30')](_[_0x97f6('0x37')](_0x1acd87[_0x97f6('0x2f')],_0x2356cd[_0x97f6('0x30')]));if(_0x1acd87[_0x97f6('0x2f')][_0x97f6('0x38')]){_0x3576bf[_0x97f6('0x39')]=_[_0x97f6('0x3b')](_0x3576bf[_0x97f6('0x39')],{'$or':_[_0x97f6('0x2e')](_0x3576bf[_0x97f6('0x32')],function(_0x86c82){var _0x3a07df={};_0x3a07df[_0x86c82]={'$like':'%'+_0x1acd87['query'][_0x97f6('0x38')]+'%'};return _0x3a07df;})});}_0x3576bf=_[_0x97f6('0x3b')]({},_0x3576bf,_0x1acd87[_0x97f6('0x3c')]);return _0x23406a['getSounds'](_0x3576bf);}})[_0x97f6('0x23')](function(_0x520236){if(_0x520236){_0x1b9aca=_0x520236[_0x97f6('0x33')];if(!_0x1acd87[_0x97f6('0x2f')][_0x97f6('0x34')](_0x97f6('0x35'))){_0x3576bf[_0x97f6('0x1b')]=qs['limit'](_0x1acd87[_0x97f6('0x2f')][_0x97f6('0x1b')]);_0x3576bf['offset']=qs[_0x97f6('0x19')](_0x1acd87[_0x97f6('0x2f')][_0x97f6('0x19')]);}return _0x23406a[_0x97f6('0x68')](_0x3576bf);}})[_0x97f6('0x23')](function(_0x228fde){if(_0x228fde){return _0x228fde?{'count':_0x1b9aca,'rows':_0x228fde}:null;}})[_0x97f6('0x23')](respondWithResult(_0x58def1,null))[_0x97f6('0x3f')](handleError(_0x58def1,null));};
\ No newline at end of file
+var _0xaf9f=['Unable\x20to\x20retrieve\x20the\x20current\x20user','userProfileId','autoAssociation','UserProfileResource','readdirSync','forEach','unlinkSync','join','ValidationError','message','addSound','Sound','save_name','converted_format','server/files/sounds/converted','basename','extname','root','server/files/moh','format','%s.%s','symlinkSync','findOne','removeSound','Sequelize','getSounds','eml-format','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','to-csv','ejs','fs-extra','lodash','desk.js','papaparse','ioredis','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','../../config/license/util','../../mysqldb','sendStatus','end','status','offset','limit','count','Content-Range','json','apply','save','update','then','get','MusicOnHolds','destroy','error','name','send','map','VoiceMusicOnHold','fieldName','type','key','query','keys','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','sort','pick','where','merge','VIRTUAL','filter','include','findAll','rows','catch','params','rawAttributes','length','includeAll','options','find','body','create','sequelize','transaction','mode','files','directory','mkdirSync','0777','user'];(function(_0x3d15af,_0x13e28d){var _0x45cab4=function(_0x15f5f9){while(--_0x15f5f9){_0x3d15af['push'](_0x3d15af['shift']());}};_0x45cab4(++_0x13e28d);}(_0xaf9f,0xf0));var _0xfaf9=function(_0x34a6e9,_0x25cabe){_0x34a6e9=_0x34a6e9-0x0;var _0x11015c=_0xaf9f[_0x34a6e9];return _0x11015c;};'use strict';var emlformat=require(_0xfaf9('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require(_0xfaf9('0x1'));var rp=require(_0xfaf9('0x2'));var moment=require(_0xfaf9('0x3'));var BPromise=require(_0xfaf9('0x4'));var Mustache=require(_0xfaf9('0x5'));var util=require(_0xfaf9('0x6'));var path=require(_0xfaf9('0x7'));var sox=require('sox');var csv=require(_0xfaf9('0x8'));var ejs=require(_0xfaf9('0x9'));var fs=require('fs');var fs_extra=require(_0xfaf9('0xa'));var _=require(_0xfaf9('0xb'));var squel=require('squel');var crypto=require('crypto');var jsforce=require('jsforce');var deskjs=require(_0xfaf9('0xc'));var toCsv=require(_0xfaf9('0x8'));var querystring=require('querystring');var Papa=require(_0xfaf9('0xd'));var Redis=require(_0xfaf9('0xe'));var authService=require('../../components/auth/service');var qs=require(_0xfaf9('0xf'));var as=require(_0xfaf9('0x10'));var hardwareService=require(_0xfaf9('0x11'));var logger=require('../../config/logger')(_0xfaf9('0x12'));var utils=require(_0xfaf9('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0xfaf9('0x14'));var db=require(_0xfaf9('0x15'))['db'];function respondWithStatusCode(_0x386908,_0x245f73){_0x245f73=_0x245f73||0xcc;return function(_0x45c3d1){if(_0x45c3d1){return _0x386908[_0xfaf9('0x16')](_0x245f73);}return _0x386908['status'](_0x245f73)[_0xfaf9('0x17')]();};}function respondWithResult(_0x4d33e6,_0x1e3204){_0x1e3204=_0x1e3204||0xc8;return function(_0x1d8574){if(_0x1d8574){return _0x4d33e6[_0xfaf9('0x18')](_0x1e3204)['json'](_0x1d8574);}};}function respondWithFilteredResult(_0x47bebf,_0x5d9e0e){return function(_0x495071){if(_0x495071){var _0x14481a=typeof _0x5d9e0e[_0xfaf9('0x19')]==='undefined'&&typeof _0x5d9e0e[_0xfaf9('0x1a')]==='undefined';var _0x5d1bf1=_0x495071[_0xfaf9('0x1b')];var _0x5d4973=_0x14481a?0x0:_0x5d9e0e['offset'];var _0x1bcfed=_0x14481a?_0x495071[_0xfaf9('0x1b')]:_0x5d9e0e['offset']+_0x5d9e0e[_0xfaf9('0x1a')];var _0x2e55d5;if(_0x1bcfed>=_0x5d1bf1){_0x1bcfed=_0x5d1bf1;_0x2e55d5=0xc8;}else{_0x2e55d5=0xce;}_0x47bebf[_0xfaf9('0x18')](_0x2e55d5);return _0x47bebf['set'](_0xfaf9('0x1c'),_0x5d4973+'-'+_0x1bcfed+'/'+_0x5d1bf1)[_0xfaf9('0x1d')](_0x495071);}return null;};}function patchUpdates(_0x47efcb){return function(_0x576a47){try{jsonpatch[_0xfaf9('0x1e')](_0x576a47,_0x47efcb,!![]);}catch(_0x4beab4){return BPromise['reject'](_0x4beab4);}return _0x576a47[_0xfaf9('0x1f')]();};}function saveUpdates(_0xdf313f,_0x46a9ce){return function(_0x2d9617){if(_0x2d9617){return _0x2d9617[_0xfaf9('0x20')](_0xdf313f)[_0xfaf9('0x21')](function(_0x520a6a){return _0x520a6a;});}return null;};}function removeEntity(_0x4810be,_0x440e52){return function(_0x4cb13f){if(_0x4cb13f){return _0x4cb13f['destroy']()['then'](function(){var _0x9a9a96=_0x4cb13f[_0xfaf9('0x22')]({'plain':!![]});var _0x3054dd=_0xfaf9('0x23');return db['UserProfileResource'][_0xfaf9('0x24')]({'where':{'type':_0x3054dd,'resourceId':_0x9a9a96['id']}})['then'](function(){return _0x4cb13f;});})[_0xfaf9('0x21')](function(){_0x4810be[_0xfaf9('0x18')](0xcc)[_0xfaf9('0x17')]();});}};}function handleEntityNotFound(_0xf2e52c,_0x5e36ac){return function(_0x313615){if(!_0x313615){_0xf2e52c[_0xfaf9('0x16')](0x194);}return _0x313615;};}function handleError(_0x3415c8,_0x5bbbb9){_0x5bbbb9=_0x5bbbb9||0x1f4;return function(_0xab8495){logger[_0xfaf9('0x25')](_0xab8495['stack']);if(_0xab8495[_0xfaf9('0x26')]){delete _0xab8495[_0xfaf9('0x26')];}_0x3415c8['status'](_0x5bbbb9)[_0xfaf9('0x27')](_0xab8495);};}exports['index']=function(_0x397d86,_0x4516a5){var _0x4e1c6d={},_0x4c9096={},_0x479c21={'count':0x0,'rows':[]};var _0x185d9f=_[_0xfaf9('0x28')](db[_0xfaf9('0x29')]['rawAttributes'],function(_0x4c2264){return{'name':_0x4c2264[_0xfaf9('0x2a')],'type':_0x4c2264[_0xfaf9('0x2b')][_0xfaf9('0x2c')]};});_0x4c9096['model']=_['map'](_0x185d9f,_0xfaf9('0x26'));_0x4c9096[_0xfaf9('0x2d')]=_[_0xfaf9('0x2e')](_0x397d86[_0xfaf9('0x2d')]);_0x4c9096[_0xfaf9('0x2f')]=_[_0xfaf9('0x30')](_0x4c9096[_0xfaf9('0x31')],_0x4c9096[_0xfaf9('0x2d')]);_0x4e1c6d[_0xfaf9('0x32')]=_[_0xfaf9('0x30')](_0x4c9096[_0xfaf9('0x31')],qs[_0xfaf9('0x33')](_0x397d86[_0xfaf9('0x2d')][_0xfaf9('0x33')]));_0x4e1c6d[_0xfaf9('0x32')]=_0x4e1c6d[_0xfaf9('0x32')]['length']?_0x4e1c6d['attributes']:_0x4c9096[_0xfaf9('0x31')];if(!_0x397d86[_0xfaf9('0x2d')][_0xfaf9('0x34')](_0xfaf9('0x35'))){_0x4e1c6d['limit']=qs['limit'](_0x397d86[_0xfaf9('0x2d')][_0xfaf9('0x1a')]);_0x4e1c6d[_0xfaf9('0x19')]=qs[_0xfaf9('0x19')](_0x397d86[_0xfaf9('0x2d')][_0xfaf9('0x19')]);}_0x4e1c6d[_0xfaf9('0x36')]=qs[_0xfaf9('0x37')](_0x397d86[_0xfaf9('0x2d')][_0xfaf9('0x37')]);delete _0x397d86[_0xfaf9('0x2d')][_0xfaf9('0x37')];_0x4e1c6d['where']=qs[_0xfaf9('0x2f')](_[_0xfaf9('0x38')](_0x397d86[_0xfaf9('0x2d')],_0x4c9096[_0xfaf9('0x2f')]),_0x185d9f);if(_0x397d86[_0xfaf9('0x2d')]['filter']){_0x4e1c6d[_0xfaf9('0x39')]=_[_0xfaf9('0x3a')](_0x4e1c6d['where'],{'$or':_[_0xfaf9('0x28')](_0x185d9f,function(_0xc9dde2){if(_0xc9dde2[_0xfaf9('0x2b')]!==_0xfaf9('0x3b')){var _0x1cee7a={};_0x1cee7a[_0xc9dde2['name']]={'$like':'%'+_0x397d86[_0xfaf9('0x2d')][_0xfaf9('0x3c')]+'%'};return _0x1cee7a;}})});}_0x4e1c6d=_['merge']({},_0x4e1c6d,_0x397d86['options']);var _0x56b43d={'where':_0x4e1c6d[_0xfaf9('0x39')]};return db[_0xfaf9('0x29')][_0xfaf9('0x1b')](_0x56b43d)[_0xfaf9('0x21')](function(_0x23bd50){_0x479c21[_0xfaf9('0x1b')]=_0x23bd50;if(_0x397d86[_0xfaf9('0x2d')]['includeAll']){_0x4e1c6d[_0xfaf9('0x3d')]=[{'all':!![]}];}return db[_0xfaf9('0x29')][_0xfaf9('0x3e')](_0x4e1c6d);})[_0xfaf9('0x21')](function(_0x53b40f){_0x479c21[_0xfaf9('0x3f')]=_0x53b40f;return _0x479c21;})[_0xfaf9('0x21')](respondWithFilteredResult(_0x4516a5,_0x4e1c6d))[_0xfaf9('0x40')](handleError(_0x4516a5,null));};exports['show']=function(_0x4ee96f,_0x2431a4){var _0x3041f0={'raw':![],'where':{'id':_0x4ee96f[_0xfaf9('0x41')]['id']}},_0x11afc6={};_0x11afc6[_0xfaf9('0x31')]=_[_0xfaf9('0x2e')](db['VoiceMusicOnHold'][_0xfaf9('0x42')]);_0x11afc6[_0xfaf9('0x2d')]=_[_0xfaf9('0x2e')](_0x4ee96f[_0xfaf9('0x2d')]);_0x11afc6[_0xfaf9('0x2f')]=_[_0xfaf9('0x30')](_0x11afc6[_0xfaf9('0x31')],_0x11afc6[_0xfaf9('0x2d')]);_0x3041f0['attributes']=_[_0xfaf9('0x30')](_0x11afc6[_0xfaf9('0x31')],qs[_0xfaf9('0x33')](_0x4ee96f[_0xfaf9('0x2d')][_0xfaf9('0x33')]));_0x3041f0[_0xfaf9('0x32')]=_0x3041f0[_0xfaf9('0x32')][_0xfaf9('0x43')]?_0x3041f0[_0xfaf9('0x32')]:_0x11afc6['model'];if(_0x4ee96f[_0xfaf9('0x2d')][_0xfaf9('0x44')]){_0x3041f0['include']=[{'all':!![]}];}_0x3041f0=_[_0xfaf9('0x3a')]({},_0x3041f0,_0x4ee96f[_0xfaf9('0x45')]);return db[_0xfaf9('0x29')][_0xfaf9('0x46')](_0x3041f0)['then'](handleEntityNotFound(_0x2431a4,null))[_0xfaf9('0x21')](respondWithResult(_0x2431a4,null))['catch'](handleError(_0x2431a4,null));};exports['update']=function(_0x1eecf1,_0x69ae2d){if(_0x1eecf1['body']['id']){delete _0x1eecf1['body']['id'];}return db[_0xfaf9('0x29')]['find']({'where':{'id':_0x1eecf1[_0xfaf9('0x41')]['id']}})[_0xfaf9('0x21')](handleEntityNotFound(_0x69ae2d,null))[_0xfaf9('0x21')](saveUpdates(_0x1eecf1[_0xfaf9('0x47')],null))[_0xfaf9('0x21')](respondWithResult(_0x69ae2d,null))[_0xfaf9('0x40')](handleError(_0x69ae2d,null));};exports[_0xfaf9('0x48')]=function(_0x31b257,_0x123743,_0x60ebb0){return db[_0xfaf9('0x49')][_0xfaf9('0x4a')](function(_0x52c918){if(_0x31b257[_0xfaf9('0x47')][_0xfaf9('0x4b')]===_0xfaf9('0x4c')){_0x31b257[_0xfaf9('0x47')][_0xfaf9('0x4d')]=path['join'](config['root'],'server/files/moh',_0x31b257[_0xfaf9('0x47')][_0xfaf9('0x26')]);}return db[_0xfaf9('0x29')]['create'](_0x31b257[_0xfaf9('0x47')],{'transaction':_0x52c918})[_0xfaf9('0x21')](function(_0x4ca517){if(_0x31b257['body'][_0xfaf9('0x4b')]==='files'){fs[_0xfaf9('0x4e')](_0x4ca517[_0xfaf9('0x4d')],parseInt(_0xfaf9('0x4f'),0x8));}var _0x291ed1=_0x31b257[_0xfaf9('0x50')][_0xfaf9('0x22')]({'plain':!![]});if(!_0x291ed1)throw new Error(_0xfaf9('0x51'));if(_0x291ed1['role']==='user'){var _0x16cf2d=_0x4ca517['get']({'plain':!![]});return db['UserProfileSection']['find']({'where':{'name':_0xfaf9('0x23'),'userProfileId':_0x291ed1[_0xfaf9('0x52')]},'raw':!![]})['then'](function(_0x19853e){if(_0x19853e&&_0x19853e[_0xfaf9('0x53')]===0x0){return db[_0xfaf9('0x54')]['create']({'name':_0x16cf2d[_0xfaf9('0x26')],'resourceId':_0x16cf2d['id'],'type':_0x19853e[_0xfaf9('0x26')],'sectionId':_0x19853e['id']},{})[_0xfaf9('0x21')](function(){return _0x4ca517;});}else{return _0x4ca517;}})[_0xfaf9('0x40')](function(_0x165f25){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x165f25);});}return _0x4ca517;});})[_0xfaf9('0x21')](respondWithResult(_0x123743,0xc9))[_0xfaf9('0x40')](handleError(_0x123743,null));};exports['destroy']=function(_0x554785,_0x316e73,_0x2d53bf){var _0x19242e;return db[_0xfaf9('0x29')]['find']({'where':{'id':_0x554785['params']['id']}})[_0xfaf9('0x21')](function(_0x4e9602){if(_0x4e9602){return db[_0xfaf9('0x49')]['transaction'](function(_0x32adbb){return _0x4e9602[_0xfaf9('0x24')]({'transaction':_0x32adbb,'raw':!![]})['then'](function(_0x298d52){if(_0x298d52[_0xfaf9('0x4d')]){fs[_0xfaf9('0x55')](_0x298d52[_0xfaf9('0x4d')])[_0xfaf9('0x56')](function(_0x450a48){fs[_0xfaf9('0x57')](path[_0xfaf9('0x58')](_0x298d52[_0xfaf9('0x4d')],_0x450a48));});fs['rmdirSync'](_0x298d52[_0xfaf9('0x4d')]);}return _0x298d52;});})[_0xfaf9('0x40')](function(_0x5deb8b){throw new db['Sequelize'][(_0xfaf9('0x59'))](_0x5deb8b[_0xfaf9('0x5a')]);});}})[_0xfaf9('0x21')](handleEntityNotFound(_0x316e73,null))[_0xfaf9('0x21')](removeEntity(_0x316e73,null))[_0xfaf9('0x40')](handleError(_0x316e73,null));};exports[_0xfaf9('0x5b')]=function(_0x5afdd2,_0x153293,_0x3d1487){return db[_0xfaf9('0x49')]['transaction'](function(_0x3e6fad){var _0xd94920;return db[_0xfaf9('0x29')][_0xfaf9('0x46')]({'where':{'id':_0x5afdd2[_0xfaf9('0x41')]['id']}})[_0xfaf9('0x21')](function(_0x2d340b){if(_0x2d340b){_0xd94920=_0x2d340b;return _0x2d340b[_0xfaf9('0x5b')](_0x5afdd2[_0xfaf9('0x47')]['id'],{'transaction':_0x3e6fad});}})[_0xfaf9('0x21')](function(_0x1ea60b){if(_0x1ea60b){return db[_0xfaf9('0x5c')]['findOne']({'where':{'id':_0x5afdd2[_0xfaf9('0x47')]['id']},'attributes':['id','name',_0xfaf9('0x5d'),_0xfaf9('0x5e'),'createdAt'],'raw':!![]});}})['then'](function(_0x421c49){if(_0x421c49){var _0x24698a=path[_0xfaf9('0x58')](config['root'],_0xfaf9('0x5f'),util['format']('%s.%s',path[_0xfaf9('0x60')](_0x421c49[_0xfaf9('0x5d')],path[_0xfaf9('0x61')](_0x421c49[_0xfaf9('0x5d')])),_0x421c49[_0xfaf9('0x5e')]));var _0x3cfe0d=path[_0xfaf9('0x58')](config[_0xfaf9('0x62')],_0xfaf9('0x63'),_0xd94920[_0xfaf9('0x26')],util[_0xfaf9('0x64')](_0xfaf9('0x65'),_0x421c49[_0xfaf9('0x26')],_0x421c49[_0xfaf9('0x5e')]));fs[_0xfaf9('0x66')](_0x24698a,_0x3cfe0d);return _0x421c49;}})[_0xfaf9('0x40')](function(_0x1795b0){throw new db['Sequelize']['ValidationError'](_0x1795b0[_0xfaf9('0x5a')]);});})['then'](handleEntityNotFound(_0x153293,null))[_0xfaf9('0x21')](respondWithResult(_0x153293,0xc9))[_0xfaf9('0x40')](handleError(_0x153293,null));};exports['removeSound']=function(_0x26783d,_0x5557cd,_0x32d36c){return db[_0xfaf9('0x49')][_0xfaf9('0x4a')](function(_0x55e51e){var _0x2fc6f0;return db[_0xfaf9('0x29')][_0xfaf9('0x67')]({'where':{'id':_0x26783d[_0xfaf9('0x41')]['id']}})[_0xfaf9('0x21')](handleEntityNotFound(_0x5557cd,null))[_0xfaf9('0x21')](function(_0x5da6aa){if(_0x5da6aa){_0x2fc6f0=_0x5da6aa;return _0x5da6aa[_0xfaf9('0x68')](_0x26783d[_0xfaf9('0x41')]['id2']);}})[_0xfaf9('0x21')](function(_0x55aac7){if(_0x55aac7){return db[_0xfaf9('0x5c')][_0xfaf9('0x67')]({'where':{'id':_0x26783d[_0xfaf9('0x41')]['id2']},'attributes':['id',_0xfaf9('0x26'),_0xfaf9('0x5d'),_0xfaf9('0x5e'),'createdAt'],'raw':!![]});}})['then'](function(_0x1833fb){if(_0x1833fb){fs[_0xfaf9('0x57')](path[_0xfaf9('0x58')](_0x2fc6f0[_0xfaf9('0x4d')],util['format'](_0xfaf9('0x65'),_0x1833fb[_0xfaf9('0x26')],_0x1833fb[_0xfaf9('0x5e')])));return _0x1833fb;}})[_0xfaf9('0x40')](function(_0x257f1b){throw new db[(_0xfaf9('0x69'))]['ValidationError'](_0x257f1b[_0xfaf9('0x5a')]);});})[_0xfaf9('0x21')](handleEntityNotFound(_0x5557cd,null))[_0xfaf9('0x21')](respondWithStatusCode(_0x5557cd,0xcc))[_0xfaf9('0x40')](handleError(_0x5557cd,null));};exports[_0xfaf9('0x6a')]=function(_0x1d5010,_0x235026,_0x8f1e0){var _0x677c8c={};var _0x5b0310={};var _0x45dd24;var _0x31ac82;return db['VoiceMusicOnHold'][_0xfaf9('0x67')]({'where':{'id':_0x1d5010['params']['id']}})['then'](handleEntityNotFound(_0x235026,null))['then'](function(_0x452f91){if(_0x452f91){_0x45dd24=_0x452f91;_0x5b0310[_0xfaf9('0x31')]=_[_0xfaf9('0x2e')](db[_0xfaf9('0x5c')][_0xfaf9('0x42')]);_0x5b0310[_0xfaf9('0x2d')]=_[_0xfaf9('0x2e')](_0x1d5010[_0xfaf9('0x2d')]);_0x5b0310[_0xfaf9('0x2f')]=_[_0xfaf9('0x30')](_0x5b0310[_0xfaf9('0x31')],_0x5b0310[_0xfaf9('0x2d')]);_0x677c8c[_0xfaf9('0x32')]=_['intersection'](_0x5b0310['model'],qs[_0xfaf9('0x33')](_0x1d5010[_0xfaf9('0x2d')][_0xfaf9('0x33')]));_0x677c8c[_0xfaf9('0x32')]=_0x677c8c['attributes'][_0xfaf9('0x43')]?_0x677c8c[_0xfaf9('0x32')]:_0x5b0310[_0xfaf9('0x31')];_0x677c8c[_0xfaf9('0x36')]=qs[_0xfaf9('0x37')](_0x1d5010[_0xfaf9('0x2d')][_0xfaf9('0x37')]);_0x677c8c['where']=qs[_0xfaf9('0x2f')](_['pick'](_0x1d5010[_0xfaf9('0x2d')],_0x5b0310[_0xfaf9('0x2f')]));if(_0x1d5010[_0xfaf9('0x2d')][_0xfaf9('0x3c')]){_0x677c8c['where']=_[_0xfaf9('0x3a')](_0x677c8c['where'],{'$or':_[_0xfaf9('0x28')](_0x677c8c[_0xfaf9('0x32')],function(_0x375ea2){var _0x7e7a57={};_0x7e7a57[_0x375ea2]={'$like':'%'+_0x1d5010[_0xfaf9('0x2d')][_0xfaf9('0x3c')]+'%'};return _0x7e7a57;})});}_0x677c8c=_[_0xfaf9('0x3a')]({},_0x677c8c,_0x1d5010[_0xfaf9('0x45')]);return _0x45dd24['getSounds'](_0x677c8c);}})[_0xfaf9('0x21')](function(_0x57691d){if(_0x57691d){_0x31ac82=_0x57691d['length'];if(!_0x1d5010[_0xfaf9('0x2d')][_0xfaf9('0x34')](_0xfaf9('0x35'))){_0x677c8c[_0xfaf9('0x1a')]=qs[_0xfaf9('0x1a')](_0x1d5010[_0xfaf9('0x2d')][_0xfaf9('0x1a')]);_0x677c8c[_0xfaf9('0x19')]=qs[_0xfaf9('0x19')](_0x1d5010[_0xfaf9('0x2d')][_0xfaf9('0x19')]);}return _0x45dd24['getSounds'](_0x677c8c);}})['then'](function(_0x72c7bf){if(_0x72c7bf){return _0x72c7bf?{'count':_0x31ac82,'rows':_0x72c7bf}:null;}})[_0xfaf9('0x21')](respondWithResult(_0x235026,null))[_0xfaf9('0x40')](handleError(_0x235026,null));};
\ No newline at end of file
index 3430e30..2ae6294 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd09a=['VoiceMusicOnHold','voice_musiconhold','api','moment','bluebird','request-promise','path','define'];(function(_0x4b5f1f,_0x1fee93){var _0x3bb747=function(_0x235c2b){while(--_0x235c2b){_0x4b5f1f['push'](_0x4b5f1f['shift']());}};_0x3bb747(++_0x1fee93);}(_0xd09a,0x102));var _0xad09=function(_0x51f91a,_0x5ba489){_0x51f91a=_0x51f91a-0x0;var _0x34bda5=_0xd09a[_0x51f91a];return _0x34bda5;};'use strict';var _=require('lodash');var util=require('util');var logger=require('../../config/logger')(_0xad09('0x0'));var moment=require(_0xad09('0x1'));var BPromise=require(_0xad09('0x2'));var rp=require(_0xad09('0x3'));var fs=require('fs');var path=require(_0xad09('0x4'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require('./voiceMusicOnHold.attributes');module['exports']=function(_0x987eac,_0x4b894a){return _0x987eac[_0xad09('0x5')](_0xad09('0x6'),attributes,{'tableName':_0xad09('0x7'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x9719=['voice_musiconhold','util','moment','bluebird','request-promise','path','rimraf','../../config/environment','./voiceMusicOnHold.attributes','define','VoiceMusicOnHold'];(function(_0x23fcad,_0x2b4c2e){var _0x3e4d60=function(_0x2a25a9){while(--_0x2a25a9){_0x23fcad['push'](_0x23fcad['shift']());}};_0x3e4d60(++_0x2b4c2e);}(_0x9719,0x1e5));var _0x9971=function(_0x46e363,_0x45d7e2){_0x46e363=_0x46e363-0x0;var _0x3fb059=_0x9719[_0x46e363];return _0x3fb059;};'use strict';var _=require('lodash');var util=require(_0x9971('0x0'));var logger=require('../../config/logger')('api');var moment=require(_0x9971('0x1'));var BPromise=require(_0x9971('0x2'));var rp=require(_0x9971('0x3'));var fs=require('fs');var path=require(_0x9971('0x4'));var rimraf=require(_0x9971('0x5'));var config=require(_0x9971('0x6'));var attributes=require(_0x9971('0x7'));module['exports']=function(_0x5c1868,_0x91fcf2){return _0x5c1868[_0x9971('0x8')](_0x9971('0x9'),attributes,{'tableName':_0x9971('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 8114f4a..e709fd2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x34e8=['lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','VoiceMusicOnHold,\x20%s,\x20%s','request\x20sent','debug','VoiceMusicOnHold,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch'];(function(_0x43fc3a,_0x5767b5){var _0x2809a5=function(_0x2d3e32){while(--_0x2d3e32){_0x43fc3a['push'](_0x43fc3a['shift']());}};_0x2809a5(++_0x5767b5);}(_0x34e8,0x12c));var _0x834e=function(_0x2efafa,_0x30aff5){_0x2efafa=_0x2efafa-0x0;var _0x402f6c=_0x34e8[_0x2efafa];return _0x402f6c;};'use strict';var _=require(_0x834e('0x0'));var util=require(_0x834e('0x1'));var moment=require(_0x834e('0x2'));var BPromise=require(_0x834e('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x834e('0x4'));var db=require(_0x834e('0x5'))['db'];var utils=require(_0x834e('0x6'));var logger=require(_0x834e('0x7'))(_0x834e('0x8'));var config=require(_0x834e('0x9'));var jayson=require(_0x834e('0xa'));var client=jayson['client'][_0x834e('0xb')]({'port':0x232a});function respondWithRpcPromise(_0x52056d,_0x3e16d2,_0x3cc2e3){return new BPromise(function(_0x3a3ef6,_0x2e69e2){return client[_0x834e('0xc')](_0x52056d,_0x3cc2e3)[_0x834e('0xd')](function(_0x363786){logger[_0x834e('0xe')](_0x834e('0xf'),_0x3e16d2,_0x834e('0x10'));logger[_0x834e('0x11')](_0x834e('0x12'),_0x3e16d2,_0x834e('0x10'),JSON[_0x834e('0x13')](_0x363786));if(_0x363786[_0x834e('0x14')]){if(_0x363786[_0x834e('0x14')][_0x834e('0x15')]===0x1f4){logger['error'](_0x834e('0xf'),_0x3e16d2,_0x363786[_0x834e('0x14')]['message']);return _0x2e69e2(_0x363786[_0x834e('0x14')][_0x834e('0x16')]);}logger[_0x834e('0x14')](_0x834e('0xf'),_0x3e16d2,_0x363786['error'][_0x834e('0x16')]);return _0x3a3ef6(_0x363786[_0x834e('0x14')]['message']);}else{logger[_0x834e('0xe')]('VoiceMusicOnHold,\x20%s,\x20%s',_0x3e16d2,_0x834e('0x10'));_0x3a3ef6(_0x363786[_0x834e('0x17')]['message']);}})[_0x834e('0x18')](function(_0x22106e){logger[_0x834e('0x14')]('VoiceMusicOnHold,\x20%s,\x20%s',_0x3e16d2,_0x22106e);_0x2e69e2(_0x22106e);});});}
\ No newline at end of file
+var _0x9c44=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','client','http','request','then','request\x20sent','debug','stringify','code','error','message','VoiceMusicOnHold,\x20%s,\x20%s','info','result','catch','moment','bluebird'];(function(_0x45ea53,_0x3952ba){var _0x568900=function(_0x3dae23){while(--_0x3dae23){_0x45ea53['push'](_0x45ea53['shift']());}};_0x568900(++_0x3952ba);}(_0x9c44,0x178));var _0x49c4=function(_0x2064e5,_0x4f6fa2){_0x2064e5=_0x2064e5-0x0;var _0x21a233=_0x9c44[_0x2064e5];return _0x21a233;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x49c4('0x0'));var BPromise=require(_0x49c4('0x1'));var rs=require(_0x49c4('0x2'));var fs=require('fs');var Redis=require(_0x49c4('0x3'));var db=require(_0x49c4('0x4'))['db'];var utils=require(_0x49c4('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x49c4('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x49c4('0x7')][_0x49c4('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x69bc41,_0x2c4e2e,_0x436234){return new BPromise(function(_0x511d53,_0x11c586){return client[_0x49c4('0x9')](_0x69bc41,_0x436234)[_0x49c4('0xa')](function(_0x4487ca){logger['info']('VoiceMusicOnHold,\x20%s,\x20%s',_0x2c4e2e,_0x49c4('0xb'));logger[_0x49c4('0xc')]('VoiceMusicOnHold,\x20%s,\x20%s,\x20%s',_0x2c4e2e,_0x49c4('0xb'),JSON[_0x49c4('0xd')](_0x4487ca));if(_0x4487ca['error']){if(_0x4487ca['error'][_0x49c4('0xe')]===0x1f4){logger[_0x49c4('0xf')]('VoiceMusicOnHold,\x20%s,\x20%s',_0x2c4e2e,_0x4487ca[_0x49c4('0xf')][_0x49c4('0x10')]);return _0x11c586(_0x4487ca['error'][_0x49c4('0x10')]);}logger[_0x49c4('0xf')](_0x49c4('0x11'),_0x2c4e2e,_0x4487ca[_0x49c4('0xf')][_0x49c4('0x10')]);return _0x511d53(_0x4487ca[_0x49c4('0xf')][_0x49c4('0x10')]);}else{logger[_0x49c4('0x12')]('VoiceMusicOnHold,\x20%s,\x20%s',_0x2c4e2e,_0x49c4('0xb'));_0x511d53(_0x4487ca[_0x49c4('0x13')][_0x49c4('0x10')]);}})[_0x49c4('0x14')](function(_0x2abc78){logger['error'](_0x49c4('0x11'),_0x2c4e2e,_0x2abc78);_0x11c586(_0x2abc78);});});}
\ No newline at end of file
index 94f2a1c..ba5c8e6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x10ab=['getTeams','post','create','addAgents','addTeams','put','/:id','update','delete','destroy','removeTeams','exports','multer','util','connect-timeout','Router','fs-extra','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','describe','show','/:id/users','getAgents','/:id/teams'];(function(_0x4026f9,_0x3bfb79){var _0x2d0972=function(_0x572be5){while(--_0x572be5){_0x4026f9['push'](_0x4026f9['shift']());}};_0x2d0972(++_0x3bfb79);}(_0x10ab,0x178));var _0xb10a=function(_0x4695ba,_0x5a7f2a){_0x4695ba=_0x4695ba-0x0;var _0x524b7d=_0x10ab[_0x4695ba];return _0x524b7d;};'use strict';var multer=require(_0xb10a('0x0'));var util=require(_0xb10a('0x1'));var path=require('path');var timeout=require(_0xb10a('0x2'));var express=require('express');var router=express[_0xb10a('0x3')]();var fs_extra=require(_0xb10a('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0xb10a('0x5'));var config=require(_0xb10a('0x6'));var controller=require('./voicePrefix.controller');router[_0xb10a('0x7')]('/',auth[_0xb10a('0x8')](),controller[_0xb10a('0x9')]);router[_0xb10a('0x7')](_0xb10a('0xa'),auth[_0xb10a('0x8')](),controller[_0xb10a('0xb')]);router[_0xb10a('0x7')]('/:id',auth[_0xb10a('0x8')](),controller[_0xb10a('0xc')]);router[_0xb10a('0x7')](_0xb10a('0xd'),auth[_0xb10a('0x8')](),controller[_0xb10a('0xe')]);router[_0xb10a('0x7')](_0xb10a('0xf'),auth[_0xb10a('0x8')](),controller[_0xb10a('0x10')]);router[_0xb10a('0x11')]('/',auth[_0xb10a('0x8')](),controller[_0xb10a('0x12')]);router['post']('/:id/users',auth[_0xb10a('0x8')](),controller[_0xb10a('0x13')]);router[_0xb10a('0x11')](_0xb10a('0xf'),auth[_0xb10a('0x8')](),controller[_0xb10a('0x14')]);router[_0xb10a('0x15')](_0xb10a('0x16'),auth[_0xb10a('0x8')](),controller[_0xb10a('0x17')]);router[_0xb10a('0x18')](_0xb10a('0x16'),auth[_0xb10a('0x8')](),controller[_0xb10a('0x19')]);router['delete'](_0xb10a('0xd'),auth['isAuthenticated'](),controller['removeAgents']);router[_0xb10a('0x18')](_0xb10a('0xf'),auth['isAuthenticated'](),controller[_0xb10a('0x1a')]);module[_0xb10a('0x1b')]=router;
\ No newline at end of file
+var _0x39b3=['exports','multer','connect-timeout','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voicePrefix.controller','get','isAuthenticated','index','/describe','describe','/:id','show','/:id/users','getAgents','create','post','addAgents','/:id/teams','update','delete','removeAgents','removeTeams'];(function(_0x4e6d56,_0x3a7f7b){var _0x415041=function(_0x187bdd){while(--_0x187bdd){_0x4e6d56['push'](_0x4e6d56['shift']());}};_0x415041(++_0x3a7f7b);}(_0x39b3,0xc9));var _0x339b=function(_0x110c3d,_0x12ee06){_0x110c3d=_0x110c3d-0x0;var _0x226d67=_0x39b3[_0x110c3d];return _0x226d67;};'use strict';var multer=require(_0x339b('0x0'));var util=require('util');var path=require('path');var timeout=require(_0x339b('0x1'));var express=require('express');var router=express[_0x339b('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0x339b('0x3'));var interaction=require(_0x339b('0x4'));var config=require(_0x339b('0x5'));var controller=require(_0x339b('0x6'));router[_0x339b('0x7')]('/',auth[_0x339b('0x8')](),controller[_0x339b('0x9')]);router[_0x339b('0x7')](_0x339b('0xa'),auth[_0x339b('0x8')](),controller[_0x339b('0xb')]);router[_0x339b('0x7')](_0x339b('0xc'),auth[_0x339b('0x8')](),controller[_0x339b('0xd')]);router[_0x339b('0x7')](_0x339b('0xe'),auth[_0x339b('0x8')](),controller[_0x339b('0xf')]);router[_0x339b('0x7')]('/:id/teams',auth['isAuthenticated'](),controller['getTeams']);router['post']('/',auth[_0x339b('0x8')](),controller[_0x339b('0x10')]);router[_0x339b('0x11')](_0x339b('0xe'),auth['isAuthenticated'](),controller[_0x339b('0x12')]);router[_0x339b('0x11')](_0x339b('0x13'),auth[_0x339b('0x8')](),controller['addTeams']);router['put']('/:id',auth[_0x339b('0x8')](),controller[_0x339b('0x14')]);router['delete'](_0x339b('0xc'),auth['isAuthenticated'](),controller['destroy']);router[_0x339b('0x15')](_0x339b('0xe'),auth[_0x339b('0x8')](),controller[_0x339b('0x16')]);router[_0x339b('0x15')]('/:id/teams',auth[_0x339b('0x8')](),controller[_0x339b('0x17')]);module[_0x339b('0x18')]=router;
\ No newline at end of file
index 07af80f..88b651e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc555=['getDataValue','INTEGER','sequelize','exports','STRING','name','VIRTUAL','system-'];(function(_0x17259f,_0x19d960){var _0x28ae7d=function(_0x4a4c1a){while(--_0x4a4c1a){_0x17259f['push'](_0x17259f['shift']());}};_0x28ae7d(++_0x19d960);}(_0xc555,0x102));var _0x5c55=function(_0x173441,_0x26b0d9){_0x173441=_0x173441-0x0;var _0x2423a8=_0xc555[_0x173441];return _0x2423a8;};'use strict';var Sequelize=require(_0x5c55('0x0'));module[_0x5c55('0x1')]={'name':{'type':Sequelize[_0x5c55('0x2')],'allowNull':![],'unique':_0x5c55('0x3')},'prefix':{'type':Sequelize[_0x5c55('0x4')],'get':function(_0x267fb7){return _0x5c55('0x5')+this[_0x5c55('0x6')]('name')+'-';}},'description':{'type':Sequelize[_0x5c55('0x2')]},'callerIdAll':{'type':Sequelize[_0x5c55('0x2')]},'VoiceExtensionId':{'type':Sequelize[_0x5c55('0x7')]}};
\ No newline at end of file
+var _0x04c0=['getDataValue','INTEGER','STRING','name','VIRTUAL','system-'];(function(_0x58ff04,_0x172b1e){var _0x464257=function(_0x3227af){while(--_0x3227af){_0x58ff04['push'](_0x58ff04['shift']());}};_0x464257(++_0x172b1e);}(_0x04c0,0x6e));var _0x004c=function(_0x32d592,_0x1d8461){_0x32d592=_0x32d592-0x0;var _0x1309f1=_0x04c0[_0x32d592];return _0x1309f1;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize[_0x004c('0x0')],'allowNull':![],'unique':_0x004c('0x1')},'prefix':{'type':Sequelize[_0x004c('0x2')],'get':function(_0x52b931){return _0x004c('0x3')+this[_0x004c('0x4')](_0x004c('0x1'))+'-';}},'description':{'type':Sequelize[_0x004c('0x0')]},'callerIdAll':{'type':Sequelize['STRING']},'VoiceExtensionId':{'type':Sequelize[_0x004c('0x5')]}};
\ No newline at end of file
index eb1878f..9ff7fec 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x28f2=['filter','VIRTUAL','options','VoicePrefix','includeAll','include','findAll','catch','show','params','keys','merge','find','describe','create','sequelize','transaction','body','VoiceExtension','VoiceExtensionId','user','role','UserProfileSection','VoicePrefixes','userProfileId','autoAssociation','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','context','from-sip','exten','description','Voice\x20Prefix\x20Extension','appdata','prefix','NoOp','Voice\x20Prefix','VoicePrefixId','bulkCreate','Extensions\x20creation\x20failed','push','Set','CDR(prefix)=','callerIdAll','PREFIX-CALLERIDALL=','${EXTEN:','charAt','update','system-','addAgents','ids','omit','spread','userVoicePrefix:save','removeAgents','isArray','emit','getAgents','findOne','User','getTeams','pick','addTeams','Team','Agents','online','voicePause','interface','flatMap','each','TeamVoicePrefix','upsert','UserVoicePrefix','forEach','field','from','team_has_voice_prefixes','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','VoicePrefixId\x20=\x20?','clone','ut.UserId\x20=\x20?','QueryTypes','SELECT','every','TeamId','includes','union','removeTeams','userVoicePrefix:remove','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','crypto','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','sendStatus','status','end','json','offset','limit','count','set','Content-Range','apply','reject','save','then','get','UserProfileResource','destroy','error','stack','name','send','map','rawAttributes','fieldName','type','key','model','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filters'];(function(_0x392aea,_0x47d79a){var _0x237810=function(_0xbe1c0e){while(--_0xbe1c0e){_0x392aea['push'](_0x392aea['shift']());}};_0x237810(++_0x47d79a);}(_0x28f2,0x193));var _0x228f=function(_0x365fd5,_0x1d81c4){_0x365fd5=_0x365fd5-0x0;var _0x4a400e=_0x28f2[_0x365fd5];return _0x4a400e;};'use strict';var emlformat=require(_0x228f('0x0'));var rimraf=require(_0x228f('0x1'));var zipdir=require(_0x228f('0x2'));var jsonpatch=require(_0x228f('0x3'));var rp=require(_0x228f('0x4'));var moment=require('moment');var BPromise=require(_0x228f('0x5'));var Mustache=require(_0x228f('0x6'));var util=require(_0x228f('0x7'));var path=require(_0x228f('0x8'));var sox=require(_0x228f('0x9'));var csv=require(_0x228f('0xa'));var ejs=require(_0x228f('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0x228f('0xc'));var squel=require('squel');var crypto=require(_0x228f('0xd'));var jsforce=require(_0x228f('0xe'));var deskjs=require(_0x228f('0xf'));var toCsv=require('to-csv');var querystring=require(_0x228f('0x10'));var Papa=require('papaparse');var Redis=require(_0x228f('0x11'));var authService=require(_0x228f('0x12'));var qs=require('../../components/parsers/qs');var as=require(_0x228f('0x13'));var hardwareService=require(_0x228f('0x14'));var logger=require(_0x228f('0x15'))(_0x228f('0x16'));var utils=require(_0x228f('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0x228f('0x18'));var db=require(_0x228f('0x19'))['db'];config[_0x228f('0x1a')]=_[_0x228f('0x1b')](config[_0x228f('0x1a')],{'host':_0x228f('0x1c'),'port':0x18eb});var socket=require(_0x228f('0x1d'))(new Redis(config[_0x228f('0x1a')]));require('./voicePrefix.socket')[_0x228f('0x1e')](socket);function respondWithStatusCode(_0xfb6aff,_0x14d6fc){_0x14d6fc=_0x14d6fc||0xcc;return function(_0x31dc9e){if(_0x31dc9e){return _0xfb6aff[_0x228f('0x1f')](_0x14d6fc);}return _0xfb6aff[_0x228f('0x20')](_0x14d6fc)[_0x228f('0x21')]();};}function respondWithResult(_0x5b5abb,_0x5e4d20){_0x5e4d20=_0x5e4d20||0xc8;return function(_0x4cae4a){if(_0x4cae4a){return _0x5b5abb[_0x228f('0x20')](_0x5e4d20)[_0x228f('0x22')](_0x4cae4a);}};}function respondWithFilteredResult(_0x195e65,_0x5bf5a2){return function(_0x2d4819){if(_0x2d4819){var _0x4e1968=typeof _0x5bf5a2[_0x228f('0x23')]==='undefined'&&typeof _0x5bf5a2[_0x228f('0x24')]==='undefined';var _0x5aa203=_0x2d4819[_0x228f('0x25')];var _0x52da36=_0x4e1968?0x0:_0x5bf5a2[_0x228f('0x23')];var _0x139373=_0x4e1968?_0x2d4819[_0x228f('0x25')]:_0x5bf5a2[_0x228f('0x23')]+_0x5bf5a2[_0x228f('0x24')];var _0x313cf2;if(_0x139373>=_0x5aa203){_0x139373=_0x5aa203;_0x313cf2=0xc8;}else{_0x313cf2=0xce;}_0x195e65[_0x228f('0x20')](_0x313cf2);return _0x195e65[_0x228f('0x26')](_0x228f('0x27'),_0x52da36+'-'+_0x139373+'/'+_0x5aa203)['json'](_0x2d4819);}return null;};}function patchUpdates(_0x1e96d4){return function(_0x8f7004){try{jsonpatch[_0x228f('0x28')](_0x8f7004,_0x1e96d4,!![]);}catch(_0x3c00ad){return BPromise[_0x228f('0x29')](_0x3c00ad);}return _0x8f7004[_0x228f('0x2a')]();};}function saveUpdates(_0x33e882,_0x20c111){return function(_0x2dcf68){if(_0x2dcf68){return _0x2dcf68['update'](_0x33e882)[_0x228f('0x2b')](function(_0x306928){return _0x306928;});}return null;};}function removeEntity(_0x2b3553,_0x272c7d){return function(_0x3036d4){if(_0x3036d4){return _0x3036d4['destroy']()[_0x228f('0x2b')](function(){var _0x49efe9=_0x3036d4[_0x228f('0x2c')]({'plain':!![]});var _0x5afa52='VoicePrefixes';return db[_0x228f('0x2d')][_0x228f('0x2e')]({'where':{'type':_0x5afa52,'resourceId':_0x49efe9['id']}})[_0x228f('0x2b')](function(){return _0x3036d4;});})[_0x228f('0x2b')](function(){_0x2b3553[_0x228f('0x20')](0xcc)[_0x228f('0x21')]();});}};}function handleEntityNotFound(_0x2eaf4f,_0x2511e5){return function(_0xe67c83){if(!_0xe67c83){_0x2eaf4f[_0x228f('0x1f')](0x194);}return _0xe67c83;};}function handleError(_0x2ba4f5,_0x136a9e){_0x136a9e=_0x136a9e||0x1f4;return function(_0xc25917){logger[_0x228f('0x2f')](_0xc25917[_0x228f('0x30')]);if(_0xc25917['name']){delete _0xc25917[_0x228f('0x31')];}_0x2ba4f5[_0x228f('0x20')](_0x136a9e)[_0x228f('0x32')](_0xc25917);};}exports['index']=function(_0x32e0ce,_0x41be2d){var _0x5acf64={},_0x38375d={},_0x31abd0={'count':0x0,'rows':[]};var _0x45a67a=_[_0x228f('0x33')](db['VoicePrefix'][_0x228f('0x34')],function(_0x5201ba){return{'name':_0x5201ba[_0x228f('0x35')],'type':_0x5201ba[_0x228f('0x36')][_0x228f('0x37')]};});_0x38375d[_0x228f('0x38')]=_['map'](_0x45a67a,_0x228f('0x31'));_0x38375d[_0x228f('0x39')]=_['keys'](_0x32e0ce['query']);_0x38375d['filters']=_[_0x228f('0x3a')](_0x38375d[_0x228f('0x38')],_0x38375d[_0x228f('0x39')]);_0x5acf64[_0x228f('0x3b')]=_[_0x228f('0x3a')](_0x38375d[_0x228f('0x38')],qs[_0x228f('0x3c')](_0x32e0ce[_0x228f('0x39')][_0x228f('0x3c')]));_0x5acf64['attributes']=_0x5acf64['attributes'][_0x228f('0x3d')]?_0x5acf64[_0x228f('0x3b')]:_0x38375d[_0x228f('0x38')];if(!_0x32e0ce[_0x228f('0x39')][_0x228f('0x3e')](_0x228f('0x3f'))){_0x5acf64[_0x228f('0x24')]=qs[_0x228f('0x24')](_0x32e0ce[_0x228f('0x39')][_0x228f('0x24')]);_0x5acf64['offset']=qs['offset'](_0x32e0ce[_0x228f('0x39')][_0x228f('0x23')]);}_0x5acf64[_0x228f('0x40')]=qs[_0x228f('0x41')](_0x32e0ce['query'][_0x228f('0x41')]);_0x5acf64[_0x228f('0x42')]=qs['filters'](_['pick'](_0x32e0ce[_0x228f('0x39')],_0x38375d[_0x228f('0x43')]),_0x45a67a);if(_0x32e0ce['query'][_0x228f('0x44')]){_0x5acf64[_0x228f('0x42')]=_['merge'](_0x5acf64['where'],{'$or':_[_0x228f('0x33')](_0x45a67a,function(_0x5838e6){if(_0x5838e6[_0x228f('0x36')]!==_0x228f('0x45')){var _0x3da118={};_0x3da118[_0x5838e6[_0x228f('0x31')]]={'$like':'%'+_0x32e0ce[_0x228f('0x39')][_0x228f('0x44')]+'%'};return _0x3da118;}})});}_0x5acf64=_['merge']({},_0x5acf64,_0x32e0ce[_0x228f('0x46')]);var _0x5cdd16={'where':_0x5acf64[_0x228f('0x42')]};return db[_0x228f('0x47')][_0x228f('0x25')](_0x5cdd16)[_0x228f('0x2b')](function(_0x41cba5){_0x31abd0[_0x228f('0x25')]=_0x41cba5;if(_0x32e0ce[_0x228f('0x39')][_0x228f('0x48')]){_0x5acf64[_0x228f('0x49')]=[{'all':!![]}];}return db[_0x228f('0x47')][_0x228f('0x4a')](_0x5acf64);})[_0x228f('0x2b')](function(_0x19839d){_0x31abd0['rows']=_0x19839d;return _0x31abd0;})['then'](respondWithFilteredResult(_0x41be2d,_0x5acf64))[_0x228f('0x4b')](handleError(_0x41be2d,null));};exports[_0x228f('0x4c')]=function(_0x34cd3c,_0xbfa169){var _0x2f2b47={'raw':![],'where':{'id':_0x34cd3c[_0x228f('0x4d')]['id']}},_0x334fb1={};_0x334fb1[_0x228f('0x38')]=_[_0x228f('0x4e')](db[_0x228f('0x47')]['rawAttributes']);_0x334fb1[_0x228f('0x39')]=_[_0x228f('0x4e')](_0x34cd3c['query']);_0x334fb1[_0x228f('0x43')]=_['intersection'](_0x334fb1[_0x228f('0x38')],_0x334fb1['query']);_0x2f2b47[_0x228f('0x3b')]=_['intersection'](_0x334fb1[_0x228f('0x38')],qs[_0x228f('0x3c')](_0x34cd3c[_0x228f('0x39')][_0x228f('0x3c')]));_0x2f2b47[_0x228f('0x3b')]=_0x2f2b47[_0x228f('0x3b')][_0x228f('0x3d')]?_0x2f2b47[_0x228f('0x3b')]:_0x334fb1[_0x228f('0x38')];if(_0x34cd3c[_0x228f('0x39')][_0x228f('0x48')]){_0x2f2b47[_0x228f('0x49')]=[{'all':!![]}];}_0x2f2b47=_[_0x228f('0x4f')]({},_0x2f2b47,_0x34cd3c[_0x228f('0x46')]);return db[_0x228f('0x47')][_0x228f('0x50')](_0x2f2b47)[_0x228f('0x2b')](handleEntityNotFound(_0xbfa169,null))[_0x228f('0x2b')](respondWithResult(_0xbfa169,null))[_0x228f('0x4b')](handleError(_0xbfa169,null));};exports['destroy']=function(_0x47cb21,_0xa538ce){return db[_0x228f('0x47')][_0x228f('0x50')]({'where':{'id':_0x47cb21['params']['id']}})[_0x228f('0x2b')](handleEntityNotFound(_0xa538ce,null))[_0x228f('0x2b')](removeEntity(_0xa538ce,null))[_0x228f('0x4b')](handleError(_0xa538ce,null));};exports['describe']=function(_0x559490,_0x51db80){return db[_0x228f('0x47')][_0x228f('0x51')]()[_0x228f('0x2b')](respondWithResult(_0x51db80,null))[_0x228f('0x4b')](handleError(_0x51db80,null));};exports[_0x228f('0x52')]=function(_0x292c39,_0xafd0e4){var _0x30ff69;return db[_0x228f('0x53')][_0x228f('0x54')](function(_0x43bbd2){return db[_0x228f('0x47')]['create'](_0x292c39[_0x228f('0x55')],{'transaction':_0x43bbd2})[_0x228f('0x2b')](function(_0x472035){_0x30ff69=_0x472035[_0x228f('0x2c')]({'plain':!![]});return db[_0x228f('0x56')][_0x228f('0x50')]({'where':{'id':_0x30ff69[_0x228f('0x57')]},'raw':!![]})[_0x228f('0x2b')](function(_0x4feefb){return createVoicePrefixExtensions(_0x30ff69,_0x4feefb,_0x43bbd2);});});})[_0x228f('0x2b')](function(){var _0x1c6114=_0x292c39[_0x228f('0x58')][_0x228f('0x2c')]({'plain':!![]});if(!_0x1c6114)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x1c6114[_0x228f('0x59')]===_0x228f('0x58')){var _0x4b516e=_0x30ff69;return db[_0x228f('0x5a')][_0x228f('0x50')]({'where':{'name':_0x228f('0x5b'),'userProfileId':_0x1c6114[_0x228f('0x5c')]},'raw':!![]})[_0x228f('0x2b')](function(_0x9d7417){if(_0x9d7417&&_0x9d7417[_0x228f('0x5d')]===0x0){return db[_0x228f('0x2d')][_0x228f('0x52')]({'name':_0x4b516e[_0x228f('0x31')],'resourceId':_0x4b516e['id'],'type':_0x9d7417['name'],'sectionId':_0x9d7417['id']},{})[_0x228f('0x2b')](function(){return _0x30ff69;});}else{return _0x30ff69;}})['catch'](function(_0x331b33){logger[_0x228f('0x2f')](_0x228f('0x5e'),_0x331b33);throw _0x331b33;});}return _0x30ff69;})[_0x228f('0x2b')](respondWithResult(_0xafd0e4,null))[_0x228f('0x4b')](handleError(_0xafd0e4,null));};function Extension(_0x2860dc,_0x1c8be4,_0xadb0e6,_0x56d70f){this[_0x228f('0x5f')]=_0x228f('0x60');this[_0x228f('0x61')]=_0x2860dc;this['app']=_0xadb0e6;this[_0x228f('0x36')]='system';this[_0x228f('0x62')]=_0x228f('0x63');this['priority']=_0x1c8be4;this[_0x228f('0x64')]=_0x56d70f;}function createVoicePrefixExtensions(_0x26fe6b,_0x16318d,_0xb8200d){return new BPromise(function(_0x3a0454,_0x651060){var _0x11b481=new Extension(formatPrefixName(_0x26fe6b[_0x228f('0x65')]),0x1,_0x228f('0x66'),_0x228f('0x67'));_0x11b481[_0x228f('0x68')]=_0x26fe6b['id'];return db['VoiceExtension'][_0x228f('0x52')](_0x11b481,{'transaction':_0xb8200d})[_0x228f('0x2b')](function(_0x1d4203){var _0x3be1f3=_0x1d4203[_0x228f('0x2c')]({'plain':!![]});var _0x506191=_['map'](addVoicePrefixExtensions(_0x26fe6b,_0x16318d),function(_0x14a732){_0x14a732['VoiceExtensionId']=_0x3be1f3['id'];_0x14a732[_0x228f('0x68')]=_0x26fe6b['id'];return _0x14a732;});return db['VoiceExtension'][_0x228f('0x69')](_0x506191,{'transaction':_0xb8200d})[_0x228f('0x2b')](function(_0x53a6a5){if(!_0x53a6a5){return _0x651060(_0x228f('0x6a'));}else{return _0x3a0454(_0x53a6a5);}})[_0x228f('0x4b')](function(_0x120ae1){return _0x651060(_0x120ae1);});});;});};function addVoicePrefixExtensions(_0x392270,_0x5f0b95){var _0x42dd54=[];var _0x21f860=formatPrefixName(_0x392270[_0x228f('0x65')]);_0x42dd54[_0x228f('0x6b')](new Extension(_0x21f860,0x2,_0x228f('0x6c'),_0x228f('0x6d')+_0x392270[_0x228f('0x31')]));if(_0x392270[_0x228f('0x6e')]){_0x42dd54['push'](new Extension(_0x21f860,0x3,_0x228f('0x6c'),_0x228f('0x6f')+_0x392270[_0x228f('0x6e')]));}else{_0x42dd54[_0x228f('0x6b')](new Extension(_0x21f860,0x3,_0x228f('0x66'),'No\x20callerid\x20available'));}_0x42dd54[_0x228f('0x6b')](new Extension(_0x21f860,0x4,'goto',_0x5f0b95[_0x228f('0x5f')]+','+_0x228f('0x70')+(0x8+_0x392270['name'][_0x228f('0x3d')])+'}'+','+0x1));return _0x42dd54;}function formatPrefixName(_0x11a657){var _0x260e70='_';for(var _0x5eb9ed=0x0;_0x5eb9ed<_0x11a657[_0x228f('0x3d')];_0x5eb9ed++){if(_0x11a657[_0x228f('0x71')](_0x5eb9ed)=='-'){_0x260e70+=_0x11a657[_0x228f('0x71')](_0x5eb9ed);}else{_0x260e70+='['+_0x11a657[_0x228f('0x71')](_0x5eb9ed)+']';}}_0x260e70+='.';return _0x260e70;}exports[_0x228f('0x72')]=function(_0x5990e9,_0x221b3,_0x187f84){var _0x5718e1=_0x5990e9['body'];_0x5718e1[_0x228f('0x65')]=_0x228f('0x73')+_0x5718e1[_0x228f('0x31')]+'-';return db[_0x228f('0x53')][_0x228f('0x54')](function(_0x1162ca){return db[_0x228f('0x47')][_0x228f('0x72')](_0x5718e1,{'where':{'id':_0x5718e1['id']},'transaction':_0x1162ca})['then'](function(){return db[_0x228f('0x56')]['destroy']({'where':{'VoicePrefixId':_0x5718e1['id']},'transaction':_0x1162ca})[_0x228f('0x2b')](function(){return db[_0x228f('0x56')][_0x228f('0x50')]({'where':{'id':_0x5718e1[_0x228f('0x57')]},'raw':!![]})[_0x228f('0x2b')](function(_0x32a32e){return createVoicePrefixExtensions(_0x5718e1,_0x32a32e,_0x1162ca);});});});})[_0x228f('0x2b')](function(){return db['VoicePrefix']['findById'](_0x5718e1['id']);})[_0x228f('0x2b')](respondWithResult(_0x221b3,null))[_0x228f('0x4b')](handleError(_0x221b3,null));};exports[_0x228f('0x74')]=function(_0x16776b,_0x6854c1,_0x29446b){return db['VoicePrefix'][_0x228f('0x50')]({'where':{'id':_0x16776b[_0x228f('0x4d')]['id']}})[_0x228f('0x2b')](handleEntityNotFound(_0x6854c1,null))[_0x228f('0x2b')](function(_0x3fa413){if(_0x3fa413){return _0x3fa413[_0x228f('0x74')](_0x16776b[_0x228f('0x55')][_0x228f('0x75')],_[_0x228f('0x76')](_0x16776b['body'],[_0x228f('0x75'),'id'])||{})[_0x228f('0x77')](function(_0x47fe2b){for(var _0x1abf6d=0x0;_0x1abf6d<_0x16776b[_0x228f('0x55')]['ids']['length'];_0x1abf6d+=0x1){socket['emit'](_0x228f('0x78'),{'UserId':Number(_0x16776b['body'][_0x228f('0x75')][_0x1abf6d]),'VoicePrefixId':Number(_0x16776b['params']['id'])});}return _0x47fe2b;});}})[_0x228f('0x2b')](respondWithResult(_0x6854c1,null))[_0x228f('0x4b')](handleError(_0x6854c1,null));};exports['removeAgents']=function(_0x27ffdd,_0x16430e,_0x2dadc9){return db[_0x228f('0x47')][_0x228f('0x50')]({'where':{'id':_0x27ffdd['params']['id']}})[_0x228f('0x2b')](handleEntityNotFound(_0x16430e,null))[_0x228f('0x2b')](function(_0xa33189){if(_0xa33189){return _0xa33189[_0x228f('0x79')](_0x27ffdd[_0x228f('0x39')][_0x228f('0x75')])[_0x228f('0x2b')](function(){if(_[_0x228f('0x7a')](_0x27ffdd[_0x228f('0x39')]['ids'])){for(var _0x74fe35=0x0;_0x74fe35<_0x27ffdd[_0x228f('0x39')][_0x228f('0x75')]['length'];_0x74fe35+=0x1){socket['emit']('userVoicePrefix:remove',{'UserId':Number(_0x27ffdd[_0x228f('0x39')]['ids'][_0x74fe35]),'VoicePrefixId':Number(_0x27ffdd[_0x228f('0x4d')]['id'])});}}else{socket[_0x228f('0x7b')]('userVoicePrefix:remove',{'UserId':Number(_0x27ffdd[_0x228f('0x39')][_0x228f('0x75')]),'VoicePrefixId':Number(_0x27ffdd['params']['id'])});}});}})[_0x228f('0x2b')](respondWithStatusCode(_0x16430e,null))[_0x228f('0x4b')](handleError(_0x16430e,null));};exports[_0x228f('0x7c')]=function(_0x32ea8d,_0x5b29d3,_0x268e71){var _0x3418b2={};var _0x2240de={};var _0x20f029;var _0x37ab8a;return db[_0x228f('0x47')][_0x228f('0x7d')]({'where':{'id':_0x32ea8d[_0x228f('0x4d')]['id']}})[_0x228f('0x2b')](handleEntityNotFound(_0x5b29d3,null))['then'](function(_0x257aa6){if(_0x257aa6){_0x20f029=_0x257aa6;_0x2240de[_0x228f('0x38')]=_[_0x228f('0x4e')](db[_0x228f('0x7e')][_0x228f('0x34')]);_0x2240de['query']=_['keys'](_0x32ea8d[_0x228f('0x39')]);_0x2240de['filters']=_[_0x228f('0x3a')](_0x2240de['model'],_0x2240de[_0x228f('0x39')]);_0x3418b2['attributes']=_[_0x228f('0x3a')](_0x2240de[_0x228f('0x38')],qs[_0x228f('0x3c')](_0x32ea8d[_0x228f('0x39')][_0x228f('0x3c')]));_0x3418b2[_0x228f('0x3b')]=_0x3418b2[_0x228f('0x3b')][_0x228f('0x3d')]?_0x3418b2[_0x228f('0x3b')]:_0x2240de[_0x228f('0x38')];_0x3418b2[_0x228f('0x40')]=qs[_0x228f('0x41')](_0x32ea8d[_0x228f('0x39')][_0x228f('0x41')]);_0x3418b2[_0x228f('0x42')]=qs[_0x228f('0x43')](_['pick'](_0x32ea8d[_0x228f('0x39')],_0x2240de[_0x228f('0x43')]));if(_0x32ea8d[_0x228f('0x39')]['filter']){_0x3418b2[_0x228f('0x42')]=_['merge'](_0x3418b2['where'],{'$or':_['map'](_0x3418b2[_0x228f('0x3b')],function(_0x50ed6a){var _0x22448b={};_0x22448b[_0x50ed6a]={'$like':'%'+_0x32ea8d[_0x228f('0x39')]['filter']+'%'};return _0x22448b;})});}_0x3418b2=_[_0x228f('0x4f')]({},_0x3418b2,_0x32ea8d[_0x228f('0x46')]);return _0x20f029['getAgents'](_0x3418b2);}})[_0x228f('0x2b')](function(_0x620f5a){if(_0x620f5a){_0x37ab8a=_0x620f5a['length'];if(!_0x32ea8d['query'][_0x228f('0x3e')](_0x228f('0x3f'))){_0x3418b2[_0x228f('0x24')]=qs[_0x228f('0x24')](_0x32ea8d['query'][_0x228f('0x24')]);_0x3418b2[_0x228f('0x23')]=qs['offset'](_0x32ea8d[_0x228f('0x39')][_0x228f('0x23')]);}return _0x20f029[_0x228f('0x7c')](_0x3418b2);}})[_0x228f('0x2b')](function(_0x39aa20){if(_0x39aa20){return _0x39aa20?{'count':_0x37ab8a,'rows':_0x39aa20}:null;}})[_0x228f('0x2b')](respondWithResult(_0x5b29d3,null))[_0x228f('0x4b')](handleError(_0x5b29d3,null));};exports[_0x228f('0x7f')]=function(_0x5a1a8c,_0x5a7f73,_0x597271){var _0x548882={};var _0x47eba6={};var _0x5ac69a;var _0x182858;return db[_0x228f('0x47')][_0x228f('0x7d')]({'where':{'id':_0x5a1a8c[_0x228f('0x4d')]['id']}})[_0x228f('0x2b')](handleEntityNotFound(_0x5a7f73,null))[_0x228f('0x2b')](function(_0x35aa2c){if(_0x35aa2c){_0x5ac69a=_0x35aa2c;_0x47eba6['model']=_[_0x228f('0x4e')](db['Team']['rawAttributes']);_0x47eba6['query']=_['keys'](_0x5a1a8c[_0x228f('0x39')]);_0x47eba6['filters']=_[_0x228f('0x3a')](_0x47eba6[_0x228f('0x38')],_0x47eba6[_0x228f('0x39')]);_0x548882[_0x228f('0x3b')]=_['intersection'](_0x47eba6[_0x228f('0x38')],qs[_0x228f('0x3c')](_0x5a1a8c[_0x228f('0x39')][_0x228f('0x3c')]));_0x548882[_0x228f('0x3b')]=_0x548882[_0x228f('0x3b')][_0x228f('0x3d')]?_0x548882[_0x228f('0x3b')]:_0x47eba6[_0x228f('0x38')];_0x548882[_0x228f('0x40')]=qs[_0x228f('0x41')](_0x5a1a8c['query']['sort']);_0x548882['where']=qs[_0x228f('0x43')](_[_0x228f('0x80')](_0x5a1a8c[_0x228f('0x39')],_0x47eba6[_0x228f('0x43')]));if(_0x5a1a8c[_0x228f('0x39')][_0x228f('0x44')]){_0x548882[_0x228f('0x42')]=_[_0x228f('0x4f')](_0x548882['where'],{'$or':_[_0x228f('0x33')](_0x548882[_0x228f('0x3b')],function(_0x433c1f){var _0xea049c={};_0xea049c[_0x433c1f]={'$like':'%'+_0x5a1a8c[_0x228f('0x39')][_0x228f('0x44')]+'%'};return _0xea049c;})});}_0x548882=_[_0x228f('0x4f')]({},_0x548882,_0x5a1a8c[_0x228f('0x46')]);return _0x5ac69a[_0x228f('0x7f')](_0x548882);}})['then'](function(_0x2db468){if(_0x2db468){_0x182858=_0x2db468[_0x228f('0x3d')];if(!_0x5a1a8c[_0x228f('0x39')]['hasOwnProperty']('nolimit')){_0x548882[_0x228f('0x24')]=qs['limit'](_0x5a1a8c[_0x228f('0x39')][_0x228f('0x24')]);_0x548882[_0x228f('0x23')]=qs[_0x228f('0x23')](_0x5a1a8c['query'][_0x228f('0x23')]);}return _0x5ac69a[_0x228f('0x7f')](_0x548882);}})[_0x228f('0x2b')](function(_0x237b92){if(_0x237b92){return _0x237b92?{'count':_0x182858,'rows':_0x237b92}:null;}})['then'](respondWithResult(_0x5a7f73,null))['catch'](handleError(_0x5a7f73,null));};exports[_0x228f('0x81')]=function(_0x578762,_0x19e488,_0x48c6ee){var _0x59b34c=_0x578762['body'][_0x228f('0x75')];var _0x4865e5;return db[_0x228f('0x82')][_0x228f('0x4a')]({'where':{'id':_0x59b34c},'attributes':['id'],'include':[{'model':db[_0x228f('0x7e')],'as':_0x228f('0x83'),'attributes':['id',_0x228f('0x31'),_0x228f('0x84'),_0x228f('0x85'),_0x228f('0x86')],'raw':!![]}]})[_0x228f('0x2b')](function(_0x1e8511){if(_0x1e8511){_0x4865e5=_0x1e8511;var _0x35363e=_[_0x228f('0x87')](_0x1e8511,function(_0x2f8379){var _0x38fca3=_0x2f8379[_0x228f('0x2c')]({'plain':!![]});return _0x38fca3[_0x228f('0x83')];});return db[_0x228f('0x47')]['find']({'where':{'id':_0x578762[_0x228f('0x4d')]['id']}})[_0x228f('0x2b')](function(_0x553895){return db[_0x228f('0x53')][_0x228f('0x54')](function(_0x3a2c9c){return _0x553895[_0x228f('0x81')](_0x59b34c,{'transaction':_0x3a2c9c})['then'](function(){return BPromise[_0x228f('0x88')](_0x4865e5,function(_0x38da32){return db[_0x228f('0x89')][_0x228f('0x8a')]({'TeamId':_0x38da32['id'],'VoicePrefixId':_0x578762[_0x228f('0x4d')]['id']},{'transaction':_0x3a2c9c});});})['then'](function(){return BPromise['each'](_0x35363e,function(_0x25f726){return db[_0x228f('0x8b')]['findOrCreate']({'where':{'UserId':_0x25f726['id'],'VoicePrefixId':_0x578762[_0x228f('0x4d')]['id']},'transaction':_0x3a2c9c});});})[_0x228f('0x2b')](function(){_0x35363e[_0x228f('0x8c')](function(_0x525439){socket[_0x228f('0x7b')](_0x228f('0x78'),{'UserId':_0x525439['id'],'VoicePrefixId':_0x553895['id']});});});});});}})['then'](respondWithStatusCode(_0x19e488,null))[_0x228f('0x4b')](handleError(_0x19e488,null));};exports['removeTeams']=function(_0x29201c,_0x207d64,_0xff507b){return db[_0x228f('0x82')]['findAll']({'where':{'id':_0x29201c['query'][_0x228f('0x75')]},'attributes':['id'],'include':[{'model':db['User'],'as':_0x228f('0x83'),'attributes':['id'],'raw':!![]}]})[_0x228f('0x2b')](handleEntityNotFound(_0x207d64,null))[_0x228f('0x2b')](function(_0x16ebcf){var _0x21efb1=_['map'](_0x16ebcf,'id');var _0x3526b0=[];var _0x45da1f=[];var _0x69a9a5=squel['select']();_0x69a9a5[_0x228f('0x8d')]('tq.TeamId')[_0x228f('0x8e')](_0x228f('0x8f'),'tq')['join'](_0x228f('0x90'),'ut',_0x228f('0x91'))[_0x228f('0x42')](_0x228f('0x92'),_0x29201c['params']['id']);for(var _0x2b6a34=0x0;_0x2b6a34<_0x16ebcf[_0x228f('0x3d')];_0x2b6a34+=0x1){let _0x13ba88=_0x16ebcf[_0x2b6a34];for(var _0x106451=0x0;_0x106451<_0x13ba88[_0x228f('0x83')][_0x228f('0x3d')];_0x106451+=0x1){let _0x57b1d6=_0x13ba88[_0x228f('0x83')][_0x106451];var _0x22b0ff=_0x69a9a5[_0x228f('0x93')]();_0x22b0ff[_0x228f('0x42')](_0x228f('0x94'),_0x57b1d6['id']);_0x45da1f[_0x228f('0x6b')](db[_0x228f('0x53')]['query'](_0x22b0ff['toString'](),{'type':db[_0x228f('0x53')][_0x228f('0x95')][_0x228f('0x96')]})['then'](function(_0x348662){if(_0x348662[_0x228f('0x3d')]===0x1){return _0x57b1d6['id'];}else{var _0x3c83e1=_[_0x228f('0x97')](_[_0x228f('0x33')](_0x348662,_0x228f('0x98')),function(_0x437b8b){return _[_0x228f('0x99')](_0x21efb1,_0x437b8b);});if(_0x3c83e1){return _0x57b1d6['id'];}}}));}}return BPromise['all'](_0x45da1f)[_0x228f('0x2b')](function(_0x56d3ee){_0x3526b0=_(_0x3526b0)[_0x228f('0x9a')](_0x56d3ee)['compact']()['value']();return db['VoicePrefix']['find']({'where':{'id':_0x29201c['params']['id']}})[_0x228f('0x2b')](function(_0x24a8ae){return db[_0x228f('0x53')][_0x228f('0x54')](function(_0x298c83){return _0x24a8ae[_0x228f('0x9b')](_0x29201c[_0x228f('0x39')][_0x228f('0x75')],{'transaction':_0x298c83})[_0x228f('0x2b')](function(){if(!_['isEmpty'](_0x3526b0)){return _0x24a8ae[_0x228f('0x79')](_0x3526b0,{'transaction':_0x298c83});}})['then'](function(){_0x3526b0[_0x228f('0x8c')](function(_0x5830f7){socket['emit'](_0x228f('0x9c'),{'UserId':_0x5830f7,'VoicePrefixId':_0x24a8ae['id']});});});});});});})[_0x228f('0x2b')](respondWithStatusCode(_0x207d64,null))[_0x228f('0x4b')](handleError(_0x207d64,null));};
\ No newline at end of file
+var _0xb03e=['from','team_has_voice_prefixes','join','user_has_teams','clone','toString','SELECT','every','TeamId','all','union','compact','value','isEmpty','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/advancedSearch','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','status','end','json','offset','undefined','limit','count','set','Content-Range','apply','reject','save','update','then','destroy','get','VoicePrefixes','error','stack','index','VoicePrefix','rawAttributes','fieldName','type','key','model','map','query','filters','intersection','attributes','length','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','VIRTUAL','name','options','includeAll','include','findAll','rows','catch','show','keys','fields','find','params','describe','create','sequelize','transaction','body','VoiceExtension','VoiceExtensionId','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','context','from-sip','app','system','Voice\x20Prefix\x20Extension','priority','prefix','NoOp','VoicePrefixId','Extensions\x20creation\x20failed','push','callerIdAll','Set','PREFIX-CALLERIDALL=','goto','${EXTEN:','charAt','system-','findById','addAgents','omit','ids','spread','emit','userVoicePrefix:save','removeAgents','isArray','userVoicePrefix:remove','getAgents','findOne','User','Team','getTeams','addTeams','Agents','online','flatMap','TeamVoicePrefix','upsert','each','findOrCreate','forEach','removeTeams','select','field','tq.TeamId'];(function(_0x4ee8f2,_0x3b3dd8){var _0x2c5675=function(_0x3387ab){while(--_0x3387ab){_0x4ee8f2['push'](_0x4ee8f2['shift']());}};_0x2c5675(++_0x3b3dd8);}(_0xb03e,0x1eb));var _0xeb03=function(_0x53e7ba,_0x29f614){_0x53e7ba=_0x53e7ba-0x0;var _0x99aafd=_0xb03e[_0x53e7ba];return _0x99aafd;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xeb03('0x0'));var zipdir=require(_0xeb03('0x1'));var jsonpatch=require(_0xeb03('0x2'));var rp=require(_0xeb03('0x3'));var moment=require(_0xeb03('0x4'));var BPromise=require(_0xeb03('0x5'));var Mustache=require(_0xeb03('0x6'));var util=require(_0xeb03('0x7'));var path=require(_0xeb03('0x8'));var sox=require(_0xeb03('0x9'));var csv=require(_0xeb03('0xa'));var ejs=require(_0xeb03('0xb'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xeb03('0xc'));var squel=require(_0xeb03('0xd'));var crypto=require(_0xeb03('0xe'));var jsforce=require(_0xeb03('0xf'));var deskjs=require(_0xeb03('0x10'));var toCsv=require(_0xeb03('0xa'));var querystring=require('querystring');var Papa=require(_0xeb03('0x11'));var Redis=require(_0xeb03('0x12'));var authService=require(_0xeb03('0x13'));var qs=require('../../components/parsers/qs');var as=require(_0xeb03('0x14'));var hardwareService=require('../../config/license/hardware');var logger=require(_0xeb03('0x15'))(_0xeb03('0x16'));var utils=require(_0xeb03('0x17'));var config=require(_0xeb03('0x18'));var licenseUtil=require(_0xeb03('0x19'));var db=require(_0xeb03('0x1a'))['db'];config[_0xeb03('0x1b')]=_[_0xeb03('0x1c')](config[_0xeb03('0x1b')],{'host':_0xeb03('0x1d'),'port':0x18eb});var socket=require(_0xeb03('0x1e'))(new Redis(config[_0xeb03('0x1b')]));require('./voicePrefix.socket')[_0xeb03('0x1f')](socket);function respondWithStatusCode(_0x100bef,_0x372c71){_0x372c71=_0x372c71||0xcc;return function(_0x33f9ba){if(_0x33f9ba){return _0x100bef['sendStatus'](_0x372c71);}return _0x100bef[_0xeb03('0x20')](_0x372c71)[_0xeb03('0x21')]();};}function respondWithResult(_0x3f26ef,_0x478989){_0x478989=_0x478989||0xc8;return function(_0x7ce874){if(_0x7ce874){return _0x3f26ef[_0xeb03('0x20')](_0x478989)[_0xeb03('0x22')](_0x7ce874);}};}function respondWithFilteredResult(_0x44716c,_0x42fa4e){return function(_0x1b4cbd){if(_0x1b4cbd){var _0x167a33=typeof _0x42fa4e[_0xeb03('0x23')]===_0xeb03('0x24')&&typeof _0x42fa4e[_0xeb03('0x25')]===_0xeb03('0x24');var _0x2c238d=_0x1b4cbd[_0xeb03('0x26')];var _0x19bddf=_0x167a33?0x0:_0x42fa4e['offset'];var _0x1bea3f=_0x167a33?_0x1b4cbd[_0xeb03('0x26')]:_0x42fa4e[_0xeb03('0x23')]+_0x42fa4e[_0xeb03('0x25')];var _0xe5a1c2;if(_0x1bea3f>=_0x2c238d){_0x1bea3f=_0x2c238d;_0xe5a1c2=0xc8;}else{_0xe5a1c2=0xce;}_0x44716c[_0xeb03('0x20')](_0xe5a1c2);return _0x44716c[_0xeb03('0x27')](_0xeb03('0x28'),_0x19bddf+'-'+_0x1bea3f+'/'+_0x2c238d)[_0xeb03('0x22')](_0x1b4cbd);}return null;};}function patchUpdates(_0x5a704b){return function(_0x712ac2){try{jsonpatch[_0xeb03('0x29')](_0x712ac2,_0x5a704b,!![]);}catch(_0x11ea85){return BPromise[_0xeb03('0x2a')](_0x11ea85);}return _0x712ac2[_0xeb03('0x2b')]();};}function saveUpdates(_0x5dcda3,_0x638353){return function(_0x406864){if(_0x406864){return _0x406864[_0xeb03('0x2c')](_0x5dcda3)[_0xeb03('0x2d')](function(_0x3f276a){return _0x3f276a;});}return null;};}function removeEntity(_0x119697,_0xb04f34){return function(_0x3f68f3){if(_0x3f68f3){return _0x3f68f3[_0xeb03('0x2e')]()['then'](function(){var _0x832372=_0x3f68f3[_0xeb03('0x2f')]({'plain':!![]});var _0x2683f9=_0xeb03('0x30');return db['UserProfileResource']['destroy']({'where':{'type':_0x2683f9,'resourceId':_0x832372['id']}})[_0xeb03('0x2d')](function(){return _0x3f68f3;});})['then'](function(){_0x119697[_0xeb03('0x20')](0xcc)[_0xeb03('0x21')]();});}};}function handleEntityNotFound(_0x160a37,_0x5db8bb){return function(_0xd4c8ec){if(!_0xd4c8ec){_0x160a37['sendStatus'](0x194);}return _0xd4c8ec;};}function handleError(_0x5cb729,_0x49e316){_0x49e316=_0x49e316||0x1f4;return function(_0x538d19){logger[_0xeb03('0x31')](_0x538d19[_0xeb03('0x32')]);if(_0x538d19['name']){delete _0x538d19['name'];}_0x5cb729['status'](_0x49e316)['send'](_0x538d19);};}exports[_0xeb03('0x33')]=function(_0x3655c3,_0x32aff7){var _0x2d2ddd={},_0x19fa35={},_0x5234dc={'count':0x0,'rows':[]};var _0x13efc6=_['map'](db[_0xeb03('0x34')][_0xeb03('0x35')],function(_0x19ceae){return{'name':_0x19ceae[_0xeb03('0x36')],'type':_0x19ceae[_0xeb03('0x37')][_0xeb03('0x38')]};});_0x19fa35[_0xeb03('0x39')]=_[_0xeb03('0x3a')](_0x13efc6,'name');_0x19fa35[_0xeb03('0x3b')]=_['keys'](_0x3655c3[_0xeb03('0x3b')]);_0x19fa35[_0xeb03('0x3c')]=_[_0xeb03('0x3d')](_0x19fa35[_0xeb03('0x39')],_0x19fa35[_0xeb03('0x3b')]);_0x2d2ddd[_0xeb03('0x3e')]=_['intersection'](_0x19fa35[_0xeb03('0x39')],qs['fields'](_0x3655c3['query']['fields']));_0x2d2ddd[_0xeb03('0x3e')]=_0x2d2ddd[_0xeb03('0x3e')][_0xeb03('0x3f')]?_0x2d2ddd[_0xeb03('0x3e')]:_0x19fa35[_0xeb03('0x39')];if(!_0x3655c3['query'][_0xeb03('0x40')](_0xeb03('0x41'))){_0x2d2ddd[_0xeb03('0x25')]=qs['limit'](_0x3655c3['query'][_0xeb03('0x25')]);_0x2d2ddd[_0xeb03('0x23')]=qs[_0xeb03('0x23')](_0x3655c3['query'][_0xeb03('0x23')]);}_0x2d2ddd[_0xeb03('0x42')]=qs['sort'](_0x3655c3['query'][_0xeb03('0x43')]);_0x2d2ddd[_0xeb03('0x44')]=qs['filters'](_[_0xeb03('0x45')](_0x3655c3[_0xeb03('0x3b')],_0x19fa35[_0xeb03('0x3c')]),_0x13efc6);if(_0x3655c3[_0xeb03('0x3b')][_0xeb03('0x46')]){_0x2d2ddd[_0xeb03('0x44')]=_[_0xeb03('0x47')](_0x2d2ddd[_0xeb03('0x44')],{'$or':_[_0xeb03('0x3a')](_0x13efc6,function(_0x286f48){if(_0x286f48[_0xeb03('0x37')]!==_0xeb03('0x48')){var _0x2a9348={};_0x2a9348[_0x286f48[_0xeb03('0x49')]]={'$like':'%'+_0x3655c3[_0xeb03('0x3b')][_0xeb03('0x46')]+'%'};return _0x2a9348;}})});}_0x2d2ddd=_[_0xeb03('0x47')]({},_0x2d2ddd,_0x3655c3[_0xeb03('0x4a')]);var _0x35e53d={'where':_0x2d2ddd[_0xeb03('0x44')]};return db[_0xeb03('0x34')][_0xeb03('0x26')](_0x35e53d)[_0xeb03('0x2d')](function(_0x5bb7d9){_0x5234dc['count']=_0x5bb7d9;if(_0x3655c3[_0xeb03('0x3b')][_0xeb03('0x4b')]){_0x2d2ddd[_0xeb03('0x4c')]=[{'all':!![]}];}return db[_0xeb03('0x34')][_0xeb03('0x4d')](_0x2d2ddd);})[_0xeb03('0x2d')](function(_0x103c78){_0x5234dc[_0xeb03('0x4e')]=_0x103c78;return _0x5234dc;})['then'](respondWithFilteredResult(_0x32aff7,_0x2d2ddd))[_0xeb03('0x4f')](handleError(_0x32aff7,null));};exports[_0xeb03('0x50')]=function(_0x275d4d,_0xe9dcb0){var _0x528c0f={'raw':![],'where':{'id':_0x275d4d['params']['id']}},_0x57f59e={};_0x57f59e[_0xeb03('0x39')]=_['keys'](db['VoicePrefix']['rawAttributes']);_0x57f59e[_0xeb03('0x3b')]=_[_0xeb03('0x51')](_0x275d4d[_0xeb03('0x3b')]);_0x57f59e[_0xeb03('0x3c')]=_[_0xeb03('0x3d')](_0x57f59e[_0xeb03('0x39')],_0x57f59e['query']);_0x528c0f[_0xeb03('0x3e')]=_['intersection'](_0x57f59e['model'],qs[_0xeb03('0x52')](_0x275d4d[_0xeb03('0x3b')][_0xeb03('0x52')]));_0x528c0f['attributes']=_0x528c0f[_0xeb03('0x3e')][_0xeb03('0x3f')]?_0x528c0f[_0xeb03('0x3e')]:_0x57f59e[_0xeb03('0x39')];if(_0x275d4d[_0xeb03('0x3b')]['includeAll']){_0x528c0f[_0xeb03('0x4c')]=[{'all':!![]}];}_0x528c0f=_['merge']({},_0x528c0f,_0x275d4d[_0xeb03('0x4a')]);return db[_0xeb03('0x34')][_0xeb03('0x53')](_0x528c0f)[_0xeb03('0x2d')](handleEntityNotFound(_0xe9dcb0,null))[_0xeb03('0x2d')](respondWithResult(_0xe9dcb0,null))[_0xeb03('0x4f')](handleError(_0xe9dcb0,null));};exports[_0xeb03('0x2e')]=function(_0x292319,_0x38c993){return db[_0xeb03('0x34')][_0xeb03('0x53')]({'where':{'id':_0x292319[_0xeb03('0x54')]['id']}})[_0xeb03('0x2d')](handleEntityNotFound(_0x38c993,null))[_0xeb03('0x2d')](removeEntity(_0x38c993,null))[_0xeb03('0x4f')](handleError(_0x38c993,null));};exports[_0xeb03('0x55')]=function(_0xf5c1ab,_0x79b7c6){return db[_0xeb03('0x34')][_0xeb03('0x55')]()[_0xeb03('0x2d')](respondWithResult(_0x79b7c6,null))[_0xeb03('0x4f')](handleError(_0x79b7c6,null));};exports[_0xeb03('0x56')]=function(_0x365520,_0x509d79){var _0x17112e;return db[_0xeb03('0x57')][_0xeb03('0x58')](function(_0x5405b4){return db[_0xeb03('0x34')][_0xeb03('0x56')](_0x365520[_0xeb03('0x59')],{'transaction':_0x5405b4})[_0xeb03('0x2d')](function(_0x103da5){_0x17112e=_0x103da5[_0xeb03('0x2f')]({'plain':!![]});return db[_0xeb03('0x5a')][_0xeb03('0x53')]({'where':{'id':_0x17112e[_0xeb03('0x5b')]},'raw':!![]})[_0xeb03('0x2d')](function(_0x46f52e){return createVoicePrefixExtensions(_0x17112e,_0x46f52e,_0x5405b4);});});})[_0xeb03('0x2d')](function(){var _0xf9beaf=_0x365520[_0xeb03('0x5c')]['get']({'plain':!![]});if(!_0xf9beaf)throw new Error(_0xeb03('0x5d'));if(_0xf9beaf[_0xeb03('0x5e')]===_0xeb03('0x5c')){var _0x259db7=_0x17112e;return db[_0xeb03('0x5f')][_0xeb03('0x53')]({'where':{'name':_0xeb03('0x30'),'userProfileId':_0xf9beaf[_0xeb03('0x60')]},'raw':!![]})[_0xeb03('0x2d')](function(_0x23406a){if(_0x23406a&&_0x23406a['autoAssociation']===0x0){return db[_0xeb03('0x61')][_0xeb03('0x56')]({'name':_0x259db7[_0xeb03('0x49')],'resourceId':_0x259db7['id'],'type':_0x23406a[_0xeb03('0x49')],'sectionId':_0x23406a['id']},{})['then'](function(){return _0x17112e;});}else{return _0x17112e;}})[_0xeb03('0x4f')](function(_0x68e1b7){logger[_0xeb03('0x31')](_0xeb03('0x62'),_0x68e1b7);throw _0x68e1b7;});}return _0x17112e;})[_0xeb03('0x2d')](respondWithResult(_0x509d79,null))['catch'](handleError(_0x509d79,null));};function Extension(_0x43efc3,_0x10beeb,_0x28e488,_0x5e1361){this[_0xeb03('0x63')]=_0xeb03('0x64');this['exten']=_0x43efc3;this[_0xeb03('0x65')]=_0x28e488;this[_0xeb03('0x37')]=_0xeb03('0x66');this['description']=_0xeb03('0x67');this[_0xeb03('0x68')]=_0x10beeb;this['appdata']=_0x5e1361;}function createVoicePrefixExtensions(_0x3eb482,_0xfeb8e2,_0x1972fb){return new BPromise(function(_0x3ac2de,_0x3963a7){var _0x38618e=new Extension(formatPrefixName(_0x3eb482[_0xeb03('0x69')]),0x1,_0xeb03('0x6a'),'Voice\x20Prefix');_0x38618e[_0xeb03('0x6b')]=_0x3eb482['id'];return db['VoiceExtension'][_0xeb03('0x56')](_0x38618e,{'transaction':_0x1972fb})[_0xeb03('0x2d')](function(_0x3a9518){var _0x59d0c7=_0x3a9518[_0xeb03('0x2f')]({'plain':!![]});var _0x1508f6=_[_0xeb03('0x3a')](addVoicePrefixExtensions(_0x3eb482,_0xfeb8e2),function(_0x467a9d){_0x467a9d['VoiceExtensionId']=_0x59d0c7['id'];_0x467a9d[_0xeb03('0x6b')]=_0x3eb482['id'];return _0x467a9d;});return db[_0xeb03('0x5a')]['bulkCreate'](_0x1508f6,{'transaction':_0x1972fb})['then'](function(_0x583518){if(!_0x583518){return _0x3963a7(_0xeb03('0x6c'));}else{return _0x3ac2de(_0x583518);}})[_0xeb03('0x4f')](function(_0x9148a6){return _0x3963a7(_0x9148a6);});});;});};function addVoicePrefixExtensions(_0x16ad3a,_0x3da5f4){var _0x461777=[];var _0x443fc9=formatPrefixName(_0x16ad3a[_0xeb03('0x69')]);_0x461777[_0xeb03('0x6d')](new Extension(_0x443fc9,0x2,'Set','CDR(prefix)='+_0x16ad3a[_0xeb03('0x49')]));if(_0x16ad3a[_0xeb03('0x6e')]){_0x461777['push'](new Extension(_0x443fc9,0x3,_0xeb03('0x6f'),_0xeb03('0x70')+_0x16ad3a[_0xeb03('0x6e')]));}else{_0x461777[_0xeb03('0x6d')](new Extension(_0x443fc9,0x3,'NoOp','No\x20callerid\x20available'));}_0x461777[_0xeb03('0x6d')](new Extension(_0x443fc9,0x4,_0xeb03('0x71'),_0x3da5f4[_0xeb03('0x63')]+','+_0xeb03('0x72')+(0x8+_0x16ad3a[_0xeb03('0x49')][_0xeb03('0x3f')])+'}'+','+0x1));return _0x461777;}function formatPrefixName(_0x1a8057){var _0x2ee5c1='_';for(var _0x2e67a4=0x0;_0x2e67a4<_0x1a8057[_0xeb03('0x3f')];_0x2e67a4++){if(_0x1a8057[_0xeb03('0x73')](_0x2e67a4)=='-'){_0x2ee5c1+=_0x1a8057['charAt'](_0x2e67a4);}else{_0x2ee5c1+='['+_0x1a8057['charAt'](_0x2e67a4)+']';}}_0x2ee5c1+='.';return _0x2ee5c1;}exports[_0xeb03('0x2c')]=function(_0x4e52a4,_0x1099ff,_0x4cf4f1){var _0x30623a=_0x4e52a4['body'];_0x30623a[_0xeb03('0x69')]=_0xeb03('0x74')+_0x30623a['name']+'-';return db[_0xeb03('0x57')]['transaction'](function(_0x45f0aa){return db['VoicePrefix'][_0xeb03('0x2c')](_0x30623a,{'where':{'id':_0x30623a['id']},'transaction':_0x45f0aa})['then'](function(){return db['VoiceExtension'][_0xeb03('0x2e')]({'where':{'VoicePrefixId':_0x30623a['id']},'transaction':_0x45f0aa})[_0xeb03('0x2d')](function(){return db[_0xeb03('0x5a')][_0xeb03('0x53')]({'where':{'id':_0x30623a[_0xeb03('0x5b')]},'raw':!![]})[_0xeb03('0x2d')](function(_0x39c15d){return createVoicePrefixExtensions(_0x30623a,_0x39c15d,_0x45f0aa);});});});})['then'](function(){return db[_0xeb03('0x34')][_0xeb03('0x75')](_0x30623a['id']);})[_0xeb03('0x2d')](respondWithResult(_0x1099ff,null))[_0xeb03('0x4f')](handleError(_0x1099ff,null));};exports[_0xeb03('0x76')]=function(_0x126a7f,_0x137a98,_0x4fff6e){return db[_0xeb03('0x34')][_0xeb03('0x53')]({'where':{'id':_0x126a7f[_0xeb03('0x54')]['id']}})[_0xeb03('0x2d')](handleEntityNotFound(_0x137a98,null))[_0xeb03('0x2d')](function(_0xcd7ab1){if(_0xcd7ab1){return _0xcd7ab1[_0xeb03('0x76')](_0x126a7f[_0xeb03('0x59')]['ids'],_[_0xeb03('0x77')](_0x126a7f[_0xeb03('0x59')],[_0xeb03('0x78'),'id'])||{})[_0xeb03('0x79')](function(_0x17c010){for(var _0x5ace77=0x0;_0x5ace77<_0x126a7f[_0xeb03('0x59')][_0xeb03('0x78')][_0xeb03('0x3f')];_0x5ace77+=0x1){socket[_0xeb03('0x7a')](_0xeb03('0x7b'),{'UserId':Number(_0x126a7f[_0xeb03('0x59')][_0xeb03('0x78')][_0x5ace77]),'VoicePrefixId':Number(_0x126a7f['params']['id'])});}return _0x17c010;});}})[_0xeb03('0x2d')](respondWithResult(_0x137a98,null))[_0xeb03('0x4f')](handleError(_0x137a98,null));};exports[_0xeb03('0x7c')]=function(_0x21dfab,_0x396329,_0x48dc21){return db[_0xeb03('0x34')][_0xeb03('0x53')]({'where':{'id':_0x21dfab[_0xeb03('0x54')]['id']}})[_0xeb03('0x2d')](handleEntityNotFound(_0x396329,null))[_0xeb03('0x2d')](function(_0x215759){if(_0x215759){return _0x215759[_0xeb03('0x7c')](_0x21dfab['query'][_0xeb03('0x78')])[_0xeb03('0x2d')](function(){if(_[_0xeb03('0x7d')](_0x21dfab[_0xeb03('0x3b')][_0xeb03('0x78')])){for(var _0x388fbd=0x0;_0x388fbd<_0x21dfab['query'][_0xeb03('0x78')][_0xeb03('0x3f')];_0x388fbd+=0x1){socket[_0xeb03('0x7a')]('userVoicePrefix:remove',{'UserId':Number(_0x21dfab[_0xeb03('0x3b')][_0xeb03('0x78')][_0x388fbd]),'VoicePrefixId':Number(_0x21dfab[_0xeb03('0x54')]['id'])});}}else{socket[_0xeb03('0x7a')](_0xeb03('0x7e'),{'UserId':Number(_0x21dfab[_0xeb03('0x3b')][_0xeb03('0x78')]),'VoicePrefixId':Number(_0x21dfab['params']['id'])});}});}})['then'](respondWithStatusCode(_0x396329,null))[_0xeb03('0x4f')](handleError(_0x396329,null));};exports[_0xeb03('0x7f')]=function(_0x3630a7,_0xe55200,_0x511e5a){var _0x8ba377={};var _0x42c477={};var _0x5b60a4;var _0x45fd83;return db[_0xeb03('0x34')][_0xeb03('0x80')]({'where':{'id':_0x3630a7[_0xeb03('0x54')]['id']}})[_0xeb03('0x2d')](handleEntityNotFound(_0xe55200,null))[_0xeb03('0x2d')](function(_0x5ea593){if(_0x5ea593){_0x5b60a4=_0x5ea593;_0x42c477[_0xeb03('0x39')]=_[_0xeb03('0x51')](db[_0xeb03('0x81')][_0xeb03('0x35')]);_0x42c477[_0xeb03('0x3b')]=_[_0xeb03('0x51')](_0x3630a7[_0xeb03('0x3b')]);_0x42c477[_0xeb03('0x3c')]=_[_0xeb03('0x3d')](_0x42c477[_0xeb03('0x39')],_0x42c477['query']);_0x8ba377[_0xeb03('0x3e')]=_[_0xeb03('0x3d')](_0x42c477['model'],qs[_0xeb03('0x52')](_0x3630a7[_0xeb03('0x3b')]['fields']));_0x8ba377[_0xeb03('0x3e')]=_0x8ba377[_0xeb03('0x3e')][_0xeb03('0x3f')]?_0x8ba377[_0xeb03('0x3e')]:_0x42c477[_0xeb03('0x39')];_0x8ba377['order']=qs['sort'](_0x3630a7['query'][_0xeb03('0x43')]);_0x8ba377['where']=qs[_0xeb03('0x3c')](_[_0xeb03('0x45')](_0x3630a7[_0xeb03('0x3b')],_0x42c477[_0xeb03('0x3c')]));if(_0x3630a7[_0xeb03('0x3b')][_0xeb03('0x46')]){_0x8ba377[_0xeb03('0x44')]=_[_0xeb03('0x47')](_0x8ba377[_0xeb03('0x44')],{'$or':_[_0xeb03('0x3a')](_0x8ba377[_0xeb03('0x3e')],function(_0x27a388){var _0x4ec45c={};_0x4ec45c[_0x27a388]={'$like':'%'+_0x3630a7['query'][_0xeb03('0x46')]+'%'};return _0x4ec45c;})});}_0x8ba377=_['merge']({},_0x8ba377,_0x3630a7['options']);return _0x5b60a4[_0xeb03('0x7f')](_0x8ba377);}})[_0xeb03('0x2d')](function(_0x502b25){if(_0x502b25){_0x45fd83=_0x502b25['length'];if(!_0x3630a7[_0xeb03('0x3b')][_0xeb03('0x40')]('nolimit')){_0x8ba377[_0xeb03('0x25')]=qs[_0xeb03('0x25')](_0x3630a7[_0xeb03('0x3b')][_0xeb03('0x25')]);_0x8ba377[_0xeb03('0x23')]=qs['offset'](_0x3630a7[_0xeb03('0x3b')]['offset']);}return _0x5b60a4['getAgents'](_0x8ba377);}})[_0xeb03('0x2d')](function(_0x2d12eb){if(_0x2d12eb){return _0x2d12eb?{'count':_0x45fd83,'rows':_0x2d12eb}:null;}})[_0xeb03('0x2d')](respondWithResult(_0xe55200,null))[_0xeb03('0x4f')](handleError(_0xe55200,null));};exports['getTeams']=function(_0x4b59f4,_0xf9f2d3,_0x847253){var _0x70343f={};var _0x2d6225={};var _0x388642;var _0x3dc483;return db[_0xeb03('0x34')][_0xeb03('0x80')]({'where':{'id':_0x4b59f4['params']['id']}})['then'](handleEntityNotFound(_0xf9f2d3,null))[_0xeb03('0x2d')](function(_0x5741d4){if(_0x5741d4){_0x388642=_0x5741d4;_0x2d6225[_0xeb03('0x39')]=_['keys'](db[_0xeb03('0x82')][_0xeb03('0x35')]);_0x2d6225[_0xeb03('0x3b')]=_[_0xeb03('0x51')](_0x4b59f4[_0xeb03('0x3b')]);_0x2d6225[_0xeb03('0x3c')]=_[_0xeb03('0x3d')](_0x2d6225[_0xeb03('0x39')],_0x2d6225['query']);_0x70343f['attributes']=_[_0xeb03('0x3d')](_0x2d6225[_0xeb03('0x39')],qs[_0xeb03('0x52')](_0x4b59f4[_0xeb03('0x3b')][_0xeb03('0x52')]));_0x70343f['attributes']=_0x70343f[_0xeb03('0x3e')][_0xeb03('0x3f')]?_0x70343f['attributes']:_0x2d6225[_0xeb03('0x39')];_0x70343f[_0xeb03('0x42')]=qs[_0xeb03('0x43')](_0x4b59f4[_0xeb03('0x3b')][_0xeb03('0x43')]);_0x70343f[_0xeb03('0x44')]=qs[_0xeb03('0x3c')](_[_0xeb03('0x45')](_0x4b59f4[_0xeb03('0x3b')],_0x2d6225[_0xeb03('0x3c')]));if(_0x4b59f4[_0xeb03('0x3b')][_0xeb03('0x46')]){_0x70343f[_0xeb03('0x44')]=_[_0xeb03('0x47')](_0x70343f['where'],{'$or':_[_0xeb03('0x3a')](_0x70343f[_0xeb03('0x3e')],function(_0x4c6b85){var _0x1f3ee1={};_0x1f3ee1[_0x4c6b85]={'$like':'%'+_0x4b59f4['query'][_0xeb03('0x46')]+'%'};return _0x1f3ee1;})});}_0x70343f=_['merge']({},_0x70343f,_0x4b59f4[_0xeb03('0x4a')]);return _0x388642[_0xeb03('0x83')](_0x70343f);}})[_0xeb03('0x2d')](function(_0x1df994){if(_0x1df994){_0x3dc483=_0x1df994[_0xeb03('0x3f')];if(!_0x4b59f4[_0xeb03('0x3b')][_0xeb03('0x40')](_0xeb03('0x41'))){_0x70343f['limit']=qs[_0xeb03('0x25')](_0x4b59f4[_0xeb03('0x3b')][_0xeb03('0x25')]);_0x70343f[_0xeb03('0x23')]=qs['offset'](_0x4b59f4[_0xeb03('0x3b')]['offset']);}return _0x388642[_0xeb03('0x83')](_0x70343f);}})[_0xeb03('0x2d')](function(_0x423ddd){if(_0x423ddd){return _0x423ddd?{'count':_0x3dc483,'rows':_0x423ddd}:null;}})[_0xeb03('0x2d')](respondWithResult(_0xf9f2d3,null))['catch'](handleError(_0xf9f2d3,null));};exports[_0xeb03('0x84')]=function(_0x473d63,_0x1fc15a,_0x45f4d3){var _0x5095a6=_0x473d63[_0xeb03('0x59')]['ids'];var _0x4e0fd8;return db['Team'][_0xeb03('0x4d')]({'where':{'id':_0x5095a6},'attributes':['id'],'include':[{'model':db['User'],'as':_0xeb03('0x85'),'attributes':['id',_0xeb03('0x49'),_0xeb03('0x86'),'voicePause','interface'],'raw':!![]}]})['then'](function(_0x50b2c5){if(_0x50b2c5){_0x4e0fd8=_0x50b2c5;var _0x5c7f6e=_[_0xeb03('0x87')](_0x50b2c5,function(_0x392aaa){var _0x117c5e=_0x392aaa[_0xeb03('0x2f')]({'plain':!![]});return _0x117c5e[_0xeb03('0x85')];});return db[_0xeb03('0x34')]['find']({'where':{'id':_0x473d63[_0xeb03('0x54')]['id']}})[_0xeb03('0x2d')](function(_0x2d8bca){return db[_0xeb03('0x57')]['transaction'](function(_0x5c49c9){return _0x2d8bca[_0xeb03('0x84')](_0x5095a6,{'transaction':_0x5c49c9})[_0xeb03('0x2d')](function(){return BPromise['each'](_0x4e0fd8,function(_0xc7a504){return db[_0xeb03('0x88')][_0xeb03('0x89')]({'TeamId':_0xc7a504['id'],'VoicePrefixId':_0x473d63[_0xeb03('0x54')]['id']},{'transaction':_0x5c49c9});});})[_0xeb03('0x2d')](function(){return BPromise[_0xeb03('0x8a')](_0x5c7f6e,function(_0x11cc99){return db['UserVoicePrefix'][_0xeb03('0x8b')]({'where':{'UserId':_0x11cc99['id'],'VoicePrefixId':_0x473d63[_0xeb03('0x54')]['id']},'transaction':_0x5c49c9});});})[_0xeb03('0x2d')](function(){_0x5c7f6e[_0xeb03('0x8c')](function(_0x1f2ebe){socket[_0xeb03('0x7a')](_0xeb03('0x7b'),{'UserId':_0x1f2ebe['id'],'VoicePrefixId':_0x2d8bca['id']});});});});});}})[_0xeb03('0x2d')](respondWithStatusCode(_0x1fc15a,null))['catch'](handleError(_0x1fc15a,null));};exports[_0xeb03('0x8d')]=function(_0x5e0e2b,_0x497a5b,_0x188d39){return db[_0xeb03('0x82')]['findAll']({'where':{'id':_0x5e0e2b[_0xeb03('0x3b')]['ids']},'attributes':['id'],'include':[{'model':db[_0xeb03('0x81')],'as':'Agents','attributes':['id'],'raw':!![]}]})[_0xeb03('0x2d')](handleEntityNotFound(_0x497a5b,null))[_0xeb03('0x2d')](function(_0xd6f37b){var _0x1522d4=_[_0xeb03('0x3a')](_0xd6f37b,'id');var _0x47b648=[];var _0x15a726=[];var _0x226569=squel[_0xeb03('0x8e')]();_0x226569[_0xeb03('0x8f')](_0xeb03('0x90'))[_0xeb03('0x91')](_0xeb03('0x92'),'tq')[_0xeb03('0x93')](_0xeb03('0x94'),'ut','ut.TeamId\x20=\x20tq.TeamId')['where']('VoicePrefixId\x20=\x20?',_0x5e0e2b[_0xeb03('0x54')]['id']);for(var _0x40a6ce=0x0;_0x40a6ce<_0xd6f37b[_0xeb03('0x3f')];_0x40a6ce+=0x1){let _0x2f640d=_0xd6f37b[_0x40a6ce];for(var _0x546ebe=0x0;_0x546ebe<_0x2f640d['Agents']['length'];_0x546ebe+=0x1){let _0x3d861f=_0x2f640d[_0xeb03('0x85')][_0x546ebe];var _0x2c89c4=_0x226569[_0xeb03('0x95')]();_0x2c89c4[_0xeb03('0x44')]('ut.UserId\x20=\x20?',_0x3d861f['id']);_0x15a726[_0xeb03('0x6d')](db[_0xeb03('0x57')]['query'](_0x2c89c4[_0xeb03('0x96')](),{'type':db['sequelize']['QueryTypes'][_0xeb03('0x97')]})[_0xeb03('0x2d')](function(_0x123742){if(_0x123742['length']===0x1){return _0x3d861f['id'];}else{var _0x243689=_[_0xeb03('0x98')](_['map'](_0x123742,_0xeb03('0x99')),function(_0x5eb15a){return _['includes'](_0x1522d4,_0x5eb15a);});if(_0x243689){return _0x3d861f['id'];}}}));}}return BPromise[_0xeb03('0x9a')](_0x15a726)[_0xeb03('0x2d')](function(_0x366054){_0x47b648=_(_0x47b648)[_0xeb03('0x9b')](_0x366054)[_0xeb03('0x9c')]()[_0xeb03('0x9d')]();return db['VoicePrefix'][_0xeb03('0x53')]({'where':{'id':_0x5e0e2b[_0xeb03('0x54')]['id']}})[_0xeb03('0x2d')](function(_0x1f0387){return db[_0xeb03('0x57')][_0xeb03('0x58')](function(_0xf0d912){return _0x1f0387[_0xeb03('0x8d')](_0x5e0e2b[_0xeb03('0x3b')][_0xeb03('0x78')],{'transaction':_0xf0d912})[_0xeb03('0x2d')](function(){if(!_[_0xeb03('0x9e')](_0x47b648)){return _0x1f0387[_0xeb03('0x7c')](_0x47b648,{'transaction':_0xf0d912});}})[_0xeb03('0x2d')](function(){_0x47b648[_0xeb03('0x8c')](function(_0x1a0bb5){socket[_0xeb03('0x7a')](_0xeb03('0x7e'),{'UserId':_0x1a0bb5,'VoicePrefixId':_0x1f0387['id']});});});});});});})[_0xeb03('0x2d')](respondWithStatusCode(_0x497a5b,null))[_0xeb03('0x4f')](handleError(_0x497a5b,null));};
\ No newline at end of file
index dff27f9..f43d49b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdebb=['hook','exports','../../mysqldb','VoicePrefix','setMaxListeners','save','remove','emit','hasOwnProperty'];(function(_0x5360b3,_0x23f19c){var _0xd28f39=function(_0x57d512){while(--_0x57d512){_0x5360b3['push'](_0x5360b3['shift']());}};_0xd28f39(++_0x23f19c);}(_0xdebb,0x1f1));var _0xbdeb=function(_0x5d31d6,_0xce7a0f){_0x5d31d6=_0x5d31d6-0x0;var _0x2f0387=_0xdebb[_0x5d31d6];return _0x2f0387;};'use strict';var EventEmitter=require('events');var VoicePrefix=require(_0xbdeb('0x0'))['db'][_0xbdeb('0x1')];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents[_0xbdeb('0x2')](0x0);var events={'afterCreate':_0xbdeb('0x3'),'afterUpdate':'update','afterDestroy':_0xbdeb('0x4')};function emitEvent(_0x3946ba){return function(_0x4bf84c,_0x7678ed,_0x3918fb){VoicePrefixEvents[_0xbdeb('0x5')](_0x3946ba+':'+_0x4bf84c['id'],_0x4bf84c);VoicePrefixEvents['emit'](_0x3946ba,_0x4bf84c);_0x3918fb(null);};}for(var e in events){if(events[_0xbdeb('0x6')](e)){var event=events[e];VoicePrefix[_0xbdeb('0x7')](e,emitEvent(event));}}module[_0xbdeb('0x8')]=VoicePrefixEvents;
\ No newline at end of file
+var _0x19ff=['hasOwnProperty','hook','exports','events','../../mysqldb','save','update','emit'];(function(_0xcf323,_0x34c2d3){var _0x1cfa63=function(_0x3a99f7){while(--_0x3a99f7){_0xcf323['push'](_0xcf323['shift']());}};_0x1cfa63(++_0x34c2d3);}(_0x19ff,0xb3));var _0xf19f=function(_0x94a089,_0x3ee538){_0x94a089=_0x94a089-0x0;var _0x14c0c6=_0x19ff[_0x94a089];return _0x14c0c6;};'use strict';var EventEmitter=require(_0xf19f('0x0'));var VoicePrefix=require(_0xf19f('0x1'))['db']['VoicePrefix'];var VoicePrefixEvents=new EventEmitter();VoicePrefixEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xf19f('0x2'),'afterUpdate':_0xf19f('0x3'),'afterDestroy':'remove'};function emitEvent(_0x26aaf7){return function(_0x458c6d,_0x25cab2,_0x24775f){VoicePrefixEvents[_0xf19f('0x4')](_0x26aaf7+':'+_0x458c6d['id'],_0x458c6d);VoicePrefixEvents[_0xf19f('0x4')](_0x26aaf7,_0x458c6d);_0x24775f(null);};}for(var e in events){if(events[_0xf19f('0x5')](e)){var event=events[e];VoicePrefix[_0xf19f('0x6')](e,emitEvent(event));}}module[_0xf19f('0x7')]=VoicePrefixEvents;
\ No newline at end of file
index b3a48da..f726a91 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8b84=['exports','define','VoicePrefix','voice_prefixes','lodash','util','moment','bluebird','rimraf','../../config/environment','./voicePrefix.attributes'];(function(_0x937b4c,_0x23bbf7){var _0x43bc05=function(_0x4f83d4){while(--_0x4f83d4){_0x937b4c['push'](_0x937b4c['shift']());}};_0x43bc05(++_0x23bbf7);}(_0x8b84,0x88));var _0x48b8=function(_0x311c35,_0x534915){_0x311c35=_0x311c35-0x0;var _0x5cc50c=_0x8b84[_0x311c35];return _0x5cc50c;};'use strict';var _=require(_0x48b8('0x0'));var util=require(_0x48b8('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x48b8('0x2'));var BPromise=require(_0x48b8('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x48b8('0x4'));var config=require(_0x48b8('0x5'));var attributes=require(_0x48b8('0x6'));module[_0x48b8('0x7')]=function(_0x19bed0,_0x348bba){return _0x19bed0[_0x48b8('0x8')](_0x48b8('0x9'),attributes,{'tableName':_0x48b8('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0xc804=['VoicePrefix','voice_prefixes','lodash','api','request-promise','rimraf','./voicePrefix.attributes','exports','define'];(function(_0x4a0c01,_0x189914){var _0x4e1e40=function(_0x208b5e){while(--_0x208b5e){_0x4a0c01['push'](_0x4a0c01['shift']());}};_0x4e1e40(++_0x189914);}(_0xc804,0x1d6));var _0x4c80=function(_0x424782,_0x4e0177){_0x424782=_0x424782-0x0;var _0x172c35=_0xc804[_0x424782];return _0x172c35;};'use strict';var _=require(_0x4c80('0x0'));var util=require('util');var logger=require('../../config/logger')(_0x4c80('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x4c80('0x2'));var fs=require('fs');var path=require('path');var rimraf=require(_0x4c80('0x3'));var config=require('../../config/environment');var attributes=require(_0x4c80('0x4'));module[_0x4c80('0x5')]=function(_0x728b03,_0x33af72){return _0x728b03[_0x4c80('0x6')](_0x4c80('0x7'),attributes,{'tableName':_0x4c80('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index c8c976b..0750b72 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xef66=['util','moment','bluebird','randomstring','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','socket.io-emitter','./voicePrefix.socket','register','request','info','VoicePrefix,\x20%s,\x20%s','request\x20sent','VoicePrefix,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash'];(function(_0x337748,_0x402b05){var _0x3bb03f=function(_0x2fcdf4){while(--_0x2fcdf4){_0x337748['push'](_0x337748['shift']());}};_0x3bb03f(++_0x402b05);}(_0xef66,0x1db));var _0x6ef6=function(_0x49f0b1,_0x30ef17){_0x49f0b1=_0x49f0b1-0x0;var _0x8206d1=_0xef66[_0x49f0b1];return _0x8206d1;};'use strict';var _=require(_0x6ef6('0x0'));var util=require(_0x6ef6('0x1'));var moment=require(_0x6ef6('0x2'));var BPromise=require(_0x6ef6('0x3'));var rs=require(_0x6ef6('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require(_0x6ef6('0x5'));var logger=require(_0x6ef6('0x6'))(_0x6ef6('0x7'));var config=require(_0x6ef6('0x8'));var jayson=require(_0x6ef6('0x9'));var client=jayson[_0x6ef6('0xa')][_0x6ef6('0xb')]({'port':0x232a});config[_0x6ef6('0xc')]=_[_0x6ef6('0xd')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x6ef6('0xe'))(new Redis(config[_0x6ef6('0xc')]));require(_0x6ef6('0xf'))[_0x6ef6('0x10')](socket);function respondWithRpcPromise(_0xc0ace,_0x49fed5,_0x1c719e){return new BPromise(function(_0x4bf459,_0x53db5e){return client[_0x6ef6('0x11')](_0xc0ace,_0x1c719e)['then'](function(_0x107bb4){logger[_0x6ef6('0x12')](_0x6ef6('0x13'),_0x49fed5,_0x6ef6('0x14'));logger['debug'](_0x6ef6('0x15'),_0x49fed5,_0x6ef6('0x14'),JSON[_0x6ef6('0x16')](_0x107bb4));if(_0x107bb4[_0x6ef6('0x17')]){if(_0x107bb4['error'][_0x6ef6('0x18')]===0x1f4){logger['error'](_0x6ef6('0x13'),_0x49fed5,_0x107bb4[_0x6ef6('0x17')]['message']);return _0x53db5e(_0x107bb4[_0x6ef6('0x17')][_0x6ef6('0x19')]);}logger[_0x6ef6('0x17')](_0x6ef6('0x13'),_0x49fed5,_0x107bb4[_0x6ef6('0x17')][_0x6ef6('0x19')]);return _0x4bf459(_0x107bb4[_0x6ef6('0x17')][_0x6ef6('0x19')]);}else{logger[_0x6ef6('0x12')](_0x6ef6('0x13'),_0x49fed5,'request\x20sent');_0x4bf459(_0x107bb4[_0x6ef6('0x1a')][_0x6ef6('0x19')]);}})[_0x6ef6('0x1b')](function(_0x37d2ef){logger[_0x6ef6('0x17')](_0x6ef6('0x13'),_0x49fed5,_0x37d2ef);_0x53db5e(_0x37d2ef);});});}
\ No newline at end of file
+var _0x5430=['moment','bluebird','randomstring','ioredis','../../config/logger','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./voicePrefix.socket','register','request','then','info','VoicePrefix,\x20%s,\x20%s','request\x20sent','debug','VoicePrefix,\x20%s,\x20%s,\x20%s','stringify','error','message','result','lodash','util'];(function(_0x52006f,_0x35cfdf){var _0x441eff=function(_0x218eb2){while(--_0x218eb2){_0x52006f['push'](_0x52006f['shift']());}};_0x441eff(++_0x35cfdf);}(_0x5430,0x10c));var _0x0543=function(_0x2706c2,_0x13a213){_0x2706c2=_0x2706c2-0x0;var _0x350d74=_0x5430[_0x2706c2];return _0x350d74;};'use strict';var _=require(_0x0543('0x0'));var util=require(_0x0543('0x1'));var moment=require(_0x0543('0x2'));var BPromise=require(_0x0543('0x3'));var rs=require(_0x0543('0x4'));var fs=require('fs');var Redis=require(_0x0543('0x5'));var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x0543('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0x0543('0x7'));var client=jayson[_0x0543('0x8')][_0x0543('0x9')]({'port':0x232a});config[_0x0543('0xa')]=_[_0x0543('0xb')](config['redis'],{'host':_0x0543('0xc'),'port':0x18eb});var socket=require(_0x0543('0xd'))(new Redis(config[_0x0543('0xa')]));require(_0x0543('0xe'))[_0x0543('0xf')](socket);function respondWithRpcPromise(_0x94b9e7,_0x56003c,_0x1ed7cc){return new BPromise(function(_0x1ac048,_0x52c9b7){return client[_0x0543('0x10')](_0x94b9e7,_0x1ed7cc)[_0x0543('0x11')](function(_0x2bb810){logger[_0x0543('0x12')](_0x0543('0x13'),_0x56003c,_0x0543('0x14'));logger[_0x0543('0x15')](_0x0543('0x16'),_0x56003c,_0x0543('0x14'),JSON[_0x0543('0x17')](_0x2bb810));if(_0x2bb810[_0x0543('0x18')]){if(_0x2bb810[_0x0543('0x18')]['code']===0x1f4){logger[_0x0543('0x18')](_0x0543('0x13'),_0x56003c,_0x2bb810['error']['message']);return _0x52c9b7(_0x2bb810[_0x0543('0x18')][_0x0543('0x19')]);}logger[_0x0543('0x18')](_0x0543('0x13'),_0x56003c,_0x2bb810[_0x0543('0x18')]['message']);return _0x1ac048(_0x2bb810[_0x0543('0x18')][_0x0543('0x19')]);}else{logger[_0x0543('0x12')](_0x0543('0x13'),_0x56003c,_0x0543('0x14'));_0x1ac048(_0x2bb810[_0x0543('0x1a')][_0x0543('0x19')]);}})['catch'](function(_0x37b084){logger['error']('VoicePrefix,\x20%s,\x20%s',_0x56003c,_0x37b084);_0x52c9b7(_0x37b084);});});}
\ No newline at end of file
index c393cbe..0f5b867 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5106=['removeListener','register','./voicePrefix.events','remove'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0x5106,0x116));var _0x6510=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x5106[_0x321bb2];return _0x9c12ed;};'use strict';var VoicePrefixEvents=require(_0x6510('0x0'));var events=['save',_0x6510('0x1'),'update'];function createListener(_0x183717,_0x4b0419){return function(_0x579fe8){_0x4b0419['emit'](_0x183717,_0x579fe8);};}function removeListener(_0x25620c,_0x4465c2){return function(){VoicePrefixEvents[_0x6510('0x2')](_0x25620c,_0x4465c2);};}exports[_0x6510('0x3')]=function(_0x28cb6e){for(var _0x2f5cb3=0x0,_0x485cfa=events['length'];_0x2f5cb3<_0x485cfa;_0x2f5cb3++){var _0x57164e=events[_0x2f5cb3];var _0x226e1a=createListener('voicePrefix:'+_0x57164e,_0x28cb6e);VoicePrefixEvents['on'](_0x57164e,_0x226e1a);}};
\ No newline at end of file
+var _0xfd3a=['save','remove','update','emit','removeListener','length','./voicePrefix.events'];(function(_0x3047dd,_0x350bc9){var _0x2729e2=function(_0x2a5d17){while(--_0x2a5d17){_0x3047dd['push'](_0x3047dd['shift']());}};_0x2729e2(++_0x350bc9);}(_0xfd3a,0x179));var _0xafd3=function(_0x32d76b,_0x1c412b){_0x32d76b=_0x32d76b-0x0;var _0x3923e2=_0xfd3a[_0x32d76b];return _0x3923e2;};'use strict';var VoicePrefixEvents=require(_0xafd3('0x0'));var events=[_0xafd3('0x1'),_0xafd3('0x2'),_0xafd3('0x3')];function createListener(_0x4ce05e,_0x488608){return function(_0x160b0d){_0x488608[_0xafd3('0x4')](_0x4ce05e,_0x160b0d);};}function removeListener(_0x328118,_0x415217){return function(){VoicePrefixEvents[_0xafd3('0x5')](_0x328118,_0x415217);};}exports['register']=function(_0x9db715){for(var _0x1a72eb=0x0,_0x1f7e16=events[_0xafd3('0x6')];_0x1a72eb<_0x1f7e16;_0x1a72eb++){var _0xd2d780=events[_0x1a72eb];var _0x4c4dcd=createListener('voicePrefix:'+_0xd2d780,_0x9db715);VoicePrefixEvents['on'](_0xd2d780,_0x4c4dcd);}};
\ No newline at end of file
index 380db5e..56be963 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['addAgents','/:id/blacklists','addBlackLists','update','delete','destroy','removeTeams','removeAgents','removeLists','removeBlackLists','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueue.controller','get','index','/:id','getHoppers','/:id/hopper_histories','isAuthenticated','getHopperHistories','/:id/hopper_black','getHopperBlacks','/:id/teams','/:id/users','getAgents','/:id/members','getMembers','/:id/lists','getLists','post','create','/:id/clone','clone','addTeams'];(function(_0x104eff,_0x39461c){var _0x4bdd79=function(_0x1d6fa9){while(--_0x1d6fa9){_0x104eff['push'](_0x104eff['shift']());}};_0x4bdd79(++_0x39461c);}(_0xa9e0,0x123));var _0x0a9e=function(_0x387777,_0x356171){_0x387777=_0x387777-0x0;var _0x3f84c0=_0xa9e0[_0x387777];return _0x3f84c0;};'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('0x8')]('/:id/hoppers',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0x8')]('/:id/hopper_finals',auth['isAuthenticated'](),controller['getHopperFinals']);router['get'](_0x0a9e('0xf'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x8')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller['getTeams']);router[_0x0a9e('0x8')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router[_0x0a9e('0x8')](_0x0a9e('0x14'),auth['isAuthenticated'](),controller[_0x0a9e('0x15')]);router['get'](_0x0a9e('0x16'),auth['isAuthenticated'](),controller[_0x0a9e('0x17')]);router[_0x0a9e('0x8')]('/:id/blacklists',auth[_0x0a9e('0xd')](),controller['getBlackLists']);router[_0x0a9e('0x18')]('/',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x19')]);router[_0x0a9e('0x18')](_0x0a9e('0x1a'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1b')]);router[_0x0a9e('0x18')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1c')]);router[_0x0a9e('0x18')]('/:id/users',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1d')]);router['post'](_0x0a9e('0x16'),auth['isAuthenticated'](),controller['addLists']);router[_0x0a9e('0x18')](_0x0a9e('0x1e'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1f')]);router['put'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x20')]);router[_0x0a9e('0x21')](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x22')]);router['delete']('/:id/teams',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x23')]);router[_0x0a9e('0x21')](_0x0a9e('0x12'),auth['isAuthenticated'](),controller[_0x0a9e('0x24')]);router['delete'](_0x0a9e('0x16'),auth['isAuthenticated'](),controller[_0x0a9e('0x25')]);router[_0x0a9e('0x21')](_0x0a9e('0x1e'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x26')]);module[_0x0a9e('0x27')]=router;
\ No newline at end of file
+var _0xa9e0=['addAgents','/:id/blacklists','addBlackLists','update','delete','destroy','removeTeams','removeAgents','removeLists','removeBlackLists','exports','multer','util','path','Router','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueue.controller','get','index','/:id','getHoppers','/:id/hopper_histories','isAuthenticated','getHopperHistories','/:id/hopper_black','getHopperBlacks','/:id/teams','/:id/users','getAgents','/:id/members','getMembers','/:id/lists','getLists','post','create','/:id/clone','clone','addTeams'];(function(_0x3aa28f,_0x13242c){var _0x325b0d=function(_0xb5b73a){while(--_0xb5b73a){_0x3aa28f['push'](_0x3aa28f['shift']());}};_0x325b0d(++_0x13242c);}(_0xa9e0,0x123));var _0x0a9e=function(_0x12d033,_0x25fa2f){_0x12d033=_0x12d033-0x0;var _0x3b4e80=_0xa9e0[_0x12d033];return _0x3b4e80;};'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('0x8')]('/:id/hoppers',auth['isAuthenticated'](),controller[_0x0a9e('0xb')]);router[_0x0a9e('0x8')](_0x0a9e('0xc'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0xe')]);router[_0x0a9e('0x8')]('/:id/hopper_finals',auth['isAuthenticated'](),controller['getHopperFinals']);router['get'](_0x0a9e('0xf'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x10')]);router[_0x0a9e('0x8')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller['getTeams']);router[_0x0a9e('0x8')](_0x0a9e('0x12'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x13')]);router[_0x0a9e('0x8')](_0x0a9e('0x14'),auth['isAuthenticated'](),controller[_0x0a9e('0x15')]);router['get'](_0x0a9e('0x16'),auth['isAuthenticated'](),controller[_0x0a9e('0x17')]);router[_0x0a9e('0x8')]('/:id/blacklists',auth[_0x0a9e('0xd')](),controller['getBlackLists']);router[_0x0a9e('0x18')]('/',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x19')]);router[_0x0a9e('0x18')](_0x0a9e('0x1a'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1b')]);router[_0x0a9e('0x18')](_0x0a9e('0x11'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1c')]);router[_0x0a9e('0x18')]('/:id/users',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1d')]);router['post'](_0x0a9e('0x16'),auth['isAuthenticated'](),controller['addLists']);router[_0x0a9e('0x18')](_0x0a9e('0x1e'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x1f')]);router['put'](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x20')]);router[_0x0a9e('0x21')](_0x0a9e('0xa'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x22')]);router['delete']('/:id/teams',auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x23')]);router[_0x0a9e('0x21')](_0x0a9e('0x12'),auth['isAuthenticated'](),controller[_0x0a9e('0x24')]);router['delete'](_0x0a9e('0x16'),auth['isAuthenticated'](),controller[_0x0a9e('0x25')]);router[_0x0a9e('0x21')](_0x0a9e('0x1e'),auth[_0x0a9e('0xd')](),controller[_0x0a9e('0x26')]);module[_0x0a9e('0x27')]=router;
\ No newline at end of file
index 13d2d22..f83c1b6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf4f7=['type','getDataValue','dialMethod','preview','booked','roundrobin','includes','INTEGER','yes','all','once','TEXT','periodic_announce','join','split','joinempty','leavewhenempty','BOOLEAN','acw','wrapuptime','Active/Disactive\x20Campaign','progressive','power','predictive','Dial\x20Method.','UNSIGNED','Max\x209999\x20channels,\x200\x20means\x20unlimited.','Max\x209999\x20member\x20in\x20queue(min:1,\x20max:9999),\x200\x20means\x20unlimited.','FLOAT','Power\x20Level:\x20Calls\x20for\x20agents\x20(min:1,\x20max:10).','Predictive\x20Optimization\x20Percentage\x20(min:\x201,\x20max:\x2095)','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','tTxX','https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Queue','Queue\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,<project_name>)','#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)','#Global\x20Max\x20Retry\x20(min:1,\x20max:999)','07:00-22:00,*,*,*','always','never','onlyIfOpen','Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence','#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Min\x20Word\x20Length','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','#RecallMe\x20Timeout\x20(min:1)','Active/Disactive\x20Recall\x20In\x20Queue','ASC','DESC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','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\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','mandatoryDisposition','exports','STRING','name','ENUM','inbound','default','leastrecent','random','wrandom','setDataValue','strategy','rrmemory'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0xf4f7,0x1e6));var _0x7f4f=function(_0x5c4f6b,_0x2cdfce){_0x5c4f6b=_0x5c4f6b-0x0;var _0x104c4e=_0xf4f7[_0x5c4f6b];return _0x104c4e;};'use strict';var Sequelize=require('sequelize');module[_0x7f4f('0x0')]={'name':{'type':Sequelize[_0x7f4f('0x1')],'allowNull':![],'unique':_0x7f4f('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize[_0x7f4f('0x3')](_0x7f4f('0x4'),'outbound'),'allowNull':![],'defaultValue':'inbound'},'musiconhold':{'type':Sequelize[_0x7f4f('0x1')],'defaultValue':_0x7f4f('0x5')},'announce':{'type':Sequelize[_0x7f4f('0x1')],'defaultValue':''},'strategy':{'type':Sequelize[_0x7f4f('0x3')]('rr','ringall',_0x7f4f('0x6'),'fewestcalls',_0x7f4f('0x7'),'rrmemory','linear',_0x7f4f('0x8'),'rrordered'),'allowNull':![],'defaultValue':'ringall','set':function(_0x3a1296){this[_0x7f4f('0x9')](_0x7f4f('0xa'),_0x3a1296?_0x3a1296:_0x7f4f('0xb'));},'get':function(){var _0x97afe=this['getDataValue'](_0x7f4f('0xc'));var _0x201728=this[_0x7f4f('0xd')](_0x7f4f('0xe'));var _0x28f177=this[_0x7f4f('0xd')](_0x7f4f('0xa'));if(_0x97afe==='outbound'){if(_0x201728===_0x7f4f('0xf')){return null;}if(_0x201728===_0x7f4f('0x10')&&!['rrmemory',_0x7f4f('0x11')][_0x7f4f('0x12')](_0x28f177)){this['setDataValue'](_0x7f4f('0xa'),_0x7f4f('0xb'));}}return _0x28f177;}},'servicelevel':{'type':Sequelize[_0x7f4f('0x13')](0xb),'defaultValue':0x0},'context':{'type':Sequelize[_0x7f4f('0x1')],'defaultValue':null},'penaltymemberslimit':{'type':Sequelize[_0x7f4f('0x13')](0xb)},'timeout':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0xf},'retry':{'type':Sequelize[_0x7f4f('0x13')](0xb),'defaultValue':0x2},'timeoutpriority':{'type':Sequelize[_0x7f4f('0x1')]},'weight':{'type':Sequelize[_0x7f4f('0x13')](0xb),'allowNull':!![],'defaultValue':0x0},'wrapuptime':{'type':Sequelize[_0x7f4f('0x13')](0xb),'defaultValue':0x0},'autofill':{'type':Sequelize[_0x7f4f('0x3')](_0x7f4f('0x14'),'no'),'defaultValue':'yes'},'autopause':{'type':Sequelize[_0x7f4f('0x3')](_0x7f4f('0x14'),'no',_0x7f4f('0x15')),'defaultValue':'no'},'autopausedelay':{'type':Sequelize[_0x7f4f('0x13')](0xb)},'autopausebusy':{'type':Sequelize['ENUM'](_0x7f4f('0x14'),'no'),'defaultValue':'no'},'autopauseunavail':{'type':Sequelize[_0x7f4f('0x3')](_0x7f4f('0x14'),'no'),'defaultValue':'no'},'maxlen':{'type':Sequelize[_0x7f4f('0x13')](0xb),'defaultValue':0x0},'setinterfacevar':{'type':Sequelize[_0x7f4f('0x3')](_0x7f4f('0x14'),'no'),'defaultValue':'no'},'setqueueentryvar':{'type':Sequelize[_0x7f4f('0x3')]('yes','no'),'defautValue':'no'},'setqueuevar':{'type':Sequelize[_0x7f4f('0x3')](_0x7f4f('0x14'),'no'),'defaultValue':'no'},'eventmemberstatus':{'type':Sequelize[_0x7f4f('0x3')](_0x7f4f('0x14'),'no'),'defaultValue':'no'},'membermacro':{'type':Sequelize[_0x7f4f('0x1')],'allowNull':!![]},'membergosub':{'type':Sequelize['STRING'],'allowNull':!![]},'announce_frequency':{'type':Sequelize[_0x7f4f('0x13')](0xb),'defaultValue':0x0},'min_announce_frequency':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'periodic_announce_frequency':{'type':Sequelize[_0x7f4f('0x13')](0xb),'defaultValue':0x0},'random_periodic_announce':{'type':Sequelize[_0x7f4f('0x3')](_0x7f4f('0x14'),'no'),'defaultValue':'no'},'relative_periodic_announce':{'type':Sequelize[_0x7f4f('0x3')](_0x7f4f('0x14'),'no'),'defaultValue':'yes'},'announce_holdtime':{'type':Sequelize['ENUM'](_0x7f4f('0x14'),'no',_0x7f4f('0x16')),'defaultValue':'no'},'announce_position':{'type':Sequelize[_0x7f4f('0x1')],'defaultValue':'no'},'announce_to_first_user':{'type':Sequelize[_0x7f4f('0x3')]('yes','no')},'announce_position_limit':{'type':Sequelize[_0x7f4f('0x13')](0xb)},'announce_round_seconds':{'type':Sequelize[_0x7f4f('0x3')]('0','5','10','15','20','30'),'defaultValue':'0'},'monitor_format':{'type':Sequelize['STRING'],'defaultValue':''},'monitor_type':{'type':Sequelize[_0x7f4f('0x1')]},'queue_youarenext':{'type':Sequelize[_0x7f4f('0x1')],'defaultValue':null},'queue_thereare':{'type':Sequelize[_0x7f4f('0x1')],'defaultValue':null},'queue_callswaiting':{'type':Sequelize[_0x7f4f('0x1')],'defaultValue':null},'queue_holdtime':{'type':Sequelize[_0x7f4f('0x1')],'defaultValue':null},'queue_minute':{'type':Sequelize[_0x7f4f('0x1')],'allowNull':!![],'defaultValue':null},'queue_minutes':{'type':Sequelize[_0x7f4f('0x1')],'defaultValue':null},'queue_seconds':{'type':Sequelize[_0x7f4f('0x1')],'defaultValue':null},'queue_thankyou':{'type':Sequelize['STRING'],'defaultValue':null},'queue_reporthold':{'type':Sequelize[_0x7f4f('0x1')]},'queue_quantity1':{'type':Sequelize[_0x7f4f('0x1')]},'queue_quantity2':{'type':Sequelize[_0x7f4f('0x1')]},'queue_periodic_announce':{'type':Sequelize[_0x7f4f('0x1')]},'queue_less_than':{'type':Sequelize[_0x7f4f('0x1')]},'periodic_announce':{'type':Sequelize[_0x7f4f('0x17')],'set':function(_0xf0d67a){this[_0x7f4f('0x9')](_0x7f4f('0x18'),_0xf0d67a?_0xf0d67a[_0x7f4f('0x19')](','):[]);},'get':function(){return this['getDataValue']('periodic_announce')?this[_0x7f4f('0xd')]('periodic_announce')[_0x7f4f('0x1a')](','):[];}},'joinempty':{'type':Sequelize['STRING'],'defaultValue':'yes','set':function(_0xef3427){this[_0x7f4f('0x9')](_0x7f4f('0x1b'),_0xef3427?_0xef3427['join'](','):undefined);},'get':function(){return this[_0x7f4f('0xd')](_0x7f4f('0x1b'))?this[_0x7f4f('0xd')](_0x7f4f('0x1b'))['split'](','):undefined;}},'leavewhenempty':{'type':Sequelize[_0x7f4f('0x1')],'defaultValue':'no','set':function(_0x52636a){this['setDataValue'](_0x7f4f('0x1c'),_0x52636a?_0x52636a[_0x7f4f('0x19')](','):undefined);},'get':function(){return this[_0x7f4f('0xd')](_0x7f4f('0x1c'))?this['getDataValue'](_0x7f4f('0x1c'))[_0x7f4f('0x1a')](','):undefined;}},'reportholdtime':{'type':Sequelize[_0x7f4f('0x3')](_0x7f4f('0x14'),'no'),'defaultValue':'no'},'ringinuse':{'type':Sequelize[_0x7f4f('0x3')](_0x7f4f('0x14'),'no'),'defaultValue':'no'},'memberdelay':{'type':Sequelize[_0x7f4f('0x13')](0xb),'defaultValue':0x0},'timeoutrestart':{'type':Sequelize['ENUM'](_0x7f4f('0x14'),'no'),'defaultValue':'no'},'defaultrule':{'type':Sequelize[_0x7f4f('0x1')]},'description':{'type':Sequelize[_0x7f4f('0x1')]},'acw':{'type':Sequelize[_0x7f4f('0x1d')],'defaultValue':0x0,'set':function(_0x20f0d4){this['setDataValue'](_0x7f4f('0x1e'),_0x20f0d4);if(_0x20f0d4){if(this[_0x7f4f('0xd')](_0x7f4f('0x1f'))<0x2){this[_0x7f4f('0x9')](_0x7f4f('0x1f'),0x2);}}}},'acwTimeout':{'type':Sequelize[_0x7f4f('0x13')](0xb),'defaultValue':0xa},'dialActive':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':_0x7f4f('0x20')},'dialMethod':{'type':Sequelize['ENUM']('preview',_0x7f4f('0x21'),_0x7f4f('0x22'),_0x7f4f('0x23'),'booked'),'defaultValue':_0x7f4f('0x21'),'comment':_0x7f4f('0x24')},'dialLimitChannel':{'type':Sequelize[_0x7f4f('0x13')](0x4)[_0x7f4f('0x25')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0x7f4f('0x26')},'dialLimitQueue':{'type':Sequelize[_0x7f4f('0x13')](0x4)['UNSIGNED'],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0x7f4f('0x27')},'dialPowerLevel':{'type':Sequelize[_0x7f4f('0x28')](0x2)[_0x7f4f('0x25')],'defaultValue':0x1,'validate':{'min':0x1,'max':0xa},'comment':_0x7f4f('0x29')},'dialPredictiveOptimization':{'type':Sequelize[_0x7f4f('0x3')]('agentBusyFactor','dropRate'),'defaultValue':'dropRate','comment':'Only\x20for\x20predictive\x20method.'},'dialPredictiveOptimizationPercentage':{'type':Sequelize[_0x7f4f('0x28')](0x2)[_0x7f4f('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5f},'comment':_0x7f4f('0x2a')},'dialPredictiveInterval':{'type':Sequelize[_0x7f4f('0x13')](0x3)[_0x7f4f('0x25')],'defaultValue':0xa,'validate':{'min':0x5,'max':0x1e},'comment':'Interval\x20Predictive\x20Minutes\x20(min:5\x20max:30)'},'dialOriginateCallerIdName':{'type':Sequelize[_0x7f4f('0x1')]},'dialOriginateCallerIdNumber':{'type':Sequelize[_0x7f4f('0x1')]},'dialOriginateTimeout':{'type':Sequelize[_0x7f4f('0x13')](0x3)[_0x7f4f('0x25')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x7f4f('0x2b')},'dialQueueOptions':{'type':Sequelize[_0x7f4f('0x1')],'defaultValue':_0x7f4f('0x2c'),'comment':_0x7f4f('0x2d')},'dialQueueTimeout':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x7f4f('0x2e')},'dialQueueProject':{'type':Sequelize['STRING'],'comment':_0x7f4f('0x2f')},'dialCongestionMaxRetry':{'type':Sequelize[_0x7f4f('0x13')](0x3)[_0x7f4f('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x7f4f('0x30')},'dialCongestionRetryFrequency':{'type':Sequelize[_0x7f4f('0x13')](0x5)[_0x7f4f('0x25')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x7f4f('0x31')},'dialBusyMaxRetry':{'type':Sequelize[_0x7f4f('0x13')](0x3)[_0x7f4f('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x7f4f('0x32')},'dialBusyRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x7f4f('0x25')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x7f4f('0x33')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x7f4f('0x13')](0x3)[_0x7f4f('0x25')],'defaultValue':0x3,'comment':'#NoAnswer\x20Retry\x20(min:1,\x20max:999)'},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x7f4f('0x13')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':'NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)'},'dialGlobalMaxRetry':{'type':Sequelize[_0x7f4f('0x13')](0x3)[_0x7f4f('0x25')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':_0x7f4f('0x34')},'dialTimezone':{'type':Sequelize[_0x7f4f('0x1')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x7f4f('0x1')],'defaultValue':_0x7f4f('0x35')},'dialPrefix':{'type':Sequelize[_0x7f4f('0x1')],'defaultValue':null},'dialCheckDuplicateType':{'type':Sequelize[_0x7f4f('0x3')](_0x7f4f('0x36'),_0x7f4f('0x37'),_0x7f4f('0x38')),'defaultValue':_0x7f4f('0x36')},'dialAMDActive':{'type':Sequelize[_0x7f4f('0x1d')],'defaultValue':0x0,'comment':_0x7f4f('0x39')},'dialAMDInitialSilence':{'type':Sequelize[_0x7f4f('0x13')](0x9)['UNSIGNED'],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x7f4f('0x3a')},'dialAMDGreeting':{'type':Sequelize[_0x7f4f('0x13')](0x9)[_0x7f4f('0x25')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x7f4f('0x3b')},'dialAMDAfterGreetingSilence':{'type':Sequelize['INTEGER'](0x9)['UNSIGNED'],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x7f4f('0x3c')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x7f4f('0x13')](0x9)[_0x7f4f('0x25')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x7f4f('0x3d')},'dialAMDMinWordLength':{'type':Sequelize['INTEGER'](0x9)[_0x7f4f('0x25')],'defaultValue':0x64,'validate':{'min':0x0},'comment':_0x7f4f('0x3e')},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x7f4f('0x13')](0x9)['UNSIGNED'],'defaultValue':0x32,'validate':{'min':0x0},'comment':'#AMD\x20Between\x20Words\x20Silence'},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x7f4f('0x13')](0x9)[_0x7f4f('0x25')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x7f4f('0x3f')},'dialAMDSilenceThreshold':{'type':Sequelize[_0x7f4f('0x13')](0x5)['UNSIGNED'],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x7f4f('0x40')},'dialAMDMaximumWordLength':{'type':Sequelize[_0x7f4f('0x13')](0x9)[_0x7f4f('0x25')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x7f4f('0x41')},'dialRecallMeTimeout':{'type':Sequelize[_0x7f4f('0x13')](0x5)['UNSIGNED'],'validate':{'min':0x1},'defaultValue':0x1e,'comment':_0x7f4f('0x42')},'dialRecallInQueue':{'type':Sequelize[_0x7f4f('0x1d')],'defaultValue':0x0,'comment':_0x7f4f('0x43')},'dialOrderByScheduledAt':{'type':Sequelize[_0x7f4f('0x3')]('DESC',_0x7f4f('0x44')),'defaultValue':_0x7f4f('0x45')},'dialQueueProject2':{'type':Sequelize['STRING'],'comment':_0x7f4f('0x2f')},'dialAgiAfterHangupClient':{'type':Sequelize[_0x7f4f('0x1d')],'defaultValue':![]},'dialAgiAfterHangupAgent':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0x7f4f('0x13')](0x3)[_0x7f4f('0x25')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x7f4f('0x46')},'dialCutDigit':{'type':Sequelize['INTEGER'](0x3)[_0x7f4f('0x25')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x7f4f('0x47')},'dialNoSuchNumberMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x7f4f('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)'},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x7f4f('0x13')](0x5)[_0x7f4f('0x25')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x7f4f('0x48')},'dialDropMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x7f4f('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Drop\x20Retry\x20(min:1,\x20max:999)'},'dialDropRetryFrequency':{'type':Sequelize['INTEGER'](0x5)[_0x7f4f('0x25')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x7f4f('0x49')},'dialAbandonedMaxRetry':{'type':Sequelize[_0x7f4f('0x13')](0x3)[_0x7f4f('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x7f4f('0x4a')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0x7f4f('0x13')](0x5)[_0x7f4f('0x25')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x7f4f('0x4b')},'dialMachineMaxRetry':{'type':Sequelize[_0x7f4f('0x13')](0x3)[_0x7f4f('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x7f4f('0x4c')},'dialMachineRetryFrequency':{'type':Sequelize[_0x7f4f('0x13')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x7f4f('0x4d')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0x7f4f('0x13')](0x3)[_0x7f4f('0x25')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#AgentReject\x20Retry\x20(min:1,\x20max:999)'},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0x7f4f('0x13')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x7f4f('0x4e')},'mandatoryDispositionPauseId':{'type':Sequelize[_0x7f4f('0x13')],'allowNull':!![],'comment':_0x7f4f('0x4f')},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0x7f4f('0x50'),'set':function(_0x42d59d){if(!_0x42d59d)this[_0x7f4f('0x9')](_0x7f4f('0x51'),null);this[_0x7f4f('0x9')](_0x7f4f('0x52'),_0x42d59d);}},'dialPredictiveIntervalMaxThreshold':{'type':Sequelize['INTEGER'](0x3)[_0x7f4f('0x25')],'defaultValue':0x14,'validate':{'min':0x1,'max':0x64}},'dialPredictiveIntervalMinThreshold':{'type':Sequelize[_0x7f4f('0x13')](0x3)['UNSIGNED'],'defaultValue':0xa,'validate':{'min':0x1,'max':0x64}},'dialPreviewAutoRecallMe':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'callAdditionalPhoneAfterMin':{'type':Sequelize['INTEGER'](0x3)[_0x7f4f('0x25')],'defaultValue':0x4},'dialPreviewRecallmeReminder':{'type':Sequelize[_0x7f4f('0x1d')],'defaultValue':![]}};
\ No newline at end of file
+var _0x4266=['#AMD\x20Total\x20Analysis\x20Time','#AMD\x20Maximum\x20Number\x20Of\x20Words','#AMD\x20Silence\x20Threshold\x20(min:0,\x20max:32767)','#AMD\x20Maximum\x20Word\x20Length','#RecallMe\x20Timeout\x20(min:1)','Active/Disactive\x20Recall\x20In\x20Queue','DESC','ASC','Random\x20Last\x20Digit\x20(min:1,\x20max:15)','Cut\x20Digit\x20(min:1,\x20max:15)','NoSuchNumber\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','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)','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','mandatoryDispositionPauseId','mandatoryDisposition','name','ENUM','inbound','outbound','STRING','default','ringall','rrmemory','linear','rrordered','setDataValue','getDataValue','type','dialMethod','strategy','preview','booked','roundrobin','includes','INTEGER','yes','all','once','TEXT','periodic_announce','join','split','joinempty','leavewhenempty','BOOLEAN','acw','wrapuptime','Active/Disactive\x20Campaign','progressive','predictive','Max\x209999\x20channels,\x200\x20means\x20unlimited.','UNSIGNED','FLOAT','Power\x20Level:\x20Calls\x20for\x20agents\x20(min:1,\x20max:10).','agentBusyFactor','Only\x20for\x20predictive\x20method.','Originate\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','tTxX','https://wiki.asterisk.org/wiki/display/AST/Asterisk+13+Application_Queue','Queue\x20Timeout\x20Seconds\x20(min:1,\x20max:999)','AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,<project_name>)','Congestion\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','Busy\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','#NoAnswer\x20Retry\x20(min:1,\x20max:999)','NoAnswer\x20Retry\x20Frequency\x20Minutes\x20(min:1,\x20max:99999)','onlyIfOpen','always','Active/Disactive\x20AMD','#AMD\x20Initial\x20Silence','#AMD\x20Greeting','#AMD\x20After\x20Greeting\x20Silence'];(function(_0x31259d,_0x1f27bd){var _0x49f3bf=function(_0x2bab9c){while(--_0x2bab9c){_0x31259d['push'](_0x31259d['shift']());}};_0x49f3bf(++_0x1f27bd);}(_0x4266,0x149));var _0x6426=function(_0x2ec461,_0x5f588a){_0x2ec461=_0x2ec461-0x0;var _0x28603d=_0x4266[_0x2ec461];return _0x28603d;};'use strict';var Sequelize=require('sequelize');module['exports']={'name':{'type':Sequelize['STRING'],'allowNull':![],'unique':_0x6426('0x0'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'type':{'type':Sequelize[_0x6426('0x1')](_0x6426('0x2'),_0x6426('0x3')),'allowNull':![],'defaultValue':'inbound'},'musiconhold':{'type':Sequelize[_0x6426('0x4')],'defaultValue':_0x6426('0x5')},'announce':{'type':Sequelize['STRING'],'defaultValue':''},'strategy':{'type':Sequelize['ENUM']('rr',_0x6426('0x6'),'leastrecent','fewestcalls','random',_0x6426('0x7'),_0x6426('0x8'),'wrandom',_0x6426('0x9')),'allowNull':![],'defaultValue':_0x6426('0x6'),'set':function(_0x1d3934){this[_0x6426('0xa')]('strategy',_0x1d3934?_0x1d3934:_0x6426('0x7'));},'get':function(){var _0x36bbd5=this[_0x6426('0xb')](_0x6426('0xc'));var _0x5c658f=this[_0x6426('0xb')](_0x6426('0xd'));var _0x4ef039=this[_0x6426('0xb')](_0x6426('0xe'));if(_0x36bbd5===_0x6426('0x3')){if(_0x5c658f===_0x6426('0xf')){return null;}if(_0x5c658f===_0x6426('0x10')&&![_0x6426('0x7'),_0x6426('0x11')][_0x6426('0x12')](_0x4ef039)){this[_0x6426('0xa')](_0x6426('0xe'),_0x6426('0x7'));}}return _0x4ef039;}},'servicelevel':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'context':{'type':Sequelize[_0x6426('0x4')],'defaultValue':null},'penaltymemberslimit':{'type':Sequelize[_0x6426('0x13')](0xb)},'timeout':{'type':Sequelize[_0x6426('0x13')](0xb),'defaultValue':0xf},'retry':{'type':Sequelize[_0x6426('0x13')](0xb),'defaultValue':0x2},'timeoutpriority':{'type':Sequelize[_0x6426('0x4')]},'weight':{'type':Sequelize['INTEGER'](0xb),'allowNull':!![],'defaultValue':0x0},'wrapuptime':{'type':Sequelize[_0x6426('0x13')](0xb),'defaultValue':0x0},'autofill':{'type':Sequelize[_0x6426('0x1')](_0x6426('0x14'),'no'),'defaultValue':_0x6426('0x14')},'autopause':{'type':Sequelize['ENUM'](_0x6426('0x14'),'no',_0x6426('0x15')),'defaultValue':'no'},'autopausedelay':{'type':Sequelize[_0x6426('0x13')](0xb)},'autopausebusy':{'type':Sequelize[_0x6426('0x1')](_0x6426('0x14'),'no'),'defaultValue':'no'},'autopauseunavail':{'type':Sequelize[_0x6426('0x1')](_0x6426('0x14'),'no'),'defaultValue':'no'},'maxlen':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'setinterfacevar':{'type':Sequelize[_0x6426('0x1')](_0x6426('0x14'),'no'),'defaultValue':'no'},'setqueueentryvar':{'type':Sequelize[_0x6426('0x1')](_0x6426('0x14'),'no'),'defautValue':'no'},'setqueuevar':{'type':Sequelize[_0x6426('0x1')]('yes','no'),'defaultValue':'no'},'eventmemberstatus':{'type':Sequelize[_0x6426('0x1')](_0x6426('0x14'),'no'),'defaultValue':'no'},'membermacro':{'type':Sequelize[_0x6426('0x4')],'allowNull':!![]},'membergosub':{'type':Sequelize[_0x6426('0x4')],'allowNull':!![]},'announce_frequency':{'type':Sequelize['INTEGER'](0xb),'defaultValue':0x0},'min_announce_frequency':{'type':Sequelize[_0x6426('0x13')](0xb),'defaultValue':0x0},'periodic_announce_frequency':{'type':Sequelize[_0x6426('0x13')](0xb),'defaultValue':0x0},'random_periodic_announce':{'type':Sequelize[_0x6426('0x1')]('yes','no'),'defaultValue':'no'},'relative_periodic_announce':{'type':Sequelize[_0x6426('0x1')]('yes','no'),'defaultValue':_0x6426('0x14')},'announce_holdtime':{'type':Sequelize[_0x6426('0x1')](_0x6426('0x14'),'no',_0x6426('0x16')),'defaultValue':'no'},'announce_position':{'type':Sequelize[_0x6426('0x4')],'defaultValue':'no'},'announce_to_first_user':{'type':Sequelize[_0x6426('0x1')](_0x6426('0x14'),'no')},'announce_position_limit':{'type':Sequelize[_0x6426('0x13')](0xb)},'announce_round_seconds':{'type':Sequelize[_0x6426('0x1')]('0','5','10','15','20','30'),'defaultValue':'0'},'monitor_format':{'type':Sequelize[_0x6426('0x4')],'defaultValue':''},'monitor_type':{'type':Sequelize['STRING']},'queue_youarenext':{'type':Sequelize['STRING'],'defaultValue':null},'queue_thereare':{'type':Sequelize[_0x6426('0x4')],'defaultValue':null},'queue_callswaiting':{'type':Sequelize[_0x6426('0x4')],'defaultValue':null},'queue_holdtime':{'type':Sequelize[_0x6426('0x4')],'defaultValue':null},'queue_minute':{'type':Sequelize['STRING'],'allowNull':!![],'defaultValue':null},'queue_minutes':{'type':Sequelize['STRING'],'defaultValue':null},'queue_seconds':{'type':Sequelize[_0x6426('0x4')],'defaultValue':null},'queue_thankyou':{'type':Sequelize[_0x6426('0x4')],'defaultValue':null},'queue_reporthold':{'type':Sequelize['STRING']},'queue_quantity1':{'type':Sequelize[_0x6426('0x4')]},'queue_quantity2':{'type':Sequelize[_0x6426('0x4')]},'queue_periodic_announce':{'type':Sequelize[_0x6426('0x4')]},'queue_less_than':{'type':Sequelize[_0x6426('0x4')]},'periodic_announce':{'type':Sequelize[_0x6426('0x17')],'set':function(_0x2b3bd2){this[_0x6426('0xa')](_0x6426('0x18'),_0x2b3bd2?_0x2b3bd2[_0x6426('0x19')](','):[]);},'get':function(){return this['getDataValue'](_0x6426('0x18'))?this[_0x6426('0xb')]('periodic_announce')[_0x6426('0x1a')](','):[];}},'joinempty':{'type':Sequelize[_0x6426('0x4')],'defaultValue':_0x6426('0x14'),'set':function(_0x2490f8){this[_0x6426('0xa')]('joinempty',_0x2490f8?_0x2490f8[_0x6426('0x19')](','):undefined);},'get':function(){return this[_0x6426('0xb')](_0x6426('0x1b'))?this[_0x6426('0xb')]('joinempty')[_0x6426('0x1a')](','):undefined;}},'leavewhenempty':{'type':Sequelize[_0x6426('0x4')],'defaultValue':'no','set':function(_0x38ca40){this[_0x6426('0xa')](_0x6426('0x1c'),_0x38ca40?_0x38ca40['join'](','):undefined);},'get':function(){return this[_0x6426('0xb')](_0x6426('0x1c'))?this[_0x6426('0xb')](_0x6426('0x1c'))['split'](','):undefined;}},'reportholdtime':{'type':Sequelize[_0x6426('0x1')](_0x6426('0x14'),'no'),'defaultValue':'no'},'ringinuse':{'type':Sequelize[_0x6426('0x1')](_0x6426('0x14'),'no'),'defaultValue':'no'},'memberdelay':{'type':Sequelize[_0x6426('0x13')](0xb),'defaultValue':0x0},'timeoutrestart':{'type':Sequelize[_0x6426('0x1')](_0x6426('0x14'),'no'),'defaultValue':'no'},'defaultrule':{'type':Sequelize[_0x6426('0x4')]},'description':{'type':Sequelize['STRING']},'acw':{'type':Sequelize[_0x6426('0x1d')],'defaultValue':0x0,'set':function(_0x1e1b9f){this[_0x6426('0xa')](_0x6426('0x1e'),_0x1e1b9f);if(_0x1e1b9f){if(this[_0x6426('0xb')](_0x6426('0x1f'))<0x2){this[_0x6426('0xa')](_0x6426('0x1f'),0x2);}}}},'acwTimeout':{'type':Sequelize[_0x6426('0x13')](0xb),'defaultValue':0xa},'dialActive':{'type':Sequelize[_0x6426('0x1d')],'defaultValue':0x0,'comment':_0x6426('0x20')},'dialMethod':{'type':Sequelize['ENUM']('preview',_0x6426('0x21'),'power',_0x6426('0x22'),_0x6426('0x10')),'defaultValue':_0x6426('0x21'),'comment':'Dial\x20Method.'},'dialLimitChannel':{'type':Sequelize[_0x6426('0x13')](0x4)['UNSIGNED'],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':_0x6426('0x23')},'dialLimitQueue':{'type':Sequelize[_0x6426('0x13')](0x4)[_0x6426('0x24')],'defaultValue':0x0,'validate':{'min':0x0,'max':0x270f},'comment':'Max\x209999\x20member\x20in\x20queue(min:1,\x20max:9999),\x200\x20means\x20unlimited.'},'dialPowerLevel':{'type':Sequelize[_0x6426('0x25')](0x2)[_0x6426('0x24')],'defaultValue':0x1,'validate':{'min':0x1,'max':0xa},'comment':_0x6426('0x26')},'dialPredictiveOptimization':{'type':Sequelize[_0x6426('0x1')](_0x6426('0x27'),'dropRate'),'defaultValue':'dropRate','comment':_0x6426('0x28')},'dialPredictiveOptimizationPercentage':{'type':Sequelize[_0x6426('0x25')](0x2)[_0x6426('0x24')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x5f},'comment':'Predictive\x20Optimization\x20Percentage\x20(min:\x201,\x20max:\x2095)'},'dialPredictiveInterval':{'type':Sequelize['INTEGER'](0x3)[_0x6426('0x24')],'defaultValue':0xa,'validate':{'min':0x5,'max':0x1e},'comment':'Interval\x20Predictive\x20Minutes\x20(min:5\x20max:30)'},'dialOriginateCallerIdName':{'type':Sequelize[_0x6426('0x4')]},'dialOriginateCallerIdNumber':{'type':Sequelize['STRING']},'dialOriginateTimeout':{'type':Sequelize[_0x6426('0x13')](0x3)[_0x6426('0x24')],'defaultValue':0x1e,'validate':{'min':0x1,'max':0x3e7},'comment':_0x6426('0x29')},'dialQueueOptions':{'type':Sequelize['STRING'],'defaultValue':_0x6426('0x2a'),'comment':_0x6426('0x2b')},'dialQueueTimeout':{'type':Sequelize[_0x6426('0x13')](0x3)[_0x6426('0x24')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x6426('0x2c')},'dialQueueProject':{'type':Sequelize[_0x6426('0x4')],'comment':_0x6426('0x2d')},'dialCongestionMaxRetry':{'type':Sequelize[_0x6426('0x13')](0x3)[_0x6426('0x24')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Congestion\x20Retry\x20(min:1,\x20max:999)'},'dialCongestionRetryFrequency':{'type':Sequelize[_0x6426('0x13')](0x5)[_0x6426('0x24')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x6426('0x2e')},'dialBusyMaxRetry':{'type':Sequelize[_0x6426('0x13')](0x3)[_0x6426('0x24')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Busy\x20Retry\x20(min:1,\x20max:999)'},'dialBusyRetryFrequency':{'type':Sequelize[_0x6426('0x13')](0x5)[_0x6426('0x24')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x6426('0x2f')},'dialNoAnswerMaxRetry':{'type':Sequelize[_0x6426('0x13')](0x3)[_0x6426('0x24')],'defaultValue':0x3,'comment':_0x6426('0x30')},'dialNoAnswerRetryFrequency':{'type':Sequelize[_0x6426('0x13')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x6426('0x31')},'dialGlobalMaxRetry':{'type':Sequelize['INTEGER'](0x3)[_0x6426('0x24')],'validate':{'min':0x1,'max':0x3e7},'defaultValue':0x4,'comment':'#Global\x20Max\x20Retry\x20(min:1,\x20max:999)'},'dialTimezone':{'type':Sequelize[_0x6426('0x4')],'defaultValue':null},'dialGlobalInterval':{'type':Sequelize[_0x6426('0x4')],'defaultValue':'07:00-22:00,*,*,*'},'dialPrefix':{'type':Sequelize['STRING'],'defaultValue':null},'dialCheckDuplicateType':{'type':Sequelize[_0x6426('0x1')]('always','never',_0x6426('0x32')),'defaultValue':_0x6426('0x33')},'dialAMDActive':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':_0x6426('0x34')},'dialAMDInitialSilence':{'type':Sequelize['INTEGER'](0x9)['UNSIGNED'],'defaultValue':0x9c4,'validate':{'min':0x0},'comment':_0x6426('0x35')},'dialAMDGreeting':{'type':Sequelize['INTEGER'](0x9)[_0x6426('0x24')],'defaultValue':0x5dc,'validate':{'min':0x0},'comment':_0x6426('0x36')},'dialAMDAfterGreetingSilence':{'type':Sequelize[_0x6426('0x13')](0x9)[_0x6426('0x24')],'defaultValue':0x320,'validate':{'min':0x0},'comment':_0x6426('0x37')},'dialAMDTotalAnalysisTime':{'type':Sequelize[_0x6426('0x13')](0x9)[_0x6426('0x24')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x6426('0x38')},'dialAMDMinWordLength':{'type':Sequelize[_0x6426('0x13')](0x9)[_0x6426('0x24')],'defaultValue':0x64,'validate':{'min':0x0},'comment':'#AMD\x20Min\x20Word\x20Length'},'dialAMDBetweenWordsSilence':{'type':Sequelize[_0x6426('0x13')](0x9)[_0x6426('0x24')],'defaultValue':0x32,'validate':{'min':0x0},'comment':'#AMD\x20Between\x20Words\x20Silence'},'dialAMDMaximumNumberOfWords':{'type':Sequelize[_0x6426('0x13')](0x9)[_0x6426('0x24')],'defaultValue':0x3,'validate':{'min':0x0},'comment':_0x6426('0x39')},'dialAMDSilenceThreshold':{'type':Sequelize[_0x6426('0x13')](0x5)['UNSIGNED'],'validate':{'min':0x0,'max':0x7fff},'defaultValue':0x100,'comment':_0x6426('0x3a')},'dialAMDMaximumWordLength':{'type':Sequelize[_0x6426('0x13')](0x9)[_0x6426('0x24')],'defaultValue':0x1388,'validate':{'min':0x0},'comment':_0x6426('0x3b')},'dialRecallMeTimeout':{'type':Sequelize[_0x6426('0x13')](0x5)['UNSIGNED'],'validate':{'min':0x1},'defaultValue':0x1e,'comment':_0x6426('0x3c')},'dialRecallInQueue':{'type':Sequelize['BOOLEAN'],'defaultValue':0x0,'comment':_0x6426('0x3d')},'dialOrderByScheduledAt':{'type':Sequelize[_0x6426('0x1')](_0x6426('0x3e'),_0x6426('0x3f')),'defaultValue':_0x6426('0x3e')},'dialQueueProject2':{'type':Sequelize[_0x6426('0x4')],'comment':'AGI\x20queue\x20option\x20(use:\x20agi://127.0.0.1/square,<project_name>)'},'dialAgiAfterHangupClient':{'type':Sequelize[_0x6426('0x1d')],'defaultValue':![]},'dialAgiAfterHangupAgent':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'dialRandomLastDigitCallerIdNumber':{'type':Sequelize[_0x6426('0x13')](0x3)[_0x6426('0x24')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x6426('0x40')},'dialCutDigit':{'type':Sequelize['INTEGER'](0x3)[_0x6426('0x24')],'validate':{'min':0x0,'max':0xf},'defaultValue':0x0,'comment':_0x6426('0x41')},'dialNoSuchNumberMaxRetry':{'type':Sequelize[_0x6426('0x13')](0x3)[_0x6426('0x24')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#NoSuchNumber\x20Retry\x20(min:1,\x20max:999)'},'dialNoSuchNumberRetryFrequency':{'type':Sequelize[_0x6426('0x13')](0x5)[_0x6426('0x24')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x6426('0x42')},'dialDropMaxRetry':{'type':Sequelize['INTEGER'](0x3)['UNSIGNED'],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':'#Drop\x20Retry\x20(min:1,\x20max:999)'},'dialDropRetryFrequency':{'type':Sequelize[_0x6426('0x13')](0x5)['UNSIGNED'],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x6426('0x43')},'dialAbandonedMaxRetry':{'type':Sequelize[_0x6426('0x13')](0x3)[_0x6426('0x24')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x6426('0x44')},'dialAbandonedRetryFrequency':{'type':Sequelize[_0x6426('0x13')](0x5)[_0x6426('0x24')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x6426('0x45')},'dialMachineMaxRetry':{'type':Sequelize[_0x6426('0x13')](0x3)[_0x6426('0x24')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x6426('0x46')},'dialMachineRetryFrequency':{'type':Sequelize[_0x6426('0x13')](0x5)[_0x6426('0x24')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x6426('0x47')},'dialAgentRejectMaxRetry':{'type':Sequelize[_0x6426('0x13')](0x3)[_0x6426('0x24')],'defaultValue':0x3,'validate':{'min':0x1,'max':0x3e7},'comment':_0x6426('0x48')},'dialAgentRejectRetryFrequency':{'type':Sequelize[_0x6426('0x13')](0x5)[_0x6426('0x24')],'validate':{'min':0x1,'max':0x1869f},'defaultValue':0x96,'comment':_0x6426('0x49')},'mandatoryDispositionPauseId':{'type':Sequelize[_0x6426('0x13')],'allowNull':!![],'comment':'Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled'},'mandatoryDisposition':{'type':Sequelize['BOOLEAN'],'defaultValue':![],'comment':_0x6426('0x4a'),'set':function(_0x5e0af3){if(!_0x5e0af3)this[_0x6426('0xa')](_0x6426('0x4b'),null);this[_0x6426('0xa')](_0x6426('0x4c'),_0x5e0af3);}},'dialPredictiveIntervalMaxThreshold':{'type':Sequelize[_0x6426('0x13')](0x3)[_0x6426('0x24')],'defaultValue':0x14,'validate':{'min':0x1,'max':0x64}},'dialPredictiveIntervalMinThreshold':{'type':Sequelize[_0x6426('0x13')](0x3)[_0x6426('0x24')],'defaultValue':0xa,'validate':{'min':0x1,'max':0x64}},'dialPreviewAutoRecallMe':{'type':Sequelize['BOOLEAN'],'defaultValue':!![]},'callAdditionalPhoneAfterMin':{'type':Sequelize[_0x6426('0x13')](0x3)[_0x6426('0x24')],'defaultValue':0x4},'dialPreviewRecallmeReminder':{'type':Sequelize['BOOLEAN'],'defaultValue':![]}};
\ No newline at end of file
index 4885931..49ca865 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6aa7=['ListId\x20=\x20?','CmListId','phone\x20IS\x20NOT\x20NULL','deletedAt\x20IS\x20NULL','cm_hopper_additional_phones','CmHopperId','OrderBy','ci.item','ci.OrderBy+1','cm_contact_has_items','h.ContactId=ci.CmContactId','h.scheduledat=?','ci.ItemClass=?','PHONE','getBlackLists','CmList','addBlackLists','cm_hopper_black','NOW()','removeBlackLists','moment','util','lodash','squel','ioredis','../../config/logger','api','../../config/environment','defaults','localhost','socket.io-emitter','redis','register','sendStatus','status','end','json','undefined','limit','count','offset','Content-Range','update','then','get','VoiceQueues','inbound','QueueCampaigns','outbound','ignore','map','value','includes','type','find','name','UserProfileResource','destroy','error','stack','index','VoiceQueue','rawAttributes','fieldName','getOptions','where','include','rows','show','model','keys','query','attributes','intersection','fields','length','includeAll','merge','options','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','clone','params','omit','updatedAt','createdAt','getHoppers','findOne','filters','nolimit','order','sort','pick','VoiceQueueId','filter','CmHopper','findAll','getHopperHistories','CmHopperHistory','CmHopperFinal','hasOwnProperty','CmHopperBlack','getTeams','Team','addTeams','teams','User','online','voicePause','interface','flatMap','forEach','penalty','Agents','sequelize','transaction','each','TeamVoiceQueue','upsert','findOrCreate','UserVoiceQueueRt','isNil','format','SIP/%s','emit','userVoiceQueue:save','removeTeams','ids','field','tq.TeamId','from','team_has_voice_queues','join','user_has_teams','VoiceQueueId\x20=\x20?','ut.UserId\x20=\x20?','push','SELECT','every','TeamId','compact','isEmpty','removeAgents','addAgents','spread','all','isArray','userVoiceQueue:remove','getAgents','getMembers','getLists','addLists','YYYY-MM-DD\x20HH:mm:ss','dialCheckDuplicateType','insert','into','cm_hopper','fromQuery','phone','scheduledAt','ContactId','ListId','toString','cm_contacts','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','phone\x20NOT\x20IN\x20(?)','COALESCE(phone,\x27\x27)','onlyIfOpen','select'];(function(_0x1035c1,_0x2d8583){var _0x308d67=function(_0x58ddb6){while(--_0x58ddb6){_0x1035c1['push'](_0x1035c1['shift']());}};_0x308d67(++_0x2d8583);}(_0x6aa7,0x178));var _0x76aa=function(_0x119fc8,_0xb418f2){_0x119fc8=_0x119fc8-0x0;var _0x53885f=_0x6aa7[_0x119fc8];return _0x53885f;};'use strict';var moment=require(_0x76aa('0x0'));var BPromise=require('bluebird');var util=require(_0x76aa('0x1'));var _=require(_0x76aa('0x2'));var squel=require(_0x76aa('0x3'));var Redis=require(_0x76aa('0x4'));var qs=require('../../components/parsers/qs');var logger=require(_0x76aa('0x5'))(_0x76aa('0x6'));var config=require(_0x76aa('0x7'));var db=require('../../mysqldb')['db'];config['redis']=_[_0x76aa('0x8')](config['redis'],{'host':_0x76aa('0x9'),'port':0x18eb});var socket=require(_0x76aa('0xa'))(new Redis(config[_0x76aa('0xb')]));require('./voiceQueue.socket')[_0x76aa('0xc')](socket);function respondWithStatusCode(_0x266bd5,_0x3a3f36){_0x3a3f36=_0x3a3f36||0xcc;return function(_0x557d69){if(_0x557d69){return _0x266bd5[_0x76aa('0xd')](_0x3a3f36);}return _0x266bd5[_0x76aa('0xe')](_0x3a3f36)[_0x76aa('0xf')]();};}function respondWithResult(_0x16cb50,_0x37f1ab){_0x37f1ab=_0x37f1ab||0xc8;return function(_0x128435){if(_0x128435){return _0x16cb50[_0x76aa('0xe')](_0x37f1ab)[_0x76aa('0x10')](_0x128435);}};}function respondWithFilteredResult(_0xd6327,_0x17a417){return function(_0x5e5f47){if(_0x5e5f47){var _0x112c39=typeof _0x17a417['offset']===_0x76aa('0x11')&&typeof _0x17a417[_0x76aa('0x12')]===_0x76aa('0x11');var _0x8e44ed=_0x5e5f47[_0x76aa('0x13')];var _0x4e309f=_0x112c39?0x0:_0x17a417['offset'];var _0x2b3b4f=_0x112c39?_0x5e5f47['count']:_0x17a417[_0x76aa('0x14')]+_0x17a417[_0x76aa('0x12')];var _0x5cf594;if(_0x2b3b4f>=_0x8e44ed){_0x2b3b4f=_0x8e44ed;_0x5cf594=0xc8;}else{_0x5cf594=0xce;}_0xd6327[_0x76aa('0xe')](_0x5cf594);return _0xd6327['set'](_0x76aa('0x15'),_0x4e309f+'-'+_0x2b3b4f+'/'+_0x8e44ed)['json'](_0x5e5f47);}return null;};}function saveUpdates(_0x1515e9){return function(_0x413cf6){if(_0x413cf6){return _0x413cf6[_0x76aa('0x16')](_0x1515e9)[_0x76aa('0x17')](function(_0xa1bc7){return _0xa1bc7;});}return null;};}function removeEntity(_0x3ead3f){return function(_0x496902){if(_0x496902){return _0x496902['destroy']()[_0x76aa('0x17')](function(){var _0x454dd3=_0x496902[_0x76aa('0x18')]({'plain':!![]});var _0x15b931=[{'name':_0x76aa('0x19'),'value':_0x76aa('0x1a'),'ignore':![]},{'name':_0x76aa('0x1b'),'value':_0x76aa('0x1c'),'ignore':![]}];var _0x385157=_(_0x15b931)['filter'](_0x76aa('0x1d'))[_0x76aa('0x1e')](_0x76aa('0x1f'))['value']();if(_[_0x76aa('0x20')](_0x385157,_0x454dd3[_0x76aa('0x21')])){return;}var _0x31252f=_[_0x76aa('0x22')](_0x15b931,[_0x76aa('0x1f'),_0x454dd3[_0x76aa('0x21')]])[_0x76aa('0x23')];return db[_0x76aa('0x24')][_0x76aa('0x25')]({'where':{'type':_0x31252f,'resourceId':_0x454dd3['id']}})[_0x76aa('0x17')](function(){return _0x496902;});})[_0x76aa('0x17')](function(){_0x3ead3f[_0x76aa('0xe')](0xcc)[_0x76aa('0xf')]();});}};}function handleEntityNotFound(_0x4ef9b0){return function(_0xb5e8a9){if(!_0xb5e8a9){_0x4ef9b0[_0x76aa('0xd')](0x194);}return _0xb5e8a9;};}function handleError(_0x25c614,_0x2e7ab4){_0x2e7ab4=_0x2e7ab4||0x1f4;return function(_0xa1e6){logger[_0x76aa('0x26')](_0xa1e6[_0x76aa('0x27')]);if(_0xa1e6[_0x76aa('0x23')]){delete _0xa1e6[_0x76aa('0x23')];}_0x25c614[_0x76aa('0xe')](_0x2e7ab4)['send'](_0xa1e6);};}exports[_0x76aa('0x28')]=function(_0x5a8030,_0x994550){var _0x365ff8={};var _0x2dec94={'count':0x0,'rows':[]};var _0x1e90b9=_[_0x76aa('0x1e')](db[_0x76aa('0x29')][_0x76aa('0x2a')],function(_0x3827ec){return{'name':_0x3827ec[_0x76aa('0x2b')],'type':_0x3827ec[_0x76aa('0x21')]['key']};});_0x365ff8=qs[_0x76aa('0x2c')](_0x1e90b9,_0x5a8030);var _0x5532c7={'where':_0x365ff8[_0x76aa('0x2d')]};return db[_0x76aa('0x29')][_0x76aa('0x13')](_0x5532c7)[_0x76aa('0x17')](function(_0x35a705){_0x2dec94['count']=_0x35a705;_0x365ff8[_0x76aa('0x2e')]=qs[_0x76aa('0x2e')](_0x5a8030['query']);return db[_0x76aa('0x29')]['findAll'](_0x365ff8);})[_0x76aa('0x17')](function(_0x4c90b6){_0x2dec94[_0x76aa('0x2f')]=_0x4c90b6;return _0x2dec94;})['then'](respondWithFilteredResult(_0x994550,_0x365ff8))['catch'](handleError(_0x994550,null));};exports[_0x76aa('0x30')]=function(_0x282c56,_0x198fcb){var _0x37dfab={'raw':![],'where':{'id':_0x282c56['params']['id']}},_0x595a0f={};_0x595a0f[_0x76aa('0x31')]=_[_0x76aa('0x32')](db[_0x76aa('0x29')][_0x76aa('0x2a')]);_0x595a0f[_0x76aa('0x33')]=_['keys'](_0x282c56[_0x76aa('0x33')]);_0x595a0f['filters']=_['intersection'](_0x595a0f[_0x76aa('0x31')],_0x595a0f[_0x76aa('0x33')]);_0x37dfab[_0x76aa('0x34')]=_[_0x76aa('0x35')](_0x595a0f['model'],qs[_0x76aa('0x36')](_0x282c56[_0x76aa('0x33')][_0x76aa('0x36')]));_0x37dfab['attributes']=_0x37dfab[_0x76aa('0x34')][_0x76aa('0x37')]?_0x37dfab[_0x76aa('0x34')]:_0x595a0f[_0x76aa('0x31')];if(_0x282c56[_0x76aa('0x33')][_0x76aa('0x38')]){_0x37dfab[_0x76aa('0x2e')]=[{'all':!![]}];}_0x37dfab=_[_0x76aa('0x39')]({},_0x37dfab,_0x282c56[_0x76aa('0x3a')]);return db['VoiceQueue'][_0x76aa('0x22')](_0x37dfab)[_0x76aa('0x17')](handleEntityNotFound(_0x198fcb,null))[_0x76aa('0x17')](respondWithResult(_0x198fcb,null))[_0x76aa('0x3b')](handleError(_0x198fcb,null));};exports[_0x76aa('0x3c')]=function(_0x2957aa,_0x572fdb){return db['VoiceQueue'][_0x76aa('0x3c')](_0x2957aa[_0x76aa('0x3d')],{})[_0x76aa('0x17')](function(_0x365612){var _0x50599f=_0x2957aa[_0x76aa('0x3e')][_0x76aa('0x18')]({'plain':!![]});if(!_0x50599f)throw new Error(_0x76aa('0x3f'));if(_0x50599f[_0x76aa('0x40')]===_0x76aa('0x3e')){var _0x4aa2f3=_0x365612[_0x76aa('0x18')]({'plain':!![]});var _0x556f59=[{'name':_0x76aa('0x19'),'value':'inbound'},{'name':'QueueCampaigns','value':'outbound'}];var _0x144f0a=_['find'](_0x556f59,['value',_0x4aa2f3['type']])[_0x76aa('0x23')];return db[_0x76aa('0x41')][_0x76aa('0x22')]({'where':{'name':_0x144f0a,'userProfileId':_0x50599f[_0x76aa('0x42')]},'raw':!![]})[_0x76aa('0x17')](function(_0x47b0c8){if(_0x47b0c8&&_0x47b0c8[_0x76aa('0x43')]===0x0){return db[_0x76aa('0x24')][_0x76aa('0x3c')]({'name':_0x4aa2f3[_0x76aa('0x23')],'resourceId':_0x4aa2f3['id'],'type':_0x47b0c8[_0x76aa('0x23')],'sectionId':_0x47b0c8['id']},{})['then'](function(){return _0x365612;});}else{return _0x365612;}})[_0x76aa('0x3b')](function(_0x1c62a9){logger['error'](_0x76aa('0x44'),_0x1c62a9);throw _0x1c62a9;});}return _0x365612;})['then'](respondWithResult(_0x572fdb,0xc9))[_0x76aa('0x3b')](handleError(_0x572fdb,null));};exports[_0x76aa('0x45')]=function(_0x31930b,_0x18fd3e){var _0x2d0bc4={'where':{'id':_0x31930b[_0x76aa('0x46')]['id']}},_0x3e0315={};_0x3e0315[_0x76aa('0x31')]=_[_0x76aa('0x32')](db[_0x76aa('0x29')]['rawAttributes']);_0x2d0bc4[_0x76aa('0x34')]=_['intersection'](_0x3e0315[_0x76aa('0x31')],qs[_0x76aa('0x36')](_0x31930b[_0x76aa('0x33')][_0x76aa('0x36')]));_0x2d0bc4['attributes']=_0x2d0bc4['attributes'][_0x76aa('0x37')]?_0x2d0bc4['attributes']:_0x3e0315[_0x76aa('0x31')];if(_0x31930b[_0x76aa('0x33')][_0x76aa('0x38')]){_0x2d0bc4[_0x76aa('0x2e')]=[{'all':!![]}];}_0x2d0bc4=_[_0x76aa('0x39')]({},_0x2d0bc4,_0x31930b[_0x76aa('0x3a')]);return db['VoiceQueue']['find'](_0x2d0bc4)[_0x76aa('0x17')](handleEntityNotFound(_0x18fd3e,null))[_0x76aa('0x17')](function(_0x1708d4){if(_0x1708d4){var _0x40e8ff=_0x1708d4[_0x76aa('0x18')]({'plain':!![]});_0x40e8ff=qs[_0x76aa('0x47')](_0x40e8ff,['id','createdAt',_0x76aa('0x48')]);_0x31930b[_0x76aa('0x3d')]=_[_0x76aa('0x47')](_0x31930b['body'],['id',_0x76aa('0x49'),'updatedAt']);return db[_0x76aa('0x29')]['create'](_[_0x76aa('0x39')](_0x40e8ff,_0x31930b[_0x76aa('0x3d')]),{'include':_0x31930b[_0x76aa('0x33')][_0x76aa('0x38')]?[{'all':!![]}]:undefined})[_0x76aa('0x17')](function(_0x316de3){var _0x953726=_0x31930b['user'][_0x76aa('0x18')]({'plain':!![]});if(!_0x953726)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x953726[_0x76aa('0x40')]===_0x76aa('0x3e')){var _0x288151=_0x316de3[_0x76aa('0x18')]({'plain':!![]});var _0x3fa7ec=[{'name':_0x76aa('0x19'),'value':_0x76aa('0x1a')},{'name':'QueueCampaigns','value':_0x76aa('0x1c')}];var _0x281f73=_[_0x76aa('0x22')](_0x3fa7ec,[_0x76aa('0x1f'),_0x288151['type']])[_0x76aa('0x23')];return db[_0x76aa('0x41')][_0x76aa('0x22')]({'where':{'name':_0x281f73,'userProfileId':_0x953726[_0x76aa('0x42')]},'raw':!![]})[_0x76aa('0x17')](function(_0xf7732){if(_0xf7732&&_0xf7732['autoAssociation']===0x0){return db[_0x76aa('0x24')][_0x76aa('0x3c')]({'name':_0x288151[_0x76aa('0x23')],'resourceId':_0x288151['id'],'type':_0xf7732[_0x76aa('0x23')],'sectionId':_0xf7732['id']},{})[_0x76aa('0x17')](function(){return _0x316de3;});}else{return _0x316de3;}})[_0x76aa('0x3b')](function(_0x37babe){logger['error']('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x37babe);throw _0x37babe;});}return _0x316de3;});}})[_0x76aa('0x17')](respondWithResult(_0x18fd3e,0xc9))[_0x76aa('0x3b')](handleError(_0x18fd3e,null));};exports['update']=function(_0x3d7802,_0x1e6f3c){if(_0x3d7802['body']['id']){delete _0x3d7802[_0x76aa('0x3d')]['id'];}return db[_0x76aa('0x29')][_0x76aa('0x22')]({'where':{'id':_0x3d7802[_0x76aa('0x46')]['id']}})[_0x76aa('0x17')](handleEntityNotFound(_0x1e6f3c,null))[_0x76aa('0x17')](saveUpdates(_0x3d7802[_0x76aa('0x3d')],null))[_0x76aa('0x17')](respondWithResult(_0x1e6f3c,null))[_0x76aa('0x3b')](handleError(_0x1e6f3c,null));};exports['destroy']=function(_0xd337f0,_0x49156c){return db[_0x76aa('0x29')][_0x76aa('0x22')]({'where':{'id':_0xd337f0[_0x76aa('0x46')]['id']}})[_0x76aa('0x17')](handleEntityNotFound(_0x49156c,null))[_0x76aa('0x17')](removeEntity(_0x49156c,null))[_0x76aa('0x3b')](handleError(_0x49156c,null));};exports[_0x76aa('0x4a')]=function(_0x431d1c,_0x2f1263){var _0x5eceba={'raw':![],'where':{}};var _0x267fcf={};var _0x3d4025={'count':0x0,'rows':[]};return db[_0x76aa('0x29')][_0x76aa('0x4b')]({'where':{'id':_0x431d1c[_0x76aa('0x46')]['id']}})[_0x76aa('0x17')](handleEntityNotFound(_0x2f1263,null))[_0x76aa('0x17')](function(_0x157540){if(_0x157540){_0x267fcf['model']=_[_0x76aa('0x32')](db['CmHopper'][_0x76aa('0x2a')]);_0x267fcf[_0x76aa('0x33')]=_[_0x76aa('0x32')](_0x431d1c[_0x76aa('0x33')]);_0x267fcf[_0x76aa('0x4c')]=_[_0x76aa('0x35')](_0x267fcf[_0x76aa('0x31')],_0x267fcf['query']);_0x5eceba[_0x76aa('0x34')]=_[_0x76aa('0x35')](_0x267fcf['model'],qs['fields'](_0x431d1c[_0x76aa('0x33')][_0x76aa('0x36')]));_0x5eceba['attributes']=_0x5eceba[_0x76aa('0x34')][_0x76aa('0x37')]?_0x5eceba[_0x76aa('0x34')]:_0x267fcf['model'];if(!_0x431d1c[_0x76aa('0x33')]['hasOwnProperty'](_0x76aa('0x4d'))){_0x5eceba[_0x76aa('0x12')]=qs[_0x76aa('0x12')](_0x431d1c[_0x76aa('0x33')]['limit']);_0x5eceba['offset']=qs[_0x76aa('0x14')](_0x431d1c['query'][_0x76aa('0x14')]);}_0x5eceba[_0x76aa('0x4e')]=qs[_0x76aa('0x4f')](_0x431d1c[_0x76aa('0x33')][_0x76aa('0x4f')]);_0x5eceba[_0x76aa('0x2d')]=qs[_0x76aa('0x4c')](_[_0x76aa('0x50')](_0x431d1c[_0x76aa('0x33')],_0x267fcf['filters']));_0x5eceba[_0x76aa('0x2d')][_0x76aa('0x51')]=_0x157540['id'];if(_0x431d1c[_0x76aa('0x33')][_0x76aa('0x52')]){_0x5eceba['where']=_['merge'](_0x5eceba['where'],{'$or':_[_0x76aa('0x1e')](_0x5eceba['attributes'],function(_0xb61e5){var _0x256195={};_0x256195[_0xb61e5]={'$like':'%'+_0x431d1c[_0x76aa('0x33')][_0x76aa('0x52')]+'%'};return _0x256195;})});}_0x5eceba=_['merge']({},_0x5eceba,_0x431d1c[_0x76aa('0x3a')]);return db['CmHopper'][_0x76aa('0x13')]({'where':_0x5eceba[_0x76aa('0x2d')]})[_0x76aa('0x17')](function(_0x11d602){_0x3d4025[_0x76aa('0x13')]=_0x11d602;if(_0x431d1c['query'][_0x76aa('0x38')]){_0x5eceba[_0x76aa('0x2e')]=[{'all':!![]}];}return db[_0x76aa('0x53')][_0x76aa('0x54')](_0x5eceba);})[_0x76aa('0x17')](function(_0x22432d){_0x3d4025[_0x76aa('0x2f')]=_0x22432d;return _0x3d4025;});}})[_0x76aa('0x17')](respondWithFilteredResult(_0x2f1263,_0x5eceba))['catch'](handleError(_0x2f1263,null));};exports[_0x76aa('0x55')]=function(_0x381f44,_0x48136a){var _0x3c1b98={'raw':!![],'where':{}};var _0x215463={};var _0x325487={'count':0x0,'rows':[]};return db[_0x76aa('0x29')][_0x76aa('0x4b')]({'where':{'id':_0x381f44[_0x76aa('0x46')]['id']}})[_0x76aa('0x17')](handleEntityNotFound(_0x48136a,null))['then'](function(_0xdb821b){if(_0xdb821b){_0x215463['model']=_['keys'](db[_0x76aa('0x56')][_0x76aa('0x2a')]);_0x215463['query']=_['keys'](_0x381f44[_0x76aa('0x33')]);_0x215463[_0x76aa('0x4c')]=_[_0x76aa('0x35')](_0x215463['model'],_0x215463['query']);_0x3c1b98[_0x76aa('0x34')]=_[_0x76aa('0x35')](_0x215463[_0x76aa('0x31')],qs['fields'](_0x381f44[_0x76aa('0x33')]['fields']));_0x3c1b98[_0x76aa('0x34')]=_0x3c1b98[_0x76aa('0x34')][_0x76aa('0x37')]?_0x3c1b98[_0x76aa('0x34')]:_0x215463[_0x76aa('0x31')];if(!_0x381f44['query']['hasOwnProperty'](_0x76aa('0x4d'))){_0x3c1b98[_0x76aa('0x12')]=qs[_0x76aa('0x12')](_0x381f44['query'][_0x76aa('0x12')]);_0x3c1b98[_0x76aa('0x14')]=qs[_0x76aa('0x14')](_0x381f44[_0x76aa('0x33')][_0x76aa('0x14')]);}_0x3c1b98['order']=qs[_0x76aa('0x4f')](_0x381f44['query'][_0x76aa('0x4f')]);_0x3c1b98[_0x76aa('0x2d')]=qs[_0x76aa('0x4c')](_[_0x76aa('0x50')](_0x381f44[_0x76aa('0x33')],_0x215463[_0x76aa('0x4c')]));_0x3c1b98['where']['VoiceQueueId']=_0xdb821b['id'];if(_0x381f44['query']['filter']){_0x3c1b98['where']=_[_0x76aa('0x39')](_0x3c1b98[_0x76aa('0x2d')],{'$or':_['map'](_0x3c1b98['attributes'],function(_0x4f01e9){var _0x3a6326={};_0x3a6326[_0x4f01e9]={'$like':'%'+_0x381f44[_0x76aa('0x33')][_0x76aa('0x52')]+'%'};return _0x3a6326;})});}_0x3c1b98=_['merge']({},_0x3c1b98,_0x381f44['options']);return db[_0x76aa('0x56')][_0x76aa('0x13')]({'where':_0x3c1b98[_0x76aa('0x2d')]})[_0x76aa('0x17')](function(_0x354c7b){_0x325487['count']=_0x354c7b;if(_0x381f44['query'][_0x76aa('0x38')]){_0x3c1b98['include']=[{'all':!![]}];}return db['CmHopperHistory']['findAll'](_0x3c1b98);})[_0x76aa('0x17')](function(_0xbb1ccd){_0x325487['rows']=_0xbb1ccd;return _0x325487;});}})[_0x76aa('0x17')](respondWithFilteredResult(_0x48136a,_0x3c1b98))[_0x76aa('0x3b')](handleError(_0x48136a,null));};exports['getHopperFinals']=function(_0x22063f,_0x24331a){var _0x11d91f={'raw':!![],'where':{}};var _0x258e5a={};var _0x1fa86b={'count':0x0,'rows':[]};return db[_0x76aa('0x29')][_0x76aa('0x4b')]({'where':{'id':_0x22063f[_0x76aa('0x46')]['id']}})[_0x76aa('0x17')](handleEntityNotFound(_0x24331a,null))['then'](function(_0x84bc91){if(_0x84bc91){_0x258e5a[_0x76aa('0x31')]=_['keys'](db[_0x76aa('0x57')][_0x76aa('0x2a')]);_0x258e5a[_0x76aa('0x33')]=_['keys'](_0x22063f[_0x76aa('0x33')]);_0x258e5a[_0x76aa('0x4c')]=_['intersection'](_0x258e5a[_0x76aa('0x31')],_0x258e5a[_0x76aa('0x33')]);_0x11d91f[_0x76aa('0x34')]=_['intersection'](_0x258e5a[_0x76aa('0x31')],qs[_0x76aa('0x36')](_0x22063f['query']['fields']));_0x11d91f['attributes']=_0x11d91f[_0x76aa('0x34')][_0x76aa('0x37')]?_0x11d91f[_0x76aa('0x34')]:_0x258e5a[_0x76aa('0x31')];if(!_0x22063f['query']['hasOwnProperty']('nolimit')){_0x11d91f[_0x76aa('0x12')]=qs['limit'](_0x22063f[_0x76aa('0x33')][_0x76aa('0x12')]);_0x11d91f['offset']=qs[_0x76aa('0x14')](_0x22063f[_0x76aa('0x33')]['offset']);}_0x11d91f[_0x76aa('0x4e')]=qs[_0x76aa('0x4f')](_0x22063f[_0x76aa('0x33')][_0x76aa('0x4f')]);_0x11d91f[_0x76aa('0x2d')]=qs[_0x76aa('0x4c')](_['pick'](_0x22063f[_0x76aa('0x33')],_0x258e5a['filters']));_0x11d91f['where']['VoiceQueueId']=_0x84bc91['id'];if(_0x22063f['query']['filter']){_0x11d91f[_0x76aa('0x2d')]=_[_0x76aa('0x39')](_0x11d91f[_0x76aa('0x2d')],{'$or':_[_0x76aa('0x1e')](_0x11d91f['attributes'],function(_0x447103){var _0x2192ed={};_0x2192ed[_0x447103]={'$like':'%'+_0x22063f[_0x76aa('0x33')][_0x76aa('0x52')]+'%'};return _0x2192ed;})});}_0x11d91f=_[_0x76aa('0x39')]({},_0x11d91f,_0x22063f['options']);return db[_0x76aa('0x57')][_0x76aa('0x13')]({'where':_0x11d91f[_0x76aa('0x2d')]})[_0x76aa('0x17')](function(_0x13be70){_0x1fa86b[_0x76aa('0x13')]=_0x13be70;if(_0x22063f[_0x76aa('0x33')]['includeAll']){_0x11d91f[_0x76aa('0x2e')]=[{'all':!![]}];}return db[_0x76aa('0x57')]['findAll'](_0x11d91f);})['then'](function(_0x216e87){_0x1fa86b[_0x76aa('0x2f')]=_0x216e87;return _0x1fa86b;});}})['then'](respondWithFilteredResult(_0x24331a,_0x11d91f))[_0x76aa('0x3b')](handleError(_0x24331a,null));};exports['getHopperBlacks']=function(_0x28ec11,_0x5cc005){var _0x28b439={'raw':!![],'where':{}};var _0x583924={};var _0x45227e={'count':0x0,'rows':[]};return db[_0x76aa('0x29')][_0x76aa('0x4b')]({'where':{'id':_0x28ec11['params']['id']}})[_0x76aa('0x17')](handleEntityNotFound(_0x5cc005,null))['then'](function(_0x1af32e){if(_0x1af32e){_0x583924[_0x76aa('0x31')]=_['keys'](db['CmHopperBlack'][_0x76aa('0x2a')]);_0x583924[_0x76aa('0x33')]=_[_0x76aa('0x32')](_0x28ec11[_0x76aa('0x33')]);_0x583924['filters']=_['intersection'](_0x583924[_0x76aa('0x31')],_0x583924['query']);_0x28b439[_0x76aa('0x34')]=_['intersection'](_0x583924[_0x76aa('0x31')],qs[_0x76aa('0x36')](_0x28ec11['query'][_0x76aa('0x36')]));_0x28b439['attributes']=_0x28b439['attributes'][_0x76aa('0x37')]?_0x28b439[_0x76aa('0x34')]:_0x583924['model'];if(!_0x28ec11[_0x76aa('0x33')][_0x76aa('0x58')](_0x76aa('0x4d'))){_0x28b439['limit']=qs[_0x76aa('0x12')](_0x28ec11[_0x76aa('0x33')][_0x76aa('0x12')]);_0x28b439[_0x76aa('0x14')]=qs[_0x76aa('0x14')](_0x28ec11[_0x76aa('0x33')][_0x76aa('0x14')]);}_0x28b439[_0x76aa('0x4e')]=qs[_0x76aa('0x4f')](_0x28ec11[_0x76aa('0x33')][_0x76aa('0x4f')]);_0x28b439[_0x76aa('0x2d')]=qs['filters'](_[_0x76aa('0x50')](_0x28ec11[_0x76aa('0x33')],_0x583924['filters']));_0x28b439[_0x76aa('0x2d')][_0x76aa('0x51')]=_0x1af32e['id'];if(_0x28ec11['query']['filter']){_0x28b439[_0x76aa('0x2d')]=_[_0x76aa('0x39')](_0x28b439['where'],{'$or':_[_0x76aa('0x1e')](_0x28b439[_0x76aa('0x34')],function(_0x24af48){var _0x5010c8={};_0x5010c8[_0x24af48]={'$like':'%'+_0x28ec11[_0x76aa('0x33')][_0x76aa('0x52')]+'%'};return _0x5010c8;})});}_0x28b439=_['merge']({},_0x28b439,_0x28ec11[_0x76aa('0x3a')]);return db[_0x76aa('0x59')][_0x76aa('0x13')]({'where':_0x28b439[_0x76aa('0x2d')]})[_0x76aa('0x17')](function(_0x42543c){_0x45227e['count']=_0x42543c;if(_0x28ec11[_0x76aa('0x33')]['includeAll']){_0x28b439[_0x76aa('0x2e')]=[{'all':!![]}];}return db[_0x76aa('0x59')][_0x76aa('0x54')](_0x28b439);})['then'](function(_0x4c5f54){_0x45227e[_0x76aa('0x2f')]=_0x4c5f54;return _0x45227e;});}})[_0x76aa('0x17')](respondWithFilteredResult(_0x5cc005,_0x28b439))[_0x76aa('0x3b')](handleError(_0x5cc005,null));};exports[_0x76aa('0x5a')]=function(_0x1a81fd,_0x1eb8f2){var _0x4f7dd4={};var _0x5a4c03={};var _0x2565a2;var _0x109bd3;return db[_0x76aa('0x29')][_0x76aa('0x4b')]({'where':{'id':_0x1a81fd['params']['id']}})[_0x76aa('0x17')](handleEntityNotFound(_0x1eb8f2,null))['then'](function(_0x54d530){if(_0x54d530){_0x2565a2=_0x54d530;_0x5a4c03[_0x76aa('0x31')]=_[_0x76aa('0x32')](db[_0x76aa('0x5b')]['rawAttributes']);_0x5a4c03[_0x76aa('0x33')]=_[_0x76aa('0x32')](_0x1a81fd[_0x76aa('0x33')]);_0x5a4c03[_0x76aa('0x4c')]=_[_0x76aa('0x35')](_0x5a4c03[_0x76aa('0x31')],_0x5a4c03[_0x76aa('0x33')]);_0x4f7dd4['attributes']=_[_0x76aa('0x35')](_0x5a4c03[_0x76aa('0x31')],qs[_0x76aa('0x36')](_0x1a81fd[_0x76aa('0x33')][_0x76aa('0x36')]));_0x4f7dd4[_0x76aa('0x34')]=_0x4f7dd4['attributes'][_0x76aa('0x37')]?_0x4f7dd4[_0x76aa('0x34')]:_0x5a4c03[_0x76aa('0x31')];_0x4f7dd4[_0x76aa('0x4e')]=qs['sort'](_0x1a81fd[_0x76aa('0x33')][_0x76aa('0x4f')]);_0x4f7dd4[_0x76aa('0x2d')]=qs[_0x76aa('0x4c')](_[_0x76aa('0x50')](_0x1a81fd['query'],_0x5a4c03[_0x76aa('0x4c')]));if(_0x1a81fd[_0x76aa('0x33')]['filter']){_0x4f7dd4['where']=_[_0x76aa('0x39')](_0x4f7dd4[_0x76aa('0x2d')],{'$or':_[_0x76aa('0x1e')](_0x4f7dd4[_0x76aa('0x34')],function(_0x46f098){var _0x293221={};_0x293221[_0x46f098]={'$like':'%'+_0x1a81fd['query'][_0x76aa('0x52')]+'%'};return _0x293221;})});}_0x4f7dd4=_[_0x76aa('0x39')]({},_0x4f7dd4,_0x1a81fd[_0x76aa('0x3a')]);return _0x2565a2[_0x76aa('0x5a')](_0x4f7dd4);}})[_0x76aa('0x17')](function(_0x2e7bb7){if(_0x2e7bb7){_0x109bd3=_0x2e7bb7['length'];if(!_0x1a81fd[_0x76aa('0x33')][_0x76aa('0x58')](_0x76aa('0x4d'))){_0x4f7dd4[_0x76aa('0x12')]=qs[_0x76aa('0x12')](_0x1a81fd[_0x76aa('0x33')]['limit']);_0x4f7dd4[_0x76aa('0x14')]=qs['offset'](_0x1a81fd[_0x76aa('0x33')]['offset']);}return _0x2565a2[_0x76aa('0x5a')](_0x4f7dd4);}})[_0x76aa('0x17')](function(_0x56d6af){if(_0x56d6af){return _0x56d6af?{'count':_0x109bd3,'rows':_0x56d6af}:null;}})[_0x76aa('0x17')](respondWithResult(_0x1eb8f2,null))[_0x76aa('0x3b')](handleError(_0x1eb8f2,null));};exports[_0x76aa('0x5c')]=function(_0x57636c,_0x3ae5e8){var _0x46c818=_0x57636c['body'][_0x76aa('0x5d')];var _0xfe926d=_[_0x76aa('0x1e')](_0x46c818,'id');return db[_0x76aa('0x5b')][_0x76aa('0x54')]({'where':{'id':_0xfe926d},'attributes':['id'],'include':[{'model':db[_0x76aa('0x5e')],'as':'Agents','attributes':['id',_0x76aa('0x23'),_0x76aa('0x5f'),_0x76aa('0x60'),_0x76aa('0x61')],'raw':!![]}]})[_0x76aa('0x17')](function(_0x28e1a4){if(_0x28e1a4){var _0x8bb516=_[_0x76aa('0x62')](_0x28e1a4,function(_0xf9f670){var _0x1359f9=_0xf9f670[_0x76aa('0x18')]({'plain':!![]});_0x1359f9['Agents'][_0x76aa('0x63')](function(_0x58cd0c){_0x58cd0c[_0x76aa('0x64')]=_[_0x76aa('0x22')](_0x46c818,{'id':_0x1359f9['id']})[_0x76aa('0x64')];});return _0x1359f9[_0x76aa('0x65')];});return db[_0x76aa('0x29')][_0x76aa('0x22')]({'where':{'id':_0x57636c['params']['id']}})[_0x76aa('0x17')](function(_0x53090c){return db[_0x76aa('0x66')][_0x76aa('0x67')](function(_0x2045a2){return _0x53090c['addTeams'](_0xfe926d,{'transaction':_0x2045a2})[_0x76aa('0x17')](function(){return BPromise[_0x76aa('0x68')](_0x46c818,function(_0x228968){return db[_0x76aa('0x69')][_0x76aa('0x6a')]({'TeamId':_0x228968['id'],'VoiceQueueId':_0x57636c['params']['id'],'penalty':_0x228968[_0x76aa('0x64')]},{'transaction':_0x2045a2});});})['then'](function(){return BPromise[_0x76aa('0x68')](_0x8bb516,function(_0x1bc764){return db['UserVoiceQueue'][_0x76aa('0x6b')]({'where':{'UserId':_0x1bc764['id'],'VoiceQueueId':_0x57636c[_0x76aa('0x46')]['id']},'defaults':{'penalty':_0x1bc764[_0x76aa('0x64')]},'transaction':_0x2045a2});});})[_0x76aa('0x17')](function(){return BPromise[_0x76aa('0x68')](_[_0x76aa('0x52')](_0x8bb516,{'online':!![]}),function(_0x245af7){return db[_0x76aa('0x6c')]['upsert']({'membername':_0x245af7[_0x76aa('0x23')],'UserId':_0x245af7['id'],'queue_name':_0x53090c[_0x76aa('0x23')],'VoiceQueueId':_0x53090c['id'],'interface':_[_0x76aa('0x6d')](_0x245af7[_0x76aa('0x61')])?util[_0x76aa('0x6e')](_0x76aa('0x6f'),_0x245af7[_0x76aa('0x23')]):_0x245af7[_0x76aa('0x61')],'paused':_0x245af7['voicePause']||![],'penalty':_0x245af7[_0x76aa('0x64')]},{'transaction':_0x2045a2});});})[_0x76aa('0x17')](function(){_0x8bb516[_0x76aa('0x63')](function(_0x54e450){socket[_0x76aa('0x70')](_0x76aa('0x71'),{'UserId':_0x54e450['id'],'VoiceQueueId':_0x53090c['id']});});});});});}})[_0x76aa('0x17')](respondWithStatusCode(_0x3ae5e8,null))[_0x76aa('0x3b')](handleError(_0x3ae5e8,null));};exports[_0x76aa('0x72')]=function(_0x5db8d8,_0x21fd43){return db['Team'][_0x76aa('0x54')]({'where':{'id':_0x5db8d8[_0x76aa('0x33')][_0x76aa('0x73')]},'attributes':['id'],'include':[{'model':db[_0x76aa('0x5e')],'as':_0x76aa('0x65'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x21fd43,null))[_0x76aa('0x17')](function(_0x4920fa){var _0x577463=_[_0x76aa('0x1e')](_0x4920fa,'id');var _0x20ba92=[];var _0x533080=[];var _0x3cd088=squel['select']();_0x3cd088[_0x76aa('0x74')](_0x76aa('0x75'))[_0x76aa('0x76')](_0x76aa('0x77'),'tq')[_0x76aa('0x78')](_0x76aa('0x79'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0x76aa('0x2d')](_0x76aa('0x7a'),_0x5db8d8[_0x76aa('0x46')]['id']);for(var _0x3ebe91=0x0;_0x3ebe91<_0x4920fa[_0x76aa('0x37')];_0x3ebe91+=0x1){let _0x14318c=_0x4920fa[_0x3ebe91];for(var _0xbfa5f8=0x0;_0xbfa5f8<_0x14318c[_0x76aa('0x65')][_0x76aa('0x37')];_0xbfa5f8+=0x1){let _0x46772f=_0x14318c[_0x76aa('0x65')][_0xbfa5f8];var _0x40df44=_0x3cd088[_0x76aa('0x45')]();_0x40df44[_0x76aa('0x2d')](_0x76aa('0x7b'),_0x46772f['id']);_0x533080[_0x76aa('0x7c')](db[_0x76aa('0x66')][_0x76aa('0x33')](_0x40df44['toString'](),{'type':db[_0x76aa('0x66')]['QueryTypes'][_0x76aa('0x7d')]})[_0x76aa('0x17')](function(_0x4a093b){if(_0x4a093b[_0x76aa('0x37')]===0x1){return _0x46772f['id'];}else{var _0x5305f1=_[_0x76aa('0x7e')](_[_0x76aa('0x1e')](_0x4a093b,_0x76aa('0x7f')),function(_0x5ceae2){return _[_0x76aa('0x20')](_0x577463,_0x5ceae2);});if(_0x5305f1){return _0x46772f['id'];}}}));}}return BPromise['all'](_0x533080)['then'](function(_0x3c9841){_0x20ba92=_(_0x20ba92)['union'](_0x3c9841)[_0x76aa('0x80')]()['value']();return db['VoiceQueue'][_0x76aa('0x22')]({'where':{'id':_0x5db8d8[_0x76aa('0x46')]['id']}})[_0x76aa('0x17')](function(_0x3f4ded){return db[_0x76aa('0x66')][_0x76aa('0x67')](function(_0x434634){return _0x3f4ded[_0x76aa('0x72')](_0x5db8d8[_0x76aa('0x33')][_0x76aa('0x73')],{'transaction':_0x434634})[_0x76aa('0x17')](function(){if(!_[_0x76aa('0x81')](_0x20ba92)){return _0x3f4ded[_0x76aa('0x82')](_0x20ba92,{'transaction':_0x434634})[_0x76aa('0x17')](function(){return db['UserVoiceQueueRt'][_0x76aa('0x25')]({'where':{'VoiceQueueId':_0x5db8d8[_0x76aa('0x46')]['id'],'UserId':_0x20ba92},'transaction':_0x434634});});}})[_0x76aa('0x17')](function(){_0x20ba92[_0x76aa('0x63')](function(_0x540bf3){socket[_0x76aa('0x70')]('userVoiceQueue:remove',{'UserId':_0x540bf3,'VoiceQueueId':_0x3f4ded['id']});});});});});});})[_0x76aa('0x17')](respondWithStatusCode(_0x21fd43,null))['catch'](handleError(_0x21fd43,null));};exports[_0x76aa('0x83')]=function(_0x5427f0,_0x3e9153){var _0x490090,_0x31b7a8;return db['VoiceQueue'][_0x76aa('0x22')]({'where':{'id':_0x5427f0[_0x76aa('0x46')]['id']}})['then'](handleEntityNotFound(_0x3e9153,null))[_0x76aa('0x17')](function(_0x51feca){if(_0x51feca){_0x31b7a8=_0x51feca;return _0x51feca[_0x76aa('0x83')](_0x5427f0['body'][_0x76aa('0x73')],_['omit'](_0x5427f0['body'],[_0x76aa('0x73'),'id'])||{})[_0x76aa('0x84')](function(_0x38b6aa){for(var _0x395501=0x0;_0x395501<_0x5427f0[_0x76aa('0x3d')][_0x76aa('0x73')][_0x76aa('0x37')];_0x395501+=0x1){socket[_0x76aa('0x70')](_0x76aa('0x71'),{'UserId':Number(_0x5427f0[_0x76aa('0x3d')]['ids'][_0x395501]),'VoiceQueueId':Number(_0x5427f0[_0x76aa('0x46')]['id'])});}return _0x38b6aa;});}})[_0x76aa('0x17')](function(_0x3d969f){_0x490090=_0x3d969f||[];if(_0x31b7a8){return db[_0x76aa('0x5e')][_0x76aa('0x54')]({'where':{'id':_0x5427f0[_0x76aa('0x3d')][_0x76aa('0x73')]},'attributes':['id',_0x76aa('0x23'),_0x76aa('0x5f'),_0x76aa('0x60'),_0x76aa('0x61')],'raw':!![]});}})[_0x76aa('0x17')](function(_0x3274a9){if(!_[_0x76aa('0x81')](_0x3274a9)){var _0x5c0268=[];for(var _0x5c5a6f=0x0;_0x5c5a6f<_0x3274a9[_0x76aa('0x37')];_0x5c5a6f++){if(_0x3274a9[_0x5c5a6f][_0x76aa('0x5f')]){_0x5c0268[_0x76aa('0x7c')](db['UserVoiceQueueRt']['upsert']({'membername':_0x3274a9[_0x5c5a6f][_0x76aa('0x23')],'UserId':_0x3274a9[_0x5c5a6f]['id'],'queue_name':_0x31b7a8[_0x76aa('0x23')],'VoiceQueueId':_0x31b7a8['id'],'interface':_[_0x76aa('0x6d')](_0x3274a9[_0x5c5a6f]['interface'])?util[_0x76aa('0x6e')](_0x76aa('0x6f'),_0x3274a9[_0x5c5a6f]['name']):_0x3274a9[_0x5c5a6f]['interface'],'paused':_0x3274a9[_0x5c5a6f]['voicePause']||![],'penalty':_0x5427f0[_0x76aa('0x3d')][_0x76aa('0x64')]||0x0}));}}return BPromise[_0x76aa('0x85')](_0x5c0268);}})['then'](function(){return _0x490090;})[_0x76aa('0x17')](respondWithResult(_0x3e9153,null))[_0x76aa('0x3b')](handleError(_0x3e9153,null));};exports['removeAgents']=function(_0x5433dc,_0x328d1a){return db[_0x76aa('0x29')][_0x76aa('0x22')]({'where':{'id':_0x5433dc['params']['id']}})[_0x76aa('0x17')](handleEntityNotFound(_0x328d1a,null))[_0x76aa('0x17')](function(_0x546770){if(_0x546770){return _0x546770[_0x76aa('0x82')](_0x5433dc[_0x76aa('0x33')]['ids'])[_0x76aa('0x17')](function(){if(_[_0x76aa('0x86')](_0x5433dc['query'][_0x76aa('0x73')])){for(var _0x4df504=0x0;_0x4df504<_0x5433dc['query'][_0x76aa('0x73')][_0x76aa('0x37')];_0x4df504+=0x1){socket[_0x76aa('0x70')](_0x76aa('0x87'),{'UserId':Number(_0x5433dc[_0x76aa('0x33')][_0x76aa('0x73')][_0x4df504]),'VoiceQueueId':Number(_0x5433dc[_0x76aa('0x46')]['id'])});}}else{socket[_0x76aa('0x70')](_0x76aa('0x87'),{'UserId':Number(_0x5433dc[_0x76aa('0x33')]['ids']),'VoiceQueueId':Number(_0x5433dc['params']['id'])});}});}})[_0x76aa('0x17')](function(_0x2726da){return db[_0x76aa('0x6c')][_0x76aa('0x25')]({'where':{'VoiceQueueId':_0x5433dc[_0x76aa('0x46')]['id'],'UserId':_0x5433dc[_0x76aa('0x33')]['ids']}})[_0x76aa('0x17')](function(){return _0x2726da;});})[_0x76aa('0x17')](respondWithStatusCode(_0x328d1a,null))[_0x76aa('0x3b')](handleError(_0x328d1a,null));};exports[_0x76aa('0x88')]=function(_0x38694d,_0xf0b932){var _0x1c8cf5={};var _0x5a8d0f={};var _0x5f513d;var _0x54e70c;return db[_0x76aa('0x29')][_0x76aa('0x4b')]({'where':{'id':_0x38694d[_0x76aa('0x46')]['id']}})[_0x76aa('0x17')](handleEntityNotFound(_0xf0b932,null))[_0x76aa('0x17')](function(_0x4afe13){if(_0x4afe13){_0x5f513d=_0x4afe13;_0x5a8d0f['model']=_[_0x76aa('0x32')](db[_0x76aa('0x5e')][_0x76aa('0x2a')]);_0x5a8d0f[_0x76aa('0x33')]=_[_0x76aa('0x32')](_0x38694d['query']);_0x5a8d0f[_0x76aa('0x4c')]=_['intersection'](_0x5a8d0f[_0x76aa('0x31')],_0x5a8d0f['query']);_0x1c8cf5['attributes']=_[_0x76aa('0x35')](_0x5a8d0f['model'],qs[_0x76aa('0x36')](_0x38694d[_0x76aa('0x33')][_0x76aa('0x36')]));_0x1c8cf5[_0x76aa('0x34')]=_0x1c8cf5[_0x76aa('0x34')][_0x76aa('0x37')]?_0x1c8cf5[_0x76aa('0x34')]:_0x5a8d0f[_0x76aa('0x31')];_0x1c8cf5['order']=qs[_0x76aa('0x4f')](_0x38694d[_0x76aa('0x33')][_0x76aa('0x4f')]);_0x1c8cf5[_0x76aa('0x2d')]=qs[_0x76aa('0x4c')](_['pick'](_0x38694d[_0x76aa('0x33')],_0x5a8d0f['filters']));if(_0x38694d[_0x76aa('0x33')]['filter']){_0x1c8cf5[_0x76aa('0x2d')]=_['merge'](_0x1c8cf5[_0x76aa('0x2d')],{'$or':_['map'](_0x1c8cf5[_0x76aa('0x34')],function(_0x8b2ee1){var _0x279be2={};_0x279be2[_0x8b2ee1]={'$like':'%'+_0x38694d['query']['filter']+'%'};return _0x279be2;})});}_0x1c8cf5=_[_0x76aa('0x39')]({},_0x1c8cf5,_0x38694d['options']);return _0x5f513d[_0x76aa('0x88')](_0x1c8cf5);}})[_0x76aa('0x17')](function(_0x1b99d8){if(_0x1b99d8){_0x54e70c=_0x1b99d8['length'];if(!_0x38694d['query']['hasOwnProperty']('nolimit')){_0x1c8cf5[_0x76aa('0x12')]=qs[_0x76aa('0x12')](_0x38694d[_0x76aa('0x33')][_0x76aa('0x12')]);_0x1c8cf5[_0x76aa('0x14')]=qs[_0x76aa('0x14')](_0x38694d[_0x76aa('0x33')][_0x76aa('0x14')]);}return _0x5f513d[_0x76aa('0x88')](_0x1c8cf5);}})[_0x76aa('0x17')](function(_0x2484fd){if(_0x2484fd){return _0x2484fd?{'count':_0x54e70c,'rows':_0x2484fd}:null;}})[_0x76aa('0x17')](respondWithResult(_0xf0b932,null))[_0x76aa('0x3b')](handleError(_0xf0b932,null));};exports['getMembers']=function(_0x2b12e9,_0x4e697b){var _0x1e902d={};var _0x3a7658={};var _0x1b1f85;var _0x3fb275;return db[_0x76aa('0x29')][_0x76aa('0x4b')]({'where':{'id':_0x2b12e9[_0x76aa('0x46')]['id']}})[_0x76aa('0x17')](handleEntityNotFound(_0x4e697b,null))[_0x76aa('0x17')](function(_0x1bdc5c){if(_0x1bdc5c){_0x1b1f85=_0x1bdc5c;_0x3a7658[_0x76aa('0x31')]=_['keys'](db['UserVoiceQueueRt'][_0x76aa('0x2a')]);_0x3a7658[_0x76aa('0x33')]=_['keys'](_0x2b12e9[_0x76aa('0x33')]);_0x3a7658[_0x76aa('0x4c')]=_[_0x76aa('0x35')](_0x3a7658[_0x76aa('0x31')],_0x3a7658[_0x76aa('0x33')]);_0x1e902d[_0x76aa('0x34')]=_[_0x76aa('0x35')](_0x3a7658['model'],qs[_0x76aa('0x36')](_0x2b12e9[_0x76aa('0x33')]['fields']));_0x1e902d['attributes']=_0x1e902d[_0x76aa('0x34')][_0x76aa('0x37')]?_0x1e902d[_0x76aa('0x34')]:_0x3a7658[_0x76aa('0x31')];_0x1e902d[_0x76aa('0x4e')]=qs[_0x76aa('0x4f')](_0x2b12e9[_0x76aa('0x33')][_0x76aa('0x4f')]);_0x1e902d[_0x76aa('0x2d')]=qs[_0x76aa('0x4c')](_[_0x76aa('0x50')](_0x2b12e9[_0x76aa('0x33')],_0x3a7658[_0x76aa('0x4c')]));if(_0x2b12e9['query']['filter']){_0x1e902d[_0x76aa('0x2d')]=_[_0x76aa('0x39')](_0x1e902d[_0x76aa('0x2d')],{'$or':_[_0x76aa('0x1e')](_0x1e902d['attributes'],function(_0x5f3819){var _0x2a8410={};_0x2a8410[_0x5f3819]={'$like':'%'+_0x2b12e9[_0x76aa('0x33')][_0x76aa('0x52')]+'%'};return _0x2a8410;})});}_0x1e902d=_['merge']({},_0x1e902d,_0x2b12e9['options']);return _0x1b1f85['getMembers'](_0x1e902d);}})[_0x76aa('0x17')](function(_0x4df872){if(_0x4df872){_0x3fb275=_0x4df872[_0x76aa('0x37')];if(!_0x2b12e9[_0x76aa('0x33')][_0x76aa('0x58')](_0x76aa('0x4d'))){_0x1e902d[_0x76aa('0x12')]=qs[_0x76aa('0x12')](_0x2b12e9[_0x76aa('0x33')][_0x76aa('0x12')]);_0x1e902d[_0x76aa('0x14')]=qs[_0x76aa('0x14')](_0x2b12e9[_0x76aa('0x33')][_0x76aa('0x14')]);}return _0x1b1f85[_0x76aa('0x89')](_0x1e902d);}})[_0x76aa('0x17')](function(_0x3b1f33){return _0x3b1f33?{'count':_0x3fb275,'rows':_0x3b1f33}:null;})[_0x76aa('0x17')](respondWithResult(_0x4e697b,null))['catch'](handleError(_0x4e697b,null));};exports[_0x76aa('0x8a')]=function(_0x5e8cec,_0x1a37e9){var _0x58932f={};var _0x17bd1a={};var _0x5d7a2b;var _0x363c45;return db['VoiceQueue']['findOne']({'where':{'id':_0x5e8cec[_0x76aa('0x46')]['id']}})[_0x76aa('0x17')](handleEntityNotFound(_0x1a37e9,null))[_0x76aa('0x17')](function(_0x44668d){if(_0x44668d){_0x5d7a2b=_0x44668d;_0x17bd1a[_0x76aa('0x31')]=_[_0x76aa('0x32')](db['CmList'][_0x76aa('0x2a')]);_0x17bd1a[_0x76aa('0x33')]=_[_0x76aa('0x32')](_0x5e8cec[_0x76aa('0x33')]);_0x17bd1a['filters']=_[_0x76aa('0x35')](_0x17bd1a[_0x76aa('0x31')],_0x17bd1a[_0x76aa('0x33')]);_0x58932f[_0x76aa('0x34')]=_[_0x76aa('0x35')](_0x17bd1a[_0x76aa('0x31')],qs[_0x76aa('0x36')](_0x5e8cec[_0x76aa('0x33')][_0x76aa('0x36')]));_0x58932f[_0x76aa('0x34')]=_0x58932f[_0x76aa('0x34')][_0x76aa('0x37')]?_0x58932f['attributes']:_0x17bd1a['model'];_0x58932f[_0x76aa('0x4e')]=qs[_0x76aa('0x4f')](_0x5e8cec[_0x76aa('0x33')][_0x76aa('0x4f')]);_0x58932f[_0x76aa('0x2d')]=qs[_0x76aa('0x4c')](_[_0x76aa('0x50')](_0x5e8cec[_0x76aa('0x33')],_0x17bd1a[_0x76aa('0x4c')]));if(_0x5e8cec[_0x76aa('0x33')][_0x76aa('0x52')]){_0x58932f['where']=_[_0x76aa('0x39')](_0x58932f['where'],{'$or':_[_0x76aa('0x1e')](_0x58932f[_0x76aa('0x34')],function(_0x278bac){var _0x14256c={};_0x14256c[_0x278bac]={'$like':'%'+_0x5e8cec[_0x76aa('0x33')]['filter']+'%'};return _0x14256c;})});}_0x58932f=_['merge']({},_0x58932f,_0x5e8cec[_0x76aa('0x3a')]);return _0x5d7a2b['getLists'](_0x58932f);}})[_0x76aa('0x17')](function(_0xb760ca){if(_0xb760ca){_0x363c45=_0xb760ca[_0x76aa('0x37')];if(!_0x5e8cec[_0x76aa('0x33')][_0x76aa('0x58')]('nolimit')){_0x58932f['limit']=qs[_0x76aa('0x12')](_0x5e8cec[_0x76aa('0x33')][_0x76aa('0x12')]);_0x58932f[_0x76aa('0x14')]=qs[_0x76aa('0x14')](_0x5e8cec[_0x76aa('0x33')][_0x76aa('0x14')]);}return _0x5d7a2b[_0x76aa('0x8a')](_0x58932f);}})[_0x76aa('0x17')](function(_0x33644d){if(_0x33644d){return _0x33644d?{'count':_0x363c45,'rows':_0x33644d}:null;}})['then'](respondWithResult(_0x1a37e9,null))[_0x76aa('0x3b')](handleError(_0x1a37e9,null));};exports[_0x76aa('0x8b')]=function(_0x4830ea,_0x20638f){var _0x2b2f27=moment()[_0x76aa('0x6e')](_0x76aa('0x8c'));var _0x1a5297,_0x487c28;return db[_0x76aa('0x29')]['find']({'where':{'id':_0x4830ea[_0x76aa('0x46')]['id']}})[_0x76aa('0x17')](handleEntityNotFound(_0x20638f,null))[_0x76aa('0x17')](function(_0x2f2a27){if(_0x2f2a27){_0x487c28=_0x2f2a27;return _0x2f2a27['addLists'](_0x4830ea[_0x76aa('0x3d')][_0x76aa('0x73')],_[_0x76aa('0x47')](_0x4830ea[_0x76aa('0x3d')],[_0x76aa('0x73'),'id'])||{});}return null;})[_0x76aa('0x84')](function(_0xca12fa){var _0xb0a4e1;_0x1a5297=_0xca12fa||[];var _0x1f7f1d=[];if(_0xca12fa){for(var _0x413528=0x0;_0x413528<_0xca12fa[_0x76aa('0x37')];_0x413528+=0x1){var _0x39de41=_0xca12fa[_0x413528][_0x76aa('0x18')]({'plain':!![]});_0x487c28[_0x76aa('0x8d')]=_0x4830ea['body']['dialCheckDuplicateType']?_0x4830ea[_0x76aa('0x3d')][_0x76aa('0x8d')]:_0x487c28['dialCheckDuplicateType'];switch(_0x487c28[_0x76aa('0x8d')]){case'always':_0xb0a4e1=squel[_0x76aa('0x8e')]()[_0x76aa('0x8f')](_0x76aa('0x90'))[_0x76aa('0x91')]([_0x76aa('0x92'),_0x76aa('0x93'),_0x76aa('0x94'),_0x76aa('0x95'),'VoiceQueueId',_0x76aa('0x49'),_0x76aa('0x48')],squel['select']()['field'](_0x76aa('0x92'),_0x76aa('0x92'))[_0x76aa('0x74')]('\x27'+_0x2b2f27+'\x27',_0x76aa('0x93'))[_0x76aa('0x74')]('id','ContactId')[_0x76aa('0x74')](_0x39de41['CmListId'][_0x76aa('0x96')](),_0x76aa('0x95'))[_0x76aa('0x74')](_0x4830ea[_0x76aa('0x46')]['id'][_0x76aa('0x96')](),_0x76aa('0x51'))[_0x76aa('0x74')]('\x27'+_0x2b2f27+'\x27',_0x76aa('0x49'))[_0x76aa('0x74')]('\x27'+_0x2b2f27+'\x27',_0x76aa('0x48'))[_0x76aa('0x76')](_0x76aa('0x97'))[_0x76aa('0x2d')]('deletedAt\x20IS\x20NULL')[_0x76aa('0x2d')]('ListId\x20=\x20?',_0x39de41['CmListId']['toString']())[_0x76aa('0x2d')]('phone\x20IS\x20NOT\x20NULL')['where']('phone\x20NOT\x20IN\x20(?)',squel['select']()[_0x76aa('0x74')](_0x76aa('0x98'))['from'](_0x76aa('0x99'))[_0x76aa('0x2d')](_0x76aa('0x7a'),_0x4830ea['params']['id']['toString']()))['where'](_0x76aa('0x9a'),squel['select']()[_0x76aa('0x74')](_0x76aa('0x9b'))['from'](_0x76aa('0x90'))[_0x76aa('0x2d')]('VoiceQueueId\x20=\x20?',_0x4830ea[_0x76aa('0x46')]['id'][_0x76aa('0x96')]())))[_0x76aa('0x96')]();break;case _0x76aa('0x9c'):_0xb0a4e1=squel[_0x76aa('0x8e')]()[_0x76aa('0x8f')](_0x76aa('0x90'))[_0x76aa('0x91')](['phone',_0x76aa('0x93'),_0x76aa('0x94'),_0x76aa('0x95'),_0x76aa('0x51'),_0x76aa('0x49'),_0x76aa('0x48')],squel[_0x76aa('0x9d')]()[_0x76aa('0x74')](_0x76aa('0x92'),_0x76aa('0x92'))['field']('\x27'+_0x2b2f27+'\x27',_0x76aa('0x93'))[_0x76aa('0x74')]('id',_0x76aa('0x94'))['field'](_0x39de41['CmListId']['toString'](),_0x76aa('0x95'))[_0x76aa('0x74')](_0x4830ea['params']['id'][_0x76aa('0x96')](),'VoiceQueueId')['field']('\x27'+_0x2b2f27+'\x27',_0x76aa('0x49'))[_0x76aa('0x74')]('\x27'+_0x2b2f27+'\x27','updatedAt')[_0x76aa('0x76')](_0x76aa('0x97'))[_0x76aa('0x2d')]('deletedAt\x20IS\x20NULL')[_0x76aa('0x2d')](_0x76aa('0x9e'),_0x39de41[_0x76aa('0x9f')][_0x76aa('0x96')]())[_0x76aa('0x2d')](_0x76aa('0xa0'))[_0x76aa('0x2d')](_0x76aa('0x9a'),squel[_0x76aa('0x9d')]()[_0x76aa('0x74')](_0x76aa('0x9b'))['from'](_0x76aa('0x90'))[_0x76aa('0x2d')](_0x76aa('0x7a'),_0x4830ea['params']['id']['toString']())))[_0x76aa('0x96')]();break;default:_0xb0a4e1=squel[_0x76aa('0x8e')]()[_0x76aa('0x8f')]('cm_hopper')[_0x76aa('0x91')]([_0x76aa('0x92'),_0x76aa('0x93'),_0x76aa('0x94'),_0x76aa('0x95'),_0x76aa('0x51'),_0x76aa('0x49'),_0x76aa('0x48')],squel[_0x76aa('0x9d')]()[_0x76aa('0x74')](_0x76aa('0x92'),_0x76aa('0x92'))[_0x76aa('0x74')]('\x27'+_0x2b2f27+'\x27',_0x76aa('0x93'))['field']('id',_0x76aa('0x94'))['field'](_0x39de41[_0x76aa('0x9f')]['toString'](),_0x76aa('0x95'))[_0x76aa('0x74')](_0x4830ea[_0x76aa('0x46')]['id']['toString'](),_0x76aa('0x51'))[_0x76aa('0x74')]('\x27'+_0x2b2f27+'\x27',_0x76aa('0x49'))[_0x76aa('0x74')]('\x27'+_0x2b2f27+'\x27',_0x76aa('0x48'))[_0x76aa('0x76')]('cm_contacts')['where'](_0x76aa('0xa1'))[_0x76aa('0x2d')](_0x76aa('0x9e'),_0x39de41['CmListId']['toString']())[_0x76aa('0x2d')](_0x76aa('0xa0')))[_0x76aa('0x96')]();}_0x1f7f1d['push'](db['sequelize'][_0x76aa('0x33')](_0xb0a4e1));}return BPromise[_0x76aa('0x85')](_0x1f7f1d);}})[_0x76aa('0x17')](function(){var _0xbb19e4=[];var _0x226b44=squel[_0x76aa('0x8e')]()[_0x76aa('0x8f')](_0x76aa('0xa2'))['fromQuery']([_0x76aa('0xa3'),_0x76aa('0x92'),_0x76aa('0xa4'),'createdAt',_0x76aa('0x48')],squel[_0x76aa('0x9d')]()[_0x76aa('0x74')]('h.id')['field'](_0x76aa('0xa5'))['field'](_0x76aa('0xa6'))[_0x76aa('0x74')]('\x27'+_0x2b2f27+'\x27',_0x76aa('0x49'))[_0x76aa('0x74')]('\x27'+_0x2b2f27+'\x27','updatedAt')['from'](_0x76aa('0xa7'),'ci')[_0x76aa('0x78')](_0x76aa('0x90'),'h',_0x76aa('0xa8'))[_0x76aa('0x2d')](_0x76aa('0xa9'),_0x2b2f27)['where'](_0x76aa('0xaa'),_0x76aa('0xab')))[_0x76aa('0x96')]();_0xbb19e4['push'](db[_0x76aa('0x66')][_0x76aa('0x33')](_0x226b44));return BPromise[_0x76aa('0x85')](_0xbb19e4);})['then'](function(){return _0x1a5297;})[_0x76aa('0x17')](respondWithResult(_0x20638f,null))['catch'](handleError(_0x20638f,null));};exports['removeLists']=function(_0xef9ea7,_0x45f21f){return db[_0x76aa('0x29')]['find']({'where':{'id':_0xef9ea7[_0x76aa('0x46')]['id']}})['then'](handleEntityNotFound(_0x45f21f,null))[_0x76aa('0x17')](function(_0x113e70){if(_0x113e70){return _0x113e70['removeLists'](_0xef9ea7[_0x76aa('0x33')]['ids']);}})['then'](function(_0x583d68){if(_0x583d68){return db[_0x76aa('0x53')]['destroy']({'where':{'ListId':_0xef9ea7[_0x76aa('0x33')]['ids'],'VoiceQueueId':_0xef9ea7['params']['id']}})[_0x76aa('0x17')](function(){return _0x583d68;});}})['then'](respondWithStatusCode(_0x45f21f,null))['catch'](handleError(_0x45f21f,null));};exports[_0x76aa('0xac')]=function(_0x3b7370,_0x1c3431){var _0x865a1b={};var _0x132d60={};var _0x1a3074;var _0x3184a2;return db['VoiceQueue']['findOne']({'where':{'id':_0x3b7370[_0x76aa('0x46')]['id']}})[_0x76aa('0x17')](handleEntityNotFound(_0x1c3431,null))[_0x76aa('0x17')](function(_0x274356){if(_0x274356){_0x1a3074=_0x274356;_0x132d60[_0x76aa('0x31')]=_[_0x76aa('0x32')](db[_0x76aa('0xad')][_0x76aa('0x2a')]);_0x132d60[_0x76aa('0x33')]=_['keys'](_0x3b7370['query']);_0x132d60[_0x76aa('0x4c')]=_[_0x76aa('0x35')](_0x132d60[_0x76aa('0x31')],_0x132d60[_0x76aa('0x33')]);_0x865a1b['attributes']=_['intersection'](_0x132d60[_0x76aa('0x31')],qs['fields'](_0x3b7370[_0x76aa('0x33')][_0x76aa('0x36')]));_0x865a1b['attributes']=_0x865a1b[_0x76aa('0x34')][_0x76aa('0x37')]?_0x865a1b[_0x76aa('0x34')]:_0x132d60[_0x76aa('0x31')];_0x865a1b[_0x76aa('0x4e')]=qs['sort'](_0x3b7370[_0x76aa('0x33')][_0x76aa('0x4f')]);_0x865a1b['where']=qs['filters'](_[_0x76aa('0x50')](_0x3b7370[_0x76aa('0x33')],_0x132d60[_0x76aa('0x4c')]));if(_0x3b7370[_0x76aa('0x33')][_0x76aa('0x52')]){_0x865a1b[_0x76aa('0x2d')]=_[_0x76aa('0x39')](_0x865a1b[_0x76aa('0x2d')],{'$or':_[_0x76aa('0x1e')](_0x865a1b[_0x76aa('0x34')],function(_0xbb0ea3){var _0x4978dd={};_0x4978dd[_0xbb0ea3]={'$like':'%'+_0x3b7370[_0x76aa('0x33')][_0x76aa('0x52')]+'%'};return _0x4978dd;})});}_0x865a1b=_[_0x76aa('0x39')]({},_0x865a1b,_0x3b7370[_0x76aa('0x3a')]);return _0x1a3074['getBlackLists'](_0x865a1b);}})['then'](function(_0x4ee1d3){if(_0x4ee1d3){_0x3184a2=_0x4ee1d3['length'];if(!_0x3b7370[_0x76aa('0x33')][_0x76aa('0x58')](_0x76aa('0x4d'))){_0x865a1b[_0x76aa('0x12')]=qs[_0x76aa('0x12')](_0x3b7370[_0x76aa('0x33')][_0x76aa('0x12')]);_0x865a1b['offset']=qs['offset'](_0x3b7370[_0x76aa('0x33')]['offset']);}return _0x1a3074[_0x76aa('0xac')](_0x865a1b);}})[_0x76aa('0x17')](function(_0x3bc149){if(_0x3bc149){return _0x3bc149?{'count':_0x3184a2,'rows':_0x3bc149}:null;}})['then'](respondWithResult(_0x1c3431,null))[_0x76aa('0x3b')](handleError(_0x1c3431,null));};exports[_0x76aa('0xae')]=function(_0x29e112,_0x3fd683){var _0x5c2c4d;return db[_0x76aa('0x29')][_0x76aa('0x22')]({'where':{'id':_0x29e112[_0x76aa('0x46')]['id']}})['then'](handleEntityNotFound(_0x3fd683,null))[_0x76aa('0x17')](function(_0xcb041d){if(_0xcb041d){return _0xcb041d[_0x76aa('0xae')](_0x29e112[_0x76aa('0x3d')][_0x76aa('0x73')],_[_0x76aa('0x47')](_0x29e112[_0x76aa('0x3d')],['ids','id'])||{});}return null;})['spread'](function(_0x72b9a){var _0x29db0f;_0x5c2c4d=_0x72b9a||[];var _0x28a212=[];if(_0x72b9a){for(var _0x242cd6=0x0;_0x242cd6<_0x72b9a[_0x76aa('0x37')];_0x242cd6+=0x1){var _0xeb428a=_0x72b9a[_0x242cd6][_0x76aa('0x18')]({'plain':!![]});_0x29db0f=squel[_0x76aa('0x8e')]()[_0x76aa('0x8f')](_0x76aa('0xaf'))[_0x76aa('0x91')]([_0x76aa('0x92'),_0x76aa('0x94'),_0x76aa('0x95'),_0x76aa('0x51'),_0x76aa('0x49'),_0x76aa('0x48')],squel[_0x76aa('0x9d')]()[_0x76aa('0x74')](_0x76aa('0x92'),_0x76aa('0x92'))[_0x76aa('0x74')]('id',_0x76aa('0x94'))[_0x76aa('0x74')](_0xeb428a[_0x76aa('0x9f')][_0x76aa('0x96')](),_0x76aa('0x95'))[_0x76aa('0x74')](_0x29e112['params']['id'][_0x76aa('0x96')](),_0x76aa('0x51'))[_0x76aa('0x74')](_0x76aa('0xb0'),'createdAt')[_0x76aa('0x74')](_0x76aa('0xb0'),_0x76aa('0x48'))['from'](_0x76aa('0x97'))[_0x76aa('0x2d')]('deletedAt\x20IS\x20NULL')[_0x76aa('0x2d')]('ListId\x20=\x20?',_0xeb428a[_0x76aa('0x9f')][_0x76aa('0x96')]())[_0x76aa('0x2d')](_0x76aa('0xa0')))['toString']();_0x28a212[_0x76aa('0x7c')](db['sequelize'][_0x76aa('0x33')](_0x29db0f));}return BPromise['all'](_0x28a212);}})[_0x76aa('0x17')](function(){return _0x5c2c4d;})['then'](respondWithResult(_0x3fd683,null))[_0x76aa('0x3b')](handleError(_0x3fd683,null));};exports[_0x76aa('0xb1')]=function(_0x140ee1,_0x3d9e9e){return db[_0x76aa('0x29')][_0x76aa('0x22')]({'where':{'id':_0x140ee1['params']['id']}})[_0x76aa('0x17')](handleEntityNotFound(_0x3d9e9e,null))[_0x76aa('0x17')](function(_0x139e67){if(_0x139e67){return _0x139e67[_0x76aa('0xb1')](_0x140ee1['query'][_0x76aa('0x73')]);}})[_0x76aa('0x17')](function(_0x506cad){if(_0x506cad){return db['CmHopperBlack'][_0x76aa('0x25')]({'where':{'ListId':_0x140ee1[_0x76aa('0x33')][_0x76aa('0x73')],'VoiceQueueId':_0x140ee1[_0x76aa('0x46')]['id']}})['then'](function(){return _0x506cad;});}})['then'](respondWithStatusCode(_0x3d9e9e,null))[_0x76aa('0x3b')](handleError(_0x3d9e9e,null));};
\ No newline at end of file
+var _0x7217=['toString','QueryTypes','SELECT','every','TeamId','includes','all','union','compact','ids','emit','userVoiceQueue:remove','addAgents','isEmpty','removeAgents','getAgents','getMembers','getLists','CmList','addLists','YYYY-MM-DD\x20HH:mm:ss','spread','dialCheckDuplicateType','always','insert','into','scheduledAt','ContactId','ListId','phone','CmListId','cm_contacts','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','COALESCE(calleridnum,\x27\x27)','cm_hopper_final','COALESCE(phone,\x27\x27)','onlyIfOpen','cm_hopper','fromQuery','cm_hopper_additional_phones','CmHopperId','OrderBy','h.id','ci.item','ci.OrderBy+1','cm_contact_has_items','h.ContactId=ci.CmContactId','h.scheduledat=?','ci.ItemClass=?','removeLists','getBlackLists','addBlackLists','cm_hopper_black','NOW()','removeBlackLists','moment','util','lodash','squel','ioredis','../../components/parsers/qs','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./voiceQueue.socket','register','sendStatus','status','json','offset','undefined','count','set','Content-Range','then','destroy','get','VoiceQueues','inbound','QueueCampaigns','filter','ignore','map','value','type','find','name','UserProfileResource','end','error','send','index','VoiceQueue','fieldName','getOptions','where','include','query','findAll','rows','catch','params','model','keys','rawAttributes','filters','attributes','intersection','fields','length','options','create','user','role','outbound','UserProfileSection','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','includeAll','omit','createdAt','updatedAt','body','merge','Unable\x20to\x20retrieve\x20the\x20current\x20user','autoAssociation','getHoppers','findOne','CmHopper','hasOwnProperty','nolimit','limit','order','sort','pick','VoiceQueueId','CmHopperHistory','CmHopperFinal','getHopperBlacks','CmHopperBlack','Team','getTeams','teams','User','online','flatMap','penalty','sequelize','transaction','addTeams','upsert','each','UserVoiceQueueRt','isNil','interface','format','SIP/%s','voicePause','forEach','userVoiceQueue:save','removeTeams','Agents','select','field','from','team_has_voice_queues','join','user_has_teams','VoiceQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push'];(function(_0x2de0a7,_0x38d3e7){var _0x429437=function(_0x23c148){while(--_0x23c148){_0x2de0a7['push'](_0x2de0a7['shift']());}};_0x429437(++_0x38d3e7);}(_0x7217,0x19e));var _0x7721=function(_0x3635ce,_0x33a6f9){_0x3635ce=_0x3635ce-0x0;var _0x97ecd0=_0x7217[_0x3635ce];return _0x97ecd0;};'use strict';var moment=require(_0x7721('0x0'));var BPromise=require('bluebird');var util=require(_0x7721('0x1'));var _=require(_0x7721('0x2'));var squel=require(_0x7721('0x3'));var Redis=require(_0x7721('0x4'));var qs=require(_0x7721('0x5'));var logger=require('../../config/logger')('api');var config=require(_0x7721('0x6'));var db=require(_0x7721('0x7'))['db'];config[_0x7721('0x8')]=_[_0x7721('0x9')](config[_0x7721('0x8')],{'host':_0x7721('0xa'),'port':0x18eb});var socket=require(_0x7721('0xb'))(new Redis(config[_0x7721('0x8')]));require(_0x7721('0xc'))[_0x7721('0xd')](socket);function respondWithStatusCode(_0x3e6368,_0x2a66cb){_0x2a66cb=_0x2a66cb||0xcc;return function(_0xfa8835){if(_0xfa8835){return _0x3e6368[_0x7721('0xe')](_0x2a66cb);}return _0x3e6368[_0x7721('0xf')](_0x2a66cb)['end']();};}function respondWithResult(_0x461d1a,_0x29bc8f){_0x29bc8f=_0x29bc8f||0xc8;return function(_0x8729a6){if(_0x8729a6){return _0x461d1a[_0x7721('0xf')](_0x29bc8f)[_0x7721('0x10')](_0x8729a6);}};}function respondWithFilteredResult(_0x409b37,_0x1e7fd7){return function(_0x27b36b){if(_0x27b36b){var _0x55b4ca=typeof _0x1e7fd7[_0x7721('0x11')]===_0x7721('0x12')&&typeof _0x1e7fd7['limit']===_0x7721('0x12');var _0x30da54=_0x27b36b[_0x7721('0x13')];var _0x2e9752=_0x55b4ca?0x0:_0x1e7fd7['offset'];var _0x3cbce8=_0x55b4ca?_0x27b36b[_0x7721('0x13')]:_0x1e7fd7['offset']+_0x1e7fd7['limit'];var _0x4b183e;if(_0x3cbce8>=_0x30da54){_0x3cbce8=_0x30da54;_0x4b183e=0xc8;}else{_0x4b183e=0xce;}_0x409b37[_0x7721('0xf')](_0x4b183e);return _0x409b37[_0x7721('0x14')](_0x7721('0x15'),_0x2e9752+'-'+_0x3cbce8+'/'+_0x30da54)[_0x7721('0x10')](_0x27b36b);}return null;};}function saveUpdates(_0x5ed94b){return function(_0x20f669){if(_0x20f669){return _0x20f669['update'](_0x5ed94b)[_0x7721('0x16')](function(_0x5cb0e6){return _0x5cb0e6;});}return null;};}function removeEntity(_0xfec626){return function(_0x4e96fb){if(_0x4e96fb){return _0x4e96fb[_0x7721('0x17')]()[_0x7721('0x16')](function(){var _0x2286e5=_0x4e96fb[_0x7721('0x18')]({'plain':!![]});var _0x402820=[{'name':_0x7721('0x19'),'value':_0x7721('0x1a'),'ignore':![]},{'name':_0x7721('0x1b'),'value':'outbound','ignore':![]}];var _0x288f7e=_(_0x402820)[_0x7721('0x1c')](_0x7721('0x1d'))[_0x7721('0x1e')]('value')[_0x7721('0x1f')]();if(_['includes'](_0x288f7e,_0x2286e5[_0x7721('0x20')])){return;}var _0x288e3a=_[_0x7721('0x21')](_0x402820,[_0x7721('0x1f'),_0x2286e5[_0x7721('0x20')]])[_0x7721('0x22')];return db[_0x7721('0x23')]['destroy']({'where':{'type':_0x288e3a,'resourceId':_0x2286e5['id']}})[_0x7721('0x16')](function(){return _0x4e96fb;});})[_0x7721('0x16')](function(){_0xfec626[_0x7721('0xf')](0xcc)[_0x7721('0x24')]();});}};}function handleEntityNotFound(_0x40d550){return function(_0x16355a){if(!_0x16355a){_0x40d550[_0x7721('0xe')](0x194);}return _0x16355a;};}function handleError(_0xf753f1,_0x40f367){_0x40f367=_0x40f367||0x1f4;return function(_0x52316e){logger[_0x7721('0x25')](_0x52316e['stack']);if(_0x52316e['name']){delete _0x52316e[_0x7721('0x22')];}_0xf753f1[_0x7721('0xf')](_0x40f367)[_0x7721('0x26')](_0x52316e);};}exports[_0x7721('0x27')]=function(_0x1ea4d,_0x37b9f0){var _0xd7d703={};var _0x1da2d8={'count':0x0,'rows':[]};var _0x5c54f0=_[_0x7721('0x1e')](db[_0x7721('0x28')]['rawAttributes'],function(_0x4a25c9){return{'name':_0x4a25c9[_0x7721('0x29')],'type':_0x4a25c9[_0x7721('0x20')]['key']};});_0xd7d703=qs[_0x7721('0x2a')](_0x5c54f0,_0x1ea4d);var _0x4651b5={'where':_0xd7d703[_0x7721('0x2b')]};return db['VoiceQueue'][_0x7721('0x13')](_0x4651b5)[_0x7721('0x16')](function(_0x1492d4){_0x1da2d8[_0x7721('0x13')]=_0x1492d4;_0xd7d703[_0x7721('0x2c')]=qs['include'](_0x1ea4d[_0x7721('0x2d')]);return db[_0x7721('0x28')][_0x7721('0x2e')](_0xd7d703);})['then'](function(_0x35de7a){_0x1da2d8[_0x7721('0x2f')]=_0x35de7a;return _0x1da2d8;})['then'](respondWithFilteredResult(_0x37b9f0,_0xd7d703))[_0x7721('0x30')](handleError(_0x37b9f0,null));};exports['show']=function(_0x2d6ba0,_0x326c50){var _0x19d082={'raw':![],'where':{'id':_0x2d6ba0[_0x7721('0x31')]['id']}},_0x1d894b={};_0x1d894b[_0x7721('0x32')]=_[_0x7721('0x33')](db[_0x7721('0x28')][_0x7721('0x34')]);_0x1d894b[_0x7721('0x2d')]=_[_0x7721('0x33')](_0x2d6ba0['query']);_0x1d894b[_0x7721('0x35')]=_['intersection'](_0x1d894b[_0x7721('0x32')],_0x1d894b[_0x7721('0x2d')]);_0x19d082[_0x7721('0x36')]=_[_0x7721('0x37')](_0x1d894b[_0x7721('0x32')],qs[_0x7721('0x38')](_0x2d6ba0['query']['fields']));_0x19d082['attributes']=_0x19d082['attributes'][_0x7721('0x39')]?_0x19d082[_0x7721('0x36')]:_0x1d894b[_0x7721('0x32')];if(_0x2d6ba0[_0x7721('0x2d')]['includeAll']){_0x19d082[_0x7721('0x2c')]=[{'all':!![]}];}_0x19d082=_['merge']({},_0x19d082,_0x2d6ba0[_0x7721('0x3a')]);return db[_0x7721('0x28')]['find'](_0x19d082)[_0x7721('0x16')](handleEntityNotFound(_0x326c50,null))[_0x7721('0x16')](respondWithResult(_0x326c50,null))['catch'](handleError(_0x326c50,null));};exports['create']=function(_0x3d84d3,_0xfc4dc4){return db[_0x7721('0x28')][_0x7721('0x3b')](_0x3d84d3['body'],{})[_0x7721('0x16')](function(_0x120de9){var _0x40ce8c=_0x3d84d3[_0x7721('0x3c')][_0x7721('0x18')]({'plain':!![]});if(!_0x40ce8c)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0x40ce8c[_0x7721('0x3d')]==='user'){var _0xaa3216=_0x120de9['get']({'plain':!![]});var _0x2333b8=[{'name':_0x7721('0x19'),'value':_0x7721('0x1a')},{'name':'QueueCampaigns','value':_0x7721('0x3e')}];var _0x11d853=_[_0x7721('0x21')](_0x2333b8,['value',_0xaa3216[_0x7721('0x20')]])[_0x7721('0x22')];return db[_0x7721('0x3f')][_0x7721('0x21')]({'where':{'name':_0x11d853,'userProfileId':_0x40ce8c[_0x7721('0x40')]},'raw':!![]})[_0x7721('0x16')](function(_0x463ccc){if(_0x463ccc&&_0x463ccc['autoAssociation']===0x0){return db['UserProfileResource'][_0x7721('0x3b')]({'name':_0xaa3216[_0x7721('0x22')],'resourceId':_0xaa3216['id'],'type':_0x463ccc[_0x7721('0x22')],'sectionId':_0x463ccc['id']},{})[_0x7721('0x16')](function(){return _0x120de9;});}else{return _0x120de9;}})[_0x7721('0x30')](function(_0x15181b){logger[_0x7721('0x25')](_0x7721('0x41'),_0x15181b);throw _0x15181b;});}return _0x120de9;})[_0x7721('0x16')](respondWithResult(_0xfc4dc4,0xc9))[_0x7721('0x30')](handleError(_0xfc4dc4,null));};exports['clone']=function(_0x578867,_0x5ed70d){var _0x6a4664={'where':{'id':_0x578867[_0x7721('0x31')]['id']}},_0x151f69={};_0x151f69['model']=_[_0x7721('0x33')](db[_0x7721('0x28')]['rawAttributes']);_0x6a4664[_0x7721('0x36')]=_['intersection'](_0x151f69[_0x7721('0x32')],qs['fields'](_0x578867[_0x7721('0x2d')][_0x7721('0x38')]));_0x6a4664[_0x7721('0x36')]=_0x6a4664['attributes'][_0x7721('0x39')]?_0x6a4664[_0x7721('0x36')]:_0x151f69['model'];if(_0x578867[_0x7721('0x2d')][_0x7721('0x42')]){_0x6a4664[_0x7721('0x2c')]=[{'all':!![]}];}_0x6a4664=_['merge']({},_0x6a4664,_0x578867[_0x7721('0x3a')]);return db['VoiceQueue'][_0x7721('0x21')](_0x6a4664)[_0x7721('0x16')](handleEntityNotFound(_0x5ed70d,null))[_0x7721('0x16')](function(_0x443503){if(_0x443503){var _0x1c95d8=_0x443503[_0x7721('0x18')]({'plain':!![]});_0x1c95d8=qs[_0x7721('0x43')](_0x1c95d8,['id',_0x7721('0x44'),_0x7721('0x45')]);_0x578867[_0x7721('0x46')]=_[_0x7721('0x43')](_0x578867[_0x7721('0x46')],['id',_0x7721('0x44'),_0x7721('0x45')]);return db[_0x7721('0x28')]['create'](_[_0x7721('0x47')](_0x1c95d8,_0x578867[_0x7721('0x46')]),{'include':_0x578867[_0x7721('0x2d')][_0x7721('0x42')]?[{'all':!![]}]:undefined})[_0x7721('0x16')](function(_0x315127){var _0x267f5e=_0x578867['user'][_0x7721('0x18')]({'plain':!![]});if(!_0x267f5e)throw new Error(_0x7721('0x48'));if(_0x267f5e[_0x7721('0x3d')]===_0x7721('0x3c')){var _0x1f1e84=_0x315127[_0x7721('0x18')]({'plain':!![]});var _0x7fbd6c=[{'name':_0x7721('0x19'),'value':_0x7721('0x1a')},{'name':_0x7721('0x1b'),'value':_0x7721('0x3e')}];var _0x52e870=_[_0x7721('0x21')](_0x7fbd6c,[_0x7721('0x1f'),_0x1f1e84[_0x7721('0x20')]])[_0x7721('0x22')];return db[_0x7721('0x3f')][_0x7721('0x21')]({'where':{'name':_0x52e870,'userProfileId':_0x267f5e[_0x7721('0x40')]},'raw':!![]})[_0x7721('0x16')](function(_0x360882){if(_0x360882&&_0x360882[_0x7721('0x49')]===0x0){return db[_0x7721('0x23')][_0x7721('0x3b')]({'name':_0x1f1e84[_0x7721('0x22')],'resourceId':_0x1f1e84['id'],'type':_0x360882[_0x7721('0x22')],'sectionId':_0x360882['id']},{})[_0x7721('0x16')](function(){return _0x315127;});}else{return _0x315127;}})['catch'](function(_0x50e9e9){logger['error'](_0x7721('0x41'),_0x50e9e9);throw _0x50e9e9;});}return _0x315127;});}})['then'](respondWithResult(_0x5ed70d,0xc9))['catch'](handleError(_0x5ed70d,null));};exports['update']=function(_0x5d7036,_0x47925a){if(_0x5d7036[_0x7721('0x46')]['id']){delete _0x5d7036[_0x7721('0x46')]['id'];}return db['VoiceQueue'][_0x7721('0x21')]({'where':{'id':_0x5d7036['params']['id']}})['then'](handleEntityNotFound(_0x47925a,null))['then'](saveUpdates(_0x5d7036[_0x7721('0x46')],null))['then'](respondWithResult(_0x47925a,null))['catch'](handleError(_0x47925a,null));};exports['destroy']=function(_0x160292,_0x2e9155){return db[_0x7721('0x28')]['find']({'where':{'id':_0x160292[_0x7721('0x31')]['id']}})[_0x7721('0x16')](handleEntityNotFound(_0x2e9155,null))[_0x7721('0x16')](removeEntity(_0x2e9155,null))[_0x7721('0x30')](handleError(_0x2e9155,null));};exports[_0x7721('0x4a')]=function(_0x16e80b,_0xad43ce){var _0x3e3301={'raw':![],'where':{}};var _0x127f46={};var _0x197b73={'count':0x0,'rows':[]};return db[_0x7721('0x28')][_0x7721('0x4b')]({'where':{'id':_0x16e80b[_0x7721('0x31')]['id']}})[_0x7721('0x16')](handleEntityNotFound(_0xad43ce,null))[_0x7721('0x16')](function(_0x4cbd28){if(_0x4cbd28){_0x127f46[_0x7721('0x32')]=_[_0x7721('0x33')](db[_0x7721('0x4c')][_0x7721('0x34')]);_0x127f46['query']=_[_0x7721('0x33')](_0x16e80b[_0x7721('0x2d')]);_0x127f46['filters']=_[_0x7721('0x37')](_0x127f46['model'],_0x127f46[_0x7721('0x2d')]);_0x3e3301[_0x7721('0x36')]=_[_0x7721('0x37')](_0x127f46[_0x7721('0x32')],qs[_0x7721('0x38')](_0x16e80b[_0x7721('0x2d')][_0x7721('0x38')]));_0x3e3301[_0x7721('0x36')]=_0x3e3301[_0x7721('0x36')]['length']?_0x3e3301[_0x7721('0x36')]:_0x127f46[_0x7721('0x32')];if(!_0x16e80b[_0x7721('0x2d')][_0x7721('0x4d')](_0x7721('0x4e'))){_0x3e3301[_0x7721('0x4f')]=qs[_0x7721('0x4f')](_0x16e80b['query'][_0x7721('0x4f')]);_0x3e3301[_0x7721('0x11')]=qs['offset'](_0x16e80b[_0x7721('0x2d')]['offset']);}_0x3e3301[_0x7721('0x50')]=qs[_0x7721('0x51')](_0x16e80b[_0x7721('0x2d')][_0x7721('0x51')]);_0x3e3301[_0x7721('0x2b')]=qs[_0x7721('0x35')](_[_0x7721('0x52')](_0x16e80b['query'],_0x127f46[_0x7721('0x35')]));_0x3e3301[_0x7721('0x2b')][_0x7721('0x53')]=_0x4cbd28['id'];if(_0x16e80b['query']['filter']){_0x3e3301['where']=_['merge'](_0x3e3301['where'],{'$or':_[_0x7721('0x1e')](_0x3e3301[_0x7721('0x36')],function(_0x580473){var _0x2d4b3a={};_0x2d4b3a[_0x580473]={'$like':'%'+_0x16e80b[_0x7721('0x2d')][_0x7721('0x1c')]+'%'};return _0x2d4b3a;})});}_0x3e3301=_[_0x7721('0x47')]({},_0x3e3301,_0x16e80b['options']);return db[_0x7721('0x4c')][_0x7721('0x13')]({'where':_0x3e3301[_0x7721('0x2b')]})[_0x7721('0x16')](function(_0x3cf3fd){_0x197b73['count']=_0x3cf3fd;if(_0x16e80b[_0x7721('0x2d')][_0x7721('0x42')]){_0x3e3301[_0x7721('0x2c')]=[{'all':!![]}];}return db['CmHopper']['findAll'](_0x3e3301);})[_0x7721('0x16')](function(_0x752564){_0x197b73[_0x7721('0x2f')]=_0x752564;return _0x197b73;});}})[_0x7721('0x16')](respondWithFilteredResult(_0xad43ce,_0x3e3301))[_0x7721('0x30')](handleError(_0xad43ce,null));};exports['getHopperHistories']=function(_0x4ba35e,_0x263070){var _0x1bd97e={'raw':!![],'where':{}};var _0x68de4={};var _0x3c66b3={'count':0x0,'rows':[]};return db[_0x7721('0x28')][_0x7721('0x4b')]({'where':{'id':_0x4ba35e[_0x7721('0x31')]['id']}})['then'](handleEntityNotFound(_0x263070,null))[_0x7721('0x16')](function(_0x413185){if(_0x413185){_0x68de4[_0x7721('0x32')]=_['keys'](db[_0x7721('0x54')][_0x7721('0x34')]);_0x68de4[_0x7721('0x2d')]=_[_0x7721('0x33')](_0x4ba35e['query']);_0x68de4['filters']=_[_0x7721('0x37')](_0x68de4[_0x7721('0x32')],_0x68de4[_0x7721('0x2d')]);_0x1bd97e[_0x7721('0x36')]=_[_0x7721('0x37')](_0x68de4[_0x7721('0x32')],qs['fields'](_0x4ba35e[_0x7721('0x2d')][_0x7721('0x38')]));_0x1bd97e[_0x7721('0x36')]=_0x1bd97e['attributes'][_0x7721('0x39')]?_0x1bd97e[_0x7721('0x36')]:_0x68de4[_0x7721('0x32')];if(!_0x4ba35e[_0x7721('0x2d')][_0x7721('0x4d')]('nolimit')){_0x1bd97e[_0x7721('0x4f')]=qs['limit'](_0x4ba35e[_0x7721('0x2d')][_0x7721('0x4f')]);_0x1bd97e[_0x7721('0x11')]=qs[_0x7721('0x11')](_0x4ba35e[_0x7721('0x2d')][_0x7721('0x11')]);}_0x1bd97e[_0x7721('0x50')]=qs[_0x7721('0x51')](_0x4ba35e[_0x7721('0x2d')][_0x7721('0x51')]);_0x1bd97e[_0x7721('0x2b')]=qs['filters'](_[_0x7721('0x52')](_0x4ba35e[_0x7721('0x2d')],_0x68de4[_0x7721('0x35')]));_0x1bd97e['where'][_0x7721('0x53')]=_0x413185['id'];if(_0x4ba35e[_0x7721('0x2d')][_0x7721('0x1c')]){_0x1bd97e[_0x7721('0x2b')]=_[_0x7721('0x47')](_0x1bd97e['where'],{'$or':_[_0x7721('0x1e')](_0x1bd97e[_0x7721('0x36')],function(_0x44326d){var _0x21b365={};_0x21b365[_0x44326d]={'$like':'%'+_0x4ba35e[_0x7721('0x2d')][_0x7721('0x1c')]+'%'};return _0x21b365;})});}_0x1bd97e=_['merge']({},_0x1bd97e,_0x4ba35e[_0x7721('0x3a')]);return db[_0x7721('0x54')]['count']({'where':_0x1bd97e[_0x7721('0x2b')]})['then'](function(_0x453792){_0x3c66b3[_0x7721('0x13')]=_0x453792;if(_0x4ba35e['query'][_0x7721('0x42')]){_0x1bd97e['include']=[{'all':!![]}];}return db['CmHopperHistory']['findAll'](_0x1bd97e);})[_0x7721('0x16')](function(_0x20f12e){_0x3c66b3[_0x7721('0x2f')]=_0x20f12e;return _0x3c66b3;});}})['then'](respondWithFilteredResult(_0x263070,_0x1bd97e))['catch'](handleError(_0x263070,null));};exports['getHopperFinals']=function(_0x355aa8,_0x3f7923){var _0x3c9334={'raw':!![],'where':{}};var _0x4220cf={};var _0x3b02d7={'count':0x0,'rows':[]};return db[_0x7721('0x28')]['findOne']({'where':{'id':_0x355aa8[_0x7721('0x31')]['id']}})[_0x7721('0x16')](handleEntityNotFound(_0x3f7923,null))[_0x7721('0x16')](function(_0xcf5304){if(_0xcf5304){_0x4220cf[_0x7721('0x32')]=_[_0x7721('0x33')](db[_0x7721('0x55')][_0x7721('0x34')]);_0x4220cf[_0x7721('0x2d')]=_[_0x7721('0x33')](_0x355aa8[_0x7721('0x2d')]);_0x4220cf[_0x7721('0x35')]=_['intersection'](_0x4220cf['model'],_0x4220cf[_0x7721('0x2d')]);_0x3c9334[_0x7721('0x36')]=_['intersection'](_0x4220cf[_0x7721('0x32')],qs['fields'](_0x355aa8['query'][_0x7721('0x38')]));_0x3c9334['attributes']=_0x3c9334['attributes'][_0x7721('0x39')]?_0x3c9334[_0x7721('0x36')]:_0x4220cf[_0x7721('0x32')];if(!_0x355aa8[_0x7721('0x2d')][_0x7721('0x4d')]('nolimit')){_0x3c9334[_0x7721('0x4f')]=qs[_0x7721('0x4f')](_0x355aa8[_0x7721('0x2d')][_0x7721('0x4f')]);_0x3c9334['offset']=qs['offset'](_0x355aa8[_0x7721('0x2d')][_0x7721('0x11')]);}_0x3c9334['order']=qs[_0x7721('0x51')](_0x355aa8[_0x7721('0x2d')]['sort']);_0x3c9334['where']=qs[_0x7721('0x35')](_[_0x7721('0x52')](_0x355aa8[_0x7721('0x2d')],_0x4220cf[_0x7721('0x35')]));_0x3c9334[_0x7721('0x2b')][_0x7721('0x53')]=_0xcf5304['id'];if(_0x355aa8[_0x7721('0x2d')][_0x7721('0x1c')]){_0x3c9334['where']=_[_0x7721('0x47')](_0x3c9334[_0x7721('0x2b')],{'$or':_[_0x7721('0x1e')](_0x3c9334[_0x7721('0x36')],function(_0xe1c795){var _0x9b5f60={};_0x9b5f60[_0xe1c795]={'$like':'%'+_0x355aa8[_0x7721('0x2d')]['filter']+'%'};return _0x9b5f60;})});}_0x3c9334=_[_0x7721('0x47')]({},_0x3c9334,_0x355aa8[_0x7721('0x3a')]);return db['CmHopperFinal'][_0x7721('0x13')]({'where':_0x3c9334[_0x7721('0x2b')]})[_0x7721('0x16')](function(_0xb8547a){_0x3b02d7[_0x7721('0x13')]=_0xb8547a;if(_0x355aa8[_0x7721('0x2d')][_0x7721('0x42')]){_0x3c9334[_0x7721('0x2c')]=[{'all':!![]}];}return db[_0x7721('0x55')][_0x7721('0x2e')](_0x3c9334);})['then'](function(_0x418954){_0x3b02d7[_0x7721('0x2f')]=_0x418954;return _0x3b02d7;});}})[_0x7721('0x16')](respondWithFilteredResult(_0x3f7923,_0x3c9334))[_0x7721('0x30')](handleError(_0x3f7923,null));};exports[_0x7721('0x56')]=function(_0x47653d,_0x12869b){var _0x1cfee2={'raw':!![],'where':{}};var _0x425327={};var _0x42ee11={'count':0x0,'rows':[]};return db[_0x7721('0x28')][_0x7721('0x4b')]({'where':{'id':_0x47653d[_0x7721('0x31')]['id']}})[_0x7721('0x16')](handleEntityNotFound(_0x12869b,null))[_0x7721('0x16')](function(_0x461938){if(_0x461938){_0x425327[_0x7721('0x32')]=_[_0x7721('0x33')](db[_0x7721('0x57')][_0x7721('0x34')]);_0x425327['query']=_[_0x7721('0x33')](_0x47653d['query']);_0x425327[_0x7721('0x35')]=_[_0x7721('0x37')](_0x425327[_0x7721('0x32')],_0x425327[_0x7721('0x2d')]);_0x1cfee2[_0x7721('0x36')]=_['intersection'](_0x425327['model'],qs['fields'](_0x47653d['query'][_0x7721('0x38')]));_0x1cfee2[_0x7721('0x36')]=_0x1cfee2[_0x7721('0x36')][_0x7721('0x39')]?_0x1cfee2[_0x7721('0x36')]:_0x425327['model'];if(!_0x47653d[_0x7721('0x2d')]['hasOwnProperty'](_0x7721('0x4e'))){_0x1cfee2[_0x7721('0x4f')]=qs[_0x7721('0x4f')](_0x47653d[_0x7721('0x2d')][_0x7721('0x4f')]);_0x1cfee2[_0x7721('0x11')]=qs['offset'](_0x47653d[_0x7721('0x2d')]['offset']);}_0x1cfee2['order']=qs[_0x7721('0x51')](_0x47653d[_0x7721('0x2d')][_0x7721('0x51')]);_0x1cfee2[_0x7721('0x2b')]=qs[_0x7721('0x35')](_['pick'](_0x47653d[_0x7721('0x2d')],_0x425327[_0x7721('0x35')]));_0x1cfee2[_0x7721('0x2b')][_0x7721('0x53')]=_0x461938['id'];if(_0x47653d[_0x7721('0x2d')][_0x7721('0x1c')]){_0x1cfee2[_0x7721('0x2b')]=_['merge'](_0x1cfee2[_0x7721('0x2b')],{'$or':_[_0x7721('0x1e')](_0x1cfee2[_0x7721('0x36')],function(_0x193326){var _0x1dbf47={};_0x1dbf47[_0x193326]={'$like':'%'+_0x47653d['query'][_0x7721('0x1c')]+'%'};return _0x1dbf47;})});}_0x1cfee2=_[_0x7721('0x47')]({},_0x1cfee2,_0x47653d[_0x7721('0x3a')]);return db['CmHopperBlack'][_0x7721('0x13')]({'where':_0x1cfee2[_0x7721('0x2b')]})['then'](function(_0x29403d){_0x42ee11[_0x7721('0x13')]=_0x29403d;if(_0x47653d[_0x7721('0x2d')][_0x7721('0x42')]){_0x1cfee2['include']=[{'all':!![]}];}return db[_0x7721('0x57')]['findAll'](_0x1cfee2);})[_0x7721('0x16')](function(_0x1c50c2){_0x42ee11['rows']=_0x1c50c2;return _0x42ee11;});}})[_0x7721('0x16')](respondWithFilteredResult(_0x12869b,_0x1cfee2))[_0x7721('0x30')](handleError(_0x12869b,null));};exports['getTeams']=function(_0x29968c,_0x11733f){var _0x5e3816={};var _0x7fd3e8={};var _0x52e8b1;var _0x240b0a;return db[_0x7721('0x28')][_0x7721('0x4b')]({'where':{'id':_0x29968c['params']['id']}})[_0x7721('0x16')](handleEntityNotFound(_0x11733f,null))['then'](function(_0x5a00be){if(_0x5a00be){_0x52e8b1=_0x5a00be;_0x7fd3e8[_0x7721('0x32')]=_[_0x7721('0x33')](db[_0x7721('0x58')][_0x7721('0x34')]);_0x7fd3e8[_0x7721('0x2d')]=_['keys'](_0x29968c[_0x7721('0x2d')]);_0x7fd3e8[_0x7721('0x35')]=_[_0x7721('0x37')](_0x7fd3e8[_0x7721('0x32')],_0x7fd3e8[_0x7721('0x2d')]);_0x5e3816['attributes']=_[_0x7721('0x37')](_0x7fd3e8['model'],qs[_0x7721('0x38')](_0x29968c['query']['fields']));_0x5e3816[_0x7721('0x36')]=_0x5e3816['attributes']['length']?_0x5e3816[_0x7721('0x36')]:_0x7fd3e8[_0x7721('0x32')];_0x5e3816[_0x7721('0x50')]=qs['sort'](_0x29968c[_0x7721('0x2d')]['sort']);_0x5e3816['where']=qs['filters'](_[_0x7721('0x52')](_0x29968c[_0x7721('0x2d')],_0x7fd3e8[_0x7721('0x35')]));if(_0x29968c[_0x7721('0x2d')][_0x7721('0x1c')]){_0x5e3816[_0x7721('0x2b')]=_[_0x7721('0x47')](_0x5e3816[_0x7721('0x2b')],{'$or':_[_0x7721('0x1e')](_0x5e3816[_0x7721('0x36')],function(_0x25bf32){var _0x4ec3c6={};_0x4ec3c6[_0x25bf32]={'$like':'%'+_0x29968c[_0x7721('0x2d')][_0x7721('0x1c')]+'%'};return _0x4ec3c6;})});}_0x5e3816=_[_0x7721('0x47')]({},_0x5e3816,_0x29968c[_0x7721('0x3a')]);return _0x52e8b1[_0x7721('0x59')](_0x5e3816);}})[_0x7721('0x16')](function(_0xc7e4e9){if(_0xc7e4e9){_0x240b0a=_0xc7e4e9['length'];if(!_0x29968c['query'][_0x7721('0x4d')](_0x7721('0x4e'))){_0x5e3816[_0x7721('0x4f')]=qs[_0x7721('0x4f')](_0x29968c['query'][_0x7721('0x4f')]);_0x5e3816['offset']=qs[_0x7721('0x11')](_0x29968c['query'][_0x7721('0x11')]);}return _0x52e8b1[_0x7721('0x59')](_0x5e3816);}})[_0x7721('0x16')](function(_0x249a5b){if(_0x249a5b){return _0x249a5b?{'count':_0x240b0a,'rows':_0x249a5b}:null;}})[_0x7721('0x16')](respondWithResult(_0x11733f,null))[_0x7721('0x30')](handleError(_0x11733f,null));};exports['addTeams']=function(_0x509f2d,_0x4d2644){var _0x2b0968=_0x509f2d['body'][_0x7721('0x5a')];var _0x186ada=_['map'](_0x2b0968,'id');return db[_0x7721('0x58')][_0x7721('0x2e')]({'where':{'id':_0x186ada},'attributes':['id'],'include':[{'model':db[_0x7721('0x5b')],'as':'Agents','attributes':['id',_0x7721('0x22'),_0x7721('0x5c'),'voicePause','interface'],'raw':!![]}]})[_0x7721('0x16')](function(_0xc85b9){if(_0xc85b9){var _0x58be49=_[_0x7721('0x5d')](_0xc85b9,function(_0x283716){var _0x4cd26e=_0x283716['get']({'plain':!![]});_0x4cd26e['Agents']['forEach'](function(_0x19be6b){_0x19be6b[_0x7721('0x5e')]=_[_0x7721('0x21')](_0x2b0968,{'id':_0x4cd26e['id']})['penalty'];});return _0x4cd26e['Agents'];});return db[_0x7721('0x28')][_0x7721('0x21')]({'where':{'id':_0x509f2d[_0x7721('0x31')]['id']}})[_0x7721('0x16')](function(_0x14711c){return db[_0x7721('0x5f')][_0x7721('0x60')](function(_0x435455){return _0x14711c[_0x7721('0x61')](_0x186ada,{'transaction':_0x435455})['then'](function(){return BPromise['each'](_0x2b0968,function(_0x415445){return db['TeamVoiceQueue'][_0x7721('0x62')]({'TeamId':_0x415445['id'],'VoiceQueueId':_0x509f2d['params']['id'],'penalty':_0x415445[_0x7721('0x5e')]},{'transaction':_0x435455});});})['then'](function(){return BPromise[_0x7721('0x63')](_0x58be49,function(_0x14341e){return db['UserVoiceQueue']['findOrCreate']({'where':{'UserId':_0x14341e['id'],'VoiceQueueId':_0x509f2d[_0x7721('0x31')]['id']},'defaults':{'penalty':_0x14341e[_0x7721('0x5e')]},'transaction':_0x435455});});})[_0x7721('0x16')](function(){return BPromise[_0x7721('0x63')](_[_0x7721('0x1c')](_0x58be49,{'online':!![]}),function(_0x5e69d7){return db[_0x7721('0x64')][_0x7721('0x62')]({'membername':_0x5e69d7[_0x7721('0x22')],'UserId':_0x5e69d7['id'],'queue_name':_0x14711c['name'],'VoiceQueueId':_0x14711c['id'],'interface':_[_0x7721('0x65')](_0x5e69d7[_0x7721('0x66')])?util[_0x7721('0x67')](_0x7721('0x68'),_0x5e69d7[_0x7721('0x22')]):_0x5e69d7[_0x7721('0x66')],'paused':_0x5e69d7[_0x7721('0x69')]||![],'penalty':_0x5e69d7[_0x7721('0x5e')]},{'transaction':_0x435455});});})[_0x7721('0x16')](function(){_0x58be49[_0x7721('0x6a')](function(_0x2a2d8a){socket['emit'](_0x7721('0x6b'),{'UserId':_0x2a2d8a['id'],'VoiceQueueId':_0x14711c['id']});});});});});}})[_0x7721('0x16')](respondWithStatusCode(_0x4d2644,null))[_0x7721('0x30')](handleError(_0x4d2644,null));};exports[_0x7721('0x6c')]=function(_0xcb843e,_0x35d3f1){return db[_0x7721('0x58')]['findAll']({'where':{'id':_0xcb843e[_0x7721('0x2d')]['ids']},'attributes':['id'],'include':[{'model':db[_0x7721('0x5b')],'as':_0x7721('0x6d'),'attributes':['id'],'raw':!![]}]})[_0x7721('0x16')](handleEntityNotFound(_0x35d3f1,null))[_0x7721('0x16')](function(_0x37b607){var _0x3d6d41=_['map'](_0x37b607,'id');var _0xbce1b=[];var _0x4d3ad1=[];var _0x4028fa=squel[_0x7721('0x6e')]();_0x4028fa[_0x7721('0x6f')]('tq.TeamId')[_0x7721('0x70')](_0x7721('0x71'),'tq')[_0x7721('0x72')](_0x7721('0x73'),'ut','ut.TeamId\x20=\x20tq.TeamId')[_0x7721('0x2b')](_0x7721('0x74'),_0xcb843e[_0x7721('0x31')]['id']);for(var _0x980f26=0x0;_0x980f26<_0x37b607['length'];_0x980f26+=0x1){let _0x40dd5e=_0x37b607[_0x980f26];for(var _0x3d143a=0x0;_0x3d143a<_0x40dd5e[_0x7721('0x6d')][_0x7721('0x39')];_0x3d143a+=0x1){let _0x53fa66=_0x40dd5e[_0x7721('0x6d')][_0x3d143a];var _0x1a95e6=_0x4028fa[_0x7721('0x75')]();_0x1a95e6[_0x7721('0x2b')](_0x7721('0x76'),_0x53fa66['id']);_0x4d3ad1[_0x7721('0x77')](db[_0x7721('0x5f')][_0x7721('0x2d')](_0x1a95e6[_0x7721('0x78')](),{'type':db['sequelize'][_0x7721('0x79')][_0x7721('0x7a')]})[_0x7721('0x16')](function(_0x1c246b){if(_0x1c246b[_0x7721('0x39')]===0x1){return _0x53fa66['id'];}else{var _0x31447d=_[_0x7721('0x7b')](_[_0x7721('0x1e')](_0x1c246b,_0x7721('0x7c')),function(_0x14fd97){return _[_0x7721('0x7d')](_0x3d6d41,_0x14fd97);});if(_0x31447d){return _0x53fa66['id'];}}}));}}return BPromise[_0x7721('0x7e')](_0x4d3ad1)[_0x7721('0x16')](function(_0x18ccdf){_0xbce1b=_(_0xbce1b)[_0x7721('0x7f')](_0x18ccdf)[_0x7721('0x80')]()['value']();return db[_0x7721('0x28')][_0x7721('0x21')]({'where':{'id':_0xcb843e[_0x7721('0x31')]['id']}})[_0x7721('0x16')](function(_0x157310){return db[_0x7721('0x5f')][_0x7721('0x60')](function(_0xdd0e7a){return _0x157310[_0x7721('0x6c')](_0xcb843e[_0x7721('0x2d')][_0x7721('0x81')],{'transaction':_0xdd0e7a})[_0x7721('0x16')](function(){if(!_['isEmpty'](_0xbce1b)){return _0x157310['removeAgents'](_0xbce1b,{'transaction':_0xdd0e7a})[_0x7721('0x16')](function(){return db[_0x7721('0x64')][_0x7721('0x17')]({'where':{'VoiceQueueId':_0xcb843e[_0x7721('0x31')]['id'],'UserId':_0xbce1b},'transaction':_0xdd0e7a});});}})[_0x7721('0x16')](function(){_0xbce1b['forEach'](function(_0x1ebc86){socket[_0x7721('0x82')](_0x7721('0x83'),{'UserId':_0x1ebc86,'VoiceQueueId':_0x157310['id']});});});});});});})[_0x7721('0x16')](respondWithStatusCode(_0x35d3f1,null))[_0x7721('0x30')](handleError(_0x35d3f1,null));};exports[_0x7721('0x84')]=function(_0xc0f448,_0x3dc688){var _0x298aca,_0x45b430;return db[_0x7721('0x28')][_0x7721('0x21')]({'where':{'id':_0xc0f448['params']['id']}})[_0x7721('0x16')](handleEntityNotFound(_0x3dc688,null))[_0x7721('0x16')](function(_0x16e0cd){if(_0x16e0cd){_0x45b430=_0x16e0cd;return _0x16e0cd['addAgents'](_0xc0f448[_0x7721('0x46')][_0x7721('0x81')],_[_0x7721('0x43')](_0xc0f448['body'],[_0x7721('0x81'),'id'])||{})['spread'](function(_0x5f3dd2){for(var _0xa73193=0x0;_0xa73193<_0xc0f448[_0x7721('0x46')][_0x7721('0x81')][_0x7721('0x39')];_0xa73193+=0x1){socket['emit'](_0x7721('0x6b'),{'UserId':Number(_0xc0f448[_0x7721('0x46')][_0x7721('0x81')][_0xa73193]),'VoiceQueueId':Number(_0xc0f448[_0x7721('0x31')]['id'])});}return _0x5f3dd2;});}})[_0x7721('0x16')](function(_0x5b12c7){_0x298aca=_0x5b12c7||[];if(_0x45b430){return db[_0x7721('0x5b')][_0x7721('0x2e')]({'where':{'id':_0xc0f448[_0x7721('0x46')][_0x7721('0x81')]},'attributes':['id',_0x7721('0x22'),_0x7721('0x5c'),_0x7721('0x69'),_0x7721('0x66')],'raw':!![]});}})[_0x7721('0x16')](function(_0x385c86){if(!_[_0x7721('0x85')](_0x385c86)){var _0xc18d1a=[];for(var _0x9575b3=0x0;_0x9575b3<_0x385c86[_0x7721('0x39')];_0x9575b3++){if(_0x385c86[_0x9575b3][_0x7721('0x5c')]){_0xc18d1a[_0x7721('0x77')](db[_0x7721('0x64')][_0x7721('0x62')]({'membername':_0x385c86[_0x9575b3][_0x7721('0x22')],'UserId':_0x385c86[_0x9575b3]['id'],'queue_name':_0x45b430[_0x7721('0x22')],'VoiceQueueId':_0x45b430['id'],'interface':_[_0x7721('0x65')](_0x385c86[_0x9575b3][_0x7721('0x66')])?util['format'](_0x7721('0x68'),_0x385c86[_0x9575b3]['name']):_0x385c86[_0x9575b3][_0x7721('0x66')],'paused':_0x385c86[_0x9575b3][_0x7721('0x69')]||![],'penalty':_0xc0f448[_0x7721('0x46')][_0x7721('0x5e')]||0x0}));}}return BPromise['all'](_0xc18d1a);}})[_0x7721('0x16')](function(){return _0x298aca;})[_0x7721('0x16')](respondWithResult(_0x3dc688,null))['catch'](handleError(_0x3dc688,null));};exports[_0x7721('0x86')]=function(_0x3a8f89,_0x52aae1){return db[_0x7721('0x28')][_0x7721('0x21')]({'where':{'id':_0x3a8f89[_0x7721('0x31')]['id']}})[_0x7721('0x16')](handleEntityNotFound(_0x52aae1,null))[_0x7721('0x16')](function(_0x55c43c){if(_0x55c43c){return _0x55c43c['removeAgents'](_0x3a8f89[_0x7721('0x2d')][_0x7721('0x81')])['then'](function(){if(_['isArray'](_0x3a8f89[_0x7721('0x2d')]['ids'])){for(var _0x1c23e3=0x0;_0x1c23e3<_0x3a8f89[_0x7721('0x2d')][_0x7721('0x81')]['length'];_0x1c23e3+=0x1){socket[_0x7721('0x82')](_0x7721('0x83'),{'UserId':Number(_0x3a8f89[_0x7721('0x2d')][_0x7721('0x81')][_0x1c23e3]),'VoiceQueueId':Number(_0x3a8f89[_0x7721('0x31')]['id'])});}}else{socket[_0x7721('0x82')](_0x7721('0x83'),{'UserId':Number(_0x3a8f89[_0x7721('0x2d')]['ids']),'VoiceQueueId':Number(_0x3a8f89[_0x7721('0x31')]['id'])});}});}})[_0x7721('0x16')](function(_0x3c3c7e){return db[_0x7721('0x64')][_0x7721('0x17')]({'where':{'VoiceQueueId':_0x3a8f89['params']['id'],'UserId':_0x3a8f89[_0x7721('0x2d')][_0x7721('0x81')]}})[_0x7721('0x16')](function(){return _0x3c3c7e;});})[_0x7721('0x16')](respondWithStatusCode(_0x52aae1,null))[_0x7721('0x30')](handleError(_0x52aae1,null));};exports[_0x7721('0x87')]=function(_0x16b110,_0x366323){var _0x14b49e={};var _0x12f568={};var _0x259640;var _0x4a0e50;return db[_0x7721('0x28')][_0x7721('0x4b')]({'where':{'id':_0x16b110[_0x7721('0x31')]['id']}})[_0x7721('0x16')](handleEntityNotFound(_0x366323,null))[_0x7721('0x16')](function(_0x25e4db){if(_0x25e4db){_0x259640=_0x25e4db;_0x12f568[_0x7721('0x32')]=_[_0x7721('0x33')](db[_0x7721('0x5b')][_0x7721('0x34')]);_0x12f568[_0x7721('0x2d')]=_[_0x7721('0x33')](_0x16b110[_0x7721('0x2d')]);_0x12f568[_0x7721('0x35')]=_[_0x7721('0x37')](_0x12f568['model'],_0x12f568[_0x7721('0x2d')]);_0x14b49e['attributes']=_['intersection'](_0x12f568[_0x7721('0x32')],qs['fields'](_0x16b110[_0x7721('0x2d')][_0x7721('0x38')]));_0x14b49e[_0x7721('0x36')]=_0x14b49e[_0x7721('0x36')]['length']?_0x14b49e['attributes']:_0x12f568[_0x7721('0x32')];_0x14b49e[_0x7721('0x50')]=qs[_0x7721('0x51')](_0x16b110[_0x7721('0x2d')][_0x7721('0x51')]);_0x14b49e[_0x7721('0x2b')]=qs[_0x7721('0x35')](_['pick'](_0x16b110[_0x7721('0x2d')],_0x12f568['filters']));if(_0x16b110[_0x7721('0x2d')][_0x7721('0x1c')]){_0x14b49e[_0x7721('0x2b')]=_[_0x7721('0x47')](_0x14b49e[_0x7721('0x2b')],{'$or':_[_0x7721('0x1e')](_0x14b49e[_0x7721('0x36')],function(_0x184f1b){var _0xa257a0={};_0xa257a0[_0x184f1b]={'$like':'%'+_0x16b110[_0x7721('0x2d')][_0x7721('0x1c')]+'%'};return _0xa257a0;})});}_0x14b49e=_[_0x7721('0x47')]({},_0x14b49e,_0x16b110[_0x7721('0x3a')]);return _0x259640[_0x7721('0x87')](_0x14b49e);}})[_0x7721('0x16')](function(_0x1ee0c1){if(_0x1ee0c1){_0x4a0e50=_0x1ee0c1[_0x7721('0x39')];if(!_0x16b110[_0x7721('0x2d')]['hasOwnProperty'](_0x7721('0x4e'))){_0x14b49e[_0x7721('0x4f')]=qs[_0x7721('0x4f')](_0x16b110[_0x7721('0x2d')][_0x7721('0x4f')]);_0x14b49e[_0x7721('0x11')]=qs['offset'](_0x16b110[_0x7721('0x2d')][_0x7721('0x11')]);}return _0x259640[_0x7721('0x87')](_0x14b49e);}})['then'](function(_0x1bdadb){if(_0x1bdadb){return _0x1bdadb?{'count':_0x4a0e50,'rows':_0x1bdadb}:null;}})['then'](respondWithResult(_0x366323,null))[_0x7721('0x30')](handleError(_0x366323,null));};exports['getMembers']=function(_0xe5e55f,_0x17ce3b){var _0xbc0a80={};var _0xf2dc08={};var _0x5b493a;var _0x45024c;return db[_0x7721('0x28')][_0x7721('0x4b')]({'where':{'id':_0xe5e55f[_0x7721('0x31')]['id']}})['then'](handleEntityNotFound(_0x17ce3b,null))['then'](function(_0x12b255){if(_0x12b255){_0x5b493a=_0x12b255;_0xf2dc08['model']=_[_0x7721('0x33')](db[_0x7721('0x64')][_0x7721('0x34')]);_0xf2dc08[_0x7721('0x2d')]=_[_0x7721('0x33')](_0xe5e55f[_0x7721('0x2d')]);_0xf2dc08[_0x7721('0x35')]=_[_0x7721('0x37')](_0xf2dc08[_0x7721('0x32')],_0xf2dc08['query']);_0xbc0a80[_0x7721('0x36')]=_[_0x7721('0x37')](_0xf2dc08[_0x7721('0x32')],qs['fields'](_0xe5e55f['query'][_0x7721('0x38')]));_0xbc0a80[_0x7721('0x36')]=_0xbc0a80[_0x7721('0x36')][_0x7721('0x39')]?_0xbc0a80[_0x7721('0x36')]:_0xf2dc08[_0x7721('0x32')];_0xbc0a80['order']=qs[_0x7721('0x51')](_0xe5e55f[_0x7721('0x2d')]['sort']);_0xbc0a80[_0x7721('0x2b')]=qs['filters'](_[_0x7721('0x52')](_0xe5e55f['query'],_0xf2dc08[_0x7721('0x35')]));if(_0xe5e55f['query']['filter']){_0xbc0a80['where']=_[_0x7721('0x47')](_0xbc0a80['where'],{'$or':_['map'](_0xbc0a80['attributes'],function(_0x52a1ee){var _0x41c991={};_0x41c991[_0x52a1ee]={'$like':'%'+_0xe5e55f[_0x7721('0x2d')][_0x7721('0x1c')]+'%'};return _0x41c991;})});}_0xbc0a80=_[_0x7721('0x47')]({},_0xbc0a80,_0xe5e55f[_0x7721('0x3a')]);return _0x5b493a['getMembers'](_0xbc0a80);}})[_0x7721('0x16')](function(_0x22d4e0){if(_0x22d4e0){_0x45024c=_0x22d4e0['length'];if(!_0xe5e55f[_0x7721('0x2d')][_0x7721('0x4d')](_0x7721('0x4e'))){_0xbc0a80[_0x7721('0x4f')]=qs[_0x7721('0x4f')](_0xe5e55f[_0x7721('0x2d')][_0x7721('0x4f')]);_0xbc0a80[_0x7721('0x11')]=qs['offset'](_0xe5e55f[_0x7721('0x2d')][_0x7721('0x11')]);}return _0x5b493a[_0x7721('0x88')](_0xbc0a80);}})[_0x7721('0x16')](function(_0x2fbb00){return _0x2fbb00?{'count':_0x45024c,'rows':_0x2fbb00}:null;})[_0x7721('0x16')](respondWithResult(_0x17ce3b,null))[_0x7721('0x30')](handleError(_0x17ce3b,null));};exports[_0x7721('0x89')]=function(_0x561235,_0x12ad4d){var _0x226081={};var _0x17c3e7={};var _0x250cbf;var _0x255b22;return db['VoiceQueue'][_0x7721('0x4b')]({'where':{'id':_0x561235[_0x7721('0x31')]['id']}})[_0x7721('0x16')](handleEntityNotFound(_0x12ad4d,null))[_0x7721('0x16')](function(_0x396880){if(_0x396880){_0x250cbf=_0x396880;_0x17c3e7['model']=_[_0x7721('0x33')](db[_0x7721('0x8a')]['rawAttributes']);_0x17c3e7[_0x7721('0x2d')]=_[_0x7721('0x33')](_0x561235[_0x7721('0x2d')]);_0x17c3e7[_0x7721('0x35')]=_[_0x7721('0x37')](_0x17c3e7['model'],_0x17c3e7[_0x7721('0x2d')]);_0x226081[_0x7721('0x36')]=_['intersection'](_0x17c3e7['model'],qs[_0x7721('0x38')](_0x561235[_0x7721('0x2d')][_0x7721('0x38')]));_0x226081['attributes']=_0x226081[_0x7721('0x36')]['length']?_0x226081['attributes']:_0x17c3e7[_0x7721('0x32')];_0x226081[_0x7721('0x50')]=qs[_0x7721('0x51')](_0x561235[_0x7721('0x2d')][_0x7721('0x51')]);_0x226081['where']=qs[_0x7721('0x35')](_[_0x7721('0x52')](_0x561235[_0x7721('0x2d')],_0x17c3e7[_0x7721('0x35')]));if(_0x561235[_0x7721('0x2d')]['filter']){_0x226081[_0x7721('0x2b')]=_['merge'](_0x226081[_0x7721('0x2b')],{'$or':_[_0x7721('0x1e')](_0x226081[_0x7721('0x36')],function(_0x5209ff){var _0x2583c1={};_0x2583c1[_0x5209ff]={'$like':'%'+_0x561235['query'][_0x7721('0x1c')]+'%'};return _0x2583c1;})});}_0x226081=_[_0x7721('0x47')]({},_0x226081,_0x561235[_0x7721('0x3a')]);return _0x250cbf[_0x7721('0x89')](_0x226081);}})[_0x7721('0x16')](function(_0x3235d8){if(_0x3235d8){_0x255b22=_0x3235d8[_0x7721('0x39')];if(!_0x561235[_0x7721('0x2d')][_0x7721('0x4d')](_0x7721('0x4e'))){_0x226081['limit']=qs[_0x7721('0x4f')](_0x561235[_0x7721('0x2d')][_0x7721('0x4f')]);_0x226081[_0x7721('0x11')]=qs[_0x7721('0x11')](_0x561235['query'][_0x7721('0x11')]);}return _0x250cbf[_0x7721('0x89')](_0x226081);}})[_0x7721('0x16')](function(_0x501e31){if(_0x501e31){return _0x501e31?{'count':_0x255b22,'rows':_0x501e31}:null;}})[_0x7721('0x16')](respondWithResult(_0x12ad4d,null))[_0x7721('0x30')](handleError(_0x12ad4d,null));};exports[_0x7721('0x8b')]=function(_0xe325e1,_0x1aa1fc){var _0x560be6=moment()[_0x7721('0x67')](_0x7721('0x8c'));var _0x1bd066,_0xaa15c5;return db['VoiceQueue'][_0x7721('0x21')]({'where':{'id':_0xe325e1[_0x7721('0x31')]['id']}})[_0x7721('0x16')](handleEntityNotFound(_0x1aa1fc,null))[_0x7721('0x16')](function(_0x42ffff){if(_0x42ffff){_0xaa15c5=_0x42ffff;return _0x42ffff[_0x7721('0x8b')](_0xe325e1[_0x7721('0x46')][_0x7721('0x81')],_[_0x7721('0x43')](_0xe325e1[_0x7721('0x46')],[_0x7721('0x81'),'id'])||{});}return null;})[_0x7721('0x8d')](function(_0x3f19f5){var _0x28f11a;_0x1bd066=_0x3f19f5||[];var _0x3bc8f3=[];if(_0x3f19f5){for(var _0x26cea3=0x0;_0x26cea3<_0x3f19f5[_0x7721('0x39')];_0x26cea3+=0x1){var _0x57e928=_0x3f19f5[_0x26cea3]['get']({'plain':!![]});_0xaa15c5[_0x7721('0x8e')]=_0xe325e1[_0x7721('0x46')][_0x7721('0x8e')]?_0xe325e1[_0x7721('0x46')]['dialCheckDuplicateType']:_0xaa15c5[_0x7721('0x8e')];switch(_0xaa15c5['dialCheckDuplicateType']){case _0x7721('0x8f'):_0x28f11a=squel[_0x7721('0x90')]()[_0x7721('0x91')]('cm_hopper')['fromQuery'](['phone',_0x7721('0x92'),_0x7721('0x93'),_0x7721('0x94'),_0x7721('0x53'),_0x7721('0x44'),'updatedAt'],squel[_0x7721('0x6e')]()[_0x7721('0x6f')](_0x7721('0x95'),'phone')[_0x7721('0x6f')]('\x27'+_0x560be6+'\x27',_0x7721('0x92'))[_0x7721('0x6f')]('id','ContactId')[_0x7721('0x6f')](_0x57e928[_0x7721('0x96')][_0x7721('0x78')](),'ListId')[_0x7721('0x6f')](_0xe325e1[_0x7721('0x31')]['id'][_0x7721('0x78')](),_0x7721('0x53'))[_0x7721('0x6f')]('\x27'+_0x560be6+'\x27','createdAt')[_0x7721('0x6f')]('\x27'+_0x560be6+'\x27','updatedAt')['from'](_0x7721('0x97'))[_0x7721('0x2b')](_0x7721('0x98'))[_0x7721('0x2b')](_0x7721('0x99'),_0x57e928['CmListId'][_0x7721('0x78')]())[_0x7721('0x2b')](_0x7721('0x9a'))[_0x7721('0x2b')](_0x7721('0x9b'),squel[_0x7721('0x6e')]()[_0x7721('0x6f')](_0x7721('0x9c'))[_0x7721('0x70')](_0x7721('0x9d'))['where'](_0x7721('0x74'),_0xe325e1[_0x7721('0x31')]['id']['toString']()))[_0x7721('0x2b')]('phone\x20NOT\x20IN\x20(?)',squel[_0x7721('0x6e')]()['field'](_0x7721('0x9e'))['from']('cm_hopper')['where']('VoiceQueueId\x20=\x20?',_0xe325e1[_0x7721('0x31')]['id']['toString']())))[_0x7721('0x78')]();break;case _0x7721('0x9f'):_0x28f11a=squel[_0x7721('0x90')]()[_0x7721('0x91')](_0x7721('0xa0'))[_0x7721('0xa1')](['phone',_0x7721('0x92'),_0x7721('0x93'),'ListId','VoiceQueueId',_0x7721('0x44'),_0x7721('0x45')],squel[_0x7721('0x6e')]()['field'](_0x7721('0x95'),_0x7721('0x95'))[_0x7721('0x6f')]('\x27'+_0x560be6+'\x27',_0x7721('0x92'))[_0x7721('0x6f')]('id','ContactId')[_0x7721('0x6f')](_0x57e928[_0x7721('0x96')][_0x7721('0x78')](),_0x7721('0x94'))[_0x7721('0x6f')](_0xe325e1[_0x7721('0x31')]['id'][_0x7721('0x78')](),_0x7721('0x53'))['field']('\x27'+_0x560be6+'\x27','createdAt')[_0x7721('0x6f')]('\x27'+_0x560be6+'\x27',_0x7721('0x45'))['from'](_0x7721('0x97'))['where']('deletedAt\x20IS\x20NULL')[_0x7721('0x2b')]('ListId\x20=\x20?',_0x57e928[_0x7721('0x96')]['toString']())[_0x7721('0x2b')](_0x7721('0x9a'))['where'](_0x7721('0x9b'),squel[_0x7721('0x6e')]()[_0x7721('0x6f')](_0x7721('0x9e'))[_0x7721('0x70')]('cm_hopper')[_0x7721('0x2b')](_0x7721('0x74'),_0xe325e1[_0x7721('0x31')]['id'][_0x7721('0x78')]())))[_0x7721('0x78')]();break;default:_0x28f11a=squel[_0x7721('0x90')]()[_0x7721('0x91')]('cm_hopper')[_0x7721('0xa1')]([_0x7721('0x95'),_0x7721('0x92'),_0x7721('0x93'),_0x7721('0x94'),'VoiceQueueId',_0x7721('0x44'),_0x7721('0x45')],squel[_0x7721('0x6e')]()[_0x7721('0x6f')](_0x7721('0x95'),_0x7721('0x95'))[_0x7721('0x6f')]('\x27'+_0x560be6+'\x27',_0x7721('0x92'))[_0x7721('0x6f')]('id',_0x7721('0x93'))['field'](_0x57e928['CmListId'][_0x7721('0x78')](),'ListId')['field'](_0xe325e1[_0x7721('0x31')]['id'][_0x7721('0x78')](),_0x7721('0x53'))[_0x7721('0x6f')]('\x27'+_0x560be6+'\x27',_0x7721('0x44'))[_0x7721('0x6f')]('\x27'+_0x560be6+'\x27',_0x7721('0x45'))[_0x7721('0x70')](_0x7721('0x97'))[_0x7721('0x2b')](_0x7721('0x98'))[_0x7721('0x2b')](_0x7721('0x99'),_0x57e928[_0x7721('0x96')][_0x7721('0x78')]())[_0x7721('0x2b')]('phone\x20IS\x20NOT\x20NULL'))[_0x7721('0x78')]();}_0x3bc8f3[_0x7721('0x77')](db[_0x7721('0x5f')][_0x7721('0x2d')](_0x28f11a));}return BPromise[_0x7721('0x7e')](_0x3bc8f3);}})[_0x7721('0x16')](function(){var _0x5f53b3=[];var _0x8fc283=squel[_0x7721('0x90')]()['into'](_0x7721('0xa2'))['fromQuery']([_0x7721('0xa3'),_0x7721('0x95'),_0x7721('0xa4'),_0x7721('0x44'),_0x7721('0x45')],squel[_0x7721('0x6e')]()[_0x7721('0x6f')](_0x7721('0xa5'))[_0x7721('0x6f')](_0x7721('0xa6'))[_0x7721('0x6f')](_0x7721('0xa7'))[_0x7721('0x6f')]('\x27'+_0x560be6+'\x27','createdAt')[_0x7721('0x6f')]('\x27'+_0x560be6+'\x27',_0x7721('0x45'))[_0x7721('0x70')](_0x7721('0xa8'),'ci')[_0x7721('0x72')](_0x7721('0xa0'),'h',_0x7721('0xa9'))['where'](_0x7721('0xaa'),_0x560be6)[_0x7721('0x2b')](_0x7721('0xab'),'PHONE'))[_0x7721('0x78')]();_0x5f53b3['push'](db['sequelize'][_0x7721('0x2d')](_0x8fc283));return BPromise[_0x7721('0x7e')](_0x5f53b3);})['then'](function(){return _0x1bd066;})[_0x7721('0x16')](respondWithResult(_0x1aa1fc,null))[_0x7721('0x30')](handleError(_0x1aa1fc,null));};exports[_0x7721('0xac')]=function(_0xbc4f13,_0x50f4bd){return db['VoiceQueue'][_0x7721('0x21')]({'where':{'id':_0xbc4f13['params']['id']}})[_0x7721('0x16')](handleEntityNotFound(_0x50f4bd,null))[_0x7721('0x16')](function(_0x537831){if(_0x537831){return _0x537831[_0x7721('0xac')](_0xbc4f13[_0x7721('0x2d')][_0x7721('0x81')]);}})[_0x7721('0x16')](function(_0x49548e){if(_0x49548e){return db['CmHopper'][_0x7721('0x17')]({'where':{'ListId':_0xbc4f13[_0x7721('0x2d')][_0x7721('0x81')],'VoiceQueueId':_0xbc4f13[_0x7721('0x31')]['id']}})['then'](function(){return _0x49548e;});}})['then'](respondWithStatusCode(_0x50f4bd,null))[_0x7721('0x30')](handleError(_0x50f4bd,null));};exports[_0x7721('0xad')]=function(_0x4ea8ac,_0x226556){var _0x4bd023={};var _0x50de45={};var _0x51ac8f;var _0x27ed5e;return db['VoiceQueue'][_0x7721('0x4b')]({'where':{'id':_0x4ea8ac[_0x7721('0x31')]['id']}})[_0x7721('0x16')](handleEntityNotFound(_0x226556,null))['then'](function(_0x4893c0){if(_0x4893c0){_0x51ac8f=_0x4893c0;_0x50de45[_0x7721('0x32')]=_[_0x7721('0x33')](db[_0x7721('0x8a')][_0x7721('0x34')]);_0x50de45[_0x7721('0x2d')]=_['keys'](_0x4ea8ac[_0x7721('0x2d')]);_0x50de45[_0x7721('0x35')]=_[_0x7721('0x37')](_0x50de45[_0x7721('0x32')],_0x50de45[_0x7721('0x2d')]);_0x4bd023['attributes']=_[_0x7721('0x37')](_0x50de45[_0x7721('0x32')],qs[_0x7721('0x38')](_0x4ea8ac[_0x7721('0x2d')][_0x7721('0x38')]));_0x4bd023[_0x7721('0x36')]=_0x4bd023['attributes']['length']?_0x4bd023[_0x7721('0x36')]:_0x50de45[_0x7721('0x32')];_0x4bd023[_0x7721('0x50')]=qs[_0x7721('0x51')](_0x4ea8ac[_0x7721('0x2d')][_0x7721('0x51')]);_0x4bd023[_0x7721('0x2b')]=qs[_0x7721('0x35')](_[_0x7721('0x52')](_0x4ea8ac[_0x7721('0x2d')],_0x50de45[_0x7721('0x35')]));if(_0x4ea8ac['query'][_0x7721('0x1c')]){_0x4bd023[_0x7721('0x2b')]=_['merge'](_0x4bd023[_0x7721('0x2b')],{'$or':_[_0x7721('0x1e')](_0x4bd023[_0x7721('0x36')],function(_0x400273){var _0x42c438={};_0x42c438[_0x400273]={'$like':'%'+_0x4ea8ac[_0x7721('0x2d')][_0x7721('0x1c')]+'%'};return _0x42c438;})});}_0x4bd023=_[_0x7721('0x47')]({},_0x4bd023,_0x4ea8ac[_0x7721('0x3a')]);return _0x51ac8f[_0x7721('0xad')](_0x4bd023);}})[_0x7721('0x16')](function(_0x1192a8){if(_0x1192a8){_0x27ed5e=_0x1192a8[_0x7721('0x39')];if(!_0x4ea8ac['query'][_0x7721('0x4d')](_0x7721('0x4e'))){_0x4bd023['limit']=qs[_0x7721('0x4f')](_0x4ea8ac['query'][_0x7721('0x4f')]);_0x4bd023[_0x7721('0x11')]=qs['offset'](_0x4ea8ac['query'][_0x7721('0x11')]);}return _0x51ac8f['getBlackLists'](_0x4bd023);}})[_0x7721('0x16')](function(_0x2f7067){if(_0x2f7067){return _0x2f7067?{'count':_0x27ed5e,'rows':_0x2f7067}:null;}})[_0x7721('0x16')](respondWithResult(_0x226556,null))[_0x7721('0x30')](handleError(_0x226556,null));};exports[_0x7721('0xae')]=function(_0x376f37,_0x5b157e){var _0x4b84b9;return db['VoiceQueue'][_0x7721('0x21')]({'where':{'id':_0x376f37[_0x7721('0x31')]['id']}})[_0x7721('0x16')](handleEntityNotFound(_0x5b157e,null))[_0x7721('0x16')](function(_0x39d43b){if(_0x39d43b){return _0x39d43b['addBlackLists'](_0x376f37['body'][_0x7721('0x81')],_[_0x7721('0x43')](_0x376f37[_0x7721('0x46')],[_0x7721('0x81'),'id'])||{});}return null;})[_0x7721('0x8d')](function(_0x430304){var _0x469b6b;_0x4b84b9=_0x430304||[];var _0x6766c6=[];if(_0x430304){for(var _0x37877c=0x0;_0x37877c<_0x430304['length'];_0x37877c+=0x1){var _0x259eaa=_0x430304[_0x37877c][_0x7721('0x18')]({'plain':!![]});_0x469b6b=squel['insert']()['into'](_0x7721('0xaf'))[_0x7721('0xa1')]([_0x7721('0x95'),'ContactId',_0x7721('0x94'),_0x7721('0x53'),_0x7721('0x44'),_0x7721('0x45')],squel[_0x7721('0x6e')]()['field'](_0x7721('0x95'),'phone')[_0x7721('0x6f')]('id','ContactId')[_0x7721('0x6f')](_0x259eaa['CmListId'][_0x7721('0x78')](),_0x7721('0x94'))[_0x7721('0x6f')](_0x376f37[_0x7721('0x31')]['id'][_0x7721('0x78')](),_0x7721('0x53'))['field'](_0x7721('0xb0'),_0x7721('0x44'))[_0x7721('0x6f')](_0x7721('0xb0'),'updatedAt')[_0x7721('0x70')](_0x7721('0x97'))['where'](_0x7721('0x98'))[_0x7721('0x2b')](_0x7721('0x99'),_0x259eaa['CmListId']['toString']())[_0x7721('0x2b')]('phone\x20IS\x20NOT\x20NULL'))[_0x7721('0x78')]();_0x6766c6[_0x7721('0x77')](db['sequelize'][_0x7721('0x2d')](_0x469b6b));}return BPromise[_0x7721('0x7e')](_0x6766c6);}})['then'](function(){return _0x4b84b9;})[_0x7721('0x16')](respondWithResult(_0x5b157e,null))[_0x7721('0x30')](handleError(_0x5b157e,null));};exports[_0x7721('0xb1')]=function(_0x37da70,_0x54616a){return db[_0x7721('0x28')][_0x7721('0x21')]({'where':{'id':_0x37da70[_0x7721('0x31')]['id']}})['then'](handleEntityNotFound(_0x54616a,null))[_0x7721('0x16')](function(_0x174e79){if(_0x174e79){return _0x174e79['removeBlackLists'](_0x37da70[_0x7721('0x2d')]['ids']);}})[_0x7721('0x16')](function(_0x4c1b63){if(_0x4c1b63){return db[_0x7721('0x57')][_0x7721('0x17')]({'where':{'ListId':_0x37da70[_0x7721('0x2d')][_0x7721('0x81')],'VoiceQueueId':_0x37da70[_0x7721('0x31')]['id']}})['then'](function(){return _0x4c1b63;});}})[_0x7721('0x16')](respondWithStatusCode(_0x54616a,null))[_0x7721('0x30')](handleError(_0x54616a,null));};
\ No newline at end of file
index 45ad51f..d122f58 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf086=['emit','hook','events','../../mysqldb','VoiceQueue','setMaxListeners','remove'];(function(_0x26ed29,_0x2288f1){var _0x26182c=function(_0x23dc71){while(--_0x23dc71){_0x26ed29['push'](_0x26ed29['shift']());}};_0x26182c(++_0x2288f1);}(_0xf086,0x1ec));var _0x6f08=function(_0x313278,_0x5c968d){_0x313278=_0x313278-0x0;var _0x3f1081=_0xf086[_0x313278];return _0x3f1081;};'use strict';var EventEmitter=require(_0x6f08('0x0'));var VoiceQueue=require(_0x6f08('0x1'))['db'][_0x6f08('0x2')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0x6f08('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x6f08('0x4')};function emitEvent(_0x30419c){return function(_0x213ff5,_0x33dd5c,_0x91f2c0){VoiceQueueEvents['emit'](_0x30419c+':'+_0x213ff5['id'],_0x213ff5);VoiceQueueEvents[_0x6f08('0x5')](_0x30419c,_0x213ff5);_0x91f2c0(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueue[_0x6f08('0x6')](e,emitEvent(event));}}module['exports']=VoiceQueueEvents;
\ No newline at end of file
+var _0xef4d=['save','update','remove','hasOwnProperty','exports','../../mysqldb','VoiceQueue','setMaxListeners'];(function(_0x487db7,_0x1f4b2a){var _0x5999ca=function(_0x2280fb){while(--_0x2280fb){_0x487db7['push'](_0x487db7['shift']());}};_0x5999ca(++_0x1f4b2a);}(_0xef4d,0x85));var _0xdef4=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xef4d[_0x20a584];return _0x4b41a8;};'use strict';var EventEmitter=require('events');var VoiceQueue=require(_0xdef4('0x0'))['db'][_0xdef4('0x1')];var VoiceQueueEvents=new EventEmitter();VoiceQueueEvents[_0xdef4('0x2')](0x0);var events={'afterCreate':_0xdef4('0x3'),'afterUpdate':_0xdef4('0x4'),'afterDestroy':_0xdef4('0x5')};function emitEvent(_0xdef8db){return function(_0x37d223,_0x5f447a,_0x524287){VoiceQueueEvents['emit'](_0xdef8db+':'+_0x37d223['id'],_0x37d223);VoiceQueueEvents['emit'](_0xdef8db,_0x37d223);_0x524287(null);};}for(var e in events){if(events[_0xdef4('0x6')](e)){var event=events[e];VoiceQueue['hook'](e,emitEvent(event));}}module[_0xdef4('0x7')]=VoiceQueueEvents;
\ No newline at end of file
index d12eae6..b0527fa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x70e0=['voice_queues','lodash','util','../../config/logger','bluebird','request-promise','path','rimraf','./voiceQueue.attributes'];(function(_0x1c5683,_0x4ff312){var _0x1713fa=function(_0x2ee552){while(--_0x2ee552){_0x1c5683['push'](_0x1c5683['shift']());}};_0x1713fa(++_0x4ff312);}(_0x70e0,0x17b));var _0x070e=function(_0x38da66,_0x5e248a){_0x38da66=_0x38da66-0x0;var _0x457514=_0x70e0[_0x38da66];return _0x457514;};'use strict';var _=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var logger=require(_0x070e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x070e('0x3'));var rp=require(_0x070e('0x4'));var fs=require('fs');var path=require(_0x070e('0x5'));var rimraf=require(_0x070e('0x6'));var config=require('../../config/environment');var attributes=require(_0x070e('0x7'));module['exports']=function(_0x46fe68,_0x4b041d){return _0x46fe68['define']('VoiceQueue',attributes,{'tableName':_0x070e('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x70e0=['voice_queues','lodash','util','../../config/logger','bluebird','request-promise','path','rimraf','./voiceQueue.attributes'];(function(_0x1b15c6,_0x33f069){var _0x12145e=function(_0x1ae942){while(--_0x1ae942){_0x1b15c6['push'](_0x1b15c6['shift']());}};_0x12145e(++_0x33f069);}(_0x70e0,0x17b));var _0x070e=function(_0x5a489f,_0x4f650e){_0x5a489f=_0x5a489f-0x0;var _0x2c0f30=_0x70e0[_0x5a489f];return _0x2c0f30;};'use strict';var _=require(_0x070e('0x0'));var util=require(_0x070e('0x1'));var logger=require(_0x070e('0x2'))('api');var moment=require('moment');var BPromise=require(_0x070e('0x3'));var rp=require(_0x070e('0x4'));var fs=require('fs');var path=require(_0x070e('0x5'));var rimraf=require(_0x070e('0x6'));var config=require('../../config/environment');var attributes=require(_0x070e('0x7'));module['exports']=function(_0x46fe68,_0x4b041d){return _0x46fe68['define']('VoiceQueue',attributes,{'tableName':_0x070e('0x8'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 0936c28..a5f0faa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3875=['client','http','redis','socket.io-emitter','./voiceQueue.socket','request','VoiceQueue,\x20%s,\x20%s','request\x20sent','debug','VoiceQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','GetVoiceQueue','VoiceQueue','findAll','options','raw','where','attributes','limit','include','map','model','then','info','catch','ShowVoiceQueue','find','util','moment','ioredis','../../config/utils','../../config/logger','rpc','jayson/promise'];(function(_0x5c9865,_0x1a299a){var _0x54c22b=function(_0x538537){while(--_0x538537){_0x5c9865['push'](_0x5c9865['shift']());}};_0x54c22b(++_0x1a299a);}(_0x3875,0x129));var _0x5387=function(_0x11b19b,_0x213234){_0x11b19b=_0x11b19b-0x0;var _0x1daac1=_0x3875[_0x11b19b];return _0x1daac1;};'use strict';var _=require('lodash');var util=require(_0x5387('0x0'));var moment=require(_0x5387('0x1'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x5387('0x2'));var db=require('../../mysqldb')['db'];var utils=require(_0x5387('0x3'));var logger=require(_0x5387('0x4'))(_0x5387('0x5'));var config=require('../../config/environment');var jayson=require(_0x5387('0x6'));var client=jayson[_0x5387('0x7')][_0x5387('0x8')]({'port':0x232a});config[_0x5387('0x9')]=_['defaults'](config[_0x5387('0x9')],{'host':'localhost','port':0x18eb});var socket=require(_0x5387('0xa'))(new Redis(config[_0x5387('0x9')]));require(_0x5387('0xb'))['register'](socket);function respondWithRpcPromise(_0x168a57,_0xb37bfb,_0x17856b){return new BPromise(function(_0x5986f4,_0xfba94d){return client[_0x5387('0xc')](_0x168a57,_0x17856b)['then'](function(_0x12ef78){logger['info'](_0x5387('0xd'),_0xb37bfb,_0x5387('0xe'));logger[_0x5387('0xf')](_0x5387('0x10'),_0xb37bfb,_0x5387('0xe'),JSON[_0x5387('0x11')](_0x12ef78));if(_0x12ef78['error']){if(_0x12ef78[_0x5387('0x12')][_0x5387('0x13')]===0x1f4){logger[_0x5387('0x12')](_0x5387('0xd'),_0xb37bfb,_0x12ef78[_0x5387('0x12')]['message']);return _0xfba94d(_0x12ef78[_0x5387('0x12')]['message']);}logger['error']('VoiceQueue,\x20%s,\x20%s',_0xb37bfb,_0x12ef78[_0x5387('0x12')][_0x5387('0x14')]);return _0x5986f4(_0x12ef78[_0x5387('0x12')][_0x5387('0x14')]);}else{logger['info'](_0x5387('0xd'),_0xb37bfb,_0x5387('0xe'));_0x5986f4(_0x12ef78[_0x5387('0x15')][_0x5387('0x14')]);}})['catch'](function(_0x5040c8){logger[_0x5387('0x12')]('VoiceQueue,\x20%s,\x20%s',_0xb37bfb,_0x5040c8);_0xfba94d(_0x5040c8);});});}exports[_0x5387('0x16')]=function(_0x475acc){var _0x4024d4=this;return new Promise(function(_0xa1ab79,_0x1d146d){return db[_0x5387('0x17')][_0x5387('0x18')]({'raw':_0x475acc[_0x5387('0x19')]?_0x475acc[_0x5387('0x19')][_0x5387('0x1a')]===undefined?!![]:![]:!![],'where':_0x475acc[_0x5387('0x19')]?_0x475acc['options'][_0x5387('0x1b')]||null:null,'attributes':_0x475acc['options']?_0x475acc[_0x5387('0x19')][_0x5387('0x1c')]||null:null,'limit':_0x475acc[_0x5387('0x19')]?_0x475acc[_0x5387('0x19')][_0x5387('0x1d')]||null:null,'include':_0x475acc[_0x5387('0x19')]?_0x475acc['options'][_0x5387('0x1e')]?_[_0x5387('0x1f')](_0x475acc['options'][_0x5387('0x1e')],function(_0x57c78f){return{'model':db[_0x57c78f[_0x5387('0x20')]],'as':_0x57c78f['as'],'attributes':_0x57c78f[_0x5387('0x1c')],'include':_0x57c78f['include']?_[_0x5387('0x1f')](_0x57c78f[_0x5387('0x1e')],function(_0x311b90){return{'model':db[_0x311b90[_0x5387('0x20')]],'as':_0x311b90['as'],'attributes':_0x311b90[_0x5387('0x1c')],'include':_0x311b90[_0x5387('0x1e')]?_[_0x5387('0x1f')](_0x311b90['include'],function(_0xea4128){return{'model':db[_0xea4128['model']],'as':_0xea4128['as'],'attributes':_0xea4128[_0x5387('0x1c')]};}):[]};}):[]};}):[]:[]})[_0x5387('0x21')](function(_0xac2ea3){logger[_0x5387('0x22')](_0x5387('0x16'),_0x475acc);logger[_0x5387('0xf')](_0x5387('0x16'),_0x475acc,JSON[_0x5387('0x11')](_0xac2ea3));_0xa1ab79(_0xac2ea3);})[_0x5387('0x23')](function(_0x580b79){logger[_0x5387('0x12')](_0x5387('0x16'),_0x580b79['message'],_0x475acc);_0x1d146d(_0x4024d4[_0x5387('0x12')](0x1f4,_0x580b79[_0x5387('0x14')]));});});};exports[_0x5387('0x24')]=function(_0x165c9a){var _0xba0ad9=this;return new Promise(function(_0x5307a0,_0x3b6d0f){return db['VoiceQueue'][_0x5387('0x25')]({'raw':_0x165c9a[_0x5387('0x19')]?_0x165c9a['options'][_0x5387('0x1a')]===undefined?!![]:![]:!![],'where':_0x165c9a[_0x5387('0x19')]?_0x165c9a['options']['where']||null:null,'attributes':_0x165c9a['options']?_0x165c9a[_0x5387('0x19')]['attributes']||null:null,'include':_0x165c9a[_0x5387('0x19')]?_0x165c9a['options'][_0x5387('0x1e')]?_[_0x5387('0x1f')](_0x165c9a[_0x5387('0x19')]['include'],function(_0x533f5b){return{'model':db[_0x533f5b[_0x5387('0x20')]],'as':_0x533f5b['as'],'attributes':_0x533f5b['attributes'],'include':_0x533f5b[_0x5387('0x1e')]?_[_0x5387('0x1f')](_0x533f5b[_0x5387('0x1e')],function(_0x43f7ad){return{'model':db[_0x43f7ad[_0x5387('0x20')]],'as':_0x43f7ad['as'],'attributes':_0x43f7ad['attributes'],'include':_0x43f7ad[_0x5387('0x1e')]?_['map'](_0x43f7ad[_0x5387('0x1e')],function(_0xe71b98){return{'model':db[_0xe71b98[_0x5387('0x20')]],'as':_0xe71b98['as'],'attributes':_0xe71b98['attributes']};}):[]};}):[]};}):[]:[]})[_0x5387('0x21')](function(_0x29ba45){logger[_0x5387('0x22')](_0x5387('0x24'),_0x165c9a);logger['debug']('ShowVoiceQueue',_0x165c9a,JSON[_0x5387('0x11')](_0x29ba45));_0x5307a0(_0x29ba45);})[_0x5387('0x23')](function(_0x4161ff){logger[_0x5387('0x12')](_0x5387('0x24'),_0x4161ff[_0x5387('0x14')],_0x165c9a);_0x3b6d0f(_0xba0ad9[_0x5387('0x12')](0x1f4,_0x4161ff[_0x5387('0x14')]));});});};
\ No newline at end of file
+var _0x264c=['../../mysqldb','../../config/logger','../../config/environment','jayson/promise','redis','defaults','localhost','./voiceQueue.socket','register','request','info','VoiceQueue,\x20%s,\x20%s','request\x20sent','debug','stringify','error','code','message','result','GetVoiceQueue','VoiceQueue','findAll','options','where','attributes','limit','include','map','model','then','ShowVoiceQueue','raw','catch','lodash','util','moment','bluebird','randomstring','ioredis'];(function(_0x201c3e,_0x5b7bae){var _0x543b4f=function(_0x441f91){while(--_0x441f91){_0x201c3e['push'](_0x201c3e['shift']());}};_0x543b4f(++_0x5b7bae);}(_0x264c,0x159));var _0xc264=function(_0x1597e2,_0x388d3e){_0x1597e2=_0x1597e2-0x0;var _0x4c8c0a=_0x264c[_0x1597e2];return _0x4c8c0a;};'use strict';var _=require(_0xc264('0x0'));var util=require(_0xc264('0x1'));var moment=require(_0xc264('0x2'));var BPromise=require(_0xc264('0x3'));var rs=require(_0xc264('0x4'));var fs=require('fs');var Redis=require(_0xc264('0x5'));var db=require(_0xc264('0x6'))['db'];var utils=require('../../config/utils');var logger=require(_0xc264('0x7'))('rpc');var config=require(_0xc264('0x8'));var jayson=require(_0xc264('0x9'));var client=jayson['client']['http']({'port':0x232a});config[_0xc264('0xa')]=_[_0xc264('0xb')](config[_0xc264('0xa')],{'host':_0xc264('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0xc264('0xd'))[_0xc264('0xe')](socket);function respondWithRpcPromise(_0x35811c,_0x5e0ee8,_0x17823d){return new BPromise(function(_0x2d0259,_0x326c44){return client[_0xc264('0xf')](_0x35811c,_0x17823d)['then'](function(_0xbe553b){logger[_0xc264('0x10')](_0xc264('0x11'),_0x5e0ee8,_0xc264('0x12'));logger[_0xc264('0x13')]('VoiceQueue,\x20%s,\x20%s,\x20%s',_0x5e0ee8,_0xc264('0x12'),JSON[_0xc264('0x14')](_0xbe553b));if(_0xbe553b[_0xc264('0x15')]){if(_0xbe553b[_0xc264('0x15')][_0xc264('0x16')]===0x1f4){logger['error'](_0xc264('0x11'),_0x5e0ee8,_0xbe553b['error']['message']);return _0x326c44(_0xbe553b['error']['message']);}logger[_0xc264('0x15')](_0xc264('0x11'),_0x5e0ee8,_0xbe553b[_0xc264('0x15')][_0xc264('0x17')]);return _0x2d0259(_0xbe553b[_0xc264('0x15')][_0xc264('0x17')]);}else{logger['info'](_0xc264('0x11'),_0x5e0ee8,'request\x20sent');_0x2d0259(_0xbe553b[_0xc264('0x18')][_0xc264('0x17')]);}})['catch'](function(_0x53a0a0){logger[_0xc264('0x15')]('VoiceQueue,\x20%s,\x20%s',_0x5e0ee8,_0x53a0a0);_0x326c44(_0x53a0a0);});});}exports[_0xc264('0x19')]=function(_0x2722a1){var _0x562fee=this;return new Promise(function(_0x3238d3,_0xd42402){return db[_0xc264('0x1a')][_0xc264('0x1b')]({'raw':_0x2722a1[_0xc264('0x1c')]?_0x2722a1[_0xc264('0x1c')]['raw']===undefined?!![]:![]:!![],'where':_0x2722a1[_0xc264('0x1c')]?_0x2722a1['options'][_0xc264('0x1d')]||null:null,'attributes':_0x2722a1[_0xc264('0x1c')]?_0x2722a1[_0xc264('0x1c')][_0xc264('0x1e')]||null:null,'limit':_0x2722a1[_0xc264('0x1c')]?_0x2722a1['options'][_0xc264('0x1f')]||null:null,'include':_0x2722a1[_0xc264('0x1c')]?_0x2722a1[_0xc264('0x1c')][_0xc264('0x20')]?_[_0xc264('0x21')](_0x2722a1['options'][_0xc264('0x20')],function(_0x483d3d){return{'model':db[_0x483d3d['model']],'as':_0x483d3d['as'],'attributes':_0x483d3d[_0xc264('0x1e')],'include':_0x483d3d[_0xc264('0x20')]?_[_0xc264('0x21')](_0x483d3d['include'],function(_0x39f56e){return{'model':db[_0x39f56e['model']],'as':_0x39f56e['as'],'attributes':_0x39f56e[_0xc264('0x1e')],'include':_0x39f56e[_0xc264('0x20')]?_['map'](_0x39f56e[_0xc264('0x20')],function(_0x455fd8){return{'model':db[_0x455fd8[_0xc264('0x22')]],'as':_0x455fd8['as'],'attributes':_0x455fd8[_0xc264('0x1e')]};}):[]};}):[]};}):[]:[]})[_0xc264('0x23')](function(_0xba8f4f){logger[_0xc264('0x10')](_0xc264('0x19'),_0x2722a1);logger['debug'](_0xc264('0x19'),_0x2722a1,JSON['stringify'](_0xba8f4f));_0x3238d3(_0xba8f4f);})['catch'](function(_0x3d6ee2){logger[_0xc264('0x15')](_0xc264('0x19'),_0x3d6ee2[_0xc264('0x17')],_0x2722a1);_0xd42402(_0x562fee[_0xc264('0x15')](0x1f4,_0x3d6ee2[_0xc264('0x17')]));});});};exports[_0xc264('0x24')]=function(_0x5cd2bf){var _0x557860=this;return new Promise(function(_0x53024f,_0x233964){return db[_0xc264('0x1a')]['find']({'raw':_0x5cd2bf[_0xc264('0x1c')]?_0x5cd2bf['options'][_0xc264('0x25')]===undefined?!![]:![]:!![],'where':_0x5cd2bf['options']?_0x5cd2bf['options'][_0xc264('0x1d')]||null:null,'attributes':_0x5cd2bf[_0xc264('0x1c')]?_0x5cd2bf['options'][_0xc264('0x1e')]||null:null,'include':_0x5cd2bf[_0xc264('0x1c')]?_0x5cd2bf[_0xc264('0x1c')][_0xc264('0x20')]?_[_0xc264('0x21')](_0x5cd2bf[_0xc264('0x1c')][_0xc264('0x20')],function(_0x41d5ad){return{'model':db[_0x41d5ad[_0xc264('0x22')]],'as':_0x41d5ad['as'],'attributes':_0x41d5ad['attributes'],'include':_0x41d5ad['include']?_['map'](_0x41d5ad[_0xc264('0x20')],function(_0x1ab3a1){return{'model':db[_0x1ab3a1[_0xc264('0x22')]],'as':_0x1ab3a1['as'],'attributes':_0x1ab3a1[_0xc264('0x1e')],'include':_0x1ab3a1[_0xc264('0x20')]?_[_0xc264('0x21')](_0x1ab3a1[_0xc264('0x20')],function(_0x297eb8){return{'model':db[_0x297eb8['model']],'as':_0x297eb8['as'],'attributes':_0x297eb8[_0xc264('0x1e')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5e7324){logger[_0xc264('0x10')]('ShowVoiceQueue',_0x5cd2bf);logger[_0xc264('0x13')]('ShowVoiceQueue',_0x5cd2bf,JSON[_0xc264('0x14')](_0x5e7324));_0x53024f(_0x5e7324);})[_0xc264('0x26')](function(_0x518956){logger[_0xc264('0x15')]('ShowVoiceQueue',_0x518956['message'],_0x5cd2bf);_0x233964(_0x557860[_0xc264('0x15')](0x1f4,_0x518956[_0xc264('0x17')]));});});};
\ No newline at end of file
index ca4500b..cc43dc0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3388=['./voiceQueue.events','remove','update','emit','removeListener','length','voiceQueue:'];(function(_0x59b2f4,_0x2a3145){var _0x18a176=function(_0x5d2fba){while(--_0x5d2fba){_0x59b2f4['push'](_0x59b2f4['shift']());}};_0x18a176(++_0x2a3145);}(_0x3388,0x118));var _0x8338=function(_0x5391fb,_0x786bf0){_0x5391fb=_0x5391fb-0x0;var _0x1b3ef3=_0x3388[_0x5391fb];return _0x1b3ef3;};'use strict';var VoiceQueueEvents=require(_0x8338('0x0'));var events=['save',_0x8338('0x1'),_0x8338('0x2')];function createListener(_0x5e671d,_0x60af29){return function(_0xd9701e){_0x60af29[_0x8338('0x3')](_0x5e671d,_0xd9701e);};}function removeListener(_0x30cf9e,_0x116381){return function(){VoiceQueueEvents[_0x8338('0x4')](_0x30cf9e,_0x116381);};}exports['register']=function(_0x486e98){for(var _0x5ad049=0x0,_0x51b92a=events[_0x8338('0x5')];_0x5ad049<_0x51b92a;_0x5ad049++){var _0x5305ee=events[_0x5ad049];var _0x136ac4=createListener(_0x8338('0x6')+_0x5305ee,_0x486e98);VoiceQueueEvents['on'](_0x5305ee,_0x136ac4);}};
\ No newline at end of file
+var _0x5ba8=['update','removeListener','register','length','voiceQueue:','./voiceQueue.events','save','remove'];(function(_0x5ba353,_0x11fd8b){var _0x149f6b=function(_0x59b92e){while(--_0x59b92e){_0x5ba353['push'](_0x5ba353['shift']());}};_0x149f6b(++_0x11fd8b);}(_0x5ba8,0xe5));var _0x85ba=function(_0x54b9d4,_0x3930e7){_0x54b9d4=_0x54b9d4-0x0;var _0x32f9e8=_0x5ba8[_0x54b9d4];return _0x32f9e8;};'use strict';var VoiceQueueEvents=require(_0x85ba('0x0'));var events=[_0x85ba('0x1'),_0x85ba('0x2'),_0x85ba('0x3')];function createListener(_0x3e69c4,_0x5df54f){return function(_0x15c744){_0x5df54f['emit'](_0x3e69c4,_0x15c744);};}function removeListener(_0x102ccf,_0x56729a){return function(){VoiceQueueEvents[_0x85ba('0x4')](_0x102ccf,_0x56729a);};}exports[_0x85ba('0x5')]=function(_0x3b64ad){for(var _0xc29cc2=0x0,_0xb6e2c=events[_0x85ba('0x6')];_0xc29cc2<_0xb6e2c;_0xc29cc2++){var _0x432d63=events[_0xc29cc2];var _0x24cce8=createListener(_0x85ba('0x7')+_0x432d63,_0x3b64ad);VoiceQueueEvents['on'](_0x432d63,_0x24cce8);}};
\ No newline at end of file
index e3221bb..349aa37 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x468d=['get','/describe','describe','getVoiceQueuesReport','/:id','show','update','delete','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueueReport.controller','isAuthenticated','index'];(function(_0x4d8f6f,_0x559720){var _0x441c71=function(_0x543b50){while(--_0x543b50){_0x4d8f6f['push'](_0x4d8f6f['shift']());}};_0x441c71(++_0x559720);}(_0x468d,0x72));var _0xd468=function(_0x18d806,_0x2f386d){_0x18d806=_0x18d806-0x0;var _0x57e3e0=_0x468d[_0x18d806];return _0x57e3e0;};'use strict';var multer=require(_0xd468('0x0'));var util=require('util');var path=require(_0xd468('0x1'));var timeout=require(_0xd468('0x2'));var express=require(_0xd468('0x3'));var router=express[_0xd468('0x4')]();var fs_extra=require(_0xd468('0x5'));var auth=require(_0xd468('0x6'));var interaction=require(_0xd468('0x7'));var config=require(_0xd468('0x8'));var controller=require(_0xd468('0x9'));router['get']('/',auth[_0xd468('0xa')](),controller[_0xd468('0xb')]);router[_0xd468('0xc')](_0xd468('0xd'),auth[_0xd468('0xa')](),controller[_0xd468('0xe')]);router[_0xd468('0xc')]('/index',auth[_0xd468('0xa')](),controller[_0xd468('0xf')]);router[_0xd468('0xc')](_0xd468('0x10'),auth[_0xd468('0xa')](),controller[_0xd468('0x11')]);router['post']('/',auth['isAuthenticated'](),controller['create']);router['put'](_0xd468('0x10'),auth['isAuthenticated'](),controller[_0xd468('0x12')]);router[_0xd468('0x13')](_0xd468('0x10'),auth[_0xd468('0xa')](),controller['destroy']);module[_0xd468('0x14')]=router;
\ No newline at end of file
+var _0xb658=['update','delete','destroy','exports','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./voiceQueueReport.controller','get','isAuthenticated','index','describe','show','create','put','/:id'];(function(_0x3366ad,_0x424860){var _0x4beceb=function(_0x2ea302){while(--_0x2ea302){_0x3366ad['push'](_0x3366ad['shift']());}};_0x4beceb(++_0x424860);}(_0xb658,0x1bc));var _0x8b65=function(_0x3e2e5d,_0x567ed4){_0x3e2e5d=_0x3e2e5d-0x0;var _0x2f4ef9=_0xb658[_0x3e2e5d];return _0x2f4ef9;};'use strict';var multer=require(_0x8b65('0x0'));var util=require('util');var path=require(_0x8b65('0x1'));var timeout=require(_0x8b65('0x2'));var express=require(_0x8b65('0x3'));var router=express[_0x8b65('0x4')]();var fs_extra=require(_0x8b65('0x5'));var auth=require(_0x8b65('0x6'));var interaction=require(_0x8b65('0x7'));var config=require(_0x8b65('0x8'));var controller=require(_0x8b65('0x9'));router[_0x8b65('0xa')]('/',auth[_0x8b65('0xb')](),controller[_0x8b65('0xc')]);router[_0x8b65('0xa')]('/describe',auth[_0x8b65('0xb')](),controller[_0x8b65('0xd')]);router['get']('/index',auth['isAuthenticated'](),controller['getVoiceQueuesReport']);router[_0x8b65('0xa')]('/:id',auth[_0x8b65('0xb')](),controller[_0x8b65('0xe')]);router['post']('/',auth[_0x8b65('0xb')](),controller[_0x8b65('0xf')]);router[_0x8b65('0x10')](_0x8b65('0x11'),auth[_0x8b65('0xb')](),controller[_0x8b65('0x12')]);router[_0x8b65('0x13')](_0x8b65('0x11'),auth[_0x8b65('0xb')](),controller[_0x8b65('0x14')]);module[_0x8b65('0x15')]=router;
\ No newline at end of file
index e9112a6..9001792 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb81c=['setDataValue','INTEGER','BOOLEAN','COMPLETEDBYCALLER,\x20COMPLETEDBYAGENT,\x20FORWARDTRANFER,\x20BLINDTRANSFER,\x20ATTENDEDTRANSFER,\x20EXITWITHKEY,\x20TIMEOUT','FORWARD,\x20BLIND,\x20ATTENDED','sequelize','exports','STRING','DATE','getDataValue','YYYY-MM-DD\x20HH:mm:ss','queuecallerleaveAt'];(function(_0x110c54,_0xa3cfcb){var _0x58a348=function(_0x2ddb40){while(--_0x2ddb40){_0x110c54['push'](_0x110c54['shift']());}};_0x58a348(++_0xa3cfcb);}(_0xb81c,0x13d));var _0xcb81=function(_0x557bc9,_0x449237){_0x557bc9=_0x557bc9-0x0;var _0x8c2350=_0xb81c[_0x557bc9];return _0x8c2350;};'use strict';var Sequelize=require(_0xcb81('0x0'));var moment=require('moment');module[_0xcb81('0x1')]={'type':{'type':Sequelize[_0xcb81('0x2')]},'uniqueid':{'type':Sequelize['STRING']},'calleridnum':{'type':Sequelize[_0xcb81('0x2')]},'calleridname':{'type':Sequelize['STRING']},'queue':{'type':Sequelize[_0xcb81('0x2')]},'queuecallerjoinAt':{'type':Sequelize[_0xcb81('0x3')]},'queuecallerleaveAt':{'type':Sequelize['DATE'],'set':function(_0x4d4e7c){var _0x190ebc=moment(_0x4d4e7c);var _0xcef70b=moment(this[_0xcb81('0x4')]('queuecallerjoinAt'))['format'](_0xcb81('0x5'));var _0xdee87b=_0x190ebc['diff'](_0xcef70b,'seconds');this['setDataValue'](_0xcb81('0x6'),_0x4d4e7c);this[_0xcb81('0x7')]('holdtime',_0xdee87b||null);}},'position':{'type':Sequelize[_0xcb81('0x8')]},'count':{'type':Sequelize['INTEGER']},'queuecallerabandon':{'type':Sequelize[_0xcb81('0x9')],'defaultValue':![]},'queuecallerabandonAt':{'type':Sequelize['DATE']},'queuecallercomplete':{'type':Sequelize[_0xcb81('0x9')],'defaultValue':![]},'queuecallercompleteAt':{'type':Sequelize['DATE']},'queuecallerexit':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queuecallerexitAt':{'type':Sequelize[_0xcb81('0x3')]},'queuecallerexitreason':{'type':Sequelize[_0xcb81('0x2')],'comment':_0xcb81('0xa')},'originalposition':{'type':Sequelize['INTEGER']},'channel':{'type':Sequelize[_0xcb81('0x2')]},'connectedlinenum':{'type':Sequelize[_0xcb81('0x2')]},'connectedlinename':{'type':Sequelize[_0xcb81('0x2')]},'accountcode':{'type':Sequelize['STRING']},'context':{'type':Sequelize[_0xcb81('0x2')]},'exten':{'type':Sequelize['STRING']},'priority':{'type':Sequelize[_0xcb81('0x2')]},'holdtime':{'type':Sequelize[_0xcb81('0x8')]},'mohtime':{'type':Sequelize[_0xcb81('0x8')],'defaultValue':0x0},'assigned':{'type':Sequelize[_0xcb81('0x9')],'defaultValue':![]},'lastAssignedTo':{'type':Sequelize[_0xcb81('0x2')]},'transfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'transfertype':{'type':Sequelize[_0xcb81('0x2')],'comment':_0xcb81('0xb')},'transferexten':{'type':Sequelize[_0xcb81('0x2')]},'transferuniqueid':{'type':Sequelize[_0xcb81('0x2')]},'disposition':{'type':Sequelize[_0xcb81('0x2')]},'secondDisposition':{'type':Sequelize[_0xcb81('0x2')]},'thirdDisposition':{'type':Sequelize[_0xcb81('0x2')]},'queuecallerenterreason':{'type':Sequelize[_0xcb81('0x8')],'defaultValue':0x0},'note':{'type':Sequelize[_0xcb81('0x2')]}};
\ No newline at end of file
+var _0xed0b=['sequelize','moment','exports','STRING','DATE','getDataValue','format','YYYY-MM-DD\x20HH:mm:ss','diff','seconds','setDataValue','queuecallerleaveAt','holdtime','INTEGER','BOOLEAN','COMPLETEDBYCALLER,\x20COMPLETEDBYAGENT,\x20FORWARDTRANFER,\x20BLINDTRANSFER,\x20ATTENDEDTRANSFER,\x20EXITWITHKEY,\x20TIMEOUT'];(function(_0x1dc591,_0x22643a){var _0x2d107b=function(_0x2acfbf){while(--_0x2acfbf){_0x1dc591['push'](_0x1dc591['shift']());}};_0x2d107b(++_0x22643a);}(_0xed0b,0x1a0));var _0xbed0=function(_0x45bf86,_0x75586e){_0x45bf86=_0x45bf86-0x0;var _0x1f02b7=_0xed0b[_0x45bf86];return _0x1f02b7;};'use strict';var Sequelize=require(_0xbed0('0x0'));var moment=require(_0xbed0('0x1'));module[_0xbed0('0x2')]={'type':{'type':Sequelize[_0xbed0('0x3')]},'uniqueid':{'type':Sequelize[_0xbed0('0x3')]},'calleridnum':{'type':Sequelize[_0xbed0('0x3')]},'calleridname':{'type':Sequelize[_0xbed0('0x3')]},'queue':{'type':Sequelize[_0xbed0('0x3')]},'queuecallerjoinAt':{'type':Sequelize[_0xbed0('0x4')]},'queuecallerleaveAt':{'type':Sequelize[_0xbed0('0x4')],'set':function(_0x1e6cc2){var _0xa60107=moment(_0x1e6cc2);var _0x54cb9d=moment(this[_0xbed0('0x5')]('queuecallerjoinAt'))[_0xbed0('0x6')](_0xbed0('0x7'));var _0x2fee42=_0xa60107[_0xbed0('0x8')](_0x54cb9d,_0xbed0('0x9'));this[_0xbed0('0xa')](_0xbed0('0xb'),_0x1e6cc2);this[_0xbed0('0xa')](_0xbed0('0xc'),_0x2fee42||null);}},'position':{'type':Sequelize[_0xbed0('0xd')]},'count':{'type':Sequelize[_0xbed0('0xd')]},'queuecallerabandon':{'type':Sequelize[_0xbed0('0xe')],'defaultValue':![]},'queuecallerabandonAt':{'type':Sequelize[_0xbed0('0x4')]},'queuecallercomplete':{'type':Sequelize[_0xbed0('0xe')],'defaultValue':![]},'queuecallercompleteAt':{'type':Sequelize[_0xbed0('0x4')]},'queuecallerexit':{'type':Sequelize[_0xbed0('0xe')],'defaultValue':![]},'queuecallerexitAt':{'type':Sequelize[_0xbed0('0x4')]},'queuecallerexitreason':{'type':Sequelize[_0xbed0('0x3')],'comment':_0xbed0('0xf')},'originalposition':{'type':Sequelize[_0xbed0('0xd')]},'channel':{'type':Sequelize[_0xbed0('0x3')]},'connectedlinenum':{'type':Sequelize[_0xbed0('0x3')]},'connectedlinename':{'type':Sequelize[_0xbed0('0x3')]},'accountcode':{'type':Sequelize[_0xbed0('0x3')]},'context':{'type':Sequelize['STRING']},'exten':{'type':Sequelize[_0xbed0('0x3')]},'priority':{'type':Sequelize[_0xbed0('0x3')]},'holdtime':{'type':Sequelize[_0xbed0('0xd')]},'mohtime':{'type':Sequelize[_0xbed0('0xd')],'defaultValue':0x0},'assigned':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'lastAssignedTo':{'type':Sequelize['STRING']},'transfer':{'type':Sequelize[_0xbed0('0xe')],'defaultValue':![]},'transfertype':{'type':Sequelize['STRING'],'comment':'FORWARD,\x20BLIND,\x20ATTENDED'},'transferexten':{'type':Sequelize[_0xbed0('0x3')]},'transferuniqueid':{'type':Sequelize['STRING']},'disposition':{'type':Sequelize['STRING']},'secondDisposition':{'type':Sequelize[_0xbed0('0x3')]},'thirdDisposition':{'type':Sequelize[_0xbed0('0x3')]},'queuecallerenterreason':{'type':Sequelize[_0xbed0('0xd')],'defaultValue':0x0},'note':{'type':Sequelize[_0xbed0('0x3')]}};
\ No newline at end of file
index 0d002b9..27fa646 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe8f7=['apply','reject','save','then','stack','name','send','index','map','VoiceQueueReport','rawAttributes','fieldName','type','key','query','keys','filters','model','attributes','intersection','fields','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','VIRTUAL','options','includeAll','include','findAll','catch','params','find','create','body','destroy','describe','order','rows','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','util','sox','ejs','fs-extra','squel','crypto','desk.js','to-csv','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','redis','defaults','localhost','./voiceQueueReport.socket','register','sendStatus','status','end','json','undefined','limit','count','offset','set','Content-Range'];(function(_0x2a8084,_0x1407b9){var _0xd2dbf4=function(_0x21d988){while(--_0x21d988){_0x2a8084['push'](_0x2a8084['shift']());}};_0xd2dbf4(++_0x1407b9);}(_0xe8f7,0xcd));var _0x7e8f=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe8f7[_0x3dd15e];return _0x231fd0;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0x7e8f('0x0'));var zipdir=require(_0x7e8f('0x1'));var jsonpatch=require(_0x7e8f('0x2'));var rp=require(_0x7e8f('0x3'));var moment=require(_0x7e8f('0x4'));var BPromise=require(_0x7e8f('0x5'));var Mustache=require('mustache');var util=require(_0x7e8f('0x6'));var path=require('path');var sox=require(_0x7e8f('0x7'));var csv=require('to-csv');var ejs=require(_0x7e8f('0x8'));var fs=require('fs');var fs_extra=require(_0x7e8f('0x9'));var _=require('lodash');var squel=require(_0x7e8f('0xa'));var crypto=require(_0x7e8f('0xb'));var jsforce=require('jsforce');var deskjs=require(_0x7e8f('0xc'));var toCsv=require(_0x7e8f('0xd'));var querystring=require(_0x7e8f('0xe'));var Papa=require(_0x7e8f('0xf'));var Redis=require('ioredis');var authService=require(_0x7e8f('0x10'));var qs=require(_0x7e8f('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x7e8f('0x12'));var utils=require(_0x7e8f('0x13'));var config=require(_0x7e8f('0x14'));var licenseUtil=require(_0x7e8f('0x15'));var db=require(_0x7e8f('0x16'))['db'];config[_0x7e8f('0x17')]=_[_0x7e8f('0x18')](config['redis'],{'host':_0x7e8f('0x19'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x7e8f('0x1a'))[_0x7e8f('0x1b')](socket);function respondWithStatusCode(_0x3eeff0,_0x983054){_0x983054=_0x983054||0xcc;return function(_0x2db301){if(_0x2db301){return _0x3eeff0[_0x7e8f('0x1c')](_0x983054);}return _0x3eeff0[_0x7e8f('0x1d')](_0x983054)[_0x7e8f('0x1e')]();};}function respondWithResult(_0x7866b3,_0x27122d){_0x27122d=_0x27122d||0xc8;return function(_0x4fbaa8){if(_0x4fbaa8){return _0x7866b3[_0x7e8f('0x1d')](_0x27122d)[_0x7e8f('0x1f')](_0x4fbaa8);}};}function respondWithFilteredResult(_0x2cb787,_0x5bec83){return function(_0x3dcc46){if(_0x3dcc46){var _0x4c6f74=typeof _0x5bec83['offset']===_0x7e8f('0x20')&&typeof _0x5bec83[_0x7e8f('0x21')]==='undefined';var _0x117e8f=_0x3dcc46[_0x7e8f('0x22')];var _0x51c96a=_0x4c6f74?0x0:_0x5bec83[_0x7e8f('0x23')];var _0x3c6961=_0x4c6f74?_0x3dcc46[_0x7e8f('0x22')]:_0x5bec83[_0x7e8f('0x23')]+_0x5bec83[_0x7e8f('0x21')];var _0x1b09da;if(_0x3c6961>=_0x117e8f){_0x3c6961=_0x117e8f;_0x1b09da=0xc8;}else{_0x1b09da=0xce;}_0x2cb787[_0x7e8f('0x1d')](_0x1b09da);return _0x2cb787[_0x7e8f('0x24')](_0x7e8f('0x25'),_0x51c96a+'-'+_0x3c6961+'/'+_0x117e8f)[_0x7e8f('0x1f')](_0x3dcc46);}return null;};}function patchUpdates(_0x2af8d0){return function(_0x168baf){try{jsonpatch[_0x7e8f('0x26')](_0x168baf,_0x2af8d0,!![]);}catch(_0x2d4327){return BPromise[_0x7e8f('0x27')](_0x2d4327);}return _0x168baf[_0x7e8f('0x28')]();};}function saveUpdates(_0x195ec7,_0x329593){return function(_0x58bb14){if(_0x58bb14){return _0x58bb14['update'](_0x195ec7)[_0x7e8f('0x29')](function(_0x3d2ad0){return _0x3d2ad0;});}return null;};}function removeEntity(_0x23df12,_0x5ddd7d){return function(_0xaf9e95){if(_0xaf9e95){return _0xaf9e95['destroy']()[_0x7e8f('0x29')](function(){_0x23df12[_0x7e8f('0x1d')](0xcc)[_0x7e8f('0x1e')]();});}};}function handleEntityNotFound(_0x140403,_0x509f10){return function(_0x5060b7){if(!_0x5060b7){_0x140403[_0x7e8f('0x1c')](0x194);}return _0x5060b7;};}function handleError(_0x1bd919,_0x43d698){_0x43d698=_0x43d698||0x1f4;return function(_0x2e74b7){logger['error'](_0x2e74b7[_0x7e8f('0x2a')]);if(_0x2e74b7[_0x7e8f('0x2b')]){delete _0x2e74b7[_0x7e8f('0x2b')];}_0x1bd919['status'](_0x43d698)[_0x7e8f('0x2c')](_0x2e74b7);};}exports[_0x7e8f('0x2d')]=function(_0x26b9b8,_0x423053){var _0x410f77={},_0x4761d8={},_0x5cf090={'count':0x0,'rows':[]};var _0x5f4018=_[_0x7e8f('0x2e')](db[_0x7e8f('0x2f')][_0x7e8f('0x30')],function(_0x36aae7){return{'name':_0x36aae7[_0x7e8f('0x31')],'type':_0x36aae7[_0x7e8f('0x32')][_0x7e8f('0x33')]};});_0x4761d8['model']=_[_0x7e8f('0x2e')](_0x5f4018,_0x7e8f('0x2b'));_0x4761d8[_0x7e8f('0x34')]=_[_0x7e8f('0x35')](_0x26b9b8[_0x7e8f('0x34')]);_0x4761d8[_0x7e8f('0x36')]=_['intersection'](_0x4761d8[_0x7e8f('0x37')],_0x4761d8['query']);_0x410f77[_0x7e8f('0x38')]=_[_0x7e8f('0x39')](_0x4761d8[_0x7e8f('0x37')],qs[_0x7e8f('0x3a')](_0x26b9b8['query']['fields']));_0x410f77[_0x7e8f('0x38')]=_0x410f77['attributes'][_0x7e8f('0x3b')]?_0x410f77['attributes']:_0x4761d8[_0x7e8f('0x37')];if(!_0x26b9b8[_0x7e8f('0x34')][_0x7e8f('0x3c')](_0x7e8f('0x3d'))){_0x410f77[_0x7e8f('0x21')]=qs[_0x7e8f('0x21')](_0x26b9b8[_0x7e8f('0x34')][_0x7e8f('0x21')]);_0x410f77[_0x7e8f('0x23')]=qs[_0x7e8f('0x23')](_0x26b9b8[_0x7e8f('0x34')]['offset']);}_0x410f77['order']=qs[_0x7e8f('0x3e')](_0x26b9b8[_0x7e8f('0x34')][_0x7e8f('0x3e')]);_0x410f77[_0x7e8f('0x3f')]=qs[_0x7e8f('0x36')](_[_0x7e8f('0x40')](_0x26b9b8[_0x7e8f('0x34')],_0x4761d8[_0x7e8f('0x36')]),_0x5f4018);if(_0x26b9b8[_0x7e8f('0x34')][_0x7e8f('0x41')]){_0x410f77[_0x7e8f('0x3f')]=_[_0x7e8f('0x42')](_0x410f77[_0x7e8f('0x3f')],{'$or':_[_0x7e8f('0x2e')](_0x5f4018,function(_0x29be43){if(_0x29be43[_0x7e8f('0x32')]!==_0x7e8f('0x43')){var _0x45b0d0={};_0x45b0d0[_0x29be43[_0x7e8f('0x2b')]]={'$like':'%'+_0x26b9b8[_0x7e8f('0x34')]['filter']+'%'};return _0x45b0d0;}})});}_0x410f77=_[_0x7e8f('0x42')]({},_0x410f77,_0x26b9b8[_0x7e8f('0x44')]);var _0x527bd3={'where':_0x410f77['where']};return db['VoiceQueueReport'][_0x7e8f('0x22')](_0x527bd3)[_0x7e8f('0x29')](function(_0x8e5045){_0x5cf090[_0x7e8f('0x22')]=_0x8e5045;if(_0x26b9b8[_0x7e8f('0x34')][_0x7e8f('0x45')]){_0x410f77[_0x7e8f('0x46')]=[{'all':!![]}];}return db['VoiceQueueReport'][_0x7e8f('0x47')](_0x410f77);})[_0x7e8f('0x29')](function(_0x537830){_0x5cf090['rows']=_0x537830;return _0x5cf090;})[_0x7e8f('0x29')](respondWithFilteredResult(_0x423053,_0x410f77))[_0x7e8f('0x48')](handleError(_0x423053,null));};exports['show']=function(_0x1ec8be,_0x4fc63e){var _0x4e8827={'raw':![],'where':{'id':_0x1ec8be[_0x7e8f('0x49')]['id']}},_0x15b70f={};_0x15b70f[_0x7e8f('0x37')]=_['keys'](db['VoiceQueueReport'][_0x7e8f('0x30')]);_0x15b70f[_0x7e8f('0x34')]=_['keys'](_0x1ec8be[_0x7e8f('0x34')]);_0x15b70f[_0x7e8f('0x36')]=_[_0x7e8f('0x39')](_0x15b70f[_0x7e8f('0x37')],_0x15b70f[_0x7e8f('0x34')]);_0x4e8827[_0x7e8f('0x38')]=_[_0x7e8f('0x39')](_0x15b70f[_0x7e8f('0x37')],qs[_0x7e8f('0x3a')](_0x1ec8be['query'][_0x7e8f('0x3a')]));_0x4e8827[_0x7e8f('0x38')]=_0x4e8827['attributes']['length']?_0x4e8827[_0x7e8f('0x38')]:_0x15b70f[_0x7e8f('0x37')];if(_0x1ec8be[_0x7e8f('0x34')][_0x7e8f('0x45')]){_0x4e8827[_0x7e8f('0x46')]=[{'all':!![]}];}_0x4e8827=_[_0x7e8f('0x42')]({},_0x4e8827,_0x1ec8be[_0x7e8f('0x44')]);return db[_0x7e8f('0x2f')][_0x7e8f('0x4a')](_0x4e8827)['then'](handleEntityNotFound(_0x4fc63e,null))[_0x7e8f('0x29')](respondWithResult(_0x4fc63e,null))[_0x7e8f('0x48')](handleError(_0x4fc63e,null));};exports[_0x7e8f('0x4b')]=function(_0x39f47c,_0x30a747){return db[_0x7e8f('0x2f')][_0x7e8f('0x4b')](_0x39f47c[_0x7e8f('0x4c')],{})[_0x7e8f('0x29')](respondWithResult(_0x30a747,0xc9))[_0x7e8f('0x48')](handleError(_0x30a747,null));};exports['update']=function(_0x7dfa15,_0x33a98f){if(_0x7dfa15[_0x7e8f('0x4c')]['id']){delete _0x7dfa15[_0x7e8f('0x4c')]['id'];}return db[_0x7e8f('0x2f')][_0x7e8f('0x4a')]({'where':{'id':_0x7dfa15['params']['id']}})[_0x7e8f('0x29')](handleEntityNotFound(_0x33a98f,null))[_0x7e8f('0x29')](saveUpdates(_0x7dfa15['body'],null))[_0x7e8f('0x29')](respondWithResult(_0x33a98f,null))['catch'](handleError(_0x33a98f,null));};exports[_0x7e8f('0x4d')]=function(_0x3e3fc2,_0x47b2b1){return db[_0x7e8f('0x2f')][_0x7e8f('0x4a')]({'where':{'id':_0x3e3fc2[_0x7e8f('0x49')]['id']}})[_0x7e8f('0x29')](handleEntityNotFound(_0x47b2b1,null))[_0x7e8f('0x29')](removeEntity(_0x47b2b1,null))['catch'](handleError(_0x47b2b1,null));};exports[_0x7e8f('0x4e')]=function(_0x7b8601,_0x34da50){return db[_0x7e8f('0x2f')][_0x7e8f('0x4e')]()[_0x7e8f('0x29')](respondWithResult(_0x34da50,null))['catch'](handleError(_0x34da50,null));};exports['getVoiceQueuesReport']=function(_0x40c285,_0x4e6140){var _0x572f30={},_0x441e92={},_0x22e092={'count':0x0,'rows':[]};_0x441e92[_0x7e8f('0x37')]=_[_0x7e8f('0x35')](db[_0x7e8f('0x2f')]['rawAttributes']);_0x441e92[_0x7e8f('0x34')]=_['keys'](_0x40c285[_0x7e8f('0x34')]);_0x441e92[_0x7e8f('0x36')]=_[_0x7e8f('0x39')](_0x441e92['model'],_0x441e92[_0x7e8f('0x34')]);_0x572f30[_0x7e8f('0x38')]=_[_0x7e8f('0x39')](_0x441e92[_0x7e8f('0x37')],qs['fields'](_0x40c285[_0x7e8f('0x34')][_0x7e8f('0x3a')]));_0x572f30[_0x7e8f('0x38')]=_0x572f30[_0x7e8f('0x38')]['length']?_0x572f30[_0x7e8f('0x38')]:_0x441e92['model'];if(!_0x40c285[_0x7e8f('0x34')][_0x7e8f('0x3c')]('nolimit')){_0x572f30[_0x7e8f('0x21')]=qs[_0x7e8f('0x21')](_0x40c285[_0x7e8f('0x34')][_0x7e8f('0x21')]);_0x572f30[_0x7e8f('0x23')]=qs['offset'](_0x40c285[_0x7e8f('0x34')][_0x7e8f('0x23')]);}_0x572f30[_0x7e8f('0x4f')]=qs['sort'](_0x40c285[_0x7e8f('0x34')]['sort']);_0x572f30[_0x7e8f('0x3f')]=qs['filters'](_[_0x7e8f('0x40')](_0x40c285[_0x7e8f('0x34')],_0x441e92['filters']));if(_0x40c285[_0x7e8f('0x34')][_0x7e8f('0x41')]){_0x572f30['where']=_[_0x7e8f('0x42')](_0x572f30[_0x7e8f('0x3f')],{'$or':_[_0x7e8f('0x2e')](_0x572f30[_0x7e8f('0x38')],function(_0x59f270){var _0x1b3d55={};_0x1b3d55[_0x59f270]={'$like':'%'+_0x40c285[_0x7e8f('0x34')][_0x7e8f('0x41')]+'%'};return _0x1b3d55;})});}_0x572f30=_[_0x7e8f('0x42')]({},_0x572f30,_0x40c285[_0x7e8f('0x44')]);var _0x43bb2f={'where':_0x572f30['where']};return db[_0x7e8f('0x2f')][_0x7e8f('0x22')](_0x43bb2f)[_0x7e8f('0x29')](function(_0x530bb7){_0x22e092[_0x7e8f('0x22')]=_0x530bb7;if(_0x40c285[_0x7e8f('0x34')][_0x7e8f('0x45')]){_0x572f30[_0x7e8f('0x46')]=[{'all':!![]}];}return db['VoiceQueueReport'][_0x7e8f('0x47')](_0x572f30);})[_0x7e8f('0x29')](function(_0x368b38){_0x22e092[_0x7e8f('0x50')]=_0x368b38;return _0x22e092;})[_0x7e8f('0x29')](respondWithFilteredResult(_0x4e6140,_0x572f30,'getVoiceQueuesReport'))['catch'](handleError(_0x4e6140,null,'getVoiceQueuesReport'));};
\ No newline at end of file
+var _0xa6f6=['ejs','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','defaults','redis','localhost','socket.io-emitter','./voiceQueueReport.socket','register','sendStatus','status','offset','undefined','limit','count','set','Content-Range','update','then','stack','name','send','index','map','fieldName','type','model','query','keys','filters','attributes','intersection','fields','hasOwnProperty','nolimit','sort','where','pick','filter','VIRTUAL','merge','options','VoiceQueueReport','includeAll','include','findAll','rows','show','params','length','catch','create','body','find','destroy','describe','getVoiceQueuesReport','rawAttributes','eml-format','rimraf','zip-dir','fast-json-patch','moment','bluebird','path','sox','to-csv'];(function(_0x1ae4a9,_0x4c0ed9){var _0x54d0b0=function(_0x4fff20){while(--_0x4fff20){_0x1ae4a9['push'](_0x1ae4a9['shift']());}};_0x54d0b0(++_0x4c0ed9);}(_0xa6f6,0x187));var _0x6a6f=function(_0x29d94e,_0xf386d6){_0x29d94e=_0x29d94e-0x0;var _0x106237=_0xa6f6[_0x29d94e];return _0x106237;};'use strict';var emlformat=require(_0x6a6f('0x0'));var rimraf=require(_0x6a6f('0x1'));var zipdir=require(_0x6a6f('0x2'));var jsonpatch=require(_0x6a6f('0x3'));var rp=require('request-promise');var moment=require(_0x6a6f('0x4'));var BPromise=require(_0x6a6f('0x5'));var Mustache=require('mustache');var util=require('util');var path=require(_0x6a6f('0x6'));var sox=require(_0x6a6f('0x7'));var csv=require(_0x6a6f('0x8'));var ejs=require(_0x6a6f('0x9'));var fs=require('fs');var fs_extra=require(_0x6a6f('0xa'));var _=require(_0x6a6f('0xb'));var squel=require('squel');var crypto=require(_0x6a6f('0xc'));var jsforce=require(_0x6a6f('0xd'));var deskjs=require(_0x6a6f('0xe'));var toCsv=require(_0x6a6f('0x8'));var querystring=require(_0x6a6f('0xf'));var Papa=require(_0x6a6f('0x10'));var Redis=require(_0x6a6f('0x11'));var authService=require(_0x6a6f('0x12'));var qs=require(_0x6a6f('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x6a6f('0x14'));var logger=require(_0x6a6f('0x15'))('api');var utils=require(_0x6a6f('0x16'));var config=require(_0x6a6f('0x17'));var licenseUtil=require(_0x6a6f('0x18'));var db=require('../../mysqldb')['db'];config['redis']=_[_0x6a6f('0x19')](config[_0x6a6f('0x1a')],{'host':_0x6a6f('0x1b'),'port':0x18eb});var socket=require(_0x6a6f('0x1c'))(new Redis(config[_0x6a6f('0x1a')]));require(_0x6a6f('0x1d'))[_0x6a6f('0x1e')](socket);function respondWithStatusCode(_0x3b742a,_0xd9e9d4){_0xd9e9d4=_0xd9e9d4||0xcc;return function(_0xfcb37b){if(_0xfcb37b){return _0x3b742a[_0x6a6f('0x1f')](_0xd9e9d4);}return _0x3b742a[_0x6a6f('0x20')](_0xd9e9d4)['end']();};}function respondWithResult(_0x5898ee,_0x4ad314){_0x4ad314=_0x4ad314||0xc8;return function(_0x5e107a){if(_0x5e107a){return _0x5898ee[_0x6a6f('0x20')](_0x4ad314)['json'](_0x5e107a);}};}function respondWithFilteredResult(_0x14f84b,_0x6f93b7){return function(_0x2b52c2){if(_0x2b52c2){var _0xb20ce0=typeof _0x6f93b7[_0x6a6f('0x21')]===_0x6a6f('0x22')&&typeof _0x6f93b7[_0x6a6f('0x23')]===_0x6a6f('0x22');var _0x402684=_0x2b52c2[_0x6a6f('0x24')];var _0x119e43=_0xb20ce0?0x0:_0x6f93b7['offset'];var _0x19c614=_0xb20ce0?_0x2b52c2['count']:_0x6f93b7[_0x6a6f('0x21')]+_0x6f93b7[_0x6a6f('0x23')];var _0x4dde6a;if(_0x19c614>=_0x402684){_0x19c614=_0x402684;_0x4dde6a=0xc8;}else{_0x4dde6a=0xce;}_0x14f84b[_0x6a6f('0x20')](_0x4dde6a);return _0x14f84b[_0x6a6f('0x25')](_0x6a6f('0x26'),_0x119e43+'-'+_0x19c614+'/'+_0x402684)['json'](_0x2b52c2);}return null;};}function patchUpdates(_0x34149e){return function(_0x2c2c06){try{jsonpatch['apply'](_0x2c2c06,_0x34149e,!![]);}catch(_0x492c07){return BPromise['reject'](_0x492c07);}return _0x2c2c06['save']();};}function saveUpdates(_0x437271,_0x536c3e){return function(_0x2d8f5e){if(_0x2d8f5e){return _0x2d8f5e[_0x6a6f('0x27')](_0x437271)[_0x6a6f('0x28')](function(_0x3e8273){return _0x3e8273;});}return null;};}function removeEntity(_0x260f4c,_0x1f0b69){return function(_0x4d2dcd){if(_0x4d2dcd){return _0x4d2dcd['destroy']()[_0x6a6f('0x28')](function(){_0x260f4c[_0x6a6f('0x20')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4eefaa,_0x4c2dc4){return function(_0x3acf8d){if(!_0x3acf8d){_0x4eefaa[_0x6a6f('0x1f')](0x194);}return _0x3acf8d;};}function handleError(_0x4e60a8,_0xcb365d){_0xcb365d=_0xcb365d||0x1f4;return function(_0xc6574a){logger['error'](_0xc6574a[_0x6a6f('0x29')]);if(_0xc6574a[_0x6a6f('0x2a')]){delete _0xc6574a['name'];}_0x4e60a8['status'](_0xcb365d)[_0x6a6f('0x2b')](_0xc6574a);};}exports[_0x6a6f('0x2c')]=function(_0x2e54c8,_0xe23bc4){var _0x31a417={},_0x4d8e11={},_0xf296ec={'count':0x0,'rows':[]};var _0x379a32=_[_0x6a6f('0x2d')](db['VoiceQueueReport']['rawAttributes'],function(_0x4cb5c5){return{'name':_0x4cb5c5[_0x6a6f('0x2e')],'type':_0x4cb5c5[_0x6a6f('0x2f')]['key']};});_0x4d8e11[_0x6a6f('0x30')]=_[_0x6a6f('0x2d')](_0x379a32,'name');_0x4d8e11[_0x6a6f('0x31')]=_[_0x6a6f('0x32')](_0x2e54c8[_0x6a6f('0x31')]);_0x4d8e11[_0x6a6f('0x33')]=_['intersection'](_0x4d8e11[_0x6a6f('0x30')],_0x4d8e11[_0x6a6f('0x31')]);_0x31a417[_0x6a6f('0x34')]=_[_0x6a6f('0x35')](_0x4d8e11['model'],qs[_0x6a6f('0x36')](_0x2e54c8[_0x6a6f('0x31')][_0x6a6f('0x36')]));_0x31a417[_0x6a6f('0x34')]=_0x31a417[_0x6a6f('0x34')]['length']?_0x31a417[_0x6a6f('0x34')]:_0x4d8e11[_0x6a6f('0x30')];if(!_0x2e54c8['query'][_0x6a6f('0x37')](_0x6a6f('0x38'))){_0x31a417[_0x6a6f('0x23')]=qs[_0x6a6f('0x23')](_0x2e54c8[_0x6a6f('0x31')][_0x6a6f('0x23')]);_0x31a417['offset']=qs[_0x6a6f('0x21')](_0x2e54c8[_0x6a6f('0x31')][_0x6a6f('0x21')]);}_0x31a417['order']=qs['sort'](_0x2e54c8[_0x6a6f('0x31')][_0x6a6f('0x39')]);_0x31a417[_0x6a6f('0x3a')]=qs[_0x6a6f('0x33')](_[_0x6a6f('0x3b')](_0x2e54c8[_0x6a6f('0x31')],_0x4d8e11['filters']),_0x379a32);if(_0x2e54c8['query'][_0x6a6f('0x3c')]){_0x31a417[_0x6a6f('0x3a')]=_['merge'](_0x31a417['where'],{'$or':_[_0x6a6f('0x2d')](_0x379a32,function(_0x159e18){if(_0x159e18[_0x6a6f('0x2f')]!==_0x6a6f('0x3d')){var _0x3c8116={};_0x3c8116[_0x159e18['name']]={'$like':'%'+_0x2e54c8[_0x6a6f('0x31')]['filter']+'%'};return _0x3c8116;}})});}_0x31a417=_[_0x6a6f('0x3e')]({},_0x31a417,_0x2e54c8[_0x6a6f('0x3f')]);var _0x30cc67={'where':_0x31a417[_0x6a6f('0x3a')]};return db[_0x6a6f('0x40')][_0x6a6f('0x24')](_0x30cc67)[_0x6a6f('0x28')](function(_0x28f139){_0xf296ec[_0x6a6f('0x24')]=_0x28f139;if(_0x2e54c8['query'][_0x6a6f('0x41')]){_0x31a417[_0x6a6f('0x42')]=[{'all':!![]}];}return db[_0x6a6f('0x40')][_0x6a6f('0x43')](_0x31a417);})['then'](function(_0x5af331){_0xf296ec[_0x6a6f('0x44')]=_0x5af331;return _0xf296ec;})['then'](respondWithFilteredResult(_0xe23bc4,_0x31a417))['catch'](handleError(_0xe23bc4,null));};exports[_0x6a6f('0x45')]=function(_0x11e2f5,_0x4d3b6e){var _0x27bf43={'raw':![],'where':{'id':_0x11e2f5[_0x6a6f('0x46')]['id']}},_0x2a0705={};_0x2a0705[_0x6a6f('0x30')]=_[_0x6a6f('0x32')](db[_0x6a6f('0x40')]['rawAttributes']);_0x2a0705['query']=_['keys'](_0x11e2f5['query']);_0x2a0705[_0x6a6f('0x33')]=_[_0x6a6f('0x35')](_0x2a0705[_0x6a6f('0x30')],_0x2a0705[_0x6a6f('0x31')]);_0x27bf43[_0x6a6f('0x34')]=_[_0x6a6f('0x35')](_0x2a0705[_0x6a6f('0x30')],qs['fields'](_0x11e2f5[_0x6a6f('0x31')][_0x6a6f('0x36')]));_0x27bf43[_0x6a6f('0x34')]=_0x27bf43[_0x6a6f('0x34')][_0x6a6f('0x47')]?_0x27bf43[_0x6a6f('0x34')]:_0x2a0705[_0x6a6f('0x30')];if(_0x11e2f5['query']['includeAll']){_0x27bf43[_0x6a6f('0x42')]=[{'all':!![]}];}_0x27bf43=_[_0x6a6f('0x3e')]({},_0x27bf43,_0x11e2f5[_0x6a6f('0x3f')]);return db[_0x6a6f('0x40')]['find'](_0x27bf43)[_0x6a6f('0x28')](handleEntityNotFound(_0x4d3b6e,null))[_0x6a6f('0x28')](respondWithResult(_0x4d3b6e,null))[_0x6a6f('0x48')](handleError(_0x4d3b6e,null));};exports[_0x6a6f('0x49')]=function(_0x22893b,_0x45f820){return db[_0x6a6f('0x40')][_0x6a6f('0x49')](_0x22893b['body'],{})[_0x6a6f('0x28')](respondWithResult(_0x45f820,0xc9))[_0x6a6f('0x48')](handleError(_0x45f820,null));};exports[_0x6a6f('0x27')]=function(_0x177af8,_0x28d297){if(_0x177af8['body']['id']){delete _0x177af8[_0x6a6f('0x4a')]['id'];}return db[_0x6a6f('0x40')][_0x6a6f('0x4b')]({'where':{'id':_0x177af8[_0x6a6f('0x46')]['id']}})[_0x6a6f('0x28')](handleEntityNotFound(_0x28d297,null))[_0x6a6f('0x28')](saveUpdates(_0x177af8[_0x6a6f('0x4a')],null))[_0x6a6f('0x28')](respondWithResult(_0x28d297,null))[_0x6a6f('0x48')](handleError(_0x28d297,null));};exports[_0x6a6f('0x4c')]=function(_0xfec871,_0x482beb){return db['VoiceQueueReport'][_0x6a6f('0x4b')]({'where':{'id':_0xfec871[_0x6a6f('0x46')]['id']}})['then'](handleEntityNotFound(_0x482beb,null))[_0x6a6f('0x28')](removeEntity(_0x482beb,null))[_0x6a6f('0x48')](handleError(_0x482beb,null));};exports[_0x6a6f('0x4d')]=function(_0x40fcad,_0x209ba5){return db[_0x6a6f('0x40')][_0x6a6f('0x4d')]()[_0x6a6f('0x28')](respondWithResult(_0x209ba5,null))['catch'](handleError(_0x209ba5,null));};exports[_0x6a6f('0x4e')]=function(_0x55aa74,_0x5c6946){var _0x576135={},_0x58635e={},_0x3f4761={'count':0x0,'rows':[]};_0x58635e[_0x6a6f('0x30')]=_['keys'](db[_0x6a6f('0x40')][_0x6a6f('0x4f')]);_0x58635e[_0x6a6f('0x31')]=_[_0x6a6f('0x32')](_0x55aa74[_0x6a6f('0x31')]);_0x58635e[_0x6a6f('0x33')]=_['intersection'](_0x58635e[_0x6a6f('0x30')],_0x58635e['query']);_0x576135[_0x6a6f('0x34')]=_['intersection'](_0x58635e[_0x6a6f('0x30')],qs[_0x6a6f('0x36')](_0x55aa74[_0x6a6f('0x31')][_0x6a6f('0x36')]));_0x576135[_0x6a6f('0x34')]=_0x576135[_0x6a6f('0x34')]['length']?_0x576135[_0x6a6f('0x34')]:_0x58635e[_0x6a6f('0x30')];if(!_0x55aa74[_0x6a6f('0x31')]['hasOwnProperty'](_0x6a6f('0x38'))){_0x576135[_0x6a6f('0x23')]=qs[_0x6a6f('0x23')](_0x55aa74[_0x6a6f('0x31')][_0x6a6f('0x23')]);_0x576135[_0x6a6f('0x21')]=qs['offset'](_0x55aa74[_0x6a6f('0x31')][_0x6a6f('0x21')]);}_0x576135['order']=qs[_0x6a6f('0x39')](_0x55aa74['query']['sort']);_0x576135[_0x6a6f('0x3a')]=qs[_0x6a6f('0x33')](_[_0x6a6f('0x3b')](_0x55aa74['query'],_0x58635e[_0x6a6f('0x33')]));if(_0x55aa74[_0x6a6f('0x31')][_0x6a6f('0x3c')]){_0x576135[_0x6a6f('0x3a')]=_[_0x6a6f('0x3e')](_0x576135[_0x6a6f('0x3a')],{'$or':_[_0x6a6f('0x2d')](_0x576135[_0x6a6f('0x34')],function(_0x28935a){var _0x8f986c={};_0x8f986c[_0x28935a]={'$like':'%'+_0x55aa74[_0x6a6f('0x31')][_0x6a6f('0x3c')]+'%'};return _0x8f986c;})});}_0x576135=_['merge']({},_0x576135,_0x55aa74[_0x6a6f('0x3f')]);var _0x29cf95={'where':_0x576135['where']};return db[_0x6a6f('0x40')][_0x6a6f('0x24')](_0x29cf95)[_0x6a6f('0x28')](function(_0xb2e1a6){_0x3f4761['count']=_0xb2e1a6;if(_0x55aa74[_0x6a6f('0x31')][_0x6a6f('0x41')]){_0x576135['include']=[{'all':!![]}];}return db[_0x6a6f('0x40')]['findAll'](_0x576135);})[_0x6a6f('0x28')](function(_0x3d72c3){_0x3f4761[_0x6a6f('0x44')]=_0x3d72c3;return _0x3f4761;})['then'](respondWithFilteredResult(_0x5c6946,_0x576135,'getVoiceQueuesReport'))[_0x6a6f('0x48')](handleError(_0x5c6946,null,'getVoiceQueuesReport'));};
\ No newline at end of file
index d9ba260..2816013 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5341=['update','remove','emit','exports','events','../../mysqldb','setMaxListeners'];(function(_0x58256e,_0x48f062){var _0xc9e57b=function(_0x32fb7b){while(--_0x32fb7b){_0x58256e['push'](_0x58256e['shift']());}};_0xc9e57b(++_0x48f062);}(_0x5341,0xb3));var _0x1534=function(_0x5044d9,_0x3f1ee0){_0x5044d9=_0x5044d9-0x0;var _0x42b0be=_0x5341[_0x5044d9];return _0x42b0be;};'use strict';var EventEmitter=require(_0x1534('0x0'));var VoiceQueueReport=require(_0x1534('0x1'))['db']['VoiceQueueReport'];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents[_0x1534('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':_0x1534('0x3'),'afterDestroy':_0x1534('0x4')};function emitEvent(_0xde0ec3){return function(_0x547934,_0x2b433c,_0x4b9945){VoiceQueueReportEvents['emit'](_0xde0ec3+':'+_0x547934['id'],_0x547934);VoiceQueueReportEvents[_0x1534('0x5')](_0xde0ec3,_0x547934);_0x4b9945(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport['hook'](e,emitEvent(event));}}module[_0x1534('0x6')]=VoiceQueueReportEvents;
\ No newline at end of file
+var _0x7b8e=['VoiceQueueReport','save','emit','hook','exports','events','../../mysqldb'];(function(_0x315572,_0x2d8f9d){var _0x1db654=function(_0x189f28){while(--_0x189f28){_0x315572['push'](_0x315572['shift']());}};_0x1db654(++_0x2d8f9d);}(_0x7b8e,0x1cc));var _0xe7b8=function(_0x455a74,_0x5306e7){_0x455a74=_0x455a74-0x0;var _0x5301cd=_0x7b8e[_0x455a74];return _0x5301cd;};'use strict';var EventEmitter=require(_0xe7b8('0x0'));var VoiceQueueReport=require(_0xe7b8('0x1'))['db'][_0xe7b8('0x2')];var VoiceQueueReportEvents=new EventEmitter();VoiceQueueReportEvents['setMaxListeners'](0x0);var events={'afterCreate':_0xe7b8('0x3'),'afterUpdate':'update','afterDestroy':'remove'};function emitEvent(_0x204362){return function(_0x1aa3a5,_0x2217b7,_0x2b84a0){VoiceQueueReportEvents[_0xe7b8('0x4')](_0x204362+':'+_0x1aa3a5['id'],_0x1aa3a5);VoiceQueueReportEvents['emit'](_0x204362,_0x1aa3a5);_0x2b84a0(null);};}for(var e in events){if(events['hasOwnProperty'](e)){var event=events[e];VoiceQueueReport[_0xe7b8('0x5')](e,emitEvent(event));}}module[_0xe7b8('0x6')]=VoiceQueueReportEvents;
\ No newline at end of file
index 947ea5c..cad3091 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x21e3=['path','rimraf','./voiceQueueReport.attributes','exports','define','VoiceQueueReport','report_queue','uniqueid','calleridnum','util','../../config/logger','moment','bluebird'];(function(_0xbf8ebe,_0x3b69a5){var _0x1e25e8=function(_0x40c390){while(--_0x40c390){_0xbf8ebe['push'](_0xbf8ebe['shift']());}};_0x1e25e8(++_0x3b69a5);}(_0x21e3,0x1a9));var _0x321e=function(_0x5d6195,_0x557a54){_0x5d6195=_0x5d6195-0x0;var _0x333782=_0x21e3[_0x5d6195];return _0x333782;};'use strict';var _=require('lodash');var util=require(_0x321e('0x0'));var logger=require(_0x321e('0x1'))('api');var moment=require(_0x321e('0x2'));var BPromise=require(_0x321e('0x3'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x321e('0x4'));var rimraf=require(_0x321e('0x5'));var config=require('../../config/environment');var attributes=require(_0x321e('0x6'));module[_0x321e('0x7')]=function(_0x5f5cc4,_0xa8a465){return _0x5f5cc4[_0x321e('0x8')](_0x321e('0x9'),attributes,{'tableName':_0x321e('0xa'),'paranoid':![],'indexes':[{'fields':[_0x321e('0xb')]},{'fields':[_0x321e('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x8ee7=['request-promise','rimraf','../../config/environment','exports','define','report_queue','uniqueid','calleridnum','lodash','util','api'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x8ee7,0x13c));var _0x78ee=function(_0x29b205,_0x5e23a5){_0x29b205=_0x29b205-0x0;var _0x172da9=_0x8ee7[_0x29b205];return _0x172da9;};'use strict';var _=require(_0x78ee('0x0'));var util=require(_0x78ee('0x1'));var logger=require('../../config/logger')(_0x78ee('0x2'));var moment=require('moment');var BPromise=require('bluebird');var rp=require(_0x78ee('0x3'));var fs=require('fs');var path=require('path');var rimraf=require(_0x78ee('0x4'));var config=require(_0x78ee('0x5'));var attributes=require('./voiceQueueReport.attributes');module[_0x78ee('0x6')]=function(_0x29e22d,_0x25d5bd){return _0x29e22d[_0x78ee('0x7')]('VoiceQueueReport',attributes,{'tableName':_0x78ee('0x8'),'paranoid':![],'indexes':[{'fields':[_0x78ee('0x9')]},{'fields':[_0x78ee('0xa')]}],'timestamps':!![]});};
\ No newline at end of file
index 9202fcc..c3c33d0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8fb9=['redis','localhost','socket.io-emitter','./voiceQueueReport.socket','register','request','info','VoiceQueueReport,\x20%s,\x20%s','request\x20sent','VoiceQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','catch','GetVoiceQueueReport','VoiceQueueReport','findAll','options','raw','attributes','limit','include','map','model','debug','CreateVoiceQueueReport','create','UpdateVoiceQueueReport','update','body','where','lodash','util','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','defaults'];(function(_0x14f327,_0x80dee2){var _0x21b9e7=function(_0x1c2acf){while(--_0x1c2acf){_0x14f327['push'](_0x14f327['shift']());}};_0x21b9e7(++_0x80dee2);}(_0x8fb9,0x128));var _0x98fb=function(_0x5c351c,_0x2046d8){_0x5c351c=_0x5c351c-0x0;var _0x26f3b3=_0x8fb9[_0x5c351c];return _0x26f3b3;};'use strict';var _=require(_0x98fb('0x0'));var util=require(_0x98fb('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x98fb('0x2'));var fs=require('fs');var Redis=require(_0x98fb('0x3'));var db=require(_0x98fb('0x4'))['db'];var utils=require(_0x98fb('0x5'));var logger=require('../../config/logger')(_0x98fb('0x6'));var config=require(_0x98fb('0x7'));var jayson=require(_0x98fb('0x8'));var client=jayson[_0x98fb('0x9')][_0x98fb('0xa')]({'port':0x232a});config['redis']=_[_0x98fb('0xb')](config[_0x98fb('0xc')],{'host':_0x98fb('0xd'),'port':0x18eb});var socket=require(_0x98fb('0xe'))(new Redis(config[_0x98fb('0xc')]));require(_0x98fb('0xf'))[_0x98fb('0x10')](socket);function respondWithRpcPromise(_0x5c19d0,_0x54943e,_0x348e44){return new BPromise(function(_0x1dc765,_0x546605){return client[_0x98fb('0x11')](_0x5c19d0,_0x348e44)['then'](function(_0x2a24c6){logger[_0x98fb('0x12')](_0x98fb('0x13'),_0x54943e,_0x98fb('0x14'));logger['debug'](_0x98fb('0x15'),_0x54943e,_0x98fb('0x14'),JSON[_0x98fb('0x16')](_0x2a24c6));if(_0x2a24c6[_0x98fb('0x17')]){if(_0x2a24c6[_0x98fb('0x17')][_0x98fb('0x18')]===0x1f4){logger[_0x98fb('0x17')](_0x98fb('0x13'),_0x54943e,_0x2a24c6[_0x98fb('0x17')][_0x98fb('0x19')]);return _0x546605(_0x2a24c6[_0x98fb('0x17')][_0x98fb('0x19')]);}logger[_0x98fb('0x17')](_0x98fb('0x13'),_0x54943e,_0x2a24c6[_0x98fb('0x17')]['message']);return _0x1dc765(_0x2a24c6['error']['message']);}else{logger[_0x98fb('0x12')](_0x98fb('0x13'),_0x54943e,_0x98fb('0x14'));_0x1dc765(_0x2a24c6['result'][_0x98fb('0x19')]);}})[_0x98fb('0x1a')](function(_0x1ab935){logger[_0x98fb('0x17')](_0x98fb('0x13'),_0x54943e,_0x1ab935);_0x546605(_0x1ab935);});});}exports[_0x98fb('0x1b')]=function(_0xe8e252){var _0x3fda31=this;return new Promise(function(_0x7ced3e,_0x26b2b4){return db[_0x98fb('0x1c')][_0x98fb('0x1d')]({'raw':_0xe8e252[_0x98fb('0x1e')]?_0xe8e252[_0x98fb('0x1e')][_0x98fb('0x1f')]===undefined?!![]:![]:!![],'where':_0xe8e252['options']?_0xe8e252[_0x98fb('0x1e')]['where']||null:null,'attributes':_0xe8e252[_0x98fb('0x1e')]?_0xe8e252[_0x98fb('0x1e')][_0x98fb('0x20')]||null:null,'limit':_0xe8e252[_0x98fb('0x1e')]?_0xe8e252[_0x98fb('0x1e')][_0x98fb('0x21')]||null:null,'include':_0xe8e252[_0x98fb('0x1e')]?_0xe8e252[_0x98fb('0x1e')][_0x98fb('0x22')]?_[_0x98fb('0x23')](_0xe8e252['options'][_0x98fb('0x22')],function(_0x5de9ec){return{'model':db[_0x5de9ec['model']],'as':_0x5de9ec['as'],'attributes':_0x5de9ec[_0x98fb('0x20')],'include':_0x5de9ec[_0x98fb('0x22')]?_[_0x98fb('0x23')](_0x5de9ec[_0x98fb('0x22')],function(_0x44e92d){return{'model':db[_0x44e92d[_0x98fb('0x24')]],'as':_0x44e92d['as'],'attributes':_0x44e92d[_0x98fb('0x20')],'include':_0x44e92d['include']?_['map'](_0x44e92d['include'],function(_0x5f573f){return{'model':db[_0x5f573f['model']],'as':_0x5f573f['as'],'attributes':_0x5f573f[_0x98fb('0x20')]};}):[]};}):[]};}):[]:[]})['then'](function(_0x5a72f3){logger[_0x98fb('0x12')](_0x98fb('0x1b'),_0xe8e252);logger[_0x98fb('0x25')]('GetVoiceQueueReport',_0xe8e252,JSON[_0x98fb('0x16')](_0x5a72f3));_0x7ced3e(_0x5a72f3);})[_0x98fb('0x1a')](function(_0x1305c8){logger[_0x98fb('0x17')](_0x98fb('0x1b'),_0x1305c8[_0x98fb('0x19')],_0xe8e252);_0x26b2b4(_0x3fda31[_0x98fb('0x17')](0x1f4,_0x1305c8[_0x98fb('0x19')]));});});};exports[_0x98fb('0x26')]=function(_0x62fcda){var _0x53f3cd=this;return new Promise(function(_0x21ff91,_0x222f0f){return db['VoiceQueueReport'][_0x98fb('0x27')](_0x62fcda['body'],{'raw':_0x62fcda[_0x98fb('0x1e')]?_0x62fcda['options'][_0x98fb('0x1f')]===undefined?!![]:![]:!![]})['then'](function(_0x34173c){logger[_0x98fb('0x12')](_0x98fb('0x26'),_0x62fcda);logger[_0x98fb('0x25')](_0x98fb('0x26'),_0x62fcda,JSON[_0x98fb('0x16')](_0x34173c));_0x21ff91(_0x34173c);})[_0x98fb('0x1a')](function(_0x39b828){logger[_0x98fb('0x17')](_0x98fb('0x26'),_0x39b828[_0x98fb('0x19')],_0x62fcda);_0x222f0f(_0x53f3cd[_0x98fb('0x17')](0x1f4,_0x39b828['message']));});});};exports[_0x98fb('0x28')]=function(_0x29a465){var _0x5cd6df=this;return new Promise(function(_0x1bc103,_0x11e5bb){return db['VoiceQueueReport'][_0x98fb('0x29')](_0x29a465[_0x98fb('0x2a')],{'raw':_0x29a465[_0x98fb('0x1e')]?_0x29a465[_0x98fb('0x1e')][_0x98fb('0x1f')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x29a465[_0x98fb('0x1e')]?_0x29a465['options'][_0x98fb('0x2b')]||null:null,'attributes':_0x29a465['options']?_0x29a465[_0x98fb('0x1e')][_0x98fb('0x20')]||null:null,'limit':_0x29a465[_0x98fb('0x1e')]?_0x29a465['options'][_0x98fb('0x21')]||null:null})['then'](function(_0x9408c1){logger['info']('UpdateVoiceQueueReport',_0x29a465);logger[_0x98fb('0x25')](_0x98fb('0x28'),_0x29a465,JSON[_0x98fb('0x16')](_0x9408c1));_0x1bc103(_0x9408c1);})[_0x98fb('0x1a')](function(_0xeaec9c){logger['error'](_0x98fb('0x28'),_0xeaec9c['message'],_0x29a465);_0x11e5bb(_0x5cd6df[_0x98fb('0x17')](0x1f4,_0xeaec9c['message']));});});};
\ No newline at end of file
+var _0x63e4=['options','raw','where','attributes','limit','include','map','model','debug','CreateVoiceQueueReport','create','body','catch','UpdateVoiceQueueReport','lodash','moment','bluebird','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','redis','defaults','socket.io-emitter','./voiceQueueReport.socket','register','then','VoiceQueueReport,\x20%s,\x20%s','VoiceQueueReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error','message','GetVoiceQueueReport','VoiceQueueReport','findAll'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x63e4,0x1ee));var _0x463e=function(_0x2b519a,_0x151566){_0x2b519a=_0x2b519a-0x0;var _0x44cd95=_0x63e4[_0x2b519a];return _0x44cd95;};'use strict';var _=require(_0x463e('0x0'));var util=require('util');var moment=require(_0x463e('0x1'));var BPromise=require(_0x463e('0x2'));var rs=require(_0x463e('0x3'));var fs=require('fs');var Redis=require(_0x463e('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x463e('0x5'));var logger=require(_0x463e('0x6'))(_0x463e('0x7'));var config=require(_0x463e('0x8'));var jayson=require(_0x463e('0x9'));var client=jayson[_0x463e('0xa')]['http']({'port':0x232a});config[_0x463e('0xb')]=_[_0x463e('0xc')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0x463e('0xd'))(new Redis(config[_0x463e('0xb')]));require(_0x463e('0xe'))[_0x463e('0xf')](socket);function respondWithRpcPromise(_0x256ab6,_0x4c2724,_0x57e4cc){return new BPromise(function(_0x35c4f2,_0x503c6a){return client['request'](_0x256ab6,_0x57e4cc)[_0x463e('0x10')](function(_0x38de0d){logger['info'](_0x463e('0x11'),_0x4c2724,'request\x20sent');logger['debug'](_0x463e('0x12'),_0x4c2724,_0x463e('0x13'),JSON[_0x463e('0x14')](_0x38de0d));if(_0x38de0d['error']){if(_0x38de0d[_0x463e('0x15')]['code']===0x1f4){logger[_0x463e('0x15')](_0x463e('0x11'),_0x4c2724,_0x38de0d[_0x463e('0x15')][_0x463e('0x16')]);return _0x503c6a(_0x38de0d[_0x463e('0x15')][_0x463e('0x16')]);}logger[_0x463e('0x15')](_0x463e('0x11'),_0x4c2724,_0x38de0d[_0x463e('0x15')][_0x463e('0x16')]);return _0x35c4f2(_0x38de0d[_0x463e('0x15')][_0x463e('0x16')]);}else{logger['info']('VoiceQueueReport,\x20%s,\x20%s',_0x4c2724,'request\x20sent');_0x35c4f2(_0x38de0d['result'][_0x463e('0x16')]);}})['catch'](function(_0x551535){logger['error'](_0x463e('0x11'),_0x4c2724,_0x551535);_0x503c6a(_0x551535);});});}exports[_0x463e('0x17')]=function(_0x11d244){var _0x1dbb2d=this;return new Promise(function(_0x39a649,_0x253760){return db[_0x463e('0x18')][_0x463e('0x19')]({'raw':_0x11d244[_0x463e('0x1a')]?_0x11d244[_0x463e('0x1a')][_0x463e('0x1b')]===undefined?!![]:![]:!![],'where':_0x11d244['options']?_0x11d244['options'][_0x463e('0x1c')]||null:null,'attributes':_0x11d244[_0x463e('0x1a')]?_0x11d244[_0x463e('0x1a')][_0x463e('0x1d')]||null:null,'limit':_0x11d244[_0x463e('0x1a')]?_0x11d244['options'][_0x463e('0x1e')]||null:null,'include':_0x11d244[_0x463e('0x1a')]?_0x11d244['options'][_0x463e('0x1f')]?_['map'](_0x11d244[_0x463e('0x1a')][_0x463e('0x1f')],function(_0x32af4f){return{'model':db[_0x32af4f['model']],'as':_0x32af4f['as'],'attributes':_0x32af4f[_0x463e('0x1d')],'include':_0x32af4f['include']?_[_0x463e('0x20')](_0x32af4f[_0x463e('0x1f')],function(_0x59f35c){return{'model':db[_0x59f35c[_0x463e('0x21')]],'as':_0x59f35c['as'],'attributes':_0x59f35c[_0x463e('0x1d')],'include':_0x59f35c[_0x463e('0x1f')]?_[_0x463e('0x20')](_0x59f35c[_0x463e('0x1f')],function(_0x10dd15){return{'model':db[_0x10dd15[_0x463e('0x21')]],'as':_0x10dd15['as'],'attributes':_0x10dd15['attributes']};}):[]};}):[]};}):[]:[]})[_0x463e('0x10')](function(_0x2c9a30){logger['info'](_0x463e('0x17'),_0x11d244);logger[_0x463e('0x22')]('GetVoiceQueueReport',_0x11d244,JSON['stringify'](_0x2c9a30));_0x39a649(_0x2c9a30);})['catch'](function(_0x8fc9db){logger[_0x463e('0x15')](_0x463e('0x17'),_0x8fc9db[_0x463e('0x16')],_0x11d244);_0x253760(_0x1dbb2d['error'](0x1f4,_0x8fc9db[_0x463e('0x16')]));});});};exports[_0x463e('0x23')]=function(_0x2c5cc4){var _0x157fb6=this;return new Promise(function(_0x4c1269,_0x277184){return db['VoiceQueueReport'][_0x463e('0x24')](_0x2c5cc4[_0x463e('0x25')],{'raw':_0x2c5cc4[_0x463e('0x1a')]?_0x2c5cc4[_0x463e('0x1a')][_0x463e('0x1b')]===undefined?!![]:![]:!![]})[_0x463e('0x10')](function(_0x314f07){logger['info'](_0x463e('0x23'),_0x2c5cc4);logger['debug']('CreateVoiceQueueReport',_0x2c5cc4,JSON['stringify'](_0x314f07));_0x4c1269(_0x314f07);})[_0x463e('0x26')](function(_0x2b3100){logger['error'](_0x463e('0x23'),_0x2b3100[_0x463e('0x16')],_0x2c5cc4);_0x277184(_0x157fb6[_0x463e('0x15')](0x1f4,_0x2b3100['message']));});});};exports['UpdateVoiceQueueReport']=function(_0x2c8e06){var _0x585d77=this;return new Promise(function(_0x4ad131,_0x93ba67){return db[_0x463e('0x18')]['update'](_0x2c8e06['body'],{'raw':_0x2c8e06['options']?_0x2c8e06[_0x463e('0x1a')][_0x463e('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x2c8e06[_0x463e('0x1a')]?_0x2c8e06[_0x463e('0x1a')][_0x463e('0x1c')]||null:null,'attributes':_0x2c8e06[_0x463e('0x1a')]?_0x2c8e06[_0x463e('0x1a')][_0x463e('0x1d')]||null:null,'limit':_0x2c8e06[_0x463e('0x1a')]?_0x2c8e06[_0x463e('0x1a')]['limit']||null:null})[_0x463e('0x10')](function(_0x4f4c89){logger['info'](_0x463e('0x27'),_0x2c8e06);logger[_0x463e('0x22')](_0x463e('0x27'),_0x2c8e06,JSON['stringify'](_0x4f4c89));_0x4ad131(_0x4f4c89);})[_0x463e('0x26')](function(_0x13f928){logger[_0x463e('0x15')](_0x463e('0x27'),_0x13f928['message'],_0x2c8e06);_0x93ba67(_0x585d77[_0x463e('0x15')](0x1f4,_0x13f928[_0x463e('0x16')]));});});};
\ No newline at end of file
index 1184015..9dd9628 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe28f=['save','emit','register','voiceQueueReport:','./voiceQueueReport.events'];(function(_0x9f9d03,_0x1c5f58){var _0x363f8=function(_0x408ce2){while(--_0x408ce2){_0x9f9d03['push'](_0x9f9d03['shift']());}};_0x363f8(++_0x1c5f58);}(_0xe28f,0x1e9));var _0xfe28=function(_0x37e710,_0x2a3482){_0x37e710=_0x37e710-0x0;var _0x6f54e9=_0xe28f[_0x37e710];return _0x6f54e9;};'use strict';var VoiceQueueReportEvents=require(_0xfe28('0x0'));var events=[_0xfe28('0x1'),'remove','update'];function createListener(_0x41266c,_0x3b0d21){return function(_0x3eb692){_0x3b0d21[_0xfe28('0x2')](_0x41266c,_0x3eb692);};}function removeListener(_0x1e4fc2,_0x239f5f){return function(){VoiceQueueReportEvents['removeListener'](_0x1e4fc2,_0x239f5f);};}exports[_0xfe28('0x3')]=function(_0x17f1c6){for(var _0x56605b=0x0,_0x5a7515=events['length'];_0x56605b<_0x5a7515;_0x56605b++){var _0x5f1a6f=events[_0x56605b];var _0x42bf9c=createListener(_0xfe28('0x4')+_0x5f1a6f,_0x17f1c6);VoiceQueueReportEvents['on'](_0x5f1a6f,_0x42bf9c);}};
\ No newline at end of file
+var _0x330c=['remove','update','emit','removeListener','length','voiceQueueReport:','./voiceQueueReport.events','save'];(function(_0x316ad3,_0x24e897){var _0x1d81e0=function(_0x218f04){while(--_0x218f04){_0x316ad3['push'](_0x316ad3['shift']());}};_0x1d81e0(++_0x24e897);}(_0x330c,0x186));var _0xc330=function(_0x27aafe,_0x53f25f){_0x27aafe=_0x27aafe-0x0;var _0x2cecae=_0x330c[_0x27aafe];return _0x2cecae;};'use strict';var VoiceQueueReportEvents=require(_0xc330('0x0'));var events=[_0xc330('0x1'),_0xc330('0x2'),_0xc330('0x3')];function createListener(_0x48e3fc,_0x17e47c){return function(_0x197a49){_0x17e47c[_0xc330('0x4')](_0x48e3fc,_0x197a49);};}function removeListener(_0x207daa,_0x3852b2){return function(){VoiceQueueReportEvents[_0xc330('0x5')](_0x207daa,_0x3852b2);};}exports['register']=function(_0x4f49fb){for(var _0x53d0ca=0x0,_0x1a6a2e=events[_0xc330('0x6')];_0x53d0ca<_0x1a6a2e;_0x53d0ca++){var _0x253c40=events[_0x53d0ca];var _0x114bf0=createListener(_0xc330('0x7')+_0x253c40,_0x4f49fb);VoiceQueueReportEvents['on'](_0x253c40,_0x114bf0);}};
\ No newline at end of file
index ff8d8b5..698ee87 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa902=['/:id','show','post','create','update','delete','destroy','exports','util','path','connect-timeout','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated'];(function(_0x5496ff,_0x104d17){var _0x36881c=function(_0x395a82){while(--_0x395a82){_0x5496ff['push'](_0x5496ff['shift']());}};_0x36881c(++_0x104d17);}(_0xa902,0x1ee));var _0x2a90=function(_0x548e80,_0x6fb62f){_0x548e80=_0x548e80-0x0;var _0x4fa5c0=_0xa902[_0x548e80];return _0x4fa5c0;};'use strict';var multer=require('multer');var util=require(_0x2a90('0x0'));var path=require(_0x2a90('0x1'));var timeout=require(_0x2a90('0x2'));var express=require('express');var router=express[_0x2a90('0x3')]();var fs_extra=require(_0x2a90('0x4'));var auth=require(_0x2a90('0x5'));var interaction=require(_0x2a90('0x6'));var config=require(_0x2a90('0x7'));var controller=require('./voiceQueuesLog.controller');router[_0x2a90('0x8')]('/',auth[_0x2a90('0x9')](),controller['index']);router[_0x2a90('0x8')](_0x2a90('0xa'),auth[_0x2a90('0x9')](),controller[_0x2a90('0xb')]);router[_0x2a90('0xc')]('/',auth[_0x2a90('0x9')](),controller[_0x2a90('0xd')]);router['put'](_0x2a90('0xa'),auth[_0x2a90('0x9')](),controller[_0x2a90('0xe')]);router[_0x2a90('0xf')]('/:id',auth[_0x2a90('0x9')](),controller[_0x2a90('0x10')]);module[_0x2a90('0x11')]=router;
\ No newline at end of file
+var _0xbc12=['./voiceQueuesLog.controller','get','isAuthenticated','index','/:id','show','post','create','put','update','delete','destroy','exports','multer','util','express','Router','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x15bc81,_0x4d4f77){var _0x59440e=function(_0x1b60f2){while(--_0x1b60f2){_0x15bc81['push'](_0x15bc81['shift']());}};_0x59440e(++_0x4d4f77);}(_0xbc12,0xc1));var _0x2bc1=function(_0x6f5598,_0xabeb74){_0x6f5598=_0x6f5598-0x0;var _0x1e1325=_0xbc12[_0x6f5598];return _0x1e1325;};'use strict';var multer=require(_0x2bc1('0x0'));var util=require(_0x2bc1('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0x2bc1('0x2'));var router=express[_0x2bc1('0x3')]();var fs_extra=require('fs-extra');var auth=require(_0x2bc1('0x4'));var interaction=require(_0x2bc1('0x5'));var config=require(_0x2bc1('0x6'));var controller=require(_0x2bc1('0x7'));router[_0x2bc1('0x8')]('/',auth[_0x2bc1('0x9')](),controller[_0x2bc1('0xa')]);router[_0x2bc1('0x8')](_0x2bc1('0xb'),auth[_0x2bc1('0x9')](),controller[_0x2bc1('0xc')]);router[_0x2bc1('0xd')]('/',auth[_0x2bc1('0x9')](),controller[_0x2bc1('0xe')]);router[_0x2bc1('0xf')]('/:id',auth[_0x2bc1('0x9')](),controller[_0x2bc1('0x10')]);router[_0x2bc1('0x11')]('/:id',auth[_0x2bc1('0x9')](),controller[_0x2bc1('0x12')]);module[_0x2bc1('0x13')]=router;
\ No newline at end of file
index 73bc281..99683b3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb2c9=['exports','STRING','literal','moment'];(function(_0x593378,_0x55e11e){var _0x62b06=function(_0x121594){while(--_0x121594){_0x593378['push'](_0x593378['shift']());}};_0x62b06(++_0x55e11e);}(_0xb2c9,0x18f));var _0x9b2c=function(_0xb19de0,_0x28572e){_0xb19de0=_0xb19de0-0x0;var _0x4d39ec=_0xb2c9[_0xb19de0];return _0x4d39ec;};'use strict';var Sequelize=require('sequelize');var moment=require(_0x9b2c('0x0'));module[_0x9b2c('0x1')]={'time':{'type':Sequelize[_0x9b2c('0x2')]},'callid':{'type':Sequelize[_0x9b2c('0x2')],'allowNull':![],'defaultValue':''},'queuename':{'type':Sequelize[_0x9b2c('0x2')],'allowNull':![],'defaultValue':''},'agent':{'type':Sequelize[_0x9b2c('0x2')],'allowNull':![],'defaultValue':''},'event':{'type':Sequelize[_0x9b2c('0x2')],'allowNull':![],'defaultValue':''},'data':{'type':Sequelize[_0x9b2c('0x2')],'allowNull':![],'defaultValue':''},'data1':{'type':Sequelize[_0x9b2c('0x2')],'allowNull':![],'defaultValue':''},'data2':{'type':Sequelize[_0x9b2c('0x2')],'allowNull':![],'defaultValue':''},'data3':{'type':Sequelize[_0x9b2c('0x2')],'allowNull':![],'defaultValue':''},'data4':{'type':Sequelize[_0x9b2c('0x2')],'allowNull':![],'defaultValue':''},'data5':{'type':Sequelize[_0x9b2c('0x2')],'allowNull':![],'defaultValue':''},'dtm':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':Sequelize[_0x9b2c('0x3')]('CURRENT_TIMESTAMP\x20ON\x20UPDATE\x20CURRENT_TIMESTAMP')}};
\ No newline at end of file
+var _0x47cc=['STRING','CURRENT_TIMESTAMP\x20ON\x20UPDATE\x20CURRENT_TIMESTAMP','sequelize','moment'];(function(_0x2875be,_0x2bbadd){var _0x99e773=function(_0x352067){while(--_0x352067){_0x2875be['push'](_0x2875be['shift']());}};_0x99e773(++_0x2bbadd);}(_0x47cc,0xbe));var _0xc47c=function(_0x59dcdc,_0x182087){_0x59dcdc=_0x59dcdc-0x0;var _0x3a8c89=_0x47cc[_0x59dcdc];return _0x3a8c89;};'use strict';var Sequelize=require(_0xc47c('0x0'));var moment=require(_0xc47c('0x1'));module['exports']={'time':{'type':Sequelize[_0xc47c('0x2')]},'callid':{'type':Sequelize[_0xc47c('0x2')],'allowNull':![],'defaultValue':''},'queuename':{'type':Sequelize[_0xc47c('0x2')],'allowNull':![],'defaultValue':''},'agent':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'event':{'type':Sequelize[_0xc47c('0x2')],'allowNull':![],'defaultValue':''},'data':{'type':Sequelize[_0xc47c('0x2')],'allowNull':![],'defaultValue':''},'data1':{'type':Sequelize[_0xc47c('0x2')],'allowNull':![],'defaultValue':''},'data2':{'type':Sequelize['STRING'],'allowNull':![],'defaultValue':''},'data3':{'type':Sequelize[_0xc47c('0x2')],'allowNull':![],'defaultValue':''},'data4':{'type':Sequelize[_0xc47c('0x2')],'allowNull':![],'defaultValue':''},'data5':{'type':Sequelize[_0xc47c('0x2')],'allowNull':![],'defaultValue':''},'dtm':{'type':Sequelize['DATE'],'allowNull':![],'defaultValue':Sequelize['literal'](_0xc47c('0x3'))}};
\ No newline at end of file
index 5a5625f..36cecca 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xde6e=['catch','show','params','fields','find','create','body','eml-format','rimraf','fast-json-patch','request-promise','moment','util','to-csv','fs-extra','squel','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/license/util','../../mysqldb','undefined','limit','count','offset','set','Content-Range','json','reject','save','update','then','destroy','status','end','sendStatus','error','stack','send','index','VoiceQueuesLog','rawAttributes','fieldName','key','model','map','name','query','keys','filters','intersection','attributes','length','nolimit','order','where','pick','merge','type','VIRTUAL','options','includeAll','include','findAll','rows'];(function(_0x4f69d8,_0x1edd11){var _0x3bf5ed=function(_0x9f53ac){while(--_0x9f53ac){_0x4f69d8['push'](_0x4f69d8['shift']());}};_0x3bf5ed(++_0x1edd11);}(_0xde6e,0x174));var _0xede6=function(_0x4c9f6a,_0xcb2cb2){_0x4c9f6a=_0x4c9f6a-0x0;var _0x5df5b9=_0xde6e[_0x4c9f6a];return _0x5df5b9;};'use strict';var emlformat=require(_0xede6('0x0'));var rimraf=require(_0xede6('0x1'));var zipdir=require('zip-dir');var jsonpatch=require(_0xede6('0x2'));var rp=require(_0xede6('0x3'));var moment=require(_0xede6('0x4'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require(_0xede6('0x5'));var path=require('path');var sox=require('sox');var csv=require(_0xede6('0x6'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xede6('0x7'));var _=require('lodash');var squel=require(_0xede6('0x8'));var crypto=require(_0xede6('0x9'));var jsforce=require(_0xede6('0xa'));var deskjs=require(_0xede6('0xb'));var toCsv=require(_0xede6('0x6'));var querystring=require('querystring');var Papa=require(_0xede6('0xc'));var Redis=require(_0xede6('0xd'));var authService=require(_0xede6('0xe'));var qs=require(_0xede6('0xf'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xede6('0x10'));var logger=require(_0xede6('0x11'))(_0xede6('0x12'));var utils=require(_0xede6('0x13'));var config=require('../../config/environment');var licenseUtil=require(_0xede6('0x14'));var db=require(_0xede6('0x15'))['db'];function respondWithStatusCode(_0x1a4180,_0x28d3df){_0x28d3df=_0x28d3df||0xcc;return function(_0x2a8dfa){if(_0x2a8dfa){return _0x1a4180['sendStatus'](_0x28d3df);}return _0x1a4180['status'](_0x28d3df)['end']();};}function respondWithResult(_0xd89306,_0x1fb561){_0x1fb561=_0x1fb561||0xc8;return function(_0x5884a6){if(_0x5884a6){return _0xd89306['status'](_0x1fb561)['json'](_0x5884a6);}};}function respondWithFilteredResult(_0x57d21d,_0x3a61c5){return function(_0x564bd0){if(_0x564bd0){var _0x9db2b3=typeof _0x3a61c5['offset']===_0xede6('0x16')&&typeof _0x3a61c5[_0xede6('0x17')]==='undefined';var _0x8d948c=_0x564bd0[_0xede6('0x18')];var _0x4a364e=_0x9db2b3?0x0:_0x3a61c5[_0xede6('0x19')];var _0xb57a08=_0x9db2b3?_0x564bd0[_0xede6('0x18')]:_0x3a61c5['offset']+_0x3a61c5[_0xede6('0x17')];var _0x17ddb4;if(_0xb57a08>=_0x8d948c){_0xb57a08=_0x8d948c;_0x17ddb4=0xc8;}else{_0x17ddb4=0xce;}_0x57d21d['status'](_0x17ddb4);return _0x57d21d[_0xede6('0x1a')](_0xede6('0x1b'),_0x4a364e+'-'+_0xb57a08+'/'+_0x8d948c)[_0xede6('0x1c')](_0x564bd0);}return null;};}function patchUpdates(_0x5bc997){return function(_0x2296cf){try{jsonpatch['apply'](_0x2296cf,_0x5bc997,!![]);}catch(_0x1cc0c0){return BPromise[_0xede6('0x1d')](_0x1cc0c0);}return _0x2296cf[_0xede6('0x1e')]();};}function saveUpdates(_0x33c8c1,_0x3323dc){return function(_0x28544f){if(_0x28544f){return _0x28544f[_0xede6('0x1f')](_0x33c8c1)[_0xede6('0x20')](function(_0x46869c){return _0x46869c;});}return null;};}function removeEntity(_0x587f5b,_0x2f251a){return function(_0x52372a){if(_0x52372a){return _0x52372a[_0xede6('0x21')]()['then'](function(){_0x587f5b[_0xede6('0x22')](0xcc)[_0xede6('0x23')]();});}};}function handleEntityNotFound(_0xebacd8,_0x37c8b1){return function(_0x5a6e19){if(!_0x5a6e19){_0xebacd8[_0xede6('0x24')](0x194);}return _0x5a6e19;};}function handleError(_0x569fc2,_0x2e1013){_0x2e1013=_0x2e1013||0x1f4;return function(_0x5f5a2d){logger[_0xede6('0x25')](_0x5f5a2d[_0xede6('0x26')]);if(_0x5f5a2d['name']){delete _0x5f5a2d['name'];}_0x569fc2['status'](_0x2e1013)[_0xede6('0x27')](_0x5f5a2d);};}exports[_0xede6('0x28')]=function(_0x341b73,_0xf2640){var _0x2c39b1={},_0x329088={},_0x279d9={'count':0x0,'rows':[]};var _0x565831=_['map'](db[_0xede6('0x29')][_0xede6('0x2a')],function(_0x33c405){return{'name':_0x33c405[_0xede6('0x2b')],'type':_0x33c405['type'][_0xede6('0x2c')]};});_0x329088[_0xede6('0x2d')]=_[_0xede6('0x2e')](_0x565831,_0xede6('0x2f'));_0x329088[_0xede6('0x30')]=_[_0xede6('0x31')](_0x341b73[_0xede6('0x30')]);_0x329088[_0xede6('0x32')]=_[_0xede6('0x33')](_0x329088['model'],_0x329088[_0xede6('0x30')]);_0x2c39b1[_0xede6('0x34')]=_['intersection'](_0x329088[_0xede6('0x2d')],qs['fields'](_0x341b73[_0xede6('0x30')]['fields']));_0x2c39b1['attributes']=_0x2c39b1['attributes'][_0xede6('0x35')]?_0x2c39b1['attributes']:_0x329088[_0xede6('0x2d')];if(!_0x341b73[_0xede6('0x30')]['hasOwnProperty'](_0xede6('0x36'))){_0x2c39b1[_0xede6('0x17')]=qs[_0xede6('0x17')](_0x341b73[_0xede6('0x30')][_0xede6('0x17')]);_0x2c39b1[_0xede6('0x19')]=qs[_0xede6('0x19')](_0x341b73[_0xede6('0x30')][_0xede6('0x19')]);}_0x2c39b1[_0xede6('0x37')]=qs['sort'](_0x341b73['query']['sort']);_0x2c39b1[_0xede6('0x38')]=qs[_0xede6('0x32')](_[_0xede6('0x39')](_0x341b73[_0xede6('0x30')],_0x329088[_0xede6('0x32')]),_0x565831);if(_0x341b73[_0xede6('0x30')]['filter']){_0x2c39b1['where']=_[_0xede6('0x3a')](_0x2c39b1[_0xede6('0x38')],{'$or':_[_0xede6('0x2e')](_0x565831,function(_0x4f0f1f){if(_0x4f0f1f[_0xede6('0x3b')]!==_0xede6('0x3c')){var _0x198b24={};_0x198b24[_0x4f0f1f[_0xede6('0x2f')]]={'$like':'%'+_0x341b73[_0xede6('0x30')]['filter']+'%'};return _0x198b24;}})});}_0x2c39b1=_[_0xede6('0x3a')]({},_0x2c39b1,_0x341b73[_0xede6('0x3d')]);var _0x5f21d3={'where':_0x2c39b1[_0xede6('0x38')]};return db[_0xede6('0x29')][_0xede6('0x18')](_0x5f21d3)[_0xede6('0x20')](function(_0x35f52a){_0x279d9[_0xede6('0x18')]=_0x35f52a;if(_0x341b73[_0xede6('0x30')][_0xede6('0x3e')]){_0x2c39b1[_0xede6('0x3f')]=[{'all':!![]}];}return db[_0xede6('0x29')][_0xede6('0x40')](_0x2c39b1);})[_0xede6('0x20')](function(_0x4191c6){_0x279d9[_0xede6('0x41')]=_0x4191c6;return _0x279d9;})[_0xede6('0x20')](respondWithFilteredResult(_0xf2640,_0x2c39b1))[_0xede6('0x42')](handleError(_0xf2640,null));};exports[_0xede6('0x43')]=function(_0x3ea6e7,_0x56e6b5){var _0x13af61={'raw':!![],'where':{'id':_0x3ea6e7[_0xede6('0x44')]['id']}},_0x1e2516={};_0x1e2516[_0xede6('0x2d')]=_['keys'](db['VoiceQueuesLog'][_0xede6('0x2a')]);_0x1e2516['query']=_[_0xede6('0x31')](_0x3ea6e7[_0xede6('0x30')]);_0x1e2516[_0xede6('0x32')]=_['intersection'](_0x1e2516[_0xede6('0x2d')],_0x1e2516['query']);_0x13af61[_0xede6('0x34')]=_[_0xede6('0x33')](_0x1e2516[_0xede6('0x2d')],qs[_0xede6('0x45')](_0x3ea6e7[_0xede6('0x30')]['fields']));_0x13af61['attributes']=_0x13af61[_0xede6('0x34')][_0xede6('0x35')]?_0x13af61['attributes']:_0x1e2516[_0xede6('0x2d')];if(_0x3ea6e7[_0xede6('0x30')][_0xede6('0x3e')]){_0x13af61[_0xede6('0x3f')]=[{'all':!![]}];}_0x13af61=_['merge']({},_0x13af61,_0x3ea6e7[_0xede6('0x3d')]);return db['VoiceQueuesLog'][_0xede6('0x46')](_0x13af61)['then'](handleEntityNotFound(_0x56e6b5,null))[_0xede6('0x20')](respondWithResult(_0x56e6b5,null))[_0xede6('0x42')](handleError(_0x56e6b5,null));};exports[_0xede6('0x47')]=function(_0x7abaef,_0x31545a){return db[_0xede6('0x29')][_0xede6('0x47')](_0x7abaef['body'],{})[_0xede6('0x20')](respondWithResult(_0x31545a,0xc9))[_0xede6('0x42')](handleError(_0x31545a,null));};exports[_0xede6('0x1f')]=function(_0x21bee0,_0x317a02){if(_0x21bee0[_0xede6('0x48')]['id']){delete _0x21bee0['body']['id'];}return db['VoiceQueuesLog']['find']({'where':{'id':_0x21bee0[_0xede6('0x44')]['id']}})[_0xede6('0x20')](handleEntityNotFound(_0x317a02,null))[_0xede6('0x20')](saveUpdates(_0x21bee0[_0xede6('0x48')],null))[_0xede6('0x20')](respondWithResult(_0x317a02,null))[_0xede6('0x42')](handleError(_0x317a02,null));};exports[_0xede6('0x21')]=function(_0x4a6786,_0xfaae84){return db[_0xede6('0x29')][_0xede6('0x46')]({'where':{'id':_0x4a6786['params']['id']}})[_0xede6('0x20')](handleEntityNotFound(_0xfaae84,null))[_0xede6('0x20')](removeEntity(_0xfaae84,null))['catch'](handleError(_0xfaae84,null));};
\ No newline at end of file
+var _0xb036=['model','query','keys','filters','intersection','attributes','fields','order','sort','where','filter','merge','options','include','findAll','rows','catch','show','params','length','find','create','body','eml-format','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','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','api','../../config/utils','sendStatus','status','end','offset','undefined','limit','count','json','apply','reject','save','destroy','then','error','stack','name','send','index','map','VoiceQueuesLog','rawAttributes','fieldName','type','key'];(function(_0x3515c1,_0x3d7811){var _0x2dbc6d=function(_0x449de3){while(--_0x449de3){_0x3515c1['push'](_0x3515c1['shift']());}};_0x2dbc6d(++_0x3d7811);}(_0xb036,0x1cd));var _0x6b03=function(_0x41ed50,_0x84d266){_0x41ed50=_0x41ed50-0x0;var _0x77be00=_0xb036[_0x41ed50];return _0x77be00;};'use strict';var emlformat=require(_0x6b03('0x0'));var rimraf=require(_0x6b03('0x1'));var zipdir=require(_0x6b03('0x2'));var jsonpatch=require(_0x6b03('0x3'));var rp=require(_0x6b03('0x4'));var moment=require(_0x6b03('0x5'));var BPromise=require(_0x6b03('0x6'));var Mustache=require('mustache');var util=require(_0x6b03('0x7'));var path=require(_0x6b03('0x8'));var sox=require(_0x6b03('0x9'));var csv=require(_0x6b03('0xa'));var ejs=require(_0x6b03('0xb'));var fs=require('fs');var fs_extra=require(_0x6b03('0xc'));var _=require(_0x6b03('0xd'));var squel=require(_0x6b03('0xe'));var crypto=require('crypto');var jsforce=require(_0x6b03('0xf'));var deskjs=require(_0x6b03('0x10'));var toCsv=require('to-csv');var querystring=require(_0x6b03('0x11'));var Papa=require(_0x6b03('0x12'));var Redis=require(_0x6b03('0x13'));var authService=require(_0x6b03('0x14'));var qs=require(_0x6b03('0x15'));var as=require(_0x6b03('0x16'));var hardwareService=require(_0x6b03('0x17'));var logger=require('../../config/logger')(_0x6b03('0x18'));var utils=require(_0x6b03('0x19'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x1cf37f,_0x3a711d){_0x3a711d=_0x3a711d||0xcc;return function(_0x58fe2a){if(_0x58fe2a){return _0x1cf37f[_0x6b03('0x1a')](_0x3a711d);}return _0x1cf37f[_0x6b03('0x1b')](_0x3a711d)[_0x6b03('0x1c')]();};}function respondWithResult(_0x407fbc,_0x569138){_0x569138=_0x569138||0xc8;return function(_0x188a28){if(_0x188a28){return _0x407fbc[_0x6b03('0x1b')](_0x569138)['json'](_0x188a28);}};}function respondWithFilteredResult(_0x4309fd,_0x340638){return function(_0x56a1d7){if(_0x56a1d7){var _0x57a1f2=typeof _0x340638[_0x6b03('0x1d')]===_0x6b03('0x1e')&&typeof _0x340638[_0x6b03('0x1f')]===_0x6b03('0x1e');var _0x15d30a=_0x56a1d7['count'];var _0x14c367=_0x57a1f2?0x0:_0x340638[_0x6b03('0x1d')];var _0x168ab5=_0x57a1f2?_0x56a1d7[_0x6b03('0x20')]:_0x340638[_0x6b03('0x1d')]+_0x340638['limit'];var _0xe01996;if(_0x168ab5>=_0x15d30a){_0x168ab5=_0x15d30a;_0xe01996=0xc8;}else{_0xe01996=0xce;}_0x4309fd[_0x6b03('0x1b')](_0xe01996);return _0x4309fd['set']('Content-Range',_0x14c367+'-'+_0x168ab5+'/'+_0x15d30a)[_0x6b03('0x21')](_0x56a1d7);}return null;};}function patchUpdates(_0x2761fa){return function(_0x2f591e){try{jsonpatch[_0x6b03('0x22')](_0x2f591e,_0x2761fa,!![]);}catch(_0x30d097){return BPromise[_0x6b03('0x23')](_0x30d097);}return _0x2f591e[_0x6b03('0x24')]();};}function saveUpdates(_0x1a3737,_0x465ca8){return function(_0x3f46d0){if(_0x3f46d0){return _0x3f46d0['update'](_0x1a3737)['then'](function(_0x95cec9){return _0x95cec9;});}return null;};}function removeEntity(_0x2f8e8a,_0x569ea9){return function(_0x5859b4){if(_0x5859b4){return _0x5859b4[_0x6b03('0x25')]()[_0x6b03('0x26')](function(){_0x2f8e8a[_0x6b03('0x1b')](0xcc)[_0x6b03('0x1c')]();});}};}function handleEntityNotFound(_0x3af167,_0x127207){return function(_0x3ac996){if(!_0x3ac996){_0x3af167[_0x6b03('0x1a')](0x194);}return _0x3ac996;};}function handleError(_0x26543e,_0x582a52){_0x582a52=_0x582a52||0x1f4;return function(_0x1b3ab3){logger[_0x6b03('0x27')](_0x1b3ab3[_0x6b03('0x28')]);if(_0x1b3ab3[_0x6b03('0x29')]){delete _0x1b3ab3[_0x6b03('0x29')];}_0x26543e[_0x6b03('0x1b')](_0x582a52)[_0x6b03('0x2a')](_0x1b3ab3);};}exports[_0x6b03('0x2b')]=function(_0x5c43b3,_0x3b2ef9){var _0x14fbdc={},_0x30f203={},_0x25df64={'count':0x0,'rows':[]};var _0x179861=_[_0x6b03('0x2c')](db[_0x6b03('0x2d')][_0x6b03('0x2e')],function(_0x40ef74){return{'name':_0x40ef74[_0x6b03('0x2f')],'type':_0x40ef74[_0x6b03('0x30')][_0x6b03('0x31')]};});_0x30f203[_0x6b03('0x32')]=_[_0x6b03('0x2c')](_0x179861,_0x6b03('0x29'));_0x30f203[_0x6b03('0x33')]=_[_0x6b03('0x34')](_0x5c43b3[_0x6b03('0x33')]);_0x30f203[_0x6b03('0x35')]=_[_0x6b03('0x36')](_0x30f203[_0x6b03('0x32')],_0x30f203['query']);_0x14fbdc[_0x6b03('0x37')]=_['intersection'](_0x30f203['model'],qs[_0x6b03('0x38')](_0x5c43b3[_0x6b03('0x33')][_0x6b03('0x38')]));_0x14fbdc[_0x6b03('0x37')]=_0x14fbdc[_0x6b03('0x37')]['length']?_0x14fbdc[_0x6b03('0x37')]:_0x30f203[_0x6b03('0x32')];if(!_0x5c43b3[_0x6b03('0x33')]['hasOwnProperty']('nolimit')){_0x14fbdc[_0x6b03('0x1f')]=qs[_0x6b03('0x1f')](_0x5c43b3[_0x6b03('0x33')][_0x6b03('0x1f')]);_0x14fbdc[_0x6b03('0x1d')]=qs[_0x6b03('0x1d')](_0x5c43b3[_0x6b03('0x33')]['offset']);}_0x14fbdc[_0x6b03('0x39')]=qs[_0x6b03('0x3a')](_0x5c43b3[_0x6b03('0x33')][_0x6b03('0x3a')]);_0x14fbdc['where']=qs[_0x6b03('0x35')](_['pick'](_0x5c43b3[_0x6b03('0x33')],_0x30f203[_0x6b03('0x35')]),_0x179861);if(_0x5c43b3['query']['filter']){_0x14fbdc['where']=_['merge'](_0x14fbdc[_0x6b03('0x3b')],{'$or':_[_0x6b03('0x2c')](_0x179861,function(_0x32a976){if(_0x32a976['type']!=='VIRTUAL'){var _0x4107ca={};_0x4107ca[_0x32a976[_0x6b03('0x29')]]={'$like':'%'+_0x5c43b3[_0x6b03('0x33')][_0x6b03('0x3c')]+'%'};return _0x4107ca;}})});}_0x14fbdc=_[_0x6b03('0x3d')]({},_0x14fbdc,_0x5c43b3[_0x6b03('0x3e')]);var _0x24d20a={'where':_0x14fbdc[_0x6b03('0x3b')]};return db[_0x6b03('0x2d')][_0x6b03('0x20')](_0x24d20a)[_0x6b03('0x26')](function(_0x8dd138){_0x25df64['count']=_0x8dd138;if(_0x5c43b3[_0x6b03('0x33')]['includeAll']){_0x14fbdc[_0x6b03('0x3f')]=[{'all':!![]}];}return db['VoiceQueuesLog'][_0x6b03('0x40')](_0x14fbdc);})[_0x6b03('0x26')](function(_0xa94305){_0x25df64[_0x6b03('0x41')]=_0xa94305;return _0x25df64;})[_0x6b03('0x26')](respondWithFilteredResult(_0x3b2ef9,_0x14fbdc))[_0x6b03('0x42')](handleError(_0x3b2ef9,null));};exports[_0x6b03('0x43')]=function(_0x471dde,_0xad7b8e){var _0x5332db={'raw':!![],'where':{'id':_0x471dde[_0x6b03('0x44')]['id']}},_0x28190d={};_0x28190d[_0x6b03('0x32')]=_['keys'](db['VoiceQueuesLog']['rawAttributes']);_0x28190d[_0x6b03('0x33')]=_[_0x6b03('0x34')](_0x471dde[_0x6b03('0x33')]);_0x28190d[_0x6b03('0x35')]=_[_0x6b03('0x36')](_0x28190d[_0x6b03('0x32')],_0x28190d[_0x6b03('0x33')]);_0x5332db['attributes']=_[_0x6b03('0x36')](_0x28190d[_0x6b03('0x32')],qs[_0x6b03('0x38')](_0x471dde[_0x6b03('0x33')][_0x6b03('0x38')]));_0x5332db[_0x6b03('0x37')]=_0x5332db[_0x6b03('0x37')][_0x6b03('0x45')]?_0x5332db[_0x6b03('0x37')]:_0x28190d[_0x6b03('0x32')];if(_0x471dde[_0x6b03('0x33')]['includeAll']){_0x5332db[_0x6b03('0x3f')]=[{'all':!![]}];}_0x5332db=_[_0x6b03('0x3d')]({},_0x5332db,_0x471dde['options']);return db[_0x6b03('0x2d')][_0x6b03('0x46')](_0x5332db)[_0x6b03('0x26')](handleEntityNotFound(_0xad7b8e,null))[_0x6b03('0x26')](respondWithResult(_0xad7b8e,null))[_0x6b03('0x42')](handleError(_0xad7b8e,null));};exports[_0x6b03('0x47')]=function(_0x3d3a50,_0x2e3174){return db[_0x6b03('0x2d')][_0x6b03('0x47')](_0x3d3a50['body'],{})[_0x6b03('0x26')](respondWithResult(_0x2e3174,0xc9))[_0x6b03('0x42')](handleError(_0x2e3174,null));};exports['update']=function(_0xcb9f7,_0x1d3c7b){if(_0xcb9f7[_0x6b03('0x48')]['id']){delete _0xcb9f7[_0x6b03('0x48')]['id'];}return db[_0x6b03('0x2d')][_0x6b03('0x46')]({'where':{'id':_0xcb9f7[_0x6b03('0x44')]['id']}})[_0x6b03('0x26')](handleEntityNotFound(_0x1d3c7b,null))['then'](saveUpdates(_0xcb9f7[_0x6b03('0x48')],null))[_0x6b03('0x26')](respondWithResult(_0x1d3c7b,null))['catch'](handleError(_0x1d3c7b,null));};exports[_0x6b03('0x25')]=function(_0x2c18dc,_0x34c315){return db['VoiceQueuesLog'][_0x6b03('0x46')]({'where':{'id':_0x2c18dc[_0x6b03('0x44')]['id']}})[_0x6b03('0x26')](handleEntityNotFound(_0x34c315,null))[_0x6b03('0x26')](removeEntity(_0x34c315,null))[_0x6b03('0x42')](handleError(_0x34c315,null));};
\ No newline at end of file
index b63de3c..09cfdf1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xeacb=['VoiceQueuesLog','voice_queues_log','dtm','lodash','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','./voiceQueuesLog.attributes','exports','define'];(function(_0x193844,_0x175ad2){var _0x888c03=function(_0x247ee9){while(--_0x247ee9){_0x193844['push'](_0x193844['shift']());}};_0x888c03(++_0x175ad2);}(_0xeacb,0x199));var _0xbeac=function(_0x2f8066,_0x1a5e4c){_0x2f8066=_0x2f8066-0x0;var _0x5bf3f2=_0xeacb[_0x2f8066];return _0x5bf3f2;};'use strict';var _=require(_0xbeac('0x0'));var util=require('util');var logger=require(_0xbeac('0x1'))(_0xbeac('0x2'));var moment=require(_0xbeac('0x3'));var BPromise=require(_0xbeac('0x4'));var rp=require(_0xbeac('0x5'));var fs=require('fs');var path=require('path');var rimraf=require(_0xbeac('0x6'));var config=require(_0xbeac('0x7'));var attributes=require(_0xbeac('0x8'));module[_0xbeac('0x9')]=function(_0x1c082d,_0x1660f5){return _0x1c082d[_0xbeac('0xa')](_0xbeac('0xb'),attributes,{'tableName':_0xbeac('0xc'),'paranoid':![],'indexes':[{'name':'event_dtm','fields':['event',_0xbeac('0xd')]}],'timestamps':![]});};
\ No newline at end of file
+var _0xe3f3=['util','../../config/logger','api','moment','request-promise','path','rimraf','../../config/environment','VoiceQueuesLog','voice_queues_log','event_dtm','event','dtm','lodash'];(function(_0x57f265,_0x1e5714){var _0x1d0f28=function(_0x1f37a5){while(--_0x1f37a5){_0x57f265['push'](_0x57f265['shift']());}};_0x1d0f28(++_0x1e5714);}(_0xe3f3,0xed));var _0x3e3f=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0xe3f3[_0x122ef9];return _0x42fba0;};'use strict';var _=require(_0x3e3f('0x0'));var util=require(_0x3e3f('0x1'));var logger=require(_0x3e3f('0x2'))(_0x3e3f('0x3'));var moment=require(_0x3e3f('0x4'));var BPromise=require('bluebird');var rp=require(_0x3e3f('0x5'));var fs=require('fs');var path=require(_0x3e3f('0x6'));var rimraf=require(_0x3e3f('0x7'));var config=require(_0x3e3f('0x8'));var attributes=require('./voiceQueuesLog.attributes');module['exports']=function(_0x5e6f11,_0x3f3536){return _0x5e6f11['define'](_0x3e3f('0x9'),attributes,{'tableName':_0x3e3f('0xa'),'paranoid':![],'indexes':[{'name':_0x3e3f('0xb'),'fields':[_0x3e3f('0xc'),_0x3e3f('0xd')]}],'timestamps':![]});};
\ No newline at end of file
index 4b17fc7..63f1150 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7117=['request\x20sent','debug','VoiceQueuesLog,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/logger','../../config/environment','jayson/promise','client','request','then','info','VoiceQueuesLog,\x20%s,\x20%s'];(function(_0x2ec461,_0x5f588a){var _0x28603d=function(_0x21114b){while(--_0x21114b){_0x2ec461['push'](_0x2ec461['shift']());}};_0x28603d(++_0x5f588a);}(_0x7117,0x1ec));var _0x7711=function(_0x3d0391,_0x84402c){_0x3d0391=_0x3d0391-0x0;var _0x2a693f=_0x7117[_0x3d0391];return _0x2a693f;};'use strict';var _=require(_0x7711('0x0'));var util=require(_0x7711('0x1'));var moment=require(_0x7711('0x2'));var BPromise=require(_0x7711('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x7711('0x4'));var db=require(_0x7711('0x5'))['db'];var utils=require('../../config/utils');var logger=require(_0x7711('0x6'))('rpc');var config=require(_0x7711('0x7'));var jayson=require(_0x7711('0x8'));var client=jayson[_0x7711('0x9')]['http']({'port':0x232a});function respondWithRpcPromise(_0x492137,_0x56d953,_0x50acc7){return new BPromise(function(_0x390862,_0xb9cae4){return client[_0x7711('0xa')](_0x492137,_0x50acc7)[_0x7711('0xb')](function(_0x4bb5fc){logger[_0x7711('0xc')](_0x7711('0xd'),_0x56d953,_0x7711('0xe'));logger[_0x7711('0xf')](_0x7711('0x10'),_0x56d953,'request\x20sent',JSON[_0x7711('0x11')](_0x4bb5fc));if(_0x4bb5fc[_0x7711('0x12')]){if(_0x4bb5fc['error'][_0x7711('0x13')]===0x1f4){logger[_0x7711('0x12')](_0x7711('0xd'),_0x56d953,_0x4bb5fc[_0x7711('0x12')][_0x7711('0x14')]);return _0xb9cae4(_0x4bb5fc[_0x7711('0x12')]['message']);}logger[_0x7711('0x12')](_0x7711('0xd'),_0x56d953,_0x4bb5fc[_0x7711('0x12')][_0x7711('0x14')]);return _0x390862(_0x4bb5fc['error'][_0x7711('0x14')]);}else{logger[_0x7711('0xc')](_0x7711('0xd'),_0x56d953,_0x7711('0xe'));_0x390862(_0x4bb5fc[_0x7711('0x15')][_0x7711('0x14')]);}})[_0x7711('0x16')](function(_0x1a9d42){logger[_0x7711('0x12')](_0x7711('0xd'),_0x56d953,_0x1a9d42);_0xb9cae4(_0x1a9d42);});});}
\ No newline at end of file
+var _0xc4a7=['request\x20sent','debug','error','message','VoiceQueuesLog,\x20%s,\x20%s','result','catch','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','jayson/promise','client','http','request','then','info'];(function(_0x2c6e1a,_0x4d25da){var _0x2387ff=function(_0x3917bd){while(--_0x3917bd){_0x2c6e1a['push'](_0x2c6e1a['shift']());}};_0x2387ff(++_0x4d25da);}(_0xc4a7,0x132));var _0x7c4a=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0xc4a7[_0x3b380d];return _0x54502b;};'use strict';var _=require(_0x7c4a('0x0'));var util=require(_0x7c4a('0x1'));var moment=require(_0x7c4a('0x2'));var BPromise=require(_0x7c4a('0x3'));var rs=require(_0x7c4a('0x4'));var fs=require('fs');var Redis=require(_0x7c4a('0x5'));var db=require(_0x7c4a('0x6'))['db'];var utils=require(_0x7c4a('0x7'));var logger=require(_0x7c4a('0x8'))('rpc');var config=require(_0x7c4a('0x9'));var jayson=require(_0x7c4a('0xa'));var client=jayson[_0x7c4a('0xb')][_0x7c4a('0xc')]({'port':0x232a});function respondWithRpcPromise(_0x476976,_0x94493,_0x4c5c6c){return new BPromise(function(_0x19a858,_0x466b4e){return client[_0x7c4a('0xd')](_0x476976,_0x4c5c6c)[_0x7c4a('0xe')](function(_0x18491d){logger[_0x7c4a('0xf')]('VoiceQueuesLog,\x20%s,\x20%s',_0x94493,_0x7c4a('0x10'));logger[_0x7c4a('0x11')]('VoiceQueuesLog,\x20%s,\x20%s,\x20%s',_0x94493,_0x7c4a('0x10'),JSON['stringify'](_0x18491d));if(_0x18491d[_0x7c4a('0x12')]){if(_0x18491d[_0x7c4a('0x12')]['code']===0x1f4){logger[_0x7c4a('0x12')]('VoiceQueuesLog,\x20%s,\x20%s',_0x94493,_0x18491d[_0x7c4a('0x12')]['message']);return _0x466b4e(_0x18491d[_0x7c4a('0x12')][_0x7c4a('0x13')]);}logger[_0x7c4a('0x12')](_0x7c4a('0x14'),_0x94493,_0x18491d[_0x7c4a('0x12')][_0x7c4a('0x13')]);return _0x19a858(_0x18491d['error']['message']);}else{logger[_0x7c4a('0xf')](_0x7c4a('0x14'),_0x94493,_0x7c4a('0x10'));_0x19a858(_0x18491d[_0x7c4a('0x15')][_0x7c4a('0x13')]);}})[_0x7c4a('0x16')](function(_0x35bf34){logger[_0x7c4a('0x12')]('VoiceQueuesLog,\x20%s,\x20%s',_0x94493,_0x35bf34);_0x466b4e(_0x35bf34);});});}
\ No newline at end of file
index e0fb0e8..322d659 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcec2=['index','/describe','isAuthenticated','get','/:id','show','download','/:id/downloads','downloads','/:id/transcribe','post','runTranscribe','put','delete','exports','multer','util','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment'];(function(_0x44039a,_0x2ac8a8){var _0x525de5=function(_0x1dc635){while(--_0x1dc635){_0x44039a['push'](_0x44039a['shift']());}};_0x525de5(++_0x2ac8a8);}(_0xcec2,0x6b));var _0x2cec=function(_0x3a5913,_0x5da4d3){_0x3a5913=_0x3a5913-0x0;var _0xc9a6db=_0xcec2[_0x3a5913];return _0xc9a6db;};'use strict';var multer=require(_0x2cec('0x0'));var util=require(_0x2cec('0x1'));var path=require('path');var timeout=require(_0x2cec('0x2'));var express=require(_0x2cec('0x3'));var router=express['Router']();var fs_extra=require(_0x2cec('0x4'));var auth=require(_0x2cec('0x5'));var interaction=require(_0x2cec('0x6'));var config=require(_0x2cec('0x7'));var controller=require('./voiceRecording.controller');router['get']('/',auth['isAuthenticated'](),controller[_0x2cec('0x8')]);router['get'](_0x2cec('0x9'),auth[_0x2cec('0xa')](),controller['describe']);router[_0x2cec('0xb')](_0x2cec('0xc'),auth[_0x2cec('0xa')](),controller[_0x2cec('0xd')]);router['get']('/:id/download',auth[_0x2cec('0xa')](),controller[_0x2cec('0xe')]);router[_0x2cec('0xb')](_0x2cec('0xf'),controller[_0x2cec('0x10')]);router[_0x2cec('0xb')](_0x2cec('0x11'),auth['isAuthenticated'](),controller['downloadTranscribe']);router[_0x2cec('0x12')]('/',auth['isAuthenticated'](),controller['create']);router[_0x2cec('0x12')]('/:id/transcribe',auth[_0x2cec('0xa')](),controller[_0x2cec('0x13')]);router[_0x2cec('0x14')](_0x2cec('0xc'),auth[_0x2cec('0xa')](),controller['update']);router[_0x2cec('0x15')](_0x2cec('0xc'),auth['isAuthenticated'](),controller['destroy']);module[_0x2cec('0x16')]=router;
\ No newline at end of file
+var _0xd204=['../../components/interaction/service','../../config/environment','./voiceRecording.controller','get','isAuthenticated','/describe','/:id','show','/:id/download','download','downloads','/:id/transcribe','downloadTranscribe','post','create','runTranscribe','put','update','delete','destroy','exports','path','express','Router','../../components/auth/service'];(function(_0x4dc8ad,_0x106f6c){var _0x54db53=function(_0x178d2c){while(--_0x178d2c){_0x4dc8ad['push'](_0x4dc8ad['shift']());}};_0x54db53(++_0x106f6c);}(_0xd204,0x1a5));var _0x4d20=function(_0x43eb33,_0x1733f1){_0x43eb33=_0x43eb33-0x0;var _0x873cab=_0xd204[_0x43eb33];return _0x873cab;};'use strict';var multer=require('multer');var util=require('util');var path=require(_0x4d20('0x0'));var timeout=require('connect-timeout');var express=require(_0x4d20('0x1'));var router=express[_0x4d20('0x2')]();var fs_extra=require('fs-extra');var auth=require(_0x4d20('0x3'));var interaction=require(_0x4d20('0x4'));var config=require(_0x4d20('0x5'));var controller=require(_0x4d20('0x6'));router[_0x4d20('0x7')]('/',auth[_0x4d20('0x8')](),controller['index']);router[_0x4d20('0x7')](_0x4d20('0x9'),auth[_0x4d20('0x8')](),controller['describe']);router['get'](_0x4d20('0xa'),auth[_0x4d20('0x8')](),controller[_0x4d20('0xb')]);router['get'](_0x4d20('0xc'),auth[_0x4d20('0x8')](),controller[_0x4d20('0xd')]);router[_0x4d20('0x7')]('/:id/downloads',controller[_0x4d20('0xe')]);router[_0x4d20('0x7')](_0x4d20('0xf'),auth[_0x4d20('0x8')](),controller[_0x4d20('0x10')]);router[_0x4d20('0x11')]('/',auth[_0x4d20('0x8')](),controller[_0x4d20('0x12')]);router[_0x4d20('0x11')](_0x4d20('0xf'),auth[_0x4d20('0x8')](),controller[_0x4d20('0x13')]);router[_0x4d20('0x14')](_0x4d20('0xa'),auth[_0x4d20('0x8')](),controller[_0x4d20('0x15')]);router[_0x4d20('0x16')](_0x4d20('0xa'),auth[_0x4d20('0x8')](),controller[_0x4d20('0x17')]);module[_0x4d20('0x18')]=router;
\ No newline at end of file
index 02454d1..e06435e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['DATE','updatedAt','toString','sequelize','moment','path','getDataValue','extname','value','STRING','setDataValue','channel','TEXT','NEW','FLOAT','BOOLEAN','format','MM-DD-YYYY\x20HH:mm'];(function(_0x278e3c,_0x1c9cfd){var _0x3e2d9b=function(_0x34d928){while(--_0x34d928){_0x278e3c['push'](_0x278e3c['shift']());}};_0x3e2d9b(++_0x1c9cfd);}(_0xa9e0,0x123));var _0x0a9e=function(_0x13ea00,_0x12f610){_0x13ea00=_0x13ea00-0x0;var _0x1f7347=_0xa9e0[_0x13ea00];return _0x1f7347;};'use strict';var Sequelize=require(_0x0a9e('0x0'));var moment=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));module['exports']={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x0a9e('0x3')]('value')?path[_0x0a9e('0x4')](this[_0x0a9e('0x3')](_0x0a9e('0x5'))):undefined;}},'uniqueid':{'type':Sequelize[_0x0a9e('0x6')]},'channel':{'type':Sequelize[_0x0a9e('0x6')],'set':function(_0x57b080){if(_0x57b080){this[_0x0a9e('0x7')](_0x0a9e('0x8'),_0x57b080);this[_0x0a9e('0x7')]('membername',_0x57b080['split'](/\/|-/)[0x1]);}}},'membername':{'type':Sequelize[_0x0a9e('0x6')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize['STRING']},'connectedlinenum':{'type':Sequelize[_0x0a9e('0x6')]},'connectedlinename':{'type':Sequelize[_0x0a9e('0x6')]},'accountcode':{'type':Sequelize[_0x0a9e('0x6')]},'context':{'type':Sequelize[_0x0a9e('0x6')]},'exten':{'type':Sequelize[_0x0a9e('0x6')]},'value':{'type':Sequelize[_0x0a9e('0x6')]},'type':{'type':Sequelize['STRING']},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'queue':{'type':Sequelize['STRING']},'userDisposition':{'type':Sequelize['STRING']},'userSecondDisposition':{'type':Sequelize[_0x0a9e('0x6')]},'userThirdDisposition':{'type':Sequelize[_0x0a9e('0x6')]},'location':{'type':Sequelize[_0x0a9e('0x9')]},'transcribeName':{'type':Sequelize[_0x0a9e('0x6')]},'transcribeStatus':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':_0x0a9e('0xa')},'fileUri':{'type':Sequelize['TEXT']},'fileText':{'type':Sequelize[_0x0a9e('0x9')]},'failureReason':{'type':Sequelize[_0x0a9e('0x9')]},'sentiment':{'type':Sequelize[_0x0a9e('0x6')]},'sPositive':{'type':Sequelize[_0x0a9e('0xb')]},'sNegative':{'type':Sequelize[_0x0a9e('0xb')]},'sNeutral':{'type':Sequelize[_0x0a9e('0xb')]},'sMixed':{'type':Sequelize['FLOAT']},'tempSentiment':{'type':Sequelize[_0x0a9e('0xc')],'defaultValue':![]},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x0a9e('0x3')]('createdAt'))[_0x0a9e('0xd')](_0x0a9e('0xe'))['toString']();}},'updatedAt':{'type':Sequelize[_0x0a9e('0xf')],'get':function(){return moment(this['getDataValue'](_0x0a9e('0x10')))[_0x0a9e('0xd')](_0x0a9e('0xe'))[_0x0a9e('0x11')]();}}};
\ No newline at end of file
+var _0xa9e0=['DATE','updatedAt','toString','sequelize','moment','path','getDataValue','extname','value','STRING','setDataValue','channel','TEXT','NEW','FLOAT','BOOLEAN','format','MM-DD-YYYY\x20HH:mm'];(function(_0x13d07a,_0x41efc3){var _0x5ee0ee=function(_0x4ca94a){while(--_0x4ca94a){_0x13d07a['push'](_0x13d07a['shift']());}};_0x5ee0ee(++_0x41efc3);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3b5250,_0x7a0b2c){_0x3b5250=_0x3b5250-0x0;var _0xc844a1=_0xa9e0[_0x3b5250];return _0xc844a1;};'use strict';var Sequelize=require(_0x0a9e('0x0'));var moment=require(_0x0a9e('0x1'));var path=require(_0x0a9e('0x2'));module['exports']={'format':{'type':Sequelize['VIRTUAL'],'get':function(){return this[_0x0a9e('0x3')]('value')?path[_0x0a9e('0x4')](this[_0x0a9e('0x3')](_0x0a9e('0x5'))):undefined;}},'uniqueid':{'type':Sequelize[_0x0a9e('0x6')]},'channel':{'type':Sequelize[_0x0a9e('0x6')],'set':function(_0x57b080){if(_0x57b080){this[_0x0a9e('0x7')](_0x0a9e('0x8'),_0x57b080);this[_0x0a9e('0x7')]('membername',_0x57b080['split'](/\/|-/)[0x1]);}}},'membername':{'type':Sequelize[_0x0a9e('0x6')]},'calleridnum':{'type':Sequelize['STRING']},'calleridname':{'type':Sequelize['STRING']},'connectedlinenum':{'type':Sequelize[_0x0a9e('0x6')]},'connectedlinename':{'type':Sequelize[_0x0a9e('0x6')]},'accountcode':{'type':Sequelize[_0x0a9e('0x6')]},'context':{'type':Sequelize[_0x0a9e('0x6')]},'exten':{'type':Sequelize[_0x0a9e('0x6')]},'value':{'type':Sequelize[_0x0a9e('0x6')]},'type':{'type':Sequelize['STRING']},'rating':{'type':Sequelize['INTEGER'],'validate':{'max':0x5,'min':0x0}},'queue':{'type':Sequelize['STRING']},'userDisposition':{'type':Sequelize['STRING']},'userSecondDisposition':{'type':Sequelize[_0x0a9e('0x6')]},'userThirdDisposition':{'type':Sequelize[_0x0a9e('0x6')]},'location':{'type':Sequelize[_0x0a9e('0x9')]},'transcribeName':{'type':Sequelize[_0x0a9e('0x6')]},'transcribeStatus':{'type':Sequelize[_0x0a9e('0x6')],'defaultValue':_0x0a9e('0xa')},'fileUri':{'type':Sequelize['TEXT']},'fileText':{'type':Sequelize[_0x0a9e('0x9')]},'failureReason':{'type':Sequelize[_0x0a9e('0x9')]},'sentiment':{'type':Sequelize[_0x0a9e('0x6')]},'sPositive':{'type':Sequelize[_0x0a9e('0xb')]},'sNegative':{'type':Sequelize[_0x0a9e('0xb')]},'sNeutral':{'type':Sequelize[_0x0a9e('0xb')]},'sMixed':{'type':Sequelize['FLOAT']},'tempSentiment':{'type':Sequelize[_0x0a9e('0xc')],'defaultValue':![]},'createdAt':{'type':Sequelize['DATE'],'get':function(){return moment(this[_0x0a9e('0x3')]('createdAt'))[_0x0a9e('0xd')](_0x0a9e('0xe'))['toString']();}},'updatedAt':{'type':Sequelize[_0x0a9e('0xf')],'get':function(){return moment(this['getDataValue'](_0x0a9e('0x10')))[_0x0a9e('0xd')](_0x0a9e('0xe'))[_0x0a9e('0x11')]();}}};
\ No newline at end of file
index e7562e3..0ad7ade 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdc20=['save','update','then','destroy','error','name','send','index','VoiceRecording','fieldName','type','key','model','differenceBy','format','query','filters','intersection','attributes','fields','length','nolimit','order','sort','where','filter','merge','VIRTUAL','options','include','findAll','rows','params','keys','includeAll','find','catch','create','body','describe','download','../../components/encryptor','uniqueid','value','%s.cypher','existsSync','decryptFile','recording','Sequelize','ValidationError','VoiceRecording\x20not\x20found','filename','extname','unlink','message','Not\x20found','downloads','sequelize','col','token','$and','push','secrets','isNil','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','File:\x20\x22','\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','createBucket','TranscribeService','startTranscriptionJob','basename','[RUNTRANSCRIPT][%d]\x20Voice\x20recording\x20uploaded\x20in\x20bucket\x20%s\x20(%s)','Location','location','[RUNTRANSCRIPT][%d]\x20Sending\x20transcribe\x20request','[RUNTRANSCRIPT][%d]\x20Transcription\x20job\x20%s\x20created','TranscriptionJob','TranscriptionJobName','transcribeName','transcribeStatus','TranscriptionJobStatus','runTranscribe','Setting','findOne','transcribe','transcribeAccountId','language','bucket','sentiment','sentimentAccountId','sentimentRegion','Sentiment\x20Analysis\x20not\x20configured','CloudProvider','Cloud\x20Provider\x20not\x20available','data1','data2','transcribeRegion','Buckets','[RUNTRANSCRIPT][%d]\x20Bucket\x20%s\x20not\x20available','NEW','[RUNTRANSCRIPT][%d]\x20Transcript\x20action\x20already\x20requested','tempSentiment','runSentiment','updateAttributes','downloadTranscribe','/server/files/transcribes/transcribe_','.txt','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','aws-sdk','uuid/v4','ioredis','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../mysqldb','sendStatus','status','end','json','undefined','limit','count','offset','Content-Range','apply','reject'];(function(_0x25b3ec,_0x4713f0){var _0x46c434=function(_0x3187ad){while(--_0x3187ad){_0x25b3ec['push'](_0x25b3ec['shift']());}};_0x46c434(++_0x4713f0);}(_0xdc20,0x101));var _0x0dc2=function(_0x2e73cf,_0x40d663){_0x2e73cf=_0x2e73cf-0x0;var _0x8454f6=_0xdc20[_0x2e73cf];return _0x8454f6;};'use strict';var emlformat=require(_0x0dc2('0x0'));var rimraf=require(_0x0dc2('0x1'));var zipdir=require(_0x0dc2('0x2'));var jsonpatch=require(_0x0dc2('0x3'));var rp=require(_0x0dc2('0x4'));var moment=require('moment');var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0x0dc2('0x5'));var sox=require(_0x0dc2('0x6'));var csv=require(_0x0dc2('0x7'));var ejs=require(_0x0dc2('0x8'));var fs=require('fs');var fs_extra=require(_0x0dc2('0x9'));var _=require(_0x0dc2('0xa'));var squel=require(_0x0dc2('0xb'));var crypto=require(_0x0dc2('0xc'));var jsforce=require(_0x0dc2('0xd'));var deskjs=require(_0x0dc2('0xe'));var toCsv=require('to-csv');var querystring=require(_0x0dc2('0xf'));var Papa=require(_0x0dc2('0x10'));var AWS=require(_0x0dc2('0x11'));var uuidv4=require(_0x0dc2('0x12'));var Redis=require(_0x0dc2('0x13'));var authService=require('../../components/auth/service');var qs=require(_0x0dc2('0x14'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x0dc2('0x15'));var logger=require(_0x0dc2('0x16'))(_0x0dc2('0x17'));var utils=require(_0x0dc2('0x18'));var config=require('../../config/environment');var licenseUtil=require('../../config/license/util');var db=require(_0x0dc2('0x19'))['db'];function respondWithStatusCode(_0x55901f,_0x33e739){_0x33e739=_0x33e739||0xcc;return function(_0x4c459e){if(_0x4c459e){return _0x55901f[_0x0dc2('0x1a')](_0x33e739);}return _0x55901f[_0x0dc2('0x1b')](_0x33e739)[_0x0dc2('0x1c')]();};}function respondWithResult(_0x1d128c,_0x18855f){_0x18855f=_0x18855f||0xc8;return function(_0xafdf48){if(_0xafdf48){return _0x1d128c[_0x0dc2('0x1b')](_0x18855f)[_0x0dc2('0x1d')](_0xafdf48);}};}function respondWithFilteredResult(_0x10b3c9,_0x580d1c){return function(_0x301053){if(_0x301053){var _0x884c0f=typeof _0x580d1c['offset']===_0x0dc2('0x1e')&&typeof _0x580d1c[_0x0dc2('0x1f')]===_0x0dc2('0x1e');var _0x23431e=_0x301053[_0x0dc2('0x20')];var _0x33cc5c=_0x884c0f?0x0:_0x580d1c[_0x0dc2('0x21')];var _0x333010=_0x884c0f?_0x301053[_0x0dc2('0x20')]:_0x580d1c[_0x0dc2('0x21')]+_0x580d1c[_0x0dc2('0x1f')];var _0x367a21;if(_0x333010>=_0x23431e){_0x333010=_0x23431e;_0x367a21=0xc8;}else{_0x367a21=0xce;}_0x10b3c9[_0x0dc2('0x1b')](_0x367a21);return _0x10b3c9['set'](_0x0dc2('0x22'),_0x33cc5c+'-'+_0x333010+'/'+_0x23431e)['json'](_0x301053);}return null;};}function patchUpdates(_0x2ceda6){return function(_0x1fe975){try{jsonpatch[_0x0dc2('0x23')](_0x1fe975,_0x2ceda6,!![]);}catch(_0xf7fb94){return BPromise[_0x0dc2('0x24')](_0xf7fb94);}return _0x1fe975[_0x0dc2('0x25')]();};}function saveUpdates(_0x31a8bb,_0x275083){return function(_0x56b2b3){if(_0x56b2b3){return _0x56b2b3[_0x0dc2('0x26')](_0x31a8bb)[_0x0dc2('0x27')](function(_0x240c2c){return _0x240c2c;});}return null;};}function removeEntity(_0x55d668,_0x1a9edf){return function(_0x39fca8){if(_0x39fca8){return _0x39fca8[_0x0dc2('0x28')]()[_0x0dc2('0x27')](function(){_0x55d668[_0x0dc2('0x1b')](0xcc)[_0x0dc2('0x1c')]();});}};}function handleEntityNotFound(_0x190606,_0x60001d){return function(_0x19d972){if(!_0x19d972){_0x190606['sendStatus'](0x194);}return _0x19d972;};}function handleError(_0x34febe,_0x4d04b5){_0x4d04b5=_0x4d04b5||0x1f4;return function(_0x3cd381){logger[_0x0dc2('0x29')](_0x3cd381['stack']);if(_0x3cd381['name']){delete _0x3cd381[_0x0dc2('0x2a')];}_0x34febe['status'](_0x4d04b5)[_0x0dc2('0x2b')](_0x3cd381);};}exports[_0x0dc2('0x2c')]=function(_0x4c86b4,_0x50b4a3){var _0x820d60={},_0x3c2b94={},_0x288b24={'count':0x0,'rows':[]};var _0x370160=_['map'](db[_0x0dc2('0x2d')]['rawAttributes'],function(_0x3b264e){return{'name':_0x3b264e[_0x0dc2('0x2e')],'type':_0x3b264e[_0x0dc2('0x2f')][_0x0dc2('0x30')]};});_0x3c2b94[_0x0dc2('0x31')]=_[_0x0dc2('0x32')](_['map'](_0x370160,_0x0dc2('0x2a')),[_0x0dc2('0x33')]);_0x3c2b94[_0x0dc2('0x34')]=_['keys'](_0x4c86b4[_0x0dc2('0x34')]);_0x3c2b94[_0x0dc2('0x35')]=_[_0x0dc2('0x36')](_0x3c2b94[_0x0dc2('0x31')],_0x3c2b94['query']);_0x820d60[_0x0dc2('0x37')]=_[_0x0dc2('0x36')](_0x3c2b94[_0x0dc2('0x31')],qs[_0x0dc2('0x38')](_0x4c86b4['query']['fields']));_0x820d60[_0x0dc2('0x37')]=_0x820d60[_0x0dc2('0x37')][_0x0dc2('0x39')]?_0x820d60[_0x0dc2('0x37')]:_0x3c2b94[_0x0dc2('0x31')];if(!_0x4c86b4[_0x0dc2('0x34')]['hasOwnProperty'](_0x0dc2('0x3a'))){_0x820d60['limit']=qs[_0x0dc2('0x1f')](_0x4c86b4[_0x0dc2('0x34')]['limit']);_0x820d60[_0x0dc2('0x21')]=qs[_0x0dc2('0x21')](_0x4c86b4[_0x0dc2('0x34')][_0x0dc2('0x21')]);}_0x820d60[_0x0dc2('0x3b')]=qs['sort'](_0x4c86b4[_0x0dc2('0x34')][_0x0dc2('0x3c')]);_0x820d60[_0x0dc2('0x3d')]=qs[_0x0dc2('0x35')](_['pick'](_0x4c86b4['query'],_0x3c2b94[_0x0dc2('0x35')]),_0x370160);if(_0x4c86b4[_0x0dc2('0x34')][_0x0dc2('0x3e')]){_0x820d60[_0x0dc2('0x3d')]=_[_0x0dc2('0x3f')](_0x820d60['where'],{'$or':_['map'](_0x370160,function(_0x1186a5){if(_0x1186a5['type']!==_0x0dc2('0x40')){var _0x4657b0={};_0x4657b0[_0x1186a5[_0x0dc2('0x2a')]]={'$like':'%'+_0x4c86b4[_0x0dc2('0x34')][_0x0dc2('0x3e')]+'%'};return _0x4657b0;}})});}_0x820d60=_[_0x0dc2('0x3f')]({},_0x820d60,_0x4c86b4[_0x0dc2('0x41')]);var _0x49d0fe={'where':_0x820d60[_0x0dc2('0x3d')]};return db[_0x0dc2('0x2d')][_0x0dc2('0x20')](_0x49d0fe)['then'](function(_0x1d4c56){_0x288b24['count']=_0x1d4c56;if(_0x4c86b4['query']['includeAll']){_0x820d60[_0x0dc2('0x42')]=[{'all':!![]}];}return db[_0x0dc2('0x2d')][_0x0dc2('0x43')](_0x820d60);})[_0x0dc2('0x27')](function(_0x437c77){_0x288b24[_0x0dc2('0x44')]=_0x437c77;return _0x288b24;})['then'](respondWithFilteredResult(_0x50b4a3,_0x820d60))['catch'](handleError(_0x50b4a3,null));};exports['show']=function(_0x48eed9,_0x23775b){var _0x3346e5={'raw':![],'where':{'id':_0x48eed9[_0x0dc2('0x45')]['id']}},_0x4172e6={};_0x4172e6[_0x0dc2('0x31')]=_[_0x0dc2('0x46')](db[_0x0dc2('0x2d')]['rawAttributes']);_0x4172e6[_0x0dc2('0x34')]=_['keys'](_0x48eed9[_0x0dc2('0x34')]);_0x4172e6[_0x0dc2('0x35')]=_[_0x0dc2('0x36')](_0x4172e6[_0x0dc2('0x31')],_0x4172e6[_0x0dc2('0x34')]);_0x3346e5['attributes']=_[_0x0dc2('0x36')](_0x4172e6[_0x0dc2('0x31')],qs['fields'](_0x48eed9[_0x0dc2('0x34')][_0x0dc2('0x38')]));_0x3346e5['attributes']=_0x3346e5[_0x0dc2('0x37')][_0x0dc2('0x39')]?_0x3346e5[_0x0dc2('0x37')]:_0x4172e6[_0x0dc2('0x31')];if(_0x48eed9[_0x0dc2('0x34')][_0x0dc2('0x47')]){_0x3346e5[_0x0dc2('0x42')]=[{'all':!![]}];}_0x3346e5=_['merge']({},_0x3346e5,_0x48eed9[_0x0dc2('0x41')]);return db[_0x0dc2('0x2d')][_0x0dc2('0x48')](_0x3346e5)[_0x0dc2('0x27')](handleEntityNotFound(_0x23775b,null))[_0x0dc2('0x27')](respondWithResult(_0x23775b,null))[_0x0dc2('0x49')](handleError(_0x23775b,null));};exports[_0x0dc2('0x4a')]=function(_0x6d1573,_0x43cbd3){return db[_0x0dc2('0x2d')][_0x0dc2('0x4a')](_0x6d1573['body'],{})['then'](respondWithResult(_0x43cbd3,0xc9))[_0x0dc2('0x49')](handleError(_0x43cbd3,null));};exports['update']=function(_0x3e9a54,_0x493665){if(_0x3e9a54[_0x0dc2('0x4b')]['id']){delete _0x3e9a54[_0x0dc2('0x4b')]['id'];}return db[_0x0dc2('0x2d')]['find']({'where':{'id':_0x3e9a54['params']['id']}})['then'](handleEntityNotFound(_0x493665,null))[_0x0dc2('0x27')](saveUpdates(_0x3e9a54[_0x0dc2('0x4b')],null))[_0x0dc2('0x27')](respondWithResult(_0x493665,null))[_0x0dc2('0x49')](handleError(_0x493665,null));};exports[_0x0dc2('0x4c')]=function(_0x6de86b,_0x2d56f9){return db['VoiceRecording'][_0x0dc2('0x4c')]()['then'](respondWithResult(_0x2d56f9,null))[_0x0dc2('0x49')](handleError(_0x2d56f9,null));};exports[_0x0dc2('0x4d')]=function(_0x286ba1,_0x553858,_0x5579d3){var _0x496887=require(_0x0dc2('0x4e'));var _0x4e8deb=![];var _0x48467b={};if(_0x286ba1[_0x0dc2('0x34')]['type']&&_0x286ba1[_0x0dc2('0x34')][_0x0dc2('0x2f')]===_0x0dc2('0x4f')){_0x48467b[_0x0dc2('0x4f')]=_0x286ba1[_0x0dc2('0x45')]['id'];}else{_0x48467b['id']=_0x286ba1[_0x0dc2('0x45')]['id'];}return db[_0x0dc2('0x2d')][_0x0dc2('0x48')]({'where':_0x48467b,'attributes':['id',_0x0dc2('0x50')],'raw':!![]})[_0x0dc2('0x27')](handleEntityNotFound(_0x553858,null))[_0x0dc2('0x27')](function(_0x2f1f9c){if(_0x2f1f9c){var _0x40a245=_0x2f1f9c[_0x0dc2('0x50')];var _0x1334f4=util[_0x0dc2('0x33')](_0x0dc2('0x51'),_0x40a245);if(fs[_0x0dc2('0x52')](_0x1334f4)){_0x4e8deb=!![];return _0x496887[_0x0dc2('0x53')](_0x1334f4,_0x40a245,config['secrets'][_0x0dc2('0x54')])[_0x0dc2('0x27')](function(){return _0x2f1f9c;});}return _0x2f1f9c;}})[_0x0dc2('0x27')](function(_0x291f7c){if(_0x291f7c){var _0x32c4fb=_0x291f7c[_0x0dc2('0x50')];if(!fs[_0x0dc2('0x52')](_0x32c4fb)){throw new db[(_0x0dc2('0x55'))][(_0x0dc2('0x56'))](_0x0dc2('0x57'));}if(_0x291f7c[_0x0dc2('0x58')]){return _0x553858['download'](_0x32c4fb,_0x291f7c['filename']+path[_0x0dc2('0x59')](_0x32c4fb),function(){if(_0x4e8deb){fs[_0x0dc2('0x5a')](_0x32c4fb);}});}else{return _0x553858[_0x0dc2('0x4d')](_0x32c4fb,function(_0x2a9564){if(_0x4e8deb){fs[_0x0dc2('0x5a')](_0x32c4fb);}});}}})[_0x0dc2('0x49')](function(_0x4fdb52){if(_0x4fdb52[_0x0dc2('0x5b')]===_0x0dc2('0x57')){_0x553858[_0x0dc2('0x1b')](0x194)[_0x0dc2('0x2b')](_0x0dc2('0x5c'));}else{return handleError(_0x553858,null);}});};exports[_0x0dc2('0x5d')]=function(_0x3fe7f7,_0x51fc7f,_0x28d78d){var _0x3b3e84=require(_0x0dc2('0x4e'));var _0xb000b4=![];var _0x58f02e={'$and':[db[_0x0dc2('0x5e')][_0x0dc2('0x3d')](db[_0x0dc2('0x5e')]['fn']('MD5',db[_0x0dc2('0x5e')][_0x0dc2('0x5f')](_0x0dc2('0x4f'))),_0x3fe7f7[_0x0dc2('0x34')][_0x0dc2('0x60')])]};if(_0x3fe7f7['query'][_0x0dc2('0x2f')]&&_0x3fe7f7['query']['type']===_0x0dc2('0x4f')){_0x58f02e[_0x0dc2('0x61')][_0x0dc2('0x62')]({'uniqueid':_0x3fe7f7[_0x0dc2('0x45')]['id']});}else{_0x58f02e['$and'][_0x0dc2('0x62')]({'id':_0x3fe7f7[_0x0dc2('0x45')]['id']});}return db[_0x0dc2('0x2d')][_0x0dc2('0x48')]({'where':_0x58f02e,'attributes':['id',_0x0dc2('0x50')],'raw':!![]})[_0x0dc2('0x27')](handleEntityNotFound(_0x51fc7f,null))[_0x0dc2('0x27')](function(_0x3a46da){if(_0x3a46da){var _0x4c8a39=util[_0x0dc2('0x33')](_0x0dc2('0x51'),_0x3a46da[_0x0dc2('0x50')]);if(fs[_0x0dc2('0x52')](_0x4c8a39)){_0xb000b4=!![];return _0x3b3e84[_0x0dc2('0x53')](_0x4c8a39,_0x3a46da[_0x0dc2('0x50')],config[_0x0dc2('0x63')]['recording'])['then'](function(){return _0x3a46da;});}return _0x3a46da;}})[_0x0dc2('0x27')](function(_0x215663){if(_0x215663){if(!fs['existsSync'](_0x215663[_0x0dc2('0x50')])){throw new db[(_0x0dc2('0x55'))][(_0x0dc2('0x56'))](_0x0dc2('0x57'));}if(_0x215663[_0x0dc2('0x58')]){return _0x51fc7f[_0x0dc2('0x4d')](_0x215663[_0x0dc2('0x50')],_0x215663[_0x0dc2('0x58')]+path[_0x0dc2('0x59')](_0x215663['value']),function(){if(_0xb000b4){fs['unlink'](_0x215663[_0x0dc2('0x50')]);}});}else{return _0x51fc7f[_0x0dc2('0x4d')](_0x215663['value'],function(_0x53f9a8){if(_0xb000b4){fs[_0x0dc2('0x5a')](_0x215663[_0x0dc2('0x50')]);}});}}})[_0x0dc2('0x49')](handleError(_0x51fc7f,null));};exports['destroy']=function(_0x23c496,_0x371615){return db[_0x0dc2('0x2d')][_0x0dc2('0x48')]({'where':{'id':_0x23c496[_0x0dc2('0x45')]['id']}})['then'](function(_0x39af07){if(_[_0x0dc2('0x64')](_0x39af07)){throw new ReferenceError(_0x0dc2('0x65'));}return _0x39af07;})[_0x0dc2('0x27')](function(_0x232518){var _0x17f709=_0x232518['value'];logger[_0x0dc2('0x66')](_0x0dc2('0x67'),_0x17f709);if(!_[_0x0dc2('0x64')](_0x232518[_0x0dc2('0x50')])&&fs[_0x0dc2('0x52')](_0x17f709)){logger['info'](_0x0dc2('0x68')+_0x17f709+_0x0dc2('0x69'));fs[_0x0dc2('0x6a')](_0x17f709);}_0x17f709=_0x17f709+'.cypher';if(!_[_0x0dc2('0x64')](_0x232518[_0x0dc2('0x50')])&&fs[_0x0dc2('0x52')](_0x17f709)){logger[_0x0dc2('0x66')](_0x0dc2('0x68')+_0x17f709+'\x22\x20trovato\x20eseguo\x20la\x20cancellazione');fs['unlinkSync'](_0x17f709);}return _0x232518;})['then'](function(_0x39e761){if(!_0x39e761)throw new InternalError();return _0x39e761[_0x0dc2('0x28')]();})[_0x0dc2('0x27')](function(){_0x371615[_0x0dc2('0x1b')](0xcc)[_0x0dc2('0x1c')]();})[_0x0dc2('0x49')](handleError(_0x371615,null));};function getBucketslist(_0x3433e0,_0x305a05,_0x2e1b52){return new Promise(function(_0x53af4b,_0x391f9d){var _0x4d2e08=new AWS['S3']({'accessKeyId':_0x305a05,'secretAccessKey':_0x3433e0,'region':_0x2e1b52});_0x4d2e08['listBuckets']({},function(_0xbe277,_0xa841f1){if(_0xbe277){return _0x391f9d(_0xbe277);}else{return _0x53af4b(_0xa841f1);}});});}function createBucket(_0xda1cac,_0x508d6b,_0x266e2b,_0x514895){return new Promise(function(_0x3f2c27,_0xb2e458){var _0x22c616=new AWS['S3']({'accessKeyId':_0x508d6b,'secretAccessKey':_0xda1cac,'region':_0x266e2b});_0x22c616[_0x0dc2('0x6b')]({'Bucket':_0x514895},function(_0x764af4,_0xe52284){if(_0x764af4){return _0xb2e458(_0x764af4);}else{return _0x3f2c27(_0xe52284);}});});}function uploadFile(_0x3c534e,_0x30ace7,_0x2b94ba,_0xcd5992,_0x31dca5,_0xbaf07){return new Promise(function(_0x234fe6,_0x1a5bf6){var _0x2e9a8f=new AWS['S3']({'accessKeyId':_0x30ace7,'secretAccessKey':_0x3c534e,'region':_0x2b94ba});_0x2e9a8f['upload']({'Bucket':_0xcd5992,'Key':_0x31dca5,'Body':_0xbaf07},function(_0x549827,_0x169a5e){if(_0x549827){return _0x1a5bf6(_0x549827);}else{return _0x234fe6(_0x169a5e);}});});}function startTranscribe(_0x5d93c7,_0x2ff642,_0xfe942c,_0x899157,_0x4f8123,_0x5534cf){return new Promise(function(_0x110507,_0x1320ea){var _0x151740=new AWS[(_0x0dc2('0x6c'))]({'accessKeyId':_0x2ff642,'secretAccessKey':_0x5d93c7,'region':_0xfe942c});_0x151740[_0x0dc2('0x6d')]({'TranscriptionJobName':_0x899157,'LanguageCode':_0x4f8123,'Media':{'MediaFileUri':_0x5534cf}},function(_0x14e49f,_0x60a096){if(_0x14e49f){return _0x1320ea(_0x14e49f);}else{return _0x110507(_0x60a096);}});});}function transcribe(_0x1d38dd,_0x38b93f,_0x7973b1,_0x5f47e2,_0x5c089c,_0x16d1b1,_0x396b4d){return new Promise(function(_0xd824f9,_0x38d08a){var _0x1ab7bc={};logger[_0x0dc2('0x66')](util[_0x0dc2('0x33')]('[RUNTRANSCRIPT][%d]\x20Starting\x20voice\x20recording\x20upload\x20in\x20bucket\x20%s',_0x1d38dd,_0x5c089c));return uploadFile(_0x38b93f,_0x7973b1,_0x5f47e2,_0x5c089c,path[_0x0dc2('0x6e')](_0x16d1b1),fs['readFileSync'](_0x16d1b1))[_0x0dc2('0x27')](function(_0x4f385b){logger['info'](util[_0x0dc2('0x33')](_0x0dc2('0x6f'),_0x1d38dd,_0x5c089c,_0x4f385b[_0x0dc2('0x70')]));_0x1ab7bc['bucket']=_0x4f385b['Bucket'];_0x1ab7bc[_0x0dc2('0x71')]=_0x4f385b[_0x0dc2('0x70')];logger[_0x0dc2('0x66')](util[_0x0dc2('0x33')](_0x0dc2('0x72'),_0x1d38dd));return startTranscribe(_0x38b93f,_0x7973b1,_0x5f47e2,uuidv4(),_0x396b4d,_0x4f385b[_0x0dc2('0x70')]);})[_0x0dc2('0x27')](function(_0x52bb12){logger['info'](util['format'](_0x0dc2('0x73'),_0x1d38dd,_0x52bb12[_0x0dc2('0x74')][_0x0dc2('0x75')]));_0x1ab7bc[_0x0dc2('0x76')]=_0x52bb12[_0x0dc2('0x74')]['TranscriptionJobName'];_0x1ab7bc[_0x0dc2('0x77')]=_0x52bb12[_0x0dc2('0x74')][_0x0dc2('0x78')];return _0xd824f9(_0x1ab7bc);})['catch'](function(_0x180b60){return _0x38d08a(_0x180b60);});});}exports[_0x0dc2('0x79')]=function(_0x2e37b8,_0x3cb897,_0x593bc2){var _0x3494b0;var _0x4ec034;var _0xaec564;var _0x5aafa8=require(_0x0dc2('0x4e'));return db[_0x0dc2('0x2d')]['findOne']({'where':{'id':_0x2e37b8[_0x0dc2('0x45')]['id']}})[_0x0dc2('0x27')](function(_0x2fd320){if(_0x2fd320){var _0x2df160=util['format'](_0x0dc2('0x51'),_0x2fd320[_0x0dc2('0x50')]);if(fs[_0x0dc2('0x52')](_0x2df160)){cypher=!![];return _0x5aafa8[_0x0dc2('0x53')](_0x2df160,_0x2fd320[_0x0dc2('0x50')],config['secrets']['recording'])[_0x0dc2('0x27')](function(){return _0x2fd320;});}return _0x2fd320;}})[_0x0dc2('0x27')](function(_0x326dc7){if(!_0x326dc7){throw new db[(_0x0dc2('0x55'))][(_0x0dc2('0x56'))]('Voice\x20Recording\x20not\x20found');}_0x4ec034=_0x326dc7;return db[_0x0dc2('0x7a')][_0x0dc2('0x7b')]({'where':{'id':0x1}});})[_0x0dc2('0x27')](handleEntityNotFound(_0x3cb897,null))[_0x0dc2('0x27')](function(_0x46be4c){if(_0x46be4c){_0x3494b0=_0x46be4c;if(!_0x3494b0[_0x0dc2('0x7c')]||!_0x3494b0[_0x0dc2('0x7d')]||!_0x3494b0['transcribeRegion']||!_0x3494b0[_0x0dc2('0x7e')]||!_0x3494b0[_0x0dc2('0x7f')]){throw new db[(_0x0dc2('0x55'))][(_0x0dc2('0x56'))]('Transcribe\x20not\x20configured');}if(_0x2e37b8[_0x0dc2('0x4b')]['runSentiment']&&(!_0x3494b0[_0x0dc2('0x80')]||!_0x3494b0[_0x0dc2('0x81')]||!_0x3494b0[_0x0dc2('0x82')]||!_0x3494b0['language']||!_0x3494b0[_0x0dc2('0x7f')])){throw new db['Sequelize'][(_0x0dc2('0x56'))](_0x0dc2('0x83'));}return db[_0x0dc2('0x84')][_0x0dc2('0x7b')]({'where':{'id':_0x3494b0[_0x0dc2('0x7d')]}});}})['then'](function(_0xa90832){if(!_0xa90832){throw new db[(_0x0dc2('0x55'))][(_0x0dc2('0x56'))](_0x0dc2('0x85'));}if(!_0xa90832[_0x0dc2('0x86')]||!_0xa90832[_0x0dc2('0x87')]){throw new db['Sequelize']['ValidationError']('Cloud\x20Provider\x20not\x20configured');}_0xaec564=_0xa90832;return getBucketslist(_0xaec564[_0x0dc2('0x86')],_0xaec564['data2'],_0x3494b0[_0x0dc2('0x88')]);})[_0x0dc2('0x27')](function(_0x421e40){if(_0x421e40&&_0x421e40[_0x0dc2('0x89')]){var _0xaef46b=_['find'](_0x421e40['Buckets'],function(_0x40778c){return _0x40778c['Name']===_0x3494b0[_0x0dc2('0x7f')];});if(!_0xaef46b){logger[_0x0dc2('0x66')](util['format'](_0x0dc2('0x8a'),_0x2e37b8[_0x0dc2('0x45')]['id'],_0x3494b0['bucket']));return createBucket(_0xaec564[_0x0dc2('0x86')],_0xaec564['data2'],_0x3494b0[_0x0dc2('0x88')],_0x3494b0[_0x0dc2('0x7f')]);}logger['info'](util[_0x0dc2('0x33')]('[RUNTRANSCRIPT][%d]\x20Bucket\x20%s\x20available',_0x2e37b8['params']['id'],_0x3494b0[_0x0dc2('0x7f')]));return;}})['then'](function(_0x15c8c4){if(_0x4ec034[_0x0dc2('0x77')]===_0x0dc2('0x8b')){return transcribe(_0x2e37b8[_0x0dc2('0x45')]['id'],_0xaec564[_0x0dc2('0x86')],_0xaec564[_0x0dc2('0x87')],_0x3494b0['transcribeRegion'],_0x3494b0[_0x0dc2('0x7f')],_0x4ec034[_0x0dc2('0x50')],_0x3494b0[_0x0dc2('0x7e')]);}else{logger['info'](util[_0x0dc2('0x33')](_0x0dc2('0x8c'),_0x2e37b8[_0x0dc2('0x45')]['id']));return{'transcribeStatus':'IN_PROGRESS'};}})[_0x0dc2('0x27')](function(_0x2aad0a){if(_0x2aad0a){_0x2aad0a[_0x0dc2('0x8d')]=_0x2e37b8[_0x0dc2('0x4b')][_0x0dc2('0x8e')];return _0x4ec034[_0x0dc2('0x8f')](_0x2aad0a);}})['then'](respondWithResult(_0x3cb897,null))[_0x0dc2('0x49')](handleError(_0x3cb897,null));};function writeFile(_0x24553c,_0x1a485e){return new Promise(function(_0x5b403e,_0xc336fb){fs['writeFile'](_0x1a485e,_0x24553c,function(_0x2489a,_0x3f6556){if(_0x2489a){return _0xc336fb(_0x2489a);}else{return _0x5b403e(_0x3f6556);}});});}exports[_0x0dc2('0x90')]=function(_0x3cc039,_0x542d51,_0x354d0e){return db[_0x0dc2('0x2d')][_0x0dc2('0x7b')]({'where':{'id':_0x3cc039[_0x0dc2('0x45')]['id']}})[_0x0dc2('0x27')](handleEntityNotFound(_0x542d51))['then'](function(_0xeda24b){if(_0xeda24b&&_0xeda24b['fileText']){var _0x21d608=_0xeda24b['fileText'];var _0xbe7f59=config['root']+_0x0dc2('0x91')+_0xeda24b['id']+_0x0dc2('0x92');if(fs[_0x0dc2('0x52')](_0xbe7f59)){return _0xbe7f59;}return writeFile(_0x21d608,_0xbe7f59)[_0x0dc2('0x27')](function(){return _0xbe7f59;});}else{throw new db[(_0x0dc2('0x55'))][(_0x0dc2('0x56'))]('Transcript\x20not\x20available');}})['then'](function(_0x1153a3){return _0x542d51[_0x0dc2('0x4d')](_0x1153a3);})['catch'](handleError(_0x542d51));};
\ No newline at end of file
+var _0x27bb=['\x22\x20trovato\x20eseguo\x20la\x20cancellazione','unlinkSync','listBuckets','TranscribeService','startTranscriptionJob','[RUNTRANSCRIPT][%d]\x20Starting\x20voice\x20recording\x20upload\x20in\x20bucket\x20%s','basename','[RUNTRANSCRIPT][%d]\x20Voice\x20recording\x20uploaded\x20in\x20bucket\x20%s\x20(%s)','bucket','Bucket','location','Location','[RUNTRANSCRIPT][%d]\x20Sending\x20transcribe\x20request','[RUNTRANSCRIPT][%d]\x20Transcription\x20job\x20%s\x20created','TranscriptionJob','TranscriptionJobName','transcribeStatus','TranscriptionJobStatus','runTranscribe','findOne','Voice\x20Recording\x20not\x20found','Setting','transcribe','transcribeAccountId','transcribeRegion','language','Transcribe\x20not\x20configured','runSentiment','sentiment','sentimentAccountId','sentimentRegion','Sentiment\x20Analysis\x20not\x20configured','CloudProvider','Cloud\x20Provider\x20not\x20available','data1','data2','Cloud\x20Provider\x20not\x20configured','Buckets','Name','[RUNTRANSCRIPT][%d]\x20Bucket\x20%s\x20not\x20available','[RUNTRANSCRIPT][%d]\x20Bucket\x20%s\x20available','NEW','IN_PROGRESS','tempSentiment','writeFile','fileText','root','/server/files/transcribes/transcribe_','.txt','Transcript\x20not\x20available','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','path','sox','to-csv','fs-extra','lodash','crypto','jsforce','desk.js','querystring','papaparse','aws-sdk','uuid/v4','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/utils','../../config/license/util','sendStatus','status','end','json','offset','count','limit','set','Content-Range','reject','save','update','then','destroy','error','stack','name','send','map','VoiceRecording','rawAttributes','fieldName','type','model','differenceBy','format','query','intersection','attributes','fields','length','hasOwnProperty','sort','where','pick','merge','options','includeAll','findAll','rows','catch','show','keys','include','find','create','body','params','describe','../../components/encryptor','uniqueid','value','%s.cypher','decryptFile','secrets','recording','existsSync','ValidationError','filename','download','extname','unlink','message','VoiceRecording\x20not\x20found','Not\x20found','downloads','sequelize','MD5','col','token','push','Sequelize','isNil','Entity\x20not\x20found','info','cancellazione\x20fisica\x20documento\x20%s','File:\x20\x22'];(function(_0x993095,_0x10528f){var _0x84f877=function(_0x190986){while(--_0x190986){_0x993095['push'](_0x993095['shift']());}};_0x84f877(++_0x10528f);}(_0x27bb,0x162));var _0xb27b=function(_0x4738f9,_0x57f171){_0x4738f9=_0x4738f9-0x0;var _0x61d357=_0x27bb[_0x4738f9];return _0x61d357;};'use strict';var emlformat=require(_0xb27b('0x0'));var rimraf=require(_0xb27b('0x1'));var zipdir=require(_0xb27b('0x2'));var jsonpatch=require(_0xb27b('0x3'));var rp=require(_0xb27b('0x4'));var moment=require(_0xb27b('0x5'));var BPromise=require('bluebird');var Mustache=require('mustache');var util=require('util');var path=require(_0xb27b('0x6'));var sox=require(_0xb27b('0x7'));var csv=require(_0xb27b('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require(_0xb27b('0x9'));var _=require(_0xb27b('0xa'));var squel=require('squel');var crypto=require(_0xb27b('0xb'));var jsforce=require(_0xb27b('0xc'));var deskjs=require(_0xb27b('0xd'));var toCsv=require('to-csv');var querystring=require(_0xb27b('0xe'));var Papa=require(_0xb27b('0xf'));var AWS=require(_0xb27b('0x10'));var uuidv4=require(_0xb27b('0x11'));var Redis=require(_0xb27b('0x12'));var authService=require(_0xb27b('0x13'));var qs=require(_0xb27b('0x14'));var as=require(_0xb27b('0x15'));var hardwareService=require(_0xb27b('0x16'));var logger=require('../../config/logger')('api');var utils=require(_0xb27b('0x17'));var config=require('../../config/environment');var licenseUtil=require(_0xb27b('0x18'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0x2eb47b,_0x1ef0d0){_0x1ef0d0=_0x1ef0d0||0xcc;return function(_0x26d7b5){if(_0x26d7b5){return _0x2eb47b[_0xb27b('0x19')](_0x1ef0d0);}return _0x2eb47b[_0xb27b('0x1a')](_0x1ef0d0)[_0xb27b('0x1b')]();};}function respondWithResult(_0x95f40f,_0x474e87){_0x474e87=_0x474e87||0xc8;return function(_0x5ce8a4){if(_0x5ce8a4){return _0x95f40f['status'](_0x474e87)[_0xb27b('0x1c')](_0x5ce8a4);}};}function respondWithFilteredResult(_0x54b013,_0x39851a){return function(_0x38e827){if(_0x38e827){var _0x2efd48=typeof _0x39851a[_0xb27b('0x1d')]==='undefined'&&typeof _0x39851a['limit']==='undefined';var _0xc1b46=_0x38e827[_0xb27b('0x1e')];var _0x2d81bf=_0x2efd48?0x0:_0x39851a[_0xb27b('0x1d')];var _0x3048c2=_0x2efd48?_0x38e827['count']:_0x39851a['offset']+_0x39851a[_0xb27b('0x1f')];var _0x131ab8;if(_0x3048c2>=_0xc1b46){_0x3048c2=_0xc1b46;_0x131ab8=0xc8;}else{_0x131ab8=0xce;}_0x54b013['status'](_0x131ab8);return _0x54b013[_0xb27b('0x20')](_0xb27b('0x21'),_0x2d81bf+'-'+_0x3048c2+'/'+_0xc1b46)[_0xb27b('0x1c')](_0x38e827);}return null;};}function patchUpdates(_0x599617){return function(_0x283182){try{jsonpatch['apply'](_0x283182,_0x599617,!![]);}catch(_0x189148){return BPromise[_0xb27b('0x22')](_0x189148);}return _0x283182[_0xb27b('0x23')]();};}function saveUpdates(_0x38dfed,_0x5bb3c6){return function(_0x1eceef){if(_0x1eceef){return _0x1eceef[_0xb27b('0x24')](_0x38dfed)[_0xb27b('0x25')](function(_0x4b8f1d){return _0x4b8f1d;});}return null;};}function removeEntity(_0x57a5e2,_0x27f3e3){return function(_0x51b7d4){if(_0x51b7d4){return _0x51b7d4[_0xb27b('0x26')]()[_0xb27b('0x25')](function(){_0x57a5e2['status'](0xcc)['end']();});}};}function handleEntityNotFound(_0x217db6,_0x3fad3){return function(_0x2b47c2){if(!_0x2b47c2){_0x217db6[_0xb27b('0x19')](0x194);}return _0x2b47c2;};}function handleError(_0x3048f6,_0x4c6bb0){_0x4c6bb0=_0x4c6bb0||0x1f4;return function(_0x151972){logger[_0xb27b('0x27')](_0x151972[_0xb27b('0x28')]);if(_0x151972['name']){delete _0x151972[_0xb27b('0x29')];}_0x3048f6[_0xb27b('0x1a')](_0x4c6bb0)[_0xb27b('0x2a')](_0x151972);};}exports['index']=function(_0x4d211f,_0x3f0c25){var _0x56464d={},_0x2f27d6={},_0x2610f3={'count':0x0,'rows':[]};var _0x30581d=_[_0xb27b('0x2b')](db[_0xb27b('0x2c')][_0xb27b('0x2d')],function(_0x592907){return{'name':_0x592907[_0xb27b('0x2e')],'type':_0x592907[_0xb27b('0x2f')]['key']};});_0x2f27d6[_0xb27b('0x30')]=_[_0xb27b('0x31')](_[_0xb27b('0x2b')](_0x30581d,_0xb27b('0x29')),[_0xb27b('0x32')]);_0x2f27d6['query']=_['keys'](_0x4d211f[_0xb27b('0x33')]);_0x2f27d6['filters']=_[_0xb27b('0x34')](_0x2f27d6[_0xb27b('0x30')],_0x2f27d6[_0xb27b('0x33')]);_0x56464d[_0xb27b('0x35')]=_['intersection'](_0x2f27d6[_0xb27b('0x30')],qs[_0xb27b('0x36')](_0x4d211f[_0xb27b('0x33')][_0xb27b('0x36')]));_0x56464d[_0xb27b('0x35')]=_0x56464d[_0xb27b('0x35')][_0xb27b('0x37')]?_0x56464d['attributes']:_0x2f27d6[_0xb27b('0x30')];if(!_0x4d211f[_0xb27b('0x33')][_0xb27b('0x38')]('nolimit')){_0x56464d['limit']=qs[_0xb27b('0x1f')](_0x4d211f[_0xb27b('0x33')][_0xb27b('0x1f')]);_0x56464d[_0xb27b('0x1d')]=qs['offset'](_0x4d211f[_0xb27b('0x33')]['offset']);}_0x56464d['order']=qs['sort'](_0x4d211f[_0xb27b('0x33')][_0xb27b('0x39')]);_0x56464d[_0xb27b('0x3a')]=qs['filters'](_[_0xb27b('0x3b')](_0x4d211f['query'],_0x2f27d6['filters']),_0x30581d);if(_0x4d211f[_0xb27b('0x33')]['filter']){_0x56464d['where']=_[_0xb27b('0x3c')](_0x56464d['where'],{'$or':_[_0xb27b('0x2b')](_0x30581d,function(_0xef0a52){if(_0xef0a52[_0xb27b('0x2f')]!=='VIRTUAL'){var _0x4438d7={};_0x4438d7[_0xef0a52[_0xb27b('0x29')]]={'$like':'%'+_0x4d211f[_0xb27b('0x33')]['filter']+'%'};return _0x4438d7;}})});}_0x56464d=_['merge']({},_0x56464d,_0x4d211f[_0xb27b('0x3d')]);var _0x2b39b4={'where':_0x56464d['where']};return db[_0xb27b('0x2c')][_0xb27b('0x1e')](_0x2b39b4)[_0xb27b('0x25')](function(_0x2253a9){_0x2610f3['count']=_0x2253a9;if(_0x4d211f[_0xb27b('0x33')][_0xb27b('0x3e')]){_0x56464d['include']=[{'all':!![]}];}return db['VoiceRecording'][_0xb27b('0x3f')](_0x56464d);})[_0xb27b('0x25')](function(_0x49d6e9){_0x2610f3[_0xb27b('0x40')]=_0x49d6e9;return _0x2610f3;})[_0xb27b('0x25')](respondWithFilteredResult(_0x3f0c25,_0x56464d))[_0xb27b('0x41')](handleError(_0x3f0c25,null));};exports[_0xb27b('0x42')]=function(_0x45d4a8,_0x5e8055){var _0x207f21={'raw':![],'where':{'id':_0x45d4a8['params']['id']}},_0x2dce7f={};_0x2dce7f[_0xb27b('0x30')]=_[_0xb27b('0x43')](db['VoiceRecording'][_0xb27b('0x2d')]);_0x2dce7f[_0xb27b('0x33')]=_[_0xb27b('0x43')](_0x45d4a8[_0xb27b('0x33')]);_0x2dce7f['filters']=_['intersection'](_0x2dce7f[_0xb27b('0x30')],_0x2dce7f[_0xb27b('0x33')]);_0x207f21[_0xb27b('0x35')]=_[_0xb27b('0x34')](_0x2dce7f[_0xb27b('0x30')],qs[_0xb27b('0x36')](_0x45d4a8[_0xb27b('0x33')][_0xb27b('0x36')]));_0x207f21['attributes']=_0x207f21['attributes'][_0xb27b('0x37')]?_0x207f21[_0xb27b('0x35')]:_0x2dce7f['model'];if(_0x45d4a8[_0xb27b('0x33')]['includeAll']){_0x207f21[_0xb27b('0x44')]=[{'all':!![]}];}_0x207f21=_[_0xb27b('0x3c')]({},_0x207f21,_0x45d4a8['options']);return db[_0xb27b('0x2c')][_0xb27b('0x45')](_0x207f21)[_0xb27b('0x25')](handleEntityNotFound(_0x5e8055,null))[_0xb27b('0x25')](respondWithResult(_0x5e8055,null))[_0xb27b('0x41')](handleError(_0x5e8055,null));};exports[_0xb27b('0x46')]=function(_0x142ced,_0x2efa68){return db[_0xb27b('0x2c')][_0xb27b('0x46')](_0x142ced[_0xb27b('0x47')],{})['then'](respondWithResult(_0x2efa68,0xc9))[_0xb27b('0x41')](handleError(_0x2efa68,null));};exports['update']=function(_0x4fb27b,_0x2a8ade){if(_0x4fb27b['body']['id']){delete _0x4fb27b[_0xb27b('0x47')]['id'];}return db[_0xb27b('0x2c')]['find']({'where':{'id':_0x4fb27b[_0xb27b('0x48')]['id']}})[_0xb27b('0x25')](handleEntityNotFound(_0x2a8ade,null))[_0xb27b('0x25')](saveUpdates(_0x4fb27b[_0xb27b('0x47')],null))['then'](respondWithResult(_0x2a8ade,null))[_0xb27b('0x41')](handleError(_0x2a8ade,null));};exports['describe']=function(_0x5a80c2,_0x51204a){return db['VoiceRecording'][_0xb27b('0x49')]()['then'](respondWithResult(_0x51204a,null))['catch'](handleError(_0x51204a,null));};exports['download']=function(_0x29294a,_0x137e69,_0x5dff82){var _0x479a3c=require(_0xb27b('0x4a'));var _0x39f1f2=![];var _0x535d76={};if(_0x29294a[_0xb27b('0x33')]['type']&&_0x29294a[_0xb27b('0x33')]['type']===_0xb27b('0x4b')){_0x535d76['uniqueid']=_0x29294a[_0xb27b('0x48')]['id'];}else{_0x535d76['id']=_0x29294a[_0xb27b('0x48')]['id'];}return db[_0xb27b('0x2c')][_0xb27b('0x45')]({'where':_0x535d76,'attributes':['id','value'],'raw':!![]})[_0xb27b('0x25')](handleEntityNotFound(_0x137e69,null))['then'](function(_0x238306){if(_0x238306){var _0x49aff2=_0x238306[_0xb27b('0x4c')];var _0x16701d=util['format'](_0xb27b('0x4d'),_0x49aff2);if(fs['existsSync'](_0x16701d)){_0x39f1f2=!![];return _0x479a3c[_0xb27b('0x4e')](_0x16701d,_0x49aff2,config[_0xb27b('0x4f')][_0xb27b('0x50')])[_0xb27b('0x25')](function(){return _0x238306;});}return _0x238306;}})[_0xb27b('0x25')](function(_0x30a189){if(_0x30a189){var _0x91b7b2=_0x30a189[_0xb27b('0x4c')];if(!fs[_0xb27b('0x51')](_0x91b7b2)){throw new db['Sequelize'][(_0xb27b('0x52'))]('VoiceRecording\x20not\x20found');}if(_0x30a189[_0xb27b('0x53')]){return _0x137e69[_0xb27b('0x54')](_0x91b7b2,_0x30a189[_0xb27b('0x53')]+path[_0xb27b('0x55')](_0x91b7b2),function(){if(_0x39f1f2){fs[_0xb27b('0x56')](_0x91b7b2);}});}else{return _0x137e69[_0xb27b('0x54')](_0x91b7b2,function(_0xd4ae4c){if(_0x39f1f2){fs[_0xb27b('0x56')](_0x91b7b2);}});}}})[_0xb27b('0x41')](function(_0x1dbefb){if(_0x1dbefb[_0xb27b('0x57')]===_0xb27b('0x58')){_0x137e69[_0xb27b('0x1a')](0x194)[_0xb27b('0x2a')](_0xb27b('0x59'));}else{return handleError(_0x137e69,null);}});};exports[_0xb27b('0x5a')]=function(_0x287a96,_0x2f6b25,_0x4d3f77){var _0x1f3165=require(_0xb27b('0x4a'));var _0x47d79d=![];var _0x19b5e7={'$and':[db[_0xb27b('0x5b')][_0xb27b('0x3a')](db[_0xb27b('0x5b')]['fn'](_0xb27b('0x5c'),db[_0xb27b('0x5b')][_0xb27b('0x5d')](_0xb27b('0x4b'))),_0x287a96[_0xb27b('0x33')][_0xb27b('0x5e')])]};if(_0x287a96[_0xb27b('0x33')][_0xb27b('0x2f')]&&_0x287a96[_0xb27b('0x33')]['type']===_0xb27b('0x4b')){_0x19b5e7['$and'][_0xb27b('0x5f')]({'uniqueid':_0x287a96['params']['id']});}else{_0x19b5e7['$and'][_0xb27b('0x5f')]({'id':_0x287a96['params']['id']});}return db[_0xb27b('0x2c')]['find']({'where':_0x19b5e7,'attributes':['id',_0xb27b('0x4c')],'raw':!![]})[_0xb27b('0x25')](handleEntityNotFound(_0x2f6b25,null))['then'](function(_0x50afa9){if(_0x50afa9){var _0x1aee3b=util[_0xb27b('0x32')](_0xb27b('0x4d'),_0x50afa9[_0xb27b('0x4c')]);if(fs[_0xb27b('0x51')](_0x1aee3b)){_0x47d79d=!![];return _0x1f3165[_0xb27b('0x4e')](_0x1aee3b,_0x50afa9[_0xb27b('0x4c')],config[_0xb27b('0x4f')][_0xb27b('0x50')])[_0xb27b('0x25')](function(){return _0x50afa9;});}return _0x50afa9;}})[_0xb27b('0x25')](function(_0x4cdf3a){if(_0x4cdf3a){if(!fs[_0xb27b('0x51')](_0x4cdf3a[_0xb27b('0x4c')])){throw new db[(_0xb27b('0x60'))][(_0xb27b('0x52'))](_0xb27b('0x58'));}if(_0x4cdf3a[_0xb27b('0x53')]){return _0x2f6b25[_0xb27b('0x54')](_0x4cdf3a[_0xb27b('0x4c')],_0x4cdf3a['filename']+path['extname'](_0x4cdf3a['value']),function(){if(_0x47d79d){fs['unlink'](_0x4cdf3a[_0xb27b('0x4c')]);}});}else{return _0x2f6b25[_0xb27b('0x54')](_0x4cdf3a[_0xb27b('0x4c')],function(_0x2a6234){if(_0x47d79d){fs[_0xb27b('0x56')](_0x4cdf3a[_0xb27b('0x4c')]);}});}}})[_0xb27b('0x41')](handleError(_0x2f6b25,null));};exports[_0xb27b('0x26')]=function(_0x169442,_0x321566){return db[_0xb27b('0x2c')]['find']({'where':{'id':_0x169442[_0xb27b('0x48')]['id']}})[_0xb27b('0x25')](function(_0x41c127){if(_[_0xb27b('0x61')](_0x41c127)){throw new ReferenceError(_0xb27b('0x62'));}return _0x41c127;})[_0xb27b('0x25')](function(_0x1170e6){var _0x254f51=_0x1170e6['value'];logger[_0xb27b('0x63')](_0xb27b('0x64'),_0x254f51);if(!_[_0xb27b('0x61')](_0x1170e6[_0xb27b('0x4c')])&&fs['existsSync'](_0x254f51)){logger[_0xb27b('0x63')](_0xb27b('0x65')+_0x254f51+_0xb27b('0x66'));fs[_0xb27b('0x67')](_0x254f51);}_0x254f51=_0x254f51+'.cypher';if(!_[_0xb27b('0x61')](_0x1170e6[_0xb27b('0x4c')])&&fs['existsSync'](_0x254f51)){logger['info'](_0xb27b('0x65')+_0x254f51+_0xb27b('0x66'));fs[_0xb27b('0x67')](_0x254f51);}return _0x1170e6;})['then'](function(_0x4fefaa){if(!_0x4fefaa)throw new InternalError();return _0x4fefaa[_0xb27b('0x26')]();})['then'](function(){_0x321566[_0xb27b('0x1a')](0xcc)[_0xb27b('0x1b')]();})['catch'](handleError(_0x321566,null));};function getBucketslist(_0x578a72,_0x18f683,_0x332db6){return new Promise(function(_0x343593,_0x2c34a2){var _0x15bdfa=new AWS['S3']({'accessKeyId':_0x18f683,'secretAccessKey':_0x578a72,'region':_0x332db6});_0x15bdfa[_0xb27b('0x68')]({},function(_0x3e57f8,_0x316ea8){if(_0x3e57f8){return _0x2c34a2(_0x3e57f8);}else{return _0x343593(_0x316ea8);}});});}function createBucket(_0x180d22,_0x2f1b80,_0x18fdba,_0x4554c0){return new Promise(function(_0x345f0f,_0x52864c){var _0x5e057b=new AWS['S3']({'accessKeyId':_0x2f1b80,'secretAccessKey':_0x180d22,'region':_0x18fdba});_0x5e057b['createBucket']({'Bucket':_0x4554c0},function(_0x44c6d4,_0x39cf62){if(_0x44c6d4){return _0x52864c(_0x44c6d4);}else{return _0x345f0f(_0x39cf62);}});});}function uploadFile(_0x1430db,_0x3fbef2,_0x25cece,_0x5a6f59,_0x2e7ce6,_0x53e2c4){return new Promise(function(_0x21729d,_0x479198){var _0x1d16ed=new AWS['S3']({'accessKeyId':_0x3fbef2,'secretAccessKey':_0x1430db,'region':_0x25cece});_0x1d16ed['upload']({'Bucket':_0x5a6f59,'Key':_0x2e7ce6,'Body':_0x53e2c4},function(_0x5e3734,_0x1c064e){if(_0x5e3734){return _0x479198(_0x5e3734);}else{return _0x21729d(_0x1c064e);}});});}function startTranscribe(_0x24e2cd,_0x55aad2,_0x562384,_0x17a097,_0x7231e7,_0x551e01){return new Promise(function(_0x48a4e8,_0x4e4903){var _0x4b5480=new AWS[(_0xb27b('0x69'))]({'accessKeyId':_0x55aad2,'secretAccessKey':_0x24e2cd,'region':_0x562384});_0x4b5480[_0xb27b('0x6a')]({'TranscriptionJobName':_0x17a097,'LanguageCode':_0x7231e7,'Media':{'MediaFileUri':_0x551e01}},function(_0x3e0900,_0x5c4d95){if(_0x3e0900){return _0x4e4903(_0x3e0900);}else{return _0x48a4e8(_0x5c4d95);}});});}function transcribe(_0x4b3aed,_0x410d72,_0x1e5dbb,_0x3af810,_0x5ef610,_0x2abb56,_0x11ef95){return new Promise(function(_0x390e69,_0x30191e){var _0x4d0d6c={};logger['info'](util[_0xb27b('0x32')](_0xb27b('0x6b'),_0x4b3aed,_0x5ef610));return uploadFile(_0x410d72,_0x1e5dbb,_0x3af810,_0x5ef610,path[_0xb27b('0x6c')](_0x2abb56),fs['readFileSync'](_0x2abb56))[_0xb27b('0x25')](function(_0x4672af){logger[_0xb27b('0x63')](util[_0xb27b('0x32')](_0xb27b('0x6d'),_0x4b3aed,_0x5ef610,_0x4672af['Location']));_0x4d0d6c[_0xb27b('0x6e')]=_0x4672af[_0xb27b('0x6f')];_0x4d0d6c[_0xb27b('0x70')]=_0x4672af[_0xb27b('0x71')];logger[_0xb27b('0x63')](util[_0xb27b('0x32')](_0xb27b('0x72'),_0x4b3aed));return startTranscribe(_0x410d72,_0x1e5dbb,_0x3af810,uuidv4(),_0x11ef95,_0x4672af[_0xb27b('0x71')]);})['then'](function(_0xdbf02b){logger[_0xb27b('0x63')](util['format'](_0xb27b('0x73'),_0x4b3aed,_0xdbf02b[_0xb27b('0x74')][_0xb27b('0x75')]));_0x4d0d6c['transcribeName']=_0xdbf02b[_0xb27b('0x74')][_0xb27b('0x75')];_0x4d0d6c[_0xb27b('0x76')]=_0xdbf02b[_0xb27b('0x74')][_0xb27b('0x77')];return _0x390e69(_0x4d0d6c);})[_0xb27b('0x41')](function(_0x341396){return _0x30191e(_0x341396);});});}exports[_0xb27b('0x78')]=function(_0x294bc7,_0x348755,_0x4cbc12){var _0x244392;var _0x1bc87b;var _0x3b2c6b;var _0x4d0359=require('../../components/encryptor');return db[_0xb27b('0x2c')][_0xb27b('0x79')]({'where':{'id':_0x294bc7[_0xb27b('0x48')]['id']}})[_0xb27b('0x25')](function(_0x4aeb83){if(_0x4aeb83){var _0x30fa76=util[_0xb27b('0x32')](_0xb27b('0x4d'),_0x4aeb83['value']);if(fs[_0xb27b('0x51')](_0x30fa76)){cypher=!![];return _0x4d0359[_0xb27b('0x4e')](_0x30fa76,_0x4aeb83[_0xb27b('0x4c')],config[_0xb27b('0x4f')][_0xb27b('0x50')])[_0xb27b('0x25')](function(){return _0x4aeb83;});}return _0x4aeb83;}})[_0xb27b('0x25')](function(_0x2bb14e){if(!_0x2bb14e){throw new db[(_0xb27b('0x60'))][(_0xb27b('0x52'))](_0xb27b('0x7a'));}_0x1bc87b=_0x2bb14e;return db[_0xb27b('0x7b')][_0xb27b('0x79')]({'where':{'id':0x1}});})[_0xb27b('0x25')](handleEntityNotFound(_0x348755,null))[_0xb27b('0x25')](function(_0x4df3b5){if(_0x4df3b5){_0x244392=_0x4df3b5;if(!_0x244392[_0xb27b('0x7c')]||!_0x244392[_0xb27b('0x7d')]||!_0x244392[_0xb27b('0x7e')]||!_0x244392[_0xb27b('0x7f')]||!_0x244392['bucket']){throw new db['Sequelize'][(_0xb27b('0x52'))](_0xb27b('0x80'));}if(_0x294bc7[_0xb27b('0x47')][_0xb27b('0x81')]&&(!_0x244392[_0xb27b('0x82')]||!_0x244392[_0xb27b('0x83')]||!_0x244392[_0xb27b('0x84')]||!_0x244392['language']||!_0x244392[_0xb27b('0x6e')])){throw new db[(_0xb27b('0x60'))][(_0xb27b('0x52'))](_0xb27b('0x85'));}return db[_0xb27b('0x86')]['findOne']({'where':{'id':_0x244392[_0xb27b('0x7d')]}});}})[_0xb27b('0x25')](function(_0x41184a){if(!_0x41184a){throw new db[(_0xb27b('0x60'))][(_0xb27b('0x52'))](_0xb27b('0x87'));}if(!_0x41184a[_0xb27b('0x88')]||!_0x41184a[_0xb27b('0x89')]){throw new db[(_0xb27b('0x60'))][(_0xb27b('0x52'))](_0xb27b('0x8a'));}_0x3b2c6b=_0x41184a;return getBucketslist(_0x3b2c6b[_0xb27b('0x88')],_0x3b2c6b[_0xb27b('0x89')],_0x244392[_0xb27b('0x7e')]);})[_0xb27b('0x25')](function(_0x1139a5){if(_0x1139a5&&_0x1139a5[_0xb27b('0x8b')]){var _0x193f80=_[_0xb27b('0x45')](_0x1139a5[_0xb27b('0x8b')],function(_0x24dc21){return _0x24dc21[_0xb27b('0x8c')]===_0x244392[_0xb27b('0x6e')];});if(!_0x193f80){logger[_0xb27b('0x63')](util[_0xb27b('0x32')](_0xb27b('0x8d'),_0x294bc7[_0xb27b('0x48')]['id'],_0x244392[_0xb27b('0x6e')]));return createBucket(_0x3b2c6b[_0xb27b('0x88')],_0x3b2c6b[_0xb27b('0x89')],_0x244392[_0xb27b('0x7e')],_0x244392[_0xb27b('0x6e')]);}logger[_0xb27b('0x63')](util['format'](_0xb27b('0x8e'),_0x294bc7[_0xb27b('0x48')]['id'],_0x244392[_0xb27b('0x6e')]));return;}})[_0xb27b('0x25')](function(_0xc8d4e9){if(_0x1bc87b[_0xb27b('0x76')]===_0xb27b('0x8f')){return transcribe(_0x294bc7[_0xb27b('0x48')]['id'],_0x3b2c6b[_0xb27b('0x88')],_0x3b2c6b[_0xb27b('0x89')],_0x244392['transcribeRegion'],_0x244392[_0xb27b('0x6e')],_0x1bc87b[_0xb27b('0x4c')],_0x244392['language']);}else{logger[_0xb27b('0x63')](util[_0xb27b('0x32')]('[RUNTRANSCRIPT][%d]\x20Transcript\x20action\x20already\x20requested',_0x294bc7[_0xb27b('0x48')]['id']));return{'transcribeStatus':_0xb27b('0x90')};}})[_0xb27b('0x25')](function(_0x153bdd){if(_0x153bdd){_0x153bdd[_0xb27b('0x91')]=_0x294bc7['body'][_0xb27b('0x81')];return _0x1bc87b['updateAttributes'](_0x153bdd);}})[_0xb27b('0x25')](respondWithResult(_0x348755,null))[_0xb27b('0x41')](handleError(_0x348755,null));};function writeFile(_0x99a63d,_0x3338d7){return new Promise(function(_0x5c9b27,_0x42383f){fs[_0xb27b('0x92')](_0x3338d7,_0x99a63d,function(_0x587420,_0x4f5aa5){if(_0x587420){return _0x42383f(_0x587420);}else{return _0x5c9b27(_0x4f5aa5);}});});}exports['downloadTranscribe']=function(_0x17840c,_0x429159,_0x1e8bd5){return db['VoiceRecording'][_0xb27b('0x79')]({'where':{'id':_0x17840c[_0xb27b('0x48')]['id']}})[_0xb27b('0x25')](handleEntityNotFound(_0x429159))[_0xb27b('0x25')](function(_0x1ae5ee){if(_0x1ae5ee&&_0x1ae5ee[_0xb27b('0x93')]){var _0x5182ad=_0x1ae5ee[_0xb27b('0x93')];var _0x9fe26c=config[_0xb27b('0x94')]+_0xb27b('0x95')+_0x1ae5ee['id']+_0xb27b('0x96');if(fs[_0xb27b('0x51')](_0x9fe26c)){return _0x9fe26c;}return writeFile(_0x5182ad,_0x9fe26c)[_0xb27b('0x25')](function(){return _0x9fe26c;});}else{throw new db['Sequelize']['ValidationError'](_0xb27b('0x97'));}})[_0xb27b('0x25')](function(_0xa2da14){return _0x429159[_0xb27b('0x54')](_0xa2da14);})[_0xb27b('0x41')](handleError(_0x429159));};
\ No newline at end of file
index 5760696..b785aea 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb4e6=['./voiceRecording.attributes','exports','define','VoiceRecording','uniqueid','transcribeStatus'];(function(_0x285339,_0x328c11){var _0x5a4811=function(_0x1bf480){while(--_0x1bf480){_0x285339['push'](_0x285339['shift']());}};_0x5a4811(++_0x328c11);}(_0xb4e6,0xd8));var _0x6b4e=function(_0x3f0b30,_0x159bc8){_0x3f0b30=_0x3f0b30-0x0;var _0x2748a5=_0xb4e6[_0x3f0b30];return _0x2748a5;};'use strict';var attributes=require(_0x6b4e('0x0'));module[_0x6b4e('0x1')]=function(_0x3c385b,_0x9babca){return _0x3c385b[_0x6b4e('0x2')](_0x6b4e('0x3'),attributes,{'tableName':'voice_recordings','paranoid':![],'indexes':[{'name':_0x6b4e('0x4'),'fields':['uniqueid']},{'name':_0x6b4e('0x5'),'fields':[_0x6b4e('0x5')]}],'timestamps':!![]});};
\ No newline at end of file
+var _0x4f6f=['transcribeStatus','./voiceRecording.attributes','exports','define','voice_recordings','uniqueid'];(function(_0x3220bb,_0x342a03){var _0x23415c=function(_0x56cc05){while(--_0x56cc05){_0x3220bb['push'](_0x3220bb['shift']());}};_0x23415c(++_0x342a03);}(_0x4f6f,0x157));var _0xf4f6=function(_0x1a1b6e,_0x3a07a9){_0x1a1b6e=_0x1a1b6e-0x0;var _0x571e2c=_0x4f6f[_0x1a1b6e];return _0x571e2c;};'use strict';var attributes=require(_0xf4f6('0x0'));module[_0xf4f6('0x1')]=function(_0x2c5690,_0x4b6f0f){return _0x2c5690[_0xf4f6('0x2')]('VoiceRecording',attributes,{'tableName':_0xf4f6('0x3'),'paranoid':![],'indexes':[{'name':_0xf4f6('0x4'),'fields':['uniqueid']},{'name':_0xf4f6('0x5'),'fields':[_0xf4f6('0x5')]}],'timestamps':!![]});};
\ No newline at end of file
index b0f0108..509d4e7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x323f=['UpdateVoiceRecording','VoiceRecording','body','options','raw','where','attributes','limit','catch','CreateVoiceRecording','Setting','findOne','callRecordingEncryption','create','existsSync','value','%s.cypher','encryptFile','secrets','unlink','CreateVoiceRecording\x20file\x20encrypted','util','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','request','then','info','VoiceRecording,\x20%s,\x20%s','request\x20sent','debug','VoiceRecording,\x20%s,\x20%s,\x20%s','stringify','error','message','result'];(function(_0x5023e4,_0x279e17){var _0x390bb1=function(_0x54c4ba){while(--_0x54c4ba){_0x5023e4['push'](_0x5023e4['shift']());}};_0x390bb1(++_0x279e17);}(_0x323f,0x1ee));var _0xf323=function(_0x5c351c,_0x2046d8){_0x5c351c=_0x5c351c-0x0;var _0x26f3b3=_0x323f[_0x5c351c];return _0x26f3b3;};'use strict';var _=require('lodash');var util=require(_0xf323('0x0'));var moment=require('moment');var BPromise=require(_0xf323('0x1'));var rs=require(_0xf323('0x2'));var fs=require('fs');var Redis=require(_0xf323('0x3'));var db=require(_0xf323('0x4'))['db'];var utils=require(_0xf323('0x5'));var logger=require(_0xf323('0x6'))(_0xf323('0x7'));var config=require(_0xf323('0x8'));var jayson=require(_0xf323('0x9'));var client=jayson[_0xf323('0xa')]['http']({'port':0x232a});function respondWithRpcPromise(_0xb9a667,_0x444cba,_0x1af70d){return new BPromise(function(_0x2c8271,_0x8abeac){return client[_0xf323('0xb')](_0xb9a667,_0x1af70d)[_0xf323('0xc')](function(_0x2b24a2){logger[_0xf323('0xd')](_0xf323('0xe'),_0x444cba,_0xf323('0xf'));logger[_0xf323('0x10')](_0xf323('0x11'),_0x444cba,_0xf323('0xf'),JSON[_0xf323('0x12')](_0x2b24a2));if(_0x2b24a2[_0xf323('0x13')]){if(_0x2b24a2[_0xf323('0x13')]['code']===0x1f4){logger[_0xf323('0x13')](_0xf323('0xe'),_0x444cba,_0x2b24a2[_0xf323('0x13')]['message']);return _0x8abeac(_0x2b24a2[_0xf323('0x13')][_0xf323('0x14')]);}logger[_0xf323('0x13')](_0xf323('0xe'),_0x444cba,_0x2b24a2[_0xf323('0x13')][_0xf323('0x14')]);return _0x2c8271(_0x2b24a2['error']['message']);}else{logger[_0xf323('0xd')](_0xf323('0xe'),_0x444cba,_0xf323('0xf'));_0x2c8271(_0x2b24a2[_0xf323('0x15')][_0xf323('0x14')]);}})['catch'](function(_0xd6c25){logger[_0xf323('0x13')](_0xf323('0xe'),_0x444cba,_0xd6c25);_0x8abeac(_0xd6c25);});});}exports[_0xf323('0x16')]=function(_0x49b115){var _0x2db977=this;return new Promise(function(_0x272aec,_0x1a459d){return db[_0xf323('0x17')]['update'](_0x49b115[_0xf323('0x18')],{'raw':_0x49b115[_0xf323('0x19')]?_0x49b115['options'][_0xf323('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x49b115[_0xf323('0x19')]?_0x49b115[_0xf323('0x19')][_0xf323('0x1b')]||null:null,'attributes':_0x49b115['options']?_0x49b115[_0xf323('0x19')][_0xf323('0x1c')]||null:null,'limit':_0x49b115[_0xf323('0x19')]?_0x49b115['options'][_0xf323('0x1d')]||null:null})[_0xf323('0xc')](function(_0x3e1c49){logger[_0xf323('0xd')](_0xf323('0x16'),_0x49b115);logger[_0xf323('0x10')](_0xf323('0x16'),_0x49b115,JSON[_0xf323('0x12')](_0x3e1c49));_0x272aec(_0x3e1c49);})[_0xf323('0x1e')](function(_0x47fb15){logger[_0xf323('0x13')](_0xf323('0x16'),_0x47fb15[_0xf323('0x14')],_0x49b115);_0x1a459d(_0x2db977[_0xf323('0x13')](0x1f4,_0x47fb15[_0xf323('0x14')]));});});};exports[_0xf323('0x1f')]=function(_0x4d737d){var _0x30ed93=this;return new Promise(function(_0x56ce33,_0x1570d4){var _0x3902eb=require('../../components/encryptor');var _0x46663b;return db[_0xf323('0x20')][_0xf323('0x21')]({'attributes':['id',_0xf323('0x22')],'where':{'id':0x1},'raw':!![]})[_0xf323('0xc')](function(_0x5b8b60){_0x46663b=_0x5b8b60;return db[_0xf323('0x17')][_0xf323('0x23')](_0x4d737d[_0xf323('0x18')]);})[_0xf323('0xc')](function(_0x4260f3){if(_0x46663b[_0xf323('0x22')]&&fs[_0xf323('0x24')](_0x4260f3[_0xf323('0x25')])){var _0x139adc=util['format'](_0xf323('0x26'),_0x4260f3[_0xf323('0x25')]);return _0x3902eb[_0xf323('0x27')](_0x4260f3[_0xf323('0x25')],_0x139adc,config[_0xf323('0x28')]['recording'])[_0xf323('0xc')](function(){fs[_0xf323('0x29')](_0x4260f3[_0xf323('0x25')]);logger[_0xf323('0xd')](_0xf323('0x2a'));return _0x4260f3;});}return _0x4260f3;})['then'](function(_0x33487c){logger[_0xf323('0xd')](_0xf323('0x1f'),_0x4d737d);logger[_0xf323('0x10')]('CreateVoiceRecording',_0x4d737d,JSON[_0xf323('0x12')](_0x33487c));_0x56ce33(_0x33487c);})['catch'](function(_0x372c47){logger[_0xf323('0x13')]('CreateVoiceRecording',_0x372c47[_0xf323('0x14')],_0x4d737d);_0x1570d4(_0x30ed93['error'](0x1f4,_0x372c47[_0xf323('0x14')]));});});};
\ No newline at end of file
+var _0x2542=['catch','lodash','util','moment','bluebird','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','http','request','then','info','VoiceRecording,\x20%s,\x20%s','debug','VoiceRecording,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','UpdateVoiceRecording','update','body','options','raw','where','limit','../../components/encryptor','Setting','callRecordingEncryption','VoiceRecording','create','existsSync','value','format','%s.cypher','encryptFile','secrets','recording','unlink','CreateVoiceRecording\x20file\x20encrypted','CreateVoiceRecording'];(function(_0x2a1b62,_0xeb1a53){var _0x3b8951=function(_0x4824d5){while(--_0x4824d5){_0x2a1b62['push'](_0x2a1b62['shift']());}};_0x3b8951(++_0xeb1a53);}(_0x2542,0x169));var _0x2254=function(_0x378a51,_0x125d4){_0x378a51=_0x378a51-0x0;var _0x18c1e5=_0x2542[_0x378a51];return _0x18c1e5;};'use strict';var _=require(_0x2254('0x0'));var util=require(_0x2254('0x1'));var moment=require(_0x2254('0x2'));var BPromise=require(_0x2254('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x2254('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x2254('0x5'));var logger=require(_0x2254('0x6'))(_0x2254('0x7'));var config=require(_0x2254('0x8'));var jayson=require(_0x2254('0x9'));var client=jayson['client'][_0x2254('0xa')]({'port':0x232a});function respondWithRpcPromise(_0xe8ca50,_0x2ee7ee,_0x3c45ec){return new BPromise(function(_0x1637ad,_0x477b47){return client[_0x2254('0xb')](_0xe8ca50,_0x3c45ec)[_0x2254('0xc')](function(_0xb395da){logger[_0x2254('0xd')](_0x2254('0xe'),_0x2ee7ee,'request\x20sent');logger[_0x2254('0xf')](_0x2254('0x10'),_0x2ee7ee,_0x2254('0x11'),JSON[_0x2254('0x12')](_0xb395da));if(_0xb395da['error']){if(_0xb395da['error'][_0x2254('0x13')]===0x1f4){logger[_0x2254('0x14')](_0x2254('0xe'),_0x2ee7ee,_0xb395da[_0x2254('0x14')][_0x2254('0x15')]);return _0x477b47(_0xb395da[_0x2254('0x14')]['message']);}logger[_0x2254('0x14')](_0x2254('0xe'),_0x2ee7ee,_0xb395da['error'][_0x2254('0x15')]);return _0x1637ad(_0xb395da[_0x2254('0x14')][_0x2254('0x15')]);}else{logger[_0x2254('0xd')](_0x2254('0xe'),_0x2ee7ee,_0x2254('0x11'));_0x1637ad(_0xb395da['result'][_0x2254('0x15')]);}})['catch'](function(_0x327d6d){logger[_0x2254('0x14')](_0x2254('0xe'),_0x2ee7ee,_0x327d6d);_0x477b47(_0x327d6d);});});}exports[_0x2254('0x16')]=function(_0x1ae11e){var _0x34f90e=this;return new Promise(function(_0x497724,_0x51b395){return db['VoiceRecording'][_0x2254('0x17')](_0x1ae11e[_0x2254('0x18')],{'raw':_0x1ae11e[_0x2254('0x19')]?_0x1ae11e[_0x2254('0x19')][_0x2254('0x1a')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1ae11e[_0x2254('0x19')]?_0x1ae11e['options'][_0x2254('0x1b')]||null:null,'attributes':_0x1ae11e[_0x2254('0x19')]?_0x1ae11e[_0x2254('0x19')]['attributes']||null:null,'limit':_0x1ae11e['options']?_0x1ae11e['options'][_0x2254('0x1c')]||null:null})[_0x2254('0xc')](function(_0xf88b56){logger['info']('UpdateVoiceRecording',_0x1ae11e);logger['debug']('UpdateVoiceRecording',_0x1ae11e,JSON['stringify'](_0xf88b56));_0x497724(_0xf88b56);})['catch'](function(_0x1aa71f){logger[_0x2254('0x14')](_0x2254('0x16'),_0x1aa71f[_0x2254('0x15')],_0x1ae11e);_0x51b395(_0x34f90e[_0x2254('0x14')](0x1f4,_0x1aa71f[_0x2254('0x15')]));});});};exports['CreateVoiceRecording']=function(_0x4a8274){var _0x1ada42=this;return new Promise(function(_0x4f6877,_0x35608a){var _0x141dc5=require(_0x2254('0x1d'));var _0x3aa0bd;return db[_0x2254('0x1e')]['findOne']({'attributes':['id',_0x2254('0x1f')],'where':{'id':0x1},'raw':!![]})[_0x2254('0xc')](function(_0x21285d){_0x3aa0bd=_0x21285d;return db[_0x2254('0x20')][_0x2254('0x21')](_0x4a8274[_0x2254('0x18')]);})[_0x2254('0xc')](function(_0x22e791){if(_0x3aa0bd[_0x2254('0x1f')]&&fs[_0x2254('0x22')](_0x22e791[_0x2254('0x23')])){var _0xad7774=util[_0x2254('0x24')](_0x2254('0x25'),_0x22e791[_0x2254('0x23')]);return _0x141dc5[_0x2254('0x26')](_0x22e791[_0x2254('0x23')],_0xad7774,config[_0x2254('0x27')][_0x2254('0x28')])['then'](function(){fs[_0x2254('0x29')](_0x22e791[_0x2254('0x23')]);logger[_0x2254('0xd')](_0x2254('0x2a'));return _0x22e791;});}return _0x22e791;})[_0x2254('0xc')](function(_0x1d275b){logger[_0x2254('0xd')](_0x2254('0x2b'),_0x4a8274);logger[_0x2254('0xf')]('CreateVoiceRecording',_0x4a8274,JSON[_0x2254('0x12')](_0x1d275b));_0x4f6877(_0x1d275b);})[_0x2254('0x2c')](function(_0x503540){logger[_0x2254('0x14')](_0x2254('0x2b'),_0x503540[_0x2254('0x15')],_0x4a8274);_0x35608a(_0x1ada42[_0x2254('0x14')](0x1f4,_0x503540['message']));});});};
\ No newline at end of file
index a38f6d0..5071bbf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfa8b=['post','put','delete','destroy','multer','path','connect-timeout','express','fs-extra','../../config/environment','./voiceTransferReport.controller','get','isAuthenticated','index','/describe','describe'];(function(_0x314bc6,_0x1e99bd){var _0x1449de=function(_0x5a4872){while(--_0x5a4872){_0x314bc6['push'](_0x314bc6['shift']());}};_0x1449de(++_0x1e99bd);}(_0xfa8b,0x1b4));var _0xbfa8=function(_0x602d3f,_0x31c1bd){_0x602d3f=_0x602d3f-0x0;var _0x35be06=_0xfa8b[_0x602d3f];return _0x35be06;};'use strict';var multer=require(_0xbfa8('0x0'));var util=require('util');var path=require(_0xbfa8('0x1'));var timeout=require(_0xbfa8('0x2'));var express=require(_0xbfa8('0x3'));var router=express['Router']();var fs_extra=require(_0xbfa8('0x4'));var auth=require('../../components/auth/service');var interaction=require('../../components/interaction/service');var config=require(_0xbfa8('0x5'));var controller=require(_0xbfa8('0x6'));router[_0xbfa8('0x7')]('/',auth[_0xbfa8('0x8')](),controller[_0xbfa8('0x9')]);router['get'](_0xbfa8('0xa'),auth[_0xbfa8('0x8')](),controller[_0xbfa8('0xb')]);router[_0xbfa8('0x7')]('/:id',auth[_0xbfa8('0x8')](),controller['show']);router[_0xbfa8('0xc')]('/',auth['isAuthenticated'](),controller['create']);router[_0xbfa8('0xd')]('/:id',auth['isAuthenticated'](),controller['update']);router[_0xbfa8('0xe')]('/:id',auth['isAuthenticated'](),controller[_0xbfa8('0xf')]);module['exports']=router;
\ No newline at end of file
+var _0xeaa1=['/:id','update','multer','util','connect-timeout','Router','fs-extra','../../components/interaction/service','./voiceTransferReport.controller','get','index','isAuthenticated','describe','put'];(function(_0x271ec4,_0x2b565c){var _0x389d42=function(_0x3bb8bb){while(--_0x3bb8bb){_0x271ec4['push'](_0x271ec4['shift']());}};_0x389d42(++_0x2b565c);}(_0xeaa1,0xd4));var _0x1eaa=function(_0x23663b,_0x52ae37){_0x23663b=_0x23663b-0x0;var _0x8c4357=_0xeaa1[_0x23663b];return _0x8c4357;};'use strict';var multer=require(_0x1eaa('0x0'));var util=require(_0x1eaa('0x1'));var path=require('path');var timeout=require(_0x1eaa('0x2'));var express=require('express');var router=express[_0x1eaa('0x3')]();var fs_extra=require(_0x1eaa('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x1eaa('0x5'));var config=require('../../config/environment');var controller=require(_0x1eaa('0x6'));router[_0x1eaa('0x7')]('/',auth['isAuthenticated'](),controller[_0x1eaa('0x8')]);router[_0x1eaa('0x7')]('/describe',auth[_0x1eaa('0x9')](),controller[_0x1eaa('0xa')]);router[_0x1eaa('0x7')]('/:id',auth[_0x1eaa('0x9')](),controller['show']);router['post']('/',auth[_0x1eaa('0x9')](),controller['create']);router[_0x1eaa('0xb')](_0x1eaa('0xc'),auth[_0x1eaa('0x9')](),controller[_0x1eaa('0xd')]);router['delete'](_0x1eaa('0xc'),auth[_0x1eaa('0x9')](),controller['destroy']);module['exports']=router;
\ No newline at end of file
index b9e8780..487c00f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd70f=['ENUM','blind','attended','STRING','Yes','sequelize','moment','exports'];(function(_0x2493ec,_0x107ddc){var _0x456a1e=function(_0x3d7dc9){while(--_0x3d7dc9){_0x2493ec['push'](_0x2493ec['shift']());}};_0x456a1e(++_0x107ddc);}(_0xd70f,0x6d));var _0xfd70=function(_0x16a1a3,_0x105876){_0x16a1a3=_0x16a1a3-0x0;var _0x2e43f7=_0xd70f[_0x16a1a3];return _0x2e43f7;};'use strict';var Sequelize=require(_0xfd70('0x0'));var moment=require(_0xfd70('0x1'));module[_0xfd70('0x2')]={'type':{'type':Sequelize[_0xfd70('0x3')](_0xfd70('0x4'),_0xfd70('0x5'))},'result':{'type':Sequelize[_0xfd70('0x6')]},'transfererchannel':{'type':Sequelize['STRING']},'transferercalleridnum':{'type':Sequelize[_0xfd70('0x6')]},'transferercalleridname':{'type':Sequelize[_0xfd70('0x6')]},'transfererconnectedlinenum':{'type':Sequelize['STRING']},'transfererconnectedlinename':{'type':Sequelize[_0xfd70('0x6')]},'transfereraccountcode':{'type':Sequelize[_0xfd70('0x6')]},'transferercontext':{'type':Sequelize[_0xfd70('0x6')]},'transfererexten':{'type':Sequelize[_0xfd70('0x6')]},'transfererlinkedid':{'type':Sequelize['STRING']},'transfereechannel':{'type':Sequelize[_0xfd70('0x6')]},'transfereecalleridnum':{'type':Sequelize[_0xfd70('0x6')]},'transfereecalleridname':{'type':Sequelize[_0xfd70('0x6')]},'transfereeconnectedlinenum':{'type':Sequelize['STRING']},'transfereeconnectedlinename':{'type':Sequelize[_0xfd70('0x6')]},'transfereeaccountcode':{'type':Sequelize[_0xfd70('0x6')]},'transfereecontext':{'type':Sequelize[_0xfd70('0x6')]},'transfereeexten':{'type':Sequelize['STRING']},'transfereelinkedid':{'type':Sequelize[_0xfd70('0x6')]},'isexternal':{'type':Sequelize[_0xfd70('0x3')](_0xfd70('0x7'),'No')},'context':{'type':Sequelize['STRING']},'extension':{'type':Sequelize[_0xfd70('0x6')]}};
\ No newline at end of file
+var _0x40a7=['STRING','Yes','sequelize','moment','ENUM','attended'];(function(_0xf998f1,_0xed2b2f){var _0x211619=function(_0x9ac127){while(--_0x9ac127){_0xf998f1['push'](_0xf998f1['shift']());}};_0x211619(++_0xed2b2f);}(_0x40a7,0x10a));var _0x740a=function(_0x444a51,_0x5c17f7){_0x444a51=_0x444a51-0x0;var _0x103d2f=_0x40a7[_0x444a51];return _0x103d2f;};'use strict';var Sequelize=require(_0x740a('0x0'));var moment=require(_0x740a('0x1'));module['exports']={'type':{'type':Sequelize[_0x740a('0x2')]('blind',_0x740a('0x3'))},'result':{'type':Sequelize[_0x740a('0x4')]},'transfererchannel':{'type':Sequelize[_0x740a('0x4')]},'transferercalleridnum':{'type':Sequelize[_0x740a('0x4')]},'transferercalleridname':{'type':Sequelize['STRING']},'transfererconnectedlinenum':{'type':Sequelize['STRING']},'transfererconnectedlinename':{'type':Sequelize[_0x740a('0x4')]},'transfereraccountcode':{'type':Sequelize[_0x740a('0x4')]},'transferercontext':{'type':Sequelize[_0x740a('0x4')]},'transfererexten':{'type':Sequelize['STRING']},'transfererlinkedid':{'type':Sequelize['STRING']},'transfereechannel':{'type':Sequelize[_0x740a('0x4')]},'transfereecalleridnum':{'type':Sequelize['STRING']},'transfereecalleridname':{'type':Sequelize[_0x740a('0x4')]},'transfereeconnectedlinenum':{'type':Sequelize[_0x740a('0x4')]},'transfereeconnectedlinename':{'type':Sequelize[_0x740a('0x4')]},'transfereeaccountcode':{'type':Sequelize[_0x740a('0x4')]},'transfereecontext':{'type':Sequelize[_0x740a('0x4')]},'transfereeexten':{'type':Sequelize[_0x740a('0x4')]},'transfereelinkedid':{'type':Sequelize[_0x740a('0x4')]},'isexternal':{'type':Sequelize['ENUM'](_0x740a('0x5'),'No')},'context':{'type':Sequelize[_0x740a('0x4')]},'extension':{'type':Sequelize[_0x740a('0x4')]}};
\ No newline at end of file
index 876e6e9..e33d521 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xad57=['order','sort','where','pick','filters','filter','merge','VIRTUAL','options','includeAll','include','catch','params','keys','length','find','create','body','destroy','describe','eml-format','rimraf','zip-dir','moment','bluebird','mustache','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','api','../../config/utils','../../config/environment','../../config/license/util','../../mysqldb','status','limit','undefined','count','offset','json','apply','save','update','then','sendStatus','stack','name','index','VoiceTransferReport','rawAttributes','model','map','query','attributes','intersection','fields','hasOwnProperty'];(function(_0x5dcca6,_0x1672e8){var _0x178cae=function(_0x3f2ef0){while(--_0x3f2ef0){_0x5dcca6['push'](_0x5dcca6['shift']());}};_0x178cae(++_0x1672e8);}(_0xad57,0x1f0));var _0x7ad5=function(_0x477fe7,_0x2fbde3){_0x477fe7=_0x477fe7-0x0;var _0x5f2e04=_0xad57[_0x477fe7];return _0x5f2e04;};'use strict';var emlformat=require(_0x7ad5('0x0'));var rimraf=require(_0x7ad5('0x1'));var zipdir=require(_0x7ad5('0x2'));var jsonpatch=require('fast-json-patch');var rp=require('request-promise');var moment=require(_0x7ad5('0x3'));var BPromise=require(_0x7ad5('0x4'));var Mustache=require(_0x7ad5('0x5'));var util=require('util');var path=require(_0x7ad5('0x6'));var sox=require(_0x7ad5('0x7'));var csv=require(_0x7ad5('0x8'));var ejs=require(_0x7ad5('0x9'));var fs=require('fs');var fs_extra=require(_0x7ad5('0xa'));var _=require(_0x7ad5('0xb'));var squel=require(_0x7ad5('0xc'));var crypto=require(_0x7ad5('0xd'));var jsforce=require(_0x7ad5('0xe'));var deskjs=require('desk.js');var toCsv=require(_0x7ad5('0x8'));var querystring=require(_0x7ad5('0xf'));var Papa=require(_0x7ad5('0x10'));var Redis=require(_0x7ad5('0x11'));var authService=require(_0x7ad5('0x12'));var qs=require(_0x7ad5('0x13'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require('../../config/logger')(_0x7ad5('0x14'));var utils=require(_0x7ad5('0x15'));var config=require(_0x7ad5('0x16'));var licenseUtil=require(_0x7ad5('0x17'));var db=require(_0x7ad5('0x18'))['db'];function respondWithStatusCode(_0x23f191,_0x58316d){_0x58316d=_0x58316d||0xcc;return function(_0x1c2471){if(_0x1c2471){return _0x23f191['sendStatus'](_0x58316d);}return _0x23f191[_0x7ad5('0x19')](_0x58316d)['end']();};}function respondWithResult(_0x3e4c43,_0x4900f){_0x4900f=_0x4900f||0xc8;return function(_0x117e1a){if(_0x117e1a){return _0x3e4c43['status'](_0x4900f)['json'](_0x117e1a);}};}function respondWithFilteredResult(_0x17f70d,_0x471000){return function(_0x5d53d3){if(_0x5d53d3){var _0x9fe79c=typeof _0x471000['offset']==='undefined'&&typeof _0x471000[_0x7ad5('0x1a')]===_0x7ad5('0x1b');var _0x321a4c=_0x5d53d3[_0x7ad5('0x1c')];var _0x236e95=_0x9fe79c?0x0:_0x471000[_0x7ad5('0x1d')];var _0x5c6d8f=_0x9fe79c?_0x5d53d3[_0x7ad5('0x1c')]:_0x471000['offset']+_0x471000['limit'];var _0x512e0e;if(_0x5c6d8f>=_0x321a4c){_0x5c6d8f=_0x321a4c;_0x512e0e=0xc8;}else{_0x512e0e=0xce;}_0x17f70d[_0x7ad5('0x19')](_0x512e0e);return _0x17f70d['set']('Content-Range',_0x236e95+'-'+_0x5c6d8f+'/'+_0x321a4c)[_0x7ad5('0x1e')](_0x5d53d3);}return null;};}function patchUpdates(_0x432336){return function(_0x4044f9){try{jsonpatch[_0x7ad5('0x1f')](_0x4044f9,_0x432336,!![]);}catch(_0x9bd122){return BPromise['reject'](_0x9bd122);}return _0x4044f9[_0x7ad5('0x20')]();};}function saveUpdates(_0x2f0a52,_0x75c98d){return function(_0x141d8e){if(_0x141d8e){return _0x141d8e[_0x7ad5('0x21')](_0x2f0a52)['then'](function(_0x2cae3c){return _0x2cae3c;});}return null;};}function removeEntity(_0x39d701,_0x25506c){return function(_0x33dd00){if(_0x33dd00){return _0x33dd00['destroy']()[_0x7ad5('0x22')](function(){_0x39d701[_0x7ad5('0x19')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4c29b0,_0x442836){return function(_0x46f996){if(!_0x46f996){_0x4c29b0[_0x7ad5('0x23')](0x194);}return _0x46f996;};}function handleError(_0x5b7bfe,_0x445a65){_0x445a65=_0x445a65||0x1f4;return function(_0x324e53){logger['error'](_0x324e53[_0x7ad5('0x24')]);if(_0x324e53[_0x7ad5('0x25')]){delete _0x324e53['name'];}_0x5b7bfe[_0x7ad5('0x19')](_0x445a65)['send'](_0x324e53);};}exports[_0x7ad5('0x26')]=function(_0x321095,_0x1eb048){var _0x273c40={},_0x5436e9={},_0xc2a9be={'count':0x0,'rows':[]};var _0x4e400b=_['map'](db[_0x7ad5('0x27')][_0x7ad5('0x28')],function(_0x46eb21){return{'name':_0x46eb21['fieldName'],'type':_0x46eb21['type']['key']};});_0x5436e9[_0x7ad5('0x29')]=_[_0x7ad5('0x2a')](_0x4e400b,_0x7ad5('0x25'));_0x5436e9[_0x7ad5('0x2b')]=_['keys'](_0x321095['query']);_0x5436e9['filters']=_['intersection'](_0x5436e9[_0x7ad5('0x29')],_0x5436e9[_0x7ad5('0x2b')]);_0x273c40[_0x7ad5('0x2c')]=_[_0x7ad5('0x2d')](_0x5436e9['model'],qs[_0x7ad5('0x2e')](_0x321095[_0x7ad5('0x2b')][_0x7ad5('0x2e')]));_0x273c40[_0x7ad5('0x2c')]=_0x273c40[_0x7ad5('0x2c')]['length']?_0x273c40[_0x7ad5('0x2c')]:_0x5436e9[_0x7ad5('0x29')];if(!_0x321095[_0x7ad5('0x2b')][_0x7ad5('0x2f')]('nolimit')){_0x273c40[_0x7ad5('0x1a')]=qs['limit'](_0x321095[_0x7ad5('0x2b')][_0x7ad5('0x1a')]);_0x273c40['offset']=qs[_0x7ad5('0x1d')](_0x321095[_0x7ad5('0x2b')][_0x7ad5('0x1d')]);}_0x273c40[_0x7ad5('0x30')]=qs[_0x7ad5('0x31')](_0x321095[_0x7ad5('0x2b')][_0x7ad5('0x31')]);_0x273c40[_0x7ad5('0x32')]=qs['filters'](_[_0x7ad5('0x33')](_0x321095[_0x7ad5('0x2b')],_0x5436e9[_0x7ad5('0x34')]),_0x4e400b);if(_0x321095[_0x7ad5('0x2b')][_0x7ad5('0x35')]){_0x273c40[_0x7ad5('0x32')]=_[_0x7ad5('0x36')](_0x273c40[_0x7ad5('0x32')],{'$or':_[_0x7ad5('0x2a')](_0x4e400b,function(_0x133107){if(_0x133107['type']!==_0x7ad5('0x37')){var _0x1ba227={};_0x1ba227[_0x133107[_0x7ad5('0x25')]]={'$like':'%'+_0x321095[_0x7ad5('0x2b')][_0x7ad5('0x35')]+'%'};return _0x1ba227;}})});}_0x273c40=_[_0x7ad5('0x36')]({},_0x273c40,_0x321095[_0x7ad5('0x38')]);var _0x469a4c={'where':_0x273c40['where']};return db[_0x7ad5('0x27')]['count'](_0x469a4c)[_0x7ad5('0x22')](function(_0x10aeb7){_0xc2a9be[_0x7ad5('0x1c')]=_0x10aeb7;if(_0x321095['query'][_0x7ad5('0x39')]){_0x273c40[_0x7ad5('0x3a')]=[{'all':!![]}];}return db['VoiceTransferReport']['findAll'](_0x273c40);})[_0x7ad5('0x22')](function(_0x1b72e8){_0xc2a9be['rows']=_0x1b72e8;return _0xc2a9be;})[_0x7ad5('0x22')](respondWithFilteredResult(_0x1eb048,_0x273c40))[_0x7ad5('0x3b')](handleError(_0x1eb048,null));};exports['show']=function(_0x50f31b,_0x3066a5){var _0x361b24={'raw':!![],'where':{'id':_0x50f31b[_0x7ad5('0x3c')]['id']}},_0x5d645b={};_0x5d645b[_0x7ad5('0x29')]=_[_0x7ad5('0x3d')](db[_0x7ad5('0x27')][_0x7ad5('0x28')]);_0x5d645b[_0x7ad5('0x2b')]=_[_0x7ad5('0x3d')](_0x50f31b[_0x7ad5('0x2b')]);_0x5d645b[_0x7ad5('0x34')]=_[_0x7ad5('0x2d')](_0x5d645b[_0x7ad5('0x29')],_0x5d645b[_0x7ad5('0x2b')]);_0x361b24[_0x7ad5('0x2c')]=_[_0x7ad5('0x2d')](_0x5d645b[_0x7ad5('0x29')],qs['fields'](_0x50f31b['query'][_0x7ad5('0x2e')]));_0x361b24[_0x7ad5('0x2c')]=_0x361b24[_0x7ad5('0x2c')][_0x7ad5('0x3e')]?_0x361b24[_0x7ad5('0x2c')]:_0x5d645b[_0x7ad5('0x29')];if(_0x50f31b[_0x7ad5('0x2b')][_0x7ad5('0x39')]){_0x361b24['include']=[{'all':!![]}];}_0x361b24=_[_0x7ad5('0x36')]({},_0x361b24,_0x50f31b[_0x7ad5('0x38')]);return db[_0x7ad5('0x27')][_0x7ad5('0x3f')](_0x361b24)[_0x7ad5('0x22')](handleEntityNotFound(_0x3066a5,null))[_0x7ad5('0x22')](respondWithResult(_0x3066a5,null))[_0x7ad5('0x3b')](handleError(_0x3066a5,null));};exports[_0x7ad5('0x40')]=function(_0x3f4e26,_0x3fd1cf){return db[_0x7ad5('0x27')][_0x7ad5('0x40')](_0x3f4e26[_0x7ad5('0x41')],{})[_0x7ad5('0x22')](respondWithResult(_0x3fd1cf,0xc9))[_0x7ad5('0x3b')](handleError(_0x3fd1cf,null));};exports[_0x7ad5('0x21')]=function(_0x2c4c4f,_0x1d4b57){if(_0x2c4c4f['body']['id']){delete _0x2c4c4f[_0x7ad5('0x41')]['id'];}return db[_0x7ad5('0x27')]['find']({'where':{'id':_0x2c4c4f['params']['id']}})[_0x7ad5('0x22')](handleEntityNotFound(_0x1d4b57,null))[_0x7ad5('0x22')](saveUpdates(_0x2c4c4f[_0x7ad5('0x41')],null))[_0x7ad5('0x22')](respondWithResult(_0x1d4b57,null))[_0x7ad5('0x3b')](handleError(_0x1d4b57,null));};exports[_0x7ad5('0x42')]=function(_0x271f51,_0x1d551d){return db[_0x7ad5('0x27')]['find']({'where':{'id':_0x271f51[_0x7ad5('0x3c')]['id']}})[_0x7ad5('0x22')](handleEntityNotFound(_0x1d551d,null))['then'](removeEntity(_0x1d551d,null))['catch'](handleError(_0x1d551d,null));};exports[_0x7ad5('0x43')]=function(_0x2d39e0,_0x41a8fb){return db[_0x7ad5('0x27')][_0x7ad5('0x43')]()[_0x7ad5('0x22')](respondWithResult(_0x41a8fb,null))[_0x7ad5('0x3b')](handleError(_0x41a8fb,null));};
\ No newline at end of file
+var _0x2cae=['keys','filters','intersection','attributes','fields','order','sort','filter','where','merge','VIRTUAL','options','VoiceTransferReport','includeAll','include','rows','catch','show','params','length','find','create','body','describe','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','lodash','squel','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','undefined','count','offset','limit','set','Content-Range','save','update','then','destroy','stack','name','map','rawAttributes','fieldName','type','key','model','query'];(function(_0x5c91e1,_0x18aaa5){var _0x1406b5=function(_0xd06e5f){while(--_0xd06e5f){_0x5c91e1['push'](_0x5c91e1['shift']());}};_0x1406b5(++_0x18aaa5);}(_0x2cae,0x1d4));var _0xe2ca=function(_0x1caf6a,_0x26a5bf){_0x1caf6a=_0x1caf6a-0x0;var _0x1bf493=_0x2cae[_0x1caf6a];return _0x1bf493;};'use strict';var emlformat=require(_0xe2ca('0x0'));var rimraf=require(_0xe2ca('0x1'));var zipdir=require(_0xe2ca('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe2ca('0x3'));var moment=require('moment');var BPromise=require(_0xe2ca('0x4'));var Mustache=require(_0xe2ca('0x5'));var util=require(_0xe2ca('0x6'));var path=require(_0xe2ca('0x7'));var sox=require(_0xe2ca('0x8'));var csv=require(_0xe2ca('0x9'));var ejs=require(_0xe2ca('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xe2ca('0xb'));var squel=require(_0xe2ca('0xc'));var crypto=require('crypto');var jsforce=require(_0xe2ca('0xd'));var deskjs=require(_0xe2ca('0xe'));var toCsv=require('to-csv');var querystring=require(_0xe2ca('0xf'));var Papa=require(_0xe2ca('0x10'));var Redis=require(_0xe2ca('0x11'));var authService=require(_0xe2ca('0x12'));var qs=require(_0xe2ca('0x13'));var as=require(_0xe2ca('0x14'));var hardwareService=require(_0xe2ca('0x15'));var logger=require(_0xe2ca('0x16'))(_0xe2ca('0x17'));var utils=require(_0xe2ca('0x18'));var config=require(_0xe2ca('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0xe2ca('0x1a'))['db'];function respondWithStatusCode(_0x48fd5f,_0x3d7350){_0x3d7350=_0x3d7350||0xcc;return function(_0x28bad9){if(_0x28bad9){return _0x48fd5f[_0xe2ca('0x1b')](_0x3d7350);}return _0x48fd5f['status'](_0x3d7350)[_0xe2ca('0x1c')]();};}function respondWithResult(_0x4c290a,_0x5a74b1){_0x5a74b1=_0x5a74b1||0xc8;return function(_0x5a5d06){if(_0x5a5d06){return _0x4c290a[_0xe2ca('0x1d')](_0x5a74b1)[_0xe2ca('0x1e')](_0x5a5d06);}};}function respondWithFilteredResult(_0x267040,_0xf8683){return function(_0x3a94cd){if(_0x3a94cd){var _0x3000c1=typeof _0xf8683['offset']===_0xe2ca('0x1f')&&typeof _0xf8683['limit']===_0xe2ca('0x1f');var _0x360f4f=_0x3a94cd[_0xe2ca('0x20')];var _0x1c7f1c=_0x3000c1?0x0:_0xf8683[_0xe2ca('0x21')];var _0x146194=_0x3000c1?_0x3a94cd[_0xe2ca('0x20')]:_0xf8683[_0xe2ca('0x21')]+_0xf8683[_0xe2ca('0x22')];var _0x8751f6;if(_0x146194>=_0x360f4f){_0x146194=_0x360f4f;_0x8751f6=0xc8;}else{_0x8751f6=0xce;}_0x267040[_0xe2ca('0x1d')](_0x8751f6);return _0x267040[_0xe2ca('0x23')](_0xe2ca('0x24'),_0x1c7f1c+'-'+_0x146194+'/'+_0x360f4f)[_0xe2ca('0x1e')](_0x3a94cd);}return null;};}function patchUpdates(_0x96300b){return function(_0x207432){try{jsonpatch['apply'](_0x207432,_0x96300b,!![]);}catch(_0x59c4d2){return BPromise['reject'](_0x59c4d2);}return _0x207432[_0xe2ca('0x25')]();};}function saveUpdates(_0x4d9c4a,_0x4a2f3d){return function(_0x87f083){if(_0x87f083){return _0x87f083[_0xe2ca('0x26')](_0x4d9c4a)[_0xe2ca('0x27')](function(_0x1a9b1b){return _0x1a9b1b;});}return null;};}function removeEntity(_0x1b5588,_0x3cb81b){return function(_0x2fb542){if(_0x2fb542){return _0x2fb542[_0xe2ca('0x28')]()['then'](function(){_0x1b5588[_0xe2ca('0x1d')](0xcc)[_0xe2ca('0x1c')]();});}};}function handleEntityNotFound(_0x279c64,_0x3cf469){return function(_0x172905){if(!_0x172905){_0x279c64[_0xe2ca('0x1b')](0x194);}return _0x172905;};}function handleError(_0x1aa271,_0xe66c38){_0xe66c38=_0xe66c38||0x1f4;return function(_0x405ad5){logger['error'](_0x405ad5[_0xe2ca('0x29')]);if(_0x405ad5[_0xe2ca('0x2a')]){delete _0x405ad5[_0xe2ca('0x2a')];}_0x1aa271['status'](_0xe66c38)['send'](_0x405ad5);};}exports['index']=function(_0x3e9192,_0x506fb3){var _0x42efac={},_0xb03e06={},_0x37f0b3={'count':0x0,'rows':[]};var _0xdd9b11=_[_0xe2ca('0x2b')](db['VoiceTransferReport'][_0xe2ca('0x2c')],function(_0x443c65){return{'name':_0x443c65[_0xe2ca('0x2d')],'type':_0x443c65[_0xe2ca('0x2e')][_0xe2ca('0x2f')]};});_0xb03e06[_0xe2ca('0x30')]=_['map'](_0xdd9b11,_0xe2ca('0x2a'));_0xb03e06[_0xe2ca('0x31')]=_[_0xe2ca('0x32')](_0x3e9192[_0xe2ca('0x31')]);_0xb03e06[_0xe2ca('0x33')]=_[_0xe2ca('0x34')](_0xb03e06[_0xe2ca('0x30')],_0xb03e06[_0xe2ca('0x31')]);_0x42efac[_0xe2ca('0x35')]=_['intersection'](_0xb03e06[_0xe2ca('0x30')],qs[_0xe2ca('0x36')](_0x3e9192[_0xe2ca('0x31')]['fields']));_0x42efac[_0xe2ca('0x35')]=_0x42efac[_0xe2ca('0x35')]['length']?_0x42efac[_0xe2ca('0x35')]:_0xb03e06[_0xe2ca('0x30')];if(!_0x3e9192[_0xe2ca('0x31')]['hasOwnProperty']('nolimit')){_0x42efac[_0xe2ca('0x22')]=qs[_0xe2ca('0x22')](_0x3e9192[_0xe2ca('0x31')]['limit']);_0x42efac[_0xe2ca('0x21')]=qs['offset'](_0x3e9192[_0xe2ca('0x31')]['offset']);}_0x42efac[_0xe2ca('0x37')]=qs['sort'](_0x3e9192[_0xe2ca('0x31')][_0xe2ca('0x38')]);_0x42efac['where']=qs[_0xe2ca('0x33')](_['pick'](_0x3e9192[_0xe2ca('0x31')],_0xb03e06[_0xe2ca('0x33')]),_0xdd9b11);if(_0x3e9192['query'][_0xe2ca('0x39')]){_0x42efac[_0xe2ca('0x3a')]=_[_0xe2ca('0x3b')](_0x42efac[_0xe2ca('0x3a')],{'$or':_[_0xe2ca('0x2b')](_0xdd9b11,function(_0x53dd88){if(_0x53dd88[_0xe2ca('0x2e')]!==_0xe2ca('0x3c')){var _0x433eb9={};_0x433eb9[_0x53dd88['name']]={'$like':'%'+_0x3e9192[_0xe2ca('0x31')]['filter']+'%'};return _0x433eb9;}})});}_0x42efac=_['merge']({},_0x42efac,_0x3e9192[_0xe2ca('0x3d')]);var _0x122268={'where':_0x42efac['where']};return db[_0xe2ca('0x3e')]['count'](_0x122268)[_0xe2ca('0x27')](function(_0x4d6b87){_0x37f0b3[_0xe2ca('0x20')]=_0x4d6b87;if(_0x3e9192[_0xe2ca('0x31')][_0xe2ca('0x3f')]){_0x42efac[_0xe2ca('0x40')]=[{'all':!![]}];}return db[_0xe2ca('0x3e')]['findAll'](_0x42efac);})[_0xe2ca('0x27')](function(_0x38c403){_0x37f0b3[_0xe2ca('0x41')]=_0x38c403;return _0x37f0b3;})[_0xe2ca('0x27')](respondWithFilteredResult(_0x506fb3,_0x42efac))[_0xe2ca('0x42')](handleError(_0x506fb3,null));};exports[_0xe2ca('0x43')]=function(_0x2eaad0,_0x52d062){var _0x358f32={'raw':!![],'where':{'id':_0x2eaad0[_0xe2ca('0x44')]['id']}},_0x565cb3={};_0x565cb3[_0xe2ca('0x30')]=_[_0xe2ca('0x32')](db['VoiceTransferReport']['rawAttributes']);_0x565cb3[_0xe2ca('0x31')]=_[_0xe2ca('0x32')](_0x2eaad0[_0xe2ca('0x31')]);_0x565cb3[_0xe2ca('0x33')]=_[_0xe2ca('0x34')](_0x565cb3['model'],_0x565cb3[_0xe2ca('0x31')]);_0x358f32['attributes']=_['intersection'](_0x565cb3[_0xe2ca('0x30')],qs[_0xe2ca('0x36')](_0x2eaad0['query'][_0xe2ca('0x36')]));_0x358f32['attributes']=_0x358f32[_0xe2ca('0x35')][_0xe2ca('0x45')]?_0x358f32['attributes']:_0x565cb3['model'];if(_0x2eaad0[_0xe2ca('0x31')][_0xe2ca('0x3f')]){_0x358f32[_0xe2ca('0x40')]=[{'all':!![]}];}_0x358f32=_[_0xe2ca('0x3b')]({},_0x358f32,_0x2eaad0[_0xe2ca('0x3d')]);return db[_0xe2ca('0x3e')][_0xe2ca('0x46')](_0x358f32)[_0xe2ca('0x27')](handleEntityNotFound(_0x52d062,null))[_0xe2ca('0x27')](respondWithResult(_0x52d062,null))[_0xe2ca('0x42')](handleError(_0x52d062,null));};exports[_0xe2ca('0x47')]=function(_0x61ad17,_0x374a00){return db['VoiceTransferReport'][_0xe2ca('0x47')](_0x61ad17[_0xe2ca('0x48')],{})['then'](respondWithResult(_0x374a00,0xc9))[_0xe2ca('0x42')](handleError(_0x374a00,null));};exports[_0xe2ca('0x26')]=function(_0x2a9762,_0x5295d0){if(_0x2a9762[_0xe2ca('0x48')]['id']){delete _0x2a9762[_0xe2ca('0x48')]['id'];}return db[_0xe2ca('0x3e')]['find']({'where':{'id':_0x2a9762[_0xe2ca('0x44')]['id']}})['then'](handleEntityNotFound(_0x5295d0,null))['then'](saveUpdates(_0x2a9762[_0xe2ca('0x48')],null))[_0xe2ca('0x27')](respondWithResult(_0x5295d0,null))[_0xe2ca('0x42')](handleError(_0x5295d0,null));};exports['destroy']=function(_0x51632c,_0x591966){return db[_0xe2ca('0x3e')][_0xe2ca('0x46')]({'where':{'id':_0x51632c['params']['id']}})[_0xe2ca('0x27')](handleEntityNotFound(_0x591966,null))['then'](removeEntity(_0x591966,null))[_0xe2ca('0x42')](handleError(_0x591966,null));};exports['describe']=function(_0x5f2053,_0x3a7a12){return db[_0xe2ca('0x3e')][_0xe2ca('0x49')]()[_0xe2ca('0x27')](respondWithResult(_0x3a7a12,null))[_0xe2ca('0x42')](handleError(_0x3a7a12,null));};
\ No newline at end of file
index 9ddef70..3391eef 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x020c=['VoiceTransferReport','report_call_transfer','lodash','../../config/logger','api','moment','bluebird','path','rimraf','../../config/environment','./voiceTransferReport.attributes','exports','define'];(function(_0x49c653,_0x390195){var _0x31e169=function(_0x3684ac){while(--_0x3684ac){_0x49c653['push'](_0x49c653['shift']());}};_0x31e169(++_0x390195);}(_0x020c,0x120));var _0xc020=function(_0x3d7d54,_0xa79219){_0x3d7d54=_0x3d7d54-0x0;var _0x3482de=_0x020c[_0x3d7d54];return _0x3482de;};'use strict';var _=require(_0xc020('0x0'));var util=require('util');var logger=require(_0xc020('0x1'))(_0xc020('0x2'));var moment=require(_0xc020('0x3'));var BPromise=require(_0xc020('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc020('0x5'));var rimraf=require(_0xc020('0x6'));var config=require(_0xc020('0x7'));var attributes=require(_0xc020('0x8'));module[_0xc020('0x9')]=function(_0x38c78d,_0xd561be){return _0x38c78d[_0xc020('0xa')](_0xc020('0xb'),attributes,{'tableName':_0xc020('0xc'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x46fd=['util','../../config/logger','api','moment','path','rimraf','../../config/environment','exports','report_call_transfer','lodash'];(function(_0x2ec2d4,_0x2c73f9){var _0x5c35c4=function(_0x413355){while(--_0x413355){_0x2ec2d4['push'](_0x2ec2d4['shift']());}};_0x5c35c4(++_0x2c73f9);}(_0x46fd,0x149));var _0xd46f=function(_0x4a9fb1,_0x273043){_0x4a9fb1=_0x4a9fb1-0x0;var _0x348672=_0x46fd[_0x4a9fb1];return _0x348672;};'use strict';var _=require(_0xd46f('0x0'));var util=require(_0xd46f('0x1'));var logger=require(_0xd46f('0x2'))(_0xd46f('0x3'));var moment=require(_0xd46f('0x4'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require(_0xd46f('0x5'));var rimraf=require(_0xd46f('0x6'));var config=require(_0xd46f('0x7'));var attributes=require('./voiceTransferReport.attributes');module[_0xd46f('0x8')]=function(_0x27a2ca,_0x944a81){return _0x27a2ca['define']('VoiceTransferReport',attributes,{'tableName':_0xd46f('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 09545be..0cc368e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x487e=['../../mysqldb','../../config/utils','rpc','client','http','request','then','info','request\x20sent','debug','VoiceTransferReport,\x20%s,\x20%s,\x20%s','error','code','message','VoiceTransferReport,\x20%s,\x20%s','result','catch','CreateVoiceTransferReport','VoiceTransferReport','body','options','util','bluebird','randomstring'];(function(_0x4cc078,_0x3531b4){var _0x323bbc=function(_0x3c418e){while(--_0x3c418e){_0x4cc078['push'](_0x4cc078['shift']());}};_0x323bbc(++_0x3531b4);}(_0x487e,0x105));var _0xe487=function(_0x36b776,_0x311483){_0x36b776=_0x36b776-0x0;var _0x1141d1=_0x487e[_0x36b776];return _0x1141d1;};'use strict';var _=require('lodash');var util=require(_0xe487('0x0'));var moment=require('moment');var BPromise=require(_0xe487('0x1'));var rs=require(_0xe487('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xe487('0x3'))['db'];var utils=require(_0xe487('0x4'));var logger=require('../../config/logger')(_0xe487('0x5'));var config=require('../../config/environment');var jayson=require('jayson/promise');var client=jayson[_0xe487('0x6')][_0xe487('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x304b86,_0x1d10cd,_0x39fe20){return new BPromise(function(_0x6ac441,_0x953b4a){return client[_0xe487('0x8')](_0x304b86,_0x39fe20)[_0xe487('0x9')](function(_0x1d2918){logger[_0xe487('0xa')]('VoiceTransferReport,\x20%s,\x20%s',_0x1d10cd,_0xe487('0xb'));logger[_0xe487('0xc')](_0xe487('0xd'),_0x1d10cd,_0xe487('0xb'),JSON['stringify'](_0x1d2918));if(_0x1d2918[_0xe487('0xe')]){if(_0x1d2918[_0xe487('0xe')][_0xe487('0xf')]===0x1f4){logger[_0xe487('0xe')]('VoiceTransferReport,\x20%s,\x20%s',_0x1d10cd,_0x1d2918[_0xe487('0xe')][_0xe487('0x10')]);return _0x953b4a(_0x1d2918['error'][_0xe487('0x10')]);}logger[_0xe487('0xe')](_0xe487('0x11'),_0x1d10cd,_0x1d2918[_0xe487('0xe')][_0xe487('0x10')]);return _0x6ac441(_0x1d2918['error'][_0xe487('0x10')]);}else{logger[_0xe487('0xa')]('VoiceTransferReport,\x20%s,\x20%s',_0x1d10cd,'request\x20sent');_0x6ac441(_0x1d2918[_0xe487('0x12')]['message']);}})[_0xe487('0x13')](function(_0x3779e9){logger[_0xe487('0xe')]('VoiceTransferReport,\x20%s,\x20%s',_0x1d10cd,_0x3779e9);_0x953b4a(_0x3779e9);});});}exports[_0xe487('0x14')]=function(_0x4920f4){var _0x3019d2=this;return new Promise(function(_0x35311b,_0x44ee77){return db[_0xe487('0x15')]['create'](_0x4920f4[_0xe487('0x16')],{'raw':_0x4920f4[_0xe487('0x17')]?_0x4920f4[_0xe487('0x17')]['raw']===undefined?!![]:![]:!![]})[_0xe487('0x9')](function(_0x28e4e7){logger[_0xe487('0xa')](_0xe487('0x14'),_0x4920f4);logger[_0xe487('0xc')](_0xe487('0x14'),_0x4920f4,JSON['stringify'](_0x28e4e7));_0x35311b(_0x28e4e7);})[_0xe487('0x13')](function(_0x44af6e){logger[_0xe487('0xe')]('CreateVoiceTransferReport',_0x44af6e[_0xe487('0x10')],_0x4920f4);_0x44ee77(_0x3019d2['error'](0x1f4,_0x44af6e[_0xe487('0x10')]));});});};
\ No newline at end of file
+var _0x722d=['lodash','util','moment','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','../../config/environment','client','http','then','VoiceTransferReport,\x20%s,\x20%s','request\x20sent','stringify','code','error','message','catch','CreateVoiceTransferReport','VoiceTransferReport','options','raw','debug'];(function(_0x4ae8c2,_0x409a64){var _0x252e29=function(_0x4ead37){while(--_0x4ead37){_0x4ae8c2['push'](_0x4ae8c2['shift']());}};_0x252e29(++_0x409a64);}(_0x722d,0x150));var _0xd722=function(_0x334d06,_0x35d6f5){_0x334d06=_0x334d06-0x0;var _0xce23fe=_0x722d[_0x334d06];return _0xce23fe;};'use strict';var _=require(_0xd722('0x0'));var util=require(_0xd722('0x1'));var moment=require(_0xd722('0x2'));var BPromise=require('bluebird');var rs=require(_0xd722('0x3'));var fs=require('fs');var Redis=require(_0xd722('0x4'));var db=require(_0xd722('0x5'))['db'];var utils=require(_0xd722('0x6'));var logger=require(_0xd722('0x7'))('rpc');var config=require(_0xd722('0x8'));var jayson=require('jayson/promise');var client=jayson[_0xd722('0x9')][_0xd722('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x3c35d3,_0x428ff9,_0x5ca201){return new BPromise(function(_0x34adfb,_0x743da0){return client['request'](_0x3c35d3,_0x5ca201)[_0xd722('0xb')](function(_0x547678){logger['info'](_0xd722('0xc'),_0x428ff9,_0xd722('0xd'));logger['debug']('VoiceTransferReport,\x20%s,\x20%s,\x20%s',_0x428ff9,_0xd722('0xd'),JSON[_0xd722('0xe')](_0x547678));if(_0x547678['error']){if(_0x547678['error'][_0xd722('0xf')]===0x1f4){logger[_0xd722('0x10')]('VoiceTransferReport,\x20%s,\x20%s',_0x428ff9,_0x547678[_0xd722('0x10')][_0xd722('0x11')]);return _0x743da0(_0x547678[_0xd722('0x10')][_0xd722('0x11')]);}logger[_0xd722('0x10')](_0xd722('0xc'),_0x428ff9,_0x547678[_0xd722('0x10')]['message']);return _0x34adfb(_0x547678[_0xd722('0x10')]['message']);}else{logger['info']('VoiceTransferReport,\x20%s,\x20%s',_0x428ff9,'request\x20sent');_0x34adfb(_0x547678['result'][_0xd722('0x11')]);}})[_0xd722('0x12')](function(_0x5e28ce){logger[_0xd722('0x10')](_0xd722('0xc'),_0x428ff9,_0x5e28ce);_0x743da0(_0x5e28ce);});});}exports[_0xd722('0x13')]=function(_0x58e526){var _0x33649d=this;return new Promise(function(_0x26960c,_0x4b7624){return db[_0xd722('0x14')]['create'](_0x58e526['body'],{'raw':_0x58e526['options']?_0x58e526[_0xd722('0x15')][_0xd722('0x16')]===undefined?!![]:![]:!![]})[_0xd722('0xb')](function(_0x2e5e07){logger['info']('CreateVoiceTransferReport',_0x58e526);logger[_0xd722('0x17')]('CreateVoiceTransferReport',_0x58e526,JSON[_0xd722('0xe')](_0x2e5e07));_0x26960c(_0x2e5e07);})[_0xd722('0x12')](function(_0x242acd){logger[_0xd722('0x10')](_0xd722('0x13'),_0x242acd[_0xd722('0x11')],_0x58e526);_0x4b7624(_0x33649d[_0xd722('0x10')](0x1f4,_0x242acd[_0xd722('0x11')]));});});};
\ No newline at end of file
index 5454e1e..165accb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0bb5=['unhold','/calls','calls','/transfer','exports','express','Router','post','/originate','isAuthenticated','isWebrtcLicence','originate','/hangup','/answer','/hold','hold','/unhold'];(function(_0x377a30,_0x4f5f00){var _0x24e452=function(_0x2dd6ab){while(--_0x2dd6ab){_0x377a30['push'](_0x377a30['shift']());}};_0x24e452(++_0x4f5f00);}(_0x0bb5,0x148));var _0x50bb=function(_0x35327d,_0x34107e){_0x35327d=_0x35327d-0x0;var _0x405fd5=_0x0bb5[_0x35327d];return _0x405fd5;};'use strict';var express=require(_0x50bb('0x0'));var router=express[_0x50bb('0x1')]();var auth=require('../../components/auth/service');var controller=require('./webbar.controller');router[_0x50bb('0x2')](_0x50bb('0x3'),auth[_0x50bb('0x4')](),auth[_0x50bb('0x5')](),controller[_0x50bb('0x6')]);router[_0x50bb('0x2')](_0x50bb('0x7'),auth[_0x50bb('0x4')](),auth['isWebrtcLicence'](),controller['hangup']);router[_0x50bb('0x2')](_0x50bb('0x8'),auth[_0x50bb('0x4')](),auth[_0x50bb('0x5')](),controller['answer']);router['post'](_0x50bb('0x9'),auth[_0x50bb('0x4')](),auth[_0x50bb('0x5')](),controller[_0x50bb('0xa')]);router['post'](_0x50bb('0xb'),auth[_0x50bb('0x4')](),auth[_0x50bb('0x5')](),controller[_0x50bb('0xc')]);router[_0x50bb('0x2')](_0x50bb('0xd'),auth[_0x50bb('0x4')](),auth['isWebrtcLicence'](),controller[_0x50bb('0xe')]);router['post'](_0x50bb('0xf'),auth[_0x50bb('0x4')](),auth[_0x50bb('0x5')](),controller['transfer']);module[_0x50bb('0x10')]=router;
\ No newline at end of file
+var _0xedd9=['unhold','/calls','calls','/transfer','exports','Router','../../components/auth/service','./webbar.controller','post','/originate','isAuthenticated','isWebrtcLicence','originate','/hangup','hangup','/answer','answer','/hold','/unhold'];(function(_0x2ec1dd,_0x57d18c){var _0x2fa2ad=function(_0x103ecb){while(--_0x103ecb){_0x2ec1dd['push'](_0x2ec1dd['shift']());}};_0x2fa2ad(++_0x57d18c);}(_0xedd9,0xfc));var _0x9edd=function(_0x251b06,_0x92dd52){_0x251b06=_0x251b06-0x0;var _0x5a7c0f=_0xedd9[_0x251b06];return _0x5a7c0f;};'use strict';var express=require('express');var router=express[_0x9edd('0x0')]();var auth=require(_0x9edd('0x1'));var controller=require(_0x9edd('0x2'));router[_0x9edd('0x3')](_0x9edd('0x4'),auth[_0x9edd('0x5')](),auth[_0x9edd('0x6')](),controller[_0x9edd('0x7')]);router['post'](_0x9edd('0x8'),auth[_0x9edd('0x5')](),auth[_0x9edd('0x6')](),controller[_0x9edd('0x9')]);router['post'](_0x9edd('0xa'),auth['isAuthenticated'](),auth[_0x9edd('0x6')](),controller[_0x9edd('0xb')]);router[_0x9edd('0x3')](_0x9edd('0xc'),auth['isAuthenticated'](),auth[_0x9edd('0x6')](),controller['hold']);router[_0x9edd('0x3')](_0x9edd('0xd'),auth['isAuthenticated'](),auth[_0x9edd('0x6')](),controller[_0x9edd('0xe')]);router['post'](_0x9edd('0xf'),auth[_0x9edd('0x5')](),auth[_0x9edd('0x6')](),controller[_0x9edd('0x10')]);router[_0x9edd('0x3')](_0x9edd('0x11'),auth[_0x9edd('0x5')](),auth[_0x9edd('0x6')](),controller['transfer']);module[_0x9edd('0x12')]=router;
\ No newline at end of file
index af50fd1..ba5595e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf3cd=['webbar:hangup','hangup\x20executed!','answer','webbar:answer','answer\x20executed!','hold\x20fired:','webbar:hold','unhold','unhold\x20fired:','webbar:unhold','unhold\x20executed!','calls','VoiceChannels','conference','webbar:conference','conference\x20executed!','transfer','transferNumber','webbar:transfer','transfer\x20executed!','path','lodash','../../mysqldb','../../config/environment','util','bluebird','client','http','../../config/logger','ioredis','redis','defaults','localhost','socket.io-emitter','validate','string','callNumber\x20is\x20required','number','userId\x20is\x20required','sessionId\x20is\x20required','transferNumber\x20is\x20required','info','stringify','log','handleError:','error','stack','name','status','send','NotFound','request','then','code','message','result','catch','User','findOne','all','filter','UserId','sessionId','length','\x20not\x20found!','originate','originate\x20fired:','body','userId','callNumber','callbackUrl','entityFound:','format','user:%s','originate\x20executed!','hangup','hangup\x20fired:','json'];(function(_0x3e79fb,_0x50655c){var _0x9e738c=function(_0x1da1cb){while(--_0x1da1cb){_0x3e79fb['push'](_0x3e79fb['shift']());}};_0x9e738c(++_0x50655c);}(_0xf3cd,0xfe));var _0xdf3c=function(_0x42e8f3,_0x5c8dba){_0x42e8f3=_0x42e8f3-0x0;var _0x47feab=_0xf3cd[_0x42e8f3];return _0x47feab;};'use strict';var path=require(_0xdf3c('0x0'));var fs=require('fs');var _=require(_0xdf3c('0x1'));var db=require(_0xdf3c('0x2'))['db'];var config=require(_0xdf3c('0x3'));var util=require(_0xdf3c('0x4'));var BPromise=require(_0xdf3c('0x5'));var jayson=require('jayson/promise');var amiClient=jayson[_0xdf3c('0x6')][_0xdf3c('0x7')]({'port':0x232a});var logger=require(_0xdf3c('0x8'))('webbarapi');var Redis=require(_0xdf3c('0x9'));config[_0xdf3c('0xa')]=_[_0xdf3c('0xb')](config[_0xdf3c('0xa')],{'host':_0xdf3c('0xc'),'port':0x18eb});var io=require(_0xdf3c('0xd'))(new Redis(config['redis']));var Schema=require(_0xdf3c('0xe'));var originateValidation=new Schema({'userId':{'type':'number','required':[!![],'userId\x20is\x20required']},'callNumber':{'type':_0xdf3c('0xf'),'required':[!![],_0xdf3c('0x10')]},'callerId':{'type':'string'},'callbackUrl':{'type':_0xdf3c('0xf')}});var hangupValidation=new Schema({'userId':{'type':_0xdf3c('0x11'),'required':[!![],_0xdf3c('0x12')]},'sessionId':{'type':_0xdf3c('0xf'),'required':![]}});var answerValidation=new Schema({'userId':{'type':_0xdf3c('0x11'),'required':[!![],_0xdf3c('0x12')]},'sessionId':{'type':_0xdf3c('0xf'),'required':![]}});var transferValidation=new Schema({'userId':{'type':_0xdf3c('0x11'),'required':[!![],'userId\x20is\x20required']},'sessionId':{'type':_0xdf3c('0xf'),'required':[!![],_0xdf3c('0x13')]},'transferNumber':{'type':_0xdf3c('0xf'),'required':[!![],_0xdf3c('0x14')]}});var holdValidation=new Schema({'userId':{'type':'number','required':[!![],_0xdf3c('0x12')]},'sessionId':{'type':_0xdf3c('0xf'),'required':![]}});var unholdValidation=new Schema({'userId':{'type':_0xdf3c('0x11'),'required':[!![],'userId\x20is\x20required']},'sessionId':{'type':_0xdf3c('0xf'),'required':![]}});var callsValidation=new Schema({'userId':{'type':_0xdf3c('0x11'),'required':[!![],_0xdf3c('0x12')]}});var conferenceValidation=new Schema({'userId':{'type':_0xdf3c('0x11'),'required':[!![],_0xdf3c('0x12')]}});function emit(_0x1a7a5a,_0x305ea5,_0x92008b){logger[_0xdf3c('0x15')](_0x1a7a5a,_0x305ea5,JSON[_0xdf3c('0x16')](_0x92008b));io['to'](_0x1a7a5a)['emit'](_0x305ea5,_0x92008b);}function handleError(_0x13b0e6){return function(_0x465e7d){console[_0xdf3c('0x17')](_0xdf3c('0x18'),_0x465e7d,_0x465e7d instanceof RangeError);logger[_0xdf3c('0x19')](_0x465e7d[_0xdf3c('0x1a')]);if(_0x465e7d instanceof RangeError){if(_0x465e7d[_0xdf3c('0x1b')]){delete _0x465e7d[_0xdf3c('0x1b')];}_0x13b0e6[_0xdf3c('0x1c')](0x194)[_0xdf3c('0x1d')](_0x465e7d);}else{if(_0x465e7d[_0xdf3c('0x1b')]){delete _0x465e7d[_0xdf3c('0x1b')];}_0x13b0e6[_0xdf3c('0x1c')](0x1f4)['send'](_0x465e7d);}};}function checkError(){return function(_0x4d620f){if(!_0x4d620f){throw new RangeError(_0xdf3c('0x1e'));}return _0x4d620f;};}function respondWithRpcPromise(_0x583ce4,_0x15776c){return new BPromise(function(_0x40e7ec,_0x36552e){var _0x38b319=amiClient;return _0x38b319[_0xdf3c('0x1f')](_0x583ce4,_0x15776c)[_0xdf3c('0x20')](function(_0x50d8ca){if(_0x50d8ca[_0xdf3c('0x19')]){if(_0x50d8ca[_0xdf3c('0x19')][_0xdf3c('0x21')]===0x1f4){return _0x36552e(_0x50d8ca[_0xdf3c('0x19')][_0xdf3c('0x22')]);}return _0x40e7ec(_0x50d8ca[_0xdf3c('0x19')][_0xdf3c('0x22')]);}else{_0x40e7ec(_0x50d8ca[_0xdf3c('0x23')]);}})[_0xdf3c('0x24')](function(_0x1adee4){_0x36552e(_0x1adee4);});});}function getAgent(_0x4c076c){return db[_0xdf3c('0x25')][_0xdf3c('0x26')]({'where':{'id':_0x4c076c,'role':'agent'}})[_0xdf3c('0x20')](checkError());}function getAgentCheckSession(_0x59659e,_0x4eaced){return new BPromise(function(_0x508be9,_0x14aac9){var _0x186bba=respondWithRpcPromise('VoiceChannels');var _0x5c3b5a=getAgent(_0x59659e);Promise[_0xdf3c('0x27')]([_0x186bba,_0x5c3b5a])[_0xdf3c('0x20')](function(_0xd3cfcb){var _0x1ccdd4=_0xd3cfcb[0x0];var _0x5c98a2=_0xd3cfcb[0x1];var _0x43ce06=_[_0xdf3c('0x28')](_0x1ccdd4['rows'],function(_0x51e0a4){return _0x51e0a4[_0xdf3c('0x29')]==_0x5c98a2['id']&&_0x51e0a4[_0xdf3c('0x2a')]==_0x4eaced;});if(_0x43ce06[_0xdf3c('0x2b')]==0x1){_0x508be9(_0x5c98a2);}else{_0x14aac9(new RangeError('sessionId\x20'+_0x4eaced+_0xdf3c('0x2c')));}});});}exports[_0xdf3c('0x2d')]=function(_0x21e7b8,_0x10099e){logger['info'](_0xdf3c('0x2e'),_0x21e7b8[_0xdf3c('0x2f')]);var _0x522e5f=originateValidation[_0xdf3c('0xe')](_0x21e7b8[_0xdf3c('0x2f')]);if(_0x522e5f[_0xdf3c('0x2b')]>0x0){return _0x10099e[_0xdf3c('0x1c')](0x190)['json'](_0x522e5f);}var _0x33632f=_0x21e7b8[_0xdf3c('0x2f')][_0xdf3c('0x30')];var _0x3b9ce8=_0x21e7b8['body'][_0xdf3c('0x31')];var _0x3e7a4b=_0x21e7b8['body']['callerId'];var _0x12cc19=_0x21e7b8['body'][_0xdf3c('0x32')];return getAgent(_0x33632f)['then'](function(_0x57faba){logger['info'](_0xdf3c('0x33'),_0x57faba[_0xdf3c('0x1b')]);emit(util[_0xdf3c('0x34')](_0xdf3c('0x35'),_0x57faba['name']),'webbar:originate',{'callNumber':_0x3b9ce8,'callerId':_0x3e7a4b,'callbackUrl':_0x12cc19});return _0x10099e[_0xdf3c('0x1c')](0xc8)['json']({'error':![],'message':_0xdf3c('0x36')});})[_0xdf3c('0x24')](handleError(_0x10099e));};exports[_0xdf3c('0x37')]=function(_0xcdd731,_0x1004e9){logger[_0xdf3c('0x15')](_0xdf3c('0x38'),_0xcdd731[_0xdf3c('0x2f')]);var _0x398c76=hangupValidation['validate'](_0xcdd731[_0xdf3c('0x2f')]);if(_0x398c76['length']>0x0){return _0x1004e9['status'](0x190)[_0xdf3c('0x39')](_0x398c76);}var _0x47f760=_0xcdd731[_0xdf3c('0x2f')]['userId'];var _0x2a94c3=_0xcdd731[_0xdf3c('0x2f')][_0xdf3c('0x2a')];return getAgent(_0x47f760)[_0xdf3c('0x20')](function(_0x3098cb){logger[_0xdf3c('0x15')](_0xdf3c('0x33'),_0x3098cb[_0xdf3c('0x1b')]);emit(util[_0xdf3c('0x34')](_0xdf3c('0x35'),_0x3098cb[_0xdf3c('0x1b')]),_0xdf3c('0x3a'),{'sessionId':_0x2a94c3});return _0x1004e9['status'](0xc8)['json']({'error':![],'message':_0xdf3c('0x3b')});})['catch'](handleError(_0x1004e9));};exports[_0xdf3c('0x3c')]=function(_0x14d8e1,_0x46194d){logger[_0xdf3c('0x15')]('answer\x20fired:',_0x14d8e1['body']);var _0x335c1b=answerValidation[_0xdf3c('0xe')](_0x14d8e1[_0xdf3c('0x2f')]);if(_0x335c1b['length']>0x0){return _0x46194d[_0xdf3c('0x1c')](0x190)[_0xdf3c('0x39')](_0x335c1b);}var _0x6fc3b6=_0x14d8e1[_0xdf3c('0x2f')]['userId'];var _0x127685=_0x14d8e1[_0xdf3c('0x2f')][_0xdf3c('0x2a')];return getAgent(_0x6fc3b6)[_0xdf3c('0x20')](function(_0x2f52c5){logger['info'](_0xdf3c('0x33'),_0x2f52c5[_0xdf3c('0x1b')]);emit(util[_0xdf3c('0x34')](_0xdf3c('0x35'),_0x2f52c5[_0xdf3c('0x1b')]),_0xdf3c('0x3d'),{'sessionId':_0x127685});return _0x46194d['status'](0xc8)['json']({'error':![],'message':_0xdf3c('0x3e')});})[_0xdf3c('0x24')](handleError(_0x46194d));};exports['hold']=function(_0x5c9885,_0x269723){logger[_0xdf3c('0x15')](_0xdf3c('0x3f'),_0x5c9885[_0xdf3c('0x2f')]);var _0xaae4bc=holdValidation[_0xdf3c('0xe')](_0x5c9885[_0xdf3c('0x2f')]);if(_0xaae4bc[_0xdf3c('0x2b')]>0x0){return _0x269723[_0xdf3c('0x1c')](0x190)['json'](_0xaae4bc);}var _0x129c2a=_0x5c9885[_0xdf3c('0x2f')][_0xdf3c('0x30')];var _0xe760dd=_0x5c9885[_0xdf3c('0x2f')][_0xdf3c('0x2a')];return getAgent(_0x129c2a)[_0xdf3c('0x20')](function(_0x553f70){logger[_0xdf3c('0x15')]('entityFound:',_0x553f70[_0xdf3c('0x1b')]);emit(util['format'](_0xdf3c('0x35'),_0x553f70[_0xdf3c('0x1b')]),_0xdf3c('0x40'),{'sessionId':_0xe760dd});return _0x269723[_0xdf3c('0x1c')](0xc8)['json']({'error':![],'message':'hold\x20executed!'});})['catch'](handleError(_0x269723));};exports[_0xdf3c('0x41')]=function(_0x5f5726,_0x31c600){logger[_0xdf3c('0x15')](_0xdf3c('0x42'),_0x5f5726[_0xdf3c('0x2f')]);var _0x3b17d9=unholdValidation['validate'](_0x5f5726['body']);if(_0x3b17d9[_0xdf3c('0x2b')]>0x0){return _0x31c600[_0xdf3c('0x1c')](0x190)['json'](_0x3b17d9);}var _0x3b215d=_0x5f5726[_0xdf3c('0x2f')][_0xdf3c('0x30')];var _0x3fda0a=_0x5f5726[_0xdf3c('0x2f')][_0xdf3c('0x2a')];return getAgent(_0x3b215d)[_0xdf3c('0x20')](function(_0x492396){logger['info'](_0xdf3c('0x33'),_0x492396[_0xdf3c('0x1b')]);emit(util[_0xdf3c('0x34')](_0xdf3c('0x35'),_0x492396[_0xdf3c('0x1b')]),_0xdf3c('0x43'),{'sessionId':_0x3fda0a});return _0x31c600[_0xdf3c('0x1c')](0xc8)[_0xdf3c('0x39')]({'error':![],'message':_0xdf3c('0x44')});})[_0xdf3c('0x24')](handleError(_0x31c600));};exports[_0xdf3c('0x45')]=function(_0x4cb28f,_0x1eebcf){logger['info']('calls\x20fired:',_0x1eebcf['body']);var _0x58fcbf=callsValidation['validate'](_0x4cb28f[_0xdf3c('0x2f')]);if(_0x58fcbf[_0xdf3c('0x2b')]>0x0){return _0x1eebcf['status'](0x190)[_0xdf3c('0x39')](_0x58fcbf);}var _0x32427e=_0x4cb28f['body'][_0xdf3c('0x30')];var _0x28f935=respondWithRpcPromise(_0xdf3c('0x46'));var _0x1389e0=getAgent(_0x32427e);return Promise[_0xdf3c('0x27')]([_0x28f935,_0x1389e0])[_0xdf3c('0x20')](function(_0xb54629){var _0xdc859=_0xb54629[0x0];var _0x42efa2=_0xb54629[0x1];var _0xa05518=_[_0xdf3c('0x28')](_0xdc859['rows'],function(_0x1ed898){return _0x1ed898[_0xdf3c('0x29')]==_0x42efa2['id'];});return _0x1eebcf[_0xdf3c('0x1c')](0xc8)['json']({'count':_0xa05518[_0xdf3c('0x2b')],'rows':_0xa05518});})[_0xdf3c('0x24')](handleError(_0x1eebcf));};exports[_0xdf3c('0x47')]=function(_0x552264,_0x1effdb){logger[_0xdf3c('0x15')]('conference\x20fired:',_0x552264[_0xdf3c('0x2f')]);var _0x4f8fd6=conferenceValidation[_0xdf3c('0xe')](_0x552264[_0xdf3c('0x2f')]);if(_0x4f8fd6[_0xdf3c('0x2b')]>0x0){return _0x1effdb[_0xdf3c('0x1c')](0x190)[_0xdf3c('0x39')](_0x4f8fd6);}var _0x30e6e1=_0x552264[_0xdf3c('0x2f')][_0xdf3c('0x30')];return getAgent(_0x30e6e1)[_0xdf3c('0x20')](function(_0x330730){logger[_0xdf3c('0x15')](_0xdf3c('0x33'),_0x330730[_0xdf3c('0x1b')]);emit(util[_0xdf3c('0x34')](_0xdf3c('0x35'),_0x330730[_0xdf3c('0x1b')]),_0xdf3c('0x48'));return _0x1effdb['status'](0xc8)['json']({'error':![],'message':_0xdf3c('0x49')});})[_0xdf3c('0x24')](handleError(_0x1effdb));};exports[_0xdf3c('0x4a')]=function(_0x596282,_0x164e0a){logger['info']('transfer\x20fired:',_0x596282[_0xdf3c('0x2f')]);var _0x399db6=transferValidation[_0xdf3c('0xe')](_0x596282[_0xdf3c('0x2f')]);if(_0x399db6[_0xdf3c('0x2b')]>0x0){return _0x164e0a[_0xdf3c('0x1c')](0x190)[_0xdf3c('0x39')](_0x399db6);}var _0x3ec03a=_0x596282[_0xdf3c('0x2f')][_0xdf3c('0x30')];var _0x1cce9a=_0x596282[_0xdf3c('0x2f')][_0xdf3c('0x2a')];var _0x4be79a=_0x596282[_0xdf3c('0x2f')][_0xdf3c('0x4b')];return getAgent(_0x3ec03a)[_0xdf3c('0x20')](function(_0x16d6ea){logger[_0xdf3c('0x15')]('entityFound:',_0x16d6ea[_0xdf3c('0x1b')]);emit(util[_0xdf3c('0x34')](_0xdf3c('0x35'),_0x16d6ea[_0xdf3c('0x1b')]),_0xdf3c('0x4c'),{'sessionId':_0x1cce9a,'transferNumber':_0x4be79a});return _0x164e0a[_0xdf3c('0x1c')](0xc8)[_0xdf3c('0x39')]({'error':![],'message':_0xdf3c('0x4d')});})[_0xdf3c('0x24')](handleError(_0x164e0a));};
\ No newline at end of file
+var _0xc788=['all','filter','rows','sessionId','length','\x20not\x20found!','originate','originate\x20fired:','body','json','userId','callNumber','callbackUrl','entityFound:','format','webbar:originate','hangup','hangup\x20fired:','webbar:hangup','hangup\x20executed!','answer\x20fired:','user:%s','webbar:answer','answer\x20executed!','hold\x20fired:','webbar:hold','hold\x20executed!','unhold','unhold\x20fired:','webbar:unhold','unhold\x20executed!','calls','UserId','conference','conference\x20fired:','webbar:conference','conference\x20executed!','transfer','transfer\x20fired:','transferNumber','webbar:transfer','transfer\x20executed!','path','lodash','../../mysqldb','bluebird','jayson/promise','client','http','../../config/logger','ioredis','redis','defaults','localhost','validate','number','userId\x20is\x20required','string','callNumber\x20is\x20required','transferNumber\x20is\x20required','info','stringify','emit','error','name','send','status','NotFound','request','then','code','message','result','catch','findOne','agent','VoiceChannels'];(function(_0x1b2ff7,_0x12a034){var _0x31656a=function(_0x1165a5){while(--_0x1165a5){_0x1b2ff7['push'](_0x1b2ff7['shift']());}};_0x31656a(++_0x12a034);}(_0xc788,0xc4));var _0x8c78=function(_0x3f2302,_0x3c3363){_0x3f2302=_0x3f2302-0x0;var _0x55fed4=_0xc788[_0x3f2302];return _0x55fed4;};'use strict';var path=require(_0x8c78('0x0'));var fs=require('fs');var _=require(_0x8c78('0x1'));var db=require(_0x8c78('0x2'))['db'];var config=require('../../config/environment');var util=require('util');var BPromise=require(_0x8c78('0x3'));var jayson=require(_0x8c78('0x4'));var amiClient=jayson[_0x8c78('0x5')][_0x8c78('0x6')]({'port':0x232a});var logger=require(_0x8c78('0x7'))('webbarapi');var Redis=require(_0x8c78('0x8'));config[_0x8c78('0x9')]=_[_0x8c78('0xa')](config[_0x8c78('0x9')],{'host':_0x8c78('0xb'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x8c78('0x9')]));var Schema=require(_0x8c78('0xc'));var originateValidation=new Schema({'userId':{'type':_0x8c78('0xd'),'required':[!![],_0x8c78('0xe')]},'callNumber':{'type':_0x8c78('0xf'),'required':[!![],_0x8c78('0x10')]},'callerId':{'type':'string'},'callbackUrl':{'type':_0x8c78('0xf')}});var hangupValidation=new Schema({'userId':{'type':'number','required':[!![],_0x8c78('0xe')]},'sessionId':{'type':_0x8c78('0xf'),'required':![]}});var answerValidation=new Schema({'userId':{'type':'number','required':[!![],_0x8c78('0xe')]},'sessionId':{'type':_0x8c78('0xf'),'required':![]}});var transferValidation=new Schema({'userId':{'type':'number','required':[!![],_0x8c78('0xe')]},'sessionId':{'type':'string','required':[!![],'sessionId\x20is\x20required']},'transferNumber':{'type':_0x8c78('0xf'),'required':[!![],_0x8c78('0x11')]}});var holdValidation=new Schema({'userId':{'type':_0x8c78('0xd'),'required':[!![],_0x8c78('0xe')]},'sessionId':{'type':_0x8c78('0xf'),'required':![]}});var unholdValidation=new Schema({'userId':{'type':_0x8c78('0xd'),'required':[!![],_0x8c78('0xe')]},'sessionId':{'type':_0x8c78('0xf'),'required':![]}});var callsValidation=new Schema({'userId':{'type':_0x8c78('0xd'),'required':[!![],_0x8c78('0xe')]}});var conferenceValidation=new Schema({'userId':{'type':'number','required':[!![],_0x8c78('0xe')]}});function emit(_0x293cfe,_0x57ad11,_0x45b85f){logger[_0x8c78('0x12')](_0x293cfe,_0x57ad11,JSON[_0x8c78('0x13')](_0x45b85f));io['to'](_0x293cfe)[_0x8c78('0x14')](_0x57ad11,_0x45b85f);}function handleError(_0x2a982c){return function(_0x461eff){console['log']('handleError:',_0x461eff,_0x461eff instanceof RangeError);logger[_0x8c78('0x15')](_0x461eff['stack']);if(_0x461eff instanceof RangeError){if(_0x461eff['name']){delete _0x461eff[_0x8c78('0x16')];}_0x2a982c['status'](0x194)[_0x8c78('0x17')](_0x461eff);}else{if(_0x461eff[_0x8c78('0x16')]){delete _0x461eff['name'];}_0x2a982c[_0x8c78('0x18')](0x1f4)['send'](_0x461eff);}};}function checkError(){return function(_0x2dba52){if(!_0x2dba52){throw new RangeError(_0x8c78('0x19'));}return _0x2dba52;};}function respondWithRpcPromise(_0x5a254d,_0xd1ae4d){return new BPromise(function(_0x188cc3,_0x499603){var _0x2bc595=amiClient;return _0x2bc595[_0x8c78('0x1a')](_0x5a254d,_0xd1ae4d)[_0x8c78('0x1b')](function(_0x9581c6){if(_0x9581c6[_0x8c78('0x15')]){if(_0x9581c6[_0x8c78('0x15')][_0x8c78('0x1c')]===0x1f4){return _0x499603(_0x9581c6[_0x8c78('0x15')][_0x8c78('0x1d')]);}return _0x188cc3(_0x9581c6['error'][_0x8c78('0x1d')]);}else{_0x188cc3(_0x9581c6[_0x8c78('0x1e')]);}})[_0x8c78('0x1f')](function(_0x49cccb){_0x499603(_0x49cccb);});});}function getAgent(_0x331bfe){return db['User'][_0x8c78('0x20')]({'where':{'id':_0x331bfe,'role':_0x8c78('0x21')}})[_0x8c78('0x1b')](checkError());}function getAgentCheckSession(_0x496c51,_0x583a74){return new BPromise(function(_0x2568d5,_0x4be49d){var _0x20b128=respondWithRpcPromise(_0x8c78('0x22'));var _0x394c1d=getAgent(_0x496c51);Promise[_0x8c78('0x23')]([_0x20b128,_0x394c1d])[_0x8c78('0x1b')](function(_0x2ab5cc){var _0x5ba7d4=_0x2ab5cc[0x0];var _0x1c3039=_0x2ab5cc[0x1];var _0x51add6=_[_0x8c78('0x24')](_0x5ba7d4[_0x8c78('0x25')],function(_0xb69c52){return _0xb69c52['UserId']==_0x1c3039['id']&&_0xb69c52[_0x8c78('0x26')]==_0x583a74;});if(_0x51add6[_0x8c78('0x27')]==0x1){_0x2568d5(_0x1c3039);}else{_0x4be49d(new RangeError('sessionId\x20'+_0x583a74+_0x8c78('0x28')));}});});}exports[_0x8c78('0x29')]=function(_0x32bc1f,_0x487a4c){logger[_0x8c78('0x12')](_0x8c78('0x2a'),_0x32bc1f[_0x8c78('0x2b')]);var _0x5348ab=originateValidation[_0x8c78('0xc')](_0x32bc1f[_0x8c78('0x2b')]);if(_0x5348ab['length']>0x0){return _0x487a4c[_0x8c78('0x18')](0x190)[_0x8c78('0x2c')](_0x5348ab);}var _0x3a9372=_0x32bc1f[_0x8c78('0x2b')][_0x8c78('0x2d')];var _0x5b5429=_0x32bc1f[_0x8c78('0x2b')][_0x8c78('0x2e')];var _0x201a43=_0x32bc1f[_0x8c78('0x2b')]['callerId'];var _0x3e9bf1=_0x32bc1f[_0x8c78('0x2b')][_0x8c78('0x2f')];return getAgent(_0x3a9372)[_0x8c78('0x1b')](function(_0x34481a){logger['info'](_0x8c78('0x30'),_0x34481a[_0x8c78('0x16')]);emit(util[_0x8c78('0x31')]('user:%s',_0x34481a[_0x8c78('0x16')]),_0x8c78('0x32'),{'callNumber':_0x5b5429,'callerId':_0x201a43,'callbackUrl':_0x3e9bf1});return _0x487a4c['status'](0xc8)[_0x8c78('0x2c')]({'error':![],'message':'originate\x20executed!'});})[_0x8c78('0x1f')](handleError(_0x487a4c));};exports[_0x8c78('0x33')]=function(_0x245f62,_0x157b81){logger['info'](_0x8c78('0x34'),_0x245f62['body']);var _0x3b8f4f=hangupValidation[_0x8c78('0xc')](_0x245f62[_0x8c78('0x2b')]);if(_0x3b8f4f['length']>0x0){return _0x157b81['status'](0x190)[_0x8c78('0x2c')](_0x3b8f4f);}var _0x25d143=_0x245f62[_0x8c78('0x2b')][_0x8c78('0x2d')];var _0x2eb3ef=_0x245f62[_0x8c78('0x2b')][_0x8c78('0x26')];return getAgent(_0x25d143)[_0x8c78('0x1b')](function(_0x1f0a2b){logger[_0x8c78('0x12')](_0x8c78('0x30'),_0x1f0a2b[_0x8c78('0x16')]);emit(util[_0x8c78('0x31')]('user:%s',_0x1f0a2b[_0x8c78('0x16')]),_0x8c78('0x35'),{'sessionId':_0x2eb3ef});return _0x157b81['status'](0xc8)['json']({'error':![],'message':_0x8c78('0x36')});})[_0x8c78('0x1f')](handleError(_0x157b81));};exports['answer']=function(_0x224c4b,_0x57ff42){logger['info'](_0x8c78('0x37'),_0x224c4b[_0x8c78('0x2b')]);var _0x57e2c7=answerValidation[_0x8c78('0xc')](_0x224c4b[_0x8c78('0x2b')]);if(_0x57e2c7[_0x8c78('0x27')]>0x0){return _0x57ff42[_0x8c78('0x18')](0x190)[_0x8c78('0x2c')](_0x57e2c7);}var _0x4e4880=_0x224c4b['body'][_0x8c78('0x2d')];var _0x2f6a6b=_0x224c4b[_0x8c78('0x2b')][_0x8c78('0x26')];return getAgent(_0x4e4880)[_0x8c78('0x1b')](function(_0x460821){logger[_0x8c78('0x12')](_0x8c78('0x30'),_0x460821[_0x8c78('0x16')]);emit(util[_0x8c78('0x31')](_0x8c78('0x38'),_0x460821['name']),_0x8c78('0x39'),{'sessionId':_0x2f6a6b});return _0x57ff42[_0x8c78('0x18')](0xc8)[_0x8c78('0x2c')]({'error':![],'message':_0x8c78('0x3a')});})[_0x8c78('0x1f')](handleError(_0x57ff42));};exports['hold']=function(_0x356e47,_0x4588cd){logger[_0x8c78('0x12')](_0x8c78('0x3b'),_0x356e47[_0x8c78('0x2b')]);var _0x5cc829=holdValidation[_0x8c78('0xc')](_0x356e47['body']);if(_0x5cc829['length']>0x0){return _0x4588cd[_0x8c78('0x18')](0x190)[_0x8c78('0x2c')](_0x5cc829);}var _0x61e20=_0x356e47['body'][_0x8c78('0x2d')];var _0xc6ba23=_0x356e47[_0x8c78('0x2b')][_0x8c78('0x26')];return getAgent(_0x61e20)[_0x8c78('0x1b')](function(_0x38083e){logger[_0x8c78('0x12')](_0x8c78('0x30'),_0x38083e[_0x8c78('0x16')]);emit(util['format'](_0x8c78('0x38'),_0x38083e[_0x8c78('0x16')]),_0x8c78('0x3c'),{'sessionId':_0xc6ba23});return _0x4588cd[_0x8c78('0x18')](0xc8)['json']({'error':![],'message':_0x8c78('0x3d')});})[_0x8c78('0x1f')](handleError(_0x4588cd));};exports[_0x8c78('0x3e')]=function(_0x431125,_0x53e75c){logger[_0x8c78('0x12')](_0x8c78('0x3f'),_0x431125[_0x8c78('0x2b')]);var _0x551e0f=unholdValidation[_0x8c78('0xc')](_0x431125['body']);if(_0x551e0f[_0x8c78('0x27')]>0x0){return _0x53e75c[_0x8c78('0x18')](0x190)[_0x8c78('0x2c')](_0x551e0f);}var _0xa87aba=_0x431125[_0x8c78('0x2b')][_0x8c78('0x2d')];var _0xf68e0=_0x431125[_0x8c78('0x2b')][_0x8c78('0x26')];return getAgent(_0xa87aba)[_0x8c78('0x1b')](function(_0x23e568){logger[_0x8c78('0x12')](_0x8c78('0x30'),_0x23e568[_0x8c78('0x16')]);emit(util['format'](_0x8c78('0x38'),_0x23e568[_0x8c78('0x16')]),_0x8c78('0x40'),{'sessionId':_0xf68e0});return _0x53e75c[_0x8c78('0x18')](0xc8)['json']({'error':![],'message':_0x8c78('0x41')});})[_0x8c78('0x1f')](handleError(_0x53e75c));};exports[_0x8c78('0x42')]=function(_0x2b9b18,_0x40025d){logger[_0x8c78('0x12')]('calls\x20fired:',_0x40025d[_0x8c78('0x2b')]);var _0x42a34e=callsValidation['validate'](_0x2b9b18[_0x8c78('0x2b')]);if(_0x42a34e['length']>0x0){return _0x40025d[_0x8c78('0x18')](0x190)[_0x8c78('0x2c')](_0x42a34e);}var _0x257533=_0x2b9b18[_0x8c78('0x2b')][_0x8c78('0x2d')];var _0x35cf85=respondWithRpcPromise(_0x8c78('0x22'));var _0x49fa4c=getAgent(_0x257533);return Promise[_0x8c78('0x23')]([_0x35cf85,_0x49fa4c])[_0x8c78('0x1b')](function(_0x4e77a9){var _0x110e7b=_0x4e77a9[0x0];var _0x3529aa=_0x4e77a9[0x1];var _0x577361=_[_0x8c78('0x24')](_0x110e7b[_0x8c78('0x25')],function(_0x3e2160){return _0x3e2160[_0x8c78('0x43')]==_0x3529aa['id'];});return _0x40025d[_0x8c78('0x18')](0xc8)[_0x8c78('0x2c')]({'count':_0x577361[_0x8c78('0x27')],'rows':_0x577361});})[_0x8c78('0x1f')](handleError(_0x40025d));};exports[_0x8c78('0x44')]=function(_0x1b3600,_0x25b8bc){logger[_0x8c78('0x12')](_0x8c78('0x45'),_0x1b3600[_0x8c78('0x2b')]);var _0x50ae7d=conferenceValidation[_0x8c78('0xc')](_0x1b3600['body']);if(_0x50ae7d[_0x8c78('0x27')]>0x0){return _0x25b8bc['status'](0x190)['json'](_0x50ae7d);}var _0x57a4b1=_0x1b3600[_0x8c78('0x2b')]['userId'];return getAgent(_0x57a4b1)['then'](function(_0x502991){logger[_0x8c78('0x12')](_0x8c78('0x30'),_0x502991[_0x8c78('0x16')]);emit(util[_0x8c78('0x31')]('user:%s',_0x502991[_0x8c78('0x16')]),_0x8c78('0x46'));return _0x25b8bc[_0x8c78('0x18')](0xc8)[_0x8c78('0x2c')]({'error':![],'message':_0x8c78('0x47')});})[_0x8c78('0x1f')](handleError(_0x25b8bc));};exports[_0x8c78('0x48')]=function(_0x54d561,_0x25c255){logger[_0x8c78('0x12')](_0x8c78('0x49'),_0x54d561[_0x8c78('0x2b')]);var _0x3e1ee0=transferValidation[_0x8c78('0xc')](_0x54d561['body']);if(_0x3e1ee0[_0x8c78('0x27')]>0x0){return _0x25c255['status'](0x190)[_0x8c78('0x2c')](_0x3e1ee0);}var _0x28d1a7=_0x54d561[_0x8c78('0x2b')]['userId'];var _0x97df9c=_0x54d561[_0x8c78('0x2b')][_0x8c78('0x26')];var _0x4fa0b0=_0x54d561[_0x8c78('0x2b')][_0x8c78('0x4a')];return getAgent(_0x28d1a7)['then'](function(_0xbfafd1){logger[_0x8c78('0x12')](_0x8c78('0x30'),_0xbfafd1['name']);emit(util[_0x8c78('0x31')](_0x8c78('0x38'),_0xbfafd1[_0x8c78('0x16')]),_0x8c78('0x4b'),{'sessionId':_0x97df9c,'transferNumber':_0x4fa0b0});return _0x25c255[_0x8c78('0x18')](0xc8)[_0x8c78('0x2c')]({'error':![],'message':_0x8c78('0x4c')});})[_0x8c78('0x1f')](handleError(_0x25c255));};
\ No newline at end of file
index 1eff334..244d477 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe551=['isAuthenticated','index','get','describe','/:id','show','/:id/canned_answers','getAnswers','getAgents','/:id/applications','getApplications','post','create','addDisposition','addAnswer','/:id/users','addApplications','notify','/:id/send','put','destroy','delete','/:id/dispositions','removeDispositions','removeAnswers','removeAgents','util','path','connect-timeout','express','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappAccount.controller'];(function(_0x1f26fe,_0x303301){var _0x3e2990=function(_0x4ba3ac){while(--_0x4ba3ac){_0x1f26fe['push'](_0x1f26fe['shift']());}};_0x3e2990(++_0x303301);}(_0xe551,0x83));var _0x1e55=function(_0x65379b,_0x4db89f){_0x65379b=_0x65379b-0x0;var _0x2b5b20=_0xe551[_0x65379b];return _0x2b5b20;};'use strict';var multer=require('multer');var util=require(_0x1e55('0x0'));var path=require(_0x1e55('0x1'));var timeout=require(_0x1e55('0x2'));var express=require(_0x1e55('0x3'));var router=express['Router']();var fs_extra=require(_0x1e55('0x4'));var auth=require(_0x1e55('0x5'));var interaction=require(_0x1e55('0x6'));var config=require(_0x1e55('0x7'));var controller=require(_0x1e55('0x8'));router['get']('/',auth[_0x1e55('0x9')](),controller[_0x1e55('0xa')]);router[_0x1e55('0xb')]('/describe',auth[_0x1e55('0x9')](),controller[_0x1e55('0xc')]);router['get'](_0x1e55('0xd'),auth['isAuthenticated'](),controller[_0x1e55('0xe')]);router[_0x1e55('0xb')]('/:id/dispositions',auth[_0x1e55('0x9')](),controller['getDispositions']);router['get'](_0x1e55('0xf'),auth[_0x1e55('0x9')](),controller[_0x1e55('0x10')]);router[_0x1e55('0xb')]('/:id/users',auth['isAuthenticated'](),controller[_0x1e55('0x11')]);router[_0x1e55('0xb')](_0x1e55('0x12'),auth['isAuthenticated'](),controller[_0x1e55('0x13')]);router[_0x1e55('0x14')]('/',auth[_0x1e55('0x9')](),controller[_0x1e55('0x15')]);router[_0x1e55('0x14')]('/:id/dispositions',auth[_0x1e55('0x9')](),controller[_0x1e55('0x16')]);router[_0x1e55('0x14')](_0x1e55('0xf'),auth['isAuthenticated'](),controller[_0x1e55('0x17')]);router[_0x1e55('0x14')](_0x1e55('0x18'),auth[_0x1e55('0x9')](),controller['addAgents']);router['post'](_0x1e55('0x12'),auth['isAuthenticated'](),controller[_0x1e55('0x19')]);router[_0x1e55('0x14')]('/:id/notify',controller[_0x1e55('0x1a')]);router[_0x1e55('0x14')](_0x1e55('0x1b'),auth['isAuthenticated'](),controller['send']);router[_0x1e55('0x1c')](_0x1e55('0xd'),auth[_0x1e55('0x9')](),controller['update']);router['delete'](_0x1e55('0xd'),auth['isAuthenticated'](),controller[_0x1e55('0x1d')]);router[_0x1e55('0x1e')](_0x1e55('0x1f'),auth['isAuthenticated'](),controller[_0x1e55('0x20')]);router[_0x1e55('0x1e')]('/:id/canned_answers',auth['isAuthenticated'](),controller[_0x1e55('0x21')]);router[_0x1e55('0x1e')](_0x1e55('0x18'),auth['isAuthenticated'](),controller[_0x1e55('0x22')]);module['exports']=router;
\ No newline at end of file
+var _0x8099=['../../components/interaction/service','get','isAuthenticated','index','/describe','describe','/:id','/:id/canned_answers','getAnswers','getAgents','getApplications','addDisposition','post','addAnswer','/:id/users','/:id/applications','addApplications','notify','send','put','delete','destroy','/:id/dispositions','removeAnswers','removeAgents','exports','multer','util','connect-timeout','express','fs-extra'];(function(_0x227cfb,_0x4f42cf){var _0x131407=function(_0x37ddbb){while(--_0x37ddbb){_0x227cfb['push'](_0x227cfb['shift']());}};_0x131407(++_0x4f42cf);}(_0x8099,0x1cc));var _0x9809=function(_0x153d7b,_0x50cf71){_0x153d7b=_0x153d7b-0x0;var _0x5a412e=_0x8099[_0x153d7b];return _0x5a412e;};'use strict';var multer=require(_0x9809('0x0'));var util=require(_0x9809('0x1'));var path=require('path');var timeout=require(_0x9809('0x2'));var express=require(_0x9809('0x3'));var router=express['Router']();var fs_extra=require(_0x9809('0x4'));var auth=require('../../components/auth/service');var interaction=require(_0x9809('0x5'));var config=require('../../config/environment');var controller=require('./whatsappAccount.controller');router[_0x9809('0x6')]('/',auth[_0x9809('0x7')](),controller[_0x9809('0x8')]);router[_0x9809('0x6')](_0x9809('0x9'),auth[_0x9809('0x7')](),controller[_0x9809('0xa')]);router['get'](_0x9809('0xb'),auth[_0x9809('0x7')](),controller['show']);router[_0x9809('0x6')]('/:id/dispositions',auth[_0x9809('0x7')](),controller['getDispositions']);router[_0x9809('0x6')](_0x9809('0xc'),auth[_0x9809('0x7')](),controller[_0x9809('0xd')]);router[_0x9809('0x6')]('/:id/users',auth[_0x9809('0x7')](),controller[_0x9809('0xe')]);router[_0x9809('0x6')]('/:id/applications',auth['isAuthenticated'](),controller[_0x9809('0xf')]);router['post']('/',auth['isAuthenticated'](),controller['create']);router['post']('/:id/dispositions',auth[_0x9809('0x7')](),controller[_0x9809('0x10')]);router[_0x9809('0x11')](_0x9809('0xc'),auth[_0x9809('0x7')](),controller[_0x9809('0x12')]);router[_0x9809('0x11')](_0x9809('0x13'),auth['isAuthenticated'](),controller['addAgents']);router['post'](_0x9809('0x14'),auth['isAuthenticated'](),controller[_0x9809('0x15')]);router['post']('/:id/notify',controller[_0x9809('0x16')]);router[_0x9809('0x11')]('/:id/send',auth[_0x9809('0x7')](),controller[_0x9809('0x17')]);router[_0x9809('0x18')](_0x9809('0xb'),auth[_0x9809('0x7')](),controller['update']);router[_0x9809('0x19')](_0x9809('0xb'),auth['isAuthenticated'](),controller[_0x9809('0x1a')]);router[_0x9809('0x19')](_0x9809('0x1b'),auth[_0x9809('0x7')](),controller['removeDispositions']);router[_0x9809('0x19')]('/:id/canned_answers',auth[_0x9809('0x7')](),controller[_0x9809('0x1c')]);router[_0x9809('0x19')]('/:id/users',auth['isAuthenticated'](),controller[_0x9809('0x1d')]);module[_0x9809('0x1e')]=router;
\ No newline at end of file
index 954bc87..233db8f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4817=['INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','randomstring','name','STRING','generate','ENUM','twilio','TEXT','BOOLEAN'];(function(_0x820bf2,_0x5c6e3a){var _0x2962c1=function(_0x1938fb){while(--_0x1938fb){_0x820bf2['push'](_0x820bf2['shift']());}};_0x2962c1(++_0x5c6e3a);}(_0x4817,0x11e));var _0x7481=function(_0x375a1f,_0x2e8795){_0x375a1f=_0x375a1f-0x0;var _0xd3f0c9=_0x4817[_0x375a1f];return _0xd3f0c9;};'use strict';var Sequelize=require('sequelize');var rs=require(_0x7481('0x0'));module['exports']={'name':{'type':Sequelize['STRING'],'unique':_0x7481('0x1'),'allowNull':![]},'key':{'type':Sequelize['STRING'],'allowNull':![]},'remote':{'type':Sequelize[_0x7481('0x2')],'allowNull':![]},'token':{'type':Sequelize[_0x7481('0x2')],'defaultValue':function(){return rs[_0x7481('0x3')]();}},'phone':{'type':Sequelize[_0x7481('0x2')]},'type':{'type':Sequelize[_0x7481('0x4')](_0x7481('0x5'),'sinch')},'accountSid':{'type':Sequelize[_0x7481('0x2')]},'baseUrl':{'type':Sequelize[_0x7481('0x2')]},'authToken':{'type':Sequelize[_0x7481('0x2')]},'notificationTemplate':{'type':Sequelize[_0x7481('0x6')],'defaultValue':function(){return'Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}';}},'notificationSound':{'type':Sequelize[_0x7481('0x7')],'defaultValue':![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x7481('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x7481('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize[_0x7481('0x7')],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x7481('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x7481('0x7')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x7481('0x8')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize[_0x7481('0x8')],'comment':_0x7481('0x9')},'mandatoryDisposition':{'type':Sequelize[_0x7481('0x7')],'defaultValue':![],'comment':_0x7481('0xa'),'set':function(_0x5cb6c9){if(!_0x5cb6c9){this[_0x7481('0xb')](_0x7481('0xc'),null);}this[_0x7481('0xb')](_0x7481('0xd'),_0x5cb6c9);}},'description':{'type':Sequelize[_0x7481('0x2')]}};
\ No newline at end of file
+var _0xf4b6=['INTEGER','Status\x20to\x20put\x20when\x20mandatory\x20disposition\x20is\x20enabled','setDataValue','mandatoryDispositionPauseId','mandatoryDisposition','randomstring','exports','name','STRING','generate','ENUM','twilio','sinch','TEXT','Account:\x20{{account.name}}<br/>{{#queue}}Queue:\x20{{queue.name}}<br/>{{/queue}}From\x20:\x20{{from}}','BOOLEAN'];(function(_0x1c6b9c,_0x4a312c){var _0x247491=function(_0x2e0dc0){while(--_0x2e0dc0){_0x1c6b9c['push'](_0x1c6b9c['shift']());}};_0x247491(++_0x4a312c);}(_0xf4b6,0x85));var _0x6f4b=function(_0x51e961,_0x545b34){_0x51e961=_0x51e961-0x0;var _0x4a4073=_0xf4b6[_0x51e961];return _0x4a4073;};'use strict';var Sequelize=require('sequelize');var rs=require(_0x6f4b('0x0'));module[_0x6f4b('0x1')]={'name':{'type':Sequelize['STRING'],'unique':_0x6f4b('0x2'),'allowNull':![]},'key':{'type':Sequelize[_0x6f4b('0x3')],'allowNull':![]},'remote':{'type':Sequelize[_0x6f4b('0x3')],'allowNull':![]},'token':{'type':Sequelize[_0x6f4b('0x3')],'defaultValue':function(){return rs[_0x6f4b('0x4')]();}},'phone':{'type':Sequelize['STRING']},'type':{'type':Sequelize[_0x6f4b('0x5')](_0x6f4b('0x6'),_0x6f4b('0x7'))},'accountSid':{'type':Sequelize[_0x6f4b('0x3')]},'baseUrl':{'type':Sequelize[_0x6f4b('0x3')]},'authToken':{'type':Sequelize[_0x6f4b('0x3')]},'notificationTemplate':{'type':Sequelize[_0x6f4b('0x8')],'defaultValue':function(){return _0x6f4b('0x9');}},'notificationSound':{'type':Sequelize[_0x6f4b('0xa')],'defaultValue':![]},'notificationShake':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'waitForTheAssignedAgent':{'type':Sequelize[_0x6f4b('0xb')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'waitForTheAssignedQueue':{'type':Sequelize[_0x6f4b('0xb')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0xa},'queueTransfer':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueTransferTimeout':{'type':Sequelize[_0x6f4b('0xb')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'agentTransfer':{'type':Sequelize[_0x6f4b('0xa')],'defaultValue':![]},'agentTransferTimeout':{'type':Sequelize[_0x6f4b('0xb')],'validate':{'min':0x1,'max':0x20c49b},'defaultValue':0x12c},'mandatoryDispositionPauseId':{'type':Sequelize['INTEGER'],'comment':_0x6f4b('0xc')},'mandatoryDisposition':{'type':Sequelize[_0x6f4b('0xa')],'defaultValue':![],'comment':'Enabled/disables\x20mandatory\x20dispo\x20on\x20a\x20queue','set':function(_0xae145e){if(!_0xae145e){this[_0x6f4b('0xd')](_0x6f4b('0xe'),null);}this[_0x6f4b('0xd')](_0x6f4b('0xf'),_0xae145e);}},'description':{'type':Sequelize[_0x6f4b('0x3')]}};
\ No newline at end of file
index 705652a..c78495d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5227=['timestamp','applications','orderBy','Applications','asc','CmContact','no\x20available\x20attributes','difference','createdAt','updatedAt','CompanyId','mobile','replace','whatsapp:','Body','messageId','type','notifications','message_id','isNil','from','Sequelize','ValidationError','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','ListId','list','Contacts','contact','WhatsappInteraction','interaction','created','autoclose','push','close','ContactId','AttachmentId','UserId','unshift','agent','*,*,*,*','queueId','WhatsappQueue','queue','waitForTheAssignedQueue','Start','startRouting','entity\x20found','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s,\x20%s','twilio','set','Content-Type','text/xml','<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22?>\x0a<Response></Response>','CmList','List','DESC','Messages','dataValues','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','mustache','util','path','sox','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','to-csv','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','redis','defaults','localhost','socket.io-emitter','./whatsappAccount.socket','register','jayson/promise','client','request','then','info','WhatsappAccount,\x20%s,\x20%s','request\x20sent','WhatsappAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','sendStatus','status','end','json','offset','undefined','limit','count','Content-Range','reject','save','update','stack','name','send','index','Pause','mandatoryDispositionPause','map','WhatsappAccount','key','model','keys','query','intersection','attributes','fields','length','hasOwnProperty','nolimit','sort','pick','filters','filter','where','merge','VIRTUAL','includeAll','include','findAll','rows','catch','show','params','options','find','create','user','get','Unable\x20to\x20retrieve\x20the\x20current\x20user','WhatsappAccounts','UserProfileSection','autoAssociation','body','describe','WhatsappAccountId','Disposition','getDispositions','findOne','rawAttributes','order','removeDispositions','addAnswer','CannedAnswer','getAnswers','removeAnswers','ids','addAgents','omit','spread','emit','removeAgents','isArray','userWhatsappAccount:remove','getAgents','User','addApplications','sequelize','transaction','ISOLATION_LEVELS','READ_COMMITTED','WhatsappApplication','destroy','bulkCreate','findAndCountAll','priority','finally','getApplications','whatsapp','account','sinch','statuses','state','WhatsappMessage'];(function(_0x30c649,_0x2ebbac){var _0x3edfb9=function(_0xab82f5){while(--_0xab82f5){_0x30c649['push'](_0x30c649['shift']());}};_0x3edfb9(++_0x2ebbac);}(_0x5227,0x1d1));var _0x7522=function(_0x22bdd3,_0x552e50){_0x22bdd3=_0x22bdd3-0x0;var _0x44d9d9=_0x5227[_0x22bdd3];return _0x44d9d9;};'use strict';var emlformat=require(_0x7522('0x0'));var rimraf=require(_0x7522('0x1'));var zipdir=require(_0x7522('0x2'));var jsonpatch=require(_0x7522('0x3'));var rp=require(_0x7522('0x4'));var moment=require(_0x7522('0x5'));var BPromise=require('bluebird');var Mustache=require(_0x7522('0x6'));var util=require(_0x7522('0x7'));var path=require(_0x7522('0x8'));var sox=require(_0x7522('0x9'));var csv=require('to-csv');var ejs=require(_0x7522('0xa'));var fs=require('fs');var fs_extra=require(_0x7522('0xb'));var _=require(_0x7522('0xc'));var squel=require(_0x7522('0xd'));var crypto=require(_0x7522('0xe'));var jsforce=require(_0x7522('0xf'));var deskjs=require(_0x7522('0x10'));var toCsv=require(_0x7522('0x11'));var querystring=require(_0x7522('0x12'));var Papa=require(_0x7522('0x13'));var Redis=require(_0x7522('0x14'));var authService=require(_0x7522('0x15'));var qs=require(_0x7522('0x16'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x7522('0x17'));var logger=require(_0x7522('0x18'))(_0x7522('0x19'));var utils=require(_0x7522('0x1a'));var config=require(_0x7522('0x1b'));var licenseUtil=require(_0x7522('0x1c'));var db=require('../../mysqldb')['db'];config[_0x7522('0x1d')]=_[_0x7522('0x1e')](config[_0x7522('0x1d')],{'host':_0x7522('0x1f'),'port':0x18eb});var socket=require(_0x7522('0x20'))(new Redis(config[_0x7522('0x1d')]));require(_0x7522('0x21'))[_0x7522('0x22')](socket);var jayson=require(_0x7522('0x23'));var client=jayson[_0x7522('0x24')]['http']({'port':0x232c});function respondWithRpcPromise(_0x54ce48,_0x30952b,_0x5ec046,_0x1aa84c){return new BPromise(function(_0x2ded0c,_0x125026){var _0x1cd22b=_0x1aa84c||client;return _0x1cd22b[_0x7522('0x25')](_0x54ce48,_0x5ec046)[_0x7522('0x26')](function(_0x4d489b){logger[_0x7522('0x27')](_0x7522('0x28'),_0x30952b,_0x7522('0x29'));logger['debug'](_0x7522('0x2a'),_0x30952b,_0x7522('0x29'),JSON[_0x7522('0x2b')](_0x4d489b));if(_0x4d489b[_0x7522('0x2c')]){if(_0x4d489b[_0x7522('0x2c')][_0x7522('0x2d')]===0x1f4){logger[_0x7522('0x2c')](_0x7522('0x28'),_0x30952b,_0x4d489b[_0x7522('0x2c')][_0x7522('0x2e')]);return _0x125026(_0x4d489b['error'][_0x7522('0x2e')]);}logger[_0x7522('0x2c')](_0x7522('0x28'),_0x30952b,_0x4d489b[_0x7522('0x2c')][_0x7522('0x2e')]);return _0x2ded0c(_0x4d489b['error'][_0x7522('0x2e')]);}else{logger[_0x7522('0x27')](_0x7522('0x28'),_0x30952b,'request\x20sent');_0x2ded0c(_0x4d489b['result']['message']);}})['catch'](function(_0x306b29){logger[_0x7522('0x2c')]('WhatsappAccount,\x20%s,\x20%s',_0x30952b,_0x306b29);_0x125026(_0x306b29);});});}function respondWithStatusCode(_0x4eee84,_0x4e5028){_0x4e5028=_0x4e5028||0xcc;return function(_0x2b583d){if(_0x2b583d){return _0x4eee84[_0x7522('0x2f')](_0x4e5028);}return _0x4eee84[_0x7522('0x30')](_0x4e5028)[_0x7522('0x31')]();};}function respondWithResult(_0x596e12,_0x5cec09){_0x5cec09=_0x5cec09||0xc8;return function(_0xfb1361){if(_0xfb1361){return _0x596e12['status'](_0x5cec09)[_0x7522('0x32')](_0xfb1361);}};}function respondWithFilteredResult(_0x3b10d3,_0x17fd78){return function(_0x427e43){if(_0x427e43){var _0x1896c8=typeof _0x17fd78[_0x7522('0x33')]===_0x7522('0x34')&&typeof _0x17fd78[_0x7522('0x35')]===_0x7522('0x34');var _0x1eec1b=_0x427e43[_0x7522('0x36')];var _0x15844c=_0x1896c8?0x0:_0x17fd78[_0x7522('0x33')];var _0x4c80dd=_0x1896c8?_0x427e43[_0x7522('0x36')]:_0x17fd78[_0x7522('0x33')]+_0x17fd78[_0x7522('0x35')];var _0x9c08f1;if(_0x4c80dd>=_0x1eec1b){_0x4c80dd=_0x1eec1b;_0x9c08f1=0xc8;}else{_0x9c08f1=0xce;}_0x3b10d3[_0x7522('0x30')](_0x9c08f1);return _0x3b10d3['set'](_0x7522('0x37'),_0x15844c+'-'+_0x4c80dd+'/'+_0x1eec1b)[_0x7522('0x32')](_0x427e43);}return null;};}function patchUpdates(_0xa9d8eb){return function(_0x1be2ce){try{jsonpatch['apply'](_0x1be2ce,_0xa9d8eb,!![]);}catch(_0x30c730){return BPromise[_0x7522('0x38')](_0x30c730);}return _0x1be2ce[_0x7522('0x39')]();};}function saveUpdates(_0x27e0ed,_0x43b41e){return function(_0x12e2e1){if(_0x12e2e1){return _0x12e2e1[_0x7522('0x3a')](_0x27e0ed)[_0x7522('0x26')](function(_0x3a4579){return _0x3a4579;});}return null;};}function removeEntity(_0x2001b4,_0x16d452){return function(_0x312ac8){if(_0x312ac8){return _0x312ac8['destroy']()['then'](function(){var _0x314a8b=_0x312ac8['get']({'plain':!![]});var _0x26d153='WhatsappAccounts';return db['UserProfileResource']['destroy']({'where':{'type':_0x26d153,'resourceId':_0x314a8b['id']}})[_0x7522('0x26')](function(){return _0x312ac8;});})['then'](function(){_0x2001b4[_0x7522('0x30')](0xcc)['end']();});}};}function handleEntityNotFound(_0x26ef67,_0x3db4ac){return function(_0x39e0cc){if(!_0x39e0cc){_0x26ef67[_0x7522('0x2f')](0x194);}return _0x39e0cc;};}function handleError(_0x46fab5,_0x2febdd){_0x2febdd=_0x2febdd||0x1f4;return function(_0x35ab91){logger[_0x7522('0x2c')](_0x35ab91[_0x7522('0x3b')]);if(_0x35ab91[_0x7522('0x3c')]){delete _0x35ab91[_0x7522('0x3c')];}_0x46fab5[_0x7522('0x30')](_0x2febdd)[_0x7522('0x3d')](_0x35ab91);};}exports[_0x7522('0x3e')]=function(_0x4fc6a4,_0x3ee68a){var _0x91b71b={'include':[{'model':db[_0x7522('0x3f')],'as':_0x7522('0x40')}]},_0x5d6e6b={},_0x388756={'count':0x0,'rows':[]};var _0x51019d=_[_0x7522('0x41')](db[_0x7522('0x42')]['rawAttributes'],function(_0x38fb47){return{'name':_0x38fb47['fieldName'],'type':_0x38fb47['type'][_0x7522('0x43')]};});_0x5d6e6b[_0x7522('0x44')]=_[_0x7522('0x41')](_0x51019d,_0x7522('0x3c'));_0x5d6e6b['query']=_[_0x7522('0x45')](_0x4fc6a4[_0x7522('0x46')]);_0x5d6e6b['filters']=_[_0x7522('0x47')](_0x5d6e6b[_0x7522('0x44')],_0x5d6e6b[_0x7522('0x46')]);_0x91b71b[_0x7522('0x48')]=_[_0x7522('0x47')](_0x5d6e6b[_0x7522('0x44')],qs[_0x7522('0x49')](_0x4fc6a4[_0x7522('0x46')]['fields']));_0x91b71b[_0x7522('0x48')]=_0x91b71b[_0x7522('0x48')][_0x7522('0x4a')]?_0x91b71b['attributes']:_0x5d6e6b['model'];if(!_0x4fc6a4[_0x7522('0x46')][_0x7522('0x4b')](_0x7522('0x4c'))){_0x91b71b[_0x7522('0x35')]=qs[_0x7522('0x35')](_0x4fc6a4['query'][_0x7522('0x35')]);_0x91b71b[_0x7522('0x33')]=qs[_0x7522('0x33')](_0x4fc6a4['query'][_0x7522('0x33')]);}_0x91b71b['order']=qs[_0x7522('0x4d')](_0x4fc6a4[_0x7522('0x46')][_0x7522('0x4d')]);_0x91b71b['where']=qs['filters'](_[_0x7522('0x4e')](_0x4fc6a4[_0x7522('0x46')],_0x5d6e6b[_0x7522('0x4f')]),_0x51019d);if(_0x4fc6a4[_0x7522('0x46')][_0x7522('0x50')]){_0x91b71b[_0x7522('0x51')]=_[_0x7522('0x52')](_0x91b71b[_0x7522('0x51')],{'$or':_[_0x7522('0x41')](_0x51019d,function(_0x50d51f){if(_0x50d51f['type']!==_0x7522('0x53')){var _0x448432={};_0x448432[_0x50d51f[_0x7522('0x3c')]]={'$like':'%'+_0x4fc6a4[_0x7522('0x46')]['filter']+'%'};return _0x448432;}})});}_0x91b71b=_[_0x7522('0x52')]({},_0x91b71b,_0x4fc6a4['options']);var _0x319c03={'where':_0x91b71b[_0x7522('0x51')]};return db[_0x7522('0x42')][_0x7522('0x36')](_0x319c03)[_0x7522('0x26')](function(_0x14c81c){_0x388756[_0x7522('0x36')]=_0x14c81c;if(_0x4fc6a4[_0x7522('0x46')][_0x7522('0x54')]){_0x91b71b[_0x7522('0x55')]=[{'all':!![]}];}return db[_0x7522('0x42')][_0x7522('0x56')](_0x91b71b);})[_0x7522('0x26')](function(_0x1d3c35){_0x388756[_0x7522('0x57')]=_0x1d3c35;return _0x388756;})['then'](respondWithFilteredResult(_0x3ee68a,_0x91b71b))[_0x7522('0x58')](handleError(_0x3ee68a,null));};exports[_0x7522('0x59')]=function(_0xd57404,_0x39f648){var _0x1c3821={'raw':![],'where':{'id':_0xd57404[_0x7522('0x5a')]['id']},'include':[{'model':db['Pause'],'as':_0x7522('0x40')}]},_0x4a6e5d={};_0x4a6e5d['model']=_[_0x7522('0x45')](db[_0x7522('0x42')]['rawAttributes']);_0x4a6e5d[_0x7522('0x46')]=_[_0x7522('0x45')](_0xd57404[_0x7522('0x46')]);_0x4a6e5d[_0x7522('0x4f')]=_[_0x7522('0x47')](_0x4a6e5d[_0x7522('0x44')],_0x4a6e5d[_0x7522('0x46')]);_0x1c3821['attributes']=_['intersection'](_0x4a6e5d[_0x7522('0x44')],qs[_0x7522('0x49')](_0xd57404[_0x7522('0x46')][_0x7522('0x49')]));_0x1c3821[_0x7522('0x48')]=_0x1c3821[_0x7522('0x48')][_0x7522('0x4a')]?_0x1c3821[_0x7522('0x48')]:_0x4a6e5d[_0x7522('0x44')];if(_0xd57404['query']['includeAll']){_0x1c3821[_0x7522('0x55')]=[{'all':!![]}];}_0x1c3821=_['merge']({},_0x1c3821,_0xd57404[_0x7522('0x5b')]);return db[_0x7522('0x42')][_0x7522('0x5c')](_0x1c3821)[_0x7522('0x26')](handleEntityNotFound(_0x39f648,null))[_0x7522('0x26')](respondWithResult(_0x39f648,null))[_0x7522('0x58')](handleError(_0x39f648,null));};exports['create']=function(_0x5e7d67,_0x386417){return db[_0x7522('0x42')][_0x7522('0x5d')](_0x5e7d67['body'],{})[_0x7522('0x26')](function(_0x3b48ed){var _0x254ff0=_0x5e7d67[_0x7522('0x5e')][_0x7522('0x5f')]({'plain':!![]});if(!_0x254ff0)throw new Error(_0x7522('0x60'));if(_0x254ff0['role']===_0x7522('0x5e')){var _0xeb84ad=_0x3b48ed[_0x7522('0x5f')]({'plain':!![]});var _0x4f1d00=_0x7522('0x61');return db[_0x7522('0x62')][_0x7522('0x5c')]({'where':{'name':_0x4f1d00,'userProfileId':_0x254ff0['userProfileId']},'raw':!![]})['then'](function(_0x592529){if(_0x592529&&_0x592529[_0x7522('0x63')]===0x0){return db['UserProfileResource'][_0x7522('0x5d')]({'name':_0xeb84ad[_0x7522('0x3c')],'resourceId':_0xeb84ad['id'],'type':_0x592529[_0x7522('0x3c')],'sectionId':_0x592529['id']},{})[_0x7522('0x26')](function(){return _0x3b48ed;});}else{return _0x3b48ed;}})[_0x7522('0x58')](function(_0x5976dc){logger[_0x7522('0x2c')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x5976dc);throw _0x5976dc;});}return _0x3b48ed;})[_0x7522('0x26')](respondWithResult(_0x386417,0xc9))['catch'](handleError(_0x386417,null));};exports[_0x7522('0x3a')]=function(_0x49d93a,_0x3f8ae1){if(_0x49d93a[_0x7522('0x64')]['id']){delete _0x49d93a[_0x7522('0x64')]['id'];}return db[_0x7522('0x42')][_0x7522('0x5c')]({'where':{'id':_0x49d93a[_0x7522('0x5a')]['id']},'include':[{'model':db[_0x7522('0x3f')],'as':'mandatoryDispositionPause'}]})[_0x7522('0x26')](handleEntityNotFound(_0x3f8ae1,null))[_0x7522('0x26')](saveUpdates(_0x49d93a['body'],null))['then'](respondWithResult(_0x3f8ae1,null))[_0x7522('0x58')](handleError(_0x3f8ae1,null));};exports['destroy']=function(_0x35e14d,_0x1b5767){return db[_0x7522('0x42')][_0x7522('0x5c')]({'where':{'id':_0x35e14d[_0x7522('0x5a')]['id']}})['then'](handleEntityNotFound(_0x1b5767,null))[_0x7522('0x26')](removeEntity(_0x1b5767,null))[_0x7522('0x58')](handleError(_0x1b5767,null));};exports['describe']=function(_0x569243,_0x75b75a){return db[_0x7522('0x42')][_0x7522('0x65')]()['then'](respondWithResult(_0x75b75a,null))['catch'](handleError(_0x75b75a,null));};exports['addDisposition']=function(_0x1fb628,_0x526170,_0x18e5b5){if(_0x1fb628[_0x7522('0x64')]['id']){delete _0x1fb628[_0x7522('0x64')]['id'];}return db['WhatsappAccount'][_0x7522('0x5c')]({'where':{'id':_0x1fb628['params']['id']}})[_0x7522('0x26')](handleEntityNotFound(_0x526170,null))[_0x7522('0x26')](function(_0x41c209){if(_0x41c209){_0x1fb628[_0x7522('0x64')][_0x7522('0x66')]=_0x41c209['id'];return db[_0x7522('0x67')][_0x7522('0x5d')](_0x1fb628[_0x7522('0x64')]);}})[_0x7522('0x26')](respondWithResult(_0x526170,null))[_0x7522('0x58')](handleError(_0x526170,null));};exports[_0x7522('0x68')]=function(_0x37aa02,_0x45c601,_0x29b188){var _0x24ff94={'raw':![],'where':{}};var _0x52c779={};var _0x535998={'count':0x0,'rows':[]};return db[_0x7522('0x42')][_0x7522('0x69')]({'where':{'id':_0x37aa02[_0x7522('0x5a')]['id']}})[_0x7522('0x26')](handleEntityNotFound(_0x45c601,null))[_0x7522('0x26')](function(_0x2f06b9){if(_0x2f06b9){_0x52c779[_0x7522('0x44')]=_[_0x7522('0x45')](db['Disposition'][_0x7522('0x6a')]);_0x52c779[_0x7522('0x46')]=_['keys'](_0x37aa02[_0x7522('0x46')]);_0x52c779[_0x7522('0x4f')]=_[_0x7522('0x47')](_0x52c779[_0x7522('0x44')],_0x52c779[_0x7522('0x46')]);_0x24ff94['attributes']=_[_0x7522('0x47')](_0x52c779[_0x7522('0x44')],qs[_0x7522('0x49')](_0x37aa02['query'][_0x7522('0x49')]));_0x24ff94[_0x7522('0x48')]=_0x24ff94[_0x7522('0x48')][_0x7522('0x4a')]?_0x24ff94['attributes']:_0x52c779[_0x7522('0x44')];if(!_0x37aa02[_0x7522('0x46')][_0x7522('0x4b')]('nolimit')){_0x24ff94['limit']=qs[_0x7522('0x35')](_0x37aa02[_0x7522('0x46')][_0x7522('0x35')]);_0x24ff94['offset']=qs[_0x7522('0x33')](_0x37aa02[_0x7522('0x46')][_0x7522('0x33')]);}_0x24ff94[_0x7522('0x6b')]=qs[_0x7522('0x4d')](_0x37aa02[_0x7522('0x46')][_0x7522('0x4d')]);_0x24ff94[_0x7522('0x51')]=qs[_0x7522('0x4f')](_[_0x7522('0x4e')](_0x37aa02[_0x7522('0x46')],_0x52c779[_0x7522('0x4f')]));_0x24ff94['where']['WhatsappAccountId']=_0x2f06b9['id'];if(_0x37aa02['query'][_0x7522('0x50')]){_0x24ff94[_0x7522('0x51')]=_[_0x7522('0x52')](_0x24ff94[_0x7522('0x51')],{'$or':_[_0x7522('0x41')](_0x24ff94['attributes'],function(_0x5ee253){var _0x9e1759={};_0x9e1759[_0x5ee253]={'$like':'%'+_0x37aa02[_0x7522('0x46')]['filter']+'%'};return _0x9e1759;})});}_0x24ff94=_[_0x7522('0x52')]({},_0x24ff94,_0x37aa02[_0x7522('0x5b')]);return db[_0x7522('0x67')][_0x7522('0x36')]({'where':_0x24ff94[_0x7522('0x51')]})[_0x7522('0x26')](function(_0x11f9cd){_0x535998['count']=_0x11f9cd;if(_0x37aa02[_0x7522('0x46')][_0x7522('0x54')]){_0x24ff94[_0x7522('0x55')]=[{'all':!![]}];}return db[_0x7522('0x67')][_0x7522('0x56')](_0x24ff94);})['then'](function(_0x324987){_0x535998['rows']=_0x324987;return _0x535998;});}})[_0x7522('0x26')](respondWithFilteredResult(_0x45c601,_0x24ff94))['catch'](handleError(_0x45c601,null));};exports['removeDispositions']=function(_0x5e442b,_0x40222f,_0x560234){return db[_0x7522('0x42')]['find']({'where':{'id':_0x5e442b[_0x7522('0x5a')]['id']}})[_0x7522('0x26')](handleEntityNotFound(_0x40222f,null))['then'](function(_0x297e33){if(_0x297e33){return _0x297e33[_0x7522('0x6c')](_0x5e442b[_0x7522('0x46')]['ids']);}})['then'](respondWithStatusCode(_0x40222f,null))[_0x7522('0x58')](handleError(_0x40222f,null));};exports[_0x7522('0x6d')]=function(_0x248e22,_0x13a2b7,_0x38801b){if(_0x248e22[_0x7522('0x64')]['id']){delete _0x248e22[_0x7522('0x64')]['id'];}return db['WhatsappAccount'][_0x7522('0x5c')]({'where':{'id':_0x248e22['params']['id']}})[_0x7522('0x26')](handleEntityNotFound(_0x13a2b7,null))[_0x7522('0x26')](function(_0x421b9c){if(_0x421b9c){_0x248e22[_0x7522('0x64')]['WhatsappAccountId']=_0x421b9c['id'];return db[_0x7522('0x6e')][_0x7522('0x5d')](_0x248e22['body']);}})['then'](respondWithResult(_0x13a2b7,null))[_0x7522('0x58')](handleError(_0x13a2b7,null));};exports[_0x7522('0x6f')]=function(_0x42542b,_0x4c56f7,_0x10b1e9){var _0x43f9ff={'raw':![],'where':{}};var _0x3dfc43={};var _0x3d02fa={'count':0x0,'rows':[]};return db[_0x7522('0x42')]['findOne']({'where':{'id':_0x42542b[_0x7522('0x5a')]['id']}})[_0x7522('0x26')](handleEntityNotFound(_0x4c56f7,null))['then'](function(_0x3a0cda){if(_0x3a0cda){_0x3dfc43[_0x7522('0x44')]=_[_0x7522('0x45')](db[_0x7522('0x6e')][_0x7522('0x6a')]);_0x3dfc43['query']=_[_0x7522('0x45')](_0x42542b[_0x7522('0x46')]);_0x3dfc43[_0x7522('0x4f')]=_['intersection'](_0x3dfc43[_0x7522('0x44')],_0x3dfc43[_0x7522('0x46')]);_0x43f9ff[_0x7522('0x48')]=_[_0x7522('0x47')](_0x3dfc43[_0x7522('0x44')],qs[_0x7522('0x49')](_0x42542b[_0x7522('0x46')][_0x7522('0x49')]));_0x43f9ff[_0x7522('0x48')]=_0x43f9ff['attributes'][_0x7522('0x4a')]?_0x43f9ff[_0x7522('0x48')]:_0x3dfc43[_0x7522('0x44')];if(!_0x42542b[_0x7522('0x46')]['hasOwnProperty'](_0x7522('0x4c'))){_0x43f9ff['limit']=qs[_0x7522('0x35')](_0x42542b[_0x7522('0x46')][_0x7522('0x35')]);_0x43f9ff[_0x7522('0x33')]=qs[_0x7522('0x33')](_0x42542b[_0x7522('0x46')][_0x7522('0x33')]);}_0x43f9ff['order']=qs[_0x7522('0x4d')](_0x42542b[_0x7522('0x46')][_0x7522('0x4d')]);_0x43f9ff[_0x7522('0x51')]=qs[_0x7522('0x4f')](_[_0x7522('0x4e')](_0x42542b[_0x7522('0x46')],_0x3dfc43[_0x7522('0x4f')]));_0x43f9ff[_0x7522('0x51')][_0x7522('0x66')]=_0x3a0cda['id'];if(_0x42542b[_0x7522('0x46')][_0x7522('0x50')]){_0x43f9ff['where']=_['merge'](_0x43f9ff[_0x7522('0x51')],{'$or':_['map'](_0x43f9ff[_0x7522('0x48')],function(_0x58f7db){var _0x2f7983={};_0x2f7983[_0x58f7db]={'$like':'%'+_0x42542b[_0x7522('0x46')][_0x7522('0x50')]+'%'};return _0x2f7983;})});}_0x43f9ff=_[_0x7522('0x52')]({},_0x43f9ff,_0x42542b[_0x7522('0x5b')]);return db[_0x7522('0x6e')][_0x7522('0x36')]({'where':_0x43f9ff['where']})['then'](function(_0x69996d){_0x3d02fa[_0x7522('0x36')]=_0x69996d;if(_0x42542b[_0x7522('0x46')][_0x7522('0x54')]){_0x43f9ff['include']=[{'all':!![]}];}return db[_0x7522('0x6e')][_0x7522('0x56')](_0x43f9ff);})['then'](function(_0x3235f0){_0x3d02fa['rows']=_0x3235f0;return _0x3d02fa;});}})[_0x7522('0x26')](respondWithFilteredResult(_0x4c56f7,_0x43f9ff))['catch'](handleError(_0x4c56f7,null));};exports[_0x7522('0x70')]=function(_0x59f618,_0x6d8517,_0x5a1ef5){return db['WhatsappAccount']['find']({'where':{'id':_0x59f618[_0x7522('0x5a')]['id']}})[_0x7522('0x26')](handleEntityNotFound(_0x6d8517,null))[_0x7522('0x26')](function(_0x474805){if(_0x474805){return _0x474805[_0x7522('0x70')](_0x59f618['query'][_0x7522('0x71')]);}})['then'](respondWithStatusCode(_0x6d8517,null))['catch'](handleError(_0x6d8517,null));};exports[_0x7522('0x72')]=function(_0xf03b78,_0x500665,_0x54d5d7){return db['WhatsappAccount']['find']({'where':{'id':_0xf03b78[_0x7522('0x5a')]['id']}})[_0x7522('0x26')](handleEntityNotFound(_0x500665,null))[_0x7522('0x26')](function(_0x49e115){if(_0x49e115){return _0x49e115[_0x7522('0x72')](_0xf03b78[_0x7522('0x64')][_0x7522('0x71')],_[_0x7522('0x73')](_0xf03b78[_0x7522('0x64')],[_0x7522('0x71'),'id'])||{})[_0x7522('0x74')](function(_0xe24c7e){for(var _0x654c63=0x0;_0x654c63<_0xf03b78[_0x7522('0x64')]['ids'][_0x7522('0x4a')];_0x654c63+=0x1){socket[_0x7522('0x75')]('userWhatsappAccount:save',{'UserId':Number(_0xf03b78['body']['ids'][_0x654c63]),'WhatsappAccountId':Number(_0xf03b78[_0x7522('0x5a')]['id'])});}return _0xe24c7e;});}})[_0x7522('0x26')](respondWithResult(_0x500665,null))[_0x7522('0x58')](handleError(_0x500665,null));};exports[_0x7522('0x76')]=function(_0x2fc77e,_0x610610,_0x18e03a){return db['WhatsappAccount'][_0x7522('0x5c')]({'where':{'id':_0x2fc77e[_0x7522('0x5a')]['id']}})[_0x7522('0x26')](handleEntityNotFound(_0x610610,null))[_0x7522('0x26')](function(_0x5427b5){if(_0x5427b5){return _0x5427b5[_0x7522('0x76')](_0x2fc77e['query']['ids'])[_0x7522('0x26')](function(){if(_[_0x7522('0x77')](_0x2fc77e[_0x7522('0x46')]['ids'])){for(var _0x145555=0x0;_0x145555<_0x2fc77e[_0x7522('0x46')]['ids'][_0x7522('0x4a')];_0x145555+=0x1){socket[_0x7522('0x75')]('userWhatsappAccount:remove',{'UserId':Number(_0x2fc77e[_0x7522('0x46')][_0x7522('0x71')][_0x145555]),'WhatsappAccountId':Number(_0x2fc77e[_0x7522('0x5a')]['id'])});}}else{socket['emit'](_0x7522('0x78'),{'UserId':Number(_0x2fc77e[_0x7522('0x46')]['ids']),'WhatsappAccountId':Number(_0x2fc77e['params']['id'])});}});}})[_0x7522('0x26')](respondWithStatusCode(_0x610610,null))[_0x7522('0x58')](handleError(_0x610610,null));};exports[_0x7522('0x79')]=function(_0x146a25,_0x3d5edb,_0x48b501){var _0x596294={};var _0x32cf23={};var _0x2ab7fd;var _0x255aa0;return db[_0x7522('0x42')][_0x7522('0x69')]({'where':{'id':_0x146a25['params']['id']}})['then'](handleEntityNotFound(_0x3d5edb,null))[_0x7522('0x26')](function(_0x93eb8){if(_0x93eb8){_0x2ab7fd=_0x93eb8;_0x32cf23[_0x7522('0x44')]=_['keys'](db[_0x7522('0x7a')][_0x7522('0x6a')]);_0x32cf23[_0x7522('0x46')]=_['keys'](_0x146a25[_0x7522('0x46')]);_0x32cf23[_0x7522('0x4f')]=_[_0x7522('0x47')](_0x32cf23[_0x7522('0x44')],_0x32cf23[_0x7522('0x46')]);_0x596294[_0x7522('0x48')]=_[_0x7522('0x47')](_0x32cf23[_0x7522('0x44')],qs[_0x7522('0x49')](_0x146a25[_0x7522('0x46')][_0x7522('0x49')]));_0x596294['attributes']=_0x596294['attributes']['length']?_0x596294[_0x7522('0x48')]:_0x32cf23[_0x7522('0x44')];_0x596294[_0x7522('0x6b')]=qs[_0x7522('0x4d')](_0x146a25[_0x7522('0x46')][_0x7522('0x4d')]);_0x596294['where']=qs[_0x7522('0x4f')](_['pick'](_0x146a25[_0x7522('0x46')],_0x32cf23[_0x7522('0x4f')]));if(_0x146a25[_0x7522('0x46')]['filter']){_0x596294['where']=_[_0x7522('0x52')](_0x596294[_0x7522('0x51')],{'$or':_['map'](_0x596294[_0x7522('0x48')],function(_0x348cb1){var _0x331636={};_0x331636[_0x348cb1]={'$like':'%'+_0x146a25[_0x7522('0x46')][_0x7522('0x50')]+'%'};return _0x331636;})});}_0x596294=_['merge']({},_0x596294,_0x146a25[_0x7522('0x5b')]);return _0x2ab7fd[_0x7522('0x79')](_0x596294);}})[_0x7522('0x26')](function(_0xd25509){if(_0xd25509){_0x255aa0=_0xd25509[_0x7522('0x4a')];if(!_0x146a25[_0x7522('0x46')][_0x7522('0x4b')](_0x7522('0x4c'))){_0x596294[_0x7522('0x35')]=qs[_0x7522('0x35')](_0x146a25[_0x7522('0x46')][_0x7522('0x35')]);_0x596294[_0x7522('0x33')]=qs[_0x7522('0x33')](_0x146a25[_0x7522('0x46')][_0x7522('0x33')]);}return _0x2ab7fd['getAgents'](_0x596294);}})['then'](function(_0x7a58c4){if(_0x7a58c4){return _0x7a58c4?{'count':_0x255aa0,'rows':_0x7a58c4}:null;}})[_0x7522('0x26')](respondWithResult(_0x3d5edb,null))['catch'](handleError(_0x3d5edb,null));};exports[_0x7522('0x7b')]=function(_0x5a8ef2,_0x5347b8){var _0x438a73=_0x5a8ef2[_0x7522('0x5a')]['id'];var _0x3efcaa=_0x5a8ef2[_0x7522('0x64')];var _0x1e9230=0xc8;var _0x28822b=null;return db[_0x7522('0x7c')][_0x7522('0x7d')]({'isolationLevel':db[_0x7522('0x7c')]['Transaction'][_0x7522('0x7e')][_0x7522('0x7f')]},function(_0x31313a){return db['WhatsappAccount']['findOne']({'where':{'id':_0x438a73},'transaction':_0x31313a})[_0x7522('0x26')](function(_0x354fa4){if(_0x354fa4){return db[_0x7522('0x80')][_0x7522('0x81')]({'where':{'WhatsappAccountId':_0x438a73},'transaction':_0x31313a})[_0x7522('0x26')](function(){var _0x4116dc=_[_0x7522('0x41')](_0x3efcaa,function(_0x5042e3){_0x5042e3['WhatsappAccountId']=_0x438a73;return _0x5042e3;});return db['WhatsappApplication'][_0x7522('0x82')](_0x4116dc,{'transaction':_0x31313a});});}else{_0x1e9230=0x194;_0x28822b=[];}});})[_0x7522('0x26')](function(){if(_0x1e9230!==0x194){return db[_0x7522('0x80')][_0x7522('0x83')]({'where':{'WhatsappAccountId':_0x438a73},'order':_0x7522('0x84')})[_0x7522('0x26')](function(_0x451fe4){_0x28822b=_0x451fe4;});}})[_0x7522('0x58')](function(_0x1c6082){_0x1e9230=0x1f4;logger[_0x7522('0x2c')](_0x1c6082[_0x7522('0x3b')]);if(_0x1c6082['name']){delete _0x1c6082[_0x7522('0x3c')];}_0x28822b=_0x1c6082;})[_0x7522('0x85')](function(){if(_0x28822b===null){_0x5347b8[_0x7522('0x2f')](_0x1e9230);}else{if(_0x1e9230===0x1f4){_0x5347b8[_0x7522('0x30')](_0x1e9230)[_0x7522('0x3d')](_0x28822b);}else{_0x5347b8['status'](_0x1e9230)[_0x7522('0x32')](_0x28822b);}}});};exports[_0x7522('0x86')]=function(_0x175fff,_0x7fa1c2,_0xf08f8b){var _0x699091={};var _0x4efe0b={};var _0x28e4fc;var _0x2e1a42;return db[_0x7522('0x42')][_0x7522('0x69')]({'where':{'id':_0x175fff[_0x7522('0x5a')]['id']}})[_0x7522('0x26')](handleEntityNotFound(_0x7fa1c2,null))['then'](function(_0x4db32b){if(_0x4db32b){_0x28e4fc=_0x4db32b;_0x4efe0b['model']=_[_0x7522('0x45')](db[_0x7522('0x80')][_0x7522('0x6a')]);_0x4efe0b['query']=_[_0x7522('0x45')](_0x175fff['query']);_0x4efe0b[_0x7522('0x4f')]=_[_0x7522('0x47')](_0x4efe0b[_0x7522('0x44')],_0x4efe0b['query']);_0x699091[_0x7522('0x48')]=_[_0x7522('0x47')](_0x4efe0b[_0x7522('0x44')],qs[_0x7522('0x49')](_0x175fff[_0x7522('0x46')][_0x7522('0x49')]));_0x699091[_0x7522('0x48')]=_0x699091[_0x7522('0x48')][_0x7522('0x4a')]?_0x699091[_0x7522('0x48')]:_0x4efe0b['model'];_0x699091['order']=qs['sort'](_0x175fff[_0x7522('0x46')][_0x7522('0x4d')]);_0x699091[_0x7522('0x51')]=qs[_0x7522('0x4f')](_[_0x7522('0x4e')](_0x175fff[_0x7522('0x46')],_0x4efe0b[_0x7522('0x4f')]));if(_0x175fff['query']['filter']){_0x699091[_0x7522('0x51')]=_[_0x7522('0x52')](_0x699091[_0x7522('0x51')],{'$or':_['map'](_0x699091[_0x7522('0x48')],function(_0x2e7cd7){var _0x368d65={};_0x368d65[_0x2e7cd7]={'$like':'%'+_0x175fff[_0x7522('0x46')]['filter']+'%'};return _0x368d65;})});}_0x699091=_[_0x7522('0x52')]({},_0x699091,_0x175fff[_0x7522('0x5b')]);return _0x28e4fc[_0x7522('0x86')](_0x699091);}})[_0x7522('0x26')](function(_0x59ff81){if(_0x59ff81){_0x2e1a42=_0x59ff81[_0x7522('0x4a')];if(!_0x175fff['query'][_0x7522('0x4b')]('nolimit')){_0x699091[_0x7522('0x35')]=qs[_0x7522('0x35')](_0x175fff['query']['limit']);_0x699091[_0x7522('0x33')]=qs[_0x7522('0x33')](_0x175fff[_0x7522('0x46')][_0x7522('0x33')]);}return _0x28e4fc[_0x7522('0x86')](_0x699091);}})[_0x7522('0x26')](function(_0x47204e){if(_0x47204e){return _0x47204e?{'count':_0x2e1a42,'rows':_0x47204e}:null;}})[_0x7522('0x26')](respondWithResult(_0x7fa1c2,null))['catch'](handleError(_0x7fa1c2,null));};exports['notify']=function(_0x4998c2,_0x2aeef2,_0x15f968){var _0x28ef1a={'channel':_0x7522('0x87')};var _0x1fb59b=[];var _0x2a45ff=[];var _0x259214={};return db[_0x7522('0x42')][_0x7522('0x5c')]({'where':{'id':_0x4998c2[_0x7522('0x5a')]['id']},'include':[{'model':db['WhatsappApplication'],'as':'Applications'}]})[_0x7522('0x26')](handleEntityNotFound(_0x2aeef2,null))[_0x7522('0x26')](function(_0x3295e4){_0x28ef1a[_0x7522('0x88')]=_0x3295e4;if(_0x28ef1a[_0x7522('0x88')]&&_0x28ef1a[_0x7522('0x88')]['type']===_0x7522('0x89')&&_0x4998c2[_0x7522('0x64')][_0x7522('0x8a')]){if(_0x4998c2['body'][_0x7522('0x8a')][_0x7522('0x4a')]===0x0)return;if(_0x4998c2[_0x7522('0x64')][_0x7522('0x8a')][0x0][_0x7522('0x8b')]!=='read')return;return db[_0x7522('0x8c')][_0x7522('0x3a')]({'read':!![],'readAt':_0x4998c2[_0x7522('0x64')][_0x7522('0x8a')][0x0][_0x7522('0x8d')]},{'where':{'messageId':_0x4998c2[_0x7522('0x64')][_0x7522('0x8a')][0x0]['message_id']},'individualHooks':!![]})[_0x7522('0x26')](function(_0x5cabdd){return _0x2aeef2['status'](0xc8)['json'](_0x5cabdd);});}_0x28ef1a[_0x7522('0x8e')]=_[_0x7522('0x8f')](_0x3295e4[_0x7522('0x90')],[_0x7522('0x84')],[_0x7522('0x91')]);if(_0x28ef1a[_0x7522('0x88')][_0x7522('0x90')]){delete _0x28ef1a[_0x7522('0x88')][_0x7522('0x90')];}return db[_0x7522('0x92')][_0x7522('0x65')]()['then'](function(_0x50e992){if(!_0x50e992){throw new db['Sequelize']['ValidationError'](_0x7522('0x93'));}_0x1fb59b=_[_0x7522('0x94')](_[_0x7522('0x45')](_0x50e992),[_0x7522('0x95'),_0x7522('0x96')]);_0x2a45ff=_['difference'](_[_0x7522('0x45')](_0x50e992),[_0x7522('0x95'),'updatedAt',_0x7522('0x97'),'ListId']);_0x28ef1a['body']={'mapKey':_0x7522('0x98')};if(_0x28ef1a['account']&&_0x28ef1a[_0x7522('0x88')]['type']==='twilio'){_0x28ef1a['body']['from']=_0x4998c2[_0x7522('0x64')]['From'][_0x7522('0x99')](_0x7522('0x9a'),'');_0x28ef1a[_0x7522('0x64')][_0x7522('0x64')]=_0x4998c2[_0x7522('0x64')][_0x7522('0x9b')];_0x28ef1a[_0x7522('0x64')][_0x7522('0x9c')]=_0x4998c2['body']['MessageSid'];}if(_0x28ef1a[_0x7522('0x88')]&&_0x28ef1a[_0x7522('0x88')][_0x7522('0x9d')]===_0x7522('0x89')){_0x28ef1a[_0x7522('0x64')]['from']=_0x4998c2[_0x7522('0x64')][_0x7522('0x9e')][0x0]['from'];_0x28ef1a['body']['body']=_0x4998c2['body']['notifications'][0x0][_0x7522('0x2e')][_0x7522('0x64')];_0x28ef1a['body'][_0x7522('0x9c')]=_0x4998c2[_0x7522('0x64')][_0x7522('0x9e')][0x0][_0x7522('0x9f')];}if(_0x28ef1a[_0x7522('0x64')]['id']){delete _0x28ef1a[_0x7522('0x64')]['id'];}if(_[_0x7522('0xa0')](_0x28ef1a['body'][_0x7522('0xa1')])){throw new db[(_0x7522('0xa2'))][(_0x7522('0xa3'))](_0x7522('0xa4'));}if(_['isNil'](_0x28ef1a[_0x7522('0x64')][_0x7522('0x64')])||_0x28ef1a[_0x7522('0x64')][_0x7522('0x64')]===''){throw new db[(_0x7522('0xa2'))]['ValidationError'](_0x7522('0xa5'));}if(_[_0x7522('0xa0')](_0x28ef1a['body'][_0x7522('0xa6')])){throw new db[(_0x7522('0xa2'))][(_0x7522('0xa3'))]('mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x2a45ff);}if(!_['includes'](_0x2a45ff,_0x28ef1a['body'][_0x7522('0xa6')])){throw new db[(_0x7522('0xa2'))][(_0x7522('0xa3'))]('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x2a45ff);}_0x259214[_0x28ef1a[_0x7522('0x64')][_0x7522('0xa6')]]=_0x28ef1a[_0x7522('0x64')][_0x7522('0xa1')];return db['CmList'][_0x7522('0x5c')]({'where':{'id':_0x28ef1a[_0x7522('0x88')][_0x7522('0xa7')]},'include':[{'model':db[_0x7522('0x92')],'as':'Contacts','where':_0x259214,'limit':0x1,'order':[[_0x7522('0x96'),'DESC']]}]});})[_0x7522('0x26')](handleEntityNotFound(_0x2aeef2,null))[_0x7522('0x26')](function(_0x3100b8){if(_0x3100b8){_0x28ef1a[_0x7522('0xa8')]=_[_0x7522('0x73')](_0x3100b8,[_0x7522('0xa9')]);if(_0x3100b8[_0x7522('0xa9')][_0x7522('0x4a')]){return _0x3100b8['Contacts'][0x0];}var _0x49b7a1=_['defaults'](_0x28ef1a[_0x7522('0x64')],{'firstName':_0x28ef1a[_0x7522('0x64')][_0x7522('0xa1')],'ListId':_0x3100b8['id']});_0x49b7a1[_0x28ef1a[_0x7522('0x64')][_0x7522('0xa6')]]=_0x28ef1a[_0x7522('0x64')][_0x7522('0xa1')];return db[_0x7522('0x92')][_0x7522('0x5d')](_0x49b7a1,{'fields':_0x1fb59b,'raw':!![]});}})[_0x7522('0x26')](handleEntityNotFound(_0x2aeef2,null))['then'](function(_0x10c850){if(_0x10c850){_0x28ef1a[_0x7522('0xaa')]=_0x10c850;var _0x87d9b2={'ContactId':_0x10c850['id'],'phone':_0x28ef1a[_0x7522('0x64')]['from'],'WhatsappAccountId':_0x4998c2['params']['id']};var _0x93e85e={'ContactId':_0x10c850['id'],'WhatsappAccountId':_0x4998c2[_0x7522('0x5a')]['id'],'closed':![]};return db[_0x7522('0xab')][_0x7522('0x5c')]({'where':_0x93e85e})[_0x7522('0x26')](function(_0x27c190){if(_0x27c190){return[_0x27c190,![]];}return db['WhatsappInteraction'][_0x7522('0x5d')](_0x87d9b2)[_0x7522('0x26')](function(_0x22fd59){return[_0x22fd59,!![]];});});}})[_0x7522('0x74')](function(_0x254355,_0x34affd){_0x28ef1a[_0x7522('0xac')]=_0x254355[_0x7522('0x5f')]({'plain':!![]});_0x28ef1a[_0x7522('0xac')][_0x7522('0xad')]=![];if(_0x34affd){if(_0x28ef1a['account'][_0x7522('0xae')]){_0x28ef1a[_0x7522('0x8e')][_0x7522('0xaf')]({'id':0x0,'priority':_0x28ef1a['applications']['length']+0x1,'app':_0x7522('0xb0'),'appdata':'unmanaged','interval':'*,*,*,*'});}_0x28ef1a[_0x7522('0xac')][_0x7522('0xad')]=!![];}return db[_0x7522('0x8c')]['create']({'phone':_0x28ef1a[_0x7522('0x64')][_0x7522('0xa1')],'messageId':_0x28ef1a[_0x7522('0x64')]['messageId'],'body':_0x28ef1a['body'][_0x7522('0x64')],'WhatsappAccountId':_0x4998c2[_0x7522('0x5a')]['id'],'WhatsappInteractionId':_0x254355['id'],'direction':'in','ContactId':_0x254355[_0x7522('0xb1')],'AttachmentId':_0x28ef1a[_0x7522('0x64')][_0x7522('0xb2')]});})[_0x7522('0x26')](function(_0x1f226c){_0x28ef1a['message']=_0x1f226c;if(!_0x28ef1a[_0x7522('0xac')]['UserId'])return;return db[_0x7522('0x7a')][_0x7522('0x5c')]({'attributes':['id',_0x7522('0x3c')],'where':{'id':_0x28ef1a['interaction'][_0x7522('0xb3')]}});})['then'](function(_0x5d8945){if(_0x5d8945){_0x28ef1a['applications'][_0x7522('0xb4')]({'id':0x0,'priority':0x0,'app':_0x7522('0xb5'),'appdata':_0x5d8945[_0x7522('0x3c')]+','+(_0x28ef1a[_0x7522('0x88')]['waitForTheAssignedAgent']||0xa),'interval':_0x7522('0xb6')});}if(!_0x28ef1a[_0x7522('0xac')][_0x7522('0xb7')])return;return db[_0x7522('0xb8')][_0x7522('0x5c')]({'attributes':['id',_0x7522('0x3c')],'where':{'id':_0x28ef1a[_0x7522('0xac')]['queueId']}});})['then'](function(_0x3e9163){if(_0x3e9163){_0x28ef1a[_0x7522('0x8e')]['unshift']({'id':0x0,'priority':0x1,'app':_0x7522('0xb9'),'appdata':_0x3e9163[_0x7522('0x3c')]+','+(_0x28ef1a[_0x7522('0x88')][_0x7522('0xba')]||0x12c),'interval':'*,*,*,*'});}return respondWithRpcPromise(_0x7522('0xbb'),_0x7522('0xbc'),_0x28ef1a);})[_0x7522('0x26')](function(_0xea564a){if(_0xea564a){var _0x2e228f=0xc8;var _0x28835e='receiveMessage';logger[_0x7522('0x27')](_0x7522('0x2a'),_0x28835e,_0x2e228f,_0x7522('0xbd'));logger[_0x7522('0xbe')](_0x7522('0xbf'),_0x28835e,_0x2e228f,_0x7522('0xbd'),JSON[_0x7522('0x2b')](_0xea564a));if(_0x28ef1a[_0x7522('0x88')]['type']===_0x7522('0xc0')){return _0x2aeef2['status'](_0x2e228f)[_0x7522('0xc1')](_0x7522('0xc2'),_0x7522('0xc3'))[_0x7522('0x3d')](_0x7522('0xc4'));}else{return _0x2aeef2[_0x7522('0x30')](_0x2e228f)[_0x7522('0x32')](_0xea564a);}}});})[_0x7522('0x58')](handleError(_0x2aeef2,null));};exports[_0x7522('0x3d')]=function(_0x4c6907,_0x46f896,_0x4fa1d4){var _0xe94da6,_0x591391,_0x20779d;if(_[_0x7522('0xa0')](_0x4c6907['body'][_0x7522('0x64')])||_0x4c6907[_0x7522('0x64')][_0x7522('0x64')]===''){throw new db[(_0x7522('0xa2'))][(_0x7522('0xa3'))]('body\x20is\x20mandatory\x20and\x20not\x20empty');}if(_[_0x7522('0xa0')](_0x4c6907[_0x7522('0x64')]['to'])){throw new db[(_0x7522('0xa2'))][(_0x7522('0xa3'))]('to\x20is\x20mandatory');}_0xe94da6=_0x4c6907[_0x7522('0x64')]['to'];return db['WhatsappAccount'][_0x7522('0x5c')]({'where':{'id':_0x4c6907[_0x7522('0x5a')]['id']},'include':[{'model':db[_0x7522('0xc5')],'as':_0x7522('0xc6'),'include':[{'model':db['CmContact'],'as':_0x7522('0xa9'),'where':{'mobile':_0xe94da6},'limit':0x1,'order':[[_0x7522('0x96'),_0x7522('0xc7')]]}]}]})[_0x7522('0x26')](handleEntityNotFound(_0x46f896,null))[_0x7522('0x26')](function(_0x5a606b){if(_0x5a606b&&_0x5a606b[_0x7522('0xc6')]){_0x591391=_0x5a606b[_0x7522('0x5f')]({'plain':!![]});if(_0x591391[_0x7522('0xc6')]&&_0x591391[_0x7522('0xc6')]['Contacts'][_0x7522('0x4a')]){return _0x591391[_0x7522('0xc6')][_0x7522('0xa9')][0x0];}return db[_0x7522('0x92')][_0x7522('0x5d')](_[_0x7522('0x1e')](_0x4c6907['body'],{'firstName':_0xe94da6,'mobile':_0xe94da6,'phone':_0xe94da6,'ListId':_0x591391[_0x7522('0xa7')]}));}})['then'](handleEntityNotFound(_0x46f896,null))[_0x7522('0x26')](function(_0x8de6e5){if(_0x8de6e5){_0x20779d=_0x8de6e5;return db['WhatsappInteraction'][_0x7522('0x5c')]({'where':{'ContactId':_0x20779d['id'],'closed':![],'WhatsappAccountId':_0x591391['id']}})['then'](function(_0x57f9aa){if(_0x57f9aa){return[_0x57f9aa,![]];}return db['WhatsappInteraction'][_0x7522('0x5d')]({'UserId':_0x4c6907[_0x7522('0x5e')]['id'],'ContactId':_0x20779d['id'],'WhatsappAccountId':_0x591391['id'],'phone':_0xe94da6,'firstMsgDirection':'out','Messages':[_[_0x7522('0x52')](_0x4c6907['body'],{'read':![],'body':_0x4c6907[_0x7522('0x64')]['body'],'phone':_0xe94da6,'WhatsappAccountId':_0x591391['id'],'UserId':_0x4c6907['user']['id'],'ContactId':_0x20779d['id']})]},{'include':[{'model':db['WhatsappMessage'],'as':_0x7522('0xc8')}]})[_0x7522('0x26')](function(_0x50879e){return[_0x50879e,!![]];});});}})[_0x7522('0x74')](function(_0x319467,_0x5ce8fe){if(_0x5ce8fe){return _0x319467;}return db['WhatsappMessage'][_0x7522('0x5d')](_[_0x7522('0x52')](_0x4c6907[_0x7522('0x64')],{'read':![],'body':_0x4c6907[_0x7522('0x64')][_0x7522('0x64')],'phone':_0xe94da6,'WhatsappAccountId':_0x591391['id'],'WhatsappInteractionId':_0x319467['id'],'UserId':_0x4c6907['user']['id'],'ContactId':_0x20779d['id']}))['then'](function(_0x431b6a){_0x319467[_0x7522('0xc9')]['Messages']=[];_0x319467[_0x7522('0xc9')][_0x7522('0xc8')][_0x7522('0xaf')](_0x431b6a[_0x7522('0xc9')]);return _0x319467;});})[_0x7522('0x26')](respondWithResult(_0x46f896,null))['catch'](handleError(_0x46f896,null));};
\ No newline at end of file
+var _0x8533=['filters','intersection','model','fields','attributes','length','hasOwnProperty','nolimit','sort','where','merge','VIRTUAL','filter','options','include','findAll','show','params','keys','includeAll','find','catch','create','body','user','role','userProfileId','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','destroy','describe','WhatsappAccountId','order','pick','Disposition','rows','removeDispositions','addAnswer','CannedAnswer','getAnswers','findOne','removeAnswers','addAgents','omit','ids','spread','emit','userWhatsappAccount:save','removeAgents','isArray','getAgents','User','addApplications','transaction','sequelize','Transaction','ISOLATION_LEVELS','READ_COMMITTED','WhatsappApplication','bulkCreate','priority','finally','getApplications','notify','account','sinch','statuses','state','read','WhatsappMessage','message_id','applications','orderBy','Applications','asc','CmContact','Sequelize','ValidationError','difference','createdAt','updatedAt','ListId','mobile','twilio','from','From','replace','Body','messageId','MessageSid','notifications','isNil','from\x20is\x20mandatory','body\x20is\x20mandatory\x20and\x20not\x20empty','mapKey','mapKey\x20is\x20mandatory,\x20please\x20use\x20one\x20of\x20these:\x20','includes','Contacts','contact','WhatsappInteraction','interaction','created','push','close','unmanaged','*,*,*,*','ContactId','AttachmentId','UserId','unshift','waitForTheAssignedAgent','queueId','WhatsappQueue','queue','startRouting','receiveMessage','WhatsappAccount,\x20%s,\x20%s,\x20%s,\x20%s','stringify','Content-Type','text/xml','<?xml\x20version=\x221.0\x22\x20encoding=\x22UTF-8\x22?>\x0a<Response></Response>','to\x20is\x20mandatory','CmList','List','DESC','out','Messages','dataValues','eml-format','rimraf','zip-dir','request-promise','moment','mustache','path','to-csv','ejs','fs-extra','lodash','crypto','jsforce','desk.js','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/license/hardware','../../config/logger','api','../../config/utils','../../config/environment','../../config/license/util','redis','defaults','localhost','./whatsappAccount.socket','register','jayson/promise','request','info','WhatsappAccount,\x20%s,\x20%s','request\x20sent','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s','error','code','message','sendStatus','status','offset','limit','undefined','count','set','json','apply','reject','save','update','then','get','WhatsappAccounts','UserProfileResource','stack','name','send','Pause','mandatoryDispositionPause','WhatsappAccount','rawAttributes','fieldName','type','key','map','query'];(function(_0x408fdc,_0x28d14c){var _0x527651=function(_0x272b36){while(--_0x272b36){_0x408fdc['push'](_0x408fdc['shift']());}};_0x527651(++_0x28d14c);}(_0x8533,0x141));var _0x3853=function(_0x2c8b49,_0x3144fb){_0x2c8b49=_0x2c8b49-0x0;var _0x1abfd8=_0x8533[_0x2c8b49];return _0x1abfd8;};'use strict';var emlformat=require(_0x3853('0x0'));var rimraf=require(_0x3853('0x1'));var zipdir=require(_0x3853('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0x3853('0x3'));var moment=require(_0x3853('0x4'));var BPromise=require('bluebird');var Mustache=require(_0x3853('0x5'));var util=require('util');var path=require(_0x3853('0x6'));var sox=require('sox');var csv=require(_0x3853('0x7'));var ejs=require(_0x3853('0x8'));var fs=require('fs');var fs_extra=require(_0x3853('0x9'));var _=require(_0x3853('0xa'));var squel=require('squel');var crypto=require(_0x3853('0xb'));var jsforce=require(_0x3853('0xc'));var deskjs=require(_0x3853('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x3853('0xe'));var Redis=require(_0x3853('0xf'));var authService=require(_0x3853('0x10'));var qs=require(_0x3853('0x11'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0x3853('0x12'));var logger=require(_0x3853('0x13'))(_0x3853('0x14'));var utils=require(_0x3853('0x15'));var config=require(_0x3853('0x16'));var licenseUtil=require(_0x3853('0x17'));var db=require('../../mysqldb')['db'];config[_0x3853('0x18')]=_[_0x3853('0x19')](config[_0x3853('0x18')],{'host':_0x3853('0x1a'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x3853('0x18')]));require(_0x3853('0x1b'))[_0x3853('0x1c')](socket);var jayson=require(_0x3853('0x1d'));var client=jayson['client']['http']({'port':0x232c});function respondWithRpcPromise(_0x510e99,_0x130b7b,_0x77518,_0x378431){return new BPromise(function(_0x387d3c,_0x42c263){var _0x59eb33=_0x378431||client;return _0x59eb33[_0x3853('0x1e')](_0x510e99,_0x77518)['then'](function(_0x28f339){logger[_0x3853('0x1f')](_0x3853('0x20'),_0x130b7b,_0x3853('0x21'));logger[_0x3853('0x22')](_0x3853('0x23'),_0x130b7b,'request\x20sent',JSON['stringify'](_0x28f339));if(_0x28f339[_0x3853('0x24')]){if(_0x28f339['error'][_0x3853('0x25')]===0x1f4){logger[_0x3853('0x24')]('WhatsappAccount,\x20%s,\x20%s',_0x130b7b,_0x28f339[_0x3853('0x24')][_0x3853('0x26')]);return _0x42c263(_0x28f339[_0x3853('0x24')][_0x3853('0x26')]);}logger[_0x3853('0x24')]('WhatsappAccount,\x20%s,\x20%s',_0x130b7b,_0x28f339[_0x3853('0x24')][_0x3853('0x26')]);return _0x387d3c(_0x28f339[_0x3853('0x24')][_0x3853('0x26')]);}else{logger[_0x3853('0x1f')](_0x3853('0x20'),_0x130b7b,_0x3853('0x21'));_0x387d3c(_0x28f339['result'][_0x3853('0x26')]);}})['catch'](function(_0x3cdbab){logger['error']('WhatsappAccount,\x20%s,\x20%s',_0x130b7b,_0x3cdbab);_0x42c263(_0x3cdbab);});});}function respondWithStatusCode(_0x18c271,_0xd603df){_0xd603df=_0xd603df||0xcc;return function(_0x1415bc){if(_0x1415bc){return _0x18c271[_0x3853('0x27')](_0xd603df);}return _0x18c271[_0x3853('0x28')](_0xd603df)['end']();};}function respondWithResult(_0x460ebf,_0x2b6bab){_0x2b6bab=_0x2b6bab||0xc8;return function(_0x5c0e8e){if(_0x5c0e8e){return _0x460ebf[_0x3853('0x28')](_0x2b6bab)['json'](_0x5c0e8e);}};}function respondWithFilteredResult(_0x47dfcc,_0x4ad20b){return function(_0x20c68e){if(_0x20c68e){var _0x4391f2=typeof _0x4ad20b[_0x3853('0x29')]==='undefined'&&typeof _0x4ad20b[_0x3853('0x2a')]===_0x3853('0x2b');var _0x5b5ac8=_0x20c68e['count'];var _0x5873b3=_0x4391f2?0x0:_0x4ad20b[_0x3853('0x29')];var _0x2d6a84=_0x4391f2?_0x20c68e[_0x3853('0x2c')]:_0x4ad20b[_0x3853('0x29')]+_0x4ad20b[_0x3853('0x2a')];var _0x3bbdf7;if(_0x2d6a84>=_0x5b5ac8){_0x2d6a84=_0x5b5ac8;_0x3bbdf7=0xc8;}else{_0x3bbdf7=0xce;}_0x47dfcc[_0x3853('0x28')](_0x3bbdf7);return _0x47dfcc[_0x3853('0x2d')]('Content-Range',_0x5873b3+'-'+_0x2d6a84+'/'+_0x5b5ac8)[_0x3853('0x2e')](_0x20c68e);}return null;};}function patchUpdates(_0x44b983){return function(_0x554210){try{jsonpatch[_0x3853('0x2f')](_0x554210,_0x44b983,!![]);}catch(_0x4e4703){return BPromise[_0x3853('0x30')](_0x4e4703);}return _0x554210[_0x3853('0x31')]();};}function saveUpdates(_0x1e2b35,_0x53e4de){return function(_0x4a9e05){if(_0x4a9e05){return _0x4a9e05[_0x3853('0x32')](_0x1e2b35)['then'](function(_0x3c9966){return _0x3c9966;});}return null;};}function removeEntity(_0x21af77,_0x16e35a){return function(_0x3c64c0){if(_0x3c64c0){return _0x3c64c0['destroy']()[_0x3853('0x33')](function(){var _0x3db4cb=_0x3c64c0[_0x3853('0x34')]({'plain':!![]});var _0x3e4d22=_0x3853('0x35');return db[_0x3853('0x36')]['destroy']({'where':{'type':_0x3e4d22,'resourceId':_0x3db4cb['id']}})[_0x3853('0x33')](function(){return _0x3c64c0;});})[_0x3853('0x33')](function(){_0x21af77[_0x3853('0x28')](0xcc)['end']();});}};}function handleEntityNotFound(_0x4b2dd5,_0x965a1){return function(_0x4f6d4c){if(!_0x4f6d4c){_0x4b2dd5[_0x3853('0x27')](0x194);}return _0x4f6d4c;};}function handleError(_0xe97da8,_0x5a7d12){_0x5a7d12=_0x5a7d12||0x1f4;return function(_0x23c85d){logger[_0x3853('0x24')](_0x23c85d[_0x3853('0x37')]);if(_0x23c85d[_0x3853('0x38')]){delete _0x23c85d[_0x3853('0x38')];}_0xe97da8[_0x3853('0x28')](_0x5a7d12)[_0x3853('0x39')](_0x23c85d);};}exports['index']=function(_0x35d887,_0x3b3f5c){var _0x5c31e5={'include':[{'model':db[_0x3853('0x3a')],'as':_0x3853('0x3b')}]},_0x1d7437={},_0x20a543={'count':0x0,'rows':[]};var _0x3672c7=_['map'](db[_0x3853('0x3c')][_0x3853('0x3d')],function(_0x1abf37){return{'name':_0x1abf37[_0x3853('0x3e')],'type':_0x1abf37[_0x3853('0x3f')][_0x3853('0x40')]};});_0x1d7437['model']=_[_0x3853('0x41')](_0x3672c7,_0x3853('0x38'));_0x1d7437[_0x3853('0x42')]=_['keys'](_0x35d887[_0x3853('0x42')]);_0x1d7437[_0x3853('0x43')]=_[_0x3853('0x44')](_0x1d7437[_0x3853('0x45')],_0x1d7437[_0x3853('0x42')]);_0x5c31e5['attributes']=_[_0x3853('0x44')](_0x1d7437[_0x3853('0x45')],qs[_0x3853('0x46')](_0x35d887[_0x3853('0x42')]['fields']));_0x5c31e5[_0x3853('0x47')]=_0x5c31e5[_0x3853('0x47')][_0x3853('0x48')]?_0x5c31e5[_0x3853('0x47')]:_0x1d7437[_0x3853('0x45')];if(!_0x35d887[_0x3853('0x42')][_0x3853('0x49')](_0x3853('0x4a'))){_0x5c31e5[_0x3853('0x2a')]=qs[_0x3853('0x2a')](_0x35d887[_0x3853('0x42')]['limit']);_0x5c31e5[_0x3853('0x29')]=qs[_0x3853('0x29')](_0x35d887[_0x3853('0x42')][_0x3853('0x29')]);}_0x5c31e5['order']=qs['sort'](_0x35d887[_0x3853('0x42')][_0x3853('0x4b')]);_0x5c31e5[_0x3853('0x4c')]=qs[_0x3853('0x43')](_['pick'](_0x35d887['query'],_0x1d7437[_0x3853('0x43')]),_0x3672c7);if(_0x35d887[_0x3853('0x42')]['filter']){_0x5c31e5[_0x3853('0x4c')]=_[_0x3853('0x4d')](_0x5c31e5[_0x3853('0x4c')],{'$or':_['map'](_0x3672c7,function(_0x1f547c){if(_0x1f547c['type']!==_0x3853('0x4e')){var _0x9032d3={};_0x9032d3[_0x1f547c[_0x3853('0x38')]]={'$like':'%'+_0x35d887[_0x3853('0x42')][_0x3853('0x4f')]+'%'};return _0x9032d3;}})});}_0x5c31e5=_[_0x3853('0x4d')]({},_0x5c31e5,_0x35d887[_0x3853('0x50')]);var _0x59a854={'where':_0x5c31e5[_0x3853('0x4c')]};return db[_0x3853('0x3c')][_0x3853('0x2c')](_0x59a854)[_0x3853('0x33')](function(_0x413195){_0x20a543[_0x3853('0x2c')]=_0x413195;if(_0x35d887[_0x3853('0x42')]['includeAll']){_0x5c31e5[_0x3853('0x51')]=[{'all':!![]}];}return db[_0x3853('0x3c')][_0x3853('0x52')](_0x5c31e5);})[_0x3853('0x33')](function(_0x2fe692){_0x20a543['rows']=_0x2fe692;return _0x20a543;})[_0x3853('0x33')](respondWithFilteredResult(_0x3b3f5c,_0x5c31e5))['catch'](handleError(_0x3b3f5c,null));};exports[_0x3853('0x53')]=function(_0x2625b3,_0x2cfb59){var _0x17ca71={'raw':![],'where':{'id':_0x2625b3[_0x3853('0x54')]['id']},'include':[{'model':db[_0x3853('0x3a')],'as':_0x3853('0x3b')}]},_0x42c196={};_0x42c196[_0x3853('0x45')]=_[_0x3853('0x55')](db[_0x3853('0x3c')][_0x3853('0x3d')]);_0x42c196[_0x3853('0x42')]=_[_0x3853('0x55')](_0x2625b3[_0x3853('0x42')]);_0x42c196['filters']=_['intersection'](_0x42c196[_0x3853('0x45')],_0x42c196[_0x3853('0x42')]);_0x17ca71[_0x3853('0x47')]=_[_0x3853('0x44')](_0x42c196[_0x3853('0x45')],qs[_0x3853('0x46')](_0x2625b3[_0x3853('0x42')][_0x3853('0x46')]));_0x17ca71[_0x3853('0x47')]=_0x17ca71[_0x3853('0x47')][_0x3853('0x48')]?_0x17ca71[_0x3853('0x47')]:_0x42c196[_0x3853('0x45')];if(_0x2625b3[_0x3853('0x42')][_0x3853('0x56')]){_0x17ca71[_0x3853('0x51')]=[{'all':!![]}];}_0x17ca71=_[_0x3853('0x4d')]({},_0x17ca71,_0x2625b3[_0x3853('0x50')]);return db[_0x3853('0x3c')][_0x3853('0x57')](_0x17ca71)[_0x3853('0x33')](handleEntityNotFound(_0x2cfb59,null))[_0x3853('0x33')](respondWithResult(_0x2cfb59,null))[_0x3853('0x58')](handleError(_0x2cfb59,null));};exports[_0x3853('0x59')]=function(_0x52b8c7,_0x27ba52){return db[_0x3853('0x3c')][_0x3853('0x59')](_0x52b8c7[_0x3853('0x5a')],{})[_0x3853('0x33')](function(_0xf54b48){var _0xa1638b=_0x52b8c7[_0x3853('0x5b')][_0x3853('0x34')]({'plain':!![]});if(!_0xa1638b)throw new Error('Unable\x20to\x20retrieve\x20the\x20current\x20user');if(_0xa1638b[_0x3853('0x5c')]===_0x3853('0x5b')){var _0x27127b=_0xf54b48[_0x3853('0x34')]({'plain':!![]});var _0xf186dd=_0x3853('0x35');return db['UserProfileSection'][_0x3853('0x57')]({'where':{'name':_0xf186dd,'userProfileId':_0xa1638b[_0x3853('0x5d')]},'raw':!![]})[_0x3853('0x33')](function(_0xd6b6af){if(_0xd6b6af&&_0xd6b6af['autoAssociation']===0x0){return db['UserProfileResource'][_0x3853('0x59')]({'name':_0x27127b[_0x3853('0x38')],'resourceId':_0x27127b['id'],'type':_0xd6b6af[_0x3853('0x38')],'sectionId':_0xd6b6af['id']},{})[_0x3853('0x33')](function(){return _0xf54b48;});}else{return _0xf54b48;}})[_0x3853('0x58')](function(_0x40afe5){logger[_0x3853('0x24')](_0x3853('0x5e'),_0x40afe5);throw _0x40afe5;});}return _0xf54b48;})['then'](respondWithResult(_0x27ba52,0xc9))['catch'](handleError(_0x27ba52,null));};exports[_0x3853('0x32')]=function(_0x5a54df,_0x13adf5){if(_0x5a54df['body']['id']){delete _0x5a54df['body']['id'];}return db[_0x3853('0x3c')][_0x3853('0x57')]({'where':{'id':_0x5a54df[_0x3853('0x54')]['id']},'include':[{'model':db[_0x3853('0x3a')],'as':_0x3853('0x3b')}]})[_0x3853('0x33')](handleEntityNotFound(_0x13adf5,null))[_0x3853('0x33')](saveUpdates(_0x5a54df['body'],null))['then'](respondWithResult(_0x13adf5,null))[_0x3853('0x58')](handleError(_0x13adf5,null));};exports[_0x3853('0x5f')]=function(_0x1ae21b,_0x448e25){return db[_0x3853('0x3c')][_0x3853('0x57')]({'where':{'id':_0x1ae21b[_0x3853('0x54')]['id']}})[_0x3853('0x33')](handleEntityNotFound(_0x448e25,null))[_0x3853('0x33')](removeEntity(_0x448e25,null))[_0x3853('0x58')](handleError(_0x448e25,null));};exports[_0x3853('0x60')]=function(_0x49c8cb,_0x1e849d){return db[_0x3853('0x3c')][_0x3853('0x60')]()[_0x3853('0x33')](respondWithResult(_0x1e849d,null))[_0x3853('0x58')](handleError(_0x1e849d,null));};exports['addDisposition']=function(_0x50c2aa,_0x56298b,_0x57f3a5){if(_0x50c2aa[_0x3853('0x5a')]['id']){delete _0x50c2aa[_0x3853('0x5a')]['id'];}return db[_0x3853('0x3c')][_0x3853('0x57')]({'where':{'id':_0x50c2aa[_0x3853('0x54')]['id']}})['then'](handleEntityNotFound(_0x56298b,null))[_0x3853('0x33')](function(_0x5e0004){if(_0x5e0004){_0x50c2aa[_0x3853('0x5a')][_0x3853('0x61')]=_0x5e0004['id'];return db['Disposition'][_0x3853('0x59')](_0x50c2aa['body']);}})[_0x3853('0x33')](respondWithResult(_0x56298b,null))['catch'](handleError(_0x56298b,null));};exports['getDispositions']=function(_0x5a4f4a,_0x3246f7,_0x951d43){var _0x571af3={'raw':![],'where':{}};var _0x3fd039={};var _0xd593ab={'count':0x0,'rows':[]};return db['WhatsappAccount']['findOne']({'where':{'id':_0x5a4f4a[_0x3853('0x54')]['id']}})['then'](handleEntityNotFound(_0x3246f7,null))[_0x3853('0x33')](function(_0x13622b){if(_0x13622b){_0x3fd039[_0x3853('0x45')]=_[_0x3853('0x55')](db['Disposition']['rawAttributes']);_0x3fd039[_0x3853('0x42')]=_[_0x3853('0x55')](_0x5a4f4a['query']);_0x3fd039[_0x3853('0x43')]=_[_0x3853('0x44')](_0x3fd039[_0x3853('0x45')],_0x3fd039[_0x3853('0x42')]);_0x571af3[_0x3853('0x47')]=_['intersection'](_0x3fd039[_0x3853('0x45')],qs['fields'](_0x5a4f4a[_0x3853('0x42')][_0x3853('0x46')]));_0x571af3[_0x3853('0x47')]=_0x571af3['attributes'][_0x3853('0x48')]?_0x571af3['attributes']:_0x3fd039[_0x3853('0x45')];if(!_0x5a4f4a[_0x3853('0x42')]['hasOwnProperty'](_0x3853('0x4a'))){_0x571af3[_0x3853('0x2a')]=qs[_0x3853('0x2a')](_0x5a4f4a[_0x3853('0x42')][_0x3853('0x2a')]);_0x571af3['offset']=qs[_0x3853('0x29')](_0x5a4f4a[_0x3853('0x42')][_0x3853('0x29')]);}_0x571af3[_0x3853('0x62')]=qs[_0x3853('0x4b')](_0x5a4f4a[_0x3853('0x42')][_0x3853('0x4b')]);_0x571af3[_0x3853('0x4c')]=qs[_0x3853('0x43')](_[_0x3853('0x63')](_0x5a4f4a[_0x3853('0x42')],_0x3fd039[_0x3853('0x43')]));_0x571af3[_0x3853('0x4c')][_0x3853('0x61')]=_0x13622b['id'];if(_0x5a4f4a[_0x3853('0x42')]['filter']){_0x571af3[_0x3853('0x4c')]=_[_0x3853('0x4d')](_0x571af3['where'],{'$or':_['map'](_0x571af3[_0x3853('0x47')],function(_0x54ffa1){var _0x4014cf={};_0x4014cf[_0x54ffa1]={'$like':'%'+_0x5a4f4a[_0x3853('0x42')][_0x3853('0x4f')]+'%'};return _0x4014cf;})});}_0x571af3=_[_0x3853('0x4d')]({},_0x571af3,_0x5a4f4a['options']);return db[_0x3853('0x64')][_0x3853('0x2c')]({'where':_0x571af3[_0x3853('0x4c')]})[_0x3853('0x33')](function(_0x1c8d8c){_0xd593ab[_0x3853('0x2c')]=_0x1c8d8c;if(_0x5a4f4a[_0x3853('0x42')][_0x3853('0x56')]){_0x571af3['include']=[{'all':!![]}];}return db[_0x3853('0x64')]['findAll'](_0x571af3);})['then'](function(_0x1c31c4){_0xd593ab[_0x3853('0x65')]=_0x1c31c4;return _0xd593ab;});}})[_0x3853('0x33')](respondWithFilteredResult(_0x3246f7,_0x571af3))[_0x3853('0x58')](handleError(_0x3246f7,null));};exports['removeDispositions']=function(_0xa45eb1,_0x8b1288,_0x1446ef){return db[_0x3853('0x3c')][_0x3853('0x57')]({'where':{'id':_0xa45eb1[_0x3853('0x54')]['id']}})[_0x3853('0x33')](handleEntityNotFound(_0x8b1288,null))[_0x3853('0x33')](function(_0x2a0a84){if(_0x2a0a84){return _0x2a0a84[_0x3853('0x66')](_0xa45eb1[_0x3853('0x42')]['ids']);}})[_0x3853('0x33')](respondWithStatusCode(_0x8b1288,null))['catch'](handleError(_0x8b1288,null));};exports[_0x3853('0x67')]=function(_0x4eb38a,_0x2df3b2,_0x30e287){if(_0x4eb38a['body']['id']){delete _0x4eb38a['body']['id'];}return db[_0x3853('0x3c')][_0x3853('0x57')]({'where':{'id':_0x4eb38a[_0x3853('0x54')]['id']}})[_0x3853('0x33')](handleEntityNotFound(_0x2df3b2,null))['then'](function(_0x1a9837){if(_0x1a9837){_0x4eb38a[_0x3853('0x5a')]['WhatsappAccountId']=_0x1a9837['id'];return db[_0x3853('0x68')][_0x3853('0x59')](_0x4eb38a[_0x3853('0x5a')]);}})[_0x3853('0x33')](respondWithResult(_0x2df3b2,null))['catch'](handleError(_0x2df3b2,null));};exports[_0x3853('0x69')]=function(_0x1db494,_0x37464f,_0xb1b6aa){var _0xf39022={'raw':![],'where':{}};var _0x5afdd2={};var _0x4059f2={'count':0x0,'rows':[]};return db[_0x3853('0x3c')][_0x3853('0x6a')]({'where':{'id':_0x1db494['params']['id']}})[_0x3853('0x33')](handleEntityNotFound(_0x37464f,null))[_0x3853('0x33')](function(_0x3f9a8d){if(_0x3f9a8d){_0x5afdd2['model']=_[_0x3853('0x55')](db[_0x3853('0x68')][_0x3853('0x3d')]);_0x5afdd2[_0x3853('0x42')]=_[_0x3853('0x55')](_0x1db494[_0x3853('0x42')]);_0x5afdd2[_0x3853('0x43')]=_[_0x3853('0x44')](_0x5afdd2['model'],_0x5afdd2[_0x3853('0x42')]);_0xf39022['attributes']=_[_0x3853('0x44')](_0x5afdd2['model'],qs[_0x3853('0x46')](_0x1db494[_0x3853('0x42')][_0x3853('0x46')]));_0xf39022['attributes']=_0xf39022['attributes'][_0x3853('0x48')]?_0xf39022[_0x3853('0x47')]:_0x5afdd2[_0x3853('0x45')];if(!_0x1db494['query']['hasOwnProperty'](_0x3853('0x4a'))){_0xf39022[_0x3853('0x2a')]=qs[_0x3853('0x2a')](_0x1db494[_0x3853('0x42')]['limit']);_0xf39022['offset']=qs[_0x3853('0x29')](_0x1db494[_0x3853('0x42')]['offset']);}_0xf39022[_0x3853('0x62')]=qs[_0x3853('0x4b')](_0x1db494[_0x3853('0x42')][_0x3853('0x4b')]);_0xf39022['where']=qs[_0x3853('0x43')](_['pick'](_0x1db494[_0x3853('0x42')],_0x5afdd2['filters']));_0xf39022[_0x3853('0x4c')][_0x3853('0x61')]=_0x3f9a8d['id'];if(_0x1db494[_0x3853('0x42')][_0x3853('0x4f')]){_0xf39022[_0x3853('0x4c')]=_[_0x3853('0x4d')](_0xf39022[_0x3853('0x4c')],{'$or':_[_0x3853('0x41')](_0xf39022[_0x3853('0x47')],function(_0x157c55){var _0x5efb76={};_0x5efb76[_0x157c55]={'$like':'%'+_0x1db494['query']['filter']+'%'};return _0x5efb76;})});}_0xf39022=_['merge']({},_0xf39022,_0x1db494[_0x3853('0x50')]);return db[_0x3853('0x68')][_0x3853('0x2c')]({'where':_0xf39022[_0x3853('0x4c')]})[_0x3853('0x33')](function(_0x4fe820){_0x4059f2[_0x3853('0x2c')]=_0x4fe820;if(_0x1db494[_0x3853('0x42')][_0x3853('0x56')]){_0xf39022[_0x3853('0x51')]=[{'all':!![]}];}return db['CannedAnswer'][_0x3853('0x52')](_0xf39022);})['then'](function(_0x1622c7){_0x4059f2[_0x3853('0x65')]=_0x1622c7;return _0x4059f2;});}})[_0x3853('0x33')](respondWithFilteredResult(_0x37464f,_0xf39022))[_0x3853('0x58')](handleError(_0x37464f,null));};exports['removeAnswers']=function(_0x31314d,_0x8b263b,_0x4dc02f){return db[_0x3853('0x3c')]['find']({'where':{'id':_0x31314d[_0x3853('0x54')]['id']}})[_0x3853('0x33')](handleEntityNotFound(_0x8b263b,null))[_0x3853('0x33')](function(_0x1f3a92){if(_0x1f3a92){return _0x1f3a92[_0x3853('0x6b')](_0x31314d[_0x3853('0x42')]['ids']);}})[_0x3853('0x33')](respondWithStatusCode(_0x8b263b,null))['catch'](handleError(_0x8b263b,null));};exports[_0x3853('0x6c')]=function(_0x3163e3,_0x3c5f5b,_0x4d95e0){return db[_0x3853('0x3c')][_0x3853('0x57')]({'where':{'id':_0x3163e3['params']['id']}})[_0x3853('0x33')](handleEntityNotFound(_0x3c5f5b,null))[_0x3853('0x33')](function(_0x1e4c5b){if(_0x1e4c5b){return _0x1e4c5b[_0x3853('0x6c')](_0x3163e3[_0x3853('0x5a')]['ids'],_[_0x3853('0x6d')](_0x3163e3['body'],[_0x3853('0x6e'),'id'])||{})[_0x3853('0x6f')](function(_0x2ea27f){for(var _0x3732b2=0x0;_0x3732b2<_0x3163e3[_0x3853('0x5a')][_0x3853('0x6e')][_0x3853('0x48')];_0x3732b2+=0x1){socket[_0x3853('0x70')](_0x3853('0x71'),{'UserId':Number(_0x3163e3[_0x3853('0x5a')]['ids'][_0x3732b2]),'WhatsappAccountId':Number(_0x3163e3['params']['id'])});}return _0x2ea27f;});}})[_0x3853('0x33')](respondWithResult(_0x3c5f5b,null))['catch'](handleError(_0x3c5f5b,null));};exports[_0x3853('0x72')]=function(_0x1c4b2b,_0x39543e,_0x585b50){return db['WhatsappAccount']['find']({'where':{'id':_0x1c4b2b[_0x3853('0x54')]['id']}})['then'](handleEntityNotFound(_0x39543e,null))[_0x3853('0x33')](function(_0x59584e){if(_0x59584e){return _0x59584e[_0x3853('0x72')](_0x1c4b2b[_0x3853('0x42')][_0x3853('0x6e')])[_0x3853('0x33')](function(){if(_[_0x3853('0x73')](_0x1c4b2b[_0x3853('0x42')][_0x3853('0x6e')])){for(var _0x45e307=0x0;_0x45e307<_0x1c4b2b[_0x3853('0x42')][_0x3853('0x6e')][_0x3853('0x48')];_0x45e307+=0x1){socket[_0x3853('0x70')]('userWhatsappAccount:remove',{'UserId':Number(_0x1c4b2b[_0x3853('0x42')][_0x3853('0x6e')][_0x45e307]),'WhatsappAccountId':Number(_0x1c4b2b[_0x3853('0x54')]['id'])});}}else{socket[_0x3853('0x70')]('userWhatsappAccount:remove',{'UserId':Number(_0x1c4b2b[_0x3853('0x42')][_0x3853('0x6e')]),'WhatsappAccountId':Number(_0x1c4b2b[_0x3853('0x54')]['id'])});}});}})[_0x3853('0x33')](respondWithStatusCode(_0x39543e,null))['catch'](handleError(_0x39543e,null));};exports[_0x3853('0x74')]=function(_0x494159,_0x31dec3,_0xcca55c){var _0x26fdf7={};var _0x318d97={};var _0x452ef8;var _0x5be517;return db[_0x3853('0x3c')][_0x3853('0x6a')]({'where':{'id':_0x494159[_0x3853('0x54')]['id']}})['then'](handleEntityNotFound(_0x31dec3,null))[_0x3853('0x33')](function(_0x1fabc8){if(_0x1fabc8){_0x452ef8=_0x1fabc8;_0x318d97[_0x3853('0x45')]=_[_0x3853('0x55')](db[_0x3853('0x75')]['rawAttributes']);_0x318d97[_0x3853('0x42')]=_[_0x3853('0x55')](_0x494159[_0x3853('0x42')]);_0x318d97[_0x3853('0x43')]=_[_0x3853('0x44')](_0x318d97[_0x3853('0x45')],_0x318d97[_0x3853('0x42')]);_0x26fdf7[_0x3853('0x47')]=_[_0x3853('0x44')](_0x318d97['model'],qs['fields'](_0x494159['query'][_0x3853('0x46')]));_0x26fdf7[_0x3853('0x47')]=_0x26fdf7['attributes'][_0x3853('0x48')]?_0x26fdf7[_0x3853('0x47')]:_0x318d97[_0x3853('0x45')];_0x26fdf7['order']=qs[_0x3853('0x4b')](_0x494159[_0x3853('0x42')][_0x3853('0x4b')]);_0x26fdf7[_0x3853('0x4c')]=qs[_0x3853('0x43')](_[_0x3853('0x63')](_0x494159[_0x3853('0x42')],_0x318d97['filters']));if(_0x494159['query']['filter']){_0x26fdf7[_0x3853('0x4c')]=_[_0x3853('0x4d')](_0x26fdf7[_0x3853('0x4c')],{'$or':_[_0x3853('0x41')](_0x26fdf7[_0x3853('0x47')],function(_0x5a1ddf){var _0x3c19be={};_0x3c19be[_0x5a1ddf]={'$like':'%'+_0x494159['query'][_0x3853('0x4f')]+'%'};return _0x3c19be;})});}_0x26fdf7=_[_0x3853('0x4d')]({},_0x26fdf7,_0x494159[_0x3853('0x50')]);return _0x452ef8[_0x3853('0x74')](_0x26fdf7);}})[_0x3853('0x33')](function(_0x1bc8b1){if(_0x1bc8b1){_0x5be517=_0x1bc8b1['length'];if(!_0x494159[_0x3853('0x42')][_0x3853('0x49')](_0x3853('0x4a'))){_0x26fdf7[_0x3853('0x2a')]=qs['limit'](_0x494159[_0x3853('0x42')][_0x3853('0x2a')]);_0x26fdf7[_0x3853('0x29')]=qs[_0x3853('0x29')](_0x494159[_0x3853('0x42')][_0x3853('0x29')]);}return _0x452ef8[_0x3853('0x74')](_0x26fdf7);}})[_0x3853('0x33')](function(_0x1f152d){if(_0x1f152d){return _0x1f152d?{'count':_0x5be517,'rows':_0x1f152d}:null;}})['then'](respondWithResult(_0x31dec3,null))[_0x3853('0x58')](handleError(_0x31dec3,null));};exports[_0x3853('0x76')]=function(_0x1bf8c0,_0x3086e2){var _0x2b3d4c=_0x1bf8c0[_0x3853('0x54')]['id'];var _0x118b88=_0x1bf8c0[_0x3853('0x5a')];var _0x5995a7=0xc8;var _0x5eac1c=null;return db['sequelize'][_0x3853('0x77')]({'isolationLevel':db[_0x3853('0x78')][_0x3853('0x79')][_0x3853('0x7a')][_0x3853('0x7b')]},function(_0x44506b){return db['WhatsappAccount'][_0x3853('0x6a')]({'where':{'id':_0x2b3d4c},'transaction':_0x44506b})[_0x3853('0x33')](function(_0x3c0438){if(_0x3c0438){return db[_0x3853('0x7c')]['destroy']({'where':{'WhatsappAccountId':_0x2b3d4c},'transaction':_0x44506b})[_0x3853('0x33')](function(){var _0x8c7333=_['map'](_0x118b88,function(_0x1fec4c){_0x1fec4c['WhatsappAccountId']=_0x2b3d4c;return _0x1fec4c;});return db[_0x3853('0x7c')][_0x3853('0x7d')](_0x8c7333,{'transaction':_0x44506b});});}else{_0x5995a7=0x194;_0x5eac1c=[];}});})[_0x3853('0x33')](function(){if(_0x5995a7!==0x194){return db[_0x3853('0x7c')]['findAndCountAll']({'where':{'WhatsappAccountId':_0x2b3d4c},'order':_0x3853('0x7e')})['then'](function(_0x41ae48){_0x5eac1c=_0x41ae48;});}})[_0x3853('0x58')](function(_0x510343){_0x5995a7=0x1f4;logger[_0x3853('0x24')](_0x510343[_0x3853('0x37')]);if(_0x510343[_0x3853('0x38')]){delete _0x510343[_0x3853('0x38')];}_0x5eac1c=_0x510343;})[_0x3853('0x7f')](function(){if(_0x5eac1c===null){_0x3086e2[_0x3853('0x27')](_0x5995a7);}else{if(_0x5995a7===0x1f4){_0x3086e2[_0x3853('0x28')](_0x5995a7)[_0x3853('0x39')](_0x5eac1c);}else{_0x3086e2[_0x3853('0x28')](_0x5995a7)[_0x3853('0x2e')](_0x5eac1c);}}});};exports[_0x3853('0x80')]=function(_0xed906c,_0x5c0aa0,_0xfa9c9a){var _0x534f70={};var _0x4d8bd9={};var _0x3fee99;var _0x492bc2;return db[_0x3853('0x3c')]['findOne']({'where':{'id':_0xed906c[_0x3853('0x54')]['id']}})[_0x3853('0x33')](handleEntityNotFound(_0x5c0aa0,null))[_0x3853('0x33')](function(_0x3cebc6){if(_0x3cebc6){_0x3fee99=_0x3cebc6;_0x4d8bd9[_0x3853('0x45')]=_[_0x3853('0x55')](db[_0x3853('0x7c')][_0x3853('0x3d')]);_0x4d8bd9[_0x3853('0x42')]=_[_0x3853('0x55')](_0xed906c[_0x3853('0x42')]);_0x4d8bd9['filters']=_[_0x3853('0x44')](_0x4d8bd9[_0x3853('0x45')],_0x4d8bd9['query']);_0x534f70[_0x3853('0x47')]=_[_0x3853('0x44')](_0x4d8bd9[_0x3853('0x45')],qs['fields'](_0xed906c['query'][_0x3853('0x46')]));_0x534f70[_0x3853('0x47')]=_0x534f70['attributes'][_0x3853('0x48')]?_0x534f70['attributes']:_0x4d8bd9['model'];_0x534f70[_0x3853('0x62')]=qs[_0x3853('0x4b')](_0xed906c[_0x3853('0x42')][_0x3853('0x4b')]);_0x534f70[_0x3853('0x4c')]=qs['filters'](_[_0x3853('0x63')](_0xed906c['query'],_0x4d8bd9['filters']));if(_0xed906c[_0x3853('0x42')]['filter']){_0x534f70[_0x3853('0x4c')]=_[_0x3853('0x4d')](_0x534f70['where'],{'$or':_[_0x3853('0x41')](_0x534f70[_0x3853('0x47')],function(_0x9132b9){var _0x1e9af7={};_0x1e9af7[_0x9132b9]={'$like':'%'+_0xed906c[_0x3853('0x42')][_0x3853('0x4f')]+'%'};return _0x1e9af7;})});}_0x534f70=_['merge']({},_0x534f70,_0xed906c['options']);return _0x3fee99['getApplications'](_0x534f70);}})[_0x3853('0x33')](function(_0x156990){if(_0x156990){_0x492bc2=_0x156990[_0x3853('0x48')];if(!_0xed906c['query']['hasOwnProperty'](_0x3853('0x4a'))){_0x534f70[_0x3853('0x2a')]=qs[_0x3853('0x2a')](_0xed906c[_0x3853('0x42')][_0x3853('0x2a')]);_0x534f70[_0x3853('0x29')]=qs[_0x3853('0x29')](_0xed906c[_0x3853('0x42')][_0x3853('0x29')]);}return _0x3fee99[_0x3853('0x80')](_0x534f70);}})[_0x3853('0x33')](function(_0x5189cf){if(_0x5189cf){return _0x5189cf?{'count':_0x492bc2,'rows':_0x5189cf}:null;}})[_0x3853('0x33')](respondWithResult(_0x5c0aa0,null))[_0x3853('0x58')](handleError(_0x5c0aa0,null));};exports[_0x3853('0x81')]=function(_0x3ad5ed,_0x114cd7,_0x5774fc){var _0x375977={'channel':'whatsapp'};var _0x5587a4=[];var _0x176108=[];var _0x1331ac={};return db[_0x3853('0x3c')]['find']({'where':{'id':_0x3ad5ed['params']['id']},'include':[{'model':db[_0x3853('0x7c')],'as':'Applications'}]})['then'](handleEntityNotFound(_0x114cd7,null))[_0x3853('0x33')](function(_0x17139c){_0x375977[_0x3853('0x82')]=_0x17139c;if(_0x375977[_0x3853('0x82')]&&_0x375977[_0x3853('0x82')][_0x3853('0x3f')]===_0x3853('0x83')&&_0x3ad5ed[_0x3853('0x5a')]['statuses']){if(_0x3ad5ed['body'][_0x3853('0x84')][_0x3853('0x48')]===0x0)return;if(_0x3ad5ed['body'][_0x3853('0x84')][0x0][_0x3853('0x85')]!==_0x3853('0x86'))return;return db[_0x3853('0x87')][_0x3853('0x32')]({'read':!![],'readAt':_0x3ad5ed['body'][_0x3853('0x84')][0x0]['timestamp']},{'where':{'messageId':_0x3ad5ed[_0x3853('0x5a')][_0x3853('0x84')][0x0][_0x3853('0x88')]},'individualHooks':!![]})[_0x3853('0x33')](function(_0x1df68d){return _0x114cd7[_0x3853('0x28')](0xc8)[_0x3853('0x2e')](_0x1df68d);});}_0x375977[_0x3853('0x89')]=_[_0x3853('0x8a')](_0x17139c[_0x3853('0x8b')],[_0x3853('0x7e')],[_0x3853('0x8c')]);if(_0x375977['account'][_0x3853('0x8b')]){delete _0x375977['account'][_0x3853('0x8b')];}return db[_0x3853('0x8d')][_0x3853('0x60')]()[_0x3853('0x33')](function(_0x3d50ef){if(!_0x3d50ef){throw new db[(_0x3853('0x8e'))][(_0x3853('0x8f'))]('no\x20available\x20attributes');}_0x5587a4=_[_0x3853('0x90')](_['keys'](_0x3d50ef),['createdAt','updatedAt']);_0x176108=_[_0x3853('0x90')](_['keys'](_0x3d50ef),[_0x3853('0x91'),_0x3853('0x92'),'CompanyId',_0x3853('0x93')]);_0x375977[_0x3853('0x5a')]={'mapKey':_0x3853('0x94')};if(_0x375977[_0x3853('0x82')]&&_0x375977[_0x3853('0x82')][_0x3853('0x3f')]===_0x3853('0x95')){_0x375977[_0x3853('0x5a')][_0x3853('0x96')]=_0x3ad5ed[_0x3853('0x5a')][_0x3853('0x97')][_0x3853('0x98')]('whatsapp:','');_0x375977[_0x3853('0x5a')][_0x3853('0x5a')]=_0x3ad5ed[_0x3853('0x5a')][_0x3853('0x99')];_0x375977['body'][_0x3853('0x9a')]=_0x3ad5ed['body'][_0x3853('0x9b')];}if(_0x375977[_0x3853('0x82')]&&_0x375977[_0x3853('0x82')][_0x3853('0x3f')]===_0x3853('0x83')){_0x375977['body'][_0x3853('0x96')]=_0x3ad5ed[_0x3853('0x5a')][_0x3853('0x9c')][0x0]['from'];_0x375977['body'][_0x3853('0x5a')]=_0x3ad5ed[_0x3853('0x5a')][_0x3853('0x9c')][0x0]['message'][_0x3853('0x5a')];_0x375977[_0x3853('0x5a')][_0x3853('0x9a')]=_0x3ad5ed[_0x3853('0x5a')]['notifications'][0x0]['message_id'];}if(_0x375977['body']['id']){delete _0x375977['body']['id'];}if(_[_0x3853('0x9d')](_0x375977[_0x3853('0x5a')][_0x3853('0x96')])){throw new db[(_0x3853('0x8e'))][(_0x3853('0x8f'))](_0x3853('0x9e'));}if(_['isNil'](_0x375977[_0x3853('0x5a')]['body'])||_0x375977[_0x3853('0x5a')][_0x3853('0x5a')]===''){throw new db[(_0x3853('0x8e'))]['ValidationError'](_0x3853('0x9f'));}if(_['isNil'](_0x375977[_0x3853('0x5a')][_0x3853('0xa0')])){throw new db[(_0x3853('0x8e'))][(_0x3853('0x8f'))](_0x3853('0xa1')+_0x176108);}if(!_[_0x3853('0xa2')](_0x176108,_0x375977[_0x3853('0x5a')]['mapKey'])){throw new db[(_0x3853('0x8e'))][(_0x3853('0x8f'))]('mapKey\x20invalid,\x20please\x20use\x20one\x20of\x20these:\x20'+_0x176108);}_0x1331ac[_0x375977[_0x3853('0x5a')][_0x3853('0xa0')]]=_0x375977[_0x3853('0x5a')][_0x3853('0x96')];return db['CmList'][_0x3853('0x57')]({'where':{'id':_0x375977['account'][_0x3853('0x93')]},'include':[{'model':db['CmContact'],'as':_0x3853('0xa3'),'where':_0x1331ac,'limit':0x1,'order':[[_0x3853('0x92'),'DESC']]}]});})[_0x3853('0x33')](handleEntityNotFound(_0x114cd7,null))[_0x3853('0x33')](function(_0x35f204){if(_0x35f204){_0x375977['list']=_[_0x3853('0x6d')](_0x35f204,['Contacts']);if(_0x35f204[_0x3853('0xa3')][_0x3853('0x48')]){return _0x35f204[_0x3853('0xa3')][0x0];}var _0x42d54f=_[_0x3853('0x19')](_0x375977[_0x3853('0x5a')],{'firstName':_0x375977['body']['from'],'ListId':_0x35f204['id']});_0x42d54f[_0x375977[_0x3853('0x5a')][_0x3853('0xa0')]]=_0x375977['body'][_0x3853('0x96')];return db[_0x3853('0x8d')][_0x3853('0x59')](_0x42d54f,{'fields':_0x5587a4,'raw':!![]});}})[_0x3853('0x33')](handleEntityNotFound(_0x114cd7,null))[_0x3853('0x33')](function(_0x3a4f87){if(_0x3a4f87){_0x375977[_0x3853('0xa4')]=_0x3a4f87;var _0x16d9fd={'ContactId':_0x3a4f87['id'],'phone':_0x375977['body'][_0x3853('0x96')],'WhatsappAccountId':_0x3ad5ed[_0x3853('0x54')]['id']};var _0x4ac5a2={'ContactId':_0x3a4f87['id'],'WhatsappAccountId':_0x3ad5ed[_0x3853('0x54')]['id'],'closed':![]};return db['WhatsappInteraction']['find']({'where':_0x4ac5a2})[_0x3853('0x33')](function(_0x57bb30){if(_0x57bb30){return[_0x57bb30,![]];}return db[_0x3853('0xa5')][_0x3853('0x59')](_0x16d9fd)['then'](function(_0xe49682){return[_0xe49682,!![]];});});}})['spread'](function(_0x12343d,_0x53f1e0){_0x375977[_0x3853('0xa6')]=_0x12343d[_0x3853('0x34')]({'plain':!![]});_0x375977[_0x3853('0xa6')][_0x3853('0xa7')]=![];if(_0x53f1e0){if(_0x375977[_0x3853('0x82')]['autoclose']){_0x375977[_0x3853('0x89')][_0x3853('0xa8')]({'id':0x0,'priority':_0x375977[_0x3853('0x89')][_0x3853('0x48')]+0x1,'app':_0x3853('0xa9'),'appdata':_0x3853('0xaa'),'interval':_0x3853('0xab')});}_0x375977[_0x3853('0xa6')][_0x3853('0xa7')]=!![];}return db[_0x3853('0x87')][_0x3853('0x59')]({'phone':_0x375977[_0x3853('0x5a')][_0x3853('0x96')],'messageId':_0x375977['body'][_0x3853('0x9a')],'body':_0x375977[_0x3853('0x5a')][_0x3853('0x5a')],'WhatsappAccountId':_0x3ad5ed['params']['id'],'WhatsappInteractionId':_0x12343d['id'],'direction':'in','ContactId':_0x12343d[_0x3853('0xac')],'AttachmentId':_0x375977[_0x3853('0x5a')][_0x3853('0xad')]});})['then'](function(_0xbe33fd){_0x375977['message']=_0xbe33fd;if(!_0x375977[_0x3853('0xa6')]['UserId'])return;return db['User']['find']({'attributes':['id',_0x3853('0x38')],'where':{'id':_0x375977['interaction'][_0x3853('0xae')]}});})[_0x3853('0x33')](function(_0x2fd6c1){if(_0x2fd6c1){_0x375977[_0x3853('0x89')][_0x3853('0xaf')]({'id':0x0,'priority':0x0,'app':'agent','appdata':_0x2fd6c1[_0x3853('0x38')]+','+(_0x375977[_0x3853('0x82')][_0x3853('0xb0')]||0xa),'interval':_0x3853('0xab')});}if(!_0x375977[_0x3853('0xa6')][_0x3853('0xb1')])return;return db[_0x3853('0xb2')]['find']({'attributes':['id',_0x3853('0x38')],'where':{'id':_0x375977[_0x3853('0xa6')][_0x3853('0xb1')]}});})[_0x3853('0x33')](function(_0x4989c1){if(_0x4989c1){_0x375977[_0x3853('0x89')][_0x3853('0xaf')]({'id':0x0,'priority':0x1,'app':_0x3853('0xb3'),'appdata':_0x4989c1[_0x3853('0x38')]+','+(_0x375977[_0x3853('0x82')]['waitForTheAssignedQueue']||0x12c),'interval':_0x3853('0xab')});}return respondWithRpcPromise('Start',_0x3853('0xb4'),_0x375977);})[_0x3853('0x33')](function(_0x3ec825){if(_0x3ec825){var _0xb774b0=0xc8;var _0x516a60=_0x3853('0xb5');logger['info']('WhatsappAccount,\x20%s,\x20%s,\x20%s',_0x516a60,_0xb774b0,'entity\x20found');logger[_0x3853('0x22')](_0x3853('0xb6'),_0x516a60,_0xb774b0,'entity\x20found',JSON[_0x3853('0xb7')](_0x3ec825));if(_0x375977['account'][_0x3853('0x3f')]===_0x3853('0x95')){return _0x114cd7[_0x3853('0x28')](_0xb774b0)[_0x3853('0x2d')](_0x3853('0xb8'),_0x3853('0xb9'))[_0x3853('0x39')](_0x3853('0xba'));}else{return _0x114cd7[_0x3853('0x28')](_0xb774b0)['json'](_0x3ec825);}}});})['catch'](handleError(_0x114cd7,null));};exports[_0x3853('0x39')]=function(_0x325e49,_0x2bc6bd,_0x21f361){var _0x15248e,_0x3f3a58,_0x45cc5d;if(_[_0x3853('0x9d')](_0x325e49[_0x3853('0x5a')][_0x3853('0x5a')])||_0x325e49[_0x3853('0x5a')]['body']===''){throw new db[(_0x3853('0x8e'))][(_0x3853('0x8f'))](_0x3853('0x9f'));}if(_['isNil'](_0x325e49[_0x3853('0x5a')]['to'])){throw new db[(_0x3853('0x8e'))]['ValidationError'](_0x3853('0xbb'));}_0x15248e=_0x325e49['body']['to'];return db[_0x3853('0x3c')][_0x3853('0x57')]({'where':{'id':_0x325e49[_0x3853('0x54')]['id']},'include':[{'model':db[_0x3853('0xbc')],'as':_0x3853('0xbd'),'include':[{'model':db[_0x3853('0x8d')],'as':_0x3853('0xa3'),'where':{'mobile':_0x15248e},'limit':0x1,'order':[[_0x3853('0x92'),_0x3853('0xbe')]]}]}]})['then'](handleEntityNotFound(_0x2bc6bd,null))[_0x3853('0x33')](function(_0x1ee145){if(_0x1ee145&&_0x1ee145[_0x3853('0xbd')]){_0x3f3a58=_0x1ee145[_0x3853('0x34')]({'plain':!![]});if(_0x3f3a58['List']&&_0x3f3a58[_0x3853('0xbd')]['Contacts'][_0x3853('0x48')]){return _0x3f3a58[_0x3853('0xbd')]['Contacts'][0x0];}return db['CmContact']['create'](_[_0x3853('0x19')](_0x325e49[_0x3853('0x5a')],{'firstName':_0x15248e,'mobile':_0x15248e,'phone':_0x15248e,'ListId':_0x3f3a58['ListId']}));}})[_0x3853('0x33')](handleEntityNotFound(_0x2bc6bd,null))[_0x3853('0x33')](function(_0x370e84){if(_0x370e84){_0x45cc5d=_0x370e84;return db['WhatsappInteraction'][_0x3853('0x57')]({'where':{'ContactId':_0x45cc5d['id'],'closed':![],'WhatsappAccountId':_0x3f3a58['id']}})['then'](function(_0x1e9adc){if(_0x1e9adc){return[_0x1e9adc,![]];}return db[_0x3853('0xa5')][_0x3853('0x59')]({'UserId':_0x325e49[_0x3853('0x5b')]['id'],'ContactId':_0x45cc5d['id'],'WhatsappAccountId':_0x3f3a58['id'],'phone':_0x15248e,'firstMsgDirection':_0x3853('0xbf'),'Messages':[_[_0x3853('0x4d')](_0x325e49[_0x3853('0x5a')],{'read':![],'body':_0x325e49[_0x3853('0x5a')][_0x3853('0x5a')],'phone':_0x15248e,'WhatsappAccountId':_0x3f3a58['id'],'UserId':_0x325e49[_0x3853('0x5b')]['id'],'ContactId':_0x45cc5d['id']})]},{'include':[{'model':db[_0x3853('0x87')],'as':_0x3853('0xc0')}]})['then'](function(_0x2ec367){return[_0x2ec367,!![]];});});}})[_0x3853('0x6f')](function(_0x1ad227,_0x55ef81){if(_0x55ef81){return _0x1ad227;}return db['WhatsappMessage'][_0x3853('0x59')](_[_0x3853('0x4d')](_0x325e49[_0x3853('0x5a')],{'read':![],'body':_0x325e49[_0x3853('0x5a')][_0x3853('0x5a')],'phone':_0x15248e,'WhatsappAccountId':_0x3f3a58['id'],'WhatsappInteractionId':_0x1ad227['id'],'UserId':_0x325e49[_0x3853('0x5b')]['id'],'ContactId':_0x45cc5d['id']}))['then'](function(_0x48ec60){_0x1ad227[_0x3853('0xc1')][_0x3853('0xc0')]=[];_0x1ad227['dataValues'][_0x3853('0xc0')][_0x3853('0xa8')](_0x48ec60[_0x3853('0xc1')]);return _0x1ad227;});})[_0x3853('0x33')](respondWithResult(_0x2bc6bd,null))[_0x3853('0x58')](handleError(_0x2bc6bd,null));};
\ No newline at end of file
index 8f84089..d5d3034 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4a7b=['setMaxListeners','save','remove','emit','hasOwnProperty','hook','exports','../../mysqldb'];(function(_0x302258,_0x253f6e){var _0x14c9ba=function(_0x20f0d6){while(--_0x20f0d6){_0x302258['push'](_0x302258['shift']());}};_0x14c9ba(++_0x253f6e);}(_0x4a7b,0x87));var _0xb4a7=function(_0x2a624d,_0x172bd0){_0x2a624d=_0x2a624d-0x0;var _0x9fc36d=_0x4a7b[_0x2a624d];return _0x9fc36d;};'use strict';var EventEmitter=require('events');var WhatsappAccount=require(_0xb4a7('0x0'))['db']['WhatsappAccount'];var WhatsappAccountEvents=new EventEmitter();WhatsappAccountEvents[_0xb4a7('0x1')](0x0);var events={'afterCreate':_0xb4a7('0x2'),'afterUpdate':'update','afterDestroy':_0xb4a7('0x3')};function emitEvent(_0xae5992){return function(_0x1b551c,_0x355bc0,_0x195dc6){WhatsappAccountEvents[_0xb4a7('0x4')](_0xae5992+':'+_0x1b551c['id'],_0x1b551c);WhatsappAccountEvents[_0xb4a7('0x4')](_0xae5992,_0x1b551c);_0x195dc6(null);};}for(var e in events){if(events[_0xb4a7('0x5')](e)){var event=events[e];WhatsappAccount[_0xb4a7('0x6')](e,emitEvent(event));}}module[_0xb4a7('0x7')]=WhatsappAccountEvents;
\ No newline at end of file
+var _0x9f77=['save','update','emit','hasOwnProperty','hook','exports','events','setMaxListeners'];(function(_0x343440,_0x366e09){var _0x161dfb=function(_0x2b514b){while(--_0x2b514b){_0x343440['push'](_0x343440['shift']());}};_0x161dfb(++_0x366e09);}(_0x9f77,0x106));var _0x79f7=function(_0x1e3ac9,_0x21dc11){_0x1e3ac9=_0x1e3ac9-0x0;var _0x13a72d=_0x9f77[_0x1e3ac9];return _0x13a72d;};'use strict';var EventEmitter=require(_0x79f7('0x0'));var WhatsappAccount=require('../../mysqldb')['db']['WhatsappAccount'];var WhatsappAccountEvents=new EventEmitter();WhatsappAccountEvents[_0x79f7('0x1')](0x0);var events={'afterCreate':_0x79f7('0x2'),'afterUpdate':_0x79f7('0x3'),'afterDestroy':'remove'};function emitEvent(_0x19b6cd){return function(_0x38fb72,_0x1e79d5,_0x19d7a8){WhatsappAccountEvents['emit'](_0x19b6cd+':'+_0x38fb72['id'],_0x38fb72);WhatsappAccountEvents[_0x79f7('0x4')](_0x19b6cd,_0x38fb72);_0x19d7a8(null);};}for(var e in events){if(events[_0x79f7('0x5')](e)){var event=events[e];WhatsappAccount[_0x79f7('0x6')](e,emitEvent(event));}}module[_0x79f7('0x7')]=WhatsappAccountEvents;
\ No newline at end of file
index eeadd8b..7fee39d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3c5a=['api','moment','bluebird','request-promise','path','rimraf','exports','WhatsappAccount','whatsapp_accounts','../../config/logger'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x3c5a,0x171));var _0xa3c5=function(_0x31df6f,_0x380e73){_0x31df6f=_0x31df6f-0x0;var _0x31e353=_0x3c5a[_0x31df6f];return _0x31e353;};'use strict';var _=require('lodash');var util=require('util');var logger=require(_0xa3c5('0x0'))(_0xa3c5('0x1'));var moment=require(_0xa3c5('0x2'));var BPromise=require(_0xa3c5('0x3'));var rp=require(_0xa3c5('0x4'));var fs=require('fs');var path=require(_0xa3c5('0x5'));var rimraf=require(_0xa3c5('0x6'));var config=require('../../config/environment');var attributes=require('./whatsappAccount.attributes');module[_0xa3c5('0x7')]=function(_0x3de83e,_0x4cd577){return _0x3de83e['define'](_0xa3c5('0x8'),attributes,{'tableName':_0xa3c5('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x654e=['path','rimraf','./whatsappAccount.attributes','exports','define','WhatsappAccount','whatsapp_accounts','util','api','moment','bluebird','request-promise'];(function(_0x36e55f,_0x703c41){var _0x2208b2=function(_0x2b8915){while(--_0x2b8915){_0x36e55f['push'](_0x36e55f['shift']());}};_0x2208b2(++_0x703c41);}(_0x654e,0x67));var _0xe654=function(_0x205c11,_0x941d3d){_0x205c11=_0x205c11-0x0;var _0x550e7b=_0x654e[_0x205c11];return _0x550e7b;};'use strict';var _=require('lodash');var util=require(_0xe654('0x0'));var logger=require('../../config/logger')(_0xe654('0x1'));var moment=require(_0xe654('0x2'));var BPromise=require(_0xe654('0x3'));var rp=require(_0xe654('0x4'));var fs=require('fs');var path=require(_0xe654('0x5'));var rimraf=require(_0xe654('0x6'));var config=require('../../config/environment');var attributes=require(_0xe654('0x7'));module[_0xe654('0x8')]=function(_0x2d9aba,_0x392d75){return _0x2d9aba[_0xe654('0x9')](_0xe654('0xa'),attributes,{'tableName':_0xe654('0xb'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index e1ddf7a..6f3b4c1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x57e6=['../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./whatsappAccount.socket','request','then','info','request\x20sent','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s','stringify','error','WhatsappAccount,\x20%s,\x20%s','message','result','ShowWhatsappAccount','WhatsappAccount','options','raw','where','attributes','map','include','model','catch','lodash','util','moment','bluebird','ioredis'];(function(_0x221681,_0x28c6f7){var _0x1bc1d2=function(_0x5c82c6){while(--_0x5c82c6){_0x221681['push'](_0x221681['shift']());}};_0x1bc1d2(++_0x28c6f7);}(_0x57e6,0x177));var _0x657e=function(_0x6f5598,_0xabeb74){_0x6f5598=_0x6f5598-0x0;var _0x1e1325=_0x57e6[_0x6f5598];return _0x1e1325;};'use strict';var _=require(_0x657e('0x0'));var util=require(_0x657e('0x1'));var moment=require(_0x657e('0x2'));var BPromise=require(_0x657e('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x657e('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x657e('0x5'));var logger=require(_0x657e('0x6'))(_0x657e('0x7'));var config=require(_0x657e('0x8'));var jayson=require(_0x657e('0x9'));var client=jayson[_0x657e('0xa')][_0x657e('0xb')]({'port':0x232a});config[_0x657e('0xc')]=_[_0x657e('0xd')](config[_0x657e('0xc')],{'host':_0x657e('0xe'),'port':0x18eb});var socket=require(_0x657e('0xf'))(new Redis(config[_0x657e('0xc')]));require(_0x657e('0x10'))['register'](socket);function respondWithRpcPromise(_0x436b25,_0x7bc955,_0x2a4251){return new BPromise(function(_0x4b3c5f,_0x2491b1){return client[_0x657e('0x11')](_0x436b25,_0x2a4251)[_0x657e('0x12')](function(_0x116501){logger[_0x657e('0x13')]('WhatsappAccount,\x20%s,\x20%s',_0x7bc955,_0x657e('0x14'));logger[_0x657e('0x15')](_0x657e('0x16'),_0x7bc955,_0x657e('0x14'),JSON[_0x657e('0x17')](_0x116501));if(_0x116501[_0x657e('0x18')]){if(_0x116501[_0x657e('0x18')]['code']===0x1f4){logger['error'](_0x657e('0x19'),_0x7bc955,_0x116501['error']['message']);return _0x2491b1(_0x116501[_0x657e('0x18')]['message']);}logger[_0x657e('0x18')](_0x657e('0x19'),_0x7bc955,_0x116501[_0x657e('0x18')][_0x657e('0x1a')]);return _0x4b3c5f(_0x116501[_0x657e('0x18')][_0x657e('0x1a')]);}else{logger[_0x657e('0x13')](_0x657e('0x19'),_0x7bc955,_0x657e('0x14'));_0x4b3c5f(_0x116501[_0x657e('0x1b')][_0x657e('0x1a')]);}})['catch'](function(_0xd29c2e){logger[_0x657e('0x18')]('WhatsappAccount,\x20%s,\x20%s',_0x7bc955,_0xd29c2e);_0x2491b1(_0xd29c2e);});});}exports[_0x657e('0x1c')]=function(_0x936e85){var _0x187bd2=this;return new Promise(function(_0x4ba50f,_0x370848){return db[_0x657e('0x1d')]['find']({'raw':_0x936e85[_0x657e('0x1e')]?_0x936e85['options'][_0x657e('0x1f')]===undefined?!![]:![]:!![],'where':_0x936e85['options']?_0x936e85[_0x657e('0x1e')][_0x657e('0x20')]||null:null,'attributes':_0x936e85[_0x657e('0x1e')]?_0x936e85[_0x657e('0x1e')][_0x657e('0x21')]||null:null,'include':_0x936e85[_0x657e('0x1e')]?_0x936e85[_0x657e('0x1e')]['include']?_[_0x657e('0x22')](_0x936e85[_0x657e('0x1e')]['include'],function(_0x1d11b3){return{'model':db[_0x1d11b3['model']],'as':_0x1d11b3['as'],'attributes':_0x1d11b3[_0x657e('0x21')],'include':_0x1d11b3[_0x657e('0x23')]?_[_0x657e('0x22')](_0x1d11b3[_0x657e('0x23')],function(_0x2ea30a){return{'model':db[_0x2ea30a[_0x657e('0x24')]],'as':_0x2ea30a['as'],'attributes':_0x2ea30a[_0x657e('0x21')],'include':_0x2ea30a[_0x657e('0x23')]?_[_0x657e('0x22')](_0x2ea30a[_0x657e('0x23')],function(_0x229250){return{'model':db[_0x229250[_0x657e('0x24')]],'as':_0x229250['as'],'attributes':_0x229250[_0x657e('0x21')]};}):[]};}):[]};}):[]:[]})[_0x657e('0x12')](function(_0x125a12){logger[_0x657e('0x13')]('ShowWhatsappAccount',_0x936e85);logger[_0x657e('0x15')](_0x657e('0x1c'),_0x936e85,JSON[_0x657e('0x17')](_0x125a12));_0x4ba50f(_0x125a12);})[_0x657e('0x25')](function(_0x72b252){logger[_0x657e('0x18')](_0x657e('0x1c'),_0x72b252['message'],_0x936e85);_0x370848(_0x187bd2[_0x657e('0x18')](0x1f4,_0x72b252[_0x657e('0x1a')]));});});};
\ No newline at end of file
+var _0x9148=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','redis','localhost','socket.io-emitter','register','request','then','WhatsappAccount,\x20%s,\x20%s','request\x20sent','debug','WhatsappAccount,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','WhatsappAccount','find','options','raw','where','attributes','include','map','model','ShowWhatsappAccount','lodash','util','moment','bluebird'];(function(_0xa148b7,_0x2f3eb2){var _0x51efd3=function(_0x34bcec){while(--_0x34bcec){_0xa148b7['push'](_0xa148b7['shift']());}};_0x51efd3(++_0x2f3eb2);}(_0x9148,0x10d));var _0x8914=function(_0x1bb356,_0x3e3b67){_0x1bb356=_0x1bb356-0x0;var _0x4e9c30=_0x9148[_0x1bb356];return _0x4e9c30;};'use strict';var _=require(_0x8914('0x0'));var util=require(_0x8914('0x1'));var moment=require(_0x8914('0x2'));var BPromise=require(_0x8914('0x3'));var rs=require(_0x8914('0x4'));var fs=require('fs');var Redis=require(_0x8914('0x5'));var db=require(_0x8914('0x6'))['db'];var utils=require(_0x8914('0x7'));var logger=require(_0x8914('0x8'))(_0x8914('0x9'));var config=require(_0x8914('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x8914('0xb')]['http']({'port':0x232a});config[_0x8914('0xc')]=_['defaults'](config[_0x8914('0xc')],{'host':_0x8914('0xd'),'port':0x18eb});var socket=require(_0x8914('0xe'))(new Redis(config[_0x8914('0xc')]));require('./whatsappAccount.socket')[_0x8914('0xf')](socket);function respondWithRpcPromise(_0x38defa,_0x63bdb4,_0x6e296e){return new BPromise(function(_0x3e8af9,_0x569386){return client[_0x8914('0x10')](_0x38defa,_0x6e296e)[_0x8914('0x11')](function(_0x4c8007){logger['info'](_0x8914('0x12'),_0x63bdb4,_0x8914('0x13'));logger[_0x8914('0x14')](_0x8914('0x15'),_0x63bdb4,_0x8914('0x13'),JSON[_0x8914('0x16')](_0x4c8007));if(_0x4c8007['error']){if(_0x4c8007[_0x8914('0x17')][_0x8914('0x18')]===0x1f4){logger['error'](_0x8914('0x12'),_0x63bdb4,_0x4c8007[_0x8914('0x17')][_0x8914('0x19')]);return _0x569386(_0x4c8007[_0x8914('0x17')][_0x8914('0x19')]);}logger[_0x8914('0x17')](_0x8914('0x12'),_0x63bdb4,_0x4c8007[_0x8914('0x17')][_0x8914('0x19')]);return _0x3e8af9(_0x4c8007['error'][_0x8914('0x19')]);}else{logger[_0x8914('0x1a')](_0x8914('0x12'),_0x63bdb4,_0x8914('0x13'));_0x3e8af9(_0x4c8007[_0x8914('0x1b')][_0x8914('0x19')]);}})[_0x8914('0x1c')](function(_0x4a93b5){logger[_0x8914('0x17')](_0x8914('0x12'),_0x63bdb4,_0x4a93b5);_0x569386(_0x4a93b5);});});}exports['ShowWhatsappAccount']=function(_0x5de618){var _0x3e4dcc=this;return new Promise(function(_0x564292,_0x5b4f7a){return db[_0x8914('0x1d')][_0x8914('0x1e')]({'raw':_0x5de618[_0x8914('0x1f')]?_0x5de618[_0x8914('0x1f')][_0x8914('0x20')]===undefined?!![]:![]:!![],'where':_0x5de618[_0x8914('0x1f')]?_0x5de618[_0x8914('0x1f')][_0x8914('0x21')]||null:null,'attributes':_0x5de618[_0x8914('0x1f')]?_0x5de618[_0x8914('0x1f')][_0x8914('0x22')]||null:null,'include':_0x5de618[_0x8914('0x1f')]?_0x5de618[_0x8914('0x1f')][_0x8914('0x23')]?_[_0x8914('0x24')](_0x5de618['options']['include'],function(_0x3efc79){return{'model':db[_0x3efc79['model']],'as':_0x3efc79['as'],'attributes':_0x3efc79['attributes'],'include':_0x3efc79['include']?_[_0x8914('0x24')](_0x3efc79[_0x8914('0x23')],function(_0x4695ff){return{'model':db[_0x4695ff[_0x8914('0x25')]],'as':_0x4695ff['as'],'attributes':_0x4695ff[_0x8914('0x22')],'include':_0x4695ff[_0x8914('0x23')]?_[_0x8914('0x24')](_0x4695ff[_0x8914('0x23')],function(_0x42b23c){return{'model':db[_0x42b23c[_0x8914('0x25')]],'as':_0x42b23c['as'],'attributes':_0x42b23c[_0x8914('0x22')]};}):[]};}):[]};}):[]:[]})[_0x8914('0x11')](function(_0x27ba21){logger[_0x8914('0x1a')](_0x8914('0x26'),_0x5de618);logger[_0x8914('0x14')](_0x8914('0x26'),_0x5de618,JSON[_0x8914('0x16')](_0x27ba21));_0x564292(_0x27ba21);})[_0x8914('0x1c')](function(_0x5443d9){logger['error'](_0x8914('0x26'),_0x5443d9['message'],_0x5de618);_0x5b4f7a(_0x3e4dcc['error'](0x1f4,_0x5443d9[_0x8914('0x19')]));});});};
\ No newline at end of file
index 445dc0f..e93f539 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf03f=['whatsappAccount:','./whatsappAccount.events','save','remove','update','emit','removeListener','length'];(function(_0x5e8fc,_0x1ccc06){var _0x41c58c=function(_0x495f2c){while(--_0x495f2c){_0x5e8fc['push'](_0x5e8fc['shift']());}};_0x41c58c(++_0x1ccc06);}(_0xf03f,0xa1));var _0xff03=function(_0x3806e6,_0x2f55d1){_0x3806e6=_0x3806e6-0x0;var _0x43aea8=_0xf03f[_0x3806e6];return _0x43aea8;};'use strict';var WhatsappAccountEvents=require(_0xff03('0x0'));var events=[_0xff03('0x1'),_0xff03('0x2'),_0xff03('0x3')];function createListener(_0x24d309,_0xf7807f){return function(_0x498fb2){_0xf7807f[_0xff03('0x4')](_0x24d309,_0x498fb2);};}function removeListener(_0x104302,_0x2ca703){return function(){WhatsappAccountEvents[_0xff03('0x5')](_0x104302,_0x2ca703);};}exports['register']=function(_0x4ed949){for(var _0x3c80d1=0x0,_0x2dbb84=events[_0xff03('0x6')];_0x3c80d1<_0x2dbb84;_0x3c80d1++){var _0x3e9f27=events[_0x3c80d1];var _0x62d498=createListener(_0xff03('0x7')+_0x3e9f27,_0x4ed949);WhatsappAccountEvents['on'](_0x3e9f27,_0x62d498);}};
\ No newline at end of file
+var _0x8d20=['emit','removeListener','register','length','save','remove','update'];(function(_0x4769d8,_0x1cb801){var _0x5c3698=function(_0x2712e4){while(--_0x2712e4){_0x4769d8['push'](_0x4769d8['shift']());}};_0x5c3698(++_0x1cb801);}(_0x8d20,0x115));var _0x08d2=function(_0x3efa02,_0x7fb3a7){_0x3efa02=_0x3efa02-0x0;var _0x4a0c00=_0x8d20[_0x3efa02];return _0x4a0c00;};'use strict';var WhatsappAccountEvents=require('./whatsappAccount.events');var events=[_0x08d2('0x0'),_0x08d2('0x1'),_0x08d2('0x2')];function createListener(_0x966edf,_0xcde524){return function(_0x3ef533){_0xcde524[_0x08d2('0x3')](_0x966edf,_0x3ef533);};}function removeListener(_0xabcf1b,_0x417f2d){return function(){WhatsappAccountEvents[_0x08d2('0x4')](_0xabcf1b,_0x417f2d);};}exports[_0x08d2('0x5')]=function(_0x443b29){for(var _0x1a4e8d=0x0,_0x107d23=events[_0x08d2('0x6')];_0x1a4e8d<_0x107d23;_0x1a4e8d++){var _0x5dfb42=events[_0x1a4e8d];var _0x62cc0c=createListener('whatsappAccount:'+_0x5dfb42,_0x443b29);WhatsappAccountEvents['on'](_0x5dfb42,_0x62cc0c);}};
\ No newline at end of file
index c8285ad..b8f581a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc1e5=['Router','../../components/interaction/service','./whatsappApplication.controller','get','/:id','isAuthenticated','show','create','put','delete','exports','util','path','connect-timeout','express'];(function(_0x1969a7,_0x5a133a){var _0x3d665f=function(_0x39c64b){while(--_0x39c64b){_0x1969a7['push'](_0x1969a7['shift']());}};_0x3d665f(++_0x5a133a);}(_0xc1e5,0x1cd));var _0x5c1e=function(_0x5dd5fa,_0x3f5552){_0x5dd5fa=_0x5dd5fa-0x0;var _0x8c54ed=_0xc1e5[_0x5dd5fa];return _0x8c54ed;};'use strict';var multer=require('multer');var util=require(_0x5c1e('0x0'));var path=require(_0x5c1e('0x1'));var timeout=require(_0x5c1e('0x2'));var express=require(_0x5c1e('0x3'));var router=express[_0x5c1e('0x4')]();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x5c1e('0x5'));var config=require('../../config/environment');var controller=require(_0x5c1e('0x6'));router[_0x5c1e('0x7')]('/',auth['isAuthenticated'](),controller['index']);router[_0x5c1e('0x7')](_0x5c1e('0x8'),auth[_0x5c1e('0x9')](),controller[_0x5c1e('0xa')]);router['post']('/',auth[_0x5c1e('0x9')](),controller[_0x5c1e('0xb')]);router[_0x5c1e('0xc')](_0x5c1e('0x8'),auth[_0x5c1e('0x9')](),controller['update']);router[_0x5c1e('0xd')]('/:id',auth['isAuthenticated'](),controller['destroy']);module[_0x5c1e('0xe')]=router;
\ No newline at end of file
+var _0x4c10=['connect-timeout','Router','../../components/auth/service','../../config/environment','./whatsappApplication.controller','get','isAuthenticated','index','/:id','post','create','put','delete','destroy','exports','multer','util','path'];(function(_0x1256fe,_0x1f5b06){var _0x306a29=function(_0x444d01){while(--_0x444d01){_0x1256fe['push'](_0x1256fe['shift']());}};_0x306a29(++_0x1f5b06);}(_0x4c10,0x12f));var _0x04c1=function(_0x475959,_0x4b374c){_0x475959=_0x475959-0x0;var _0x447228=_0x4c10[_0x475959];return _0x447228;};'use strict';var multer=require(_0x04c1('0x0'));var util=require(_0x04c1('0x1'));var path=require(_0x04c1('0x2'));var timeout=require(_0x04c1('0x3'));var express=require('express');var router=express[_0x04c1('0x4')]();var fs_extra=require('fs-extra');var auth=require(_0x04c1('0x5'));var interaction=require('../../components/interaction/service');var config=require(_0x04c1('0x6'));var controller=require(_0x04c1('0x7'));router[_0x04c1('0x8')]('/',auth[_0x04c1('0x9')](),controller[_0x04c1('0xa')]);router[_0x04c1('0x8')](_0x04c1('0xb'),auth[_0x04c1('0x9')](),controller['show']);router[_0x04c1('0xc')]('/',auth['isAuthenticated'](),controller[_0x04c1('0xd')]);router[_0x04c1('0xe')](_0x04c1('0xb'),auth[_0x04c1('0x9')](),controller['update']);router[_0x04c1('0xf')](_0x04c1('0xb'),auth['isAuthenticated'](),controller[_0x04c1('0x10')]);module[_0x04c1('0x11')]=router;
\ No newline at end of file
index 22f9def..5398d53 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6426=['INTEGER','STRING','noop','TEXT','sequelize','exports'];(function(_0x3c4e4c,_0x36ff70){var _0x144a87=function(_0x5efb4b){while(--_0x5efb4b){_0x3c4e4c['push'](_0x3c4e4c['shift']());}};_0x144a87(++_0x36ff70);}(_0x6426,0xd6));var _0x6642=function(_0x5d7039,_0x56ad14){_0x5d7039=_0x5d7039-0x0;var _0x5193ec=_0x6426[_0x5d7039];return _0x5193ec;};'use strict';var Sequelize=require(_0x6642('0x0'));module[_0x6642('0x1')]={'priority':{'type':Sequelize[_0x6642('0x2')],'allowNull':![]},'app':{'type':Sequelize[_0x6642('0x3')],'allowNull':![],'defaultValue':_0x6642('0x4')},'appdata':{'type':Sequelize[_0x6642('0x5')]()},'description':{'type':Sequelize[_0x6642('0x3')]},'interval':{'type':Sequelize[_0x6642('0x3')],'defaultValue':'*,*,*,*'}};
\ No newline at end of file
+var _0x7e45=['sequelize','exports','STRING','noop','TEXT','*,*,*,*'];(function(_0x2145d1,_0x140c60){var _0x2c29b2=function(_0x533f8f){while(--_0x533f8f){_0x2145d1['push'](_0x2145d1['shift']());}};_0x2c29b2(++_0x140c60);}(_0x7e45,0xae));var _0x57e4=function(_0x1c25c0,_0x575b5b){_0x1c25c0=_0x1c25c0-0x0;var _0x588338=_0x7e45[_0x1c25c0];return _0x588338;};'use strict';var Sequelize=require(_0x57e4('0x0'));module[_0x57e4('0x1')]={'priority':{'type':Sequelize['INTEGER'],'allowNull':![]},'app':{'type':Sequelize[_0x57e4('0x2')],'allowNull':![],'defaultValue':_0x57e4('0x3')},'appdata':{'type':Sequelize[_0x57e4('0x4')]()},'description':{'type':Sequelize[_0x57e4('0x2')]},'interval':{'type':Sequelize['STRING'],'defaultValue':_0x57e4('0x5')}};
\ No newline at end of file
index b39337f..486dd05 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x15ef=['bluebird','mustache','util','sox','to-csv','lodash','squel','jsforce','querystring','papaparse','ioredis','../../config/license/hardware','../../config/logger','../../config/license/util','../../mysqldb','sendStatus','status','json','offset','undefined','count','limit','apply','save','then','destroy','end','error','name','send','index','map','rawAttributes','type','key','model','query','keys','intersection','attributes','fields','nolimit','sort','where','filters','pick','filter','merge','VIRTUAL','WhatsappApplication','include','findAll','catch','show','params','length','includeAll','options','find','create','body','update','rimraf','zip-dir','request-promise','moment'];(function(_0x2cef86,_0xbae0a6){var _0x46dfd6=function(_0x52e464){while(--_0x52e464){_0x2cef86['push'](_0x2cef86['shift']());}};_0x46dfd6(++_0xbae0a6);}(_0x15ef,0x80));var _0xf15e=function(_0x471b26,_0x2058db){_0x471b26=_0x471b26-0x0;var _0x18ad9a=_0x15ef[_0x471b26];return _0x18ad9a;};'use strict';var emlformat=require('eml-format');var rimraf=require(_0xf15e('0x0'));var zipdir=require(_0xf15e('0x1'));var jsonpatch=require('fast-json-patch');var rp=require(_0xf15e('0x2'));var moment=require(_0xf15e('0x3'));var BPromise=require(_0xf15e('0x4'));var Mustache=require(_0xf15e('0x5'));var util=require(_0xf15e('0x6'));var path=require('path');var sox=require(_0xf15e('0x7'));var csv=require(_0xf15e('0x8'));var ejs=require('ejs');var fs=require('fs');var fs_extra=require('fs-extra');var _=require(_0xf15e('0x9'));var squel=require(_0xf15e('0xa'));var crypto=require('crypto');var jsforce=require(_0xf15e('0xb'));var deskjs=require('desk.js');var toCsv=require(_0xf15e('0x8'));var querystring=require(_0xf15e('0xc'));var Papa=require(_0xf15e('0xd'));var Redis=require(_0xf15e('0xe'));var authService=require('../../components/auth/service');var qs=require('../../components/parsers/qs');var as=require('../../components/parsers/advancedSearch');var hardwareService=require(_0xf15e('0xf'));var logger=require(_0xf15e('0x10'))('api');var utils=require('../../config/utils');var config=require('../../config/environment');var licenseUtil=require(_0xf15e('0x11'));var db=require(_0xf15e('0x12'))['db'];function respondWithStatusCode(_0x8551e2,_0x5809f7){_0x5809f7=_0x5809f7||0xcc;return function(_0x442d51){if(_0x442d51){return _0x8551e2[_0xf15e('0x13')](_0x5809f7);}return _0x8551e2[_0xf15e('0x14')](_0x5809f7)['end']();};}function respondWithResult(_0x1ec4ad,_0x1d76e9){_0x1d76e9=_0x1d76e9||0xc8;return function(_0x3e1b34){if(_0x3e1b34){return _0x1ec4ad[_0xf15e('0x14')](_0x1d76e9)[_0xf15e('0x15')](_0x3e1b34);}};}function respondWithFilteredResult(_0x1cbcc3,_0x17c241){return function(_0x2d6bd7){if(_0x2d6bd7){var _0x54b94c=typeof _0x17c241[_0xf15e('0x16')]===_0xf15e('0x17')&&typeof _0x17c241['limit']===_0xf15e('0x17');var _0x4356ca=_0x2d6bd7[_0xf15e('0x18')];var _0x487018=_0x54b94c?0x0:_0x17c241['offset'];var _0x3ad067=_0x54b94c?_0x2d6bd7[_0xf15e('0x18')]:_0x17c241['offset']+_0x17c241[_0xf15e('0x19')];var _0x1f1f33;if(_0x3ad067>=_0x4356ca){_0x3ad067=_0x4356ca;_0x1f1f33=0xc8;}else{_0x1f1f33=0xce;}_0x1cbcc3[_0xf15e('0x14')](_0x1f1f33);return _0x1cbcc3['set']('Content-Range',_0x487018+'-'+_0x3ad067+'/'+_0x4356ca)[_0xf15e('0x15')](_0x2d6bd7);}return null;};}function patchUpdates(_0x3fa737){return function(_0x499658){try{jsonpatch[_0xf15e('0x1a')](_0x499658,_0x3fa737,!![]);}catch(_0x56e8c9){return BPromise['reject'](_0x56e8c9);}return _0x499658[_0xf15e('0x1b')]();};}function saveUpdates(_0x239d41,_0x389489){return function(_0x9ece34){if(_0x9ece34){return _0x9ece34['update'](_0x239d41)[_0xf15e('0x1c')](function(_0xa09c0c){return _0xa09c0c;});}return null;};}function removeEntity(_0x302b70,_0x51c06a){return function(_0x248c4b){if(_0x248c4b){return _0x248c4b[_0xf15e('0x1d')]()['then'](function(){_0x302b70['status'](0xcc)[_0xf15e('0x1e')]();});}};}function handleEntityNotFound(_0xb36af,_0x1fd237){return function(_0x471079){if(!_0x471079){_0xb36af[_0xf15e('0x13')](0x194);}return _0x471079;};}function handleError(_0x58877f,_0x48764e){_0x48764e=_0x48764e||0x1f4;return function(_0x3f9d64){logger[_0xf15e('0x1f')](_0x3f9d64['stack']);if(_0x3f9d64[_0xf15e('0x20')]){delete _0x3f9d64[_0xf15e('0x20')];}_0x58877f[_0xf15e('0x14')](_0x48764e)[_0xf15e('0x21')](_0x3f9d64);};}exports[_0xf15e('0x22')]=function(_0xff4c07,_0x1e6a63){var _0x40321a={},_0x5dd9cf={},_0x3567d5={'count':0x0,'rows':[]};var _0x17f112=_[_0xf15e('0x23')](db['WhatsappApplication'][_0xf15e('0x24')],function(_0x203711){return{'name':_0x203711['fieldName'],'type':_0x203711[_0xf15e('0x25')][_0xf15e('0x26')]};});_0x5dd9cf[_0xf15e('0x27')]=_['map'](_0x17f112,_0xf15e('0x20'));_0x5dd9cf[_0xf15e('0x28')]=_[_0xf15e('0x29')](_0xff4c07[_0xf15e('0x28')]);_0x5dd9cf['filters']=_[_0xf15e('0x2a')](_0x5dd9cf[_0xf15e('0x27')],_0x5dd9cf['query']);_0x40321a[_0xf15e('0x2b')]=_[_0xf15e('0x2a')](_0x5dd9cf[_0xf15e('0x27')],qs['fields'](_0xff4c07[_0xf15e('0x28')][_0xf15e('0x2c')]));_0x40321a['attributes']=_0x40321a[_0xf15e('0x2b')]['length']?_0x40321a[_0xf15e('0x2b')]:_0x5dd9cf[_0xf15e('0x27')];if(!_0xff4c07['query']['hasOwnProperty'](_0xf15e('0x2d'))){_0x40321a[_0xf15e('0x19')]=qs['limit'](_0xff4c07[_0xf15e('0x28')][_0xf15e('0x19')]);_0x40321a[_0xf15e('0x16')]=qs[_0xf15e('0x16')](_0xff4c07[_0xf15e('0x28')][_0xf15e('0x16')]);}_0x40321a['order']=qs[_0xf15e('0x2e')](_0xff4c07[_0xf15e('0x28')][_0xf15e('0x2e')]);_0x40321a[_0xf15e('0x2f')]=qs[_0xf15e('0x30')](_[_0xf15e('0x31')](_0xff4c07[_0xf15e('0x28')],_0x5dd9cf[_0xf15e('0x30')]),_0x17f112);if(_0xff4c07['query'][_0xf15e('0x32')]){_0x40321a['where']=_[_0xf15e('0x33')](_0x40321a[_0xf15e('0x2f')],{'$or':_[_0xf15e('0x23')](_0x17f112,function(_0x40e707){if(_0x40e707[_0xf15e('0x25')]!==_0xf15e('0x34')){var _0x4d411f={};_0x4d411f[_0x40e707[_0xf15e('0x20')]]={'$like':'%'+_0xff4c07[_0xf15e('0x28')][_0xf15e('0x32')]+'%'};return _0x4d411f;}})});}_0x40321a=_[_0xf15e('0x33')]({},_0x40321a,_0xff4c07['options']);var _0x52ebab={'where':_0x40321a[_0xf15e('0x2f')]};return db[_0xf15e('0x35')][_0xf15e('0x18')](_0x52ebab)['then'](function(_0x514c68){_0x3567d5['count']=_0x514c68;if(_0xff4c07['query']['includeAll']){_0x40321a[_0xf15e('0x36')]=[{'all':!![]}];}return db[_0xf15e('0x35')][_0xf15e('0x37')](_0x40321a);})['then'](function(_0x3a56bd){_0x3567d5['rows']=_0x3a56bd;return _0x3567d5;})[_0xf15e('0x1c')](respondWithFilteredResult(_0x1e6a63,_0x40321a))[_0xf15e('0x38')](handleError(_0x1e6a63,null));};exports[_0xf15e('0x39')]=function(_0x180d7a,_0x52bbc4){var _0xf32fc5={'raw':!![],'where':{'id':_0x180d7a[_0xf15e('0x3a')]['id']}},_0x37f0a6={};_0x37f0a6[_0xf15e('0x27')]=_[_0xf15e('0x29')](db['WhatsappApplication'][_0xf15e('0x24')]);_0x37f0a6[_0xf15e('0x28')]=_[_0xf15e('0x29')](_0x180d7a[_0xf15e('0x28')]);_0x37f0a6[_0xf15e('0x30')]=_[_0xf15e('0x2a')](_0x37f0a6[_0xf15e('0x27')],_0x37f0a6['query']);_0xf32fc5[_0xf15e('0x2b')]=_[_0xf15e('0x2a')](_0x37f0a6['model'],qs['fields'](_0x180d7a[_0xf15e('0x28')]['fields']));_0xf32fc5['attributes']=_0xf32fc5[_0xf15e('0x2b')][_0xf15e('0x3b')]?_0xf32fc5['attributes']:_0x37f0a6[_0xf15e('0x27')];if(_0x180d7a[_0xf15e('0x28')][_0xf15e('0x3c')]){_0xf32fc5[_0xf15e('0x36')]=[{'all':!![]}];}_0xf32fc5=_[_0xf15e('0x33')]({},_0xf32fc5,_0x180d7a[_0xf15e('0x3d')]);return db[_0xf15e('0x35')][_0xf15e('0x3e')](_0xf32fc5)[_0xf15e('0x1c')](handleEntityNotFound(_0x52bbc4,null))['then'](respondWithResult(_0x52bbc4,null))[_0xf15e('0x38')](handleError(_0x52bbc4,null));};exports[_0xf15e('0x3f')]=function(_0x3b79a8,_0x5b31c9){return db['WhatsappApplication'][_0xf15e('0x3f')](_0x3b79a8[_0xf15e('0x40')],{})[_0xf15e('0x1c')](respondWithResult(_0x5b31c9,0xc9))[_0xf15e('0x38')](handleError(_0x5b31c9,null));};exports[_0xf15e('0x41')]=function(_0xac7515,_0x3b5c7b){if(_0xac7515[_0xf15e('0x40')]['id']){delete _0xac7515['body']['id'];}return db[_0xf15e('0x35')][_0xf15e('0x3e')]({'where':{'id':_0xac7515['params']['id']}})[_0xf15e('0x1c')](handleEntityNotFound(_0x3b5c7b,null))['then'](saveUpdates(_0xac7515[_0xf15e('0x40')],null))[_0xf15e('0x1c')](respondWithResult(_0x3b5c7b,null))[_0xf15e('0x38')](handleError(_0x3b5c7b,null));};exports['destroy']=function(_0x46e6e9,_0x3e2fd6){return db[_0xf15e('0x35')][_0xf15e('0x3e')]({'where':{'id':_0x46e6e9[_0xf15e('0x3a')]['id']}})[_0xf15e('0x1c')](handleEntityNotFound(_0x3e2fd6,null))[_0xf15e('0x1c')](removeEntity(_0x3e2fd6,null))[_0xf15e('0x38')](handleError(_0x3e2fd6,null));};
\ No newline at end of file
+var _0x4815=['count','limit','apply','reject','save','update','destroy','then','stack','name','send','index','map','WhatsappApplication','rawAttributes','fieldName','key','query','filters','intersection','model','attributes','fields','hasOwnProperty','nolimit','order','merge','where','VIRTUAL','includeAll','include','findAll','rows','catch','params','keys','create','body','find','eml-format','rimraf','zip-dir','fast-json-patch','request-promise','moment','bluebird','path','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','querystring','papaparse','ioredis','../../components/auth/service','../../components/parsers/qs','../../config/logger','api','../../config/utils','../../config/environment','../../mysqldb','sendStatus','end','status','json','offset','undefined'];(function(_0x537856,_0x3dde66){var _0x54d0bd=function(_0x374a82){while(--_0x374a82){_0x537856['push'](_0x537856['shift']());}};_0x54d0bd(++_0x3dde66);}(_0x4815,0xff));var _0x5481=function(_0x1749dd,_0x365221){_0x1749dd=_0x1749dd-0x0;var _0x1ae17d=_0x4815[_0x1749dd];return _0x1ae17d;};'use strict';var emlformat=require(_0x5481('0x0'));var rimraf=require(_0x5481('0x1'));var zipdir=require(_0x5481('0x2'));var jsonpatch=require(_0x5481('0x3'));var rp=require(_0x5481('0x4'));var moment=require(_0x5481('0x5'));var BPromise=require(_0x5481('0x6'));var Mustache=require('mustache');var util=require('util');var path=require(_0x5481('0x7'));var sox=require(_0x5481('0x8'));var csv=require(_0x5481('0x9'));var ejs=require(_0x5481('0xa'));var fs=require('fs');var fs_extra=require(_0x5481('0xb'));var _=require(_0x5481('0xc'));var squel=require(_0x5481('0xd'));var crypto=require(_0x5481('0xe'));var jsforce=require(_0x5481('0xf'));var deskjs=require(_0x5481('0x10'));var toCsv=require(_0x5481('0x9'));var querystring=require(_0x5481('0x11'));var Papa=require(_0x5481('0x12'));var Redis=require(_0x5481('0x13'));var authService=require(_0x5481('0x14'));var qs=require(_0x5481('0x15'));var as=require('../../components/parsers/advancedSearch');var hardwareService=require('../../config/license/hardware');var logger=require(_0x5481('0x16'))(_0x5481('0x17'));var utils=require(_0x5481('0x18'));var config=require(_0x5481('0x19'));var licenseUtil=require('../../config/license/util');var db=require(_0x5481('0x1a'))['db'];function respondWithStatusCode(_0x5645c5,_0x34f04a){_0x34f04a=_0x34f04a||0xcc;return function(_0x41e0ad){if(_0x41e0ad){return _0x5645c5[_0x5481('0x1b')](_0x34f04a);}return _0x5645c5['status'](_0x34f04a)[_0x5481('0x1c')]();};}function respondWithResult(_0x5e9ec1,_0x18dc20){_0x18dc20=_0x18dc20||0xc8;return function(_0x1f8cf8){if(_0x1f8cf8){return _0x5e9ec1[_0x5481('0x1d')](_0x18dc20)[_0x5481('0x1e')](_0x1f8cf8);}};}function respondWithFilteredResult(_0x24ee7a,_0x35d490){return function(_0x31b8c9){if(_0x31b8c9){var _0x2deceb=typeof _0x35d490[_0x5481('0x1f')]===_0x5481('0x20')&&typeof _0x35d490['limit']===_0x5481('0x20');var _0x2e9d46=_0x31b8c9[_0x5481('0x21')];var _0x5d938c=_0x2deceb?0x0:_0x35d490['offset'];var _0x5dcdc1=_0x2deceb?_0x31b8c9['count']:_0x35d490[_0x5481('0x1f')]+_0x35d490[_0x5481('0x22')];var _0x35f015;if(_0x5dcdc1>=_0x2e9d46){_0x5dcdc1=_0x2e9d46;_0x35f015=0xc8;}else{_0x35f015=0xce;}_0x24ee7a['status'](_0x35f015);return _0x24ee7a['set']('Content-Range',_0x5d938c+'-'+_0x5dcdc1+'/'+_0x2e9d46)[_0x5481('0x1e')](_0x31b8c9);}return null;};}function patchUpdates(_0x277bd1){return function(_0x272ef4){try{jsonpatch[_0x5481('0x23')](_0x272ef4,_0x277bd1,!![]);}catch(_0x1cb8dd){return BPromise[_0x5481('0x24')](_0x1cb8dd);}return _0x272ef4[_0x5481('0x25')]();};}function saveUpdates(_0x3e70a3,_0x30c183){return function(_0x197aa7){if(_0x197aa7){return _0x197aa7[_0x5481('0x26')](_0x3e70a3)['then'](function(_0xee5dad){return _0xee5dad;});}return null;};}function removeEntity(_0x4c86d5,_0x321b28){return function(_0x3b3451){if(_0x3b3451){return _0x3b3451[_0x5481('0x27')]()[_0x5481('0x28')](function(){_0x4c86d5[_0x5481('0x1d')](0xcc)[_0x5481('0x1c')]();});}};}function handleEntityNotFound(_0x2ac321,_0x217af9){return function(_0x26eeee){if(!_0x26eeee){_0x2ac321['sendStatus'](0x194);}return _0x26eeee;};}function handleError(_0x50c4f9,_0x2a1674){_0x2a1674=_0x2a1674||0x1f4;return function(_0x3bbf65){logger['error'](_0x3bbf65[_0x5481('0x29')]);if(_0x3bbf65[_0x5481('0x2a')]){delete _0x3bbf65[_0x5481('0x2a')];}_0x50c4f9[_0x5481('0x1d')](_0x2a1674)[_0x5481('0x2b')](_0x3bbf65);};}exports[_0x5481('0x2c')]=function(_0x235327,_0x230b5f){var _0x347cac={},_0x47cbd2={},_0x28cf83={'count':0x0,'rows':[]};var _0x38146e=_[_0x5481('0x2d')](db[_0x5481('0x2e')][_0x5481('0x2f')],function(_0xcac836){return{'name':_0xcac836[_0x5481('0x30')],'type':_0xcac836['type'][_0x5481('0x31')]};});_0x47cbd2['model']=_['map'](_0x38146e,'name');_0x47cbd2[_0x5481('0x32')]=_['keys'](_0x235327[_0x5481('0x32')]);_0x47cbd2[_0x5481('0x33')]=_[_0x5481('0x34')](_0x47cbd2[_0x5481('0x35')],_0x47cbd2[_0x5481('0x32')]);_0x347cac[_0x5481('0x36')]=_['intersection'](_0x47cbd2[_0x5481('0x35')],qs[_0x5481('0x37')](_0x235327['query'][_0x5481('0x37')]));_0x347cac[_0x5481('0x36')]=_0x347cac[_0x5481('0x36')]['length']?_0x347cac[_0x5481('0x36')]:_0x47cbd2[_0x5481('0x35')];if(!_0x235327[_0x5481('0x32')][_0x5481('0x38')](_0x5481('0x39'))){_0x347cac[_0x5481('0x22')]=qs[_0x5481('0x22')](_0x235327[_0x5481('0x32')][_0x5481('0x22')]);_0x347cac[_0x5481('0x1f')]=qs[_0x5481('0x1f')](_0x235327[_0x5481('0x32')][_0x5481('0x1f')]);}_0x347cac[_0x5481('0x3a')]=qs['sort'](_0x235327[_0x5481('0x32')]['sort']);_0x347cac['where']=qs['filters'](_['pick'](_0x235327[_0x5481('0x32')],_0x47cbd2[_0x5481('0x33')]),_0x38146e);if(_0x235327['query']['filter']){_0x347cac['where']=_[_0x5481('0x3b')](_0x347cac[_0x5481('0x3c')],{'$or':_['map'](_0x38146e,function(_0x3524ae){if(_0x3524ae['type']!==_0x5481('0x3d')){var _0x3b84df={};_0x3b84df[_0x3524ae[_0x5481('0x2a')]]={'$like':'%'+_0x235327['query']['filter']+'%'};return _0x3b84df;}})});}_0x347cac=_[_0x5481('0x3b')]({},_0x347cac,_0x235327['options']);var _0xa264ed={'where':_0x347cac[_0x5481('0x3c')]};return db['WhatsappApplication'][_0x5481('0x21')](_0xa264ed)['then'](function(_0xe9daad){_0x28cf83['count']=_0xe9daad;if(_0x235327['query'][_0x5481('0x3e')]){_0x347cac[_0x5481('0x3f')]=[{'all':!![]}];}return db[_0x5481('0x2e')][_0x5481('0x40')](_0x347cac);})[_0x5481('0x28')](function(_0x189c08){_0x28cf83[_0x5481('0x41')]=_0x189c08;return _0x28cf83;})[_0x5481('0x28')](respondWithFilteredResult(_0x230b5f,_0x347cac))[_0x5481('0x42')](handleError(_0x230b5f,null));};exports['show']=function(_0x5f2d33,_0x33b3ac){var _0x1f83c1={'raw':!![],'where':{'id':_0x5f2d33[_0x5481('0x43')]['id']}},_0x2a5a35={};_0x2a5a35['model']=_[_0x5481('0x44')](db[_0x5481('0x2e')]['rawAttributes']);_0x2a5a35[_0x5481('0x32')]=_[_0x5481('0x44')](_0x5f2d33[_0x5481('0x32')]);_0x2a5a35['filters']=_[_0x5481('0x34')](_0x2a5a35[_0x5481('0x35')],_0x2a5a35[_0x5481('0x32')]);_0x1f83c1[_0x5481('0x36')]=_['intersection'](_0x2a5a35[_0x5481('0x35')],qs['fields'](_0x5f2d33[_0x5481('0x32')][_0x5481('0x37')]));_0x1f83c1[_0x5481('0x36')]=_0x1f83c1[_0x5481('0x36')]['length']?_0x1f83c1['attributes']:_0x2a5a35[_0x5481('0x35')];if(_0x5f2d33[_0x5481('0x32')]['includeAll']){_0x1f83c1[_0x5481('0x3f')]=[{'all':!![]}];}_0x1f83c1=_['merge']({},_0x1f83c1,_0x5f2d33['options']);return db['WhatsappApplication']['find'](_0x1f83c1)['then'](handleEntityNotFound(_0x33b3ac,null))[_0x5481('0x28')](respondWithResult(_0x33b3ac,null))[_0x5481('0x42')](handleError(_0x33b3ac,null));};exports[_0x5481('0x45')]=function(_0xd7f0c5,_0x156890){return db[_0x5481('0x2e')][_0x5481('0x45')](_0xd7f0c5[_0x5481('0x46')],{})[_0x5481('0x28')](respondWithResult(_0x156890,0xc9))[_0x5481('0x42')](handleError(_0x156890,null));};exports['update']=function(_0xe4e47b,_0x184f61){if(_0xe4e47b[_0x5481('0x46')]['id']){delete _0xe4e47b[_0x5481('0x46')]['id'];}return db[_0x5481('0x2e')][_0x5481('0x47')]({'where':{'id':_0xe4e47b[_0x5481('0x43')]['id']}})[_0x5481('0x28')](handleEntityNotFound(_0x184f61,null))[_0x5481('0x28')](saveUpdates(_0xe4e47b['body'],null))['then'](respondWithResult(_0x184f61,null))[_0x5481('0x42')](handleError(_0x184f61,null));};exports[_0x5481('0x27')]=function(_0x870f08,_0x2d7246){return db['WhatsappApplication'][_0x5481('0x47')]({'where':{'id':_0x870f08[_0x5481('0x43')]['id']}})[_0x5481('0x28')](handleEntityNotFound(_0x2d7246,null))['then'](removeEntity(_0x2d7246,null))[_0x5481('0x42')](handleError(_0x2d7246,null));};
\ No newline at end of file
index e1aef9a..6929e5f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc978=['bluebird','path','rimraf','../../config/environment','./whatsappApplication.attributes','exports','WhatsappApplication','whatsapp_applications','utf8mb4','utf8mb4_unicode_ci','lodash','util','../../config/logger','api','moment'];(function(_0x497ab5,_0x40cda9){var _0x3e2164=function(_0x2ab18c){while(--_0x2ab18c){_0x497ab5['push'](_0x497ab5['shift']());}};_0x3e2164(++_0x40cda9);}(_0xc978,0xcd));var _0x8c97=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xc978[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0x8c97('0x0'));var util=require(_0x8c97('0x1'));var logger=require(_0x8c97('0x2'))(_0x8c97('0x3'));var moment=require(_0x8c97('0x4'));var BPromise=require(_0x8c97('0x5'));var rp=require('request-promise');var fs=require('fs');var path=require(_0x8c97('0x6'));var rimraf=require(_0x8c97('0x7'));var config=require(_0x8c97('0x8'));var attributes=require(_0x8c97('0x9'));module[_0x8c97('0xa')]=function(_0x2a9434,_0xabd146){return _0x2a9434['define'](_0x8c97('0xb'),attributes,{'tableName':_0x8c97('0xc'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0x8c97('0xd'),'collate':_0x8c97('0xe')});};
\ No newline at end of file
+var _0xb38e=['util','../../config/logger','api','moment','bluebird','request-promise','rimraf','../../config/environment','exports','define','whatsapp_applications','utf8mb4','utf8mb4_unicode_ci','lodash'];(function(_0x1bf809,_0x536f55){var _0x1caa4e=function(_0x9f9636){while(--_0x9f9636){_0x1bf809['push'](_0x1bf809['shift']());}};_0x1caa4e(++_0x536f55);}(_0xb38e,0xa7));var _0xeb38=function(_0x6730d8,_0x21f797){_0x6730d8=_0x6730d8-0x0;var _0x3876b4=_0xb38e[_0x6730d8];return _0x3876b4;};'use strict';var _=require(_0xeb38('0x0'));var util=require(_0xeb38('0x1'));var logger=require(_0xeb38('0x2'))(_0xeb38('0x3'));var moment=require(_0xeb38('0x4'));var BPromise=require(_0xeb38('0x5'));var rp=require(_0xeb38('0x6'));var fs=require('fs');var path=require('path');var rimraf=require(_0xeb38('0x7'));var config=require(_0xeb38('0x8'));var attributes=require('./whatsappApplication.attributes');module[_0xeb38('0x9')]=function(_0xd3e5dc,_0x28e501){return _0xd3e5dc[_0xeb38('0xa')]('WhatsappApplication',attributes,{'tableName':_0xeb38('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'charset':_0xeb38('0xc'),'collate':_0xeb38('0xd')});};
\ No newline at end of file
index e84207f..389f42a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c44=['randomstring','ioredis','../../mysqldb','../../config/utils','../../config/environment','client','http','request','then','request\x20sent','debug','stringify','code','error','message','WhatsappApplication,\x20%s,\x20%s','info','result','catch','moment','bluebird'];(function(_0x526301,_0x19ec94){var _0x168318=function(_0x5bea90){while(--_0x5bea90){_0x526301['push'](_0x526301['shift']());}};_0x168318(++_0x19ec94);}(_0x9c44,0x178));var _0x49c4=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0x9c44[_0xfae23b];return _0x200640;};'use strict';var _=require('lodash');var util=require('util');var moment=require(_0x49c4('0x0'));var BPromise=require(_0x49c4('0x1'));var rs=require(_0x49c4('0x2'));var fs=require('fs');var Redis=require(_0x49c4('0x3'));var db=require(_0x49c4('0x4'))['db'];var utils=require(_0x49c4('0x5'));var logger=require('../../config/logger')('rpc');var config=require(_0x49c4('0x6'));var jayson=require('jayson/promise');var client=jayson[_0x49c4('0x7')][_0x49c4('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x69bc41,_0x2c4e2e,_0x436234){return new BPromise(function(_0x511d53,_0x11c586){return client[_0x49c4('0x9')](_0x69bc41,_0x436234)[_0x49c4('0xa')](function(_0x4487ca){logger['info']('WhatsappApplication,\x20%s,\x20%s',_0x2c4e2e,_0x49c4('0xb'));logger[_0x49c4('0xc')]('WhatsappApplication,\x20%s,\x20%s,\x20%s',_0x2c4e2e,_0x49c4('0xb'),JSON[_0x49c4('0xd')](_0x4487ca));if(_0x4487ca['error']){if(_0x4487ca['error'][_0x49c4('0xe')]===0x1f4){logger[_0x49c4('0xf')]('WhatsappApplication,\x20%s,\x20%s',_0x2c4e2e,_0x4487ca[_0x49c4('0xf')][_0x49c4('0x10')]);return _0x11c586(_0x4487ca['error'][_0x49c4('0x10')]);}logger[_0x49c4('0xf')](_0x49c4('0x11'),_0x2c4e2e,_0x4487ca[_0x49c4('0xf')][_0x49c4('0x10')]);return _0x511d53(_0x4487ca[_0x49c4('0xf')][_0x49c4('0x10')]);}else{logger[_0x49c4('0x12')]('WhatsappApplication,\x20%s,\x20%s',_0x2c4e2e,_0x49c4('0xb'));_0x511d53(_0x4487ca[_0x49c4('0x13')][_0x49c4('0x10')]);}})[_0x49c4('0x14')](function(_0x2abc78){logger['error'](_0x49c4('0x11'),_0x2c4e2e,_0x2abc78);_0x11c586(_0x2abc78);});});}
\ No newline at end of file
+var _0xd2ea=['../../config/environment','jayson/promise','client','request','WhatsappApplication,\x20%s,\x20%s','request\x20sent','debug','WhatsappApplication,\x20%s,\x20%s,\x20%s','stringify','error','code','message','info','result','catch','lodash','util','moment','bluebird','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc'];(function(_0x34cdb7,_0x1e1a50){var _0x4052c5=function(_0x4fc59a){while(--_0x4fc59a){_0x34cdb7['push'](_0x34cdb7['shift']());}};_0x4052c5(++_0x1e1a50);}(_0xd2ea,0x15f));var _0xad2e=function(_0x119685,_0x497c6e){_0x119685=_0x119685-0x0;var _0x2a0c0a=_0xd2ea[_0x119685];return _0x2a0c0a;};'use strict';var _=require(_0xad2e('0x0'));var util=require(_0xad2e('0x1'));var moment=require(_0xad2e('0x2'));var BPromise=require(_0xad2e('0x3'));var rs=require(_0xad2e('0x4'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0xad2e('0x5'))['db'];var utils=require(_0xad2e('0x6'));var logger=require(_0xad2e('0x7'))(_0xad2e('0x8'));var config=require(_0xad2e('0x9'));var jayson=require(_0xad2e('0xa'));var client=jayson[_0xad2e('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x3b5170,_0x3e3d1f,_0x2ff7b2){return new BPromise(function(_0x5710ac,_0x1e0e9e){return client[_0xad2e('0xc')](_0x3b5170,_0x2ff7b2)['then'](function(_0x1eed2f){logger['info'](_0xad2e('0xd'),_0x3e3d1f,_0xad2e('0xe'));logger[_0xad2e('0xf')](_0xad2e('0x10'),_0x3e3d1f,'request\x20sent',JSON[_0xad2e('0x11')](_0x1eed2f));if(_0x1eed2f['error']){if(_0x1eed2f[_0xad2e('0x12')][_0xad2e('0x13')]===0x1f4){logger[_0xad2e('0x12')](_0xad2e('0xd'),_0x3e3d1f,_0x1eed2f['error'][_0xad2e('0x14')]);return _0x1e0e9e(_0x1eed2f['error'][_0xad2e('0x14')]);}logger['error']('WhatsappApplication,\x20%s,\x20%s',_0x3e3d1f,_0x1eed2f['error']['message']);return _0x5710ac(_0x1eed2f[_0xad2e('0x12')][_0xad2e('0x14')]);}else{logger[_0xad2e('0x15')](_0xad2e('0xd'),_0x3e3d1f,_0xad2e('0xe'));_0x5710ac(_0x1eed2f[_0xad2e('0x16')][_0xad2e('0x14')]);}})[_0xad2e('0x17')](function(_0xd40b31){logger[_0xad2e('0x12')](_0xad2e('0xd'),_0x3e3d1f,_0xd40b31);_0x1e0e9e(_0xd40b31);});});}
\ No newline at end of file
index db0895b..562346f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa899=['/:id/messages','tracked','whatsappinteraction:addtags','addTags','put','whatsapp','delete','whatsappinteraction:destroy','/:id/tags','removeTags','exports','multer','util','path','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappInteraction.controller','get','isAuthenticated','index','/describe','/:id','getMessages','/:id/download','download','post'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0xa899,0x155));var _0x9a89=function(_0x1a0daa,_0x2a4634){_0x1a0daa=_0x1a0daa-0x0;var _0x1dbe15=_0xa899[_0x1a0daa];return _0x1dbe15;};'use strict';var multer=require(_0x9a89('0x0'));var util=require(_0x9a89('0x1'));var path=require(_0x9a89('0x2'));var timeout=require('connect-timeout');var express=require(_0x9a89('0x3'));var router=express[_0x9a89('0x4')]();var fs_extra=require(_0x9a89('0x5'));var auth=require(_0x9a89('0x6'));var interaction=require(_0x9a89('0x7'));var config=require(_0x9a89('0x8'));var controller=require(_0x9a89('0x9'));router[_0x9a89('0xa')]('/',auth[_0x9a89('0xb')](),controller[_0x9a89('0xc')]);router[_0x9a89('0xa')](_0x9a89('0xd'),auth[_0x9a89('0xb')](),controller['describe']);router['get'](_0x9a89('0xe'),auth[_0x9a89('0xb')](),controller['show']);router[_0x9a89('0xa')]('/:id/messages',auth[_0x9a89('0xb')](),controller[_0x9a89('0xf')]);router[_0x9a89('0xa')](_0x9a89('0x10'),auth[_0x9a89('0xb')](),controller[_0x9a89('0x11')]);router[_0x9a89('0x12')]('/',auth['isAuthenticated'](),controller['create']);router[_0x9a89('0x12')](_0x9a89('0x13'),auth[_0x9a89('0xb')](),controller['addMessage']);router['post']('/:id/tags',auth[_0x9a89('0xb')](),interaction[_0x9a89('0x14')]('whatsapp',_0x9a89('0x15')),controller[_0x9a89('0x16')]);router[_0x9a89('0x17')](_0x9a89('0xe'),auth['isAuthenticated'](),interaction[_0x9a89('0x14')](_0x9a89('0x18'),'whatsappinteraction:update'),controller['update']);router[_0x9a89('0x19')]('/:id',auth[_0x9a89('0xb')](),interaction[_0x9a89('0x14')]('whatsapp',_0x9a89('0x1a')),controller['destroy']);router[_0x9a89('0x19')](_0x9a89('0x1b'),auth['isAuthenticated'](),controller[_0x9a89('0x1c')]);module[_0x9a89('0x1d')]=router;
\ No newline at end of file
+var _0x1883=['exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappInteraction.controller','get','isAuthenticated','index','/describe','/:id','show','/:id/messages','getMessages','download','create','post','addMessage','whatsappinteraction:addtags','tracked','whatsapp','whatsappinteraction:update','update','whatsappinteraction:destroy','destroy','delete','/:id/tags','removeTags'];(function(_0x1d10f3,_0x3d180c){var _0x35b2a0=function(_0x321941){while(--_0x321941){_0x1d10f3['push'](_0x1d10f3['shift']());}};_0x35b2a0(++_0x3d180c);}(_0x1883,0xab));var _0x3188=function(_0x2e21ea,_0x2dc9a8){_0x2e21ea=_0x2e21ea-0x0;var _0x278f59=_0x1883[_0x2e21ea];return _0x278f59;};'use strict';var multer=require(_0x3188('0x0'));var util=require(_0x3188('0x1'));var path=require(_0x3188('0x2'));var timeout=require(_0x3188('0x3'));var express=require(_0x3188('0x4'));var router=express[_0x3188('0x5')]();var fs_extra=require(_0x3188('0x6'));var auth=require(_0x3188('0x7'));var interaction=require(_0x3188('0x8'));var config=require(_0x3188('0x9'));var controller=require(_0x3188('0xa'));router[_0x3188('0xb')]('/',auth[_0x3188('0xc')](),controller[_0x3188('0xd')]);router[_0x3188('0xb')](_0x3188('0xe'),auth[_0x3188('0xc')](),controller['describe']);router[_0x3188('0xb')](_0x3188('0xf'),auth['isAuthenticated'](),controller[_0x3188('0x10')]);router['get'](_0x3188('0x11'),auth[_0x3188('0xc')](),controller[_0x3188('0x12')]);router[_0x3188('0xb')]('/:id/download',auth[_0x3188('0xc')](),controller[_0x3188('0x13')]);router['post']('/',auth['isAuthenticated'](),controller[_0x3188('0x14')]);router[_0x3188('0x15')](_0x3188('0x11'),auth[_0x3188('0xc')](),controller[_0x3188('0x16')]);router[_0x3188('0x15')]('/:id/tags',auth[_0x3188('0xc')](),interaction['tracked']('whatsapp',_0x3188('0x17')),controller['addTags']);router['put'](_0x3188('0xf'),auth[_0x3188('0xc')](),interaction[_0x3188('0x18')](_0x3188('0x19'),_0x3188('0x1a')),controller[_0x3188('0x1b')]);router['delete'](_0x3188('0xf'),auth[_0x3188('0xc')](),interaction[_0x3188('0x18')](_0x3188('0x19'),_0x3188('0x1c')),controller[_0x3188('0x1d')]);router[_0x3188('0x1e')](_0x3188('0x1f'),auth['isAuthenticated'](),controller[_0x3188('0x20')]);module[_0x3188('0x21')]=router;
\ No newline at end of file
index fd2f5d2..2537eb0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2ffe=['out','INTEGER','moment','exports','BOOLEAN','DATE','STRING','ENUM'];(function(_0x2888a4,_0x1fc157){var _0x7f650c=function(_0x5e1880){while(--_0x5e1880){_0x2888a4['push'](_0x2888a4['shift']());}};_0x7f650c(++_0x1fc157);}(_0x2ffe,0x6a));var _0xe2ff=function(_0x48f71a,_0x35a4d2){_0x48f71a=_0x48f71a-0x0;var _0x2bef5c=_0x2ffe[_0x48f71a];return _0x2bef5c;};'use strict';var Sequelize=require('sequelize');var moment=require(_0xe2ff('0x0'));module[_0xe2ff('0x1')]={'closed':{'type':Sequelize[_0xe2ff('0x2')],'defaultValue':![]},'closedAt':{'type':Sequelize[_0xe2ff('0x3')]},'disposition':{'type':Sequelize[_0xe2ff('0x4')]},'secondDisposition':{'type':Sequelize['STRING']},'thirdDisposition':{'type':Sequelize[_0xe2ff('0x4')]},'note':{'type':Sequelize[_0xe2ff('0x4')]},'phone':{'type':Sequelize['STRING']},'read1stAt':{'type':Sequelize['DATE']},'firstMsgDirection':{'type':Sequelize[_0xe2ff('0x5')]('in',_0xe2ff('0x6')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0xe2ff('0x3')]},'lastMsgDirection':{'type':Sequelize['ENUM']('in',_0xe2ff('0x6')),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize[_0xe2ff('0x2')],'defaultValue':![]},'queueId':{'type':Sequelize[_0xe2ff('0x7')]}};
\ No newline at end of file
+var _0xbca0=['DATE','sequelize','moment','STRING','ENUM','out'];(function(_0x53db0d,_0x35e36b){var _0x2834c2=function(_0x434419){while(--_0x434419){_0x53db0d['push'](_0x53db0d['shift']());}};_0x2834c2(++_0x35e36b);}(_0xbca0,0x8b));var _0x0bca=function(_0x35be23,_0x32576b){_0x35be23=_0x35be23-0x0;var _0x30ad0e=_0xbca0[_0x35be23];return _0x30ad0e;};'use strict';var Sequelize=require(_0x0bca('0x0'));var moment=require(_0x0bca('0x1'));module['exports']={'closed':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'closedAt':{'type':Sequelize['DATE']},'disposition':{'type':Sequelize[_0x0bca('0x2')]},'secondDisposition':{'type':Sequelize[_0x0bca('0x2')]},'thirdDisposition':{'type':Sequelize[_0x0bca('0x2')]},'note':{'type':Sequelize[_0x0bca('0x2')]},'phone':{'type':Sequelize['STRING']},'read1stAt':{'type':Sequelize['DATE']},'firstMsgDirection':{'type':Sequelize[_0x0bca('0x3')]('in',_0x0bca('0x4')),'defaultValue':'in','allowNull':![]},'lastMsgAt':{'type':Sequelize[_0x0bca('0x5')]},'lastMsgDirection':{'type':Sequelize[_0x0bca('0x3')]('in','out'),'defaultValue':'in','allowNull':![]},'autoreplyExecuted':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'queueId':{'type':Sequelize['INTEGER']}};
\ No newline at end of file
index 8c3eb1d..09531cb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9195=['findAll','color','emit','whatsappInteractionTags:save','removeTags','download','toString','join','root','server','files','tmp','attachments','transcript-%d-%s.zip','push','User','Contact','firstName','Attachment','Messages','createdAt','secret','WhatsappAccount','Account','Owner','get','mkdirSync','fullname','N.A.','YYYY-MM-DD\x20HH:mm:ss','closedAt','disposition','basename','existsSync','createReadStream','createWriteStream','direction','out','System','lastName','read','value','renderFile','views','downloadInteraction.ejs','transcript-','.pdf','createPdfFromHTML','unlinkSync','rimraf','zip-dir','moment','path','ejs','lodash','ioredis','../../components/interaction/service','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','./whatsappInteraction.socket','register','sendStatus','status','end','offset','undefined','limit','count','Content-Range','update','then','error','stack','name','index','map','WhatsappInteraction','fieldName','type','key','getOptions','whatsapp','query','user','catch','show','params','model','keys','intersection','attributes','fields','length','merge','create','body','find','destroy','WhatsappMessage','addMessage','ids','omit','getMessages','findOne','rawAttributes','filters','hasOwnProperty','nolimit','sort','where','pick','WhatsappInteractionId','filter','split','format','options','include','setTags'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x9195,0x129));var _0x5919=function(_0x14cfbf,_0x2b661f){_0x14cfbf=_0x14cfbf-0x0;var _0x26b3e6=_0x9195[_0x14cfbf];return _0x26b3e6;};'use strict';var rimraf=require(_0x5919('0x0'));var zipdir=require(_0x5919('0x1'));var moment=require(_0x5919('0x2'));var BPromise=require('bluebird');var util=require('util');var path=require(_0x5919('0x3'));var ejs=require(_0x5919('0x4'));var fs=require('fs');var _=require(_0x5919('0x5'));var Redis=require(_0x5919('0x6'));var interaction=require(_0x5919('0x7'));var qs=require('../../components/parsers/qs');var pdf=require('../../components/export/pdf');var logger=require(_0x5919('0x8'))(_0x5919('0x9'));var config=require(_0x5919('0xa'));var db=require(_0x5919('0xb'))['db'];config[_0x5919('0xc')]=_[_0x5919('0xd')](config[_0x5919('0xc')],{'host':_0x5919('0xe'),'port':0x18eb});var socket=require(_0x5919('0xf'))(new Redis(config[_0x5919('0xc')]));require(_0x5919('0x10'))[_0x5919('0x11')](socket);function respondWithStatusCode(_0x1896f4,_0xafc5a3){_0xafc5a3=_0xafc5a3||0xcc;return function(_0xcb25a5){if(_0xcb25a5){return _0x1896f4[_0x5919('0x12')](_0xafc5a3);}return _0x1896f4[_0x5919('0x13')](_0xafc5a3)[_0x5919('0x14')]();};}function respondWithResult(_0x454ef8,_0x56e31b){_0x56e31b=_0x56e31b||0xc8;return function(_0x2d00fe){if(_0x2d00fe){return _0x454ef8[_0x5919('0x13')](_0x56e31b)['json'](_0x2d00fe);}};}function respondWithFilteredResult(_0x340102,_0x5c2734){return function(_0x11dc32){if(_0x11dc32){var _0x374a66=typeof _0x5c2734[_0x5919('0x15')]===_0x5919('0x16')&&typeof _0x5c2734[_0x5919('0x17')]===_0x5919('0x16');var _0x18ec88=_0x11dc32[_0x5919('0x18')];var _0x46db02=_0x374a66?0x0:_0x5c2734['offset'];var _0x43f37e=_0x374a66?_0x11dc32['count']:_0x5c2734[_0x5919('0x15')]+_0x5c2734['limit'];var _0x5b5d03;if(_0x43f37e>=_0x18ec88){_0x43f37e=_0x18ec88;_0x5b5d03=0xc8;}else{_0x5b5d03=0xce;}_0x340102[_0x5919('0x13')](_0x5b5d03);return _0x340102['set'](_0x5919('0x19'),_0x46db02+'-'+_0x43f37e+'/'+_0x18ec88)['json'](_0x11dc32);}return null;};}function saveUpdates(_0x3123e3){return function(_0x30df89){if(_0x30df89){return _0x30df89[_0x5919('0x1a')](_0x3123e3)[_0x5919('0x1b')](function(_0x206c33){return _0x206c33;});}return null;};}function removeEntity(_0x185ad1){return function(_0x40fbdd){if(_0x40fbdd){return _0x40fbdd['destroy']()[_0x5919('0x1b')](function(){_0x185ad1[_0x5919('0x13')](0xcc)[_0x5919('0x14')]();});}};}function handleEntityNotFound(_0x1a2e59){return function(_0x1714b7){if(!_0x1714b7){_0x1a2e59[_0x5919('0x12')](0x194);}return _0x1714b7;};}function handleError(_0x42097f,_0x321ee1){_0x321ee1=_0x321ee1||0x1f4;return function(_0x3197ed){logger[_0x5919('0x1c')](_0x3197ed[_0x5919('0x1d')]);if(_0x3197ed[_0x5919('0x1e')]){delete _0x3197ed[_0x5919('0x1e')];}_0x42097f[_0x5919('0x13')](_0x321ee1)['send'](_0x3197ed);};}exports[_0x5919('0x1f')]=function(_0x5efc07,_0x16f741){var _0x23824c={};var _0x5170c0=_[_0x5919('0x20')](db[_0x5919('0x21')]['rawAttributes'],function(_0x217a0f){return{'name':_0x217a0f[_0x5919('0x22')],'type':_0x217a0f[_0x5919('0x23')][_0x5919('0x24')]};});_0x23824c=qs[_0x5919('0x25')](_0x5170c0,_0x5efc07);return interaction['findAll'](_0x5919('0x26'),_0x5efc07[_0x5919('0x27')],_0x5efc07[_0x5919('0x28')],_0x23824c,_0x5170c0)[_0x5919('0x1b')](respondWithFilteredResult(_0x16f741,_0x23824c))[_0x5919('0x29')](handleError(_0x16f741,null));};exports[_0x5919('0x2a')]=function(_0x3d8895,_0x5eb8bf){var _0x41336e={'raw':![],'where':{'id':_0x3d8895[_0x5919('0x2b')]['id']}},_0xd968e6={};_0xd968e6[_0x5919('0x2c')]=_[_0x5919('0x2d')](db[_0x5919('0x21')]['rawAttributes']);_0xd968e6[_0x5919('0x27')]=_[_0x5919('0x2d')](_0x3d8895[_0x5919('0x27')]);_0xd968e6['filters']=_[_0x5919('0x2e')](_0xd968e6[_0x5919('0x2c')],_0xd968e6[_0x5919('0x27')]);_0x41336e[_0x5919('0x2f')]=_[_0x5919('0x2e')](_0xd968e6[_0x5919('0x2c')],qs[_0x5919('0x30')](_0x3d8895[_0x5919('0x27')][_0x5919('0x30')]));_0x41336e[_0x5919('0x2f')]=_0x41336e[_0x5919('0x2f')][_0x5919('0x31')]?_0x41336e['attributes']:_0xd968e6[_0x5919('0x2c')];if(_0x3d8895[_0x5919('0x27')]['includeAll']){_0x41336e['include']=[{'all':!![]}];}_0x41336e=_[_0x5919('0x32')]({},_0x41336e,_0x3d8895['options']);return db[_0x5919('0x21')]['find'](_0x41336e)[_0x5919('0x1b')](handleEntityNotFound(_0x5eb8bf,null))[_0x5919('0x1b')](respondWithResult(_0x5eb8bf,null))[_0x5919('0x29')](handleError(_0x5eb8bf,null));};exports[_0x5919('0x33')]=function(_0x4b5505,_0x638258){return db[_0x5919('0x21')][_0x5919('0x33')](_0x4b5505['body'],{})[_0x5919('0x1b')](respondWithResult(_0x638258,0xc9))[_0x5919('0x29')](handleError(_0x638258,null));};exports[_0x5919('0x1a')]=function(_0x307623,_0x379d25){if(_0x307623[_0x5919('0x34')]['id']){delete _0x307623['body']['id'];}return db['WhatsappInteraction'][_0x5919('0x35')]({'where':{'id':_0x307623[_0x5919('0x2b')]['id']}})[_0x5919('0x1b')](handleEntityNotFound(_0x379d25,null))[_0x5919('0x1b')](saveUpdates(_0x307623[_0x5919('0x34')],null))[_0x5919('0x1b')](respondWithResult(_0x379d25,null))[_0x5919('0x29')](handleError(_0x379d25,null));};exports[_0x5919('0x36')]=function(_0xe66582,_0xc8d095){return db[_0x5919('0x21')][_0x5919('0x35')]({'where':{'id':_0xe66582[_0x5919('0x2b')]['id']}})[_0x5919('0x1b')](handleEntityNotFound(_0xc8d095,null))[_0x5919('0x1b')](removeEntity(_0xc8d095,null))[_0x5919('0x29')](handleError(_0xc8d095,null));};exports['describe']=function(_0x50c5c5,_0x11ad17){return db[_0x5919('0x21')]['describe']()[_0x5919('0x1b')](respondWithResult(_0x11ad17,null))[_0x5919('0x29')](handleError(_0x11ad17,null));};exports['addMessage']=function(_0x21aa72,_0x330f1e){return db[_0x5919('0x37')]['find']({'where':{'id':_0x21aa72[_0x5919('0x2b')]['id']}})[_0x5919('0x1b')](handleEntityNotFound(_0x330f1e,null))[_0x5919('0x1b')](function(_0x3a7698){if(_0x3a7698){return _0x3a7698[_0x5919('0x38')](_0x21aa72[_0x5919('0x34')][_0x5919('0x39')],_[_0x5919('0x3a')](_0x21aa72['body'],[_0x5919('0x39'),'id'])||{});}})[_0x5919('0x1b')](respondWithResult(_0x330f1e,null))[_0x5919('0x29')](handleError(_0x330f1e,null));};exports[_0x5919('0x3b')]=function(_0x2ce090,_0x30be3f){var _0x47c4e5={'raw':![],'where':{}};var _0xaaa549={};var _0x257e89={'count':0x0,'rows':[]};return db['WhatsappInteraction'][_0x5919('0x3c')]({'where':{'id':_0x2ce090[_0x5919('0x2b')]['id']}})['then'](handleEntityNotFound(_0x30be3f,null))[_0x5919('0x1b')](function(_0x3e3e4a){if(_0x3e3e4a){_0xaaa549[_0x5919('0x2c')]=_['keys'](db[_0x5919('0x37')][_0x5919('0x3d')]);_0xaaa549['query']=_[_0x5919('0x2d')](_0x2ce090[_0x5919('0x27')]);_0xaaa549[_0x5919('0x3e')]=_['intersection'](_0xaaa549['model'],_0xaaa549[_0x5919('0x27')]);_0x47c4e5[_0x5919('0x2f')]=_['intersection'](_0xaaa549[_0x5919('0x2c')],qs[_0x5919('0x30')](_0x2ce090[_0x5919('0x27')][_0x5919('0x30')]));_0x47c4e5[_0x5919('0x2f')]=_0x47c4e5[_0x5919('0x2f')][_0x5919('0x31')]?_0x47c4e5[_0x5919('0x2f')]:_0xaaa549['model'];if(!_0x2ce090[_0x5919('0x27')][_0x5919('0x3f')](_0x5919('0x40'))){_0x47c4e5[_0x5919('0x17')]=qs[_0x5919('0x17')](_0x2ce090['query']['limit']);_0x47c4e5[_0x5919('0x15')]=qs[_0x5919('0x15')](_0x2ce090[_0x5919('0x27')][_0x5919('0x15')]);}_0x47c4e5['order']=qs[_0x5919('0x41')](_0x2ce090[_0x5919('0x27')][_0x5919('0x41')]);_0x47c4e5[_0x5919('0x42')]=qs[_0x5919('0x3e')](_[_0x5919('0x43')](_0x2ce090[_0x5919('0x27')],_0xaaa549[_0x5919('0x3e')]));_0x47c4e5[_0x5919('0x42')][_0x5919('0x44')]=_0x3e3e4a['id'];if(_0x2ce090[_0x5919('0x27')][_0x5919('0x45')]){_0x47c4e5['where']=_[_0x5919('0x32')](_0x47c4e5['where'],{'$or':_['map'](_0x47c4e5['attributes'],function(_0x51e2be){var _0x464b74={};_0x464b74[_0x51e2be]={'$like':'%'+_0x2ce090['query'][_0x5919('0x45')]+'%'};return _0x464b74;})});}if(_0x2ce090[_0x5919('0x27')]['$gte']){var _0x125abc=_0x2ce090['query']['$gte'][_0x5919('0x46')](',');var _0x1d4944={};_0x1d4944[_0x125abc[0x0]]={'$gte':moment(_0x125abc[0x1])[_0x5919('0x47')]('YYYY-MM-DD\x20HH:mm:ss')};_0x47c4e5[_0x5919('0x42')]=_[_0x5919('0x32')](_0x47c4e5[_0x5919('0x42')],_0x1d4944);}_0x47c4e5=_['merge']({},_0x47c4e5,_0x2ce090[_0x5919('0x48')]);return db['WhatsappMessage'][_0x5919('0x18')]({'where':_0x47c4e5[_0x5919('0x42')]})[_0x5919('0x1b')](function(_0x35d02a){_0x257e89[_0x5919('0x18')]=_0x35d02a;if(_0x2ce090['query']['includeAll']){_0x47c4e5[_0x5919('0x49')]=[{'all':!![]}];}return db['WhatsappMessage']['findAll'](_0x47c4e5);})[_0x5919('0x1b')](function(_0x22b989){_0x257e89['rows']=_0x22b989;return _0x257e89;});}})[_0x5919('0x1b')](respondWithFilteredResult(_0x30be3f,_0x47c4e5))['catch'](handleError(_0x30be3f,null));};exports['addTags']=function(_0x5910fa,_0x159936){return db[_0x5919('0x21')][_0x5919('0x35')]({'where':{'id':_0x5910fa[_0x5919('0x2b')]['id']}})[_0x5919('0x1b')](handleEntityNotFound(_0x159936,null))[_0x5919('0x1b')](function(_0x35b208){if(_0x35b208){return _0x35b208[_0x5919('0x4a')](_0x5910fa[_0x5919('0x34')][_0x5919('0x39')],_[_0x5919('0x3a')](_0x5910fa[_0x5919('0x34')],['ids','id'])||{})['spread'](function(){return db['Tag'][_0x5919('0x4b')]({'attributes':['id',_0x5919('0x1e'),_0x5919('0x4c')],'where':{'id':_0x5910fa[_0x5919('0x34')][_0x5919('0x39')]}});})[_0x5919('0x1b')](function(_0x1a8e8f){socket[_0x5919('0x4d')](_0x5919('0x4e'),{'id':Number(_0x5910fa[_0x5919('0x2b')]['id']),'tags':_0x1a8e8f||[]});return{'id':Number(_0x5910fa[_0x5919('0x2b')]['id']),'tags':_0x1a8e8f||[]};});}})[_0x5919('0x1b')](respondWithResult(_0x159936,null))[_0x5919('0x29')](handleError(_0x159936,null));};exports[_0x5919('0x4f')]=function(_0x1c7a04,_0xee041c){return db['WhatsappInteraction'][_0x5919('0x35')]({'where':{'id':_0x1c7a04[_0x5919('0x2b')]['id']}})['then'](handleEntityNotFound(_0xee041c,null))[_0x5919('0x1b')](function(_0x39289d){if(_0x39289d){return _0x39289d[_0x5919('0x4f')](_0x1c7a04[_0x5919('0x27')][_0x5919('0x39')]);}})[_0x5919('0x1b')](respondWithStatusCode(_0xee041c,null))[_0x5919('0x29')](handleError(_0xee041c,null));};exports[_0x5919('0x50')]=function(_0x2e9388,_0x5dfcfb){var _0x30881e=moment()['unix']()[_0x5919('0x51')]();var _0x49d130=path[_0x5919('0x52')](config[_0x5919('0x53')],_0x5919('0x54'),_0x5919('0x55'),_0x5919('0x56'));var _0xb16c45=path[_0x5919('0x52')](config['root'],_0x5919('0x54'),'files',_0x5919('0x57'));var _0x2e389a=path[_0x5919('0x52')](_0x49d130,_0x30881e);var _0x1f982f=util[_0x5919('0x47')](_0x5919('0x58'),_0x2e9388[_0x5919('0x2b')]['id'],_0x30881e);var _0x4c019e=path[_0x5919('0x52')](_0x49d130,_0x1f982f);var _0x3debd7=[];_0x3debd7[_0x5919('0x59')]({'model':db[_0x5919('0x5a')],'as':_0x5919('0x5a'),'attributes':['id','fullname'],'raw':!![]});_0x3debd7[_0x5919('0x59')]({'model':db['CmContact'],'as':_0x5919('0x5b'),'attributes':['id',_0x5919('0x5c'),'lastName'],'raw':!![]});if(_0x2e9388['query']['attachments']){_0x3debd7[_0x5919('0x59')]({'model':db['Attachment'],'as':_0x5919('0x5d'),'raw':!![]});}var _0x4ab7e7=[{'model':db['WhatsappMessage'],'as':_0x5919('0x5e'),'attributes':['id',_0x5919('0x34'),_0x5919('0x5f'),'direction',_0x5919('0x60'),'read'],'include':_0x3debd7}];_0x4ab7e7[_0x5919('0x59')]({'model':db[_0x5919('0x61')],'as':_0x5919('0x62'),'attributes':['id',_0x5919('0x1e')]});_0x4ab7e7[_0x5919('0x59')]({'model':db[_0x5919('0x5a')],'as':_0x5919('0x63'),'attributes':['id','fullname']});return db['WhatsappInteraction']['find']({'where':{'id':_0x2e9388[_0x5919('0x2b')]['id']},'include':_0x4ab7e7})['then'](handleEntityNotFound(_0x5dfcfb,null))[_0x5919('0x1b')](function(_0x23786e){if(_0x23786e){var _0xea3018=_0x23786e[_0x5919('0x64')]({'plain':!![]});fs[_0x5919('0x65')](_0x2e389a);var _0x324825={'channel':'Whatsapp','account':_0xea3018[_0x5919('0x62')]['name'],'agent':_0xea3018[_0x5919('0x63')]?_0xea3018[_0x5919('0x63')][_0x5919('0x66')]:_0x5919('0x67'),'createdAt':moment(_0xea3018['createdAt'])[_0x5919('0x47')](_0x5919('0x68'))['toString'](),'closedAt':_0xea3018['closed']?moment(_0xea3018[_0x5919('0x69')])[_0x5919('0x47')](_0x5919('0x68'))[_0x5919('0x51')]():'','disposition':_0xea3018[_0x5919('0x6a')],'messages':_(_0xea3018['Messages'])['filter']({'secret':![]})['map'](function(_0x63d4ef){if(_0x63d4ef['Attachment']){var _0x1e1627=path[_0x5919('0x52')](_0xb16c45,_0x63d4ef[_0x5919('0x5d')][_0x5919('0x6b')]);if(fs[_0x5919('0x6c')](_0x1e1627)){fs[_0x5919('0x6d')](_0x1e1627)['pipe'](fs[_0x5919('0x6e')](path[_0x5919('0x52')](_0x2e389a,_0x63d4ef[_0x5919('0x5d')][_0x5919('0x6b')])));}}return{'date':moment(_0x63d4ef['createdAt'])[_0x5919('0x47')](_0x5919('0x68'))[_0x5919('0x51')](),'sender':_0x63d4ef[_0x5919('0x6f')]===_0x5919('0x70')?_0x63d4ef[_0x5919('0x5a')]?_0x63d4ef['User'][_0x5919('0x66')]:_0x5919('0x71'):_0x63d4ef[_0x5919('0x5b')][_0x5919('0x5c')]+(_0x63d4ef[_0x5919('0x5b')][_0x5919('0x72')]?'\x20'+_0x63d4ef[_0x5919('0x5b')][_0x5919('0x72')]:''),'body':_0x63d4ef['Attachment']?_0x63d4ef[_0x5919('0x5d')][_0x5919('0x6b')]:_0x63d4ef[_0x5919('0x34')],'direction':_0x63d4ef[_0x5919('0x6f')]===_0x5919('0x70')?'A':'C','secret':_0x63d4ef[_0x5919('0x60')],'read':_0x63d4ef[_0x5919('0x73')],'attachment':_0x63d4ef['Attachment']};})[_0x5919('0x74')]()};return ejs[_0x5919('0x75')](path[_0x5919('0x52')](config[_0x5919('0x53')],_0x5919('0x54'),_0x5919('0x76'),_0x5919('0x77')),{'interaction':_0x324825})['then'](function(_0x5cc37a){var _0x27a051=path[_0x5919('0x52')](_0x2e389a,_0x5919('0x78')+_0xea3018['id']+'-'+_0x30881e+_0x5919('0x79'));var _0x3f979a={'path':_0x27a051,'channel':'Whatsapp','interactionId':_0xea3018['id']};return pdf[_0x5919('0x7a')](_0x5cc37a,_0x3f979a);})[_0x5919('0x1b')](function(){return new BPromise(function(_0x58f62f,_0x50bdac){zipdir(_0x2e389a,{'saveTo':_0x4c019e},function(_0x48622d,_0x47825a){if(_0x48622d)return _0x50bdac(_0x48622d);return _0x58f62f(_0x47825a);});})[_0x5919('0x1b')](function(){return new BPromise(function(_0x54cbc1,_0x437ef2){rimraf(_0x2e389a,function(_0x5e7ed1){if(_0x5e7ed1)_0x437ef2(_0x5e7ed1);return _0x54cbc1();});});})[_0x5919('0x1b')](function(){return _0x5dfcfb[_0x5919('0x50')](_0x4c019e,_0x1f982f,function(_0x1e86e3){if(_0x1e86e3){console['log']('err',_0x1e86e3);}else{fs[_0x5919('0x7b')](_0x4c019e);}});});});}else{return _0x5dfcfb[_0x5919('0x12')](0xc8);}})[_0x5919('0x29')](handleError(_0x5dfcfb,null));};
\ No newline at end of file
+var _0x143a=['omit','getMessages','findOne','hasOwnProperty','nolimit','order','sort','where','pick','filter','merge','$gte','split','format','YYYY-MM-DD\x20HH:mm:ss','includeAll','rows','addTags','spread','Tag','emit','removeTags','download','toString','join','server','tmp','root','files','transcript-%d-%s.zip','User','fullname','push','CmContact','Contact','lastName','Attachment','Messages','createdAt','direction','secret','read','WhatsappAccount','Account','Owner','Whatsapp','N.A.','closed','closedAt','basename','existsSync','createReadStream','pipe','createWriteStream','out','System','renderFile','views','downloadInteraction.ejs','transcript-','.pdf','createPdfFromHTML','log','err','unlinkSync','sendStatus','rimraf','zip-dir','moment','bluebird','util','ejs','ioredis','../../components/parsers/qs','../../components/export/pdf','../../config/logger','api','../../config/environment','../../mysqldb','redis','defaults','localhost','socket.io-emitter','register','end','status','json','undefined','limit','count','offset','Content-Range','update','then','error','stack','name','send','index','map','WhatsappInteraction','rawAttributes','fieldName','key','getOptions','findAll','catch','params','keys','query','filters','intersection','model','fields','length','attributes','include','options','find','create','body','describe','WhatsappMessage','addMessage','ids'];(function(_0x4ca9fd,_0x5014ab){var _0xe0eab1=function(_0x41822a){while(--_0x41822a){_0x4ca9fd['push'](_0x4ca9fd['shift']());}};_0xe0eab1(++_0x5014ab);}(_0x143a,0x1b9));var _0xa143=function(_0x5e690e,_0x19dc64){_0x5e690e=_0x5e690e-0x0;var _0x45cbcc=_0x143a[_0x5e690e];return _0x45cbcc;};'use strict';var rimraf=require(_0xa143('0x0'));var zipdir=require(_0xa143('0x1'));var moment=require(_0xa143('0x2'));var BPromise=require(_0xa143('0x3'));var util=require(_0xa143('0x4'));var path=require('path');var ejs=require(_0xa143('0x5'));var fs=require('fs');var _=require('lodash');var Redis=require(_0xa143('0x6'));var interaction=require('../../components/interaction/service');var qs=require(_0xa143('0x7'));var pdf=require(_0xa143('0x8'));var logger=require(_0xa143('0x9'))(_0xa143('0xa'));var config=require(_0xa143('0xb'));var db=require(_0xa143('0xc'))['db'];config[_0xa143('0xd')]=_[_0xa143('0xe')](config[_0xa143('0xd')],{'host':_0xa143('0xf'),'port':0x18eb});var socket=require(_0xa143('0x10'))(new Redis(config[_0xa143('0xd')]));require('./whatsappInteraction.socket')[_0xa143('0x11')](socket);function respondWithStatusCode(_0x3c4ac2,_0x1f8d43){_0x1f8d43=_0x1f8d43||0xcc;return function(_0x2c1e38){if(_0x2c1e38){return _0x3c4ac2['sendStatus'](_0x1f8d43);}return _0x3c4ac2['status'](_0x1f8d43)[_0xa143('0x12')]();};}function respondWithResult(_0x3b4e23,_0x2716c6){_0x2716c6=_0x2716c6||0xc8;return function(_0x110aaf){if(_0x110aaf){return _0x3b4e23[_0xa143('0x13')](_0x2716c6)[_0xa143('0x14')](_0x110aaf);}};}function respondWithFilteredResult(_0x226303,_0x9436a8){return function(_0x2ba927){if(_0x2ba927){var _0x2ef821=typeof _0x9436a8['offset']===_0xa143('0x15')&&typeof _0x9436a8[_0xa143('0x16')]===_0xa143('0x15');var _0x26a649=_0x2ba927[_0xa143('0x17')];var _0x47d554=_0x2ef821?0x0:_0x9436a8[_0xa143('0x18')];var _0x3f2771=_0x2ef821?_0x2ba927[_0xa143('0x17')]:_0x9436a8['offset']+_0x9436a8['limit'];var _0x2c44f2;if(_0x3f2771>=_0x26a649){_0x3f2771=_0x26a649;_0x2c44f2=0xc8;}else{_0x2c44f2=0xce;}_0x226303[_0xa143('0x13')](_0x2c44f2);return _0x226303['set'](_0xa143('0x19'),_0x47d554+'-'+_0x3f2771+'/'+_0x26a649)[_0xa143('0x14')](_0x2ba927);}return null;};}function saveUpdates(_0x58343c){return function(_0x5253e6){if(_0x5253e6){return _0x5253e6[_0xa143('0x1a')](_0x58343c)[_0xa143('0x1b')](function(_0xae3471){return _0xae3471;});}return null;};}function removeEntity(_0x4882c9){return function(_0x3d6453){if(_0x3d6453){return _0x3d6453['destroy']()[_0xa143('0x1b')](function(){_0x4882c9[_0xa143('0x13')](0xcc)[_0xa143('0x12')]();});}};}function handleEntityNotFound(_0xedb252){return function(_0x477e4d){if(!_0x477e4d){_0xedb252['sendStatus'](0x194);}return _0x477e4d;};}function handleError(_0x3170b2,_0x3a1998){_0x3a1998=_0x3a1998||0x1f4;return function(_0x51eb32){logger[_0xa143('0x1c')](_0x51eb32[_0xa143('0x1d')]);if(_0x51eb32['name']){delete _0x51eb32[_0xa143('0x1e')];}_0x3170b2[_0xa143('0x13')](_0x3a1998)[_0xa143('0x1f')](_0x51eb32);};}exports[_0xa143('0x20')]=function(_0x474000,_0x2509e7){var _0x26b7f1={};var _0x10def0=_[_0xa143('0x21')](db[_0xa143('0x22')][_0xa143('0x23')],function(_0x5f4bca){return{'name':_0x5f4bca[_0xa143('0x24')],'type':_0x5f4bca['type'][_0xa143('0x25')]};});_0x26b7f1=qs[_0xa143('0x26')](_0x10def0,_0x474000);return interaction[_0xa143('0x27')]('whatsapp',_0x474000['query'],_0x474000['user'],_0x26b7f1,_0x10def0)['then'](respondWithFilteredResult(_0x2509e7,_0x26b7f1))[_0xa143('0x28')](handleError(_0x2509e7,null));};exports['show']=function(_0x3a7bbe,_0x324402){var _0xb6144c={'raw':![],'where':{'id':_0x3a7bbe[_0xa143('0x29')]['id']}},_0x4494b1={};_0x4494b1['model']=_[_0xa143('0x2a')](db[_0xa143('0x22')]['rawAttributes']);_0x4494b1['query']=_['keys'](_0x3a7bbe[_0xa143('0x2b')]);_0x4494b1[_0xa143('0x2c')]=_[_0xa143('0x2d')](_0x4494b1[_0xa143('0x2e')],_0x4494b1[_0xa143('0x2b')]);_0xb6144c['attributes']=_[_0xa143('0x2d')](_0x4494b1[_0xa143('0x2e')],qs[_0xa143('0x2f')](_0x3a7bbe[_0xa143('0x2b')][_0xa143('0x2f')]));_0xb6144c['attributes']=_0xb6144c['attributes'][_0xa143('0x30')]?_0xb6144c[_0xa143('0x31')]:_0x4494b1[_0xa143('0x2e')];if(_0x3a7bbe[_0xa143('0x2b')]['includeAll']){_0xb6144c[_0xa143('0x32')]=[{'all':!![]}];}_0xb6144c=_['merge']({},_0xb6144c,_0x3a7bbe[_0xa143('0x33')]);return db[_0xa143('0x22')][_0xa143('0x34')](_0xb6144c)[_0xa143('0x1b')](handleEntityNotFound(_0x324402,null))[_0xa143('0x1b')](respondWithResult(_0x324402,null))[_0xa143('0x28')](handleError(_0x324402,null));};exports['create']=function(_0x4d3b0d,_0x4ba617){return db['WhatsappInteraction'][_0xa143('0x35')](_0x4d3b0d[_0xa143('0x36')],{})[_0xa143('0x1b')](respondWithResult(_0x4ba617,0xc9))[_0xa143('0x28')](handleError(_0x4ba617,null));};exports[_0xa143('0x1a')]=function(_0x4388ba,_0x13b18e){if(_0x4388ba[_0xa143('0x36')]['id']){delete _0x4388ba[_0xa143('0x36')]['id'];}return db['WhatsappInteraction'][_0xa143('0x34')]({'where':{'id':_0x4388ba['params']['id']}})[_0xa143('0x1b')](handleEntityNotFound(_0x13b18e,null))[_0xa143('0x1b')](saveUpdates(_0x4388ba[_0xa143('0x36')],null))[_0xa143('0x1b')](respondWithResult(_0x13b18e,null))[_0xa143('0x28')](handleError(_0x13b18e,null));};exports['destroy']=function(_0x47028f,_0x344f22){return db[_0xa143('0x22')][_0xa143('0x34')]({'where':{'id':_0x47028f[_0xa143('0x29')]['id']}})[_0xa143('0x1b')](handleEntityNotFound(_0x344f22,null))['then'](removeEntity(_0x344f22,null))[_0xa143('0x28')](handleError(_0x344f22,null));};exports['describe']=function(_0x286655,_0x310b02){return db[_0xa143('0x22')][_0xa143('0x37')]()['then'](respondWithResult(_0x310b02,null))[_0xa143('0x28')](handleError(_0x310b02,null));};exports['addMessage']=function(_0x8a24c5,_0x37178b){return db[_0xa143('0x38')][_0xa143('0x34')]({'where':{'id':_0x8a24c5['params']['id']}})[_0xa143('0x1b')](handleEntityNotFound(_0x37178b,null))['then'](function(_0x5218e5){if(_0x5218e5){return _0x5218e5[_0xa143('0x39')](_0x8a24c5[_0xa143('0x36')][_0xa143('0x3a')],_[_0xa143('0x3b')](_0x8a24c5[_0xa143('0x36')],['ids','id'])||{});}})[_0xa143('0x1b')](respondWithResult(_0x37178b,null))[_0xa143('0x28')](handleError(_0x37178b,null));};exports[_0xa143('0x3c')]=function(_0x4bd5ed,_0x23d51b){var _0x4e5901={'raw':![],'where':{}};var _0x1f0bd9={};var _0x23e732={'count':0x0,'rows':[]};return db[_0xa143('0x22')][_0xa143('0x3d')]({'where':{'id':_0x4bd5ed[_0xa143('0x29')]['id']}})[_0xa143('0x1b')](handleEntityNotFound(_0x23d51b,null))['then'](function(_0x225aac){if(_0x225aac){_0x1f0bd9[_0xa143('0x2e')]=_[_0xa143('0x2a')](db['WhatsappMessage'][_0xa143('0x23')]);_0x1f0bd9['query']=_[_0xa143('0x2a')](_0x4bd5ed[_0xa143('0x2b')]);_0x1f0bd9[_0xa143('0x2c')]=_[_0xa143('0x2d')](_0x1f0bd9[_0xa143('0x2e')],_0x1f0bd9['query']);_0x4e5901[_0xa143('0x31')]=_['intersection'](_0x1f0bd9[_0xa143('0x2e')],qs['fields'](_0x4bd5ed[_0xa143('0x2b')][_0xa143('0x2f')]));_0x4e5901[_0xa143('0x31')]=_0x4e5901[_0xa143('0x31')][_0xa143('0x30')]?_0x4e5901['attributes']:_0x1f0bd9[_0xa143('0x2e')];if(!_0x4bd5ed[_0xa143('0x2b')][_0xa143('0x3e')](_0xa143('0x3f'))){_0x4e5901[_0xa143('0x16')]=qs[_0xa143('0x16')](_0x4bd5ed['query'][_0xa143('0x16')]);_0x4e5901['offset']=qs[_0xa143('0x18')](_0x4bd5ed[_0xa143('0x2b')][_0xa143('0x18')]);}_0x4e5901[_0xa143('0x40')]=qs['sort'](_0x4bd5ed[_0xa143('0x2b')][_0xa143('0x41')]);_0x4e5901[_0xa143('0x42')]=qs[_0xa143('0x2c')](_[_0xa143('0x43')](_0x4bd5ed['query'],_0x1f0bd9['filters']));_0x4e5901[_0xa143('0x42')]['WhatsappInteractionId']=_0x225aac['id'];if(_0x4bd5ed[_0xa143('0x2b')][_0xa143('0x44')]){_0x4e5901['where']=_[_0xa143('0x45')](_0x4e5901['where'],{'$or':_[_0xa143('0x21')](_0x4e5901[_0xa143('0x31')],function(_0x36b84e){var _0x39db9a={};_0x39db9a[_0x36b84e]={'$like':'%'+_0x4bd5ed[_0xa143('0x2b')][_0xa143('0x44')]+'%'};return _0x39db9a;})});}if(_0x4bd5ed['query'][_0xa143('0x46')]){var _0x472305=_0x4bd5ed['query'][_0xa143('0x46')][_0xa143('0x47')](',');var _0x14927b={};_0x14927b[_0x472305[0x0]]={'$gte':moment(_0x472305[0x1])[_0xa143('0x48')](_0xa143('0x49'))};_0x4e5901[_0xa143('0x42')]=_[_0xa143('0x45')](_0x4e5901[_0xa143('0x42')],_0x14927b);}_0x4e5901=_['merge']({},_0x4e5901,_0x4bd5ed[_0xa143('0x33')]);return db[_0xa143('0x38')][_0xa143('0x17')]({'where':_0x4e5901[_0xa143('0x42')]})['then'](function(_0x43f5ca){_0x23e732[_0xa143('0x17')]=_0x43f5ca;if(_0x4bd5ed[_0xa143('0x2b')][_0xa143('0x4a')]){_0x4e5901[_0xa143('0x32')]=[{'all':!![]}];}return db[_0xa143('0x38')]['findAll'](_0x4e5901);})[_0xa143('0x1b')](function(_0x4fa214){_0x23e732[_0xa143('0x4b')]=_0x4fa214;return _0x23e732;});}})[_0xa143('0x1b')](respondWithFilteredResult(_0x23d51b,_0x4e5901))[_0xa143('0x28')](handleError(_0x23d51b,null));};exports[_0xa143('0x4c')]=function(_0x59b2ea,_0x41eb1b){return db[_0xa143('0x22')][_0xa143('0x34')]({'where':{'id':_0x59b2ea[_0xa143('0x29')]['id']}})['then'](handleEntityNotFound(_0x41eb1b,null))[_0xa143('0x1b')](function(_0xa2610d){if(_0xa2610d){return _0xa2610d['setTags'](_0x59b2ea[_0xa143('0x36')][_0xa143('0x3a')],_[_0xa143('0x3b')](_0x59b2ea[_0xa143('0x36')],[_0xa143('0x3a'),'id'])||{})[_0xa143('0x4d')](function(){return db[_0xa143('0x4e')][_0xa143('0x27')]({'attributes':['id',_0xa143('0x1e'),'color'],'where':{'id':_0x59b2ea[_0xa143('0x36')][_0xa143('0x3a')]}});})[_0xa143('0x1b')](function(_0xe16782){socket[_0xa143('0x4f')]('whatsappInteractionTags:save',{'id':Number(_0x59b2ea[_0xa143('0x29')]['id']),'tags':_0xe16782||[]});return{'id':Number(_0x59b2ea[_0xa143('0x29')]['id']),'tags':_0xe16782||[]};});}})[_0xa143('0x1b')](respondWithResult(_0x41eb1b,null))[_0xa143('0x28')](handleError(_0x41eb1b,null));};exports[_0xa143('0x50')]=function(_0x34b61c,_0x17771b){return db[_0xa143('0x22')][_0xa143('0x34')]({'where':{'id':_0x34b61c[_0xa143('0x29')]['id']}})['then'](handleEntityNotFound(_0x17771b,null))[_0xa143('0x1b')](function(_0x13a6a5){if(_0x13a6a5){return _0x13a6a5['removeTags'](_0x34b61c[_0xa143('0x2b')][_0xa143('0x3a')]);}})[_0xa143('0x1b')](respondWithStatusCode(_0x17771b,null))[_0xa143('0x28')](handleError(_0x17771b,null));};exports[_0xa143('0x51')]=function(_0x5d3b00,_0x354191){var _0x1b8119=moment()['unix']()[_0xa143('0x52')]();var _0x348e67=path[_0xa143('0x53')](config['root'],_0xa143('0x54'),'files',_0xa143('0x55'));var _0x12dd6c=path[_0xa143('0x53')](config[_0xa143('0x56')],_0xa143('0x54'),_0xa143('0x57'),'attachments');var _0x199b23=path[_0xa143('0x53')](_0x348e67,_0x1b8119);var _0x5d48f0=util[_0xa143('0x48')](_0xa143('0x58'),_0x5d3b00[_0xa143('0x29')]['id'],_0x1b8119);var _0x117028=path[_0xa143('0x53')](_0x348e67,_0x5d48f0);var _0x3b9182=[];_0x3b9182['push']({'model':db[_0xa143('0x59')],'as':_0xa143('0x59'),'attributes':['id',_0xa143('0x5a')],'raw':!![]});_0x3b9182[_0xa143('0x5b')]({'model':db[_0xa143('0x5c')],'as':_0xa143('0x5d'),'attributes':['id','firstName',_0xa143('0x5e')],'raw':!![]});if(_0x5d3b00[_0xa143('0x2b')]['attachments']){_0x3b9182[_0xa143('0x5b')]({'model':db[_0xa143('0x5f')],'as':'Attachment','raw':!![]});}var _0x2d4e91=[{'model':db[_0xa143('0x38')],'as':_0xa143('0x60'),'attributes':['id',_0xa143('0x36'),_0xa143('0x61'),_0xa143('0x62'),_0xa143('0x63'),_0xa143('0x64')],'include':_0x3b9182}];_0x2d4e91[_0xa143('0x5b')]({'model':db[_0xa143('0x65')],'as':_0xa143('0x66'),'attributes':['id','name']});_0x2d4e91['push']({'model':db[_0xa143('0x59')],'as':_0xa143('0x67'),'attributes':['id',_0xa143('0x5a')]});return db[_0xa143('0x22')][_0xa143('0x34')]({'where':{'id':_0x5d3b00[_0xa143('0x29')]['id']},'include':_0x2d4e91})[_0xa143('0x1b')](handleEntityNotFound(_0x354191,null))[_0xa143('0x1b')](function(_0x3eb9cf){if(_0x3eb9cf){var _0x574563=_0x3eb9cf['get']({'plain':!![]});fs['mkdirSync'](_0x199b23);var _0x3b0fa4={'channel':_0xa143('0x68'),'account':_0x574563[_0xa143('0x66')][_0xa143('0x1e')],'agent':_0x574563[_0xa143('0x67')]?_0x574563[_0xa143('0x67')][_0xa143('0x5a')]:_0xa143('0x69'),'createdAt':moment(_0x574563['createdAt'])['format'](_0xa143('0x49'))[_0xa143('0x52')](),'closedAt':_0x574563[_0xa143('0x6a')]?moment(_0x574563[_0xa143('0x6b')])[_0xa143('0x48')](_0xa143('0x49'))[_0xa143('0x52')]():'','disposition':_0x574563['disposition'],'messages':_(_0x574563[_0xa143('0x60')])['filter']({'secret':![]})[_0xa143('0x21')](function(_0x5d08fd){if(_0x5d08fd[_0xa143('0x5f')]){var _0x505abb=path[_0xa143('0x53')](_0x12dd6c,_0x5d08fd[_0xa143('0x5f')][_0xa143('0x6c')]);if(fs[_0xa143('0x6d')](_0x505abb)){fs[_0xa143('0x6e')](_0x505abb)[_0xa143('0x6f')](fs[_0xa143('0x70')](path[_0xa143('0x53')](_0x199b23,_0x5d08fd[_0xa143('0x5f')]['basename'])));}}return{'date':moment(_0x5d08fd['createdAt'])[_0xa143('0x48')](_0xa143('0x49'))['toString'](),'sender':_0x5d08fd[_0xa143('0x62')]===_0xa143('0x71')?_0x5d08fd[_0xa143('0x59')]?_0x5d08fd[_0xa143('0x59')][_0xa143('0x5a')]:_0xa143('0x72'):_0x5d08fd['Contact']['firstName']+(_0x5d08fd[_0xa143('0x5d')][_0xa143('0x5e')]?'\x20'+_0x5d08fd[_0xa143('0x5d')][_0xa143('0x5e')]:''),'body':_0x5d08fd['Attachment']?_0x5d08fd[_0xa143('0x5f')][_0xa143('0x6c')]:_0x5d08fd['body'],'direction':_0x5d08fd[_0xa143('0x62')]===_0xa143('0x71')?'A':'C','secret':_0x5d08fd[_0xa143('0x63')],'read':_0x5d08fd['read'],'attachment':_0x5d08fd[_0xa143('0x5f')]};})['value']()};return ejs[_0xa143('0x73')](path[_0xa143('0x53')](config[_0xa143('0x56')],_0xa143('0x54'),_0xa143('0x74'),_0xa143('0x75')),{'interaction':_0x3b0fa4})['then'](function(_0x1b8c4a){var _0x5e8fb8=path[_0xa143('0x53')](_0x199b23,_0xa143('0x76')+_0x574563['id']+'-'+_0x1b8119+_0xa143('0x77'));var _0x251b43={'path':_0x5e8fb8,'channel':_0xa143('0x68'),'interactionId':_0x574563['id']};return pdf[_0xa143('0x78')](_0x1b8c4a,_0x251b43);})[_0xa143('0x1b')](function(){return new BPromise(function(_0x83f471,_0xd82480){zipdir(_0x199b23,{'saveTo':_0x117028},function(_0x54a42f,_0x4ea697){if(_0x54a42f)return _0xd82480(_0x54a42f);return _0x83f471(_0x4ea697);});})[_0xa143('0x1b')](function(){return new BPromise(function(_0x4d7661,_0x375a6a){rimraf(_0x199b23,function(_0x3ad597){if(_0x3ad597)_0x375a6a(_0x3ad597);return _0x4d7661();});});})[_0xa143('0x1b')](function(){return _0x354191[_0xa143('0x51')](_0x117028,_0x5d48f0,function(_0xd1445){if(_0xd1445){console[_0xa143('0x79')](_0xa143('0x7a'),_0xd1445);}else{fs[_0xa143('0x7b')](_0x117028);}});});});}else{return _0x354191[_0xa143('0x7c')](0xc8);}})[_0xa143('0x28')](handleError(_0x354191,null));};
\ No newline at end of file
index 19d0087..f0ab42d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0d74=['hasOwnProperty','hook','exports','events','../../mysqldb','WhatsappMessage','setMaxListeners','remove','Users','map','findAll','then','setDataValue','unreadMessages','length','emit','catch'];(function(_0x54ebae,_0x3710c1){var _0x100cc3=function(_0x4d0f8a){while(--_0x4d0f8a){_0x54ebae['push'](_0x54ebae['shift']());}};_0x100cc3(++_0x3710c1);}(_0x0d74,0x146));var _0x40d7=function(_0x46fca1,_0xde43fc){_0x46fca1=_0x46fca1-0x0;var _0x5a2b5c=_0x0d74[_0x46fca1];return _0x5a2b5c;};'use strict';var EventEmitter=require(_0x40d7('0x0'));var WhatsappInteraction=require(_0x40d7('0x1'))['db']['WhatsappInteraction'];var WhatsappMessage=require('../../mysqldb')['db'][_0x40d7('0x2')];var WhatsappInteractionEvents=new EventEmitter();WhatsappInteractionEvents[_0x40d7('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0x40d7('0x4')};function emitEvent(_0xe5b915){return function(_0x3d8d4d,_0x41b9cb,_0x5edb57){_0x3d8d4d['getUsers']({'attributes':['id'],'raw':!![]})['then'](function(_0x416c83){_0x3d8d4d['setDataValue'](_0x40d7('0x5'),_0x416c83[_0x40d7('0x6')](function(_0x509b66){return{'id':_0x509b66['id']};}));return WhatsappMessage[_0x40d7('0x7')]({'where':{'WhatsappInteractionId':_0x3d8d4d['id'],'direction':'in','read':![]},'raw':!![]});})[_0x40d7('0x8')](function(_0x354f80){_0x3d8d4d[_0x40d7('0x9')](_0x40d7('0xa'),_0x354f80[_0x40d7('0xb')]);WhatsappInteractionEvents['emit'](_0xe5b915+':'+_0x3d8d4d['id'],_0x3d8d4d);WhatsappInteractionEvents[_0x40d7('0xc')](_0xe5b915,_0x3d8d4d);_0x5edb57(null);})[_0x40d7('0xd')](_0x5edb57(null));};}for(var e in events){if(events[_0x40d7('0xe')](e)){var event=events[e];WhatsappInteraction[_0x40d7('0xf')](e,emitEvent(event));}}module[_0x40d7('0x10')]=WhatsappInteractionEvents;
\ No newline at end of file
+var _0x2cbd=['WhatsappMessage','setMaxListeners','update','remove','getUsers','then','setDataValue','map','findAll','unreadMessages','emit','catch','hasOwnProperty','hook','events','../../mysqldb'];(function(_0x772b80,_0x39b2be){var _0x30b292=function(_0x599382){while(--_0x599382){_0x772b80['push'](_0x772b80['shift']());}};_0x30b292(++_0x39b2be);}(_0x2cbd,0x19e));var _0xd2cb=function(_0x3f5dca,_0x59472b){_0x3f5dca=_0x3f5dca-0x0;var _0x5b833a=_0x2cbd[_0x3f5dca];return _0x5b833a;};'use strict';var EventEmitter=require(_0xd2cb('0x0'));var WhatsappInteraction=require(_0xd2cb('0x1'))['db']['WhatsappInteraction'];var WhatsappMessage=require(_0xd2cb('0x1'))['db'][_0xd2cb('0x2')];var WhatsappInteractionEvents=new EventEmitter();WhatsappInteractionEvents[_0xd2cb('0x3')](0x0);var events={'afterCreate':'save','afterUpdate':_0xd2cb('0x4'),'afterDestroy':_0xd2cb('0x5')};function emitEvent(_0x480683){return function(_0x4e4b04,_0x409c0f,_0x20ff39){_0x4e4b04[_0xd2cb('0x6')]({'attributes':['id'],'raw':!![]})[_0xd2cb('0x7')](function(_0x4c3593){_0x4e4b04[_0xd2cb('0x8')]('Users',_0x4c3593[_0xd2cb('0x9')](function(_0x5e3bec){return{'id':_0x5e3bec['id']};}));return WhatsappMessage[_0xd2cb('0xa')]({'where':{'WhatsappInteractionId':_0x4e4b04['id'],'direction':'in','read':![]},'raw':!![]});})[_0xd2cb('0x7')](function(_0x4b6cf4){_0x4e4b04[_0xd2cb('0x8')](_0xd2cb('0xb'),_0x4b6cf4['length']);WhatsappInteractionEvents[_0xd2cb('0xc')](_0x480683+':'+_0x4e4b04['id'],_0x4e4b04);WhatsappInteractionEvents[_0xd2cb('0xc')](_0x480683,_0x4e4b04);_0x20ff39(null);})[_0xd2cb('0xd')](_0x20ff39(null));};}for(var e in events){if(events[_0xd2cb('0xe')](e)){var event=events[e];WhatsappInteraction[_0xd2cb('0xf')](e,emitEvent(event));}}module['exports']=WhatsappInteractionEvents;
\ No newline at end of file
index bdbbeff..f938faa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xde82=['util','../../config/logger','api','moment','request-promise','path','../../config/environment','./whatsappInteraction.attributes','exports','whatsapp_interactions','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','lodash'];(function(_0x2b91c5,_0x3b6db5){var _0xbd5531=function(_0x54783d){while(--_0x54783d){_0x2b91c5['push'](_0x2b91c5['shift']());}};_0xbd5531(++_0x3b6db5);}(_0xde82,0x176));var _0x2de8=function(_0x3c23ba,_0x14b27e){_0x3c23ba=_0x3c23ba-0x0;var _0x498f6a=_0xde82[_0x3c23ba];return _0x498f6a;};'use strict';var _=require(_0x2de8('0x0'));var util=require(_0x2de8('0x1'));var logger=require(_0x2de8('0x2'))(_0x2de8('0x3'));var moment=require(_0x2de8('0x4'));var BPromise=require('bluebird');var rp=require(_0x2de8('0x5'));var fs=require('fs');var path=require(_0x2de8('0x6'));var rimraf=require('rimraf');var config=require(_0x2de8('0x7'));var attributes=require(_0x2de8('0x8'));module[_0x2de8('0x9')]=function(_0x12f1c8,_0x3f5e28){return _0x12f1c8['define']('WhatsappInteraction',attributes,{'tableName':_0x2de8('0xa'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x3c8d6c,_0x4adbb4,_0x381c54){if(_0x3c8d6c['changed'](_0x2de8('0xb'))){_0x3c8d6c[_0x2de8('0xc')]=moment()[_0x2de8('0xd')](_0x2de8('0xe'));}_0x381c54(null,_0x3c8d6c);}}});};
\ No newline at end of file
+var _0xea08=['define','WhatsappInteraction','whatsapp_interactions','changed','closed','closedAt','format','YYYY-MM-DD\x20HH:mm:ss','util','../../config/logger','api','moment','bluebird','request-promise','../../config/environment','./whatsappInteraction.attributes','exports'];(function(_0x58e469,_0x95ee3e){var _0x4c01c5=function(_0x1ef7ae){while(--_0x1ef7ae){_0x58e469['push'](_0x58e469['shift']());}};_0x4c01c5(++_0x95ee3e);}(_0xea08,0x7f));var _0x8ea0=function(_0x40a045,_0x516f0e){_0x40a045=_0x40a045-0x0;var _0x1a687c=_0xea08[_0x40a045];return _0x1a687c;};'use strict';var _=require('lodash');var util=require(_0x8ea0('0x0'));var logger=require(_0x8ea0('0x1'))(_0x8ea0('0x2'));var moment=require(_0x8ea0('0x3'));var BPromise=require(_0x8ea0('0x4'));var rp=require(_0x8ea0('0x5'));var fs=require('fs');var path=require('path');var rimraf=require('rimraf');var config=require(_0x8ea0('0x6'));var attributes=require(_0x8ea0('0x7'));module[_0x8ea0('0x8')]=function(_0x2f9b42,_0x3ef40d){return _0x2f9b42[_0x8ea0('0x9')](_0x8ea0('0xa'),attributes,{'tableName':_0x8ea0('0xb'),'paranoid':![],'indexes':[],'timestamps':!![],'hooks':{'beforeUpdate':function(_0x67c362,_0x59cc40,_0x2a90f6){if(_0x67c362[_0x8ea0('0xc')](_0x8ea0('0xd'))){_0x67c362[_0x8ea0('0xe')]=moment()[_0x8ea0('0xf')](_0x8ea0('0x10'));}_0x2a90f6(null,_0x67c362);}}});};
\ No newline at end of file
index 5a8c90a..4dd49d3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x888a=['error','WhatsappInteraction,\x20%s,\x20%s','message','result','UpdateWhatsappInteraction','WhatsappInteraction','update','options','raw','where','attributes','stringify','catch','AddTagsToWhatsappInteraction','find','addTags','omit','spread','AddTags','lodash','util','moment','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','defaults','socket.io-emitter','redis','./whatsappInteraction.socket','register','request','then','info','request\x20sent','debug','WhatsappInteraction,\x20%s,\x20%s,\x20%s'];(function(_0x49581f,_0x351d77){var _0x526005=function(_0x422686){while(--_0x422686){_0x49581f['push'](_0x49581f['shift']());}};_0x526005(++_0x351d77);}(_0x888a,0x184));var _0xa888=function(_0x1dbecd,_0x20af26){_0x1dbecd=_0x1dbecd-0x0;var _0xae5134=_0x888a[_0x1dbecd];return _0xae5134;};'use strict';var _=require(_0xa888('0x0'));var util=require(_0xa888('0x1'));var moment=require(_0xa888('0x2'));var BPromise=require('bluebird');var rs=require('randomstring');var fs=require('fs');var Redis=require('ioredis');var db=require(_0xa888('0x3'))['db'];var utils=require(_0xa888('0x4'));var logger=require(_0xa888('0x5'))(_0xa888('0x6'));var config=require(_0xa888('0x7'));var jayson=require(_0xa888('0x8'));var client=jayson[_0xa888('0x9')][_0xa888('0xa')]({'port':0x232a});config['redis']=_[_0xa888('0xb')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xa888('0xc'))(new Redis(config[_0xa888('0xd')]));require(_0xa888('0xe'))[_0xa888('0xf')](socket);function respondWithRpcPromise(_0x470906,_0x62683,_0x1d2d44){return new BPromise(function(_0x46fce6,_0xd7eabe){return client[_0xa888('0x10')](_0x470906,_0x1d2d44)[_0xa888('0x11')](function(_0x4890b8){logger[_0xa888('0x12')]('WhatsappInteraction,\x20%s,\x20%s',_0x62683,_0xa888('0x13'));logger[_0xa888('0x14')](_0xa888('0x15'),_0x62683,_0xa888('0x13'),JSON['stringify'](_0x4890b8));if(_0x4890b8['error']){if(_0x4890b8['error']['code']===0x1f4){logger[_0xa888('0x16')](_0xa888('0x17'),_0x62683,_0x4890b8['error'][_0xa888('0x18')]);return _0xd7eabe(_0x4890b8['error'][_0xa888('0x18')]);}logger[_0xa888('0x16')]('WhatsappInteraction,\x20%s,\x20%s',_0x62683,_0x4890b8[_0xa888('0x16')][_0xa888('0x18')]);return _0x46fce6(_0x4890b8[_0xa888('0x16')][_0xa888('0x18')]);}else{logger['info'](_0xa888('0x17'),_0x62683,_0xa888('0x13'));_0x46fce6(_0x4890b8[_0xa888('0x19')][_0xa888('0x18')]);}})['catch'](function(_0x59138a){logger['error'](_0xa888('0x17'),_0x62683,_0x59138a);_0xd7eabe(_0x59138a);});});}exports[_0xa888('0x1a')]=function(_0x37dfbd){var _0x57f3f6=this;return new Promise(function(_0x16506b,_0x306eb5){return db[_0xa888('0x1b')][_0xa888('0x1c')](_0x37dfbd['body'],{'raw':_0x37dfbd[_0xa888('0x1d')]?_0x37dfbd['options'][_0xa888('0x1e')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x37dfbd[_0xa888('0x1d')]?_0x37dfbd[_0xa888('0x1d')][_0xa888('0x1f')]||null:null,'attributes':_0x37dfbd[_0xa888('0x1d')]?_0x37dfbd[_0xa888('0x1d')][_0xa888('0x20')]||null:null,'limit':_0x37dfbd[_0xa888('0x1d')]?_0x37dfbd[_0xa888('0x1d')]['limit']||null:null})['then'](function(_0x4ca5b0){logger[_0xa888('0x12')]('UpdateWhatsappInteraction',_0x37dfbd);logger[_0xa888('0x14')]('UpdateWhatsappInteraction',_0x37dfbd,JSON[_0xa888('0x21')](_0x4ca5b0));_0x16506b(_0x4ca5b0);})[_0xa888('0x22')](function(_0x47112b){logger[_0xa888('0x16')]('UpdateWhatsappInteraction',_0x47112b[_0xa888('0x18')],_0x37dfbd);_0x306eb5(_0x57f3f6['error'](0x1f4,_0x47112b[_0xa888('0x18')]));});});};exports[_0xa888('0x23')]=function(_0x319c4e){return new Promise(function(_0x5dfed5,_0x3a416b){return db['WhatsappInteraction'][_0xa888('0x24')]({'where':_0x319c4e['options']?_0x319c4e['options']['where']||null:null})[_0xa888('0x11')](function(_0x157930){if(_0x157930){return _0x157930[_0xa888('0x25')](_0x319c4e['body']['ids'],_[_0xa888('0x26')](_0x319c4e['body'],['ids','id'])||{});}})[_0xa888('0x27')](function(_0x4308cb){logger['info'](_0xa888('0x28'),_0x319c4e);logger[_0xa888('0x14')](_0xa888('0x28'),_0x319c4e,JSON[_0xa888('0x21')](_0x4308cb));_0x5dfed5(_0x4308cb);})[_0xa888('0x22')](function(_0x363961){logger[_0xa888('0x16')](_0xa888('0x28'),_0x363961[_0xa888('0x18')],_0x319c4e);_0x3a416b(_this[_0xa888('0x16')](0x1f4,_0x363961[_0xa888('0x18')]));});});};
\ No newline at end of file
+var _0x0bd8=['then','info','request\x20sent','debug','WhatsappInteraction,\x20%s,\x20%s,\x20%s','stringify','error','message','WhatsappInteraction,\x20%s,\x20%s','result','update','body','options','raw','where','UpdateWhatsappInteraction','catch','WhatsappInteraction','find','ids','omit','AddTags','lodash','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','redis','./whatsappInteraction.socket','request'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x0bd8,0x17e));var _0x80bd=function(_0x290492,_0x18cfad){_0x290492=_0x290492-0x0;var _0x52b5bf=_0x0bd8[_0x290492];return _0x52b5bf;};'use strict';var _=require(_0x80bd('0x0'));var util=require('util');var moment=require(_0x80bd('0x1'));var BPromise=require(_0x80bd('0x2'));var rs=require(_0x80bd('0x3'));var fs=require('fs');var Redis=require(_0x80bd('0x4'));var db=require(_0x80bd('0x5'))['db'];var utils=require(_0x80bd('0x6'));var logger=require(_0x80bd('0x7'))(_0x80bd('0x8'));var config=require(_0x80bd('0x9'));var jayson=require('jayson/promise');var client=jayson[_0x80bd('0xa')]['http']({'port':0x232a});config[_0x80bd('0xb')]=_['defaults'](config[_0x80bd('0xb')],{'host':'localhost','port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x80bd('0xb')]));require(_0x80bd('0xc'))['register'](socket);function respondWithRpcPromise(_0x579130,_0xa3c0da,_0x1fa5f4){return new BPromise(function(_0x4babff,_0x109dd9){return client[_0x80bd('0xd')](_0x579130,_0x1fa5f4)[_0x80bd('0xe')](function(_0x38fc0e){logger[_0x80bd('0xf')]('WhatsappInteraction,\x20%s,\x20%s',_0xa3c0da,_0x80bd('0x10'));logger[_0x80bd('0x11')](_0x80bd('0x12'),_0xa3c0da,_0x80bd('0x10'),JSON[_0x80bd('0x13')](_0x38fc0e));if(_0x38fc0e['error']){if(_0x38fc0e[_0x80bd('0x14')]['code']===0x1f4){logger[_0x80bd('0x14')]('WhatsappInteraction,\x20%s,\x20%s',_0xa3c0da,_0x38fc0e['error'][_0x80bd('0x15')]);return _0x109dd9(_0x38fc0e[_0x80bd('0x14')]['message']);}logger[_0x80bd('0x14')](_0x80bd('0x16'),_0xa3c0da,_0x38fc0e['error'][_0x80bd('0x15')]);return _0x4babff(_0x38fc0e[_0x80bd('0x14')][_0x80bd('0x15')]);}else{logger[_0x80bd('0xf')]('WhatsappInteraction,\x20%s,\x20%s',_0xa3c0da,_0x80bd('0x10'));_0x4babff(_0x38fc0e[_0x80bd('0x17')][_0x80bd('0x15')]);}})['catch'](function(_0x15c826){logger[_0x80bd('0x14')](_0x80bd('0x16'),_0xa3c0da,_0x15c826);_0x109dd9(_0x15c826);});});}exports['UpdateWhatsappInteraction']=function(_0x24002f){var _0x15b847=this;return new Promise(function(_0x18ccda,_0x9fb62d){return db['WhatsappInteraction'][_0x80bd('0x18')](_0x24002f[_0x80bd('0x19')],{'raw':_0x24002f[_0x80bd('0x1a')]?_0x24002f[_0x80bd('0x1a')][_0x80bd('0x1b')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x24002f[_0x80bd('0x1a')]?_0x24002f[_0x80bd('0x1a')][_0x80bd('0x1c')]||null:null,'attributes':_0x24002f[_0x80bd('0x1a')]?_0x24002f[_0x80bd('0x1a')]['attributes']||null:null,'limit':_0x24002f['options']?_0x24002f['options']['limit']||null:null})[_0x80bd('0xe')](function(_0x3b03fe){logger[_0x80bd('0xf')]('UpdateWhatsappInteraction',_0x24002f);logger[_0x80bd('0x11')](_0x80bd('0x1d'),_0x24002f,JSON[_0x80bd('0x13')](_0x3b03fe));_0x18ccda(_0x3b03fe);})[_0x80bd('0x1e')](function(_0x4a1935){logger[_0x80bd('0x14')](_0x80bd('0x1d'),_0x4a1935[_0x80bd('0x15')],_0x24002f);_0x9fb62d(_0x15b847[_0x80bd('0x14')](0x1f4,_0x4a1935[_0x80bd('0x15')]));});});};exports['AddTagsToWhatsappInteraction']=function(_0x4f3386){return new Promise(function(_0x2ac88a,_0x20760e){return db[_0x80bd('0x1f')][_0x80bd('0x20')]({'where':_0x4f3386['options']?_0x4f3386[_0x80bd('0x1a')][_0x80bd('0x1c')]||null:null})['then'](function(_0x4a8ba5){if(_0x4a8ba5){return _0x4a8ba5['addTags'](_0x4f3386[_0x80bd('0x19')][_0x80bd('0x21')],_[_0x80bd('0x22')](_0x4f3386[_0x80bd('0x19')],[_0x80bd('0x21'),'id'])||{});}})['spread'](function(_0x2602b6){logger['info']('AddTags',_0x4f3386);logger[_0x80bd('0x11')](_0x80bd('0x23'),_0x4f3386,JSON[_0x80bd('0x13')](_0x2602b6));_0x2ac88a(_0x2602b6);})[_0x80bd('0x1e')](function(_0x147c07){logger[_0x80bd('0x14')]('AddTags',_0x147c07['message'],_0x4f3386);_0x20760e(_this[_0x80bd('0x14')](0x1f4,_0x147c07['message']));});});};
\ No newline at end of file
index 49974df..5ed0e77 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0b3e=['emit','register','whatsappInteraction:','save','remove','update'];(function(_0x346825,_0x3a2583){var _0x181f63=function(_0x1aaaa0){while(--_0x1aaaa0){_0x346825['push'](_0x346825['shift']());}};_0x181f63(++_0x3a2583);}(_0x0b3e,0xff));var _0xe0b3=function(_0x4dfd48,_0x547e5e){_0x4dfd48=_0x4dfd48-0x0;var _0x66a426=_0x0b3e[_0x4dfd48];return _0x66a426;};'use strict';var WhatsappInteractionEvents=require('./whatsappInteraction.events');var events=[_0xe0b3('0x0'),_0xe0b3('0x1'),_0xe0b3('0x2')];function createListener(_0x6cd62,_0x2db339){return function(_0x3acd87){_0x2db339[_0xe0b3('0x3')](_0x6cd62,_0x3acd87);};}function removeListener(_0x57fefa,_0x474e93){return function(){WhatsappInteractionEvents['removeListener'](_0x57fefa,_0x474e93);};}exports[_0xe0b3('0x4')]=function(_0x159bce){for(var _0x32a222=0x0,_0x3374df=events['length'];_0x32a222<_0x3374df;_0x32a222++){var _0xb5f5f1=events[_0x32a222];var _0x55205b=createListener(_0xe0b3('0x5')+_0xb5f5f1,_0x159bce);WhatsappInteractionEvents['on'](_0xb5f5f1,_0x55205b);}};
\ No newline at end of file
+var _0xf8dd=['length','./whatsappInteraction.events','save','remove','update','emit','removeListener','register'];(function(_0x4cdad1,_0x1620ec){var _0x515769=function(_0x24f998){while(--_0x24f998){_0x4cdad1['push'](_0x4cdad1['shift']());}};_0x515769(++_0x1620ec);}(_0xf8dd,0x101));var _0xdf8d=function(_0x202233,_0xd5fa50){_0x202233=_0x202233-0x0;var _0xf0ac90=_0xf8dd[_0x202233];return _0xf0ac90;};'use strict';var WhatsappInteractionEvents=require(_0xdf8d('0x0'));var events=[_0xdf8d('0x1'),_0xdf8d('0x2'),_0xdf8d('0x3')];function createListener(_0x41d8d7,_0x33ccdd){return function(_0x5b43a2){_0x33ccdd[_0xdf8d('0x4')](_0x41d8d7,_0x5b43a2);};}function removeListener(_0x2efd87,_0x4efbae){return function(){WhatsappInteractionEvents[_0xdf8d('0x5')](_0x2efd87,_0x4efbae);};}exports[_0xdf8d('0x6')]=function(_0x2afe69){for(var _0x59273f=0x0,_0x37cb83=events[_0xdf8d('0x7')];_0x59273f<_0x37cb83;_0x59273f++){var _0xe4d819=events[_0x59273f];var _0x2628b5=createListener('whatsappInteraction:'+_0xe4d819,_0x2afe69);WhatsappInteractionEvents['on'](_0xe4d819,_0x2628b5);}};
\ No newline at end of file
index 6fbdacd..23ba614 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaacd=['index','/describe','/:id','isAuthenticated','whatsapp','whatsappmessage:create','/:id/status','status','put','update','/:id/accept','accept','/:id/reject','delete','destroy','multer','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get'];(function(_0x5ad144,_0x31a974){var _0x20b605=function(_0x2a8c24){while(--_0x2a8c24){_0x5ad144['push'](_0x5ad144['shift']());}};_0x20b605(++_0x31a974);}(_0xaacd,0x73));var _0xdaac=function(_0x3cbf4c,_0x3c5832){_0x3cbf4c=_0x3cbf4c-0x0;var _0x5e65b7=_0xaacd[_0x3cbf4c];return _0x5e65b7;};'use strict';var multer=require(_0xdaac('0x0'));var util=require('util');var path=require(_0xdaac('0x1'));var timeout=require(_0xdaac('0x2'));var express=require(_0xdaac('0x3'));var router=express[_0xdaac('0x4')]();var fs_extra=require(_0xdaac('0x5'));var auth=require(_0xdaac('0x6'));var interaction=require(_0xdaac('0x7'));var config=require(_0xdaac('0x8'));var controller=require('./whatsappMessage.controller');router[_0xdaac('0x9')]('/',auth['isAuthenticated'](),controller[_0xdaac('0xa')]);router[_0xdaac('0x9')](_0xdaac('0xb'),auth['isAuthenticated'](),controller['describe']);router['get'](_0xdaac('0xc'),auth[_0xdaac('0xd')](),controller['show']);router['post']('/',auth['isAuthenticated'](),interaction['tracked'](_0xdaac('0xe'),_0xdaac('0xf')),controller['create']);router['post'](_0xdaac('0x10'),controller[_0xdaac('0x11')]);router[_0xdaac('0x12')](_0xdaac('0xc'),auth['isAuthenticated'](),controller[_0xdaac('0x13')]);router[_0xdaac('0x12')](_0xdaac('0x14'),auth[_0xdaac('0xd')](),controller[_0xdaac('0x15')]);router['put'](_0xdaac('0x16'),auth['isAuthenticated'](),controller['reject']);router[_0xdaac('0x17')](_0xdaac('0xc'),auth[_0xdaac('0xd')](),controller[_0xdaac('0x18')]);module['exports']=router;
\ No newline at end of file
+var _0x21fc=['path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappMessage.controller','get','isAuthenticated','index','/describe','describe','show','post','whatsapp','create','/:id/status','status','put','/:id','update','/:id/accept','accept','/:id/reject','reject','delete','exports','multer'];(function(_0x4920c0,_0x238c06){var _0x42562c=function(_0x11458e){while(--_0x11458e){_0x4920c0['push'](_0x4920c0['shift']());}};_0x42562c(++_0x238c06);}(_0x21fc,0x149));var _0xc21f=function(_0x286726,_0x20a337){_0x286726=_0x286726-0x0;var _0xcd4fe9=_0x21fc[_0x286726];return _0xcd4fe9;};'use strict';var multer=require(_0xc21f('0x0'));var util=require('util');var path=require(_0xc21f('0x1'));var timeout=require(_0xc21f('0x2'));var express=require(_0xc21f('0x3'));var router=express[_0xc21f('0x4')]();var fs_extra=require(_0xc21f('0x5'));var auth=require(_0xc21f('0x6'));var interaction=require(_0xc21f('0x7'));var config=require(_0xc21f('0x8'));var controller=require(_0xc21f('0x9'));router[_0xc21f('0xa')]('/',auth[_0xc21f('0xb')](),controller[_0xc21f('0xc')]);router[_0xc21f('0xa')](_0xc21f('0xd'),auth[_0xc21f('0xb')](),controller[_0xc21f('0xe')]);router[_0xc21f('0xa')]('/:id',auth[_0xc21f('0xb')](),controller[_0xc21f('0xf')]);router[_0xc21f('0x10')]('/',auth[_0xc21f('0xb')](),interaction['tracked'](_0xc21f('0x11'),'whatsappmessage:create'),controller[_0xc21f('0x12')]);router[_0xc21f('0x10')](_0xc21f('0x13'),controller[_0xc21f('0x14')]);router[_0xc21f('0x15')](_0xc21f('0x16'),auth[_0xc21f('0xb')](),controller[_0xc21f('0x17')]);router[_0xc21f('0x15')](_0xc21f('0x18'),auth['isAuthenticated'](),controller[_0xc21f('0x19')]);router[_0xc21f('0x15')](_0xc21f('0x1a'),auth['isAuthenticated'](),controller[_0xc21f('0x1b')]);router[_0xc21f('0x1c')](_0xc21f('0x16'),auth[_0xc21f('0xb')](),controller['destroy']);module[_0xc21f('0x1d')]=router;
\ No newline at end of file
index e2f9a2e..c4cea36 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1fbe=['exports','TEXT','medium','ENUM','out','STRING','BOOLEAN','sequelize'];(function(_0x8c798c,_0x591962){var _0x115cd7=function(_0x212134){while(--_0x212134){_0x8c798c['push'](_0x8c798c['shift']());}};_0x115cd7(++_0x591962);}(_0x1fbe,0xef));var _0xe1fb=function(_0x284bc3,_0x22dffe){_0x284bc3=_0x284bc3-0x0;var _0x41ac81=_0x1fbe[_0x284bc3];return _0x41ac81;};'use strict';var Sequelize=require(_0xe1fb('0x0'));module[_0xe1fb('0x1')]={'body':{'type':Sequelize[_0xe1fb('0x2')](_0xe1fb('0x3')),'allowNull':![]},'read':{'type':Sequelize['BOOLEAN'],'defaultValue':![]},'direction':{'type':Sequelize[_0xe1fb('0x4')]('in',_0xe1fb('0x5')),'defaultValue':'out','allowNull':![]},'messageId':{'type':Sequelize[_0xe1fb('0x6')](0xbe)},'phone':{'type':Sequelize['STRING']},'readAt':{'type':Sequelize['DATE']},'secret':{'type':Sequelize[_0xe1fb('0x7')],'defaultValue':![]},'providerName':{'type':Sequelize[_0xe1fb('0x6')]},'providerResponse':{'type':Sequelize[_0xe1fb('0x2')]}};
\ No newline at end of file
+var _0xdfb4=['DATE','sequelize','exports','TEXT','medium','BOOLEAN','ENUM','out','STRING'];(function(_0x55f914,_0x48fa04){var _0x2ef047=function(_0x26f522){while(--_0x26f522){_0x55f914['push'](_0x55f914['shift']());}};_0x2ef047(++_0x48fa04);}(_0xdfb4,0x169));var _0x4dfb=function(_0x503883,_0x527ce4){_0x503883=_0x503883-0x0;var _0x2bcbcd=_0xdfb4[_0x503883];return _0x2bcbcd;};'use strict';var Sequelize=require(_0x4dfb('0x0'));module[_0x4dfb('0x1')]={'body':{'type':Sequelize[_0x4dfb('0x2')](_0x4dfb('0x3')),'allowNull':![]},'read':{'type':Sequelize[_0x4dfb('0x4')],'defaultValue':![]},'direction':{'type':Sequelize[_0x4dfb('0x5')]('in',_0x4dfb('0x6')),'defaultValue':'out','allowNull':![]},'messageId':{'type':Sequelize[_0x4dfb('0x7')](0xbe)},'phone':{'type':Sequelize[_0x4dfb('0x7')]},'readAt':{'type':Sequelize[_0x4dfb('0x8')]},'secret':{'type':Sequelize[_0x4dfb('0x4')],'defaultValue':![]},'providerName':{'type':Sequelize[_0x4dfb('0x7')]},'providerResponse':{'type':Sequelize[_0x4dfb('0x2')]}};
\ No newline at end of file
index 3b9938b..d9c8118 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa6ff=['../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','redis','defaults','socket.io-emitter','./whatsappMessage.socket','register','jayson/promise','client','http','request','then','info','WhatsappMessage,\x20%s,\x20%s','request\x20sent','debug','WhatsappMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','status','end','json','offset','undefined','limit','count','Content-Range','apply','reject','save','update','destroy','sendStatus','name','send','fieldName','key','query','keys','filters','model','attributes','intersection','length','hasOwnProperty','nolimit','sort','where','pick','filter','merge','options','include','WhatsappMessage','findAll','params','rawAttributes','fields','includeAll','create','body','find','describe','whatsapp-interactions','accept','format','YYYY-MM-DD\x20HH:mm:ss','UserId','user','agent','get','WhatsappInteraction','WhatsappInteractionId','isNil','read1stAt','interaction','[WHATSAPPMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','null','AcceptMessage','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','QueryTypes','SELECT','User','fullname','internal','manual','interface','SIP/%s','channel','motionChannel','event','EventManager','acceptmessage','whatsapp','RejectMessage','rejectMessage','Sequelize','contact','email','rejectmessage','WhatsappAccount','WhatsappAccountId','WhatsppMessage,\x20%s,\x20%s,\x20%s','received\x20delivery\x20report\x20from','type','inspect','MessageSid','MessageStatus','WhatsappAccount,\x20%s,\x20%s,\x20%s','twilio','eml-format','rimraf','zip-dir','request-promise','moment','bluebird','mustache','util','to-csv','ejs','fs-extra','crypto','jsforce','desk.js','querystring','papaparse','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch'];(function(_0xb6c029,_0x289717){var _0x369954=function(_0xf20e69){while(--_0xf20e69){_0xb6c029['push'](_0xb6c029['shift']());}};_0x369954(++_0x289717);}(_0xa6ff,0x105));var _0xfa6f=function(_0x15f193,_0x455ce8){_0x15f193=_0x15f193-0x0;var _0x255514=_0xa6ff[_0x15f193];return _0x255514;};'use strict';var emlformat=require(_0xfa6f('0x0'));var rimraf=require(_0xfa6f('0x1'));var zipdir=require(_0xfa6f('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xfa6f('0x3'));var moment=require(_0xfa6f('0x4'));var BPromise=require(_0xfa6f('0x5'));var Mustache=require(_0xfa6f('0x6'));var util=require(_0xfa6f('0x7'));var path=require('path');var sox=require('sox');var csv=require(_0xfa6f('0x8'));var ejs=require(_0xfa6f('0x9'));var fs=require('fs');var fs_extra=require(_0xfa6f('0xa'));var _=require('lodash');var squel=require('squel');var crypto=require(_0xfa6f('0xb'));var jsforce=require(_0xfa6f('0xc'));var deskjs=require(_0xfa6f('0xd'));var toCsv=require(_0xfa6f('0x8'));var querystring=require(_0xfa6f('0xe'));var Papa=require(_0xfa6f('0xf'));var Redis=require('ioredis');var authService=require(_0xfa6f('0x10'));var qs=require(_0xfa6f('0x11'));var as=require(_0xfa6f('0x12'));var hardwareService=require(_0xfa6f('0x13'));var logger=require(_0xfa6f('0x14'))('api');var utils=require(_0xfa6f('0x15'));var config=require(_0xfa6f('0x16'));var licenseUtil=require(_0xfa6f('0x17'));var db=require('../../mysqldb')['db'];config[_0xfa6f('0x18')]=_[_0xfa6f('0x19')](config['redis'],{'host':'localhost','port':0x18eb});var socket=require(_0xfa6f('0x1a'))(new Redis(config['redis']));require(_0xfa6f('0x1b'))[_0xfa6f('0x1c')](socket);var jayson=require(_0xfa6f('0x1d'));var client=jayson[_0xfa6f('0x1e')][_0xfa6f('0x1f')]({'port':0x232c});var client9002=jayson[_0xfa6f('0x1e')]['http']({'port':0x232a});function respondWithRpcPromise(_0x389fda,_0x5db347,_0x18120e,_0x34eced){return new BPromise(function(_0x3daab5,_0xd7a2af){var _0x5b1df5=_0x34eced||client;return _0x5b1df5[_0xfa6f('0x20')](_0x389fda,_0x18120e)[_0xfa6f('0x21')](function(_0x394e3f){logger[_0xfa6f('0x22')](_0xfa6f('0x23'),_0x5db347,_0xfa6f('0x24'));logger[_0xfa6f('0x25')](_0xfa6f('0x26'),_0x5db347,_0xfa6f('0x24'),JSON[_0xfa6f('0x27')](_0x394e3f));if(_0x394e3f[_0xfa6f('0x28')]){if(_0x394e3f[_0xfa6f('0x28')][_0xfa6f('0x29')]===0x1f4){logger[_0xfa6f('0x28')](_0xfa6f('0x23'),_0x5db347,_0x394e3f[_0xfa6f('0x28')]['message']);return _0xd7a2af(_0x394e3f['error']['message']);}logger[_0xfa6f('0x28')](_0xfa6f('0x23'),_0x5db347,_0x394e3f[_0xfa6f('0x28')]['message']);return _0x3daab5(_0x394e3f[_0xfa6f('0x28')][_0xfa6f('0x2a')]);}else{logger['info'](_0xfa6f('0x23'),_0x5db347,'request\x20sent');_0x3daab5(_0x394e3f[_0xfa6f('0x2b')][_0xfa6f('0x2a')]);}})[_0xfa6f('0x2c')](function(_0x2c310b){logger[_0xfa6f('0x28')](_0xfa6f('0x23'),_0x5db347,_0x2c310b);_0xd7a2af(_0x2c310b);});});}function respondWithStatusCode(_0x45cde1,_0x5a37db){_0x5a37db=_0x5a37db||0xcc;return function(_0x2d4497){if(_0x2d4497){return _0x45cde1['sendStatus'](_0x5a37db);}return _0x45cde1[_0xfa6f('0x2d')](_0x5a37db)[_0xfa6f('0x2e')]();};}function respondWithResult(_0x13bd5e,_0x24970c){_0x24970c=_0x24970c||0xc8;return function(_0x45a45a){if(_0x45a45a){return _0x13bd5e[_0xfa6f('0x2d')](_0x24970c)[_0xfa6f('0x2f')](_0x45a45a);}};}function respondWithFilteredResult(_0x3c111a,_0x19b194){return function(_0x4433f6){if(_0x4433f6){var _0x3932ef=typeof _0x19b194[_0xfa6f('0x30')]===_0xfa6f('0x31')&&typeof _0x19b194[_0xfa6f('0x32')]===_0xfa6f('0x31');var _0x5740fe=_0x4433f6[_0xfa6f('0x33')];var _0x1d1099=_0x3932ef?0x0:_0x19b194[_0xfa6f('0x30')];var _0x21aa55=_0x3932ef?_0x4433f6[_0xfa6f('0x33')]:_0x19b194[_0xfa6f('0x30')]+_0x19b194[_0xfa6f('0x32')];var _0x5f5b13;if(_0x21aa55>=_0x5740fe){_0x21aa55=_0x5740fe;_0x5f5b13=0xc8;}else{_0x5f5b13=0xce;}_0x3c111a[_0xfa6f('0x2d')](_0x5f5b13);return _0x3c111a['set'](_0xfa6f('0x34'),_0x1d1099+'-'+_0x21aa55+'/'+_0x5740fe)[_0xfa6f('0x2f')](_0x4433f6);}return null;};}function patchUpdates(_0x2af520){return function(_0x48e51a){try{jsonpatch[_0xfa6f('0x35')](_0x48e51a,_0x2af520,!![]);}catch(_0x838ba1){return BPromise[_0xfa6f('0x36')](_0x838ba1);}return _0x48e51a[_0xfa6f('0x37')]();};}function saveUpdates(_0x337169,_0x37a011){return function(_0x55c6e5){if(_0x55c6e5){return _0x55c6e5[_0xfa6f('0x38')](_0x337169)[_0xfa6f('0x21')](function(_0x35a94b){return _0x35a94b;});}return null;};}function removeEntity(_0x1332da,_0x1417d9){return function(_0x3b9738){if(_0x3b9738){return _0x3b9738[_0xfa6f('0x39')]()[_0xfa6f('0x21')](function(){_0x1332da[_0xfa6f('0x2d')](0xcc)[_0xfa6f('0x2e')]();});}};}function handleEntityNotFound(_0x34c481,_0x280e2e){return function(_0x56fb9d){if(!_0x56fb9d){_0x34c481[_0xfa6f('0x3a')](0x194);}return _0x56fb9d;};}function handleError(_0x2da9c0,_0x1bc608){_0x1bc608=_0x1bc608||0x1f4;return function(_0x574deb){logger[_0xfa6f('0x28')](_0x574deb['stack']);if(_0x574deb[_0xfa6f('0x3b')]){delete _0x574deb[_0xfa6f('0x3b')];}_0x2da9c0[_0xfa6f('0x2d')](_0x1bc608)[_0xfa6f('0x3c')](_0x574deb);};}exports['index']=function(_0x19aff0,_0x474ecf){var _0x7a78={},_0x3e7abc={},_0x339d3a={'count':0x0,'rows':[]};var _0x1f8055=_['map'](db['WhatsappMessage']['rawAttributes'],function(_0x29f94f){return{'name':_0x29f94f[_0xfa6f('0x3d')],'type':_0x29f94f['type'][_0xfa6f('0x3e')]};});_0x3e7abc['model']=_['map'](_0x1f8055,_0xfa6f('0x3b'));_0x3e7abc[_0xfa6f('0x3f')]=_[_0xfa6f('0x40')](_0x19aff0['query']);_0x3e7abc[_0xfa6f('0x41')]=_['intersection'](_0x3e7abc[_0xfa6f('0x42')],_0x3e7abc[_0xfa6f('0x3f')]);_0x7a78[_0xfa6f('0x43')]=_[_0xfa6f('0x44')](_0x3e7abc[_0xfa6f('0x42')],qs['fields'](_0x19aff0[_0xfa6f('0x3f')]['fields']));_0x7a78[_0xfa6f('0x43')]=_0x7a78[_0xfa6f('0x43')][_0xfa6f('0x45')]?_0x7a78[_0xfa6f('0x43')]:_0x3e7abc[_0xfa6f('0x42')];if(!_0x19aff0[_0xfa6f('0x3f')][_0xfa6f('0x46')](_0xfa6f('0x47'))){_0x7a78['limit']=qs[_0xfa6f('0x32')](_0x19aff0[_0xfa6f('0x3f')][_0xfa6f('0x32')]);_0x7a78[_0xfa6f('0x30')]=qs[_0xfa6f('0x30')](_0x19aff0[_0xfa6f('0x3f')]['offset']);}_0x7a78['order']=qs['sort'](_0x19aff0[_0xfa6f('0x3f')][_0xfa6f('0x48')]);_0x7a78[_0xfa6f('0x49')]=qs[_0xfa6f('0x41')](_[_0xfa6f('0x4a')](_0x19aff0[_0xfa6f('0x3f')],_0x3e7abc[_0xfa6f('0x41')]),_0x1f8055);if(_0x19aff0[_0xfa6f('0x3f')][_0xfa6f('0x4b')]){_0x7a78[_0xfa6f('0x49')]=_['merge'](_0x7a78[_0xfa6f('0x49')],{'$or':_['map'](_0x1f8055,function(_0x446857){if(_0x446857['type']!=='VIRTUAL'){var _0x3c818e={};_0x3c818e[_0x446857['name']]={'$like':'%'+_0x19aff0[_0xfa6f('0x3f')][_0xfa6f('0x4b')]+'%'};return _0x3c818e;}})});}_0x7a78=_[_0xfa6f('0x4c')]({},_0x7a78,_0x19aff0[_0xfa6f('0x4d')]);var _0x5a23f0={'where':_0x7a78[_0xfa6f('0x49')]};return db['WhatsappMessage'][_0xfa6f('0x33')](_0x5a23f0)[_0xfa6f('0x21')](function(_0x2a1a5f){_0x339d3a[_0xfa6f('0x33')]=_0x2a1a5f;if(_0x19aff0['query']['includeAll']){_0x7a78[_0xfa6f('0x4e')]=[{'all':!![]}];}return db[_0xfa6f('0x4f')][_0xfa6f('0x50')](_0x7a78);})['then'](function(_0x5baf0b){_0x339d3a['rows']=_0x5baf0b;return _0x339d3a;})['then'](respondWithFilteredResult(_0x474ecf,_0x7a78))['catch'](handleError(_0x474ecf,null));};exports['show']=function(_0x523b2f,_0x50cd60){var _0x3d237f={'raw':!![],'where':{'id':_0x523b2f[_0xfa6f('0x51')]['id']}},_0x41dfae={};_0x41dfae['model']=_['keys'](db[_0xfa6f('0x4f')][_0xfa6f('0x52')]);_0x41dfae[_0xfa6f('0x3f')]=_[_0xfa6f('0x40')](_0x523b2f['query']);_0x41dfae['filters']=_[_0xfa6f('0x44')](_0x41dfae[_0xfa6f('0x42')],_0x41dfae[_0xfa6f('0x3f')]);_0x3d237f['attributes']=_['intersection'](_0x41dfae[_0xfa6f('0x42')],qs[_0xfa6f('0x53')](_0x523b2f['query'][_0xfa6f('0x53')]));_0x3d237f[_0xfa6f('0x43')]=_0x3d237f[_0xfa6f('0x43')][_0xfa6f('0x45')]?_0x3d237f['attributes']:_0x41dfae[_0xfa6f('0x42')];if(_0x523b2f[_0xfa6f('0x3f')][_0xfa6f('0x54')]){_0x3d237f[_0xfa6f('0x4e')]=[{'all':!![]}];}_0x3d237f=_[_0xfa6f('0x4c')]({},_0x3d237f,_0x523b2f[_0xfa6f('0x4d')]);return db[_0xfa6f('0x4f')]['find'](_0x3d237f)[_0xfa6f('0x21')](handleEntityNotFound(_0x50cd60,null))[_0xfa6f('0x21')](respondWithResult(_0x50cd60,null))[_0xfa6f('0x2c')](handleError(_0x50cd60,null));};exports[_0xfa6f('0x55')]=function(_0x232834,_0x4e4780){return db[_0xfa6f('0x4f')]['create'](_0x232834['body'],{})['then'](respondWithResult(_0x4e4780,0xc9))[_0xfa6f('0x2c')](handleError(_0x4e4780,null));};exports['update']=function(_0x1d2af4,_0xc5638b){if(_0x1d2af4[_0xfa6f('0x56')]['id']){delete _0x1d2af4[_0xfa6f('0x56')]['id'];}return db[_0xfa6f('0x4f')][_0xfa6f('0x57')]({'where':{'id':_0x1d2af4['params']['id']}})[_0xfa6f('0x21')](handleEntityNotFound(_0xc5638b,null))['then'](saveUpdates(_0x1d2af4[_0xfa6f('0x56')],null))[_0xfa6f('0x21')](respondWithResult(_0xc5638b,null))[_0xfa6f('0x2c')](handleError(_0xc5638b,null));};exports[_0xfa6f('0x39')]=function(_0x24282e,_0x49d8af){return db['WhatsappMessage'][_0xfa6f('0x57')]({'where':{'id':_0x24282e[_0xfa6f('0x51')]['id']}})[_0xfa6f('0x21')](handleEntityNotFound(_0x49d8af,null))['then'](removeEntity(_0x49d8af,null))['catch'](handleError(_0x49d8af,null));};exports['describe']=function(_0xeb0188,_0x4150f6){return db[_0xfa6f('0x4f')][_0xfa6f('0x58')]()['then'](respondWithResult(_0x4150f6,null))[_0xfa6f('0x2c')](handleError(_0x4150f6,null));};var interaction_log=require(_0xfa6f('0x14'))(_0xfa6f('0x59'));exports[_0xfa6f('0x5a')]=function(_0x3d4621,_0x430a52,_0x2e5023){var _0x329cf5={'agent':{},'channel':'whatsapp'};if(_0x3d4621[_0xfa6f('0x56')]['id']){delete _0x3d4621['body']['id'];}_0x3d4621[_0xfa6f('0x56')]['read']=!![];_0x3d4621[_0xfa6f('0x56')]['readAt']=moment()[_0xfa6f('0x5b')](_0xfa6f('0x5c'));_0x3d4621['body'][_0xfa6f('0x5d')]=_0x3d4621[_0xfa6f('0x56')][_0xfa6f('0x5d')]||_0x3d4621[_0xfa6f('0x5e')]['id'];_0x329cf5[_0xfa6f('0x5f')]['id']=_0x3d4621[_0xfa6f('0x56')][_0xfa6f('0x5d')];return db[_0xfa6f('0x4f')][_0xfa6f('0x57')]({'where':{'id':_0x3d4621[_0xfa6f('0x51')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x430a52,null))[_0xfa6f('0x21')](saveUpdates(_0x3d4621['body'],null))[_0xfa6f('0x21')](function(_0x21c192){if(_0x21c192){_0x329cf5[_0xfa6f('0x2a')]=_0x21c192[_0xfa6f('0x60')]({'plain':!![]});return db[_0xfa6f('0x61')]['find']({'where':{'id':_0x21c192[_0xfa6f('0x62')]}});}return null;})[_0xfa6f('0x21')](handleEntityNotFound(_0x430a52,null))['then'](function(_0x40afd0){if(_0x40afd0){return _0x40afd0['update']({'UserId':_0x3d4621[_0xfa6f('0x56')][_0xfa6f('0x5d')],'read1stAt':_[_0xfa6f('0x63')](_0x40afd0[_0xfa6f('0x64')])?moment()['format'](_0xfa6f('0x5c')):undefined});}return null;})[_0xfa6f('0x21')](function(_0x5d2670){if(_0x5d2670){_0x329cf5[_0xfa6f('0x65')]=_0x5d2670[_0xfa6f('0x60')]({'plain':!![]});interaction_log[_0xfa6f('0x22')](_0xfa6f('0x66'),_0x3d4621[_0xfa6f('0x5e')]['id'],_0x3d4621['user'][_0xfa6f('0x3b')],_0x3d4621[_0xfa6f('0x5e')][_0xfa6f('0x67')],_0x329cf5[_0xfa6f('0x65')]['id'],_0x3d4621[_0xfa6f('0x56')]?JSON[_0xfa6f('0x27')](_0x3d4621[_0xfa6f('0x56')]):_0xfa6f('0x68'));return respondWithRpcPromise(_0xfa6f('0x69'),_0xfa6f('0x6a'),_0x329cf5);}return null;})[_0xfa6f('0x21')](function(_0x110175){var _0x53eb62=_0xfa6f('0x6b')+_0x110175['message'][_0xfa6f('0x6c')];return db[_0xfa6f('0x6d')][_0xfa6f('0x3f')](_0x53eb62,{'type':db['Sequelize'][_0xfa6f('0x6e')][_0xfa6f('0x6f')],'raw':!![]})[_0xfa6f('0x21')](function(_0x3f32aa){return _0x3f32aa;});})[_0xfa6f('0x21')](function(_0x45edb3){if(_0x45edb3){_0x329cf5['message']['contact']=_0x45edb3[0x0];if(!_0x3d4621[_0xfa6f('0x56')][_0xfa6f('0x5d')])return;return db[_0xfa6f('0x70')][_0xfa6f('0x57')]({'where':{'id':_0x3d4621[_0xfa6f('0x56')]['UserId'],'role':_0xfa6f('0x5f')},'attributes':['id',_0xfa6f('0x3b'),_0xfa6f('0x71'),'email',_0xfa6f('0x72')],'raw':!![]});}return null;})[_0xfa6f('0x21')](function(_0x5725c3){if(!_0x5725c3)return null;_0x329cf5['message'][_0xfa6f('0x5f')]=_0x5725c3;return _0x329cf5;})[_0xfa6f('0x21')](function(_0x3123a8){if(_0x3123a8){if(_0x3d4621['body'][_0xfa6f('0x73')]){_0x329cf5['message'][_0xfa6f('0x74')]=util['format'](_0xfa6f('0x75'),_0x3d4621[_0xfa6f('0x5e')][_0xfa6f('0x3b')]);_0x329cf5[_0xfa6f('0x2a')][_0xfa6f('0x76')]=_0x329cf5[_0xfa6f('0x76')];_0x329cf5['message'][_0xfa6f('0x77')]=_0x329cf5['channel'];_0x329cf5[_0xfa6f('0x2a')][_0xfa6f('0x78')]='accept';return respondWithRpcPromise(_0xfa6f('0x79'),_0xfa6f('0x79'),{'event':_0xfa6f('0x7a'),'message':_0x329cf5['message']},client9002)['then'](function(){return _0x329cf5;});}return _0x329cf5;}return null;})[_0xfa6f('0x21')](respondWithResult(_0x430a52,null))[_0xfa6f('0x2c')](handleError(_0x430a52,null));};var interaction_log=require(_0xfa6f('0x14'))(_0xfa6f('0x59'));exports[_0xfa6f('0x36')]=function(_0x480b6d,_0x197269,_0x1bc0b3){var _0x533bef={'agent':{},'channel':_0xfa6f('0x7b')};if(_0x480b6d[_0xfa6f('0x56')]['id']){delete _0x480b6d[_0xfa6f('0x56')]['id'];}_0x480b6d[_0xfa6f('0x56')][_0xfa6f('0x5d')]=_0x480b6d[_0xfa6f('0x56')][_0xfa6f('0x5d')]||_0x480b6d[_0xfa6f('0x5e')]['id'];_0x533bef[_0xfa6f('0x5f')]['id']=_0x480b6d[_0xfa6f('0x56')][_0xfa6f('0x5d')];return db[_0xfa6f('0x4f')][_0xfa6f('0x57')]({'where':{'id':_0x480b6d[_0xfa6f('0x51')]['id'],'UserId':null}})['then'](handleEntityNotFound(_0x197269,null))['then'](function(_0x1ef908){if(_0x1ef908){_0x533bef[_0xfa6f('0x2a')]=_0x1ef908[_0xfa6f('0x60')]({'plain':!![]});return db[_0xfa6f('0x61')]['find']({'where':{'id':_0x1ef908[_0xfa6f('0x62')]}});}return null;})[_0xfa6f('0x21')](handleEntityNotFound(_0x197269,null))[_0xfa6f('0x21')](function(_0x225e60){if(_0x225e60){_0x533bef[_0xfa6f('0x65')]=_0x225e60[_0xfa6f('0x60')]({'plain':!![]});interaction_log[_0xfa6f('0x22')]('[WHATSAPPMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x480b6d['user']['id'],_0x480b6d[_0xfa6f('0x5e')][_0xfa6f('0x3b')],_0x480b6d[_0xfa6f('0x5e')][_0xfa6f('0x67')],_0x533bef[_0xfa6f('0x65')]['id'],_0x480b6d[_0xfa6f('0x56')]?JSON[_0xfa6f('0x27')](_0x480b6d['body']):_0xfa6f('0x68'));return respondWithRpcPromise(_0xfa6f('0x7c'),_0xfa6f('0x7d'),_0x533bef);}return null;})[_0xfa6f('0x21')](function(_0xd4f2b2){var _0x48fef9='SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20'+_0xd4f2b2[_0xfa6f('0x2a')][_0xfa6f('0x6c')];return db['sequelize'][_0xfa6f('0x3f')](_0x48fef9,{'type':db[_0xfa6f('0x7e')][_0xfa6f('0x6e')]['SELECT'],'raw':!![]})[_0xfa6f('0x21')](function(_0x1d8cb4){return _0x1d8cb4;});})['then'](function(_0x135442){if(_0x135442){_0x533bef[_0xfa6f('0x2a')][_0xfa6f('0x7f')]=_0x135442[0x0];if(!_0x480b6d[_0xfa6f('0x56')][_0xfa6f('0x5d')])return;return db['User'][_0xfa6f('0x57')]({'where':{'id':_0x480b6d[_0xfa6f('0x56')][_0xfa6f('0x5d')],'role':_0xfa6f('0x5f')},'attributes':['id',_0xfa6f('0x3b'),'fullname',_0xfa6f('0x80'),_0xfa6f('0x72')],'raw':!![]});}return null;})[_0xfa6f('0x21')](function(_0x4e4332){if(!_0x4e4332)return null;_0x533bef['message'][_0xfa6f('0x5f')]=_0x4e4332;return _0x533bef;})[_0xfa6f('0x21')](function(_0x36cd60){if(_0x36cd60){_0x36cd60['message']['interface']=util['format']('SIP/%s',_0x480b6d[_0xfa6f('0x5e')][_0xfa6f('0x3b')]);_0x36cd60[_0xfa6f('0x2a')][_0xfa6f('0x76')]=_0x533bef[_0xfa6f('0x76')];_0x36cd60['message'][_0xfa6f('0x77')]=_0x533bef[_0xfa6f('0x76')];_0x36cd60[_0xfa6f('0x2a')]['event']=_0xfa6f('0x36');respondWithRpcPromise(_0xfa6f('0x79'),'EventManager',{'event':_0xfa6f('0x81'),'message':_0x36cd60[_0xfa6f('0x2a')]},client9002);return _0x533bef;}return null;})[_0xfa6f('0x21')](respondWithResult(_0x197269,null))[_0xfa6f('0x2c')](handleError(_0x197269,null));};exports[_0xfa6f('0x2d')]=function(_0xb9f167,_0x3d1312,_0x30ac0d){if(_0xb9f167[_0xfa6f('0x56')]['id']){delete _0xb9f167[_0xfa6f('0x56')]['id'];}var _0x353e32;return db[_0xfa6f('0x4f')][_0xfa6f('0x57')]({'where':{'id':_0xb9f167['params']['id']}})[_0xfa6f('0x21')](handleEntityNotFound(_0x3d1312,null))[_0xfa6f('0x21')](function(_0x417d7c){if(_0x417d7c){_0x353e32=_0x417d7c;return db[_0xfa6f('0x82')][_0xfa6f('0x57')]({'where':{'id':_0x417d7c[_0xfa6f('0x83')]}});}})[_0xfa6f('0x21')](handleEntityNotFound(_0x3d1312,null))['then'](function(_0x4835c2){if(_0x4835c2){logger[_0xfa6f('0x25')](_0xfa6f('0x84'),_0xfa6f('0x2d'),_0xfa6f('0x85'),_0x4835c2[_0xfa6f('0x86')],util[_0xfa6f('0x87')](_0xb9f167['body'],{'showHidden':![],'depth':null}));switch(_0x4835c2[_0xfa6f('0x86')]){case'twilio':if(_0xb9f167['body'][_0xfa6f('0x88')]&&_0xb9f167['body']['MessageSid']===_0x353e32['messageId']&&_0xb9f167[_0xfa6f('0x56')]['MessageStatus']&&_0xb9f167[_0xfa6f('0x56')][_0xfa6f('0x89')]==='read'){return _0x353e32['update']({'read':!![]});}else{logger[_0xfa6f('0x28')](_0xfa6f('0x8a'),_0xfa6f('0x2d'),_0xfa6f('0x8b'),util[_0xfa6f('0x87')](_0xb9f167[_0xfa6f('0x56')],{'showHidden':![],'depth':null}));}break;}return _0x353e32;}})[_0xfa6f('0x21')](respondWithResult(_0x3d1312,null))['catch'](handleError(_0x3d1312,null));};
\ No newline at end of file
+var _0xc7c1=['SELECT','contact','User','email','internal','manual','channel','motionChannel','event','EventManager','acceptmessage','WhatsappInteraction','[WHATSAPPMESSAGE:REJECT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','rejectMessage','fullname','interface','rejectmessage','WhatsappAccount','WhatsappAccountId','WhatsppMessage,\x20%s,\x20%s,\x20%s','received\x20delivery\x20report\x20from','inspect','twilio','MessageSid','messageId','MessageStatus','WhatsappAccount,\x20%s,\x20%s,\x20%s','eml-format','request-promise','bluebird','mustache','util','sox','to-csv','ejs','fs-extra','lodash','squel','crypto','jsforce','desk.js','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/environment','../../config/license/util','redis','defaults','localhost','socket.io-emitter','register','client','http','request','then','info','WhatsappMessage,\x20%s,\x20%s','debug','request\x20sent','stringify','error','code','message','result','offset','undefined','limit','count','status','set','Content-Range','apply','reject','save','destroy','sendStatus','stack','name','send','type','key','map','keys','query','filters','intersection','model','attributes','fields','length','hasOwnProperty','nolimit','order','sort','where','filter','VIRTUAL','merge','includeAll','findAll','rows','catch','show','params','WhatsappMessage','rawAttributes','include','options','create','body','find','describe','whatsapp-interactions','accept','whatsapp','read','readAt','format','YYYY-MM-DD\x20HH:mm:ss','UserId','agent','get','WhatsappInteractionId','update','read1stAt','interaction','user','role','null','AcceptMessage','acceptMessage','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','Sequelize','QueryTypes'];(function(_0x233f5a,_0x6dc40c){var _0x23531e=function(_0x4bf560){while(--_0x4bf560){_0x233f5a['push'](_0x233f5a['shift']());}};_0x23531e(++_0x6dc40c);}(_0xc7c1,0x1b9));var _0x1c7c=function(_0x571ca3,_0x4c04fb){_0x571ca3=_0x571ca3-0x0;var _0x40a4a2=_0xc7c1[_0x571ca3];return _0x40a4a2;};'use strict';var emlformat=require(_0x1c7c('0x0'));var rimraf=require('rimraf');var zipdir=require('zip-dir');var jsonpatch=require('fast-json-patch');var rp=require(_0x1c7c('0x1'));var moment=require('moment');var BPromise=require(_0x1c7c('0x2'));var Mustache=require(_0x1c7c('0x3'));var util=require(_0x1c7c('0x4'));var path=require('path');var sox=require(_0x1c7c('0x5'));var csv=require(_0x1c7c('0x6'));var ejs=require(_0x1c7c('0x7'));var fs=require('fs');var fs_extra=require(_0x1c7c('0x8'));var _=require(_0x1c7c('0x9'));var squel=require(_0x1c7c('0xa'));var crypto=require(_0x1c7c('0xb'));var jsforce=require(_0x1c7c('0xc'));var deskjs=require(_0x1c7c('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require('papaparse');var Redis=require('ioredis');var authService=require(_0x1c7c('0xe'));var qs=require(_0x1c7c('0xf'));var as=require(_0x1c7c('0x10'));var hardwareService=require(_0x1c7c('0x11'));var logger=require(_0x1c7c('0x12'))('api');var utils=require('../../config/utils');var config=require(_0x1c7c('0x13'));var licenseUtil=require(_0x1c7c('0x14'));var db=require('../../mysqldb')['db'];config[_0x1c7c('0x15')]=_[_0x1c7c('0x16')](config[_0x1c7c('0x15')],{'host':_0x1c7c('0x17'),'port':0x18eb});var socket=require(_0x1c7c('0x18'))(new Redis(config['redis']));require('./whatsappMessage.socket')[_0x1c7c('0x19')](socket);var jayson=require('jayson/promise');var client=jayson[_0x1c7c('0x1a')][_0x1c7c('0x1b')]({'port':0x232c});var client9002=jayson[_0x1c7c('0x1a')][_0x1c7c('0x1b')]({'port':0x232a});function respondWithRpcPromise(_0xe98a8a,_0xb6e6ff,_0x53f07d,_0x8aed51){return new BPromise(function(_0x2df7cc,_0x9ab8a5){var _0x1b62ee=_0x8aed51||client;return _0x1b62ee[_0x1c7c('0x1c')](_0xe98a8a,_0x53f07d)[_0x1c7c('0x1d')](function(_0xaa9216){logger[_0x1c7c('0x1e')](_0x1c7c('0x1f'),_0xb6e6ff,'request\x20sent');logger[_0x1c7c('0x20')]('WhatsappMessage,\x20%s,\x20%s,\x20%s',_0xb6e6ff,_0x1c7c('0x21'),JSON[_0x1c7c('0x22')](_0xaa9216));if(_0xaa9216[_0x1c7c('0x23')]){if(_0xaa9216[_0x1c7c('0x23')][_0x1c7c('0x24')]===0x1f4){logger[_0x1c7c('0x23')]('WhatsappMessage,\x20%s,\x20%s',_0xb6e6ff,_0xaa9216[_0x1c7c('0x23')]['message']);return _0x9ab8a5(_0xaa9216['error']['message']);}logger[_0x1c7c('0x23')](_0x1c7c('0x1f'),_0xb6e6ff,_0xaa9216[_0x1c7c('0x23')][_0x1c7c('0x25')]);return _0x2df7cc(_0xaa9216[_0x1c7c('0x23')][_0x1c7c('0x25')]);}else{logger['info']('WhatsappMessage,\x20%s,\x20%s',_0xb6e6ff,_0x1c7c('0x21'));_0x2df7cc(_0xaa9216[_0x1c7c('0x26')][_0x1c7c('0x25')]);}})['catch'](function(_0x50b31b){logger[_0x1c7c('0x23')](_0x1c7c('0x1f'),_0xb6e6ff,_0x50b31b);_0x9ab8a5(_0x50b31b);});});}function respondWithStatusCode(_0x3251ea,_0x39008c){_0x39008c=_0x39008c||0xcc;return function(_0x1eeabc){if(_0x1eeabc){return _0x3251ea['sendStatus'](_0x39008c);}return _0x3251ea['status'](_0x39008c)['end']();};}function respondWithResult(_0x3cd5cb,_0x27416e){_0x27416e=_0x27416e||0xc8;return function(_0x49a82f){if(_0x49a82f){return _0x3cd5cb['status'](_0x27416e)['json'](_0x49a82f);}};}function respondWithFilteredResult(_0x1525af,_0x492f91){return function(_0x34f8d0){if(_0x34f8d0){var _0x527d36=typeof _0x492f91[_0x1c7c('0x27')]===_0x1c7c('0x28')&&typeof _0x492f91[_0x1c7c('0x29')]===_0x1c7c('0x28');var _0xf50fa5=_0x34f8d0['count'];var _0x1bc1e8=_0x527d36?0x0:_0x492f91['offset'];var _0xc181f5=_0x527d36?_0x34f8d0[_0x1c7c('0x2a')]:_0x492f91['offset']+_0x492f91['limit'];var _0x56041b;if(_0xc181f5>=_0xf50fa5){_0xc181f5=_0xf50fa5;_0x56041b=0xc8;}else{_0x56041b=0xce;}_0x1525af[_0x1c7c('0x2b')](_0x56041b);return _0x1525af[_0x1c7c('0x2c')](_0x1c7c('0x2d'),_0x1bc1e8+'-'+_0xc181f5+'/'+_0xf50fa5)['json'](_0x34f8d0);}return null;};}function patchUpdates(_0x487766){return function(_0x45802e){try{jsonpatch[_0x1c7c('0x2e')](_0x45802e,_0x487766,!![]);}catch(_0x569973){return BPromise[_0x1c7c('0x2f')](_0x569973);}return _0x45802e[_0x1c7c('0x30')]();};}function saveUpdates(_0x2acbca,_0x540b5d){return function(_0x2b0f42){if(_0x2b0f42){return _0x2b0f42['update'](_0x2acbca)['then'](function(_0x27030c){return _0x27030c;});}return null;};}function removeEntity(_0x5f19f3,_0x48c501){return function(_0x5a4abf){if(_0x5a4abf){return _0x5a4abf[_0x1c7c('0x31')]()[_0x1c7c('0x1d')](function(){_0x5f19f3[_0x1c7c('0x2b')](0xcc)['end']();});}};}function handleEntityNotFound(_0x3d2b0b,_0x1ae327){return function(_0x2e832d){if(!_0x2e832d){_0x3d2b0b[_0x1c7c('0x32')](0x194);}return _0x2e832d;};}function handleError(_0x3a7107,_0x101e24){_0x101e24=_0x101e24||0x1f4;return function(_0x1800c3){logger['error'](_0x1800c3[_0x1c7c('0x33')]);if(_0x1800c3[_0x1c7c('0x34')]){delete _0x1800c3[_0x1c7c('0x34')];}_0x3a7107[_0x1c7c('0x2b')](_0x101e24)[_0x1c7c('0x35')](_0x1800c3);};}exports['index']=function(_0x2f9132,_0x2e70c4){var _0x1e681a={},_0x2cc99a={},_0x24588c={'count':0x0,'rows':[]};var _0x31476f=_['map'](db['WhatsappMessage']['rawAttributes'],function(_0x2d9899){return{'name':_0x2d9899['fieldName'],'type':_0x2d9899[_0x1c7c('0x36')][_0x1c7c('0x37')]};});_0x2cc99a['model']=_[_0x1c7c('0x38')](_0x31476f,'name');_0x2cc99a['query']=_[_0x1c7c('0x39')](_0x2f9132[_0x1c7c('0x3a')]);_0x2cc99a[_0x1c7c('0x3b')]=_[_0x1c7c('0x3c')](_0x2cc99a[_0x1c7c('0x3d')],_0x2cc99a[_0x1c7c('0x3a')]);_0x1e681a[_0x1c7c('0x3e')]=_[_0x1c7c('0x3c')](_0x2cc99a[_0x1c7c('0x3d')],qs['fields'](_0x2f9132[_0x1c7c('0x3a')][_0x1c7c('0x3f')]));_0x1e681a['attributes']=_0x1e681a[_0x1c7c('0x3e')][_0x1c7c('0x40')]?_0x1e681a[_0x1c7c('0x3e')]:_0x2cc99a[_0x1c7c('0x3d')];if(!_0x2f9132['query'][_0x1c7c('0x41')](_0x1c7c('0x42'))){_0x1e681a[_0x1c7c('0x29')]=qs['limit'](_0x2f9132[_0x1c7c('0x3a')][_0x1c7c('0x29')]);_0x1e681a[_0x1c7c('0x27')]=qs[_0x1c7c('0x27')](_0x2f9132[_0x1c7c('0x3a')][_0x1c7c('0x27')]);}_0x1e681a[_0x1c7c('0x43')]=qs[_0x1c7c('0x44')](_0x2f9132[_0x1c7c('0x3a')]['sort']);_0x1e681a[_0x1c7c('0x45')]=qs[_0x1c7c('0x3b')](_['pick'](_0x2f9132['query'],_0x2cc99a[_0x1c7c('0x3b')]),_0x31476f);if(_0x2f9132['query'][_0x1c7c('0x46')]){_0x1e681a['where']=_['merge'](_0x1e681a[_0x1c7c('0x45')],{'$or':_[_0x1c7c('0x38')](_0x31476f,function(_0x1568d9){if(_0x1568d9['type']!==_0x1c7c('0x47')){var _0x18bc7f={};_0x18bc7f[_0x1568d9[_0x1c7c('0x34')]]={'$like':'%'+_0x2f9132[_0x1c7c('0x3a')]['filter']+'%'};return _0x18bc7f;}})});}_0x1e681a=_[_0x1c7c('0x48')]({},_0x1e681a,_0x2f9132['options']);var _0x1e1d61={'where':_0x1e681a[_0x1c7c('0x45')]};return db['WhatsappMessage']['count'](_0x1e1d61)[_0x1c7c('0x1d')](function(_0xa3932a){_0x24588c['count']=_0xa3932a;if(_0x2f9132[_0x1c7c('0x3a')][_0x1c7c('0x49')]){_0x1e681a['include']=[{'all':!![]}];}return db['WhatsappMessage'][_0x1c7c('0x4a')](_0x1e681a);})[_0x1c7c('0x1d')](function(_0x19258d){_0x24588c[_0x1c7c('0x4b')]=_0x19258d;return _0x24588c;})['then'](respondWithFilteredResult(_0x2e70c4,_0x1e681a))[_0x1c7c('0x4c')](handleError(_0x2e70c4,null));};exports[_0x1c7c('0x4d')]=function(_0x16af63,_0x267496){var _0x4149d0={'raw':!![],'where':{'id':_0x16af63[_0x1c7c('0x4e')]['id']}},_0x167bfd={};_0x167bfd[_0x1c7c('0x3d')]=_['keys'](db[_0x1c7c('0x4f')][_0x1c7c('0x50')]);_0x167bfd[_0x1c7c('0x3a')]=_[_0x1c7c('0x39')](_0x16af63['query']);_0x167bfd[_0x1c7c('0x3b')]=_[_0x1c7c('0x3c')](_0x167bfd['model'],_0x167bfd[_0x1c7c('0x3a')]);_0x4149d0[_0x1c7c('0x3e')]=_[_0x1c7c('0x3c')](_0x167bfd[_0x1c7c('0x3d')],qs[_0x1c7c('0x3f')](_0x16af63['query'][_0x1c7c('0x3f')]));_0x4149d0[_0x1c7c('0x3e')]=_0x4149d0['attributes'][_0x1c7c('0x40')]?_0x4149d0[_0x1c7c('0x3e')]:_0x167bfd[_0x1c7c('0x3d')];if(_0x16af63[_0x1c7c('0x3a')][_0x1c7c('0x49')]){_0x4149d0[_0x1c7c('0x51')]=[{'all':!![]}];}_0x4149d0=_['merge']({},_0x4149d0,_0x16af63[_0x1c7c('0x52')]);return db[_0x1c7c('0x4f')]['find'](_0x4149d0)[_0x1c7c('0x1d')](handleEntityNotFound(_0x267496,null))[_0x1c7c('0x1d')](respondWithResult(_0x267496,null))[_0x1c7c('0x4c')](handleError(_0x267496,null));};exports[_0x1c7c('0x53')]=function(_0x1f5fc0,_0x4920d8){return db[_0x1c7c('0x4f')][_0x1c7c('0x53')](_0x1f5fc0[_0x1c7c('0x54')],{})[_0x1c7c('0x1d')](respondWithResult(_0x4920d8,0xc9))[_0x1c7c('0x4c')](handleError(_0x4920d8,null));};exports['update']=function(_0x25bb01,_0x4629b7){if(_0x25bb01[_0x1c7c('0x54')]['id']){delete _0x25bb01[_0x1c7c('0x54')]['id'];}return db[_0x1c7c('0x4f')][_0x1c7c('0x55')]({'where':{'id':_0x25bb01['params']['id']}})[_0x1c7c('0x1d')](handleEntityNotFound(_0x4629b7,null))[_0x1c7c('0x1d')](saveUpdates(_0x25bb01['body'],null))[_0x1c7c('0x1d')](respondWithResult(_0x4629b7,null))[_0x1c7c('0x4c')](handleError(_0x4629b7,null));};exports[_0x1c7c('0x31')]=function(_0x5cfe90,_0x12d283){return db[_0x1c7c('0x4f')][_0x1c7c('0x55')]({'where':{'id':_0x5cfe90[_0x1c7c('0x4e')]['id']}})[_0x1c7c('0x1d')](handleEntityNotFound(_0x12d283,null))[_0x1c7c('0x1d')](removeEntity(_0x12d283,null))[_0x1c7c('0x4c')](handleError(_0x12d283,null));};exports[_0x1c7c('0x56')]=function(_0x340a4b,_0x480547){return db[_0x1c7c('0x4f')][_0x1c7c('0x56')]()[_0x1c7c('0x1d')](respondWithResult(_0x480547,null))[_0x1c7c('0x4c')](handleError(_0x480547,null));};var interaction_log=require(_0x1c7c('0x12'))(_0x1c7c('0x57'));exports[_0x1c7c('0x58')]=function(_0x4efb41,_0x440b8b,_0x3c69f5){var _0x331c83={'agent':{},'channel':_0x1c7c('0x59')};if(_0x4efb41[_0x1c7c('0x54')]['id']){delete _0x4efb41[_0x1c7c('0x54')]['id'];}_0x4efb41[_0x1c7c('0x54')][_0x1c7c('0x5a')]=!![];_0x4efb41[_0x1c7c('0x54')][_0x1c7c('0x5b')]=moment()[_0x1c7c('0x5c')](_0x1c7c('0x5d'));_0x4efb41[_0x1c7c('0x54')][_0x1c7c('0x5e')]=_0x4efb41[_0x1c7c('0x54')]['UserId']||_0x4efb41['user']['id'];_0x331c83[_0x1c7c('0x5f')]['id']=_0x4efb41['body'][_0x1c7c('0x5e')];return db[_0x1c7c('0x4f')][_0x1c7c('0x55')]({'where':{'id':_0x4efb41[_0x1c7c('0x4e')]['id'],'UserId':null}})[_0x1c7c('0x1d')](handleEntityNotFound(_0x440b8b,null))[_0x1c7c('0x1d')](saveUpdates(_0x4efb41[_0x1c7c('0x54')],null))[_0x1c7c('0x1d')](function(_0x2a536f){if(_0x2a536f){_0x331c83['message']=_0x2a536f[_0x1c7c('0x60')]({'plain':!![]});return db['WhatsappInteraction'][_0x1c7c('0x55')]({'where':{'id':_0x2a536f[_0x1c7c('0x61')]}});}return null;})[_0x1c7c('0x1d')](handleEntityNotFound(_0x440b8b,null))[_0x1c7c('0x1d')](function(_0x139275){if(_0x139275){return _0x139275[_0x1c7c('0x62')]({'UserId':_0x4efb41[_0x1c7c('0x54')][_0x1c7c('0x5e')],'read1stAt':_['isNil'](_0x139275[_0x1c7c('0x63')])?moment()[_0x1c7c('0x5c')](_0x1c7c('0x5d')):undefined});}return null;})[_0x1c7c('0x1d')](function(_0x3297da){if(_0x3297da){_0x331c83[_0x1c7c('0x64')]=_0x3297da[_0x1c7c('0x60')]({'plain':!![]});interaction_log['info']('[WHATSAPPMESSAGE:ACCEPT]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s',_0x4efb41[_0x1c7c('0x65')]['id'],_0x4efb41['user'][_0x1c7c('0x34')],_0x4efb41['user'][_0x1c7c('0x66')],_0x331c83[_0x1c7c('0x64')]['id'],_0x4efb41[_0x1c7c('0x54')]?JSON[_0x1c7c('0x22')](_0x4efb41[_0x1c7c('0x54')]):_0x1c7c('0x67'));return respondWithRpcPromise(_0x1c7c('0x68'),_0x1c7c('0x69'),_0x331c83);}return null;})[_0x1c7c('0x1d')](function(_0xf820f1){var _0x24b669=_0x1c7c('0x6a')+_0xf820f1[_0x1c7c('0x25')][_0x1c7c('0x6b')];return db[_0x1c7c('0x6c')][_0x1c7c('0x3a')](_0x24b669,{'type':db[_0x1c7c('0x6d')][_0x1c7c('0x6e')][_0x1c7c('0x6f')],'raw':!![]})[_0x1c7c('0x1d')](function(_0x149899){return _0x149899;});})[_0x1c7c('0x1d')](function(_0x14fcc7){if(_0x14fcc7){_0x331c83['message'][_0x1c7c('0x70')]=_0x14fcc7[0x0];if(!_0x4efb41[_0x1c7c('0x54')][_0x1c7c('0x5e')])return;return db[_0x1c7c('0x71')][_0x1c7c('0x55')]({'where':{'id':_0x4efb41['body'][_0x1c7c('0x5e')],'role':_0x1c7c('0x5f')},'attributes':['id',_0x1c7c('0x34'),'fullname',_0x1c7c('0x72'),_0x1c7c('0x73')],'raw':!![]});}return null;})[_0x1c7c('0x1d')](function(_0x3ec44a){if(!_0x3ec44a)return null;_0x331c83[_0x1c7c('0x25')]['agent']=_0x3ec44a;return _0x331c83;})[_0x1c7c('0x1d')](function(_0x632926){if(_0x632926){if(_0x4efb41[_0x1c7c('0x54')][_0x1c7c('0x74')]){_0x331c83[_0x1c7c('0x25')]['interface']=util[_0x1c7c('0x5c')]('SIP/%s',_0x4efb41[_0x1c7c('0x65')][_0x1c7c('0x34')]);_0x331c83[_0x1c7c('0x25')][_0x1c7c('0x75')]=_0x331c83[_0x1c7c('0x75')];_0x331c83[_0x1c7c('0x25')][_0x1c7c('0x76')]=_0x331c83['channel'];_0x331c83[_0x1c7c('0x25')][_0x1c7c('0x77')]=_0x1c7c('0x58');return respondWithRpcPromise(_0x1c7c('0x78'),'EventManager',{'event':_0x1c7c('0x79'),'message':_0x331c83['message']},client9002)[_0x1c7c('0x1d')](function(){return _0x331c83;});}return _0x331c83;}return null;})['then'](respondWithResult(_0x440b8b,null))['catch'](handleError(_0x440b8b,null));};var interaction_log=require(_0x1c7c('0x12'))(_0x1c7c('0x57'));exports['reject']=function(_0x4f9322,_0x35e046,_0x3c4236){var _0x25645e={'agent':{},'channel':_0x1c7c('0x59')};if(_0x4f9322['body']['id']){delete _0x4f9322['body']['id'];}_0x4f9322[_0x1c7c('0x54')][_0x1c7c('0x5e')]=_0x4f9322[_0x1c7c('0x54')]['UserId']||_0x4f9322[_0x1c7c('0x65')]['id'];_0x25645e[_0x1c7c('0x5f')]['id']=_0x4f9322[_0x1c7c('0x54')][_0x1c7c('0x5e')];return db[_0x1c7c('0x4f')][_0x1c7c('0x55')]({'where':{'id':_0x4f9322['params']['id'],'UserId':null}})[_0x1c7c('0x1d')](handleEntityNotFound(_0x35e046,null))['then'](function(_0x505e6e){if(_0x505e6e){_0x25645e[_0x1c7c('0x25')]=_0x505e6e[_0x1c7c('0x60')]({'plain':!![]});return db[_0x1c7c('0x7a')]['find']({'where':{'id':_0x505e6e[_0x1c7c('0x61')]}});}return null;})[_0x1c7c('0x1d')](handleEntityNotFound(_0x35e046,null))[_0x1c7c('0x1d')](function(_0x117a7d){if(_0x117a7d){_0x25645e['interaction']=_0x117a7d[_0x1c7c('0x60')]({'plain':!![]});interaction_log[_0x1c7c('0x1e')](_0x1c7c('0x7b'),_0x4f9322[_0x1c7c('0x65')]['id'],_0x4f9322['user'][_0x1c7c('0x34')],_0x4f9322[_0x1c7c('0x65')][_0x1c7c('0x66')],_0x25645e[_0x1c7c('0x64')]['id'],_0x4f9322[_0x1c7c('0x54')]?JSON[_0x1c7c('0x22')](_0x4f9322[_0x1c7c('0x54')]):_0x1c7c('0x67'));return respondWithRpcPromise('RejectMessage',_0x1c7c('0x7c'),_0x25645e);}return null;})[_0x1c7c('0x1d')](function(_0x52e696){var _0x5ddcc1=_0x1c7c('0x6a')+_0x52e696[_0x1c7c('0x25')][_0x1c7c('0x6b')];return db[_0x1c7c('0x6c')]['query'](_0x5ddcc1,{'type':db[_0x1c7c('0x6d')][_0x1c7c('0x6e')]['SELECT'],'raw':!![]})[_0x1c7c('0x1d')](function(_0x25fe88){return _0x25fe88;});})[_0x1c7c('0x1d')](function(_0x8b953a){if(_0x8b953a){_0x25645e[_0x1c7c('0x25')][_0x1c7c('0x70')]=_0x8b953a[0x0];if(!_0x4f9322[_0x1c7c('0x54')]['UserId'])return;return db['User'][_0x1c7c('0x55')]({'where':{'id':_0x4f9322[_0x1c7c('0x54')]['UserId'],'role':_0x1c7c('0x5f')},'attributes':['id','name',_0x1c7c('0x7d'),_0x1c7c('0x72'),'internal'],'raw':!![]});}return null;})['then'](function(_0x10461d){if(!_0x10461d)return null;_0x25645e['message'][_0x1c7c('0x5f')]=_0x10461d;return _0x25645e;})[_0x1c7c('0x1d')](function(_0x206596){if(_0x206596){_0x206596[_0x1c7c('0x25')][_0x1c7c('0x7e')]=util[_0x1c7c('0x5c')]('SIP/%s',_0x4f9322[_0x1c7c('0x65')][_0x1c7c('0x34')]);_0x206596[_0x1c7c('0x25')][_0x1c7c('0x75')]=_0x25645e[_0x1c7c('0x75')];_0x206596[_0x1c7c('0x25')][_0x1c7c('0x76')]=_0x25645e[_0x1c7c('0x75')];_0x206596[_0x1c7c('0x25')]['event']=_0x1c7c('0x2f');respondWithRpcPromise(_0x1c7c('0x78'),_0x1c7c('0x78'),{'event':_0x1c7c('0x7f'),'message':_0x206596['message']},client9002);return _0x25645e;}return null;})['then'](respondWithResult(_0x35e046,null))['catch'](handleError(_0x35e046,null));};exports[_0x1c7c('0x2b')]=function(_0xaf0e4d,_0x445b88,_0x5081d9){if(_0xaf0e4d[_0x1c7c('0x54')]['id']){delete _0xaf0e4d[_0x1c7c('0x54')]['id'];}var _0x240022;return db[_0x1c7c('0x4f')][_0x1c7c('0x55')]({'where':{'id':_0xaf0e4d['params']['id']}})[_0x1c7c('0x1d')](handleEntityNotFound(_0x445b88,null))[_0x1c7c('0x1d')](function(_0x4e4d29){if(_0x4e4d29){_0x240022=_0x4e4d29;return db[_0x1c7c('0x80')][_0x1c7c('0x55')]({'where':{'id':_0x4e4d29[_0x1c7c('0x81')]}});}})['then'](handleEntityNotFound(_0x445b88,null))[_0x1c7c('0x1d')](function(_0x594cb3){if(_0x594cb3){logger[_0x1c7c('0x20')](_0x1c7c('0x82'),_0x1c7c('0x2b'),_0x1c7c('0x83'),_0x594cb3[_0x1c7c('0x36')],util[_0x1c7c('0x84')](_0xaf0e4d['body'],{'showHidden':![],'depth':null}));switch(_0x594cb3['type']){case _0x1c7c('0x85'):if(_0xaf0e4d[_0x1c7c('0x54')][_0x1c7c('0x86')]&&_0xaf0e4d[_0x1c7c('0x54')][_0x1c7c('0x86')]===_0x240022[_0x1c7c('0x87')]&&_0xaf0e4d[_0x1c7c('0x54')]['MessageStatus']&&_0xaf0e4d[_0x1c7c('0x54')][_0x1c7c('0x88')]===_0x1c7c('0x5a')){return _0x240022[_0x1c7c('0x62')]({'read':!![]});}else{logger[_0x1c7c('0x23')](_0x1c7c('0x89'),_0x1c7c('0x2b'),_0x1c7c('0x85'),util['inspect'](_0xaf0e4d['body'],{'showHidden':![],'depth':null}));}break;}return _0x240022;}})[_0x1c7c('0x1d')](respondWithResult(_0x445b88,null))[_0x1c7c('0x4c')](handleError(_0x445b88,null));};
\ No newline at end of file
index 70b75cf..58bf8d1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe493=['save','remove','emit','hasOwnProperty','hook','exports','events','../../mysqldb','WhatsappMessage','setMaxListeners'];(function(_0x4b055c,_0x4b870b){var _0x4b62bb=function(_0x4884c2){while(--_0x4884c2){_0x4b055c['push'](_0x4b055c['shift']());}};_0x4b62bb(++_0x4b870b);}(_0xe493,0x7e));var _0x3e49=function(_0x287d2e,_0x3c8166){_0x287d2e=_0x287d2e-0x0;var _0x36370b=_0xe493[_0x287d2e];return _0x36370b;};'use strict';var EventEmitter=require(_0x3e49('0x0'));var WhatsappMessage=require(_0x3e49('0x1'))['db'][_0x3e49('0x2')];var WhatsappMessageEvents=new EventEmitter();WhatsappMessageEvents[_0x3e49('0x3')](0x0);var events={'afterCreate':_0x3e49('0x4'),'afterUpdate':'update','afterDestroy':_0x3e49('0x5')};function emitEvent(_0xb4d15e){return function(_0x4c0fa2,_0x43fb5e,_0x5e036c){WhatsappMessageEvents[_0x3e49('0x6')](_0xb4d15e+':'+_0x4c0fa2['id'],_0x4c0fa2);WhatsappMessageEvents[_0x3e49('0x6')](_0xb4d15e,_0x4c0fa2);_0x5e036c(null);};}for(var e in events){if(events[_0x3e49('0x7')](e)){var event=events[e];WhatsappMessage[_0x3e49('0x8')](e,emitEvent(event));}}module[_0x3e49('0x9')]=WhatsappMessageEvents;
\ No newline at end of file
+var _0x00b3=['../../mysqldb','WhatsappMessage','setMaxListeners','save','remove','emit','hasOwnProperty'];(function(_0x385359,_0x325c57){var _0x2ea4dd=function(_0x1bcf4f){while(--_0x1bcf4f){_0x385359['push'](_0x385359['shift']());}};_0x2ea4dd(++_0x325c57);}(_0x00b3,0x17a));var _0x300b=function(_0x50d391,_0x4894ef){_0x50d391=_0x50d391-0x0;var _0x3042d7=_0x00b3[_0x50d391];return _0x3042d7;};'use strict';var EventEmitter=require('events');var WhatsappMessage=require(_0x300b('0x0'))['db'][_0x300b('0x1')];var WhatsappMessageEvents=new EventEmitter();WhatsappMessageEvents[_0x300b('0x2')](0x0);var events={'afterCreate':_0x300b('0x3'),'afterUpdate':'update','afterDestroy':_0x300b('0x4')};function emitEvent(_0x534310){return function(_0x245c32,_0x524b8d,_0x1be801){WhatsappMessageEvents[_0x300b('0x5')](_0x534310+':'+_0x245c32['id'],_0x245c32);WhatsappMessageEvents[_0x300b('0x5')](_0x534310,_0x245c32);_0x1be801(null);};}for(var e in events){if(events[_0x300b('0x6')](e)){var event=events[e];WhatsappMessage['hook'](e,emitEvent(event));}}module['exports']=WhatsappMessageEvents;
\ No newline at end of file
index b9691cb..4b4e982 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf0e5=['sid','WhatsappMessage,\x20%s,\x20%s,\x20%s','afterCreate','inspect','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken','sinch','baseUrl','/whatsapp/v1/','text','POST','Bearer\x20','application/json','statuses','err','WhatsappMessage,\x20%s','finally','utf8mb4','lodash','util','../../config/logger','moment','bluebird','request-promise','node-fetch','path','rimraf','./whatsappMessage.attributes','exports','WhatsappMessage','whatsapp_messages','messageId','fti_whatsapp_messages','body','models','get','direction','toLowerCase','out','secret','UserId','WhatsappInteraction','findOne','then','createdAt','catch','error','WhatsappAccount','type','twilio','accountSid','authToken','phone','messages','create','whatsapp:','remote','/api/whatsapp/messages/','/status?token='];(function(_0x7a3247,_0x15cb12){var _0x1bfde5=function(_0x62bbef){while(--_0x62bbef){_0x7a3247['push'](_0x7a3247['shift']());}};_0x1bfde5(++_0x15cb12);}(_0xf0e5,0x133));var _0x5f0e=function(_0x376b45,_0x5964fb){_0x376b45=_0x376b45-0x0;var _0x2341b3=_0xf0e5[_0x376b45];return _0x2341b3;};'use strict';var _=require(_0x5f0e('0x0'));var util=require(_0x5f0e('0x1'));var logger=require(_0x5f0e('0x2'))('api');var moment=require(_0x5f0e('0x3'));var BPromise=require(_0x5f0e('0x4'));var rp=require(_0x5f0e('0x5'));var fetch=require(_0x5f0e('0x6'));var fs=require('fs');var path=require(_0x5f0e('0x7'));var rimraf=require(_0x5f0e('0x8'));var config=require('../../config/environment');var attributes=require(_0x5f0e('0x9'));module[_0x5f0e('0xa')]=function(_0x4c283b,_0x356d39){return _0x4c283b['define'](_0x5f0e('0xb'),attributes,{'tableName':_0x5f0e('0xc'),'paranoid':![],'indexes':[{'name':'messageId','fields':[_0x5f0e('0xd')]},{'name':_0x5f0e('0xe'),'fields':[_0x5f0e('0xf')],'type':'FULLTEXT'}],'timestamps':!![],'hooks':{'afterCreate':function(_0x423ecb,_0x17b2eb,_0x58b13c){var _0x56df39=_0x4c283b[_0x5f0e('0x10')];var _0x5c874f=_0x423ecb[_0x5f0e('0x11')]({'plain':!![]});if(_0x5c874f[_0x5f0e('0x12')]['toLowerCase']()==='in'||_0x5c874f[_0x5f0e('0x12')][_0x5f0e('0x13')]()===_0x5f0e('0x14')&&!_0x5c874f[_0x5f0e('0x15')]&&!_['isNil'](_0x5c874f[_0x5f0e('0x16')])){_0x56df39[_0x5f0e('0x17')][_0x5f0e('0x18')]({'where':{'id':_0x5c874f['WhatsappInteractionId']}})[_0x5f0e('0x19')](function(_0x2a7f5c){if(_0x2a7f5c){_0x2a7f5c['update']({'lastMsgAt':_0x5c874f[_0x5f0e('0x1a')],'lastMsgDirection':_0x5c874f['direction'][_0x5f0e('0x13')]()});}})[_0x5f0e('0x1b')](function(_0x191a4c){console[_0x5f0e('0x1c')](_0x191a4c);});}if(_0x5c874f[_0x5f0e('0x12')]===_0x5f0e('0x14')&&!_0x5c874f[_0x5f0e('0x15')]){var _0x27ec5f;_0x56df39[_0x5f0e('0x1d')]['find']({'where':{'id':_0x5c874f['WhatsappAccountId']},'raw':!![]})['then'](function(_0x5748eb){_0x27ec5f=_0x5748eb;if(_0x27ec5f&&_0x27ec5f[_0x5f0e('0x1e')]){switch(_0x27ec5f[_0x5f0e('0x1e')]){case'twilio':var _0x127774=require(_0x5f0e('0x1f'));if(_0x27ec5f[_0x5f0e('0x20')]&&_0x27ec5f[_0x5f0e('0x21')]&&_0x27ec5f[_0x5f0e('0x22')]){var _0x4f6280=new _0x127774(_0x27ec5f[_0x5f0e('0x20')],_0x27ec5f[_0x5f0e('0x21')]);_0x4f6280[_0x5f0e('0x23')][_0x5f0e('0x24')]({'body':_0x5c874f[_0x5f0e('0xf')],'to':_0x5f0e('0x25')+_0x5c874f[_0x5f0e('0x22')],'from':_0x5f0e('0x25')+_0x27ec5f['phone'],'statusCallback':_0x27ec5f[_0x5f0e('0x26')]+_0x5f0e('0x27')+_0x5c874f['id']+_0x5f0e('0x28')+_0x27ec5f['token']})[_0x5f0e('0x19')](function(_0x22ad27){if(_0x22ad27['sid']){return _0x423ecb['update']({'messageId':_0x22ad27[_0x5f0e('0x29')]});}})[_0x5f0e('0x1b')](function(_0x3c7ca6){logger[_0x5f0e('0x1c')](_0x5f0e('0x2a'),_0x5f0e('0x2b'),'twilio',util[_0x5f0e('0x2c')](_0x3c7ca6,{'showHidden':![],'depth':null}));});}else{logger[_0x5f0e('0x1c')](_0x5f0e('0x2a'),_0x5f0e('0x2b'),_0x5f0e('0x1f'),_0x5f0e('0x2d'));}break;case _0x5f0e('0x2e'):var _0x37c6dd=_0x27ec5f[_0x5f0e('0x20')];var _0x5f18e4=_0x27ec5f['authToken'];var _0x5429f9=_0x27ec5f[_0x5f0e('0x2f')]+_0x5f0e('0x30')+_0x37c6dd+'/messages/';var _0x5d76f3={'to':[_0x5c874f['phone']],'message':{'type':_0x5f0e('0x31'),'text':_0x5c874f[_0x5f0e('0xf')]}};var _0x1a3f1c={'method':_0x5f0e('0x32'),'uri':_0x5429f9,'headers':{'Authorization':_0x5f0e('0x33')+_0x5f18e4,'Content-Type':_0x5f0e('0x34')},'body':_0x5d76f3,'json':!![]};rp(_0x1a3f1c)[_0x5f0e('0x19')](function(_0x542388){if(_0x542388[_0x5f0e('0x35')][0x0]['message_id']){return _0x423ecb['update']({'messageId':_0x542388[_0x5f0e('0x35')][0x0]['message_id']});}})[_0x5f0e('0x1b')](function(_0x57104f){logger[_0x5f0e('0x36')](_0x5f0e('0x37'),_0x57104f);});break;}}})[_0x5f0e('0x38')](function(){_0x58b13c();});}else{_0x58b13c();}}},'charset':_0x5f0e('0x39'),'collate':'utf8mb4_unicode_ci'});};
\ No newline at end of file
+var _0x0799=['then','update','createdAt','error','secret','WhatsappAccount','find','WhatsappAccountId','type','twilio','phone','messages','whatsapp:','/api/whatsapp/messages/','/status?token=','token','sid','catch','WhatsappMessage,\x20%s,\x20%s,\x20%s','afterCreate','inspect','Missing\x20parameters:\x20phone,\x20accountSid\x20or\x20authToken','accountSid','authToken','text','POST','application/json','statuses','message_id','err','WhatsappMessage,\x20%s','finally','utf8mb4_unicode_ci','lodash','util','moment','rimraf','../../config/environment','exports','define','WhatsappMessage','messageId','fti_whatsapp_messages','body','FULLTEXT','get','direction','out','isNil','UserId','WhatsappInteraction','WhatsappInteractionId'];(function(_0x2f5c26,_0x23eee8){var _0x2fcfd8=function(_0x40fc09){while(--_0x40fc09){_0x2f5c26['push'](_0x2f5c26['shift']());}};_0x2fcfd8(++_0x23eee8);}(_0x0799,0x125));var _0x9079=function(_0x8b631b,_0x386724){_0x8b631b=_0x8b631b-0x0;var _0x3e6832=_0x0799[_0x8b631b];return _0x3e6832;};'use strict';var _=require(_0x9079('0x0'));var util=require(_0x9079('0x1'));var logger=require('../../config/logger')('api');var moment=require(_0x9079('0x2'));var BPromise=require('bluebird');var rp=require('request-promise');var fetch=require('node-fetch');var fs=require('fs');var path=require('path');var rimraf=require(_0x9079('0x3'));var config=require(_0x9079('0x4'));var attributes=require('./whatsappMessage.attributes');module[_0x9079('0x5')]=function(_0x3f6657,_0x490300){return _0x3f6657[_0x9079('0x6')](_0x9079('0x7'),attributes,{'tableName':'whatsapp_messages','paranoid':![],'indexes':[{'name':_0x9079('0x8'),'fields':[_0x9079('0x8')]},{'name':_0x9079('0x9'),'fields':[_0x9079('0xa')],'type':_0x9079('0xb')}],'timestamps':!![],'hooks':{'afterCreate':function(_0x330151,_0x4c5d83,_0x3ba3cf){var _0x5e1ee1=_0x3f6657['models'];var _0x564678=_0x330151[_0x9079('0xc')]({'plain':!![]});if(_0x564678[_0x9079('0xd')]['toLowerCase']()==='in'||_0x564678[_0x9079('0xd')]['toLowerCase']()===_0x9079('0xe')&&!_0x564678['secret']&&!_[_0x9079('0xf')](_0x564678[_0x9079('0x10')])){_0x5e1ee1[_0x9079('0x11')]['findOne']({'where':{'id':_0x564678[_0x9079('0x12')]}})[_0x9079('0x13')](function(_0x31b978){if(_0x31b978){_0x31b978[_0x9079('0x14')]({'lastMsgAt':_0x564678[_0x9079('0x15')],'lastMsgDirection':_0x564678[_0x9079('0xd')]['toLowerCase']()});}})['catch'](function(_0x227b4c){console[_0x9079('0x16')](_0x227b4c);});}if(_0x564678['direction']===_0x9079('0xe')&&!_0x564678[_0x9079('0x17')]){var _0x339b19;_0x5e1ee1[_0x9079('0x18')][_0x9079('0x19')]({'where':{'id':_0x564678[_0x9079('0x1a')]},'raw':!![]})[_0x9079('0x13')](function(_0x3c0197){_0x339b19=_0x3c0197;if(_0x339b19&&_0x339b19[_0x9079('0x1b')]){switch(_0x339b19[_0x9079('0x1b')]){case'twilio':var _0x382cfd=require(_0x9079('0x1c'));if(_0x339b19['accountSid']&&_0x339b19['authToken']&&_0x339b19[_0x9079('0x1d')]){var _0x10e8de=new _0x382cfd(_0x339b19['accountSid'],_0x339b19['authToken']);_0x10e8de[_0x9079('0x1e')]['create']({'body':_0x564678[_0x9079('0xa')],'to':_0x9079('0x1f')+_0x564678[_0x9079('0x1d')],'from':'whatsapp:'+_0x339b19[_0x9079('0x1d')],'statusCallback':_0x339b19['remote']+_0x9079('0x20')+_0x564678['id']+_0x9079('0x21')+_0x339b19[_0x9079('0x22')]})[_0x9079('0x13')](function(_0x38fbc7){if(_0x38fbc7[_0x9079('0x23')]){return _0x330151[_0x9079('0x14')]({'messageId':_0x38fbc7[_0x9079('0x23')]});}})[_0x9079('0x24')](function(_0x3354b7){logger[_0x9079('0x16')](_0x9079('0x25'),_0x9079('0x26'),'twilio',util[_0x9079('0x27')](_0x3354b7,{'showHidden':![],'depth':null}));});}else{logger[_0x9079('0x16')](_0x9079('0x25'),_0x9079('0x26'),_0x9079('0x1c'),_0x9079('0x28'));}break;case'sinch':var _0x2086d4=_0x339b19[_0x9079('0x29')];var _0x15d3a8=_0x339b19[_0x9079('0x2a')];var _0x355731=_0x339b19['baseUrl']+'/whatsapp/v1/'+_0x2086d4+'/messages/';var _0x5d833e={'to':[_0x564678['phone']],'message':{'type':_0x9079('0x2b'),'text':_0x564678['body']}};var _0xcbf3da={'method':_0x9079('0x2c'),'uri':_0x355731,'headers':{'Authorization':'Bearer\x20'+_0x15d3a8,'Content-Type':_0x9079('0x2d')},'body':_0x5d833e,'json':!![]};rp(_0xcbf3da)[_0x9079('0x13')](function(_0x434467){if(_0x434467[_0x9079('0x2e')][0x0][_0x9079('0x2f')]){return _0x330151[_0x9079('0x14')]({'messageId':_0x434467[_0x9079('0x2e')][0x0][_0x9079('0x2f')]});}})[_0x9079('0x24')](function(_0x19e844){logger[_0x9079('0x30')](_0x9079('0x31'),_0x19e844);});break;}}})[_0x9079('0x32')](function(){_0x3ba3cf();});}else{_0x3ba3cf();}}},'charset':'utf8mb4','collate':_0x9079('0x33')});};
\ No newline at end of file
index 1143a70..9747c0a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x46ac=['request\x20sent','debug','WhatsappMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','WhatsappMessage,\x20%s,\x20%s','message','result','catch','CreateWhatsappMessage','WhatsappMessage','create','options','lodash','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','jayson/promise','http','redis','defaults','localhost','socket.io-emitter','./whatsappMessage.socket','register','request','then','info'];(function(_0x2f02fe,_0x5e4a1){var _0x20514d=function(_0x55fbd5){while(--_0x55fbd5){_0x2f02fe['push'](_0x2f02fe['shift']());}};_0x20514d(++_0x5e4a1);}(_0x46ac,0xee));var _0xc46a=function(_0x5ade28,_0x73495f){_0x5ade28=_0x5ade28-0x0;var _0x3177be=_0x46ac[_0x5ade28];return _0x3177be;};'use strict';var _=require(_0xc46a('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0xc46a('0x1'));var rs=require(_0xc46a('0x2'));var fs=require('fs');var Redis=require(_0xc46a('0x3'));var db=require(_0xc46a('0x4'))['db'];var utils=require(_0xc46a('0x5'));var logger=require(_0xc46a('0x6'))('rpc');var config=require('../../config/environment');var jayson=require(_0xc46a('0x7'));var client=jayson['client'][_0xc46a('0x8')]({'port':0x232a});config[_0xc46a('0x9')]=_[_0xc46a('0xa')](config[_0xc46a('0x9')],{'host':_0xc46a('0xb'),'port':0x18eb});var socket=require(_0xc46a('0xc'))(new Redis(config['redis']));require(_0xc46a('0xd'))[_0xc46a('0xe')](socket);function respondWithRpcPromise(_0x5ed37d,_0x25456e,_0x559bea){return new BPromise(function(_0x16df27,_0x1449c4){return client[_0xc46a('0xf')](_0x5ed37d,_0x559bea)[_0xc46a('0x10')](function(_0x185654){logger[_0xc46a('0x11')]('WhatsappMessage,\x20%s,\x20%s',_0x25456e,_0xc46a('0x12'));logger[_0xc46a('0x13')](_0xc46a('0x14'),_0x25456e,_0xc46a('0x12'),JSON[_0xc46a('0x15')](_0x185654));if(_0x185654[_0xc46a('0x16')]){if(_0x185654['error'][_0xc46a('0x17')]===0x1f4){logger[_0xc46a('0x16')](_0xc46a('0x18'),_0x25456e,_0x185654['error'][_0xc46a('0x19')]);return _0x1449c4(_0x185654[_0xc46a('0x16')][_0xc46a('0x19')]);}logger[_0xc46a('0x16')]('WhatsappMessage,\x20%s,\x20%s',_0x25456e,_0x185654[_0xc46a('0x16')][_0xc46a('0x19')]);return _0x16df27(_0x185654[_0xc46a('0x16')]['message']);}else{logger['info'](_0xc46a('0x18'),_0x25456e,_0xc46a('0x12'));_0x16df27(_0x185654[_0xc46a('0x1a')][_0xc46a('0x19')]);}})[_0xc46a('0x1b')](function(_0x3dc552){logger['error'](_0xc46a('0x18'),_0x25456e,_0x3dc552);_0x1449c4(_0x3dc552);});});}exports[_0xc46a('0x1c')]=function(_0x45f2b1){var _0x48526a=this;return new Promise(function(_0x709d34,_0x2ddf33){return db[_0xc46a('0x1d')][_0xc46a('0x1e')](_0x45f2b1['body'],{'raw':_0x45f2b1[_0xc46a('0x1f')]?_0x45f2b1['options']['raw']===undefined?!![]:![]:!![]})[_0xc46a('0x10')](function(_0x1187ee){logger[_0xc46a('0x11')](_0xc46a('0x1c'),_0x45f2b1);logger[_0xc46a('0x13')](_0xc46a('0x1c'),_0x45f2b1,JSON[_0xc46a('0x15')](_0x1187ee));_0x709d34(_0x1187ee);})[_0xc46a('0x1b')](function(_0x1a1cba){logger[_0xc46a('0x16')](_0xc46a('0x1c'),_0x1a1cba[_0xc46a('0x19')],_0x45f2b1);_0x2ddf33(_0x48526a['error'](0x1f4,_0x1a1cba[_0xc46a('0x19')]));});});};
\ No newline at end of file
+var _0xd695=['WhatsappMessage','create','body','options','raw','lodash','bluebird','randomstring','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','socket.io-emitter','./whatsappMessage.socket','request','then','info','WhatsappMessage,\x20%s,\x20%s','request\x20sent','debug','WhatsappMessage,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','CreateWhatsappMessage'];(function(_0x49f813,_0x4c6aca){var _0x4ce981=function(_0x2cddc0){while(--_0x2cddc0){_0x49f813['push'](_0x49f813['shift']());}};_0x4ce981(++_0x4c6aca);}(_0xd695,0x65));var _0x5d69=function(_0x296923,_0x4adaed){_0x296923=_0x296923-0x0;var _0x29af70=_0xd695[_0x296923];return _0x29af70;};'use strict';var _=require(_0x5d69('0x0'));var util=require('util');var moment=require('moment');var BPromise=require(_0x5d69('0x1'));var rs=require(_0x5d69('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x5d69('0x3'))(_0x5d69('0x4'));var config=require(_0x5d69('0x5'));var jayson=require(_0x5d69('0x6'));var client=jayson[_0x5d69('0x7')][_0x5d69('0x8')]({'port':0x232a});config[_0x5d69('0x9')]=_[_0x5d69('0xa')](config[_0x5d69('0x9')],{'host':_0x5d69('0xb'),'port':0x18eb});var socket=require(_0x5d69('0xc'))(new Redis(config['redis']));require(_0x5d69('0xd'))['register'](socket);function respondWithRpcPromise(_0x111d78,_0x5d72b2,_0x5b22b9){return new BPromise(function(_0x2da155,_0x8dd04c){return client[_0x5d69('0xe')](_0x111d78,_0x5b22b9)[_0x5d69('0xf')](function(_0x3c6926){logger[_0x5d69('0x10')](_0x5d69('0x11'),_0x5d72b2,_0x5d69('0x12'));logger[_0x5d69('0x13')](_0x5d69('0x14'),_0x5d72b2,_0x5d69('0x12'),JSON[_0x5d69('0x15')](_0x3c6926));if(_0x3c6926[_0x5d69('0x16')]){if(_0x3c6926['error'][_0x5d69('0x17')]===0x1f4){logger[_0x5d69('0x16')]('WhatsappMessage,\x20%s,\x20%s',_0x5d72b2,_0x3c6926[_0x5d69('0x16')][_0x5d69('0x18')]);return _0x8dd04c(_0x3c6926[_0x5d69('0x16')]['message']);}logger[_0x5d69('0x16')](_0x5d69('0x11'),_0x5d72b2,_0x3c6926['error'][_0x5d69('0x18')]);return _0x2da155(_0x3c6926[_0x5d69('0x16')][_0x5d69('0x18')]);}else{logger['info'](_0x5d69('0x11'),_0x5d72b2,_0x5d69('0x12'));_0x2da155(_0x3c6926[_0x5d69('0x19')][_0x5d69('0x18')]);}})['catch'](function(_0x45814d){logger[_0x5d69('0x16')](_0x5d69('0x11'),_0x5d72b2,_0x45814d);_0x8dd04c(_0x45814d);});});}exports[_0x5d69('0x1a')]=function(_0x3b4600){var _0x1d7068=this;return new Promise(function(_0x697a5c,_0x3fa1eb){return db[_0x5d69('0x1b')][_0x5d69('0x1c')](_0x3b4600[_0x5d69('0x1d')],{'raw':_0x3b4600[_0x5d69('0x1e')]?_0x3b4600[_0x5d69('0x1e')][_0x5d69('0x1f')]===undefined?!![]:![]:!![]})[_0x5d69('0xf')](function(_0x42018a){logger['info'](_0x5d69('0x1a'),_0x3b4600);logger[_0x5d69('0x13')](_0x5d69('0x1a'),_0x3b4600,JSON[_0x5d69('0x15')](_0x42018a));_0x697a5c(_0x42018a);})['catch'](function(_0x2c6186){logger[_0x5d69('0x16')](_0x5d69('0x1a'),_0x2c6186[_0x5d69('0x18')],_0x3b4600);_0x3fa1eb(_0x1d7068[_0x5d69('0x16')](0x1f4,_0x2c6186[_0x5d69('0x18')]));});});};
\ No newline at end of file
index 0218854..02566e9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2bcf=['register','length','whatsappMessage:','./whatsappMessage.events','remove','emit','removeListener'];(function(_0x7dc938,_0x1f0abb){var _0x3109cd=function(_0x45b802){while(--_0x45b802){_0x7dc938['push'](_0x7dc938['shift']());}};_0x3109cd(++_0x1f0abb);}(_0x2bcf,0x13e));var _0xf2bc=function(_0x718f63,_0x13544f){_0x718f63=_0x718f63-0x0;var _0x3693f5=_0x2bcf[_0x718f63];return _0x3693f5;};'use strict';var WhatsappMessageEvents=require(_0xf2bc('0x0'));var events=['save',_0xf2bc('0x1'),'update'];function createListener(_0x28054c,_0x12e217){return function(_0x12e084){_0x12e217[_0xf2bc('0x2')](_0x28054c,_0x12e084);};}function removeListener(_0x94b45e,_0x468cef){return function(){WhatsappMessageEvents[_0xf2bc('0x3')](_0x94b45e,_0x468cef);};}exports[_0xf2bc('0x4')]=function(_0x3c56ee){for(var _0x5041c7=0x0,_0x21b004=events[_0xf2bc('0x5')];_0x5041c7<_0x21b004;_0x5041c7++){var _0xe3e399=events[_0x5041c7];var _0x52a256=createListener(_0xf2bc('0x6')+_0xe3e399,_0x3c56ee);WhatsappMessageEvents['on'](_0xe3e399,_0x52a256);}};
\ No newline at end of file
+var _0x8185=['length','whatsappMessage:','save','remove','update','removeListener'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x8185,0x1e2));var _0x5818=function(_0x53ccf2,_0x13cb67){_0x53ccf2=_0x53ccf2-0x0;var _0x5a2964=_0x8185[_0x53ccf2];return _0x5a2964;};'use strict';var WhatsappMessageEvents=require('./whatsappMessage.events');var events=[_0x5818('0x0'),_0x5818('0x1'),_0x5818('0x2')];function createListener(_0x12dc77,_0x1616c7){return function(_0x300de2){_0x1616c7['emit'](_0x12dc77,_0x300de2);};}function removeListener(_0x3ba6bf,_0x515336){return function(){WhatsappMessageEvents[_0x5818('0x3')](_0x3ba6bf,_0x515336);};}exports['register']=function(_0x3ecbc8){for(var _0x33af67=0x0,_0x141e9d=events[_0x5818('0x4')];_0x33af67<_0x141e9d;_0x33af67++){var _0x2ae4ec=events[_0x33af67];var _0x5b744=createListener(_0x5818('0x5')+_0x2ae4ec,_0x3ecbc8);WhatsappMessageEvents['on'](_0x2ae4ec,_0x5b744);}};
\ No newline at end of file
index c94616f..0a30051 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd08b=['/:id/members','getMembers','/:id/teams','post','create','addAgents','put','/:id','delete','removeTeams','/:id/users','removeAgents','exports','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','./whatsappQueue.controller','get','isAuthenticated','index','/describe','describe','show'];(function(_0xfb0cfd,_0x500179){var _0x2fd8aa=function(_0xccb501){while(--_0xccb501){_0xfb0cfd['push'](_0xfb0cfd['shift']());}};_0x2fd8aa(++_0x500179);}(_0xd08b,0xf5));var _0xbd08=function(_0xe7d561,_0x146cef){_0xe7d561=_0xe7d561-0x0;var _0x4c27f0=_0xd08b[_0xe7d561];return _0x4c27f0;};'use strict';var multer=require('multer');var util=require(_0xbd08('0x0'));var path=require(_0xbd08('0x1'));var timeout=require(_0xbd08('0x2'));var express=require(_0xbd08('0x3'));var router=express[_0xbd08('0x4')]();var fs_extra=require(_0xbd08('0x5'));var auth=require(_0xbd08('0x6'));var interaction=require(_0xbd08('0x7'));var config=require(_0xbd08('0x8'));var controller=require(_0xbd08('0x9'));router[_0xbd08('0xa')]('/',auth[_0xbd08('0xb')](),controller[_0xbd08('0xc')]);router['get'](_0xbd08('0xd'),auth[_0xbd08('0xb')](),controller[_0xbd08('0xe')]);router[_0xbd08('0xa')]('/:id',auth[_0xbd08('0xb')](),controller[_0xbd08('0xf')]);router['get'](_0xbd08('0x10'),auth['isAuthenticated'](),controller[_0xbd08('0x11')]);router[_0xbd08('0xa')](_0xbd08('0x12'),auth[_0xbd08('0xb')](),controller['getTeams']);router[_0xbd08('0xa')]('/:id/users',auth['isAuthenticated'](),controller['getAgents']);router[_0xbd08('0x13')]('/',auth[_0xbd08('0xb')](),controller[_0xbd08('0x14')]);router[_0xbd08('0x13')](_0xbd08('0x12'),auth[_0xbd08('0xb')](),controller['addTeams']);router['post']('/:id/users',auth['isAuthenticated'](),controller[_0xbd08('0x15')]);router[_0xbd08('0x16')](_0xbd08('0x17'),auth[_0xbd08('0xb')](),controller['update']);router[_0xbd08('0x18')]('/:id',auth[_0xbd08('0xb')](),controller['destroy']);router[_0xbd08('0x18')]('/:id/teams',auth[_0xbd08('0xb')](),controller[_0xbd08('0x19')]);router[_0xbd08('0x18')](_0xbd08('0x1a'),auth[_0xbd08('0xb')](),controller[_0xbd08('0x1b')]);module[_0xbd08('0x1c')]=router;
\ No newline at end of file
+var _0x6c99=['destroy','delete','removeTeams','removeAgents','exports','multer','path','../../components/interaction/service','../../config/environment','./whatsappQueue.controller','get','index','/describe','isAuthenticated','describe','getMembers','/:id/teams','getTeams','/:id/users','getAgents','create','post','addAgents','update','/:id'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6c99,0x9b));var _0x96c9=function(_0x5b740b,_0x381833){_0x5b740b=_0x5b740b-0x0;var _0x6f8f4e=_0x6c99[_0x5b740b];return _0x6f8f4e;};'use strict';var multer=require(_0x96c9('0x0'));var util=require('util');var path=require(_0x96c9('0x1'));var timeout=require('connect-timeout');var express=require('express');var router=express['Router']();var fs_extra=require('fs-extra');var auth=require('../../components/auth/service');var interaction=require(_0x96c9('0x2'));var config=require(_0x96c9('0x3'));var controller=require(_0x96c9('0x4'));router[_0x96c9('0x5')]('/',auth['isAuthenticated'](),controller[_0x96c9('0x6')]);router[_0x96c9('0x5')](_0x96c9('0x7'),auth[_0x96c9('0x8')](),controller[_0x96c9('0x9')]);router['get']('/:id',auth[_0x96c9('0x8')](),controller['show']);router[_0x96c9('0x5')]('/:id/members',auth[_0x96c9('0x8')](),controller[_0x96c9('0xa')]);router[_0x96c9('0x5')](_0x96c9('0xb'),auth['isAuthenticated'](),controller[_0x96c9('0xc')]);router[_0x96c9('0x5')](_0x96c9('0xd'),auth[_0x96c9('0x8')](),controller[_0x96c9('0xe')]);router['post']('/',auth[_0x96c9('0x8')](),controller[_0x96c9('0xf')]);router[_0x96c9('0x10')](_0x96c9('0xb'),auth['isAuthenticated'](),controller['addTeams']);router[_0x96c9('0x10')](_0x96c9('0xd'),auth[_0x96c9('0x8')](),controller[_0x96c9('0x11')]);router['put']('/:id',auth['isAuthenticated'](),controller[_0x96c9('0x12')]);router['delete'](_0x96c9('0x13'),auth['isAuthenticated'](),controller[_0x96c9('0x14')]);router[_0x96c9('0x15')](_0x96c9('0xb'),auth[_0x96c9('0x8')](),controller[_0x96c9('0x16')]);router['delete'](_0x96c9('0xd'),auth['isAuthenticated'](),controller[_0x96c9('0x17')]);module[_0x96c9('0x18')]=router;
\ No newline at end of file
index 3ad023f..0d4f276 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xde56=['ENUM','rrmemory','beepall','roundrobin','sequelize','STRING','name','INTEGER'];(function(_0x3813ad,_0x2eff01){var _0x16ed55=function(_0x406204){while(--_0x406204){_0x3813ad['push'](_0x3813ad['shift']());}};_0x16ed55(++_0x2eff01);}(_0xde56,0x144));var _0x6de5=function(_0x59eefb,_0x2151ce){_0x59eefb=_0x59eefb-0x0;var _0x1a49e8=_0xde56[_0x59eefb];return _0x1a49e8;};'use strict';var Sequelize=require(_0x6de5('0x0'));module['exports']={'name':{'type':Sequelize[_0x6de5('0x1')],'unique':_0x6de5('0x2'),'validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'timeout':{'type':Sequelize[_0x6de5('0x3')],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0x6de5('0x4')](_0x6de5('0x5'),_0x6de5('0x6'),_0x6de5('0x7'))},'description':{'type':Sequelize[_0x6de5('0x1')]}};
\ No newline at end of file
+var _0x68fc=['sequelize','exports','STRING','ENUM','beepall'];(function(_0x55f8ec,_0x29fb1b){var _0x554159=function(_0x2af2c8){while(--_0x2af2c8){_0x55f8ec['push'](_0x55f8ec['shift']());}};_0x554159(++_0x29fb1b);}(_0x68fc,0xa5));var _0xc68f=function(_0x1d1513,_0x12f516){_0x1d1513=_0x1d1513-0x0;var _0x191d53=_0x68fc[_0x1d1513];return _0x191d53;};'use strict';var Sequelize=require(_0xc68f('0x0'));module[_0xc68f('0x1')]={'name':{'type':Sequelize[_0xc68f('0x2')],'unique':'name','validate':{'notEmpty':!![],'is':/^[A-Za-z0-9\.\_]+$/i}},'timeout':{'type':Sequelize['INTEGER'],'validate':{'min':0x1,'max':0x20c49b}},'strategy':{'type':Sequelize[_0xc68f('0x3')]('rrmemory',_0xc68f('0x4'),'roundrobin')},'description':{'type':Sequelize['STRING']}};
\ No newline at end of file
index 14bff82..d621b6e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf8d2=['Agents','online','voicePause','interface','flatMap','sequelize','transaction','addTeams','each','findOrCreate','emit','userWhatsappQueue:save','removeTeams','field','tq.TeamId','from','team_has_whatsapp_queues','join','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','ut.UserId\x20=\x20?','toString','SELECT','includes','all','compact','removeAgents','forEach','userWhatsappQueue:remove','addAgents','omit','spread','isArray','getAgents','bluebird','util','lodash','../../components/parsers/qs','../../config/logger','../../config/environment','redis','defaults','localhost','./whatsappQueue.socket','register','sendStatus','status','end','offset','count','set','Content-Range','json','update','then','destroy','get','WhatsappQueues','error','stack','name','send','rawAttributes','fieldName','type','key','getOptions','include','query','WhatsappQueue','findAll','rows','catch','show','params','model','keys','filters','intersection','fields','attributes','includeAll','merge','options','create','body','Unable\x20to\x20retrieve\x20the\x20current\x20user','user','UserProfileSection','find','userProfileId','autoAssociation','UserProfileResource','Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s','describe','getMembers','length','hasOwnProperty','nolimit','limit','sort','where','pick','WhatsappQueueId','filter','User','findAndCountAll','map','UserId','agent','whatsappPause','updatedAt','createdAt','format','%s/%s','SIP','findOne','Team','order','getTeams','ids'];(function(_0x2d6660,_0x32e8e9){var _0x378484=function(_0x4d10df){while(--_0x4d10df){_0x2d6660['push'](_0x2d6660['shift']());}};_0x378484(++_0x32e8e9);}(_0xf8d2,0x114));var _0x2f8d=function(_0x255bd2,_0x1c20bc){_0x255bd2=_0x255bd2-0x0;var _0x5061f6=_0xf8d2[_0x255bd2];return _0x5061f6;};'use strict';var BPromise=require(_0x2f8d('0x0'));var util=require(_0x2f8d('0x1'));var _=require(_0x2f8d('0x2'));var squel=require('squel');var Redis=require('ioredis');var qs=require(_0x2f8d('0x3'));var logger=require(_0x2f8d('0x4'))('api');var config=require(_0x2f8d('0x5'));var db=require('../../mysqldb')['db'];config[_0x2f8d('0x6')]=_[_0x2f8d('0x7')](config['redis'],{'host':_0x2f8d('0x8'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config['redis']));require(_0x2f8d('0x9'))[_0x2f8d('0xa')](socket);function respondWithStatusCode(_0x500418,_0x50ff9e){_0x50ff9e=_0x50ff9e||0xcc;return function(_0x2e8628){if(_0x2e8628){return _0x500418[_0x2f8d('0xb')](_0x50ff9e);}return _0x500418[_0x2f8d('0xc')](_0x50ff9e)[_0x2f8d('0xd')]();};}function respondWithResult(_0x1fbcd9,_0x360374){_0x360374=_0x360374||0xc8;return function(_0x236c99){if(_0x236c99){return _0x1fbcd9['status'](_0x360374)['json'](_0x236c99);}};}function respondWithFilteredResult(_0x3ad18e,_0x20f2aa){return function(_0x137186){if(_0x137186){var _0x3c1aa6=typeof _0x20f2aa[_0x2f8d('0xe')]==='undefined'&&typeof _0x20f2aa['limit']==='undefined';var _0x3253d3=_0x137186[_0x2f8d('0xf')];var _0x2df749=_0x3c1aa6?0x0:_0x20f2aa[_0x2f8d('0xe')];var _0x4aa931=_0x3c1aa6?_0x137186[_0x2f8d('0xf')]:_0x20f2aa[_0x2f8d('0xe')]+_0x20f2aa['limit'];var _0x5adcf4;if(_0x4aa931>=_0x3253d3){_0x4aa931=_0x3253d3;_0x5adcf4=0xc8;}else{_0x5adcf4=0xce;}_0x3ad18e['status'](_0x5adcf4);return _0x3ad18e[_0x2f8d('0x10')](_0x2f8d('0x11'),_0x2df749+'-'+_0x4aa931+'/'+_0x3253d3)[_0x2f8d('0x12')](_0x137186);}return null;};}function saveUpdates(_0x216104){return function(_0x3d1430){if(_0x3d1430){return _0x3d1430[_0x2f8d('0x13')](_0x216104)[_0x2f8d('0x14')](function(_0xacdd91){return _0xacdd91;});}return null;};}function removeEntity(_0x12b1a8){return function(_0x1799c6){if(_0x1799c6){return _0x1799c6[_0x2f8d('0x15')]()[_0x2f8d('0x14')](function(){var _0x22d133=_0x1799c6[_0x2f8d('0x16')]({'plain':!![]});var _0x453022=_0x2f8d('0x17');return db['UserProfileResource'][_0x2f8d('0x15')]({'where':{'type':_0x453022,'resourceId':_0x22d133['id']}})[_0x2f8d('0x14')](function(){return _0x1799c6;});})[_0x2f8d('0x14')](function(){_0x12b1a8[_0x2f8d('0xc')](0xcc)['end']();});}};}function handleEntityNotFound(_0x1e8d4c){return function(_0x3986cf){if(!_0x3986cf){_0x1e8d4c[_0x2f8d('0xb')](0x194);}return _0x3986cf;};}function handleError(_0x2e2124,_0x39c96b){_0x39c96b=_0x39c96b||0x1f4;return function(_0x4676d8){logger[_0x2f8d('0x18')](_0x4676d8[_0x2f8d('0x19')]);if(_0x4676d8[_0x2f8d('0x1a')]){delete _0x4676d8[_0x2f8d('0x1a')];}_0x2e2124[_0x2f8d('0xc')](_0x39c96b)[_0x2f8d('0x1b')](_0x4676d8);};}exports['index']=function(_0xd3d3ad,_0xd8b6a7){var _0x539459={};var _0x5b38bf={'count':0x0,'rows':[]};var _0xfc1dad=_['map'](db['WhatsappQueue'][_0x2f8d('0x1c')],function(_0x475cad){return{'name':_0x475cad[_0x2f8d('0x1d')],'type':_0x475cad[_0x2f8d('0x1e')][_0x2f8d('0x1f')]};});_0x539459=qs[_0x2f8d('0x20')](_0xfc1dad,_0xd3d3ad);var _0x1b69b9={'where':_0x539459['where']};return db['WhatsappQueue'][_0x2f8d('0xf')](_0x1b69b9)[_0x2f8d('0x14')](function(_0x4f61f7){_0x5b38bf[_0x2f8d('0xf')]=_0x4f61f7;_0x539459[_0x2f8d('0x21')]=qs[_0x2f8d('0x21')](_0xd3d3ad[_0x2f8d('0x22')]);return db[_0x2f8d('0x23')][_0x2f8d('0x24')](_0x539459);})['then'](function(_0x1d4559){_0x5b38bf[_0x2f8d('0x25')]=_0x1d4559;return _0x5b38bf;})[_0x2f8d('0x14')](respondWithFilteredResult(_0xd8b6a7,_0x539459))[_0x2f8d('0x26')](handleError(_0xd8b6a7,null));};exports[_0x2f8d('0x27')]=function(_0x123552,_0x4c5496){var _0x4b52e6={'raw':!![],'where':{'id':_0x123552[_0x2f8d('0x28')]['id']}},_0x40001c={};_0x40001c[_0x2f8d('0x29')]=_[_0x2f8d('0x2a')](db[_0x2f8d('0x23')][_0x2f8d('0x1c')]);_0x40001c[_0x2f8d('0x22')]=_[_0x2f8d('0x2a')](_0x123552[_0x2f8d('0x22')]);_0x40001c[_0x2f8d('0x2b')]=_[_0x2f8d('0x2c')](_0x40001c[_0x2f8d('0x29')],_0x40001c[_0x2f8d('0x22')]);_0x4b52e6['attributes']=_[_0x2f8d('0x2c')](_0x40001c[_0x2f8d('0x29')],qs[_0x2f8d('0x2d')](_0x123552[_0x2f8d('0x22')][_0x2f8d('0x2d')]));_0x4b52e6[_0x2f8d('0x2e')]=_0x4b52e6[_0x2f8d('0x2e')]['length']?_0x4b52e6[_0x2f8d('0x2e')]:_0x40001c[_0x2f8d('0x29')];if(_0x123552[_0x2f8d('0x22')][_0x2f8d('0x2f')]){_0x4b52e6['include']=[{'all':!![]}];}_0x4b52e6=_[_0x2f8d('0x30')]({},_0x4b52e6,_0x123552[_0x2f8d('0x31')]);return db['WhatsappQueue']['find'](_0x4b52e6)[_0x2f8d('0x14')](handleEntityNotFound(_0x4c5496,null))['then'](respondWithResult(_0x4c5496,null))[_0x2f8d('0x26')](handleError(_0x4c5496,null));};exports[_0x2f8d('0x32')]=function(_0x3ef585,_0x593102){return db['WhatsappQueue'][_0x2f8d('0x32')](_0x3ef585[_0x2f8d('0x33')],{})[_0x2f8d('0x14')](function(_0x5a55af){var _0x4d6dd1=_0x3ef585['user'][_0x2f8d('0x16')]({'plain':!![]});if(!_0x4d6dd1)throw new Error(_0x2f8d('0x34'));if(_0x4d6dd1['role']===_0x2f8d('0x35')){var _0x5fbf1e=_0x5a55af[_0x2f8d('0x16')]({'plain':!![]});var _0x3cd15b='WhatsappQueues';return db[_0x2f8d('0x36')][_0x2f8d('0x37')]({'where':{'name':_0x3cd15b,'userProfileId':_0x4d6dd1[_0x2f8d('0x38')]},'raw':!![]})['then'](function(_0x366c57){if(_0x366c57&&_0x366c57[_0x2f8d('0x39')]===0x0){return db[_0x2f8d('0x3a')]['create']({'name':_0x5fbf1e[_0x2f8d('0x1a')],'resourceId':_0x5fbf1e['id'],'type':_0x366c57[_0x2f8d('0x1a')],'sectionId':_0x366c57['id']},{})[_0x2f8d('0x14')](function(){return _0x5a55af;});}else{return _0x5a55af;}})[_0x2f8d('0x26')](function(_0x5d10f1){logger[_0x2f8d('0x18')](_0x2f8d('0x3b'),_0x5d10f1);throw _0x5d10f1;});}return _0x5a55af;})[_0x2f8d('0x14')](respondWithResult(_0x593102,0xc9))[_0x2f8d('0x26')](handleError(_0x593102,null));};exports['update']=function(_0x1880f9,_0x194c15){if(_0x1880f9[_0x2f8d('0x33')]['id']){delete _0x1880f9[_0x2f8d('0x33')]['id'];}return db[_0x2f8d('0x23')][_0x2f8d('0x37')]({'where':{'id':_0x1880f9['params']['id']}})[_0x2f8d('0x14')](handleEntityNotFound(_0x194c15,null))['then'](saveUpdates(_0x1880f9[_0x2f8d('0x33')],null))['then'](respondWithResult(_0x194c15,null))['catch'](handleError(_0x194c15,null));};exports[_0x2f8d('0x15')]=function(_0x3fa83f,_0xe7ed45){return db[_0x2f8d('0x23')]['find']({'where':{'id':_0x3fa83f[_0x2f8d('0x28')]['id']}})[_0x2f8d('0x14')](handleEntityNotFound(_0xe7ed45,null))[_0x2f8d('0x14')](removeEntity(_0xe7ed45,null))['catch'](handleError(_0xe7ed45,null));};exports['describe']=function(_0x4ede14,_0x39f0c4){return db[_0x2f8d('0x23')][_0x2f8d('0x3c')]()[_0x2f8d('0x14')](respondWithResult(_0x39f0c4,null))['catch'](handleError(_0x39f0c4,null));};exports[_0x2f8d('0x3d')]=function(_0x52b912,_0x145add){var _0x2ed06f={'raw':!![],'where':{}},_0x47298f={},_0x41f19e;return db[_0x2f8d('0x23')]['findOne']({'where':{'id':_0x52b912['params']['id']}})[_0x2f8d('0x14')](handleEntityNotFound(_0x145add,null))[_0x2f8d('0x14')](function(_0x2372e3){if(_0x2372e3){_0x41f19e=_0x2372e3[_0x2f8d('0x16')]({'plain':!![]});_0x47298f['model']=_['keys'](db['UserWhatsappQueue'][_0x2f8d('0x1c')]);_0x47298f[_0x2f8d('0x22')]=_[_0x2f8d('0x2a')](_0x52b912['query']);_0x47298f[_0x2f8d('0x2b')]=_[_0x2f8d('0x2c')](_0x47298f[_0x2f8d('0x29')],_0x47298f['query']);_0x2ed06f[_0x2f8d('0x2e')]=_['intersection'](_0x47298f[_0x2f8d('0x29')],qs[_0x2f8d('0x2d')](_0x52b912[_0x2f8d('0x22')][_0x2f8d('0x2d')]));_0x2ed06f[_0x2f8d('0x2e')]=_0x2ed06f['attributes'][_0x2f8d('0x3e')]?_0x2ed06f[_0x2f8d('0x2e')]:_0x47298f[_0x2f8d('0x29')];if(!_0x52b912[_0x2f8d('0x22')][_0x2f8d('0x3f')](_0x2f8d('0x40'))){_0x2ed06f[_0x2f8d('0x41')]=qs['limit'](_0x52b912[_0x2f8d('0x22')][_0x2f8d('0x41')]);_0x2ed06f[_0x2f8d('0xe')]=qs[_0x2f8d('0xe')](_0x52b912[_0x2f8d('0x22')][_0x2f8d('0xe')]);}_0x2ed06f['order']=qs[_0x2f8d('0x42')](_0x52b912[_0x2f8d('0x22')]['sort']);_0x2ed06f[_0x2f8d('0x43')]=qs['filters'](_[_0x2f8d('0x44')](_0x52b912['query'],_0x47298f[_0x2f8d('0x2b')]));_0x2ed06f['where'][_0x2f8d('0x45')]=_0x2372e3['id'];if(_0x52b912[_0x2f8d('0x22')][_0x2f8d('0x46')]){_0x2ed06f[_0x2f8d('0x43')]=_[_0x2f8d('0x30')](_0x2ed06f['where'],{'$or':_['map'](_0x2ed06f[_0x2f8d('0x2e')],function(_0x5477c1){var _0x225157={};_0x225157[_0x5477c1]={'$like':'%'+_0x52b912['query'][_0x2f8d('0x46')]+'%'};return _0x225157;})});}_0x2ed06f=_['merge']({},_0x2ed06f,_0x52b912[_0x2f8d('0x31')]);return db['UserWhatsappQueue'][_0x2f8d('0x24')](_0x2ed06f);}})[_0x2f8d('0x14')](function(_0x5e7d4b){if(_0x5e7d4b){return db[_0x2f8d('0x47')][_0x2f8d('0x48')]({'where':{'id':_[_0x2f8d('0x49')](_0x5e7d4b,_0x2f8d('0x4a')),'role':_0x2f8d('0x4b')},'attributes':['id',_0x2f8d('0x1a'),_0x2f8d('0x4c'),_0x2f8d('0x4d'),_0x2f8d('0x4e')]});}})[_0x2f8d('0x14')](function(_0x270b75){if(_0x270b75){return{'count':_0x270b75['count'],'rows':_['map'](_0x270b75[_0x2f8d('0x25')],function(_0x2ead06){return{'membername':_0x2ead06[_0x2f8d('0x1a')],'UserId':_0x2ead06['id'],'queue_name':_0x41f19e[_0x2f8d('0x1a')],'WhatsappQueueId':_0x41f19e['id'],'interface':util[_0x2f8d('0x4f')](_0x2f8d('0x50'),_0x2f8d('0x51'),_0x2ead06[_0x2f8d('0x1a')]),'penalty':0x0,'paused':_0x2ead06[_0x2f8d('0x4c')],'createdAt':_0x2ead06[_0x2f8d('0x4e')],'updatedAt':_0x2ead06['updatedAt']};})};}else{return{'count':0x0,'rows':[]};}})[_0x2f8d('0x14')](respondWithFilteredResult(_0x145add,_0x2ed06f))['catch'](handleError(_0x145add,null));};exports['getTeams']=function(_0x19aec5,_0x3919bb){var _0x3aa832={};var _0x161602={};var _0x2955c9;var _0x2ed880;return db[_0x2f8d('0x23')][_0x2f8d('0x52')]({'where':{'id':_0x19aec5[_0x2f8d('0x28')]['id']}})[_0x2f8d('0x14')](handleEntityNotFound(_0x3919bb,null))['then'](function(_0x1a9992){if(_0x1a9992){_0x2955c9=_0x1a9992;_0x161602[_0x2f8d('0x29')]=_[_0x2f8d('0x2a')](db[_0x2f8d('0x53')]['rawAttributes']);_0x161602[_0x2f8d('0x22')]=_[_0x2f8d('0x2a')](_0x19aec5[_0x2f8d('0x22')]);_0x161602['filters']=_[_0x2f8d('0x2c')](_0x161602[_0x2f8d('0x29')],_0x161602[_0x2f8d('0x22')]);_0x3aa832['attributes']=_[_0x2f8d('0x2c')](_0x161602['model'],qs[_0x2f8d('0x2d')](_0x19aec5[_0x2f8d('0x22')][_0x2f8d('0x2d')]));_0x3aa832[_0x2f8d('0x2e')]=_0x3aa832['attributes'][_0x2f8d('0x3e')]?_0x3aa832[_0x2f8d('0x2e')]:_0x161602[_0x2f8d('0x29')];_0x3aa832[_0x2f8d('0x54')]=qs[_0x2f8d('0x42')](_0x19aec5[_0x2f8d('0x22')][_0x2f8d('0x42')]);_0x3aa832[_0x2f8d('0x43')]=qs[_0x2f8d('0x2b')](_[_0x2f8d('0x44')](_0x19aec5[_0x2f8d('0x22')],_0x161602['filters']));if(_0x19aec5[_0x2f8d('0x22')]['filter']){_0x3aa832['where']=_[_0x2f8d('0x30')](_0x3aa832[_0x2f8d('0x43')],{'$or':_['map'](_0x3aa832['attributes'],function(_0x203117){var _0x4c623d={};_0x4c623d[_0x203117]={'$like':'%'+_0x19aec5['query'][_0x2f8d('0x46')]+'%'};return _0x4c623d;})});}_0x3aa832=_[_0x2f8d('0x30')]({},_0x3aa832,_0x19aec5[_0x2f8d('0x31')]);return _0x2955c9['getTeams'](_0x3aa832);}})[_0x2f8d('0x14')](function(_0x46b8e5){if(_0x46b8e5){_0x2ed880=_0x46b8e5['length'];if(!_0x19aec5['query']['hasOwnProperty'](_0x2f8d('0x40'))){_0x3aa832[_0x2f8d('0x41')]=qs[_0x2f8d('0x41')](_0x19aec5[_0x2f8d('0x22')][_0x2f8d('0x41')]);_0x3aa832[_0x2f8d('0xe')]=qs[_0x2f8d('0xe')](_0x19aec5[_0x2f8d('0x22')]['offset']);}return _0x2955c9[_0x2f8d('0x55')](_0x3aa832);}})[_0x2f8d('0x14')](function(_0x458183){if(_0x458183){return _0x458183?{'count':_0x2ed880,'rows':_0x458183}:null;}})[_0x2f8d('0x14')](respondWithResult(_0x3919bb,null))[_0x2f8d('0x26')](handleError(_0x3919bb,null));};exports['addTeams']=function(_0x505b28,_0x2ae8de){var _0x489c5e=_0x505b28[_0x2f8d('0x33')][_0x2f8d('0x56')];return db['Team'][_0x2f8d('0x24')]({'where':{'id':_0x489c5e},'attributes':['id'],'include':[{'model':db['User'],'as':_0x2f8d('0x57'),'attributes':['id','name',_0x2f8d('0x58'),_0x2f8d('0x59'),_0x2f8d('0x5a')],'raw':!![]}]})[_0x2f8d('0x14')](function(_0x5659c6){if(_0x5659c6){var _0x333349=_[_0x2f8d('0x5b')](_0x5659c6,function(_0x3c6a35){var _0x52c680=_0x3c6a35['get']({'plain':!![]});return _0x52c680[_0x2f8d('0x57')];});return db['WhatsappQueue'][_0x2f8d('0x37')]({'where':{'id':_0x505b28['params']['id']}})[_0x2f8d('0x14')](function(_0x51d2ad){return db[_0x2f8d('0x5c')][_0x2f8d('0x5d')](function(_0x5b80c9){return _0x51d2ad[_0x2f8d('0x5e')](_0x489c5e,{'transaction':_0x5b80c9})['then'](function(){return BPromise[_0x2f8d('0x5f')](_0x333349,function(_0x330d06){return db['UserWhatsappQueue'][_0x2f8d('0x60')]({'where':{'UserId':_0x330d06['id'],'WhatsappQueueId':_0x505b28[_0x2f8d('0x28')]['id']},'transaction':_0x5b80c9});});})[_0x2f8d('0x14')](function(){_0x333349['forEach'](function(_0x417583){socket[_0x2f8d('0x61')](_0x2f8d('0x62'),{'UserId':_0x417583['id'],'WhatsappQueueId':_0x51d2ad['id']});});});});});}})[_0x2f8d('0x14')](respondWithStatusCode(_0x2ae8de,null))['catch'](handleError(_0x2ae8de,null));};exports[_0x2f8d('0x63')]=function(_0x46d89b,_0x109492){return db[_0x2f8d('0x53')][_0x2f8d('0x24')]({'where':{'id':_0x46d89b[_0x2f8d('0x22')][_0x2f8d('0x56')]},'attributes':['id'],'include':[{'model':db[_0x2f8d('0x47')],'as':'Agents','attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x109492,null))['then'](function(_0x3e6b05){var _0x4254d7=_[_0x2f8d('0x49')](_0x3e6b05,'id');var _0x2f001a=[];var _0x22330d=[];var _0x26731f=squel['select']();_0x26731f[_0x2f8d('0x64')](_0x2f8d('0x65'))[_0x2f8d('0x66')](_0x2f8d('0x67'),'tq')[_0x2f8d('0x68')](_0x2f8d('0x69'),'ut',_0x2f8d('0x6a'))[_0x2f8d('0x43')]('WhatsappQueueId\x20=\x20?',_0x46d89b[_0x2f8d('0x28')]['id']);for(var _0x116c93=0x0;_0x116c93<_0x3e6b05['length'];_0x116c93+=0x1){let _0x5a300e=_0x3e6b05[_0x116c93];for(var _0x2093b9=0x0;_0x2093b9<_0x5a300e[_0x2f8d('0x57')][_0x2f8d('0x3e')];_0x2093b9+=0x1){let _0x55e4c9=_0x5a300e[_0x2f8d('0x57')][_0x2093b9];var _0x11cf99=_0x26731f['clone']();_0x11cf99[_0x2f8d('0x43')](_0x2f8d('0x6b'),_0x55e4c9['id']);_0x22330d['push'](db['sequelize'][_0x2f8d('0x22')](_0x11cf99[_0x2f8d('0x6c')](),{'type':db[_0x2f8d('0x5c')]['QueryTypes'][_0x2f8d('0x6d')]})[_0x2f8d('0x14')](function(_0x52cc15){if(_0x52cc15['length']===0x1){return _0x55e4c9['id'];}else{var _0x2d5d6d=_['every'](_[_0x2f8d('0x49')](_0x52cc15,'TeamId'),function(_0x998ba4){return _[_0x2f8d('0x6e')](_0x4254d7,_0x998ba4);});if(_0x2d5d6d){return _0x55e4c9['id'];}}}));}}return BPromise[_0x2f8d('0x6f')](_0x22330d)[_0x2f8d('0x14')](function(_0x4e7c86){_0x2f001a=_(_0x2f001a)['union'](_0x4e7c86)[_0x2f8d('0x70')]()['value']();return db[_0x2f8d('0x23')][_0x2f8d('0x37')]({'where':{'id':_0x46d89b[_0x2f8d('0x28')]['id']}})['then'](function(_0x1f9ea3){return db[_0x2f8d('0x5c')][_0x2f8d('0x5d')](function(_0x3809e6){return _0x1f9ea3[_0x2f8d('0x63')](_0x46d89b[_0x2f8d('0x22')][_0x2f8d('0x56')],{'transaction':_0x3809e6})[_0x2f8d('0x14')](function(){if(!_['isEmpty'](_0x2f001a)){return _0x1f9ea3[_0x2f8d('0x71')](_0x2f001a,{'transaction':_0x3809e6});}})['then'](function(){_0x2f001a[_0x2f8d('0x72')](function(_0x496e7d){socket[_0x2f8d('0x61')](_0x2f8d('0x73'),{'UserId':_0x496e7d,'WhatsappQueueId':_0x1f9ea3['id']});});});});});});})[_0x2f8d('0x14')](respondWithStatusCode(_0x109492,null))[_0x2f8d('0x26')](handleError(_0x109492,null));};exports[_0x2f8d('0x74')]=function(_0x3a6ada,_0x2e903c){return db[_0x2f8d('0x23')][_0x2f8d('0x37')]({'where':{'id':_0x3a6ada[_0x2f8d('0x28')]['id']}})[_0x2f8d('0x14')](handleEntityNotFound(_0x2e903c,null))[_0x2f8d('0x14')](function(_0x4592ea){if(_0x4592ea){return _0x4592ea['addAgents'](_0x3a6ada[_0x2f8d('0x33')][_0x2f8d('0x56')],_[_0x2f8d('0x75')](_0x3a6ada[_0x2f8d('0x33')],[_0x2f8d('0x56'),'id'])||{})[_0x2f8d('0x76')](function(_0x19975a){for(var _0x447658=0x0;_0x447658<_0x3a6ada[_0x2f8d('0x33')][_0x2f8d('0x56')][_0x2f8d('0x3e')];_0x447658+=0x1){socket[_0x2f8d('0x61')](_0x2f8d('0x62'),{'UserId':Number(_0x3a6ada[_0x2f8d('0x33')][_0x2f8d('0x56')][_0x447658]),'WhatsappQueueId':Number(_0x3a6ada[_0x2f8d('0x28')]['id'])});}return _0x19975a;});}})[_0x2f8d('0x14')](respondWithResult(_0x2e903c,null))[_0x2f8d('0x26')](handleError(_0x2e903c,null));};exports[_0x2f8d('0x71')]=function(_0x3665ce,_0xbda595){return db['WhatsappQueue'][_0x2f8d('0x37')]({'where':{'id':_0x3665ce['params']['id']}})['then'](handleEntityNotFound(_0xbda595,null))[_0x2f8d('0x14')](function(_0x3d4e59){if(_0x3d4e59){return _0x3d4e59[_0x2f8d('0x71')](_0x3665ce['query']['ids'])['then'](function(){if(_[_0x2f8d('0x77')](_0x3665ce[_0x2f8d('0x22')][_0x2f8d('0x56')])){for(var _0x45d723=0x0;_0x45d723<_0x3665ce[_0x2f8d('0x22')]['ids']['length'];_0x45d723+=0x1){socket[_0x2f8d('0x61')](_0x2f8d('0x73'),{'UserId':Number(_0x3665ce[_0x2f8d('0x22')][_0x2f8d('0x56')][_0x45d723]),'WhatsappQueueId':Number(_0x3665ce[_0x2f8d('0x28')]['id'])});}}else{socket[_0x2f8d('0x61')](_0x2f8d('0x73'),{'UserId':Number(_0x3665ce[_0x2f8d('0x22')][_0x2f8d('0x56')]),'WhatsappQueueId':Number(_0x3665ce['params']['id'])});}});}})[_0x2f8d('0x14')](respondWithStatusCode(_0xbda595,null))['catch'](handleError(_0xbda595,null));};exports[_0x2f8d('0x78')]=function(_0x37c4e1,_0x3c4e95){var _0x38b3e8={};var _0x5ba8b2={};var _0xd07ede;var _0x466c0;return db[_0x2f8d('0x23')][_0x2f8d('0x52')]({'where':{'id':_0x37c4e1[_0x2f8d('0x28')]['id']}})[_0x2f8d('0x14')](handleEntityNotFound(_0x3c4e95,null))[_0x2f8d('0x14')](function(_0x5c981f){if(_0x5c981f){_0xd07ede=_0x5c981f;_0x5ba8b2['model']=_['keys'](db['User'][_0x2f8d('0x1c')]);_0x5ba8b2['query']=_[_0x2f8d('0x2a')](_0x37c4e1[_0x2f8d('0x22')]);_0x5ba8b2['filters']=_[_0x2f8d('0x2c')](_0x5ba8b2[_0x2f8d('0x29')],_0x5ba8b2[_0x2f8d('0x22')]);_0x38b3e8[_0x2f8d('0x2e')]=_[_0x2f8d('0x2c')](_0x5ba8b2[_0x2f8d('0x29')],qs['fields'](_0x37c4e1[_0x2f8d('0x22')][_0x2f8d('0x2d')]));_0x38b3e8[_0x2f8d('0x2e')]=_0x38b3e8[_0x2f8d('0x2e')]['length']?_0x38b3e8[_0x2f8d('0x2e')]:_0x5ba8b2[_0x2f8d('0x29')];_0x38b3e8[_0x2f8d('0x54')]=qs[_0x2f8d('0x42')](_0x37c4e1[_0x2f8d('0x22')][_0x2f8d('0x42')]);_0x38b3e8[_0x2f8d('0x43')]=qs['filters'](_[_0x2f8d('0x44')](_0x37c4e1['query'],_0x5ba8b2[_0x2f8d('0x2b')]));if(_0x37c4e1[_0x2f8d('0x22')]['filter']){_0x38b3e8[_0x2f8d('0x43')]=_[_0x2f8d('0x30')](_0x38b3e8[_0x2f8d('0x43')],{'$or':_['map'](_0x38b3e8[_0x2f8d('0x2e')],function(_0x44a437){var _0x6d3708={};_0x6d3708[_0x44a437]={'$like':'%'+_0x37c4e1[_0x2f8d('0x22')][_0x2f8d('0x46')]+'%'};return _0x6d3708;})});}_0x38b3e8=_['merge']({},_0x38b3e8,_0x37c4e1[_0x2f8d('0x31')]);return _0xd07ede[_0x2f8d('0x78')](_0x38b3e8);}})[_0x2f8d('0x14')](function(_0x2c2c8a){if(_0x2c2c8a){_0x466c0=_0x2c2c8a[_0x2f8d('0x3e')];if(!_0x37c4e1['query'][_0x2f8d('0x3f')](_0x2f8d('0x40'))){_0x38b3e8[_0x2f8d('0x41')]=qs[_0x2f8d('0x41')](_0x37c4e1[_0x2f8d('0x22')][_0x2f8d('0x41')]);_0x38b3e8[_0x2f8d('0xe')]=qs[_0x2f8d('0xe')](_0x37c4e1['query'][_0x2f8d('0xe')]);}return _0xd07ede[_0x2f8d('0x78')](_0x38b3e8);}})['then'](function(_0xb1d0c6){if(_0xb1d0c6){return _0xb1d0c6?{'count':_0x466c0,'rows':_0xb1d0c6}:null;}})[_0x2f8d('0x14')](respondWithResult(_0x3c4e95,null))[_0x2f8d('0x26')](handleError(_0x3c4e95,null));};
\ No newline at end of file
+var _0x41b1=['api','redis','localhost','./whatsappQueue.socket','register','sendStatus','status','json','undefined','count','offset','limit','update','destroy','then','get','WhatsappQueues','UserProfileResource','end','error','name','send','map','WhatsappQueue','rawAttributes','fieldName','type','getOptions','where','include','query','findAll','catch','show','model','keys','filters','intersection','attributes','fields','length','includeAll','merge','options','find','create','user','Unable\x20to\x20retrieve\x20the\x20current\x20user','role','UserProfileSection','userProfileId','body','params','describe','getMembers','findOne','UserWhatsappQueue','hasOwnProperty','nolimit','pick','WhatsappQueueId','User','findAndCountAll','UserId','agent','whatsappPause','updatedAt','createdAt','rows','%s/%s','Team','order','sort','filter','getTeams','addTeams','ids','Agents','interface','flatMap','sequelize','each','findOrCreate','forEach','emit','select','field','from','team_has_whatsapp_queues','user_has_teams','ut.TeamId\x20=\x20tq.TeamId','WhatsappQueueId\x20=\x20?','clone','ut.UserId\x20=\x20?','push','QueryTypes','SELECT','every','all','union','compact','value','transaction','removeTeams','isEmpty','userWhatsappQueue:remove','addAgents','omit','spread','userWhatsappQueue:save','removeAgents','isArray','getAgents','bluebird','util','lodash','squel','../../components/parsers/qs','../../config/logger'];(function(_0x438a35,_0x973546){var _0x28ebd8=function(_0x17bca6){while(--_0x17bca6){_0x438a35['push'](_0x438a35['shift']());}};_0x28ebd8(++_0x973546);}(_0x41b1,0x71));var _0x141b=function(_0x5d0207,_0x4000c4){_0x5d0207=_0x5d0207-0x0;var _0xf3e249=_0x41b1[_0x5d0207];return _0xf3e249;};'use strict';var BPromise=require(_0x141b('0x0'));var util=require(_0x141b('0x1'));var _=require(_0x141b('0x2'));var squel=require(_0x141b('0x3'));var Redis=require('ioredis');var qs=require(_0x141b('0x4'));var logger=require(_0x141b('0x5'))(_0x141b('0x6'));var config=require('../../config/environment');var db=require('../../mysqldb')['db'];config[_0x141b('0x7')]=_['defaults'](config[_0x141b('0x7')],{'host':_0x141b('0x8'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x141b('0x7')]));require(_0x141b('0x9'))[_0x141b('0xa')](socket);function respondWithStatusCode(_0x5d4440,_0x1384da){_0x1384da=_0x1384da||0xcc;return function(_0x9746ec){if(_0x9746ec){return _0x5d4440[_0x141b('0xb')](_0x1384da);}return _0x5d4440[_0x141b('0xc')](_0x1384da)['end']();};}function respondWithResult(_0x58d4af,_0x4f64d2){_0x4f64d2=_0x4f64d2||0xc8;return function(_0x16b11e){if(_0x16b11e){return _0x58d4af[_0x141b('0xc')](_0x4f64d2)[_0x141b('0xd')](_0x16b11e);}};}function respondWithFilteredResult(_0xa1096f,_0x11e085){return function(_0xd17dae){if(_0xd17dae){var _0x12bc94=typeof _0x11e085['offset']===_0x141b('0xe')&&typeof _0x11e085['limit']===_0x141b('0xe');var _0x3668b6=_0xd17dae[_0x141b('0xf')];var _0x34306d=_0x12bc94?0x0:_0x11e085[_0x141b('0x10')];var _0x320553=_0x12bc94?_0xd17dae['count']:_0x11e085[_0x141b('0x10')]+_0x11e085[_0x141b('0x11')];var _0x11d1f1;if(_0x320553>=_0x3668b6){_0x320553=_0x3668b6;_0x11d1f1=0xc8;}else{_0x11d1f1=0xce;}_0xa1096f[_0x141b('0xc')](_0x11d1f1);return _0xa1096f['set']('Content-Range',_0x34306d+'-'+_0x320553+'/'+_0x3668b6)[_0x141b('0xd')](_0xd17dae);}return null;};}function saveUpdates(_0x421d67){return function(_0x91c040){if(_0x91c040){return _0x91c040[_0x141b('0x12')](_0x421d67)['then'](function(_0x3c9ca8){return _0x3c9ca8;});}return null;};}function removeEntity(_0x7f42c8){return function(_0x2d2be1){if(_0x2d2be1){return _0x2d2be1[_0x141b('0x13')]()[_0x141b('0x14')](function(){var _0x13af43=_0x2d2be1[_0x141b('0x15')]({'plain':!![]});var _0xa712a6=_0x141b('0x16');return db[_0x141b('0x17')][_0x141b('0x13')]({'where':{'type':_0xa712a6,'resourceId':_0x13af43['id']}})['then'](function(){return _0x2d2be1;});})[_0x141b('0x14')](function(){_0x7f42c8[_0x141b('0xc')](0xcc)[_0x141b('0x18')]();});}};}function handleEntityNotFound(_0x2f957b){return function(_0x8cb1d9){if(!_0x8cb1d9){_0x2f957b[_0x141b('0xb')](0x194);}return _0x8cb1d9;};}function handleError(_0x3acde4,_0x481a37){_0x481a37=_0x481a37||0x1f4;return function(_0x55c90c){logger[_0x141b('0x19')](_0x55c90c['stack']);if(_0x55c90c[_0x141b('0x1a')]){delete _0x55c90c['name'];}_0x3acde4['status'](_0x481a37)[_0x141b('0x1b')](_0x55c90c);};}exports['index']=function(_0x4b0c7a,_0xcb6267){var _0x37b881={};var _0x39f506={'count':0x0,'rows':[]};var _0x1179a6=_[_0x141b('0x1c')](db[_0x141b('0x1d')][_0x141b('0x1e')],function(_0x30ffa5){return{'name':_0x30ffa5[_0x141b('0x1f')],'type':_0x30ffa5[_0x141b('0x20')]['key']};});_0x37b881=qs[_0x141b('0x21')](_0x1179a6,_0x4b0c7a);var _0x579539={'where':_0x37b881[_0x141b('0x22')]};return db[_0x141b('0x1d')][_0x141b('0xf')](_0x579539)[_0x141b('0x14')](function(_0x1f2086){_0x39f506['count']=_0x1f2086;_0x37b881[_0x141b('0x23')]=qs[_0x141b('0x23')](_0x4b0c7a[_0x141b('0x24')]);return db[_0x141b('0x1d')][_0x141b('0x25')](_0x37b881);})[_0x141b('0x14')](function(_0x3d2bc6){_0x39f506['rows']=_0x3d2bc6;return _0x39f506;})[_0x141b('0x14')](respondWithFilteredResult(_0xcb6267,_0x37b881))[_0x141b('0x26')](handleError(_0xcb6267,null));};exports[_0x141b('0x27')]=function(_0x519ead,_0x9b9b61){var _0x5e3f22={'raw':!![],'where':{'id':_0x519ead['params']['id']}},_0x4be73e={};_0x4be73e[_0x141b('0x28')]=_[_0x141b('0x29')](db[_0x141b('0x1d')][_0x141b('0x1e')]);_0x4be73e[_0x141b('0x24')]=_[_0x141b('0x29')](_0x519ead['query']);_0x4be73e[_0x141b('0x2a')]=_[_0x141b('0x2b')](_0x4be73e[_0x141b('0x28')],_0x4be73e[_0x141b('0x24')]);_0x5e3f22[_0x141b('0x2c')]=_[_0x141b('0x2b')](_0x4be73e[_0x141b('0x28')],qs[_0x141b('0x2d')](_0x519ead['query']['fields']));_0x5e3f22['attributes']=_0x5e3f22[_0x141b('0x2c')][_0x141b('0x2e')]?_0x5e3f22['attributes']:_0x4be73e[_0x141b('0x28')];if(_0x519ead['query'][_0x141b('0x2f')]){_0x5e3f22[_0x141b('0x23')]=[{'all':!![]}];}_0x5e3f22=_[_0x141b('0x30')]({},_0x5e3f22,_0x519ead[_0x141b('0x31')]);return db[_0x141b('0x1d')][_0x141b('0x32')](_0x5e3f22)['then'](handleEntityNotFound(_0x9b9b61,null))[_0x141b('0x14')](respondWithResult(_0x9b9b61,null))['catch'](handleError(_0x9b9b61,null));};exports['create']=function(_0x50ed41,_0x39dfc1){return db[_0x141b('0x1d')][_0x141b('0x33')](_0x50ed41['body'],{})['then'](function(_0x2015b5){var _0x89be6b=_0x50ed41[_0x141b('0x34')]['get']({'plain':!![]});if(!_0x89be6b)throw new Error(_0x141b('0x35'));if(_0x89be6b[_0x141b('0x36')]===_0x141b('0x34')){var _0x344052=_0x2015b5[_0x141b('0x15')]({'plain':!![]});var _0x38f61a=_0x141b('0x16');return db[_0x141b('0x37')][_0x141b('0x32')]({'where':{'name':_0x38f61a,'userProfileId':_0x89be6b[_0x141b('0x38')]},'raw':!![]})[_0x141b('0x14')](function(_0x11b92f){if(_0x11b92f&&_0x11b92f['autoAssociation']===0x0){return db['UserProfileResource'][_0x141b('0x33')]({'name':_0x344052['name'],'resourceId':_0x344052['id'],'type':_0x11b92f[_0x141b('0x1a')],'sectionId':_0x11b92f['id']},{})[_0x141b('0x14')](function(){return _0x2015b5;});}else{return _0x2015b5;}})[_0x141b('0x26')](function(_0x2a780e){logger[_0x141b('0x19')]('Unable\x20to\x20associate\x20the\x20resource\x20to\x20the\x20User\x20Profile:\x20%s',_0x2a780e);throw _0x2a780e;});}return _0x2015b5;})[_0x141b('0x14')](respondWithResult(_0x39dfc1,0xc9))['catch'](handleError(_0x39dfc1,null));};exports[_0x141b('0x12')]=function(_0x587f59,_0x5932df){if(_0x587f59[_0x141b('0x39')]['id']){delete _0x587f59[_0x141b('0x39')]['id'];}return db['WhatsappQueue'][_0x141b('0x32')]({'where':{'id':_0x587f59[_0x141b('0x3a')]['id']}})[_0x141b('0x14')](handleEntityNotFound(_0x5932df,null))[_0x141b('0x14')](saveUpdates(_0x587f59[_0x141b('0x39')],null))['then'](respondWithResult(_0x5932df,null))[_0x141b('0x26')](handleError(_0x5932df,null));};exports[_0x141b('0x13')]=function(_0x445cde,_0x14a263){return db[_0x141b('0x1d')][_0x141b('0x32')]({'where':{'id':_0x445cde[_0x141b('0x3a')]['id']}})[_0x141b('0x14')](handleEntityNotFound(_0x14a263,null))[_0x141b('0x14')](removeEntity(_0x14a263,null))[_0x141b('0x26')](handleError(_0x14a263,null));};exports[_0x141b('0x3b')]=function(_0x42c980,_0x11c0a1){return db[_0x141b('0x1d')][_0x141b('0x3b')]()[_0x141b('0x14')](respondWithResult(_0x11c0a1,null))[_0x141b('0x26')](handleError(_0x11c0a1,null));};exports[_0x141b('0x3c')]=function(_0x9069c5,_0x55f2df){var _0x2d2e0c={'raw':!![],'where':{}},_0x31117d={},_0x1fd1bc;return db[_0x141b('0x1d')][_0x141b('0x3d')]({'where':{'id':_0x9069c5[_0x141b('0x3a')]['id']}})[_0x141b('0x14')](handleEntityNotFound(_0x55f2df,null))['then'](function(_0x5cd69a){if(_0x5cd69a){_0x1fd1bc=_0x5cd69a[_0x141b('0x15')]({'plain':!![]});_0x31117d[_0x141b('0x28')]=_['keys'](db[_0x141b('0x3e')][_0x141b('0x1e')]);_0x31117d[_0x141b('0x24')]=_[_0x141b('0x29')](_0x9069c5['query']);_0x31117d['filters']=_[_0x141b('0x2b')](_0x31117d[_0x141b('0x28')],_0x31117d[_0x141b('0x24')]);_0x2d2e0c[_0x141b('0x2c')]=_[_0x141b('0x2b')](_0x31117d['model'],qs[_0x141b('0x2d')](_0x9069c5[_0x141b('0x24')][_0x141b('0x2d')]));_0x2d2e0c[_0x141b('0x2c')]=_0x2d2e0c['attributes'][_0x141b('0x2e')]?_0x2d2e0c['attributes']:_0x31117d['model'];if(!_0x9069c5[_0x141b('0x24')][_0x141b('0x3f')](_0x141b('0x40'))){_0x2d2e0c['limit']=qs[_0x141b('0x11')](_0x9069c5[_0x141b('0x24')]['limit']);_0x2d2e0c[_0x141b('0x10')]=qs['offset'](_0x9069c5[_0x141b('0x24')][_0x141b('0x10')]);}_0x2d2e0c['order']=qs['sort'](_0x9069c5[_0x141b('0x24')]['sort']);_0x2d2e0c[_0x141b('0x22')]=qs[_0x141b('0x2a')](_[_0x141b('0x41')](_0x9069c5[_0x141b('0x24')],_0x31117d['filters']));_0x2d2e0c[_0x141b('0x22')][_0x141b('0x42')]=_0x5cd69a['id'];if(_0x9069c5[_0x141b('0x24')]['filter']){_0x2d2e0c['where']=_[_0x141b('0x30')](_0x2d2e0c[_0x141b('0x22')],{'$or':_[_0x141b('0x1c')](_0x2d2e0c['attributes'],function(_0x1c374c){var _0x3950b5={};_0x3950b5[_0x1c374c]={'$like':'%'+_0x9069c5[_0x141b('0x24')]['filter']+'%'};return _0x3950b5;})});}_0x2d2e0c=_[_0x141b('0x30')]({},_0x2d2e0c,_0x9069c5['options']);return db['UserWhatsappQueue'][_0x141b('0x25')](_0x2d2e0c);}})[_0x141b('0x14')](function(_0x1a069d){if(_0x1a069d){return db[_0x141b('0x43')][_0x141b('0x44')]({'where':{'id':_[_0x141b('0x1c')](_0x1a069d,_0x141b('0x45')),'role':_0x141b('0x46')},'attributes':['id',_0x141b('0x1a'),_0x141b('0x47'),_0x141b('0x48'),_0x141b('0x49')]});}})['then'](function(_0x39e645){if(_0x39e645){return{'count':_0x39e645['count'],'rows':_[_0x141b('0x1c')](_0x39e645[_0x141b('0x4a')],function(_0x444163){return{'membername':_0x444163[_0x141b('0x1a')],'UserId':_0x444163['id'],'queue_name':_0x1fd1bc['name'],'WhatsappQueueId':_0x1fd1bc['id'],'interface':util['format'](_0x141b('0x4b'),'SIP',_0x444163[_0x141b('0x1a')]),'penalty':0x0,'paused':_0x444163['whatsappPause'],'createdAt':_0x444163[_0x141b('0x49')],'updatedAt':_0x444163[_0x141b('0x48')]};})};}else{return{'count':0x0,'rows':[]};}})[_0x141b('0x14')](respondWithFilteredResult(_0x55f2df,_0x2d2e0c))['catch'](handleError(_0x55f2df,null));};exports['getTeams']=function(_0x317c88,_0x4a9376){var _0x11afca={};var _0x39b5e7={};var _0x15c850;var _0x16d474;return db['WhatsappQueue'][_0x141b('0x3d')]({'where':{'id':_0x317c88[_0x141b('0x3a')]['id']}})[_0x141b('0x14')](handleEntityNotFound(_0x4a9376,null))[_0x141b('0x14')](function(_0x115b29){if(_0x115b29){_0x15c850=_0x115b29;_0x39b5e7[_0x141b('0x28')]=_['keys'](db[_0x141b('0x4c')]['rawAttributes']);_0x39b5e7['query']=_[_0x141b('0x29')](_0x317c88[_0x141b('0x24')]);_0x39b5e7[_0x141b('0x2a')]=_['intersection'](_0x39b5e7[_0x141b('0x28')],_0x39b5e7[_0x141b('0x24')]);_0x11afca[_0x141b('0x2c')]=_['intersection'](_0x39b5e7[_0x141b('0x28')],qs[_0x141b('0x2d')](_0x317c88[_0x141b('0x24')][_0x141b('0x2d')]));_0x11afca[_0x141b('0x2c')]=_0x11afca[_0x141b('0x2c')]['length']?_0x11afca[_0x141b('0x2c')]:_0x39b5e7['model'];_0x11afca[_0x141b('0x4d')]=qs['sort'](_0x317c88['query'][_0x141b('0x4e')]);_0x11afca['where']=qs[_0x141b('0x2a')](_[_0x141b('0x41')](_0x317c88[_0x141b('0x24')],_0x39b5e7[_0x141b('0x2a')]));if(_0x317c88[_0x141b('0x24')][_0x141b('0x4f')]){_0x11afca['where']=_[_0x141b('0x30')](_0x11afca[_0x141b('0x22')],{'$or':_[_0x141b('0x1c')](_0x11afca[_0x141b('0x2c')],function(_0x189da4){var _0x32eba8={};_0x32eba8[_0x189da4]={'$like':'%'+_0x317c88[_0x141b('0x24')]['filter']+'%'};return _0x32eba8;})});}_0x11afca=_[_0x141b('0x30')]({},_0x11afca,_0x317c88[_0x141b('0x31')]);return _0x15c850[_0x141b('0x50')](_0x11afca);}})[_0x141b('0x14')](function(_0x72b95f){if(_0x72b95f){_0x16d474=_0x72b95f['length'];if(!_0x317c88['query'][_0x141b('0x3f')]('nolimit')){_0x11afca[_0x141b('0x11')]=qs[_0x141b('0x11')](_0x317c88[_0x141b('0x24')][_0x141b('0x11')]);_0x11afca[_0x141b('0x10')]=qs[_0x141b('0x10')](_0x317c88[_0x141b('0x24')][_0x141b('0x10')]);}return _0x15c850[_0x141b('0x50')](_0x11afca);}})[_0x141b('0x14')](function(_0x49035e){if(_0x49035e){return _0x49035e?{'count':_0x16d474,'rows':_0x49035e}:null;}})[_0x141b('0x14')](respondWithResult(_0x4a9376,null))[_0x141b('0x26')](handleError(_0x4a9376,null));};exports[_0x141b('0x51')]=function(_0x3540ef,_0x4e4905){var _0xdf4986=_0x3540ef[_0x141b('0x39')][_0x141b('0x52')];return db[_0x141b('0x4c')][_0x141b('0x25')]({'where':{'id':_0xdf4986},'attributes':['id'],'include':[{'model':db['User'],'as':_0x141b('0x53'),'attributes':['id',_0x141b('0x1a'),'online','voicePause',_0x141b('0x54')],'raw':!![]}]})[_0x141b('0x14')](function(_0xd59c85){if(_0xd59c85){var _0x15aa7e=_[_0x141b('0x55')](_0xd59c85,function(_0x43ac64){var _0x3dbec7=_0x43ac64[_0x141b('0x15')]({'plain':!![]});return _0x3dbec7[_0x141b('0x53')];});return db[_0x141b('0x1d')][_0x141b('0x32')]({'where':{'id':_0x3540ef[_0x141b('0x3a')]['id']}})[_0x141b('0x14')](function(_0x4683dd){return db[_0x141b('0x56')]['transaction'](function(_0x50595e){return _0x4683dd[_0x141b('0x51')](_0xdf4986,{'transaction':_0x50595e})['then'](function(){return BPromise[_0x141b('0x57')](_0x15aa7e,function(_0x2fbde5){return db[_0x141b('0x3e')][_0x141b('0x58')]({'where':{'UserId':_0x2fbde5['id'],'WhatsappQueueId':_0x3540ef[_0x141b('0x3a')]['id']},'transaction':_0x50595e});});})[_0x141b('0x14')](function(){_0x15aa7e[_0x141b('0x59')](function(_0x3090a2){socket[_0x141b('0x5a')]('userWhatsappQueue:save',{'UserId':_0x3090a2['id'],'WhatsappQueueId':_0x4683dd['id']});});});});});}})[_0x141b('0x14')](respondWithStatusCode(_0x4e4905,null))['catch'](handleError(_0x4e4905,null));};exports['removeTeams']=function(_0x62c542,_0x340d73){return db['Team'][_0x141b('0x25')]({'where':{'id':_0x62c542['query'][_0x141b('0x52')]},'attributes':['id'],'include':[{'model':db[_0x141b('0x43')],'as':_0x141b('0x53'),'attributes':['id'],'raw':!![]}]})['then'](handleEntityNotFound(_0x340d73,null))[_0x141b('0x14')](function(_0xf54bb3){var _0x20daa0=_[_0x141b('0x1c')](_0xf54bb3,'id');var _0x17401f=[];var _0x2b3646=[];var _0x23bd5f=squel[_0x141b('0x5b')]();_0x23bd5f[_0x141b('0x5c')]('tq.TeamId')[_0x141b('0x5d')](_0x141b('0x5e'),'tq')['join'](_0x141b('0x5f'),'ut',_0x141b('0x60'))[_0x141b('0x22')](_0x141b('0x61'),_0x62c542[_0x141b('0x3a')]['id']);for(var _0x6d9341=0x0;_0x6d9341<_0xf54bb3['length'];_0x6d9341+=0x1){let _0x1d6e51=_0xf54bb3[_0x6d9341];for(var _0x3b840b=0x0;_0x3b840b<_0x1d6e51[_0x141b('0x53')][_0x141b('0x2e')];_0x3b840b+=0x1){let _0x18bc0f=_0x1d6e51[_0x141b('0x53')][_0x3b840b];var _0x35f3b4=_0x23bd5f[_0x141b('0x62')]();_0x35f3b4['where'](_0x141b('0x63'),_0x18bc0f['id']);_0x2b3646[_0x141b('0x64')](db['sequelize'][_0x141b('0x24')](_0x35f3b4['toString'](),{'type':db[_0x141b('0x56')][_0x141b('0x65')][_0x141b('0x66')]})[_0x141b('0x14')](function(_0x2d1d59){if(_0x2d1d59[_0x141b('0x2e')]===0x1){return _0x18bc0f['id'];}else{var _0x13be08=_[_0x141b('0x67')](_['map'](_0x2d1d59,'TeamId'),function(_0x1b718b){return _['includes'](_0x20daa0,_0x1b718b);});if(_0x13be08){return _0x18bc0f['id'];}}}));}}return BPromise[_0x141b('0x68')](_0x2b3646)[_0x141b('0x14')](function(_0x178a8f){_0x17401f=_(_0x17401f)[_0x141b('0x69')](_0x178a8f)[_0x141b('0x6a')]()[_0x141b('0x6b')]();return db[_0x141b('0x1d')][_0x141b('0x32')]({'where':{'id':_0x62c542[_0x141b('0x3a')]['id']}})[_0x141b('0x14')](function(_0x24d5a8){return db['sequelize'][_0x141b('0x6c')](function(_0x43c541){return _0x24d5a8[_0x141b('0x6d')](_0x62c542[_0x141b('0x24')]['ids'],{'transaction':_0x43c541})['then'](function(){if(!_[_0x141b('0x6e')](_0x17401f)){return _0x24d5a8['removeAgents'](_0x17401f,{'transaction':_0x43c541});}})[_0x141b('0x14')](function(){_0x17401f[_0x141b('0x59')](function(_0x5b16ab){socket[_0x141b('0x5a')](_0x141b('0x6f'),{'UserId':_0x5b16ab,'WhatsappQueueId':_0x24d5a8['id']});});});});});});})[_0x141b('0x14')](respondWithStatusCode(_0x340d73,null))['catch'](handleError(_0x340d73,null));};exports[_0x141b('0x70')]=function(_0x185ea6,_0x12e713){return db['WhatsappQueue'][_0x141b('0x32')]({'where':{'id':_0x185ea6[_0x141b('0x3a')]['id']}})[_0x141b('0x14')](handleEntityNotFound(_0x12e713,null))[_0x141b('0x14')](function(_0x2c10ac){if(_0x2c10ac){return _0x2c10ac[_0x141b('0x70')](_0x185ea6[_0x141b('0x39')][_0x141b('0x52')],_[_0x141b('0x71')](_0x185ea6[_0x141b('0x39')],[_0x141b('0x52'),'id'])||{})[_0x141b('0x72')](function(_0x1c79be){for(var _0x23ac6a=0x0;_0x23ac6a<_0x185ea6[_0x141b('0x39')][_0x141b('0x52')][_0x141b('0x2e')];_0x23ac6a+=0x1){socket[_0x141b('0x5a')](_0x141b('0x73'),{'UserId':Number(_0x185ea6['body'][_0x141b('0x52')][_0x23ac6a]),'WhatsappQueueId':Number(_0x185ea6[_0x141b('0x3a')]['id'])});}return _0x1c79be;});}})['then'](respondWithResult(_0x12e713,null))[_0x141b('0x26')](handleError(_0x12e713,null));};exports[_0x141b('0x74')]=function(_0x148356,_0x27d72d){return db[_0x141b('0x1d')][_0x141b('0x32')]({'where':{'id':_0x148356[_0x141b('0x3a')]['id']}})[_0x141b('0x14')](handleEntityNotFound(_0x27d72d,null))[_0x141b('0x14')](function(_0x38f235){if(_0x38f235){return _0x38f235[_0x141b('0x74')](_0x148356[_0x141b('0x24')]['ids'])['then'](function(){if(_[_0x141b('0x75')](_0x148356[_0x141b('0x24')]['ids'])){for(var _0x58b9c5=0x0;_0x58b9c5<_0x148356[_0x141b('0x24')][_0x141b('0x52')]['length'];_0x58b9c5+=0x1){socket[_0x141b('0x5a')](_0x141b('0x6f'),{'UserId':Number(_0x148356[_0x141b('0x24')][_0x141b('0x52')][_0x58b9c5]),'WhatsappQueueId':Number(_0x148356[_0x141b('0x3a')]['id'])});}}else{socket[_0x141b('0x5a')]('userWhatsappQueue:remove',{'UserId':Number(_0x148356[_0x141b('0x24')]['ids']),'WhatsappQueueId':Number(_0x148356[_0x141b('0x3a')]['id'])});}});}})[_0x141b('0x14')](respondWithStatusCode(_0x27d72d,null))[_0x141b('0x26')](handleError(_0x27d72d,null));};exports[_0x141b('0x76')]=function(_0x381eb4,_0x56d26f){var _0xc1cf7b={};var _0x56b5b8={};var _0x248249;var _0x559718;return db[_0x141b('0x1d')][_0x141b('0x3d')]({'where':{'id':_0x381eb4[_0x141b('0x3a')]['id']}})[_0x141b('0x14')](handleEntityNotFound(_0x56d26f,null))[_0x141b('0x14')](function(_0x34c64f){if(_0x34c64f){_0x248249=_0x34c64f;_0x56b5b8['model']=_[_0x141b('0x29')](db[_0x141b('0x43')]['rawAttributes']);_0x56b5b8[_0x141b('0x24')]=_[_0x141b('0x29')](_0x381eb4[_0x141b('0x24')]);_0x56b5b8['filters']=_[_0x141b('0x2b')](_0x56b5b8['model'],_0x56b5b8['query']);_0xc1cf7b[_0x141b('0x2c')]=_[_0x141b('0x2b')](_0x56b5b8[_0x141b('0x28')],qs[_0x141b('0x2d')](_0x381eb4[_0x141b('0x24')][_0x141b('0x2d')]));_0xc1cf7b['attributes']=_0xc1cf7b[_0x141b('0x2c')][_0x141b('0x2e')]?_0xc1cf7b['attributes']:_0x56b5b8[_0x141b('0x28')];_0xc1cf7b[_0x141b('0x4d')]=qs[_0x141b('0x4e')](_0x381eb4['query'][_0x141b('0x4e')]);_0xc1cf7b[_0x141b('0x22')]=qs[_0x141b('0x2a')](_['pick'](_0x381eb4[_0x141b('0x24')],_0x56b5b8['filters']));if(_0x381eb4[_0x141b('0x24')][_0x141b('0x4f')]){_0xc1cf7b[_0x141b('0x22')]=_['merge'](_0xc1cf7b[_0x141b('0x22')],{'$or':_[_0x141b('0x1c')](_0xc1cf7b[_0x141b('0x2c')],function(_0x29eb01){var _0x8ed279={};_0x8ed279[_0x29eb01]={'$like':'%'+_0x381eb4[_0x141b('0x24')][_0x141b('0x4f')]+'%'};return _0x8ed279;})});}_0xc1cf7b=_['merge']({},_0xc1cf7b,_0x381eb4[_0x141b('0x31')]);return _0x248249[_0x141b('0x76')](_0xc1cf7b);}})[_0x141b('0x14')](function(_0x3d160a){if(_0x3d160a){_0x559718=_0x3d160a[_0x141b('0x2e')];if(!_0x381eb4[_0x141b('0x24')][_0x141b('0x3f')](_0x141b('0x40'))){_0xc1cf7b[_0x141b('0x11')]=qs[_0x141b('0x11')](_0x381eb4[_0x141b('0x24')][_0x141b('0x11')]);_0xc1cf7b[_0x141b('0x10')]=qs[_0x141b('0x10')](_0x381eb4[_0x141b('0x24')][_0x141b('0x10')]);}return _0x248249[_0x141b('0x76')](_0xc1cf7b);}})[_0x141b('0x14')](function(_0x47911e){if(_0x47911e){return _0x47911e?{'count':_0x559718,'rows':_0x47911e}:null;}})[_0x141b('0x14')](respondWithResult(_0x56d26f,null))['catch'](handleError(_0x56d26f,null));};
\ No newline at end of file
index 5a443e3..17a7b3f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa4c9=['exports','events','../../mysqldb','WhatsappQueue','save','update','emit','hasOwnProperty','hook'];(function(_0x223461,_0x2bca70){var _0x4dbe0a=function(_0x3c3cb6){while(--_0x3c3cb6){_0x223461['push'](_0x223461['shift']());}};_0x4dbe0a(++_0x2bca70);}(_0xa4c9,0x17b));var _0x9a4c=function(_0x100682,_0x11afec){_0x100682=_0x100682-0x0;var _0xcb6e87=_0xa4c9[_0x100682];return _0xcb6e87;};'use strict';var EventEmitter=require(_0x9a4c('0x0'));var WhatsappQueue=require(_0x9a4c('0x1'))['db'][_0x9a4c('0x2')];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents['setMaxListeners'](0x0);var events={'afterCreate':_0x9a4c('0x3'),'afterUpdate':_0x9a4c('0x4'),'afterDestroy':'remove'};function emitEvent(_0x23357c){return function(_0x4b822a,_0x264cde,_0x2df685){WhatsappQueueEvents[_0x9a4c('0x5')](_0x23357c+':'+_0x4b822a['id'],_0x4b822a);WhatsappQueueEvents[_0x9a4c('0x5')](_0x23357c,_0x4b822a);_0x2df685(null);};}for(var e in events){if(events[_0x9a4c('0x6')](e)){var event=events[e];WhatsappQueue[_0x9a4c('0x7')](e,emitEvent(event));}}module[_0x9a4c('0x8')]=WhatsappQueueEvents;
\ No newline at end of file
+var _0x5e5a=['hasOwnProperty','exports','../../mysqldb','WhatsappQueue','setMaxListeners','remove','emit'];(function(_0x2f957e,_0x1a62c0){var _0x23108a=function(_0xe7ba38){while(--_0xe7ba38){_0x2f957e['push'](_0x2f957e['shift']());}};_0x23108a(++_0x1a62c0);}(_0x5e5a,0x1ec));var _0xa5e5=function(_0x288f5e,_0x205edd){_0x288f5e=_0x288f5e-0x0;var _0x476cc9=_0x5e5a[_0x288f5e];return _0x476cc9;};'use strict';var EventEmitter=require('events');var WhatsappQueue=require(_0xa5e5('0x0'))['db'][_0xa5e5('0x1')];var WhatsappQueueEvents=new EventEmitter();WhatsappQueueEvents[_0xa5e5('0x2')](0x0);var events={'afterCreate':'save','afterUpdate':'update','afterDestroy':_0xa5e5('0x3')};function emitEvent(_0x4bacdd){return function(_0x160cac,_0x5f3e6d,_0x20b49f){WhatsappQueueEvents[_0xa5e5('0x4')](_0x4bacdd+':'+_0x160cac['id'],_0x160cac);WhatsappQueueEvents['emit'](_0x4bacdd,_0x160cac);_0x20b49f(null);};}for(var e in events){if(events[_0xa5e5('0x5')](e)){var event=events[e];WhatsappQueue['hook'](e,emitEvent(event));}}module[_0xa5e5('0x6')]=WhatsappQueueEvents;
\ No newline at end of file
index 0b1da49..98fffb1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9603=['lodash','util','../../config/logger','moment','rimraf','../../config/environment','exports','define','WhatsappQueue','whatsapp_queues'];(function(_0xddc86d,_0x514baf){var _0x911dc0=function(_0x58d0de){while(--_0x58d0de){_0xddc86d['push'](_0xddc86d['shift']());}};_0x911dc0(++_0x514baf);}(_0x9603,0x1ae));var _0x3960=function(_0x55c43c,_0x1b8fac){_0x55c43c=_0x55c43c-0x0;var _0xcc6ad1=_0x9603[_0x55c43c];return _0xcc6ad1;};'use strict';var _=require(_0x3960('0x0'));var util=require(_0x3960('0x1'));var logger=require(_0x3960('0x2'))('api');var moment=require(_0x3960('0x3'));var BPromise=require('bluebird');var rp=require('request-promise');var fs=require('fs');var path=require('path');var rimraf=require(_0x3960('0x4'));var config=require(_0x3960('0x5'));var attributes=require('./whatsappQueue.attributes');module[_0x3960('0x6')]=function(_0x437b91,_0x14c987){return _0x437b91[_0x3960('0x7')](_0x3960('0x8'),attributes,{'tableName':_0x3960('0x9'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
+var _0x246c=['../../config/environment','./whatsappQueue.attributes','define','WhatsappQueue','whatsapp_queues','lodash','../../config/logger','api','moment','bluebird','path'];(function(_0xaf5d44,_0x5642db){var _0x1e0a8c=function(_0x4d1ef5){while(--_0x4d1ef5){_0xaf5d44['push'](_0xaf5d44['shift']());}};_0x1e0a8c(++_0x5642db);}(_0x246c,0x102));var _0xc246=function(_0x4cf98e,_0xba4b79){_0x4cf98e=_0x4cf98e-0x0;var _0x1623ac=_0x246c[_0x4cf98e];return _0x1623ac;};'use strict';var _=require(_0xc246('0x0'));var util=require('util');var logger=require(_0xc246('0x1'))(_0xc246('0x2'));var moment=require(_0xc246('0x3'));var BPromise=require(_0xc246('0x4'));var rp=require('request-promise');var fs=require('fs');var path=require(_0xc246('0x5'));var rimraf=require('rimraf');var config=require(_0xc246('0x6'));var attributes=require(_0xc246('0x7'));module['exports']=function(_0xcf6a93,_0x442a95){return _0xcf6a93[_0xc246('0x8')](_0xc246('0x9'),attributes,{'tableName':_0xc246('0xa'),'paranoid':![],'indexes':[],'timestamps':!![]});};
\ No newline at end of file
index 0c173e8..4ad06ce 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2a6d=['GetWhatsappQueue','ShowWhatsappQueue','find','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost','./whatsappQueue.socket','register','then','info','request\x20sent','debug','WhatsappQueue,\x20%s,\x20%s,\x20%s','stringify','error','WhatsappQueue,\x20%s,\x20%s','message','catch','WhatsappQueue','findAll','options','raw','where','attributes','include','model','map'];(function(_0x2ef7d5,_0x26a839){var _0x425acf=function(_0x91777){while(--_0x91777){_0x2ef7d5['push'](_0x2ef7d5['shift']());}};_0x425acf(++_0x26a839);}(_0x2a6d,0xed));var _0xd2a6=function(_0x527cb7,_0x321a3d){_0x527cb7=_0x527cb7-0x0;var _0x2fac8e=_0x2a6d[_0x527cb7];return _0x2fac8e;};'use strict';var _=require('lodash');var util=require(_0xd2a6('0x0'));var moment=require(_0xd2a6('0x1'));var BPromise=require(_0xd2a6('0x2'));var rs=require(_0xd2a6('0x3'));var fs=require('fs');var Redis=require(_0xd2a6('0x4'));var db=require(_0xd2a6('0x5'))['db'];var utils=require(_0xd2a6('0x6'));var logger=require('../../config/logger')(_0xd2a6('0x7'));var config=require(_0xd2a6('0x8'));var jayson=require(_0xd2a6('0x9'));var client=jayson[_0xd2a6('0xa')][_0xd2a6('0xb')]({'port':0x232a});config[_0xd2a6('0xc')]=_[_0xd2a6('0xd')](config[_0xd2a6('0xc')],{'host':_0xd2a6('0xe'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0xd2a6('0xc')]));require(_0xd2a6('0xf'))[_0xd2a6('0x10')](socket);function respondWithRpcPromise(_0x18dbae,_0x58c8af,_0x48c741){return new BPromise(function(_0xa7e4f4,_0x279e1f){return client['request'](_0x18dbae,_0x48c741)[_0xd2a6('0x11')](function(_0x37ed3c){logger[_0xd2a6('0x12')]('WhatsappQueue,\x20%s,\x20%s',_0x58c8af,_0xd2a6('0x13'));logger[_0xd2a6('0x14')](_0xd2a6('0x15'),_0x58c8af,_0xd2a6('0x13'),JSON[_0xd2a6('0x16')](_0x37ed3c));if(_0x37ed3c[_0xd2a6('0x17')]){if(_0x37ed3c[_0xd2a6('0x17')]['code']===0x1f4){logger[_0xd2a6('0x17')](_0xd2a6('0x18'),_0x58c8af,_0x37ed3c[_0xd2a6('0x17')]['message']);return _0x279e1f(_0x37ed3c['error'][_0xd2a6('0x19')]);}logger[_0xd2a6('0x17')](_0xd2a6('0x18'),_0x58c8af,_0x37ed3c[_0xd2a6('0x17')][_0xd2a6('0x19')]);return _0xa7e4f4(_0x37ed3c['error'][_0xd2a6('0x19')]);}else{logger[_0xd2a6('0x12')](_0xd2a6('0x18'),_0x58c8af,'request\x20sent');_0xa7e4f4(_0x37ed3c['result'][_0xd2a6('0x19')]);}})[_0xd2a6('0x1a')](function(_0x44ce81){logger[_0xd2a6('0x17')](_0xd2a6('0x18'),_0x58c8af,_0x44ce81);_0x279e1f(_0x44ce81);});});}exports['GetWhatsappQueue']=function(_0x52c7a1){var _0x24303b=this;return new Promise(function(_0x36e8a3,_0x10cdc5){return db[_0xd2a6('0x1b')][_0xd2a6('0x1c')]({'raw':_0x52c7a1[_0xd2a6('0x1d')]?_0x52c7a1[_0xd2a6('0x1d')][_0xd2a6('0x1e')]===undefined?!![]:![]:!![],'where':_0x52c7a1[_0xd2a6('0x1d')]?_0x52c7a1[_0xd2a6('0x1d')][_0xd2a6('0x1f')]||null:null,'attributes':_0x52c7a1[_0xd2a6('0x1d')]?_0x52c7a1['options'][_0xd2a6('0x20')]||null:null,'limit':_0x52c7a1[_0xd2a6('0x1d')]?_0x52c7a1[_0xd2a6('0x1d')]['limit']||null:null,'include':_0x52c7a1[_0xd2a6('0x1d')]?_0x52c7a1[_0xd2a6('0x1d')][_0xd2a6('0x21')]?_['map'](_0x52c7a1['options'][_0xd2a6('0x21')],function(_0x32a107){return{'model':db[_0x32a107[_0xd2a6('0x22')]],'as':_0x32a107['as'],'attributes':_0x32a107['attributes'],'include':_0x32a107[_0xd2a6('0x21')]?_[_0xd2a6('0x23')](_0x32a107[_0xd2a6('0x21')],function(_0x1077fb){return{'model':db[_0x1077fb[_0xd2a6('0x22')]],'as':_0x1077fb['as'],'attributes':_0x1077fb[_0xd2a6('0x20')],'include':_0x1077fb[_0xd2a6('0x21')]?_[_0xd2a6('0x23')](_0x1077fb['include'],function(_0x3e530c){return{'model':db[_0x3e530c[_0xd2a6('0x22')]],'as':_0x3e530c['as'],'attributes':_0x3e530c[_0xd2a6('0x20')]};}):[]};}):[]};}):[]:[]})[_0xd2a6('0x11')](function(_0x393812){logger[_0xd2a6('0x12')](_0xd2a6('0x24'),_0x52c7a1);logger[_0xd2a6('0x14')]('GetWhatsappQueue',_0x52c7a1,JSON[_0xd2a6('0x16')](_0x393812));_0x36e8a3(_0x393812);})[_0xd2a6('0x1a')](function(_0x32dec7){logger[_0xd2a6('0x17')](_0xd2a6('0x24'),_0x32dec7[_0xd2a6('0x19')],_0x52c7a1);_0x10cdc5(_0x24303b[_0xd2a6('0x17')](0x1f4,_0x32dec7[_0xd2a6('0x19')]));});});};exports[_0xd2a6('0x25')]=function(_0x2a9e63){var _0x3e3403=this;return new Promise(function(_0x36d22a,_0x3ed8b4){return db['WhatsappQueue'][_0xd2a6('0x26')]({'raw':_0x2a9e63[_0xd2a6('0x1d')]?_0x2a9e63[_0xd2a6('0x1d')][_0xd2a6('0x1e')]===undefined?!![]:![]:!![],'where':_0x2a9e63['options']?_0x2a9e63[_0xd2a6('0x1d')]['where']||null:null,'attributes':_0x2a9e63['options']?_0x2a9e63['options'][_0xd2a6('0x20')]||null:null,'include':_0x2a9e63[_0xd2a6('0x1d')]?_0x2a9e63[_0xd2a6('0x1d')][_0xd2a6('0x21')]?_[_0xd2a6('0x23')](_0x2a9e63['options']['include'],function(_0x138e91){return{'model':db[_0x138e91[_0xd2a6('0x22')]],'as':_0x138e91['as'],'attributes':_0x138e91[_0xd2a6('0x20')],'include':_0x138e91[_0xd2a6('0x21')]?_[_0xd2a6('0x23')](_0x138e91[_0xd2a6('0x21')],function(_0x6a3e45){return{'model':db[_0x6a3e45[_0xd2a6('0x22')]],'as':_0x6a3e45['as'],'attributes':_0x6a3e45[_0xd2a6('0x20')],'include':_0x6a3e45[_0xd2a6('0x21')]?_[_0xd2a6('0x23')](_0x6a3e45[_0xd2a6('0x21')],function(_0x57aa35){return{'model':db[_0x57aa35[_0xd2a6('0x22')]],'as':_0x57aa35['as'],'attributes':_0x57aa35[_0xd2a6('0x20')]};}):[]};}):[]};}):[]:[]})[_0xd2a6('0x11')](function(_0x35562e){logger[_0xd2a6('0x12')](_0xd2a6('0x25'),_0x2a9e63);logger[_0xd2a6('0x14')](_0xd2a6('0x25'),_0x2a9e63,JSON['stringify'](_0x35562e));_0x36d22a(_0x35562e);})[_0xd2a6('0x1a')](function(_0x5197a3){logger[_0xd2a6('0x17')](_0xd2a6('0x25'),_0x5197a3[_0xd2a6('0x19')],_0x2a9e63);_0x3ed8b4(_0x3e3403[_0xd2a6('0x17')](0x1f4,_0x5197a3[_0xd2a6('0x19')]));});});};
\ No newline at end of file
+var _0xc535=['socket.io-emitter','./whatsappQueue.socket','request','then','info','WhatsappQueue,\x20%s,\x20%s','request\x20sent','debug','WhatsappQueue,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','catch','GetWhatsappQueue','WhatsappQueue','options','where','limit','include','map','attributes','model','ShowWhatsappQueue','find','raw','lodash','util','moment','randomstring','ioredis','../../config/utils','../../config/logger','rpc','../../config/environment','jayson/promise','client','http','redis','defaults','localhost'];(function(_0x583eb0,_0x1e663d){var _0x2e4735=function(_0x4c9076){while(--_0x4c9076){_0x583eb0['push'](_0x583eb0['shift']());}};_0x2e4735(++_0x1e663d);}(_0xc535,0x1e9));var _0x5c53=function(_0x1b7574,_0x510040){_0x1b7574=_0x1b7574-0x0;var _0x4fd02a=_0xc535[_0x1b7574];return _0x4fd02a;};'use strict';var _=require(_0x5c53('0x0'));var util=require(_0x5c53('0x1'));var moment=require(_0x5c53('0x2'));var BPromise=require('bluebird');var rs=require(_0x5c53('0x3'));var fs=require('fs');var Redis=require(_0x5c53('0x4'));var db=require('../../mysqldb')['db'];var utils=require(_0x5c53('0x5'));var logger=require(_0x5c53('0x6'))(_0x5c53('0x7'));var config=require(_0x5c53('0x8'));var jayson=require(_0x5c53('0x9'));var client=jayson[_0x5c53('0xa')][_0x5c53('0xb')]({'port':0x232a});config[_0x5c53('0xc')]=_[_0x5c53('0xd')](config[_0x5c53('0xc')],{'host':_0x5c53('0xe'),'port':0x18eb});var socket=require(_0x5c53('0xf'))(new Redis(config[_0x5c53('0xc')]));require(_0x5c53('0x10'))['register'](socket);function respondWithRpcPromise(_0x5e0800,_0x1dd215,_0x2faa2e){return new BPromise(function(_0x8495c3,_0x395dc9){return client[_0x5c53('0x11')](_0x5e0800,_0x2faa2e)[_0x5c53('0x12')](function(_0x2ae9f1){logger[_0x5c53('0x13')](_0x5c53('0x14'),_0x1dd215,_0x5c53('0x15'));logger[_0x5c53('0x16')](_0x5c53('0x17'),_0x1dd215,'request\x20sent',JSON[_0x5c53('0x18')](_0x2ae9f1));if(_0x2ae9f1['error']){if(_0x2ae9f1[_0x5c53('0x19')][_0x5c53('0x1a')]===0x1f4){logger['error'](_0x5c53('0x14'),_0x1dd215,_0x2ae9f1['error']['message']);return _0x395dc9(_0x2ae9f1[_0x5c53('0x19')][_0x5c53('0x1b')]);}logger[_0x5c53('0x19')](_0x5c53('0x14'),_0x1dd215,_0x2ae9f1[_0x5c53('0x19')][_0x5c53('0x1b')]);return _0x8495c3(_0x2ae9f1[_0x5c53('0x19')][_0x5c53('0x1b')]);}else{logger['info'](_0x5c53('0x14'),_0x1dd215,'request\x20sent');_0x8495c3(_0x2ae9f1[_0x5c53('0x1c')][_0x5c53('0x1b')]);}})[_0x5c53('0x1d')](function(_0x58c7e0){logger[_0x5c53('0x19')]('WhatsappQueue,\x20%s,\x20%s',_0x1dd215,_0x58c7e0);_0x395dc9(_0x58c7e0);});});}exports[_0x5c53('0x1e')]=function(_0x4ddadd){var _0x4dfa1a=this;return new Promise(function(_0x26e8e5,_0x460b03){return db[_0x5c53('0x1f')]['findAll']({'raw':_0x4ddadd[_0x5c53('0x20')]?_0x4ddadd[_0x5c53('0x20')]['raw']===undefined?!![]:![]:!![],'where':_0x4ddadd['options']?_0x4ddadd[_0x5c53('0x20')][_0x5c53('0x21')]||null:null,'attributes':_0x4ddadd[_0x5c53('0x20')]?_0x4ddadd[_0x5c53('0x20')]['attributes']||null:null,'limit':_0x4ddadd[_0x5c53('0x20')]?_0x4ddadd[_0x5c53('0x20')][_0x5c53('0x22')]||null:null,'include':_0x4ddadd[_0x5c53('0x20')]?_0x4ddadd[_0x5c53('0x20')][_0x5c53('0x23')]?_[_0x5c53('0x24')](_0x4ddadd['options'][_0x5c53('0x23')],function(_0x153953){return{'model':db[_0x153953['model']],'as':_0x153953['as'],'attributes':_0x153953[_0x5c53('0x25')],'include':_0x153953[_0x5c53('0x23')]?_[_0x5c53('0x24')](_0x153953[_0x5c53('0x23')],function(_0x2e46eb){return{'model':db[_0x2e46eb[_0x5c53('0x26')]],'as':_0x2e46eb['as'],'attributes':_0x2e46eb[_0x5c53('0x25')],'include':_0x2e46eb[_0x5c53('0x23')]?_[_0x5c53('0x24')](_0x2e46eb[_0x5c53('0x23')],function(_0x259899){return{'model':db[_0x259899[_0x5c53('0x26')]],'as':_0x259899['as'],'attributes':_0x259899[_0x5c53('0x25')]};}):[]};}):[]};}):[]:[]})[_0x5c53('0x12')](function(_0x40a3dc){logger[_0x5c53('0x13')](_0x5c53('0x1e'),_0x4ddadd);logger[_0x5c53('0x16')]('GetWhatsappQueue',_0x4ddadd,JSON['stringify'](_0x40a3dc));_0x26e8e5(_0x40a3dc);})[_0x5c53('0x1d')](function(_0x33389e){logger[_0x5c53('0x19')](_0x5c53('0x1e'),_0x33389e['message'],_0x4ddadd);_0x460b03(_0x4dfa1a[_0x5c53('0x19')](0x1f4,_0x33389e[_0x5c53('0x1b')]));});});};exports[_0x5c53('0x27')]=function(_0x1be3ea){var _0x5ab2b2=this;return new Promise(function(_0x2708a6,_0x4fb36f){return db['WhatsappQueue'][_0x5c53('0x28')]({'raw':_0x1be3ea['options']?_0x1be3ea[_0x5c53('0x20')][_0x5c53('0x29')]===undefined?!![]:![]:!![],'where':_0x1be3ea[_0x5c53('0x20')]?_0x1be3ea[_0x5c53('0x20')][_0x5c53('0x21')]||null:null,'attributes':_0x1be3ea[_0x5c53('0x20')]?_0x1be3ea[_0x5c53('0x20')][_0x5c53('0x25')]||null:null,'include':_0x1be3ea[_0x5c53('0x20')]?_0x1be3ea['options'][_0x5c53('0x23')]?_['map'](_0x1be3ea[_0x5c53('0x20')][_0x5c53('0x23')],function(_0x27e349){return{'model':db[_0x27e349['model']],'as':_0x27e349['as'],'attributes':_0x27e349['attributes'],'include':_0x27e349['include']?_[_0x5c53('0x24')](_0x27e349[_0x5c53('0x23')],function(_0x531141){return{'model':db[_0x531141[_0x5c53('0x26')]],'as':_0x531141['as'],'attributes':_0x531141[_0x5c53('0x25')],'include':_0x531141[_0x5c53('0x23')]?_[_0x5c53('0x24')](_0x531141['include'],function(_0x3ee049){return{'model':db[_0x3ee049[_0x5c53('0x26')]],'as':_0x3ee049['as'],'attributes':_0x3ee049['attributes']};}):[]};}):[]};}):[]:[]})[_0x5c53('0x12')](function(_0x541ec3){logger[_0x5c53('0x13')](_0x5c53('0x27'),_0x1be3ea);logger[_0x5c53('0x16')](_0x5c53('0x27'),_0x1be3ea,JSON[_0x5c53('0x18')](_0x541ec3));_0x2708a6(_0x541ec3);})[_0x5c53('0x1d')](function(_0x3631ca){logger['error'](_0x5c53('0x27'),_0x3631ca['message'],_0x1be3ea);_0x4fb36f(_0x5ab2b2['error'](0x1f4,_0x3631ca[_0x5c53('0x1b')]));});});};
\ No newline at end of file
index ab1f441..44d3ab2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc214=['emit','removeListener','register','length','./whatsappQueue.events','save','remove','update'];(function(_0x204f4e,_0x37dfd9){var _0xefeb78=function(_0x1c5fa8){while(--_0x1c5fa8){_0x204f4e['push'](_0x204f4e['shift']());}};_0xefeb78(++_0x37dfd9);}(_0xc214,0x9c));var _0x4c21=function(_0x45bf86,_0x75586e){_0x45bf86=_0x45bf86-0x0;var _0x1f02b7=_0xc214[_0x45bf86];return _0x1f02b7;};'use strict';var WhatsappQueueEvents=require(_0x4c21('0x0'));var events=[_0x4c21('0x1'),_0x4c21('0x2'),_0x4c21('0x3')];function createListener(_0x37658c,_0x3a06e1){return function(_0x1efe06){_0x3a06e1[_0x4c21('0x4')](_0x37658c,_0x1efe06);};}function removeListener(_0x161469,_0x3ba0a3){return function(){WhatsappQueueEvents[_0x4c21('0x5')](_0x161469,_0x3ba0a3);};}exports[_0x4c21('0x6')]=function(_0x4fc700){for(var _0x727e0b=0x0,_0x1c478c=events[_0x4c21('0x7')];_0x727e0b<_0x1c478c;_0x727e0b++){var _0x48ce81=events[_0x727e0b];var _0xe7359e=createListener('whatsappQueue:'+_0x48ce81,_0x4fc700);WhatsappQueueEvents['on'](_0x48ce81,_0xe7359e);}};
\ No newline at end of file
+var _0x093a=['remove','update','register','length','./whatsappQueue.events'];(function(_0x3f88bc,_0xe38cf5){var _0x4df1c4=function(_0x111de1){while(--_0x111de1){_0x3f88bc['push'](_0x3f88bc['shift']());}};_0x4df1c4(++_0xe38cf5);}(_0x093a,0xcc));var _0xa093=function(_0x44afa4,_0x5be27b){_0x44afa4=_0x44afa4-0x0;var _0xcad289=_0x093a[_0x44afa4];return _0xcad289;};'use strict';var WhatsappQueueEvents=require(_0xa093('0x0'));var events=['save',_0xa093('0x1'),_0xa093('0x2')];function createListener(_0x2bb484,_0x330ea9){return function(_0xd2e567){_0x330ea9['emit'](_0x2bb484,_0xd2e567);};}function removeListener(_0x3df4e7,_0x4095e5){return function(){WhatsappQueueEvents['removeListener'](_0x3df4e7,_0x4095e5);};}exports[_0xa093('0x3')]=function(_0x1cd54b){for(var _0x5953ee=0x0,_0x1fe2c8=events[_0xa093('0x4')];_0x5953ee<_0x1fe2c8;_0x5953ee++){var _0x531e37=events[_0x5953ee];var _0x49ff07=createListener('whatsappQueue:'+_0x531e37,_0x1cd54b);WhatsappQueueEvents['on'](_0x531e37,_0x49ff07);}};
\ No newline at end of file
index cde6891..d975887 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe7bd=['../../components/interaction/service','../../config/environment','./whatsappQueueReport.controller','get','isAuthenticated','index','/describe','describe','show','post','create','/:id','update','delete','destroy','exports','multer','util','express','Router','fs-extra','../../components/auth/service'];(function(_0xfc7e8f,_0x56be0d){var _0x2db532=function(_0x3dd0c5){while(--_0x3dd0c5){_0xfc7e8f['push'](_0xfc7e8f['shift']());}};_0x2db532(++_0x56be0d);}(_0xe7bd,0xec));var _0xde7b=function(_0x34aec4,_0x3801da){_0x34aec4=_0x34aec4-0x0;var _0x51e1a7=_0xe7bd[_0x34aec4];return _0x51e1a7;};'use strict';var multer=require(_0xde7b('0x0'));var util=require(_0xde7b('0x1'));var path=require('path');var timeout=require('connect-timeout');var express=require(_0xde7b('0x2'));var router=express[_0xde7b('0x3')]();var fs_extra=require(_0xde7b('0x4'));var auth=require(_0xde7b('0x5'));var interaction=require(_0xde7b('0x6'));var config=require(_0xde7b('0x7'));var controller=require(_0xde7b('0x8'));router[_0xde7b('0x9')]('/',auth[_0xde7b('0xa')](),controller[_0xde7b('0xb')]);router['get'](_0xde7b('0xc'),auth['isAuthenticated'](),controller[_0xde7b('0xd')]);router[_0xde7b('0x9')]('/:id',auth[_0xde7b('0xa')](),controller[_0xde7b('0xe')]);router[_0xde7b('0xf')]('/',auth[_0xde7b('0xa')](),controller[_0xde7b('0x10')]);router['put'](_0xde7b('0x11'),auth[_0xde7b('0xa')](),controller[_0xde7b('0x12')]);router[_0xde7b('0x13')](_0xde7b('0x11'),auth[_0xde7b('0xa')](),controller[_0xde7b('0x14')]);module[_0xde7b('0x15')]=router;
\ No newline at end of file
+var _0x223c=['multer','util','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','isAuthenticated','index','/describe','post','create','/:id','update','delete','destroy','exports'];(function(_0x51e9bc,_0x49ae39){var _0x1b422a=function(_0x37579d){while(--_0x37579d){_0x51e9bc['push'](_0x51e9bc['shift']());}};_0x1b422a(++_0x49ae39);}(_0x223c,0x64));var _0xc223=function(_0x501510,_0x61caa9){_0x501510=_0x501510-0x0;var _0x1e6ee5=_0x223c[_0x501510];return _0x1e6ee5;};'use strict';var multer=require(_0xc223('0x0'));var util=require(_0xc223('0x1'));var path=require('path');var timeout=require(_0xc223('0x2'));var express=require(_0xc223('0x3'));var router=express[_0xc223('0x4')]();var fs_extra=require(_0xc223('0x5'));var auth=require(_0xc223('0x6'));var interaction=require(_0xc223('0x7'));var config=require(_0xc223('0x8'));var controller=require('./whatsappQueueReport.controller');router[_0xc223('0x9')]('/',auth[_0xc223('0xa')](),controller[_0xc223('0xb')]);router['get'](_0xc223('0xc'),auth[_0xc223('0xa')](),controller['describe']);router[_0xc223('0x9')]('/:id',auth[_0xc223('0xa')](),controller['show']);router[_0xc223('0xd')]('/',auth[_0xc223('0xa')](),controller[_0xc223('0xe')]);router['put'](_0xc223('0xf'),auth[_0xc223('0xa')](),controller[_0xc223('0x10')]);router[_0xc223('0x11')](_0xc223('0xf'),auth[_0xc223('0xa')](),controller[_0xc223('0x12')]);module[_0xc223('0x13')]=router;
\ No newline at end of file
index a669319..a3a78e9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9957=['exports','STRING','DATE','sequelize'];(function(_0x4d3710,_0x3b57af){var _0x532c71=function(_0x3668c0){while(--_0x3668c0){_0x4d3710['push'](_0x4d3710['shift']());}};_0x532c71(++_0x3b57af);}(_0x9957,0x93));var _0x7995=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0x9957[_0x5ddb1c];return _0x354adc;};'use strict';var Sequelize=require(_0x7995('0x0'));module[_0x7995('0x1')]={'uniqueid':{'type':Sequelize[_0x7995('0x2')],'allowNull':![]},'from':{'type':Sequelize[_0x7995('0x2')]},'joinAt':{'type':Sequelize['DATE']},'leaveAt':{'type':Sequelize[_0x7995('0x3')]},'acceptAt':{'type':Sequelize[_0x7995('0x3')]},'exitAt':{'type':Sequelize[_0x7995('0x3')]},'reason':{'type':Sequelize[_0x7995('0x2')]}};
\ No newline at end of file
+var _0x7a54=['STRING','DATE','sequelize','exports'];(function(_0x3d24a3,_0x3893ae){var _0x209258=function(_0x13f1d4){while(--_0x13f1d4){_0x3d24a3['push'](_0x3d24a3['shift']());}};_0x209258(++_0x3893ae);}(_0x7a54,0x106));var _0x47a5=function(_0x5b1c48,_0x2f762d){_0x5b1c48=_0x5b1c48-0x0;var _0x2e7328=_0x7a54[_0x5b1c48];return _0x2e7328;};'use strict';var Sequelize=require(_0x47a5('0x0'));module[_0x47a5('0x1')]={'uniqueid':{'type':Sequelize[_0x47a5('0x2')],'allowNull':![]},'from':{'type':Sequelize['STRING']},'joinAt':{'type':Sequelize[_0x47a5('0x3')]},'leaveAt':{'type':Sequelize[_0x47a5('0x3')]},'acceptAt':{'type':Sequelize['DATE']},'exitAt':{'type':Sequelize[_0x47a5('0x3')]},'reason':{'type':Sequelize[_0x47a5('0x2')]}};
\ No newline at end of file
index 444d182..16fb96a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x02ce=['then','destroy','error','name','index','map','WhatsappQueueReport','rawAttributes','type','key','model','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','findAll','rows','catch','show','keys','includeAll','options','find','create','body','params','describe','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','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','../../mysqldb','sendStatus','json','offset','undefined','count','limit','status','Content-Range','apply','reject','save','update'];(function(_0x2d758c,_0x4e96a1){var _0x16e3fe=function(_0x3a8ace){while(--_0x3a8ace){_0x2d758c['push'](_0x2d758c['shift']());}};_0x16e3fe(++_0x4e96a1);}(_0x02ce,0x1ac));var _0xe02c=function(_0xb735d1,_0x45d992){_0xb735d1=_0xb735d1-0x0;var _0x5d3fc3=_0x02ce[_0xb735d1];return _0x5d3fc3;};'use strict';var emlformat=require(_0xe02c('0x0'));var rimraf=require(_0xe02c('0x1'));var zipdir=require(_0xe02c('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe02c('0x3'));var moment=require('moment');var BPromise=require(_0xe02c('0x4'));var Mustache=require(_0xe02c('0x5'));var util=require(_0xe02c('0x6'));var path=require(_0xe02c('0x7'));var sox=require(_0xe02c('0x8'));var csv=require(_0xe02c('0x9'));var ejs=require(_0xe02c('0xa'));var fs=require('fs');var fs_extra=require(_0xe02c('0xb'));var _=require(_0xe02c('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xe02c('0xd'));var deskjs=require(_0xe02c('0xe'));var toCsv=require(_0xe02c('0x9'));var querystring=require(_0xe02c('0xf'));var Papa=require(_0xe02c('0x10'));var Redis=require(_0xe02c('0x11'));var authService=require(_0xe02c('0x12'));var qs=require(_0xe02c('0x13'));var as=require(_0xe02c('0x14'));var hardwareService=require(_0xe02c('0x15'));var logger=require(_0xe02c('0x16'))(_0xe02c('0x17'));var utils=require(_0xe02c('0x18'));var config=require(_0xe02c('0x19'));var licenseUtil=require(_0xe02c('0x1a'));var db=require(_0xe02c('0x1b'))['db'];function respondWithStatusCode(_0x23d886,_0x32fc45){_0x32fc45=_0x32fc45||0xcc;return function(_0x5d6d13){if(_0x5d6d13){return _0x23d886[_0xe02c('0x1c')](_0x32fc45);}return _0x23d886['status'](_0x32fc45)['end']();};}function respondWithResult(_0x3f4e28,_0x56405a){_0x56405a=_0x56405a||0xc8;return function(_0x221910){if(_0x221910){return _0x3f4e28['status'](_0x56405a)[_0xe02c('0x1d')](_0x221910);}};}function respondWithFilteredResult(_0x4e9c6d,_0x256311){return function(_0x366893){if(_0x366893){var _0x59f2f6=typeof _0x256311[_0xe02c('0x1e')]===_0xe02c('0x1f')&&typeof _0x256311['limit']===_0xe02c('0x1f');var _0x20f492=_0x366893['count'];var _0x52917f=_0x59f2f6?0x0:_0x256311[_0xe02c('0x1e')];var _0x49604a=_0x59f2f6?_0x366893[_0xe02c('0x20')]:_0x256311[_0xe02c('0x1e')]+_0x256311[_0xe02c('0x21')];var _0x36fed0;if(_0x49604a>=_0x20f492){_0x49604a=_0x20f492;_0x36fed0=0xc8;}else{_0x36fed0=0xce;}_0x4e9c6d[_0xe02c('0x22')](_0x36fed0);return _0x4e9c6d['set'](_0xe02c('0x23'),_0x52917f+'-'+_0x49604a+'/'+_0x20f492)['json'](_0x366893);}return null;};}function patchUpdates(_0x4ea9b5){return function(_0x393621){try{jsonpatch[_0xe02c('0x24')](_0x393621,_0x4ea9b5,!![]);}catch(_0x480b9a){return BPromise[_0xe02c('0x25')](_0x480b9a);}return _0x393621[_0xe02c('0x26')]();};}function saveUpdates(_0x4ce5ee,_0x38dce2){return function(_0x45fd82){if(_0x45fd82){return _0x45fd82[_0xe02c('0x27')](_0x4ce5ee)[_0xe02c('0x28')](function(_0x2d44c8){return _0x2d44c8;});}return null;};}function removeEntity(_0x557142,_0x3e80e3){return function(_0xf41d4c){if(_0xf41d4c){return _0xf41d4c[_0xe02c('0x29')]()[_0xe02c('0x28')](function(){_0x557142[_0xe02c('0x22')](0xcc)['end']();});}};}function handleEntityNotFound(_0xefd882,_0x4411d8){return function(_0x3592ca){if(!_0x3592ca){_0xefd882[_0xe02c('0x1c')](0x194);}return _0x3592ca;};}function handleError(_0x16dfa3,_0x303d24){_0x303d24=_0x303d24||0x1f4;return function(_0x43dc78){logger[_0xe02c('0x2a')](_0x43dc78['stack']);if(_0x43dc78[_0xe02c('0x2b')]){delete _0x43dc78[_0xe02c('0x2b')];}_0x16dfa3[_0xe02c('0x22')](_0x303d24)['send'](_0x43dc78);};}exports[_0xe02c('0x2c')]=function(_0x2d1d98,_0x445421){var _0x287f7e={},_0x1e7eab={},_0x35a309={'count':0x0,'rows':[]};var _0x22a285=_[_0xe02c('0x2d')](db[_0xe02c('0x2e')][_0xe02c('0x2f')],function(_0x17d5b3){return{'name':_0x17d5b3['fieldName'],'type':_0x17d5b3[_0xe02c('0x30')][_0xe02c('0x31')]};});_0x1e7eab[_0xe02c('0x32')]=_[_0xe02c('0x2d')](_0x22a285,_0xe02c('0x2b'));_0x1e7eab[_0xe02c('0x33')]=_['keys'](_0x2d1d98[_0xe02c('0x33')]);_0x1e7eab[_0xe02c('0x34')]=_['intersection'](_0x1e7eab[_0xe02c('0x32')],_0x1e7eab[_0xe02c('0x33')]);_0x287f7e[_0xe02c('0x35')]=_[_0xe02c('0x36')](_0x1e7eab[_0xe02c('0x32')],qs['fields'](_0x2d1d98['query'][_0xe02c('0x37')]));_0x287f7e[_0xe02c('0x35')]=_0x287f7e['attributes'][_0xe02c('0x38')]?_0x287f7e['attributes']:_0x1e7eab[_0xe02c('0x32')];if(!_0x2d1d98[_0xe02c('0x33')][_0xe02c('0x39')](_0xe02c('0x3a'))){_0x287f7e[_0xe02c('0x21')]=qs['limit'](_0x2d1d98[_0xe02c('0x33')]['limit']);_0x287f7e[_0xe02c('0x1e')]=qs[_0xe02c('0x1e')](_0x2d1d98[_0xe02c('0x33')][_0xe02c('0x1e')]);}_0x287f7e[_0xe02c('0x3b')]=qs[_0xe02c('0x3c')](_0x2d1d98['query'][_0xe02c('0x3c')]);_0x287f7e[_0xe02c('0x3d')]=qs['filters'](_[_0xe02c('0x3e')](_0x2d1d98[_0xe02c('0x33')],_0x1e7eab['filters']),_0x22a285);if(_0x2d1d98[_0xe02c('0x33')]['filter']){_0x287f7e[_0xe02c('0x3d')]=_[_0xe02c('0x3f')](_0x287f7e['where'],{'$or':_[_0xe02c('0x2d')](_0x22a285,function(_0x1eeddb){if(_0x1eeddb[_0xe02c('0x30')]!==_0xe02c('0x40')){var _0x3c4a65={};_0x3c4a65[_0x1eeddb[_0xe02c('0x2b')]]={'$like':'%'+_0x2d1d98['query'][_0xe02c('0x41')]+'%'};return _0x3c4a65;}})});}_0x287f7e=_['merge']({},_0x287f7e,_0x2d1d98['options']);var _0x3db057={'where':_0x287f7e[_0xe02c('0x3d')]};return db[_0xe02c('0x2e')][_0xe02c('0x20')](_0x3db057)['then'](function(_0x37e4fe){_0x35a309[_0xe02c('0x20')]=_0x37e4fe;if(_0x2d1d98[_0xe02c('0x33')]['includeAll']){_0x287f7e['include']=[{'all':!![]}];}return db[_0xe02c('0x2e')][_0xe02c('0x42')](_0x287f7e);})[_0xe02c('0x28')](function(_0x2313d2){_0x35a309[_0xe02c('0x43')]=_0x2313d2;return _0x35a309;})[_0xe02c('0x28')](respondWithFilteredResult(_0x445421,_0x287f7e))[_0xe02c('0x44')](handleError(_0x445421,null));};exports[_0xe02c('0x45')]=function(_0x21d66e,_0x53d123){var _0xc7e935={'raw':!![],'where':{'id':_0x21d66e['params']['id']}},_0x5ef4a1={};_0x5ef4a1[_0xe02c('0x32')]=_[_0xe02c('0x46')](db[_0xe02c('0x2e')][_0xe02c('0x2f')]);_0x5ef4a1[_0xe02c('0x33')]=_[_0xe02c('0x46')](_0x21d66e[_0xe02c('0x33')]);_0x5ef4a1[_0xe02c('0x34')]=_['intersection'](_0x5ef4a1['model'],_0x5ef4a1[_0xe02c('0x33')]);_0xc7e935[_0xe02c('0x35')]=_[_0xe02c('0x36')](_0x5ef4a1['model'],qs[_0xe02c('0x37')](_0x21d66e[_0xe02c('0x33')][_0xe02c('0x37')]));_0xc7e935[_0xe02c('0x35')]=_0xc7e935[_0xe02c('0x35')][_0xe02c('0x38')]?_0xc7e935[_0xe02c('0x35')]:_0x5ef4a1[_0xe02c('0x32')];if(_0x21d66e[_0xe02c('0x33')][_0xe02c('0x47')]){_0xc7e935['include']=[{'all':!![]}];}_0xc7e935=_[_0xe02c('0x3f')]({},_0xc7e935,_0x21d66e[_0xe02c('0x48')]);return db[_0xe02c('0x2e')][_0xe02c('0x49')](_0xc7e935)[_0xe02c('0x28')](handleEntityNotFound(_0x53d123,null))[_0xe02c('0x28')](respondWithResult(_0x53d123,null))[_0xe02c('0x44')](handleError(_0x53d123,null));};exports[_0xe02c('0x4a')]=function(_0x30dc90,_0x1176c9){return db[_0xe02c('0x2e')][_0xe02c('0x4a')](_0x30dc90[_0xe02c('0x4b')],{})['then'](respondWithResult(_0x1176c9,0xc9))[_0xe02c('0x44')](handleError(_0x1176c9,null));};exports['update']=function(_0x15b05c,_0x324911){if(_0x15b05c[_0xe02c('0x4b')]['id']){delete _0x15b05c[_0xe02c('0x4b')]['id'];}return db[_0xe02c('0x2e')][_0xe02c('0x49')]({'where':{'id':_0x15b05c[_0xe02c('0x4c')]['id']}})[_0xe02c('0x28')](handleEntityNotFound(_0x324911,null))[_0xe02c('0x28')](saveUpdates(_0x15b05c[_0xe02c('0x4b')],null))['then'](respondWithResult(_0x324911,null))[_0xe02c('0x44')](handleError(_0x324911,null));};exports[_0xe02c('0x29')]=function(_0xeb4214,_0x536cf7){return db[_0xe02c('0x2e')]['find']({'where':{'id':_0xeb4214[_0xe02c('0x4c')]['id']}})['then'](handleEntityNotFound(_0x536cf7,null))['then'](removeEntity(_0x536cf7,null))['catch'](handleError(_0x536cf7,null));};exports['describe']=function(_0x51d540,_0x5740df){return db[_0xe02c('0x2e')][_0xe02c('0x4d')]()[_0xe02c('0x28')](respondWithResult(_0x5740df,null))[_0xe02c('0x44')](handleError(_0x5740df,null));};
\ No newline at end of file
+var _0x02ce=['then','destroy','error','name','index','map','WhatsappQueueReport','rawAttributes','type','key','model','query','filters','attributes','intersection','fields','length','hasOwnProperty','nolimit','order','sort','where','pick','merge','VIRTUAL','filter','findAll','rows','catch','show','keys','includeAll','options','find','create','body','params','describe','eml-format','rimraf','zip-dir','request-promise','bluebird','mustache','util','path','sox','to-csv','ejs','fs-extra','lodash','jsforce','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','../../mysqldb','sendStatus','json','offset','undefined','count','limit','status','Content-Range','apply','reject','save','update'];(function(_0x169c73,_0x25ae7c){var _0x4eee20=function(_0x426a1c){while(--_0x426a1c){_0x169c73['push'](_0x169c73['shift']());}};_0x4eee20(++_0x25ae7c);}(_0x02ce,0x1ac));var _0xe02c=function(_0x3d4fac,_0x523fb8){_0x3d4fac=_0x3d4fac-0x0;var _0x3db219=_0x02ce[_0x3d4fac];return _0x3db219;};'use strict';var emlformat=require(_0xe02c('0x0'));var rimraf=require(_0xe02c('0x1'));var zipdir=require(_0xe02c('0x2'));var jsonpatch=require('fast-json-patch');var rp=require(_0xe02c('0x3'));var moment=require('moment');var BPromise=require(_0xe02c('0x4'));var Mustache=require(_0xe02c('0x5'));var util=require(_0xe02c('0x6'));var path=require(_0xe02c('0x7'));var sox=require(_0xe02c('0x8'));var csv=require(_0xe02c('0x9'));var ejs=require(_0xe02c('0xa'));var fs=require('fs');var fs_extra=require(_0xe02c('0xb'));var _=require(_0xe02c('0xc'));var squel=require('squel');var crypto=require('crypto');var jsforce=require(_0xe02c('0xd'));var deskjs=require(_0xe02c('0xe'));var toCsv=require(_0xe02c('0x9'));var querystring=require(_0xe02c('0xf'));var Papa=require(_0xe02c('0x10'));var Redis=require(_0xe02c('0x11'));var authService=require(_0xe02c('0x12'));var qs=require(_0xe02c('0x13'));var as=require(_0xe02c('0x14'));var hardwareService=require(_0xe02c('0x15'));var logger=require(_0xe02c('0x16'))(_0xe02c('0x17'));var utils=require(_0xe02c('0x18'));var config=require(_0xe02c('0x19'));var licenseUtil=require(_0xe02c('0x1a'));var db=require(_0xe02c('0x1b'))['db'];function respondWithStatusCode(_0x23d886,_0x32fc45){_0x32fc45=_0x32fc45||0xcc;return function(_0x5d6d13){if(_0x5d6d13){return _0x23d886[_0xe02c('0x1c')](_0x32fc45);}return _0x23d886['status'](_0x32fc45)['end']();};}function respondWithResult(_0x3f4e28,_0x56405a){_0x56405a=_0x56405a||0xc8;return function(_0x221910){if(_0x221910){return _0x3f4e28['status'](_0x56405a)[_0xe02c('0x1d')](_0x221910);}};}function respondWithFilteredResult(_0x4e9c6d,_0x256311){return function(_0x366893){if(_0x366893){var _0x59f2f6=typeof _0x256311[_0xe02c('0x1e')]===_0xe02c('0x1f')&&typeof _0x256311['limit']===_0xe02c('0x1f');var _0x20f492=_0x366893['count'];var _0x52917f=_0x59f2f6?0x0:_0x256311[_0xe02c('0x1e')];var _0x49604a=_0x59f2f6?_0x366893[_0xe02c('0x20')]:_0x256311[_0xe02c('0x1e')]+_0x256311[_0xe02c('0x21')];var _0x36fed0;if(_0x49604a>=_0x20f492){_0x49604a=_0x20f492;_0x36fed0=0xc8;}else{_0x36fed0=0xce;}_0x4e9c6d[_0xe02c('0x22')](_0x36fed0);return _0x4e9c6d['set'](_0xe02c('0x23'),_0x52917f+'-'+_0x49604a+'/'+_0x20f492)['json'](_0x366893);}return null;};}function patchUpdates(_0x4ea9b5){return function(_0x393621){try{jsonpatch[_0xe02c('0x24')](_0x393621,_0x4ea9b5,!![]);}catch(_0x480b9a){return BPromise[_0xe02c('0x25')](_0x480b9a);}return _0x393621[_0xe02c('0x26')]();};}function saveUpdates(_0x4ce5ee,_0x38dce2){return function(_0x45fd82){if(_0x45fd82){return _0x45fd82[_0xe02c('0x27')](_0x4ce5ee)[_0xe02c('0x28')](function(_0x2d44c8){return _0x2d44c8;});}return null;};}function removeEntity(_0x557142,_0x3e80e3){return function(_0xf41d4c){if(_0xf41d4c){return _0xf41d4c[_0xe02c('0x29')]()[_0xe02c('0x28')](function(){_0x557142[_0xe02c('0x22')](0xcc)['end']();});}};}function handleEntityNotFound(_0xefd882,_0x4411d8){return function(_0x3592ca){if(!_0x3592ca){_0xefd882[_0xe02c('0x1c')](0x194);}return _0x3592ca;};}function handleError(_0x16dfa3,_0x303d24){_0x303d24=_0x303d24||0x1f4;return function(_0x43dc78){logger[_0xe02c('0x2a')](_0x43dc78['stack']);if(_0x43dc78[_0xe02c('0x2b')]){delete _0x43dc78[_0xe02c('0x2b')];}_0x16dfa3[_0xe02c('0x22')](_0x303d24)['send'](_0x43dc78);};}exports[_0xe02c('0x2c')]=function(_0x2d1d98,_0x445421){var _0x287f7e={},_0x1e7eab={},_0x35a309={'count':0x0,'rows':[]};var _0x22a285=_[_0xe02c('0x2d')](db[_0xe02c('0x2e')][_0xe02c('0x2f')],function(_0x17d5b3){return{'name':_0x17d5b3['fieldName'],'type':_0x17d5b3[_0xe02c('0x30')][_0xe02c('0x31')]};});_0x1e7eab[_0xe02c('0x32')]=_[_0xe02c('0x2d')](_0x22a285,_0xe02c('0x2b'));_0x1e7eab[_0xe02c('0x33')]=_['keys'](_0x2d1d98[_0xe02c('0x33')]);_0x1e7eab[_0xe02c('0x34')]=_['intersection'](_0x1e7eab[_0xe02c('0x32')],_0x1e7eab[_0xe02c('0x33')]);_0x287f7e[_0xe02c('0x35')]=_[_0xe02c('0x36')](_0x1e7eab[_0xe02c('0x32')],qs['fields'](_0x2d1d98['query'][_0xe02c('0x37')]));_0x287f7e[_0xe02c('0x35')]=_0x287f7e['attributes'][_0xe02c('0x38')]?_0x287f7e['attributes']:_0x1e7eab[_0xe02c('0x32')];if(!_0x2d1d98[_0xe02c('0x33')][_0xe02c('0x39')](_0xe02c('0x3a'))){_0x287f7e[_0xe02c('0x21')]=qs['limit'](_0x2d1d98[_0xe02c('0x33')]['limit']);_0x287f7e[_0xe02c('0x1e')]=qs[_0xe02c('0x1e')](_0x2d1d98[_0xe02c('0x33')][_0xe02c('0x1e')]);}_0x287f7e[_0xe02c('0x3b')]=qs[_0xe02c('0x3c')](_0x2d1d98['query'][_0xe02c('0x3c')]);_0x287f7e[_0xe02c('0x3d')]=qs['filters'](_[_0xe02c('0x3e')](_0x2d1d98[_0xe02c('0x33')],_0x1e7eab['filters']),_0x22a285);if(_0x2d1d98[_0xe02c('0x33')]['filter']){_0x287f7e[_0xe02c('0x3d')]=_[_0xe02c('0x3f')](_0x287f7e['where'],{'$or':_[_0xe02c('0x2d')](_0x22a285,function(_0x1eeddb){if(_0x1eeddb[_0xe02c('0x30')]!==_0xe02c('0x40')){var _0x3c4a65={};_0x3c4a65[_0x1eeddb[_0xe02c('0x2b')]]={'$like':'%'+_0x2d1d98['query'][_0xe02c('0x41')]+'%'};return _0x3c4a65;}})});}_0x287f7e=_['merge']({},_0x287f7e,_0x2d1d98['options']);var _0x3db057={'where':_0x287f7e[_0xe02c('0x3d')]};return db[_0xe02c('0x2e')][_0xe02c('0x20')](_0x3db057)['then'](function(_0x37e4fe){_0x35a309[_0xe02c('0x20')]=_0x37e4fe;if(_0x2d1d98[_0xe02c('0x33')]['includeAll']){_0x287f7e['include']=[{'all':!![]}];}return db[_0xe02c('0x2e')][_0xe02c('0x42')](_0x287f7e);})[_0xe02c('0x28')](function(_0x2313d2){_0x35a309[_0xe02c('0x43')]=_0x2313d2;return _0x35a309;})[_0xe02c('0x28')](respondWithFilteredResult(_0x445421,_0x287f7e))[_0xe02c('0x44')](handleError(_0x445421,null));};exports[_0xe02c('0x45')]=function(_0x21d66e,_0x53d123){var _0xc7e935={'raw':!![],'where':{'id':_0x21d66e['params']['id']}},_0x5ef4a1={};_0x5ef4a1[_0xe02c('0x32')]=_[_0xe02c('0x46')](db[_0xe02c('0x2e')][_0xe02c('0x2f')]);_0x5ef4a1[_0xe02c('0x33')]=_[_0xe02c('0x46')](_0x21d66e[_0xe02c('0x33')]);_0x5ef4a1[_0xe02c('0x34')]=_['intersection'](_0x5ef4a1['model'],_0x5ef4a1[_0xe02c('0x33')]);_0xc7e935[_0xe02c('0x35')]=_[_0xe02c('0x36')](_0x5ef4a1['model'],qs[_0xe02c('0x37')](_0x21d66e[_0xe02c('0x33')][_0xe02c('0x37')]));_0xc7e935[_0xe02c('0x35')]=_0xc7e935[_0xe02c('0x35')][_0xe02c('0x38')]?_0xc7e935[_0xe02c('0x35')]:_0x5ef4a1[_0xe02c('0x32')];if(_0x21d66e[_0xe02c('0x33')][_0xe02c('0x47')]){_0xc7e935['include']=[{'all':!![]}];}_0xc7e935=_[_0xe02c('0x3f')]({},_0xc7e935,_0x21d66e[_0xe02c('0x48')]);return db[_0xe02c('0x2e')][_0xe02c('0x49')](_0xc7e935)[_0xe02c('0x28')](handleEntityNotFound(_0x53d123,null))[_0xe02c('0x28')](respondWithResult(_0x53d123,null))[_0xe02c('0x44')](handleError(_0x53d123,null));};exports[_0xe02c('0x4a')]=function(_0x30dc90,_0x1176c9){return db[_0xe02c('0x2e')][_0xe02c('0x4a')](_0x30dc90[_0xe02c('0x4b')],{})['then'](respondWithResult(_0x1176c9,0xc9))[_0xe02c('0x44')](handleError(_0x1176c9,null));};exports['update']=function(_0x15b05c,_0x324911){if(_0x15b05c[_0xe02c('0x4b')]['id']){delete _0x15b05c[_0xe02c('0x4b')]['id'];}return db[_0xe02c('0x2e')][_0xe02c('0x49')]({'where':{'id':_0x15b05c[_0xe02c('0x4c')]['id']}})[_0xe02c('0x28')](handleEntityNotFound(_0x324911,null))[_0xe02c('0x28')](saveUpdates(_0x15b05c[_0xe02c('0x4b')],null))['then'](respondWithResult(_0x324911,null))[_0xe02c('0x44')](handleError(_0x324911,null));};exports[_0xe02c('0x29')]=function(_0xeb4214,_0x536cf7){return db[_0xe02c('0x2e')]['find']({'where':{'id':_0xeb4214[_0xe02c('0x4c')]['id']}})['then'](handleEntityNotFound(_0x536cf7,null))['then'](removeEntity(_0x536cf7,null))['catch'](handleError(_0x536cf7,null));};exports['describe']=function(_0x51d540,_0x5740df){return db[_0xe02c('0x2e')][_0xe02c('0x4d')]()[_0xe02c('0x28')](respondWithResult(_0x5740df,null))[_0xe02c('0x44')](handleError(_0x5740df,null));};
\ No newline at end of file
index 46b8535..65f24fb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0c8e=['bluebird','request-promise','path','./whatsappQueueReport.attributes','exports','define','WhatsappQueueReport','uniqueid','lodash','util','api','moment'];(function(_0x4ed520,_0x21be63){var _0x4415a6=function(_0x14b151){while(--_0x14b151){_0x4ed520['push'](_0x4ed520['shift']());}};_0x4415a6(++_0x21be63);}(_0x0c8e,0x1c4));var _0xe0c8=function(_0xea8783,_0x189de9){_0xea8783=_0xea8783-0x0;var _0x43e2be=_0x0c8e[_0xea8783];return _0x43e2be;};'use strict';var _=require(_0xe0c8('0x0'));var util=require(_0xe0c8('0x1'));var logger=require('../../config/logger')(_0xe0c8('0x2'));var moment=require(_0xe0c8('0x3'));var BPromise=require(_0xe0c8('0x4'));var rp=require(_0xe0c8('0x5'));var fs=require('fs');var path=require(_0xe0c8('0x6'));var rimraf=require('rimraf');var config=require('../../config/environment');var attributes=require(_0xe0c8('0x7'));module[_0xe0c8('0x8')]=function(_0x22083f,_0xb45d1c){return _0x22083f[_0xe0c8('0x9')](_0xe0c8('0xa'),attributes,{'tableName':'report_whatsapp_queue','paranoid':![],'indexes':[{'name':_0xe0c8('0xb'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xd9a0=['exports','WhatsappQueueReport','report_whatsapp_queue','uniqueid','util','../../config/logger','api','moment','bluebird','request-promise','path','../../config/environment','./whatsappQueueReport.attributes'];(function(_0x2cc842,_0xd6800d){var _0x24adab=function(_0x41ab67){while(--_0x41ab67){_0x2cc842['push'](_0x2cc842['shift']());}};_0x24adab(++_0xd6800d);}(_0xd9a0,0x197));var _0x0d9a=function(_0x37fb9e,_0x3ce746){_0x37fb9e=_0x37fb9e-0x0;var _0x38a526=_0xd9a0[_0x37fb9e];return _0x38a526;};'use strict';var _=require('lodash');var util=require(_0x0d9a('0x0'));var logger=require(_0x0d9a('0x1'))(_0x0d9a('0x2'));var moment=require(_0x0d9a('0x3'));var BPromise=require(_0x0d9a('0x4'));var rp=require(_0x0d9a('0x5'));var fs=require('fs');var path=require(_0x0d9a('0x6'));var rimraf=require('rimraf');var config=require(_0x0d9a('0x7'));var attributes=require(_0x0d9a('0x8'));module[_0x0d9a('0x9')]=function(_0x17394e,_0x5d5f4e){return _0x17394e['define'](_0x0d9a('0xa'),attributes,{'tableName':_0x0d9a('0xb'),'paranoid':![],'indexes':[{'name':_0x0d9a('0xc'),'fields':[_0x0d9a('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
index 80a9814..315e72b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x10b2=['../../config/environment','jayson/promise','http','request','then','info','WhatsappQueueReport,\x20%s,\x20%s','request\x20sent','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s','stringify','error','code','message','result','CreateWhatsappQueueReport','WhatsappQueueReport','create','body','options','UpdateWhatsappQueueReport','attributes','lodash','util','randomstring','../../config/logger','rpc'];(function(_0x36c777,_0x2616f2){var _0x8c2dc5=function(_0x1539a0){while(--_0x1539a0){_0x36c777['push'](_0x36c777['shift']());}};_0x8c2dc5(++_0x2616f2);}(_0x10b2,0x13f));var _0x210b=function(_0x2f85a8,_0x20e6f9){_0x2f85a8=_0x2f85a8-0x0;var _0x26b98d=_0x10b2[_0x2f85a8];return _0x26b98d;};'use strict';var _=require(_0x210b('0x0'));var util=require(_0x210b('0x1'));var moment=require('moment');var BPromise=require('bluebird');var rs=require(_0x210b('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require('../../mysqldb')['db'];var utils=require('../../config/utils');var logger=require(_0x210b('0x3'))(_0x210b('0x4'));var config=require(_0x210b('0x5'));var jayson=require(_0x210b('0x6'));var client=jayson['client'][_0x210b('0x7')]({'port':0x232a});function respondWithRpcPromise(_0x5a89a9,_0x100241,_0x4292bf){return new BPromise(function(_0xba986b,_0x455d18){return client[_0x210b('0x8')](_0x5a89a9,_0x4292bf)[_0x210b('0x9')](function(_0x3ac7e8){logger[_0x210b('0xa')](_0x210b('0xb'),_0x100241,_0x210b('0xc'));logger[_0x210b('0xd')](_0x210b('0xe'),_0x100241,_0x210b('0xc'),JSON[_0x210b('0xf')](_0x3ac7e8));if(_0x3ac7e8['error']){if(_0x3ac7e8[_0x210b('0x10')][_0x210b('0x11')]===0x1f4){logger['error']('WhatsappQueueReport,\x20%s,\x20%s',_0x100241,_0x3ac7e8[_0x210b('0x10')][_0x210b('0x12')]);return _0x455d18(_0x3ac7e8[_0x210b('0x10')][_0x210b('0x12')]);}logger[_0x210b('0x10')](_0x210b('0xb'),_0x100241,_0x3ac7e8['error'][_0x210b('0x12')]);return _0xba986b(_0x3ac7e8[_0x210b('0x10')]['message']);}else{logger[_0x210b('0xa')](_0x210b('0xb'),_0x100241,_0x210b('0xc'));_0xba986b(_0x3ac7e8[_0x210b('0x13')]['message']);}})['catch'](function(_0x5adf1a){logger[_0x210b('0x10')](_0x210b('0xb'),_0x100241,_0x5adf1a);_0x455d18(_0x5adf1a);});});}exports[_0x210b('0x14')]=function(_0x1ab474){var _0xacd061=this;return new Promise(function(_0x25b41d,_0x2e571a){return db[_0x210b('0x15')][_0x210b('0x16')](_0x1ab474[_0x210b('0x17')],{'raw':_0x1ab474[_0x210b('0x18')]?_0x1ab474[_0x210b('0x18')]['raw']===undefined?!![]:![]:!![]})[_0x210b('0x9')](function(_0x3bcfde){logger[_0x210b('0xa')]('CreateWhatsappQueueReport',_0x1ab474);logger['debug'](_0x210b('0x14'),_0x1ab474,JSON[_0x210b('0xf')](_0x3bcfde));_0x25b41d(_0x3bcfde);})['catch'](function(_0x1e1e77){logger[_0x210b('0x10')](_0x210b('0x14'),_0x1e1e77[_0x210b('0x12')],_0x1ab474);_0x2e571a(_0xacd061[_0x210b('0x10')](0x1f4,_0x1e1e77[_0x210b('0x12')]));});});};exports[_0x210b('0x19')]=function(_0x1e6676){var _0x549e23=this;return new Promise(function(_0x524200,_0x43bdf9){return db[_0x210b('0x15')]['update'](_0x1e6676['body'],{'raw':_0x1e6676['options']?_0x1e6676[_0x210b('0x18')]['raw']===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x1e6676[_0x210b('0x18')]?_0x1e6676[_0x210b('0x18')]['where']||null:null,'attributes':_0x1e6676[_0x210b('0x18')]?_0x1e6676[_0x210b('0x18')][_0x210b('0x1a')]||null:null,'limit':_0x1e6676[_0x210b('0x18')]?_0x1e6676[_0x210b('0x18')]['limit']||null:null})['then'](function(_0x42d85e){logger['info']('UpdateWhatsappQueueReport',_0x1e6676);logger[_0x210b('0xd')](_0x210b('0x19'),_0x1e6676,JSON[_0x210b('0xf')](_0x42d85e));_0x524200(_0x42d85e);})['catch'](function(_0x4ba778){logger[_0x210b('0x10')](_0x210b('0x19'),_0x4ba778[_0x210b('0x12')],_0x1e6676);_0x43bdf9(_0x549e23[_0x210b('0x10')](0x1f4,_0x4ba778['message']));});});};
\ No newline at end of file
+var _0x28b4=['stringify','error','message','info','result','catch','CreateWhatsappQueueReport','WhatsappQueueReport','create','body','options','raw','UpdateWhatsappQueueReport','update','where','attributes','limit','lodash','util','moment','bluebird','randomstring','ioredis','../../mysqldb','../../config/utils','../../config/logger','rpc','../../config/environment','client','request','then','WhatsappQueueReport,\x20%s,\x20%s','request\x20sent','debug','WhatsappQueueReport,\x20%s,\x20%s,\x20%s'];(function(_0x341e0f,_0x4a09d0){var _0x59555a=function(_0x4343a8){while(--_0x4343a8){_0x341e0f['push'](_0x341e0f['shift']());}};_0x59555a(++_0x4a09d0);}(_0x28b4,0x14c));var _0x428b=function(_0x56341e,_0x3458de){_0x56341e=_0x56341e-0x0;var _0x1f5513=_0x28b4[_0x56341e];return _0x1f5513;};'use strict';var _=require(_0x428b('0x0'));var util=require(_0x428b('0x1'));var moment=require(_0x428b('0x2'));var BPromise=require(_0x428b('0x3'));var rs=require(_0x428b('0x4'));var fs=require('fs');var Redis=require(_0x428b('0x5'));var db=require(_0x428b('0x6'))['db'];var utils=require(_0x428b('0x7'));var logger=require(_0x428b('0x8'))(_0x428b('0x9'));var config=require(_0x428b('0xa'));var jayson=require('jayson/promise');var client=jayson[_0x428b('0xb')]['http']({'port':0x232a});function respondWithRpcPromise(_0x1437f5,_0x143a9f,_0x16893a){return new BPromise(function(_0x86b77b,_0x499a21){return client[_0x428b('0xc')](_0x1437f5,_0x16893a)[_0x428b('0xd')](function(_0x5346bf){logger['info'](_0x428b('0xe'),_0x143a9f,_0x428b('0xf'));logger[_0x428b('0x10')](_0x428b('0x11'),_0x143a9f,'request\x20sent',JSON[_0x428b('0x12')](_0x5346bf));if(_0x5346bf[_0x428b('0x13')]){if(_0x5346bf['error']['code']===0x1f4){logger[_0x428b('0x13')](_0x428b('0xe'),_0x143a9f,_0x5346bf['error']['message']);return _0x499a21(_0x5346bf[_0x428b('0x13')]['message']);}logger[_0x428b('0x13')](_0x428b('0xe'),_0x143a9f,_0x5346bf[_0x428b('0x13')][_0x428b('0x14')]);return _0x86b77b(_0x5346bf[_0x428b('0x13')][_0x428b('0x14')]);}else{logger[_0x428b('0x15')]('WhatsappQueueReport,\x20%s,\x20%s',_0x143a9f,_0x428b('0xf'));_0x86b77b(_0x5346bf[_0x428b('0x16')]['message']);}})[_0x428b('0x17')](function(_0x419955){logger[_0x428b('0x13')](_0x428b('0xe'),_0x143a9f,_0x419955);_0x499a21(_0x419955);});});}exports[_0x428b('0x18')]=function(_0x5de92f){var _0xc8a43=this;return new Promise(function(_0x4656c1,_0x381385){return db[_0x428b('0x19')][_0x428b('0x1a')](_0x5de92f[_0x428b('0x1b')],{'raw':_0x5de92f['options']?_0x5de92f[_0x428b('0x1c')][_0x428b('0x1d')]===undefined?!![]:![]:!![]})[_0x428b('0xd')](function(_0xf2a692){logger[_0x428b('0x15')](_0x428b('0x18'),_0x5de92f);logger[_0x428b('0x10')](_0x428b('0x18'),_0x5de92f,JSON[_0x428b('0x12')](_0xf2a692));_0x4656c1(_0xf2a692);})[_0x428b('0x17')](function(_0x4ca88d){logger[_0x428b('0x13')](_0x428b('0x18'),_0x4ca88d['message'],_0x5de92f);_0x381385(_0xc8a43[_0x428b('0x13')](0x1f4,_0x4ca88d[_0x428b('0x14')]));});});};exports[_0x428b('0x1e')]=function(_0x559ec1){var _0x1f7e90=this;return new Promise(function(_0x2fa3d1,_0x25739d){return db[_0x428b('0x19')][_0x428b('0x1f')](_0x559ec1[_0x428b('0x1b')],{'raw':_0x559ec1[_0x428b('0x1c')]?_0x559ec1[_0x428b('0x1c')][_0x428b('0x1d')]===undefined?!![]:![]:!![],'individualHooks':!![],'where':_0x559ec1[_0x428b('0x1c')]?_0x559ec1[_0x428b('0x1c')][_0x428b('0x20')]||null:null,'attributes':_0x559ec1[_0x428b('0x1c')]?_0x559ec1['options'][_0x428b('0x21')]||null:null,'limit':_0x559ec1['options']?_0x559ec1[_0x428b('0x1c')][_0x428b('0x22')]||null:null})[_0x428b('0xd')](function(_0x9b0741){logger['info'](_0x428b('0x1e'),_0x559ec1);logger['debug']('UpdateWhatsappQueueReport',_0x559ec1,JSON[_0x428b('0x12')](_0x9b0741));_0x2fa3d1(_0x9b0741);})[_0x428b('0x17')](function(_0x5794c9){logger['error']('UpdateWhatsappQueueReport',_0x5794c9[_0x428b('0x14')],_0x559ec1);_0x25739d(_0x1f7e90[_0x428b('0x13')](0x1f4,_0x5794c9[_0x428b('0x14')]));});});};
\ No newline at end of file
index 376ef10..6fe09d8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe176=['Router','fs-extra','../../components/auth/service','../../components/interaction/service','./whatsappTransferReport.controller','get','index','/describe','describe','show','isAuthenticated','/:id','update','destroy','exports','multer','util','path','connect-timeout'];(function(_0x340da7,_0x13d6fc){var _0x43b466=function(_0x59e11e){while(--_0x59e11e){_0x340da7['push'](_0x340da7['shift']());}};_0x43b466(++_0x13d6fc);}(_0xe176,0x1c4));var _0x6e17=function(_0x54d4a8,_0x585a59){_0x54d4a8=_0x54d4a8-0x0;var _0x3b321b=_0xe176[_0x54d4a8];return _0x3b321b;};'use strict';var multer=require(_0x6e17('0x0'));var util=require(_0x6e17('0x1'));var path=require(_0x6e17('0x2'));var timeout=require(_0x6e17('0x3'));var express=require('express');var router=express[_0x6e17('0x4')]();var fs_extra=require(_0x6e17('0x5'));var auth=require(_0x6e17('0x6'));var interaction=require(_0x6e17('0x7'));var config=require('../../config/environment');var controller=require(_0x6e17('0x8'));router[_0x6e17('0x9')]('/',auth['isAuthenticated'](),controller[_0x6e17('0xa')]);router[_0x6e17('0x9')](_0x6e17('0xb'),auth['isAuthenticated'](),controller[_0x6e17('0xc')]);router['get']('/:id',auth['isAuthenticated'](),controller[_0x6e17('0xd')]);router['post']('/',auth[_0x6e17('0xe')](),controller['create']);router['put'](_0x6e17('0xf'),auth['isAuthenticated'](),controller[_0x6e17('0x10')]);router['delete'](_0x6e17('0xf'),auth[_0x6e17('0xe')](),controller[_0x6e17('0x11')]);module[_0x6e17('0x12')]=router;
\ No newline at end of file
+var _0x33c9=['exports','multer','util','path','connect-timeout','express','Router','fs-extra','../../components/auth/service','../../components/interaction/service','../../config/environment','get','index','/describe','isAuthenticated','describe','/:id','show','post','create','put','delete','destroy'];(function(_0xeff2c3,_0x3a5a82){var _0x2cade6=function(_0x5a26a1){while(--_0x5a26a1){_0xeff2c3['push'](_0xeff2c3['shift']());}};_0x2cade6(++_0x3a5a82);}(_0x33c9,0x1cd));var _0x933c=function(_0x51f08c,_0x21efe5){_0x51f08c=_0x51f08c-0x0;var _0x180fe6=_0x33c9[_0x51f08c];return _0x180fe6;};'use strict';var multer=require(_0x933c('0x0'));var util=require(_0x933c('0x1'));var path=require(_0x933c('0x2'));var timeout=require(_0x933c('0x3'));var express=require(_0x933c('0x4'));var router=express[_0x933c('0x5')]();var fs_extra=require(_0x933c('0x6'));var auth=require(_0x933c('0x7'));var interaction=require(_0x933c('0x8'));var config=require(_0x933c('0x9'));var controller=require('./whatsappTransferReport.controller');router[_0x933c('0xa')]('/',auth['isAuthenticated'](),controller[_0x933c('0xb')]);router[_0x933c('0xa')](_0x933c('0xc'),auth[_0x933c('0xd')](),controller[_0x933c('0xe')]);router[_0x933c('0xa')](_0x933c('0xf'),auth['isAuthenticated'](),controller[_0x933c('0x10')]);router[_0x933c('0x11')]('/',auth[_0x933c('0xd')](),controller[_0x933c('0x12')]);router[_0x933c('0x13')]('/:id',auth[_0x933c('0xd')](),controller['update']);router[_0x933c('0x14')](_0x933c('0xf'),auth[_0x933c('0xd')](),controller[_0x933c('0x15')]);module[_0x933c('0x16')]=router;
\ No newline at end of file
index 8f74552..9dbdb40 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8814=['sequelize','ENUM','agent','queue','DATE'];(function(_0x3b380d,_0x4bf247){var _0x54502b=function(_0x35d207){while(--_0x35d207){_0x3b380d['push'](_0x3b380d['shift']());}};_0x54502b(++_0x4bf247);}(_0x8814,0x1b8));var _0x4881=function(_0x318840,_0x561b1e){_0x318840=_0x318840-0x0;var _0x223da4=_0x8814[_0x318840];return _0x223da4;};'use strict';var Sequelize=require(_0x4881('0x0'));module['exports']={'uniqueid':{'type':Sequelize['STRING'],'allowNull':![]},'type':{'type':Sequelize[_0x4881('0x1')]('account',_0x4881('0x2'),_0x4881('0x3')),'allowNull':![]},'transferredAt':{'type':Sequelize[_0x4881('0x4')]}};
\ No newline at end of file
+var _0x6f59=['STRING','ENUM','account','agent','queue','DATE','sequelize','exports'];(function(_0x24ccb8,_0x931eeb){var _0x2c5e01=function(_0x1c747e){while(--_0x1c747e){_0x24ccb8['push'](_0x24ccb8['shift']());}};_0x2c5e01(++_0x931eeb);}(_0x6f59,0x1be));var _0x96f5=function(_0x2e5cfc,_0x3d1890){_0x2e5cfc=_0x2e5cfc-0x0;var _0x3d2a45=_0x6f59[_0x2e5cfc];return _0x3d2a45;};'use strict';var Sequelize=require(_0x96f5('0x0'));module[_0x96f5('0x1')]={'uniqueid':{'type':Sequelize[_0x96f5('0x2')],'allowNull':![]},'type':{'type':Sequelize[_0x96f5('0x3')](_0x96f5('0x4'),_0x96f5('0x5'),_0x96f5('0x6')),'allowNull':![]},'transferredAt':{'type':Sequelize[_0x96f5('0x7')]}};
\ No newline at end of file
index c175abc..a6b0725 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c0b=['then','sendStatus','name','send','map','WhatsappTransferReport','rawAttributes','fieldName','key','keys','filters','intersection','model','fields','attributes','query','nolimit','sort','where','pick','filter','merge','type','options','includeAll','include','findAll','rows','show','params','find','catch','create','body','destroy','describe','eml-format','zip-dir','fast-json-patch','moment','bluebird','mustache','util','path','sox','to-csv','ejs','squel','jsforce','desk.js','querystring','ioredis','../../components/auth/service','../../components/parsers/qs','../../components/parsers/advancedSearch','../../config/license/hardware','../../config/logger','../../config/utils','../../config/environment','../../config/license/util','status','end','offset','undefined','limit','count','set','Content-Range','apply','reject','update'];(function(_0x4d3735,_0x12aa11){var _0x5c733e=function(_0x5ec986){while(--_0x5ec986){_0x4d3735['push'](_0x4d3735['shift']());}};_0x5c733e(++_0x12aa11);}(_0x9c0b,0xb2));var _0xb9c0=function(_0x23b2a6,_0x306cec){_0x23b2a6=_0x23b2a6-0x0;var _0x5704cb=_0x9c0b[_0x23b2a6];return _0x5704cb;};'use strict';var emlformat=require(_0xb9c0('0x0'));var rimraf=require('rimraf');var zipdir=require(_0xb9c0('0x1'));var jsonpatch=require(_0xb9c0('0x2'));var rp=require('request-promise');var moment=require(_0xb9c0('0x3'));var BPromise=require(_0xb9c0('0x4'));var Mustache=require(_0xb9c0('0x5'));var util=require(_0xb9c0('0x6'));var path=require(_0xb9c0('0x7'));var sox=require(_0xb9c0('0x8'));var csv=require(_0xb9c0('0x9'));var ejs=require(_0xb9c0('0xa'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0xb9c0('0xb'));var crypto=require('crypto');var jsforce=require(_0xb9c0('0xc'));var deskjs=require(_0xb9c0('0xd'));var toCsv=require('to-csv');var querystring=require(_0xb9c0('0xe'));var Papa=require('papaparse');var Redis=require(_0xb9c0('0xf'));var authService=require(_0xb9c0('0x10'));var qs=require(_0xb9c0('0x11'));var as=require(_0xb9c0('0x12'));var hardwareService=require(_0xb9c0('0x13'));var logger=require(_0xb9c0('0x14'))('api');var utils=require(_0xb9c0('0x15'));var config=require(_0xb9c0('0x16'));var licenseUtil=require(_0xb9c0('0x17'));var db=require('../../mysqldb')['db'];function respondWithStatusCode(_0xd7a016,_0xf6b4df){_0xf6b4df=_0xf6b4df||0xcc;return function(_0x15a6e4){if(_0x15a6e4){return _0xd7a016['sendStatus'](_0xf6b4df);}return _0xd7a016[_0xb9c0('0x18')](_0xf6b4df)[_0xb9c0('0x19')]();};}function respondWithResult(_0x337f68,_0x13c2cd){_0x13c2cd=_0x13c2cd||0xc8;return function(_0x496f09){if(_0x496f09){return _0x337f68[_0xb9c0('0x18')](_0x13c2cd)['json'](_0x496f09);}};}function respondWithFilteredResult(_0x707074,_0x24e0e3){return function(_0x14d62e){if(_0x14d62e){var _0x27c287=typeof _0x24e0e3[_0xb9c0('0x1a')]===_0xb9c0('0x1b')&&typeof _0x24e0e3[_0xb9c0('0x1c')]===_0xb9c0('0x1b');var _0x4e3c24=_0x14d62e['count'];var _0x2b56ea=_0x27c287?0x0:_0x24e0e3[_0xb9c0('0x1a')];var _0xe43164=_0x27c287?_0x14d62e[_0xb9c0('0x1d')]:_0x24e0e3[_0xb9c0('0x1a')]+_0x24e0e3[_0xb9c0('0x1c')];var _0x131b1e;if(_0xe43164>=_0x4e3c24){_0xe43164=_0x4e3c24;_0x131b1e=0xc8;}else{_0x131b1e=0xce;}_0x707074[_0xb9c0('0x18')](_0x131b1e);return _0x707074[_0xb9c0('0x1e')](_0xb9c0('0x1f'),_0x2b56ea+'-'+_0xe43164+'/'+_0x4e3c24)['json'](_0x14d62e);}return null;};}function patchUpdates(_0x2d8a24){return function(_0x57b73f){try{jsonpatch[_0xb9c0('0x20')](_0x57b73f,_0x2d8a24,!![]);}catch(_0x5e627a){return BPromise[_0xb9c0('0x21')](_0x5e627a);}return _0x57b73f['save']();};}function saveUpdates(_0x4f876a,_0x226628){return function(_0x546bb1){if(_0x546bb1){return _0x546bb1[_0xb9c0('0x22')](_0x4f876a)[_0xb9c0('0x23')](function(_0x2d0570){return _0x2d0570;});}return null;};}function removeEntity(_0x194616,_0x50291e){return function(_0x41772a){if(_0x41772a){return _0x41772a['destroy']()[_0xb9c0('0x23')](function(){_0x194616[_0xb9c0('0x18')](0xcc)[_0xb9c0('0x19')]();});}};}function handleEntityNotFound(_0xff7f4c,_0x30fdfe){return function(_0x3810ce){if(!_0x3810ce){_0xff7f4c[_0xb9c0('0x24')](0x194);}return _0x3810ce;};}function handleError(_0x19b267,_0x41f0fe){_0x41f0fe=_0x41f0fe||0x1f4;return function(_0x18bfb7){logger['error'](_0x18bfb7['stack']);if(_0x18bfb7[_0xb9c0('0x25')]){delete _0x18bfb7[_0xb9c0('0x25')];}_0x19b267[_0xb9c0('0x18')](_0x41f0fe)[_0xb9c0('0x26')](_0x18bfb7);};}exports['index']=function(_0x48fc52,_0x2be3b3){var _0x1c724a={},_0x143673={},_0x549e4b={'count':0x0,'rows':[]};var _0x5c8798=_[_0xb9c0('0x27')](db[_0xb9c0('0x28')][_0xb9c0('0x29')],function(_0x5084d7){return{'name':_0x5084d7[_0xb9c0('0x2a')],'type':_0x5084d7['type'][_0xb9c0('0x2b')]};});_0x143673['model']=_['map'](_0x5c8798,_0xb9c0('0x25'));_0x143673['query']=_[_0xb9c0('0x2c')](_0x48fc52['query']);_0x143673[_0xb9c0('0x2d')]=_[_0xb9c0('0x2e')](_0x143673['model'],_0x143673['query']);_0x1c724a['attributes']=_['intersection'](_0x143673[_0xb9c0('0x2f')],qs['fields'](_0x48fc52['query'][_0xb9c0('0x30')]));_0x1c724a['attributes']=_0x1c724a[_0xb9c0('0x31')]['length']?_0x1c724a[_0xb9c0('0x31')]:_0x143673[_0xb9c0('0x2f')];if(!_0x48fc52[_0xb9c0('0x32')]['hasOwnProperty'](_0xb9c0('0x33'))){_0x1c724a['limit']=qs[_0xb9c0('0x1c')](_0x48fc52[_0xb9c0('0x32')]['limit']);_0x1c724a[_0xb9c0('0x1a')]=qs['offset'](_0x48fc52['query'][_0xb9c0('0x1a')]);}_0x1c724a['order']=qs['sort'](_0x48fc52[_0xb9c0('0x32')][_0xb9c0('0x34')]);_0x1c724a[_0xb9c0('0x35')]=qs[_0xb9c0('0x2d')](_[_0xb9c0('0x36')](_0x48fc52[_0xb9c0('0x32')],_0x143673[_0xb9c0('0x2d')]),_0x5c8798);if(_0x48fc52[_0xb9c0('0x32')][_0xb9c0('0x37')]){_0x1c724a[_0xb9c0('0x35')]=_[_0xb9c0('0x38')](_0x1c724a['where'],{'$or':_['map'](_0x5c8798,function(_0xd0a91){if(_0xd0a91[_0xb9c0('0x39')]!=='VIRTUAL'){var _0x4378ac={};_0x4378ac[_0xd0a91[_0xb9c0('0x25')]]={'$like':'%'+_0x48fc52[_0xb9c0('0x32')][_0xb9c0('0x37')]+'%'};return _0x4378ac;}})});}_0x1c724a=_['merge']({},_0x1c724a,_0x48fc52[_0xb9c0('0x3a')]);var _0x20033d={'where':_0x1c724a['where']};return db[_0xb9c0('0x28')][_0xb9c0('0x1d')](_0x20033d)[_0xb9c0('0x23')](function(_0x33a438){_0x549e4b[_0xb9c0('0x1d')]=_0x33a438;if(_0x48fc52[_0xb9c0('0x32')][_0xb9c0('0x3b')]){_0x1c724a[_0xb9c0('0x3c')]=[{'all':!![]}];}return db[_0xb9c0('0x28')][_0xb9c0('0x3d')](_0x1c724a);})['then'](function(_0x4e47c3){_0x549e4b[_0xb9c0('0x3e')]=_0x4e47c3;return _0x549e4b;})[_0xb9c0('0x23')](respondWithFilteredResult(_0x2be3b3,_0x1c724a))['catch'](handleError(_0x2be3b3,null));};exports[_0xb9c0('0x3f')]=function(_0x48c9b3,_0x5a04ee){var _0x2ba790={'raw':!![],'where':{'id':_0x48c9b3[_0xb9c0('0x40')]['id']}},_0x26b807={};_0x26b807['model']=_[_0xb9c0('0x2c')](db[_0xb9c0('0x28')]['rawAttributes']);_0x26b807[_0xb9c0('0x32')]=_[_0xb9c0('0x2c')](_0x48c9b3[_0xb9c0('0x32')]);_0x26b807[_0xb9c0('0x2d')]=_[_0xb9c0('0x2e')](_0x26b807[_0xb9c0('0x2f')],_0x26b807[_0xb9c0('0x32')]);_0x2ba790[_0xb9c0('0x31')]=_[_0xb9c0('0x2e')](_0x26b807[_0xb9c0('0x2f')],qs['fields'](_0x48c9b3['query'][_0xb9c0('0x30')]));_0x2ba790[_0xb9c0('0x31')]=_0x2ba790[_0xb9c0('0x31')]['length']?_0x2ba790['attributes']:_0x26b807[_0xb9c0('0x2f')];if(_0x48c9b3[_0xb9c0('0x32')]['includeAll']){_0x2ba790[_0xb9c0('0x3c')]=[{'all':!![]}];}_0x2ba790=_[_0xb9c0('0x38')]({},_0x2ba790,_0x48c9b3[_0xb9c0('0x3a')]);return db['WhatsappTransferReport'][_0xb9c0('0x41')](_0x2ba790)[_0xb9c0('0x23')](handleEntityNotFound(_0x5a04ee,null))[_0xb9c0('0x23')](respondWithResult(_0x5a04ee,null))[_0xb9c0('0x42')](handleError(_0x5a04ee,null));};exports[_0xb9c0('0x43')]=function(_0x3ca4c7,_0x4c0cc1){return db[_0xb9c0('0x28')][_0xb9c0('0x43')](_0x3ca4c7[_0xb9c0('0x44')],{})[_0xb9c0('0x23')](respondWithResult(_0x4c0cc1,0xc9))[_0xb9c0('0x42')](handleError(_0x4c0cc1,null));};exports[_0xb9c0('0x22')]=function(_0x5b017,_0x19fa0b){if(_0x5b017['body']['id']){delete _0x5b017['body']['id'];}return db[_0xb9c0('0x28')][_0xb9c0('0x41')]({'where':{'id':_0x5b017[_0xb9c0('0x40')]['id']}})[_0xb9c0('0x23')](handleEntityNotFound(_0x19fa0b,null))[_0xb9c0('0x23')](saveUpdates(_0x5b017[_0xb9c0('0x44')],null))[_0xb9c0('0x23')](respondWithResult(_0x19fa0b,null))['catch'](handleError(_0x19fa0b,null));};exports[_0xb9c0('0x45')]=function(_0x2d70b1,_0x19c650){return db[_0xb9c0('0x28')][_0xb9c0('0x41')]({'where':{'id':_0x2d70b1['params']['id']}})[_0xb9c0('0x23')](handleEntityNotFound(_0x19c650,null))[_0xb9c0('0x23')](removeEntity(_0x19c650,null))['catch'](handleError(_0x19c650,null));};exports[_0xb9c0('0x46')]=function(_0x23acd1,_0x14f139){return db[_0xb9c0('0x28')][_0xb9c0('0x46')]()[_0xb9c0('0x23')](respondWithResult(_0x14f139,null))['catch'](handleError(_0x14f139,null));};
\ No newline at end of file
+var _0xd5c8=['Content-Range','apply','reject','save','then','destroy','error','name','send','index','map','WhatsappTransferReport','fieldName','type','key','model','query','keys','filters','intersection','attributes','fields','length','hasOwnProperty','nolimit','limit','order','sort','where','pick','filter','VIRTUAL','merge','options','includeAll','findAll','catch','show','rawAttributes','include','create','body','update','params','find','describe','zip-dir','fast-json-patch','request-promise','moment','bluebird','mustache','util','path','sox','ejs','squel','crypto','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','json','undefined','count','offset'];(function(_0x3bd160,_0x3e1a0a){var _0x5bb055=function(_0x1a2619){while(--_0x1a2619){_0x3bd160['push'](_0x3bd160['shift']());}};_0x5bb055(++_0x3e1a0a);}(_0xd5c8,0x166));var _0x8d5c=function(_0x3f8647,_0x39c233){_0x3f8647=_0x3f8647-0x0;var _0x39d095=_0xd5c8[_0x3f8647];return _0x39d095;};'use strict';var emlformat=require('eml-format');var rimraf=require('rimraf');var zipdir=require(_0x8d5c('0x0'));var jsonpatch=require(_0x8d5c('0x1'));var rp=require(_0x8d5c('0x2'));var moment=require(_0x8d5c('0x3'));var BPromise=require(_0x8d5c('0x4'));var Mustache=require(_0x8d5c('0x5'));var util=require(_0x8d5c('0x6'));var path=require(_0x8d5c('0x7'));var sox=require(_0x8d5c('0x8'));var csv=require('to-csv');var ejs=require(_0x8d5c('0x9'));var fs=require('fs');var fs_extra=require('fs-extra');var _=require('lodash');var squel=require(_0x8d5c('0xa'));var crypto=require(_0x8d5c('0xb'));var jsforce=require(_0x8d5c('0xc'));var deskjs=require(_0x8d5c('0xd'));var toCsv=require('to-csv');var querystring=require('querystring');var Papa=require(_0x8d5c('0xe'));var Redis=require('ioredis');var authService=require(_0x8d5c('0xf'));var qs=require(_0x8d5c('0x10'));var as=require(_0x8d5c('0x11'));var hardwareService=require(_0x8d5c('0x12'));var logger=require(_0x8d5c('0x13'))(_0x8d5c('0x14'));var utils=require(_0x8d5c('0x15'));var config=require(_0x8d5c('0x16'));var licenseUtil=require(_0x8d5c('0x17'));var db=require(_0x8d5c('0x18'))['db'];function respondWithStatusCode(_0x2a9a0e,_0x4152cd){_0x4152cd=_0x4152cd||0xcc;return function(_0x4c7321){if(_0x4c7321){return _0x2a9a0e[_0x8d5c('0x19')](_0x4152cd);}return _0x2a9a0e[_0x8d5c('0x1a')](_0x4152cd)[_0x8d5c('0x1b')]();};}function respondWithResult(_0x32dbd8,_0xa5a078){_0xa5a078=_0xa5a078||0xc8;return function(_0x149e54){if(_0x149e54){return _0x32dbd8[_0x8d5c('0x1a')](_0xa5a078)[_0x8d5c('0x1c')](_0x149e54);}};}function respondWithFilteredResult(_0x516388,_0x3146f4){return function(_0x144717){if(_0x144717){var _0x4ee2af=typeof _0x3146f4['offset']===_0x8d5c('0x1d')&&typeof _0x3146f4['limit']==='undefined';var _0x4f552a=_0x144717[_0x8d5c('0x1e')];var _0x43f233=_0x4ee2af?0x0:_0x3146f4[_0x8d5c('0x1f')];var _0x189005=_0x4ee2af?_0x144717[_0x8d5c('0x1e')]:_0x3146f4[_0x8d5c('0x1f')]+_0x3146f4['limit'];var _0x581eef;if(_0x189005>=_0x4f552a){_0x189005=_0x4f552a;_0x581eef=0xc8;}else{_0x581eef=0xce;}_0x516388['status'](_0x581eef);return _0x516388['set'](_0x8d5c('0x20'),_0x43f233+'-'+_0x189005+'/'+_0x4f552a)[_0x8d5c('0x1c')](_0x144717);}return null;};}function patchUpdates(_0x31cd31){return function(_0x273cba){try{jsonpatch[_0x8d5c('0x21')](_0x273cba,_0x31cd31,!![]);}catch(_0x9399ce){return BPromise[_0x8d5c('0x22')](_0x9399ce);}return _0x273cba[_0x8d5c('0x23')]();};}function saveUpdates(_0x28111e,_0x358b5b){return function(_0x2f7487){if(_0x2f7487){return _0x2f7487['update'](_0x28111e)[_0x8d5c('0x24')](function(_0x2c74ab){return _0x2c74ab;});}return null;};}function removeEntity(_0x4c0cdf,_0x251da8){return function(_0x3e7ed6){if(_0x3e7ed6){return _0x3e7ed6[_0x8d5c('0x25')]()[_0x8d5c('0x24')](function(){_0x4c0cdf['status'](0xcc)[_0x8d5c('0x1b')]();});}};}function handleEntityNotFound(_0x22457f,_0x506828){return function(_0x5e0daa){if(!_0x5e0daa){_0x22457f[_0x8d5c('0x19')](0x194);}return _0x5e0daa;};}function handleError(_0xa8aeac,_0x53e5e0){_0x53e5e0=_0x53e5e0||0x1f4;return function(_0x5ecafa){logger[_0x8d5c('0x26')](_0x5ecafa['stack']);if(_0x5ecafa[_0x8d5c('0x27')]){delete _0x5ecafa[_0x8d5c('0x27')];}_0xa8aeac[_0x8d5c('0x1a')](_0x53e5e0)[_0x8d5c('0x28')](_0x5ecafa);};}exports[_0x8d5c('0x29')]=function(_0xd060b1,_0x2302a8){var _0x3cfb68={},_0x2c940f={},_0x56153f={'count':0x0,'rows':[]};var _0x473f0a=_[_0x8d5c('0x2a')](db[_0x8d5c('0x2b')]['rawAttributes'],function(_0xe7290){return{'name':_0xe7290[_0x8d5c('0x2c')],'type':_0xe7290[_0x8d5c('0x2d')][_0x8d5c('0x2e')]};});_0x2c940f[_0x8d5c('0x2f')]=_[_0x8d5c('0x2a')](_0x473f0a,_0x8d5c('0x27'));_0x2c940f[_0x8d5c('0x30')]=_[_0x8d5c('0x31')](_0xd060b1[_0x8d5c('0x30')]);_0x2c940f[_0x8d5c('0x32')]=_[_0x8d5c('0x33')](_0x2c940f[_0x8d5c('0x2f')],_0x2c940f[_0x8d5c('0x30')]);_0x3cfb68[_0x8d5c('0x34')]=_[_0x8d5c('0x33')](_0x2c940f[_0x8d5c('0x2f')],qs[_0x8d5c('0x35')](_0xd060b1['query']['fields']));_0x3cfb68['attributes']=_0x3cfb68['attributes'][_0x8d5c('0x36')]?_0x3cfb68[_0x8d5c('0x34')]:_0x2c940f[_0x8d5c('0x2f')];if(!_0xd060b1['query'][_0x8d5c('0x37')](_0x8d5c('0x38'))){_0x3cfb68[_0x8d5c('0x39')]=qs[_0x8d5c('0x39')](_0xd060b1['query'][_0x8d5c('0x39')]);_0x3cfb68['offset']=qs[_0x8d5c('0x1f')](_0xd060b1[_0x8d5c('0x30')]['offset']);}_0x3cfb68[_0x8d5c('0x3a')]=qs[_0x8d5c('0x3b')](_0xd060b1[_0x8d5c('0x30')][_0x8d5c('0x3b')]);_0x3cfb68[_0x8d5c('0x3c')]=qs[_0x8d5c('0x32')](_[_0x8d5c('0x3d')](_0xd060b1[_0x8d5c('0x30')],_0x2c940f[_0x8d5c('0x32')]),_0x473f0a);if(_0xd060b1[_0x8d5c('0x30')][_0x8d5c('0x3e')]){_0x3cfb68[_0x8d5c('0x3c')]=_['merge'](_0x3cfb68['where'],{'$or':_['map'](_0x473f0a,function(_0x4a294c){if(_0x4a294c['type']!==_0x8d5c('0x3f')){var _0x1879ee={};_0x1879ee[_0x4a294c['name']]={'$like':'%'+_0xd060b1[_0x8d5c('0x30')][_0x8d5c('0x3e')]+'%'};return _0x1879ee;}})});}_0x3cfb68=_[_0x8d5c('0x40')]({},_0x3cfb68,_0xd060b1[_0x8d5c('0x41')]);var _0x12b218={'where':_0x3cfb68[_0x8d5c('0x3c')]};return db['WhatsappTransferReport']['count'](_0x12b218)[_0x8d5c('0x24')](function(_0x10eeef){_0x56153f[_0x8d5c('0x1e')]=_0x10eeef;if(_0xd060b1[_0x8d5c('0x30')][_0x8d5c('0x42')]){_0x3cfb68['include']=[{'all':!![]}];}return db[_0x8d5c('0x2b')][_0x8d5c('0x43')](_0x3cfb68);})[_0x8d5c('0x24')](function(_0x5943f2){_0x56153f['rows']=_0x5943f2;return _0x56153f;})[_0x8d5c('0x24')](respondWithFilteredResult(_0x2302a8,_0x3cfb68))[_0x8d5c('0x44')](handleError(_0x2302a8,null));};exports[_0x8d5c('0x45')]=function(_0x12911f,_0x551d3a){var _0x54cb81={'raw':!![],'where':{'id':_0x12911f['params']['id']}},_0x53b14c={};_0x53b14c[_0x8d5c('0x2f')]=_[_0x8d5c('0x31')](db[_0x8d5c('0x2b')][_0x8d5c('0x46')]);_0x53b14c[_0x8d5c('0x30')]=_[_0x8d5c('0x31')](_0x12911f['query']);_0x53b14c[_0x8d5c('0x32')]=_[_0x8d5c('0x33')](_0x53b14c[_0x8d5c('0x2f')],_0x53b14c[_0x8d5c('0x30')]);_0x54cb81[_0x8d5c('0x34')]=_[_0x8d5c('0x33')](_0x53b14c[_0x8d5c('0x2f')],qs['fields'](_0x12911f[_0x8d5c('0x30')][_0x8d5c('0x35')]));_0x54cb81['attributes']=_0x54cb81[_0x8d5c('0x34')]['length']?_0x54cb81[_0x8d5c('0x34')]:_0x53b14c[_0x8d5c('0x2f')];if(_0x12911f[_0x8d5c('0x30')]['includeAll']){_0x54cb81[_0x8d5c('0x47')]=[{'all':!![]}];}_0x54cb81=_[_0x8d5c('0x40')]({},_0x54cb81,_0x12911f[_0x8d5c('0x41')]);return db[_0x8d5c('0x2b')]['find'](_0x54cb81)['then'](handleEntityNotFound(_0x551d3a,null))[_0x8d5c('0x24')](respondWithResult(_0x551d3a,null))[_0x8d5c('0x44')](handleError(_0x551d3a,null));};exports['create']=function(_0x32a2c0,_0x118ef7){return db[_0x8d5c('0x2b')][_0x8d5c('0x48')](_0x32a2c0[_0x8d5c('0x49')],{})['then'](respondWithResult(_0x118ef7,0xc9))[_0x8d5c('0x44')](handleError(_0x118ef7,null));};exports[_0x8d5c('0x4a')]=function(_0x2dfa25,_0x419d6a){if(_0x2dfa25[_0x8d5c('0x49')]['id']){delete _0x2dfa25[_0x8d5c('0x49')]['id'];}return db[_0x8d5c('0x2b')]['find']({'where':{'id':_0x2dfa25[_0x8d5c('0x4b')]['id']}})[_0x8d5c('0x24')](handleEntityNotFound(_0x419d6a,null))[_0x8d5c('0x24')](saveUpdates(_0x2dfa25[_0x8d5c('0x49')],null))[_0x8d5c('0x24')](respondWithResult(_0x419d6a,null))[_0x8d5c('0x44')](handleError(_0x419d6a,null));};exports[_0x8d5c('0x25')]=function(_0x190bdc,_0x36ce34){return db[_0x8d5c('0x2b')][_0x8d5c('0x4c')]({'where':{'id':_0x190bdc[_0x8d5c('0x4b')]['id']}})[_0x8d5c('0x24')](handleEntityNotFound(_0x36ce34,null))['then'](removeEntity(_0x36ce34,null))[_0x8d5c('0x44')](handleError(_0x36ce34,null));};exports[_0x8d5c('0x4d')]=function(_0xe62cdb,_0x29cddc){return db['WhatsappTransferReport']['describe']()[_0x8d5c('0x24')](respondWithResult(_0x29cddc,null))[_0x8d5c('0x44')](handleError(_0x29cddc,null));};
\ No newline at end of file
index 8dc491a..cc2f8f8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd9c1=['exports','report_whatsapp_transfer','uniqueid','util','../../config/logger','api','bluebird','request-promise','path','../../config/environment','./whatsappTransferReport.attributes'];(function(_0x5e8f4e,_0x52c7c5){var _0x3f7f3c=function(_0x306b27){while(--_0x306b27){_0x5e8f4e['push'](_0x5e8f4e['shift']());}};_0x3f7f3c(++_0x52c7c5);}(_0xd9c1,0x9d));var _0x1d9c=function(_0x587984,_0x1e0af4){_0x587984=_0x587984-0x0;var _0x2172fc=_0xd9c1[_0x587984];return _0x2172fc;};'use strict';var _=require('lodash');var util=require(_0x1d9c('0x0'));var logger=require(_0x1d9c('0x1'))(_0x1d9c('0x2'));var moment=require('moment');var BPromise=require(_0x1d9c('0x3'));var rp=require(_0x1d9c('0x4'));var fs=require('fs');var path=require(_0x1d9c('0x5'));var rimraf=require('rimraf');var config=require(_0x1d9c('0x6'));var attributes=require(_0x1d9c('0x7'));module[_0x1d9c('0x8')]=function(_0xcbd14f,_0x487e41){return _0xcbd14f['define']('WhatsappTransferReport',attributes,{'tableName':_0x1d9c('0x9'),'paranoid':![],'indexes':[{'name':_0x1d9c('0xa'),'fields':['uniqueid']}],'timestamps':!![]});};
\ No newline at end of file
+var _0xf31c=['define','WhatsappTransferReport','report_whatsapp_transfer','uniqueid','lodash','util','api','bluebird','request-promise','path','rimraf','../../config/environment','./whatsappTransferReport.attributes'];(function(_0x292893,_0x3cd21e){var _0x5a55ac=function(_0x420f8d){while(--_0x420f8d){_0x292893['push'](_0x292893['shift']());}};_0x5a55ac(++_0x3cd21e);}(_0xf31c,0xd4));var _0xcf31=function(_0x382e89,_0x4768c0){_0x382e89=_0x382e89-0x0;var _0x3a1318=_0xf31c[_0x382e89];return _0x3a1318;};'use strict';var _=require(_0xcf31('0x0'));var util=require(_0xcf31('0x1'));var logger=require('../../config/logger')(_0xcf31('0x2'));var moment=require('moment');var BPromise=require(_0xcf31('0x3'));var rp=require(_0xcf31('0x4'));var fs=require('fs');var path=require(_0xcf31('0x5'));var rimraf=require(_0xcf31('0x6'));var config=require(_0xcf31('0x7'));var attributes=require(_0xcf31('0x8'));module['exports']=function(_0x1a3aa9,_0x1f2700){return _0x1a3aa9[_0xcf31('0x9')](_0xcf31('0xa'),attributes,{'tableName':_0xcf31('0xb'),'paranoid':![],'indexes':[{'name':'uniqueid','fields':[_0xcf31('0xc')]}],'timestamps':!![]});};
\ No newline at end of file
index 19ef862..8b6a556 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd2e9=['code','message','catch','lodash','moment','randomstring','../../mysqldb','../../config/utils','../../config/logger','rpc','jayson/promise','http','then','info','WhatsappTransferReport,\x20%s,\x20%s','debug','WhatsappTransferReport,\x20%s,\x20%s,\x20%s','request\x20sent','stringify','error'];(function(_0x576be4,_0x7d3752){var _0x11d7ab=function(_0x5deb75){while(--_0x5deb75){_0x576be4['push'](_0x576be4['shift']());}};_0x11d7ab(++_0x7d3752);}(_0xd2e9,0xb7));var _0x9d2e=function(_0x323ff1,_0x20406a){_0x323ff1=_0x323ff1-0x0;var _0x3791da=_0xd2e9[_0x323ff1];return _0x3791da;};'use strict';var _=require(_0x9d2e('0x0'));var util=require('util');var moment=require(_0x9d2e('0x1'));var BPromise=require('bluebird');var rs=require(_0x9d2e('0x2'));var fs=require('fs');var Redis=require('ioredis');var db=require(_0x9d2e('0x3'))['db'];var utils=require(_0x9d2e('0x4'));var logger=require(_0x9d2e('0x5'))(_0x9d2e('0x6'));var config=require('../../config/environment');var jayson=require(_0x9d2e('0x7'));var client=jayson['client'][_0x9d2e('0x8')]({'port':0x232a});function respondWithRpcPromise(_0x4b9b84,_0x436e6d,_0x219c65){return new BPromise(function(_0x2ce559,_0x4de872){return client['request'](_0x4b9b84,_0x219c65)[_0x9d2e('0x9')](function(_0x3f703c){logger[_0x9d2e('0xa')](_0x9d2e('0xb'),_0x436e6d,'request\x20sent');logger[_0x9d2e('0xc')](_0x9d2e('0xd'),_0x436e6d,_0x9d2e('0xe'),JSON[_0x9d2e('0xf')](_0x3f703c));if(_0x3f703c[_0x9d2e('0x10')]){if(_0x3f703c['error'][_0x9d2e('0x11')]===0x1f4){logger['error'](_0x9d2e('0xb'),_0x436e6d,_0x3f703c['error']['message']);return _0x4de872(_0x3f703c[_0x9d2e('0x10')][_0x9d2e('0x12')]);}logger['error'](_0x9d2e('0xb'),_0x436e6d,_0x3f703c[_0x9d2e('0x10')][_0x9d2e('0x12')]);return _0x2ce559(_0x3f703c[_0x9d2e('0x10')][_0x9d2e('0x12')]);}else{logger[_0x9d2e('0xa')](_0x9d2e('0xb'),_0x436e6d,_0x9d2e('0xe'));_0x2ce559(_0x3f703c['result'][_0x9d2e('0x12')]);}})[_0x9d2e('0x13')](function(_0x1faf84){logger[_0x9d2e('0x10')](_0x9d2e('0xb'),_0x436e6d,_0x1faf84);_0x4de872(_0x1faf84);});});}
\ No newline at end of file
+var _0x6671=['WhatsappTransferReport,\x20%s,\x20%s,\x20%s','error','code','WhatsappTransferReport,\x20%s,\x20%s','message','result','catch','lodash','util','moment','bluebird','ioredis','../../mysqldb','../../config/utils','../../config/environment','jayson/promise','client','http','request','then','request\x20sent'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6671,0x196));var _0x1667=function(_0xd5a6fc,_0x2a1c9b){_0xd5a6fc=_0xd5a6fc-0x0;var _0x2e5ece=_0x6671[_0xd5a6fc];return _0x2e5ece;};'use strict';var _=require(_0x1667('0x0'));var util=require(_0x1667('0x1'));var moment=require(_0x1667('0x2'));var BPromise=require(_0x1667('0x3'));var rs=require('randomstring');var fs=require('fs');var Redis=require(_0x1667('0x4'));var db=require(_0x1667('0x5'))['db'];var utils=require(_0x1667('0x6'));var logger=require('../../config/logger')('rpc');var config=require(_0x1667('0x7'));var jayson=require(_0x1667('0x8'));var client=jayson[_0x1667('0x9')][_0x1667('0xa')]({'port':0x232a});function respondWithRpcPromise(_0x4ce7c7,_0x585ee4,_0x391d79){return new BPromise(function(_0x52b81c,_0x34d6ec){return client[_0x1667('0xb')](_0x4ce7c7,_0x391d79)[_0x1667('0xc')](function(_0x1583b9){logger['info']('WhatsappTransferReport,\x20%s,\x20%s',_0x585ee4,_0x1667('0xd'));logger['debug'](_0x1667('0xe'),_0x585ee4,_0x1667('0xd'),JSON['stringify'](_0x1583b9));if(_0x1583b9[_0x1667('0xf')]){if(_0x1583b9[_0x1667('0xf')][_0x1667('0x10')]===0x1f4){logger[_0x1667('0xf')](_0x1667('0x11'),_0x585ee4,_0x1583b9[_0x1667('0xf')][_0x1667('0x12')]);return _0x34d6ec(_0x1583b9[_0x1667('0xf')][_0x1667('0x12')]);}logger[_0x1667('0xf')](_0x1667('0x11'),_0x585ee4,_0x1583b9['error'][_0x1667('0x12')]);return _0x52b81c(_0x1583b9[_0x1667('0xf')][_0x1667('0x12')]);}else{logger['info'](_0x1667('0x11'),_0x585ee4,_0x1667('0xd'));_0x52b81c(_0x1583b9[_0x1667('0x13')][_0x1667('0x12')]);}})[_0x1667('0x14')](function(_0x3c723f){logger['error'](_0x1667('0x11'),_0x585ee4,_0x3c723f);_0x34d6ec(_0x3c723f);});});}
\ No newline at end of file
index 6aee7d8..0ed75c1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x91c6=['Server\x20failed\x20to\x20start\x20due\x20to\x20error!','error','Server\x20failed\x20to\x20start\x20due\x20to\x20error:\x20%s','exit','lodash','./config/license','./rpc','./config/environment','./config/logger','app','./config/pm2/config','./config/schedule','./config/schedule/chat','./config/schedule/whatsapp','./config/schedule/transcribe','./config/schedule/cloud-provider','sync','then','seedDB','default','listen','start','info','filter','exitCode','number','length','map','pm2_env','name','status','online','join','None','App\x20Ready!'];(function(_0x46f1a6,_0xc7a582){var _0x38429a=function(_0x31adae){while(--_0x31adae){_0x46f1a6['push'](_0x46f1a6['shift']());}};_0x38429a(++_0xc7a582);}(_0x91c6,0xf9));var _0x691c=function(_0x1126ec,_0x3a2940){_0x1126ec=_0x1126ec-0x0;var _0x148a03=_0x91c6[_0x1126ec];return _0x148a03;};'use strict';var _=require(_0x691c('0x0'));var db=require('./mysqldb')['db'];var seedDb=require('./config/seedDB');var checkLicense=require(_0x691c('0x1'));var rpc=require(_0x691c('0x2'));var config=require(_0x691c('0x3'));var logger=require(_0x691c('0x4'))(_0x691c('0x5'));var pm2=require('./config/pm2');var pm2Config=require(_0x691c('0x6'));var schedule=require(_0x691c('0x7'));var chat=require(_0x691c('0x8'));var whatsapp=require(_0x691c('0x9'));var transcribe=require(_0x691c('0xa'));var provider=require(_0x691c('0xb'));function main(){return db['sequelize'][_0x691c('0xc')]()[_0x691c('0xd')](function(){if(config[_0x691c('0xe')]){return seedDb[_0x691c('0xf')]();}})['then'](function(){return checkLicense[_0x691c('0xf')]();})[_0x691c('0xd')](function(){return rpc[_0x691c('0x10')]();})['then'](function(_0x4bf36c){logger['info'](_0x4bf36c);return chat[_0x691c('0x11')]();})[_0x691c('0xd')](function(){return whatsapp[_0x691c('0x11')]();})[_0x691c('0xd')](function(){return schedule['start']();})['then'](function(){return transcribe[_0x691c('0x11')]();})[_0x691c('0xd')](function(){return provider[_0x691c('0x11')]();})[_0x691c('0xd')](function(_0x2baaa5){logger[_0x691c('0x12')](_0x2baaa5);return pm2[_0x691c('0x11')](pm2Config);})[_0x691c('0xd')](function(_0x5416e4){var _0x232b6a=_0x5416e4[_0x691c('0x13')](function(_0x257d9c){return typeof _0x257d9c[_0x691c('0x14')]===_0x691c('0x15')&&_0x257d9c[_0x691c('0x14')]>=0x0;});if(_0x232b6a[_0x691c('0x16')]>0x0){throw new Error(_0x232b6a[_0x691c('0x16')]+'\x20processes\x20failed\x20at\x20startup:\x20'+_[_0x691c('0x17')](_0x232b6a,function(_0x1b4cf0){return'\x22'+_0x1b4cf0[_0x691c('0x18')][_0x691c('0x19')]+'\x22';}));}logger[_0x691c('0x12')]('Online\x20apps:',_[_0x691c('0x17')](_[_0x691c('0x13')](_0x5416e4,{'status':'online'}),'name')['join']());logger[_0x691c('0x12')]('Offline\x20apps:',_[_0x691c('0x17')](_['filter'](_0x5416e4,function(_0x49d816){return _0x49d816[_0x691c('0x1a')]!==_0x691c('0x1b');}),_0x691c('0x19'))[_0x691c('0x1c')]()||_0x691c('0x1d'));console['log'](_0x691c('0x1e'));})['catch'](function(_0x1f3844){console['log'](_0x691c('0x1f'),_0x1f3844);logger[_0x691c('0x20')](_0x691c('0x21'),_0x1f3844);process[_0x691c('0x22')](0x1);});}main();
\ No newline at end of file
+var _0xdf98=['join','Offline\x20apps:','status','online','log','Server\x20failed\x20to\x20start\x20due\x20to\x20error!','error','Server\x20failed\x20to\x20start\x20due\x20to\x20error:\x20%s','exit','lodash','./config/seedDB','./config/environment','./config/logger','app','./config/pm2','./config/pm2/config','./config/schedule','./config/schedule/chat','./config/schedule/whatsapp','./config/schedule/transcribe','sequelize','sync','then','listen','info','start','filter','exitCode','length','\x20processes\x20failed\x20at\x20startup:\x20','map','pm2_env','name'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xdf98,0xcf));var _0x8df9=function(_0x3eb926,_0x27e966){_0x3eb926=_0x3eb926-0x0;var _0x29460d=_0xdf98[_0x3eb926];return _0x29460d;};'use strict';var _=require(_0x8df9('0x0'));var db=require('./mysqldb')['db'];var seedDb=require(_0x8df9('0x1'));var checkLicense=require('./config/license');var rpc=require('./rpc');var config=require(_0x8df9('0x2'));var logger=require(_0x8df9('0x3'))(_0x8df9('0x4'));var pm2=require(_0x8df9('0x5'));var pm2Config=require(_0x8df9('0x6'));var schedule=require(_0x8df9('0x7'));var chat=require(_0x8df9('0x8'));var whatsapp=require(_0x8df9('0x9'));var transcribe=require(_0x8df9('0xa'));var provider=require('./config/schedule/cloud-provider');function main(){return db[_0x8df9('0xb')][_0x8df9('0xc')]()[_0x8df9('0xd')](function(){if(config['seedDB']){return seedDb['default']();}})[_0x8df9('0xd')](function(){return checkLicense['default']();})[_0x8df9('0xd')](function(){return rpc[_0x8df9('0xe')]();})[_0x8df9('0xd')](function(_0xa5abd2){logger[_0x8df9('0xf')](_0xa5abd2);return chat[_0x8df9('0x10')]();})[_0x8df9('0xd')](function(){return whatsapp[_0x8df9('0x10')]();})['then'](function(){return schedule[_0x8df9('0x10')]();})[_0x8df9('0xd')](function(){return transcribe[_0x8df9('0x10')]();})['then'](function(){return provider[_0x8df9('0x10')]();})[_0x8df9('0xd')](function(_0x1e29d0){logger[_0x8df9('0xf')](_0x1e29d0);return pm2['start'](pm2Config);})['then'](function(_0x2dcc1c){var _0x304ba3=_0x2dcc1c[_0x8df9('0x11')](function(_0x50f0f7){return typeof _0x50f0f7[_0x8df9('0x12')]==='number'&&_0x50f0f7[_0x8df9('0x12')]>=0x0;});if(_0x304ba3['length']>0x0){throw new Error(_0x304ba3[_0x8df9('0x13')]+_0x8df9('0x14')+_[_0x8df9('0x15')](_0x304ba3,function(_0x218e76){return'\x22'+_0x218e76[_0x8df9('0x16')][_0x8df9('0x17')]+'\x22';}));}logger['info']('Online\x20apps:',_[_0x8df9('0x15')](_['filter'](_0x2dcc1c,{'status':'online'}),_0x8df9('0x17'))[_0x8df9('0x18')]());logger[_0x8df9('0xf')](_0x8df9('0x19'),_[_0x8df9('0x15')](_[_0x8df9('0x11')](_0x2dcc1c,function(_0x5a0071){return _0x5a0071[_0x8df9('0x1a')]!==_0x8df9('0x1b');}),_0x8df9('0x17'))['join']()||'None');console['log']('App\x20Ready!');})['catch'](function(_0x10a2ce){console[_0x8df9('0x1c')](_0x8df9('0x1d'),_0x10a2ce);logger[_0x8df9('0x1e')](_0x8df9('0x1f'),_0x10a2ce);process[_0x8df9('0x20')](0x1);});}main();
\ No newline at end of file
index 7ab5a2e..75602c3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1038=['smsAutoanswer','smsAutoanswerDelay','openchannelAutoanswer','openchannelAutoanswerDelay','faxAutoanswer','faxAutoanswerDelay','whatsappAutoanswer','whatsappAutoanswerDelay','messengerSoundNotification','isChatInteractionAuthorized','isAuthenticated','use','user','ChatInteraction','findOne','params','closed','disposition','query','forceDownload','status','unmanaged','json','Forbidden.','catch','headers','authorization','startsWith','find','name','Wrong\x20credentials.','apikey','getUuid','then','User','sub','Setting','allowedLoginAttempts','isEqual','apiKeyNonce','nonce','disabled','blocked','blockDuration','blockedAt','add','minutes','Invalid\x20API\x20access\x20key','User\x20not\x20found.','User\x20object\x20not\x20found.','canUpdate','update','Forbidden','isWebrtcLicence','isMiddleware','setTokenCookie','It\x20looks\x20like\x20you\x20aren\x27t\x20logged\x20in,\x20please\x20try\x20again.','cookie','motion.token','redirect','/dashboards/general','send','retrieveApiKey','isNil','apiKeyIat','generateApiKey','regenerateApiKey','Please\x20use\x20the\x20previous\x20API\x20access\x20key\x20to\x20generate\x20a\x20new\x20one','validatePasswordPattern','test','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','validatePasswordHistory','decryptString','split','toLowerCase','The\x20password\x20must\x20be\x20different\x20from\x20the\x20previous\x20%d\x20passwords.\x20Please\x20choose\x20another\x20one.','The\x20password\x20must\x20be\x20different\x20from\x20the\x20last\x20one.\x20Please\x20choose\x20another\x20one.','Sequelize','updatePasswordsHistory','length','splice','unshift','join','promisify','secret','secrets','payload','verify','toString','hex','floor','now','HS512','../../mysqldb','../../config/environment','../../config/license/hardware','lodash','jsonwebtoken','express-jwt','crypto','bluebird','util','moment','session','role','fullname','internal','userpic','chatPause','mailPause','faxPause','smsPause','openchannelPause','pauseType','showWebBar','lastLoginAt','lastPauseAt','crudPermissions','allowmessenger','passwordResetAt','alias','phoneBarAutoAnswer','phoneBarDnd','phoneBarEnableDtmfTone','phoneBarEnableSettings','phoneBarExpires','phoneBarRemoteControl','phoneBarRemoteControlPort','hotdesk','interface','privacyEnabled','settingsEnabled','wssPort','downloadVoiceRecordings','selectRecallMeCampaign','chatAutoanswer','chatAutoanswerDelay','emailAutoanswer'];(function(_0x37ded3,_0x371ebb){var _0x51e49e=function(_0x30cc78){while(--_0x30cc78){_0x37ded3['push'](_0x37ded3['shift']());}};_0x51e49e(++_0x371ebb);}(_0x1038,0xe9));var _0x8103=function(_0x4695ba,_0x5a7f2a){_0x4695ba=_0x4695ba-0x0;var _0x524b7d=_0x1038[_0x4695ba];return _0x524b7d;};'use strict';var db=require(_0x8103('0x0'))['db'];var config=require(_0x8103('0x1'));var hardwareConf=require(_0x8103('0x2'));var licenseUtil=require('../../config/license/util');var encryptor=require('../encryptor');var _=require(_0x8103('0x3'));var jwt=require(_0x8103('0x4'));var expressJwt=require(_0x8103('0x5'));var compose=require('composable-middleware');var basicAuth=require('basic-auth');var crypto=require(_0x8103('0x6'));var BPromise=require(_0x8103('0x7'));var util=require(_0x8103('0x8'));var moment=require(_0x8103('0x9'));var validateJwt=expressJwt({'secret':config['secrets'][_0x8103('0xa')]});var userAttributes=['id',_0x8103('0xb'),_0x8103('0xc'),'name',_0x8103('0xd'),'email',_0x8103('0xe'),'permissions','md5secret','voicePause',_0x8103('0xf'),_0x8103('0x10'),_0x8103('0x11'),_0x8103('0x12'),_0x8103('0x13'),_0x8103('0x14'),_0x8103('0x15'),_0x8103('0x16'),_0x8103('0x17'),_0x8103('0x18'),_0x8103('0x19'),_0x8103('0x1a'),_0x8103('0x1b'),_0x8103('0x1c'),'phoneBarAutoAnswerDelay',_0x8103('0x1d'),'phoneBarEnableRecording',_0x8103('0x1e'),_0x8103('0x1f'),_0x8103('0x20'),'phoneBarPrefixRequired',_0x8103('0x21'),_0x8103('0x22'),_0x8103('0x23'),_0x8103('0x24'),'userProfileId',_0x8103('0x25'),_0x8103('0x26'),_0x8103('0x27'),_0x8103('0x28'),'downloadOmnichannelInteractions','downloadAttachments','ignorePauseForPreviewCalls',_0x8103('0x29'),_0x8103('0x2a'),_0x8103('0x2b'),_0x8103('0x2c'),'emailAutoanswerDelay',_0x8103('0x2d'),_0x8103('0x2e'),_0x8103('0x2f'),_0x8103('0x30'),_0x8103('0x31'),_0x8103('0x32'),_0x8103('0x33'),_0x8103('0x34'),_0x8103('0x35')];exports[_0x8103('0x36')]=function(){return this[_0x8103('0x37')](!![])[_0x8103('0x38')](function(_0x1e6e50,_0x2145f3,_0x31d13e){if(_0x1e6e50[_0x8103('0x39')]){_0x31d13e();}else{return db[_0x8103('0x3a')][_0x8103('0x3b')]({'where':{'id':_0x1e6e50[_0x8103('0x3c')]['id']},'attributes':['id',_0x8103('0x3d'),_0x8103('0x3e')],'raw':!![]})['then'](function(_0x268d21){if(_0x268d21&&_0x268d21[_0x8103('0x3d')]&&!_0x1e6e50[_0x8103('0x3f')][_0x8103('0x40')]){return _0x2145f3[_0x8103('0x41')](_0x268d21[_0x8103('0x3e')]===_0x8103('0x42')?0x195:0x193)[_0x8103('0x43')]({'message':_0x268d21[_0x8103('0x3e')]===_0x8103('0x42')?'Unmanaged.':_0x8103('0x44')});}else{_0x31d13e();}})[_0x8103('0x45')](function(_0x5822f8){_0x31d13e(_0x5822f8);});}});};exports[_0x8103('0x37')]=function isAuthenticated(_0xc2abf3){return compose()['use'](function(_0x3f2314,_0x19cfbf,_0x56e217){var _0x299e01;if(_0x3f2314[_0x8103('0x46')][_0x8103('0x47')]){if(_[_0x8103('0x48')](_0x3f2314[_0x8103('0x46')]['authorization'],'Basic')){var _0x3e160f=basicAuth(_0x3f2314);db['User'][_0x8103('0x49')]({'where':{'name':_0x3e160f[_0x8103('0x4a')]}})['then'](function(_0x1d2999){if(!_0x1d2999||!_0x1d2999['authenticate'](_0x3e160f['pass'])){return _0x19cfbf[_0x8103('0x41')](0x191)[_0x8103('0x43')]({'message':_0x8103('0x4b')});}_0x3f2314[_0x8103('0x39')]={'id':_0x1d2999['id']};_0x56e217();})[_0x8103('0x45')](function(_0x3201d0){_0x56e217(_0x3201d0);});}else if(_[_0x8103('0x48')](_0x3f2314['headers'][_0x8103('0x47')],'Bearer')){validateJwt(_0x3f2314,_0x19cfbf,_0x56e217);}else{if(_0xc2abf3){_0x56e217();}else{return _0x19cfbf[_0x8103('0x41')](0x193)[_0x8103('0x43')]({'message':'Unknown\x20authorization\x20format'});}}}else if(_0x3f2314[_0x8103('0x3f')][_0x8103('0x4c')]){try{var _0x578796={'audience':hardwareConf[_0x8103('0x4d')](),'issuer':hardwareConf[_0x8103('0x4d')]()};verifyJwt(_0x3f2314['query'][_0x8103('0x4c')],_0x578796)[_0x8103('0x4e')](function(_0xeeadad){return db[_0x8103('0x4f')]['find']({'where':{'id':_0xeeadad[_0x8103('0x50')]}})['then'](function(_0x139c2a){_0x299e01=_0x139c2a;return db[_0x8103('0x51')][_0x8103('0x3b')]({'where':{'id':0x1},'attributes':[_0x8103('0x52'),'blockDuration'],'raw':!![]});})['then'](function(_0x17f4d9){if(!_0x299e01||!_[_0x8103('0x53')](_0x299e01[_0x8103('0x54')],_0xeeadad[_0x8103('0x55')])){return _0x19cfbf['status'](0x191)[_0x8103('0x43')]({'message':'API\x20access\x20key\x20is\x20not\x20valid\x20anymore'});}if(_0x299e01[_0x8103('0x56')]){return _0x19cfbf['status'](0x191)[_0x8103('0x43')]({'message':'Invalid\x20API\x20access\x20key'});}if(_0x299e01[_0x8103('0x57')]){if(_0x17f4d9[_0x8103('0x58')]>0x0){if(moment(_0x299e01[_0x8103('0x59')])[_0x8103('0x5a')](_0x17f4d9[_0x8103('0x58')],_0x8103('0x5b'))>moment()){return _0x19cfbf['status'](0x191)['json']({'message':_0x8103('0x5c')});}}else{return _0x19cfbf['status'](0x191)['json']({'message':'Invalid\x20API\x20access\x20key'});}}_0x3f2314[_0x8103('0x39')]={'id':_0x299e01['id']};_0x56e217();});})[_0x8103('0x45')](function(){return _0x19cfbf[_0x8103('0x41')](0x191)['json']({'message':_0x8103('0x5c')});});}catch(_0x5ac9f7){_0x56e217(_0x5ac9f7);}}else if(_0xc2abf3){_0x56e217();}else{return _0x19cfbf[_0x8103('0x41')](0x193)['json']({'message':'Unknown\x20authorization\x20format'});}})[_0x8103('0x38')](function(_0x5a5bcf,_0x114f00,_0x5bf29a){if(_0x5a5bcf[_0x8103('0x39')]){db[_0x8103('0x4f')][_0x8103('0x49')]({'where':{'id':_0x5a5bcf[_0x8103('0x39')]['id']},'attributes':userAttributes})[_0x8103('0x4e')](function(_0x4f0865){if(!_0x4f0865){return _0x114f00[_0x8103('0x41')](0x194)[_0x8103('0x43')]({'message':_0x8103('0x5d')});}_0x5a5bcf[_0x8103('0x39')]=_0x4f0865;_0x5bf29a();})[_0x8103('0x45')](function(_0x2a40df){_0x5bf29a(_0x2a40df);});}else if(_0xc2abf3){_0x5bf29a();}else{return _0x114f00[_0x8103('0x41')](0x194)[_0x8103('0x43')]({'message':_0x8103('0x5e')});}});};exports[_0x8103('0x5f')]=function canUpdate(){return compose()['use'](function(_0x1138b7,_0x4ba69e,_0x24b89a){return licenseUtil['getLicense']()[_0x8103('0x4e')](function(_0x5c033b){if(_0x5c033b[_0x8103('0x60')]){_0x24b89a();}else{return _0x4ba69e[_0x8103('0x41')](0x193)[_0x8103('0x43')]({'message':_0x8103('0x61')});}})[_0x8103('0x45')](function(_0x2b72ad){_0x24b89a(_0x2b72ad);});});};exports[_0x8103('0x62')]=function isWebrtcLicence(){return compose()[_0x8103('0x38')](function(_0x8a66c7,_0x16c521,_0x2c6062){return licenseUtil['getLicense']()['then'](function(_0x2e150a){if(_0x2e150a['webrtc']){_0x2c6062();}else{return _0x16c521[_0x8103('0x41')](0x193)['json']({'message':_0x8103('0x61')});}})[_0x8103('0x45')](function(_0x49aeb3){_0x2c6062(_0x49aeb3);});});};exports[_0x8103('0x63')]=function(_0x3d1d4f,_0x19e6ad,_0x1a6ca8){_0x3d1d4f[_0x8103('0x63')]=!![];return _0x1a6ca8();};exports['signToken']=function signToken(_0x287485){return signJwt(_0x287485);};exports[_0x8103('0x64')]=function(_0x1b8820,_0x51eae3){if(!_0x1b8820['user']){return _0x51eae3[_0x8103('0x41')](0x194)[_0x8103('0x43')]({'message':_0x8103('0x65')});}var _0x159310={'payload':{'id':_0x1b8820[_0x8103('0x39')]['id'],'role':_0x1b8820[_0x8103('0x39')][_0x8103('0xb')]},'options':{'expiresIn':0x15180}};return signJwt(_0x159310)[_0x8103('0x4e')](function(_0x9cdfb1){_0x51eae3[_0x8103('0x66')](_0x8103('0x67'),_0x9cdfb1);_0x51eae3[_0x8103('0x68')](_0x8103('0x69'));})[_0x8103('0x45')](function(_0x396b6d){return _0x51eae3[_0x8103('0x41')](0x1f4)[_0x8103('0x6a')](_0x396b6d);});};exports[_0x8103('0x6b')]=function(_0x508c9f){if(_[_0x8103('0x6c')](_0x508c9f[_0x8103('0x54')])||_['isNil'](_0x508c9f[_0x8103('0x6d')])){return null;}else{return createJwt(_0x508c9f);}};exports[_0x8103('0x6e')]=function(_0x496992){_0x496992[_0x8103('0x54')]=generateNonce();_0x496992[_0x8103('0x6d')]=generateIssuedAt();return createJwt(_0x496992);};exports[_0x8103('0x6f')]=function(_0x55d114,_0x125725){var _0x452e4d=_0x55d114[_0x8103('0x3f')][_0x8103('0x4c')];if(_0x452e4d){var _0x1c00cc={'nonce':_0x125725['apiKeyNonce'],'iat':_0x125725[_0x8103('0x6d')],'audience':hardwareConf[_0x8103('0x4d')](),'issuer':hardwareConf['getUuid']()};return verifyJwt(_0x452e4d,_0x1c00cc)[_0x8103('0x4e')](function(){return generateApiKey(_0x125725);});}else{throw{'message':_0x8103('0x70')};}};exports[_0x8103('0x71')]=function(_0x2c6736){var _0x467706=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(!_0x467706[_0x8103('0x72')](_0x2c6736))throw new db['Sequelize'][(_0x8103('0x73'))](_0x8103('0x74'));return;};exports[_0x8103('0x75')]=function(_0x10171d,_0x5addf9,_0x230454){var _0x2280b5=encryptor[_0x8103('0x76')](_0x5addf9)[_0x8103('0x77')](',');for(var _0x28cc97=0x0;_0x28cc97<_0x230454;_0x28cc97++){if(!_0x2280b5[_0x28cc97])break;if(_0x10171d[_0x8103('0x78')]()===_0x2280b5[_0x28cc97]['toLowerCase']()){var _0x21bc12=util['format'](_0x8103('0x79'),_0x230454);if(_0x230454===0x1){_0x21bc12=_0x8103('0x7a');}throw new db[(_0x8103('0x7b'))]['ValidationError'](_0x21bc12);}}return;};exports[_0x8103('0x7c')]=function(_0x7906eb,_0x5770ad){var _0x476b61=_0x5770ad?encryptor['decryptString'](_0x5770ad)[_0x8103('0x77')](','):[];if(_0x476b61[_0x8103('0x7d')]===0x5){_0x476b61[_0x8103('0x7e')](-0x1,0x1);}_0x476b61[_0x8103('0x7f')](_0x7906eb);return encryptor['encryptString'](_0x476b61[_0x8103('0x80')](','));};function signJwt(_0x5b8934){var _0x35c8e6=BPromise[_0x8103('0x81')](jwt['sign'],{'context':jwt});var _0x5eff52=_0x5b8934[_0x8103('0x82')]||config[_0x8103('0x83')]['session'];return new BPromise(function(_0x44c6cc,_0x5c3dab){_0x35c8e6(_0x5b8934[_0x8103('0x84')],_0x5eff52,_0x5b8934['options'])[_0x8103('0x4e')](function(_0x315e70){_0x44c6cc(_0x315e70);})[_0x8103('0x45')](function(_0x2df617){_0x5c3dab(_0x2df617);});});}function verifyJwt(_0x3677db,_0x36d36b,_0x544815){var _0x2a27e3=BPromise[_0x8103('0x81')](jwt[_0x8103('0x85')],{'context':jwt});var _0x3d7a1c=_0x544815||config[_0x8103('0x83')]['session'];return new BPromise(function(_0x2e0829,_0x546105){_0x2a27e3(_0x3677db,_0x3d7a1c,_0x36d36b)[_0x8103('0x4e')](function(_0x4ea2b2){_0x2e0829(_0x4ea2b2);})[_0x8103('0x45')](function(_0xbd3d54){_0x546105(_0xbd3d54);});});}function generateNonce(){return crypto['randomBytes'](0x10)[_0x8103('0x86')](_0x8103('0x87'));}function generateIssuedAt(){return Math[_0x8103('0x88')](Date[_0x8103('0x89')]()/0x3e8)['toString']();}function createJwt(_0x51904b){var _0x2f0470={'payload':{'iat':_0x51904b['apiKeyIat'],'nonce':_0x51904b['apiKeyNonce']},'options':{'algorithm':_0x8103('0x8a'),'subject':_0x51904b['id']['toString'](),'issuer':hardwareConf['getUuid'](),'audience':hardwareConf[_0x8103('0x4d')]()}};return signJwt(_0x2f0470)[_0x8103('0x4e')](function(_0x4a69d3){return{'iat':_0x51904b[_0x8103('0x6d')],'nonce':_0x51904b['apiKeyNonce'],'token':_0x4a69d3};});}
\ No newline at end of file
+var _0xca52=['length','splice','encryptString','join','sign','options','promisify','randomBytes','toString','floor','HS512','../../config/license/hardware','../encryptor','jsonwebtoken','express-jwt','basic-auth','crypto','bluebird','moment','secrets','session','role','fullname','name','internal','userpic','permissions','md5secret','chatPause','mailPause','faxPause','smsPause','pauseType','showWebBar','allowmessenger','passwordResetAt','phoneBarAutoAnswer','phoneBarDnd','phoneBarEnableRecording','phoneBarEnableDtmfTone','phoneBarExpires','phoneBarPrefixRequired','phoneBarRemoteControl','userProfileId','privacyEnabled','settingsEnabled','wssPort','downloadVoiceRecordings','downloadAttachments','ignorePauseForPreviewCalls','selectRecallMeCampaign','chatAutoanswer','chatAutoanswerDelay','emailAutoanswer','emailAutoanswerDelay','smsAutoanswer','smsAutoanswerDelay','openchannelAutoanswer','openchannelAutoanswerDelay','faxAutoanswer','faxAutoanswerDelay','whatsappAutoanswer','messengerSoundNotification','isChatInteractionAuthorized','isAuthenticated','use','user','ChatInteraction','findOne','params','closed','disposition','then','status','json','unmanaged','Unmanaged.','catch','headers','startsWith','authorization','User','find','authenticate','pass','Bearer','query','getUuid','allowedLoginAttempts','apiKeyNonce','nonce','API\x20access\x20key\x20is\x20not\x20valid\x20anymore','disabled','blocked','blockDuration','blockedAt','add','minutes','Invalid\x20API\x20access\x20key','Unknown\x20authorization\x20format','User\x20not\x20found.','User\x20object\x20not\x20found.','canUpdate','getLicense','isWebrtcLicence','webrtc','Forbidden','isMiddleware','signToken','setTokenCookie','It\x20looks\x20like\x20you\x20aren\x27t\x20logged\x20in,\x20please\x20try\x20again.','cookie','redirect','/dashboards/general','send','retrieveApiKey','isNil','apiKeyIat','generateApiKey','Please\x20use\x20the\x20previous\x20API\x20access\x20key\x20to\x20generate\x20a\x20new\x20one','validatePasswordPattern','test','ValidationError','The\x20password\x20must\x20be\x20at\x20least\x208\x20characters\x20long\x20and\x20have\x201\x20lowercase\x20character,\x201\x20uppercase\x20character,\x201\x20number\x20and\x201\x20special\x20character\x20~!@#$%^&-_=+[{]}.','validatePasswordHistory','decryptString','split','toLowerCase','format','The\x20password\x20must\x20be\x20different\x20from\x20the\x20previous\x20%d\x20passwords.\x20Please\x20choose\x20another\x20one.','The\x20password\x20must\x20be\x20different\x20from\x20the\x20last\x20one.\x20Please\x20choose\x20another\x20one.','Sequelize','updatePasswordsHistory'];(function(_0x383494,_0x2070d2){var _0x2485e5=function(_0x37c52e){while(--_0x37c52e){_0x383494['push'](_0x383494['shift']());}};_0x2485e5(++_0x2070d2);}(_0xca52,0x90));var _0x2ca5=function(_0x53c91f,_0x102c15){_0x53c91f=_0x53c91f-0x0;var _0x636aa7=_0xca52[_0x53c91f];return _0x636aa7;};'use strict';var db=require('../../mysqldb')['db'];var config=require('../../config/environment');var hardwareConf=require(_0x2ca5('0x0'));var licenseUtil=require('../../config/license/util');var encryptor=require(_0x2ca5('0x1'));var _=require('lodash');var jwt=require(_0x2ca5('0x2'));var expressJwt=require(_0x2ca5('0x3'));var compose=require('composable-middleware');var basicAuth=require(_0x2ca5('0x4'));var crypto=require(_0x2ca5('0x5'));var BPromise=require(_0x2ca5('0x6'));var util=require('util');var moment=require(_0x2ca5('0x7'));var validateJwt=expressJwt({'secret':config[_0x2ca5('0x8')][_0x2ca5('0x9')]});var userAttributes=['id',_0x2ca5('0xa'),_0x2ca5('0xb'),_0x2ca5('0xc'),_0x2ca5('0xd'),'email',_0x2ca5('0xe'),_0x2ca5('0xf'),_0x2ca5('0x10'),'voicePause',_0x2ca5('0x11'),_0x2ca5('0x12'),_0x2ca5('0x13'),_0x2ca5('0x14'),'openchannelPause',_0x2ca5('0x15'),_0x2ca5('0x16'),'lastLoginAt','lastPauseAt','crudPermissions',_0x2ca5('0x17'),_0x2ca5('0x18'),'alias',_0x2ca5('0x19'),'phoneBarAutoAnswerDelay',_0x2ca5('0x1a'),_0x2ca5('0x1b'),_0x2ca5('0x1c'),'phoneBarEnableSettings',_0x2ca5('0x1d'),_0x2ca5('0x1e'),_0x2ca5('0x1f'),'phoneBarRemoteControlPort','hotdesk','interface',_0x2ca5('0x20'),_0x2ca5('0x21'),_0x2ca5('0x22'),_0x2ca5('0x23'),_0x2ca5('0x24'),'downloadOmnichannelInteractions',_0x2ca5('0x25'),_0x2ca5('0x26'),_0x2ca5('0x27'),_0x2ca5('0x28'),_0x2ca5('0x29'),_0x2ca5('0x2a'),_0x2ca5('0x2b'),_0x2ca5('0x2c'),_0x2ca5('0x2d'),_0x2ca5('0x2e'),_0x2ca5('0x2f'),_0x2ca5('0x30'),_0x2ca5('0x31'),_0x2ca5('0x32'),'whatsappAutoanswerDelay',_0x2ca5('0x33')];exports[_0x2ca5('0x34')]=function(){return this[_0x2ca5('0x35')](!![])[_0x2ca5('0x36')](function(_0x34cf26,_0x4a8374,_0x3ee368){if(_0x34cf26[_0x2ca5('0x37')]){_0x3ee368();}else{return db[_0x2ca5('0x38')][_0x2ca5('0x39')]({'where':{'id':_0x34cf26[_0x2ca5('0x3a')]['id']},'attributes':['id',_0x2ca5('0x3b'),_0x2ca5('0x3c')],'raw':!![]})[_0x2ca5('0x3d')](function(_0x40b538){if(_0x40b538&&_0x40b538[_0x2ca5('0x3b')]&&!_0x34cf26['query']['forceDownload']){return _0x4a8374[_0x2ca5('0x3e')](_0x40b538[_0x2ca5('0x3c')]==='unmanaged'?0x195:0x193)[_0x2ca5('0x3f')]({'message':_0x40b538[_0x2ca5('0x3c')]===_0x2ca5('0x40')?_0x2ca5('0x41'):'Forbidden.'});}else{_0x3ee368();}})[_0x2ca5('0x42')](function(_0x2257be){_0x3ee368(_0x2257be);});}});};exports[_0x2ca5('0x35')]=function isAuthenticated(_0x542101){return compose()[_0x2ca5('0x36')](function(_0x19527f,_0x471560,_0x1025c6){var _0x1784a2;if(_0x19527f[_0x2ca5('0x43')]['authorization']){if(_[_0x2ca5('0x44')](_0x19527f[_0x2ca5('0x43')][_0x2ca5('0x45')],'Basic')){var _0x5d3e69=basicAuth(_0x19527f);db[_0x2ca5('0x46')][_0x2ca5('0x47')]({'where':{'name':_0x5d3e69[_0x2ca5('0xc')]}})[_0x2ca5('0x3d')](function(_0x409ce5){if(!_0x409ce5||!_0x409ce5[_0x2ca5('0x48')](_0x5d3e69[_0x2ca5('0x49')])){return _0x471560[_0x2ca5('0x3e')](0x191)[_0x2ca5('0x3f')]({'message':'Wrong\x20credentials.'});}_0x19527f['user']={'id':_0x409ce5['id']};_0x1025c6();})[_0x2ca5('0x42')](function(_0x42e86c){_0x1025c6(_0x42e86c);});}else if(_[_0x2ca5('0x44')](_0x19527f['headers'][_0x2ca5('0x45')],_0x2ca5('0x4a'))){validateJwt(_0x19527f,_0x471560,_0x1025c6);}else{if(_0x542101){_0x1025c6();}else{return _0x471560['status'](0x193)[_0x2ca5('0x3f')]({'message':'Unknown\x20authorization\x20format'});}}}else if(_0x19527f[_0x2ca5('0x4b')]['apikey']){try{var _0x5e06a2={'audience':hardwareConf[_0x2ca5('0x4c')](),'issuer':hardwareConf[_0x2ca5('0x4c')]()};verifyJwt(_0x19527f[_0x2ca5('0x4b')]['apikey'],_0x5e06a2)[_0x2ca5('0x3d')](function(_0x2945be){return db[_0x2ca5('0x46')]['find']({'where':{'id':_0x2945be['sub']}})[_0x2ca5('0x3d')](function(_0x37cabd){_0x1784a2=_0x37cabd;return db['Setting'][_0x2ca5('0x39')]({'where':{'id':0x1},'attributes':[_0x2ca5('0x4d'),'blockDuration'],'raw':!![]});})['then'](function(_0xfbd366){if(!_0x1784a2||!_['isEqual'](_0x1784a2[_0x2ca5('0x4e')],_0x2945be[_0x2ca5('0x4f')])){return _0x471560['status'](0x191)['json']({'message':_0x2ca5('0x50')});}if(_0x1784a2[_0x2ca5('0x51')]){return _0x471560[_0x2ca5('0x3e')](0x191)[_0x2ca5('0x3f')]({'message':'Invalid\x20API\x20access\x20key'});}if(_0x1784a2[_0x2ca5('0x52')]){if(_0xfbd366[_0x2ca5('0x53')]>0x0){if(moment(_0x1784a2[_0x2ca5('0x54')])[_0x2ca5('0x55')](_0xfbd366[_0x2ca5('0x53')],_0x2ca5('0x56'))>moment()){return _0x471560[_0x2ca5('0x3e')](0x191)[_0x2ca5('0x3f')]({'message':_0x2ca5('0x57')});}}else{return _0x471560[_0x2ca5('0x3e')](0x191)[_0x2ca5('0x3f')]({'message':_0x2ca5('0x57')});}}_0x19527f[_0x2ca5('0x37')]={'id':_0x1784a2['id']};_0x1025c6();});})[_0x2ca5('0x42')](function(){return _0x471560[_0x2ca5('0x3e')](0x191)[_0x2ca5('0x3f')]({'message':_0x2ca5('0x57')});});}catch(_0x373710){_0x1025c6(_0x373710);}}else if(_0x542101){_0x1025c6();}else{return _0x471560[_0x2ca5('0x3e')](0x193)[_0x2ca5('0x3f')]({'message':_0x2ca5('0x58')});}})[_0x2ca5('0x36')](function(_0x19c5d5,_0x1e1c86,_0x4aaf78){if(_0x19c5d5['user']){db[_0x2ca5('0x46')][_0x2ca5('0x47')]({'where':{'id':_0x19c5d5[_0x2ca5('0x37')]['id']},'attributes':userAttributes})[_0x2ca5('0x3d')](function(_0x5778b0){if(!_0x5778b0){return _0x1e1c86[_0x2ca5('0x3e')](0x194)[_0x2ca5('0x3f')]({'message':_0x2ca5('0x59')});}_0x19c5d5['user']=_0x5778b0;_0x4aaf78();})['catch'](function(_0x30259d){_0x4aaf78(_0x30259d);});}else if(_0x542101){_0x4aaf78();}else{return _0x1e1c86[_0x2ca5('0x3e')](0x194)[_0x2ca5('0x3f')]({'message':_0x2ca5('0x5a')});}});};exports[_0x2ca5('0x5b')]=function canUpdate(){return compose()['use'](function(_0x4adf92,_0x1f8ba4,_0x793596){return licenseUtil[_0x2ca5('0x5c')]()[_0x2ca5('0x3d')](function(_0x2b9266){if(_0x2b9266['update']){_0x793596();}else{return _0x1f8ba4[_0x2ca5('0x3e')](0x193)[_0x2ca5('0x3f')]({'message':'Forbidden'});}})[_0x2ca5('0x42')](function(_0x5a4b7d){_0x793596(_0x5a4b7d);});});};exports[_0x2ca5('0x5d')]=function isWebrtcLicence(){return compose()[_0x2ca5('0x36')](function(_0x3b3268,_0x3aaa29,_0x2e5ce3){return licenseUtil[_0x2ca5('0x5c')]()[_0x2ca5('0x3d')](function(_0x15c49b){if(_0x15c49b[_0x2ca5('0x5e')]){_0x2e5ce3();}else{return _0x3aaa29[_0x2ca5('0x3e')](0x193)[_0x2ca5('0x3f')]({'message':_0x2ca5('0x5f')});}})[_0x2ca5('0x42')](function(_0x2110db){_0x2e5ce3(_0x2110db);});});};exports[_0x2ca5('0x60')]=function(_0x1c820e,_0x543f1e,_0x25f26a){_0x1c820e[_0x2ca5('0x60')]=!![];return _0x25f26a();};exports[_0x2ca5('0x61')]=function signToken(_0x5aab62){return signJwt(_0x5aab62);};exports[_0x2ca5('0x62')]=function(_0x3b8840,_0x277e8d){if(!_0x3b8840[_0x2ca5('0x37')]){return _0x277e8d[_0x2ca5('0x3e')](0x194)[_0x2ca5('0x3f')]({'message':_0x2ca5('0x63')});}var _0x14b575={'payload':{'id':_0x3b8840['user']['id'],'role':_0x3b8840['user'][_0x2ca5('0xa')]},'options':{'expiresIn':0x15180}};return signJwt(_0x14b575)[_0x2ca5('0x3d')](function(_0xe9a64f){_0x277e8d[_0x2ca5('0x64')]('motion.token',_0xe9a64f);_0x277e8d[_0x2ca5('0x65')](_0x2ca5('0x66'));})['catch'](function(_0x33e50c){return _0x277e8d[_0x2ca5('0x3e')](0x1f4)[_0x2ca5('0x67')](_0x33e50c);});};exports[_0x2ca5('0x68')]=function(_0x12e0c6){if(_[_0x2ca5('0x69')](_0x12e0c6[_0x2ca5('0x4e')])||_[_0x2ca5('0x69')](_0x12e0c6[_0x2ca5('0x6a')])){return null;}else{return createJwt(_0x12e0c6);}};exports[_0x2ca5('0x6b')]=function(_0x2e2f89){_0x2e2f89[_0x2ca5('0x4e')]=generateNonce();_0x2e2f89[_0x2ca5('0x6a')]=generateIssuedAt();return createJwt(_0x2e2f89);};exports['regenerateApiKey']=function(_0x3e48da,_0x4c36a6){var _0xf5ca5a=_0x3e48da[_0x2ca5('0x4b')]['apikey'];if(_0xf5ca5a){var _0x1748e1={'nonce':_0x4c36a6['apiKeyNonce'],'iat':_0x4c36a6['apiKeyIat'],'audience':hardwareConf['getUuid'](),'issuer':hardwareConf[_0x2ca5('0x4c')]()};return verifyJwt(_0xf5ca5a,_0x1748e1)[_0x2ca5('0x3d')](function(){return generateApiKey(_0x4c36a6);});}else{throw{'message':_0x2ca5('0x6c')};}};exports[_0x2ca5('0x6d')]=function(_0x177e7e){var _0x279acd=new RegExp(/(?=.*[a-z])(?=.*[A-Z])(?=.*[0-9])(?=.*[?!@#\$%\^&\*~\-_=+[{\]\}])(?=.{8,})/);if(!_0x279acd[_0x2ca5('0x6e')](_0x177e7e))throw new db['Sequelize'][(_0x2ca5('0x6f'))](_0x2ca5('0x70'));return;};exports[_0x2ca5('0x71')]=function(_0x270c62,_0x121780,_0x53fa6b){var _0x465f82=encryptor[_0x2ca5('0x72')](_0x121780)[_0x2ca5('0x73')](',');for(var _0x512cef=0x0;_0x512cef<_0x53fa6b;_0x512cef++){if(!_0x465f82[_0x512cef])break;if(_0x270c62[_0x2ca5('0x74')]()===_0x465f82[_0x512cef][_0x2ca5('0x74')]()){var _0x20a450=util[_0x2ca5('0x75')](_0x2ca5('0x76'),_0x53fa6b);if(_0x53fa6b===0x1){_0x20a450=_0x2ca5('0x77');}throw new db[(_0x2ca5('0x78'))][(_0x2ca5('0x6f'))](_0x20a450);}}return;};exports[_0x2ca5('0x79')]=function(_0x2eb5ed,_0x117fe7){var _0x1c4824=_0x117fe7?encryptor[_0x2ca5('0x72')](_0x117fe7)[_0x2ca5('0x73')](','):[];if(_0x1c4824[_0x2ca5('0x7a')]===0x5){_0x1c4824[_0x2ca5('0x7b')](-0x1,0x1);}_0x1c4824['unshift'](_0x2eb5ed);return encryptor[_0x2ca5('0x7c')](_0x1c4824[_0x2ca5('0x7d')](','));};function signJwt(_0x1bde16){var _0xca96fb=BPromise['promisify'](jwt[_0x2ca5('0x7e')],{'context':jwt});var _0x4b308e=_0x1bde16['secret']||config[_0x2ca5('0x8')][_0x2ca5('0x9')];return new BPromise(function(_0x214eb6,_0xb4cf42){_0xca96fb(_0x1bde16['payload'],_0x4b308e,_0x1bde16[_0x2ca5('0x7f')])[_0x2ca5('0x3d')](function(_0xd40c50){_0x214eb6(_0xd40c50);})[_0x2ca5('0x42')](function(_0x5ae6ec){_0xb4cf42(_0x5ae6ec);});});}function verifyJwt(_0x1df64f,_0x33ba5f,_0x1e8355){var _0x4d0059=BPromise[_0x2ca5('0x80')](jwt['verify'],{'context':jwt});var _0xf57b83=_0x1e8355||config[_0x2ca5('0x8')][_0x2ca5('0x9')];return new BPromise(function(_0x3234db,_0x5eedaf){_0x4d0059(_0x1df64f,_0xf57b83,_0x33ba5f)[_0x2ca5('0x3d')](function(_0x1a350e){_0x3234db(_0x1a350e);})[_0x2ca5('0x42')](function(_0x304a9a){_0x5eedaf(_0x304a9a);});});}function generateNonce(){return crypto[_0x2ca5('0x81')](0x10)[_0x2ca5('0x82')]('hex');}function generateIssuedAt(){return Math[_0x2ca5('0x83')](Date['now']()/0x3e8)['toString']();}function createJwt(_0x257604){var _0xae125={'payload':{'iat':_0x257604[_0x2ca5('0x6a')],'nonce':_0x257604['apiKeyNonce']},'options':{'algorithm':_0x2ca5('0x84'),'subject':_0x257604['id']['toString'](),'issuer':hardwareConf[_0x2ca5('0x4c')](),'audience':hardwareConf[_0x2ca5('0x4c')]()}};return signJwt(_0xae125)['then'](function(_0x351ddb){return{'iat':_0x257604['apiKeyIat'],'nonce':_0x257604['apiKeyNonce'],'token':_0x351ddb};});}
\ No newline at end of file
index edd84b5..647f8bc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x21fb=['where','default','filter','user','tags','skip','checkListsRestrictions','ids','countFilteredContacts','count','User','buildContactsQuery','clause','getFilteredContacts','rows','catch','CmContact','describe','keys','cf_','CmCustomField','slice','all','type','map','lodash','./sql-utils','../../mysqldb','findAll','skipContactsQuery','resolve','getContactsSubquery','then','search','parseAdvancedSearchFilter','parseQueryParameters'];(function(_0x586929,_0x20be9a){var _0xfb5e94=function(_0x2817be){while(--_0x2817be){_0x586929['push'](_0x586929['shift']());}};_0xfb5e94(++_0x20be9a);}(_0x21fb,0xa9));var _0xb21f=function(_0x38832c,_0x1daf0b){_0x38832c=_0x38832c-0x0;var _0x43a35f=_0x21fb[_0x38832c];return _0x43a35f;};'use strict';var _=require(_0xb21f('0x0'));var sqlUtils=require(_0xb21f('0x1'));var db=require(_0xb21f('0x2'))['db'];exports[_0xb21f('0x3')]=function(_0x27909e,_0x54e69c,_0xbad57f,_0x18bcc9){var _0x4694b6={'count':0x0,'rows':[]};var _0x479f3a=sqlUtils[_0xb21f('0x4')](_0x54e69c,_0x27909e);if(_0x479f3a){return Promise[_0xb21f('0x5')](_0x4694b6);}var _0x456f17=sqlUtils[_0xb21f('0x6')]();var _0x2fa660={};var _0x5da8eb=![];var _0xa96458=![];return Promise[_0xb21f('0x5')]()[_0xb21f('0x7')](function(){if(_0x27909e[_0xb21f('0x8')]){return sqlUtils[_0xb21f('0x9')](_0x27909e['search'],_0x18bcc9);}else{return sqlUtils[_0xb21f('0xa')](_0x27909e,_0x18bcc9);}})[_0xb21f('0x7')](function(_0x5b4334){_0x456f17[_0xb21f('0xb')](_0x5b4334[_0xb21f('0xc')]);_0x456f17[_0xb21f('0xb')](_0x5b4334['fields']);_0x456f17[_0xb21f('0xb')](_0x5b4334[_0xb21f('0xd')]);_0x456f17['where'](_0x5b4334[_0xb21f('0xe')]['clause']);_0x2fa660=_0x5b4334[_0xb21f('0xf')];_0xa96458=_0x5b4334[_0xb21f('0xe')][_0xb21f('0x10')];return sqlUtils[_0xb21f('0x11')](_0x54e69c,_0x27909e,_0xa96458);})[_0xb21f('0x7')](function(_0x262da7){_0x456f17[_0xb21f('0xb')](_0x262da7);var _0x5304e9=_0x27909e[_0xb21f('0x8')]?_0x2fa660[_0xb21f('0x12')]:_0x27909e['tag'];_0x5da8eb=_0x5304e9?!![]:![];return sqlUtils[_0xb21f('0x13')](_0x456f17,_0x5304e9);})[_0xb21f('0x7')](function(_0x3a22f8){_0x4694b6[_0xb21f('0x14')]=_0x3a22f8;if(_0x4694b6[_0xb21f('0x14')]===0x0){return;}if(_0x27909e[_0xb21f('0x15')]){_0xa96458=!![];}return sqlUtils[_0xb21f('0x16')](_0x456f17,_0x27909e['fields'],_0xbad57f,_0x5da8eb,_0x2fa660[_0xb21f('0x17')],_0xa96458);})[_0xb21f('0x7')](function(_0x4a50df){if(!_0x4a50df){return[];}return sqlUtils[_0xb21f('0x18')](_0x4a50df,_0x27909e,_0xbad57f);})[_0xb21f('0x7')](function(_0x24a632){_0x4694b6[_0xb21f('0x19')]=_0x24a632;return _0x4694b6;})[_0xb21f('0x1a')](function(_0xed356c){throw _0xed356c;});};exports['describe']=function(){var _0x2c2e52={};var _0x21d236=[];return db[_0xb21f('0x1b')][_0xb21f('0x1c')]()[_0xb21f('0x7')](function(_0x2fd797){_0x2c2e52=_0x2fd797;var _0x2dacfa=Object[_0xb21f('0x1d')](_0x2c2e52)[_0xb21f('0xd')](function(_0x3630a0){return _['startsWith'](_0x3630a0,_0xb21f('0x1e'))?_0x3630a0:undefined;});var _0x2d199a=_0x2dacfa['map'](function(_0x2cfe84){return db[_0xb21f('0x1f')]['findOne']({'where':{'id':_0x2cfe84[_0xb21f('0x20')](0x3)},'raw':!![]});});return Promise[_0xb21f('0x21')](_0x2d199a);})['then'](function(_0x46239e){for(var _0x2730f2=0x0;_0x2730f2<_0x46239e['length'];_0x2730f2++){if(_0x46239e[_0x2730f2]){var _0x3e4d34=_0xb21f('0x1e')+_0x46239e[_0x2730f2]['id'];_0x2c2e52[_0x3e4d34]['fieldType']=_0x46239e[_0x2730f2][_0xb21f('0x22')];}}_0x21d236=_[_0xb21f('0x23')](Object[_0xb21f('0x1d')](_0x2c2e52),function(_0x41c3cc){return{'name':_0x41c3cc,'type':_0x2c2e52[_0x41c3cc][_0xb21f('0x22')]};});return _0x21d236;})['catch'](function(_0x59c430){throw _0x59c430;});};
\ No newline at end of file
+var _0xef12=['../../mysqldb','findAll','skipContactsQuery','getContactsSubquery','resolve','then','search','parseAdvancedSearchFilter','where','default','filter','clause','tags','user','skip','checkListsRestrictions','ids','tag','countFilteredContacts','count','User','buildContactsQuery','getFilteredContacts','rows','catch','describe','startsWith','cf_','map','findOne','slice','all','fieldType','type','lodash','./sql-utils'];(function(_0x5947c8,_0x7a7ccf){var _0x2ef741=function(_0x1371ae){while(--_0x1371ae){_0x5947c8['push'](_0x5947c8['shift']());}};_0x2ef741(++_0x7a7ccf);}(_0xef12,0x18a));var _0x2ef1=function(_0x75a7ae,_0x2d110d){_0x75a7ae=_0x75a7ae-0x0;var _0x4a1cc6=_0xef12[_0x75a7ae];return _0x4a1cc6;};'use strict';var _=require(_0x2ef1('0x0'));var sqlUtils=require(_0x2ef1('0x1'));var db=require(_0x2ef1('0x2'))['db'];exports[_0x2ef1('0x3')]=function(_0x33f3a0,_0x410952,_0xe14de5,_0x4da862){var _0x241203={'count':0x0,'rows':[]};var _0x54d2a8=sqlUtils[_0x2ef1('0x4')](_0x410952,_0x33f3a0);if(_0x54d2a8){return Promise['resolve'](_0x241203);}var _0x1b50e0=sqlUtils[_0x2ef1('0x5')]();var _0x3bab47={};var _0xf048ad=![];var _0x1923b7=![];return Promise[_0x2ef1('0x6')]()[_0x2ef1('0x7')](function(){if(_0x33f3a0[_0x2ef1('0x8')]){return sqlUtils[_0x2ef1('0x9')](_0x33f3a0[_0x2ef1('0x8')],_0x4da862);}else{return sqlUtils['parseQueryParameters'](_0x33f3a0,_0x4da862);}})[_0x2ef1('0x7')](function(_0x241d02){_0x1b50e0[_0x2ef1('0xa')](_0x241d02[_0x2ef1('0xb')]);_0x1b50e0['where'](_0x241d02['fields']);_0x1b50e0['where'](_0x241d02[_0x2ef1('0xc')]);_0x1b50e0[_0x2ef1('0xa')](_0x241d02['user'][_0x2ef1('0xd')]);_0x3bab47=_0x241d02[_0x2ef1('0xe')];_0x1923b7=_0x241d02[_0x2ef1('0xf')][_0x2ef1('0x10')];return sqlUtils[_0x2ef1('0x11')](_0x410952,_0x33f3a0,_0x1923b7);})[_0x2ef1('0x7')](function(_0x2a55c0){_0x1b50e0[_0x2ef1('0xa')](_0x2a55c0);var _0x234f74=_0x33f3a0[_0x2ef1('0x8')]?_0x3bab47[_0x2ef1('0x12')]:_0x33f3a0[_0x2ef1('0x13')];_0xf048ad=_0x234f74?!![]:![];return sqlUtils[_0x2ef1('0x14')](_0x1b50e0,_0x234f74);})[_0x2ef1('0x7')](function(_0x40211d){_0x241203[_0x2ef1('0x15')]=_0x40211d;if(_0x241203[_0x2ef1('0x15')]===0x0){return;}if(_0x33f3a0[_0x2ef1('0x16')]){_0x1923b7=!![];}return sqlUtils[_0x2ef1('0x17')](_0x1b50e0,_0x33f3a0['fields'],_0xe14de5,_0xf048ad,_0x3bab47['clause'],_0x1923b7);})[_0x2ef1('0x7')](function(_0x5bc7e3){if(!_0x5bc7e3){return[];}return sqlUtils[_0x2ef1('0x18')](_0x5bc7e3,_0x33f3a0,_0xe14de5);})[_0x2ef1('0x7')](function(_0x2196dd){_0x241203[_0x2ef1('0x19')]=_0x2196dd;return _0x241203;})[_0x2ef1('0x1a')](function(_0x32492a){throw _0x32492a;});};exports['describe']=function(){var _0x5f2adf={};var _0x18d2e5=[];return db['CmContact'][_0x2ef1('0x1b')]()['then'](function(_0x5d0d1e){_0x5f2adf=_0x5d0d1e;var _0x39d2aa=Object['keys'](_0x5f2adf)[_0x2ef1('0xc')](function(_0x30527c){return _[_0x2ef1('0x1c')](_0x30527c,_0x2ef1('0x1d'))?_0x30527c:undefined;});var _0x41901f=_0x39d2aa[_0x2ef1('0x1e')](function(_0x4db452){return db['CmCustomField'][_0x2ef1('0x1f')]({'where':{'id':_0x4db452[_0x2ef1('0x20')](0x3)},'raw':!![]});});return Promise[_0x2ef1('0x21')](_0x41901f);})[_0x2ef1('0x7')](function(_0x549e79){for(var _0x1e9dab=0x0;_0x1e9dab<_0x549e79['length'];_0x1e9dab++){if(_0x549e79[_0x1e9dab]){var _0x57f9d9='cf_'+_0x549e79[_0x1e9dab]['id'];_0x5f2adf[_0x57f9d9][_0x2ef1('0x22')]=_0x549e79[_0x1e9dab][_0x2ef1('0x23')];}}_0x18d2e5=_[_0x2ef1('0x1e')](Object['keys'](_0x5f2adf),function(_0x212007){return{'name':_0x212007,'type':_0x5f2adf[_0x212007][_0x2ef1('0x23')]};});return _0x18d2e5;})[_0x2ef1('0x1a')](function(_0x40d7a3){throw _0x40d7a3;});};
\ No newline at end of file
index 61e69c9..118a68e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb766=['cm_contacts','where','subqry','left_join','cm_user_has_contacts','uc.CmContactId\x20=\x20','.id','cm_contact_has_tags','ct.CmContactId\x20=\x20','lastName','phone','fax','email','CompanyId','createdAt','updatedAt','deletedAt','TagIds','includes','push','field','GROUP_CONCAT(DISTINCT\x20t.id)','expr','forEach','CONCAT(\x27,\x27,\x20subqry.TagIds,\x20\x27,\x27)\x20LIKE\x20?','replace','split','length','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','c.id\x20LIKE\x20?','c.phone\x20LIKE\x20?','c.mobile\x20LIKE\x20?','c.lastName\x20LIKE\x20?','parseSearch','conditions','name','dateOfBirth','fieldType','datetime','castTo','DATE','buildExpression','type','default','text','value','tags','User','user','clause','and','uc.UserId\x20=\x20?','map','some','compact','Contact','c.ListId\x20IN\x20?','concat','\x20=\x20?','resolve','then','tag','filter','search','role','getLists','attributes','select','group','limit','offset','subqry.id','order','DESC','Tag','findAll','keyBy','Sequelize','QueryTypes','SELECT','CmContact','sequelize','toString','c.id','isEmpty','t.id\x20IN\x20?','query','exports','squel','../parsers/qs','../interaction/utils','../../mysqldb','agent','ListId','true','from'];(function(_0x2dea24,_0x2fc021){var _0x309d58=function(_0x2eb89f){while(--_0x2eb89f){_0x2dea24['push'](_0x2dea24['shift']());}};_0x309d58(++_0x2fc021);}(_0xb766,0xb8));var _0x6b76=function(_0xd02bb,_0x26e2d0){_0xd02bb=_0xd02bb-0x0;var _0x1cdf23=_0xb766[_0xd02bb];return _0x1cdf23;};'use strict';var _=require('lodash');var squel=require(_0x6b76('0x0'));var as=require('../parsers/advancedSearch');var qs=require(_0x6b76('0x1'));var utils=require(_0x6b76('0x2'));var db=require(_0x6b76('0x3'))['db'];function skipContactsQuery(_0x412977,_0x1e42f7){var _0x4d164e=![];if(_0x412977['role']===_0x6b76('0x4')&&!_0x1e42f7['search']&&!_0x1e42f7[_0x6b76('0x5')]&&_0x1e42f7['autocomplete']!==_0x6b76('0x6')){_0x4d164e=!![];}return _0x4d164e;}function getContactsSubquery(){return squel['select']()[_0x6b76('0x7')](_0x6b76('0x8'),'c')[_0x6b76('0x9')]('c.deletedAt\x20IS\x20NULL');}function applyJoinClauses(_0x37c1e2,_0x211505){var _0x3c3747=_0x211505?'c':_0x6b76('0xa');_0x37c1e2[_0x6b76('0xb')](_0x6b76('0xc'),'uc',_0x6b76('0xd')+_0x3c3747+_0x6b76('0xe'))[_0x6b76('0xb')](_0x6b76('0xf'),'ct',_0x6b76('0x10')+_0x3c3747+'.id')[_0x6b76('0xb')]('tools_tags','t','t.id\x20=\x20ct.TagId');return _0x37c1e2;}function addFieldsToQuery(_0x53fb15,_0x18879c,_0x1355ba,_0x33564c,_0x491553){var _0x6f7287=_0x491553?'c':_0x6b76('0xa');if(!_0x18879c){_0x18879c=['id','firstName',_0x6b76('0x11'),_0x6b76('0x12'),'mobile',_0x6b76('0x13'),_0x6b76('0x14'),_0x6b76('0x5'),_0x6b76('0x15'),_0x6b76('0x16'),_0x6b76('0x17'),_0x6b76('0x18'),_0x6b76('0x19')];}else if(!_0x18879c[_0x6b76('0x1a')]('id')){_0x18879c[_0x6b76('0x1b')]('id');}var _0x3c5875=_0x1355ba&&_0x491553||!_0x1355ba&&!_0x491553;if(_0x33564c){_0x3c5875=_0x33564c&&_0x491553||!_0x33564c&&!_0x491553;}_0x18879c['forEach'](function(_0xbe4d3c){if(_0xbe4d3c===_0x6b76('0x19')){if(_0x3c5875){_0x53fb15[_0x6b76('0x1c')](_0x6b76('0x1d'),_0xbe4d3c);}else if(_0x1355ba||_0x33564c){_0x53fb15[_0x6b76('0x1c')](_0x6f7287+'.'+_0xbe4d3c);}}else{_0x53fb15[_0x6b76('0x1c')](_0x6f7287+'.'+_0xbe4d3c);}});return _0x53fb15;}function getSqlClauses(){var _0x2faaa9={'default':squel['expr'](),'fields':squel[_0x6b76('0x1e')](),'filter':squel[_0x6b76('0x1e')](),'tags':{'clause':squel[_0x6b76('0x1e')](),'ids':null},'user':{'clause':squel[_0x6b76('0x1e')](),'skip':![]}};return _0x2faaa9;}function parseTagParameter(_0x28c896){var _0x3c7adf=squel[_0x6b76('0x1e')]();if(_0x28c896){var _0x1e2a7f=utils['getSelectedTags'](_0x28c896);_0x1e2a7f[_0x6b76('0x1f')](function(_0x4afdb7){_0x3c7adf['or'](_0x6b76('0x20'),'%,'+_0x4afdb7+',%');});}return _0x3c7adf;}function parseSearchFilter(_0x49d355){var _0x143cbf=squel['expr']();if(_0x49d355){var _0x2735f1=_0x49d355[_0x6b76('0x21')]('\x5c','\x5c\x5c')[_0x6b76('0x21')](/'/g,'\x27\x27');if(_0x2735f1[_0x6b76('0x22')]('\x20')[_0x6b76('0x23')]>0x1){_0x143cbf['or'](_0x6b76('0x24'),qs['getFullTextValue'](_0x2735f1,!![]),null);}else{if(qs['isNumeric'](_0x2735f1)){_0x143cbf['or'](_0x6b76('0x25'),_0x2735f1+'%');_0x143cbf['or'](_0x6b76('0x26'),_0x2735f1+'%');_0x143cbf['or'](_0x6b76('0x27'),_0x2735f1+'%');_0x143cbf['or']('c.fax\x20LIKE\x20?',_0x2735f1+'%');}else if(qs['isEmail'](_0x2735f1)){_0x143cbf['or']('c.email\x20LIKE\x20?',_0x2735f1+'%');}else{_0x143cbf['or']('c.firstName\x20LIKE\x20?','%'+_0x2735f1+'%');_0x143cbf['or'](_0x6b76('0x28'),'%'+_0x2735f1+'%');_0x143cbf['or']('c.email\x20LIKE\x20?','%'+_0x2735f1+'%');}}}return _0x143cbf;}function parseAdvancedSearchFilter(_0x3eab89,_0x1b4d4c){var _0x2bc2b7=getSqlClauses();var _0x43aeb0=as[_0x6b76('0x29')](_0x3eab89);var _0x290993=_0x43aeb0['sqlOperator'];for(var _0x53368c=0x0;_0x53368c<_0x43aeb0['conditions'][_0x6b76('0x23')];_0x53368c++){var _0x1f0b00=_0x43aeb0[_0x6b76('0x2a')][_0x53368c];var _0x2bec15='c';var _0x1f731b=_['find'](_0x1b4d4c,[_0x6b76('0x2b'),_0x1f0b00['field']]);if(_0x1f731b){if(_0x1f0b00[_0x6b76('0x1c')]===_0x6b76('0x2c')||_0x1f731b[_0x6b76('0x2d')]===_0x6b76('0x2e')){_0x1f0b00[_0x6b76('0x2f')]=_0x6b76('0x30');}var _0xb4ca6=as[_0x6b76('0x31')](_0x2bec15,_0x1f731b[_0x6b76('0x32')],_0x1f0b00);_0x2bc2b7[_0x6b76('0x33')][_0x290993](_0xb4ca6[_0x6b76('0x34')],_0xb4ca6[_0x6b76('0x35')]['start'],_0xb4ca6['value']['end']);}else{if(_0x1f0b00['field']==='Tag'){var _0x59934c=_0x1f0b00[_0x6b76('0x35')][_0x6b76('0x22')](',')['map'](function(_0x15b6f1){return Number(_0x15b6f1);});var _0x3d614c=parseTagParameter(_0x59934c);_0x2bc2b7[_0x6b76('0x36')]['clause']['and'](_0x3d614c);_0x2bc2b7[_0x6b76('0x36')]['ids']=_0x59934c;}else if(_0x1f0b00[_0x6b76('0x1c')]===_0x6b76('0x37')){_0x2bc2b7[_0x6b76('0x38')][_0x6b76('0x39')][_0x6b76('0x3a')](_0x6b76('0x3b'),_0x1f0b00[_0x6b76('0x35')]);_0x2bc2b7[_0x6b76('0x38')]['skip']=!![];}}}return _0x2bc2b7;}function parseModelFields(_0x18a9ba,_0x4064ca){var _0xa2ceac=squel[_0x6b76('0x1e')]();var _0x3577c5=_(_0x18a9ba)['keys']()[_0x6b76('0x3c')](function(_0x540993){return _[_0x6b76('0x3d')](_0x4064ca,['name',_0x540993])?_0x540993:undefined;})[_0x6b76('0x3e')]()['value']();if(_0x18a9ba[_0x6b76('0x3f')]){_0x3577c5['push'](_0x6b76('0x3f'));}if(_0x18a9ba['User']){_0x3577c5['push'](_0x6b76('0x37'));}if(_0x3577c5[_0x6b76('0x23')]>0x0){_0x3577c5[_0x6b76('0x1f')](function(_0x35ce8a){if(_0x35ce8a===_0x6b76('0x5')){_0xa2ceac[_0x6b76('0x3a')](_0x6b76('0x40'),[][_0x6b76('0x41')](_0x18a9ba[_0x35ce8a]));}else if(_0x35ce8a===_0x6b76('0x3f')){var _0x43ef6c='%'+_0x18a9ba[_0x35ce8a]+'%';_0xa2ceac[_0x6b76('0x3a')]('CONCAT_WS(\x27\x20\x27,\x20c.firstName,\x20c.lastName,\x20c.email)\x20LIKE\x20?',_0x43ef6c);}else if(_0x35ce8a==='User'){_0xa2ceac[_0x6b76('0x3a')](_0x6b76('0x3b'),_0x18a9ba[_0x35ce8a]);}else{_0xa2ceac[_0x6b76('0x3a')]('c.'+_0x35ce8a+_0x6b76('0x42'),_0x18a9ba[_0x35ce8a]);}});}return _0xa2ceac;}function parseQueryParameters(_0x3fda22,_0x11cae4){var _0x583148=getSqlClauses();return Promise[_0x6b76('0x43')]()[_0x6b76('0x44')](function(){return parseModelFields(_0x3fda22,_0x11cae4);})[_0x6b76('0x44')](function(_0x582080){_0x583148['fields'][_0x6b76('0x3a')](_0x582080);return parseTagParameter(_0x3fda22[_0x6b76('0x45')]);})['then'](function(_0x2e940c){_0x583148[_0x6b76('0x36')][_0x6b76('0x39')]['and'](_0x2e940c);return parseSearchFilter(_0x3fda22[_0x6b76('0x46')]);})[_0x6b76('0x44')](function(_0x58e74a){_0x583148['filter']=_0x58e74a;return _0x583148;});}function checkListsRestrictions(_0xbec187,_0x30e2cd,_0x5502d1){var _0x48a351=squel[_0x6b76('0x1e')]();return Promise[_0x6b76('0x43')]()[_0x6b76('0x44')](function(){if(_0x30e2cd[_0x6b76('0x47')]&&_0xbec187[_0x6b76('0x48')]===_0x6b76('0x4')&&!_0x5502d1){return _0xbec187[_0x6b76('0x49')]({'attributes':['id'],'raw':!![]});}})[_0x6b76('0x44')](function(_0x293050){if(_0x293050){if(_0x293050[_0x6b76('0x23')]===0x0){_0x48a351[_0x6b76('0x3a')]('c.ListId\x20IS\x20NULL');}else{_0x48a351[_0x6b76('0x3a')](_0x6b76('0x40'),_['map'](_0x293050,'id'));}}})[_0x6b76('0x44')](function(){return _0x48a351;});}function buildContactsQuery(_0x2c4342,_0x5f3d3e,_0x591123,_0x315ee9,_0x466c27,_0x4bcce8){if(_0x5f3d3e){_0x5f3d3e=_0x591123[_0x6b76('0x4a')];}_0x2c4342=addFieldsToQuery(_0x2c4342,_0x5f3d3e,_0x315ee9,_0x4bcce8,!![]);var _0x40a3a0=squel[_0x6b76('0x4b')]();_0x40a3a0=addFieldsToQuery(_0x40a3a0,_0x5f3d3e,_0x315ee9,_0x4bcce8,![]);if(_0x315ee9||_0x4bcce8){_0x2c4342=applyJoinClauses(_0x2c4342,!![]);_0x2c4342[_0x6b76('0x4c')]('c.id');if(_0x591123[_0x6b76('0x4d')]){_0x40a3a0[_0x6b76('0x4d')](_0x591123[_0x6b76('0x4d')]);}if(_0x591123['offset']){_0x40a3a0['offset'](_0x591123[_0x6b76('0x4e')]);}}else{_0x40a3a0=applyJoinClauses(_0x40a3a0,![]);_0x40a3a0['group'](_0x6b76('0x4f'));if(_0x591123['limit']){_0x2c4342[_0x6b76('0x4d')](_0x591123['limit']);}if(_0x591123['offset']){_0x2c4342[_0x6b76('0x4e')](_0x591123[_0x6b76('0x4e')]);}}_0x40a3a0['having'](_0x466c27);if(_0x591123['order']){_0x591123[_0x6b76('0x50')][_0x6b76('0x1f')](function(_0xe1b519){_0x2c4342[_0x6b76('0x50')]('c.'+_0xe1b519[0x0],_0xe1b519[0x1]===_0x6b76('0x51')?![]:!![]);_0x40a3a0[_0x6b76('0x50')]('subqry.'+_0xe1b519[0x0],_0xe1b519[0x1]===_0x6b76('0x51')?![]:!![]);});}_0x40a3a0[_0x6b76('0x7')](_0x2c4342,_0x6b76('0xa'));return _0x40a3a0;}function getFilteredContacts(_0x2416fb){var _0x20a450=[];return db[_0x6b76('0x52')][_0x6b76('0x53')]({'attributes':['id','name','color'],'raw':!![]})[_0x6b76('0x44')](function(_0x583748){_0x20a450=_[_0x6b76('0x54')](_0x583748,'id');var _0x3ce38c={'type':db[_0x6b76('0x55')][_0x6b76('0x56')][_0x6b76('0x57')],'model':db[_0x6b76('0x58')],'mapToModel':!![],'nest':!![],'raw':!![]};return db[_0x6b76('0x59')]['query'](_0x2416fb[_0x6b76('0x5a')](),_0x3ce38c);})['then'](function(_0x436f97){_0x436f97[_0x6b76('0x1f')](function(_0xe10a65){if(_0xe10a65['TagIds']){_0xe10a65['Tags']=[];_0xe10a65[_0x6b76('0x19')][_0x6b76('0x22')](',')[_0x6b76('0x1f')](function(_0x3e5c35){_0xe10a65['Tags'][_0x6b76('0x1b')](_0x20a450[_0x3e5c35]);});}delete _0xe10a65[_0x6b76('0x19')];});return _0x436f97;});}function countFilteredContacts(_0x54ad66,_0x45659f){var _0xa28ed9=_0x54ad66['clone']();_0xa28ed9[_0x6b76('0x1c')]('COUNT(*)');_0xa28ed9=applyJoinClauses(_0xa28ed9,!![]);_0x54ad66['group'](_0x6b76('0x5b'));var _0x584ffe=utils['getSelectedTags'](_0x45659f);if(!_[_0x6b76('0x5c')](_0x584ffe)){_0xa28ed9[_0x6b76('0x9')](_0x6b76('0x5d'),_0x584ffe);}var _0x4bc7ee={'type':db[_0x6b76('0x55')][_0x6b76('0x56')][_0x6b76('0x57')],'raw':!![]};return db[_0x6b76('0x59')][_0x6b76('0x5e')](_0xa28ed9[_0x6b76('0x5a')](),_0x4bc7ee)[_0x6b76('0x44')](function(_0x48b935){return _0x48b935[0x0]['COUNT(*)'];});}module[_0x6b76('0x5f')]={'buildContactsQuery':buildContactsQuery,'checkListsRestrictions':checkListsRestrictions,'countFilteredContacts':countFilteredContacts,'getContactsSubquery':getContactsSubquery,'getFilteredContacts':getFilteredContacts,'parseAdvancedSearchFilter':parseAdvancedSearchFilter,'parseQueryParameters':parseQueryParameters,'skipContactsQuery':skipContactsQuery};
\ No newline at end of file
+var _0xa6c3=['MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','isNumeric','c.id\x20LIKE\x20?','c.phone\x20LIKE\x20?','c.mobile\x20LIKE\x20?','c.fax\x20LIKE\x20?','isEmail','c.email\x20LIKE\x20?','c.firstName\x20LIKE\x20?','c.lastName\x20LIKE\x20?','sqlOperator','conditions','length','find','name','dateOfBirth','fieldType','datetime','castTo','DATE','buildExpression','type','value','end','Tag','tags','clause','and','ids','User','user','skip','map','some','compact','Contact','concat','uc.UserId\x20=\x20?','resolve','then','fields','tag','filter','agent','getLists','c.ListId\x20IS\x20NULL','c.ListId\x20IN\x20?','attributes','group','limit','offset','subqry.id','having','order','DESC','subqry.','findAll','color','keyBy','Sequelize','QueryTypes','SELECT','CmContact','sequelize','Tags','COUNT(*)','c.id','query','toString','exports','squel','../parsers/advancedSearch','../parsers/qs','role','search','ListId','autocomplete','true','select','from','cm_contacts','where','c.deletedAt\x20IS\x20NULL','subqry','left_join','uc.CmContactId\x20=\x20','cm_contact_has_tags','.id','tools_tags','t.id\x20=\x20ct.TagId','lastName','fax','email','CompanyId','createdAt','updatedAt','deletedAt','includes','push','forEach','TagIds','field','GROUP_CONCAT(DISTINCT\x20t.id)','expr','getSelectedTags','replace','split'];(function(_0x46e363,_0x45d7e2){var _0x3fb059=function(_0x5e6274){while(--_0x5e6274){_0x46e363['push'](_0x46e363['shift']());}};_0x3fb059(++_0x45d7e2);}(_0xa6c3,0xb1));var _0x3a6c=function(_0x33bc64,_0x4d1e92){_0x33bc64=_0x33bc64-0x0;var _0x3fdd34=_0xa6c3[_0x33bc64];return _0x3fdd34;};'use strict';var _=require('lodash');var squel=require(_0x3a6c('0x0'));var as=require(_0x3a6c('0x1'));var qs=require(_0x3a6c('0x2'));var utils=require('../interaction/utils');var db=require('../../mysqldb')['db'];function skipContactsQuery(_0x32bf71,_0x1fc1e1){var _0x3650b7=![];if(_0x32bf71[_0x3a6c('0x3')]==='agent'&&!_0x1fc1e1[_0x3a6c('0x4')]&&!_0x1fc1e1[_0x3a6c('0x5')]&&_0x1fc1e1[_0x3a6c('0x6')]!==_0x3a6c('0x7')){_0x3650b7=!![];}return _0x3650b7;}function getContactsSubquery(){return squel[_0x3a6c('0x8')]()[_0x3a6c('0x9')](_0x3a6c('0xa'),'c')[_0x3a6c('0xb')](_0x3a6c('0xc'));}function applyJoinClauses(_0x5c08c2,_0x3b0356){var _0xb62bf4=_0x3b0356?'c':_0x3a6c('0xd');_0x5c08c2[_0x3a6c('0xe')]('cm_user_has_contacts','uc',_0x3a6c('0xf')+_0xb62bf4+'.id')[_0x3a6c('0xe')](_0x3a6c('0x10'),'ct','ct.CmContactId\x20=\x20'+_0xb62bf4+_0x3a6c('0x11'))[_0x3a6c('0xe')](_0x3a6c('0x12'),'t',_0x3a6c('0x13'));return _0x5c08c2;}function addFieldsToQuery(_0x9b9bed,_0x5cdf4e,_0x4424b3,_0xbe08e2,_0x36f925){var _0x41cd37=_0x36f925?'c':_0x3a6c('0xd');if(!_0x5cdf4e){_0x5cdf4e=['id','firstName',_0x3a6c('0x14'),'phone','mobile',_0x3a6c('0x15'),_0x3a6c('0x16'),'ListId',_0x3a6c('0x17'),_0x3a6c('0x18'),_0x3a6c('0x19'),_0x3a6c('0x1a'),'TagIds'];}else if(!_0x5cdf4e[_0x3a6c('0x1b')]('id')){_0x5cdf4e[_0x3a6c('0x1c')]('id');}var _0x13a6bf=_0x4424b3&&_0x36f925||!_0x4424b3&&!_0x36f925;if(_0xbe08e2){_0x13a6bf=_0xbe08e2&&_0x36f925||!_0xbe08e2&&!_0x36f925;}_0x5cdf4e[_0x3a6c('0x1d')](function(_0x530ca6){if(_0x530ca6===_0x3a6c('0x1e')){if(_0x13a6bf){_0x9b9bed[_0x3a6c('0x1f')](_0x3a6c('0x20'),_0x530ca6);}else if(_0x4424b3||_0xbe08e2){_0x9b9bed[_0x3a6c('0x1f')](_0x41cd37+'.'+_0x530ca6);}}else{_0x9b9bed[_0x3a6c('0x1f')](_0x41cd37+'.'+_0x530ca6);}});return _0x9b9bed;}function getSqlClauses(){var _0xb280f6={'default':squel['expr'](),'fields':squel[_0x3a6c('0x21')](),'filter':squel[_0x3a6c('0x21')](),'tags':{'clause':squel[_0x3a6c('0x21')](),'ids':null},'user':{'clause':squel[_0x3a6c('0x21')](),'skip':![]}};return _0xb280f6;}function parseTagParameter(_0x4687d9){var _0x48f2d7=squel[_0x3a6c('0x21')]();if(_0x4687d9){var _0x455603=utils[_0x3a6c('0x22')](_0x4687d9);_0x455603[_0x3a6c('0x1d')](function(_0x40e7e3){_0x48f2d7['or']('CONCAT(\x27,\x27,\x20subqry.TagIds,\x20\x27,\x27)\x20LIKE\x20?','%,'+_0x40e7e3+',%');});}return _0x48f2d7;}function parseSearchFilter(_0x567f97){var _0x1bf1d1=squel[_0x3a6c('0x21')]();if(_0x567f97){var _0x496280=_0x567f97[_0x3a6c('0x23')]('\x5c','\x5c\x5c')[_0x3a6c('0x23')](/'/g,'\x27\x27');if(_0x496280[_0x3a6c('0x24')]('\x20')['length']>0x1){_0x1bf1d1['or'](_0x3a6c('0x25'),qs['getFullTextValue'](_0x496280,!![]),null);}else{if(qs[_0x3a6c('0x26')](_0x496280)){_0x1bf1d1['or'](_0x3a6c('0x27'),_0x496280+'%');_0x1bf1d1['or'](_0x3a6c('0x28'),_0x496280+'%');_0x1bf1d1['or'](_0x3a6c('0x29'),_0x496280+'%');_0x1bf1d1['or'](_0x3a6c('0x2a'),_0x496280+'%');}else if(qs[_0x3a6c('0x2b')](_0x496280)){_0x1bf1d1['or'](_0x3a6c('0x2c'),_0x496280+'%');}else{_0x1bf1d1['or'](_0x3a6c('0x2d'),'%'+_0x496280+'%');_0x1bf1d1['or'](_0x3a6c('0x2e'),'%'+_0x496280+'%');_0x1bf1d1['or'](_0x3a6c('0x2c'),'%'+_0x496280+'%');}}}return _0x1bf1d1;}function parseAdvancedSearchFilter(_0x33beae,_0x181fed){var _0x4242a8=getSqlClauses();var _0x1750b8=as['parseSearch'](_0x33beae);var _0x376aa0=_0x1750b8[_0x3a6c('0x2f')];for(var _0x2c8b78=0x0;_0x2c8b78<_0x1750b8[_0x3a6c('0x30')][_0x3a6c('0x31')];_0x2c8b78++){var _0x252f32=_0x1750b8[_0x3a6c('0x30')][_0x2c8b78];var _0x41ded8='c';var _0xc2e578=_[_0x3a6c('0x32')](_0x181fed,[_0x3a6c('0x33'),_0x252f32[_0x3a6c('0x1f')]]);if(_0xc2e578){if(_0x252f32[_0x3a6c('0x1f')]===_0x3a6c('0x34')||_0xc2e578[_0x3a6c('0x35')]===_0x3a6c('0x36')){_0x252f32[_0x3a6c('0x37')]=_0x3a6c('0x38');}var _0x286bc7=as[_0x3a6c('0x39')](_0x41ded8,_0xc2e578[_0x3a6c('0x3a')],_0x252f32);_0x4242a8['default'][_0x376aa0](_0x286bc7['text'],_0x286bc7[_0x3a6c('0x3b')]['start'],_0x286bc7[_0x3a6c('0x3b')][_0x3a6c('0x3c')]);}else{if(_0x252f32[_0x3a6c('0x1f')]===_0x3a6c('0x3d')){var _0x4cf8c1=_0x252f32[_0x3a6c('0x3b')][_0x3a6c('0x24')](',')['map'](function(_0x3a9092){return Number(_0x3a9092);});var _0x425207=parseTagParameter(_0x4cf8c1);_0x4242a8[_0x3a6c('0x3e')][_0x3a6c('0x3f')][_0x3a6c('0x40')](_0x425207);_0x4242a8['tags'][_0x3a6c('0x41')]=_0x4cf8c1;}else if(_0x252f32[_0x3a6c('0x1f')]===_0x3a6c('0x42')){_0x4242a8[_0x3a6c('0x43')][_0x3a6c('0x3f')][_0x3a6c('0x40')]('uc.UserId\x20=\x20?',_0x252f32[_0x3a6c('0x3b')]);_0x4242a8['user'][_0x3a6c('0x44')]=!![];}}}return _0x4242a8;}function parseModelFields(_0x6a4d4c,_0x406ad5){var _0x22953f=squel[_0x3a6c('0x21')]();var _0x190333=_(_0x6a4d4c)['keys']()[_0x3a6c('0x45')](function(_0x521f67){return _[_0x3a6c('0x46')](_0x406ad5,[_0x3a6c('0x33'),_0x521f67])?_0x521f67:undefined;})[_0x3a6c('0x47')]()[_0x3a6c('0x3b')]();if(_0x6a4d4c[_0x3a6c('0x48')]){_0x190333[_0x3a6c('0x1c')](_0x3a6c('0x48'));}if(_0x6a4d4c[_0x3a6c('0x42')]){_0x190333[_0x3a6c('0x1c')](_0x3a6c('0x42'));}if(_0x190333[_0x3a6c('0x31')]>0x0){_0x190333['forEach'](function(_0x5a8e1b){if(_0x5a8e1b===_0x3a6c('0x5')){_0x22953f[_0x3a6c('0x40')]('c.ListId\x20IN\x20?',[][_0x3a6c('0x49')](_0x6a4d4c[_0x5a8e1b]));}else if(_0x5a8e1b===_0x3a6c('0x48')){var _0x1cd682='%'+_0x6a4d4c[_0x5a8e1b]+'%';_0x22953f['and']('CONCAT_WS(\x27\x20\x27,\x20c.firstName,\x20c.lastName,\x20c.email)\x20LIKE\x20?',_0x1cd682);}else if(_0x5a8e1b===_0x3a6c('0x42')){_0x22953f[_0x3a6c('0x40')](_0x3a6c('0x4a'),_0x6a4d4c[_0x5a8e1b]);}else{_0x22953f[_0x3a6c('0x40')]('c.'+_0x5a8e1b+'\x20=\x20?',_0x6a4d4c[_0x5a8e1b]);}});}return _0x22953f;}function parseQueryParameters(_0x1c78bf,_0x276958){var _0x2e1eb4=getSqlClauses();return Promise[_0x3a6c('0x4b')]()[_0x3a6c('0x4c')](function(){return parseModelFields(_0x1c78bf,_0x276958);})[_0x3a6c('0x4c')](function(_0x115024){_0x2e1eb4[_0x3a6c('0x4d')][_0x3a6c('0x40')](_0x115024);return parseTagParameter(_0x1c78bf[_0x3a6c('0x4e')]);})[_0x3a6c('0x4c')](function(_0x4ac43a){_0x2e1eb4[_0x3a6c('0x3e')][_0x3a6c('0x3f')][_0x3a6c('0x40')](_0x4ac43a);return parseSearchFilter(_0x1c78bf[_0x3a6c('0x4f')]);})[_0x3a6c('0x4c')](function(_0x56be08){_0x2e1eb4[_0x3a6c('0x4f')]=_0x56be08;return _0x2e1eb4;});}function checkListsRestrictions(_0x533370,_0x241b07,_0x43c47a){var _0x3a8a33=squel[_0x3a6c('0x21')]();return Promise[_0x3a6c('0x4b')]()['then'](function(){if(_0x241b07['search']&&_0x533370[_0x3a6c('0x3')]===_0x3a6c('0x50')&&!_0x43c47a){return _0x533370[_0x3a6c('0x51')]({'attributes':['id'],'raw':!![]});}})[_0x3a6c('0x4c')](function(_0x27a971){if(_0x27a971){if(_0x27a971[_0x3a6c('0x31')]===0x0){_0x3a8a33[_0x3a6c('0x40')](_0x3a6c('0x52'));}else{_0x3a8a33[_0x3a6c('0x40')](_0x3a6c('0x53'),_[_0x3a6c('0x45')](_0x27a971,'id'));}}})[_0x3a6c('0x4c')](function(){return _0x3a8a33;});}function buildContactsQuery(_0x1f971b,_0x49777d,_0x18e553,_0x3b2dcd,_0x1ca233,_0x34b805){if(_0x49777d){_0x49777d=_0x18e553[_0x3a6c('0x54')];}_0x1f971b=addFieldsToQuery(_0x1f971b,_0x49777d,_0x3b2dcd,_0x34b805,!![]);var _0x59392b=squel['select']();_0x59392b=addFieldsToQuery(_0x59392b,_0x49777d,_0x3b2dcd,_0x34b805,![]);if(_0x3b2dcd||_0x34b805){_0x1f971b=applyJoinClauses(_0x1f971b,!![]);_0x1f971b[_0x3a6c('0x55')]('c.id');if(_0x18e553[_0x3a6c('0x56')]){_0x59392b[_0x3a6c('0x56')](_0x18e553[_0x3a6c('0x56')]);}if(_0x18e553[_0x3a6c('0x57')]){_0x59392b[_0x3a6c('0x57')](_0x18e553[_0x3a6c('0x57')]);}}else{_0x59392b=applyJoinClauses(_0x59392b,![]);_0x59392b['group'](_0x3a6c('0x58'));if(_0x18e553[_0x3a6c('0x56')]){_0x1f971b[_0x3a6c('0x56')](_0x18e553[_0x3a6c('0x56')]);}if(_0x18e553['offset']){_0x1f971b[_0x3a6c('0x57')](_0x18e553[_0x3a6c('0x57')]);}}_0x59392b[_0x3a6c('0x59')](_0x1ca233);if(_0x18e553[_0x3a6c('0x5a')]){_0x18e553[_0x3a6c('0x5a')][_0x3a6c('0x1d')](function(_0x23935d){_0x1f971b[_0x3a6c('0x5a')]('c.'+_0x23935d[0x0],_0x23935d[0x1]===_0x3a6c('0x5b')?![]:!![]);_0x59392b[_0x3a6c('0x5a')](_0x3a6c('0x5c')+_0x23935d[0x0],_0x23935d[0x1]==='DESC'?![]:!![]);});}_0x59392b[_0x3a6c('0x9')](_0x1f971b,'subqry');return _0x59392b;}function getFilteredContacts(_0x5f2233){var _0x37299b=[];return db[_0x3a6c('0x3d')][_0x3a6c('0x5d')]({'attributes':['id','name',_0x3a6c('0x5e')],'raw':!![]})[_0x3a6c('0x4c')](function(_0xba0f2e){_0x37299b=_[_0x3a6c('0x5f')](_0xba0f2e,'id');var _0x2054fa={'type':db[_0x3a6c('0x60')][_0x3a6c('0x61')][_0x3a6c('0x62')],'model':db[_0x3a6c('0x63')],'mapToModel':!![],'nest':!![],'raw':!![]};return db[_0x3a6c('0x64')]['query'](_0x5f2233['toString'](),_0x2054fa);})[_0x3a6c('0x4c')](function(_0x3d759d){_0x3d759d[_0x3a6c('0x1d')](function(_0x197710){if(_0x197710[_0x3a6c('0x1e')]){_0x197710[_0x3a6c('0x65')]=[];_0x197710[_0x3a6c('0x1e')]['split'](',')[_0x3a6c('0x1d')](function(_0x7c943e){_0x197710[_0x3a6c('0x65')][_0x3a6c('0x1c')](_0x37299b[_0x7c943e]);});}delete _0x197710[_0x3a6c('0x1e')];});return _0x3d759d;});}function countFilteredContacts(_0x15bbee,_0xc1ec64){var _0x63b3dc=_0x15bbee['clone']();_0x63b3dc[_0x3a6c('0x1f')](_0x3a6c('0x66'));_0x63b3dc=applyJoinClauses(_0x63b3dc,!![]);_0x15bbee[_0x3a6c('0x55')](_0x3a6c('0x67'));var _0x24883b=utils['getSelectedTags'](_0xc1ec64);if(!_['isEmpty'](_0x24883b)){_0x63b3dc[_0x3a6c('0xb')]('t.id\x20IN\x20?',_0x24883b);}var _0xce4c80={'type':db[_0x3a6c('0x60')][_0x3a6c('0x61')][_0x3a6c('0x62')],'raw':!![]};return db['sequelize'][_0x3a6c('0x68')](_0x63b3dc[_0x3a6c('0x69')](),_0xce4c80)['then'](function(_0x87e79){return _0x87e79[0x0][_0x3a6c('0x66')];});}module[_0x3a6c('0x6a')]={'buildContactsQuery':buildContactsQuery,'checkListsRestrictions':checkListsRestrictions,'countFilteredContacts':countFilteredContacts,'getContactsSubquery':getContactsSubquery,'getFilteredContacts':getFilteredContacts,'parseAdvancedSearchFilter':parseAdvancedSearchFilter,'parseQueryParameters':parseQueryParameters,'skipContactsQuery':skipContactsQuery};
\ No newline at end of file
index 38d5b07..6f07d4b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2aa5=['data','write','end','binary','unlink','decryptFile','createDecipher','update','final','encryptString','secret','utf8','base64','decryptString','crypto','../../config/environment','../../config/logger','app','session','aes192','encrypt','algorithm','error','is\x20not\x20a\x20supported\x20algorithm.\x20Your\x20system\x20supports\x20the\x20following\x20algorithms:','test','getCiphers','filter','hasOwnProperty','createWriteStream','createCipher'];(function(_0x3b9421,_0x44fb55){var _0xc5bb2e=function(_0xe4ebeb){while(--_0xe4ebeb){_0x3b9421['push'](_0x3b9421['shift']());}};_0xc5bb2e(++_0x44fb55);}(_0x2aa5,0xfe));var _0x52aa=function(_0x381c17,_0x2dcce6){_0x381c17=_0x381c17-0x0;var _0x2d108d=_0x2aa5[_0x381c17];return _0x2d108d;};'use strict';var crypto=require(_0x52aa('0x0'));var fs=require('fs');var BPromise=require('bluebird');var _=require('lodash');var config=require(_0x52aa('0x1'));var logger=require(_0x52aa('0x2'))(_0x52aa('0x3'));const AES_SUPPORTED_RX=/^aes(-)?\d{3}(-(cbc|cfb|ctr)(1|8)?){0,1}$/;const stringOptions={'secret':config['secrets'][_0x52aa('0x4')],'algorithm':'aes-256-ctr'};const fileOptions={'algorithm':_0x52aa('0x5')};if(config[_0x52aa('0x6')]&&config[_0x52aa('0x6')][_0x52aa('0x7')]){var isSupported=isAlgorithmSupported(config['encrypt'][_0x52aa('0x7')]);if(isSupported){fileOptions[_0x52aa('0x7')]=config[_0x52aa('0x6')][_0x52aa('0x7')];}else{var supportedAlgorithms=getSupportedCiphers()['join'](',\x20');logger[_0x52aa('0x8')](config[_0x52aa('0x6')]['algorithm'],_0x52aa('0x9'),supportedAlgorithms);}}function isASupportedCipher(_0x184d53){return AES_SUPPORTED_RX[_0x52aa('0xa')](_0x184d53);}function getSupportedCiphers(){return crypto[_0x52aa('0xb')]()[_0x52aa('0xc')](isASupportedCipher);}function isAlgorithmSupported(_0x7855d8){return getSupportedCiphers()['indexOf'](_0x7855d8)>-0x1;}function combineOptions(_0x15cb84){var _0x4c2b78={};for(var _0x4558f5 in fileOptions){if(fileOptions['hasOwnProperty'](_0x4558f5)){_0x4c2b78[_0x4558f5]=fileOptions[_0x4558f5];}}if(_0x15cb84){for(var _0x2dc1b1 in _0x15cb84){if(_0x15cb84[_0x52aa('0xd')](_0x2dc1b1)){_0x4c2b78[_0x2dc1b1]=_0x15cb84[_0x2dc1b1];}}}return _0x4c2b78;}exports['encryptFile']=function(_0x1cbc6b,_0x351158,_0xfd5e35,_0x2ac2f9){return new BPromise(function(_0xbf7f64,_0x279055){_0x2ac2f9=combineOptions(_0x2ac2f9);var _0x156de9=new Buffer(_0xfd5e35);var _0x5d9125=fs['createReadStream'](_0x1cbc6b);var _0x25cefa=fs[_0x52aa('0xe')](_0x351158);var _0x2d1a4e=crypto[_0x52aa('0xf')](_0x2ac2f9[_0x52aa('0x7')],_0x156de9);_0x5d9125['on'](_0x52aa('0x10'),function(_0x3b6e57){var _0x2157a4=new Buffer(_0x2d1a4e['update'](_0x3b6e57),'binary');_0x25cefa[_0x52aa('0x11')](_0x2157a4);});_0x5d9125['on'](_0x52aa('0x12'),function(){try{var _0x3cc425=new Buffer(_0x2d1a4e['final'](_0x52aa('0x13')),_0x52aa('0x13'));_0x25cefa[_0x52aa('0x11')](_0x3cc425);_0x25cefa[_0x52aa('0x12')]();_0x25cefa['on']('close',function(){return _0xbf7f64(_0x351158);});}catch(_0x87a72){fs[_0x52aa('0x14')](_0x351158);return _0x279055(_0x87a72);}});});};exports[_0x52aa('0x15')]=function(_0x52150c,_0x4626b4,_0x131574,_0xd5b42a){return new BPromise(function(_0x2ffe8d,_0x43d660){_0xd5b42a=combineOptions(_0xd5b42a);var _0xb3c81d=new Buffer(_0x131574);var _0x3816d2=fs['createReadStream'](_0x52150c);var _0x38e6dd=fs[_0x52aa('0xe')](_0x4626b4);var _0x36dcb2=crypto[_0x52aa('0x16')](_0xd5b42a[_0x52aa('0x7')],_0xb3c81d);_0x3816d2['on'](_0x52aa('0x10'),function(_0x2a91a7){var _0x2db94d=new Buffer(_0x36dcb2[_0x52aa('0x17')](_0x2a91a7),'binary');_0x38e6dd[_0x52aa('0x11')](_0x2db94d);});_0x3816d2['on'](_0x52aa('0x12'),function(){try{var _0x32ac4d=new Buffer(_0x36dcb2[_0x52aa('0x18')](_0x52aa('0x13')),'binary');_0x38e6dd[_0x52aa('0x11')](_0x32ac4d);_0x38e6dd[_0x52aa('0x12')]();_0x38e6dd['on']('close',function(){return _0x2ffe8d(_0x4626b4);});}catch(_0x54c4b5){fs[_0x52aa('0x14')](_0x4626b4);return _0x43d660(_0x54c4b5);}});});};exports[_0x52aa('0x19')]=function(_0x32c46f,_0x1f5d0e,_0x33e144){var _0x47465d=_0x33e144||stringOptions[_0x52aa('0x7')];var _0x18a22d=_0x1f5d0e||stringOptions[_0x52aa('0x1a')];var _0x493ac7=crypto[_0x52aa('0xf')](_0x47465d,_0x18a22d);var _0x86a83c=_0x493ac7[_0x52aa('0x17')](_0x32c46f,_0x52aa('0x1b'),_0x52aa('0x1c'));_0x86a83c+=_0x493ac7[_0x52aa('0x18')](_0x52aa('0x1c'));return _0x86a83c;};exports[_0x52aa('0x1d')]=function(_0x3933f8,_0x4521b9,_0x547060){var _0x376792=_0x547060||stringOptions[_0x52aa('0x7')];var _0x2d0662=_0x4521b9||stringOptions[_0x52aa('0x1a')];var _0x19900b=crypto[_0x52aa('0x16')](_0x376792,_0x2d0662);var _0x4d1f97=_0x19900b[_0x52aa('0x17')](_0x3933f8,_0x52aa('0x1c'),_0x52aa('0x1b'));_0x4d1f97+=_0x19900b[_0x52aa('0x18')]('utf8');return _0x4d1f97;};
\ No newline at end of file
+var _0xd05e=['unlink','decryptFile','createDecipher','encryptString','secret','utf8','decryptString','crypto','bluebird','lodash','../../config/environment','../../config/logger','app','session','aes-256-ctr','aes192','encrypt','algorithm','join','error','is\x20not\x20a\x20supported\x20algorithm.\x20Your\x20system\x20supports\x20the\x20following\x20algorithms:','test','getCiphers','indexOf','hasOwnProperty','encryptFile','createReadStream','createWriteStream','createCipher','data','update','binary','end','final','write','close'];(function(_0x4480b9,_0x5c2949){var _0x3f0f02=function(_0x43502f){while(--_0x43502f){_0x4480b9['push'](_0x4480b9['shift']());}};_0x3f0f02(++_0x5c2949);}(_0xd05e,0xbb));var _0xed05=function(_0xb39e5a,_0x1695fc){_0xb39e5a=_0xb39e5a-0x0;var _0x413103=_0xd05e[_0xb39e5a];return _0x413103;};'use strict';var crypto=require(_0xed05('0x0'));var fs=require('fs');var BPromise=require(_0xed05('0x1'));var _=require(_0xed05('0x2'));var config=require(_0xed05('0x3'));var logger=require(_0xed05('0x4'))(_0xed05('0x5'));const AES_SUPPORTED_RX=/^aes(-)?\d{3}(-(cbc|cfb|ctr)(1|8)?){0,1}$/;const stringOptions={'secret':config['secrets'][_0xed05('0x6')],'algorithm':_0xed05('0x7')};const fileOptions={'algorithm':_0xed05('0x8')};if(config[_0xed05('0x9')]&&config[_0xed05('0x9')]['algorithm']){var isSupported=isAlgorithmSupported(config[_0xed05('0x9')][_0xed05('0xa')]);if(isSupported){fileOptions[_0xed05('0xa')]=config[_0xed05('0x9')]['algorithm'];}else{var supportedAlgorithms=getSupportedCiphers()[_0xed05('0xb')](',\x20');logger[_0xed05('0xc')](config[_0xed05('0x9')][_0xed05('0xa')],_0xed05('0xd'),supportedAlgorithms);}}function isASupportedCipher(_0x5d2a9b){return AES_SUPPORTED_RX[_0xed05('0xe')](_0x5d2a9b);}function getSupportedCiphers(){return crypto[_0xed05('0xf')]()['filter'](isASupportedCipher);}function isAlgorithmSupported(_0x4b93fb){return getSupportedCiphers()[_0xed05('0x10')](_0x4b93fb)>-0x1;}function combineOptions(_0xa953ef){var _0x1bfd78={};for(var _0x42350e in fileOptions){if(fileOptions[_0xed05('0x11')](_0x42350e)){_0x1bfd78[_0x42350e]=fileOptions[_0x42350e];}}if(_0xa953ef){for(var _0x4fc605 in _0xa953ef){if(_0xa953ef[_0xed05('0x11')](_0x4fc605)){_0x1bfd78[_0x4fc605]=_0xa953ef[_0x4fc605];}}}return _0x1bfd78;}exports[_0xed05('0x12')]=function(_0x3852e4,_0x3a3b98,_0xb98353,_0x4935a4){return new BPromise(function(_0x497951,_0x39520c){_0x4935a4=combineOptions(_0x4935a4);var _0x53c2df=new Buffer(_0xb98353);var _0x584283=fs[_0xed05('0x13')](_0x3852e4);var _0x51739c=fs[_0xed05('0x14')](_0x3a3b98);var _0x502ad6=crypto[_0xed05('0x15')](_0x4935a4['algorithm'],_0x53c2df);_0x584283['on'](_0xed05('0x16'),function(_0x43628b){var _0x16544e=new Buffer(_0x502ad6[_0xed05('0x17')](_0x43628b),_0xed05('0x18'));_0x51739c['write'](_0x16544e);});_0x584283['on'](_0xed05('0x19'),function(){try{var _0x330a8c=new Buffer(_0x502ad6[_0xed05('0x1a')](_0xed05('0x18')),_0xed05('0x18'));_0x51739c[_0xed05('0x1b')](_0x330a8c);_0x51739c[_0xed05('0x19')]();_0x51739c['on'](_0xed05('0x1c'),function(){return _0x497951(_0x3a3b98);});}catch(_0x339a33){fs[_0xed05('0x1d')](_0x3a3b98);return _0x39520c(_0x339a33);}});});};exports[_0xed05('0x1e')]=function(_0x10454b,_0x445bd6,_0x32dbd7,_0x4e5439){return new BPromise(function(_0x1c9441,_0x25310e){_0x4e5439=combineOptions(_0x4e5439);var _0x47c8eb=new Buffer(_0x32dbd7);var _0x5b95c3=fs['createReadStream'](_0x10454b);var _0x4ae632=fs['createWriteStream'](_0x445bd6);var _0x132d70=crypto[_0xed05('0x1f')](_0x4e5439[_0xed05('0xa')],_0x47c8eb);_0x5b95c3['on'](_0xed05('0x16'),function(_0x8a9406){var _0x334b6e=new Buffer(_0x132d70['update'](_0x8a9406),_0xed05('0x18'));_0x4ae632[_0xed05('0x1b')](_0x334b6e);});_0x5b95c3['on'](_0xed05('0x19'),function(){try{var _0x31aa63=new Buffer(_0x132d70[_0xed05('0x1a')](_0xed05('0x18')),_0xed05('0x18'));_0x4ae632[_0xed05('0x1b')](_0x31aa63);_0x4ae632[_0xed05('0x19')]();_0x4ae632['on']('close',function(){return _0x1c9441(_0x445bd6);});}catch(_0xc49a3b){fs[_0xed05('0x1d')](_0x445bd6);return _0x25310e(_0xc49a3b);}});});};exports[_0xed05('0x20')]=function(_0x69171e,_0x1c91fd,_0x300eeb){var _0x3f9c4c=_0x300eeb||stringOptions['algorithm'];var _0x1b1af6=_0x1c91fd||stringOptions[_0xed05('0x21')];var _0x4fcb40=crypto[_0xed05('0x15')](_0x3f9c4c,_0x1b1af6);var _0x2dd69f=_0x4fcb40['update'](_0x69171e,_0xed05('0x22'),'base64');_0x2dd69f+=_0x4fcb40[_0xed05('0x1a')]('base64');return _0x2dd69f;};exports[_0xed05('0x23')]=function(_0x2f2fd9,_0xe38599,_0x15fd69){var _0x26795c=_0x15fd69||stringOptions[_0xed05('0xa')];var _0x9120be=_0xe38599||stringOptions[_0xed05('0x21')];var _0x1624a3=crypto[_0xed05('0x1f')](_0x26795c,_0x9120be);var _0x366b07=_0x1624a3[_0xed05('0x17')](_0x2f2fd9,'base64','utf8');_0x366b07+=_0x1624a3['final']('utf8');return _0x366b07;};
\ No newline at end of file
index c40c479..941b412 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7672=['finally','exit','util','path','lodash','to-csv','bluebird','zip-dir','../../mysqldb','../../config/logger','analytics','argv','savename','AnalyticExtractedReport','update','info','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','CSV','Setting','find','split','splitSizeCsv','then','sequelize','query','format','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','QueryTypes','SELECT','Empty','length','num','push','%s\x20limit\x20%d\x20OFFSET\x20%d','basename','.csv','join','mkdirSync','each','%s%d.%s','csv','%s.%s','writeFileSync','Completed','zip','inspect','Failed'];(function(_0x42245d,_0x51758f){var _0x4b211a=function(_0x2634e){while(--_0x2634e){_0x42245d['push'](_0x42245d['shift']());}};_0x4b211a(++_0x51758f);}(_0x7672,0xbe));var _0x2767=function(_0x194f87,_0x1b5a7a){_0x194f87=_0x194f87-0x0;var _0x4d9788=_0x7672[_0x194f87];return _0x4d9788;};'use strict';var util=require(_0x2767('0x0'));var path=require(_0x2767('0x1'));var _=require(_0x2767('0x2'));var csv=require(_0x2767('0x3'));var fs=require('fs');var BPromise=require(_0x2767('0x4'));var zipdir=require(_0x2767('0x5'));var rimraf=require('rimraf');var db=require(_0x2767('0x6'))['db'];var dbH=require('../../mysqldb')['dbH'];var logger=require(_0x2767('0x7'))(_0x2767('0x8'));var EXTRACTED_REPORT_ID=Number(process['argv'][0x2]);var QUERY=process[_0x2767('0x9')][0x3];var PATH=process['argv'][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0x148f13,_0x5a82a9){var _0x4b916b={'status':_0x148f13};var _0x56d76a={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x5a82a9){_0x4b916b[_0x2767('0xa')]=_0x5a82a9;}return db[_0x2767('0xb')][_0x2767('0xc')](_0x4b916b,_0x56d76a);}function main(){var _0x14d077=0x1388;var _0x1ab6e5;logger[_0x2767('0xd')](util['format'](_0x2767('0xe'),EXTRACTED_REPORT_ID,_0x2767('0xf')));return db[_0x2767('0x10')][_0x2767('0x11')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x2767('0x12'),_0x2767('0x13')]})[_0x2767('0x14')](function(_0x1323d1){if(_0x1323d1){_0x1ab6e5=_0x1323d1;_0x14d077=_0x1ab6e5[_0x2767('0x13')]||0x1388;}})['then'](function(){return dbH[_0x2767('0x15')][_0x2767('0x16')](util[_0x2767('0x17')](_0x2767('0x18'),QUERY),{'type':dbH[_0x2767('0x15')][_0x2767('0x19')][_0x2767('0x1a')]});})[_0x2767('0x14')](function(_0x3df65c){if(!_0x3df65c[0x0]['num']){return analyticExtractedReport(_0x2767('0x1b'));}var _0x122503=[];var _0x153782=0x0;if(_0x1ab6e5[_0x2767('0x12')]){if(_0x3df65c&&_0x3df65c[_0x2767('0x1c')]){var _0x12ae22=_['range'](_0x3df65c[0x0]['num']/_0x14d077);var _0x100f8d=Number['isInteger'](_0x3df65c[0x0][_0x2767('0x1d')]/_0x14d077)?_0x3df65c[0x0]['num']%_0x14d077:0x0;_0x12ae22['forEach'](function(_0x35e647){if(_0x35e647>0x0){_0x153782+=_0x14d077;}_0x122503[_0x2767('0x1e')](dbH[_0x2767('0x15')][_0x2767('0x16')](util[_0x2767('0x17')](_0x2767('0x1f'),QUERY,_0x14d077,_0x153782),{'type':dbH['sequelize'][_0x2767('0x19')][_0x2767('0x1a')]}));});if(_0x100f8d>0x0){_0x153782+=_0x14d077;_0x122503['push'](dbH[_0x2767('0x15')][_0x2767('0x16')](util[_0x2767('0x17')]('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0x100f8d,_0x153782),{'type':dbH[_0x2767('0x15')][_0x2767('0x19')][_0x2767('0x1a')]}));}}}else{_0x122503[_0x2767('0x1e')](dbH[_0x2767('0x15')][_0x2767('0x16')](QUERY,{'type':dbH[_0x2767('0x15')]['QueryTypes']['SELECT']}));}var _0x2ddda3=path['dirname'](PATH);var _0x1fc89c=path[_0x2767('0x20')](PATH,_0x2767('0x21'));var _0xf7d8e7=_0x1ab6e5['split']&&_0x122503[_0x2767('0x1c')]>0x1;var _0x4bd9f6=[];if(!fs['existsSync'](path[_0x2767('0x22')](_0x2ddda3,_0x1fc89c))&&_0xf7d8e7){fs[_0x2767('0x23')](path[_0x2767('0x22')](_0x2ddda3,_0x1fc89c));}return BPromise[_0x2767('0x24')](_0x122503,function(_0x1e9190){_0x4bd9f6[_0x2767('0x1e')](_0x1e9190);})['then'](function(){for(var _0x499148=0x0;_0x499148<_0x4bd9f6[_0x2767('0x1c')];_0x499148+=0x1){var _0x8559f1;var _0x4bc59f=_0x4bd9f6[_0x499148];if(_0xf7d8e7){_0x8559f1=path[_0x2767('0x22')](_0x2ddda3,_0x1fc89c,util[_0x2767('0x17')](_0x2767('0x25'),_0x1fc89c,_0x499148,_0x2767('0x26')));}else{_0x8559f1=path[_0x2767('0x22')](_0x2ddda3,util['format'](_0x2767('0x27'),_0x1fc89c,'csv'));}fs[_0x2767('0x28')](_0x8559f1,csv(_0x4bc59f));}})[_0x2767('0x14')](function(){if(_0xf7d8e7){return new Promise(function(_0x1135f2){zipdir(path[_0x2767('0x22')](_0x2ddda3,_0x1fc89c),{'saveTo':path[_0x2767('0x22')](_0x2ddda3,util[_0x2767('0x17')](_0x2767('0x27'),_0x1fc89c,'zip'))},function(_0x363e90,_0x208d6d){rimraf(path[_0x2767('0x22')](_0x2ddda3,_0x1fc89c),function(){});_0x1135f2('zip\x20finished');});});}})[_0x2767('0x14')](function(){logger[_0x2767('0xd')](util[_0x2767('0x17')]('Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed',EXTRACTED_REPORT_ID,_0x2767('0xf')));return analyticExtractedReport(_0x2767('0x29'),_0xf7d8e7?util['format'](_0x2767('0x27'),_0x1fc89c,_0xf7d8e7?_0x2767('0x2a'):'csv'):null);});})['catch'](function(_0x345438){logger[_0x2767('0xd')](util[_0x2767('0x17')]('Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,_0x2767('0xf')),util[_0x2767('0x2b')](_0x345438,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0x2767('0x2c'));})[_0x2767('0x2d')](function(){process[_0x2767('0x2e')](EXIT_CODE);});}main();
\ No newline at end of file
+var _0xf356=['writeFileSync','zip\x20finished','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','CSV','zip','catch','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','Failed','finally','exit','util','lodash','zip-dir','rimraf','../../mysqldb','dbH','../../config/logger','analytics','argv','savename','update','info','format','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','Setting','find','split','splitSizeCsv','sequelize','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','QueryTypes','then','num','length','range','isInteger','push','%s\x20limit\x20%d\x20OFFSET\x20%d','SELECT','dirname','basename','.csv','join','mkdirSync','each','%s%d.%s','csv','%s.%s'];(function(_0x3de377,_0x1df59c){var _0x4f64ec=function(_0x3fbdf3){while(--_0x3fbdf3){_0x3de377['push'](_0x3de377['shift']());}};_0x4f64ec(++_0x1df59c);}(_0xf356,0x161));var _0x6f35=function(_0x48d0f1,_0xb5a53d){_0x48d0f1=_0x48d0f1-0x0;var _0x453e83=_0xf356[_0x48d0f1];return _0x453e83;};'use strict';var util=require(_0x6f35('0x0'));var path=require('path');var _=require(_0x6f35('0x1'));var csv=require('to-csv');var fs=require('fs');var BPromise=require('bluebird');var zipdir=require(_0x6f35('0x2'));var rimraf=require(_0x6f35('0x3'));var db=require('../../mysqldb')['db'];var dbH=require(_0x6f35('0x4'))[_0x6f35('0x5')];var logger=require(_0x6f35('0x6'))(_0x6f35('0x7'));var EXTRACTED_REPORT_ID=Number(process[_0x6f35('0x8')][0x2]);var QUERY=process[_0x6f35('0x8')][0x3];var PATH=process[_0x6f35('0x8')][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0x127acd,_0x29f604){var _0x224547={'status':_0x127acd};var _0x4b7150={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x29f604){_0x224547[_0x6f35('0x9')]=_0x29f604;}return db['AnalyticExtractedReport'][_0x6f35('0xa')](_0x224547,_0x4b7150);}function main(){var _0x305eed=0x1388;var _0x2d80d4;logger[_0x6f35('0xb')](util[_0x6f35('0xc')](_0x6f35('0xd'),EXTRACTED_REPORT_ID,'CSV'));return db[_0x6f35('0xe')][_0x6f35('0xf')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x6f35('0x10'),_0x6f35('0x11')]})['then'](function(_0x49337a){if(_0x49337a){_0x2d80d4=_0x49337a;_0x305eed=_0x2d80d4['splitSizeCsv']||0x1388;}})['then'](function(){return dbH[_0x6f35('0x12')][_0x6f35('0x13')](util[_0x6f35('0xc')](_0x6f35('0x14'),QUERY),{'type':dbH[_0x6f35('0x12')][_0x6f35('0x15')]['SELECT']});})[_0x6f35('0x16')](function(_0x38f2ae){if(!_0x38f2ae[0x0][_0x6f35('0x17')]){return analyticExtractedReport('Empty');}var _0x153bd2=[];var _0x321f25=0x0;if(_0x2d80d4['split']){if(_0x38f2ae&&_0x38f2ae[_0x6f35('0x18')]){var _0x541983=_[_0x6f35('0x19')](_0x38f2ae[0x0][_0x6f35('0x17')]/_0x305eed);var _0x49de3d=Number[_0x6f35('0x1a')](_0x38f2ae[0x0]['num']/_0x305eed)?_0x38f2ae[0x0][_0x6f35('0x17')]%_0x305eed:0x0;_0x541983['forEach'](function(_0x138de2){if(_0x138de2>0x0){_0x321f25+=_0x305eed;}_0x153bd2[_0x6f35('0x1b')](dbH[_0x6f35('0x12')][_0x6f35('0x13')](util[_0x6f35('0xc')]('%s\x20limit\x20%d\x20OFFSET\x20%d',QUERY,_0x305eed,_0x321f25),{'type':dbH[_0x6f35('0x12')]['QueryTypes']['SELECT']}));});if(_0x49de3d>0x0){_0x321f25+=_0x305eed;_0x153bd2[_0x6f35('0x1b')](dbH[_0x6f35('0x12')][_0x6f35('0x13')](util[_0x6f35('0xc')](_0x6f35('0x1c'),QUERY,_0x49de3d,_0x321f25),{'type':dbH[_0x6f35('0x12')][_0x6f35('0x15')][_0x6f35('0x1d')]}));}}}else{_0x153bd2['push'](dbH[_0x6f35('0x12')]['query'](QUERY,{'type':dbH[_0x6f35('0x12')][_0x6f35('0x15')][_0x6f35('0x1d')]}));}var _0xab159f=path[_0x6f35('0x1e')](PATH);var _0x39953d=path[_0x6f35('0x1f')](PATH,_0x6f35('0x20'));var _0x207b99=_0x2d80d4[_0x6f35('0x10')]&&_0x153bd2[_0x6f35('0x18')]>0x1;var _0x58fdf5=[];if(!fs['existsSync'](path[_0x6f35('0x21')](_0xab159f,_0x39953d))&&_0x207b99){fs[_0x6f35('0x22')](path[_0x6f35('0x21')](_0xab159f,_0x39953d));}return BPromise[_0x6f35('0x23')](_0x153bd2,function(_0x2fcd03){_0x58fdf5['push'](_0x2fcd03);})[_0x6f35('0x16')](function(){for(var _0x15728e=0x0;_0x15728e<_0x58fdf5[_0x6f35('0x18')];_0x15728e+=0x1){var _0x203419;var _0x94eb2e=_0x58fdf5[_0x15728e];if(_0x207b99){_0x203419=path[_0x6f35('0x21')](_0xab159f,_0x39953d,util[_0x6f35('0xc')](_0x6f35('0x24'),_0x39953d,_0x15728e,_0x6f35('0x25')));}else{_0x203419=path[_0x6f35('0x21')](_0xab159f,util[_0x6f35('0xc')](_0x6f35('0x26'),_0x39953d,_0x6f35('0x25')));}fs[_0x6f35('0x27')](_0x203419,csv(_0x94eb2e));}})[_0x6f35('0x16')](function(){if(_0x207b99){return new Promise(function(_0x4b5975){zipdir(path[_0x6f35('0x21')](_0xab159f,_0x39953d),{'saveTo':path[_0x6f35('0x21')](_0xab159f,util[_0x6f35('0xc')]('%s.%s',_0x39953d,'zip'))},function(_0x399068,_0x353fdf){rimraf(path[_0x6f35('0x21')](_0xab159f,_0x39953d),function(){});_0x4b5975(_0x6f35('0x28'));});});}})[_0x6f35('0x16')](function(){logger[_0x6f35('0xb')](util[_0x6f35('0xc')](_0x6f35('0x29'),EXTRACTED_REPORT_ID,_0x6f35('0x2a')));return analyticExtractedReport('Completed',_0x207b99?util[_0x6f35('0xc')]('%s.%s',_0x39953d,_0x207b99?_0x6f35('0x2b'):_0x6f35('0x25')):null);});})[_0x6f35('0x2c')](function(_0x5aa591){logger[_0x6f35('0xb')](util[_0x6f35('0xc')](_0x6f35('0x2d'),EXTRACTED_REPORT_ID,'CSV'),util['inspect'](_0x5aa591,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0x6f35('0x2e'));})[_0x6f35('0x2f')](function(){process[_0x6f35('0x30')](EXIT_CODE);});}main();
\ No newline at end of file
index 71bec40..88f971b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x62da=['startDate','header','pageBreak','before','margin','push','landscape','\x20/\x20','footer','Arial','black','num','Empty','Setting','find','split','splitSizePdf','then','range','sequelize','query','%s\x20limit\x20%d\x20OFFSET\x20%d','QueryTypes','SELECT','dirname','basename','existsSync','join','each','flatten','createPdfKitDocument','%s%d.%s','pdf','%s.%s','zip\x20finished','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','zip','info','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','PDF','findOne','catch','finally','/fonts/arial-regular.ttf','/fonts/arial-bold.ttf','/fonts/arial-italic.ttf','/fonts/arial-bold-italic.ttf','%s\x20#%d','channel','interactionId','toString','center','Interaction\x20Transcript','\x09\x09XCALLY\x20Motion\x20-\x20%s\x09\x09\x09\x09%d/%d\x09\x09\x09\x09%s','createWriteStream','finish','error','end','createPdfFromHTML','lodash','util','path','moment','pdfmake/src/printer','zip-dir','rimraf','jsdom','JSDOM','window','../../mysqldb','dbH','../../config/logger','analytics','argv','MMMM\x20Do\x20YYYY,\x20h:mm:ss\x20a','savename','AnalyticExtractedReport','update','map','tableHeader','pick','fill','length','auto','body','concat','chunk','keys','forEach','format','Name:\x20%s\x0aReport:\x20%s\x0aFrom:\x20%s\x20To:\x20%s','name'];(function(_0x394536,_0x452fc2){var _0x41f38e=function(_0x30523b){while(--_0x30523b){_0x394536['push'](_0x394536['shift']());}};_0x41f38e(++_0x452fc2);}(_0x62da,0x1ab));var _0xa62d=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x62da[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0xa62d('0x0'));var fs=require('fs');var util=require(_0xa62d('0x1'));var path=require(_0xa62d('0x2'));var moment=require(_0xa62d('0x3'));var htmlToPdfmake=require('html-to-pdfmake');var PdfPrinter=require(_0xa62d('0x4'));var zipdir=require(_0xa62d('0x5'));var rimraf=require(_0xa62d('0x6'));var JSDOM=require(_0xa62d('0x7'))[_0xa62d('0x8')];var window=new JSDOM('')[_0xa62d('0x9')];var BPromise=require('bluebird');var db=require(_0xa62d('0xa'))['db'];var dbH=require(_0xa62d('0xa'))[_0xa62d('0xb')];var logger=require(_0xa62d('0xc'))(_0xa62d('0xd'));var EXTRACTED_REPORT_ID=Number(process[_0xa62d('0xe')][0x2]);var QUERY=process[_0xa62d('0xe')][0x3];var PATH=process[_0xa62d('0xe')][0x4];var NAME=process[_0xa62d('0xe')][0x5];var FORMAT=_0xa62d('0xf');var EXTRACTED_REPORT;var EXIT_CODE=0x0;function analyticExtractedReport(_0x3c4b9c,_0x5456ef){var _0x447bfe={'status':_0x3c4b9c};var _0x1061e9={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x5456ef){_0x447bfe[_0xa62d('0x10')]=_0x5456ef;}return db[_0xa62d('0x11')][_0xa62d('0x12')](_0x447bfe,_0x1061e9);}function getHeaders(_0x2de7d1){return _[_0xa62d('0x13')](_0x2de7d1,function(_0x376633){return{'text':_0x376633,'style':_0xa62d('0x14')};});}function getRows(_0x46c384,_0x2e919d){return _['map'](_0x2e919d,function(_0x4e4afc){return _(_0x4e4afc)[_0xa62d('0x15')](_0x46c384)[_0xa62d('0x13')](function(_0x251522){return _0x251522?_['toString'](_0x251522):'';})['value']();});}function createTable(_0x474451,_0x3aa430){var _0x350582={'widths':_[_0xa62d('0x16')](Array(_0x474451[_0xa62d('0x17')]),0x91),'heights':function(_0x587b73){return _0x587b73===0x0?_0xa62d('0x18'):0x32;},'dontBreakRows':!![],'headerRows':0x1,'body':[]};var _0x68056f=getHeaders(_0x474451);_0x350582['body']['push'](_0x68056f);var _0xc747e=getRows(_0x474451,_0x3aa430);_0x350582[_0xa62d('0x19')]=_0x350582['body'][_0xa62d('0x1a')](_0xc747e);return _0x350582;}function createTables(_0x3671ef){var _0x148d07=[];var _0x1d24a5=_[_0xa62d('0x1b')](Object[_0xa62d('0x1c')](_0x3671ef[0x0]),0x5);_0x1d24a5[_0xa62d('0x1d')](function(_0x37a284){_0x148d07['push'](createTable(_0x37a284,_0x3671ef));});return _0x148d07;}function getPDFDocDefinition(_0x357fef){var _0x530eb9=util[_0xa62d('0x1e')](_0xa62d('0x1f'),NAME,EXTRACTED_REPORT[_0xa62d('0x20')],moment(EXTRACTED_REPORT[_0xa62d('0x21')])['format'](FORMAT),moment(EXTRACTED_REPORT['endDate'])['format'](FORMAT));var _0x173b99=[];for(var _0x5ac5c1=0x0;_0x5ac5c1<_0x357fef['length'];_0x5ac5c1++){var _0xd24ad9=[];if(_0x5ac5c1===0x0){_0xd24ad9['push']({'text':_0x530eb9,'style':_0xa62d('0x22')});}var _0x33c9ff={'table':_0x357fef[_0x5ac5c1]};if(_0x5ac5c1>0x0){_0x33c9ff[_0xa62d('0x23')]=_0xa62d('0x24');_0x33c9ff[_0xa62d('0x25')]=[0x0,0x46,0x0,0x0];}_0xd24ad9[_0xa62d('0x26')](_0x33c9ff);_0x173b99[_0xa62d('0x26')](_0xd24ad9);}return{'pageSize':'A4','pageOrientation':_0xa62d('0x27'),'content':_0x173b99,'footer':function(_0x27a217,_0x23f39b){return{'text':_0x27a217['toString']()+_0xa62d('0x28')+_0x23f39b,'style':_0xa62d('0x29')};},'defaultStyle':{'font':_0xa62d('0x2a')},'styles':{'header':{'fontSize':0x12,'bold':!![],'margin':[0x0,0x0,0x0,0xa]},'tableHeader':{'bold':!![],'fontSize':0xd,'color':_0xa62d('0x2b')},'footer':{'alignment':'right','margin':[0x0,0x0,0x28,0x0]}}};}function extractReport(_0x216d73){var _0x205dec=0x1388;var _0x20aeb0;if(!_0x216d73[0x0][_0xa62d('0x2c')]){return analyticExtractedReport(_0xa62d('0x2d'));}return db[_0xa62d('0x2e')][_0xa62d('0x2f')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0xa62d('0x30'),_0xa62d('0x31')]})[_0xa62d('0x32')](function(_0x282985){if(_0x282985){_0x20aeb0=_0x282985;_0x205dec=_0x20aeb0[_0xa62d('0x31')]||0x3e8;}})[_0xa62d('0x32')](function(){var _0x2bd229=[];var _0x4829a5=0x0;if(_0x20aeb0[_0xa62d('0x30')]){if(_0x216d73&&_0x216d73[_0xa62d('0x17')]){var _0x3c7d85=_[_0xa62d('0x33')](_0x216d73[0x0]['num']/_0x205dec);var _0x2cd2d7=Number['isInteger'](_0x216d73[0x0][_0xa62d('0x2c')]/_0x205dec)?_0x216d73[0x0][_0xa62d('0x2c')]%_0x205dec:0x0;_0x3c7d85[_0xa62d('0x1d')](function(_0x33c96c){if(_0x33c96c>0x0){_0x4829a5+=_0x205dec;}_0x2bd229['push'](dbH[_0xa62d('0x34')][_0xa62d('0x35')](util['format'](_0xa62d('0x36'),QUERY,_0x205dec,_0x4829a5),{'type':dbH['sequelize'][_0xa62d('0x37')]['SELECT']}));});if(_0x2cd2d7>0x0){_0x4829a5+=_0x205dec;_0x2bd229['push'](dbH['sequelize'][_0xa62d('0x35')](util[_0xa62d('0x1e')](_0xa62d('0x36'),QUERY,_0x2cd2d7,_0x4829a5),{'type':dbH['sequelize']['QueryTypes'][_0xa62d('0x38')]}));}}}else{_0x2bd229[_0xa62d('0x26')](dbH[_0xa62d('0x34')][_0xa62d('0x35')](QUERY,{'type':dbH[_0xa62d('0x34')][_0xa62d('0x37')]['SELECT']}));}var _0x5e2c8b=path[_0xa62d('0x39')](PATH);var _0x4ebe5b=path[_0xa62d('0x3a')](PATH,'.pdf');var _0x311062=_0x20aeb0[_0xa62d('0x30')]&&_0x2bd229[_0xa62d('0x17')]>0x1;var _0x336896=[];if(!fs[_0xa62d('0x3b')](path['join'](_0x5e2c8b,_0x4ebe5b))&&_0x311062){fs['mkdirSync'](path[_0xa62d('0x3c')](_0x5e2c8b,_0x4ebe5b));}return BPromise[_0xa62d('0x3d')](_0x2bd229,function(_0x3d203d){_0x336896[_0xa62d('0x26')](_0x3d203d);})[_0xa62d('0x32')](function(){var _0x469599=[];for(var _0x1379f1=0x0;_0x1379f1<_0x336896[_0xa62d('0x17')];_0x1379f1+=0x1){var _0x4346bf=_0x336896[_0x1379f1];var _0x58f95e=createTables(_[_0xa62d('0x3e')](_0x4346bf));var _0x4c0f0b;var _0x34a4a9=getPDFDocDefinition(_0x58f95e);var _0x25514f=getPDFPrinter();var _0x588d47=_0x25514f[_0xa62d('0x3f')](_0x34a4a9);if(_0x311062){_0x4c0f0b=path[_0xa62d('0x3c')](_0x5e2c8b,_0x4ebe5b,util['format'](_0xa62d('0x40'),_0x4ebe5b,_0x1379f1,_0xa62d('0x41')));}else{_0x4c0f0b=path['join'](_0x5e2c8b,util['format'](_0xa62d('0x42'),_0x4ebe5b,'pdf'));}_0x469599['push'](writePDFDocument(_0x588d47,_0x4c0f0b));}return Promise['all'](_0x469599);})['then'](function(){if(_0x311062){return new Promise(function(_0x38edf1){zipdir(path[_0xa62d('0x3c')](_0x5e2c8b,_0x4ebe5b),{'saveTo':path['join'](_0x5e2c8b,util[_0xa62d('0x1e')](_0xa62d('0x42'),_0x4ebe5b,'zip'))},function(){rimraf(path['join'](_0x5e2c8b,_0x4ebe5b),function(){});_0x38edf1(_0xa62d('0x43'));});});}})['then'](function(){if(!_0x311062)return;rimraf(path['join'](_0x5e2c8b,_0x4ebe5b),function(){});})[_0xa62d('0x32')](function(){logger['info'](util[_0xa62d('0x1e')](_0xa62d('0x44'),EXTRACTED_REPORT_ID,'PDF'));return analyticExtractedReport('Completed',_0x311062?util[_0xa62d('0x1e')](_0xa62d('0x42'),_0x4ebe5b,_0x311062?_0xa62d('0x45'):_0xa62d('0x41')):null);});});}function main(){if(!EXTRACTED_REPORT_ID)return;logger[_0xa62d('0x46')](util[_0xa62d('0x1e')](_0xa62d('0x47'),EXTRACTED_REPORT_ID,_0xa62d('0x48')));return db[_0xa62d('0x11')][_0xa62d('0x49')]({'where':{'id':EXTRACTED_REPORT_ID}})[_0xa62d('0x32')](function(_0x3edf80){EXTRACTED_REPORT=_0x3edf80;return dbH[_0xa62d('0x34')][_0xa62d('0x35')](util[_0xa62d('0x1e')]('SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t',QUERY),{'type':dbH[_0xa62d('0x34')][_0xa62d('0x37')][_0xa62d('0x38')]});})[_0xa62d('0x32')](extractReport)[_0xa62d('0x4a')](function(_0x24b343){logger[_0xa62d('0x46')](util[_0xa62d('0x1e')]('Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,_0xa62d('0x48')),util['inspect'](_0x24b343,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport('Failed');})[_0xa62d('0x4b')](function(){process['exit'](EXIT_CODE);});}main();function getPDFPrinter(){var _0x136cad=new PdfPrinter({'Arial':{'normal':__dirname+_0xa62d('0x4c'),'bold':__dirname+_0xa62d('0x4d'),'italics':__dirname+_0xa62d('0x4e'),'bolditalics':__dirname+_0xa62d('0x4f')}});return _0x136cad;}function getPDFDocDefinitionFromHTML(_0x2662c3,_0x3d49ee){var _0x19b256=util['format'](_0xa62d('0x50'),_0x3d49ee[_0xa62d('0x51')],_0x3d49ee[_0xa62d('0x52')]);var _0x392a9a=moment()[_0xa62d('0x1e')]('YYYY-MM-DD')[_0xa62d('0x53')]();var _0x1bc935=htmlToPdfmake(_0x2662c3,{'window':window,'tableAutoSize':!![]});return{'content':[_0x1bc935],'defaultStyle':{'font':_0xa62d('0x2a')},'styles':{'header':{'fontSize':0x12,'bold':!![],'alignment':_0xa62d('0x54'),'margin':[0xa,0xa,0xa,0xa]},'footer':{'fontSize':0x9,'alignment':_0xa62d('0x54'),'margin':[0xa,0x14,0xa,0xa]},'textblock':{'fontSize':0xb},'textfield':{'bold':!![]},'messageContainer':{'fontSize':0xa},'messageInfo':{'bold':!![]},'interactionData':{'alignment':_0xa62d('0x54')}},'header':function(){return[{'text':_0xa62d('0x55'),'style':'header'}];},'footer':function(_0x130a23,_0x3e4b7d){return[{'text':util['format'](_0xa62d('0x56'),_0x19b256,_0x130a23,_0x3e4b7d,_0x392a9a),'style':_0xa62d('0x29')}];}};}function writePDFDocument(_0x5abc16,_0x3bfc15){return new Promise(function(_0x1848a3,_0x1b262c){var _0x34d7c1=_0x5abc16['pipe'](fs[_0xa62d('0x57')](_0x3bfc15));_0x34d7c1['on']('finish',function(){_0x1848a3(_0xa62d('0x58'));});_0x34d7c1['on'](_0xa62d('0x59'),function(_0x523081){_0x1b262c(_0x523081);});_0x5abc16[_0xa62d('0x5a')]();});}exports[_0xa62d('0x5b')]=function(_0x53e70d,_0x1fcb4f){var _0x10d462=getPDFPrinter();var _0x2fa26c=getPDFDocDefinitionFromHTML(_0x53e70d,_0x1fcb4f);var _0x5bab54=_0x10d462['createPdfKitDocument'](_0x2fa26c);return writePDFDocument(_0x5bab54,_0x1fcb4f[_0xa62d('0x2')])[_0xa62d('0x4a')](function(_0x12c916){throw _0x12c916;});};
\ No newline at end of file
+var _0xd3a8=['length','auto','body','concat','chunk','push','format','Name:\x20%s\x0aReport:\x20%s\x0aFrom:\x20%s\x20To:\x20%s','header','pageBreak','before','margin','landscape','\x20/\x20','footer','Arial','black','right','num','Empty','Setting','find','split','splitSizePdf','then','range','forEach','sequelize','%s\x20limit\x20%d\x20OFFSET\x20%d','QueryTypes','SELECT','query','dirname','basename','existsSync','join','mkdirSync','each','createPdfKitDocument','%s%d.%s','pdf','all','%s.%s','zip\x20finished','info','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','Completed','zip','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','PDF','findOne','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','inspect','Failed','finally','exit','/fonts/arial-regular.ttf','/fonts/arial-bold.ttf','/fonts/arial-italic.ttf','/fonts/arial-bold-italic.ttf','channel','YYYY-MM-DD','center','Interaction\x20Transcript','\x09\x09XCALLY\x20Motion\x20-\x20%s\x09\x09\x09\x09%d/%d\x09\x09\x09\x09%s','pipe','createWriteStream','finish','end','lodash','util','path','html-to-pdfmake','zip-dir','rimraf','jsdom','../../mysqldb','analytics','argv','savename','AnalyticExtractedReport','tableHeader','map','pick','toString','value','fill'];(function(_0x36884e,_0x48008f){var _0x1cc367=function(_0x388a78){while(--_0x388a78){_0x36884e['push'](_0x36884e['shift']());}};_0x1cc367(++_0x48008f);}(_0xd3a8,0x1a6));var _0x8d3a=function(_0x2641f9,_0x26715f){_0x2641f9=_0x2641f9-0x0;var _0x585741=_0xd3a8[_0x2641f9];return _0x585741;};'use strict';var _=require(_0x8d3a('0x0'));var fs=require('fs');var util=require(_0x8d3a('0x1'));var path=require(_0x8d3a('0x2'));var moment=require('moment');var htmlToPdfmake=require(_0x8d3a('0x3'));var PdfPrinter=require('pdfmake/src/printer');var zipdir=require(_0x8d3a('0x4'));var rimraf=require(_0x8d3a('0x5'));var JSDOM=require(_0x8d3a('0x6'))['JSDOM'];var window=new JSDOM('')['window'];var BPromise=require('bluebird');var db=require(_0x8d3a('0x7'))['db'];var dbH=require(_0x8d3a('0x7'))['dbH'];var logger=require('../../config/logger')(_0x8d3a('0x8'));var EXTRACTED_REPORT_ID=Number(process['argv'][0x2]);var QUERY=process[_0x8d3a('0x9')][0x3];var PATH=process[_0x8d3a('0x9')][0x4];var NAME=process[_0x8d3a('0x9')][0x5];var FORMAT='MMMM\x20Do\x20YYYY,\x20h:mm:ss\x20a';var EXTRACTED_REPORT;var EXIT_CODE=0x0;function analyticExtractedReport(_0x54c0ad,_0x3363ab){var _0x52441e={'status':_0x54c0ad};var _0x4ed18b={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x3363ab){_0x52441e[_0x8d3a('0xa')]=_0x3363ab;}return db[_0x8d3a('0xb')]['update'](_0x52441e,_0x4ed18b);}function getHeaders(_0x22a839){return _['map'](_0x22a839,function(_0x1e7bda){return{'text':_0x1e7bda,'style':_0x8d3a('0xc')};});}function getRows(_0x1f9b05,_0x3f793b){return _[_0x8d3a('0xd')](_0x3f793b,function(_0x26d2f6){return _(_0x26d2f6)[_0x8d3a('0xe')](_0x1f9b05)[_0x8d3a('0xd')](function(_0x341879){return _0x341879?_[_0x8d3a('0xf')](_0x341879):'';})[_0x8d3a('0x10')]();});}function createTable(_0x10525b,_0x56a980){var _0x2b688a={'widths':_[_0x8d3a('0x11')](Array(_0x10525b[_0x8d3a('0x12')]),0x91),'heights':function(_0x4fe841){return _0x4fe841===0x0?_0x8d3a('0x13'):0x32;},'dontBreakRows':!![],'headerRows':0x1,'body':[]};var _0x5cef92=getHeaders(_0x10525b);_0x2b688a[_0x8d3a('0x14')]['push'](_0x5cef92);var _0x5ef2f0=getRows(_0x10525b,_0x56a980);_0x2b688a[_0x8d3a('0x14')]=_0x2b688a['body'][_0x8d3a('0x15')](_0x5ef2f0);return _0x2b688a;}function createTables(_0x3fb5ad){var _0x107b52=[];var _0x286f76=_[_0x8d3a('0x16')](Object['keys'](_0x3fb5ad[0x0]),0x5);_0x286f76['forEach'](function(_0x167ff7){_0x107b52[_0x8d3a('0x17')](createTable(_0x167ff7,_0x3fb5ad));});return _0x107b52;}function getPDFDocDefinition(_0x3900b6){var _0x210922=util[_0x8d3a('0x18')](_0x8d3a('0x19'),NAME,EXTRACTED_REPORT['name'],moment(EXTRACTED_REPORT['startDate'])[_0x8d3a('0x18')](FORMAT),moment(EXTRACTED_REPORT['endDate'])[_0x8d3a('0x18')](FORMAT));var _0x5ea2a7=[];for(var _0x222995=0x0;_0x222995<_0x3900b6['length'];_0x222995++){var _0xbce6a6=[];if(_0x222995===0x0){_0xbce6a6[_0x8d3a('0x17')]({'text':_0x210922,'style':_0x8d3a('0x1a')});}var _0x49d638={'table':_0x3900b6[_0x222995]};if(_0x222995>0x0){_0x49d638[_0x8d3a('0x1b')]=_0x8d3a('0x1c');_0x49d638[_0x8d3a('0x1d')]=[0x0,0x46,0x0,0x0];}_0xbce6a6[_0x8d3a('0x17')](_0x49d638);_0x5ea2a7['push'](_0xbce6a6);}return{'pageSize':'A4','pageOrientation':_0x8d3a('0x1e'),'content':_0x5ea2a7,'footer':function(_0x1c3bbe,_0x113087){return{'text':_0x1c3bbe[_0x8d3a('0xf')]()+_0x8d3a('0x1f')+_0x113087,'style':_0x8d3a('0x20')};},'defaultStyle':{'font':_0x8d3a('0x21')},'styles':{'header':{'fontSize':0x12,'bold':!![],'margin':[0x0,0x0,0x0,0xa]},'tableHeader':{'bold':!![],'fontSize':0xd,'color':_0x8d3a('0x22')},'footer':{'alignment':_0x8d3a('0x23'),'margin':[0x0,0x0,0x28,0x0]}}};}function extractReport(_0x2129a7){var _0x4ed9c9=0x1388;var _0xe596cc;if(!_0x2129a7[0x0][_0x8d3a('0x24')]){return analyticExtractedReport(_0x8d3a('0x25'));}return db[_0x8d3a('0x26')][_0x8d3a('0x27')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0x8d3a('0x28'),'splitSizePdf']})['then'](function(_0x55938e){if(_0x55938e){_0xe596cc=_0x55938e;_0x4ed9c9=_0xe596cc[_0x8d3a('0x29')]||0x3e8;}})[_0x8d3a('0x2a')](function(){var _0x4465b7=[];var _0x397c13=0x0;if(_0xe596cc['split']){if(_0x2129a7&&_0x2129a7[_0x8d3a('0x12')]){var _0x1ff85a=_[_0x8d3a('0x2b')](_0x2129a7[0x0]['num']/_0x4ed9c9);var _0x2ac1ef=Number['isInteger'](_0x2129a7[0x0]['num']/_0x4ed9c9)?_0x2129a7[0x0]['num']%_0x4ed9c9:0x0;_0x1ff85a[_0x8d3a('0x2c')](function(_0x3ab797){if(_0x3ab797>0x0){_0x397c13+=_0x4ed9c9;}_0x4465b7[_0x8d3a('0x17')](dbH[_0x8d3a('0x2d')]['query'](util[_0x8d3a('0x18')](_0x8d3a('0x2e'),QUERY,_0x4ed9c9,_0x397c13),{'type':dbH[_0x8d3a('0x2d')][_0x8d3a('0x2f')][_0x8d3a('0x30')]}));});if(_0x2ac1ef>0x0){_0x397c13+=_0x4ed9c9;_0x4465b7[_0x8d3a('0x17')](dbH[_0x8d3a('0x2d')][_0x8d3a('0x31')](util[_0x8d3a('0x18')](_0x8d3a('0x2e'),QUERY,_0x2ac1ef,_0x397c13),{'type':dbH['sequelize'][_0x8d3a('0x2f')][_0x8d3a('0x30')]}));}}}else{_0x4465b7['push'](dbH[_0x8d3a('0x2d')][_0x8d3a('0x31')](QUERY,{'type':dbH[_0x8d3a('0x2d')]['QueryTypes'][_0x8d3a('0x30')]}));}var _0x697d94=path[_0x8d3a('0x32')](PATH);var _0x464ac3=path[_0x8d3a('0x33')](PATH,'.pdf');var _0x24ab96=_0xe596cc['split']&&_0x4465b7[_0x8d3a('0x12')]>0x1;var _0x163005=[];if(!fs[_0x8d3a('0x34')](path[_0x8d3a('0x35')](_0x697d94,_0x464ac3))&&_0x24ab96){fs[_0x8d3a('0x36')](path[_0x8d3a('0x35')](_0x697d94,_0x464ac3));}return BPromise[_0x8d3a('0x37')](_0x4465b7,function(_0x513191){_0x163005[_0x8d3a('0x17')](_0x513191);})[_0x8d3a('0x2a')](function(){var _0x59599a=[];for(var _0x5db5ec=0x0;_0x5db5ec<_0x163005[_0x8d3a('0x12')];_0x5db5ec+=0x1){var _0x2b4330=_0x163005[_0x5db5ec];var _0xda9016=createTables(_['flatten'](_0x2b4330));var _0x7a6e16;var _0x364d15=getPDFDocDefinition(_0xda9016);var _0x2d9654=getPDFPrinter();var _0x3780d6=_0x2d9654[_0x8d3a('0x38')](_0x364d15);if(_0x24ab96){_0x7a6e16=path[_0x8d3a('0x35')](_0x697d94,_0x464ac3,util[_0x8d3a('0x18')](_0x8d3a('0x39'),_0x464ac3,_0x5db5ec,_0x8d3a('0x3a')));}else{_0x7a6e16=path[_0x8d3a('0x35')](_0x697d94,util[_0x8d3a('0x18')]('%s.%s',_0x464ac3,_0x8d3a('0x3a')));}_0x59599a[_0x8d3a('0x17')](writePDFDocument(_0x3780d6,_0x7a6e16));}return Promise[_0x8d3a('0x3b')](_0x59599a);})['then'](function(){if(_0x24ab96){return new Promise(function(_0x53ba55){zipdir(path[_0x8d3a('0x35')](_0x697d94,_0x464ac3),{'saveTo':path[_0x8d3a('0x35')](_0x697d94,util['format'](_0x8d3a('0x3c'),_0x464ac3,'zip'))},function(){rimraf(path[_0x8d3a('0x35')](_0x697d94,_0x464ac3),function(){});_0x53ba55(_0x8d3a('0x3d'));});});}})['then'](function(){if(!_0x24ab96)return;rimraf(path[_0x8d3a('0x35')](_0x697d94,_0x464ac3),function(){});})[_0x8d3a('0x2a')](function(){logger[_0x8d3a('0x3e')](util[_0x8d3a('0x18')](_0x8d3a('0x3f'),EXTRACTED_REPORT_ID,'PDF'));return analyticExtractedReport(_0x8d3a('0x40'),_0x24ab96?util[_0x8d3a('0x18')](_0x8d3a('0x3c'),_0x464ac3,_0x24ab96?_0x8d3a('0x41'):_0x8d3a('0x3a')):null);});});}function main(){if(!EXTRACTED_REPORT_ID)return;logger[_0x8d3a('0x3e')](util[_0x8d3a('0x18')](_0x8d3a('0x42'),EXTRACTED_REPORT_ID,_0x8d3a('0x43')));return db['AnalyticExtractedReport'][_0x8d3a('0x44')]({'where':{'id':EXTRACTED_REPORT_ID}})['then'](function(_0x17d0a3){EXTRACTED_REPORT=_0x17d0a3;return dbH[_0x8d3a('0x2d')][_0x8d3a('0x31')](util[_0x8d3a('0x18')](_0x8d3a('0x45'),QUERY),{'type':dbH['sequelize'][_0x8d3a('0x2f')][_0x8d3a('0x30')]});})[_0x8d3a('0x2a')](extractReport)['catch'](function(_0x3a2d01){logger[_0x8d3a('0x3e')](util[_0x8d3a('0x18')](_0x8d3a('0x46'),EXTRACTED_REPORT_ID,'PDF'),util[_0x8d3a('0x47')](_0x3a2d01,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0x8d3a('0x48'));})[_0x8d3a('0x49')](function(){process[_0x8d3a('0x4a')](EXIT_CODE);});}main();function getPDFPrinter(){var _0x107160=new PdfPrinter({'Arial':{'normal':__dirname+_0x8d3a('0x4b'),'bold':__dirname+_0x8d3a('0x4c'),'italics':__dirname+_0x8d3a('0x4d'),'bolditalics':__dirname+_0x8d3a('0x4e')}});return _0x107160;}function getPDFDocDefinitionFromHTML(_0x2738c8,_0x305a46){var _0x1ebf20=util['format']('%s\x20#%d',_0x305a46[_0x8d3a('0x4f')],_0x305a46['interactionId']);var _0x4594c4=moment()['format'](_0x8d3a('0x50'))[_0x8d3a('0xf')]();var _0x7fd453=htmlToPdfmake(_0x2738c8,{'window':window,'tableAutoSize':!![]});return{'content':[_0x7fd453],'defaultStyle':{'font':_0x8d3a('0x21')},'styles':{'header':{'fontSize':0x12,'bold':!![],'alignment':_0x8d3a('0x51'),'margin':[0xa,0xa,0xa,0xa]},'footer':{'fontSize':0x9,'alignment':'center','margin':[0xa,0x14,0xa,0xa]},'textblock':{'fontSize':0xb},'textfield':{'bold':!![]},'messageContainer':{'fontSize':0xa},'messageInfo':{'bold':!![]},'interactionData':{'alignment':_0x8d3a('0x51')}},'header':function(){return[{'text':_0x8d3a('0x52'),'style':'header'}];},'footer':function(_0x50793d,_0x2466cb){return[{'text':util[_0x8d3a('0x18')](_0x8d3a('0x53'),_0x1ebf20,_0x50793d,_0x2466cb,_0x4594c4),'style':_0x8d3a('0x20')}];}};}function writePDFDocument(_0x5ddd7c,_0x52ccc7){return new Promise(function(_0x472d62,_0x20a79a){var _0x4c96f7=_0x5ddd7c[_0x8d3a('0x54')](fs[_0x8d3a('0x55')](_0x52ccc7));_0x4c96f7['on'](_0x8d3a('0x56'),function(){_0x472d62(_0x8d3a('0x56'));});_0x4c96f7['on']('error',function(_0x3c8563){_0x20a79a(_0x3c8563);});_0x5ddd7c[_0x8d3a('0x57')]();});}exports['createPdfFromHTML']=function(_0x5305df,_0x5b592e){var _0x54ceb2=getPDFPrinter();var _0x34e7db=getPDFDocDefinitionFromHTML(_0x5305df,_0x5b592e);var _0x49cbdf=_0x54ceb2['createPdfKitDocument'](_0x34e7db);return writePDFDocument(_0x49cbdf,_0x5b592e[_0x8d3a('0x2')])['catch'](function(_0x4e495e){throw _0x4e495e;});};
\ No newline at end of file
index e80dc8a..16ca62f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8a17=['zip-dir','rimraf','../../mysqldb','dbH','../../config/logger','analytics','argv','savename','AnalyticExtractedReport','info','format','Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','XLSX','Setting','find','splitSizeXlsx','then','sequelize','query','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','QueryTypes','SELECT','num','Empty','split','length','range','isInteger','forEach','%s\x20limit\x20%d\x20OFFSET\x20%d','push','basename','.xlsx','join','mkdirSync','each','%s%d.%s','xlsx','%s.%s','writeFileSync','binary','zip\x20finished','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','Completed','zip','catch','Failed','finally','exit','util','json2xls','bluebird'];(function(_0x434783,_0xff395d){var _0x13efcf=function(_0x235dac){while(--_0x235dac){_0x434783['push'](_0x434783['shift']());}};_0x13efcf(++_0xff395d);}(_0x8a17,0x135));var _0x78a1=function(_0x393d69,_0x3a8c83){_0x393d69=_0x393d69-0x0;var _0x3cee37=_0x8a17[_0x393d69];return _0x3cee37;};'use strict';var util=require(_0x78a1('0x0'));var path=require('path');var _=require('lodash');var fs=require('fs');var json2xls=require(_0x78a1('0x1'));var BPromise=require(_0x78a1('0x2'));var zipdir=require(_0x78a1('0x3'));var rimraf=require(_0x78a1('0x4'));var db=require('../../mysqldb')['db'];var dbH=require(_0x78a1('0x5'))[_0x78a1('0x6')];var logger=require(_0x78a1('0x7'))(_0x78a1('0x8'));var EXTRACTED_REPORT_ID=Number(process[_0x78a1('0x9')][0x2]);var QUERY=process[_0x78a1('0x9')][0x3];var PATH=process[_0x78a1('0x9')][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0x33da2b,_0x5ad6e2){var _0x2fde61={'status':_0x33da2b};var _0x11fb7f={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x5ad6e2){_0x2fde61[_0x78a1('0xa')]=_0x5ad6e2;}return db[_0x78a1('0xb')]['update'](_0x2fde61,_0x11fb7f);}function main(){var _0x141fb9=0x1388;var _0x27c9aa;logger[_0x78a1('0xc')](util[_0x78a1('0xd')](_0x78a1('0xe'),EXTRACTED_REPORT_ID,_0x78a1('0xf')));return db[_0x78a1('0x10')][_0x78a1('0x11')]({'where':{'id':0x1},'raw':!![],'attributes':['id','split',_0x78a1('0x12')]})[_0x78a1('0x13')](function(_0x484fad){if(_0x484fad){_0x27c9aa=_0x484fad;_0x141fb9=_0x27c9aa[_0x78a1('0x12')]||0x1388;}})['then'](function(){return dbH[_0x78a1('0x14')][_0x78a1('0x15')](util['format'](_0x78a1('0x16'),QUERY),{'type':dbH[_0x78a1('0x14')][_0x78a1('0x17')][_0x78a1('0x18')]});})[_0x78a1('0x13')](function(_0x8bb937){if(!_0x8bb937[0x0][_0x78a1('0x19')]){return analyticExtractedReport(_0x78a1('0x1a'));}var _0x23fd49=[];var _0x36a3c4=0x0;if(_0x27c9aa[_0x78a1('0x1b')]){if(_0x8bb937&&_0x8bb937[_0x78a1('0x1c')]){var _0x340f37=_[_0x78a1('0x1d')](_0x8bb937[0x0]['num']/_0x141fb9);var _0x2a1b3b=Number[_0x78a1('0x1e')](_0x8bb937[0x0][_0x78a1('0x19')]/_0x141fb9)?_0x8bb937[0x0][_0x78a1('0x19')]%_0x141fb9:0x0;_0x340f37[_0x78a1('0x1f')](function(_0x2ad9f3){if(_0x2ad9f3>0x0){_0x36a3c4+=_0x141fb9;}_0x23fd49['push'](dbH['sequelize'][_0x78a1('0x15')](util[_0x78a1('0xd')](_0x78a1('0x20'),QUERY,_0x141fb9,_0x36a3c4),{'type':dbH['sequelize'][_0x78a1('0x17')]['SELECT']}));});if(_0x2a1b3b>0x0){_0x36a3c4+=_0x141fb9;_0x23fd49[_0x78a1('0x21')](dbH['sequelize'][_0x78a1('0x15')](util['format'](_0x78a1('0x20'),QUERY,_0x2a1b3b,_0x36a3c4),{'type':dbH['sequelize'][_0x78a1('0x17')][_0x78a1('0x18')]}));}}}else{_0x23fd49[_0x78a1('0x21')](dbH[_0x78a1('0x14')][_0x78a1('0x15')](QUERY,{'type':dbH['sequelize']['QueryTypes']['SELECT']}));}var _0x21c890=path['dirname'](PATH);var _0x53d02a=path[_0x78a1('0x22')](PATH,_0x78a1('0x23'));var _0x37aec5=_0x27c9aa[_0x78a1('0x1b')]&&_0x23fd49['length']>0x1;var _0x42fd0f=[];if(!fs['existsSync'](path[_0x78a1('0x24')](_0x21c890,_0x53d02a))&&_0x37aec5){fs[_0x78a1('0x25')](path[_0x78a1('0x24')](_0x21c890,_0x53d02a));}return BPromise[_0x78a1('0x26')](_0x23fd49,function(_0x4125a4){_0x42fd0f['push'](_0x4125a4);})['then'](function(){for(var _0x44ac64=0x0;_0x44ac64<_0x42fd0f[_0x78a1('0x1c')];_0x44ac64+=0x1){var _0x392c6d;var _0x2b0915=_0x42fd0f[_0x44ac64];if(_0x37aec5){_0x392c6d=path[_0x78a1('0x24')](_0x21c890,_0x53d02a,util['format'](_0x78a1('0x27'),_0x53d02a,_0x44ac64,_0x78a1('0x28')));}else{_0x392c6d=path[_0x78a1('0x24')](_0x21c890,util[_0x78a1('0xd')](_0x78a1('0x29'),_0x53d02a,'xlsx'));}fs[_0x78a1('0x2a')](_0x392c6d,json2xls(_0x2b0915),_0x78a1('0x2b'));}})[_0x78a1('0x13')](function(){if(_0x37aec5){return new Promise(function(_0x59dbdf){zipdir(path[_0x78a1('0x24')](_0x21c890,_0x53d02a),{'saveTo':path['join'](_0x21c890,util[_0x78a1('0xd')]('%s.%s',_0x53d02a,'zip'))},function(_0x28ce6c,_0x4e1d1b){rimraf(path[_0x78a1('0x24')](_0x21c890,_0x53d02a),function(){});_0x59dbdf(_0x78a1('0x2c'));});});}})[_0x78a1('0x13')](function(){logger[_0x78a1('0xc')](util[_0x78a1('0xd')](_0x78a1('0x2d'),EXTRACTED_REPORT_ID,'XLSX'));return analyticExtractedReport(_0x78a1('0x2e'),_0x37aec5?util[_0x78a1('0xd')](_0x78a1('0x29'),_0x53d02a,_0x37aec5?_0x78a1('0x2f'):'xlsx'):null);});})[_0x78a1('0x30')](function(_0x91dab3){logger[_0x78a1('0xc')](util[_0x78a1('0xd')]('Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,_0x78a1('0xf')),util['inspect'](_0x91dab3,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0x78a1('0x31'));})[_0x78a1('0x32')](function(){process[_0x78a1('0x33')](EXIT_CODE);});}main();
\ No newline at end of file
+var _0x819d=['Setting','find','split','splitSizeXlsx','sequelize','query','format','SELECT\x20count(*)\x20as\x20num\x20FROM\x20(%s)\x20t','SELECT','num','Empty','range','isInteger','push','%s\x20limit\x20%d\x20OFFSET\x20%d','QueryTypes','dirname','length','existsSync','join','mkdirSync','each','then','%s%d.%s','%s.%s','writeFileSync','binary','zip\x20finished','Extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format\x20completed','Completed','zip','xlsx','Error\x20during\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format','Failed','finally','exit','path','lodash','bluebird','../../mysqldb','dbH','analytics','argv','AnalyticExtractedReport','update','info','XLSX'];(function(_0x28a991,_0x56ca36){var _0x28bbb3=function(_0xdec46){while(--_0xdec46){_0x28a991['push'](_0x28a991['shift']());}};_0x28bbb3(++_0x56ca36);}(_0x819d,0x10f));var _0xd819=function(_0x1035c1,_0x2d8583){_0x1035c1=_0x1035c1-0x0;var _0x308d67=_0x819d[_0x1035c1];return _0x308d67;};'use strict';var util=require('util');var path=require(_0xd819('0x0'));var _=require(_0xd819('0x1'));var fs=require('fs');var json2xls=require('json2xls');var BPromise=require(_0xd819('0x2'));var zipdir=require('zip-dir');var rimraf=require('rimraf');var db=require(_0xd819('0x3'))['db'];var dbH=require('../../mysqldb')[_0xd819('0x4')];var logger=require('../../config/logger')(_0xd819('0x5'));var EXTRACTED_REPORT_ID=Number(process['argv'][0x2]);var QUERY=process['argv'][0x3];var PATH=process[_0xd819('0x6')][0x4];var EXIT_CODE=0x0;function analyticExtractedReport(_0x2e1427,_0x138ac3){var _0x4275c9={'status':_0x2e1427};var _0x22d15e={'where':{'id':EXTRACTED_REPORT_ID}};if(_0x138ac3){_0x4275c9['savename']=_0x138ac3;}return db[_0xd819('0x7')][_0xd819('0x8')](_0x4275c9,_0x22d15e);}function main(){var _0x226cc3=0x1388;var _0x4bd02e;logger[_0xd819('0x9')](util['format']('Start\x20extraction\x20report\x20with\x20id\x20%d\x20in\x20%s\x20format',EXTRACTED_REPORT_ID,_0xd819('0xa')));return db[_0xd819('0xb')][_0xd819('0xc')]({'where':{'id':0x1},'raw':!![],'attributes':['id',_0xd819('0xd'),_0xd819('0xe')]})['then'](function(_0x4cca2f){if(_0x4cca2f){_0x4bd02e=_0x4cca2f;_0x226cc3=_0x4bd02e['splitSizeXlsx']||0x1388;}})['then'](function(){return dbH[_0xd819('0xf')][_0xd819('0x10')](util[_0xd819('0x11')](_0xd819('0x12'),QUERY),{'type':dbH[_0xd819('0xf')]['QueryTypes'][_0xd819('0x13')]});})['then'](function(_0x41e024){if(!_0x41e024[0x0][_0xd819('0x14')]){return analyticExtractedReport(_0xd819('0x15'));}var _0x22c15e=[];var _0x723b55=0x0;if(_0x4bd02e[_0xd819('0xd')]){if(_0x41e024&&_0x41e024['length']){var _0x44de81=_[_0xd819('0x16')](_0x41e024[0x0]['num']/_0x226cc3);var _0x2a794d=Number[_0xd819('0x17')](_0x41e024[0x0][_0xd819('0x14')]/_0x226cc3)?_0x41e024[0x0]['num']%_0x226cc3:0x0;_0x44de81['forEach'](function(_0x41181f){if(_0x41181f>0x0){_0x723b55+=_0x226cc3;}_0x22c15e[_0xd819('0x18')](dbH[_0xd819('0xf')][_0xd819('0x10')](util[_0xd819('0x11')](_0xd819('0x19'),QUERY,_0x226cc3,_0x723b55),{'type':dbH[_0xd819('0xf')][_0xd819('0x1a')][_0xd819('0x13')]}));});if(_0x2a794d>0x0){_0x723b55+=_0x226cc3;_0x22c15e[_0xd819('0x18')](dbH[_0xd819('0xf')][_0xd819('0x10')](util[_0xd819('0x11')](_0xd819('0x19'),QUERY,_0x2a794d,_0x723b55),{'type':dbH['sequelize']['QueryTypes'][_0xd819('0x13')]}));}}}else{_0x22c15e[_0xd819('0x18')](dbH[_0xd819('0xf')][_0xd819('0x10')](QUERY,{'type':dbH[_0xd819('0xf')][_0xd819('0x1a')]['SELECT']}));}var _0x3f10cc=path[_0xd819('0x1b')](PATH);var _0x210197=path['basename'](PATH,'.xlsx');var _0x23be28=_0x4bd02e[_0xd819('0xd')]&&_0x22c15e[_0xd819('0x1c')]>0x1;var _0x22aa47=[];if(!fs[_0xd819('0x1d')](path[_0xd819('0x1e')](_0x3f10cc,_0x210197))&&_0x23be28){fs[_0xd819('0x1f')](path[_0xd819('0x1e')](_0x3f10cc,_0x210197));}return BPromise[_0xd819('0x20')](_0x22c15e,function(_0x53d325){_0x22aa47[_0xd819('0x18')](_0x53d325);})[_0xd819('0x21')](function(){for(var _0x260ab8=0x0;_0x260ab8<_0x22aa47[_0xd819('0x1c')];_0x260ab8+=0x1){var _0x45be6c;var _0xa43665=_0x22aa47[_0x260ab8];if(_0x23be28){_0x45be6c=path[_0xd819('0x1e')](_0x3f10cc,_0x210197,util[_0xd819('0x11')](_0xd819('0x22'),_0x210197,_0x260ab8,'xlsx'));}else{_0x45be6c=path['join'](_0x3f10cc,util[_0xd819('0x11')](_0xd819('0x23'),_0x210197,'xlsx'));}fs[_0xd819('0x24')](_0x45be6c,json2xls(_0xa43665),_0xd819('0x25'));}})[_0xd819('0x21')](function(){if(_0x23be28){return new Promise(function(_0x400ca6){zipdir(path[_0xd819('0x1e')](_0x3f10cc,_0x210197),{'saveTo':path['join'](_0x3f10cc,util[_0xd819('0x11')](_0xd819('0x23'),_0x210197,'zip'))},function(_0xb5c069,_0x57ee94){rimraf(path[_0xd819('0x1e')](_0x3f10cc,_0x210197),function(){});_0x400ca6(_0xd819('0x26'));});});}})['then'](function(){logger[_0xd819('0x9')](util[_0xd819('0x11')](_0xd819('0x27'),EXTRACTED_REPORT_ID,_0xd819('0xa')));return analyticExtractedReport(_0xd819('0x28'),_0x23be28?util[_0xd819('0x11')](_0xd819('0x23'),_0x210197,_0x23be28?_0xd819('0x29'):_0xd819('0x2a')):null);});})['catch'](function(_0x46b1ee){logger['info'](util['format'](_0xd819('0x2b'),EXTRACTED_REPORT_ID,_0xd819('0xa')),util['inspect'](_0x46b1ee,{'showHidden':![],'depth':null}));EXIT_CODE=0x1;return analyticExtractedReport(_0xd819('0x2c'));})[_0xd819('0x2d')](function(){process[_0xd819('0x2e')](EXIT_CODE);});}main();
\ No newline at end of file
index dd992ff..5614c11 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9124=['context','ExecIf','CDR(prefix)=${EXTEN:0:','CDR(prefix)=noprefix','outboundrouteid=','hasOwnProperty','recordingFormat','_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','XCALLY-MOTION-ANSWER=0','XCALLY-MOTION-PROGRESS=0','MONITOR_OPTIONS=ab','length','toLowerCase','createdAt','updatedAt','interval','*,*,*,*','tag','CDR(tag)=','callerID','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):Set(CALLERID(all)=','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):NoOp(No\x20number\x20available)','answer','indexOf','app','appType','custom','XCALLY-MOTION-ANSWER=1','$[${XCALLY-MOTION-PROGRESS}=0]?Progress','XCALLY-MOTION-PROGRESS=1','splice',',${EXTEN},','last','concat','transaction','destroy','bulkCreate','catch','error','lodash','util','findAll','intervals','models','VoiceExtension','IntervalId','then','uniq','map','exten','CAST(priority\x20AS\x20UNSIGNED)','filter','groupBy','queue','playback','priority','extensions','extension','find','push','type','Set','format','CDR(type)=%s','inbound','CDR(routeid)=','VoiceExtensionId','outbound','CDR(destination)=','${EXTEN:','cutdigits','${EXTEN}'];(function(_0xae0c01,_0x449c99){var _0x913e86=function(_0x421e87){while(--_0x421e87){_0xae0c01['push'](_0xae0c01['shift']());}};_0x913e86(++_0x449c99);}(_0x9124,0x147));var _0x4912=function(_0x671374,_0x5bd0a3){_0x671374=_0x671374-0x0;var _0x59f903=_0x9124[_0x671374];return _0x59f903;};'use strict';var _=require(_0x4912('0x0'));var util=require(_0x4912('0x1'));function rewrite(_0x3c9136,_0x7c8c45){var _0x417c8e=this;return _0x3c9136['models']['Interval'][_0x4912('0x2')]({'raw':!![]})['then'](function(_0x1fdd21){_0x417c8e[_0x4912('0x3')]=_0x1fdd21;return _0x3c9136[_0x4912('0x4')][_0x4912('0x5')][_0x4912('0x2')]({'where':{'IntervalId':_0x7c8c45[_0x4912('0x6')]},'raw':!![]});})[_0x4912('0x7')](function(_0x799b0f){return _0x3c9136[_0x4912('0x4')][_0x4912('0x5')]['findAll']({'where':{'exten':{'$in':_[_0x4912('0x8')](_[_0x4912('0x9')](_0x799b0f,_0x4912('0xa')))}},'order':[{'raw':_0x4912('0xb')}],'raw':!![]});})['then'](function(_0x4d0741){var _0x86f32c=_[_0x4912('0xc')](_0x4d0741,{'priority':'1'});var _0x2df344=_['filter'](_0x4d0741,{'isApp':0x1});var _0x33ea26=_[_0x4912('0xd')](_0x2df344,_0x4912('0xa'));var _0xa11a1b=[_0x4912('0xe'),_0x4912('0xf')];var _0x4591c1=[];var _0x143c00=[];for(var _0x4818cf in _0x33ea26){if(_0x33ea26['hasOwnProperty'](_0x4818cf)){_0x417c8e[_0x4912('0x10')]=0x2;_0x417c8e[_0x4912('0x11')]=[];_0x417c8e[_0x4912('0x12')]=_[_0x4912('0x13')](_0x86f32c,{'exten':_0x33ea26[_0x4818cf][0x0][_0x4912('0xa')]});_0x417c8e['extensions'][_0x4912('0x14')]({'type':_0x33ea26[_0x4818cf][0x0][_0x4912('0x15')],'app':_0x4912('0x16'),'appdata':util[_0x4912('0x17')](_0x4912('0x18'),_0x33ea26[_0x4818cf][0x0][_0x4912('0x15')]),'context':_0x33ea26[_0x4818cf][0x0]['context'],'exten':_0x33ea26[_0x4818cf][0x0][_0x4912('0xa')],'priority':_0x417c8e[_0x4912('0x10')]++,'VoiceExtensionId':_0x33ea26[_0x4818cf][0x0]['VoiceExtensionId']});if(_0x33ea26[_0x4818cf][0x0]['type']===_0x4912('0x19')){_0x417c8e[_0x4912('0x11')][_0x4912('0x14')]({'type':_0x33ea26[_0x4818cf][0x0]['type'],'app':'Set','appdata':_0x4912('0x1a')+_0x33ea26[_0x4818cf][0x0][_0x4912('0x1b')],'context':_0x33ea26[_0x4818cf][0x0]['context'],'exten':_0x33ea26[_0x4818cf][0x0][_0x4912('0xa')],'priority':_0x417c8e[_0x4912('0x10')]++,'VoiceExtensionId':_0x33ea26[_0x4818cf][0x0][_0x4912('0x1b')]});}else if(_0x33ea26[_0x4818cf][0x0][_0x4912('0x15')]===_0x4912('0x1c')){if(_0x417c8e['extension']){_0x417c8e[_0x4912('0x11')][_0x4912('0x14')]({'type':_0x33ea26[_0x4818cf][0x0][_0x4912('0x15')],'app':_0x4912('0x16'),'appdata':_0x4912('0x1d')+(_0x417c8e['extension']['cutdigits']?_0x4912('0x1e')+_0x417c8e[_0x4912('0x12')][_0x4912('0x1f')]+'}':_0x4912('0x20')),'context':_0x33ea26[_0x4818cf][0x0][_0x4912('0x21')],'exten':_0x33ea26[_0x4818cf][0x0][_0x4912('0xa')],'priority':_0x417c8e['priority']++,'VoiceExtensionId':_0x33ea26[_0x4818cf][0x0][_0x4912('0x1b')]});}_0x417c8e[_0x4912('0x11')][_0x4912('0x14')]({'type':_0x33ea26[_0x4818cf][0x0][_0x4912('0x15')],'app':'Set','appdata':_0x4912('0x1a')+_0x33ea26[_0x4818cf][0x0][_0x4912('0x1b')],'context':_0x33ea26[_0x4818cf][0x0][_0x4912('0x21')],'exten':_0x33ea26[_0x4818cf][0x0]['exten'],'priority':_0x417c8e[_0x4912('0x10')]++,'VoiceExtensionId':_0x33ea26[_0x4818cf][0x0]['VoiceExtensionId']});var _0x754ca5=_0x417c8e[_0x4912('0x10')]++;_0x417c8e[_0x4912('0x11')][_0x4912('0x14')]({'type':_0x33ea26[_0x4818cf][0x0][_0x4912('0x15')],'app':_0x4912('0x22'),'appdata':'$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto('+(_0x754ca5+0x2)+'):Goto('+(_0x754ca5+0x1)+')','context':_0x33ea26[_0x4818cf][0x0]['context'],'exten':_0x33ea26[_0x4818cf][0x0]['exten'],'priority':_0x754ca5,'VoiceExtensionId':_0x33ea26[_0x4818cf][0x0][_0x4912('0x1b')]});if(_0x417c8e[_0x4912('0x12')]){_0x417c8e[_0x4912('0x11')]['push']({'type':_0x33ea26[_0x4818cf][0x0]['type'],'app':_0x4912('0x16'),'appdata':_0x417c8e[_0x4912('0x12')][_0x4912('0x1f')]?_0x4912('0x23')+_0x417c8e[_0x4912('0x12')][_0x4912('0x1f')]+'}':_0x4912('0x24'),'context':_0x33ea26[_0x4818cf][0x0]['context'],'exten':_0x33ea26[_0x4818cf][0x0][_0x4912('0xa')],'priority':_0x417c8e[_0x4912('0x10')]++,'VoiceExtensionId':_0x33ea26[_0x4818cf][0x0][_0x4912('0x1b')]});}_0x417c8e[_0x4912('0x11')][_0x4912('0x14')]({'type':_0x33ea26[_0x4818cf][0x0]['type'],'app':_0x4912('0x16'),'appdata':_0x4912('0x25')+_0x33ea26[_0x4818cf][0x0][_0x4912('0x1b')],'context':_0x33ea26[_0x4818cf][0x0]['context'],'exten':_0x33ea26[_0x4818cf][0x0][_0x4912('0xa')],'priority':_0x417c8e['priority']++,'VoiceExtensionId':_0x33ea26[_0x4818cf][0x0]['VoiceExtensionId']});if(_0x417c8e[_0x4912('0x12')]&&_0x417c8e['extension'][_0x4912('0x26')](_0x4912('0x27'))&&_0x417c8e['extension'][_0x4912('0x27')]!=='none'){_0x417c8e[_0x4912('0x11')][_0x4912('0x14')]({'type':_0x33ea26[_0x4818cf][0x0][_0x4912('0x15')],'app':'Set','appdata':_0x4912('0x28'),'context':_0x33ea26[_0x4818cf][0x0][_0x4912('0x21')],'exten':_0x33ea26[_0x4818cf][0x0]['exten'],'priority':_0x417c8e['priority']++,'VoiceExtensionId':_0x33ea26[_0x4818cf][0x0][_0x4912('0x1b')]});_0x417c8e[_0x4912('0x11')][_0x4912('0x14')]({'type':_0x33ea26[_0x4818cf][0x0][_0x4912('0x15')],'app':_0x4912('0x16'),'appdata':'_XCALLY_MIXMONITOR_FORMAT='+_0x417c8e[_0x4912('0x12')][_0x4912('0x27')]||'wav','context':_0x33ea26[_0x4818cf][0x0]['context'],'exten':_0x33ea26[_0x4818cf][0x0][_0x4912('0xa')],'priority':_0x417c8e[_0x4912('0x10')]++,'VoiceExtensionId':_0x33ea26[_0x4818cf][0x0]['VoiceExtensionId']});}}_0x417c8e[_0x4912('0x11')][_0x4912('0x14')]({'type':_0x33ea26[_0x4818cf][0x0][_0x4912('0x15')],'app':_0x4912('0x16'),'appdata':_0x4912('0x29'),'context':_0x33ea26[_0x4818cf][0x0][_0x4912('0x21')],'exten':_0x33ea26[_0x4818cf][0x0]['exten'],'priority':_0x417c8e['priority']++,'VoiceExtensionId':_0x33ea26[_0x4818cf][0x0][_0x4912('0x1b')]});_0x417c8e[_0x4912('0x11')][_0x4912('0x14')]({'type':_0x33ea26[_0x4818cf][0x0]['type'],'app':_0x4912('0x16'),'appdata':_0x4912('0x2a'),'context':_0x33ea26[_0x4818cf][0x0][_0x4912('0x21')],'exten':_0x33ea26[_0x4818cf][0x0]['exten'],'priority':_0x417c8e[_0x4912('0x10')]++,'VoiceExtensionId':_0x33ea26[_0x4818cf][0x0][_0x4912('0x1b')]});_0x417c8e[_0x4912('0x11')][_0x4912('0x14')]({'type':_0x33ea26[_0x4818cf][0x0][_0x4912('0x15')],'app':'Set','appdata':_0x4912('0x2b'),'context':_0x33ea26[_0x4818cf][0x0][_0x4912('0x21')],'exten':_0x33ea26[_0x4818cf][0x0][_0x4912('0xa')],'priority':_0x417c8e[_0x4912('0x10')]++,'VoiceExtensionId':_0x33ea26[_0x4818cf][0x0][_0x4912('0x1b')]});for(var _0x22986f=0x0,_0x166027=0x0;_0x22986f<_0x33ea26[_0x4818cf][_0x4912('0x2c')];_0x22986f+=0x1,_0x166027=0x0){var _0x51caf7=_0x33ea26[_0x4818cf][_0x22986f];if(_0x51caf7[_0x4912('0x15')]){_0x51caf7[_0x4912('0x15')]=_0x51caf7[_0x4912('0x15')][_0x4912('0x2d')]();}var _0x48c91c=[];var _0x333b30=[];delete _0x51caf7['id'];delete _0x51caf7[_0x4912('0x2e')];delete _0x51caf7[_0x4912('0x2f')];var _0xe5ea82=_0x51caf7[_0x4912('0x30')]!==_0x4912('0x31')?[_0x51caf7[_0x4912('0x30')]]:_0x51caf7[_0x4912('0x6')]?_[_0x4912('0x9')](_[_0x4912('0xc')](_0x417c8e['intervals'],{'IntervalId':_0x51caf7[_0x4912('0x6')]}),'interval'):[];if(_0x51caf7[_0x4912('0x26')](_0x4912('0x32'))){if(_0x51caf7['tag']&&_0x51caf7['tag']!=='--'){_0x48c91c[_0x4912('0x14')]({'type':_0x51caf7[_0x4912('0x15')],'app':_0x4912('0x16'),'appdata':_0x4912('0x33')+_0x51caf7[_0x4912('0x32')],'context':_0x51caf7['context'],'exten':_0x51caf7['exten'],'priority':_0xe5ea82[_0x4912('0x2c')]+_0x417c8e['priority']+_0x166027++,'VoiceExtensionId':_0x51caf7[_0x4912('0x1b')]});}}if(_0x51caf7[_0x4912('0x15')]===_0x4912('0x1c')&&_0x51caf7[_0x4912('0x26')](_0x4912('0x34'))){if(_0x51caf7[_0x4912('0x34')]){_0x48c91c[_0x4912('0x14')]({'type':_0x51caf7[_0x4912('0x15')],'app':_0x4912('0x22'),'appdata':_0x4912('0x35')+_0x51caf7[_0x4912('0x34')]+')','context':_0x51caf7[_0x4912('0x21')],'exten':_0x51caf7[_0x4912('0xa')],'priority':_0xe5ea82['length']+_0x417c8e[_0x4912('0x10')]+_0x166027++,'VoiceExtensionId':_0x51caf7[_0x4912('0x1b')]});}else{_0x48c91c[_0x4912('0x14')]({'type':_0x51caf7[_0x4912('0x15')],'app':_0x4912('0x22'),'appdata':_0x4912('0x36'),'context':_0x51caf7[_0x4912('0x21')],'exten':_0x51caf7[_0x4912('0xa')],'priority':_0xe5ea82[_0x4912('0x2c')]+_0x417c8e[_0x4912('0x10')]+_0x166027++,'VoiceExtensionId':_0x51caf7[_0x4912('0x1b')]});}}if(_0x51caf7[_0x4912('0x26')](_0x4912('0x37'))){if(_0xa11a1b[_0x4912('0x38')](_0x51caf7[_0x4912('0x39')][_0x4912('0x2d')]())>=0x0&&_0x51caf7[_0x4912('0x3a')]!==_0x4912('0x3b')){if(_0x51caf7['answer']){_0x48c91c[_0x4912('0x14')]({'type':_0x51caf7['type'],'app':'ExecIf','appdata':'$[${XCALLY-MOTION-ANSWER}=0]?Answer','context':_0x51caf7[_0x4912('0x21')],'exten':_0x51caf7[_0x4912('0xa')],'priority':_0xe5ea82[_0x4912('0x2c')]+_0x417c8e[_0x4912('0x10')]+_0x166027++,'VoiceExtensionId':_0x51caf7[_0x4912('0x1b')]});_0x48c91c[_0x4912('0x14')]({'type':_0x51caf7[_0x4912('0x15')],'app':'Set','appdata':_0x4912('0x3c'),'context':_0x51caf7[_0x4912('0x21')],'exten':_0x51caf7[_0x4912('0xa')],'priority':_0xe5ea82['length']+_0x417c8e[_0x4912('0x10')]+_0x166027++,'VoiceExtensionId':_0x51caf7[_0x4912('0x1b')]});}else{_0x48c91c[_0x4912('0x14')]({'type':_0x51caf7[_0x4912('0x15')],'app':'ExecIf','appdata':_0x4912('0x3d'),'context':_0x51caf7[_0x4912('0x21')],'exten':_0x51caf7['exten'],'priority':_0xe5ea82[_0x4912('0x2c')]+_0x417c8e[_0x4912('0x10')]+_0x166027++,'VoiceExtensionId':_0x51caf7[_0x4912('0x1b')]});_0x48c91c[_0x4912('0x14')]({'type':_0x51caf7[_0x4912('0x15')],'app':'Set','appdata':_0x4912('0x3e'),'context':_0x51caf7['context'],'exten':_0x51caf7[_0x4912('0xa')],'priority':_0xe5ea82[_0x4912('0x2c')]+_0x417c8e['priority']+_0x166027++,'VoiceExtensionId':_0x51caf7[_0x4912('0x1b')]});}}}for(var _0x3b0dfd=0x0;_0x3b0dfd<_0xe5ea82['length'];_0x3b0dfd+=0x1){var _0x3f8f57=_0x417c8e[_0x4912('0x10')]+_0xe5ea82[_0x4912('0x2c')];var _0x524a3d=_0x3b0dfd===_0xe5ea82['length']-0x1?_0x417c8e[_0x4912('0x10')]+_0x48c91c[_0x4912('0x2c')]+_0x333b30[_0x4912('0x2c')]+0x2:_0x417c8e[_0x4912('0x10')]+_0x3b0dfd+0x1;_0x48c91c[_0x4912('0x3f')](_0x3b0dfd,0x0,{'type':_0x51caf7['type'],'app':'GotoIfTime','appdata':_0xe5ea82[_0x3b0dfd]+'?'+_0x51caf7['context']+',${EXTEN},'+_0x3f8f57+':'+_0x51caf7[_0x4912('0x21')]+_0x4912('0x40')+_0x524a3d,'exten':_0x51caf7[_0x4912('0xa')],'context':_0x51caf7[_0x4912('0x21')],'priority':_0x417c8e[_0x4912('0x10')]+_0x3b0dfd,'VoiceExtensionId':_0x33ea26[_0x4818cf][0x0][_0x4912('0x1b')]});}_0x51caf7[_0x4912('0x10')]=_0x48c91c[_0x4912('0x2c')]?_[_0x4912('0x41')](_0x48c91c)[_0x4912('0x10')]+0x1:_0x417c8e[_0x4912('0x10')];_0x417c8e[_0x4912('0x10')]=(_0x333b30[_0x4912('0x2c')]?_[_0x4912('0x41')](_0x333b30)[_0x4912('0x10')]:_0x51caf7[_0x4912('0x10')])+0x1;_0x417c8e['extensions']=_[_0x4912('0x42')](_0x417c8e[_0x4912('0x11')],_0x48c91c,[_0x51caf7],_0x333b30);}_0x417c8e[_0x4912('0x11')]['push']({'type':_0x33ea26[_0x4818cf][0x0][_0x4912('0x15')],'app':'Hangup','exten':_0x33ea26[_0x4818cf][0x0][_0x4912('0xa')],'context':_0x33ea26[_0x4818cf][0x0]['context'],'priority':_0x417c8e['priority'],'VoiceExtensionId':_0x33ea26[_0x4818cf][0x0]['VoiceExtensionId']});_0x4591c1[_0x4912('0x14')](_0x33ea26[_0x4818cf][0x0][_0x4912('0x1b')]);_0x143c00=_[_0x4912('0x42')](_0x143c00,_0x417c8e[_0x4912('0x11')]);}}return _0x3c9136[_0x4912('0x43')](function(_0x523805){return _0x3c9136['models']['VoiceExtension'][_0x4912('0x44')]({'where':{'VoiceExtensionId':{'$in':_0x4591c1}},'transaction':_0x523805})[_0x4912('0x7')](function(_0x15f61a){return _0x3c9136['models']['VoiceExtension'][_0x4912('0x45')](_['sortBy'](_0x143c00,_0x4912('0x10')),{'transaction':_0x523805});});});})[_0x4912('0x46')](function(_0x278bca){console[_0x4912('0x47')](_0x278bca);});}exports['rewrite']=rewrite;
\ No newline at end of file
+var _0xf2fb=['CDR(tag)=','callerID','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):Set(CALLERID(all)=','$[${LEN(${PREFIX-CALLERIDALL})}\x20>\x200]?Set(CALLERID(all)=${PREFIX-CALLERIDALL}):NoOp(No\x20number\x20available)','answer','indexOf','toLowerCase','appType','custom','$[${XCALLY-MOTION-ANSWER}=0]?Answer','XCALLY-MOTION-PROGRESS=1','splice',',${EXTEN},','last','concat','Hangup','transaction','catch','rewrite','lodash','util','models','Interval','findAll','intervals','VoiceExtension','IntervalId','then','CAST(priority\x20AS\x20UNSIGNED)','filter','groupBy','queue','priority','extensions','extension','find','exten','push','type','Set','CDR(type)=%s','VoiceExtensionId','inbound','CDR(routeid)=','context','outbound','CDR(destination)=','cutdigits','${EXTEN}','ExecIf','$[${LEN(${CDR(prefix)})}\x20>\x200]?Goto(','):Goto(','CDR(prefix)=${EXTEN:0:','CDR(prefix)=noprefix','hasOwnProperty','recordingFormat','none','XCALLY-MOTION-ANSWER=0','XCALLY-MOTION-PROGRESS=0','MONITOR_OPTIONS=ab','length','createdAt','updatedAt','*,*,*,*','tag'];(function(_0x71bace,_0x321bb0){var _0x56b146=function(_0xaee7d0){while(--_0xaee7d0){_0x71bace['push'](_0x71bace['shift']());}};_0x56b146(++_0x321bb0);}(_0xf2fb,0x95));var _0xbf2f=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xf2fb[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0xbf2f('0x0'));var util=require(_0xbf2f('0x1'));function rewrite(_0x12a10b,_0x396ffb){var _0x5a62bb=this;return _0x12a10b[_0xbf2f('0x2')][_0xbf2f('0x3')][_0xbf2f('0x4')]({'raw':!![]})['then'](function(_0x582ce6){_0x5a62bb[_0xbf2f('0x5')]=_0x582ce6;return _0x12a10b['models'][_0xbf2f('0x6')][_0xbf2f('0x4')]({'where':{'IntervalId':_0x396ffb[_0xbf2f('0x7')]},'raw':!![]});})[_0xbf2f('0x8')](function(_0x5cda3f){return _0x12a10b[_0xbf2f('0x2')][_0xbf2f('0x6')][_0xbf2f('0x4')]({'where':{'exten':{'$in':_['uniq'](_['map'](_0x5cda3f,'exten'))}},'order':[{'raw':_0xbf2f('0x9')}],'raw':!![]});})[_0xbf2f('0x8')](function(_0x7b9f8d){var _0xdae72d=_['filter'](_0x7b9f8d,{'priority':'1'});var _0x52460b=_[_0xbf2f('0xa')](_0x7b9f8d,{'isApp':0x1});var _0x3fa540=_[_0xbf2f('0xb')](_0x52460b,'exten');var _0x21533a=[_0xbf2f('0xc'),'playback'];var _0xb4be29=[];var _0x30e134=[];for(var _0x5a988b in _0x3fa540){if(_0x3fa540['hasOwnProperty'](_0x5a988b)){_0x5a62bb[_0xbf2f('0xd')]=0x2;_0x5a62bb[_0xbf2f('0xe')]=[];_0x5a62bb[_0xbf2f('0xf')]=_[_0xbf2f('0x10')](_0xdae72d,{'exten':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x11')]});_0x5a62bb[_0xbf2f('0xe')][_0xbf2f('0x12')]({'type':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x13')],'app':_0xbf2f('0x14'),'appdata':util['format'](_0xbf2f('0x15'),_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x13')]),'context':_0x3fa540[_0x5a988b][0x0]['context'],'exten':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x11')],'priority':_0x5a62bb['priority']++,'VoiceExtensionId':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x16')]});if(_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x13')]===_0xbf2f('0x17')){_0x5a62bb[_0xbf2f('0xe')][_0xbf2f('0x12')]({'type':_0x3fa540[_0x5a988b][0x0]['type'],'app':'Set','appdata':_0xbf2f('0x18')+_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x16')],'context':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x19')],'exten':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x11')],'priority':_0x5a62bb['priority']++,'VoiceExtensionId':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x16')]});}else if(_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x13')]===_0xbf2f('0x1a')){if(_0x5a62bb['extension']){_0x5a62bb[_0xbf2f('0xe')][_0xbf2f('0x12')]({'type':_0x3fa540[_0x5a988b][0x0]['type'],'app':_0xbf2f('0x14'),'appdata':_0xbf2f('0x1b')+(_0x5a62bb[_0xbf2f('0xf')][_0xbf2f('0x1c')]?'${EXTEN:'+_0x5a62bb[_0xbf2f('0xf')]['cutdigits']+'}':_0xbf2f('0x1d')),'context':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x19')],'exten':_0x3fa540[_0x5a988b][0x0]['exten'],'priority':_0x5a62bb[_0xbf2f('0xd')]++,'VoiceExtensionId':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x16')]});}_0x5a62bb[_0xbf2f('0xe')][_0xbf2f('0x12')]({'type':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x13')],'app':'Set','appdata':'CDR(routeid)='+_0x3fa540[_0x5a988b][0x0]['VoiceExtensionId'],'context':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x19')],'exten':_0x3fa540[_0x5a988b][0x0]['exten'],'priority':_0x5a62bb[_0xbf2f('0xd')]++,'VoiceExtensionId':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x16')]});var _0x229afb=_0x5a62bb[_0xbf2f('0xd')]++;_0x5a62bb[_0xbf2f('0xe')][_0xbf2f('0x12')]({'type':_0x3fa540[_0x5a988b][0x0]['type'],'app':_0xbf2f('0x1e'),'appdata':_0xbf2f('0x1f')+(_0x229afb+0x2)+_0xbf2f('0x20')+(_0x229afb+0x1)+')','context':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x19')],'exten':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x11')],'priority':_0x229afb,'VoiceExtensionId':_0x3fa540[_0x5a988b][0x0]['VoiceExtensionId']});if(_0x5a62bb[_0xbf2f('0xf')]){_0x5a62bb['extensions'][_0xbf2f('0x12')]({'type':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x13')],'app':_0xbf2f('0x14'),'appdata':_0x5a62bb['extension'][_0xbf2f('0x1c')]?_0xbf2f('0x21')+_0x5a62bb[_0xbf2f('0xf')][_0xbf2f('0x1c')]+'}':_0xbf2f('0x22'),'context':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x19')],'exten':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x11')],'priority':_0x5a62bb[_0xbf2f('0xd')]++,'VoiceExtensionId':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x16')]});}_0x5a62bb[_0xbf2f('0xe')][_0xbf2f('0x12')]({'type':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x13')],'app':'Set','appdata':'outboundrouteid='+_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x16')],'context':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x19')],'exten':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x11')],'priority':_0x5a62bb['priority']++,'VoiceExtensionId':_0x3fa540[_0x5a988b][0x0]['VoiceExtensionId']});if(_0x5a62bb['extension']&&_0x5a62bb[_0xbf2f('0xf')][_0xbf2f('0x23')](_0xbf2f('0x24'))&&_0x5a62bb[_0xbf2f('0xf')][_0xbf2f('0x24')]!==_0xbf2f('0x25')){_0x5a62bb[_0xbf2f('0xe')][_0xbf2f('0x12')]({'type':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x13')],'app':'Set','appdata':'_XCALLY_MIXMONITOR_UNIQUEID=${UNIQUEID}','context':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x19')],'exten':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x11')],'priority':_0x5a62bb['priority']++,'VoiceExtensionId':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x16')]});_0x5a62bb[_0xbf2f('0xe')]['push']({'type':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x13')],'app':_0xbf2f('0x14'),'appdata':'_XCALLY_MIXMONITOR_FORMAT='+_0x5a62bb[_0xbf2f('0xf')][_0xbf2f('0x24')]||'wav','context':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x19')],'exten':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x11')],'priority':_0x5a62bb[_0xbf2f('0xd')]++,'VoiceExtensionId':_0x3fa540[_0x5a988b][0x0]['VoiceExtensionId']});}}_0x5a62bb[_0xbf2f('0xe')][_0xbf2f('0x12')]({'type':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x13')],'app':'Set','appdata':_0xbf2f('0x26'),'context':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x19')],'exten':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x11')],'priority':_0x5a62bb[_0xbf2f('0xd')]++,'VoiceExtensionId':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x16')]});_0x5a62bb['extensions'][_0xbf2f('0x12')]({'type':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x13')],'app':_0xbf2f('0x14'),'appdata':_0xbf2f('0x27'),'context':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x19')],'exten':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x11')],'priority':_0x5a62bb[_0xbf2f('0xd')]++,'VoiceExtensionId':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x16')]});_0x5a62bb[_0xbf2f('0xe')][_0xbf2f('0x12')]({'type':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x13')],'app':_0xbf2f('0x14'),'appdata':_0xbf2f('0x28'),'context':_0x3fa540[_0x5a988b][0x0]['context'],'exten':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x11')],'priority':_0x5a62bb[_0xbf2f('0xd')]++,'VoiceExtensionId':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x16')]});for(var _0x4ad4d2=0x0,_0x392614=0x0;_0x4ad4d2<_0x3fa540[_0x5a988b][_0xbf2f('0x29')];_0x4ad4d2+=0x1,_0x392614=0x0){var _0x22a285=_0x3fa540[_0x5a988b][_0x4ad4d2];if(_0x22a285['type']){_0x22a285[_0xbf2f('0x13')]=_0x22a285['type']['toLowerCase']();}var _0x1b5913=[];var _0x18b270=[];delete _0x22a285['id'];delete _0x22a285[_0xbf2f('0x2a')];delete _0x22a285[_0xbf2f('0x2b')];var _0x10de1f=_0x22a285['interval']!==_0xbf2f('0x2c')?[_0x22a285['interval']]:_0x22a285[_0xbf2f('0x7')]?_['map'](_['filter'](_0x5a62bb[_0xbf2f('0x5')],{'IntervalId':_0x22a285[_0xbf2f('0x7')]}),'interval'):[];if(_0x22a285[_0xbf2f('0x23')](_0xbf2f('0x2d'))){if(_0x22a285['tag']&&_0x22a285[_0xbf2f('0x2d')]!=='--'){_0x1b5913[_0xbf2f('0x12')]({'type':_0x22a285['type'],'app':_0xbf2f('0x14'),'appdata':_0xbf2f('0x2e')+_0x22a285[_0xbf2f('0x2d')],'context':_0x22a285['context'],'exten':_0x22a285[_0xbf2f('0x11')],'priority':_0x10de1f[_0xbf2f('0x29')]+_0x5a62bb[_0xbf2f('0xd')]+_0x392614++,'VoiceExtensionId':_0x22a285['VoiceExtensionId']});}}if(_0x22a285[_0xbf2f('0x13')]===_0xbf2f('0x1a')&&_0x22a285['hasOwnProperty'](_0xbf2f('0x2f'))){if(_0x22a285[_0xbf2f('0x2f')]){_0x1b5913[_0xbf2f('0x12')]({'type':_0x22a285['type'],'app':_0xbf2f('0x1e'),'appdata':_0xbf2f('0x30')+_0x22a285[_0xbf2f('0x2f')]+')','context':_0x22a285[_0xbf2f('0x19')],'exten':_0x22a285['exten'],'priority':_0x10de1f[_0xbf2f('0x29')]+_0x5a62bb[_0xbf2f('0xd')]+_0x392614++,'VoiceExtensionId':_0x22a285['VoiceExtensionId']});}else{_0x1b5913['push']({'type':_0x22a285[_0xbf2f('0x13')],'app':_0xbf2f('0x1e'),'appdata':_0xbf2f('0x31'),'context':_0x22a285[_0xbf2f('0x19')],'exten':_0x22a285[_0xbf2f('0x11')],'priority':_0x10de1f[_0xbf2f('0x29')]+_0x5a62bb[_0xbf2f('0xd')]+_0x392614++,'VoiceExtensionId':_0x22a285['VoiceExtensionId']});}}if(_0x22a285[_0xbf2f('0x23')](_0xbf2f('0x32'))){if(_0x21533a[_0xbf2f('0x33')](_0x22a285['app'][_0xbf2f('0x34')]())>=0x0&&_0x22a285[_0xbf2f('0x35')]!==_0xbf2f('0x36')){if(_0x22a285[_0xbf2f('0x32')]){_0x1b5913['push']({'type':_0x22a285[_0xbf2f('0x13')],'app':_0xbf2f('0x1e'),'appdata':_0xbf2f('0x37'),'context':_0x22a285[_0xbf2f('0x19')],'exten':_0x22a285[_0xbf2f('0x11')],'priority':_0x10de1f[_0xbf2f('0x29')]+_0x5a62bb[_0xbf2f('0xd')]+_0x392614++,'VoiceExtensionId':_0x22a285['VoiceExtensionId']});_0x1b5913[_0xbf2f('0x12')]({'type':_0x22a285[_0xbf2f('0x13')],'app':_0xbf2f('0x14'),'appdata':'XCALLY-MOTION-ANSWER=1','context':_0x22a285[_0xbf2f('0x19')],'exten':_0x22a285[_0xbf2f('0x11')],'priority':_0x10de1f['length']+_0x5a62bb[_0xbf2f('0xd')]+_0x392614++,'VoiceExtensionId':_0x22a285['VoiceExtensionId']});}else{_0x1b5913[_0xbf2f('0x12')]({'type':_0x22a285[_0xbf2f('0x13')],'app':'ExecIf','appdata':'$[${XCALLY-MOTION-PROGRESS}=0]?Progress','context':_0x22a285['context'],'exten':_0x22a285[_0xbf2f('0x11')],'priority':_0x10de1f['length']+_0x5a62bb[_0xbf2f('0xd')]+_0x392614++,'VoiceExtensionId':_0x22a285['VoiceExtensionId']});_0x1b5913[_0xbf2f('0x12')]({'type':_0x22a285[_0xbf2f('0x13')],'app':_0xbf2f('0x14'),'appdata':_0xbf2f('0x38'),'context':_0x22a285['context'],'exten':_0x22a285[_0xbf2f('0x11')],'priority':_0x10de1f[_0xbf2f('0x29')]+_0x5a62bb[_0xbf2f('0xd')]+_0x392614++,'VoiceExtensionId':_0x22a285[_0xbf2f('0x16')]});}}}for(var _0x807a6f=0x0;_0x807a6f<_0x10de1f[_0xbf2f('0x29')];_0x807a6f+=0x1){var _0x4024dd=_0x5a62bb[_0xbf2f('0xd')]+_0x10de1f[_0xbf2f('0x29')];var _0x3ccc50=_0x807a6f===_0x10de1f[_0xbf2f('0x29')]-0x1?_0x5a62bb[_0xbf2f('0xd')]+_0x1b5913['length']+_0x18b270[_0xbf2f('0x29')]+0x2:_0x5a62bb[_0xbf2f('0xd')]+_0x807a6f+0x1;_0x1b5913[_0xbf2f('0x39')](_0x807a6f,0x0,{'type':_0x22a285[_0xbf2f('0x13')],'app':'GotoIfTime','appdata':_0x10de1f[_0x807a6f]+'?'+_0x22a285[_0xbf2f('0x19')]+_0xbf2f('0x3a')+_0x4024dd+':'+_0x22a285['context']+_0xbf2f('0x3a')+_0x3ccc50,'exten':_0x22a285[_0xbf2f('0x11')],'context':_0x22a285[_0xbf2f('0x19')],'priority':_0x5a62bb['priority']+_0x807a6f,'VoiceExtensionId':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x16')]});}_0x22a285[_0xbf2f('0xd')]=_0x1b5913['length']?_['last'](_0x1b5913)[_0xbf2f('0xd')]+0x1:_0x5a62bb['priority'];_0x5a62bb[_0xbf2f('0xd')]=(_0x18b270['length']?_[_0xbf2f('0x3b')](_0x18b270)[_0xbf2f('0xd')]:_0x22a285['priority'])+0x1;_0x5a62bb['extensions']=_[_0xbf2f('0x3c')](_0x5a62bb[_0xbf2f('0xe')],_0x1b5913,[_0x22a285],_0x18b270);}_0x5a62bb['extensions'][_0xbf2f('0x12')]({'type':_0x3fa540[_0x5a988b][0x0]['type'],'app':_0xbf2f('0x3d'),'exten':_0x3fa540[_0x5a988b][0x0]['exten'],'context':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x19')],'priority':_0x5a62bb[_0xbf2f('0xd')],'VoiceExtensionId':_0x3fa540[_0x5a988b][0x0][_0xbf2f('0x16')]});_0xb4be29[_0xbf2f('0x12')](_0x3fa540[_0x5a988b][0x0]['VoiceExtensionId']);_0x30e134=_[_0xbf2f('0x3c')](_0x30e134,_0x5a62bb[_0xbf2f('0xe')]);}}return _0x12a10b[_0xbf2f('0x3e')](function(_0x3b515a){return _0x12a10b[_0xbf2f('0x2')][_0xbf2f('0x6')]['destroy']({'where':{'VoiceExtensionId':{'$in':_0xb4be29}},'transaction':_0x3b515a})[_0xbf2f('0x8')](function(_0x5992b2){return _0x12a10b[_0xbf2f('0x2')][_0xbf2f('0x6')]['bulkCreate'](_['sortBy'](_0x30e134,_0xbf2f('0xd')),{'transaction':_0x3b515a});});});})[_0xbf2f('0x3f')](function(_0x5973e){console['error'](_0x5973e);});}exports[_0xbf2f('0x40')]=rewrite;
\ No newline at end of file
index 9deee0d..e953843 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5d5a=['str','cm_hopper_black','deletedAt\x20IS\x20NULL','VoiceQueue','findAll','outbound','CmList','Lists','dialCheckDuplicateType','always','sequelize','query','VoiceQueueId','onlyIfOpen','all','get','Campaign','CampaignId','BlackLists','Error\x20processing\x20rows\x20block:','finally','emit','contact:csv_','resolve','unlinkSync','Unable\x20to\x20delete\x20temp\x20file:','exit','SIGINT','CSV\x20import\x20process\x20stopped!','CmContact','createReadStream','parse','info','CSV\x20parsed\x20correctly!','bluebird','util','lodash','squel','papaparse','../../../mysqldb','../../../config/environment','api','redis','localhost','socket.io-emitter','register','argv','undefined','null','Missing\x20binding\x20parameters!','zipObject','split','Missing\x20ListId\x20parameter!','Missing\x20socket_timestamp\x20parameter!','error','contact','index','isNil','The\x20row\x20is\x20empty\x20or\x20the\x20number\x20of\x20parameters\x20does\x20not\x20match\x20the\x20columns!','errors','length','map','message','join','data','firstName','firstName\x20not\x20specified!','phone\x20not\x20specified!','birthDate','YYYY-MM-DD','isValid','email','email\x20format\x20is\x20not\x20valid!','CompanyId','find','duplicate','Duplicate\x20Contact','keys','then','push','catch','Error\x20while\x20creating\x20contact:\x20','stringify','cmContact','into','cm_hopper','phone','scheduledAt','ContactId','ListId','createdAt','updatedAt','select','field','NOW()','toString','cm_contacts','where','ListId\x20=\x20?','from','\x20=\x20?','insert','fromQuery','id\x20IN\x20?','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','calleridnum'];(function(_0x3b0b34,_0xe6a14f){var _0x5f5496=function(_0x24fda6){while(--_0x24fda6){_0x3b0b34['push'](_0x3b0b34['shift']());}};_0x5f5496(++_0xe6a14f);}(_0x5d5a,0x1ce));var _0xa5d5=function(_0x5d06fd,_0x12cd6f){_0x5d06fd=_0x5d06fd-0x0;var _0x1b4374=_0x5d5a[_0x5d06fd];return _0x1b4374;};'use strict';var BPromise=require(_0xa5d5('0x0'));var util=require(_0xa5d5('0x1'));var _=require(_0xa5d5('0x2'));var fs=require('fs');var squel=require(_0xa5d5('0x3'));var Papa=require(_0xa5d5('0x4'));var Redis=require('ioredis');var db=require(_0xa5d5('0x5'))['db'];var config=require(_0xa5d5('0x6'));var logger=require('../../../config/logger')(_0xa5d5('0x7'));config[_0xa5d5('0x8')]=_['defaults'](config[_0xa5d5('0x8')],{'host':_0xa5d5('0x9'),'port':0x18eb});var socket=require(_0xa5d5('0xa'))(new Redis(config[_0xa5d5('0x8')]));require('../../../api/cmContact/cmContact.socket')[_0xa5d5('0xb')](socket);try{if(!process[_0xa5d5('0xc')][0x2]||process['argv'][0x2]===_0xa5d5('0xd')||process[_0xa5d5('0xc')][0x2]===_0xa5d5('0xe')){throw new Error('Missing\x20filepath\x20parameter!');}var FILEPATH=process['argv'][0x2];if(!process[_0xa5d5('0xc')][0x3]||process[_0xa5d5('0xc')][0x3]===_0xa5d5('0xd')||process[_0xa5d5('0xc')][0x3]===_0xa5d5('0xe')||!process[_0xa5d5('0xc')][0x4]||process['argv'][0x4]===_0xa5d5('0xd')||process[_0xa5d5('0xc')][0x4]===_0xa5d5('0xe')){throw new Error(_0xa5d5('0xf'));}var FIELDS=_[_0xa5d5('0x10')](process[_0xa5d5('0xc')][0x3][_0xa5d5('0x11')](','),process['argv'][0x4][_0xa5d5('0x11')](','));if(!process[_0xa5d5('0xc')][0x5]||process['argv'][0x5]===_0xa5d5('0xd')||process[_0xa5d5('0xc')][0x5]===_0xa5d5('0xe')){throw new Error(_0xa5d5('0x12'));}var LISTID=process[_0xa5d5('0xc')][0x5];var COMPANYID=process[_0xa5d5('0xc')][0x6]&&process[_0xa5d5('0xc')][0x6]!==_0xa5d5('0xd')&&process[_0xa5d5('0xc')][0x6]!==_0xa5d5('0xe')?process['argv'][0x6]:null;var DUPLICATES=process[_0xa5d5('0xc')][0x7]&&process[_0xa5d5('0xc')][0x7]!==_0xa5d5('0xd')&&process[_0xa5d5('0xc')][0x7]!==_0xa5d5('0xe')?process['argv'][0x7]:null;if(!process[_0xa5d5('0xc')][0x8]||process[_0xa5d5('0xc')][0x8]===_0xa5d5('0xd')||process[_0xa5d5('0xc')][0x8]==='null'){throw new Error(_0xa5d5('0x13'));}var SOCKET_TIMESTAMP=process[_0xa5d5('0xc')][0x8];}catch(_0x4b2d1d){logger[_0xa5d5('0x14')](_0x4b2d1d);endCsv();}var total=0x0;var pTotal=0x0;var success=0x0;var errors=0x0;var duplicates=0x0;var rows=[];var hopperContacts='';var promises=[];var index=0x0;var alreadyInvalid=![];function handleCheckRowError(_0x5ada3a,_0x3fc198,_0x1d3a78,_0x175269){var _0xfbf886={'message':_0x3fc198};_0xfbf886[_0x5ada3a]=!![];if(_0x1d3a78){_0xfbf886[_0xa5d5('0x15')]=_0x1d3a78;}if(_0x175269){_0xfbf886[_0xa5d5('0x16')]=_0x175269;}return _0xfbf886;}function isEmail(_0x318601){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/['test'](_0x318601);}function checkRow(_0x138067,_0x2774e8,_0x1ee54e){return new BPromise(function(_0x232f86,_0x1166b4){if(_[_0xa5d5('0x17')](_0x138067)){return _0x1166b4(handleCheckRowError(_0xa5d5('0x14'),_0xa5d5('0x18'),null,_0x1ee54e));}if(_0x138067[_0xa5d5('0x19')]&&_0x138067[_0xa5d5('0x19')][_0xa5d5('0x1a')]){var _0x50059f=_[_0xa5d5('0x1b')](_0x138067[_0xa5d5('0x19')],_0xa5d5('0x1c'))[_0xa5d5('0x1d')](';');return _0x1166b4(handleCheckRowError(_0xa5d5('0x14'),_0x50059f,null,_0x1ee54e));}var _0x834cb8={};for(var _0x4769ce in FIELDS){if(FIELDS['hasOwnProperty'](_0x4769ce)&&FIELDS[_0x4769ce]){_0x834cb8[_0x4769ce]=_0x138067['data'][0x0][FIELDS[_0x4769ce]]||_0x138067[_0xa5d5('0x1e')][0x0]['\ufeff'+FIELDS[_0x4769ce]];}}if(!_0x834cb8[_0xa5d5('0x1f')]){return _0x1166b4(handleCheckRowError('error',_0xa5d5('0x20'),null,_0x1ee54e));}if(!_0x834cb8['phone']){return _0x1166b4(handleCheckRowError(_0xa5d5('0x14'),_0xa5d5('0x21'),null,_0x1ee54e));}if(_0x834cb8[_0xa5d5('0x22')]){var _0xe4628f=moment(_0x834cb8[_0xa5d5('0x22')],_0xa5d5('0x23'));if(!_0xe4628f[_0xa5d5('0x24')]()){return _0x1166b4(handleCheckRowError(_0xa5d5('0x14'),'birthDate\x20format\x20is\x20invalid,\x20YYYY-MM-DD\x20format\x20is\x20supported!',null,_0x1ee54e));}}if(_0x834cb8[_0xa5d5('0x25')]){if(!isEmail(_0x834cb8[_0xa5d5('0x25')])){return _0x1166b4(handleCheckRowError(_0xa5d5('0x14'),_0xa5d5('0x26'),null,_0x1ee54e));}}_0x834cb8['ListId']=LISTID;_0x834cb8[_0xa5d5('0x27')]=COMPANYID||undefined;if(DUPLICATES&&DUPLICATES[_0xa5d5('0x1a')]&&_0x2774e8){var _0x359a41={};for(var _0x51ab12=0x0,_0x2c06e1=DUPLICATES[_0xa5d5('0x1a')];_0x51ab12<_0x2c06e1;_0x51ab12+=0x1){_0x359a41[DUPLICATES[_0x51ab12]]=_0x834cb8[DUPLICATES[_0x51ab12]];}var _0xe2db45=_[_0xa5d5('0x28')](_0x2774e8,_0x359a41);if(_0xe2db45){return _0x1166b4(handleCheckRowError(_0xa5d5('0x29'),_0xa5d5('0x2a'),_0xe2db45,_0x1ee54e));}}return db['CmContact']['create'](_0x834cb8,{'raw':!![],'hooks':![],'fields':_[_0xa5d5('0x2b')](_0x834cb8)})[_0xa5d5('0x2c')](function(_0x45fc98){if(DUPLICATES&&DUPLICATES[_0xa5d5('0x1a')]&&_0x2774e8){_0x2774e8[_0xa5d5('0x2d')](_['pick'](_0x834cb8,DUPLICATES));}hopperContacts+=(hopperContacts?',':'')+_0x45fc98['id'];return _0x232f86();})[_0xa5d5('0x2e')](function(_0x5abe92){return _0x1166b4(handleCheckRowError(_0xa5d5('0x14'),_0xa5d5('0x2f')+(_0x5abe92[_0xa5d5('0x1c')]||JSON[_0xa5d5('0x30')](_0x5abe92)),null,_0x1ee54e));});});}function checkHopper(){function _0x5d9136(){return function(_0x2e5d51){logger[_0xa5d5('0x14')](_0xa5d5('0x31'),'checkHopper',util['inspect'](_0x2e5d51,{'showHidden':![],'depth':null}));};}var _0x50ad06=function(_0xaceb71,_0x28042f){var _0x2601d3=squel['insert']()[_0xa5d5('0x32')](_0xa5d5('0x33'))['fromQuery']([_0xa5d5('0x34'),_0xa5d5('0x35'),_0xa5d5('0x36'),_0xa5d5('0x37'),_0x28042f,_0xa5d5('0x38'),_0xa5d5('0x39')],squel[_0xa5d5('0x3a')]()[_0xa5d5('0x3b')](_0xa5d5('0x34'),_0xa5d5('0x34'))[_0xa5d5('0x3b')](_0xa5d5('0x3c'),_0xa5d5('0x35'))[_0xa5d5('0x3b')]('id',_0xa5d5('0x36'))[_0xa5d5('0x3b')](LISTID[_0xa5d5('0x3d')](),_0xa5d5('0x37'))[_0xa5d5('0x3b')](_0xaceb71['id'][_0xa5d5('0x3d')](),_0x28042f)[_0xa5d5('0x3b')](_0xa5d5('0x3c'),_0xa5d5('0x38'))[_0xa5d5('0x3b')](_0xa5d5('0x3c'),_0xa5d5('0x39'))['from'](_0xa5d5('0x3e'))[_0xa5d5('0x3f')]('deletedAt\x20IS\x20NULL')[_0xa5d5('0x3f')](_0xa5d5('0x40'),LISTID[_0xa5d5('0x3d')]())['where']('phone\x20IS\x20NOT\x20NULL')['where']('phone\x20NOT\x20IN\x20(?)',squel[_0xa5d5('0x3a')]()[_0xa5d5('0x3b')]('phone')[_0xa5d5('0x41')](_0xa5d5('0x33'))[_0xa5d5('0x3f')](_0x28042f+_0xa5d5('0x42'),_0xaceb71['id'][_0xa5d5('0x3d')]())))[_0xa5d5('0x3d')]();return _0x2601d3;};var _0xac9a92=function(_0x373021,_0x4c6e4d){var _0x3599ad=squel[_0xa5d5('0x43')]()[_0xa5d5('0x32')](_0xa5d5('0x33'))[_0xa5d5('0x44')](['phone','scheduledAt',_0xa5d5('0x36'),'ListId',_0x4c6e4d,_0xa5d5('0x38'),_0xa5d5('0x39')],squel['select']()[_0xa5d5('0x3b')]('phone',_0xa5d5('0x34'))['field'](_0xa5d5('0x3c'),_0xa5d5('0x35'))[_0xa5d5('0x3b')]('id','ContactId')['field'](LISTID[_0xa5d5('0x3d')](),_0xa5d5('0x37'))[_0xa5d5('0x3b')](_0x373021['id']['toString'](),_0x4c6e4d)[_0xa5d5('0x3b')](_0xa5d5('0x3c'),_0xa5d5('0x38'))['field']('NOW()',_0xa5d5('0x39'))[_0xa5d5('0x41')]('cm_contacts')['where']('deletedAt\x20IS\x20NULL')['where'](_0xa5d5('0x40'),LISTID[_0xa5d5('0x3d')]())[_0xa5d5('0x3f')](_0xa5d5('0x45'),squel['str'](hopperContacts))['where'](_0xa5d5('0x46'))['where'](_0xa5d5('0x47'),squel['select']()['field'](_0xa5d5('0x48'))[_0xa5d5('0x41')]('cm_hopper_final')[_0xa5d5('0x3f')](_0x4c6e4d+_0xa5d5('0x42'),_0x373021['id'][_0xa5d5('0x3d')]()))['where'](_0xa5d5('0x47'),squel[_0xa5d5('0x3a')]()['field'](_0xa5d5('0x34'))[_0xa5d5('0x41')](_0xa5d5('0x33'))[_0xa5d5('0x3f')](_0x4c6e4d+'\x20=\x20?',_0x373021['id'][_0xa5d5('0x3d')]())))[_0xa5d5('0x3d')]();return _0x3599ad;};function _0x25e0ed(_0x18ecce,_0x5d1d5f){var _0x4a6152=squel[_0xa5d5('0x43')]()[_0xa5d5('0x32')](_0xa5d5('0x33'))[_0xa5d5('0x44')]([_0xa5d5('0x34'),'scheduledAt',_0xa5d5('0x36'),'ListId',_0x5d1d5f,_0xa5d5('0x38'),_0xa5d5('0x39')],squel[_0xa5d5('0x3a')]()['field'](_0xa5d5('0x34'),_0xa5d5('0x34'))['field'](_0xa5d5('0x3c'),_0xa5d5('0x35'))[_0xa5d5('0x3b')]('id',_0xa5d5('0x36'))[_0xa5d5('0x3b')](LISTID[_0xa5d5('0x3d')](),_0xa5d5('0x37'))[_0xa5d5('0x3b')](_0x18ecce['id'][_0xa5d5('0x3d')](),_0x5d1d5f)[_0xa5d5('0x3b')]('NOW()',_0xa5d5('0x38'))['field'](_0xa5d5('0x3c'),_0xa5d5('0x39'))[_0xa5d5('0x41')](_0xa5d5('0x3e'))[_0xa5d5('0x3f')]('deletedAt\x20IS\x20NULL')[_0xa5d5('0x3f')](_0xa5d5('0x40'),LISTID[_0xa5d5('0x3d')]())[_0xa5d5('0x3f')](_0xa5d5('0x45'),squel[_0xa5d5('0x49')](hopperContacts))['where'](_0xa5d5('0x46')))['toString']();return _0x4a6152;}function _0x519137(_0x56e140,_0x5aca3d){var _0x3e3823=squel['insert']()[_0xa5d5('0x32')](_0xa5d5('0x4a'))[_0xa5d5('0x44')]([_0xa5d5('0x34'),_0xa5d5('0x36'),_0xa5d5('0x37'),_0x5aca3d,_0xa5d5('0x38'),_0xa5d5('0x39')],squel[_0xa5d5('0x3a')]()[_0xa5d5('0x3b')](_0xa5d5('0x34'),'phone')[_0xa5d5('0x3b')]('id',_0xa5d5('0x36'))[_0xa5d5('0x3b')](LISTID['toString'](),_0xa5d5('0x37'))[_0xa5d5('0x3b')](_0x56e140['id'][_0xa5d5('0x3d')](),_0x5aca3d)['field']('NOW()',_0xa5d5('0x38'))[_0xa5d5('0x3b')](_0xa5d5('0x3c'),'updatedAt')[_0xa5d5('0x41')](_0xa5d5('0x3e'))[_0xa5d5('0x3f')](_0xa5d5('0x4b'))['where'](_0xa5d5('0x40'),LISTID['toString']())['where'](_0xa5d5('0x45'),squel[_0xa5d5('0x49')](hopperContacts))[_0xa5d5('0x3f')](_0xa5d5('0x46')))[_0xa5d5('0x3d')]();return _0x3e3823;}return db[_0xa5d5('0x4c')][_0xa5d5('0x4d')]({'where':{'type':_0xa5d5('0x4e')},'attributes':['id','dialCheckDuplicateType'],'include':[{'model':db[_0xa5d5('0x4f')],'as':_0xa5d5('0x50'),'where':{'id':LISTID}}]})['then'](function(_0x5b9361){var _0x256c3f=[];if(_0x5b9361){var _0x192a95;for(var _0x8c83dc=0x0,_0x3c5c25;_0x8c83dc<_0x5b9361[_0xa5d5('0x1a')];_0x8c83dc+=0x1){_0x3c5c25=_0x5b9361[_0x8c83dc]['get']({'plain':!![]});switch(_0x3c5c25[_0xa5d5('0x51')]){case _0xa5d5('0x52'):_0x256c3f[_0xa5d5('0x2d')](db[_0xa5d5('0x53')][_0xa5d5('0x54')](_0xac9a92(_0x3c5c25,_0xa5d5('0x55')))[_0xa5d5('0x2c')](function(){})[_0xa5d5('0x2e')](_0x5d9136()));break;case _0xa5d5('0x56'):_0x256c3f[_0xa5d5('0x2d')](db['sequelize'][_0xa5d5('0x54')](_0x50ad06(_0x3c5c25,'VoiceQueueId'))[_0xa5d5('0x2c')](function(){})[_0xa5d5('0x2e')](_0x5d9136()));break;default:_0x256c3f[_0xa5d5('0x2d')](db[_0xa5d5('0x53')][_0xa5d5('0x54')](_0x25e0ed(_0x3c5c25,_0xa5d5('0x55')))[_0xa5d5('0x2c')](function(){})[_0xa5d5('0x2e')](_0x5d9136()));}}}return _0x256c3f;})[_0xa5d5('0x57')]()[_0xa5d5('0x2c')](function(){return db[_0xa5d5('0x4c')][_0xa5d5('0x4d')]({'where':{'type':_0xa5d5('0x4e')},'attributes':['id'],'include':[{'model':db[_0xa5d5('0x4f')],'as':'BlackLists','where':{'id':LISTID}}]})['then'](function(_0x20af59){var _0x5b7851=[];if(_0x20af59){var _0x56f20c;for(var _0xd5802c=0x0,_0x239c9e;_0xd5802c<_0x20af59[_0xa5d5('0x1a')];_0xd5802c+=0x1){_0x239c9e=_0x20af59[_0xd5802c][_0xa5d5('0x58')]({'plain':!![]});_0x5b7851[_0xa5d5('0x2d')](db['sequelize'][_0xa5d5('0x54')](_0x519137(_0x239c9e,_0xa5d5('0x55')))[_0xa5d5('0x2c')](function(){})[_0xa5d5('0x2e')](_0x5d9136()));}}return _0x5b7851;})[_0xa5d5('0x57')]();})[_0xa5d5('0x2c')](function(){return db[_0xa5d5('0x59')][_0xa5d5('0x4d')]({'attributes':['id',_0xa5d5('0x51')],'include':[{'model':db[_0xa5d5('0x4f')],'as':_0xa5d5('0x50'),'where':{'id':LISTID}}]})['then'](function(_0x51daa3){var _0xf4349a=[];if(_0x51daa3){for(var _0x6da9a0=0x0,_0x15b74a;_0x6da9a0<_0x51daa3[_0xa5d5('0x1a')];_0x6da9a0+=0x1){_0x15b74a=_0x51daa3[_0x6da9a0][_0xa5d5('0x58')]({'plain':!![]});switch(_0x15b74a[_0xa5d5('0x51')]){case _0xa5d5('0x52'):_0xf4349a[_0xa5d5('0x2d')](db[_0xa5d5('0x53')][_0xa5d5('0x54')](_0xac9a92(_0x15b74a,_0xa5d5('0x5a')))['then'](function(){})[_0xa5d5('0x2e')](_0x5d9136()));break;case _0xa5d5('0x56'):_0xf4349a[_0xa5d5('0x2d')](db[_0xa5d5('0x53')][_0xa5d5('0x54')](_0x50ad06(_0x15b74a,_0xa5d5('0x5a')))[_0xa5d5('0x2c')](function(){})['catch'](_0x5d9136()));break;default:_0xf4349a[_0xa5d5('0x2d')](db[_0xa5d5('0x53')][_0xa5d5('0x54')](_0x25e0ed(_0x15b74a,_0xa5d5('0x5a')))['then'](function(){})[_0xa5d5('0x2e')](_0x5d9136()));}}}return _0xf4349a;})['all']();})[_0xa5d5('0x2c')](function(){return db[_0xa5d5('0x59')]['findAll']({'attributes':['id'],'include':[{'model':db[_0xa5d5('0x4f')],'as':_0xa5d5('0x5b'),'where':{'id':LISTID}}]})['then'](function(_0x3c1edc){var _0x3bfc7e=[];if(_0x3c1edc){for(var _0x51278d=0x0,_0x1900f1;_0x51278d<_0x3c1edc[_0xa5d5('0x1a')];_0x51278d+=0x1){_0x1900f1=_0x3c1edc[_0x51278d][_0xa5d5('0x58')]({'plain':!![]});_0x3bfc7e[_0xa5d5('0x2d')](db['sequelize'][_0xa5d5('0x54')](_0x519137(_0x1900f1,'CampaignId'))['then'](function(){})[_0xa5d5('0x2e')](_0x5d9136()));}}return _0x3bfc7e;})['all']();})['catch'](function(_0x2d6905){logger[_0xa5d5('0x14')]('cmContact,\x20%s,\x20%s','generalCheckHopper',_0x2d6905[_0xa5d5('0x1c')]);});}var processPromises=function(_0x3b5bb3){return BPromise[_0xa5d5('0x57')](promises)[_0xa5d5('0x2c')](function(_0x2918b4){})[_0xa5d5('0x2e')](function(_0x2352b6){logger[_0xa5d5('0x14')](_0xa5d5('0x5c'),JSON[_0xa5d5('0x30')](_0x2352b6));})[_0xa5d5('0x5d')](function(){socket[_0xa5d5('0x5e')](_0xa5d5('0x5f')+SOCKET_TIMESTAMP,{'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});promises=[];success=0x0;errors=0x0;duplicates=0x0;rows=[];if(_0x3b5bb3){return _0x3b5bb3['resume']();}});};var endCsv=function(){return BPromise[_0xa5d5('0x60')]()[_0xa5d5('0x2c')](function(){if(hopperContacts){return checkHopper();}})[_0xa5d5('0x2c')](function(){socket[_0xa5d5('0x5e')](_0xa5d5('0x5f')+SOCKET_TIMESTAMP,{'finished':!![],'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});try{fs[_0xa5d5('0x61')](FILEPATH);}catch(_0x458163){logger[_0xa5d5('0x14')](_0xa5d5('0x62'),JSON[_0xa5d5('0x30')](_0x458163));}finally{process[_0xa5d5('0x63')](0x0);}});};process['on'](_0xa5d5('0x64'),function(){logger['info'](_0xa5d5('0x65'));endCsv();});function main(){return BPromise[_0xa5d5('0x60')]()[_0xa5d5('0x2c')](function(){if(DUPLICATES){DUPLICATES=DUPLICATES[_0xa5d5('0x11')](',');return db[_0xa5d5('0x66')][_0xa5d5('0x4d')]({'where':{'ListId':LISTID},'attributes':DUPLICATES,'raw':!![]});}})[_0xa5d5('0x2c')](function(_0x124b0){var _0x538eca=fs[_0xa5d5('0x67')](FILEPATH,{'highWaterMark':0xf*0x400*0x400});Papa[_0xa5d5('0x68')](_0x538eca,{'header':!![],'skipEmptyLines':!![],'step':function(_0x2397a6,_0x1555d8){total+=0x1;var _0x148d90=total;promises[_0xa5d5('0x2d')](checkRow(_0x2397a6,_0x124b0,_0x148d90)[_0xa5d5('0x2c')](function(){success+=0x1;})[_0xa5d5('0x2e')](function(_0x25480f){if(_0x25480f['error']){errors+=0x1;delete _0x25480f[_0xa5d5('0x14')];}else if(_0x25480f[_0xa5d5('0x29')]){duplicates+=0x1;delete _0x25480f[_0xa5d5('0x29')];}rows[_0xa5d5('0x2d')](_0x25480f);}));if(total%0xc8===0x0){_0x1555d8['pause']();return processPromises(_0x1555d8);}},'complete':function(){return processPromises()[_0xa5d5('0x2c')](function(){logger[_0xa5d5('0x69')](_0xa5d5('0x6a'));endCsv();});},'error':function(_0x26dfcf,_0x49ac51){logger[_0xa5d5('0x69')]('CSV\x20parse\x20error',JSON['stringify'](_0x26dfcf));endCsv();}});})[_0xa5d5('0x2e')](function(_0x26d777){logger[_0xa5d5('0x14')]('Error\x20executing\x20contact\x20csv\x20import:',JSON[_0xa5d5('0x30')](_0x26d777));});}main();
\ No newline at end of file
+var _0x39e3=['where','deletedAt\x20IS\x20NULL','ListId\x20=\x20?','phone\x20IS\x20NOT\x20NULL','phone\x20NOT\x20IN\x20(?)','str','cm_hopper_final','\x20=\x20?','id\x20IN\x20?','cm_hopper_black','VoiceQueue','findAll','outbound','Lists','get','dialCheckDuplicateType','always','push','sequelize','query','VoiceQueueId','then','all','BlackLists','Campaign','CmList','onlyIfOpen','CampaignId','cmContact,\x20%s,\x20%s','Error\x20processing\x20rows\x20block:','finally','resume','emit','contact:csv_','info','CSV\x20import\x20process\x20stopped!','parse','CSV\x20parsed\x20correctly!','Error\x20executing\x20contact\x20csv\x20import:','bluebird','util','lodash','ioredis','../../../mysqldb','../../../config/environment','../../../config/logger','api','redis','localhost','socket.io-emitter','register','argv','undefined','null','Missing\x20filepath\x20parameter!','Missing\x20binding\x20parameters!','zipObject','split','Missing\x20ListId\x20parameter!','Missing\x20socket_timestamp\x20parameter!','contact','index','test','isNil','error','The\x20row\x20is\x20empty\x20or\x20the\x20number\x20of\x20parameters\x20does\x20not\x20match\x20the\x20columns!','errors','length','map','join','hasOwnProperty','data','firstName','firstName\x20not\x20specified!','phone','phone\x20not\x20specified!','YYYY-MM-DD','isValid','birthDate\x20format\x20is\x20invalid,\x20YYYY-MM-DD\x20format\x20is\x20supported!','email','ListId','find','duplicate','Duplicate\x20Contact','CmContact','create','pick','catch','message','stringify','cmContact','checkHopper','inspect','insert','into','cm_hopper','fromQuery','scheduledAt','ContactId','createdAt','updatedAt','select','field','NOW()','toString','from','cm_contacts'];(function(_0x3a3b11,_0x42b1c1){var _0x48138e=function(_0x532523){while(--_0x532523){_0x3a3b11['push'](_0x3a3b11['shift']());}};_0x48138e(++_0x42b1c1);}(_0x39e3,0x168));var _0x339e=function(_0x3332f9,_0x16cb80){_0x3332f9=_0x3332f9-0x0;var _0x181197=_0x39e3[_0x3332f9];return _0x181197;};'use strict';var BPromise=require(_0x339e('0x0'));var util=require(_0x339e('0x1'));var _=require(_0x339e('0x2'));var fs=require('fs');var squel=require('squel');var Papa=require('papaparse');var Redis=require(_0x339e('0x3'));var db=require(_0x339e('0x4'))['db'];var config=require(_0x339e('0x5'));var logger=require(_0x339e('0x6'))(_0x339e('0x7'));config[_0x339e('0x8')]=_['defaults'](config['redis'],{'host':_0x339e('0x9'),'port':0x18eb});var socket=require(_0x339e('0xa'))(new Redis(config[_0x339e('0x8')]));require('../../../api/cmContact/cmContact.socket')[_0x339e('0xb')](socket);try{if(!process['argv'][0x2]||process[_0x339e('0xc')][0x2]===_0x339e('0xd')||process[_0x339e('0xc')][0x2]===_0x339e('0xe')){throw new Error(_0x339e('0xf'));}var FILEPATH=process[_0x339e('0xc')][0x2];if(!process[_0x339e('0xc')][0x3]||process['argv'][0x3]===_0x339e('0xd')||process[_0x339e('0xc')][0x3]===_0x339e('0xe')||!process['argv'][0x4]||process['argv'][0x4]===_0x339e('0xd')||process[_0x339e('0xc')][0x4]===_0x339e('0xe')){throw new Error(_0x339e('0x10'));}var FIELDS=_[_0x339e('0x11')](process[_0x339e('0xc')][0x3][_0x339e('0x12')](','),process[_0x339e('0xc')][0x4]['split'](','));if(!process['argv'][0x5]||process[_0x339e('0xc')][0x5]===_0x339e('0xd')||process[_0x339e('0xc')][0x5]===_0x339e('0xe')){throw new Error(_0x339e('0x13'));}var LISTID=process[_0x339e('0xc')][0x5];var COMPANYID=process['argv'][0x6]&&process[_0x339e('0xc')][0x6]!=='undefined'&&process[_0x339e('0xc')][0x6]!=='null'?process[_0x339e('0xc')][0x6]:null;var DUPLICATES=process[_0x339e('0xc')][0x7]&&process[_0x339e('0xc')][0x7]!=='undefined'&&process[_0x339e('0xc')][0x7]!=='null'?process[_0x339e('0xc')][0x7]:null;if(!process[_0x339e('0xc')][0x8]||process[_0x339e('0xc')][0x8]===_0x339e('0xd')||process[_0x339e('0xc')][0x8]===_0x339e('0xe')){throw new Error(_0x339e('0x14'));}var SOCKET_TIMESTAMP=process[_0x339e('0xc')][0x8];}catch(_0x1a29e8){logger['error'](_0x1a29e8);endCsv();}var total=0x0;var pTotal=0x0;var success=0x0;var errors=0x0;var duplicates=0x0;var rows=[];var hopperContacts='';var promises=[];var index=0x0;var alreadyInvalid=![];function handleCheckRowError(_0x2b12c6,_0x47395e,_0x444148,_0x23980f){var _0x30c315={'message':_0x47395e};_0x30c315[_0x2b12c6]=!![];if(_0x444148){_0x30c315[_0x339e('0x15')]=_0x444148;}if(_0x23980f){_0x30c315[_0x339e('0x16')]=_0x23980f;}return _0x30c315;}function isEmail(_0xafca56){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/[_0x339e('0x17')](_0xafca56);}function checkRow(_0x304dbc,_0x510555,_0x271d4b){return new BPromise(function(_0x59f726,_0x1946a8){if(_[_0x339e('0x18')](_0x304dbc)){return _0x1946a8(handleCheckRowError(_0x339e('0x19'),_0x339e('0x1a'),null,_0x271d4b));}if(_0x304dbc[_0x339e('0x1b')]&&_0x304dbc[_0x339e('0x1b')][_0x339e('0x1c')]){var _0x5594a5=_[_0x339e('0x1d')](_0x304dbc[_0x339e('0x1b')],'message')[_0x339e('0x1e')](';');return _0x1946a8(handleCheckRowError(_0x339e('0x19'),_0x5594a5,null,_0x271d4b));}var _0x474db8={};for(var _0x1bed1d in FIELDS){if(FIELDS[_0x339e('0x1f')](_0x1bed1d)&&FIELDS[_0x1bed1d]){_0x474db8[_0x1bed1d]=_0x304dbc[_0x339e('0x20')][0x0][FIELDS[_0x1bed1d]]||_0x304dbc[_0x339e('0x20')][0x0]['\ufeff'+FIELDS[_0x1bed1d]];}}if(!_0x474db8[_0x339e('0x21')]){return _0x1946a8(handleCheckRowError('error',_0x339e('0x22'),null,_0x271d4b));}if(!_0x474db8[_0x339e('0x23')]){return _0x1946a8(handleCheckRowError(_0x339e('0x19'),_0x339e('0x24'),null,_0x271d4b));}if(_0x474db8['birthDate']){var _0x25cfb8=moment(_0x474db8['birthDate'],_0x339e('0x25'));if(!_0x25cfb8[_0x339e('0x26')]()){return _0x1946a8(handleCheckRowError(_0x339e('0x19'),_0x339e('0x27'),null,_0x271d4b));}}if(_0x474db8[_0x339e('0x28')]){if(!isEmail(_0x474db8[_0x339e('0x28')])){return _0x1946a8(handleCheckRowError(_0x339e('0x19'),'email\x20format\x20is\x20not\x20valid!',null,_0x271d4b));}}_0x474db8[_0x339e('0x29')]=LISTID;_0x474db8['CompanyId']=COMPANYID||undefined;if(DUPLICATES&&DUPLICATES[_0x339e('0x1c')]&&_0x510555){var _0x42a9ea={};for(var _0xaacfbf=0x0,_0x274511=DUPLICATES['length'];_0xaacfbf<_0x274511;_0xaacfbf+=0x1){_0x42a9ea[DUPLICATES[_0xaacfbf]]=_0x474db8[DUPLICATES[_0xaacfbf]];}var _0x3fd720=_[_0x339e('0x2a')](_0x510555,_0x42a9ea);if(_0x3fd720){return _0x1946a8(handleCheckRowError(_0x339e('0x2b'),_0x339e('0x2c'),_0x3fd720,_0x271d4b));}}return db[_0x339e('0x2d')][_0x339e('0x2e')](_0x474db8,{'raw':!![],'hooks':![],'fields':_['keys'](_0x474db8)})['then'](function(_0x485aa3){if(DUPLICATES&&DUPLICATES[_0x339e('0x1c')]&&_0x510555){_0x510555['push'](_[_0x339e('0x2f')](_0x474db8,DUPLICATES));}hopperContacts+=(hopperContacts?',':'')+_0x485aa3['id'];return _0x59f726();})[_0x339e('0x30')](function(_0x4c23f9){return _0x1946a8(handleCheckRowError(_0x339e('0x19'),'Error\x20while\x20creating\x20contact:\x20'+(_0x4c23f9[_0x339e('0x31')]||JSON[_0x339e('0x32')](_0x4c23f9)),null,_0x271d4b));});});}function checkHopper(){function _0x392384(){return function(_0x494f61){logger[_0x339e('0x19')](_0x339e('0x33'),_0x339e('0x34'),util[_0x339e('0x35')](_0x494f61,{'showHidden':![],'depth':null}));};}var _0x2f1018=function(_0x5d6def,_0x20cabc){var _0x37e33c=squel[_0x339e('0x36')]()[_0x339e('0x37')](_0x339e('0x38'))[_0x339e('0x39')]([_0x339e('0x23'),_0x339e('0x3a'),_0x339e('0x3b'),'ListId',_0x20cabc,_0x339e('0x3c'),_0x339e('0x3d')],squel[_0x339e('0x3e')]()[_0x339e('0x3f')]('phone','phone')['field'](_0x339e('0x40'),_0x339e('0x3a'))[_0x339e('0x3f')]('id',_0x339e('0x3b'))[_0x339e('0x3f')](LISTID[_0x339e('0x41')](),'ListId')[_0x339e('0x3f')](_0x5d6def['id']['toString'](),_0x20cabc)[_0x339e('0x3f')](_0x339e('0x40'),_0x339e('0x3c'))[_0x339e('0x3f')]('NOW()','updatedAt')[_0x339e('0x42')](_0x339e('0x43'))[_0x339e('0x44')](_0x339e('0x45'))[_0x339e('0x44')](_0x339e('0x46'),LISTID[_0x339e('0x41')]())[_0x339e('0x44')](_0x339e('0x47'))[_0x339e('0x44')](_0x339e('0x48'),squel['select']()[_0x339e('0x3f')](_0x339e('0x23'))[_0x339e('0x42')](_0x339e('0x38'))['where'](_0x20cabc+'\x20=\x20?',_0x5d6def['id'][_0x339e('0x41')]())))[_0x339e('0x41')]();return _0x37e33c;};var _0x28c028=function(_0x440197,_0x51eaef){var _0x3261c7=squel[_0x339e('0x36')]()[_0x339e('0x37')](_0x339e('0x38'))['fromQuery']([_0x339e('0x23'),_0x339e('0x3a'),_0x339e('0x3b'),_0x339e('0x29'),_0x51eaef,_0x339e('0x3c'),'updatedAt'],squel[_0x339e('0x3e')]()[_0x339e('0x3f')](_0x339e('0x23'),'phone')[_0x339e('0x3f')](_0x339e('0x40'),_0x339e('0x3a'))[_0x339e('0x3f')]('id',_0x339e('0x3b'))[_0x339e('0x3f')](LISTID['toString'](),_0x339e('0x29'))['field'](_0x440197['id'][_0x339e('0x41')](),_0x51eaef)['field'](_0x339e('0x40'),_0x339e('0x3c'))['field']('NOW()',_0x339e('0x3d'))['from'](_0x339e('0x43'))[_0x339e('0x44')](_0x339e('0x45'))[_0x339e('0x44')]('ListId\x20=\x20?',LISTID['toString']())[_0x339e('0x44')]('id\x20IN\x20?',squel[_0x339e('0x49')](hopperContacts))[_0x339e('0x44')](_0x339e('0x47'))[_0x339e('0x44')](_0x339e('0x48'),squel[_0x339e('0x3e')]()[_0x339e('0x3f')]('calleridnum')['from'](_0x339e('0x4a'))[_0x339e('0x44')](_0x51eaef+'\x20=\x20?',_0x440197['id'][_0x339e('0x41')]()))[_0x339e('0x44')](_0x339e('0x48'),squel[_0x339e('0x3e')]()[_0x339e('0x3f')]('phone')[_0x339e('0x42')](_0x339e('0x38'))[_0x339e('0x44')](_0x51eaef+_0x339e('0x4b'),_0x440197['id'][_0x339e('0x41')]())))['toString']();return _0x3261c7;};function _0x2e74c1(_0x49f888,_0x5c6309){var _0x36ee7b=squel['insert']()[_0x339e('0x37')]('cm_hopper')[_0x339e('0x39')]([_0x339e('0x23'),_0x339e('0x3a'),_0x339e('0x3b'),_0x339e('0x29'),_0x5c6309,_0x339e('0x3c'),_0x339e('0x3d')],squel['select']()[_0x339e('0x3f')](_0x339e('0x23'),_0x339e('0x23'))[_0x339e('0x3f')](_0x339e('0x40'),_0x339e('0x3a'))[_0x339e('0x3f')]('id',_0x339e('0x3b'))['field'](LISTID[_0x339e('0x41')](),'ListId')[_0x339e('0x3f')](_0x49f888['id'][_0x339e('0x41')](),_0x5c6309)[_0x339e('0x3f')](_0x339e('0x40'),'createdAt')[_0x339e('0x3f')]('NOW()',_0x339e('0x3d'))[_0x339e('0x42')](_0x339e('0x43'))['where'](_0x339e('0x45'))[_0x339e('0x44')](_0x339e('0x46'),LISTID[_0x339e('0x41')]())[_0x339e('0x44')](_0x339e('0x4c'),squel[_0x339e('0x49')](hopperContacts))['where'](_0x339e('0x47')))[_0x339e('0x41')]();return _0x36ee7b;}function _0x390575(_0x418c22,_0x4b8369){var _0x565f2f=squel[_0x339e('0x36')]()['into'](_0x339e('0x4d'))[_0x339e('0x39')]([_0x339e('0x23'),'ContactId',_0x339e('0x29'),_0x4b8369,_0x339e('0x3c'),_0x339e('0x3d')],squel[_0x339e('0x3e')]()[_0x339e('0x3f')](_0x339e('0x23'),_0x339e('0x23'))[_0x339e('0x3f')]('id',_0x339e('0x3b'))[_0x339e('0x3f')](LISTID[_0x339e('0x41')](),'ListId')[_0x339e('0x3f')](_0x418c22['id']['toString'](),_0x4b8369)['field'](_0x339e('0x40'),'createdAt')[_0x339e('0x3f')]('NOW()','updatedAt')[_0x339e('0x42')]('cm_contacts')['where'](_0x339e('0x45'))[_0x339e('0x44')](_0x339e('0x46'),LISTID['toString']())[_0x339e('0x44')](_0x339e('0x4c'),squel['str'](hopperContacts))[_0x339e('0x44')](_0x339e('0x47')))[_0x339e('0x41')]();return _0x565f2f;}return db[_0x339e('0x4e')][_0x339e('0x4f')]({'where':{'type':_0x339e('0x50')},'attributes':['id','dialCheckDuplicateType'],'include':[{'model':db['CmList'],'as':_0x339e('0x51'),'where':{'id':LISTID}}]})['then'](function(_0x1dacc9){var _0x6e66ff=[];if(_0x1dacc9){var _0x513dc3;for(var _0xe1df79=0x0,_0x1da90d;_0xe1df79<_0x1dacc9[_0x339e('0x1c')];_0xe1df79+=0x1){_0x1da90d=_0x1dacc9[_0xe1df79][_0x339e('0x52')]({'plain':!![]});switch(_0x1da90d[_0x339e('0x53')]){case _0x339e('0x54'):_0x6e66ff[_0x339e('0x55')](db[_0x339e('0x56')][_0x339e('0x57')](_0x28c028(_0x1da90d,_0x339e('0x58')))[_0x339e('0x59')](function(){})[_0x339e('0x30')](_0x392384()));break;case'onlyIfOpen':_0x6e66ff[_0x339e('0x55')](db['sequelize'][_0x339e('0x57')](_0x2f1018(_0x1da90d,_0x339e('0x58')))[_0x339e('0x59')](function(){})['catch'](_0x392384()));break;default:_0x6e66ff[_0x339e('0x55')](db[_0x339e('0x56')][_0x339e('0x57')](_0x2e74c1(_0x1da90d,'VoiceQueueId'))[_0x339e('0x59')](function(){})['catch'](_0x392384()));}}}return _0x6e66ff;})[_0x339e('0x5a')]()[_0x339e('0x59')](function(){return db[_0x339e('0x4e')][_0x339e('0x4f')]({'where':{'type':_0x339e('0x50')},'attributes':['id'],'include':[{'model':db['CmList'],'as':_0x339e('0x5b'),'where':{'id':LISTID}}]})[_0x339e('0x59')](function(_0x52bd41){var _0x44d7d8=[];if(_0x52bd41){var _0x503e9d;for(var _0x4744e0=0x0,_0x33a1ee;_0x4744e0<_0x52bd41[_0x339e('0x1c')];_0x4744e0+=0x1){_0x33a1ee=_0x52bd41[_0x4744e0][_0x339e('0x52')]({'plain':!![]});_0x44d7d8['push'](db['sequelize'][_0x339e('0x57')](_0x390575(_0x33a1ee,_0x339e('0x58')))[_0x339e('0x59')](function(){})[_0x339e('0x30')](_0x392384()));}}return _0x44d7d8;})[_0x339e('0x5a')]();})['then'](function(){return db[_0x339e('0x5c')]['findAll']({'attributes':['id',_0x339e('0x53')],'include':[{'model':db[_0x339e('0x5d')],'as':_0x339e('0x51'),'where':{'id':LISTID}}]})[_0x339e('0x59')](function(_0x53407c){var _0x39bcd8=[];if(_0x53407c){for(var _0x2d1e20=0x0,_0xbfe185;_0x2d1e20<_0x53407c[_0x339e('0x1c')];_0x2d1e20+=0x1){_0xbfe185=_0x53407c[_0x2d1e20][_0x339e('0x52')]({'plain':!![]});switch(_0xbfe185[_0x339e('0x53')]){case _0x339e('0x54'):_0x39bcd8['push'](db[_0x339e('0x56')][_0x339e('0x57')](_0x28c028(_0xbfe185,'CampaignId'))[_0x339e('0x59')](function(){})[_0x339e('0x30')](_0x392384()));break;case _0x339e('0x5e'):_0x39bcd8[_0x339e('0x55')](db[_0x339e('0x56')][_0x339e('0x57')](_0x2f1018(_0xbfe185,_0x339e('0x5f')))[_0x339e('0x59')](function(){})['catch'](_0x392384()));break;default:_0x39bcd8[_0x339e('0x55')](db[_0x339e('0x56')][_0x339e('0x57')](_0x2e74c1(_0xbfe185,'CampaignId'))[_0x339e('0x59')](function(){})[_0x339e('0x30')](_0x392384()));}}}return _0x39bcd8;})[_0x339e('0x5a')]();})[_0x339e('0x59')](function(){return db['Campaign']['findAll']({'attributes':['id'],'include':[{'model':db[_0x339e('0x5d')],'as':'BlackLists','where':{'id':LISTID}}]})[_0x339e('0x59')](function(_0x41561e){var _0xd8492f=[];if(_0x41561e){for(var _0x3c6592=0x0,_0x29894c;_0x3c6592<_0x41561e[_0x339e('0x1c')];_0x3c6592+=0x1){_0x29894c=_0x41561e[_0x3c6592][_0x339e('0x52')]({'plain':!![]});_0xd8492f[_0x339e('0x55')](db[_0x339e('0x56')]['query'](_0x390575(_0x29894c,_0x339e('0x5f')))[_0x339e('0x59')](function(){})[_0x339e('0x30')](_0x392384()));}}return _0xd8492f;})[_0x339e('0x5a')]();})['catch'](function(_0x119723){logger[_0x339e('0x19')](_0x339e('0x60'),'generalCheckHopper',_0x119723['message']);});}var processPromises=function(_0x497d5d){return BPromise[_0x339e('0x5a')](promises)[_0x339e('0x59')](function(_0xfa211a){})[_0x339e('0x30')](function(_0x4c218d){logger[_0x339e('0x19')](_0x339e('0x61'),JSON['stringify'](_0x4c218d));})[_0x339e('0x62')](function(){socket['emit']('contact:csv_'+SOCKET_TIMESTAMP,{'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});promises=[];success=0x0;errors=0x0;duplicates=0x0;rows=[];if(_0x497d5d){return _0x497d5d[_0x339e('0x63')]();}});};var endCsv=function(){return BPromise['resolve']()[_0x339e('0x59')](function(){if(hopperContacts){return checkHopper();}})['then'](function(){socket[_0x339e('0x64')](_0x339e('0x65')+SOCKET_TIMESTAMP,{'finished':!![],'success':success,'errors':errors,'duplicates':duplicates,'rows':rows});try{fs['unlinkSync'](FILEPATH);}catch(_0x37a819){logger['error']('Unable\x20to\x20delete\x20temp\x20file:',JSON[_0x339e('0x32')](_0x37a819));}finally{process['exit'](0x0);}});};process['on']('SIGINT',function(){logger[_0x339e('0x66')](_0x339e('0x67'));endCsv();});function main(){return BPromise['resolve']()[_0x339e('0x59')](function(){if(DUPLICATES){DUPLICATES=DUPLICATES[_0x339e('0x12')](',');return db['CmContact'][_0x339e('0x4f')]({'where':{'ListId':LISTID},'attributes':DUPLICATES,'raw':!![]});}})[_0x339e('0x59')](function(_0x1d9708){var _0x3684a1=fs['createReadStream'](FILEPATH,{'highWaterMark':0xf*0x400*0x400});Papa[_0x339e('0x68')](_0x3684a1,{'header':!![],'skipEmptyLines':!![],'step':function(_0x232cc4,_0x6208f0){total+=0x1;var _0x20b76c=total;promises['push'](checkRow(_0x232cc4,_0x1d9708,_0x20b76c)[_0x339e('0x59')](function(){success+=0x1;})[_0x339e('0x30')](function(_0x251731){if(_0x251731[_0x339e('0x19')]){errors+=0x1;delete _0x251731['error'];}else if(_0x251731[_0x339e('0x2b')]){duplicates+=0x1;delete _0x251731[_0x339e('0x2b')];}rows['push'](_0x251731);}));if(total%0xc8===0x0){_0x6208f0['pause']();return processPromises(_0x6208f0);}},'complete':function(){return processPromises()[_0x339e('0x59')](function(){logger[_0x339e('0x66')](_0x339e('0x69'));endCsv();});},'error':function(_0x5bf250,_0x34bdeb){logger['info']('CSV\x20parse\x20error',JSON['stringify'](_0x5bf250));endCsv();}});})[_0x339e('0x30')](function(_0x1e5961){logger[_0x339e('0x19')](_0x339e('0x6a'),JSON[_0x339e('0x32')](_0x1e5961));});}main();
\ No newline at end of file
index df967e8..85f96c3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc7c5=['AdditionalPhones','split','isNil','filter','CmContactHasItem','findOne','update','create','inserted','cm_contacts.phone','cm_contacts.scheduledat','cm_contacts.ListId','cm_contacts.updatedAt','cm_contacts.priority','cm_contacts.UserId','insert','into','cm_hopper','fromQuery','scheduledat','ContactId','ListId','createdAt','updatedAt','priority','UserId','recallme','fields','cm_contacts.ListId\x20=\x20','.CmListId','where','.CmListId\x20=\x20?','\x22always\x22','cm_contacts.phone\x20NOT\x20IN\x20(?)','cm_contacts.id','cm_contacts.createdAt','cm_hopper_black','select','cm_contacts','cm_contacts.createdAt\x20=\x20?','ListId\x20=\x20?','toString','date_add(cm_contacts.scheduledat,interval\x20','cm_contact_has_items.item','cm_contact_has_items.createdAt','cm_hopper_additional_phones','OrderBy','cm_contacts.id\x20=\x20cm_contact_has_items.CmContactId','cm_hopper.ListId\x20=\x20?','concat','CompanyId','scheduledAt',')\x20NOT\x20IN\x20?','deletedAt\x20IS\x20NULL','id\x20IN\x20?','min_id','group','info','error','message','exit','errors','code','query','catch','campaigns.id','campaigns.dialTimezone','campaigns','campaigns_has_cm_lists','campaigns.id\x20=\x20campaigns_has_cm_lists.CampaignId','sequelize','spread','voice_queues.id','voice_queues.dialTimezone','voice_queues','voice_queues_has_cm_lists','voice_queues_has_cm_lists.CmListId=','timezones','utcOffset','set','offset','dialTimezone','main','stringify','send','binding','clone','socket_timestamp','server/files/tmp','.csv','keys','header','ContactItemType','name','_description','writeFileSync','parse','data','rows','find','hasOwnProperty','trim','isValid','isNaN','isNumber','includes','agent\x20not\x20exists','email','email\x20wrong\x20format','dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)','firstName','\x20not\x20specified','replace','itemTypeId','SystemRow','appendFileSync','Abort\x20parser','abort','step','duplicates','CREATE\x20TABLE\x20','\x20LIKE\x20cm_contacts;','voice_queues_','each','LOAD\x20DATA\x20LOCAL\x20INFILE\x20\x27%s\x27\x20INTO\x20TABLE\x20%s\x20CHARACTER\x20SET\x20UTF8\x20FIELDS\x20TERMINATED\x20BY\x20\x27,\x27\x20ENCLOSED\x20BY\x20\x27\x22\x27\x20LINES\x20TERMINATED\x20BY\x20\x27\x0a\x27\x20IGNORE\x201\x20ROWS\x20(%s)\x20SET\x20id\x20=\x20NULL,\x20ListId\x20=\x20%s,\x20CompanyId\x20=\x20%s,\x20createdAt\x20=\x20\x27%s\x27,\x20updatedAt\x20=\x20\x27%s\x27',',\x20scheduledAt\x20=\x20NOW()','DROP\x20TABLE\x20','contactId','contactTypeId','orderBy','VoiceQueueId','voice_queues_has_cm_blacklists','CampaignId','campaigns_has_cm_blacklists','finish','affectedRows','emit','contact:import:','unlink','argv','arguments\x20<filename>\x20<parameters>\x20<agents>','root','existsSync','file\x20doesn\x27t\x20exists','phone\x20is\x20mandatory','firstName\x20is\x20mandatory','map','No\x20agent\x20available','uncaughtException','path','papaparse','util','bluebird','squel','ioredis','../../../mysqldb','../../../config/environment','../../../config/logger','import','redis','defaults','localhost','format','YYYY-MM-DD\x20HH:mm:ss','field','phone','from','join','.id\x20=\x20','\x20=\x20','.dialCheckDuplicateType\x20IN\x20(','CmContact','findAll','then','length','push','all'];(function(_0x15c94a,_0x3db00b){var _0x17b174=function(_0x4d680d){while(--_0x4d680d){_0x15c94a['push'](_0x15c94a['shift']());}};_0x17b174(++_0x3db00b);}(_0xc7c5,0x95));var _0x5c7c=function(_0x3d2cee,_0x26bf65){_0x3d2cee=_0x3d2cee-0x0;var _0x11018e=_0xc7c5[_0x3d2cee];return _0x11018e;};'use strict';var fs=require('fs');var path=require(_0x5c7c('0x0'));var _=require('lodash');var Papa=require(_0x5c7c('0x1'));var util=require(_0x5c7c('0x2'));var BPromise=require(_0x5c7c('0x3'));var moment=require('moment');var squel=require(_0x5c7c('0x4'));var Redis=require(_0x5c7c('0x5'));var db=require(_0x5c7c('0x6'))['db'];var config=require(_0x5c7c('0x7'));var shared=require('../../../config/environment/shared');var logger=require(_0x5c7c('0x8'))(_0x5c7c('0x9'));config[_0x5c7c('0xa')]=_[_0x5c7c('0xb')](config[_0x5c7c('0xa')],{'host':_0x5c7c('0xc'),'port':0x18eb});var socket=require('socket.io-emitter')(new Redis(config[_0x5c7c('0xa')]));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var promisesAdditionalPhones=[];var orderBy=0x0;var stopped=![];var NOW=moment()[_0x5c7c('0xd')](_0x5c7c('0xe'));var contactItemTypes=[];var phoneDescriptions=[];var hasAdditionalPhones=![];var tmp_voice_queues;var tmp_campaigns;var tzOffset=0x0;var hasTZ;var NOW=moment()[_0x5c7c('0xd')]('YYYY-MM-DD\x20HH:mm:ss');function isEmail(_0x1fc97b){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/['test'](_0x1fc97b);}function selectNotIn(_0x3de2c2,_0x28f2be,_0x225e8d,_0x345d2f,_0x29397f){return squel['select']()[_0x5c7c('0xf')](_0x5c7c('0x10'))[_0x5c7c('0x11')](_0x345d2f)[_0x5c7c('0x12')](_0x28f2be,null,_0x28f2be+_0x5c7c('0x13')+_0x345d2f+'.'+_0x225e8d)['where'](_0x345d2f+'.'+_0x225e8d+_0x5c7c('0x14')+_0x3de2c2+'.'+_0x225e8d)['where'](_0x28f2be+_0x5c7c('0x15')+_0x29397f[_0x5c7c('0x12')]()+')');}function handleAdditionalPhones(){return new Promise(function(_0x54e896,_0x8ca61b){promisesAdditionalPhones=[];return db[_0x5c7c('0x16')][_0x5c7c('0x17')]({'raw':!![],'attributes':['id','AdditionalPhones'],'where':{'createdAt':NOW,'AdditionalPhones':{'$ne':null}}})[_0x5c7c('0x18')](function(_0x55a444){if(_0x55a444!==null){var _0x1028e6=[];for(var _0x461127=0x0;_0x461127<_0x55a444[_0x5c7c('0x19')];_0x461127++){var _0x1ccfd2=_0x55a444[_0x461127];_0x1028e6[_0x5c7c('0x1a')](insertAdditionalPhones(_0x1ccfd2));}}Promise[_0x5c7c('0x1b')](_0x1028e6)['then'](function(){_0x54e896({'val':0x1});});});});}function insertAdditionalPhones(_0x58e2bc){return new Promise(function(_0x3d4906,_0x39fd6a){var _0x3f9878=_0x58e2bc[_0x5c7c('0x1c')];var _0x37e5d3=_0x3f9878[_0x5c7c('0x1d')](';');var _0x46bbf8=[];orderBy=0x0;for(var _0x5b3057=0x0;_0x5b3057<_0x37e5d3[_0x5c7c('0x19')];_0x5b3057++){_0x46bbf8[_0x5c7c('0x1a')](splitAdditionalPhone(_0x58e2bc['id'],_0x37e5d3[_0x5b3057]));}Promise[_0x5c7c('0x1b')](_0x46bbf8)[_0x5c7c('0x18')](function(){_0x3d4906({'val':_0x37e5d3[_0x5c7c('0x19')]});});});}function splitAdditionalPhone(_0x5cdd40,_0x184bdc){return new Promise(function(_0x3de834,_0x34ca3e){var _0x100ebc=_0x184bdc['split'](':');var _0x31df02=_0x100ebc[0x0];var _0x4f317c=_0x100ebc[0x1];if(!_[_0x5c7c('0x1e')](_0x4f317c)){var _0x2fe896=_0x4f317c[_0x5c7c('0x1d')]('|');var _0x3c4474=[];for(var _0x4a121a=0x0;_0x4a121a<_0x2fe896[_0x5c7c('0x19')];_0x4a121a++){if(_0x2fe896[_0x4a121a]!==''){var _0x3b3927=_[_0x5c7c('0x1f')](promisesAdditionalPhones,{'contactId':_0x5cdd40,'phone':_0x2fe896[_0x4a121a]});if(_0x3b3927[_0x5c7c('0x19')]==0x0){orderBy++;promisesAdditionalPhones[_0x5c7c('0x1a')]({'contactId':_0x5cdd40,'contactTypeId':_0x31df02,'phone':_0x2fe896[_0x4a121a],'orderBy':orderBy});}}}_0x3de834({'ok':0x1});}else _0x3de834({'res':0x0});});}function createAdditionalPhone(_0x5ca83d,_0x39db0f,_0x30bdb6,_0x16ea24){var _0x1174d9='';var _0x21fd3b='';var _0x53a4db=_0x30bdb6[_0x5c7c('0x1d')]('§');_0x1174d9=_0x53a4db[0x0];if(_0x53a4db[_0x5c7c('0x19')]==0x2)_0x21fd3b=_0x53a4db[0x1];return new Promise(function(_0x3237df,_0x3d7077){return db[_0x5c7c('0x20')][_0x5c7c('0x21')]({'where':{'CmContactId':_0x5ca83d,'item':_0x1174d9}})[_0x5c7c('0x18')](function(_0x23f6db){if(_0x23f6db){return db[_0x5c7c('0x20')][_0x5c7c('0x22')]({'ItemTypeId':_0x39db0f,'description':_0x21fd3b,'OrderBy':_0x16ea24},{'where':{'CmContactId':_0x5ca83d,'item':_0x1174d9}})['then'](function(_0x1451a5){_0x3237df({'res':'updated'});});}else{return db[_0x5c7c('0x20')][_0x5c7c('0x23')]({'CmContactId':_0x5ca83d,'item':_0x1174d9,'description':_0x21fd3b,'ItemTypeId':_0x39db0f,'OrderBy':_0x16ea24,'ItemClass':'PHONE'})[_0x5c7c('0x18')](function(_0x4ea07d){_0x3237df({'res':_0x5c7c('0x24')});});}});});}function insertCmHopper(_0x513524,_0x404a2b,_0x4ae6f2,_0x536ecb,_0x11b2ef){var _0x5c182d=[_0x5c7c('0x25'),_0x5c7c('0x26'),'cm_contacts.id',_0x5c7c('0x27'),_0x404a2b+'.'+_0x536ecb,'cm_contacts.createdAt',_0x5c7c('0x28'),_0x5c7c('0x29'),_0x5c7c('0x2a'),'\x22'+_0x11b2ef+'\x22'];return squel[_0x5c7c('0x2b')]()[_0x5c7c('0x2c')](_0x5c7c('0x2d'))[_0x5c7c('0x2e')]([_0x5c7c('0x10'),_0x5c7c('0x2f'),_0x5c7c('0x30'),_0x5c7c('0x31'),_0x536ecb,_0x5c7c('0x32'),_0x5c7c('0x33'),_0x5c7c('0x34'),_0x5c7c('0x35'),_0x5c7c('0x36')],squel['select']()[_0x5c7c('0x37')](_0x5c182d)[_0x5c7c('0x11')](_0x404a2b)[_0x5c7c('0x12')]('cm_contacts',null,_0x5c7c('0x38')+_0x404a2b+_0x5c7c('0x39'))['join'](_0x4ae6f2,null,_0x4ae6f2+_0x5c7c('0x13')+_0x404a2b+'.'+_0x536ecb)[_0x5c7c('0x3a')](_0x404a2b+_0x5c7c('0x3b'),_0x513524)[_0x5c7c('0x3a')]('cm_contacts.createdAt\x20=\x20?',NOW)[_0x5c7c('0x3a')]('cm_contacts.phone\x20NOT\x20IN\x20(?)',selectNotIn(_0x404a2b,_0x4ae6f2,_0x536ecb,'cm_hopper',[_0x5c7c('0x3c'),'\x22onlyIfOpen\x22']))[_0x5c7c('0x3a')](_0x5c7c('0x3d'),selectNotIn(_0x404a2b,_0x4ae6f2,_0x536ecb,_0x5c7c('0x2d'),[_0x5c7c('0x3c')])))['toString']();}function insertCmHopperBlack(_0x3f9be9,_0x131239,_0xd07d13,_0x54267f){var _0x534718=[_0x5c7c('0x25'),_0x5c7c('0x3e'),'cm_contacts.ListId',_0x131239+'.'+_0x54267f,_0x5c7c('0x3f'),'cm_contacts.updatedAt'];return squel[_0x5c7c('0x2b')]()[_0x5c7c('0x2c')](_0x5c7c('0x40'))['fromQuery'](['phone',_0x5c7c('0x30'),_0x5c7c('0x31'),_0x54267f,_0x5c7c('0x32'),_0x5c7c('0x33')],squel[_0x5c7c('0x41')]()[_0x5c7c('0x37')](_0x534718)['from'](_0x131239)['join'](_0x5c7c('0x42'),null,_0x5c7c('0x38')+_0x131239+_0x5c7c('0x39'))['join'](_0xd07d13,null,_0xd07d13+_0x5c7c('0x13')+_0x131239+'.'+_0x54267f)[_0x5c7c('0x3a')](_0x131239+_0x5c7c('0x3b'),_0x3f9be9)[_0x5c7c('0x3a')](_0x5c7c('0x43'),NOW)['where'](_0x5c7c('0x3d'),squel[_0x5c7c('0x41')]()[_0x5c7c('0xf')](_0x5c7c('0x10'))[_0x5c7c('0x11')](_0x5c7c('0x40'))[_0x5c7c('0x3a')](_0x5c7c('0x44'),_0x3f9be9)[_0x5c7c('0x3a')](_0x54267f+'\x20=\x20'+_0x131239+'.'+_0x54267f)))[_0x5c7c('0x45')]();}function insertTzCmHopper(_0x8cedbd,_0x5d25d3,_0x2c4aae,_0x55cbc3,_0x56854c,_0x17cc8d){var _0x3918fa=['cm_contacts.phone',_0x5c7c('0x46')+_0x17cc8d+'.offset-cm_contacts.utcOffset\x20minute)','cm_contacts.id',_0x5c7c('0x27'),_0x5d25d3+'.'+_0x55cbc3,_0x5c7c('0x3f'),_0x5c7c('0x28'),_0x5c7c('0x29'),_0x5c7c('0x2a'),'\x22'+_0x56854c+'\x22'];var _0xe8456a=squel[_0x5c7c('0x2b')]()[_0x5c7c('0x2c')](_0x5c7c('0x2d'))[_0x5c7c('0x2e')]([_0x5c7c('0x10'),_0x5c7c('0x2f'),'ContactId',_0x5c7c('0x31'),_0x55cbc3,_0x5c7c('0x32'),_0x5c7c('0x33'),_0x5c7c('0x34'),_0x5c7c('0x35'),'recallme'],squel[_0x5c7c('0x41')]()['fields'](_0x3918fa)['from'](_0x5d25d3)[_0x5c7c('0x12')](_0x5c7c('0x42'),null,'cm_contacts.ListId\x20=\x20'+_0x5d25d3+_0x5c7c('0x39'))[_0x5c7c('0x12')](_0x2c4aae,null,_0x2c4aae+_0x5c7c('0x13')+_0x5d25d3+'.'+_0x55cbc3)[_0x5c7c('0x12')](_0x17cc8d,null,_0x17cc8d+_0x5c7c('0x13')+_0x5d25d3+'.'+_0x55cbc3)[_0x5c7c('0x3a')](_0x5d25d3+_0x5c7c('0x3b'),_0x8cedbd)['where'](_0x5c7c('0x43'),NOW)[_0x5c7c('0x3a')](_0x5c7c('0x3d'),selectNotIn(_0x5d25d3,_0x2c4aae,_0x55cbc3,_0x5c7c('0x2d'),['\x22always\x22','\x22onlyIfOpen\x22']))['where'](_0x5c7c('0x3d'),selectNotIn(_0x5d25d3,_0x2c4aae,_0x55cbc3,'cm_hopper',[_0x5c7c('0x3c')])))[_0x5c7c('0x45')]();return _0xe8456a;}function insertTzCmHopperBlack(_0x212635,_0x5d39f3,_0x4aeab9,_0x4789b7){var _0x53323f=[_0x5c7c('0x25'),_0x5c7c('0x3e'),_0x5c7c('0x27'),_0x5d39f3+'.'+_0x4789b7,'cm_contacts.createdAt',_0x5c7c('0x28')];return squel[_0x5c7c('0x2b')]()['into']('cm_hopper_black')[_0x5c7c('0x2e')]([_0x5c7c('0x10'),_0x5c7c('0x30'),_0x5c7c('0x31'),_0x4789b7,_0x5c7c('0x32'),'updatedAt'],squel[_0x5c7c('0x41')]()[_0x5c7c('0x37')](_0x53323f)['from'](_0x5d39f3)['join'](_0x5c7c('0x42'),null,_0x5c7c('0x38')+_0x5d39f3+_0x5c7c('0x39'))['join'](_0x4aeab9,null,_0x4aeab9+_0x5c7c('0x13')+_0x5d39f3+'.'+_0x4789b7)[_0x5c7c('0x3a')](_0x5d39f3+_0x5c7c('0x3b'),_0x212635)[_0x5c7c('0x3a')](_0x5c7c('0x43'),NOW)[_0x5c7c('0x3a')](_0x5c7c('0x3d'),squel[_0x5c7c('0x41')]()[_0x5c7c('0xf')]('phone')[_0x5c7c('0x11')]('cm_hopper_black')[_0x5c7c('0x3a')](_0x5c7c('0x44'),_0x212635)[_0x5c7c('0x3a')](_0x4789b7+_0x5c7c('0x14')+_0x5d39f3+'.'+_0x4789b7)))[_0x5c7c('0x45')]();}function insertCmHopperAdditionalPhones(_0x1a6738){var _0x480a1d=['cm_hopper.id',_0x5c7c('0x47'),'cm_contact_has_items.OrderBy',_0x5c7c('0x48'),'cm_contact_has_items.updatedAt'];return squel['insert']()[_0x5c7c('0x2c')](_0x5c7c('0x49'))['fromQuery'](['CmHopperId',_0x5c7c('0x10'),_0x5c7c('0x4a'),'createdAt','updatedAt'],squel[_0x5c7c('0x41')]()['fields'](_0x480a1d)['from'](_0x5c7c('0x2d'))[_0x5c7c('0x12')](_0x5c7c('0x42'),null,'cm_contacts.id\x20=\x20cm_hopper.ContactId')['join']('cm_contact_has_items',null,_0x5c7c('0x4b'))[_0x5c7c('0x3a')](_0x5c7c('0x4c'),_0x1a6738)[_0x5c7c('0x3a')](_0x5c7c('0x43'),NOW))['toString']();}function insertCmContact(_0x4f73c9,_0x117753,_0x227bc7,_0x1b0780){var _0x2c536b=_[_0x5c7c('0x4d')](_['keys'](_0x1b0780),['ListId',_0x5c7c('0x4e'),_0x5c7c('0x32'),_0x5c7c('0x33'),_0x5c7c('0x4f')]);return squel[_0x5c7c('0x2b')]()[_0x5c7c('0x2c')]('cm_contacts')[_0x5c7c('0x2e')](_0x2c536b,squel[_0x5c7c('0x41')]()[_0x5c7c('0x37')](_0x2c536b)[_0x5c7c('0x11')](_0x117753)[_0x5c7c('0x3a')]('('+_0x227bc7[_0x5c7c('0x12')](',')+_0x5c7c('0x50'),squel[_0x5c7c('0x41')]()[_0x5c7c('0x37')](_0x227bc7)[_0x5c7c('0x11')](_0x5c7c('0x42'))['where'](_0x5c7c('0x44'),_0x4f73c9)['where'](_0x5c7c('0x51')))[_0x5c7c('0x3a')](_0x5c7c('0x52'),squel[_0x5c7c('0x41')]()['field']('MIN(id)',_0x5c7c('0x53'))[_0x5c7c('0x11')](_0x117753)[_0x5c7c('0x54')](_0x227bc7[_0x5c7c('0x12')](','))))[_0x5c7c('0x45')]();}function handleStop(){logger[_0x5c7c('0x55')]('Received\x20SIGINT');stopped=!![];}function handleUncaughtException(_0x30f958){logger[_0x5c7c('0x56')](_0x30f958[_0x5c7c('0x57')]);process[_0x5c7c('0x58')](0x1);}function handleError(_0x56cb06,_0x204878){stats[_0x5c7c('0x59')][_0x5c7c('0x1a')]({'name':_0x204878[_0x5c7c('0x5a')],'message':_0x204878['message'],'row':_0x56cb06});}function handleQuery(_0x5b18aa){logger['info'](_0x5b18aa);return db['sequelize'][_0x5c7c('0x5b')](_0x5b18aa)['spread'](function(_0x5efddf){results[_0x5c7c('0x1a')](_0x5efddf);})[_0x5c7c('0x5c')](function(_0xb798a0){logger['error'](_0xb798a0[_0x5c7c('0x57')]);});}function updateTzCampaigns(_0x2e85bc){return new Promise(function(_0x4fce37,_0x3b2bc2){var _0x2fe11c=squel[_0x5c7c('0x41')]()[_0x5c7c('0x37')]([_0x5c7c('0x5d'),_0x5c7c('0x5e')])['from'](_0x5c7c('0x5f'))['join'](_0x5c7c('0x60'),null,_0x5c7c('0x61'))[_0x5c7c('0x3a')]('campaigns_has_cm_lists.CmListId='+_0x2e85bc);db[_0x5c7c('0x62')][_0x5c7c('0x5b')](_0x2fe11c[_0x5c7c('0x45')]())[_0x5c7c('0x63')](function(_0x122ae3){var _0x402b9f=[];for(var _0x572c14=0x0;_0x572c14<_0x122ae3['length'];_0x572c14++){_0x402b9f['push'](getTimezoneData(_0x122ae3[_0x572c14],tmp_campaigns));}BPromise[_0x5c7c('0x1b')](_0x402b9f)['then'](function(){_0x4fce37({'val':0x1});});})[_0x5c7c('0x5c')](function(_0x28c1ae){logger['error'](_0x28c1ae[_0x5c7c('0x57')]);_0x4fce37({'val':0x0});});});}function updateTzVoiceQueues(_0x18780f){return new Promise(function(_0xf0e1f4,_0x27cb4c){var _0x797e5c=squel[_0x5c7c('0x41')]()[_0x5c7c('0x37')]([_0x5c7c('0x64'),_0x5c7c('0x65')])[_0x5c7c('0x11')](_0x5c7c('0x66'))[_0x5c7c('0x12')](_0x5c7c('0x67'),null,'voice_queues.id\x20=\x20voice_queues_has_cm_lists.VoiceQueueId')['where'](_0x5c7c('0x68')+_0x18780f);db['sequelize'][_0x5c7c('0x5b')](_0x797e5c[_0x5c7c('0x45')]())[_0x5c7c('0x63')](function(_0x2ecf68){var _0x48d42f=[];for(var _0x38a1b3=0x0;_0x38a1b3<_0x2ecf68[_0x5c7c('0x19')];_0x38a1b3++){_0x48d42f['push'](getTimezoneData(_0x2ecf68[_0x38a1b3],tmp_voice_queues));}BPromise[_0x5c7c('0x1b')](_0x48d42f)[_0x5c7c('0x18')](function(){_0xf0e1f4({'val':0x1});});})['catch'](function(_0x1d4e3e){logger[_0x5c7c('0x56')](_0x1d4e3e[_0x5c7c('0x57')]);_0xf0e1f4({'val':0x0});});});}function getTimezoneData(_0x3b0f88,_0x2c5f53){return new Promise(function(_0x2ec8fa,_0x3bc298){var _0x538fc2=shared[_0x5c7c('0x69')];var _0x2ff114=_0x538fc2[_0x3b0f88['dialTimezone']];if(_[_0x5c7c('0x1e')](_0x2ff114)){_0x2ec8fa({'ret':0x1});}else{var _0x9697a6=_0x2ff114[_0x5c7c('0x6a')];var _0x5bd778=squel['insert']()[_0x5c7c('0x2c')](_0x2c5f53)['set']('id',_0x3b0f88['id'])[_0x5c7c('0x6b')](_0x5c7c('0x6c'),_0x9697a6)[_0x5c7c('0x6b')](_0x5c7c('0x6d'),_0x3b0f88[_0x5c7c('0x6d')])['toString']();return db[_0x5c7c('0x62')][_0x5c7c('0x5b')](_0x5bd778)[_0x5c7c('0x63')](function(_0x4c29dd){_0x2ec8fa({'ret':0x1});})[_0x5c7c('0x5c')](function(_0x2d674d){logger[_0x5c7c('0x56')](_0x2d674d['message']);_0x3bc298({'ret':0x1});});}});}function handleTZQuery(_0x60dbd1){logger['info'](_0x60dbd1);return db[_0x5c7c('0x62')]['query'](_0x60dbd1)[_0x5c7c('0x63')](function(_0x234c4d){})[_0x5c7c('0x5c')](function(_0x492a75){logger[_0x5c7c('0x56')](_0x492a75['message']);});}function main(_0x5d9a40,_0x957575,_0x3a02a9,_0x2c53b3){logger[_0x5c7c('0x55')](_0x5c7c('0x6e'),_0x5d9a40,JSON[_0x5c7c('0x6f')](_0x957575));process[_0x5c7c('0x70')]('start');var _0xfcbe60=_0x957575[_0x5c7c('0x71')];var _0x5a2f94=_[_0x5c7c('0x72')](_0xfcbe60);var _0x1aa623=_0x957575[_0x5c7c('0x73')];var _0x3df139=path['join'](config['root'],_0x5c7c('0x74'),_0x1aa623+_0x5c7c('0x75'));hasTZ=_['keys'](_0xfcbe60)['includes']('dialTimezone');var _0x224f91=_[_0x5c7c('0x76')](_0xfcbe60)[_0x5c7c('0x12')]();logger[_0x5c7c('0x55')](_0x5c7c('0x77'),_0x224f91);db[_0x5c7c('0x78')][_0x5c7c('0x17')]({'raw':!![],'attributes':['id',_0x5c7c('0x79')]})[_0x5c7c('0x18')](function(_0x115fd6){for(var _0x6685d1=0x0;_0x6685d1<_0x115fd6[_0x5c7c('0x19')];_0x6685d1++){if(_0x115fd6[_0x6685d1][_0x5c7c('0x79')]in _0xfcbe60){contactItemTypes['push'](_0x115fd6[_0x6685d1]);delete _0x5a2f94[_0x115fd6[_0x6685d1][_0x5c7c('0x79')]];hasAdditionalPhones=!![];}for(var _0xff2ae6 in _0xfcbe60){if(_0x115fd6[_0x6685d1]['name']+_0x5c7c('0x7a')===_0xff2ae6){phoneDescriptions[_0x5c7c('0x1a')]({'itemTypeId':_0x115fd6[_0x6685d1]['id'],'description':_0xff2ae6});delete _0x5a2f94[_0xff2ae6];}}}if(hasAdditionalPhones)_0x5a2f94[_0x5c7c('0x1c')]='';var _0x57f8eb=_[_0x5c7c('0x76')](_0x5a2f94)[_0x5c7c('0x12')]();logger[_0x5c7c('0x55')]('header',_0x57f8eb);fs[_0x5c7c('0x7b')](_0x3df139,_0x57f8eb+'\x0a');Papa[_0x5c7c('0x7c')](fs['createReadStream'](_0x5d9a40),{'header':!![],'skipEmptyLines':!![],'step':function(_0x32cf4f,_0x5274b1){try{for(var _0x171a8d=0x0,_0x1c9d5b=[];_0x171a8d<_0x32cf4f[_0x5c7c('0x7d')][_0x5c7c('0x19')];_0x171a8d++){stats[_0x5c7c('0x7e')]+=0x1;if(_0x32cf4f[_0x5c7c('0x59')][_0x171a8d]){handleError(_0x32cf4f[_0x5c7c('0x7d')][_0x171a8d],_0x32cf4f['errors'][_0x171a8d]);}else{var _0x3f26f8=[];var _0xfe0832=[];var _0x42fad3={};for(var _0x43c523 in _0xfcbe60){let _0x352a7e=contactItemTypes[_0x5c7c('0x7f')](_0x1d442e=>_0x1d442e['name']===_0x43c523);let _0xdb9f69=contactItemTypes[_0x5c7c('0x7f')](_0x327182=>_0x327182[_0x5c7c('0x79')]+_0x5c7c('0x7a')===_0x43c523);if(_[_0x5c7c('0x1e')](_0x352a7e)&&_['isNil'](_0xdb9f69)){if(_0xfcbe60[_0x5c7c('0x80')](_0x43c523)){if(_0x32cf4f[_0x5c7c('0x7d')][_0x171a8d][_0xfcbe60[_0x43c523]]){var _0x119506=_[_0x5c7c('0x81')](_0x32cf4f['data'][_0x171a8d][_0xfcbe60[_0x43c523]]['replace'](/"/g,'\x27'));switch(_0x43c523){case _0x5c7c('0x2f'):var _0x4cb6e8=moment(_0x119506,'YYYY-MM-DD\x20HH:mm:ss',!![]);if(_0x4cb6e8[_0x5c7c('0x82')]()){_0x1c9d5b[_0x5c7c('0x1a')]('\x22'+_0x119506+'\x22');}else{_0x3f26f8[_0x5c7c('0x1a')]('scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)');}break;case _0x5c7c('0x34'):var _0x1c3823=parseInt(_0x119506);_0x119506=_[_0x5c7c('0x83')](_0x1c3823)||_0x1c3823<0x0||_0x1c3823>0x4?_0x2c53b3?0x3:0x2:_0x1c3823;_0x1c9d5b[_0x5c7c('0x1a')]('\x22'+_0x119506+'\x22');break;case'UserId':var _0x2a848d=parseInt(_0x119506);if(_[_0x5c7c('0x84')](_0x2a848d)&&_[_0x5c7c('0x85')](_0x3a02a9,_0x2a848d)){_0x1c9d5b[_0x5c7c('0x1a')]('\x22'+_0x2a848d+'\x22');}else{_0x3f26f8['push'](_0x5c7c('0x86'));}break;case _0x5c7c('0x87'):if(isEmail(_0x119506)){_0x1c9d5b[_0x5c7c('0x1a')]('\x22'+_0x119506+'\x22');}else{_0x3f26f8[_0x5c7c('0x1a')](_0x5c7c('0x88'));}break;case'dateOfBirth':var _0x30a5c1=moment(_0x119506,'YYYY-MM-DD',!![]);if(_0x30a5c1[_0x5c7c('0x82')]()){_0x1c9d5b[_0x5c7c('0x1a')]('\x22'+_0x119506+'\x22');}else{_0x3f26f8[_0x5c7c('0x1a')](_0x5c7c('0x89'));}break;case'dialTimezone':var _0x5c5866=shared[_0x5c7c('0x69')];var _0x1bf194=_0x5c5866[_0x119506];if(!_['isNil'](_0x1bf194)){var _0x552648=_0x1bf194[_0x5c7c('0x6a')];_0x1c9d5b[_0x5c7c('0x1a')]('\x22'+_0x119506+'\x22');_0x1c9d5b['push']('\x22'+_0x552648+'\x22');}break;default:_0x1c9d5b[_0x5c7c('0x1a')]('\x22'+_0x119506+'\x22');}}else{switch(_0x43c523){case _0x5c7c('0x8a'):case'phone':_0x3f26f8[_0x5c7c('0x1a')](_0x43c523+_0x5c7c('0x8b'));break;default:_0x1c9d5b[_0x5c7c('0x1a')]('\x22\x22');}}}}else{var _0x1cb376='';if(!_[_0x5c7c('0x1e')](_0x352a7e)){if(!_0x42fad3['hasOwnProperty'](_0x352a7e['id'])){if(!_[_0x5c7c('0x1e')](_0x32cf4f[_0x5c7c('0x7d')][_0x171a8d][_0xfcbe60[_0x43c523]])){var _0x119506=_['trim'](_0x32cf4f[_0x5c7c('0x7d')][_0x171a8d][_0xfcbe60[_0x43c523]][_0x5c7c('0x8c')](/"/g,'\x27'));var _0x2aeb57=phoneDescriptions[_0x5c7c('0x7f')](_0x1d4fa0=>_0x1d4fa0[_0x5c7c('0x8d')]===_0x352a7e['id']);if(!_['isNil'](_0x2aeb57)){var _0x59163b=_[_0x5c7c('0x81')](_0x32cf4f[_0x5c7c('0x7d')][_0x171a8d][_0xfcbe60[_0x2aeb57['description']]][_0x5c7c('0x8c')](/"/g,'\x27'));if(!_[_0x5c7c('0x1e')](_0x59163b))_0x119506=_0x119506+'§'+_0x59163b;}if(_0x1cb376=='')_0x1cb376=_0x119506;else _0x1cb376+='|'+_0x119506;}_0xfe0832[_0x5c7c('0x1a')](_0x352a7e['id']+':'+_0x1cb376);_0x42fad3[_0x352a7e['id']]=0x1;}}}}if(hasAdditionalPhones){_0x1c9d5b[_0x5c7c('0x1a')]('\x22'+_0xfe0832['join'](';')+'\x22');}if(_0x3f26f8['length']){handleError(_0x32cf4f[_0x5c7c('0x7d')][_0x171a8d],{'code':_0x5c7c('0x8e'),'message':_0x3f26f8[_0x5c7c('0x12')]()});}else{fs[_0x5c7c('0x8f')](_0x3df139,_0x1c9d5b[_0x5c7c('0x12')]()+'\x0a');}_0x1c9d5b=[];}if(!(stats['rows']%0xc8)){socket['emit']('contact:import:'+_0x1aa623,stats);stats[_0x5c7c('0x59')]=[];}}if(stopped){logger[_0x5c7c('0x55')](_0x5c7c('0x90'));_0x5274b1[_0x5c7c('0x91')]();}}catch(_0x1c9e60){handleError(_0x32cf4f[_0x5c7c('0x7d')][_0x171a8d],{'code':'SystemError','message':_0x1c9e60['message']});logger[_0x5c7c('0x56')](_0x5c7c('0x92'),_0x1c9e60[_0x5c7c('0x57')]);}},'complete':function(){try{var _0x54864f=[];var _0x4bb3a3=[];var _0x5be647=_0x5c7c('0x42');if(_0x957575['duplicates']&&_0x957575[_0x5c7c('0x93')][_0x5c7c('0x19')]){_0x5be647='cm_contacts_'+_0x1aa623;_0x54864f[_0x5c7c('0x1a')](_0x5c7c('0x94')+_0x5be647+_0x5c7c('0x95'));}tmp_campaigns='campaigns_'+_0x1aa623;tmp_voice_queues=_0x5c7c('0x96')+_0x1aa623;_0x4bb3a3[_0x5c7c('0x1a')]('CREATE\x20TABLE\x20'+tmp_campaigns+'(id\x20int,dialTimezone\x20varchar(255),offset\x20int);');_0x4bb3a3[_0x5c7c('0x1a')]('CREATE\x20TABLE\x20'+tmp_voice_queues+'(id\x20int,dialTimezone\x20varchar(255),offset\x20int);');BPromise[_0x5c7c('0x97')](_0x4bb3a3,handleTZQuery)[_0x5c7c('0x18')](function(_0x49fe8b){updateTzCampaigns(_0x957575['ListId'])[_0x5c7c('0x18')](function(_0x214469){updateTzVoiceQueues(_0x957575['ListId'])[_0x5c7c('0x18')](function(_0x23d17f){if(hasTZ)_0x57f8eb=_0x57f8eb[_0x5c7c('0x8c')](_0x5c7c('0x6d'),'dialTimezone,utcOffset');var _0xc37074=util['format'](_0x5c7c('0x98'),_0x3df139,_0x5be647,_0x57f8eb,_0x957575['ListId'],_0x957575[_0x5c7c('0x4e')]||null,NOW,NOW);if(_[_0x5c7c('0x1e')](_0xfcbe60[_0x5c7c('0x2f')])){_0xc37074+=_0x5c7c('0x99');}_0x54864f['push'](_0xc37074);if(_0x957575['duplicates']&&_0x957575[_0x5c7c('0x93')][_0x5c7c('0x19')]){_0x54864f[_0x5c7c('0x1a')](insertCmContact(_0x957575['ListId'],_0x5be647,_0x957575[_0x5c7c('0x93')],_0xfcbe60));_0x54864f['push'](_0x5c7c('0x9a')+_0x5be647+';');}BPromise[_0x5c7c('0x97')](_0x54864f,handleQuery)[_0x5c7c('0x18')](function(_0x3e6f93){BPromise[_0x5c7c('0x1b')]([handleAdditionalPhones()])['then'](function(){_0x54864f=[];for(var _0x1b5a5f=0x0;_0x1b5a5f<promisesAdditionalPhones[_0x5c7c('0x19')];_0x1b5a5f++){if(promisesAdditionalPhones[_0x1b5a5f][_0x5c7c('0x10')]!='§'){_0x54864f[_0x5c7c('0x1a')](createAdditionalPhone(promisesAdditionalPhones[_0x1b5a5f][_0x5c7c('0x9b')],promisesAdditionalPhones[_0x1b5a5f][_0x5c7c('0x9c')],promisesAdditionalPhones[_0x1b5a5f][_0x5c7c('0x10')],promisesAdditionalPhones[_0x1b5a5f][_0x5c7c('0x9d')]));}}BPromise['all'](_0x54864f)[_0x5c7c('0x18')](function(){_0x54864f=[];if(hasTZ){_0x54864f[_0x5c7c('0x1a')](insertTzCmHopper(_0x957575['ListId'],_0x5c7c('0x67'),_0x5c7c('0x66'),_0x5c7c('0x9e'),_0x2c53b3,tmp_voice_queues));_0x54864f[_0x5c7c('0x1a')](insertTzCmHopperBlack(_0x957575[_0x5c7c('0x31')],_0x5c7c('0x9f'),_0x5c7c('0x66'),'VoiceQueueId'));_0x54864f[_0x5c7c('0x1a')](insertTzCmHopper(_0x957575[_0x5c7c('0x31')],_0x5c7c('0x60'),_0x5c7c('0x5f'),_0x5c7c('0xa0'),_0x2c53b3,tmp_campaigns));_0x54864f[_0x5c7c('0x1a')](insertTzCmHopperBlack(_0x957575[_0x5c7c('0x31')],_0x5c7c('0xa1'),_0x5c7c('0x5f'),'CampaignId'));_0x54864f[_0x5c7c('0x1a')](insertCmHopperAdditionalPhones(_0x957575[_0x5c7c('0x31')]));}else{_0x54864f[_0x5c7c('0x1a')](insertCmHopper(_0x957575[_0x5c7c('0x31')],_0x5c7c('0x67'),_0x5c7c('0x66'),'VoiceQueueId',_0x2c53b3));_0x54864f[_0x5c7c('0x1a')](insertCmHopperBlack(_0x957575[_0x5c7c('0x31')],'voice_queues_has_cm_blacklists',_0x5c7c('0x66'),_0x5c7c('0x9e')));_0x54864f[_0x5c7c('0x1a')](insertCmHopper(_0x957575[_0x5c7c('0x31')],'campaigns_has_cm_lists','campaigns',_0x5c7c('0xa0'),_0x2c53b3));_0x54864f['push'](insertCmHopperBlack(_0x957575[_0x5c7c('0x31')],_0x5c7c('0xa1'),_0x5c7c('0x5f'),_0x5c7c('0xa0')));_0x54864f['push'](insertCmHopperAdditionalPhones(_0x957575[_0x5c7c('0x31')]));}_0x54864f[_0x5c7c('0x1a')](_0x5c7c('0x9a')+tmp_campaigns+';');_0x54864f[_0x5c7c('0x1a')](_0x5c7c('0x9a')+tmp_voice_queues+';');BPromise[_0x5c7c('0x97')](_0x54864f,handleQuery)['then'](function(_0x22566d){stats[_0x5c7c('0xa2')]=!![];stats[_0x5c7c('0xa3')]=_0x957575[_0x5c7c('0x93')]&&_0x957575[_0x5c7c('0x93')][_0x5c7c('0x19')]?results[0x2][_0x5c7c('0xa3')]:results[0x0][_0x5c7c('0xa3')];socket[_0x5c7c('0xa4')](_0x5c7c('0xa5')+_0x1aa623,stats);fs[_0x5c7c('0xa6')](_0x5d9a40);fs['unlink'](_0x3df139);process[_0x5c7c('0x58')](0x0);})['catch'](function(_0x25cd7d){logger[_0x5c7c('0x56')](_0x25cd7d[_0x5c7c('0x57')]);process[_0x5c7c('0x58')](0x1);});});});})['catch'](function(_0x4185a1){logger['error'](_0x4185a1['message']);process['exit'](0x1);});});});});}catch(_0x461b29){logger[_0x5c7c('0x56')]('complete',_0x461b29[_0x5c7c('0x57')]);process[_0x5c7c('0x58')](0x1);}},'error':function(_0x5b5ab1,_0x382707,_0x105af4,_0x3d7321){throw new Error(_0x3d7321);}});});}function validate(){if(process[_0x5c7c('0xa7')]&&process[_0x5c7c('0xa7')][_0x5c7c('0x19')]<0x4){throw new Error(_0x5c7c('0xa8'));}var _0xf905ec=path['join'](config[_0x5c7c('0xa9')],_0x5c7c('0x74'),process['argv'][0x2]);if(!fs[_0x5c7c('0xaa')](_0xf905ec)){throw new Error(_0x5c7c('0xab'));}var _0x1bbeee={};try{_0x1bbeee=JSON[_0x5c7c('0x7c')](process[_0x5c7c('0xa7')][0x3]);if(!_0x1bbeee[_0x5c7c('0x71')]){throw new Error('binding\x20doesn\x27t\x20exists');}if(!_0x1bbeee[_0x5c7c('0x71')][_0x5c7c('0x10')]){throw new Error(_0x5c7c('0xac'));}if(!_0x1bbeee[_0x5c7c('0x71')]['firstName']){throw new Error(_0x5c7c('0xad'));}var _0xfe085a=0x0;if(_0x1bbeee['binding']['UserId']){_0xfe085a=0x1;}if(!_0x1bbeee['ListId']){throw new Error('ListId\x20is\x20mandatory');}}catch(_0x5560d2){throw new Error('body\x20id\x20mandatory');}var _0x3a1841=[];try{_0x3a1841=_[_0x5c7c('0xae')](JSON[_0x5c7c('0x7c')](process['argv'][0x4]),'id');}catch(_0x1d413b){logger[_0x5c7c('0x55')](_0x5c7c('0xaf'));}main(_0xf905ec,_0x1bbeee,_0x3a1841,_0xfe085a);}validate();process['on']('SIGINT',handleStop);process['on'](_0x5c7c('0xb0'),handleUncaughtException);
\ No newline at end of file
+var _0xf924=['catch','error','campaigns.id','campaigns.dialTimezone','campaigns_has_cm_lists','campaigns.id\x20=\x20campaigns_has_cm_lists.CampaignId','campaigns_has_cm_lists.CmListId=','voice_queues','voice_queues_has_cm_lists','voice_queues.id\x20=\x20voice_queues_has_cm_lists.VoiceQueueId','voice_queues_has_cm_lists.CmListId=','dialTimezone','utcOffset','set','offset','stringify','send','start','clone','socket_timestamp','root','server/files/tmp','includes','keys','header','ContactItemType','name','_description','writeFileSync','parse','createReadStream','data','rows','find','isNil','hasOwnProperty','trim','replace','scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)','isNumber','agent\x20not\x20exists','email\x20wrong\x20format','dateOfBirth','isValid','dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)','timezones','firstName','itemTypeId','description','SystemRow','emit','contact:import:','abort','SystemError','step','duplicates','CREATE\x20TABLE\x20','\x20LIKE\x20cm_contacts;','(id\x20int,dialTimezone\x20varchar(255),offset\x20int);','each','dialTimezone,utcOffset',',\x20scheduledAt\x20=\x20NOW()','DROP\x20TABLE\x20','contactId','contactTypeId','orderBy','VoiceQueueId','voice_queues_has_cm_blacklists','campaigns','CampaignId','campaigns_has_cm_blacklists','finish','affectedRows','unlink','argv','arguments\x20<filename>\x20<parameters>\x20<agents>','existsSync','file\x20doesn\x27t\x20exists','binding','binding\x20doesn\x27t\x20exists','phone\x20is\x20mandatory','firstName\x20is\x20mandatory','ListId\x20is\x20mandatory','map','No\x20agent\x20available','uncaughtException','lodash','papaparse','util','bluebird','moment','ioredis','../../../config/environment','../../../config/environment/shared','../../../config/logger','import','redis','defaults','localhost','socket.io-emitter','format','YYYY-MM-DD\x20HH:mm:ss','test','select','field','join','where','\x20=\x20','.dialCheckDuplicateType\x20IN\x20(','findAll','AdditionalPhones','length','then','split','push','all','filter','CmContactHasItem','findOne','update','updated','create','PHONE','cm_contacts.scheduledat','cm_contacts.id','cm_contacts.ListId','cm_contacts.createdAt','cm_contacts.updatedAt','cm_contacts.priority','cm_contacts.UserId','insert','fromQuery','phone','scheduledat','ContactId','ListId','updatedAt','priority','UserId','recallme','fields','from','cm_contacts','.CmListId','.id\x20=\x20','.CmListId\x20=\x20?','cm_contacts.createdAt\x20=\x20?','\x22always\x22','\x22onlyIfOpen\x22','cm_hopper','cm_contacts.phone','cm_hopper_black','createdAt','cm_contacts.ListId\x20=\x20','cm_contacts.phone\x20NOT\x20IN\x20(?)','toString','date_add(cm_contacts.scheduledat,interval\x20','.offset-cm_contacts.utcOffset\x20minute)','into','ListId\x20=\x20?','cm_hopper.id','cm_contact_has_items.item','cm_contact_has_items.createdAt','cm_contact_has_items.updatedAt','CmHopperId','cm_contact_has_items','cm_contacts.id\x20=\x20cm_contact_has_items.CmContactId','cm_hopper.ListId\x20=\x20?','CompanyId','scheduledAt',')\x20NOT\x20IN\x20?','deletedAt\x20IS\x20NULL','MIN(id)','min_id','group','info','Received\x20SIGINT','message','exit','errors','sequelize','query','spread'];(function(_0x42cd52,_0x55eb17){var _0x3e6b02=function(_0x257f82){while(--_0x257f82){_0x42cd52['push'](_0x42cd52['shift']());}};_0x3e6b02(++_0x55eb17);}(_0xf924,0x10d));var _0x4f92=function(_0xcc2c66,_0x27cf7b){_0xcc2c66=_0xcc2c66-0x0;var _0x2197b2=_0xf924[_0xcc2c66];return _0x2197b2;};'use strict';var fs=require('fs');var path=require('path');var _=require(_0x4f92('0x0'));var Papa=require(_0x4f92('0x1'));var util=require(_0x4f92('0x2'));var BPromise=require(_0x4f92('0x3'));var moment=require(_0x4f92('0x4'));var squel=require('squel');var Redis=require(_0x4f92('0x5'));var db=require('../../../mysqldb')['db'];var config=require(_0x4f92('0x6'));var shared=require(_0x4f92('0x7'));var logger=require(_0x4f92('0x8'))(_0x4f92('0x9'));config[_0x4f92('0xa')]=_[_0x4f92('0xb')](config[_0x4f92('0xa')],{'host':_0x4f92('0xc'),'port':0x18eb});var socket=require(_0x4f92('0xd'))(new Redis(config[_0x4f92('0xa')]));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var promisesAdditionalPhones=[];var orderBy=0x0;var stopped=![];var NOW=moment()[_0x4f92('0xe')]('YYYY-MM-DD\x20HH:mm:ss');var contactItemTypes=[];var phoneDescriptions=[];var hasAdditionalPhones=![];var tmp_voice_queues;var tmp_campaigns;var tzOffset=0x0;var hasTZ;var NOW=moment()['format'](_0x4f92('0xf'));function isEmail(_0x207e5a){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/[_0x4f92('0x10')](_0x207e5a);}function selectNotIn(_0x5d20cd,_0x2a74d5,_0x2f1009,_0x4d553b,_0x508f14){return squel[_0x4f92('0x11')]()[_0x4f92('0x12')]('phone')['from'](_0x4d553b)[_0x4f92('0x13')](_0x2a74d5,null,_0x2a74d5+'.id\x20=\x20'+_0x4d553b+'.'+_0x2f1009)[_0x4f92('0x14')](_0x4d553b+'.'+_0x2f1009+_0x4f92('0x15')+_0x5d20cd+'.'+_0x2f1009)[_0x4f92('0x14')](_0x2a74d5+_0x4f92('0x16')+_0x508f14[_0x4f92('0x13')]()+')');}function handleAdditionalPhones(){return new Promise(function(_0x3cb068,_0x171e5e){promisesAdditionalPhones=[];return db['CmContact'][_0x4f92('0x17')]({'raw':!![],'attributes':['id',_0x4f92('0x18')],'where':{'createdAt':NOW,'AdditionalPhones':{'$ne':null}}})['then'](function(_0x429ead){if(_0x429ead!==null){var _0xe28af7=[];for(var _0x415f4c=0x0;_0x415f4c<_0x429ead[_0x4f92('0x19')];_0x415f4c++){var _0x49fbe2=_0x429ead[_0x415f4c];_0xe28af7['push'](insertAdditionalPhones(_0x49fbe2));}}Promise['all'](_0xe28af7)[_0x4f92('0x1a')](function(){_0x3cb068({'val':0x1});});});});}function insertAdditionalPhones(_0x2349ff){return new Promise(function(_0x5a19e4,_0x30803c){var _0x17cb8c=_0x2349ff[_0x4f92('0x18')];var _0x308624=_0x17cb8c[_0x4f92('0x1b')](';');var _0x2c7a18=[];orderBy=0x0;for(var _0x44988a=0x0;_0x44988a<_0x308624[_0x4f92('0x19')];_0x44988a++){_0x2c7a18[_0x4f92('0x1c')](splitAdditionalPhone(_0x2349ff['id'],_0x308624[_0x44988a]));}Promise[_0x4f92('0x1d')](_0x2c7a18)[_0x4f92('0x1a')](function(){_0x5a19e4({'val':_0x308624[_0x4f92('0x19')]});});});}function splitAdditionalPhone(_0x5d99e9,_0x58f547){return new Promise(function(_0x3708b5,_0x23369f){var _0x29a4d=_0x58f547[_0x4f92('0x1b')](':');var _0x524a3b=_0x29a4d[0x0];var _0x29afaa=_0x29a4d[0x1];if(!_['isNil'](_0x29afaa)){var _0x197b2e=_0x29afaa[_0x4f92('0x1b')]('|');var _0x349fe3=[];for(var _0x23c542=0x0;_0x23c542<_0x197b2e[_0x4f92('0x19')];_0x23c542++){if(_0x197b2e[_0x23c542]!==''){var _0x4cb804=_[_0x4f92('0x1e')](promisesAdditionalPhones,{'contactId':_0x5d99e9,'phone':_0x197b2e[_0x23c542]});if(_0x4cb804['length']==0x0){orderBy++;promisesAdditionalPhones[_0x4f92('0x1c')]({'contactId':_0x5d99e9,'contactTypeId':_0x524a3b,'phone':_0x197b2e[_0x23c542],'orderBy':orderBy});}}}_0x3708b5({'ok':0x1});}else _0x3708b5({'res':0x0});});}function createAdditionalPhone(_0x42caa7,_0x6c67b,_0x5834e4,_0x6c859){var _0x14803a='';var _0x686283='';var _0x32ee8c=_0x5834e4[_0x4f92('0x1b')]('§');_0x14803a=_0x32ee8c[0x0];if(_0x32ee8c['length']==0x2)_0x686283=_0x32ee8c[0x1];return new Promise(function(_0x479504,_0x12ad3a){return db[_0x4f92('0x1f')][_0x4f92('0x20')]({'where':{'CmContactId':_0x42caa7,'item':_0x14803a}})[_0x4f92('0x1a')](function(_0x2b3e13){if(_0x2b3e13){return db[_0x4f92('0x1f')][_0x4f92('0x21')]({'ItemTypeId':_0x6c67b,'description':_0x686283,'OrderBy':_0x6c859},{'where':{'CmContactId':_0x42caa7,'item':_0x14803a}})['then'](function(_0x571fbc){_0x479504({'res':_0x4f92('0x22')});});}else{return db[_0x4f92('0x1f')][_0x4f92('0x23')]({'CmContactId':_0x42caa7,'item':_0x14803a,'description':_0x686283,'ItemTypeId':_0x6c67b,'OrderBy':_0x6c859,'ItemClass':_0x4f92('0x24')})['then'](function(_0x3edb2e){_0x479504({'res':'inserted'});});}});});}function insertCmHopper(_0x16b5e6,_0x36de80,_0x287710,_0x582a6b,_0x4f5dd9){var _0x2b3aa1=['cm_contacts.phone',_0x4f92('0x25'),_0x4f92('0x26'),_0x4f92('0x27'),_0x36de80+'.'+_0x582a6b,_0x4f92('0x28'),_0x4f92('0x29'),_0x4f92('0x2a'),_0x4f92('0x2b'),'\x22'+_0x4f5dd9+'\x22'];return squel[_0x4f92('0x2c')]()['into']('cm_hopper')[_0x4f92('0x2d')]([_0x4f92('0x2e'),_0x4f92('0x2f'),_0x4f92('0x30'),_0x4f92('0x31'),_0x582a6b,'createdAt',_0x4f92('0x32'),_0x4f92('0x33'),_0x4f92('0x34'),_0x4f92('0x35')],squel[_0x4f92('0x11')]()[_0x4f92('0x36')](_0x2b3aa1)[_0x4f92('0x37')](_0x36de80)[_0x4f92('0x13')](_0x4f92('0x38'),null,'cm_contacts.ListId\x20=\x20'+_0x36de80+_0x4f92('0x39'))[_0x4f92('0x13')](_0x287710,null,_0x287710+_0x4f92('0x3a')+_0x36de80+'.'+_0x582a6b)[_0x4f92('0x14')](_0x36de80+_0x4f92('0x3b'),_0x16b5e6)[_0x4f92('0x14')](_0x4f92('0x3c'),NOW)[_0x4f92('0x14')]('cm_contacts.phone\x20NOT\x20IN\x20(?)',selectNotIn(_0x36de80,_0x287710,_0x582a6b,'cm_hopper',[_0x4f92('0x3d'),_0x4f92('0x3e')]))[_0x4f92('0x14')]('cm_contacts.phone\x20NOT\x20IN\x20(?)',selectNotIn(_0x36de80,_0x287710,_0x582a6b,_0x4f92('0x3f'),[_0x4f92('0x3d')])))['toString']();}function insertCmHopperBlack(_0x35c524,_0x13ae5e,_0x4abd27,_0x1c63bf){var _0x1dc4c0=[_0x4f92('0x40'),_0x4f92('0x26'),_0x4f92('0x27'),_0x13ae5e+'.'+_0x1c63bf,_0x4f92('0x28'),'cm_contacts.updatedAt'];return squel[_0x4f92('0x2c')]()['into'](_0x4f92('0x41'))[_0x4f92('0x2d')]([_0x4f92('0x2e'),_0x4f92('0x30'),_0x4f92('0x31'),_0x1c63bf,_0x4f92('0x42'),_0x4f92('0x32')],squel[_0x4f92('0x11')]()[_0x4f92('0x36')](_0x1dc4c0)[_0x4f92('0x37')](_0x13ae5e)[_0x4f92('0x13')](_0x4f92('0x38'),null,_0x4f92('0x43')+_0x13ae5e+_0x4f92('0x39'))['join'](_0x4abd27,null,_0x4abd27+'.id\x20=\x20'+_0x13ae5e+'.'+_0x1c63bf)[_0x4f92('0x14')](_0x13ae5e+_0x4f92('0x3b'),_0x35c524)[_0x4f92('0x14')](_0x4f92('0x3c'),NOW)['where'](_0x4f92('0x44'),squel['select']()[_0x4f92('0x12')](_0x4f92('0x2e'))[_0x4f92('0x37')]('cm_hopper_black')[_0x4f92('0x14')]('ListId\x20=\x20?',_0x35c524)['where'](_0x1c63bf+'\x20=\x20'+_0x13ae5e+'.'+_0x1c63bf)))[_0x4f92('0x45')]();}function insertTzCmHopper(_0x2826bf,_0x2bd20b,_0x1e1e3a,_0x2c6fb0,_0x3bf4f2,_0x2888f1){var _0x2824c4=[_0x4f92('0x40'),_0x4f92('0x46')+_0x2888f1+_0x4f92('0x47'),_0x4f92('0x26'),_0x4f92('0x27'),_0x2bd20b+'.'+_0x2c6fb0,_0x4f92('0x28'),_0x4f92('0x29'),_0x4f92('0x2a'),_0x4f92('0x2b'),'\x22'+_0x3bf4f2+'\x22'];var _0x25ca6d=squel[_0x4f92('0x2c')]()[_0x4f92('0x48')](_0x4f92('0x3f'))['fromQuery'](['phone',_0x4f92('0x2f'),_0x4f92('0x30'),_0x4f92('0x31'),_0x2c6fb0,'createdAt',_0x4f92('0x32'),_0x4f92('0x33'),_0x4f92('0x34'),_0x4f92('0x35')],squel['select']()['fields'](_0x2824c4)[_0x4f92('0x37')](_0x2bd20b)[_0x4f92('0x13')](_0x4f92('0x38'),null,_0x4f92('0x43')+_0x2bd20b+_0x4f92('0x39'))[_0x4f92('0x13')](_0x1e1e3a,null,_0x1e1e3a+'.id\x20=\x20'+_0x2bd20b+'.'+_0x2c6fb0)[_0x4f92('0x13')](_0x2888f1,null,_0x2888f1+'.id\x20=\x20'+_0x2bd20b+'.'+_0x2c6fb0)['where'](_0x2bd20b+_0x4f92('0x3b'),_0x2826bf)[_0x4f92('0x14')](_0x4f92('0x3c'),NOW)[_0x4f92('0x14')](_0x4f92('0x44'),selectNotIn(_0x2bd20b,_0x1e1e3a,_0x2c6fb0,_0x4f92('0x3f'),[_0x4f92('0x3d'),_0x4f92('0x3e')]))[_0x4f92('0x14')]('cm_contacts.phone\x20NOT\x20IN\x20(?)',selectNotIn(_0x2bd20b,_0x1e1e3a,_0x2c6fb0,_0x4f92('0x3f'),['\x22always\x22'])))[_0x4f92('0x45')]();return _0x25ca6d;}function insertTzCmHopperBlack(_0x31b953,_0x5bbfc1,_0x5708eb,_0x44ae94){var _0x107503=[_0x4f92('0x40'),_0x4f92('0x26'),_0x4f92('0x27'),_0x5bbfc1+'.'+_0x44ae94,_0x4f92('0x28'),'cm_contacts.updatedAt'];return squel[_0x4f92('0x2c')]()['into']('cm_hopper_black')['fromQuery']([_0x4f92('0x2e'),_0x4f92('0x30'),_0x4f92('0x31'),_0x44ae94,_0x4f92('0x42'),'updatedAt'],squel[_0x4f92('0x11')]()[_0x4f92('0x36')](_0x107503)[_0x4f92('0x37')](_0x5bbfc1)[_0x4f92('0x13')](_0x4f92('0x38'),null,_0x4f92('0x43')+_0x5bbfc1+'.CmListId')['join'](_0x5708eb,null,_0x5708eb+_0x4f92('0x3a')+_0x5bbfc1+'.'+_0x44ae94)[_0x4f92('0x14')](_0x5bbfc1+'.CmListId\x20=\x20?',_0x31b953)[_0x4f92('0x14')](_0x4f92('0x3c'),NOW)[_0x4f92('0x14')](_0x4f92('0x44'),squel[_0x4f92('0x11')]()[_0x4f92('0x12')](_0x4f92('0x2e'))[_0x4f92('0x37')](_0x4f92('0x41'))[_0x4f92('0x14')](_0x4f92('0x49'),_0x31b953)[_0x4f92('0x14')](_0x44ae94+_0x4f92('0x15')+_0x5bbfc1+'.'+_0x44ae94)))[_0x4f92('0x45')]();}function insertCmHopperAdditionalPhones(_0x2c8554){var _0x4be4e7=[_0x4f92('0x4a'),_0x4f92('0x4b'),'cm_contact_has_items.OrderBy',_0x4f92('0x4c'),_0x4f92('0x4d')];return squel[_0x4f92('0x2c')]()[_0x4f92('0x48')]('cm_hopper_additional_phones')[_0x4f92('0x2d')]([_0x4f92('0x4e'),_0x4f92('0x2e'),'OrderBy',_0x4f92('0x42'),_0x4f92('0x32')],squel[_0x4f92('0x11')]()[_0x4f92('0x36')](_0x4be4e7)[_0x4f92('0x37')](_0x4f92('0x3f'))[_0x4f92('0x13')](_0x4f92('0x38'),null,'cm_contacts.id\x20=\x20cm_hopper.ContactId')[_0x4f92('0x13')](_0x4f92('0x4f'),null,_0x4f92('0x50'))[_0x4f92('0x14')](_0x4f92('0x51'),_0x2c8554)[_0x4f92('0x14')](_0x4f92('0x3c'),NOW))[_0x4f92('0x45')]();}function insertCmContact(_0x5965c1,_0xb9e99c,_0x281d85,_0x301f35){var _0x13546d=_['concat'](_['keys'](_0x301f35),[_0x4f92('0x31'),_0x4f92('0x52'),_0x4f92('0x42'),_0x4f92('0x32'),_0x4f92('0x53')]);return squel[_0x4f92('0x2c')]()[_0x4f92('0x48')](_0x4f92('0x38'))[_0x4f92('0x2d')](_0x13546d,squel[_0x4f92('0x11')]()[_0x4f92('0x36')](_0x13546d)[_0x4f92('0x37')](_0xb9e99c)[_0x4f92('0x14')]('('+_0x281d85[_0x4f92('0x13')](',')+_0x4f92('0x54'),squel[_0x4f92('0x11')]()[_0x4f92('0x36')](_0x281d85)[_0x4f92('0x37')](_0x4f92('0x38'))[_0x4f92('0x14')](_0x4f92('0x49'),_0x5965c1)['where'](_0x4f92('0x55')))[_0x4f92('0x14')]('id\x20IN\x20?',squel['select']()[_0x4f92('0x12')](_0x4f92('0x56'),_0x4f92('0x57'))[_0x4f92('0x37')](_0xb9e99c)[_0x4f92('0x58')](_0x281d85[_0x4f92('0x13')](','))))[_0x4f92('0x45')]();}function handleStop(){logger[_0x4f92('0x59')](_0x4f92('0x5a'));stopped=!![];}function handleUncaughtException(_0x5bffb0){logger['error'](_0x5bffb0[_0x4f92('0x5b')]);process[_0x4f92('0x5c')](0x1);}function handleError(_0x24e21,_0x277376){stats[_0x4f92('0x5d')][_0x4f92('0x1c')]({'name':_0x277376['code'],'message':_0x277376[_0x4f92('0x5b')],'row':_0x24e21});}function handleQuery(_0x3495b8){logger[_0x4f92('0x59')](_0x3495b8);return db[_0x4f92('0x5e')][_0x4f92('0x5f')](_0x3495b8)[_0x4f92('0x60')](function(_0x575975){results[_0x4f92('0x1c')](_0x575975);})[_0x4f92('0x61')](function(_0x16920a){logger[_0x4f92('0x62')](_0x16920a['message']);});}function updateTzCampaigns(_0x1e7265){return new Promise(function(_0xb2c310,_0x989f1e){var _0x3d4de8=squel[_0x4f92('0x11')]()[_0x4f92('0x36')]([_0x4f92('0x63'),_0x4f92('0x64')])[_0x4f92('0x37')]('campaigns')[_0x4f92('0x13')](_0x4f92('0x65'),null,_0x4f92('0x66'))[_0x4f92('0x14')](_0x4f92('0x67')+_0x1e7265);db['sequelize']['query'](_0x3d4de8[_0x4f92('0x45')]())['spread'](function(_0x3276f3){var _0x4e3a58=[];for(var _0x101e55=0x0;_0x101e55<_0x3276f3[_0x4f92('0x19')];_0x101e55++){_0x4e3a58['push'](getTimezoneData(_0x3276f3[_0x101e55],tmp_campaigns));}BPromise[_0x4f92('0x1d')](_0x4e3a58)['then'](function(){_0xb2c310({'val':0x1});});})[_0x4f92('0x61')](function(_0xa8d581){logger[_0x4f92('0x62')](_0xa8d581['message']);_0xb2c310({'val':0x0});});});}function updateTzVoiceQueues(_0x1bae7c){return new Promise(function(_0x2ef6c2,_0xeac925){var _0x434f14=squel[_0x4f92('0x11')]()[_0x4f92('0x36')](['voice_queues.id','voice_queues.dialTimezone'])[_0x4f92('0x37')](_0x4f92('0x68'))[_0x4f92('0x13')](_0x4f92('0x69'),null,_0x4f92('0x6a'))[_0x4f92('0x14')](_0x4f92('0x6b')+_0x1bae7c);db[_0x4f92('0x5e')][_0x4f92('0x5f')](_0x434f14[_0x4f92('0x45')]())[_0x4f92('0x60')](function(_0x22d62c){var _0x5c3693=[];for(var _0xa431ca=0x0;_0xa431ca<_0x22d62c['length'];_0xa431ca++){_0x5c3693['push'](getTimezoneData(_0x22d62c[_0xa431ca],tmp_voice_queues));}BPromise['all'](_0x5c3693)[_0x4f92('0x1a')](function(){_0x2ef6c2({'val':0x1});});})[_0x4f92('0x61')](function(_0x4a4716){logger[_0x4f92('0x62')](_0x4a4716['message']);_0x2ef6c2({'val':0x0});});});}function getTimezoneData(_0x1e54e4,_0x4ea665){return new Promise(function(_0x461e69,_0xc99deb){var _0xecf8dc=shared['timezones'];var _0x5c703f=_0xecf8dc[_0x1e54e4[_0x4f92('0x6c')]];if(_['isNil'](_0x5c703f)){_0x461e69({'ret':0x1});}else{var _0x266b11=_0x5c703f[_0x4f92('0x6d')];var _0x211b5b=squel[_0x4f92('0x2c')]()[_0x4f92('0x48')](_0x4ea665)[_0x4f92('0x6e')]('id',_0x1e54e4['id'])['set'](_0x4f92('0x6f'),_0x266b11)[_0x4f92('0x6e')]('dialTimezone',_0x1e54e4[_0x4f92('0x6c')])[_0x4f92('0x45')]();return db[_0x4f92('0x5e')][_0x4f92('0x5f')](_0x211b5b)[_0x4f92('0x60')](function(_0xe83af1){_0x461e69({'ret':0x1});})[_0x4f92('0x61')](function(_0x2e9fe2){logger['error'](_0x2e9fe2[_0x4f92('0x5b')]);_0xc99deb({'ret':0x1});});}});}function handleTZQuery(_0x2af540){logger[_0x4f92('0x59')](_0x2af540);return db[_0x4f92('0x5e')][_0x4f92('0x5f')](_0x2af540)[_0x4f92('0x60')](function(_0x236bf3){})[_0x4f92('0x61')](function(_0x1dfde5){logger['error'](_0x1dfde5[_0x4f92('0x5b')]);});}function main(_0x1cc41b,_0x2c51c9,_0x5f5016,_0x27e88f){logger[_0x4f92('0x59')]('main',_0x1cc41b,JSON[_0x4f92('0x70')](_0x2c51c9));process[_0x4f92('0x71')](_0x4f92('0x72'));var _0x40d117=_0x2c51c9['binding'];var _0xe75100=_[_0x4f92('0x73')](_0x40d117);var _0x2315c2=_0x2c51c9[_0x4f92('0x74')];var _0x30478f=path[_0x4f92('0x13')](config[_0x4f92('0x75')],_0x4f92('0x76'),_0x2315c2+'.csv');hasTZ=_['keys'](_0x40d117)[_0x4f92('0x77')](_0x4f92('0x6c'));var _0xe28bb2=_[_0x4f92('0x78')](_0x40d117)['join']();logger['info'](_0x4f92('0x79'),_0xe28bb2);db[_0x4f92('0x7a')][_0x4f92('0x17')]({'raw':!![],'attributes':['id',_0x4f92('0x7b')]})[_0x4f92('0x1a')](function(_0x3f1912){for(var _0x124837=0x0;_0x124837<_0x3f1912[_0x4f92('0x19')];_0x124837++){if(_0x3f1912[_0x124837]['name']in _0x40d117){contactItemTypes[_0x4f92('0x1c')](_0x3f1912[_0x124837]);delete _0xe75100[_0x3f1912[_0x124837]['name']];hasAdditionalPhones=!![];}for(var _0x4892e6 in _0x40d117){if(_0x3f1912[_0x124837][_0x4f92('0x7b')]+_0x4f92('0x7c')===_0x4892e6){phoneDescriptions[_0x4f92('0x1c')]({'itemTypeId':_0x3f1912[_0x124837]['id'],'description':_0x4892e6});delete _0xe75100[_0x4892e6];}}}if(hasAdditionalPhones)_0xe75100[_0x4f92('0x18')]='';var _0x494cf3=_[_0x4f92('0x78')](_0xe75100)[_0x4f92('0x13')]();logger[_0x4f92('0x59')](_0x4f92('0x79'),_0x494cf3);fs[_0x4f92('0x7d')](_0x30478f,_0x494cf3+'\x0a');Papa[_0x4f92('0x7e')](fs[_0x4f92('0x7f')](_0x1cc41b),{'header':!![],'skipEmptyLines':!![],'step':function(_0x454604,_0x1dfed3){try{for(var _0x3707d1=0x0,_0xf4cda8=[];_0x3707d1<_0x454604[_0x4f92('0x80')][_0x4f92('0x19')];_0x3707d1++){stats[_0x4f92('0x81')]+=0x1;if(_0x454604[_0x4f92('0x5d')][_0x3707d1]){handleError(_0x454604[_0x4f92('0x80')][_0x3707d1],_0x454604[_0x4f92('0x5d')][_0x3707d1]);}else{var _0x1bfd6b=[];var _0xe75bef=[];var _0x188923={};for(var _0x292148 in _0x40d117){let _0x4dc149=contactItemTypes['find'](_0x4c6b61=>_0x4c6b61['name']===_0x292148);let _0x5df1f3=contactItemTypes[_0x4f92('0x82')](_0x266e67=>_0x266e67[_0x4f92('0x7b')]+'_description'===_0x292148);if(_[_0x4f92('0x83')](_0x4dc149)&&_[_0x4f92('0x83')](_0x5df1f3)){if(_0x40d117[_0x4f92('0x84')](_0x292148)){if(_0x454604[_0x4f92('0x80')][_0x3707d1][_0x40d117[_0x292148]]){var _0xd70a9=_[_0x4f92('0x85')](_0x454604[_0x4f92('0x80')][_0x3707d1][_0x40d117[_0x292148]][_0x4f92('0x86')](/"/g,'\x27'));switch(_0x292148){case'scheduledat':var _0x3aa8fa=moment(_0xd70a9,_0x4f92('0xf'),!![]);if(_0x3aa8fa['isValid']()){_0xf4cda8[_0x4f92('0x1c')]('\x22'+_0xd70a9+'\x22');}else{_0x1bfd6b['push'](_0x4f92('0x87'));}break;case _0x4f92('0x33'):var _0x2c45f0=parseInt(_0xd70a9);_0xd70a9=_['isNaN'](_0x2c45f0)||_0x2c45f0<0x0||_0x2c45f0>0x4?_0x27e88f?0x3:0x2:_0x2c45f0;_0xf4cda8[_0x4f92('0x1c')]('\x22'+_0xd70a9+'\x22');break;case _0x4f92('0x34'):var _0x52f2da=parseInt(_0xd70a9);if(_[_0x4f92('0x88')](_0x52f2da)&&_['includes'](_0x5f5016,_0x52f2da)){_0xf4cda8['push']('\x22'+_0x52f2da+'\x22');}else{_0x1bfd6b[_0x4f92('0x1c')](_0x4f92('0x89'));}break;case'email':if(isEmail(_0xd70a9)){_0xf4cda8[_0x4f92('0x1c')]('\x22'+_0xd70a9+'\x22');}else{_0x1bfd6b[_0x4f92('0x1c')](_0x4f92('0x8a'));}break;case _0x4f92('0x8b'):var _0x47ae10=moment(_0xd70a9,'YYYY-MM-DD',!![]);if(_0x47ae10[_0x4f92('0x8c')]()){_0xf4cda8['push']('\x22'+_0xd70a9+'\x22');}else{_0x1bfd6b[_0x4f92('0x1c')](_0x4f92('0x8d'));}break;case _0x4f92('0x6c'):var _0x32693d=shared[_0x4f92('0x8e')];var _0x208218=_0x32693d[_0xd70a9];if(!_[_0x4f92('0x83')](_0x208218)){var _0x8f26e4=_0x208218['utcOffset'];_0xf4cda8[_0x4f92('0x1c')]('\x22'+_0xd70a9+'\x22');_0xf4cda8[_0x4f92('0x1c')]('\x22'+_0x8f26e4+'\x22');}break;default:_0xf4cda8['push']('\x22'+_0xd70a9+'\x22');}}else{switch(_0x292148){case _0x4f92('0x8f'):case'phone':_0x1bfd6b['push'](_0x292148+'\x20not\x20specified');break;default:_0xf4cda8[_0x4f92('0x1c')]('\x22\x22');}}}}else{var _0x2a63fa='';if(!_[_0x4f92('0x83')](_0x4dc149)){if(!_0x188923[_0x4f92('0x84')](_0x4dc149['id'])){if(!_['isNil'](_0x454604['data'][_0x3707d1][_0x40d117[_0x292148]])){var _0xd70a9=_[_0x4f92('0x85')](_0x454604[_0x4f92('0x80')][_0x3707d1][_0x40d117[_0x292148]][_0x4f92('0x86')](/"/g,'\x27'));var _0x5e9f63=phoneDescriptions[_0x4f92('0x82')](_0x1ed324=>_0x1ed324[_0x4f92('0x90')]===_0x4dc149['id']);if(!_[_0x4f92('0x83')](_0x5e9f63)){var _0x3ed53b=_['trim'](_0x454604['data'][_0x3707d1][_0x40d117[_0x5e9f63[_0x4f92('0x91')]]]['replace'](/"/g,'\x27'));if(!_[_0x4f92('0x83')](_0x3ed53b))_0xd70a9=_0xd70a9+'§'+_0x3ed53b;}if(_0x2a63fa=='')_0x2a63fa=_0xd70a9;else _0x2a63fa+='|'+_0xd70a9;}_0xe75bef[_0x4f92('0x1c')](_0x4dc149['id']+':'+_0x2a63fa);_0x188923[_0x4dc149['id']]=0x1;}}}}if(hasAdditionalPhones){_0xf4cda8[_0x4f92('0x1c')]('\x22'+_0xe75bef[_0x4f92('0x13')](';')+'\x22');}if(_0x1bfd6b[_0x4f92('0x19')]){handleError(_0x454604[_0x4f92('0x80')][_0x3707d1],{'code':_0x4f92('0x92'),'message':_0x1bfd6b['join']()});}else{fs['appendFileSync'](_0x30478f,_0xf4cda8[_0x4f92('0x13')]()+'\x0a');}_0xf4cda8=[];}if(!(stats[_0x4f92('0x81')]%0xc8)){socket[_0x4f92('0x93')](_0x4f92('0x94')+_0x2315c2,stats);stats[_0x4f92('0x5d')]=[];}}if(stopped){logger['info']('Abort\x20parser');_0x1dfed3[_0x4f92('0x95')]();}}catch(_0x1620e2){handleError(_0x454604['data'][_0x3707d1],{'code':_0x4f92('0x96'),'message':_0x1620e2[_0x4f92('0x5b')]});logger['error'](_0x4f92('0x97'),_0x1620e2[_0x4f92('0x5b')]);}},'complete':function(){try{var _0x45bad2=[];var _0x5885e3=[];var _0x44121b=_0x4f92('0x38');if(_0x2c51c9[_0x4f92('0x98')]&&_0x2c51c9[_0x4f92('0x98')][_0x4f92('0x19')]){_0x44121b='cm_contacts_'+_0x2315c2;_0x45bad2[_0x4f92('0x1c')](_0x4f92('0x99')+_0x44121b+_0x4f92('0x9a'));}tmp_campaigns='campaigns_'+_0x2315c2;tmp_voice_queues='voice_queues_'+_0x2315c2;_0x5885e3['push'](_0x4f92('0x99')+tmp_campaigns+'(id\x20int,dialTimezone\x20varchar(255),offset\x20int);');_0x5885e3[_0x4f92('0x1c')](_0x4f92('0x99')+tmp_voice_queues+_0x4f92('0x9b'));BPromise[_0x4f92('0x9c')](_0x5885e3,handleTZQuery)[_0x4f92('0x1a')](function(_0x37442a){updateTzCampaigns(_0x2c51c9[_0x4f92('0x31')])[_0x4f92('0x1a')](function(_0x49fcd4){updateTzVoiceQueues(_0x2c51c9['ListId'])[_0x4f92('0x1a')](function(_0x461d1f){if(hasTZ)_0x494cf3=_0x494cf3[_0x4f92('0x86')]('dialTimezone',_0x4f92('0x9d'));var _0x219868=util[_0x4f92('0xe')]('LOAD\x20DATA\x20LOCAL\x20INFILE\x20\x27%s\x27\x20INTO\x20TABLE\x20%s\x20CHARACTER\x20SET\x20UTF8\x20FIELDS\x20TERMINATED\x20BY\x20\x27,\x27\x20ENCLOSED\x20BY\x20\x27\x22\x27\x20LINES\x20TERMINATED\x20BY\x20\x27\x0a\x27\x20IGNORE\x201\x20ROWS\x20(%s)\x20SET\x20id\x20=\x20NULL,\x20ListId\x20=\x20%s,\x20CompanyId\x20=\x20%s,\x20createdAt\x20=\x20\x27%s\x27,\x20updatedAt\x20=\x20\x27%s\x27',_0x30478f,_0x44121b,_0x494cf3,_0x2c51c9[_0x4f92('0x31')],_0x2c51c9[_0x4f92('0x52')]||null,NOW,NOW);if(_[_0x4f92('0x83')](_0x40d117['scheduledat'])){_0x219868+=_0x4f92('0x9e');}_0x45bad2[_0x4f92('0x1c')](_0x219868);if(_0x2c51c9[_0x4f92('0x98')]&&_0x2c51c9[_0x4f92('0x98')][_0x4f92('0x19')]){_0x45bad2[_0x4f92('0x1c')](insertCmContact(_0x2c51c9[_0x4f92('0x31')],_0x44121b,_0x2c51c9[_0x4f92('0x98')],_0x40d117));_0x45bad2['push'](_0x4f92('0x9f')+_0x44121b+';');}BPromise[_0x4f92('0x9c')](_0x45bad2,handleQuery)[_0x4f92('0x1a')](function(_0x564653){BPromise[_0x4f92('0x1d')]([handleAdditionalPhones()])[_0x4f92('0x1a')](function(){_0x45bad2=[];for(var _0x2744f2=0x0;_0x2744f2<promisesAdditionalPhones['length'];_0x2744f2++){if(promisesAdditionalPhones[_0x2744f2]['phone']!='§'){_0x45bad2[_0x4f92('0x1c')](createAdditionalPhone(promisesAdditionalPhones[_0x2744f2][_0x4f92('0xa0')],promisesAdditionalPhones[_0x2744f2][_0x4f92('0xa1')],promisesAdditionalPhones[_0x2744f2][_0x4f92('0x2e')],promisesAdditionalPhones[_0x2744f2][_0x4f92('0xa2')]));}}BPromise['all'](_0x45bad2)['then'](function(){_0x45bad2=[];if(hasTZ){_0x45bad2['push'](insertTzCmHopper(_0x2c51c9['ListId'],_0x4f92('0x69'),_0x4f92('0x68'),_0x4f92('0xa3'),_0x27e88f,tmp_voice_queues));_0x45bad2[_0x4f92('0x1c')](insertTzCmHopperBlack(_0x2c51c9['ListId'],_0x4f92('0xa4'),_0x4f92('0x68'),_0x4f92('0xa3')));_0x45bad2[_0x4f92('0x1c')](insertTzCmHopper(_0x2c51c9[_0x4f92('0x31')],_0x4f92('0x65'),_0x4f92('0xa5'),_0x4f92('0xa6'),_0x27e88f,tmp_campaigns));_0x45bad2['push'](insertTzCmHopperBlack(_0x2c51c9['ListId'],_0x4f92('0xa7'),_0x4f92('0xa5'),_0x4f92('0xa6')));_0x45bad2[_0x4f92('0x1c')](insertCmHopperAdditionalPhones(_0x2c51c9[_0x4f92('0x31')]));}else{_0x45bad2['push'](insertCmHopper(_0x2c51c9['ListId'],_0x4f92('0x69'),'voice_queues',_0x4f92('0xa3'),_0x27e88f));_0x45bad2[_0x4f92('0x1c')](insertCmHopperBlack(_0x2c51c9[_0x4f92('0x31')],_0x4f92('0xa4'),'voice_queues',_0x4f92('0xa3')));_0x45bad2[_0x4f92('0x1c')](insertCmHopper(_0x2c51c9[_0x4f92('0x31')],_0x4f92('0x65'),_0x4f92('0xa5'),_0x4f92('0xa6'),_0x27e88f));_0x45bad2['push'](insertCmHopperBlack(_0x2c51c9['ListId'],_0x4f92('0xa7'),_0x4f92('0xa5'),_0x4f92('0xa6')));_0x45bad2[_0x4f92('0x1c')](insertCmHopperAdditionalPhones(_0x2c51c9[_0x4f92('0x31')]));}_0x45bad2[_0x4f92('0x1c')]('DROP\x20TABLE\x20'+tmp_campaigns+';');_0x45bad2[_0x4f92('0x1c')](_0x4f92('0x9f')+tmp_voice_queues+';');BPromise['each'](_0x45bad2,handleQuery)[_0x4f92('0x1a')](function(_0x5e33ce){stats[_0x4f92('0xa8')]=!![];stats[_0x4f92('0xa9')]=_0x2c51c9[_0x4f92('0x98')]&&_0x2c51c9['duplicates'][_0x4f92('0x19')]?results[0x2]['affectedRows']:results[0x0][_0x4f92('0xa9')];socket[_0x4f92('0x93')](_0x4f92('0x94')+_0x2315c2,stats);fs[_0x4f92('0xaa')](_0x1cc41b);fs[_0x4f92('0xaa')](_0x30478f);process[_0x4f92('0x5c')](0x0);})[_0x4f92('0x61')](function(_0x48a91b){logger['error'](_0x48a91b['message']);process[_0x4f92('0x5c')](0x1);});});});})['catch'](function(_0xd09e6b){logger[_0x4f92('0x62')](_0xd09e6b['message']);process[_0x4f92('0x5c')](0x1);});});});});}catch(_0x1a08b5){logger[_0x4f92('0x62')]('complete',_0x1a08b5[_0x4f92('0x5b')]);process[_0x4f92('0x5c')](0x1);}},'error':function(_0x2d5b69,_0x54ffef,_0x3fa078,_0x27a843){throw new Error(_0x27a843);}});});}function validate(){if(process[_0x4f92('0xab')]&&process[_0x4f92('0xab')]['length']<0x4){throw new Error(_0x4f92('0xac'));}var _0xbbd60b=path[_0x4f92('0x13')](config[_0x4f92('0x75')],'server/files/tmp',process['argv'][0x2]);if(!fs[_0x4f92('0xad')](_0xbbd60b)){throw new Error(_0x4f92('0xae'));}var _0x67331f={};try{_0x67331f=JSON[_0x4f92('0x7e')](process[_0x4f92('0xab')][0x3]);if(!_0x67331f[_0x4f92('0xaf')]){throw new Error(_0x4f92('0xb0'));}if(!_0x67331f[_0x4f92('0xaf')][_0x4f92('0x2e')]){throw new Error(_0x4f92('0xb1'));}if(!_0x67331f['binding']['firstName']){throw new Error(_0x4f92('0xb2'));}var _0x186656=0x0;if(_0x67331f[_0x4f92('0xaf')][_0x4f92('0x34')]){_0x186656=0x1;}if(!_0x67331f[_0x4f92('0x31')]){throw new Error(_0x4f92('0xb3'));}}catch(_0x252a81){throw new Error('body\x20id\x20mandatory');}var _0x31cdab=[];try{_0x31cdab=_[_0x4f92('0xb4')](JSON[_0x4f92('0x7e')](process[_0x4f92('0xab')][0x4]),'id');}catch(_0x310521){logger[_0x4f92('0x59')](_0x4f92('0xb5'));}main(_0xbbd60b,_0x67331f,_0x31cdab,_0x186656);}validate();process['on']('SIGINT',handleStop);process['on'](_0x4f92('0xb6'),handleUncaughtException);
\ No newline at end of file
index 51984db..5804467 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4910=['each','unlink','complete','argv','arguments\x20<filename>\x20<parameters>\x20<agents>','existsSync','binding\x20doesn\x27t\x20exists','ListId\x20is\x20mandatory','body\x20id\x20mandatory','map','SIGINT','path','lodash','papaparse','bluebird','moment','squel','ioredis','../../../mysqldb','../../../config/logger','import','redis','defaults','socket.io-emitter','format','YYYY-MM-DD\x20HH:mm:ss','cm_contacts_temp_','YYYYMMDDHHmmss','test','select','field','phone','from','.id\x20=\x20','\x20=\x20','join','sequelize','query','select\x20*\x20from\x20','spread','isNil','AdditionalPhones','push','all','then','error','length','split','filter','CmContactHasItem','findOne','update','updated','create','inserted','CmContact','CmHopper','cm_contacts.phone','cm_contacts.scheduledat','cm_contacts.createdAt','cm_contacts.updatedAt','cm_contacts.priority','insert','cm_hopper','scheduledat','ContactId','updatedAt','priority','UserId','fields','cm_contacts','cm_contacts.ListId\x20=\x20','.CmListId','where','.CmListId\x20=\x20?','cm_contacts.createdAt\x20=\x20?','cm_contacts.phone\x20NOT\x20IN\x20(?)','\x22always\x22','toString','cm_contacts.id','ListId','createdAt','cm_hopper_black','ListId\x20=\x20?','\x20=\x20?','cm_hopper.id','cm_contact_has_items.item','cm_contact_has_items.OrderBy','into','cm_hopper_additional_phones','CmHopperId','OrderBy','cm_contact_has_items','cm_contacts.id\x20=\x20cm_contact_has_items.CmContactId','cm_hopper.ListId\x20=\x20?','concat','keys','CompanyId','fromQuery',')\x20NOT\x20IN\x20?','id\x20IN\x20?','group','info','Received\x20SIGINT','message','exit','catch','main','stringify','start','binding','clone','root','server/files/tmp','body','ContactItemType','findAll','name','_description','header','parse','createReadStream','data','errors','find','hasOwnProperty','trim','replace','isValid','scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)','isNaN','isNumber','includes','agent\x20not\x20exists','email\x20wrong\x20format','dateOfBirth','YYYY-MM-DD','dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)','firstName','\x20not\x20specified','itemTypeId','description','SystemRow','appendFileSync','rows','emit','contact:import:','Abort\x20parser','abort','SystemError','CIS\x20len',',\x20scheduledAt\x20=\x20NOW()','contactId','orderBy'];(function(_0x749c41,_0x814a97){var _0x193046=function(_0x5ba05c){while(--_0x5ba05c){_0x749c41['push'](_0x749c41['shift']());}};_0x193046(++_0x814a97);}(_0x4910,0x1d9));var _0x0491=function(_0x502c7d,_0x2f1285){_0x502c7d=_0x502c7d-0x0;var _0x30b7ed=_0x4910[_0x502c7d];return _0x30b7ed;};'use strict';var fs=require('fs');var path=require(_0x0491('0x0'));var _=require(_0x0491('0x1'));var Papa=require(_0x0491('0x2'));var util=require('util');var BPromise=require(_0x0491('0x3'));var moment=require(_0x0491('0x4'));var squel=require(_0x0491('0x5'));var Redis=require(_0x0491('0x6'));var db=require(_0x0491('0x7'))['db'];var config=require('../../../config/environment');var logger=require(_0x0491('0x8'))(_0x0491('0x9'));config[_0x0491('0xa')]=_[_0x0491('0xb')](config[_0x0491('0xa')],{'host':'localhost','port':0x18eb});var socket=require(_0x0491('0xc'))(new Redis(config[_0x0491('0xa')]));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var promisesAdditionalPhones=[];var promisesContact=[];var orderBy=0x0;var updatedRows=0x0;var stopped=![];var NOW=moment()[_0x0491('0xd')](_0x0491('0xe'));var tempTableName=_0x0491('0xf')+moment()['format'](_0x0491('0x10'));var contactItemTypes=[];var phoneDescriptions=[];var hasAdditionalPhones=![];function isEmail(_0x51bd65){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/[_0x0491('0x11')](_0x51bd65);}function selectNotIn(_0x1b57a1,_0x3ff9c6,_0x108308,_0x3b8318,_0x12ab48){return squel[_0x0491('0x12')]()[_0x0491('0x13')](_0x0491('0x14'))[_0x0491('0x15')](_0x3b8318)['join'](_0x3ff9c6,null,_0x3ff9c6+_0x0491('0x16')+_0x3b8318+'.'+_0x108308)['where'](_0x3b8318+'.'+_0x108308+_0x0491('0x17')+_0x1b57a1+'.'+_0x108308)['where'](_0x3ff9c6+'.dialCheckDuplicateType\x20IN\x20('+_0x12ab48[_0x0491('0x18')]()+')');}function handleAdditionalPhones(){return new Promise(function(_0x7ba36,_0x439f5c){promisesAdditionalPhones=[];promisesContact=[];return db[_0x0491('0x19')][_0x0491('0x1a')](_0x0491('0x1b')+tempTableName)[_0x0491('0x1c')](function(_0xbd94bd){if(_0xbd94bd!==null){var _0xf12423=[];for(var _0x1411a6=0x0;_0x1411a6<_0xbd94bd['length'];_0x1411a6++){var _0x410548=_0xbd94bd[_0x1411a6];if(!_[_0x0491('0x1d')](_0x410548[_0x0491('0x14')])){if(!_[_0x0491('0x1d')](_0x410548[_0x0491('0x1e')]))_0xf12423[_0x0491('0x1f')](insertAdditionalPhones(_0x410548));promisesContact['push']({'contact':_0x410548});}}}Promise[_0x0491('0x20')](_0xf12423)[_0x0491('0x21')](function(){_0x7ba36({'val':0x1});});})['catch'](function(_0x54be7f){logger[_0x0491('0x22')](_0x54be7f['message']);});});}function insertAdditionalPhones(_0x6f8139){return new Promise(function(_0x431782,_0x55dcb3){var _0x6141b9=_0x6f8139[_0x0491('0x1e')];if(_[_0x0491('0x1d')](_0x6141b9))_0x55dcb3({'val':0x0});else{var _0x291d40=_0x6141b9['split'](';');var _0x23146d=[];orderBy=0x0;for(var _0x358117=0x0;_0x358117<_0x291d40[_0x0491('0x23')];_0x358117++){_0x23146d['push'](splitAdditionalPhone(_0x6f8139['id'],_0x291d40[_0x358117]));}Promise[_0x0491('0x20')](_0x23146d)[_0x0491('0x21')](function(){_0x431782({'val':_0x291d40[_0x0491('0x23')]});});}});}function splitAdditionalPhone(_0x1934a0,_0x30ad41){return new Promise(function(_0xdda718,_0x207ff9){var _0x4ab232=_0x30ad41[_0x0491('0x24')](':');var _0x4a39f0=_0x4ab232[0x0];var _0xc0c021=_0x4ab232[0x1];if(_0xc0c021!==''){var _0x93bc14=_0xc0c021[_0x0491('0x24')]('|');var _0x54571a=[];for(var _0x12ebdb=0x0;_0x12ebdb<_0x93bc14[_0x0491('0x23')];_0x12ebdb++){if(_0x93bc14[_0x12ebdb]!==''){var _0x59beec=_[_0x0491('0x25')](promisesAdditionalPhones,{'contactId':_0x1934a0,'phone':_0x93bc14[_0x12ebdb]});if(_0x59beec[_0x0491('0x23')]==0x0){orderBy++;promisesAdditionalPhones[_0x0491('0x1f')]({'contactId':_0x1934a0,'contactTypeId':_0x4a39f0,'phone':_0x93bc14[_0x12ebdb],'orderBy':orderBy});}}}_0xdda718({'ok':0x1});}else _0xdda718({'res':0x0});});}function createAdditionalPhone(_0x2c3f39,_0x3ec059,_0x38b4b8,_0x15b80d){var _0x5c9ee2='';var _0x4fbeb8='';var _0x5daa56=_0x38b4b8['split']('§');_0x5c9ee2=_0x5daa56[0x0];if(_0x5daa56[_0x0491('0x23')]==0x2)_0x4fbeb8=_0x5daa56[0x1];return new Promise(function(_0x53f923,_0x46d432){return db[_0x0491('0x26')][_0x0491('0x27')]({'where':{'CmContactId':_0x2c3f39,'item':_0x5c9ee2}})[_0x0491('0x21')](function(_0x2e3223){if(_0x2e3223){return db[_0x0491('0x26')][_0x0491('0x28')]({'ItemTypeId':_0x3ec059,'description':_0x4fbeb8,'OrderBy':_0x15b80d},{'where':{'CmContactId':_0x2c3f39,'item':_0x5c9ee2}})['then'](function(_0x712f33){_0x53f923({'res':_0x0491('0x29')});});}else{return db[_0x0491('0x26')][_0x0491('0x2a')]({'CmContactId':_0x2c3f39,'item':_0x5c9ee2,'ItemTypeId':_0x3ec059,'description':_0x4fbeb8,'OrderBy':_0x15b80d,'ItemClass':'PHONE'})['then'](function(_0x58a20b){_0x53f923({'res':_0x0491('0x2b')});});}});});}function updateContact(_0x5ebccf){return new Promise(function(_0x2ad8b2,_0x434c1c){var _0x20d728=_0x5ebccf['id'];delete _0x5ebccf['id'];return db[_0x0491('0x2c')][_0x0491('0x28')](_0x5ebccf,{'where':{'id':_0x20d728}})[_0x0491('0x21')](function(_0x17b4ee){updatedRows+=0x1;return db[_0x0491('0x2d')]['update']({'phone':_0x5ebccf[_0x0491('0x14')]},{'where':{'ContactId':_0x20d728}})['then'](function(_0x1f24e9){_0x2ad8b2({'ret':'OK'});});});});}function insertCmHopper(_0x16ef85,_0x4bbffc,_0x20e036,_0x5a946c,_0x1d7460){var _0x2a6425=[_0x0491('0x2e'),_0x0491('0x2f'),'cm_contacts.id','cm_contacts.ListId',_0x4bbffc+'.'+_0x5a946c,_0x0491('0x30'),_0x0491('0x31'),_0x0491('0x32'),'cm_contacts.UserId','\x22'+_0x1d7460+'\x22'];return squel[_0x0491('0x33')]()['into'](_0x0491('0x34'))['fromQuery']([_0x0491('0x14'),_0x0491('0x35'),_0x0491('0x36'),'ListId',_0x5a946c,'createdAt',_0x0491('0x37'),_0x0491('0x38'),_0x0491('0x39'),'recallme'],squel['select']()[_0x0491('0x3a')](_0x2a6425)[_0x0491('0x15')](_0x4bbffc)[_0x0491('0x18')](_0x0491('0x3b'),null,_0x0491('0x3c')+_0x4bbffc+_0x0491('0x3d'))[_0x0491('0x18')](_0x20e036,null,_0x20e036+'.id\x20=\x20'+_0x4bbffc+'.'+_0x5a946c)[_0x0491('0x3e')](_0x4bbffc+_0x0491('0x3f'),_0x16ef85)['where'](_0x0491('0x40'),NOW)[_0x0491('0x3e')](_0x0491('0x41'),selectNotIn(_0x4bbffc,_0x20e036,_0x5a946c,_0x0491('0x34'),[_0x0491('0x42'),'\x22onlyIfOpen\x22']))[_0x0491('0x3e')](_0x0491('0x41'),selectNotIn(_0x4bbffc,_0x20e036,_0x5a946c,_0x0491('0x34'),[_0x0491('0x42')])))[_0x0491('0x43')]();}function insertCmHopperBlack(_0x6ef0a0,_0x49cf9,_0x1b6571,_0x20ead0){var _0x20adae=[_0x0491('0x2e'),_0x0491('0x44'),'cm_contacts.ListId',_0x49cf9+'.'+_0x20ead0,'cm_contacts.createdAt',_0x0491('0x31')];return squel['insert']()['into']('cm_hopper_black')['fromQuery']([_0x0491('0x14'),'ContactId',_0x0491('0x45'),_0x20ead0,_0x0491('0x46'),_0x0491('0x37')],squel['select']()[_0x0491('0x3a')](_0x20adae)['from'](_0x49cf9)[_0x0491('0x18')]('cm_contacts',null,_0x0491('0x3c')+_0x49cf9+_0x0491('0x3d'))[_0x0491('0x18')](_0x1b6571,null,_0x1b6571+_0x0491('0x16')+_0x49cf9+'.'+_0x20ead0)[_0x0491('0x3e')](_0x49cf9+_0x0491('0x3f'),_0x6ef0a0)[_0x0491('0x3e')](_0x0491('0x40'),NOW)[_0x0491('0x3e')](_0x0491('0x41'),squel[_0x0491('0x12')]()[_0x0491('0x13')](_0x0491('0x14'))['from'](_0x0491('0x47'))[_0x0491('0x3e')](_0x0491('0x48'),_0x6ef0a0)[_0x0491('0x3e')](_0x20ead0+_0x0491('0x49'),_0x49cf9+'.'+_0x20ead0)))[_0x0491('0x43')]();}function insertCmHopperAdditionalPhones(_0x48d193){var _0xdc7140=[_0x0491('0x4a'),_0x0491('0x4b'),_0x0491('0x4c'),'cm_contact_has_items.createdAt','cm_contact_has_items.updatedAt'];return squel[_0x0491('0x33')]()[_0x0491('0x4d')](_0x0491('0x4e'))['fromQuery']([_0x0491('0x4f'),'phone',_0x0491('0x50'),'createdAt',_0x0491('0x37')],squel[_0x0491('0x12')]()[_0x0491('0x3a')](_0xdc7140)[_0x0491('0x15')](_0x0491('0x34'))['join'](_0x0491('0x3b'),null,'cm_contacts.id\x20=\x20cm_hopper.ContactId')['join'](_0x0491('0x51'),null,_0x0491('0x52'))[_0x0491('0x3e')](_0x0491('0x53'),_0x48d193)[_0x0491('0x3e')](_0x0491('0x40'),NOW))[_0x0491('0x43')]();}function insertCmContact(_0x3add97,_0x47fe72,_0xec5404,_0x31791c){var _0x276c4e=_[_0x0491('0x54')](_[_0x0491('0x55')](_0x31791c),['ListId',_0x0491('0x56'),_0x0491('0x46'),_0x0491('0x37')]);return squel[_0x0491('0x33')]()[_0x0491('0x4d')](_0x0491('0x3b'))[_0x0491('0x57')](_0x276c4e,squel[_0x0491('0x12')]()['fields'](_0x276c4e)[_0x0491('0x15')](_0x47fe72)[_0x0491('0x3e')]('('+_0xec5404[_0x0491('0x18')](',')+_0x0491('0x58'),squel[_0x0491('0x12')]()[_0x0491('0x3a')](_0xec5404)[_0x0491('0x15')](_0x0491('0x3b'))[_0x0491('0x3e')]('ListId\x20=\x20?',_0x3add97))[_0x0491('0x3e')](_0x0491('0x59'),squel[_0x0491('0x12')]()[_0x0491('0x13')]('MIN(id)','min_id')['from'](_0x47fe72)[_0x0491('0x5a')](_0xec5404[_0x0491('0x18')](','))))['toString']();}function handleStop(){logger[_0x0491('0x5b')](_0x0491('0x5c'));stopped=!![];}function handleUncaughtException(_0x4bb695){logger[_0x0491('0x22')](_0x4bb695[_0x0491('0x5d')]);process[_0x0491('0x5e')](0x1);}function handleError(_0x12dc2c,_0x1af724){stats['errors'][_0x0491('0x1f')]({'name':_0x1af724['code'],'message':_0x1af724['message'],'row':_0x12dc2c});}function handleQuery(_0x2ca08b){logger[_0x0491('0x5b')](_0x2ca08b);return db[_0x0491('0x19')]['query'](_0x2ca08b)[_0x0491('0x1c')](function(_0x185a20){results['push'](_0x185a20);})[_0x0491('0x5f')](function(_0x4c97b){logger[_0x0491('0x22')](_0x4c97b[_0x0491('0x5d')]);});}function main(_0x27e04c,_0x4c12e0,_0x41da4a,_0x4a93a5){logger['info'](_0x0491('0x60'),_0x27e04c,JSON[_0x0491('0x61')](_0x4c12e0));process['send'](_0x0491('0x62'));var _0x19b2da=_0x4c12e0[_0x0491('0x63')];var _0x3f41b1=_[_0x0491('0x64')](_0x19b2da);var _0x430e37=_0x4c12e0['socket_timestamp'];var _0x2c41ec=path[_0x0491('0x18')](config[_0x0491('0x65')],_0x0491('0x66'),_0x430e37+'.csv');logger[_0x0491('0x5b')](_0x0491('0x67'),_0x4c12e0);db[_0x0491('0x68')][_0x0491('0x69')]({'raw':!![],'attributes':['id','name']})[_0x0491('0x21')](function(_0x442a97){for(var _0x2652d9=0x0;_0x2652d9<_0x442a97[_0x0491('0x23')];_0x2652d9++){if(_0x442a97[_0x2652d9][_0x0491('0x6a')]in _0x19b2da){contactItemTypes['push'](_0x442a97[_0x2652d9]);delete _0x3f41b1[_0x442a97[_0x2652d9]['name']];hasAdditionalPhones=!![];}for(var _0x526798 in _0x19b2da){if(_0x442a97[_0x2652d9][_0x0491('0x6a')]+_0x0491('0x6b')===_0x526798){phoneDescriptions[_0x0491('0x1f')]({'itemTypeId':_0x442a97[_0x2652d9]['id'],'description':_0x526798});delete _0x3f41b1[_0x526798];}}}if(hasAdditionalPhones)_0x3f41b1[_0x0491('0x1e')]='';var _0x4236e5=_[_0x0491('0x55')](_0x3f41b1)[_0x0491('0x18')]();logger['info'](_0x0491('0x6c'),_0x4236e5);fs['writeFileSync'](_0x2c41ec,_0x4236e5+'\x0a');Papa[_0x0491('0x6d')](fs[_0x0491('0x6e')](_0x27e04c),{'header':!![],'skipEmptyLines':!![],'step':function(_0x6f2731,_0xe4af61){try{for(var _0x35d4c0=0x0,_0x537256=[];_0x35d4c0<_0x6f2731[_0x0491('0x6f')][_0x0491('0x23')];_0x35d4c0++){stats['rows']+=0x1;if(_0x6f2731['errors'][_0x35d4c0]){handleError(_0x6f2731[_0x0491('0x6f')][_0x35d4c0],_0x6f2731[_0x0491('0x70')][_0x35d4c0]);}else{var _0x544d84=[];var _0x1cf948=[];var _0x55b92f={};for(var _0x395c23 in _0x19b2da){let _0x275224=contactItemTypes[_0x0491('0x71')](_0xd5aed4=>_0xd5aed4[_0x0491('0x6a')]===_0x395c23);let _0x50067b=contactItemTypes[_0x0491('0x71')](_0xe7f058=>_0xe7f058[_0x0491('0x6a')]+_0x0491('0x6b')===_0x395c23);if(_[_0x0491('0x1d')](_0x275224)&&_[_0x0491('0x1d')](_0x50067b)){if(_0x19b2da[_0x0491('0x72')](_0x395c23)){if(_0x6f2731[_0x0491('0x6f')][_0x35d4c0][_0x19b2da[_0x395c23]]){var _0x5afb42=_[_0x0491('0x73')](_0x6f2731[_0x0491('0x6f')][_0x35d4c0][_0x19b2da[_0x395c23]][_0x0491('0x74')](/"/g,'\x27'));switch(_0x395c23){case'scheduledat':var _0x3e0903=moment(_0x5afb42,_0x0491('0xe'),!![]);if(_0x3e0903[_0x0491('0x75')]()){_0x537256[_0x0491('0x1f')]('\x22'+_0x5afb42+'\x22');}else{_0x544d84[_0x0491('0x1f')](_0x0491('0x76'));}break;case _0x0491('0x38'):var _0x2aa4b3=parseInt(_0x5afb42);_0x5afb42=_[_0x0491('0x77')](_0x2aa4b3)||_0x2aa4b3<0x0||_0x2aa4b3>0x4?_0x4a93a5?0x3:0x2:_0x2aa4b3;_0x537256['push']('\x22'+_0x5afb42+'\x22');break;case _0x0491('0x39'):var _0x24899e=parseInt(_0x5afb42);if(_[_0x0491('0x78')](_0x24899e)&&_[_0x0491('0x79')](_0x41da4a,_0x24899e)){_0x537256[_0x0491('0x1f')]('\x22'+_0x24899e+'\x22');}else{_0x544d84[_0x0491('0x1f')](_0x0491('0x7a'));}break;case'email':if(isEmail(_0x5afb42)){_0x537256[_0x0491('0x1f')]('\x22'+_0x5afb42+'\x22');}else{_0x544d84[_0x0491('0x1f')](_0x0491('0x7b'));}break;case _0x0491('0x7c'):var _0x56d062=moment(_0x5afb42,_0x0491('0x7d'),!![]);if(_0x56d062[_0x0491('0x75')]()){_0x537256[_0x0491('0x1f')]('\x22'+_0x5afb42+'\x22');}else{_0x544d84['push'](_0x0491('0x7e'));}break;default:_0x537256['push']('\x22'+_0x5afb42+'\x22');}}else{switch(_0x395c23){case _0x0491('0x7f'):case _0x0491('0x14'):_0x544d84[_0x0491('0x1f')](_0x395c23+_0x0491('0x80'));break;default:_0x537256[_0x0491('0x1f')]('\x22\x22');}}}}else{var _0x4f8c61='';if(!_['isNil'](_0x275224)){if(!_0x55b92f['hasOwnProperty'](_0x275224['id'])){for(var _0x499671=0x0;_0x499671<_0x19b2da[_0x395c23][_0x0491('0x23')];_0x499671++){var _0x5afb42=_[_0x0491('0x73')](_0x6f2731['data'][_0x35d4c0][_0x19b2da[_0x395c23][_0x499671]][_0x0491('0x74')](/"/g,'\x27'));var _0x562ae9=phoneDescriptions[_0x0491('0x71')](_0x52feb7=>_0x52feb7[_0x0491('0x81')]===_0x275224['id']);if(!_[_0x0491('0x1d')](_0x562ae9)){var _0x21d22b=_[_0x0491('0x73')](_0x6f2731['data'][_0x35d4c0][_0x19b2da[_0x562ae9[_0x0491('0x82')]][0x0]][_0x0491('0x74')](/"/g,'\x27'));if(!_[_0x0491('0x1d')](_0x21d22b))_0x5afb42=_0x5afb42+'§'+_0x21d22b;}if(_0x4f8c61=='')_0x4f8c61=_0x5afb42;else _0x4f8c61+='|'+_0x5afb42;}_0x1cf948['push'](_0x275224['id']+':'+_0x4f8c61);_0x55b92f[_0x275224['id']]=0x1;}}}}if(hasAdditionalPhones){_0x537256[_0x0491('0x1f')]('\x22'+_0x1cf948[_0x0491('0x18')](';')+'\x22');}if(_0x544d84[_0x0491('0x23')]){handleError(_0x6f2731[_0x0491('0x6f')][_0x35d4c0],{'code':_0x0491('0x83'),'message':_0x544d84['join']()});}else{fs[_0x0491('0x84')](_0x2c41ec,_0x537256['join']()+'\x0a');}_0x537256=[];}if(!(stats[_0x0491('0x85')]%0xc8)){socket[_0x0491('0x86')](_0x0491('0x87')+_0x430e37,stats);stats['errors']=[];}}if(stopped){logger[_0x0491('0x5b')](_0x0491('0x88'));_0xe4af61[_0x0491('0x89')]();}}catch(_0x45acfb){handleError(_0x6f2731[_0x0491('0x6f')][_0x35d4c0],{'code':_0x0491('0x8a'),'message':_0x45acfb[_0x0491('0x5d')]});logger[_0x0491('0x22')]('step',_0x45acfb[_0x0491('0x5d')]);}},'complete':function(){try{var _0x393832=[];var _0x53a88b=tempTableName;_0x393832[_0x0491('0x1f')]('CREATE\x20TABLE\x20'+_0x53a88b+'\x20LIKE\x20cm_contacts;');logger['info'](_0x0491('0x8b'),contactItemTypes[_0x0491('0x23')]);var _0x3b07c2=util[_0x0491('0xd')]('LOAD\x20DATA\x20LOCAL\x20INFILE\x20\x27%s\x27\x20INTO\x20TABLE\x20%s\x20CHARACTER\x20SET\x20UTF8\x20FIELDS\x20TERMINATED\x20BY\x20\x27,\x27\x20ENCLOSED\x20BY\x20\x27\x22\x27\x20LINES\x20TERMINATED\x20BY\x20\x27\x0a\x27\x20IGNORE\x201\x20ROWS\x20(%s)\x20SET\x20ListId\x20=\x20%s,\x20CompanyId\x20=\x20%s,\x20createdAt\x20=\x20\x27%s\x27,\x20updatedAt\x20=\x20\x27%s\x27',_0x2c41ec,_0x53a88b,_0x4236e5,_0x4c12e0['ListId'],_0x4c12e0[_0x0491('0x56')]||null,NOW,NOW);if(_[_0x0491('0x1d')](_0x19b2da[_0x0491('0x35')])){_0x3b07c2+=_0x0491('0x8c');}_0x393832[_0x0491('0x1f')](_0x3b07c2);BPromise['each'](_0x393832,handleQuery)[_0x0491('0x21')](function(_0xf52e3b){BPromise[_0x0491('0x20')]([handleAdditionalPhones()])[_0x0491('0x21')](function(){_0x393832=[];for(var _0x52ea4d=0x0;_0x52ea4d<promisesContact[_0x0491('0x23')];_0x52ea4d++){_0x393832['push'](updateContact(promisesContact[_0x52ea4d]['contact']));}BPromise['all'](_0x393832)['then'](function(){_0x393832=[];for(var _0x5b91f5=0x0;_0x5b91f5<promisesAdditionalPhones[_0x0491('0x23')];_0x5b91f5++){_0x393832[_0x0491('0x1f')](createAdditionalPhone(promisesAdditionalPhones[_0x5b91f5][_0x0491('0x8d')],promisesAdditionalPhones[_0x5b91f5]['contactTypeId'],promisesAdditionalPhones[_0x5b91f5][_0x0491('0x14')],promisesAdditionalPhones[_0x5b91f5][_0x0491('0x8e')]));}BPromise[_0x0491('0x20')](_0x393832)[_0x0491('0x21')](function(){_0x393832=[];_0x393832[_0x0491('0x1f')](insertCmHopperAdditionalPhones(_0x4c12e0['ListId']));_0x393832['push']('DROP\x20TABLE\x20'+_0x53a88b+';');BPromise[_0x0491('0x8f')](_0x393832,handleQuery)['then'](function(_0x22309b){stats['finish']=!![];stats['affectedRows']=updatedRows;socket[_0x0491('0x86')]('contact:import:'+_0x430e37,stats);fs[_0x0491('0x90')](_0x27e04c);fs[_0x0491('0x90')](_0x2c41ec);process['exit'](0x0);})['catch'](function(_0x437a50){logger[_0x0491('0x22')](_0x437a50['message']);process[_0x0491('0x5e')](0x1);});});});});})['catch'](function(_0x4cd686){logger[_0x0491('0x22')](_0x4cd686[_0x0491('0x5d')]);process['exit'](0x1);});}catch(_0xde2860){logger['error'](_0x0491('0x91'),_0xde2860['message']);process[_0x0491('0x5e')](0x1);}},'error':function(_0x37aa1c,_0x35fd25,_0x276896,_0x46320a){throw new Error(_0x46320a);}});});}function validate(){if(process[_0x0491('0x92')]&&process[_0x0491('0x92')]['length']<0x4){throw new Error(_0x0491('0x93'));}var _0x3e51d9=path[_0x0491('0x18')](config['root'],'server/files/tmp',process[_0x0491('0x92')][0x2]);if(!fs[_0x0491('0x94')](_0x3e51d9)){throw new Error('file\x20doesn\x27t\x20exists');}var _0x4e0007={};try{_0x4e0007=JSON[_0x0491('0x6d')](process['argv'][0x3]);if(!_0x4e0007[_0x0491('0x63')]){throw new Error(_0x0491('0x95'));}var _0x58881e=0x0;if(_0x4e0007[_0x0491('0x63')][_0x0491('0x39')]){_0x58881e=0x1;}if(!_0x4e0007[_0x0491('0x45')]){throw new Error(_0x0491('0x96'));}}catch(_0x3a3cea){throw new Error(_0x0491('0x97'));}var _0x58613d=[];try{_0x58613d=_[_0x0491('0x98')](JSON[_0x0491('0x6d')](process[_0x0491('0x92')][0x4]),'id');}catch(_0xc74738){logger[_0x0491('0x5b')]('No\x20agent\x20available');}main(_0x3e51d9,_0x4e0007,_0x58613d,_0x58881e);}validate();process['on'](_0x0491('0x99'),handleStop);process['on']('uncaughtException',handleUncaughtException);
\ No newline at end of file
+var _0x45c2=['cm_contacts','cm_contacts.ListId\x20=\x20','.CmListId','.CmListId\x20=\x20?','cm_contacts.createdAt\x20=\x20?','cm_contacts.phone\x20NOT\x20IN\x20(?)','cm_hopper','\x22always\x22','\x22onlyIfOpen\x22','cm_contacts.createdAt','insert','cm_hopper_black','field','\x20=\x20?','toString','cm_hopper.id','cm_contact_has_items.item','cm_contact_has_items.OrderBy','cm_contact_has_items.updatedAt','cm_hopper_additional_phones','fromQuery','CmHopperId','OrderBy','cm_contacts.id\x20=\x20cm_hopper.ContactId','cm_contact_has_items','cm_contacts.id\x20=\x20cm_contact_has_items.CmContactId','cm_hopper.ListId\x20=\x20?','concat',')\x20NOT\x20IN\x20?','ListId\x20=\x20?','MIN(id)','min_id','group','Received\x20SIGINT','exit','errors','code','info','query','stringify','send','start','binding','socket_timestamp','root','server/files/tmp','.csv','body','findAll','name','_description','header','parse','createReadStream','data','rows','find','hasOwnProperty','trim','replace','isValid','priority','isNaN','UserId','isNumber','includes','agent\x20not\x20exists','email','dateOfBirth','YYYY-MM-DD','dateOfBirth\x20wrong\x20format\x20(YYYY-MM-DD)','firstName','\x20not\x20specified','itemTypeId','description','SystemRow','Abort\x20parser','abort','SystemError','step','CREATE\x20TABLE\x20','\x20LIKE\x20cm_contacts;','CIS\x20len','LOAD\x20DATA\x20LOCAL\x20INFILE\x20\x27%s\x27\x20INTO\x20TABLE\x20%s\x20CHARACTER\x20SET\x20UTF8\x20FIELDS\x20TERMINATED\x20BY\x20\x27,\x27\x20ENCLOSED\x20BY\x20\x27\x22\x27\x20LINES\x20TERMINATED\x20BY\x20\x27\x0a\x27\x20IGNORE\x201\x20ROWS\x20(%s)\x20SET\x20ListId\x20=\x20%s,\x20CompanyId\x20=\x20%s,\x20createdAt\x20=\x20\x27%s\x27,\x20updatedAt\x20=\x20\x27%s\x27','CompanyId',',\x20scheduledAt\x20=\x20NOW()','contact','contactId','contactTypeId','orderBy','DROP\x20TABLE\x20','each','affectedRows','unlink','complete','argv','arguments\x20<filename>\x20<parameters>\x20<agents>','file\x20doesn\x27t\x20exists','binding\x20doesn\x27t\x20exists','ListId\x20is\x20mandatory','body\x20id\x20mandatory','No\x20agent\x20available','SIGINT','uncaughtException','path','lodash','papaparse','util','moment','squel','ioredis','../../../config/environment','../../../config/logger','import','redis','defaults','localhost','socket.io-emitter','format','YYYY-MM-DD\x20HH:mm:ss','cm_contacts_temp_','YYYYMMDDHHmmss','test','select','phone','from','join','.id\x20=\x20','where','.dialCheckDuplicateType\x20IN\x20(','sequelize','select\x20*\x20from\x20','spread','length','isNil','AdditionalPhones','push','all','catch','error','message','then','split','CmContactHasItem','updated','create','PHONE','cm_contacts.phone','cm_contacts.scheduledat','cm_contacts.id','cm_contacts.ListId','cm_contacts.updatedAt','cm_contacts.priority','into','scheduledat','ContactId','ListId','createdAt','updatedAt','recallme','fields'];(function(_0x1a61c1,_0x2f064d){var _0x2240bf=function(_0x52c173){while(--_0x52c173){_0x1a61c1['push'](_0x1a61c1['shift']());}};_0x2240bf(++_0x2f064d);}(_0x45c2,0x68));var _0x245c=function(_0x250f95,_0x5a5728){_0x250f95=_0x250f95-0x0;var _0x4ada97=_0x45c2[_0x250f95];return _0x4ada97;};'use strict';var fs=require('fs');var path=require(_0x245c('0x0'));var _=require(_0x245c('0x1'));var Papa=require(_0x245c('0x2'));var util=require(_0x245c('0x3'));var BPromise=require('bluebird');var moment=require(_0x245c('0x4'));var squel=require(_0x245c('0x5'));var Redis=require(_0x245c('0x6'));var db=require('../../../mysqldb')['db'];var config=require(_0x245c('0x7'));var logger=require(_0x245c('0x8'))(_0x245c('0x9'));config[_0x245c('0xa')]=_[_0x245c('0xb')](config[_0x245c('0xa')],{'host':_0x245c('0xc'),'port':0x18eb});var socket=require(_0x245c('0xd'))(new Redis(config[_0x245c('0xa')]));var stats={'finish':![],'errors':[],'rows':0x0,'affectedRows':0x0};var results=[];var promisesAdditionalPhones=[];var promisesContact=[];var orderBy=0x0;var updatedRows=0x0;var stopped=![];var NOW=moment()[_0x245c('0xe')](_0x245c('0xf'));var tempTableName=_0x245c('0x10')+moment()['format'](_0x245c('0x11'));var contactItemTypes=[];var phoneDescriptions=[];var hasAdditionalPhones=![];function isEmail(_0x244013){return/^([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x22([^\x0d\x22\x5c\x80-\xff]|\x5c[\x00-\x7f])*\x22))*\x40([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d)(\x2e([^\x00-\x20\x22\x28\x29\x2c\x2e\x3a-\x3c\x3e\x40\x5b-\x5d\x7f-\xff]+|\x5b([^\x0d\x5b-\x5d\x80-\xff]|\x5c[\x00-\x7f])*\x5d))*$/[_0x245c('0x12')](_0x244013);}function selectNotIn(_0x506e9b,_0x5b1e37,_0x35a363,_0x293869,_0x5d925c){return squel[_0x245c('0x13')]()['field'](_0x245c('0x14'))[_0x245c('0x15')](_0x293869)[_0x245c('0x16')](_0x5b1e37,null,_0x5b1e37+_0x245c('0x17')+_0x293869+'.'+_0x35a363)[_0x245c('0x18')](_0x293869+'.'+_0x35a363+'\x20=\x20'+_0x506e9b+'.'+_0x35a363)[_0x245c('0x18')](_0x5b1e37+_0x245c('0x19')+_0x5d925c[_0x245c('0x16')]()+')');}function handleAdditionalPhones(){return new Promise(function(_0x3c0336,_0x50a77b){promisesAdditionalPhones=[];promisesContact=[];return db[_0x245c('0x1a')]['query'](_0x245c('0x1b')+tempTableName)[_0x245c('0x1c')](function(_0x3c2ccf){if(_0x3c2ccf!==null){var _0x19a877=[];for(var _0x49c0f6=0x0;_0x49c0f6<_0x3c2ccf[_0x245c('0x1d')];_0x49c0f6++){var _0x2aa4eb=_0x3c2ccf[_0x49c0f6];if(!_[_0x245c('0x1e')](_0x2aa4eb[_0x245c('0x14')])){if(!_[_0x245c('0x1e')](_0x2aa4eb[_0x245c('0x1f')]))_0x19a877['push'](insertAdditionalPhones(_0x2aa4eb));promisesContact[_0x245c('0x20')]({'contact':_0x2aa4eb});}}}Promise[_0x245c('0x21')](_0x19a877)['then'](function(){_0x3c0336({'val':0x1});});})[_0x245c('0x22')](function(_0x260c15){logger[_0x245c('0x23')](_0x260c15[_0x245c('0x24')]);});});}function insertAdditionalPhones(_0x4cf062){return new Promise(function(_0x49cb1c,_0x24558f){var _0x5d2d63=_0x4cf062[_0x245c('0x1f')];if(_[_0x245c('0x1e')](_0x5d2d63))_0x24558f({'val':0x0});else{var _0x4651e0=_0x5d2d63['split'](';');var _0x425e9=[];orderBy=0x0;for(var _0x52a0a3=0x0;_0x52a0a3<_0x4651e0['length'];_0x52a0a3++){_0x425e9[_0x245c('0x20')](splitAdditionalPhone(_0x4cf062['id'],_0x4651e0[_0x52a0a3]));}Promise[_0x245c('0x21')](_0x425e9)[_0x245c('0x25')](function(){_0x49cb1c({'val':_0x4651e0[_0x245c('0x1d')]});});}});}function splitAdditionalPhone(_0x327140,_0x122b42){return new Promise(function(_0x4e21ee,_0x4fd041){var _0x5682fb=_0x122b42[_0x245c('0x26')](':');var _0x1c1b84=_0x5682fb[0x0];var _0x383df5=_0x5682fb[0x1];if(_0x383df5!==''){var _0x1f1357=_0x383df5['split']('|');var _0x4fcfb2=[];for(var _0x2d3817=0x0;_0x2d3817<_0x1f1357[_0x245c('0x1d')];_0x2d3817++){if(_0x1f1357[_0x2d3817]!==''){var _0x3296e1=_['filter'](promisesAdditionalPhones,{'contactId':_0x327140,'phone':_0x1f1357[_0x2d3817]});if(_0x3296e1[_0x245c('0x1d')]==0x0){orderBy++;promisesAdditionalPhones[_0x245c('0x20')]({'contactId':_0x327140,'contactTypeId':_0x1c1b84,'phone':_0x1f1357[_0x2d3817],'orderBy':orderBy});}}}_0x4e21ee({'ok':0x1});}else _0x4e21ee({'res':0x0});});}function createAdditionalPhone(_0xf2f4b9,_0x3377f4,_0x5a2a16,_0x11ef1d){var _0x44575b='';var _0x49a766='';var _0x57b67e=_0x5a2a16[_0x245c('0x26')]('§');_0x44575b=_0x57b67e[0x0];if(_0x57b67e[_0x245c('0x1d')]==0x2)_0x49a766=_0x57b67e[0x1];return new Promise(function(_0x1874bf,_0x475004){return db[_0x245c('0x27')]['findOne']({'where':{'CmContactId':_0xf2f4b9,'item':_0x44575b}})[_0x245c('0x25')](function(_0x5e31b4){if(_0x5e31b4){return db[_0x245c('0x27')]['update']({'ItemTypeId':_0x3377f4,'description':_0x49a766,'OrderBy':_0x11ef1d},{'where':{'CmContactId':_0xf2f4b9,'item':_0x44575b}})[_0x245c('0x25')](function(_0x31403b){_0x1874bf({'res':_0x245c('0x28')});});}else{return db['CmContactHasItem'][_0x245c('0x29')]({'CmContactId':_0xf2f4b9,'item':_0x44575b,'ItemTypeId':_0x3377f4,'description':_0x49a766,'OrderBy':_0x11ef1d,'ItemClass':_0x245c('0x2a')})[_0x245c('0x25')](function(_0xeab236){_0x1874bf({'res':'inserted'});});}});});}function updateContact(_0x2a9605){return new Promise(function(_0x221f42,_0x3e289b){var _0x1f9dfa=_0x2a9605['id'];delete _0x2a9605['id'];return db['CmContact']['update'](_0x2a9605,{'where':{'id':_0x1f9dfa}})['then'](function(_0x33044a){updatedRows+=0x1;return db['CmHopper']['update']({'phone':_0x2a9605[_0x245c('0x14')]},{'where':{'ContactId':_0x1f9dfa}})[_0x245c('0x25')](function(_0x5cb39e){_0x221f42({'ret':'OK'});});});});}function insertCmHopper(_0x358b4b,_0xbf39a2,_0x1ee872,_0x156aeb,_0x3b2642){var _0x335896=[_0x245c('0x2b'),_0x245c('0x2c'),_0x245c('0x2d'),_0x245c('0x2e'),_0xbf39a2+'.'+_0x156aeb,'cm_contacts.createdAt',_0x245c('0x2f'),_0x245c('0x30'),'cm_contacts.UserId','\x22'+_0x3b2642+'\x22'];return squel['insert']()[_0x245c('0x31')]('cm_hopper')['fromQuery']([_0x245c('0x14'),_0x245c('0x32'),_0x245c('0x33'),_0x245c('0x34'),_0x156aeb,_0x245c('0x35'),_0x245c('0x36'),'priority','UserId',_0x245c('0x37')],squel[_0x245c('0x13')]()[_0x245c('0x38')](_0x335896)[_0x245c('0x15')](_0xbf39a2)[_0x245c('0x16')](_0x245c('0x39'),null,_0x245c('0x3a')+_0xbf39a2+_0x245c('0x3b'))['join'](_0x1ee872,null,_0x1ee872+_0x245c('0x17')+_0xbf39a2+'.'+_0x156aeb)[_0x245c('0x18')](_0xbf39a2+_0x245c('0x3c'),_0x358b4b)[_0x245c('0x18')](_0x245c('0x3d'),NOW)[_0x245c('0x18')](_0x245c('0x3e'),selectNotIn(_0xbf39a2,_0x1ee872,_0x156aeb,_0x245c('0x3f'),[_0x245c('0x40'),_0x245c('0x41')]))[_0x245c('0x18')]('cm_contacts.phone\x20NOT\x20IN\x20(?)',selectNotIn(_0xbf39a2,_0x1ee872,_0x156aeb,'cm_hopper',[_0x245c('0x40')])))['toString']();}function insertCmHopperBlack(_0x1e663a,_0x3d3c06,_0x42f2c0,_0x20cfdb){var _0x4b6c1c=[_0x245c('0x2b'),'cm_contacts.id','cm_contacts.ListId',_0x3d3c06+'.'+_0x20cfdb,_0x245c('0x42'),'cm_contacts.updatedAt'];return squel[_0x245c('0x43')]()['into'](_0x245c('0x44'))['fromQuery']([_0x245c('0x14'),_0x245c('0x33'),_0x245c('0x34'),_0x20cfdb,_0x245c('0x35'),_0x245c('0x36')],squel[_0x245c('0x13')]()[_0x245c('0x38')](_0x4b6c1c)['from'](_0x3d3c06)[_0x245c('0x16')](_0x245c('0x39'),null,_0x245c('0x3a')+_0x3d3c06+_0x245c('0x3b'))[_0x245c('0x16')](_0x42f2c0,null,_0x42f2c0+_0x245c('0x17')+_0x3d3c06+'.'+_0x20cfdb)[_0x245c('0x18')](_0x3d3c06+_0x245c('0x3c'),_0x1e663a)[_0x245c('0x18')](_0x245c('0x3d'),NOW)[_0x245c('0x18')](_0x245c('0x3e'),squel['select']()[_0x245c('0x45')](_0x245c('0x14'))['from'](_0x245c('0x44'))['where']('ListId\x20=\x20?',_0x1e663a)[_0x245c('0x18')](_0x20cfdb+_0x245c('0x46'),_0x3d3c06+'.'+_0x20cfdb)))[_0x245c('0x47')]();}function insertCmHopperAdditionalPhones(_0x244617){var _0x5ac149=[_0x245c('0x48'),_0x245c('0x49'),_0x245c('0x4a'),'cm_contact_has_items.createdAt',_0x245c('0x4b')];return squel[_0x245c('0x43')]()[_0x245c('0x31')](_0x245c('0x4c'))[_0x245c('0x4d')]([_0x245c('0x4e'),_0x245c('0x14'),_0x245c('0x4f'),_0x245c('0x35'),'updatedAt'],squel[_0x245c('0x13')]()[_0x245c('0x38')](_0x5ac149)[_0x245c('0x15')](_0x245c('0x3f'))[_0x245c('0x16')](_0x245c('0x39'),null,_0x245c('0x50'))[_0x245c('0x16')](_0x245c('0x51'),null,_0x245c('0x52'))[_0x245c('0x18')](_0x245c('0x53'),_0x244617)[_0x245c('0x18')](_0x245c('0x3d'),NOW))[_0x245c('0x47')]();}function insertCmContact(_0x1cebd7,_0x4a9219,_0x3acf22,_0x36adb5){var _0x5f0651=_[_0x245c('0x54')](_['keys'](_0x36adb5),[_0x245c('0x34'),'CompanyId',_0x245c('0x35'),_0x245c('0x36')]);return squel[_0x245c('0x43')]()[_0x245c('0x31')](_0x245c('0x39'))[_0x245c('0x4d')](_0x5f0651,squel[_0x245c('0x13')]()[_0x245c('0x38')](_0x5f0651)[_0x245c('0x15')](_0x4a9219)['where']('('+_0x3acf22[_0x245c('0x16')](',')+_0x245c('0x55'),squel[_0x245c('0x13')]()[_0x245c('0x38')](_0x3acf22)['from'](_0x245c('0x39'))['where'](_0x245c('0x56'),_0x1cebd7))[_0x245c('0x18')]('id\x20IN\x20?',squel['select']()[_0x245c('0x45')](_0x245c('0x57'),_0x245c('0x58'))['from'](_0x4a9219)[_0x245c('0x59')](_0x3acf22[_0x245c('0x16')](','))))[_0x245c('0x47')]();}function handleStop(){logger['info'](_0x245c('0x5a'));stopped=!![];}function handleUncaughtException(_0x52b5be){logger[_0x245c('0x23')](_0x52b5be[_0x245c('0x24')]);process[_0x245c('0x5b')](0x1);}function handleError(_0x5092dd,_0x2f2813){stats[_0x245c('0x5c')][_0x245c('0x20')]({'name':_0x2f2813[_0x245c('0x5d')],'message':_0x2f2813[_0x245c('0x24')],'row':_0x5092dd});}function handleQuery(_0x3bec23){logger[_0x245c('0x5e')](_0x3bec23);return db[_0x245c('0x1a')][_0x245c('0x5f')](_0x3bec23)[_0x245c('0x1c')](function(_0xa04ff0){results[_0x245c('0x20')](_0xa04ff0);})[_0x245c('0x22')](function(_0x50f5c9){logger[_0x245c('0x23')](_0x50f5c9['message']);});}function main(_0x5dcf8b,_0x5060ec,_0x1c0b10,_0x322119){logger['info']('main',_0x5dcf8b,JSON[_0x245c('0x60')](_0x5060ec));process[_0x245c('0x61')](_0x245c('0x62'));var _0x5b8242=_0x5060ec[_0x245c('0x63')];var _0xb132dc=_['clone'](_0x5b8242);var _0x2f6932=_0x5060ec[_0x245c('0x64')];var _0xbca350=path[_0x245c('0x16')](config[_0x245c('0x65')],_0x245c('0x66'),_0x2f6932+_0x245c('0x67'));logger[_0x245c('0x5e')](_0x245c('0x68'),_0x5060ec);db['ContactItemType'][_0x245c('0x69')]({'raw':!![],'attributes':['id',_0x245c('0x6a')]})[_0x245c('0x25')](function(_0x41f52b){for(var _0x1560be=0x0;_0x1560be<_0x41f52b['length'];_0x1560be++){if(_0x41f52b[_0x1560be][_0x245c('0x6a')]in _0x5b8242){contactItemTypes['push'](_0x41f52b[_0x1560be]);delete _0xb132dc[_0x41f52b[_0x1560be][_0x245c('0x6a')]];hasAdditionalPhones=!![];}for(var _0x32967d in _0x5b8242){if(_0x41f52b[_0x1560be][_0x245c('0x6a')]+_0x245c('0x6b')===_0x32967d){phoneDescriptions['push']({'itemTypeId':_0x41f52b[_0x1560be]['id'],'description':_0x32967d});delete _0xb132dc[_0x32967d];}}}if(hasAdditionalPhones)_0xb132dc['AdditionalPhones']='';var _0x1a3cd9=_['keys'](_0xb132dc)[_0x245c('0x16')]();logger[_0x245c('0x5e')](_0x245c('0x6c'),_0x1a3cd9);fs['writeFileSync'](_0xbca350,_0x1a3cd9+'\x0a');Papa[_0x245c('0x6d')](fs[_0x245c('0x6e')](_0x5dcf8b),{'header':!![],'skipEmptyLines':!![],'step':function(_0x232c07,_0x19f749){try{for(var _0x1eed26=0x0,_0x33ea8e=[];_0x1eed26<_0x232c07[_0x245c('0x6f')]['length'];_0x1eed26++){stats[_0x245c('0x70')]+=0x1;if(_0x232c07['errors'][_0x1eed26]){handleError(_0x232c07['data'][_0x1eed26],_0x232c07[_0x245c('0x5c')][_0x1eed26]);}else{var _0x562688=[];var _0x3a9360=[];var _0xf6596d={};for(var _0x27f348 in _0x5b8242){let _0x1b2bae=contactItemTypes['find'](_0x3730d8=>_0x3730d8[_0x245c('0x6a')]===_0x27f348);let _0x59174d=contactItemTypes[_0x245c('0x71')](_0x18c476=>_0x18c476['name']+_0x245c('0x6b')===_0x27f348);if(_['isNil'](_0x1b2bae)&&_[_0x245c('0x1e')](_0x59174d)){if(_0x5b8242[_0x245c('0x72')](_0x27f348)){if(_0x232c07[_0x245c('0x6f')][_0x1eed26][_0x5b8242[_0x27f348]]){var _0x34eb48=_[_0x245c('0x73')](_0x232c07['data'][_0x1eed26][_0x5b8242[_0x27f348]][_0x245c('0x74')](/"/g,'\x27'));switch(_0x27f348){case _0x245c('0x32'):var _0x30193f=moment(_0x34eb48,_0x245c('0xf'),!![]);if(_0x30193f[_0x245c('0x75')]()){_0x33ea8e['push']('\x22'+_0x34eb48+'\x22');}else{_0x562688[_0x245c('0x20')]('scheduledat\x20wrong\x20format\x20(YYYY-MM-DD\x20HH:mm:ss)');}break;case _0x245c('0x76'):var _0x5f05f2=parseInt(_0x34eb48);_0x34eb48=_[_0x245c('0x77')](_0x5f05f2)||_0x5f05f2<0x0||_0x5f05f2>0x4?_0x322119?0x3:0x2:_0x5f05f2;_0x33ea8e[_0x245c('0x20')]('\x22'+_0x34eb48+'\x22');break;case _0x245c('0x78'):var _0x5919e7=parseInt(_0x34eb48);if(_[_0x245c('0x79')](_0x5919e7)&&_[_0x245c('0x7a')](_0x1c0b10,_0x5919e7)){_0x33ea8e['push']('\x22'+_0x5919e7+'\x22');}else{_0x562688['push'](_0x245c('0x7b'));}break;case _0x245c('0x7c'):if(isEmail(_0x34eb48)){_0x33ea8e['push']('\x22'+_0x34eb48+'\x22');}else{_0x562688[_0x245c('0x20')]('email\x20wrong\x20format');}break;case _0x245c('0x7d'):var _0x768971=moment(_0x34eb48,_0x245c('0x7e'),!![]);if(_0x768971[_0x245c('0x75')]()){_0x33ea8e[_0x245c('0x20')]('\x22'+_0x34eb48+'\x22');}else{_0x562688[_0x245c('0x20')](_0x245c('0x7f'));}break;default:_0x33ea8e[_0x245c('0x20')]('\x22'+_0x34eb48+'\x22');}}else{switch(_0x27f348){case _0x245c('0x80'):case _0x245c('0x14'):_0x562688[_0x245c('0x20')](_0x27f348+_0x245c('0x81'));break;default:_0x33ea8e[_0x245c('0x20')]('\x22\x22');}}}}else{var _0x242148='';if(!_[_0x245c('0x1e')](_0x1b2bae)){if(!_0xf6596d[_0x245c('0x72')](_0x1b2bae['id'])){for(var _0xb8e5ed=0x0;_0xb8e5ed<_0x5b8242[_0x27f348][_0x245c('0x1d')];_0xb8e5ed++){var _0x34eb48=_[_0x245c('0x73')](_0x232c07[_0x245c('0x6f')][_0x1eed26][_0x5b8242[_0x27f348][_0xb8e5ed]][_0x245c('0x74')](/"/g,'\x27'));var _0x247dca=phoneDescriptions[_0x245c('0x71')](_0x13b896=>_0x13b896[_0x245c('0x82')]===_0x1b2bae['id']);if(!_[_0x245c('0x1e')](_0x247dca)){var _0x2310e0=_[_0x245c('0x73')](_0x232c07[_0x245c('0x6f')][_0x1eed26][_0x5b8242[_0x247dca[_0x245c('0x83')]][0x0]][_0x245c('0x74')](/"/g,'\x27'));if(!_['isNil'](_0x2310e0))_0x34eb48=_0x34eb48+'§'+_0x2310e0;}if(_0x242148=='')_0x242148=_0x34eb48;else _0x242148+='|'+_0x34eb48;}_0x3a9360['push'](_0x1b2bae['id']+':'+_0x242148);_0xf6596d[_0x1b2bae['id']]=0x1;}}}}if(hasAdditionalPhones){_0x33ea8e[_0x245c('0x20')]('\x22'+_0x3a9360[_0x245c('0x16')](';')+'\x22');}if(_0x562688[_0x245c('0x1d')]){handleError(_0x232c07['data'][_0x1eed26],{'code':_0x245c('0x84'),'message':_0x562688[_0x245c('0x16')]()});}else{fs['appendFileSync'](_0xbca350,_0x33ea8e[_0x245c('0x16')]()+'\x0a');}_0x33ea8e=[];}if(!(stats['rows']%0xc8)){socket['emit']('contact:import:'+_0x2f6932,stats);stats['errors']=[];}}if(stopped){logger[_0x245c('0x5e')](_0x245c('0x85'));_0x19f749[_0x245c('0x86')]();}}catch(_0x1e3104){handleError(_0x232c07[_0x245c('0x6f')][_0x1eed26],{'code':_0x245c('0x87'),'message':_0x1e3104[_0x245c('0x24')]});logger[_0x245c('0x23')](_0x245c('0x88'),_0x1e3104[_0x245c('0x24')]);}},'complete':function(){try{var _0x297875=[];var _0x16c96c=tempTableName;_0x297875[_0x245c('0x20')](_0x245c('0x89')+_0x16c96c+_0x245c('0x8a'));logger[_0x245c('0x5e')](_0x245c('0x8b'),contactItemTypes[_0x245c('0x1d')]);var _0x171e7f=util[_0x245c('0xe')](_0x245c('0x8c'),_0xbca350,_0x16c96c,_0x1a3cd9,_0x5060ec[_0x245c('0x34')],_0x5060ec[_0x245c('0x8d')]||null,NOW,NOW);if(_[_0x245c('0x1e')](_0x5b8242[_0x245c('0x32')])){_0x171e7f+=_0x245c('0x8e');}_0x297875['push'](_0x171e7f);BPromise['each'](_0x297875,handleQuery)[_0x245c('0x25')](function(_0x1b04ee){BPromise[_0x245c('0x21')]([handleAdditionalPhones()])['then'](function(){_0x297875=[];for(var _0x3d22de=0x0;_0x3d22de<promisesContact[_0x245c('0x1d')];_0x3d22de++){_0x297875['push'](updateContact(promisesContact[_0x3d22de][_0x245c('0x8f')]));}BPromise[_0x245c('0x21')](_0x297875)[_0x245c('0x25')](function(){_0x297875=[];for(var _0x1346ea=0x0;_0x1346ea<promisesAdditionalPhones[_0x245c('0x1d')];_0x1346ea++){_0x297875[_0x245c('0x20')](createAdditionalPhone(promisesAdditionalPhones[_0x1346ea][_0x245c('0x90')],promisesAdditionalPhones[_0x1346ea][_0x245c('0x91')],promisesAdditionalPhones[_0x1346ea]['phone'],promisesAdditionalPhones[_0x1346ea][_0x245c('0x92')]));}BPromise[_0x245c('0x21')](_0x297875)['then'](function(){_0x297875=[];_0x297875[_0x245c('0x20')](insertCmHopperAdditionalPhones(_0x5060ec['ListId']));_0x297875[_0x245c('0x20')](_0x245c('0x93')+_0x16c96c+';');BPromise[_0x245c('0x94')](_0x297875,handleQuery)['then'](function(_0x420d07){stats['finish']=!![];stats[_0x245c('0x95')]=updatedRows;socket['emit']('contact:import:'+_0x2f6932,stats);fs[_0x245c('0x96')](_0x5dcf8b);fs[_0x245c('0x96')](_0xbca350);process[_0x245c('0x5b')](0x0);})[_0x245c('0x22')](function(_0x1d39ad){logger[_0x245c('0x23')](_0x1d39ad[_0x245c('0x24')]);process[_0x245c('0x5b')](0x1);});});});});})[_0x245c('0x22')](function(_0x46064f){logger['error'](_0x46064f[_0x245c('0x24')]);process['exit'](0x1);});}catch(_0xb3404a){logger['error'](_0x245c('0x97'),_0xb3404a[_0x245c('0x24')]);process[_0x245c('0x5b')](0x1);}},'error':function(_0x3ae009,_0x1c9cd5,_0x59cc21,_0x10372f){throw new Error(_0x10372f);}});});}function validate(){if(process[_0x245c('0x98')]&&process[_0x245c('0x98')][_0x245c('0x1d')]<0x4){throw new Error(_0x245c('0x99'));}var _0x3918d0=path[_0x245c('0x16')](config[_0x245c('0x65')],_0x245c('0x66'),process['argv'][0x2]);if(!fs['existsSync'](_0x3918d0)){throw new Error(_0x245c('0x9a'));}var _0x29da0e={};try{_0x29da0e=JSON[_0x245c('0x6d')](process[_0x245c('0x98')][0x3]);if(!_0x29da0e[_0x245c('0x63')]){throw new Error(_0x245c('0x9b'));}var _0x4f26e8=0x0;if(_0x29da0e['binding']['UserId']){_0x4f26e8=0x1;}if(!_0x29da0e['ListId']){throw new Error(_0x245c('0x9c'));}}catch(_0x52e386){throw new Error(_0x245c('0x9d'));}var _0x1e98b1=[];try{_0x1e98b1=_['map'](JSON['parse'](process['argv'][0x4]),'id');}catch(_0x33a3c9){logger['info'](_0x245c('0x9e'));}main(_0x3918d0,_0x29da0e,_0x1e98b1,_0x4f26e8);}validate();process['on'](_0x245c('0x9f'),handleStop);process['on'](_0x245c('0xa0'),handleUncaughtException);
\ No newline at end of file
index 6ff7451..4379bce 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x059b=['agentcompleteAt','Hold\x20Time','holdtime','Talk\x20Time','talktime','Called\x20Number','Member\x20Name','UniqueId','starttime','Answer\x20Time','answertime','Complete\x20Time','endtime','Duration','duration','billableseconds','string','toLowerCase','inbound','push','variable','queue','calleridnum','outbound','Outbound\x20Call','destcalleridnum','getDescriptions','voice','***\x20Call\x20Info\x20***','keyValue','Caller\x20Name','calleridname','destexten','Queue','uniqueid','Date','agentcalledAt','***\x20Agent\x20Info\x20***','Agent\x20Name','destcalleridname','Agent\x20Number','***\x20Time\x20Info\x20***','Agent\x20Connect','Agent\x20Complete'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0x059b,0x118));var _0xb059=function(_0x527e0c,_0x246a1c){_0x527e0c=_0x527e0c-0x0;var _0x1165b6=_0x059b[_0x527e0c];return _0x1165b6;};'use strict';exports['getSubjects']=function(_0x31948d,_0x2b8c69){var _0x9a2f0e=[{'type':_0xb059('0x0'),'content':'[xCALLY\x20Ticket]','variableName':null}];switch(_0x31948d['toLowerCase']()){case'voice':switch(_0x2b8c69[_0xb059('0x1')]()){case _0xb059('0x2'):_0x9a2f0e[_0xb059('0x3')]({'type':_0xb059('0x4'),'content':'','variableName':_0xb059('0x5')});_0x9a2f0e[_0xb059('0x3')]({'type':_0xb059('0x4'),'content':'','variableName':_0xb059('0x6')});break;case _0xb059('0x7'):_0x9a2f0e[_0xb059('0x3')]({'type':_0xb059('0x0'),'content':_0xb059('0x8'),'variableName':null});_0x9a2f0e['push']({'type':_0xb059('0x4'),'content':'','variableName':_0xb059('0x9')});break;}}return _0x9a2f0e;};exports[_0xb059('0xa')]=function(_0x1832b8,_0x50f705){var _0x234efb=[];switch(_0x1832b8[_0xb059('0x1')]()){case _0xb059('0xb'):switch(_0x50f705[_0xb059('0x1')]()){case _0xb059('0x2'):_0x234efb=[{'type':_0xb059('0x0'),'content':_0xb059('0xc'),'key':null,'keyType':null,'variableName':null},{'type':_0xb059('0xd'),'content':'','key':'Caller\x20Number','keyType':_0xb059('0x4'),'variableName':'calleridnum'},{'type':_0xb059('0xd'),'content':'','key':_0xb059('0xe'),'keyType':_0xb059('0x4'),'variableName':_0xb059('0xf')},{'type':_0xb059('0xd'),'content':'','key':'Call\x20To','keyType':_0xb059('0x4'),'variableName':_0xb059('0x10')},{'type':_0xb059('0xd'),'content':'','key':_0xb059('0x11'),'keyType':_0xb059('0x4'),'variableName':_0xb059('0x5')},{'type':'keyValue','content':'','key':'UniqueId','keyType':'variable','variableName':_0xb059('0x12')},{'type':_0xb059('0xd'),'content':'','key':_0xb059('0x13'),'keyType':'variable','variableName':_0xb059('0x14')},{'type':_0xb059('0x0'),'content':_0xb059('0x15'),'key':null,'keyType':null,'variableName':null},{'type':_0xb059('0xd'),'content':'','key':_0xb059('0x16'),'keyType':_0xb059('0x4'),'variableName':_0xb059('0x17')},{'type':_0xb059('0xd'),'content':'','key':_0xb059('0x18'),'keyType':_0xb059('0x4'),'variableName':_0xb059('0x9')},{'type':_0xb059('0x0'),'content':_0xb059('0x19'),'key':null,'keyType':null,'variableName':null},{'type':'keyValue','content':'','key':'Agent\x20Ring','keyType':'variable','variableName':_0xb059('0x14')},{'type':_0xb059('0xd'),'content':'','key':_0xb059('0x1a'),'keyType':'variable','variableName':'agentconnectAt'},{'type':_0xb059('0xd'),'content':'','key':_0xb059('0x1b'),'keyType':'variable','variableName':_0xb059('0x1c')},{'type':_0xb059('0xd'),'content':'','key':_0xb059('0x1d'),'keyType':_0xb059('0x4'),'variableName':_0xb059('0x1e')},{'type':'keyValue','content':'','key':_0xb059('0x1f'),'keyType':_0xb059('0x4'),'variableName':_0xb059('0x20')}];break;case _0xb059('0x7'):_0x234efb=[{'type':_0xb059('0x0'),'content':_0xb059('0xc'),'variableName':null},{'type':_0xb059('0xd'),'content':'','key':_0xb059('0x21'),'keyType':_0xb059('0x4'),'keyContent':'','variableName':'destcalleridnum'},{'type':_0xb059('0xd'),'content':'','key':_0xb059('0x22'),'keyType':_0xb059('0x4'),'keyContent':'','variableName':'membername'},{'type':_0xb059('0xd'),'content':'','key':_0xb059('0x23'),'keyType':'variable','keyContent':'','variableName':_0xb059('0x12')},{'type':_0xb059('0xd'),'content':'','key':_0xb059('0x13'),'keyType':_0xb059('0x4'),'keyContent':'','variableName':_0xb059('0x24')},{'type':_0xb059('0x0'),'content':'***\x20Time\x20Info\x20***'},{'type':_0xb059('0xd'),'content':'','key':_0xb059('0x25'),'keyType':_0xb059('0x4'),'keyContent':'','variableName':_0xb059('0x26')},{'type':_0xb059('0xd'),'content':'','key':_0xb059('0x27'),'keyType':_0xb059('0x4'),'keyContent':'','variableName':_0xb059('0x28')},{'type':_0xb059('0xd'),'content':'','key':_0xb059('0x29'),'keyType':'variable','keyContent':'','variableName':_0xb059('0x2a')},{'type':'keyValue','content':'','key':'Billable\x20Time','keyType':'variable','keyContent':'','variableName':_0xb059('0x2b')}];break;}}return _0x234efb;};
\ No newline at end of file
+var _0xa5df=['push','queue','variable','Outbound\x20Call','getDescriptions','***\x20Call\x20Info\x20***','keyValue','calleridnum','calleridname','Call\x20To','destexten','Queue','UniqueId','uniqueid','Date','agentcalledAt','Agent\x20Name','Agent\x20Number','destcalleridnum','Agent\x20Ring','Agent\x20Connect','agentconnectAt','Agent\x20Complete','holdtime','Talk\x20Time','talktime','outbound','Called\x20Number','starttime','answertime','endtime','Duration','duration','billableseconds','getSubjects','string','toLowerCase','voice','inbound'];(function(_0x2825af,_0x45c42b){var _0x196905=function(_0x2c0008){while(--_0x2c0008){_0x2825af['push'](_0x2825af['shift']());}};_0x196905(++_0x45c42b);}(_0xa5df,0x1cf));var _0xfa5d=function(_0x37c1fb,_0x51374f){_0x37c1fb=_0x37c1fb-0x0;var _0x2d87a4=_0xa5df[_0x37c1fb];return _0x2d87a4;};'use strict';exports[_0xfa5d('0x0')]=function(_0x58759d,_0x2fe67a){var _0x266bde=[{'type':_0xfa5d('0x1'),'content':'[xCALLY\x20Ticket]','variableName':null}];switch(_0x58759d[_0xfa5d('0x2')]()){case _0xfa5d('0x3'):switch(_0x2fe67a[_0xfa5d('0x2')]()){case _0xfa5d('0x4'):_0x266bde[_0xfa5d('0x5')]({'type':'variable','content':'','variableName':_0xfa5d('0x6')});_0x266bde['push']({'type':_0xfa5d('0x7'),'content':'','variableName':'calleridnum'});break;case'outbound':_0x266bde['push']({'type':_0xfa5d('0x1'),'content':_0xfa5d('0x8'),'variableName':null});_0x266bde['push']({'type':_0xfa5d('0x7'),'content':'','variableName':'destcalleridnum'});break;}}return _0x266bde;};exports[_0xfa5d('0x9')]=function(_0x2e2166,_0x4d43b2){var _0xdb7178=[];switch(_0x2e2166[_0xfa5d('0x2')]()){case'voice':switch(_0x4d43b2[_0xfa5d('0x2')]()){case _0xfa5d('0x4'):_0xdb7178=[{'type':_0xfa5d('0x1'),'content':_0xfa5d('0xa'),'key':null,'keyType':null,'variableName':null},{'type':_0xfa5d('0xb'),'content':'','key':'Caller\x20Number','keyType':_0xfa5d('0x7'),'variableName':_0xfa5d('0xc')},{'type':_0xfa5d('0xb'),'content':'','key':'Caller\x20Name','keyType':'variable','variableName':_0xfa5d('0xd')},{'type':'keyValue','content':'','key':_0xfa5d('0xe'),'keyType':'variable','variableName':_0xfa5d('0xf')},{'type':_0xfa5d('0xb'),'content':'','key':_0xfa5d('0x10'),'keyType':_0xfa5d('0x7'),'variableName':'queue'},{'type':_0xfa5d('0xb'),'content':'','key':_0xfa5d('0x11'),'keyType':_0xfa5d('0x7'),'variableName':_0xfa5d('0x12')},{'type':_0xfa5d('0xb'),'content':'','key':_0xfa5d('0x13'),'keyType':_0xfa5d('0x7'),'variableName':_0xfa5d('0x14')},{'type':_0xfa5d('0x1'),'content':'***\x20Agent\x20Info\x20***','key':null,'keyType':null,'variableName':null},{'type':'keyValue','content':'','key':_0xfa5d('0x15'),'keyType':_0xfa5d('0x7'),'variableName':'destcalleridname'},{'type':_0xfa5d('0xb'),'content':'','key':_0xfa5d('0x16'),'keyType':_0xfa5d('0x7'),'variableName':_0xfa5d('0x17')},{'type':_0xfa5d('0x1'),'content':'***\x20Time\x20Info\x20***','key':null,'keyType':null,'variableName':null},{'type':_0xfa5d('0xb'),'content':'','key':_0xfa5d('0x18'),'keyType':_0xfa5d('0x7'),'variableName':_0xfa5d('0x14')},{'type':_0xfa5d('0xb'),'content':'','key':_0xfa5d('0x19'),'keyType':'variable','variableName':_0xfa5d('0x1a')},{'type':_0xfa5d('0xb'),'content':'','key':_0xfa5d('0x1b'),'keyType':_0xfa5d('0x7'),'variableName':'agentcompleteAt'},{'type':_0xfa5d('0xb'),'content':'','key':'Hold\x20Time','keyType':_0xfa5d('0x7'),'variableName':_0xfa5d('0x1c')},{'type':_0xfa5d('0xb'),'content':'','key':_0xfa5d('0x1d'),'keyType':'variable','variableName':_0xfa5d('0x1e')}];break;case _0xfa5d('0x1f'):_0xdb7178=[{'type':_0xfa5d('0x1'),'content':'***\x20Call\x20Info\x20***','variableName':null},{'type':_0xfa5d('0xb'),'content':'','key':_0xfa5d('0x20'),'keyType':'variable','keyContent':'','variableName':_0xfa5d('0x17')},{'type':_0xfa5d('0xb'),'content':'','key':'Member\x20Name','keyType':_0xfa5d('0x7'),'keyContent':'','variableName':'membername'},{'type':_0xfa5d('0xb'),'content':'','key':_0xfa5d('0x11'),'keyType':'variable','keyContent':'','variableName':'uniqueid'},{'type':_0xfa5d('0xb'),'content':'','key':_0xfa5d('0x13'),'keyType':'variable','keyContent':'','variableName':_0xfa5d('0x21')},{'type':_0xfa5d('0x1'),'content':'***\x20Time\x20Info\x20***'},{'type':'keyValue','content':'','key':'Answer\x20Time','keyType':'variable','keyContent':'','variableName':_0xfa5d('0x22')},{'type':_0xfa5d('0xb'),'content':'','key':'Complete\x20Time','keyType':_0xfa5d('0x7'),'keyContent':'','variableName':_0xfa5d('0x23')},{'type':_0xfa5d('0xb'),'content':'','key':_0xfa5d('0x24'),'keyType':_0xfa5d('0x7'),'keyContent':'','variableName':_0xfa5d('0x25')},{'type':_0xfa5d('0xb'),'content':'','key':'Billable\x20Time','keyType':_0xfa5d('0x7'),'keyContent':'','variableName':_0xfa5d('0x26')}];break;}}return _0xdb7178;};
\ No newline at end of file
index 4b0693e..0f45136 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5a68=['DESC','getClosedOrderClause','getFilteredInteractions','catch','tracked','clone','body','html','phone','updateUser','lodash','./sql-utils','./utils','skipInteractionsQuery','resolve','then','search','where','contact','default','fields','filter','having','read','tags','checkAccountsRestrictions','group','i.id','countFilteredInteractions','count','clause','order','contactName'];(function(_0x18fd19,_0x18f0a5){var _0x4910d1=function(_0x4b913c){while(--_0x4b913c){_0x18fd19['push'](_0x18fd19['shift']());}};_0x4910d1(++_0x18f0a5);}(_0x5a68,0x154));var _0x85a6=function(_0x6599ce,_0xf5cda0){_0x6599ce=_0x6599ce-0x0;var _0x1f83d7=_0x5a68[_0x6599ce];return _0x1f83d7;};'use strict';var _=require(_0x85a6('0x0'));var sqlUtils=require(_0x85a6('0x1'));var utils=require(_0x85a6('0x2'));exports['findAll']=function(_0x2aba02,_0x482ff8,_0x1a2df9,_0xbd0e4,_0x15f8e5){var _0x2e138d={'count':0x0,'rows':[]};var _0x5c37f5=sqlUtils[_0x85a6('0x3')](_0x2aba02,_0x1a2df9,_0x482ff8);if(_0x5c37f5){return Promise[_0x85a6('0x4')](_0x2e138d);}var _0x5295d4=sqlUtils['getInteractionsQuery'](_0x2aba02);var _0x28f05a={};return Promise[_0x85a6('0x4')]()[_0x85a6('0x5')](function(){if(_0x482ff8[_0x85a6('0x6')]){return sqlUtils['parseAdvancedSearchFilter'](_0x482ff8[_0x85a6('0x6')],_0x15f8e5);}else{return sqlUtils['parseQueryParameters'](_0x2aba02,_0x482ff8,_0x15f8e5);}})['then'](function(_0x1eb65f){_0x5295d4[_0x85a6('0x7')](_0x1eb65f['body']);_0x5295d4['where'](_0x1eb65f[_0x85a6('0x8')]);_0x5295d4['where'](_0x1eb65f[_0x85a6('0x9')]);_0x5295d4[_0x85a6('0x7')](_0x1eb65f[_0x85a6('0xa')]);_0x5295d4[_0x85a6('0x7')](_0x1eb65f[_0x85a6('0xb')]);_0x5295d4[_0x85a6('0x7')](_0x1eb65f['user']);_0x5295d4[_0x85a6('0xc')](_0x1eb65f[_0x85a6('0xd')]);_0x28f05a=_0x1eb65f[_0x85a6('0xe')];return sqlUtils[_0x85a6('0xf')](_0x2aba02,_0x1a2df9,_0x482ff8);})[_0x85a6('0x5')](function(_0x2165c6){_0x5295d4['where'](_0x2165c6);_0x5295d4[_0x85a6('0x10')](_0x85a6('0x11'));var _0x609b5d=_0x482ff8[_0x85a6('0x6')]?_0x28f05a['ids']:_0x482ff8['tag'];return sqlUtils[_0x85a6('0x12')](_0x5295d4,_0x609b5d);})[_0x85a6('0x5')](function(_0x31bff8){_0x2e138d[_0x85a6('0x13')]=_0x31bff8['length'];if(_0x2e138d['count']===0x0){return[];}_0x5295d4[_0x85a6('0xc')](_0x28f05a[_0x85a6('0x14')]);if(_0xbd0e4[_0x85a6('0x15')]){_0xbd0e4[_0x85a6('0x15')]['forEach'](function(_0x3d3799){var _0x462ec0=_0x3d3799[0x0]===_0x85a6('0x16')?_0x3d3799[0x0]:'i.'+_0x3d3799[0x0];_0x5295d4['order'](_0x462ec0,_0x3d3799[0x1]===_0x85a6('0x17')?![]:!![]);if(_0x3d3799[0x0]==='closed'){var _0x57df3b=sqlUtils[_0x85a6('0x18')](_0x2aba02,_0x482ff8);_0x5295d4[_0x85a6('0x15')](_0x57df3b,_0x3d3799[0x1]===_0x85a6('0x17')?![]:!![]);}});}return sqlUtils[_0x85a6('0x19')](_0x2aba02,_0x5295d4,_0x482ff8,_0xbd0e4);})[_0x85a6('0x5')](function(_0x3d925e){_0x2e138d['rows']=_0x3d925e;return _0x2e138d;})[_0x85a6('0x1a')](function(_0x41f4a0){throw _0x41f4a0;});};exports[_0x85a6('0x1b')]=function(_0x160813,_0x422fe6){return function(_0x134dce,_0x3b9cf5,_0x3da32a){var _0x149759=_0x134dce['user'];var _0x4d852b={};var _0xb18760=_0x134dce['query'];if(_0x4d852b){_0x4d852b=_[_0x85a6('0x1c')](_0x134dce['body']);_0x4d852b=_['omit'](_0x4d852b,[_0x85a6('0x1d'),_0x85a6('0x1e'),_0x85a6('0x1f'),'fax','mobile']);}utils[_0x85a6('0x20')](_0x149759,_0x4d852b,_0xb18760,_0x160813,_0x422fe6);_0x3da32a(null);};};
\ No newline at end of file
+var _0xc375=['parseQueryParameters','body','contact','where','default','filter','user','having','read','checkAccountsRestrictions','group','i.id','ids','tag','count','length','clause','order','forEach','contactName','DESC','closed','getClosedOrderClause','catch','tracked','query','clone','omit','fax','mobile','updateUser','./sql-utils','./utils','resolve','getInteractionsQuery','then','search','parseAdvancedSearchFilter'];(function(_0x3feccc,_0x5534c7){var _0x2c13b5=function(_0x59a2cd){while(--_0x59a2cd){_0x3feccc['push'](_0x3feccc['shift']());}};_0x2c13b5(++_0x5534c7);}(_0xc375,0xb7));var _0x5c37=function(_0x4653f7,_0x3d3ae3){_0x4653f7=_0x4653f7-0x0;var _0x5454da=_0xc375[_0x4653f7];return _0x5454da;};'use strict';var _=require('lodash');var sqlUtils=require(_0x5c37('0x0'));var utils=require(_0x5c37('0x1'));exports['findAll']=function(_0x30a722,_0x1d9db3,_0x215971,_0x5c7ba1,_0x3b44f0){var _0x2f60dd={'count':0x0,'rows':[]};var _0x3d55c3=sqlUtils['skipInteractionsQuery'](_0x30a722,_0x215971,_0x1d9db3);if(_0x3d55c3){return Promise[_0x5c37('0x2')](_0x2f60dd);}var _0x3619b5=sqlUtils[_0x5c37('0x3')](_0x30a722);var _0x4f0d9c={};return Promise[_0x5c37('0x2')]()[_0x5c37('0x4')](function(){if(_0x1d9db3[_0x5c37('0x5')]){return sqlUtils[_0x5c37('0x6')](_0x1d9db3[_0x5c37('0x5')],_0x3b44f0);}else{return sqlUtils[_0x5c37('0x7')](_0x30a722,_0x1d9db3,_0x3b44f0);}})[_0x5c37('0x4')](function(_0x11372b){_0x3619b5['where'](_0x11372b[_0x5c37('0x8')]);_0x3619b5['where'](_0x11372b[_0x5c37('0x9')]);_0x3619b5[_0x5c37('0xa')](_0x11372b[_0x5c37('0xb')]);_0x3619b5[_0x5c37('0xa')](_0x11372b['fields']);_0x3619b5[_0x5c37('0xa')](_0x11372b[_0x5c37('0xc')]);_0x3619b5[_0x5c37('0xa')](_0x11372b[_0x5c37('0xd')]);_0x3619b5[_0x5c37('0xe')](_0x11372b[_0x5c37('0xf')]);_0x4f0d9c=_0x11372b['tags'];return sqlUtils[_0x5c37('0x10')](_0x30a722,_0x215971,_0x1d9db3);})[_0x5c37('0x4')](function(_0x39d2ca){_0x3619b5[_0x5c37('0xa')](_0x39d2ca);_0x3619b5[_0x5c37('0x11')](_0x5c37('0x12'));var _0x284f3e=_0x1d9db3[_0x5c37('0x5')]?_0x4f0d9c[_0x5c37('0x13')]:_0x1d9db3[_0x5c37('0x14')];return sqlUtils['countFilteredInteractions'](_0x3619b5,_0x284f3e);})[_0x5c37('0x4')](function(_0x8c0177){_0x2f60dd[_0x5c37('0x15')]=_0x8c0177[_0x5c37('0x16')];if(_0x2f60dd[_0x5c37('0x15')]===0x0){return[];}_0x3619b5[_0x5c37('0xe')](_0x4f0d9c[_0x5c37('0x17')]);if(_0x5c7ba1[_0x5c37('0x18')]){_0x5c7ba1[_0x5c37('0x18')][_0x5c37('0x19')](function(_0x9857ee){var _0x9c0c83=_0x9857ee[0x0]===_0x5c37('0x1a')?_0x9857ee[0x0]:'i.'+_0x9857ee[0x0];_0x3619b5['order'](_0x9c0c83,_0x9857ee[0x1]===_0x5c37('0x1b')?![]:!![]);if(_0x9857ee[0x0]===_0x5c37('0x1c')){var _0x45c1ec=sqlUtils[_0x5c37('0x1d')](_0x30a722,_0x1d9db3);_0x3619b5[_0x5c37('0x18')](_0x45c1ec,_0x9857ee[0x1]==='DESC'?![]:!![]);}});}return sqlUtils['getFilteredInteractions'](_0x30a722,_0x3619b5,_0x1d9db3,_0x5c7ba1);})[_0x5c37('0x4')](function(_0x16c782){_0x2f60dd['rows']=_0x16c782;return _0x2f60dd;})[_0x5c37('0x1e')](function(_0x42520a){throw _0x42520a;});};exports[_0x5c37('0x1f')]=function(_0x15ec74,_0x3c65ae){return function(_0x59b398,_0x1890df,_0x1ce610){var _0x3494cc=_0x59b398['user'];var _0x568ae4={};var _0x3ada3b=_0x59b398[_0x5c37('0x20')];if(_0x568ae4){_0x568ae4=_[_0x5c37('0x21')](_0x59b398[_0x5c37('0x8')]);_0x568ae4=_[_0x5c37('0x22')](_0x568ae4,[_0x5c37('0x8'),'html','phone',_0x5c37('0x23'),_0x5c37('0x24')]);}utils[_0x5c37('0x25')](_0x3494cc,_0x568ae4,_0x3ada3b,_0x15ec74,_0x3c65ae);_0x1ce610(null);};};
\ No newline at end of file
index 44090b0..518ecd2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf8db=['i.ContactId','i.MailAccountId','i.UserId','CASE\x20WHEN\x20i.from\x20IS\x20NOT\x20NULL\x20AND\x20i.from\x20<>\x20\x27\x27\x20THEN\x20i.from\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','CASE\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','i.*','Contact.firstName','c.lastName','Contact.lastName','c.email','Contact.email','c.phone','Contact.phone','c.mobile','c.fax','o.fullname','Owner.fullname','o.internal','Owner.internal','GROUP_CONCAT(DISTINCT\x20t.id)','TagIds','limit','offset','groupBy','Setting','findOne','enableEmailPreview','all','COUNT(*)','isEmpty','SELECT','exports','lodash','../parsers/qs','./update-interaction','./utils','../../mysqldb','getAccountFK','role','agent','search','select','field','name','color','tools_tags','user_has_','u.id','ui.','from','left_join','users','u.id\x20=\x20ui.UserId','length','\x20IN\x20?','map','getInteractionsTables','getInteractionFK','interactions','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','o.id\x20=\x20i.UserId','accounts','a.id\x20=\x20i.','messages','me.','\x20=\x20i.id','it.','expr','getSelectedTags','forEach','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','replace','{OPERATOR}','i.id\x20LIKE\x20?','sms','whatsapp','fax','i.fax\x20LIKE\x20?','openchannel','i.from\x20LIKE\x20?','isEmail','c.email\x20LIKE\x20?','MATCH\x20(i.to,\x20i.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','getFullTextValue','MATCH\x20(me.plainBody,\x20me.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','sqlOperator','conditions','find','buildExpression','type','text','start','value','end','unreadMessages','read','and','Contact','operator','$substring','split','contact','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','Tag','tags','clause','user','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','body','plainBody','keys','some','compact','concat','parse','$gte','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20IS\x20NULL','\x20=\x20?','then','fields','tag','filter','get','capitalize','chat','Websites','Accounts','resolve','\x20IS\x20NOT\x20NULL','i.thirdDisposition','i.disposition','mail','unshift','i.substatus','closed','shift','join','Sequelize','QueryTypes','sequelize','query','toString','keyBy','merge','attributes','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','Account.email','CASE\x20WHEN\x20i.to\x20IS\x20NOT\x20NULL\x20AND\x20i.to\x20<>\x20\x27\x27\x20AND\x20i.to\x20NOT\x20LIKE\x20CONCAT(\x27%\x27,\x20a.email,\x20\x27%\x27)\x20THEN\x20TRIM(SUBSTRING_INDEX(i.to,\x20\x27<\x27,\x201))\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','contactName','i.createdAt','i.updatedAt','i.closed','i.closedAt','i.attach','i.lastMsgAt','i.lastMsgDirection','i.subject','i.secondDisposition','i.to'];(function(_0xc8e38b,_0x3cb166){var _0xe41856=function(_0x2a4a3c){while(--_0x2a4a3c){_0xc8e38b['push'](_0xc8e38b['shift']());}};_0xe41856(++_0x3cb166);}(_0xf8db,0xc7));var _0xbf8d=function(_0x1ff804,_0x263135){_0x1ff804=_0x1ff804-0x0;var _0x3454b8=_0xf8db[_0x1ff804];return _0x3454b8;};'use strict';var _=require(_0xbf8d('0x0'));var squel=require('squel');var as=require('../parsers/advancedSearch');var qs=require(_0xbf8d('0x1'));var updateInteraction=require(_0xbf8d('0x2'))['updateInteraction'];var utils=require(_0xbf8d('0x3'));var db=require(_0xbf8d('0x4'))['db'];function skipInteractionsQuery(_0x1fa57a,_0x2a2802,_0x4aedf0){var _0x369892=![];var _0x37cec4=utils[_0xbf8d('0x5')](_0x1fa57a);if(_0x2a2802[_0xbf8d('0x6')]===_0xbf8d('0x7')&&!_0x4aedf0[_0xbf8d('0x8')]&&!_0x4aedf0[_0x37cec4]){_0x369892=!![];}return _0x369892;}function getTagsQuery(){return squel[_0xbf8d('0x9')]()[_0xbf8d('0xa')]('id')[_0xbf8d('0xa')](_0xbf8d('0xb'))[_0xbf8d('0xa')](_0xbf8d('0xc'))['from'](_0xbf8d('0xd'));}function getUsersQuery(_0x1424af,_0x15e70b){var _0x48c01c=utils['getInteractionFK'](_0x1424af);var _0x2cece1=_0xbf8d('0xe')+_0x1424af+'_interactions';var _0x1785e0=squel[_0xbf8d('0x9')]()[_0xbf8d('0xa')](_0xbf8d('0xf'))[_0xbf8d('0xa')]('u.fullname')['field'](_0xbf8d('0x10')+_0x48c01c)[_0xbf8d('0x11')](_0x2cece1,'ui')[_0xbf8d('0x12')](_0xbf8d('0x13'),'u',_0xbf8d('0x14'));if(_0x15e70b[_0xbf8d('0x15')]>0x0){_0x1785e0['where']('ui.'+_0x48c01c+_0xbf8d('0x16'),_[_0xbf8d('0x17')](_0x15e70b,'id'));}return _0x1785e0;}function getInteractionsQuery(_0x1d06ec){var _0x981bd7=utils[_0xbf8d('0x18')](_0x1d06ec);var _0x2bf252=utils[_0xbf8d('0x5')](_0x1d06ec);var _0xd8f2ad=utils[_0xbf8d('0x19')](_0x1d06ec);return squel[_0xbf8d('0x9')]()['from'](_0x981bd7[_0xbf8d('0x1a')],'i')[_0xbf8d('0x12')](_0xbf8d('0x1b'),'c',_0xbf8d('0x1c'))[_0xbf8d('0x12')](_0xbf8d('0x13'),'o',_0xbf8d('0x1d'))[_0xbf8d('0x12')](_0x981bd7[_0xbf8d('0x1e')],'a',_0xbf8d('0x1f')+_0x2bf252)[_0xbf8d('0x12')](_0x981bd7[_0xbf8d('0x20')],'me',_0xbf8d('0x21')+_0xd8f2ad+_0xbf8d('0x22'))[_0xbf8d('0x12')](_0x981bd7['interactionsTags'],'it',_0xbf8d('0x23')+_0xd8f2ad+'\x20=\x20i.id')[_0xbf8d('0x12')](_0xbf8d('0xd'),'t','t.id\x20=\x20it.TagId');}function getSqlClauses(){var _0x38d870={'body':squel[_0xbf8d('0x24')](),'contact':squel['expr'](),'default':squel[_0xbf8d('0x24')](),'fields':squel[_0xbf8d('0x24')](),'filter':squel['expr'](),'read':squel[_0xbf8d('0x24')](),'tags':{'clause':squel[_0xbf8d('0x24')](),'ids':null},'user':squel[_0xbf8d('0x24')]()};return _0x38d870;}function parseTagParameter(_0x2d8cc0){var _0x1fd736=squel['expr']();if(_0x2d8cc0){var _0x1dec4b=utils[_0xbf8d('0x25')](_0x2d8cc0);_0x1dec4b[_0xbf8d('0x26')](function(_0x5babfc){_0x1fd736['or'](_0xbf8d('0x27'),'%,'+_0x5babfc+',%');});}return _0x1fd736;}function parseReadParameter(_0x162c7c){var _0x5d5857='';if(_0x162c7c){_0x5d5857='unreadMessages\x20{OPERATOR}\x200';if(_0x162c7c==='1'){_0x5d5857=_0x5d5857[_0xbf8d('0x28')](_0xbf8d('0x29'),'=');}else{_0x5d5857=_0x5d5857[_0xbf8d('0x28')](_0xbf8d('0x29'),'>');}}return _0x5d5857;}function parseSearchFilter(_0x4e78bb,_0x4a2770){var _0x32435=squel[_0xbf8d('0x24')]();if(_0x4a2770){var _0x1bd792=_0x4a2770[_0xbf8d('0x28')]('\x5c','\x5c\x5c')[_0xbf8d('0x28')](/'/g,'\x27\x27');if(qs['isNumeric'](_0x1bd792)){_0x32435['or'](_0xbf8d('0x2a'),_0x1bd792+'%');if([_0xbf8d('0x2b'),_0xbf8d('0x2c')]['includes'](_0x4e78bb)){_0x32435['or']('i.phone\x20LIKE\x20?',_0x1bd792+'%');}else if(_0x4e78bb===_0xbf8d('0x2d')){_0x32435['or'](_0xbf8d('0x2e'),_0x1bd792+'%');}else if(_0x4e78bb===_0xbf8d('0x2f')){_0x32435['or'](_0xbf8d('0x30'),_0x1bd792+'%');}}else if(_0x4e78bb==='mail'&&qs[_0xbf8d('0x31')](_0x1bd792)){_0x32435['or'](_0xbf8d('0x32'),_0x1bd792+'%');}else{if(_0x4e78bb==='mail'){_0x32435['or'](_0xbf8d('0x33'),qs[_0xbf8d('0x34')](_0x1bd792,!![]))['or'](_0xbf8d('0x35'),qs['getFullTextValue'](_0x1bd792));}else if(_0x4e78bb!=='fax'){_0x32435['or'](_0xbf8d('0x36'),qs[_0xbf8d('0x34')](_0x1bd792));}_0x32435['or'](_0xbf8d('0x37'),qs[_0xbf8d('0x34')](_0x1bd792,!![]),null);}}return _0x32435;}function parseAdvancedSearchFilter(_0x507a0b,_0x30c3d3){var _0x52a270=getSqlClauses();var _0x9adfbe=as['parseSearch'](_0x507a0b);var _0xa39f47=_0x9adfbe[_0xbf8d('0x38')];for(var _0x44c180=0x0;_0x44c180<_0x9adfbe['conditions']['length'];_0x44c180++){var _0xb447e4=_0x9adfbe[_0xbf8d('0x39')][_0x44c180];var _0x3faae1='i';var _0x24b135=_[_0xbf8d('0x3a')](_0x30c3d3,[_0xbf8d('0xb'),_0xb447e4[_0xbf8d('0xa')]]);if(_0x24b135){var _0x3b4d9c=as[_0xbf8d('0x3b')](_0x3faae1,_0x24b135[_0xbf8d('0x3c')],_0xb447e4);_0x52a270['default'][_0xa39f47](_0x3b4d9c[_0xbf8d('0x3d')],_0x3b4d9c['value'][_0xbf8d('0x3e')],_0x3b4d9c[_0xbf8d('0x3f')][_0xbf8d('0x40')]);}else{switch(_0xb447e4['field']){case _0xbf8d('0x41'):var _0x4e383f=parseReadParameter(_0xb447e4[_0xbf8d('0x3f')]);_0x52a270[_0xbf8d('0x42')][_0xbf8d('0x43')](_0x4e383f);break;case _0xbf8d('0x44'):if(_0xb447e4[_0xbf8d('0x45')]===_0xbf8d('0x46')){if(_0xb447e4[_0xbf8d('0x3f')][_0xbf8d('0x47')]('\x20')[_0xbf8d('0x15')]>0x1){_0x52a270[_0xbf8d('0x48')][_0xa39f47](_0xbf8d('0x37'),qs['getFullTextValue'](_0xb447e4[_0xbf8d('0x3f')],!![]),null);}else{var _0x20049e='%'+_0xb447e4[_0xbf8d('0x3f')]+'%';_0x52a270[_0xbf8d('0x48')][_0xa39f47](_0xbf8d('0x49'),_0x20049e,_0x20049e,_0x20049e);}}else{_0x24b135=_[_0xbf8d('0x3a')](_0x30c3d3,[_0xbf8d('0xb'),_0xbf8d('0x4a')]);_0xb447e4['field']=_0xbf8d('0x4a');_0x3b4d9c=as[_0xbf8d('0x3b')](_0x3faae1,_0x24b135[_0xbf8d('0x3c')],_0xb447e4);_0x52a270[_0xbf8d('0x48')][_0xa39f47](_0x3b4d9c['text'],_0x3b4d9c[_0xbf8d('0x3f')][_0xbf8d('0x3e')],_0x3b4d9c[_0xbf8d('0x3f')]['end']);}break;case _0xbf8d('0x4b'):var _0x1ccab3=_0xb447e4['value'][_0xbf8d('0x47')](',')[_0xbf8d('0x17')](function(_0x1601a6){return Number(_0x1601a6);});var _0x1cb5c8=parseTagParameter(_0x1ccab3);_0x52a270[_0xbf8d('0x4c')][_0xbf8d('0x4d')][_0xbf8d('0x43')](_0x1cb5c8);_0x52a270[_0xbf8d('0x4c')]['ids']=_0x1ccab3;break;case'User':if(_0xb447e4[_0xbf8d('0x45')]===_0xbf8d('0x46')){_0x52a270[_0xbf8d('0x4e')][_0xa39f47](_0xbf8d('0x4f'),'%'+_0xb447e4[_0xbf8d('0x3f')]+'%',null);}else{_0x24b135=_['find'](_0x30c3d3,[_0xbf8d('0xb'),_0xbf8d('0x50')]);_0xb447e4[_0xbf8d('0xa')]=_0xbf8d('0x50');_0x3b4d9c=as[_0xbf8d('0x3b')](_0x3faae1,_0x24b135[_0xbf8d('0x3c')],_0xb447e4);_0x52a270[_0xbf8d('0x4e')][_0xa39f47](_0x3b4d9c[_0xbf8d('0x3d')],_0x3b4d9c[_0xbf8d('0x3f')][_0xbf8d('0x3e')],_0x3b4d9c['value']['end']);}break;case _0xbf8d('0x51'):case _0xbf8d('0x52'):_0x3b4d9c=as[_0xbf8d('0x3b')]('me',null,_0xb447e4);_0x52a270['body'][_0xa39f47](_0x3b4d9c[_0xbf8d('0x3d')],_0x3b4d9c[_0xbf8d('0x3f')][_0xbf8d('0x3e')],_0x3b4d9c[_0xbf8d('0x3f')][_0xbf8d('0x40')]);break;}}}return _0x52a270;}function parseModelFields(_0x1f0aee,_0x561174,_0x3b37fb){var _0x493869=utils['getAccountFK'](_0x1f0aee);var _0x2fbd84=squel['expr']();var _0xae2535=_(_0x561174)[_0xbf8d('0x53')]()[_0xbf8d('0x17')](function(_0x1cd7dd){return _[_0xbf8d('0x54')](_0x3b37fb,[_0xbf8d('0xb'),_0x1cd7dd])?_0x1cd7dd:undefined;})[_0xbf8d('0x55')]()[_0xbf8d('0x3f')]();if(_0xae2535['length']>0x0){_0xae2535[_0xbf8d('0x26')](function(_0x41cb54){if(_0x41cb54===_0x493869){_0x2fbd84['and']('i.'+_0x493869+'\x20IN\x20?',[][_0xbf8d('0x56')](_0x561174[_0x41cb54]));}else if(_0x41cb54==='createdAt'){var _0x4c2da4=JSON[_0xbf8d('0x57')](_0x561174[_0x41cb54])[_0xbf8d('0x58')];var _0x4c44c6=JSON[_0xbf8d('0x57')](_0x561174[_0x41cb54])[_0xbf8d('0x59')];_0x2fbd84[_0xbf8d('0x43')](_0xbf8d('0x5a'),_0x4c2da4,_0x4c44c6);}else{if(_0x561174[_0x41cb54]===_0xbf8d('0x5b')){_0x2fbd84[_0xbf8d('0x43')]('i.'+_0x41cb54+_0xbf8d('0x5c'));}else{_0x2fbd84[_0xbf8d('0x43')]('i.'+_0x41cb54+_0xbf8d('0x5d'),_0x561174[_0x41cb54]);}}});}return _0x2fbd84;}function parseQueryParameters(_0x3af46f,_0x5706ab,_0x3b7383){var _0x2cb552=getSqlClauses();return Promise['resolve']()[_0xbf8d('0x5e')](function(){return parseModelFields(_0x3af46f,_0x5706ab,_0x3b7383);})['then'](function(_0x5c0a21){_0x2cb552[_0xbf8d('0x5f')][_0xbf8d('0x43')](_0x5c0a21);return parseReadParameter(_0x5706ab['read']);})['then'](function(_0x456fb3){_0x2cb552[_0xbf8d('0x42')][_0xbf8d('0x43')](_0x456fb3);return parseTagParameter(_0x5706ab[_0xbf8d('0x60')]);})[_0xbf8d('0x5e')](function(_0x2b4788){_0x2cb552[_0xbf8d('0x4c')][_0xbf8d('0x4d')][_0xbf8d('0x43')](_0x2b4788);return parseSearchFilter(_0x3af46f,_0x5706ab[_0xbf8d('0x61')]);})[_0xbf8d('0x5e')](function(_0x3d0735){_0x2cb552['filter']=_0x3d0735;return _0x2cb552;});}function checkAccountsRestrictions(_0x2ae8d7,_0x23066c,_0x162d3c){var _0x3e0d38=utils[_0xbf8d('0x5')](_0x2ae8d7);var _0x4ac597=_0xbf8d('0x62')+_[_0xbf8d('0x63')](_0x2ae8d7)+(_0x2ae8d7===_0xbf8d('0x64')?_0xbf8d('0x65'):_0xbf8d('0x66'));var _0x170dbb=squel[_0xbf8d('0x24')]();return Promise[_0xbf8d('0x67')]()[_0xbf8d('0x5e')](function(){if(_0x162d3c['search']&&_0x23066c['role']===_0xbf8d('0x7')){return _0x23066c[_0x4ac597]({'attributes':['id'],'raw':!![]});}})[_0xbf8d('0x5e')](function(_0x4fd321){if(_0x4fd321){if(_0x4fd321[_0xbf8d('0x15')]===0x0){_0x170dbb[_0xbf8d('0x43')]('i.'+_0x3e0d38+_0xbf8d('0x5c'));}else{_0x170dbb[_0xbf8d('0x43')]('i.'+_0x3e0d38+_0xbf8d('0x16'),_[_0xbf8d('0x17')](_0x4fd321,'id'));}}else if(!_0x162d3c[_0x3e0d38]){_0x170dbb[_0xbf8d('0x43')]('i.'+_0x3e0d38+_0xbf8d('0x68'));}})[_0xbf8d('0x5e')](function(){return _0x170dbb;});}function getClosedOrderClause(_0x4209a0,_0x11c0f3){var _0x4cb2dd='';var _0x40fa3a=[_0xbf8d('0x69'),'i.secondDisposition',_0xbf8d('0x6a')];if(_0x4209a0===_0xbf8d('0x6b')){_0x40fa3a[_0xbf8d('0x6c')](_0xbf8d('0x6d'));}if(_0x11c0f3['closed']==='0'&&_0x4209a0==='mail'){_0x4cb2dd=_0xbf8d('0x6d');}else{if(_0x11c0f3[_0xbf8d('0x6e')]==='1'){_0x40fa3a[_0xbf8d('0x6f')]();}_0x4cb2dd='CONCAT_WS(\x27\x27,\x20'+_0x40fa3a[_0xbf8d('0x70')](',\x20')+')';}return _0x4cb2dd;}function getFilteredInteractions(_0x445183,_0x3fbcbf,_0x26703f,_0x17bc7f){var _0x5979d0=utils['getInteractionFK'](_0x445183);var _0x209fac=_[_0xbf8d('0x63')](_0x445183)+'Interaction';var _0x43fd7b=[];var _0x4a9938=getTagsQuery();var _0x56f3ea={'type':db[_0xbf8d('0x71')][_0xbf8d('0x72')]['SELECT'],'raw':!![]};var _0x5b8c4e=[];var _0x5205bb=[];return db[_0xbf8d('0x73')][_0xbf8d('0x74')](_0x4a9938[_0xbf8d('0x75')](),_0x56f3ea)[_0xbf8d('0x5e')](function(_0x61f26e){_0x43fd7b=_[_0xbf8d('0x76')](_0x61f26e,'id');_0x56f3ea=_[_0xbf8d('0x77')](_0x56f3ea,{'model':db[_0x209fac],'mapToModel':!![],'nest':!![]});if(_0x26703f[_0xbf8d('0x5f')]){_0x17bc7f[_0xbf8d('0x78')][_0xbf8d('0x26')](function(_0x2f1846){_0x3fbcbf['field']('i.'+_0x2f1846);});}else{_0x3fbcbf['field'](_0xbf8d('0x79'),_0xbf8d('0x41'));_0x3fbcbf['field']('a.key','Account.key');_0x3fbcbf[_0xbf8d('0xa')]('a.mandatoryDisposition','Account.mandatoryDisposition');if(_0x445183===_0xbf8d('0x6b')){_0x3fbcbf[_0xbf8d('0xa')]('a.email',_0xbf8d('0x7a'));_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x7b'),_0xbf8d('0x7c'));_0x3fbcbf[_0xbf8d('0xa')]('i.id');_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x7d'));_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x7e'));_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x7f'));_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x80'));_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x81'));_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x82'));_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x83'));_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x84'));_0x3fbcbf[_0xbf8d('0xa')]('i.disposition');_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x85'));_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x69'));_0x3fbcbf[_0xbf8d('0xa')]('i.substatus');_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x86'));_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x87'));_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x88'));_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x89'));}else if(_0x445183===_0xbf8d('0x2f')){_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x8a'),_0xbf8d('0x7c'));}else{_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x8b'),_0xbf8d('0x7c'));}if(_0x445183!==_0xbf8d('0x6b')){_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x8c'));}_0x3fbcbf['field']('c.firstName',_0xbf8d('0x8d'));_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x8e'),_0xbf8d('0x8f'));_0x3fbcbf['field'](_0xbf8d('0x90'),_0xbf8d('0x91'));_0x3fbcbf['field'](_0xbf8d('0x92'),_0xbf8d('0x93'));_0x3fbcbf['field'](_0xbf8d('0x94'),'Contact.mobile');_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x95'),'Contact.fax');_0x3fbcbf['field'](_0xbf8d('0x96'),_0xbf8d('0x97'));_0x3fbcbf[_0xbf8d('0xa')](_0xbf8d('0x98'),_0xbf8d('0x99'));_0x3fbcbf['field'](_0xbf8d('0x9a'),_0xbf8d('0x9b'));}if(_0x17bc7f[_0xbf8d('0x9c')]){_0x3fbcbf[_0xbf8d('0x9c')](_0x17bc7f[_0xbf8d('0x9c')]);}if(_0x17bc7f[_0xbf8d('0x9d')]){_0x3fbcbf[_0xbf8d('0x9d')](_0x17bc7f[_0xbf8d('0x9d')]);}return db[_0xbf8d('0x73')][_0xbf8d('0x74')](_0x3fbcbf[_0xbf8d('0x75')](),_0x56f3ea);})['then'](function(_0x3d84c9){_0x5b8c4e=_0x3d84c9;var _0x3a8655=getUsersQuery(_0x445183,_0x5b8c4e);return db[_0xbf8d('0x73')]['query'](_0x3a8655['toString'](),_0x56f3ea);})[_0xbf8d('0x5e')](function(_0x46d04f){_0x5205bb=_[_0xbf8d('0x9e')](_0x46d04f,_0x5979d0);if(_0x445183===_0xbf8d('0x6b')){return db[_0xbf8d('0x9f')][_0xbf8d('0xa0')]({'attributes':[_0xbf8d('0xa1')],'raw':!![]});}})[_0xbf8d('0x5e')](function(_0x3c2f9d){var _0x589baf=_0x3c2f9d?_0x3c2f9d[_0xbf8d('0xa1')]:undefined;var _0x43fc91=_0x5b8c4e[_0xbf8d('0x17')](function(_0x4f30ab){return updateInteraction(_0x4f30ab,_0x43fd7b,_0x5205bb,_0x589baf);});return Promise[_0xbf8d('0xa2')](_0x43fc91);});}function countFilteredInteractions(_0xadccd2,_0x486378){var _0x3f5029=_0xadccd2['clone']();_0x3f5029[_0xbf8d('0xa')](_0xbf8d('0xa3'));_0x3f5029[_0xbf8d('0xa')]('SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','unreadMessages');var _0x1cce46=utils[_0xbf8d('0x25')](_0x486378);if(!_[_0xbf8d('0xa4')](_0x1cce46)){_0x3f5029['where']('t.id\x20IN\x20?',_0x1cce46);}var _0x13c132={'type':db[_0xbf8d('0x71')][_0xbf8d('0x72')][_0xbf8d('0xa5')],'raw':!![]};return db['sequelize']['query'](_0x3f5029[_0xbf8d('0x75')](),_0x13c132);}module[_0xbf8d('0xa6')]={'checkAccountsRestrictions':checkAccountsRestrictions,'countFilteredInteractions':countFilteredInteractions,'getClosedOrderClause':getClosedOrderClause,'getFilteredInteractions':getFilteredInteractions,'getInteractionsQuery':getInteractionsQuery,'parseAdvancedSearchFilter':parseAdvancedSearchFilter,'parseQueryParameters':parseQueryParameters,'skipInteractionsQuery':skipInteractionsQuery};
\ No newline at end of file
+var _0x9c6f=['{OPERATOR}','isNumeric','i.id\x20LIKE\x20?','sms','whatsapp','includes','fax','i.fax\x20LIKE\x20?','openchannel','i.from\x20LIKE\x20?','mail','getFullTextValue','MATCH\x20(me.plainBody,\x20me.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','MATCH\x20(me.body)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','parseSearch','sqlOperator','conditions','find','default','text','start','end','unreadMessages','read','and','Contact','operator','$substring','split','MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)','value','c.firstName\x20LIKE\x20?\x20OR\x20c.lastName\x20LIKE\x20?\x20OR\x20c.email\x20LIKE\x20?','ContactId','buildExpression','type','contact','Tag','tags','clause','user','CONCAT_WS(\x27\x20\x27,\x20o.name,\x20o.fullname)\x20LIKE\x20?','UserId','body','keys','compact','length','concat','createdAt','parse','$gte','$lte','i.createdAt\x20BETWEEN\x20?\x20AND\x20?','null','\x20IS\x20NULL','then','tag','filter','get','Websites','Accounts','resolve','role','i.secondDisposition','i.substatus','closed','shift','CONCAT_WS(\x27\x27,\x20','join','Interaction','Sequelize','SELECT','sequelize','toString','keyBy','merge','fields','attributes','SUM(me.read\x20=\x200\x20AND\x20me.direction\x20=\x20\x27in\x27)','a.key','a.mandatoryDisposition','Account.mandatoryDisposition','a.email','Account.email','CASE\x20WHEN\x20i.to\x20IS\x20NOT\x20NULL\x20AND\x20i.to\x20<>\x20\x27\x27\x20AND\x20i.to\x20NOT\x20LIKE\x20CONCAT(\x27%\x27,\x20a.email,\x20\x27%\x27)\x20THEN\x20TRIM(SUBSTRING_INDEX(i.to,\x20\x27<\x27,\x201))\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','contactName','i.id','i.createdAt','i.updatedAt','i.closed','i.closedAt','i.disposition','i.thirdDisposition','i.to','i.ContactId','i.MailAccountId','i.UserId','CASE\x20WHEN\x20i.from\x20IS\x20NOT\x20NULL\x20AND\x20i.from\x20<>\x20\x27\x27\x20THEN\x20i.from\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','CASE\x20WHEN\x20(c.firstName\x20IS\x20NOT\x20NULL\x20AND\x20c.firstName\x20<>\x20\x27\x27)\x20OR\x20(c.lastName\x20IS\x20NOT\x20NULL\x20AND\x20c.lastName\x20<>\x20\x27\x27)\x20THEN\x20CONCAT(IFNULL(c.firstName,\x20\x27\x27),\x20\x27\x20\x27,\x20IFNULL(c.lastName,\x20\x27\x27))\x20ELSE\x20\x27Unknown\x27\x20END','i.*','c.firstName','Contact.firstName','c.lastName','Contact.lastName','Contact.email','c.mobile','Contact.mobile','c.fax','Contact.fax','o.fullname','o.internal','TagIds','limit','offset','query','groupBy','Setting','findOne','enableEmailPreview','all','clone','COUNT(*)','getSelectedTags','isEmpty','t.id\x20IN\x20?','QueryTypes','exports','lodash','squel','../parsers/advancedSearch','../parsers/qs','./utils','../../mysqldb','agent','search','select','field','name','color','from','tools_tags','getInteractionFK','user_has_','u.id','u.fullname','ui.','left_join','users','u.id\x20=\x20ui.UserId','where','\x20IN\x20?','map','getInteractionsTables','getAccountFK','cm_contacts','c.id\x20=\x20i.ContactId\x20AND\x20c.deletedAt\x20IS\x20NULL','accounts','messages','me.','\x20=\x20i.id','it.','t.id\x20=\x20it.TagId','expr','forEach','CONCAT(\x27,\x27,\x20`TagIds`,\x20\x27,\x27)\x20LIKE\x20?','unreadMessages\x20{OPERATOR}\x200','replace'];(function(_0x1e5ba9,_0x1ea95c){var _0x336855=function(_0x56d415){while(--_0x56d415){_0x1e5ba9['push'](_0x1e5ba9['shift']());}};_0x336855(++_0x1ea95c);}(_0x9c6f,0x124));var _0xf9c6=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x9c6f[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xf9c6('0x0'));var squel=require(_0xf9c6('0x1'));var as=require(_0xf9c6('0x2'));var qs=require(_0xf9c6('0x3'));var updateInteraction=require('./update-interaction')['updateInteraction'];var utils=require(_0xf9c6('0x4'));var db=require(_0xf9c6('0x5'))['db'];function skipInteractionsQuery(_0x285d1a,_0x11590b,_0x3914ec){var _0x1c6cb8=![];var _0x110b30=utils['getAccountFK'](_0x285d1a);if(_0x11590b['role']===_0xf9c6('0x6')&&!_0x3914ec[_0xf9c6('0x7')]&&!_0x3914ec[_0x110b30]){_0x1c6cb8=!![];}return _0x1c6cb8;}function getTagsQuery(){return squel[_0xf9c6('0x8')]()[_0xf9c6('0x9')]('id')[_0xf9c6('0x9')](_0xf9c6('0xa'))['field'](_0xf9c6('0xb'))[_0xf9c6('0xc')](_0xf9c6('0xd'));}function getUsersQuery(_0x255625,_0x29185a){var _0x4ccef4=utils[_0xf9c6('0xe')](_0x255625);var _0x464c5d=_0xf9c6('0xf')+_0x255625+'_interactions';var _0x4fbd31=squel[_0xf9c6('0x8')]()['field'](_0xf9c6('0x10'))[_0xf9c6('0x9')](_0xf9c6('0x11'))[_0xf9c6('0x9')](_0xf9c6('0x12')+_0x4ccef4)[_0xf9c6('0xc')](_0x464c5d,'ui')[_0xf9c6('0x13')](_0xf9c6('0x14'),'u',_0xf9c6('0x15'));if(_0x29185a['length']>0x0){_0x4fbd31[_0xf9c6('0x16')](_0xf9c6('0x12')+_0x4ccef4+_0xf9c6('0x17'),_[_0xf9c6('0x18')](_0x29185a,'id'));}return _0x4fbd31;}function getInteractionsQuery(_0xe81993){var _0x14aa49=utils[_0xf9c6('0x19')](_0xe81993);var _0x2ea8a7=utils[_0xf9c6('0x1a')](_0xe81993);var _0x515017=utils['getInteractionFK'](_0xe81993);return squel['select']()[_0xf9c6('0xc')](_0x14aa49['interactions'],'i')[_0xf9c6('0x13')](_0xf9c6('0x1b'),'c',_0xf9c6('0x1c'))['left_join'](_0xf9c6('0x14'),'o','o.id\x20=\x20i.UserId')[_0xf9c6('0x13')](_0x14aa49[_0xf9c6('0x1d')],'a','a.id\x20=\x20i.'+_0x2ea8a7)[_0xf9c6('0x13')](_0x14aa49[_0xf9c6('0x1e')],'me',_0xf9c6('0x1f')+_0x515017+_0xf9c6('0x20'))[_0xf9c6('0x13')](_0x14aa49['interactionsTags'],'it',_0xf9c6('0x21')+_0x515017+_0xf9c6('0x20'))[_0xf9c6('0x13')](_0xf9c6('0xd'),'t',_0xf9c6('0x22'));}function getSqlClauses(){var _0x456f77={'body':squel[_0xf9c6('0x23')](),'contact':squel[_0xf9c6('0x23')](),'default':squel[_0xf9c6('0x23')](),'fields':squel[_0xf9c6('0x23')](),'filter':squel[_0xf9c6('0x23')](),'read':squel[_0xf9c6('0x23')](),'tags':{'clause':squel[_0xf9c6('0x23')](),'ids':null},'user':squel[_0xf9c6('0x23')]()};return _0x456f77;}function parseTagParameter(_0x17d280){var _0x301d25=squel[_0xf9c6('0x23')]();if(_0x17d280){var _0x54a03b=utils['getSelectedTags'](_0x17d280);_0x54a03b[_0xf9c6('0x24')](function(_0x483e1c){_0x301d25['or'](_0xf9c6('0x25'),'%,'+_0x483e1c+',%');});}return _0x301d25;}function parseReadParameter(_0x12445a){var _0x547c87='';if(_0x12445a){_0x547c87=_0xf9c6('0x26');if(_0x12445a==='1'){_0x547c87=_0x547c87[_0xf9c6('0x27')](_0xf9c6('0x28'),'=');}else{_0x547c87=_0x547c87[_0xf9c6('0x27')]('{OPERATOR}','>');}}return _0x547c87;}function parseSearchFilter(_0x2b8cef,_0x39f2b6){var _0x9e5d5=squel[_0xf9c6('0x23')]();if(_0x39f2b6){var _0x127946=_0x39f2b6[_0xf9c6('0x27')]('\x5c','\x5c\x5c')[_0xf9c6('0x27')](/'/g,'\x27\x27');if(qs[_0xf9c6('0x29')](_0x127946)){_0x9e5d5['or'](_0xf9c6('0x2a'),_0x127946+'%');if([_0xf9c6('0x2b'),_0xf9c6('0x2c')][_0xf9c6('0x2d')](_0x2b8cef)){_0x9e5d5['or']('i.phone\x20LIKE\x20?',_0x127946+'%');}else if(_0x2b8cef===_0xf9c6('0x2e')){_0x9e5d5['or'](_0xf9c6('0x2f'),_0x127946+'%');}else if(_0x2b8cef===_0xf9c6('0x30')){_0x9e5d5['or'](_0xf9c6('0x31'),_0x127946+'%');}}else if(_0x2b8cef===_0xf9c6('0x32')&&qs['isEmail'](_0x127946)){_0x9e5d5['or']('c.email\x20LIKE\x20?',_0x127946+'%');}else{if(_0x2b8cef===_0xf9c6('0x32')){_0x9e5d5['or']('MATCH\x20(i.to,\x20i.subject)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs[_0xf9c6('0x33')](_0x127946,!![]))['or'](_0xf9c6('0x34'),qs['getFullTextValue'](_0x127946));}else if(_0x2b8cef!==_0xf9c6('0x2e')){_0x9e5d5['or'](_0xf9c6('0x35'),qs[_0xf9c6('0x33')](_0x127946));}_0x9e5d5['or']('MATCH\x20(c.firstName,\x20c.lastName,\x20c.phone,\x20c.mobile,\x20c.fax,\x20c.email)\x20AGAINST\x20(?\x20IN\x20BOOLEAN\x20MODE)',qs[_0xf9c6('0x33')](_0x127946,!![]),null);}}return _0x9e5d5;}function parseAdvancedSearchFilter(_0x522740,_0x3683de){var _0x43f887=getSqlClauses();var _0x28eee9=as[_0xf9c6('0x36')](_0x522740);var _0x53fa4d=_0x28eee9[_0xf9c6('0x37')];for(var _0x3e0dd6=0x0;_0x3e0dd6<_0x28eee9[_0xf9c6('0x38')]['length'];_0x3e0dd6++){var _0x2ed838=_0x28eee9[_0xf9c6('0x38')][_0x3e0dd6];var _0x378015='i';var _0xf9811f=_[_0xf9c6('0x39')](_0x3683de,[_0xf9c6('0xa'),_0x2ed838[_0xf9c6('0x9')]]);if(_0xf9811f){var _0xd6544b=as['buildExpression'](_0x378015,_0xf9811f['type'],_0x2ed838);_0x43f887[_0xf9c6('0x3a')][_0x53fa4d](_0xd6544b[_0xf9c6('0x3b')],_0xd6544b['value'][_0xf9c6('0x3c')],_0xd6544b['value'][_0xf9c6('0x3d')]);}else{switch(_0x2ed838[_0xf9c6('0x9')]){case _0xf9c6('0x3e'):var _0x1e17d8=parseReadParameter(_0x2ed838['value']);_0x43f887[_0xf9c6('0x3f')][_0xf9c6('0x40')](_0x1e17d8);break;case _0xf9c6('0x41'):if(_0x2ed838[_0xf9c6('0x42')]===_0xf9c6('0x43')){if(_0x2ed838['value'][_0xf9c6('0x44')]('\x20')['length']>0x1){_0x43f887['contact'][_0x53fa4d](_0xf9c6('0x45'),qs['getFullTextValue'](_0x2ed838['value'],!![]),null);}else{var _0x5062eb='%'+_0x2ed838[_0xf9c6('0x46')]+'%';_0x43f887['contact'][_0x53fa4d](_0xf9c6('0x47'),_0x5062eb,_0x5062eb,_0x5062eb);}}else{_0xf9811f=_['find'](_0x3683de,[_0xf9c6('0xa'),_0xf9c6('0x48')]);_0x2ed838[_0xf9c6('0x9')]=_0xf9c6('0x48');_0xd6544b=as[_0xf9c6('0x49')](_0x378015,_0xf9811f[_0xf9c6('0x4a')],_0x2ed838);_0x43f887[_0xf9c6('0x4b')][_0x53fa4d](_0xd6544b['text'],_0xd6544b[_0xf9c6('0x46')][_0xf9c6('0x3c')],_0xd6544b['value'][_0xf9c6('0x3d')]);}break;case _0xf9c6('0x4c'):var _0x1958f=_0x2ed838[_0xf9c6('0x46')][_0xf9c6('0x44')](',')[_0xf9c6('0x18')](function(_0x121448){return Number(_0x121448);});var _0x186cd7=parseTagParameter(_0x1958f);_0x43f887[_0xf9c6('0x4d')][_0xf9c6('0x4e')][_0xf9c6('0x40')](_0x186cd7);_0x43f887[_0xf9c6('0x4d')]['ids']=_0x1958f;break;case'User':if(_0x2ed838['operator']===_0xf9c6('0x43')){_0x43f887[_0xf9c6('0x4f')][_0x53fa4d](_0xf9c6('0x50'),'%'+_0x2ed838[_0xf9c6('0x46')]+'%',null);}else{_0xf9811f=_[_0xf9c6('0x39')](_0x3683de,['name',_0xf9c6('0x51')]);_0x2ed838[_0xf9c6('0x9')]=_0xf9c6('0x51');_0xd6544b=as['buildExpression'](_0x378015,_0xf9811f[_0xf9c6('0x4a')],_0x2ed838);_0x43f887[_0xf9c6('0x4f')][_0x53fa4d](_0xd6544b['text'],_0xd6544b[_0xf9c6('0x46')][_0xf9c6('0x3c')],_0xd6544b[_0xf9c6('0x46')]['end']);}break;case _0xf9c6('0x52'):case'plainBody':_0xd6544b=as[_0xf9c6('0x49')]('me',null,_0x2ed838);_0x43f887[_0xf9c6('0x52')][_0x53fa4d](_0xd6544b[_0xf9c6('0x3b')],_0xd6544b['value'][_0xf9c6('0x3c')],_0xd6544b[_0xf9c6('0x46')][_0xf9c6('0x3d')]);break;}}}return _0x43f887;}function parseModelFields(_0x2ec999,_0x20e7d7,_0x295984){var _0x2b1d58=utils[_0xf9c6('0x1a')](_0x2ec999);var _0x2da2ad=squel[_0xf9c6('0x23')]();var _0x34ab87=_(_0x20e7d7)[_0xf9c6('0x53')]()['map'](function(_0x4c53b0){return _['some'](_0x295984,[_0xf9c6('0xa'),_0x4c53b0])?_0x4c53b0:undefined;})[_0xf9c6('0x54')]()[_0xf9c6('0x46')]();if(_0x34ab87[_0xf9c6('0x55')]>0x0){_0x34ab87[_0xf9c6('0x24')](function(_0x11da94){if(_0x11da94===_0x2b1d58){_0x2da2ad['and']('i.'+_0x2b1d58+'\x20IN\x20?',[][_0xf9c6('0x56')](_0x20e7d7[_0x11da94]));}else if(_0x11da94===_0xf9c6('0x57')){var _0x31b478=JSON[_0xf9c6('0x58')](_0x20e7d7[_0x11da94])[_0xf9c6('0x59')];var _0x45f1be=JSON['parse'](_0x20e7d7[_0x11da94])[_0xf9c6('0x5a')];_0x2da2ad[_0xf9c6('0x40')](_0xf9c6('0x5b'),_0x31b478,_0x45f1be);}else{if(_0x20e7d7[_0x11da94]===_0xf9c6('0x5c')){_0x2da2ad['and']('i.'+_0x11da94+_0xf9c6('0x5d'));}else{_0x2da2ad['and']('i.'+_0x11da94+'\x20=\x20?',_0x20e7d7[_0x11da94]);}}});}return _0x2da2ad;}function parseQueryParameters(_0xd0d3c7,_0x2a2b6d,_0x168565){var _0xb27637=getSqlClauses();return Promise['resolve']()[_0xf9c6('0x5e')](function(){return parseModelFields(_0xd0d3c7,_0x2a2b6d,_0x168565);})[_0xf9c6('0x5e')](function(_0x24226e){_0xb27637['fields'][_0xf9c6('0x40')](_0x24226e);return parseReadParameter(_0x2a2b6d[_0xf9c6('0x3f')]);})['then'](function(_0x5cd4b8){_0xb27637[_0xf9c6('0x3f')][_0xf9c6('0x40')](_0x5cd4b8);return parseTagParameter(_0x2a2b6d[_0xf9c6('0x5f')]);})['then'](function(_0x319d3d){_0xb27637['tags'][_0xf9c6('0x4e')][_0xf9c6('0x40')](_0x319d3d);return parseSearchFilter(_0xd0d3c7,_0x2a2b6d[_0xf9c6('0x60')]);})[_0xf9c6('0x5e')](function(_0x56826a){_0xb27637[_0xf9c6('0x60')]=_0x56826a;return _0xb27637;});}function checkAccountsRestrictions(_0x21eeff,_0x1d5680,_0x5a568a){var _0x81add2=utils[_0xf9c6('0x1a')](_0x21eeff);var _0x519ab8=_0xf9c6('0x61')+_['capitalize'](_0x21eeff)+(_0x21eeff==='chat'?_0xf9c6('0x62'):_0xf9c6('0x63'));var _0x252fd1=squel['expr']();return Promise[_0xf9c6('0x64')]()[_0xf9c6('0x5e')](function(){if(_0x5a568a[_0xf9c6('0x7')]&&_0x1d5680[_0xf9c6('0x65')]==='agent'){return _0x1d5680[_0x519ab8]({'attributes':['id'],'raw':!![]});}})[_0xf9c6('0x5e')](function(_0x1a79c6){if(_0x1a79c6){if(_0x1a79c6[_0xf9c6('0x55')]===0x0){_0x252fd1['and']('i.'+_0x81add2+_0xf9c6('0x5d'));}else{_0x252fd1[_0xf9c6('0x40')]('i.'+_0x81add2+'\x20IN\x20?',_[_0xf9c6('0x18')](_0x1a79c6,'id'));}}else if(!_0x5a568a[_0x81add2]){_0x252fd1[_0xf9c6('0x40')]('i.'+_0x81add2+'\x20IS\x20NOT\x20NULL');}})[_0xf9c6('0x5e')](function(){return _0x252fd1;});}function getClosedOrderClause(_0x1e3bcd,_0x445bc6){var _0x4a6cf0='';var _0x1c3392=['i.thirdDisposition',_0xf9c6('0x66'),'i.disposition'];if(_0x1e3bcd===_0xf9c6('0x32')){_0x1c3392['unshift'](_0xf9c6('0x67'));}if(_0x445bc6['closed']==='0'&&_0x1e3bcd===_0xf9c6('0x32')){_0x4a6cf0=_0xf9c6('0x67');}else{if(_0x445bc6[_0xf9c6('0x68')]==='1'){_0x1c3392[_0xf9c6('0x69')]();}_0x4a6cf0=_0xf9c6('0x6a')+_0x1c3392[_0xf9c6('0x6b')](',\x20')+')';}return _0x4a6cf0;}function getFilteredInteractions(_0x54dbaf,_0x231171,_0x550e16,_0x32133){var _0x2322af=utils[_0xf9c6('0xe')](_0x54dbaf);var _0x357d2c=_['capitalize'](_0x54dbaf)+_0xf9c6('0x6c');var _0x2ca101=[];var _0x42be4c=getTagsQuery();var _0x3db6ec={'type':db[_0xf9c6('0x6d')]['QueryTypes'][_0xf9c6('0x6e')],'raw':!![]};var _0x208e61=[];var _0x5b4dd4=[];return db[_0xf9c6('0x6f')]['query'](_0x42be4c[_0xf9c6('0x70')](),_0x3db6ec)[_0xf9c6('0x5e')](function(_0x5990bb){_0x2ca101=_[_0xf9c6('0x71')](_0x5990bb,'id');_0x3db6ec=_[_0xf9c6('0x72')](_0x3db6ec,{'model':db[_0x357d2c],'mapToModel':!![],'nest':!![]});if(_0x550e16[_0xf9c6('0x73')]){_0x32133[_0xf9c6('0x74')][_0xf9c6('0x24')](function(_0x357031){_0x231171['field']('i.'+_0x357031);});}else{_0x231171['field'](_0xf9c6('0x75'),_0xf9c6('0x3e'));_0x231171['field'](_0xf9c6('0x76'),'Account.key');_0x231171[_0xf9c6('0x9')](_0xf9c6('0x77'),_0xf9c6('0x78'));if(_0x54dbaf===_0xf9c6('0x32')){_0x231171[_0xf9c6('0x9')](_0xf9c6('0x79'),_0xf9c6('0x7a'));_0x231171[_0xf9c6('0x9')](_0xf9c6('0x7b'),_0xf9c6('0x7c'));_0x231171[_0xf9c6('0x9')](_0xf9c6('0x7d'));_0x231171[_0xf9c6('0x9')](_0xf9c6('0x7e'));_0x231171[_0xf9c6('0x9')](_0xf9c6('0x7f'));_0x231171[_0xf9c6('0x9')](_0xf9c6('0x80'));_0x231171['field'](_0xf9c6('0x81'));_0x231171[_0xf9c6('0x9')]('i.attach');_0x231171['field']('i.lastMsgAt');_0x231171['field']('i.lastMsgDirection');_0x231171[_0xf9c6('0x9')]('i.subject');_0x231171['field'](_0xf9c6('0x82'));_0x231171[_0xf9c6('0x9')]('i.secondDisposition');_0x231171[_0xf9c6('0x9')](_0xf9c6('0x83'));_0x231171[_0xf9c6('0x9')](_0xf9c6('0x67'));_0x231171[_0xf9c6('0x9')](_0xf9c6('0x84'));_0x231171[_0xf9c6('0x9')](_0xf9c6('0x85'));_0x231171[_0xf9c6('0x9')](_0xf9c6('0x86'));_0x231171[_0xf9c6('0x9')](_0xf9c6('0x87'));}else if(_0x54dbaf===_0xf9c6('0x30')){_0x231171[_0xf9c6('0x9')](_0xf9c6('0x88'),'contactName');}else{_0x231171['field'](_0xf9c6('0x89'),_0xf9c6('0x7c'));}if(_0x54dbaf!==_0xf9c6('0x32')){_0x231171[_0xf9c6('0x9')](_0xf9c6('0x8a'));}_0x231171[_0xf9c6('0x9')](_0xf9c6('0x8b'),_0xf9c6('0x8c'));_0x231171['field'](_0xf9c6('0x8d'),_0xf9c6('0x8e'));_0x231171['field']('c.email',_0xf9c6('0x8f'));_0x231171[_0xf9c6('0x9')]('c.phone','Contact.phone');_0x231171[_0xf9c6('0x9')](_0xf9c6('0x90'),_0xf9c6('0x91'));_0x231171[_0xf9c6('0x9')](_0xf9c6('0x92'),_0xf9c6('0x93'));_0x231171[_0xf9c6('0x9')](_0xf9c6('0x94'),'Owner.fullname');_0x231171['field'](_0xf9c6('0x95'),'Owner.internal');_0x231171[_0xf9c6('0x9')]('GROUP_CONCAT(DISTINCT\x20t.id)',_0xf9c6('0x96'));}if(_0x32133[_0xf9c6('0x97')]){_0x231171[_0xf9c6('0x97')](_0x32133['limit']);}if(_0x32133[_0xf9c6('0x98')]){_0x231171[_0xf9c6('0x98')](_0x32133['offset']);}return db[_0xf9c6('0x6f')][_0xf9c6('0x99')](_0x231171['toString'](),_0x3db6ec);})[_0xf9c6('0x5e')](function(_0x26fccb){_0x208e61=_0x26fccb;var _0x2b7bfa=getUsersQuery(_0x54dbaf,_0x208e61);return db[_0xf9c6('0x6f')][_0xf9c6('0x99')](_0x2b7bfa[_0xf9c6('0x70')](),_0x3db6ec);})['then'](function(_0x32a139){_0x5b4dd4=_[_0xf9c6('0x9a')](_0x32a139,_0x2322af);if(_0x54dbaf===_0xf9c6('0x32')){return db[_0xf9c6('0x9b')][_0xf9c6('0x9c')]({'attributes':[_0xf9c6('0x9d')],'raw':!![]});}})[_0xf9c6('0x5e')](function(_0x1de807){var _0x37e3ff=_0x1de807?_0x1de807[_0xf9c6('0x9d')]:undefined;var _0x65bae6=_0x208e61[_0xf9c6('0x18')](function(_0xd75d77){return updateInteraction(_0xd75d77,_0x2ca101,_0x5b4dd4,_0x37e3ff);});return Promise[_0xf9c6('0x9e')](_0x65bae6);});}function countFilteredInteractions(_0xd5de05,_0x1c5f68){var _0x40cb88=_0xd5de05[_0xf9c6('0x9f')]();_0x40cb88[_0xf9c6('0x9')](_0xf9c6('0xa0'));_0x40cb88['field'](_0xf9c6('0x75'),_0xf9c6('0x3e'));var _0x4253a2=utils[_0xf9c6('0xa1')](_0x1c5f68);if(!_[_0xf9c6('0xa2')](_0x4253a2)){_0x40cb88[_0xf9c6('0x16')](_0xf9c6('0xa3'),_0x4253a2);}var _0x5b78fb={'type':db['Sequelize'][_0xf9c6('0xa4')][_0xf9c6('0x6e')],'raw':!![]};return db[_0xf9c6('0x6f')][_0xf9c6('0x99')](_0x40cb88['toString'](),_0x5b78fb);}module[_0xf9c6('0xa5')]={'checkAccountsRestrictions':checkAccountsRestrictions,'countFilteredInteractions':countFilteredInteractions,'getClosedOrderClause':getClosedOrderClause,'getFilteredInteractions':getFilteredInteractions,'getInteractionsQuery':getInteractionsQuery,'parseAdvancedSearchFilter':parseAdvancedSearchFilter,'parseQueryParameters':parseQueryParameters,'skipInteractionsQuery':skipInteractionsQuery};
\ No newline at end of file
index 4279338..643c5ed 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9d25=['MailMessage','findOne','plainBody','-id','then','trimStart','catch','updateInteraction','Users','TagIds','Tags','lodash','../../mysqldb','map','fullname','split','forEach','waiting','talking','answered','unmanaged','abandoned','closed','disposition','UserId','total'];(function(_0x3c8ed7,_0x5b4105){var _0x54e9a6=function(_0x59ed92){while(--_0x59ed92){_0x3c8ed7['push'](_0x3c8ed7['shift']());}};_0x54e9a6(++_0x5b4105);}(_0x9d25,0x129));var _0x59d2=function(_0x422b2a,_0x34cc84){_0x422b2a=_0x422b2a-0x0;var _0x92552c=_0x9d25[_0x422b2a];return _0x92552c;};'use strict';var _=require(_0x59d2('0x0'));var db=require(_0x59d2('0x1'))['db'];function getInteractionUsers(_0x4f4b74,_0x1113ea){return new Promise(function(_0x4c9027,_0x305086){try{var _0x37209f=[];if(_0x1113ea[_0x4f4b74]){_0x37209f=_0x1113ea[_0x4f4b74][_0x59d2('0x2')](function(_0x1ef64b){return{'id':_0x1ef64b['id'],'fullname':_0x1ef64b[_0x59d2('0x3')]};});}return _0x4c9027(_0x37209f);}catch(_0x551020){_0x305086(_0x551020);}});}function getInteractionTags(_0x5707a4,_0x395c41){var _0x9ca00c=[];if(_0x5707a4){_0x5707a4[_0x59d2('0x4')](',')[_0x59d2('0x5')](function(_0x23b38e){_0x9ca00c['push'](_0x395c41[_0x23b38e]);});}return _0x9ca00c;}function updateWaitingCounter(_0x276eeb){if(_0x276eeb[_0x59d2('0x6')]){_0x276eeb['waiting']-=0x1;}}function updateInteractionCounters(_0x5262a9){_0x5262a9[_0x59d2('0x6')]=0x0;_0x5262a9[_0x59d2('0x7')]=0x0;_0x5262a9[_0x59d2('0x8')]=0x0;_0x5262a9[_0x59d2('0x9')]=0x0;_0x5262a9[_0x59d2('0xa')]=0x0;_0x5262a9['total']=0x0;if(_0x5262a9[_0x59d2('0xb')]){if(_0x5262a9[_0x59d2('0xc')]===_0x59d2('0xa')){_0x5262a9[_0x59d2('0xa')]+=0x1;updateWaitingCounter(_0x5262a9);}if(_0x5262a9[_0x59d2('0xd')]){_0x5262a9['answered']+=0x1;if(_0x5262a9[_0x59d2('0x7')]){_0x5262a9[_0x59d2('0x7')]-=0x1;}}else{if(_0x5262a9[_0x59d2('0xc')]){_0x5262a9[_0x59d2('0x9')]+=0x1;updateWaitingCounter(_0x5262a9);}}}else{if(!_0x5262a9[_0x59d2('0xd')]){_0x5262a9[_0x59d2('0x6')]+=0x1;}if(_0x5262a9[_0x59d2('0xd')]){_0x5262a9[_0x59d2('0x7')]+=0x1;updateWaitingCounter(_0x5262a9);}}_0x5262a9[_0x59d2('0xe')]+=0x1;return _0x5262a9;}function getLastMessageText(_0x22a017){return db[_0x59d2('0xf')][_0x59d2('0x10')]({'where':{'$and':[{'MailInteractionId':_0x22a017['id']},{'$or':[{'direction':'in'},{'$and':[{'direction':'out'},{'secret':![]},{'UserId':{'$ne':null}}]}]}]},'attributes':[_0x59d2('0x11')],'order':_0x59d2('0x12'),'raw':!![]})[_0x59d2('0x13')](function(_0x35529b){if(_0x35529b&&_0x35529b[_0x59d2('0x11')]){_0x22a017['lastMsgText']=_[_0x59d2('0x14')](_0x35529b[_0x59d2('0x11')]);}return _0x22a017;})[_0x59d2('0x15')](function(_0x352d45){throw _0x352d45;});}exports[_0x59d2('0x16')]=function(_0x1ba08c,_0x5f1747,_0xb62ef9,_0x637d3c){return new Promise(function(_0x500a12,_0x3fde9f){return getInteractionUsers(_0x1ba08c['id'],_0xb62ef9)[_0x59d2('0x13')](function(_0x5371d5){_0x1ba08c[_0x59d2('0x17')]=_0x5371d5;return getInteractionTags(_0x1ba08c[_0x59d2('0x18')],_0x5f1747);})[_0x59d2('0x13')](function(_0x57df84){_0x1ba08c[_0x59d2('0x19')]=_0x57df84;delete _0x1ba08c[_0x59d2('0x18')];return updateInteractionCounters(_0x1ba08c);})[_0x59d2('0x13')](function(_0x1f5b6a){if(_0x637d3c){return getLastMessageText(_0x1f5b6a);}else{return _0x1f5b6a;}})[_0x59d2('0x13')](function(_0x16046a){_0x500a12(_0x16046a);})['catch'](function(_0x22e814){_0x3fde9f(_0x22e814);});});};
\ No newline at end of file
+var _0x70a6=['findOne','plainBody','-id','then','lastMsgText','Users','TagIds','Tags','catch','../../mysqldb','map','fullname','forEach','push','waiting','talking','answered','unmanaged','abandoned','total','closed','disposition','UserId','MailMessage'];(function(_0x1ec65f,_0x38da27){var _0x1cb086=function(_0xdd3ee3){while(--_0xdd3ee3){_0x1ec65f['push'](_0x1ec65f['shift']());}};_0x1cb086(++_0x38da27);}(_0x70a6,0x189));var _0x670a=function(_0x5c192e,_0xa60113){_0x5c192e=_0x5c192e-0x0;var _0x3f37a1=_0x70a6[_0x5c192e];return _0x3f37a1;};'use strict';var _=require('lodash');var db=require(_0x670a('0x0'))['db'];function getInteractionUsers(_0x162388,_0x4f5deb){return new Promise(function(_0x29a627,_0x4adc13){try{var _0x2eaa60=[];if(_0x4f5deb[_0x162388]){_0x2eaa60=_0x4f5deb[_0x162388][_0x670a('0x1')](function(_0x25d415){return{'id':_0x25d415['id'],'fullname':_0x25d415[_0x670a('0x2')]};});}return _0x29a627(_0x2eaa60);}catch(_0x4406a3){_0x4adc13(_0x4406a3);}});}function getInteractionTags(_0x19aaec,_0x543fd0){var _0x9405da=[];if(_0x19aaec){_0x19aaec['split'](',')[_0x670a('0x3')](function(_0x5650a2){_0x9405da[_0x670a('0x4')](_0x543fd0[_0x5650a2]);});}return _0x9405da;}function updateWaitingCounter(_0x29b4b9){if(_0x29b4b9[_0x670a('0x5')]){_0x29b4b9[_0x670a('0x5')]-=0x1;}}function updateInteractionCounters(_0x25871d){_0x25871d[_0x670a('0x5')]=0x0;_0x25871d[_0x670a('0x6')]=0x0;_0x25871d[_0x670a('0x7')]=0x0;_0x25871d[_0x670a('0x8')]=0x0;_0x25871d[_0x670a('0x9')]=0x0;_0x25871d[_0x670a('0xa')]=0x0;if(_0x25871d[_0x670a('0xb')]){if(_0x25871d[_0x670a('0xc')]==='abandoned'){_0x25871d[_0x670a('0x9')]+=0x1;updateWaitingCounter(_0x25871d);}if(_0x25871d[_0x670a('0xd')]){_0x25871d[_0x670a('0x7')]+=0x1;if(_0x25871d['talking']){_0x25871d[_0x670a('0x6')]-=0x1;}}else{if(_0x25871d[_0x670a('0xc')]){_0x25871d['unmanaged']+=0x1;updateWaitingCounter(_0x25871d);}}}else{if(!_0x25871d['UserId']){_0x25871d[_0x670a('0x5')]+=0x1;}if(_0x25871d['UserId']){_0x25871d[_0x670a('0x6')]+=0x1;updateWaitingCounter(_0x25871d);}}_0x25871d[_0x670a('0xa')]+=0x1;return _0x25871d;}function getLastMessageText(_0x4af74e){return db[_0x670a('0xe')][_0x670a('0xf')]({'where':{'$and':[{'MailInteractionId':_0x4af74e['id']},{'$or':[{'direction':'in'},{'$and':[{'direction':'out'},{'secret':![]},{'UserId':{'$ne':null}}]}]}]},'attributes':[_0x670a('0x10')],'order':_0x670a('0x11'),'raw':!![]})[_0x670a('0x12')](function(_0x15733b){if(_0x15733b&&_0x15733b['plainBody']){_0x4af74e[_0x670a('0x13')]=_['trimStart'](_0x15733b[_0x670a('0x10')]);}return _0x4af74e;})['catch'](function(_0x1a115e){throw _0x1a115e;});}exports['updateInteraction']=function(_0x976a7d,_0x529407,_0x199db9,_0xe7ba1f){return new Promise(function(_0x5899c4,_0x3f3a7c){return getInteractionUsers(_0x976a7d['id'],_0x199db9)[_0x670a('0x12')](function(_0xca89f5){_0x976a7d[_0x670a('0x14')]=_0xca89f5;return getInteractionTags(_0x976a7d[_0x670a('0x15')],_0x529407);})[_0x670a('0x12')](function(_0x3d600b){_0x976a7d[_0x670a('0x16')]=_0x3d600b;delete _0x976a7d[_0x670a('0x15')];return updateInteractionCounters(_0x976a7d);})[_0x670a('0x12')](function(_0x3b742f){if(_0xe7ba1f){return getLastMessageText(_0x3b742f);}else{return _0x3b742f;}})['then'](function(_0x291775){_0x5899c4(_0x291775);})[_0x670a('0x17')](function(_0x33ba38){_0x3f3a7c(_0x33ba38);});});};
\ No newline at end of file
index d59f207..b504b51 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfc87=['then','update','exports','../../mysqldb','../../config/logger','mail-interactions','chat-interactions','whatsapp-interactions','capitalize','chat','Website','Account','InteractionId','unknown','websites','accounts','_interaction_has_tags','_messages','user_has_','_interactions','isArray','toLowerCase','[%s]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','toUpperCase','name','role','Interaction'];(function(_0xab8d43,_0x5ccc6e){var _0x3afdca=function(_0x525570){while(--_0x525570){_0xab8d43['push'](_0xab8d43['shift']());}};_0x3afdca(++_0x5ccc6e);}(_0xfc87,0x12c));var _0x7fc8=function(_0x3c9e34,_0x4c3df6){_0x3c9e34=_0x3c9e34-0x0;var _0x1af3d5=_0xfc87[_0x3c9e34];return _0x1af3d5;};'use strict';var _=require('lodash');var db=require(_0x7fc8('0x0'))['db'];var loggers={'openchannel':require(_0x7fc8('0x1'))('openchannel-interactions'),'mail':require(_0x7fc8('0x1'))(_0x7fc8('0x2')),'fax':require(_0x7fc8('0x1'))('fax-interactions'),'sms':require('../../config/logger')('sms-interactions'),'chat':require(_0x7fc8('0x1'))(_0x7fc8('0x3')),'whatsapp':require(_0x7fc8('0x1'))(_0x7fc8('0x4'))};function getAccountFK(_0x24fdf7){return _[_0x7fc8('0x5')](_0x24fdf7)+(_0x24fdf7===_0x7fc8('0x6')?_0x7fc8('0x7'):_0x7fc8('0x8'))+'Id';}function getInteractionFK(_0x52c133){return _['capitalize'](_0x52c133)+'InteractionId';}function getInteractionId(_0xd9fdae,_0x1659d7,_0x295556){if(_0xd9fdae&&_0xd9fdae[_['upperFirst'](_0x295556)+_0x7fc8('0x9')]){return _0xd9fdae[_['upperFirst'](_0x295556)+_0x7fc8('0x9')];}else if(_0xd9fdae&&_0xd9fdae['id']){return _0xd9fdae['id'];}else if(_0x1659d7&&_0x1659d7['id']){return _0x1659d7['id'];}else{return _0x7fc8('0xa');}}function getInteractionsTables(_0x3a867b){return{'accounts':_0x3a867b+'_'+(_0x3a867b==='chat'?_0x7fc8('0xb'):_0x7fc8('0xc')),'interactions':_0x3a867b+'_interactions','interactionsTags':_0x3a867b+_0x7fc8('0xd'),'messages':_0x3a867b+_0x7fc8('0xe'),'userInteractions':_0x7fc8('0xf')+_0x3a867b+_0x7fc8('0x10')};}function getSelectedTags(_0x20e7b0){var _0x1b58b8=[];if(_0x20e7b0){_0x1b58b8=Array[_0x7fc8('0x11')](_0x20e7b0)?_0x20e7b0:[_0x20e7b0];}return _0x1b58b8;}function log(_0xd2d192,_0x275619,_0x588800,_0x50ff66,_0x1bee09,_0x5b78a5){loggers[_0x1bee09[_0x7fc8('0x12')]()][_0xd2d192](_0x7fc8('0x13'),_0x5b78a5[_0x7fc8('0x14')](),_0x275619?_0x275619['id']:null,_0x275619?_0x275619[_0x7fc8('0x15')]:null,_0x275619?_0x275619[_0x7fc8('0x16')]:null,getInteractionId(_0x588800,_0x50ff66,_0x1bee09),_0x588800?JSON['stringify'](_0x588800):'null');}function updateUser(_0x4c5e9c,_0x50b32d,_0x263df9,_0x478b77,_0x135a50){db[_['upperFirst'](_0x478b77)+_0x7fc8('0x17')]['findOne']({'where':{'id':getInteractionId(_0x50b32d,_0x263df9,_0x478b77)}})[_0x7fc8('0x18')](function(_0x42acec){if(_0x42acec){return _0x42acec[_0x7fc8('0x19')]({'UserId':_0x4c5e9c?_0x4c5e9c['id']:null});}})['then'](function(_0x512a2d){if(_0x512a2d){log('info',_0x4c5e9c,_0x50b32d,_0x263df9,_0x478b77,_0x135a50);}})['catch'](function(){log('error',_0x4c5e9c,_0x50b32d,_0x263df9,_0x478b77,_0x135a50);});}module[_0x7fc8('0x1a')]={'getAccountFK':getAccountFK,'getInteractionFK':getInteractionFK,'getInteractionsTables':getInteractionsTables,'getSelectedTags':getSelectedTags,'updateUser':updateUser};
\ No newline at end of file
+var _0x33e1=['_interaction_has_tags','_messages','user_has_','isArray','[%s]\x20id=%s\x20name=%s\x20role=%s\x20interaction=%s\x20body=%s','role','null','Interaction','then','update','info','catch','error','exports','lodash','../../mysqldb','openchannel-interactions','../../config/logger','mail-interactions','fax-interactions','whatsapp-interactions','capitalize','Website','Account','InteractionId','upperFirst','unknown','chat','websites','accounts'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x33e1,0x11c));var _0x133e=function(_0x1548aa,_0x31c31b){_0x1548aa=_0x1548aa-0x0;var _0x301bab=_0x33e1[_0x1548aa];return _0x301bab;};'use strict';var _=require(_0x133e('0x0'));var db=require(_0x133e('0x1'))['db'];var loggers={'openchannel':require('../../config/logger')(_0x133e('0x2')),'mail':require(_0x133e('0x3'))(_0x133e('0x4')),'fax':require(_0x133e('0x3'))(_0x133e('0x5')),'sms':require('../../config/logger')('sms-interactions'),'chat':require(_0x133e('0x3'))('chat-interactions'),'whatsapp':require(_0x133e('0x3'))(_0x133e('0x6'))};function getAccountFK(_0xe7b08f){return _[_0x133e('0x7')](_0xe7b08f)+(_0xe7b08f==='chat'?_0x133e('0x8'):_0x133e('0x9'))+'Id';}function getInteractionFK(_0x28067b){return _[_0x133e('0x7')](_0x28067b)+_0x133e('0xa');}function getInteractionId(_0x46850c,_0x5cbb3a,_0x18ba34){if(_0x46850c&&_0x46850c[_[_0x133e('0xb')](_0x18ba34)+_0x133e('0xa')]){return _0x46850c[_[_0x133e('0xb')](_0x18ba34)+_0x133e('0xa')];}else if(_0x46850c&&_0x46850c['id']){return _0x46850c['id'];}else if(_0x5cbb3a&&_0x5cbb3a['id']){return _0x5cbb3a['id'];}else{return _0x133e('0xc');}}function getInteractionsTables(_0x22ba5e){return{'accounts':_0x22ba5e+'_'+(_0x22ba5e===_0x133e('0xd')?_0x133e('0xe'):_0x133e('0xf')),'interactions':_0x22ba5e+'_interactions','interactionsTags':_0x22ba5e+_0x133e('0x10'),'messages':_0x22ba5e+_0x133e('0x11'),'userInteractions':_0x133e('0x12')+_0x22ba5e+'_interactions'};}function getSelectedTags(_0x4c404b){var _0xd73aa=[];if(_0x4c404b){_0xd73aa=Array[_0x133e('0x13')](_0x4c404b)?_0x4c404b:[_0x4c404b];}return _0xd73aa;}function log(_0x1b104a,_0x143363,_0x5e1f03,_0x20819c,_0x1fbddb,_0x30c572){loggers[_0x1fbddb['toLowerCase']()][_0x1b104a](_0x133e('0x14'),_0x30c572['toUpperCase'](),_0x143363?_0x143363['id']:null,_0x143363?_0x143363['name']:null,_0x143363?_0x143363[_0x133e('0x15')]:null,getInteractionId(_0x5e1f03,_0x20819c,_0x1fbddb),_0x5e1f03?JSON['stringify'](_0x5e1f03):_0x133e('0x16'));}function updateUser(_0x5e4484,_0x299fe1,_0x4380fb,_0x2406e0,_0x1efb33){db[_[_0x133e('0xb')](_0x2406e0)+_0x133e('0x17')]['findOne']({'where':{'id':getInteractionId(_0x299fe1,_0x4380fb,_0x2406e0)}})[_0x133e('0x18')](function(_0x1fed7c){if(_0x1fed7c){return _0x1fed7c[_0x133e('0x19')]({'UserId':_0x5e4484?_0x5e4484['id']:null});}})[_0x133e('0x18')](function(_0xdd33aa){if(_0xdd33aa){log(_0x133e('0x1a'),_0x5e4484,_0x299fe1,_0x4380fb,_0x2406e0,_0x1efb33);}})[_0x133e('0x1b')](function(){log(_0x133e('0x1c'),_0x5e4484,_0x299fe1,_0x4380fb,_0x2406e0,_0x1efb33);});}module[_0x133e('0x1d')]={'getAccountFK':getAccountFK,'getInteractionFK':getInteractionFK,'getInteractionsTables':getInteractionsTables,'getSelectedTags':getSelectedTags,'updateUser':updateUser};
\ No newline at end of file
index 4ebe0cb..4c93c56 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8893=['../../config/environment','license','data1','split','aes-256-ctr','%s:%s:%s','update','base64','utf8','final','parse','hasOwnProperty','use','License','findOne','then','count','format','catch','users','User','admin','user','isUserLimit','util','composable-middleware','../../mysqldb'];(function(_0x3476bb,_0x39ec58){var _0x12151b=function(_0x585dcf){while(--_0x585dcf){_0x3476bb['push'](_0x3476bb['shift']());}};_0x12151b(++_0x39ec58);}(_0x8893,0x84));var _0x3889=function(_0x44d7c6,_0x5479a8){_0x44d7c6=_0x44d7c6-0x0;var _0x275541=_0x8893[_0x44d7c6];return _0x275541;};'use strict';var crypto=require('crypto');var util=require(_0x3889('0x0'));var compose=require(_0x3889('0x1'));var db=require(_0x3889('0x2'))['db'];var config=require(_0x3889('0x3'));function getValueFromLicense(_0x26f7af,_0x4d7c1f){if(_0x26f7af&&_0x4d7c1f){if(_0x4d7c1f['data1']&&_0x4d7c1f[_0x3889('0x4')]){var _0x38dfbd=_0x4d7c1f[_0x3889('0x5')];var _0x12d875=_0x4d7c1f['license'];var _0xdba92e=_0x38dfbd[_0x3889('0x6')]('-')[0x4];var _0x56ca4f=_0x38dfbd[_0x3889('0x6')]('-')[0x0];var _0xd41c02=crypto['createDecipher'](_0x3889('0x7'),util['format'](_0x3889('0x8'),_0xdba92e,_0x38dfbd,_0x56ca4f));var _0x5a2bb8=_0xd41c02[_0x3889('0x9')](_0x12d875,_0x3889('0xa'),_0x3889('0xb'));_0x5a2bb8+=_0xd41c02[_0x3889('0xc')](_0x3889('0xb'));var _0x58a975=JSON[_0x3889('0xd')](_0x5a2bb8);return _0x58a975[_0x3889('0xe')](_0x26f7af)?_0x58a975[_0x26f7af]:null;}}return null;}function isLimit(_0x30d16f,_0x26fc73,_0x3bacab,_0x56846f){var _0x313793=_0x26fc73;return compose()[_0x3889('0xf')](function(_0x53f3e8,_0x5145b8,_0x12532c){return db[_0x3889('0x10')][_0x3889('0x11')]({'where':{'id':0x1},'raw':!![]})[_0x3889('0x12')](function(_0x3f798f){var _0x4b3b0f=getValueFromLicense(_0x30d16f,_0x3f798f);return _0x4b3b0f?_0x4b3b0f:_0x313793;})[_0x3889('0x12')](function(_0x4107cd){_0x313793=_0x4107cd;return _0x3bacab[_0x3889('0x13')](_0x56846f);})[_0x3889('0x12')](function(_0x22002f){if(_0x22002f>=_0x313793){return _0x5145b8['status'](0x193)['json']({'message':util[_0x3889('0x14')]('Maximum\x20%s\x20limit\x20have\x20been\x20reached',_0x30d16f)});}_0x12532c();})[_0x3889('0x15')](function(_0x5ea7ef){_0x12532c(_0x5ea7ef);});});}function isUserLimit(){return isLimit(_0x3889('0x16'),0x1,db[_0x3889('0x17')],{'where':{'$or':[{'role':_0x3889('0x18')},{'role':_0x3889('0x19')}]}});}exports[_0x3889('0x1a')]=isUserLimit;
\ No newline at end of file
+var _0x606a=['license','data1','split','createDecipher','aes-256-ctr','format','%s:%s:%s','update','base64','utf8','final','parse','hasOwnProperty','use','License','findOne','then','count','status','json','Maximum\x20%s\x20limit\x20have\x20been\x20reached','users','isUserLimit','crypto','util','composable-middleware','../../mysqldb'];(function(_0x402f22,_0x3a0325){var _0x4c6cce=function(_0x2163d7){while(--_0x2163d7){_0x402f22['push'](_0x402f22['shift']());}};_0x4c6cce(++_0x3a0325);}(_0x606a,0xef));var _0xa606=function(_0x5a4d05,_0x272f20){_0x5a4d05=_0x5a4d05-0x0;var _0x5cc743=_0x606a[_0x5a4d05];return _0x5cc743;};'use strict';var crypto=require(_0xa606('0x0'));var util=require(_0xa606('0x1'));var compose=require(_0xa606('0x2'));var db=require(_0xa606('0x3'))['db'];var config=require('../../config/environment');function getValueFromLicense(_0xe31188,_0x36c512){if(_0xe31188&&_0x36c512){if(_0x36c512['data1']&&_0x36c512[_0xa606('0x4')]){var _0x286126=_0x36c512[_0xa606('0x5')];var _0x330411=_0x36c512['license'];var _0x203017=_0x286126[_0xa606('0x6')]('-')[0x4];var _0x3c6c80=_0x286126['split']('-')[0x0];var _0x326ae7=crypto[_0xa606('0x7')](_0xa606('0x8'),util[_0xa606('0x9')](_0xa606('0xa'),_0x203017,_0x286126,_0x3c6c80));var _0x7efa96=_0x326ae7[_0xa606('0xb')](_0x330411,_0xa606('0xc'),_0xa606('0xd'));_0x7efa96+=_0x326ae7[_0xa606('0xe')]('utf8');var _0x450844=JSON[_0xa606('0xf')](_0x7efa96);return _0x450844[_0xa606('0x10')](_0xe31188)?_0x450844[_0xe31188]:null;}}return null;}function isLimit(_0x3809a4,_0x417e60,_0x5525c5,_0x47cf6a){var _0x32b782=_0x417e60;return compose()[_0xa606('0x11')](function(_0x33cdb0,_0x125379,_0x4e54cb){return db[_0xa606('0x12')][_0xa606('0x13')]({'where':{'id':0x1},'raw':!![]})[_0xa606('0x14')](function(_0xb00c3c){var _0x58f473=getValueFromLicense(_0x3809a4,_0xb00c3c);return _0x58f473?_0x58f473:_0x32b782;})['then'](function(_0x46bbf4){_0x32b782=_0x46bbf4;return _0x5525c5[_0xa606('0x15')](_0x47cf6a);})[_0xa606('0x14')](function(_0x437a82){if(_0x437a82>=_0x32b782){return _0x125379[_0xa606('0x16')](0x193)[_0xa606('0x17')]({'message':util['format'](_0xa606('0x18'),_0x3809a4)});}_0x4e54cb();})['catch'](function(_0x1dd8cd){_0x4e54cb(_0x1dd8cd);});});}function isUserLimit(){return isLimit(_0xa606('0x19'),0x1,db['User'],{'where':{'$or':[{'role':'admin'},{'role':'user'}]}});}exports[_0xa606('0x1a')]=isUserLimit;
\ No newline at end of file
index b71b75a..5a1a2d0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6d94=['match','filter','indexOf','map','conditions','push','DATE','operator','$eq','$between','value','includes','$gt','$lte','add','format','YYYY-MM-DD','castTo','text','\x20AS\x20','field','\x20OR\x20','\x20IS\x20NULL)','IN\x20?','$notIn','=\x20?','$ne','<>\x20?','$startsWith','LIKE\x20?','$lt','<\x20?','<=\x20?','>=\x20?','BETWEEN\x20?\x20AND\x20?','start','$substring','$endsWith','pop','utcOffset','minutes','seconds','lodash','moment','parseSearch','sqlOperator','startsWith','[$or]','and','replace','[$and]','split','length','slice','forEach','shift'];(function(_0x473381,_0x25d98c){var _0x534776=function(_0x20b131){while(--_0x20b131){_0x473381['push'](_0x473381['shift']());}};_0x534776(++_0x25d98c);}(_0x6d94,0x1ea));var _0x46d9=function(_0x4a574e,_0x33348a){_0x4a574e=_0x4a574e-0x0;var _0x5c83ef=_0x6d94[_0x4a574e];return _0x5c83ef;};'use strict';var _=require(_0x46d9('0x0'));var moment=require(_0x46d9('0x1'));exports[_0x46d9('0x2')]=function(_0xb9bb09){var _0x848e7c={'conditions':[]};_0x848e7c[_0x46d9('0x3')]=_[_0x46d9('0x4')](_0xb9bb09,_0x46d9('0x5'))?'or':_0x46d9('0x6');var _0x11b34e=_0xb9bb09[_0x46d9('0x7')](_0x46d9('0x8'),'')['replace']('[$or]','')[_0x46d9('0x9')]('||');for(var _0x41ad5b=0x0;_0x41ad5b<_0x11b34e[_0x46d9('0xa')];_0x41ad5b++){var _0x13b144=_0x11b34e[_0x41ad5b][_0x46d9('0x9')](':=');var _0x49aa9f=_0x13b144[0x0];var _0x1d5e54=_0x13b144[_0x46d9('0xb')](0x1);_0x1d5e54[_0x46d9('0xc')](function(_0x169af3){var _0x3e3c8d=_0x169af3[_0x46d9('0x9')]('[')[_0x46d9('0xd')]();var _0x186b58=_0x169af3[_0x46d9('0xe')](/\[(.*?)\]/g);_0x186b58[_0x46d9('0xc')](function(_0x5014ca){var _0x577911=_0x5014ca[_0x46d9('0x9')]('[')[_0x46d9('0xf')](function(_0x395b8c){return _0x395b8c[_0x46d9('0x10')](']')>-0x1;})[_0x46d9('0x11')](function(_0x46a2fd){return _0x46a2fd['split'](']')[0x0];})[0x0];_0x848e7c[_0x46d9('0x12')][_0x46d9('0x13')]({'field':_0x49aa9f,'operator':_0x3e3c8d,'value':_0x577911});});});}return _0x848e7c;};exports['buildExpression']=function(_0x9b0200,_0x5d923f,_0x451139){var _0x5e0d70={};if(_0x5d923f===_0x46d9('0x14')){if(_0x451139[_0x46d9('0x15')]===_0x46d9('0x16')){_0x451139['operator']=_0x46d9('0x17');_0x451139['value']+=','+_0x451139[_0x46d9('0x18')];}else if(_[_0x46d9('0x19')]([_0x46d9('0x1a'),_0x46d9('0x1b')],_0x451139[_0x46d9('0x15')])){_0x451139[_0x46d9('0x18')]=moment(_0x451139[_0x46d9('0x18')])[_0x46d9('0x1c')](0x1,'days')[_0x46d9('0x1d')](_0x46d9('0x1e'));}}if(_0x451139[_0x46d9('0x1f')]){_0x5d923f=_0x451139[_0x46d9('0x1f')];_0x5e0d70[_0x46d9('0x20')]='CAST('+_0x9b0200+'.'+_0x451139['field']+_0x46d9('0x21')+_0x451139[_0x46d9('0x1f')]+')\x20'+parseOperator(_0x451139[_0x46d9('0x15')]);}else{_0x5e0d70[_0x46d9('0x20')]=_0x9b0200+'.'+_0x451139[_0x46d9('0x22')]+'\x20'+parseOperator(_0x451139[_0x46d9('0x15')]);}if(_['includes'](['$ne','$notIn'],_0x451139[_0x46d9('0x15')]))_0x5e0d70[_0x46d9('0x20')]='('+_0x5e0d70[_0x46d9('0x20')]+_0x46d9('0x23')+_0x9b0200+'.'+_0x451139[_0x46d9('0x22')]+_0x46d9('0x24');_0x5e0d70[_0x46d9('0x18')]=parseValue(_0x5d923f,_0x451139[_0x46d9('0x15')],_0x451139['value']);return _0x5e0d70;};function parseOperator(_0x168688){var _0x37e00f;switch(_0x168688){case'$in':_0x37e00f=_0x46d9('0x25');break;case _0x46d9('0x26'):_0x37e00f='NOT\x20IN\x20?';break;case _0x46d9('0x16'):_0x37e00f=_0x46d9('0x27');break;case _0x46d9('0x28'):_0x37e00f=_0x46d9('0x29');break;case'$substring':case _0x46d9('0x2a'):case'$endsWith':_0x37e00f=_0x46d9('0x2b');break;case _0x46d9('0x2c'):_0x37e00f=_0x46d9('0x2d');break;case _0x46d9('0x1a'):_0x37e00f='>\x20?';break;case _0x46d9('0x1b'):_0x37e00f=_0x46d9('0x2e');break;case'$gte':_0x37e00f=_0x46d9('0x2f');break;case _0x46d9('0x17'):_0x37e00f=_0x46d9('0x30');break;}return _0x37e00f;}function parseValue(_0x53e30d,_0x11a6f2,_0x2160dc){var _0x94024d={'start':undefined,'end':undefined};switch(_0x11a6f2){case'$in':case _0x46d9('0x26'):_0x94024d[_0x46d9('0x31')]=_0x2160dc[_0x46d9('0x9')](',');break;case _0x46d9('0x32'):_0x94024d[_0x46d9('0x31')]='%'+_0x2160dc+'%';break;case _0x46d9('0x2a'):_0x94024d[_0x46d9('0x31')]=_0x2160dc+'%';break;case _0x46d9('0x33'):_0x94024d['start']='%'+_0x2160dc;break;case'$between':var _0x736cbe=_0x2160dc[_0x46d9('0x9')](',');var _0x2160dc=_0x736cbe[_0x46d9('0xd')]();var _0x2a899e=_0x736cbe[_0x46d9('0x34')]();if(_0x53e30d==='DATE'){_0x2160dc=moment(_0x2160dc)[_0x46d9('0x35')](0x0,!![])[_0x46d9('0x1d')]();_0x2a899e=moment(_0x2a899e)['utcOffset'](0x0,!![])[_0x46d9('0x1c')](0x17,'hours')[_0x46d9('0x1c')](0x3b,_0x46d9('0x36'))[_0x46d9('0x1c')](0x3b,_0x46d9('0x37'))[_0x46d9('0x1d')]();}_0x94024d={'start':_0x2160dc,'end':_0x2a899e};break;default:_0x94024d[_0x46d9('0x31')]=_0x2160dc;break;}return _0x94024d;}
\ No newline at end of file
+var _0x9a34=['$gt','$lte','add','days','format','castTo','CAST(','\x20AS\x20','text','field','includes','$ne','$notIn','\x20IS\x20NULL)','$in','NOT\x20IN\x20?','$eq','=\x20?','<>\x20?','$substring','$startsWith','$endsWith','LIKE\x20?','$lt','>\x20?','<=\x20?','$gte','>=\x20?','BETWEEN\x20?\x20AND\x20?','start','shift','utcOffset','hours','minutes','lodash','moment','parseSearch','sqlOperator','[$or]','and','replace','split','match','forEach','filter','indexOf','conditions','push','buildExpression','DATE','operator','$between','value'];(function(_0x3e49fe,_0x552dba){var _0x150873=function(_0x88c188){while(--_0x88c188){_0x3e49fe['push'](_0x3e49fe['shift']());}};_0x150873(++_0x552dba);}(_0x9a34,0xf6));var _0x49a3=function(_0x533eec,_0x14eb1){_0x533eec=_0x533eec-0x0;var _0x218ef1=_0x9a34[_0x533eec];return _0x218ef1;};'use strict';var _=require(_0x49a3('0x0'));var moment=require(_0x49a3('0x1'));exports[_0x49a3('0x2')]=function(_0x97cc50){var _0x4fd710={'conditions':[]};_0x4fd710[_0x49a3('0x3')]=_['startsWith'](_0x97cc50,_0x49a3('0x4'))?'or':_0x49a3('0x5');var _0x54072e=_0x97cc50[_0x49a3('0x6')]('[$and]','')[_0x49a3('0x6')](_0x49a3('0x4'),'')[_0x49a3('0x7')]('||');for(var _0x10851b=0x0;_0x10851b<_0x54072e['length'];_0x10851b++){var _0x425eb0=_0x54072e[_0x10851b][_0x49a3('0x7')](':=');var _0x3eeb7f=_0x425eb0[0x0];var _0x2a260a=_0x425eb0['slice'](0x1);_0x2a260a['forEach'](function(_0x33bc53){var _0x1c6561=_0x33bc53[_0x49a3('0x7')]('[')['shift']();var _0xd2c098=_0x33bc53[_0x49a3('0x8')](/\[(.*?)\]/g);_0xd2c098[_0x49a3('0x9')](function(_0x48ea7e){var _0x95e8c9=_0x48ea7e['split']('[')[_0x49a3('0xa')](function(_0x19fa27){return _0x19fa27[_0x49a3('0xb')](']')>-0x1;})['map'](function(_0x44601d){return _0x44601d['split'](']')[0x0];})[0x0];_0x4fd710[_0x49a3('0xc')][_0x49a3('0xd')]({'field':_0x3eeb7f,'operator':_0x1c6561,'value':_0x95e8c9});});});}return _0x4fd710;};exports[_0x49a3('0xe')]=function(_0x5709ec,_0x41e69e,_0x31e3da){var _0x5b9d56={};if(_0x41e69e===_0x49a3('0xf')){if(_0x31e3da[_0x49a3('0x10')]==='$eq'){_0x31e3da[_0x49a3('0x10')]=_0x49a3('0x11');_0x31e3da['value']+=','+_0x31e3da[_0x49a3('0x12')];}else if(_['includes']([_0x49a3('0x13'),_0x49a3('0x14')],_0x31e3da[_0x49a3('0x10')])){_0x31e3da[_0x49a3('0x12')]=moment(_0x31e3da[_0x49a3('0x12')])[_0x49a3('0x15')](0x1,_0x49a3('0x16'))[_0x49a3('0x17')]('YYYY-MM-DD');}}if(_0x31e3da[_0x49a3('0x18')]){_0x41e69e=_0x31e3da[_0x49a3('0x18')];_0x5b9d56['text']=_0x49a3('0x19')+_0x5709ec+'.'+_0x31e3da['field']+_0x49a3('0x1a')+_0x31e3da['castTo']+')\x20'+parseOperator(_0x31e3da[_0x49a3('0x10')]);}else{_0x5b9d56[_0x49a3('0x1b')]=_0x5709ec+'.'+_0x31e3da[_0x49a3('0x1c')]+'\x20'+parseOperator(_0x31e3da[_0x49a3('0x10')]);}if(_[_0x49a3('0x1d')]([_0x49a3('0x1e'),_0x49a3('0x1f')],_0x31e3da[_0x49a3('0x10')]))_0x5b9d56[_0x49a3('0x1b')]='('+_0x5b9d56[_0x49a3('0x1b')]+'\x20OR\x20'+_0x5709ec+'.'+_0x31e3da['field']+_0x49a3('0x20');_0x5b9d56[_0x49a3('0x12')]=parseValue(_0x41e69e,_0x31e3da[_0x49a3('0x10')],_0x31e3da[_0x49a3('0x12')]);return _0x5b9d56;};function parseOperator(_0x5daa1a){var _0x376662;switch(_0x5daa1a){case _0x49a3('0x21'):_0x376662='IN\x20?';break;case _0x49a3('0x1f'):_0x376662=_0x49a3('0x22');break;case _0x49a3('0x23'):_0x376662=_0x49a3('0x24');break;case _0x49a3('0x1e'):_0x376662=_0x49a3('0x25');break;case _0x49a3('0x26'):case _0x49a3('0x27'):case _0x49a3('0x28'):_0x376662=_0x49a3('0x29');break;case _0x49a3('0x2a'):_0x376662='<\x20?';break;case'$gt':_0x376662=_0x49a3('0x2b');break;case _0x49a3('0x14'):_0x376662=_0x49a3('0x2c');break;case _0x49a3('0x2d'):_0x376662=_0x49a3('0x2e');break;case _0x49a3('0x11'):_0x376662=_0x49a3('0x2f');break;}return _0x376662;}function parseValue(_0xfb195b,_0x5355d0,_0x1e33ab){var _0x420ccc={'start':undefined,'end':undefined};switch(_0x5355d0){case'$in':case _0x49a3('0x1f'):_0x420ccc['start']=_0x1e33ab['split'](',');break;case _0x49a3('0x26'):_0x420ccc[_0x49a3('0x30')]='%'+_0x1e33ab+'%';break;case'$startsWith':_0x420ccc[_0x49a3('0x30')]=_0x1e33ab+'%';break;case'$endsWith':_0x420ccc[_0x49a3('0x30')]='%'+_0x1e33ab;break;case'$between':var _0x12099b=_0x1e33ab[_0x49a3('0x7')](',');var _0x1e33ab=_0x12099b[_0x49a3('0x31')]();var _0x2ea387=_0x12099b['pop']();if(_0xfb195b===_0x49a3('0xf')){_0x1e33ab=moment(_0x1e33ab)[_0x49a3('0x32')](0x0,!![])['format']();_0x2ea387=moment(_0x2ea387)[_0x49a3('0x32')](0x0,!![])['add'](0x17,_0x49a3('0x33'))[_0x49a3('0x15')](0x3b,_0x49a3('0x34'))['add'](0x3b,'seconds')[_0x49a3('0x17')]();}_0x420ccc={'start':_0x1e33ab,'end':_0x2ea387};break;default:_0x420ccc[_0x49a3('0x30')]=_0x1e33ab;break;}return _0x420ccc;}
\ No newline at end of file
index 110fb48..050c270 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3aca=['lower','options','include','lodash','../../mysqldb','parse','keys','includes','model','alias','raw','fields','split','filters','isEmpty','forOwn','find','DATE','$gte','format','utc','YYYY-MM-DD','subtract','uniqueid','isArray','offset','indexOf','priority','cast','col','unsigned','substr','DESC','ASC','omit','isObject','isString','unset','hasOwnProperty','isNumeric','^[+]?[0-9]*$','match','{EXPR}','replace','push','join','query','$id','map','name','intersection','length','nolimit','limit','order','sort','where','pick','filter','object','columns','merge','type','VIRTUAL'];(function(_0x542a9b,_0x351513){var _0x4d5032=function(_0x538ed2){while(--_0x538ed2){_0x542a9b['push'](_0x542a9b['shift']());}};_0x4d5032(++_0x351513);}(_0x3aca,0x83));var _0xa3ac=function(_0xae1a83,_0x1980d4){_0xae1a83=_0xae1a83-0x0;var _0xdb9da8=_0x3aca[_0xae1a83];return _0xdb9da8;};'use strict';var _=require(_0xa3ac('0x0'));var sequelize=require('sequelize');var moment=require('moment');var db=require(_0xa3ac('0x1'))['db'];var LIMIT_VALUE=0xfa;function hasSequelizeOperator(_0x2e1dde){var _0x3e44a3=['ne'];try{var _0x585e8f=JSON[_0xa3ac('0x2')](_0x2e1dde);var _0x1127ed=Object[_0xa3ac('0x3')](_0x585e8f)[0x0];return _0x3e44a3[_0xa3ac('0x4')](_0x1127ed);}catch(_0x37b922){return![];}}function getOperatorValue(_0x56c21d){var _0x219b27=JSON['parse'](_0x56c21d);var _0x4fd108=Object[_0xa3ac('0x3')](_0x219b27)[0x0];var _0x4da43d=_0x219b27[_0x4fd108];return{['$'+_0x4fd108]:_0x4da43d};}function parseIncludeModel(_0x423126){var _0x20d561=JSON[_0xa3ac('0x2')](_0x423126);return{'model':db[_0x20d561[_0xa3ac('0x5')]],'as':_0x20d561[_0xa3ac('0x6')],'attributes':_0x20d561['fields'],'raw':_0x20d561[_0xa3ac('0x7')]};}exports[_0xa3ac('0x8')]=function(_0x234168){var _0x59ad50=null;if(_0x234168){_0x59ad50=_0x234168[_0xa3ac('0x9')](',');}return _0x59ad50;};exports[_0xa3ac('0xa')]=function(_0x41e8fd,_0x5f15c5){var _0x168b00={};if(!_[_0xa3ac('0xb')](_0x41e8fd)){_[_0xa3ac('0xc')](_0x41e8fd,function(_0x7da3b5,_0x384fd2){try{if(_0x5f15c5){var _0x24602c=_[_0xa3ac('0xd')](_0x5f15c5,{'name':_0x384fd2})||{};if(hasSequelizeOperator(_0x7da3b5)){_0x168b00[_0x384fd2]=getOperatorValue(_0x7da3b5);}else if(_0x24602c['type']===_0xa3ac('0xe')&&_['isPlainObject'](_0x7da3b5)){var _0x48f5fe=JSON['parse'](_0x7da3b5);var _0x183a9e={'$gte':moment(moment(_0x48f5fe[_0xa3ac('0xf')])[_0xa3ac('0x10')]('YYYY-MM-DD'))[_0xa3ac('0x11')]()[_0xa3ac('0x10')](),'$lte':moment(moment(_0x48f5fe['$lte'])[_0xa3ac('0x10')](_0xa3ac('0x12')))[_0xa3ac('0x11')]()[_0xa3ac('0x13')](0x1,'s')[_0xa3ac('0x10')]()};_0x168b00[_0x384fd2]=_0x183a9e;}else if(_0x24602c['name']===_0xa3ac('0x14')){_0x168b00[_0x384fd2]=_0x7da3b5;}else{_0x168b00[_0x384fd2]=_[_0xa3ac('0x15')](_0x7da3b5)?_0x7da3b5:JSON['parse'](_0x7da3b5);}}else{_0x168b00[_0x384fd2]=_['isArray'](_0x7da3b5)?_0x7da3b5:JSON[_0xa3ac('0x2')](_0x7da3b5);}}catch(_0x5bb5e6){_0x168b00[_0x384fd2]=_0x7da3b5['split'](',');}});}return _0x168b00;};exports['limit']=function(_0x37dc11){_0x37dc11=parseInt(_0x37dc11,0xa);if(!_0x37dc11||_0x37dc11<0x0){_0x37dc11=LIMIT_VALUE;}return _0x37dc11;};exports[_0xa3ac('0x16')]=function(_0x153920){_0x153920=parseInt(_0x153920,0xa);if(!_0x153920||_0x153920<0x0){_0x153920=0x0;}return _0x153920;};exports['sort']=function(_0x1810a5){var _0x2d59e7,_0x12ab47=null;if(_0x1810a5){_0x2d59e7=_0x1810a5[_0xa3ac('0x9')](',');_0x12ab47=_['map'](_0x2d59e7,function(_0x532600){if(_0x532600[_0xa3ac('0x17')]('-')===0x0){return[_0x532600===_0xa3ac('0x18')?sequelize[_0xa3ac('0x19')](sequelize[_0xa3ac('0x1a')](_0xa3ac('0x18')),_0xa3ac('0x1b')):_0x532600[_0xa3ac('0x1c')](0x1),_0xa3ac('0x1d')];}else{return[_0x532600===_0xa3ac('0x18')?sequelize[_0xa3ac('0x19')](sequelize['col']('priority'),_0xa3ac('0x1b')):_0x532600,_0xa3ac('0x1e')];}});}return _0x12ab47;};exports[_0xa3ac('0x1f')]=function(_0x2a8dec,_0x2f8a22){if(_[_0xa3ac('0xb')](_0x2a8dec)){return _0x2a8dec;}if(_[_0xa3ac('0x15')](_0x2a8dec)){for(var _0x189801=0x0;_0x189801<_0x2a8dec['length'];_0x189801+=0x1){_0x2a8dec[_0x189801]=this[_0xa3ac('0x1f')](_0x2a8dec[_0x189801],_0x2f8a22);}return _0x2a8dec;}if(!_[_0xa3ac('0x20')](_0x2a8dec)){return _0x2a8dec;}if(_[_0xa3ac('0x21')](_0x2f8a22)){_0x2f8a22=[_0x2f8a22];}if(!_[_0xa3ac('0x15')](_0x2f8a22)){return _0x2a8dec;}for(var _0x312d7f=0x0;_0x312d7f<_0x2f8a22['length'];_0x312d7f+=0x1){_[_0xa3ac('0x22')](_0x2a8dec,_0x2f8a22[_0x312d7f]);}for(var _0x50219d in _0x2a8dec){if(_0x2a8dec[_0xa3ac('0x23')](_0x50219d)){_0x2a8dec[_0x50219d]=this[_0xa3ac('0x1f')](_0x2a8dec[_0x50219d],_0x2f8a22);}}return _0x2a8dec;};exports[_0xa3ac('0x24')]=function(_0x19cb73){return _0x19cb73['match'](RegExp(_0xa3ac('0x25')))?!![]:![];};exports['isEmail']=function(_0x5e7d9b){return _0x5e7d9b[_0xa3ac('0x26')](/^\S+@\S+$/)?!![]:![];};exports['getFullTextValue']=function(_0xcd2628,_0x2f9dee){var _0x386645=[];var _0x52e130=/[ `!@#$%^&*()_\-?~]/;var _0x58a25c=_0x2f9dee?'\x22{EXPR}\x22':_0xa3ac('0x27');_0xcd2628[_0xa3ac('0x9')](/[ ,]+/)['forEach'](function(_0x2fa23d){_0x2fa23d=_0x2fa23d[_0xa3ac('0x28')](/([^:]")"+/g,'$1');_0x2fa23d='+'+_0x2fa23d+'*';var _0x49cc23=_0x2fa23d[_0xa3ac('0x26')](_0x52e130);if(_0x49cc23){_0x2fa23d='\x22'+_0x2fa23d+'\x22';}_0x386645[_0xa3ac('0x29')](_0x2fa23d);});_0x58a25c=_0x58a25c['replace'](_0xa3ac('0x27'),_0x386645[_0xa3ac('0x2a')]('\x20'));return _0x58a25c;};exports['getOptions']=function(_0x5f38f7,_0x2dc845,_0x1f27d5){var _0x5bef2b={},_0x30cf63={};if(_0x2dc845[_0xa3ac('0x2b')]['$id']){_0x2dc845['query']['id']=_0x2dc845[_0xa3ac('0x2b')]['$id'];delete _0x2dc845[_0xa3ac('0x2b')][_0xa3ac('0x2c')];}_0x5bef2b[_0xa3ac('0x5')]=_[_0xa3ac('0x2d')](_0x5f38f7,_0xa3ac('0x2e'));_0x5bef2b['query']=_[_0xa3ac('0x3')](_0x2dc845[_0xa3ac('0x2b')]);_0x5bef2b[_0xa3ac('0xa')]=_[_0xa3ac('0x2f')](_0x5bef2b['model'],_0x5bef2b[_0xa3ac('0x2b')]);_0x30cf63['attributes']=_[_0xa3ac('0x2f')](_0x5bef2b[_0xa3ac('0x5')],this['fields'](_0x2dc845[_0xa3ac('0x2b')]['fields']));_0x30cf63['attributes']=_0x30cf63['attributes'][_0xa3ac('0x30')]?_0x30cf63['attributes']:_0x5bef2b['model'];if(!_0x2dc845[_0xa3ac('0x2b')]['hasOwnProperty'](_0xa3ac('0x31'))){_0x30cf63[_0xa3ac('0x32')]=this[_0xa3ac('0x32')](_0x2dc845[_0xa3ac('0x2b')][_0xa3ac('0x32')]);_0x30cf63['offset']=this[_0xa3ac('0x16')](_0x2dc845[_0xa3ac('0x2b')]['offset']);}_0x30cf63[_0xa3ac('0x33')]=this[_0xa3ac('0x34')](_0x2dc845[_0xa3ac('0x2b')][_0xa3ac('0x34')]);_0x30cf63[_0xa3ac('0x35')]=this[_0xa3ac('0xa')](_[_0xa3ac('0x36')](_0x2dc845[_0xa3ac('0x2b')],_0x5bef2b[_0xa3ac('0xa')]),_0x5f38f7);if(_0x2dc845[_0xa3ac('0x2b')][_0xa3ac('0x37')]){var _0x49303d=_0x5f38f7;var _0x4b4130=_0x2dc845[_0xa3ac('0x2b')][_0xa3ac('0x37')];if(typeof _0x4b4130===_0xa3ac('0x38')){_0x49303d=_[_0xa3ac('0x37')](_0x5f38f7,function(_0x3301ce){return _[_0xa3ac('0x4')](_0x4b4130[_0xa3ac('0x39')],_0x3301ce[_0xa3ac('0x2e')]);});_0x4b4130=_0x4b4130['value'];}_0x30cf63[_0xa3ac('0x35')]=_[_0xa3ac('0x3a')](_0x30cf63[_0xa3ac('0x35')],{'$or':_['map'](_0x49303d,function(_0x4b7879){if(_0x4b7879[_0xa3ac('0x3b')]!==_0xa3ac('0x3c')){if(_0x1f27d5){return sequelize['where'](sequelize['fn'](_0xa3ac('0x3d'),sequelize[_0xa3ac('0x1a')](_0x4b7879[_0xa3ac('0x2e')])),{'$like':sequelize['fn'](_0xa3ac('0x3d'),'%'+_0x2dc845[_0xa3ac('0x2b')][_0xa3ac('0x37')]+'%')});}else{var _0x449328={};_0x449328[_0x4b7879[_0xa3ac('0x2e')]]={'$like':'%'+_0x2dc845[_0xa3ac('0x2b')][_0xa3ac('0x37')]+'%'};return _0x449328;}}})});}_0x30cf63=_['merge']({},_0x30cf63,_0x2dc845[_0xa3ac('0x3e')]);return _0x30cf63;};exports[_0xa3ac('0x3f')]=function(_0x564545){var _0x106a6d=[];if(_0x564545['includeAll']){_0x106a6d[_0xa3ac('0x29')]({'all':!![]});}else if(_0x564545[_0xa3ac('0x3f')]){if(Array['isArray'](_0x564545[_0xa3ac('0x3f')])){_0x106a6d=Object[_0xa3ac('0x3')](_0x564545['include'])[_0xa3ac('0x2d')](function(_0x3187f2){return parseIncludeModel(_0x564545['include'][_0x3187f2]);});}else{var _0x46e6bd=parseIncludeModel(_0x564545['include']);_0x106a6d[_0xa3ac('0x29')](_0x46e6bd);}}return _0x106a6d;};
\ No newline at end of file
+var _0xcb07=['$id','query','intersection','attributes','nolimit','limit','offset','order','where','filter','columns','value','lower','merge','options','includeAll','push','include','lodash','sequelize','moment','../../mysqldb','parse','includes','keys','model','fields','raw','split','filters','isEmpty','DATE','isPlainObject','YYYY-MM-DD','format','$lte','subtract','name','uniqueid','isArray','sort','map','indexOf','priority','col','unsigned','substr','DESC','cast','ASC','omit','isObject','isString','length','unset','hasOwnProperty','isNumeric','^[+]?[0-9]*$','isEmail','getFullTextValue','\x22{EXPR}\x22','{EXPR}','forEach','match','replace','join','getOptions'];(function(_0xc609a,_0x40e57b){var _0x1fffa9=function(_0x5d83f7){while(--_0x5d83f7){_0xc609a['push'](_0xc609a['shift']());}};_0x1fffa9(++_0x40e57b);}(_0xcb07,0x98));var _0x7cb0=function(_0x3c504b,_0x437693){_0x3c504b=_0x3c504b-0x0;var _0x2e5354=_0xcb07[_0x3c504b];return _0x2e5354;};'use strict';var _=require(_0x7cb0('0x0'));var sequelize=require(_0x7cb0('0x1'));var moment=require(_0x7cb0('0x2'));var db=require(_0x7cb0('0x3'))['db'];var LIMIT_VALUE=0xfa;function hasSequelizeOperator(_0x282c97){var _0x530c60=['ne'];try{var _0x451e6f=JSON[_0x7cb0('0x4')](_0x282c97);var _0x1c1e4a=Object['keys'](_0x451e6f)[0x0];return _0x530c60[_0x7cb0('0x5')](_0x1c1e4a);}catch(_0x4f4140){return![];}}function getOperatorValue(_0x22dfbb){var _0x3938a6=JSON['parse'](_0x22dfbb);var _0x1e3a56=Object[_0x7cb0('0x6')](_0x3938a6)[0x0];var _0x2cf7fd=_0x3938a6[_0x1e3a56];return{['$'+_0x1e3a56]:_0x2cf7fd};}function parseIncludeModel(_0x1bf71a){var _0x1c89b7=JSON[_0x7cb0('0x4')](_0x1bf71a);return{'model':db[_0x1c89b7[_0x7cb0('0x7')]],'as':_0x1c89b7['alias'],'attributes':_0x1c89b7[_0x7cb0('0x8')],'raw':_0x1c89b7[_0x7cb0('0x9')]};}exports[_0x7cb0('0x8')]=function(_0x560810){var _0x59b6bf=null;if(_0x560810){_0x59b6bf=_0x560810[_0x7cb0('0xa')](',');}return _0x59b6bf;};exports[_0x7cb0('0xb')]=function(_0x543c8a,_0x57f3cf){var _0x5bc8f2={};if(!_[_0x7cb0('0xc')](_0x543c8a)){_['forOwn'](_0x543c8a,function(_0x2176de,_0x1c52c1){try{if(_0x57f3cf){var _0xe03d25=_['find'](_0x57f3cf,{'name':_0x1c52c1})||{};if(hasSequelizeOperator(_0x2176de)){_0x5bc8f2[_0x1c52c1]=getOperatorValue(_0x2176de);}else if(_0xe03d25['type']===_0x7cb0('0xd')&&_[_0x7cb0('0xe')](_0x2176de)){var _0x181834=JSON['parse'](_0x2176de);var _0xea1b72={'$gte':moment(moment(_0x181834['$gte'])['format'](_0x7cb0('0xf')))['utc']()[_0x7cb0('0x10')](),'$lte':moment(moment(_0x181834[_0x7cb0('0x11')])[_0x7cb0('0x10')](_0x7cb0('0xf')))['utc']()[_0x7cb0('0x12')](0x1,'s')[_0x7cb0('0x10')]()};_0x5bc8f2[_0x1c52c1]=_0xea1b72;}else if(_0xe03d25[_0x7cb0('0x13')]===_0x7cb0('0x14')){_0x5bc8f2[_0x1c52c1]=_0x2176de;}else{_0x5bc8f2[_0x1c52c1]=_[_0x7cb0('0x15')](_0x2176de)?_0x2176de:JSON[_0x7cb0('0x4')](_0x2176de);}}else{_0x5bc8f2[_0x1c52c1]=_['isArray'](_0x2176de)?_0x2176de:JSON[_0x7cb0('0x4')](_0x2176de);}}catch(_0x225e80){_0x5bc8f2[_0x1c52c1]=_0x2176de[_0x7cb0('0xa')](',');}});}return _0x5bc8f2;};exports['limit']=function(_0x356937){_0x356937=parseInt(_0x356937,0xa);if(!_0x356937||_0x356937<0x0){_0x356937=LIMIT_VALUE;}return _0x356937;};exports['offset']=function(_0x21c70d){_0x21c70d=parseInt(_0x21c70d,0xa);if(!_0x21c70d||_0x21c70d<0x0){_0x21c70d=0x0;}return _0x21c70d;};exports[_0x7cb0('0x16')]=function(_0x2ec94b){var _0x1e09b6,_0x16ef84=null;if(_0x2ec94b){_0x1e09b6=_0x2ec94b[_0x7cb0('0xa')](',');_0x16ef84=_[_0x7cb0('0x17')](_0x1e09b6,function(_0x31ae45){if(_0x31ae45[_0x7cb0('0x18')]('-')===0x0){return[_0x31ae45===_0x7cb0('0x19')?sequelize['cast'](sequelize[_0x7cb0('0x1a')](_0x7cb0('0x19')),_0x7cb0('0x1b')):_0x31ae45[_0x7cb0('0x1c')](0x1),_0x7cb0('0x1d')];}else{return[_0x31ae45===_0x7cb0('0x19')?sequelize[_0x7cb0('0x1e')](sequelize['col'](_0x7cb0('0x19')),_0x7cb0('0x1b')):_0x31ae45,_0x7cb0('0x1f')];}});}return _0x16ef84;};exports[_0x7cb0('0x20')]=function(_0x195254,_0x5e8520){if(_[_0x7cb0('0xc')](_0x195254)){return _0x195254;}if(_[_0x7cb0('0x15')](_0x195254)){for(var _0x1e0dd3=0x0;_0x1e0dd3<_0x195254['length'];_0x1e0dd3+=0x1){_0x195254[_0x1e0dd3]=this[_0x7cb0('0x20')](_0x195254[_0x1e0dd3],_0x5e8520);}return _0x195254;}if(!_[_0x7cb0('0x21')](_0x195254)){return _0x195254;}if(_[_0x7cb0('0x22')](_0x5e8520)){_0x5e8520=[_0x5e8520];}if(!_[_0x7cb0('0x15')](_0x5e8520)){return _0x195254;}for(var _0x1989af=0x0;_0x1989af<_0x5e8520[_0x7cb0('0x23')];_0x1989af+=0x1){_[_0x7cb0('0x24')](_0x195254,_0x5e8520[_0x1989af]);}for(var _0xd181a5 in _0x195254){if(_0x195254[_0x7cb0('0x25')](_0xd181a5)){_0x195254[_0xd181a5]=this[_0x7cb0('0x20')](_0x195254[_0xd181a5],_0x5e8520);}}return _0x195254;};exports[_0x7cb0('0x26')]=function(_0x49d230){return _0x49d230['match'](RegExp(_0x7cb0('0x27')))?!![]:![];};exports[_0x7cb0('0x28')]=function(_0x569574){return _0x569574['match'](/^\S+@\S+$/)?!![]:![];};exports[_0x7cb0('0x29')]=function(_0x19057d,_0x2f8760){var _0xa6a631=[];var _0x527116=/[ `!@#$%^&*()_\-?~]/;var _0xf64f36=_0x2f8760?_0x7cb0('0x2a'):_0x7cb0('0x2b');_0x19057d[_0x7cb0('0xa')](/[ ,]+/)[_0x7cb0('0x2c')](function(_0x3b97fa){_0x3b97fa=_0x3b97fa['replace'](/([^:]")"+/g,'$1');_0x3b97fa='+'+_0x3b97fa+'*';var _0x2d6dba=_0x3b97fa[_0x7cb0('0x2d')](_0x527116);if(_0x2d6dba){_0x3b97fa='\x22'+_0x3b97fa+'\x22';}_0xa6a631['push'](_0x3b97fa);});_0xf64f36=_0xf64f36[_0x7cb0('0x2e')]('{EXPR}',_0xa6a631[_0x7cb0('0x2f')]('\x20'));return _0xf64f36;};exports[_0x7cb0('0x30')]=function(_0x52f21a,_0xe683ea,_0x4e5f64){var _0x10a1dc={},_0x353f11={};if(_0xe683ea['query'][_0x7cb0('0x31')]){_0xe683ea[_0x7cb0('0x32')]['id']=_0xe683ea[_0x7cb0('0x32')][_0x7cb0('0x31')];delete _0xe683ea['query'][_0x7cb0('0x31')];}_0x10a1dc[_0x7cb0('0x7')]=_['map'](_0x52f21a,_0x7cb0('0x13'));_0x10a1dc['query']=_['keys'](_0xe683ea[_0x7cb0('0x32')]);_0x10a1dc[_0x7cb0('0xb')]=_[_0x7cb0('0x33')](_0x10a1dc[_0x7cb0('0x7')],_0x10a1dc['query']);_0x353f11[_0x7cb0('0x34')]=_[_0x7cb0('0x33')](_0x10a1dc['model'],this[_0x7cb0('0x8')](_0xe683ea[_0x7cb0('0x32')][_0x7cb0('0x8')]));_0x353f11['attributes']=_0x353f11[_0x7cb0('0x34')][_0x7cb0('0x23')]?_0x353f11[_0x7cb0('0x34')]:_0x10a1dc['model'];if(!_0xe683ea['query'][_0x7cb0('0x25')](_0x7cb0('0x35'))){_0x353f11[_0x7cb0('0x36')]=this[_0x7cb0('0x36')](_0xe683ea[_0x7cb0('0x32')][_0x7cb0('0x36')]);_0x353f11[_0x7cb0('0x37')]=this['offset'](_0xe683ea[_0x7cb0('0x32')][_0x7cb0('0x37')]);}_0x353f11[_0x7cb0('0x38')]=this[_0x7cb0('0x16')](_0xe683ea['query'][_0x7cb0('0x16')]);_0x353f11[_0x7cb0('0x39')]=this[_0x7cb0('0xb')](_['pick'](_0xe683ea['query'],_0x10a1dc['filters']),_0x52f21a);if(_0xe683ea['query'][_0x7cb0('0x3a')]){var _0x288f2e=_0x52f21a;var _0x4cfefc=_0xe683ea[_0x7cb0('0x32')]['filter'];if(typeof _0x4cfefc==='object'){_0x288f2e=_['filter'](_0x52f21a,function(_0x516470){return _['includes'](_0x4cfefc[_0x7cb0('0x3b')],_0x516470[_0x7cb0('0x13')]);});_0x4cfefc=_0x4cfefc[_0x7cb0('0x3c')];}_0x353f11['where']=_['merge'](_0x353f11[_0x7cb0('0x39')],{'$or':_[_0x7cb0('0x17')](_0x288f2e,function(_0x58ac4f){if(_0x58ac4f['type']!=='VIRTUAL'){if(_0x4e5f64){return sequelize['where'](sequelize['fn'](_0x7cb0('0x3d'),sequelize[_0x7cb0('0x1a')](_0x58ac4f[_0x7cb0('0x13')])),{'$like':sequelize['fn'](_0x7cb0('0x3d'),'%'+_0xe683ea[_0x7cb0('0x32')]['filter']+'%')});}else{var _0x3d50ca={};_0x3d50ca[_0x58ac4f[_0x7cb0('0x13')]]={'$like':'%'+_0xe683ea['query'][_0x7cb0('0x3a')]+'%'};return _0x3d50ca;}}})});}_0x353f11=_[_0x7cb0('0x3e')]({},_0x353f11,_0xe683ea[_0x7cb0('0x3f')]);return _0x353f11;};exports['include']=function(_0x4dbac5){var _0x88de91=[];if(_0x4dbac5[_0x7cb0('0x40')]){_0x88de91[_0x7cb0('0x41')]({'all':!![]});}else if(_0x4dbac5[_0x7cb0('0x42')]){if(Array[_0x7cb0('0x15')](_0x4dbac5[_0x7cb0('0x42')])){_0x88de91=Object[_0x7cb0('0x6')](_0x4dbac5[_0x7cb0('0x42')])[_0x7cb0('0x17')](function(_0x3111a8){return parseIncludeModel(_0x4dbac5['include'][_0x3111a8]);});}else{var _0x496437=parseIncludeModel(_0x4dbac5[_0x7cb0('0x42')]);_0x88de91[_0x7cb0('0x41')](_0x496437);}}return _0x88de91;};
\ No newline at end of file
index 472efd4..c537c50 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf494=['pauseType','find','globalStatus','getSortedAgentsIdsByStatus','split','fields','startsWith','DESC','getUpdatedSortOptions','internal','substring','indexOf','sort','toLowerCase','sortAgentsByStatus','userpic','lastLoginAt','lastPauseAt','address','chatCapacity','openchannelCapacity','mailCapacity','smsCapacity','whatsappCapacity','faxCapacity','chatCurrentCapacity','openchannelCurrentCapacity','mailCurrentCapacity','smsCurrentCapacity','whatsappCurrentCapacity','faxCurrentCapacity','whatsappStatus','chatStatusTime','openchannelStatusTime','mailStatusTime','whatsappStatusTime','voiceStatusTime','queue','destconnectedlinenum','screenrecording','phoneBarEnableAutomaticScreenRecording','online','omit','filterAgentAttributes','faxStatusTime','smsStatusTime','phoneBarEnableScreenRecordingByAgent','onhold','routealias','getRealtimeAgentsQueryFields','lodash','jayson/promise','../../mysqldb','http','client','chatPause','faxPause','mailPause','openchannelPause','smsPause','every','filter','length','idle','unavailable','ringing','voicePause','voiceStatus','chatStatus','faxStatus','mailStatus','openchannelStatus','smsStatus','request','Agents','then','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(AMI)','result','merge','catch','getRealtimeAgents','unknown','pause','*pause','getAgentStatus','isArray','startCase','Queue','map','all','flatten','uniq','value','getAgentIdsByQueues','resolve','includes','User','findAll','name','fullname','whatsappPause'];(function(_0x26f0b2,_0x355024){var _0x502a6e=function(_0x152514){while(--_0x152514){_0x26f0b2['push'](_0x26f0b2['shift']());}};_0x502a6e(++_0x355024);}(_0xf494,0x1c6));var _0x4f49=function(_0x1d50de,_0x1d58c8){_0x1d50de=_0x1d50de-0x0;var _0x3f238c=_0xf494[_0x1d50de];return _0x3f238c;};'use strict';var _=require(_0x4f49('0x0'));var jayson=require(_0x4f49('0x1'));var db=require(_0x4f49('0x2'))['db'];var amiClient=jayson['client'][_0x4f49('0x3')]({'port':0x232a});var routingClient=jayson[_0x4f49('0x4')][_0x4f49('0x3')]({'port':0x232c});function isAgentPaused(_0x25677c,_0x20c0d7){var _0x2a15fb=[_0x25677c[_0x4f49('0x5')],_0x25677c[_0x4f49('0x6')],_0x25677c[_0x4f49('0x7')],_0x25677c[_0x4f49('0x8')],_0x25677c[_0x4f49('0x9')],_0x25677c['voicePause'],_0x25677c['whatsappPause']];if(!_0x20c0d7)return _[_0x4f49('0xa')](_0x2a15fb);var _0x327bd5=_[_0x4f49('0xb')](_0x2a15fb);return _0x327bd5[_0x4f49('0xc')]>0x0&&_0x327bd5[_0x4f49('0xc')]<_0x2a15fb[_0x4f49('0xc')]?!![]:![];}function isIdle(_0x151d8c){return _0x151d8c===_0x4f49('0xd')||_0x151d8c==='unknown'||_0x151d8c===_0x4f49('0xe')||_0x151d8c===_0x4f49('0xf')||_['isNil'](_0x151d8c);}function isAgentIdle(_0x15e7a1){if(_0x15e7a1['voiceStatus']!=='idle'&&_0x15e7a1[_0x4f49('0x10')]){_0x15e7a1[_0x4f49('0x11')]='pause';return![];}return _[_0x4f49('0xa')]([_0x15e7a1[_0x4f49('0x12')],_0x15e7a1[_0x4f49('0x13')],_0x15e7a1[_0x4f49('0x14')],_0x15e7a1[_0x4f49('0x15')],_0x15e7a1[_0x4f49('0x16')],_0x15e7a1[_0x4f49('0x11')],_0x15e7a1['whatsappStatus']],isIdle);}function getRealtimeAgents(){return amiClient[_0x4f49('0x17')](_0x4f49('0x18'),{})[_0x4f49('0x19')](function(_0x5878f4){if(_0x5878f4['error']){throw new Error(_0x4f49('0x1a'));}var _0x2ecaaa=_0x5878f4[_0x4f49('0x1b')];return routingClient['request'](_0x4f49('0x18'),{})[_0x4f49('0x19')](function(_0x4e85df){if(_0x4e85df['error']){throw new Error('Unable\x20to\x20retrieve\x20RPC\x20agents\x20(Routing)');}var _0x560592=_0x4e85df['result'];return _[_0x4f49('0x1c')]({},_0x2ecaaa,_0x560592);});})[_0x4f49('0x1d')](function(_0x1c2d70){throw _0x1c2d70;});}exports[_0x4f49('0x1e')]=getRealtimeAgents;function getAgentStatus(_0x5793ac){var _0x416893=_0x4f49('0x1f');if(isAgentPaused(_0x5793ac))_0x416893=_0x4f49('0x20');else if(isAgentPaused(_0x5793ac,!![]))_0x416893=_0x4f49('0x21');else if(isAgentIdle(_0x5793ac))_0x416893=_0x4f49('0xd');else _0x416893='busy';return _0x416893;}exports[_0x4f49('0x22')]=getAgentStatus;function getAgentIdsByQueues(_0x357446,_0x3ae590){var _0x53b57d=_[_0x4f49('0x23')](_0x357446)?_0x357446:[_0x357446];var _0x1d70a7=_[_0x4f49('0x24')](_0x3ae590)+_0x4f49('0x25');var _0x9d30aa=_[_0x4f49('0x26')](_0x53b57d,function(_0x559d98){return db[_0x1d70a7]['findOne']({'where':{'id':_0x559d98}})[_0x4f49('0x19')](function(_0x429de7){if(!_0x429de7)return[];return _0x429de7['getAgents']({'attributes':['id'],'raw':!![]});});});return Promise[_0x4f49('0x27')](_0x9d30aa)[_0x4f49('0x19')](function(_0x35f8e0){var _0x525950=_(_0x35f8e0)[_0x4f49('0x28')]()[_0x4f49('0x26')]('id')[_0x4f49('0x29')]()[_0x4f49('0x2a')]();return _0x525950;});}exports[_0x4f49('0x2b')]=getAgentIdsByQueues;function getAgentIdsByStatus(_0x122404,_0x4915af,_0x50c571){try{if(_0x4915af[_0x4f49('0xc')]>0x0){_0x122404=_0x122404[_0x4f49('0xb')](function(_0x605c91){return _0x4915af['includes'](_0x605c91['id']);});}var _0x3cbfbd=_0x122404[_0x4f49('0xb')](function(_0x43d8e3){var _0x506b20='busy';if(isAgentIdle(_0x43d8e3)){_0x506b20=_0x4f49('0xd');}return _0x506b20===_0x50c571;});return _[_0x4f49('0x26')](_0x3cbfbd,'id');}catch(_0x7a6ea0){throw _0x7a6ea0;}}exports['getAgentIdsByStatus']=getAgentIdsByStatus;function getSortedAgentsIdsByStatus(_0x1eaac6,_0x35aa33,_0x173657){return Promise[_0x4f49('0x2c')]()[_0x4f49('0x19')](function(){if(_0x35aa33[_0x4f49('0xc')]>0x0){_0x1eaac6=_0x1eaac6[_0x4f49('0xb')](function(_0x45ae19){return _0x35aa33[_0x4f49('0x2d')](_0x45ae19['id']);});}return _0x1eaac6;})[_0x4f49('0x19')](function(){return db[_0x4f49('0x2e')][_0x4f49('0x2f')]({'attributes':['id',_0x4f49('0x30'),_0x4f49('0x31'),_0x4f49('0x5'),_0x4f49('0x6'),_0x4f49('0x7'),_0x4f49('0x8'),_0x4f49('0x9'),'voicePause',_0x4f49('0x32'),_0x4f49('0x33')],'where':{'id':{'$in':_[_0x4f49('0x26')](_0x1eaac6,'id')}},'raw':!![]});})[_0x4f49('0x19')](function(_0x1c3af8){return _0x1c3af8[_0x4f49('0x26')](function(_0x2cbe4e){var _0x3ad6a7=_[_0x4f49('0x34')](_0x1eaac6,['id',_0x2cbe4e['id']]);var _0x338db8=filterAgentAttributes(_0x3ad6a7);_[_0x4f49('0x1c')](_0x2cbe4e,_0x338db8);_0x2cbe4e[_0x4f49('0x35')]=getAgentStatus(_0x2cbe4e);return _0x2cbe4e;});})[_0x4f49('0x19')](function(_0x4d2d57){var _0x371282=sortAgentsByStatus(_0x4d2d57,_0x173657);return _[_0x4f49('0x26')](_0x371282,'id');})[_0x4f49('0x1d')](function(_0x26014f){throw _0x26014f;});}exports[_0x4f49('0x36')]=getSortedAgentsIdsByStatus;function getUpdatedSortOptions(_0x3ee818){var _0xe1b662={'fields':[],'order':null};var _0x25fdf8=_0x3ee818[_0x4f49('0x37')](',');_0xe1b662[_0x4f49('0x38')]=_[_0x4f49('0xb')](_0x25fdf8,function(_0x141db){if(!_0x141db[_0x4f49('0x2d')](_0x4f49('0x35'))){return!![];}_0xe1b662['order']=_[_0x4f49('0x39')](_0x141db,'-')?_0x4f49('0x3a'):'ASC';return![];});return _0xe1b662;}exports[_0x4f49('0x3b')]=getUpdatedSortOptions;function validateSortParameter(_0xbf05f3){if(!_0xbf05f3){_0xbf05f3='fullname,internal';}if(_0xbf05f3[_0x4f49('0x2d')](_0x4f49('0x31'))&&!_0xbf05f3[_0x4f49('0x2d')](_0x4f49('0x3c'))){var _0x3bfe7e=_0xbf05f3[_0x4f49('0x3d')](0x0,_0xbf05f3[_0x4f49('0x3e')]('fullname'));_0xbf05f3+=','+_0x3bfe7e+'internal';}return _0xbf05f3;}exports['validateSortParameter']=validateSortParameter;function sortAgentsByStatus(_0x15e4b3,_0x15b280){var _0x2e4355=_0x15e4b3[_0x4f49('0x3f')](function(_0x1053b2,_0x1ecf6c){if(_0x1053b2[_0x4f49('0x35')]===_0x1ecf6c[_0x4f49('0x35')]){if(_0x1053b2[_0x4f49('0x35')]==='pause'){if(_0x15b280==='DESC'){return(_0x1053b2[_0x4f49('0x33')]||'')<(_0x1ecf6c[_0x4f49('0x33')]||'')||_0x1053b2[_0x4f49('0x31')]['toLowerCase']()>_0x1ecf6c[_0x4f49('0x31')]['toLowerCase']()?0x1:-0x1;}else{return(_0x1053b2['pauseType']||'')<(_0x1ecf6c[_0x4f49('0x33')]||'')||_0x1053b2[_0x4f49('0x31')][_0x4f49('0x40')]()>_0x1ecf6c['fullname'][_0x4f49('0x40')]()?-0x1:0x1;}}else{if(_0x15b280===_0x4f49('0x3a')){return _0x1053b2['fullname'][_0x4f49('0x40')]()<_0x1ecf6c['fullname'][_0x4f49('0x40')]()?0x1:-0x1;}else{return _0x1053b2[_0x4f49('0x31')][_0x4f49('0x40')]()<_0x1ecf6c['fullname'][_0x4f49('0x40')]()?-0x1:0x1;}}}else{if(_0x15b280===_0x4f49('0x3a')){return _0x1053b2[_0x4f49('0x35')]<_0x1ecf6c[_0x4f49('0x35')]?0x1:-0x1;}else{return _0x1053b2[_0x4f49('0x35')]<_0x1ecf6c[_0x4f49('0x35')]?-0x1:0x1;}}});return _0x2e4355;}exports[_0x4f49('0x41')]=sortAgentsByStatus;function filterAgentAttributes(_0x356785){var _0x435192=[_0x4f49('0x42'),'online',_0x4f49('0x43'),_0x4f49('0x44'),'pauseType',_0x4f49('0x44'),'internal',_0x4f49('0x45'),_0x4f49('0x5'),_0x4f49('0x8'),_0x4f49('0x7'),'smsPause',_0x4f49('0x32'),_0x4f49('0x6'),_0x4f49('0x10'),_0x4f49('0x46'),_0x4f49('0x47'),_0x4f49('0x48'),_0x4f49('0x49'),_0x4f49('0x4a'),_0x4f49('0x4b'),_0x4f49('0x4c'),_0x4f49('0x4d'),_0x4f49('0x4e'),_0x4f49('0x4f'),_0x4f49('0x50'),_0x4f49('0x51'),_0x4f49('0x12'),'openchannelStatus','mailStatus',_0x4f49('0x16'),_0x4f49('0x52'),_0x4f49('0x13'),_0x4f49('0x11'),_0x4f49('0x53'),_0x4f49('0x54'),_0x4f49('0x55'),'smsStatusTime',_0x4f49('0x56'),'faxStatusTime',_0x4f49('0x57'),_0x4f49('0x58'),_0x4f49('0x59'),_0x4f49('0x5a'),'phoneBarEnableScreenRecordingByAgent',_0x4f49('0x5b'),'routealias'];var _0x52d18c=[_0x4f49('0x5'),_0x4f49('0x8'),_0x4f49('0x7'),_0x4f49('0x9'),'whatsappPause','faxPause',_0x4f49('0x10'),_0x4f49('0x5c')];var _0x5cb187=_(_0x356785)[_0x4f49('0x5d')](_0x52d18c)['pick'](_0x435192)['value']();return _0x5cb187;}exports[_0x4f49('0x5e')]=filterAgentAttributes;function getRealtimeAgentsQueryFields(){return['id','name',_0x4f49('0x31'),'role',_0x4f49('0x3c'),_0x4f49('0x5c'),_0x4f49('0x35'),_0x4f49('0x42'),_0x4f49('0x43'),_0x4f49('0x33'),_0x4f49('0x44'),_0x4f49('0x6'),'chatPause',_0x4f49('0x7'),'openchannelPause',_0x4f49('0x9'),_0x4f49('0x10'),_0x4f49('0x32'),_0x4f49('0x12'),_0x4f49('0x13'),_0x4f49('0x14'),'openchannelStatus',_0x4f49('0x16'),_0x4f49('0x11'),'whatsappStatus','chatStatusTime',_0x4f49('0x5f'),_0x4f49('0x55'),_0x4f49('0x54'),_0x4f49('0x60'),_0x4f49('0x57'),'whatsappStatusTime',_0x4f49('0x46'),'faxCapacity',_0x4f49('0x48'),_0x4f49('0x47'),_0x4f49('0x49'),'whatsappCapacity',_0x4f49('0x4c'),_0x4f49('0x51'),_0x4f49('0x4e'),_0x4f49('0x4d'),'smsCurrentCapacity',_0x4f49('0x50'),_0x4f49('0x61'),'phoneBarEnableAutomaticScreenRecording',_0x4f49('0x59'),_0x4f49('0x62'),_0x4f49('0x58'),_0x4f49('0x63'),_0x4f49('0x5a')];}exports[_0x4f49('0x64')]=getRealtimeAgentsQueryFields;
\ No newline at end of file
+var _0xdc97=['openchannelStatusTime','mailStatusTime','smsStatusTime','whatsappStatusTime','faxStatusTime','queue','destconnectedlinenum','screenrecording','phoneBarEnableAutomaticScreenRecording','routealias','omit','pick','value','filterAgentAttributes','role','userpic','voiceStatusTime','mailCapacity','phoneBarEnableScreenRecordingByAgent','onhold','getRealtimeAgentsQueryFields','lodash','jayson/promise','../../mysqldb','http','chatPause','faxPause','mailPause','smsPause','every','filter','length','idle','unknown','unavailable','ringing','isNil','pause','faxStatus','mailStatus','openchannelStatus','smsStatus','voiceStatus','whatsappStatus','Agents','then','error','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(AMI)','result','request','Unable\x20to\x20retrieve\x20RPC\x20agents\x20(Routing)','merge','catch','getRealtimeAgents','*pause','isArray','Queue','map','findOne','uniq','getAgentIdsByQueues','includes','resolve','name','openchannelPause','voicePause','whatsappPause','pauseType','find','getSortedAgentsIdsByStatus','split','fields','globalStatus','order','startsWith','DESC','ASC','fullname,internal','fullname','internal','substring','indexOf','toLowerCase','online','lastLoginAt','lastPauseAt','chatCapacity','openchannelCapacity','smsCapacity','whatsappCapacity','faxCapacity','chatCurrentCapacity','openchannelCurrentCapacity','mailCurrentCapacity','smsCurrentCapacity','whatsappCurrentCapacity','faxCurrentCapacity','chatStatus'];(function(_0x2bd211,_0x522300){var _0x5b963e=function(_0x553314){while(--_0x553314){_0x2bd211['push'](_0x2bd211['shift']());}};_0x5b963e(++_0x522300);}(_0xdc97,0x13b));var _0x7dc9=function(_0x53bba6,_0x48fdc2){_0x53bba6=_0x53bba6-0x0;var _0x53591c=_0xdc97[_0x53bba6];return _0x53591c;};'use strict';var _=require(_0x7dc9('0x0'));var jayson=require(_0x7dc9('0x1'));var db=require(_0x7dc9('0x2'))['db'];var amiClient=jayson['client'][_0x7dc9('0x3')]({'port':0x232a});var routingClient=jayson['client'][_0x7dc9('0x3')]({'port':0x232c});function isAgentPaused(_0x2b86da,_0x478a95){var _0x2a77c1=[_0x2b86da[_0x7dc9('0x4')],_0x2b86da[_0x7dc9('0x5')],_0x2b86da[_0x7dc9('0x6')],_0x2b86da['openchannelPause'],_0x2b86da[_0x7dc9('0x7')],_0x2b86da['voicePause'],_0x2b86da['whatsappPause']];if(!_0x478a95)return _[_0x7dc9('0x8')](_0x2a77c1);var _0x23737d=_[_0x7dc9('0x9')](_0x2a77c1);return _0x23737d[_0x7dc9('0xa')]>0x0&&_0x23737d[_0x7dc9('0xa')]<_0x2a77c1['length']?!![]:![];}function isIdle(_0xb2fa2a){return _0xb2fa2a===_0x7dc9('0xb')||_0xb2fa2a===_0x7dc9('0xc')||_0xb2fa2a===_0x7dc9('0xd')||_0xb2fa2a===_0x7dc9('0xe')||_[_0x7dc9('0xf')](_0xb2fa2a);}function isAgentIdle(_0x1e336a){if(_0x1e336a['voiceStatus']!=='idle'&&_0x1e336a['voicePause']){_0x1e336a['voiceStatus']=_0x7dc9('0x10');return![];}return _[_0x7dc9('0x8')]([_0x1e336a['chatStatus'],_0x1e336a[_0x7dc9('0x11')],_0x1e336a[_0x7dc9('0x12')],_0x1e336a[_0x7dc9('0x13')],_0x1e336a[_0x7dc9('0x14')],_0x1e336a[_0x7dc9('0x15')],_0x1e336a[_0x7dc9('0x16')]],isIdle);}function getRealtimeAgents(){return amiClient['request'](_0x7dc9('0x17'),{})[_0x7dc9('0x18')](function(_0x1b0aa1){if(_0x1b0aa1[_0x7dc9('0x19')]){throw new Error(_0x7dc9('0x1a'));}var _0xbe0437=_0x1b0aa1[_0x7dc9('0x1b')];return routingClient[_0x7dc9('0x1c')](_0x7dc9('0x17'),{})['then'](function(_0x22577e){if(_0x22577e['error']){throw new Error(_0x7dc9('0x1d'));}var _0x1cc237=_0x22577e['result'];return _[_0x7dc9('0x1e')]({},_0xbe0437,_0x1cc237);});})[_0x7dc9('0x1f')](function(_0x12f08d){throw _0x12f08d;});}exports[_0x7dc9('0x20')]=getRealtimeAgents;function getAgentStatus(_0x43ec33){var _0x184bfd=_0x7dc9('0xc');if(isAgentPaused(_0x43ec33))_0x184bfd=_0x7dc9('0x10');else if(isAgentPaused(_0x43ec33,!![]))_0x184bfd=_0x7dc9('0x21');else if(isAgentIdle(_0x43ec33))_0x184bfd=_0x7dc9('0xb');else _0x184bfd='busy';return _0x184bfd;}exports['getAgentStatus']=getAgentStatus;function getAgentIdsByQueues(_0x12954f,_0x5981e2){var _0x596e0f=_[_0x7dc9('0x22')](_0x12954f)?_0x12954f:[_0x12954f];var _0x27f7fa=_['startCase'](_0x5981e2)+_0x7dc9('0x23');var _0x43d31f=_[_0x7dc9('0x24')](_0x596e0f,function(_0x4906b1){return db[_0x27f7fa][_0x7dc9('0x25')]({'where':{'id':_0x4906b1}})[_0x7dc9('0x18')](function(_0xf95336){if(!_0xf95336)return[];return _0xf95336['getAgents']({'attributes':['id'],'raw':!![]});});});return Promise['all'](_0x43d31f)['then'](function(_0x25b383){var _0x32d032=_(_0x25b383)['flatten']()['map']('id')[_0x7dc9('0x26')]()['value']();return _0x32d032;});}exports[_0x7dc9('0x27')]=getAgentIdsByQueues;function getAgentIdsByStatus(_0x1c690b,_0x3a74a0,_0x3e4102){try{if(_0x3a74a0[_0x7dc9('0xa')]>0x0){_0x1c690b=_0x1c690b[_0x7dc9('0x9')](function(_0x236d42){return _0x3a74a0[_0x7dc9('0x28')](_0x236d42['id']);});}var _0x1fcf0e=_0x1c690b[_0x7dc9('0x9')](function(_0x14083d){var _0x2a456c='busy';if(isAgentIdle(_0x14083d)){_0x2a456c='idle';}return _0x2a456c===_0x3e4102;});return _['map'](_0x1fcf0e,'id');}catch(_0x49a4a5){throw _0x49a4a5;}}exports['getAgentIdsByStatus']=getAgentIdsByStatus;function getSortedAgentsIdsByStatus(_0x553a03,_0x58c4e8,_0x59f5d8){return Promise[_0x7dc9('0x29')]()[_0x7dc9('0x18')](function(){if(_0x58c4e8[_0x7dc9('0xa')]>0x0){_0x553a03=_0x553a03[_0x7dc9('0x9')](function(_0x3300ff){return _0x58c4e8[_0x7dc9('0x28')](_0x3300ff['id']);});}return _0x553a03;})['then'](function(){return db['User']['findAll']({'attributes':['id',_0x7dc9('0x2a'),'fullname',_0x7dc9('0x4'),_0x7dc9('0x5'),_0x7dc9('0x6'),_0x7dc9('0x2b'),_0x7dc9('0x7'),_0x7dc9('0x2c'),_0x7dc9('0x2d'),_0x7dc9('0x2e')],'where':{'id':{'$in':_['map'](_0x553a03,'id')}},'raw':!![]});})[_0x7dc9('0x18')](function(_0x4cdec4){return _0x4cdec4[_0x7dc9('0x24')](function(_0x16431a){var _0x3dc8e0=_[_0x7dc9('0x2f')](_0x553a03,['id',_0x16431a['id']]);var _0x48d9b2=filterAgentAttributes(_0x3dc8e0);_[_0x7dc9('0x1e')](_0x16431a,_0x48d9b2);_0x16431a['globalStatus']=getAgentStatus(_0x16431a);return _0x16431a;});})[_0x7dc9('0x18')](function(_0x4f47af){var _0x590bed=sortAgentsByStatus(_0x4f47af,_0x59f5d8);return _[_0x7dc9('0x24')](_0x590bed,'id');})[_0x7dc9('0x1f')](function(_0x21e036){throw _0x21e036;});}exports[_0x7dc9('0x30')]=getSortedAgentsIdsByStatus;function getUpdatedSortOptions(_0x5dac5b){var _0x9376a5={'fields':[],'order':null};var _0x183d87=_0x5dac5b[_0x7dc9('0x31')](',');_0x9376a5[_0x7dc9('0x32')]=_[_0x7dc9('0x9')](_0x183d87,function(_0x21faa6){if(!_0x21faa6[_0x7dc9('0x28')](_0x7dc9('0x33'))){return!![];}_0x9376a5[_0x7dc9('0x34')]=_[_0x7dc9('0x35')](_0x21faa6,'-')?_0x7dc9('0x36'):_0x7dc9('0x37');return![];});return _0x9376a5;}exports['getUpdatedSortOptions']=getUpdatedSortOptions;function validateSortParameter(_0x34b5c9){if(!_0x34b5c9){_0x34b5c9=_0x7dc9('0x38');}if(_0x34b5c9[_0x7dc9('0x28')](_0x7dc9('0x39'))&&!_0x34b5c9['includes'](_0x7dc9('0x3a'))){var _0x89db0e=_0x34b5c9[_0x7dc9('0x3b')](0x0,_0x34b5c9[_0x7dc9('0x3c')](_0x7dc9('0x39')));_0x34b5c9+=','+_0x89db0e+_0x7dc9('0x3a');}return _0x34b5c9;}exports['validateSortParameter']=validateSortParameter;function sortAgentsByStatus(_0x553230,_0x3ef9fd){var _0x36a965=_0x553230['sort'](function(_0x3a705c,_0x4a37ec){if(_0x3a705c[_0x7dc9('0x33')]===_0x4a37ec[_0x7dc9('0x33')]){if(_0x3a705c[_0x7dc9('0x33')]==='pause'){if(_0x3ef9fd===_0x7dc9('0x36')){return(_0x3a705c[_0x7dc9('0x2e')]||'')<(_0x4a37ec[_0x7dc9('0x2e')]||'')||_0x3a705c[_0x7dc9('0x39')][_0x7dc9('0x3d')]()>_0x4a37ec[_0x7dc9('0x39')][_0x7dc9('0x3d')]()?0x1:-0x1;}else{return(_0x3a705c['pauseType']||'')<(_0x4a37ec[_0x7dc9('0x2e')]||'')||_0x3a705c['fullname']['toLowerCase']()>_0x4a37ec[_0x7dc9('0x39')][_0x7dc9('0x3d')]()?-0x1:0x1;}}else{if(_0x3ef9fd===_0x7dc9('0x36')){return _0x3a705c[_0x7dc9('0x39')][_0x7dc9('0x3d')]()<_0x4a37ec[_0x7dc9('0x39')][_0x7dc9('0x3d')]()?0x1:-0x1;}else{return _0x3a705c[_0x7dc9('0x39')][_0x7dc9('0x3d')]()<_0x4a37ec['fullname'][_0x7dc9('0x3d')]()?-0x1:0x1;}}}else{if(_0x3ef9fd===_0x7dc9('0x36')){return _0x3a705c[_0x7dc9('0x33')]<_0x4a37ec[_0x7dc9('0x33')]?0x1:-0x1;}else{return _0x3a705c[_0x7dc9('0x33')]<_0x4a37ec[_0x7dc9('0x33')]?-0x1:0x1;}}});return _0x36a965;}exports['sortAgentsByStatus']=sortAgentsByStatus;function filterAgentAttributes(_0x3774cb){var _0x42e110=['userpic',_0x7dc9('0x3e'),_0x7dc9('0x3f'),_0x7dc9('0x40'),'pauseType',_0x7dc9('0x40'),'internal','address',_0x7dc9('0x4'),_0x7dc9('0x2b'),_0x7dc9('0x6'),'smsPause','whatsappPause',_0x7dc9('0x5'),'voicePause',_0x7dc9('0x41'),_0x7dc9('0x42'),'mailCapacity',_0x7dc9('0x43'),_0x7dc9('0x44'),_0x7dc9('0x45'),_0x7dc9('0x46'),_0x7dc9('0x47'),_0x7dc9('0x48'),_0x7dc9('0x49'),_0x7dc9('0x4a'),_0x7dc9('0x4b'),_0x7dc9('0x4c'),_0x7dc9('0x13'),_0x7dc9('0x12'),_0x7dc9('0x14'),'whatsappStatus',_0x7dc9('0x11'),'voiceStatus','chatStatusTime',_0x7dc9('0x4d'),_0x7dc9('0x4e'),_0x7dc9('0x4f'),_0x7dc9('0x50'),_0x7dc9('0x51'),'voiceStatusTime',_0x7dc9('0x52'),_0x7dc9('0x53'),_0x7dc9('0x54'),'phoneBarEnableScreenRecordingByAgent',_0x7dc9('0x55'),_0x7dc9('0x56')];var _0x2cf133=[_0x7dc9('0x4'),_0x7dc9('0x2b'),_0x7dc9('0x6'),'smsPause',_0x7dc9('0x2d'),_0x7dc9('0x5'),_0x7dc9('0x2c'),_0x7dc9('0x3e')];var _0x877a67=_(_0x3774cb)[_0x7dc9('0x57')](_0x2cf133)[_0x7dc9('0x58')](_0x42e110)[_0x7dc9('0x59')]();return _0x877a67;}exports[_0x7dc9('0x5a')]=filterAgentAttributes;function getRealtimeAgentsQueryFields(){return['id',_0x7dc9('0x2a'),_0x7dc9('0x39'),_0x7dc9('0x5b'),'internal',_0x7dc9('0x3e'),_0x7dc9('0x33'),_0x7dc9('0x5c'),_0x7dc9('0x3f'),_0x7dc9('0x2e'),'lastPauseAt',_0x7dc9('0x5'),_0x7dc9('0x4'),_0x7dc9('0x6'),_0x7dc9('0x2b'),_0x7dc9('0x7'),_0x7dc9('0x2c'),'whatsappPause','chatStatus','faxStatus',_0x7dc9('0x12'),_0x7dc9('0x13'),_0x7dc9('0x14'),_0x7dc9('0x15'),'whatsappStatus','chatStatusTime',_0x7dc9('0x51'),_0x7dc9('0x4e'),_0x7dc9('0x4d'),_0x7dc9('0x4f'),_0x7dc9('0x5d'),_0x7dc9('0x50'),_0x7dc9('0x41'),'faxCapacity',_0x7dc9('0x5e'),_0x7dc9('0x42'),_0x7dc9('0x43'),_0x7dc9('0x44'),_0x7dc9('0x46'),'faxCurrentCapacity',_0x7dc9('0x48'),_0x7dc9('0x47'),_0x7dc9('0x49'),_0x7dc9('0x4a'),_0x7dc9('0x5f'),_0x7dc9('0x55'),_0x7dc9('0x53'),_0x7dc9('0x60'),_0x7dc9('0x52'),_0x7dc9('0x56'),_0x7dc9('0x54')];}exports[_0x7dc9('0x61')]=getRealtimeAgentsQueryFields;
\ No newline at end of file
index a936c7e..0fce782 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbcfc=['originated','message','statusMessage','dialActive','Trunk','startProgressive','erlangCallToSecond','erlangBusyFactor','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','voice','request','startCase','Queues','then','error','format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','result','catch','getRealtimeQueues','inbound','concat','outbound','map','get','available','busy','merge','pick','jayson/promise','util','client','http','loggedIn','paused','inUse','invalid','loggedInDb','ringInUse','talking','unavailable'];(function(_0x473658,_0x4683b1){var _0x16ffcb=function(_0x41744d){while(--_0x41744d){_0x473658['push'](_0x473658['shift']());}};_0x16ffcb(++_0x4683b1);}(_0xbcfc,0x114));var _0xcbcf=function(_0x1a582f,_0x2ab202){_0x1a582f=_0x1a582f-0x0;var _0x55ac11=_0xbcfc[_0x1a582f];return _0x55ac11;};'use strict';var _=require('lodash');var jayson=require(_0xcbcf('0x0'));var util=require(_0xcbcf('0x1'));var amiClient=jayson[_0xcbcf('0x2')]['http']({'port':0x232a});var routingClient=jayson[_0xcbcf('0x2')][_0xcbcf('0x3')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=['available',_0xcbcf('0x4'),_0xcbcf('0x5'),'waiting'];var VOICE_QUEUE_ATTRIBUTES=['busy',_0xcbcf('0x6'),_0xcbcf('0x7'),_0xcbcf('0x8'),'notInUse','onHold','ringing',_0xcbcf('0x9'),_0xcbcf('0xa'),_0xcbcf('0xb'),'unknown'];var OUTBOUND_QUEUE_ATTRIBUTES=['pTalking',_0xcbcf('0xc'),_0xcbcf('0xd'),_0xcbcf('0xe'),_0xcbcf('0xf'),'dialMethod',_0xcbcf('0x10'),'startPredictive',_0xcbcf('0x11'),'erlangCalls',_0xcbcf('0x12'),'erlangAbandonmentRate',_0xcbcf('0x13'),'dialPredictiveInterval',_0xcbcf('0x14'),_0xcbcf('0x15'),'predictiveIntervalAvailable',_0xcbcf('0x16'),_0xcbcf('0x17'),_0xcbcf('0x18'),_0xcbcf('0x19'),_0xcbcf('0x1a'),_0xcbcf('0x1b')];function getRealtimeQueues(_0x59fdc7,_0x22c1cf){var _0x13780b=_0x22c1cf===_0xcbcf('0x1c')?amiClient:routingClient;return _0x13780b[_0xcbcf('0x1d')](_[_0xcbcf('0x1e')](_0x22c1cf)+_0xcbcf('0x1f'),_0x59fdc7)[_0xcbcf('0x20')](function(_0x41fa6f){if(_0x41fa6f[_0xcbcf('0x21')])throw new Error(util[_0xcbcf('0x22')](_0xcbcf('0x23'),_0x22c1cf));return _0x41fa6f[_0xcbcf('0x24')];})[_0xcbcf('0x25')](function(_0x4305ef){throw _0x4305ef;});}exports[_0xcbcf('0x26')]=getRealtimeQueues;function initializeQueues(_0x48298e,_0x8f46eb,_0x376b21,_0x35235d){var _0x1c100a=DEFAULT_QUEUE_ATTRIBUTES;if(_0x376b21===_0xcbcf('0x1c')){if(_0x35235d===_0xcbcf('0x27')){_0x1c100a=_0x1c100a[_0xcbcf('0x28')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x35235d===_0xcbcf('0x29')){_0x1c100a=_0x1c100a[_0xcbcf('0x28')](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x48298e[_0xcbcf('0x2a')](function(_0x472154){var _0x98c52e=_0x472154[_0xcbcf('0x2b')]({'plain':!![]});_0x98c52e['paused']=0x0;_0x98c52e['loggedInDb']=0x0;_0x98c52e[_0xcbcf('0x4')]=0x0;_0x98c52e[_0xcbcf('0x2c')]=0x0;_0x98c52e['waiting']=0x0;if(_0x376b21===_0xcbcf('0x1c')){_0x98c52e['talking']=0x0;_0x98c52e[_0xcbcf('0x2d')]=0x0;if(_0x35235d===_0xcbcf('0x29')){_0x98c52e['pTalking']=0x0;_0x98c52e[_0xcbcf('0xc')]=0x0;}}var _0x85e11b=_['find'](_0x8f46eb,['id',_0x98c52e['id']]);if(_0x85e11b){_[_0xcbcf('0x2e')](_0x98c52e,_[_0xcbcf('0x2f')](_0x85e11b,_0x1c100a));}return _0x98c52e;});}exports['initializeQueues']=initializeQueues;
\ No newline at end of file
+var _0xba33=['format','Unable\x20to\x20retrieve\x20RPC\x20%s\x20queues','result','catch','getRealtimeQueues','inbound','concat','outbound','get','loggedInDb','available','find','merge','pick','initializeQueues','lodash','util','client','http','paused','waiting','busy','notInUse','onHold','ringInUse','talking','unavailable','unknown','pTalking','originated','message','statusMessage','dialActive','dialMethod','startPredictive','startProgressive','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialPredictiveInterval','dialPredictiveIntervalMaxThreshold','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','voice','request','startCase','Queues','error'];(function(_0x2715ac,_0x24e151){var _0x2010fa=function(_0x441f79){while(--_0x441f79){_0x2715ac['push'](_0x2715ac['shift']());}};_0x2010fa(++_0x24e151);}(_0xba33,0x1e3));var _0x3ba3=function(_0x227ca9,_0x23cd9d){_0x227ca9=_0x227ca9-0x0;var _0x220397=_0xba33[_0x227ca9];return _0x220397;};'use strict';var _=require(_0x3ba3('0x0'));var jayson=require('jayson/promise');var util=require(_0x3ba3('0x1'));var amiClient=jayson[_0x3ba3('0x2')][_0x3ba3('0x3')]({'port':0x232a});var routingClient=jayson['client'][_0x3ba3('0x3')]({'port':0x232c});var DEFAULT_QUEUE_ATTRIBUTES=['available','loggedIn',_0x3ba3('0x4'),_0x3ba3('0x5')];var VOICE_QUEUE_ATTRIBUTES=[_0x3ba3('0x6'),'inUse','invalid','loggedInDb',_0x3ba3('0x7'),_0x3ba3('0x8'),'ringing',_0x3ba3('0x9'),_0x3ba3('0xa'),_0x3ba3('0xb'),_0x3ba3('0xc')];var OUTBOUND_QUEUE_ATTRIBUTES=[_0x3ba3('0xd'),_0x3ba3('0xe'),_0x3ba3('0xf'),_0x3ba3('0x10'),_0x3ba3('0x11'),_0x3ba3('0x12'),'Trunk',_0x3ba3('0x13'),_0x3ba3('0x14'),'erlangCalls',_0x3ba3('0x15'),_0x3ba3('0x16'),_0x3ba3('0x17'),_0x3ba3('0x18'),_0x3ba3('0x19'),'dialPredictiveIntervalMinThreshold','predictiveIntervalAvailable',_0x3ba3('0x1a'),_0x3ba3('0x1b'),_0x3ba3('0x1c'),_0x3ba3('0x1d'),_0x3ba3('0x1e'),_0x3ba3('0x1f')];function getRealtimeQueues(_0x22b826,_0x3b505e){var _0x21c2a1=_0x3b505e===_0x3ba3('0x20')?amiClient:routingClient;return _0x21c2a1[_0x3ba3('0x21')](_[_0x3ba3('0x22')](_0x3b505e)+_0x3ba3('0x23'),_0x22b826)['then'](function(_0x50aad2){if(_0x50aad2[_0x3ba3('0x24')])throw new Error(util[_0x3ba3('0x25')](_0x3ba3('0x26'),_0x3b505e));return _0x50aad2[_0x3ba3('0x27')];})[_0x3ba3('0x28')](function(_0x54c897){throw _0x54c897;});}exports[_0x3ba3('0x29')]=getRealtimeQueues;function initializeQueues(_0x31ec64,_0x3121b6,_0x26263c,_0x3fdc7f){var _0x262e69=DEFAULT_QUEUE_ATTRIBUTES;if(_0x26263c==='voice'){if(_0x3fdc7f===_0x3ba3('0x2a')){_0x262e69=_0x262e69[_0x3ba3('0x2b')](VOICE_QUEUE_ATTRIBUTES);}else if(_0x3fdc7f===_0x3ba3('0x2c')){_0x262e69=_0x262e69[_0x3ba3('0x2b')](VOICE_QUEUE_ATTRIBUTES,OUTBOUND_QUEUE_ATTRIBUTES);}}return _0x31ec64['map'](function(_0x48b664){var _0x3ba5de=_0x48b664[_0x3ba3('0x2d')]({'plain':!![]});_0x3ba5de[_0x3ba3('0x4')]=0x0;_0x3ba5de[_0x3ba3('0x2e')]=0x0;_0x3ba5de['loggedIn']=0x0;_0x3ba5de[_0x3ba3('0x2f')]=0x0;_0x3ba5de[_0x3ba3('0x5')]=0x0;if(_0x26263c==='voice'){_0x3ba5de['talking']=0x0;_0x3ba5de[_0x3ba3('0x6')]=0x0;if(_0x3fdc7f==='outbound'){_0x3ba5de[_0x3ba3('0xd')]=0x0;_0x3ba5de['originated']=0x0;}}var _0x5b1bd7=_[_0x3ba3('0x30')](_0x3121b6,['id',_0x3ba5de['id']]);if(_0x5b1bd7){_[_0x3ba3('0x31')](_0x3ba5de,_[_0x3ba3('0x32')](_0x5b1bd7,_0x262e69));}return _0x3ba5de;});}exports[_0x3ba3('0x33')]=initializeQueues;
\ No newline at end of file
index 64816e1..5a55aa6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['get','production','set','appPath','public','join','root','client','use','toISOString','split','static','views','/server/views','engine','html','ejs','urlencoded','50mb','json','initialize','express','method-override','cookie-parser','passport','./environment','default'];(function(_0x450d4e,_0xcacc3){var _0x300304=function(_0x49ab27){while(--_0x49ab27){_0x450d4e['push'](_0x450d4e['shift']());}};_0x300304(++_0xcacc3);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4bfac3,_0x58324d){_0x4bfac3=_0x4bfac3-0x0;var _0x15f0f2=_0xa9e0[_0x4bfac3];return _0x15f0f2;};'use strict';var express=require(_0x0a9e('0x0'));var methodOverride=require(_0x0a9e('0x1'));var cookieParser=require(_0x0a9e('0x2'));var errorHandler=require('errorhandler');var path=require('path');var passport=require(_0x0a9e('0x3'));var cors=require('cors');var config=require(_0x0a9e('0x4'));exports[_0x0a9e('0x5')]=function(_0x2ab90b){var _0x991246=_0x2ab90b[_0x0a9e('0x6')]('env');if(_0x991246===_0x0a9e('0x7')){_0x2ab90b[_0x0a9e('0x8')](_0x0a9e('0x9'),path['join'](config['root'],_0x0a9e('0xa')));}if(_0x991246==='development'||_0x991246==='test'){_0x2ab90b[_0x0a9e('0x8')](_0x0a9e('0x9'),path[_0x0a9e('0xb')](config[_0x0a9e('0xc')],_0x0a9e('0xd')));_0x2ab90b[_0x0a9e('0xe')](errorHandler());}_0x2ab90b['set']('json\x20replacer',function(_0x527cdd,_0x4cfe67){if(this[_0x527cdd]instanceof Date){_0x4cfe67=this[_0x527cdd][_0x0a9e('0xf')]()[_0x0a9e('0x10')]('.')[0x0]+'Z';}return _0x4cfe67;});_0x2ab90b[_0x0a9e('0xe')](express[_0x0a9e('0x11')](_0x2ab90b[_0x0a9e('0x6')](_0x0a9e('0x9'))));_0x2ab90b['set'](_0x0a9e('0x12'),config[_0x0a9e('0xc')]+_0x0a9e('0x13'));_0x2ab90b[_0x0a9e('0x14')](_0x0a9e('0x15'),require(_0x0a9e('0x16'))['renderFile']);_0x2ab90b[_0x0a9e('0x8')]('view\x20engine',_0x0a9e('0x15'));_0x2ab90b['use'](express[_0x0a9e('0x17')]({'limit':_0x0a9e('0x18'),'extended':!![]}));_0x2ab90b['use'](express[_0x0a9e('0x19')]({'limit':'50mb'}));_0x2ab90b[_0x0a9e('0xe')](cors());_0x2ab90b[_0x0a9e('0xe')](methodOverride());_0x2ab90b[_0x0a9e('0xe')](cookieParser());_0x2ab90b[_0x0a9e('0xe')](passport[_0x0a9e('0x1a')]());};
\ No newline at end of file
+var _0x9957=['root','public','test','join','client','use','json\x20replacer','toISOString','split','static','/server/views','engine','html','ejs','renderFile','view\x20engine','urlencoded','json','50mb','express','method-override','cookie-parser','errorhandler','passport','cors','./environment','default','get','env','production','set','appPath'];(function(_0x55ef8b,_0x5deb5e){var _0x359c84=function(_0x437673){while(--_0x437673){_0x55ef8b['push'](_0x55ef8b['shift']());}};_0x359c84(++_0x5deb5e);}(_0x9957,0x93));var _0x7995=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0x9957[_0x2f5ac5];return _0x37c9a8;};'use strict';var express=require(_0x7995('0x0'));var methodOverride=require(_0x7995('0x1'));var cookieParser=require(_0x7995('0x2'));var errorHandler=require(_0x7995('0x3'));var path=require('path');var passport=require(_0x7995('0x4'));var cors=require(_0x7995('0x5'));var config=require(_0x7995('0x6'));exports[_0x7995('0x7')]=function(_0x576d89){var _0x744bea=_0x576d89[_0x7995('0x8')](_0x7995('0x9'));if(_0x744bea===_0x7995('0xa')){_0x576d89[_0x7995('0xb')](_0x7995('0xc'),path['join'](config[_0x7995('0xd')],_0x7995('0xe')));}if(_0x744bea==='development'||_0x744bea===_0x7995('0xf')){_0x576d89[_0x7995('0xb')](_0x7995('0xc'),path[_0x7995('0x10')](config[_0x7995('0xd')],_0x7995('0x11')));_0x576d89[_0x7995('0x12')](errorHandler());}_0x576d89['set'](_0x7995('0x13'),function(_0x41c652,_0x581f22){if(this[_0x41c652]instanceof Date){_0x581f22=this[_0x41c652][_0x7995('0x14')]()[_0x7995('0x15')]('.')[0x0]+'Z';}return _0x581f22;});_0x576d89[_0x7995('0x12')](express[_0x7995('0x16')](_0x576d89[_0x7995('0x8')](_0x7995('0xc'))));_0x576d89[_0x7995('0xb')]('views',config['root']+_0x7995('0x17'));_0x576d89[_0x7995('0x18')](_0x7995('0x19'),require(_0x7995('0x1a'))[_0x7995('0x1b')]);_0x576d89[_0x7995('0xb')](_0x7995('0x1c'),_0x7995('0x19'));_0x576d89['use'](express[_0x7995('0x1d')]({'limit':'50mb','extended':!![]}));_0x576d89[_0x7995('0x12')](express[_0x7995('0x1e')]({'limit':_0x7995('0x1f')}));_0x576d89[_0x7995('0x12')](cors());_0x576d89[_0x7995('0x12')](methodOverride());_0x576d89[_0x7995('0x12')](cookieParser());_0x576d89['use'](passport['initialize']());};
\ No newline at end of file
index 3584f21..b676456 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc847=['replace','hostname','macAddress','createHash','digest','substring','lodash','crypto','bimedia-machine-uuid','child_process','execSync','../environment','networkInterfaces','orderBy','length','filter','family','IPv4','internal','concat','mac','00:00:00:00:00:00','address','127.0.0.1','getFirstInterface','cpus','model','join','update','hex','getUuid','platform','licenseToken','test','win32','dmidecode\x20--string\x20system-uuid'];(function(_0x5f0c76,_0x44b266){var _0x308606=function(_0x14bc96){while(--_0x14bc96){_0x5f0c76['push'](_0x5f0c76['shift']());}};_0x308606(++_0x44b266);}(_0xc847,0x126));var _0x7c84=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xc847[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x7c84('0x0'));var os=require('os');var crypto=require(_0x7c84('0x1'));var machine=require(_0x7c84('0x2'));var exec=require(_0x7c84('0x3'))[_0x7c84('0x4')];var config=require(_0x7c84('0x5'));function getInterfaces(){var _0x5b3225=[];var _0x1b1fb0=os[_0x7c84('0x6')]();var _0x2e5e12=_[_0x7c84('0x7')](_['keys'](_0x1b1fb0));for(var _0x38afa0=0x0;_0x38afa0<_0x2e5e12[_0x7c84('0x8')];_0x38afa0++){var _0x4d6bbd=_0x1b1fb0[_0x2e5e12[_0x38afa0]][_0x7c84('0x9')](function(_0x3e7221){return _0x3e7221[_0x7c84('0xa')]===_0x7c84('0xb')&&_0x3e7221[_0x7c84('0xc')]===![];});_0x5b3225=_0x5b3225[_0x7c84('0xd')](_0x4d6bbd);}return _0x5b3225;}function getFirstInterface(){var _0x10fd4a=_['head'](getInterfaces());return{'macAddress':_0x10fd4a&&_0x10fd4a[_0x7c84('0xe')]?_0x10fd4a[_0x7c84('0xe')]:_0x7c84('0xf'),'ipAddress':_0x10fd4a&&_0x10fd4a[_0x7c84('0x10')]?_0x10fd4a[_0x7c84('0x10')]:_0x7c84('0x11')};}exports[_0x7c84('0x12')]=getFirstInterface;function getCPUhash(){var _0x3beb02=_['orderBy'](os[_0x7c84('0x13')]()['map'](function(_0x2496c0){return _0x2496c0[_0x7c84('0x14')];}))[_0x7c84('0x15')](':');return crypto['createHash']('md5')[_0x7c84('0x16')](_0x3beb02)['digest'](_0x7c84('0x17'));}exports[_0x7c84('0x18')]=function(){var _0x1c4eaf=os[_0x7c84('0x19')]();var _0x50bd0e=/[0-9a-f-]{36}/;if(config[_0x7c84('0x1a')]&&_0x50bd0e[_0x7c84('0x1b')](config[_0x7c84('0x1a')])){return config[_0x7c84('0x1a')];}else if(_0x1c4eaf===_0x7c84('0x1c')){return exec(_0x7c84('0x1d'),{'encoding':'utf8'})[_0x7c84('0x1e')]('\x0d\x0a','');}else{var _0x1ae77b=getFirstInterface();var _0x4499f5=getCPUhash();var _0x459cc2=_0x4499f5+'|'+os[_0x7c84('0x1f')]()+'|'+_0x1ae77b[_0x7c84('0x20')]+'|'+_0x1ae77b['ipAddress'];var _0x5443e4=crypto[_0x7c84('0x21')]('md5')[_0x7c84('0x16')](_0x459cc2)[_0x7c84('0x22')](_0x7c84('0x17'));return _0x5443e4['substring'](0x0,0x8)+'-'+_0x5443e4[_0x7c84('0x23')](0x8,0xc)+'-'+_0x5443e4[_0x7c84('0x23')](0xc,0x10)+'-'+_0x5443e4[_0x7c84('0x23')](0x10,0x14)+'-'+_0x5443e4['substring'](0x14);}};
\ No newline at end of file
+var _0x9f09=['licenseToken','test','win32','dmidecode\x20--string\x20system-uuid','utf8','replace','hostname','macAddress','ipAddress','substring','lodash','crypto','child_process','execSync','orderBy','length','filter','family','IPv4','head','mac','00:00:00:00:00:00','address','getFirstInterface','cpus','map','model','createHash','md5','update','digest','hex','platform'];(function(_0xa464c9,_0x7c86d8){var _0x3d73c4=function(_0x5c2056){while(--_0x5c2056){_0xa464c9['push'](_0xa464c9['shift']());}};_0x3d73c4(++_0x7c86d8);}(_0x9f09,0xd0));var _0x99f0=function(_0x1bf28a,_0x5a4f35){_0x1bf28a=_0x1bf28a-0x0;var _0x50f8c0=_0x9f09[_0x1bf28a];return _0x50f8c0;};'use strict';var _=require(_0x99f0('0x0'));var os=require('os');var crypto=require(_0x99f0('0x1'));var machine=require('bimedia-machine-uuid');var exec=require(_0x99f0('0x2'))[_0x99f0('0x3')];var config=require('../environment');function getInterfaces(){var _0x3738e5=[];var _0x2457dd=os['networkInterfaces']();var _0x45e7a5=_[_0x99f0('0x4')](_['keys'](_0x2457dd));for(var _0x503193=0x0;_0x503193<_0x45e7a5[_0x99f0('0x5')];_0x503193++){var _0x3071d3=_0x2457dd[_0x45e7a5[_0x503193]][_0x99f0('0x6')](function(_0x3dd4d7){return _0x3dd4d7[_0x99f0('0x7')]===_0x99f0('0x8')&&_0x3dd4d7['internal']===![];});_0x3738e5=_0x3738e5['concat'](_0x3071d3);}return _0x3738e5;}function getFirstInterface(){var _0x5739d2=_[_0x99f0('0x9')](getInterfaces());return{'macAddress':_0x5739d2&&_0x5739d2['mac']?_0x5739d2[_0x99f0('0xa')]:_0x99f0('0xb'),'ipAddress':_0x5739d2&&_0x5739d2['address']?_0x5739d2[_0x99f0('0xc')]:'127.0.0.1'};}exports[_0x99f0('0xd')]=getFirstInterface;function getCPUhash(){var _0x59fb15=_[_0x99f0('0x4')](os[_0x99f0('0xe')]()[_0x99f0('0xf')](function(_0x3c6d1a){return _0x3c6d1a[_0x99f0('0x10')];}))['join'](':');return crypto[_0x99f0('0x11')](_0x99f0('0x12'))[_0x99f0('0x13')](_0x59fb15)[_0x99f0('0x14')](_0x99f0('0x15'));}exports['getUuid']=function(){var _0x3c136e=os[_0x99f0('0x16')]();var _0x1ab655=/[0-9a-f-]{36}/;if(config[_0x99f0('0x17')]&&_0x1ab655[_0x99f0('0x18')](config[_0x99f0('0x17')])){return config[_0x99f0('0x17')];}else if(_0x3c136e===_0x99f0('0x19')){return exec(_0x99f0('0x1a'),{'encoding':_0x99f0('0x1b')})[_0x99f0('0x1c')]('\x0d\x0a','');}else{var _0x3c2577=getFirstInterface();var _0x32a5f6=getCPUhash();var _0x12554a=_0x32a5f6+'|'+os[_0x99f0('0x1d')]()+'|'+_0x3c2577[_0x99f0('0x1e')]+'|'+_0x3c2577[_0x99f0('0x1f')];var _0x306891=crypto[_0x99f0('0x11')](_0x99f0('0x12'))['update'](_0x12554a)[_0x99f0('0x14')](_0x99f0('0x15'));return _0x306891['substring'](0x0,0x8)+'-'+_0x306891[_0x99f0('0x20')](0x8,0xc)+'-'+_0x306891['substring'](0xc,0x10)+'-'+_0x306891[_0x99f0('0x20')](0x10,0x14)+'-'+_0x306891[_0x99f0('0x20')](0x14);}};
\ No newline at end of file
index 599f1a6..384b871 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3a43=['toUpperCase','YYYY-MM-DD\x20HH:mm','update','encryptString','diff','decryptString','days','DEMO\x20START\x20AT\x20%s','finally','getUuid','spread','SERVICE\x20LICENSE\x20STARTED\x20%s','error','message','moment','bluebird','pkginfo','version','../../mysqldb','../../components/encryptor','./hardware','../logger','license','format','%s/api/servers/%s/check?version=%s','%s/api/servers/%s/check?version=%s&oldtoken=%s','exports','GET','then','catch','data1','active','data2','info','THE\x20LICENSE\x20HAS\x20BEEN\x20UPDATED','Disabled','THE\x20LICENSE\x20HAS\x20BEEN\x20DISABLED','Changed','NEW\x20UUID\x20DETECTED:\x20FROM\x20%s\x20TO\x20%s','%s\x20-\x20GRAY\x20PERIOD\x20STARTED\x20AT\x20%s'];(function(_0x561e5c,_0x370b25){var _0x2c652a=function(_0x25cc7e){while(--_0x25cc7e){_0x561e5c['push'](_0x561e5c['shift']());}};_0x2c652a(++_0x370b25);}(_0x3a43,0xae));var _0x33a4=function(_0x272638,_0x42b993){_0x272638=_0x272638-0x0;var _0x19d027=_0x3a43[_0x272638];return _0x19d027;};'use strict';var util=require('util');var moment=require(_0x33a4('0x0'));var rp=require('request-promise');var BPromise=require(_0x33a4('0x1'));var pkginfo=require(_0x33a4('0x2'))(module,_0x33a4('0x3'));var db=require(_0x33a4('0x4'))['db'];var encryptor=require(_0x33a4('0x5'));var hardware=require(_0x33a4('0x6'));var logger=require(_0x33a4('0x7'))(_0x33a4('0x8'));var HOST='https://www.xcallymotion.com';var TIME=0x3c*0x1388;var DAYS=0x7;var GRAY_PERIOD_REASON;var oldToken;var isOldTokenSent=![];function httpRequest(_0x265f76){return new BPromise(function(_0x42fc3d,_0x21e2e5){var _0x13d43f=util[_0x33a4('0x9')](_0x33a4('0xa'),HOST,_0x265f76,module['exports'][_0x33a4('0x3')]);if(oldToken){_0x13d43f=util[_0x33a4('0x9')](_0x33a4('0xb'),HOST,_0x265f76,module[_0x33a4('0xc')]['version'],oldToken);}var _0x474b56={'uri':_0x13d43f,'method':_0x33a4('0xd'),'timeout':0xea60,'json':!![]};return rp(_0x474b56)[_0x33a4('0xe')](function(_0x5bafbb){_0x42fc3d(_0x5bafbb);})[_0x33a4('0xf')](function(_0x287ed0){_0x21e2e5(_0x287ed0);});});}function manageLicense(_0x757e6a,_0x39f0eb){var _0x567324=_0x39f0eb['get']({'plain':!![]});if(!isOldTokenSent&&_0x567324[_0x33a4('0x10')]!==_0x757e6a&&!_0x567324['data2']){oldToken=_0x567324[_0x33a4('0x10')];}httpRequest(_0x757e6a)[_0x33a4('0xe')](function(_0x39b158){if(oldToken){oldToken=undefined;isOldTokenSent=!![];}if(_0x39b158[_0x33a4('0x11')]){isOldTokenSent=![];if(!_0x567324[_0x33a4('0x8')]&&_0x567324[_0x33a4('0x8')]!=_0x39b158['license']||_0x567324[_0x33a4('0x8')]&&_0x567324[_0x33a4('0x12')]){logger[_0x33a4('0x13')]('THE\x20LICENSE\x20HAS\x20BEEN\x20ENABLED');}if(_0x567324[_0x33a4('0x8')]&&!_0x567324[_0x33a4('0x12')]&&_0x567324[_0x33a4('0x8')]!=_0x39b158[_0x33a4('0x8')]){logger[_0x33a4('0x13')](_0x33a4('0x14'));}if(_0x567324[_0x33a4('0x8')]&&!_0x567324[_0x33a4('0x12')]&&_0x567324[_0x33a4('0x8')]==_0x39b158[_0x33a4('0x8')]){return _0x39f0eb;}return _0x39f0eb['update']({'data1':_0x757e6a,'data2':null,'license':_0x39b158[_0x33a4('0x8')]});}else{if(_0x39b158[_0x33a4('0x8')]||_0x567324[_0x33a4('0x8')]){if(!_0x567324[_0x33a4('0x12')]){if(_0x567324['data1']==_0x757e6a){GRAY_PERIOD_REASON=_0x33a4('0x15');logger['info'](_0x33a4('0x16'));}else{GRAY_PERIOD_REASON=_0x33a4('0x17');logger[_0x33a4('0x13')](_0x33a4('0x18'),_0x567324[_0x33a4('0x10')],_0x757e6a);}logger['info'](_0x33a4('0x19'),GRAY_PERIOD_REASON[_0x33a4('0x1a')](),moment()['format'](_0x33a4('0x1b')));return _0x39f0eb[_0x33a4('0x1c')]({'data2':encryptor[_0x33a4('0x1d')](moment()[_0x33a4('0x9')](_0x33a4('0x1b')))});}else{if(moment()[_0x33a4('0x1e')](encryptor[_0x33a4('0x1f')](_0x567324[_0x33a4('0x12')]),_0x33a4('0x20'))>DAYS){logger[_0x33a4('0x13')](_0x33a4('0x21'),moment()['format'](_0x33a4('0x1b')));isOldTokenSent=![];return _0x39f0eb['update']({'data1':_0x757e6a,'data2':null,'license':null});}}}else{if(_0x567324[_0x33a4('0x10')]!=_0x757e6a){logger['info'](_0x33a4('0x18'),_0x567324[_0x33a4('0x10')],_0x757e6a);return _0x39f0eb[_0x33a4('0x1c')]({'data1':_0x757e6a,'data2':null,'license':null});}}}return _0x39f0eb;})[_0x33a4('0xe')](function(_0x1843ac){_0x39f0eb=_0x1843ac;})[_0x33a4('0xf')](function(_0x1ed03d){logger['error'](_0x1ed03d['message']);})[_0x33a4('0x22')](function(){setTimeout(function(){manageLicense(hardware[_0x33a4('0x23')](),_0x39f0eb);},TIME);});}function defaultLicense(){var _0x826e4d=hardware['getUuid']();if(_0x826e4d){return db['License']['findOrCreate']({'where':{'id':0x1},'defaults':{'data1':_0x826e4d}})[_0x33a4('0x24')](function(_0x18d183,_0x4f7cb8){logger[_0x33a4('0x13')](_0x33a4('0x25'),_0x826e4d);manageLicense(_0x826e4d,_0x18d183);})['catch'](function(_0x397f4d){logger[_0x33a4('0x26')](_0x397f4d[_0x33a4('0x27')]);});}}exports['default']=defaultLicense;
\ No newline at end of file
+var _0x94f2=['get','data1','data2','license','info','THE\x20LICENSE\x20HAS\x20BEEN\x20ENABLED','THE\x20LICENSE\x20HAS\x20BEEN\x20UPDATED','update','Changed','%s\x20-\x20GRAY\x20PERIOD\x20STARTED\x20AT\x20%s','toUpperCase','YYYY-MM-DD\x20HH:mm','encryptString','decryptString','days','DEMO\x20START\x20AT\x20%s','error','message','finally','getUuid','findOrCreate','spread','SERVICE\x20LICENSE\x20STARTED\x20%s','catch','default','util','moment','bluebird','pkginfo','version','../../mysqldb','../../components/encryptor','./hardware','../logger','https://www.xcallymotion.com','format','exports','%s/api/servers/%s/check?version=%s&oldtoken=%s','GET','then'];(function(_0x1c1d43,_0x558db1){var _0x4ed37e=function(_0x200195){while(--_0x200195){_0x1c1d43['push'](_0x1c1d43['shift']());}};_0x4ed37e(++_0x558db1);}(_0x94f2,0x131));var _0x294f=function(_0x350155,_0x5c3402){_0x350155=_0x350155-0x0;var _0x20e45d=_0x94f2[_0x350155];return _0x20e45d;};'use strict';var util=require(_0x294f('0x0'));var moment=require(_0x294f('0x1'));var rp=require('request-promise');var BPromise=require(_0x294f('0x2'));var pkginfo=require(_0x294f('0x3'))(module,_0x294f('0x4'));var db=require(_0x294f('0x5'))['db'];var encryptor=require(_0x294f('0x6'));var hardware=require(_0x294f('0x7'));var logger=require(_0x294f('0x8'))('license');var HOST=_0x294f('0x9');var TIME=0x3c*0x1388;var DAYS=0x7;var GRAY_PERIOD_REASON;var oldToken;var isOldTokenSent=![];function httpRequest(_0x1b4043){return new BPromise(function(_0x458f89,_0x832752){var _0x372b2a=util[_0x294f('0xa')]('%s/api/servers/%s/check?version=%s',HOST,_0x1b4043,module[_0x294f('0xb')][_0x294f('0x4')]);if(oldToken){_0x372b2a=util[_0x294f('0xa')](_0x294f('0xc'),HOST,_0x1b4043,module['exports'][_0x294f('0x4')],oldToken);}var _0x3f3954={'uri':_0x372b2a,'method':_0x294f('0xd'),'timeout':0xea60,'json':!![]};return rp(_0x3f3954)[_0x294f('0xe')](function(_0xee7865){_0x458f89(_0xee7865);})['catch'](function(_0x77274e){_0x832752(_0x77274e);});});}function manageLicense(_0x3e4cd6,_0xe46274){var _0x50a873=_0xe46274[_0x294f('0xf')]({'plain':!![]});if(!isOldTokenSent&&_0x50a873[_0x294f('0x10')]!==_0x3e4cd6&&!_0x50a873[_0x294f('0x11')]){oldToken=_0x50a873['data1'];}httpRequest(_0x3e4cd6)[_0x294f('0xe')](function(_0x2ecd24){if(oldToken){oldToken=undefined;isOldTokenSent=!![];}if(_0x2ecd24['active']){isOldTokenSent=![];if(!_0x50a873[_0x294f('0x12')]&&_0x50a873[_0x294f('0x12')]!=_0x2ecd24['license']||_0x50a873['license']&&_0x50a873['data2']){logger[_0x294f('0x13')](_0x294f('0x14'));}if(_0x50a873[_0x294f('0x12')]&&!_0x50a873['data2']&&_0x50a873[_0x294f('0x12')]!=_0x2ecd24['license']){logger[_0x294f('0x13')](_0x294f('0x15'));}if(_0x50a873[_0x294f('0x12')]&&!_0x50a873[_0x294f('0x11')]&&_0x50a873[_0x294f('0x12')]==_0x2ecd24[_0x294f('0x12')]){return _0xe46274;}return _0xe46274[_0x294f('0x16')]({'data1':_0x3e4cd6,'data2':null,'license':_0x2ecd24['license']});}else{if(_0x2ecd24[_0x294f('0x12')]||_0x50a873[_0x294f('0x12')]){if(!_0x50a873['data2']){if(_0x50a873[_0x294f('0x10')]==_0x3e4cd6){GRAY_PERIOD_REASON='Disabled';logger[_0x294f('0x13')]('THE\x20LICENSE\x20HAS\x20BEEN\x20DISABLED');}else{GRAY_PERIOD_REASON=_0x294f('0x17');logger[_0x294f('0x13')]('NEW\x20UUID\x20DETECTED:\x20FROM\x20%s\x20TO\x20%s',_0x50a873[_0x294f('0x10')],_0x3e4cd6);}logger[_0x294f('0x13')](_0x294f('0x18'),GRAY_PERIOD_REASON[_0x294f('0x19')](),moment()[_0x294f('0xa')](_0x294f('0x1a')));return _0xe46274[_0x294f('0x16')]({'data2':encryptor[_0x294f('0x1b')](moment()['format'](_0x294f('0x1a')))});}else{if(moment()['diff'](encryptor[_0x294f('0x1c')](_0x50a873[_0x294f('0x11')]),_0x294f('0x1d'))>DAYS){logger[_0x294f('0x13')](_0x294f('0x1e'),moment()[_0x294f('0xa')](_0x294f('0x1a')));isOldTokenSent=![];return _0xe46274[_0x294f('0x16')]({'data1':_0x3e4cd6,'data2':null,'license':null});}}}else{if(_0x50a873[_0x294f('0x10')]!=_0x3e4cd6){logger[_0x294f('0x13')]('NEW\x20UUID\x20DETECTED:\x20FROM\x20%s\x20TO\x20%s',_0x50a873['data1'],_0x3e4cd6);return _0xe46274[_0x294f('0x16')]({'data1':_0x3e4cd6,'data2':null,'license':null});}}}return _0xe46274;})[_0x294f('0xe')](function(_0x2ac6cf){_0xe46274=_0x2ac6cf;})['catch'](function(_0x50f0b1){logger[_0x294f('0x1f')](_0x50f0b1[_0x294f('0x20')]);})[_0x294f('0x21')](function(){setTimeout(function(){manageLicense(hardware[_0x294f('0x22')](),_0xe46274);},TIME);});}function defaultLicense(){var _0x47d66b=hardware[_0x294f('0x22')]();if(_0x47d66b){return db['License'][_0x294f('0x23')]({'where':{'id':0x1},'defaults':{'data1':_0x47d66b}})[_0x294f('0x24')](function(_0x15ae52,_0x345422){logger[_0x294f('0x13')](_0x294f('0x25'),_0x47d66b);manageLicense(_0x47d66b,_0x15ae52);})[_0x294f('0x26')](function(_0xcef60a){logger[_0x294f('0x1f')](_0xcef60a['message']);});}}exports[_0x294f('0x27')]=defaultLicense;
\ No newline at end of file
index c3eecfc..76dcea3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x572a=['message','User','role','sequelize','COUNT','col','count','admin','user','telephone','users','telephones','forEach','catch','pick','countBy','License\x20limit\x20reached\x20for\x20users','License\x20limit\x20reached\x20for\x20telephones','exports','util','lodash','bluebird','../../components/encryptor','../../mysqldb','2027-01-01T00:00:00.000Z','Demo\x20license','getUuid','Breaking\x20license','License','find','defaults','then','uuid','data1','isEmpty','License\x20key\x20value\x20not\x20found','data2','split','decryptString','format','parse','demo','gray','add','days','grayReason','machineUuid','changed'];(function(_0x33925b,_0x95cfc6){var _0x375e21=function(_0x57c759){while(--_0x57c759){_0x33925b['push'](_0x33925b['shift']());}};_0x375e21(++_0x95cfc6);}(_0x572a,0x193));var _0xa572=function(_0xa383de,_0x147a59){_0xa383de=_0xa383de-0x0;var _0x508421=_0x572a[_0xa383de];return _0x508421;};'use strict';var util=require(_0xa572('0x0'));var _=require(_0xa572('0x1'));var moment=require('moment');var BPromise=require(_0xa572('0x2'));var hardware=require('./hardware');var encryptor=require(_0xa572('0x3'));var db=require(_0xa572('0x4'))['db'];const demoLicense={'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0xa572('0x5'),'chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'description':_0xa572('0x6'),'machineUuid':hardware[_0xa572('0x7')](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};const breakingLicense={'breaking':!![],'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':'2027-01-01T00:00:00.000Z','chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'update':![],'description':_0xa572('0x8'),'machineUuid':hardware[_0xa572('0x7')](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};function getLicense(_0x54bf1e){return new BPromise(function(_0x5f08a4,_0x172bf5){return db[_0xa572('0x9')][_0xa572('0xa')](_[_0xa572('0xb')](_0x54bf1e,{'raw':!![],'where':{'id':0x1}}))[_0xa572('0xc')](function(_0x589a01){return checkLicense(_0x589a01,null);})[_0xa572('0xc')](function(_0xa2593c){_0x5f08a4(_0xa2593c);return;})['catch'](function(_0x56c2c8){_0x172bf5(_0x56c2c8);});});}function checkLicense(_0x1553b2,_0x129283){if(!_0x1553b2){demoLicense[_0xa572('0xd')]=_0x1553b2[_0xa572('0xe')];return demoLicense;}try{var _0x180b83=_0x129283||_0x1553b2['license'];if(_[_0xa572('0xf')](_0x180b83)){throw new Error(_0xa572('0x10'));}var _0x4a6c11=_0x1553b2[_0xa572('0xe')];var _0x476032=_0x1553b2[_0xa572('0x11')];var _0xceac4=_0x4a6c11[_0xa572('0x12')]('-')[0x4];var _0x17cf24=_0x4a6c11[_0xa572('0x12')]('-')[0x0];var _0x32fc27=encryptor[_0xa572('0x13')](_0x180b83,util[_0xa572('0x14')]('%s:%s:%s',_0xceac4,_0x4a6c11,_0x17cf24));var _0x50f9b2=JSON[_0xa572('0x15')](_0x32fc27);_0x50f9b2[_0xa572('0x16')]=![];_0x50f9b2[_0xa572('0xd')]=_0x4a6c11;_0x50f9b2['machineUuid']=hardware[_0xa572('0x7')]();if(_0x476032){var _0x3dea88=encryptor[_0xa572('0x13')](_0x476032);_0x50f9b2[_0xa572('0x17')]=_0x3dea88;_0x50f9b2['deadline']=moment(_0x3dea88)[_0xa572('0x18')](0x7,_0xa572('0x19'))[_0xa572('0x14')]();_0x50f9b2[_0xa572('0x1a')]=_0x50f9b2[_0xa572('0xd')]!=_0x50f9b2[_0xa572('0x1b')]?_0xa572('0x1c'):'disabled';}return _0x50f9b2;}catch(_0x7d9814){breakingLicense[_0xa572('0xd')]=_0x1553b2['data1'];breakingLicense[_0xa572('0x1d')]=_0x7d9814[_0xa572('0x1d')];return breakingLicense;}}function getLimits(){return new BPromise(function(_0x12a65,_0x5133b6){getLicense()[_0xa572('0xc')](function(_0x13116c){return db[_0xa572('0x1e')]['findAll']({'attributes':[_0xa572('0x1f'),[db[_0xa572('0x20')]['fn'](_0xa572('0x21'),db['sequelize'][_0xa572('0x22')](_0xa572('0x1f'))),_0xa572('0x23')]],'group':'role','where':{'role':{'$or':[_0xa572('0x24'),_0xa572('0x25'),_0xa572('0x26')]}},'raw':!![]})[_0xa572('0xc')](function(_0x5f4184){var _0x3066d2={'user':_0x13116c[_0xa572('0x27')]||0x0,'telephone':_0x13116c[_0xa572('0x28')]||0x0};_0x5f4184[_0xa572('0x29')](function(_0x113b86){var _0x7f21c4=_0x113b86['role']===_0xa572('0x24')?_0xa572('0x25'):_0x113b86[_0xa572('0x1f')];_0x3066d2[_0x7f21c4]-=_0x113b86[_0xa572('0x23')];if(_0x3066d2[_0x7f21c4]<0x0)_0x3066d2[_0x7f21c4]=0x0;});_0x12a65(_0x3066d2);return;});})[_0xa572('0x2a')](function(_0x3cf390){_0x5133b6(_0x3cf390);});});}function checkUserLimits(_0x3a6ad1){return new BPromise(function(_0x599834,_0x27231e){getLimits()[_0xa572('0xc')](function(_0x1d1185){var _0x399774=_[_0xa572('0x2b')](_[_0xa572('0x2c')](_0x3a6ad1,_0xa572('0x1f')),[_0xa572('0x24'),_0xa572('0x25'),'telephone']);var _0x5082b4=(_0x399774['admin']||0x0)+(_0x399774[_0xa572('0x25')]||0x0);var _0xb26d6f=_0x399774[_0xa572('0x26')]||0x0;if(_0x5082b4>_0x1d1185['user'])return _0x27231e(_0xa572('0x2d'));if(_0xb26d6f>_0x1d1185['telephone'])return _0x27231e(_0xa572('0x2e'));return _0x599834();})[_0xa572('0x2a')](function(_0x100778){_0x27231e(_0x100778);});});}module[_0xa572('0x2f')]={'checkLicense':checkLicense,'checkUserLimits':checkUserLimits,'getLicense':getLicense};
\ No newline at end of file
+var _0xb08f=['then','catch','uuid','data1','isEmpty','data2','split','decryptString','format','parse','add','days','machineUuid','changed','disabled','message','User','findAll','role','sequelize','COUNT','col','count','admin','telephone','users','telephones','forEach','user','exports','util','moment','bluebird','../../components/encryptor','2027-01-01T00:00:00.000Z','Demo\x20license','getUuid','Breaking\x20license','find'];(function(_0x15d409,_0x16c2ee){var _0x379106=function(_0x3ab526){while(--_0x3ab526){_0x15d409['push'](_0x15d409['shift']());}};_0x379106(++_0x16c2ee);}(_0xb08f,0x6c));var _0xfb08=function(_0x5684e2,_0x1128d8){_0x5684e2=_0x5684e2-0x0;var _0x8ba338=_0xb08f[_0x5684e2];return _0x8ba338;};'use strict';var util=require(_0xfb08('0x0'));var _=require('lodash');var moment=require(_0xfb08('0x1'));var BPromise=require(_0xfb08('0x2'));var hardware=require('./hardware');var encryptor=require(_0xfb08('0x3'));var db=require('../../mysqldb')['db'];const demoLicense={'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':_0xfb08('0x4'),'chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'description':_0xfb08('0x5'),'machineUuid':hardware[_0xfb08('0x6')](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};const breakingLicense={'breaking':!![],'demo':!![],'agents':0x2,'telephones':0x0,'users':0x1,'expiration':'2027-01-01T00:00:00.000Z','chat':![],'mail':![],'fax':![],'messaging':![],'whatsapp':![],'cm':![],'dialer':![],'jscripty':![],'openchannel':![],'callysquare':0x2,'webrtc':![],'jaws':![],'custom':![],'update':![],'description':_0xfb08('0x7'),'machineUuid':hardware[_0xfb08('0x6')](),'virtual':0x0,'voice':!![],'screenrecording':![],'preferred':![],'ai':![]};function getLicense(_0x352112){return new BPromise(function(_0x423c94,_0xfd052b){return db['License'][_0xfb08('0x8')](_['defaults'](_0x352112,{'raw':!![],'where':{'id':0x1}}))['then'](function(_0xa4b6e4){return checkLicense(_0xa4b6e4,null);})[_0xfb08('0x9')](function(_0x4ac67a){_0x423c94(_0x4ac67a);return;})[_0xfb08('0xa')](function(_0x1ae689){_0xfd052b(_0x1ae689);});});}function checkLicense(_0xe7bf5b,_0x10dd2c){if(!_0xe7bf5b){demoLicense[_0xfb08('0xb')]=_0xe7bf5b[_0xfb08('0xc')];return demoLicense;}try{var _0x2221bd=_0x10dd2c||_0xe7bf5b['license'];if(_[_0xfb08('0xd')](_0x2221bd)){throw new Error('License\x20key\x20value\x20not\x20found');}var _0x9cc754=_0xe7bf5b[_0xfb08('0xc')];var _0x417481=_0xe7bf5b[_0xfb08('0xe')];var _0x3b0675=_0x9cc754[_0xfb08('0xf')]('-')[0x4];var _0x1fcdda=_0x9cc754[_0xfb08('0xf')]('-')[0x0];var _0x46a20e=encryptor[_0xfb08('0x10')](_0x2221bd,util[_0xfb08('0x11')]('%s:%s:%s',_0x3b0675,_0x9cc754,_0x1fcdda));var _0x309def=JSON[_0xfb08('0x12')](_0x46a20e);_0x309def['demo']=![];_0x309def['uuid']=_0x9cc754;_0x309def['machineUuid']=hardware['getUuid']();if(_0x417481){var _0x2f95d1=encryptor['decryptString'](_0x417481);_0x309def['gray']=_0x2f95d1;_0x309def['deadline']=moment(_0x2f95d1)[_0xfb08('0x13')](0x7,_0xfb08('0x14'))['format']();_0x309def['grayReason']=_0x309def[_0xfb08('0xb')]!=_0x309def[_0xfb08('0x15')]?_0xfb08('0x16'):_0xfb08('0x17');}return _0x309def;}catch(_0x528c10){breakingLicense[_0xfb08('0xb')]=_0xe7bf5b[_0xfb08('0xc')];breakingLicense[_0xfb08('0x18')]=_0x528c10[_0xfb08('0x18')];return breakingLicense;}}function getLimits(){return new BPromise(function(_0x37c9df,_0x3c9992){getLicense()[_0xfb08('0x9')](function(_0x1163f9){return db[_0xfb08('0x19')][_0xfb08('0x1a')]({'attributes':[_0xfb08('0x1b'),[db[_0xfb08('0x1c')]['fn'](_0xfb08('0x1d'),db[_0xfb08('0x1c')][_0xfb08('0x1e')](_0xfb08('0x1b'))),_0xfb08('0x1f')]],'group':'role','where':{'role':{'$or':[_0xfb08('0x20'),'user',_0xfb08('0x21')]}},'raw':!![]})[_0xfb08('0x9')](function(_0x41f8ff){var _0x2c1bbd={'user':_0x1163f9[_0xfb08('0x22')]||0x0,'telephone':_0x1163f9[_0xfb08('0x23')]||0x0};_0x41f8ff[_0xfb08('0x24')](function(_0x155a1d){var _0x5d7a67=_0x155a1d['role']===_0xfb08('0x20')?_0xfb08('0x25'):_0x155a1d['role'];_0x2c1bbd[_0x5d7a67]-=_0x155a1d[_0xfb08('0x1f')];if(_0x2c1bbd[_0x5d7a67]<0x0)_0x2c1bbd[_0x5d7a67]=0x0;});_0x37c9df(_0x2c1bbd);return;});})[_0xfb08('0xa')](function(_0x399710){_0x3c9992(_0x399710);});});}function checkUserLimits(_0x17c4bb){return new BPromise(function(_0x28ff10,_0x1aa0a0){getLimits()[_0xfb08('0x9')](function(_0x47c76b){var _0x57c365=_['pick'](_['countBy'](_0x17c4bb,_0xfb08('0x1b')),['admin','user',_0xfb08('0x21')]);var _0x4320c1=(_0x57c365[_0xfb08('0x20')]||0x0)+(_0x57c365[_0xfb08('0x25')]||0x0);var _0xce4591=_0x57c365[_0xfb08('0x21')]||0x0;if(_0x4320c1>_0x47c76b[_0xfb08('0x25')])return _0x1aa0a0('License\x20limit\x20reached\x20for\x20users');if(_0xce4591>_0x47c76b[_0xfb08('0x21')])return _0x1aa0a0('License\x20limit\x20reached\x20for\x20telephones');return _0x28ff10();})[_0xfb08('0xa')](function(_0x2f48a6){_0x1aa0a0(_0x2f48a6);});});}module[_0xfb08('0x26')]={'checkLicense':checkLicense,'checkUserLimits':checkUserLimits,'getLicense':getLicense};
\ No newline at end of file
index d1f8d60..e21c9b6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfcbb=['http://localhost:9000','myappanuglar-secret','exports'];(function(_0x5b89c7,_0x22994c){var _0x332b50=function(_0x2afacc){while(--_0x2afacc){_0x5b89c7['push'](_0x5b89c7['shift']());}};_0x332b50(++_0x22994c);}(_0xfcbb,0x10d));var _0xbfcb=function(_0x2bc527,_0x54af53){_0x2bc527=_0x2bc527-0x0;var _0x53f1ab=_0xfcbb[_0x2bc527];return _0x53f1ab;};'use strict';module[_0xbfcb('0x0')]={'DOMAIN':_0xbfcb('0x1'),'SESSION_SECRET':_0xbfcb('0x2'),'GOOGLE_ID':'app-id','GOOGLE_SECRET':'secret','DEBUG':''};
\ No newline at end of file
+var _0xfb11=['exports','myappanuglar-secret','app-id'];(function(_0x580576,_0x2f107d){var _0x3f55a0=function(_0x2e180b){while(--_0x2e180b){_0x580576['push'](_0x580576['shift']());}};_0x3f55a0(++_0x2f107d);}(_0xfb11,0x1ad));var _0x1fb1=function(_0xa1e3e3,_0x29fe0e){_0xa1e3e3=_0xa1e3e3-0x0;var _0xc980e9=_0xfb11[_0xa1e3e3];return _0xc980e9;};'use strict';module[_0x1fb1('0x0')]={'DOMAIN':'http://localhost:9000','SESSION_SECRET':_0x1fb1('0x1'),'GOOGLE_ID':_0x1fb1('0x2'),'GOOGLE_SECRET':'secret','DEBUG':''};
\ No newline at end of file
index f52c91f..9abdc4d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3caa=['exports','../utils/loggers','fileLogger'];(function(_0x104563,_0x14e611){var _0x52d11b=function(_0x4023a0){while(--_0x4023a0){_0x104563['push'](_0x104563['shift']());}};_0x52d11b(++_0x14e611);}(_0x3caa,0x11b));var _0xa3ca=function(_0x1a9a57,_0x3ef1d3){_0x1a9a57=_0x1a9a57-0x0;var _0x13c9b0=_0x3caa[_0x1a9a57];return _0x13c9b0;};'use strict';var fileLogger=require(_0xa3ca('0x0'))[_0xa3ca('0x1')];module[_0xa3ca('0x2')]=fileLogger;
\ No newline at end of file
+var _0x8c86=['fileLogger'];(function(_0x55c979,_0x36c5f0){var _0x690107=function(_0xa61dad){while(--_0xa61dad){_0x55c979['push'](_0x55c979['shift']());}};_0x690107(++_0x36c5f0);}(_0x8c86,0x1d3));var _0x68c8=function(_0x4b369d,_0x265eb8){_0x4b369d=_0x4b369d-0x0;var _0x571a98=_0x8c86[_0x4b369d];return _0x571a98;};'use strict';var fileLogger=require('../utils/loggers')[_0x68c8('0x0')];module['exports']=fileLogger;
\ No newline at end of file
index 9b228e7..f79ceb0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcf7e=['../../services/email/index.js','routing','../../services/routing/index.js','xdr','../../services/xdr/index.js','path','resolve','join','root','legacy-libs','../../services/express/index.js','ami','../../services/ami/index.js','../../services/agi/index.js','email'];(function(_0x25b9d5,_0x2222da){var _0x7898ad=function(_0x5611c6){while(--_0x5611c6){_0x25b9d5['push'](_0x25b9d5['shift']());}};_0x7898ad(++_0x2222da);}(_0xcf7e,0x18b));var _0xecf7=function(_0x1d9aa0,_0x272488){_0x1d9aa0=_0x1d9aa0-0x0;var _0x226868=_0xcf7e[_0x1d9aa0];return _0x226868;};'use strict';var path=require(_0xecf7('0x0'));var cfg=require('../../config/environment');var env={'NODE_PATH':path[_0xecf7('0x1')](path[_0xecf7('0x2')](cfg[_0xecf7('0x3')],_0xecf7('0x4')))};var pm2config={'apps':[{'name':'express','script':path['join'](__dirname,_0xecf7('0x5')),'env':env},{'name':_0xecf7('0x6'),'script':path[_0xecf7('0x2')](__dirname,_0xecf7('0x7')),'env':env},{'name':'agi','script':path[_0xecf7('0x2')](__dirname,_0xecf7('0x8')),'env':env},{'name':_0xecf7('0x9'),'script':path['join'](__dirname,_0xecf7('0xa')),'env':env},{'name':_0xecf7('0xb'),'script':path['join'](__dirname,_0xecf7('0xc')),'env':env},{'name':_0xecf7('0xd'),'script':path[_0xecf7('0x2')](__dirname,_0xecf7('0xe')),'env':env}]};module['exports']=pm2config;
\ No newline at end of file
+var _0x4fa4=['path','../../config/environment','join','root','legacy-libs','../../services/express/index.js','ami','agi','../../services/agi/index.js','../../services/email/index.js','routing','../../services/routing/index.js','xdr','../../services/xdr/index.js','exports'];(function(_0x5d3a05,_0x4add38){var _0x12141a=function(_0x388eec){while(--_0x388eec){_0x5d3a05['push'](_0x5d3a05['shift']());}};_0x12141a(++_0x4add38);}(_0x4fa4,0xc3));var _0x44fa=function(_0x88cd7b,_0x4c884c){_0x88cd7b=_0x88cd7b-0x0;var _0x56fcc8=_0x4fa4[_0x88cd7b];return _0x56fcc8;};'use strict';var path=require(_0x44fa('0x0'));var cfg=require(_0x44fa('0x1'));var env={'NODE_PATH':path['resolve'](path[_0x44fa('0x2')](cfg[_0x44fa('0x3')],_0x44fa('0x4')))};var pm2config={'apps':[{'name':'express','script':path[_0x44fa('0x2')](__dirname,_0x44fa('0x5')),'env':env},{'name':_0x44fa('0x6'),'script':path[_0x44fa('0x2')](__dirname,'../../services/ami/index.js'),'env':env},{'name':_0x44fa('0x7'),'script':path[_0x44fa('0x2')](__dirname,_0x44fa('0x8')),'env':env},{'name':'email','script':path[_0x44fa('0x2')](__dirname,_0x44fa('0x9')),'env':env},{'name':_0x44fa('0xa'),'script':path[_0x44fa('0x2')](__dirname,_0x44fa('0xb')),'env':env},{'name':_0x44fa('0xc'),'script':path[_0x44fa('0x2')](__dirname,_0x44fa('0xd')),'env':env}]};module[_0x44fa('0xe')]=pm2config;
\ No newline at end of file
index 2b2d4e9..453f108 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbcc8=['describe','delete','dump','saved','pm2','bluebird','./config','connect','start','disconnect','stop','restart','then','list'];(function(_0x18a6a6,_0x2141ff){var _0x4eaea2=function(_0x215282){while(--_0x215282){_0x18a6a6['push'](_0x18a6a6['shift']());}};_0x4eaea2(++_0x2141ff);}(_0xbcc8,0xd6));var _0x8bcc=function(_0x2e819c,_0x3f99a5){_0x2e819c=_0x2e819c-0x0;var _0x24e271=_0xbcc8[_0x2e819c];return _0x24e271;};'use strict';var pm2=require(_0x8bcc('0x0'));var BPromise=require(_0x8bcc('0x1'));var config=require(_0x8bcc('0x2'));function connect(){return new BPromise(function(_0x453d85,_0x457c37){return pm2[_0x8bcc('0x3')](function(_0x3e8098){if(_0x3e8098){return _0x457c37(_0x3e8098);}return _0x453d85('connected');});});};exports[_0x8bcc('0x4')]=function(_0x754986){return connect()['then'](function(){return new BPromise(function(_0x1a32de,_0x2b8740){return pm2['start'](_0x754986,function(_0x4816ea,_0x1081ce){if(_0x4816ea){return _0x2b8740(_0x4816ea);}pm2[_0x8bcc('0x5')]();return _0x1a32de(_0x1081ce);});});});};exports[_0x8bcc('0x6')]=function(_0x5e30b9){return connect()['then'](function(){return new BPromise(function(_0x37ad09,_0x285edd){return pm2[_0x8bcc('0x6')](_0x5e30b9,function(_0x901036,_0x2a5ad9){if(_0x901036){return _0x285edd(_0x901036);}pm2[_0x8bcc('0x5')]();return _0x37ad09(_0x2a5ad9);});});});};exports[_0x8bcc('0x7')]=function(_0x5d9a2a){return connect()[_0x8bcc('0x8')](function(){return new BPromise(function(_0x898a35,_0x251375){return pm2[_0x8bcc('0x7')](_0x5d9a2a,function(_0x563a11,_0x5c2c15){if(_0x563a11){return _0x251375(_0x563a11);}pm2[_0x8bcc('0x5')]();return _0x898a35(_0x5c2c15);});});});};exports[_0x8bcc('0x9')]=function(){return connect()[_0x8bcc('0x8')](function(){return new BPromise(function(_0x40137a,_0x2f9068){return pm2[_0x8bcc('0x9')](function(_0x2649df,_0x4b07bf){if(_0x2649df){return _0x2f9068(_0x2649df);}pm2[_0x8bcc('0x5')]();return _0x40137a(_0x4b07bf);});});});};exports[_0x8bcc('0xa')]=function(_0x795f91){return connect()[_0x8bcc('0x8')](function(){return new BPromise(function(_0x1665b2,_0x132bad){return pm2[_0x8bcc('0xa')](_0x795f91,function(_0x12caa6,_0x1b6e9e){if(_0x12caa6){return _0x132bad(_0x12caa6);}pm2['disconnect']();return _0x1665b2(_0x1b6e9e);});});});};exports[_0x8bcc('0xb')]=function(_0xc4c29){return connect()[_0x8bcc('0x8')](function(){return new BPromise(function(_0x4c6192,_0x2c7283){return pm2[_0x8bcc('0xb')](_0xc4c29,function(_0x165586,_0x370154){if(_0x165586){return _0x2c7283(_0x165586);}pm2[_0x8bcc('0x5')]();return _0x4c6192(_0x370154);});});});};exports[_0x8bcc('0xc')]=function(){return connect()[_0x8bcc('0x8')](function(){return new BPromise(function(_0x146ce4,_0x1cdf21){return pm2[_0x8bcc('0xc')](function(_0x29c304){if(_0x29c304){return _0x1cdf21(_0x29c304);}return _0x146ce4(_0x8bcc('0xd'));});});});};
\ No newline at end of file
+var _0xeb70=['pm2','./config','connect','connected','start','then','disconnect','stop','restart','list','describe','delete','dump','saved'];(function(_0x24403d,_0x94ebf1){var _0x3fabf3=function(_0x39b1a9){while(--_0x39b1a9){_0x24403d['push'](_0x24403d['shift']());}};_0x3fabf3(++_0x94ebf1);}(_0xeb70,0xd2));var _0x0eb7=function(_0x53771d,_0x20db45){_0x53771d=_0x53771d-0x0;var _0x110b90=_0xeb70[_0x53771d];return _0x110b90;};'use strict';var pm2=require(_0x0eb7('0x0'));var BPromise=require('bluebird');var config=require(_0x0eb7('0x1'));function connect(){return new BPromise(function(_0x31d9d0,_0x4915f5){return pm2[_0x0eb7('0x2')](function(_0x171088){if(_0x171088){return _0x4915f5(_0x171088);}return _0x31d9d0(_0x0eb7('0x3'));});});};exports[_0x0eb7('0x4')]=function(_0x3b2bc6){return connect()[_0x0eb7('0x5')](function(){return new BPromise(function(_0x487434,_0x4faaf2){return pm2[_0x0eb7('0x4')](_0x3b2bc6,function(_0x5a0769,_0x154d1d){if(_0x5a0769){return _0x4faaf2(_0x5a0769);}pm2[_0x0eb7('0x6')]();return _0x487434(_0x154d1d);});});});};exports[_0x0eb7('0x7')]=function(_0x396418){return connect()[_0x0eb7('0x5')](function(){return new BPromise(function(_0x323a9d,_0x24a606){return pm2['stop'](_0x396418,function(_0xbf149a,_0x319f39){if(_0xbf149a){return _0x24a606(_0xbf149a);}pm2[_0x0eb7('0x6')]();return _0x323a9d(_0x319f39);});});});};exports[_0x0eb7('0x8')]=function(_0x37a9b4){return connect()[_0x0eb7('0x5')](function(){return new BPromise(function(_0x975f18,_0x3eaffb){return pm2[_0x0eb7('0x8')](_0x37a9b4,function(_0x59a604,_0x2e22f7){if(_0x59a604){return _0x3eaffb(_0x59a604);}pm2[_0x0eb7('0x6')]();return _0x975f18(_0x2e22f7);});});});};exports[_0x0eb7('0x9')]=function(){return connect()[_0x0eb7('0x5')](function(){return new BPromise(function(_0x42708c,_0x230293){return pm2[_0x0eb7('0x9')](function(_0x50fac3,_0x3774fb){if(_0x50fac3){return _0x230293(_0x50fac3);}pm2[_0x0eb7('0x6')]();return _0x42708c(_0x3774fb);});});});};exports[_0x0eb7('0xa')]=function(_0x2e75a6){return connect()[_0x0eb7('0x5')](function(){return new BPromise(function(_0x21cb0c,_0x1c1c57){return pm2['describe'](_0x2e75a6,function(_0x49aed8,_0x5367df){if(_0x49aed8){return _0x1c1c57(_0x49aed8);}pm2[_0x0eb7('0x6')]();return _0x21cb0c(_0x5367df);});});});};exports[_0x0eb7('0xb')]=function(_0x5b330a){return connect()[_0x0eb7('0x5')](function(){return new BPromise(function(_0x472102,_0x1f8fb8){return pm2['delete'](_0x5b330a,function(_0x503555,_0x448cca){if(_0x503555){return _0x1f8fb8(_0x503555);}pm2[_0x0eb7('0x6')]();return _0x472102(_0x448cca);});});});};exports[_0x0eb7('0xc')]=function(){return connect()[_0x0eb7('0x5')](function(){return new BPromise(function(_0x2a4c9a,_0x10dfe6){return pm2[_0x0eb7('0xc')](function(_0x3f6e1d){if(_0x3f6e1d){return _0x10dfe6(_0x3f6e1d);}return _0x2a4c9a(_0x0eb7('0xd'));});});});};
\ No newline at end of file
index 8fb708e..9475f8b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x653c=['localhost','socket.io-emitter','Setting','find','chatTimeout','then','ChatInteraction','findAll','minutes','map','info','[CHAT]\x20Interactions\x20to\x20close:','join','update','timeout','format','YYYY-MM-DD\x20HH:mm:ss','length','[CHAT]\x20Sending\x20updates\x20for\x20interactions:','emit','catch','error','lodash','util','../../config/environment','../../mysqldb','../logger','schedule','defaults','redis'];(function(_0x135bf9,_0x119e39){var _0xac3247=function(_0x1ca227){while(--_0x1ca227){_0x135bf9['push'](_0x135bf9['shift']());}};_0xac3247(++_0x119e39);}(_0x653c,0xac));var _0xc653=function(_0x3edd38,_0x2ef02d){_0x3edd38=_0x3edd38-0x0;var _0x20926b=_0x653c[_0x3edd38];return _0x20926b;};'use strict';var _=require(_0xc653('0x0'));var moment=require('moment');var Redis=require('ioredis');var util=require(_0xc653('0x1'));var config=require(_0xc653('0x2'));var db=require(_0xc653('0x3'))['db'];var logger=require(_0xc653('0x4'))(_0xc653('0x5'));config['redis']=_[_0xc653('0x6')](config[_0xc653('0x7')],{'host':_0xc653('0x8'),'port':0x18eb});var io=require(_0xc653('0x9'))(new Redis(config['redis']));function closeInteractions(){var _0x18add1=0x0;var _0x45b6d5=[];return db[_0xc653('0xa')][_0xc653('0xb')]({'raw':!![],'attributes':['id',_0xc653('0xc')],'where':{'id':0x1}})[_0xc653('0xd')](function(_0x3b9954){_0x18add1=_0x3b9954[_0xc653('0xc')];if(_0x18add1){return db[_0xc653('0xe')][_0xc653('0xf')]({'raw':!![],'attributes':['id','lastMsgAt'],'where':{'closed':![],'lastMsgAt':{'$lt':moment()['subtract'](_0x3b9954[_0xc653('0xc')],_0xc653('0x10'))}}});}else{return[];}})[_0xc653('0xd')](function(_0x15e9ea){if(_0x15e9ea&&_0x15e9ea['length']){_0x45b6d5=_[_0xc653('0x11')](_0x15e9ea||[],'id');logger[_0xc653('0x12')](_0xc653('0x13'),_0x45b6d5[_0xc653('0x14')]());return db[_0xc653('0xe')][_0xc653('0x15')]({'closeReason':'system','disposition':_0xc653('0x16'),'closed':!![],'closedAt':moment()[_0xc653('0x17')](_0xc653('0x18'))},{'where':{'id':_0x45b6d5}});}})[_0xc653('0xd')](function(){if(_0x45b6d5&&_0x45b6d5[_0xc653('0x19')]){logger[_0xc653('0x12')](_0xc653('0x1a'),_0x45b6d5[_0xc653('0x14')]());for(var _0x2db22d=0x0;_0x2db22d<_0x45b6d5[_0xc653('0x19')];_0x2db22d++){io[_0xc653('0x1b')]('chatInteraction:update',{'id':_0x45b6d5[_0x2db22d],'closed':!![]});}}})[_0xc653('0x1c')](function(_0x4b228b){logger[_0xc653('0x1d')]('[CHAT]\x20Error\x20closing\x20interactions',_0x4b228b?util['inspect'](_0x4b228b,{'showHidden':![],'depth':null}):'');});}exports['start']=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();};
\ No newline at end of file
+var _0x59d6=['util','../../mysqldb','../logger','schedule','defaults','redis','socket.io-emitter','Setting','find','chatTimeout','then','ChatInteraction','findAll','lastMsgAt','subtract','minutes','length','[CHAT]\x20Interactions\x20to\x20close:','join','update','system','timeout','format','YYYY-MM-DD\x20HH:mm:ss','[CHAT]\x20Sending\x20updates\x20for\x20interactions:','emit','chatInteraction:update','error','inspect','lodash','moment','ioredis'];(function(_0x58d3e7,_0x3baaec){var _0x1781dc=function(_0x46c86c){while(--_0x46c86c){_0x58d3e7['push'](_0x58d3e7['shift']());}};_0x1781dc(++_0x3baaec);}(_0x59d6,0xfd));var _0x659d=function(_0x138adb,_0x193fee){_0x138adb=_0x138adb-0x0;var _0x1b27f2=_0x59d6[_0x138adb];return _0x1b27f2;};'use strict';var _=require(_0x659d('0x0'));var moment=require(_0x659d('0x1'));var Redis=require(_0x659d('0x2'));var util=require(_0x659d('0x3'));var config=require('../../config/environment');var db=require(_0x659d('0x4'))['db'];var logger=require(_0x659d('0x5'))(_0x659d('0x6'));config['redis']=_[_0x659d('0x7')](config[_0x659d('0x8')],{'host':'localhost','port':0x18eb});var io=require(_0x659d('0x9'))(new Redis(config[_0x659d('0x8')]));function closeInteractions(){var _0xb316f=0x0;var _0x31be90=[];return db[_0x659d('0xa')][_0x659d('0xb')]({'raw':!![],'attributes':['id',_0x659d('0xc')],'where':{'id':0x1}})[_0x659d('0xd')](function(_0x2fb86e){_0xb316f=_0x2fb86e[_0x659d('0xc')];if(_0xb316f){return db[_0x659d('0xe')][_0x659d('0xf')]({'raw':!![],'attributes':['id',_0x659d('0x10')],'where':{'closed':![],'lastMsgAt':{'$lt':moment()[_0x659d('0x11')](_0x2fb86e[_0x659d('0xc')],_0x659d('0x12'))}}});}else{return[];}})[_0x659d('0xd')](function(_0x46d696){if(_0x46d696&&_0x46d696[_0x659d('0x13')]){_0x31be90=_['map'](_0x46d696||[],'id');logger['info'](_0x659d('0x14'),_0x31be90[_0x659d('0x15')]());return db[_0x659d('0xe')][_0x659d('0x16')]({'closeReason':_0x659d('0x17'),'disposition':_0x659d('0x18'),'closed':!![],'closedAt':moment()[_0x659d('0x19')](_0x659d('0x1a'))},{'where':{'id':_0x31be90}});}})[_0x659d('0xd')](function(){if(_0x31be90&&_0x31be90[_0x659d('0x13')]){logger['info'](_0x659d('0x1b'),_0x31be90[_0x659d('0x15')]());for(var _0x288833=0x0;_0x288833<_0x31be90['length'];_0x288833++){io[_0x659d('0x1c')](_0x659d('0x1d'),{'id':_0x31be90[_0x288833],'closed':!![]});}}})['catch'](function(_0x2529bd){logger[_0x659d('0x1e')]('[CHAT]\x20Error\x20closing\x20interactions',_0x2529bd?util[_0x659d('0x1f')](_0x2529bd,{'showHidden':![],'depth':null}):'');});}exports['start']=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();};
\ No newline at end of file
index 5a36d9a..428db1c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9786=['startAllRefreshIntervals','exports','../../api/cloudProvider/cloudProvider.oauth.js'];(function(_0x255c7e,_0x1260e4){var _0xd82dfd=function(_0x3f73df){while(--_0x3f73df){_0x255c7e['push'](_0x255c7e['shift']());}};_0xd82dfd(++_0x1260e4);}(_0x9786,0xc2));var _0x6978=function(_0x122903,_0x18737a){_0x122903=_0x122903-0x0;var _0x224427=_0x9786[_0x122903];return _0x224427;};'use strict';function start(){var _0x32e5a9=require(_0x6978('0x0'));return _0x32e5a9[_0x6978('0x1')]();}module[_0x6978('0x2')]={'intervals':{},'start':start};
\ No newline at end of file
+var _0x12a6=['exports','../../api/cloudProvider/cloudProvider.oauth.js','startAllRefreshIntervals'];(function(_0x243b59,_0x3f9495){var _0x3e1676=function(_0x354052){while(--_0x354052){_0x243b59['push'](_0x243b59['shift']());}};_0x3e1676(++_0x3f9495);}(_0x12a6,0xb5));var _0x612a=function(_0x3722b3,_0x18a764){_0x3722b3=_0x3722b3-0x0;var _0x4614ae=_0x12a6[_0x3722b3];return _0x4614ae;};'use strict';function start(){var _0x585956=require(_0x612a('0x0'));return _0x585956[_0x612a('0x1')]();}module[_0x612a('0x2')]={'intervals':{},'start':start};
\ No newline at end of file
index 42f8751..d5e8f74 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0cc9=['findAll','MailServerOut','CloudProvider','keys','jobs','map','toString','keyBy','length','exists','deleteJob','delete\x20cron','toRun','resolve','run\x20job','cron','active','isBetween','startAt','endAt','add','start','stop','update\x20cron','stop\x20cron','catch','path','moment','schedule','../../mysqldb','../../api/analyticCustomReport/analyticCustomReport.controller','../../api/analyticDefaultReport/analyticDefaultReport.controller','client','http','info','Try\x20to\x20send\x20a\x20mail\x20to','email','MailAccount','getSmtpOptions','name','Smtp','user','bcc','format','Report\x20%s\x20last\x20%s\x20%s','../../files/reports','%s.%s','basename','savename','extname','zip','join','existsSync','message','text','stringify','Sent','attachments','sendIfEmpty','then','error','error\x20mail','data','isNil','subtractNumber\x20null\x20or\x20undefined','subtractUnit','subtractUnit\x20null\x20or\x20undefined','subtract','subtractNumber','YYYY-MM-DD\x20HH:mm:ss','scheduled','DefaultReportId','exec\x20defaul\x20report\x20id:%s','runReport','CustomReportId','no\x20report\x20id','Schedule'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x0cc9,0x14e));var _0x90cc=function(_0x970068,_0x3e4142){_0x970068=_0x970068-0x0;var _0x51063d=_0x0cc9[_0x970068];return _0x51063d;};'use strict';var fs=require('fs');var util=require('util');var path=require(_0x90cc('0x0'));var _=require('lodash');var moment=require(_0x90cc('0x1'));var CronJobManager=require('cron-job-manager');var jayson=require('jayson/promise');var BPromise=require('bluebird');var logger=require('../logger')(_0x90cc('0x2'));var db=require(_0x90cc('0x3'))['db'];var analyticCustomReportController=require(_0x90cc('0x4'));var analyticDefaultReportController=require(_0x90cc('0x5'));var client=jayson[_0x90cc('0x6')][_0x90cc('0x7')]({'port':0x232b});var manager=new CronJobManager();function handleSendEmail(_0x179990,_0x2da203){return function(){logger[_0x90cc('0x8')](_0x90cc('0x9'),_0x179990[_0x90cc('0xa')]);var _0x8cf317=!![];var _0x4292c6=_0x179990[_0x90cc('0xb')][_0x90cc('0xc')]();var _0x2690b9={'account':_0x4292c6,'message':{'from':util['format']('\x22%s\x22\x20<%s>',_0x179990[_0x90cc('0xb')][_0x90cc('0xd')],_0x179990[_0x90cc('0xb')][_0x90cc('0xa')]||_0x179990[_0x90cc('0xb')][_0x90cc('0xe')][_0x90cc('0xf')]),'to':_0x179990[_0x90cc('0xa')],'cc':_0x179990['cc'],'bcc':_0x179990[_0x90cc('0x10')],'subject':util[_0x90cc('0x11')](_0x90cc('0x12'),_0x2da203[_0x90cc('0xd')],_0x179990['subtractNumber'],_0x179990['subtractUnit'])}};var _0xb56485=path['join'](__dirname,_0x90cc('0x13'));var _0x99d507=_0x2da203['savename'];var _0x5ecb58=util[_0x90cc('0x11')](_0x90cc('0x14'),path[_0x90cc('0x15')](_0x2da203[_0x90cc('0x16')],path[_0x90cc('0x17')](_0x2da203[_0x90cc('0x16')])),_0x90cc('0x18'));var _0x23b011=path[_0x90cc('0x19')](_0xb56485,_0x99d507);var _0x397bbc=path['join'](_0xb56485,_0x5ecb58);if(fs[_0x90cc('0x1a')](_0x23b011)){_0x2da203['status']='Sent';_0x2690b9[_0x90cc('0x1b')]['attachments']=[{'filename':_0x99d507,'path':_0x23b011}];_0x2690b9[_0x90cc('0x1b')][_0x90cc('0x1c')]=util[_0x90cc('0x11')]('Info\x20report:\x0a%s\x0aPlease\x20see\x20the\x20attachments\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20it.\x0a\x0a',JSON[_0x90cc('0x1d')](_0x2da203,null,0x2));}else if(fs[_0x90cc('0x1a')](_0x397bbc)){_0x2da203['status']=_0x90cc('0x1e');_0x2690b9[_0x90cc('0x1b')][_0x90cc('0x1f')]=[{'filename':_0x5ecb58,'path':_0x397bbc}];}else{_0x2690b9[_0x90cc('0x1b')][_0x90cc('0x1c')]='Report\x20empty\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20this\x20email.\x0a\x0a';if(!_0x179990[_0x90cc('0x20')]){_0x8cf317=![];logger[_0x90cc('0x8')]('empty\x20file,\x20email\x20not\x20sent');}}if(_0x8cf317){return client['request']('SendMail',_0x2690b9)[_0x90cc('0x21')](function(_0x11b6f5){if(_0x11b6f5[_0x90cc('0x22')]){return logger['error'](_0x90cc('0x23'),JSON['stringify'](_0x11b6f5));}return logger[_0x90cc('0x8')]('email\x20sent');})['catch'](function(_0x438875){return logger[_0x90cc('0x22')](_0x90cc('0x23'),JSON[_0x90cc('0x1d')](_0x438875));});}};}function handleError(){return function(_0x20f6ab){return logger[_0x90cc('0x22')](JSON['stringify'](_0x20f6ab));};}function handleResult(_0x2cf5d4){return function(_0x3f64f0){logger[_0x90cc('0x8')](_0x90cc('0x24'),JSON[_0x90cc('0x1d')](_0x3f64f0));if(_0x2cf5d4['MailAccount']&&_0x2cf5d4[_0x90cc('0xb')][_0x90cc('0xe')]&&!_[_0x90cc('0x25')](_0x2cf5d4[_0x90cc('0xa')])){setTimeout(handleSendEmail(_0x2cf5d4,_0x3f64f0),0x3c*0x3e8);}};}function handleJob(_0x35bac2){return function(){try{if(_[_0x90cc('0x25')](_0x35bac2['subtractNumber'])){return logger[_0x90cc('0x8')](_0x90cc('0x26'));}if(_['isNil'](_0x35bac2[_0x90cc('0x27')])){return logger[_0x90cc('0x8')](_0x90cc('0x28'));}var _0x549db1={'startDate':moment()[_0x90cc('0x29')](_0x35bac2[_0x90cc('0x2a')],_0x35bac2['subtractUnit'])['format'](_0x90cc('0x2b')),'endDate':moment()['format'](_0x90cc('0x2b')),'type':_0x90cc('0x2c'),'output':_0x35bac2['output'],'name':_0x35bac2['name']};if(!_[_0x90cc('0x25')](_0x35bac2[_0x90cc('0x2d')])){logger[_0x90cc('0x8')](_0x90cc('0x2e'),_0x35bac2[_0x90cc('0x2d')]);return analyticDefaultReportController[_0x90cc('0x2f')]({'id':_0x35bac2[_0x90cc('0x2d')]},_0x549db1)[_0x90cc('0x21')](handleResult(_0x35bac2))['catch'](handleError());}if(!_[_0x90cc('0x25')](_0x35bac2[_0x90cc('0x30')])){logger[_0x90cc('0x8')]('exec\x20custom\x20report\x20id:%s',_0x35bac2['CustomReportId']);return analyticCustomReportController[_0x90cc('0x2f')]({'id':_0x35bac2[_0x90cc('0x30')]},_0x549db1)[_0x90cc('0x21')](handleResult(_0x35bac2))['catch'](handleError());}}catch(_0x537daf){logger[_0x90cc('0x22')](JSON[_0x90cc('0x1d')](_0x537daf));}return logger['info'](_0x90cc('0x31'));};}function getJobs(_0x51e2f5){var _0x6c598a={};if(_0x51e2f5){_0x6c598a['id']=_0x51e2f5;}return db[_0x90cc('0x32')][_0x90cc('0x33')]({'where':_0x6c598a,'include':[{'model':db[_0x90cc('0xb')],'attributes':['id',_0x90cc('0xd'),_0x90cc('0xa')],'include':[{'model':db[_0x90cc('0x34')],'as':_0x90cc('0xe'),'include':[{'model':db[_0x90cc('0x35')],'as':_0x90cc('0x35')}]}]}]})[_0x90cc('0x21')](function(_0x9160f6){var _0x4a69f8=_[_0x90cc('0x36')](manager[_0x90cc('0x37')]);var _0x2f87ef=_[_0x90cc('0x38')](_0x9160f6,function(_0x20afce){return _0x20afce['id'][_0x90cc('0x39')]();});var _0x8cad1c=_[_0x90cc('0x3a')](_0x9160f6,function(_0x5644c7){return _0x5644c7['id']['toString']();});var _0x3cb1d8=_0x51e2f5?_0x2f87ef:_['difference'](_0x2f87ef,_0x4a69f8);var _0x5875bf=_['intersection'](_0x2f87ef,_0x4a69f8);var _0x235504=_['difference'](_0x4a69f8,_0x2f87ef);var _0x15ed91;var _0x56e6d8;for(_0x15ed91=0x0;_0x15ed91<_0x235504[_0x90cc('0x3b')]&&!_0x51e2f5;_0x15ed91+=0x1){_0x56e6d8=_0x235504[_0x15ed91][_0x90cc('0x39')]();if(manager[_0x90cc('0x3c')](_0x56e6d8)){manager['stop'](_0x56e6d8);manager[_0x90cc('0x3d')](_0x56e6d8);logger[_0x90cc('0x8')](_0x90cc('0x3e'),_0x56e6d8);}}logger[_0x90cc('0x8')](_0x90cc('0x3f'),JSON[_0x90cc('0x1d')](_0x3cb1d8));for(_0x15ed91=0x0;_0x15ed91<_0x3cb1d8['length'];_0x15ed91+=0x1){_0x56e6d8=_0x3cb1d8[_0x15ed91][_0x90cc('0x39')]();logger[_0x90cc('0x8')]('index',_0x56e6d8);if(_0x51e2f5){logger[_0x90cc('0x8')]('my\x20id',_0x51e2f5);logger[_0x90cc('0x8')](JSON[_0x90cc('0x1d')](_0x8cad1c[_0x56e6d8]));BPromise[_0x90cc('0x40')]()[_0x90cc('0x21')](handleJob(_0x8cad1c[_0x56e6d8]));logger['info'](_0x90cc('0x41'),_0x8cad1c[_0x56e6d8][_0x90cc('0xd')],_0x8cad1c[_0x56e6d8][_0x90cc('0x42')]);}else if(_0x8cad1c[_0x56e6d8]['cron']&&_0x8cad1c[_0x56e6d8][_0x90cc('0x43')]&&moment()[_0x90cc('0x44')](_0x8cad1c[_0x56e6d8][_0x90cc('0x45')],_0x8cad1c[_0x56e6d8][_0x90cc('0x46')])){manager[_0x90cc('0x47')](_0x56e6d8,_0x8cad1c[_0x56e6d8]['cron'],handleJob(_0x8cad1c[_0x56e6d8]));manager[_0x90cc('0x48')](_0x56e6d8);logger[_0x90cc('0x8')]('add\x20cron',_0x8cad1c[_0x56e6d8]['name'],_0x8cad1c[_0x56e6d8][_0x90cc('0x42')]);}else if(manager['exists'](_0x56e6d8)){manager[_0x90cc('0x49')](_0x56e6d8);manager[_0x90cc('0x3d')](_0x56e6d8);logger[_0x90cc('0x8')]('stop\x20cron',_0x8cad1c[_0x56e6d8][_0x90cc('0xd')],_0x8cad1c[_0x56e6d8][_0x90cc('0x42')]);}}for(_0x15ed91=0x0,_0x56e6d8;_0x15ed91<_0x5875bf['length']&&!_0x51e2f5;_0x15ed91+=0x1){_0x56e6d8=_0x5875bf[_0x15ed91][_0x90cc('0x39')]();if(manager[_0x90cc('0x3c')](_0x56e6d8)){if(_0x8cad1c[_0x56e6d8][_0x90cc('0x42')]&&_0x8cad1c[_0x56e6d8][_0x90cc('0x43')]&&moment()[_0x90cc('0x44')](_0x8cad1c[_0x56e6d8][_0x90cc('0x45')],_0x8cad1c[_0x56e6d8][_0x90cc('0x46')])){manager['update'](_0x56e6d8,_0x8cad1c[_0x56e6d8][_0x90cc('0x42')],handleJob(_0x8cad1c[_0x56e6d8]));logger[_0x90cc('0x8')](_0x90cc('0x4a'),_0x8cad1c[_0x56e6d8][_0x90cc('0xd')],_0x8cad1c[_0x56e6d8][_0x90cc('0x42')]);}else{manager[_0x90cc('0x49')](_0x56e6d8);manager[_0x90cc('0x3d')](_0x56e6d8);logger[_0x90cc('0x8')](_0x90cc('0x4b'),_0x8cad1c[_0x56e6d8][_0x90cc('0xd')],_0x8cad1c[_0x56e6d8][_0x90cc('0x42')]);}}}})[_0x90cc('0x4c')](function(_0x1478c5){logger[_0x90cc('0x22')](JSON[_0x90cc('0x1d')](_0x1478c5));});}exports['run']=function(_0x796fa9){return getJobs(_0x796fa9);};exports[_0x90cc('0x48')]=function(){setInterval(function(){return getJobs();},0x3c*0x3e8);return getJobs();};
\ No newline at end of file
+var _0x596c=['util','path','lodash','moment','cron-job-manager','jayson/promise','bluebird','../logger','schedule','../../api/analyticCustomReport/analyticCustomReport.controller','../../api/analyticDefaultReport/analyticDefaultReport.controller','client','http','info','email','MailAccount','getSmtpOptions','format','\x22%s\x22\x20<%s>','name','user','bcc','Report\x20%s\x20last\x20%s\x20%s','subtractNumber','subtractUnit','../../files/reports','savename','extname','existsSync','attachments','message','text','Info\x20report:\x0a%s\x0aPlease\x20see\x20the\x20attachments\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20it.\x0a\x0a','stringify','status','Sent','empty\x20file,\x20email\x20not\x20sent','SendMail','then','error','email\x20sent','catch','error\x20mail','data','Smtp','isNil','subtractNumber\x20null\x20or\x20undefined','subtractUnit\x20null\x20or\x20undefined','subtract','YYYY-MM-DD\x20HH:mm:ss','scheduled','DefaultReportId','exec\x20defaul\x20report\x20id:%s','runReport','CustomReportId','no\x20report\x20id','Schedule','findAll','CloudProvider','map','toString','keyBy','difference','intersection','exists','deleteJob','delete\x20cron','toRun','my\x20id','run\x20job','cron','active','isBetween','add','start','add\x20cron','stop','stop\x20cron','length','startAt','update','update\x20cron'];(function(_0x524f89,_0x54b5d4){var _0x5ed0d3=function(_0x32ff6c){while(--_0x32ff6c){_0x524f89['push'](_0x524f89['shift']());}};_0x5ed0d3(++_0x54b5d4);}(_0x596c,0xa4));var _0xc596=function(_0x597265,_0x5418f1){_0x597265=_0x597265-0x0;var _0x5f4294=_0x596c[_0x597265];return _0x5f4294;};'use strict';var fs=require('fs');var util=require(_0xc596('0x0'));var path=require(_0xc596('0x1'));var _=require(_0xc596('0x2'));var moment=require(_0xc596('0x3'));var CronJobManager=require(_0xc596('0x4'));var jayson=require(_0xc596('0x5'));var BPromise=require(_0xc596('0x6'));var logger=require(_0xc596('0x7'))(_0xc596('0x8'));var db=require('../../mysqldb')['db'];var analyticCustomReportController=require(_0xc596('0x9'));var analyticDefaultReportController=require(_0xc596('0xa'));var client=jayson[_0xc596('0xb')][_0xc596('0xc')]({'port':0x232b});var manager=new CronJobManager();function handleSendEmail(_0x5648e8,_0x4f62dc){return function(){logger[_0xc596('0xd')]('Try\x20to\x20send\x20a\x20mail\x20to',_0x5648e8[_0xc596('0xe')]);var _0x3d6c7b=!![];var _0x38a209=_0x5648e8[_0xc596('0xf')][_0xc596('0x10')]();var _0x50bfe6={'account':_0x38a209,'message':{'from':util[_0xc596('0x11')](_0xc596('0x12'),_0x5648e8[_0xc596('0xf')][_0xc596('0x13')],_0x5648e8[_0xc596('0xf')][_0xc596('0xe')]||_0x5648e8[_0xc596('0xf')]['Smtp'][_0xc596('0x14')]),'to':_0x5648e8[_0xc596('0xe')],'cc':_0x5648e8['cc'],'bcc':_0x5648e8[_0xc596('0x15')],'subject':util[_0xc596('0x11')](_0xc596('0x16'),_0x4f62dc['name'],_0x5648e8[_0xc596('0x17')],_0x5648e8[_0xc596('0x18')])}};var _0x255881=path['join'](__dirname,_0xc596('0x19'));var _0x499e44=_0x4f62dc[_0xc596('0x1a')];var _0x41c72f=util[_0xc596('0x11')]('%s.%s',path['basename'](_0x4f62dc['savename'],path[_0xc596('0x1b')](_0x4f62dc[_0xc596('0x1a')])),'zip');var _0x2d16f8=path['join'](_0x255881,_0x499e44);var _0x10cd16=path['join'](_0x255881,_0x41c72f);if(fs[_0xc596('0x1c')](_0x2d16f8)){_0x4f62dc['status']='Sent';_0x50bfe6['message'][_0xc596('0x1d')]=[{'filename':_0x499e44,'path':_0x2d16f8}];_0x50bfe6[_0xc596('0x1e')][_0xc596('0x1f')]=util['format'](_0xc596('0x20'),JSON[_0xc596('0x21')](_0x4f62dc,null,0x2));}else if(fs[_0xc596('0x1c')](_0x10cd16)){_0x4f62dc[_0xc596('0x22')]=_0xc596('0x23');_0x50bfe6['message'][_0xc596('0x1d')]=[{'filename':_0x41c72f,'path':_0x10cd16}];}else{_0x50bfe6[_0xc596('0x1e')][_0xc596('0x1f')]='Report\x20empty\x0aThis\x20is\x20an\x20automatically\x20generated\x20email\x20–\x20please\x20do\x20not\x20reply\x20to\x20this\x20email.\x0a\x0a';if(!_0x5648e8['sendIfEmpty']){_0x3d6c7b=![];logger[_0xc596('0xd')](_0xc596('0x24'));}}if(_0x3d6c7b){return client['request'](_0xc596('0x25'),_0x50bfe6)[_0xc596('0x26')](function(_0x5dd2a9){if(_0x5dd2a9[_0xc596('0x27')]){return logger[_0xc596('0x27')]('error\x20mail',JSON[_0xc596('0x21')](_0x5dd2a9));}return logger['info'](_0xc596('0x28'));})[_0xc596('0x29')](function(_0x43aa6e){return logger[_0xc596('0x27')](_0xc596('0x2a'),JSON[_0xc596('0x21')](_0x43aa6e));});}};}function handleError(){return function(_0x2a7a16){return logger['error'](JSON[_0xc596('0x21')](_0x2a7a16));};}function handleResult(_0x269abe){return function(_0x367f3d){logger[_0xc596('0xd')](_0xc596('0x2b'),JSON[_0xc596('0x21')](_0x367f3d));if(_0x269abe['MailAccount']&&_0x269abe[_0xc596('0xf')][_0xc596('0x2c')]&&!_[_0xc596('0x2d')](_0x269abe['email'])){setTimeout(handleSendEmail(_0x269abe,_0x367f3d),0x3c*0x3e8);}};}function handleJob(_0x2db485){return function(){try{if(_['isNil'](_0x2db485[_0xc596('0x17')])){return logger['info'](_0xc596('0x2e'));}if(_[_0xc596('0x2d')](_0x2db485['subtractUnit'])){return logger[_0xc596('0xd')](_0xc596('0x2f'));}var _0x4e137f={'startDate':moment()[_0xc596('0x30')](_0x2db485['subtractNumber'],_0x2db485[_0xc596('0x18')])[_0xc596('0x11')]('YYYY-MM-DD\x20HH:mm:ss'),'endDate':moment()['format'](_0xc596('0x31')),'type':_0xc596('0x32'),'output':_0x2db485['output'],'name':_0x2db485[_0xc596('0x13')]};if(!_['isNil'](_0x2db485[_0xc596('0x33')])){logger[_0xc596('0xd')](_0xc596('0x34'),_0x2db485[_0xc596('0x33')]);return analyticDefaultReportController[_0xc596('0x35')]({'id':_0x2db485[_0xc596('0x33')]},_0x4e137f)[_0xc596('0x26')](handleResult(_0x2db485))[_0xc596('0x29')](handleError());}if(!_[_0xc596('0x2d')](_0x2db485['CustomReportId'])){logger[_0xc596('0xd')]('exec\x20custom\x20report\x20id:%s',_0x2db485[_0xc596('0x36')]);return analyticCustomReportController['runReport']({'id':_0x2db485['CustomReportId']},_0x4e137f)[_0xc596('0x26')](handleResult(_0x2db485))[_0xc596('0x29')](handleError());}}catch(_0x116a25){logger['error'](JSON[_0xc596('0x21')](_0x116a25));}return logger[_0xc596('0xd')](_0xc596('0x37'));};}function getJobs(_0x458750){var _0x43a0b5={};if(_0x458750){_0x43a0b5['id']=_0x458750;}return db[_0xc596('0x38')][_0xc596('0x39')]({'where':_0x43a0b5,'include':[{'model':db[_0xc596('0xf')],'attributes':['id','name',_0xc596('0xe')],'include':[{'model':db['MailServerOut'],'as':_0xc596('0x2c'),'include':[{'model':db[_0xc596('0x3a')],'as':_0xc596('0x3a')}]}]}]})[_0xc596('0x26')](function(_0x57d140){var _0x516da6=_['keys'](manager['jobs']);var _0x202c97=_[_0xc596('0x3b')](_0x57d140,function(_0x41dbc0){return _0x41dbc0['id'][_0xc596('0x3c')]();});var _0x35969d=_[_0xc596('0x3d')](_0x57d140,function(_0xe8f073){return _0xe8f073['id'][_0xc596('0x3c')]();});var _0x5b0495=_0x458750?_0x202c97:_[_0xc596('0x3e')](_0x202c97,_0x516da6);var _0x422242=_[_0xc596('0x3f')](_0x202c97,_0x516da6);var _0x108c8a=_[_0xc596('0x3e')](_0x516da6,_0x202c97);var _0x51259c;var _0x3e953d;for(_0x51259c=0x0;_0x51259c<_0x108c8a['length']&&!_0x458750;_0x51259c+=0x1){_0x3e953d=_0x108c8a[_0x51259c]['toString']();if(manager[_0xc596('0x40')](_0x3e953d)){manager['stop'](_0x3e953d);manager[_0xc596('0x41')](_0x3e953d);logger[_0xc596('0xd')](_0xc596('0x42'),_0x3e953d);}}logger[_0xc596('0xd')](_0xc596('0x43'),JSON[_0xc596('0x21')](_0x5b0495));for(_0x51259c=0x0;_0x51259c<_0x5b0495['length'];_0x51259c+=0x1){_0x3e953d=_0x5b0495[_0x51259c]['toString']();logger['info']('index',_0x3e953d);if(_0x458750){logger['info'](_0xc596('0x44'),_0x458750);logger[_0xc596('0xd')](JSON[_0xc596('0x21')](_0x35969d[_0x3e953d]));BPromise['resolve']()[_0xc596('0x26')](handleJob(_0x35969d[_0x3e953d]));logger[_0xc596('0xd')](_0xc596('0x45'),_0x35969d[_0x3e953d][_0xc596('0x13')],_0x35969d[_0x3e953d]['cron']);}else if(_0x35969d[_0x3e953d][_0xc596('0x46')]&&_0x35969d[_0x3e953d][_0xc596('0x47')]&&moment()[_0xc596('0x48')](_0x35969d[_0x3e953d]['startAt'],_0x35969d[_0x3e953d]['endAt'])){manager[_0xc596('0x49')](_0x3e953d,_0x35969d[_0x3e953d][_0xc596('0x46')],handleJob(_0x35969d[_0x3e953d]));manager[_0xc596('0x4a')](_0x3e953d);logger[_0xc596('0xd')](_0xc596('0x4b'),_0x35969d[_0x3e953d]['name'],_0x35969d[_0x3e953d][_0xc596('0x46')]);}else if(manager[_0xc596('0x40')](_0x3e953d)){manager[_0xc596('0x4c')](_0x3e953d);manager[_0xc596('0x41')](_0x3e953d);logger[_0xc596('0xd')](_0xc596('0x4d'),_0x35969d[_0x3e953d]['name'],_0x35969d[_0x3e953d][_0xc596('0x46')]);}}for(_0x51259c=0x0,_0x3e953d;_0x51259c<_0x422242[_0xc596('0x4e')]&&!_0x458750;_0x51259c+=0x1){_0x3e953d=_0x422242[_0x51259c]['toString']();if(manager['exists'](_0x3e953d)){if(_0x35969d[_0x3e953d][_0xc596('0x46')]&&_0x35969d[_0x3e953d][_0xc596('0x47')]&&moment()[_0xc596('0x48')](_0x35969d[_0x3e953d][_0xc596('0x4f')],_0x35969d[_0x3e953d]['endAt'])){manager[_0xc596('0x50')](_0x3e953d,_0x35969d[_0x3e953d][_0xc596('0x46')],handleJob(_0x35969d[_0x3e953d]));logger[_0xc596('0xd')](_0xc596('0x51'),_0x35969d[_0x3e953d][_0xc596('0x13')],_0x35969d[_0x3e953d][_0xc596('0x46')]);}else{manager[_0xc596('0x4c')](_0x3e953d);manager[_0xc596('0x41')](_0x3e953d);logger[_0xc596('0xd')]('stop\x20cron',_0x35969d[_0x3e953d][_0xc596('0x13')],_0x35969d[_0x3e953d]['cron']);}}}})[_0xc596('0x29')](function(_0x4df4fc){logger[_0xc596('0x27')](JSON[_0xc596('0x21')](_0x4df4fc));});}exports['run']=function(_0x441076){return getJobs(_0x441076);};exports['start']=function(){setInterval(function(){return getJobs();},0x3c*0x3e8);return getJobs();};
\ No newline at end of file
index f835dd0..59c2893 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xea5b=['length','transcript','update','[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated','tempSentiment','Sequelize','ValidationError','Sentiment\x20Analysis\x20not\x20requested','sentiment','sentimentRegion','language','bucket','Sentiment\x20Analysis\x20not\x20configured','Transcript\x20not\x20available','sentimentAccountId','CloudProvider','findOne','Cloud\x20Provider\x20not\x20available','Cloud\x20Provider\x20not\x20configured','[RECORDING:%d]\x20Sentiment\x20Analysis\x20available','Sentiment','SentimentScore','Positive','Negative','Mixed','Neutral','FAILED','FailureReason','[RECORDING:%d]\x20Transcript\x20Job\x20status\x20not\x20managed','catch','name','SequelizeValidationError','error','[RECORDING:%d]\x20Error\x20running\x20Transcribe\x20&\x20Sentiment\x20Analysis','inspect','VoiceRecording','IN_PROGRESS','No\x20transcribe\x20job\x20to\x20check','Setting','transcribeAccountId','transcribeRegion','Transcribe\x20not\x20configured','forEach','push','all','start','lodash','aws-sdk','request-promise','../../mysqldb','../../config/logger','transcribe','TranscribeService','getTranscriptionJob','Comprehend','detectSentiment','format','data1','data2','transcribeName','then','info','[RECORDING:%d]\x20Status\x20of\x20transcript\x20job\x20(%s):\x20%s','TranscriptionJob','TranscriptionJobStatus','fileText','COMPLETED','Transcript','TranscriptFileUri','[RECORDING:%d]\x20Get\x20transcript','[RECORDING:%d]\x20Transcript\x20downloaded','results','transcripts'];(function(_0x53b133,_0x176261){var _0x5647e0=function(_0x4c62b0){while(--_0x4c62b0){_0x53b133['push'](_0x53b133['shift']());}};_0x5647e0(++_0x176261);}(_0xea5b,0x152));var _0xbea5=function(_0x42bdad,_0x12836c){_0x42bdad=_0x42bdad-0x0;var _0x122626=_0xea5b[_0x42bdad];return _0x122626;};var _=require(_0xbea5('0x0'));var AWS=require(_0xbea5('0x1'));var rp=require(_0xbea5('0x2'));var util=require('util');var BPromise=require('bluebird');var db=require(_0xbea5('0x3'))['db'];var logger=require(_0xbea5('0x4'))(_0xbea5('0x5'));function getTranscriptionJob(_0x1ade68,_0x5233c0,_0x2027df,_0x4e020c){return new Promise(function(_0x2db67a,_0x3d9263){var _0xed9654=new AWS[(_0xbea5('0x6'))]({'accessKeyId':_0x5233c0,'secretAccessKey':_0x1ade68,'region':_0x2027df});_0xed9654[_0xbea5('0x7')]({'TranscriptionJobName':_0x4e020c},function(_0x126aae,_0x36692a){if(_0x126aae){return _0x3d9263(_0x126aae);}else{return _0x2db67a(_0x36692a);}});});}function sentiment(_0x2cb656,_0x41cb99,_0x1020e9,_0xae9042,_0x4741b0){return new Promise(function(_0x58253c,_0x5a9b2a){var _0x201686=new AWS[(_0xbea5('0x8'))]({'accessKeyId':_0x41cb99,'secretAccessKey':_0x2cb656,'region':_0x1020e9});_0x201686[_0xbea5('0x9')]({'Text':_0xae9042,'LanguageCode':_0x4741b0['substring'](0x0,0x2)},function(_0x370b05,_0x17a74c){if(_0x370b05){return _0x5a9b2a(_0x370b05);}else{return _0x58253c(_0x17a74c);}});});}function checkTranscribeJob(_0x4e9fb8,_0x2eb9c0,_0xa02bd){var _0x1026ab;return new BPromise(function(_0x2b7ed6,_0x56d34a){logger['info'](util[_0xbea5('0xa')]('[RECORDING:%d]\x20Get\x20status\x20for\x20transcript\x20job\x20(%s)',_0x4e9fb8['id'],_0x4e9fb8['transcribeName']));return getTranscriptionJob(_0xa02bd[_0xbea5('0xb')],_0xa02bd[_0xbea5('0xc')],_0x2eb9c0['transcribeRegion'],_0x4e9fb8[_0xbea5('0xd')])[_0xbea5('0xe')](function(_0x3889fa){logger[_0xbea5('0xf')](util[_0xbea5('0xa')](_0xbea5('0x10'),_0x4e9fb8['id'],_0x4e9fb8['transcribeName'],_0x3889fa[_0xbea5('0x11')][_0xbea5('0x12')]));if(!_0x4e9fb8[_0xbea5('0x13')]){switch(_0x3889fa['TranscriptionJob'][_0xbea5('0x12')]){case _0xbea5('0x14'):var _0x35b709={'transcribeStatus':_0x3889fa[_0xbea5('0x11')][_0xbea5('0x12')],'fileUri':_0x3889fa['TranscriptionJob'][_0xbea5('0x15')][_0xbea5('0x16')]};logger['info'](util[_0xbea5('0xa')](_0xbea5('0x17'),_0x4e9fb8['id']));return rp({'uri':_0x3889fa[_0xbea5('0x11')][_0xbea5('0x15')][_0xbea5('0x16')],'json':!![]})[_0xbea5('0xe')](function(_0x33a68e){logger[_0xbea5('0xf')](util['format'](_0xbea5('0x18'),_0x4e9fb8['id']));if(_0x33a68e&&_0x33a68e[_0xbea5('0x19')]&&_0x33a68e[_0xbea5('0x19')][_0xbea5('0x1a')]&&_0x33a68e[_0xbea5('0x19')][_0xbea5('0x1a')][_0xbea5('0x1b')]){_0x35b709[_0xbea5('0x13')]='';for(var _0x185ed3=0x0;_0x185ed3<_0x33a68e[_0xbea5('0x19')][_0xbea5('0x1a')][_0xbea5('0x1b')];_0x185ed3++){_0x35b709['fileText']+=_0x33a68e['results'][_0xbea5('0x1a')][_0x185ed3][_0xbea5('0x1c')]+'';}}return _0x4e9fb8[_0xbea5('0x1d')](_0x35b709);})[_0xbea5('0xe')](function(){logger[_0xbea5('0xf')](util[_0xbea5('0xa')](_0xbea5('0x1e'),_0x4e9fb8['id']));if(!_0x4e9fb8[_0xbea5('0x1f')]){throw new db[(_0xbea5('0x20'))][(_0xbea5('0x21'))](_0xbea5('0x22'));}if(!_0x2eb9c0[_0xbea5('0x23')]||!_0x2eb9c0['sentimentAccountId']||!_0x2eb9c0[_0xbea5('0x24')]||!_0x2eb9c0[_0xbea5('0x25')]||!_0x2eb9c0[_0xbea5('0x26')]){throw new db[(_0xbea5('0x20'))][(_0xbea5('0x21'))](_0xbea5('0x27'));}if(!_0x35b709[_0xbea5('0x13')]){throw new Error(_0xbea5('0x28'));}if(_0x2eb9c0[_0xbea5('0x29')]===_0xa02bd['id']){return _0xa02bd;}else{return db[_0xbea5('0x2a')][_0xbea5('0x2b')]({'where':{'id':_settings[_0xbea5('0x29')]}});}})[_0xbea5('0xe')](function(_0x8e089f){if(!_0x8e089f){throw new db['Sequelize'][(_0xbea5('0x21'))](_0xbea5('0x2c'));}if(!_0x8e089f['data1']||!_0x8e089f[_0xbea5('0xc')]){throw new db['Sequelize'][(_0xbea5('0x21'))](_0xbea5('0x2d'));}_0x1026ab=_0x8e089f;logger[_0xbea5('0xf')](util[_0xbea5('0xa')]('[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis',_0x4e9fb8['id']));return sentiment(_0x1026ab[_0xbea5('0xb')],_0x1026ab[_0xbea5('0xc')],_0x2eb9c0['sentimentRegion'],_0x35b709[_0xbea5('0x13')],_0x2eb9c0['language']);})[_0xbea5('0xe')](function(_0x3bb499){logger[_0xbea5('0xf')](util[_0xbea5('0xa')](_0xbea5('0x2e'),_0x4e9fb8['id']));return _0x4e9fb8[_0xbea5('0x1d')]({'sentiment':_0x3bb499[_0xbea5('0x2f')],'sPositive':_0x3bb499[_0xbea5('0x30')][_0xbea5('0x31')],'sNegative':_0x3bb499[_0xbea5('0x30')][_0xbea5('0x32')],'sMixed':_0x3bb499[_0xbea5('0x30')][_0xbea5('0x33')],'sNeutral':_0x3bb499[_0xbea5('0x30')][_0xbea5('0x34')]});})[_0xbea5('0xe')](function(){logger[_0xbea5('0xf')](util[_0xbea5('0xa')](_0xbea5('0x1e'),_0x4e9fb8['id']));_0x2b7ed6();});case _0xbea5('0x35'):return _0x4e9fb8['update']({'transcribeStatus':'FAILED','failureReason':_0x3889fa['TranscriptionJob'][_0xbea5('0x36')]})[_0xbea5('0xe')](function(){logger[_0xbea5('0xf')](util[_0xbea5('0xa')](_0xbea5('0x1e'),_0x4e9fb8['id']));_0x2b7ed6();});default:logger[_0xbea5('0xf')](util['format'](_0xbea5('0x37'),_0x4e9fb8['id']));break;}}else{return BPromise['resolve']()[_0xbea5('0xe')](function(){if(!_0x4e9fb8[_0xbea5('0x1f')]){throw new db[(_0xbea5('0x20'))][(_0xbea5('0x21'))](_0xbea5('0x22'));}if(!_0x2eb9c0['sentiment']||!_0x2eb9c0[_0xbea5('0x29')]||!_0x2eb9c0['sentimentRegion']||!_0x2eb9c0[_0xbea5('0x25')]||!_0x2eb9c0['bucket']){throw new db['Sequelize']['ValidationError'](_0xbea5('0x27'));}if(!_0x4e9fb8[_0xbea5('0x13')]){throw new Error(_0xbea5('0x28'));}if(_0x2eb9c0[_0xbea5('0x29')]===_0xa02bd['id']){return _0xa02bd;}else{return db[_0xbea5('0x2a')]['findOne']({'where':{'id':_settings[_0xbea5('0x29')]}});}})[_0xbea5('0xe')](function(_0x51e483){if(!_0x51e483){throw new db[(_0xbea5('0x20'))][(_0xbea5('0x21'))](_0xbea5('0x2c'));}if(!_0x51e483['data1']||!_0x51e483[_0xbea5('0xc')]){throw new db[(_0xbea5('0x20'))][(_0xbea5('0x21'))]('Cloud\x20Provider\x20not\x20configured');}_0x1026ab=_0x51e483;logger[_0xbea5('0xf')](util['format']('[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis',_0x4e9fb8['id']));return sentiment(_0x1026ab[_0xbea5('0xb')],_0x1026ab[_0xbea5('0xc')],_0x2eb9c0[_0xbea5('0x24')],_0x4e9fb8['fileText'],_0x2eb9c0['language']);})[_0xbea5('0xe')](function(_0x2808ed){logger['info'](util[_0xbea5('0xa')](_0xbea5('0x2e'),_0x4e9fb8['id']));return _0x4e9fb8[_0xbea5('0x1d')]({'sentiment':_0x2808ed['Sentiment'],'sPositive':_0x2808ed[_0xbea5('0x30')][_0xbea5('0x31')],'sNegative':_0x2808ed[_0xbea5('0x30')][_0xbea5('0x32')],'sMixed':_0x2808ed[_0xbea5('0x30')][_0xbea5('0x33')],'sNeutral':_0x2808ed[_0xbea5('0x30')][_0xbea5('0x34')],'transcribeStatus':_0xbea5('0x14')});})[_0xbea5('0xe')](function(){logger[_0xbea5('0xf')](util['format']('[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated',_0x4e9fb8['id']));_0x2b7ed6();});}})[_0xbea5('0x38')](function(_0x44f3b7){if(_0x44f3b7){if(!_0x44f3b7[_0xbea5('0x39')]||_0x44f3b7['name']!==_0xbea5('0x3a')){logger[_0xbea5('0x3b')](util[_0xbea5('0xa')](_0xbea5('0x3c'),_0x4e9fb8['id']),util[_0xbea5('0x3d')](_0x44f3b7,{'showHidden':![],'depth':null}));}}_0x2b7ed6();});});}function checkTranscribe(){var _0x4831d2;var _0x422682;var _0x27002d;return db[_0xbea5('0x3e')]['findAll']({'where':{'transcribeStatus':_0xbea5('0x3f')}})[_0xbea5('0xe')](function(_0x3b230b){if(!_0x3b230b||!_0x3b230b[_0xbea5('0x1b')]){throw new db['Sequelize'][(_0xbea5('0x21'))](_0xbea5('0x40'));}_0x4831d2=_0x3b230b;return db[_0xbea5('0x41')]['findOne']({'where':{'id':0x1}});})[_0xbea5('0xe')](function(_0x446a63){if(!_0x446a63){throw new db[(_0xbea5('0x20'))][(_0xbea5('0x21'))]('Settings\x20not\x20available');}_0x422682=_0x446a63;if(!_0x422682[_0xbea5('0x5')]||!_0x422682[_0xbea5('0x42')]||!_0x422682[_0xbea5('0x43')]||!_0x422682[_0xbea5('0x25')]||!_0x422682['bucket']){throw new db[(_0xbea5('0x20'))][(_0xbea5('0x21'))](_0xbea5('0x44'));}return db[_0xbea5('0x2a')][_0xbea5('0x2b')]({'where':{'id':_0x422682['transcribeAccountId']}});})[_0xbea5('0xe')](function(_0x5ef7a7){if(!_0x5ef7a7){throw new db['Sequelize'][(_0xbea5('0x21'))](_0xbea5('0x2c'));}if(!_0x5ef7a7[_0xbea5('0xb')]||!_0x5ef7a7['data2']){throw new db[(_0xbea5('0x20'))][(_0xbea5('0x21'))]('Cloud\x20Provider\x20not\x20configured');}_0x27002d=_0x5ef7a7;var _0x227f1c=[];_0x4831d2[_0xbea5('0x45')](function(_0x58eade){_0x227f1c[_0xbea5('0x46')](checkTranscribeJob(_0x58eade,_0x422682,_0x27002d));});return BPromise[_0xbea5('0x47')](_0x227f1c);})[_0xbea5('0x38')](function(_0x832614){if(_0x832614){if(!_0x832614[_0xbea5('0x39')]||_0x832614['name']!==_0xbea5('0x3a')){logger[_0xbea5('0x3b')](util[_0xbea5('0x3d')](_0x832614,{'showHidden':![],'depth':null}));}}});}exports[_0xbea5('0x48')]=function(){setInterval(function(){return checkTranscribe();},0x3c*0x3e8);return checkTranscribe();};
\ No newline at end of file
+var _0x3da6=['then','[RECORDING:%d]\x20Transcript\x20downloaded','results','transcripts','length','transcript','[RECORDING:%d]\x20Voice\x20Recording\x20entry\x20updated','tempSentiment','Sequelize','ValidationError','sentimentAccountId','sentimentRegion','language','bucket','Sentiment\x20Analysis\x20not\x20configured','CloudProvider','Cloud\x20Provider\x20not\x20available','[RECORDING:%d]\x20Sentiment\x20Analysis\x20available','update','Sentiment','SentimentScore','Positive','Mixed','Neutral','FAILED','FailureReason','[RECORDING:%d]\x20Transcript\x20Job\x20status\x20not\x20managed','resolve','Sentiment\x20Analysis\x20not\x20requested','Cloud\x20Provider\x20not\x20configured','[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis','Negative','name','SequelizeValidationError','error','inspect','VoiceRecording','findAll','IN_PROGRESS','No\x20transcribe\x20job\x20to\x20check','transcribeAccountId','Transcribe\x20not\x20configured','findOne','forEach','push','catch','start','lodash','aws-sdk','request-promise','util','bluebird','../../mysqldb','../../config/logger','TranscribeService','getTranscriptionJob','Comprehend','detectSentiment','substring','info','format','[RECORDING:%d]\x20Get\x20status\x20for\x20transcript\x20job\x20(%s)','transcribeName','data1','data2','transcribeRegion','[RECORDING:%d]\x20Status\x20of\x20transcript\x20job\x20(%s):\x20%s','TranscriptionJob','TranscriptionJobStatus','fileText','Transcript','TranscriptFileUri','[RECORDING:%d]\x20Get\x20transcript'];(function(_0x251fde,_0x384469){var _0x350af6=function(_0x15a6a3){while(--_0x15a6a3){_0x251fde['push'](_0x251fde['shift']());}};_0x350af6(++_0x384469);}(_0x3da6,0xc1));var _0x63da=function(_0x51e359,_0x329a75){_0x51e359=_0x51e359-0x0;var _0x4bd4c4=_0x3da6[_0x51e359];return _0x4bd4c4;};var _=require(_0x63da('0x0'));var AWS=require(_0x63da('0x1'));var rp=require(_0x63da('0x2'));var util=require(_0x63da('0x3'));var BPromise=require(_0x63da('0x4'));var db=require(_0x63da('0x5'))['db'];var logger=require(_0x63da('0x6'))('transcribe');function getTranscriptionJob(_0x425f2f,_0x43a687,_0x5bffe8,_0x36665d){return new Promise(function(_0x5592c4,_0x3f79f6){var _0x519714=new AWS[(_0x63da('0x7'))]({'accessKeyId':_0x43a687,'secretAccessKey':_0x425f2f,'region':_0x5bffe8});_0x519714[_0x63da('0x8')]({'TranscriptionJobName':_0x36665d},function(_0xbf0f63,_0x39a442){if(_0xbf0f63){return _0x3f79f6(_0xbf0f63);}else{return _0x5592c4(_0x39a442);}});});}function sentiment(_0x48c470,_0x352ed2,_0xdc10c4,_0x5a4f3d,_0x2d43f0){return new Promise(function(_0x5e052a,_0x181bdc){var _0x12ac78=new AWS[(_0x63da('0x9'))]({'accessKeyId':_0x352ed2,'secretAccessKey':_0x48c470,'region':_0xdc10c4});_0x12ac78[_0x63da('0xa')]({'Text':_0x5a4f3d,'LanguageCode':_0x2d43f0[_0x63da('0xb')](0x0,0x2)},function(_0x5006ad,_0x2a3fcc){if(_0x5006ad){return _0x181bdc(_0x5006ad);}else{return _0x5e052a(_0x2a3fcc);}});});}function checkTranscribeJob(_0x576ea2,_0x22b0aa,_0x1a228a){var _0x30d1bd;return new BPromise(function(_0x213d63,_0x276f6a){logger[_0x63da('0xc')](util[_0x63da('0xd')](_0x63da('0xe'),_0x576ea2['id'],_0x576ea2[_0x63da('0xf')]));return getTranscriptionJob(_0x1a228a[_0x63da('0x10')],_0x1a228a[_0x63da('0x11')],_0x22b0aa[_0x63da('0x12')],_0x576ea2[_0x63da('0xf')])['then'](function(_0x48ac11){logger[_0x63da('0xc')](util['format'](_0x63da('0x13'),_0x576ea2['id'],_0x576ea2[_0x63da('0xf')],_0x48ac11[_0x63da('0x14')][_0x63da('0x15')]));if(!_0x576ea2[_0x63da('0x16')]){switch(_0x48ac11['TranscriptionJob'][_0x63da('0x15')]){case'COMPLETED':var _0x5ace3f={'transcribeStatus':_0x48ac11[_0x63da('0x14')]['TranscriptionJobStatus'],'fileUri':_0x48ac11[_0x63da('0x14')][_0x63da('0x17')][_0x63da('0x18')]};logger['info'](util[_0x63da('0xd')](_0x63da('0x19'),_0x576ea2['id']));return rp({'uri':_0x48ac11['TranscriptionJob'][_0x63da('0x17')][_0x63da('0x18')],'json':!![]})[_0x63da('0x1a')](function(_0x24ae30){logger[_0x63da('0xc')](util[_0x63da('0xd')](_0x63da('0x1b'),_0x576ea2['id']));if(_0x24ae30&&_0x24ae30[_0x63da('0x1c')]&&_0x24ae30[_0x63da('0x1c')]['transcripts']&&_0x24ae30['results'][_0x63da('0x1d')][_0x63da('0x1e')]){_0x5ace3f[_0x63da('0x16')]='';for(var _0x45a021=0x0;_0x45a021<_0x24ae30[_0x63da('0x1c')][_0x63da('0x1d')]['length'];_0x45a021++){_0x5ace3f[_0x63da('0x16')]+=_0x24ae30[_0x63da('0x1c')][_0x63da('0x1d')][_0x45a021][_0x63da('0x1f')]+'';}}return _0x576ea2['update'](_0x5ace3f);})[_0x63da('0x1a')](function(){logger[_0x63da('0xc')](util[_0x63da('0xd')](_0x63da('0x20'),_0x576ea2['id']));if(!_0x576ea2[_0x63da('0x21')]){throw new db[(_0x63da('0x22'))][(_0x63da('0x23'))]('Sentiment\x20Analysis\x20not\x20requested');}if(!_0x22b0aa['sentiment']||!_0x22b0aa[_0x63da('0x24')]||!_0x22b0aa[_0x63da('0x25')]||!_0x22b0aa[_0x63da('0x26')]||!_0x22b0aa[_0x63da('0x27')]){throw new db[(_0x63da('0x22'))][(_0x63da('0x23'))](_0x63da('0x28'));}if(!_0x5ace3f[_0x63da('0x16')]){throw new Error('Transcript\x20not\x20available');}if(_0x22b0aa['sentimentAccountId']===_0x1a228a['id']){return _0x1a228a;}else{return db[_0x63da('0x29')]['findOne']({'where':{'id':_settings[_0x63da('0x24')]}});}})[_0x63da('0x1a')](function(_0x1df948){if(!_0x1df948){throw new db[(_0x63da('0x22'))][(_0x63da('0x23'))](_0x63da('0x2a'));}if(!_0x1df948[_0x63da('0x10')]||!_0x1df948[_0x63da('0x11')]){throw new db['Sequelize']['ValidationError']('Cloud\x20Provider\x20not\x20configured');}_0x30d1bd=_0x1df948;logger[_0x63da('0xc')](util['format']('[RECORDING:%d]\x20Requesting\x20sentiment\x20analysis',_0x576ea2['id']));return sentiment(_0x30d1bd[_0x63da('0x10')],_0x30d1bd[_0x63da('0x11')],_0x22b0aa[_0x63da('0x25')],_0x5ace3f[_0x63da('0x16')],_0x22b0aa[_0x63da('0x26')]);})['then'](function(_0x5240d0){logger[_0x63da('0xc')](util['format'](_0x63da('0x2b'),_0x576ea2['id']));return _0x576ea2[_0x63da('0x2c')]({'sentiment':_0x5240d0[_0x63da('0x2d')],'sPositive':_0x5240d0[_0x63da('0x2e')][_0x63da('0x2f')],'sNegative':_0x5240d0['SentimentScore']['Negative'],'sMixed':_0x5240d0['SentimentScore'][_0x63da('0x30')],'sNeutral':_0x5240d0[_0x63da('0x2e')][_0x63da('0x31')]});})[_0x63da('0x1a')](function(){logger['info'](util['format'](_0x63da('0x20'),_0x576ea2['id']));_0x213d63();});case _0x63da('0x32'):return _0x576ea2[_0x63da('0x2c')]({'transcribeStatus':_0x63da('0x32'),'failureReason':_0x48ac11[_0x63da('0x14')][_0x63da('0x33')]})[_0x63da('0x1a')](function(){logger['info'](util['format'](_0x63da('0x20'),_0x576ea2['id']));_0x213d63();});default:logger[_0x63da('0xc')](util[_0x63da('0xd')](_0x63da('0x34'),_0x576ea2['id']));break;}}else{return BPromise[_0x63da('0x35')]()[_0x63da('0x1a')](function(){if(!_0x576ea2['tempSentiment']){throw new db['Sequelize']['ValidationError'](_0x63da('0x36'));}if(!_0x22b0aa['sentiment']||!_0x22b0aa[_0x63da('0x24')]||!_0x22b0aa['sentimentRegion']||!_0x22b0aa[_0x63da('0x26')]||!_0x22b0aa[_0x63da('0x27')]){throw new db['Sequelize'][(_0x63da('0x23'))]('Sentiment\x20Analysis\x20not\x20configured');}if(!_0x576ea2[_0x63da('0x16')]){throw new Error('Transcript\x20not\x20available');}if(_0x22b0aa['sentimentAccountId']===_0x1a228a['id']){return _0x1a228a;}else{return db[_0x63da('0x29')]['findOne']({'where':{'id':_settings[_0x63da('0x24')]}});}})['then'](function(_0x4c8908){if(!_0x4c8908){throw new db['Sequelize'][(_0x63da('0x23'))](_0x63da('0x2a'));}if(!_0x4c8908['data1']||!_0x4c8908['data2']){throw new db[(_0x63da('0x22'))][(_0x63da('0x23'))](_0x63da('0x37'));}_0x30d1bd=_0x4c8908;logger[_0x63da('0xc')](util[_0x63da('0xd')](_0x63da('0x38'),_0x576ea2['id']));return sentiment(_0x30d1bd[_0x63da('0x10')],_0x30d1bd[_0x63da('0x11')],_0x22b0aa[_0x63da('0x25')],_0x576ea2[_0x63da('0x16')],_0x22b0aa[_0x63da('0x26')]);})[_0x63da('0x1a')](function(_0x4ab6a0){logger['info'](util['format'](_0x63da('0x2b'),_0x576ea2['id']));return _0x576ea2['update']({'sentiment':_0x4ab6a0[_0x63da('0x2d')],'sPositive':_0x4ab6a0[_0x63da('0x2e')][_0x63da('0x2f')],'sNegative':_0x4ab6a0[_0x63da('0x2e')][_0x63da('0x39')],'sMixed':_0x4ab6a0[_0x63da('0x2e')][_0x63da('0x30')],'sNeutral':_0x4ab6a0[_0x63da('0x2e')]['Neutral'],'transcribeStatus':'COMPLETED'});})['then'](function(){logger[_0x63da('0xc')](util[_0x63da('0xd')](_0x63da('0x20'),_0x576ea2['id']));_0x213d63();});}})['catch'](function(_0x3d4bdc){if(_0x3d4bdc){if(!_0x3d4bdc[_0x63da('0x3a')]||_0x3d4bdc[_0x63da('0x3a')]!==_0x63da('0x3b')){logger[_0x63da('0x3c')](util[_0x63da('0xd')]('[RECORDING:%d]\x20Error\x20running\x20Transcribe\x20&\x20Sentiment\x20Analysis',_0x576ea2['id']),util[_0x63da('0x3d')](_0x3d4bdc,{'showHidden':![],'depth':null}));}}_0x213d63();});});}function checkTranscribe(){var _0x2e59df;var _0x4a7e8d;var _0x1be74e;return db[_0x63da('0x3e')][_0x63da('0x3f')]({'where':{'transcribeStatus':_0x63da('0x40')}})[_0x63da('0x1a')](function(_0x1c08a8){if(!_0x1c08a8||!_0x1c08a8['length']){throw new db[(_0x63da('0x22'))]['ValidationError'](_0x63da('0x41'));}_0x2e59df=_0x1c08a8;return db['Setting']['findOne']({'where':{'id':0x1}});})[_0x63da('0x1a')](function(_0x18e42f){if(!_0x18e42f){throw new db['Sequelize'][(_0x63da('0x23'))]('Settings\x20not\x20available');}_0x4a7e8d=_0x18e42f;if(!_0x4a7e8d['transcribe']||!_0x4a7e8d[_0x63da('0x42')]||!_0x4a7e8d['transcribeRegion']||!_0x4a7e8d['language']||!_0x4a7e8d[_0x63da('0x27')]){throw new db[(_0x63da('0x22'))][(_0x63da('0x23'))](_0x63da('0x43'));}return db[_0x63da('0x29')][_0x63da('0x44')]({'where':{'id':_0x4a7e8d[_0x63da('0x42')]}});})[_0x63da('0x1a')](function(_0x3024c8){if(!_0x3024c8){throw new db[(_0x63da('0x22'))]['ValidationError'](_0x63da('0x2a'));}if(!_0x3024c8[_0x63da('0x10')]||!_0x3024c8[_0x63da('0x11')]){throw new db[(_0x63da('0x22'))][(_0x63da('0x23'))](_0x63da('0x37'));}_0x1be74e=_0x3024c8;var _0xd6b1b2=[];_0x2e59df[_0x63da('0x45')](function(_0x956c2a){_0xd6b1b2[_0x63da('0x46')](checkTranscribeJob(_0x956c2a,_0x4a7e8d,_0x1be74e));});return BPromise['all'](_0xd6b1b2);})[_0x63da('0x47')](function(_0xfe06fd){if(_0xfe06fd){if(!_0xfe06fd['name']||_0xfe06fd[_0x63da('0x3a')]!==_0x63da('0x3b')){logger[_0x63da('0x3c')](util[_0x63da('0x3d')](_0xfe06fd,{'showHidden':![],'depth':null}));}}});}exports[_0x63da('0x48')]=function(){setInterval(function(){return checkTranscribe();},0x3c*0x3e8);return checkTranscribe();};
\ No newline at end of file
index 9ff7e6f..46cc693 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2824=['subtract','hours','then','length','map','info','join','update','system','format','YYYY-MM-DD\x20HH:mm:ss','[WHATSAPP]\x20Sending\x20updates\x20for\x20interactions:','emit','error','[WHATSAPP]\x20Error\x20closing\x20interactions','inspect','start','lodash','ioredis','util','../../config/environment','../../mysqldb','schedule','redis','defaults','localhost','socket.io-emitter','WhatsappInteraction','findAll'];(function(_0x2655e5,_0x3cb9d4){var _0x191462=function(_0x6f1805){while(--_0x6f1805){_0x2655e5['push'](_0x2655e5['shift']());}};_0x191462(++_0x3cb9d4);}(_0x2824,0xbf));var _0x4282=function(_0x11b94a,_0x12a16a){_0x11b94a=_0x11b94a-0x0;var _0x5ca80b=_0x2824[_0x11b94a];return _0x5ca80b;};'use strict';var _=require(_0x4282('0x0'));var moment=require('moment');var Redis=require(_0x4282('0x1'));var util=require(_0x4282('0x2'));var config=require(_0x4282('0x3'));var db=require(_0x4282('0x4'))['db'];var logger=require('../logger')(_0x4282('0x5'));config[_0x4282('0x6')]=_[_0x4282('0x7')](config['redis'],{'host':_0x4282('0x8'),'port':0x18eb});var io=require(_0x4282('0x9'))(new Redis(config['redis']));function closeInteractions(){var _0x13b566=[];return db[_0x4282('0xa')][_0x4282('0xb')]({'raw':!![],'attributes':['id','lastMsgAt'],'where':{'closed':![],'lastMsgDirection':'in','lastMsgAt':{'$lt':moment()[_0x4282('0xc')](0x18,_0x4282('0xd'))}}})[_0x4282('0xe')](function(_0x40ab68){if(_0x40ab68&&_0x40ab68[_0x4282('0xf')]){_0x13b566=_[_0x4282('0x10')](_0x40ab68||[],'id');logger[_0x4282('0x11')]('[WHATSAPP]\x20Interactions\x20to\x20close:',_0x13b566[_0x4282('0x12')]());return db[_0x4282('0xa')][_0x4282('0x13')]({'closeReason':_0x4282('0x14'),'disposition':'timeout','closed':!![],'closedAt':moment()[_0x4282('0x15')](_0x4282('0x16'))},{'where':{'id':_0x13b566}});}})[_0x4282('0xe')](function(){if(_0x13b566&&_0x13b566[_0x4282('0xf')]){logger[_0x4282('0x11')](_0x4282('0x17'),_0x13b566[_0x4282('0x12')]());for(var _0x99930a=0x0;_0x99930a<_0x13b566['length'];_0x99930a++){io[_0x4282('0x18')]('whatsappInteraction:update',{'id':_0x13b566[_0x99930a],'closed':!![]});}}})['catch'](function(_0x53b159){logger[_0x4282('0x19')](_0x4282('0x1a'),_0x53b159?util[_0x4282('0x1b')](_0x53b159,{'showHidden':![],'depth':null}):'');});}exports[_0x4282('0x1c')]=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();};
\ No newline at end of file
+var _0xaf5a=['localhost','socket.io-emitter','redis','findAll','lastMsgAt','hours','then','length','map','[WHATSAPP]\x20Interactions\x20to\x20close:','join','update','system','format','YYYY-MM-DD\x20HH:mm:ss','info','[WHATSAPP]\x20Sending\x20updates\x20for\x20interactions:','whatsappInteraction:update','catch','error','[WHATSAPP]\x20Error\x20closing\x20interactions','inspect','start','moment','ioredis','../../config/environment','../../mysqldb','../logger','schedule','defaults'];(function(_0x20eb3d,_0x58c78b){var _0x2d1021=function(_0x2fa850){while(--_0x2fa850){_0x20eb3d['push'](_0x20eb3d['shift']());}};_0x2d1021(++_0x58c78b);}(_0xaf5a,0x71));var _0xaaf5=function(_0x21fc96,_0x2df0fe){_0x21fc96=_0x21fc96-0x0;var _0x2e00b0=_0xaf5a[_0x21fc96];return _0x2e00b0;};'use strict';var _=require('lodash');var moment=require(_0xaaf5('0x0'));var Redis=require(_0xaaf5('0x1'));var util=require('util');var config=require(_0xaaf5('0x2'));var db=require(_0xaaf5('0x3'))['db'];var logger=require(_0xaaf5('0x4'))(_0xaaf5('0x5'));config['redis']=_[_0xaaf5('0x6')](config['redis'],{'host':_0xaaf5('0x7'),'port':0x18eb});var io=require(_0xaaf5('0x8'))(new Redis(config[_0xaaf5('0x9')]));function closeInteractions(){var _0x37d9e3=[];return db['WhatsappInteraction'][_0xaaf5('0xa')]({'raw':!![],'attributes':['id',_0xaaf5('0xb')],'where':{'closed':![],'lastMsgDirection':'in','lastMsgAt':{'$lt':moment()['subtract'](0x18,_0xaaf5('0xc'))}}})[_0xaaf5('0xd')](function(_0x2c82f7){if(_0x2c82f7&&_0x2c82f7[_0xaaf5('0xe')]){_0x37d9e3=_[_0xaaf5('0xf')](_0x2c82f7||[],'id');logger['info'](_0xaaf5('0x10'),_0x37d9e3[_0xaaf5('0x11')]());return db['WhatsappInteraction'][_0xaaf5('0x12')]({'closeReason':_0xaaf5('0x13'),'disposition':'timeout','closed':!![],'closedAt':moment()[_0xaaf5('0x14')](_0xaaf5('0x15'))},{'where':{'id':_0x37d9e3}});}})[_0xaaf5('0xd')](function(){if(_0x37d9e3&&_0x37d9e3[_0xaaf5('0xe')]){logger[_0xaaf5('0x16')](_0xaaf5('0x17'),_0x37d9e3[_0xaaf5('0x11')]());for(var _0x30309c=0x0;_0x30309c<_0x37d9e3['length'];_0x30309c++){io['emit'](_0xaaf5('0x18'),{'id':_0x37d9e3[_0x30309c],'closed':!![]});}}})[_0xaaf5('0x19')](function(_0x380a5a){logger[_0xaaf5('0x1a')](_0xaaf5('0x1b'),_0x380a5a?util[_0xaaf5('0x1c')](_0x380a5a,{'showHidden':![],'depth':null}):'');});}exports[_0xaaf5('0x1d')]=function(){setInterval(function(){return closeInteractions();},0x3c*0x3e8);return closeInteractions();};
\ No newline at end of file
index f25756d..b969831 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1c33=['Biondo','@xcally.com','now','CmContact','bulkCreate','then','log','finished\x20populating','contacts1','CmHopper','hopper1','catch','util','../mysqldb','push','Innocenzo'];(function(_0x501510,_0x61caa9){var _0x1e6ee5=function(_0x32845b){while(--_0x32845b){_0x501510['push'](_0x501510['shift']());}};_0x1e6ee5(++_0x61caa9);}(_0x1c33,0x17c));var _0x31c3=function(_0x3369b2,_0x33da2f){_0x3369b2=_0x3369b2-0x0;var _0x518598=_0x1c33[_0x3369b2];return _0x518598;};'use strict';var util=require(_0x31c3('0x0'));var db=require(_0x31c3('0x1'))['db'];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=0x1;i<=0x4b0;i+=0x1){contacts[_0x31c3('0x2')]({'id':i,'firstName':_0x31c3('0x3')+i,'lastName':_0x31c3('0x4')+i,'phone':0xf879fb460+i,'email':'innocenzo.biondo'+i+_0x31c3('0x5')});}for(var i=0x1;i<=0x4b0;i+=0x1){hopper[_0x31c3('0x2')]({'id':i,'active':![],'scheduledat':Date[_0x31c3('0x6')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x31c3('0x6')](),'updatedAt':Date['now']()});}for(var i=0x4b1;i<=0x960;i+=0x1){contacts2[_0x31c3('0x2')]({'id':i,'firstName':'Innocenzo'+i,'lastName':_0x31c3('0x4')+i,'phone':0xf879fb460+i,'email':'innocenzo.biondo'+i+_0x31c3('0x5')});}for(var i=0x4b1;i<=0x960;i+=0x1){hopper2[_0x31c3('0x2')]({'id':i,'active':![],'scheduledat':Date[_0x31c3('0x6')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date['now'](),'updatedAt':Date['now']()});}db[_0x31c3('0x7')]['destroy']({'where':{}})['then'](function(){return db[_0x31c3('0x7')][_0x31c3('0x8')](contacts);})[_0x31c3('0x9')](function(){console[_0x31c3('0xa')](_0x31c3('0xb'),_0x31c3('0xc'));return db[_0x31c3('0xd')]['destroy']({'where':{}});})['then'](function(){return db[_0x31c3('0xd')][_0x31c3('0x8')](hopper);})[_0x31c3('0x9')](function(){console[_0x31c3('0xa')]('finished\x20populating',_0x31c3('0xe'));return db[_0x31c3('0x7')][_0x31c3('0x8')](contacts2);})['then'](function(){console[_0x31c3('0xa')](_0x31c3('0xb'),'contacts2');return db[_0x31c3('0xd')][_0x31c3('0x8')](hopper2);})[_0x31c3('0x9')](function(){console[_0x31c3('0xa')](_0x31c3('0xb'),'hopper2');})[_0x31c3('0xf')](function(_0x3c533f){console[_0x31c3('0xa')](_0x3c533f);});
\ No newline at end of file
+var _0x3e85=['now','innocenzo.biondo','CmContact','destroy','then','bulkCreate','log','finished\x20populating','contacts1','CmHopper','util','push','Innocenzo','Biondo'];(function(_0x55de41,_0x29e5d1){var _0x1117e3=function(_0x2dad7f){while(--_0x2dad7f){_0x55de41['push'](_0x55de41['shift']());}};_0x1117e3(++_0x29e5d1);}(_0x3e85,0x1bc));var _0x53e8=function(_0x5bfb00,_0x52ffc4){_0x5bfb00=_0x5bfb00-0x0;var _0x24885f=_0x3e85[_0x5bfb00];return _0x24885f;};'use strict';var util=require(_0x53e8('0x0'));var db=require('../mysqldb')['db'];var contacts=[];var hopper=[];var contacts2=[];var hopper2=[];for(var i=0x1;i<=0x4b0;i+=0x1){contacts[_0x53e8('0x1')]({'id':i,'firstName':_0x53e8('0x2')+i,'lastName':_0x53e8('0x3')+i,'phone':0xf879fb460+i,'email':'innocenzo.biondo'+i+'@xcally.com'});}for(var i=0x1;i<=0x4b0;i+=0x1){hopper[_0x53e8('0x1')]({'id':i,'active':![],'scheduledat':Date[_0x53e8('0x4')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x53e8('0x4')](),'updatedAt':Date[_0x53e8('0x4')]()});}for(var i=0x4b1;i<=0x960;i+=0x1){contacts2[_0x53e8('0x1')]({'id':i,'firstName':_0x53e8('0x2')+i,'lastName':_0x53e8('0x3')+i,'phone':0xf879fb460+i,'email':_0x53e8('0x5')+i+'@xcally.com'});}for(var i=0x4b1;i<=0x960;i+=0x1){hopper2[_0x53e8('0x1')]({'id':i,'active':![],'scheduledat':Date[_0x53e8('0x4')](),'countbusyretry':0x0,'countcongestionretry':0x0,'countnoanswerretry':0x0,'ContactId':i,'ListId':0x1,'UserId':0x1,'VoiceQueueId':0x3fd,'createdAt':Date[_0x53e8('0x4')](),'updatedAt':Date[_0x53e8('0x4')]()});}db[_0x53e8('0x6')][_0x53e8('0x7')]({'where':{}})[_0x53e8('0x8')](function(){return db['CmContact'][_0x53e8('0x9')](contacts);})[_0x53e8('0x8')](function(){console[_0x53e8('0xa')](_0x53e8('0xb'),_0x53e8('0xc'));return db[_0x53e8('0xd')][_0x53e8('0x7')]({'where':{}});})[_0x53e8('0x8')](function(){return db[_0x53e8('0xd')]['bulkCreate'](hopper);})[_0x53e8('0x8')](function(){console[_0x53e8('0xa')](_0x53e8('0xb'),'hopper1');return db[_0x53e8('0x6')][_0x53e8('0x9')](contacts2);})[_0x53e8('0x8')](function(){console[_0x53e8('0xa')](_0x53e8('0xb'),'contacts2');return db['CmHopper'][_0x53e8('0x9')](hopper2);})[_0x53e8('0x8')](function(){console[_0x53e8('0xa')](_0x53e8('0xb'),'hopper2');})['catch'](function(_0x3056bf){console[_0x53e8('0xa')](_0x3056bf);});
\ No newline at end of file
index 45767ef..93253a8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf4bb=['then','log','util','push','%s%s','agent','format','%s%s@xcally.com','friend','udp','wss','all','yes','/etc/pki/tls/certs/motion.crt','\x22%s\x22\x20<%s>','User','bulkCreate'];(function(_0x1ea8d6,_0xa196fa){var _0x11c74b=function(_0x2573cb){while(--_0x2573cb){_0x1ea8d6['push'](_0x1ea8d6['shift']());}};_0x11c74b(++_0xa196fa);}(_0xf4bb,0x8a));var _0xbf4b=function(_0xbe200f,_0x4b50eb){_0xbe200f=_0xbe200f-0x0;var _0x192597=_0xf4bb[_0xbe200f];return _0x192597;};'use strict';var util=require(_0xbf4b('0x0'));var db=require('../mysqldb')['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users[_0xbf4b('0x1')]({'name':util['format'](_0xbf4b('0x2'),_0xbf4b('0x3'),i),'fullname':util[_0xbf4b('0x4')]('%s%s','agent',i),'email':util[_0xbf4b('0x4')](_0xbf4b('0x5'),_0xbf4b('0x3'),i),'role':_0xbf4b('0x3'),'password':'password','internal':0xfa0+i,'type':_0xbf4b('0x6'),'transport':[_0xbf4b('0x7'),'ws',_0xbf4b('0x8')],'disallow':[_0xbf4b('0x9')],'allow':['ulaw'],'defaultuser':util[_0xbf4b('0x4')](_0xbf4b('0x2'),_0xbf4b('0x3'),i),'encryption':_0xbf4b('0xa'),'avpf':_0xbf4b('0xa'),'force_avp':_0xbf4b('0xa'),'icesupport':_0xbf4b('0xa'),'dtlsenable':_0xbf4b('0xa'),'dtlsverify':'no','dtlscertfile':_0xbf4b('0xb'),'dtlsprivatekey':'/etc/pki/tls/private/motion.key','dtlssetup':'actpass','callerid':util[_0xbf4b('0x4')](_0xbf4b('0xc'),util[_0xbf4b('0x4')](_0xbf4b('0x2'),'agent',i),0xfa0+i)});}db[_0xbf4b('0xd')][_0xbf4b('0xe')](users)[_0xbf4b('0xf')](function(){console[_0xbf4b('0x10')]('add\x20user');})['catch'](function(_0x5ee3b8){console[_0xbf4b('0x10')](_0x5ee3b8);});
\ No newline at end of file
+var _0xf20b=['catch','util','../mysqldb','%s%s','agent','format','%s%s@xcally.com','friend','udp','wss','all','ulaw','yes','/etc/pki/tls/certs/motion.crt','\x22%s\x22\x20<%s>','User','bulkCreate','then','log','add\x20user'];(function(_0x453f88,_0x47bc99){var _0x2a84d0=function(_0x48c61b){while(--_0x48c61b){_0x453f88['push'](_0x453f88['shift']());}};_0x2a84d0(++_0x47bc99);}(_0xf20b,0x1e1));var _0xbf20=function(_0x85e768,_0x3655c3){_0x85e768=_0x85e768-0x0;var _0x17c60d=_0xf20b[_0x85e768];return _0x17c60d;};'use strict';var util=require(_0xbf20('0x0'));var db=require(_0xbf20('0x1'))['db'];var users=[];for(var i=0x1;i<=0xc8;i+=0x1){users['push']({'name':util['format'](_0xbf20('0x2'),_0xbf20('0x3'),i),'fullname':util[_0xbf20('0x4')](_0xbf20('0x2'),_0xbf20('0x3'),i),'email':util[_0xbf20('0x4')](_0xbf20('0x5'),_0xbf20('0x3'),i),'role':'agent','password':'password','internal':0xfa0+i,'type':_0xbf20('0x6'),'transport':[_0xbf20('0x7'),'ws',_0xbf20('0x8')],'disallow':[_0xbf20('0x9')],'allow':[_0xbf20('0xa')],'defaultuser':util[_0xbf20('0x4')]('%s%s','agent',i),'encryption':_0xbf20('0xb'),'avpf':'yes','force_avp':'yes','icesupport':_0xbf20('0xb'),'dtlsenable':_0xbf20('0xb'),'dtlsverify':'no','dtlscertfile':_0xbf20('0xc'),'dtlsprivatekey':'/etc/pki/tls/private/motion.key','dtlssetup':'actpass','callerid':util['format'](_0xbf20('0xd'),util['format'](_0xbf20('0x2'),_0xbf20('0x3'),i),0xfa0+i)});}db[_0xbf20('0xe')][_0xbf20('0xf')](users)[_0xbf20('0x10')](function(){console[_0xbf20('0x11')](_0xbf20('0x12'));})[_0xbf20('0x13')](function(_0x12c0f6){console['log'](_0x12c0f6);});
\ No newline at end of file
index 9c1d2d5..f2fcd95 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8c8b=['where','Campaign','format','%s:queue:%s','length','user:%s','handshake','query','find','userProfileId','ChatInteractions','MailInteraction','FaxInteraction','FaxInteractions','SmsInteraction','OpenchannelInteractions','WhatsappInteraction','admin','voice:inbound','voice:outbound','hasOwnProperty','include','push','ChatQueue','SmsQueue','MailQueue','OpenchannelQueue','WhatsappQueue','Trunk','user','VoiceQueue','FaxQueue','WhatsappQueues','getChatQueues','getFaxQueues','getOpenchannelQueues','getWhatsappQueues','voice','fax','sms','mail','whatsapp','telephone:%s','campaign:%s:%s','leave','map','emit','user_has_chat_interactions:remove','MailInteractions','removeMailInteractions','user_has_mail_interactions:remove','removeFaxInteractions','user_has_fax_interactions:remove','SmsInteractions','user_has_sms_interactions:remove','removeOpenchannelInteractions','user_has_openchannel_interactions:remove','removeWhatsappInteractions','user_has_whatsapp_interactions:remove','catch','log','join','connection','setMaxListeners','address','remoteAddress','remotePort','connectedAt','disconnect','CONNECTED','lodash','../mysqldb','./environment','name','Agents','role','agent','telephone','type','ivr','UserProfileSection','findOne','then','autoAssociation','VoiceQueues','ChatQueues','FaxQueues','SmsQueues','MailQueues','OpenchannelQueues','findAll','Trunks','IvrCampaigns','UserProfileResource','resourceId','User'];(function(_0xf9631e,_0x245b8d){var _0x4eb467=function(_0x19e3c9){while(--_0x19e3c9){_0xf9631e['push'](_0xf9631e['shift']());}};_0x4eb467(++_0x245b8d);}(_0x8c8b,0x106));var _0xb8c8=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x8c8b[_0x122ef9];return _0x42fba0;};'use strict';var _=require(_0xb8c8('0x0'));var util=require('util');var BPromise=require('bluebird');var db=require(_0xb8c8('0x1'))['db'];var config=require(_0xb8c8('0x2'));var queryQueues={'attributes':['id',_0xb8c8('0x3')],'include':[{'as':_0xb8c8('0x4'),'model':db['User'],'attributes':['id','name',_0xb8c8('0x5')],'raw':!![],'where':{'role':_0xb8c8('0x6')},'required':![]}]};var queryTelephones={'raw':!![],'attributes':['id',_0xb8c8('0x3')],'where':{'role':_0xb8c8('0x7')}};var queryTrunks={'raw':!![],'attributes':['id',_0xb8c8('0x3')]};var queryAgents={'raw':!![],'attributes':['id',_0xb8c8('0x3')],'where':{'role':_0xb8c8('0x6')}};var queryCampaigns={'raw':!![],'attributes':['id',_0xb8c8('0x3'),_0xb8c8('0x8')],'where':{'type':_0xb8c8('0x9')}};function getAssociatedResources(_0x142007,_0x50834e,_0xfa7361){return db[_0xb8c8('0xa')][_0xb8c8('0xb')]({'where':{'name':_0x142007,'userProfileId':_0x50834e},'raw':!![]})[_0xb8c8('0xc')](function(_0x3c74d5){if(_0x3c74d5){if(_0x3c74d5[_0xb8c8('0xd')]){switch(_0x142007){case _0xb8c8('0xe'):case _0xb8c8('0xf'):case _0xb8c8('0x10'):case _0xb8c8('0x11'):case _0xb8c8('0x12'):case _0xb8c8('0x13'):case'WhatsappQueues':return db[_0xfa7361][_0xb8c8('0x14')](queryQueues);case'Telephones':return db[_0xfa7361][_0xb8c8('0x14')](queryTelephones);case _0xb8c8('0x15'):return db[_0xfa7361]['findAll'](queryTrunks);case _0xb8c8('0x16'):return db[_0xfa7361][_0xb8c8('0x14')](queryCampaigns);}}else{return db[_0xb8c8('0x17')]['findAll']({'attributes':[_0xb8c8('0x18')],'where':{'sectionId':_0x3c74d5['id']},'raw':!![]})[_0xb8c8('0xc')](function(_0x1c12c2){if(_0x1c12c2){var _0x1feec2={'where':{'id':_['map'](_0x1c12c2,_0xb8c8('0x18'))},'raw':!![]};switch(_0xfa7361){case _0xb8c8('0x19'):_0x1feec2[_0xb8c8('0x1a')][_0xb8c8('0x5')]='telephone';break;case _0xb8c8('0x1b'):_0x1feec2[_0xb8c8('0x1a')][_0xb8c8('0x8')]=_0xb8c8('0x9');break;}return db[_0xfa7361][_0xb8c8('0x14')](_0x1feec2);}else{return[];}});}}else{return[];}})[_0xb8c8('0xc')](function(_0x3c53bc){return _0x3c53bc;});}function joinOrLeaveQueues(_0x1d6bba,_0x355e6e,_0x2041e5,_0xe406d8){_0x1d6bba[_0x355e6e](util[_0xb8c8('0x1c')](_0xb8c8('0x1d'),_0x2041e5,_0xe406d8[_0xb8c8('0x3')]));if(_0xe406d8[_0xb8c8('0x4')]){for(var _0x4ebb45=0x0;_0x4ebb45<_0xe406d8[_0xb8c8('0x4')][_0xb8c8('0x1e')];_0x4ebb45+=0x1){_0x1d6bba[_0x355e6e](util[_0xb8c8('0x1c')](_0xb8c8('0x1f'),_0xe406d8[_0xb8c8('0x4')][_0x4ebb45]['name']));}}}function joinOrLeave(_0x18add8,_0x49ad09,_0x58d7c0){var _0x2b3629;if(_0x18add8[_0xb8c8('0x20')][_0xb8c8('0x21')]['id']){db[_0xb8c8('0x19')][_0xb8c8('0x22')]({'attributes':['id','name',_0xb8c8('0x5'),_0xb8c8('0x23')],'where':{'id':_0x18add8[_0xb8c8('0x20')][_0xb8c8('0x21')]['id']},'include':[{'model':db['ChatInteraction'],'as':_0xb8c8('0x24'),'attributes':['id'],'raw':!![]},{'model':db[_0xb8c8('0x25')],'as':'MailInteractions','attributes':['id'],'raw':!![]},{'model':db[_0xb8c8('0x26')],'as':_0xb8c8('0x27'),'attributes':['id'],'raw':!![]},{'model':db[_0xb8c8('0x28')],'as':'SmsInteractions','attributes':['id'],'raw':!![]},{'model':db['OpenchannelInteraction'],'as':_0xb8c8('0x29'),'attributes':['id'],'raw':!![]},{'model':db[_0xb8c8('0x2a')],'as':'WhatsappInteractions','attributes':['id'],'raw':!![]}]})[_0xb8c8('0xc')](function(_0x3599f5){if(_0x3599f5){_0x2b3629=_0x3599f5;_0x18add8[_0x49ad09](util['format'](_0xb8c8('0x1f'),_0x3599f5['name']));var _0x3f50c9=[];switch(_0x3599f5[_0xb8c8('0x5')]){case _0xb8c8('0x2b'):_0x18add8[_0x49ad09](_0xb8c8('0x2c'));_0x18add8[_0x49ad09](_0xb8c8('0x2d'));if(queryQueues[_0xb8c8('0x2e')](_0xb8c8('0x2f'))){delete queryQueues[_0xb8c8('0x2f')];}_0x3f50c9[_0xb8c8('0x30')](db['VoiceQueue'][_0xb8c8('0x14')](queryQueues));_0x3f50c9['push'](db[_0xb8c8('0x31')][_0xb8c8('0x14')](queryQueues));_0x3f50c9[_0xb8c8('0x30')](db['FaxQueue'][_0xb8c8('0x14')](queryQueues));_0x3f50c9[_0xb8c8('0x30')](db[_0xb8c8('0x32')][_0xb8c8('0x14')](queryQueues));_0x3f50c9[_0xb8c8('0x30')](db[_0xb8c8('0x33')][_0xb8c8('0x14')](queryQueues));_0x3f50c9[_0xb8c8('0x30')](db[_0xb8c8('0x34')][_0xb8c8('0x14')](queryQueues));_0x3f50c9['push'](db[_0xb8c8('0x35')][_0xb8c8('0x14')](queryQueues));_0x3f50c9[_0xb8c8('0x30')](db[_0xb8c8('0x19')][_0xb8c8('0x14')](queryTelephones));_0x3f50c9[_0xb8c8('0x30')](db[_0xb8c8('0x36')][_0xb8c8('0x14')](queryTrunks));_0x3f50c9['push'](db[_0xb8c8('0x1b')]['findAll'](queryCampaigns));_0x3f50c9[_0xb8c8('0x30')](db[_0xb8c8('0x19')][_0xb8c8('0x14')](queryAgents));break;case _0xb8c8('0x37'):_0x18add8[_0x49ad09](_0xb8c8('0x2c'));_0x18add8[_0x49ad09](_0xb8c8('0x2d'));_0x3f50c9['push'](getAssociatedResources(_0xb8c8('0xe'),_0x3599f5[_0xb8c8('0x23')],_0xb8c8('0x38')));_0x3f50c9[_0xb8c8('0x30')](getAssociatedResources(_0xb8c8('0xf'),_0x3599f5['userProfileId'],'ChatQueue'));_0x3f50c9[_0xb8c8('0x30')](getAssociatedResources(_0xb8c8('0x10'),_0x3599f5[_0xb8c8('0x23')],_0xb8c8('0x39')));_0x3f50c9[_0xb8c8('0x30')](getAssociatedResources(_0xb8c8('0x11'),_0x3599f5[_0xb8c8('0x23')],_0xb8c8('0x32')));_0x3f50c9[_0xb8c8('0x30')](getAssociatedResources('MailQueues',_0x3599f5[_0xb8c8('0x23')],'MailQueue'));_0x3f50c9[_0xb8c8('0x30')](getAssociatedResources(_0xb8c8('0x13'),_0x3599f5[_0xb8c8('0x23')],_0xb8c8('0x34')));_0x3f50c9[_0xb8c8('0x30')](getAssociatedResources(_0xb8c8('0x3a'),_0x3599f5[_0xb8c8('0x23')],_0xb8c8('0x35')));_0x3f50c9[_0xb8c8('0x30')](getAssociatedResources('Telephones',_0x3599f5[_0xb8c8('0x23')],_0xb8c8('0x19')));_0x3f50c9[_0xb8c8('0x30')](getAssociatedResources(_0xb8c8('0x15'),_0x3599f5[_0xb8c8('0x23')],_0xb8c8('0x36')));_0x3f50c9[_0xb8c8('0x30')](getAssociatedResources(_0xb8c8('0x16'),_0x3599f5[_0xb8c8('0x23')],_0xb8c8('0x1b')));_0x3f50c9[_0xb8c8('0x30')](db[_0xb8c8('0x19')][_0xb8c8('0x14')](queryAgents));break;case _0xb8c8('0x6'):_0x18add8[_0x49ad09](_0xb8c8('0x2c'));_0x18add8[_0x49ad09](_0xb8c8('0x2d'));_0x3f50c9[_0xb8c8('0x30')](_0x3599f5['getVoiceQueues']({'attributes':['id','name']}));_0x3f50c9[_0xb8c8('0x30')](_0x3599f5[_0xb8c8('0x3b')]({'attributes':['id',_0xb8c8('0x3')]}));_0x3f50c9[_0xb8c8('0x30')](_0x3599f5[_0xb8c8('0x3c')]({'attributes':['id',_0xb8c8('0x3')]}));_0x3f50c9[_0xb8c8('0x30')](_0x3599f5['getSmsQueues']({'attributes':['id',_0xb8c8('0x3')]}));_0x3f50c9['push'](_0x3599f5['getMailQueues']({'attributes':['id',_0xb8c8('0x3')]}));_0x3f50c9[_0xb8c8('0x30')](_0x3599f5[_0xb8c8('0x3d')]({'attributes':['id',_0xb8c8('0x3')]}));_0x3f50c9['push'](_0x3599f5[_0xb8c8('0x3e')]({'attributes':['id',_0xb8c8('0x3')]}));break;}return BPromise['all'](_0x3f50c9);}})[_0xb8c8('0xc')](function(_0x5bfec7){if(_0x5bfec7&&_0x5bfec7['length']){for(var _0x4c2716=0x0;_0x4c2716<_0x5bfec7[_0xb8c8('0x1e')];_0x4c2716+=0x1){for(var _0x231765=0x0;_0x231765<_0x5bfec7[_0x4c2716]['length'];_0x231765+=0x1){switch(_0x4c2716){case 0x0:joinOrLeaveQueues(_0x18add8,_0x49ad09,_0xb8c8('0x3f'),_0x5bfec7[_0x4c2716][_0x231765]);break;case 0x1:joinOrLeaveQueues(_0x18add8,_0x49ad09,'chat',_0x5bfec7[_0x4c2716][_0x231765]);break;case 0x2:joinOrLeaveQueues(_0x18add8,_0x49ad09,_0xb8c8('0x40'),_0x5bfec7[_0x4c2716][_0x231765]);break;case 0x3:joinOrLeaveQueues(_0x18add8,_0x49ad09,_0xb8c8('0x41'),_0x5bfec7[_0x4c2716][_0x231765]);break;case 0x4:joinOrLeaveQueues(_0x18add8,_0x49ad09,_0xb8c8('0x42'),_0x5bfec7[_0x4c2716][_0x231765]);break;case 0x5:joinOrLeaveQueues(_0x18add8,_0x49ad09,'openchannel',_0x5bfec7[_0x4c2716][_0x231765]);break;case 0x6:joinOrLeaveQueues(_0x18add8,_0x49ad09,_0xb8c8('0x43'),_0x5bfec7[_0x4c2716][_0x231765]);break;case 0x7:if(_0x2b3629[_0xb8c8('0x5')]!=='agent')_0x18add8[_0x49ad09](util[_0xb8c8('0x1c')](_0xb8c8('0x44'),_0x5bfec7[_0x4c2716][_0x231765][_0xb8c8('0x3')]));break;case 0x8:if(_0x2b3629[_0xb8c8('0x5')]!==_0xb8c8('0x6'))_0x18add8[_0x49ad09](util[_0xb8c8('0x1c')]('trunk:%s',_0x5bfec7[_0x4c2716][_0x231765][_0xb8c8('0x3')]));break;case 0x9:if(_0x2b3629['role']!==_0xb8c8('0x6'))_0x18add8[_0x49ad09](util['format'](_0xb8c8('0x45'),_0x5bfec7[_0x4c2716][_0x231765][_0xb8c8('0x8')],_0x5bfec7[_0x4c2716][_0x231765][_0xb8c8('0x3')]));break;case 0xa:_0x18add8[_0x49ad09](util['format']('user:%s',_0x5bfec7[_0x4c2716][_0x231765][_0xb8c8('0x3')]));break;}}}}})['then'](function(){if(_0x49ad09===_0xb8c8('0x46')){var _0x499369=_[_0xb8c8('0x47')](_0x2b3629[_0xb8c8('0x24')],'id');return _0x2b3629['removeChatInteractions'](_0x499369)[_0xb8c8('0xc')](function(){for(var _0x431f38=0x0;_0x431f38<_0x499369[_0xb8c8('0x1e')];_0x431f38+=0x1){_0x58d7c0[_0xb8c8('0x48')](_0xb8c8('0x49'),{'ChatInteractionId':Number(_0x499369[_0x431f38]),'UserId':Number(_0x2b3629['id'])});}});}})[_0xb8c8('0xc')](function(){if(_0x49ad09===_0xb8c8('0x46')){var _0x833429=_['map'](_0x2b3629[_0xb8c8('0x4a')],'id');return _0x2b3629[_0xb8c8('0x4b')](_0x833429)['then'](function(){for(var _0x4b2e2a=0x0;_0x4b2e2a<_0x833429[_0xb8c8('0x1e')];_0x4b2e2a+=0x1){_0x58d7c0[_0xb8c8('0x48')](_0xb8c8('0x4c'),{'MailInteractionId':Number(_0x833429[_0x4b2e2a]),'UserId':Number(_0x2b3629['id'])});}});}})[_0xb8c8('0xc')](function(){if(_0x49ad09===_0xb8c8('0x46')){var _0x4c7e3f=_['map'](_0x2b3629[_0xb8c8('0x27')],'id');return _0x2b3629[_0xb8c8('0x4d')](_0x4c7e3f)[_0xb8c8('0xc')](function(){for(var _0x54c3fe=0x0;_0x54c3fe<_0x4c7e3f[_0xb8c8('0x1e')];_0x54c3fe+=0x1){_0x58d7c0[_0xb8c8('0x48')](_0xb8c8('0x4e'),{'FaxInteractionId':Number(_0x4c7e3f[_0x54c3fe]),'UserId':Number(_0x2b3629['id'])});}});}})[_0xb8c8('0xc')](function(){if(_0x49ad09===_0xb8c8('0x46')){var _0x1f88d2=_[_0xb8c8('0x47')](_0x2b3629[_0xb8c8('0x4f')],'id');return _0x2b3629['removeSmsInteractions'](_0x1f88d2)['then'](function(){for(var _0x41ed5e=0x0;_0x41ed5e<_0x1f88d2[_0xb8c8('0x1e')];_0x41ed5e+=0x1){_0x58d7c0[_0xb8c8('0x48')](_0xb8c8('0x50'),{'SmsInteractionId':Number(_0x1f88d2[_0x41ed5e]),'UserId':Number(_0x2b3629['id'])});}});}})[_0xb8c8('0xc')](function(){if(_0x49ad09===_0xb8c8('0x46')){var _0x35b2f0=_['map'](_0x2b3629[_0xb8c8('0x29')],'id');return _0x2b3629[_0xb8c8('0x51')](_0x35b2f0)[_0xb8c8('0xc')](function(){for(var _0x275d18=0x0;_0x275d18<_0x35b2f0[_0xb8c8('0x1e')];_0x275d18+=0x1){_0x58d7c0[_0xb8c8('0x48')](_0xb8c8('0x52'),{'OpenchannelInteractionId':Number(_0x35b2f0[_0x275d18]),'UserId':Number(_0x2b3629['id'])});}});}})[_0xb8c8('0xc')](function(){if(_0x49ad09===_0xb8c8('0x46')){var _0x24e9db=_[_0xb8c8('0x47')](_0x2b3629['WhatsappInteractions'],'id');return _0x2b3629[_0xb8c8('0x53')](_0x24e9db)[_0xb8c8('0xc')](function(){for(var _0x32ea51=0x0;_0x32ea51<_0x24e9db[_0xb8c8('0x1e')];_0x32ea51+=0x1){_0x58d7c0[_0xb8c8('0x48')](_0xb8c8('0x54'),{'WhatsappInteractionId':Number(_0x24e9db[_0x32ea51]),'UserId':Number(_0x2b3629['id'])});}});}})[_0xb8c8('0x55')](function(_0x14c889){_0x18add8[_0xb8c8('0x56')](_0x14c889);});}}function onDisconnect(_0x48805f,_0x1bc468){joinOrLeave(_0x48805f,_0xb8c8('0x46'),_0x1bc468);}function onConnect(_0x55605a){joinOrLeave(_0x55605a,_0xb8c8('0x57'));}exports['default']=function(_0x3c9bb4){_0x3c9bb4['on'](_0xb8c8('0x58'),function(_0x10d058){_0x10d058[_0xb8c8('0x59')](0x0);_0x10d058[_0xb8c8('0x5a')]=_0x10d058['request']['connection'][_0xb8c8('0x5b')]+':'+_0x10d058['request'][_0xb8c8('0x58')][_0xb8c8('0x5c')];_0x10d058[_0xb8c8('0x5d')]=new Date();_0x10d058[_0xb8c8('0x56')]=function(_0x27c149){console['log']('SocketIO\x20'+_0x10d058['nsp'][_0xb8c8('0x3')]+'['+_0x10d058['address']+']',_0x27c149);};_0x10d058['on'](_0xb8c8('0x5e'),function(){onDisconnect(_0x10d058,_0x3c9bb4);_0x10d058[_0xb8c8('0x56')]('DISCONNECTED');});onConnect(_0x10d058);_0x10d058[_0xb8c8('0x56')](_0xb8c8('0x5f'));});};
\ No newline at end of file
+var _0x9300=['removeMailInteractions','user_has_mail_interactions:remove','removeFaxInteractions','user_has_fax_interactions:remove','removeSmsInteractions','user_has_sms_interactions:remove','removeOpenchannelInteractions','user_has_openchannel_interactions:remove','removeWhatsappInteractions','user_has_whatsapp_interactions:remove','catch','log','join','connection','setMaxListeners','address','request','remoteAddress','connectedAt','SocketIO\x20','nsp','disconnect','DISCONNECTED','CONNECTED','lodash','../mysqldb','./environment','name','Agents','User','role','agent','telephone','type','UserProfileSection','findOne','ChatQueues','FaxQueues','OpenchannelQueues','WhatsappQueues','findAll','Telephones','Trunks','UserProfileResource','resourceId','then','map','where','ivr','format','%s:queue:%s','handshake','query','userProfileId','ChatInteraction','MailInteraction','MailInteractions','FaxInteraction','FaxInteractions','SmsInteraction','SmsInteractions','OpenchannelInteraction','OpenchannelInteractions','WhatsappInteraction','WhatsappInteractions','user:%s','admin','hasOwnProperty','include','push','VoiceQueue','ChatQueue','FaxQueue','SmsQueue','MailQueue','OpenchannelQueue','WhatsappQueue','Trunk','Campaign','user','voice:inbound','voice:outbound','SmsQueues','MailQueues','IvrCampaigns','getChatQueues','getFaxQueues','getSmsQueues','getOpenchannelQueues','getWhatsappQueues','all','length','voice','chat','fax','sms','mail','openchannel','whatsapp','telephone:%s','ChatInteractions','removeChatInteractions','emit','user_has_chat_interactions:remove','leave'];(function(_0x37a0bd,_0x185f4d){var _0x15f426=function(_0x13eb69){while(--_0x13eb69){_0x37a0bd['push'](_0x37a0bd['shift']());}};_0x15f426(++_0x185f4d);}(_0x9300,0x153));var _0x0930=function(_0x222a4b,_0x3d53d2){_0x222a4b=_0x222a4b-0x0;var _0x2bedb3=_0x9300[_0x222a4b];return _0x2bedb3;};'use strict';var _=require(_0x0930('0x0'));var util=require('util');var BPromise=require('bluebird');var db=require(_0x0930('0x1'))['db'];var config=require(_0x0930('0x2'));var queryQueues={'attributes':['id',_0x0930('0x3')],'include':[{'as':_0x0930('0x4'),'model':db[_0x0930('0x5')],'attributes':['id','name',_0x0930('0x6')],'raw':!![],'where':{'role':_0x0930('0x7')},'required':![]}]};var queryTelephones={'raw':!![],'attributes':['id','name'],'where':{'role':_0x0930('0x8')}};var queryTrunks={'raw':!![],'attributes':['id',_0x0930('0x3')]};var queryAgents={'raw':!![],'attributes':['id',_0x0930('0x3')],'where':{'role':_0x0930('0x7')}};var queryCampaigns={'raw':!![],'attributes':['id',_0x0930('0x3'),_0x0930('0x9')],'where':{'type':'ivr'}};function getAssociatedResources(_0x4a7705,_0x31aaa2,_0x4b1994){return db[_0x0930('0xa')][_0x0930('0xb')]({'where':{'name':_0x4a7705,'userProfileId':_0x31aaa2},'raw':!![]})['then'](function(_0x6db8ef){if(_0x6db8ef){if(_0x6db8ef['autoAssociation']){switch(_0x4a7705){case'VoiceQueues':case _0x0930('0xc'):case _0x0930('0xd'):case'SmsQueues':case'MailQueues':case _0x0930('0xe'):case _0x0930('0xf'):return db[_0x4b1994][_0x0930('0x10')](queryQueues);case _0x0930('0x11'):return db[_0x4b1994][_0x0930('0x10')](queryTelephones);case _0x0930('0x12'):return db[_0x4b1994]['findAll'](queryTrunks);case'IvrCampaigns':return db[_0x4b1994]['findAll'](queryCampaigns);}}else{return db[_0x0930('0x13')]['findAll']({'attributes':[_0x0930('0x14')],'where':{'sectionId':_0x6db8ef['id']},'raw':!![]})[_0x0930('0x15')](function(_0x255988){if(_0x255988){var _0x3af83f={'where':{'id':_[_0x0930('0x16')](_0x255988,_0x0930('0x14'))},'raw':!![]};switch(_0x4b1994){case'User':_0x3af83f[_0x0930('0x17')][_0x0930('0x6')]='telephone';break;case'Campaign':_0x3af83f[_0x0930('0x17')][_0x0930('0x9')]=_0x0930('0x18');break;}return db[_0x4b1994][_0x0930('0x10')](_0x3af83f);}else{return[];}});}}else{return[];}})[_0x0930('0x15')](function(_0x4b1eb0){return _0x4b1eb0;});}function joinOrLeaveQueues(_0x19b4e4,_0x16c5fb,_0x4cf8ad,_0x1aa8bb){_0x19b4e4[_0x16c5fb](util[_0x0930('0x19')](_0x0930('0x1a'),_0x4cf8ad,_0x1aa8bb[_0x0930('0x3')]));if(_0x1aa8bb[_0x0930('0x4')]){for(var _0xea7c6c=0x0;_0xea7c6c<_0x1aa8bb['Agents']['length'];_0xea7c6c+=0x1){_0x19b4e4[_0x16c5fb](util[_0x0930('0x19')]('user:%s',_0x1aa8bb[_0x0930('0x4')][_0xea7c6c][_0x0930('0x3')]));}}}function joinOrLeave(_0x361264,_0x4aac18,_0x37e243){var _0x48bdf5;if(_0x361264[_0x0930('0x1b')][_0x0930('0x1c')]['id']){db['User']['find']({'attributes':['id',_0x0930('0x3'),_0x0930('0x6'),_0x0930('0x1d')],'where':{'id':_0x361264[_0x0930('0x1b')][_0x0930('0x1c')]['id']},'include':[{'model':db[_0x0930('0x1e')],'as':'ChatInteractions','attributes':['id'],'raw':!![]},{'model':db[_0x0930('0x1f')],'as':_0x0930('0x20'),'attributes':['id'],'raw':!![]},{'model':db[_0x0930('0x21')],'as':_0x0930('0x22'),'attributes':['id'],'raw':!![]},{'model':db[_0x0930('0x23')],'as':_0x0930('0x24'),'attributes':['id'],'raw':!![]},{'model':db[_0x0930('0x25')],'as':_0x0930('0x26'),'attributes':['id'],'raw':!![]},{'model':db[_0x0930('0x27')],'as':_0x0930('0x28'),'attributes':['id'],'raw':!![]}]})['then'](function(_0x2a47f2){if(_0x2a47f2){_0x48bdf5=_0x2a47f2;_0x361264[_0x4aac18](util['format'](_0x0930('0x29'),_0x2a47f2[_0x0930('0x3')]));var _0x2e21c7=[];switch(_0x2a47f2['role']){case _0x0930('0x2a'):_0x361264[_0x4aac18]('voice:inbound');_0x361264[_0x4aac18]('voice:outbound');if(queryQueues[_0x0930('0x2b')]('include')){delete queryQueues[_0x0930('0x2c')];}_0x2e21c7[_0x0930('0x2d')](db[_0x0930('0x2e')][_0x0930('0x10')](queryQueues));_0x2e21c7[_0x0930('0x2d')](db[_0x0930('0x2f')]['findAll'](queryQueues));_0x2e21c7['push'](db[_0x0930('0x30')][_0x0930('0x10')](queryQueues));_0x2e21c7[_0x0930('0x2d')](db[_0x0930('0x31')][_0x0930('0x10')](queryQueues));_0x2e21c7[_0x0930('0x2d')](db[_0x0930('0x32')][_0x0930('0x10')](queryQueues));_0x2e21c7['push'](db[_0x0930('0x33')][_0x0930('0x10')](queryQueues));_0x2e21c7[_0x0930('0x2d')](db[_0x0930('0x34')]['findAll'](queryQueues));_0x2e21c7[_0x0930('0x2d')](db[_0x0930('0x5')][_0x0930('0x10')](queryTelephones));_0x2e21c7[_0x0930('0x2d')](db[_0x0930('0x35')]['findAll'](queryTrunks));_0x2e21c7['push'](db[_0x0930('0x36')][_0x0930('0x10')](queryCampaigns));_0x2e21c7[_0x0930('0x2d')](db[_0x0930('0x5')][_0x0930('0x10')](queryAgents));break;case _0x0930('0x37'):_0x361264[_0x4aac18](_0x0930('0x38'));_0x361264[_0x4aac18](_0x0930('0x39'));_0x2e21c7[_0x0930('0x2d')](getAssociatedResources('VoiceQueues',_0x2a47f2[_0x0930('0x1d')],_0x0930('0x2e')));_0x2e21c7[_0x0930('0x2d')](getAssociatedResources(_0x0930('0xc'),_0x2a47f2[_0x0930('0x1d')],_0x0930('0x2f')));_0x2e21c7[_0x0930('0x2d')](getAssociatedResources(_0x0930('0xd'),_0x2a47f2[_0x0930('0x1d')],_0x0930('0x30')));_0x2e21c7[_0x0930('0x2d')](getAssociatedResources(_0x0930('0x3a'),_0x2a47f2[_0x0930('0x1d')],_0x0930('0x31')));_0x2e21c7[_0x0930('0x2d')](getAssociatedResources(_0x0930('0x3b'),_0x2a47f2['userProfileId'],'MailQueue'));_0x2e21c7['push'](getAssociatedResources(_0x0930('0xe'),_0x2a47f2[_0x0930('0x1d')],_0x0930('0x33')));_0x2e21c7[_0x0930('0x2d')](getAssociatedResources(_0x0930('0xf'),_0x2a47f2[_0x0930('0x1d')],_0x0930('0x34')));_0x2e21c7['push'](getAssociatedResources(_0x0930('0x11'),_0x2a47f2[_0x0930('0x1d')],_0x0930('0x5')));_0x2e21c7[_0x0930('0x2d')](getAssociatedResources(_0x0930('0x12'),_0x2a47f2['userProfileId'],_0x0930('0x35')));_0x2e21c7['push'](getAssociatedResources(_0x0930('0x3c'),_0x2a47f2[_0x0930('0x1d')],'Campaign'));_0x2e21c7[_0x0930('0x2d')](db[_0x0930('0x5')][_0x0930('0x10')](queryAgents));break;case _0x0930('0x7'):_0x361264[_0x4aac18]('voice:inbound');_0x361264[_0x4aac18](_0x0930('0x39'));_0x2e21c7[_0x0930('0x2d')](_0x2a47f2['getVoiceQueues']({'attributes':['id',_0x0930('0x3')]}));_0x2e21c7[_0x0930('0x2d')](_0x2a47f2[_0x0930('0x3d')]({'attributes':['id','name']}));_0x2e21c7[_0x0930('0x2d')](_0x2a47f2[_0x0930('0x3e')]({'attributes':['id',_0x0930('0x3')]}));_0x2e21c7[_0x0930('0x2d')](_0x2a47f2[_0x0930('0x3f')]({'attributes':['id',_0x0930('0x3')]}));_0x2e21c7[_0x0930('0x2d')](_0x2a47f2['getMailQueues']({'attributes':['id','name']}));_0x2e21c7[_0x0930('0x2d')](_0x2a47f2[_0x0930('0x40')]({'attributes':['id','name']}));_0x2e21c7[_0x0930('0x2d')](_0x2a47f2[_0x0930('0x41')]({'attributes':['id',_0x0930('0x3')]}));break;}return BPromise[_0x0930('0x42')](_0x2e21c7);}})['then'](function(_0x1b9af2){if(_0x1b9af2&&_0x1b9af2['length']){for(var _0x294e15=0x0;_0x294e15<_0x1b9af2[_0x0930('0x43')];_0x294e15+=0x1){for(var _0x2d6d40=0x0;_0x2d6d40<_0x1b9af2[_0x294e15][_0x0930('0x43')];_0x2d6d40+=0x1){switch(_0x294e15){case 0x0:joinOrLeaveQueues(_0x361264,_0x4aac18,_0x0930('0x44'),_0x1b9af2[_0x294e15][_0x2d6d40]);break;case 0x1:joinOrLeaveQueues(_0x361264,_0x4aac18,_0x0930('0x45'),_0x1b9af2[_0x294e15][_0x2d6d40]);break;case 0x2:joinOrLeaveQueues(_0x361264,_0x4aac18,_0x0930('0x46'),_0x1b9af2[_0x294e15][_0x2d6d40]);break;case 0x3:joinOrLeaveQueues(_0x361264,_0x4aac18,_0x0930('0x47'),_0x1b9af2[_0x294e15][_0x2d6d40]);break;case 0x4:joinOrLeaveQueues(_0x361264,_0x4aac18,_0x0930('0x48'),_0x1b9af2[_0x294e15][_0x2d6d40]);break;case 0x5:joinOrLeaveQueues(_0x361264,_0x4aac18,_0x0930('0x49'),_0x1b9af2[_0x294e15][_0x2d6d40]);break;case 0x6:joinOrLeaveQueues(_0x361264,_0x4aac18,_0x0930('0x4a'),_0x1b9af2[_0x294e15][_0x2d6d40]);break;case 0x7:if(_0x48bdf5[_0x0930('0x6')]!==_0x0930('0x7'))_0x361264[_0x4aac18](util[_0x0930('0x19')](_0x0930('0x4b'),_0x1b9af2[_0x294e15][_0x2d6d40][_0x0930('0x3')]));break;case 0x8:if(_0x48bdf5[_0x0930('0x6')]!=='agent')_0x361264[_0x4aac18](util[_0x0930('0x19')]('trunk:%s',_0x1b9af2[_0x294e15][_0x2d6d40][_0x0930('0x3')]));break;case 0x9:if(_0x48bdf5['role']!==_0x0930('0x7'))_0x361264[_0x4aac18](util[_0x0930('0x19')]('campaign:%s:%s',_0x1b9af2[_0x294e15][_0x2d6d40][_0x0930('0x9')],_0x1b9af2[_0x294e15][_0x2d6d40][_0x0930('0x3')]));break;case 0xa:_0x361264[_0x4aac18](util[_0x0930('0x19')](_0x0930('0x29'),_0x1b9af2[_0x294e15][_0x2d6d40][_0x0930('0x3')]));break;}}}}})['then'](function(){if(_0x4aac18==='leave'){var _0x50b47d=_[_0x0930('0x16')](_0x48bdf5[_0x0930('0x4c')],'id');return _0x48bdf5[_0x0930('0x4d')](_0x50b47d)[_0x0930('0x15')](function(){for(var _0x2ceb03=0x0;_0x2ceb03<_0x50b47d[_0x0930('0x43')];_0x2ceb03+=0x1){_0x37e243[_0x0930('0x4e')](_0x0930('0x4f'),{'ChatInteractionId':Number(_0x50b47d[_0x2ceb03]),'UserId':Number(_0x48bdf5['id'])});}});}})[_0x0930('0x15')](function(){if(_0x4aac18===_0x0930('0x50')){var _0x1d8124=_[_0x0930('0x16')](_0x48bdf5[_0x0930('0x20')],'id');return _0x48bdf5[_0x0930('0x51')](_0x1d8124)[_0x0930('0x15')](function(){for(var _0x58e812=0x0;_0x58e812<_0x1d8124['length'];_0x58e812+=0x1){_0x37e243['emit'](_0x0930('0x52'),{'MailInteractionId':Number(_0x1d8124[_0x58e812]),'UserId':Number(_0x48bdf5['id'])});}});}})[_0x0930('0x15')](function(){if(_0x4aac18===_0x0930('0x50')){var _0x38da03=_['map'](_0x48bdf5['FaxInteractions'],'id');return _0x48bdf5[_0x0930('0x53')](_0x38da03)[_0x0930('0x15')](function(){for(var _0x2d7ef2=0x0;_0x2d7ef2<_0x38da03[_0x0930('0x43')];_0x2d7ef2+=0x1){_0x37e243['emit'](_0x0930('0x54'),{'FaxInteractionId':Number(_0x38da03[_0x2d7ef2]),'UserId':Number(_0x48bdf5['id'])});}});}})[_0x0930('0x15')](function(){if(_0x4aac18===_0x0930('0x50')){var _0x3f47f2=_[_0x0930('0x16')](_0x48bdf5[_0x0930('0x24')],'id');return _0x48bdf5[_0x0930('0x55')](_0x3f47f2)[_0x0930('0x15')](function(){for(var _0x310199=0x0;_0x310199<_0x3f47f2[_0x0930('0x43')];_0x310199+=0x1){_0x37e243[_0x0930('0x4e')](_0x0930('0x56'),{'SmsInteractionId':Number(_0x3f47f2[_0x310199]),'UserId':Number(_0x48bdf5['id'])});}});}})[_0x0930('0x15')](function(){if(_0x4aac18===_0x0930('0x50')){var _0xda8945=_[_0x0930('0x16')](_0x48bdf5[_0x0930('0x26')],'id');return _0x48bdf5[_0x0930('0x57')](_0xda8945)[_0x0930('0x15')](function(){for(var _0x1297ab=0x0;_0x1297ab<_0xda8945[_0x0930('0x43')];_0x1297ab+=0x1){_0x37e243[_0x0930('0x4e')](_0x0930('0x58'),{'OpenchannelInteractionId':Number(_0xda8945[_0x1297ab]),'UserId':Number(_0x48bdf5['id'])});}});}})[_0x0930('0x15')](function(){if(_0x4aac18===_0x0930('0x50')){var _0x5aa376=_[_0x0930('0x16')](_0x48bdf5[_0x0930('0x28')],'id');return _0x48bdf5[_0x0930('0x59')](_0x5aa376)[_0x0930('0x15')](function(){for(var _0x3a96c0=0x0;_0x3a96c0<_0x5aa376[_0x0930('0x43')];_0x3a96c0+=0x1){_0x37e243[_0x0930('0x4e')](_0x0930('0x5a'),{'WhatsappInteractionId':Number(_0x5aa376[_0x3a96c0]),'UserId':Number(_0x48bdf5['id'])});}});}})[_0x0930('0x5b')](function(_0x41e35b){_0x361264[_0x0930('0x5c')](_0x41e35b);});}}function onDisconnect(_0x30ad0b,_0x2fd05d){joinOrLeave(_0x30ad0b,_0x0930('0x50'),_0x2fd05d);}function onConnect(_0x7bd12d){joinOrLeave(_0x7bd12d,_0x0930('0x5d'));}exports['default']=function(_0x37b3b2){_0x37b3b2['on'](_0x0930('0x5e'),function(_0x564008){_0x564008[_0x0930('0x5f')](0x0);_0x564008[_0x0930('0x60')]=_0x564008[_0x0930('0x61')][_0x0930('0x5e')][_0x0930('0x62')]+':'+_0x564008['request'][_0x0930('0x5e')]['remotePort'];_0x564008[_0x0930('0x63')]=new Date();_0x564008[_0x0930('0x5c')]=function(_0x35b867){console['log'](_0x0930('0x64')+_0x564008[_0x0930('0x65')][_0x0930('0x3')]+'['+_0x564008['address']+']',_0x35b867);};_0x564008['on'](_0x0930('0x66'),function(){onDisconnect(_0x564008,_0x37b3b2);_0x564008[_0x0930('0x5c')](_0x0930('0x67'));});onConnect(_0x564008);_0x564008[_0x0930('0x5c')](_0x0930('0x68'));});};
\ No newline at end of file
index a2a2575..5034475 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3fae=['SmsInteraction','Sms','SmsMessage','Whatsapp','WhatsappInteraction','WhatsappMessage','Fax','FaxInteraction','FaxMessage','Mail','MailInteraction','MailMessage','Openchannel','OpenchannelInteraction','OpenchannelMessage','request','then','info','EventManager','error','code','Trigger,\x20%s','catch','get','channel','motionChannel','event','direction','resolve','undefined','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','ContactId','sequelize','query','QueryTypes','SELECT','contact','format','SIP/%s','name','agent','incomingmessage','outgoingmessage','offlineMessage','opened','Sequelize','UserId','interface','AfterCreate','changed','closed','substatus','AfterUpdate','User','find','internal','length','hasOwnProperty','model','toLowerCase','util','../../mysqldb','jayson/promise','../logger','triggers','client','http','Chat','afterCreate','newinteraction','ChatInteraction','afterUpdate','closedinteraction','ChatMessage','ChatOfflineMessage','newmessage'];(function(_0x297fd3,_0x115406){var _0x2af381=function(_0x1dd31b){while(--_0x1dd31b){_0x297fd3['push'](_0x297fd3['shift']());}};_0x2af381(++_0x115406);}(_0x3fae,0x1b8));var _0xe3fa=function(_0xcfdde1,_0x4a38f0){_0xcfdde1=_0xcfdde1-0x0;var _0x43639c=_0x3fae[_0xcfdde1];return _0x43639c;};'use strict';var util=require(_0xe3fa('0x0'));var db=require(_0xe3fa('0x1'))['db'];var jayson=require(_0xe3fa('0x2'));var logger=require(_0xe3fa('0x3'))(_0xe3fa('0x4'));var client=jayson[_0xe3fa('0x5')][_0xe3fa('0x6')]({'port':0x232a});var triggers=[{'channel':_0xe3fa('0x7'),'model':'ChatInteraction','event':_0xe3fa('0x8'),'condition':_0xe3fa('0x9'),'callback':afterCreate},{'channel':_0xe3fa('0x7'),'model':_0xe3fa('0xa'),'event':_0xe3fa('0xb'),'condition':_0xe3fa('0xc'),'callback':afterUpdate},{'channel':_0xe3fa('0x7'),'model':_0xe3fa('0xd'),'event':_0xe3fa('0x8'),'condition':'newmessage','callback':afterCreateMessage},{'channel':_0xe3fa('0x7'),'model':_0xe3fa('0xe'),'event':_0xe3fa('0x8'),'condition':_0xe3fa('0xf'),'callback':afterCreateOfflineMessage},{'channel':'Sms','model':_0xe3fa('0x10'),'event':_0xe3fa('0x8'),'condition':_0xe3fa('0x9'),'callback':afterCreate},{'channel':_0xe3fa('0x11'),'model':_0xe3fa('0x10'),'event':_0xe3fa('0xb'),'condition':_0xe3fa('0xc'),'callback':afterUpdate},{'channel':_0xe3fa('0x11'),'model':_0xe3fa('0x12'),'event':_0xe3fa('0x8'),'condition':_0xe3fa('0xf'),'callback':afterCreateMessage},{'channel':_0xe3fa('0x13'),'model':_0xe3fa('0x14'),'event':_0xe3fa('0x8'),'condition':'newinteraction','callback':afterCreate},{'channel':_0xe3fa('0x13'),'model':_0xe3fa('0x14'),'event':_0xe3fa('0xb'),'condition':'closedinteraction','callback':afterUpdate},{'channel':_0xe3fa('0x13'),'model':_0xe3fa('0x15'),'event':_0xe3fa('0x8'),'condition':_0xe3fa('0xf'),'callback':afterCreateMessage},{'channel':'Fax','model':'FaxInteraction','event':_0xe3fa('0x8'),'condition':_0xe3fa('0x9'),'callback':afterCreate},{'channel':_0xe3fa('0x16'),'model':_0xe3fa('0x17'),'event':_0xe3fa('0xb'),'condition':_0xe3fa('0xc'),'callback':afterUpdate},{'channel':_0xe3fa('0x16'),'model':_0xe3fa('0x18'),'event':'afterCreate','condition':'newmessage','callback':afterCreateMessage},{'channel':_0xe3fa('0x19'),'model':'MailInteraction','event':'afterCreate','condition':_0xe3fa('0x9'),'callback':afterCreate},{'channel':'Mail','model':_0xe3fa('0x1a'),'event':_0xe3fa('0xb'),'condition':_0xe3fa('0xc'),'callback':afterUpdate},{'channel':'Mail','model':_0xe3fa('0x1b'),'event':_0xe3fa('0x8'),'condition':_0xe3fa('0xf'),'callback':afterCreateMessage},{'channel':_0xe3fa('0x1c'),'model':_0xe3fa('0x1d'),'event':_0xe3fa('0x8'),'condition':'newinteraction','callback':afterCreate},{'channel':_0xe3fa('0x1c'),'model':_0xe3fa('0x1d'),'event':'afterUpdate','condition':'closedinteraction','callback':afterUpdate},{'channel':_0xe3fa('0x1c'),'model':_0xe3fa('0x1e'),'event':_0xe3fa('0x8'),'condition':_0xe3fa('0xf'),'callback':afterCreateMessage}];function request(_0x81daf6){return client[_0xe3fa('0x1f')]('EventManager',_0x81daf6)[_0xe3fa('0x20')](function(_0x74d4ff){logger[_0xe3fa('0x21')]('Trigger,\x20%s',_0xe3fa('0x22'),_0x74d4ff);if(_0x74d4ff[_0xe3fa('0x23')]){if(_0x74d4ff[_0xe3fa('0x23')][_0xe3fa('0x24')]===0x1f4){logger[_0xe3fa('0x23')](_0xe3fa('0x25'),'EventManager',_0x74d4ff['error']);}}})[_0xe3fa('0x26')](function(_0x25d4c3){logger[_0xe3fa('0x23')](_0xe3fa('0x25'),_0xe3fa('0x22'),_0x25d4c3);});}function afterCreateMessage(_0x2f5752){return function(_0x134ffe){_0x134ffe=_0x134ffe[_0xe3fa('0x27')]({'plain':!![]});_0x134ffe[_0xe3fa('0x28')]=_0x2f5752;_0x134ffe[_0xe3fa('0x29')]=_0x2f5752;_0x134ffe[_0xe3fa('0x2a')]=_0x134ffe[_0xe3fa('0x2b')];Promise[_0xe3fa('0x2c')]()[_0xe3fa('0x20')](function(){if(typeof _0x134ffe['ContactId']===_0xe3fa('0x2d'))return null;var _0x578031=_0xe3fa('0x2e')+_0x134ffe[_0xe3fa('0x2f')];return db[_0xe3fa('0x30')][_0xe3fa('0x31')](_0x578031,{'type':db['Sequelize'][_0xe3fa('0x32')][_0xe3fa('0x33')],'raw':!![]});})[_0xe3fa('0x20')](function(_0x473cc8){if(_0x473cc8){_0x134ffe[_0xe3fa('0x34')]=_0x473cc8[0x0];}if(typeof _0x134ffe['UserId']==='undefined')return;return getAgent(_0x134ffe['UserId']);})['then'](function(_0x8c1411){if(_0x8c1411){_0x134ffe['interface']=util[_0xe3fa('0x35')](_0xe3fa('0x36'),_0x8c1411[_0xe3fa('0x37')]);_0x134ffe[_0xe3fa('0x38')]=_0x8c1411;_0x134ffe[_0xe3fa('0x28')]=_0x2f5752;return request({'event':_0xe3fa('0x39'),'message':_0x134ffe});}else{return request({'event':_0xe3fa('0x3a'),'message':_0x134ffe});}})['catch'](function(_0x13ec3b){logger[_0xe3fa('0x23')](_0xe3fa('0x25'),'AfterCreateMessage',_0x13ec3b);});};}function afterCreateOfflineMessage(_0x1b8336){return function(_0x5e266c){_0x5e266c=_0x5e266c[_0xe3fa('0x27')]({'plain':!![]});_0x5e266c[_0xe3fa('0x28')]=_0x1b8336;_0x5e266c[_0xe3fa('0x29')]=_0x1b8336;_0x5e266c['event']=_0xe3fa('0x3b');return request({'event':_0x5e266c['event'],'message':_0x5e266c});};}function afterCreate(_0x17fda4,_0x156ffe){return function(_0x3b9b8e){_0x3b9b8e=_0x3b9b8e['get']({'plain':!![]});_0x3b9b8e[_0xe3fa('0x28')]=_0x17fda4;_0x3b9b8e[_0xe3fa('0x29')]=_0x17fda4;_0x3b9b8e['event']=_0xe3fa('0x3c');Promise['resolve']()[_0xe3fa('0x20')](function(){var _0x537eba=_0xe3fa('0x2e')+_0x3b9b8e['ContactId'];return db[_0xe3fa('0x30')][_0xe3fa('0x31')](_0x537eba,{'type':db[_0xe3fa('0x3d')][_0xe3fa('0x32')][_0xe3fa('0x33')],'raw':!![]});})[_0xe3fa('0x20')](function(_0x44d630){if(_0x44d630){_0x3b9b8e[_0xe3fa('0x34')]=_0x44d630[0x0];}if(typeof _0x3b9b8e['UserId']===_0xe3fa('0x2d'))return;return getAgent(_0x3b9b8e[_0xe3fa('0x3e')]);})[_0xe3fa('0x20')](function(_0x13bf2e){if(_0x13bf2e){_0x3b9b8e[_0xe3fa('0x3f')]=util['format']('SIP/%s',_0x13bf2e[_0xe3fa('0x37')]);_0x3b9b8e['agent']=_0x13bf2e;}return request({'event':_0x156ffe,'message':_0x3b9b8e});})[_0xe3fa('0x26')](function(_0x5722f7){logger[_0xe3fa('0x23')](_0xe3fa('0x25'),_0xe3fa('0x40'),_0x5722f7);});};}function afterUpdate(_0xe80c8e){return function(_0x182b43){var _0x2a8f1f=_0x182b43[_0xe3fa('0x41')](_0xe3fa('0x42'))&&_0x182b43[_0xe3fa('0x42')];var _0x397627=_0x182b43[_0xe3fa('0x41')]('substatus');if(_0x2a8f1f||_0x397627){var _0x4e95ec=_0x2a8f1f?'closedinteraction':_0xe3fa('0x43');var _0x58817d=_0x182b43['get']({'plain':!![]});_0x58817d[_0xe3fa('0x28')]=_0xe80c8e;_0x58817d[_0xe3fa('0x29')]=_0xe80c8e;_0x58817d['event']=_0x2a8f1f?_0xe3fa('0x42'):_0xe3fa('0x43');var _0x1408a3=_0xe3fa('0x2e')+_0x58817d['ContactId'];return db[_0xe3fa('0x30')][_0xe3fa('0x31')](_0x1408a3,{'type':db[_0xe3fa('0x3d')][_0xe3fa('0x32')][_0xe3fa('0x33')],'raw':!![]})[_0xe3fa('0x20')](function(_0x5cef88){if(_0x5cef88){_0x58817d[_0xe3fa('0x34')]=_0x5cef88[0x0];}if(typeof _0x58817d[_0xe3fa('0x3e')]===_0xe3fa('0x2d'))return;return getAgent(_0x58817d['UserId']);})[_0xe3fa('0x20')](function(_0x4e7982){if(_0x4e7982){_0x58817d[_0xe3fa('0x3f')]=util[_0xe3fa('0x35')](_0xe3fa('0x36'),_0x4e7982['name']);_0x58817d[_0xe3fa('0x38')]=_0x4e7982;}return request({'event':_0x4e95ec,'message':_0x58817d});})[_0xe3fa('0x26')](function(_0x5bd9f6){logger[_0xe3fa('0x23')]('Trigger,\x20%s',_0xe3fa('0x44'),_0x5bd9f6);});}};}function getAgent(_0x448cf2){return db[_0xe3fa('0x45')][_0xe3fa('0x46')]({'where':{'id':_0x448cf2},'attributes':['id',_0xe3fa('0x37'),'fullname','email',_0xe3fa('0x47')],'raw':!![]})[_0xe3fa('0x20')](function(_0x1b65c6){return _0x1b65c6;});}exports['default']=function(){for(var _0x320794=0x0;_0x320794<triggers[_0xe3fa('0x48')];_0x320794+=0x1){if(db[_0xe3fa('0x49')](triggers[_0x320794][_0xe3fa('0x4a')])){db[triggers[_0x320794][_0xe3fa('0x4a')]]['hook'](triggers[_0x320794][_0xe3fa('0x2a')],triggers[_0x320794]['callback'](triggers[_0x320794][_0xe3fa('0x28')][_0xe3fa('0x4b')](),triggers[_0x320794]['condition']));}}};
\ No newline at end of file
+var _0xa6bc=['catch','AfterCreateMessage','event','offlineMessage','undefined','AfterCreate','changed','closed','substatus','User','find','fullname','internal','default','length','model','callback','toLowerCase','condition','util','../../mysqldb','../logger','triggers','client','http','ChatInteraction','afterCreate','newinteraction','Chat','afterUpdate','ChatMessage','newmessage','ChatOfflineMessage','Sms','SmsInteraction','SmsMessage','WhatsappInteraction','closedinteraction','WhatsappMessage','Fax','FaxInteraction','FaxMessage','MailInteraction','Mail','MailMessage','Openchannel','OpenchannelInteraction','OpenchannelMessage','request','EventManager','then','info','Trigger,\x20%s','error','code','get','channel','motionChannel','direction','resolve','ContactId','SELECT\x20*\x20FROM\x20cm_contacts\x20WHERE\x20id\x20=\x20','sequelize','query','Sequelize','QueryTypes','SELECT','contact','UserId','interface','format','SIP/%s','name','agent','incomingmessage','outgoingmessage'];(function(_0x1bb39f,_0x5d029f){var _0x4fd5c9=function(_0x125805){while(--_0x125805){_0x1bb39f['push'](_0x1bb39f['shift']());}};_0x4fd5c9(++_0x5d029f);}(_0xa6bc,0xf7));var _0xca6b=function(_0x5124d2,_0x3400cb){_0x5124d2=_0x5124d2-0x0;var _0x361478=_0xa6bc[_0x5124d2];return _0x361478;};'use strict';var util=require(_0xca6b('0x0'));var db=require(_0xca6b('0x1'))['db'];var jayson=require('jayson/promise');var logger=require(_0xca6b('0x2'))(_0xca6b('0x3'));var client=jayson[_0xca6b('0x4')][_0xca6b('0x5')]({'port':0x232a});var triggers=[{'channel':'Chat','model':_0xca6b('0x6'),'event':_0xca6b('0x7'),'condition':_0xca6b('0x8'),'callback':afterCreate},{'channel':_0xca6b('0x9'),'model':_0xca6b('0x6'),'event':_0xca6b('0xa'),'condition':'closedinteraction','callback':afterUpdate},{'channel':_0xca6b('0x9'),'model':_0xca6b('0xb'),'event':_0xca6b('0x7'),'condition':_0xca6b('0xc'),'callback':afterCreateMessage},{'channel':_0xca6b('0x9'),'model':_0xca6b('0xd'),'event':_0xca6b('0x7'),'condition':_0xca6b('0xc'),'callback':afterCreateOfflineMessage},{'channel':_0xca6b('0xe'),'model':_0xca6b('0xf'),'event':_0xca6b('0x7'),'condition':'newinteraction','callback':afterCreate},{'channel':_0xca6b('0xe'),'model':'SmsInteraction','event':'afterUpdate','condition':'closedinteraction','callback':afterUpdate},{'channel':'Sms','model':_0xca6b('0x10'),'event':'afterCreate','condition':_0xca6b('0xc'),'callback':afterCreateMessage},{'channel':'Whatsapp','model':_0xca6b('0x11'),'event':_0xca6b('0x7'),'condition':'newinteraction','callback':afterCreate},{'channel':'Whatsapp','model':'WhatsappInteraction','event':'afterUpdate','condition':_0xca6b('0x12'),'callback':afterUpdate},{'channel':'Whatsapp','model':_0xca6b('0x13'),'event':_0xca6b('0x7'),'condition':'newmessage','callback':afterCreateMessage},{'channel':_0xca6b('0x14'),'model':_0xca6b('0x15'),'event':_0xca6b('0x7'),'condition':'newinteraction','callback':afterCreate},{'channel':_0xca6b('0x14'),'model':_0xca6b('0x15'),'event':_0xca6b('0xa'),'condition':_0xca6b('0x12'),'callback':afterUpdate},{'channel':_0xca6b('0x14'),'model':_0xca6b('0x16'),'event':_0xca6b('0x7'),'condition':_0xca6b('0xc'),'callback':afterCreateMessage},{'channel':'Mail','model':_0xca6b('0x17'),'event':_0xca6b('0x7'),'condition':_0xca6b('0x8'),'callback':afterCreate},{'channel':_0xca6b('0x18'),'model':_0xca6b('0x17'),'event':'afterUpdate','condition':'closedinteraction','callback':afterUpdate},{'channel':_0xca6b('0x18'),'model':_0xca6b('0x19'),'event':'afterCreate','condition':_0xca6b('0xc'),'callback':afterCreateMessage},{'channel':_0xca6b('0x1a'),'model':'OpenchannelInteraction','event':_0xca6b('0x7'),'condition':'newinteraction','callback':afterCreate},{'channel':_0xca6b('0x1a'),'model':_0xca6b('0x1b'),'event':_0xca6b('0xa'),'condition':_0xca6b('0x12'),'callback':afterUpdate},{'channel':_0xca6b('0x1a'),'model':_0xca6b('0x1c'),'event':'afterCreate','condition':_0xca6b('0xc'),'callback':afterCreateMessage}];function request(_0x4f1572){return client[_0xca6b('0x1d')](_0xca6b('0x1e'),_0x4f1572)[_0xca6b('0x1f')](function(_0x3a988d){logger[_0xca6b('0x20')](_0xca6b('0x21'),_0xca6b('0x1e'),_0x3a988d);if(_0x3a988d[_0xca6b('0x22')]){if(_0x3a988d[_0xca6b('0x22')][_0xca6b('0x23')]===0x1f4){logger['error']('Trigger,\x20%s',_0xca6b('0x1e'),_0x3a988d[_0xca6b('0x22')]);}}})['catch'](function(_0x600279){logger[_0xca6b('0x22')](_0xca6b('0x21'),_0xca6b('0x1e'),_0x600279);});}function afterCreateMessage(_0x46fd55){return function(_0x4c5ad0){_0x4c5ad0=_0x4c5ad0[_0xca6b('0x24')]({'plain':!![]});_0x4c5ad0[_0xca6b('0x25')]=_0x46fd55;_0x4c5ad0[_0xca6b('0x26')]=_0x46fd55;_0x4c5ad0['event']=_0x4c5ad0[_0xca6b('0x27')];Promise[_0xca6b('0x28')]()[_0xca6b('0x1f')](function(){if(typeof _0x4c5ad0[_0xca6b('0x29')]==='undefined')return null;var _0x40dcaa=_0xca6b('0x2a')+_0x4c5ad0[_0xca6b('0x29')];return db[_0xca6b('0x2b')][_0xca6b('0x2c')](_0x40dcaa,{'type':db[_0xca6b('0x2d')][_0xca6b('0x2e')][_0xca6b('0x2f')],'raw':!![]});})['then'](function(_0x56cafe){if(_0x56cafe){_0x4c5ad0[_0xca6b('0x30')]=_0x56cafe[0x0];}if(typeof _0x4c5ad0[_0xca6b('0x31')]==='undefined')return;return getAgent(_0x4c5ad0[_0xca6b('0x31')]);})[_0xca6b('0x1f')](function(_0x493422){if(_0x493422){_0x4c5ad0[_0xca6b('0x32')]=util[_0xca6b('0x33')](_0xca6b('0x34'),_0x493422[_0xca6b('0x35')]);_0x4c5ad0[_0xca6b('0x36')]=_0x493422;_0x4c5ad0['channel']=_0x46fd55;return request({'event':_0xca6b('0x37'),'message':_0x4c5ad0});}else{return request({'event':_0xca6b('0x38'),'message':_0x4c5ad0});}})[_0xca6b('0x39')](function(_0x49f31a){logger[_0xca6b('0x22')](_0xca6b('0x21'),_0xca6b('0x3a'),_0x49f31a);});};}function afterCreateOfflineMessage(_0x677e04){return function(_0x49d500){_0x49d500=_0x49d500['get']({'plain':!![]});_0x49d500[_0xca6b('0x25')]=_0x677e04;_0x49d500[_0xca6b('0x26')]=_0x677e04;_0x49d500[_0xca6b('0x3b')]=_0xca6b('0x3c');return request({'event':_0x49d500['event'],'message':_0x49d500});};}function afterCreate(_0x3cbc2b,_0x1758a3){return function(_0x47b79d){_0x47b79d=_0x47b79d[_0xca6b('0x24')]({'plain':!![]});_0x47b79d['channel']=_0x3cbc2b;_0x47b79d[_0xca6b('0x26')]=_0x3cbc2b;_0x47b79d['event']='opened';Promise['resolve']()[_0xca6b('0x1f')](function(){var _0x4ea586=_0xca6b('0x2a')+_0x47b79d[_0xca6b('0x29')];return db[_0xca6b('0x2b')][_0xca6b('0x2c')](_0x4ea586,{'type':db[_0xca6b('0x2d')][_0xca6b('0x2e')][_0xca6b('0x2f')],'raw':!![]});})[_0xca6b('0x1f')](function(_0x4bdbd){if(_0x4bdbd){_0x47b79d[_0xca6b('0x30')]=_0x4bdbd[0x0];}if(typeof _0x47b79d[_0xca6b('0x31')]===_0xca6b('0x3d'))return;return getAgent(_0x47b79d[_0xca6b('0x31')]);})[_0xca6b('0x1f')](function(_0x58333e){if(_0x58333e){_0x47b79d[_0xca6b('0x32')]=util[_0xca6b('0x33')]('SIP/%s',_0x58333e[_0xca6b('0x35')]);_0x47b79d['agent']=_0x58333e;}return request({'event':_0x1758a3,'message':_0x47b79d});})[_0xca6b('0x39')](function(_0x44e2cd){logger[_0xca6b('0x22')](_0xca6b('0x21'),_0xca6b('0x3e'),_0x44e2cd);});};}function afterUpdate(_0x51f20b){return function(_0x46fb53){var _0x58fa61=_0x46fb53[_0xca6b('0x3f')]('closed')&&_0x46fb53[_0xca6b('0x40')];var _0x4b664f=_0x46fb53[_0xca6b('0x3f')](_0xca6b('0x41'));if(_0x58fa61||_0x4b664f){var _0xe0d6fc=_0x58fa61?'closedinteraction':'substatus';var _0x16a334=_0x46fb53[_0xca6b('0x24')]({'plain':!![]});_0x16a334['channel']=_0x51f20b;_0x16a334[_0xca6b('0x26')]=_0x51f20b;_0x16a334[_0xca6b('0x3b')]=_0x58fa61?_0xca6b('0x40'):_0xca6b('0x41');var _0x33d44f=_0xca6b('0x2a')+_0x16a334[_0xca6b('0x29')];return db[_0xca6b('0x2b')][_0xca6b('0x2c')](_0x33d44f,{'type':db['Sequelize'][_0xca6b('0x2e')]['SELECT'],'raw':!![]})['then'](function(_0x3cc334){if(_0x3cc334){_0x16a334[_0xca6b('0x30')]=_0x3cc334[0x0];}if(typeof _0x16a334[_0xca6b('0x31')]===_0xca6b('0x3d'))return;return getAgent(_0x16a334[_0xca6b('0x31')]);})['then'](function(_0x334272){if(_0x334272){_0x16a334[_0xca6b('0x32')]=util[_0xca6b('0x33')](_0xca6b('0x34'),_0x334272[_0xca6b('0x35')]);_0x16a334[_0xca6b('0x36')]=_0x334272;}return request({'event':_0xe0d6fc,'message':_0x16a334});})[_0xca6b('0x39')](function(_0x20b4d7){logger['error']('Trigger,\x20%s','AfterUpdate',_0x20b4d7);});}};}function getAgent(_0x376c5d){return db[_0xca6b('0x42')][_0xca6b('0x43')]({'where':{'id':_0x376c5d},'attributes':['id',_0xca6b('0x35'),_0xca6b('0x44'),'email',_0xca6b('0x45')],'raw':!![]})[_0xca6b('0x1f')](function(_0x318d6b){return _0x318d6b;});}exports[_0xca6b('0x46')]=function(){for(var _0x4f8ce0=0x0;_0x4f8ce0<triggers[_0xca6b('0x47')];_0x4f8ce0+=0x1){if(db['hasOwnProperty'](triggers[_0x4f8ce0]['model'])){db[triggers[_0x4f8ce0][_0xca6b('0x48')]]['hook'](triggers[_0x4f8ce0][_0xca6b('0x3b')],triggers[_0x4f8ce0][_0xca6b('0x49')](triggers[_0x4f8ce0]['channel'][_0xca6b('0x4a')](),triggers[_0x4f8ce0][_0xca6b('0x4b')]));}}};
\ No newline at end of file
index d93fe38..65e50d7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xff69=['lodash','bluebird','mail','chat','sms','getChannels','isValidChannel','toLowerCase','blockedAt','updateAttributes','getLicense','agent','User','count','then','agents','Maximum\x20login\x20has\x20been\x20reached','catch'];(function(_0x2ae2cd,_0xb42c96){var _0xc52725=function(_0x4dda00){while(--_0x4dda00){_0x2ae2cd['push'](_0x2ae2cd['shift']());}};_0xc52725(++_0xb42c96);}(_0xff69,0xb4));var _0x9ff6=function(_0x3beea0,_0x416691){_0x3beea0=_0x3beea0-0x0;var _0x314eb1=_0xff69[_0x3beea0];return _0x314eb1;};'use strict';var _=require(_0x9ff6('0x0'));var BPromise=require(_0x9ff6('0x1'));var db=require('../mysqldb')['db'];var util=require('./license/util');var channels=['voice',_0x9ff6('0x2'),_0x9ff6('0x3'),'fax',_0x9ff6('0x4'),'whatsapp','openchannel'];exports[_0x9ff6('0x5')]=function(){return channels;};exports[_0x9ff6('0x6')]=function(_0x2a4782){_0x2a4782=_0x2a4782[_0x9ff6('0x7')]();return _['includes'](channels,_0x2a4782);};exports['clearBlockUser']=function(_0x82a84b,_0x6f6641,_0x34719b,_0x1b2cde){var _0xb3fa59={'loginAttempts':_0x6f6641,'blocked':_0x34719b};if(!_['isUndefined'](_0x1b2cde)){_0xb3fa59[_0x9ff6('0x8')]=_0x1b2cde;}return _0x82a84b[_0x9ff6('0x9')](_0xb3fa59);};exports[_0x9ff6('0xa')]=function(_0x249d10){return new BPromise(function(_0x55385e,_0x3cae19){var _0x2d67dc=0x0;if(_0x249d10['role']!==_0x9ff6('0xb')){_0x55385e(_0x249d10);}db[_0x9ff6('0xc')][_0x9ff6('0xd')]({'where':{'role':'agent','online':!![],'id':{'$ne':_0x249d10['id']}}})[_0x9ff6('0xe')](function(_0x11321c){_0x2d67dc=_0x11321c;return util[_0x9ff6('0xa')]();})[_0x9ff6('0xe')](function(_0x994d0a){if(_0x994d0a&&_0x994d0a[_0x9ff6('0xf')]&&_0x2d67dc>=_0x994d0a[_0x9ff6('0xf')]){throw Error(_0x9ff6('0x10'));}_0x55385e(_0x249d10);})[_0x9ff6('0x11')](function(_0x2b1057){_0x3cae19(_0x2b1057);});});};
\ No newline at end of file
+var _0x0a7b=['agent','User','count','then','Maximum\x20login\x20has\x20been\x20reached','catch','bluebird','../mysqldb','mail','chat','fax','sms','openchannel','getChannels','includes','clearBlockUser','isUndefined','blockedAt','role'];(function(_0x56e1bb,_0xb788d0){var _0x43ddfe=function(_0x103947){while(--_0x103947){_0x56e1bb['push'](_0x56e1bb['shift']());}};_0x43ddfe(++_0xb788d0);}(_0x0a7b,0xc4));var _0xb0a7=function(_0x4dd837,_0x4960ab){_0x4dd837=_0x4dd837-0x0;var _0xe32966=_0x0a7b[_0x4dd837];return _0xe32966;};'use strict';var _=require('lodash');var BPromise=require(_0xb0a7('0x0'));var db=require(_0xb0a7('0x1'))['db'];var util=require('./license/util');var channels=['voice',_0xb0a7('0x2'),_0xb0a7('0x3'),_0xb0a7('0x4'),_0xb0a7('0x5'),'whatsapp',_0xb0a7('0x6')];exports[_0xb0a7('0x7')]=function(){return channels;};exports['isValidChannel']=function(_0x5d5c54){_0x5d5c54=_0x5d5c54['toLowerCase']();return _[_0xb0a7('0x8')](channels,_0x5d5c54);};exports[_0xb0a7('0x9')]=function(_0xc3a97e,_0x21409f,_0x33a17a,_0x438bbb){var _0x29bbf2={'loginAttempts':_0x21409f,'blocked':_0x33a17a};if(!_[_0xb0a7('0xa')](_0x438bbb)){_0x29bbf2[_0xb0a7('0xb')]=_0x438bbb;}return _0xc3a97e['updateAttributes'](_0x29bbf2);};exports['getLicense']=function(_0x4eaea5){return new BPromise(function(_0x1402b5,_0x25a063){var _0x545a23=0x0;if(_0x4eaea5[_0xb0a7('0xc')]!==_0xb0a7('0xd')){_0x1402b5(_0x4eaea5);}db[_0xb0a7('0xe')][_0xb0a7('0xf')]({'where':{'role':_0xb0a7('0xd'),'online':!![],'id':{'$ne':_0x4eaea5['id']}}})[_0xb0a7('0x10')](function(_0x4a9560){_0x545a23=_0x4a9560;return util['getLicense']();})[_0xb0a7('0x10')](function(_0x28455c){if(_0x28455c&&_0x28455c['agents']&&_0x545a23>=_0x28455c['agents']){throw Error(_0xb0a7('0x11'));}_0x1402b5(_0x4eaea5);})[_0xb0a7('0x12')](function(_0x319d1b){_0x25a063(_0x319d1b);});});};
\ No newline at end of file
index 9d38b32..8f0c4d7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe54a=['OutOfInterval','Resource\x20Conflict','Conflict','Not\x20Found','error','stack','status','exports','util','../config/logger','api','message','Internal\x20Server\x20Error','name','Error','inherits','Bad\x20Request','Forbidden','Entity\x20not\x20found','Message\x20sent\x20outside\x20a\x20valid\x20interval','Out\x20Of\x20Interval','code','details'];(function(_0x165058,_0x588547){var _0x5d2125=function(_0x410328){while(--_0x410328){_0x165058['push'](_0x165058['shift']());}};_0x5d2125(++_0x588547);}(_0xe54a,0xc0));var _0xae54=function(_0x130658,_0x379a65){_0x130658=_0x130658-0x0;var _0x3a19c8=_0xe54a[_0x130658];return _0x3a19c8;};'use strict';var util=require(_0xae54('0x0'));var logger=require(_0xae54('0x1'))(_0xae54('0x2'));var APIError=function(_0x1456e4,_0x3285b8){this[_0xae54('0x3')]=_0x1456e4||_0xae54('0x4');this[_0xae54('0x5')]=_0x3285b8||_0xae54('0x6');util[_0xae54('0x7')](APIError,Error);};var APIBadRequestError=function(_0x132c9e){this[_0xae54('0x3')]=_0x132c9e||'Bad\x20Request';this[_0xae54('0x5')]=_0xae54('0x8');util[_0xae54('0x7')](APIBadRequestError,APIError);};var APIForbiddenError=function(_0x28cdc2){this[_0xae54('0x3')]=_0x28cdc2||_0xae54('0x9');this[_0xae54('0x5')]=_0xae54('0x9');util[_0xae54('0x7')](APIForbiddenError,APIError);};var APINotFoundError=function(_0x4ff39f){this[_0xae54('0x3')]=_0x4ff39f||_0xae54('0xa');this[_0xae54('0x5')]='Not\x20Found';util['inherits'](APINotFoundError,APIError);};var APIOutOfIntervalError=function(_0x2a5ffe){this[_0xae54('0x3')]=_0x2a5ffe||_0xae54('0xb');this['name']=_0xae54('0xc');this[_0xae54('0xd')]=0x193;this[_0xae54('0xe')]={'type':_0xae54('0xf')};util[_0xae54('0x7')](APIOutOfIntervalError,APIError);};var APIConflictError=function(_0x3b8aff){this[_0xae54('0x3')]=_0x3b8aff||_0xae54('0x10');this['name']=_0xae54('0x11');util['inherits'](APIBadRequestError,APIError);};function getStatusCode(_0xe9c5a6){switch(_0xe9c5a6){case'Bad\x20Request':return 0x190;case _0xae54('0x9'),_0xae54('0xc'):return 0x193;case _0xae54('0x12'):return 0x194;case _0xae54('0x11'):return 0x199;default:return 0x1f4;}}function getCustomStatusMessage(_0x2ce1cd){if(_0x2ce1cd===_0xae54('0xc'))return _0x2ce1cd;return null;}function handleError(_0x3d2a5a){return function(_0x2dad97){logger[_0xae54('0x13')](_0x2dad97[_0xae54('0x14')]);var _0x5ec3fb=getStatusCode(_0x2dad97['name']);var _0x259397=getCustomStatusMessage(_0x2dad97['name']);if(_0x2dad97[_0xae54('0x5')]){delete _0x2dad97[_0xae54('0x5')];}if(_0x259397){_0x3d2a5a['statusMessage']=_0x259397;}return _0x3d2a5a[_0xae54('0x15')](_0x5ec3fb)['send'](_0x2dad97);};}module[_0xae54('0x16')]={'APIError':APIError,'APIBadRequestError':APIBadRequestError,'APIForbiddenError':APIForbiddenError,'APINotFoundError':APINotFoundError,'APIOutOfIntervalError':APIOutOfIntervalError,'APIConflict':APIConflictError,'handleError':handleError};
\ No newline at end of file
+var _0x6cec=['Not\x20Found','code','details','OutOfInterval','Resource\x20Conflict','Out\x20Of\x20Interval','Conflict','stack','statusMessage','send','exports','util','../config/logger','api','Error','inherits','message','Bad\x20Request','name','Forbidden','Entity\x20not\x20found'];(function(_0x1e4902,_0x466737){var _0x39bacb=function(_0x497325){while(--_0x497325){_0x1e4902['push'](_0x1e4902['shift']());}};_0x39bacb(++_0x466737);}(_0x6cec,0x74));var _0xc6ce=function(_0x1ae8ab,_0x6e5c2a){_0x1ae8ab=_0x1ae8ab-0x0;var _0x1ad705=_0x6cec[_0x1ae8ab];return _0x1ad705;};'use strict';var util=require(_0xc6ce('0x0'));var logger=require(_0xc6ce('0x1'))(_0xc6ce('0x2'));var APIError=function(_0x3fb578,_0x144a1f){this['message']=_0x3fb578||'Internal\x20Server\x20Error';this['name']=_0x144a1f||_0xc6ce('0x3');util[_0xc6ce('0x4')](APIError,Error);};var APIBadRequestError=function(_0x4252dc){this[_0xc6ce('0x5')]=_0x4252dc||_0xc6ce('0x6');this[_0xc6ce('0x7')]='Bad\x20Request';util['inherits'](APIBadRequestError,APIError);};var APIForbiddenError=function(_0x2570a7){this[_0xc6ce('0x5')]=_0x2570a7||_0xc6ce('0x8');this[_0xc6ce('0x7')]='Forbidden';util[_0xc6ce('0x4')](APIForbiddenError,APIError);};var APINotFoundError=function(_0x2f6131){this[_0xc6ce('0x5')]=_0x2f6131||_0xc6ce('0x9');this[_0xc6ce('0x7')]=_0xc6ce('0xa');util['inherits'](APINotFoundError,APIError);};var APIOutOfIntervalError=function(_0x5ac4c8){this['message']=_0x5ac4c8||'Message\x20sent\x20outside\x20a\x20valid\x20interval';this[_0xc6ce('0x7')]='Out\x20Of\x20Interval';this[_0xc6ce('0xb')]=0x193;this[_0xc6ce('0xc')]={'type':_0xc6ce('0xd')};util[_0xc6ce('0x4')](APIOutOfIntervalError,APIError);};var APIConflictError=function(_0xc9994){this[_0xc6ce('0x5')]=_0xc9994||_0xc6ce('0xe');this[_0xc6ce('0x7')]='Conflict';util[_0xc6ce('0x4')](APIBadRequestError,APIError);};function getStatusCode(_0x5ad25e){switch(_0x5ad25e){case _0xc6ce('0x6'):return 0x190;case _0xc6ce('0x8'),_0xc6ce('0xf'):return 0x193;case _0xc6ce('0xa'):return 0x194;case _0xc6ce('0x10'):return 0x199;default:return 0x1f4;}}function getCustomStatusMessage(_0x15dc60){if(_0x15dc60===_0xc6ce('0xf'))return _0x15dc60;return null;}function handleError(_0x2ad063){return function(_0x487b25){logger['error'](_0x487b25[_0xc6ce('0x11')]);var _0x4f4cfd=getStatusCode(_0x487b25[_0xc6ce('0x7')]);var _0x5178c0=getCustomStatusMessage(_0x487b25[_0xc6ce('0x7')]);if(_0x487b25[_0xc6ce('0x7')]){delete _0x487b25[_0xc6ce('0x7')];}if(_0x5178c0){_0x2ad063[_0xc6ce('0x12')]=_0x5178c0;}return _0x2ad063['status'](_0x4f4cfd)[_0xc6ce('0x13')](_0x487b25);};}module[_0xc6ce('0x14')]={'APIError':APIError,'APIBadRequestError':APIBadRequestError,'APIForbiddenError':APIForbiddenError,'APINotFoundError':APINotFoundError,'APIOutOfIntervalError':APIOutOfIntervalError,'APIConflict':APIConflictError,'handleError':handleError};
\ No newline at end of file
index ba353ca..5bf2ee0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc3af=['json','send','exports','status'];(function(_0xb4ea1b,_0x3341d2){var _0x93c2b1=function(_0x3b5b87){while(--_0x3b5b87){_0xb4ea1b['push'](_0xb4ea1b['shift']());}};_0x93c2b1(++_0x3341d2);}(_0xc3af,0x112));var _0xfc3a=function(_0x3d9b04,_0x1e851a){_0x3d9b04=_0x3d9b04-0x0;var _0x557936=_0xc3af[_0x3d9b04];return _0x557936;};'use strict';module[_0xfc3a('0x0')][0x194]=function pageNotFound(_0x18df52,_0x5eabe6){var _0x432fb2='404';var _0x2bac90=0x194;var _0x598e1e={'status':_0x2bac90};_0x5eabe6['status'](_0x598e1e[_0xfc3a('0x1')]);_0x5eabe6['render'](_0x432fb2,{},function(_0x36d94d,_0x3692e1){if(_0x36d94d){return _0x5eabe6[_0xfc3a('0x1')](_0x598e1e['status'])[_0xfc3a('0x2')](_0x598e1e);}_0x5eabe6[_0xfc3a('0x3')](_0x3692e1);});};
\ No newline at end of file
+var _0xae75=['404','status','render','send','exports'];(function(_0x342baa,_0x4a110f){var _0x1208f3=function(_0x56a645){while(--_0x56a645){_0x342baa['push'](_0x342baa['shift']());}};_0x1208f3(++_0x4a110f);}(_0xae75,0x1a8));var _0x5ae7=function(_0x42f10e,_0x259c2f){_0x42f10e=_0x42f10e-0x0;var _0x5d38ed=_0xae75[_0x42f10e];return _0x5d38ed;};'use strict';module[_0x5ae7('0x0')][0x194]=function pageNotFound(_0x1dc987,_0x13ef15){var _0x4c2f8c=_0x5ae7('0x1');var _0x241206=0x194;var _0x2fdd1a={'status':_0x241206};_0x13ef15[_0x5ae7('0x2')](_0x2fdd1a[_0x5ae7('0x2')]);_0x13ef15[_0x5ae7('0x3')](_0x4c2f8c,{},function(_0x37b363,_0x50ffc0){if(_0x37b363){return _0x13ef15[_0x5ae7('0x2')](_0x2fdd1a[_0x5ae7('0x2')])['json'](_0x2fdd1a);}_0x13ef15[_0x5ae7('0x4')](_0x50ffc0);});};
\ No newline at end of file
index a0df749..8030198 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1337=['../api/openchannelAccount/openchannelAccount.model','../api/openchannelApplication/openchannelApplication.model','../api/openchannelInteraction/openchannelInteraction.model','OpenchannelMessage','OpenchannelQueue','../api/openchannelQueue/openchannelQueue.model','../api/openchannelQueueReport/openchannelQueueReport.model','ChatApplication','../api/chatApplication/chatApplication.model','ChatInteraction','../api/chatInteraction/chatInteraction.model','../api/chatMessage/chatMessage.model','ChatOfflineMessage','../api/chatOfflineMessage/chatOfflineMessage.model','ChatQueue','../api/chatQueue/chatQueue.model','ChatGroup','../api/chatGroup/chatGroup.model','CmCompany','../api/cmCompany/cmCompany.model','CmHopper','../api/cmHopper/cmHopper.model','CmHopperBlack','../api/cmHopperBlack/cmHopperBlack.model','../api/cmHopperFinal/cmHopperFinal.model','CmHopperHistory','../api/cmHopperHistory/cmHopperHistory.model','ReportAgentPreview','CmCustomField','../api/cmCustomField/cmCustomField.model','Action','../api/action/action.model','Automation','../api/automation/automation.model','CannedAnswer','../api/cannedAnswer/cannedAnswer.model','Disposition','../api/disposition/disposition.model','Condition','../api/condition/condition.model','../api/interval/interval.model','Pause','../api/pause/pause.model','Cdr','VoiceQueuesLog','../api/voiceQueuesLog/voiceQueuesLog.model','Schedule','../api/schedule/schedule.model','Sound','../api/tag/tag.model','ContactItemType','CmContactHasItem','../api/cmContactHasItem/cmContactHasItem.model','../api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.model','Template','Trigger','../api/trigger/trigger.model','Variable','../api/variable/variable.model','../api/integration/integration.model','IntegrationReport','../api/integrationReport/integrationReport.model','AnalyticCustomReport','../api/analyticCustomReport/analyticCustomReport.model','AnalyticExtractedReport','../api/analyticExtractedReport/analyticExtractedReport.model','AnalyticMetric','AnalyticTreeReport','../api/analyticTreeReport/analyticTreeReport.model','SalesforceAccount','../api/intSalesforceAccount/intSalesforceAccount.model','../api/intSalesforceField/intSalesforceField.model','SugarcrmAccount','SugarcrmConfiguration','../api/intSugarcrmConfiguration/intSugarcrmConfiguration.model','DeskAccount','../api/intDeskAccount/intDeskAccount.model','DeskConfiguration','../api/intDeskConfiguration/intDeskConfiguration.model','DeskField','../api/intDeskField/intDeskField.model','ZohoAccount','ZohoConfiguration','../api/intZohoConfiguration/intZohoConfiguration.model','ZohoField','../api/intZohoField/intZohoField.model','ZendeskAccount','../api/intZendeskAccount/intZendeskAccount.model','ZendeskConfiguration','../api/intZendeskConfiguration/intZendeskConfiguration.model','ZendeskField','../api/intZendeskField/intZendeskField.model','FreshdeskAccount','FreshdeskConfiguration','../api/intFreshdeskConfiguration/intFreshdeskConfiguration.model','FreshdeskField','../api/intFreshdeskField/intFreshdeskField.model','../api/intVtigerAccount/intVtigerAccount.model','VtigerConfiguration','../api/intVtigerConfiguration/intVtigerConfiguration.model','VtigerField','../api/intVtigerField/intVtigerField.model','../api/intServicenowAccount/intServicenowAccount.model','../api/intServicenowConfiguration/intServicenowConfiguration.model','ServicenowField','../api/intServicenowField/intServicenowField.model','Dynamics365Account','../api/intDynamics365Account/intDynamics365Account.model','Dynamics365Configuration','../api/intDynamics365Configuration/intDynamics365Configuration.model','Dynamics365Field','FreshsalesAccount','Integration','Network','../api/network/network.model','ChatQueueReport','ChatInternalMessage','JscriptyAnswerReport','JscriptyQuestionReport','../api/jscriptyQuestionReport/jscriptyQuestionReport.model','JscriptySessionReport','../api/jscriptySessionReport/jscriptySessionReport.model','SmsQueueReport','SquareReport','../api/squareReport/squareReport.model','SquareDetailsReport','../api/squareReportDetail/squareReportDetail.model','JscriptyProject','../api/jscriptyProject/jscriptyProject.model','Setting','../api/setting/setting.model','../api/squareOdbc/squareOdbc.model','../api/squareProject/squareProject.model','SquareRecording','../api/squareRecording/squareRecording.model','SquareMessage','../api/squareMessage/squareMessage.model','Team','License','../api/license/license.model','../api/campaign/campaign.model','Migration','../api/migration/migration.model','MailTransferReport','../api/mailTransferReport/mailTransferReport.model','ChatTransferReport','../api/chatTransferReport/chatTransferReport.model','FaxTransferReport','../api/faxTransferReport/faxTransferReport.model','SmsTransferReport','../api/smsTransferReport/smsTransferReport.model','../api/cmList/cmList.model','VoicePrefix','../api/voicePrefix/voicePrefix.model','UserProfile','../api/userProfile/userProfile.model','UserProfileSection','../api/userProfileSection/userProfileSection.model','UserProfileResource','../api/userProfileResource/userProfileResource.model','UserNotification','../api/userNotification/userNotification.model','WhatsappAccount','WhatsappApplication','WhatsappInteraction','../api/whatsappInteraction/whatsappInteraction.model','WhatsappMessage','../api/whatsappMessage/whatsappMessage.model','WhatsappQueueReport','../api/whatsappQueueReport/whatsappQueueReport.model','../api/whatsappTransferReport/whatsappTransferReport.model','WhatsappQueue','../api/whatsappQueue/whatsappQueue.model','CloudProvider','../api/cloudProvider/cloudProvider.model','TeamVoiceQueue','../api/teamVoiceQueue/teamVoiceQueue.model','TeamVoicePrefix','../api/teamVoicePrefix/teamVoicePrefix.model','UserVoicePrefix','UserSetting','../api/user-setting/user-setting.model','hasOne','cascade','UserId','userSetting','hasMany','Recordings','VoiceQueuesRt','Extensions','CmHopperFinal','HopperHistory','OpenchannelInteraction','SmsInteraction','SmsInteractions','FaxInteraction','MailInteractions','WhatsappInteractions','SenderId','SET\x20NULL','belongsTo','belongsToMany','Groups','chat_group_has_users','CmContact','Contacts','CmList','Lists','cm_user_has_lists','user_has_mail_interactions','ChatInteractions','user_has_chat_interactions','FaxInteractions','user_has_fax_interactions','user_has_sms_interactions','user_has_openchannel_interactions','user_has_whatsapp_interactions','VoiceQueue','VoicePrefixes','MailQueues','UserChatQueue','FaxQueues','SmsQueues','OpenchannelQueues','ChatWebsite','ChatWebsites','user_has_chat_websites','user_has_fax_accounts','MailAccounts','user_has_mail_accounts','OpenchannelAccounts','user_has_openchannel_accounts','SmsAccount','SmsAccounts','user_has_sms_accounts','WhatsappAccounts','user_has_whatsapp_accounts','SpiedAgents','Applications','Sounds','moh_has_sounds','Members','VoiceQueueId','Hoppers','HopperHistories','HopperBlacks','Trunk','TrunkBackupId','Interval','IntervalId','mandatoryDispositionPauseId','voice_queues_has_cm_lists','Teams','BlackLists','voice_queues_has_cm_blacklists','Messages','mailboxuser','mailbox','VoiceCallReport','QueueCalls','uniqueid','AgentReports','Contact','ContactId','MailAccountId','CloudProviderId','restrict','Dispositions','Answers','Interactions','MailApplication','List','mandatoryDispositionPause','Agents','Account','Owner','Tag','mail_interaction_has_tags','Tags','ThroughTags','Users','MailInteractionId','Attachment','Attachments','Interaction','ChatOfflineMessageId','TagId','MailQueueReport','ListId','Dashboard','Items','FaxAccountId','Exntensions','FaxInteractionId','fax_interaction_has_tags','AttachmentId','team_has_fax_queues','SmsAccountId','SmsApplication','SmsInteractionId','sms_interaction_has_tags','SmsQueueId','team_has_sms_queues','OpenchannelAccountId','OpenchannelApplication','OpenchannelQueueId','OpenchannelInteractionId','openchannel_interaction_has_tags','team_has_openchannel_queues','ChatWebsiteId','ChatProactiveAction','ProactiveActions','ChatMessage','OpenchannelQueueReport','Agent','Queue','ChatQueueId','ChatInteractionId','chat_interaction_has_tags','team_has_chat_queues','ChatGroupId','Website','Phones','CmContactId','HopperFinals','JscriptySessions','OpenchannelInteractions','cm_user_has_contacts','cm_contact_has_tags','CmHopperAdditionalPhone','AdditionalPhones','Campaign','CampaignId','OwnerId','All','OneAll','AutomationAllId','Any','OneAny','AutomationAnyId','Actions','AutomationId','ParentId','ChatApplications','FaxApplications','SmsApplications','DefaultReportId','Mohs','whatsapp_interaction_has_tags','ItemType','ItemTypeId','Hopper','AllConditions','AllCondition','AnyConditions','AnyCondition','TriggerAnyId','TriggerId','AnalyticFieldReport','Fields','CustomReportId','MetricId','SalesforceConfiguration','Configurations','AccountId','Subjects','FieldId','SalesforceField','Description','Field','SugarcrmField','Descriptions','DescriptionId','SubjectId','Subject','VariableId','int_freshdesk_configuration_has_tags','VtigerAccount','ServicenowAccount','ServicenowConfiguration','FreshsalesConfiguration','FreshsalesField','FromId','ToId','SessionId','ProjectId','VoiceQueues','team_has_mail_queues','ChatQueues','WhatsappQueues','SquareProject','campaigns_has_cm_lists','campaigns_has_cm_blacklists','FromAccount','FromUserId','ToUserId','ToAgent','ToMailQueueId','FromChatWebsiteId','FromAgent','ToChatQueueId','ToQueue','ToChatWebsiteId','ToFaxQueueId','ToAccount','OpenchannelTransferReport','FromOpenchannelAccountId','ToOpenchannelQueueId','ToOpenchannelAccountId','CustomFields','userProfileId','UserProfileSections','WhatsappAccountId','WhatsappInteractionId','WhatsappTransferReport','ToWhatsappAccountId','ToQueueId','team_has_whatsapp_queues','user','Imap','exports','lodash','jstz','determine','sequelize','motion2','xcall','xC@LL1234','127.0.0.1','mysql','utf8mb4','utf8','utf8_general_ci','defaultsDeep','username','password','options','database','sequelizeHistory','User','import','../api/user/user.model','VoiceChanSpy','../api/voiceChanSpy/voiceChanSpy.model','VoiceContext','../api/voiceContext/voiceContext.model','VoiceExtension','../api/voiceExtension/voiceExtension.model','VoiceMusicOnHold','../api/voiceQueue/voiceQueue.model','VoiceRecording','ScreenRecording','../api/screenRecording/screenRecording.model','VoiceMail','../api/voiceMail/voiceMail.model','VoiceMailMessage','../api/voiceMailMessage/voiceMailMessage.model','VoiceDialReport','VoiceAgentReport','../api/voiceAgentReport/voiceAgentReport.model','VoiceQueueReport','MemberReport','../api/voiceTransferReport/voiceTransferReport.model','UserVoiceQueueRt','../api/userVoiceQueueRt/userVoiceQueueRt.model','UserVoiceQueue','../api/userVoiceQueue/userVoiceQueue.model','../api/userChatQueue/userChatQueue.model','UserMailQueue','UserFaxQueue','../api/userFaxQueue/userFaxQueue.model','UserSmsQueue','../api/userSmsQueue/userSmsQueue.model','UserOpenchannelQueue','../api/userOpenchannelQueue/userOpenchannelQueue.model','UserWhatsappQueue','MailServerIn','../api/mailServerIn/mailServerIn.model','MailServerOut','../api/mailServerOut/mailServerOut.model','MailAccount','../api/mailAccount/mailAccount.model','MailQueue','../api/mailQueue/mailQueue.model','../api/mailSubstatus/mailSubstatus.model','MailInteraction','MailMessage','../api/mailMessage/mailMessage.model','../api/mailApplication/mailApplication.model','../api/mailQueueReport/mailQueueReport.model','DashboardItem','../api/dashboardItem/dashboardItem.model','FaxAccount','../api/faxAccount/faxAccount.model','FaxApplication','FaxMessage','../api/faxMessage/faxMessage.model','FaxQueue','../api/faxQueue/faxQueue.model','FaxQueueReport','../api/faxQueueReport/faxQueueReport.model','../api/smsAccount/smsAccount.model','../api/smsInteraction/smsInteraction.model','SmsMessage','../api/smsMessage/smsMessage.model','SmsQueue','../api/smsQueue/smsQueue.model','OpenchannelAccount'];(function(_0x3997f0,_0x1bf516){var _0xff2824=function(_0x1e9ef1){while(--_0x1e9ef1){_0x3997f0['push'](_0x3997f0['shift']());}};_0xff2824(++_0x1bf516);}(_0x1337,0x1a5));var _0x7133=function(_0x152aa1,_0x307718){_0x152aa1=_0x152aa1-0x0;var _0x1bc01a=_0x1337[_0x152aa1];return _0x1bc01a;};'use strict';var config=require('../config/environment');var Sequelize=require('sequelize');var _=require(_0x7133('0x0'));var jstz=require(_0x7133('0x1'));var timezone=jstz[_0x7133('0x2')]();config[_0x7133('0x3')]=_['defaultsDeep'](config['sequelize'],{'database':_0x7133('0x4'),'username':_0x7133('0x5'),'password':_0x7133('0x6'),'options':{'host':_0x7133('0x7'),'port':0xcea,'dialect':_0x7133('0x8'),'dialectOptions':{'charset':_0x7133('0x9')},'logging':![],'timezone':timezone['name'](),'define':{'charset':_0x7133('0xa'),'collate':_0x7133('0xb')}}});config['sequelizeHistory']=_[_0x7133('0xc')](config['sequelizeHistory'],{'database':'motion2','username':'xcall','password':'xC@LL1234','options':{'host':_0x7133('0x7'),'port':0xcea,'dialect':_0x7133('0x8'),'dialectOptions':{'charset':'utf8mb4'},'logging':![],'timezone':timezone['name'](),'define':{'charset':_0x7133('0xa'),'collate':_0x7133('0xb')}}});var db={'Sequelize':Sequelize,'sequelize':new Sequelize(config['sequelize']['database'],config['sequelize'][_0x7133('0xd')],config[_0x7133('0x3')][_0x7133('0xe')],config[_0x7133('0x3')][_0x7133('0xf')])};var dbH={'Sequelize':Sequelize,'sequelize':new Sequelize(config['sequelizeHistory'][_0x7133('0x10')],config['sequelizeHistory'][_0x7133('0xd')],config[_0x7133('0x11')][_0x7133('0xe')],config[_0x7133('0x11')][_0x7133('0xf')])};db[_0x7133('0x12')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x14'));db[_0x7133('0x15')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x16'));db[_0x7133('0x17')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x18'));db[_0x7133('0x19')]=db[_0x7133('0x3')]['import'](_0x7133('0x1a'));db[_0x7133('0x1b')]=db[_0x7133('0x3')]['import']('../api/voiceMusicOnHold/voiceMusicOnHold.model');db['VoiceQueue']=db['sequelize'][_0x7133('0x13')](_0x7133('0x1c'));db[_0x7133('0x1d')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/voiceRecording/voiceRecording.model');db[_0x7133('0x1e')]=db[_0x7133('0x3')]['import'](_0x7133('0x1f'));db[_0x7133('0x20')]=db['sequelize'][_0x7133('0x13')](_0x7133('0x21'));db[_0x7133('0x22')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x23'));db['VoiceCallReport']=db[_0x7133('0x3')]['import']('../api/voiceCallReport/voiceCallReport.model');db[_0x7133('0x24')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/voiceDialReport/voiceDialReport.model');db[_0x7133('0x25')]=db['sequelize']['import'](_0x7133('0x26'));db[_0x7133('0x27')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/voiceQueueReport/voiceQueueReport.model');db[_0x7133('0x28')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/memberReport/memberReport.model');db['Trunk']=db['sequelize'][_0x7133('0x13')]('../api/trunk/trunk.model');db['VoiceTransferReport']=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x29'));db[_0x7133('0x2a')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x2b'));db[_0x7133('0x2c')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x2d'));db['UserChatQueue']=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x2e'));db[_0x7133('0x2f')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/userMailQueue/userMailQueue.model');db[_0x7133('0x30')]=db[_0x7133('0x3')]['import'](_0x7133('0x31'));db[_0x7133('0x32')]=db['sequelize'][_0x7133('0x13')](_0x7133('0x33'));db[_0x7133('0x34')]=db['sequelize']['import'](_0x7133('0x35'));db[_0x7133('0x36')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/userWhatsappQueue/userWhatsappQueue.model');db[_0x7133('0x37')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x38'));db[_0x7133('0x39')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x3a'));db[_0x7133('0x3b')]=db[_0x7133('0x3')]['import'](_0x7133('0x3c'));db[_0x7133('0x3d')]=db[_0x7133('0x3')]['import'](_0x7133('0x3e'));db['MailSubstatus']=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x3f'));db[_0x7133('0x40')]=db['sequelize'][_0x7133('0x13')]('../api/mailInteraction/mailInteraction.model');db[_0x7133('0x41')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x42'));db['MailApplication']=db['sequelize'][_0x7133('0x13')](_0x7133('0x43'));db['MailQueueReport']=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x44'));db['Dashboard']=db[_0x7133('0x3')][_0x7133('0x13')]('../api/dashboard/dashboard.model');db[_0x7133('0x45')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x46'));db[_0x7133('0x47')]=db['sequelize']['import'](_0x7133('0x48'));db[_0x7133('0x49')]=db['sequelize'][_0x7133('0x13')]('../api/faxApplication/faxApplication.model');db['FaxInteraction']=db[_0x7133('0x3')][_0x7133('0x13')]('../api/faxInteraction/faxInteraction.model');db[_0x7133('0x4a')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x4b'));db[_0x7133('0x4c')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x4d'));db[_0x7133('0x4e')]=db['sequelize'][_0x7133('0x13')](_0x7133('0x4f'));db['SmsAccount']=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x50'));db['SmsApplication']=db[_0x7133('0x3')]['import']('../api/smsApplication/smsApplication.model');db['SmsInteraction']=db['sequelize'][_0x7133('0x13')](_0x7133('0x51'));db[_0x7133('0x52')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x53'));db[_0x7133('0x54')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x55'));db[_0x7133('0x56')]=db[_0x7133('0x3')]['import'](_0x7133('0x57'));db['OpenchannelApplication']=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x58'));db['OpenchannelInteraction']=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x59'));db[_0x7133('0x5a')]=db['sequelize']['import']('../api/openchannelMessage/openchannelMessage.model');db[_0x7133('0x5b')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x5c'));db['ChatWebsite']=db['sequelize'][_0x7133('0x13')]('../api/chatWebsite/chatWebsite.model');db['OpenchannelQueueReport']=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x5d'));db[_0x7133('0x5e')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x5f'));db[_0x7133('0x60')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x61'));db['ChatMessage']=db[_0x7133('0x3')]['import'](_0x7133('0x62'));db[_0x7133('0x63')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x64'));db[_0x7133('0x65')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x66'));db[_0x7133('0x67')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x68'));db['ChatProactiveAction']=db[_0x7133('0x3')][_0x7133('0x13')]('../api/chatProactiveAction/chatProactiveAction.model');db[_0x7133('0x69')]=db[_0x7133('0x3')]['import'](_0x7133('0x6a'));db['CmContact']=db[_0x7133('0x3')][_0x7133('0x13')]('../api/cmContact/cmContact.model');db[_0x7133('0x6b')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x6c'));db[_0x7133('0x6d')]=db[_0x7133('0x3')]['import'](_0x7133('0x6e'));db['CmHopperFinal']=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x6f'));db[_0x7133('0x70')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x71'));db[_0x7133('0x72')]=db[_0x7133('0x3')]['import']('../api/reportAgentPreview/reportAgentPreview.model');db[_0x7133('0x73')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x74'));db[_0x7133('0x75')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x76'));db[_0x7133('0x77')]=db['sequelize'][_0x7133('0x13')](_0x7133('0x78'));db[_0x7133('0x79')]=db['sequelize'][_0x7133('0x13')](_0x7133('0x7a'));db[_0x7133('0x7b')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x7c'));db[_0x7133('0x7d')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x7e'));db['Interval']=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x7f'));db[_0x7133('0x80')]=db[_0x7133('0x3')]['import'](_0x7133('0x81'));db[_0x7133('0x82')]=db['sequelize'][_0x7133('0x13')]('../api/cdr/cdr.model');db[_0x7133('0x83')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x84'));db[_0x7133('0x85')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x86'));db[_0x7133('0x87')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/sound/sound.model');db['Tag']=db['sequelize'][_0x7133('0x13')](_0x7133('0x88'));db[_0x7133('0x89')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/contactItemType/contactItemType.model');db[_0x7133('0x8a')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x8b'));db['CmHopperAdditionalPhone']=db[_0x7133('0x3')]['import'](_0x7133('0x8c'));db[_0x7133('0x8d')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/template/template.model');db[_0x7133('0x8e')]=db['sequelize'][_0x7133('0x13')](_0x7133('0x8f'));db[_0x7133('0x90')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x91'));db['Integration']=db['sequelize'][_0x7133('0x13')](_0x7133('0x92'));db[_0x7133('0x93')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x94'));db[_0x7133('0x95')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x96'));db['AnalyticDefaultReport']=db[_0x7133('0x3')][_0x7133('0x13')]('../api/analyticDefaultReport/analyticDefaultReport.model');db[_0x7133('0x97')]=db[_0x7133('0x3')]['import'](_0x7133('0x98'));db[_0x7133('0x99')]=db[_0x7133('0x3')]['import']('../api/analyticMetric/analyticMetric.model');db['AnalyticFieldReport']=db[_0x7133('0x3')][_0x7133('0x13')]('../api/analyticFieldReport/analyticFieldReport.model');db[_0x7133('0x9a')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x9b'));db[_0x7133('0x9c')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x9d'));db['SalesforceConfiguration']=db[_0x7133('0x3')][_0x7133('0x13')]('../api/intSalesforceConfiguration/intSalesforceConfiguration.model');db['SalesforceField']=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x9e'));db[_0x7133('0x9f')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/intSugarcrmAccount/intSugarcrmAccount.model');db[_0x7133('0xa0')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xa1'));db['SugarcrmField']=db['sequelize'][_0x7133('0x13')]('../api/intSugarcrmField/intSugarcrmField.model');db[_0x7133('0xa2')]=db[_0x7133('0x3')]['import'](_0x7133('0xa3'));db[_0x7133('0xa4')]=db['sequelize'][_0x7133('0x13')](_0x7133('0xa5'));db[_0x7133('0xa6')]=db['sequelize'][_0x7133('0x13')](_0x7133('0xa7'));db[_0x7133('0xa8')]=db['sequelize'][_0x7133('0x13')]('../api/intZohoAccount/intZohoAccount.model');db[_0x7133('0xa9')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xaa'));db[_0x7133('0xab')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xac'));db[_0x7133('0xad')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xae'));db[_0x7133('0xaf')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xb0'));db[_0x7133('0xb1')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xb2'));db[_0x7133('0xb3')]=db['sequelize'][_0x7133('0x13')]('../api/intFreshdeskAccount/intFreshdeskAccount.model');db[_0x7133('0xb4')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xb5'));db[_0x7133('0xb6')]=db[_0x7133('0x3')]['import'](_0x7133('0xb7'));db['VtigerAccount']=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xb8'));db[_0x7133('0xb9')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xba'));db[_0x7133('0xbb')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xbc'));db['ServicenowAccount']=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xbd'));db['ServicenowConfiguration']=db['sequelize'][_0x7133('0x13')](_0x7133('0xbe'));db[_0x7133('0xbf')]=db['sequelize'][_0x7133('0x13')](_0x7133('0xc0'));db[_0x7133('0xc1')]=db['sequelize'][_0x7133('0x13')](_0x7133('0xc2'));db[_0x7133('0xc3')]=db['sequelize'][_0x7133('0x13')](_0x7133('0xc4'));db[_0x7133('0xc5')]=db['sequelize'][_0x7133('0x13')]('../api/intDynamics365Field/intDynamics365Field.model');db[_0x7133('0xc6')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/intFreshsalesAccount/intFreshsalesAccount.model');db['FreshsalesConfiguration']=db[_0x7133('0x3')][_0x7133('0x13')]('../api/intFreshsalesConfiguration/intFreshsalesConfiguration.model');db['FreshsalesField']=db[_0x7133('0x3')][_0x7133('0x13')]('../api/intFreshsalesField/intFreshsalesField.model');db[_0x7133('0xc7')]=db['sequelize'][_0x7133('0x13')](_0x7133('0x92'));db[_0x7133('0xc8')]=db[_0x7133('0x3')]['import'](_0x7133('0xc9'));db[_0x7133('0xca')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/chatQueueReport/chatQueueReport.model');db[_0x7133('0xcb')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/chatInternalMessage/chatInternalMessage.model');db[_0x7133('0xcc')]=db['sequelize'][_0x7133('0x13')]('../api/jscriptyAnswerReport/jscriptyAnswerReport.model');db[_0x7133('0xcd')]=db['sequelize'][_0x7133('0x13')](_0x7133('0xce'));db[_0x7133('0xcf')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xd0'));db[_0x7133('0xd1')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/smsQueueReport/smsQueueReport.model');db[_0x7133('0xd2')]=db['sequelize']['import'](_0x7133('0xd3'));db[_0x7133('0xd4')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xd5'));db[_0x7133('0xd6')]=db['sequelize']['import'](_0x7133('0xd7'));db[_0x7133('0xd8')]=db['sequelize'][_0x7133('0x13')](_0x7133('0xd9'));db['SquareOdbc']=db['sequelize'][_0x7133('0x13')](_0x7133('0xda'));db['SquareProject']=db['sequelize'][_0x7133('0x13')](_0x7133('0xdb'));db[_0x7133('0xdc')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xdd'));db[_0x7133('0xde')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xdf'));db[_0x7133('0xe0')]=db[_0x7133('0x3')]['import']('../api/team/team.model');db[_0x7133('0xe1')]=db['sequelize']['import'](_0x7133('0xe2'));db['Campaign']=db[_0x7133('0x3')]['import'](_0x7133('0xe3'));db[_0x7133('0xe4')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xe5'));db['Attachment']=db[_0x7133('0x3')][_0x7133('0x13')]('../api/attachment/attachment.model');db['Plugin']=db[_0x7133('0x3')][_0x7133('0x13')]('../api/plugin/plugin.model');db[_0x7133('0xe6')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xe7'));db[_0x7133('0xe8')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xe9'));db[_0x7133('0xea')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xeb'));db['OpenchannelTransferReport']=db[_0x7133('0x3')][_0x7133('0x13')]('../api/openchannelTransferReport/openchannelTransferReport.model');db[_0x7133('0xec')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xed'));db['CmList']=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xee'));db[_0x7133('0xef')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xf0'));db[_0x7133('0xf1')]=db['sequelize'][_0x7133('0x13')](_0x7133('0xf2'));db[_0x7133('0xf3')]=db[_0x7133('0x3')]['import'](_0x7133('0xf4'));db[_0x7133('0xf5')]=db['sequelize'][_0x7133('0x13')](_0x7133('0xf6'));db[_0x7133('0xf7')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xf8'));db[_0x7133('0xf9')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/whatsappAccount/whatsappAccount.model');db[_0x7133('0xfa')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/whatsappApplication/whatsappApplication.model');db[_0x7133('0xfb')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0xfc'));db[_0x7133('0xfd')]=db['sequelize'][_0x7133('0x13')](_0x7133('0xfe'));db[_0x7133('0xff')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x100'));db['WhatsappTransferReport']=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x101'));db[_0x7133('0x102')]=db['sequelize'][_0x7133('0x13')](_0x7133('0x103'));db[_0x7133('0x104')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x105'));db[_0x7133('0x106')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x107'));db[_0x7133('0x108')]=db['sequelize']['import'](_0x7133('0x109'));db[_0x7133('0x10a')]=db[_0x7133('0x3')][_0x7133('0x13')]('../api/userVoicePrefix/userVoicePrefix.model');db[_0x7133('0x10b')]=db[_0x7133('0x3')][_0x7133('0x13')](_0x7133('0x10c'));db[_0x7133('0x12')][_0x7133('0x10d')](db[_0x7133('0x20')],{'as':_0x7133('0x20'),'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x10f')});db['User']['hasOne'](db['UserSetting'],{'as':_0x7133('0x110'),'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x10f')});db[_0x7133('0x12')][_0x7133('0x111')](db[_0x7133('0x1d')],{'as':_0x7133('0x112'),'foreignKey':'UserId'});db[_0x7133('0x12')][_0x7133('0x111')](db[_0x7133('0x2a')],{'as':_0x7133('0x113'),'foreignKey':_0x7133('0x10f')});db[_0x7133('0x12')]['hasMany'](db[_0x7133('0x19')],{'as':_0x7133('0x114'),'onDelete':'cascade','hooks':!![]});db['User']['hasMany'](db[_0x7133('0x115')],{'as':'HopperFinals','foreignKey':_0x7133('0x10f')});db[_0x7133('0x12')][_0x7133('0x111')](db[_0x7133('0x70')],{'as':_0x7133('0x116'),'foreignKey':'UserId'});db[_0x7133('0x12')][_0x7133('0x111')](db[_0x7133('0x72')],{'as':_0x7133('0x72'),'foreignKey':'UserId'});db[_0x7133('0x12')][_0x7133('0x111')](db[_0x7133('0x117')],{'as':'OpenchannelInteractions','foreignKey':_0x7133('0x10f')});db['User'][_0x7133('0x111')](db[_0x7133('0x60')],{'as':'ChatInteractions','foreignKey':_0x7133('0x10f')});db['User'][_0x7133('0x111')](db[_0x7133('0x118')],{'as':_0x7133('0x119'),'foreignKey':'UserId'});db['User'][_0x7133('0x111')](db[_0x7133('0x11a')],{'as':'FaxInteractions','foreignKey':'UserId'});db[_0x7133('0x12')]['hasMany'](db[_0x7133('0x40')],{'as':_0x7133('0x11b'),'foreignKey':_0x7133('0x10f')});db[_0x7133('0x12')][_0x7133('0x111')](db['WhatsappInteraction'],{'as':_0x7133('0x11c'),'foreignKey':'UserId'});db[_0x7133('0x12')][_0x7133('0x111')](db['UserNotification'],{'as':'UserNotifications','foreignKey':_0x7133('0x11d')});db['User'][_0x7133('0x111')](db['CmHopper'],{'as':'Hoppers','foreignKey':_0x7133('0x10f'),'onDelete':_0x7133('0x11e')});db[_0x7133('0x12')][_0x7133('0x11f')](db['UserProfile'],{'as':_0x7133('0xf1'),'foreignKey':'userProfileId'});db[_0x7133('0x12')][_0x7133('0x120')](db['ChatGroup'],{'as':_0x7133('0x121'),'through':_0x7133('0x122')});db[_0x7133('0x12')]['belongsToMany'](db[_0x7133('0x123')],{'as':_0x7133('0x124'),'through':'cm_user_has_contacts'});db[_0x7133('0x12')]['belongsToMany'](db[_0x7133('0x125')],{'as':_0x7133('0x126'),'through':_0x7133('0x127')});db[_0x7133('0x12')][_0x7133('0x120')](db['Team'],{'through':'user_has_teams'});db[_0x7133('0x12')][_0x7133('0x120')](db[_0x7133('0x40')],{'as':_0x7133('0x11b'),'through':_0x7133('0x128')});db[_0x7133('0x12')]['belongsToMany'](db[_0x7133('0x60')],{'as':_0x7133('0x129'),'through':_0x7133('0x12a')});db[_0x7133('0x12')][_0x7133('0x120')](db[_0x7133('0x11a')],{'as':_0x7133('0x12b'),'through':_0x7133('0x12c')});db['User']['belongsToMany'](db['SmsInteraction'],{'as':_0x7133('0x119'),'through':_0x7133('0x12d')});db[_0x7133('0x12')][_0x7133('0x120')](db['OpenchannelInteraction'],{'as':'OpenchannelInteractions','through':_0x7133('0x12e')});db['User']['belongsToMany'](db[_0x7133('0xfb')],{'as':'WhatsappInteractions','through':_0x7133('0x12f')});db[_0x7133('0x12')][_0x7133('0x120')](db[_0x7133('0x130')],{'as':'VoiceQueues','through':_0x7133('0x2c'),'required':![]});db['User'][_0x7133('0x120')](db[_0x7133('0xef')],{'as':_0x7133('0x131'),'through':_0x7133('0x10a'),'required':![]});db['User'][_0x7133('0x120')](db[_0x7133('0x3d')],{'as':_0x7133('0x132'),'through':_0x7133('0x2f'),'required':![]});db[_0x7133('0x12')][_0x7133('0x120')](db[_0x7133('0x65')],{'as':'ChatQueues','through':_0x7133('0x133'),'required':![],'hooks':!![]});db['User']['belongsToMany'](db[_0x7133('0x4c')],{'as':_0x7133('0x134'),'through':'UserFaxQueue','required':![]});db['User'][_0x7133('0x120')](db['SmsQueue'],{'as':_0x7133('0x135'),'through':'UserSmsQueue','required':![]});db['User'][_0x7133('0x120')](db[_0x7133('0x5b')],{'as':_0x7133('0x136'),'through':_0x7133('0x34'),'required':![]});db[_0x7133('0x12')][_0x7133('0x120')](db['WhatsappQueue'],{'as':'WhatsappQueues','through':'UserWhatsappQueue','required':![]});db['User'][_0x7133('0x120')](db[_0x7133('0x125')],{'through':_0x7133('0x127')});db['User'][_0x7133('0x120')](db[_0x7133('0x137')],{'as':_0x7133('0x138'),'through':_0x7133('0x139')});db[_0x7133('0x12')][_0x7133('0x120')](db[_0x7133('0x47')],{'as':'FaxAccounts','through':_0x7133('0x13a')});db['User']['belongsToMany'](db['MailAccount'],{'as':_0x7133('0x13b'),'through':_0x7133('0x13c')});db[_0x7133('0x12')][_0x7133('0x120')](db[_0x7133('0x56')],{'as':_0x7133('0x13d'),'through':_0x7133('0x13e')});db['User'][_0x7133('0x120')](db[_0x7133('0x13f')],{'as':_0x7133('0x140'),'through':_0x7133('0x141')});db[_0x7133('0x12')][_0x7133('0x120')](db[_0x7133('0xf9')],{'as':_0x7133('0x142'),'through':_0x7133('0x143')});db[_0x7133('0x15')][_0x7133('0x111')](db[_0x7133('0x19')],{'as':_0x7133('0x144'),'onDelete':_0x7133('0x10e'),'foreignKey':'ChanSpyId'});db['VoiceContext'][_0x7133('0x111')](db[_0x7133('0x19')],{'onDelete':_0x7133('0x10e')});db[_0x7133('0x19')][_0x7133('0x111')](db[_0x7133('0x19')],{'as':_0x7133('0x145'),'onDelete':_0x7133('0x10e')});db[_0x7133('0x1b')][_0x7133('0x120')](db[_0x7133('0x87')],{'as':_0x7133('0x146'),'through':_0x7133('0x147')});db[_0x7133('0x130')][_0x7133('0x111')](db[_0x7133('0x2a')],{'as':_0x7133('0x148'),'foreignKey':_0x7133('0x149')});db[_0x7133('0x130')][_0x7133('0x111')](db['CmHopper'],{'as':_0x7133('0x14a'),'foreignKey':_0x7133('0x149')});db[_0x7133('0x130')][_0x7133('0x111')](db[_0x7133('0x115')],{'as':'HopperFinals','foreignKey':_0x7133('0x149')});db[_0x7133('0x130')]['hasMany'](db[_0x7133('0x70')],{'as':_0x7133('0x14b'),'foreignKey':_0x7133('0x149')});db[_0x7133('0x130')][_0x7133('0x111')](db['ReportAgentPreview'],{'as':_0x7133('0x72'),'foreignKey':_0x7133('0x149')});db[_0x7133('0x130')]['hasMany'](db['CmHopperBlack'],{'as':_0x7133('0x14c'),'foreignKey':_0x7133('0x149')});db[_0x7133('0x130')][_0x7133('0x111')](db['JscriptySessionReport'],{'as':'JscriptySessions','foreignKey':_0x7133('0x149')});db[_0x7133('0x130')]['belongsTo'](db['Trunk'],{'as':_0x7133('0x14d'),'foreignKey':'TrunkId'});db[_0x7133('0x130')][_0x7133('0x11f')](db[_0x7133('0x14d')],{'as':'TrunkBackup','foreignKey':_0x7133('0x14e')});db[_0x7133('0x130')][_0x7133('0x11f')](db[_0x7133('0x14f')],{'as':_0x7133('0x14f'),'foreignKey':_0x7133('0x150')});db[_0x7133('0x130')][_0x7133('0x11f')](db[_0x7133('0x80')],{'as':'mandatoryDispositionPause','foreignKey':_0x7133('0x151')});db['VoiceQueue'][_0x7133('0x120')](db[_0x7133('0x125')],{'as':_0x7133('0x126'),'through':_0x7133('0x152')});db[_0x7133('0x130')][_0x7133('0x120')](db[_0x7133('0x12')],{'as':'Agents','through':_0x7133('0x2c')});db['VoiceQueue'][_0x7133('0x120')](db['Team'],{'as':_0x7133('0x153'),'through':_0x7133('0x106')});db[_0x7133('0x130')][_0x7133('0x120')](db[_0x7133('0x125')],{'as':_0x7133('0x154'),'through':_0x7133('0x155')});db['VoiceRecording'][_0x7133('0x11f')](db['User'],{'as':_0x7133('0x12'),'foreignKey':_0x7133('0x10f')});db[_0x7133('0x1e')][_0x7133('0x11f')](db[_0x7133('0x12')],{'as':_0x7133('0x12'),'foreignKey':_0x7133('0x10f')});db[_0x7133('0x20')][_0x7133('0x111')](db[_0x7133('0x22')],{'as':_0x7133('0x156'),'onDelete':'cascade','foreignKey':_0x7133('0x157'),'sourceKey':_0x7133('0x158')});db[_0x7133('0x22')][_0x7133('0x11f')](db[_0x7133('0x20')],{'foreignKey':'mailboxuser','targetKey':'mailbox'});db[_0x7133('0x159')][_0x7133('0x111')](db['VoiceQueueReport'],{'as':_0x7133('0x15a'),'foreignKey':_0x7133('0x15b'),'constraints':![]});db[_0x7133('0x159')]['hasMany'](db[_0x7133('0x25')],{'as':_0x7133('0x15c'),'foreignKey':_0x7133('0x15b'),'constraints':![]});db[_0x7133('0x159')][_0x7133('0x11f')](db[_0x7133('0x12')],{'as':_0x7133('0x12'),'foreignKey':'UserId'});db[_0x7133('0x159')][_0x7133('0x11f')](db[_0x7133('0x123')],{'as':_0x7133('0x15d'),'foreignKey':_0x7133('0x15e')});db[_0x7133('0x37')][_0x7133('0x11f')](db['MailAccount'],{'as':_0x7133('0x3b'),'foreignKey':_0x7133('0x15f')});db[_0x7133('0x37')]['belongsTo'](db[_0x7133('0x104')],{'as':_0x7133('0x104'),'foreignKey':_0x7133('0x160'),'onDelete':_0x7133('0x161')});db[_0x7133('0x39')][_0x7133('0x11f')](db[_0x7133('0x3b')],{'as':_0x7133('0x3b'),'foreignKey':_0x7133('0x15f')});db['MailServerOut'][_0x7133('0x11f')](db[_0x7133('0x104')],{'as':'CloudProvider','foreignKey':_0x7133('0x160'),'onDelete':_0x7133('0x161')});db[_0x7133('0x3b')]['hasOne'](db[_0x7133('0x37')],{'as':'Imap','onDelete':_0x7133('0x10e')});db[_0x7133('0x3b')][_0x7133('0x10d')](db['MailServerOut'],{'as':'Smtp','onDelete':_0x7133('0x10e')});db['MailAccount']['hasMany'](db[_0x7133('0x7b')],{'as':_0x7133('0x162'),'foreignKey':'MailAccountId','onDelete':_0x7133('0x10e')});db[_0x7133('0x3b')][_0x7133('0x111')](db[_0x7133('0x79')],{'as':_0x7133('0x163'),'foreignKey':_0x7133('0x15f')});db[_0x7133('0x3b')][_0x7133('0x111')](db[_0x7133('0x41')],{'as':_0x7133('0x156'),'foreignKey':_0x7133('0x15f')});db[_0x7133('0x3b')][_0x7133('0x111')](db[_0x7133('0x40')],{'as':_0x7133('0x164')});db[_0x7133('0x3b')]['hasMany'](db[_0x7133('0x165')],{'as':_0x7133('0x145'),'foreignKey':'MailAccountId','onDelete':_0x7133('0x10e')});db['MailAccount'][_0x7133('0x11f')](db[_0x7133('0x125')],{'as':_0x7133('0x166'),'foreignKey':'ListId'});db['MailAccount']['belongsTo'](db['Template'],{'as':_0x7133('0x8d'),'foreignKey':'TemplateId'});db[_0x7133('0x3b')][_0x7133('0x11f')](db[_0x7133('0x80')],{'as':_0x7133('0x167'),'foreignKey':'mandatoryDispositionPauseId'});db[_0x7133('0x3b')][_0x7133('0x120')](db['User'],{'as':_0x7133('0x168'),'through':'user_has_mail_accounts'});db[_0x7133('0x3d')][_0x7133('0x120')](db[_0x7133('0x12')],{'as':_0x7133('0x168'),'through':'UserMailQueue'});db[_0x7133('0x3d')][_0x7133('0x120')](db[_0x7133('0xe0')],{'through':'team_has_mail_queues','as':_0x7133('0x153')});db[_0x7133('0x40')]['hasMany'](db[_0x7133('0x41')],{'as':'Messages','onDelete':_0x7133('0x10e'),'foreignKey':'MailInteractionId'});db[_0x7133('0x40')][_0x7133('0x11f')](db[_0x7133('0x3b')],{'as':_0x7133('0x169'),'foreignKey':_0x7133('0x15f')});db[_0x7133('0x40')][_0x7133('0x11f')](db[_0x7133('0x123')],{'as':_0x7133('0x15d'),'foreignKey':'ContactId'});db[_0x7133('0x40')][_0x7133('0x11f')](db[_0x7133('0x12')],{'as':_0x7133('0x16a'),'foreignKey':_0x7133('0x10f')});db[_0x7133('0x40')][_0x7133('0x120')](db[_0x7133('0x16b')],{'through':_0x7133('0x16c'),'as':_0x7133('0x16d')});db[_0x7133('0x40')][_0x7133('0x120')](db[_0x7133('0x16b')],{'through':_0x7133('0x16c'),'as':_0x7133('0x16e')});db['MailInteraction'][_0x7133('0x120')](db[_0x7133('0x12')],{'as':_0x7133('0x16f'),'through':_0x7133('0x128'),'foreignKey':_0x7133('0x170')});db[_0x7133('0x41')][_0x7133('0x111')](db[_0x7133('0x171')],{'as':_0x7133('0x172'),'onDelete':_0x7133('0x10e')});db[_0x7133('0x41')][_0x7133('0x11f')](db[_0x7133('0x12')],{'as':_0x7133('0x12')});db[_0x7133('0x41')][_0x7133('0x11f')](db[_0x7133('0x123')],{'onDelete':_0x7133('0x10e'),'as':_0x7133('0x15d')});db[_0x7133('0x41')]['belongsTo'](db['MailInteraction'],{'as':_0x7133('0x173'),'foreignKey':'MailInteractionId'});db[_0x7133('0x41')][_0x7133('0x11f')](db['MailAccount'],{'as':'Account','foreignKey':_0x7133('0x15f')});db[_0x7133('0x41')][_0x7133('0x11f')](db[_0x7133('0x137')],{'as':_0x7133('0x137'),'foreignKey':'ChatWebsiteId'});db[_0x7133('0x41')]['belongsTo'](db[_0x7133('0x63')],{'as':_0x7133('0x63'),'foreignKey':_0x7133('0x174')});db[_0x7133('0x165')][_0x7133('0x11f')](db['User'],{'onDelete':_0x7133('0x161')});db[_0x7133('0x165')]['belongsTo'](db[_0x7133('0x3d')],{'onDelete':_0x7133('0x161')});db[_0x7133('0x165')][_0x7133('0x11f')](db['MailAccount'],{'onDelete':_0x7133('0x161')});db[_0x7133('0x165')]['belongsTo'](db[_0x7133('0x14f')],{'onDelete':'restrict','foreignKey':_0x7133('0x150')});db[_0x7133('0x165')][_0x7133('0x11f')](db['Tag'],{'onDelete':_0x7133('0x161'),'foreignKey':_0x7133('0x175')});db[_0x7133('0x176')][_0x7133('0x11f')](db[_0x7133('0x3b')],{});db[_0x7133('0x176')]['belongsTo'](db[_0x7133('0x125')],{'as':_0x7133('0x166'),'foreignKey':_0x7133('0x177')});db[_0x7133('0x176')][_0x7133('0x11f')](db[_0x7133('0x123')],{'as':_0x7133('0x15d'),'foreignKey':_0x7133('0x15e')});db[_0x7133('0x176')][_0x7133('0x11f')](db[_0x7133('0x40')],{});db['MailQueueReport'][_0x7133('0x11f')](db[_0x7133('0x41')],{});db['MailQueueReport'][_0x7133('0x11f')](db[_0x7133('0x12')],{});db[_0x7133('0x176')][_0x7133('0x11f')](db[_0x7133('0x3d')],{});db[_0x7133('0x178')]['hasMany'](db[_0x7133('0x45')],{'as':_0x7133('0x179'),'onDelete':_0x7133('0x10e')});db['FaxAccount']['hasMany'](db[_0x7133('0x7b')],{'as':_0x7133('0x162'),'foreignKey':_0x7133('0x17a'),'onDelete':_0x7133('0x10e')});db[_0x7133('0x47')][_0x7133('0x111')](db[_0x7133('0x79')],{'as':_0x7133('0x163'),'foreignKey':_0x7133('0x17a')});db[_0x7133('0x47')][_0x7133('0x111')](db[_0x7133('0x11a')],{'as':'Interactions'});db[_0x7133('0x47')][_0x7133('0x111')](db[_0x7133('0x49')],{'as':_0x7133('0x145'),'foreignKey':_0x7133('0x17a'),'onDelete':_0x7133('0x10e')});db[_0x7133('0x47')][_0x7133('0x111')](db[_0x7133('0x19')],{'as':_0x7133('0x17b'),'onDelete':'cascade'});db[_0x7133('0x47')][_0x7133('0x111')](db[_0x7133('0x4a')],{'as':_0x7133('0x156')});db[_0x7133('0x47')][_0x7133('0x11f')](db['Trunk'],{'as':_0x7133('0x14d')});db['FaxAccount'][_0x7133('0x11f')](db[_0x7133('0x125')],{'as':_0x7133('0x166'),'foreignKey':'ListId'});db[_0x7133('0x47')]['belongsTo'](db[_0x7133('0x80')],{'as':_0x7133('0x167'),'foreignKey':_0x7133('0x151')});db[_0x7133('0x47')][_0x7133('0x120')](db[_0x7133('0x12')],{'as':_0x7133('0x168'),'through':_0x7133('0x13a')});db['FaxApplication'][_0x7133('0x11f')](db[_0x7133('0x12')],{'onDelete':_0x7133('0x161')});db[_0x7133('0x49')][_0x7133('0x11f')](db[_0x7133('0x4c')],{'onDelete':_0x7133('0x161')});db[_0x7133('0x49')][_0x7133('0x11f')](db[_0x7133('0x47')],{'onDelete':'restrict'});db[_0x7133('0x49')][_0x7133('0x11f')](db['Tag'],{'onDelete':_0x7133('0x161'),'foreignKey':'TagId'});db[_0x7133('0x11a')][_0x7133('0x111')](db['FaxMessage'],{'as':_0x7133('0x156'),'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x17c')});db['FaxInteraction']['belongsTo'](db[_0x7133('0x47')],{'as':_0x7133('0x169'),'foreignKey':_0x7133('0x17a')});db[_0x7133('0x11a')][_0x7133('0x11f')](db[_0x7133('0x123')],{'as':'Contact','foreignKey':_0x7133('0x15e')});db[_0x7133('0x11a')][_0x7133('0x11f')](db[_0x7133('0x12')],{'as':_0x7133('0x16a'),'foreignKey':_0x7133('0x10f')});db[_0x7133('0x11a')]['belongsToMany'](db['Tag'],{'through':_0x7133('0x17d'),'as':_0x7133('0x16d')});db[_0x7133('0x11a')][_0x7133('0x120')](db[_0x7133('0x16b')],{'through':'fax_interaction_has_tags','as':_0x7133('0x16e')});db[_0x7133('0x11a')]['belongsToMany'](db[_0x7133('0x12')],{'as':_0x7133('0x16f'),'through':'user_has_fax_interactions','foreignKey':_0x7133('0x17c')});db[_0x7133('0x4a')]['belongsTo'](db['User'],{'onDelete':_0x7133('0x10e'),'as':_0x7133('0x12')});db['FaxMessage'][_0x7133('0x11f')](db[_0x7133('0x11a')],{'as':_0x7133('0x173'),'foreignKey':_0x7133('0x17c')});db[_0x7133('0x4a')]['belongsTo'](db[_0x7133('0x123')],{'onDelete':'cascade','as':'Contact'});db[_0x7133('0x4a')]['belongsTo'](db['Attachment'],{'as':_0x7133('0x171'),'foreignKey':_0x7133('0x17e')});db[_0x7133('0x4a')][_0x7133('0x11f')](db['FaxAccount'],{'as':_0x7133('0x169'),'foreignKey':'FaxAccountId'});db['FaxQueue'][_0x7133('0x120')](db[_0x7133('0x12')],{'as':_0x7133('0x168'),'through':_0x7133('0x30')});db[_0x7133('0x4c')][_0x7133('0x120')](db[_0x7133('0xe0')],{'through':_0x7133('0x17f'),'as':_0x7133('0x153')});db['FaxQueueReport']['belongsTo'](db[_0x7133('0x47')],{});db[_0x7133('0x4e')][_0x7133('0x11f')](db[_0x7133('0x125')],{'as':_0x7133('0x166'),'foreignKey':_0x7133('0x177')});db[_0x7133('0x4e')][_0x7133('0x11f')](db[_0x7133('0x123')],{'as':_0x7133('0x15d'),'foreignKey':'ContactId'});db[_0x7133('0x4e')][_0x7133('0x11f')](db[_0x7133('0x11a')],{});db[_0x7133('0x4e')][_0x7133('0x11f')](db[_0x7133('0x4a')],{});db['FaxQueueReport'][_0x7133('0x11f')](db[_0x7133('0x12')],{});db[_0x7133('0x4e')]['belongsTo'](db[_0x7133('0x4c')],{});db[_0x7133('0x13f')][_0x7133('0x111')](db[_0x7133('0x7b')],{'as':_0x7133('0x162'),'foreignKey':_0x7133('0x180'),'onDelete':'cascade'});db['SmsAccount'][_0x7133('0x111')](db[_0x7133('0x79')],{'as':_0x7133('0x163'),'foreignKey':_0x7133('0x180')});db[_0x7133('0x13f')][_0x7133('0x111')](db[_0x7133('0x52')],{'as':_0x7133('0x156'),'foreignKey':_0x7133('0x180')});db[_0x7133('0x13f')]['hasMany'](db['SmsInteraction'],{'as':_0x7133('0x164')});db[_0x7133('0x13f')][_0x7133('0x111')](db[_0x7133('0x181')],{'as':_0x7133('0x145'),'foreignKey':'SmsAccountId','onDelete':_0x7133('0x10e')});db[_0x7133('0x13f')][_0x7133('0x11f')](db[_0x7133('0x125')],{'as':_0x7133('0x166'),'foreignKey':'ListId'});db['SmsAccount'][_0x7133('0x11f')](db[_0x7133('0x80')],{'as':_0x7133('0x167'),'foreignKey':_0x7133('0x151')});db['SmsAccount'][_0x7133('0x120')](db[_0x7133('0x12')],{'as':'Agents','through':_0x7133('0x141')});db[_0x7133('0x181')][_0x7133('0x11f')](db[_0x7133('0x12')],{'onDelete':'restrict'});db[_0x7133('0x181')][_0x7133('0x11f')](db['SmsQueue'],{'onDelete':_0x7133('0x161')});db[_0x7133('0x181')][_0x7133('0x11f')](db['SmsAccount'],{'onDelete':_0x7133('0x161')});db[_0x7133('0x181')][_0x7133('0x11f')](db[_0x7133('0x14f')],{'onDelete':_0x7133('0x161'),'foreignKey':'IntervalId'});db['SmsApplication'][_0x7133('0x11f')](db['Tag'],{'onDelete':_0x7133('0x161'),'foreignKey':_0x7133('0x175')});db[_0x7133('0x118')]['hasMany'](db[_0x7133('0x52')],{'as':_0x7133('0x156'),'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x182')});db[_0x7133('0x118')][_0x7133('0x11f')](db['SmsAccount'],{'as':_0x7133('0x169'),'foreignKey':_0x7133('0x180')});db[_0x7133('0x118')][_0x7133('0x11f')](db[_0x7133('0x123')],{'as':_0x7133('0x15d'),'foreignKey':_0x7133('0x15e')});db[_0x7133('0x118')][_0x7133('0x11f')](db[_0x7133('0x12')],{'as':_0x7133('0x16a'),'foreignKey':_0x7133('0x10f')});db[_0x7133('0x118')]['belongsToMany'](db[_0x7133('0x16b')],{'through':_0x7133('0x183'),'as':_0x7133('0x16d')});db[_0x7133('0x118')]['belongsToMany'](db[_0x7133('0x16b')],{'through':_0x7133('0x183'),'as':_0x7133('0x16e')});db['SmsInteraction'][_0x7133('0x120')](db[_0x7133('0x12')],{'as':_0x7133('0x16f'),'through':_0x7133('0x12d'),'foreignKey':'SmsInteractionId'});db[_0x7133('0x52')][_0x7133('0x11f')](db[_0x7133('0x12')],{'as':'User'});db[_0x7133('0x52')][_0x7133('0x11f')](db['CmContact'],{'onDelete':_0x7133('0x10e'),'as':_0x7133('0x15d')});db[_0x7133('0x52')][_0x7133('0x11f')](db['SmsInteraction'],{'onDelete':_0x7133('0x10e'),'as':_0x7133('0x173'),'foreignKey':_0x7133('0x182')});db[_0x7133('0x52')][_0x7133('0x11f')](db[_0x7133('0x13f')],{'as':_0x7133('0x169'),'foreignKey':_0x7133('0x180')});db['SmsQueue'][_0x7133('0x120')](db[_0x7133('0x12')],{'as':_0x7133('0x168'),'through':_0x7133('0x32'),'foreignKey':_0x7133('0x184')});db['SmsQueue'][_0x7133('0x120')](db[_0x7133('0xe0')],{'through':_0x7133('0x185'),'as':_0x7133('0x153')});db['OpenchannelAccount']['hasMany'](db['Disposition'],{'as':'Dispositions','foreignKey':_0x7133('0x186'),'onDelete':_0x7133('0x10e')});db['OpenchannelAccount']['hasMany'](db[_0x7133('0x79')],{'as':_0x7133('0x163'),'foreignKey':_0x7133('0x186')});db[_0x7133('0x56')]['hasMany'](db[_0x7133('0x117')],{'as':_0x7133('0x164'),'foreignKey':'OpenchannelAccountId'});db['OpenchannelAccount'][_0x7133('0x111')](db[_0x7133('0x5a')],{'as':_0x7133('0x156'),'foreignKey':_0x7133('0x186')});db[_0x7133('0x56')][_0x7133('0x111')](db[_0x7133('0x187')],{'as':_0x7133('0x145'),'foreignKey':_0x7133('0x186'),'onDelete':_0x7133('0x10e')});db[_0x7133('0x56')][_0x7133('0x11f')](db[_0x7133('0x125')],{'as':_0x7133('0x166'),'foreignKey':_0x7133('0x177')});db[_0x7133('0x56')][_0x7133('0x11f')](db[_0x7133('0x80')],{'as':_0x7133('0x167'),'foreignKey':'mandatoryDispositionPauseId'});db[_0x7133('0x56')][_0x7133('0x120')](db[_0x7133('0x12')],{'as':_0x7133('0x168'),'through':_0x7133('0x13e')});db[_0x7133('0x187')][_0x7133('0x11f')](db[_0x7133('0x12')],{'onDelete':'restrict'});db['OpenchannelApplication'][_0x7133('0x11f')](db[_0x7133('0x5b')],{'onDelete':'restrict','foreignKey':_0x7133('0x188')});db[_0x7133('0x187')][_0x7133('0x11f')](db[_0x7133('0x56')],{'onDelete':_0x7133('0x161'),'foreignKey':_0x7133('0x186')});db[_0x7133('0x187')]['belongsTo'](db[_0x7133('0x14f')],{'onDelete':_0x7133('0x161'),'foreignKey':'IntervalId'});db[_0x7133('0x187')][_0x7133('0x11f')](db[_0x7133('0x16b')],{'onDelete':'restrict','foreignKey':_0x7133('0x175')});db['OpenchannelInteraction'][_0x7133('0x111')](db[_0x7133('0x5a')],{'as':_0x7133('0x156'),'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x189')});db[_0x7133('0x117')][_0x7133('0x11f')](db['OpenchannelAccount'],{'as':_0x7133('0x169'),'foreignKey':'OpenchannelAccountId'});db['OpenchannelInteraction'][_0x7133('0x11f')](db[_0x7133('0x123')],{'as':_0x7133('0x15d'),'foreignKey':_0x7133('0x15e')});db['OpenchannelInteraction'][_0x7133('0x11f')](db[_0x7133('0x12')],{'as':'Owner','foreignKey':_0x7133('0x10f')});db[_0x7133('0x117')][_0x7133('0x120')](db[_0x7133('0x16b')],{'through':_0x7133('0x18a'),'as':_0x7133('0x16d')});db[_0x7133('0x117')]['belongsToMany'](db[_0x7133('0x16b')],{'through':'openchannel_interaction_has_tags','as':_0x7133('0x16e')});db[_0x7133('0x117')][_0x7133('0x120')](db['User'],{'as':'Users','through':_0x7133('0x12e'),'foreignKey':_0x7133('0x189')});db['OpenchannelMessage']['belongsTo'](db[_0x7133('0x12')],{'onDelete':_0x7133('0x10e'),'as':_0x7133('0x12')});db[_0x7133('0x5a')][_0x7133('0x11f')](db[_0x7133('0x123')],{'onDelete':_0x7133('0x10e'),'as':_0x7133('0x15d')});db[_0x7133('0x5a')][_0x7133('0x11f')](db[_0x7133('0x117')],{'onDelete':_0x7133('0x10e'),'as':_0x7133('0x173'),'foreignKey':_0x7133('0x189')});db[_0x7133('0x5a')][_0x7133('0x11f')](db[_0x7133('0x171')],{'as':_0x7133('0x171'),'foreignKey':_0x7133('0x17e')});db[_0x7133('0x5a')][_0x7133('0x11f')](db[_0x7133('0x56')],{'as':_0x7133('0x169'),'foreignKey':_0x7133('0x186')});db['OpenchannelQueue'][_0x7133('0x120')](db[_0x7133('0x12')],{'as':_0x7133('0x168'),'through':_0x7133('0x34'),'foreignKey':_0x7133('0x188')});db[_0x7133('0x5b')][_0x7133('0x120')](db[_0x7133('0xe0')],{'through':_0x7133('0x18b'),'as':'Teams'});db[_0x7133('0x137')][_0x7133('0x111')](db[_0x7133('0x7b')],{'as':_0x7133('0x162'),'foreignKey':_0x7133('0x18c'),'onDelete':_0x7133('0x10e')});db[_0x7133('0x137')]['hasMany'](db['CannedAnswer'],{'as':_0x7133('0x163'),'foreignKey':_0x7133('0x18c')});db[_0x7133('0x137')][_0x7133('0x111')](db[_0x7133('0x18d')],{'as':_0x7133('0x18e')});db[_0x7133('0x137')][_0x7133('0x111')](db[_0x7133('0x60')],{'as':'Interactions'});db[_0x7133('0x137')][_0x7133('0x111')](db[_0x7133('0x5e')],{'as':'Applications','foreignKey':_0x7133('0x18c'),'onDelete':_0x7133('0x10e')});db[_0x7133('0x137')][_0x7133('0x111')](db[_0x7133('0x18f')],{'as':_0x7133('0x156')});db[_0x7133('0x137')][_0x7133('0x11f')](db[_0x7133('0x125')],{'as':'List','foreignKey':'ListId'});db[_0x7133('0x137')][_0x7133('0x11f')](db['Interval'],{'as':_0x7133('0x14f'),'foreignKey':'IntervalId'});db[_0x7133('0x137')]['belongsTo'](db[_0x7133('0x3b')],{'as':_0x7133('0x3b'),'foreignKey':_0x7133('0x15f')});db[_0x7133('0x137')][_0x7133('0x11f')](db[_0x7133('0x80')],{'as':_0x7133('0x167'),'foreignKey':_0x7133('0x151')});db[_0x7133('0x137')][_0x7133('0x120')](db[_0x7133('0x12')],{'as':_0x7133('0x168'),'through':_0x7133('0x139')});db['OpenchannelQueueReport'][_0x7133('0x11f')](db['OpenchannelAccount'],{});db[_0x7133('0x190')][_0x7133('0x11f')](db[_0x7133('0x125')],{'as':_0x7133('0x166'),'foreignKey':_0x7133('0x177')});db[_0x7133('0x190')][_0x7133('0x11f')](db[_0x7133('0x123')],{'as':'Contact','foreignKey':_0x7133('0x15e')});db['OpenchannelQueueReport'][_0x7133('0x11f')](db[_0x7133('0x117')],{});db[_0x7133('0x190')]['belongsTo'](db[_0x7133('0x5a')],{});db[_0x7133('0x190')][_0x7133('0x11f')](db[_0x7133('0x12')],{});db['OpenchannelQueueReport'][_0x7133('0x11f')](db[_0x7133('0x5b')],{});db[_0x7133('0x5e')]['belongsTo'](db[_0x7133('0x12')],{'as':_0x7133('0x191'),'foreignKey':_0x7133('0x10f'),'onDelete':_0x7133('0x161')});db[_0x7133('0x5e')][_0x7133('0x11f')](db[_0x7133('0x65')],{'as':_0x7133('0x192'),'foreignKey':_0x7133('0x193'),'onDelete':_0x7133('0x161')});db[_0x7133('0x5e')][_0x7133('0x11f')](db[_0x7133('0x137')],{'as':'Website','foreignKey':'ChatWebsiteId','onDelete':_0x7133('0x161')});db[_0x7133('0x5e')][_0x7133('0x11f')](db[_0x7133('0x16b')],{'onDelete':_0x7133('0x161'),'foreignKey':_0x7133('0x175')});db['ChatInteraction'][_0x7133('0x111')](db['ChatMessage'],{'as':_0x7133('0x156'),'onDelete':'cascade','foreignKey':_0x7133('0x194')});db[_0x7133('0x60')][_0x7133('0x11f')](db[_0x7133('0x137')],{'as':_0x7133('0x169'),'foreignKey':'ChatWebsiteId'});db[_0x7133('0x60')][_0x7133('0x11f')](db[_0x7133('0x123')],{'as':_0x7133('0x15d'),'foreignKey':_0x7133('0x15e')});db[_0x7133('0x60')][_0x7133('0x11f')](db[_0x7133('0x12')],{'as':'Owner','foreignKey':_0x7133('0x10f')});db['ChatInteraction'][_0x7133('0x120')](db[_0x7133('0x16b')],{'through':_0x7133('0x195'),'as':'Tags'});db[_0x7133('0x60')][_0x7133('0x120')](db[_0x7133('0x16b')],{'through':_0x7133('0x195'),'as':_0x7133('0x16e')});db[_0x7133('0x60')][_0x7133('0x120')](db[_0x7133('0x12')],{'as':_0x7133('0x16f'),'through':_0x7133('0x12a'),'foreignKey':_0x7133('0x194')});db[_0x7133('0x18f')]['belongsTo'](db[_0x7133('0x12')],{'onDelete':_0x7133('0x10e'),'as':_0x7133('0x12')});db[_0x7133('0x18f')][_0x7133('0x11f')](db[_0x7133('0x123')],{'onDelete':'cascade','as':_0x7133('0x15d'),'foreignKey':'ContactId'});db[_0x7133('0x18f')]['belongsTo'](db[_0x7133('0x60')],{'onDelete':_0x7133('0x10e'),'as':_0x7133('0x173'),'foreignKey':_0x7133('0x194')});db[_0x7133('0x18f')]['belongsTo'](db[_0x7133('0x171')],{'as':_0x7133('0x171'),'foreignKey':'AttachmentId'});db[_0x7133('0x18f')][_0x7133('0x11f')](db[_0x7133('0x137')],{'as':'Account','foreignKey':_0x7133('0x18c')});db['ChatOfflineMessage'][_0x7133('0x111')](db[_0x7133('0x171')],{'as':_0x7133('0x172'),'foreignKey':_0x7133('0x174'),'onDelete':_0x7133('0x10e'),'hooks':!![]});db[_0x7133('0x63')][_0x7133('0x11f')](db[_0x7133('0x123')],{'onDelete':'cascade','as':_0x7133('0x15d'),'foreignKey':_0x7133('0x15e')});db[_0x7133('0x63')][_0x7133('0x11f')](db[_0x7133('0x137')],{'as':'Account','foreignKey':'ChatWebsiteId'});db[_0x7133('0x65')][_0x7133('0x120')](db[_0x7133('0x12')],{'as':_0x7133('0x168'),'through':_0x7133('0x133'),'hooks':!![]});db[_0x7133('0x65')][_0x7133('0x120')](db[_0x7133('0xe0')],{'through':_0x7133('0x196'),'as':'Teams'});db[_0x7133('0x67')]['hasMany'](db['ChatInternalMessage'],{'as':_0x7133('0x156'),'foreignKey':_0x7133('0x197'),'onDelete':_0x7133('0x10e')});db[_0x7133('0x67')][_0x7133('0x120')](db[_0x7133('0x12')],{'as':'Members','through':_0x7133('0x122')});db[_0x7133('0x18d')][_0x7133('0x11f')](db[_0x7133('0x137')],{'as':_0x7133('0x198'),'foreignKey':'ChatWebsiteId'});db[_0x7133('0x69')][_0x7133('0x111')](db[_0x7133('0x123')],{'as':_0x7133('0x124'),'foreignKey':'CompanyId'});db['CmContact']['hasMany'](db[_0x7133('0x8a')],{'as':_0x7133('0x199'),'foreignKey':_0x7133('0x19a')});db[_0x7133('0x123')][_0x7133('0x111')](db[_0x7133('0x6b')],{'as':_0x7133('0x14a'),'foreignKey':_0x7133('0x15e')});db[_0x7133('0x123')]['hasMany'](db[_0x7133('0x115')],{'as':_0x7133('0x19b'),'foreignKey':_0x7133('0x15e')});db[_0x7133('0x123')]['hasMany'](db['CmHopperHistory'],{'as':'HopperHistories','foreignKey':'ContactId'});db[_0x7133('0x123')]['hasMany'](db[_0x7133('0x72')],{'as':_0x7133('0x72'),'foreignKey':_0x7133('0x15e')});db[_0x7133('0x123')][_0x7133('0x111')](db[_0x7133('0xcf')],{'as':_0x7133('0x19c'),'foreignKey':_0x7133('0x15e')});db['CmContact']['hasMany'](db[_0x7133('0x117')],{'as':_0x7133('0x19d'),'foreignKey':_0x7133('0x15e'),'onDelete':_0x7133('0x161')});db[_0x7133('0x123')][_0x7133('0x111')](db[_0x7133('0x60')],{'as':_0x7133('0x129'),'foreignKey':_0x7133('0x15e'),'onDelete':_0x7133('0x161')});db[_0x7133('0x123')][_0x7133('0x111')](db[_0x7133('0x118')],{'as':_0x7133('0x119'),'foreignKey':'ContactId','onDelete':'restrict'});db[_0x7133('0x123')][_0x7133('0x111')](db[_0x7133('0x11a')],{'as':_0x7133('0x12b'),'foreignKey':'ContactId','onDelete':_0x7133('0x161')});db[_0x7133('0x123')][_0x7133('0x111')](db['MailInteraction'],{'as':_0x7133('0x11b'),'foreignKey':_0x7133('0x15e'),'onDelete':'restrict'});db['CmContact'][_0x7133('0x11f')](db[_0x7133('0x69')],{'as':'Company','foreignKey':'CompanyId'});db[_0x7133('0x123')][_0x7133('0x11f')](db['CmList'],{'as':_0x7133('0x166'),'foreignKey':_0x7133('0x177'),'onDelete':'cascade'});db[_0x7133('0x123')]['belongsToMany'](db[_0x7133('0x12')],{'as':_0x7133('0x16f'),'through':_0x7133('0x19e')});db['CmContact'][_0x7133('0x120')](db[_0x7133('0x16b')],{'as':_0x7133('0x16d'),'through':_0x7133('0x19f')});db[_0x7133('0x123')]['belongsToMany'](db[_0x7133('0x16b')],{'through':_0x7133('0x19f'),'as':_0x7133('0x16e')});db[_0x7133('0x6b')]['hasMany'](db[_0x7133('0x1a0')],{'as':_0x7133('0x1a1'),'foreignKey':'CmHopperId'});db[_0x7133('0x6b')][_0x7133('0x11f')](db[_0x7133('0x123')],{'as':_0x7133('0x15d'),'foreignKey':_0x7133('0x15e'),'onDelete':_0x7133('0x10e')});db[_0x7133('0x6b')][_0x7133('0x11f')](db[_0x7133('0x125')],{'as':_0x7133('0x166'),'foreignKey':_0x7133('0x177'),'onDelete':_0x7133('0x10e')});db[_0x7133('0x6b')]['belongsTo'](db[_0x7133('0x12')],{'as':'Agent','foreignKey':_0x7133('0x10f')});db[_0x7133('0x6b')]['belongsTo'](db['VoiceQueue'],{'as':_0x7133('0x192'),'foreignKey':_0x7133('0x149'),'onDelete':_0x7133('0x10e')});db[_0x7133('0x6b')][_0x7133('0x11f')](db[_0x7133('0x1a2')],{'as':_0x7133('0x1a2'),'foreignKey':_0x7133('0x1a3'),'onDelete':_0x7133('0x10e')});db[_0x7133('0x6b')][_0x7133('0x11f')](db['User'],{'as':_0x7133('0x16a'),'foreignKey':_0x7133('0x1a4')});db['CmHopperBlack'][_0x7133('0x11f')](db[_0x7133('0x123')],{'as':'Contact','foreignKey':'ContactId','onDelete':_0x7133('0x10e')});db['CmHopperBlack'][_0x7133('0x11f')](db[_0x7133('0x125')],{'as':'List','foreignKey':_0x7133('0x177'),'onDelete':_0x7133('0x10e')});db[_0x7133('0x6d')][_0x7133('0x11f')](db['VoiceQueue'],{'as':_0x7133('0x192'),'foreignKey':_0x7133('0x149'),'onDelete':'cascade'});db['CmHopperBlack']['belongsTo'](db[_0x7133('0x1a2')],{'as':_0x7133('0x1a2'),'foreignKey':_0x7133('0x1a3'),'onDelete':_0x7133('0x10e')});db[_0x7133('0x77')][_0x7133('0x111')](db['Condition'],{'as':{'plural':_0x7133('0x1a5'),'singular':_0x7133('0x1a6')},'foreignKey':_0x7133('0x1a7'),'onDelete':_0x7133('0x10e'),'hooks':!![]});db['Automation'][_0x7133('0x111')](db[_0x7133('0x7d')],{'as':{'plural':_0x7133('0x1a8'),'singular':_0x7133('0x1a9')},'foreignKey':_0x7133('0x1aa'),'onDelete':_0x7133('0x10e'),'hooks':!![]});db[_0x7133('0x77')][_0x7133('0x111')](db[_0x7133('0x75')],{'as':_0x7133('0x1ab'),'foreignKey':_0x7133('0x1ac'),'onDelete':_0x7133('0x10e'),'hooks':!![]});db[_0x7133('0x7b')][_0x7133('0x111')](db[_0x7133('0x7b')],{'as':_0x7133('0x162'),'foreignKey':_0x7133('0x1ad'),'onDelete':_0x7133('0x10e')});db[_0x7133('0x14f')]['hasMany'](db['Interval'],{'as':'Intervals','foreignKey':_0x7133('0x150'),'onDelete':'cascade','hooks':!![],'required':![]});db[_0x7133('0x14f')]['hasMany'](db['VoiceExtension'],{'as':_0x7133('0x114'),'foreignKey':_0x7133('0x150'),'onDelete':'restrict'});db[_0x7133('0x14f')]['hasMany'](db['MailApplication'],{'as':'MailApplications','foreignKey':_0x7133('0x150')});db[_0x7133('0x14f')]['hasMany'](db[_0x7133('0x5e')],{'as':_0x7133('0x1ae'),'foreignKey':'IntervalId'});db['Interval'][_0x7133('0x111')](db[_0x7133('0x49')],{'as':_0x7133('0x1af'),'foreignKey':_0x7133('0x150')});db[_0x7133('0x14f')][_0x7133('0x111')](db[_0x7133('0x181')],{'as':_0x7133('0x1b0'),'foreignKey':'IntervalId'});db['Schedule'][_0x7133('0x11f')](db[_0x7133('0x3b')],{});db[_0x7133('0x85')][_0x7133('0x11f')](db['AnalyticDefaultReport'],{'foreignKey':_0x7133('0x1b1')});db[_0x7133('0x85')][_0x7133('0x11f')](db[_0x7133('0x95')],{'foreignKey':'CustomReportId'});db['Sound'][_0x7133('0x120')](db['VoiceMusicOnHold'],{'as':_0x7133('0x1b2'),'through':_0x7133('0x147'),'onDelete':_0x7133('0x161')});db[_0x7133('0x16b')][_0x7133('0x120')](db[_0x7133('0x123')],{'through':_0x7133('0x19f')});db[_0x7133('0x16b')]['belongsToMany'](db['ChatInteraction'],{'through':_0x7133('0x195')});db[_0x7133('0x16b')][_0x7133('0x120')](db[_0x7133('0x40')],{'through':'mail_interaction_has_tags'});db[_0x7133('0x16b')][_0x7133('0x120')](db['SmsInteraction'],{'through':_0x7133('0x183')});db['Tag'][_0x7133('0x120')](db[_0x7133('0x11a')],{'through':_0x7133('0x17d')});db[_0x7133('0x16b')]['belongsToMany'](db[_0x7133('0x117')],{'through':_0x7133('0x18a')});db[_0x7133('0x16b')][_0x7133('0x120')](db['WhatsappInteraction'],{'through':_0x7133('0x1b3')});db[_0x7133('0x8a')][_0x7133('0x11f')](db[_0x7133('0x89')],{'as':_0x7133('0x1b4'),'foreignKey':_0x7133('0x1b5')});db[_0x7133('0x1a0')][_0x7133('0x11f')](db['CmHopper'],{'as':_0x7133('0x1b6'),'foreignKey':'CmHopperId'});db['CmContactHasItem']['belongsTo'](db[_0x7133('0x123')],{'as':'Contact','foreignKey':_0x7133('0x19a')});db[_0x7133('0x8e')][_0x7133('0x111')](db[_0x7133('0x7d')],{'as':{'plural':_0x7133('0x1b7'),'singular':_0x7133('0x1b8')},'foreignKey':'TriggerAllId','onDelete':_0x7133('0x10e'),'hooks':!![]});db['Trigger'][_0x7133('0x111')](db[_0x7133('0x7d')],{'as':{'plural':_0x7133('0x1b9'),'singular':_0x7133('0x1ba')},'foreignKey':_0x7133('0x1bb'),'onDelete':_0x7133('0x10e'),'hooks':!![]});db[_0x7133('0x8e')][_0x7133('0x111')](db[_0x7133('0x75')],{'as':_0x7133('0x1ab'),'foreignKey':_0x7133('0x1bc'),'onDelete':_0x7133('0x10e'),'hooks':!![]});db[_0x7133('0x95')][_0x7133('0x111')](db[_0x7133('0x1bd')],{'as':_0x7133('0x1be'),'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x1bf'),'hooks':!![]});db['AnalyticDefaultReport']['hasMany'](db['AnalyticFieldReport'],{'as':_0x7133('0x1be'),'onDelete':'cascade','foreignKey':_0x7133('0x1b1')});db[_0x7133('0x99')][_0x7133('0x111')](db['AnalyticFieldReport'],{'as':'Fields','onDelete':_0x7133('0x10e'),'foreignKey':'MetricId'});db[_0x7133('0x1bd')]['belongsTo'](db[_0x7133('0x99')],{'foreignKey':_0x7133('0x1c0')});db[_0x7133('0x9c')][_0x7133('0x111')](db[_0x7133('0x1c1')],{'as':_0x7133('0x1c2'),'onDelete':'cascade','foreignKey':_0x7133('0x1c3')});db[_0x7133('0x1c1')][_0x7133('0x111')](db['SalesforceField'],{'as':_0x7133('0x1c4'),'onDelete':_0x7133('0x10e'),'foreignKey':'SubjectId'});db[_0x7133('0x1c1')][_0x7133('0x111')](db['SalesforceField'],{'as':'Descriptions','onDelete':_0x7133('0x10e'),'foreignKey':'DescriptionId'});db[_0x7133('0x1c1')][_0x7133('0x111')](db['SalesforceField'],{'as':'Fields','onDelete':'cascade','foreignKey':_0x7133('0x1c5')});db[_0x7133('0x1c1')][_0x7133('0x11f')](db['SalesforceAccount'],{'as':_0x7133('0x169'),'foreignKey':_0x7133('0x1c3')});db['SalesforceField'][_0x7133('0x111')](db[_0x7133('0x1c6')],{'as':'Subject','foreignKey':'SubjectId'});db[_0x7133('0x1c6')][_0x7133('0x111')](db[_0x7133('0x1c6')],{'as':_0x7133('0x1c7'),'foreignKey':'DescriptionId'});db[_0x7133('0x1c6')]['hasMany'](db[_0x7133('0x1c6')],{'as':_0x7133('0x1c8'),'foreignKey':_0x7133('0x1c5')});db[_0x7133('0x1c6')][_0x7133('0x11f')](db[_0x7133('0x90')],{'as':_0x7133('0x90'),'foreignKey':'VariableId'});db['SugarcrmAccount'][_0x7133('0x111')](db['SugarcrmConfiguration'],{'as':_0x7133('0x1c2'),'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x1c3')});db[_0x7133('0xa0')][_0x7133('0x111')](db[_0x7133('0x1c9')],{'as':_0x7133('0x1c4'),'onDelete':_0x7133('0x10e'),'foreignKey':'SubjectId'});db[_0x7133('0xa0')][_0x7133('0x111')](db['SugarcrmField'],{'as':_0x7133('0x1ca'),'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x1cb')});db['SugarcrmConfiguration'][_0x7133('0x111')](db[_0x7133('0x1c9')],{'as':_0x7133('0x1be'),'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x1c5')});db[_0x7133('0xa0')][_0x7133('0x11f')](db[_0x7133('0x9f')],{'as':_0x7133('0x169'),'foreignKey':'AccountId'});db[_0x7133('0x1c9')]['hasMany'](db[_0x7133('0x1c9')],{'as':'Subject','foreignKey':_0x7133('0x1cc')});db[_0x7133('0x1c9')][_0x7133('0x111')](db[_0x7133('0x1c9')],{'as':_0x7133('0x1c7'),'foreignKey':_0x7133('0x1cb')});db[_0x7133('0x1c9')]['hasMany'](db[_0x7133('0x1c9')],{'as':_0x7133('0x1c8'),'foreignKey':_0x7133('0x1c5')});db[_0x7133('0x1c9')][_0x7133('0x11f')](db[_0x7133('0x90')],{'as':_0x7133('0x90'),'foreignKey':'VariableId'});db[_0x7133('0xa2')][_0x7133('0x111')](db['DeskConfiguration'],{'as':_0x7133('0x1c2'),'onDelete':'cascade','foreignKey':_0x7133('0x1c3')});db[_0x7133('0xa4')][_0x7133('0x111')](db[_0x7133('0xa6')],{'as':_0x7133('0x1c4'),'onDelete':'cascade','foreignKey':_0x7133('0x1cc')});db[_0x7133('0xa4')][_0x7133('0x111')](db[_0x7133('0xa6')],{'as':_0x7133('0x1ca'),'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x1cb')});db[_0x7133('0xa4')][_0x7133('0x111')](db[_0x7133('0xa6')],{'as':'Fields','onDelete':'cascade','foreignKey':_0x7133('0x1c5')});db[_0x7133('0xa4')][_0x7133('0x11f')](db[_0x7133('0xa2')],{'as':_0x7133('0x169'),'foreignKey':_0x7133('0x1c3')});db[_0x7133('0xa4')][_0x7133('0x120')](db[_0x7133('0x16b')],{'through':'int_desk_configuration_has_tags'});db[_0x7133('0xa6')]['hasMany'](db[_0x7133('0xa6')],{'as':_0x7133('0x1cd'),'foreignKey':_0x7133('0x1cc')});db[_0x7133('0xa6')]['hasMany'](db[_0x7133('0xa6')],{'as':_0x7133('0x1c7'),'foreignKey':_0x7133('0x1cb')});db[_0x7133('0xa6')][_0x7133('0x111')](db[_0x7133('0xa6')],{'as':_0x7133('0x1c8'),'foreignKey':'FieldId'});db[_0x7133('0xa6')][_0x7133('0x11f')](db['Variable'],{'as':'Variable','foreignKey':_0x7133('0x1ce')});db[_0x7133('0xa8')][_0x7133('0x111')](db[_0x7133('0xa9')],{'as':_0x7133('0x1c2'),'onDelete':'cascade','foreignKey':_0x7133('0x1c3')});db[_0x7133('0xa9')][_0x7133('0x111')](db[_0x7133('0xab')],{'as':_0x7133('0x1c4'),'onDelete':'cascade','foreignKey':'SubjectId'});db[_0x7133('0xa9')]['hasMany'](db[_0x7133('0xab')],{'as':_0x7133('0x1ca'),'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x1cb')});db[_0x7133('0xa9')][_0x7133('0x111')](db[_0x7133('0xab')],{'as':_0x7133('0x1be'),'onDelete':'cascade','foreignKey':_0x7133('0x1c5')});db[_0x7133('0xa9')][_0x7133('0x11f')](db[_0x7133('0xa8')],{'as':'Account','foreignKey':'AccountId'});db[_0x7133('0xab')][_0x7133('0x111')](db['ZohoField'],{'as':_0x7133('0x1cd'),'foreignKey':'SubjectId'});db['ZohoField'][_0x7133('0x111')](db[_0x7133('0xab')],{'as':'Description','foreignKey':_0x7133('0x1cb')});db['ZohoField']['hasMany'](db[_0x7133('0xab')],{'as':_0x7133('0x1c8'),'foreignKey':_0x7133('0x1c5')});db[_0x7133('0xab')][_0x7133('0x11f')](db['Variable'],{'as':'Variable','foreignKey':_0x7133('0x1ce')});db['ZendeskAccount']['hasMany'](db['ZendeskConfiguration'],{'as':_0x7133('0x1c2'),'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x1c3')});db['ZendeskConfiguration']['hasMany'](db[_0x7133('0xb1')],{'as':_0x7133('0x1c4'),'foreignKey':_0x7133('0x1cc')});db[_0x7133('0xaf')][_0x7133('0x111')](db['ZendeskField'],{'as':_0x7133('0x1ca'),'foreignKey':_0x7133('0x1cb')});db[_0x7133('0xaf')][_0x7133('0x111')](db['ZendeskField'],{'as':_0x7133('0x1be'),'foreignKey':_0x7133('0x1c5')});db['ZendeskConfiguration']['belongsTo'](db[_0x7133('0xad')],{'as':'Account','foreignKey':'AccountId'});db[_0x7133('0xaf')][_0x7133('0x120')](db['Tag'],{'through':'int_zendesk_configuration_has_tags'});db[_0x7133('0xb1')][_0x7133('0x111')](db['ZendeskField'],{'as':_0x7133('0x1cd'),'foreignKey':_0x7133('0x1cc')});db[_0x7133('0xb1')]['hasMany'](db[_0x7133('0xb1')],{'as':'Description','foreignKey':'DescriptionId'});db[_0x7133('0xb1')][_0x7133('0x111')](db['ZendeskField'],{'as':_0x7133('0x1c8'),'foreignKey':_0x7133('0x1c5')});db[_0x7133('0xb1')][_0x7133('0x11f')](db[_0x7133('0x90')],{'as':_0x7133('0x90'),'foreignKey':_0x7133('0x1ce')});db[_0x7133('0xb3')]['hasMany'](db[_0x7133('0xb4')],{'as':'Configurations','onDelete':'cascade','foreignKey':_0x7133('0x1c3')});db['FreshdeskConfiguration'][_0x7133('0x111')](db[_0x7133('0xb6')],{'as':'Subjects','onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x1cc')});db['FreshdeskConfiguration']['hasMany'](db[_0x7133('0xb6')],{'as':_0x7133('0x1ca'),'onDelete':'cascade','foreignKey':'DescriptionId'});db[_0x7133('0xb4')]['hasMany'](db['FreshdeskField'],{'as':_0x7133('0x1be'),'onDelete':'cascade','foreignKey':_0x7133('0x1c5')});db[_0x7133('0xb4')][_0x7133('0x11f')](db[_0x7133('0xb3')],{'as':'Account','foreignKey':'AccountId'});db[_0x7133('0xb4')]['belongsToMany'](db[_0x7133('0x16b')],{'through':_0x7133('0x1cf')});db['FreshdeskField'][_0x7133('0x111')](db[_0x7133('0xb6')],{'as':'Subject','foreignKey':_0x7133('0x1cc')});db[_0x7133('0xb6')]['hasMany'](db[_0x7133('0xb6')],{'as':_0x7133('0x1c7'),'foreignKey':_0x7133('0x1cb')});db['FreshdeskField']['hasMany'](db[_0x7133('0xb6')],{'as':_0x7133('0x1c8'),'foreignKey':'FieldId'});db[_0x7133('0xb6')][_0x7133('0x11f')](db['Variable'],{'as':_0x7133('0x90'),'foreignKey':_0x7133('0x1ce')});db[_0x7133('0x1d0')][_0x7133('0x111')](db[_0x7133('0xb9')],{'as':_0x7133('0x1c2'),'onDelete':'cascade','foreignKey':_0x7133('0x1c3')});db[_0x7133('0xb9')]['hasMany'](db['VtigerField'],{'as':_0x7133('0x1c4'),'foreignKey':_0x7133('0x1cc')});db[_0x7133('0xb9')][_0x7133('0x111')](db[_0x7133('0xbb')],{'as':_0x7133('0x1ca'),'foreignKey':_0x7133('0x1cb')});db['VtigerConfiguration']['hasMany'](db[_0x7133('0xbb')],{'as':_0x7133('0x1be'),'foreignKey':'FieldId'});db[_0x7133('0xb9')][_0x7133('0x11f')](db[_0x7133('0x1d0')],{'as':_0x7133('0x169'),'foreignKey':_0x7133('0x1c3')});db[_0x7133('0xbb')][_0x7133('0x111')](db[_0x7133('0xbb')],{'as':_0x7133('0x1cd'),'foreignKey':_0x7133('0x1cc')});db[_0x7133('0xbb')][_0x7133('0x111')](db['VtigerField'],{'as':_0x7133('0x1c7'),'foreignKey':_0x7133('0x1cb')});db[_0x7133('0xbb')][_0x7133('0x111')](db[_0x7133('0xbb')],{'as':_0x7133('0x1c8'),'foreignKey':'FieldId'});db[_0x7133('0xbb')]['belongsTo'](db[_0x7133('0x90')],{'as':_0x7133('0x90'),'foreignKey':_0x7133('0x1ce')});db[_0x7133('0x1d1')][_0x7133('0x111')](db[_0x7133('0x1d2')],{'as':_0x7133('0x1c2'),'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x1c3')});db[_0x7133('0x1d2')][_0x7133('0x111')](db[_0x7133('0xbf')],{'as':_0x7133('0x1c4'),'foreignKey':_0x7133('0x1cc')});db[_0x7133('0x1d2')][_0x7133('0x111')](db[_0x7133('0xbf')],{'as':_0x7133('0x1ca'),'foreignKey':_0x7133('0x1cb')});db[_0x7133('0x1d2')][_0x7133('0x111')](db[_0x7133('0xbf')],{'as':_0x7133('0x1be'),'foreignKey':_0x7133('0x1c5')});db[_0x7133('0x1d2')]['belongsTo'](db[_0x7133('0x1d1')],{'as':_0x7133('0x169'),'foreignKey':_0x7133('0x1c3')});db[_0x7133('0xbf')][_0x7133('0x111')](db[_0x7133('0xbf')],{'as':'Subject','foreignKey':'SubjectId'});db[_0x7133('0xbf')][_0x7133('0x111')](db['ServicenowField'],{'as':_0x7133('0x1c7'),'foreignKey':'DescriptionId'});db[_0x7133('0xbf')][_0x7133('0x111')](db[_0x7133('0xbf')],{'as':_0x7133('0x1c8'),'foreignKey':_0x7133('0x1c5')});db[_0x7133('0xbf')][_0x7133('0x11f')](db['Variable'],{'as':_0x7133('0x90'),'foreignKey':_0x7133('0x1ce')});db['Dynamics365Account']['hasMany'](db['Dynamics365Configuration'],{'as':_0x7133('0x1c2'),'onDelete':_0x7133('0x10e'),'foreignKey':'AccountId'});db['Dynamics365Account'][_0x7133('0x11f')](db[_0x7133('0x104')],{'as':_0x7133('0x104'),'foreignKey':_0x7133('0x160')});db[_0x7133('0xc3')]['hasMany'](db['Dynamics365Field'],{'as':_0x7133('0x1c4'),'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x1cc')});db[_0x7133('0xc3')][_0x7133('0x111')](db[_0x7133('0xc5')],{'as':_0x7133('0x1ca'),'onDelete':_0x7133('0x10e'),'foreignKey':'DescriptionId'});db['Dynamics365Configuration'][_0x7133('0x111')](db[_0x7133('0xc5')],{'as':_0x7133('0x1be'),'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x1c5')});db[_0x7133('0xc3')][_0x7133('0x11f')](db[_0x7133('0xc1')],{'as':'Account','foreignKey':_0x7133('0x1c3')});db[_0x7133('0xc5')][_0x7133('0x111')](db['Dynamics365Field'],{'as':_0x7133('0x1cd'),'foreignKey':_0x7133('0x1cc')});db[_0x7133('0xc5')][_0x7133('0x111')](db[_0x7133('0xc5')],{'as':'Description','foreignKey':_0x7133('0x1cb')});db[_0x7133('0xc5')][_0x7133('0x111')](db['Dynamics365Field'],{'as':_0x7133('0x1c8'),'foreignKey':_0x7133('0x1c5')});db[_0x7133('0xc5')]['belongsTo'](db[_0x7133('0x90')],{'as':_0x7133('0x90'),'foreignKey':_0x7133('0x1ce')});db[_0x7133('0xc6')][_0x7133('0x111')](db[_0x7133('0x1d3')],{'as':_0x7133('0x1c2'),'onDelete':_0x7133('0x10e'),'foreignKey':'AccountId'});db[_0x7133('0x1d3')][_0x7133('0x111')](db['FreshsalesField'],{'as':_0x7133('0x1c4'),'foreignKey':_0x7133('0x1cc')});db[_0x7133('0x1d3')][_0x7133('0x111')](db[_0x7133('0x1d4')],{'as':'Descriptions','foreignKey':_0x7133('0x1cb')});db[_0x7133('0x1d3')][_0x7133('0x111')](db['FreshsalesField'],{'as':_0x7133('0x1be'),'foreignKey':'FieldId'});db[_0x7133('0x1d3')]['belongsTo'](db[_0x7133('0xc6')],{'as':_0x7133('0x169'),'foreignKey':'AccountId'});db['FreshsalesField'][_0x7133('0x111')](db[_0x7133('0x1d4')],{'as':_0x7133('0x1cd'),'foreignKey':_0x7133('0x1cc')});db['FreshsalesField'][_0x7133('0x111')](db[_0x7133('0x1d4')],{'as':_0x7133('0x1c7'),'foreignKey':_0x7133('0x1cb')});db[_0x7133('0x1d4')][_0x7133('0x111')](db[_0x7133('0x1d4')],{'as':_0x7133('0x1c8'),'foreignKey':_0x7133('0x1c5')});db[_0x7133('0x1d4')][_0x7133('0x11f')](db[_0x7133('0x90')],{'as':_0x7133('0x90'),'foreignKey':_0x7133('0x1ce')});db[_0x7133('0xca')][_0x7133('0x11f')](db[_0x7133('0x137')],{});db[_0x7133('0xca')]['belongsTo'](db['CmList'],{'as':_0x7133('0x166'),'foreignKey':_0x7133('0x177')});db['ChatQueueReport']['belongsTo'](db[_0x7133('0x123')],{'as':_0x7133('0x15d'),'foreignKey':'ContactId'});db[_0x7133('0xca')][_0x7133('0x11f')](db[_0x7133('0x60')],{});db[_0x7133('0xca')][_0x7133('0x11f')](db[_0x7133('0x18f')],{});db['ChatQueueReport'][_0x7133('0x11f')](db[_0x7133('0x12')],{});db[_0x7133('0xca')]['belongsTo'](db['ChatQueue'],{});db['ChatInternalMessage']['belongsTo'](db['User'],{'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x1d5')});db[_0x7133('0xcb')][_0x7133('0x11f')](db[_0x7133('0x12')],{'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x1d6')});db[_0x7133('0xcf')][_0x7133('0x111')](db['JscriptyQuestionReport'],{'foreignKey':'SessionId','onDelete':_0x7133('0x10e')});db[_0x7133('0xcf')][_0x7133('0x111')](db[_0x7133('0xcc')],{'foreignKey':_0x7133('0x1d7'),'onDelete':_0x7133('0x10e')});db[_0x7133('0xd1')][_0x7133('0x11f')](db[_0x7133('0x13f')],{});db[_0x7133('0xd1')][_0x7133('0x11f')](db[_0x7133('0x125')],{'as':'List','foreignKey':_0x7133('0x177')});db[_0x7133('0xd1')]['belongsTo'](db[_0x7133('0x123')],{'as':_0x7133('0x15d'),'foreignKey':_0x7133('0x15e')});db['SmsQueueReport']['belongsTo'](db[_0x7133('0x118')],{});db[_0x7133('0xd1')][_0x7133('0x11f')](db[_0x7133('0x52')],{});db[_0x7133('0xd1')]['belongsTo'](db[_0x7133('0x12')],{});db[_0x7133('0xd1')][_0x7133('0x11f')](db['SmsQueue'],{});db[_0x7133('0xd6')]['hasMany'](db['JscriptySessionReport'],{'foreignKey':'ProjectId'});db['JscriptyProject'][_0x7133('0x111')](db[_0x7133('0xcd')],{'foreignKey':_0x7133('0x1d8')});db[_0x7133('0xd6')][_0x7133('0x111')](db[_0x7133('0xcc')],{'foreignKey':'ProjectId'});db[_0x7133('0xe0')][_0x7133('0x120')](db[_0x7133('0x12')],{'as':_0x7133('0x168'),'through':'user_has_teams'});db[_0x7133('0xe0')][_0x7133('0x120')](db[_0x7133('0x130')],{'through':_0x7133('0x106'),'as':_0x7133('0x1d9')});db[_0x7133('0xe0')][_0x7133('0x120')](db[_0x7133('0x3d')],{'through':_0x7133('0x1da'),'as':'MailQueues'});db[_0x7133('0xe0')][_0x7133('0x120')](db[_0x7133('0x65')],{'through':_0x7133('0x196'),'as':_0x7133('0x1db')});db[_0x7133('0xe0')][_0x7133('0x120')](db['FaxQueue'],{'through':_0x7133('0x17f'),'as':_0x7133('0x134')});db[_0x7133('0xe0')][_0x7133('0x120')](db[_0x7133('0x54')],{'through':_0x7133('0x185'),'as':_0x7133('0x135')});db[_0x7133('0xe0')]['belongsToMany'](db[_0x7133('0x5b')],{'through':_0x7133('0x18b'),'as':'OpenchannelQueues'});db[_0x7133('0xe0')][_0x7133('0x120')](db[_0x7133('0x102')],{'through':'team_has_whatsapp_queues','as':_0x7133('0x1dc')});db[_0x7133('0xe0')][_0x7133('0x120')](db[_0x7133('0xef')],{'through':_0x7133('0x108'),'as':_0x7133('0x131')});db['Campaign'][_0x7133('0x111')](db[_0x7133('0x6b')],{'as':'Hoppers','foreignKey':_0x7133('0x1a3')});db['Campaign'][_0x7133('0x111')](db[_0x7133('0x115')],{'as':_0x7133('0x19b'),'foreignKey':_0x7133('0x1a3')});db[_0x7133('0x1a2')]['hasMany'](db[_0x7133('0x70')],{'as':'HopperHistories','foreignKey':_0x7133('0x1a3')});db[_0x7133('0x1a2')][_0x7133('0x111')](db[_0x7133('0x6d')],{'as':_0x7133('0x14c'),'foreignKey':_0x7133('0x1a3')});db[_0x7133('0x1a2')][_0x7133('0x11f')](db[_0x7133('0x14d')],{'as':_0x7133('0x14d'),'foreignKey':'TrunkId'});db['Campaign'][_0x7133('0x11f')](db['Trunk'],{'as':'TrunkBackup','foreignKey':'TrunkBackupId'});db[_0x7133('0x1a2')][_0x7133('0x11f')](db[_0x7133('0x14f')],{'as':_0x7133('0x14f'),'foreignKey':_0x7133('0x150')});db[_0x7133('0x1a2')][_0x7133('0x11f')](db[_0x7133('0x1dd')],{'as':'SquareProject','foreignKey':'SquareProjectId'});db[_0x7133('0x1a2')][_0x7133('0x120')](db['CmList'],{'as':'Lists','through':_0x7133('0x1de')});db[_0x7133('0x1a2')][_0x7133('0x120')](db[_0x7133('0x125')],{'as':_0x7133('0x154'),'through':_0x7133('0x1df')});db[_0x7133('0x171')]['belongsTo'](db[_0x7133('0x63')],{'as':_0x7133('0x63'),'foreignKey':_0x7133('0x174')});db[_0x7133('0xe6')]['belongsTo'](db[_0x7133('0x41')],{});db[_0x7133('0xe6')][_0x7133('0x11f')](db[_0x7133('0x40')],{});db[_0x7133('0xe6')]['belongsTo'](db[_0x7133('0x3b')],{'foreignKey':'FromMailAccountId','as':_0x7133('0x1e0')});db[_0x7133('0xe6')][_0x7133('0x11f')](db[_0x7133('0x12')],{'foreignKey':_0x7133('0x1e1'),'as':'FromAgent'});db[_0x7133('0xe6')][_0x7133('0x11f')](db[_0x7133('0x12')],{'foreignKey':_0x7133('0x1e2'),'as':_0x7133('0x1e3')});db[_0x7133('0xe6')][_0x7133('0x11f')](db[_0x7133('0x3d')],{'foreignKey':_0x7133('0x1e4'),'as':'ToQueue'});db['MailTransferReport'][_0x7133('0x11f')](db[_0x7133('0x3b')],{'foreignKey':'ToMailAccountId','as':'ToAccount'});db['ChatTransferReport'][_0x7133('0x11f')](db[_0x7133('0x18f')],{});db[_0x7133('0xe8')][_0x7133('0x11f')](db[_0x7133('0x60')],{});db[_0x7133('0xe8')][_0x7133('0x11f')](db[_0x7133('0x137')],{'foreignKey':_0x7133('0x1e5'),'as':_0x7133('0x1e0')});db[_0x7133('0xe8')][_0x7133('0x11f')](db[_0x7133('0x12')],{'foreignKey':_0x7133('0x1e1'),'as':_0x7133('0x1e6')});db[_0x7133('0xe8')][_0x7133('0x11f')](db['User'],{'foreignKey':'ToUserId','as':_0x7133('0x1e3')});db[_0x7133('0xe8')][_0x7133('0x11f')](db[_0x7133('0x65')],{'foreignKey':_0x7133('0x1e7'),'as':_0x7133('0x1e8')});db[_0x7133('0xe8')]['belongsTo'](db[_0x7133('0x137')],{'foreignKey':_0x7133('0x1e9'),'as':'ToAccount'});db[_0x7133('0xea')]['belongsTo'](db[_0x7133('0x4a')],{});db['FaxTransferReport'][_0x7133('0x11f')](db[_0x7133('0x11a')],{});db[_0x7133('0xea')][_0x7133('0x11f')](db[_0x7133('0x47')],{'foreignKey':'FromFaxAccountId','as':_0x7133('0x1e0')});db[_0x7133('0xea')][_0x7133('0x11f')](db[_0x7133('0x12')],{'foreignKey':_0x7133('0x1e1'),'as':_0x7133('0x1e6')});db[_0x7133('0xea')][_0x7133('0x11f')](db['User'],{'foreignKey':_0x7133('0x1e2'),'as':_0x7133('0x1e3')});db[_0x7133('0xea')][_0x7133('0x11f')](db['FaxQueue'],{'foreignKey':_0x7133('0x1ea'),'as':_0x7133('0x1e8')});db[_0x7133('0xea')][_0x7133('0x11f')](db[_0x7133('0x47')],{'foreignKey':'ToFaxAccountId','as':_0x7133('0x1eb')});db[_0x7133('0x1ec')][_0x7133('0x11f')](db[_0x7133('0x5a')],{});db[_0x7133('0x1ec')][_0x7133('0x11f')](db['OpenchannelInteraction'],{});db[_0x7133('0x1ec')]['belongsTo'](db[_0x7133('0x56')],{'foreignKey':_0x7133('0x1ed'),'as':'FromAccount'});db[_0x7133('0x1ec')]['belongsTo'](db[_0x7133('0x12')],{'foreignKey':_0x7133('0x1e1'),'as':_0x7133('0x1e6')});db[_0x7133('0x1ec')]['belongsTo'](db[_0x7133('0x12')],{'foreignKey':'ToUserId','as':_0x7133('0x1e3')});db['OpenchannelTransferReport'][_0x7133('0x11f')](db['OpenchannelQueue'],{'foreignKey':_0x7133('0x1ee'),'as':_0x7133('0x1e8')});db['OpenchannelTransferReport']['belongsTo'](db[_0x7133('0x56')],{'foreignKey':_0x7133('0x1ef'),'as':_0x7133('0x1eb')});db['SmsTransferReport'][_0x7133('0x11f')](db[_0x7133('0x52')],{});db[_0x7133('0xec')]['belongsTo'](db[_0x7133('0x118')],{});db[_0x7133('0xec')]['belongsTo'](db[_0x7133('0x13f')],{'foreignKey':'FromSmsAccountId','as':_0x7133('0x1e0')});db[_0x7133('0xec')][_0x7133('0x11f')](db[_0x7133('0x12')],{'foreignKey':_0x7133('0x1e1'),'as':'FromAgent'});db['SmsTransferReport']['belongsTo'](db[_0x7133('0x12')],{'foreignKey':_0x7133('0x1e2'),'as':'ToAgent'});db[_0x7133('0xec')]['belongsTo'](db[_0x7133('0x54')],{'foreignKey':'ToSmsQueueId','as':'ToQueue'});db[_0x7133('0xec')][_0x7133('0x11f')](db[_0x7133('0x13f')],{'foreignKey':'ToSmsAccountId','as':_0x7133('0x1eb')});db['CmList']['hasMany'](db[_0x7133('0x7b')],{'as':_0x7133('0x162'),'foreignKey':_0x7133('0x177'),'onDelete':'cascade'});db[_0x7133('0x125')][_0x7133('0x111')](db['CmCustomField'],{'as':_0x7133('0x1f0'),'foreignKey':_0x7133('0x177')});db['CmList'][_0x7133('0x111')](db['CmContact'],{'as':'Contacts','onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x177')});db[_0x7133('0x125')][_0x7133('0x111')](db[_0x7133('0x115')],{'as':_0x7133('0x19b'),'foreignKey':_0x7133('0x177')});db['CmList'][_0x7133('0x111')](db[_0x7133('0x70')],{'as':_0x7133('0x116'),'foreignKey':_0x7133('0x177')});db[_0x7133('0x125')][_0x7133('0x111')](db['ReportAgentPreview'],{'as':'ReportAgentPreview','foreignKey':_0x7133('0x177')});db[_0x7133('0x125')][_0x7133('0x120')](db[_0x7133('0x130')],{'as':'Queues','through':_0x7133('0x152')});db['CmList'][_0x7133('0x120')](db[_0x7133('0x12')],{'as':_0x7133('0x168'),'through':_0x7133('0x127')});db[_0x7133('0xef')][_0x7133('0x111')](db[_0x7133('0x19')],{'as':'Extensions','onDelete':_0x7133('0x10e')});db[_0x7133('0xef')][_0x7133('0x120')](db[_0x7133('0x12')],{'as':'Agents','through':_0x7133('0x10a')});db[_0x7133('0xef')][_0x7133('0x120')](db[_0x7133('0xe0')],{'through':_0x7133('0x108'),'as':_0x7133('0x153')});db[_0x7133('0xf1')][_0x7133('0x111')](db['User'],{'as':_0x7133('0x16f'),'foreignKey':_0x7133('0x1f1')});db[_0x7133('0xf1')][_0x7133('0x111')](db[_0x7133('0xf3')],{'as':_0x7133('0x1f2'),'foreignKey':_0x7133('0x1f1'),'onDelete':_0x7133('0x10e')});db[_0x7133('0xf3')][_0x7133('0x111')](db[_0x7133('0xf5')],{'as':'Resources','foreignKey':'sectionId','onDelete':_0x7133('0x10e')});db[_0x7133('0xf9')][_0x7133('0x111')](db[_0x7133('0x7b')],{'as':_0x7133('0x162'),'foreignKey':_0x7133('0x1f3'),'onDelete':_0x7133('0x10e')});db['WhatsappAccount'][_0x7133('0x111')](db[_0x7133('0x79')],{'as':'Answers','foreignKey':_0x7133('0x1f3')});db[_0x7133('0xf9')][_0x7133('0x111')](db[_0x7133('0xfd')],{'as':_0x7133('0x156'),'foreignKey':_0x7133('0x1f3')});db[_0x7133('0xf9')][_0x7133('0x111')](db[_0x7133('0xfb')],{'as':_0x7133('0x164')});db['WhatsappAccount'][_0x7133('0x111')](db[_0x7133('0xfa')],{'as':_0x7133('0x145'),'foreignKey':_0x7133('0x1f3'),'onDelete':_0x7133('0x10e')});db['WhatsappAccount']['belongsTo'](db[_0x7133('0x125')],{'as':'List','foreignKey':_0x7133('0x177')});db[_0x7133('0xf9')][_0x7133('0x11f')](db['Pause'],{'as':_0x7133('0x167'),'foreignKey':'mandatoryDispositionPauseId'});db['WhatsappAccount'][_0x7133('0x120')](db['User'],{'as':'Agents','through':_0x7133('0x143')});db[_0x7133('0xfa')]['belongsTo'](db[_0x7133('0x12')],{'onDelete':_0x7133('0x161')});db[_0x7133('0xfa')][_0x7133('0x11f')](db[_0x7133('0x102')],{'onDelete':_0x7133('0x161')});db[_0x7133('0xfa')][_0x7133('0x11f')](db[_0x7133('0xf9')],{'onDelete':_0x7133('0x161')});db[_0x7133('0xfa')][_0x7133('0x11f')](db[_0x7133('0x14f')],{'onDelete':_0x7133('0x161'),'foreignKey':_0x7133('0x150')});db['WhatsappApplication'][_0x7133('0x11f')](db[_0x7133('0x16b')],{'onDelete':_0x7133('0x161'),'foreignKey':_0x7133('0x175')});db['WhatsappInteraction'][_0x7133('0x111')](db[_0x7133('0xfd')],{'as':_0x7133('0x156'),'onDelete':_0x7133('0x10e'),'foreignKey':_0x7133('0x1f4')});db[_0x7133('0xfb')][_0x7133('0x11f')](db[_0x7133('0xf9')],{'as':_0x7133('0x169'),'foreignKey':_0x7133('0x1f3')});db['WhatsappInteraction']['belongsTo'](db['CmContact'],{'as':_0x7133('0x15d'),'foreignKey':_0x7133('0x15e')});db['WhatsappInteraction']['belongsTo'](db[_0x7133('0x12')],{'as':'Owner','foreignKey':_0x7133('0x10f')});db['WhatsappInteraction']['belongsToMany'](db['Tag'],{'through':_0x7133('0x1b3'),'as':_0x7133('0x16d')});db[_0x7133('0xfb')][_0x7133('0x120')](db[_0x7133('0x16b')],{'through':_0x7133('0x1b3'),'as':_0x7133('0x16e')});db[_0x7133('0xfb')]['belongsToMany'](db[_0x7133('0x12')],{'as':'Users','through':_0x7133('0x12f'),'foreignKey':_0x7133('0x1f4')});db[_0x7133('0xfd')][_0x7133('0x11f')](db[_0x7133('0x12')],{'as':_0x7133('0x12')});db[_0x7133('0xfd')][_0x7133('0x11f')](db[_0x7133('0x123')],{'onDelete':'cascade','as':'Contact'});db[_0x7133('0xfd')]['belongsTo'](db[_0x7133('0xfb')],{'onDelete':_0x7133('0x10e'),'as':_0x7133('0x173'),'foreignKey':_0x7133('0x1f4')});db[_0x7133('0xfd')][_0x7133('0x11f')](db[_0x7133('0xf9')],{'as':_0x7133('0x169'),'foreignKey':'WhatsappAccountId'});db[_0x7133('0xff')][_0x7133('0x11f')](db[_0x7133('0xf9')],{});db[_0x7133('0xff')][_0x7133('0x11f')](db[_0x7133('0x125')],{'as':'List','foreignKey':'ListId'});db['WhatsappQueueReport'][_0x7133('0x11f')](db[_0x7133('0x123')],{'as':_0x7133('0x15d'),'foreignKey':_0x7133('0x15e')});db['WhatsappQueueReport']['belongsTo'](db[_0x7133('0xfb')],{});db[_0x7133('0xff')][_0x7133('0x11f')](db['WhatsappQueue'],{});db['WhatsappQueueReport']['belongsTo'](db['WhatsappMessage'],{});db['WhatsappQueueReport'][_0x7133('0x11f')](db['User'],{});db[_0x7133('0x1f5')][_0x7133('0x11f')](db[_0x7133('0xfd')],{});db[_0x7133('0x1f5')][_0x7133('0x11f')](db[_0x7133('0xfb')],{});db[_0x7133('0x1f5')][_0x7133('0x11f')](db[_0x7133('0xf9')],{'foreignKey':'FromWhatsappAccountId','as':'FromAccount'});db[_0x7133('0x1f5')]['belongsTo'](db['WhatsappAccount'],{'foreignKey':_0x7133('0x1f6'),'as':_0x7133('0x1eb')});db[_0x7133('0x1f5')][_0x7133('0x11f')](db[_0x7133('0x102')],{'foreignKey':_0x7133('0x1f7'),'as':_0x7133('0x1e8')});db['WhatsappTransferReport']['belongsTo'](db['User'],{'foreignKey':'FromUserId','as':_0x7133('0x1e6')});db[_0x7133('0x1f5')][_0x7133('0x11f')](db['User'],{'foreignKey':_0x7133('0x1e2'),'as':_0x7133('0x1e3')});db[_0x7133('0x102')]['belongsToMany'](db['User'],{'as':'Agents','through':_0x7133('0x36'),'foreignKey':'WhatsappQueueId'});db[_0x7133('0x102')]['belongsToMany'](db[_0x7133('0xe0')],{'through':_0x7133('0x1f8'),'as':_0x7133('0x153')});db[_0x7133('0x10b')][_0x7133('0x11f')](db[_0x7133('0x12')],{'as':_0x7133('0x1f9'),'foreignKey':'UserId','onDelete':_0x7133('0x10e'),'hooks':!![]});db[_0x7133('0x104')][_0x7133('0x10d')](db[_0x7133('0xc1')],{'as':'Dynamics365Account','onDelete':_0x7133('0x161')});db[_0x7133('0x104')][_0x7133('0x10d')](db['MailServerIn'],{'as':_0x7133('0x1fa'),'onDelete':'restrict'});db[_0x7133('0x104')][_0x7133('0x10d')](db[_0x7133('0x39')],{'as':'Smtp','onDelete':'restrict'});module[_0x7133('0x1fb')]={'db':db,'dbH':dbH};
\ No newline at end of file
+var _0x0183=['User','import','../api/user/user.model','VoiceChanSpy','../api/voiceChanSpy/voiceChanSpy.model','VoiceContext','../api/voiceContext/voiceContext.model','VoiceMusicOnHold','VoiceQueue','VoiceRecording','ScreenRecording','../api/screenRecording/screenRecording.model','VoiceMail','../api/voiceMail/voiceMail.model','VoiceMailMessage','VoiceCallReport','../api/voiceCallReport/voiceCallReport.model','../api/voiceDialReport/voiceDialReport.model','VoiceAgentReport','../api/voiceAgentReport/voiceAgentReport.model','VoiceQueueReport','../api/voiceQueueReport/voiceQueueReport.model','MemberReport','../api/memberReport/memberReport.model','Trunk','../api/trunk/trunk.model','VoiceTransferReport','UserVoiceQueueRt','UserVoiceQueue','UserChatQueue','UserMailQueue','../api/userMailQueue/userMailQueue.model','UserFaxQueue','../api/userFaxQueue/userFaxQueue.model','UserSmsQueue','../api/userSmsQueue/userSmsQueue.model','../api/userOpenchannelQueue/userOpenchannelQueue.model','UserWhatsappQueue','../api/userWhatsappQueue/userWhatsappQueue.model','../api/mailServerOut/mailServerOut.model','MailAccount','../api/mailAccount/mailAccount.model','MailQueue','../api/mailQueue/mailQueue.model','MailSubstatus','MailInteraction','../api/mailInteraction/mailInteraction.model','MailMessage','../api/mailMessage/mailMessage.model','MailApplication','MailQueueReport','../api/mailQueueReport/mailQueueReport.model','Dashboard','../api/dashboardItem/dashboardItem.model','FaxAccount','../api/faxAccount/faxAccount.model','../api/faxApplication/faxApplication.model','FaxInteraction','../api/faxInteraction/faxInteraction.model','FaxMessage','FaxQueue','FaxQueueReport','../api/faxQueueReport/faxQueueReport.model','SmsAccount','SmsApplication','../api/smsApplication/smsApplication.model','SmsInteraction','../api/smsInteraction/smsInteraction.model','SmsMessage','SmsQueue','../api/smsQueue/smsQueue.model','OpenchannelAccount','../api/openchannelAccount/openchannelAccount.model','OpenchannelApplication','OpenchannelInteraction','../api/openchannelInteraction/openchannelInteraction.model','../api/openchannelMessage/openchannelMessage.model','OpenchannelQueue','../api/openchannelQueue/openchannelQueue.model','../api/chatWebsite/chatWebsite.model','../api/openchannelQueueReport/openchannelQueueReport.model','ChatInteraction','../api/chatInteraction/chatInteraction.model','ChatMessage','../api/chatQueue/chatQueue.model','ChatGroup','../api/chatGroup/chatGroup.model','ChatProactiveAction','CmCompany','../api/cmContact/cmContact.model','CmHopper','../api/cmHopper/cmHopper.model','CmHopperBlack','../api/cmHopperBlack/cmHopperBlack.model','CmHopperFinal','../api/cmHopperFinal/cmHopperFinal.model','CmHopperHistory','../api/cmHopperHistory/cmHopperHistory.model','ReportAgentPreview','../api/reportAgentPreview/reportAgentPreview.model','../api/cmCustomField/cmCustomField.model','Action','../api/action/action.model','Automation','../api/automation/automation.model','CannedAnswer','Disposition','../api/disposition/disposition.model','Condition','../api/condition/condition.model','../api/interval/interval.model','Pause','Cdr','VoiceQueuesLog','Schedule','../api/schedule/schedule.model','Tag','../api/tag/tag.model','ContactItemType','../api/contactItemType/contactItemType.model','CmContactHasItem','../api/cmContactHasItem/cmContactHasItem.model','CmHopperAdditionalPhone','Template','../api/template/template.model','Variable','../api/variable/variable.model','Integration','../api/integration/integration.model','IntegrationReport','../api/integrationReport/integrationReport.model','AnalyticCustomReport','../api/analyticCustomReport/analyticCustomReport.model','AnalyticDefaultReport','AnalyticMetric','../api/analyticMetric/analyticMetric.model','../api/analyticFieldReport/analyticFieldReport.model','../api/analyticTreeReport/analyticTreeReport.model','SalesforceAccount','SalesforceConfiguration','../api/intSalesforceConfiguration/intSalesforceConfiguration.model','../api/intSalesforceField/intSalesforceField.model','SugarcrmAccount','../api/intSugarcrmAccount/intSugarcrmAccount.model','../api/intSugarcrmConfiguration/intSugarcrmConfiguration.model','SugarcrmField','../api/intSugarcrmField/intSugarcrmField.model','../api/intDeskAccount/intDeskAccount.model','DeskConfiguration','../api/intDeskConfiguration/intDeskConfiguration.model','../api/intDeskField/intDeskField.model','ZohoAccount','../api/intZohoAccount/intZohoAccount.model','ZohoConfiguration','../api/intZohoConfiguration/intZohoConfiguration.model','ZohoField','../api/intZohoField/intZohoField.model','../api/intZendeskAccount/intZendeskAccount.model','ZendeskConfiguration','ZendeskField','../api/intZendeskField/intZendeskField.model','FreshdeskAccount','../api/intFreshdeskAccount/intFreshdeskAccount.model','FreshdeskConfiguration','FreshdeskField','../api/intFreshdeskField/intFreshdeskField.model','VtigerAccount','../api/intVtigerAccount/intVtigerAccount.model','../api/intVtigerConfiguration/intVtigerConfiguration.model','../api/intVtigerField/intVtigerField.model','ServicenowAccount','../api/intServicenowAccount/intServicenowAccount.model','ServicenowConfiguration','../api/intServicenowConfiguration/intServicenowConfiguration.model','ServicenowField','../api/intServicenowField/intServicenowField.model','Dynamics365Account','../api/intDynamics365Account/intDynamics365Account.model','Dynamics365Configuration','../api/intDynamics365Field/intDynamics365Field.model','../api/intFreshsalesAccount/intFreshsalesAccount.model','FreshsalesConfiguration','FreshsalesField','../api/intFreshsalesField/intFreshsalesField.model','../api/network/network.model','ChatQueueReport','../api/chatQueueReport/chatQueueReport.model','../api/chatInternalMessage/chatInternalMessage.model','../api/jscriptyAnswerReport/jscriptyAnswerReport.model','JscriptyQuestionReport','../api/jscriptyQuestionReport/jscriptyQuestionReport.model','JscriptySessionReport','../api/jscriptySessionReport/jscriptySessionReport.model','SmsQueueReport','../api/smsQueueReport/smsQueueReport.model','SquareReport','../api/squareReport/squareReport.model','SquareDetailsReport','../api/squareReportDetail/squareReportDetail.model','JscriptyProject','../api/jscriptyProject/jscriptyProject.model','SquareOdbc','../api/squareOdbc/squareOdbc.model','SquareProject','SquareRecording','../api/squareRecording/squareRecording.model','SquareMessage','../api/squareMessage/squareMessage.model','Team','Campaign','../api/campaign/campaign.model','Migration','../api/migration/migration.model','Attachment','Plugin','../api/plugin/plugin.model','MailTransferReport','../api/mailTransferReport/mailTransferReport.model','../api/faxTransferReport/faxTransferReport.model','SmsTransferReport','../api/smsTransferReport/smsTransferReport.model','CmList','../api/cmList/cmList.model','VoicePrefix','../api/voicePrefix/voicePrefix.model','UserProfile','../api/userProfile/userProfile.model','../api/userProfileSection/userProfileSection.model','UserProfileResource','../api/userProfileResource/userProfileResource.model','UserNotification','../api/userNotification/userNotification.model','WhatsappAccount','../api/whatsappAccount/whatsappAccount.model','WhatsappApplication','../api/whatsappApplication/whatsappApplication.model','../api/whatsappInteraction/whatsappInteraction.model','WhatsappMessage','../api/whatsappMessage/whatsappMessage.model','WhatsappQueueReport','../api/whatsappTransferReport/whatsappTransferReport.model','WhatsappQueue','../api/whatsappQueue/whatsappQueue.model','CloudProvider','../api/cloudProvider/cloudProvider.model','../api/teamVoiceQueue/teamVoiceQueue.model','../api/teamVoicePrefix/teamVoicePrefix.model','UserVoicePrefix','../api/userVoicePrefix/userVoicePrefix.model','UserSetting','hasOne','UserId','userSetting','cascade','hasMany','VoiceExtension','Extensions','HopperFinals','OpenchannelInteractions','ChatInteractions','SmsInteractions','FaxInteractions','MailInteractions','WhatsappInteraction','WhatsappInteractions','UserNotifications','SenderId','Hoppers','SET\x20NULL','belongsTo','userProfileId','Groups','belongsToMany','Contacts','cm_user_has_contacts','cm_user_has_lists','user_has_teams','user_has_mail_interactions','user_has_chat_interactions','user_has_fax_interactions','user_has_sms_interactions','VoiceQueues','VoicePrefixes','MailQueues','ChatQueue','ChatQueues','FaxQueues','SmsQueues','OpenchannelQueues','UserOpenchannelQueue','WhatsappQueues','ChatWebsite','user_has_chat_websites','FaxAccounts','user_has_fax_accounts','MailAccounts','user_has_mail_accounts','OpenchannelAccounts','SmsAccounts','user_has_sms_accounts','WhatsappAccounts','ChanSpyId','Applications','Sound','Sounds','moh_has_sounds','VoiceQueueId','HopperHistories','JscriptySessions','TrunkId','TrunkBackup','TrunkBackupId','Interval','IntervalId','mandatoryDispositionPause','mandatoryDispositionPauseId','Lists','voice_queues_has_cm_lists','Agents','Teams','BlackLists','voice_queues_has_cm_blacklists','Messages','mailbox','mailboxuser','QueueCalls','uniqueid','AgentReports','CmContact','ContactId','MailServerIn','MailAccountId','CloudProviderId','restrict','MailServerOut','Smtp','Dispositions','Interactions','List','ListId','TemplateId','team_has_mail_queues','MailInteractionId','Account','Contact','Owner','mail_interaction_has_tags','Tags','ThroughTags','Users','Attachments','Interaction','ChatWebsiteId','ChatOfflineMessageId','TagId','Items','FaxAccountId','Exntensions','FaxApplication','FaxInteractionId','fax_interaction_has_tags','Answers','SmsAccountId','sms_interaction_has_tags','SmsQueueId','team_has_sms_queues','OpenchannelAccountId','user_has_openchannel_accounts','OpenchannelQueueId','OpenchannelMessage','OpenchannelInteractionId','openchannel_interaction_has_tags','AttachmentId','team_has_openchannel_queues','ProactiveActions','ChatApplication','OpenchannelQueueReport','Agent','Website','chat_interaction_has_tags','ChatInteractionId','ChatOfflineMessage','ChatInternalMessage','ChatGroupId','Members','chat_group_has_users','CompanyId','Phones','CmContactId','cm_contact_has_tags','AdditionalPhones','CampaignId','OwnerId','All','OneAll','AutomationAllId','OneAny','AutomationAnyId','Actions','AutomationId','ParentId','Intervals','MailApplications','ChatApplications','FaxApplications','SmsApplications','DefaultReportId','CustomReportId','whatsapp_interaction_has_tags','ItemType','ItemTypeId','Hopper','CmHopperId','Trigger','AllConditions','AllCondition','TriggerAllId','AnyConditions','AnyCondition','TriggerAnyId','TriggerId','AnalyticFieldReport','Fields','MetricId','Configurations','SalesforceField','Subjects','SubjectId','DescriptionId','AccountId','FieldId','VariableId','SugarcrmConfiguration','Subject','Description','DeskAccount','DeskField','Descriptions','int_desk_configuration_has_tags','Field','ZendeskAccount','VtigerConfiguration','VtigerField','Dynamics365Field','FreshsalesAccount','FromId','ToId','JscriptyAnswerReport','SessionId','ProjectId','TeamVoiceQueue','team_has_chat_queues','team_has_fax_queues','team_has_whatsapp_queues','SquareProjectId','campaigns_has_cm_lists','campaigns_has_cm_blacklists','FromMailAccountId','FromUserId','FromAgent','ToUserId','ToAgent','ToMailQueueId','ChatTransferReport','FromChatWebsiteId','ToChatQueueId','ToQueue','ToAccount','FaxTransferReport','FromFaxAccountId','FromAccount','ToFaxQueueId','ToFaxAccountId','OpenchannelTransferReport','FromOpenchannelAccountId','ToOpenchannelQueueId','FromSmsAccountId','CustomFields','HopperHistory','Queues','TeamVoicePrefix','UserProfileSection','UserProfileSections','Resources','WhatsappAccountId','user_has_whatsapp_accounts','user_has_whatsapp_interactions','WhatsappInteractionId','WhatsappTransferReport','ToWhatsappAccountId','ToQueueId','WhatsappQueueId','user','Imap','exports','sequelize','lodash','jstz','determine','motion2','xcall','127.0.0.1','mysql','utf8mb4','utf8_general_ci','defaultsDeep','sequelizeHistory','xC@LL1234','name','utf8','username','password','database','options'];(function(_0x1b90a6,_0x3815ea){var _0x290cd2=function(_0x4579f2){while(--_0x4579f2){_0x1b90a6['push'](_0x1b90a6['shift']());}};_0x290cd2(++_0x3815ea);}(_0x0183,0x1ef));var _0x3018=function(_0x19635f,_0x564859){_0x19635f=_0x19635f-0x0;var _0x482132=_0x0183[_0x19635f];return _0x482132;};'use strict';var config=require('../config/environment');var Sequelize=require(_0x3018('0x0'));var _=require(_0x3018('0x1'));var jstz=require(_0x3018('0x2'));var timezone=jstz[_0x3018('0x3')]();config[_0x3018('0x0')]=_['defaultsDeep'](config[_0x3018('0x0')],{'database':_0x3018('0x4'),'username':_0x3018('0x5'),'password':'xC@LL1234','options':{'host':_0x3018('0x6'),'port':0xcea,'dialect':_0x3018('0x7'),'dialectOptions':{'charset':_0x3018('0x8')},'logging':![],'timezone':timezone['name'](),'define':{'charset':'utf8','collate':_0x3018('0x9')}}});config['sequelizeHistory']=_[_0x3018('0xa')](config[_0x3018('0xb')],{'database':_0x3018('0x4'),'username':'xcall','password':_0x3018('0xc'),'options':{'host':_0x3018('0x6'),'port':0xcea,'dialect':_0x3018('0x7'),'dialectOptions':{'charset':_0x3018('0x8')},'logging':![],'timezone':timezone[_0x3018('0xd')](),'define':{'charset':_0x3018('0xe'),'collate':_0x3018('0x9')}}});var db={'Sequelize':Sequelize,'sequelize':new Sequelize(config[_0x3018('0x0')]['database'],config[_0x3018('0x0')][_0x3018('0xf')],config['sequelize'][_0x3018('0x10')],config[_0x3018('0x0')]['options'])};var dbH={'Sequelize':Sequelize,'sequelize':new Sequelize(config['sequelizeHistory'][_0x3018('0x11')],config[_0x3018('0xb')][_0x3018('0xf')],config['sequelizeHistory'][_0x3018('0x10')],config[_0x3018('0xb')][_0x3018('0x12')])};db[_0x3018('0x13')]=db['sequelize'][_0x3018('0x14')](_0x3018('0x15'));db[_0x3018('0x16')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x17'));db[_0x3018('0x18')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x19'));db['VoiceExtension']=db[_0x3018('0x0')][_0x3018('0x14')]('../api/voiceExtension/voiceExtension.model');db[_0x3018('0x1a')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/voiceMusicOnHold/voiceMusicOnHold.model');db[_0x3018('0x1b')]=db[_0x3018('0x0')]['import']('../api/voiceQueue/voiceQueue.model');db[_0x3018('0x1c')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/voiceRecording/voiceRecording.model');db[_0x3018('0x1d')]=db['sequelize'][_0x3018('0x14')](_0x3018('0x1e'));db[_0x3018('0x1f')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x20'));db[_0x3018('0x21')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/voiceMailMessage/voiceMailMessage.model');db[_0x3018('0x22')]=db[_0x3018('0x0')]['import'](_0x3018('0x23'));db['VoiceDialReport']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x24'));db[_0x3018('0x25')]=db['sequelize'][_0x3018('0x14')](_0x3018('0x26'));db[_0x3018('0x27')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x28'));db[_0x3018('0x29')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x2a'));db[_0x3018('0x2b')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x2c'));db[_0x3018('0x2d')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/voiceTransferReport/voiceTransferReport.model');db[_0x3018('0x2e')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/userVoiceQueueRt/userVoiceQueueRt.model');db[_0x3018('0x2f')]=db[_0x3018('0x0')]['import']('../api/userVoiceQueue/userVoiceQueue.model');db[_0x3018('0x30')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/userChatQueue/userChatQueue.model');db[_0x3018('0x31')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x32'));db[_0x3018('0x33')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x34'));db[_0x3018('0x35')]=db[_0x3018('0x0')]['import'](_0x3018('0x36'));db['UserOpenchannelQueue']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x37'));db[_0x3018('0x38')]=db[_0x3018('0x0')]['import'](_0x3018('0x39'));db['MailServerIn']=db[_0x3018('0x0')]['import']('../api/mailServerIn/mailServerIn.model');db['MailServerOut']=db[_0x3018('0x0')]['import'](_0x3018('0x3a'));db[_0x3018('0x3b')]=db['sequelize']['import'](_0x3018('0x3c'));db[_0x3018('0x3d')]=db[_0x3018('0x0')]['import'](_0x3018('0x3e'));db[_0x3018('0x3f')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/mailSubstatus/mailSubstatus.model');db[_0x3018('0x40')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x41'));db[_0x3018('0x42')]=db['sequelize']['import'](_0x3018('0x43'));db[_0x3018('0x44')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/mailApplication/mailApplication.model');db[_0x3018('0x45')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x46'));db[_0x3018('0x47')]=db['sequelize'][_0x3018('0x14')]('../api/dashboard/dashboard.model');db['DashboardItem']=db[_0x3018('0x0')]['import'](_0x3018('0x48'));db[_0x3018('0x49')]=db[_0x3018('0x0')]['import'](_0x3018('0x4a'));db['FaxApplication']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x4b'));db[_0x3018('0x4c')]=db[_0x3018('0x0')]['import'](_0x3018('0x4d'));db[_0x3018('0x4e')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/faxMessage/faxMessage.model');db[_0x3018('0x4f')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/faxQueue/faxQueue.model');db[_0x3018('0x50')]=db['sequelize'][_0x3018('0x14')](_0x3018('0x51'));db[_0x3018('0x52')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/smsAccount/smsAccount.model');db[_0x3018('0x53')]=db[_0x3018('0x0')]['import'](_0x3018('0x54'));db[_0x3018('0x55')]=db['sequelize'][_0x3018('0x14')](_0x3018('0x56'));db[_0x3018('0x57')]=db[_0x3018('0x0')]['import']('../api/smsMessage/smsMessage.model');db[_0x3018('0x58')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x59'));db[_0x3018('0x5a')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x5b'));db[_0x3018('0x5c')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/openchannelApplication/openchannelApplication.model');db[_0x3018('0x5d')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x5e'));db['OpenchannelMessage']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x5f'));db[_0x3018('0x60')]=db['sequelize'][_0x3018('0x14')](_0x3018('0x61'));db['ChatWebsite']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x62'));db['OpenchannelQueueReport']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x63'));db['ChatApplication']=db[_0x3018('0x0')][_0x3018('0x14')]('../api/chatApplication/chatApplication.model');db[_0x3018('0x64')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x65'));db[_0x3018('0x66')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/chatMessage/chatMessage.model');db['ChatOfflineMessage']=db[_0x3018('0x0')]['import']('../api/chatOfflineMessage/chatOfflineMessage.model');db['ChatQueue']=db[_0x3018('0x0')]['import'](_0x3018('0x67'));db[_0x3018('0x68')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x69'));db[_0x3018('0x6a')]=db['sequelize']['import']('../api/chatProactiveAction/chatProactiveAction.model');db[_0x3018('0x6b')]=db['sequelize'][_0x3018('0x14')]('../api/cmCompany/cmCompany.model');db['CmContact']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x6c'));db[_0x3018('0x6d')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x6e'));db[_0x3018('0x6f')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x70'));db[_0x3018('0x71')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x72'));db[_0x3018('0x73')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x74'));db[_0x3018('0x75')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x76'));db['CmCustomField']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x77'));db[_0x3018('0x78')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x79'));db[_0x3018('0x7a')]=db['sequelize'][_0x3018('0x14')](_0x3018('0x7b'));db[_0x3018('0x7c')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/cannedAnswer/cannedAnswer.model');db[_0x3018('0x7d')]=db[_0x3018('0x0')]['import'](_0x3018('0x7e'));db[_0x3018('0x7f')]=db['sequelize'][_0x3018('0x14')](_0x3018('0x80'));db['Interval']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x81'));db[_0x3018('0x82')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/pause/pause.model');db[_0x3018('0x83')]=db[_0x3018('0x0')]['import']('../api/cdr/cdr.model');db[_0x3018('0x84')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/voiceQueuesLog/voiceQueuesLog.model');db[_0x3018('0x85')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x86'));db['Sound']=db[_0x3018('0x0')][_0x3018('0x14')]('../api/sound/sound.model');db[_0x3018('0x87')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x88'));db[_0x3018('0x89')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x8a'));db[_0x3018('0x8b')]=db['sequelize'][_0x3018('0x14')](_0x3018('0x8c'));db[_0x3018('0x8d')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.model');db[_0x3018('0x8e')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x8f'));db['Trigger']=db[_0x3018('0x0')][_0x3018('0x14')]('../api/trigger/trigger.model');db[_0x3018('0x90')]=db[_0x3018('0x0')]['import'](_0x3018('0x91'));db[_0x3018('0x92')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x93'));db[_0x3018('0x94')]=db['sequelize'][_0x3018('0x14')](_0x3018('0x95'));db[_0x3018('0x96')]=db[_0x3018('0x0')]['import'](_0x3018('0x97'));db[_0x3018('0x98')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/analyticDefaultReport/analyticDefaultReport.model');db['AnalyticExtractedReport']=db['sequelize']['import']('../api/analyticExtractedReport/analyticExtractedReport.model');db[_0x3018('0x99')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x9a'));db['AnalyticFieldReport']=db['sequelize'][_0x3018('0x14')](_0x3018('0x9b'));db['AnalyticTreeReport']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x9c'));db[_0x3018('0x9d')]=db['sequelize'][_0x3018('0x14')]('../api/intSalesforceAccount/intSalesforceAccount.model');db[_0x3018('0x9e')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x9f'));db['SalesforceField']=db['sequelize'][_0x3018('0x14')](_0x3018('0xa0'));db[_0x3018('0xa1')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xa2'));db['SugarcrmConfiguration']=db[_0x3018('0x0')]['import'](_0x3018('0xa3'));db[_0x3018('0xa4')]=db[_0x3018('0x0')]['import'](_0x3018('0xa5'));db['DeskAccount']=db[_0x3018('0x0')]['import'](_0x3018('0xa6'));db[_0x3018('0xa7')]=db[_0x3018('0x0')]['import'](_0x3018('0xa8'));db['DeskField']=db['sequelize'][_0x3018('0x14')](_0x3018('0xa9'));db[_0x3018('0xaa')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xab'));db[_0x3018('0xac')]=db['sequelize']['import'](_0x3018('0xad'));db[_0x3018('0xae')]=db['sequelize'][_0x3018('0x14')](_0x3018('0xaf'));db['ZendeskAccount']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xb0'));db[_0x3018('0xb1')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/intZendeskConfiguration/intZendeskConfiguration.model');db[_0x3018('0xb2')]=db[_0x3018('0x0')]['import'](_0x3018('0xb3'));db[_0x3018('0xb4')]=db[_0x3018('0x0')]['import'](_0x3018('0xb5'));db[_0x3018('0xb6')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/intFreshdeskConfiguration/intFreshdeskConfiguration.model');db[_0x3018('0xb7')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xb8'));db[_0x3018('0xb9')]=db['sequelize']['import'](_0x3018('0xba'));db['VtigerConfiguration']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xbb'));db['VtigerField']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xbc'));db[_0x3018('0xbd')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xbe'));db[_0x3018('0xbf')]=db['sequelize']['import'](_0x3018('0xc0'));db[_0x3018('0xc1')]=db['sequelize'][_0x3018('0x14')](_0x3018('0xc2'));db[_0x3018('0xc3')]=db[_0x3018('0x0')]['import'](_0x3018('0xc4'));db[_0x3018('0xc5')]=db[_0x3018('0x0')]['import']('../api/intDynamics365Configuration/intDynamics365Configuration.model');db['Dynamics365Field']=db['sequelize'][_0x3018('0x14')](_0x3018('0xc6'));db['FreshsalesAccount']=db[_0x3018('0x0')]['import'](_0x3018('0xc7'));db[_0x3018('0xc8')]=db['sequelize'][_0x3018('0x14')]('../api/intFreshsalesConfiguration/intFreshsalesConfiguration.model');db[_0x3018('0xc9')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xca'));db[_0x3018('0x92')]=db[_0x3018('0x0')]['import']('../api/integration/integration.model');db['Network']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xcb'));db[_0x3018('0xcc')]=db['sequelize'][_0x3018('0x14')](_0x3018('0xcd'));db['ChatInternalMessage']=db[_0x3018('0x0')]['import'](_0x3018('0xce'));db['JscriptyAnswerReport']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xcf'));db[_0x3018('0xd0')]=db['sequelize'][_0x3018('0x14')](_0x3018('0xd1'));db[_0x3018('0xd2')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xd3'));db[_0x3018('0xd4')]=db[_0x3018('0x0')]['import'](_0x3018('0xd5'));db[_0x3018('0xd6')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xd7'));db[_0x3018('0xd8')]=db['sequelize'][_0x3018('0x14')](_0x3018('0xd9'));db[_0x3018('0xda')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xdb'));db['Setting']=db[_0x3018('0x0')]['import']('../api/setting/setting.model');db[_0x3018('0xdc')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xdd'));db[_0x3018('0xde')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/squareProject/squareProject.model');db[_0x3018('0xdf')]=db['sequelize']['import'](_0x3018('0xe0'));db[_0x3018('0xe1')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xe2'));db[_0x3018('0xe3')]=db['sequelize'][_0x3018('0x14')]('../api/team/team.model');db['License']=db['sequelize'][_0x3018('0x14')]('../api/license/license.model');db[_0x3018('0xe4')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xe5'));db[_0x3018('0xe6')]=db['sequelize']['import'](_0x3018('0xe7'));db[_0x3018('0xe8')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/attachment/attachment.model');db[_0x3018('0xe9')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xea'));db[_0x3018('0xeb')]=db[_0x3018('0x0')]['import'](_0x3018('0xec'));db['ChatTransferReport']=db[_0x3018('0x0')]['import']('../api/chatTransferReport/chatTransferReport.model');db['FaxTransferReport']=db[_0x3018('0x0')]['import'](_0x3018('0xed'));db['OpenchannelTransferReport']=db[_0x3018('0x0')][_0x3018('0x14')]('../api/openchannelTransferReport/openchannelTransferReport.model');db[_0x3018('0xee')]=db['sequelize'][_0x3018('0x14')](_0x3018('0xef'));db[_0x3018('0xf0')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xf1'));db[_0x3018('0xf2')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xf3'));db[_0x3018('0xf4')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xf5'));db['UserProfileSection']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xf6'));db[_0x3018('0xf7')]=db['sequelize'][_0x3018('0x14')](_0x3018('0xf8'));db[_0x3018('0xf9')]=db['sequelize'][_0x3018('0x14')](_0x3018('0xfa'));db[_0x3018('0xfb')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xfc'));db[_0x3018('0xfd')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0xfe'));db['WhatsappInteraction']=db[_0x3018('0x0')]['import'](_0x3018('0xff'));db[_0x3018('0x100')]=db[_0x3018('0x0')]['import'](_0x3018('0x101'));db[_0x3018('0x102')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/whatsappQueueReport/whatsappQueueReport.model');db['WhatsappTransferReport']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x103'));db[_0x3018('0x104')]=db['sequelize'][_0x3018('0x14')](_0x3018('0x105'));db[_0x3018('0x106')]=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x107'));db['TeamVoiceQueue']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x108'));db['TeamVoicePrefix']=db[_0x3018('0x0')][_0x3018('0x14')](_0x3018('0x109'));db[_0x3018('0x10a')]=db['sequelize'][_0x3018('0x14')](_0x3018('0x10b'));db[_0x3018('0x10c')]=db[_0x3018('0x0')][_0x3018('0x14')]('../api/user-setting/user-setting.model');db['User'][_0x3018('0x10d')](db[_0x3018('0x1f')],{'as':_0x3018('0x1f'),'onDelete':'cascade','foreignKey':_0x3018('0x10e')});db['User'][_0x3018('0x10d')](db[_0x3018('0x10c')],{'as':_0x3018('0x10f'),'onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x10e')});db[_0x3018('0x13')][_0x3018('0x111')](db[_0x3018('0x1c')],{'as':'Recordings','foreignKey':_0x3018('0x10e')});db['User']['hasMany'](db[_0x3018('0x2e')],{'as':'VoiceQueuesRt','foreignKey':_0x3018('0x10e')});db[_0x3018('0x13')][_0x3018('0x111')](db[_0x3018('0x112')],{'as':_0x3018('0x113'),'onDelete':'cascade','hooks':!![]});db[_0x3018('0x13')][_0x3018('0x111')](db[_0x3018('0x71')],{'as':_0x3018('0x114'),'foreignKey':'UserId'});db[_0x3018('0x13')][_0x3018('0x111')](db[_0x3018('0x73')],{'as':'HopperHistory','foreignKey':_0x3018('0x10e')});db['User']['hasMany'](db[_0x3018('0x75')],{'as':_0x3018('0x75'),'foreignKey':_0x3018('0x10e')});db[_0x3018('0x13')][_0x3018('0x111')](db[_0x3018('0x5d')],{'as':_0x3018('0x115'),'foreignKey':_0x3018('0x10e')});db[_0x3018('0x13')]['hasMany'](db['ChatInteraction'],{'as':_0x3018('0x116'),'foreignKey':_0x3018('0x10e')});db[_0x3018('0x13')][_0x3018('0x111')](db[_0x3018('0x55')],{'as':_0x3018('0x117'),'foreignKey':_0x3018('0x10e')});db[_0x3018('0x13')][_0x3018('0x111')](db[_0x3018('0x4c')],{'as':_0x3018('0x118'),'foreignKey':_0x3018('0x10e')});db[_0x3018('0x13')][_0x3018('0x111')](db[_0x3018('0x40')],{'as':_0x3018('0x119'),'foreignKey':_0x3018('0x10e')});db[_0x3018('0x13')][_0x3018('0x111')](db[_0x3018('0x11a')],{'as':_0x3018('0x11b'),'foreignKey':_0x3018('0x10e')});db[_0x3018('0x13')][_0x3018('0x111')](db[_0x3018('0xf9')],{'as':_0x3018('0x11c'),'foreignKey':_0x3018('0x11d')});db['User'][_0x3018('0x111')](db[_0x3018('0x6d')],{'as':_0x3018('0x11e'),'foreignKey':_0x3018('0x10e'),'onDelete':_0x3018('0x11f')});db[_0x3018('0x13')][_0x3018('0x120')](db[_0x3018('0xf4')],{'as':_0x3018('0xf4'),'foreignKey':_0x3018('0x121')});db[_0x3018('0x13')]['belongsToMany'](db['ChatGroup'],{'as':_0x3018('0x122'),'through':'chat_group_has_users'});db[_0x3018('0x13')][_0x3018('0x123')](db['CmContact'],{'as':_0x3018('0x124'),'through':_0x3018('0x125')});db[_0x3018('0x13')][_0x3018('0x123')](db[_0x3018('0xf0')],{'as':'Lists','through':_0x3018('0x126')});db['User'][_0x3018('0x123')](db[_0x3018('0xe3')],{'through':_0x3018('0x127')});db['User']['belongsToMany'](db['MailInteraction'],{'as':_0x3018('0x119'),'through':_0x3018('0x128')});db['User'][_0x3018('0x123')](db[_0x3018('0x64')],{'as':'ChatInteractions','through':_0x3018('0x129')});db[_0x3018('0x13')]['belongsToMany'](db[_0x3018('0x4c')],{'as':_0x3018('0x118'),'through':_0x3018('0x12a')});db[_0x3018('0x13')][_0x3018('0x123')](db[_0x3018('0x55')],{'as':_0x3018('0x117'),'through':_0x3018('0x12b')});db[_0x3018('0x13')][_0x3018('0x123')](db['OpenchannelInteraction'],{'as':_0x3018('0x115'),'through':'user_has_openchannel_interactions'});db[_0x3018('0x13')][_0x3018('0x123')](db[_0x3018('0x11a')],{'as':'WhatsappInteractions','through':'user_has_whatsapp_interactions'});db[_0x3018('0x13')]['belongsToMany'](db[_0x3018('0x1b')],{'as':_0x3018('0x12c'),'through':_0x3018('0x2f'),'required':![]});db['User']['belongsToMany'](db[_0x3018('0xf2')],{'as':_0x3018('0x12d'),'through':_0x3018('0x10a'),'required':![]});db[_0x3018('0x13')][_0x3018('0x123')](db[_0x3018('0x3d')],{'as':_0x3018('0x12e'),'through':_0x3018('0x31'),'required':![]});db[_0x3018('0x13')][_0x3018('0x123')](db[_0x3018('0x12f')],{'as':_0x3018('0x130'),'through':_0x3018('0x30'),'required':![],'hooks':!![]});db[_0x3018('0x13')]['belongsToMany'](db[_0x3018('0x4f')],{'as':_0x3018('0x131'),'through':'UserFaxQueue','required':![]});db[_0x3018('0x13')][_0x3018('0x123')](db[_0x3018('0x58')],{'as':_0x3018('0x132'),'through':_0x3018('0x35'),'required':![]});db[_0x3018('0x13')][_0x3018('0x123')](db[_0x3018('0x60')],{'as':_0x3018('0x133'),'through':_0x3018('0x134'),'required':![]});db['User'][_0x3018('0x123')](db[_0x3018('0x104')],{'as':_0x3018('0x135'),'through':_0x3018('0x38'),'required':![]});db[_0x3018('0x13')][_0x3018('0x123')](db[_0x3018('0xf0')],{'through':_0x3018('0x126')});db[_0x3018('0x13')]['belongsToMany'](db[_0x3018('0x136')],{'as':'ChatWebsites','through':_0x3018('0x137')});db['User'][_0x3018('0x123')](db[_0x3018('0x49')],{'as':_0x3018('0x138'),'through':_0x3018('0x139')});db[_0x3018('0x13')][_0x3018('0x123')](db[_0x3018('0x3b')],{'as':_0x3018('0x13a'),'through':_0x3018('0x13b')});db['User'][_0x3018('0x123')](db['OpenchannelAccount'],{'as':_0x3018('0x13c'),'through':'user_has_openchannel_accounts'});db[_0x3018('0x13')][_0x3018('0x123')](db[_0x3018('0x52')],{'as':_0x3018('0x13d'),'through':_0x3018('0x13e')});db[_0x3018('0x13')]['belongsToMany'](db[_0x3018('0xfb')],{'as':_0x3018('0x13f'),'through':'user_has_whatsapp_accounts'});db[_0x3018('0x16')][_0x3018('0x111')](db[_0x3018('0x112')],{'as':'SpiedAgents','onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x140')});db[_0x3018('0x18')][_0x3018('0x111')](db[_0x3018('0x112')],{'onDelete':_0x3018('0x110')});db['VoiceExtension'][_0x3018('0x111')](db[_0x3018('0x112')],{'as':_0x3018('0x141'),'onDelete':_0x3018('0x110')});db[_0x3018('0x1a')][_0x3018('0x123')](db[_0x3018('0x142')],{'as':_0x3018('0x143'),'through':_0x3018('0x144')});db[_0x3018('0x1b')]['hasMany'](db[_0x3018('0x2e')],{'as':'Members','foreignKey':_0x3018('0x145')});db[_0x3018('0x1b')][_0x3018('0x111')](db[_0x3018('0x6d')],{'as':_0x3018('0x11e'),'foreignKey':_0x3018('0x145')});db[_0x3018('0x1b')][_0x3018('0x111')](db['CmHopperFinal'],{'as':_0x3018('0x114'),'foreignKey':'VoiceQueueId'});db[_0x3018('0x1b')]['hasMany'](db[_0x3018('0x73')],{'as':_0x3018('0x146'),'foreignKey':'VoiceQueueId'});db['VoiceQueue']['hasMany'](db[_0x3018('0x75')],{'as':_0x3018('0x75'),'foreignKey':'VoiceQueueId'});db['VoiceQueue'][_0x3018('0x111')](db['CmHopperBlack'],{'as':'HopperBlacks','foreignKey':_0x3018('0x145')});db[_0x3018('0x1b')][_0x3018('0x111')](db[_0x3018('0xd2')],{'as':_0x3018('0x147'),'foreignKey':_0x3018('0x145')});db['VoiceQueue'][_0x3018('0x120')](db[_0x3018('0x2b')],{'as':_0x3018('0x2b'),'foreignKey':_0x3018('0x148')});db[_0x3018('0x1b')]['belongsTo'](db[_0x3018('0x2b')],{'as':_0x3018('0x149'),'foreignKey':_0x3018('0x14a')});db[_0x3018('0x1b')][_0x3018('0x120')](db[_0x3018('0x14b')],{'as':_0x3018('0x14b'),'foreignKey':_0x3018('0x14c')});db[_0x3018('0x1b')]['belongsTo'](db[_0x3018('0x82')],{'as':_0x3018('0x14d'),'foreignKey':_0x3018('0x14e')});db['VoiceQueue'][_0x3018('0x123')](db['CmList'],{'as':_0x3018('0x14f'),'through':_0x3018('0x150')});db[_0x3018('0x1b')][_0x3018('0x123')](db['User'],{'as':_0x3018('0x151'),'through':_0x3018('0x2f')});db['VoiceQueue']['belongsToMany'](db[_0x3018('0xe3')],{'as':_0x3018('0x152'),'through':'TeamVoiceQueue'});db[_0x3018('0x1b')][_0x3018('0x123')](db[_0x3018('0xf0')],{'as':_0x3018('0x153'),'through':_0x3018('0x154')});db[_0x3018('0x1c')][_0x3018('0x120')](db[_0x3018('0x13')],{'as':_0x3018('0x13'),'foreignKey':_0x3018('0x10e')});db[_0x3018('0x1d')][_0x3018('0x120')](db[_0x3018('0x13')],{'as':_0x3018('0x13'),'foreignKey':_0x3018('0x10e')});db[_0x3018('0x1f')][_0x3018('0x111')](db[_0x3018('0x21')],{'as':_0x3018('0x155'),'onDelete':_0x3018('0x110'),'foreignKey':'mailboxuser','sourceKey':_0x3018('0x156')});db[_0x3018('0x21')][_0x3018('0x120')](db['VoiceMail'],{'foreignKey':_0x3018('0x157'),'targetKey':'mailbox'});db[_0x3018('0x22')][_0x3018('0x111')](db[_0x3018('0x27')],{'as':_0x3018('0x158'),'foreignKey':_0x3018('0x159'),'constraints':![]});db['VoiceCallReport'][_0x3018('0x111')](db[_0x3018('0x25')],{'as':_0x3018('0x15a'),'foreignKey':_0x3018('0x159'),'constraints':![]});db[_0x3018('0x22')][_0x3018('0x120')](db[_0x3018('0x13')],{'as':_0x3018('0x13'),'foreignKey':_0x3018('0x10e')});db['VoiceCallReport'][_0x3018('0x120')](db[_0x3018('0x15b')],{'as':'Contact','foreignKey':_0x3018('0x15c')});db[_0x3018('0x15d')][_0x3018('0x120')](db[_0x3018('0x3b')],{'as':'MailAccount','foreignKey':_0x3018('0x15e')});db['MailServerIn']['belongsTo'](db[_0x3018('0x106')],{'as':_0x3018('0x106'),'foreignKey':_0x3018('0x15f'),'onDelete':_0x3018('0x160')});db[_0x3018('0x161')][_0x3018('0x120')](db[_0x3018('0x3b')],{'as':_0x3018('0x3b'),'foreignKey':_0x3018('0x15e')});db['MailServerOut'][_0x3018('0x120')](db['CloudProvider'],{'as':_0x3018('0x106'),'foreignKey':_0x3018('0x15f'),'onDelete':_0x3018('0x160')});db[_0x3018('0x3b')][_0x3018('0x10d')](db['MailServerIn'],{'as':'Imap','onDelete':'cascade'});db[_0x3018('0x3b')]['hasOne'](db[_0x3018('0x161')],{'as':_0x3018('0x162'),'onDelete':'cascade'});db[_0x3018('0x3b')][_0x3018('0x111')](db[_0x3018('0x7d')],{'as':_0x3018('0x163'),'foreignKey':'MailAccountId','onDelete':_0x3018('0x110')});db[_0x3018('0x3b')][_0x3018('0x111')](db[_0x3018('0x7c')],{'as':'Answers','foreignKey':_0x3018('0x15e')});db['MailAccount'][_0x3018('0x111')](db[_0x3018('0x42')],{'as':_0x3018('0x155'),'foreignKey':_0x3018('0x15e')});db[_0x3018('0x3b')]['hasMany'](db[_0x3018('0x40')],{'as':_0x3018('0x164')});db[_0x3018('0x3b')]['hasMany'](db['MailApplication'],{'as':_0x3018('0x141'),'foreignKey':'MailAccountId','onDelete':_0x3018('0x110')});db['MailAccount']['belongsTo'](db[_0x3018('0xf0')],{'as':_0x3018('0x165'),'foreignKey':_0x3018('0x166')});db[_0x3018('0x3b')]['belongsTo'](db[_0x3018('0x8e')],{'as':_0x3018('0x8e'),'foreignKey':_0x3018('0x167')});db[_0x3018('0x3b')][_0x3018('0x120')](db[_0x3018('0x82')],{'as':_0x3018('0x14d'),'foreignKey':_0x3018('0x14e')});db[_0x3018('0x3b')][_0x3018('0x123')](db[_0x3018('0x13')],{'as':_0x3018('0x151'),'through':_0x3018('0x13b')});db[_0x3018('0x3d')][_0x3018('0x123')](db[_0x3018('0x13')],{'as':_0x3018('0x151'),'through':'UserMailQueue'});db['MailQueue'][_0x3018('0x123')](db[_0x3018('0xe3')],{'through':_0x3018('0x168'),'as':_0x3018('0x152')});db['MailInteraction'][_0x3018('0x111')](db[_0x3018('0x42')],{'as':_0x3018('0x155'),'onDelete':'cascade','foreignKey':_0x3018('0x169')});db[_0x3018('0x40')][_0x3018('0x120')](db['MailAccount'],{'as':_0x3018('0x16a'),'foreignKey':'MailAccountId'});db[_0x3018('0x40')][_0x3018('0x120')](db[_0x3018('0x15b')],{'as':_0x3018('0x16b'),'foreignKey':_0x3018('0x15c')});db[_0x3018('0x40')][_0x3018('0x120')](db[_0x3018('0x13')],{'as':_0x3018('0x16c'),'foreignKey':'UserId'});db[_0x3018('0x40')][_0x3018('0x123')](db[_0x3018('0x87')],{'through':_0x3018('0x16d'),'as':_0x3018('0x16e')});db[_0x3018('0x40')][_0x3018('0x123')](db[_0x3018('0x87')],{'through':_0x3018('0x16d'),'as':_0x3018('0x16f')});db[_0x3018('0x40')][_0x3018('0x123')](db['User'],{'as':_0x3018('0x170'),'through':_0x3018('0x128'),'foreignKey':'MailInteractionId'});db[_0x3018('0x42')][_0x3018('0x111')](db[_0x3018('0xe8')],{'as':_0x3018('0x171'),'onDelete':'cascade'});db[_0x3018('0x42')]['belongsTo'](db[_0x3018('0x13')],{'as':_0x3018('0x13')});db[_0x3018('0x42')][_0x3018('0x120')](db[_0x3018('0x15b')],{'onDelete':'cascade','as':_0x3018('0x16b')});db[_0x3018('0x42')][_0x3018('0x120')](db[_0x3018('0x40')],{'as':_0x3018('0x172'),'foreignKey':_0x3018('0x169')});db[_0x3018('0x42')][_0x3018('0x120')](db[_0x3018('0x3b')],{'as':_0x3018('0x16a'),'foreignKey':_0x3018('0x15e')});db[_0x3018('0x42')]['belongsTo'](db['ChatWebsite'],{'as':_0x3018('0x136'),'foreignKey':_0x3018('0x173')});db[_0x3018('0x42')][_0x3018('0x120')](db['ChatOfflineMessage'],{'as':'ChatOfflineMessage','foreignKey':_0x3018('0x174')});db[_0x3018('0x44')]['belongsTo'](db['User'],{'onDelete':_0x3018('0x160')});db[_0x3018('0x44')][_0x3018('0x120')](db[_0x3018('0x3d')],{'onDelete':_0x3018('0x160')});db[_0x3018('0x44')][_0x3018('0x120')](db['MailAccount'],{'onDelete':_0x3018('0x160')});db[_0x3018('0x44')]['belongsTo'](db[_0x3018('0x14b')],{'onDelete':'restrict','foreignKey':_0x3018('0x14c')});db['MailApplication'][_0x3018('0x120')](db[_0x3018('0x87')],{'onDelete':_0x3018('0x160'),'foreignKey':_0x3018('0x175')});db[_0x3018('0x45')]['belongsTo'](db[_0x3018('0x3b')],{});db[_0x3018('0x45')][_0x3018('0x120')](db[_0x3018('0xf0')],{'as':_0x3018('0x165'),'foreignKey':_0x3018('0x166')});db[_0x3018('0x45')][_0x3018('0x120')](db[_0x3018('0x15b')],{'as':_0x3018('0x16b'),'foreignKey':_0x3018('0x15c')});db['MailQueueReport']['belongsTo'](db[_0x3018('0x40')],{});db[_0x3018('0x45')][_0x3018('0x120')](db[_0x3018('0x42')],{});db['MailQueueReport'][_0x3018('0x120')](db[_0x3018('0x13')],{});db['MailQueueReport']['belongsTo'](db[_0x3018('0x3d')],{});db[_0x3018('0x47')][_0x3018('0x111')](db['DashboardItem'],{'as':_0x3018('0x176'),'onDelete':_0x3018('0x110')});db[_0x3018('0x49')][_0x3018('0x111')](db['Disposition'],{'as':_0x3018('0x163'),'foreignKey':'FaxAccountId','onDelete':'cascade'});db[_0x3018('0x49')]['hasMany'](db[_0x3018('0x7c')],{'as':'Answers','foreignKey':_0x3018('0x177')});db[_0x3018('0x49')][_0x3018('0x111')](db[_0x3018('0x4c')],{'as':_0x3018('0x164')});db['FaxAccount'][_0x3018('0x111')](db['FaxApplication'],{'as':_0x3018('0x141'),'foreignKey':_0x3018('0x177'),'onDelete':_0x3018('0x110')});db[_0x3018('0x49')][_0x3018('0x111')](db['VoiceExtension'],{'as':_0x3018('0x178'),'onDelete':_0x3018('0x110')});db[_0x3018('0x49')][_0x3018('0x111')](db[_0x3018('0x4e')],{'as':'Messages'});db[_0x3018('0x49')]['belongsTo'](db[_0x3018('0x2b')],{'as':_0x3018('0x2b')});db[_0x3018('0x49')][_0x3018('0x120')](db['CmList'],{'as':'List','foreignKey':_0x3018('0x166')});db[_0x3018('0x49')][_0x3018('0x120')](db[_0x3018('0x82')],{'as':_0x3018('0x14d'),'foreignKey':_0x3018('0x14e')});db[_0x3018('0x49')][_0x3018('0x123')](db['User'],{'as':_0x3018('0x151'),'through':_0x3018('0x139')});db[_0x3018('0x179')][_0x3018('0x120')](db[_0x3018('0x13')],{'onDelete':_0x3018('0x160')});db['FaxApplication'][_0x3018('0x120')](db[_0x3018('0x4f')],{'onDelete':_0x3018('0x160')});db[_0x3018('0x179')][_0x3018('0x120')](db['FaxAccount'],{'onDelete':_0x3018('0x160')});db[_0x3018('0x179')][_0x3018('0x120')](db['Tag'],{'onDelete':_0x3018('0x160'),'foreignKey':_0x3018('0x175')});db[_0x3018('0x4c')][_0x3018('0x111')](db[_0x3018('0x4e')],{'as':_0x3018('0x155'),'onDelete':'cascade','foreignKey':_0x3018('0x17a')});db[_0x3018('0x4c')]['belongsTo'](db['FaxAccount'],{'as':_0x3018('0x16a'),'foreignKey':_0x3018('0x177')});db[_0x3018('0x4c')][_0x3018('0x120')](db[_0x3018('0x15b')],{'as':'Contact','foreignKey':_0x3018('0x15c')});db[_0x3018('0x4c')]['belongsTo'](db[_0x3018('0x13')],{'as':_0x3018('0x16c'),'foreignKey':_0x3018('0x10e')});db[_0x3018('0x4c')]['belongsToMany'](db[_0x3018('0x87')],{'through':'fax_interaction_has_tags','as':_0x3018('0x16e')});db[_0x3018('0x4c')][_0x3018('0x123')](db[_0x3018('0x87')],{'through':_0x3018('0x17b'),'as':_0x3018('0x16f')});db[_0x3018('0x4c')]['belongsToMany'](db[_0x3018('0x13')],{'as':_0x3018('0x170'),'through':_0x3018('0x12a'),'foreignKey':'FaxInteractionId'});db[_0x3018('0x4e')]['belongsTo'](db[_0x3018('0x13')],{'onDelete':_0x3018('0x110'),'as':_0x3018('0x13')});db[_0x3018('0x4e')][_0x3018('0x120')](db['FaxInteraction'],{'as':_0x3018('0x172'),'foreignKey':_0x3018('0x17a')});db[_0x3018('0x4e')][_0x3018('0x120')](db[_0x3018('0x15b')],{'onDelete':_0x3018('0x110'),'as':_0x3018('0x16b')});db[_0x3018('0x4e')][_0x3018('0x120')](db[_0x3018('0xe8')],{'as':_0x3018('0xe8'),'foreignKey':'AttachmentId'});db[_0x3018('0x4e')][_0x3018('0x120')](db[_0x3018('0x49')],{'as':'Account','foreignKey':'FaxAccountId'});db[_0x3018('0x4f')]['belongsToMany'](db[_0x3018('0x13')],{'as':_0x3018('0x151'),'through':_0x3018('0x33')});db[_0x3018('0x4f')][_0x3018('0x123')](db[_0x3018('0xe3')],{'through':'team_has_fax_queues','as':'Teams'});db[_0x3018('0x50')][_0x3018('0x120')](db[_0x3018('0x49')],{});db[_0x3018('0x50')][_0x3018('0x120')](db[_0x3018('0xf0')],{'as':_0x3018('0x165'),'foreignKey':_0x3018('0x166')});db[_0x3018('0x50')][_0x3018('0x120')](db[_0x3018('0x15b')],{'as':_0x3018('0x16b'),'foreignKey':_0x3018('0x15c')});db['FaxQueueReport'][_0x3018('0x120')](db[_0x3018('0x4c')],{});db['FaxQueueReport'][_0x3018('0x120')](db[_0x3018('0x4e')],{});db[_0x3018('0x50')][_0x3018('0x120')](db[_0x3018('0x13')],{});db[_0x3018('0x50')][_0x3018('0x120')](db[_0x3018('0x4f')],{});db[_0x3018('0x52')][_0x3018('0x111')](db[_0x3018('0x7d')],{'as':_0x3018('0x163'),'foreignKey':'SmsAccountId','onDelete':'cascade'});db[_0x3018('0x52')][_0x3018('0x111')](db[_0x3018('0x7c')],{'as':_0x3018('0x17c'),'foreignKey':_0x3018('0x17d')});db[_0x3018('0x52')][_0x3018('0x111')](db[_0x3018('0x57')],{'as':_0x3018('0x155'),'foreignKey':_0x3018('0x17d')});db[_0x3018('0x52')][_0x3018('0x111')](db[_0x3018('0x55')],{'as':_0x3018('0x164')});db[_0x3018('0x52')]['hasMany'](db[_0x3018('0x53')],{'as':_0x3018('0x141'),'foreignKey':_0x3018('0x17d'),'onDelete':_0x3018('0x110')});db[_0x3018('0x52')][_0x3018('0x120')](db[_0x3018('0xf0')],{'as':_0x3018('0x165'),'foreignKey':_0x3018('0x166')});db[_0x3018('0x52')][_0x3018('0x120')](db['Pause'],{'as':_0x3018('0x14d'),'foreignKey':_0x3018('0x14e')});db[_0x3018('0x52')]['belongsToMany'](db[_0x3018('0x13')],{'as':_0x3018('0x151'),'through':'user_has_sms_accounts'});db[_0x3018('0x53')][_0x3018('0x120')](db[_0x3018('0x13')],{'onDelete':_0x3018('0x160')});db[_0x3018('0x53')][_0x3018('0x120')](db[_0x3018('0x58')],{'onDelete':_0x3018('0x160')});db[_0x3018('0x53')]['belongsTo'](db[_0x3018('0x52')],{'onDelete':_0x3018('0x160')});db['SmsApplication'][_0x3018('0x120')](db[_0x3018('0x14b')],{'onDelete':_0x3018('0x160'),'foreignKey':_0x3018('0x14c')});db[_0x3018('0x53')][_0x3018('0x120')](db[_0x3018('0x87')],{'onDelete':_0x3018('0x160'),'foreignKey':_0x3018('0x175')});db[_0x3018('0x55')]['hasMany'](db['SmsMessage'],{'as':_0x3018('0x155'),'onDelete':_0x3018('0x110'),'foreignKey':'SmsInteractionId'});db[_0x3018('0x55')][_0x3018('0x120')](db['SmsAccount'],{'as':_0x3018('0x16a'),'foreignKey':_0x3018('0x17d')});db[_0x3018('0x55')]['belongsTo'](db[_0x3018('0x15b')],{'as':'Contact','foreignKey':'ContactId'});db['SmsInteraction'][_0x3018('0x120')](db[_0x3018('0x13')],{'as':_0x3018('0x16c'),'foreignKey':'UserId'});db[_0x3018('0x55')][_0x3018('0x123')](db['Tag'],{'through':_0x3018('0x17e'),'as':_0x3018('0x16e')});db[_0x3018('0x55')][_0x3018('0x123')](db['Tag'],{'through':_0x3018('0x17e'),'as':_0x3018('0x16f')});db['SmsInteraction'][_0x3018('0x123')](db[_0x3018('0x13')],{'as':_0x3018('0x170'),'through':_0x3018('0x12b'),'foreignKey':'SmsInteractionId'});db[_0x3018('0x57')][_0x3018('0x120')](db[_0x3018('0x13')],{'as':'User'});db['SmsMessage']['belongsTo'](db[_0x3018('0x15b')],{'onDelete':_0x3018('0x110'),'as':_0x3018('0x16b')});db[_0x3018('0x57')][_0x3018('0x120')](db[_0x3018('0x55')],{'onDelete':_0x3018('0x110'),'as':_0x3018('0x172'),'foreignKey':'SmsInteractionId'});db[_0x3018('0x57')][_0x3018('0x120')](db[_0x3018('0x52')],{'as':_0x3018('0x16a'),'foreignKey':'SmsAccountId'});db['SmsQueue'][_0x3018('0x123')](db[_0x3018('0x13')],{'as':'Agents','through':_0x3018('0x35'),'foreignKey':_0x3018('0x17f')});db['SmsQueue'][_0x3018('0x123')](db[_0x3018('0xe3')],{'through':_0x3018('0x180'),'as':'Teams'});db['OpenchannelAccount'][_0x3018('0x111')](db[_0x3018('0x7d')],{'as':_0x3018('0x163'),'foreignKey':_0x3018('0x181'),'onDelete':'cascade'});db['OpenchannelAccount'][_0x3018('0x111')](db[_0x3018('0x7c')],{'as':_0x3018('0x17c'),'foreignKey':_0x3018('0x181')});db[_0x3018('0x5a')][_0x3018('0x111')](db[_0x3018('0x5d')],{'as':_0x3018('0x164'),'foreignKey':'OpenchannelAccountId'});db[_0x3018('0x5a')]['hasMany'](db['OpenchannelMessage'],{'as':_0x3018('0x155'),'foreignKey':_0x3018('0x181')});db['OpenchannelAccount'][_0x3018('0x111')](db[_0x3018('0x5c')],{'as':_0x3018('0x141'),'foreignKey':'OpenchannelAccountId','onDelete':_0x3018('0x110')});db['OpenchannelAccount'][_0x3018('0x120')](db['CmList'],{'as':_0x3018('0x165'),'foreignKey':_0x3018('0x166')});db[_0x3018('0x5a')][_0x3018('0x120')](db[_0x3018('0x82')],{'as':_0x3018('0x14d'),'foreignKey':_0x3018('0x14e')});db['OpenchannelAccount'][_0x3018('0x123')](db['User'],{'as':_0x3018('0x151'),'through':_0x3018('0x182')});db[_0x3018('0x5c')][_0x3018('0x120')](db[_0x3018('0x13')],{'onDelete':_0x3018('0x160')});db[_0x3018('0x5c')]['belongsTo'](db[_0x3018('0x60')],{'onDelete':_0x3018('0x160'),'foreignKey':_0x3018('0x183')});db[_0x3018('0x5c')][_0x3018('0x120')](db[_0x3018('0x5a')],{'onDelete':'restrict','foreignKey':_0x3018('0x181')});db[_0x3018('0x5c')][_0x3018('0x120')](db[_0x3018('0x14b')],{'onDelete':_0x3018('0x160'),'foreignKey':_0x3018('0x14c')});db['OpenchannelApplication']['belongsTo'](db[_0x3018('0x87')],{'onDelete':_0x3018('0x160'),'foreignKey':_0x3018('0x175')});db['OpenchannelInteraction'][_0x3018('0x111')](db[_0x3018('0x184')],{'as':_0x3018('0x155'),'onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x185')});db[_0x3018('0x5d')][_0x3018('0x120')](db[_0x3018('0x5a')],{'as':_0x3018('0x16a'),'foreignKey':_0x3018('0x181')});db['OpenchannelInteraction'][_0x3018('0x120')](db[_0x3018('0x15b')],{'as':_0x3018('0x16b'),'foreignKey':_0x3018('0x15c')});db[_0x3018('0x5d')][_0x3018('0x120')](db['User'],{'as':_0x3018('0x16c'),'foreignKey':_0x3018('0x10e')});db[_0x3018('0x5d')][_0x3018('0x123')](db[_0x3018('0x87')],{'through':_0x3018('0x186'),'as':_0x3018('0x16e')});db[_0x3018('0x5d')][_0x3018('0x123')](db[_0x3018('0x87')],{'through':_0x3018('0x186'),'as':_0x3018('0x16f')});db[_0x3018('0x5d')][_0x3018('0x123')](db['User'],{'as':_0x3018('0x170'),'through':'user_has_openchannel_interactions','foreignKey':_0x3018('0x185')});db[_0x3018('0x184')][_0x3018('0x120')](db['User'],{'onDelete':_0x3018('0x110'),'as':_0x3018('0x13')});db[_0x3018('0x184')][_0x3018('0x120')](db[_0x3018('0x15b')],{'onDelete':_0x3018('0x110'),'as':_0x3018('0x16b')});db['OpenchannelMessage']['belongsTo'](db[_0x3018('0x5d')],{'onDelete':_0x3018('0x110'),'as':_0x3018('0x172'),'foreignKey':_0x3018('0x185')});db[_0x3018('0x184')][_0x3018('0x120')](db[_0x3018('0xe8')],{'as':_0x3018('0xe8'),'foreignKey':_0x3018('0x187')});db[_0x3018('0x184')][_0x3018('0x120')](db[_0x3018('0x5a')],{'as':_0x3018('0x16a'),'foreignKey':_0x3018('0x181')});db[_0x3018('0x60')][_0x3018('0x123')](db['User'],{'as':'Agents','through':_0x3018('0x134'),'foreignKey':_0x3018('0x183')});db[_0x3018('0x60')][_0x3018('0x123')](db['Team'],{'through':_0x3018('0x188'),'as':_0x3018('0x152')});db['ChatWebsite'][_0x3018('0x111')](db['Disposition'],{'as':_0x3018('0x163'),'foreignKey':_0x3018('0x173'),'onDelete':_0x3018('0x110')});db[_0x3018('0x136')][_0x3018('0x111')](db[_0x3018('0x7c')],{'as':_0x3018('0x17c'),'foreignKey':_0x3018('0x173')});db[_0x3018('0x136')][_0x3018('0x111')](db[_0x3018('0x6a')],{'as':_0x3018('0x189')});db[_0x3018('0x136')][_0x3018('0x111')](db['ChatInteraction'],{'as':_0x3018('0x164')});db[_0x3018('0x136')][_0x3018('0x111')](db[_0x3018('0x18a')],{'as':'Applications','foreignKey':_0x3018('0x173'),'onDelete':_0x3018('0x110')});db['ChatWebsite'][_0x3018('0x111')](db[_0x3018('0x66')],{'as':_0x3018('0x155')});db['ChatWebsite'][_0x3018('0x120')](db[_0x3018('0xf0')],{'as':'List','foreignKey':_0x3018('0x166')});db['ChatWebsite']['belongsTo'](db['Interval'],{'as':_0x3018('0x14b'),'foreignKey':_0x3018('0x14c')});db[_0x3018('0x136')][_0x3018('0x120')](db[_0x3018('0x3b')],{'as':_0x3018('0x3b'),'foreignKey':_0x3018('0x15e')});db['ChatWebsite'][_0x3018('0x120')](db[_0x3018('0x82')],{'as':_0x3018('0x14d'),'foreignKey':_0x3018('0x14e')});db[_0x3018('0x136')][_0x3018('0x123')](db[_0x3018('0x13')],{'as':_0x3018('0x151'),'through':_0x3018('0x137')});db[_0x3018('0x18b')][_0x3018('0x120')](db[_0x3018('0x5a')],{});db[_0x3018('0x18b')][_0x3018('0x120')](db[_0x3018('0xf0')],{'as':'List','foreignKey':_0x3018('0x166')});db['OpenchannelQueueReport']['belongsTo'](db[_0x3018('0x15b')],{'as':_0x3018('0x16b'),'foreignKey':_0x3018('0x15c')});db['OpenchannelQueueReport']['belongsTo'](db[_0x3018('0x5d')],{});db[_0x3018('0x18b')]['belongsTo'](db[_0x3018('0x184')],{});db[_0x3018('0x18b')]['belongsTo'](db['User'],{});db[_0x3018('0x18b')]['belongsTo'](db[_0x3018('0x60')],{});db[_0x3018('0x18a')]['belongsTo'](db[_0x3018('0x13')],{'as':_0x3018('0x18c'),'foreignKey':'UserId','onDelete':_0x3018('0x160')});db['ChatApplication']['belongsTo'](db[_0x3018('0x12f')],{'as':'Queue','foreignKey':'ChatQueueId','onDelete':_0x3018('0x160')});db[_0x3018('0x18a')]['belongsTo'](db[_0x3018('0x136')],{'as':_0x3018('0x18d'),'foreignKey':_0x3018('0x173'),'onDelete':_0x3018('0x160')});db[_0x3018('0x18a')][_0x3018('0x120')](db[_0x3018('0x87')],{'onDelete':_0x3018('0x160'),'foreignKey':_0x3018('0x175')});db['ChatInteraction'][_0x3018('0x111')](db[_0x3018('0x66')],{'as':_0x3018('0x155'),'onDelete':_0x3018('0x110'),'foreignKey':'ChatInteractionId'});db[_0x3018('0x64')][_0x3018('0x120')](db[_0x3018('0x136')],{'as':'Account','foreignKey':_0x3018('0x173')});db[_0x3018('0x64')][_0x3018('0x120')](db['CmContact'],{'as':'Contact','foreignKey':'ContactId'});db['ChatInteraction'][_0x3018('0x120')](db[_0x3018('0x13')],{'as':_0x3018('0x16c'),'foreignKey':_0x3018('0x10e')});db['ChatInteraction']['belongsToMany'](db[_0x3018('0x87')],{'through':_0x3018('0x18e'),'as':_0x3018('0x16e')});db[_0x3018('0x64')][_0x3018('0x123')](db[_0x3018('0x87')],{'through':_0x3018('0x18e'),'as':_0x3018('0x16f')});db['ChatInteraction'][_0x3018('0x123')](db[_0x3018('0x13')],{'as':_0x3018('0x170'),'through':_0x3018('0x129'),'foreignKey':_0x3018('0x18f')});db[_0x3018('0x66')][_0x3018('0x120')](db['User'],{'onDelete':_0x3018('0x110'),'as':'User'});db[_0x3018('0x66')]['belongsTo'](db[_0x3018('0x15b')],{'onDelete':'cascade','as':_0x3018('0x16b'),'foreignKey':_0x3018('0x15c')});db[_0x3018('0x66')][_0x3018('0x120')](db['ChatInteraction'],{'onDelete':_0x3018('0x110'),'as':_0x3018('0x172'),'foreignKey':'ChatInteractionId'});db['ChatMessage'][_0x3018('0x120')](db[_0x3018('0xe8')],{'as':_0x3018('0xe8'),'foreignKey':'AttachmentId'});db[_0x3018('0x66')]['belongsTo'](db['ChatWebsite'],{'as':_0x3018('0x16a'),'foreignKey':'ChatWebsiteId'});db[_0x3018('0x190')][_0x3018('0x111')](db[_0x3018('0xe8')],{'as':'Attachments','foreignKey':'ChatOfflineMessageId','onDelete':_0x3018('0x110'),'hooks':!![]});db[_0x3018('0x190')][_0x3018('0x120')](db[_0x3018('0x15b')],{'onDelete':_0x3018('0x110'),'as':_0x3018('0x16b'),'foreignKey':'ContactId'});db['ChatOfflineMessage']['belongsTo'](db['ChatWebsite'],{'as':_0x3018('0x16a'),'foreignKey':_0x3018('0x173')});db[_0x3018('0x12f')][_0x3018('0x123')](db[_0x3018('0x13')],{'as':_0x3018('0x151'),'through':_0x3018('0x30'),'hooks':!![]});db[_0x3018('0x12f')]['belongsToMany'](db['Team'],{'through':'team_has_chat_queues','as':_0x3018('0x152')});db[_0x3018('0x68')][_0x3018('0x111')](db[_0x3018('0x191')],{'as':_0x3018('0x155'),'foreignKey':_0x3018('0x192'),'onDelete':_0x3018('0x110')});db[_0x3018('0x68')][_0x3018('0x123')](db[_0x3018('0x13')],{'as':_0x3018('0x193'),'through':_0x3018('0x194')});db[_0x3018('0x6a')][_0x3018('0x120')](db[_0x3018('0x136')],{'as':'Website','foreignKey':_0x3018('0x173')});db[_0x3018('0x6b')][_0x3018('0x111')](db['CmContact'],{'as':'Contacts','foreignKey':_0x3018('0x195')});db[_0x3018('0x15b')][_0x3018('0x111')](db[_0x3018('0x8b')],{'as':_0x3018('0x196'),'foreignKey':_0x3018('0x197')});db['CmContact']['hasMany'](db[_0x3018('0x6d')],{'as':_0x3018('0x11e'),'foreignKey':'ContactId'});db['CmContact'][_0x3018('0x111')](db[_0x3018('0x71')],{'as':_0x3018('0x114'),'foreignKey':'ContactId'});db[_0x3018('0x15b')][_0x3018('0x111')](db['CmHopperHistory'],{'as':_0x3018('0x146'),'foreignKey':_0x3018('0x15c')});db[_0x3018('0x15b')]['hasMany'](db[_0x3018('0x75')],{'as':_0x3018('0x75'),'foreignKey':_0x3018('0x15c')});db[_0x3018('0x15b')][_0x3018('0x111')](db[_0x3018('0xd2')],{'as':_0x3018('0x147'),'foreignKey':_0x3018('0x15c')});db[_0x3018('0x15b')][_0x3018('0x111')](db[_0x3018('0x5d')],{'as':'OpenchannelInteractions','foreignKey':'ContactId','onDelete':_0x3018('0x160')});db[_0x3018('0x15b')][_0x3018('0x111')](db['ChatInteraction'],{'as':_0x3018('0x116'),'foreignKey':_0x3018('0x15c'),'onDelete':_0x3018('0x160')});db[_0x3018('0x15b')][_0x3018('0x111')](db[_0x3018('0x55')],{'as':'SmsInteractions','foreignKey':_0x3018('0x15c'),'onDelete':_0x3018('0x160')});db[_0x3018('0x15b')][_0x3018('0x111')](db['FaxInteraction'],{'as':_0x3018('0x118'),'foreignKey':_0x3018('0x15c'),'onDelete':_0x3018('0x160')});db[_0x3018('0x15b')][_0x3018('0x111')](db[_0x3018('0x40')],{'as':_0x3018('0x119'),'foreignKey':'ContactId','onDelete':_0x3018('0x160')});db[_0x3018('0x15b')][_0x3018('0x120')](db[_0x3018('0x6b')],{'as':'Company','foreignKey':_0x3018('0x195')});db[_0x3018('0x15b')][_0x3018('0x120')](db[_0x3018('0xf0')],{'as':_0x3018('0x165'),'foreignKey':_0x3018('0x166'),'onDelete':'cascade'});db[_0x3018('0x15b')][_0x3018('0x123')](db[_0x3018('0x13')],{'as':_0x3018('0x170'),'through':'cm_user_has_contacts'});db['CmContact'][_0x3018('0x123')](db['Tag'],{'as':_0x3018('0x16e'),'through':_0x3018('0x198')});db['CmContact'][_0x3018('0x123')](db[_0x3018('0x87')],{'through':'cm_contact_has_tags','as':_0x3018('0x16f')});db['CmHopper'][_0x3018('0x111')](db[_0x3018('0x8d')],{'as':_0x3018('0x199'),'foreignKey':'CmHopperId'});db[_0x3018('0x6d')][_0x3018('0x120')](db[_0x3018('0x15b')],{'as':_0x3018('0x16b'),'foreignKey':_0x3018('0x15c'),'onDelete':'cascade'});db[_0x3018('0x6d')][_0x3018('0x120')](db[_0x3018('0xf0')],{'as':_0x3018('0x165'),'foreignKey':_0x3018('0x166'),'onDelete':_0x3018('0x110')});db[_0x3018('0x6d')][_0x3018('0x120')](db[_0x3018('0x13')],{'as':'Agent','foreignKey':_0x3018('0x10e')});db[_0x3018('0x6d')][_0x3018('0x120')](db['VoiceQueue'],{'as':'Queue','foreignKey':_0x3018('0x145'),'onDelete':_0x3018('0x110')});db[_0x3018('0x6d')][_0x3018('0x120')](db[_0x3018('0xe4')],{'as':_0x3018('0xe4'),'foreignKey':_0x3018('0x19a'),'onDelete':'cascade'});db[_0x3018('0x6d')][_0x3018('0x120')](db['User'],{'as':_0x3018('0x16c'),'foreignKey':_0x3018('0x19b')});db[_0x3018('0x6f')][_0x3018('0x120')](db[_0x3018('0x15b')],{'as':'Contact','foreignKey':_0x3018('0x15c'),'onDelete':_0x3018('0x110')});db['CmHopperBlack']['belongsTo'](db[_0x3018('0xf0')],{'as':'List','foreignKey':'ListId','onDelete':_0x3018('0x110')});db[_0x3018('0x6f')][_0x3018('0x120')](db[_0x3018('0x1b')],{'as':'Queue','foreignKey':'VoiceQueueId','onDelete':_0x3018('0x110')});db['CmHopperBlack'][_0x3018('0x120')](db[_0x3018('0xe4')],{'as':_0x3018('0xe4'),'foreignKey':'CampaignId','onDelete':_0x3018('0x110')});db[_0x3018('0x7a')][_0x3018('0x111')](db[_0x3018('0x7f')],{'as':{'plural':_0x3018('0x19c'),'singular':_0x3018('0x19d')},'foreignKey':_0x3018('0x19e'),'onDelete':'cascade','hooks':!![]});db[_0x3018('0x7a')][_0x3018('0x111')](db[_0x3018('0x7f')],{'as':{'plural':'Any','singular':_0x3018('0x19f')},'foreignKey':_0x3018('0x1a0'),'onDelete':_0x3018('0x110'),'hooks':!![]});db[_0x3018('0x7a')][_0x3018('0x111')](db['Action'],{'as':_0x3018('0x1a1'),'foreignKey':_0x3018('0x1a2'),'onDelete':_0x3018('0x110'),'hooks':!![]});db[_0x3018('0x7d')][_0x3018('0x111')](db[_0x3018('0x7d')],{'as':_0x3018('0x163'),'foreignKey':_0x3018('0x1a3'),'onDelete':'cascade'});db[_0x3018('0x14b')]['hasMany'](db['Interval'],{'as':_0x3018('0x1a4'),'foreignKey':_0x3018('0x14c'),'onDelete':_0x3018('0x110'),'hooks':!![],'required':![]});db['Interval'][_0x3018('0x111')](db[_0x3018('0x112')],{'as':_0x3018('0x113'),'foreignKey':'IntervalId','onDelete':_0x3018('0x160')});db[_0x3018('0x14b')][_0x3018('0x111')](db[_0x3018('0x44')],{'as':_0x3018('0x1a5'),'foreignKey':_0x3018('0x14c')});db['Interval'][_0x3018('0x111')](db[_0x3018('0x18a')],{'as':_0x3018('0x1a6'),'foreignKey':_0x3018('0x14c')});db['Interval']['hasMany'](db[_0x3018('0x179')],{'as':_0x3018('0x1a7'),'foreignKey':_0x3018('0x14c')});db['Interval']['hasMany'](db[_0x3018('0x53')],{'as':_0x3018('0x1a8'),'foreignKey':_0x3018('0x14c')});db['Schedule'][_0x3018('0x120')](db[_0x3018('0x3b')],{});db[_0x3018('0x85')][_0x3018('0x120')](db[_0x3018('0x98')],{'foreignKey':_0x3018('0x1a9')});db[_0x3018('0x85')][_0x3018('0x120')](db['AnalyticCustomReport'],{'foreignKey':_0x3018('0x1aa')});db[_0x3018('0x142')][_0x3018('0x123')](db[_0x3018('0x1a')],{'as':'Mohs','through':_0x3018('0x144'),'onDelete':_0x3018('0x160')});db['Tag'][_0x3018('0x123')](db[_0x3018('0x15b')],{'through':_0x3018('0x198')});db[_0x3018('0x87')][_0x3018('0x123')](db[_0x3018('0x64')],{'through':_0x3018('0x18e')});db['Tag']['belongsToMany'](db[_0x3018('0x40')],{'through':_0x3018('0x16d')});db[_0x3018('0x87')][_0x3018('0x123')](db[_0x3018('0x55')],{'through':_0x3018('0x17e')});db['Tag'][_0x3018('0x123')](db[_0x3018('0x4c')],{'through':_0x3018('0x17b')});db['Tag']['belongsToMany'](db[_0x3018('0x5d')],{'through':_0x3018('0x186')});db[_0x3018('0x87')]['belongsToMany'](db[_0x3018('0x11a')],{'through':_0x3018('0x1ab')});db[_0x3018('0x8b')][_0x3018('0x120')](db['ContactItemType'],{'as':_0x3018('0x1ac'),'foreignKey':_0x3018('0x1ad')});db['CmHopperAdditionalPhone'][_0x3018('0x120')](db[_0x3018('0x6d')],{'as':_0x3018('0x1ae'),'foreignKey':_0x3018('0x1af')});db[_0x3018('0x8b')][_0x3018('0x120')](db['CmContact'],{'as':_0x3018('0x16b'),'foreignKey':'CmContactId'});db[_0x3018('0x1b0')][_0x3018('0x111')](db[_0x3018('0x7f')],{'as':{'plural':_0x3018('0x1b1'),'singular':_0x3018('0x1b2')},'foreignKey':_0x3018('0x1b3'),'onDelete':'cascade','hooks':!![]});db[_0x3018('0x1b0')][_0x3018('0x111')](db['Condition'],{'as':{'plural':_0x3018('0x1b4'),'singular':_0x3018('0x1b5')},'foreignKey':_0x3018('0x1b6'),'onDelete':_0x3018('0x110'),'hooks':!![]});db[_0x3018('0x1b0')][_0x3018('0x111')](db['Action'],{'as':'Actions','foreignKey':_0x3018('0x1b7'),'onDelete':_0x3018('0x110'),'hooks':!![]});db['AnalyticCustomReport'][_0x3018('0x111')](db[_0x3018('0x1b8')],{'as':_0x3018('0x1b9'),'onDelete':_0x3018('0x110'),'foreignKey':'CustomReportId','hooks':!![]});db[_0x3018('0x98')][_0x3018('0x111')](db[_0x3018('0x1b8')],{'as':'Fields','onDelete':'cascade','foreignKey':_0x3018('0x1a9')});db[_0x3018('0x99')][_0x3018('0x111')](db[_0x3018('0x1b8')],{'as':'Fields','onDelete':_0x3018('0x110'),'foreignKey':'MetricId'});db[_0x3018('0x1b8')]['belongsTo'](db[_0x3018('0x99')],{'foreignKey':_0x3018('0x1ba')});db['SalesforceAccount'][_0x3018('0x111')](db[_0x3018('0x9e')],{'as':_0x3018('0x1bb'),'onDelete':_0x3018('0x110'),'foreignKey':'AccountId'});db[_0x3018('0x9e')][_0x3018('0x111')](db[_0x3018('0x1bc')],{'as':_0x3018('0x1bd'),'onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1be')});db[_0x3018('0x9e')]['hasMany'](db[_0x3018('0x1bc')],{'as':'Descriptions','onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1bf')});db[_0x3018('0x9e')][_0x3018('0x111')](db[_0x3018('0x1bc')],{'as':'Fields','onDelete':_0x3018('0x110'),'foreignKey':'FieldId'});db[_0x3018('0x9e')][_0x3018('0x120')](db[_0x3018('0x9d')],{'as':_0x3018('0x16a'),'foreignKey':_0x3018('0x1c0')});db['SalesforceField'][_0x3018('0x111')](db[_0x3018('0x1bc')],{'as':'Subject','foreignKey':_0x3018('0x1be')});db[_0x3018('0x1bc')][_0x3018('0x111')](db['SalesforceField'],{'as':'Description','foreignKey':'DescriptionId'});db[_0x3018('0x1bc')][_0x3018('0x111')](db[_0x3018('0x1bc')],{'as':'Field','foreignKey':_0x3018('0x1c1')});db[_0x3018('0x1bc')][_0x3018('0x120')](db[_0x3018('0x90')],{'as':_0x3018('0x90'),'foreignKey':_0x3018('0x1c2')});db[_0x3018('0xa1')]['hasMany'](db['SugarcrmConfiguration'],{'as':_0x3018('0x1bb'),'onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1c0')});db[_0x3018('0x1c3')][_0x3018('0x111')](db[_0x3018('0xa4')],{'as':_0x3018('0x1bd'),'onDelete':'cascade','foreignKey':_0x3018('0x1be')});db[_0x3018('0x1c3')][_0x3018('0x111')](db['SugarcrmField'],{'as':'Descriptions','onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1bf')});db['SugarcrmConfiguration']['hasMany'](db[_0x3018('0xa4')],{'as':_0x3018('0x1b9'),'onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1c1')});db[_0x3018('0x1c3')]['belongsTo'](db[_0x3018('0xa1')],{'as':_0x3018('0x16a'),'foreignKey':'AccountId'});db[_0x3018('0xa4')][_0x3018('0x111')](db[_0x3018('0xa4')],{'as':_0x3018('0x1c4'),'foreignKey':'SubjectId'});db[_0x3018('0xa4')][_0x3018('0x111')](db[_0x3018('0xa4')],{'as':_0x3018('0x1c5'),'foreignKey':_0x3018('0x1bf')});db[_0x3018('0xa4')][_0x3018('0x111')](db[_0x3018('0xa4')],{'as':'Field','foreignKey':_0x3018('0x1c1')});db[_0x3018('0xa4')][_0x3018('0x120')](db[_0x3018('0x90')],{'as':_0x3018('0x90'),'foreignKey':_0x3018('0x1c2')});db[_0x3018('0x1c6')][_0x3018('0x111')](db[_0x3018('0xa7')],{'as':_0x3018('0x1bb'),'onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1c0')});db[_0x3018('0xa7')]['hasMany'](db[_0x3018('0x1c7')],{'as':_0x3018('0x1bd'),'onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1be')});db[_0x3018('0xa7')][_0x3018('0x111')](db[_0x3018('0x1c7')],{'as':_0x3018('0x1c8'),'onDelete':_0x3018('0x110'),'foreignKey':'DescriptionId'});db[_0x3018('0xa7')][_0x3018('0x111')](db[_0x3018('0x1c7')],{'as':'Fields','onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1c1')});db[_0x3018('0xa7')][_0x3018('0x120')](db['DeskAccount'],{'as':_0x3018('0x16a'),'foreignKey':_0x3018('0x1c0')});db[_0x3018('0xa7')][_0x3018('0x123')](db[_0x3018('0x87')],{'through':_0x3018('0x1c9')});db[_0x3018('0x1c7')][_0x3018('0x111')](db[_0x3018('0x1c7')],{'as':_0x3018('0x1c4'),'foreignKey':_0x3018('0x1be')});db['DeskField'][_0x3018('0x111')](db['DeskField'],{'as':_0x3018('0x1c5'),'foreignKey':'DescriptionId'});db[_0x3018('0x1c7')]['hasMany'](db[_0x3018('0x1c7')],{'as':'Field','foreignKey':_0x3018('0x1c1')});db[_0x3018('0x1c7')][_0x3018('0x120')](db['Variable'],{'as':_0x3018('0x90'),'foreignKey':_0x3018('0x1c2')});db[_0x3018('0xaa')][_0x3018('0x111')](db[_0x3018('0xac')],{'as':_0x3018('0x1bb'),'onDelete':'cascade','foreignKey':_0x3018('0x1c0')});db[_0x3018('0xac')][_0x3018('0x111')](db[_0x3018('0xae')],{'as':_0x3018('0x1bd'),'onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1be')});db[_0x3018('0xac')][_0x3018('0x111')](db[_0x3018('0xae')],{'as':_0x3018('0x1c8'),'onDelete':'cascade','foreignKey':'DescriptionId'});db[_0x3018('0xac')][_0x3018('0x111')](db['ZohoField'],{'as':'Fields','onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1c1')});db[_0x3018('0xac')][_0x3018('0x120')](db[_0x3018('0xaa')],{'as':_0x3018('0x16a'),'foreignKey':'AccountId'});db[_0x3018('0xae')][_0x3018('0x111')](db[_0x3018('0xae')],{'as':_0x3018('0x1c4'),'foreignKey':'SubjectId'});db[_0x3018('0xae')]['hasMany'](db[_0x3018('0xae')],{'as':_0x3018('0x1c5'),'foreignKey':_0x3018('0x1bf')});db['ZohoField']['hasMany'](db[_0x3018('0xae')],{'as':_0x3018('0x1ca'),'foreignKey':_0x3018('0x1c1')});db[_0x3018('0xae')][_0x3018('0x120')](db[_0x3018('0x90')],{'as':'Variable','foreignKey':_0x3018('0x1c2')});db[_0x3018('0x1cb')][_0x3018('0x111')](db[_0x3018('0xb1')],{'as':_0x3018('0x1bb'),'onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1c0')});db[_0x3018('0xb1')][_0x3018('0x111')](db['ZendeskField'],{'as':_0x3018('0x1bd'),'foreignKey':_0x3018('0x1be')});db[_0x3018('0xb1')][_0x3018('0x111')](db[_0x3018('0xb2')],{'as':_0x3018('0x1c8'),'foreignKey':_0x3018('0x1bf')});db[_0x3018('0xb1')][_0x3018('0x111')](db[_0x3018('0xb2')],{'as':'Fields','foreignKey':_0x3018('0x1c1')});db['ZendeskConfiguration']['belongsTo'](db['ZendeskAccount'],{'as':'Account','foreignKey':_0x3018('0x1c0')});db[_0x3018('0xb1')][_0x3018('0x123')](db[_0x3018('0x87')],{'through':'int_zendesk_configuration_has_tags'});db[_0x3018('0xb2')][_0x3018('0x111')](db['ZendeskField'],{'as':_0x3018('0x1c4'),'foreignKey':_0x3018('0x1be')});db['ZendeskField'][_0x3018('0x111')](db[_0x3018('0xb2')],{'as':'Description','foreignKey':_0x3018('0x1bf')});db[_0x3018('0xb2')][_0x3018('0x111')](db[_0x3018('0xb2')],{'as':_0x3018('0x1ca'),'foreignKey':_0x3018('0x1c1')});db[_0x3018('0xb2')][_0x3018('0x120')](db[_0x3018('0x90')],{'as':_0x3018('0x90'),'foreignKey':_0x3018('0x1c2')});db[_0x3018('0xb4')][_0x3018('0x111')](db[_0x3018('0xb6')],{'as':_0x3018('0x1bb'),'onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1c0')});db[_0x3018('0xb6')][_0x3018('0x111')](db[_0x3018('0xb7')],{'as':_0x3018('0x1bd'),'onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1be')});db['FreshdeskConfiguration'][_0x3018('0x111')](db['FreshdeskField'],{'as':_0x3018('0x1c8'),'onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1bf')});db['FreshdeskConfiguration']['hasMany'](db[_0x3018('0xb7')],{'as':_0x3018('0x1b9'),'onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1c1')});db[_0x3018('0xb6')]['belongsTo'](db['FreshdeskAccount'],{'as':_0x3018('0x16a'),'foreignKey':_0x3018('0x1c0')});db[_0x3018('0xb6')]['belongsToMany'](db['Tag'],{'through':'int_freshdesk_configuration_has_tags'});db[_0x3018('0xb7')]['hasMany'](db['FreshdeskField'],{'as':_0x3018('0x1c4'),'foreignKey':_0x3018('0x1be')});db[_0x3018('0xb7')][_0x3018('0x111')](db[_0x3018('0xb7')],{'as':_0x3018('0x1c5'),'foreignKey':'DescriptionId'});db[_0x3018('0xb7')][_0x3018('0x111')](db[_0x3018('0xb7')],{'as':_0x3018('0x1ca'),'foreignKey':_0x3018('0x1c1')});db[_0x3018('0xb7')]['belongsTo'](db['Variable'],{'as':_0x3018('0x90'),'foreignKey':_0x3018('0x1c2')});db[_0x3018('0xb9')][_0x3018('0x111')](db[_0x3018('0x1cc')],{'as':_0x3018('0x1bb'),'onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1c0')});db['VtigerConfiguration']['hasMany'](db[_0x3018('0x1cd')],{'as':'Subjects','foreignKey':'SubjectId'});db[_0x3018('0x1cc')][_0x3018('0x111')](db[_0x3018('0x1cd')],{'as':'Descriptions','foreignKey':_0x3018('0x1bf')});db[_0x3018('0x1cc')][_0x3018('0x111')](db[_0x3018('0x1cd')],{'as':_0x3018('0x1b9'),'foreignKey':_0x3018('0x1c1')});db[_0x3018('0x1cc')][_0x3018('0x120')](db[_0x3018('0xb9')],{'as':_0x3018('0x16a'),'foreignKey':_0x3018('0x1c0')});db[_0x3018('0x1cd')]['hasMany'](db['VtigerField'],{'as':_0x3018('0x1c4'),'foreignKey':_0x3018('0x1be')});db['VtigerField'][_0x3018('0x111')](db[_0x3018('0x1cd')],{'as':'Description','foreignKey':_0x3018('0x1bf')});db[_0x3018('0x1cd')][_0x3018('0x111')](db[_0x3018('0x1cd')],{'as':'Field','foreignKey':'FieldId'});db[_0x3018('0x1cd')][_0x3018('0x120')](db[_0x3018('0x90')],{'as':_0x3018('0x90'),'foreignKey':_0x3018('0x1c2')});db[_0x3018('0xbd')]['hasMany'](db[_0x3018('0xbf')],{'as':'Configurations','onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1c0')});db['ServicenowConfiguration'][_0x3018('0x111')](db[_0x3018('0xc1')],{'as':_0x3018('0x1bd'),'foreignKey':_0x3018('0x1be')});db['ServicenowConfiguration'][_0x3018('0x111')](db[_0x3018('0xc1')],{'as':_0x3018('0x1c8'),'foreignKey':_0x3018('0x1bf')});db[_0x3018('0xbf')][_0x3018('0x111')](db[_0x3018('0xc1')],{'as':'Fields','foreignKey':_0x3018('0x1c1')});db[_0x3018('0xbf')][_0x3018('0x120')](db[_0x3018('0xbd')],{'as':_0x3018('0x16a'),'foreignKey':_0x3018('0x1c0')});db[_0x3018('0xc1')][_0x3018('0x111')](db[_0x3018('0xc1')],{'as':'Subject','foreignKey':_0x3018('0x1be')});db[_0x3018('0xc1')]['hasMany'](db['ServicenowField'],{'as':'Description','foreignKey':_0x3018('0x1bf')});db[_0x3018('0xc1')][_0x3018('0x111')](db['ServicenowField'],{'as':_0x3018('0x1ca'),'foreignKey':_0x3018('0x1c1')});db[_0x3018('0xc1')][_0x3018('0x120')](db[_0x3018('0x90')],{'as':'Variable','foreignKey':'VariableId'});db[_0x3018('0xc3')]['hasMany'](db[_0x3018('0xc5')],{'as':_0x3018('0x1bb'),'onDelete':'cascade','foreignKey':_0x3018('0x1c0')});db[_0x3018('0xc3')][_0x3018('0x120')](db['CloudProvider'],{'as':_0x3018('0x106'),'foreignKey':'CloudProviderId'});db[_0x3018('0xc5')][_0x3018('0x111')](db['Dynamics365Field'],{'as':_0x3018('0x1bd'),'onDelete':'cascade','foreignKey':_0x3018('0x1be')});db[_0x3018('0xc5')][_0x3018('0x111')](db[_0x3018('0x1ce')],{'as':_0x3018('0x1c8'),'onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1bf')});db[_0x3018('0xc5')]['hasMany'](db['Dynamics365Field'],{'as':'Fields','onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1c1')});db[_0x3018('0xc5')][_0x3018('0x120')](db['Dynamics365Account'],{'as':'Account','foreignKey':_0x3018('0x1c0')});db[_0x3018('0x1ce')][_0x3018('0x111')](db[_0x3018('0x1ce')],{'as':'Subject','foreignKey':_0x3018('0x1be')});db[_0x3018('0x1ce')][_0x3018('0x111')](db[_0x3018('0x1ce')],{'as':_0x3018('0x1c5'),'foreignKey':_0x3018('0x1bf')});db[_0x3018('0x1ce')][_0x3018('0x111')](db[_0x3018('0x1ce')],{'as':_0x3018('0x1ca'),'foreignKey':'FieldId'});db[_0x3018('0x1ce')]['belongsTo'](db['Variable'],{'as':_0x3018('0x90'),'foreignKey':'VariableId'});db[_0x3018('0x1cf')]['hasMany'](db['FreshsalesConfiguration'],{'as':'Configurations','onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1c0')});db[_0x3018('0xc8')][_0x3018('0x111')](db[_0x3018('0xc9')],{'as':_0x3018('0x1bd'),'foreignKey':_0x3018('0x1be')});db['FreshsalesConfiguration'][_0x3018('0x111')](db[_0x3018('0xc9')],{'as':'Descriptions','foreignKey':_0x3018('0x1bf')});db[_0x3018('0xc8')][_0x3018('0x111')](db['FreshsalesField'],{'as':'Fields','foreignKey':_0x3018('0x1c1')});db['FreshsalesConfiguration'][_0x3018('0x120')](db[_0x3018('0x1cf')],{'as':'Account','foreignKey':'AccountId'});db[_0x3018('0xc9')][_0x3018('0x111')](db[_0x3018('0xc9')],{'as':_0x3018('0x1c4'),'foreignKey':_0x3018('0x1be')});db[_0x3018('0xc9')][_0x3018('0x111')](db[_0x3018('0xc9')],{'as':_0x3018('0x1c5'),'foreignKey':'DescriptionId'});db[_0x3018('0xc9')][_0x3018('0x111')](db[_0x3018('0xc9')],{'as':'Field','foreignKey':_0x3018('0x1c1')});db[_0x3018('0xc9')][_0x3018('0x120')](db[_0x3018('0x90')],{'as':_0x3018('0x90'),'foreignKey':_0x3018('0x1c2')});db[_0x3018('0xcc')][_0x3018('0x120')](db[_0x3018('0x136')],{});db[_0x3018('0xcc')][_0x3018('0x120')](db[_0x3018('0xf0')],{'as':_0x3018('0x165'),'foreignKey':'ListId'});db[_0x3018('0xcc')][_0x3018('0x120')](db[_0x3018('0x15b')],{'as':_0x3018('0x16b'),'foreignKey':_0x3018('0x15c')});db['ChatQueueReport'][_0x3018('0x120')](db['ChatInteraction'],{});db['ChatQueueReport']['belongsTo'](db[_0x3018('0x66')],{});db[_0x3018('0xcc')][_0x3018('0x120')](db[_0x3018('0x13')],{});db['ChatQueueReport'][_0x3018('0x120')](db[_0x3018('0x12f')],{});db['ChatInternalMessage'][_0x3018('0x120')](db[_0x3018('0x13')],{'onDelete':'cascade','foreignKey':_0x3018('0x1d0')});db[_0x3018('0x191')][_0x3018('0x120')](db['User'],{'onDelete':_0x3018('0x110'),'foreignKey':_0x3018('0x1d1')});db[_0x3018('0xd2')][_0x3018('0x111')](db[_0x3018('0xd0')],{'foreignKey':'SessionId','onDelete':_0x3018('0x110')});db[_0x3018('0xd2')][_0x3018('0x111')](db[_0x3018('0x1d2')],{'foreignKey':_0x3018('0x1d3'),'onDelete':'cascade'});db[_0x3018('0xd4')][_0x3018('0x120')](db[_0x3018('0x52')],{});db[_0x3018('0xd4')][_0x3018('0x120')](db[_0x3018('0xf0')],{'as':_0x3018('0x165'),'foreignKey':'ListId'});db['SmsQueueReport'][_0x3018('0x120')](db[_0x3018('0x15b')],{'as':_0x3018('0x16b'),'foreignKey':_0x3018('0x15c')});db[_0x3018('0xd4')][_0x3018('0x120')](db[_0x3018('0x55')],{});db[_0x3018('0xd4')][_0x3018('0x120')](db[_0x3018('0x57')],{});db[_0x3018('0xd4')][_0x3018('0x120')](db[_0x3018('0x13')],{});db[_0x3018('0xd4')][_0x3018('0x120')](db['SmsQueue'],{});db[_0x3018('0xda')][_0x3018('0x111')](db[_0x3018('0xd2')],{'foreignKey':_0x3018('0x1d4')});db[_0x3018('0xda')]['hasMany'](db['JscriptyQuestionReport'],{'foreignKey':_0x3018('0x1d4')});db[_0x3018('0xda')]['hasMany'](db[_0x3018('0x1d2')],{'foreignKey':_0x3018('0x1d4')});db[_0x3018('0xe3')][_0x3018('0x123')](db[_0x3018('0x13')],{'as':_0x3018('0x151'),'through':_0x3018('0x127')});db[_0x3018('0xe3')]['belongsToMany'](db['VoiceQueue'],{'through':_0x3018('0x1d5'),'as':'VoiceQueues'});db[_0x3018('0xe3')]['belongsToMany'](db[_0x3018('0x3d')],{'through':_0x3018('0x168'),'as':_0x3018('0x12e')});db[_0x3018('0xe3')][_0x3018('0x123')](db[_0x3018('0x12f')],{'through':_0x3018('0x1d6'),'as':_0x3018('0x130')});db['Team'][_0x3018('0x123')](db[_0x3018('0x4f')],{'through':_0x3018('0x1d7'),'as':_0x3018('0x131')});db[_0x3018('0xe3')][_0x3018('0x123')](db[_0x3018('0x58')],{'through':_0x3018('0x180'),'as':_0x3018('0x132')});db['Team']['belongsToMany'](db['OpenchannelQueue'],{'through':'team_has_openchannel_queues','as':_0x3018('0x133')});db[_0x3018('0xe3')]['belongsToMany'](db['WhatsappQueue'],{'through':_0x3018('0x1d8'),'as':_0x3018('0x135')});db[_0x3018('0xe3')][_0x3018('0x123')](db[_0x3018('0xf2')],{'through':'TeamVoicePrefix','as':'VoicePrefixes'});db[_0x3018('0xe4')][_0x3018('0x111')](db['CmHopper'],{'as':_0x3018('0x11e'),'foreignKey':_0x3018('0x19a')});db[_0x3018('0xe4')][_0x3018('0x111')](db[_0x3018('0x71')],{'as':_0x3018('0x114'),'foreignKey':_0x3018('0x19a')});db['Campaign'][_0x3018('0x111')](db[_0x3018('0x73')],{'as':_0x3018('0x146'),'foreignKey':_0x3018('0x19a')});db[_0x3018('0xe4')][_0x3018('0x111')](db[_0x3018('0x6f')],{'as':'HopperBlacks','foreignKey':_0x3018('0x19a')});db[_0x3018('0xe4')]['belongsTo'](db[_0x3018('0x2b')],{'as':_0x3018('0x2b'),'foreignKey':'TrunkId'});db[_0x3018('0xe4')][_0x3018('0x120')](db['Trunk'],{'as':_0x3018('0x149'),'foreignKey':_0x3018('0x14a')});db[_0x3018('0xe4')][_0x3018('0x120')](db[_0x3018('0x14b')],{'as':_0x3018('0x14b'),'foreignKey':_0x3018('0x14c')});db[_0x3018('0xe4')][_0x3018('0x120')](db[_0x3018('0xde')],{'as':_0x3018('0xde'),'foreignKey':_0x3018('0x1d9')});db[_0x3018('0xe4')]['belongsToMany'](db['CmList'],{'as':'Lists','through':_0x3018('0x1da')});db['Campaign'][_0x3018('0x123')](db[_0x3018('0xf0')],{'as':_0x3018('0x153'),'through':_0x3018('0x1db')});db['Attachment'][_0x3018('0x120')](db['ChatOfflineMessage'],{'as':_0x3018('0x190'),'foreignKey':_0x3018('0x174')});db[_0x3018('0xeb')][_0x3018('0x120')](db['MailMessage'],{});db[_0x3018('0xeb')][_0x3018('0x120')](db[_0x3018('0x40')],{});db[_0x3018('0xeb')][_0x3018('0x120')](db[_0x3018('0x3b')],{'foreignKey':_0x3018('0x1dc'),'as':'FromAccount'});db[_0x3018('0xeb')][_0x3018('0x120')](db['User'],{'foreignKey':_0x3018('0x1dd'),'as':_0x3018('0x1de')});db[_0x3018('0xeb')][_0x3018('0x120')](db[_0x3018('0x13')],{'foreignKey':_0x3018('0x1df'),'as':_0x3018('0x1e0')});db[_0x3018('0xeb')][_0x3018('0x120')](db[_0x3018('0x3d')],{'foreignKey':_0x3018('0x1e1'),'as':'ToQueue'});db[_0x3018('0xeb')][_0x3018('0x120')](db[_0x3018('0x3b')],{'foreignKey':'ToMailAccountId','as':'ToAccount'});db['ChatTransferReport'][_0x3018('0x120')](db[_0x3018('0x66')],{});db[_0x3018('0x1e2')][_0x3018('0x120')](db[_0x3018('0x64')],{});db[_0x3018('0x1e2')][_0x3018('0x120')](db[_0x3018('0x136')],{'foreignKey':_0x3018('0x1e3'),'as':'FromAccount'});db[_0x3018('0x1e2')]['belongsTo'](db[_0x3018('0x13')],{'foreignKey':'FromUserId','as':_0x3018('0x1de')});db['ChatTransferReport'][_0x3018('0x120')](db[_0x3018('0x13')],{'foreignKey':_0x3018('0x1df'),'as':'ToAgent'});db[_0x3018('0x1e2')][_0x3018('0x120')](db[_0x3018('0x12f')],{'foreignKey':_0x3018('0x1e4'),'as':_0x3018('0x1e5')});db[_0x3018('0x1e2')][_0x3018('0x120')](db[_0x3018('0x136')],{'foreignKey':'ToChatWebsiteId','as':_0x3018('0x1e6')});db[_0x3018('0x1e7')][_0x3018('0x120')](db[_0x3018('0x4e')],{});db[_0x3018('0x1e7')]['belongsTo'](db['FaxInteraction'],{});db[_0x3018('0x1e7')][_0x3018('0x120')](db[_0x3018('0x49')],{'foreignKey':_0x3018('0x1e8'),'as':_0x3018('0x1e9')});db[_0x3018('0x1e7')][_0x3018('0x120')](db[_0x3018('0x13')],{'foreignKey':_0x3018('0x1dd'),'as':'FromAgent'});db[_0x3018('0x1e7')][_0x3018('0x120')](db[_0x3018('0x13')],{'foreignKey':_0x3018('0x1df'),'as':_0x3018('0x1e0')});db[_0x3018('0x1e7')][_0x3018('0x120')](db['FaxQueue'],{'foreignKey':_0x3018('0x1ea'),'as':_0x3018('0x1e5')});db[_0x3018('0x1e7')][_0x3018('0x120')](db[_0x3018('0x49')],{'foreignKey':_0x3018('0x1eb'),'as':_0x3018('0x1e6')});db['OpenchannelTransferReport'][_0x3018('0x120')](db[_0x3018('0x184')],{});db[_0x3018('0x1ec')][_0x3018('0x120')](db['OpenchannelInteraction'],{});db[_0x3018('0x1ec')][_0x3018('0x120')](db[_0x3018('0x5a')],{'foreignKey':_0x3018('0x1ed'),'as':_0x3018('0x1e9')});db['OpenchannelTransferReport'][_0x3018('0x120')](db[_0x3018('0x13')],{'foreignKey':_0x3018('0x1dd'),'as':_0x3018('0x1de')});db[_0x3018('0x1ec')]['belongsTo'](db['User'],{'foreignKey':_0x3018('0x1df'),'as':'ToAgent'});db['OpenchannelTransferReport'][_0x3018('0x120')](db[_0x3018('0x60')],{'foreignKey':_0x3018('0x1ee'),'as':'ToQueue'});db['OpenchannelTransferReport'][_0x3018('0x120')](db[_0x3018('0x5a')],{'foreignKey':'ToOpenchannelAccountId','as':_0x3018('0x1e6')});db['SmsTransferReport']['belongsTo'](db[_0x3018('0x57')],{});db[_0x3018('0xee')][_0x3018('0x120')](db['SmsInteraction'],{});db[_0x3018('0xee')][_0x3018('0x120')](db[_0x3018('0x52')],{'foreignKey':_0x3018('0x1ef'),'as':_0x3018('0x1e9')});db[_0x3018('0xee')][_0x3018('0x120')](db[_0x3018('0x13')],{'foreignKey':'FromUserId','as':_0x3018('0x1de')});db['SmsTransferReport'][_0x3018('0x120')](db[_0x3018('0x13')],{'foreignKey':_0x3018('0x1df'),'as':'ToAgent'});db['SmsTransferReport'][_0x3018('0x120')](db['SmsQueue'],{'foreignKey':'ToSmsQueueId','as':'ToQueue'});db[_0x3018('0xee')]['belongsTo'](db[_0x3018('0x52')],{'foreignKey':'ToSmsAccountId','as':_0x3018('0x1e6')});db[_0x3018('0xf0')][_0x3018('0x111')](db['Disposition'],{'as':'Dispositions','foreignKey':_0x3018('0x166'),'onDelete':_0x3018('0x110')});db[_0x3018('0xf0')][_0x3018('0x111')](db['CmCustomField'],{'as':_0x3018('0x1f0'),'foreignKey':_0x3018('0x166')});db[_0x3018('0xf0')]['hasMany'](db['CmContact'],{'as':_0x3018('0x124'),'onDelete':'cascade','foreignKey':'ListId'});db[_0x3018('0xf0')][_0x3018('0x111')](db['CmHopperFinal'],{'as':_0x3018('0x114'),'foreignKey':_0x3018('0x166')});db['CmList']['hasMany'](db[_0x3018('0x73')],{'as':_0x3018('0x1f1'),'foreignKey':'ListId'});db[_0x3018('0xf0')][_0x3018('0x111')](db[_0x3018('0x75')],{'as':_0x3018('0x75'),'foreignKey':'ListId'});db[_0x3018('0xf0')][_0x3018('0x123')](db['VoiceQueue'],{'as':_0x3018('0x1f2'),'through':_0x3018('0x150')});db[_0x3018('0xf0')][_0x3018('0x123')](db[_0x3018('0x13')],{'as':_0x3018('0x151'),'through':_0x3018('0x126')});db[_0x3018('0xf2')][_0x3018('0x111')](db['VoiceExtension'],{'as':_0x3018('0x113'),'onDelete':_0x3018('0x110')});db[_0x3018('0xf2')]['belongsToMany'](db[_0x3018('0x13')],{'as':'Agents','through':'UserVoicePrefix'});db[_0x3018('0xf2')][_0x3018('0x123')](db['Team'],{'through':_0x3018('0x1f3'),'as':_0x3018('0x152')});db['UserProfile'][_0x3018('0x111')](db[_0x3018('0x13')],{'as':_0x3018('0x170'),'foreignKey':'userProfileId'});db['UserProfile'][_0x3018('0x111')](db[_0x3018('0x1f4')],{'as':_0x3018('0x1f5'),'foreignKey':_0x3018('0x121'),'onDelete':_0x3018('0x110')});db['UserProfileSection']['hasMany'](db[_0x3018('0xf7')],{'as':_0x3018('0x1f6'),'foreignKey':'sectionId','onDelete':_0x3018('0x110')});db[_0x3018('0xfb')]['hasMany'](db[_0x3018('0x7d')],{'as':_0x3018('0x163'),'foreignKey':_0x3018('0x1f7'),'onDelete':'cascade'});db[_0x3018('0xfb')][_0x3018('0x111')](db[_0x3018('0x7c')],{'as':'Answers','foreignKey':_0x3018('0x1f7')});db['WhatsappAccount']['hasMany'](db[_0x3018('0x100')],{'as':'Messages','foreignKey':'WhatsappAccountId'});db[_0x3018('0xfb')][_0x3018('0x111')](db[_0x3018('0x11a')],{'as':_0x3018('0x164')});db['WhatsappAccount'][_0x3018('0x111')](db[_0x3018('0xfd')],{'as':'Applications','foreignKey':_0x3018('0x1f7'),'onDelete':_0x3018('0x110')});db[_0x3018('0xfb')][_0x3018('0x120')](db[_0x3018('0xf0')],{'as':_0x3018('0x165'),'foreignKey':_0x3018('0x166')});db[_0x3018('0xfb')]['belongsTo'](db[_0x3018('0x82')],{'as':_0x3018('0x14d'),'foreignKey':_0x3018('0x14e')});db[_0x3018('0xfb')]['belongsToMany'](db[_0x3018('0x13')],{'as':_0x3018('0x151'),'through':_0x3018('0x1f8')});db[_0x3018('0xfd')][_0x3018('0x120')](db[_0x3018('0x13')],{'onDelete':_0x3018('0x160')});db[_0x3018('0xfd')][_0x3018('0x120')](db[_0x3018('0x104')],{'onDelete':_0x3018('0x160')});db['WhatsappApplication'][_0x3018('0x120')](db['WhatsappAccount'],{'onDelete':_0x3018('0x160')});db['WhatsappApplication'][_0x3018('0x120')](db[_0x3018('0x14b')],{'onDelete':_0x3018('0x160'),'foreignKey':_0x3018('0x14c')});db['WhatsappApplication'][_0x3018('0x120')](db[_0x3018('0x87')],{'onDelete':_0x3018('0x160'),'foreignKey':'TagId'});db[_0x3018('0x11a')][_0x3018('0x111')](db['WhatsappMessage'],{'as':_0x3018('0x155'),'onDelete':_0x3018('0x110'),'foreignKey':'WhatsappInteractionId'});db[_0x3018('0x11a')][_0x3018('0x120')](db[_0x3018('0xfb')],{'as':_0x3018('0x16a'),'foreignKey':_0x3018('0x1f7')});db[_0x3018('0x11a')][_0x3018('0x120')](db['CmContact'],{'as':'Contact','foreignKey':_0x3018('0x15c')});db[_0x3018('0x11a')][_0x3018('0x120')](db[_0x3018('0x13')],{'as':'Owner','foreignKey':_0x3018('0x10e')});db[_0x3018('0x11a')][_0x3018('0x123')](db[_0x3018('0x87')],{'through':'whatsapp_interaction_has_tags','as':_0x3018('0x16e')});db[_0x3018('0x11a')]['belongsToMany'](db[_0x3018('0x87')],{'through':_0x3018('0x1ab'),'as':_0x3018('0x16f')});db[_0x3018('0x11a')][_0x3018('0x123')](db['User'],{'as':_0x3018('0x170'),'through':_0x3018('0x1f9'),'foreignKey':_0x3018('0x1fa')});db[_0x3018('0x100')][_0x3018('0x120')](db[_0x3018('0x13')],{'as':_0x3018('0x13')});db[_0x3018('0x100')][_0x3018('0x120')](db[_0x3018('0x15b')],{'onDelete':_0x3018('0x110'),'as':_0x3018('0x16b')});db[_0x3018('0x100')]['belongsTo'](db['WhatsappInteraction'],{'onDelete':'cascade','as':'Interaction','foreignKey':_0x3018('0x1fa')});db['WhatsappMessage'][_0x3018('0x120')](db['WhatsappAccount'],{'as':_0x3018('0x16a'),'foreignKey':_0x3018('0x1f7')});db[_0x3018('0x102')][_0x3018('0x120')](db[_0x3018('0xfb')],{});db[_0x3018('0x102')][_0x3018('0x120')](db[_0x3018('0xf0')],{'as':_0x3018('0x165'),'foreignKey':_0x3018('0x166')});db[_0x3018('0x102')][_0x3018('0x120')](db[_0x3018('0x15b')],{'as':'Contact','foreignKey':_0x3018('0x15c')});db[_0x3018('0x102')][_0x3018('0x120')](db['WhatsappInteraction'],{});db[_0x3018('0x102')][_0x3018('0x120')](db[_0x3018('0x104')],{});db['WhatsappQueueReport'][_0x3018('0x120')](db['WhatsappMessage'],{});db[_0x3018('0x102')][_0x3018('0x120')](db[_0x3018('0x13')],{});db['WhatsappTransferReport'][_0x3018('0x120')](db[_0x3018('0x100')],{});db[_0x3018('0x1fb')]['belongsTo'](db['WhatsappInteraction'],{});db['WhatsappTransferReport']['belongsTo'](db['WhatsappAccount'],{'foreignKey':'FromWhatsappAccountId','as':_0x3018('0x1e9')});db[_0x3018('0x1fb')][_0x3018('0x120')](db[_0x3018('0xfb')],{'foreignKey':_0x3018('0x1fc'),'as':_0x3018('0x1e6')});db[_0x3018('0x1fb')]['belongsTo'](db[_0x3018('0x104')],{'foreignKey':_0x3018('0x1fd'),'as':_0x3018('0x1e5')});db[_0x3018('0x1fb')][_0x3018('0x120')](db[_0x3018('0x13')],{'foreignKey':_0x3018('0x1dd'),'as':_0x3018('0x1de')});db[_0x3018('0x1fb')]['belongsTo'](db[_0x3018('0x13')],{'foreignKey':_0x3018('0x1df'),'as':'ToAgent'});db[_0x3018('0x104')][_0x3018('0x123')](db[_0x3018('0x13')],{'as':'Agents','through':'UserWhatsappQueue','foreignKey':_0x3018('0x1fe')});db[_0x3018('0x104')][_0x3018('0x123')](db[_0x3018('0xe3')],{'through':_0x3018('0x1d8'),'as':_0x3018('0x152')});db[_0x3018('0x10c')][_0x3018('0x120')](db[_0x3018('0x13')],{'as':_0x3018('0x1ff'),'foreignKey':_0x3018('0x10e'),'onDelete':'cascade','hooks':!![]});db[_0x3018('0x106')][_0x3018('0x10d')](db['Dynamics365Account'],{'as':_0x3018('0xc3'),'onDelete':_0x3018('0x160')});db[_0x3018('0x106')]['hasOne'](db[_0x3018('0x15d')],{'as':_0x3018('0x200'),'onDelete':_0x3018('0x160')});db[_0x3018('0x106')]['hasOne'](db[_0x3018('0x161')],{'as':_0x3018('0x162'),'onDelete':_0x3018('0x160')});module[_0x3018('0x201')]={'db':db,'dbH':dbH};
\ No newline at end of file
index b125a64..06ba564 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5c6b=['./api/intZohoAccount','./api/intZohoConfiguration','/api/integrations/zoho/fields','./api/intZohoField','/api/integrations/zendesk/accounts','/api/integrations/zendesk/fields','/api/integrations/freshdesk/accounts','./api/intFreshdeskAccount','/api/integrations/freshdesk/configurations','./api/intFreshdeskConfiguration','/api/integrations/freshdesk/fields','./api/intFreshdeskField','/api/integrations/vtiger/accounts','/api/integrations/vtiger/configurations','./api/intVtigerField','/api/integrations/servicenow/accounts','./api/intServicenowAccount','./api/intServicenowConfiguration','/api/integrations/servicenow/fields','./api/intServicenowField','/api/integrations/dynamics365/configurations','./api/intDynamics365Configuration','./api/intDynamics365Field','./api/intFreshsalesAccount','/api/integrations/freshsales/configurations','/api/integrations/freshsales/fields','./api/intFreshsalesField','/api/networks','./api/network','/api/chat/reports/queue','./api/chatInternalMessage','./api/jscriptyAnswerReport','./api/jscriptyQuestionReport','./api/jscriptySessionReport','/api/sms/reports/queue','./api/smsQueueReport','./api/squareReport','/api/square/details/reports','./api/squareReportDetail','/api/jscripty/projects','./api/jscriptyProject','/api/settings','./api/squareOdbc','./api/squareProject','/api/square/recordings','/api/square/messages','./api/team','./api/license','./api/campaign','/api/migrations','./api/migration','./api/attachment','/api/plugins','./api/plugin','/api/mail/reports/transfer','./api/mailTransferReport','./api/chatTransferReport','./api/faxTransferReport','/api/sms/reports/transfer','./api/smsTransferReport','/api/cm/lists','./api/voicePrefix','/api/userProfiles','./api/userProfile','/api/userProfile/sections','./api/userProfileSection','/api/userProfile/resources','./api/userNotification','/api/whatsapp/accounts','/api/whatsapp/applications','./api/whatsappApplication','/api/whatsapp/interactions','./api/whatsappInteraction','./api/whatsappMessage','/api/whatsapp/reports/queue','./api/whatsappQueueReport','./api/whatsappTransferReport','/api/whatsapp/queues','./api/whatsappQueue','/api/cloudProviders','./api/cloudProvider','/api/realtime','./api/realtime','/api/user-settings','./api/user-setting','/api/auth/local','./api/authLocal','/api/auth/google','/api/auth/activedirectory','./api/authActiveDirectory','/api/jira','./api/jira','/api/rpc','/api/version','/api/system','./api/system','./api/pm2','./api/webbar','/api/logs','root','/apidoc','/www','static','join','/snippet','3.8.1','/plugins','/server/files/plugins','route','/:url(api|auth|components|app|bower_components|assets)/*','get','sendFile','resolve','appPath','./utils/client-side-logger','./api/client-side-logs','default','then','use','/api/users','/api/voice/chanspy','./api/voiceContext','/api/voice/mohs','./api/voiceMusicOnHold','/api/voice/queues','./api/voiceQueue','/api/voice/recordings','./api/voiceRecording','./api/screenRecording','./api/voiceMail','/api/voice/mails/messages','/api/voice/calls/reports','./api/voiceCallReport','/api/voice/dials/reports','/api/voice/agents/reports','./api/voiceAgentReport','/api/voice/queues/reports','./api/voiceQueueReport','/api/members/reports','./api/memberReport','/api/trunks','./api/trunk','/api/voice/transfers/reports','./api/voiceTransferReport','/api/mail/out_servers','./api/mailServerOut','/api/mail/accounts','./api/mailAccount','./api/mailQueue','./api/mailSubstatus','/api/mail/interactions','./api/mailInteraction','/api/mail/messages','./api/mailMessage','/api/mail/applications','./api/mailQueueReport','/api/dashboards','./api/dashboard','/api/dashboards/items','/api/fax/accounts','./api/faxAccount','/api/fax/applications','./api/faxMessage','/api/fax/queues','./api/faxQueue','/api/fax/reports/queue','./api/faxQueueReport','/api/sms/accounts','./api/smsAccount','/api/sms/applications','/api/sms/interactions','./api/smsInteraction','/api/sms/messages','./api/smsMessage','./api/smsQueue','/api/openchannel/accounts','./api/openchannelAccount','./api/openchannelApplication','/api/openchannel/interactions','./api/openchannelInteraction','/api/openchannel/messages','./api/openchannelMessage','/api/openchannel/queues','./api/openchannelQueue','/api/chat/websites','/api/openchannel/reports/queue','./api/openchannelQueueReport','/api/chat/applications','./api/chatApplication','/api/chat/interactions','./api/chatInteraction','./api/chatMessage','/api/chat/offline_messages','./api/chatOfflineMessage','/api/chat/queues','/api/chat/groups','./api/chatGroup','/api/chat/proactive_actions','./api/chatProactiveAction','/api/cm/companies','./api/cmCompany','/api/cm/contacts','/api/cm/hopper','/api/cm/hopper_black','./api/cmHopperBlack','./api/cmHopperFinal','/api/cm/hopper_history','./api/action','/api/automations','/api/canned_answers','./api/disposition','/api/conditions','./api/condition','./api/interval','/api/pauses','./api/pause','./api/cdr','/api/voiceQueuesLog','./api/voiceQueuesLog','./api/schedule','/api/sounds','./api/sound','/api/contact_item_types','./api/contactItemType','./api/cmContactHasItem','/api/cm_hopper_additional_phones','/api/templates','./api/template','/api/triggers','./api/trigger','/api/variables','./api/variable','/api/integrations','./api/integration','/api/integrations/reports','/api/analytics/custom_reports','./api/analyticCustomReport','/api/analytics/default_reports','./api/analyticDefaultReport','/api/analytics/extracted_reports','/api/analytics/metrics','./api/analyticMetric','/api/analytics/field_reports','./api/analyticFieldReport','/api/analytics/tree_reports','/api/integrations/salesforce/accounts','./api/intSalesforceAccount','/api/integrations/salesforce/configurations','./api/intSalesforceConfiguration','/api/integrations/salesforce/fields','./api/intSalesforceField','/api/integrations/sugarcrm/configurations','./api/intSugarcrmConfiguration','./api/intSugarcrmField','/api/integrations/desk/accounts','./api/intDeskAccount','/api/integrations/desk/configurations','./api/intDeskConfiguration','/api/integrations/desk/fields','./api/intDeskField','/api/integrations/zoho/accounts'];(function(_0x91a92f,_0x41b7c8){var _0x56d7cb=function(_0x450b7b){while(--_0x450b7b){_0x91a92f['push'](_0x91a92f['shift']());}};_0x56d7cb(++_0x41b7c8);}(_0x5c6b,0x72));var _0xb5c6=function(_0x1fe401,_0x9c538e){_0x1fe401=_0x1fe401-0x0;var _0x1e65b1=_0x5c6b[_0x1fe401];return _0x1e65b1;};'use strict';var path=require('path');var express=require('express');var errors=require('./errors');var config=require('./config/environment');var setupLoggers=require(_0xb5c6('0x0'))['setupLoggers'];var clientSideLogs=require(_0xb5c6('0x1'));exports[_0xb5c6('0x2')]=function(_0x1d7067){return setupLoggers(_0x1d7067)[_0xb5c6('0x3')](function(){_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x5'),require('./api/user'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x6'),require('./api/voiceChanSpy'));_0x1d7067[_0xb5c6('0x4')]('/api/voice/contexts',require(_0xb5c6('0x7')));_0x1d7067['use']('/api/voice/extensions',require('./api/voiceExtension'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x8'),require(_0xb5c6('0x9')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xa'),require(_0xb5c6('0xb')));_0x1d7067['use'](_0xb5c6('0xc'),require(_0xb5c6('0xd')));_0x1d7067['use']('/api/screen/recordings',require(_0xb5c6('0xe')));_0x1d7067[_0xb5c6('0x4')]('/api/voice/mails',require(_0xb5c6('0xf')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x10'),require('./api/voiceMailMessage'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x11'),require(_0xb5c6('0x12')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x13'),require('./api/voiceDialReport'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x14'),require(_0xb5c6('0x15')));_0x1d7067['use'](_0xb5c6('0x16'),require(_0xb5c6('0x17')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x18'),require(_0xb5c6('0x19')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x1a'),require(_0xb5c6('0x1b')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x1c'),require(_0xb5c6('0x1d')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x1e'),require(_0xb5c6('0x1f')));_0x1d7067['use'](_0xb5c6('0x20'),require(_0xb5c6('0x21')));_0x1d7067['use']('/api/mail/queues',require(_0xb5c6('0x22')));_0x1d7067['use']('/api/mail/substatuses',require(_0xb5c6('0x23')));_0x1d7067['use'](_0xb5c6('0x24'),require(_0xb5c6('0x25')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x26'),require(_0xb5c6('0x27')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x28'),require('./api/mailApplication'));_0x1d7067[_0xb5c6('0x4')]('/api/mail/reports/queue',require(_0xb5c6('0x29')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x2a'),require(_0xb5c6('0x2b')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x2c'),require('./api/dashboardItem'));_0x1d7067['use'](_0xb5c6('0x2d'),require(_0xb5c6('0x2e')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x2f'),require('./api/faxApplication'));_0x1d7067[_0xb5c6('0x4')]('/api/fax/interactions',require('./api/faxInteraction'));_0x1d7067['use']('/api/fax/messages',require(_0xb5c6('0x30')));_0x1d7067['use'](_0xb5c6('0x31'),require(_0xb5c6('0x32')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x33'),require(_0xb5c6('0x34')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x35'),require(_0xb5c6('0x36')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x37'),require('./api/smsApplication'));_0x1d7067['use'](_0xb5c6('0x38'),require(_0xb5c6('0x39')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x3a'),require(_0xb5c6('0x3b')));_0x1d7067[_0xb5c6('0x4')]('/api/sms/queues',require(_0xb5c6('0x3c')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x3d'),require(_0xb5c6('0x3e')));_0x1d7067['use']('/api/openchannel/applications',require(_0xb5c6('0x3f')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x40'),require(_0xb5c6('0x41')));_0x1d7067['use'](_0xb5c6('0x42'),require(_0xb5c6('0x43')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x44'),require(_0xb5c6('0x45')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x46'),require('./api/chatWebsite'));_0x1d7067['use'](_0xb5c6('0x47'),require(_0xb5c6('0x48')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x49'),require(_0xb5c6('0x4a')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x4b'),require(_0xb5c6('0x4c')));_0x1d7067[_0xb5c6('0x4')]('/api/chat/messages',require(_0xb5c6('0x4d')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x4e'),require(_0xb5c6('0x4f')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x50'),require('./api/chatQueue'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x51'),require(_0xb5c6('0x52')));_0x1d7067['use'](_0xb5c6('0x53'),require(_0xb5c6('0x54')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x55'),require(_0xb5c6('0x56')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x57'),require('./api/cmContact'));_0x1d7067['use'](_0xb5c6('0x58'),require('./api/cmHopper'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x59'),require(_0xb5c6('0x5a')));_0x1d7067[_0xb5c6('0x4')]('/api/cm/hopper_final',require(_0xb5c6('0x5b')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x5c'),require('./api/cmHopperHistory'));_0x1d7067[_0xb5c6('0x4')]('/api/cm/custom_fields',require('./api/cmCustomField'));_0x1d7067[_0xb5c6('0x4')]('/api/actions',require(_0xb5c6('0x5d')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x5e'),require('./api/automation'));_0x1d7067['use'](_0xb5c6('0x5f'),require('./api/cannedAnswer'));_0x1d7067[_0xb5c6('0x4')]('/api/dispositions',require(_0xb5c6('0x60')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x61'),require(_0xb5c6('0x62')));_0x1d7067[_0xb5c6('0x4')]('/api/intervals',require(_0xb5c6('0x63')));_0x1d7067['use'](_0xb5c6('0x64'),require(_0xb5c6('0x65')));_0x1d7067['use']('/api/cdr',require(_0xb5c6('0x66')));_0x1d7067['use'](_0xb5c6('0x67'),require(_0xb5c6('0x68')));_0x1d7067['use']('/api/schedules',require(_0xb5c6('0x69')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x6a'),require(_0xb5c6('0x6b')));_0x1d7067[_0xb5c6('0x4')]('/api/tags',require('./api/tag'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x6c'),require(_0xb5c6('0x6d')));_0x1d7067[_0xb5c6('0x4')]('/api/cm_contact_has_items',require(_0xb5c6('0x6e')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x6f'),require('./api/cmHopperAdditionalPhone'));_0x1d7067['use'](_0xb5c6('0x70'),require(_0xb5c6('0x71')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x72'),require(_0xb5c6('0x73')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x74'),require(_0xb5c6('0x75')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x76'),require(_0xb5c6('0x77')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x78'),require('./api/integrationReport'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x79'),require(_0xb5c6('0x7a')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x7b'),require(_0xb5c6('0x7c')));_0x1d7067['use'](_0xb5c6('0x7d'),require('./api/analyticExtractedReport'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x7e'),require(_0xb5c6('0x7f')));_0x1d7067['use'](_0xb5c6('0x80'),require(_0xb5c6('0x81')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x82'),require('./api/analyticTreeReport'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x83'),require(_0xb5c6('0x84')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x85'),require(_0xb5c6('0x86')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x87'),require(_0xb5c6('0x88')));_0x1d7067[_0xb5c6('0x4')]('/api/integrations/sugarcrm/accounts',require('./api/intSugarcrmAccount'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x89'),require(_0xb5c6('0x8a')));_0x1d7067[_0xb5c6('0x4')]('/api/integrations/sugarcrm/fields',require(_0xb5c6('0x8b')));_0x1d7067['use'](_0xb5c6('0x8c'),require(_0xb5c6('0x8d')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x8e'),require(_0xb5c6('0x8f')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x90'),require(_0xb5c6('0x91')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x92'),require(_0xb5c6('0x93')));_0x1d7067['use']('/api/integrations/zoho/configurations',require(_0xb5c6('0x94')));_0x1d7067['use'](_0xb5c6('0x95'),require(_0xb5c6('0x96')));_0x1d7067['use'](_0xb5c6('0x97'),require('./api/intZendeskAccount'));_0x1d7067['use']('/api/integrations/zendesk/configurations',require('./api/intZendeskConfiguration'));_0x1d7067['use'](_0xb5c6('0x98'),require('./api/intZendeskField'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x99'),require(_0xb5c6('0x9a')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x9b'),require(_0xb5c6('0x9c')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x9d'),require(_0xb5c6('0x9e')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0x9f'),require('./api/intVtigerAccount'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xa0'),require('./api/intVtigerConfiguration'));_0x1d7067['use']('/api/integrations/vtiger/fields',require(_0xb5c6('0xa1')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xa2'),require(_0xb5c6('0xa3')));_0x1d7067[_0xb5c6('0x4')]('/api/integrations/servicenow/configurations',require(_0xb5c6('0xa4')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xa5'),require(_0xb5c6('0xa6')));_0x1d7067[_0xb5c6('0x4')]('/api/integrations/dynamics365/accounts',require('./api/intDynamics365Account'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xa7'),require(_0xb5c6('0xa8')));_0x1d7067[_0xb5c6('0x4')]('/api/integrations/dynamics365/fields',require(_0xb5c6('0xa9')));_0x1d7067['use']('/api/integrations/freshsales/accounts',require(_0xb5c6('0xaa')));_0x1d7067['use'](_0xb5c6('0xab'),require('./api/intFreshsalesConfiguration'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xac'),require(_0xb5c6('0xad')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xae'),require(_0xb5c6('0xaf')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xb0'),require('./api/chatQueueReport'));_0x1d7067[_0xb5c6('0x4')]('/api/chat/internal/messages',require(_0xb5c6('0xb1')));_0x1d7067[_0xb5c6('0x4')]('/api/jscripty/answers/reports',require(_0xb5c6('0xb2')));_0x1d7067[_0xb5c6('0x4')]('/api/jscripty/questions/reports',require(_0xb5c6('0xb3')));_0x1d7067['use']('/api/jscripty/sessions/reports',require(_0xb5c6('0xb4')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xb5'),require(_0xb5c6('0xb6')));_0x1d7067[_0xb5c6('0x4')]('/api/square/reports',require(_0xb5c6('0xb7')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xb8'),require(_0xb5c6('0xb9')));_0x1d7067['use'](_0xb5c6('0xba'),require(_0xb5c6('0xbb')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xbc'),require('./api/setting'));_0x1d7067[_0xb5c6('0x4')]('/api/square/odbc',require(_0xb5c6('0xbd')));_0x1d7067['use']('/api/square/projects',require(_0xb5c6('0xbe')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xbf'),require('./api/squareRecording'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xc0'),require('./api/squareMessage'));_0x1d7067[_0xb5c6('0x4')]('/api/teams',require(_0xb5c6('0xc1')));_0x1d7067['use']('/api/license',require(_0xb5c6('0xc2')));_0x1d7067[_0xb5c6('0x4')]('/api/campaigns',require(_0xb5c6('0xc3')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xc4'),require(_0xb5c6('0xc5')));_0x1d7067[_0xb5c6('0x4')]('/api/attachments',require(_0xb5c6('0xc6')));_0x1d7067['use'](_0xb5c6('0xc7'),require(_0xb5c6('0xc8')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xc9'),require(_0xb5c6('0xca')));_0x1d7067[_0xb5c6('0x4')]('/api/chat/reports/transfer',require(_0xb5c6('0xcb')));_0x1d7067['use']('/api/fax/reports/transfer',require(_0xb5c6('0xcc')));_0x1d7067[_0xb5c6('0x4')]('/api/openchannel/reports/transfer',require('./api/openchannelTransferReport'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xcd'),require(_0xb5c6('0xce')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xcf'),require('./api/cmList'));_0x1d7067[_0xb5c6('0x4')]('/api/voice/prefixes',require(_0xb5c6('0xd0')));_0x1d7067['use'](_0xb5c6('0xd1'),require(_0xb5c6('0xd2')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xd3'),require(_0xb5c6('0xd4')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xd5'),require('./api/userProfileResource'));_0x1d7067[_0xb5c6('0x4')]('/api/userNotifications',require(_0xb5c6('0xd6')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xd7'),require('./api/whatsappAccount'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xd8'),require(_0xb5c6('0xd9')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xda'),require(_0xb5c6('0xdb')));_0x1d7067['use']('/api/whatsapp/messages',require(_0xb5c6('0xdc')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xdd'),require(_0xb5c6('0xde')));_0x1d7067['use']('/api/whatsapp/reports/transfer',require(_0xb5c6('0xdf')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xe0'),require(_0xb5c6('0xe1')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xe2'),require(_0xb5c6('0xe3')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xe4'),require(_0xb5c6('0xe5')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xe6'),require(_0xb5c6('0xe7')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xe8'),require(_0xb5c6('0xe9')));_0x1d7067['use'](_0xb5c6('0xea'),require('./api/authGoogle'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xeb'),require(_0xb5c6('0xec')));_0x1d7067['use'](_0xb5c6('0xed'),require(_0xb5c6('0xee')));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xef'),require('./api/rpc'));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xf0'),require('./api/version'));_0x1d7067['use'](_0xb5c6('0xf1'),require(_0xb5c6('0xf2')));_0x1d7067[_0xb5c6('0x4')]('/api/pm2',require(_0xb5c6('0xf3')));_0x1d7067['use']('/api/webbar',require(_0xb5c6('0xf4')));_0x1d7067['use'](_0xb5c6('0xf5'),clientSideLogs);_0x1d7067[_0xb5c6('0x4')]('/apidoc',express['static'](path['join'](config[_0xb5c6('0xf6')],_0xb5c6('0xf7'))));_0x1d7067[_0xb5c6('0x4')](_0xb5c6('0xf8'),express[_0xb5c6('0xf9')](path[_0xb5c6('0xfa')](config[_0xb5c6('0xf6')],_0xb5c6('0xf8'))));_0x1d7067[_0xb5c6('0x4')]('/demo',express['static'](path[_0xb5c6('0xfa')](config[_0xb5c6('0xf6')],'/demo')));_0x1d7067['use'](_0xb5c6('0xfb'),express[_0xb5c6('0xf9')](path[_0xb5c6('0xfa')](config[_0xb5c6('0xf6')],'snippet',_0xb5c6('0xfc'))));_0x1d7067['use'](_0xb5c6('0xfd'),express[_0xb5c6('0xf9')](path[_0xb5c6('0xfa')](config[_0xb5c6('0xf6')],_0xb5c6('0xfe'))));_0x1d7067[_0xb5c6('0xff')](_0xb5c6('0x100'))[_0xb5c6('0x101')](errors[0x194]);_0x1d7067[_0xb5c6('0xff')]('/*')[_0xb5c6('0x101')](function(_0x20e5b6,_0x48fd50){_0x48fd50[_0xb5c6('0x102')](path[_0xb5c6('0x103')](_0x1d7067['get'](_0xb5c6('0x104'))+'/index.html'));});return _0x1d7067;});};
\ No newline at end of file
+var _0x87db=['./api/intFreshdeskAccount','/api/integrations/freshdesk/configurations','/api/integrations/freshdesk/fields','/api/integrations/vtiger/accounts','./api/intVtigerAccount','/api/integrations/vtiger/configurations','/api/integrations/vtiger/fields','./api/intServicenowAccount','/api/integrations/servicenow/configurations','./api/intServicenowConfiguration','/api/integrations/servicenow/fields','./api/intServicenowField','/api/integrations/dynamics365/accounts','/api/integrations/dynamics365/configurations','./api/intDynamics365Configuration','./api/intDynamics365Field','/api/integrations/freshsales/accounts','./api/intFreshsalesAccount','./api/intFreshsalesConfiguration','./api/intFreshsalesField','/api/networks','./api/network','/api/chat/reports/queue','./api/chatQueueReport','/api/chat/internal/messages','/api/jscripty/answers/reports','./api/jscriptyAnswerReport','/api/jscripty/questions/reports','/api/sms/reports/queue','./api/squareReportDetail','/api/jscripty/projects','./api/jscriptyProject','/api/settings','/api/square/odbc','./api/squareOdbc','/api/square/projects','./api/squareProject','/api/square/recordings','./api/squareRecording','/api/square/messages','./api/squareMessage','./api/team','/api/license','./api/license','./api/migration','/api/attachments','/api/plugins','./api/plugin','/api/chat/reports/transfer','./api/chatTransferReport','/api/fax/reports/transfer','./api/faxTransferReport','/api/openchannel/reports/transfer','./api/openchannelTransferReport','/api/sms/reports/transfer','./api/smsTransferReport','/api/voice/prefixes','./api/voicePrefix','/api/userProfiles','/api/userProfile/sections','./api/userProfileSection','/api/userProfile/resources','/api/whatsapp/accounts','./api/whatsappAccount','/api/whatsapp/applications','./api/whatsappApplication','/api/whatsapp/interactions','./api/whatsappInteraction','/api/whatsapp/messages','/api/whatsapp/reports/queue','/api/whatsapp/reports/transfer','./api/whatsappTransferReport','/api/whatsapp/queues','./api/whatsappQueue','/api/cloudProviders','./api/cloudProvider','/api/user-settings','./api/user-setting','/api/auth/local','./api/authLocal','./api/authGoogle','/api/auth/activedirectory','./api/authActiveDirectory','./api/jira','/api/rpc','./api/rpc','/api/version','./api/version','/api/system','./api/system','./api/pm2','/api/webbar','/apidoc','static','/www','join','root','/demo','/snippet','/plugins','/server/files/plugins','route','get','sendFile','resolve','appPath','express','./errors','./utils/client-side-logger','setupLoggers','./api/client-side-logs','default','use','/api/users','./api/user','/api/voice/chanspy','./api/voiceChanSpy','/api/voice/contexts','./api/voiceExtension','/api/voice/mohs','./api/voiceMusicOnHold','/api/voice/queues','./api/voiceQueue','/api/voice/recordings','./api/voiceRecording','/api/screen/recordings','./api/screenRecording','/api/voice/mails','/api/voice/mails/messages','./api/voiceMailMessage','/api/voice/calls/reports','./api/voiceCallReport','/api/voice/dials/reports','./api/voiceDialReport','/api/voice/agents/reports','/api/voice/queues/reports','./api/voiceQueueReport','/api/members/reports','./api/trunk','/api/voice/transfers/reports','./api/voiceTransferReport','/api/mail/out_servers','./api/mailServerOut','/api/mail/accounts','/api/mail/queues','./api/mailQueue','/api/mail/substatuses','./api/mailSubstatus','/api/mail/interactions','/api/mail/applications','./api/mailApplication','./api/mailQueueReport','/api/dashboards','./api/dashboard','./api/dashboardItem','/api/fax/applications','./api/faxApplication','/api/fax/interactions','./api/faxInteraction','/api/fax/messages','./api/faxMessage','/api/fax/queues','./api/faxQueue','/api/fax/reports/queue','/api/sms/accounts','./api/smsAccount','/api/sms/applications','./api/smsApplication','./api/smsInteraction','/api/sms/messages','./api/smsMessage','/api/sms/queues','./api/openchannelAccount','/api/openchannel/applications','./api/openchannelApplication','/api/openchannel/interactions','./api/openchannelInteraction','/api/openchannel/messages','./api/openchannelMessage','/api/openchannel/queues','./api/openchannelQueue','/api/chat/websites','./api/chatWebsite','./api/openchannelQueueReport','/api/chat/applications','/api/chat/interactions','./api/chatInteraction','./api/chatMessage','/api/chat/offline_messages','./api/chatOfflineMessage','/api/chat/queues','./api/chatQueue','/api/chat/groups','/api/chat/proactive_actions','./api/chatProactiveAction','/api/cm/companies','./api/cmCompany','./api/cmContact','/api/cm/hopper','./api/cmHopper','./api/cmHopperBlack','/api/cm/hopper_final','./api/cmHopperFinal','/api/cm/hopper_history','./api/cmHopperHistory','/api/actions','./api/action','/api/automations','./api/automation','/api/canned_answers','./api/cannedAnswer','/api/dispositions','./api/disposition','./api/condition','/api/intervals','./api/interval','/api/pauses','./api/pause','/api/cdr','./api/cdr','./api/voiceQueuesLog','/api/schedules','./api/schedule','/api/sounds','./api/sound','./api/tag','/api/contact_item_types','./api/contactItemType','/api/cm_hopper_additional_phones','/api/templates','/api/triggers','./api/trigger','/api/variables','/api/integrations','/api/integrations/reports','./api/integrationReport','./api/analyticCustomReport','/api/analytics/default_reports','./api/analyticDefaultReport','./api/analyticExtractedReport','/api/analytics/metrics','/api/analytics/field_reports','./api/analyticFieldReport','/api/analytics/tree_reports','./api/analyticTreeReport','/api/integrations/salesforce/accounts','./api/intSalesforceAccount','./api/intSalesforceConfiguration','/api/integrations/salesforce/fields','./api/intSalesforceField','/api/integrations/sugarcrm/accounts','./api/intSugarcrmAccount','/api/integrations/sugarcrm/fields','/api/integrations/desk/accounts','./api/intDeskAccount','/api/integrations/desk/configurations','./api/intDeskField','./api/intZohoAccount','/api/integrations/zoho/configurations','./api/intZohoConfiguration','./api/intZohoField','/api/integrations/zendesk/accounts','./api/intZendeskAccount','/api/integrations/zendesk/configurations','/api/integrations/zendesk/fields','./api/intZendeskField','/api/integrations/freshdesk/accounts'];(function(_0xc9ea99,_0x2eaa85){var _0x9fa747=function(_0x3c51e4){while(--_0x3c51e4){_0xc9ea99['push'](_0xc9ea99['shift']());}};_0x9fa747(++_0x2eaa85);}(_0x87db,0x6a));var _0xb87d=function(_0x34b19f,_0x5e6523){_0x34b19f=_0x34b19f-0x0;var _0xa9a938=_0x87db[_0x34b19f];return _0xa9a938;};'use strict';var path=require('path');var express=require(_0xb87d('0x0'));var errors=require(_0xb87d('0x1'));var config=require('./config/environment');var setupLoggers=require(_0xb87d('0x2'))[_0xb87d('0x3')];var clientSideLogs=require(_0xb87d('0x4'));exports[_0xb87d('0x5')]=function(_0x3cf5e8){return setupLoggers(_0x3cf5e8)['then'](function(){_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x7'),require(_0xb87d('0x8')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x9'),require(_0xb87d('0xa')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xb'),require('./api/voiceContext'));_0x3cf5e8[_0xb87d('0x6')]('/api/voice/extensions',require(_0xb87d('0xc')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xd'),require(_0xb87d('0xe')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xf'),require(_0xb87d('0x10')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x11'),require(_0xb87d('0x12')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x13'),require(_0xb87d('0x14')));_0x3cf5e8['use'](_0xb87d('0x15'),require('./api/voiceMail'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x16'),require(_0xb87d('0x17')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x18'),require(_0xb87d('0x19')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x1a'),require(_0xb87d('0x1b')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x1c'),require('./api/voiceAgentReport'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x1d'),require(_0xb87d('0x1e')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x1f'),require('./api/memberReport'));_0x3cf5e8['use']('/api/trunks',require(_0xb87d('0x20')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x21'),require(_0xb87d('0x22')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x23'),require(_0xb87d('0x24')));_0x3cf5e8['use'](_0xb87d('0x25'),require('./api/mailAccount'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x26'),require(_0xb87d('0x27')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x28'),require(_0xb87d('0x29')));_0x3cf5e8['use'](_0xb87d('0x2a'),require('./api/mailInteraction'));_0x3cf5e8[_0xb87d('0x6')]('/api/mail/messages',require('./api/mailMessage'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x2b'),require(_0xb87d('0x2c')));_0x3cf5e8[_0xb87d('0x6')]('/api/mail/reports/queue',require(_0xb87d('0x2d')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x2e'),require(_0xb87d('0x2f')));_0x3cf5e8[_0xb87d('0x6')]('/api/dashboards/items',require(_0xb87d('0x30')));_0x3cf5e8[_0xb87d('0x6')]('/api/fax/accounts',require('./api/faxAccount'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x31'),require(_0xb87d('0x32')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x33'),require(_0xb87d('0x34')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x35'),require(_0xb87d('0x36')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x37'),require(_0xb87d('0x38')));_0x3cf5e8['use'](_0xb87d('0x39'),require('./api/faxQueueReport'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x3a'),require(_0xb87d('0x3b')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x3c'),require(_0xb87d('0x3d')));_0x3cf5e8[_0xb87d('0x6')]('/api/sms/interactions',require(_0xb87d('0x3e')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x3f'),require(_0xb87d('0x40')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x41'),require('./api/smsQueue'));_0x3cf5e8[_0xb87d('0x6')]('/api/openchannel/accounts',require(_0xb87d('0x42')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x43'),require(_0xb87d('0x44')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x45'),require(_0xb87d('0x46')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x47'),require(_0xb87d('0x48')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x49'),require(_0xb87d('0x4a')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x4b'),require(_0xb87d('0x4c')));_0x3cf5e8[_0xb87d('0x6')]('/api/openchannel/reports/queue',require(_0xb87d('0x4d')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x4e'),require('./api/chatApplication'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x4f'),require(_0xb87d('0x50')));_0x3cf5e8['use']('/api/chat/messages',require(_0xb87d('0x51')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x52'),require(_0xb87d('0x53')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x54'),require(_0xb87d('0x55')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x56'),require('./api/chatGroup'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x57'),require(_0xb87d('0x58')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x59'),require(_0xb87d('0x5a')));_0x3cf5e8['use']('/api/cm/contacts',require(_0xb87d('0x5b')));_0x3cf5e8['use'](_0xb87d('0x5c'),require(_0xb87d('0x5d')));_0x3cf5e8[_0xb87d('0x6')]('/api/cm/hopper_black',require(_0xb87d('0x5e')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x5f'),require(_0xb87d('0x60')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x61'),require(_0xb87d('0x62')));_0x3cf5e8[_0xb87d('0x6')]('/api/cm/custom_fields',require('./api/cmCustomField'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x63'),require(_0xb87d('0x64')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x65'),require(_0xb87d('0x66')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x67'),require(_0xb87d('0x68')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x69'),require(_0xb87d('0x6a')));_0x3cf5e8[_0xb87d('0x6')]('/api/conditions',require(_0xb87d('0x6b')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x6c'),require(_0xb87d('0x6d')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x6e'),require(_0xb87d('0x6f')));_0x3cf5e8['use'](_0xb87d('0x70'),require(_0xb87d('0x71')));_0x3cf5e8['use']('/api/voiceQueuesLog',require(_0xb87d('0x72')));_0x3cf5e8['use'](_0xb87d('0x73'),require(_0xb87d('0x74')));_0x3cf5e8['use'](_0xb87d('0x75'),require(_0xb87d('0x76')));_0x3cf5e8['use']('/api/tags',require(_0xb87d('0x77')));_0x3cf5e8['use'](_0xb87d('0x78'),require(_0xb87d('0x79')));_0x3cf5e8[_0xb87d('0x6')]('/api/cm_contact_has_items',require('./api/cmContactHasItem'));_0x3cf5e8['use'](_0xb87d('0x7a'),require('./api/cmHopperAdditionalPhone'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x7b'),require('./api/template'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x7c'),require(_0xb87d('0x7d')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x7e'),require('./api/variable'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x7f'),require('./api/integration'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x80'),require(_0xb87d('0x81')));_0x3cf5e8[_0xb87d('0x6')]('/api/analytics/custom_reports',require(_0xb87d('0x82')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x83'),require(_0xb87d('0x84')));_0x3cf5e8[_0xb87d('0x6')]('/api/analytics/extracted_reports',require(_0xb87d('0x85')));_0x3cf5e8['use'](_0xb87d('0x86'),require('./api/analyticMetric'));_0x3cf5e8['use'](_0xb87d('0x87'),require(_0xb87d('0x88')));_0x3cf5e8['use'](_0xb87d('0x89'),require(_0xb87d('0x8a')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x8b'),require(_0xb87d('0x8c')));_0x3cf5e8['use']('/api/integrations/salesforce/configurations',require(_0xb87d('0x8d')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x8e'),require(_0xb87d('0x8f')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x90'),require(_0xb87d('0x91')));_0x3cf5e8['use']('/api/integrations/sugarcrm/configurations',require('./api/intSugarcrmConfiguration'));_0x3cf5e8['use'](_0xb87d('0x92'),require('./api/intSugarcrmField'));_0x3cf5e8['use'](_0xb87d('0x93'),require(_0xb87d('0x94')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x95'),require('./api/intDeskConfiguration'));_0x3cf5e8[_0xb87d('0x6')]('/api/integrations/desk/fields',require(_0xb87d('0x96')));_0x3cf5e8['use']('/api/integrations/zoho/accounts',require(_0xb87d('0x97')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x98'),require(_0xb87d('0x99')));_0x3cf5e8[_0xb87d('0x6')]('/api/integrations/zoho/fields',require(_0xb87d('0x9a')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x9b'),require(_0xb87d('0x9c')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x9d'),require('./api/intZendeskConfiguration'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x9e'),require(_0xb87d('0x9f')));_0x3cf5e8['use'](_0xb87d('0xa0'),require(_0xb87d('0xa1')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xa2'),require('./api/intFreshdeskConfiguration'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xa3'),require('./api/intFreshdeskField'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xa4'),require(_0xb87d('0xa5')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xa6'),require('./api/intVtigerConfiguration'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xa7'),require('./api/intVtigerField'));_0x3cf5e8[_0xb87d('0x6')]('/api/integrations/servicenow/accounts',require(_0xb87d('0xa8')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xa9'),require(_0xb87d('0xaa')));_0x3cf5e8['use'](_0xb87d('0xab'),require(_0xb87d('0xac')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xad'),require('./api/intDynamics365Account'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xae'),require(_0xb87d('0xaf')));_0x3cf5e8[_0xb87d('0x6')]('/api/integrations/dynamics365/fields',require(_0xb87d('0xb0')));_0x3cf5e8['use'](_0xb87d('0xb1'),require(_0xb87d('0xb2')));_0x3cf5e8['use']('/api/integrations/freshsales/configurations',require(_0xb87d('0xb3')));_0x3cf5e8[_0xb87d('0x6')]('/api/integrations/freshsales/fields',require(_0xb87d('0xb4')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xb5'),require(_0xb87d('0xb6')));_0x3cf5e8['use'](_0xb87d('0xb7'),require(_0xb87d('0xb8')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xb9'),require('./api/chatInternalMessage'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xba'),require(_0xb87d('0xbb')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xbc'),require('./api/jscriptyQuestionReport'));_0x3cf5e8[_0xb87d('0x6')]('/api/jscripty/sessions/reports',require('./api/jscriptySessionReport'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xbd'),require('./api/smsQueueReport'));_0x3cf5e8['use']('/api/square/reports',require('./api/squareReport'));_0x3cf5e8['use']('/api/square/details/reports',require(_0xb87d('0xbe')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xbf'),require(_0xb87d('0xc0')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xc1'),require('./api/setting'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xc2'),require(_0xb87d('0xc3')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xc4'),require(_0xb87d('0xc5')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xc6'),require(_0xb87d('0xc7')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xc8'),require(_0xb87d('0xc9')));_0x3cf5e8[_0xb87d('0x6')]('/api/teams',require(_0xb87d('0xca')));_0x3cf5e8['use'](_0xb87d('0xcb'),require(_0xb87d('0xcc')));_0x3cf5e8[_0xb87d('0x6')]('/api/campaigns',require('./api/campaign'));_0x3cf5e8[_0xb87d('0x6')]('/api/migrations',require(_0xb87d('0xcd')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xce'),require('./api/attachment'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xcf'),require(_0xb87d('0xd0')));_0x3cf5e8[_0xb87d('0x6')]('/api/mail/reports/transfer',require('./api/mailTransferReport'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xd1'),require(_0xb87d('0xd2')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xd3'),require(_0xb87d('0xd4')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xd5'),require(_0xb87d('0xd6')));_0x3cf5e8['use'](_0xb87d('0xd7'),require(_0xb87d('0xd8')));_0x3cf5e8[_0xb87d('0x6')]('/api/cm/lists',require('./api/cmList'));_0x3cf5e8['use'](_0xb87d('0xd9'),require(_0xb87d('0xda')));_0x3cf5e8['use'](_0xb87d('0xdb'),require('./api/userProfile'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xdc'),require(_0xb87d('0xdd')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xde'),require('./api/userProfileResource'));_0x3cf5e8[_0xb87d('0x6')]('/api/userNotifications',require('./api/userNotification'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xdf'),require(_0xb87d('0xe0')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xe1'),require(_0xb87d('0xe2')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xe3'),require(_0xb87d('0xe4')));_0x3cf5e8['use'](_0xb87d('0xe5'),require('./api/whatsappMessage'));_0x3cf5e8['use'](_0xb87d('0xe6'),require('./api/whatsappQueueReport'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xe7'),require(_0xb87d('0xe8')));_0x3cf5e8['use'](_0xb87d('0xe9'),require(_0xb87d('0xea')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xeb'),require(_0xb87d('0xec')));_0x3cf5e8['use']('/api/realtime',require('./api/realtime'));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xed'),require(_0xb87d('0xee')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xef'),require(_0xb87d('0xf0')));_0x3cf5e8[_0xb87d('0x6')]('/api/auth/google',require(_0xb87d('0xf1')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xf2'),require(_0xb87d('0xf3')));_0x3cf5e8[_0xb87d('0x6')]('/api/jira',require(_0xb87d('0xf4')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xf5'),require(_0xb87d('0xf6')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xf7'),require(_0xb87d('0xf8')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xf9'),require(_0xb87d('0xfa')));_0x3cf5e8[_0xb87d('0x6')]('/api/pm2',require(_0xb87d('0xfb')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xfc'),require('./api/webbar'));_0x3cf5e8['use']('/api/logs',clientSideLogs);_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xfd'),express[_0xb87d('0xfe')](path['join'](config['root'],'/apidoc')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0xff'),express['static'](path[_0xb87d('0x100')](config[_0xb87d('0x101')],'/www')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x102'),express['static'](path[_0xb87d('0x100')](config['root'],_0xb87d('0x102'))));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x103'),express[_0xb87d('0xfe')](path['join'](config['root'],'snippet','3.8.1')));_0x3cf5e8[_0xb87d('0x6')](_0xb87d('0x104'),express['static'](path[_0xb87d('0x100')](config[_0xb87d('0x101')],_0xb87d('0x105'))));_0x3cf5e8[_0xb87d('0x106')]('/:url(api|auth|components|app|bower_components|assets)/*')[_0xb87d('0x107')](errors[0x194]);_0x3cf5e8[_0xb87d('0x106')]('/*')[_0xb87d('0x107')](function(_0x5aefd2,_0x49bcf3){_0x49bcf3[_0xb87d('0x108')](path[_0xb87d('0x109')](_0x3cf5e8[_0xb87d('0x107')](_0xb87d('0x10a'))+'/index.html'));});return _0x3cf5e8;});};
\ No newline at end of file
index bc7d21c..63877bb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x68b8=['../api/openchannelApplication/openchannelApplication.rpc','../api/openchannelInteraction/openchannelInteraction.rpc','../api/openchannelMessage/openchannelMessage.rpc','../api/openchannelQueue/openchannelQueue.rpc','../api/openchannelQueueReport/openchannelQueueReport.rpc','../api/chatInteraction/chatInteraction.rpc','../api/chatQueue/chatQueue.rpc','../api/cmContact/cmContact.rpc','../api/cmHopperBlack/cmHopperBlack.rpc','../api/cmHopperFinal/cmHopperFinal.rpc','../api/cmHopperHistory/cmHopperHistory.rpc','../api/interval/interval.rpc','../api/pause/pause.rpc','../api/sound/sound.rpc','../api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.rpc','../api/template/template.rpc','../api/trigger/trigger.rpc','../api/variable/variable.rpc','../api/intSalesforceAccount/intSalesforceAccount.rpc','../api/intSugarcrmAccount/intSugarcrmAccount.rpc','../api/intDeskAccount/intDeskAccount.rpc','../api/intZohoAccount/intZohoAccount.rpc','../api/intZendeskAccount/intZendeskAccount.rpc','../api/intVtigerAccount/intVtigerAccount.rpc','../api/intServicenowAccount/intServicenowAccount.rpc','../api/intDynamics365Account/intDynamics365Account.rpc','../api/intFreshsalesAccount/intFreshsalesAccount.rpc','../api/chatQueueReport/chatQueueReport.rpc','../api/smsQueueReport/smsQueueReport.rpc','../api/squareReport/squareReport.rpc','../api/setting/setting.rpc','../api/squareOdbc/squareOdbc.rpc','../api/squareRecording/squareRecording.rpc','../api/attachment/attachment.rpc','../api/whatsappAccount/whatsappAccount.rpc','../api/whatsappMessage/whatsappMessage.rpc','../api/whatsappQueueReport/whatsappQueueReport.rpc','server','http','rpc','port','localhost','error','log','Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!','../config/triggers','jayson/promise','lodash','../config/environment','listen','merge','../api/user/user.rpc','../api/voiceExtension/voiceExtension.rpc','../api/voiceRecording/voiceRecording.rpc','../api/voiceCallReport/voiceCallReport.rpc','../api/voiceDialReport/voiceDialReport.rpc','../api/trunk/trunk.rpc','../api/voiceTransferReport/voiceTransferReport.rpc','../api/userVoiceQueueRt/userVoiceQueueRt.rpc','../api/mailAccount/mailAccount.rpc','../api/mailQueue/mailQueue.rpc','../api/faxAccount/faxAccount.rpc','../api/faxApplication/faxApplication.rpc','../api/faxInteraction/faxInteraction.rpc','../api/faxMessage/faxMessage.rpc','../api/faxQueue/faxQueue.rpc','../api/faxQueueReport/faxQueueReport.rpc','../api/smsAccount/smsAccount.rpc','../api/smsInteraction/smsInteraction.rpc','../api/smsMessage/smsMessage.rpc','../api/smsQueue/smsQueue.rpc'];(function(_0x113b0d,_0x47286e){var _0xdc317e=function(_0xc7400f){while(--_0xc7400f){_0x113b0d['push'](_0x113b0d['shift']());}};_0xdc317e(++_0x47286e);}(_0x68b8,0x1d8));var _0x868b=function(_0x2136a6,_0x35af63){_0x2136a6=_0x2136a6-0x0;var _0x55b948=_0x68b8[_0x2136a6];return _0x55b948;};'use strict';var jayson=require(_0x868b('0x0'));var _=require(_0x868b('0x1'));var config=require(_0x868b('0x2'));exports[_0x868b('0x3')]=function(){return new Promise(function(_0x5c0bc1,_0x3d0569){var _0x1807aa={};_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x5')));_0x1807aa=_['merge'](_0x1807aa,require(_0x868b('0x6')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require('../api/voiceQueue/voiceQueue.rpc'));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x7')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x8')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x9')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require('../api/voiceAgentReport/voiceAgentReport.rpc'));_0x1807aa=_['merge'](_0x1807aa,require('../api/voiceQueueReport/voiceQueueReport.rpc'));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require('../api/memberReport/memberReport.rpc'));_0x1807aa=_['merge'](_0x1807aa,require(_0x868b('0xa')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0xb')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0xc')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require('../api/mailServerIn/mailServerIn.rpc'));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0xd')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0xe')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require('../api/mailInteraction/mailInteraction.rpc'));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require('../api/mailMessage/mailMessage.rpc'));_0x1807aa=_['merge'](_0x1807aa,require('../api/mailApplication/mailApplication.rpc'));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require('../api/mailQueueReport/mailQueueReport.rpc'));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0xf')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x10')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x11')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x12')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x13')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x14')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x15')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x16')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x17')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x18')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x19')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x1a')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x1b')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x1c')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x1d')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x1e')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require('../api/chatMessage/chatMessage.rpc'));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x1f')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x20')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require('../api/cmHopper/cmHopper.rpc'));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x21')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x22')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x23')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require('../api/reportAgentPreview/reportAgentPreview.rpc'));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x24')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x25')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x26')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x27')));_0x1807aa=_['merge'](_0x1807aa,require(_0x868b('0x28')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x29')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x2a')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x2b')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x2c')));_0x1807aa=_['merge'](_0x1807aa,require(_0x868b('0x2d')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x2e')));_0x1807aa=_['merge'](_0x1807aa,require(_0x868b('0x2f')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require('../api/intFreshdeskAccount/intFreshdeskAccount.rpc'));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x30')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x31')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x32')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x33')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x34')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x35')));_0x1807aa=_['merge'](_0x1807aa,require(_0x868b('0x36')));_0x1807aa=_['merge'](_0x1807aa,require('../api/squareReportDetail/squareReportDetail.rpc'));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x37')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x38')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require('../api/squareProject/squareProject.rpc'));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x39')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require('../api/squareMessage/squareMessage.rpc'));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require('../api/campaign/campaign.rpc'));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x3a')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require('../api/plugin/plugin.rpc'));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x3b')));_0x1807aa=_['merge'](_0x1807aa,require('../api/whatsappInteraction/whatsappInteraction.rpc'));_0x1807aa=_['merge'](_0x1807aa,require(_0x868b('0x3c')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require(_0x868b('0x3d')));_0x1807aa=_[_0x868b('0x4')](_0x1807aa,require('../api/whatsappQueue/whatsappQueue.rpc'));var _0x4bbe79=jayson[_0x868b('0x3e')](_0x1807aa)[_0x868b('0x3f')]();var _0x23b7f2=config[_0x868b('0x40')][_0x868b('0x41')]||config[_0x868b('0x41')]+0x1;var _0x542dd9=config['rpc']['ip']||_0x868b('0x42');_0x4bbe79['on'](_0x868b('0x43'),function(_0x17342e){return _0x3d0569(_0x17342e);});_0x4bbe79[_0x868b('0x3')](_0x23b7f2,_0x542dd9,function(){console[_0x868b('0x44')](_0x868b('0x45'),_0x542dd9,_0x23b7f2);require(_0x868b('0x46'))['default']();return _0x5c0bc1('RPC\x20listening\x20on\x20'+_0x542dd9+':'+_0x23b7f2);});});};
\ No newline at end of file
+var _0xb33c=['../api/attachment/attachment.rpc','../api/plugin/plugin.rpc','../api/whatsappMessage/whatsappMessage.rpc','../api/whatsappQueueReport/whatsappQueueReport.rpc','../api/whatsappQueue/whatsappQueue.rpc','server','http','rpc','port','localhost','error','log','Express\x20RPC\x20server\x20listening\x20on\x20%s:%d!','../config/triggers','default','RPC\x20listening\x20on\x20','jayson/promise','lodash','../config/environment','listen','../api/user/user.rpc','merge','../api/voiceExtension/voiceExtension.rpc','../api/voiceQueue/voiceQueue.rpc','../api/voiceRecording/voiceRecording.rpc','../api/voiceDialReport/voiceDialReport.rpc','../api/trunk/trunk.rpc','../api/voiceTransferReport/voiceTransferReport.rpc','../api/userVoiceQueueRt/userVoiceQueueRt.rpc','../api/mailServerIn/mailServerIn.rpc','../api/mailAccount/mailAccount.rpc','../api/mailQueue/mailQueue.rpc','../api/mailInteraction/mailInteraction.rpc','../api/mailMessage/mailMessage.rpc','../api/mailApplication/mailApplication.rpc','../api/mailQueueReport/mailQueueReport.rpc','../api/faxInteraction/faxInteraction.rpc','../api/faxQueue/faxQueue.rpc','../api/smsMessage/smsMessage.rpc','../api/smsQueue/smsQueue.rpc','../api/openchannelApplication/openchannelApplication.rpc','../api/openchannelInteraction/openchannelInteraction.rpc','../api/openchannelMessage/openchannelMessage.rpc','../api/openchannelQueue/openchannelQueue.rpc','../api/openchannelQueueReport/openchannelQueueReport.rpc','../api/chatInteraction/chatInteraction.rpc','../api/chatQueue/chatQueue.rpc','../api/cmContact/cmContact.rpc','../api/cmHopperBlack/cmHopperBlack.rpc','../api/cmHopperFinal/cmHopperFinal.rpc','../api/reportAgentPreview/reportAgentPreview.rpc','../api/interval/interval.rpc','../api/pause/pause.rpc','../api/sound/sound.rpc','../api/template/template.rpc','../api/trigger/trigger.rpc','../api/variable/variable.rpc','../api/intSugarcrmAccount/intSugarcrmAccount.rpc','../api/intZendeskAccount/intZendeskAccount.rpc','../api/intDynamics365Account/intDynamics365Account.rpc','../api/intFreshsalesAccount/intFreshsalesAccount.rpc','../api/chatQueueReport/chatQueueReport.rpc','../api/smsQueueReport/smsQueueReport.rpc','../api/squareReport/squareReport.rpc','../api/squareReportDetail/squareReportDetail.rpc','../api/setting/setting.rpc','../api/squareOdbc/squareOdbc.rpc','../api/squareProject/squareProject.rpc','../api/squareRecording/squareRecording.rpc','../api/squareMessage/squareMessage.rpc','../api/campaign/campaign.rpc'];(function(_0x1b6563,_0x3bf0f1){var _0xdea7b8=function(_0x49e6c6){while(--_0x49e6c6){_0x1b6563['push'](_0x1b6563['shift']());}};_0xdea7b8(++_0x3bf0f1);}(_0xb33c,0x12c));var _0xcb33=function(_0x4478ea,_0x593a26){_0x4478ea=_0x4478ea-0x0;var _0x5061a6=_0xb33c[_0x4478ea];return _0x5061a6;};'use strict';var jayson=require(_0xcb33('0x0'));var _=require(_0xcb33('0x1'));var config=require(_0xcb33('0x2'));exports[_0xcb33('0x3')]=function(){return new Promise(function(_0x412a76,_0x10354e){var _0x380fc1={};_0x380fc1=_['merge'](_0x380fc1,require(_0xcb33('0x4')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x6')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x7')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x8')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require('../api/voiceCallReport/voiceCallReport.rpc'));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x9')));_0x380fc1=_['merge'](_0x380fc1,require('../api/voiceAgentReport/voiceAgentReport.rpc'));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require('../api/voiceQueueReport/voiceQueueReport.rpc'));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require('../api/memberReport/memberReport.rpc'));_0x380fc1=_['merge'](_0x380fc1,require(_0xcb33('0xa')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0xb')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0xc')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0xd')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0xe')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0xf')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x10')));_0x380fc1=_['merge'](_0x380fc1,require(_0xcb33('0x11')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x12')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x13')));_0x380fc1=_['merge'](_0x380fc1,require('../api/faxAccount/faxAccount.rpc'));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require('../api/faxApplication/faxApplication.rpc'));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x14')));_0x380fc1=_['merge'](_0x380fc1,require('../api/faxMessage/faxMessage.rpc'));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x15')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require('../api/faxQueueReport/faxQueueReport.rpc'));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require('../api/smsAccount/smsAccount.rpc'));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require('../api/smsInteraction/smsInteraction.rpc'));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x16')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x17')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x18')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x19')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x1a')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x1b')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x1c')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x1d')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require('../api/chatMessage/chatMessage.rpc'));_0x380fc1=_['merge'](_0x380fc1,require(_0xcb33('0x1e')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x1f')));_0x380fc1=_['merge'](_0x380fc1,require('../api/cmHopper/cmHopper.rpc'));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x20')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x21')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require('../api/cmHopperHistory/cmHopperHistory.rpc'));_0x380fc1=_['merge'](_0x380fc1,require(_0xcb33('0x22')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x23')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x24')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x25')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require('../api/cmHopperAdditionalPhone/cmHopperAdditionalPhone.rpc'));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x26')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x27')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x28')));_0x380fc1=_['merge'](_0x380fc1,require('../api/intSalesforceAccount/intSalesforceAccount.rpc'));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x29')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require('../api/intDeskAccount/intDeskAccount.rpc'));_0x380fc1=_['merge'](_0x380fc1,require('../api/intZohoAccount/intZohoAccount.rpc'));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x2a')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require('../api/intFreshdeskAccount/intFreshdeskAccount.rpc'));_0x380fc1=_['merge'](_0x380fc1,require('../api/intVtigerAccount/intVtigerAccount.rpc'));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require('../api/intServicenowAccount/intServicenowAccount.rpc'));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x2b')));_0x380fc1=_['merge'](_0x380fc1,require(_0xcb33('0x2c')));_0x380fc1=_['merge'](_0x380fc1,require(_0xcb33('0x2d')));_0x380fc1=_['merge'](_0x380fc1,require(_0xcb33('0x2e')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x2f')));_0x380fc1=_['merge'](_0x380fc1,require(_0xcb33('0x30')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x31')));_0x380fc1=_['merge'](_0x380fc1,require(_0xcb33('0x32')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x33')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x34')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x35')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x36')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x37')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x38')));_0x380fc1=_['merge'](_0x380fc1,require('../api/whatsappAccount/whatsappAccount.rpc'));_0x380fc1=_['merge'](_0x380fc1,require('../api/whatsappInteraction/whatsappInteraction.rpc'));_0x380fc1=_['merge'](_0x380fc1,require(_0xcb33('0x39')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x3a')));_0x380fc1=_[_0xcb33('0x5')](_0x380fc1,require(_0xcb33('0x3b')));var _0x376ce4=jayson[_0xcb33('0x3c')](_0x380fc1)[_0xcb33('0x3d')]();var _0x29f0bc=config[_0xcb33('0x3e')][_0xcb33('0x3f')]||config[_0xcb33('0x3f')]+0x1;var _0x2c3d6f=config[_0xcb33('0x3e')]['ip']||_0xcb33('0x40');_0x376ce4['on'](_0xcb33('0x41'),function(_0x3149f1){return _0x10354e(_0x3149f1);});_0x376ce4[_0xcb33('0x3')](_0x29f0bc,_0x2c3d6f,function(){console[_0xcb33('0x42')](_0xcb33('0x43'),_0x2c3d6f,_0x29f0bc);require(_0xcb33('0x44'))[_0xcb33('0x45')]();return _0x412a76(_0xcb33('0x46')+_0x2c3d6f+':'+_0x29f0bc);});});};
\ No newline at end of file
index 886ed7d..385f136 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3ecb=['error','code','E_AGI_SOCKET_CLOSE','timeout','E_AGI_SOCKET_TIMEOUT','destroy','command','close','inherits','sync','prototype','sendRequest','ANSWER','getData','beep','format','GET\x20DATA\x20\x22%s\x22\x20%s\x20%s','NO\x20MESSAGE','VERBOSE\x20\x22%s\x22','exec','isArray','EXEC\x20%s\x20%s','join','setContext','SET\x20CONTEXT\x20%s','setExtension','SET\x20EXTENSION\x20%s','setPriority','SET\x20PRIORITY\x20%s','HANGUP','setVariable','isBoolean','toString','SET\x20VARIABLE\x20%s\x20\x22%s\x22','sayNumber','SAY\x20NUMBER\x20%s\x20%s','SAY\x20DIGITS\x20%s\x20%s','sayPhonetic','SAY\x20PHONETIC\x20\x22%s\x22\x20%s','continueAt','extension','noop','GOTO\x20%s\x20%s\x20%s','getVariable','GET\x20VARIABLE\x20\x22%s\x22','recordFile','wav','RECORD\x20FILE\x20\x22%s\x22\x20\x22%s\x22\x20\x22%s\x22\x20%s\x20%s\x20%s','streamFile','STREAM\x20FILE\x20\x22%s\x22\x20\x22%s\x22','agi','AGI','wait','WAIT','ID:%s\x20-\x20LABEL:\x20%s\x20-\x20MSG:\x20%s','label','exports','util','EventEmitter','./reply','./error','call','setTimeout','setEncoding','utf8','headers','emit','toLowerCase','hangup','substring','520-Invalid','search','520\x20End\x20of\x20proper','function','no\x20code','replace','result=','indexOf','substr','split','length','match'];(function(_0x4e501e,_0x8c823e){var _0x14fee9=function(_0x1496fa){while(--_0x1496fa){_0x4e501e['push'](_0x4e501e['shift']());}};_0x14fee9(++_0x8c823e);}(_0x3ecb,0x181));var _0xb3ec=function(_0x2df413,_0x5303ae){_0x2df413=_0x2df413-0x0;var _0x1f5133=_0x3ecb[_0x2df413];return _0x1f5133;};'use strict';var util=require(_0xb3ec('0x0'));var _=require('lodash');var EventEmitter=require('events')[_0xb3ec('0x1')];var AGIReply=require(_0xb3ec('0x2'));var AGIError=require(_0xb3ec('0x3'));function AGIChannel(_0x192729){var _0x477cc0=this,_0x516b18=new AGIReply(),_0x566a97=![],_0x17575a={};EventEmitter[_0xb3ec('0x4')](_0x477cc0);_0x192729['setEncoding']('utf8');_0x192729[_0xb3ec('0x5')](0x8*0x3c*0x3c*0x3e8);_0x516b18[_0xb3ec('0x6')](_0xb3ec('0x7'));_0x516b18['on'](_0xb3ec('0x8'),function(_0x33d6ae){for(var _0x308c58 in _0x33d6ae){_0x477cc0[_0x308c58]=_0x33d6ae[_0x308c58];}_0x477cc0[_0xb3ec('0x9')]('ready');});_0x516b18['on']('line',function(_0x283878){if(_0x283878[_0xb3ec('0xa')]()==_0xb3ec('0xb')){_0x477cc0[_0xb3ec('0x9')]('hangup');return;}if(_0x283878[_0xb3ec('0xc')](0x0,0xb)==_0xb3ec('0xd')){_0x566a97=!![];}if(_0x566a97){_0x17575a['rx']+=_0x283878+'\x0a';if(_0x283878[_0xb3ec('0xe')](_0xb3ec('0xf'))!=-0x1){_0x566a97=![];}}else{_0x17575a['rx']=_0x283878;}if(_0x566a97){return;}if(typeof _0x17575a['cb']==_0xb3ec('0x10')){var _0x4f052c=_0x17575a['rx'][_0xb3ec('0xc')](0x0,0x3),_0x5c0482=null,_0x4733bb=null;_0x4f052c=parseInt(_0x4f052c);if(isNaN(_0x4f052c)){_0x17575a['cb'](null,{'code':0x1f4,'result':-0x1,'extra':_0xb3ec('0x11')});return;}if(_0x4f052c!=0xc8){_0x17575a['cb'](null,{'code':_0x4f052c,'result':-0x1,'extra':'KO'});return;}_0x5c0482=_0x17575a['rx'][_0xb3ec('0xc')](0x4)[_0xb3ec('0x12')](_0xb3ec('0x13'),'');if(_0x5c0482[_0xb3ec('0x14')]('\x20')!=-0x1){_0x5c0482=_0x5c0482[_0xb3ec('0x15')](0x0,_0x5c0482['indexOf']('\x20'));}if(_['startsWith'](_0x5c0482,'-1')){_0x5c0482=parseInt(_0x5c0482);}_0x4733bb=_0x17575a['rx'][_0xb3ec('0x16')]('\x20');if(_0x4733bb[_0xb3ec('0x17')]==0x3){_0x4733bb=_0x4733bb[0x2][_0xb3ec('0xc')](0x1,_0x4733bb[0x2][_0xb3ec('0x17')]-0x1);}else if(_0x4733bb[_0xb3ec('0x17')]>0x3){var _0x134a2a=/\((.+)\)/;var _0x98f28=_0x17575a['rx'][_0xb3ec('0x18')](_0x134a2a);if(_0x98f28){_0x4733bb=_0x98f28[0x1];}else{_0x4733bb=null;}}else{_0x4733bb=null;}_0x17575a['cb'](null,{'code':_0x4f052c,'result':_0x5c0482,'extra':_0x4733bb});}});_0x192729['on'](_0xb3ec('0x19'),function(_0x3e4b4b){_0x477cc0[_0xb3ec('0x9')](_0xb3ec('0x19'),new AGIError('E_AGI_SOCKET_ERROR',_0x3e4b4b[_0xb3ec('0x1a')]));});_0x192729['on']('close',function(){_0x477cc0[_0xb3ec('0x9')]('close',new AGIError(_0xb3ec('0x1b')));});_0x192729['on']('timeout',function(){_0x477cc0['emit'](_0xb3ec('0x1c'),new AGIError(_0xb3ec('0x1d')));_0x192729[_0xb3ec('0x1e')]();});_0x192729['pipe'](_0x516b18);this[_0xb3ec('0x1f')]=function(_0x3f63d0,_0x29e6dd){var _0x3f63d0=_0x3f63d0||'',_0x29e6dd=typeof _0x29e6dd==_0xb3ec('0x10')?_0x29e6dd:new Function();_0x17575a={'tx':_0x3f63d0,'rx':'','cb':_0x29e6dd};_0x192729['write'](_0x3f63d0+'\x0a');},this[_0xb3ec('0x20')]=function(){_0x192729[_0xb3ec('0x1e')]();};}util[_0xb3ec('0x21')](AGIChannel,EventEmitter);AGIChannel['prototype']['sendRequest']=function(_0x414cb0){return this[_0xb3ec('0x1f')][_0xb3ec('0x22')](this,_0x414cb0);};AGIChannel[_0xb3ec('0x23')]['answer']=function(){return this[_0xb3ec('0x24')](_0xb3ec('0x25'));};AGIChannel[_0xb3ec('0x23')][_0xb3ec('0x26')]=function(_0x271f5d,_0xc15d48,_0xb9abb8){_0x271f5d=_0x271f5d===undefined?_0xb3ec('0x27'):_0x271f5d;_0xc15d48=_0xc15d48===undefined?'5':_0xc15d48;_0xb9abb8=_0xb9abb8===undefined?'1':_0xb9abb8;return this[_0xb3ec('0x24')](util[_0xb3ec('0x28')](_0xb3ec('0x29'),_0x271f5d,_0xc15d48*0x3e8,_0xb9abb8));};AGIChannel[_0xb3ec('0x23')]['noop']=function(_0x559291){_0x559291=_0x559291||_0xb3ec('0x2a');return this[_0xb3ec('0x24')](util[_0xb3ec('0x28')](_0xb3ec('0x2b'),_0x559291));};AGIChannel['prototype'][_0xb3ec('0x2c')]=function(_0x2c1cd3,_0x480bfd){if(_[_0xb3ec('0x2d')](_0x480bfd)){return this['sendRequest'](util[_0xb3ec('0x28')](_0xb3ec('0x2e'),_0x2c1cd3,_0x480bfd[_0xb3ec('0x2f')](',')));}return this[_0xb3ec('0x24')](util[_0xb3ec('0x28')](_0xb3ec('0x2e'),_0x2c1cd3,_0x480bfd));};AGIChannel[_0xb3ec('0x23')][_0xb3ec('0x30')]=function(_0x392a74){return this[_0xb3ec('0x24')](util[_0xb3ec('0x28')](_0xb3ec('0x31'),_0x392a74));};AGIChannel[_0xb3ec('0x23')][_0xb3ec('0x32')]=function(_0x8c1fcd){return this['sendRequest'](util['format'](_0xb3ec('0x33'),_0x8c1fcd));};AGIChannel[_0xb3ec('0x23')][_0xb3ec('0x34')]=function(_0x3822dd){return this[_0xb3ec('0x24')](util[_0xb3ec('0x28')](_0xb3ec('0x35'),_0x3822dd));};AGIChannel['prototype'][_0xb3ec('0xb')]=function(){return this['sendRequest'](_0xb3ec('0x36'));};AGIChannel[_0xb3ec('0x23')][_0xb3ec('0x37')]=function(_0x33ba81,_0xf50f67){var _0x361be2=_[_0xb3ec('0x38')](_0xf50f67)||_['isNumber'](_0xf50f67)?_0xf50f67[_0xb3ec('0x39')]():_0xf50f67;return this[_0xb3ec('0x24')](util[_0xb3ec('0x28')](_0xb3ec('0x3a'),_0x33ba81,_0x361be2?_0x361be2['toString']()[_0xb3ec('0x12')](/(\r\n|\n|\r)/gm,'\x20'):''));};AGIChannel[_0xb3ec('0x23')][_0xb3ec('0x3b')]=function(_0x7af7cd,_0x5e29c7){return this['sendRequest'](util[_0xb3ec('0x28')](_0xb3ec('0x3c'),_0x7af7cd,_0x5e29c7));};AGIChannel['prototype']['sayDigits']=function(_0x2b6d36,_0x33ec35){return this[_0xb3ec('0x24')](util[_0xb3ec('0x28')](_0xb3ec('0x3d'),_0x2b6d36,_0x33ec35));};AGIChannel[_0xb3ec('0x23')][_0xb3ec('0x3e')]=function(_0x5c0049,_0x2f4b29){return this[_0xb3ec('0x24')](util[_0xb3ec('0x28')](_0xb3ec('0x3f'),_0x5c0049,_0x2f4b29));};AGIChannel['prototype'][_0xb3ec('0x40')]=function(_0x36fafb,_0x13641f,_0x2a1c6c){_0x13641f=_0x13641f||this[_0xb3ec('0x41')];_0x2a1c6c=_0x2a1c6c||0x1;this[_0xb3ec('0x30')](_0x36fafb);this[_0xb3ec('0x32')](_0x13641f);this[_0xb3ec('0x34')](_0x2a1c6c);return this[_0xb3ec('0x42')](util['format'](_0xb3ec('0x43'),_0x36fafb,_0x13641f,_0x2a1c6c));};AGIChannel[_0xb3ec('0x23')][_0xb3ec('0x44')]=function(_0x17ef2c){return this['sendRequest'](util[_0xb3ec('0x28')](_0xb3ec('0x45'),_0x17ef2c));};AGIChannel[_0xb3ec('0x23')][_0xb3ec('0x46')]=function(_0x39f034,_0x363969,_0x88df5e,_0x6ec675,_0x5465cb,_0x352944){_0x363969=_0x363969||_0xb3ec('0x47');_0x88df5e=_0x88df5e||'';_0x6ec675=_0x6ec675===undefined?-0x1:_0x6ec675==='-1'?-0x1:_0x6ec675*0x3e8;_0x5465cb=_0x5465cb===undefined?'':'s='+_0x5465cb;_0x352944=_0x352944?'BEEP':'';return this[_0xb3ec('0x24')](util[_0xb3ec('0x28')](_0xb3ec('0x48'),_0x39f034,_0x363969,_0x88df5e,_0x6ec675,_0x352944,_0x5465cb));};AGIChannel[_0xb3ec('0x23')][_0xb3ec('0x49')]=function(_0x3adb9f,_0x509085){_0x509085=_0x509085||'';return this[_0xb3ec('0x24')](util[_0xb3ec('0x28')](_0xb3ec('0x4a'),_0x3adb9f,_0x509085));};AGIChannel[_0xb3ec('0x23')][_0xb3ec('0x4b')]=function(_0x5c1223){return this['exec'](_0xb3ec('0x4c'),_0x5c1223);};AGIChannel[_0xb3ec('0x23')][_0xb3ec('0x4d')]=function(_0x58c1ed){return this[_0xb3ec('0x2c')](_0xb3ec('0x4e'),_0x58c1ed);};AGIChannel[_0xb3ec('0x23')][_0xb3ec('0x19')]=function(_0x551c4d,_0x6fe211){this['noop'](util['format'](_0xb3ec('0x4f'),_0x551c4d['id'],_0x551c4d[_0xb3ec('0x50')],_0x6fe211));return{'code':0x1f4,'result':'-1','extra':''};};module[_0xb3ec('0x51')]=AGIChannel;
\ No newline at end of file
+var _0xc962=['inherits','sync','prototype','answer','sendRequest','getData','beep','GET\x20DATA\x20\x22%s\x22\x20%s\x20%s','noop','format','isArray','EXEC\x20%s\x20%s','join','setContext','SET\x20CONTEXT\x20%s','setExtension','SET\x20EXTENSION\x20%s','setPriority','SET\x20PRIORITY\x20%s','setVariable','isNumber','SET\x20VARIABLE\x20%s\x20\x22%s\x22','toString','replace','sayNumber','sayDigits','sayPhonetic','SAY\x20PHONETIC\x20\x22%s\x22\x20%s','continueAt','extension','GOTO\x20%s\x20%s\x20%s','getVariable','GET\x20VARIABLE\x20\x22%s\x22','wav','STREAM\x20FILE\x20\x22%s\x22\x20\x22%s\x22','agi','AGI','wait','WAIT','ID:%s\x20-\x20LABEL:\x20%s\x20-\x20MSG:\x20%s','exports','util','./reply','./error','call','utf8','setTimeout','setEncoding','headers','emit','ready','toLowerCase','hangup','substring','520-Invalid','function','no\x20code','substr','indexOf','split','length','match','error','close','timeout','destroy','pipe','write'];(function(_0x214ffc,_0x430a6d){var _0x366bbf=function(_0x243368){while(--_0x243368){_0x214ffc['push'](_0x214ffc['shift']());}};_0x366bbf(++_0x430a6d);}(_0xc962,0x6d));var _0x2c96=function(_0x56fb6c,_0x109215){_0x56fb6c=_0x56fb6c-0x0;var _0x41b71c=_0xc962[_0x56fb6c];return _0x41b71c;};'use strict';var util=require(_0x2c96('0x0'));var _=require('lodash');var EventEmitter=require('events')['EventEmitter'];var AGIReply=require(_0x2c96('0x1'));var AGIError=require(_0x2c96('0x2'));function AGIChannel(_0x13ca61){var _0x1a1faf=this,_0x305702=new AGIReply(),_0x83568f=![],_0x451d99={};EventEmitter[_0x2c96('0x3')](_0x1a1faf);_0x13ca61['setEncoding'](_0x2c96('0x4'));_0x13ca61[_0x2c96('0x5')](0x8*0x3c*0x3c*0x3e8);_0x305702[_0x2c96('0x6')](_0x2c96('0x4'));_0x305702['on'](_0x2c96('0x7'),function(_0x36dd95){for(var _0x1115b7 in _0x36dd95){_0x1a1faf[_0x1115b7]=_0x36dd95[_0x1115b7];}_0x1a1faf[_0x2c96('0x8')](_0x2c96('0x9'));});_0x305702['on']('line',function(_0x4860c3){if(_0x4860c3[_0x2c96('0xa')]()==_0x2c96('0xb')){_0x1a1faf[_0x2c96('0x8')](_0x2c96('0xb'));return;}if(_0x4860c3[_0x2c96('0xc')](0x0,0xb)==_0x2c96('0xd')){_0x83568f=!![];}if(_0x83568f){_0x451d99['rx']+=_0x4860c3+'\x0a';if(_0x4860c3['search']('520\x20End\x20of\x20proper')!=-0x1){_0x83568f=![];}}else{_0x451d99['rx']=_0x4860c3;}if(_0x83568f){return;}if(typeof _0x451d99['cb']==_0x2c96('0xe')){var _0x43d83f=_0x451d99['rx'][_0x2c96('0xc')](0x0,0x3),_0x27a97c=null,_0x2491a4=null;_0x43d83f=parseInt(_0x43d83f);if(isNaN(_0x43d83f)){_0x451d99['cb'](null,{'code':0x1f4,'result':-0x1,'extra':_0x2c96('0xf')});return;}if(_0x43d83f!=0xc8){_0x451d99['cb'](null,{'code':_0x43d83f,'result':-0x1,'extra':'KO'});return;}_0x27a97c=_0x451d99['rx'][_0x2c96('0xc')](0x4)['replace']('result=','');if(_0x27a97c['indexOf']('\x20')!=-0x1){_0x27a97c=_0x27a97c[_0x2c96('0x10')](0x0,_0x27a97c[_0x2c96('0x11')]('\x20'));}if(_['startsWith'](_0x27a97c,'-1')){_0x27a97c=parseInt(_0x27a97c);}_0x2491a4=_0x451d99['rx'][_0x2c96('0x12')]('\x20');if(_0x2491a4[_0x2c96('0x13')]==0x3){_0x2491a4=_0x2491a4[0x2]['substring'](0x1,_0x2491a4[0x2][_0x2c96('0x13')]-0x1);}else if(_0x2491a4[_0x2c96('0x13')]>0x3){var _0x2b26b4=/\((.+)\)/;var _0x36dc59=_0x451d99['rx'][_0x2c96('0x14')](_0x2b26b4);if(_0x36dc59){_0x2491a4=_0x36dc59[0x1];}else{_0x2491a4=null;}}else{_0x2491a4=null;}_0x451d99['cb'](null,{'code':_0x43d83f,'result':_0x27a97c,'extra':_0x2491a4});}});_0x13ca61['on'](_0x2c96('0x15'),function(_0x2ccbed){_0x1a1faf[_0x2c96('0x8')](_0x2c96('0x15'),new AGIError('E_AGI_SOCKET_ERROR',_0x2ccbed['code']));});_0x13ca61['on'](_0x2c96('0x16'),function(){_0x1a1faf[_0x2c96('0x8')](_0x2c96('0x16'),new AGIError('E_AGI_SOCKET_CLOSE'));});_0x13ca61['on'](_0x2c96('0x17'),function(){_0x1a1faf[_0x2c96('0x8')](_0x2c96('0x17'),new AGIError('E_AGI_SOCKET_TIMEOUT'));_0x13ca61[_0x2c96('0x18')]();});_0x13ca61[_0x2c96('0x19')](_0x305702);this['command']=function(_0x41be31,_0x173867){var _0x41be31=_0x41be31||'',_0x173867=typeof _0x173867==_0x2c96('0xe')?_0x173867:new Function();_0x451d99={'tx':_0x41be31,'rx':'','cb':_0x173867};_0x13ca61[_0x2c96('0x1a')](_0x41be31+'\x0a');},this[_0x2c96('0x16')]=function(){_0x13ca61['destroy']();};}util[_0x2c96('0x1b')](AGIChannel,EventEmitter);AGIChannel['prototype']['sendRequest']=function(_0x42eb37){return this['command'][_0x2c96('0x1c')](this,_0x42eb37);};AGIChannel[_0x2c96('0x1d')][_0x2c96('0x1e')]=function(){return this[_0x2c96('0x1f')]('ANSWER');};AGIChannel[_0x2c96('0x1d')][_0x2c96('0x20')]=function(_0x490f14,_0x13f0c1,_0x15f5d7){_0x490f14=_0x490f14===undefined?_0x2c96('0x21'):_0x490f14;_0x13f0c1=_0x13f0c1===undefined?'5':_0x13f0c1;_0x15f5d7=_0x15f5d7===undefined?'1':_0x15f5d7;return this[_0x2c96('0x1f')](util['format'](_0x2c96('0x22'),_0x490f14,_0x13f0c1*0x3e8,_0x15f5d7));};AGIChannel[_0x2c96('0x1d')][_0x2c96('0x23')]=function(_0x319ad5){_0x319ad5=_0x319ad5||'NO\x20MESSAGE';return this[_0x2c96('0x1f')](util[_0x2c96('0x24')]('VERBOSE\x20\x22%s\x22',_0x319ad5));};AGIChannel[_0x2c96('0x1d')]['exec']=function(_0x2a6e75,_0x761fe1){if(_[_0x2c96('0x25')](_0x761fe1)){return this[_0x2c96('0x1f')](util[_0x2c96('0x24')](_0x2c96('0x26'),_0x2a6e75,_0x761fe1[_0x2c96('0x27')](',')));}return this[_0x2c96('0x1f')](util['format'](_0x2c96('0x26'),_0x2a6e75,_0x761fe1));};AGIChannel[_0x2c96('0x1d')][_0x2c96('0x28')]=function(_0x50b343){return this[_0x2c96('0x1f')](util[_0x2c96('0x24')](_0x2c96('0x29'),_0x50b343));};AGIChannel['prototype'][_0x2c96('0x2a')]=function(_0x5f9971){return this[_0x2c96('0x1f')](util[_0x2c96('0x24')](_0x2c96('0x2b'),_0x5f9971));};AGIChannel['prototype'][_0x2c96('0x2c')]=function(_0x39cc4){return this[_0x2c96('0x1f')](util[_0x2c96('0x24')](_0x2c96('0x2d'),_0x39cc4));};AGIChannel[_0x2c96('0x1d')][_0x2c96('0xb')]=function(){return this[_0x2c96('0x1f')]('HANGUP');};AGIChannel['prototype'][_0x2c96('0x2e')]=function(_0x1d6f84,_0x3a30a0){var _0x3f1f63=_['isBoolean'](_0x3a30a0)||_[_0x2c96('0x2f')](_0x3a30a0)?_0x3a30a0['toString']():_0x3a30a0;return this[_0x2c96('0x1f')](util[_0x2c96('0x24')](_0x2c96('0x30'),_0x1d6f84,_0x3f1f63?_0x3f1f63[_0x2c96('0x31')]()[_0x2c96('0x32')](/(\r\n|\n|\r)/gm,'\x20'):''));};AGIChannel['prototype'][_0x2c96('0x33')]=function(_0x498bbd,_0x360be4){return this[_0x2c96('0x1f')](util['format']('SAY\x20NUMBER\x20%s\x20%s',_0x498bbd,_0x360be4));};AGIChannel[_0x2c96('0x1d')][_0x2c96('0x34')]=function(_0x1622fd,_0x4655d6){return this[_0x2c96('0x1f')](util[_0x2c96('0x24')]('SAY\x20DIGITS\x20%s\x20%s',_0x1622fd,_0x4655d6));};AGIChannel[_0x2c96('0x1d')][_0x2c96('0x35')]=function(_0x532c08,_0x5f04de){return this[_0x2c96('0x1f')](util[_0x2c96('0x24')](_0x2c96('0x36'),_0x532c08,_0x5f04de));};AGIChannel[_0x2c96('0x1d')][_0x2c96('0x37')]=function(_0x40581d,_0x4706a8,_0xf0e3b6){_0x4706a8=_0x4706a8||this[_0x2c96('0x38')];_0xf0e3b6=_0xf0e3b6||0x1;this[_0x2c96('0x28')](_0x40581d);this[_0x2c96('0x2a')](_0x4706a8);this[_0x2c96('0x2c')](_0xf0e3b6);return this['noop'](util['format'](_0x2c96('0x39'),_0x40581d,_0x4706a8,_0xf0e3b6));};AGIChannel['prototype'][_0x2c96('0x3a')]=function(_0x1e6d13){return this[_0x2c96('0x1f')](util[_0x2c96('0x24')](_0x2c96('0x3b'),_0x1e6d13));};AGIChannel['prototype']['recordFile']=function(_0x509e73,_0x577dea,_0x476f91,_0x4a090e,_0x12b9b1,_0x4406d9){_0x577dea=_0x577dea||_0x2c96('0x3c');_0x476f91=_0x476f91||'';_0x4a090e=_0x4a090e===undefined?-0x1:_0x4a090e==='-1'?-0x1:_0x4a090e*0x3e8;_0x12b9b1=_0x12b9b1===undefined?'':'s='+_0x12b9b1;_0x4406d9=_0x4406d9?'BEEP':'';return this[_0x2c96('0x1f')](util[_0x2c96('0x24')]('RECORD\x20FILE\x20\x22%s\x22\x20\x22%s\x22\x20\x22%s\x22\x20%s\x20%s\x20%s',_0x509e73,_0x577dea,_0x476f91,_0x4a090e,_0x4406d9,_0x12b9b1));};AGIChannel[_0x2c96('0x1d')]['streamFile']=function(_0x3bd9de,_0x2bef26){_0x2bef26=_0x2bef26||'';return this[_0x2c96('0x1f')](util[_0x2c96('0x24')](_0x2c96('0x3d'),_0x3bd9de,_0x2bef26));};AGIChannel[_0x2c96('0x1d')][_0x2c96('0x3e')]=function(_0x12cce2){return this['exec'](_0x2c96('0x3f'),_0x12cce2);};AGIChannel[_0x2c96('0x1d')][_0x2c96('0x40')]=function(_0x28c1d1){return this['exec'](_0x2c96('0x41'),_0x28c1d1);};AGIChannel[_0x2c96('0x1d')][_0x2c96('0x15')]=function(_0x45118c,_0x202a15){this['noop'](util[_0x2c96('0x24')](_0x2c96('0x42'),_0x45118c['id'],_0x45118c['label'],_0x202a15));return{'code':0x1f4,'result':'-1','extra':''};};module[_0x2c96('0x43')]=AGIChannel;
\ No newline at end of file
index 225e907..6342270 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x836e=['Socket\x20error.\x20Code:\x20%s.','Socket\x20closed.','Socket\x20timeout.','Empty\x20command.','E_AGI_UNDEFINED','push','format','apply','message','name','exports','Undefined\x20error.','Argument\x20\x27port\x27\x20missing\x20in\x20function\x20call.','Server\x20error.\x20Code:\x20%s.','Server\x20closed.','[LICENSE]\x20Server\x20max\x20connection.\x20Count:\x20%s.','[LICENSE\x20VOICE]\x20Server\x20license\x20voice\x20disabled.'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0x836e,0x1b4));var _0xe836=function(_0x57d3d9,_0x2d605b){_0x57d3d9=_0x57d3d9-0x0;var _0x46730c=_0x836e[_0x57d3d9];return _0x46730c;};'use strict';var util=require('util');var error={'E_AGI_UNDEFINED':_0xe836('0x0'),'E_AGI_ARGUMENT_PORT':_0xe836('0x1'),'E_AGI_SERVER_ERROR':_0xe836('0x2'),'E_AGI_SERVER_CLOSE':_0xe836('0x3'),'E_AGI_SERVER_MAXCONNECTION':_0xe836('0x4'),'E_AGI_SERVER_VOICE_DISABLED':_0xe836('0x5'),'E_AGI_SOCKET_ERROR':_0xe836('0x6'),'E_AGI_SOCKET_CLOSE':_0xe836('0x7'),'E_AGI_SOCKET_TIMEOUT':_0xe836('0x8'),'E_AGI_COMMAND_EMPTY':_0xe836('0x9'),'E_AGI_IVR_AGI_NETWORK_SCRIPT':'Missing\x20\x27ivr.agi_network_script\x27.','E_AGI_IVR_ENTRY':'Missing\x20\x27ivr.entry\x27\x20menu.'};function AGIError(_0x2ee951){var _0x2ee951=_0x2ee951||null,_0x3478f2=_0x3478f2||[],_0x445011=0x1,_0x1e4b03='';if(!error[_0x2ee951]){_0x2ee951=_0xe836('0xa');}_0x3478f2[_0xe836('0xb')](error[_0x2ee951]);while(arguments[_0x445011]){_0x3478f2[_0xe836('0xb')](arguments[_0x445011]);_0x445011++;}_0x1e4b03=util[_0xe836('0xc')][_0xe836('0xd')](util,_0x3478f2);this[_0xe836('0xe')]=_0x1e4b03;this[_0xe836('0xf')]=_0x2ee951;}module[_0xe836('0x10')]=AGIError;
\ No newline at end of file
+var _0x0e96=['E_AGI_UNDEFINED','push','format','exports','Undefined\x20error.','Argument\x20\x27port\x27\x20missing\x20in\x20function\x20call.','Server\x20error.\x20Code:\x20%s.','Server\x20closed.','[LICENSE]\x20Server\x20max\x20connection.\x20Count:\x20%s.','[LICENSE\x20VOICE]\x20Server\x20license\x20voice\x20disabled.','Socket\x20error.\x20Code:\x20%s.','Socket\x20closed.','Missing\x20\x27ivr.entry\x27\x20menu.'];(function(_0x3514b3,_0x1e68c6){var _0x22f018=function(_0xcd513a){while(--_0xcd513a){_0x3514b3['push'](_0x3514b3['shift']());}};_0x22f018(++_0x1e68c6);}(_0x0e96,0xc7));var _0x60e9=function(_0x528783,_0xce097d){_0x528783=_0x528783-0x0;var _0x4940da=_0x0e96[_0x528783];return _0x4940da;};'use strict';var util=require('util');var error={'E_AGI_UNDEFINED':_0x60e9('0x0'),'E_AGI_ARGUMENT_PORT':_0x60e9('0x1'),'E_AGI_SERVER_ERROR':_0x60e9('0x2'),'E_AGI_SERVER_CLOSE':_0x60e9('0x3'),'E_AGI_SERVER_MAXCONNECTION':_0x60e9('0x4'),'E_AGI_SERVER_VOICE_DISABLED':_0x60e9('0x5'),'E_AGI_SOCKET_ERROR':_0x60e9('0x6'),'E_AGI_SOCKET_CLOSE':_0x60e9('0x7'),'E_AGI_SOCKET_TIMEOUT':'Socket\x20timeout.','E_AGI_COMMAND_EMPTY':'Empty\x20command.','E_AGI_IVR_AGI_NETWORK_SCRIPT':'Missing\x20\x27ivr.agi_network_script\x27.','E_AGI_IVR_ENTRY':_0x60e9('0x8')};function AGIError(_0xe90a50){var _0xe90a50=_0xe90a50||null,_0x2e5f0a=_0x2e5f0a||[],_0x429ff9=0x1,_0x3db51b='';if(!error[_0xe90a50]){_0xe90a50=_0x60e9('0x9');}_0x2e5f0a[_0x60e9('0xa')](error[_0xe90a50]);while(arguments[_0x429ff9]){_0x2e5f0a[_0x60e9('0xa')](arguments[_0x429ff9]);_0x429ff9++;}_0x3db51b=util[_0x60e9('0xb')]['apply'](util,_0x2e5f0a);this['message']=_0x3db51b;this['name']=_0xe90a50;}module[_0x60e9('0xc')]=AGIError;
\ No newline at end of file
index 281ed89..a410bcc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x71ec=['EventEmitter','ioredis','./error','../../config/environment','redis','localhost','subscribe','agi','emit','error','E_AGI_SERVER_ERROR','parse','projectUpdate','lodash'];(function(_0x1121a2,_0x5d71a){var _0x130271=function(_0x234436){while(--_0x234436){_0x1121a2['push'](_0x1121a2['shift']());}};_0x130271(++_0x5d71a);}(_0x71ec,0x133));var _0xc71e=function(_0x2a8b5c,_0x429c22){_0x2a8b5c=_0x2a8b5c-0x0;var _0x3bbefe=_0x71ec[_0x2a8b5c];return _0x3bbefe;};'use strict';var _=require(_0xc71e('0x0'));var EventEmitter=require('events')[_0xc71e('0x1')];var Redis=require(_0xc71e('0x2'));var AGIError=require(_0xc71e('0x3'));var config=require(_0xc71e('0x4'));config[_0xc71e('0x5')]=_['defaults'](config['redis'],{'host':_0xc71e('0x6'),'port':0x18eb});var eventEmitter=new EventEmitter();var sub=new Redis(config[_0xc71e('0x5')]);sub[_0xc71e('0x7')](_0xc71e('0x8'),function(_0x159329){if(_0x159329)return eventEmitter[_0xc71e('0x9')](_0xc71e('0xa'),new AGIError(_0xc71e('0xb'),_0x159329));});sub['on']('message',function(_0x413e23,_0x5a49e1){if(_0x413e23!==_0xc71e('0x8'))return;try{var _0x59f6cb=JSON[_0xc71e('0xc')](_0x5a49e1);eventEmitter[_0xc71e('0x9')](_0xc71e('0xd'),_0x59f6cb);}catch(_0x1056a0){eventEmitter[_0xc71e('0x9')](_0xc71e('0xa'),new AGIError('E_AGI_SERVER_ERROR',_0x1056a0));}});module['exports']={'EventEmitter':eventEmitter};
\ No newline at end of file
+var _0x11fc=['events','ioredis','../../config/environment','redis','localhost','subscribe','agi','error','message','parse','emit','E_AGI_SERVER_ERROR'];(function(_0x6986b7,_0x3a5d0b){var _0x5ddfde=function(_0x319b74){while(--_0x319b74){_0x6986b7['push'](_0x6986b7['shift']());}};_0x5ddfde(++_0x3a5d0b);}(_0x11fc,0x1bc));var _0xc11f=function(_0x160c73,_0x2ee678){_0x160c73=_0x160c73-0x0;var _0xd9302=_0x11fc[_0x160c73];return _0xd9302;};'use strict';var _=require('lodash');var EventEmitter=require(_0xc11f('0x0'))['EventEmitter'];var Redis=require(_0xc11f('0x1'));var AGIError=require('./error');var config=require(_0xc11f('0x2'));config[_0xc11f('0x3')]=_['defaults'](config[_0xc11f('0x3')],{'host':_0xc11f('0x4'),'port':0x18eb});var eventEmitter=new EventEmitter();var sub=new Redis(config[_0xc11f('0x3')]);sub[_0xc11f('0x5')](_0xc11f('0x6'),function(_0x590914){if(_0x590914)return eventEmitter['emit'](_0xc11f('0x7'),new AGIError('E_AGI_SERVER_ERROR',_0x590914));});sub['on'](_0xc11f('0x8'),function(_0x50d415,_0xa8a689){if(_0x50d415!==_0xc11f('0x6'))return;try{var _0x27a3ae=JSON[_0xc11f('0x9')](_0xa8a689);eventEmitter[_0xc11f('0xa')]('projectUpdate',_0x27a3ae);}catch(_0x59a524){eventEmitter['emit'](_0xc11f('0x7'),new AGIError(_0xc11f('0xb'),_0x59a524));}});module['exports']={'EventEmitter':eventEmitter};
\ No newline at end of file
index 88e67a8..52ed271 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x066e=['invalid','traverseBFS','includes','max\x20retry\x20reach','condition\x20not\x20found','exports','lodash','menu','getdigits','getsecretdigits','edges','numberOfEdges','vertices','prototype','addEdge','push','size','relations','no\x20vertex\x20found','no\x20edge/s\x20available','length','condition','split','agicommand','vswitch','target','info','default'];(function(_0x7f70ec,_0x82eb8b){var _0x397ff9=function(_0x51edf4){while(--_0x51edf4){_0x7f70ec['push'](_0x7f70ec['shift']());}};_0x397ff9(++_0x82eb8b);}(_0x066e,0xca));var _0xe066=function(_0x4e9628,_0x250573){_0x4e9628=_0x4e9628-0x0;var _0x27bc8c=_0x066e[_0x4e9628];return _0x27bc8c;};'use strict';var _=require(_0xe066('0x0'));var logger=require('../../../config/logger')('agi');var verticesWithRetry=[_0xe066('0x1'),_0xe066('0x2'),_0xe066('0x3')];var Graph=function(){this['vertices']={};this[_0xe066('0x4')]={};this[_0xe066('0x5')]=0x0;};Graph['prototype']['addVertex']=function(_0x3fdd8b){this[_0xe066('0x6')][_0x3fdd8b['id']]=_0x3fdd8b;this[_0xe066('0x4')][_0x3fdd8b['id']]=[];};Graph[_0xe066('0x7')][_0xe066('0x8')]=function(_0x31ae4d,_0x1e012b,_0x24219d){this[_0xe066('0x4')][_0x31ae4d][_0xe066('0x9')]({'target':_0x1e012b,'condition':_0x24219d});this['numberOfEdges']+=0x1;};Graph[_0xe066('0x7')][_0xe066('0xa')]=function(){return _[_0xe066('0xa')](this[_0xe066('0x6')]);};Graph['prototype'][_0xe066('0xb')]=function(){return this[_0xe066('0x5')];};Graph['prototype']['getVertex']=function(_0x53ca5f){return this[_0xe066('0x6')][_0x53ca5f];};Graph[_0xe066('0x7')]['traverseBFS']=function(_0x59109e,_0x50c8bd){if(!this['vertices'][_0x59109e]){return logger['info'](_0xe066('0xc'));}var _0x57ce5b=_0x50c8bd(this['vertices'][_0x59109e]);if(!_0x57ce5b){return logger['info']('stop\x20traverse');}if(this['edges'][_0x59109e]['length']===0x0){return logger['info'](_0xe066('0xd'));}for(var _0x4b05bc=0x0,_0x3e5906=[],_0x3e3172=![];_0x4b05bc<this[_0xe066('0x4')][_0x59109e][_0xe066('0xe')];_0x4b05bc+=0x1){if(this[_0xe066('0x4')][_0x59109e][_0x4b05bc][_0xe066('0xf')]){_0x3e5906=this[_0xe066('0x4')][_0x59109e][_0x4b05bc]['condition'][_0xe066('0x10')](',');for(var _0x58a5cf=0x0;_0x58a5cf<_0x3e5906[_0xe066('0xe')];_0x58a5cf+=0x1){if(this['vertices'][_0x59109e][_0xe066('0x11')]===_0xe066('0x12')&&_0x3e5906[_0x58a5cf]==='-'){_0x3e3172=this[_0xe066('0x4')][_0x59109e][_0x4b05bc][_0xe066('0x13')];logger[_0xe066('0x14')](_0xe066('0x15'),_0x3e5906[_0x58a5cf],this[_0xe066('0x4')][_0x59109e][_0x4b05bc][_0xe066('0x13')]);}else if(this[_0xe066('0x6')][_0x59109e][_0xe066('0x11')]===_0xe066('0x1')&&_0x3e5906[_0x58a5cf]==='i'){_0x3e3172=this[_0xe066('0x4')][_0x59109e][_0x4b05bc]['target'];logger[_0xe066('0x14')](_0xe066('0x16'),_0x3e5906[_0x58a5cf],this[_0xe066('0x4')][_0x59109e][_0x4b05bc]['target']);}if(_0x3e5906[_0x58a5cf]===_0x57ce5b){return this[_0xe066('0x17')](this[_0xe066('0x4')][_0x59109e][_0x4b05bc][_0xe066('0x13')],_0x50c8bd);}}}else{return this[_0xe066('0x17')](this[_0xe066('0x4')][_0x59109e][_0x4b05bc]['target'],_0x50c8bd);}}if(_0x3e5906['length']){if(this['vertices'][_0x59109e][_0xe066('0x11')]===_0xe066('0x12')){if(_0x3e3172){return this[_0xe066('0x17')](_0x3e3172,_0x50c8bd);}return logger[_0xe066('0x14')]('default\x20on\x20switch\x20not\x20found');}else if(_[_0xe066('0x18')](verticesWithRetry,this[_0xe066('0x6')][_0x59109e][_0xe066('0x11')])){if(_0x57ce5b==='-'){return logger[_0xe066('0x14')](_0xe066('0x19'));}if(_0x3e3172&&_0x57ce5b!=='t'){return this[_0xe066('0x17')](_0x3e3172,_0x50c8bd);}return this['traverseBFS'](_0x59109e,_0x50c8bd);}return logger[_0xe066('0x14')](_0xe066('0x1a'));}};module[_0xe066('0x1b')]=Graph;
\ No newline at end of file
+var _0x2d74=['addEdge','push','size','relations','traverseBFS','info','no\x20vertex\x20found','stop\x20traverse','length','no\x20edge/s\x20available','condition','split','agicommand','vswitch','target','default','menu','invalid','default\x20on\x20switch\x20not\x20found','max\x20retry\x20reach','condition\x20not\x20found','lodash','../../../config/logger','agi','getdigits','getsecretdigits','vertices','edges','numberOfEdges','prototype','addVertex'];(function(_0x525c7b,_0x488fcc){var _0x27b33e=function(_0x56d43b){while(--_0x56d43b){_0x525c7b['push'](_0x525c7b['shift']());}};_0x27b33e(++_0x488fcc);}(_0x2d74,0x1a8));var _0x42d7=function(_0x402664,_0x19f7d8){_0x402664=_0x402664-0x0;var _0x56dcdd=_0x2d74[_0x402664];return _0x56dcdd;};'use strict';var _=require(_0x42d7('0x0'));var logger=require(_0x42d7('0x1'))(_0x42d7('0x2'));var verticesWithRetry=['menu',_0x42d7('0x3'),_0x42d7('0x4')];var Graph=function(){this[_0x42d7('0x5')]={};this[_0x42d7('0x6')]={};this[_0x42d7('0x7')]=0x0;};Graph[_0x42d7('0x8')][_0x42d7('0x9')]=function(_0x5a9d46){this[_0x42d7('0x5')][_0x5a9d46['id']]=_0x5a9d46;this[_0x42d7('0x6')][_0x5a9d46['id']]=[];};Graph['prototype'][_0x42d7('0xa')]=function(_0x21ed6b,_0x3c5aba,_0x1d9f50){this[_0x42d7('0x6')][_0x21ed6b][_0x42d7('0xb')]({'target':_0x3c5aba,'condition':_0x1d9f50});this[_0x42d7('0x7')]+=0x1;};Graph['prototype'][_0x42d7('0xc')]=function(){return _[_0x42d7('0xc')](this[_0x42d7('0x5')]);};Graph['prototype'][_0x42d7('0xd')]=function(){return this[_0x42d7('0x7')];};Graph[_0x42d7('0x8')]['getVertex']=function(_0x10298e){return this[_0x42d7('0x5')][_0x10298e];};Graph[_0x42d7('0x8')][_0x42d7('0xe')]=function(_0x4feab2,_0x50d0f1){if(!this[_0x42d7('0x5')][_0x4feab2]){return logger[_0x42d7('0xf')](_0x42d7('0x10'));}var _0x53cdaf=_0x50d0f1(this['vertices'][_0x4feab2]);if(!_0x53cdaf){return logger['info'](_0x42d7('0x11'));}if(this['edges'][_0x4feab2][_0x42d7('0x12')]===0x0){return logger[_0x42d7('0xf')](_0x42d7('0x13'));}for(var _0x12b1c1=0x0,_0x1bbe9b=[],_0x21cbc9=![];_0x12b1c1<this[_0x42d7('0x6')][_0x4feab2][_0x42d7('0x12')];_0x12b1c1+=0x1){if(this[_0x42d7('0x6')][_0x4feab2][_0x12b1c1][_0x42d7('0x14')]){_0x1bbe9b=this['edges'][_0x4feab2][_0x12b1c1][_0x42d7('0x14')][_0x42d7('0x15')](',');for(var _0x3e9b29=0x0;_0x3e9b29<_0x1bbe9b['length'];_0x3e9b29+=0x1){if(this[_0x42d7('0x5')][_0x4feab2][_0x42d7('0x16')]===_0x42d7('0x17')&&_0x1bbe9b[_0x3e9b29]==='-'){_0x21cbc9=this[_0x42d7('0x6')][_0x4feab2][_0x12b1c1][_0x42d7('0x18')];logger[_0x42d7('0xf')](_0x42d7('0x19'),_0x1bbe9b[_0x3e9b29],this[_0x42d7('0x6')][_0x4feab2][_0x12b1c1][_0x42d7('0x18')]);}else if(this[_0x42d7('0x5')][_0x4feab2][_0x42d7('0x16')]===_0x42d7('0x1a')&&_0x1bbe9b[_0x3e9b29]==='i'){_0x21cbc9=this[_0x42d7('0x6')][_0x4feab2][_0x12b1c1]['target'];logger['info'](_0x42d7('0x1b'),_0x1bbe9b[_0x3e9b29],this[_0x42d7('0x6')][_0x4feab2][_0x12b1c1][_0x42d7('0x18')]);}if(_0x1bbe9b[_0x3e9b29]===_0x53cdaf){return this[_0x42d7('0xe')](this[_0x42d7('0x6')][_0x4feab2][_0x12b1c1][_0x42d7('0x18')],_0x50d0f1);}}}else{return this[_0x42d7('0xe')](this[_0x42d7('0x6')][_0x4feab2][_0x12b1c1][_0x42d7('0x18')],_0x50d0f1);}}if(_0x1bbe9b[_0x42d7('0x12')]){if(this[_0x42d7('0x5')][_0x4feab2]['agicommand']===_0x42d7('0x17')){if(_0x21cbc9){return this['traverseBFS'](_0x21cbc9,_0x50d0f1);}return logger[_0x42d7('0xf')](_0x42d7('0x1c'));}else if(_['includes'](verticesWithRetry,this['vertices'][_0x4feab2]['agicommand'])){if(_0x53cdaf==='-'){return logger[_0x42d7('0xf')](_0x42d7('0x1d'));}if(_0x21cbc9&&_0x53cdaf!=='t'){return this[_0x42d7('0xe')](_0x21cbc9,_0x50d0f1);}return this[_0x42d7('0xe')](_0x4feab2,_0x50d0f1);}return logger[_0x42d7('0xf')](_0x42d7('0x1e'));}};module['exports']=Graph;
\ No newline at end of file
index 872020a..904916f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9854=['hasOwnProperty','substring','debug','variables','stringify','[START]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','close','timeout','find','handleNotFound','production','initialize','getLicense','voice','callysquare','[LICENSE]\x20CHANNELS:\x20UNLIMITED','[LICENSE]\x20VOICE\x20IS\x20DISABLED','[LICENSE]','finally','./server','listening','lodash','syncho','util','../../config/environment','../../config/logger','agi','./rpc','./events','EventEmitter','defaults','127.0.0.1','nextTick','error','stack','findIndex','deleted','splice','push','log','Cally\x20Square\x20server\x20listening\x20on\x20port\x20%d!','port','info','format','[LISTENING]\x20Cally\x20Square\x20listening\x20%s:%d','name','message','[%s]\x20%s','[ERROR]\x20%s','arg_1','calleridname','uniqueid','dnid','[HANGUP]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','callerid','evtHangup','then','catch'];(function(_0x20148a,_0x83800c){var _0x4c8ffb=function(_0x5c0a1d){while(--_0x5c0a1d){_0x20148a['push'](_0x20148a['shift']());}};_0x4c8ffb(++_0x83800c);}(_0x9854,0x137));var _0x4985=function(_0x537b0b,_0x1f6127){_0x537b0b=_0x537b0b-0x0;var _0x26be6c=_0x9854[_0x537b0b];return _0x26be6c;};'use strict';var _=require(_0x4985('0x0'));var syncho=require(_0x4985('0x1'));var util=require(_0x4985('0x2'));var config=require(_0x4985('0x3'));var logger=require(_0x4985('0x4'))(_0x4985('0x5'));var utilLicense=require('../../config/license/util');var rpc=require(_0x4985('0x6'));var Project=require('./project');var AGIEmitter=require(_0x4985('0x7'))[_0x4985('0x8')];var projects=[];config['agi']=_[_0x4985('0x9')](config[_0x4985('0x5')],{'ip':_0x4985('0xa'),'port':0x11dd});AGIEmitter['on']('projectUpdate',projectUpdateHandler);function connectionHandler(_0x158da1){process[_0x4985('0xb')](function(){syncho(function(){try{setChannelVariables(_0x158da1);agiHandler(_0x158da1);}catch(_0x420e03){logger[_0x4985('0xc')](_0x420e03[_0x4985('0xd')]);}});});}function projectUpdateHandler(_0x44a4ca){try{var _0x5cc281=_[_0x4985('0xe')](projects,['id',_0x44a4ca['id']]);if(_0x5cc281>-0x1){if(_0x44a4ca[_0x4985('0xf')]===!![]){projects[_0x4985('0x10')](_0x5cc281,0x1);}else{projects[_0x5cc281]=_0x44a4ca;}}else{projects[_0x4985('0x11')](_0x44a4ca);}}catch(_0x278ae){logger['error'](_0x278ae[_0x4985('0xd')]);}}function listeningHandler(){console[_0x4985('0x12')](_0x4985('0x13'),config['agi'][_0x4985('0x14')]);logger[_0x4985('0x15')](util[_0x4985('0x16')](_0x4985('0x17'),config[_0x4985('0x5')]['ip'],config[_0x4985('0x5')][_0x4985('0x14')]));}function errorHandler(_0x1c42a6){if(_0x1c42a6&&_0x1c42a6[_0x4985('0x18')]&&_0x1c42a6[_0x4985('0x19')]){logger[_0x4985('0xc')](util[_0x4985('0x16')](_0x4985('0x1a'),_0x1c42a6['name'],_0x1c42a6[_0x4985('0x19')]));}else{logger['error'](util[_0x4985('0x16')](_0x4985('0x1b'),_0x1c42a6[_0x4985('0xd')]));}}function closeHandler(){logger[_0x4985('0x15')](util[_0x4985('0x16')]('[CLOSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',this[_0x4985('0x1c')],this[_0x4985('0x1d')],this['callerid'],this['dnid'],this[_0x4985('0x1e')]));try{createSquareReport(this);}catch(_0x531582){logger['error'](_0x531582[_0x4985('0xd')]);}}function timeoutHandler(){logger['info'](util[_0x4985('0x16')]('[TIMEOUT]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',this[_0x4985('0x1c')],this[_0x4985('0x1d')],this['callerid'],this[_0x4985('0x1f')],this[_0x4985('0x1e')]));}function hangupHandler(){logger[_0x4985('0x15')](util[_0x4985('0x16')](_0x4985('0x20'),this[_0x4985('0x1c')],this['calleridname'],this[_0x4985('0x21')],this[_0x4985('0x1f')],this[_0x4985('0x1e')]));this[_0x4985('0x22')]=!![];}function createSquareReport(_0x2f0dfc,_0x6471b0){rpc['createSquareReport'](_0x2f0dfc)[_0x4985('0x23')](function(_0x44acc5){if(_0x6471b0){_0x6471b0(null,_0x44acc5);}})[_0x4985('0x24')](function(_0x3a24ff){if(_0x6471b0){_0x6471b0(null,_0x3a24ff);}});}function setChannelVariables(_0x807459){for(var _0x2e393a in _0x807459){if(_0x807459[_0x4985('0x25')](_0x2e393a)){if(_0x2e393a['indexOf']('agi_')===0x0){_0x807459[_0x2e393a[_0x4985('0x26')](0x4)]=_0x807459[_0x2e393a];delete _0x807459[_0x2e393a];}}}}function agiHandler(_0x878744){logger[_0x4985('0x27')](_0x4985('0x28'),JSON[_0x4985('0x29')](_0x878744,null,0x2));logger['info'](util[_0x4985('0x16')](_0x4985('0x2a'),_0x878744['arg_1'],_0x878744[_0x4985('0x1d')],_0x878744['callerid'],_0x878744[_0x4985('0x1f')],_0x878744[_0x4985('0x1e')]));_0x878744['on'](_0x4985('0xc'),errorHandler);_0x878744['on'](_0x4985('0x2b'),closeHandler);_0x878744['on'](_0x4985('0x2c'),timeoutHandler);_0x878744[_0x4985('0x22')]=![];_0x878744['on']('hangup',hangupHandler);var _0x4d9506=_[_0x4985('0x2d')](projects,['name',_0x878744[_0x4985('0x1c')]]);if(!_0x4d9506)return Project[_0x4985('0x2e')](_0x878744);if(!_0x4d9506[_0x4985('0x2f')])return Project['handleUnpublished'](_0x878744);return Project[_0x4985('0x30')](_0x4d9506,_0x878744);}function main(){var _0x25e910;return utilLicense[_0x4985('0x31')]()[_0x4985('0x23')](function(_0x10aeb2){if(!_0x10aeb2)return;if(_0x10aeb2[_0x4985('0x32')]){if(_0x10aeb2[_0x4985('0x33')]&&_0x10aeb2['callysquare']>0x0){logger[_0x4985('0x15')](util['format']('[LICENSE]\x20CHANNELS:\x20%s',_0x10aeb2[_0x4985('0x33')]));_0x25e910=_0x10aeb2[_0x4985('0x33')];}else{logger[_0x4985('0x15')](_0x4985('0x34'));}}else{logger['info'](_0x4985('0x35'));_0x25e910=-0x1;}})[_0x4985('0x23')](function(){return Project['getAll']();})[_0x4985('0x23')](function(_0x5be4be){projects=_0x5be4be;return;})[_0x4985('0x24')](function(_0x2dddd3){logger[_0x4985('0xc')](_0x4985('0x36'),_0x2dddd3[_0x4985('0xd')]);})[_0x4985('0x37')](function(){var _0xa0e65d=require(_0x4985('0x38'))(config[_0x4985('0x5')][_0x4985('0x14')],config[_0x4985('0x5')]['ip'],_0x25e910);_0xa0e65d['on'](_0x4985('0xc'),errorHandler);_0xa0e65d['on'](_0x4985('0x39'),listeningHandler);_0xa0e65d['on']('connection',connectionHandler);_0xa0e65d['on'](_0x4985('0x2b'),closeHandler);});}main();
\ No newline at end of file
+var _0x51fe=['handleNotFound','production','handleUnpublished','initialize','getLicense','then','voice','callysquare','[LICENSE]\x20CHANNELS:\x20%s','[LICENSE]\x20CHANNELS:\x20UNLIMITED','[LICENSE]\x20VOICE\x20IS\x20DISABLED','getAll','[LICENSE]','finally','./server','listening','connection','lodash','syncho','util','../../config/environment','../../config/logger','./rpc','agi','defaults','127.0.0.1','projectUpdate','nextTick','error','stack','findIndex','deleted','splice','log','port','info','format','[LISTENING]\x20Cally\x20Square\x20listening\x20%s:%d','name','message','[%s]\x20%s','calleridname','uniqueid','[TIMEOUT]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','arg_1','callerid','[HANGUP]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','dnid','createSquareReport','catch','hasOwnProperty','indexOf','agi_','debug','variables','stringify','[START]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','timeout','evtHangup','hangup','find'];(function(_0x590b63,_0x14debb){var _0x3c9380=function(_0x58fc67){while(--_0x58fc67){_0x590b63['push'](_0x590b63['shift']());}};_0x3c9380(++_0x14debb);}(_0x51fe,0x142));var _0xe51f=function(_0x3de2e3,_0x138ce7){_0x3de2e3=_0x3de2e3-0x0;var _0x1bce2a=_0x51fe[_0x3de2e3];return _0x1bce2a;};'use strict';var _=require(_0xe51f('0x0'));var syncho=require(_0xe51f('0x1'));var util=require(_0xe51f('0x2'));var config=require(_0xe51f('0x3'));var logger=require(_0xe51f('0x4'))('agi');var utilLicense=require('../../config/license/util');var rpc=require(_0xe51f('0x5'));var Project=require('./project');var AGIEmitter=require('./events')['EventEmitter'];var projects=[];config[_0xe51f('0x6')]=_[_0xe51f('0x7')](config[_0xe51f('0x6')],{'ip':_0xe51f('0x8'),'port':0x11dd});AGIEmitter['on'](_0xe51f('0x9'),projectUpdateHandler);function connectionHandler(_0x4da66e){process[_0xe51f('0xa')](function(){syncho(function(){try{setChannelVariables(_0x4da66e);agiHandler(_0x4da66e);}catch(_0x486591){logger[_0xe51f('0xb')](_0x486591[_0xe51f('0xc')]);}});});}function projectUpdateHandler(_0x1d99a6){try{var _0x349ef7=_[_0xe51f('0xd')](projects,['id',_0x1d99a6['id']]);if(_0x349ef7>-0x1){if(_0x1d99a6[_0xe51f('0xe')]===!![]){projects[_0xe51f('0xf')](_0x349ef7,0x1);}else{projects[_0x349ef7]=_0x1d99a6;}}else{projects['push'](_0x1d99a6);}}catch(_0x541fc9){logger[_0xe51f('0xb')](_0x541fc9[_0xe51f('0xc')]);}}function listeningHandler(){console[_0xe51f('0x10')]('Cally\x20Square\x20server\x20listening\x20on\x20port\x20%d!',config[_0xe51f('0x6')][_0xe51f('0x11')]);logger[_0xe51f('0x12')](util[_0xe51f('0x13')](_0xe51f('0x14'),config[_0xe51f('0x6')]['ip'],config[_0xe51f('0x6')]['port']));}function errorHandler(_0x4f7808){if(_0x4f7808&&_0x4f7808[_0xe51f('0x15')]&&_0x4f7808[_0xe51f('0x16')]){logger['error'](util['format'](_0xe51f('0x17'),_0x4f7808[_0xe51f('0x15')],_0x4f7808[_0xe51f('0x16')]));}else{logger[_0xe51f('0xb')](util['format']('[ERROR]\x20%s',_0x4f7808[_0xe51f('0xc')]));}}function closeHandler(){logger[_0xe51f('0x12')](util[_0xe51f('0x13')]('[CLOSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',this['arg_1'],this[_0xe51f('0x18')],this['callerid'],this['dnid'],this[_0xe51f('0x19')]));try{createSquareReport(this);}catch(_0x251018){logger[_0xe51f('0xb')](_0x251018[_0xe51f('0xc')]);}}function timeoutHandler(){logger[_0xe51f('0x12')](util[_0xe51f('0x13')](_0xe51f('0x1a'),this[_0xe51f('0x1b')],this['calleridname'],this[_0xe51f('0x1c')],this['dnid'],this['uniqueid']));}function hangupHandler(){logger['info'](util[_0xe51f('0x13')](_0xe51f('0x1d'),this[_0xe51f('0x1b')],this['calleridname'],this[_0xe51f('0x1c')],this[_0xe51f('0x1e')],this[_0xe51f('0x19')]));this['evtHangup']=!![];}function createSquareReport(_0x30c1e1,_0x13af23){rpc[_0xe51f('0x1f')](_0x30c1e1)['then'](function(_0x329454){if(_0x13af23){_0x13af23(null,_0x329454);}})[_0xe51f('0x20')](function(_0x3ba60b){if(_0x13af23){_0x13af23(null,_0x3ba60b);}});}function setChannelVariables(_0x2516c1){for(var _0x285b73 in _0x2516c1){if(_0x2516c1[_0xe51f('0x21')](_0x285b73)){if(_0x285b73[_0xe51f('0x22')](_0xe51f('0x23'))===0x0){_0x2516c1[_0x285b73['substring'](0x4)]=_0x2516c1[_0x285b73];delete _0x2516c1[_0x285b73];}}}}function agiHandler(_0x1436dd){logger[_0xe51f('0x24')](_0xe51f('0x25'),JSON[_0xe51f('0x26')](_0x1436dd,null,0x2));logger[_0xe51f('0x12')](util[_0xe51f('0x13')](_0xe51f('0x27'),_0x1436dd[_0xe51f('0x1b')],_0x1436dd[_0xe51f('0x18')],_0x1436dd['callerid'],_0x1436dd[_0xe51f('0x1e')],_0x1436dd[_0xe51f('0x19')]));_0x1436dd['on'](_0xe51f('0xb'),errorHandler);_0x1436dd['on']('close',closeHandler);_0x1436dd['on'](_0xe51f('0x28'),timeoutHandler);_0x1436dd[_0xe51f('0x29')]=![];_0x1436dd['on'](_0xe51f('0x2a'),hangupHandler);var _0x13a0ba=_[_0xe51f('0x2b')](projects,['name',_0x1436dd[_0xe51f('0x1b')]]);if(!_0x13a0ba)return Project[_0xe51f('0x2c')](_0x1436dd);if(!_0x13a0ba[_0xe51f('0x2d')])return Project[_0xe51f('0x2e')](_0x1436dd);return Project[_0xe51f('0x2f')](_0x13a0ba,_0x1436dd);}function main(){var _0xb84d3b;return utilLicense[_0xe51f('0x30')]()[_0xe51f('0x31')](function(_0xc818a9){if(!_0xc818a9)return;if(_0xc818a9[_0xe51f('0x32')]){if(_0xc818a9[_0xe51f('0x33')]&&_0xc818a9['callysquare']>0x0){logger[_0xe51f('0x12')](util[_0xe51f('0x13')](_0xe51f('0x34'),_0xc818a9['callysquare']));_0xb84d3b=_0xc818a9['callysquare'];}else{logger[_0xe51f('0x12')](_0xe51f('0x35'));}}else{logger[_0xe51f('0x12')](_0xe51f('0x36'));_0xb84d3b=-0x1;}})['then'](function(){return Project[_0xe51f('0x37')]();})[_0xe51f('0x31')](function(_0x1c6ec1){projects=_0x1c6ec1;return;})[_0xe51f('0x20')](function(_0x144c62){logger[_0xe51f('0xb')](_0xe51f('0x38'),_0x144c62[_0xe51f('0xc')]);})[_0xe51f('0x39')](function(){var _0x4d9cbf=require(_0xe51f('0x3a'))(config[_0xe51f('0x6')][_0xe51f('0x11')],config[_0xe51f('0x6')]['ip'],_0xb84d3b);_0x4d9cbf['on'](_0xe51f('0xb'),errorHandler);_0x4d9cbf['on'](_0xe51f('0x3b'),listeningHandler);_0x4d9cbf['on'](_0xe51f('0x3c'),connectionHandler);_0x4d9cbf['on']('close',closeHandler);});}main();
\ No newline at end of file
index 71b52a5..6ab846d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd54a=['request','error','message','catch','SendMail','bluebird','jayson/promise','http'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0xd54a,0x1d5));var _0xad54=function(_0x82129b,_0x484ae9){_0x82129b=_0x82129b-0x0;var _0x2ae5dc=_0xd54a[_0x82129b];return _0x2ae5dc;};'use strict';var BPromise=require(_0xad54('0x0'));var jayson=require(_0xad54('0x1'));var client=jayson['client'][_0xad54('0x2')]({'port':0x232b});function request(_0x9f0d3b,_0x10c3d7){return new BPromise(function(_0xf4f8e1,_0x4fae41){return client[_0xad54('0x3')](_0x9f0d3b,_0x10c3d7)['then'](function(_0x40dd8a){if(_0x40dd8a[_0xad54('0x4')]){return _0x4fae41(_0x40dd8a[_0xad54('0x4')][_0xad54('0x5')]);}else{return _0xf4f8e1(_0x40dd8a['result']);}})[_0xad54('0x6')](function(_0x5f3f25){return _0x4fae41(_0x5f3f25);});});}exports['sendMailMessage']=function(_0x3270b9,_0x38773e){return request(_0xad54('0x7'),{'account':_0x3270b9,'message':_0x38773e});};
\ No newline at end of file
+var _0x5d6d=['sendMailMessage','SendMail','jayson/promise','client','http','request','then','error','message','result','catch'];(function(_0x379a70,_0x367de6){var _0x3ddaa4=function(_0x5a2582){while(--_0x5a2582){_0x379a70['push'](_0x379a70['shift']());}};_0x3ddaa4(++_0x367de6);}(_0x5d6d,0xc8));var _0xd5d6=function(_0x53ec25,_0x2785cc){_0x53ec25=_0x53ec25-0x0;var _0x2062e7=_0x5d6d[_0x53ec25];return _0x2062e7;};'use strict';var BPromise=require('bluebird');var jayson=require(_0xd5d6('0x0'));var client=jayson[_0xd5d6('0x1')][_0xd5d6('0x2')]({'port':0x232b});function request(_0x3df821,_0x49023f){return new BPromise(function(_0xf7f506,_0x5c8ca2){return client[_0xd5d6('0x3')](_0x3df821,_0x49023f)[_0xd5d6('0x4')](function(_0x2aeaf0){if(_0x2aeaf0[_0xd5d6('0x5')]){return _0x5c8ca2(_0x2aeaf0[_0xd5d6('0x5')][_0xd5d6('0x6')]);}else{return _0xf7f506(_0x2aeaf0[_0xd5d6('0x7')]);}})[_0xd5d6('0x8')](function(_0x4dea6d){return _0x5c8ca2(_0x4dea6d);});});}exports[_0xd5d6('0x9')]=function(_0x26e420,_0x4479bd){return request(_0xd5d6('0xa'),{'account':_0x26e420,'message':_0x4479bd});};
\ No newline at end of file
index 378c046..d0d4b65 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdad1=['getSquareProjects','catch','error','agicommand','retry','omit','hasOwnProperty','isArray','length','source','target','addEdge','value','toJson','mxGraphModel','root','inspect','start','debug','stringify','joinAt','format','YYYY-MM-DD\x20HH:mm:ss','mxCell','info','[START\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','arg_1','dnid','uniqueid','traverseBFS','vertex','gotoc\x20block\x20stop\x20traverse\x20BFS','context','extension','priority','code','result','response','isUndefined','toString','finally','[FINALLY\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','callerid','clear','stack','[END]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','calleridname','continueAt','Project\x20%s\x20not\x20found','close','Project\x20%s\x20not\x20published','exports','lodash','moment','xml2json','util','../../config/logger','agi','./rpc','./mailRpc','./graph','./vertices'];(function(_0x30d2cd,_0x4ec4d3){var _0x30a8fc=function(_0x1d7454){while(--_0x1d7454){_0x30d2cd['push'](_0x30d2cd['shift']());}};_0x30a8fc(++_0x4ec4d3);}(_0xdad1,0xb0));var _0x1dad=function(_0xd442ba,_0x59861e){_0xd442ba=_0xd442ba-0x0;var _0x4b4119=_0xdad1[_0xd442ba];return _0x4b4119;};'use strict';var _=require(_0x1dad('0x0'));var moment=require(_0x1dad('0x1'));var parser=require(_0x1dad('0x2'));var util=require(_0x1dad('0x3'));var logger=require(_0x1dad('0x4'))(_0x1dad('0x5'));var rpc=require(_0x1dad('0x6'));var mailRpc=require(_0x1dad('0x7'));var Graph=require(_0x1dad('0x8'));var Vertices=require(_0x1dad('0x9'));var AGI_CODE_SUCCESS=0xc8;var AGI_RESULT_ERROR=-0x1;function getAll(){return rpc[_0x1dad('0xa')]()[_0x1dad('0xb')](function(_0x33c626){logger[_0x1dad('0xc')]('Unable\x20to\x20download\x20CallySquare\x20projects',_0x33c626['stack']);return[];});}function addVertex(_0x441a5c,_0x1e93ee,_0x3390a9){_0x1e93ee[_0x1dad('0xd')]=_0x3390a9;if(_0x1e93ee['hasOwnProperty'](_0x1dad('0xe'))){_0x1e93ee['maxRetry']=parseInt(_0x1e93ee['retry'],0xa);}_0x441a5c['addVertex'](_[_0x1dad('0xf')](_0x1e93ee,'mxCell'));}function initGraph(_0x2132ef,_0x18006d){var _0x40d04b=new Graph();for(var _0x481124 in _0x2132ef){if(_0x2132ef[_0x1dad('0x10')](_0x481124)){if(_[_0x1dad('0x11')](_0x2132ef[_0x481124])){for(var _0x2cb1aa=0x0;_0x2cb1aa<_0x2132ef[_0x481124][_0x1dad('0x12')];_0x2cb1aa+=0x1){addVertex(_0x40d04b,_0x2132ef[_0x481124][_0x2cb1aa],_0x481124);}}else{addVertex(_0x40d04b,_0x2132ef[_0x481124],_0x481124);}}}for(var _0x262e62=0x0;_0x262e62<_0x18006d[_0x1dad('0x12')];_0x262e62+=0x1){if(_0x18006d[_0x262e62][_0x1dad('0x13')]&&_0x18006d[_0x262e62][_0x1dad('0x14')]){_0x40d04b[_0x1dad('0x15')](_0x18006d[_0x262e62][_0x1dad('0x13')],_0x18006d[_0x262e62][_0x1dad('0x14')],_0x18006d[_0x262e62][_0x1dad('0x16')]);}}return _0x40d04b;}function getRoot(_0x506155){return parser[_0x1dad('0x17')](_0x506155,{'object':!![]})[_0x1dad('0x18')][_0x1dad('0x19')];}function inspect(_0x55c885){return util[_0x1dad('0x1a')](_0x55c885,{'showHidden':![],'depth':null});}function initialize(_0xfaaf02,_0x4ba653){var _0x2df592=getRoot(_0xfaaf02['production']);if(!_0x2df592||!_0x2df592[_0x1dad('0x1b')])return;var _0x5dbc14,_0x4345fa,_0x4ee41b;logger[_0x1dad('0x1c')](_0x1dad('0x19'),JSON[_0x1dad('0x1d')](_0x2df592,null,0x2));_0x4ba653[_0x1dad('0x1e')]=moment()[_0x1dad('0x1f')](_0x1dad('0x20'));_0x5dbc14=initGraph(_[_0x1dad('0xf')](_0x2df592,'mxCell'),_0x2df592[_0x1dad('0x21')]);_0x4345fa=new Vertices(_0x4ba653,rpc,mailRpc);logger[_0x1dad('0x22')](util[_0x1dad('0x1f')](_0x1dad('0x23'),_0x4ba653[_0x1dad('0x24')],_0x4ba653['calleridname'],_0x4ba653['callerid'],_0x4ba653[_0x1dad('0x25')],_0x4ba653[_0x1dad('0x26')]));_0x5dbc14[_0x1dad('0x27')](_0x2df592[_0x1dad('0x1b')]['id'],function(_0x3981f4){try{_0x3981f4=_0x4345fa['clear'](_0x3981f4);logger[_0x1dad('0x1c')](_0x1dad('0x28'),JSON[_0x1dad('0x1d')](_0x3981f4,null,0x2));if(_0x3981f4[_0x1dad('0xd')]==='gotoc'){logger[_0x1dad('0x22')](_0x1dad('0x29'));_0x4ba653[_0x1dad('0x2a')]=_0x3981f4['context']||_0x4ba653[_0x1dad('0x2a')];_0x4ba653['extension']=_0x3981f4[_0x1dad('0x2b')];_0x4ba653[_0x1dad('0x2c')]=_0x3981f4[_0x1dad('0x2c')]?_0x3981f4[_0x1dad('0x2c')]-0x1:0x1;return null;}else if(_0x3981f4&&_0x4345fa[_0x3981f4[_0x1dad('0xd')]]){_0x4ee41b=_0x4345fa[_0x3981f4['agicommand']](_0x3981f4);logger[_0x1dad('0x22')]('response',JSON[_0x1dad('0x1d')](_0x4ee41b,null,0x2));if(_0x4ee41b&&_0x4ee41b[_0x1dad('0x2d')]===AGI_CODE_SUCCESS&&_0x4ee41b[_0x1dad('0x2e')]!==AGI_RESULT_ERROR&&!_0x4ba653['evtHangup']){logger['debug'](_0x1dad('0x2f'),inspect(_0x4ee41b));return _[_0x1dad('0x30')](_0x4ee41b[_0x1dad('0x2e')])?null:_0x4ee41b[_0x1dad('0x2e')][_0x1dad('0x31')]();}else{logger[_0x1dad('0xc')](_0x1dad('0x2f'),inspect(_0x4ee41b));return null;}}else{logger[_0x1dad('0xc')]('agicommand\x20not\x20found');return null;}}catch(_0x13b79f){logger[_0x1dad('0xc')](_0x13b79f['stack']);return null;}});if(_0x2df592[_0x1dad('0x32')]){logger[_0x1dad('0x22')](util[_0x1dad('0x1f')](_0x1dad('0x33'),_0x4ba653[_0x1dad('0x24')],_0x4ba653['calleridname'],_0x4ba653[_0x1dad('0x34')],_0x4ba653[_0x1dad('0x25')],_0x4ba653[_0x1dad('0x26')]));_0x5dbc14['traverseBFS'](_0x2df592['finally']['id'],function(_0x5de2ee){try{_0x5de2ee=_0x4345fa[_0x1dad('0x35')](_0x5de2ee);logger[_0x1dad('0x1c')](_0x1dad('0x28'),JSON[_0x1dad('0x1d')](_0x5de2ee,null,0x2));if(_0x5de2ee&&_0x4345fa[_0x5de2ee[_0x1dad('0xd')]]){_0x4ee41b=_0x4345fa[_0x5de2ee[_0x1dad('0xd')]](_0x5de2ee);if(_0x4ee41b){logger['debug'](_0x1dad('0x2f'),inspect(_0x4ee41b));return _[_0x1dad('0x30')](_0x4ee41b[_0x1dad('0x2e')])?null:_0x4ee41b[_0x1dad('0x2e')]['toString']();}else{logger[_0x1dad('0xc')]('response',inspect(_0x4ee41b));return null;}}else{logger[_0x1dad('0xc')]('agicommand\x20not\x20found');return null;}}catch(_0x4a3b09){logger['error'](_0x4a3b09[_0x1dad('0x36')]);return null;}});}logger[_0x1dad('0x22')](util[_0x1dad('0x1f')](_0x1dad('0x37'),_0x4ba653[_0x1dad('0x24')],_0x4ba653[_0x1dad('0x38')],_0x4ba653['callerid'],_0x4ba653[_0x1dad('0x25')],_0x4ba653[_0x1dad('0x26')]));logger['info'](util['format']('[GOTO]\x20context:\x20%s\x20extension:\x20%s\x20priority:\x20%s',_0x4ba653['context'],_0x4ba653['extension'],parseInt(_0x4ba653[_0x1dad('0x2c')],0xa)+0x1));_0x4ba653[_0x1dad('0x39')](_0x4ba653[_0x1dad('0x2a')],_0x4ba653[_0x1dad('0x2b')],parseInt(_0x4ba653[_0x1dad('0x2c')],0xa)+0x1);_0x4ba653['close']();}function handleNotFound(_0x5a73e0){logger[_0x1dad('0xc')](util[_0x1dad('0x1f')](_0x1dad('0x3a'),_0x5a73e0[_0x1dad('0x24')]));_0x5a73e0[_0x1dad('0x39')](_0x5a73e0[_0x1dad('0x2a')],_0x5a73e0[_0x1dad('0x2b')],parseInt(_0x5a73e0[_0x1dad('0x2c')],0xa)+0x1);_0x5a73e0[_0x1dad('0x3b')]();}function handleUnpublished(_0x42e3dd){logger['error'](util[_0x1dad('0x1f')](_0x1dad('0x3c'),_0x42e3dd[_0x1dad('0x24')]));_0x42e3dd['continueAt'](_0x42e3dd['context'],_0x42e3dd[_0x1dad('0x2b')],parseInt(_0x42e3dd['priority'],0xa)+0x1);_0x42e3dd[_0x1dad('0x3b')]();}module[_0x1dad('0x3d')]={'getAll':getAll,'handleNotFound':handleNotFound,'handleUnpublished':handleUnpublished,'initialize':initialize};
\ No newline at end of file
+var _0x4e88=['getSquareProjects','catch','Unable\x20to\x20download\x20CallySquare\x20projects','stack','agicommand','hasOwnProperty','maxRetry','retry','addVertex','omit','mxCell','isArray','source','target','value','toJson','mxGraphModel','root','inspect','production','start','debug','stringify','format','YYYY-MM-DD\x20HH:mm:ss','info','calleridname','dnid','uniqueid','traverseBFS','clear','vertex','gotoc','context','extension','priority','response','code','result','evtHangup','isUndefined','toString','error','finally','[FINALLY\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s','callerid','agicommand\x20not\x20found','arg_1','[GOTO]\x20context:\x20%s\x20extension:\x20%s\x20priority:\x20%s','continueAt','close','Project\x20%s\x20not\x20found','Project\x20%s\x20not\x20published','exports','lodash','moment','util','../../config/logger','agi','./rpc','./mailRpc','./graph','./vertices'];(function(_0x35bd6c,_0x585087){var _0x2f421d=function(_0x42ae70){while(--_0x42ae70){_0x35bd6c['push'](_0x35bd6c['shift']());}};_0x2f421d(++_0x585087);}(_0x4e88,0xf3));var _0x84e8=function(_0x53fcbe,_0x4c8a79){_0x53fcbe=_0x53fcbe-0x0;var _0x59f1fb=_0x4e88[_0x53fcbe];return _0x59f1fb;};'use strict';var _=require(_0x84e8('0x0'));var moment=require(_0x84e8('0x1'));var parser=require('xml2json');var util=require(_0x84e8('0x2'));var logger=require(_0x84e8('0x3'))(_0x84e8('0x4'));var rpc=require(_0x84e8('0x5'));var mailRpc=require(_0x84e8('0x6'));var Graph=require(_0x84e8('0x7'));var Vertices=require(_0x84e8('0x8'));var AGI_CODE_SUCCESS=0xc8;var AGI_RESULT_ERROR=-0x1;function getAll(){return rpc[_0x84e8('0x9')]()[_0x84e8('0xa')](function(_0x58e4c6){logger['error'](_0x84e8('0xb'),_0x58e4c6[_0x84e8('0xc')]);return[];});}function addVertex(_0x4c2803,_0x10d588,_0x5314a7){_0x10d588[_0x84e8('0xd')]=_0x5314a7;if(_0x10d588[_0x84e8('0xe')]('retry')){_0x10d588[_0x84e8('0xf')]=parseInt(_0x10d588[_0x84e8('0x10')],0xa);}_0x4c2803[_0x84e8('0x11')](_[_0x84e8('0x12')](_0x10d588,_0x84e8('0x13')));}function initGraph(_0x2c5186,_0xfcc0f9){var _0x254bed=new Graph();for(var _0x5158e3 in _0x2c5186){if(_0x2c5186[_0x84e8('0xe')](_0x5158e3)){if(_[_0x84e8('0x14')](_0x2c5186[_0x5158e3])){for(var _0x2b4ac9=0x0;_0x2b4ac9<_0x2c5186[_0x5158e3]['length'];_0x2b4ac9+=0x1){addVertex(_0x254bed,_0x2c5186[_0x5158e3][_0x2b4ac9],_0x5158e3);}}else{addVertex(_0x254bed,_0x2c5186[_0x5158e3],_0x5158e3);}}}for(var _0x32cf70=0x0;_0x32cf70<_0xfcc0f9['length'];_0x32cf70+=0x1){if(_0xfcc0f9[_0x32cf70][_0x84e8('0x15')]&&_0xfcc0f9[_0x32cf70][_0x84e8('0x16')]){_0x254bed['addEdge'](_0xfcc0f9[_0x32cf70]['source'],_0xfcc0f9[_0x32cf70]['target'],_0xfcc0f9[_0x32cf70][_0x84e8('0x17')]);}}return _0x254bed;}function getRoot(_0x1cfa56){return parser[_0x84e8('0x18')](_0x1cfa56,{'object':!![]})[_0x84e8('0x19')][_0x84e8('0x1a')];}function inspect(_0x5ea5ac){return util[_0x84e8('0x1b')](_0x5ea5ac,{'showHidden':![],'depth':null});}function initialize(_0x101078,_0x546697){var _0x3c8a18=getRoot(_0x101078[_0x84e8('0x1c')]);if(!_0x3c8a18||!_0x3c8a18[_0x84e8('0x1d')])return;var _0x426bf9,_0x31f316,_0x30368e;logger[_0x84e8('0x1e')](_0x84e8('0x1a'),JSON[_0x84e8('0x1f')](_0x3c8a18,null,0x2));_0x546697['joinAt']=moment()[_0x84e8('0x20')](_0x84e8('0x21'));_0x426bf9=initGraph(_['omit'](_0x3c8a18,_0x84e8('0x13')),_0x3c8a18[_0x84e8('0x13')]);_0x31f316=new Vertices(_0x546697,rpc,mailRpc);logger[_0x84e8('0x22')](util[_0x84e8('0x20')]('[START\x20TRAVERSE]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',_0x546697['arg_1'],_0x546697[_0x84e8('0x23')],_0x546697['callerid'],_0x546697[_0x84e8('0x24')],_0x546697[_0x84e8('0x25')]));_0x426bf9[_0x84e8('0x26')](_0x3c8a18[_0x84e8('0x1d')]['id'],function(_0x5ab695){try{_0x5ab695=_0x31f316[_0x84e8('0x27')](_0x5ab695);logger['debug'](_0x84e8('0x28'),JSON[_0x84e8('0x1f')](_0x5ab695,null,0x2));if(_0x5ab695[_0x84e8('0xd')]===_0x84e8('0x29')){logger['info']('gotoc\x20block\x20stop\x20traverse\x20BFS');_0x546697[_0x84e8('0x2a')]=_0x5ab695[_0x84e8('0x2a')]||_0x546697[_0x84e8('0x2a')];_0x546697[_0x84e8('0x2b')]=_0x5ab695[_0x84e8('0x2b')];_0x546697[_0x84e8('0x2c')]=_0x5ab695[_0x84e8('0x2c')]?_0x5ab695[_0x84e8('0x2c')]-0x1:0x1;return null;}else if(_0x5ab695&&_0x31f316[_0x5ab695[_0x84e8('0xd')]]){_0x30368e=_0x31f316[_0x5ab695[_0x84e8('0xd')]](_0x5ab695);logger[_0x84e8('0x22')](_0x84e8('0x2d'),JSON['stringify'](_0x30368e,null,0x2));if(_0x30368e&&_0x30368e[_0x84e8('0x2e')]===AGI_CODE_SUCCESS&&_0x30368e[_0x84e8('0x2f')]!==AGI_RESULT_ERROR&&!_0x546697[_0x84e8('0x30')]){logger[_0x84e8('0x1e')]('response',inspect(_0x30368e));return _[_0x84e8('0x31')](_0x30368e[_0x84e8('0x2f')])?null:_0x30368e['result'][_0x84e8('0x32')]();}else{logger['error'](_0x84e8('0x2d'),inspect(_0x30368e));return null;}}else{logger[_0x84e8('0x33')]('agicommand\x20not\x20found');return null;}}catch(_0x520624){logger[_0x84e8('0x33')](_0x520624[_0x84e8('0xc')]);return null;}});if(_0x3c8a18[_0x84e8('0x34')]){logger[_0x84e8('0x22')](util[_0x84e8('0x20')](_0x84e8('0x35'),_0x546697['arg_1'],_0x546697['calleridname'],_0x546697[_0x84e8('0x36')],_0x546697[_0x84e8('0x24')],_0x546697['uniqueid']));_0x426bf9[_0x84e8('0x26')](_0x3c8a18[_0x84e8('0x34')]['id'],function(_0xfa2d39){try{_0xfa2d39=_0x31f316[_0x84e8('0x27')](_0xfa2d39);logger[_0x84e8('0x1e')](_0x84e8('0x28'),JSON[_0x84e8('0x1f')](_0xfa2d39,null,0x2));if(_0xfa2d39&&_0x31f316[_0xfa2d39[_0x84e8('0xd')]]){_0x30368e=_0x31f316[_0xfa2d39[_0x84e8('0xd')]](_0xfa2d39);if(_0x30368e){logger['debug']('response',inspect(_0x30368e));return _[_0x84e8('0x31')](_0x30368e[_0x84e8('0x2f')])?null:_0x30368e['result']['toString']();}else{logger[_0x84e8('0x33')]('response',inspect(_0x30368e));return null;}}else{logger[_0x84e8('0x33')](_0x84e8('0x37'));return null;}}catch(_0x5ecae){logger['error'](_0x5ecae[_0x84e8('0xc')]);return null;}});}logger[_0x84e8('0x22')](util[_0x84e8('0x20')]('[END]\x20%s\x20project:\x20from\x20\x22%s\x22\x20<%s>\x20to\x20extension\x20%s\x20with\x20uniqueid\x20%s',_0x546697[_0x84e8('0x38')],_0x546697[_0x84e8('0x23')],_0x546697[_0x84e8('0x36')],_0x546697[_0x84e8('0x24')],_0x546697[_0x84e8('0x25')]));logger[_0x84e8('0x22')](util['format'](_0x84e8('0x39'),_0x546697['context'],_0x546697[_0x84e8('0x2b')],parseInt(_0x546697[_0x84e8('0x2c')],0xa)+0x1));_0x546697[_0x84e8('0x3a')](_0x546697[_0x84e8('0x2a')],_0x546697[_0x84e8('0x2b')],parseInt(_0x546697['priority'],0xa)+0x1);_0x546697[_0x84e8('0x3b')]();}function handleNotFound(_0x57b3c4){logger[_0x84e8('0x33')](util[_0x84e8('0x20')](_0x84e8('0x3c'),_0x57b3c4[_0x84e8('0x38')]));_0x57b3c4['continueAt'](_0x57b3c4['context'],_0x57b3c4[_0x84e8('0x2b')],parseInt(_0x57b3c4[_0x84e8('0x2c')],0xa)+0x1);_0x57b3c4[_0x84e8('0x3b')]();}function handleUnpublished(_0x157af6){logger['error'](util[_0x84e8('0x20')](_0x84e8('0x3d'),_0x157af6[_0x84e8('0x38')]));_0x157af6['continueAt'](_0x157af6[_0x84e8('0x2a')],_0x157af6[_0x84e8('0x2b')],parseInt(_0x157af6[_0x84e8('0x2c')],0xa)+0x1);_0x157af6[_0x84e8('0x3b')]();}module[_0x84e8('0x3e')]={'getAll':getAll,'handleNotFound':handleNotFound,'handleUnpublished':handleUnpublished,'initialize':initialize};
\ No newline at end of file
index dd5cec5..6dfefbd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4cff=['emit','headers','line','exports','util','Transform','_localBuffer','_inBody','inherits','prototype','_transform','\x0d\x0a\x0d\x0a','toString','indexOf','substring','slice','trim','length'];(function(_0x27611e,_0x3d5ca7){var _0x36fb5b=function(_0x451530){while(--_0x451530){_0x27611e['push'](_0x27611e['shift']());}};_0x36fb5b(++_0x3d5ca7);}(_0x4cff,0xb8));var _0xf4cf=function(_0x2800da,_0x23a811){_0x2800da=_0x2800da-0x0;var _0x3e6020=_0x4cff[_0x2800da];return _0x3e6020;};'use strict';var util=require(_0xf4cf('0x0'));var Transform=require('stream')[_0xf4cf('0x1')];function AGIReply(_0x2d7d60){Transform['call'](this,_0x2d7d60);this[_0xf4cf('0x2')]='';this[_0xf4cf('0x3')]=![];}util[_0xf4cf('0x4')](AGIReply,Transform);AGIReply[_0xf4cf('0x5')][_0xf4cf('0x6')]=function(_0x17a4aa,_0x474633,_0x13ffb4){var _0x3f43ae='\x0a',_0x2e4beb=['\x0a\x0a',_0xf4cf('0x7')],_0x2a2856=-0x1,_0x37a097=-0x1,_0x2bd4e9='',_0x259956=0x0,_0x2a255c='',_0x389590='';this[_0xf4cf('0x2')]+=_0x17a4aa[_0xf4cf('0x8')]();_0x2a255c=this['_localBuffer'];if(!this[_0xf4cf('0x3')]){_0x259956=0x0;while(_0x2e4beb[_0x259956]){while((_0x37a097=_0x2a255c[_0xf4cf('0x9')](_0x2e4beb[_0x259956]))!=-0x1){_0x2bd4e9=_0x2e4beb[_0x259956];_0x389590=_0x2a255c['substring'](0x0,_0x37a097);_0x2a255c=_0x2a255c[_0xf4cf('0xa')](_0x37a097+_0x2bd4e9['length']);var _0x12da27=_0x389590['split'](_0x3f43ae),_0x4dbf1a=0x0,_0x5505ac={},_0x26a6de='',_0x49ffb9='',_0x57c6db=-0x1;while(_0x12da27[_0x4dbf1a]){_0x57c6db=_0x12da27[_0x4dbf1a][_0xf4cf('0x9')](':');if(_0x57c6db!=-0x1){_0x26a6de=_0x12da27[_0x4dbf1a][_0xf4cf('0xb')](0x0,_0x57c6db)['trim']();_0x49ffb9=_0x12da27[_0x4dbf1a][_0xf4cf('0xb')](_0x57c6db+0x1)[_0xf4cf('0xc')]();if(_0x26a6de[_0xf4cf('0xd')]>0x0){_0x5505ac[_0x26a6de]=_0x49ffb9;}}else{}_0x4dbf1a++;}this[_0xf4cf('0xe')](_0xf4cf('0xf'),_0x5505ac);this['_inBody']=!![];}_0x259956++;}this[_0xf4cf('0x2')]=_0x2a255c;}else{while((_0x2a2856=_0x2a255c[_0xf4cf('0x9')](_0x3f43ae))!=-0x1){_0x389590=_0x2a255c['substring'](0x0,_0x2a2856);this[_0xf4cf('0xe')](_0xf4cf('0x10'),_0x389590);_0x2a255c=_0x2a255c[_0xf4cf('0xa')](_0x2a2856+_0x3f43ae[_0xf4cf('0xd')]);}this[_0xf4cf('0x2')]=_0x2a255c;}_0x13ffb4();};module[_0xf4cf('0x11')]=AGIReply;
\ No newline at end of file
+var _0xeaa2=['call','_localBuffer','_inBody','inherits','prototype','_transform','\x0d\x0a\x0d\x0a','substring','length','split','indexOf','slice','trim','emit','headers','line','exports','util','stream','Transform'];(function(_0x2df833,_0x5d6f55){var _0xc9e205=function(_0x5411c1){while(--_0x5411c1){_0x2df833['push'](_0x2df833['shift']());}};_0xc9e205(++_0x5d6f55);}(_0xeaa2,0x115));var _0x2eaa=function(_0x487131,_0x2c86e8){_0x487131=_0x487131-0x0;var _0xf320ff=_0xeaa2[_0x487131];return _0xf320ff;};'use strict';var util=require(_0x2eaa('0x0'));var Transform=require(_0x2eaa('0x1'))[_0x2eaa('0x2')];function AGIReply(_0x46cc49){Transform[_0x2eaa('0x3')](this,_0x46cc49);this[_0x2eaa('0x4')]='';this[_0x2eaa('0x5')]=![];}util[_0x2eaa('0x6')](AGIReply,Transform);AGIReply[_0x2eaa('0x7')][_0x2eaa('0x8')]=function(_0x496f14,_0x5e1e95,_0x4f4004){var _0x3d3a7d='\x0a',_0x438f18=['\x0a\x0a',_0x2eaa('0x9')],_0x334f5c=-0x1,_0x44e787=-0x1,_0x276303='',_0x2af64b=0x0,_0xa70c8='',_0xf4ae60='';this[_0x2eaa('0x4')]+=_0x496f14['toString']();_0xa70c8=this[_0x2eaa('0x4')];if(!this[_0x2eaa('0x5')]){_0x2af64b=0x0;while(_0x438f18[_0x2af64b]){while((_0x44e787=_0xa70c8['indexOf'](_0x438f18[_0x2af64b]))!=-0x1){_0x276303=_0x438f18[_0x2af64b];_0xf4ae60=_0xa70c8[_0x2eaa('0xa')](0x0,_0x44e787);_0xa70c8=_0xa70c8['substring'](_0x44e787+_0x276303[_0x2eaa('0xb')]);var _0x43ba2a=_0xf4ae60[_0x2eaa('0xc')](_0x3d3a7d),_0x3d2326=0x0,_0x551f6b={},_0x350bc6='',_0x3a1c38='',_0x41bfbe=-0x1;while(_0x43ba2a[_0x3d2326]){_0x41bfbe=_0x43ba2a[_0x3d2326][_0x2eaa('0xd')](':');if(_0x41bfbe!=-0x1){_0x350bc6=_0x43ba2a[_0x3d2326][_0x2eaa('0xe')](0x0,_0x41bfbe)[_0x2eaa('0xf')]();_0x3a1c38=_0x43ba2a[_0x3d2326][_0x2eaa('0xe')](_0x41bfbe+0x1)[_0x2eaa('0xf')]();if(_0x350bc6[_0x2eaa('0xb')]>0x0){_0x551f6b[_0x350bc6]=_0x3a1c38;}}else{}_0x3d2326++;}this[_0x2eaa('0x10')](_0x2eaa('0x11'),_0x551f6b);this[_0x2eaa('0x5')]=!![];}_0x2af64b++;}this[_0x2eaa('0x4')]=_0xa70c8;}else{while((_0x334f5c=_0xa70c8['indexOf'](_0x3d3a7d))!=-0x1){_0xf4ae60=_0xa70c8[_0x2eaa('0xa')](0x0,_0x334f5c);this[_0x2eaa('0x10')](_0x2eaa('0x12'),_0xf4ae60);_0xa70c8=_0xa70c8[_0x2eaa('0xa')](_0x334f5c+_0x3d3a7d[_0x2eaa('0xb')]);}this[_0x2eaa('0x4')]=_0xa70c8;}_0x4f4004();};module[_0x2eaa('0x13')]=AGIReply;
\ No newline at end of file
index b6ee600..e5e51d1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x782e=['createSquareRecording','createSquareMessage','CreateSquareMessage','ShowCmHopper','getPauseById','ShowPause','agentLogin','LoginUser','agentPause','PauseUser','agentUnpause','UnpauseUser','agentLogout','LogoutUser','jayson/promise','client','request','then','error','catch','getSquareProjects','GetSquareProjects','name','production','getSquareProject','ShowSquareProject','getMailAccountById','ShowMailAccount','MailServerOut','Smtp','CloudProvider','getSquareProjectById','getVoiceQueueById','ShowVariable','getSquareOdbcById','ShowSquareOdbc','dsn','getUserById','ShowUser','getContactByPhone','GetContactByPhone','phone','ShowTrunk','save_name','ShowInterval','Interval','getSmsAccountById','ShowSmsAccount','createSquareDetailsReport','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','merge','arg_1','arg_2','format','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x12cd38,_0x5dc026){var _0x35403f=function(_0x5afbd5){while(--_0x5afbd5){_0x12cd38['push'](_0x12cd38['shift']());}};_0x35403f(++_0x5dc026);}(_0x782e,0xb9));var _0xe782=function(_0x2d8a57,_0x3cd6df){_0x2d8a57=_0x2d8a57-0x0;var _0x5883ba=_0x782e[_0x2d8a57];return _0x5883ba;};'use strict';var _=require('lodash');var moment=require('moment');var jayson=require(_0xe782('0x0'));var client=jayson[_0xe782('0x1')]['http']({'port':0x2329});function request(_0x18c841,_0xe1b6db){return new Promise(function(_0x59020b,_0x26f960){return client[_0xe782('0x2')](_0x18c841,_0xe1b6db)[_0xe782('0x3')](function(_0x342a79){if(_0x342a79['error']){return _0x26f960(_0x342a79[_0xe782('0x4')]['message']);}else{return _0x59020b(_0x342a79['result']);}})[_0xe782('0x5')](function(_0x4c6dd1){return _0x26f960(_0x4c6dd1);});});}exports[_0xe782('0x6')]=function(){return request(_0xe782('0x7'),{'options':{'raw':![],'attributes':['id',_0xe782('0x8'),_0xe782('0x9')]}});};exports[_0xe782('0xa')]=function(_0x28dd87){return request(_0xe782('0xb'),{'options':{'raw':![],'where':{'name':_0x28dd87},'attributes':[_0xe782('0x9')]}});};exports[_0xe782('0xc')]=function(_0xec300d){return request(_0xe782('0xd'),{'options':{'raw':![],'where':{'id':_0xec300d},'include':[{'model':_0xe782('0xe'),'as':_0xe782('0xf'),'include':[{'model':_0xe782('0x10'),'as':'CloudProvider'}]}],'attributes':['id',_0xe782('0x8'),'email'],'smtp':!![]}});};exports[_0xe782('0x11')]=function(_0x356c18){return request(_0xe782('0xb'),{'options':{'where':{'id':_0x356c18},'attributes':[_0xe782('0x8')]}});};exports[_0xe782('0x12')]=function(_0xd57d73){return request('ShowVoiceQueue',{'options':{'where':{'id':_0xd57d73},'attributes':['name']}});};exports['getVariableById']=function(_0x15d85b){return request(_0xe782('0x13'),{'options':{'where':{'id':_0x15d85b},'attributes':['name']}});};exports[_0xe782('0x14')]=function(_0x35170a){return request(_0xe782('0x15'),{'options':{'where':{'id':_0x35170a},'attributes':[_0xe782('0x16')]}});};exports[_0xe782('0x17')]=function(_0x35fef7){return request(_0xe782('0x18'),{'options':{'where':{'id':_0x35fef7},'attributes':[_0xe782('0x8')]}});};exports[_0xe782('0x19')]=function(_0xeaf07c){return request(_0xe782('0x1a'),{'options':{'where':{'phone':_0xeaf07c[_0xe782('0x1b')]},'attributes':['id']}});};exports['getTrunkById']=function(_0xf1b118){return request(_0xe782('0x1c'),{'options':{'where':{'id':_0xf1b118},'attributes':[_0xe782('0x8')]}});};exports['getSoundById']=function(_0xa469c6){return request('ShowSound',{'options':{'where':{'id':_0xa469c6},'attributes':[_0xe782('0x1d')]}});};exports['getIntervalById']=function(_0x3f8684){return request(_0xe782('0x1e'),{'options':{'raw':![],'where':{'id':_0x3f8684},'include':[{'model':_0xe782('0x1f'),'as':'Intervals'}]}});};exports[_0xe782('0x20')]=function(_0x2f9335){return request(_0xe782('0x21'),{'options':{'where':{'id':_0x2f9335},'attributes':['id',_0xe782('0x8')]}});};exports['createSmsMessage']=function(_0x657761){return request('CreateSmsMessage',{'body':_0x657761});};exports[_0xe782('0x22')]=function(_0x2331c8){return request(_0xe782('0x23'),{'body':_0x2331c8});};exports[_0xe782('0x24')]=function(_0x382c9c){return request(_0xe782('0x25'),{'body':_[_0xe782('0x26')](_0x382c9c,{'project_name':_0x382c9c[_0xe782('0x27')],'prev_project_name':_0x382c9c[_0xe782('0x28')]||'','is_subproject':_0x382c9c[_0xe782('0x28')]?!![]:![],'leaveAt':moment()[_0xe782('0x29')](_0xe782('0x2a'))})});};exports[_0xe782('0x2b')]=function(_0x2502e9){return request('CreateSquareRecording',{'body':_0x2502e9});};exports[_0xe782('0x2c')]=function(_0x359745){return request(_0xe782('0x2d'),{'body':_0x359745});};exports['createCmContact']=function(_0x49073f){return request(_0xe782('0x2e'),{'options':{'raw':![],'where':{'phone':_0x49073f['phone'],'ListId':_0x49073f['ListId']}}})[_0xe782('0x3')](function(_0x3e9125){if(_0x3e9125){return _0x3e9125;}return request('CreateCmContact',{'body':_0x49073f});});};exports[_0xe782('0x2f')]=function(_0x14bf9c){return request(_0xe782('0x30'),{'options':{'where':{'id':_0x14bf9c},'attributes':[_0xe782('0x8')]}});};exports[_0xe782('0x31')]=function(_0x3d9b57,_0xfa2d2f){return request(_0xe782('0x32'),{'body':{'interface':_0xfa2d2f},'options':{'where':_0x3d9b57}});};exports[_0xe782('0x33')]=function(_0x18f608,_0x453614,_0x422b7b){return request(_0xe782('0x34'),{'body':{'type':_0x453614,'uniqueid':_0x422b7b},'options':{'where':_0x18f608}});};exports[_0xe782('0x35')]=function(_0xa21026){return request(_0xe782('0x36'),{'body':{},'options':{'where':_0xa21026}});};exports[_0xe782('0x37')]=function(_0x36bada){return request(_0xe782('0x38'),{'body':{},'options':{'where':_0x36bada}});};
\ No newline at end of file
+var _0xd737=['createSquareMessage','CreateSquareMessage','ShowCmHopper','ListId','then','CreateCmContact','getPauseById','ShowPause','agentLogin','LoginUser','PauseUser','agentUnpause','UnpauseUser','agentLogout','LogoutUser','lodash','jayson/promise','http','request','error','message','result','catch','getSquareProjects','GetSquareProjects','getSquareProject','production','ShowMailAccount','MailServerOut','CloudProvider','email','getSquareProjectById','ShowSquareProject','getVoiceQueueById','name','getVariableById','getSquareOdbcById','ShowSquareOdbc','dsn','getUserById','GetContactByPhone','phone','getTrunkById','getSoundById','ShowSound','save_name','ShowInterval','Interval','Intervals','getSmsAccountById','ShowSmsAccount','createSquareDetailsReport','CreateSquareDetailsReport','createSquareReport','CreateSquareReport','arg_1','format','createSquareRecording','CreateSquareRecording'];(function(_0x5a342c,_0x25721b){var _0x3c381b=function(_0x45d48e){while(--_0x45d48e){_0x5a342c['push'](_0x5a342c['shift']());}};_0x3c381b(++_0x25721b);}(_0xd737,0x85));var _0x7d73=function(_0xda6d0f,_0x35e271){_0xda6d0f=_0xda6d0f-0x0;var _0x244540=_0xd737[_0xda6d0f];return _0x244540;};'use strict';var _=require(_0x7d73('0x0'));var moment=require('moment');var jayson=require(_0x7d73('0x1'));var client=jayson['client'][_0x7d73('0x2')]({'port':0x2329});function request(_0x26854a,_0x2bd982){return new Promise(function(_0x5cfa01,_0x5369be){return client[_0x7d73('0x3')](_0x26854a,_0x2bd982)['then'](function(_0x5c4a2c){if(_0x5c4a2c[_0x7d73('0x4')]){return _0x5369be(_0x5c4a2c[_0x7d73('0x4')][_0x7d73('0x5')]);}else{return _0x5cfa01(_0x5c4a2c[_0x7d73('0x6')]);}})[_0x7d73('0x7')](function(_0x4552e3){return _0x5369be(_0x4552e3);});});}exports[_0x7d73('0x8')]=function(){return request(_0x7d73('0x9'),{'options':{'raw':![],'attributes':['id','name','production']}});};exports[_0x7d73('0xa')]=function(_0x3252fc){return request('ShowSquareProject',{'options':{'raw':![],'where':{'name':_0x3252fc},'attributes':[_0x7d73('0xb')]}});};exports['getMailAccountById']=function(_0x34704b){return request(_0x7d73('0xc'),{'options':{'raw':![],'where':{'id':_0x34704b},'include':[{'model':_0x7d73('0xd'),'as':'Smtp','include':[{'model':_0x7d73('0xe'),'as':_0x7d73('0xe')}]}],'attributes':['id','name',_0x7d73('0xf')],'smtp':!![]}});};exports[_0x7d73('0x10')]=function(_0x53fffe){return request(_0x7d73('0x11'),{'options':{'where':{'id':_0x53fffe},'attributes':['name']}});};exports[_0x7d73('0x12')]=function(_0x499223){return request('ShowVoiceQueue',{'options':{'where':{'id':_0x499223},'attributes':[_0x7d73('0x13')]}});};exports[_0x7d73('0x14')]=function(_0x157009){return request('ShowVariable',{'options':{'where':{'id':_0x157009},'attributes':[_0x7d73('0x13')]}});};exports[_0x7d73('0x15')]=function(_0x434c52){return request(_0x7d73('0x16'),{'options':{'where':{'id':_0x434c52},'attributes':[_0x7d73('0x17')]}});};exports[_0x7d73('0x18')]=function(_0x146b1f){return request('ShowUser',{'options':{'where':{'id':_0x146b1f},'attributes':[_0x7d73('0x13')]}});};exports['getContactByPhone']=function(_0x50ec8a){return request(_0x7d73('0x19'),{'options':{'where':{'phone':_0x50ec8a[_0x7d73('0x1a')]},'attributes':['id']}});};exports[_0x7d73('0x1b')]=function(_0x4528dd){return request('ShowTrunk',{'options':{'where':{'id':_0x4528dd},'attributes':['name']}});};exports[_0x7d73('0x1c')]=function(_0x159a94){return request(_0x7d73('0x1d'),{'options':{'where':{'id':_0x159a94},'attributes':[_0x7d73('0x1e')]}});};exports['getIntervalById']=function(_0x443245){return request(_0x7d73('0x1f'),{'options':{'raw':![],'where':{'id':_0x443245},'include':[{'model':_0x7d73('0x20'),'as':_0x7d73('0x21')}]}});};exports[_0x7d73('0x22')]=function(_0xe9cbe6){return request(_0x7d73('0x23'),{'options':{'where':{'id':_0xe9cbe6},'attributes':['id','name']}});};exports['createSmsMessage']=function(_0x434a17){return request('CreateSmsMessage',{'body':_0x434a17});};exports[_0x7d73('0x24')]=function(_0x4db524){return request(_0x7d73('0x25'),{'body':_0x4db524});};exports[_0x7d73('0x26')]=function(_0x417bc3){return request(_0x7d73('0x27'),{'body':_['merge'](_0x417bc3,{'project_name':_0x417bc3[_0x7d73('0x28')],'prev_project_name':_0x417bc3['arg_2']||'','is_subproject':_0x417bc3['arg_2']?!![]:![],'leaveAt':moment()[_0x7d73('0x29')]('YYYY-MM-DD\x20HH:mm:ss')})});};exports[_0x7d73('0x2a')]=function(_0xe43c38){return request(_0x7d73('0x2b'),{'body':_0xe43c38});};exports[_0x7d73('0x2c')]=function(_0x528754){return request(_0x7d73('0x2d'),{'body':_0x528754});};exports['createCmContact']=function(_0x4e37b2){return request(_0x7d73('0x2e'),{'options':{'raw':![],'where':{'phone':_0x4e37b2[_0x7d73('0x1a')],'ListId':_0x4e37b2[_0x7d73('0x2f')]}}})[_0x7d73('0x30')](function(_0x34273d){if(_0x34273d){return _0x34273d;}return request(_0x7d73('0x31'),{'body':_0x4e37b2});});};exports[_0x7d73('0x32')]=function(_0x307195){return request(_0x7d73('0x33'),{'options':{'where':{'id':_0x307195},'attributes':[_0x7d73('0x13')]}});};exports[_0x7d73('0x34')]=function(_0xceb5a2,_0xb1df53){return request(_0x7d73('0x35'),{'body':{'interface':_0xb1df53},'options':{'where':_0xceb5a2}});};exports['agentPause']=function(_0xb31fc0,_0x49f008,_0x141fb5){return request(_0x7d73('0x36'),{'body':{'type':_0x49f008,'uniqueid':_0x141fb5},'options':{'where':_0xb31fc0}});};exports[_0x7d73('0x37')]=function(_0x21a8ce){return request(_0x7d73('0x38'),{'body':{},'options':{'where':_0x21a8ce}});};exports[_0x7d73('0x39')]=function(_0x49e386){return request(_0x7d73('0x3a'),{'body':{},'options':{'where':_0x49e386}});};
\ No newline at end of file
index 6084715..3a71b7d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9303=['./polly'];(function(_0x5bd953,_0x307788){var _0x4ac021=function(_0x31a3ba){while(--_0x31a3ba){_0x5bd953['push'](_0x5bd953['shift']());}};_0x4ac021(++_0x307788);}(_0x9303,0xd7));var _0x3930=function(_0x31f23f,_0x421862){_0x31f23f=_0x31f23f-0x0;var _0x572b25=_0x9303[_0x31f23f];return _0x572b25;};var polly=require(_0x3930('0x0'));var lex=require('./lex');module['exports']={'polly':polly,'lex':lex};
\ No newline at end of file
+var _0xaf0d=['exports','./lex'];(function(_0x33cabe,_0x150132){var _0x2f0b7d=function(_0x3be430){while(--_0x3be430){_0x33cabe['push'](_0x33cabe['shift']());}};_0x2f0b7d(++_0x150132);}(_0xaf0d,0x6d));var _0xdaf0=function(_0x4b11ec,_0x519e16){_0x4b11ec=_0x4b11ec-0x0;var _0x253696=_0xaf0d[_0x4b11ec];return _0x253696;};var polly=require('./polly');var lex=require(_0xdaf0('0x0'));module[_0xdaf0('0x1')]={'polly':polly,'lex':lex};
\ No newline at end of file
index 1a8a92f..a9ec881 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-'use strict';var lex=require('./lib/api');module['exports']=function(_0x46400f,_0xa5f6b7,_0x4a08d4,_0x5080f5,_0x229028,_0x1fdf5b){return lex(_0x46400f,_0xa5f6b7,_0x4a08d4,_0x5080f5,_0x229028,_0x1fdf5b);};
\ No newline at end of file
+'use strict';var lex=require('./lib/api');module['exports']=function(_0x2c1d27,_0x4c4c00,_0x4b5765,_0x29e4c8,_0x110824,_0x394a1e){return lex(_0x2c1d27,_0x4c4c00,_0x4b5765,_0x29e4c8,_0x110824,_0x394a1e);};
\ No newline at end of file
index cfd195c..3380260 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['LexRuntime','bluebird','aws-sdk','slots','hasOwnProperty'];(function(_0x56efe3,_0x4f0421){var _0x512607=function(_0x58ff56){while(--_0x58ff56){_0x56efe3['push'](_0x56efe3['shift']());}};_0x512607(++_0x4f0421);}(_0xa9e0,0x123));var _0x0a9e=function(_0x9df060,_0x253d33){_0x9df060=_0x9df060-0x0;var _0x338dfe=_0xa9e0[_0x9df060];return _0x338dfe;};'use strict';var BPromise=require(_0x0a9e('0x0'));var AWS=require(_0x0a9e('0x1'));function lexResult(_0x29929c,_0x5dd881){return new BPromise(function(_0x550fbc,_0x18d5c9){_0x29929c['postText'](_0x5dd881,function(_0x333808,_0x432180){if(_0x333808){_0x18d5c9(_0x333808);}if(_0x432180[_0x0a9e('0x2')]){for(const _0x991246 in _0x432180[_0x0a9e('0x2')]){if(_0x432180['slots'][_0x0a9e('0x3')](_0x991246)){var _0x441e3a=_0x432180[_0x0a9e('0x2')][_0x991246];_0x432180['slot_'+_0x991246]=_0x441e3a;}}}_0x550fbc(_0x432180);});});}module['exports']=function(_0xe42b77,_0x56465b,_0x52cace,_0x39753a,_0xf81284,_0x307b3e){var _0x3ab53f=new AWS[(_0x0a9e('0x4'))]({'accessKeyId':_0x56465b,'secretAccessKey':_0x52cace,'region':_0x39753a});var _0xbd1168={'botAlias':'$LATEST','botName':_0x307b3e,'inputText':_0xf81284,'userId':_0xe42b77};return lexResult(_0x3ab53f,_0xbd1168);};
\ No newline at end of file
+var _0xa9e0=['LexRuntime','bluebird','aws-sdk','slots','hasOwnProperty'];(function(_0x4be984,_0x52a9de){var _0x42b9a1=function(_0x5b9fc2){while(--_0x5b9fc2){_0x4be984['push'](_0x4be984['shift']());}};_0x42b9a1(++_0x52a9de);}(_0xa9e0,0x123));var _0x0a9e=function(_0x18a79d,_0x57bd2c){_0x18a79d=_0x18a79d-0x0;var _0x4f8848=_0xa9e0[_0x18a79d];return _0x4f8848;};'use strict';var BPromise=require(_0x0a9e('0x0'));var AWS=require(_0x0a9e('0x1'));function lexResult(_0x29929c,_0x5dd881){return new BPromise(function(_0x550fbc,_0x18d5c9){_0x29929c['postText'](_0x5dd881,function(_0x333808,_0x432180){if(_0x333808){_0x18d5c9(_0x333808);}if(_0x432180[_0x0a9e('0x2')]){for(const _0x991246 in _0x432180[_0x0a9e('0x2')]){if(_0x432180['slots'][_0x0a9e('0x3')](_0x991246)){var _0x441e3a=_0x432180[_0x0a9e('0x2')][_0x991246];_0x432180['slot_'+_0x991246]=_0x441e3a;}}}_0x550fbc(_0x432180);});});}module['exports']=function(_0xe42b77,_0x56465b,_0x52cace,_0x39753a,_0xf81284,_0x307b3e){var _0x3ab53f=new AWS[(_0x0a9e('0x4'))]({'accessKeyId':_0x56465b,'secretAccessKey':_0x52cace,'region':_0x39753a});var _0xbd1168={'botAlias':'$LATEST','botName':_0x307b3e,'inputText':_0xf81284,'userId':_0xe42b77};return lexResult(_0x3ab53f,_0xbd1168);};
\ No newline at end of file
index 48ce7a7..3e85707 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x683f=['./lib/api','exports'];(function(_0x226c44,_0x1949ee){var _0x2617ee=function(_0x2237d0){while(--_0x2237d0){_0x226c44['push'](_0x226c44['shift']());}};_0x2617ee(++_0x1949ee);}(_0x683f,0x11e));var _0xf683=function(_0x387777,_0x356171){_0x387777=_0x387777-0x0;var _0x3f84c0=_0x683f[_0x387777];return _0x3f84c0;};'use strict';var polly=require(_0xf683('0x0'));module[_0xf683('0x1')]=function(_0x16a6bc,_0x27b8f9,_0x1a2aff,_0xfc8cbb,_0x4bfade,_0x284987,_0x58e288){return polly(_0x16a6bc,_0x27b8f9,_0x1a2aff,_0xfc8cbb,_0x4bfade,_0x284987,_0x58e288);};
\ No newline at end of file
+var _0xe0be=['./lib/api','exports'];(function(_0x5fd04,_0x5d6fff){var _0x48c27b=function(_0x3fd78b){while(--_0x3fd78b){_0x5fd04['push'](_0x5fd04['shift']());}};_0x48c27b(++_0x5d6fff);}(_0xe0be,0x108));var _0xee0b=function(_0x551c6c,_0x146a90){_0x551c6c=_0x551c6c-0x0;var _0x3af59f=_0xe0be[_0x551c6c];return _0x3af59f;};'use strict';var polly=require(_0xee0b('0x0'));module[_0xee0b('0x1')]=function(_0x180dec,_0x2f048e,_0x38e8d4,_0x1de599,_0x1aaeaf,_0x3ae337,_0x41cafb){return polly(_0x180dec,_0x2f048e,_0x38e8d4,_0x1de599,_0x1aaeaf,_0x3ae337,_0x41cafb);};
\ No newline at end of file
index ed3ad65..91daeda 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x79de=['aws-sdk','synthesizeSpeech','writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','No\x20data\x20response\x20from\x20aws\x20Polly!','exports','Polly','text','mp3','path','bluebird'];(function(_0x3f7e42,_0x47fafe){var _0x3bfbe8=function(_0x415f62){while(--_0x415f62){_0x3f7e42['push'](_0x3f7e42['shift']());}};_0x3bfbe8(++_0x47fafe);}(_0x79de,0x195));var _0xe79d=function(_0x4d7cc7,_0x4a20fd){_0x4d7cc7=_0x4d7cc7-0x0;var _0x295e1b=_0x79de[_0x4d7cc7];return _0x295e1b;};'use strict';var fs=require('fs');var path=require(_0xe79d('0x0'));var BPromise=require(_0xe79d('0x1'));var rs=require('randomstring');var AWS=require(_0xe79d('0x2'));function pollyResult(_0x4713d8,_0x36df4b,_0x54ec46){return new BPromise(function(_0x1ce0e8,_0x59bacb){_0x4713d8[_0xe79d('0x3')](_0x36df4b,function(_0x4d5d70,_0x1a059e){if(_0x4d5d70){_0x59bacb(_0x4d5d70);}else if(_0x1a059e){if(_0x1a059e['AudioStream']instanceof Buffer){fs[_0xe79d('0x4')](_0x54ec46,_0x1a059e['AudioStream'],function(_0xb49b62){if(_0xb49b62){_0x59bacb(_0xb49b62);}else{_0x1ce0e8();}});}else{_0x59bacb(new Error(_0xe79d('0x5')));}}else{_0x59bacb(new Error(_0xe79d('0x6')));}});});}module[_0xe79d('0x7')]=function(_0x113dd6,_0x59e13b,_0x447886,_0x37f8ed,_0x28d3c3,_0x539226,_0x2b10d7){var _0x2516b2=new AWS[(_0xe79d('0x8'))]({'accessKeyId':_0x113dd6,'secretAccessKey':_0x59e13b,'region':_0x447886});var _0x443bcb={'Text':_0x28d3c3,'TextType':_0x539226||_0xe79d('0x9'),'OutputFormat':_0xe79d('0xa'),'VoiceId':_0x37f8ed};return pollyResult(_0x2516b2,_0x443bcb,_0x2b10d7);};
\ No newline at end of file
+var _0x44eb=['randomstring','AudioStream','writeFile','Invalid\x20data\x20response\x20from\x20aws\x20Polly!','text','mp3','bluebird'];(function(_0x29d94e,_0xf386d6){var _0x106237=function(_0x327501){while(--_0x327501){_0x29d94e['push'](_0x29d94e['shift']());}};_0x106237(++_0xf386d6);}(_0x44eb,0x1a3));var _0xb44e=function(_0x9f54a1,_0x398ca6){_0x9f54a1=_0x9f54a1-0x0;var _0x3c54fa=_0x44eb[_0x9f54a1];return _0x3c54fa;};'use strict';var fs=require('fs');var path=require('path');var BPromise=require(_0xb44e('0x0'));var rs=require(_0xb44e('0x1'));var AWS=require('aws-sdk');function pollyResult(_0x322612,_0xdeb102,_0xa1bfe6){return new BPromise(function(_0x5d773c,_0x3bab34){_0x322612['synthesizeSpeech'](_0xdeb102,function(_0x27d0e1,_0x4699c6){if(_0x27d0e1){_0x3bab34(_0x27d0e1);}else if(_0x4699c6){if(_0x4699c6[_0xb44e('0x2')]instanceof Buffer){fs[_0xb44e('0x3')](_0xa1bfe6,_0x4699c6[_0xb44e('0x2')],function(_0x650845){if(_0x650845){_0x3bab34(_0x650845);}else{_0x5d773c();}});}else{_0x3bab34(new Error(_0xb44e('0x4')));}}else{_0x3bab34(new Error('No\x20data\x20response\x20from\x20aws\x20Polly!'));}});});}module['exports']=function(_0x442a36,_0x794a9d,_0x11e946,_0x288c1f,_0x2724be,_0x4b59b0,_0x4b1c9f){var _0x575c80=new AWS['Polly']({'accessKeyId':_0x442a36,'secretAccessKey':_0x794a9d,'region':_0x11e946});var _0xf1b9cf={'Text':_0x2724be,'TextType':_0x4b59b0||_0xb44e('0x5'),'OutputFormat':_0xb44e('0x6'),'VoiceId':_0x288c1f};return pollyResult(_0x575c80,_0xf1b9cf,_0x4b1c9f);};
\ No newline at end of file
index e3fd31d..17951c4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x500f=['exports','./lib/api'];(function(_0x1522db,_0x7efece){var _0x165585=function(_0x1c8f19){while(--_0x1c8f19){_0x1522db['push'](_0x1522db['shift']());}};_0x165585(++_0x7efece);}(_0x500f,0xdd));var _0xf500=function(_0x33ebf5,_0x258ec6){_0x33ebf5=_0x33ebf5-0x0;var _0x66957b=_0x500f[_0x33ebf5];return _0x66957b;};'use strict';var asr=require(_0xf500('0x0'));module[_0xf500('0x1')]=function(_0x28b432,_0x5cfa10,_0x69f67d,_0x2d3dc2){return asr(_0x28b432,_0x5cfa10,_0x69f67d);};
\ No newline at end of file
+var _0x3689=['exports','./lib/api'];(function(_0x3ec122,_0x55150a){var _0x4ecf41=function(_0x1709cd){while(--_0x1709cd){_0x3ec122['push'](_0x3ec122['shift']());}};_0x4ecf41(++_0x55150a);}(_0x3689,0x13b));var _0x9368=function(_0x3bdf41,_0x540096){_0x3bdf41=_0x3bdf41-0x0;var _0x44876f=_0x3689[_0x3bdf41];return _0x44876f;};'use strict';var asr=require(_0x9368('0x0'));module[_0x9368('0x1')]=function(_0x3031e0,_0x50e006,_0x1afdce,_0x2f2b9b){return asr(_0x3031e0,_0x50e006,_0x1afdce);};
\ No newline at end of file
index 01b336d..66dcfde 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9f62=['string','length','key\x20should\x20be\x20a\x20string','undefined','base64','LINEAR16','8000','bluebird','exports'];(function(_0x591bbe,_0x46ecdf){var _0x1ced83=function(_0xb01928){while(--_0xb01928){_0x591bbe['push'](_0x591bbe['shift']());}};_0x1ced83(++_0x46ecdf);}(_0x9f62,0x154));var _0x29f6=function(_0x322fcf,_0xe8a81b){_0x322fcf=_0x322fcf-0x0;var _0x4a61f8=_0x9f62[_0x322fcf];return _0x4a61f8;};'use strict';var url=require('url');var BPromise=require(_0x29f6('0x0'));var fs=require('fs');var host='https://speech.googleapis.com';module[_0x29f6('0x1')]=function(_0x254ab3,_0x548050,_0x5618b7){return new BPromise(function(_0x54d164,_0x258ddd){var _0x2f0420;if(typeof _0x254ab3!==_0x29f6('0x2')||_0x254ab3[_0x29f6('0x3')]===0x0){return _0x258ddd('filepath\x20should\x20be\x20a\x20string');}if(typeof _0x548050!==_0x29f6('0x2')||_0x548050[_0x29f6('0x3')]===0x0){return _0x258ddd(_0x29f6('0x4'));}if(typeof _0x5618b7!==_0x29f6('0x5')&&(typeof _0x5618b7!==_0x29f6('0x2')||_0x5618b7['length']===0x0)){return _0x258ddd('lang\x20should\x20be\x20a\x20string');}try{_0x2f0420=fs['readFileSync'](_0x254ab3)['toString'](_0x29f6('0x6'));}catch(_0x44db16){return _0x258ddd(_0x44db16);}return _0x54d164({'method':'POST','uri':host+'/v1/speech:recognize?key='+_0x548050,'body':{'config':{'encoding':_0x29f6('0x7'),'sampleRateHertz':_0x29f6('0x8'),'languageCode':_0x5618b7},'audio':{'content':_0x2f0420}},'json':!![]});});};
\ No newline at end of file
+var _0x03ce=['exports','string','length','filepath\x20should\x20be\x20a\x20string','key\x20should\x20be\x20a\x20string','lang\x20should\x20be\x20a\x20string','readFileSync','toString','base64','POST','/v1/speech:recognize?key=','8000','url','bluebird','https://speech.googleapis.com'];(function(_0x2fd0f0,_0x4b634e){var _0x57f71a=function(_0x400d6f){while(--_0x400d6f){_0x2fd0f0['push'](_0x2fd0f0['shift']());}};_0x57f71a(++_0x4b634e);}(_0x03ce,0x1a1));var _0xe03c=function(_0x46a634,_0x439b70){_0x46a634=_0x46a634-0x0;var _0x42007a=_0x03ce[_0x46a634];return _0x42007a;};'use strict';var url=require(_0xe03c('0x0'));var BPromise=require(_0xe03c('0x1'));var fs=require('fs');var host=_0xe03c('0x2');module[_0xe03c('0x3')]=function(_0x56ac7a,_0x18e8ab,_0x2e9f29){return new BPromise(function(_0x326c04,_0x527a32){var _0x317708;if(typeof _0x56ac7a!==_0xe03c('0x4')||_0x56ac7a[_0xe03c('0x5')]===0x0){return _0x527a32(_0xe03c('0x6'));}if(typeof _0x18e8ab!==_0xe03c('0x4')||_0x18e8ab[_0xe03c('0x5')]===0x0){return _0x527a32(_0xe03c('0x7'));}if(typeof _0x2e9f29!=='undefined'&&(typeof _0x2e9f29!=='string'||_0x2e9f29[_0xe03c('0x5')]===0x0)){return _0x527a32(_0xe03c('0x8'));}try{_0x317708=fs[_0xe03c('0x9')](_0x56ac7a)[_0xe03c('0xa')](_0xe03c('0xb'));}catch(_0x41e99f){return _0x527a32(_0x41e99f);}return _0x326c04({'method':_0xe03c('0xc'),'uri':host+_0xe03c('0xd')+_0x18e8ab,'body':{'config':{'encoding':'LINEAR16','sampleRateHertz':_0xe03c('0xe'),'languageCode':_0x2e9f29},'audio':{'content':_0x317708}},'json':!![]});});};
\ No newline at end of file
index 144bae4..3204453 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0ded=['exports','./asr'];(function(_0x128408,_0x57097b){var _0x3fea1c=function(_0x188376){while(--_0x188376){_0x128408['push'](_0x128408['shift']());}};_0x3fea1c(++_0x57097b);}(_0x0ded,0x191));var _0xd0de=function(_0x15a634,_0x4feb86){_0x15a634=_0x15a634-0x0;var _0xf4f7a0=_0x0ded[_0x15a634];return _0xf4f7a0;};var asr=require(_0xd0de('0x0'));module[_0xd0de('0x1')]={'asr':asr};
\ No newline at end of file
+var _0x9c84=['exports'];(function(_0x243b2f,_0x30aa15){var _0xcb3c2d=function(_0x213bb2){while(--_0x213bb2){_0x243b2f['push'](_0x243b2f['shift']());}};_0xcb3c2d(++_0x30aa15);}(_0x9c84,0x9f));var _0x49c8=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x9c84[_0x321bb2];return _0x9c12ed;};var asr=require('./asr');module[_0x49c8('0x0')]={'asr':asr};
\ No newline at end of file
index 1e09835..fcda6c7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd69b=['voice','audioConfig','MP3','text:synthesize','POST','resolve','.mp3','from','audioContent','chmodSync','777','googleCloudTTS\x20path','googleTTS','https://translate.google.com/_/TranslateWebserverUi/data/batchexecute','utf8','application/x-www-form-urlencoded','f.req=','jQ1olc','stringify','null','generic','slice','lang\x20\x22','parse\x20response\x20failed:\x0a','goggleTTS\x20path','googleASR','asr','uri','results','map','alternatives','transcript','join','confidence','googleASR\x20transcription','googleASR\x20confidence','catch','[%s]\x20%s:%s','message','result','source','resolvedQuery','actionIncomplete','fulfillment','score','metadata','endConversation','isFallbackIntent','googleDialogflowV2','replace','sessionPath','detectIntent','length','Dialogflow\x20V2\x20response:','queryResult','allRequiredParamsPresent','diagnosticInfo','end_conversation','boolValue','fulfillmentText','intent','name','displayName','isFallback','languageCode','responseId','tildeASR','Tilde\x20ASR\x20transcription','Tilde\x20ASR\x20confidence','awsPolly','polly','awsLex','format','model=%s','freeform=3','nda','text','channelData','CustomAction','CustomActionData','AudioFromTts','Data','bluebird','dialogflow','path','querystring','request-promise','randomstring','google-tts-api','parse','util','./aws','./google','./sestek','./tilde','agi','protocol','WHAT_EVER','get','statusCode','error','request\x20to\x20','statusMessage','createWriteStream','finish','info','finish\x20download\x20file','unlink','pipe','end','host','\x20failed,\x20status\x20code\x20=\x20','data','transcode','wav','error\x20convert','finish\x20to\x20convert','start','tmp','generate','.wav','writeFileSync','base64','then','split','toString','googleCloudTTS','https://texttospeech.googleapis.com/v1/','ssml','input'];(function(_0x1b814d,_0x4955c6){var _0x33458c=function(_0x1c4104){while(--_0x1c4104){_0x1b814d['push'](_0x1b814d['shift']());}};_0x33458c(++_0x4955c6);}(_0xd69b,0x156));var _0xbd69=function(_0xc8a931,_0x260690){_0xc8a931=_0xc8a931-0x0;var _0x28bd27=_0xd69b[_0xc8a931];return _0x28bd27;};'use strict';var apiai=require('apiai-promise');var BPromise=require(_0xbd69('0x0'));var dialogflow=require(_0xbd69('0x1'));var fs=require('fs');var http=require('http');var https=require('https');var md5=require('md5');var path=require(_0xbd69('0x2'));var querystring=require(_0xbd69('0x3'));var rp=require(_0xbd69('0x4'));var rs=require(_0xbd69('0x5'));var sox=require('sox');var tts=require(_0xbd69('0x6'));var urlParse=require('url')[_0xbd69('0x7')];var util=require(_0xbd69('0x8'));var aws=require(_0xbd69('0x9'));var google=require(_0xbd69('0xa'));var sestek=require(_0xbd69('0xb'));var tilde=require(_0xbd69('0xc'));var logger=require('../../../config/logger')(_0xbd69('0xd'));var ISPEECH_API='https://api.ispeech.org/api/rest';function downloadFile(_0x5c9dc4,_0x21bcb9){return new BPromise(function(_0x414d35,_0x16c0ed){var _0x27e7a5=urlParse(_0x5c9dc4);var _0x593739=_0x27e7a5[_0xbd69('0xe')]==='https:'?https:http;var _0x25860a={'host':_0x27e7a5['host'],'path':_0x27e7a5[_0xbd69('0x2')],'headers':{'user-agent':_0xbd69('0xf')}};_0x593739[_0xbd69('0x10')](_0x25860a,function(_0x3e64a){if(_0x3e64a[_0xbd69('0x11')]!==0xc8){logger[_0xbd69('0x12')](_0xbd69('0x13')+_0x5c9dc4+'\x20failed,\x20status\x20code\x20=\x20'+_0x3e64a[_0xbd69('0x11')]+'\x20('+_0x3e64a[_0xbd69('0x14')]+')');_0x16c0ed(new Error(_0xbd69('0x13')+_0x5c9dc4+'\x20failed,\x20status\x20code\x20=\x20'+_0x3e64a[_0xbd69('0x11')]+'\x20('+_0x3e64a['statusMessage']+')'));return;}var _0x14eaf2=fs[_0xbd69('0x15')](_0x21bcb9);_0x14eaf2['on'](_0xbd69('0x16'),function(){logger[_0xbd69('0x17')](_0xbd69('0x18'));_0x14eaf2['close'](_0x414d35);});_0x14eaf2['on'](_0xbd69('0x12'),function(_0xed410a){fs[_0xbd69('0x19')](_0x21bcb9);logger[_0xbd69('0x12')]('download\x20error',_0xed410a);_0x16c0ed(_0xed410a);});_0x3e64a[_0xbd69('0x1a')](_0x14eaf2);})['on'](_0xbd69('0x12'),function(_0x2c5dfd){logger[_0xbd69('0x12')](_0x2c5dfd);_0x16c0ed(_0x2c5dfd);})[_0xbd69('0x1b')]();});}function uploadFile(_0x53eec4){return new BPromise(function(_0x5724a5,_0x3ea1de){var _0x7038d8=urlParse(_0x53eec4);var _0x313f55=_0x7038d8[_0xbd69('0xe')]==='https:'?https:http;var _0x2d66a7={'host':_0x7038d8[_0xbd69('0x1c')],'path':_0x7038d8['path'],'headers':{'user-agent':_0xbd69('0xf')}};_0x313f55[_0xbd69('0x10')](_0x2d66a7,function(_0x5e53ce){if(_0x5e53ce[_0xbd69('0x11')]!==0xc8){_0x3ea1de(new Error(_0xbd69('0x13')+_0x53eec4+_0xbd69('0x1d')+_0x5e53ce[_0xbd69('0x11')]+'\x20('+_0x5e53ce[_0xbd69('0x14')]+')'));return;}var _0x390d0a='';_0x5e53ce['on'](_0xbd69('0x1e'),function(_0x524bdb){_0x390d0a+=_0x524bdb;});_0x5e53ce['on'](_0xbd69('0x1b'),function(){_0x5724a5(_0x390d0a);});})['on'](_0xbd69('0x12'),function(_0x20761a){_0x3ea1de(_0x20761a);})[_0xbd69('0x1b')]();});}function convertFile(_0x25f550,_0x33624a){return new BPromise(function(_0x2258a3,_0x16e7b2){var _0x5bc6d6=sox[_0xbd69('0x1f')](_0x25f550,_0x33624a,{'sampleRate':0x1f40,'format':_0xbd69('0x20'),'channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x5bc6d6['on'](_0xbd69('0x12'),function(_0x4178ce){logger['error'](_0xbd69('0x21'),_0x4178ce);_0x16e7b2(_0x4178ce);});_0x5bc6d6['on'](_0xbd69('0x1b'),function(){logger[_0xbd69('0x17')](_0xbd69('0x22'));_0x2258a3();});_0x5bc6d6[_0xbd69('0x23')]();});}function base64Decode(_0x39e6e9,_0x244583){var _0x5f157b=path['resolve'](__dirname,_0xbd69('0x24'),rs[_0xbd69('0x25')](0x4)+_0xbd69('0x26'));fs[_0xbd69('0x27')](_0x5f157b,_0x39e6e9,_0xbd69('0x28'));return convertFile(_0x5f157b,_0x244583)[_0xbd69('0x29')](function(){try{fs[_0xbd69('0x19')](_0x5f157b);fs['chmodSync'](_0x244583,'777');}catch(_0x4fcd89){logger[_0xbd69('0x12')](_0x4fcd89);}return _0x244583[_0xbd69('0x2a')]('.')[0x0];});}function base64Encode(_0x633917){var _0x1267bb=fs['readFileSync'](_0x633917);return new Buffer(_0x1267bb)[_0xbd69('0x2b')](_0xbd69('0x28'));}exports[_0xbd69('0x2c')]=function(_0x5c2353,_0x25049b,_0x1aa10b,_0x579afe,_0x5b3cf7,_0x42189f){var _0x6429a2,_0x5237b7;var _0x1cf783=_0xbd69('0x2d');var _0x1db50a='?key='+_0x5c2353;var _0x4f0ede={};if(_0x25049b===_0xbd69('0x2e')){_0x4f0ede[_0xbd69('0x2f')]={'ssml':_0x1aa10b};}else{_0x4f0ede[_0xbd69('0x2f')]={'text':_0x1aa10b};};_0x4f0ede[_0xbd69('0x30')]={'languageCode':_0x579afe,'ssmlGender':_0x5b3cf7};_0x4f0ede[_0xbd69('0x31')]={'audioEncoding':_0xbd69('0x32'),'sampleRateHertz':0x1f40};var _0x4c3ed6={'url':_0x1cf783+_0xbd69('0x33')+_0x1db50a,'method':_0xbd69('0x34'),'json':!![],'body':_0x4f0ede};return rp(_0x4c3ed6)[_0xbd69('0x29')](function(_0x1fe1e4){return new BPromise(function(_0x4f67db,_0x2a8706){_0x6429a2=path[_0xbd69('0x35')](__dirname,'tmp',rs[_0xbd69('0x25')](0x4)+_0xbd69('0x36'));var _0x8dacaa=Buffer[_0xbd69('0x37')](_0x1fe1e4[_0xbd69('0x38')],_0xbd69('0x28'));return fs['writeFile'](_0x6429a2,_0x8dacaa,function(_0x196991){_0x2a8706(_0x196991);},function(_0x4d3b5a){fs[_0xbd69('0x39')](_0x6429a2,_0xbd69('0x3a'));_0x4f67db(_0x4d3b5a);});});})['then'](function(_0x35a1c9){_0x5237b7=path['resolve'](__dirname,_0xbd69('0x24'),rs[_0xbd69('0x25')](0x4)+_0xbd69('0x26'));return convertFile(_0x6429a2,_0x5237b7);})[_0xbd69('0x29')](function(){try{fs[_0xbd69('0x19')](_0x6429a2);fs[_0xbd69('0x39')](_0x5237b7,_0xbd69('0x3a'));}catch(_0x44a912){logger['error'](_0x44a912);}logger[_0xbd69('0x17')](_0xbd69('0x3b'),_0x5237b7[_0xbd69('0x2a')]('.')[0x0]);return _0x5237b7[_0xbd69('0x2a')]('.')[0x0];});};exports[_0xbd69('0x3c')]=function(_0x249789,_0x9a825){var _0x4a6833=_0xbd69('0x3d');var _0x4e329a,_0x19676a;var _0x515375;var _0x25da11={'encoding':_0xbd69('0x3e'),'method':_0xbd69('0x34'),'timeout':0x2710,'url':_0x4a6833,'headers':{'Content-Type':_0xbd69('0x3f')},'body':_0xbd69('0x40')+encodeURIComponent(JSON['stringify']([[[_0xbd69('0x41'),JSON[_0xbd69('0x42')]([_0x249789,_0x9a825||'en',![],_0xbd69('0x43')]),null,_0xbd69('0x44')]]]))};return rp(_0x25da11)['then'](function(_0x5a9e87){try{_0x515375=eval(_0x5a9e87[_0xbd69('0x45')](0x5))[0x0][0x2];}catch(_0x342c67){throw new Error('parse\x20response\x20failed:\x0a'+_0x5a9e87['data']);}if(!_0x515375){if(_0x249789['length']>0xc8){throw new Error('text\x20length\x20limit\x20reached');}else{throw new Error(_0xbd69('0x46')+_0x9a825+'\x22\x20might\x20not\x20exist');}}try{_0x515375=eval(_0x515375)[0x0];}catch(_0x446490){throw new Error(_0xbd69('0x47')+res['data']);}const _0x120fcb=_0x515375;_0x4e329a=path[_0xbd69('0x35')](__dirname,_0xbd69('0x24'),rs['generate'](0x4)+'.mp3');fs['writeFileSync'](_0x4e329a,_0x515375,{'encoding':_0xbd69('0x28')});_0x19676a=path[_0xbd69('0x35')](__dirname,'tmp',rs[_0xbd69('0x25')](0x4)+_0xbd69('0x26'));return convertFile(_0x4e329a,_0x19676a);})[_0xbd69('0x29')](function(){try{fs[_0xbd69('0x19')](_0x4e329a);fs['chmodSync'](_0x19676a,_0xbd69('0x3a'));}catch(_0x5820f1){logger[_0xbd69('0x12')](_0x5820f1);}logger[_0xbd69('0x17')](_0xbd69('0x48'),_0x19676a['split']('.')[0x0]);return _0x19676a[_0xbd69('0x2a')]('.')[0x0];});};exports[_0xbd69('0x49')]=function(_0x12ea00,_0x25b0eb,_0x1daede){return google[_0xbd69('0x4a')](_0x12ea00,_0x25b0eb,_0x1daede)[_0xbd69('0x29')](function(_0x4483ba){logger['info'](_0x4483ba[_0xbd69('0x4b')]);return rp(_0x4483ba);})[_0xbd69('0x29')](function(_0x471bb4){var _0x463092='';var _0xfd5497=0x0;try{fs[_0xbd69('0x19')](_0x12ea00);}catch(_0x4558d1){logger[_0xbd69('0x12')](_0x4558d1);}if(_0x471bb4&&_0x471bb4[_0xbd69('0x4c')]){_0x463092=_0x471bb4['results'][_0xbd69('0x4d')](function(_0x1963c4){return _0x1963c4&&_0x1963c4[_0xbd69('0x4e')][0x0]&&_0x1963c4['alternatives'][0x0][_0xbd69('0x4f')]?_0x1963c4['alternatives'][0x0][_0xbd69('0x4f')]:'';})[_0xbd69('0x50')]('\x0a');_0xfd5497=_0x471bb4['results']['map'](function(_0x1b29a1){return _0x1b29a1&&_0x1b29a1[_0xbd69('0x4e')][0x0]&&_0x1b29a1[_0xbd69('0x4e')][0x0][_0xbd69('0x51')]?_0x1b29a1['alternatives'][0x0]['confidence']:0x0;})[_0xbd69('0x50')]('\x0a');}logger['info'](_0xbd69('0x52'),_0x463092);logger[_0xbd69('0x17')](_0xbd69('0x53'),_0xfd5497);return{'transcript':_0x463092,'confidence':_0xfd5497};})[_0xbd69('0x54')](function(_0x39e1e4){logger['error'](_0xbd69('0x55'),_0x39e1e4[_0xbd69('0x11')],_0x39e1e4['name'],_0x39e1e4[_0xbd69('0x56')]);});};exports['googleDialogflow']=function(_0x278394,_0x522317,_0x2bf579,_0x4a36b2){var _0x43b519=apiai(_0x522317,{'language':_0x4a36b2||'en'});return _0x43b519['textRequest'](_0x2bf579,{'sessionId':md5(_0x278394)})[_0xbd69('0x29')](function(_0x3e5663){logger['info'](JSON['stringify'](_0x3e5663));return{'source':_0x3e5663[_0xbd69('0x57')][_0xbd69('0x58')],'resolvedQuery':_0x3e5663[_0xbd69('0x57')][_0xbd69('0x59')],'action':_0x3e5663[_0xbd69('0x57')]['action'],'actionIncomplete':_0x3e5663[_0xbd69('0x57')][_0xbd69('0x5a')],'speech':_0x3e5663[_0xbd69('0x57')][_0xbd69('0x5b')]['speech'],'score':_0x3e5663['result'][_0xbd69('0x5c')],'statusCode':_0x3e5663['status']['code'],'endConversation':_0x3e5663['result'][_0xbd69('0x5d')][_0xbd69('0x5e')]||![],'isFallbackIntent':_0x3e5663[_0xbd69('0x57')][_0xbd69('0x5d')][_0xbd69('0x5f')]};});};exports[_0xbd69('0x60')]=function(_0x56423a,_0x4598c2,_0x141a64,_0x58196c,_0x21c025,_0x14b4a4){var _0x376415=_0x58196c[_0xbd69('0x61')](/\\n/g,'\x0a');var _0x16629d={'credentials':{'private_key':_0x376415,'client_email':_0x141a64}};var _0x251500=new dialogflow['SessionsClient'](_0x16629d);var _0x11ff4a=_0x251500[_0xbd69('0x62')](_0x4598c2,md5(_0x56423a));var _0x1af632={'session':_0x11ff4a,'queryInput':{'text':{'text':_0x21c025,'languageCode':_0x14b4a4}}};return _0x251500[_0xbd69('0x63')](_0x1af632)['then'](function(_0x177b44){if(_0x177b44&&_0x177b44[_0xbd69('0x64')]){logger['info'](_0xbd69('0x65'),JSON[_0xbd69('0x42')](_0x177b44));var _0x41d9b8=_0x177b44[0x0];if(_0x41d9b8){var _0x4712bf={'action':_0x41d9b8[_0xbd69('0x66')]['action'],'allRequiredParamsPresent':_0x41d9b8[_0xbd69('0x66')][_0xbd69('0x67')],'endConversation':_0x41d9b8[_0xbd69('0x66')][_0xbd69('0x68')]&&_0x41d9b8[_0xbd69('0x66')][_0xbd69('0x68')]['fields']?_0x41d9b8['queryResult'][_0xbd69('0x68')]['fields'][_0xbd69('0x69')][_0xbd69('0x6a')]:![],'fulfillmentText':_0x41d9b8[_0xbd69('0x66')][_0xbd69('0x6b')],'intentName':_0x41d9b8[_0xbd69('0x66')][_0xbd69('0x6c')][_0xbd69('0x6d')],'intentDisplayName':_0x41d9b8['queryResult'][_0xbd69('0x6c')][_0xbd69('0x6e')],'isFallbackIntent':_0x41d9b8['queryResult'][_0xbd69('0x6c')][_0xbd69('0x6f')],'languageCode':_0x41d9b8[_0xbd69('0x66')][_0xbd69('0x70')],'queryText':_0x41d9b8[_0xbd69('0x66')]['queryText'],'responseId':_0x41d9b8[_0xbd69('0x71')],'score':_0x41d9b8[_0xbd69('0x66')]['intentDetectionConfidence'],'speech':_0x41d9b8[_0xbd69('0x66')][_0xbd69('0x6b')],'providerResponse':JSON[_0xbd69('0x42')](_0x177b44)};return _0x4712bf;}}});};exports[_0xbd69('0x72')]=function(_0x17831f,_0x79a107,_0x41e50f,_0x46bf31){return tilde['asr'](_0x17831f,_0x79a107,_0x41e50f,_0x46bf31)[_0xbd69('0x29')](function(_0x1ea920){try{fs[_0xbd69('0x19')](_0x17831f);}catch(_0x328f27){logger['error'](_0x328f27);}logger[_0xbd69('0x17')](_0xbd69('0x73'),_0x1ea920['transcript']);logger[_0xbd69('0x17')](_0xbd69('0x74'),_0x1ea920[_0xbd69('0x51')]);return _0x1ea920;});};exports[_0xbd69('0x75')]=function(_0x1c0efe,_0x2fd76d,_0x45a421,_0x147efc,_0x169a1f,_0x38f40f){var _0x4f6c0b=path[_0xbd69('0x35')](__dirname,_0xbd69('0x24'),rs[_0xbd69('0x25')](0x4)+_0xbd69('0x36'));var _0x1b6025;return aws[_0xbd69('0x76')](_0x1c0efe,_0x2fd76d,_0x45a421,_0x147efc,_0x169a1f,_0x38f40f,_0x4f6c0b)['then'](function(){_0x1b6025=path[_0xbd69('0x35')](__dirname,_0xbd69('0x24'),rs[_0xbd69('0x25')](0x4)+'.wav');return convertFile(_0x4f6c0b,_0x1b6025);})[_0xbd69('0x29')](function(){try{fs[_0xbd69('0x19')](_0x4f6c0b);fs['chmodSync'](_0x1b6025,_0xbd69('0x3a'));}catch(_0x25fc34){logger[_0xbd69('0x12')](_0x25fc34);}return _0x1b6025['split']('.')[0x0];});};exports[_0xbd69('0x77')]=function(_0x46eae8,_0x179095,_0x206da9,_0x5e41fd,_0x2ca95d,_0x243046){return aws['lex'](_0x46eae8,_0x179095,_0x206da9,_0x5e41fd,_0x2ca95d,_0x243046)['then'](function(_0x432f5d){logger[_0xbd69('0x17')](JSON[_0xbd69('0x42')](_0x432f5d));return _0x432f5d;});};exports['ispeechTTS']=function(_0x498482,_0x266f9f,_0x582438,_0x368e0c){var _0x36de18=util[_0xbd69('0x78')]('%s?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3',ISPEECH_API,_0x498482,encodeURIComponent(_0x266f9f),_0x582438,_0x368e0c);var _0x41bec3=path[_0xbd69('0x35')](__dirname,'tmp',rs[_0xbd69('0x25')](0x4)+_0xbd69('0x36'));var _0x3a806e;return downloadFile(_0x36de18,_0x41bec3)[_0xbd69('0x29')](function(){_0x3a806e=path[_0xbd69('0x35')](__dirname,_0xbd69('0x24'),rs['generate'](0x4)+_0xbd69('0x26'));return convertFile(_0x41bec3,_0x3a806e);})[_0xbd69('0x29')](function(){try{fs['unlink'](_0x41bec3);fs[_0xbd69('0x39')](_0x3a806e,_0xbd69('0x3a'));}catch(_0x155d3c){logger[_0xbd69('0x12')](_0x155d3c);}return _0x3a806e[_0xbd69('0x2a')]('.')[0x0];});};exports['ispeechASR']=function(_0x17743e,_0x49ef6b,_0xc4ba70,_0x508bda){var _0x55916c=util[_0xbd69('0x78')]('%s?apikey=%s&action=recognize&locale=%s&content-type=audio/x-wav&audio=%s&%s',ISPEECH_API,_0x49ef6b,_0xc4ba70,base64Encode(_0x17743e),_0x508bda?util[_0xbd69('0x78')](_0xbd69('0x79'),encodeURIComponent(_0x508bda)):_0xbd69('0x7a'));return uploadFile(_0x55916c)[_0xbd69('0x29')](function(_0x138305){return querystring[_0xbd69('0x7')](_0x138305);});};exports['sestekNDA']=function(_0x1a3144,_0x269a7b){return sestek[_0xbd69('0x7b')](_0x1a3144,_0x269a7b)[_0xbd69('0x29')](function(_0xb87410){logger['info'](JSON[_0xbd69('0x42')](_0xb87410));var _0x558646={'speech':_0xb87410[_0xbd69('0x7c')],'action':_0xb87410[_0xbd69('0x7d')]?_0xb87410[_0xbd69('0x7d')][_0xbd69('0x7e')]:undefined,'actiondata':_0xb87410[_0xbd69('0x7d')]?_0xb87410[_0xbd69('0x7d')][_0xbd69('0x7f')]:undefined};if(_0xb87410[_0xbd69('0x7d')]&&_0xb87410[_0xbd69('0x7d')]['AudioFromTts']){return base64Decode(_0xb87410[_0xbd69('0x7d')][_0xbd69('0x80')][_0xbd69('0x81')],path[_0xbd69('0x35')](__dirname,_0xbd69('0x24'),rs[_0xbd69('0x25')](0x4)+_0xbd69('0x26')))[_0xbd69('0x29')](function(_0x40877b){_0x558646['audiofile']=_0x40877b;return _0x558646;});}return _0x558646;});};exports['dirName']=function(){return __dirname;};
\ No newline at end of file
+var _0xfaff=['resolve','info','googleCloudTTS\x20path','split','googleTTS','https://translate.google.com/_/TranslateWebserverUi/data/batchexecute','POST','application/x-www-form-urlencoded','f.req=','stringify','jQ1olc','generic','slice','parse\x20response\x20failed:\x0a','length','text\x20length\x20limit\x20reached','\x22\x20might\x20not\x20exist','.mp3','.wav','goggleTTS\x20path','googleASR','asr','uri','results','map','alternatives','transcript','join','confidence','googleASR\x20confidence','catch','[%s]\x20%s:%s','name','message','result','source','resolvedQuery','action','fulfillment','speech','score','code','metadata','isFallbackIntent','googleDialogflowV2','replace','detectIntent','queryResult','allRequiredParamsPresent','diagnosticInfo','fields','end_conversation','boolValue','fulfillmentText','intent','displayName','isFallback','languageCode','responseId','intentDetectionConfidence','tildeASR','Tilde\x20ASR\x20transcription','Tilde\x20ASR\x20confidence','awsPolly','polly','awsLex','ispeechTTS','format','ispeechASR','freeform=3','sestekNDA','nda','channelData','CustomAction','CustomActionData','AudioFromTts','Data','audiofile','dirName','apiai-promise','bluebird','http','md5','path','querystring','request-promise','sox','google-tts-api','parse','util','./aws','./google','./sestek','agi','https://api.ispeech.org/api/rest','statusCode','error','request\x20to\x20','statusMessage','finish','finish\x20download\x20file','close','unlink','download\x20error','pipe','end','protocol','host','WHAT_EVER','get','\x20failed,\x20status\x20code\x20=\x20','data','transcode','error\x20convert','finish\x20to\x20convert','start','tmp','generate','writeFileSync','then','777','readFileSync','toString','base64','https://texttospeech.googleapis.com/v1/','?key=','ssml','input','voice','audioConfig','text:synthesize','chmodSync'];(function(_0x57ea9f,_0x36d4a6){var _0x5fce7e=function(_0x205793){while(--_0x205793){_0x57ea9f['push'](_0x57ea9f['shift']());}};_0x5fce7e(++_0x36d4a6);}(_0xfaff,0xd3));var _0xffaf=function(_0x10bcc4,_0x4400e2){_0x10bcc4=_0x10bcc4-0x0;var _0x2da988=_0xfaff[_0x10bcc4];return _0x2da988;};'use strict';var apiai=require(_0xffaf('0x0'));var BPromise=require(_0xffaf('0x1'));var dialogflow=require('dialogflow');var fs=require('fs');var http=require(_0xffaf('0x2'));var https=require('https');var md5=require(_0xffaf('0x3'));var path=require(_0xffaf('0x4'));var querystring=require(_0xffaf('0x5'));var rp=require(_0xffaf('0x6'));var rs=require('randomstring');var sox=require(_0xffaf('0x7'));var tts=require(_0xffaf('0x8'));var urlParse=require('url')[_0xffaf('0x9')];var util=require(_0xffaf('0xa'));var aws=require(_0xffaf('0xb'));var google=require(_0xffaf('0xc'));var sestek=require(_0xffaf('0xd'));var tilde=require('./tilde');var logger=require('../../../config/logger')(_0xffaf('0xe'));var ISPEECH_API=_0xffaf('0xf');function downloadFile(_0x3c7d0b,_0x551a47){return new BPromise(function(_0x5baf10,_0x5c0aa1){var _0x26c3a1=urlParse(_0x3c7d0b);var _0x1ad493=_0x26c3a1['protocol']==='https:'?https:http;var _0x1aae8e={'host':_0x26c3a1['host'],'path':_0x26c3a1[_0xffaf('0x4')],'headers':{'user-agent':'WHAT_EVER'}};_0x1ad493['get'](_0x1aae8e,function(_0x4a4cd2){if(_0x4a4cd2[_0xffaf('0x10')]!==0xc8){logger[_0xffaf('0x11')](_0xffaf('0x12')+_0x3c7d0b+'\x20failed,\x20status\x20code\x20=\x20'+_0x4a4cd2[_0xffaf('0x10')]+'\x20('+_0x4a4cd2[_0xffaf('0x13')]+')');_0x5c0aa1(new Error(_0xffaf('0x12')+_0x3c7d0b+'\x20failed,\x20status\x20code\x20=\x20'+_0x4a4cd2[_0xffaf('0x10')]+'\x20('+_0x4a4cd2[_0xffaf('0x13')]+')'));return;}var _0x1c449b=fs['createWriteStream'](_0x551a47);_0x1c449b['on'](_0xffaf('0x14'),function(){logger['info'](_0xffaf('0x15'));_0x1c449b[_0xffaf('0x16')](_0x5baf10);});_0x1c449b['on'](_0xffaf('0x11'),function(_0x1d78af){fs[_0xffaf('0x17')](_0x551a47);logger[_0xffaf('0x11')](_0xffaf('0x18'),_0x1d78af);_0x5c0aa1(_0x1d78af);});_0x4a4cd2[_0xffaf('0x19')](_0x1c449b);})['on'](_0xffaf('0x11'),function(_0x156b4f){logger[_0xffaf('0x11')](_0x156b4f);_0x5c0aa1(_0x156b4f);})[_0xffaf('0x1a')]();});}function uploadFile(_0x52aea8){return new BPromise(function(_0x385737,_0x393d32){var _0x404a28=urlParse(_0x52aea8);var _0x1be0b0=_0x404a28[_0xffaf('0x1b')]==='https:'?https:http;var _0x17763f={'host':_0x404a28[_0xffaf('0x1c')],'path':_0x404a28[_0xffaf('0x4')],'headers':{'user-agent':_0xffaf('0x1d')}};_0x1be0b0[_0xffaf('0x1e')](_0x17763f,function(_0x12b564){if(_0x12b564[_0xffaf('0x10')]!==0xc8){_0x393d32(new Error(_0xffaf('0x12')+_0x52aea8+_0xffaf('0x1f')+_0x12b564[_0xffaf('0x10')]+'\x20('+_0x12b564[_0xffaf('0x13')]+')'));return;}var _0x313d08='';_0x12b564['on'](_0xffaf('0x20'),function(_0x3c334a){_0x313d08+=_0x3c334a;});_0x12b564['on'](_0xffaf('0x1a'),function(){_0x385737(_0x313d08);});})['on'](_0xffaf('0x11'),function(_0x4d26dc){_0x393d32(_0x4d26dc);})['end']();});}function convertFile(_0x3b21c2,_0x1d4406){return new BPromise(function(_0xb33698,_0x56c204){var _0x4e6c5c=sox[_0xffaf('0x21')](_0x3b21c2,_0x1d4406,{'sampleRate':0x1f40,'format':'wav','channelCount':0x1,'bitRate':0xc0*0x400,'compressionQuality':0x5});_0x4e6c5c['on'](_0xffaf('0x11'),function(_0x309a73){logger['error'](_0xffaf('0x22'),_0x309a73);_0x56c204(_0x309a73);});_0x4e6c5c['on'](_0xffaf('0x1a'),function(){logger['info'](_0xffaf('0x23'));_0xb33698();});_0x4e6c5c[_0xffaf('0x24')]();});}function base64Decode(_0x5caa59,_0x897b0){var _0x455824=path['resolve'](__dirname,_0xffaf('0x25'),rs[_0xffaf('0x26')](0x4)+'.wav');fs[_0xffaf('0x27')](_0x455824,_0x5caa59,'base64');return convertFile(_0x455824,_0x897b0)[_0xffaf('0x28')](function(){try{fs[_0xffaf('0x17')](_0x455824);fs['chmodSync'](_0x897b0,_0xffaf('0x29'));}catch(_0x42a4f7){logger[_0xffaf('0x11')](_0x42a4f7);}return _0x897b0['split']('.')[0x0];});}function base64Encode(_0x30f007){var _0x409cbe=fs[_0xffaf('0x2a')](_0x30f007);return new Buffer(_0x409cbe)[_0xffaf('0x2b')](_0xffaf('0x2c'));}exports['googleCloudTTS']=function(_0x10e1c1,_0x574118,_0x11e496,_0x54a277,_0x301f56,_0x23bae9){var _0x2563fd,_0x20e686;var _0x2c01ea=_0xffaf('0x2d');var _0x352e42=_0xffaf('0x2e')+_0x10e1c1;var _0x1c196d={};if(_0x574118===_0xffaf('0x2f')){_0x1c196d[_0xffaf('0x30')]={'ssml':_0x11e496};}else{_0x1c196d[_0xffaf('0x30')]={'text':_0x11e496};};_0x1c196d[_0xffaf('0x31')]={'languageCode':_0x54a277,'ssmlGender':_0x301f56};_0x1c196d[_0xffaf('0x32')]={'audioEncoding':'MP3','sampleRateHertz':0x1f40};var _0x3f8f3c={'url':_0x2c01ea+_0xffaf('0x33')+_0x352e42,'method':'POST','json':!![],'body':_0x1c196d};return rp(_0x3f8f3c)[_0xffaf('0x28')](function(_0x169c36){return new BPromise(function(_0x4763a6,_0x575376){_0x2563fd=path['resolve'](__dirname,_0xffaf('0x25'),rs[_0xffaf('0x26')](0x4)+'.mp3');var _0x21ecad=Buffer['from'](_0x169c36['audioContent'],_0xffaf('0x2c'));return fs['writeFile'](_0x2563fd,_0x21ecad,function(_0x279ec8){_0x575376(_0x279ec8);},function(_0x232b68){fs[_0xffaf('0x34')](_0x2563fd,'777');_0x4763a6(_0x232b68);});});})[_0xffaf('0x28')](function(_0x2d2300){_0x20e686=path[_0xffaf('0x35')](__dirname,_0xffaf('0x25'),rs['generate'](0x4)+'.wav');return convertFile(_0x2563fd,_0x20e686);})['then'](function(){try{fs[_0xffaf('0x17')](_0x2563fd);fs[_0xffaf('0x34')](_0x20e686,_0xffaf('0x29'));}catch(_0x89c9f6){logger[_0xffaf('0x11')](_0x89c9f6);}logger[_0xffaf('0x36')](_0xffaf('0x37'),_0x20e686[_0xffaf('0x38')]('.')[0x0]);return _0x20e686[_0xffaf('0x38')]('.')[0x0];});};exports[_0xffaf('0x39')]=function(_0x4e941f,_0x39545f){var _0x14083f=_0xffaf('0x3a');var _0x4798fb,_0x2fed36;var _0x24ee0d;var _0x22bdfd={'encoding':'utf8','method':_0xffaf('0x3b'),'timeout':0x2710,'url':_0x14083f,'headers':{'Content-Type':_0xffaf('0x3c')},'body':_0xffaf('0x3d')+encodeURIComponent(JSON[_0xffaf('0x3e')]([[[_0xffaf('0x3f'),JSON['stringify']([_0x4e941f,_0x39545f||'en',![],'null']),null,_0xffaf('0x40')]]]))};return rp(_0x22bdfd)[_0xffaf('0x28')](function(_0x551047){try{_0x24ee0d=eval(_0x551047[_0xffaf('0x41')](0x5))[0x0][0x2];}catch(_0x506227){throw new Error(_0xffaf('0x42')+_0x551047[_0xffaf('0x20')]);}if(!_0x24ee0d){if(_0x4e941f[_0xffaf('0x43')]>0xc8){throw new Error(_0xffaf('0x44'));}else{throw new Error('lang\x20\x22'+_0x39545f+_0xffaf('0x45'));}}try{_0x24ee0d=eval(_0x24ee0d)[0x0];}catch(_0x2e9ada){throw new Error(_0xffaf('0x42')+res[_0xffaf('0x20')]);}const _0x1c805b=_0x24ee0d;_0x4798fb=path[_0xffaf('0x35')](__dirname,_0xffaf('0x25'),rs[_0xffaf('0x26')](0x4)+_0xffaf('0x46'));fs['writeFileSync'](_0x4798fb,_0x24ee0d,{'encoding':'base64'});_0x2fed36=path[_0xffaf('0x35')](__dirname,'tmp',rs[_0xffaf('0x26')](0x4)+_0xffaf('0x47'));return convertFile(_0x4798fb,_0x2fed36);})[_0xffaf('0x28')](function(){try{fs[_0xffaf('0x17')](_0x4798fb);fs[_0xffaf('0x34')](_0x2fed36,_0xffaf('0x29'));}catch(_0x1ffef4){logger['error'](_0x1ffef4);}logger[_0xffaf('0x36')](_0xffaf('0x48'),_0x2fed36[_0xffaf('0x38')]('.')[0x0]);return _0x2fed36[_0xffaf('0x38')]('.')[0x0];});};exports[_0xffaf('0x49')]=function(_0x2d6a7e,_0x486c09,_0x511dbf){return google[_0xffaf('0x4a')](_0x2d6a7e,_0x486c09,_0x511dbf)['then'](function(_0x1eb5ff){logger[_0xffaf('0x36')](_0x1eb5ff[_0xffaf('0x4b')]);return rp(_0x1eb5ff);})[_0xffaf('0x28')](function(_0x28e98e){var _0x1a719d='';var _0x4250ee=0x0;try{fs[_0xffaf('0x17')](_0x2d6a7e);}catch(_0x14fef6){logger[_0xffaf('0x11')](_0x14fef6);}if(_0x28e98e&&_0x28e98e[_0xffaf('0x4c')]){_0x1a719d=_0x28e98e[_0xffaf('0x4c')][_0xffaf('0x4d')](function(_0x25a51a){return _0x25a51a&&_0x25a51a[_0xffaf('0x4e')][0x0]&&_0x25a51a[_0xffaf('0x4e')][0x0]['transcript']?_0x25a51a[_0xffaf('0x4e')][0x0][_0xffaf('0x4f')]:'';})[_0xffaf('0x50')]('\x0a');_0x4250ee=_0x28e98e['results'][_0xffaf('0x4d')](function(_0x73e62e){return _0x73e62e&&_0x73e62e[_0xffaf('0x4e')][0x0]&&_0x73e62e[_0xffaf('0x4e')][0x0][_0xffaf('0x51')]?_0x73e62e['alternatives'][0x0][_0xffaf('0x51')]:0x0;})[_0xffaf('0x50')]('\x0a');}logger[_0xffaf('0x36')]('googleASR\x20transcription',_0x1a719d);logger['info'](_0xffaf('0x52'),_0x4250ee);return{'transcript':_0x1a719d,'confidence':_0x4250ee};})[_0xffaf('0x53')](function(_0x24b628){logger[_0xffaf('0x11')](_0xffaf('0x54'),_0x24b628[_0xffaf('0x10')],_0x24b628[_0xffaf('0x55')],_0x24b628[_0xffaf('0x56')]);});};exports['googleDialogflow']=function(_0x5b3054,_0x464e58,_0x3187ae,_0x46ef32){var _0x85cd84=apiai(_0x464e58,{'language':_0x46ef32||'en'});return _0x85cd84['textRequest'](_0x3187ae,{'sessionId':md5(_0x5b3054)})[_0xffaf('0x28')](function(_0x1c9da8){logger[_0xffaf('0x36')](JSON['stringify'](_0x1c9da8));return{'source':_0x1c9da8[_0xffaf('0x57')][_0xffaf('0x58')],'resolvedQuery':_0x1c9da8[_0xffaf('0x57')][_0xffaf('0x59')],'action':_0x1c9da8[_0xffaf('0x57')][_0xffaf('0x5a')],'actionIncomplete':_0x1c9da8[_0xffaf('0x57')]['actionIncomplete'],'speech':_0x1c9da8[_0xffaf('0x57')][_0xffaf('0x5b')][_0xffaf('0x5c')],'score':_0x1c9da8[_0xffaf('0x57')][_0xffaf('0x5d')],'statusCode':_0x1c9da8['status'][_0xffaf('0x5e')],'endConversation':_0x1c9da8[_0xffaf('0x57')][_0xffaf('0x5f')]['endConversation']||![],'isFallbackIntent':_0x1c9da8[_0xffaf('0x57')]['metadata'][_0xffaf('0x60')]};});};exports[_0xffaf('0x61')]=function(_0x1c5751,_0x45009a,_0x437bc4,_0x1ec801,_0xacdbec,_0x3d8b91){var _0x9a3164=_0x1ec801[_0xffaf('0x62')](/\\n/g,'\x0a');var _0x14a604={'credentials':{'private_key':_0x9a3164,'client_email':_0x437bc4}};var _0x5ca399=new dialogflow['SessionsClient'](_0x14a604);var _0x2e4b1b=_0x5ca399['sessionPath'](_0x45009a,md5(_0x1c5751));var _0x17b19b={'session':_0x2e4b1b,'queryInput':{'text':{'text':_0xacdbec,'languageCode':_0x3d8b91}}};return _0x5ca399[_0xffaf('0x63')](_0x17b19b)[_0xffaf('0x28')](function(_0x283956){if(_0x283956&&_0x283956[_0xffaf('0x43')]){logger[_0xffaf('0x36')]('Dialogflow\x20V2\x20response:',JSON['stringify'](_0x283956));var _0x48bde6=_0x283956[0x0];if(_0x48bde6){var _0x87069c={'action':_0x48bde6[_0xffaf('0x64')][_0xffaf('0x5a')],'allRequiredParamsPresent':_0x48bde6[_0xffaf('0x64')][_0xffaf('0x65')],'endConversation':_0x48bde6[_0xffaf('0x64')]['diagnosticInfo']&&_0x48bde6[_0xffaf('0x64')][_0xffaf('0x66')][_0xffaf('0x67')]?_0x48bde6[_0xffaf('0x64')][_0xffaf('0x66')][_0xffaf('0x67')][_0xffaf('0x68')][_0xffaf('0x69')]:![],'fulfillmentText':_0x48bde6[_0xffaf('0x64')][_0xffaf('0x6a')],'intentName':_0x48bde6[_0xffaf('0x64')][_0xffaf('0x6b')][_0xffaf('0x55')],'intentDisplayName':_0x48bde6[_0xffaf('0x64')][_0xffaf('0x6b')][_0xffaf('0x6c')],'isFallbackIntent':_0x48bde6['queryResult']['intent'][_0xffaf('0x6d')],'languageCode':_0x48bde6[_0xffaf('0x64')][_0xffaf('0x6e')],'queryText':_0x48bde6[_0xffaf('0x64')]['queryText'],'responseId':_0x48bde6[_0xffaf('0x6f')],'score':_0x48bde6[_0xffaf('0x64')][_0xffaf('0x70')],'speech':_0x48bde6[_0xffaf('0x64')][_0xffaf('0x6a')],'providerResponse':JSON[_0xffaf('0x3e')](_0x283956)};return _0x87069c;}}});};exports[_0xffaf('0x71')]=function(_0x5bd1de,_0xdb575a,_0x4dab50,_0x482d8b){return tilde[_0xffaf('0x4a')](_0x5bd1de,_0xdb575a,_0x4dab50,_0x482d8b)[_0xffaf('0x28')](function(_0x1a0718){try{fs[_0xffaf('0x17')](_0x5bd1de);}catch(_0x50499b){logger[_0xffaf('0x11')](_0x50499b);}logger[_0xffaf('0x36')](_0xffaf('0x72'),_0x1a0718['transcript']);logger[_0xffaf('0x36')](_0xffaf('0x73'),_0x1a0718[_0xffaf('0x51')]);return _0x1a0718;});};exports[_0xffaf('0x74')]=function(_0x4fd9ae,_0x7c6cb8,_0x1bb75e,_0x39422a,_0x11ef6c,_0x5a9a96){var _0x2a1d99=path['resolve'](__dirname,_0xffaf('0x25'),rs[_0xffaf('0x26')](0x4)+_0xffaf('0x46'));var _0x22ce41;return aws[_0xffaf('0x75')](_0x4fd9ae,_0x7c6cb8,_0x1bb75e,_0x39422a,_0x11ef6c,_0x5a9a96,_0x2a1d99)[_0xffaf('0x28')](function(){_0x22ce41=path['resolve'](__dirname,'tmp',rs[_0xffaf('0x26')](0x4)+_0xffaf('0x47'));return convertFile(_0x2a1d99,_0x22ce41);})[_0xffaf('0x28')](function(){try{fs['unlink'](_0x2a1d99);fs['chmodSync'](_0x22ce41,_0xffaf('0x29'));}catch(_0x5a2d85){logger[_0xffaf('0x11')](_0x5a2d85);}return _0x22ce41[_0xffaf('0x38')]('.')[0x0];});};exports[_0xffaf('0x76')]=function(_0x3ce5e5,_0x5b2226,_0x387c9a,_0x121381,_0x14458b,_0x35a61c){return aws['lex'](_0x3ce5e5,_0x5b2226,_0x387c9a,_0x121381,_0x14458b,_0x35a61c)[_0xffaf('0x28')](function(_0x5659f1){logger[_0xffaf('0x36')](JSON[_0xffaf('0x3e')](_0x5659f1));return _0x5659f1;});};exports[_0xffaf('0x77')]=function(_0xedf09d,_0x2197f9,_0x343e5a,_0x361199){var _0x2d9903=util[_0xffaf('0x78')]('%s?apikey=%s&action=convert&text=%s&voice=%s&speed=%s&format=mp3',ISPEECH_API,_0xedf09d,encodeURIComponent(_0x2197f9),_0x343e5a,_0x361199);var _0x15d1c4=path['resolve'](__dirname,_0xffaf('0x25'),rs[_0xffaf('0x26')](0x4)+_0xffaf('0x46'));var _0x530682;return downloadFile(_0x2d9903,_0x15d1c4)['then'](function(){_0x530682=path['resolve'](__dirname,'tmp',rs[_0xffaf('0x26')](0x4)+'.wav');return convertFile(_0x15d1c4,_0x530682);})[_0xffaf('0x28')](function(){try{fs['unlink'](_0x15d1c4);fs[_0xffaf('0x34')](_0x530682,_0xffaf('0x29'));}catch(_0x1ed485){logger[_0xffaf('0x11')](_0x1ed485);}return _0x530682[_0xffaf('0x38')]('.')[0x0];});};exports[_0xffaf('0x79')]=function(_0x3496c,_0x53cb5f,_0x5c5135,_0x330fbc){var _0x1b289f=util['format']('%s?apikey=%s&action=recognize&locale=%s&content-type=audio/x-wav&audio=%s&%s',ISPEECH_API,_0x53cb5f,_0x5c5135,base64Encode(_0x3496c),_0x330fbc?util[_0xffaf('0x78')]('model=%s',encodeURIComponent(_0x330fbc)):_0xffaf('0x7a'));return uploadFile(_0x1b289f)[_0xffaf('0x28')](function(_0x238a81){return querystring[_0xffaf('0x9')](_0x238a81);});};exports[_0xffaf('0x7b')]=function(_0x48f0b,_0x562ff2){return sestek[_0xffaf('0x7c')](_0x48f0b,_0x562ff2)['then'](function(_0x22bcb0){logger[_0xffaf('0x36')](JSON[_0xffaf('0x3e')](_0x22bcb0));var _0x32befa={'speech':_0x22bcb0['text'],'action':_0x22bcb0[_0xffaf('0x7d')]?_0x22bcb0['channelData'][_0xffaf('0x7e')]:undefined,'actiondata':_0x22bcb0['channelData']?_0x22bcb0[_0xffaf('0x7d')][_0xffaf('0x7f')]:undefined};if(_0x22bcb0['channelData']&&_0x22bcb0[_0xffaf('0x7d')]['AudioFromTts']){return base64Decode(_0x22bcb0[_0xffaf('0x7d')][_0xffaf('0x80')][_0xffaf('0x81')],path[_0xffaf('0x35')](__dirname,_0xffaf('0x25'),rs[_0xffaf('0x26')](0x4)+_0xffaf('0x47')))[_0xffaf('0x28')](function(_0x3f8c36){_0x32befa[_0xffaf('0x82')]=_0x3f8c36;return _0x32befa;});}return _0x32befa;});};exports[_0xffaf('0x83')]=function(){return __dirname;};
\ No newline at end of file
index 8f34e03..8e03cc3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var nda=require('./nda');module['exports']={'nda':nda};
\ No newline at end of file
+var _0x6918=['./nda'];(function(_0x239249,_0x9d680a){var _0xc82ff2=function(_0x48fb60){while(--_0x48fb60){_0x239249['push'](_0x239249['shift']());}};_0xc82ff2(++_0x9d680a);}(_0x6918,0x1b7));var _0x8691=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0x6918[_0x3b380d];return _0x54502b;};var nda=require(_0x8691('0x0'));module['exports']={'nda':nda};
\ No newline at end of file
index e9f53b2..8953dc2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc788=['ndagenerate_audio','body','AudioOutputSettings','audio/wav','custom_action','CustomAction','CustomActionData','custom_action_data','info','stringify','request-promise','url','../../../../../config/logger','POST','resolve','/token','password','username','then','ndassistant_url','/api/NaturalDialogAssistant/v1/Run','ndaactivity_type','Nda','callerid','calleridname','extension','text','access_token','channelData','ProjectName','project'];(function(_0x4fb53d,_0x4786c8){var _0xf894bf=function(_0x93a291){while(--_0x93a291){_0x4fb53d['push'](_0x4fb53d['shift']());}};_0xf894bf(++_0x4786c8);}(_0xc788,0xc4));var _0x8c78=function(_0x39fe3f,_0x38b8eb){_0x39fe3f=_0x39fe3f-0x0;var _0x50d483=_0xc788[_0x39fe3f];return _0x50d483;};'use strict';var rp=require(_0x8c78('0x0'));var url=require(_0x8c78('0x1'));var logger=require(_0x8c78('0x2'))('agi');module['exports']=function(_0x1c7ff3,_0x1af8e2){var _0x23eec0={'method':_0x8c78('0x3'),'uri':url[_0x8c78('0x4')](_0x1af8e2['ndauth_url'],_0x8c78('0x5')),'form':{'grant_type':_0x8c78('0x6'),'username':_0x1af8e2[_0x8c78('0x7')],'password':_0x1af8e2[_0x8c78('0x6')]},'json':!![]};return rp(_0x23eec0)[_0x8c78('0x8')](function(_0x4d54a5){var _0x247188={'method':_0x8c78('0x3'),'uri':url[_0x8c78('0x4')](_0x1af8e2[_0x8c78('0x9')],_0x8c78('0xa')),'body':{'type':_0x1af8e2[_0x8c78('0xb')]||'message','channelId':_0x8c78('0xc'),'conversation':{'id':_0x1c7ff3['uniqueid']},'from':{'id':_0x1c7ff3[_0x8c78('0xd')],'name':_0x1c7ff3[_0x8c78('0xe')]},'recipient':{'id':_0x1c7ff3['dnid'],'name':_0x1c7ff3[_0x8c78('0xf')]},'text':_0x1af8e2[_0x8c78('0x10')],'channelData':{}},'headers':{'Authorization':'Bearer\x20'+_0x4d54a5[_0x8c78('0x11')]},'json':!![]};if(_0x1af8e2['project']){_0x247188['body'][_0x8c78('0x12')][_0x8c78('0x13')]=_0x1af8e2[_0x8c78('0x14')];}if(_0x1af8e2[_0x8c78('0x15')]=='1'){_0x247188[_0x8c78('0x16')][_0x8c78('0x12')][_0x8c78('0x17')]={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':_0x8c78('0x18')};}if(_0x1af8e2[_0x8c78('0x19')]){_0x247188[_0x8c78('0x16')]['channelData'][_0x8c78('0x1a')]=_0x1af8e2[_0x8c78('0x19')];if(_0x1af8e2['custom_action_data']){_0x247188[_0x8c78('0x16')][_0x8c78('0x12')][_0x8c78('0x1b')]=_0x1af8e2[_0x8c78('0x1c')];}}logger[_0x8c78('0x1d')](JSON[_0x8c78('0x1e')](_0x247188));return rp(_0x247188);});};
\ No newline at end of file
+var _0x9c02=['/api/NaturalDialogAssistant/v1/Run','ndaactivity_type','uniqueid','calleridname','dnid','extension','text','Bearer\x20','access_token','body','channelData','ProjectName','project','ndagenerate_audio','AudioOutputSettings','audio/wav','custom_action','CustomAction','custom_action_data','CustomActionData','info','stringify','request-promise','url','../../../../../config/logger','resolve','/token','username','password','then','POST','ndassistant_url'];(function(_0x38ff1e,_0x3b9385){var _0x3755d4=function(_0x6e6692){while(--_0x6e6692){_0x38ff1e['push'](_0x38ff1e['shift']());}};_0x3755d4(++_0x3b9385);}(_0x9c02,0x196));var _0x29c0=function(_0x2bd1c9,_0x41c82b){_0x2bd1c9=_0x2bd1c9-0x0;var _0x5b82a5=_0x9c02[_0x2bd1c9];return _0x5b82a5;};'use strict';var rp=require(_0x29c0('0x0'));var url=require(_0x29c0('0x1'));var logger=require(_0x29c0('0x2'))('agi');module['exports']=function(_0x4e8fe7,_0x52dba5){var _0x28006b={'method':'POST','uri':url[_0x29c0('0x3')](_0x52dba5['ndauth_url'],_0x29c0('0x4')),'form':{'grant_type':'password','username':_0x52dba5[_0x29c0('0x5')],'password':_0x52dba5[_0x29c0('0x6')]},'json':!![]};return rp(_0x28006b)[_0x29c0('0x7')](function(_0x5beeb6){var _0x58fa3e={'method':_0x29c0('0x8'),'uri':url[_0x29c0('0x3')](_0x52dba5[_0x29c0('0x9')],_0x29c0('0xa')),'body':{'type':_0x52dba5[_0x29c0('0xb')]||'message','channelId':'Nda','conversation':{'id':_0x4e8fe7[_0x29c0('0xc')]},'from':{'id':_0x4e8fe7['callerid'],'name':_0x4e8fe7[_0x29c0('0xd')]},'recipient':{'id':_0x4e8fe7[_0x29c0('0xe')],'name':_0x4e8fe7[_0x29c0('0xf')]},'text':_0x52dba5[_0x29c0('0x10')],'channelData':{}},'headers':{'Authorization':_0x29c0('0x11')+_0x5beeb6[_0x29c0('0x12')]},'json':!![]};if(_0x52dba5['project']){_0x58fa3e[_0x29c0('0x13')][_0x29c0('0x14')][_0x29c0('0x15')]=_0x52dba5[_0x29c0('0x16')];}if(_0x52dba5[_0x29c0('0x17')]=='1'){_0x58fa3e[_0x29c0('0x13')][_0x29c0('0x14')][_0x29c0('0x18')]={'Generate':!![],'PutInStructuredPart':![],'ExpectedFormat':_0x29c0('0x19')};}if(_0x52dba5[_0x29c0('0x1a')]){_0x58fa3e[_0x29c0('0x13')][_0x29c0('0x14')][_0x29c0('0x1b')]=_0x52dba5[_0x29c0('0x1a')];if(_0x52dba5[_0x29c0('0x1c')]){_0x58fa3e[_0x29c0('0x13')][_0x29c0('0x14')][_0x29c0('0x1d')]=_0x52dba5[_0x29c0('0x1c')];}}logger[_0x29c0('0x1e')](JSON[_0x29c0('0x1f')](_0x58fa3e));return rp(_0x58fa3e);});};
\ No newline at end of file
index 2c058d7..342a29e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8a9a=['exports'];(function(_0x8c43de,_0x90ff31){var _0xa6591b=function(_0x469716){while(--_0x469716){_0x8c43de['push'](_0x8c43de['shift']());}};_0xa6591b(++_0x90ff31);}(_0x8a9a,0x17f));var _0xa8a9=function(_0x550d12,_0x5384bd){_0x550d12=_0x550d12-0x0;var _0x12103d=_0x8a9a[_0x550d12];return _0x12103d;};'use strict';var asr=require('./lib/api');module[_0xa8a9('0x0')]=function(_0xe8ec68,_0x3bd3c3,_0x1b7425,_0x3e6b18){return asr(_0xe8ec68,_0x3bd3c3,_0x1b7425,_0x3e6b18);};
\ No newline at end of file
+var _0x4163=['./lib/api','exports'];(function(_0x55454f,_0x221c1d){var _0xbb1441=function(_0x121371){while(--_0x121371){_0x55454f['push'](_0x55454f['shift']());}};_0xbb1441(++_0x221c1d);}(_0x4163,0x1de));var _0x3416=function(_0x3ac34b,_0x278b53){_0x3ac34b=_0x3ac34b-0x0;var _0x3a02a7=_0x4163[_0x3ac34b];return _0x3a02a7;};'use strict';var asr=require(_0x3416('0x0'));module[_0x3416('0x1')]=function(_0x293391,_0x4f0e31,_0x6a411,_0x1b85c6){return asr(_0x293391,_0x4f0e31,_0x6a411,_0x1b85c6);};
\ No newline at end of file
index b4a3374..319fefa 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0c16=['update','hex','info','Open\x20Tilde\x20ASR\x20socket','unix','send','stringify','createReadStream','data','close','EOS','error','terminate','parse','result','final','hypotheses','transcript','likelihood','Success.','Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.','Not\x20available.\x20Max\x20load\x20limit\x20reached.','Authentication\x20failed.','All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.','Close\x20Tilde\x20ASR\x20socket','Error\x20Tilde\x20ASR\x20socket','isNil','isObject','open','bluebird','lodash','moment','../../../../../../config/logger','agi','exports','wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE','No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech','sha1'];(function(_0x21a9d9,_0x4d5ac8){var _0x46adce=function(_0xfdd336){while(--_0xfdd336){_0x21a9d9['push'](_0x21a9d9['shift']());}};_0x46adce(++_0x4d5ac8);}(_0x0c16,0x101));var _0x60c1=function(_0x37928a,_0x46c7c7){_0x37928a=_0x37928a-0x0;var _0xbff5a9=_0x0c16[_0x37928a];return _0xbff5a9;};'use strict';var BPromise=require(_0x60c1('0x0'));var _=require(_0x60c1('0x1'));var fs=require('fs');var WebSocket=require('ws');var moment=require(_0x60c1('0x2'));var crypto=require('crypto');var logger=require(_0x60c1('0x3'))(_0x60c1('0x4'));module[_0x60c1('0x5')]=function(_0x1d459b,_0x4dd13d,_0x2618b8,_0x367127){return new BPromise(function(_0x56352b,_0x46e4a3){logger['info']('Tilde\x20URI',_0x367127||_0x60c1('0x6'));var _0x2deb12=new WebSocket(_0x367127||'wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE',{'perMessageDeflate':![]});var _0x5aabec='';var _0x491b39='0';var _0x5f3f36='1';var _0x4917dd=_0x60c1('0x7');function _0x1a74b7(_0x17eadd){var _0x11f81f=crypto['createHash'](_0x60c1('0x8'));_0x11f81f[_0x60c1('0x9')](_0x17eadd);return _0x11f81f['digest'](_0x60c1('0xa'));}function _0xc37134(){try{logger[_0x60c1('0xb')](_0x60c1('0xc'));var _0x378db1=moment()[_0x60c1('0xd')]();var _0x38997c=_0x1a74b7(_0x378db1+_0x4dd13d+_0x2618b8);_0x2deb12[_0x60c1('0xe')](JSON[_0x60c1('0xf')]({'appID':_0x4dd13d,'timestamp':_0x378db1,'appKey':_0x38997c}));var _0x322f92=fs[_0x60c1('0x10')](_0x1d459b);_0x322f92['on'](_0x60c1('0x11'),function(_0xc83d1){_0x2deb12[_0x60c1('0xe')](_0xc83d1);});_0x322f92['on'](_0x60c1('0x12'),function(){_0x2deb12[_0x60c1('0xe')](_0x60c1('0x13'));});}catch(_0x3a3237){logger[_0x60c1('0x14')]('Tilde\x20ASR\x20send\x20error',JSON[_0x60c1('0xf')](_0x3a3237));_0x2deb12[_0x60c1('0x15')]();}}function _0x5ec07c(_0x1e714a){try{if(_0x1e714a){var _0xfdbd10=JSON[_0x60c1('0x16')](_0x1e714a);switch(_0xfdbd10['status']){case 0x0:if(_0xfdbd10[_0x60c1('0x17')]){if(_0xfdbd10[_0x60c1('0x17')][_0x60c1('0x18')]){logger[_0x60c1('0xb')]('Tilde\x20ASR\x20hypoteses',JSON['stringify'](_0xfdbd10[_0x60c1('0x17')][_0x60c1('0x19')]));_0x5aabec=_0xfdbd10[_0x60c1('0x17')][_0x60c1('0x19')][0x0][_0x60c1('0x1a')];_0x491b39=_0xfdbd10['result'][_0x60c1('0x19')][0x0][_0x60c1('0x1b')];_0x5f3f36='0';_0x4917dd=_0x60c1('0x1c');_0x2deb12['terminate']();}}break;case 0x1:logger[_0x60c1('0xb')](_0x60c1('0x7'));_0x5f3f36='1';_0x4917dd='No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech';break;case 0x2:logger[_0x60c1('0xb')](_0x60c1('0x1d'));_0x5f3f36='2';_0x4917dd=_0x60c1('0x1d');break;case 0x9:logger[_0x60c1('0xb')](_0x60c1('0x1e'));_0x5f3f36='9';_0x4917dd=_0x60c1('0x1e');break;case 0xa:logger[_0x60c1('0xb')]('Authentication\x20failed.');_0x5f3f36='10';_0x4917dd=_0x60c1('0x1f');break;case 0xb:logger['info'](_0x60c1('0x20'));_0x5f3f36='11';_0x4917dd=_0x60c1('0x20');}}}catch(_0x40a002){logger[_0x60c1('0x14')]('Tilde\x20ASR\x20parse\x20error',JSON['stringify'](_0x40a002));_0x2deb12['terminate']();}}function _0x51bed2(){logger[_0x60c1('0xb')](_0x60c1('0x21'));_0x56352b({'transcript':_0x5aabec,'confidence':_0x491b39,'status':_0x5f3f36,'status_message':_0x4917dd});}function _0x26922b(_0x194ab9){logger[_0x60c1('0x14')](_0x60c1('0x22'));if(!_[_0x60c1('0x23')](_0x194ab9)){logger[_0x60c1('0x14')](_[_0x60c1('0x24')](_0x194ab9)?JSON[_0x60c1('0xf')](_0x194ab9):_0x194ab9);}}_0x2deb12['on'](_0x60c1('0x25'),_0xc37134);_0x2deb12['on']('message',_0x5ec07c);_0x2deb12['on'](_0x60c1('0x12'),_0x51bed2);_0x2deb12['on']('error',_0x26922b);});};
\ No newline at end of file
+var _0xef13=['send','close','EOS','error','terminate','parse','final','Tilde\x20ASR\x20hypoteses','result','hypotheses','transcript','likelihood','Success.','Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.','Not\x20available.\x20Max\x20load\x20limit\x20reached.','Authentication\x20failed.','All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.','Tilde\x20ASR\x20parse\x20error','Close\x20Tilde\x20ASR\x20socket','Error\x20Tilde\x20ASR\x20socket','isNil','isObject','open','bluebird','lodash','moment','crypto','../../../../../../config/logger','exports','info','Tilde\x20URI','wss://runa.tilde.lv/client/ws/speech/LVASR-ONLINE','No\x20speech.\x20Sent\x20when\x20the\x20incoming\x20audio\x20contains\x20a\x20large\x20portion\x20of\x20silence\x20or\x20non-speech','update','digest','hex','Open\x20Tilde\x20ASR\x20socket','unix','stringify','createReadStream','data'];(function(_0x92a466,_0x51f597){var _0x3ae4de=function(_0x5ad3ee){while(--_0x5ad3ee){_0x92a466['push'](_0x92a466['shift']());}};_0x3ae4de(++_0x51f597);}(_0xef13,0x136));var _0x3ef1=function(_0x22fdcc,_0x4ae41e){_0x22fdcc=_0x22fdcc-0x0;var _0x457720=_0xef13[_0x22fdcc];return _0x457720;};'use strict';var BPromise=require(_0x3ef1('0x0'));var _=require(_0x3ef1('0x1'));var fs=require('fs');var WebSocket=require('ws');var moment=require(_0x3ef1('0x2'));var crypto=require(_0x3ef1('0x3'));var logger=require(_0x3ef1('0x4'))('agi');module[_0x3ef1('0x5')]=function(_0x95e270,_0x3805a1,_0x38a8bc,_0x26d6a8){return new BPromise(function(_0x3707db,_0x42d77d){logger[_0x3ef1('0x6')](_0x3ef1('0x7'),_0x26d6a8||_0x3ef1('0x8'));var _0x4c2d48=new WebSocket(_0x26d6a8||_0x3ef1('0x8'),{'perMessageDeflate':![]});var _0x407a16='';var _0x1c8c33='0';var _0x1cb594='1';var _0x1fb2de=_0x3ef1('0x9');function _0x4439ba(_0xd1256b){var _0x103862=crypto['createHash']('sha1');_0x103862[_0x3ef1('0xa')](_0xd1256b);return _0x103862[_0x3ef1('0xb')](_0x3ef1('0xc'));}function _0x2c210b(){try{logger[_0x3ef1('0x6')](_0x3ef1('0xd'));var _0x1bc324=moment()[_0x3ef1('0xe')]();var _0x54c78c=_0x4439ba(_0x1bc324+_0x3805a1+_0x38a8bc);_0x4c2d48['send'](JSON[_0x3ef1('0xf')]({'appID':_0x3805a1,'timestamp':_0x1bc324,'appKey':_0x54c78c}));var _0x22364b=fs[_0x3ef1('0x10')](_0x95e270);_0x22364b['on'](_0x3ef1('0x11'),function(_0x49098c){_0x4c2d48[_0x3ef1('0x12')](_0x49098c);});_0x22364b['on'](_0x3ef1('0x13'),function(){_0x4c2d48[_0x3ef1('0x12')](_0x3ef1('0x14'));});}catch(_0x303349){logger[_0x3ef1('0x15')]('Tilde\x20ASR\x20send\x20error',JSON[_0x3ef1('0xf')](_0x303349));_0x4c2d48[_0x3ef1('0x16')]();}}function _0x3703dd(_0x2350f2){try{if(_0x2350f2){var _0x137ec6=JSON[_0x3ef1('0x17')](_0x2350f2);switch(_0x137ec6['status']){case 0x0:if(_0x137ec6['result']){if(_0x137ec6['result'][_0x3ef1('0x18')]){logger[_0x3ef1('0x6')](_0x3ef1('0x19'),JSON[_0x3ef1('0xf')](_0x137ec6[_0x3ef1('0x1a')][_0x3ef1('0x1b')]));_0x407a16=_0x137ec6[_0x3ef1('0x1a')][_0x3ef1('0x1b')][0x0][_0x3ef1('0x1c')];_0x1c8c33=_0x137ec6['result'][_0x3ef1('0x1b')][0x0][_0x3ef1('0x1d')];_0x1cb594='0';_0x1fb2de=_0x3ef1('0x1e');_0x4c2d48[_0x3ef1('0x16')]();}}break;case 0x1:logger['info'](_0x3ef1('0x9'));_0x1cb594='1';_0x1fb2de=_0x3ef1('0x9');break;case 0x2:logger[_0x3ef1('0x6')](_0x3ef1('0x1f'));_0x1cb594='2';_0x1fb2de='Aborted.\x20Recognition\x20was\x20aborted\x20for\x20some\x20reason.';break;case 0x9:logger[_0x3ef1('0x6')]('Not\x20available.\x20Max\x20load\x20limit\x20reached.');_0x1cb594='9';_0x1fb2de=_0x3ef1('0x20');break;case 0xa:logger[_0x3ef1('0x6')]('Authentication\x20failed.');_0x1cb594='10';_0x1fb2de=_0x3ef1('0x21');break;case 0xb:logger['info'](_0x3ef1('0x22'));_0x1cb594='11';_0x1fb2de='All\x20recognition\x20workers\x20are\x20currently\x20in\x20use\x20and\x20real-time\x20recognition\x20is\x20not\x20possible.';}}}catch(_0x37bb3a){logger[_0x3ef1('0x15')](_0x3ef1('0x23'),JSON[_0x3ef1('0xf')](_0x37bb3a));_0x4c2d48[_0x3ef1('0x16')]();}}function _0x2258c3(){logger[_0x3ef1('0x6')](_0x3ef1('0x24'));_0x3707db({'transcript':_0x407a16,'confidence':_0x1c8c33,'status':_0x1cb594,'status_message':_0x1fb2de});}function _0x686afa(_0x27a530){logger[_0x3ef1('0x15')](_0x3ef1('0x25'));if(!_[_0x3ef1('0x26')](_0x27a530)){logger[_0x3ef1('0x15')](_[_0x3ef1('0x27')](_0x27a530)?JSON[_0x3ef1('0xf')](_0x27a530):_0x27a530);}}_0x4c2d48['on'](_0x3ef1('0x28'),_0x2c210b);_0x4c2d48['on']('message',_0x3703dd);_0x4c2d48['on']('close',_0x2258c3);_0x4c2d48['on']('error',_0x686afa);});};
\ No newline at end of file
index ab59c40..b60f8c4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x95ee=['exports','./asr'];(function(_0x33f13b,_0x2f74b5){var _0x33293c=function(_0x3fe101){while(--_0x3fe101){_0x33f13b['push'](_0x33f13b['shift']());}};_0x33293c(++_0x2f74b5);}(_0x95ee,0x101));var _0xe95e=function(_0x4c12ec,_0x2e9103){_0x4c12ec=_0x4c12ec-0x0;var _0x3ae42c=_0x95ee[_0x4c12ec];return _0x3ae42c;};var asr=require(_0xe95e('0x0'));module[_0xe95e('0x1')]={'asr':asr};
\ No newline at end of file
+var _0x1a2a=['exports'];(function(_0xe6f4ef,_0x4e34cc){var _0x4f3447=function(_0x1538ff){while(--_0x1538ff){_0xe6f4ef['push'](_0xe6f4ef['shift']());}};_0x4f3447(++_0x4e34cc);}(_0x1a2a,0x134));var _0xa1a2=function(_0x195299,_0x7a1c77){_0x195299=_0x195299-0x0;var _0x258842=_0x1a2a[_0x195299];return _0x258842;};var asr=require('./asr');module[_0xa1a2('0x0')]={'asr':asr};
\ No newline at end of file
index 76ca655..efa0f50 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c44=['./error','./channel','127.0.0.1','call','emit','error','createServer','listen','listening','getConnections','destroy','E_AGI_SERVER_MAXCONNECTION','ready','connection','E_AGI_SERVER_ERROR','code','close','E_AGI_SERVER_CLOSE','nextTick','events','EventEmitter'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x9c44,0x178));var _0x49c4=function(_0x465a0c,_0x19d4d5){_0x465a0c=_0x465a0c-0x0;var _0x1e202e=_0x9c44[_0x465a0c];return _0x1e202e;};'use strict';var util=require('util');var net=require('net');var EventEmitter=require(_0x49c4('0x0'))[_0x49c4('0x1')];var AGIError=require(_0x49c4('0x2'));var AGIChannel=require(_0x49c4('0x3'));var AGIServer=function(_0x455700,_0x2ad237,_0x4e0313){var _0x4941f1=this;var _0x41a183=null;var _0x57effd=0x0;if(!_0x455700)_0x455700=0x11dd;if(!_0x2ad237)_0x2ad237=_0x49c4('0x4');EventEmitter[_0x49c4('0x5')](_0x4941f1);function _0x69bc41(){if(!_0x455700){_0x4941f1[_0x49c4('0x6')](_0x49c4('0x7'),new AGIError('E_AGI_ARGUMENT_PORT'));return![];}_0x41a183=net[_0x49c4('0x8')]();_0x41a183[_0x49c4('0x9')](_0x455700,_0x2ad237);_0x41a183['on'](_0x49c4('0xa'),function(){_0x4941f1[_0x49c4('0x6')]('listening');});_0x41a183['on']('connection',function(_0x451ea6){_0x41a183[_0x49c4('0xb')](function(_0x58cad7,_0xb611a1){if(_0x58cad7){_0x4941f1[_0x49c4('0x6')]('error',new AGIError('E_AGI_SERVER_ERROR',_0x58cad7));}else if(_0x4e0313&&_0x4e0313<0x0){_0x4941f1[_0x49c4('0x6')](_0x49c4('0x7'),new AGIError('E_AGI_SERVER_VOICE_DISABLED'));_0x451ea6[_0x49c4('0xc')]();}else if(_0x4e0313&&_0x4e0313>0x0&&_0x4e0313<_0xb611a1){_0x57effd+=0x1;_0x4941f1[_0x49c4('0x6')]('error',new AGIError(_0x49c4('0xd'),_0x57effd));_0x451ea6[_0x49c4('0xc')]();}else{var _0x21f15a=new AGIChannel(_0x451ea6);_0x21f15a['on'](_0x49c4('0xe'),function(){_0x4941f1[_0x49c4('0x6')](_0x49c4('0xf'),_0x21f15a);});}});});_0x41a183['on'](_0x49c4('0x7'),function(_0x3de397){_0x4941f1['emit'](_0x49c4('0x7'),new AGIError(_0x49c4('0x10'),_0x3de397[_0x49c4('0x11')]));});_0x41a183['on'](_0x49c4('0x12'),function(){_0x4941f1[_0x49c4('0x6')]('close',new AGIError(_0x49c4('0x13')));});}process[_0x49c4('0x14')](function(){_0x69bc41();});};util['inherits'](AGIServer,EventEmitter);module['exports']=function(_0x3c782d,_0x2f82d5,_0x3addb2){return new AGIServer(_0x3c782d,_0x2f82d5,_0x3addb2);};
\ No newline at end of file
+var _0x9c44=['./error','./channel','127.0.0.1','call','emit','error','createServer','listen','listening','getConnections','destroy','E_AGI_SERVER_MAXCONNECTION','ready','connection','E_AGI_SERVER_ERROR','code','close','E_AGI_SERVER_CLOSE','nextTick','events','EventEmitter'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x9c44,0x178));var _0x49c4=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0x9c44[_0x3ab51d];return _0x29a04e;};'use strict';var util=require('util');var net=require('net');var EventEmitter=require(_0x49c4('0x0'))[_0x49c4('0x1')];var AGIError=require(_0x49c4('0x2'));var AGIChannel=require(_0x49c4('0x3'));var AGIServer=function(_0x455700,_0x2ad237,_0x4e0313){var _0x4941f1=this;var _0x41a183=null;var _0x57effd=0x0;if(!_0x455700)_0x455700=0x11dd;if(!_0x2ad237)_0x2ad237=_0x49c4('0x4');EventEmitter[_0x49c4('0x5')](_0x4941f1);function _0x69bc41(){if(!_0x455700){_0x4941f1[_0x49c4('0x6')](_0x49c4('0x7'),new AGIError('E_AGI_ARGUMENT_PORT'));return![];}_0x41a183=net[_0x49c4('0x8')]();_0x41a183[_0x49c4('0x9')](_0x455700,_0x2ad237);_0x41a183['on'](_0x49c4('0xa'),function(){_0x4941f1[_0x49c4('0x6')]('listening');});_0x41a183['on']('connection',function(_0x451ea6){_0x41a183[_0x49c4('0xb')](function(_0x58cad7,_0xb611a1){if(_0x58cad7){_0x4941f1[_0x49c4('0x6')]('error',new AGIError('E_AGI_SERVER_ERROR',_0x58cad7));}else if(_0x4e0313&&_0x4e0313<0x0){_0x4941f1[_0x49c4('0x6')](_0x49c4('0x7'),new AGIError('E_AGI_SERVER_VOICE_DISABLED'));_0x451ea6[_0x49c4('0xc')]();}else if(_0x4e0313&&_0x4e0313>0x0&&_0x4e0313<_0xb611a1){_0x57effd+=0x1;_0x4941f1[_0x49c4('0x6')]('error',new AGIError(_0x49c4('0xd'),_0x57effd));_0x451ea6[_0x49c4('0xc')]();}else{var _0x21f15a=new AGIChannel(_0x451ea6);_0x21f15a['on'](_0x49c4('0xe'),function(){_0x4941f1[_0x49c4('0x6')](_0x49c4('0xf'),_0x21f15a);});}});});_0x41a183['on'](_0x49c4('0x7'),function(_0x3de397){_0x4941f1['emit'](_0x49c4('0x7'),new AGIError(_0x49c4('0x10'),_0x3de397[_0x49c4('0x11')]));});_0x41a183['on'](_0x49c4('0x12'),function(){_0x4941f1[_0x49c4('0x6')]('close',new AGIError(_0x49c4('0x13')));});}process[_0x49c4('0x14')](function(){_0x69bc41();});};util['inherits'](AGIServer,EventEmitter);module['exports']=function(_0x3c782d,_0x2f82d5,_0x3addb2){return new AGIServer(_0x3c782d,_0x2f82d5,_0x3addb2);};
\ No newline at end of file
index c588bff..a663d60 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6c7b=['application','Executed\x20command\x20%s\x20%s','lumenvoxtts','sestektts','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','lumenvoxasr','Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block','MRCPRecog','RECOG_CONFIDENCE()','LUMENVOX_ASR_CONFIDENCE','LUMENVOX_ASR_TRANSCRIPT','LUMENVOX_ASR_INSTANCE','Enter\x20in\x20SESTEKASR\x20(%s)\x20block','SESTEK_ASR_CONFIDENCE','Enter\x20in\x20DATABASE\x20(%s)\x20block','odbc_id','no\x20odbc\x20database\x20found','no\x20query\x20configured','query:\x20%s','getQueryOdbc','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','no\x20variable\x20found','keys','forEach','%s[%s][%s]','variable\x20%s\x20set','dial','debug','Enter\x20in\x20DIAL\x20(%s)\x20block','sip_id','no\x20user\x20selected','SIP/%s','Executed\x20command\x20%s','dialogflow','no\x20key\x20configured','DIALOGFLOW_%s','Dialogflow\x20Result\x20%s','speech','Dialogflow\x20is\x20unreachable','dialogflowV2','Enter\x20in\x20DIALOGFLOW\x20V2\x20(%s)\x20block','dialogflowV2_project_id','no\x20project_id\x20configured','no\x20client_email\x20configured','private_key','no\x20private_key\x20configured','no\x20anguage\x20configured','Trying\x20DialogflowV2:\x20%s','providerResponse','out','DialogflowV2\x20Result\x20%s','DialogflowV2\x20is\x20unreachable','sesteknda','Enter\x20in\x20SESTEKNDA\x20(%s)\x20block','ndauth_url','username','no\x20username\x20configured','password','no\x20password\x20configured','bot','Trying\x20SestekNDA:\x20%s','SESTEK_NDA_%s','Sestek\x20NDA\x20%s\x20file\x20created','audiofile','streamFile','unlink','.wav','Enter\x20in\x20END\x20(%s)\x20block','end','ext_dial','Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block','trunk_id','no\x20trunk\x20selected','getTrunk','no\x20trunk\x20found','trunk_name','opts','Enter\x20in\x20FINALLY\x20(%s)\x20block','finally','file_id','no\x20file\x20audio\x20found','response','maxdigit','test','mindigit','hiddendigitsnum','generate','hiddendigitspos','first','substr','goal','Enter\x20in\x20GOAL\x20(%s)\x20block','goalname','GOAL\x20%s','awspolly','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','Trying\x20aws\x20Polly\x20%s','aws\x20Polly\x20is\x20unreachable','awslex','aws_bot_name','no\x20bot\x20name\x20configured','Trying\x20Amazon\x20Lex:\x20%s','Amazon\x20Lex\x20ready\x20for\x20fulfillment','amazonlex','Amazon\x20Lex\x20Result\x20%s','Amazon\x20Lex\x20is\x20unreachable','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','beep','NOBEEP','recordFile','intKey','google\x20%s\x20file\x20created','GOOGLE_ASR_%s','GoogleASR\x20Result\x20%s','Enter\x20in\x20TILDEASR\x20(%s)\x20block','no\x20appid\x20configured','no\x20appsecret\x20configured','wav','tilde\x20%s\x20file\x20created','TILDE_ASR_%s','continueAt','gotoif','Enter\x20in\x20GOTOIF\x20(%s)\x20block','no\x20condition\x20configured','condition','gotoiftime','interval_id','no\x20intervals\x20found','IFTIME(%s?true:false)','IFTIME\x20%s\x20%s','true','false','hangup','ispeechasr','Enter\x20in\x20ISPEECHASR\x20(%s)\x20block','%s/recordings/%s','ispeechASR','ISPEECH_ASR_%s','ispeechtts','Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block','Trying\x20ispeech\x20TTS\x20%s','ispeech\x20%s\x20file\x20created','ispeech\x20TTS\x20is\x20unreachable','Enter\x20in\x20LOGIN\x20(%s)\x20block','findBy','no\x20find\x20by\x20configured','FIND\x20AGENT\x20%s\x20BY\x20%s','AGENT\x20%s\x20FOUND\x20BY','success','AGENT\x20%s\x20NOT\x20FOUND\x20BY','Enter\x20in\x20LOGOUT\x20(%s)\x20block','failure','math','Enter\x20in\x20MATH\x20(%s)\x20block','no\x20operation\x20configured','math\x20%s','operation','variable\x20%s[key]\x20set','Enter\x20in\x20MENU\x20(%s)\x20block','no\x20file\x20audio\x20selected','output','pause','Enter\x20in\x20PAUSE\x20(%s)\x20block','pause_id','playback','Enter\x20in\x20PLAYBACK\x20(%s)\x20block','PLAYBACK','queue','Enter\x20in\x20QUEUE\x20(%s)\x20block','queue_id','no\x20queue\x20found','indexOf','toLowerCase','QUEUE','macro','gosub','position','record','Enter\x20in\x20RECORD\x20(%s)\x20block','recordingFormat','%s_%s','%s/recordings/%s.%s','escape_digits','restapi','Enter\x20in\x20RESTAPI\x20(%s)\x20block','no\x20url\x20configured','inspect','no\x20variable\x20selected\x20for\x20the\x20response','200','%s_STATUS_MESSAGE','statusMessage','Unable\x20to\x20set\x20result\x20in\x20variable\x20%s','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','sayDigits','digits','saynumber','Enter\x20in\x20SAYNUMBER\x20(%s)\x20block','sayNumber','sayphonetic','Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block','sayPhonetic','account_id','no\x20mail\x20account\x20configured','no\x20mail\x20account\x20found','\x22%s\x22\x20<%s>','Smtp','user','bcc','subject','template_id','sendMail\x20message','Trying\x20SendMail\x20with\x20account\x20%s','smtpOptions','Mail\x20message\x20added\x20to\x20outgoing\x20process','sendFax','Enter\x20in\x20SENDFAX\x20(%s)\x20block','sendSMS','Enter\x20in\x20SENDSMS\x20(%s)\x20block','sms_account_id','no\x20sms\x20account\x20configured','no\x20sms\x20account\x20found','sms_text','sendSMS\x20message','Trying\x20SendSMS\x20with\x20account\x20%s','Sms\x20message\x20added\x20to\x20outgoing\x20process','set','Enter\x20in\x20SET\x20(%s)\x20block','no\x20variable\x20selected','variable_value','Enter\x20in\x20START\x20(%s)\x20block','START\x20CALLY\x20SQUARE','XMCS-UNIQUEID','Answer','subproject','Enter\x20in\x20SUBPROJECT\x20(%s)\x20block','project_id','no\x20subproject\x20selected','getSquareProject','no\x20subproject\x20found\x20with\x20id\x20%d','arg_1','project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project','AGI','agi://%s/square,\x22%s\x22,\x22%s\x22','127.0.0.1','system','Enter\x20in\x20SYSTEM\x20(%s)\x20block','shellCommand','sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s','google_cloud_tts','Enter\x20in\x20Google\x20Cloud\x20TTS\x20(%s)\x20block','no\x20apiKey\x20configured','Trying\x20Google\x20Cloud\x20TTS\x20%s','Google\x20Cloud\x20TTS\x20%s\x20file\x20created','tts','Enter\x20in\x20GOOGLETTS\x20(%s)\x20block','Trying\x20Google\x20TTS\x20%s','Google\x20TTS\x20is\x20unreachable','unpause','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','Enter\x20in\x20VOICEMAIL\x20(%s)\x20block','VOICEMAIL','mailbox','Enter\x20in\x20SWITCH\x20(%s)\x20block','join','exports','util','randomstring','mustache','request-promise','../../config/logger','../../config/environment','./scripts','/var/opt/motion2/server/files','rawHeaders','rawBody','getdigits','getsecretdigits','channel','rpc','mailRpc','getVariableById','then','name','prototype','getVoiceQueue','getVoiceQueueById','getSquareProjectById','catch','getSquareOdbc','getSquareOdbcById','dsn','getUser','getTrunkById','getSound','getSoundById','getMailAccount','getMailAccountById','sendMailMessage','getIntervals','IntervalId','interval','map','Intervals','getSoundPath','format','%s/sounds/converted/%s','open','error','Error\x20getting\x20ODBC\x20connection\x20%s','info','ODBC\x20connection\x20successfully','query','close','Error\x20closing\x20connection\x20to\x20odbc\x20%s','getSmsAccount','createSmsMessage','createSquareDetailsReport','uniqueid','label','agicommand','callerid','createSquareRecording','calleridname','context','extension','priority','accountcode','dnid','file','createSquareMessage','createCmContact','isEmpty','isNil','callback_','random','lastName','phone','list_id','scheduledAt','callback','Callback\x20scheduled\x20at\x20','toString','callback_priority','getPause','getPauseById','agentPause','agent','agentUnpause','agentLogout','agentLogin','exec','trim','replace','googleCloudTTS','apiKey','google_cloud_tts_text_type','text','languageCode','en-US','ssmlGender','MP3','googleTTS','google_tts_language','restAPI','url','method','timeout','number','includes','POST','PUT','toUpperCase','body','parse','An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function','headers','An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function','computedVariables','sync','uri','render','stringify','An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function','statusCode','message','500\x20-\x20Internal\x20Server\x20Error','options','googleDialogflow','googleDialogflowV2','client_email','dialogflowV2_language','sestekNDA','ispeechTTS','key','ispeech_tts_language','isConfigured','model','awsPolly','aws_access_key_id','aws_secret_access_key','aws_polly_region','aws_polly_voice','Amy','aws_text_type','awsLex','googleASR','google_asr_language','tildeASR','appid','appsecret','clone','isString','replaceObjectAllVariables','replaceAllVariables','recursiveNodeIndex','isArray','length','hasOwnProperty','isPlainObject','saveRestApiResult','%s.%s','setVariable','split','replaceAll','getVariable','extra','getAndSetVariable','The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s','maxRetry','retry','mrcpsynth','Enter\x20in\x20MRCPSynth\x20(%s)\x20block','no\x20text\x20configured','MRCPSynth','result','noop','Executed\x20command\x20MRCPSynth\x20%s','mrcprecog','Enter\x20in\x20MRCPRecog\x20(%s)\x20block','no\x20grammar\x20configured','grammar','RECOG_INPUT()','MRCP_RECOG_TRANSCRIPT','RECOG_INSTANCE()','MRCP_RECOG_INSTANCE','Executed\x20command\x20MRCPRecog\x20%s','agi','Enter\x20in\x20AGI\x20(%s)\x20block','command','answer','Wait\x20%s\x20seconds\x20before\x20answer','Enter\x20in\x20CALLBACK\x20(%s)\x20block','add','delay','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','custom_app','Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block'];(function(_0x1fd3e2,_0x1a6772){var _0x5a9210=function(_0x37e9c3){while(--_0x37e9c3){_0x1fd3e2['push'](_0x1fd3e2['shift']());}};_0x5a9210(++_0x1a6772);}(_0x6c7b,0x10b));var _0xb6c7=function(_0x1dd80b,_0x23ff40){_0x1dd80b=_0x1dd80b-0x0;var _0x3b3457=_0x6c7b[_0x1dd80b];return _0x3b3457;};'use strict';var fs=require('fs');var util=require(_0xb6c7('0x0'));var _=require('lodash');var sh=require('shelljs');var odbc=require('odbc')();var rs=require(_0xb6c7('0x1'));var moment=require('moment');var Mustache=require(_0xb6c7('0x2'));var rp=require(_0xb6c7('0x3'));var logger=require(_0xb6c7('0x4'))('agi');var config=require(_0xb6c7('0x5'));var scripts=require(_0xb6c7('0x6'));var FILES_PATH=_0xb6c7('0x7');var recursiveMapAttributes=[_0xb6c7('0x8'),_0xb6c7('0x9')];var verticesWithRetry=['menu',_0xb6c7('0xa'),_0xb6c7('0xb')];var AGIVertices=function(_0xe2ce08,_0x9c88ae,_0x577c54){this[_0xb6c7('0xc')]=_0xe2ce08;this[_0xb6c7('0xd')]=_0x9c88ae;this[_0xb6c7('0xe')]=_0x577c54;};AGIVertices['prototype']['getVariable']=function(_0xf676c,_0x11a1ee){this[_0xb6c7('0xd')][_0xb6c7('0xf')](_0xf676c)[_0xb6c7('0x10')](function(_0x30fc73){_0x11a1ee(null,_0x30fc73?_0x30fc73[_0xb6c7('0x11')]:![]);})['catch'](function(_0x9b32b7){_0x11a1ee(_0x9b32b7);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x13')]=function(_0xd6fb50,_0x4086a1){this[_0xb6c7('0xd')][_0xb6c7('0x14')](_0xd6fb50)['then'](function(_0x3c7ff4){_0x4086a1(null,_0x3c7ff4?_0x3c7ff4['name']:![]);})['catch'](function(_0x5d5428){_0x4086a1(_0x5d5428);});};AGIVertices[_0xb6c7('0x12')]['getSquareProject']=function(_0x45f1a3,_0x1a2bc9){this[_0xb6c7('0xd')][_0xb6c7('0x15')](_0x45f1a3)[_0xb6c7('0x10')](function(_0x200833){_0x1a2bc9(null,_0x200833?_0x200833[_0xb6c7('0x11')]:![]);})[_0xb6c7('0x16')](function(_0x1a591f){_0x1a2bc9(_0x1a591f);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x17')]=function(_0x3f133f,_0x3beafa){this['rpc'][_0xb6c7('0x18')](_0x3f133f)[_0xb6c7('0x10')](function(_0x599b49){_0x3beafa(null,_0x599b49?_0x599b49[_0xb6c7('0x19')]:![]);})['catch'](function(_0x37f7cb){_0x3beafa(_0x37f7cb);});};AGIVertices['prototype'][_0xb6c7('0x1a')]=function(_0x4f2960,_0x24c0b3){this[_0xb6c7('0xd')]['getUserById'](_0x4f2960)[_0xb6c7('0x10')](function(_0x3ff28f){_0x24c0b3(null,_0x3ff28f?_0x3ff28f[_0xb6c7('0x11')]:![]);})[_0xb6c7('0x16')](function(_0xd33675){_0x24c0b3(_0xd33675);});};AGIVertices[_0xb6c7('0x12')]['getTrunk']=function(_0x4109c3,_0x1f4e06){this[_0xb6c7('0xd')][_0xb6c7('0x1b')](_0x4109c3)['then'](function(_0x1eb265){_0x1f4e06(null,_0x1eb265?_0x1eb265[_0xb6c7('0x11')]:![]);})['catch'](function(_0x1eee74){_0x1f4e06(_0x1eee74);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x1c')]=function(_0x32cd6b,_0x4fb79f){var _0x30eeb4=this;this['rpc'][_0xb6c7('0x1d')](_0x32cd6b)[_0xb6c7('0x10')](function(_0x232f7f){_0x4fb79f(null,_0x232f7f?_0x30eeb4['getSoundPath'](_0x232f7f['save_name']):![]);})['catch'](function(_0x438dc3){_0x4fb79f(_0x438dc3);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x1e')]=function(_0x457df0,_0x41e46c){this[_0xb6c7('0xd')][_0xb6c7('0x1f')](_0x457df0)[_0xb6c7('0x10')](function(_0x1f82bd){_0x41e46c(null,_0x1f82bd?_0x1f82bd:![]);})[_0xb6c7('0x16')](function(_0x5dabdd){_0x41e46c(_0x5dabdd);});};AGIVertices[_0xb6c7('0x12')]['sendMailMessage']=function(_0x216ee7,_0x6cd749,_0x4e9e90){this[_0xb6c7('0xe')][_0xb6c7('0x20')](_0x216ee7,_0x6cd749)['then'](function(){_0x4e9e90(null);})['catch'](function(_0x536e4d){_0x4e9e90(_0x536e4d);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x21')]=function(_0x597650,_0x1f8a0c){this[_0xb6c7('0xd')]['getIntervalById'](_0x597650)[_0xb6c7('0x10')](function(_0x40b06d){if(_0x40b06d){if(_0x40b06d[_0xb6c7('0x22')]){_0x1f8a0c(null,[_0x40b06d[_0xb6c7('0x23')]]);}else{_0x1f8a0c(null,_[_0xb6c7('0x24')](_0x40b06d[_0xb6c7('0x25')],'interval'));}}else{_0x1f8a0c(null,![]);}})[_0xb6c7('0x16')](function(_0x1c032a){_0x1f8a0c(_0x1c032a);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x26')]=function(_0x2b0093){return util[_0xb6c7('0x27')](_0xb6c7('0x28'),FILES_PATH,_0x2b0093);};AGIVertices['prototype']['getQueryOdbc']=function(_0x3bae95,_0x2c59e1,_0x33afa6){odbc[_0xb6c7('0x29')](_0x3bae95,function(_0x291460){if(_0x291460){logger[_0xb6c7('0x2a')](_0xb6c7('0x2b'),_0x291460);_0x33afa6(_0x291460);}else{logger[_0xb6c7('0x2c')](_0xb6c7('0x2d'));odbc[_0xb6c7('0x2e')](_0x2c59e1,function(_0x4995e2,_0x63b747){if(_0x4995e2){logger['info']('Error\x20executing\x20query\x20%s',_0x2c59e1);_0x33afa6(_0x4995e2);}else{logger[_0xb6c7('0x2c')]('Query\x20executed\x20correctly\x20%s',_0x2c59e1);odbc[_0xb6c7('0x2f')](function(_0x2479c){if(_0x2479c){logger['error'](_0xb6c7('0x30'),_0x2479c);}_0x33afa6(null,_0x63b747);});}});}});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x31')]=function(_0x84861f,_0x3c3374){this['rpc']['getSmsAccountById'](_0x84861f)[_0xb6c7('0x10')](function(_0xb575){_0x3c3374(null,_0xb575?_0xb575:![]);})[_0xb6c7('0x16')](function(_0x184af6){_0x3c3374(_0x184af6);});};AGIVertices['prototype']['createSmsMessage']=function(_0xb699ce,_0x4019c){this[_0xb6c7('0xd')][_0xb6c7('0x32')](_0xb699ce)[_0xb6c7('0x10')](function(_0x4eb2c7){_0x4019c(null,_0x4eb2c7);})['catch'](function(_0x5c057c){_0x4019c(_0x5c057c);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x33')]=function(_0x4462dc,_0x5050c9,_0x1c2983){this[_0xb6c7('0xd')]['createSquareDetailsReport']({'uniqueid':this[_0xb6c7('0xc')][_0xb6c7('0x34')],'node':_0x4462dc[_0xb6c7('0x35')],'application':_0x4462dc[_0xb6c7('0x36')],'data':_0x5050c9||null,'project_name':this[_0xb6c7('0xc')]['arg_1'],'callerid':this[_0xb6c7('0xc')][_0xb6c7('0x37')]})[_0xb6c7('0x10')](function(_0x5ca74a){if(_0x1c2983){_0x1c2983(null,_0x5ca74a);}})['catch'](function(_0x1565b5){if(_0x1c2983){_0x1c2983(_0x1565b5);}});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x38')]=function(_0x505b60,_0x4f243a,_0x5f047d,_0x14c64f){this[_0xb6c7('0xd')][_0xb6c7('0x38')]({'uniqueid':this[_0xb6c7('0xc')][_0xb6c7('0x34')],'callerid':this[_0xb6c7('0xc')][_0xb6c7('0x37')],'calleridname':this['channel'][_0xb6c7('0x39')],'context':this[_0xb6c7('0xc')][_0xb6c7('0x3a')],'extension':this[_0xb6c7('0xc')][_0xb6c7('0x3b')],'priority':this['channel'][_0xb6c7('0x3c')],'accountcode':this[_0xb6c7('0xc')][_0xb6c7('0x3d')],'dnid':this[_0xb6c7('0xc')][_0xb6c7('0x3e')],'projectName':this[_0xb6c7('0xc')]['arg_1'],'saveName':_0x4f243a,'filename':_0x505b60[_0xb6c7('0x3f')]||_0x4f243a,'savePath':_0x5f047d})[_0xb6c7('0x10')](function(_0x2116cb){_0x14c64f(null,_0x2116cb);})[_0xb6c7('0x16')](function(_0x3153c8){_0x14c64f(_0x3153c8);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x40')]=function(_0x4cc0f6,_0x5218af,_0x4fd77d,_0xbf1903,_0x22e7a1){this[_0xb6c7('0xd')][_0xb6c7('0x40')]({'uniqueid':this[_0xb6c7('0xc')][_0xb6c7('0x34')],'body':_0x4cc0f6,'direction':_0x5218af,'providerName':_0x4fd77d,'providerResponse':_0xbf1903})['then'](function(_0x4f5c99){if(_0x22e7a1){_0x22e7a1(null,_0x4f5c99);}})[_0xb6c7('0x16')](function(_0x517bc1){if(_0x22e7a1){_0x22e7a1(_0x517bc1);}});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x41')]=function(_0x398c59,_0x210d50){this[_0xb6c7('0xd')]['createCmContact']({'firstName':_[_0xb6c7('0x42')](_0x398c59['name'])||_[_0xb6c7('0x43')](_0x398c59[_0xb6c7('0x11')])?_0xb6c7('0x44')+Math[_0xb6c7('0x45')]():_0x398c59[_0xb6c7('0x11')],'lastName':_['isEmpty'](_0x398c59[_0xb6c7('0x46')])||_[_0xb6c7('0x43')](_0x398c59[_0xb6c7('0x46')])?null:_0x398c59[_0xb6c7('0x46')],'phone':_0x398c59[_0xb6c7('0x47')],'ListId':_0x398c59[_0xb6c7('0x48')],'scheduledat':_0x398c59[_0xb6c7('0x49')],'callbackUniqueid':this[_0xb6c7('0xc')]['uniqueid'],'tags':_0xb6c7('0x4a'),'description':_0xb6c7('0x4b')+_0x398c59[_0xb6c7('0x49')][_0xb6c7('0x4c')](),'priority':_0x398c59[_0xb6c7('0x4d')]})[_0xb6c7('0x10')](function(_0x5e7e11){_0x210d50(null,_0x5e7e11);})[_0xb6c7('0x16')](function(_0xb8732e){_0x210d50(_0xb8732e);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x4e')]=function(_0x547d10,_0x36ec5c){this[_0xb6c7('0xd')][_0xb6c7('0x4f')](_0x547d10)[_0xb6c7('0x10')](function(_0x19d284){_0x36ec5c(null,_0x19d284?_0x19d284[_0xb6c7('0x11')]:![]);})[_0xb6c7('0x16')](function(_0x5cb286){_0x36ec5c(_0x5cb286);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x50')]=function(_0x11120b,_0x550376,_0xa5f6da){var _0x1412ef={'role':_0xb6c7('0x51')};_0x1412ef[_0x11120b]=this[_0xb6c7('0xc')][_0xb6c7('0x37')];this['rpc'][_0xb6c7('0x50')](_0x1412ef,_0x550376,this[_0xb6c7('0xc')][_0xb6c7('0x34')])[_0xb6c7('0x10')](function(_0xf50340){_0xa5f6da(null,_[_0xb6c7('0x43')](_0xf50340)?![]:!![]);})['catch'](function(_0x3f9ffd){logger[_0xb6c7('0x2a')](_0x3f9ffd);_0xa5f6da(null,![]);});};AGIVertices['prototype'][_0xb6c7('0x52')]=function(_0x1a41f7,_0x4ff673){var _0x9b79f1={'role':_0xb6c7('0x51')};_0x9b79f1[_0x1a41f7]=this[_0xb6c7('0xc')][_0xb6c7('0x37')];this[_0xb6c7('0xd')][_0xb6c7('0x52')](_0x9b79f1)[_0xb6c7('0x10')](function(_0x554d7d){_0x4ff673(null,_['isNil'](_0x554d7d)?![]:!![]);})[_0xb6c7('0x16')](function(_0x4e365e){logger[_0xb6c7('0x2a')](_0x4e365e);_0x4ff673(null,![]);});};AGIVertices['prototype']['agentLogout']=function(_0x5d9cb2,_0x296afe){var _0x4df3c9={'role':_0xb6c7('0x51')};_0x4df3c9[_0x5d9cb2]=this['channel'][_0xb6c7('0x37')];this['rpc'][_0xb6c7('0x53')](_0x4df3c9)[_0xb6c7('0x10')](function(_0x57ebda){_0x296afe(null,_['isNil'](_0x57ebda)?![]:!![]);})[_0xb6c7('0x16')](function(_0x3c544b){logger[_0xb6c7('0x2a')](_0x3c544b);_0x296afe(null,![]);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x54')]=function(_0x3f60a5,_0x19229b){var _0x2ffae8={'role':_0xb6c7('0x51')};_0x2ffae8[_0x3f60a5]=this['channel'][_0xb6c7('0x37')];var _0x11913f=_0x3f60a5!='internal'?util[_0xb6c7('0x27')]('%s/%s@from-sip/n','LOCAL',this[_0xb6c7('0xc')][_0xb6c7('0x37')]):undefined;this['rpc'][_0xb6c7('0x54')](_0x2ffae8,_0x11913f)[_0xb6c7('0x10')](function(_0x5685fe){_0x19229b(null,_[_0xb6c7('0x43')](_0x5685fe)?![]:!![]);})[_0xb6c7('0x16')](function(_0x55a63e){logger[_0xb6c7('0x2a')](_0x55a63e);_0x19229b(null,![]);});};AGIVertices[_0xb6c7('0x12')]['shellCommand']=function(_0x39080f,_0x5237a4){sh[_0xb6c7('0x55')](_[_0xb6c7('0x56')](_0x39080f),function(_0x25e21f,_0x464a44){var _0x260e8d=_0x464a44[_0xb6c7('0x57')](/(\r\n|\n|\r)/gm,'');_0x5237a4(null,_0x260e8d);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x58')]=function(_0x3fbe59,_0x18bf30){scripts[_0xb6c7('0x58')](_0x3fbe59[_0xb6c7('0x59')],_0x3fbe59[_0xb6c7('0x5a')]||_0xb6c7('0x5b'),_0x3fbe59[_0xb6c7('0x5b')],_0x3fbe59[_0xb6c7('0x5c')]||_0xb6c7('0x5d'),_0x3fbe59[_0xb6c7('0x5e')]||'MALE',_0x3fbe59['audioEncoding']||_0xb6c7('0x5f'))['then'](function(_0x118cac){_0x18bf30(null,_0x118cac);})[_0xb6c7('0x16')](function(_0x35dd22){_0x18bf30(_0x35dd22);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x60')]=function(_0x5b2259,_0x39c813){scripts[_0xb6c7('0x60')](_0x5b2259[_0xb6c7('0x5b')],_0x5b2259[_0xb6c7('0x61')]||'en',0x1)[_0xb6c7('0x10')](function(_0x1bac6d){_0x39c813(null,_0x1bac6d);})['catch'](function(_0x36b411){_0x39c813(_0x36b411);});};AGIVertices['prototype'][_0xb6c7('0x62')]=function(_0x234ef7,_0x23ce66){var _0xf3ac9b={'uri':_0x234ef7[_0xb6c7('0x63')],'method':_0x234ef7[_0xb6c7('0x64')],'json':!![],'resolveWithFullResponse':!![],'strictSSL':![],'timeout':typeof parseInt(_0x234ef7[_0xb6c7('0x65')])===_0xb6c7('0x66')&&parseInt(_0x234ef7[_0xb6c7('0x65')])>=0x1?parseInt(_0x234ef7[_0xb6c7('0x65')])*0x3e8:0x5*0x3e8};if(_[_0xb6c7('0x67')]([_0xb6c7('0x68'),_0xb6c7('0x69')],_0xf3ac9b[_0xb6c7('0x64')][_0xb6c7('0x6a')]())){try{_0xf3ac9b[_0xb6c7('0x6b')]=_0x234ef7[_0xb6c7('0x9')]?JSON[_0xb6c7('0x6c')](_0x234ef7[_0xb6c7('0x9')]):{};}catch(_0x21f73e){logger[_0xb6c7('0x2a')](_0xb6c7('0x6d'),_0x21f73e);}}try{_0xf3ac9b[_0xb6c7('0x6e')]=_0x234ef7[_0xb6c7('0x8')]?JSON[_0xb6c7('0x6c')](_0x234ef7[_0xb6c7('0x8')]):{};}catch(_0x3071e9){logger[_0xb6c7('0x2a')](_0xb6c7('0x6f'),_0x3071e9);}if(_0x234ef7[_0xb6c7('0x70')]){try{var _0x22e97b=require(_0x234ef7[_0xb6c7('0x70')])[_0xb6c7('0x71')](this,_0xf3ac9b);_0xf3ac9b[_0xb6c7('0x72')]=Mustache[_0xb6c7('0x73')](_0x234ef7[_0xb6c7('0x63')],_0x22e97b,{},['$$','$$']);if(_0xf3ac9b[_0xb6c7('0x6e')]){_0xf3ac9b[_0xb6c7('0x6e')]=JSON['parse'](Mustache[_0xb6c7('0x73')](JSON['stringify'](_0xf3ac9b[_0xb6c7('0x6e')]),_0x22e97b,{},['$$','$$']));}if(_0xf3ac9b[_0xb6c7('0x6b')]){_0xf3ac9b['body']=JSON[_0xb6c7('0x6c')](Mustache[_0xb6c7('0x73')](JSON[_0xb6c7('0x74')](_0xf3ac9b[_0xb6c7('0x6b')]),_0x22e97b,{},['$$','$$']));}}catch(_0x5dc818){logger[_0xb6c7('0x2a')](_0xb6c7('0x75'),_0x5dc818);}}rp(_0xf3ac9b)[_0xb6c7('0x10')](function(_0x280c1d){var _0x43685e={'statusCode':_0x280c1d[_0xb6c7('0x76')]||0xc8,'statusMessage':_0x280c1d['statusMessage']||'OK','headers':_0x280c1d[_0xb6c7('0x6e')]||{},'body':_0x280c1d['body']||{}};_0x23ce66(null,_0x43685e);})['catch'](function(_0x4d7b9f){var _0x71a01b={'statusCode':_0x4d7b9f[_0xb6c7('0x76')]||0x1f4,'statusMessage':_0x4d7b9f[_0xb6c7('0x77')]||_0xb6c7('0x78'),'headers':_0x4d7b9f['options']['headers']||{},'body':_0x4d7b9f[_0xb6c7('0x79')]['body']||{}};_0x23ce66(null,_0x71a01b);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x7a')]=function(_0x30a5f3,_0x514a8b){scripts[_0xb6c7('0x7a')](this[_0xb6c7('0xc')][_0xb6c7('0x34')],_0x30a5f3['key'],_0x30a5f3[_0xb6c7('0x5b')],_0x30a5f3['dialogflow_language']||'en')[_0xb6c7('0x10')](function(_0x4b2f58){_0x514a8b(null,_0x4b2f58);})[_0xb6c7('0x16')](function(_0x94f5ac){_0x514a8b(_0x94f5ac);});};AGIVertices['prototype']['googleDialogflowV2']=function(_0x32c401,_0x196566){scripts[_0xb6c7('0x7b')](this[_0xb6c7('0xc')][_0xb6c7('0x34')],_0x32c401['dialogflowV2_project_id'],_0x32c401[_0xb6c7('0x7c')],_0x32c401['private_key'],_0x32c401['text'],_0x32c401[_0xb6c7('0x7d')]||'en')[_0xb6c7('0x10')](function(_0x1f05e9){_0x196566(null,_0x1f05e9);})[_0xb6c7('0x16')](function(_0x5bfe73){_0x196566(_0x5bfe73);});};AGIVertices['prototype'][_0xb6c7('0x7e')]=function(_0x3e7b04,_0x267b78){scripts[_0xb6c7('0x7e')](this[_0xb6c7('0xc')],_0x3e7b04)[_0xb6c7('0x10')](function(_0x1afbcd){_0x267b78(null,_0x1afbcd);})['catch'](function(_0x524989){_0x267b78(_0x524989);});};AGIVertices['prototype'][_0xb6c7('0x7f')]=function(_0xf00e44,_0x548f09){scripts[_0xb6c7('0x7f')](_0xf00e44[_0xb6c7('0x80')],_0xf00e44[_0xb6c7('0x5b')],_0xf00e44[_0xb6c7('0x81')]||'en-US',_0xf00e44['speed'])[_0xb6c7('0x10')](function(_0x4e836b){_0x548f09(null,_0x4e836b);})[_0xb6c7('0x16')](function(_0x4c38b9){_0x548f09(_0x4c38b9);});};AGIVertices['prototype']['ispeechASR']=function(_0x308d27,_0x53257e,_0x5545e9){scripts['ispeechASR'](_0x53257e,_0x308d27[_0xb6c7('0x80')],_0x308d27['ispeech_asr_language']||_0xb6c7('0x5d'),this[_0xb6c7('0x82')](_0x308d27[_0xb6c7('0x83')])?_0x308d27[_0xb6c7('0x83')]:undefined)['then'](function(_0x536f16){_0x5545e9(null,_0x536f16);})[_0xb6c7('0x16')](function(_0x31905e){_0x5545e9(_0x31905e);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x84')]=function(_0x5cb043,_0x4278c6){scripts[_0xb6c7('0x84')](_0x5cb043[_0xb6c7('0x85')],_0x5cb043[_0xb6c7('0x86')],_0x5cb043[_0xb6c7('0x87')],_0x5cb043[_0xb6c7('0x88')]||_0xb6c7('0x89'),_0x5cb043['text'],_0x5cb043[_0xb6c7('0x8a')]||_0xb6c7('0x5b'))[_0xb6c7('0x10')](function(_0x4425b3){_0x4278c6(null,_0x4425b3);})['catch'](function(_0x5c1aaf){_0x4278c6(_0x5c1aaf);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x8b')]=function(_0x3f9282,_0x4fec2f){scripts[_0xb6c7('0x8b')](this[_0xb6c7('0xc')]['uniqueid'],_0x3f9282['aws_access_key_id'],_0x3f9282['aws_secret_access_key'],_0x3f9282['aws_lex_region'],_0x3f9282['text'],_0x3f9282['aws_bot_name'])[_0xb6c7('0x10')](function(_0x43a773){_0x4fec2f(null,_0x43a773);})[_0xb6c7('0x16')](function(_0x5cfeea){_0x4fec2f(_0x5cfeea);});};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x8c')]=function(_0x1d0b3a,_0x509fc2,_0x55bcb1){scripts[_0xb6c7('0x8c')](_0x509fc2,_0x1d0b3a['key'],_0x1d0b3a[_0xb6c7('0x8d')]||_0xb6c7('0x5d'))[_0xb6c7('0x10')](function(_0x3abadf){_0x55bcb1(null,_0x3abadf);})['catch'](function(_0x18c76a){_0x55bcb1(_0x18c76a);});};AGIVertices['prototype'][_0xb6c7('0x8e')]=function(_0x50df7c,_0x47ef2a,_0x1bcc9d){scripts[_0xb6c7('0x8e')](_0x47ef2a,_0x50df7c[_0xb6c7('0x8f')],_0x50df7c[_0xb6c7('0x90')],_0x50df7c[_0xb6c7('0x72')])[_0xb6c7('0x10')](function(_0x1c44d3){_0x1bcc9d(null,_0x1c44d3);})['catch'](function(_0x19ead8){_0x1bcc9d(_0x19ead8);});};AGIVertices['prototype']['clear']=function(_0x1c0042){var _0x2fac09=_[_0xb6c7('0x67')](verticesWithRetry,_0x1c0042[_0xb6c7('0x36')])?_0x1c0042:_[_0xb6c7('0x91')](_0x1c0042);for(var _0x4a9803 in _0x2fac09){if(_0x2fac09['hasOwnProperty'](_0x4a9803)){if(_0x2fac09[_0x4a9803]&&_[_0xb6c7('0x92')](_0x2fac09[_0x4a9803])){if(_[_0xb6c7('0x67')](recursiveMapAttributes,_0x4a9803)){_0x2fac09[_0x4a9803]=this[_0xb6c7('0x93')](_0x2fac09[_0x4a9803]);}else{_0x2fac09[_0x4a9803]=this[_0xb6c7('0x94')](_0x2fac09[_0x4a9803]);}}}}return _0x2fac09;};AGIVertices['prototype']['recursiveNodeIndex']=function(_0x4761f0){for(var _0x5c7c30 in _0x4761f0){if(_0x4761f0['hasOwnProperty'](_0x5c7c30)){if(_['isPlainObject'](_0x4761f0[_0x5c7c30])){this[_0xb6c7('0x95')](_0x4761f0[_0x5c7c30]);}else if(_[_0xb6c7('0x96')](_0x4761f0[_0x5c7c30])){for(var _0x4401dd=0x0;_0x4401dd<_0x4761f0[_0x5c7c30][_0xb6c7('0x97')];_0x4401dd++){this[_0xb6c7('0x95')](_0x4761f0[_0x5c7c30][_0x4401dd]);}}else if(_[_0xb6c7('0x92')](_0x4761f0[_0x5c7c30])){_0x4761f0[_0x5c7c30]=this['replaceAllVariables'](_0x4761f0[_0x5c7c30]);}}}};AGIVertices[_0xb6c7('0x12')]['saveRestApiResult']=function(_0xfbda77,_0x2c1a24){for(var _0x5a5943 in _0xfbda77){if(_0xfbda77[_0xb6c7('0x98')](_0x5a5943)){if(_[_0xb6c7('0x99')](_0xfbda77[_0x5a5943])){if(!_[_0xb6c7('0x42')](_0xfbda77[_0x5a5943])){this[_0xb6c7('0x9a')](_0xfbda77[_0x5a5943],util[_0xb6c7('0x27')](_0xb6c7('0x9b'),_0x2c1a24,_0x5a5943));}}else if(_[_0xb6c7('0x96')](_0xfbda77[_0x5a5943])){for(var _0x534276=0x0;_0x534276<_0xfbda77[_0x5a5943][_0xb6c7('0x97')];_0x534276++){this['saveRestApiResult'](_0xfbda77[_0x5a5943][_0x534276],util[_0xb6c7('0x27')](_0xb6c7('0x9b'),_0x2c1a24,_0x5a5943+'['+_0x534276+']'));}}else{if(!_[_0xb6c7('0x43')](_0xfbda77[_0x5a5943])){this[_0xb6c7('0xc')][_0xb6c7('0x9c')](util[_0xb6c7('0x27')](_0xb6c7('0x9b'),_0x2c1a24,_0x5a5943),_0xfbda77[_0x5a5943]);}}}}};AGIVertices['prototype'][_0xb6c7('0x93')]=function(_0x1579a4){try{var _0x5f2bd0=JSON[_0xb6c7('0x6c')](_0x1579a4);this[_0xb6c7('0x95')](_0x5f2bd0);return JSON[_0xb6c7('0x74')](_0x5f2bd0);}catch(_0x3489ae){return this['replaceAllVariables'](_0x1579a4);}};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x94')]=function(_0x230ee5){var _0x3a30ce=_0x230ee5[_0xb6c7('0x9d')]('{');for(var _0x2827d6=0x1;_0x2827d6<_0x3a30ce[_0xb6c7('0x97')];_0x2827d6+=0x1){var _0x2c0b97=_0x3a30ce[_0x2827d6]['split']('}');if(_0x2c0b97[_0xb6c7('0x97')]>0x1){_0x230ee5=_0x230ee5[_0xb6c7('0x9e')]('{'+_0x2c0b97[0x0]+'}',this[_0xb6c7('0xc')][_0xb6c7('0x9f')](_0x2c0b97[0x0])[_0xb6c7('0xa0')]||_0x2c0b97[0x0]);}}if(_0x3a30ce['length']===0x1){return _0x230ee5[_0xb6c7('0x4c')]();}return this[_0xb6c7('0x94')](_0x230ee5);};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0xa1')]=function(_0xc5bd0c,_0x58197c){var _0x328c95=this[_0xb6c7('0xc')][_0xb6c7('0x9f')](_0xc5bd0c);if(_0x328c95['result']===-0x1){return _0x328c95;}logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0xa2'),_0x58197c,_0x328c95[_0xb6c7('0xa0')]));return this[_0xb6c7('0xc')][_0xb6c7('0x9c')](_0x58197c,_0x328c95[_0xb6c7('0xa0')]);};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x82')]=function(_0x710bd0){return _0x710bd0&&_0x710bd0!=='0'&&_0x710bd0!=='-1'&&_0x710bd0!=='';};AGIVertices['prototype'][_0xb6c7('0xa3')]=function(_0xc1a49c){this['createSquareDetailsReport'][_0xb6c7('0x71')](this,_0xc1a49c,'-');_0xc1a49c[_0xb6c7('0xa4')]=_0xc1a49c[_0xb6c7('0xa3')];return{'code':0xc8,'result':'-'};};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0xa5')]=function(_0x3643dc){logger['info'](util[_0xb6c7('0x27')](_0xb6c7('0xa6'),_0x3643dc[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0x3643dc[_0xb6c7('0x5b')])){return this[_0xb6c7('0xc')]['noop'](_0xb6c7('0xa7'));}var _0x3651b9='\x22'+_0x3643dc[_0xb6c7('0x5b')]+'\x22';if(this[_0xb6c7('0x82')](_0x3643dc[_0xb6c7('0x79')])){_0x3651b9+=','+_0x3643dc[_0xb6c7('0x79')];}var _0x4c0a9b=this[_0xb6c7('0xc')][_0xb6c7('0x55')](_0xb6c7('0xa8'),_0x3651b9);if(_0x4c0a9b[_0xb6c7('0xa9')]===-0x1){return _0x4c0a9b;}return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util['format'](_0xb6c7('0xab'),_0x3651b9));};AGIVertices['prototype'][_0xb6c7('0xac')]=function(_0x4b3c3a){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0xad'),_0x4b3c3a[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0x4b3c3a['grammar'])){return this[_0xb6c7('0xc')]['noop'](_0xb6c7('0xae'));}var _0x525a36=_0x4b3c3a[_0xb6c7('0xaf')];if(this[_0xb6c7('0x82')](_0x4b3c3a['options'])){_0x525a36+=','+_0x4b3c3a[_0xb6c7('0x79')];}var _0x5001de=this[_0xb6c7('0xc')][_0xb6c7('0x55')]('MRCPRecog',_0x525a36);if(_0x5001de[_0xb6c7('0xa9')]===-0x1){return _0x5001de;}var _0x3e9302=this['getAndSetVariable']('RECOG_CONFIDENCE()','MRCP_RECOG_CONFIDENCE');if(_0x3e9302['result']===-0x1){return _0x3e9302;}var _0xc5a74a=this[_0xb6c7('0xa1')](_0xb6c7('0xb0'),_0xb6c7('0xb1'));if(_0xc5a74a[_0xb6c7('0xa9')]===-0x1){return _0xc5a74a;}var _0x1dfc2b=this[_0xb6c7('0xa1')](_0xb6c7('0xb2'),_0xb6c7('0xb3'));if(_0x1dfc2b[_0xb6c7('0xa9')]===-0x1){return _0x1dfc2b;}return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util['format'](_0xb6c7('0xb4'),_0x525a36));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0xb5')]=function(_0x1dc4d3){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0xb6'),_0x1dc4d3[_0xb6c7('0x35')]));return this[_0xb6c7('0xc')]['agi']([_0x1dc4d3[_0xb6c7('0xb7')],_0x1dc4d3['args']]);};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0xb8')]=function(_0x2b3f22){logger[_0xb6c7('0x2c')](util['format']('Enter\x20in\x20ANSWER\x20(%s)\x20block',_0x2b3f22[_0xb6c7('0x35')]));if(this[_0xb6c7('0x82')](_0x2b3f22[_0xb6c7('0x65')])){logger[_0xb6c7('0x2c')](util['format'](_0xb6c7('0xb9'),_0x2b3f22[_0xb6c7('0x65')]));var _0x2d1b27=this['channel']['wait'](_0x2b3f22[_0xb6c7('0x65')]);if(_0x2d1b27[_0xb6c7('0xa9')]===-0x1){return _0x2d1b27;}}return this[_0xb6c7('0xc')]['answer']();};AGIVertices['prototype'][_0xb6c7('0x4a')]=function(_0x4b021d){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0xba'),_0x4b021d[_0xb6c7('0x35')]));if(!this['isConfigured'](_0x4b021d['list_id'])){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x4b021d,'no\x20list\x20selected');}_0x4b021d[_0xb6c7('0x49')]=moment();if(this[_0xb6c7('0x82')](_0x4b021d['delay'])){_0x4b021d[_0xb6c7('0x49')]=moment()[_0xb6c7('0xbb')](_0x4b021d[_0xb6c7('0xbc')],'minutes');}if(!this[_0xb6c7('0x82')](_0x4b021d[_0xb6c7('0x4d')])){_0x4b021d[_0xb6c7('0x4d')]=0x2;}this['createCmContact'][_0xb6c7('0x71')](this,_0x4b021d);return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0xbd'),_0x4b021d[_0xb6c7('0x47')],_0x4b021d['list_id'],_0x4b021d['scheduledAt']));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0xbe')]=function(_0x1d12d8){logger['info'](util[_0xb6c7('0x27')](_0xb6c7('0xbf'),_0x1d12d8[_0xb6c7('0x35')]));var _0x278c1e=this[_0xb6c7('0xc')]['exec'](_0x1d12d8[_0xb6c7('0xc0')],_0x1d12d8[_0xb6c7('0x79')]);if(_0x278c1e['result']===-0x1){return _0x278c1e;}return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0xc1'),_0x1d12d8['application'],_0x1d12d8[_0xb6c7('0x79')]));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0xc2')]=function(_0x2490a1){logger[_0xb6c7('0x2c')](util['format']('Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block',_0x2490a1[_0xb6c7('0x35')]));if(!this['isConfigured'](_0x2490a1[_0xb6c7('0x5b')])){return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0xa7'));}var _0x420378='\x22'+_0x2490a1[_0xb6c7('0x5b')]+'\x22';if(this[_0xb6c7('0x82')](_0x2490a1[_0xb6c7('0x79')])){_0x420378+=','+_0x2490a1[_0xb6c7('0x79')];}var _0x166c7e=this[_0xb6c7('0xc')][_0xb6c7('0x55')]('MRCPSynth',_0x420378);if(_0x166c7e['result']===-0x1){return _0x166c7e;}return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')]('Executed\x20command\x20MRCPSynth\x20%s',_0x420378));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0xc3')]=function(_0x1c7638){logger[_0xb6c7('0x2c')](util['format'](_0xb6c7('0xc4'),_0x1c7638['label']));if(!this[_0xb6c7('0x82')](_0x1c7638[_0xb6c7('0x5b')])){return this[_0xb6c7('0xc')]['noop'](_0xb6c7('0xa7'));}var _0x30a4ae='\x22'+_0x1c7638[_0xb6c7('0x5b')]+'\x22';if(this[_0xb6c7('0x82')](_0x1c7638[_0xb6c7('0x79')])){_0x30a4ae+=','+_0x1c7638[_0xb6c7('0x79')];}var _0x1f2776=this[_0xb6c7('0xc')]['exec'](_0xb6c7('0xa8'),_0x30a4ae);if(_0x1f2776[_0xb6c7('0xa9')]===-0x1){return _0x1f2776;}return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util['format'](_0xb6c7('0xab'),_0x30a4ae));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0xc5')]=function(_0x5f0d72){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0xc6'),_0x5f0d72['label']));if(!this[_0xb6c7('0x82')](_0x5f0d72[_0xb6c7('0xaf')])){return this[_0xb6c7('0xc')]['noop'](_0xb6c7('0xae'));}var _0x3e4913=_0x5f0d72[_0xb6c7('0xaf')];if(this['isConfigured'](_0x5f0d72[_0xb6c7('0x79')])){_0x3e4913+=','+_0x5f0d72[_0xb6c7('0x79')];}var _0x115f62=this[_0xb6c7('0xc')]['exec'](_0xb6c7('0xc7'),_0x3e4913);if(_0x115f62[_0xb6c7('0xa9')]===-0x1){return _0x115f62;}var _0x1bb1e5=this['getAndSetVariable'](_0xb6c7('0xc8'),_0xb6c7('0xc9'));if(_0x1bb1e5[_0xb6c7('0xa9')]===-0x1){return _0x1bb1e5;}var _0x19fe4b=this[_0xb6c7('0xa1')](_0xb6c7('0xb0'),_0xb6c7('0xca'));if(_0x19fe4b['result']===-0x1){return _0x19fe4b;}var _0x4724e2=this['getAndSetVariable'](_0xb6c7('0xb2'),_0xb6c7('0xcb'));if(_0x4724e2['result']===-0x1){return _0x4724e2;}return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0xb4'),_0x3e4913));};AGIVertices[_0xb6c7('0x12')]['sestekasr']=function(_0x238128){logger[_0xb6c7('0x2c')](util['format'](_0xb6c7('0xcc'),_0x238128['label']));if(!this[_0xb6c7('0x82')](_0x238128[_0xb6c7('0xaf')])){return this['channel'][_0xb6c7('0xaa')](_0xb6c7('0xae'));}var _0x447985=_0x238128[_0xb6c7('0xaf')];if(this[_0xb6c7('0x82')](_0x238128[_0xb6c7('0x79')])){_0x447985+=','+_0x238128['options'];}var _0x10d3db=this['channel']['exec'](_0xb6c7('0xc7'),_0x447985);if(_0x10d3db[_0xb6c7('0xa9')]===-0x1){return _0x10d3db;}var _0x4530a7=this[_0xb6c7('0xa1')]('RECOG_CONFIDENCE()',_0xb6c7('0xcd'));if(_0x4530a7['result']===-0x1){return _0x4530a7;}var _0x1e6455=this['getAndSetVariable'](_0xb6c7('0xb0'),'SESTEK_ASR_TRANSCRIPT');if(_0x1e6455['result']===-0x1){return _0x1e6455;}var _0xf8bb5c=this[_0xb6c7('0xa1')]('RECOG_INSTANCE()','SESTEK_ASR_INSTANCE');if(_0xf8bb5c[_0xb6c7('0xa9')]===-0x1){return _0xf8bb5c;}return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0xb4'),_0x447985));};AGIVertices[_0xb6c7('0x12')]['database']=function(_0x391ed7){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0xce'),_0x391ed7[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0x391ed7[_0xb6c7('0xcf')])){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x391ed7,'no\x20database\x20selected');}var _0x1b7e43=this[_0xb6c7('0x17')][_0xb6c7('0x71')](this,_0x391ed7[_0xb6c7('0xcf')]);if(!_0x1b7e43){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x391ed7,_0xb6c7('0xd0'));}if(!this[_0xb6c7('0x82')](_0x391ed7[_0xb6c7('0x2e')])){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x391ed7,_0xb6c7('0xd1'));}var _0x5b5f45=_0x391ed7['query'][_0xb6c7('0x57')](/(\r\n|\n|\r)/gm,'\x20');this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0xd2'),_0x5b5f45));var _0x4bdbbf=this[_0xb6c7('0xd3')][_0xb6c7('0x71')](this,_0x1b7e43,_0x5b5f45);this[_0xb6c7('0x33')][_0xb6c7('0x71')](this,_0x391ed7,_0x5b5f45);if(!this['isConfigured'](_0x391ed7[_0xb6c7('0xd4')])){return this['channel'][_0xb6c7('0xaa')](_0xb6c7('0xd5'));}var _0x59940c=this[_0xb6c7('0x9f')][_0xb6c7('0x71')](this,_0x391ed7[_0xb6c7('0xd4')]);if(!_0x59940c){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x391ed7,_0xb6c7('0xd6'));}var _0x590b00=this;_0x4bdbbf['forEach'](function(_0x45b912,_0xee70bc){Object[_0xb6c7('0xd7')](_0x45b912)[_0xb6c7('0xd8')](function(_0x1e3a39){_0x590b00['channel'][_0xb6c7('0x9c')](util[_0xb6c7('0x27')](_0xb6c7('0xd9'),_0x59940c,_0xee70bc,_0x1e3a39),_0x45b912[_0x1e3a39]);});});this[_0xb6c7('0xc')]['setVariable'](util[_0xb6c7('0x27')]('%s_ROWS_COUNT',_0x59940c),_0x4bdbbf[_0xb6c7('0x97')]);return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util['format'](_0xb6c7('0xda'),_0x59940c));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0xdb')]=function(_0x3f5e9b){logger[_0xb6c7('0xdc')](util['format'](_0xb6c7('0xdd'),_0x3f5e9b['label']));if(!this[_0xb6c7('0x82')](_0x3f5e9b[_0xb6c7('0xde')])){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x3f5e9b,_0xb6c7('0xdf'));}var _0x13f811=this[_0xb6c7('0x1a')]['sync'](this,_0x3f5e9b['sip_id']);if(!_0x13f811){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x3f5e9b,'no\x20user\x20found');}var _0x48f492=this[_0xb6c7('0xc')]['exec']('DIAL',[util[_0xb6c7('0x27')](_0xb6c7('0xe0'),_0x13f811),_0x3f5e9b[_0xb6c7('0x65')],_0x3f5e9b['opts'],_0x3f5e9b[_0xb6c7('0x63')]]);if(_0x48f492[_0xb6c7('0xa9')]===-0x1){return _0x48f492;}return this['channel'][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0xe1'),'DIAL'));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0xe2')]=function(_0x2351a1){logger[_0xb6c7('0x2c')](util['format']('Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block',_0x2351a1[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0x2351a1[_0xb6c7('0x80')])){return this['channel'][_0xb6c7('0xaa')](_0xb6c7('0xe3'));}if(!this[_0xb6c7('0x82')](_0x2351a1[_0xb6c7('0x5b')])){return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0xa7'));}this[_0xb6c7('0xc')]['bot']=!![];this[_0xb6c7('0x33')](_0x2351a1);this[_0xb6c7('0x40')](_0x2351a1['text'],'in','','');this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')]('Trying\x20Dialogflow:\x20%s',_0x2351a1['text']));var _0x585ea9=this[_0xb6c7('0x7a')]['sync'](this,_0x2351a1);if(_0x585ea9){for(var _0x289b86 in _0x585ea9){if(_0x585ea9[_0xb6c7('0x98')](_0x289b86)){this[_0xb6c7('0xc')][_0xb6c7('0x9c')](util[_0xb6c7('0x27')](_0xb6c7('0xe4'),_0x289b86[_0xb6c7('0x6a')]()),_0x585ea9[_0x289b86]);}}this[_0xb6c7('0x40')](_0x585ea9['speech'],'out',_0xb6c7('0xe2'),'');return this['channel'][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0xe5'),_0x585ea9[_0xb6c7('0xe6')]));}return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x2351a1,_0xb6c7('0xe7'));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0xe8')]=function(_0xfe7897){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0xe9'),_0xfe7897['label']));if(!this['isConfigured'](_0xfe7897[_0xb6c7('0xea')])){return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0xeb'));}if(!this[_0xb6c7('0x82')](_0xfe7897[_0xb6c7('0x7c')])){return this['channel'][_0xb6c7('0xaa')](_0xb6c7('0xec'));}if(!this['isConfigured'](_0xfe7897[_0xb6c7('0xed')])){return this[_0xb6c7('0xc')]['noop'](_0xb6c7('0xee'));}if(!this[_0xb6c7('0x82')](_0xfe7897[_0xb6c7('0x7d')])){return this['channel'][_0xb6c7('0xaa')](_0xb6c7('0xef'));}if(!this[_0xb6c7('0x82')](_0xfe7897[_0xb6c7('0x5b')])){return this['channel'][_0xb6c7('0xaa')](_0xb6c7('0xa7'));}this[_0xb6c7('0xc')]['bot']=!![];this[_0xb6c7('0x33')](_0xfe7897);this['createSquareMessage'](_0xfe7897['text'],'in','','');this[_0xb6c7('0xc')]['noop'](util[_0xb6c7('0x27')](_0xb6c7('0xf0'),_0xfe7897[_0xb6c7('0x5b')]));var _0xb1e024=this[_0xb6c7('0x7b')][_0xb6c7('0x71')](this,_0xfe7897);if(_0xb1e024){for(var _0x1c9cc5 in _0xb1e024){if(_0xb1e024[_0xb6c7('0x98')](_0x1c9cc5)){if(_0x1c9cc5!==_0xb6c7('0xf1')){this[_0xb6c7('0xc')]['setVariable'](util['format'](_0xb6c7('0xe4'),_0x1c9cc5['toUpperCase']()),_0xb1e024[_0x1c9cc5]);}}}this[_0xb6c7('0x40')](_0xb1e024[_0xb6c7('0xe6')],_0xb6c7('0xf2'),'dialogflowV2',_0xb1e024['providerResponse']);return this['channel'][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0xf3'),_0xb1e024[_0xb6c7('0xe6')]));}return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0xfe7897,_0xb6c7('0xf4'));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0xf5')]=function(_0x614c04){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0xf6'),_0x614c04[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0x614c04[_0xb6c7('0xf7')])){return this[_0xb6c7('0xc')]['noop']('no\x20ndauth\x20url\x20configured');}if(!this[_0xb6c7('0x82')](_0x614c04[_0xb6c7('0xf8')])){return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0xf9'));}if(!this[_0xb6c7('0x82')](_0x614c04[_0xb6c7('0xfa')])){return this[_0xb6c7('0xc')]['noop'](_0xb6c7('0xfb'));}if(!this[_0xb6c7('0x82')](_0x614c04['ndassistant_url'])){return this['channel'][_0xb6c7('0xaa')](_0xb6c7('0xa7'));}this['channel'][_0xb6c7('0xfc')]=!![];this[_0xb6c7('0x33')](_0x614c04);this[_0xb6c7('0x40')](_0x614c04['text'],'in','','');this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util['format'](_0xb6c7('0xfd'),_0x614c04[_0xb6c7('0x5b')]));var _0x370189=this[_0xb6c7('0x7e')][_0xb6c7('0x71')](this,_0x614c04);if(_0x370189){for(var _0x3c6fcf in _0x370189){if(_0x370189[_0xb6c7('0x98')](_0x3c6fcf)){this[_0xb6c7('0xc')][_0xb6c7('0x9c')](util['format'](_0xb6c7('0xfe'),_0x3c6fcf[_0xb6c7('0x6a')]()),_0x370189[_0x3c6fcf]);}}this[_0xb6c7('0x40')](_0x370189['speech'],_0xb6c7('0xf2'),_0xb6c7('0xf5'),'');if(_0x370189['audiofile']){this[_0xb6c7('0xc')]['noop'](util[_0xb6c7('0x27')](_0xb6c7('0xff'),_0x370189[_0xb6c7('0x100')]));var _0x20fe92=this[_0xb6c7('0xc')][_0xb6c7('0x101')](_0x370189[_0xb6c7('0x100')]);try{fs[_0xb6c7('0x102')](_0x370189['audiofile']+_0xb6c7('0x103'));}catch(_0x290070){logger[_0xb6c7('0x2a')](_0x290070);}return _0x20fe92;}else{return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')]('SestekNDA\x20Result\x20%s',_0x370189[_0xb6c7('0xe6')]));}}return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x614c04,'SestekNDA\x20is\x20unreachable');};AGIVertices[_0xb6c7('0x12')]['end']=function(_0x51b1e6){logger['info'](util[_0xb6c7('0x27')](_0xb6c7('0x104'),_0x51b1e6['label']));return this['channel'][_0xb6c7('0xaa')](_0xb6c7('0x105'));};AGIVertices['prototype'][_0xb6c7('0x106')]=function(_0x1d644b){logger['info'](util['format'](_0xb6c7('0x107'),_0x1d644b['label']));var _0x5ce312='';if(_0x1d644b[_0xb6c7('0x108')]){if(!this['isConfigured'](_0x1d644b[_0xb6c7('0x108')])){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x1d644b,_0xb6c7('0x109'));}else{var _0x26c8e7=parseInt(_0x1d644b['trunk_id'],0xa);if(isNaN(_0x26c8e7)){_0x5ce312=_0x1d644b[_0xb6c7('0x108')];}else{_0x5ce312=this[_0xb6c7('0x10a')][_0xb6c7('0x71')](this,_0x1d644b[_0xb6c7('0x108')]);if(!_0x5ce312){return this[_0xb6c7('0xc')]['error'](_0x1d644b,_0xb6c7('0x10b'));}}}}else if(_0x1d644b[_0xb6c7('0x10c')]){_0x5ce312=_0x1d644b[_0xb6c7('0x10c')];}else{return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x1d644b,_0xb6c7('0x109'));}var _0x3f96a2=this[_0xb6c7('0xc')][_0xb6c7('0x55')]('DIAL',[util[_0xb6c7('0x27')]('SIP/%s/%s',_0x5ce312,_0x1d644b['phone']),_0x1d644b[_0xb6c7('0x65')],_0x1d644b[_0xb6c7('0x10d')],_0x1d644b[_0xb6c7('0x63')]]);if(_0x3f96a2[_0xb6c7('0xa9')]===-0x1){return _0x3f96a2;}return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0xe1'),'DIAL'));};AGIVertices[_0xb6c7('0x12')]['finally']=function(_0x21097b){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x10e'),_0x21097b[_0xb6c7('0x35')]));return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0x10f'));};AGIVertices['prototype'][_0xb6c7('0xa')]=function(_0xc665ca){logger['info'](util[_0xb6c7('0x27')]('Enter\x20in\x20GETDIGITS\x20(%s)\x20block',_0xc665ca[_0xb6c7('0x35')]));if(_0xc665ca[_0xb6c7('0xa4')]===0x0){return this[_0xb6c7('0xa3')](_0xc665ca);}_0xc665ca['retry']-=0x1;if(!this[_0xb6c7('0x82')](_0xc665ca[_0xb6c7('0x110')])){return this['channel']['error'](_0xc665ca,'no\x20file\x20audio\x20selected');}var _0x1fda2c=this[_0xb6c7('0x1c')][_0xb6c7('0x71')](this,_0xc665ca['file_id']);if(!_0x1fda2c){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0xc665ca,_0xb6c7('0x111'));}if(!this[_0xb6c7('0x82')](_0xc665ca[_0xb6c7('0xd4')])){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0xb6c7('0xd5'));}var _0x37fbef=this[_0xb6c7('0xc')]['getData'](_0x1fda2c,_0xc665ca[_0xb6c7('0x112')],_0xc665ca[_0xb6c7('0x113')]);var _0x57793d=_0x37fbef[_0xb6c7('0xa9')]?_0x37fbef[_0xb6c7('0xa9')][_0xb6c7('0x4c')]():'';logger['info'](_0xb6c7('0x114'),JSON[_0xb6c7('0x74')](_0x37fbef));if(_0x37fbef[_0xb6c7('0xa9')]===-0x1){this[_0xb6c7('0x33')][_0xb6c7('0x71')](this,_0xc665ca,_0x57793d);return _0x37fbef;}else if(_0x37fbef[_0xb6c7('0xa0')]===_0xb6c7('0x65')){_0x37fbef[_0xb6c7('0xa9')]=_0x57793d['length']>=parseInt(_0xc665ca[_0xb6c7('0x115')])?'x':'i';}else{_0x37fbef[_0xb6c7('0xa9')]=_0x57793d[_0xb6c7('0x97')]>=parseInt(_0xc665ca[_0xb6c7('0x115')])&&_0x57793d[_0xb6c7('0x97')]<=parseInt(_0xc665ca[_0xb6c7('0x113')])?'x':'i';}var _0x40eb0c=this[_0xb6c7('0x9f')]['sync'](this,_0xc665ca[_0xb6c7('0xd4')]);if(!_0x40eb0c){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0xc665ca,_0xb6c7('0xd6'));}this['channel'][_0xb6c7('0x9c')](_0x40eb0c,_0x57793d);if(this[_0xb6c7('0x82')](_0xc665ca[_0xb6c7('0x116')])){var _0x2d4907=parseInt(_0xc665ca[_0xb6c7('0x116')],0xa);var _0x212dc7=rs[_0xb6c7('0x117')]({'charset':'*','length':_0x2d4907});var _0x15610a=_0x57793d[_0xb6c7('0x97')];if(_0x15610a>0x0){if(_0x15610a>_0x2d4907){this[_0xb6c7('0x33')][_0xb6c7('0x71')](this,_0xc665ca,_0xc665ca[_0xb6c7('0x118')]===_0xb6c7('0x119')?_0x212dc7+_0x57793d['substr'](_0x2d4907):_0x57793d[_0xb6c7('0x11a')](0x0,_0x15610a-_0x2d4907)+_0x212dc7);}else{this['createSquareDetailsReport'][_0xb6c7('0x71')](this,_0xc665ca,rs['generate']({'charset':'*','length':_0x15610a}));}}else{this[_0xb6c7('0x33')][_0xb6c7('0x71')](this,_0xc665ca,'');}}else{this[_0xb6c7('0x33')][_0xb6c7('0x71')](this,_0xc665ca,_0x57793d);}return _0x37fbef;};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0xb')]=function(_0x57f131){logger[_0xb6c7('0x2c')](util['format']('Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block',_0x57f131[_0xb6c7('0x35')]));return this[_0xb6c7('0xa')](_0x57f131);};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x11b')]=function(_0x41c80b){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x11c'),_0x41c80b['label']));this['createSquareDetailsReport']['sync'](this,_0x41c80b,_0x41c80b[_0xb6c7('0x11d')]);return this['channel'][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0x11e'),_0x41c80b[_0xb6c7('0x11d')]));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x11f')]=function(_0x2011ac){logger['info'](util[_0xb6c7('0x27')](_0xb6c7('0x120'),_0x2011ac[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0x2011ac[_0xb6c7('0x85')])||!this['isConfigured'](_0x2011ac[_0xb6c7('0x86')])){return this['channel'][_0xb6c7('0xaa')](_0xb6c7('0x121'));}if(!this['isConfigured'](_0x2011ac[_0xb6c7('0x5b')])){return this['channel'][_0xb6c7('0xaa')](_0xb6c7('0xa7'));}this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0x122'),_0x2011ac[_0xb6c7('0x5b')]));var _0x26273c=this[_0xb6c7('0x84')][_0xb6c7('0x71')](this,_0x2011ac);if(_0x26273c){this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')]('aws\x20Polly\x20%s\x20file\x20created',_0x26273c));var _0x34f8a2=this[_0xb6c7('0xc')][_0xb6c7('0x101')](_0x26273c);try{fs[_0xb6c7('0x102')](_0x26273c+_0xb6c7('0x103'));}catch(_0x11cd9b){logger[_0xb6c7('0x2a')](_0x11cd9b);}return _0x34f8a2;}return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x2011ac,_0xb6c7('0x123'));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x124')]=function(_0x2a4e47){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')]('Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block',_0x2a4e47[_0xb6c7('0x35')]));if(!this['isConfigured'](_0x2a4e47[_0xb6c7('0x85')])||!this['isConfigured'](_0x2a4e47['aws_secret_access_key'])){return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0x121'));}if(!this[_0xb6c7('0x82')](_0x2a4e47[_0xb6c7('0x125')])){return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0x126'));}if(!this[_0xb6c7('0x82')](_0x2a4e47[_0xb6c7('0x5b')])){return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0xa7'));}this[_0xb6c7('0xc')][_0xb6c7('0xfc')]=!![];this['createSquareDetailsReport'](_0x2a4e47);this[_0xb6c7('0x40')](_0x2a4e47[_0xb6c7('0x5b')],'in','','');this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0x127'),_0x2a4e47[_0xb6c7('0x5b')]));var _0x572bd4=this[_0xb6c7('0x8b')][_0xb6c7('0x71')](this,_0x2a4e47);if(_0x572bd4){for(var _0x9a6090 in _0x572bd4){if(_0x572bd4[_0xb6c7('0x98')](_0x9a6090)&&_['isString'](_0x572bd4[_0x9a6090])){this[_0xb6c7('0xc')][_0xb6c7('0x9c')](util[_0xb6c7('0x27')]('AWS_LEX_%s',_0x9a6090[_0xb6c7('0x6a')]()),_0x572bd4[_0x9a6090]);}}if(_['isNil'](_0x572bd4[_0xb6c7('0x77')])){return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0x128'));}else{this[_0xb6c7('0x40')](_0x572bd4[_0xb6c7('0x77')],_0xb6c7('0xf2'),_0xb6c7('0x129'),'');return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util['format'](_0xb6c7('0x12a'),_0x572bd4['message']));}}return this[_0xb6c7('0xc')]['error'](_0x2a4e47,_0xb6c7('0x12b'));};AGIVertices[_0xb6c7('0x12')]['googleasr']=function(_0x46ff1e){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x12c'),_0x46ff1e['label'],_0x46ff1e[_0xb6c7('0x65')]));if(!this[_0xb6c7('0x82')](_0x46ff1e['key'])){return this['channel']['noop'](_0xb6c7('0xe3'));}var _0x34425c='wav';var _0x1502f5=util['format']('%s/recordings/%s',FILES_PATH,rs[_0xb6c7('0x117')](0x4));var _0x5575df=util['format'](_0xb6c7('0x9b'),_0x1502f5,_0x34425c);var _0x37732b=!![];if(_0x46ff1e[_0xb6c7('0x12d')]===_0xb6c7('0x12e')){_0x37732b=![];}var _0x4e7eeb=this['channel'][_0xb6c7('0x12f')](_0x1502f5,_0x34425c,_0x46ff1e[_0xb6c7('0x130')],_0x46ff1e[_0xb6c7('0x65')],undefined,_0x37732b);if(_0x4e7eeb[_0xb6c7('0xa9')]!==-0x1){this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0x131'),_0x5575df));var _0x4afacb=this[_0xb6c7('0x8c')]['sync'](this,_0x46ff1e,_0x5575df);if(_0x4afacb){for(var _0x5717d4 in _0x4afacb){if(_0x4afacb[_0xb6c7('0x98')](_0x5717d4)){this[_0xb6c7('0xc')]['setVariable'](util['format'](_0xb6c7('0x132'),_0x5717d4['toUpperCase']()),_0x4afacb[_0x5717d4]);}}return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0x133'),JSON[_0xb6c7('0x74')](_0x4afacb)));}}return _0x4e7eeb;};AGIVertices[_0xb6c7('0x12')]['tildeasr']=function(_0x2422c5){logger['info'](util[_0xb6c7('0x27')](_0xb6c7('0x134'),_0x2422c5['label']));if(!this['isConfigured'](_0x2422c5[_0xb6c7('0x8f')])){return this['channel'][_0xb6c7('0xaa')](_0xb6c7('0x135'));}if(!this['isConfigured'](_0x2422c5[_0xb6c7('0x90')])){return this['channel'][_0xb6c7('0xaa')](_0xb6c7('0x136'));}var _0x3e7fe7=_0xb6c7('0x137');var _0x367c7f=util[_0xb6c7('0x27')]('%s/recordings/%s',FILES_PATH,rs[_0xb6c7('0x117')](0x4));var _0x22c056=util[_0xb6c7('0x27')](_0xb6c7('0x9b'),_0x367c7f,_0x3e7fe7);var _0x3294fe=!![];if(_0x2422c5[_0xb6c7('0x12d')]===_0xb6c7('0x12e')){_0x3294fe=![];}var _0x5bc8e7=this[_0xb6c7('0xc')][_0xb6c7('0x12f')](_0x367c7f,_0x3e7fe7,_0x2422c5[_0xb6c7('0x130')],_0x2422c5[_0xb6c7('0x65')],undefined,_0x3294fe);if(_0x5bc8e7[_0xb6c7('0xa9')]!==-0x1){this[_0xb6c7('0xc')]['noop'](util[_0xb6c7('0x27')](_0xb6c7('0x138'),_0x22c056));var _0x49fb00=this['tildeASR'][_0xb6c7('0x71')](this,_0x2422c5,_0x22c056);if(_0x49fb00){for(var _0x18f1aa in _0x49fb00){if(_0x49fb00['hasOwnProperty'](_0x18f1aa)){this['channel'][_0xb6c7('0x9c')](util[_0xb6c7('0x27')](_0xb6c7('0x139'),_0x18f1aa[_0xb6c7('0x6a')]()),_0x49fb00[_0x18f1aa]);}}return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util['format']('TildeASR\x20Result\x20%s',JSON[_0xb6c7('0x74')](_0x49fb00)));}}return _0x5bc8e7;};AGIVertices[_0xb6c7('0x12')]['gotoc']=function(_0x3b1920){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')]('Enter\x20in\x20GOTO\x20(%s)\x20block',_0x3b1920['label']));return this[_0xb6c7('0xc')][_0xb6c7('0x13a')](_0x3b1920[_0xb6c7('0x3a')],_0x3b1920[_0xb6c7('0x3b')],_0x3b1920[_0xb6c7('0x3c')]);};AGIVertices['prototype'][_0xb6c7('0x13b')]=function(_0x9c02c7){logger['info'](util[_0xb6c7('0x27')](_0xb6c7('0x13c'),_0x9c02c7[_0xb6c7('0x35')]));if(!this['isConfigured'](_0x9c02c7['condition'])){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x9c02c7,_0xb6c7('0x13d'));}try{var _0x13af1d=eval(_0x9c02c7[_0xb6c7('0x13e')])?'true':'false';this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util['format']('EVAL\x20CONDITION\x20%s\x20%s',_0x9c02c7[_0xb6c7('0x13e')],_0x13af1d));return{'code':0xc8,'result':_0x13af1d};}catch(_0x1c8155){return{'code':0xc8,'result':'false'};}};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x13f')]=function(_0x337fd8){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')]('Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block',_0x337fd8[_0xb6c7('0x35')]));if(!this['isConfigured'](_0x337fd8[_0xb6c7('0x140')])){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x337fd8,'no\x20interval\x20configured');}var _0x479b5d=this[_0xb6c7('0x21')][_0xb6c7('0x71')](this,_0x337fd8[_0xb6c7('0x140')]);if(!_0x479b5d){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x337fd8,_0xb6c7('0x141'));}for(var _0x22f81c=0x0;_0x22f81c<_0x479b5d[_0xb6c7('0x97')];_0x22f81c+=0x1){var _0x24dc7c=this[_0xb6c7('0xc')]['getVariable'](util['format'](_0xb6c7('0x142'),_0x479b5d[_0x22f81c]));if(_0x24dc7c[_0xb6c7('0xa9')]===-0x1){return _0x24dc7c;}logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x143'),_0x479b5d[_0x22f81c],_0x24dc7c[_0xb6c7('0xa0')]));if(_0x24dc7c[_0xb6c7('0xa0')]===_0xb6c7('0x144')){logger['info'](util[_0xb6c7('0x27')](_0xb6c7('0x143'),_0x479b5d[_0x22f81c],_0xb6c7('0x144')));this['channel'][_0xb6c7('0xaa')](util['format'](_0xb6c7('0x143'),_0x479b5d[_0x22f81c],_0xb6c7('0x144')));return{'code':0xc8,'result':_0xb6c7('0x144')};}else{logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x143'),_0x479b5d[_0x22f81c],_0xb6c7('0x145')));this['channel'][_0xb6c7('0xaa')](util[_0xb6c7('0x27')]('IFTIME\x20%s\x20%s',_0x479b5d[_0x22f81c],_0xb6c7('0x145')));}}return{'code':0xc8,'result':_0xb6c7('0x145')};};AGIVertices['prototype'][_0xb6c7('0x146')]=function(_0x3235ee){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')]('Enter\x20in\x20HANGUP\x20(%s)\x20block',_0x3235ee[_0xb6c7('0x35')]));return this['channel'][_0xb6c7('0x146')]();};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x147')]=function(_0xc5fca5){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x148'),_0xc5fca5[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0xc5fca5['key'])){return this['channel'][_0xb6c7('0xaa')]('no\x20key\x20configured');}var _0x530dd1=_0xb6c7('0x137');var _0x2c901c=util[_0xb6c7('0x27')](_0xb6c7('0x149'),FILES_PATH,rs[_0xb6c7('0x117')](0x4));var _0x46d82b=util['format'](_0xb6c7('0x9b'),_0x2c901c,_0x530dd1);var _0x523483=!![];if(_0xc5fca5['beep']==='NOBEEP'){_0x523483=![];}var _0x215f99=this['channel'][_0xb6c7('0x12f')](_0x2c901c,_0x530dd1,_0xc5fca5[_0xb6c7('0x130')],_0xc5fca5[_0xb6c7('0x65')],undefined,_0x523483);if(_0x215f99[_0xb6c7('0xa9')]!==-0x1){this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')]('ispeech\x20%s\x20file\x20created',_0x46d82b));var _0x6d1829=this[_0xb6c7('0x14a')][_0xb6c7('0x71')](this,_0xc5fca5,_0x46d82b);if(_0x6d1829){for(var _0x5df8bc in _0x6d1829){if(_0x6d1829[_0xb6c7('0x98')](_0x5df8bc)){this['channel']['setVariable'](util['format'](_0xb6c7('0x14b'),_0x5df8bc['toUpperCase']()),_0x6d1829[_0x5df8bc]);}}return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')]('IspeechASR\x20Result\x20%s',JSON['stringify'](_0x6d1829)));}}return _0x215f99;};AGIVertices['prototype'][_0xb6c7('0x14c')]=function(_0x332402){logger[_0xb6c7('0x2c')](util['format'](_0xb6c7('0x14d'),_0x332402[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0x332402['key'])){return this[_0xb6c7('0xc')][_0xb6c7('0xaa')]('no\x20key\x20configured');}if(!this[_0xb6c7('0x82')](_0x332402[_0xb6c7('0x5b')])){return this[_0xb6c7('0xc')][_0xb6c7('0xaa')]('no\x20text\x20configured');}this[_0xb6c7('0xc')]['noop'](util[_0xb6c7('0x27')](_0xb6c7('0x14e'),_0x332402[_0xb6c7('0x5b')]));var _0x1e35cd=this[_0xb6c7('0x7f')][_0xb6c7('0x71')](this,_0x332402);if(_0x1e35cd){this['channel'][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0x14f'),_0x1e35cd));var _0x390387=this['channel'][_0xb6c7('0x101')](_0x1e35cd,_0x332402['intKey']);try{fs[_0xb6c7('0x102')](_0x1e35cd+_0xb6c7('0x103'));}catch(_0x5b6561){logger[_0xb6c7('0x2a')](_0x5b6561);}return _0x390387;}return this['channel'][_0xb6c7('0x2a')](_0x332402,_0xb6c7('0x150'));};AGIVertices['prototype']['login']=function(_0x18eede){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x151'),_0x18eede[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0x18eede[_0xb6c7('0x152')])){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x18eede,_0xb6c7('0x153'));}logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x154'),this[_0xb6c7('0xc')][_0xb6c7('0x37')],_0x18eede[_0xb6c7('0x152')]));var _0x3e5c39=this[_0xb6c7('0x54')][_0xb6c7('0x71')](this,_0x18eede['findBy']);if(_0x3e5c39){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x155'),this[_0xb6c7('0xc')][_0xb6c7('0x37')],_0x18eede['findBy']));this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util['format'](_0xb6c7('0x155'),this['channel'][_0xb6c7('0x37')],_0x18eede['findBy']));return{'code':0xc8,'result':_0xb6c7('0x156')};}else{logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x157'),this[_0xb6c7('0xc')][_0xb6c7('0x37')],_0x18eede['findBy']));this['channel'][_0xb6c7('0xaa')](util['format'](_0xb6c7('0x157'),this[_0xb6c7('0xc')][_0xb6c7('0x37')],_0x18eede[_0xb6c7('0x152')]));return{'code':0xc8,'result':'failure'};}};AGIVertices[_0xb6c7('0x12')]['logout']=function(_0x426553){logger['info'](util[_0xb6c7('0x27')](_0xb6c7('0x158'),_0x426553['label']));if(!this[_0xb6c7('0x82')](_0x426553[_0xb6c7('0x152')])){return this[_0xb6c7('0xc')]['error'](_0x426553,_0xb6c7('0x153'));}logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this['channel'][_0xb6c7('0x37')],_0x426553[_0xb6c7('0x152')]));var _0x46ecc8=this[_0xb6c7('0x53')][_0xb6c7('0x71')](this,_0x426553[_0xb6c7('0x152')]);if(_0x46ecc8){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x155'),this[_0xb6c7('0xc')]['callerid'],_0x426553[_0xb6c7('0x152')]));this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util['format']('AGENT\x20%s\x20FOUND\x20BY',this[_0xb6c7('0xc')][_0xb6c7('0x37')],_0x426553['findBy']));return{'code':0xc8,'result':_0xb6c7('0x156')};}else{logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x157'),this[_0xb6c7('0xc')][_0xb6c7('0x37')],_0x426553[_0xb6c7('0x152')]));this[_0xb6c7('0xc')]['noop'](util[_0xb6c7('0x27')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0xb6c7('0xc')]['callerid'],_0x426553[_0xb6c7('0x152')]));return{'code':0xc8,'result':_0xb6c7('0x159')};}};AGIVertices['prototype'][_0xb6c7('0x15a')]=function(_0xa72e73){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x15b'),_0xa72e73[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0xa72e73['operation'])){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0xa72e73,_0xb6c7('0x15c'));}this[_0xb6c7('0xc')]['noop'](util[_0xb6c7('0x27')](_0xb6c7('0x15d'),_0xa72e73[_0xb6c7('0x15e')]));var _0x186ca5=eval(_0xa72e73['operation']);if(!this[_0xb6c7('0x82')](_0xa72e73[_0xb6c7('0xd4')])){return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0xd5'));}var _0x3f1b92=this[_0xb6c7('0x9f')][_0xb6c7('0x71')](this,_0xa72e73[_0xb6c7('0xd4')]);if(!_0x3f1b92){return this[_0xb6c7('0xc')]['error'](_0xa72e73,_0xb6c7('0xd6'));}if(_[_0xb6c7('0x96')](_0x186ca5)){var _0x19b611=this;_0x186ca5[_0xb6c7('0xd8')](function(_0x513dab,_0x163da4){_0x19b611[_0xb6c7('0xc')][_0xb6c7('0x9c')](util[_0xb6c7('0x27')]('%s[%s]',_0x3f1b92,_0x163da4),_0x513dab);});return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0x15f'),_0x3f1b92));}else{return this['channel'][_0xb6c7('0x9c')](_0x3f1b92,_0x186ca5);}};AGIVertices[_0xb6c7('0x12')]['menu']=function(_0x149ca2){logger['info'](util[_0xb6c7('0x27')](_0xb6c7('0x160'),_0x149ca2[_0xb6c7('0x35')]));if(_0x149ca2[_0xb6c7('0xa4')]===0x0){return this[_0xb6c7('0xa3')](_0x149ca2);}_0x149ca2[_0xb6c7('0xa4')]-=0x1;if(!this[_0xb6c7('0x82')](_0x149ca2[_0xb6c7('0x110')])){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x149ca2,_0xb6c7('0x161'));}var _0xb5ef7c=this[_0xb6c7('0x1c')][_0xb6c7('0x71')](this,_0x149ca2[_0xb6c7('0x110')]);if(!_0xb5ef7c){return this['channel'][_0xb6c7('0x2a')](_0x149ca2,_0xb6c7('0x111'));}var _0x522e45=this[_0xb6c7('0xc')]['getData'](_0xb5ef7c,_0x149ca2[_0xb6c7('0x112')],_0x149ca2['digit']);var _0x19809e=_0x522e45[_0xb6c7('0xa9')];if(_0x522e45[_0xb6c7('0xa9')]===-0x1){this['createSquareDetailsReport']['sync'](this,_0x149ca2,'-1');return _0x522e45;}else if(_0x522e45[_0xb6c7('0xa0')]==='timeout'){_0x522e45[_0xb6c7('0xa9')]=_0x522e45[_0xb6c7('0xa9')][_0xb6c7('0x97')]>0x0?_0x522e45[_0xb6c7('0xa9')]:'t';}else if(_[_0xb6c7('0x42')](_0x522e45[_0xb6c7('0xa9')])){_0x522e45['result']='#';_0x19809e='#';}if(!this[_0xb6c7('0x82')](_0x149ca2[_0xb6c7('0xd4')])){this['channel'][_0xb6c7('0xaa')](_0xb6c7('0xd5'));}else{var _0x4da5be=this[_0xb6c7('0x9f')][_0xb6c7('0x71')](this,_0x149ca2['variable_id']);if(!_0x4da5be){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x149ca2,'no\x20variable\x20found');}this[_0xb6c7('0xc')][_0xb6c7('0x9c')](_0x4da5be,_0x19809e);}this['createSquareDetailsReport']['sync'](this,_0x149ca2,_0x19809e);return _0x522e45;};AGIVertices['prototype'][_0xb6c7('0xaa')]=function(_0x2a57cd){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')]('Enter\x20in\x20NOOP\x20(%s)\x20block',_0x2a57cd['label']));return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0x2a57cd[_0xb6c7('0x162')]||_0x2a57cd[_0xb6c7('0x35')]);};AGIVertices['prototype'][_0xb6c7('0x163')]=function(_0x525c77){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x164'),_0x525c77['label']));if(!this[_0xb6c7('0x82')](_0x525c77[_0xb6c7('0x152')])){return this[_0xb6c7('0xc')]['error'](_0x525c77,_0xb6c7('0x153'));}logger['info'](util[_0xb6c7('0x27')]('FIND\x20AGENT\x20%s\x20BY\x20%s',this[_0xb6c7('0xc')]['callerid'],_0x525c77[_0xb6c7('0x152')]));var _0x12e8c3=this[_0xb6c7('0x4e')][_0xb6c7('0x71')](this,_0x525c77[_0xb6c7('0x165')]);var _0x3782b3=this[_0xb6c7('0x50')]['sync'](this,_0x525c77[_0xb6c7('0x152')],_0x12e8c3);if(_0x3782b3){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x155'),this[_0xb6c7('0xc')][_0xb6c7('0x37')],_0x525c77[_0xb6c7('0x152')]));this['channel']['noop'](util[_0xb6c7('0x27')](_0xb6c7('0x155'),this[_0xb6c7('0xc')][_0xb6c7('0x37')],_0x525c77[_0xb6c7('0x152')]));return{'code':0xc8,'result':_0xb6c7('0x156')};}else{logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x157'),this['channel'][_0xb6c7('0x37')],_0x525c77[_0xb6c7('0x152')]));this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0x155'),this[_0xb6c7('0xc')][_0xb6c7('0x37')],_0x525c77[_0xb6c7('0x152')]));return{'code':0xc8,'result':'failure'};}};AGIVertices['prototype'][_0xb6c7('0x166')]=function(_0x51b5ff){logger['info'](util['format'](_0xb6c7('0x167'),_0x51b5ff[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0x51b5ff[_0xb6c7('0x110')])){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x51b5ff,_0xb6c7('0x161'));}var _0x317dad=this['getSound'][_0xb6c7('0x71')](this,_0x51b5ff['file_id']);if(!_0x317dad){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x51b5ff,_0xb6c7('0x111'));}var _0x481821=this['channel'][_0xb6c7('0x55')](_0xb6c7('0x168'),[_0x317dad,_0x51b5ff[_0xb6c7('0x10d')]]);if(_0x481821[_0xb6c7('0xa9')]===-0x1){return _0x481821;}return this[_0xb6c7('0xc')]['noop'](util[_0xb6c7('0x27')](_0xb6c7('0xc1'),_0xb6c7('0x168'),_0x317dad));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x169')]=function(_0x422645){logger[_0xb6c7('0x2c')](util['format'](_0xb6c7('0x16a'),_0x422645[_0xb6c7('0x35')]));if(!this['isConfigured'](_0x422645[_0xb6c7('0x16b')])){return this['channel'][_0xb6c7('0x2a')](_0x422645,'no\x20queue\x20selected');}var _0x536cb0='';var _0x42429c=parseInt(_0x422645[_0xb6c7('0x16b')],0xa);if(isNaN(_0x42429c)){_0x536cb0=_0x422645[_0xb6c7('0x16b')];}else{_0x536cb0=this[_0xb6c7('0x13')]['sync'](this,_0x422645[_0xb6c7('0x16b')]);if(!_0x536cb0){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x422645,_0xb6c7('0x16c'));}}var _0x2cfb8='';if(this['isConfigured'](_0x422645[_0xb6c7('0x110')])){var _0xfcb43f=this[_0xb6c7('0x1c')][_0xb6c7('0x71')](this,_0x422645[_0xb6c7('0x110')]);if(_0xfcb43f){_0x2cfb8=_0xfcb43f;}}this[_0xb6c7('0x33')][_0xb6c7('0x71')](this,_0x422645,_0x536cb0);if(_0x422645[_0xb6c7('0x10d')][_0xb6c7('0x16d')]('x')<0x0){_0x422645['opts']+='x';}if(_0x422645[_0xb6c7('0x10d')][_0xb6c7('0x16d')]('X')<0x0){_0x422645['opts']+='X';}this[_0xb6c7('0xc')]['setVariable']('XMCS-QUEUE',_0x536cb0?_0x536cb0[_0xb6c7('0x16e')]():'');var _0x3ef776=this[_0xb6c7('0xc')][_0xb6c7('0x55')](_0xb6c7('0x16f'),[_0x536cb0,_0x422645[_0xb6c7('0x10d')],_0x422645[_0xb6c7('0x63')],_0x2cfb8,_0x422645[_0xb6c7('0x65')],_0x422645[_0xb6c7('0xb5')],_0x422645[_0xb6c7('0x170')],_0x422645[_0xb6c7('0x171')],'',_0x422645[_0xb6c7('0x172')]]);if(_0x3ef776[_0xb6c7('0xa9')]===-0x1){return _0x3ef776;}return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util['format'](_0xb6c7('0xc1'),_0xb6c7('0x16f'),_0x536cb0));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x173')]=function(_0x2c2bdb){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x174'),_0x2c2bdb[_0xb6c7('0x35')]));var _0x297f45=_0x2c2bdb[_0xb6c7('0x175')]||_0xb6c7('0x137');var _0x9a33d4=util[_0xb6c7('0x27')](_0xb6c7('0x176'),this[_0xb6c7('0xc')][_0xb6c7('0x34')],rs[_0xb6c7('0x117')](0x5));var _0x5c4e99=util[_0xb6c7('0x27')](_0xb6c7('0x177'),FILES_PATH,_0x9a33d4,_0x297f45);var _0x8a0112=util['format']('%s/recordings/%s',FILES_PATH,_0x9a33d4);this[_0xb6c7('0x38')][_0xb6c7('0x71')](this,_0x2c2bdb,_0x9a33d4,_0x5c4e99);this[_0xb6c7('0xc')][_0xb6c7('0x9c')]('RECORDING_SAVENAME',_0x9a33d4);logger[_0xb6c7('0x2c')]('Recording\x20%s\x20%s\x20%s\x20%s',_0x8a0112,_0x297f45,_0x2c2bdb[_0xb6c7('0x178')],_0x2c2bdb['timeout']);return this[_0xb6c7('0xc')]['recordFile'](_0x8a0112,_0x297f45,_0x2c2bdb[_0xb6c7('0x178')],_0x2c2bdb[_0xb6c7('0x65')],undefined,!![]);};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x179')]=function(_0x37d29b){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x17a'),_0x37d29b[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0x37d29b['url'])){return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0x17b'));}var _0x52bb7a=this['restAPI'][_0xb6c7('0x71')](this,_0x37d29b);logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')]('Response:',util[_0xb6c7('0x17c')](_0x52bb7a,{'showHidden':![],'depth':null})));if(!this[_0xb6c7('0x82')](_0x37d29b[_0xb6c7('0xd4')])){return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0x17d'));}var _0x1c4a54=this[_0xb6c7('0x9f')][_0xb6c7('0x71')](this,_0x37d29b['variable_id']);if(!_0x1c4a54){return this['channel'][_0xb6c7('0x2a')](_0x37d29b,_0xb6c7('0xd6'));}this[_0xb6c7('0xc')][_0xb6c7('0x9c')](util[_0xb6c7('0x27')]('%s_STATUS_CODE',_0x1c4a54),_0x52bb7a[_0xb6c7('0x76')]?_0x52bb7a[_0xb6c7('0x76')]:_0xb6c7('0x17e'));this['channel'][_0xb6c7('0x9c')](util[_0xb6c7('0x27')](_0xb6c7('0x17f'),_0x1c4a54),_0x52bb7a[_0xb6c7('0x180')]?_0x52bb7a[_0xb6c7('0x180')]:'OK');if(_0x52bb7a[_0xb6c7('0x6b')]){try{this[_0xb6c7('0x9a')](_0x52bb7a[_0xb6c7('0x6b')],_0x1c4a54);}catch(_0x1e7f31){logger[_0xb6c7('0x2a')](util[_0xb6c7('0x27')](_0xb6c7('0x181'),_0x1c4a54));}}return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util['format'](_0xb6c7('0xda'),_0x1c4a54));};AGIVertices[_0xb6c7('0x12')]['saydigits']=function(_0x2690da){logger[_0xb6c7('0x2c')](util['format'](_0xb6c7('0x182'),_0x2690da[_0xb6c7('0x35')]));return this[_0xb6c7('0xc')][_0xb6c7('0x183')](_0x2690da[_0xb6c7('0x184')][_0xb6c7('0x57')](/\s+/g,''),_0x2690da[_0xb6c7('0x178')]);};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x185')]=function(_0x4ea598){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x186'),_0x4ea598['label']));return this['channel'][_0xb6c7('0x187')](_0x4ea598[_0xb6c7('0x66')]['replace'](/\s+/g,''),_0x4ea598[_0xb6c7('0x178')]);};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x188')]=function(_0x3e0262){logger[_0xb6c7('0x2c')](util['format'](_0xb6c7('0x189'),_0x3e0262[_0xb6c7('0x35')]));return this[_0xb6c7('0xc')][_0xb6c7('0x18a')](_0x3e0262[_0xb6c7('0x5b')],_0x3e0262['escape_digits']);};AGIVertices['prototype']['sendMail']=function(_0x534432){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')]('Enter\x20in\x20SENDMAIL\x20(%s)\x20block',_0x534432[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0x534432[_0xb6c7('0x18b')])){return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0x18c'));}var _0x28fa15=this[_0xb6c7('0x1e')][_0xb6c7('0x71')](this,_0x534432[_0xb6c7('0x18b')]);if(!_0x28fa15||!_0x28fa15['Smtp']){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x534432,_0xb6c7('0x18d'));}var _0x2f447d={'from':util[_0xb6c7('0x27')](_0xb6c7('0x18e'),_0x28fa15[_0xb6c7('0x11')],_0x28fa15['email']||_0x28fa15[_0xb6c7('0x18f')][_0xb6c7('0x190')]),'to':_0x534432['to']||'','cc':_0x534432['cc']||'','bcc':_0x534432[_0xb6c7('0x191')]||'','subject':_0x534432[_0xb6c7('0x192')],'html':_0x534432[_0xb6c7('0x5b')],'text':_0x534432[_0xb6c7('0x5b')]};if(this[_0xb6c7('0x82')](_0x534432[_0xb6c7('0x193')])){}logger[_0xb6c7('0xdc')](_0xb6c7('0x194'),JSON[_0xb6c7('0x74')](_0x2f447d));this[_0xb6c7('0x33')][_0xb6c7('0x71')](this,_0x534432,_0x534432[_0xb6c7('0x18b')]);this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0x195'),_0x28fa15[_0xb6c7('0x11')]));this[_0xb6c7('0x20')][_0xb6c7('0x71')](this,_0x28fa15[_0xb6c7('0x196')],_0x2f447d);return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0x197'));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x198')]=function(_0x56f55b){logger[_0xb6c7('0x2c')](util['format'](_0xb6c7('0x199'),_0x56f55b['label']));return this[_0xb6c7('0xc')][_0xb6c7('0xaa')]('SENDFAX\x20block\x20not\x20implemented');};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x19a')]=function(_0x191ba5){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x19b'),_0x191ba5['label']));if(!this[_0xb6c7('0x82')](_0x191ba5[_0xb6c7('0x19c')])){return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0x19d'));}var _0x3c5669=this[_0xb6c7('0x31')]['sync'](this,_0x191ba5[_0xb6c7('0x19c')]);if(!_0x3c5669){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x191ba5,_0xb6c7('0x19e'));}var _0x495dc7={'body':_0x191ba5[_0xb6c7('0x19f')],'phone':_0x191ba5['to']||'','SmsAccountId':_0x3c5669['id']};logger[_0xb6c7('0xdc')](_0xb6c7('0x1a0'),JSON['stringify'](_0x495dc7));this['createSquareDetailsReport']['sync'](this,_0x191ba5,_0x191ba5[_0xb6c7('0x19c')]);this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util['format'](_0xb6c7('0x1a1'),_0x3c5669[_0xb6c7('0x11')]));this['createSmsMessage']['sync'](this,_0x495dc7);return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0x1a2'));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x1a3')]=function(_0x151de2){logger[_0xb6c7('0x2c')](util['format'](_0xb6c7('0x1a4'),_0x151de2[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0x151de2[_0xb6c7('0xd4')])){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x151de2,_0xb6c7('0x1a5'));}var _0x44c4e3=this['getVariable'][_0xb6c7('0x71')](this,_0x151de2['variable_id']);if(!_0x44c4e3){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x151de2,_0xb6c7('0xd6'));}return this[_0xb6c7('0xc')][_0xb6c7('0x9c')](_0x44c4e3,_0x151de2[_0xb6c7('0x1a6')]);};AGIVertices[_0xb6c7('0x12')]['start']=function(_0x2f9cd7){logger[_0xb6c7('0x2c')](util['format'](_0xb6c7('0x1a7'),_0x2f9cd7['label']));this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0x1a8'));var _0x109a3f=this[_0xb6c7('0xc')]['getVariable'](_0xb6c7('0x1a9'));if(!_['isEmpty'](_0x109a3f['extra'])){this['channel'][_0xb6c7('0x34')]=_0x109a3f[_0xb6c7('0xa0')];}if(_0x2f9cd7['answer']==='yes'){this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0x1aa'));return this[_0xb6c7('0xc')]['answer']();}return this['channel']['noop']('Skipped\x20Answer');};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x1ab')]=function(_0x3646a2){logger['info'](util[_0xb6c7('0x27')](_0xb6c7('0x1ac'),_0x3646a2[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0x3646a2[_0xb6c7('0x1ad')])){return this[_0xb6c7('0xc')]['error'](_0x3646a2,_0xb6c7('0x1ae'));}var _0x4b4fb0=this[_0xb6c7('0x1af')][_0xb6c7('0x71')](this,_0x3646a2[_0xb6c7('0x1ad')]);if(!this[_0xb6c7('0x82')](_0x4b4fb0)){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x3646a2,util[_0xb6c7('0x27')](_0xb6c7('0x1b0'),_0x3646a2[_0xb6c7('0x1ad')]));}if(_0x4b4fb0===this[_0xb6c7('0xc')][_0xb6c7('0x1b1')]){return this['channel']['error'](_0x3646a2,_0xb6c7('0x1b2'));}this['createSquareDetailsReport'][_0xb6c7('0x71')](this,_0x3646a2,_0x4b4fb0);var _0x3e7d5f=this[_0xb6c7('0xc')]['exec'](_0xb6c7('0x1b3'),util['format'](_0xb6c7('0x1b4'),config[_0xb6c7('0xb5')]['host']||_0xb6c7('0x1b5'),_0x4b4fb0,this[_0xb6c7('0xc')]['arg_1']));if(_0x3e7d5f[_0xb6c7('0xa9')]===-0x1){return _0x3e7d5f;}return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')]('Executed\x20command\x20%s\x20%s',_0xb6c7('0x1b3'),_0x4b4fb0));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x1b6')]=function(_0xd5f1cf){logger[_0xb6c7('0x2c')](util['format'](_0xb6c7('0x1b7'),_0xd5f1cf[_0xb6c7('0x35')]));var _0x56970f=this[_0xb6c7('0x1b8')]['sync'](this,_0xd5f1cf[_0xb6c7('0xb7')]);this[_0xb6c7('0x33')]['sync'](this,_0xd5f1cf,_0xd5f1cf['command']);if(this['isConfigured'](_0xd5f1cf[_0xb6c7('0xd4')])){var _0x39f859=this[_0xb6c7('0x9f')][_0xb6c7('0x71')](this,_0xd5f1cf[_0xb6c7('0xd4')]);if(_0x39f859){this[_0xb6c7('0xc')][_0xb6c7('0x9c')](_0x39f859,_0x56970f);return this[_0xb6c7('0xc')]['noop'](util['format'](_0xb6c7('0x1b9'),_0xd5f1cf['command'],_0x39f859));}}return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')]('sh\x20command:\x20%s\x20result\x20no\x20stored',_0xd5f1cf[_0xb6c7('0xb7')]));};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x1ba')]=function(_0x56e216){logger[_0xb6c7('0x2c')](util['format'](_0xb6c7('0x1bb'),_0x56e216['label']));_0x56e216[_0xb6c7('0x5b')]=_0x56e216[_0xb6c7('0x5b')][_0xb6c7('0x57')](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0xb6c7('0x82')](_0x56e216[_0xb6c7('0x59')])){return this['channel'][_0xb6c7('0xaa')](_0xb6c7('0x1bc'));}if(!this[_0xb6c7('0x82')](_0x56e216[_0xb6c7('0x5b')])){return this['channel']['noop']('no\x20text\x20configured');}this['channel'][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0x1bd'),_0x56e216[_0xb6c7('0x5b')]));var _0x16d635=this[_0xb6c7('0x58')][_0xb6c7('0x71')](this,_0x56e216);if(_0x16d635){this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0x1be'),_0x16d635));var _0x5dff85=this['channel'][_0xb6c7('0x101')](_0x16d635);try{fs[_0xb6c7('0x102')](_0x16d635+'.wav');}catch(_0x95756a){logger[_0xb6c7('0x2a')](_0x95756a);}return _0x5dff85;}return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x56e216,'Google\x20Cloud\x20TTS\x20is\x20unreachable');};AGIVertices[_0xb6c7('0x12')][_0xb6c7('0x1bf')]=function(_0x2dd1ab){logger[_0xb6c7('0x2c')](util['format'](_0xb6c7('0x1c0'),_0x2dd1ab[_0xb6c7('0x35')]));_0x2dd1ab['text']=_0x2dd1ab['text'][_0xb6c7('0x57')](/(\r\n|\n|\r)/gm,'\x20');if(!this['isConfigured'](_0x2dd1ab[_0xb6c7('0x5b')])){return this[_0xb6c7('0xc')][_0xb6c7('0xaa')](_0xb6c7('0xa7'));}this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')](_0xb6c7('0x1c1'),_0x2dd1ab[_0xb6c7('0x5b')]));var _0x2fd027=this[_0xb6c7('0x60')][_0xb6c7('0x71')](this,_0x2dd1ab);if(_0x2fd027){this['channel'][_0xb6c7('0xaa')](util[_0xb6c7('0x27')]('Google\x20TTS\x20%s\x20file\x20created',_0x2fd027));var _0x3cce0e=this[_0xb6c7('0xc')][_0xb6c7('0x101')](_0x2fd027);try{fs[_0xb6c7('0x102')](_0x2fd027+_0xb6c7('0x103'));}catch(_0x246efe){logger[_0xb6c7('0x2a')](_0x246efe);}return _0x3cce0e;}return this['channel'][_0xb6c7('0x2a')](_0x2dd1ab,_0xb6c7('0x1c2'));};AGIVertices['prototype'][_0xb6c7('0x1c3')]=function(_0x15ce31){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x1c4'),_0x15ce31[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0x15ce31[_0xb6c7('0x152')])){return this['channel'][_0xb6c7('0x2a')](_0x15ce31,_0xb6c7('0x153'));}logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x154'),this[_0xb6c7('0xc')]['callerid'],_0x15ce31['findBy']));var _0x4ca004=this[_0xb6c7('0x52')][_0xb6c7('0x71')](this,_0x15ce31[_0xb6c7('0x152')]);if(_0x4ca004){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')]('AGENT\x20%s\x20FOUND\x20BY',this['channel'][_0xb6c7('0x37')],_0x15ce31['findBy']));this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')]('AGENT\x20%s\x20FOUND\x20BY',this[_0xb6c7('0xc')][_0xb6c7('0x37')],_0x15ce31[_0xb6c7('0x152')]));return{'code':0xc8,'result':_0xb6c7('0x156')};}else{logger[_0xb6c7('0x2c')](util['format'](_0xb6c7('0x157'),this[_0xb6c7('0xc')]['callerid'],_0x15ce31[_0xb6c7('0x152')]));this[_0xb6c7('0xc')][_0xb6c7('0xaa')](util[_0xb6c7('0x27')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0xb6c7('0xc')]['callerid'],_0x15ce31[_0xb6c7('0x152')]));return{'code':0xc8,'result':_0xb6c7('0x159')};}};AGIVertices['prototype']['voicemail']=function(_0x20231a){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x1c5'),_0x20231a[_0xb6c7('0x35')]));var _0x533fc6=this[_0xb6c7('0xc')][_0xb6c7('0x55')](_0xb6c7('0x1c6'),[_0x20231a[_0xb6c7('0x1c7')],_0x20231a[_0xb6c7('0x79')]]);if(_0x533fc6['result']===-0x1){return _0x533fc6;}return this['channel']['noop'](util[_0xb6c7('0x27')]('Executed\x20command\x20%s\x20%s',_0xb6c7('0x1c6'),_0x20231a[_0xb6c7('0x1c7')]));};AGIVertices['prototype']['vswitch']=function(_0x43cf04){logger[_0xb6c7('0x2c')](util[_0xb6c7('0x27')](_0xb6c7('0x1c8'),_0x43cf04[_0xb6c7('0x35')]));if(!this[_0xb6c7('0x82')](_0x43cf04[_0xb6c7('0xd4')])){return this[_0xb6c7('0xc')][_0xb6c7('0x2a')](_0x43cf04,'no\x20variable\x20selected');}var _0x16ce4b=this[_0xb6c7('0x9f')][_0xb6c7('0x71')](this,_0x43cf04['variable_id']);if(!_0x16ce4b){return this['channel'][_0xb6c7('0x2a')](_0x43cf04,_0xb6c7('0xd6'));}var _0x1be2d2=this['channel'][_0xb6c7('0x9f')](_0x16ce4b);return{'code':0xc8,'result':_0x1be2d2[_0xb6c7('0xa0')]?_0x1be2d2[_0xb6c7('0xa0')]:'-'};};String[_0xb6c7('0x12')]['replaceAll']=function(_0x12d9ac,_0x28c068){return this['split'](_0x12d9ac)[_0xb6c7('0x1c9')](_0x28c068);};module[_0xb6c7('0x1ca')]=AGIVertices;
\ No newline at end of file
+var _0x8ece=['createSquareDetailsReport','channel','label','agicommand','createSquareRecording','uniqueid','context','priority','accountcode','arg_1','file','createSquareMessage','createCmContact','isNil','callback_','random','isEmpty','lastName','scheduledAt','toString','callback_priority','getPause','agentPause','agent','callerid','agentUnpause','agentLogout','agentLogin','internal','%s/%s@from-sip/n','LOCAL','exec','trim','replace','googleCloudTTS','apiKey','google_cloud_tts_text_type','languageCode','en-US','ssmlGender','MALE','audioEncoding','googleTTS','google_tts_language','url','timeout','POST','PUT','method','body','parse','An\x20incorrect\x20formatted\x20json\x20body\x20has\x20been\x20passed\x20to\x20the\x20function','headers','An\x20incorrect\x20formatted\x20json\x20headers\x20has\x20been\x20passed\x20to\x20the\x20function','computedVariables','uri','render','stringify','An\x20incorrect\x20formatted\x20json\x20has\x20been\x20passed\x20to\x20the\x20function','statusCode','statusMessage','message','options','googleDialogflow','text','googleDialogflowV2','dialogflowV2_project_id','client_email','sestekNDA','ispeechTTS','key','ispeech_tts_language','speed','ispeechASR','isConfigured','model','awsPolly','aws_polly_region','aws_polly_voice','Amy','aws_text_type','awsLex','aws_access_key_id','aws_secret_access_key','aws_lex_region','aws_bot_name','googleASR','google_asr_language','tildeASR','appid','appsecret','includes','hasOwnProperty','isString','replaceObjectAllVariables','replaceAllVariables','recursiveNodeIndex','isPlainObject','isArray','length','saveRestApiResult','%s.%s','setVariable','split','replaceAll','extra','getAndSetVariable','result','The\x20\x22%s\x22\x20variable\x20value\x20is:\x20%s','maxRetry','sync','retry','mrcpsynth','Enter\x20in\x20MRCPSynth\x20(%s)\x20block','noop','no\x20text\x20configured','MRCPSynth','Executed\x20command\x20MRCPSynth\x20%s','mrcprecog','grammar','MRCPRecog','RECOG_CONFIDENCE()','MRCP_RECOG_CONFIDENCE','RECOG_INPUT()','MRCP_RECOG_TRANSCRIPT','RECOG_INSTANCE()','Executed\x20command\x20MRCPRecog\x20%s','args','answer','Enter\x20in\x20ANSWER\x20(%s)\x20block','Wait\x20%s\x20seconds\x20before\x20answer','callback','list_id','no\x20list\x20selected','delay','add','CALLBACK\x20added\x20phone:\x20%s\x20on\x20list:\x20%s\x20at\x20%s','phone','custom_app','Enter\x20in\x20CUSTOM\x20APP\x20(%s)\x20block','application','Executed\x20command\x20%s\x20%s','lumenvoxtts','Enter\x20in\x20SESTEKTTS\x20(%s)\x20block','lumenvoxasr','no\x20grammar\x20configured','LUMENVOX_ASR_CONFIDENCE','LUMENVOX_ASR_TRANSCRIPT','LUMENVOX_ASR_INSTANCE','sestekasr','SESTEK_ASR_CONFIDENCE','SESTEK_ASR_TRANSCRIPT','database','odbc_id','no\x20query\x20configured','query:\x20%s','variable_id','no\x20variable\x20selected\x20for\x20the\x20result','forEach','keys','%s[%s][%s]','%s_ROWS_COUNT','variable\x20%s\x20set','debug','Enter\x20in\x20DIAL\x20(%s)\x20block','sip_id','no\x20user\x20selected','no\x20user\x20found','DIAL','SIP/%s','opts','Executed\x20command\x20%s','no\x20key\x20configured','bot','Trying\x20Dialogflow:\x20%s','DIALOGFLOW_%s','speech','out','dialogflow','Dialogflow\x20Result\x20%s','dialogflowV2','no\x20project_id\x20configured','no\x20client_email\x20configured','private_key','no\x20private_key\x20configured','dialogflowV2_language','no\x20anguage\x20configured','Trying\x20DialogflowV2:\x20%s','providerResponse','toUpperCase','DialogflowV2\x20Result\x20%s','DialogflowV2\x20is\x20unreachable','Enter\x20in\x20SESTEKNDA\x20(%s)\x20block','ndauth_url','no\x20ndauth\x20url\x20configured','username','no\x20username\x20configured','password','no\x20password\x20configured','ndassistant_url','Trying\x20SestekNDA:\x20%s','SESTEK_NDA_%s','sesteknda','Sestek\x20NDA\x20%s\x20file\x20created','audiofile','unlink','.wav','SestekNDA\x20Result\x20%s','SestekNDA\x20is\x20unreachable','end','Enter\x20in\x20END\x20(%s)\x20block','ext_dial','Enter\x20in\x20EXTERNAL\x20DIAL\x20(%s)\x20block','trunk_id','no\x20trunk\x20selected','no\x20trunk\x20found','trunk_name','finally','Enter\x20in\x20FINALLY\x20(%s)\x20block','file_id','no\x20file\x20audio\x20found','response','maxdigit','test','mindigit','hiddendigitsnum','generate','hiddendigitspos','first','substr','Enter\x20in\x20GETSECRETDIGITS\x20(%s)\x20block','Enter\x20in\x20GOAL\x20(%s)\x20block','goalname','GOAL\x20%s','awspolly','[AGI]\x20Enter\x20in\x20AWSPOLLY\x20(%s)\x20block','no\x20valid\x20credentials\x20configured','Trying\x20aws\x20Polly\x20%s','aws\x20Polly\x20is\x20unreachable','Trying\x20Amazon\x20Lex:\x20%s','AWS_LEX_%s','Amazon\x20Lex\x20Result\x20%s','Amazon\x20Lex\x20is\x20unreachable','googleasr','Enter\x20in\x20GOOGLEASR\x20(%s)\x20block\x20%s','wav','beep','NOBEEP','recordFile','intKey','GOOGLE_ASR_%s','GoogleASR\x20Result\x20%s','tildeasr','Enter\x20in\x20TILDEASR\x20(%s)\x20block','TILDE_ASR_%s','TildeASR\x20Result\x20%s','gotoc','Enter\x20in\x20GOTO\x20(%s)\x20block','continueAt','extension','gotoif','Enter\x20in\x20GOTOIF\x20(%s)\x20block','condition','no\x20condition\x20configured','true','EVAL\x20CONDITION\x20%s\x20%s','Enter\x20in\x20GOTOIFTIME\x20(%s)\x20block','interval_id','no\x20interval\x20configured','no\x20intervals\x20found','IFTIME\x20%s\x20%s','false','hangup','Enter\x20in\x20HANGUP\x20(%s)\x20block','%s/recordings/%s','ISPEECH_ASR_%s','IspeechASR\x20Result\x20%s','ispeechtts','Enter\x20in\x20ISPEECHTTS\x20(%s)\x20block','Trying\x20ispeech\x20TTS\x20%s','ispeech\x20%s\x20file\x20created','streamFile','ispeech\x20TTS\x20is\x20unreachable','Enter\x20in\x20LOGIN\x20(%s)\x20block','FIND\x20AGENT\x20%s\x20BY\x20%s','findBy','AGENT\x20%s\x20FOUND\x20BY','success','AGENT\x20%s\x20NOT\x20FOUND\x20BY','failure','logout','no\x20find\x20by\x20configured','Enter\x20in\x20MATH\x20(%s)\x20block','operation','math\x20%s','%s[%s]','variable\x20%s[key]\x20set','Enter\x20in\x20MENU\x20(%s)\x20block','getData','digit','no\x20variable\x20found','Enter\x20in\x20NOOP\x20(%s)\x20block','output','pause','Enter\x20in\x20PAUSE\x20(%s)\x20block','pause_id','playback','no\x20file\x20audio\x20selected','PLAYBACK','queue','Enter\x20in\x20QUEUE\x20(%s)\x20block','no\x20queue\x20selected','queue_id','no\x20queue\x20found','indexOf','XMCS-QUEUE','toLowerCase','QUEUE','macro','gosub','position','record','Enter\x20in\x20RECORD\x20(%s)\x20block','%s_%s','RECORDING_SAVENAME','Recording\x20%s\x20%s\x20%s\x20%s','escape_digits','Enter\x20in\x20RESTAPI\x20(%s)\x20block','restAPI','Response:','inspect','no\x20variable\x20selected\x20for\x20the\x20response','%s_STATUS_CODE','200','%s_STATUS_MESSAGE','Unable\x20to\x20set\x20result\x20in\x20variable\x20%s','Enter\x20in\x20SAYDIGITS\x20(%s)\x20block','sayDigits','digits','saynumber','sayNumber','sayphonetic','sayPhonetic','Enter\x20in\x20SENDMAIL\x20(%s)\x20block','no\x20mail\x20account\x20configured','account_id','Smtp','no\x20mail\x20account\x20found','email','user','bcc','template_id','Trying\x20SendMail\x20with\x20account\x20%s','smtpOptions','Mail\x20message\x20added\x20to\x20outgoing\x20process','sendFax','Enter\x20in\x20SENDFAX\x20(%s)\x20block','SENDFAX\x20block\x20not\x20implemented','sendSMS','Enter\x20in\x20SENDSMS\x20(%s)\x20block','sms_account_id','no\x20sms\x20account\x20configured','sms_text','sendSMS\x20message','Trying\x20SendSMS\x20with\x20account\x20%s','Sms\x20message\x20added\x20to\x20outgoing\x20process','set','Enter\x20in\x20SET\x20(%s)\x20block','no\x20variable\x20selected','variable_value','start','Enter\x20in\x20START\x20(%s)\x20block','XMCS-UNIQUEID','yes','Answer','subproject','Enter\x20in\x20SUBPROJECT\x20(%s)\x20block','no\x20subproject\x20selected','project_id','no\x20subproject\x20found\x20with\x20id\x20%d','project\x20in\x20subproject\x20must\x20be\x20different\x20from\x20the\x20called\x20project','AGI','agi://%s/square,\x22%s\x22,\x22%s\x22','host','system','Enter\x20in\x20SYSTEM\x20(%s)\x20block','shellCommand','command','sh\x20command:\x20%s\x20result\x20on\x20variable:\x20%s','sh\x20command:\x20%s\x20result\x20no\x20stored','no\x20apiKey\x20configured','Trying\x20Google\x20Cloud\x20TTS\x20%s','Google\x20Cloud\x20TTS\x20is\x20unreachable','tts','Enter\x20in\x20GOOGLETTS\x20(%s)\x20block','Trying\x20Google\x20TTS\x20%s','Google\x20TTS\x20%s\x20file\x20created','Google\x20TTS\x20is\x20unreachable','Enter\x20in\x20UNPAUSE\x20(%s)\x20block','Enter\x20in\x20VOICEMAIL\x20(%s)\x20block','VOICEMAIL','mailbox','Enter\x20in\x20SWITCH\x20(%s)\x20block','join','exports','util','lodash','shelljs','odbc','mustache','request-promise','../../config/logger','agi','../../config/environment','/var/opt/motion2/server/files','rawHeaders','rawBody','menu','getdigits','getsecretdigits','rpc','prototype','getVariable','getVariableById','then','name','catch','getVoiceQueue','getVoiceQueueById','getSquareProject','getSquareProjectById','getSquareOdbc','getSquareOdbcById','dsn','getUserById','getTrunk','getTrunkById','getSound','getSoundById','save_name','getMailAccount','getMailAccountById','sendMailMessage','mailRpc','getIntervals','getIntervalById','interval','map','format','%s/sounds/converted/%s','getQueryOdbc','error','Error\x20getting\x20ODBC\x20connection\x20%s','info','ODBC\x20connection\x20successfully','query','Error\x20executing\x20query\x20%s','Query\x20executed\x20correctly\x20%s','close','Error\x20closing\x20connection\x20to\x20odbc\x20%s','getSmsAccount','getSmsAccountById','createSmsMessage'];(function(_0x1860c5,_0x90d824){var _0x25cf43=function(_0x549acf){while(--_0x549acf){_0x1860c5['push'](_0x1860c5['shift']());}};_0x25cf43(++_0x90d824);}(_0x8ece,0x195));var _0xe8ec=function(_0x2c39bb,_0x2753c4){_0x2c39bb=_0x2c39bb-0x0;var _0x53d038=_0x8ece[_0x2c39bb];return _0x53d038;};'use strict';var fs=require('fs');var util=require(_0xe8ec('0x0'));var _=require(_0xe8ec('0x1'));var sh=require(_0xe8ec('0x2'));var odbc=require(_0xe8ec('0x3'))();var rs=require('randomstring');var moment=require('moment');var Mustache=require(_0xe8ec('0x4'));var rp=require(_0xe8ec('0x5'));var logger=require(_0xe8ec('0x6'))(_0xe8ec('0x7'));var config=require(_0xe8ec('0x8'));var scripts=require('./scripts');var FILES_PATH=_0xe8ec('0x9');var recursiveMapAttributes=[_0xe8ec('0xa'),_0xe8ec('0xb')];var verticesWithRetry=[_0xe8ec('0xc'),_0xe8ec('0xd'),_0xe8ec('0xe')];var AGIVertices=function(_0x406f7e,_0x5525f8,_0x44d128){this['channel']=_0x406f7e;this[_0xe8ec('0xf')]=_0x5525f8;this['mailRpc']=_0x44d128;};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x11')]=function(_0x4ff773,_0x3e3606){this[_0xe8ec('0xf')][_0xe8ec('0x12')](_0x4ff773)[_0xe8ec('0x13')](function(_0x33cf9b){_0x3e3606(null,_0x33cf9b?_0x33cf9b[_0xe8ec('0x14')]:![]);})[_0xe8ec('0x15')](function(_0xf72aa7){_0x3e3606(_0xf72aa7);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x16')]=function(_0x48a951,_0x15de29){this[_0xe8ec('0xf')][_0xe8ec('0x17')](_0x48a951)[_0xe8ec('0x13')](function(_0x2921c8){_0x15de29(null,_0x2921c8?_0x2921c8[_0xe8ec('0x14')]:![]);})[_0xe8ec('0x15')](function(_0x218a4b){_0x15de29(_0x218a4b);});};AGIVertices['prototype'][_0xe8ec('0x18')]=function(_0xf34100,_0x389c13){this['rpc'][_0xe8ec('0x19')](_0xf34100)[_0xe8ec('0x13')](function(_0x2a3b73){_0x389c13(null,_0x2a3b73?_0x2a3b73[_0xe8ec('0x14')]:![]);})[_0xe8ec('0x15')](function(_0x39e557){_0x389c13(_0x39e557);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x1a')]=function(_0x5df9a9,_0x11dbe0){this[_0xe8ec('0xf')][_0xe8ec('0x1b')](_0x5df9a9)[_0xe8ec('0x13')](function(_0x30a35b){_0x11dbe0(null,_0x30a35b?_0x30a35b[_0xe8ec('0x1c')]:![]);})[_0xe8ec('0x15')](function(_0xaa01ef){_0x11dbe0(_0xaa01ef);});};AGIVertices[_0xe8ec('0x10')]['getUser']=function(_0x2d0c2c,_0x3fa53f){this[_0xe8ec('0xf')][_0xe8ec('0x1d')](_0x2d0c2c)[_0xe8ec('0x13')](function(_0x48a0bc){_0x3fa53f(null,_0x48a0bc?_0x48a0bc[_0xe8ec('0x14')]:![]);})[_0xe8ec('0x15')](function(_0x431af0){_0x3fa53f(_0x431af0);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x1e')]=function(_0x4443a1,_0x4ce7d3){this['rpc'][_0xe8ec('0x1f')](_0x4443a1)[_0xe8ec('0x13')](function(_0x35af9b){_0x4ce7d3(null,_0x35af9b?_0x35af9b[_0xe8ec('0x14')]:![]);})[_0xe8ec('0x15')](function(_0x3519a5){_0x4ce7d3(_0x3519a5);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x20')]=function(_0xa9e1b1,_0x2e2d47){var _0x388e15=this;this[_0xe8ec('0xf')][_0xe8ec('0x21')](_0xa9e1b1)[_0xe8ec('0x13')](function(_0x1140d6){_0x2e2d47(null,_0x1140d6?_0x388e15['getSoundPath'](_0x1140d6[_0xe8ec('0x22')]):![]);})[_0xe8ec('0x15')](function(_0x2ec6ff){_0x2e2d47(_0x2ec6ff);});};AGIVertices['prototype'][_0xe8ec('0x23')]=function(_0x4d4137,_0x45bb71){this[_0xe8ec('0xf')][_0xe8ec('0x24')](_0x4d4137)[_0xe8ec('0x13')](function(_0x9c83b9){_0x45bb71(null,_0x9c83b9?_0x9c83b9:![]);})['catch'](function(_0x1c8f9d){_0x45bb71(_0x1c8f9d);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x25')]=function(_0x5e3344,_0x2bc9e4,_0x4bfb2a){this[_0xe8ec('0x26')][_0xe8ec('0x25')](_0x5e3344,_0x2bc9e4)[_0xe8ec('0x13')](function(){_0x4bfb2a(null);})[_0xe8ec('0x15')](function(_0x12ff60){_0x4bfb2a(_0x12ff60);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x27')]=function(_0x2277cc,_0x7a1722){this['rpc'][_0xe8ec('0x28')](_0x2277cc)[_0xe8ec('0x13')](function(_0x18cd13){if(_0x18cd13){if(_0x18cd13['IntervalId']){_0x7a1722(null,[_0x18cd13[_0xe8ec('0x29')]]);}else{_0x7a1722(null,_[_0xe8ec('0x2a')](_0x18cd13['Intervals'],_0xe8ec('0x29')));}}else{_0x7a1722(null,![]);}})[_0xe8ec('0x15')](function(_0x1bd67e){_0x7a1722(_0x1bd67e);});};AGIVertices[_0xe8ec('0x10')]['getSoundPath']=function(_0x189109){return util[_0xe8ec('0x2b')](_0xe8ec('0x2c'),FILES_PATH,_0x189109);};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x2d')]=function(_0x295cdb,_0x165324,_0x29f78a){odbc['open'](_0x295cdb,function(_0x5b2e66){if(_0x5b2e66){logger[_0xe8ec('0x2e')](_0xe8ec('0x2f'),_0x5b2e66);_0x29f78a(_0x5b2e66);}else{logger[_0xe8ec('0x30')](_0xe8ec('0x31'));odbc[_0xe8ec('0x32')](_0x165324,function(_0x12b2db,_0x1456ec){if(_0x12b2db){logger['info'](_0xe8ec('0x33'),_0x165324);_0x29f78a(_0x12b2db);}else{logger['info'](_0xe8ec('0x34'),_0x165324);odbc[_0xe8ec('0x35')](function(_0x539ac9){if(_0x539ac9){logger['error'](_0xe8ec('0x36'),_0x539ac9);}_0x29f78a(null,_0x1456ec);});}});}});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x37')]=function(_0x5c99cd,_0x1223b8){this[_0xe8ec('0xf')][_0xe8ec('0x38')](_0x5c99cd)[_0xe8ec('0x13')](function(_0x3d52c9){_0x1223b8(null,_0x3d52c9?_0x3d52c9:![]);})['catch'](function(_0x55ac08){_0x1223b8(_0x55ac08);});};AGIVertices[_0xe8ec('0x10')]['createSmsMessage']=function(_0x3f06c1,_0x1784e3){this[_0xe8ec('0xf')][_0xe8ec('0x39')](_0x3f06c1)[_0xe8ec('0x13')](function(_0x21966e){_0x1784e3(null,_0x21966e);})[_0xe8ec('0x15')](function(_0x4f2f61){_0x1784e3(_0x4f2f61);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x3a')]=function(_0x40e8b3,_0x582d67,_0x2f295e){this[_0xe8ec('0xf')][_0xe8ec('0x3a')]({'uniqueid':this[_0xe8ec('0x3b')]['uniqueid'],'node':_0x40e8b3[_0xe8ec('0x3c')],'application':_0x40e8b3[_0xe8ec('0x3d')],'data':_0x582d67||null,'project_name':this[_0xe8ec('0x3b')]['arg_1'],'callerid':this[_0xe8ec('0x3b')]['callerid']})[_0xe8ec('0x13')](function(_0x34d93d){if(_0x2f295e){_0x2f295e(null,_0x34d93d);}})[_0xe8ec('0x15')](function(_0x5e8740){if(_0x2f295e){_0x2f295e(_0x5e8740);}});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x3e')]=function(_0x509e4a,_0x1479c3,_0x496e0a,_0x138995){this['rpc'][_0xe8ec('0x3e')]({'uniqueid':this[_0xe8ec('0x3b')][_0xe8ec('0x3f')],'callerid':this[_0xe8ec('0x3b')]['callerid'],'calleridname':this['channel']['calleridname'],'context':this[_0xe8ec('0x3b')][_0xe8ec('0x40')],'extension':this[_0xe8ec('0x3b')]['extension'],'priority':this[_0xe8ec('0x3b')][_0xe8ec('0x41')],'accountcode':this[_0xe8ec('0x3b')][_0xe8ec('0x42')],'dnid':this[_0xe8ec('0x3b')]['dnid'],'projectName':this[_0xe8ec('0x3b')][_0xe8ec('0x43')],'saveName':_0x1479c3,'filename':_0x509e4a[_0xe8ec('0x44')]||_0x1479c3,'savePath':_0x496e0a})[_0xe8ec('0x13')](function(_0x329ef3){_0x138995(null,_0x329ef3);})[_0xe8ec('0x15')](function(_0x37611a){_0x138995(_0x37611a);});};AGIVertices['prototype'][_0xe8ec('0x45')]=function(_0x100035,_0x59dc46,_0x31d2e6,_0x3e1132,_0x40b8e6){this[_0xe8ec('0xf')]['createSquareMessage']({'uniqueid':this[_0xe8ec('0x3b')][_0xe8ec('0x3f')],'body':_0x100035,'direction':_0x59dc46,'providerName':_0x31d2e6,'providerResponse':_0x3e1132})[_0xe8ec('0x13')](function(_0xab8f25){if(_0x40b8e6){_0x40b8e6(null,_0xab8f25);}})[_0xe8ec('0x15')](function(_0x1458ee){if(_0x40b8e6){_0x40b8e6(_0x1458ee);}});};AGIVertices['prototype'][_0xe8ec('0x46')]=function(_0x413d14,_0x482856){this['rpc'][_0xe8ec('0x46')]({'firstName':_['isEmpty'](_0x413d14['name'])||_[_0xe8ec('0x47')](_0x413d14[_0xe8ec('0x14')])?_0xe8ec('0x48')+Math[_0xe8ec('0x49')]():_0x413d14[_0xe8ec('0x14')],'lastName':_[_0xe8ec('0x4a')](_0x413d14['lastName'])||_['isNil'](_0x413d14[_0xe8ec('0x4b')])?null:_0x413d14[_0xe8ec('0x4b')],'phone':_0x413d14['phone'],'ListId':_0x413d14['list_id'],'scheduledat':_0x413d14[_0xe8ec('0x4c')],'callbackUniqueid':this[_0xe8ec('0x3b')][_0xe8ec('0x3f')],'tags':'callback','description':'Callback\x20scheduled\x20at\x20'+_0x413d14[_0xe8ec('0x4c')][_0xe8ec('0x4d')](),'priority':_0x413d14[_0xe8ec('0x4e')]})[_0xe8ec('0x13')](function(_0x5292e6){_0x482856(null,_0x5292e6);})['catch'](function(_0x17d1e4){_0x482856(_0x17d1e4);});};AGIVertices['prototype'][_0xe8ec('0x4f')]=function(_0x221a79,_0x553bf9){this[_0xe8ec('0xf')]['getPauseById'](_0x221a79)[_0xe8ec('0x13')](function(_0x4e69e5){_0x553bf9(null,_0x4e69e5?_0x4e69e5[_0xe8ec('0x14')]:![]);})[_0xe8ec('0x15')](function(_0x3ef497){_0x553bf9(_0x3ef497);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x50')]=function(_0x30a9b0,_0x56be8d,_0x249bcc){var _0x4acba2={'role':_0xe8ec('0x51')};_0x4acba2[_0x30a9b0]=this[_0xe8ec('0x3b')][_0xe8ec('0x52')];this[_0xe8ec('0xf')][_0xe8ec('0x50')](_0x4acba2,_0x56be8d,this['channel'][_0xe8ec('0x3f')])[_0xe8ec('0x13')](function(_0x5b066b){_0x249bcc(null,_['isNil'](_0x5b066b)?![]:!![]);})[_0xe8ec('0x15')](function(_0x1ded42){logger['error'](_0x1ded42);_0x249bcc(null,![]);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x53')]=function(_0x4ee845,_0x492062){var _0x26516e={'role':_0xe8ec('0x51')};_0x26516e[_0x4ee845]=this['channel']['callerid'];this[_0xe8ec('0xf')][_0xe8ec('0x53')](_0x26516e)[_0xe8ec('0x13')](function(_0x2a3286){_0x492062(null,_[_0xe8ec('0x47')](_0x2a3286)?![]:!![]);})[_0xe8ec('0x15')](function(_0x30e039){logger[_0xe8ec('0x2e')](_0x30e039);_0x492062(null,![]);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x54')]=function(_0x16c245,_0x1c1470){var _0x903ed5={'role':_0xe8ec('0x51')};_0x903ed5[_0x16c245]=this[_0xe8ec('0x3b')][_0xe8ec('0x52')];this['rpc'][_0xe8ec('0x54')](_0x903ed5)[_0xe8ec('0x13')](function(_0x3ae6ed){_0x1c1470(null,_[_0xe8ec('0x47')](_0x3ae6ed)?![]:!![]);})['catch'](function(_0x4f1ef6){logger[_0xe8ec('0x2e')](_0x4f1ef6);_0x1c1470(null,![]);});};AGIVertices['prototype'][_0xe8ec('0x55')]=function(_0x57824f,_0x40eb3b){var _0x1b93aa={'role':_0xe8ec('0x51')};_0x1b93aa[_0x57824f]=this[_0xe8ec('0x3b')][_0xe8ec('0x52')];var _0xaecdcd=_0x57824f!=_0xe8ec('0x56')?util[_0xe8ec('0x2b')](_0xe8ec('0x57'),_0xe8ec('0x58'),this['channel'][_0xe8ec('0x52')]):undefined;this[_0xe8ec('0xf')][_0xe8ec('0x55')](_0x1b93aa,_0xaecdcd)[_0xe8ec('0x13')](function(_0x55e370){_0x40eb3b(null,_[_0xe8ec('0x47')](_0x55e370)?![]:!![]);})['catch'](function(_0x317f52){logger['error'](_0x317f52);_0x40eb3b(null,![]);});};AGIVertices[_0xe8ec('0x10')]['shellCommand']=function(_0x41ce4b,_0x39e0a5){sh[_0xe8ec('0x59')](_[_0xe8ec('0x5a')](_0x41ce4b),function(_0x521509,_0x28cf8b){var _0x57255c=_0x28cf8b[_0xe8ec('0x5b')](/(\r\n|\n|\r)/gm,'');_0x39e0a5(null,_0x57255c);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x5c')]=function(_0x3a858c,_0x2a2d67){scripts['googleCloudTTS'](_0x3a858c[_0xe8ec('0x5d')],_0x3a858c[_0xe8ec('0x5e')]||'text',_0x3a858c['text'],_0x3a858c[_0xe8ec('0x5f')]||_0xe8ec('0x60'),_0x3a858c[_0xe8ec('0x61')]||_0xe8ec('0x62'),_0x3a858c[_0xe8ec('0x63')]||'MP3')['then'](function(_0x36069a){_0x2a2d67(null,_0x36069a);})[_0xe8ec('0x15')](function(_0x22e243){_0x2a2d67(_0x22e243);});};AGIVertices['prototype']['googleTTS']=function(_0x33b9e4,_0x5f38f8){scripts[_0xe8ec('0x64')](_0x33b9e4['text'],_0x33b9e4[_0xe8ec('0x65')]||'en',0x1)[_0xe8ec('0x13')](function(_0x2600d3){_0x5f38f8(null,_0x2600d3);})['catch'](function(_0x407b6f){_0x5f38f8(_0x407b6f);});};AGIVertices[_0xe8ec('0x10')]['restAPI']=function(_0x16a85b,_0x31125a){var _0x1bd095={'uri':_0x16a85b[_0xe8ec('0x66')],'method':_0x16a85b['method'],'json':!![],'resolveWithFullResponse':!![],'strictSSL':![],'timeout':typeof parseInt(_0x16a85b[_0xe8ec('0x67')])==='number'&&parseInt(_0x16a85b[_0xe8ec('0x67')])>=0x1?parseInt(_0x16a85b[_0xe8ec('0x67')])*0x3e8:0x5*0x3e8};if(_['includes']([_0xe8ec('0x68'),_0xe8ec('0x69')],_0x1bd095[_0xe8ec('0x6a')]['toUpperCase']())){try{_0x1bd095[_0xe8ec('0x6b')]=_0x16a85b[_0xe8ec('0xb')]?JSON[_0xe8ec('0x6c')](_0x16a85b[_0xe8ec('0xb')]):{};}catch(_0x33861f){logger[_0xe8ec('0x2e')](_0xe8ec('0x6d'),_0x33861f);}}try{_0x1bd095[_0xe8ec('0x6e')]=_0x16a85b['rawHeaders']?JSON['parse'](_0x16a85b[_0xe8ec('0xa')]):{};}catch(_0x2243ef){logger[_0xe8ec('0x2e')](_0xe8ec('0x6f'),_0x2243ef);}if(_0x16a85b[_0xe8ec('0x70')]){try{var _0x4e40c4=require(_0x16a85b['computedVariables'])['sync'](this,_0x1bd095);_0x1bd095[_0xe8ec('0x71')]=Mustache[_0xe8ec('0x72')](_0x16a85b[_0xe8ec('0x66')],_0x4e40c4,{},['$$','$$']);if(_0x1bd095[_0xe8ec('0x6e')]){_0x1bd095[_0xe8ec('0x6e')]=JSON['parse'](Mustache['render'](JSON[_0xe8ec('0x73')](_0x1bd095[_0xe8ec('0x6e')]),_0x4e40c4,{},['$$','$$']));}if(_0x1bd095[_0xe8ec('0x6b')]){_0x1bd095[_0xe8ec('0x6b')]=JSON['parse'](Mustache[_0xe8ec('0x72')](JSON[_0xe8ec('0x73')](_0x1bd095[_0xe8ec('0x6b')]),_0x4e40c4,{},['$$','$$']));}}catch(_0x5c20ba){logger[_0xe8ec('0x2e')](_0xe8ec('0x74'),_0x5c20ba);}}rp(_0x1bd095)['then'](function(_0x163aa0){var _0xa1e0cb={'statusCode':_0x163aa0[_0xe8ec('0x75')]||0xc8,'statusMessage':_0x163aa0[_0xe8ec('0x76')]||'OK','headers':_0x163aa0[_0xe8ec('0x6e')]||{},'body':_0x163aa0[_0xe8ec('0x6b')]||{}};_0x31125a(null,_0xa1e0cb);})[_0xe8ec('0x15')](function(_0x27ef82){var _0x163bda={'statusCode':_0x27ef82[_0xe8ec('0x75')]||0x1f4,'statusMessage':_0x27ef82[_0xe8ec('0x77')]||'500\x20-\x20Internal\x20Server\x20Error','headers':_0x27ef82[_0xe8ec('0x78')][_0xe8ec('0x6e')]||{},'body':_0x27ef82[_0xe8ec('0x78')]['body']||{}};_0x31125a(null,_0x163bda);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x79')]=function(_0x1011f5,_0x32b42c){scripts[_0xe8ec('0x79')](this[_0xe8ec('0x3b')]['uniqueid'],_0x1011f5['key'],_0x1011f5[_0xe8ec('0x7a')],_0x1011f5['dialogflow_language']||'en')[_0xe8ec('0x13')](function(_0x4b6cc0){_0x32b42c(null,_0x4b6cc0);})[_0xe8ec('0x15')](function(_0x486809){_0x32b42c(_0x486809);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x7b')]=function(_0x336204,_0x54851b){scripts['googleDialogflowV2'](this[_0xe8ec('0x3b')][_0xe8ec('0x3f')],_0x336204[_0xe8ec('0x7c')],_0x336204[_0xe8ec('0x7d')],_0x336204['private_key'],_0x336204[_0xe8ec('0x7a')],_0x336204['dialogflowV2_language']||'en')[_0xe8ec('0x13')](function(_0x4fb460){_0x54851b(null,_0x4fb460);})['catch'](function(_0x11a4e6){_0x54851b(_0x11a4e6);});};AGIVertices['prototype'][_0xe8ec('0x7e')]=function(_0x4d2dee,_0x45a3dd){scripts[_0xe8ec('0x7e')](this[_0xe8ec('0x3b')],_0x4d2dee)[_0xe8ec('0x13')](function(_0x41f033){_0x45a3dd(null,_0x41f033);})[_0xe8ec('0x15')](function(_0x1a38bb){_0x45a3dd(_0x1a38bb);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x7f')]=function(_0x3b6338,_0x4f7d0c){scripts[_0xe8ec('0x7f')](_0x3b6338[_0xe8ec('0x80')],_0x3b6338[_0xe8ec('0x7a')],_0x3b6338[_0xe8ec('0x81')]||'en-US',_0x3b6338[_0xe8ec('0x82')])[_0xe8ec('0x13')](function(_0x15097f){_0x4f7d0c(null,_0x15097f);})[_0xe8ec('0x15')](function(_0x3d1d57){_0x4f7d0c(_0x3d1d57);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x83')]=function(_0x1e5b7f,_0x2e4e4d,_0x3285c7){scripts[_0xe8ec('0x83')](_0x2e4e4d,_0x1e5b7f['key'],_0x1e5b7f['ispeech_asr_language']||_0xe8ec('0x60'),this[_0xe8ec('0x84')](_0x1e5b7f[_0xe8ec('0x85')])?_0x1e5b7f[_0xe8ec('0x85')]:undefined)[_0xe8ec('0x13')](function(_0x2d95bd){_0x3285c7(null,_0x2d95bd);})[_0xe8ec('0x15')](function(_0x3480d2){_0x3285c7(_0x3480d2);});};AGIVertices[_0xe8ec('0x10')]['awsPolly']=function(_0x4856a2,_0x12ff35){scripts[_0xe8ec('0x86')](_0x4856a2['aws_access_key_id'],_0x4856a2['aws_secret_access_key'],_0x4856a2[_0xe8ec('0x87')],_0x4856a2[_0xe8ec('0x88')]||_0xe8ec('0x89'),_0x4856a2[_0xe8ec('0x7a')],_0x4856a2[_0xe8ec('0x8a')]||_0xe8ec('0x7a'))[_0xe8ec('0x13')](function(_0x2c6758){_0x12ff35(null,_0x2c6758);})[_0xe8ec('0x15')](function(_0x3c0cb3){_0x12ff35(_0x3c0cb3);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x8b')]=function(_0x2aa0a4,_0x37a3ab){scripts['awsLex'](this[_0xe8ec('0x3b')]['uniqueid'],_0x2aa0a4[_0xe8ec('0x8c')],_0x2aa0a4[_0xe8ec('0x8d')],_0x2aa0a4[_0xe8ec('0x8e')],_0x2aa0a4[_0xe8ec('0x7a')],_0x2aa0a4[_0xe8ec('0x8f')])[_0xe8ec('0x13')](function(_0x2a0152){_0x37a3ab(null,_0x2a0152);})[_0xe8ec('0x15')](function(_0x100a9c){_0x37a3ab(_0x100a9c);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x90')]=function(_0x8349de,_0x19bfad,_0x3f0aec){scripts['googleASR'](_0x19bfad,_0x8349de[_0xe8ec('0x80')],_0x8349de[_0xe8ec('0x91')]||_0xe8ec('0x60'))[_0xe8ec('0x13')](function(_0x566f19){_0x3f0aec(null,_0x566f19);})[_0xe8ec('0x15')](function(_0x12c4a8){_0x3f0aec(_0x12c4a8);});};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x92')]=function(_0x258476,_0x82364f,_0x4e6caa){scripts[_0xe8ec('0x92')](_0x82364f,_0x258476[_0xe8ec('0x93')],_0x258476[_0xe8ec('0x94')],_0x258476[_0xe8ec('0x71')])[_0xe8ec('0x13')](function(_0x25fc25){_0x4e6caa(null,_0x25fc25);})[_0xe8ec('0x15')](function(_0x4ce995){_0x4e6caa(_0x4ce995);});};AGIVertices[_0xe8ec('0x10')]['clear']=function(_0x531d00){var _0x3f06aa=_[_0xe8ec('0x95')](verticesWithRetry,_0x531d00[_0xe8ec('0x3d')])?_0x531d00:_['clone'](_0x531d00);for(var _0x16b2d8 in _0x3f06aa){if(_0x3f06aa[_0xe8ec('0x96')](_0x16b2d8)){if(_0x3f06aa[_0x16b2d8]&&_[_0xe8ec('0x97')](_0x3f06aa[_0x16b2d8])){if(_[_0xe8ec('0x95')](recursiveMapAttributes,_0x16b2d8)){_0x3f06aa[_0x16b2d8]=this[_0xe8ec('0x98')](_0x3f06aa[_0x16b2d8]);}else{_0x3f06aa[_0x16b2d8]=this[_0xe8ec('0x99')](_0x3f06aa[_0x16b2d8]);}}}}return _0x3f06aa;};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x9a')]=function(_0x22fbe0){for(var _0x4fb1f in _0x22fbe0){if(_0x22fbe0[_0xe8ec('0x96')](_0x4fb1f)){if(_[_0xe8ec('0x9b')](_0x22fbe0[_0x4fb1f])){this[_0xe8ec('0x9a')](_0x22fbe0[_0x4fb1f]);}else if(_[_0xe8ec('0x9c')](_0x22fbe0[_0x4fb1f])){for(var _0xbe5fa6=0x0;_0xbe5fa6<_0x22fbe0[_0x4fb1f][_0xe8ec('0x9d')];_0xbe5fa6++){this[_0xe8ec('0x9a')](_0x22fbe0[_0x4fb1f][_0xbe5fa6]);}}else if(_[_0xe8ec('0x97')](_0x22fbe0[_0x4fb1f])){_0x22fbe0[_0x4fb1f]=this[_0xe8ec('0x99')](_0x22fbe0[_0x4fb1f]);}}}};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x9e')]=function(_0x171162,_0x15f785){for(var _0x965376 in _0x171162){if(_0x171162[_0xe8ec('0x96')](_0x965376)){if(_[_0xe8ec('0x9b')](_0x171162[_0x965376])){if(!_['isEmpty'](_0x171162[_0x965376])){this[_0xe8ec('0x9e')](_0x171162[_0x965376],util['format'](_0xe8ec('0x9f'),_0x15f785,_0x965376));}}else if(_[_0xe8ec('0x9c')](_0x171162[_0x965376])){for(var _0x20f701=0x0;_0x20f701<_0x171162[_0x965376][_0xe8ec('0x9d')];_0x20f701++){this[_0xe8ec('0x9e')](_0x171162[_0x965376][_0x20f701],util[_0xe8ec('0x2b')](_0xe8ec('0x9f'),_0x15f785,_0x965376+'['+_0x20f701+']'));}}else{if(!_[_0xe8ec('0x47')](_0x171162[_0x965376])){this[_0xe8ec('0x3b')][_0xe8ec('0xa0')](util[_0xe8ec('0x2b')](_0xe8ec('0x9f'),_0x15f785,_0x965376),_0x171162[_0x965376]);}}}}};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x98')]=function(_0x4df339){try{var _0x188ed2=JSON[_0xe8ec('0x6c')](_0x4df339);this['recursiveNodeIndex'](_0x188ed2);return JSON[_0xe8ec('0x73')](_0x188ed2);}catch(_0xe731d){return this[_0xe8ec('0x99')](_0x4df339);}};AGIVertices['prototype'][_0xe8ec('0x99')]=function(_0x14acf2){var _0x362db0=_0x14acf2[_0xe8ec('0xa1')]('{');for(var _0xb24578=0x1;_0xb24578<_0x362db0['length'];_0xb24578+=0x1){var _0x2daa40=_0x362db0[_0xb24578][_0xe8ec('0xa1')]('}');if(_0x2daa40[_0xe8ec('0x9d')]>0x1){_0x14acf2=_0x14acf2[_0xe8ec('0xa2')]('{'+_0x2daa40[0x0]+'}',this[_0xe8ec('0x3b')][_0xe8ec('0x11')](_0x2daa40[0x0])[_0xe8ec('0xa3')]||_0x2daa40[0x0]);}}if(_0x362db0[_0xe8ec('0x9d')]===0x1){return _0x14acf2[_0xe8ec('0x4d')]();}return this[_0xe8ec('0x99')](_0x14acf2);};AGIVertices['prototype'][_0xe8ec('0xa4')]=function(_0x3bf8e8,_0x2c5ead){var _0x343135=this['channel'][_0xe8ec('0x11')](_0x3bf8e8);if(_0x343135[_0xe8ec('0xa5')]===-0x1){return _0x343135;}logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0xa6'),_0x2c5ead,_0x343135[_0xe8ec('0xa3')]));return this['channel'][_0xe8ec('0xa0')](_0x2c5ead,_0x343135[_0xe8ec('0xa3')]);};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x84')]=function(_0x32eb7c){return _0x32eb7c&&_0x32eb7c!=='0'&&_0x32eb7c!=='-1'&&_0x32eb7c!=='';};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0xa7')]=function(_0xbc9e8f){this[_0xe8ec('0x3a')][_0xe8ec('0xa8')](this,_0xbc9e8f,'-');_0xbc9e8f[_0xe8ec('0xa9')]=_0xbc9e8f[_0xe8ec('0xa7')];return{'code':0xc8,'result':'-'};};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0xaa')]=function(_0x3d0bd5){logger[_0xe8ec('0x30')](util['format'](_0xe8ec('0xab'),_0x3d0bd5[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x3d0bd5[_0xe8ec('0x7a')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xad'));}var _0x28bf51='\x22'+_0x3d0bd5['text']+'\x22';if(this[_0xe8ec('0x84')](_0x3d0bd5[_0xe8ec('0x78')])){_0x28bf51+=','+_0x3d0bd5['options'];}var _0x425cab=this[_0xe8ec('0x3b')][_0xe8ec('0x59')](_0xe8ec('0xae'),_0x28bf51);if(_0x425cab[_0xe8ec('0xa5')]===-0x1){return _0x425cab;}return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0xaf'),_0x28bf51));};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0xb0')]=function(_0x1cba06){logger['info'](util[_0xe8ec('0x2b')]('Enter\x20in\x20MRCPRecog\x20(%s)\x20block',_0x1cba06['label']));if(!this[_0xe8ec('0x84')](_0x1cba06[_0xe8ec('0xb1')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')]('no\x20grammar\x20configured');}var _0x3228dd=_0x1cba06['grammar'];if(this['isConfigured'](_0x1cba06[_0xe8ec('0x78')])){_0x3228dd+=','+_0x1cba06['options'];}var _0x1ae641=this['channel'][_0xe8ec('0x59')](_0xe8ec('0xb2'),_0x3228dd);if(_0x1ae641[_0xe8ec('0xa5')]===-0x1){return _0x1ae641;}var _0x48a4eb=this[_0xe8ec('0xa4')](_0xe8ec('0xb3'),_0xe8ec('0xb4'));if(_0x48a4eb['result']===-0x1){return _0x48a4eb;}var _0x19466a=this[_0xe8ec('0xa4')](_0xe8ec('0xb5'),_0xe8ec('0xb6'));if(_0x19466a[_0xe8ec('0xa5')]===-0x1){return _0x19466a;}var _0x146582=this[_0xe8ec('0xa4')](_0xe8ec('0xb7'),'MRCP_RECOG_INSTANCE');if(_0x146582[_0xe8ec('0xa5')]===-0x1){return _0x146582;}return this['channel'][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0xb8'),_0x3228dd));};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x7')]=function(_0x5da07f){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')]('Enter\x20in\x20AGI\x20(%s)\x20block',_0x5da07f[_0xe8ec('0x3c')]));return this[_0xe8ec('0x3b')][_0xe8ec('0x7')]([_0x5da07f['command'],_0x5da07f[_0xe8ec('0xb9')]]);};AGIVertices['prototype'][_0xe8ec('0xba')]=function(_0x4a0d68){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0xbb'),_0x4a0d68[_0xe8ec('0x3c')]));if(this[_0xe8ec('0x84')](_0x4a0d68[_0xe8ec('0x67')])){logger['info'](util[_0xe8ec('0x2b')](_0xe8ec('0xbc'),_0x4a0d68[_0xe8ec('0x67')]));var _0xe61567=this[_0xe8ec('0x3b')]['wait'](_0x4a0d68[_0xe8ec('0x67')]);if(_0xe61567[_0xe8ec('0xa5')]===-0x1){return _0xe61567;}}return this[_0xe8ec('0x3b')][_0xe8ec('0xba')]();};AGIVertices['prototype'][_0xe8ec('0xbd')]=function(_0x38f431){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')]('Enter\x20in\x20CALLBACK\x20(%s)\x20block',_0x38f431[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x38f431[_0xe8ec('0xbe')])){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x38f431,_0xe8ec('0xbf'));}_0x38f431['scheduledAt']=moment();if(this[_0xe8ec('0x84')](_0x38f431[_0xe8ec('0xc0')])){_0x38f431[_0xe8ec('0x4c')]=moment()[_0xe8ec('0xc1')](_0x38f431[_0xe8ec('0xc0')],'minutes');}if(!this[_0xe8ec('0x84')](_0x38f431[_0xe8ec('0x4e')])){_0x38f431['callback_priority']=0x2;}this[_0xe8ec('0x46')][_0xe8ec('0xa8')](this,_0x38f431);return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0xc2'),_0x38f431[_0xe8ec('0xc3')],_0x38f431[_0xe8ec('0xbe')],_0x38f431[_0xe8ec('0x4c')]));};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0xc4')]=function(_0x57d59a){logger['info'](util[_0xe8ec('0x2b')](_0xe8ec('0xc5'),_0x57d59a[_0xe8ec('0x3c')]));var _0x28cab9=this[_0xe8ec('0x3b')]['exec'](_0x57d59a[_0xe8ec('0xc6')],_0x57d59a[_0xe8ec('0x78')]);if(_0x28cab9[_0xe8ec('0xa5')]===-0x1){return _0x28cab9;}return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util['format'](_0xe8ec('0xc7'),_0x57d59a[_0xe8ec('0xc6')],_0x57d59a['options']));};AGIVertices['prototype'][_0xe8ec('0xc8')]=function(_0x4c6304){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')]('Enter\x20in\x20LUMENVOXTTS\x20(%s)\x20block',_0x4c6304['label']));if(!this['isConfigured'](_0x4c6304[_0xe8ec('0x7a')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')]('no\x20text\x20configured');}var _0x5f2925='\x22'+_0x4c6304[_0xe8ec('0x7a')]+'\x22';if(this['isConfigured'](_0x4c6304['options'])){_0x5f2925+=','+_0x4c6304[_0xe8ec('0x78')];}var _0x4544d2=this[_0xe8ec('0x3b')][_0xe8ec('0x59')]('MRCPSynth',_0x5f2925);if(_0x4544d2[_0xe8ec('0xa5')]===-0x1){return _0x4544d2;}return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')]('Executed\x20command\x20MRCPSynth\x20%s',_0x5f2925));};AGIVertices['prototype']['sestektts']=function(_0xed8ba4){logger[_0xe8ec('0x30')](util['format'](_0xe8ec('0xc9'),_0xed8ba4[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0xed8ba4[_0xe8ec('0x7a')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xad'));}var _0x1c8afe='\x22'+_0xed8ba4[_0xe8ec('0x7a')]+'\x22';if(this[_0xe8ec('0x84')](_0xed8ba4['options'])){_0x1c8afe+=','+_0xed8ba4[_0xe8ec('0x78')];}var _0x81519e=this[_0xe8ec('0x3b')][_0xe8ec('0x59')](_0xe8ec('0xae'),_0x1c8afe);if(_0x81519e[_0xe8ec('0xa5')]===-0x1){return _0x81519e;}return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0xaf'),_0x1c8afe));};AGIVertices['prototype'][_0xe8ec('0xca')]=function(_0xe7c388){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')]('Enter\x20in\x20LUMENVOXASR\x20(%s)\x20block',_0xe7c388[_0xe8ec('0x3c')]));if(!this['isConfigured'](_0xe7c388[_0xe8ec('0xb1')])){return this[_0xe8ec('0x3b')]['noop'](_0xe8ec('0xcb'));}var _0x2a878e=_0xe7c388[_0xe8ec('0xb1')];if(this[_0xe8ec('0x84')](_0xe7c388['options'])){_0x2a878e+=','+_0xe7c388[_0xe8ec('0x78')];}var _0x34ad65=this[_0xe8ec('0x3b')][_0xe8ec('0x59')](_0xe8ec('0xb2'),_0x2a878e);if(_0x34ad65[_0xe8ec('0xa5')]===-0x1){return _0x34ad65;}var _0x5634cc=this[_0xe8ec('0xa4')]('RECOG_CONFIDENCE()',_0xe8ec('0xcc'));if(_0x5634cc[_0xe8ec('0xa5')]===-0x1){return _0x5634cc;}var _0x1ddad6=this[_0xe8ec('0xa4')](_0xe8ec('0xb5'),_0xe8ec('0xcd'));if(_0x1ddad6[_0xe8ec('0xa5')]===-0x1){return _0x1ddad6;}var _0x528a4e=this['getAndSetVariable'](_0xe8ec('0xb7'),_0xe8ec('0xce'));if(_0x528a4e[_0xe8ec('0xa5')]===-0x1){return _0x528a4e;}return this[_0xe8ec('0x3b')]['noop'](util[_0xe8ec('0x2b')]('Executed\x20command\x20MRCPRecog\x20%s',_0x2a878e));};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0xcf')]=function(_0x55773a){logger[_0xe8ec('0x30')](util['format']('Enter\x20in\x20SESTEKASR\x20(%s)\x20block',_0x55773a[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x55773a['grammar'])){return this['channel'][_0xe8ec('0xac')](_0xe8ec('0xcb'));}var _0x5ed1ee=_0x55773a[_0xe8ec('0xb1')];if(this[_0xe8ec('0x84')](_0x55773a[_0xe8ec('0x78')])){_0x5ed1ee+=','+_0x55773a['options'];}var _0x7a4fe5=this[_0xe8ec('0x3b')]['exec'](_0xe8ec('0xb2'),_0x5ed1ee);if(_0x7a4fe5[_0xe8ec('0xa5')]===-0x1){return _0x7a4fe5;}var _0x477719=this[_0xe8ec('0xa4')](_0xe8ec('0xb3'),_0xe8ec('0xd0'));if(_0x477719[_0xe8ec('0xa5')]===-0x1){return _0x477719;}var _0xca1b8a=this[_0xe8ec('0xa4')](_0xe8ec('0xb5'),_0xe8ec('0xd1'));if(_0xca1b8a[_0xe8ec('0xa5')]===-0x1){return _0xca1b8a;}var _0x5d5643=this[_0xe8ec('0xa4')](_0xe8ec('0xb7'),'SESTEK_ASR_INSTANCE');if(_0x5d5643[_0xe8ec('0xa5')]===-0x1){return _0x5d5643;}return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')]('Executed\x20command\x20MRCPRecog\x20%s',_0x5ed1ee));};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0xd2')]=function(_0x18c12f){logger['info'](util[_0xe8ec('0x2b')]('Enter\x20in\x20DATABASE\x20(%s)\x20block',_0x18c12f['label']));if(!this[_0xe8ec('0x84')](_0x18c12f[_0xe8ec('0xd3')])){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x18c12f,'no\x20database\x20selected');}var _0x2951eb=this[_0xe8ec('0x1a')][_0xe8ec('0xa8')](this,_0x18c12f[_0xe8ec('0xd3')]);if(!_0x2951eb){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x18c12f,'no\x20odbc\x20database\x20found');}if(!this[_0xe8ec('0x84')](_0x18c12f[_0xe8ec('0x32')])){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x18c12f,_0xe8ec('0xd4'));}var _0x1df62f=_0x18c12f[_0xe8ec('0x32')][_0xe8ec('0x5b')](/(\r\n|\n|\r)/gm,'\x20');this[_0xe8ec('0x3b')]['noop'](util[_0xe8ec('0x2b')](_0xe8ec('0xd5'),_0x1df62f));var _0x56b7e0=this[_0xe8ec('0x2d')][_0xe8ec('0xa8')](this,_0x2951eb,_0x1df62f);this[_0xe8ec('0x3a')][_0xe8ec('0xa8')](this,_0x18c12f,_0x1df62f);if(!this[_0xe8ec('0x84')](_0x18c12f[_0xe8ec('0xd6')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xd7'));}var _0x2d272c=this[_0xe8ec('0x11')][_0xe8ec('0xa8')](this,_0x18c12f[_0xe8ec('0xd6')]);if(!_0x2d272c){return this['channel'][_0xe8ec('0x2e')](_0x18c12f,'no\x20variable\x20found');}var _0x38fbd2=this;_0x56b7e0[_0xe8ec('0xd8')](function(_0x4aabba,_0x325075){Object[_0xe8ec('0xd9')](_0x4aabba)[_0xe8ec('0xd8')](function(_0x532895){_0x38fbd2['channel'][_0xe8ec('0xa0')](util['format'](_0xe8ec('0xda'),_0x2d272c,_0x325075,_0x532895),_0x4aabba[_0x532895]);});});this[_0xe8ec('0x3b')]['setVariable'](util[_0xe8ec('0x2b')](_0xe8ec('0xdb'),_0x2d272c),_0x56b7e0['length']);return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0xdc'),_0x2d272c));};AGIVertices[_0xe8ec('0x10')]['dial']=function(_0x5807ce){logger[_0xe8ec('0xdd')](util['format'](_0xe8ec('0xde'),_0x5807ce[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x5807ce[_0xe8ec('0xdf')])){return this['channel'][_0xe8ec('0x2e')](_0x5807ce,_0xe8ec('0xe0'));}var _0x1f80a5=this['getUser'][_0xe8ec('0xa8')](this,_0x5807ce[_0xe8ec('0xdf')]);if(!_0x1f80a5){return this['channel']['error'](_0x5807ce,_0xe8ec('0xe1'));}var _0x2835c3=this[_0xe8ec('0x3b')][_0xe8ec('0x59')](_0xe8ec('0xe2'),[util[_0xe8ec('0x2b')](_0xe8ec('0xe3'),_0x1f80a5),_0x5807ce[_0xe8ec('0x67')],_0x5807ce[_0xe8ec('0xe4')],_0x5807ce[_0xe8ec('0x66')]]);if(_0x2835c3[_0xe8ec('0xa5')]===-0x1){return _0x2835c3;}return this[_0xe8ec('0x3b')]['noop'](util['format'](_0xe8ec('0xe5'),_0xe8ec('0xe2')));};AGIVertices[_0xe8ec('0x10')]['dialogflow']=function(_0x36f8aa){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')]('Enter\x20in\x20DIALOGFLOW\x20(%s)\x20block',_0x36f8aa[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x36f8aa[_0xe8ec('0x80')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xe6'));}if(!this['isConfigured'](_0x36f8aa['text'])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')]('no\x20text\x20configured');}this[_0xe8ec('0x3b')][_0xe8ec('0xe7')]=!![];this['createSquareDetailsReport'](_0x36f8aa);this[_0xe8ec('0x45')](_0x36f8aa[_0xe8ec('0x7a')],'in','','');this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util['format'](_0xe8ec('0xe8'),_0x36f8aa[_0xe8ec('0x7a')]));var _0x2ec3cc=this[_0xe8ec('0x79')][_0xe8ec('0xa8')](this,_0x36f8aa);if(_0x2ec3cc){for(var _0x4244f3 in _0x2ec3cc){if(_0x2ec3cc[_0xe8ec('0x96')](_0x4244f3)){this[_0xe8ec('0x3b')][_0xe8ec('0xa0')](util[_0xe8ec('0x2b')](_0xe8ec('0xe9'),_0x4244f3['toUpperCase']()),_0x2ec3cc[_0x4244f3]);}}this[_0xe8ec('0x45')](_0x2ec3cc[_0xe8ec('0xea')],_0xe8ec('0xeb'),_0xe8ec('0xec'),'');return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0xed'),_0x2ec3cc[_0xe8ec('0xea')]));}return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x36f8aa,'Dialogflow\x20is\x20unreachable');};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0xee')]=function(_0xf9a3b1){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')]('Enter\x20in\x20DIALOGFLOW\x20V2\x20(%s)\x20block',_0xf9a3b1[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0xf9a3b1[_0xe8ec('0x7c')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xef'));}if(!this['isConfigured'](_0xf9a3b1['client_email'])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xf0'));}if(!this[_0xe8ec('0x84')](_0xf9a3b1[_0xe8ec('0xf1')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xf2'));}if(!this['isConfigured'](_0xf9a3b1[_0xe8ec('0xf3')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xf4'));}if(!this[_0xe8ec('0x84')](_0xf9a3b1[_0xe8ec('0x7a')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')]('no\x20text\x20configured');}this[_0xe8ec('0x3b')][_0xe8ec('0xe7')]=!![];this['createSquareDetailsReport'](_0xf9a3b1);this['createSquareMessage'](_0xf9a3b1[_0xe8ec('0x7a')],'in','','');this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0xf5'),_0xf9a3b1[_0xe8ec('0x7a')]));var _0x1d00f7=this[_0xe8ec('0x7b')][_0xe8ec('0xa8')](this,_0xf9a3b1);if(_0x1d00f7){for(var _0x54f512 in _0x1d00f7){if(_0x1d00f7[_0xe8ec('0x96')](_0x54f512)){if(_0x54f512!==_0xe8ec('0xf6')){this[_0xe8ec('0x3b')][_0xe8ec('0xa0')](util[_0xe8ec('0x2b')](_0xe8ec('0xe9'),_0x54f512[_0xe8ec('0xf7')]()),_0x1d00f7[_0x54f512]);}}}this[_0xe8ec('0x45')](_0x1d00f7[_0xe8ec('0xea')],_0xe8ec('0xeb'),_0xe8ec('0xee'),_0x1d00f7[_0xe8ec('0xf6')]);return this[_0xe8ec('0x3b')]['noop'](util[_0xe8ec('0x2b')](_0xe8ec('0xf8'),_0x1d00f7[_0xe8ec('0xea')]));}return this['channel'][_0xe8ec('0x2e')](_0xf9a3b1,_0xe8ec('0xf9'));};AGIVertices[_0xe8ec('0x10')]['sesteknda']=function(_0x862394){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0xfa'),_0x862394[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x862394[_0xe8ec('0xfb')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xfc'));}if(!this[_0xe8ec('0x84')](_0x862394[_0xe8ec('0xfd')])){return this['channel'][_0xe8ec('0xac')](_0xe8ec('0xfe'));}if(!this['isConfigured'](_0x862394[_0xe8ec('0xff')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0x100'));}if(!this[_0xe8ec('0x84')](_0x862394[_0xe8ec('0x101')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xad'));}this[_0xe8ec('0x3b')][_0xe8ec('0xe7')]=!![];this[_0xe8ec('0x3a')](_0x862394);this[_0xe8ec('0x45')](_0x862394[_0xe8ec('0x7a')],'in','','');this['channel'][_0xe8ec('0xac')](util['format'](_0xe8ec('0x102'),_0x862394['text']));var _0x313786=this['sestekNDA'][_0xe8ec('0xa8')](this,_0x862394);if(_0x313786){for(var _0x20e93f in _0x313786){if(_0x313786['hasOwnProperty'](_0x20e93f)){this['channel'][_0xe8ec('0xa0')](util[_0xe8ec('0x2b')](_0xe8ec('0x103'),_0x20e93f['toUpperCase']()),_0x313786[_0x20e93f]);}}this[_0xe8ec('0x45')](_0x313786['speech'],_0xe8ec('0xeb'),_0xe8ec('0x104'),'');if(_0x313786['audiofile']){this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x105'),_0x313786[_0xe8ec('0x106')]));var _0x444df9=this[_0xe8ec('0x3b')]['streamFile'](_0x313786[_0xe8ec('0x106')]);try{fs[_0xe8ec('0x107')](_0x313786[_0xe8ec('0x106')]+_0xe8ec('0x108'));}catch(_0x233ab8){logger[_0xe8ec('0x2e')](_0x233ab8);}return _0x444df9;}else{return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x109'),_0x313786[_0xe8ec('0xea')]));}}return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x862394,_0xe8ec('0x10a'));};AGIVertices['prototype'][_0xe8ec('0x10b')]=function(_0x33d53c){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x10c'),_0x33d53c[_0xe8ec('0x3c')]));return this[_0xe8ec('0x3b')][_0xe8ec('0xac')]('end');};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x10d')]=function(_0x4c5ced){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x10e'),_0x4c5ced[_0xe8ec('0x3c')]));var _0x5c1841='';if(_0x4c5ced[_0xe8ec('0x10f')]){if(!this[_0xe8ec('0x84')](_0x4c5ced['trunk_id'])){return this['channel'][_0xe8ec('0x2e')](_0x4c5ced,_0xe8ec('0x110'));}else{var _0xf6a778=parseInt(_0x4c5ced[_0xe8ec('0x10f')],0xa);if(isNaN(_0xf6a778)){_0x5c1841=_0x4c5ced[_0xe8ec('0x10f')];}else{_0x5c1841=this[_0xe8ec('0x1e')]['sync'](this,_0x4c5ced[_0xe8ec('0x10f')]);if(!_0x5c1841){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x4c5ced,_0xe8ec('0x111'));}}}}else if(_0x4c5ced[_0xe8ec('0x112')]){_0x5c1841=_0x4c5ced['trunk_name'];}else{return this[_0xe8ec('0x3b')]['error'](_0x4c5ced,_0xe8ec('0x110'));}var _0x46c541=this[_0xe8ec('0x3b')][_0xe8ec('0x59')]('DIAL',[util[_0xe8ec('0x2b')]('SIP/%s/%s',_0x5c1841,_0x4c5ced[_0xe8ec('0xc3')]),_0x4c5ced[_0xe8ec('0x67')],_0x4c5ced['opts'],_0x4c5ced[_0xe8ec('0x66')]]);if(_0x46c541[_0xe8ec('0xa5')]===-0x1){return _0x46c541;}return this[_0xe8ec('0x3b')]['noop'](util['format'](_0xe8ec('0xe5'),_0xe8ec('0xe2')));};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x113')]=function(_0x46762f){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x114'),_0x46762f[_0xe8ec('0x3c')]));return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0x113'));};AGIVertices[_0xe8ec('0x10')]['getdigits']=function(_0x546f05){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')]('Enter\x20in\x20GETDIGITS\x20(%s)\x20block',_0x546f05[_0xe8ec('0x3c')]));if(_0x546f05[_0xe8ec('0xa9')]===0x0){return this[_0xe8ec('0xa7')](_0x546f05);}_0x546f05[_0xe8ec('0xa9')]-=0x1;if(!this[_0xe8ec('0x84')](_0x546f05[_0xe8ec('0x115')])){return this['channel'][_0xe8ec('0x2e')](_0x546f05,'no\x20file\x20audio\x20selected');}var _0x540f18=this[_0xe8ec('0x20')][_0xe8ec('0xa8')](this,_0x546f05[_0xe8ec('0x115')]);if(!_0x540f18){return this[_0xe8ec('0x3b')]['error'](_0x546f05,_0xe8ec('0x116'));}if(!this[_0xe8ec('0x84')](_0x546f05[_0xe8ec('0xd6')])){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')]('no\x20variable\x20selected\x20for\x20the\x20result');}var _0x1dd4fe=this[_0xe8ec('0x3b')]['getData'](_0x540f18,_0x546f05[_0xe8ec('0x117')],_0x546f05[_0xe8ec('0x118')]);var _0x2bcb8b=_0x1dd4fe[_0xe8ec('0xa5')]?_0x1dd4fe[_0xe8ec('0xa5')][_0xe8ec('0x4d')]():'';logger[_0xe8ec('0x30')](_0xe8ec('0x119'),JSON[_0xe8ec('0x73')](_0x1dd4fe));if(_0x1dd4fe[_0xe8ec('0xa5')]===-0x1){this[_0xe8ec('0x3a')]['sync'](this,_0x546f05,_0x2bcb8b);return _0x1dd4fe;}else if(_0x1dd4fe[_0xe8ec('0xa3')]===_0xe8ec('0x67')){_0x1dd4fe[_0xe8ec('0xa5')]=_0x2bcb8b['length']>=parseInt(_0x546f05[_0xe8ec('0x11a')])?'x':'i';}else{_0x1dd4fe[_0xe8ec('0xa5')]=_0x2bcb8b['length']>=parseInt(_0x546f05[_0xe8ec('0x11a')])&&_0x2bcb8b['length']<=parseInt(_0x546f05[_0xe8ec('0x118')])?'x':'i';}var _0x433522=this[_0xe8ec('0x11')][_0xe8ec('0xa8')](this,_0x546f05[_0xe8ec('0xd6')]);if(!_0x433522){return this['channel'][_0xe8ec('0x2e')](_0x546f05,'no\x20variable\x20found');}this[_0xe8ec('0x3b')][_0xe8ec('0xa0')](_0x433522,_0x2bcb8b);if(this[_0xe8ec('0x84')](_0x546f05[_0xe8ec('0x11b')])){var _0x46c795=parseInt(_0x546f05[_0xe8ec('0x11b')],0xa);var _0x73ccce=rs[_0xe8ec('0x11c')]({'charset':'*','length':_0x46c795});var _0x536dd5=_0x2bcb8b[_0xe8ec('0x9d')];if(_0x536dd5>0x0){if(_0x536dd5>_0x46c795){this[_0xe8ec('0x3a')][_0xe8ec('0xa8')](this,_0x546f05,_0x546f05[_0xe8ec('0x11d')]===_0xe8ec('0x11e')?_0x73ccce+_0x2bcb8b[_0xe8ec('0x11f')](_0x46c795):_0x2bcb8b[_0xe8ec('0x11f')](0x0,_0x536dd5-_0x46c795)+_0x73ccce);}else{this[_0xe8ec('0x3a')][_0xe8ec('0xa8')](this,_0x546f05,rs[_0xe8ec('0x11c')]({'charset':'*','length':_0x536dd5}));}}else{this[_0xe8ec('0x3a')][_0xe8ec('0xa8')](this,_0x546f05,'');}}else{this[_0xe8ec('0x3a')][_0xe8ec('0xa8')](this,_0x546f05,_0x2bcb8b);}return _0x1dd4fe;};AGIVertices[_0xe8ec('0x10')]['getsecretdigits']=function(_0x584359){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x120'),_0x584359[_0xe8ec('0x3c')]));return this[_0xe8ec('0xd')](_0x584359);};AGIVertices[_0xe8ec('0x10')]['goal']=function(_0x2e2281){logger[_0xe8ec('0x30')](util['format'](_0xe8ec('0x121'),_0x2e2281['label']));this[_0xe8ec('0x3a')][_0xe8ec('0xa8')](this,_0x2e2281,_0x2e2281[_0xe8ec('0x122')]);return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util['format'](_0xe8ec('0x123'),_0x2e2281[_0xe8ec('0x122')]));};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x124')]=function(_0x256395){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x125'),_0x256395[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x256395[_0xe8ec('0x8c')])||!this[_0xe8ec('0x84')](_0x256395['aws_secret_access_key'])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0x126'));}if(!this[_0xe8ec('0x84')](_0x256395['text'])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xad'));}this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x127'),_0x256395[_0xe8ec('0x7a')]));var _0x467f2a=this['awsPolly']['sync'](this,_0x256395);if(_0x467f2a){this[_0xe8ec('0x3b')]['noop'](util['format']('aws\x20Polly\x20%s\x20file\x20created',_0x467f2a));var _0x4781c1=this[_0xe8ec('0x3b')]['streamFile'](_0x467f2a);try{fs[_0xe8ec('0x107')](_0x467f2a+'.wav');}catch(_0x35726a){logger[_0xe8ec('0x2e')](_0x35726a);}return _0x4781c1;}return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x256395,_0xe8ec('0x128'));};AGIVertices[_0xe8ec('0x10')]['awslex']=function(_0x3b2b02){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')]('Enter\x20in\x20Amazon\x20Lex\x20(%s)\x20block',_0x3b2b02[_0xe8ec('0x3c')]));if(!this['isConfigured'](_0x3b2b02[_0xe8ec('0x8c')])||!this[_0xe8ec('0x84')](_0x3b2b02[_0xe8ec('0x8d')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')]('no\x20valid\x20credentials\x20configured');}if(!this['isConfigured'](_0x3b2b02[_0xe8ec('0x8f')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')]('no\x20bot\x20name\x20configured');}if(!this[_0xe8ec('0x84')](_0x3b2b02[_0xe8ec('0x7a')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xad'));}this['channel'][_0xe8ec('0xe7')]=!![];this[_0xe8ec('0x3a')](_0x3b2b02);this['createSquareMessage'](_0x3b2b02[_0xe8ec('0x7a')],'in','','');this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x129'),_0x3b2b02[_0xe8ec('0x7a')]));var _0x2037a3=this[_0xe8ec('0x8b')]['sync'](this,_0x3b2b02);if(_0x2037a3){for(var _0x467de0 in _0x2037a3){if(_0x2037a3[_0xe8ec('0x96')](_0x467de0)&&_[_0xe8ec('0x97')](_0x2037a3[_0x467de0])){this['channel'][_0xe8ec('0xa0')](util[_0xe8ec('0x2b')](_0xe8ec('0x12a'),_0x467de0['toUpperCase']()),_0x2037a3[_0x467de0]);}}if(_[_0xe8ec('0x47')](_0x2037a3[_0xe8ec('0x77')])){return this[_0xe8ec('0x3b')]['noop']('Amazon\x20Lex\x20ready\x20for\x20fulfillment');}else{this[_0xe8ec('0x45')](_0x2037a3['message'],'out','amazonlex','');return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x12b'),_0x2037a3[_0xe8ec('0x77')]));}}return this[_0xe8ec('0x3b')]['error'](_0x3b2b02,_0xe8ec('0x12c'));};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x12d')]=function(_0xce020c){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x12e'),_0xce020c[_0xe8ec('0x3c')],_0xce020c['timeout']));if(!this['isConfigured'](_0xce020c[_0xe8ec('0x80')])){return this[_0xe8ec('0x3b')]['noop']('no\x20key\x20configured');}var _0x4e547d=_0xe8ec('0x12f');var _0x1bba00=util[_0xe8ec('0x2b')]('%s/recordings/%s',FILES_PATH,rs['generate'](0x4));var _0x4b443c=util[_0xe8ec('0x2b')](_0xe8ec('0x9f'),_0x1bba00,_0x4e547d);var _0x2ac88b=!![];if(_0xce020c[_0xe8ec('0x130')]===_0xe8ec('0x131')){_0x2ac88b=![];}var _0x4e2451=this[_0xe8ec('0x3b')][_0xe8ec('0x132')](_0x1bba00,_0x4e547d,_0xce020c[_0xe8ec('0x133')],_0xce020c[_0xe8ec('0x67')],undefined,_0x2ac88b);if(_0x4e2451[_0xe8ec('0xa5')]!==-0x1){this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util['format']('google\x20%s\x20file\x20created',_0x4b443c));var _0x45061e=this[_0xe8ec('0x90')][_0xe8ec('0xa8')](this,_0xce020c,_0x4b443c);if(_0x45061e){for(var _0x29ca90 in _0x45061e){if(_0x45061e[_0xe8ec('0x96')](_0x29ca90)){this[_0xe8ec('0x3b')]['setVariable'](util[_0xe8ec('0x2b')](_0xe8ec('0x134'),_0x29ca90['toUpperCase']()),_0x45061e[_0x29ca90]);}}return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x135'),JSON['stringify'](_0x45061e)));}}return _0x4e2451;};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x136')]=function(_0x5c28a1){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x137'),_0x5c28a1[_0xe8ec('0x3c')]));if(!this['isConfigured'](_0x5c28a1[_0xe8ec('0x93')])){return this['channel'][_0xe8ec('0xac')]('no\x20appid\x20configured');}if(!this[_0xe8ec('0x84')](_0x5c28a1[_0xe8ec('0x94')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')]('no\x20appsecret\x20configured');}var _0x571899=_0xe8ec('0x12f');var _0x3de97a=util['format']('%s/recordings/%s',FILES_PATH,rs[_0xe8ec('0x11c')](0x4));var _0x3a2c8f=util[_0xe8ec('0x2b')]('%s.%s',_0x3de97a,_0x571899);var _0x359ccf=!![];if(_0x5c28a1[_0xe8ec('0x130')]===_0xe8ec('0x131')){_0x359ccf=![];}var _0x43aac6=this[_0xe8ec('0x3b')][_0xe8ec('0x132')](_0x3de97a,_0x571899,_0x5c28a1[_0xe8ec('0x133')],_0x5c28a1[_0xe8ec('0x67')],undefined,_0x359ccf);if(_0x43aac6['result']!==-0x1){this[_0xe8ec('0x3b')]['noop'](util['format']('tilde\x20%s\x20file\x20created',_0x3a2c8f));var _0x1e78dd=this[_0xe8ec('0x92')][_0xe8ec('0xa8')](this,_0x5c28a1,_0x3a2c8f);if(_0x1e78dd){for(var _0x37e2fa in _0x1e78dd){if(_0x1e78dd[_0xe8ec('0x96')](_0x37e2fa)){this[_0xe8ec('0x3b')][_0xe8ec('0xa0')](util['format'](_0xe8ec('0x138'),_0x37e2fa[_0xe8ec('0xf7')]()),_0x1e78dd[_0x37e2fa]);}}return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x139'),JSON[_0xe8ec('0x73')](_0x1e78dd)));}}return _0x43aac6;};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x13a')]=function(_0x11f248){logger[_0xe8ec('0x30')](util['format'](_0xe8ec('0x13b'),_0x11f248['label']));return this[_0xe8ec('0x3b')][_0xe8ec('0x13c')](_0x11f248[_0xe8ec('0x40')],_0x11f248[_0xe8ec('0x13d')],_0x11f248['priority']);};AGIVertices['prototype'][_0xe8ec('0x13e')]=function(_0x38deb1){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x13f'),_0x38deb1['label']));if(!this[_0xe8ec('0x84')](_0x38deb1[_0xe8ec('0x140')])){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x38deb1,_0xe8ec('0x141'));}try{var _0x1d075b=eval(_0x38deb1[_0xe8ec('0x140')])?_0xe8ec('0x142'):'false';this['channel']['noop'](util[_0xe8ec('0x2b')](_0xe8ec('0x143'),_0x38deb1[_0xe8ec('0x140')],_0x1d075b));return{'code':0xc8,'result':_0x1d075b};}catch(_0x1ba5e8){return{'code':0xc8,'result':'false'};}};AGIVertices[_0xe8ec('0x10')]['gotoiftime']=function(_0x441523){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x144'),_0x441523[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x441523[_0xe8ec('0x145')])){return this['channel'][_0xe8ec('0x2e')](_0x441523,_0xe8ec('0x146'));}var _0x468a12=this['getIntervals']['sync'](this,_0x441523[_0xe8ec('0x145')]);if(!_0x468a12){return this['channel'][_0xe8ec('0x2e')](_0x441523,_0xe8ec('0x147'));}for(var _0x2befce=0x0;_0x2befce<_0x468a12['length'];_0x2befce+=0x1){var _0x5f2529=this['channel'][_0xe8ec('0x11')](util['format']('IFTIME(%s?true:false)',_0x468a12[_0x2befce]));if(_0x5f2529[_0xe8ec('0xa5')]===-0x1){return _0x5f2529;}logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x148'),_0x468a12[_0x2befce],_0x5f2529[_0xe8ec('0xa3')]));if(_0x5f2529[_0xe8ec('0xa3')]==='true'){logger['info'](util[_0xe8ec('0x2b')](_0xe8ec('0x148'),_0x468a12[_0x2befce],_0xe8ec('0x142')));this[_0xe8ec('0x3b')]['noop'](util[_0xe8ec('0x2b')](_0xe8ec('0x148'),_0x468a12[_0x2befce],'true'));return{'code':0xc8,'result':_0xe8ec('0x142')};}else{logger[_0xe8ec('0x30')](util['format'](_0xe8ec('0x148'),_0x468a12[_0x2befce],_0xe8ec('0x149')));this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x148'),_0x468a12[_0x2befce],_0xe8ec('0x149')));}}return{'code':0xc8,'result':'false'};};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x14a')]=function(_0x5c6c11){logger['info'](util['format'](_0xe8ec('0x14b'),_0x5c6c11[_0xe8ec('0x3c')]));return this[_0xe8ec('0x3b')][_0xe8ec('0x14a')]();};AGIVertices[_0xe8ec('0x10')]['ispeechasr']=function(_0x2c612f){logger['info'](util[_0xe8ec('0x2b')]('Enter\x20in\x20ISPEECHASR\x20(%s)\x20block',_0x2c612f[_0xe8ec('0x3c')]));if(!this['isConfigured'](_0x2c612f['key'])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xe6'));}var _0x18f1b4=_0xe8ec('0x12f');var _0xf56f31=util['format'](_0xe8ec('0x14c'),FILES_PATH,rs[_0xe8ec('0x11c')](0x4));var _0x1f6463=util['format'](_0xe8ec('0x9f'),_0xf56f31,_0x18f1b4);var _0x4e21e6=!![];if(_0x2c612f[_0xe8ec('0x130')]==='NOBEEP'){_0x4e21e6=![];}var _0x2b6374=this[_0xe8ec('0x3b')][_0xe8ec('0x132')](_0xf56f31,_0x18f1b4,_0x2c612f['intKey'],_0x2c612f[_0xe8ec('0x67')],undefined,_0x4e21e6);if(_0x2b6374[_0xe8ec('0xa5')]!==-0x1){this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')]('ispeech\x20%s\x20file\x20created',_0x1f6463));var _0x11dcf8=this['ispeechASR'][_0xe8ec('0xa8')](this,_0x2c612f,_0x1f6463);if(_0x11dcf8){for(var _0x1ed6a6 in _0x11dcf8){if(_0x11dcf8['hasOwnProperty'](_0x1ed6a6)){this[_0xe8ec('0x3b')][_0xe8ec('0xa0')](util[_0xe8ec('0x2b')](_0xe8ec('0x14d'),_0x1ed6a6[_0xe8ec('0xf7')]()),_0x11dcf8[_0x1ed6a6]);}}return this['channel'][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x14e'),JSON['stringify'](_0x11dcf8)));}}return _0x2b6374;};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x14f')]=function(_0x4b8356){logger[_0xe8ec('0x30')](util['format'](_0xe8ec('0x150'),_0x4b8356[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x4b8356[_0xe8ec('0x80')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xe6'));}if(!this[_0xe8ec('0x84')](_0x4b8356[_0xe8ec('0x7a')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xad'));}this[_0xe8ec('0x3b')]['noop'](util[_0xe8ec('0x2b')](_0xe8ec('0x151'),_0x4b8356['text']));var _0x4e4436=this[_0xe8ec('0x7f')][_0xe8ec('0xa8')](this,_0x4b8356);if(_0x4e4436){this['channel'][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x152'),_0x4e4436));var _0x49efe8=this['channel'][_0xe8ec('0x153')](_0x4e4436,_0x4b8356[_0xe8ec('0x133')]);try{fs[_0xe8ec('0x107')](_0x4e4436+'.wav');}catch(_0x49a592){logger[_0xe8ec('0x2e')](_0x49a592);}return _0x49efe8;}return this['channel'][_0xe8ec('0x2e')](_0x4b8356,_0xe8ec('0x154'));};AGIVertices[_0xe8ec('0x10')]['login']=function(_0x380b1e){logger['info'](util[_0xe8ec('0x2b')](_0xe8ec('0x155'),_0x380b1e[_0xe8ec('0x3c')]));if(!this['isConfigured'](_0x380b1e['findBy'])){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x380b1e,'no\x20find\x20by\x20configured');}logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x156'),this[_0xe8ec('0x3b')][_0xe8ec('0x52')],_0x380b1e['findBy']));var _0x24302d=this['agentLogin'][_0xe8ec('0xa8')](this,_0x380b1e[_0xe8ec('0x157')]);if(_0x24302d){logger['info'](util[_0xe8ec('0x2b')]('AGENT\x20%s\x20FOUND\x20BY',this[_0xe8ec('0x3b')][_0xe8ec('0x52')],_0x380b1e['findBy']));this['channel'][_0xe8ec('0xac')](util['format'](_0xe8ec('0x158'),this[_0xe8ec('0x3b')][_0xe8ec('0x52')],_0x380b1e[_0xe8ec('0x157')]));return{'code':0xc8,'result':_0xe8ec('0x159')};}else{logger[_0xe8ec('0x30')](util['format'](_0xe8ec('0x15a'),this[_0xe8ec('0x3b')][_0xe8ec('0x52')],_0x380b1e[_0xe8ec('0x157')]));this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')]('AGENT\x20%s\x20NOT\x20FOUND\x20BY',this[_0xe8ec('0x3b')]['callerid'],_0x380b1e['findBy']));return{'code':0xc8,'result':_0xe8ec('0x15b')};}};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x15c')]=function(_0x3fa3e0){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')]('Enter\x20in\x20LOGOUT\x20(%s)\x20block',_0x3fa3e0['label']));if(!this[_0xe8ec('0x84')](_0x3fa3e0[_0xe8ec('0x157')])){return this['channel']['error'](_0x3fa3e0,_0xe8ec('0x15d'));}logger['info'](util['format'](_0xe8ec('0x156'),this[_0xe8ec('0x3b')][_0xe8ec('0x52')],_0x3fa3e0['findBy']));var _0x1e3f1d=this[_0xe8ec('0x54')]['sync'](this,_0x3fa3e0[_0xe8ec('0x157')]);if(_0x1e3f1d){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x158'),this[_0xe8ec('0x3b')][_0xe8ec('0x52')],_0x3fa3e0[_0xe8ec('0x157')]));this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util['format'](_0xe8ec('0x158'),this[_0xe8ec('0x3b')][_0xe8ec('0x52')],_0x3fa3e0['findBy']));return{'code':0xc8,'result':_0xe8ec('0x159')};}else{logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x15a'),this[_0xe8ec('0x3b')][_0xe8ec('0x52')],_0x3fa3e0[_0xe8ec('0x157')]));this['channel'][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x15a'),this[_0xe8ec('0x3b')]['callerid'],_0x3fa3e0[_0xe8ec('0x157')]));return{'code':0xc8,'result':_0xe8ec('0x15b')};}};AGIVertices[_0xe8ec('0x10')]['math']=function(_0x4414d9){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x15e'),_0x4414d9[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x4414d9[_0xe8ec('0x15f')])){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x4414d9,'no\x20operation\x20configured');}this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x160'),_0x4414d9[_0xe8ec('0x15f')]));var _0x211821=eval(_0x4414d9[_0xe8ec('0x15f')]);if(!this[_0xe8ec('0x84')](_0x4414d9[_0xe8ec('0xd6')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xd7'));}var _0x21f03a=this[_0xe8ec('0x11')][_0xe8ec('0xa8')](this,_0x4414d9[_0xe8ec('0xd6')]);if(!_0x21f03a){return this[_0xe8ec('0x3b')]['error'](_0x4414d9,'no\x20variable\x20found');}if(_['isArray'](_0x211821)){var _0x310af4=this;_0x211821[_0xe8ec('0xd8')](function(_0x1685e2,_0x36dde6){_0x310af4[_0xe8ec('0x3b')][_0xe8ec('0xa0')](util['format'](_0xe8ec('0x161'),_0x21f03a,_0x36dde6),_0x1685e2);});return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x162'),_0x21f03a));}else{return this[_0xe8ec('0x3b')][_0xe8ec('0xa0')](_0x21f03a,_0x211821);}};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0xc')]=function(_0x31d69f){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x163'),_0x31d69f[_0xe8ec('0x3c')]));if(_0x31d69f[_0xe8ec('0xa9')]===0x0){return this[_0xe8ec('0xa7')](_0x31d69f);}_0x31d69f[_0xe8ec('0xa9')]-=0x1;if(!this[_0xe8ec('0x84')](_0x31d69f[_0xe8ec('0x115')])){return this[_0xe8ec('0x3b')]['error'](_0x31d69f,'no\x20file\x20audio\x20selected');}var _0x33fb96=this[_0xe8ec('0x20')][_0xe8ec('0xa8')](this,_0x31d69f[_0xe8ec('0x115')]);if(!_0x33fb96){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x31d69f,'no\x20file\x20audio\x20found');}var _0x45760a=this['channel'][_0xe8ec('0x164')](_0x33fb96,_0x31d69f[_0xe8ec('0x117')],_0x31d69f[_0xe8ec('0x165')]);var _0x36aa25=_0x45760a['result'];if(_0x45760a[_0xe8ec('0xa5')]===-0x1){this['createSquareDetailsReport']['sync'](this,_0x31d69f,'-1');return _0x45760a;}else if(_0x45760a[_0xe8ec('0xa3')]===_0xe8ec('0x67')){_0x45760a['result']=_0x45760a[_0xe8ec('0xa5')][_0xe8ec('0x9d')]>0x0?_0x45760a['result']:'t';}else if(_[_0xe8ec('0x4a')](_0x45760a[_0xe8ec('0xa5')])){_0x45760a[_0xe8ec('0xa5')]='#';_0x36aa25='#';}if(!this['isConfigured'](_0x31d69f[_0xe8ec('0xd6')])){this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xd7'));}else{var _0x1b78ec=this['getVariable'][_0xe8ec('0xa8')](this,_0x31d69f[_0xe8ec('0xd6')]);if(!_0x1b78ec){return this[_0xe8ec('0x3b')]['error'](_0x31d69f,_0xe8ec('0x166'));}this[_0xe8ec('0x3b')][_0xe8ec('0xa0')](_0x1b78ec,_0x36aa25);}this[_0xe8ec('0x3a')][_0xe8ec('0xa8')](this,_0x31d69f,_0x36aa25);return _0x45760a;};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0xac')]=function(_0x163ad7){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x167'),_0x163ad7['label']));return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0x163ad7[_0xe8ec('0x168')]||_0x163ad7[_0xe8ec('0x3c')]);};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x169')]=function(_0x11e0a5){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x16a'),_0x11e0a5[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x11e0a5[_0xe8ec('0x157')])){return this['channel'][_0xe8ec('0x2e')](_0x11e0a5,_0xe8ec('0x15d'));}logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x156'),this[_0xe8ec('0x3b')]['callerid'],_0x11e0a5['findBy']));var _0x5efdc8=this[_0xe8ec('0x4f')][_0xe8ec('0xa8')](this,_0x11e0a5[_0xe8ec('0x16b')]);var _0xb44e0f=this[_0xe8ec('0x50')][_0xe8ec('0xa8')](this,_0x11e0a5[_0xe8ec('0x157')],_0x5efdc8);if(_0xb44e0f){logger[_0xe8ec('0x30')](util['format']('AGENT\x20%s\x20FOUND\x20BY',this[_0xe8ec('0x3b')][_0xe8ec('0x52')],_0x11e0a5[_0xe8ec('0x157')]));this[_0xe8ec('0x3b')]['noop'](util[_0xe8ec('0x2b')]('AGENT\x20%s\x20FOUND\x20BY',this['channel'][_0xe8ec('0x52')],_0x11e0a5[_0xe8ec('0x157')]));return{'code':0xc8,'result':_0xe8ec('0x159')};}else{logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x15a'),this['channel'][_0xe8ec('0x52')],_0x11e0a5[_0xe8ec('0x157')]));this[_0xe8ec('0x3b')]['noop'](util[_0xe8ec('0x2b')](_0xe8ec('0x158'),this[_0xe8ec('0x3b')][_0xe8ec('0x52')],_0x11e0a5[_0xe8ec('0x157')]));return{'code':0xc8,'result':_0xe8ec('0x15b')};}};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x16c')]=function(_0x2e1459){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')]('Enter\x20in\x20PLAYBACK\x20(%s)\x20block',_0x2e1459[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x2e1459[_0xe8ec('0x115')])){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x2e1459,_0xe8ec('0x16d'));}var _0xe744f6=this[_0xe8ec('0x20')][_0xe8ec('0xa8')](this,_0x2e1459[_0xe8ec('0x115')]);if(!_0xe744f6){return this[_0xe8ec('0x3b')]['error'](_0x2e1459,_0xe8ec('0x116'));}var _0x28fe20=this[_0xe8ec('0x3b')][_0xe8ec('0x59')](_0xe8ec('0x16e'),[_0xe744f6,_0x2e1459[_0xe8ec('0xe4')]]);if(_0x28fe20['result']===-0x1){return _0x28fe20;}return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')]('Executed\x20command\x20%s\x20%s',_0xe8ec('0x16e'),_0xe744f6));};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x16f')]=function(_0x4259ee){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x170'),_0x4259ee[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x4259ee['queue_id'])){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x4259ee,_0xe8ec('0x171'));}var _0x8284a5='';var _0x2b250e=parseInt(_0x4259ee[_0xe8ec('0x172')],0xa);if(isNaN(_0x2b250e)){_0x8284a5=_0x4259ee[_0xe8ec('0x172')];}else{_0x8284a5=this[_0xe8ec('0x16')]['sync'](this,_0x4259ee[_0xe8ec('0x172')]);if(!_0x8284a5){return this['channel'][_0xe8ec('0x2e')](_0x4259ee,_0xe8ec('0x173'));}}var _0x2df5d3='';if(this['isConfigured'](_0x4259ee[_0xe8ec('0x115')])){var _0x4d29c3=this[_0xe8ec('0x20')]['sync'](this,_0x4259ee[_0xe8ec('0x115')]);if(_0x4d29c3){_0x2df5d3=_0x4d29c3;}}this[_0xe8ec('0x3a')][_0xe8ec('0xa8')](this,_0x4259ee,_0x8284a5);if(_0x4259ee[_0xe8ec('0xe4')][_0xe8ec('0x174')]('x')<0x0){_0x4259ee['opts']+='x';}if(_0x4259ee[_0xe8ec('0xe4')][_0xe8ec('0x174')]('X')<0x0){_0x4259ee[_0xe8ec('0xe4')]+='X';}this[_0xe8ec('0x3b')][_0xe8ec('0xa0')](_0xe8ec('0x175'),_0x8284a5?_0x8284a5[_0xe8ec('0x176')]():'');var _0x180969=this['channel'][_0xe8ec('0x59')](_0xe8ec('0x177'),[_0x8284a5,_0x4259ee['opts'],_0x4259ee[_0xe8ec('0x66')],_0x2df5d3,_0x4259ee[_0xe8ec('0x67')],_0x4259ee['agi'],_0x4259ee[_0xe8ec('0x178')],_0x4259ee[_0xe8ec('0x179')],'',_0x4259ee[_0xe8ec('0x17a')]]);if(_0x180969[_0xe8ec('0xa5')]===-0x1){return _0x180969;}return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')]('Executed\x20command\x20%s\x20%s',_0xe8ec('0x177'),_0x8284a5));};AGIVertices['prototype'][_0xe8ec('0x17b')]=function(_0x19b428){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x17c'),_0x19b428[_0xe8ec('0x3c')]));var _0x16cbc3=_0x19b428['recordingFormat']||'wav';var _0x4a009e=util[_0xe8ec('0x2b')](_0xe8ec('0x17d'),this[_0xe8ec('0x3b')][_0xe8ec('0x3f')],rs[_0xe8ec('0x11c')](0x5));var _0x520dcd=util[_0xe8ec('0x2b')]('%s/recordings/%s.%s',FILES_PATH,_0x4a009e,_0x16cbc3);var _0x4299fb=util[_0xe8ec('0x2b')](_0xe8ec('0x14c'),FILES_PATH,_0x4a009e);this['createSquareRecording']['sync'](this,_0x19b428,_0x4a009e,_0x520dcd);this[_0xe8ec('0x3b')][_0xe8ec('0xa0')](_0xe8ec('0x17e'),_0x4a009e);logger[_0xe8ec('0x30')](_0xe8ec('0x17f'),_0x4299fb,_0x16cbc3,_0x19b428[_0xe8ec('0x180')],_0x19b428[_0xe8ec('0x67')]);return this['channel'][_0xe8ec('0x132')](_0x4299fb,_0x16cbc3,_0x19b428[_0xe8ec('0x180')],_0x19b428['timeout'],undefined,!![]);};AGIVertices[_0xe8ec('0x10')]['restapi']=function(_0x13445e){logger['info'](util['format'](_0xe8ec('0x181'),_0x13445e['label']));if(!this[_0xe8ec('0x84')](_0x13445e[_0xe8ec('0x66')])){return this['channel']['noop']('no\x20url\x20configured');}var _0x5bf34b=this[_0xe8ec('0x182')]['sync'](this,_0x13445e);logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x183'),util[_0xe8ec('0x184')](_0x5bf34b,{'showHidden':![],'depth':null})));if(!this[_0xe8ec('0x84')](_0x13445e[_0xe8ec('0xd6')])){return this[_0xe8ec('0x3b')]['noop'](_0xe8ec('0x185'));}var _0x41f96d=this['getVariable']['sync'](this,_0x13445e[_0xe8ec('0xd6')]);if(!_0x41f96d){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x13445e,'no\x20variable\x20found');}this[_0xe8ec('0x3b')][_0xe8ec('0xa0')](util[_0xe8ec('0x2b')](_0xe8ec('0x186'),_0x41f96d),_0x5bf34b['statusCode']?_0x5bf34b['statusCode']:_0xe8ec('0x187'));this['channel']['setVariable'](util[_0xe8ec('0x2b')](_0xe8ec('0x188'),_0x41f96d),_0x5bf34b[_0xe8ec('0x76')]?_0x5bf34b[_0xe8ec('0x76')]:'OK');if(_0x5bf34b[_0xe8ec('0x6b')]){try{this[_0xe8ec('0x9e')](_0x5bf34b[_0xe8ec('0x6b')],_0x41f96d);}catch(_0x5f0dd9){logger[_0xe8ec('0x2e')](util[_0xe8ec('0x2b')](_0xe8ec('0x189'),_0x41f96d));}}return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0xdc'),_0x41f96d));};AGIVertices[_0xe8ec('0x10')]['saydigits']=function(_0xd14f77){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x18a'),_0xd14f77['label']));return this['channel'][_0xe8ec('0x18b')](_0xd14f77[_0xe8ec('0x18c')][_0xe8ec('0x5b')](/\s+/g,''),_0xd14f77[_0xe8ec('0x180')]);};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x18d')]=function(_0x4e5080){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')]('Enter\x20in\x20SAYNUMBER\x20(%s)\x20block',_0x4e5080['label']));return this[_0xe8ec('0x3b')][_0xe8ec('0x18e')](_0x4e5080['number']['replace'](/\s+/g,''),_0x4e5080[_0xe8ec('0x180')]);};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x18f')]=function(_0x33d930){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')]('Enter\x20in\x20SAYPHONETIC\x20(%s)\x20block',_0x33d930[_0xe8ec('0x3c')]));return this[_0xe8ec('0x3b')][_0xe8ec('0x190')](_0x33d930[_0xe8ec('0x7a')],_0x33d930['escape_digits']);};AGIVertices[_0xe8ec('0x10')]['sendMail']=function(_0x5746f3){logger['info'](util[_0xe8ec('0x2b')](_0xe8ec('0x191'),_0x5746f3[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x5746f3['account_id'])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0x192'));}var _0x3c1b4e=this['getMailAccount'][_0xe8ec('0xa8')](this,_0x5746f3[_0xe8ec('0x193')]);if(!_0x3c1b4e||!_0x3c1b4e[_0xe8ec('0x194')]){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x5746f3,_0xe8ec('0x195'));}var _0xd5bc4d={'from':util['format']('\x22%s\x22\x20<%s>',_0x3c1b4e[_0xe8ec('0x14')],_0x3c1b4e[_0xe8ec('0x196')]||_0x3c1b4e[_0xe8ec('0x194')][_0xe8ec('0x197')]),'to':_0x5746f3['to']||'','cc':_0x5746f3['cc']||'','bcc':_0x5746f3[_0xe8ec('0x198')]||'','subject':_0x5746f3['subject'],'html':_0x5746f3[_0xe8ec('0x7a')],'text':_0x5746f3[_0xe8ec('0x7a')]};if(this[_0xe8ec('0x84')](_0x5746f3[_0xe8ec('0x199')])){}logger[_0xe8ec('0xdd')]('sendMail\x20message',JSON['stringify'](_0xd5bc4d));this[_0xe8ec('0x3a')][_0xe8ec('0xa8')](this,_0x5746f3,_0x5746f3[_0xe8ec('0x193')]);this['channel']['noop'](util[_0xe8ec('0x2b')](_0xe8ec('0x19a'),_0x3c1b4e[_0xe8ec('0x14')]));this[_0xe8ec('0x25')][_0xe8ec('0xa8')](this,_0x3c1b4e[_0xe8ec('0x19b')],_0xd5bc4d);return this['channel'][_0xe8ec('0xac')](_0xe8ec('0x19c'));};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x19d')]=function(_0x440540){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x19e'),_0x440540['label']));return this['channel'][_0xe8ec('0xac')](_0xe8ec('0x19f'));};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x1a0')]=function(_0x4b3a1f){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x1a1'),_0x4b3a1f[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x4b3a1f[_0xe8ec('0x1a2')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0x1a3'));}var _0x4ce426=this['getSmsAccount'][_0xe8ec('0xa8')](this,_0x4b3a1f[_0xe8ec('0x1a2')]);if(!_0x4ce426){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x4b3a1f,'no\x20sms\x20account\x20found');}var _0x30e3b9={'body':_0x4b3a1f[_0xe8ec('0x1a4')],'phone':_0x4b3a1f['to']||'','SmsAccountId':_0x4ce426['id']};logger['debug'](_0xe8ec('0x1a5'),JSON[_0xe8ec('0x73')](_0x30e3b9));this[_0xe8ec('0x3a')][_0xe8ec('0xa8')](this,_0x4b3a1f,_0x4b3a1f[_0xe8ec('0x1a2')]);this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x1a6'),_0x4ce426[_0xe8ec('0x14')]));this[_0xe8ec('0x39')]['sync'](this,_0x30e3b9);return this[_0xe8ec('0x3b')]['noop'](_0xe8ec('0x1a7'));};AGIVertices['prototype'][_0xe8ec('0x1a8')]=function(_0x5a1edf){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x1a9'),_0x5a1edf[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x5a1edf[_0xe8ec('0xd6')])){return this['channel'][_0xe8ec('0x2e')](_0x5a1edf,_0xe8ec('0x1aa'));}var _0x38b096=this[_0xe8ec('0x11')][_0xe8ec('0xa8')](this,_0x5a1edf[_0xe8ec('0xd6')]);if(!_0x38b096){return this['channel'][_0xe8ec('0x2e')](_0x5a1edf,_0xe8ec('0x166'));}return this[_0xe8ec('0x3b')]['setVariable'](_0x38b096,_0x5a1edf[_0xe8ec('0x1ab')]);};AGIVertices['prototype'][_0xe8ec('0x1ac')]=function(_0x52a0b0){logger[_0xe8ec('0x30')](util['format'](_0xe8ec('0x1ad'),_0x52a0b0['label']));this['channel'][_0xe8ec('0xac')]('START\x20CALLY\x20SQUARE');var _0x52d186=this[_0xe8ec('0x3b')][_0xe8ec('0x11')](_0xe8ec('0x1ae'));if(!_['isEmpty'](_0x52d186[_0xe8ec('0xa3')])){this[_0xe8ec('0x3b')]['uniqueid']=_0x52d186[_0xe8ec('0xa3')];}if(_0x52a0b0[_0xe8ec('0xba')]===_0xe8ec('0x1af')){this['channel']['noop'](_0xe8ec('0x1b0'));return this['channel'][_0xe8ec('0xba')]();}return this[_0xe8ec('0x3b')][_0xe8ec('0xac')]('Skipped\x20Answer');};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x1b1')]=function(_0x22eda5){logger['info'](util[_0xe8ec('0x2b')](_0xe8ec('0x1b2'),_0x22eda5[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x22eda5['project_id'])){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x22eda5,_0xe8ec('0x1b3'));}var _0x321808=this['getSquareProject'][_0xe8ec('0xa8')](this,_0x22eda5[_0xe8ec('0x1b4')]);if(!this[_0xe8ec('0x84')](_0x321808)){return this['channel'][_0xe8ec('0x2e')](_0x22eda5,util[_0xe8ec('0x2b')](_0xe8ec('0x1b5'),_0x22eda5[_0xe8ec('0x1b4')]));}if(_0x321808===this[_0xe8ec('0x3b')][_0xe8ec('0x43')]){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x22eda5,_0xe8ec('0x1b6'));}this[_0xe8ec('0x3a')][_0xe8ec('0xa8')](this,_0x22eda5,_0x321808);var _0x154adf=this[_0xe8ec('0x3b')][_0xe8ec('0x59')](_0xe8ec('0x1b7'),util[_0xe8ec('0x2b')](_0xe8ec('0x1b8'),config[_0xe8ec('0x7')][_0xe8ec('0x1b9')]||'127.0.0.1',_0x321808,this[_0xe8ec('0x3b')][_0xe8ec('0x43')]));if(_0x154adf[_0xe8ec('0xa5')]===-0x1){return _0x154adf;}return this[_0xe8ec('0x3b')]['noop'](util[_0xe8ec('0x2b')](_0xe8ec('0xc7'),_0xe8ec('0x1b7'),_0x321808));};AGIVertices['prototype'][_0xe8ec('0x1ba')]=function(_0x4c4dfe){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x1bb'),_0x4c4dfe[_0xe8ec('0x3c')]));var _0x26570f=this[_0xe8ec('0x1bc')][_0xe8ec('0xa8')](this,_0x4c4dfe['command']);this[_0xe8ec('0x3a')][_0xe8ec('0xa8')](this,_0x4c4dfe,_0x4c4dfe[_0xe8ec('0x1bd')]);if(this[_0xe8ec('0x84')](_0x4c4dfe[_0xe8ec('0xd6')])){var _0x49ec6d=this['getVariable']['sync'](this,_0x4c4dfe[_0xe8ec('0xd6')]);if(_0x49ec6d){this[_0xe8ec('0x3b')]['setVariable'](_0x49ec6d,_0x26570f);return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x1be'),_0x4c4dfe[_0xe8ec('0x1bd')],_0x49ec6d));}}return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util['format'](_0xe8ec('0x1bf'),_0x4c4dfe['command']));};AGIVertices[_0xe8ec('0x10')]['google_cloud_tts']=function(_0x17a105){logger['info'](util['format']('Enter\x20in\x20Google\x20Cloud\x20TTS\x20(%s)\x20block',_0x17a105[_0xe8ec('0x3c')]));_0x17a105[_0xe8ec('0x7a')]=_0x17a105[_0xe8ec('0x7a')]['replace'](/(\r\n|\n|\r)/gm,'\x20');if(!this[_0xe8ec('0x84')](_0x17a105[_0xe8ec('0x5d')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0x1c0'));}if(!this[_0xe8ec('0x84')](_0x17a105[_0xe8ec('0x7a')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xad'));}this['channel'][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x1c1'),_0x17a105[_0xe8ec('0x7a')]));var _0x5944da=this[_0xe8ec('0x5c')][_0xe8ec('0xa8')](this,_0x17a105);if(_0x5944da){this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util['format']('Google\x20Cloud\x20TTS\x20%s\x20file\x20created',_0x5944da));var _0x3aff8b=this[_0xe8ec('0x3b')][_0xe8ec('0x153')](_0x5944da);try{fs[_0xe8ec('0x107')](_0x5944da+_0xe8ec('0x108'));}catch(_0x5aadb4){logger[_0xe8ec('0x2e')](_0x5aadb4);}return _0x3aff8b;}return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x17a105,_0xe8ec('0x1c2'));};AGIVertices[_0xe8ec('0x10')][_0xe8ec('0x1c3')]=function(_0x5ed4fa){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x1c4'),_0x5ed4fa[_0xe8ec('0x3c')]));_0x5ed4fa[_0xe8ec('0x7a')]=_0x5ed4fa[_0xe8ec('0x7a')]['replace'](/(\r\n|\n|\r)/gm,'\x20');if(!this['isConfigured'](_0x5ed4fa[_0xe8ec('0x7a')])){return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](_0xe8ec('0xad'));}this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x1c5'),_0x5ed4fa[_0xe8ec('0x7a')]));var _0x42b037=this['googleTTS'][_0xe8ec('0xa8')](this,_0x5ed4fa);if(_0x42b037){this['channel'][_0xe8ec('0xac')](util[_0xe8ec('0x2b')](_0xe8ec('0x1c6'),_0x42b037));var _0x562099=this[_0xe8ec('0x3b')]['streamFile'](_0x42b037);try{fs['unlink'](_0x42b037+_0xe8ec('0x108'));}catch(_0x1c2d66){logger[_0xe8ec('0x2e')](_0x1c2d66);}return _0x562099;}return this[_0xe8ec('0x3b')]['error'](_0x5ed4fa,_0xe8ec('0x1c7'));};AGIVertices[_0xe8ec('0x10')]['unpause']=function(_0x32ada6){logger[_0xe8ec('0x30')](util['format'](_0xe8ec('0x1c8'),_0x32ada6[_0xe8ec('0x3c')]));if(!this[_0xe8ec('0x84')](_0x32ada6['findBy'])){return this[_0xe8ec('0x3b')]['error'](_0x32ada6,_0xe8ec('0x15d'));}logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x156'),this[_0xe8ec('0x3b')][_0xe8ec('0x52')],_0x32ada6[_0xe8ec('0x157')]));var _0x59b515=this[_0xe8ec('0x53')]['sync'](this,_0x32ada6[_0xe8ec('0x157')]);if(_0x59b515){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x158'),this['channel'][_0xe8ec('0x52')],_0x32ada6[_0xe8ec('0x157')]));this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util[_0xe8ec('0x2b')]('AGENT\x20%s\x20FOUND\x20BY',this['channel']['callerid'],_0x32ada6[_0xe8ec('0x157')]));return{'code':0xc8,'result':'success'};}else{logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x15a'),this[_0xe8ec('0x3b')][_0xe8ec('0x52')],_0x32ada6[_0xe8ec('0x157')]));this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util['format'](_0xe8ec('0x15a'),this['channel'][_0xe8ec('0x52')],_0x32ada6[_0xe8ec('0x157')]));return{'code':0xc8,'result':_0xe8ec('0x15b')};}};AGIVertices['prototype']['voicemail']=function(_0x389abb){logger['info'](util[_0xe8ec('0x2b')](_0xe8ec('0x1c9'),_0x389abb['label']));var _0x5078ad=this[_0xe8ec('0x3b')][_0xe8ec('0x59')](_0xe8ec('0x1ca'),[_0x389abb['mailbox'],_0x389abb[_0xe8ec('0x78')]]);if(_0x5078ad[_0xe8ec('0xa5')]===-0x1){return _0x5078ad;}return this[_0xe8ec('0x3b')][_0xe8ec('0xac')](util['format'](_0xe8ec('0xc7'),_0xe8ec('0x1ca'),_0x389abb[_0xe8ec('0x1cb')]));};AGIVertices[_0xe8ec('0x10')]['vswitch']=function(_0x1ec13d){logger[_0xe8ec('0x30')](util[_0xe8ec('0x2b')](_0xe8ec('0x1cc'),_0x1ec13d[_0xe8ec('0x3c')]));if(!this['isConfigured'](_0x1ec13d[_0xe8ec('0xd6')])){return this[_0xe8ec('0x3b')][_0xe8ec('0x2e')](_0x1ec13d,_0xe8ec('0x1aa'));}var _0x46e25f=this[_0xe8ec('0x11')]['sync'](this,_0x1ec13d[_0xe8ec('0xd6')]);if(!_0x46e25f){return this[_0xe8ec('0x3b')]['error'](_0x1ec13d,'no\x20variable\x20found');}var _0x2e6831=this[_0xe8ec('0x3b')][_0xe8ec('0x11')](_0x46e25f);return{'code':0xc8,'result':_0x2e6831[_0xe8ec('0xa3')]?_0x2e6831['extra']:'-'};};String[_0xe8ec('0x10')]['replaceAll']=function(_0x9dd75d,_0x581e29){return this['split'](_0x9dd75d)[_0xe8ec('0x1cd')](_0x581e29);};module[_0xe8ec('0x1ce')]=AGIVertices;
\ No newline at end of file
index d4f3649..f7b27b1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe472=['acw','../rpc/user','voiceQueues','agents','timers','channels','syncAgentConnect','bind','hanguprequest','syncHangupRequest','syncHangup','syncAgentRingNoAnswer','attendedtransfer','blindtransfer','syncBlindTransfer','custom:agentConnectPreview','syncAgentConnectPreview','milliseconds','diff','seconds','prototype','updateAcw','lastPauseAt','timer','update','info','[%s][UPDATE][ACWTIME:%s]','catch','error','finally','ACW','mandatoryDispositionPause','name','resolve','voicePause','[%s][INPAUSE][AGENT:%s][QUEUE:%s]','attended','destlinkedid','savePause','then','available','acwTimeout','stopAcw','format','queue','[%s][TIMER:%s][AGENT:%s][QUEUE:%s]','[ACW][START]\x20%s','message','getAgent','saveUnpause','[%s][UPDATE][ERRORS:%s]','[ACW][STOP]\x20Interface\x20%s\x20doesn\x27t\x20have\x20timer','[ACW][TIMERS]','[ACW][STOP]\x20%s','mandatoryDisposition','interface','[ACW][syncAgentConnect]\x20%s','uniqueid','[ACW][syncAgentConnectPreview]\x20%s','[%s][HANGUP:UNIQUEID]','startAcw','linkedid','isUndefined','[ACW][syncHangupRequest]\x20%s','[%s][HANGUPATTENDEDTRANSFER:UNIQUEID]','[%s][HANGUPATTENDEDTRANSFER:LINKEDID]','syncAttendedTransfer','isNil','transfereeuniqueid','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','[ACW][syncAttendedTransfer]\x20%s','transfereruniqueid','[%s][BLINDTRANSFER:LINKEDID]','stringify','transfererlinkedid','[ACW][syncBlindTransfer]\x20%s','[%s][AUTOPAUSE][AGENT:%s][QUEUE:%]','Auto-Pause','exports','lodash','moment','../ami'];(function(_0x997738,_0x4b8298){var _0x227380=function(_0x11ee71){while(--_0x11ee71){_0x997738['push'](_0x997738['shift']());}};_0x227380(++_0x4b8298);}(_0xe472,0x1a1));var _0x2e47=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xe472[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0x2e47('0x0'));var moment=require(_0x2e47('0x1'));var ami=require(_0x2e47('0x2'));var logger=require('../../../config/logger')(_0x2e47('0x3'));var RpcUser=require(_0x2e47('0x4'));var RpcVoiceAgentReport=require('../rpc/voiceAgentReport');function Acw(_0x40abc8){this[_0x2e47('0x5')]=_0x40abc8[_0x2e47('0x5')];this[_0x2e47('0x6')]=_0x40abc8[_0x2e47('0x6')];this['timers']=_0x40abc8[_0x2e47('0x7')];this[_0x2e47('0x8')]={};ami['on']('agentconnect',this[_0x2e47('0x9')][_0x2e47('0xa')](this));ami['on'](_0x2e47('0xb'),this[_0x2e47('0xc')][_0x2e47('0xa')](this));ami['on']('hangup',this[_0x2e47('0xd')][_0x2e47('0xa')](this));ami['on']('agentringnoanswer',this[_0x2e47('0xe')][_0x2e47('0xa')](this));ami['on'](_0x2e47('0xf'),this['syncAttendedTransfer'][_0x2e47('0xa')](this));ami['on'](_0x2e47('0x10'),this[_0x2e47('0x11')]['bind'](this));ami['on'](_0x2e47('0x12'),this[_0x2e47('0x13')]['bind'](this));}function getDiff(_0x8b6c51){var _0x3cc25c=moment()[_0x2e47('0x14')](0x0);var _0xe9124=moment(_0x8b6c51)[_0x2e47('0x14')](0x0);return _0x3cc25c[_0x2e47('0x15')](_0xe9124,_0x2e47('0x16'));}Acw[_0x2e47('0x17')][_0x2e47('0x18')]=function(_0x4356a8,_0x2eca18){var _0x3d6e7c=this;var _0x5cbcf4=getDiff(_0x3d6e7c[_0x2e47('0x7')][_0x4356a8][_0x2e47('0x19')]);clearTimeout(_0x3d6e7c[_0x2e47('0x7')][_0x4356a8][_0x2e47('0x1a')]);_0x3d6e7c[_0x2e47('0x7')][_0x4356a8]['timer']=![];return RpcVoiceAgentReport[_0x2e47('0x1b')]({'acwtime':_0x5cbcf4},_0x3d6e7c[_0x2e47('0x7')][_0x4356a8]['uniqueid'],_0x4356a8)['then'](function(_0xc339bc){logger[_0x2e47('0x1c')](_0x2e47('0x1d'),_0x2eca18,_0x5cbcf4,_0xc339bc);})[_0x2e47('0x1e')](function(_0x376741){logger[_0x2e47('0x1f')]('[%s][UPDATE][ERRORS:%s]',_0x2eca18,_0x376741);})[_0x2e47('0x20')](function(){delete _0x3d6e7c[_0x2e47('0x7')][_0x4356a8];});};Acw[_0x2e47('0x17')]['startAcw']=function(_0x20ea5d){try{var _0x3550bc=this;var _0x200ee7=this[_0x2e47('0x8')][_0x20ea5d]['interface'];var _0x58af6f=this[_0x2e47('0x8')][_0x20ea5d]['queue'];var _0xb1e166=this[_0x2e47('0x5')][_0x58af6f];var _0x59a532=![];var _0x175f02=_0x2e47('0x21');if(_0xb1e166['mandatoryDisposition']&&_0xb1e166[_0x2e47('0x22')][_0x2e47('0x23')]){_0x59a532=!![];_0x175f02=_0xb1e166['mandatoryDispositionPause'][_0x2e47('0x23')];}if(!_0x3550bc[_0x2e47('0x6')][_0x200ee7]){return Promise[_0x2e47('0x24')]();}return RpcUser['getAgent'](_0x3550bc[_0x2e47('0x6')][_0x200ee7]['id'])['then'](function(_0x385f42){if(!_0x385f42||_0x385f42[_0x2e47('0x25')]){logger[_0x2e47('0x1c')](_0x2e47('0x26'),_0x20ea5d,_0x200ee7,_0x58af6f);return;}logger[_0x2e47('0x1c')]('[%s][START][AGENT:%s][QUEUE:%s]',_0x20ea5d,_0x200ee7,_0x58af6f);var _0x3fa0da=_0x3550bc[_0x2e47('0x8')][_0x20ea5d][_0x2e47('0x27')]&&_0x3550bc[_0x2e47('0x8')][_0x20ea5d][_0x2e47('0x28')]?_0x3550bc[_0x2e47('0x8')][_0x20ea5d][_0x2e47('0x28')]:_0x20ea5d;return RpcUser[_0x2e47('0x29')](_0x3550bc['agents'][_0x200ee7],_0x175f02,_0x3fa0da)[_0x2e47('0x2a')](function(_0x116c9f){_0x3550bc[_0x2e47('0x5')][_0x58af6f][_0x2e47('0x2b')]-=0x1;_0x3550bc[_0x2e47('0x5')][_0x58af6f]['paused']+=0x1;return _0x116c9f;});})[_0x2e47('0x2a')](function(_0x4ccd07){if(_0x59a532||!_0x4ccd07){return;}_0x3550bc[_0x2e47('0x7')][_0x200ee7]={};logger[_0x2e47('0x1c')]('[%s][TIMER:%s][AGENT:%s][QUEUE:%s]',_0x20ea5d,_0x3550bc[_0x2e47('0x5')][_0x58af6f][_0x2e47('0x2c')],_0x200ee7,_0x58af6f);_0x3550bc[_0x2e47('0x7')][_0x200ee7][_0x2e47('0x1a')]=setTimeout(_0x3550bc[_0x2e47('0x2d')][_0x2e47('0xa')](_0x3550bc,_0x200ee7),_0x3550bc[_0x2e47('0x5')][_0x58af6f]['acwTimeout']*0x3e8);_0x3550bc[_0x2e47('0x7')][_0x200ee7][_0x2e47('0x19')]=moment()[_0x2e47('0x2e')]('YYYY-MM-DD\x20HH:mm:ss');_0x3550bc['timers'][_0x200ee7]['uniqueid']=_0x20ea5d;_0x3550bc[_0x2e47('0x7')][_0x200ee7][_0x2e47('0x2f')]=_0x58af6f;_0x3550bc[_0x2e47('0x7')][_0x200ee7][_0x2e47('0x18')]=_0x3550bc['updateAcw'][_0x2e47('0xa')](_0x3550bc,_0x200ee7,_0x20ea5d);})[_0x2e47('0x1e')](function(){logger['error'](_0x2e47('0x30'),_0x20ea5d,_0x3550bc['voiceQueues'][_0x58af6f][_0x2e47('0x2c')],_0x200ee7,_0x58af6f);})[_0x2e47('0x20')](function(){delete _0x3550bc[_0x2e47('0x8')][_0x20ea5d];});}catch(_0x17ab07){logger[_0x2e47('0x1f')](_0x2e47('0x31'),_0x17ab07[_0x2e47('0x32')]);}};Acw[_0x2e47('0x17')]['stopAcw']=function(_0x3b34da){try{var _0x147046=this;if(_0x147046[_0x2e47('0x7')][_0x3b34da]){_0x147046[_0x2e47('0x7')][_0x3b34da][_0x2e47('0x1a')]=![];var _0x75707c=_0x147046[_0x2e47('0x7')][_0x3b34da]['uniqueid'];var _0x38e8a0=_0x147046['timers'][_0x3b34da][_0x2e47('0x2f')];var _0x70b6a9=_0x147046[_0x2e47('0x5')][_0x38e8a0]['acwTimeout'];logger[_0x2e47('0x1c')]('[%s][TIMER][STOP][AGENT:%s]',_0x75707c,_0x3b34da);RpcUser[_0x2e47('0x33')](this[_0x2e47('0x6')][_0x3b34da]['id'])[_0x2e47('0x2a')](function(_0x4ebc2f){if(_0x4ebc2f['pauseType']===_0x2e47('0x21')){return RpcUser[_0x2e47('0x34')](_0x147046[_0x2e47('0x6')][_0x3b34da]);}});RpcVoiceAgentReport[_0x2e47('0x1b')]({'acwtime':_0x70b6a9,'agentacw':!![]},_0x75707c,_0x3b34da)[_0x2e47('0x2a')](function(_0x2def9a){logger[_0x2e47('0x1c')](_0x2e47('0x1d'),_0x75707c,_0x70b6a9,_0x2def9a);})[_0x2e47('0x1e')](function(_0x41114d){logger['error'](_0x2e47('0x35'),_0x75707c,_0x41114d);});}else{logger['error'](_0x2e47('0x36'),_0x3b34da);if(_0x147046[_0x2e47('0x7')]){logger[_0x2e47('0x1c')](_0x2e47('0x37'),JSON['stringify'](_0x147046['timers']));}}}catch(_0x15521e){logger['error'](_0x2e47('0x38'),_0x15521e[_0x2e47('0x32')]);}};Acw['prototype'][_0x2e47('0x9')]=function(_0xb6181b){try{if(this[_0x2e47('0x5')][_0xb6181b[_0x2e47('0x2f')]]&&(this[_0x2e47('0x5')][_0xb6181b[_0x2e47('0x2f')]][_0x2e47('0x3')]||this[_0x2e47('0x5')][_0xb6181b[_0x2e47('0x2f')]][_0x2e47('0x39')])){if(this[_0x2e47('0x6')][_0xb6181b['interface']]){this[_0x2e47('0x8')][_0xb6181b['uniqueid']]={'queue':_0xb6181b[_0x2e47('0x2f')],'interface':_0xb6181b[_0x2e47('0x3a')],'destlinkedid':_0xb6181b[_0x2e47('0x28')]};}}}catch(_0x5b2823){logger[_0x2e47('0x1f')](_0x2e47('0x3b'),_0x5b2823[_0x2e47('0x32')]);}};Acw[_0x2e47('0x17')][_0x2e47('0x13')]=function(_0x2a4154){try{if(this[_0x2e47('0x5')][_0x2a4154[_0x2e47('0x2f')]]&&(this[_0x2e47('0x5')][_0x2a4154[_0x2e47('0x2f')]][_0x2e47('0x3')]||this[_0x2e47('0x5')][_0x2a4154[_0x2e47('0x2f')]][_0x2e47('0x39')])){if(this['agents'][_0x2a4154[_0x2e47('0x3a')]]){this[_0x2e47('0x8')][_0x2a4154[_0x2e47('0x3c')]]={'queue':_0x2a4154[_0x2e47('0x2f')],'interface':_0x2a4154['interface']};}}}catch(_0x27be2b){logger['error'](_0x2e47('0x3d'),_0x27be2b['message']);}};Acw['prototype'][_0x2e47('0xc')]=function(_0x484184){try{if(this[_0x2e47('0x8')][_0x484184[_0x2e47('0x3c')]]&&_['isUndefined'](this[_0x2e47('0x8')][_0x484184[_0x2e47('0x3c')]][_0x2e47('0x27')])){logger['info'](_0x2e47('0x3e'),_0x484184[_0x2e47('0x3c')]);this[_0x2e47('0x3f')](_0x484184[_0x2e47('0x3c')]);}else if(this[_0x2e47('0x8')][_0x484184[_0x2e47('0x40')]]&&_[_0x2e47('0x41')](this['channels'][_0x484184[_0x2e47('0x40')]][_0x2e47('0x27')])){logger['info']('[%s][HANGUP:LINKEDID]',_0x484184[_0x2e47('0x40')]);this['startAcw'](_0x484184[_0x2e47('0x40')]);}}catch(_0x1f2b68){logger['error'](_0x2e47('0x42'),_0x1f2b68[_0x2e47('0x32')]);}};Acw[_0x2e47('0x17')][_0x2e47('0xd')]=function(_0x5d9f24){try{if(this['channels'][_0x5d9f24['uniqueid']]&&this[_0x2e47('0x8')][_0x5d9f24[_0x2e47('0x3c')]][_0x2e47('0x27')]){logger[_0x2e47('0x1c')](_0x2e47('0x43'),_0x5d9f24[_0x2e47('0x3c')]);this[_0x2e47('0x3f')](_0x5d9f24['uniqueid']);}else if(this[_0x2e47('0x8')][_0x5d9f24[_0x2e47('0x40')]]&&this['channels'][_0x5d9f24[_0x2e47('0x40')]]['attended']){logger[_0x2e47('0x1c')](_0x2e47('0x44'),_0x5d9f24[_0x2e47('0x40')]);this[_0x2e47('0x3f')](_0x5d9f24[_0x2e47('0x40')]);}}catch(_0x387b96){logger[_0x2e47('0x1f')]('[ACW][syncHangup]\x20%s',_0x387b96[_0x2e47('0x32')]);}};Acw[_0x2e47('0x17')][_0x2e47('0x45')]=function(_0x2b0347){try{if(!_[_0x2e47('0x46')](this[_0x2e47('0x8')][_0x2b0347[_0x2e47('0x47')]])){this['startAcw'](_0x2b0347[_0x2e47('0x47')]);if(this[_0x2e47('0x8')][_0x2b0347[_0x2e47('0x48')]]){this[_0x2e47('0x8')][_0x2b0347['secondtransfereruniqueid']][_0x2e47('0x27')]=!![];this[_0x2e47('0x8')][_0x2b0347[_0x2e47('0x49')]]=this[_0x2e47('0x8')][_0x2b0347[_0x2e47('0x48')]];delete this['channels'][_0x2b0347[_0x2e47('0x48')]];}}else if(!_[_0x2e47('0x46')](this[_0x2e47('0x8')][_0x2b0347[_0x2e47('0x49')]])){this[_0x2e47('0x3f')](_0x2b0347[_0x2e47('0x49')]);if(this['channels'][_0x2b0347[_0x2e47('0x4a')]]){this[_0x2e47('0x8')][_0x2b0347[_0x2e47('0x4a')]][_0x2e47('0x27')]=!![];this['channels'][_0x2b0347[_0x2e47('0x47')]]=this[_0x2e47('0x8')][_0x2b0347['origtransfereruniqueid']];delete this[_0x2e47('0x8')][_0x2b0347[_0x2e47('0x4a')]];}}}catch(_0xadc0bf){logger[_0x2e47('0x1f')](_0x2e47('0x4b'),_0xadc0bf['message']);}};Acw['prototype'][_0x2e47('0x11')]=function(_0x2a2e29){try{if(this[_0x2e47('0x8')][_0x2a2e29[_0x2e47('0x4c')]]){logger[_0x2e47('0x1c')]('[%s][BLINDTRANSFER:UNIQUEID]',JSON['stringify'](_0x2a2e29[_0x2e47('0x4c')]));this[_0x2e47('0x3f')](_0x2a2e29[_0x2e47('0x4c')]);}else if(this[_0x2e47('0x8')][_0x2a2e29['transfererlinkedid']]){logger[_0x2e47('0x1c')](_0x2e47('0x4d'),JSON[_0x2e47('0x4e')](_0x2a2e29[_0x2e47('0x4f')]));this[_0x2e47('0x3f')](_0x2a2e29[_0x2e47('0x4f')]);}}catch(_0x4f6ade){logger[_0x2e47('0x1f')](_0x2e47('0x50'),_0x4f6ade[_0x2e47('0x32')]);}};Acw[_0x2e47('0x17')][_0x2e47('0xe')]=function(_0x5ca316){try{if(this['voiceQueues'][_0x5ca316[_0x2e47('0x2f')]]&&this[_0x2e47('0x5')][_0x5ca316[_0x2e47('0x2f')]]['autopause']==='all'){if(this[_0x2e47('0x6')][_0x5ca316[_0x2e47('0x3a')]]){logger[_0x2e47('0x1c')](_0x2e47('0x51'),_0x5ca316['uniqueid'],_0x5ca316[_0x2e47('0x3a')],_0x5ca316[_0x2e47('0x2f')]);return RpcUser[_0x2e47('0x29')](this[_0x2e47('0x6')][_0x5ca316[_0x2e47('0x3a')]],_0x2e47('0x52'),_0x5ca316['uniqueid']);}}}catch(_0x65c9eb){logger[_0x2e47('0x1f')]('[ACW][syncAgentRingNoAnswer]\x20%s',_0x65c9eb[_0x2e47('0x32')]);}};module[_0x2e47('0x53')]=Acw;
\ No newline at end of file
+var _0xd488=['agents','timers','channels','agentconnect','syncAgentConnect','bind','hanguprequest','syncHangupRequest','hangup','syncHangup','syncAgentRingNoAnswer','attendedtransfer','syncAttendedTransfer','syncBlindTransfer','custom:agentConnectPreview','syncAgentConnectPreview','milliseconds','diff','seconds','prototype','timer','update','uniqueid','then','info','error','[%s][UPDATE][ERRORS:%s]','finally','startAcw','mandatoryDisposition','mandatoryDispositionPause','name','resolve','getAgent','[%s][START][AGENT:%s][QUEUE:%s]','attended','destlinkedid','savePause','available','paused','[%s][TIMER:%s][AGENT:%s][QUEUE:%s]','acwTimeout','stopAcw','lastPauseAt','format','YYYY-MM-DD\x20HH:mm:ss','queue','updateAcw','catch','message','[%s][TIMER][STOP][AGENT:%s]','ACW','saveUnpause','[ACW][STOP]\x20Interface\x20%s\x20doesn\x27t\x20have\x20timer','[ACW][TIMERS]','stringify','[ACW][STOP]\x20%s','acw','interface','[ACW][syncAgentConnect]\x20%s','[ACW][syncAgentConnectPreview]\x20%s','isUndefined','[%s][HANGUP:UNIQUEID]','linkedid','[%s][HANGUP:LINKEDID]','[ACW][syncHangupRequest]\x20%s','[%s][HANGUPATTENDEDTRANSFER:UNIQUEID]','[%s][HANGUPATTENDEDTRANSFER:LINKEDID]','isNil','transfereeuniqueid','transfertargetuniqueid','secondtransfereruniqueid','origtransfereruniqueid','[ACW][syncAttendedTransfer]\x20%s','transfereruniqueid','[%s][BLINDTRANSFER:UNIQUEID]','transfererlinkedid','[%s][BLINDTRANSFER:LINKEDID]','[ACW][syncBlindTransfer]\x20%s','autopause','all','[%s][AUTOPAUSE][AGENT:%s][QUEUE:%]','Auto-Pause','[ACW][syncAgentRingNoAnswer]\x20%s','exports','lodash','moment','../ami','../rpc/user','../rpc/voiceAgentReport','voiceQueues'];(function(_0x44ae0b,_0x3e9865){var _0x69232a=function(_0x5ae588){while(--_0x5ae588){_0x44ae0b['push'](_0x44ae0b['shift']());}};_0x69232a(++_0x3e9865);}(_0xd488,0x10b));var _0x8d48=function(_0x5e0e90,_0x1c8363){_0x5e0e90=_0x5e0e90-0x0;var _0x33cfe3=_0xd488[_0x5e0e90];return _0x33cfe3;};'use strict';var _=require(_0x8d48('0x0'));var moment=require(_0x8d48('0x1'));var ami=require(_0x8d48('0x2'));var logger=require('../../../config/logger')('acw');var RpcUser=require(_0x8d48('0x3'));var RpcVoiceAgentReport=require(_0x8d48('0x4'));function Acw(_0x31eea9){this[_0x8d48('0x5')]=_0x31eea9[_0x8d48('0x5')];this[_0x8d48('0x6')]=_0x31eea9['agents'];this[_0x8d48('0x7')]=_0x31eea9['timers'];this[_0x8d48('0x8')]={};ami['on'](_0x8d48('0x9'),this[_0x8d48('0xa')][_0x8d48('0xb')](this));ami['on'](_0x8d48('0xc'),this[_0x8d48('0xd')][_0x8d48('0xb')](this));ami['on'](_0x8d48('0xe'),this[_0x8d48('0xf')][_0x8d48('0xb')](this));ami['on']('agentringnoanswer',this[_0x8d48('0x10')][_0x8d48('0xb')](this));ami['on'](_0x8d48('0x11'),this[_0x8d48('0x12')]['bind'](this));ami['on']('blindtransfer',this[_0x8d48('0x13')][_0x8d48('0xb')](this));ami['on'](_0x8d48('0x14'),this[_0x8d48('0x15')][_0x8d48('0xb')](this));}function getDiff(_0x2f5766){var _0x434b2f=moment()['milliseconds'](0x0);var _0x450768=moment(_0x2f5766)[_0x8d48('0x16')](0x0);return _0x434b2f[_0x8d48('0x17')](_0x450768,_0x8d48('0x18'));}Acw[_0x8d48('0x19')]['updateAcw']=function(_0x4f443f,_0x5f5c0b){var _0x277e38=this;var _0x5b0c52=getDiff(_0x277e38[_0x8d48('0x7')][_0x4f443f]['lastPauseAt']);clearTimeout(_0x277e38['timers'][_0x4f443f][_0x8d48('0x1a')]);_0x277e38[_0x8d48('0x7')][_0x4f443f]['timer']=![];return RpcVoiceAgentReport[_0x8d48('0x1b')]({'acwtime':_0x5b0c52},_0x277e38[_0x8d48('0x7')][_0x4f443f][_0x8d48('0x1c')],_0x4f443f)[_0x8d48('0x1d')](function(_0x4fdc83){logger[_0x8d48('0x1e')]('[%s][UPDATE][ACWTIME:%s]',_0x5f5c0b,_0x5b0c52,_0x4fdc83);})['catch'](function(_0x13483e){logger[_0x8d48('0x1f')](_0x8d48('0x20'),_0x5f5c0b,_0x13483e);})[_0x8d48('0x21')](function(){delete _0x277e38[_0x8d48('0x7')][_0x4f443f];});};Acw[_0x8d48('0x19')][_0x8d48('0x22')]=function(_0x209205){try{var _0x38154f=this;var _0x212202=this[_0x8d48('0x8')][_0x209205]['interface'];var _0x5df9b1=this[_0x8d48('0x8')][_0x209205]['queue'];var _0x26f3b7=this[_0x8d48('0x5')][_0x5df9b1];var _0x486342=![];var _0x499bcb='ACW';if(_0x26f3b7[_0x8d48('0x23')]&&_0x26f3b7[_0x8d48('0x24')]['name']){_0x486342=!![];_0x499bcb=_0x26f3b7[_0x8d48('0x24')][_0x8d48('0x25')];}if(!_0x38154f[_0x8d48('0x6')][_0x212202]){return Promise[_0x8d48('0x26')]();}return RpcUser[_0x8d48('0x27')](_0x38154f[_0x8d48('0x6')][_0x212202]['id'])['then'](function(_0x18950a){if(!_0x18950a||_0x18950a['voicePause']){logger[_0x8d48('0x1e')]('[%s][INPAUSE][AGENT:%s][QUEUE:%s]',_0x209205,_0x212202,_0x5df9b1);return;}logger['info'](_0x8d48('0x28'),_0x209205,_0x212202,_0x5df9b1);var _0x52e65e=_0x38154f[_0x8d48('0x8')][_0x209205][_0x8d48('0x29')]&&_0x38154f[_0x8d48('0x8')][_0x209205][_0x8d48('0x2a')]?_0x38154f['channels'][_0x209205][_0x8d48('0x2a')]:_0x209205;return RpcUser[_0x8d48('0x2b')](_0x38154f[_0x8d48('0x6')][_0x212202],_0x499bcb,_0x52e65e)[_0x8d48('0x1d')](function(_0x2bac95){_0x38154f[_0x8d48('0x5')][_0x5df9b1][_0x8d48('0x2c')]-=0x1;_0x38154f['voiceQueues'][_0x5df9b1][_0x8d48('0x2d')]+=0x1;return _0x2bac95;});})[_0x8d48('0x1d')](function(_0x172d0f){if(_0x486342||!_0x172d0f){return;}_0x38154f['timers'][_0x212202]={};logger[_0x8d48('0x1e')](_0x8d48('0x2e'),_0x209205,_0x38154f[_0x8d48('0x5')][_0x5df9b1][_0x8d48('0x2f')],_0x212202,_0x5df9b1);_0x38154f[_0x8d48('0x7')][_0x212202]['timer']=setTimeout(_0x38154f[_0x8d48('0x30')]['bind'](_0x38154f,_0x212202),_0x38154f[_0x8d48('0x5')][_0x5df9b1][_0x8d48('0x2f')]*0x3e8);_0x38154f['timers'][_0x212202][_0x8d48('0x31')]=moment()[_0x8d48('0x32')](_0x8d48('0x33'));_0x38154f[_0x8d48('0x7')][_0x212202][_0x8d48('0x1c')]=_0x209205;_0x38154f[_0x8d48('0x7')][_0x212202][_0x8d48('0x34')]=_0x5df9b1;_0x38154f['timers'][_0x212202]['updateAcw']=_0x38154f[_0x8d48('0x35')][_0x8d48('0xb')](_0x38154f,_0x212202,_0x209205);})[_0x8d48('0x36')](function(){logger['error'](_0x8d48('0x2e'),_0x209205,_0x38154f[_0x8d48('0x5')][_0x5df9b1][_0x8d48('0x2f')],_0x212202,_0x5df9b1);})[_0x8d48('0x21')](function(){delete _0x38154f[_0x8d48('0x8')][_0x209205];});}catch(_0x48141f){logger['error']('[ACW][START]\x20%s',_0x48141f[_0x8d48('0x37')]);}};Acw[_0x8d48('0x19')][_0x8d48('0x30')]=function(_0x1188c9){try{var _0x2d1f5c=this;if(_0x2d1f5c[_0x8d48('0x7')][_0x1188c9]){_0x2d1f5c[_0x8d48('0x7')][_0x1188c9][_0x8d48('0x1a')]=![];var _0x27f539=_0x2d1f5c[_0x8d48('0x7')][_0x1188c9][_0x8d48('0x1c')];var _0x79d001=_0x2d1f5c[_0x8d48('0x7')][_0x1188c9][_0x8d48('0x34')];var _0x99419d=_0x2d1f5c[_0x8d48('0x5')][_0x79d001][_0x8d48('0x2f')];logger['info'](_0x8d48('0x38'),_0x27f539,_0x1188c9);RpcUser['getAgent'](this['agents'][_0x1188c9]['id'])[_0x8d48('0x1d')](function(_0xa79c3f){if(_0xa79c3f['pauseType']===_0x8d48('0x39')){return RpcUser[_0x8d48('0x3a')](_0x2d1f5c[_0x8d48('0x6')][_0x1188c9]);}});RpcVoiceAgentReport['update']({'acwtime':_0x99419d,'agentacw':!![]},_0x27f539,_0x1188c9)[_0x8d48('0x1d')](function(_0x57ae89){logger['info']('[%s][UPDATE][ACWTIME:%s]',_0x27f539,_0x99419d,_0x57ae89);})['catch'](function(_0x5f1fdc){logger[_0x8d48('0x1f')](_0x8d48('0x20'),_0x27f539,_0x5f1fdc);});}else{logger[_0x8d48('0x1f')](_0x8d48('0x3b'),_0x1188c9);if(_0x2d1f5c[_0x8d48('0x7')]){logger[_0x8d48('0x1e')](_0x8d48('0x3c'),JSON[_0x8d48('0x3d')](_0x2d1f5c['timers']));}}}catch(_0x309d20){logger[_0x8d48('0x1f')](_0x8d48('0x3e'),_0x309d20[_0x8d48('0x37')]);}};Acw[_0x8d48('0x19')]['syncAgentConnect']=function(_0x56fc01){try{if(this[_0x8d48('0x5')][_0x56fc01[_0x8d48('0x34')]]&&(this[_0x8d48('0x5')][_0x56fc01[_0x8d48('0x34')]][_0x8d48('0x3f')]||this[_0x8d48('0x5')][_0x56fc01[_0x8d48('0x34')]]['mandatoryDisposition'])){if(this['agents'][_0x56fc01[_0x8d48('0x40')]]){this[_0x8d48('0x8')][_0x56fc01[_0x8d48('0x1c')]]={'queue':_0x56fc01[_0x8d48('0x34')],'interface':_0x56fc01[_0x8d48('0x40')],'destlinkedid':_0x56fc01['destlinkedid']};}}}catch(_0x45d410){logger['error'](_0x8d48('0x41'),_0x45d410[_0x8d48('0x37')]);}};Acw[_0x8d48('0x19')][_0x8d48('0x15')]=function(_0x5e2e51){try{if(this['voiceQueues'][_0x5e2e51[_0x8d48('0x34')]]&&(this[_0x8d48('0x5')][_0x5e2e51[_0x8d48('0x34')]][_0x8d48('0x3f')]||this[_0x8d48('0x5')][_0x5e2e51[_0x8d48('0x34')]][_0x8d48('0x23')])){if(this[_0x8d48('0x6')][_0x5e2e51[_0x8d48('0x40')]]){this[_0x8d48('0x8')][_0x5e2e51['uniqueid']]={'queue':_0x5e2e51[_0x8d48('0x34')],'interface':_0x5e2e51['interface']};}}}catch(_0x265170){logger[_0x8d48('0x1f')](_0x8d48('0x42'),_0x265170[_0x8d48('0x37')]);}};Acw[_0x8d48('0x19')][_0x8d48('0xd')]=function(_0x1ee8ec){try{if(this[_0x8d48('0x8')][_0x1ee8ec['uniqueid']]&&_[_0x8d48('0x43')](this[_0x8d48('0x8')][_0x1ee8ec[_0x8d48('0x1c')]][_0x8d48('0x29')])){logger[_0x8d48('0x1e')](_0x8d48('0x44'),_0x1ee8ec['uniqueid']);this[_0x8d48('0x22')](_0x1ee8ec[_0x8d48('0x1c')]);}else if(this[_0x8d48('0x8')][_0x1ee8ec[_0x8d48('0x45')]]&&_['isUndefined'](this['channels'][_0x1ee8ec[_0x8d48('0x45')]][_0x8d48('0x29')])){logger[_0x8d48('0x1e')](_0x8d48('0x46'),_0x1ee8ec[_0x8d48('0x45')]);this['startAcw'](_0x1ee8ec['linkedid']);}}catch(_0x1ef9aa){logger[_0x8d48('0x1f')](_0x8d48('0x47'),_0x1ef9aa['message']);}};Acw['prototype'][_0x8d48('0xf')]=function(_0x125400){try{if(this[_0x8d48('0x8')][_0x125400[_0x8d48('0x1c')]]&&this[_0x8d48('0x8')][_0x125400[_0x8d48('0x1c')]][_0x8d48('0x29')]){logger[_0x8d48('0x1e')](_0x8d48('0x48'),_0x125400[_0x8d48('0x1c')]);this[_0x8d48('0x22')](_0x125400[_0x8d48('0x1c')]);}else if(this[_0x8d48('0x8')][_0x125400['linkedid']]&&this[_0x8d48('0x8')][_0x125400[_0x8d48('0x45')]][_0x8d48('0x29')]){logger[_0x8d48('0x1e')](_0x8d48('0x49'),_0x125400[_0x8d48('0x45')]);this[_0x8d48('0x22')](_0x125400[_0x8d48('0x45')]);}}catch(_0x18ff0c){logger['error']('[ACW][syncHangup]\x20%s',_0x18ff0c[_0x8d48('0x37')]);}};Acw['prototype'][_0x8d48('0x12')]=function(_0x3f5b2d){try{if(!_[_0x8d48('0x4a')](this['channels'][_0x3f5b2d[_0x8d48('0x4b')]])){this[_0x8d48('0x22')](_0x3f5b2d[_0x8d48('0x4b')]);if(this[_0x8d48('0x8')][_0x3f5b2d['secondtransfereruniqueid']]){this[_0x8d48('0x8')][_0x3f5b2d['secondtransfereruniqueid']][_0x8d48('0x29')]=!![];this[_0x8d48('0x8')][_0x3f5b2d[_0x8d48('0x4c')]]=this[_0x8d48('0x8')][_0x3f5b2d[_0x8d48('0x4d')]];delete this[_0x8d48('0x8')][_0x3f5b2d[_0x8d48('0x4d')]];}}else if(!_[_0x8d48('0x4a')](this[_0x8d48('0x8')][_0x3f5b2d['transfertargetuniqueid']])){this[_0x8d48('0x22')](_0x3f5b2d[_0x8d48('0x4c')]);if(this[_0x8d48('0x8')][_0x3f5b2d[_0x8d48('0x4e')]]){this['channels'][_0x3f5b2d[_0x8d48('0x4e')]][_0x8d48('0x29')]=!![];this[_0x8d48('0x8')][_0x3f5b2d['transfereeuniqueid']]=this[_0x8d48('0x8')][_0x3f5b2d[_0x8d48('0x4e')]];delete this[_0x8d48('0x8')][_0x3f5b2d[_0x8d48('0x4e')]];}}}catch(_0x44a6b7){logger[_0x8d48('0x1f')](_0x8d48('0x4f'),_0x44a6b7['message']);}};Acw[_0x8d48('0x19')][_0x8d48('0x13')]=function(_0x15d513){try{if(this[_0x8d48('0x8')][_0x15d513[_0x8d48('0x50')]]){logger['info'](_0x8d48('0x51'),JSON['stringify'](_0x15d513[_0x8d48('0x50')]));this[_0x8d48('0x22')](_0x15d513[_0x8d48('0x50')]);}else if(this[_0x8d48('0x8')][_0x15d513[_0x8d48('0x52')]]){logger[_0x8d48('0x1e')](_0x8d48('0x53'),JSON['stringify'](_0x15d513[_0x8d48('0x52')]));this['startAcw'](_0x15d513['transfererlinkedid']);}}catch(_0x520b80){logger[_0x8d48('0x1f')](_0x8d48('0x54'),_0x520b80[_0x8d48('0x37')]);}};Acw['prototype'][_0x8d48('0x10')]=function(_0x16395c){try{if(this['voiceQueues'][_0x16395c[_0x8d48('0x34')]]&&this[_0x8d48('0x5')][_0x16395c['queue']][_0x8d48('0x55')]===_0x8d48('0x56')){if(this['agents'][_0x16395c[_0x8d48('0x40')]]){logger[_0x8d48('0x1e')](_0x8d48('0x57'),_0x16395c['uniqueid'],_0x16395c[_0x8d48('0x40')],_0x16395c[_0x8d48('0x34')]);return RpcUser[_0x8d48('0x2b')](this[_0x8d48('0x6')][_0x16395c[_0x8d48('0x40')]],_0x8d48('0x58'),_0x16395c['uniqueid']);}}}catch(_0x556d66){logger[_0x8d48('0x1f')](_0x8d48('0x59'),_0x556d66[_0x8d48('0x37')]);}};module[_0x8d48('0x5a')]=Acw;
\ No newline at end of file
index 5417585..f3bbec0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xea48=['actionQueueSummary','actionCoreShowChannels','coreshowchannels','Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s','once','close','connect','shutdown','Shutdown\x20\x22%s\x22\x20to\x20%s:%s\x20with:\x0a%s','Fullybooted\x20\x22%s\x22\x20to\x20%s:%s','resolve','then','[ami.js][fullybooted]','asterisk-manager','bluebird','../../config/logger','../../config/environment','port','asterisk','username','password','promisify','error','format','inspect','Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s','actionSipShowRegistry','Action','sipshowregistry','actionDeviceStateList','actionSipPeerStatus','sippeerstatus'];(function(_0x11499e,_0x301066){var _0x4244dc=function(_0xb73a7b){while(--_0xb73a7b){_0x11499e['push'](_0x11499e['shift']());}};_0x4244dc(++_0x301066);}(_0xea48,0xcd));var _0x8ea4=function(_0x285de3,_0x11d144){_0x285de3=_0x285de3-0x0;var _0x1482d5=_0xea48[_0x285de3];return _0x1482d5;};'use strict';var Manager=require(_0x8ea4('0x0'));var BPromise=require(_0x8ea4('0x1'));var util=require('util');var logger=require(_0x8ea4('0x2'))('ami');var config=require(_0x8ea4('0x3'));var ami=new Manager(config['asterisk'][_0x8ea4('0x4')],config[_0x8ea4('0x5')]['ip'],config[_0x8ea4('0x5')][_0x8ea4('0x6')],config[_0x8ea4('0x5')][_0x8ea4('0x7')],!![]);ami['keepConnected']();ami['Action']=BPromise[_0x8ea4('0x8')](ami['action']);function error(_0xa08829){logger[_0x8ea4('0x9')](util[_0x8ea4('0xa')]('Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s',config[_0x8ea4('0x5')][_0x8ea4('0x6')],config['asterisk']['ip'],config[_0x8ea4('0x5')][_0x8ea4('0x4')],util[_0x8ea4('0xb')](_0xa08829,![],null)));}function close(){logger[_0x8ea4('0x9')](util[_0x8ea4('0xa')](_0x8ea4('0xc'),config[_0x8ea4('0x5')][_0x8ea4('0x6')],config[_0x8ea4('0x5')]['ip'],config['asterisk'][_0x8ea4('0x4')]));}ami[_0x8ea4('0xd')]=function(){return function(){return ami[_0x8ea4('0xe')]({'action':_0x8ea4('0xf')});};};ami[_0x8ea4('0x10')]=function(){return function(){return ami[_0x8ea4('0xe')]({'action':'devicestatelist'});};};ami[_0x8ea4('0x11')]=function(){return function(){return ami['Action']({'action':_0x8ea4('0x12')});};};ami[_0x8ea4('0x13')]=function(){return function(){return ami[_0x8ea4('0xe')]({'action':'queuesummary'});};};ami[_0x8ea4('0x14')]=function(){return function(){return ami[_0x8ea4('0xe')]({'action':_0x8ea4('0x15')});};};function connect(){logger['info'](util[_0x8ea4('0xa')](_0x8ea4('0x16'),config[_0x8ea4('0x5')][_0x8ea4('0x6')],config[_0x8ea4('0x5')]['ip'],config[_0x8ea4('0x5')][_0x8ea4('0x4')]));ami[_0x8ea4('0x17')](_0x8ea4('0x9'),error);ami[_0x8ea4('0x17')](_0x8ea4('0x18'),close);}ami['on'](_0x8ea4('0x19'),connect);ami['on'](_0x8ea4('0x1a'),function(_0x316794){logger['info'](util[_0x8ea4('0xa')](_0x8ea4('0x1b'),config['asterisk'][_0x8ea4('0x6')],config[_0x8ea4('0x5')]['ip'],config[_0x8ea4('0x5')]['port'],util[_0x8ea4('0xb')](_0x316794,![],null)));});ami['on']('fullybooted',function(){logger['info'](util[_0x8ea4('0xa')](_0x8ea4('0x1c'),config['asterisk'][_0x8ea4('0x6')],config[_0x8ea4('0x5')]['ip'],config[_0x8ea4('0x5')]['port']));return Promise[_0x8ea4('0x1d')]()['then'](ami[_0x8ea4('0xd')]())[_0x8ea4('0x1e')](ami[_0x8ea4('0x10')]())[_0x8ea4('0x1e')](ami['actionSipPeerStatus']())[_0x8ea4('0x1e')](ami[_0x8ea4('0x13')]())[_0x8ea4('0x1e')](ami[_0x8ea4('0x14')]())['catch'](function(_0xd6b90e){logger['error'](_0x8ea4('0x1f'),util[_0x8ea4('0xb')](_0xd6b90e,{'showHidden':![],'depth':null}));});});ami[_0x8ea4('0x17')](_0x8ea4('0x9'),error);ami[_0x8ea4('0x17')](_0x8ea4('0x18'),close);module['exports']=ami;
\ No newline at end of file
+var _0x0993=['util','../../config/logger','../../config/environment','asterisk','port','username','password','keepConnected','Action','promisify','action','Manager\x20\x22%s\x22\x20error\x20to\x20%s:%s\x20with:\x0a%s','inspect','error','format','actionSipShowRegistry','actionDeviceStateList','actionSipPeerStatus','sippeerstatus','actionQueueSummary','queuesummary','coreshowchannels','info','Manager\x20\x22%s\x22\x20logged\x20on\x20to\x20%s:%s','once','close','connect','shutdown','Shutdown\x20\x22%s\x22\x20to\x20%s:%s\x20with:\x0a%s','fullybooted','then','actionCoreShowChannels','catch','[ami.js][fullybooted]','exports','asterisk-manager','bluebird'];(function(_0x399a78,_0x52eeaf){var _0x470783=function(_0x2740a4){while(--_0x2740a4){_0x399a78['push'](_0x399a78['shift']());}};_0x470783(++_0x52eeaf);}(_0x0993,0x6d));var _0x3099=function(_0x47e708,_0x96a881){_0x47e708=_0x47e708-0x0;var _0x3829ec=_0x0993[_0x47e708];return _0x3829ec;};'use strict';var Manager=require(_0x3099('0x0'));var BPromise=require(_0x3099('0x1'));var util=require(_0x3099('0x2'));var logger=require(_0x3099('0x3'))('ami');var config=require(_0x3099('0x4'));var ami=new Manager(config[_0x3099('0x5')][_0x3099('0x6')],config[_0x3099('0x5')]['ip'],config[_0x3099('0x5')][_0x3099('0x7')],config[_0x3099('0x5')][_0x3099('0x8')],!![]);ami[_0x3099('0x9')]();ami[_0x3099('0xa')]=BPromise[_0x3099('0xb')](ami[_0x3099('0xc')]);function error(_0x23dc47){logger['error'](util['format'](_0x3099('0xd'),config[_0x3099('0x5')][_0x3099('0x7')],config[_0x3099('0x5')]['ip'],config[_0x3099('0x5')][_0x3099('0x6')],util[_0x3099('0xe')](_0x23dc47,![],null)));}function close(){logger[_0x3099('0xf')](util[_0x3099('0x10')]('Manager\x20\x22%s\x22\x20closed\x20to\x20%s:%s',config[_0x3099('0x5')][_0x3099('0x7')],config['asterisk']['ip'],config[_0x3099('0x5')]['port']));}ami[_0x3099('0x11')]=function(){return function(){return ami['Action']({'action':'sipshowregistry'});};};ami[_0x3099('0x12')]=function(){return function(){return ami[_0x3099('0xa')]({'action':'devicestatelist'});};};ami[_0x3099('0x13')]=function(){return function(){return ami[_0x3099('0xa')]({'action':_0x3099('0x14')});};};ami[_0x3099('0x15')]=function(){return function(){return ami['Action']({'action':_0x3099('0x16')});};};ami['actionCoreShowChannels']=function(){return function(){return ami[_0x3099('0xa')]({'action':_0x3099('0x17')});};};function connect(){logger[_0x3099('0x18')](util[_0x3099('0x10')](_0x3099('0x19'),config[_0x3099('0x5')][_0x3099('0x7')],config[_0x3099('0x5')]['ip'],config[_0x3099('0x5')][_0x3099('0x6')]));ami[_0x3099('0x1a')](_0x3099('0xf'),error);ami[_0x3099('0x1a')](_0x3099('0x1b'),close);}ami['on'](_0x3099('0x1c'),connect);ami['on'](_0x3099('0x1d'),function(_0x4782c6){logger[_0x3099('0x18')](util[_0x3099('0x10')](_0x3099('0x1e'),config[_0x3099('0x5')][_0x3099('0x7')],config[_0x3099('0x5')]['ip'],config['asterisk'][_0x3099('0x6')],util[_0x3099('0xe')](_0x4782c6,![],null)));});ami['on'](_0x3099('0x1f'),function(){logger['info'](util[_0x3099('0x10')]('Fullybooted\x20\x22%s\x22\x20to\x20%s:%s',config[_0x3099('0x5')][_0x3099('0x7')],config['asterisk']['ip'],config[_0x3099('0x5')][_0x3099('0x6')]));return Promise['resolve']()['then'](ami[_0x3099('0x11')]())['then'](ami[_0x3099('0x12')]())['then'](ami[_0x3099('0x13')]())[_0x3099('0x20')](ami['actionQueueSummary']())['then'](ami[_0x3099('0x21')]())[_0x3099('0x22')](function(_0x7220c2){logger[_0x3099('0xf')](_0x3099('0x23'),util['inspect'](_0x7220c2,{'showHidden':![],'depth':null}));});});ami[_0x3099('0x1a')](_0x3099('0xf'),error);ami['once'](_0x3099('0x1b'),close);module[_0x3099('0x24')]=ami;
\ No newline at end of file
index 2073730..afe5537 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe706=['result','catch','exports','jayson/promise','bluebird','../../config/logger','client','http','Request','request','then','debug','rpc','memberReport','error','message'];(function(_0x28b0a1,_0x99bd0a){var _0x21470c=function(_0x45bf01){while(--_0x45bf01){_0x28b0a1['push'](_0x28b0a1['shift']());}};_0x21470c(++_0x99bd0a);}(_0xe706,0xa3));var _0x6e70=function(_0x35027c,_0x4af623){_0x35027c=_0x35027c-0x0;var _0x4bba7d=_0xe706[_0x35027c];return _0x4bba7d;};'use strict';var jayson=require(_0x6e70('0x0'));var BPromise=require(_0x6e70('0x1'));var logger=require(_0x6e70('0x2'))('ami');var client=jayson[_0x6e70('0x3')][_0x6e70('0x4')]({'port':0x2329});client[_0x6e70('0x5')]=function(_0x7dfbc3,_0x142c27){return new BPromise(function(_0x2164a4,_0x376a8d){return client[_0x6e70('0x6')](_0x7dfbc3,_0x142c27)[_0x6e70('0x7')](function(_0x4381d1){logger[_0x6e70('0x8')](_0x6e70('0x9'),_0x6e70('0xa'),_0x7dfbc3,_0x142c27,_0x4381d1);if(_0x4381d1[_0x6e70('0xb')]){logger[_0x6e70('0xb')](_0x6e70('0x9'),_0x6e70('0xa'),_0x7dfbc3,_0x4381d1[_0x6e70('0xb')][_0x6e70('0xc')],_0x142c27);return _0x376a8d(_0x4381d1[_0x6e70('0xb')][_0x6e70('0xc')]);}else{return _0x2164a4(_0x4381d1[_0x6e70('0xd')]);}})[_0x6e70('0xe')](function(_0x4600f9){logger['error']('rpc',_0x6e70('0xa'),_0x7dfbc3,_0x4600f9,_0x142c27);return _0x376a8d(_0x4600f9);});});};module[_0x6e70('0xf')]=client;
\ No newline at end of file
+var _0xaa88=['bluebird','../../config/logger','ami','http','Request','rpc','memberReport','error','message','result','catch','jayson/promise'];(function(_0x4c9472,_0x2a6a24){var _0x29e182=function(_0x2701c6){while(--_0x2701c6){_0x4c9472['push'](_0x4c9472['shift']());}};_0x29e182(++_0x2a6a24);}(_0xaa88,0x137));var _0x8aa8=function(_0x3f465d,_0xbd2037){_0x3f465d=_0x3f465d-0x0;var _0x121ad1=_0xaa88[_0x3f465d];return _0x121ad1;};'use strict';var jayson=require(_0x8aa8('0x0'));var BPromise=require(_0x8aa8('0x1'));var logger=require(_0x8aa8('0x2'))(_0x8aa8('0x3'));var client=jayson['client'][_0x8aa8('0x4')]({'port':0x2329});client[_0x8aa8('0x5')]=function(_0x43f7e4,_0x3b2c88){return new BPromise(function(_0x3e3b70,_0x350e8b){return client['request'](_0x43f7e4,_0x3b2c88)['then'](function(_0x460042){logger['debug'](_0x8aa8('0x6'),_0x8aa8('0x7'),_0x43f7e4,_0x3b2c88,_0x460042);if(_0x460042[_0x8aa8('0x8')]){logger[_0x8aa8('0x8')]('rpc',_0x8aa8('0x7'),_0x43f7e4,_0x460042[_0x8aa8('0x8')][_0x8aa8('0x9')],_0x3b2c88);return _0x350e8b(_0x460042['error'][_0x8aa8('0x9')]);}else{return _0x3e3b70(_0x460042[_0x8aa8('0xa')]);}})[_0x8aa8('0xb')](function(_0x33cc5c){logger['error'](_0x8aa8('0x6'),_0x8aa8('0x7'),_0x43f7e4,_0x33cc5c,_0x3b2c88);return _0x350e8b(_0x33cc5c);});});};module['exports']=client;
\ No newline at end of file
index e84f01e..622702f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf213=['XMD-AMDAFTERGREETINGSILENCE','XMD-AMDTOTALANALYSISTIME','dialAMDTotalAnalysisTime','XMD-AMDMINWORDLENGTH','dialAMDMinWordLength','XMD-AMDBETWEENWORDSSILENCE','dialAMDBetweenWordsSilence','XMD-AMDSILENCETHRESHOLD','dialAMDSilenceThreshold','XMD-AMDMAXIMUMWORDLENGTH','isOutboundQueue','XMD-VOICEQUEUEID','XMD-CAMPAIGNID','setXMDContactVariables','Contact','getCallerId','callerid','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','originatecalleridname','XMD-ORIGINATECALLERIDNUM','variables','SIP/%s/%s%s','trim','dialCutDigit','dialPrefix','substring','xcally-motion-dialer','from-sip','dialOriginateTimeout','outboundOriginateFailureCallsDay','[originateError]:\x20%s','OriginateError','[originate][error]','originate\x20action\x20Error','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','[rescheduleContact][NoAnswer]','dialBusyMaxRetry','dialCongestionMaxRetry','dialCongestionRetryFrequency','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','[rescheduleContact][NoSuchNumber]','dialDropRetryFrequency','dialAgentRejectRetryFrequency','[callProgressDetecting]','evt\x20is\x20undefine','reason','outboundNoSuchCallsDay','NoSuchNumber','custom:agentnosuchnumber','nosuchnumber','checkRetriveMax','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','NoAnswer','buildNoAnswerEventPayload','[syncAgentComplete][createHistory][3]','reason\x203\x20ringing\x20no\x20answer','outboundBusyCallsDay','Busy','busy','dialBusyRetryFrequency','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','Congestion','custom:agentcongestion','congestion','reason\x208\x20congestion','reason\x2011\x20abandoned','outboundRejectCallsDay','AgentReject','custom:agentreject','agentreject','[syncAgentComplete][createHistory][20]','dialAgentRejectMaxRetry','reason\x2020\x20agentreject','[moveContactManagedDialer][0]','contact\x20not\x20moved','predictive','dialPredictiveOptimizationPercentage','round','predictiveIntervalAvailable','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','[startMethodPredictive][StartProgressive]','check\x20predictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','dialPredictiveOptimization','dropRate','Drop\x20in\x20this\x20interval','getDataPredictive','startMethodPredictive','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','avgHandleTime','Predictive\x20for\x20every\x20interval',')\x20are\x20less\x20than\x20threshold\x20(','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20more\x20than\x20threshold\x20(','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalHitRate','abandonmentRate','busyFactor','[getDataPredictive]','getDataPredictiveOld','loggedIn','outboundQueuePauses','predictiveIntervalPauses','[CatchErlangB]','floor','one\x20call\x20every:','milliseconds','fail\x20to\x20scheduled\x20calls','checkContactBlack','recallme','[booked][checkContactBlack]','queueStatusComplete:\x20','Queue:\x20','queuestatus','[unlockOriginate][syncQueueStatusComplete]','scheduledat','dialRecallMeTimeout','voicePause','unlockContact','outboundReCallsDay','dialRecallInQueue','QUEUE_RECALL','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','RecallFailedTimeout','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','BLACKLIST','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','inBlackList','limitCalls','maxNumberOriginate','NO_AVAILABLE_CONTACTS','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','[actionOriginate]\x20','[actionOriginateIvr]\x20','[getContactCampaign2]','dialLimitQueue','not_inuse','getContactDialer','checkContactEmpty','countReScheduled','[countReScheduled]\x20','checkIsBlackList','[getContactDialer2]','tryOriginatePredictive','[handlePredictive][limitChannel]','dialOrderByScheduledAt','[actionOriginatePredictive]\x20','--------\x20Drop\x20Rate\x20--------','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[abandonmentRate]','Ts\x20=\x20','p\x20=\x20','erlangb','----\x20Agent\x20Busy\x20Factor\x20----','Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','m\x20=\x20','[busyFactor]','interval\x20=\x20','Umin\x20=\x20','exports','util','lodash','uuid','moment','ioredis','./utils/hopper','../preview/util/util','../../../config/environment/','../../../config/logger','dialer','booked','syncQueueSummary','redis','defaults','../rpc/cmHopper','../rpc/voiceQueueRt','../rpc/setting','../rpc/interval','./models/action','./models/history','./models/final','./models/hangup','env','XCALLY_IP_AGI','127.0.0.1','prototype','tail','finally','sequence','preview','voiceQueues','campaigns','trunks','contactsId','uniqueId','optionPredictive','startPredictive','startProgressive','ivrOriginated','queueBooked','queueBookedRR','queuesSummary','agentconnect','syncAgentConnect','bind','queuecallerabandon','originateresponse','syncOriginateResponse','agentcomplete','syncAgentComplete','custom:queuesummary','custom:queuesummarycomplete','syncQueueSummaryComplete','syncHangup','newexten','syncNewExten','syncVarSet','queuemember','syncQueueMember','queuestatuscomplete','syncQueueStatusComplete','loopClearZombieChannels','getSettings','then','previewRecallmeReminderInterval','isUndefined','emit','type','debug','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','inspect','format','voice:queue:%s','name','voice_queue:save','isEmpty','info','-----\x20Stats\x20Predictive\x20---','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalTotalCalls','Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAnsweredCalls','Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgHoldtime','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalAvgTalktime','---------------------------','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','---------\x20ErlangB\x20---------','Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCalls','erlangCallToSecond','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangBusyFactor','merge','getSeconds','startProgressive\x20value\x20cleared','startPredictive\x20value\x20cleared','handlePredictive','error','checkContactLowerLimitOriginate','temp','contactsRescheduled','CAMPAIGN_STATUS','CONTACTS_RESCHEDULED','contacts','message','[getContactDialer2][Empty]','statedesc','starttime','queueStatusComplete','[unlockQueueStatus][undefined]','stringify','Interval','NULL_INTERVAL','\x20INTERVAL_IS_NULL','Intervals','isIVRCampaignActive','\x20NOT\x20Active','isIVRCampaign','campaign:ivr:%s','campaign:save','sendMessageOneNotActive','originated','INACTIVE','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20not\x20active','DISACTIVED','is\x20disactive','[ifTime][Action]','isTrunkReachable','active','SIP/%s','status','reachable','unmonitored','checkIsTrunkReachable','Trunk','TrunkBackup','TRUNK_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','checkIfTime','ifTimeIvr','checkIfTimeIntervals','ifTime','\x20Intervals\x20is\x20null\x20','EMPTY_INTERVAL','\x20Intervals\x20is\x20empty\x20','timezones','UNKNOWN_TIMEZONE','Failure','\x20Timezone\x20unknow\x20','isArray','length','push','Action','command','iftime\x20%s,%s','interval','content','indexOf','true','catch','all','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','loopCampaigns','resetActiveCalls','undefined','dialGlobalInterval','dialTimezone','launchHandleIvr','[syncCampaigns]','checkDialMethod','dialMethod','progressive','handlePower','power','Queue','method\x20not\x20recognized','silly','Dialer::ifTime()','OVERTIME_INTERVAL','Timezone:\x20','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','isGlobal','AMI\x20IfTime','Error','queue','uniqueid','ivr','updateOriginated','answertime','YYYY-MM-DD\x20HH:mm:ss','outboundAnswerCallsDay','agent','agiafterat','dialQueueProject2','createHistory','moveContactManagedDialer','[syncAgentComplete]','syncQueueCallerAbandon','droptime','responsetime','dialQueueTimeout','predictiveIntervalDroppedCallsTimeout','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','Drop','dropreason','countdropretry','countglobal','callAdditionalPhoneAfterMin','verifyAdditionalPhones','voiceQueue','additional','dialDropMaxRetry','queueCallerAbandonCreateState','rescheduleContact','add','minutes','ContactId','ListId','VoiceQueueId','CampaignId','[rescheduleContact][Drop]','state','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','swapAdditionalPhones','countabandonedretry','dialAbandonedRetryFrequency','dialAbandonedMaxRetry','[rescheduleContact][Abandoned]','Abandoned','endtime','[syncAgentComplete][createHistory][11]','actions','channel','actionid','strategy','rrmemory','roundrobin','isNil','locked','agents','stateinterface','paused','idHopper','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','_rr','unlockRR','[booked][RR]','Agent:\x20','pick','contactAgent-idHopper:\x20','run','[booked][unlock2]','[unlock2][syncQueueStatusComplete]','[unlock3][syncQueueStatusComplete]','getQueue','response','Success','callProgressDetecting','[callProgressDetecting]\x20','variable','amdstatus','exten','dialAMDActive','value','HANGUP','outboundAnswerAgiCallsDay','membername','AMD','custom:amd','buildObj','amd','saveInDb','[syncHangupInAMD][createHistory]','MACHINE','Machine','countmachineretry','countbusyretry','countnoanswerretry','countnosuchnumberretry','dialGlobalMaxRetry','stateGlobal','dialMachineMaxRetry','createStateFinal','reason\x2019\x20machine....','[rescheduleContact][Machine]','HangupInAMD','[syncHangupInAMDIvr][createHistory]','[syncHangupInAMDIvr]','[syncAgentComplete][createHistory][0]','countcongestionretry','countagentrejectretry','reason19\x20machine....','dialMachineRetryFrequency','ivrAnswerCallsDay','dialQueueProject','AnswerAGI','AGI','cause-txt','Normal\x20Clearing','[syncAgentComplete][createHistory]','outboundUnknownCallsDay','[syncHangupIvr][createHistory]','[syncHangupIvr]','running','isPreviewCampaign','statusMessage','getQueueCampaignStatusMessage','resolve','available','talking','pTalking','ACTIVE','[syncQueueSummary]','compareToOutboundQueue','queueSummaryCountersUpdated','updateReportFromOutboundQueue','assign','throttle','dialPreviewRecallmeReminder','filter','online','map','Agent','user:%s','user:dialPreviewRecallReminder','checkPreviewRecallReminder','clearZombieChannels','[uniqueid]','[actions]','No\x20such\x20channel','[Dialer][checkChannel]','[Dialer][checkChannel][ivr]','getVoiceQueueRtPauses','[getVoiceQueueRtPauses]\x20','[updateOriginated]\x20object\x20originated\x20is\x20negative','loggerHandler','emptyContact','notFound','UserId','[emptyContact][createHistory]','[emptyContact]','[syncQueueCallerAbandon]\x20[Drop]','handlePreviewRecallNotifications','actionOriginate','object','voiceQueue\x20is\x20undefine','phone','originate','contact\x20is\x20undefine','getCaller','\x22agi://%s/square,%s\x22','NONE','\x22%s,%s%s,,,%s\x22','dialAgiAfterHangupAgent','XMD-AMDINITIALSILENCE','dialAMDInitialSilence','XMD-AMDGREETING','dialAMDGreeting'];(function(_0x6c09ff,_0x5bb501){var _0x3230ae=function(_0x42ee03){while(--_0x42ee03){_0x6c09ff['push'](_0x6c09ff['shift']());}};_0x3230ae(++_0x5bb501);}(_0xf213,0xb5));var _0x3f21=function(_0x275592,_0x48f004){_0x275592=_0x275592-0x0;var _0x5c474f=_0xf213[_0x275592];return _0x5c474f;};'use strict';var util=require(_0x3f21('0x0'));var _=require(_0x3f21('0x1'));var uuid=require(_0x3f21('0x2'));var moment=require(_0x3f21('0x3'));var rr=require('rr');var Redis=require(_0x3f21('0x4'));var utils=require('./utils');var hopperUtils=require(_0x3f21('0x5'));var ut=require(_0x3f21('0x6'));var config=require(_0x3f21('0x7'));var logger=require(_0x3f21('0x8'))(_0x3f21('0x9'));var loggerBooked=require('../../../config/logger')(_0x3f21('0xa'));var loggerPredictive=require(_0x3f21('0x8'))('predictive');var loggerPredictiveCalls=require(_0x3f21('0x8'))('predictiveCalls');var loggerSyncQueueSummary=require(_0x3f21('0x8'))(_0x3f21('0xb'));var ami=require('../ami');config[_0x3f21('0xc')]=_[_0x3f21('0xd')](config[_0x3f21('0xc')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x3f21('0xc')]));var cmHopper=require(_0x3f21('0xe'));var voiceQueueRt=require(_0x3f21('0xf'));var RpcSetting=require(_0x3f21('0x10'));var Interval=require(_0x3f21('0x11'));var Action=require(_0x3f21('0x12'));var History=require(_0x3f21('0x13'));var Final=require(_0x3f21('0x14'));var AgentComplete=require('./models/agentComplete');var QueueCallerAbandon=require('./models/queueCallerAbandon');var Hangup=require(_0x3f21('0x15'));var ipAgi=process[_0x3f21('0x16')][_0x3f21('0x17')]||_0x3f21('0x18');var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence[_0x3f21('0x19')]['enqueue']=function(_0x1712b1){this[_0x3f21('0x1a')]=this[_0x3f21('0x1a')]?this[_0x3f21('0x1a')][_0x3f21('0x1b')](_0x1712b1):_0x1712b1();};function Dialer(_0x5ead32,_0x4c9c2c){this[_0x3f21('0x1c')]=new Sequence();this[_0x3f21('0x1d')]=_0x4c9c2c;this[_0x3f21('0x1e')]=_0x5ead32[_0x3f21('0x1e')];this['campaigns']=_0x5ead32[_0x3f21('0x1f')];this['agents']=_0x5ead32['agents'];this[_0x3f21('0x20')]=_0x5ead32[_0x3f21('0x20')];this['maxNumberOriginate']=config['maxNumberOriginate']||0x2;this['channels']={};this['actions']={};this[_0x3f21('0x21')]={};this[_0x3f21('0x22')]={};this[_0x3f21('0x23')]={};this[_0x3f21('0x24')]={};this[_0x3f21('0x25')]={};this[_0x3f21('0x26')]={};this[_0x3f21('0x27')]={};this[_0x3f21('0x28')]={};this[_0x3f21('0x29')]={};ami['on'](_0x3f21('0x2a'),this[_0x3f21('0x2b')][_0x3f21('0x2c')](this));ami['on'](_0x3f21('0x2d'),this['syncQueueCallerAbandon']['bind'](this));ami['on'](_0x3f21('0x2e'),this[_0x3f21('0x2f')][_0x3f21('0x2c')](this));ami['on'](_0x3f21('0x30'),this[_0x3f21('0x31')][_0x3f21('0x2c')](this));ami['on'](_0x3f21('0x32'),this[_0x3f21('0xb')][_0x3f21('0x2c')](this));ami['on'](_0x3f21('0x33'),this[_0x3f21('0x34')][_0x3f21('0x2c')](this));ami['on']('hangup',this[_0x3f21('0x35')]['bind'](this));ami['on'](_0x3f21('0x36'),this[_0x3f21('0x37')]['bind'](this));ami['on']('varset',this[_0x3f21('0x38')][_0x3f21('0x2c')](this));ami['on'](_0x3f21('0x39'),this[_0x3f21('0x3a')][_0x3f21('0x2c')](this));ami['on'](_0x3f21('0x3b'),this[_0x3f21('0x3c')][_0x3f21('0x2c')](this));this['loopCampaigns']();this[_0x3f21('0x3d')]();RpcSetting[_0x3f21('0x3e')]()[_0x3f21('0x3f')](function(_0x4f793c){previewRecallmeReminderInterval=_0x4f793c[_0x3f21('0x40')];});}function isNotNull(_0x19db8f){return _0x19db8f!==null&&!_[_0x3f21('0x41')](_0x19db8f);}function msgResponse(_0x254f14,_0xfe76e9,_0x3c1ece){return{'action':_0x254f14,'response':_0xfe76e9,'message':_0x3c1ece,'stack':_0x3c1ece};}function emit(_0x3ed6fa,_0x58beeb,_0x5c5ad9){io['to'](_0x3ed6fa)[_0x3f21('0x42')](_0x58beeb,_0x5c5ad9);}function emitOutboundVoiceQueueSummary(_0x6c32b1){if(_0x6c32b1[_0x3f21('0x43')]==='outbound'){logger[_0x3f21('0x44')](_0x3f21('0x45'),util[_0x3f21('0x46')](_0x6c32b1,{'showHidden':![],'depth':null}));emit(util[_0x3f21('0x47')](_0x3f21('0x48'),_0x6c32b1[_0x3f21('0x49')]),_0x3f21('0x4a'),_0x6c32b1);}}function checkGetDataPredictive(_0x3d783b){if(isNotNull(_0x3d783b)&&!_[_0x3f21('0x4b')](_0x3d783b)){loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x4d'));loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x4e'),_0x3d783b[_0x3f21('0x4f')]);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x50'),_0x3d783b[_0x3f21('0x51')]);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x52'),_0x3d783b['predictiveIntervalDroppedCallsTimeout']);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x53'),_0x3d783b['predictiveIntervalDroppedCallsCallersExit']);loggerPredictive[_0x3f21('0x4c')]('AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x3d783b[_0x3f21('0x54')]);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x55'),_0x3d783b[_0x3f21('0x56')]);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x57'));if(_0x3d783b['predictiveIntervalTotalCalls']>0x0){if(!_[_0x3f21('0x41')](_0x3d783b['predictiveIntervalAvgTalktime'])&&_0x3d783b[_0x3f21('0x56')]>0x0){return!![];}loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x58'));if(!_[_0x3f21('0x41')](_0x3d783b[_0x3f21('0x54')])&&_0x3d783b[_0x3f21('0x54')]>0x0){return!![];}loggerPredictive['info']('Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive');}else{loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x59'));}}else{loggerPredictive[_0x3f21('0x4c')]('History\x20information\x20are\x20empty');}return![];}function mergeDataErlangB(_0x21afce){return function(_0x4e262f){loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x5a'));loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x5b'),_0x4e262f[_0x3f21('0x5c')]);loggerPredictive['info']('One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x4e262f[_0x3f21('0x5d')]);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x5e'),_0x4e262f['erlangAbandonmentRate']);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x5f'),_0x4e262f[_0x3f21('0x60')]);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x5e'),_0x4e262f['erlangAbandonmentRate']);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x57'));_[_0x3f21('0x61')](_0x21afce,_0x4e262f);};}function ifInterval(_0x46d719,_0xe8a403){if(_[_0x3f21('0x41')](_0xe8a403)){return![];}return utils[_0x3f21('0x62')](undefined,_0xe8a403)<_0x46d719*0x3c;}function clearPredictiveAttributes(_0x2979e9){if(_0x2979e9[_0x3f21('0x25')]){_0x2979e9[_0x3f21('0x25')]=undefined;loggerPredictive['debug'](_0x2979e9['name'],_0x3f21('0x63'));}if(_0x2979e9[_0x3f21('0x24')]){_0x2979e9[_0x3f21('0x24')]=undefined;loggerPredictive[_0x3f21('0x44')](_0x2979e9[_0x3f21('0x49')],_0x3f21('0x64'));}if(_0x2979e9[_0x3f21('0x65')]){clearInterval(_0x2979e9[_0x3f21('0x65')]);_0x2979e9[_0x3f21('0x65')]=undefined;loggerPredictive[_0x3f21('0x44')](_0x2979e9[_0x3f21('0x49')],'handlePredictive\x20interval\x20cleared');}}function loggerCatchPredictive(_0x2065a7,_0x6f36a4){return function(_0x3e83e2){loggerPredictive[_0x3f21('0x66')](_0x6f36a4['name'],_0x2065a7);loggerPredictive['error'](_0x3e83e2['stack']);clearPredictiveAttributes(_0x6f36a4);};}function loggerCatch(_0x260e75){return function(_0x7dc621){logger[_0x3f21('0x66')](_0x260e75,util[_0x3f21('0x46')](_0x7dc621,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x307ca9,_0x19119f,_0x4d469b){return function(_0x1d6acf){utils[_0x3f21('0x67')](_0x19119f,_0x4d469b,0x0);_0x19119f[_0x3f21('0x68')]=0x0;logger[_0x3f21('0x66')](_0x307ca9,util['inspect'](_0x1d6acf,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x5deb85){return function(_0x4b6fdf){if(isNotNull(_0x4b6fdf)&&isNotNull(_0x4b6fdf[0x0])){if(_0x4b6fdf[0x0][_0x3f21('0x69')]>0x0){_0x5deb85['message']=utils[_0x3f21('0x6a')][_0x3f21('0x6b')];logger[_0x3f21('0x4c')]('[getContactDialer2][ReScheduled]'+_0x5deb85[_0x3f21('0x49')],_0x4b6fdf[0x0][_0x3f21('0x69')],_0x3f21('0x6c'));}else{_0x5deb85[_0x3f21('0x6d')]=utils[_0x3f21('0x6a')]['NO_AVAILABLE_CONTACTS'];logger['info'](_0x3f21('0x6e')+_0x5deb85['name']);}}};}function createObjHistory(_0x372588,_0xe48aa1,_0x1f33d9,_0x44fd99,_0x39a627){_0x372588['message']=_0x1f33d9;var _0x27585f=new Action(_0x372588,_0xe48aa1);var _0x4efbb9=new History(_0x27585f);_0x4efbb9['state']=_0x44fd99;_0x4efbb9[_0x3f21('0x6f')]=_0x39a627;_0x4efbb9['endtime']=_0x27585f[_0x3f21('0x70')];return _0x4efbb9;}function unlockQueueStatus(_0x4b04eb,_0x575819){setTimeout(function(){if(_[_0x3f21('0x41')](_0x4b04eb[_0x3f21('0x71')])){loggerBooked['error'](_0x3f21('0x72'),_0x575819);}_0x4b04eb['queueStatusComplete']=!![];loggerBooked[_0x3f21('0x4c')]('[booked][unlockQueueStatus]',_0x575819,JSON[_0x3f21('0x73')](_['pick'](_0x4b04eb,[_0x3f21('0x49'),_0x3f21('0x71')])));},0x1f3);}function checkInterval(_0x14e6b8){return function(){if(!isNotNull(_0x14e6b8[_0x3f21('0x74')])){_0x14e6b8[_0x3f21('0x6d')]=utils[_0x3f21('0x6a')][_0x3f21('0x75')];throw _0x14e6b8[_0x3f21('0x49')]+_0x3f21('0x76');}if(!isNotNull(_0x14e6b8['Interval']['Intervals'])){_0x14e6b8['message']=utils['CAMPAIGN_STATUS'][_0x3f21('0x75')];throw _0x14e6b8[_0x3f21('0x49')]+_0x3f21('0x76');}if(!isNotNull(_[_0x3f21('0x4b')](_0x14e6b8[_0x3f21('0x74')][_0x3f21('0x77')]))){_0x14e6b8[_0x3f21('0x6d')]=utils[_0x3f21('0x6a')]['NULL_INTERVAL'];throw _0x14e6b8[_0x3f21('0x49')]+_0x3f21('0x76');}};}function checkIsIVRCampaignActive(_0x1373da){return function(){if(!utils[_0x3f21('0x78')](_0x1373da)){_0x1373da[_0x3f21('0x6d')]=utils[_0x3f21('0x6a')]['INACTIVE'];throw _0x1373da[_0x3f21('0x49')]+_0x3f21('0x79');}};}function emitCampaignSummary(_0x583d37){if(utils[_0x3f21('0x7a')](_0x583d37)){emit(util[_0x3f21('0x47')](_0x3f21('0x7b'),_0x583d37[_0x3f21('0x49')]),_0x3f21('0x7c'),_0x583d37);}}function loggerCatchQueueSummary(_0x47bf32,_0x374a57){return function(_0x33866e){clearPredictiveAttributes(_0x374a57);emitCampaignSummary(_0x374a57);loggerSyncQueueSummary[_0x3f21('0x44')](_0x47bf32,util[_0x3f21('0x46')](_0x33866e,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x1ee34a){if(_0x1ee34a[_0x3f21('0x7d')]){if(_0x1ee34a[_0x3f21('0x7e')]===0x0){_0x1ee34a[_0x3f21('0x7d')]=![];_0x1ee34a[_0x3f21('0x6d')]=utils[_0x3f21('0x6a')][_0x3f21('0x7f')];loggerSyncQueueSummary[_0x3f21('0x44')](_0x3f21('0x80'),_0x1ee34a[_0x3f21('0x49')],_0x3f21('0x81'));}else{_0x1ee34a[_0x3f21('0x6d')]=utils[_0x3f21('0x6a')][_0x3f21('0x82')];loggerSyncQueueSummary[_0x3f21('0x44')](_0x3f21('0x80'),_0x1ee34a[_0x3f21('0x49')],_0x3f21('0x83'));}emitCampaignSummary(_0x1ee34a);}}function myreject(_0x2413db){return function(_0x206950){return _0x2413db(msgResponse(_0x3f21('0x84'),'Error',JSON['stringify'](_0x206950)));};}Dialer[_0x3f21('0x19')][_0x3f21('0x85')]=function(_0x43f3b9){return!_[_0x3f21('0x41')](_0x43f3b9)&&_0x43f3b9&&!_[_0x3f21('0x41')](_0x43f3b9['name'])&&!_['isUndefined'](_0x43f3b9[_0x3f21('0x86')])&&_0x43f3b9[_0x3f21('0x86')]&&(this[_0x3f21('0x20')][util['format'](_0x3f21('0x87'),_0x43f3b9['name'])][_0x3f21('0x88')]===_0x3f21('0x89')||this['trunks'][util[_0x3f21('0x47')](_0x3f21('0x87'),_0x43f3b9[_0x3f21('0x49')])]['status']===_0x3f21('0x8a'));};Dialer[_0x3f21('0x19')][_0x3f21('0x8b')]=function(_0x20d0c7){var _0x4f0766=this;return function(){if(!_0x4f0766[_0x3f21('0x85')](_0x20d0c7[_0x3f21('0x8c')])){if(!_0x4f0766['isTrunkReachable'](_0x20d0c7[_0x3f21('0x8d')])){_0x20d0c7[_0x3f21('0x6d')]=utils[_0x3f21('0x6a')][_0x3f21('0x8e')];throw _0x20d0c7[_0x3f21('0x49')]+_0x3f21('0x8f');}}};};Dialer['prototype'][_0x3f21('0x90')]=function(_0x224649,_0x2ccd73,_0x1140ad,_0x35334e){var _0x4c3fb6=this;return function(){var _0xe52749=!![];return _0x4c3fb6[_0x3f21('0x91')](_0x224649,_0x2ccd73,_0x1140ad,_0x35334e,_0xe52749);};};Dialer[_0x3f21('0x19')][_0x3f21('0x92')]=function(_0x2ed7bf,_0x1e7d01,_0x1f7609,_0x3c32b3){var _0x2f7953=this;return function(){var _0x237fa2=![];return _0x2f7953['ifTimeIvr'](_0x2ed7bf['Intervals'],_0x1e7d01,_0x1f7609,_0x3c32b3,_0x237fa2);};};Dialer[_0x3f21('0x19')][_0x3f21('0x91')]=function(_0x1becd3,_0x1b4b9a,_0x18ebd2,_0x5ad38b,_0x3f71e4){var _0xcb0eee=[];return new Promise(function(_0x38185b,_0x38b798){if(!isNotNull(_0x1becd3)){_0x5ad38b[_0x3f21('0x6d')]=utils['CAMPAIGN_STATUS']['NULL_INTERVAL'];return _0x38b798(msgResponse(_0x3f21('0x93'),'Failure',_0x18ebd2+_0x3f21('0x94')));}if(_[_0x3f21('0x4b')](_0x1becd3)){_0x5ad38b[_0x3f21('0x6d')]=utils[_0x3f21('0x6a')][_0x3f21('0x95')];return _0x38b798(msgResponse(_0x3f21('0x93'),'Failure',_0x18ebd2+_0x3f21('0x96')));}if(_0x1b4b9a&&_[_0x3f21('0x41')](config[_0x3f21('0x97')][_0x1b4b9a])){_0x5ad38b[_0x3f21('0x6d')]=utils['CAMPAIGN_STATUS'][_0x3f21('0x98')];return _0x38b798(msgResponse(_0x3f21('0x93'),_0x3f21('0x99'),_0x18ebd2+_0x3f21('0x9a')+_0x1b4b9a));}if(_[_0x3f21('0x9b')](_0x1becd3)){for(var _0x307174=0x0;_0x307174<_0x1becd3[_0x3f21('0x9c')];_0x307174+=0x1){_0xcb0eee[_0x3f21('0x9d')](ami[_0x3f21('0x9e')]({'action':_0x3f21('0x9f'),'command':util['format'](_0x3f21('0xa0'),_0x1becd3[_0x307174][_0x3f21('0xa1')],!_[_0x3f21('0x41')](config[_0x3f21('0x97')][_0x1b4b9a])?_0x1b4b9a:'')})[_0x3f21('0x3f')](function(_0x4b2f95){return _0x4b2f95[_0x3f21('0xa2')][_0x3f21('0xa3')](_0x3f21('0xa4'))>=0x0;})['catch'](myreject(_0x38b798)));}}else{_0xcb0eee['push'](ami['Action']({'action':_0x3f21('0x9f'),'command':util['format'](_0x3f21('0xa0'),_0x1becd3,!_[_0x3f21('0x41')](config['timezones'][_0x1b4b9a])?_0x1b4b9a:'')})[_0x3f21('0x3f')](function(_0x49158a){return _0x49158a[_0x3f21('0xa2')]['indexOf'](_0x3f21('0xa4'))>=0x0;})[_0x3f21('0xa5')](myreject(_0x38b798)));}Promise[_0x3f21('0xa6')](_0xcb0eee)[_0x3f21('0x3f')](function(_0x4c2dfb){var _0x3463ec=_['some'](_0x4c2dfb);if(_0x3463ec){return _0x38185b(_0x3463ec);}else{_0x5ad38b[_0x3f21('0x6d')]=_0x3f71e4?utils[_0x3f21('0x6a')]['OVERTIME_GLOBAL_INTERVAL']:utils[_0x3f21('0x6a')]['OVERTIME_INTERVAL'];return _0x38b798(msgResponse(_0x3f21('0xa7'),_0x3f21('0x99'),_0x3f21('0xa8')+_0x3f71e4+'\x20'+_0x18ebd2+_0x3f21('0xa9')+util[_0x3f21('0x46')](_0x1becd3,{'showHidden':![],'depth':null})+'Timezone:\x20'+_0x1b4b9a));}})['catch'](function(_0x2ab197){return _0x38b798(msgResponse(_0x3f21('0x93'),'Failure',JSON[_0x3f21('0x73')](_0x2ab197)));});});};Dialer[_0x3f21('0x19')][_0x3f21('0xaa')]=function(){var _0x596770=this;return cmHopper[_0x3f21('0xab')]({'active':![]},{'where':{'active':!![]}})['then'](function(){setInterval(function(){_0x596770['syncCampaigns']();},0x3e8);});};Dialer[_0x3f21('0x19')]['syncCampaigns']=function(){var _0x565daa=this;var _0x1c2f58;for(var _0x547be6 in this[_0x3f21('0x1f')]){if(typeof this['campaigns'][_0x547be6]!==_0x3f21('0xac')){_0x1c2f58=this['campaigns'][_0x547be6];if(utils['isIVRCampaign'](_0x1c2f58)&&utils['isIVRCampaignActive'](_0x1c2f58)){_0x1c2f58[_0x3f21('0x7d')]=!![];Promise['resolve']()['then'](checkIsIVRCampaignActive(_0x1c2f58))[_0x3f21('0x3f')](checkInterval(_0x1c2f58))[_0x3f21('0x3f')](_0x565daa[_0x3f21('0x8b')](_0x1c2f58))[_0x3f21('0x3f')](_0x565daa[_0x3f21('0x90')](_0x1c2f58[_0x3f21('0xad')],_0x1c2f58[_0x3f21('0xae')],_0x1c2f58[_0x3f21('0x49')],_0x1c2f58))['then'](_0x565daa[_0x3f21('0x92')](_0x1c2f58[_0x3f21('0x74')],_0x1c2f58[_0x3f21('0xae')],_0x1c2f58['name'],_0x1c2f58))['then'](_0x565daa[_0x3f21('0xaf')](_0x1c2f58))['catch'](loggerCatchQueueSummary(_0x3f21('0xb0'),_0x1c2f58));}else{notSendMessagesCampaign(_0x1c2f58);}}}};Dialer[_0x3f21('0x19')][_0x3f21('0xb1')]=function(_0x51be69){if(_0x51be69[_0x3f21('0xb2')]!=='predictive'){clearPredictiveAttributes(_0x51be69);}switch(_0x51be69[_0x3f21('0xb2')]){case _0x3f21('0xb3'):this[_0x3f21('0xb4')](_0x51be69,0x1);break;case _0x3f21('0xb5'):this[_0x3f21('0xb4')](_0x51be69,_0x51be69['dialPowerLevel']);break;case'predictive':this['predictive'](_0x51be69);break;case _0x3f21('0xa'):this[_0x3f21('0xb4')](_0x51be69,0x1);break;default:logger[_0x3f21('0x66')](_0x3f21('0xb6'),_0x51be69[_0x3f21('0x49')],_0x3f21('0xb7'));}};Dialer[_0x3f21('0x19')][_0x3f21('0x93')]=function(_0x15697f,_0x290b8d){var _0x1428ae=_0x15697f['dialTimezone'];var _0x35c7f4=_0x290b8d?_0x15697f[_0x3f21('0xad')]:_0x15697f['Interval'][_0x3f21('0x77')];logger[_0x3f21('0xb8')](_0x3f21('0xb9'),_0x35c7f4,_0x1428ae,_0x15697f[_0x3f21('0x49')],util[_0x3f21('0x47')]('Voice\x20Queue\x20%s\x20$s',_0x15697f['name'],_0x15697f['id']));var _0x2ee8ca=null;return Interval['intervalIftime'](_0x35c7f4,_0x1428ae)['then'](function(_0x27fb81){if(_0x27fb81===!![]){return _0x27fb81;}else{_0x15697f['message']=_0x290b8d?utils['CAMPAIGN_STATUS']['OVERTIME_GLOBAL_INTERVAL']:utils[_0x3f21('0x6a')][_0x3f21('0xba')];_0x2ee8ca=msgResponse(_0x3f21('0xa7'),_0x3f21('0x99'),_0x3f21('0xa8')+_0x290b8d+'\x20'+_0x15697f[_0x3f21('0x49')]+_0x3f21('0xa9')+util['inspect'](_0x35c7f4,{'showHidden':![],'depth':null})+_0x3f21('0xbb')+_0x1428ae);}if(_0x2ee8ca!==null){logger['silly'](_0x3f21('0xbc'),_0x2ee8ca);_0x2ee8ca[_0x3f21('0xbd')]=_0x290b8d;throw _0x2ee8ca;}})[_0x3f21('0xa5')](function(_0x133201){logger[_0x3f21('0x66')](_0x3f21('0xbe'),_0x133201);throw msgResponse('[ifTime][Action]',_0x3f21('0xbf'),util[_0x3f21('0x46')](_0x133201,{'showHidden':![],'depth':null}));});};Dialer[_0x3f21('0x19')]['syncAgentConnect']=function(_0x549910){if(this['voiceQueues'][_0x549910[_0x3f21('0xc0')]]){if(this['uniqueId'][_0x549910[_0x3f21('0xc1')]]&&this[_0x3f21('0x22')][_0x549910[_0x3f21('0xc1')]][_0x3f21('0x43')]!==_0x3f21('0xc2')){this[_0x3f21('0xc3')](this[_0x3f21('0x1e')][_0x549910[_0x3f21('0xc0')]]);this[_0x3f21('0x22')][_0x549910[_0x3f21('0xc1')]][_0x3f21('0xc4')]=moment()[_0x3f21('0x47')](_0x3f21('0xc5'));}}};Dialer['prototype']['syncAgentComplete']=function(_0x4da739){var _0x428fd0=this[_0x3f21('0x22')][_0x4da739[_0x3f21('0xc1')]];if(this[_0x3f21('0x1e')][_0x4da739['queue']]){if(_0x428fd0&&_0x428fd0['type']!==_0x3f21('0xc2')){delete this[_0x3f21('0x22')][_0x4da739['uniqueid']];this[_0x3f21('0x1e')][_0x4da739[_0x3f21('0xc0')]][_0x3f21('0xc6')]+=0x1;var _0x233a20=new AgentComplete(_0x428fd0,_0x4da739);if(_0x4da739['reason']===_0x3f21('0xc7')){_0x233a20[_0x3f21('0xc8')]=this[_0x3f21('0x1e')][_0x4da739['queue']][_0x3f21('0xc9')]&&this[_0x3f21('0x1e')][_0x4da739[_0x3f21('0xc0')]]['dialAgiAfterHangupAgent']?moment()[_0x3f21('0x47')](_0x3f21('0xc5')):undefined;}hopperUtils[_0x3f21('0xca')](_0x233a20)[_0x3f21('0xa5')](loggerCatch('[syncAgentComplete][createHistory]'));hopperUtils[_0x3f21('0xcb')](_0x233a20)[_0x3f21('0xa5')](loggerCatch(_0x3f21('0xcc')));}}};Dialer['prototype'][_0x3f21('0xcd')]=function(_0xb7dcf){var _0x161739=this[_0x3f21('0x22')][_0xb7dcf['uniqueid']];var _0x528820=this;var _0x3214ab=![];var _0x367e61;var _0x498351;if(this[_0x3f21('0x1e')][_0xb7dcf['queue']]){if(_0x161739&&_0x161739['type']!==_0x3f21('0xc2')){delete this[_0x3f21('0x22')][_0xb7dcf['uniqueid']];this[_0x3f21('0xc3')](this[_0x3f21('0x1e')][_0xb7dcf[_0x3f21('0xc0')]]);_0x161739[_0x3f21('0xce')]=moment()[_0x3f21('0x47')]('YYYY-MM-DD\x20HH:mm:ss');var _0x526948=new QueueCallerAbandon(_0x161739,_0xb7dcf);if(utils[_0x3f21('0x62')](_0x161739['droptime'],_0x161739[_0x3f21('0xcf')])>=_0x161739[_0x3f21('0xd0')]){this['voiceQueues'][_0xb7dcf['queue']][_0x3f21('0xd1')]+=0x1;this[_0x3f21('0x1e')][_0xb7dcf[_0x3f21('0xc0')]][_0x3f21('0xd2')]+=0x1;this[_0x3f21('0x1e')][_0xb7dcf[_0x3f21('0xc0')]][_0x3f21('0xd3')]+=0x1;_0x526948['state']=0xa;_0x526948['statedesc']=_0x3f21('0xd4');_0x526948[_0x3f21('0xd5')]='TIMEOUT';_0x526948['agiafterat']=this[_0x3f21('0x1e')][_0xb7dcf[_0x3f21('0xc0')]][_0x3f21('0xc9')]?moment()['format'](_0x3f21('0xc5')):undefined;_0x526948[_0x3f21('0xd6')]+=0x1;_0x526948[_0x3f21('0xd7')]+=0x1;_0x367e61=this[_0x3f21('0x1e')][_0xb7dcf[_0x3f21('0xc0')]]['dialDropRetryFrequency'];_0x498351=this['voiceQueues'][_0xb7dcf[_0x3f21('0xc0')]][_0x3f21('0xd8')];hopperUtils[_0x3f21('0xd9')](_0x526948,_0x526948['state'],_0x161739[_0x3f21('0xda')])[_0x3f21('0x3f')](function(_0x51ddc3){_0x3214ab=_0x51ddc3[_0x3f21('0xdb')]==0x1;if(_0x526948['countdropretry']>=_0x528820['voiceQueues'][_0xb7dcf['queue']][_0x3f21('0xdc')]){_0x528820[_0x3f21('0xdd')](_0x526948,_0x51ddc3[_0x3f21('0xdb')]);}else{hopperUtils[_0x3f21('0xde')]({'active':![],'countdropretry':_0x526948['countdropretry'],'scheduledat':moment()[_0x3f21('0xdf')](_0x528820['voiceQueues'][_0xb7dcf['queue']]['dialDropRetryFrequency'],_0x3f21('0xe0'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x161739[_0x3f21('0xe1')],'ListId':_0x161739[_0x3f21('0xe2')],'VoiceQueueId':_0x161739[_0x3f21('0xe3')]||undefined,'CampaignId':_0x161739[_0x3f21('0xe4')]||undefined})[_0x3f21('0xa5')](loggerCatch(_0x3f21('0xe5')));var _0x1a24e0=new History(_0x526948);_0x1a24e0[_0x3f21('0xe6')]=0xa;_0x1a24e0[_0x3f21('0x6f')]=_0x3f21('0xd4');_0x1a24e0['starttime']=moment()[_0x3f21('0x47')](_0x3f21('0xc5'));_0x1a24e0['endtime']=_0x1a24e0[_0x3f21('0x70')];_0x1a24e0[_0x3f21('0xe7')]=_0x526948['calleridname'];_0x1a24e0[_0x3f21('0xe8')]=_0x526948['calleridnum'];hopperUtils[_0x3f21('0xca')](_0x1a24e0)['catch'](loggerCatch(_0x3f21('0xe9')));}})[_0x3f21('0x3f')](function(){if(_0x3214ab)hopperUtils[_0x3f21('0xea')](_0x526948,_0x367e61,_0x498351)['then'](function(){return 0x1;});});}else{this['voiceQueues'][_0xb7dcf[_0x3f21('0xc0')]]['predictiveIntervalDroppedCallsCallersExit']+=0x1;this[_0x3f21('0x1e')][_0xb7dcf['queue']]['outboundDropCallsDayCallersExit']+=0x1;_0x526948[_0x3f21('0xe6')]=0xb;_0x526948[_0x3f21('0x6f')]='Abandoned';_0x526948[_0x3f21('0xd5')]='CALLEREXIT';_0x526948[_0x3f21('0xeb')]+=0x1;_0x526948[_0x3f21('0xd7')]+=0x1;_0x367e61=this['voiceQueues'][_0xb7dcf[_0x3f21('0xc0')]][_0x3f21('0xec')];_0x498351=this['voiceQueues'][_0xb7dcf[_0x3f21('0xc0')]]['callAdditionalPhoneAfterMin'];hopperUtils[_0x3f21('0xd9')](_0x526948,_0x526948[_0x3f21('0xe6')],_0x161739[_0x3f21('0xda')])[_0x3f21('0x3f')](function(_0x13e26f){if(_0x526948[_0x3f21('0xeb')]>=_0x528820['voiceQueues'][_0xb7dcf[_0x3f21('0xc0')]][_0x3f21('0xed')]){_0x528820[_0x3f21('0xdd')](_0x526948,_0x13e26f['additional']);}else{hopperUtils[_0x3f21('0xde')]({'active':![],'countabandonedretry':_0x526948['countabandonedretry'],'scheduledat':moment()['add'](_0x528820[_0x3f21('0x1e')][_0xb7dcf[_0x3f21('0xc0')]][_0x3f21('0xec')],_0x3f21('0xe0'))['format'](_0x3f21('0xc5')),'ContactId':_0x161739['ContactId'],'ListId':_0x161739[_0x3f21('0xe2')],'VoiceQueueId':_0x161739[_0x3f21('0xe3')]||undefined,'CampaignId':_0x161739[_0x3f21('0xe4')]||undefined})['catch'](loggerCatch(_0x3f21('0xee')));var _0x35408a=new History(_0x526948);_0x35408a[_0x3f21('0xe6')]=0xb;_0x35408a[_0x3f21('0x6f')]=_0x3f21('0xef');_0x35408a[_0x3f21('0x70')]=moment()['format'](_0x3f21('0xc5'));_0x35408a[_0x3f21('0xf0')]=_0x35408a[_0x3f21('0x70')];_0x35408a[_0x3f21('0xe7')]=_0x526948['calleridname'];_0x35408a['calleridnum']=_0x526948[_0x3f21('0xe8')];hopperUtils['createHistory'](_0x35408a)[_0x3f21('0xa5')](loggerCatch(_0x3f21('0xf1')));}})[_0x3f21('0x3f')](function(){if(_0x3214ab)hopperUtils['swapAdditionalPhones'](_0x526948,_0x367e61,_0x498351)['then'](function(){return 0x1;});});}}}};Dialer[_0x3f21('0x19')][_0x3f21('0x37')]=function(_0x117484){if(this['actions'][_0x117484[_0x3f21('0xc1')]]){this[_0x3f21('0xf2')][_0x117484[_0x3f21('0xc1')]]['channel']=_0x117484['channel'];}if(this[_0x3f21('0x22')][_0x117484[_0x3f21('0xc1')]]){this[_0x3f21('0x22')][_0x117484[_0x3f21('0xc1')]]['channel']=_0x117484[_0x3f21('0xf3')];}};Dialer[_0x3f21('0x19')][_0x3f21('0x3a')]=function(_0x212e03){if(!this[_0x3f21('0xf2')][_0x212e03[_0x3f21('0xf4')]]){return;}var _0xff6884=this[_0x3f21('0x1e')][this[_0x3f21('0xf2')][_0x212e03[_0x3f21('0xf4')]][_0x3f21('0xc0')]][_0x3f21('0xf5')]||_0x3f21('0xf6');if(_0xff6884===_0x3f21('0xf7')){if(this[_0x3f21('0xf2')][_0x212e03[_0x3f21('0xf4')]]&&_[_0x3f21('0xf8')](this[_0x3f21('0xf2')][_0x212e03[_0x3f21('0xf4')]][_0x3f21('0xf9')])&&_0x212e03[_0x3f21('0x88')]==='1'&&_0x212e03['paused']==='0'){if(this[_0x3f21('0xfa')][_0x212e03[_0x3f21('0xfb')]]){if(!this[_0x3f21('0xfa')][_0x212e03[_0x3f21('0xfb')]][_0x3f21('0xf9')]){this['agents'][_0x212e03[_0x3f21('0xfb')]][_0x3f21('0xf9')]=!![];this[_0x3f21('0xf2')][_0x212e03[_0x3f21('0xf4')]][_0x3f21('0xf9')]=!![];this['actions'][_0x212e03[_0x3f21('0xf4')]]['stateinterface']=_0x212e03[_0x3f21('0xfb')];}}}}else if(_0xff6884===_0x3f21('0xf6')){if(this[_0x3f21('0xf2')][_0x212e03['actionid']]){if(this['agents'][_0x212e03[_0x3f21('0xfb')]]){this[_0x3f21('0xf2')][_0x212e03[_0x3f21('0xf4')]][_0x3f21('0xfb')]=_0x212e03[_0x3f21('0xfb')];if(_[_0x3f21('0xf8')](this[_0x3f21('0x27')][this[_0x3f21('0xf2')][_0x212e03['actionid']][_0x3f21('0xc0')]])){this[_0x3f21('0x27')][this['actions'][_0x212e03[_0x3f21('0xf4')]][_0x3f21('0xc0')]]=[];}this['queueBooked'][this[_0x3f21('0xf2')][_0x212e03[_0x3f21('0xf4')]][_0x3f21('0xc0')]][_0x3f21('0x9d')](_[_0x3f21('0x61')](_['pick'](this[_0x3f21('0xf2')][_0x212e03[_0x3f21('0xf4')]],['idHopper',_0x3f21('0xfb')]),{'status':_0x212e03['status'],'paused':_0x212e03[_0x3f21('0xfc')]}));}}}};Dialer[_0x3f21('0x19')][_0x3f21('0x3c')]=function(_0x2e9351){if(!this[_0x3f21('0xf2')][_0x2e9351['actionid']]){return;}var _0x40fc68=this;var _0x5129a2=this['voiceQueues'][this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xc0')]];var _0xad884a=_0x5129a2['strategy']||_0x3f21('0xf6');if(_0xad884a===_0x3f21('0xf7')){if(this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]]&&this[_0x3f21('0xf2')][_0x2e9351['actionid']]['stateinterface']){this[_0x3f21('0x1d')]['run'](this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xfd')],this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xfb')])[_0x3f21('0xa5')](function(_0x2b6eb4){logger[_0x3f21('0x66')](_0x3f21('0xfe'),util[_0x3f21('0x46')](_0x2b6eb4,{'showHidden':![],'depth':null}));})[_0x3f21('0x1b')](function(){_0x40fc68[_0x3f21('0xc3')](_0x40fc68['voiceQueues'][_0x40fc68[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xc0')]]);_0x40fc68[_0x3f21('0xfa')][_0x40fc68[_0x3f21('0xf2')][_0x2e9351['actionid']]['stateinterface']][_0x3f21('0xf9')]=![];delete _0x40fc68[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]];unlockQueueStatus(_0x5129a2);});}else{this[_0x3f21('0xc3')](this[_0x3f21('0x1e')][this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xc0')]]);hopperUtils[_0x3f21('0xde')]({'active':![],'ContactId':this['actions'][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xe1')],'ListId':this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xe2')],'VoiceQueueId':this[_0x3f21('0xf2')][_0x2e9351['actionid']][_0x3f21('0xe3')]||undefined,'CampaignId':this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xe4')]||undefined})[_0x3f21('0xa5')](loggerCatch(_0x3f21('0xff')));delete this['actions'][_0x2e9351[_0x3f21('0xf4')]];unlockQueueStatus(_0x5129a2);}}else if(_0xad884a===_0x3f21('0xf6')){var _0x2ad160;if(this['actions'][_0x2e9351['actionid']]&&!_[_0x3f21('0x4b')](this[_0x3f21('0x27')][this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xc0')]])){if(this[_0x3f21('0x28')][_0x40fc68[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xc0')]]){this[_0x3f21('0x28')][_0x40fc68[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xc0')]]=this[_0x3f21('0x28')][this[_0x3f21('0xf2')][_0x2e9351['actionid']][_0x3f21('0xc0')]]?this[_0x3f21('0x28')][this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xc0')]]:this[_0x3f21('0x27')][this[_0x3f21('0xf2')][_0x2e9351['actionid']][_0x3f21('0xc0')]]?this['queueBooked'][this['actions'][_0x2e9351['actionid']][_0x3f21('0xc0')]]['_rr']||0x0:0x0;}this['queueBooked'][this['actions'][_0x2e9351['actionid']][_0x3f21('0xc0')]][_0x3f21('0x100')]=this[_0x3f21('0x28')][this['actions'][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xc0')]];for(var _0xbfb673=0x0;_0xbfb673<this['queueBooked'][this['actions'][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xc0')]]['length'];_0xbfb673+=0x1){_0x2ad160=rr(this[_0x3f21('0x27')][this['actions'][_0x2e9351['actionid']][_0x3f21('0xc0')]]);this[_0x3f21('0x28')][_0x40fc68[_0x3f21('0xf2')][_0x2e9351['actionid']][_0x3f21('0xc0')]]=this[_0x3f21('0x27')][this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xc0')]]['_rr'];if(_0x2ad160[_0x3f21('0x88')]==='1'&&_0x2ad160['paused']==='0'){break;}}if(!_[_0x3f21('0xf8')](_0x2ad160)){this['agents'][_0x2ad160[_0x3f21('0xfb')]][_0x3f21('0x101')]=_[_0x3f21('0x41')](this[_0x3f21('0xfa')][_0x2ad160[_0x3f21('0xfb')]][_0x3f21('0x101')])?!![]:this[_0x3f21('0xfa')][_0x2ad160[_0x3f21('0xfb')]][_0x3f21('0x101')];}loggerBooked[_0x3f21('0x4c')](_0x3f21('0x102'),_0x2e9351['actionid'],_0x3f21('0x103'),JSON[_0x3f21('0x73')](_[_0x3f21('0x104')](this[_0x3f21('0xfa')][_0x2ad160[_0x3f21('0xfb')]],['name',_0x3f21('0x101')])),_0x3f21('0x105'),JSON[_0x3f21('0x73')](_0x2ad160[_0x3f21('0xfd')]));if(!_['isNil'](_0x2ad160)&&_0x2ad160['status']==='1'&&_0x2ad160[_0x3f21('0xfc')]==='0'&&this['agents'][_0x2ad160[_0x3f21('0xfb')]][_0x3f21('0x101')]){this[_0x3f21('0xfa')][_0x2ad160[_0x3f21('0xfb')]][_0x3f21('0x101')]=![];this[_0x3f21('0x27')][_0x40fc68[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xc0')]]=[];this[_0x3f21('0x1d')][_0x3f21('0x106')](_0x2ad160[_0x3f21('0xfd')],_0x2ad160[_0x3f21('0xfb')])[_0x3f21('0xa5')](function(_0x59f613){logger['error'](_0x3f21('0xfe'),util[_0x3f21('0x46')](_0x59f613,{'showHidden':![],'depth':null}));})[_0x3f21('0x1b')](function(){_0x40fc68[_0x3f21('0xc3')](_0x40fc68[_0x3f21('0x1e')][_0x40fc68['actions'][_0x2e9351['actionid']][_0x3f21('0xc0')]]);setTimeout(function(){_0x40fc68[_0x3f21('0xfa')][_0x2ad160[_0x3f21('0xfb')]][_0x3f21('0x101')]=!![];loggerBooked[_0x3f21('0x4c')]('[booked][RR][finaly]',_0x2e9351['actionid'],_0x3f21('0x103'),JSON[_0x3f21('0x73')](_[_0x3f21('0x104')](_0x40fc68['agents'][_0x2ad160[_0x3f21('0xfb')]],[_0x3f21('0x49'),_0x3f21('0x101')])),_0x3f21('0x105'),JSON[_0x3f21('0x73')](_0x2ad160[_0x3f21('0xfd')]));},0xc7);delete _0x40fc68[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]];unlockQueueStatus(_0x5129a2,_0x2e9351[_0x3f21('0xf4')]);});}else{loggerBooked[_0x3f21('0x4c')]('[booked][unlock]');this[_0x3f21('0xc3')](this[_0x3f21('0x1e')][this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]]['queue']]);hopperUtils[_0x3f21('0xde')]({'active':![],'ContactId':this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]]['ContactId'],'ListId':this['actions'][_0x2e9351['actionid']]['ListId'],'VoiceQueueId':this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xe3')]||undefined,'CampaignId':this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xe4')]||undefined})[_0x3f21('0xa5')](loggerCatch(_0x3f21('0xff')));delete this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]];unlockQueueStatus(_0x5129a2);}}else{loggerBooked['info'](_0x3f21('0x107'));this['updateOriginated'](this[_0x3f21('0x1e')][this[_0x3f21('0xf2')][_0x2e9351['actionid']][_0x3f21('0xc0')]]);hopperUtils[_0x3f21('0xde')]({'active':![],'ContactId':this['actions'][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xe1')],'ListId':this['actions'][_0x2e9351[_0x3f21('0xf4')]]['ListId'],'VoiceQueueId':this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xe3')]||undefined,'CampaignId':this['actions'][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xe4')]||undefined})[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x108')));delete this['actions'][_0x2e9351['actionid']];unlockQueueStatus(_0x5129a2);}}else{loggerBooked[_0x3f21('0x4c')]('[booked][unlock3]');this['updateOriginated'](this[_0x3f21('0x1e')][this[_0x3f21('0xf2')][_0x2e9351['actionid']][_0x3f21('0xc0')]]);hopperUtils[_0x3f21('0xde')]({'active':![],'ContactId':this[_0x3f21('0xf2')][_0x2e9351['actionid']]['ContactId'],'ListId':this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xe2')],'VoiceQueueId':this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]]['VoiceQueueId']||undefined,'CampaignId':this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]][_0x3f21('0xe4')]||undefined})[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x109')));delete this[_0x3f21('0xf2')][_0x2e9351[_0x3f21('0xf4')]];unlockQueueStatus(_0x5129a2);}};Dialer[_0x3f21('0x19')][_0x3f21('0x2f')]=function(_0xaf52b7){var _0x2b789f=this[_0x3f21('0xf2')][_0xaf52b7[_0x3f21('0xf4')]];if(_0x2b789f){delete this[_0x3f21('0xf2')][_0xaf52b7['actionid']];_0x2b789f[_0x3f21('0xcf')]=moment()[_0x3f21('0x47')](_0x3f21('0xc5'));var _0x33a28d=_0x2b789f[_0x3f21('0x43')]===_0x3f21('0xc2')?this[_0x3f21('0x1f')][_0x2b789f['queue']]:this['voiceQueues'][_0x2b789f[_0x3f21('0x10a')]()];if(_0xaf52b7[_0x3f21('0x10b')]!==_0x3f21('0x10c')){this[_0x3f21('0xc3')](_0x33a28d);return this[_0x3f21('0x10d')](_0x2b789f,_0x33a28d,_0xaf52b7)[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x10e')));}this[_0x3f21('0x22')][_0xaf52b7[_0x3f21('0xc1')]]=_0x2b789f;}};Dialer['prototype']['syncVarSet']=function(_0x3db1a9){var _0x52cc41=this;var _0x22c550=this['uniqueId'][_0x3db1a9[_0x3f21('0xc1')]];var _0x155b42;if(!_[_0x3f21('0xf8')](_0x3db1a9)&&!_[_0x3f21('0xf8')](_0x3db1a9['variable'])&&!_[_0x3f21('0xf8')](_0x3db1a9[_0x3f21('0x10f')][_0x3f21('0x110')])&&_0x3db1a9[_0x3f21('0x111')]==='xcally-motion-dialer'&&_0x22c550){if(_0x22c550[_0x3f21('0x43')]!==_0x3f21('0xc2')&&this['voiceQueues'][_0x22c550[_0x3f21('0xc0')]][_0x3f21('0x112')]&&_0x3db1a9[_0x3f21('0x113')]===_0x3f21('0x114')){delete this[_0x3f21('0x22')][_0x3db1a9[_0x3f21('0xc1')]];this['updateOriginated'](this[_0x3f21('0x1e')][_0x22c550[_0x3f21('0xc0')]]);this[_0x3f21('0x1e')][_0x22c550[_0x3f21('0xc0')]][_0x3f21('0xc6')]+=0x1;this[_0x3f21('0x1e')][_0x22c550[_0x3f21('0xc0')]][_0x3f21('0x115')]+=0x1;_0x155b42=new Hangup(_0x22c550,_0x3db1a9);_0x155b42[_0x3f21('0xe6')]=0x12;_0x155b42['statedesc']='HangupInAMD';_0x155b42[_0x3f21('0x116')]=_0x3f21('0x117');ami[_0x3f21('0x42')](_0x3f21('0x118'),ut[_0x3f21('0x119')](_0x155b42,_0x3f21('0x11a')));this[_0x3f21('0x11b')](_0x155b42,_0x3f21('0x11c'),'[syncHangupInAMD]');}if(_0x22c550[_0x3f21('0x43')]!==_0x3f21('0xc2')&&this[_0x3f21('0x1e')][_0x22c550['queue']]['dialAMDActive']&&_0x3db1a9[_0x3f21('0x113')]===_0x3f21('0x11d')){return new Promise(function(_0x926fa1,_0x565e02){delete _0x52cc41['uniqueId'][_0x3db1a9[_0x3f21('0xc1')]];_0x52cc41[_0x3f21('0xc3')](_0x52cc41[_0x3f21('0x1e')][_0x22c550[_0x3f21('0xc0')]]);_0x52cc41[_0x3f21('0x1e')][_0x22c550[_0x3f21('0xc0')]][_0x3f21('0xc6')]+=0x1;_0x52cc41[_0x3f21('0x1e')][_0x22c550[_0x3f21('0xc0')]][_0x3f21('0x115')]+=0x1;var _0x38738a=_0x52cc41[_0x3f21('0x1e')][_0x22c550['queue']];var _0x28058b=new Hangup(_0x22c550,_0x3db1a9);_0x28058b['state']=0x13;_0x28058b['statedesc']=_0x3f21('0x11e');_0x28058b['membername']=_0x3f21('0x117');_0x28058b[_0x3f21('0x11f')]+=0x1;_0x28058b[_0x3f21('0xd7')]+=0x1;_0x28058b[_0x3f21('0x11a')]=!![];ami[_0x3f21('0x42')](_0x3f21('0x118'),ut[_0x3f21('0x119')](_0x28058b,'amd'));hopperUtils[_0x3f21('0xca')](_0x28058b)['catch'](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x28058b[_0x3f21('0x120')]+_0x28058b['countcongestionretry']+_0x28058b[_0x3f21('0x121')]+_0x28058b[_0x3f21('0x122')]+_0x28058b[_0x3f21('0xd6')]+_0x28058b[_0x3f21('0xeb')]+_0x28058b[_0x3f21('0x11f')]+_0x28058b['countagentrejectretry']>=_0x38738a[_0x3f21('0x123')]){_0x52cc41[_0x3f21('0x124')](_0x28058b,_0x926fa1,_0x565e02,'reason19\x20machine....');}else{if(_0x28058b[_0x3f21('0x11f')]>=_0x38738a[_0x3f21('0x125')]){_0x52cc41[_0x3f21('0x126')](_0x28058b,_0x926fa1,_0x565e02,_0x3f21('0x127'));}else{hopperUtils['rescheduleContact']({'active':![],'countmachineretry':_0x28058b[_0x3f21('0x11f')],'scheduledat':moment()[_0x3f21('0xdf')](_0x38738a['dialMachineRetryFrequency'],'minutes')[_0x3f21('0x47')](_0x3f21('0xc5')),'ContactId':_0x28058b[_0x3f21('0xe1')],'ListId':_0x28058b[_0x3f21('0xe2')],'VoiceQueueId':_0x28058b['VoiceQueueId']||undefined,'CampaignId':_0x28058b['CampaignId']||undefined})[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x128')));_0x926fa1({'reschedule':0x1});}}});}if(_0x22c550['type']==='ivr'&&this[_0x3f21('0x1f')][_0x22c550[_0x3f21('0xc0')]][_0x3f21('0x112')]&&_0x3db1a9[_0x3f21('0x113')]===_0x3f21('0x114')){delete this[_0x3f21('0x22')][_0x3db1a9[_0x3f21('0xc1')]];this['updateOriginated'](this[_0x3f21('0x1f')][_0x22c550[_0x3f21('0xc0')]]);_0x155b42=new Hangup(_0x22c550,_0x3db1a9);_0x155b42[_0x3f21('0xe6')]=0x12;_0x155b42[_0x3f21('0x6f')]=_0x3f21('0x129');_0x155b42[_0x3f21('0x116')]='AMD';ami['emit'](_0x3f21('0x118'),ut[_0x3f21('0x119')](_0x155b42,'amd'));this['saveInDb'](_0x155b42,_0x3f21('0x12a'),_0x3f21('0x12b'));}if(_0x22c550[_0x3f21('0x43')]===_0x3f21('0xc2')&&this[_0x3f21('0x1f')][_0x22c550[_0x3f21('0xc0')]][_0x3f21('0x112')]&&_0x3db1a9['value']===_0x3f21('0x11d')){return new Promise(function(_0x27cf70,_0x45126b){delete _0x52cc41[_0x3f21('0x22')][_0x3db1a9['uniqueid']];_0x52cc41[_0x3f21('0xc3')](_0x52cc41[_0x3f21('0x1f')][_0x22c550[_0x3f21('0xc0')]]);_0x52cc41[_0x3f21('0x1f')][_0x22c550[_0x3f21('0xc0')]]['outboundAnswerCallsDay']+=0x1;_0x52cc41[_0x3f21('0x1f')][_0x22c550[_0x3f21('0xc0')]]['outboundAnswerAgiCallsDay']+=0x1;var _0x5a1b19=_0x52cc41[_0x3f21('0x1f')][_0x22c550['queue']];var _0x2c1959=new Hangup(_0x22c550,_0x3db1a9);_0x2c1959[_0x3f21('0xe6')]=0x13;_0x2c1959[_0x3f21('0x6f')]=_0x3f21('0x11e');_0x2c1959[_0x3f21('0x116')]='AMD';_0x2c1959[_0x3f21('0x11f')]+=0x1;_0x2c1959[_0x3f21('0xd7')]+=0x1;_0x2c1959[_0x3f21('0x11a')]=!![];ami[_0x3f21('0x42')](_0x3f21('0x118'),ut[_0x3f21('0x119')](_0x2c1959,_0x3f21('0x11a')));hopperUtils[_0x3f21('0xca')](_0x2c1959)['catch'](loggerCatch(_0x3f21('0x12c')));if(_0x2c1959[_0x3f21('0x120')]+_0x2c1959[_0x3f21('0x12d')]+_0x2c1959[_0x3f21('0x121')]+_0x2c1959[_0x3f21('0x122')]+_0x2c1959['countdropretry']+_0x2c1959['countabandonedretry']+_0x2c1959['countmachineretry']+_0x2c1959[_0x3f21('0x12e')]>=_0x5a1b19['dialGlobalMaxRetry']){_0x52cc41[_0x3f21('0x124')](_0x2c1959,_0x27cf70,_0x45126b,_0x3f21('0x12f'));}else{if(_0x2c1959[_0x3f21('0x11f')]>=_0x5a1b19[_0x3f21('0x125')]){_0x52cc41['createStateFinal'](_0x2c1959,_0x27cf70,_0x45126b,_0x3f21('0x127'));}else{hopperUtils[_0x3f21('0xde')]({'active':![],'countmachineretry':_0x2c1959[_0x3f21('0x11f')],'scheduledat':moment()[_0x3f21('0xdf')](_0x5a1b19[_0x3f21('0x130')],_0x3f21('0xe0'))[_0x3f21('0x47')](_0x3f21('0xc5')),'ContactId':_0x2c1959['ContactId'],'ListId':_0x2c1959['ListId'],'VoiceQueueId':_0x2c1959[_0x3f21('0xe3')]||undefined,'CampaignId':_0x2c1959['CampaignId']||undefined})[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x128')));_0x27cf70({'reschedule':0x1});}}});}}};Dialer[_0x3f21('0x19')]['syncHangup']=function(_0x53f73c){var _0x1ed5d9=this[_0x3f21('0x22')][_0x53f73c[_0x3f21('0xc1')]];var _0x558cb0;if(_0x1ed5d9&&_0x1ed5d9['type']==='ivr'){delete this[_0x3f21('0x22')][_0x53f73c[_0x3f21('0xc1')]];this[_0x3f21('0xc3')](this[_0x3f21('0x1f')][_0x1ed5d9[_0x3f21('0xc0')]]);this[_0x3f21('0x1f')][_0x1ed5d9['queue']][_0x3f21('0x131')]+=0x1;_0x558cb0=new Hangup(_0x1ed5d9,_0x53f73c);hopperUtils[_0x3f21('0xca')](_0x558cb0)[_0x3f21('0xa5')](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils[_0x3f21('0xcb')](_0x558cb0)[_0x3f21('0xa5')](loggerCatch('[syncHangupIvr]'));}if(_0x1ed5d9&&_0x1ed5d9['type']!==_0x3f21('0xc2')&&isNotNull(this[_0x3f21('0x1e')][_0x1ed5d9[_0x3f21('0xc0')]][_0x3f21('0x132')])){delete this[_0x3f21('0x22')][_0x53f73c[_0x3f21('0xc1')]];this[_0x3f21('0xc3')](this['voiceQueues'][_0x1ed5d9[_0x3f21('0xc0')]]);this[_0x3f21('0x1e')][_0x1ed5d9[_0x3f21('0xc0')]][_0x3f21('0xc6')]+=0x1;this[_0x3f21('0x1e')][_0x1ed5d9[_0x3f21('0xc0')]][_0x3f21('0x115')]+=0x1;_0x558cb0=new Hangup(_0x1ed5d9,_0x53f73c);_0x558cb0[_0x3f21('0xe6')]=0x10;_0x558cb0[_0x3f21('0x6f')]=_0x3f21('0x133');_0x558cb0[_0x3f21('0x116')]=_0x3f21('0x134');hopperUtils[_0x3f21('0xca')](_0x558cb0)['catch'](loggerCatch('[syncHangupIvr][createHistory]'));hopperUtils['moveContactManagedDialer'](_0x558cb0)['catch'](loggerCatch('[syncHangupIvr]'));}if(_0x1ed5d9&&_0x1ed5d9['type']!=='ivr'&&!isNotNull(this[_0x3f21('0x1e')][_0x1ed5d9[_0x3f21('0xc0')]][_0x3f21('0x132')])){if(_0x53f73c[_0x3f21('0x135')]===_0x3f21('0x136')){delete this['uniqueId'][_0x53f73c['uniqueid']];this[_0x3f21('0x1e')][_0x1ed5d9['queue']][_0x3f21('0xc6')]+=0x1;const _0x1ec2aa=new AgentComplete(_0x1ed5d9,_0x53f73c);_0x1ec2aa[_0x3f21('0xe4')]=this[_0x3f21('0x1e')][_0x1ed5d9['queue']]['id'];hopperUtils[_0x3f21('0xca')](_0x1ec2aa)['catch'](loggerCatch(_0x3f21('0x137')));hopperUtils['moveContactManagedDialer'](_0x1ec2aa)['catch'](loggerCatch(_0x3f21('0xcc')));}else{delete this[_0x3f21('0x22')][_0x53f73c[_0x3f21('0xc1')]];this[_0x3f21('0xc3')](this[_0x3f21('0x1e')][_0x1ed5d9[_0x3f21('0xc0')]]);this[_0x3f21('0x1e')][_0x1ed5d9[_0x3f21('0xc0')]][_0x3f21('0x138')]+=0x1;_0x558cb0=new Hangup(_0x1ed5d9,_0x53f73c);_0x558cb0[_0x3f21('0xe6')]=0xc;_0x558cb0[_0x3f21('0x6f')]=_0x53f73c[_0x3f21('0x135')];_0x558cb0[_0x3f21('0x116')]='Unknow';hopperUtils['createHistory'](_0x558cb0)[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x139')));hopperUtils[_0x3f21('0xcb')](_0x558cb0)[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x13a')));}}};Dialer[_0x3f21('0x19')][_0x3f21('0xb')]=function(_0x331c32){var _0x303ccb=this;if(!_0x303ccb[_0x3f21('0x29')][_0x331c32['name']]){_0x303ccb[_0x3f21('0x29')][_0x331c32['name']]={'running':![]};}else if(_0x303ccb[_0x3f21('0x29')][_0x331c32[_0x3f21('0x49')]][_0x3f21('0x13b')]===!![]){return;}else if(_0x303ccb[_0x3f21('0x29')][_0x331c32[_0x3f21('0x49')]]['running']===![]){_0x303ccb[_0x3f21('0x29')][_0x331c32['name']]['running']=!![];}var _0x212b3f=_0x303ccb[_0x3f21('0x1e')][_0x331c32[_0x3f21('0x49')]];var _0x3ad1e5=_0x212b3f[_0x3f21('0x6d')]!==utils[_0x3f21('0x6a')][_0x3f21('0x7f')];var _0x11959a=utils[_0x3f21('0x13c')](_0x212b3f);_0x212b3f[_0x3f21('0x13d')]=utils[_0x3f21('0x13e')](_0x212b3f,_0x303ccb['trunks']);Promise[_0x3f21('0x13f')]()[_0x3f21('0x3f')](function(){if(_0x212b3f[_0x3f21('0x13d')]===utils[_0x3f21('0x6a')][_0x3f21('0x7f')]){if(_0x3ad1e5){clearPredictiveAttributes(_0x212b3f);_0x331c32['startPredictive']=undefined;_0x331c32[_0x3f21('0x25')]=undefined;}if(_0x212b3f['statusMessage']===utils['CAMPAIGN_STATUS'][_0x3f21('0x7f')]){_0x331c32[_0x3f21('0x140')]=0x0;_0x331c32['paused']=0x0;_0x331c32['inUse']=0x0;_0x331c32[_0x3f21('0x141')]=0x0;_0x331c32[_0x3f21('0x142')]=0x0;}}else if(_0x212b3f[_0x3f21('0x13d')]===utils[_0x3f21('0x6a')][_0x3f21('0x143')]&&!_0x11959a){return _0x303ccb['ifTime'](_0x212b3f,!![])[_0x3f21('0x3f')](function(){return _0x303ccb[_0x3f21('0x93')](_0x212b3f,![]);})['then'](function(){return _0x303ccb[_0x3f21('0xb1')](_0x212b3f);})[_0x3f21('0xa5')](function(_0x2d0c18){loggerSyncQueueSummary[_0x3f21('0x44')](_0x3f21('0x144'),util[_0x3f21('0x46')](_0x2d0c18,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x212b3f);});}else{clearPredictiveAttributes(_0x212b3f);}})[_0x3f21('0x3f')](function(){var _0x3039d0=_0x331c32[_0x3f21('0x145')](_0x212b3f);if(_0x3039d0||_0x212b3f[_0x3f21('0x146')]){_0x212b3f[_0x3f21('0x146')]=![];_0x331c32[_0x3f21('0x147')](_0x212b3f);Object[_0x3f21('0x148')](_0x212b3f,_0x331c32);emitOutboundVoiceQueueSummary(_0x331c32);}_0x303ccb[_0x3f21('0x29')][_0x212b3f[_0x3f21('0x49')]][_0x3f21('0x13b')]=![];})['catch'](function(_0x5b0be8){logger[_0x3f21('0x66')](_0x3f21('0x144'),util[_0x3f21('0x46')](_0x5b0be8,{'showHidden':![],'depth':null}));_0x303ccb[_0x3f21('0x29')][_0x212b3f[_0x3f21('0x49')]]['running']=![];});};Dialer[_0x3f21('0x19')]['syncQueueSummaryComplete']=_[_0x3f21('0x149')](function(){var _0xd9b0af=_['filter'](this[_0x3f21('0x1e')],function(_0x16b08e){return _0x16b08e[_0x3f21('0x14a')];});var _0x20dd4b=_[_0x3f21('0x14b')](this[_0x3f21('0xfa')],function(_0x5b4344){return _0x5b4344[_0x3f21('0x14c')]&&_0x5b4344['status']==='reachable';});if(_0xd9b0af[_0x3f21('0x9c')]>0x0&&_0x20dd4b[_0x3f21('0x9c')]>0x0){return Promise['resolve']()[_0x3f21('0x3f')](cmHopper['handlePreviewRecallNotifications'](_[_0x3f21('0x14d')](_0xd9b0af,'id'),previewRecallmeReminderInterval,_[_0x3f21('0x14d')](_0x20dd4b,'id')))[_0x3f21('0x3f')](function(_0xcd654a){for(var _0x289c28=0x0;_0x289c28<_0xcd654a[_0x3f21('0x9c')];_0x289c28++){var _0x39b223=_0xcd654a[_0x289c28][_0x3f21('0x14e')][_0x3f21('0x49')];if(_0x39b223)io['to'](util[_0x3f21('0x47')](_0x3f21('0x14f'),_0x39b223))[_0x3f21('0x42')](_0x3f21('0x150'),{'hopper':_0xcd654a[_0x289c28]});}})[_0x3f21('0xa5')](function(_0x328a33){logger[_0x3f21('0x66')](_0x3f21('0x151'),_0x328a33);});}},0x3c*0x3e8,{'leading':!![]});Dialer[_0x3f21('0x19')]['loopClearZombieChannels']=function(){var _0xcd965=this;setInterval(function(){_0xcd965[_0x3f21('0x152')](_0xcd965[_0x3f21('0x22')],_0x3f21('0x153'));_0xcd965[_0x3f21('0x152')](_0xcd965['actions'],_0x3f21('0x154'));},0x32c8);};Dialer[_0x3f21('0x19')][_0x3f21('0x152')]=function(_0x271a7f,_0x5e144e){var _0x359bfb=this;for(var _0x54d702 in _0x271a7f){if(typeof _0x271a7f[_0x54d702]!==_0x3f21('0xac')){this[_0x3f21('0x1c')]['enqueue'](function(){if(!_[_0x3f21('0xf8')](_0x271a7f[_0x54d702])){return ami[_0x3f21('0x9e')]({'action':_0x3f21('0x88'),'channel':_0x271a7f[_0x54d702][_0x3f21('0xf3')]})[_0x3f21('0xa5')](function(_0x55190c){if(_0x55190c[_0x3f21('0x6d')]===_0x3f21('0x155')){setTimeout(function(){if(_0x271a7f[_0x54d702]&&_0x271a7f[_0x54d702][_0x3f21('0x43')]!==_0x3f21('0xc2')){_0x359bfb[_0x3f21('0xc3')](_0x359bfb[_0x3f21('0x1e')][_0x271a7f[_0x54d702][_0x3f21('0xc0')]]);logger[_0x3f21('0x66')](_0x3f21('0x156'),_0x5e144e,_0x54d702,_0x271a7f[_0x54d702]['queue']);delete _0x271a7f[_0x54d702];}if(_0x271a7f[_0x54d702]&&_0x271a7f[_0x54d702][_0x3f21('0x43')]==='ivr'){_0x359bfb[_0x3f21('0xc3')](_0x359bfb[_0x3f21('0x1f')][_0x271a7f[_0x54d702][_0x3f21('0xc0')]]);logger['error'](_0x3f21('0x157'),_0x5e144e,_0x54d702,_0x271a7f[_0x54d702][_0x3f21('0xc0')]);delete _0x271a7f[_0x54d702];}},0x2328);}});}});}}};Dialer['prototype'][_0x3f21('0x158')]=function(_0x505a8b){return Promise['resolve']()[_0x3f21('0x3f')](voiceQueueRt['getVoiceQueueRtPauses'](_0x505a8b))[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x159')));};Dialer[_0x3f21('0x19')]['updateOriginated']=function(_0x390531){if(!_['isUndefined'](_0x390531)&&_0x390531!==null){if(typeof _0x390531[_0x3f21('0x7e')]!==_0x3f21('0xac')){if(_0x390531['originated']>0x0){_0x390531[_0x3f21('0x7e')]-=0x1;}else{logger['error'](_0x3f21('0x15a'));}}}else{logger[_0x3f21('0x66')]('[updateOriginated]\x20is\x20null\x20or\x20undefined');}};Dialer[_0x3f21('0x19')][_0x3f21('0x15b')]=function(_0x26111e,_0x558582){var _0x28b8b1=this;return function(_0xfa1eeb){_0x28b8b1['updateOriginated'](_0x558582);logger[_0x3f21('0x66')](_0x26111e,util[_0x3f21('0x46')](_0xfa1eeb,{'showHidden':![],'depth':null}));};};Dialer[_0x3f21('0x19')][_0x3f21('0x15c')]=function(_0x14a1b8,_0x1d8067,_0x37f7c6){var _0x89fe51={'state':0x19,'statedesc':_0x3f21('0x15d')};this['updateOriginated'](_0x1d8067);this[_0x3f21('0x11b')](_[_0x3f21('0x61')](_0x89fe51,_[_0x3f21('0x104')](_0x37f7c6,[_0x3f21('0xe1'),_0x3f21('0xe2'),_0x3f21('0x15e'),'VoiceQueueId',_0x3f21('0xe4')])),_0x3f21('0x15f'),_0x3f21('0x160'));logger[_0x3f21('0x66')](_0x14a1b8);};Dialer[_0x3f21('0x19')][_0x3f21('0x11b')]=function(_0x2b0dcf,_0x229a8c,_0x43c9ac){hopperUtils[_0x3f21('0xca')](_0x2b0dcf)[_0x3f21('0xa5')](loggerCatch(_0x229a8c));hopperUtils[_0x3f21('0xcb')](_0x2b0dcf)[_0x3f21('0xa5')](loggerCatch(_0x43c9ac));};Dialer[_0x3f21('0x19')][_0x3f21('0xdd')]=function(_0xe1aca,_0x4a573b){hopperUtils['createHistory'](_0xe1aca)[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x137')));if(_0x4a573b==0x0){hopperUtils[_0x3f21('0xcb')](_0xe1aca)[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x161')));}};Dialer['prototype']['checkPreviewRecallReminder']=function(_0x349b1c){return Promise[_0x3f21('0x13f')]()[_0x3f21('0x3f')](cmHopper[_0x3f21('0x162')](_0x349b1c['id'],previewRecallmeReminderInterval))['then'](function(_0x1b239e){for(var _0x5e2700=0x0;_0x5e2700<_0x1b239e['length'];_0x5e2700++){var _0x55de5f=_0x1b239e[_0x5e2700]['Agent']['name'];if(_0x55de5f)io['to'](util[_0x3f21('0x47')](_0x3f21('0x14f'),_0x55de5f))[_0x3f21('0x42')](_0x3f21('0x150'),{'hopper':_0x1b239e[_0x5e2700]});}})[_0x3f21('0xa5')](function(){});};Dialer[_0x3f21('0x19')][_0x3f21('0xaf')]=function(_0x30cf54){var _0x5e5d9b=this;return function(){_0x5e5d9b['handleIvr'](_0x30cf54);};};Dialer[_0x3f21('0x19')][_0x3f21('0x163')]=function(_0x1c9995,_0x1f3652){var _0x55fb75=this;var _0x2d9c1c=uuid['v4']();this['actions'][_0x2d9c1c]=new Action(_0x1c9995,_0x1f3652,_0x2d9c1c);return new Promise(function(_0x29719b,_0x139d0b){if(_['isUndefined'](_0x1c9995)&&typeof _0x1c9995!==_0x3f21('0x164')){return _0x139d0b(msgResponse('originate',_0x3f21('0x99'),_0x3f21('0x165')));}if(_[_0x3f21('0x41')](_0x1f3652[_0x3f21('0x166')])||_0x1f3652[_0x3f21('0x166')]===null){return _0x139d0b(msgResponse(_0x3f21('0x167'),_0x3f21('0x99'),_0x3f21('0x168')));}var _0x525f28={'XMD-CALLERID':_0x55fb75['actions'][_0x2d9c1c][_0x3f21('0x169')](),'XMD-AGI':_0x1c9995[_0x3f21('0x132')]?util['format'](_0x3f21('0x16a'),ipAgi,_0x1c9995[_0x3f21('0x132')]):_0x3f21('0x16b'),'XMD-AGIAFTER':_0x1c9995['dialQueueProject2']?util[_0x3f21('0x47')](_0x3f21('0x16a'),ipAgi,_0x1c9995[_0x3f21('0xc9')]):_0x3f21('0x16b'),'XMD-QUEUE':utils['isOutboundQueue'](_0x1c9995)?util[_0x3f21('0x47')](_0x3f21('0x16c'),_0x1c9995[_0x3f21('0x49')],_0x1c9995['dialQueueOptions']||'',_0x1c9995[_0x3f21('0x16d')]?'c':'',_0x1c9995['dialQueueTimeout']||0x3):_0x3f21('0x16b'),'XMD-CONTACTID':_0x1f3652['ContactId'],'XMD-CDRTYPE':_0x3f21('0x9'),'CALLERID(all)':_0x55fb75[_0x3f21('0xf2')][_0x2d9c1c][_0x3f21('0x169')](),'XMD-AMD':_0x1c9995[_0x3f21('0x112')]?_0x3f21('0x143'):_0x3f21('0x16b'),'XMD-DESTINATION':'xcally-motion-dialer'};if(_0x1c9995[_0x3f21('0x112')]){_0x525f28[_0x3f21('0x16e')]=_0x1c9995[_0x3f21('0x16f')]||0x9c4;_0x525f28[_0x3f21('0x170')]=_0x1c9995[_0x3f21('0x171')]||0x5dc;_0x525f28[_0x3f21('0x172')]=_0x1c9995['dialAMDAfterGreetingSilence']||0x320;_0x525f28[_0x3f21('0x173')]=_0x1c9995[_0x3f21('0x174')]||0x1388;_0x525f28[_0x3f21('0x175')]=_0x1c9995[_0x3f21('0x176')]||0x64;_0x525f28[_0x3f21('0x177')]=_0x1c9995[_0x3f21('0x178')]||0x32;_0x525f28['XMD-AMDMAXIMUMNUMBEROFWORDS']=_0x1c9995['dialAMDMaximumNumberOfWords']||0x3;_0x525f28[_0x3f21('0x179')]=_0x1c9995[_0x3f21('0x17a')]||0x100;_0x525f28[_0x3f21('0x17b')]=_0x1c9995['dialAMDMaximumWordLength']||0x1388;}if(utils[_0x3f21('0x17c')](_0x1c9995)){_0x525f28[_0x3f21('0x17d')]=_0x1f3652[_0x3f21('0xe3')];}else{_0x525f28[_0x3f21('0x17e')]=_0x1f3652[_0x3f21('0xe4')];}var _0x517774=utils[_0x3f21('0x17f')](_0x1f3652[_0x3f21('0x180')]);Object['assign'](_0x525f28,_0x517774);var _0x320305=_0x55fb75[_0x3f21('0x85')](_0x1c9995['Trunk'])?utils[_0x3f21('0x181')](_0x1c9995[_0x3f21('0x8c')][_0x3f21('0x182')],_0x1c9995[_0x3f21('0x183')],_0x1c9995[_0x3f21('0x184')]>0x0?utils[_0x3f21('0x185')](_0x1c9995[_0x3f21('0x186')],_0x1c9995[_0x3f21('0x184')]):_0x1c9995[_0x3f21('0x186')]):utils['getCallerId'](_[_0x3f21('0xf8')](_0x1c9995[_0x3f21('0x8d')])?_0x1c9995[_0x3f21('0x8c')][_0x3f21('0x182')]:_0x1c9995[_0x3f21('0x8d')][_0x3f21('0x182')],_0x1c9995['dialOriginateCallerIdName'],_0x1c9995[_0x3f21('0x184')]>0x0?utils[_0x3f21('0x185')](_0x1c9995[_0x3f21('0x186')],_0x1c9995[_0x3f21('0x184')]):_0x1c9995[_0x3f21('0x186')]);if(_0x320305){_0x525f28['XMD-ORIGINATECALLERIDNAME']=_0x55fb75[_0x3f21('0xf2')][_0x2d9c1c][_0x3f21('0x187')]=utils['extractCalleridName'](_0x320305);_0x525f28[_0x3f21('0x188')]=_0x1f3652[_0x3f21('0x166')];}_0x1c9995[_0x3f21('0x189')]=_0x525f28;return ami[_0x3f21('0x9e')]({'actionid':_0x2d9c1c,'action':_0x3f21('0x167'),'channel':_0x55fb75['isTrunkReachable'](_0x1c9995['Trunk'])?util[_0x3f21('0x47')](_0x3f21('0x18a'),_0x1c9995[_0x3f21('0x8c')][_0x3f21('0x49')],isNotNull(_0x1c9995['dialPrefix'])?_0x1c9995['dialPrefix'][_0x3f21('0x18b')]()||'':'',_0x1c9995[_0x3f21('0x18c')]>0x0?_0x1f3652[_0x3f21('0x166')]['substring'](_0x1c9995[_0x3f21('0x18c')]):_0x1f3652['phone']):util['format']('SIP/%s/%s%s',_[_0x3f21('0xf8')](_0x1c9995[_0x3f21('0x8d')])?_0x1c9995[_0x3f21('0x8c')][_0x3f21('0x49')]:_0x1c9995[_0x3f21('0x8d')][_0x3f21('0x49')],isNotNull(_0x1c9995[_0x3f21('0x18d')])?_0x1c9995[_0x3f21('0x18d')]['trim']()||'':'',_0x1c9995[_0x3f21('0x18c')]>0x0?_0x1f3652[_0x3f21('0x166')][_0x3f21('0x18e')](_0x1c9995[_0x3f21('0x18c')]):_0x1f3652['phone']),'callerid':_0x320305,'Exten':_0x3f21('0x18f'),'Context':_0x3f21('0x190'),'Priority':'1','variable':_0x525f28,'timeout':(_0x1c9995[_0x3f21('0x191')]||0x1e)*0x3e8,'async':!![],'channelid':_0x2d9c1c})['then'](function(_0x7b2726){return _0x29719b(_0x7b2726);})[_0x3f21('0xa5')](function(_0x143646){_0x1c9995[_0x3f21('0x192')]+=0x1;var _0x3301d1=new History(_0x55fb75['actions'][_0x2d9c1c]);logger['error'](util['format'](_0x3f21('0x193'),JSON[_0x3f21('0x73')](_0x143646)));_0x3301d1['state']=0xe;_0x3301d1[_0x3f21('0x6f')]=_0x3f21('0x194');_0x3301d1[_0x3f21('0x70')]=moment()['format'](_0x3f21('0xc5'));_0x3301d1['endtime']=_0x3301d1['starttime'];hopperUtils[_0x3f21('0xca')](_0x3301d1)[_0x3f21('0xa5')](loggerCatch('[originate][error]'));_0x55fb75['moveContactManagedDialer'](_0x3301d1)[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x195')))['finally'](function(){delete _0x55fb75[_0x3f21('0xf2')][_0x2d9c1c];return _0x139d0b(msgResponse(_0x3f21('0x167'),_0x3f21('0xbf'),_0x3f21('0x196')));});});});};Dialer[_0x3f21('0x19')]['checkRetriveMax']=function(_0x182fb0,_0x481e90,_0x51652c){var _0x412e2b=new History(_0x481e90);if(_0x412e2b[_0x3f21('0x120')]+_0x412e2b['countcongestionretry']+_0x412e2b[_0x3f21('0x121')]+_0x412e2b[_0x3f21('0x122')]+_0x412e2b[_0x3f21('0xd6')]+_0x412e2b[_0x3f21('0xeb')]+_0x412e2b['countmachineretry']+_0x412e2b[_0x3f21('0x12e')]>=_0x51652c[_0x3f21('0x123')]-0x1){return!![];}switch(_0x182fb0){case 0x3:if(_0x412e2b[_0x3f21('0x121')]>=_0x51652c[_0x3f21('0x197')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countnoanswerretry':_0x412e2b[_0x3f21('0x121')]+=0x1,'scheduledat':moment()[_0x3f21('0xdf')](_0x51652c[_0x3f21('0x198')],'minutes')[_0x3f21('0x47')](_0x3f21('0xc5')),'ContactId':_0x412e2b[_0x3f21('0xe1')],'ListId':_0x412e2b['ListId'],'VoiceQueueId':_0x412e2b['VoiceQueueId']||undefined,'CampaignId':_0x412e2b[_0x3f21('0xe4')]||undefined})[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x199')));break;case 0x5:if(_0x412e2b[_0x3f21('0x120')]>=_0x51652c[_0x3f21('0x19a')]-0x1){return!![];}hopperUtils[_0x3f21('0xde')]({'active':![],'countbusyretry':_0x412e2b[_0x3f21('0x120')]+=0x1,'scheduledat':moment()[_0x3f21('0xdf')](_0x51652c['dialBusyRetryFrequency'],'minutes')[_0x3f21('0x47')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x412e2b[_0x3f21('0xe1')],'ListId':_0x412e2b[_0x3f21('0xe2')],'VoiceQueueId':_0x412e2b[_0x3f21('0xe3')]||undefined,'CampaignId':_0x412e2b[_0x3f21('0xe4')]||undefined})[_0x3f21('0xa5')](loggerCatch('[rescheduleContact]\x20[Busy]'));break;case 0x8:if(_0x412e2b[_0x3f21('0x12d')]>=_0x51652c[_0x3f21('0x19b')]-0x1){return!![];}hopperUtils[_0x3f21('0xde')]({'active':![],'countcongestionretry':_0x412e2b[_0x3f21('0x12d')]+=0x1,'scheduledat':moment()[_0x3f21('0xdf')](_0x51652c[_0x3f21('0x19c')],_0x3f21('0xe0'))[_0x3f21('0x47')](_0x3f21('0xc5')),'ContactId':_0x412e2b[_0x3f21('0xe1')],'ListId':_0x412e2b['ListId'],'VoiceQueueId':_0x412e2b[_0x3f21('0xe3')]||undefined,'CampaignId':_0x412e2b['CampaignId']||undefined})['catch'](loggerCatch(_0x3f21('0x19d')));break;case 0x0:if(_0x412e2b[_0x3f21('0x122')]>=_0x51652c[_0x3f21('0x19e')]-0x1){return!![];}else{hopperUtils[_0x3f21('0xde')]({'active':![],'countnosuchnumberretry':_0x412e2b[_0x3f21('0x122')]+=0x1,'scheduledat':moment()['add'](_0x51652c[_0x3f21('0x19f')],'minutes')[_0x3f21('0x47')](_0x3f21('0xc5')),'ContactId':_0x412e2b[_0x3f21('0xe1')],'ListId':_0x412e2b[_0x3f21('0xe2')],'VoiceQueueId':_0x412e2b[_0x3f21('0xe3')]||undefined,'CampaignId':_0x412e2b[_0x3f21('0xe4')]||undefined})['catch'](loggerCatch(_0x3f21('0x1a0')));}break;case 0xa:if(_0x412e2b[_0x3f21('0xd6')]>=_0x51652c[_0x3f21('0xdc')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countdropretry':_0x412e2b[_0x3f21('0xd6')]+=0x1,'scheduledat':moment()[_0x3f21('0xdf')](_0x51652c[_0x3f21('0x1a1')],'minutes')[_0x3f21('0x47')](_0x3f21('0xc5')),'ContactId':_0x412e2b[_0x3f21('0xe1')],'ListId':_0x412e2b[_0x3f21('0xe2')],'VoiceQueueId':_0x412e2b[_0x3f21('0xe3')]||undefined,'CampaignId':_0x412e2b[_0x3f21('0xe4')]||undefined})[_0x3f21('0xa5')](loggerCatch('[rescheduleContact][Drop]'));break;case 0xb:if(_0x412e2b[_0x3f21('0xeb')]>=_0x51652c[_0x3f21('0xed')]-0x1){return!![];}hopperUtils[_0x3f21('0xde')]({'active':![],'countabandonedretry':_0x412e2b[_0x3f21('0xeb')]+=0x1,'scheduledat':moment()['add'](_0x51652c['dialAbandonedRetryFrequency'],'minutes')['format'](_0x3f21('0xc5')),'ContactId':_0x412e2b['ContactId'],'ListId':_0x412e2b[_0x3f21('0xe2')],'VoiceQueueId':_0x412e2b[_0x3f21('0xe3')]||undefined,'CampaignId':_0x412e2b[_0x3f21('0xe4')]||undefined})[_0x3f21('0xa5')](loggerCatch(_0x3f21('0xee')));break;case 0x13:if(_0x412e2b['countmachineretry']>=_0x51652c[_0x3f21('0x125')]-0x1){return!![];}hopperUtils[_0x3f21('0xde')]({'active':![],'countmachineretry':_0x412e2b[_0x3f21('0x11f')]+=0x1,'scheduledat':moment()[_0x3f21('0xdf')](_0x51652c[_0x3f21('0x130')],_0x3f21('0xe0'))[_0x3f21('0x47')](_0x3f21('0xc5')),'ContactId':_0x412e2b[_0x3f21('0xe1')],'ListId':_0x412e2b['ListId'],'VoiceQueueId':_0x412e2b[_0x3f21('0xe3')]||undefined,'CampaignId':_0x412e2b[_0x3f21('0xe4')]||undefined})[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x128')));break;case 0x14:if(_0x412e2b[_0x3f21('0x12e')]>=_0x51652c['dialAgentRejectMaxRetry']-0x1){return!![];}hopperUtils[_0x3f21('0xde')]({'active':![],'countagentrejectretry':_0x412e2b[_0x3f21('0x12e')]+=0x1,'scheduledat':moment()[_0x3f21('0xdf')](_0x51652c[_0x3f21('0x1a2')],_0x3f21('0xe0'))[_0x3f21('0x47')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x412e2b['ContactId'],'ListId':_0x412e2b[_0x3f21('0xe2')],'VoiceQueueId':_0x412e2b[_0x3f21('0xe3')]||undefined,'CampaignId':_0x412e2b[_0x3f21('0xe4')]||undefined})[_0x3f21('0xa5')](loggerCatch('[rescheduleContact][AgentReject]'));break;default:return!![];}};Dialer['prototype']['callProgressDetecting']=function(_0x47af22,_0x383806,_0x1d7d03){var _0x424798=this;var _0x23d60b=new History(_0x47af22);var _0x32d3e3=![];var _0x1401d3;var _0x2391fe;return new Promise(function(_0x579b80,_0x481c97){if(_['isUndefined'](_0x383806)&&typeof _0x383806!==_0x3f21('0x164')){return _0x481c97(msgResponse(_0x3f21('0x1a3'),_0x3f21('0x99'),'entity\x20is\x20undefine'));}if(_[_0x3f21('0x41')](_0x1d7d03)&&typeof _0x1d7d03!==_0x3f21('0x164')){return _0x481c97(msgResponse('[callProgressDetecting]',_0x3f21('0x99'),_0x3f21('0x1a4')));}hopperUtils['verifyAdditionalPhones'](_0x23d60b,_0x1d7d03[_0x3f21('0x1a5')],_0x383806)[_0x3f21('0x3f')](function(_0x4adc40){if(_0x4adc40[_0x3f21('0xdb')]==0x1)_0x32d3e3=!![];switch(_0x1d7d03['reason']){case'0':_0x383806[_0x3f21('0x1a6')]+=0x1;_0x23d60b[_0x3f21('0xe6')]=0x0;_0x23d60b['statedesc']=_0x3f21('0x1a7');_0x23d60b[_0x3f21('0x122')]+=0x1;_0x23d60b[_0x3f21('0xd7')]+=0x1;ami[_0x3f21('0x42')](_0x3f21('0x1a8'),ut[_0x3f21('0x119')](_0x47af22,_0x3f21('0x1a9')));_0x1401d3=_0x383806[_0x3f21('0x19f')];_0x2391fe=_0x383806[_0x3f21('0xd8')];hopperUtils[_0x3f21('0xca')](_0x23d60b)[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x12c')));if(_0x424798[_0x3f21('0x1aa')](0x0,_0x47af22,_0x383806)&&!_0x32d3e3){if(_0x23d60b['countnosuchnumberretry']>=_0x383806[_0x3f21('0x19e')]){_0x424798[_0x3f21('0x126')](_0x23d60b,_0x579b80,_0x481c97,'reason\x200\x20no\x20such\x20number....');}else{_0x424798['stateGlobal'](_0x23d60b,_0x579b80,_0x481c97,_0x3f21('0x1ab'));}}break;case'3':_0x383806[_0x3f21('0x1ac')]+=0x1;_0x23d60b[_0x3f21('0xe6')]=0x3;_0x23d60b[_0x3f21('0x6f')]=_0x3f21('0x1ad');_0x23d60b[_0x3f21('0x121')]+=0x1;_0x23d60b[_0x3f21('0xd7')]+=0x1;var _0x461c45=ut[_0x3f21('0x1ae')](_0x47af22,_0x383806);ami[_0x3f21('0x42')]('custom:agentnoanswer',_0x461c45);_0x1401d3=_0x383806['dialNoAnswerRetryFrequency'];_0x2391fe=_0x383806['callAdditionalPhoneAfterMin'];hopperUtils[_0x3f21('0xca')](_0x23d60b)[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x1af')));if(_0x424798[_0x3f21('0x1aa')](0x3,_0x47af22,_0x383806)&&!_0x32d3e3){if(_0x23d60b['countnoanswerretry']>=_0x383806[_0x3f21('0x197')]){_0x424798[_0x3f21('0x126')](_0x23d60b,_0x579b80,_0x481c97,_0x3f21('0x1b0'));}else{_0x424798[_0x3f21('0x124')](_0x23d60b,_0x579b80,_0x481c97,_0x3f21('0x1b0'));}}break;case'5':_0x383806[_0x3f21('0x1b1')]+=0x1;_0x23d60b[_0x3f21('0xe6')]=0x5;_0x23d60b[_0x3f21('0x6f')]=_0x3f21('0x1b2');_0x23d60b['countbusyretry']+=0x1;_0x23d60b[_0x3f21('0xd7')]+=0x1;ami[_0x3f21('0x42')]('custom:agentbusy',ut[_0x3f21('0x119')](_0x47af22,_0x3f21('0x1b3')));_0x1401d3=_0x383806[_0x3f21('0x1b4')];_0x2391fe=_0x383806['callAdditionalPhoneAfterMin'];hopperUtils[_0x3f21('0xca')](_0x23d60b)['catch'](loggerCatch(_0x3f21('0x1b5')));if(_0x424798[_0x3f21('0x1aa')](0x5,_0x47af22,_0x383806)&&!_0x32d3e3){if(_0x23d60b[_0x3f21('0x120')]>=_0x383806[_0x3f21('0x19a')]){_0x424798['createStateFinal'](_0x23d60b,_0x579b80,_0x481c97,_0x3f21('0x1b6'));}else{_0x424798['stateGlobal'](_0x23d60b,_0x579b80,_0x481c97,'reason\x205\x20busy');}}break;case'8':_0x383806['outboundCongestionCallsDay']+=0x1;_0x23d60b[_0x3f21('0xe6')]=0x8;_0x23d60b[_0x3f21('0x6f')]=_0x3f21('0x1b7');_0x23d60b[_0x3f21('0x12d')]+=0x1;_0x23d60b['countglobal']+=0x1;_0x1401d3=_0x383806[_0x3f21('0x19c')];_0x2391fe=_0x383806[_0x3f21('0xd8')];ami[_0x3f21('0x42')](_0x3f21('0x1b8'),ut[_0x3f21('0x119')](_0x47af22,_0x3f21('0x1b9')));hopperUtils[_0x3f21('0xca')](_0x23d60b)['catch'](loggerCatch('[syncAgentComplete][createHistory][8]'));if(_0x424798[_0x3f21('0x1aa')](0x8,_0x47af22,_0x383806)&&!_0x32d3e3){if(_0x23d60b[_0x3f21('0x12d')]>=_0x383806['dialCongestionMaxRetry']){_0x424798['createStateFinal'](_0x23d60b,_0x579b80,_0x481c97,_0x3f21('0x1ba'));}else{_0x424798[_0x3f21('0x124')](_0x23d60b,_0x579b80,_0x481c97,'reason\x208\x20congestion');}}break;case'11':_0x383806['outboundAbandonedCallsDay']+=0x1;_0x23d60b[_0x3f21('0xe6')]=0xb;_0x23d60b['statedesc']=_0x3f21('0xef');_0x23d60b['countabandonedretry']+=0x1;_0x23d60b['countglobal']+=0x1;_0x1401d3=_0x383806['dialAbandonedRetryFrequency'];_0x2391fe=_0x383806[_0x3f21('0xd8')];hopperUtils[_0x3f21('0xca')](_0x23d60b)[_0x3f21('0xa5')](loggerCatch('[syncAgentComplete][createHistory][11]'));if(_0x424798[_0x3f21('0x1aa')](0xb,_0x47af22,_0x383806)&&!_0x32d3e3){if(_0x23d60b[_0x3f21('0xeb')]>=_0x383806['dialAbandonedMaxRetry']){_0x424798[_0x3f21('0x126')](_0x23d60b,_0x579b80,_0x481c97,_0x3f21('0x1bb'));}else{_0x424798[_0x3f21('0x124')](_0x23d60b,_0x579b80,_0x481c97,'reason\x2011\x20abandoned');}}break;case'20':_0x383806[_0x3f21('0x1bc')]+=0x1;_0x23d60b[_0x3f21('0xe6')]=0x14;_0x23d60b['statedesc']=_0x3f21('0x1bd');_0x23d60b[_0x3f21('0x12e')]+=0x1;_0x23d60b[_0x3f21('0xd7')]+=0x1;_0x1401d3=_0x383806[_0x3f21('0x1a2')];_0x2391fe=_0x383806[_0x3f21('0xd8')];ami[_0x3f21('0x42')](_0x3f21('0x1be'),ut[_0x3f21('0x119')](_0x47af22,_0x3f21('0x1bf')));hopperUtils['createHistory'](_0x23d60b)[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x1c0')));if(_0x424798[_0x3f21('0x1aa')](0x14,_0x47af22,_0x383806)&&!_0x32d3e3){if(_0x23d60b[_0x3f21('0x12e')]>=_0x383806[_0x3f21('0x1c1')]){_0x424798['createStateFinal'](_0x23d60b,_0x579b80,_0x481c97,'reason\x2020\x20agentreject');}else{_0x424798[_0x3f21('0x124')](_0x23d60b,_0x579b80,_0x481c97,_0x3f21('0x1c2'));}}break;default:_0x383806[_0x3f21('0x138')]+=0x1;_0x23d60b[_0x3f21('0xe6')]=0xc;_0x23d60b[_0x3f21('0x6f')]=_0x1d7d03['reason'];_0x1401d3=_0x383806[_0x3f21('0x1a2')];_0x2391fe=_0x383806[_0x3f21('0xd8')];hopperUtils[_0x3f21('0xca')](_0x23d60b)[_0x3f21('0xa5')](loggerCatch('[syncAgentComplete][createHistory][?]'));if(_0x424798[_0x3f21('0x1aa')](_0x1d7d03['reason'],_0x47af22,_0x383806)&&!_0x32d3e3){if(_0x23d60b['countbusyretry']+_0x23d60b[_0x3f21('0x12d')]+_0x23d60b[_0x3f21('0x121')]+_0x23d60b[_0x3f21('0x122')]+_0x23d60b[_0x3f21('0xd6')]+_0x23d60b['countabandonedretry']+_0x23d60b['countmachineretry']+_0x23d60b['countagentrejectretry']>=_0x383806[_0x3f21('0x123')]){_0x424798[_0x3f21('0x124')](_0x23d60b,_0x579b80,_0x481c97,_0x1d7d03[_0x3f21('0x1a5')]);}else{_0x424798[_0x3f21('0x126')](_0x23d60b,_0x579b80,_0x481c97,_0x1d7d03['reason']);}}}})[_0x3f21('0x3f')](function(){if(_0x32d3e3){hopperUtils[_0x3f21('0xea')](_0x23d60b,_0x1401d3,_0x2391fe)[_0x3f21('0x3f')](function(){return _0x579b80(0x1);});}});});};Dialer[_0x3f21('0x19')][_0x3f21('0x124')]=function(_0xe3b2be,_0x4818c9,_0x5967c8,_0xdee5e1){var _0x5410ed=new Final(_0xe3b2be);_0x5410ed[_0x3f21('0xe6')]=0xf;_0x5410ed[_0x3f21('0x6f')]='Global';this[_0x3f21('0x126')](_0x5410ed,_0x4818c9,_0x5967c8,_0xdee5e1);};Dialer['prototype'][_0x3f21('0x126')]=function(_0x2130b3,_0x3f33cc,_0x9c7c5f,_0x70443d){hopperUtils[_0x3f21('0xcb')](_0x2130b3)['then'](function(){return _0x3f33cc(msgResponse(_0x3f21('0x1a3'),_0x3f21('0x10c'),_0x70443d));})['catch'](function(){return _0x9c7c5f(msgResponse(_0x3f21('0x1c3'),_0x3f21('0x99'),_0x3f21('0x1c4')));});};Dialer[_0x3f21('0x19')][_0x3f21('0x1c5')]=function(_0x11a95e){var _0x308e04=_0x11a95e[_0x3f21('0x1c6')]/0x64;var _0x3456ab=_0x11a95e[_0x3f21('0xd2')]/(_0x11a95e[_0x3f21('0xd2')]+_0x11a95e['outboundAnswerCallsDay']);var _0x3094b9=Math[_0x3f21('0x1c7')](_0x11a95e[_0x3f21('0x1c8')]*(_0x11a95e[_0x3f21('0x1c9')]/0x64));var _0x29482b=Math[_0x3f21('0x1c7')](_0x11a95e['predictiveIntervalAvailable']*(_0x11a95e[_0x3f21('0x1ca')]/0x64));var _0x56aad3=_0x11a95e[_0x3f21('0x140')]+_0x11a95e[_0x3f21('0x141')];var _0x259daa=Math['floor'](_0x11a95e[_0x3f21('0x5c')]*_0x11a95e['erlangAbandonmentRate']*_0x11a95e['predictiveIntervalHitRate']*_0x11a95e['predictiveIntervalMultiplicativeFactor']);if(_['isUndefined'](_0x11a95e['startProgressive'])){if(!_['isUndefined'](_0x11a95e[_0x3f21('0x24')])){_0x11a95e[_0x3f21('0x24')]=undefined;loggerPredictive['error'](_0x3f21('0x1cb'),_0x3f21('0x1cc'));}if(!_[_0x3f21('0x41')](_0x11a95e[_0x3f21('0x65')])){loggerPredictive[_0x3f21('0x66')](_0x3f21('0x1cb'),'check\x20handlePredictive\x20is\x20not\x20undefine');clearInterval(_0x11a95e['handlePredictive']);_0x11a95e[_0x3f21('0x65')]=undefined;}_0x11a95e[_0x3f21('0x25')]=moment()[_0x3f21('0x47')](_0x3f21('0xc5'));loggerPredictive[_0x3f21('0x4c')](_0x11a95e['name'],_0x3f21('0x1cd'),_0x11a95e[_0x3f21('0x25')]);this[_0x3f21('0xb4')](_0x11a95e,0x1);}else if(ifInterval(_0x11a95e[_0x3f21('0x1ce')],_0x11a95e['startProgressive'])){this['handlePower'](_0x11a95e,0x1);loggerPredictiveCalls[_0x3f21('0x4c')](_0x3f21('0x1cf'),_0x11a95e['startProgressive'],_0x11a95e['name']);_0x11a95e['erlangCalls']=0x0;_0x11a95e[_0x3f21('0xd3')]=0x0;}else if(_0x308e04<_0x3456ab&&_0x11a95e[_0x3f21('0x1d0')]===_0x3f21('0x1d1')){clearPredictiveAttributes(_0x11a95e);loggerPredictive['info']('[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day',_0x3456ab,'startProgressive',_0x11a95e['name']);}else if(_0x259daa<_0x11a95e['predictiveIntervalErlangCallsDroppedCalls']&&_0x11a95e[_0x3f21('0x1d0')]===_0x3f21('0x1d1')){clearPredictiveAttributes(_0x11a95e);loggerPredictive['info']('[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20',_0x259daa,_0x3f21('0x1d2'),_0x11a95e[_0x3f21('0xd3')],_0x3f21('0x25'),_0x11a95e[_0x3f21('0x49')]);}else if(!ifInterval(_0x11a95e[_0x3f21('0x1ce')],_0x11a95e[_0x3f21('0x25')])&&_[_0x3f21('0x41')](_0x11a95e['startPredictive'])&&!_[_0x3f21('0x41')](_0x11a95e[_0x3f21('0x25')])){_0x11a95e['startPredictive']=moment()[_0x3f21('0x47')](_0x3f21('0xc5'));loggerPredictive['info'](_0x11a95e[_0x3f21('0x49')],'started\x20in\x20predictive\x20at',_0x11a95e['startPredictive']);hopperUtils['avgHandleTime'](_0x11a95e[_0x3f21('0x1ce')])[_0x3f21('0x3f')](this[_0x3f21('0x1d3')](_0x11a95e))[_0x3f21('0x3f')](mergeDataErlangB(_0x11a95e))[_0x3f21('0x3f')](this[_0x3f21('0x1d4')](_0x11a95e))[_0x3f21('0xa5')](loggerCatchPredictive(_0x3f21('0x1d5'),_0x11a95e));}else if(!ifInterval(_0x11a95e['dialPredictiveInterval'],_0x11a95e[_0x3f21('0x24')])){_0x11a95e[_0x3f21('0xd3')]=0x0;_0x11a95e[_0x3f21('0x24')]=moment()[_0x3f21('0x47')](_0x3f21('0xc5'));loggerPredictive[_0x3f21('0x4c')](_0x11a95e[_0x3f21('0x49')],_0x3f21('0x1d6'),_0x11a95e[_0x3f21('0x24')]);clearInterval(_0x11a95e['handlePredictive']);_0x11a95e['handlePredictive']=undefined;hopperUtils[_0x3f21('0x1d7')](_0x11a95e[_0x3f21('0x1ce')])[_0x3f21('0x3f')](this['getDataPredictive'](_0x11a95e))[_0x3f21('0x3f')](mergeDataErlangB(_0x11a95e))['then'](this[_0x3f21('0x1d4')](_0x11a95e))[_0x3f21('0xa5')](loggerCatchPredictive(_0x3f21('0x1d8'),_0x11a95e));}else if(_0x11a95e['predictiveIntervalAvailable']&&_0x56aad3<_0x11a95e[_0x3f21('0x1c8')]-_0x29482b){clearPredictiveAttributes(_0x11a95e);loggerPredictive[_0x3f21('0x4c')](_0x11a95e['name'],'switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',_0x56aad3,_0x3f21('0x1d9'),_0x11a95e[_0x3f21('0x1c8')],'-',_0x29482b,'=',_0x11a95e[_0x3f21('0x1c8')]-_0x29482b,')');}else if(_0x11a95e['predictiveIntervalAvailable']&&_0x56aad3>_0x11a95e[_0x3f21('0x1c8')]+_0x3094b9){clearPredictiveAttributes(_0x11a95e);loggerPredictive[_0x3f21('0x4c')](_0x11a95e[_0x3f21('0x49')],_0x3f21('0x1da'),_0x56aad3,_0x3f21('0x1db'),_0x11a95e['predictiveIntervalAvailable'],'+',_0x3094b9,'=',_0x11a95e[_0x3f21('0x1c8')]+_0x3094b9,')');}};Dialer[_0x3f21('0x19')][_0x3f21('0x1d3')]=function(_0x3ce5af){var _0x1983aa=this;return function(_0x30af5a){return new Promise(function(_0x4f1655,_0x399cac){_[_0x3f21('0x61')](_0x3ce5af,_0x30af5a[0x0]);if(checkGetDataPredictive(_0x30af5a[0x0])){var _0x44b431=_0x3ce5af[_0x3f21('0x1c8')]=_0x3ce5af[_0x3f21('0x141')]+_0x3ce5af[_0x3f21('0x140')];var _0x185cfa=_0x3ce5af['dialPredictiveInterval']*0x3c;var _0x2198b9=_0x30af5a[0x0][_0x3f21('0x56')]+_0x30af5a[0x0][_0x3f21('0x54')];var _0x3ac604=(_0x30af5a[0x0][_0x3f21('0x51')]+_0x30af5a[0x0][_0x3f21('0xd1')]+_0x30af5a[0x0][_0x3f21('0x1dc')])/_0x30af5a[0x0][_0x3f21('0x4f')];_0x3ce5af[_0x3f21('0x1dd')]=_0x3ac604>0x0?_0x3ac604:0x1;switch(_0x3ce5af['dialPredictiveOptimization']){case _0x3f21('0x1d1'):var _0x1d4e54=_0x3ce5af['dialPredictiveOptimizationPercentage']/0x64;return _0x1983aa[_0x3f21('0x1de')](_0x44b431,_0x185cfa,_0x2198b9,_0x3ac604,_0x1d4e54)[_0x3f21('0x3f')](function(_0x1250b6){return _0x4f1655(_0x1250b6);});case'agentBusyFactor':var _0x4c2dc1=_0x3ce5af[_0x3f21('0x1c6')]/0x64;return _0x1983aa[_0x3f21('0x1df')](_0x44b431,_0x185cfa,_0x2198b9,_0x3ac604,_0x4c2dc1)[_0x3f21('0x3f')](function(_0x4dbcf1){return _0x4f1655(_0x4dbcf1);});default:return _0x399cac(msgResponse(_0x3f21('0x1e0'),_0x3f21('0x99'),'Unknown\x20Predictive'));}}else{return _0x399cac(msgResponse('[getDataPredictive]',_0x3f21('0x99'),'check\x20failure'));}});};};Dialer[_0x3f21('0x19')][_0x3f21('0x1e1')]=function(_0x19876b){var _0x37205c=this;return function(_0x54dfcb){return new Promise(function(_0x30fb53,_0x27df85){_[_0x3f21('0x61')](_0x19876b,_0x54dfcb[0x0]);if(checkGetDataPredictive(_0x54dfcb[0x0])){loggerPredictive[_0x3f21('0x4c')](JSON[_0x3f21('0x73')](_0x54dfcb[0x0]));if(_0x19876b[_0x3f21('0x1d0')]===_0x3f21('0x1d1')){return _0x37205c[_0x3f21('0x158')](_0x19876b['id'])[_0x3f21('0x3f')](function(_0x330aca){var _0x2e2751=_0x19876b[_0x3f21('0x1e2')]-_0x330aca[0x0][_0x3f21('0x1e3')];var _0x5294a2=_0x19876b['dialPredictiveInterval']*0x3c;var _0x22ddc7=_0x54dfcb[0x0][_0x3f21('0x56')]+_0x54dfcb[0x0][_0x3f21('0x54')];var _0x40a705=(_0x54dfcb[0x0][_0x3f21('0x51')]+_0x54dfcb[0x0]['predictiveIntervalDroppedCallsTimeout']+_0x54dfcb[0x0][_0x3f21('0x1dc')])/_0x54dfcb[0x0][_0x3f21('0x4f')];var _0x4029a=_0x19876b[_0x3f21('0x1c6')]/0x64;_0x19876b[_0x3f21('0x1e4')]=_0x330aca[0x0][_0x3f21('0x1e3')]||0x0;_0x19876b[_0x3f21('0x1dd')]=_0x40a705>0x0?_0x40a705:0x1;return _0x37205c[_0x3f21('0x1de')](_0x2e2751,_0x5294a2,_0x22ddc7,_0x40a705,_0x4029a);})[_0x3f21('0x3f')](function(_0x3666a1){return _0x30fb53(_0x3666a1);})['catch'](function(_0xbed9a1){return _0x27df85(msgResponse('[CatchErlangB]',_0x3f21('0x99'),JSON[_0x3f21('0x73')](_0xbed9a1)));});}if(_0x19876b[_0x3f21('0x1d0')]==='agentBusyFactor'){return _0x37205c[_0x3f21('0x158')](_0x19876b['id'])[_0x3f21('0x3f')](function(_0x37029c){var _0x5edbc3=_0x19876b['loggedIn']-_0x37029c[0x0][_0x3f21('0x1e3')];var _0xfcfd7d=_0x19876b['dialPredictiveInterval']*0x3c;var _0x347674=_0x54dfcb[0x0]['predictiveIntervalAvgTalktime']+_0x54dfcb[0x0][_0x3f21('0x54')];var _0x543bc8=(_0x54dfcb[0x0][_0x3f21('0x51')]+_0x54dfcb[0x0][_0x3f21('0xd1')]+_0x54dfcb[0x0]['predictiveIntervalDroppedCallsCallersExit'])/_0x54dfcb[0x0][_0x3f21('0x4f')];var _0x46e5ed=_0x19876b[_0x3f21('0x1c6')]/0x64;_0x19876b[_0x3f21('0x1e4')]=_0x37029c[0x0][_0x3f21('0x1e3')]||0x0;_0x19876b[_0x3f21('0x1dd')]=_0x543bc8>0x0?_0x543bc8:0x1;return _0x37205c['busyFactor'](_0x5edbc3,_0xfcfd7d,_0x347674,_0x543bc8,_0x46e5ed);})['then'](function(_0x3db584){return _0x30fb53(_0x3db584);})[_0x3f21('0xa5')](function(_0x299417){return _0x27df85(msgResponse(_0x3f21('0x1e5'),_0x3f21('0x99'),JSON[_0x3f21('0x73')](_0x299417)));});}}else{return _0x27df85(msgResponse(_0x3f21('0x1e0'),_0x3f21('0x99'),'check\x20failure'));}});};};Dialer[_0x3f21('0x19')][_0x3f21('0x1d4')]=function(_0x2d09d1){var _0x2fd646=this;return function(){var _0xb882b2=0x0;var _0x1eff30=Math[_0x3f21('0x1e6')](_0x2d09d1['erlangCallToSecond']*0x3e8);if(_0x1eff30>0x0){_0x1eff30=_0x1eff30<0x64?0x64:_0x1eff30;loggerPredictive['info'](_0x2d09d1[_0x3f21('0x49')],_0x3f21('0x1e7'),_0x1eff30,_0x3f21('0x1e8'));_0x2d09d1[_0x3f21('0x65')]=setInterval(function(){_0x2fd646[_0x3f21('0x65')](_0x2d09d1);loggerPredictiveCalls['info']('[handlePredictive]',_0xb882b2+=0x1);},_0x1eff30);}else{loggerPredictive[_0x3f21('0x4c')](_0x2d09d1[_0x3f21('0x49')],_0x3f21('0x1e9'));}};};Dialer[_0x3f21('0x19')][_0x3f21('0x1ea')]=function(_0x1faad4,_0x3dcb47){var _0x1a693a=this;return function(_0x1915f6){if(_[_0x3f21('0x4b')](_0x1915f6)){if(_[_0x3f21('0xf8')](_0x3dcb47['UserId'])||!_0x3dcb47[_0x3f21('0x1eb')]){if(_0x1faad4[_0x3f21('0xb2')]===_0x3f21('0xa')){_0x1faad4['queueStatusComplete']=_[_0x3f21('0x41')](_0x1faad4[_0x3f21('0x71')])?!![]:_0x1faad4[_0x3f21('0x71')];var _0x516d59=uuid['v4']();_0x1a693a[_0x3f21('0xf2')][_0x516d59]=new Action(_0x1faad4,_0x3dcb47,_0x516d59);loggerBooked[_0x3f21('0x4c')](_0x3f21('0x1ec'),_0x516d59,_0x3f21('0x1ed'),JSON[_0x3f21('0x73')](_0x1faad4[_0x3f21('0x71')]),_0x3f21('0x1ee'),_0x1faad4['name']);if(_0x1faad4[_0x3f21('0x71')]){_0x1faad4['queueStatusComplete']=![];_0x1a693a[_0x3f21('0x27')][_0x1a693a[_0x3f21('0xf2')][_0x516d59]['queue']]=[];ami[_0x3f21('0x9e')]({'actionid':_0x516d59,'action':_0x3f21('0x1ef'),'queue':_0x1faad4[_0x3f21('0x49')]})[_0x3f21('0xa5')](function(){_0x1a693a[_0x3f21('0xc3')](_0x1faad4);hopperUtils[_0x3f21('0xde')]({'active':![],'ContactId':_0x1a693a['actions'][_0x516d59]['ContactId'],'ListId':_0x1a693a['actions'][_0x516d59]['ListId'],'VoiceQueueId':_0x1a693a['actions'][_0x516d59]['VoiceQueueId']||undefined,'CampaignId':_0x1a693a[_0x3f21('0xf2')][_0x516d59][_0x3f21('0xe4')]||undefined})['catch'](loggerCatch('[unlockOriginate][syncQueueStatusComplete]'));delete _0x1a693a[_0x3f21('0xf2')][_0x516d59];});}else{loggerBooked[_0x3f21('0x4c')]('[booked][checkContactBlack][else]',JSON['stringify'](_0x1faad4[_0x3f21('0x71')]),_0x3f21('0x1ee'),_0x1faad4[_0x3f21('0x49')]);_0x1a693a[_0x3f21('0xc3')](_0x1faad4);hopperUtils['rescheduleContact']({'active':![],'ContactId':_0x1a693a['actions'][_0x516d59][_0x3f21('0xe1')],'ListId':_0x1a693a[_0x3f21('0xf2')][_0x516d59][_0x3f21('0xe2')],'VoiceQueueId':_0x1a693a[_0x3f21('0xf2')][_0x516d59][_0x3f21('0xe3')]||undefined,'CampaignId':_0x1a693a['actions'][_0x516d59]['CampaignId']||undefined})['catch'](loggerCatch(_0x3f21('0x1f0')));delete _0x1a693a[_0x3f21('0xf2')][_0x516d59];}}else{return _0x1a693a[_0x3f21('0x163')](_0x1faad4,_0x3dcb47);}}else{if(utils['getSeconds'](undefined,_0x3dcb47[_0x3f21('0x1f1')])<_0x1faad4[_0x3f21('0x1f2')]*0x3c){if(_0x3dcb47[_0x3f21('0x14e')]&&!_0x3dcb47[_0x3f21('0x14e')][_0x3f21('0x1f3')]){_0x1a693a[_0x3f21('0x1d')][_0x3f21('0x106')](_0x3dcb47['id'])[_0x3f21('0x1b')](function(){_0x1a693a[_0x3f21('0xc3')](_0x1faad4);});}else{hopperUtils[_0x3f21('0x1f4')]({'active':![]},_0x3dcb47['id'],0x1)[_0x3f21('0x1b')](function(){_0x1a693a['updateOriginated'](_0x1faad4);});}}else{_0x1faad4[_0x3f21('0x1f5')]+=0x1;_0x1a693a[_0x3f21('0xc3')](_0x1faad4);if(_0x1faad4[_0x3f21('0x1f6')]){hopperUtils[_0x3f21('0xde')]({'active':![],'recallme':![],'UserId':null,'ContactId':_0x3dcb47['ContactId'],'ListId':_0x3dcb47[_0x3f21('0xe2')],'VoiceQueueId':_0x3dcb47[_0x3f21('0xe3')]||undefined,'CampaignId':_0x3dcb47['CampaignId']||undefined})[_0x3f21('0xa5')](loggerCatch('[rescheduleContact][dialRecallInQueue]'));hopperUtils[_0x3f21('0xca')](createObjHistory(_0x1faad4,_0x3dcb47,utils[_0x3f21('0x6a')][_0x3f21('0x1f7')],0x17,_0x3f21('0x1f8')))['catch'](loggerCatch(_0x3f21('0x1f9')));}else{_0x1a693a[_0x3f21('0x11b')](createObjHistory(_0x1faad4,_0x3dcb47,utils[_0x3f21('0x6a')]['RECALL_TIMEOUT'],0x16,_0x3f21('0x1fa')),_0x3f21('0x1fb'),_0x3f21('0x1fc'));}}}}else{_0x1faad4['outboundBlacklistCallsDay']+=0x1;_0x1a693a[_0x3f21('0x11b')](createObjHistory(_0x1faad4,_0x3dcb47,utils[_0x3f21('0x6a')][_0x3f21('0x1fd')],0xd,'Blacklist'),_0x3f21('0x1fe'),_0x3f21('0x1ff'));throw _0x3f21('0x200');}};};Dialer[_0x3f21('0x19')]['handleIvr']=function(_0x22d864){var _0x334d3d=this;var _0x2722e7=_0x22d864[_0x3f21('0x201')]-_0x22d864[_0x3f21('0x7e')];emitCampaignSummary(_0x22d864);if(_0x2722e7>0x0&&_0x22d864[_0x3f21('0x68')]==0x0){if(_0x2722e7>this[_0x3f21('0x202')]){_0x2722e7=this[_0x3f21('0x202')];}_0x22d864['temp']=0x1;hopperUtils['getContactDialerIvr'](_0x22d864,_0x2722e7)[_0x3f21('0x3f')](function(_0x31fb0a){_0x22d864[_0x3f21('0x68')]=0x0;if(_0x31fb0a){if(!utils['checkContactEmpty'](_0x31fb0a)){_0x22d864['message']=utils[_0x3f21('0x6a')][_0x3f21('0x203')];logger['info'](_0x3f21('0x204')+_0x22d864[_0x3f21('0x49')]);}else{_0x22d864[_0x3f21('0x7e')]+=_0x31fb0a['length'];_0x22d864['message']=utils[_0x3f21('0x6a')][_0x3f21('0x205')];for(var _0x2f523c=0x0;_0x2f523c<_0x31fb0a[_0x3f21('0x9c')];_0x2f523c+=0x1){_0x22d864[_0x3f21('0x206')]+=0x1;if(_['isNil'](_0x31fb0a[_0x2f523c])||_[_0x3f21('0xf8')](_0x31fb0a[_0x2f523c][_0x3f21('0x180')])||_['isNil'](_0x31fb0a[_0x2f523c]['phone'])){_0x334d3d[_0x3f21('0x15c')](_0x3f21('0x207'),_0x22d864,_0x31fb0a[_0x2f523c]);}else{hopperUtils['checkIsBlackListIvr'](_[_0x3f21('0x104')](_0x31fb0a[_0x2f523c],[_0x3f21('0xe4'),_0x3f21('0x166')]))[_0x3f21('0x3f')](_0x334d3d[_0x3f21('0x1ea')](_0x22d864,_0x31fb0a[_0x2f523c]))[_0x3f21('0xa5')](_0x334d3d[_0x3f21('0x15b')](_0x3f21('0x208'),_0x22d864));}}}}})[_0x3f21('0xa5')](loggerGetContactDialer(_0x3f21('0x209'),_0x22d864,_0x2722e7));}};Dialer['prototype'][_0x3f21('0xb4')]=function(_0x48f24e,_0x5cb258){var _0x404769=this;var _0x1fb02c=[];if(_0x5cb258<0x1||_0x48f24e['dialMethod']===_0x3f21('0xa')){_0x5cb258=0x1;}var _0x193ded=Math['floor'](_0x48f24e[_0x3f21('0x140')]*_0x5cb258)-_0x48f24e[_0x3f21('0x7e')];if(_0x48f24e[_0x3f21('0x20a')]>0x0){var _0x247858=_0x48f24e['dialLimitQueue']-_0x48f24e[_0x3f21('0x7e')]-_0x48f24e[_0x3f21('0x141')]-_0x48f24e['pTalking'];if(_0x193ded>_0x247858){_0x193ded=_0x247858;}}if(_0x193ded>0x0&&_0x48f24e[_0x3f21('0x68')]==0x0){if(_0x48f24e[_0x3f21('0xb2')]===_0x3f21('0xa')){_0x193ded=0x1;}if(_0x193ded>this[_0x3f21('0x202')]){_0x193ded=this[_0x3f21('0x202')];}for(var _0x1e57ec in this['agents']){if(typeof this[_0x3f21('0xfa')][_0x1e57ec]!==_0x3f21('0xac')){if(this[_0x3f21('0xfa')][_0x1e57ec]['state']===_0x3f21('0x20b')&&this[_0x3f21('0xfa')][_0x1e57ec]['status']==='reachable'){_0x1fb02c[_0x3f21('0x9d')](this[_0x3f21('0xfa')][_0x1e57ec]['id']);}}}_0x48f24e[_0x3f21('0x68')]=0x1;hopperUtils[_0x3f21('0x20c')](_0x48f24e,_0x1fb02c,_0x193ded)['then'](function(_0x5946e7){_0x48f24e['temp']=0x0;if(_0x5946e7){if(!utils[_0x3f21('0x20d')](_0x5946e7)){hopperUtils[_0x3f21('0x20e')](_0x48f24e)['then'](sendMessageReschedule(_0x48f24e))[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x20f')));}else{_0x48f24e[_0x3f21('0x7e')]+=_0x5946e7['length'];_0x48f24e[_0x3f21('0x6d')]=_0x48f24e[_0x3f21('0xb2')]===_0x3f21('0xa')?utils[_0x3f21('0x6a')][_0x3f21('0x143')]:utils['CAMPAIGN_STATUS'][_0x3f21('0x205')];for(var _0x17ba30=0x0;_0x17ba30<_0x5946e7[_0x3f21('0x9c')];_0x17ba30+=0x1){if(_['isNil'](_0x5946e7[_0x17ba30])||_[_0x3f21('0xf8')](_0x5946e7[_0x17ba30][_0x3f21('0x180')])||_['isNil'](_0x5946e7[_0x17ba30][_0x3f21('0x166')])){_0x404769[_0x3f21('0x15c')](_0x3f21('0x207'),_0x48f24e,_0x5946e7[_0x17ba30]);}else{hopperUtils[_0x3f21('0x210')](_[_0x3f21('0x104')](_0x5946e7[_0x17ba30],[_0x3f21('0xe3'),_0x3f21('0x166')]))[_0x3f21('0x3f')](_0x404769[_0x3f21('0x1ea')](_0x48f24e,_0x5946e7[_0x17ba30]))[_0x3f21('0xa5')](_0x404769[_0x3f21('0x15b')](_0x3f21('0x207'),_0x48f24e));}}}}})[_0x3f21('0xa5')](loggerGetContactDialer(_0x3f21('0x211'),_0x48f24e,_0x193ded));}};Dialer[_0x3f21('0x19')][_0x3f21('0x65')]=function(_0x3fd98d){if(_0x3fd98d[_0x3f21('0x20a')]>0x0){var _0x1b80b3=_0x3fd98d[_0x3f21('0x20a')]-_0x3fd98d[_0x3f21('0x7e')]-_0x3fd98d[_0x3f21('0x141')];if(_0x1b80b3>0x0&&_0x3fd98d['temp']==0x0){this[_0x3f21('0x212')](_0x3fd98d);}else{loggerPredictiveCalls[_0x3f21('0x4c')](_0x3f21('0x213'));}}else{this[_0x3f21('0x212')](_0x3fd98d);}};Dialer['prototype'][_0x3f21('0x212')]=function(_0xc79240){var _0x5023a2=this;var _0x4aefa4=[];_0xc79240[_0x3f21('0x7e')]+=0x1;for(var _0xe13e1f in this['agents']){if(typeof this['agents'][_0xe13e1f]!==_0x3f21('0xac')){if(this[_0x3f21('0xfa')][_0xe13e1f][_0x3f21('0xe6')]===_0x3f21('0x20b')&&this[_0x3f21('0xfa')][_0xe13e1f][_0x3f21('0x88')]===_0x3f21('0x89')){_0x4aefa4[_0x3f21('0x9d')](this[_0x3f21('0xfa')][_0xe13e1f]['id']);}}}_0xc79240[_0x3f21('0x68')]=0x1;return this['getContactDialer'](_0xc79240['id'],_0x4aefa4,0x1,_0xc79240[_0x3f21('0x214')],_0xc79240)[_0x3f21('0x3f')](function(_0x5d7e73){_0xc79240[_0x3f21('0x68')]=0x1;if(_0x5d7e73){if(!utils[_0x3f21('0x20d')](_0x5d7e73)){utils[_0x3f21('0x67')](_0xc79240,0x1,0x0);return hopperUtils[_0x3f21('0x20e')](_0xc79240)[_0x3f21('0x3f')](sendMessageReschedule(_0xc79240))[_0x3f21('0xa5')](loggerCatch(_0x3f21('0x20f')));}else{_0xc79240[_0x3f21('0x6d')]=utils[_0x3f21('0x6a')][_0x3f21('0x205')];if(_[_0x3f21('0xf8')](_0x5d7e73[0x0])||_[_0x3f21('0xf8')](_0x5d7e73[0x0][_0x3f21('0x180')])||_[_0x3f21('0xf8')](_0x5d7e73[0x0][_0x3f21('0x166')])){_0x5023a2[_0x3f21('0x15c')](_0x3f21('0x207'),_0xc79240,_0x5d7e73[0x0]);}else{return hopperUtils[_0x3f21('0x210')](_[_0x3f21('0x104')](_0x5d7e73[0x0],[_0x3f21('0xe3'),_0x3f21('0x166')]))[_0x3f21('0x3f')](_0x5023a2[_0x3f21('0x1ea')](_0xc79240,_0x5d7e73[0x0]))[_0x3f21('0xa5')](_0x5023a2['loggerHandler'](_0x3f21('0x215'),_0xc79240));}}}})[_0x3f21('0xa5')](loggerGetContactDialer('[getContactDialerPredictive]',_0xc79240,0x1));};Dialer[_0x3f21('0x19')][_0x3f21('0x1de')]=function(_0x1c9868,_0x35b1e4,_0x12604d,_0x4ed373,_0x28e606,_0x3e9583){loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x216'));loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x217'),_0x1c9868);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x218'),_0x35b1e4);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x219'),_0x12604d);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x21a'),_0x4ed373);loggerPredictive['info'](_0x3f21('0x21b'),_0x28e606);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x57'));return new Promise(function(_0x5d8baf,_0x5e0237){if(_0x1c9868<=0x0||isNaN(_0x1c9868)){return _0x5e0237(msgResponse(_0x3f21('0x21c'),_0x3f21('0xbf'),'m\x20=\x20'+_0x1c9868));}if(_0x12604d<=0x0||isNaN(_0x12604d)){return _0x5e0237(msgResponse('[abandonmentRate]',_0x3f21('0xbf'),_0x3f21('0x21d')+_0x12604d));}if(_0x4ed373<=0x0||isNaN(_0x4ed373)){return _0x5e0237(msgResponse(_0x3f21('0x21c'),_0x3f21('0xbf'),_0x3f21('0x21e')+_0x4ed373));}if(_0x35b1e4<=0x0||isNaN(_0x35b1e4)){return _0x5e0237(msgResponse(_0x3f21('0x21c'),_0x3f21('0xbf'),'interval\x20=\x20'+_0x35b1e4));}if(_0x28e606<=0x0||isNaN(_0x28e606)){return _0x5e0237(msgResponse(_0x3f21('0x21c'),_0x3f21('0xbf'),'Amax\x20=\x20'+_0x28e606));}_0x3e9583=_0x3e9583||0x0;var _0x5f2aa0=0x1/_0x12604d;var _0x47c427=0x0;var _0x59e75d=0x0;var _0x574125=0x0;var _0x469ccb=0x0;for(var _0x4c4b9f=0x0;_0x574125<_0x28e606;_0x4c4b9f+=0x1){_0x59e75d=_0x4c4b9f/_0x35b1e4;_0x47c427=(_0x4ed373*_0x59e75d+_0x3e9583)/_0x5f2aa0;_0x574125=utils[_0x3f21('0x21f')](_0x47c427,_0x1c9868);_0x469ccb=_0x47c427/_0x1c9868*(0x1-utils[_0x3f21('0x21f')](_0x47c427,_0x1c9868));}return _0x5d8baf({'erlangCalls':_0x4c4b9f,'erlangCallToSecond':_0x35b1e4/_0x4c4b9f,'erlangAbandonmentRate':_0x574125,'erlangBusyFactor':_0x469ccb});});};Dialer[_0x3f21('0x19')][_0x3f21('0x1df')]=function(_0x5e4013,_0x42963d,_0x1d5848,_0x44acb1,_0x2e034b,_0x5322a3){loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x220'));loggerPredictive[_0x3f21('0x4c')]('M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x5e4013);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x218'),_0x42963d);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x219'),_0x1d5848);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x21a'),_0x44acb1);loggerPredictive['info'](_0x3f21('0x221'),_0x2e034b);loggerPredictive[_0x3f21('0x4c')](_0x3f21('0x57'));return new Promise(function(_0x370f3a,_0x1712f3){if(_0x5e4013<=0x0||isNaN(_0x5e4013)){return _0x1712f3(msgResponse('[busyFactor]',_0x3f21('0xbf'),_0x3f21('0x222')+_0x5e4013));}if(_0x1d5848<=0x0||isNaN(_0x1d5848)){return _0x1712f3(msgResponse(_0x3f21('0x223'),_0x3f21('0xbf'),_0x3f21('0x21d')+_0x1d5848));}if(_0x44acb1<=0x0||isNaN(_0x44acb1)){return _0x1712f3(msgResponse('[busyFactor]','Error',_0x3f21('0x21e')+_0x44acb1));}if(_0x42963d<=0x0||isNaN(_0x42963d)){return _0x1712f3(msgResponse(_0x3f21('0x223'),_0x3f21('0xbf'),_0x3f21('0x224')+_0x42963d));}if(_0x2e034b<=0x0||isNaN(_0x2e034b)){return _0x1712f3(msgResponse(_0x3f21('0x223'),_0x3f21('0xbf'),_0x3f21('0x225')+_0x2e034b));}_0x5322a3=_0x5322a3||0x0;var _0x2015a0=0x1/_0x1d5848;var _0x19b504=0x0;var _0x16397a=0x0;var _0x2dd3d3=0x0;var _0x5407c8=0x0;for(var _0x2b0119=0x0;_0x5407c8<_0x2e034b;_0x2b0119+=0x1){_0x16397a=_0x2b0119/_0x42963d;_0x19b504=(_0x44acb1*_0x16397a+_0x5322a3)/_0x2015a0;_0x2dd3d3=utils[_0x3f21('0x21f')](_0x19b504,_0x5e4013);_0x5407c8=_0x19b504/_0x5e4013*(0x1-utils[_0x3f21('0x21f')](_0x19b504,_0x5e4013));}return _0x370f3a({'erlangCalls':_0x2b0119,'erlangCallToSecond':_0x42963d/_0x2b0119,'erlangAbandonmentRate':_0x2dd3d3,'erlangBusyFactor':_0x5407c8});});};module[_0x3f21('0x226')]=Dialer;
\ No newline at end of file
+var _0x320e=['Dropped\x20Exit:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','AVG\x20Hold\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','AVG\x20Talk\x20Time:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','---------------------------','predictiveIntervalAvgTalktime','Avg\x20Talk\x20Time\x20is\x20not\x20enough\x20for\x20predictive','predictiveIntervalAvgHoldtime','Avg\x20Hold\x20Time\x20is\x20not\x20enough\x20for\x20predictive','Total\x20Calls\x20are\x20not\x20enough\x20for\x20predictive','erlangCalls','One\x20call\x20every:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangCallToSecond','erlangAbandonmentRate','Agent\x20Busy\x20Factor:\x20\x20\x20\x20\x20\x20\x20\x20\x20','erlangBusyFactor','Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','getSeconds','startProgressive','startProgressive\x20value\x20cleared','startPredictive\x20value\x20cleared','handlePredictive','handlePredictive\x20interval\x20cleared','error','stack','inspect','checkContactLowerLimitOriginate','temp','CAMPAIGN_STATUS','contactsRescheduled','contacts','message','NO_AVAILABLE_CONTACTS','[getContactDialer2][Empty]','statedesc','endtime','starttime','queueStatusComplete','[unlockQueueStatus][undefined]','[booked][unlockQueueStatus]','pick','Interval','NULL_INTERVAL','\x20INTERVAL_IS_NULL','Intervals','isIVRCampaignActive','\x20NOT\x20Active','isIVRCampaign','campaign:ivr:%s','sendMessageOneNotActive','originated','[syncQueueSummary]\x20Campaign\x20Ivr:\x20','is\x20not\x20active','DISACTIVED','is\x20disactive','[ifTime][Action]','isTrunkReachable','active','SIP/%s','status','reachable','unmonitored','prototype','checkIsTrunkReachable','TrunkBackup','TRUNK_NOT_REACHABLE','\x20trunk\x20is\x20not\x20reachable','ifTimeIvr','ifTime','Failure','EMPTY_INTERVAL','\x20Intervals\x20is\x20empty\x20','UNKNOWN_TIMEZONE','isArray','length','push','Action','command','interval','timezones','then','content','true','iftime\x20%s,%s','indexOf','catch','all','some','OVERTIME_GLOBAL_INTERVAL','OVERTIME_INTERVAL','[ifTime][promiseAll]','Global:\x20','\x20Interval\x20is\x20overtime:\x20','stringify','loopCampaigns','resetActiveCalls','syncCampaigns','undefined','checkIfTime','dialGlobalInterval','dialTimezone','checkIfTimeIntervals','launchHandleIvr','[syncCampaigns]','checkDialMethod','dialMethod','progressive','handlePower','power','dialPowerLevel','Queue','method\x20not\x20recognized','silly','Voice\x20Queue\x20%s\x20$s','intervalIftime','Timezone:\x20','Dialer::ifTime()\x20errResponse\x20NOT\x20NULL:','isGlobal','AMI\x20IfTime','Error','syncAgentConnect','queue','type','ivr','updateOriginated','answertime','YYYY-MM-DD\x20HH:mm:ss','uniqueid','reason','agent','dialQueueProject2','dialAgiAfterHangupAgent','createHistory','[syncAgentComplete][createHistory]','droptime','responsetime','dialQueueTimeout','predictiveIntervalDroppedCallsTimeout','outboundDropCallsDayTimeout','predictiveIntervalErlangCallsDroppedCalls','state','Drop','dropreason','TIMEOUT','agiafterat','countdropretry','countglobal','callAdditionalPhoneAfterMin','verifyAdditionalPhones','voiceQueue','additional','dialDropMaxRetry','queueCallerAbandonCreateState','rescheduleContact','add','dialDropRetryFrequency','minutes','ContactId','ListId','VoiceQueueId','CampaignId','[rescheduleContact][Drop]','calleridname','calleridnum','[syncAgentComplete][createHistory][10]','swapAdditionalPhones','outboundDropCallsDayCallersExit','Abandoned','CALLEREXIT','dialAbandonedRetryFrequency','countabandonedretry','dialAbandonedMaxRetry','[rescheduleContact][Abandoned]','[syncAgentComplete][createHistory][11]','channel','actionid','strategy','roundrobin','isNil','locked','paused','stateinterface','rrmemory','merge','idHopper','run','[Catch][Preview][syncQueueStatusComplete]','[unlock][syncQueueStatusComplete]','_rr','unlockRR','Agent:\x20','contactAgent-idHopper:\x20','[booked][unlock]','[booked][unlock2]','[unlock2][syncQueueStatusComplete]','[unlock3][syncQueueStatusComplete]','response','[callProgressDetecting]\x20','syncVarSet','variable','amdstatus','xcally-motion-dialer','dialAMDActive','value','HANGUP','outboundAnswerCallsDay','outboundAnswerAgiCallsDay','HangupInAMD','membername','AMD','custom:amd','buildObj','amd','saveInDb','[syncHangupInAMD][createHistory]','[syncHangupInAMD]','MACHINE','Machine','countmachineretry','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countagentrejectretry','dialGlobalMaxRetry','dialMachineMaxRetry','createStateFinal','reason\x2019\x20machine....','dialMachineRetryFrequency','[syncHangupInAMDIvr]','[syncAgentComplete][createHistory][0]','stateGlobal','reason19\x20machine....','syncHangup','ivrAnswerCallsDay','[syncHangupIvr][createHistory]','moveContactManagedDialer','[syncHangupIvr]','dialQueueProject','AnswerAGI','AGI','Normal\x20Clearing','[syncAgentComplete]','outboundUnknownCallsDay','cause-txt','Unknow','running','INACTIVE','statusMessage','resolve','inUse','talking','pTalking','ACTIVE','[syncQueueSummary]','queueSummaryCountersUpdated','updateReportFromOutboundQueue','assign','syncQueueSummaryComplete','throttle','filter','dialPreviewRecallmeReminder','online','handlePreviewRecallNotifications','map','Agent','user:dialPreviewRecallReminder','clearZombieChannels','[uniqueid]','No\x20such\x20channel','[Dialer][checkChannel]','[Dialer][checkChannel][ivr]','getVoiceQueueRtPauses','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','loggerHandler','notFound','UserId','[syncQueueCallerAbandon]\x20[Drop]','checkPreviewRecallReminder','user:%s','handleIvr','actionOriginate','object','voiceQueue\x20is\x20undefine','phone','originate','contact\x20is\x20undefine','\x22agi://%s/square,%s\x22','NONE','isOutboundQueue','dialQueueOptions','XMD-AMDINITIALSILENCE','XMD-AMDGREETING','dialAMDGreeting','XMD-AMDAFTERGREETINGSILENCE','XMD-AMDTOTALANALYSISTIME','XMD-AMDMINWORDLENGTH','dialAMDMinWordLength','dialAMDBetweenWordsSilence','XMD-AMDMAXIMUMNUMBEROFWORDS','dialAMDMaximumNumberOfWords','XMD-AMDSILENCETHRESHOLD','XMD-AMDMAXIMUMWORDLENGTH','dialAMDMaximumWordLength','XMD-VOICEQUEUEID','setXMDContactVariables','Contact','Trunk','getCallerId','dialOriginateCallerIdName','getCallerIdRandom','dialOriginateCallerIdNumber','callerid','dialRandomLastDigitCallerIdNumber','originatecalleridname','extractCalleridName','XMD-ORIGINATECALLERIDNUM','variables','dialPrefix','trim','substring','SIP/%s/%s%s','dialCutDigit','from-sip','dialOriginateTimeout','outboundOriginateFailureCallsDay','[originateError]:\x20%s','OriginateError','[originate][error]','originate\x20action\x20Error','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','[rescheduleContact][NoAnswer]','dialBusyMaxRetry','dialBusyRetryFrequency','[rescheduleContact]\x20[Busy]','dialCongestionMaxRetry','[rescheduleContact]\x20[Congestion]','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','[rescheduleContact][NoSuchNumber]','[rescheduleContact][Machine]','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','callProgressDetecting','[callProgressDetecting]','entity\x20is\x20undefine','evt\x20is\x20undefine','NoSuchNumber','nosuchnumber','reason\x200\x20no\x20such\x20number....','outboundNoAnswerCallsDay','buildNoAnswerEventPayload','checkRetriveMax','reason\x203\x20ringing\x20no\x20answer','outboundBusyCallsDay','Busy','custom:agentbusy','busy','[syncAgentComplete][createHistory][5]','reason\x205\x20busy','outboundCongestionCallsDay','dialCongestionRetryFrequency','congestion','[syncAgentComplete][createHistory][8]','reason\x208\x20congestion','reason\x2011\x20abandoned','outboundRejectCallsDay','AgentReject','[syncAgentComplete][createHistory][20]','reason\x2020\x20agentreject','[syncAgentComplete][createHistory][?]','Global','[moveContactManagedDialer][0]','dialPredictiveOptimizationPercentage','predictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','available','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','[startMethodPredictive][StartProgressive]','check\x20handlePredictive\x20is\x20not\x20undefine','collection\x20data\x20in\x20progressive\x20at','dialPredictiveInterval','[startMethodPredictive][StartProgressive][Loop]','dialPredictiveOptimization','dropRate','[stopMethodPredictive][ReStartProgressive][ExceededDropDay]','Dropped\x20calls\x20day','[stopMethodPredictive][ReStartProgressive][ExceededDropInterval]','Max\x20Drop\x20','Drop\x20in\x20this\x20interval','avgHandleTime','getDataPredictive','startMethodPredictive','Predictive\x20after\x20first\x20interval','recalculate\x20predictive\x20at','predictiveIntervalAvailable','switch\x20in\x20progressive\x20because\x20available\x20agents\x20(',')\x20are\x20less\x20than\x20threshold\x20(','predictiveIntervalDroppedCallsCallersExit','agentBusyFactor','busyFactor','[getDataPredictive]','check\x20failure','getDataPredictiveOld','loggedIn','outboundQueuePauses','abandonmentRate','[CatchErlangB]','predictiveIntervalPauses','floor','one\x20call\x20every:','[handlePredictive]','fail\x20to\x20scheduled\x20calls','checkContactBlack','recallme','[booked][checkContactBlack]','Queue:\x20','[unlockOriginate][syncQueueStatusComplete]','[booked][checkContactBlack][else]','scheduledat','dialRecallMeTimeout','voicePause','unlockContact','dialRecallInQueue','[rescheduleContact][dialRecallInQueue]','QUEUE_RECALL','RecallInQueue','[Originate][HistoryDialRecallInQueue][historyCatch]','RECALL_TIMEOUT','RecallFailedTimeout','[Originate][HistoryRecallClose][historyCatch]','[Originate][HistoryRecallClose]','BLACKLIST','Blacklist','[Originate][historyBlacklist]','[Originate][MoveBlacklist]','inBlackList','limitCalls','[getContactCampaign2][Empty]','RUNNING','ivrTotalCallsDays','emptyContact','[actionOriginate]\x20','checkIsBlackListIvr','[actionOriginateIvr]\x20','dialLimitQueue','getContactDialer','checkContactEmpty','[countReScheduled]\x20','checkIsBlackList','[getContactDialer2]','tryOriginatePredictive','[handlePredictive][limitChannel]','not_inuse','dialOrderByScheduledAt','[actionOriginatePredictive]\x20','M:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Interval:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Ts:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','P:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','Amax:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','[abandonmentRate]','m\x20=\x20','Ts\x20=\x20','p\x20=\x20','interval\x20=\x20','erlangb','----\x20Agent\x20Busy\x20Factor\x20----','[busyFactor]','Umin\x20=\x20','util','lodash','moment','./utils','./utils/hopper','../preview/util/util','../../../config/environment/','../../../config/logger','dialer','booked','predictive','syncQueueSummary','../ami','redis','defaults','localhost','socket.io-emitter','../rpc/cmHopper','../rpc/voiceQueueRt','../rpc/interval','./models/action','./models/final','./models/agentComplete','./models/queueCallerAbandon','./models/hangup','env','XCALLY_IP_AGI','127.0.0.1','enqueue','tail','finally','sequence','preview','voiceQueues','campaigns','agents','trunks','maxNumberOriginate','channels','actions','uniqueId','optionPredictive','startPredictive','ivrOriginated','queueBooked','queueBookedRR','queuesSummary','agentconnect','bind','queuecallerabandon','syncQueueCallerAbandon','originateresponse','syncOriginateResponse','agentcomplete','syncAgentComplete','custom:queuesummary','custom:queuesummarycomplete','hangup','newexten','syncNewExten','queuemember','syncQueueMember','syncQueueStatusComplete','loopClearZombieChannels','getSettings','previewRecallmeReminderInterval','isUndefined','emit','debug','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','format','voice:queue:%s','name','voice_queue:save','isEmpty','info','-----\x20Stats\x20Predictive\x20---','Total\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x320e,0x1d8));var _0xe320=function(_0x5842c3,_0x56bd74){_0x5842c3=_0x5842c3-0x0;var _0x44bf8c=_0x320e[_0x5842c3];return _0x44bf8c;};'use strict';var util=require(_0xe320('0x0'));var _=require(_0xe320('0x1'));var uuid=require('uuid');var moment=require(_0xe320('0x2'));var rr=require('rr');var Redis=require('ioredis');var utils=require(_0xe320('0x3'));var hopperUtils=require(_0xe320('0x4'));var ut=require(_0xe320('0x5'));var config=require(_0xe320('0x6'));var logger=require(_0xe320('0x7'))(_0xe320('0x8'));var loggerBooked=require(_0xe320('0x7'))(_0xe320('0x9'));var loggerPredictive=require('../../../config/logger')(_0xe320('0xa'));var loggerPredictiveCalls=require('../../../config/logger')('predictiveCalls');var loggerSyncQueueSummary=require(_0xe320('0x7'))(_0xe320('0xb'));var ami=require(_0xe320('0xc'));config[_0xe320('0xd')]=_[_0xe320('0xe')](config[_0xe320('0xd')],{'host':_0xe320('0xf'),'port':0x18eb});var io=require(_0xe320('0x10'))(new Redis(config[_0xe320('0xd')]));var cmHopper=require(_0xe320('0x11'));var voiceQueueRt=require(_0xe320('0x12'));var RpcSetting=require('../rpc/setting');var Interval=require(_0xe320('0x13'));var Action=require(_0xe320('0x14'));var History=require('./models/history');var Final=require(_0xe320('0x15'));var AgentComplete=require(_0xe320('0x16'));var QueueCallerAbandon=require(_0xe320('0x17'));var Hangup=require(_0xe320('0x18'));var ipAgi=process[_0xe320('0x19')][_0xe320('0x1a')]||_0xe320('0x1b');var previewRecallmeReminderInterval=0x1;var Sequence=function(){};Sequence['prototype'][_0xe320('0x1c')]=function(_0x1573f5){this[_0xe320('0x1d')]=this[_0xe320('0x1d')]?this[_0xe320('0x1d')][_0xe320('0x1e')](_0x1573f5):_0x1573f5();};function Dialer(_0x3e9bd9,_0x58c5a9){this[_0xe320('0x1f')]=new Sequence();this[_0xe320('0x20')]=_0x58c5a9;this[_0xe320('0x21')]=_0x3e9bd9[_0xe320('0x21')];this[_0xe320('0x22')]=_0x3e9bd9[_0xe320('0x22')];this[_0xe320('0x23')]=_0x3e9bd9[_0xe320('0x23')];this[_0xe320('0x24')]=_0x3e9bd9[_0xe320('0x24')];this[_0xe320('0x25')]=config['maxNumberOriginate']||0x2;this[_0xe320('0x26')]={};this[_0xe320('0x27')]={};this['contactsId']={};this[_0xe320('0x28')]={};this[_0xe320('0x29')]={};this[_0xe320('0x2a')]={};this['startProgressive']={};this[_0xe320('0x2b')]={};this[_0xe320('0x2c')]={};this[_0xe320('0x2d')]={};this[_0xe320('0x2e')]={};ami['on'](_0xe320('0x2f'),this['syncAgentConnect'][_0xe320('0x30')](this));ami['on'](_0xe320('0x31'),this[_0xe320('0x32')][_0xe320('0x30')](this));ami['on'](_0xe320('0x33'),this[_0xe320('0x34')][_0xe320('0x30')](this));ami['on'](_0xe320('0x35'),this[_0xe320('0x36')][_0xe320('0x30')](this));ami['on'](_0xe320('0x37'),this[_0xe320('0xb')]['bind'](this));ami['on'](_0xe320('0x38'),this['syncQueueSummaryComplete']['bind'](this));ami['on'](_0xe320('0x39'),this['syncHangup'][_0xe320('0x30')](this));ami['on'](_0xe320('0x3a'),this[_0xe320('0x3b')][_0xe320('0x30')](this));ami['on']('varset',this['syncVarSet'][_0xe320('0x30')](this));ami['on'](_0xe320('0x3c'),this[_0xe320('0x3d')][_0xe320('0x30')](this));ami['on']('queuestatuscomplete',this[_0xe320('0x3e')][_0xe320('0x30')](this));this['loopCampaigns']();this[_0xe320('0x3f')]();RpcSetting[_0xe320('0x40')]()['then'](function(_0x1a4d25){previewRecallmeReminderInterval=_0x1a4d25[_0xe320('0x41')];});}function isNotNull(_0x3dca59){return _0x3dca59!==null&&!_[_0xe320('0x42')](_0x3dca59);}function msgResponse(_0x5715b0,_0x2c2f02,_0x5008d7){return{'action':_0x5715b0,'response':_0x2c2f02,'message':_0x5008d7,'stack':_0x5008d7};}function emit(_0x583ca2,_0xbca4b2,_0x1a7aef){io['to'](_0x583ca2)[_0xe320('0x43')](_0xbca4b2,_0x1a7aef);}function emitOutboundVoiceQueueSummary(_0xb1d099){if(_0xb1d099['type']==='outbound'){logger[_0xe320('0x44')](_0xe320('0x45'),util['inspect'](_0xb1d099,{'showHidden':![],'depth':null}));emit(util[_0xe320('0x46')](_0xe320('0x47'),_0xb1d099[_0xe320('0x48')]),_0xe320('0x49'),_0xb1d099);}}function checkGetDataPredictive(_0x99d572){if(isNotNull(_0x99d572)&&!_[_0xe320('0x4a')](_0x99d572)){loggerPredictive[_0xe320('0x4b')](_0xe320('0x4c'));loggerPredictive[_0xe320('0x4b')](_0xe320('0x4d'),_0x99d572[_0xe320('0x4e')]);loggerPredictive['info']('Answered\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x99d572[_0xe320('0x4f')]);loggerPredictive['info']('Dropped\x20Timeout:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x99d572['predictiveIntervalDroppedCallsTimeout']);loggerPredictive[_0xe320('0x4b')](_0xe320('0x50'),_0x99d572['predictiveIntervalDroppedCallsCallersExit']);loggerPredictive['info'](_0xe320('0x51'),_0x99d572['predictiveIntervalAvgHoldtime']);loggerPredictive[_0xe320('0x4b')](_0xe320('0x52'),_0x99d572['predictiveIntervalAvgTalktime']);loggerPredictive[_0xe320('0x4b')](_0xe320('0x53'));if(_0x99d572[_0xe320('0x4e')]>0x0){if(!_['isUndefined'](_0x99d572['predictiveIntervalAvgTalktime'])&&_0x99d572[_0xe320('0x54')]>0x0){return!![];}loggerPredictive[_0xe320('0x4b')](_0xe320('0x55'));if(!_[_0xe320('0x42')](_0x99d572[_0xe320('0x56')])&&_0x99d572[_0xe320('0x56')]>0x0){return!![];}loggerPredictive[_0xe320('0x4b')](_0xe320('0x57'));}else{loggerPredictive[_0xe320('0x4b')](_0xe320('0x58'));}}else{loggerPredictive[_0xe320('0x4b')]('History\x20information\x20are\x20empty');}return![];}function mergeDataErlangB(_0x441048){return function(_0x444492){loggerPredictive[_0xe320('0x4b')]('---------\x20ErlangB\x20---------');loggerPredictive['info']('Scheduled\x20Calls:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x444492[_0xe320('0x59')]);loggerPredictive[_0xe320('0x4b')](_0xe320('0x5a'),_0x444492[_0xe320('0x5b')]);loggerPredictive[_0xe320('0x4b')]('Drop\x20Rate:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x444492[_0xe320('0x5c')]);loggerPredictive[_0xe320('0x4b')](_0xe320('0x5d'),_0x444492[_0xe320('0x5e')]);loggerPredictive['info'](_0xe320('0x5f'),_0x444492[_0xe320('0x5c')]);loggerPredictive[_0xe320('0x4b')](_0xe320('0x53'));_['merge'](_0x441048,_0x444492);};}function ifInterval(_0x114796,_0x387c42){if(_[_0xe320('0x42')](_0x387c42)){return![];}return utils[_0xe320('0x60')](undefined,_0x387c42)<_0x114796*0x3c;}function clearPredictiveAttributes(_0x53a3cd){if(_0x53a3cd[_0xe320('0x61')]){_0x53a3cd[_0xe320('0x61')]=undefined;loggerPredictive[_0xe320('0x44')](_0x53a3cd[_0xe320('0x48')],_0xe320('0x62'));}if(_0x53a3cd['startPredictive']){_0x53a3cd[_0xe320('0x2a')]=undefined;loggerPredictive['debug'](_0x53a3cd['name'],_0xe320('0x63'));}if(_0x53a3cd[_0xe320('0x64')]){clearInterval(_0x53a3cd['handlePredictive']);_0x53a3cd[_0xe320('0x64')]=undefined;loggerPredictive[_0xe320('0x44')](_0x53a3cd[_0xe320('0x48')],_0xe320('0x65'));}}function loggerCatchPredictive(_0x1e9660,_0x65aa7a){return function(_0x9afe4c){loggerPredictive[_0xe320('0x66')](_0x65aa7a[_0xe320('0x48')],_0x1e9660);loggerPredictive[_0xe320('0x66')](_0x9afe4c[_0xe320('0x67')]);clearPredictiveAttributes(_0x65aa7a);};}function loggerCatch(_0x10e850){return function(_0x495055){logger[_0xe320('0x66')](_0x10e850,util[_0xe320('0x68')](_0x495055,{'showHidden':![],'depth':null}));};}function loggerGetContactDialer(_0x17be0f,_0x63b398,_0x14aec2){return function(_0x1d9689){utils[_0xe320('0x69')](_0x63b398,_0x14aec2,0x0);_0x63b398[_0xe320('0x6a')]=0x0;logger[_0xe320('0x66')](_0x17be0f,util[_0xe320('0x68')](_0x1d9689,{'showHidden':![],'depth':null}));};}function sendMessageReschedule(_0x22e2aa){return function(_0x448c67){if(isNotNull(_0x448c67)&&isNotNull(_0x448c67[0x0])){if(_0x448c67[0x0]['contactsRescheduled']>0x0){_0x22e2aa['message']=utils[_0xe320('0x6b')]['CONTACTS_RESCHEDULED'];logger[_0xe320('0x4b')]('[getContactDialer2][ReScheduled]'+_0x22e2aa['name'],_0x448c67[0x0][_0xe320('0x6c')],_0xe320('0x6d'));}else{_0x22e2aa[_0xe320('0x6e')]=utils['CAMPAIGN_STATUS'][_0xe320('0x6f')];logger[_0xe320('0x4b')](_0xe320('0x70')+_0x22e2aa['name']);}}};}function createObjHistory(_0x3e2fdd,_0x38ac34,_0x2a00b6,_0x103311,_0x353558){_0x3e2fdd[_0xe320('0x6e')]=_0x2a00b6;var _0x207078=new Action(_0x3e2fdd,_0x38ac34);var _0x5abe71=new History(_0x207078);_0x5abe71['state']=_0x103311;_0x5abe71[_0xe320('0x71')]=_0x353558;_0x5abe71[_0xe320('0x72')]=_0x207078[_0xe320('0x73')];return _0x5abe71;}function unlockQueueStatus(_0x4ddb57,_0xac361d){setTimeout(function(){if(_[_0xe320('0x42')](_0x4ddb57[_0xe320('0x74')])){loggerBooked[_0xe320('0x66')](_0xe320('0x75'),_0xac361d);}_0x4ddb57['queueStatusComplete']=!![];loggerBooked[_0xe320('0x4b')](_0xe320('0x76'),_0xac361d,JSON['stringify'](_[_0xe320('0x77')](_0x4ddb57,['name',_0xe320('0x74')])));},0x1f3);}function checkInterval(_0x229960){return function(){if(!isNotNull(_0x229960[_0xe320('0x78')])){_0x229960[_0xe320('0x6e')]=utils['CAMPAIGN_STATUS'][_0xe320('0x79')];throw _0x229960[_0xe320('0x48')]+_0xe320('0x7a');}if(!isNotNull(_0x229960[_0xe320('0x78')]['Intervals'])){_0x229960[_0xe320('0x6e')]=utils[_0xe320('0x6b')][_0xe320('0x79')];throw _0x229960[_0xe320('0x48')]+_0xe320('0x7a');}if(!isNotNull(_[_0xe320('0x4a')](_0x229960[_0xe320('0x78')][_0xe320('0x7b')]))){_0x229960[_0xe320('0x6e')]=utils['CAMPAIGN_STATUS'][_0xe320('0x79')];throw _0x229960[_0xe320('0x48')]+_0xe320('0x7a');}};}function checkIsIVRCampaignActive(_0x4b3f12){return function(){if(!utils[_0xe320('0x7c')](_0x4b3f12)){_0x4b3f12[_0xe320('0x6e')]=utils[_0xe320('0x6b')]['INACTIVE'];throw _0x4b3f12['name']+_0xe320('0x7d');}};}function emitCampaignSummary(_0x456fd0){if(utils[_0xe320('0x7e')](_0x456fd0)){emit(util[_0xe320('0x46')](_0xe320('0x7f'),_0x456fd0[_0xe320('0x48')]),'campaign:save',_0x456fd0);}}function loggerCatchQueueSummary(_0x322332,_0x5adea3){return function(_0xfa6dca){clearPredictiveAttributes(_0x5adea3);emitCampaignSummary(_0x5adea3);loggerSyncQueueSummary[_0xe320('0x44')](_0x322332,util[_0xe320('0x68')](_0xfa6dca,{'showHidden':![],'depth':null}));};}function notSendMessagesCampaign(_0x7959e7){if(_0x7959e7[_0xe320('0x80')]){if(_0x7959e7[_0xe320('0x81')]===0x0){_0x7959e7[_0xe320('0x80')]=![];_0x7959e7[_0xe320('0x6e')]=utils[_0xe320('0x6b')]['INACTIVE'];loggerSyncQueueSummary[_0xe320('0x44')](_0xe320('0x82'),_0x7959e7[_0xe320('0x48')],_0xe320('0x83'));}else{_0x7959e7[_0xe320('0x6e')]=utils['CAMPAIGN_STATUS'][_0xe320('0x84')];loggerSyncQueueSummary[_0xe320('0x44')]('[syncQueueSummary]\x20Campaign\x20Ivr:\x20',_0x7959e7[_0xe320('0x48')],_0xe320('0x85'));}emitCampaignSummary(_0x7959e7);}}function myreject(_0x5ba8f2){return function(_0x1c2da3){return _0x5ba8f2(msgResponse(_0xe320('0x86'),'Error',JSON['stringify'](_0x1c2da3)));};}Dialer['prototype'][_0xe320('0x87')]=function(_0x161b59){return!_[_0xe320('0x42')](_0x161b59)&&_0x161b59&&!_[_0xe320('0x42')](_0x161b59[_0xe320('0x48')])&&!_[_0xe320('0x42')](_0x161b59['active'])&&_0x161b59[_0xe320('0x88')]&&(this[_0xe320('0x24')][util[_0xe320('0x46')](_0xe320('0x89'),_0x161b59[_0xe320('0x48')])][_0xe320('0x8a')]===_0xe320('0x8b')||this[_0xe320('0x24')][util[_0xe320('0x46')](_0xe320('0x89'),_0x161b59[_0xe320('0x48')])]['status']===_0xe320('0x8c'));};Dialer[_0xe320('0x8d')][_0xe320('0x8e')]=function(_0x248b8f){var _0x49be9a=this;return function(){if(!_0x49be9a[_0xe320('0x87')](_0x248b8f['Trunk'])){if(!_0x49be9a[_0xe320('0x87')](_0x248b8f[_0xe320('0x8f')])){_0x248b8f['message']=utils['CAMPAIGN_STATUS'][_0xe320('0x90')];throw _0x248b8f[_0xe320('0x48')]+_0xe320('0x91');}}};};Dialer[_0xe320('0x8d')]['checkIfTime']=function(_0x99fce9,_0x32465c,_0xcc34f9,_0x5b6687){var _0x34f1bc=this;return function(){var _0x140e9c=!![];return _0x34f1bc[_0xe320('0x92')](_0x99fce9,_0x32465c,_0xcc34f9,_0x5b6687,_0x140e9c);};};Dialer['prototype']['checkIfTimeIntervals']=function(_0x2f310a,_0x58604a,_0x85a2db,_0x4d6d2d){var _0x3cdd89=this;return function(){var _0xdf93ab=![];return _0x3cdd89['ifTimeIvr'](_0x2f310a[_0xe320('0x7b')],_0x58604a,_0x85a2db,_0x4d6d2d,_0xdf93ab);};};Dialer['prototype']['ifTimeIvr']=function(_0x2c5462,_0x4d4d3f,_0x2f50df,_0x475c11,_0x1e6d0b){var _0x2b8026=[];return new Promise(function(_0x21d0df,_0xb05946){if(!isNotNull(_0x2c5462)){_0x475c11['message']=utils[_0xe320('0x6b')][_0xe320('0x79')];return _0xb05946(msgResponse(_0xe320('0x93'),_0xe320('0x94'),_0x2f50df+'\x20Intervals\x20is\x20null\x20'));}if(_[_0xe320('0x4a')](_0x2c5462)){_0x475c11[_0xe320('0x6e')]=utils[_0xe320('0x6b')][_0xe320('0x95')];return _0xb05946(msgResponse(_0xe320('0x93'),'Failure',_0x2f50df+_0xe320('0x96')));}if(_0x4d4d3f&&_['isUndefined'](config['timezones'][_0x4d4d3f])){_0x475c11['message']=utils[_0xe320('0x6b')][_0xe320('0x97')];return _0xb05946(msgResponse(_0xe320('0x93'),_0xe320('0x94'),_0x2f50df+'\x20Timezone\x20unknow\x20'+_0x4d4d3f));}if(_[_0xe320('0x98')](_0x2c5462)){for(var _0x175d3e=0x0;_0x175d3e<_0x2c5462[_0xe320('0x99')];_0x175d3e+=0x1){_0x2b8026[_0xe320('0x9a')](ami[_0xe320('0x9b')]({'action':_0xe320('0x9c'),'command':util[_0xe320('0x46')]('iftime\x20%s,%s',_0x2c5462[_0x175d3e][_0xe320('0x9d')],!_[_0xe320('0x42')](config[_0xe320('0x9e')][_0x4d4d3f])?_0x4d4d3f:'')})[_0xe320('0x9f')](function(_0x1f33d2){return _0x1f33d2[_0xe320('0xa0')]['indexOf'](_0xe320('0xa1'))>=0x0;})['catch'](myreject(_0xb05946)));}}else{_0x2b8026[_0xe320('0x9a')](ami[_0xe320('0x9b')]({'action':_0xe320('0x9c'),'command':util[_0xe320('0x46')](_0xe320('0xa2'),_0x2c5462,!_['isUndefined'](config[_0xe320('0x9e')][_0x4d4d3f])?_0x4d4d3f:'')})[_0xe320('0x9f')](function(_0x3c9505){return _0x3c9505['content'][_0xe320('0xa3')]('true')>=0x0;})[_0xe320('0xa4')](myreject(_0xb05946)));}Promise[_0xe320('0xa5')](_0x2b8026)[_0xe320('0x9f')](function(_0x1ec4da){var _0x44ed30=_[_0xe320('0xa6')](_0x1ec4da);if(_0x44ed30){return _0x21d0df(_0x44ed30);}else{_0x475c11[_0xe320('0x6e')]=_0x1e6d0b?utils[_0xe320('0x6b')][_0xe320('0xa7')]:utils[_0xe320('0x6b')][_0xe320('0xa8')];return _0xb05946(msgResponse(_0xe320('0xa9'),_0xe320('0x94'),_0xe320('0xaa')+_0x1e6d0b+'\x20'+_0x2f50df+_0xe320('0xab')+util[_0xe320('0x68')](_0x2c5462,{'showHidden':![],'depth':null})+'Timezone:\x20'+_0x4d4d3f));}})[_0xe320('0xa4')](function(_0x53d1bb){return _0xb05946(msgResponse(_0xe320('0x93'),_0xe320('0x94'),JSON[_0xe320('0xac')](_0x53d1bb)));});});};Dialer[_0xe320('0x8d')][_0xe320('0xad')]=function(){var _0xdb544d=this;return cmHopper[_0xe320('0xae')]({'active':![]},{'where':{'active':!![]}})[_0xe320('0x9f')](function(){setInterval(function(){_0xdb544d[_0xe320('0xaf')]();},0x3e8);});};Dialer[_0xe320('0x8d')][_0xe320('0xaf')]=function(){var _0x5c7428=this;var _0x3b7a22;for(var _0x23c7a0 in this[_0xe320('0x22')]){if(typeof this[_0xe320('0x22')][_0x23c7a0]!==_0xe320('0xb0')){_0x3b7a22=this[_0xe320('0x22')][_0x23c7a0];if(utils['isIVRCampaign'](_0x3b7a22)&&utils[_0xe320('0x7c')](_0x3b7a22)){_0x3b7a22[_0xe320('0x80')]=!![];Promise['resolve']()['then'](checkIsIVRCampaignActive(_0x3b7a22))['then'](checkInterval(_0x3b7a22))[_0xe320('0x9f')](_0x5c7428[_0xe320('0x8e')](_0x3b7a22))[_0xe320('0x9f')](_0x5c7428[_0xe320('0xb1')](_0x3b7a22[_0xe320('0xb2')],_0x3b7a22[_0xe320('0xb3')],_0x3b7a22['name'],_0x3b7a22))['then'](_0x5c7428[_0xe320('0xb4')](_0x3b7a22[_0xe320('0x78')],_0x3b7a22['dialTimezone'],_0x3b7a22[_0xe320('0x48')],_0x3b7a22))[_0xe320('0x9f')](_0x5c7428[_0xe320('0xb5')](_0x3b7a22))['catch'](loggerCatchQueueSummary(_0xe320('0xb6'),_0x3b7a22));}else{notSendMessagesCampaign(_0x3b7a22);}}}};Dialer['prototype'][_0xe320('0xb7')]=function(_0x41dafd){if(_0x41dafd[_0xe320('0xb8')]!==_0xe320('0xa')){clearPredictiveAttributes(_0x41dafd);}switch(_0x41dafd['dialMethod']){case _0xe320('0xb9'):this[_0xe320('0xba')](_0x41dafd,0x1);break;case _0xe320('0xbb'):this[_0xe320('0xba')](_0x41dafd,_0x41dafd[_0xe320('0xbc')]);break;case _0xe320('0xa'):this['predictive'](_0x41dafd);break;case _0xe320('0x9'):this[_0xe320('0xba')](_0x41dafd,0x1);break;default:logger[_0xe320('0x66')](_0xe320('0xbd'),_0x41dafd[_0xe320('0x48')],_0xe320('0xbe'));}};Dialer[_0xe320('0x8d')][_0xe320('0x93')]=function(_0x267573,_0xfbe33e){var _0x16c3ae=_0x267573['dialTimezone'];var _0x4dd8d3=_0xfbe33e?_0x267573[_0xe320('0xb2')]:_0x267573[_0xe320('0x78')][_0xe320('0x7b')];logger[_0xe320('0xbf')]('Dialer::ifTime()',_0x4dd8d3,_0x16c3ae,_0x267573['name'],util[_0xe320('0x46')](_0xe320('0xc0'),_0x267573[_0xe320('0x48')],_0x267573['id']));var _0x54a141=null;return Interval[_0xe320('0xc1')](_0x4dd8d3,_0x16c3ae)[_0xe320('0x9f')](function(_0x143d61){if(_0x143d61===!![]){return _0x143d61;}else{_0x267573[_0xe320('0x6e')]=_0xfbe33e?utils['CAMPAIGN_STATUS'][_0xe320('0xa7')]:utils[_0xe320('0x6b')][_0xe320('0xa8')];_0x54a141=msgResponse(_0xe320('0xa9'),_0xe320('0x94'),_0xe320('0xaa')+_0xfbe33e+'\x20'+_0x267573[_0xe320('0x48')]+_0xe320('0xab')+util[_0xe320('0x68')](_0x4dd8d3,{'showHidden':![],'depth':null})+_0xe320('0xc2')+_0x16c3ae);}if(_0x54a141!==null){logger[_0xe320('0xbf')](_0xe320('0xc3'),_0x54a141);_0x54a141[_0xe320('0xc4')]=_0xfbe33e;throw _0x54a141;}})[_0xe320('0xa4')](function(_0x1000b9){logger['error'](_0xe320('0xc5'),_0x1000b9);throw msgResponse(_0xe320('0x86'),_0xe320('0xc6'),util['inspect'](_0x1000b9,{'showHidden':![],'depth':null}));});};Dialer['prototype'][_0xe320('0xc7')]=function(_0x54990b){if(this[_0xe320('0x21')][_0x54990b[_0xe320('0xc8')]]){if(this[_0xe320('0x28')][_0x54990b['uniqueid']]&&this[_0xe320('0x28')][_0x54990b['uniqueid']][_0xe320('0xc9')]!==_0xe320('0xca')){this[_0xe320('0xcb')](this[_0xe320('0x21')][_0x54990b[_0xe320('0xc8')]]);this['uniqueId'][_0x54990b['uniqueid']][_0xe320('0xcc')]=moment()[_0xe320('0x46')](_0xe320('0xcd'));}}};Dialer[_0xe320('0x8d')]['syncAgentComplete']=function(_0x1d6268){var _0x5235d3=this[_0xe320('0x28')][_0x1d6268['uniqueid']];if(this[_0xe320('0x21')][_0x1d6268[_0xe320('0xc8')]]){if(_0x5235d3&&_0x5235d3['type']!==_0xe320('0xca')){delete this['uniqueId'][_0x1d6268[_0xe320('0xce')]];this[_0xe320('0x21')][_0x1d6268['queue']]['outboundAnswerCallsDay']+=0x1;var _0x176e22=new AgentComplete(_0x5235d3,_0x1d6268);if(_0x1d6268[_0xe320('0xcf')]===_0xe320('0xd0')){_0x176e22['agiafterat']=this[_0xe320('0x21')][_0x1d6268[_0xe320('0xc8')]][_0xe320('0xd1')]&&this[_0xe320('0x21')][_0x1d6268['queue']][_0xe320('0xd2')]?moment()[_0xe320('0x46')](_0xe320('0xcd')):undefined;}hopperUtils[_0xe320('0xd3')](_0x176e22)['catch'](loggerCatch(_0xe320('0xd4')));hopperUtils['moveContactManagedDialer'](_0x176e22)['catch'](loggerCatch('[syncAgentComplete]'));}}};Dialer[_0xe320('0x8d')]['syncQueueCallerAbandon']=function(_0x55192f){var _0x4174d0=this['uniqueId'][_0x55192f[_0xe320('0xce')]];var _0x3ac9f3=this;var _0xfcd31=![];var _0x1c0cb1;var _0x66b03c;if(this[_0xe320('0x21')][_0x55192f['queue']]){if(_0x4174d0&&_0x4174d0['type']!==_0xe320('0xca')){delete this['uniqueId'][_0x55192f[_0xe320('0xce')]];this[_0xe320('0xcb')](this['voiceQueues'][_0x55192f[_0xe320('0xc8')]]);_0x4174d0[_0xe320('0xd5')]=moment()[_0xe320('0x46')]('YYYY-MM-DD\x20HH:mm:ss');var _0x5af837=new QueueCallerAbandon(_0x4174d0,_0x55192f);if(utils['getSeconds'](_0x4174d0[_0xe320('0xd5')],_0x4174d0[_0xe320('0xd6')])>=_0x4174d0[_0xe320('0xd7')]){this[_0xe320('0x21')][_0x55192f[_0xe320('0xc8')]][_0xe320('0xd8')]+=0x1;this['voiceQueues'][_0x55192f[_0xe320('0xc8')]][_0xe320('0xd9')]+=0x1;this[_0xe320('0x21')][_0x55192f[_0xe320('0xc8')]][_0xe320('0xda')]+=0x1;_0x5af837[_0xe320('0xdb')]=0xa;_0x5af837[_0xe320('0x71')]=_0xe320('0xdc');_0x5af837[_0xe320('0xdd')]=_0xe320('0xde');_0x5af837[_0xe320('0xdf')]=this['voiceQueues'][_0x55192f['queue']][_0xe320('0xd1')]?moment()[_0xe320('0x46')](_0xe320('0xcd')):undefined;_0x5af837[_0xe320('0xe0')]+=0x1;_0x5af837[_0xe320('0xe1')]+=0x1;_0x1c0cb1=this[_0xe320('0x21')][_0x55192f['queue']]['dialDropRetryFrequency'];_0x66b03c=this[_0xe320('0x21')][_0x55192f[_0xe320('0xc8')]][_0xe320('0xe2')];hopperUtils[_0xe320('0xe3')](_0x5af837,_0x5af837[_0xe320('0xdb')],_0x4174d0[_0xe320('0xe4')])[_0xe320('0x9f')](function(_0x47be39){_0xfcd31=_0x47be39[_0xe320('0xe5')]==0x1;if(_0x5af837['countdropretry']>=_0x3ac9f3[_0xe320('0x21')][_0x55192f['queue']][_0xe320('0xe6')]){_0x3ac9f3[_0xe320('0xe7')](_0x5af837,_0x47be39[_0xe320('0xe5')]);}else{hopperUtils[_0xe320('0xe8')]({'active':![],'countdropretry':_0x5af837[_0xe320('0xe0')],'scheduledat':moment()[_0xe320('0xe9')](_0x3ac9f3[_0xe320('0x21')][_0x55192f[_0xe320('0xc8')]][_0xe320('0xea')],_0xe320('0xeb'))[_0xe320('0x46')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x4174d0[_0xe320('0xec')],'ListId':_0x4174d0[_0xe320('0xed')],'VoiceQueueId':_0x4174d0[_0xe320('0xee')]||undefined,'CampaignId':_0x4174d0[_0xe320('0xef')]||undefined})['catch'](loggerCatch(_0xe320('0xf0')));var _0x366def=new History(_0x5af837);_0x366def[_0xe320('0xdb')]=0xa;_0x366def[_0xe320('0x71')]='Drop';_0x366def['starttime']=moment()[_0xe320('0x46')](_0xe320('0xcd'));_0x366def[_0xe320('0x72')]=_0x366def['starttime'];_0x366def['calleridname']=_0x5af837[_0xe320('0xf1')];_0x366def[_0xe320('0xf2')]=_0x5af837['calleridnum'];hopperUtils[_0xe320('0xd3')](_0x366def)[_0xe320('0xa4')](loggerCatch(_0xe320('0xf3')));}})[_0xe320('0x9f')](function(){if(_0xfcd31)hopperUtils[_0xe320('0xf4')](_0x5af837,_0x1c0cb1,_0x66b03c)['then'](function(){return 0x1;});});}else{this[_0xe320('0x21')][_0x55192f['queue']]['predictiveIntervalDroppedCallsCallersExit']+=0x1;this[_0xe320('0x21')][_0x55192f[_0xe320('0xc8')]][_0xe320('0xf5')]+=0x1;_0x5af837[_0xe320('0xdb')]=0xb;_0x5af837[_0xe320('0x71')]=_0xe320('0xf6');_0x5af837[_0xe320('0xdd')]=_0xe320('0xf7');_0x5af837['countabandonedretry']+=0x1;_0x5af837['countglobal']+=0x1;_0x1c0cb1=this[_0xe320('0x21')][_0x55192f[_0xe320('0xc8')]][_0xe320('0xf8')];_0x66b03c=this[_0xe320('0x21')][_0x55192f['queue']][_0xe320('0xe2')];hopperUtils[_0xe320('0xe3')](_0x5af837,_0x5af837['state'],_0x4174d0['voiceQueue'])[_0xe320('0x9f')](function(_0x2d75aa){if(_0x5af837[_0xe320('0xf9')]>=_0x3ac9f3['voiceQueues'][_0x55192f[_0xe320('0xc8')]][_0xe320('0xfa')]){_0x3ac9f3['queueCallerAbandonCreateState'](_0x5af837,_0x2d75aa[_0xe320('0xe5')]);}else{hopperUtils['rescheduleContact']({'active':![],'countabandonedretry':_0x5af837[_0xe320('0xf9')],'scheduledat':moment()[_0xe320('0xe9')](_0x3ac9f3[_0xe320('0x21')][_0x55192f[_0xe320('0xc8')]][_0xe320('0xf8')],_0xe320('0xeb'))[_0xe320('0x46')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x4174d0[_0xe320('0xec')],'ListId':_0x4174d0[_0xe320('0xed')],'VoiceQueueId':_0x4174d0[_0xe320('0xee')]||undefined,'CampaignId':_0x4174d0[_0xe320('0xef')]||undefined})[_0xe320('0xa4')](loggerCatch(_0xe320('0xfb')));var _0x4778cb=new History(_0x5af837);_0x4778cb['state']=0xb;_0x4778cb['statedesc']='Abandoned';_0x4778cb[_0xe320('0x73')]=moment()[_0xe320('0x46')](_0xe320('0xcd'));_0x4778cb['endtime']=_0x4778cb[_0xe320('0x73')];_0x4778cb[_0xe320('0xf1')]=_0x5af837[_0xe320('0xf1')];_0x4778cb['calleridnum']=_0x5af837[_0xe320('0xf2')];hopperUtils[_0xe320('0xd3')](_0x4778cb)[_0xe320('0xa4')](loggerCatch(_0xe320('0xfc')));}})[_0xe320('0x9f')](function(){if(_0xfcd31)hopperUtils[_0xe320('0xf4')](_0x5af837,_0x1c0cb1,_0x66b03c)[_0xe320('0x9f')](function(){return 0x1;});});}}}};Dialer[_0xe320('0x8d')][_0xe320('0x3b')]=function(_0x1fe123){if(this[_0xe320('0x27')][_0x1fe123['uniqueid']]){this[_0xe320('0x27')][_0x1fe123[_0xe320('0xce')]][_0xe320('0xfd')]=_0x1fe123[_0xe320('0xfd')];}if(this['uniqueId'][_0x1fe123[_0xe320('0xce')]]){this[_0xe320('0x28')][_0x1fe123[_0xe320('0xce')]][_0xe320('0xfd')]=_0x1fe123[_0xe320('0xfd')];}};Dialer[_0xe320('0x8d')][_0xe320('0x3d')]=function(_0x3fcfdd){if(!this['actions'][_0x3fcfdd[_0xe320('0xfe')]]){return;}var _0x58756d=this[_0xe320('0x21')][this[_0xe320('0x27')][_0x3fcfdd[_0xe320('0xfe')]][_0xe320('0xc8')]][_0xe320('0xff')]||'rrmemory';if(_0x58756d===_0xe320('0x100')){if(this[_0xe320('0x27')][_0x3fcfdd[_0xe320('0xfe')]]&&_[_0xe320('0x101')](this[_0xe320('0x27')][_0x3fcfdd['actionid']][_0xe320('0x102')])&&_0x3fcfdd[_0xe320('0x8a')]==='1'&&_0x3fcfdd[_0xe320('0x103')]==='0'){if(this['agents'][_0x3fcfdd[_0xe320('0x104')]]){if(!this[_0xe320('0x23')][_0x3fcfdd[_0xe320('0x104')]][_0xe320('0x102')]){this[_0xe320('0x23')][_0x3fcfdd['stateinterface']][_0xe320('0x102')]=!![];this[_0xe320('0x27')][_0x3fcfdd['actionid']][_0xe320('0x102')]=!![];this[_0xe320('0x27')][_0x3fcfdd['actionid']]['stateinterface']=_0x3fcfdd['stateinterface'];}}}}else if(_0x58756d===_0xe320('0x105')){if(this[_0xe320('0x27')][_0x3fcfdd[_0xe320('0xfe')]]){if(this[_0xe320('0x23')][_0x3fcfdd[_0xe320('0x104')]]){this[_0xe320('0x27')][_0x3fcfdd[_0xe320('0xfe')]][_0xe320('0x104')]=_0x3fcfdd[_0xe320('0x104')];if(_[_0xe320('0x101')](this['queueBooked'][this[_0xe320('0x27')][_0x3fcfdd[_0xe320('0xfe')]][_0xe320('0xc8')]])){this[_0xe320('0x2c')][this[_0xe320('0x27')][_0x3fcfdd[_0xe320('0xfe')]]['queue']]=[];}this[_0xe320('0x2c')][this['actions'][_0x3fcfdd['actionid']][_0xe320('0xc8')]][_0xe320('0x9a')](_[_0xe320('0x106')](_[_0xe320('0x77')](this['actions'][_0x3fcfdd[_0xe320('0xfe')]],[_0xe320('0x107'),_0xe320('0x104')]),{'status':_0x3fcfdd['status'],'paused':_0x3fcfdd['paused']}));}}}};Dialer[_0xe320('0x8d')][_0xe320('0x3e')]=function(_0x478a33){if(!this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]]){return;}var _0x1e13f2=this;var _0x46ce5b=this['voiceQueues'][this[_0xe320('0x27')][_0x478a33['actionid']][_0xe320('0xc8')]];var _0x536c06=_0x46ce5b['strategy']||_0xe320('0x105');if(_0x536c06==='roundrobin'){if(this[_0xe320('0x27')][_0x478a33['actionid']]&&this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0x104')]){this[_0xe320('0x20')][_0xe320('0x108')](this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]]['idHopper'],this[_0xe320('0x27')][_0x478a33['actionid']]['stateinterface'])['catch'](function(_0x53f811){logger[_0xe320('0x66')](_0xe320('0x109'),util[_0xe320('0x68')](_0x53f811,{'showHidden':![],'depth':null}));})[_0xe320('0x1e')](function(){_0x1e13f2[_0xe320('0xcb')](_0x1e13f2['voiceQueues'][_0x1e13f2[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0xc8')]]);_0x1e13f2[_0xe320('0x23')][_0x1e13f2[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0x104')]][_0xe320('0x102')]=![];delete _0x1e13f2[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]];unlockQueueStatus(_0x46ce5b);});}else{this[_0xe320('0xcb')](this['voiceQueues'][this['actions'][_0x478a33[_0xe320('0xfe')]]['queue']]);hopperUtils[_0xe320('0xe8')]({'active':![],'ContactId':this['actions'][_0x478a33[_0xe320('0xfe')]][_0xe320('0xec')],'ListId':this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]]['ListId'],'VoiceQueueId':this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0xee')]||undefined,'CampaignId':this[_0xe320('0x27')][_0x478a33['actionid']][_0xe320('0xef')]||undefined})[_0xe320('0xa4')](loggerCatch(_0xe320('0x10a')));delete this['actions'][_0x478a33[_0xe320('0xfe')]];unlockQueueStatus(_0x46ce5b);}}else if(_0x536c06===_0xe320('0x105')){var _0x4dd16c;if(this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]]&&!_[_0xe320('0x4a')](this[_0xe320('0x2c')][this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0xc8')]])){if(this[_0xe320('0x2d')][_0x1e13f2[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0xc8')]]){this[_0xe320('0x2d')][_0x1e13f2['actions'][_0x478a33[_0xe320('0xfe')]]['queue']]=this['queueBookedRR'][this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0xc8')]]?this[_0xe320('0x2d')][this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0xc8')]]:this[_0xe320('0x2c')][this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0xc8')]]?this['queueBooked'][this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0xc8')]][_0xe320('0x10b')]||0x0:0x0;}this['queueBooked'][this[_0xe320('0x27')][_0x478a33['actionid']][_0xe320('0xc8')]][_0xe320('0x10b')]=this['queueBookedRR'][this['actions'][_0x478a33[_0xe320('0xfe')]]['queue']];for(var _0x16df6f=0x0;_0x16df6f<this[_0xe320('0x2c')][this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0xc8')]]['length'];_0x16df6f+=0x1){_0x4dd16c=rr(this[_0xe320('0x2c')][this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0xc8')]]);this['queueBookedRR'][_0x1e13f2['actions'][_0x478a33[_0xe320('0xfe')]][_0xe320('0xc8')]]=this[_0xe320('0x2c')][this[_0xe320('0x27')][_0x478a33['actionid']][_0xe320('0xc8')]][_0xe320('0x10b')];if(_0x4dd16c[_0xe320('0x8a')]==='1'&&_0x4dd16c[_0xe320('0x103')]==='0'){break;}}if(!_['isNil'](_0x4dd16c)){this['agents'][_0x4dd16c[_0xe320('0x104')]][_0xe320('0x10c')]=_[_0xe320('0x42')](this['agents'][_0x4dd16c[_0xe320('0x104')]]['unlockRR'])?!![]:this[_0xe320('0x23')][_0x4dd16c['stateinterface']]['unlockRR'];}loggerBooked[_0xe320('0x4b')]('[booked][RR]',_0x478a33['actionid'],_0xe320('0x10d'),JSON[_0xe320('0xac')](_[_0xe320('0x77')](this[_0xe320('0x23')][_0x4dd16c['stateinterface']],[_0xe320('0x48'),_0xe320('0x10c')])),_0xe320('0x10e'),JSON[_0xe320('0xac')](_0x4dd16c[_0xe320('0x107')]));if(!_[_0xe320('0x101')](_0x4dd16c)&&_0x4dd16c[_0xe320('0x8a')]==='1'&&_0x4dd16c[_0xe320('0x103')]==='0'&&this['agents'][_0x4dd16c[_0xe320('0x104')]][_0xe320('0x10c')]){this['agents'][_0x4dd16c[_0xe320('0x104')]][_0xe320('0x10c')]=![];this[_0xe320('0x2c')][_0x1e13f2[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0xc8')]]=[];this['preview'][_0xe320('0x108')](_0x4dd16c[_0xe320('0x107')],_0x4dd16c[_0xe320('0x104')])[_0xe320('0xa4')](function(_0x5ca373){logger[_0xe320('0x66')](_0xe320('0x109'),util['inspect'](_0x5ca373,{'showHidden':![],'depth':null}));})['finally'](function(){_0x1e13f2[_0xe320('0xcb')](_0x1e13f2[_0xe320('0x21')][_0x1e13f2[_0xe320('0x27')][_0x478a33['actionid']][_0xe320('0xc8')]]);setTimeout(function(){_0x1e13f2[_0xe320('0x23')][_0x4dd16c[_0xe320('0x104')]]['unlockRR']=!![];loggerBooked[_0xe320('0x4b')]('[booked][RR][finaly]',_0x478a33[_0xe320('0xfe')],_0xe320('0x10d'),JSON[_0xe320('0xac')](_['pick'](_0x1e13f2['agents'][_0x4dd16c[_0xe320('0x104')]],[_0xe320('0x48'),_0xe320('0x10c')])),_0xe320('0x10e'),JSON[_0xe320('0xac')](_0x4dd16c[_0xe320('0x107')]));},0xc7);delete _0x1e13f2[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]];unlockQueueStatus(_0x46ce5b,_0x478a33[_0xe320('0xfe')]);});}else{loggerBooked[_0xe320('0x4b')](_0xe320('0x10f'));this['updateOriginated'](this[_0xe320('0x21')][this['actions'][_0x478a33[_0xe320('0xfe')]][_0xe320('0xc8')]]);hopperUtils[_0xe320('0xe8')]({'active':![],'ContactId':this['actions'][_0x478a33[_0xe320('0xfe')]][_0xe320('0xec')],'ListId':this['actions'][_0x478a33[_0xe320('0xfe')]][_0xe320('0xed')],'VoiceQueueId':this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]]['VoiceQueueId']||undefined,'CampaignId':this['actions'][_0x478a33[_0xe320('0xfe')]][_0xe320('0xef')]||undefined})[_0xe320('0xa4')](loggerCatch('[unlock][syncQueueStatusComplete]'));delete this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]];unlockQueueStatus(_0x46ce5b);}}else{loggerBooked[_0xe320('0x4b')](_0xe320('0x110'));this[_0xe320('0xcb')](this[_0xe320('0x21')][this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0xc8')]]);hopperUtils['rescheduleContact']({'active':![],'ContactId':this['actions'][_0x478a33['actionid']][_0xe320('0xec')],'ListId':this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]]['ListId'],'VoiceQueueId':this['actions'][_0x478a33[_0xe320('0xfe')]]['VoiceQueueId']||undefined,'CampaignId':this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0xef')]||undefined})[_0xe320('0xa4')](loggerCatch(_0xe320('0x111')));delete this['actions'][_0x478a33[_0xe320('0xfe')]];unlockQueueStatus(_0x46ce5b);}}else{loggerBooked[_0xe320('0x4b')]('[booked][unlock3]');this[_0xe320('0xcb')](this[_0xe320('0x21')][this['actions'][_0x478a33[_0xe320('0xfe')]][_0xe320('0xc8')]]);hopperUtils[_0xe320('0xe8')]({'active':![],'ContactId':this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0xec')],'ListId':this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]]['ListId'],'VoiceQueueId':this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0xee')]||undefined,'CampaignId':this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]][_0xe320('0xef')]||undefined})[_0xe320('0xa4')](loggerCatch(_0xe320('0x112')));delete this[_0xe320('0x27')][_0x478a33[_0xe320('0xfe')]];unlockQueueStatus(_0x46ce5b);}};Dialer[_0xe320('0x8d')][_0xe320('0x34')]=function(_0x1cdd08){var _0x4b769e=this[_0xe320('0x27')][_0x1cdd08[_0xe320('0xfe')]];if(_0x4b769e){delete this[_0xe320('0x27')][_0x1cdd08[_0xe320('0xfe')]];_0x4b769e[_0xe320('0xd6')]=moment()[_0xe320('0x46')]('YYYY-MM-DD\x20HH:mm:ss');var _0x303172=_0x4b769e[_0xe320('0xc9')]===_0xe320('0xca')?this[_0xe320('0x22')][_0x4b769e[_0xe320('0xc8')]]:this[_0xe320('0x21')][_0x4b769e['getQueue']()];if(_0x1cdd08[_0xe320('0x113')]!=='Success'){this[_0xe320('0xcb')](_0x303172);return this['callProgressDetecting'](_0x4b769e,_0x303172,_0x1cdd08)[_0xe320('0xa4')](loggerCatch(_0xe320('0x114')));}this[_0xe320('0x28')][_0x1cdd08['uniqueid']]=_0x4b769e;}};Dialer[_0xe320('0x8d')][_0xe320('0x115')]=function(_0x4d4326){var _0x389a9a=this;var _0x277a40=this[_0xe320('0x28')][_0x4d4326[_0xe320('0xce')]];var _0x31dd2c;if(!_[_0xe320('0x101')](_0x4d4326)&&!_[_0xe320('0x101')](_0x4d4326['variable'])&&!_['isNil'](_0x4d4326[_0xe320('0x116')][_0xe320('0x117')])&&_0x4d4326['exten']===_0xe320('0x118')&&_0x277a40){if(_0x277a40[_0xe320('0xc9')]!=='ivr'&&this[_0xe320('0x21')][_0x277a40['queue']][_0xe320('0x119')]&&_0x4d4326[_0xe320('0x11a')]===_0xe320('0x11b')){delete this[_0xe320('0x28')][_0x4d4326['uniqueid']];this[_0xe320('0xcb')](this['voiceQueues'][_0x277a40[_0xe320('0xc8')]]);this[_0xe320('0x21')][_0x277a40[_0xe320('0xc8')]][_0xe320('0x11c')]+=0x1;this[_0xe320('0x21')][_0x277a40[_0xe320('0xc8')]][_0xe320('0x11d')]+=0x1;_0x31dd2c=new Hangup(_0x277a40,_0x4d4326);_0x31dd2c[_0xe320('0xdb')]=0x12;_0x31dd2c[_0xe320('0x71')]=_0xe320('0x11e');_0x31dd2c[_0xe320('0x11f')]=_0xe320('0x120');ami[_0xe320('0x43')](_0xe320('0x121'),ut[_0xe320('0x122')](_0x31dd2c,_0xe320('0x123')));this[_0xe320('0x124')](_0x31dd2c,_0xe320('0x125'),_0xe320('0x126'));}if(_0x277a40[_0xe320('0xc9')]!==_0xe320('0xca')&&this[_0xe320('0x21')][_0x277a40[_0xe320('0xc8')]][_0xe320('0x119')]&&_0x4d4326[_0xe320('0x11a')]===_0xe320('0x127')){return new Promise(function(_0x265e8a,_0x517661){delete _0x389a9a[_0xe320('0x28')][_0x4d4326[_0xe320('0xce')]];_0x389a9a['updateOriginated'](_0x389a9a[_0xe320('0x21')][_0x277a40['queue']]);_0x389a9a[_0xe320('0x21')][_0x277a40['queue']][_0xe320('0x11c')]+=0x1;_0x389a9a[_0xe320('0x21')][_0x277a40[_0xe320('0xc8')]][_0xe320('0x11d')]+=0x1;var _0x2bb307=_0x389a9a[_0xe320('0x21')][_0x277a40['queue']];var _0x4115d4=new Hangup(_0x277a40,_0x4d4326);_0x4115d4[_0xe320('0xdb')]=0x13;_0x4115d4['statedesc']=_0xe320('0x128');_0x4115d4['membername']=_0xe320('0x120');_0x4115d4[_0xe320('0x129')]+=0x1;_0x4115d4['countglobal']+=0x1;_0x4115d4[_0xe320('0x123')]=!![];ami[_0xe320('0x43')](_0xe320('0x121'),ut[_0xe320('0x122')](_0x4115d4,_0xe320('0x123')));hopperUtils[_0xe320('0xd3')](_0x4115d4)['catch'](loggerCatch('[syncAgentComplete][createHistory][0]'));if(_0x4115d4[_0xe320('0x12a')]+_0x4115d4[_0xe320('0x12b')]+_0x4115d4[_0xe320('0x12c')]+_0x4115d4[_0xe320('0x12d')]+_0x4115d4[_0xe320('0xe0')]+_0x4115d4[_0xe320('0xf9')]+_0x4115d4['countmachineretry']+_0x4115d4[_0xe320('0x12e')]>=_0x2bb307[_0xe320('0x12f')]){_0x389a9a['stateGlobal'](_0x4115d4,_0x265e8a,_0x517661,'reason19\x20machine....');}else{if(_0x4115d4[_0xe320('0x129')]>=_0x2bb307[_0xe320('0x130')]){_0x389a9a[_0xe320('0x131')](_0x4115d4,_0x265e8a,_0x517661,_0xe320('0x132'));}else{hopperUtils['rescheduleContact']({'active':![],'countmachineretry':_0x4115d4[_0xe320('0x129')],'scheduledat':moment()[_0xe320('0xe9')](_0x2bb307[_0xe320('0x133')],_0xe320('0xeb'))[_0xe320('0x46')]('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x4115d4[_0xe320('0xec')],'ListId':_0x4115d4['ListId'],'VoiceQueueId':_0x4115d4[_0xe320('0xee')]||undefined,'CampaignId':_0x4115d4[_0xe320('0xef')]||undefined})['catch'](loggerCatch('[rescheduleContact][Machine]'));_0x265e8a({'reschedule':0x1});}}});}if(_0x277a40[_0xe320('0xc9')]===_0xe320('0xca')&&this[_0xe320('0x22')][_0x277a40['queue']][_0xe320('0x119')]&&_0x4d4326['value']===_0xe320('0x11b')){delete this[_0xe320('0x28')][_0x4d4326[_0xe320('0xce')]];this[_0xe320('0xcb')](this['campaigns'][_0x277a40[_0xe320('0xc8')]]);_0x31dd2c=new Hangup(_0x277a40,_0x4d4326);_0x31dd2c[_0xe320('0xdb')]=0x12;_0x31dd2c[_0xe320('0x71')]='HangupInAMD';_0x31dd2c[_0xe320('0x11f')]=_0xe320('0x120');ami[_0xe320('0x43')](_0xe320('0x121'),ut[_0xe320('0x122')](_0x31dd2c,'amd'));this[_0xe320('0x124')](_0x31dd2c,'[syncHangupInAMDIvr][createHistory]',_0xe320('0x134'));}if(_0x277a40[_0xe320('0xc9')]===_0xe320('0xca')&&this['campaigns'][_0x277a40[_0xe320('0xc8')]][_0xe320('0x119')]&&_0x4d4326[_0xe320('0x11a')]===_0xe320('0x127')){return new Promise(function(_0x30f51a,_0x5ecfba){delete _0x389a9a['uniqueId'][_0x4d4326[_0xe320('0xce')]];_0x389a9a['updateOriginated'](_0x389a9a['campaigns'][_0x277a40[_0xe320('0xc8')]]);_0x389a9a[_0xe320('0x22')][_0x277a40[_0xe320('0xc8')]][_0xe320('0x11c')]+=0x1;_0x389a9a[_0xe320('0x22')][_0x277a40['queue']][_0xe320('0x11d')]+=0x1;var _0x3bc0a6=_0x389a9a[_0xe320('0x22')][_0x277a40['queue']];var _0x1b595e=new Hangup(_0x277a40,_0x4d4326);_0x1b595e[_0xe320('0xdb')]=0x13;_0x1b595e['statedesc']=_0xe320('0x128');_0x1b595e['membername']=_0xe320('0x120');_0x1b595e[_0xe320('0x129')]+=0x1;_0x1b595e['countglobal']+=0x1;_0x1b595e['amd']=!![];ami[_0xe320('0x43')](_0xe320('0x121'),ut['buildObj'](_0x1b595e,_0xe320('0x123')));hopperUtils[_0xe320('0xd3')](_0x1b595e)[_0xe320('0xa4')](loggerCatch(_0xe320('0x135')));if(_0x1b595e[_0xe320('0x12a')]+_0x1b595e[_0xe320('0x12b')]+_0x1b595e['countnoanswerretry']+_0x1b595e[_0xe320('0x12d')]+_0x1b595e['countdropretry']+_0x1b595e['countabandonedretry']+_0x1b595e['countmachineretry']+_0x1b595e[_0xe320('0x12e')]>=_0x3bc0a6[_0xe320('0x12f')]){_0x389a9a[_0xe320('0x136')](_0x1b595e,_0x30f51a,_0x5ecfba,_0xe320('0x137'));}else{if(_0x1b595e[_0xe320('0x129')]>=_0x3bc0a6['dialMachineMaxRetry']){_0x389a9a[_0xe320('0x131')](_0x1b595e,_0x30f51a,_0x5ecfba,_0xe320('0x132'));}else{hopperUtils[_0xe320('0xe8')]({'active':![],'countmachineretry':_0x1b595e['countmachineretry'],'scheduledat':moment()[_0xe320('0xe9')](_0x3bc0a6[_0xe320('0x133')],_0xe320('0xeb'))[_0xe320('0x46')](_0xe320('0xcd')),'ContactId':_0x1b595e['ContactId'],'ListId':_0x1b595e[_0xe320('0xed')],'VoiceQueueId':_0x1b595e[_0xe320('0xee')]||undefined,'CampaignId':_0x1b595e[_0xe320('0xef')]||undefined})['catch'](loggerCatch('[rescheduleContact][Machine]'));_0x30f51a({'reschedule':0x1});}}});}}};Dialer['prototype'][_0xe320('0x138')]=function(_0x401f1f){var _0x3ceff6=this['uniqueId'][_0x401f1f[_0xe320('0xce')]];var _0x57a200;if(_0x3ceff6&&_0x3ceff6[_0xe320('0xc9')]==='ivr'){delete this[_0xe320('0x28')][_0x401f1f['uniqueid']];this[_0xe320('0xcb')](this[_0xe320('0x22')][_0x3ceff6[_0xe320('0xc8')]]);this[_0xe320('0x22')][_0x3ceff6[_0xe320('0xc8')]][_0xe320('0x139')]+=0x1;_0x57a200=new Hangup(_0x3ceff6,_0x401f1f);hopperUtils['createHistory'](_0x57a200)[_0xe320('0xa4')](loggerCatch(_0xe320('0x13a')));hopperUtils[_0xe320('0x13b')](_0x57a200)[_0xe320('0xa4')](loggerCatch(_0xe320('0x13c')));}if(_0x3ceff6&&_0x3ceff6[_0xe320('0xc9')]!==_0xe320('0xca')&&isNotNull(this[_0xe320('0x21')][_0x3ceff6['queue']][_0xe320('0x13d')])){delete this['uniqueId'][_0x401f1f['uniqueid']];this[_0xe320('0xcb')](this[_0xe320('0x21')][_0x3ceff6['queue']]);this[_0xe320('0x21')][_0x3ceff6[_0xe320('0xc8')]][_0xe320('0x11c')]+=0x1;this[_0xe320('0x21')][_0x3ceff6[_0xe320('0xc8')]][_0xe320('0x11d')]+=0x1;_0x57a200=new Hangup(_0x3ceff6,_0x401f1f);_0x57a200['state']=0x10;_0x57a200['statedesc']=_0xe320('0x13e');_0x57a200[_0xe320('0x11f')]=_0xe320('0x13f');hopperUtils[_0xe320('0xd3')](_0x57a200)[_0xe320('0xa4')](loggerCatch(_0xe320('0x13a')));hopperUtils[_0xe320('0x13b')](_0x57a200)[_0xe320('0xa4')](loggerCatch(_0xe320('0x13c')));}if(_0x3ceff6&&_0x3ceff6[_0xe320('0xc9')]!==_0xe320('0xca')&&!isNotNull(this[_0xe320('0x21')][_0x3ceff6[_0xe320('0xc8')]][_0xe320('0x13d')])){if(_0x401f1f['cause-txt']===_0xe320('0x140')){delete this[_0xe320('0x28')][_0x401f1f['uniqueid']];this[_0xe320('0x21')][_0x3ceff6[_0xe320('0xc8')]][_0xe320('0x11c')]+=0x1;const _0x513bd5=new AgentComplete(_0x3ceff6,_0x401f1f);_0x513bd5[_0xe320('0xef')]=this[_0xe320('0x21')][_0x3ceff6[_0xe320('0xc8')]]['id'];hopperUtils[_0xe320('0xd3')](_0x513bd5)[_0xe320('0xa4')](loggerCatch(_0xe320('0xd4')));hopperUtils[_0xe320('0x13b')](_0x513bd5)[_0xe320('0xa4')](loggerCatch(_0xe320('0x141')));}else{delete this[_0xe320('0x28')][_0x401f1f[_0xe320('0xce')]];this[_0xe320('0xcb')](this['voiceQueues'][_0x3ceff6[_0xe320('0xc8')]]);this[_0xe320('0x21')][_0x3ceff6[_0xe320('0xc8')]][_0xe320('0x142')]+=0x1;_0x57a200=new Hangup(_0x3ceff6,_0x401f1f);_0x57a200[_0xe320('0xdb')]=0xc;_0x57a200[_0xe320('0x71')]=_0x401f1f[_0xe320('0x143')];_0x57a200[_0xe320('0x11f')]=_0xe320('0x144');hopperUtils['createHistory'](_0x57a200)[_0xe320('0xa4')](loggerCatch(_0xe320('0x13a')));hopperUtils['moveContactManagedDialer'](_0x57a200)[_0xe320('0xa4')](loggerCatch(_0xe320('0x13c')));}}};Dialer[_0xe320('0x8d')][_0xe320('0xb')]=function(_0x4f9d45){var _0x4c7c60=this;if(!_0x4c7c60[_0xe320('0x2e')][_0x4f9d45['name']]){_0x4c7c60[_0xe320('0x2e')][_0x4f9d45[_0xe320('0x48')]]={'running':![]};}else if(_0x4c7c60['queuesSummary'][_0x4f9d45[_0xe320('0x48')]][_0xe320('0x145')]===!![]){return;}else if(_0x4c7c60[_0xe320('0x2e')][_0x4f9d45[_0xe320('0x48')]][_0xe320('0x145')]===![]){_0x4c7c60['queuesSummary'][_0x4f9d45[_0xe320('0x48')]][_0xe320('0x145')]=!![];}var _0x5c33d4=_0x4c7c60[_0xe320('0x21')][_0x4f9d45[_0xe320('0x48')]];var _0x226df9=_0x5c33d4[_0xe320('0x6e')]!==utils[_0xe320('0x6b')][_0xe320('0x146')];var _0x4d5c67=utils['isPreviewCampaign'](_0x5c33d4);_0x5c33d4[_0xe320('0x147')]=utils['getQueueCampaignStatusMessage'](_0x5c33d4,_0x4c7c60[_0xe320('0x24')]);Promise[_0xe320('0x148')]()[_0xe320('0x9f')](function(){if(_0x5c33d4[_0xe320('0x147')]===utils[_0xe320('0x6b')][_0xe320('0x146')]){if(_0x226df9){clearPredictiveAttributes(_0x5c33d4);_0x4f9d45[_0xe320('0x2a')]=undefined;_0x4f9d45[_0xe320('0x61')]=undefined;}if(_0x5c33d4[_0xe320('0x147')]===utils[_0xe320('0x6b')]['INACTIVE']){_0x4f9d45['available']=0x0;_0x4f9d45[_0xe320('0x103')]=0x0;_0x4f9d45[_0xe320('0x149')]=0x0;_0x4f9d45[_0xe320('0x14a')]=0x0;_0x4f9d45[_0xe320('0x14b')]=0x0;}}else if(_0x5c33d4[_0xe320('0x147')]===utils[_0xe320('0x6b')][_0xe320('0x14c')]&&!_0x4d5c67){return _0x4c7c60[_0xe320('0x93')](_0x5c33d4,!![])[_0xe320('0x9f')](function(){return _0x4c7c60[_0xe320('0x93')](_0x5c33d4,![]);})[_0xe320('0x9f')](function(){return _0x4c7c60[_0xe320('0xb7')](_0x5c33d4);})[_0xe320('0xa4')](function(_0x3cbe9c){loggerSyncQueueSummary[_0xe320('0x44')](_0xe320('0x14d'),util[_0xe320('0x68')](_0x3cbe9c,{'showHidden':![],'depth':null}));clearPredictiveAttributes(_0x5c33d4);});}else{clearPredictiveAttributes(_0x5c33d4);}})[_0xe320('0x9f')](function(){var _0x53ff7e=_0x4f9d45['compareToOutboundQueue'](_0x5c33d4);if(_0x53ff7e||_0x5c33d4[_0xe320('0x14e')]){_0x5c33d4['queueSummaryCountersUpdated']=![];_0x4f9d45[_0xe320('0x14f')](_0x5c33d4);Object[_0xe320('0x150')](_0x5c33d4,_0x4f9d45);emitOutboundVoiceQueueSummary(_0x4f9d45);}_0x4c7c60[_0xe320('0x2e')][_0x5c33d4['name']]['running']=![];})[_0xe320('0xa4')](function(_0x34560e){logger[_0xe320('0x66')](_0xe320('0x14d'),util[_0xe320('0x68')](_0x34560e,{'showHidden':![],'depth':null}));_0x4c7c60[_0xe320('0x2e')][_0x5c33d4[_0xe320('0x48')]]['running']=![];});};Dialer[_0xe320('0x8d')][_0xe320('0x151')]=_[_0xe320('0x152')](function(){var _0x16c827=_[_0xe320('0x153')](this[_0xe320('0x21')],function(_0x5c693a){return _0x5c693a[_0xe320('0x154')];});var _0x5a0c3e=_[_0xe320('0x153')](this['agents'],function(_0x5f3c14){return _0x5f3c14[_0xe320('0x155')]&&_0x5f3c14[_0xe320('0x8a')]===_0xe320('0x8b');});if(_0x16c827[_0xe320('0x99')]>0x0&&_0x5a0c3e[_0xe320('0x99')]>0x0){return Promise[_0xe320('0x148')]()[_0xe320('0x9f')](cmHopper[_0xe320('0x156')](_[_0xe320('0x157')](_0x16c827,'id'),previewRecallmeReminderInterval,_[_0xe320('0x157')](_0x5a0c3e,'id')))['then'](function(_0x55ba55){for(var _0x703a0e=0x0;_0x703a0e<_0x55ba55[_0xe320('0x99')];_0x703a0e++){var _0x477dc3=_0x55ba55[_0x703a0e][_0xe320('0x158')][_0xe320('0x48')];if(_0x477dc3)io['to'](util['format']('user:%s',_0x477dc3))['emit'](_0xe320('0x159'),{'hopper':_0x55ba55[_0x703a0e]});}})['catch'](function(_0x2b78ed){logger[_0xe320('0x66')]('checkPreviewRecallReminder',_0x2b78ed);});}},0x3c*0x3e8,{'leading':!![]});Dialer['prototype'][_0xe320('0x3f')]=function(){var _0x4ec4b9=this;setInterval(function(){_0x4ec4b9[_0xe320('0x15a')](_0x4ec4b9['uniqueId'],_0xe320('0x15b'));_0x4ec4b9[_0xe320('0x15a')](_0x4ec4b9['actions'],'[actions]');},0x32c8);};Dialer[_0xe320('0x8d')]['clearZombieChannels']=function(_0x3ffe40,_0x37f3e1){var _0x2c3f3a=this;for(var _0x92757b in _0x3ffe40){if(typeof _0x3ffe40[_0x92757b]!==_0xe320('0xb0')){this[_0xe320('0x1f')][_0xe320('0x1c')](function(){if(!_[_0xe320('0x101')](_0x3ffe40[_0x92757b])){return ami['Action']({'action':_0xe320('0x8a'),'channel':_0x3ffe40[_0x92757b][_0xe320('0xfd')]})[_0xe320('0xa4')](function(_0x391333){if(_0x391333[_0xe320('0x6e')]===_0xe320('0x15c')){setTimeout(function(){if(_0x3ffe40[_0x92757b]&&_0x3ffe40[_0x92757b][_0xe320('0xc9')]!==_0xe320('0xca')){_0x2c3f3a['updateOriginated'](_0x2c3f3a[_0xe320('0x21')][_0x3ffe40[_0x92757b][_0xe320('0xc8')]]);logger[_0xe320('0x66')](_0xe320('0x15d'),_0x37f3e1,_0x92757b,_0x3ffe40[_0x92757b]['queue']);delete _0x3ffe40[_0x92757b];}if(_0x3ffe40[_0x92757b]&&_0x3ffe40[_0x92757b][_0xe320('0xc9')]==='ivr'){_0x2c3f3a[_0xe320('0xcb')](_0x2c3f3a[_0xe320('0x22')][_0x3ffe40[_0x92757b]['queue']]);logger[_0xe320('0x66')](_0xe320('0x15e'),_0x37f3e1,_0x92757b,_0x3ffe40[_0x92757b][_0xe320('0xc8')]);delete _0x3ffe40[_0x92757b];}},0x2328);}});}});}}};Dialer[_0xe320('0x8d')][_0xe320('0x15f')]=function(_0x348c98){return Promise[_0xe320('0x148')]()[_0xe320('0x9f')](voiceQueueRt[_0xe320('0x15f')](_0x348c98))[_0xe320('0xa4')](loggerCatch('[getVoiceQueueRtPauses]\x20'));};Dialer[_0xe320('0x8d')][_0xe320('0xcb')]=function(_0x35fed6){if(!_[_0xe320('0x42')](_0x35fed6)&&_0x35fed6!==null){if(typeof _0x35fed6['originated']!==_0xe320('0xb0')){if(_0x35fed6[_0xe320('0x81')]>0x0){_0x35fed6['originated']-=0x1;}else{logger['error'](_0xe320('0x160'));}}}else{logger['error'](_0xe320('0x161'));}};Dialer['prototype'][_0xe320('0x162')]=function(_0x1f1e10,_0x17e88e){var _0x2ef8c0=this;return function(_0x31d675){_0x2ef8c0[_0xe320('0xcb')](_0x17e88e);logger[_0xe320('0x66')](_0x1f1e10,util[_0xe320('0x68')](_0x31d675,{'showHidden':![],'depth':null}));};};Dialer['prototype']['emptyContact']=function(_0x31300a,_0x486b41,_0x5cea4f){var _0x423a83={'state':0x19,'statedesc':_0xe320('0x163')};this['updateOriginated'](_0x486b41);this['saveInDb'](_['merge'](_0x423a83,_[_0xe320('0x77')](_0x5cea4f,[_0xe320('0xec'),_0xe320('0xed'),_0xe320('0x164'),_0xe320('0xee'),_0xe320('0xef')])),'[emptyContact][createHistory]','[emptyContact]');logger[_0xe320('0x66')](_0x31300a);};Dialer[_0xe320('0x8d')][_0xe320('0x124')]=function(_0x45d0b5,_0xaa8c15,_0x2095bf){hopperUtils[_0xe320('0xd3')](_0x45d0b5)[_0xe320('0xa4')](loggerCatch(_0xaa8c15));hopperUtils[_0xe320('0x13b')](_0x45d0b5)[_0xe320('0xa4')](loggerCatch(_0x2095bf));};Dialer[_0xe320('0x8d')][_0xe320('0xe7')]=function(_0x571ac0,_0x1afa74){hopperUtils[_0xe320('0xd3')](_0x571ac0)['catch'](loggerCatch(_0xe320('0xd4')));if(_0x1afa74==0x0){hopperUtils[_0xe320('0x13b')](_0x571ac0)[_0xe320('0xa4')](loggerCatch(_0xe320('0x165')));}};Dialer['prototype'][_0xe320('0x166')]=function(_0x2134d3){return Promise[_0xe320('0x148')]()['then'](cmHopper[_0xe320('0x156')](_0x2134d3['id'],previewRecallmeReminderInterval))['then'](function(_0x1defdd){for(var _0x3def2c=0x0;_0x3def2c<_0x1defdd['length'];_0x3def2c++){var _0x4195ac=_0x1defdd[_0x3def2c][_0xe320('0x158')]['name'];if(_0x4195ac)io['to'](util['format'](_0xe320('0x167'),_0x4195ac))[_0xe320('0x43')](_0xe320('0x159'),{'hopper':_0x1defdd[_0x3def2c]});}})[_0xe320('0xa4')](function(){});};Dialer['prototype'][_0xe320('0xb5')]=function(_0x20c345){var _0x36e704=this;return function(){_0x36e704[_0xe320('0x168')](_0x20c345);};};Dialer[_0xe320('0x8d')][_0xe320('0x169')]=function(_0x2e8853,_0x5f31c6){var _0x13c9a4=this;var _0x350b8b=uuid['v4']();this[_0xe320('0x27')][_0x350b8b]=new Action(_0x2e8853,_0x5f31c6,_0x350b8b);return new Promise(function(_0xefb0e5,_0x158b18){if(_[_0xe320('0x42')](_0x2e8853)&&typeof _0x2e8853!==_0xe320('0x16a')){return _0x158b18(msgResponse('originate',_0xe320('0x94'),_0xe320('0x16b')));}if(_['isUndefined'](_0x5f31c6[_0xe320('0x16c')])||_0x5f31c6[_0xe320('0x16c')]===null){return _0x158b18(msgResponse(_0xe320('0x16d'),'Failure',_0xe320('0x16e')));}var _0x8eb8aa={'XMD-CALLERID':_0x13c9a4['actions'][_0x350b8b]['getCaller'](),'XMD-AGI':_0x2e8853[_0xe320('0x13d')]?util[_0xe320('0x46')](_0xe320('0x16f'),ipAgi,_0x2e8853[_0xe320('0x13d')]):_0xe320('0x170'),'XMD-AGIAFTER':_0x2e8853[_0xe320('0xd1')]?util[_0xe320('0x46')](_0xe320('0x16f'),ipAgi,_0x2e8853[_0xe320('0xd1')]):_0xe320('0x170'),'XMD-QUEUE':utils[_0xe320('0x171')](_0x2e8853)?util[_0xe320('0x46')]('\x22%s,%s%s,,,%s\x22',_0x2e8853['name'],_0x2e8853[_0xe320('0x172')]||'',_0x2e8853[_0xe320('0xd2')]?'c':'',_0x2e8853['dialQueueTimeout']||0x3):'NONE','XMD-CONTACTID':_0x5f31c6[_0xe320('0xec')],'XMD-CDRTYPE':_0xe320('0x8'),'CALLERID(all)':_0x13c9a4['actions'][_0x350b8b]['getCaller'](),'XMD-AMD':_0x2e8853['dialAMDActive']?_0xe320('0x14c'):_0xe320('0x170'),'XMD-DESTINATION':_0xe320('0x118')};if(_0x2e8853[_0xe320('0x119')]){_0x8eb8aa[_0xe320('0x173')]=_0x2e8853['dialAMDInitialSilence']||0x9c4;_0x8eb8aa[_0xe320('0x174')]=_0x2e8853[_0xe320('0x175')]||0x5dc;_0x8eb8aa[_0xe320('0x176')]=_0x2e8853['dialAMDAfterGreetingSilence']||0x320;_0x8eb8aa[_0xe320('0x177')]=_0x2e8853['dialAMDTotalAnalysisTime']||0x1388;_0x8eb8aa[_0xe320('0x178')]=_0x2e8853[_0xe320('0x179')]||0x64;_0x8eb8aa['XMD-AMDBETWEENWORDSSILENCE']=_0x2e8853[_0xe320('0x17a')]||0x32;_0x8eb8aa[_0xe320('0x17b')]=_0x2e8853[_0xe320('0x17c')]||0x3;_0x8eb8aa[_0xe320('0x17d')]=_0x2e8853['dialAMDSilenceThreshold']||0x100;_0x8eb8aa[_0xe320('0x17e')]=_0x2e8853[_0xe320('0x17f')]||0x1388;}if(utils[_0xe320('0x171')](_0x2e8853)){_0x8eb8aa[_0xe320('0x180')]=_0x5f31c6[_0xe320('0xee')];}else{_0x8eb8aa['XMD-CAMPAIGNID']=_0x5f31c6['CampaignId'];}var _0x309b04=utils[_0xe320('0x181')](_0x5f31c6[_0xe320('0x182')]);Object[_0xe320('0x150')](_0x8eb8aa,_0x309b04);var _0x33570c=_0x13c9a4[_0xe320('0x87')](_0x2e8853[_0xe320('0x183')])?utils[_0xe320('0x184')](_0x2e8853[_0xe320('0x183')]['callerid'],_0x2e8853[_0xe320('0x185')],_0x2e8853['dialRandomLastDigitCallerIdNumber']>0x0?utils[_0xe320('0x186')](_0x2e8853[_0xe320('0x187')],_0x2e8853['dialRandomLastDigitCallerIdNumber']):_0x2e8853[_0xe320('0x187')]):utils['getCallerId'](_[_0xe320('0x101')](_0x2e8853[_0xe320('0x8f')])?_0x2e8853['Trunk']['callerid']:_0x2e8853['TrunkBackup'][_0xe320('0x188')],_0x2e8853['dialOriginateCallerIdName'],_0x2e8853[_0xe320('0x189')]>0x0?utils[_0xe320('0x186')](_0x2e8853[_0xe320('0x187')],_0x2e8853[_0xe320('0x189')]):_0x2e8853[_0xe320('0x187')]);if(_0x33570c){_0x8eb8aa['XMD-ORIGINATECALLERIDNAME']=_0x13c9a4['actions'][_0x350b8b][_0xe320('0x18a')]=utils[_0xe320('0x18b')](_0x33570c);_0x8eb8aa[_0xe320('0x18c')]=_0x5f31c6[_0xe320('0x16c')];}_0x2e8853[_0xe320('0x18d')]=_0x8eb8aa;return ami[_0xe320('0x9b')]({'actionid':_0x350b8b,'action':_0xe320('0x16d'),'channel':_0x13c9a4[_0xe320('0x87')](_0x2e8853['Trunk'])?util['format']('SIP/%s/%s%s',_0x2e8853[_0xe320('0x183')][_0xe320('0x48')],isNotNull(_0x2e8853[_0xe320('0x18e')])?_0x2e8853['dialPrefix'][_0xe320('0x18f')]()||'':'',_0x2e8853['dialCutDigit']>0x0?_0x5f31c6[_0xe320('0x16c')][_0xe320('0x190')](_0x2e8853['dialCutDigit']):_0x5f31c6[_0xe320('0x16c')]):util[_0xe320('0x46')](_0xe320('0x191'),_[_0xe320('0x101')](_0x2e8853[_0xe320('0x8f')])?_0x2e8853[_0xe320('0x183')][_0xe320('0x48')]:_0x2e8853[_0xe320('0x8f')][_0xe320('0x48')],isNotNull(_0x2e8853['dialPrefix'])?_0x2e8853[_0xe320('0x18e')]['trim']()||'':'',_0x2e8853[_0xe320('0x192')]>0x0?_0x5f31c6['phone'][_0xe320('0x190')](_0x2e8853[_0xe320('0x192')]):_0x5f31c6[_0xe320('0x16c')]),'callerid':_0x33570c,'Exten':_0xe320('0x118'),'Context':_0xe320('0x193'),'Priority':'1','variable':_0x8eb8aa,'timeout':(_0x2e8853[_0xe320('0x194')]||0x1e)*0x3e8,'async':!![],'channelid':_0x350b8b})[_0xe320('0x9f')](function(_0x5aa14c){return _0xefb0e5(_0x5aa14c);})[_0xe320('0xa4')](function(_0x3af61c){_0x2e8853[_0xe320('0x195')]+=0x1;var _0x2ebcff=new History(_0x13c9a4[_0xe320('0x27')][_0x350b8b]);logger[_0xe320('0x66')](util[_0xe320('0x46')](_0xe320('0x196'),JSON[_0xe320('0xac')](_0x3af61c)));_0x2ebcff['state']=0xe;_0x2ebcff[_0xe320('0x71')]=_0xe320('0x197');_0x2ebcff[_0xe320('0x73')]=moment()[_0xe320('0x46')]('YYYY-MM-DD\x20HH:mm:ss');_0x2ebcff[_0xe320('0x72')]=_0x2ebcff[_0xe320('0x73')];hopperUtils['createHistory'](_0x2ebcff)[_0xe320('0xa4')](loggerCatch(_0xe320('0x198')));_0x13c9a4[_0xe320('0x13b')](_0x2ebcff)['catch'](loggerCatch(_0xe320('0x198')))[_0xe320('0x1e')](function(){delete _0x13c9a4[_0xe320('0x27')][_0x350b8b];return _0x158b18(msgResponse(_0xe320('0x16d'),_0xe320('0xc6'),_0xe320('0x199')));});});});};Dialer['prototype']['checkRetriveMax']=function(_0x219b61,_0x3e9027,_0x382f7c){var _0x5312f9=new History(_0x3e9027);if(_0x5312f9[_0xe320('0x12a')]+_0x5312f9['countcongestionretry']+_0x5312f9[_0xe320('0x12c')]+_0x5312f9[_0xe320('0x12d')]+_0x5312f9[_0xe320('0xe0')]+_0x5312f9['countabandonedretry']+_0x5312f9[_0xe320('0x129')]+_0x5312f9[_0xe320('0x12e')]>=_0x382f7c[_0xe320('0x12f')]-0x1){return!![];}switch(_0x219b61){case 0x3:if(_0x5312f9[_0xe320('0x12c')]>=_0x382f7c[_0xe320('0x19a')]-0x1){return!![];}hopperUtils[_0xe320('0xe8')]({'active':![],'countnoanswerretry':_0x5312f9[_0xe320('0x12c')]+=0x1,'scheduledat':moment()[_0xe320('0xe9')](_0x382f7c[_0xe320('0x19b')],'minutes')[_0xe320('0x46')](_0xe320('0xcd')),'ContactId':_0x5312f9[_0xe320('0xec')],'ListId':_0x5312f9['ListId'],'VoiceQueueId':_0x5312f9[_0xe320('0xee')]||undefined,'CampaignId':_0x5312f9['CampaignId']||undefined})['catch'](loggerCatch(_0xe320('0x19c')));break;case 0x5:if(_0x5312f9[_0xe320('0x12a')]>=_0x382f7c[_0xe320('0x19d')]-0x1){return!![];}hopperUtils[_0xe320('0xe8')]({'active':![],'countbusyretry':_0x5312f9[_0xe320('0x12a')]+=0x1,'scheduledat':moment()[_0xe320('0xe9')](_0x382f7c[_0xe320('0x19e')],_0xe320('0xeb'))[_0xe320('0x46')](_0xe320('0xcd')),'ContactId':_0x5312f9['ContactId'],'ListId':_0x5312f9[_0xe320('0xed')],'VoiceQueueId':_0x5312f9[_0xe320('0xee')]||undefined,'CampaignId':_0x5312f9[_0xe320('0xef')]||undefined})[_0xe320('0xa4')](loggerCatch(_0xe320('0x19f')));break;case 0x8:if(_0x5312f9[_0xe320('0x12b')]>=_0x382f7c[_0xe320('0x1a0')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countcongestionretry':_0x5312f9['countcongestionretry']+=0x1,'scheduledat':moment()[_0xe320('0xe9')](_0x382f7c['dialCongestionRetryFrequency'],_0xe320('0xeb'))['format'](_0xe320('0xcd')),'ContactId':_0x5312f9['ContactId'],'ListId':_0x5312f9[_0xe320('0xed')],'VoiceQueueId':_0x5312f9[_0xe320('0xee')]||undefined,'CampaignId':_0x5312f9[_0xe320('0xef')]||undefined})[_0xe320('0xa4')](loggerCatch(_0xe320('0x1a1')));break;case 0x0:if(_0x5312f9[_0xe320('0x12d')]>=_0x382f7c[_0xe320('0x1a2')]-0x1){return!![];}else{hopperUtils[_0xe320('0xe8')]({'active':![],'countnosuchnumberretry':_0x5312f9[_0xe320('0x12d')]+=0x1,'scheduledat':moment()[_0xe320('0xe9')](_0x382f7c[_0xe320('0x1a3')],_0xe320('0xeb'))['format'](_0xe320('0xcd')),'ContactId':_0x5312f9[_0xe320('0xec')],'ListId':_0x5312f9[_0xe320('0xed')],'VoiceQueueId':_0x5312f9[_0xe320('0xee')]||undefined,'CampaignId':_0x5312f9[_0xe320('0xef')]||undefined})[_0xe320('0xa4')](loggerCatch(_0xe320('0x1a4')));}break;case 0xa:if(_0x5312f9[_0xe320('0xe0')]>=_0x382f7c[_0xe320('0xe6')]-0x1){return!![];}hopperUtils[_0xe320('0xe8')]({'active':![],'countdropretry':_0x5312f9[_0xe320('0xe0')]+=0x1,'scheduledat':moment()[_0xe320('0xe9')](_0x382f7c[_0xe320('0xea')],_0xe320('0xeb'))[_0xe320('0x46')](_0xe320('0xcd')),'ContactId':_0x5312f9['ContactId'],'ListId':_0x5312f9['ListId'],'VoiceQueueId':_0x5312f9['VoiceQueueId']||undefined,'CampaignId':_0x5312f9[_0xe320('0xef')]||undefined})[_0xe320('0xa4')](loggerCatch(_0xe320('0xf0')));break;case 0xb:if(_0x5312f9['countabandonedretry']>=_0x382f7c[_0xe320('0xfa')]-0x1){return!![];}hopperUtils[_0xe320('0xe8')]({'active':![],'countabandonedretry':_0x5312f9[_0xe320('0xf9')]+=0x1,'scheduledat':moment()[_0xe320('0xe9')](_0x382f7c[_0xe320('0xf8')],_0xe320('0xeb'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x5312f9[_0xe320('0xec')],'ListId':_0x5312f9[_0xe320('0xed')],'VoiceQueueId':_0x5312f9[_0xe320('0xee')]||undefined,'CampaignId':_0x5312f9[_0xe320('0xef')]||undefined})[_0xe320('0xa4')](loggerCatch(_0xe320('0xfb')));break;case 0x13:if(_0x5312f9[_0xe320('0x129')]>=_0x382f7c[_0xe320('0x130')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countmachineretry':_0x5312f9[_0xe320('0x129')]+=0x1,'scheduledat':moment()['add'](_0x382f7c[_0xe320('0x133')],_0xe320('0xeb'))['format']('YYYY-MM-DD\x20HH:mm:ss'),'ContactId':_0x5312f9[_0xe320('0xec')],'ListId':_0x5312f9[_0xe320('0xed')],'VoiceQueueId':_0x5312f9[_0xe320('0xee')]||undefined,'CampaignId':_0x5312f9['CampaignId']||undefined})['catch'](loggerCatch(_0xe320('0x1a5')));break;case 0x14:if(_0x5312f9[_0xe320('0x12e')]>=_0x382f7c[_0xe320('0x1a6')]-0x1){return!![];}hopperUtils['rescheduleContact']({'active':![],'countagentrejectretry':_0x5312f9[_0xe320('0x12e')]+=0x1,'scheduledat':moment()[_0xe320('0xe9')](_0x382f7c[_0xe320('0x1a7')],'minutes')[_0xe320('0x46')](_0xe320('0xcd')),'ContactId':_0x5312f9[_0xe320('0xec')],'ListId':_0x5312f9['ListId'],'VoiceQueueId':_0x5312f9[_0xe320('0xee')]||undefined,'CampaignId':_0x5312f9[_0xe320('0xef')]||undefined})[_0xe320('0xa4')](loggerCatch('[rescheduleContact][AgentReject]'));break;default:return!![];}};Dialer[_0xe320('0x8d')][_0xe320('0x1a8')]=function(_0x4df889,_0x27356d,_0x30dffc){var _0x55ed7a=this;var _0x2dabef=new History(_0x4df889);var _0xbc3792=![];var _0x4277c6;var _0x2a16fa;return new Promise(function(_0x13863c,_0x4d78a8){if(_[_0xe320('0x42')](_0x27356d)&&typeof _0x27356d!==_0xe320('0x16a')){return _0x4d78a8(msgResponse(_0xe320('0x1a9'),_0xe320('0x94'),_0xe320('0x1aa')));}if(_[_0xe320('0x42')](_0x30dffc)&&typeof _0x30dffc!=='object'){return _0x4d78a8(msgResponse(_0xe320('0x1a9'),_0xe320('0x94'),_0xe320('0x1ab')));}hopperUtils[_0xe320('0xe3')](_0x2dabef,_0x30dffc[_0xe320('0xcf')],_0x27356d)[_0xe320('0x9f')](function(_0x4cef3d){if(_0x4cef3d[_0xe320('0xe5')]==0x1)_0xbc3792=!![];switch(_0x30dffc[_0xe320('0xcf')]){case'0':_0x27356d['outboundNoSuchCallsDay']+=0x1;_0x2dabef[_0xe320('0xdb')]=0x0;_0x2dabef[_0xe320('0x71')]=_0xe320('0x1ac');_0x2dabef[_0xe320('0x12d')]+=0x1;_0x2dabef[_0xe320('0xe1')]+=0x1;ami[_0xe320('0x43')]('custom:agentnosuchnumber',ut[_0xe320('0x122')](_0x4df889,_0xe320('0x1ad')));_0x4277c6=_0x27356d[_0xe320('0x1a3')];_0x2a16fa=_0x27356d['callAdditionalPhoneAfterMin'];hopperUtils[_0xe320('0xd3')](_0x2dabef)[_0xe320('0xa4')](loggerCatch(_0xe320('0x135')));if(_0x55ed7a['checkRetriveMax'](0x0,_0x4df889,_0x27356d)&&!_0xbc3792){if(_0x2dabef[_0xe320('0x12d')]>=_0x27356d['dialNoSuchNumberMaxRetry']){_0x55ed7a[_0xe320('0x131')](_0x2dabef,_0x13863c,_0x4d78a8,_0xe320('0x1ae'));}else{_0x55ed7a[_0xe320('0x136')](_0x2dabef,_0x13863c,_0x4d78a8,_0xe320('0x1ae'));}}break;case'3':_0x27356d[_0xe320('0x1af')]+=0x1;_0x2dabef[_0xe320('0xdb')]=0x3;_0x2dabef['statedesc']='NoAnswer';_0x2dabef[_0xe320('0x12c')]+=0x1;_0x2dabef[_0xe320('0xe1')]+=0x1;var _0x2bf975=ut[_0xe320('0x1b0')](_0x4df889,_0x27356d);ami['emit']('custom:agentnoanswer',_0x2bf975);_0x4277c6=_0x27356d[_0xe320('0x19b')];_0x2a16fa=_0x27356d[_0xe320('0xe2')];hopperUtils[_0xe320('0xd3')](_0x2dabef)[_0xe320('0xa4')](loggerCatch('[syncAgentComplete][createHistory][3]'));if(_0x55ed7a[_0xe320('0x1b1')](0x3,_0x4df889,_0x27356d)&&!_0xbc3792){if(_0x2dabef[_0xe320('0x12c')]>=_0x27356d[_0xe320('0x19a')]){_0x55ed7a[_0xe320('0x131')](_0x2dabef,_0x13863c,_0x4d78a8,_0xe320('0x1b2'));}else{_0x55ed7a[_0xe320('0x136')](_0x2dabef,_0x13863c,_0x4d78a8,_0xe320('0x1b2'));}}break;case'5':_0x27356d[_0xe320('0x1b3')]+=0x1;_0x2dabef['state']=0x5;_0x2dabef['statedesc']=_0xe320('0x1b4');_0x2dabef[_0xe320('0x12a')]+=0x1;_0x2dabef[_0xe320('0xe1')]+=0x1;ami[_0xe320('0x43')](_0xe320('0x1b5'),ut[_0xe320('0x122')](_0x4df889,_0xe320('0x1b6')));_0x4277c6=_0x27356d[_0xe320('0x19e')];_0x2a16fa=_0x27356d['callAdditionalPhoneAfterMin'];hopperUtils[_0xe320('0xd3')](_0x2dabef)[_0xe320('0xa4')](loggerCatch(_0xe320('0x1b7')));if(_0x55ed7a['checkRetriveMax'](0x5,_0x4df889,_0x27356d)&&!_0xbc3792){if(_0x2dabef[_0xe320('0x12a')]>=_0x27356d[_0xe320('0x19d')]){_0x55ed7a['createStateFinal'](_0x2dabef,_0x13863c,_0x4d78a8,_0xe320('0x1b8'));}else{_0x55ed7a[_0xe320('0x136')](_0x2dabef,_0x13863c,_0x4d78a8,_0xe320('0x1b8'));}}break;case'8':_0x27356d[_0xe320('0x1b9')]+=0x1;_0x2dabef['state']=0x8;_0x2dabef[_0xe320('0x71')]='Congestion';_0x2dabef[_0xe320('0x12b')]+=0x1;_0x2dabef['countglobal']+=0x1;_0x4277c6=_0x27356d[_0xe320('0x1ba')];_0x2a16fa=_0x27356d[_0xe320('0xe2')];ami[_0xe320('0x43')]('custom:agentcongestion',ut['buildObj'](_0x4df889,_0xe320('0x1bb')));hopperUtils[_0xe320('0xd3')](_0x2dabef)['catch'](loggerCatch(_0xe320('0x1bc')));if(_0x55ed7a[_0xe320('0x1b1')](0x8,_0x4df889,_0x27356d)&&!_0xbc3792){if(_0x2dabef['countcongestionretry']>=_0x27356d[_0xe320('0x1a0')]){_0x55ed7a['createStateFinal'](_0x2dabef,_0x13863c,_0x4d78a8,'reason\x208\x20congestion');}else{_0x55ed7a[_0xe320('0x136')](_0x2dabef,_0x13863c,_0x4d78a8,_0xe320('0x1bd'));}}break;case'11':_0x27356d['outboundAbandonedCallsDay']+=0x1;_0x2dabef[_0xe320('0xdb')]=0xb;_0x2dabef[_0xe320('0x71')]=_0xe320('0xf6');_0x2dabef['countabandonedretry']+=0x1;_0x2dabef[_0xe320('0xe1')]+=0x1;_0x4277c6=_0x27356d['dialAbandonedRetryFrequency'];_0x2a16fa=_0x27356d['callAdditionalPhoneAfterMin'];hopperUtils[_0xe320('0xd3')](_0x2dabef)[_0xe320('0xa4')](loggerCatch(_0xe320('0xfc')));if(_0x55ed7a[_0xe320('0x1b1')](0xb,_0x4df889,_0x27356d)&&!_0xbc3792){if(_0x2dabef['countabandonedretry']>=_0x27356d[_0xe320('0xfa')]){_0x55ed7a[_0xe320('0x131')](_0x2dabef,_0x13863c,_0x4d78a8,_0xe320('0x1be'));}else{_0x55ed7a[_0xe320('0x136')](_0x2dabef,_0x13863c,_0x4d78a8,_0xe320('0x1be'));}}break;case'20':_0x27356d[_0xe320('0x1bf')]+=0x1;_0x2dabef[_0xe320('0xdb')]=0x14;_0x2dabef[_0xe320('0x71')]=_0xe320('0x1c0');_0x2dabef[_0xe320('0x12e')]+=0x1;_0x2dabef[_0xe320('0xe1')]+=0x1;_0x4277c6=_0x27356d[_0xe320('0x1a7')];_0x2a16fa=_0x27356d[_0xe320('0xe2')];ami[_0xe320('0x43')]('custom:agentreject',ut[_0xe320('0x122')](_0x4df889,'agentreject'));hopperUtils[_0xe320('0xd3')](_0x2dabef)[_0xe320('0xa4')](loggerCatch(_0xe320('0x1c1')));if(_0x55ed7a[_0xe320('0x1b1')](0x14,_0x4df889,_0x27356d)&&!_0xbc3792){if(_0x2dabef[_0xe320('0x12e')]>=_0x27356d[_0xe320('0x1a6')]){_0x55ed7a['createStateFinal'](_0x2dabef,_0x13863c,_0x4d78a8,_0xe320('0x1c2'));}else{_0x55ed7a['stateGlobal'](_0x2dabef,_0x13863c,_0x4d78a8,'reason\x2020\x20agentreject');}}break;default:_0x27356d[_0xe320('0x142')]+=0x1;_0x2dabef[_0xe320('0xdb')]=0xc;_0x2dabef[_0xe320('0x71')]=_0x30dffc[_0xe320('0xcf')];_0x4277c6=_0x27356d[_0xe320('0x1a7')];_0x2a16fa=_0x27356d[_0xe320('0xe2')];hopperUtils[_0xe320('0xd3')](_0x2dabef)[_0xe320('0xa4')](loggerCatch(_0xe320('0x1c3')));if(_0x55ed7a[_0xe320('0x1b1')](_0x30dffc[_0xe320('0xcf')],_0x4df889,_0x27356d)&&!_0xbc3792){if(_0x2dabef[_0xe320('0x12a')]+_0x2dabef['countcongestionretry']+_0x2dabef[_0xe320('0x12c')]+_0x2dabef[_0xe320('0x12d')]+_0x2dabef[_0xe320('0xe0')]+_0x2dabef[_0xe320('0xf9')]+_0x2dabef[_0xe320('0x129')]+_0x2dabef['countagentrejectretry']>=_0x27356d['dialGlobalMaxRetry']){_0x55ed7a['stateGlobal'](_0x2dabef,_0x13863c,_0x4d78a8,_0x30dffc[_0xe320('0xcf')]);}else{_0x55ed7a[_0xe320('0x131')](_0x2dabef,_0x13863c,_0x4d78a8,_0x30dffc['reason']);}}}})[_0xe320('0x9f')](function(){if(_0xbc3792){hopperUtils['swapAdditionalPhones'](_0x2dabef,_0x4277c6,_0x2a16fa)[_0xe320('0x9f')](function(){return _0x13863c(0x1);});}});});};Dialer['prototype'][_0xe320('0x136')]=function(_0x35778b,_0x5b47d1,_0x2807cb,_0x336287){var _0x169a4c=new Final(_0x35778b);_0x169a4c[_0xe320('0xdb')]=0xf;_0x169a4c[_0xe320('0x71')]=_0xe320('0x1c4');this[_0xe320('0x131')](_0x169a4c,_0x5b47d1,_0x2807cb,_0x336287);};Dialer[_0xe320('0x8d')][_0xe320('0x131')]=function(_0x116153,_0x43989a,_0x379620,_0xc36979){hopperUtils['moveContactManagedDialer'](_0x116153)[_0xe320('0x9f')](function(){return _0x43989a(msgResponse(_0xe320('0x1a9'),'Success',_0xc36979));})['catch'](function(){return _0x379620(msgResponse(_0xe320('0x1c5'),_0xe320('0x94'),'contact\x20not\x20moved'));});};Dialer[_0xe320('0x8d')][_0xe320('0xa')]=function(_0x20853d){var _0x4f5db6=_0x20853d[_0xe320('0x1c6')]/0x64;var _0x4fce01=_0x20853d[_0xe320('0xd9')]/(_0x20853d[_0xe320('0xd9')]+_0x20853d['outboundAnswerCallsDay']);var _0x2f38fe=Math['round'](_0x20853d['predictiveIntervalAvailable']*(_0x20853d[_0xe320('0x1c7')]/0x64));var _0x4119da=Math['round'](_0x20853d['predictiveIntervalAvailable']*(_0x20853d[_0xe320('0x1c8')]/0x64));var _0x54a9f5=_0x20853d[_0xe320('0x1c9')]+_0x20853d[_0xe320('0x14a')];var _0x2a60a2=Math['floor'](_0x20853d['erlangCalls']*_0x20853d[_0xe320('0x5c')]*_0x20853d[_0xe320('0x1ca')]*_0x20853d[_0xe320('0x1cb')]);if(_[_0xe320('0x42')](_0x20853d[_0xe320('0x61')])){if(!_[_0xe320('0x42')](_0x20853d[_0xe320('0x2a')])){_0x20853d[_0xe320('0x2a')]=undefined;loggerPredictive[_0xe320('0x66')](_0xe320('0x1cc'),'check\x20predictive\x20is\x20not\x20undefine');}if(!_['isUndefined'](_0x20853d[_0xe320('0x64')])){loggerPredictive[_0xe320('0x66')](_0xe320('0x1cc'),_0xe320('0x1cd'));clearInterval(_0x20853d[_0xe320('0x64')]);_0x20853d[_0xe320('0x64')]=undefined;}_0x20853d[_0xe320('0x61')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive[_0xe320('0x4b')](_0x20853d['name'],_0xe320('0x1ce'),_0x20853d[_0xe320('0x61')]);this[_0xe320('0xba')](_0x20853d,0x1);}else if(ifInterval(_0x20853d[_0xe320('0x1cf')],_0x20853d[_0xe320('0x61')])){this[_0xe320('0xba')](_0x20853d,0x1);loggerPredictiveCalls[_0xe320('0x4b')](_0xe320('0x1d0'),_0x20853d[_0xe320('0x61')],_0x20853d[_0xe320('0x48')]);_0x20853d[_0xe320('0x59')]=0x0;_0x20853d['predictiveIntervalErlangCallsDroppedCalls']=0x0;}else if(_0x4f5db6<_0x4fce01&&_0x20853d[_0xe320('0x1d1')]===_0xe320('0x1d2')){clearPredictiveAttributes(_0x20853d);loggerPredictive['info'](_0xe320('0x1d3'),_0xe320('0x1d4'),_0x4fce01,_0xe320('0x61'),_0x20853d[_0xe320('0x48')]);}else if(_0x2a60a2<_0x20853d[_0xe320('0xda')]&&_0x20853d[_0xe320('0x1d1')]===_0xe320('0x1d2')){clearPredictiveAttributes(_0x20853d);loggerPredictive[_0xe320('0x4b')](_0xe320('0x1d5'),_0xe320('0x1d6'),_0x2a60a2,_0xe320('0x1d7'),_0x20853d[_0xe320('0xda')],'startProgressive',_0x20853d[_0xe320('0x48')]);}else if(!ifInterval(_0x20853d[_0xe320('0x1cf')],_0x20853d[_0xe320('0x61')])&&_[_0xe320('0x42')](_0x20853d[_0xe320('0x2a')])&&!_[_0xe320('0x42')](_0x20853d[_0xe320('0x61')])){_0x20853d[_0xe320('0x2a')]=moment()[_0xe320('0x46')](_0xe320('0xcd'));loggerPredictive[_0xe320('0x4b')](_0x20853d[_0xe320('0x48')],'started\x20in\x20predictive\x20at',_0x20853d[_0xe320('0x2a')]);hopperUtils[_0xe320('0x1d8')](_0x20853d[_0xe320('0x1cf')])[_0xe320('0x9f')](this[_0xe320('0x1d9')](_0x20853d))[_0xe320('0x9f')](mergeDataErlangB(_0x20853d))[_0xe320('0x9f')](this[_0xe320('0x1da')](_0x20853d))['catch'](loggerCatchPredictive(_0xe320('0x1db'),_0x20853d));}else if(!ifInterval(_0x20853d['dialPredictiveInterval'],_0x20853d[_0xe320('0x2a')])){_0x20853d[_0xe320('0xda')]=0x0;_0x20853d[_0xe320('0x2a')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');loggerPredictive[_0xe320('0x4b')](_0x20853d['name'],_0xe320('0x1dc'),_0x20853d[_0xe320('0x2a')]);clearInterval(_0x20853d[_0xe320('0x64')]);_0x20853d[_0xe320('0x64')]=undefined;hopperUtils['avgHandleTime'](_0x20853d[_0xe320('0x1cf')])[_0xe320('0x9f')](this[_0xe320('0x1d9')](_0x20853d))[_0xe320('0x9f')](mergeDataErlangB(_0x20853d))['then'](this[_0xe320('0x1da')](_0x20853d))[_0xe320('0xa4')](loggerCatchPredictive('Predictive\x20for\x20every\x20interval',_0x20853d));}else if(_0x20853d['predictiveIntervalAvailable']&&_0x54a9f5<_0x20853d[_0xe320('0x1dd')]-_0x4119da){clearPredictiveAttributes(_0x20853d);loggerPredictive[_0xe320('0x4b')](_0x20853d[_0xe320('0x48')],_0xe320('0x1de'),_0x54a9f5,_0xe320('0x1df'),_0x20853d[_0xe320('0x1dd')],'-',_0x4119da,'=',_0x20853d[_0xe320('0x1dd')]-_0x4119da,')');}else if(_0x20853d[_0xe320('0x1dd')]&&_0x54a9f5>_0x20853d[_0xe320('0x1dd')]+_0x2f38fe){clearPredictiveAttributes(_0x20853d);loggerPredictive[_0xe320('0x4b')](_0x20853d[_0xe320('0x48')],_0xe320('0x1de'),_0x54a9f5,')\x20are\x20more\x20than\x20threshold\x20(',_0x20853d['predictiveIntervalAvailable'],'+',_0x2f38fe,'=',_0x20853d[_0xe320('0x1dd')]+_0x2f38fe,')');}};Dialer[_0xe320('0x8d')][_0xe320('0x1d9')]=function(_0x11a9b8){var _0x13ada8=this;return function(_0x24747a){return new Promise(function(_0x2016d6,_0x42329d){_[_0xe320('0x106')](_0x11a9b8,_0x24747a[0x0]);if(checkGetDataPredictive(_0x24747a[0x0])){var _0x50c45e=_0x11a9b8['predictiveIntervalAvailable']=_0x11a9b8[_0xe320('0x14a')]+_0x11a9b8[_0xe320('0x1c9')];var _0x200deb=_0x11a9b8[_0xe320('0x1cf')]*0x3c;var _0x402a5b=_0x24747a[0x0][_0xe320('0x54')]+_0x24747a[0x0][_0xe320('0x56')];var _0x3cfa15=(_0x24747a[0x0]['predictiveIntervalAnsweredCalls']+_0x24747a[0x0][_0xe320('0xd8')]+_0x24747a[0x0][_0xe320('0x1e0')])/_0x24747a[0x0][_0xe320('0x4e')];_0x11a9b8[_0xe320('0x1ca')]=_0x3cfa15>0x0?_0x3cfa15:0x1;switch(_0x11a9b8[_0xe320('0x1d1')]){case _0xe320('0x1d2'):var _0x3b5e26=_0x11a9b8[_0xe320('0x1c6')]/0x64;return _0x13ada8['abandonmentRate'](_0x50c45e,_0x200deb,_0x402a5b,_0x3cfa15,_0x3b5e26)[_0xe320('0x9f')](function(_0x39e300){return _0x2016d6(_0x39e300);});case _0xe320('0x1e1'):var _0x20d3c2=_0x11a9b8[_0xe320('0x1c6')]/0x64;return _0x13ada8[_0xe320('0x1e2')](_0x50c45e,_0x200deb,_0x402a5b,_0x3cfa15,_0x20d3c2)['then'](function(_0x6488aa){return _0x2016d6(_0x6488aa);});default:return _0x42329d(msgResponse(_0xe320('0x1e3'),'Failure','Unknown\x20Predictive'));}}else{return _0x42329d(msgResponse('[getDataPredictive]',_0xe320('0x94'),_0xe320('0x1e4')));}});};};Dialer['prototype'][_0xe320('0x1e5')]=function(_0xb493d3){var _0x392626=this;return function(_0x3056da){return new Promise(function(_0x2152b3,_0x630473){_[_0xe320('0x106')](_0xb493d3,_0x3056da[0x0]);if(checkGetDataPredictive(_0x3056da[0x0])){loggerPredictive['info'](JSON[_0xe320('0xac')](_0x3056da[0x0]));if(_0xb493d3[_0xe320('0x1d1')]===_0xe320('0x1d2')){return _0x392626['getVoiceQueueRtPauses'](_0xb493d3['id'])[_0xe320('0x9f')](function(_0x31f93a){var _0x5b8d14=_0xb493d3[_0xe320('0x1e6')]-_0x31f93a[0x0][_0xe320('0x1e7')];var _0xce7055=_0xb493d3[_0xe320('0x1cf')]*0x3c;var _0x4d2525=_0x3056da[0x0]['predictiveIntervalAvgTalktime']+_0x3056da[0x0]['predictiveIntervalAvgHoldtime'];var _0x1843df=(_0x3056da[0x0]['predictiveIntervalAnsweredCalls']+_0x3056da[0x0][_0xe320('0xd8')]+_0x3056da[0x0][_0xe320('0x1e0')])/_0x3056da[0x0][_0xe320('0x4e')];var _0x28440d=_0xb493d3[_0xe320('0x1c6')]/0x64;_0xb493d3['predictiveIntervalPauses']=_0x31f93a[0x0]['outboundQueuePauses']||0x0;_0xb493d3[_0xe320('0x1ca')]=_0x1843df>0x0?_0x1843df:0x1;return _0x392626[_0xe320('0x1e8')](_0x5b8d14,_0xce7055,_0x4d2525,_0x1843df,_0x28440d);})['then'](function(_0x140a85){return _0x2152b3(_0x140a85);})[_0xe320('0xa4')](function(_0x5f256e){return _0x630473(msgResponse(_0xe320('0x1e9'),_0xe320('0x94'),JSON[_0xe320('0xac')](_0x5f256e)));});}if(_0xb493d3['dialPredictiveOptimization']===_0xe320('0x1e1')){return _0x392626[_0xe320('0x15f')](_0xb493d3['id'])[_0xe320('0x9f')](function(_0x2c2b98){var _0xe92c6c=_0xb493d3['loggedIn']-_0x2c2b98[0x0]['outboundQueuePauses'];var _0x2cb06d=_0xb493d3[_0xe320('0x1cf')]*0x3c;var _0x5ea546=_0x3056da[0x0][_0xe320('0x54')]+_0x3056da[0x0][_0xe320('0x56')];var _0x4d1e5a=(_0x3056da[0x0][_0xe320('0x4f')]+_0x3056da[0x0][_0xe320('0xd8')]+_0x3056da[0x0][_0xe320('0x1e0')])/_0x3056da[0x0][_0xe320('0x4e')];var _0x356d3e=_0xb493d3[_0xe320('0x1c6')]/0x64;_0xb493d3[_0xe320('0x1ea')]=_0x2c2b98[0x0][_0xe320('0x1e7')]||0x0;_0xb493d3[_0xe320('0x1ca')]=_0x4d1e5a>0x0?_0x4d1e5a:0x1;return _0x392626[_0xe320('0x1e2')](_0xe92c6c,_0x2cb06d,_0x5ea546,_0x4d1e5a,_0x356d3e);})['then'](function(_0xdac5c0){return _0x2152b3(_0xdac5c0);})[_0xe320('0xa4')](function(_0x22f33a){return _0x630473(msgResponse(_0xe320('0x1e9'),'Failure',JSON[_0xe320('0xac')](_0x22f33a)));});}}else{return _0x630473(msgResponse(_0xe320('0x1e3'),_0xe320('0x94'),_0xe320('0x1e4')));}});};};Dialer['prototype']['startMethodPredictive']=function(_0x43e156){var _0x2b4773=this;return function(){var _0x38c565=0x0;var _0x3260c6=Math[_0xe320('0x1eb')](_0x43e156[_0xe320('0x5b')]*0x3e8);if(_0x3260c6>0x0){_0x3260c6=_0x3260c6<0x64?0x64:_0x3260c6;loggerPredictive[_0xe320('0x4b')](_0x43e156[_0xe320('0x48')],_0xe320('0x1ec'),_0x3260c6,'milliseconds');_0x43e156[_0xe320('0x64')]=setInterval(function(){_0x2b4773['handlePredictive'](_0x43e156);loggerPredictiveCalls['info'](_0xe320('0x1ed'),_0x38c565+=0x1);},_0x3260c6);}else{loggerPredictive[_0xe320('0x4b')](_0x43e156[_0xe320('0x48')],_0xe320('0x1ee'));}};};Dialer[_0xe320('0x8d')][_0xe320('0x1ef')]=function(_0x24ee1a,_0x50e9c0){var _0x2f4606=this;return function(_0x354486){if(_[_0xe320('0x4a')](_0x354486)){if(_['isNil'](_0x50e9c0[_0xe320('0x164')])||!_0x50e9c0[_0xe320('0x1f0')]){if(_0x24ee1a['dialMethod']===_0xe320('0x9')){_0x24ee1a[_0xe320('0x74')]=_['isUndefined'](_0x24ee1a[_0xe320('0x74')])?!![]:_0x24ee1a[_0xe320('0x74')];var _0x101f28=uuid['v4']();_0x2f4606[_0xe320('0x27')][_0x101f28]=new Action(_0x24ee1a,_0x50e9c0,_0x101f28);loggerBooked[_0xe320('0x4b')](_0xe320('0x1f1'),_0x101f28,'queueStatusComplete:\x20',JSON[_0xe320('0xac')](_0x24ee1a[_0xe320('0x74')]),_0xe320('0x1f2'),_0x24ee1a[_0xe320('0x48')]);if(_0x24ee1a['queueStatusComplete']){_0x24ee1a[_0xe320('0x74')]=![];_0x2f4606['queueBooked'][_0x2f4606['actions'][_0x101f28][_0xe320('0xc8')]]=[];ami[_0xe320('0x9b')]({'actionid':_0x101f28,'action':'queuestatus','queue':_0x24ee1a[_0xe320('0x48')]})[_0xe320('0xa4')](function(){_0x2f4606['updateOriginated'](_0x24ee1a);hopperUtils[_0xe320('0xe8')]({'active':![],'ContactId':_0x2f4606[_0xe320('0x27')][_0x101f28]['ContactId'],'ListId':_0x2f4606[_0xe320('0x27')][_0x101f28]['ListId'],'VoiceQueueId':_0x2f4606['actions'][_0x101f28][_0xe320('0xee')]||undefined,'CampaignId':_0x2f4606[_0xe320('0x27')][_0x101f28]['CampaignId']||undefined})[_0xe320('0xa4')](loggerCatch(_0xe320('0x1f3')));delete _0x2f4606['actions'][_0x101f28];});}else{loggerBooked[_0xe320('0x4b')](_0xe320('0x1f4'),JSON[_0xe320('0xac')](_0x24ee1a[_0xe320('0x74')]),_0xe320('0x1f2'),_0x24ee1a[_0xe320('0x48')]);_0x2f4606['updateOriginated'](_0x24ee1a);hopperUtils['rescheduleContact']({'active':![],'ContactId':_0x2f4606[_0xe320('0x27')][_0x101f28][_0xe320('0xec')],'ListId':_0x2f4606[_0xe320('0x27')][_0x101f28]['ListId'],'VoiceQueueId':_0x2f4606[_0xe320('0x27')][_0x101f28]['VoiceQueueId']||undefined,'CampaignId':_0x2f4606[_0xe320('0x27')][_0x101f28]['CampaignId']||undefined})['catch'](loggerCatch(_0xe320('0x1f3')));delete _0x2f4606[_0xe320('0x27')][_0x101f28];}}else{return _0x2f4606[_0xe320('0x169')](_0x24ee1a,_0x50e9c0);}}else{if(utils['getSeconds'](undefined,_0x50e9c0[_0xe320('0x1f5')])<_0x24ee1a[_0xe320('0x1f6')]*0x3c){if(_0x50e9c0['Agent']&&!_0x50e9c0[_0xe320('0x158')][_0xe320('0x1f7')]){_0x2f4606[_0xe320('0x20')][_0xe320('0x108')](_0x50e9c0['id'])[_0xe320('0x1e')](function(){_0x2f4606[_0xe320('0xcb')](_0x24ee1a);});}else{hopperUtils[_0xe320('0x1f8')]({'active':![]},_0x50e9c0['id'],0x1)['finally'](function(){_0x2f4606['updateOriginated'](_0x24ee1a);});}}else{_0x24ee1a['outboundReCallsDay']+=0x1;_0x2f4606['updateOriginated'](_0x24ee1a);if(_0x24ee1a[_0xe320('0x1f9')]){hopperUtils['rescheduleContact']({'active':![],'recallme':![],'UserId':null,'ContactId':_0x50e9c0[_0xe320('0xec')],'ListId':_0x50e9c0[_0xe320('0xed')],'VoiceQueueId':_0x50e9c0['VoiceQueueId']||undefined,'CampaignId':_0x50e9c0[_0xe320('0xef')]||undefined})[_0xe320('0xa4')](loggerCatch(_0xe320('0x1fa')));hopperUtils[_0xe320('0xd3')](createObjHistory(_0x24ee1a,_0x50e9c0,utils[_0xe320('0x6b')][_0xe320('0x1fb')],0x17,_0xe320('0x1fc')))[_0xe320('0xa4')](loggerCatch(_0xe320('0x1fd')));}else{_0x2f4606['saveInDb'](createObjHistory(_0x24ee1a,_0x50e9c0,utils[_0xe320('0x6b')][_0xe320('0x1fe')],0x16,_0xe320('0x1ff')),_0xe320('0x200'),_0xe320('0x201'));}}}}else{_0x24ee1a['outboundBlacklistCallsDay']+=0x1;_0x2f4606[_0xe320('0x124')](createObjHistory(_0x24ee1a,_0x50e9c0,utils[_0xe320('0x6b')][_0xe320('0x202')],0xd,_0xe320('0x203')),_0xe320('0x204'),_0xe320('0x205'));throw _0xe320('0x206');}};};Dialer[_0xe320('0x8d')][_0xe320('0x168')]=function(_0x4fd4f7){var _0x48bf13=this;var _0x2e7091=_0x4fd4f7[_0xe320('0x207')]-_0x4fd4f7[_0xe320('0x81')];emitCampaignSummary(_0x4fd4f7);if(_0x2e7091>0x0&&_0x4fd4f7[_0xe320('0x6a')]==0x0){if(_0x2e7091>this[_0xe320('0x25')]){_0x2e7091=this[_0xe320('0x25')];}_0x4fd4f7[_0xe320('0x6a')]=0x1;hopperUtils['getContactDialerIvr'](_0x4fd4f7,_0x2e7091)['then'](function(_0x4ca469){_0x4fd4f7[_0xe320('0x6a')]=0x0;if(_0x4ca469){if(!utils['checkContactEmpty'](_0x4ca469)){_0x4fd4f7[_0xe320('0x6e')]=utils['CAMPAIGN_STATUS'][_0xe320('0x6f')];logger[_0xe320('0x4b')](_0xe320('0x208')+_0x4fd4f7['name']);}else{_0x4fd4f7[_0xe320('0x81')]+=_0x4ca469[_0xe320('0x99')];_0x4fd4f7[_0xe320('0x6e')]=utils[_0xe320('0x6b')][_0xe320('0x209')];for(var _0x26ff2=0x0;_0x26ff2<_0x4ca469['length'];_0x26ff2+=0x1){_0x4fd4f7[_0xe320('0x20a')]+=0x1;if(_['isNil'](_0x4ca469[_0x26ff2])||_[_0xe320('0x101')](_0x4ca469[_0x26ff2]['Contact'])||_[_0xe320('0x101')](_0x4ca469[_0x26ff2]['phone'])){_0x48bf13[_0xe320('0x20b')](_0xe320('0x20c'),_0x4fd4f7,_0x4ca469[_0x26ff2]);}else{hopperUtils[_0xe320('0x20d')](_['pick'](_0x4ca469[_0x26ff2],['CampaignId',_0xe320('0x16c')]))[_0xe320('0x9f')](_0x48bf13[_0xe320('0x1ef')](_0x4fd4f7,_0x4ca469[_0x26ff2]))[_0xe320('0xa4')](_0x48bf13[_0xe320('0x162')](_0xe320('0x20e'),_0x4fd4f7));}}}}})[_0xe320('0xa4')](loggerGetContactDialer('[getContactCampaign2]',_0x4fd4f7,_0x2e7091));}};Dialer['prototype']['handlePower']=function(_0xb7755e,_0x3cf828){var _0xe477de=this;var _0x19c6da=[];if(_0x3cf828<0x1||_0xb7755e['dialMethod']==='booked'){_0x3cf828=0x1;}var _0x40765a=Math['floor'](_0xb7755e[_0xe320('0x1c9')]*_0x3cf828)-_0xb7755e['originated'];if(_0xb7755e['dialLimitQueue']>0x0){var _0x2d0fe0=_0xb7755e[_0xe320('0x20f')]-_0xb7755e['originated']-_0xb7755e[_0xe320('0x14a')]-_0xb7755e[_0xe320('0x14b')];if(_0x40765a>_0x2d0fe0){_0x40765a=_0x2d0fe0;}}if(_0x40765a>0x0&&_0xb7755e[_0xe320('0x6a')]==0x0){if(_0xb7755e[_0xe320('0xb8')]===_0xe320('0x9')){_0x40765a=0x1;}if(_0x40765a>this[_0xe320('0x25')]){_0x40765a=this[_0xe320('0x25')];}for(var _0x10d6cf in this[_0xe320('0x23')]){if(typeof this[_0xe320('0x23')][_0x10d6cf]!==_0xe320('0xb0')){if(this[_0xe320('0x23')][_0x10d6cf][_0xe320('0xdb')]==='not_inuse'&&this[_0xe320('0x23')][_0x10d6cf][_0xe320('0x8a')]===_0xe320('0x8b')){_0x19c6da[_0xe320('0x9a')](this[_0xe320('0x23')][_0x10d6cf]['id']);}}}_0xb7755e[_0xe320('0x6a')]=0x1;hopperUtils[_0xe320('0x210')](_0xb7755e,_0x19c6da,_0x40765a)[_0xe320('0x9f')](function(_0x5a25a4){_0xb7755e[_0xe320('0x6a')]=0x0;if(_0x5a25a4){if(!utils[_0xe320('0x211')](_0x5a25a4)){hopperUtils['countReScheduled'](_0xb7755e)[_0xe320('0x9f')](sendMessageReschedule(_0xb7755e))[_0xe320('0xa4')](loggerCatch(_0xe320('0x212')));}else{_0xb7755e[_0xe320('0x81')]+=_0x5a25a4[_0xe320('0x99')];_0xb7755e[_0xe320('0x6e')]=_0xb7755e[_0xe320('0xb8')]==='booked'?utils['CAMPAIGN_STATUS'][_0xe320('0x14c')]:utils[_0xe320('0x6b')][_0xe320('0x209')];for(var _0x2ec2bf=0x0;_0x2ec2bf<_0x5a25a4[_0xe320('0x99')];_0x2ec2bf+=0x1){if(_[_0xe320('0x101')](_0x5a25a4[_0x2ec2bf])||_[_0xe320('0x101')](_0x5a25a4[_0x2ec2bf][_0xe320('0x182')])||_['isNil'](_0x5a25a4[_0x2ec2bf][_0xe320('0x16c')])){_0xe477de[_0xe320('0x20b')]('[actionOriginate]\x20',_0xb7755e,_0x5a25a4[_0x2ec2bf]);}else{hopperUtils[_0xe320('0x213')](_[_0xe320('0x77')](_0x5a25a4[_0x2ec2bf],[_0xe320('0xee'),_0xe320('0x16c')]))[_0xe320('0x9f')](_0xe477de['checkContactBlack'](_0xb7755e,_0x5a25a4[_0x2ec2bf]))['catch'](_0xe477de[_0xe320('0x162')](_0xe320('0x20c'),_0xb7755e));}}}}})[_0xe320('0xa4')](loggerGetContactDialer(_0xe320('0x214'),_0xb7755e,_0x40765a));}};Dialer[_0xe320('0x8d')][_0xe320('0x64')]=function(_0x1b3381){if(_0x1b3381['dialLimitQueue']>0x0){var _0x159b63=_0x1b3381[_0xe320('0x20f')]-_0x1b3381[_0xe320('0x81')]-_0x1b3381[_0xe320('0x14a')];if(_0x159b63>0x0&&_0x1b3381[_0xe320('0x6a')]==0x0){this[_0xe320('0x215')](_0x1b3381);}else{loggerPredictiveCalls['info'](_0xe320('0x216'));}}else{this['tryOriginatePredictive'](_0x1b3381);}};Dialer['prototype'][_0xe320('0x215')]=function(_0x1f6b73){var _0x315293=this;var _0x522512=[];_0x1f6b73[_0xe320('0x81')]+=0x1;for(var _0x43340e in this['agents']){if(typeof this[_0xe320('0x23')][_0x43340e]!==_0xe320('0xb0')){if(this['agents'][_0x43340e][_0xe320('0xdb')]===_0xe320('0x217')&&this[_0xe320('0x23')][_0x43340e][_0xe320('0x8a')]===_0xe320('0x8b')){_0x522512['push'](this[_0xe320('0x23')][_0x43340e]['id']);}}}_0x1f6b73['temp']=0x1;return this['getContactDialer'](_0x1f6b73['id'],_0x522512,0x1,_0x1f6b73[_0xe320('0x218')],_0x1f6b73)[_0xe320('0x9f')](function(_0x1901c7){_0x1f6b73[_0xe320('0x6a')]=0x1;if(_0x1901c7){if(!utils['checkContactEmpty'](_0x1901c7)){utils[_0xe320('0x69')](_0x1f6b73,0x1,0x0);return hopperUtils['countReScheduled'](_0x1f6b73)[_0xe320('0x9f')](sendMessageReschedule(_0x1f6b73))[_0xe320('0xa4')](loggerCatch(_0xe320('0x212')));}else{_0x1f6b73['message']=utils[_0xe320('0x6b')][_0xe320('0x209')];if(_[_0xe320('0x101')](_0x1901c7[0x0])||_[_0xe320('0x101')](_0x1901c7[0x0][_0xe320('0x182')])||_['isNil'](_0x1901c7[0x0][_0xe320('0x16c')])){_0x315293[_0xe320('0x20b')](_0xe320('0x20c'),_0x1f6b73,_0x1901c7[0x0]);}else{return hopperUtils[_0xe320('0x213')](_[_0xe320('0x77')](_0x1901c7[0x0],[_0xe320('0xee'),_0xe320('0x16c')]))['then'](_0x315293[_0xe320('0x1ef')](_0x1f6b73,_0x1901c7[0x0]))['catch'](_0x315293[_0xe320('0x162')](_0xe320('0x219'),_0x1f6b73));}}}})['catch'](loggerGetContactDialer('[getContactDialerPredictive]',_0x1f6b73,0x1));};Dialer[_0xe320('0x8d')][_0xe320('0x1e8')]=function(_0x428b7a,_0x28e67a,_0x8415b0,_0x1dd7a6,_0x163927,_0x137e36){loggerPredictive[_0xe320('0x4b')]('--------\x20Drop\x20Rate\x20--------');loggerPredictive[_0xe320('0x4b')](_0xe320('0x21a'),_0x428b7a);loggerPredictive[_0xe320('0x4b')](_0xe320('0x21b'),_0x28e67a);loggerPredictive['info'](_0xe320('0x21c'),_0x8415b0);loggerPredictive[_0xe320('0x4b')](_0xe320('0x21d'),_0x1dd7a6);loggerPredictive[_0xe320('0x4b')](_0xe320('0x21e'),_0x163927);loggerPredictive['info'](_0xe320('0x53'));return new Promise(function(_0x14f977,_0x5768f9){if(_0x428b7a<=0x0||isNaN(_0x428b7a)){return _0x5768f9(msgResponse(_0xe320('0x21f'),_0xe320('0xc6'),_0xe320('0x220')+_0x428b7a));}if(_0x8415b0<=0x0||isNaN(_0x8415b0)){return _0x5768f9(msgResponse('[abandonmentRate]','Error',_0xe320('0x221')+_0x8415b0));}if(_0x1dd7a6<=0x0||isNaN(_0x1dd7a6)){return _0x5768f9(msgResponse(_0xe320('0x21f'),_0xe320('0xc6'),_0xe320('0x222')+_0x1dd7a6));}if(_0x28e67a<=0x0||isNaN(_0x28e67a)){return _0x5768f9(msgResponse(_0xe320('0x21f'),_0xe320('0xc6'),_0xe320('0x223')+_0x28e67a));}if(_0x163927<=0x0||isNaN(_0x163927)){return _0x5768f9(msgResponse(_0xe320('0x21f'),_0xe320('0xc6'),'Amax\x20=\x20'+_0x163927));}_0x137e36=_0x137e36||0x0;var _0x26ce0b=0x1/_0x8415b0;var _0x91e7b7=0x0;var _0x5ca7f7=0x0;var _0x1e5eb5=0x0;var _0x8feab5=0x0;for(var _0x1caf1b=0x0;_0x1e5eb5<_0x163927;_0x1caf1b+=0x1){_0x5ca7f7=_0x1caf1b/_0x28e67a;_0x91e7b7=(_0x1dd7a6*_0x5ca7f7+_0x137e36)/_0x26ce0b;_0x1e5eb5=utils[_0xe320('0x224')](_0x91e7b7,_0x428b7a);_0x8feab5=_0x91e7b7/_0x428b7a*(0x1-utils[_0xe320('0x224')](_0x91e7b7,_0x428b7a));}return _0x14f977({'erlangCalls':_0x1caf1b,'erlangCallToSecond':_0x28e67a/_0x1caf1b,'erlangAbandonmentRate':_0x1e5eb5,'erlangBusyFactor':_0x8feab5});});};Dialer[_0xe320('0x8d')][_0xe320('0x1e2')]=function(_0x500e7b,_0x10ba72,_0x44a962,_0x3903d7,_0x1d07f7,_0x295812){loggerPredictive[_0xe320('0x4b')](_0xe320('0x225'));loggerPredictive[_0xe320('0x4b')](_0xe320('0x21a'),_0x500e7b);loggerPredictive[_0xe320('0x4b')](_0xe320('0x21b'),_0x10ba72);loggerPredictive[_0xe320('0x4b')](_0xe320('0x21c'),_0x44a962);loggerPredictive[_0xe320('0x4b')](_0xe320('0x21d'),_0x3903d7);loggerPredictive[_0xe320('0x4b')]('Umin:\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20',_0x1d07f7);loggerPredictive[_0xe320('0x4b')](_0xe320('0x53'));return new Promise(function(_0x27fb3f,_0x4ddca2){if(_0x500e7b<=0x0||isNaN(_0x500e7b)){return _0x4ddca2(msgResponse('[busyFactor]',_0xe320('0xc6'),'m\x20=\x20'+_0x500e7b));}if(_0x44a962<=0x0||isNaN(_0x44a962)){return _0x4ddca2(msgResponse('[busyFactor]',_0xe320('0xc6'),'Ts\x20=\x20'+_0x44a962));}if(_0x3903d7<=0x0||isNaN(_0x3903d7)){return _0x4ddca2(msgResponse(_0xe320('0x226'),'Error',_0xe320('0x222')+_0x3903d7));}if(_0x10ba72<=0x0||isNaN(_0x10ba72)){return _0x4ddca2(msgResponse(_0xe320('0x226'),'Error',_0xe320('0x223')+_0x10ba72));}if(_0x1d07f7<=0x0||isNaN(_0x1d07f7)){return _0x4ddca2(msgResponse(_0xe320('0x226'),_0xe320('0xc6'),_0xe320('0x227')+_0x1d07f7));}_0x295812=_0x295812||0x0;var _0x10fac6=0x1/_0x44a962;var _0x5db410=0x0;var _0x456571=0x0;var _0x8a3527=0x0;var _0xa3c6dc=0x0;for(var _0x509739=0x0;_0xa3c6dc<_0x1d07f7;_0x509739+=0x1){_0x456571=_0x509739/_0x10ba72;_0x5db410=(_0x3903d7*_0x456571+_0x295812)/_0x10fac6;_0x8a3527=utils[_0xe320('0x224')](_0x5db410,_0x500e7b);_0xa3c6dc=_0x5db410/_0x500e7b*(0x1-utils[_0xe320('0x224')](_0x5db410,_0x500e7b));}return _0x27fb3f({'erlangCalls':_0x509739,'erlangCallToSecond':_0x10ba72/_0x509739,'erlangAbandonmentRate':_0x8a3527,'erlangBusyFactor':_0xa3c6dc});});};module['exports']=Dialer;
\ No newline at end of file
index 6b0335a..18bf934 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4d95=['\x22%s\x22\x20<%s>','dialCutDigit','getQueue','exports','util','lodash','isNil','string','voiceQueue','uniqueid','name','Contact','number','queue','active','type','dialQueueTimeout','scheduledat','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','ContactId','ListId','UserId','VoiceQueueId','idHopper','ContactFirstName','YYYY-MM-DD\x20HH:mm:ss','callback','callbackuniqueid','callbackat','recallme','originatecalleridnum','prototype','getCaller','format'];(function(_0x45423e,_0x4cc862){var _0x3157c1=function(_0x5ddce4){while(--_0x5ddce4){_0x45423e['push'](_0x45423e['shift']());}};_0x3157c1(++_0x4cc862);}(_0x4d95,0x1f0));var _0x54d9=function(_0x44ec4a,_0x41cae8){_0x44ec4a=_0x44ec4a-0x0;var _0x1f9f8f=_0x4d95[_0x44ec4a];return _0x1f9f8f;};'use strict';var util=require(_0x54d9('0x0'));var _=require(_0x54d9('0x1'));var moment=require('moment');function checkNameSurname(_0x2c224a,_0x4981f9,_0x5dc042){var _0x16e183='';if(!_['isNil'](_0x4981f9)&&'string'===typeof _0x4981f9){_0x16e183+=_0x4981f9;}if(!_[_0x54d9('0x2')](_0x5dc042)&&_0x54d9('0x3')===typeof _0x5dc042){_0x16e183+='\x20'+_0x5dc042;}if(_0x16e183!==''){return _0x16e183;}return _0x2c224a;}function Action(_0x37acbd,_0x5628d9,_0x22ae5d){this[_0x54d9('0x4')]=_0x37acbd;this[_0x54d9('0x5')]=_0x22ae5d||undefined;this[_0x54d9('0x6')]=checkNameSurname(_0x5628d9[_0x54d9('0x7')]['phone'],_0x5628d9['Contact']['firstName'],_0x5628d9[_0x54d9('0x7')]['lastName']);this[_0x54d9('0x8')]=_0x5628d9['phone'];this[_0x54d9('0x9')]=_0x37acbd['name'];this['active']=_0x5628d9[_0x54d9('0xa')]||![];this[_0x54d9('0xb')]=_0x37acbd['type'];this['dialQueueTimeout']=_0x37acbd[_0x54d9('0xc')]||0x3;this[_0x54d9('0xd')]=_0x5628d9[_0x54d9('0xd')];this[_0x54d9('0xe')]=_0x5628d9[_0x54d9('0xe')];this[_0x54d9('0xf')]=_0x5628d9[_0x54d9('0xf')];this[_0x54d9('0x10')]=_0x5628d9['countnoanswerretry'];this[_0x54d9('0x11')]=_0x5628d9[_0x54d9('0x11')];this['countdropretry']=_0x5628d9[_0x54d9('0x12')];this['countabandonedretry']=_0x5628d9[_0x54d9('0x13')];this['countmachineretry']=_0x5628d9[_0x54d9('0x14')];this[_0x54d9('0x15')]=_0x5628d9['countagentrejectretry'];this[_0x54d9('0x16')]=_0x5628d9[_0x54d9('0x16')];this[_0x54d9('0x17')]=_0x5628d9[_0x54d9('0x17')];this[_0x54d9('0x18')]=_0x5628d9[_0x54d9('0x18')];this[_0x54d9('0x19')]=_0x5628d9['VoiceQueueId'];this['CampaignId']=_0x5628d9['CampaignId'];this[_0x54d9('0x1a')]=_0x5628d9['id'];this[_0x54d9('0x1b')]=_0x5628d9['Contact']['firstName']||'';this['starttime']=moment()['format'](_0x54d9('0x1c'));this[_0x54d9('0x1d')]=_0x5628d9[_0x54d9('0x1d')];this['callbackuniqueid']=_0x5628d9[_0x54d9('0x1e')];this[_0x54d9('0x1f')]=_0x5628d9[_0x54d9('0x1f')];this[_0x54d9('0x20')]=_0x5628d9[_0x54d9('0x20')];this[_0x54d9('0x21')]='';this['originatecalleridname']='';}Action[_0x54d9('0x22')][_0x54d9('0x23')]=function(){return util[_0x54d9('0x24')](_0x54d9('0x25'),this[_0x54d9('0x6')],this[_0x54d9('0x4')][_0x54d9('0x26')]>0x0?this[_0x54d9('0x8')]['substring'](this[_0x54d9('0x4')][_0x54d9('0x26')]):this[_0x54d9('0x8')]);};Action[_0x54d9('0x22')][_0x54d9('0x27')]=function(){return this[_0x54d9('0x9')];};module[_0x54d9('0x28')]=Action;
\ No newline at end of file
+var _0xda38=['callback','callbackuniqueid','callbackat','recallme','originatecalleridname','prototype','getCaller','format','\x22%s\x22\x20<%s>','substring','dialCutDigit','exports','util','moment','isNil','string','voiceQueue','uniqueid','name','Contact','firstName','lastName','number','phone','queue','active','type','dialQueueTimeout','scheduledat','countbusyretry','countcongestionretry','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','ContactId','ListId','UserId','CampaignId','idHopper','starttime'];(function(_0x366ce0,_0x4c3fad){var _0x5ae1c0=function(_0x6a4ad6){while(--_0x6a4ad6){_0x366ce0['push'](_0x366ce0['shift']());}};_0x5ae1c0(++_0x4c3fad);}(_0xda38,0x1b0));var _0x8da3=function(_0x5942d9,_0x569c84){_0x5942d9=_0x5942d9-0x0;var _0x4aa2b0=_0xda38[_0x5942d9];return _0x4aa2b0;};'use strict';var util=require(_0x8da3('0x0'));var _=require('lodash');var moment=require(_0x8da3('0x1'));function checkNameSurname(_0x24e570,_0xdc14e1,_0x5e1628){var _0x29a7a7='';if(!_[_0x8da3('0x2')](_0xdc14e1)&&_0x8da3('0x3')===typeof _0xdc14e1){_0x29a7a7+=_0xdc14e1;}if(!_['isNil'](_0x5e1628)&&_0x8da3('0x3')===typeof _0x5e1628){_0x29a7a7+='\x20'+_0x5e1628;}if(_0x29a7a7!==''){return _0x29a7a7;}return _0x24e570;}function Action(_0x2a87e5,_0x3b508b,_0x12d02c){this[_0x8da3('0x4')]=_0x2a87e5;this[_0x8da3('0x5')]=_0x12d02c||undefined;this[_0x8da3('0x6')]=checkNameSurname(_0x3b508b[_0x8da3('0x7')]['phone'],_0x3b508b[_0x8da3('0x7')][_0x8da3('0x8')],_0x3b508b[_0x8da3('0x7')][_0x8da3('0x9')]);this[_0x8da3('0xa')]=_0x3b508b[_0x8da3('0xb')];this[_0x8da3('0xc')]=_0x2a87e5[_0x8da3('0x6')];this['active']=_0x3b508b[_0x8da3('0xd')]||![];this[_0x8da3('0xe')]=_0x2a87e5['type'];this[_0x8da3('0xf')]=_0x2a87e5[_0x8da3('0xf')]||0x3;this[_0x8da3('0x10')]=_0x3b508b['scheduledat'];this[_0x8da3('0x11')]=_0x3b508b[_0x8da3('0x11')];this[_0x8da3('0x12')]=_0x3b508b[_0x8da3('0x12')];this['countnoanswerretry']=_0x3b508b['countnoanswerretry'];this[_0x8da3('0x13')]=_0x3b508b[_0x8da3('0x13')];this[_0x8da3('0x14')]=_0x3b508b[_0x8da3('0x14')];this[_0x8da3('0x15')]=_0x3b508b['countabandonedretry'];this[_0x8da3('0x16')]=_0x3b508b[_0x8da3('0x16')];this[_0x8da3('0x17')]=_0x3b508b[_0x8da3('0x17')];this[_0x8da3('0x18')]=_0x3b508b['ContactId'];this[_0x8da3('0x19')]=_0x3b508b['ListId'];this[_0x8da3('0x1a')]=_0x3b508b[_0x8da3('0x1a')];this['VoiceQueueId']=_0x3b508b['VoiceQueueId'];this[_0x8da3('0x1b')]=_0x3b508b['CampaignId'];this[_0x8da3('0x1c')]=_0x3b508b['id'];this['ContactFirstName']=_0x3b508b[_0x8da3('0x7')][_0x8da3('0x8')]||'';this[_0x8da3('0x1d')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');this[_0x8da3('0x1e')]=_0x3b508b[_0x8da3('0x1e')];this[_0x8da3('0x1f')]=_0x3b508b[_0x8da3('0x1f')];this[_0x8da3('0x20')]=_0x3b508b['callbackat'];this['recallme']=_0x3b508b[_0x8da3('0x21')];this['originatecalleridnum']='';this[_0x8da3('0x22')]='';}Action[_0x8da3('0x23')][_0x8da3('0x24')]=function(){return util[_0x8da3('0x25')](_0x8da3('0x26'),this[_0x8da3('0x6')],this[_0x8da3('0x4')]['dialCutDigit']>0x0?this[_0x8da3('0xa')][_0x8da3('0x27')](this['voiceQueue'][_0x8da3('0x28')]):this[_0x8da3('0xa')]);};Action['prototype']['getQueue']=function(){return this['queue'];};module[_0x8da3('0x29')]=Action;
\ No newline at end of file
index 14e1148..dc65bc6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb994=['scheduledat','type','campaigntype','outbound','countbusyretry','countnoanswerretry','countglobal','countcongestionretry','countnosuchnumberretry','countdropretry','countmachineretry','countagentrejectretry','countabandonedretry','uniqueid','calleridname','name','number','starttime','responsetime','answertime','getSeconds','holdtime','endtime','queue','membername','reason','callback','callbackuniqueid','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','agiafterat','moment','../utils','state','statedesc','Answer'];(function(_0x52ae1d,_0x32366d){var _0x13703a=function(_0x318d2f){while(--_0x318d2f){_0x52ae1d['push'](_0x52ae1d['shift']());}};_0x13703a(++_0x32366d);}(_0xb994,0x79));var _0x4b99=function(_0x12d573,_0x20ae28){_0x12d573=_0x12d573-0x0;var _0x5c7071=_0xb994[_0x12d573];return _0x5c7071;};'use strict';var moment=require(_0x4b99('0x0'));var utils=require(_0x4b99('0x1'));function AgentComplete(_0x3a400f,_0x8902cd){this[_0x4b99('0x2')]=0x4;this[_0x4b99('0x3')]=_0x4b99('0x4');this[_0x4b99('0x5')]=_0x3a400f[_0x4b99('0x5')];this[_0x4b99('0x6')]=_0x3a400f['type'];this[_0x4b99('0x7')]=_0x3a400f[_0x4b99('0x6')]===_0x4b99('0x8')?'queue':_0x3a400f[_0x4b99('0x6')];this[_0x4b99('0x9')]=_0x3a400f[_0x4b99('0x9')];this['countcongestionretry']=_0x3a400f['countcongestionretry'];this['countnoanswerretry']=_0x3a400f[_0x4b99('0xa')];this[_0x4b99('0xb')]=_0x3a400f[_0x4b99('0x9')]+_0x3a400f[_0x4b99('0xc')]+_0x3a400f[_0x4b99('0xa')]+_0x3a400f[_0x4b99('0xd')]+_0x3a400f[_0x4b99('0xe')]+_0x3a400f['countabandonedretry']+_0x3a400f[_0x4b99('0xf')]+_0x3a400f[_0x4b99('0x10')];this['countnosuchnumberretry']=_0x3a400f['countnosuchnumberretry'];this['countdropretry']=_0x3a400f[_0x4b99('0xe')];this[_0x4b99('0x11')]=_0x3a400f[_0x4b99('0x11')];this[_0x4b99('0xf')]=_0x3a400f['countmachineretry'];this[_0x4b99('0x10')]=_0x3a400f[_0x4b99('0x10')];this[_0x4b99('0x12')]=_0x8902cd[_0x4b99('0x12')];this[_0x4b99('0x13')]=_0x3a400f[_0x4b99('0x14')];this['calleridnum']=_0x3a400f[_0x4b99('0x15')];this['starttime']=_0x3a400f[_0x4b99('0x16')];this[_0x4b99('0x17')]=_0x3a400f[_0x4b99('0x17')];this[_0x4b99('0x18')]=_0x3a400f['answertime'];this['endtime']=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');this['ringtime']=utils[_0x4b99('0x19')](_0x3a400f[_0x4b99('0x17')],_0x3a400f['starttime']);this[_0x4b99('0x1a')]=utils[_0x4b99('0x19')](_0x3a400f[_0x4b99('0x18')],_0x3a400f['responsetime']);this['talktime']=utils[_0x4b99('0x19')](this[_0x4b99('0x1b')],_0x3a400f[_0x4b99('0x18')]);this[_0x4b99('0x1c')]=_0x8902cd[_0x4b99('0x1c')];this[_0x4b99('0x1d')]=_0x8902cd[_0x4b99('0x1d')];this[_0x4b99('0x1e')]=_0x8902cd[_0x4b99('0x1e')];this[_0x4b99('0x1f')]=_0x3a400f[_0x4b99('0x1f')];this[_0x4b99('0x20')]=_0x3a400f[_0x4b99('0x20')];this['callbackat']=_0x3a400f['callbackat'];this[_0x4b99('0x21')]=_0x3a400f[_0x4b99('0x21')];this[_0x4b99('0x22')]=_0x3a400f[_0x4b99('0x22')];this['ListId']=_0x3a400f[_0x4b99('0x23')];this['UserId']=_0x3a400f[_0x4b99('0x24')];this[_0x4b99('0x25')]=_0x3a400f['VoiceQueueId'];this[_0x4b99('0x26')]=_0x3a400f[_0x4b99('0x26')];this[_0x4b99('0x27')]=_0x3a400f[_0x4b99('0x27')]||'';this[_0x4b99('0x28')]=_0x3a400f[_0x4b99('0x28')]||'';this[_0x4b99('0x29')]=_0x3a400f[_0x4b99('0x29')];}module['exports']=AgentComplete;
\ No newline at end of file
+var _0x1358=['starttime','answertime','endtime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','responsetime','talktime','getSeconds','membername','reason','callback','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','exports','moment','../utils','state','statedesc','Answer','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','countdropretry','uniqueid','name','calleridnum'];(function(_0xb709ab,_0x39bee3){var _0x4d6e67=function(_0xa1eb23){while(--_0xa1eb23){_0xb709ab['push'](_0xb709ab['shift']());}};_0x4d6e67(++_0x39bee3);}(_0x1358,0x16e));var _0x8135=function(_0x3635ce,_0x33a6f9){_0x3635ce=_0x3635ce-0x0;var _0x97ecd0=_0x1358[_0x3635ce];return _0x97ecd0;};'use strict';var moment=require(_0x8135('0x0'));var utils=require(_0x8135('0x1'));function AgentComplete(_0x53e3da,_0x9545d1){this[_0x8135('0x2')]=0x4;this[_0x8135('0x3')]=_0x8135('0x4');this['scheduledat']=_0x53e3da['scheduledat'];this['type']=_0x53e3da[_0x8135('0x5')];this[_0x8135('0x6')]=_0x53e3da['type']===_0x8135('0x7')?_0x8135('0x8'):_0x53e3da[_0x8135('0x5')];this['countbusyretry']=_0x53e3da[_0x8135('0x9')];this[_0x8135('0xa')]=_0x53e3da[_0x8135('0xa')];this[_0x8135('0xb')]=_0x53e3da[_0x8135('0xb')];this[_0x8135('0xc')]=_0x53e3da[_0x8135('0x9')]+_0x53e3da[_0x8135('0xa')]+_0x53e3da[_0x8135('0xb')]+_0x53e3da[_0x8135('0xd')]+_0x53e3da['countdropretry']+_0x53e3da[_0x8135('0xe')]+_0x53e3da[_0x8135('0xf')]+_0x53e3da[_0x8135('0x10')];this[_0x8135('0xd')]=_0x53e3da[_0x8135('0xd')];this[_0x8135('0x11')]=_0x53e3da[_0x8135('0x11')];this[_0x8135('0xe')]=_0x53e3da[_0x8135('0xe')];this[_0x8135('0xf')]=_0x53e3da['countmachineretry'];this[_0x8135('0x10')]=_0x53e3da['countagentrejectretry'];this['uniqueid']=_0x9545d1[_0x8135('0x12')];this['calleridname']=_0x53e3da[_0x8135('0x13')];this[_0x8135('0x14')]=_0x53e3da['number'];this[_0x8135('0x15')]=_0x53e3da[_0x8135('0x15')];this['responsetime']=_0x53e3da['responsetime'];this['answertime']=_0x53e3da[_0x8135('0x16')];this[_0x8135('0x17')]=moment()[_0x8135('0x18')](_0x8135('0x19'));this[_0x8135('0x1a')]=utils['getSeconds'](_0x53e3da[_0x8135('0x1b')],_0x53e3da['starttime']);this['holdtime']=utils['getSeconds'](_0x53e3da[_0x8135('0x16')],_0x53e3da[_0x8135('0x1b')]);this[_0x8135('0x1c')]=utils[_0x8135('0x1d')](this[_0x8135('0x17')],_0x53e3da[_0x8135('0x16')]);this['queue']=_0x9545d1[_0x8135('0x8')];this[_0x8135('0x1e')]=_0x9545d1['membername'];this[_0x8135('0x1f')]=_0x9545d1[_0x8135('0x1f')];this[_0x8135('0x20')]=_0x53e3da[_0x8135('0x20')];this['callbackuniqueid']=_0x53e3da['callbackuniqueid'];this[_0x8135('0x21')]=_0x53e3da[_0x8135('0x21')];this['recallme']=_0x53e3da[_0x8135('0x22')];this[_0x8135('0x23')]=_0x53e3da[_0x8135('0x23')];this[_0x8135('0x24')]=_0x53e3da[_0x8135('0x24')];this[_0x8135('0x25')]=_0x53e3da['UserId'];this[_0x8135('0x26')]=_0x53e3da[_0x8135('0x26')];this[_0x8135('0x27')]=_0x53e3da[_0x8135('0x27')];this[_0x8135('0x28')]=_0x53e3da[_0x8135('0x28')]||'';this['originatecalleridname']=_0x53e3da[_0x8135('0x29')]||'';this['agiafterat']=_0x53e3da['agiafterat'];}module[_0x8135('0x2a')]=AgentComplete;
\ No newline at end of file
index 6afb9bb..2074c02 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2899=['ContactId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','state','statedesc','exports','uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countmachineretry','countagentrejectretry','countnosuchnumberretry','countdropretry','countabandonedretry','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid','callbackat','recallme'];(function(_0x3284fc,_0x3ec534){var _0x1ca4e3=function(_0x597ccb){while(--_0x597ccb){_0x3284fc['push'](_0x3284fc['shift']());}};_0x1ca4e3(++_0x3ec534);}(_0x2899,0x1ad));var _0x9289=function(_0x331aa0,_0x3a6c0b){_0x331aa0=_0x331aa0-0x0;var _0x3b3d2f=_0x2899[_0x331aa0];return _0x3b3d2f;};'use strict';function Final(_0x4eed6e){this[_0x9289('0x0')]=_0x4eed6e[_0x9289('0x0')];this[_0x9289('0x1')]=_0x4eed6e[_0x9289('0x1')];this[_0x9289('0x2')]=_0x4eed6e[_0x9289('0x2')];this[_0x9289('0x3')]=_0x4eed6e[_0x9289('0x2')]===_0x9289('0x4')?_0x9289('0x5'):_0x4eed6e[_0x9289('0x2')];this[_0x9289('0x6')]=_0x4eed6e[_0x9289('0x6')];this[_0x9289('0x7')]=_0x4eed6e[_0x9289('0x7')];this[_0x9289('0x8')]=_0x4eed6e[_0x9289('0x8')];this['countglobal']=_0x4eed6e[_0x9289('0x6')]+_0x4eed6e['countcongestionretry']+_0x4eed6e['countnoanswerretry']+_0x4eed6e['countnosuchnumberretry']+_0x4eed6e['countdropretry']+_0x4eed6e['countabandonedretry']+_0x4eed6e[_0x9289('0x9')]+_0x4eed6e[_0x9289('0xa')];this[_0x9289('0xb')]=_0x4eed6e['countnosuchnumberretry'];this[_0x9289('0xc')]=_0x4eed6e[_0x9289('0xc')];this[_0x9289('0xd')]=_0x4eed6e[_0x9289('0xd')];this[_0x9289('0x9')]=_0x4eed6e['countmachineretry'];this[_0x9289('0xa')]=_0x4eed6e[_0x9289('0xa')];this[_0x9289('0x5')]=_0x4eed6e['queue'];this['calleridname']=_0x4eed6e[_0x9289('0xe')];this[_0x9289('0xf')]=_0x4eed6e[_0x9289('0xf')];this[_0x9289('0x10')]=_0x4eed6e[_0x9289('0x10')];this[_0x9289('0x11')]=_0x4eed6e[_0x9289('0x11')];this[_0x9289('0x12')]=_0x4eed6e[_0x9289('0x11')];this[_0x9289('0x13')]=_0x4eed6e[_0x9289('0x13')]||0x0;this[_0x9289('0x14')]=_0x4eed6e[_0x9289('0x14')]||0x0;this[_0x9289('0x15')]=_0x4eed6e[_0x9289('0x15')]||0x0;this[_0x9289('0x16')]=_0x4eed6e[_0x9289('0x16')];this[_0x9289('0x17')]=_0x4eed6e[_0x9289('0x17')];this[_0x9289('0x18')]=_0x4eed6e['callbackat'];this[_0x9289('0x19')]=_0x4eed6e[_0x9289('0x19')];this['ContactId']=_0x4eed6e[_0x9289('0x1a')];this['ListId']=_0x4eed6e['ListId'];this[_0x9289('0x1b')]=_0x4eed6e[_0x9289('0x1b')];this[_0x9289('0x1c')]=_0x4eed6e[_0x9289('0x1c')];this[_0x9289('0x1d')]=_0x4eed6e[_0x9289('0x1d')];this['originatecalleridnum']=_0x4eed6e[_0x9289('0x1e')]||'';this[_0x9289('0x1f')]=_0x4eed6e[_0x9289('0x1f')]||'';this[_0x9289('0x20')]=_0x4eed6e[_0x9289('0x20')];this[_0x9289('0x21')]=_0x4eed6e[_0x9289('0x21')];}module[_0x9289('0x22')]=Final;
\ No newline at end of file
+var _0xa62e=['callbackat','ContactId','ListId','UserId','VoiceQueueId','originatecalleridnum','originatecalleridname','statedesc','exports','uniqueid','scheduledat','type','campaigntype','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countmachineretry','countabandonedretry','countagentrejectretry','calleridname','calleridnum','starttime','responsetime','endtime','ringtime','holdtime','talktime','callback','callbackuniqueid'];(function(_0x12b15f,_0x4b60ba){var _0x492a47=function(_0x1e06eb){while(--_0x1e06eb){_0x12b15f['push'](_0x12b15f['shift']());}};_0x492a47(++_0x4b60ba);}(_0xa62e,0x195));var _0xea62=function(_0xdb27c4,_0x2275cb){_0xdb27c4=_0xdb27c4-0x0;var _0x2a7c2c=_0xa62e[_0xdb27c4];return _0x2a7c2c;};'use strict';function Final(_0x46be57){this[_0xea62('0x0')]=_0x46be57[_0xea62('0x0')];this[_0xea62('0x1')]=_0x46be57['scheduledat'];this['type']=_0x46be57[_0xea62('0x2')];this[_0xea62('0x3')]=_0x46be57[_0xea62('0x2')]==='outbound'?_0xea62('0x4'):_0x46be57[_0xea62('0x2')];this[_0xea62('0x5')]=_0x46be57[_0xea62('0x5')];this['countcongestionretry']=_0x46be57[_0xea62('0x6')];this[_0xea62('0x7')]=_0x46be57[_0xea62('0x7')];this[_0xea62('0x8')]=_0x46be57[_0xea62('0x5')]+_0x46be57[_0xea62('0x6')]+_0x46be57['countnoanswerretry']+_0x46be57[_0xea62('0x9')]+_0x46be57[_0xea62('0xa')]+_0x46be57['countabandonedretry']+_0x46be57[_0xea62('0xb')]+_0x46be57['countagentrejectretry'];this['countnosuchnumberretry']=_0x46be57[_0xea62('0x9')];this[_0xea62('0xa')]=_0x46be57['countdropretry'];this[_0xea62('0xc')]=_0x46be57[_0xea62('0xc')];this[_0xea62('0xb')]=_0x46be57[_0xea62('0xb')];this[_0xea62('0xd')]=_0x46be57[_0xea62('0xd')];this[_0xea62('0x4')]=_0x46be57[_0xea62('0x4')];this[_0xea62('0xe')]=_0x46be57[_0xea62('0xe')];this[_0xea62('0xf')]=_0x46be57[_0xea62('0xf')];this[_0xea62('0x10')]=_0x46be57['starttime'];this['responsetime']=_0x46be57[_0xea62('0x11')];this[_0xea62('0x12')]=_0x46be57['responsetime'];this[_0xea62('0x13')]=_0x46be57[_0xea62('0x13')]||0x0;this['holdtime']=_0x46be57[_0xea62('0x14')]||0x0;this[_0xea62('0x15')]=_0x46be57['talktime']||0x0;this[_0xea62('0x16')]=_0x46be57['callback'];this['callbackuniqueid']=_0x46be57[_0xea62('0x17')];this[_0xea62('0x18')]=_0x46be57[_0xea62('0x18')];this['recallme']=_0x46be57['recallme'];this[_0xea62('0x19')]=_0x46be57['ContactId'];this[_0xea62('0x1a')]=_0x46be57[_0xea62('0x1a')];this['UserId']=_0x46be57[_0xea62('0x1b')];this[_0xea62('0x1c')]=_0x46be57[_0xea62('0x1c')];this['CampaignId']=_0x46be57['CampaignId'];this[_0xea62('0x1d')]=_0x46be57[_0xea62('0x1d')]||'';this[_0xea62('0x1e')]=_0x46be57['originatecalleridname']||'';this['state']=_0x46be57['state'];this['statedesc']=_0x46be57[_0xea62('0x1f')];}module[_0xea62('0x20')]=Final;
\ No newline at end of file
index 6569c3e..f414b49 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x57cf=['YYYY-MM-DD\x20HH:mm:ss','ringtime','getSeconds','holdtime','talktime','queue','membername','IVR','reason','cause-txt','callback','callbackuniqueid','callbackat','ContactId','ListId','UserId','VoiceQueueId','CampaignId','exports','moment','../utils','state','statedesc','Answer','scheduledat','type','campaigntype','outbound','amd','countbusyretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countmachineretry','countabandonedretry','countagentrejectretry','uniqueid','calleridname','name','calleridnum','starttime','responsetime','format'];(function(_0x9df060,_0x253d33){var _0x338dfe=function(_0x17d9a5){while(--_0x17d9a5){_0x9df060['push'](_0x9df060['shift']());}};_0x338dfe(++_0x253d33);}(_0x57cf,0x11b));var _0xf57c=function(_0x3df93e,_0x5af13a){_0x3df93e=_0x3df93e-0x0;var _0x2d4f2a=_0x57cf[_0x3df93e];return _0x2d4f2a;};'use strict';var moment=require(_0xf57c('0x0'));var utils=require(_0xf57c('0x1'));function Hangup(_0x41b0b8,_0x182ad5){this[_0xf57c('0x2')]=0x4;this[_0xf57c('0x3')]=_0xf57c('0x4');this[_0xf57c('0x5')]=_0x41b0b8[_0xf57c('0x5')];this[_0xf57c('0x6')]=_0x41b0b8['type'];this[_0xf57c('0x7')]=_0x41b0b8['type']===_0xf57c('0x8')?'queue':_0x41b0b8['type'];this[_0xf57c('0x9')]=_0x41b0b8['amd']||![];this[_0xf57c('0xa')]=_0x41b0b8[_0xf57c('0xa')];this['countcongestionretry']=_0x41b0b8['countcongestionretry'];this[_0xf57c('0xb')]=_0x41b0b8[_0xf57c('0xb')];this[_0xf57c('0xc')]=_0x41b0b8[_0xf57c('0xa')]+_0x41b0b8['countcongestionretry']+_0x41b0b8[_0xf57c('0xb')]+_0x41b0b8[_0xf57c('0xd')]+_0x41b0b8[_0xf57c('0xe')]+_0x41b0b8['countabandonedretry']+_0x41b0b8[_0xf57c('0xf')]+_0x41b0b8['countagentrejectretry'];this[_0xf57c('0xd')]=_0x41b0b8[_0xf57c('0xd')];this['countdropretry']=_0x41b0b8[_0xf57c('0xe')];this['countabandonedretry']=_0x41b0b8[_0xf57c('0x10')];this['countmachineretry']=_0x41b0b8[_0xf57c('0xf')];this[_0xf57c('0x11')]=_0x41b0b8[_0xf57c('0x11')];this[_0xf57c('0x12')]=_0x182ad5[_0xf57c('0x12')];this[_0xf57c('0x13')]=_0x41b0b8[_0xf57c('0x14')];this[_0xf57c('0x15')]=_0x41b0b8['number'];this[_0xf57c('0x16')]=_0x41b0b8['starttime'];this[_0xf57c('0x17')]=_0x41b0b8[_0xf57c('0x17')];this['endtime']=moment()[_0xf57c('0x18')](_0xf57c('0x19'));this[_0xf57c('0x1a')]=utils[_0xf57c('0x1b')](_0x41b0b8[_0xf57c('0x17')],_0x41b0b8['starttime']);this[_0xf57c('0x1c')]=0x0;this[_0xf57c('0x1d')]=utils[_0xf57c('0x1b')](this['endtime'],_0x41b0b8['responsetime']);this[_0xf57c('0x1e')]=_0x41b0b8[_0xf57c('0x1e')];this[_0xf57c('0x1f')]=_0xf57c('0x20');this[_0xf57c('0x21')]=_0x182ad5[_0xf57c('0x22')];this[_0xf57c('0x23')]=_0x41b0b8[_0xf57c('0x23')];this[_0xf57c('0x24')]=_0x41b0b8['callbackuniqueid'];this[_0xf57c('0x25')]=_0x41b0b8[_0xf57c('0x25')];this['recallme']=_0x41b0b8['recallme'];this[_0xf57c('0x26')]=_0x41b0b8['ContactId'];this[_0xf57c('0x27')]=_0x41b0b8[_0xf57c('0x27')];this[_0xf57c('0x28')]=_0x41b0b8['UserId'];this[_0xf57c('0x29')]=_0x41b0b8[_0xf57c('0x29')];this['CampaignId']=_0x41b0b8[_0xf57c('0x2a')];}module[_0xf57c('0x2b')]=Hangup;
\ No newline at end of file
+var _0x158a=['ListId','UserId','VoiceQueueId','CampaignId','exports','moment','../utils','state','statedesc','Answer','scheduledat','type','campaigntype','outbound','queue','amd','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','countdropretry','uniqueid','calleridname','calleridnum','number','starttime','responsetime','format','YYYY-MM-DD\x20HH:mm:ss','ringtime','holdtime','getSeconds','endtime','membername','IVR','reason','callback','callbackat','recallme','ContactId'];(function(_0x44f724,_0x366e0e){var _0x4d4063=function(_0x35c6dc){while(--_0x35c6dc){_0x44f724['push'](_0x44f724['shift']());}};_0x4d4063(++_0x366e0e);}(_0x158a,0xe1));var _0xa158=function(_0x1cac0a,_0x38be46){_0x1cac0a=_0x1cac0a-0x0;var _0x49a72c=_0x158a[_0x1cac0a];return _0x49a72c;};'use strict';var moment=require(_0xa158('0x0'));var utils=require(_0xa158('0x1'));function Hangup(_0x5376bd,_0x564d82){this[_0xa158('0x2')]=0x4;this[_0xa158('0x3')]=_0xa158('0x4');this['scheduledat']=_0x5376bd[_0xa158('0x5')];this[_0xa158('0x6')]=_0x5376bd['type'];this[_0xa158('0x7')]=_0x5376bd[_0xa158('0x6')]===_0xa158('0x8')?_0xa158('0x9'):_0x5376bd[_0xa158('0x6')];this[_0xa158('0xa')]=_0x5376bd['amd']||![];this[_0xa158('0xb')]=_0x5376bd[_0xa158('0xb')];this['countcongestionretry']=_0x5376bd[_0xa158('0xc')];this[_0xa158('0xd')]=_0x5376bd['countnoanswerretry'];this[_0xa158('0xe')]=_0x5376bd[_0xa158('0xb')]+_0x5376bd[_0xa158('0xc')]+_0x5376bd[_0xa158('0xd')]+_0x5376bd[_0xa158('0xf')]+_0x5376bd['countdropretry']+_0x5376bd[_0xa158('0x10')]+_0x5376bd[_0xa158('0x11')]+_0x5376bd[_0xa158('0x12')];this[_0xa158('0xf')]=_0x5376bd[_0xa158('0xf')];this[_0xa158('0x13')]=_0x5376bd['countdropretry'];this[_0xa158('0x10')]=_0x5376bd['countabandonedretry'];this['countmachineretry']=_0x5376bd[_0xa158('0x11')];this[_0xa158('0x12')]=_0x5376bd[_0xa158('0x12')];this[_0xa158('0x14')]=_0x564d82[_0xa158('0x14')];this[_0xa158('0x15')]=_0x5376bd['name'];this[_0xa158('0x16')]=_0x5376bd[_0xa158('0x17')];this[_0xa158('0x18')]=_0x5376bd[_0xa158('0x18')];this[_0xa158('0x19')]=_0x5376bd[_0xa158('0x19')];this['endtime']=moment()[_0xa158('0x1a')](_0xa158('0x1b'));this[_0xa158('0x1c')]=utils['getSeconds'](_0x5376bd[_0xa158('0x19')],_0x5376bd[_0xa158('0x18')]);this[_0xa158('0x1d')]=0x0;this['talktime']=utils[_0xa158('0x1e')](this[_0xa158('0x1f')],_0x5376bd[_0xa158('0x19')]);this[_0xa158('0x9')]=_0x5376bd[_0xa158('0x9')];this[_0xa158('0x20')]=_0xa158('0x21');this[_0xa158('0x22')]=_0x564d82['cause-txt'];this[_0xa158('0x23')]=_0x5376bd['callback'];this['callbackuniqueid']=_0x5376bd['callbackuniqueid'];this['callbackat']=_0x5376bd[_0xa158('0x24')];this[_0xa158('0x25')]=_0x5376bd[_0xa158('0x25')];this[_0xa158('0x26')]=_0x5376bd[_0xa158('0x26')];this[_0xa158('0x27')]=_0x5376bd['ListId'];this[_0xa158('0x28')]=_0x5376bd['UserId'];this[_0xa158('0x29')]=_0x5376bd[_0xa158('0x29')];this[_0xa158('0x2a')]=_0x5376bd[_0xa158('0x2a')];}module[_0xa158('0x2b')]=Hangup;
\ No newline at end of file
index 9c2df78..9fda8bd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0b9e=['recallme','ContactId','ListId','VoiceQueueId','CampaignId','originatecalleridnum','state','statedesc','exports','../utils','uniqueid','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countnosuchnumberretry','countdropretry','countmachineretry','countagentrejectretry','countabandonedretry','calleridname','name','calleridnum','number','starttime','responsetime','ringtime','getSeconds','holdtime','talktime','callback','callbackuniqueid','callbackat'];(function(_0x3f975a,_0xf22b0b){var _0x512370=function(_0x3d3ddd){while(--_0x3d3ddd){_0x3f975a['push'](_0x3f975a['shift']());}};_0x512370(++_0xf22b0b);}(_0x0b9e,0x9d));var _0xe0b9=function(_0x2d6df3,_0x1a8c5c){_0x2d6df3=_0x2d6df3-0x0;var _0x5d2b9c=_0x0b9e[_0x2d6df3];return _0x5d2b9c;};'use strict';var utils=require(_0xe0b9('0x0'));function History(_0x6685d1){this[_0xe0b9('0x1')]=_0x6685d1[_0xe0b9('0x1')];this['scheduledat']=_0x6685d1[_0xe0b9('0x2')]||undefined;this[_0xe0b9('0x3')]=_0x6685d1[_0xe0b9('0x3')];this[_0xe0b9('0x4')]=_0x6685d1[_0xe0b9('0x3')]===_0xe0b9('0x5')?_0xe0b9('0x6'):_0x6685d1[_0xe0b9('0x3')];this[_0xe0b9('0x7')]=_0x6685d1[_0xe0b9('0x7')];this[_0xe0b9('0x8')]=_0x6685d1['countcongestionretry'];this['countnoanswerretry']=_0x6685d1['countnoanswerretry'];this['countglobal']=_0x6685d1['countbusyretry']+_0x6685d1['countcongestionretry']+_0x6685d1[_0xe0b9('0x9')]+_0x6685d1[_0xe0b9('0xa')]+_0x6685d1[_0xe0b9('0xb')]+_0x6685d1['countabandonedretry']+_0x6685d1[_0xe0b9('0xc')]+_0x6685d1[_0xe0b9('0xd')];this[_0xe0b9('0xa')]=_0x6685d1[_0xe0b9('0xa')];this[_0xe0b9('0xb')]=_0x6685d1[_0xe0b9('0xb')];this[_0xe0b9('0xe')]=_0x6685d1['countabandonedretry'];this[_0xe0b9('0xc')]=_0x6685d1[_0xe0b9('0xc')];this[_0xe0b9('0xd')]=_0x6685d1['countagentrejectretry'];this[_0xe0b9('0x6')]=_0x6685d1[_0xe0b9('0x6')];this[_0xe0b9('0xf')]=_0x6685d1[_0xe0b9('0x10')];this[_0xe0b9('0x11')]=_0x6685d1[_0xe0b9('0x12')];this[_0xe0b9('0x13')]=_0x6685d1[_0xe0b9('0x13')];this[_0xe0b9('0x14')]=_0x6685d1['responsetime'];this['endtime']=_0x6685d1[_0xe0b9('0x14')];this[_0xe0b9('0x15')]=utils[_0xe0b9('0x16')](_0x6685d1[_0xe0b9('0x14')],_0x6685d1[_0xe0b9('0x13')]);this[_0xe0b9('0x17')]=0x0;this[_0xe0b9('0x18')]=0x0;this[_0xe0b9('0x19')]=_0x6685d1[_0xe0b9('0x19')];this[_0xe0b9('0x1a')]=_0x6685d1['callbackuniqueid'];this[_0xe0b9('0x1b')]=_0x6685d1[_0xe0b9('0x1b')];this[_0xe0b9('0x1c')]=_0x6685d1[_0xe0b9('0x1c')];this[_0xe0b9('0x1d')]=_0x6685d1[_0xe0b9('0x1d')];this[_0xe0b9('0x1e')]=_0x6685d1['ListId'];this['UserId']=_0x6685d1['UserId'];this[_0xe0b9('0x1f')]=_0x6685d1[_0xe0b9('0x1f')];this[_0xe0b9('0x20')]=_0x6685d1[_0xe0b9('0x20')];this[_0xe0b9('0x21')]=_0x6685d1[_0xe0b9('0x21')]||'';this['originatecalleridname']=_0x6685d1['originatecalleridname']||'';this[_0xe0b9('0x22')]=_0x6685d1[_0xe0b9('0x22')];this[_0xe0b9('0x23')]=_0x6685d1['statedesc'];}module[_0xe0b9('0x24')]=History;
\ No newline at end of file
+var _0xa13c=['UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','state','statedesc','exports','../utils','uniqueid','type','campaigntype','outbound','countbusyretry','countnoanswerretry','countcongestionretry','countdropretry','countagentrejectretry','countnosuchnumberretry','countabandonedretry','countmachineretry','queue','calleridname','name','calleridnum','number','starttime','responsetime','endtime','getSeconds','holdtime','talktime','callback','callbackuniqueid','recallme','ContactId','ListId'];(function(_0x491a7f,_0x28bb80){var _0x3d8f44=function(_0xdaa716){while(--_0xdaa716){_0x491a7f['push'](_0x491a7f['shift']());}};_0x3d8f44(++_0x28bb80);}(_0xa13c,0x9c));var _0xca13=function(_0x317293,_0x400238){_0x317293=_0x317293-0x0;var _0x91a7ff=_0xa13c[_0x317293];return _0x91a7ff;};'use strict';var utils=require(_0xca13('0x0'));function History(_0x448ebd){this[_0xca13('0x1')]=_0x448ebd[_0xca13('0x1')];this['scheduledat']=_0x448ebd['scheduledat']||undefined;this['type']=_0x448ebd[_0xca13('0x2')];this[_0xca13('0x3')]=_0x448ebd['type']===_0xca13('0x4')?'queue':_0x448ebd[_0xca13('0x2')];this[_0xca13('0x5')]=_0x448ebd['countbusyretry'];this['countcongestionretry']=_0x448ebd['countcongestionretry'];this['countnoanswerretry']=_0x448ebd[_0xca13('0x6')];this['countglobal']=_0x448ebd['countbusyretry']+_0x448ebd[_0xca13('0x7')]+_0x448ebd[_0xca13('0x6')]+_0x448ebd['countnosuchnumberretry']+_0x448ebd[_0xca13('0x8')]+_0x448ebd['countabandonedretry']+_0x448ebd['countmachineretry']+_0x448ebd[_0xca13('0x9')];this[_0xca13('0xa')]=_0x448ebd[_0xca13('0xa')];this[_0xca13('0x8')]=_0x448ebd['countdropretry'];this[_0xca13('0xb')]=_0x448ebd[_0xca13('0xb')];this[_0xca13('0xc')]=_0x448ebd[_0xca13('0xc')];this['countagentrejectretry']=_0x448ebd['countagentrejectretry'];this[_0xca13('0xd')]=_0x448ebd[_0xca13('0xd')];this[_0xca13('0xe')]=_0x448ebd[_0xca13('0xf')];this[_0xca13('0x10')]=_0x448ebd[_0xca13('0x11')];this[_0xca13('0x12')]=_0x448ebd[_0xca13('0x12')];this['responsetime']=_0x448ebd[_0xca13('0x13')];this[_0xca13('0x14')]=_0x448ebd[_0xca13('0x13')];this['ringtime']=utils[_0xca13('0x15')](_0x448ebd[_0xca13('0x13')],_0x448ebd[_0xca13('0x12')]);this[_0xca13('0x16')]=0x0;this[_0xca13('0x17')]=0x0;this[_0xca13('0x18')]=_0x448ebd[_0xca13('0x18')];this[_0xca13('0x19')]=_0x448ebd[_0xca13('0x19')];this['callbackat']=_0x448ebd['callbackat'];this['recallme']=_0x448ebd[_0xca13('0x1a')];this[_0xca13('0x1b')]=_0x448ebd[_0xca13('0x1b')];this[_0xca13('0x1c')]=_0x448ebd[_0xca13('0x1c')];this['UserId']=_0x448ebd[_0xca13('0x1d')];this[_0xca13('0x1e')]=_0x448ebd[_0xca13('0x1e')];this[_0xca13('0x1f')]=_0x448ebd[_0xca13('0x1f')];this[_0xca13('0x20')]=_0x448ebd[_0xca13('0x20')]||'';this[_0xca13('0x21')]=_0x448ebd[_0xca13('0x21')]||'';this[_0xca13('0x22')]=_0x448ebd['state'];this[_0xca13('0x23')]=_0x448ebd[_0xca13('0x23')];}module[_0xca13('0x24')]=History;
\ No newline at end of file
index eb42b31..603592c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb561=['getSeconds','talktime','membername','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','CampaignId','originatecalleridnum','originatecalleridname','agiafterat','state','statedesc','exports','../utils','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','calleridnum','number','starttime','responsetime','droptime','dropreason','endtime','ringtime'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0xb561,0x184));var _0x1b56=function(_0x4fca7a,_0x12aa50){_0x4fca7a=_0x4fca7a-0x0;var _0x3d414d=_0xb561[_0x4fca7a];return _0x3d414d;};'use strict';var utils=require(_0x1b56('0x0'));function QueueCallerAbandon(_0x13820e,_0x3f64d4){this[_0x1b56('0x1')]=_0x13820e[_0x1b56('0x1')];this[_0x1b56('0x2')]=_0x13820e[_0x1b56('0x2')];this[_0x1b56('0x3')]=_0x13820e[_0x1b56('0x2')]===_0x1b56('0x4')?_0x1b56('0x5'):_0x13820e[_0x1b56('0x2')];this[_0x1b56('0x6')]=_0x13820e[_0x1b56('0x6')];this[_0x1b56('0x7')]=_0x13820e[_0x1b56('0x7')];this[_0x1b56('0x8')]=_0x13820e[_0x1b56('0x8')];this[_0x1b56('0x9')]=_0x13820e['countbusyretry']+_0x13820e[_0x1b56('0x7')]+_0x13820e['countnoanswerretry']+_0x13820e[_0x1b56('0xa')]+_0x13820e[_0x1b56('0xb')]+_0x13820e[_0x1b56('0xc')]+_0x13820e[_0x1b56('0xd')]+_0x13820e['countagentrejectretry'];this[_0x1b56('0xa')]=_0x13820e[_0x1b56('0xa')];this[_0x1b56('0xb')]=_0x13820e['countdropretry'];this[_0x1b56('0xc')]=_0x13820e[_0x1b56('0xc')];this[_0x1b56('0xd')]=_0x13820e[_0x1b56('0xd')];this[_0x1b56('0xe')]=_0x13820e[_0x1b56('0xe')];this[_0x1b56('0xf')]=_0x3f64d4[_0x1b56('0xf')];this[_0x1b56('0x10')]=_0x13820e[_0x1b56('0x11')];this[_0x1b56('0x12')]=_0x13820e[_0x1b56('0x13')];this[_0x1b56('0x14')]=_0x13820e['starttime'];this['responsetime']=_0x13820e[_0x1b56('0x15')];this[_0x1b56('0x16')]=_0x13820e[_0x1b56('0x16')];this[_0x1b56('0x17')]=_0x13820e['dropreason'];this[_0x1b56('0x18')]=this[_0x1b56('0x16')];this[_0x1b56('0x19')]=utils[_0x1b56('0x1a')](_0x13820e[_0x1b56('0x15')],_0x13820e[_0x1b56('0x14')]);this['holdtime']=utils[_0x1b56('0x1a')](this[_0x1b56('0x16')],_0x13820e[_0x1b56('0x15')]);this[_0x1b56('0x1b')]=0x0;this[_0x1b56('0x5')]=_0x3f64d4[_0x1b56('0x5')];this[_0x1b56('0x1c')]=_0x3f64d4[_0x1b56('0x1d')];this['reason']=_0x3f64d4[_0x1b56('0x1e')];this['callback']=_0x13820e[_0x1b56('0x1f')];this[_0x1b56('0x20')]=_0x13820e[_0x1b56('0x20')];this[_0x1b56('0x21')]=_0x13820e[_0x1b56('0x21')];this[_0x1b56('0x22')]=_0x13820e['recallme'];this['ContactId']=_0x13820e[_0x1b56('0x23')];this[_0x1b56('0x24')]=_0x13820e[_0x1b56('0x24')];this['UserId']=_0x13820e[_0x1b56('0x25')];this[_0x1b56('0x26')]=_0x13820e['VoiceQueueId'];this[_0x1b56('0x27')]=_0x13820e[_0x1b56('0x27')];this['originatecalleridnum']=_0x13820e[_0x1b56('0x28')]||'';this[_0x1b56('0x29')]=_0x13820e['originatecalleridname']||'';this[_0x1b56('0x2a')]=_0x13820e['agiafterat'];this[_0x1b56('0x2b')]=_0x13820e[_0x1b56('0x2b')];this[_0x1b56('0x2c')]=_0x13820e[_0x1b56('0x2c')];}module[_0x1b56('0x2d')]=QueueCallerAbandon;
\ No newline at end of file
+var _0xf41d=['countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','uniqueid','calleridname','name','number','starttime','responsetime','droptime','dropreason','endtime','ringtime','holdtime','getSeconds','talktime','membername','connectedlinename','reason','callback','callbackuniqueid','callbackat','recallme','ContactId','UserId','VoiceQueueId','CampaignId','originatecalleridname','agiafterat','state','exports','../utils','scheduledat','type','campaigntype','outbound','queue','countbusyretry','countcongestionretry','countnoanswerretry'];(function(_0x4dd063,_0x574736){var _0x3e95e8=function(_0x4da749){while(--_0x4da749){_0x4dd063['push'](_0x4dd063['shift']());}};_0x3e95e8(++_0x574736);}(_0xf41d,0x78));var _0xdf41=function(_0x22b800,_0x4e6eb3){_0x22b800=_0x22b800-0x0;var _0x2a1810=_0xf41d[_0x22b800];return _0x2a1810;};'use strict';var utils=require(_0xdf41('0x0'));function QueueCallerAbandon(_0xbc6250,_0x3bc19b){this['scheduledat']=_0xbc6250[_0xdf41('0x1')];this[_0xdf41('0x2')]=_0xbc6250['type'];this[_0xdf41('0x3')]=_0xbc6250[_0xdf41('0x2')]===_0xdf41('0x4')?_0xdf41('0x5'):_0xbc6250[_0xdf41('0x2')];this[_0xdf41('0x6')]=_0xbc6250[_0xdf41('0x6')];this[_0xdf41('0x7')]=_0xbc6250['countcongestionretry'];this[_0xdf41('0x8')]=_0xbc6250[_0xdf41('0x8')];this[_0xdf41('0x9')]=_0xbc6250[_0xdf41('0x6')]+_0xbc6250[_0xdf41('0x7')]+_0xbc6250['countnoanswerretry']+_0xbc6250[_0xdf41('0xa')]+_0xbc6250[_0xdf41('0xb')]+_0xbc6250[_0xdf41('0xc')]+_0xbc6250[_0xdf41('0xd')]+_0xbc6250[_0xdf41('0xe')];this[_0xdf41('0xa')]=_0xbc6250[_0xdf41('0xa')];this[_0xdf41('0xb')]=_0xbc6250[_0xdf41('0xb')];this[_0xdf41('0xc')]=_0xbc6250[_0xdf41('0xc')];this['countmachineretry']=_0xbc6250[_0xdf41('0xd')];this[_0xdf41('0xe')]=_0xbc6250[_0xdf41('0xe')];this['uniqueid']=_0x3bc19b[_0xdf41('0xf')];this[_0xdf41('0x10')]=_0xbc6250[_0xdf41('0x11')];this['calleridnum']=_0xbc6250[_0xdf41('0x12')];this[_0xdf41('0x13')]=_0xbc6250['starttime'];this[_0xdf41('0x14')]=_0xbc6250['responsetime'];this[_0xdf41('0x15')]=_0xbc6250[_0xdf41('0x15')];this[_0xdf41('0x16')]=_0xbc6250[_0xdf41('0x16')];this[_0xdf41('0x17')]=this[_0xdf41('0x15')];this[_0xdf41('0x18')]=utils['getSeconds'](_0xbc6250[_0xdf41('0x14')],_0xbc6250[_0xdf41('0x13')]);this[_0xdf41('0x19')]=utils[_0xdf41('0x1a')](this['droptime'],_0xbc6250[_0xdf41('0x14')]);this[_0xdf41('0x1b')]=0x0;this[_0xdf41('0x5')]=_0x3bc19b['queue'];this[_0xdf41('0x1c')]=_0x3bc19b[_0xdf41('0x1d')];this[_0xdf41('0x1e')]=_0x3bc19b[_0xdf41('0x1e')];this[_0xdf41('0x1f')]=_0xbc6250[_0xdf41('0x1f')];this[_0xdf41('0x20')]=_0xbc6250[_0xdf41('0x20')];this['callbackat']=_0xbc6250[_0xdf41('0x21')];this[_0xdf41('0x22')]=_0xbc6250[_0xdf41('0x22')];this[_0xdf41('0x23')]=_0xbc6250[_0xdf41('0x23')];this['ListId']=_0xbc6250['ListId'];this[_0xdf41('0x24')]=_0xbc6250['UserId'];this['VoiceQueueId']=_0xbc6250[_0xdf41('0x25')];this[_0xdf41('0x26')]=_0xbc6250[_0xdf41('0x26')];this['originatecalleridnum']=_0xbc6250['originatecalleridnum']||'';this[_0xdf41('0x27')]=_0xbc6250['originatecalleridname']||'';this[_0xdf41('0x28')]=_0xbc6250['agiafterat'];this['state']=_0xbc6250[_0xdf41('0x29')];this['statedesc']=_0xbc6250['statedesc'];}module[_0xdf41('0x2a')]=QueueCallerAbandon;
\ No newline at end of file
index 6841cd8..d2c7849 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6455=['[verifyAdditionalPhone]','swapAdditionalPhones','avgHandleTime','[avgHandleTime]','createHistory','[createHistory]','util','dialer','../../rpc/cmHopper','../../rpc/cmHopperAdditionalPhone','../../rpc/cmHopperBlack','../../rpc/cmHopperHistory','getContactDialer','dialOrderByScheduledAt','catch','temp','getContactDialerIvr','error','[getContactDialerIvr]','countReScheduled','[countReScheduled]','rescheduleContact','[rescheduleContact]','unlockContact','[unlockContact]','moveContactManagedDialer','checkIsBlackList','checkIsBlackListIvr','verifyAdditionalPhones'];(function(_0x4d2b0a,_0x3fc6c5){var _0x2913de=function(_0x26a5ed){while(--_0x26a5ed){_0x4d2b0a['push'](_0x4d2b0a['shift']());}};_0x2913de(++_0x3fc6c5);}(_0x6455,0x97));var _0x5645=function(_0x2b5add,_0x114d90){_0x2b5add=_0x2b5add-0x0;var _0x2abb48=_0x6455[_0x2b5add];return _0x2abb48;};'use strict';var util=require(_0x5645('0x0'));var logger=require('../../../../config/logger')(_0x5645('0x1'));var cmHopper=require(_0x5645('0x2'));var cmHopperAdditionalPhone=require(_0x5645('0x3'));var cmHopperBlack=require(_0x5645('0x4'));var cmHopperHistory=require(_0x5645('0x5'));function inspectError(_0x35c21e){return util['inspect'](_0x35c21e,{'showHidden':![],'depth':null});}function getContactDialer(_0x233875,_0x29cefe,_0x282ef3){return cmHopper[_0x5645('0x6')](_0x233875['id'],_0x29cefe,_0x282ef3,_0x233875[_0x5645('0x7')])[_0x5645('0x8')](function(_0xa14a06){_0x233875[_0x5645('0x9')]=0x0;logger['error']('[getContactDialer]',inspectError(_0xa14a06));});}exports[_0x5645('0x6')]=getContactDialer;function getContactDialerIvr(_0x37c03a,_0x38c07a){return cmHopper[_0x5645('0xa')](_0x37c03a['id'],_0x38c07a,_0x37c03a[_0x5645('0x7')])[_0x5645('0x8')](function(_0x587c61){_0x37c03a[_0x5645('0x9')]=0x0;logger[_0x5645('0xb')](_0x5645('0xc'),inspectError(_0x587c61));});}exports[_0x5645('0xa')]=getContactDialerIvr;function countReScheduled(_0x5a6092){return cmHopper[_0x5645('0xd')](_0x5a6092)['catch'](function(_0x42f5cd){logger[_0x5645('0xb')](_0x5645('0xe'),inspectError(_0x42f5cd));});}exports[_0x5645('0xd')]=countReScheduled;function rescheduleContact(_0x2d982f){return cmHopper[_0x5645('0xf')](_0x2d982f)[_0x5645('0x8')](function(_0x2270a1){logger['error'](_0x5645('0x10'),inspectError(_0x2270a1));});}exports[_0x5645('0xf')]=rescheduleContact;function unlockContact(_0x25863f,_0x4cbd46,_0x4b3be6){return cmHopper[_0x5645('0x11')](_0x25863f,_0x4cbd46,_0x4b3be6)[_0x5645('0x8')](function(_0x511aed){logger[_0x5645('0xb')](_0x5645('0x12'),inspectError(_0x511aed));});}exports[_0x5645('0x11')]=unlockContact;function moveContactManagedDialer(_0x5179fd){return cmHopper[_0x5645('0x13')](_0x5179fd)[_0x5645('0x8')](function(_0x22a6cf){logger[_0x5645('0xb')]('[moveContactManagedDialer]',inspectError(_0x22a6cf));});}exports[_0x5645('0x13')]=moveContactManagedDialer;function checkIsBlackList(_0x52ac46){return cmHopperBlack['checkIsBlackList'](_0x52ac46)[_0x5645('0x8')](function(_0x1e2cba){logger[_0x5645('0xb')]('[checkIsBlackList]',inspectError(_0x1e2cba));});}exports[_0x5645('0x14')]=checkIsBlackList;function checkIsBlackListIvr(_0x50ed38){return cmHopperBlack[_0x5645('0x15')](_0x50ed38)['catch'](function(_0x4f82d0){logger[_0x5645('0xb')]('[checkIsBlackListIvr]',inspectError(_0x4f82d0));});}exports[_0x5645('0x15')]=checkIsBlackListIvr;function verifyAdditionalPhones(_0x379cbd,_0x502c2e,_0x18680f){return cmHopperAdditionalPhone[_0x5645('0x16')](_0x379cbd,_0x502c2e,_0x18680f)[_0x5645('0x8')](function(_0x50fa82){logger[_0x5645('0xb')](_0x5645('0x17'),inspectError(_0x50fa82));});}exports[_0x5645('0x16')]=verifyAdditionalPhones;function swapAdditionalPhones(_0x46b33a,_0x568fd6,_0x4bc484){return cmHopperAdditionalPhone['swapAdditionalPhones'](_0x46b33a,_0x568fd6,_0x4bc484)['catch'](function(_0x472982){logger['error']('[swapAdditionalPhone]',inspectError(_0x472982));});}exports[_0x5645('0x18')]=swapAdditionalPhones;function avgHandleTime(_0x12f43a){return cmHopperHistory[_0x5645('0x19')](_0x12f43a)[_0x5645('0x8')](function(_0x3a5c61){logger[_0x5645('0xb')](_0x5645('0x1a'),inspectError(_0x3a5c61));});}exports[_0x5645('0x19')]=avgHandleTime;function createHistory(_0x4493e6){return cmHopperHistory[_0x5645('0x1b')](_0x4493e6)[_0x5645('0x8')](function(_0x2154a7){logger[_0x5645('0xb')](_0x5645('0x1c'),inspectError(_0x2154a7));});}exports['createHistory']=createHistory;
\ No newline at end of file
+var _0x5334=['[checkIsBlackListIvr]','verifyAdditionalPhones','[verifyAdditionalPhone]','swapAdditionalPhones','[swapAdditionalPhone]','avgHandleTime','createHistory','[createHistory]','util','../../../../config/logger','dialer','../../rpc/cmHopper','../../rpc/cmHopperAdditionalPhone','../../rpc/cmHopperHistory','inspect','dialOrderByScheduledAt','error','[getContactDialer]','getContactDialer','getContactDialerIvr','temp','[getContactDialerIvr]','catch','[countReScheduled]','rescheduleContact','[rescheduleContact]','unlockContact','moveContactManagedDialer','checkIsBlackList','[checkIsBlackList]','checkIsBlackListIvr'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5334,0x84));var _0x4533=function(_0x3e9ba9,_0x84a2ca){_0x3e9ba9=_0x3e9ba9-0x0;var _0x4ea4a1=_0x5334[_0x3e9ba9];return _0x4ea4a1;};'use strict';var util=require(_0x4533('0x0'));var logger=require(_0x4533('0x1'))(_0x4533('0x2'));var cmHopper=require(_0x4533('0x3'));var cmHopperAdditionalPhone=require(_0x4533('0x4'));var cmHopperBlack=require('../../rpc/cmHopperBlack');var cmHopperHistory=require(_0x4533('0x5'));function inspectError(_0x5176b5){return util[_0x4533('0x6')](_0x5176b5,{'showHidden':![],'depth':null});}function getContactDialer(_0x11ce61,_0x5cbca4,_0x4a576a){return cmHopper['getContactDialer'](_0x11ce61['id'],_0x5cbca4,_0x4a576a,_0x11ce61[_0x4533('0x7')])['catch'](function(_0x4d89e7){_0x11ce61['temp']=0x0;logger[_0x4533('0x8')](_0x4533('0x9'),inspectError(_0x4d89e7));});}exports[_0x4533('0xa')]=getContactDialer;function getContactDialerIvr(_0x2489b6,_0x31018b){return cmHopper[_0x4533('0xb')](_0x2489b6['id'],_0x31018b,_0x2489b6[_0x4533('0x7')])['catch'](function(_0x5533){_0x2489b6[_0x4533('0xc')]=0x0;logger[_0x4533('0x8')](_0x4533('0xd'),inspectError(_0x5533));});}exports['getContactDialerIvr']=getContactDialerIvr;function countReScheduled(_0x7b2420){return cmHopper['countReScheduled'](_0x7b2420)[_0x4533('0xe')](function(_0x439210){logger[_0x4533('0x8')](_0x4533('0xf'),inspectError(_0x439210));});}exports['countReScheduled']=countReScheduled;function rescheduleContact(_0xdd4757){return cmHopper[_0x4533('0x10')](_0xdd4757)[_0x4533('0xe')](function(_0x18d4f0){logger['error'](_0x4533('0x11'),inspectError(_0x18d4f0));});}exports['rescheduleContact']=rescheduleContact;function unlockContact(_0x4c703c,_0x466545,_0x34dea9){return cmHopper['unlockContact'](_0x4c703c,_0x466545,_0x34dea9)[_0x4533('0xe')](function(_0x1e6a1a){logger[_0x4533('0x8')]('[unlockContact]',inspectError(_0x1e6a1a));});}exports[_0x4533('0x12')]=unlockContact;function moveContactManagedDialer(_0x4f732e){return cmHopper[_0x4533('0x13')](_0x4f732e)[_0x4533('0xe')](function(_0x56ab4f){logger[_0x4533('0x8')]('[moveContactManagedDialer]',inspectError(_0x56ab4f));});}exports['moveContactManagedDialer']=moveContactManagedDialer;function checkIsBlackList(_0x1c5cdd){return cmHopperBlack[_0x4533('0x14')](_0x1c5cdd)['catch'](function(_0x53fe43){logger[_0x4533('0x8')](_0x4533('0x15'),inspectError(_0x53fe43));});}exports[_0x4533('0x14')]=checkIsBlackList;function checkIsBlackListIvr(_0x1b08fa){return cmHopperBlack[_0x4533('0x16')](_0x1b08fa)[_0x4533('0xe')](function(_0x12adde){logger['error'](_0x4533('0x17'),inspectError(_0x12adde));});}exports[_0x4533('0x16')]=checkIsBlackListIvr;function verifyAdditionalPhones(_0x2901f1,_0x4aa438,_0x513011){return cmHopperAdditionalPhone[_0x4533('0x18')](_0x2901f1,_0x4aa438,_0x513011)[_0x4533('0xe')](function(_0x4c640c){logger['error'](_0x4533('0x19'),inspectError(_0x4c640c));});}exports[_0x4533('0x18')]=verifyAdditionalPhones;function swapAdditionalPhones(_0xfd9409,_0x4d8189,_0x44786f){return cmHopperAdditionalPhone[_0x4533('0x1a')](_0xfd9409,_0x4d8189,_0x44786f)[_0x4533('0xe')](function(_0x3fba67){logger[_0x4533('0x8')](_0x4533('0x1b'),inspectError(_0x3fba67));});}exports[_0x4533('0x1a')]=swapAdditionalPhones;function avgHandleTime(_0x27b653){return cmHopperHistory[_0x4533('0x1c')](_0x27b653)['catch'](function(_0x5c1e24){logger[_0x4533('0x8')]('[avgHandleTime]',inspectError(_0x5c1e24));});}exports[_0x4533('0x1c')]=avgHandleTime;function createHistory(_0x4e2b80){return cmHopperHistory[_0x4533('0x1d')](_0x4e2b80)[_0x4533('0xe')](function(_0x38706b){logger[_0x4533('0x8')](_0x4533('0x1e'),inspectError(_0x38706b));});}exports[_0x4533('0x1d')]=createHistory;
\ No newline at end of file
index 30dad62..91e6f7d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x05ae=['includes','TrunkBackup','status','originated','NO_AGENTS_LOGGED','UNREACHABLE_TRUNK','getQueueCampaignStatusMessage','DISACTIVED','talking','INACTIVE','getQueueCampaignActiveStatusMessage','match','extractCalleridName','isUndefined','string','\x22%s\x22\x20<%s>','\x22\x22\x20<>','getCallerId','\x5cw{0,','pow','format','random','toString','getCallerIdRandom','error','[decrementOriginate]\x20queue\x20originate\x20value\x20is\x20negative','length','checkContactEmpty','tags','updatedAt','description','toUpperCase','substring','setXMDContactVariables','lodash','moment','../../../../config/logger','dialer','../../../../config/environment/shared','timezones','ACTIVE','BLACKLIST','DEACTIVATED','IS_DISACTIVED','INTERVAL_IS_EMPTY','NOT_ACTIVE','AVAILABLE_CONTACTS_FINISHED','INTERVAL_IS_NULL','INTERVAL_IS_OVERTIME','GLOBAL_INTERVAL_IS_OVERTIME','RECALLINQUEUE','RUNNING','TIMEZONE_UNKNOW','preview','isPreviewCampaign','ivr','isIVRCampaign','type','outbound','dialActive','isQueueCampaignActive','isIVRCampaignActive','milliseconds','diff','getSeconds','dialMethod','message','available','loggedIn','loggedInDb','paused','pTalking','waiting','inUse','Trunk','name','active','hasQueueCampaignDataChanged','dialTimezone','isNil','dialGlobalInterval','Interval','Intervals','isEmpty','EMPTY_INTERVAL','UNKNOWN_TIMEZONE','SIP/','reachable','unmonitored'];(function(_0x245edd,_0x222dde){var _0x2284c2=function(_0x27d4aa){while(--_0x27d4aa){_0x245edd['push'](_0x245edd['shift']());}};_0x2284c2(++_0x222dde);}(_0x05ae,0x1df));var _0xe05a=function(_0x5eb0bd,_0x659c4b){_0x5eb0bd=_0x5eb0bd-0x0;var _0x211c89=_0x05ae[_0x5eb0bd];return _0x211c89;};'use strict';var _=require(_0xe05a('0x0'));var moment=require(_0xe05a('0x1'));var util=require('util');var logger=require(_0xe05a('0x2'))(_0xe05a('0x3'));var timezones=require(_0xe05a('0x4'))[_0xe05a('0x5')];var CAMPAIGN_STATUS={'ACTIVE':_0xe05a('0x6'),'BLACKLIST':_0xe05a('0x7'),'CONTACTS_RESCHEDULED':'RESCHEDULED_CONTACTS','DEACTIVATED':_0xe05a('0x8'),'DISACTIVED':_0xe05a('0x9'),'EMPTY_INTERVAL':_0xe05a('0xa'),'INACTIVE':_0xe05a('0xb'),'NO_AGENTS_LOGGED':'AGENTS_NOT_LOGGED','NO_AVAILABLE_CONTACTS':_0xe05a('0xc'),'NULL_INTERVAL':_0xe05a('0xd'),'OVERTIME_INTERVAL':_0xe05a('0xe'),'OVERTIME_GLOBAL_INTERVAL':_0xe05a('0xf'),'QUEUE_RECALL':_0xe05a('0x10'),'RECALL_TIMEOUT':'RECALLFAILEDTIMEOUT','RUNNING':_0xe05a('0x11'),'UNKNOWN_TIMEZONE':_0xe05a('0x12'),'UNREACHABLE_TRUNK':'TRUNK_IS_NOT_REACHABLE'};exports['CAMPAIGN_STATUS']=CAMPAIGN_STATUS;function isPreviewCampaign(_0x47d7a6){return _0x47d7a6['dialMethod']===_0xe05a('0x13');}exports[_0xe05a('0x14')]=isPreviewCampaign;function isIVRCampaign(_0x542226){return _0x542226['type']===_0xe05a('0x15');}exports[_0xe05a('0x16')]=isIVRCampaign;function isOutboundQueue(_0x1f48e2){return _0x1f48e2[_0xe05a('0x17')]===_0xe05a('0x18');}exports['isOutboundQueue']=isOutboundQueue;function isQueueCampaignActive(_0x268149){return _0x268149[_0xe05a('0x19')];}exports[_0xe05a('0x1a')]=isQueueCampaignActive;function isIVRCampaignActive(_0x461fae){return _0x461fae['active'];}exports[_0xe05a('0x1b')]=isIVRCampaignActive;function getSeconds(_0x2b0b20,_0x5796ee){var _0x3f1791=moment(_0x2b0b20)[_0xe05a('0x1c')](0x0);var _0x288b16=moment(_0x5796ee)[_0xe05a('0x1c')](0x0);return _0x3f1791[_0xe05a('0x1d')](_0x288b16,'seconds');}exports[_0xe05a('0x1e')]=getSeconds;function hasQueueCampaignDataChanged(_0x3987ce,_0x52cbee){var _0x3039a1=![];var _0x365e36=_0x3987ce['dialMethod']!==_0x52cbee[_0xe05a('0x1f')]||_0x3987ce[_0xe05a('0x19')]!==_0x52cbee['dialActive']||_0x3987ce['message']!==_0x52cbee[_0xe05a('0x20')];var _0x225662=_0x3987ce[_0xe05a('0x21')]!==_0x52cbee[_0xe05a('0x21')]||_0x3987ce[_0xe05a('0x22')]!==_0x52cbee[_0xe05a('0x22')]||_0x3987ce[_0xe05a('0x23')]!==_0x52cbee['loggedInDb']||_0x3987ce[_0xe05a('0x24')]!==_0x52cbee['paused']||_0x3987ce['talking']!==_0x52cbee['talking']||_0x3987ce[_0xe05a('0x25')]!==_0x52cbee[_0xe05a('0x25')]||_0x3987ce[_0xe05a('0x26')]!==_0x52cbee[_0xe05a('0x26')]||_0x3987ce[_0xe05a('0x27')]!==_0x52cbee[_0xe05a('0x27')]||_0x3987ce['originated']!==_0x52cbee['originated'];if(_0x3987ce[_0xe05a('0x28')]&&_0x52cbee[_0xe05a('0x28')]){_0x3039a1=_0x3987ce[_0xe05a('0x28')]['name']!==_0x52cbee[_0xe05a('0x28')][_0xe05a('0x29')]||_0x3987ce[_0xe05a('0x28')][_0xe05a('0x2a')]!==_0x52cbee['Trunk']['active'];}return _0x365e36||_0x225662||_0x3039a1;}exports[_0xe05a('0x2b')]=hasQueueCampaignDataChanged;function checkAnyValidQueueCampaignInterval(_0x5a01aa){var _0x2f243d=null;var _0x2f187f=_0x5a01aa[_0xe05a('0x2c')];if(_[_0xe05a('0x2d')](_0x5a01aa[_0xe05a('0x2e')])||_[_0xe05a('0x2d')](_0x5a01aa[_0xe05a('0x2f')])||_[_0xe05a('0x2d')](_0x5a01aa[_0xe05a('0x2f')][_0xe05a('0x30')])){_0x2f243d=CAMPAIGN_STATUS['NULL_INTERVAL'];}else if(_['isEmpty'](_0x5a01aa['dialGlobalInterval'])||_[_0xe05a('0x31')](_0x5a01aa[_0xe05a('0x2f')][_0xe05a('0x30')])){_0x2f243d=CAMPAIGN_STATUS[_0xe05a('0x32')];}else if(_0x2f187f&&!timezones[_0x2f187f]){_0x2f243d=CAMPAIGN_STATUS[_0xe05a('0x33')];}return _0x2f243d;}function checkAnyValidTrunk(_0x8c5666,_0x2a0fe6){var _0x4db885=null;var _0x4df893=_0xe05a('0x34');var _0x136f66=[_0xe05a('0x35'),_0xe05a('0x36')];var _0x2b21eb=!![];if(_0x8c5666['Trunk']&&_0x8c5666[_0xe05a('0x28')][_0xe05a('0x2a')]){_0x4df893+=_0x8c5666[_0xe05a('0x28')]['name'];_0x4db885=_0x2a0fe6[_0x4df893];_0x2b21eb=_0x136f66[_0xe05a('0x37')](_0x4db885['status']);}else if(_0x8c5666[_0xe05a('0x38')]&&_0x8c5666[_0xe05a('0x38')][_0xe05a('0x2a')]){_0x4df893+=_0x8c5666[_0xe05a('0x38')][_0xe05a('0x29')];_0x4db885=_0x2a0fe6[_0x4df893];_0x2b21eb=_0x136f66['includes'](_0x4db885[_0xe05a('0x39')]);}return _0x2b21eb;}function getQueueCampaignStatusMessage(_0x120a32,_0x52c9d3){var _0x372571=CAMPAIGN_STATUS[_0xe05a('0x6')];var _0x367c08=isPreviewCampaign(_0x120a32);if(!isQueueCampaignActive(_0x120a32)){if(_0x367c08){_0x372571=CAMPAIGN_STATUS['INACTIVE'];}else{if(_0x120a32[_0xe05a('0x3a')]===0x0&&_0x120a32['talking']===0x0&&_0x120a32['waiting']===0x0&&(_0x120a32['pTalking']||0x0)===0x0){_0x372571=CAMPAIGN_STATUS['INACTIVE'];}else{_0x372571=CAMPAIGN_STATUS['DISACTIVED'];}}}else if(_0x120a32[_0xe05a('0x22')]===0x0){_0x372571=CAMPAIGN_STATUS[_0xe05a('0x3b')];}else if(!checkAnyValidTrunk(_0x120a32,_0x52c9d3)){_0x372571=CAMPAIGN_STATUS[_0xe05a('0x3c')];}else if(!isPreviewCampaign(_0x120a32)){var _0x14cfec=checkAnyValidQueueCampaignInterval(_0x120a32);if(_0x14cfec){_0x372571=_0x14cfec;}}return _0x372571;}exports[_0xe05a('0x3d')]=getQueueCampaignStatusMessage;function getQueueCampaignActiveStatusMessage(_0x42adac){var _0x4a3c11=CAMPAIGN_STATUS[_0xe05a('0x3e')];if(_0x42adac['originated']===0x0&&_0x42adac[_0xe05a('0x3f')]===0x0&&_0x42adac[_0xe05a('0x26')]===0x0&&(_0x42adac[_0xe05a('0x25')]||0x0)===0x0){_0x4a3c11=CAMPAIGN_STATUS[_0xe05a('0x40')];}return _0x4a3c11;}exports[_0xe05a('0x41')]=getQueueCampaignActiveStatusMessage;function extractCalleridName(_0x4d10e6){var _0x13ccff=_0x4d10e6[_0xe05a('0x42')](/"(.*?)"/);return _0x13ccff?_0x13ccff[0x1]:_0x4d10e6;}exports[_0xe05a('0x43')]=extractCalleridName;function getCallerId(_0x1f733b,_0xa75d55,_0x3d5ba9){if(!_[_0xe05a('0x44')](_0x3d5ba9)&&typeof _0x3d5ba9===_0xe05a('0x45')&&!_[_0xe05a('0x31')](_0x3d5ba9)){if(!_[_0xe05a('0x44')](_0xa75d55)&&typeof _0xa75d55===_0xe05a('0x45')&&!_['isEmpty'](_0xa75d55)){return util['format'](_0xe05a('0x46'),_0xa75d55,_0x3d5ba9);}return util['format'](_0xe05a('0x46'),_0x3d5ba9,_0x3d5ba9);}if(!_[_0xe05a('0x44')](_0x1f733b)&&typeof _0x1f733b==='string'&&!_['isEmpty'](_0x1f733b)){return _0x1f733b;}return _0xe05a('0x47');}exports[_0xe05a('0x48')]=getCallerId;function getCallerIdRandom(_0x2961cf,_0x5e192e){var _0x2c9433;var _0x48aca5;var _0x2233df;if(_0x5e192e<=0x0){_0x5e192e=0x1;}_0x2c9433=new RegExp(_0xe05a('0x49')+_0x5e192e+'}$');_0x48aca5=Math[_0xe05a('0x4a')](0xa,_0x5e192e-0x1);_0x2233df=Math[_0xe05a('0x4a')](0xa,_0x5e192e)-0x1;return util[_0xe05a('0x4b')]('%s',_['replace'](_0x2961cf,_0x2c9433,_[_0xe05a('0x4c')](_0x48aca5,_0x2233df)[_0xe05a('0x4d')]()));}exports[_0xe05a('0x4e')]=getCallerIdRandom;function decrementOriginate(_0x26b461){if(_0x26b461[_0xe05a('0x3a')]&&_0x26b461['originated']>0x0){_0x26b461[_0xe05a('0x3a')]-=0x1;}else{logger[_0xe05a('0x4f')](_0xe05a('0x50'));}}exports['decrementOriginate']=decrementOriginate;function checkContactEmpty(_0x597581){return _0x597581&&_0x597581[_0xe05a('0x51')]>0x0;}exports[_0xe05a('0x52')]=checkContactEmpty;function erlangb(_0x7d681a,_0x37217a){if(_0x37217a===0x0){return 0x0;}var _0x2ac2a1=0x1;for(var _0x4b3529=0x1;_0x4b3529<=_0x37217a;_0x4b3529+=0x1){_0x2ac2a1=0x1+_0x2ac2a1*_0x4b3529/_0x7d681a;}return 0x1/_0x2ac2a1;}exports['erlangb']=erlangb;function checkContactLowerLimitOriginate(_0x5461b9,_0x41e782,_0xce1835){if(_0x41e782>_0xce1835){for(var _0x44e04b=0x0;_0x44e04b<_0x41e782-_0xce1835;_0x44e04b+=0x1){decrementOriginate(_0x5461b9);}}}exports['checkContactLowerLimitOriginate']=checkContactLowerLimitOriginate;function setXMDContactVariables(_0x21bf52){var _0x5ed7f4={};var _0x515d24=['id','createdAt',_0xe05a('0x53'),_0xe05a('0x54')];const _0x4e500a=0xfa;if(_0x21bf52){for(var _0x552944 in _0x21bf52){if(typeof _0x21bf52[_0x552944]!=='undefined'){if(!_[_0xe05a('0x2d')](_0x21bf52[_0x552944])&&!_0x515d24[_0xe05a('0x37')](_0x552944)){if(_0x552944===_0xe05a('0x55')&&_0x21bf52[_0x552944][_0xe05a('0x51')]>_0x4e500a){_0x5ed7f4['XMD-'+_0x552944[_0xe05a('0x56')]()]=_0x21bf52[_0x552944][_0xe05a('0x4d')]()[_0xe05a('0x57')](0x0,_0x4e500a);}else{_0x5ed7f4['XMD-'+_0x552944[_0xe05a('0x56')]()]=_0x21bf52[_0x552944];}}}}}return _0x5ed7f4;}exports[_0xe05a('0x58')]=setXMDContactVariables;
\ No newline at end of file
+var _0xec95=['replace','random','error','[decrementOriginate]\x20queue\x20originate\x20value\x20is\x20negative','decrementOriginate','length','erlangb','checkContactLowerLimitOriginate','createdAt','tags','updatedAt','undefined','XMD-','toUpperCase','toString','substring','setXMDContactVariables','lodash','moment','dialer','../../../../config/environment/shared','timezones','ACTIVE','BLACKLIST','DEACTIVATED','IS_DISACTIVED','INTERVAL_IS_EMPTY','INTERVAL_IS_NULL','INTERVAL_IS_OVERTIME','GLOBAL_INTERVAL_IS_OVERTIME','RECALLINQUEUE','RECALLFAILEDTIMEOUT','RUNNING','TIMEZONE_UNKNOW','CAMPAIGN_STATUS','dialMethod','isPreviewCampaign','type','ivr','outbound','isOutboundQueue','dialActive','isQueueCampaignActive','active','isIVRCampaignActive','milliseconds','diff','seconds','getSeconds','message','available','loggedIn','loggedInDb','paused','talking','pTalking','waiting','inUse','originated','Trunk','name','hasQueueCampaignDataChanged','dialTimezone','isNil','Interval','Intervals','NULL_INTERVAL','isEmpty','dialGlobalInterval','UNKNOWN_TIMEZONE','SIP/','reachable','status','TrunkBackup','includes','INACTIVE','DISACTIVED','NO_AGENTS_LOGGED','UNREACHABLE_TRUNK','getQueueCampaignStatusMessage','extractCalleridName','string','isUndefined','format','\x22%s\x22\x20<%s>','getCallerId','pow'];(function(_0x20a584,_0xe384a5){var _0x4b41a8=function(_0x2127c6){while(--_0x2127c6){_0x20a584['push'](_0x20a584['shift']());}};_0x4b41a8(++_0xe384a5);}(_0xec95,0xbf));var _0x5ec9=function(_0x14477e,_0x44d4da){_0x14477e=_0x14477e-0x0;var _0x5d4a05=_0xec95[_0x14477e];return _0x5d4a05;};'use strict';var _=require(_0x5ec9('0x0'));var moment=require(_0x5ec9('0x1'));var util=require('util');var logger=require('../../../../config/logger')(_0x5ec9('0x2'));var timezones=require(_0x5ec9('0x3'))[_0x5ec9('0x4')];var CAMPAIGN_STATUS={'ACTIVE':_0x5ec9('0x5'),'BLACKLIST':_0x5ec9('0x6'),'CONTACTS_RESCHEDULED':'RESCHEDULED_CONTACTS','DEACTIVATED':_0x5ec9('0x7'),'DISACTIVED':_0x5ec9('0x8'),'EMPTY_INTERVAL':_0x5ec9('0x9'),'INACTIVE':'NOT_ACTIVE','NO_AGENTS_LOGGED':'AGENTS_NOT_LOGGED','NO_AVAILABLE_CONTACTS':'AVAILABLE_CONTACTS_FINISHED','NULL_INTERVAL':_0x5ec9('0xa'),'OVERTIME_INTERVAL':_0x5ec9('0xb'),'OVERTIME_GLOBAL_INTERVAL':_0x5ec9('0xc'),'QUEUE_RECALL':_0x5ec9('0xd'),'RECALL_TIMEOUT':_0x5ec9('0xe'),'RUNNING':_0x5ec9('0xf'),'UNKNOWN_TIMEZONE':_0x5ec9('0x10'),'UNREACHABLE_TRUNK':'TRUNK_IS_NOT_REACHABLE'};exports[_0x5ec9('0x11')]=CAMPAIGN_STATUS;function isPreviewCampaign(_0x243329){return _0x243329[_0x5ec9('0x12')]==='preview';}exports[_0x5ec9('0x13')]=isPreviewCampaign;function isIVRCampaign(_0x517faa){return _0x517faa[_0x5ec9('0x14')]===_0x5ec9('0x15');}exports['isIVRCampaign']=isIVRCampaign;function isOutboundQueue(_0x323363){return _0x323363[_0x5ec9('0x14')]===_0x5ec9('0x16');}exports[_0x5ec9('0x17')]=isOutboundQueue;function isQueueCampaignActive(_0x108c18){return _0x108c18[_0x5ec9('0x18')];}exports[_0x5ec9('0x19')]=isQueueCampaignActive;function isIVRCampaignActive(_0x5e90e0){return _0x5e90e0[_0x5ec9('0x1a')];}exports[_0x5ec9('0x1b')]=isIVRCampaignActive;function getSeconds(_0x245bd2,_0x3b5796){var _0x283ab6=moment(_0x245bd2)[_0x5ec9('0x1c')](0x0);var _0x4d04e7=moment(_0x3b5796)[_0x5ec9('0x1c')](0x0);return _0x283ab6[_0x5ec9('0x1d')](_0x4d04e7,_0x5ec9('0x1e'));}exports[_0x5ec9('0x1f')]=getSeconds;function hasQueueCampaignDataChanged(_0x5a606e,_0x4e83c3){var _0x376de1=![];var _0x2a409c=_0x5a606e[_0x5ec9('0x12')]!==_0x4e83c3[_0x5ec9('0x12')]||_0x5a606e[_0x5ec9('0x18')]!==_0x4e83c3[_0x5ec9('0x18')]||_0x5a606e[_0x5ec9('0x20')]!==_0x4e83c3[_0x5ec9('0x20')];var _0x3b4c7d=_0x5a606e[_0x5ec9('0x21')]!==_0x4e83c3[_0x5ec9('0x21')]||_0x5a606e['loggedIn']!==_0x4e83c3[_0x5ec9('0x22')]||_0x5a606e[_0x5ec9('0x23')]!==_0x4e83c3[_0x5ec9('0x23')]||_0x5a606e['paused']!==_0x4e83c3[_0x5ec9('0x24')]||_0x5a606e[_0x5ec9('0x25')]!==_0x4e83c3[_0x5ec9('0x25')]||_0x5a606e[_0x5ec9('0x26')]!==_0x4e83c3['pTalking']||_0x5a606e[_0x5ec9('0x27')]!==_0x4e83c3[_0x5ec9('0x27')]||_0x5a606e[_0x5ec9('0x28')]!==_0x4e83c3['inUse']||_0x5a606e[_0x5ec9('0x29')]!==_0x4e83c3[_0x5ec9('0x29')];if(_0x5a606e[_0x5ec9('0x2a')]&&_0x4e83c3[_0x5ec9('0x2a')]){_0x376de1=_0x5a606e[_0x5ec9('0x2a')][_0x5ec9('0x2b')]!==_0x4e83c3[_0x5ec9('0x2a')][_0x5ec9('0x2b')]||_0x5a606e['Trunk']['active']!==_0x4e83c3[_0x5ec9('0x2a')][_0x5ec9('0x1a')];}return _0x2a409c||_0x3b4c7d||_0x376de1;}exports[_0x5ec9('0x2c')]=hasQueueCampaignDataChanged;function checkAnyValidQueueCampaignInterval(_0x4c4c3f){var _0x3c7345=null;var _0x24f161=_0x4c4c3f[_0x5ec9('0x2d')];if(_[_0x5ec9('0x2e')](_0x4c4c3f['dialGlobalInterval'])||_[_0x5ec9('0x2e')](_0x4c4c3f['Interval'])||_[_0x5ec9('0x2e')](_0x4c4c3f[_0x5ec9('0x2f')][_0x5ec9('0x30')])){_0x3c7345=CAMPAIGN_STATUS[_0x5ec9('0x31')];}else if(_[_0x5ec9('0x32')](_0x4c4c3f[_0x5ec9('0x33')])||_[_0x5ec9('0x32')](_0x4c4c3f['Interval'][_0x5ec9('0x30')])){_0x3c7345=CAMPAIGN_STATUS['EMPTY_INTERVAL'];}else if(_0x24f161&&!timezones[_0x24f161]){_0x3c7345=CAMPAIGN_STATUS[_0x5ec9('0x34')];}return _0x3c7345;}function checkAnyValidTrunk(_0x1562fb,_0x44517b){var _0x22fb45=null;var _0x109051=_0x5ec9('0x35');var _0x33039a=[_0x5ec9('0x36'),'unmonitored'];var _0x138b7b=!![];if(_0x1562fb[_0x5ec9('0x2a')]&&_0x1562fb[_0x5ec9('0x2a')]['active']){_0x109051+=_0x1562fb[_0x5ec9('0x2a')][_0x5ec9('0x2b')];_0x22fb45=_0x44517b[_0x109051];_0x138b7b=_0x33039a['includes'](_0x22fb45[_0x5ec9('0x37')]);}else if(_0x1562fb[_0x5ec9('0x38')]&&_0x1562fb[_0x5ec9('0x38')]['active']){_0x109051+=_0x1562fb[_0x5ec9('0x38')][_0x5ec9('0x2b')];_0x22fb45=_0x44517b[_0x109051];_0x138b7b=_0x33039a[_0x5ec9('0x39')](_0x22fb45[_0x5ec9('0x37')]);}return _0x138b7b;}function getQueueCampaignStatusMessage(_0x21a277,_0x1b13ed){var _0x9e2857=CAMPAIGN_STATUS[_0x5ec9('0x5')];var _0xbd8ff3=isPreviewCampaign(_0x21a277);if(!isQueueCampaignActive(_0x21a277)){if(_0xbd8ff3){_0x9e2857=CAMPAIGN_STATUS[_0x5ec9('0x3a')];}else{if(_0x21a277[_0x5ec9('0x29')]===0x0&&_0x21a277[_0x5ec9('0x25')]===0x0&&_0x21a277['waiting']===0x0&&(_0x21a277['pTalking']||0x0)===0x0){_0x9e2857=CAMPAIGN_STATUS['INACTIVE'];}else{_0x9e2857=CAMPAIGN_STATUS[_0x5ec9('0x3b')];}}}else if(_0x21a277['loggedIn']===0x0){_0x9e2857=CAMPAIGN_STATUS[_0x5ec9('0x3c')];}else if(!checkAnyValidTrunk(_0x21a277,_0x1b13ed)){_0x9e2857=CAMPAIGN_STATUS[_0x5ec9('0x3d')];}else if(!isPreviewCampaign(_0x21a277)){var _0x22e178=checkAnyValidQueueCampaignInterval(_0x21a277);if(_0x22e178){_0x9e2857=_0x22e178;}}return _0x9e2857;}exports[_0x5ec9('0x3e')]=getQueueCampaignStatusMessage;function getQueueCampaignActiveStatusMessage(_0x9d7d9e){var _0x272560=CAMPAIGN_STATUS[_0x5ec9('0x3b')];if(_0x9d7d9e[_0x5ec9('0x29')]===0x0&&_0x9d7d9e[_0x5ec9('0x25')]===0x0&&_0x9d7d9e[_0x5ec9('0x27')]===0x0&&(_0x9d7d9e[_0x5ec9('0x26')]||0x0)===0x0){_0x272560=CAMPAIGN_STATUS[_0x5ec9('0x3a')];}return _0x272560;}exports['getQueueCampaignActiveStatusMessage']=getQueueCampaignActiveStatusMessage;function extractCalleridName(_0x497f60){var _0x36a5a0=_0x497f60['match'](/"(.*?)"/);return _0x36a5a0?_0x36a5a0[0x1]:_0x497f60;}exports[_0x5ec9('0x3f')]=extractCalleridName;function getCallerId(_0x127dbc,_0x2d753a,_0x278cc2){if(!_['isUndefined'](_0x278cc2)&&typeof _0x278cc2===_0x5ec9('0x40')&&!_[_0x5ec9('0x32')](_0x278cc2)){if(!_[_0x5ec9('0x41')](_0x2d753a)&&typeof _0x2d753a===_0x5ec9('0x40')&&!_[_0x5ec9('0x32')](_0x2d753a)){return util[_0x5ec9('0x42')](_0x5ec9('0x43'),_0x2d753a,_0x278cc2);}return util[_0x5ec9('0x42')](_0x5ec9('0x43'),_0x278cc2,_0x278cc2);}if(!_[_0x5ec9('0x41')](_0x127dbc)&&typeof _0x127dbc===_0x5ec9('0x40')&&!_[_0x5ec9('0x32')](_0x127dbc)){return _0x127dbc;}return'\x22\x22\x20<>';}exports[_0x5ec9('0x44')]=getCallerId;function getCallerIdRandom(_0x5043df,_0x5c89de){var _0x59646d;var _0x57fd0e;var _0x3f16f1;if(_0x5c89de<=0x0){_0x5c89de=0x1;}_0x59646d=new RegExp('\x5cw{0,'+_0x5c89de+'}$');_0x57fd0e=Math[_0x5ec9('0x45')](0xa,_0x5c89de-0x1);_0x3f16f1=Math[_0x5ec9('0x45')](0xa,_0x5c89de)-0x1;return util[_0x5ec9('0x42')]('%s',_[_0x5ec9('0x46')](_0x5043df,_0x59646d,_[_0x5ec9('0x47')](_0x57fd0e,_0x3f16f1)['toString']()));}exports['getCallerIdRandom']=getCallerIdRandom;function decrementOriginate(_0x21b780){if(_0x21b780[_0x5ec9('0x29')]&&_0x21b780['originated']>0x0){_0x21b780['originated']-=0x1;}else{logger[_0x5ec9('0x48')](_0x5ec9('0x49'));}}exports[_0x5ec9('0x4a')]=decrementOriginate;function checkContactEmpty(_0x594a6a){return _0x594a6a&&_0x594a6a[_0x5ec9('0x4b')]>0x0;}exports['checkContactEmpty']=checkContactEmpty;function erlangb(_0x51c4d1,_0x473f0d){if(_0x473f0d===0x0){return 0x0;}var _0x3587ee=0x1;for(var _0xfbde62=0x1;_0xfbde62<=_0x473f0d;_0xfbde62+=0x1){_0x3587ee=0x1+_0x3587ee*_0xfbde62/_0x51c4d1;}return 0x1/_0x3587ee;}exports[_0x5ec9('0x4c')]=erlangb;function checkContactLowerLimitOriginate(_0x49d17b,_0x26edab,_0x4a39ea){if(_0x26edab>_0x4a39ea){for(var _0x1f838f=0x0;_0x1f838f<_0x26edab-_0x4a39ea;_0x1f838f+=0x1){decrementOriginate(_0x49d17b);}}}exports[_0x5ec9('0x4d')]=checkContactLowerLimitOriginate;function setXMDContactVariables(_0x2fd0f4){var _0x17a2e6={};var _0x1c86c9=['id',_0x5ec9('0x4e'),_0x5ec9('0x4f'),_0x5ec9('0x50')];const _0xb2fc01=0xfa;if(_0x2fd0f4){for(var _0x227055 in _0x2fd0f4){if(typeof _0x2fd0f4[_0x227055]!==_0x5ec9('0x51')){if(!_[_0x5ec9('0x2e')](_0x2fd0f4[_0x227055])&&!_0x1c86c9[_0x5ec9('0x39')](_0x227055)){if(_0x227055==='description'&&_0x2fd0f4[_0x227055][_0x5ec9('0x4b')]>_0xb2fc01){_0x17a2e6[_0x5ec9('0x52')+_0x227055[_0x5ec9('0x53')]()]=_0x2fd0f4[_0x227055][_0x5ec9('0x54')]()[_0x5ec9('0x55')](0x0,_0xb2fc01);}else{_0x17a2e6[_0x5ec9('0x52')+_0x227055['toUpperCase']()]=_0x2fd0f4[_0x227055];}}}}}return _0x17a2e6;}exports[_0x5ec9('0x56')]=setXMDContactVariables;
\ No newline at end of file
index 2d787ef..958e711 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['fax','localstationid','path','AttachmentId','exports','util','lodash','moment','channel','format','%s/%s/%s','tech','Trunk'];(function(_0x400f7c,_0x2f7975){var _0x1917c1=function(_0x243904){while(--_0x243904){_0x400f7c['push'](_0x400f7c['shift']());}};_0x1917c1(++_0x2f7975);}(_0xa9e0,0x123));var _0x0a9e=function(_0x55f8b4,_0x43f30d){_0x55f8b4=_0x55f8b4-0x0;var _0x2475f9=_0xa9e0[_0x55f8b4];return _0x2475f9;};'use strict';var util=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));function Action(_0x5dd881,_0x550fbc,_0x18d5c9){this['uniqueid']=_0x5dd881||undefined;this[_0x0a9e('0x3')]=util[_0x0a9e('0x4')](_0x0a9e('0x5'),_0x550fbc[_0x0a9e('0x6')],_0x550fbc[_0x0a9e('0x7')]['name'],_0x18d5c9[_0x0a9e('0x8')]);this[_0x0a9e('0x9')]=_0x550fbc[_0x0a9e('0x9')];this['headerinfo']=_0x550fbc['headerinfo'];this[_0x0a9e('0xa')]=_0x18d5c9['path'];this['AttachmentId']=_0x18d5c9[_0x0a9e('0xb')];}module[_0x0a9e('0xc')]=Action;
\ No newline at end of file
+var _0xa9e0=['fax','localstationid','path','AttachmentId','exports','util','lodash','moment','channel','format','%s/%s/%s','tech','Trunk'];(function(_0x7c1e9c,_0x2d1adf){var _0x16d193=function(_0x1e6cfb){while(--_0x1e6cfb){_0x7c1e9c['push'](_0x7c1e9c['shift']());}};_0x16d193(++_0x2d1adf);}(_0xa9e0,0x123));var _0x0a9e=function(_0xbe200f,_0x4b50eb){_0xbe200f=_0xbe200f-0x0;var _0x192597=_0xa9e0[_0xbe200f];return _0x192597;};'use strict';var util=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var moment=require(_0x0a9e('0x2'));function Action(_0x5dd881,_0x550fbc,_0x18d5c9){this['uniqueid']=_0x5dd881||undefined;this[_0x0a9e('0x3')]=util[_0x0a9e('0x4')](_0x0a9e('0x5'),_0x550fbc[_0x0a9e('0x6')],_0x550fbc[_0x0a9e('0x7')]['name'],_0x18d5c9[_0x0a9e('0x8')]);this[_0x0a9e('0x9')]=_0x550fbc[_0x0a9e('0x9')];this['headerinfo']=_0x550fbc['headerinfo'];this[_0x0a9e('0xa')]=_0x18d5c9['path'];this['AttachmentId']=_0x18d5c9[_0x0a9e('0xb')];}module[_0x0a9e('0xc')]=Action;
\ No newline at end of file
index 39dc87f..4ceb6a7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe073=['channels','faxAccounts','trunks','actions','newchannel','bind','syncVarSet','newstate','syncNewState','newexten','syncNewExten','faxstatus','syncFaxStatus','receivefax','syncReceiveFax','hangup','originateresponse','syncOriginateResponse','prototype','from-voip-provider','hasOwnProperty','exten','localstationid','uniqueid','channel','name','info','\x20syncNewchannel\x20','variable','value','channelstate','channelstatedesc','operation','status','filename','\x20syncFaxStatus\x20','remotestationid','pagestransferred','resolution','transferrate','calleridnum','/var/opt/motion2/server/files/attachments/','message','create','parse','.pdf','application/pdf','then','catch','\x20notify\x20','error','\x20receiveFax\x20','stringify','merge','response','AttachmentId','update','SENDING\x20FAILED\x20','logger','[Fax][Message][Error][Updated]','[Fax][Message][Error][NoUpdate1]','[Fax][Message][Error][NoUpdate2]','updateStatus','finally','syncHangup','\x20hangup\x20faxRiceive\x20','SUCCESS','faxstatusstring','SENDING\x20FAILED:\x20','SENDING\x20FAILED','execOriginate','[Fax][execOriginate][success]','[Fax][execOriginate][failure]','Fax\x20failed','checkAfterSend','checkTrunk','FaxAccountId','Trunk','isValid','format','gs\x20-q\x20-dNOPAUSE\x20-dBATCH\x20-sDEVICE=tiffg4\x20-sPAPERSIZE=letter\x20-sOutputFile=/var/opt/motion2/server/files/attachments/%s.tif\x20\x20%s\x20-c\x20quit','execute','dir','XMF-PATH','Convert\x20pdf\x20to\x20tif','Action','variablesAction','addVariables','ext','isTrunkReachable','isNil','active','SIP/%s','reachable','\x20Trunk\x20is\x20not\x20active','Trunk\x20not\x20working\x20correctly','[Fax][checkTrunk][Empty\x20path]','Empty\x20path','exports','util','uuid','moment','path','tiff2pdf','../../../config/logger','fax','../ami','./rpcDb','./channel','./util/util','./action','../rpc/faxAccount','../rpc/attachment'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0xe073,0x1b6));var _0x3e07=function(_0x3292d2,_0x44ca80){_0x3292d2=_0x3292d2-0x0;var _0x2b6be4=_0xe073[_0x3292d2];return _0x2b6be4;};'use strict';var util=require(_0x3e07('0x0'));var _=require('lodash');var BPromise=require('bluebird');var uuid=require(_0x3e07('0x1'));var moment=require(_0x3e07('0x2'));var path=require(_0x3e07('0x3'));var tiff2pdf=require(_0x3e07('0x4'));var gs=require('./util/gs');var logger=require(_0x3e07('0x5'))(_0x3e07('0x6'));var ami=require(_0x3e07('0x7'));var rpcDb=require(_0x3e07('0x8'));var Channel=require(_0x3e07('0x9'));var ut=require(_0x3e07('0xa'));var Action=require(_0x3e07('0xb'));var faxAccount=require(_0x3e07('0xc'));var attachment=require(_0x3e07('0xd'));var faxMessage=require('../rpc/faxMessage');function Fax(_0xc85504){this[_0x3e07('0xe')]={};this['faxAccounts']=_0xc85504[_0x3e07('0xf')];this[_0x3e07('0x10')]=_0xc85504['trunks'];this[_0x3e07('0x11')]={};ami['on'](_0x3e07('0x12'),this['syncNewchannel'][_0x3e07('0x13')](this));ami['on']('varset',this[_0x3e07('0x14')][_0x3e07('0x13')](this));ami['on'](_0x3e07('0x15'),this[_0x3e07('0x16')][_0x3e07('0x13')](this));ami['on'](_0x3e07('0x17'),this[_0x3e07('0x18')][_0x3e07('0x13')](this));ami['on'](_0x3e07('0x19'),this[_0x3e07('0x1a')][_0x3e07('0x13')](this));ami['on'](_0x3e07('0x1b'),this[_0x3e07('0x1c')][_0x3e07('0x13')](this));ami['on'](_0x3e07('0x1d'),this['syncHangup']['bind'](this));ami['on'](_0x3e07('0x1e'),this[_0x3e07('0x1f')][_0x3e07('0x13')](this));}Fax[_0x3e07('0x20')]['syncNewchannel']=function(_0x500e33){if(_0x500e33['context']===_0x3e07('0x21')){for(var _0x3f5993 in this[_0x3e07('0xf')]){if(this[_0x3e07('0xf')][_0x3e07('0x22')](_0x3f5993)){if(_0x500e33[_0x3e07('0x23')]===this[_0x3e07('0xf')][_0x3f5993][_0x3e07('0x24')]){this[_0x3e07('0xe')][_0x500e33[_0x3e07('0x25')]]={};this[_0x3e07('0xe')][_0x500e33['uniqueid']]['channel']=_0x500e33[_0x3e07('0x26')];this[_0x3e07('0xe')][_0x500e33['uniqueid']]['id']=this['faxAccounts'][_0x3f5993]['id'];this[_0x3e07('0xe')][_0x500e33['uniqueid']][_0x3e07('0x27')]=this[_0x3e07('0xf')][_0x3f5993]['name'];logger[_0x3e07('0x28')](_0x500e33[_0x3e07('0x25')],_0x3e07('0x29'));}}}}if(this['actions'][_0x500e33[_0x3e07('0x25')]]){this[_0x3e07('0xe')][_0x500e33[_0x3e07('0x25')]]={};this[_0x3e07('0xe')][_0x500e33[_0x3e07('0x25')]]['channel']=_0x500e33[_0x3e07('0x26')];logger[_0x3e07('0x28')](_0x500e33[_0x3e07('0x25')],_0x3e07('0x29'));}};Fax[_0x3e07('0x20')][_0x3e07('0x14')]=function(_0x1388c5){if(this[_0x3e07('0xe')][_0x1388c5[_0x3e07('0x25')]]){for(var _0x555b6b in _0x1388c5[_0x3e07('0x2a')]){if(_0x1388c5[_0x3e07('0x2a')]['hasOwnProperty'](_0x555b6b)){this['channels'][_0x1388c5[_0x3e07('0x25')]][_0x555b6b]=_0x1388c5[_0x3e07('0x2b')];}}}};Fax['prototype']['syncNewState']=function(_0x3a223e){if(this[_0x3e07('0xe')][_0x3a223e[_0x3e07('0x25')]]){this[_0x3e07('0xe')][_0x3a223e[_0x3e07('0x25')]][_0x3e07('0x2c')]=_0x3a223e[_0x3e07('0x2c')];this[_0x3e07('0xe')][_0x3a223e[_0x3e07('0x25')]][_0x3e07('0x2d')]=_0x3a223e[_0x3e07('0x2d')];}};Fax[_0x3e07('0x20')][_0x3e07('0x18')]=function(_0x58a2cc){if(this[_0x3e07('0xe')][_0x58a2cc[_0x3e07('0x25')]]){for(var _0x1cbbcd in _0x58a2cc['variable']){if(_0x58a2cc[_0x3e07('0x2a')][_0x3e07('0x22')](_0x1cbbcd)){this['channels'][_0x58a2cc['uniqueid']][_0x1cbbcd]=_0x58a2cc[_0x3e07('0x2b')];}}}};Fax[_0x3e07('0x20')][_0x3e07('0x1a')]=function(_0xcd78c3){if(this['channels'][_0xcd78c3[_0x3e07('0x25')]]){this[_0x3e07('0xe')][_0xcd78c3['uniqueid']]['operation']=_0xcd78c3[_0x3e07('0x2e')];this['channels'][_0xcd78c3[_0x3e07('0x25')]][_0x3e07('0x2f')]=_0xcd78c3['status'];this[_0x3e07('0xe')][_0xcd78c3[_0x3e07('0x25')]][_0x3e07('0x24')]=_0xcd78c3['localstationid'];this[_0x3e07('0xe')][_0xcd78c3[_0x3e07('0x25')]][_0x3e07('0x30')]=_0xcd78c3['filename'];logger[_0x3e07('0x28')](_0xcd78c3[_0x3e07('0x25')],_0x3e07('0x31'));}};Fax[_0x3e07('0x20')][_0x3e07('0x1c')]=function(_0x28b58a){var _0x510fd5=this;if(this[_0x3e07('0xe')][_0x28b58a['uniqueid']]){var _0x2e12ba=this[_0x3e07('0xe')][_0x28b58a[_0x3e07('0x25')]]['id'];this[_0x3e07('0xe')][_0x28b58a['uniqueid']]['remotestationid']=_0x28b58a[_0x3e07('0x32')];this['channels'][_0x28b58a[_0x3e07('0x25')]][_0x3e07('0x33')]=_0x28b58a['pagestransferred'];this['channels'][_0x28b58a[_0x3e07('0x25')]][_0x3e07('0x24')]=_0x28b58a[_0x3e07('0x24')];this[_0x3e07('0xe')][_0x28b58a[_0x3e07('0x25')]][_0x3e07('0x34')]=_0x28b58a['resolution'];this[_0x3e07('0xe')][_0x28b58a[_0x3e07('0x25')]][_0x3e07('0x35')]=_0x28b58a[_0x3e07('0x35')];this['channels'][_0x28b58a[_0x3e07('0x25')]][_0x3e07('0x30')]=_0x28b58a[_0x3e07('0x30')];this['channels'][_0x28b58a['uniqueid']][_0x3e07('0x36')]=_0x28b58a[_0x3e07('0x36')];if(this[_0x3e07('0xe')][_0x28b58a[_0x3e07('0x25')]][_0x3e07('0x33')]>0x0){tiff2pdf(_0x28b58a['filename'],_0x3e07('0x37'),function(_0xd5f0cc){logger[_0x3e07('0x28')](_0x28b58a[_0x3e07('0x25')],'\x20result\x20conversion\x20file\x20',_0xd5f0cc[_0x3e07('0x38')]);attachment[_0x3e07('0x39')]({'name':path[_0x3e07('0x3a')](_0x28b58a[_0x3e07('0x30')])[_0x3e07('0x27')],'basename':path[_0x3e07('0x3a')](_0x28b58a[_0x3e07('0x30')])[_0x3e07('0x27')]+_0x3e07('0x3b'),'type':_0x3e07('0x3c')})[_0x3e07('0x3d')](function(_0x1bc778){faxAccount['notify'](_0x2e12ba,{'from':_0x28b58a[_0x3e07('0x36')],'mapKey':'fax','body':path[_0x3e07('0x3a')](_0x28b58a[_0x3e07('0x30')])[_0x3e07('0x27')]+_0x3e07('0x3b'),'AttachmentId':_0x1bc778['id']})[_0x3e07('0x3e')](function(_0x3baba2){logger['error'](_0x28b58a[_0x3e07('0x25')],_0x3e07('0x3f'),JSON['stringify'](_0x3baba2));});})[_0x3e07('0x3e')](function(_0x1beeea){logger[_0x3e07('0x40')](_0x28b58a['uniqueid'],_0x3e07('0x41'),JSON[_0x3e07('0x42')](_0x1beeea));});});}logger[_0x3e07('0x28')](_0x28b58a[_0x3e07('0x25')],_0x3e07('0x41'));}};Fax[_0x3e07('0x20')][_0x3e07('0x1f')]=function(_0x47bdf4){if(this[_0x3e07('0x11')][_0x47bdf4['uniqueid']]){_[_0x3e07('0x43')](this['channels'][_0x47bdf4['uniqueid']],_['pick'](_0x47bdf4,[_0x3e07('0x44'),'reason']));}};function updateStatus(_0x47d743){if(_0x47d743[_0x3e07('0x45')]){faxMessage[_0x3e07('0x46')](_0x47d743[_0x3e07('0x45')],{'failMessage':_0x3e07('0x47')})[_0x3e07('0x3d')](function(_0x4b5f47){ut[_0x3e07('0x48')](_0x3e07('0x49'),_0x4b5f47);})[_0x3e07('0x3e')](function(_0x99c1d8){ut[_0x3e07('0x48')](_0x3e07('0x4a'),_0x99c1d8);});}else{ut[_0x3e07('0x48')](_0x3e07('0x4b'));}}Fax[_0x3e07('0x20')][_0x3e07('0x4c')]=function(_0x4cb847,_0x3d050,_0x5312d0){var _0x508bf9=this;var _0x36d85c={};if(_0x3d050){_0x36d85c={'read':_0x3d050};}else{_0x36d85c={'failMessage':_0x5312d0};}if(this[_0x3e07('0x11')][_0x4cb847]['AttachmentId']){faxMessage[_0x3e07('0x46')](this[_0x3e07('0x11')][_0x4cb847][_0x3e07('0x45')],_0x36d85c)[_0x3e07('0x3d')](function(_0x282242){ut[_0x3e07('0x48')]('[Fax][Message][Updated]',_0x282242);})[_0x3e07('0x3e')](function(_0x5f2d8b){ut[_0x3e07('0x48')]('[Fax][Message][NoUpdate1]',_0x5f2d8b);})[_0x3e07('0x4d')](function(){delete _0x508bf9[_0x3e07('0xe')][_0x4cb847];delete _0x508bf9[_0x3e07('0x11')][_0x4cb847];});}else{ut[_0x3e07('0x48')]('[Fax][Message][NoUpdate2]');delete this[_0x3e07('0xe')][_0x4cb847];delete this[_0x3e07('0x11')][_0x4cb847];}};Fax[_0x3e07('0x20')][_0x3e07('0x4e')]=function(_0x1b4dfa){var _0x5ecfa8=this;if(this['channels'][_0x1b4dfa['uniqueid']]){if(this['actions'][_0x1b4dfa['uniqueid']]){this['channels'][_0x1b4dfa['uniqueid']]['id']=this[_0x3e07('0x11')][_0x1b4dfa['uniqueid']]['id'];this['channels'][_0x1b4dfa[_0x3e07('0x25')]][_0x3e07('0x27')]=this[_0x3e07('0x11')][_0x1b4dfa['uniqueid']][_0x3e07('0x27')];}logger[_0x3e07('0x28')](_0x1b4dfa[_0x3e07('0x25')],this[_0x3e07('0x11')][_0x1b4dfa[_0x3e07('0x25')]]?'\x20hangup\x20sendFile\x20':_0x3e07('0x4f'),JSON[_0x3e07('0x42')](this[_0x3e07('0xe')][_0x1b4dfa[_0x3e07('0x25')]]));if(this[_0x3e07('0x11')][_0x1b4dfa[_0x3e07('0x25')]]){if(this[_0x3e07('0xe')][_0x1b4dfa[_0x3e07('0x25')]]['faxpages']>0x0&&this[_0x3e07('0xe')][_0x1b4dfa[_0x3e07('0x25')]]['faxstatus']===_0x3e07('0x50')){this[_0x3e07('0x4c')](_0x1b4dfa['uniqueid'],!![]);}else{this[_0x3e07('0x4c')](_0x1b4dfa['uniqueid'],![],this[_0x3e07('0xe')][_0x1b4dfa[_0x3e07('0x25')]][_0x3e07('0x51')]?_0x3e07('0x52')+this[_0x3e07('0xe')][_0x1b4dfa['uniqueid']][_0x3e07('0x51')]:_0x3e07('0x53'));}}}};Fax[_0x3e07('0x20')]['send']=function(_0x34f59a){var _0x2e256c=this;return new BPromise(function(_0x3dc0c2,_0x3e0deb){_0x2e256c[_0x3e07('0x54')](_0x34f59a,_0x2e256c[_0x3e07('0xf')][_0x34f59a['FaxAccountId']])[_0x3e07('0x3d')](function(_0x1b0d6a){ut[_0x3e07('0x48')](_0x3e07('0x55'),_0x1b0d6a);_0x3dc0c2(ut['message']('Fax\x20received'));})[_0x3e07('0x3e')](function(_0x1a198c){ut[_0x3e07('0x48')](_0x3e07('0x56'),_0x1a198c);updateStatus(_0x34f59a);_0x3e0deb(ut[_0x3e07('0x38')](_0x3e07('0x57')));});});};Fax[_0x3e07('0x20')][_0x3e07('0x58')]=function(_0x200d57){var _0x51f434=this;return new BPromise(function(_0x171c02,_0x560326){var _0x55ed7d=_0x51f434[_0x3e07('0x59')](_0x51f434['faxAccounts'][_0x200d57[_0x3e07('0x5a')]][_0x3e07('0x5b')],_0x200d57);if(_0x55ed7d[_0x3e07('0x5c')]){_0x171c02(ut[_0x3e07('0x38')]('Trunk\x20Reachable'));}else{_0x560326(ut[_0x3e07('0x38')](_0x55ed7d[_0x3e07('0x38')]));}});};function originate(_0x529330,_0x39ef95,_0x8fc858){return new BPromise(function(_0x2f9c95,_0x31a168){if(_0x8fc858){var _0xe8f1dc=util[_0x3e07('0x5d')](_0x3e07('0x5e'),path[_0x3e07('0x3a')](_0x529330[_0x3e07('0x3')])['name'],_0x529330[_0x3e07('0x3')]);gs[_0x3e07('0x5f')](_0xe8f1dc)['then'](function(){_0x529330[_0x3e07('0x3')]=util[_0x3e07('0x5d')]('%s/%s.tif',path[_0x3e07('0x3a')](_0x529330['path'])[_0x3e07('0x60')],path['parse'](_0x529330['path'])[_0x3e07('0x27')]);_0x39ef95[_0x3e07('0x61')]=_0x529330[_0x3e07('0x3')];ut['logger'](_0x3e07('0x62'),'');ami[_0x3e07('0x63')](ut[_0x3e07('0x64')](_0x529330,_0x39ef95))[_0x3e07('0x3d')](function(_0x26a0ee){_0x2f9c95(_0x26a0ee);})['catch'](function(_0xee3e58){_0x31a168(_0xee3e58);});})[_0x3e07('0x3e')](function(_0x572836){_0x31a168(_0x572836);});}else{ami['Action'](ut['variablesAction'](_0x529330,_0x39ef95))[_0x3e07('0x3d')](function(_0x54508a){_0x2f9c95(_0x54508a);})[_0x3e07('0x3e')](function(_0x1f7015){_0x31a168(_0x1f7015);});}});}Fax[_0x3e07('0x20')][_0x3e07('0x54')]=function(_0x15d483,_0x3ac181){var _0x537522=this;return new BPromise(function(_0x39d925,_0x5ec882){var _0x5c030b=uuid['v4']();var _0x52de81=ut[_0x3e07('0x65')](_0x15d483,_0x3ac181);_0x537522[_0x3e07('0x11')][_0x5c030b]=new Action(_0x5c030b,_0x3ac181,_0x15d483);var _0x354d96=_0x537522['actions'][_0x5c030b];if(path[_0x3e07('0x3a')](_0x15d483[_0x3e07('0x3')])[_0x3e07('0x66')]===_0x3e07('0x3b')){originate(_0x354d96,_0x52de81,!![])['then'](function(_0x5b94fd){_0x39d925(_0x5b94fd);})['catch'](function(_0x4bfb75){_0x5ec882(_0x4bfb75);});}else{originate(_0x354d96,_0x52de81,![])[_0x3e07('0x3d')](function(_0x279c97){_0x39d925(_0x279c97);})[_0x3e07('0x3e')](function(_0x1b9484){_0x5ec882(_0x1b9484);});}});};Fax[_0x3e07('0x20')][_0x3e07('0x67')]=function(_0x4991cf){return!_[_0x3e07('0x68')](_0x4991cf)&&!_[_0x3e07('0x68')](_0x4991cf[_0x3e07('0x27')])&&!_[_0x3e07('0x68')](_0x4991cf[_0x3e07('0x69')])&&_0x4991cf[_0x3e07('0x69')]&&!_[_0x3e07('0x68')](this[_0x3e07('0x10')][util[_0x3e07('0x5d')](_0x3e07('0x6a'),_0x4991cf[_0x3e07('0x27')])])&&!_[_0x3e07('0x68')](this[_0x3e07('0x10')][util[_0x3e07('0x5d')](_0x3e07('0x6a'),_0x4991cf[_0x3e07('0x27')])][_0x3e07('0x2f')])&&(this[_0x3e07('0x10')][util['format'](_0x3e07('0x6a'),_0x4991cf[_0x3e07('0x27')])][_0x3e07('0x2f')]===_0x3e07('0x6b')||this[_0x3e07('0x10')][util[_0x3e07('0x5d')]('SIP/%s',_0x4991cf[_0x3e07('0x27')])][_0x3e07('0x2f')]==='unmonitored');};Fax[_0x3e07('0x20')][_0x3e07('0x59')]=function(_0x469763,_0x4187b5){if(!this[_0x3e07('0x67')](_0x469763)){ut[_0x3e07('0x48')]('[Fax][checkTrunk][Trunk\x20not\x20working\x20correctly]',_[_0x3e07('0x68')](_0x469763)?'':_0x469763[_0x3e07('0x27')]+_0x3e07('0x6c'));return{'isValid':![],'message':_0x3e07('0x6d')};}if(_[_0x3e07('0x68')](_0x4187b5[_0x3e07('0x6')])){ut['logger']('[Fax][checkTrunk][Empty\x20Fax]',JSON['stringify'](_0x4187b5));return{'isValid':![],'message':'Empty\x20Fax'};}if(_[_0x3e07('0x68')](_0x4187b5[_0x3e07('0x3')])){ut[_0x3e07('0x48')](_0x3e07('0x6e'),JSON['stringify'](_0x4187b5));return{'isValid':![],'message':_0x3e07('0x6f')};}return{'isValid':!![],'message':'Is\x20Valid'};};module[_0x3e07('0x70')]=Fax;
\ No newline at end of file
+var _0x0b98=['format','gs\x20-q\x20-dNOPAUSE\x20-dBATCH\x20-sDEVICE=tiffg4\x20-sPAPERSIZE=letter\x20-sOutputFile=/var/opt/motion2/server/files/attachments/%s.tif\x20\x20%s\x20-c\x20quit','execute','%s/%s.tif','XMF-PATH','Convert\x20pdf\x20to\x20tif','Action','variablesAction','execOriginate','addVariables','ext','isNil','active','SIP/%s','reachable','unmonitored','checkTrunk','isTrunkReachable','\x20Trunk\x20is\x20not\x20active','Trunk\x20not\x20working\x20correctly','[Fax][checkTrunk][Empty\x20Fax]','[Fax][checkTrunk][Empty\x20path]','Empty\x20path','Is\x20Valid','exports','util','lodash','uuid','path','tiff2pdf','./util/gs','../ami','./rpcDb','./channel','./util/util','./action','../rpc/faxAccount','../rpc/faxMessage','faxAccounts','trunks','newchannel','syncNewchannel','bind','syncVarSet','newstate','syncNewState','newexten','syncNewExten','faxstatus','syncFaxStatus','receivefax','syncReceiveFax','hangup','syncHangup','originateresponse','syncOriginateResponse','prototype','context','hasOwnProperty','exten','localstationid','uniqueid','channels','name','info','\x20syncNewchannel\x20','actions','channel','variable','value','channelstate','channelstatedesc','operation','status','filename','\x20syncFaxStatus\x20','remotestationid','pagestransferred','resolution','transferrate','\x20result\x20conversion\x20file\x20','parse','.pdf','application/pdf','then','notify','calleridnum','fax','stringify','catch','error','\x20receiveFax\x20','merge','pick','response','reason','AttachmentId','update','SENDING\x20FAILED\x20','logger','[Fax][Message][Error][Updated]','[Fax][Message][Error][NoUpdate1]','[Fax][Message][Error][NoUpdate2]','[Fax][Message][NoUpdate1]','[Fax][Message][NoUpdate2]','faxpages','SUCCESS','updateStatus','faxstatusstring','SENDING\x20FAILED:\x20','SENDING\x20FAILED','send','[Fax][execOriginate][success]','message','Fax\x20received','[Fax][execOriginate][failure]','Fax\x20failed','checkAfterSend','FaxAccountId','Trunk','isValid','Trunk\x20Reachable'];(function(_0x31b5b2,_0x5ab927){var _0x364f13=function(_0x163bd0){while(--_0x163bd0){_0x31b5b2['push'](_0x31b5b2['shift']());}};_0x364f13(++_0x5ab927);}(_0x0b98,0x93));var _0x80b9=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x0b98[_0x14add3];return _0x4a174f;};'use strict';var util=require(_0x80b9('0x0'));var _=require(_0x80b9('0x1'));var BPromise=require('bluebird');var uuid=require(_0x80b9('0x2'));var moment=require('moment');var path=require(_0x80b9('0x3'));var tiff2pdf=require(_0x80b9('0x4'));var gs=require(_0x80b9('0x5'));var logger=require('../../../config/logger')('fax');var ami=require(_0x80b9('0x6'));var rpcDb=require(_0x80b9('0x7'));var Channel=require(_0x80b9('0x8'));var ut=require(_0x80b9('0x9'));var Action=require(_0x80b9('0xa'));var faxAccount=require(_0x80b9('0xb'));var attachment=require('../rpc/attachment');var faxMessage=require(_0x80b9('0xc'));function Fax(_0x3d24ce){this['channels']={};this[_0x80b9('0xd')]=_0x3d24ce[_0x80b9('0xd')];this['trunks']=_0x3d24ce[_0x80b9('0xe')];this['actions']={};ami['on'](_0x80b9('0xf'),this[_0x80b9('0x10')][_0x80b9('0x11')](this));ami['on']('varset',this[_0x80b9('0x12')][_0x80b9('0x11')](this));ami['on'](_0x80b9('0x13'),this[_0x80b9('0x14')][_0x80b9('0x11')](this));ami['on'](_0x80b9('0x15'),this[_0x80b9('0x16')][_0x80b9('0x11')](this));ami['on'](_0x80b9('0x17'),this[_0x80b9('0x18')]['bind'](this));ami['on'](_0x80b9('0x19'),this[_0x80b9('0x1a')][_0x80b9('0x11')](this));ami['on'](_0x80b9('0x1b'),this[_0x80b9('0x1c')][_0x80b9('0x11')](this));ami['on'](_0x80b9('0x1d'),this[_0x80b9('0x1e')]['bind'](this));}Fax[_0x80b9('0x1f')][_0x80b9('0x10')]=function(_0x13016b){if(_0x13016b[_0x80b9('0x20')]==='from-voip-provider'){for(var _0x18539d in this[_0x80b9('0xd')]){if(this['faxAccounts'][_0x80b9('0x21')](_0x18539d)){if(_0x13016b[_0x80b9('0x22')]===this['faxAccounts'][_0x18539d][_0x80b9('0x23')]){this['channels'][_0x13016b[_0x80b9('0x24')]]={};this[_0x80b9('0x25')][_0x13016b[_0x80b9('0x24')]]['channel']=_0x13016b['channel'];this['channels'][_0x13016b[_0x80b9('0x24')]]['id']=this['faxAccounts'][_0x18539d]['id'];this[_0x80b9('0x25')][_0x13016b[_0x80b9('0x24')]][_0x80b9('0x26')]=this['faxAccounts'][_0x18539d][_0x80b9('0x26')];logger[_0x80b9('0x27')](_0x13016b[_0x80b9('0x24')],_0x80b9('0x28'));}}}}if(this[_0x80b9('0x29')][_0x13016b[_0x80b9('0x24')]]){this[_0x80b9('0x25')][_0x13016b[_0x80b9('0x24')]]={};this['channels'][_0x13016b[_0x80b9('0x24')]][_0x80b9('0x2a')]=_0x13016b[_0x80b9('0x2a')];logger[_0x80b9('0x27')](_0x13016b[_0x80b9('0x24')],_0x80b9('0x28'));}};Fax[_0x80b9('0x1f')][_0x80b9('0x12')]=function(_0x3c5009){if(this[_0x80b9('0x25')][_0x3c5009[_0x80b9('0x24')]]){for(var _0x25c5a7 in _0x3c5009[_0x80b9('0x2b')]){if(_0x3c5009[_0x80b9('0x2b')]['hasOwnProperty'](_0x25c5a7)){this['channels'][_0x3c5009[_0x80b9('0x24')]][_0x25c5a7]=_0x3c5009[_0x80b9('0x2c')];}}}};Fax[_0x80b9('0x1f')][_0x80b9('0x14')]=function(_0x25304a){if(this[_0x80b9('0x25')][_0x25304a[_0x80b9('0x24')]]){this[_0x80b9('0x25')][_0x25304a['uniqueid']][_0x80b9('0x2d')]=_0x25304a['channelstate'];this[_0x80b9('0x25')][_0x25304a[_0x80b9('0x24')]][_0x80b9('0x2e')]=_0x25304a[_0x80b9('0x2e')];}};Fax[_0x80b9('0x1f')][_0x80b9('0x16')]=function(_0x39e55d){if(this[_0x80b9('0x25')][_0x39e55d[_0x80b9('0x24')]]){for(var _0x17c2db in _0x39e55d[_0x80b9('0x2b')]){if(_0x39e55d[_0x80b9('0x2b')]['hasOwnProperty'](_0x17c2db)){this[_0x80b9('0x25')][_0x39e55d['uniqueid']][_0x17c2db]=_0x39e55d[_0x80b9('0x2c')];}}}};Fax['prototype'][_0x80b9('0x18')]=function(_0x5da847){if(this['channels'][_0x5da847['uniqueid']]){this[_0x80b9('0x25')][_0x5da847[_0x80b9('0x24')]][_0x80b9('0x2f')]=_0x5da847['operation'];this['channels'][_0x5da847[_0x80b9('0x24')]][_0x80b9('0x30')]=_0x5da847[_0x80b9('0x30')];this[_0x80b9('0x25')][_0x5da847[_0x80b9('0x24')]][_0x80b9('0x23')]=_0x5da847[_0x80b9('0x23')];this[_0x80b9('0x25')][_0x5da847['uniqueid']]['filename']=_0x5da847[_0x80b9('0x31')];logger['info'](_0x5da847[_0x80b9('0x24')],_0x80b9('0x32'));}};Fax['prototype'][_0x80b9('0x1a')]=function(_0x19f70c){var _0x22f87f=this;if(this[_0x80b9('0x25')][_0x19f70c['uniqueid']]){var _0x111c62=this['channels'][_0x19f70c[_0x80b9('0x24')]]['id'];this[_0x80b9('0x25')][_0x19f70c[_0x80b9('0x24')]][_0x80b9('0x33')]=_0x19f70c[_0x80b9('0x33')];this[_0x80b9('0x25')][_0x19f70c[_0x80b9('0x24')]][_0x80b9('0x34')]=_0x19f70c[_0x80b9('0x34')];this[_0x80b9('0x25')][_0x19f70c['uniqueid']][_0x80b9('0x23')]=_0x19f70c[_0x80b9('0x23')];this[_0x80b9('0x25')][_0x19f70c[_0x80b9('0x24')]][_0x80b9('0x35')]=_0x19f70c[_0x80b9('0x35')];this[_0x80b9('0x25')][_0x19f70c[_0x80b9('0x24')]][_0x80b9('0x36')]=_0x19f70c['transferrate'];this[_0x80b9('0x25')][_0x19f70c[_0x80b9('0x24')]][_0x80b9('0x31')]=_0x19f70c[_0x80b9('0x31')];this['channels'][_0x19f70c['uniqueid']]['calleridnum']=_0x19f70c['calleridnum'];if(this[_0x80b9('0x25')][_0x19f70c[_0x80b9('0x24')]][_0x80b9('0x34')]>0x0){tiff2pdf(_0x19f70c[_0x80b9('0x31')],'/var/opt/motion2/server/files/attachments/',function(_0xd22bd0){logger[_0x80b9('0x27')](_0x19f70c[_0x80b9('0x24')],_0x80b9('0x37'),_0xd22bd0['message']);attachment['create']({'name':path[_0x80b9('0x38')](_0x19f70c['filename'])[_0x80b9('0x26')],'basename':path[_0x80b9('0x38')](_0x19f70c[_0x80b9('0x31')])[_0x80b9('0x26')]+_0x80b9('0x39'),'type':_0x80b9('0x3a')})[_0x80b9('0x3b')](function(_0xf1aca4){faxAccount[_0x80b9('0x3c')](_0x111c62,{'from':_0x19f70c[_0x80b9('0x3d')],'mapKey':_0x80b9('0x3e'),'body':path[_0x80b9('0x38')](_0x19f70c['filename'])[_0x80b9('0x26')]+_0x80b9('0x39'),'AttachmentId':_0xf1aca4['id']})['catch'](function(_0x3aeacf){logger['error'](_0x19f70c[_0x80b9('0x24')],'\x20notify\x20',JSON[_0x80b9('0x3f')](_0x3aeacf));});})[_0x80b9('0x40')](function(_0x343208){logger[_0x80b9('0x41')](_0x19f70c[_0x80b9('0x24')],'\x20receiveFax\x20',JSON['stringify'](_0x343208));});});}logger[_0x80b9('0x27')](_0x19f70c['uniqueid'],_0x80b9('0x42'));}};Fax[_0x80b9('0x1f')][_0x80b9('0x1e')]=function(_0x2b72fb){if(this['actions'][_0x2b72fb[_0x80b9('0x24')]]){_[_0x80b9('0x43')](this[_0x80b9('0x25')][_0x2b72fb[_0x80b9('0x24')]],_[_0x80b9('0x44')](_0x2b72fb,[_0x80b9('0x45'),_0x80b9('0x46')]));}};function updateStatus(_0x3e300b){if(_0x3e300b[_0x80b9('0x47')]){faxMessage[_0x80b9('0x48')](_0x3e300b[_0x80b9('0x47')],{'failMessage':_0x80b9('0x49')})[_0x80b9('0x3b')](function(_0x5f58b7){ut[_0x80b9('0x4a')](_0x80b9('0x4b'),_0x5f58b7);})[_0x80b9('0x40')](function(_0x30ec71){ut[_0x80b9('0x4a')](_0x80b9('0x4c'),_0x30ec71);});}else{ut[_0x80b9('0x4a')](_0x80b9('0x4d'));}}Fax[_0x80b9('0x1f')]['updateStatus']=function(_0x28d0ff,_0x7f9e46,_0x83db56){var _0x3e2030=this;var _0x11eb2a={};if(_0x7f9e46){_0x11eb2a={'read':_0x7f9e46};}else{_0x11eb2a={'failMessage':_0x83db56};}if(this['actions'][_0x28d0ff][_0x80b9('0x47')]){faxMessage['update'](this['actions'][_0x28d0ff][_0x80b9('0x47')],_0x11eb2a)['then'](function(_0x218a7d){ut['logger']('[Fax][Message][Updated]',_0x218a7d);})[_0x80b9('0x40')](function(_0x2d33e9){ut[_0x80b9('0x4a')](_0x80b9('0x4e'),_0x2d33e9);})['finally'](function(){delete _0x3e2030['channels'][_0x28d0ff];delete _0x3e2030[_0x80b9('0x29')][_0x28d0ff];});}else{ut[_0x80b9('0x4a')](_0x80b9('0x4f'));delete this['channels'][_0x28d0ff];delete this[_0x80b9('0x29')][_0x28d0ff];}};Fax[_0x80b9('0x1f')][_0x80b9('0x1c')]=function(_0xf9ff1b){var _0x5c05cf=this;if(this['channels'][_0xf9ff1b[_0x80b9('0x24')]]){if(this[_0x80b9('0x29')][_0xf9ff1b['uniqueid']]){this[_0x80b9('0x25')][_0xf9ff1b[_0x80b9('0x24')]]['id']=this[_0x80b9('0x29')][_0xf9ff1b[_0x80b9('0x24')]]['id'];this['channels'][_0xf9ff1b[_0x80b9('0x24')]][_0x80b9('0x26')]=this[_0x80b9('0x29')][_0xf9ff1b[_0x80b9('0x24')]][_0x80b9('0x26')];}logger['info'](_0xf9ff1b[_0x80b9('0x24')],this[_0x80b9('0x29')][_0xf9ff1b[_0x80b9('0x24')]]?'\x20hangup\x20sendFile\x20':'\x20hangup\x20faxRiceive\x20',JSON['stringify'](this[_0x80b9('0x25')][_0xf9ff1b['uniqueid']]));if(this[_0x80b9('0x29')][_0xf9ff1b[_0x80b9('0x24')]]){if(this['channels'][_0xf9ff1b[_0x80b9('0x24')]][_0x80b9('0x50')]>0x0&&this['channels'][_0xf9ff1b[_0x80b9('0x24')]]['faxstatus']===_0x80b9('0x51')){this[_0x80b9('0x52')](_0xf9ff1b[_0x80b9('0x24')],!![]);}else{this[_0x80b9('0x52')](_0xf9ff1b[_0x80b9('0x24')],![],this[_0x80b9('0x25')][_0xf9ff1b[_0x80b9('0x24')]][_0x80b9('0x53')]?_0x80b9('0x54')+this[_0x80b9('0x25')][_0xf9ff1b[_0x80b9('0x24')]][_0x80b9('0x53')]:_0x80b9('0x55'));}}}};Fax[_0x80b9('0x1f')][_0x80b9('0x56')]=function(_0x17fc81){var _0xad2cbf=this;return new BPromise(function(_0x3bb8d6,_0x1d9dd1){_0xad2cbf['execOriginate'](_0x17fc81,_0xad2cbf[_0x80b9('0xd')][_0x17fc81['FaxAccountId']])['then'](function(_0x1b46c7){ut[_0x80b9('0x4a')](_0x80b9('0x57'),_0x1b46c7);_0x3bb8d6(ut[_0x80b9('0x58')](_0x80b9('0x59')));})[_0x80b9('0x40')](function(_0x5a9bef){ut[_0x80b9('0x4a')](_0x80b9('0x5a'),_0x5a9bef);updateStatus(_0x17fc81);_0x1d9dd1(ut[_0x80b9('0x58')](_0x80b9('0x5b')));});});};Fax[_0x80b9('0x1f')][_0x80b9('0x5c')]=function(_0x20bc1e){var _0x101bf9=this;return new BPromise(function(_0x57d3ce,_0x4c087c){var _0x26e7f2=_0x101bf9['checkTrunk'](_0x101bf9[_0x80b9('0xd')][_0x20bc1e[_0x80b9('0x5d')]][_0x80b9('0x5e')],_0x20bc1e);if(_0x26e7f2[_0x80b9('0x5f')]){_0x57d3ce(ut[_0x80b9('0x58')](_0x80b9('0x60')));}else{_0x4c087c(ut['message'](_0x26e7f2['message']));}});};function originate(_0x773616,_0x34b0e6,_0x241096){return new BPromise(function(_0x2208e3,_0x5242ec){if(_0x241096){var _0x433a17=util[_0x80b9('0x61')](_0x80b9('0x62'),path[_0x80b9('0x38')](_0x773616[_0x80b9('0x3')])['name'],_0x773616[_0x80b9('0x3')]);gs[_0x80b9('0x63')](_0x433a17)[_0x80b9('0x3b')](function(){_0x773616[_0x80b9('0x3')]=util['format'](_0x80b9('0x64'),path[_0x80b9('0x38')](_0x773616[_0x80b9('0x3')])['dir'],path['parse'](_0x773616[_0x80b9('0x3')])[_0x80b9('0x26')]);_0x34b0e6[_0x80b9('0x65')]=_0x773616[_0x80b9('0x3')];ut['logger'](_0x80b9('0x66'),'');ami[_0x80b9('0x67')](ut[_0x80b9('0x68')](_0x773616,_0x34b0e6))[_0x80b9('0x3b')](function(_0x3f438d){_0x2208e3(_0x3f438d);})[_0x80b9('0x40')](function(_0x64a402){_0x5242ec(_0x64a402);});})['catch'](function(_0x281fca){_0x5242ec(_0x281fca);});}else{ami[_0x80b9('0x67')](ut['variablesAction'](_0x773616,_0x34b0e6))['then'](function(_0x315739){_0x2208e3(_0x315739);})[_0x80b9('0x40')](function(_0x59f946){_0x5242ec(_0x59f946);});}});}Fax[_0x80b9('0x1f')][_0x80b9('0x69')]=function(_0x1fb7ce,_0xd030f2){var _0x311e93=this;return new BPromise(function(_0x567b1e,_0x190337){var _0x2af50d=uuid['v4']();var _0xc388a6=ut[_0x80b9('0x6a')](_0x1fb7ce,_0xd030f2);_0x311e93[_0x80b9('0x29')][_0x2af50d]=new Action(_0x2af50d,_0xd030f2,_0x1fb7ce);var _0x318df8=_0x311e93[_0x80b9('0x29')][_0x2af50d];if(path[_0x80b9('0x38')](_0x1fb7ce['path'])[_0x80b9('0x6b')]==='.pdf'){originate(_0x318df8,_0xc388a6,!![])[_0x80b9('0x3b')](function(_0x2b2b4c){_0x567b1e(_0x2b2b4c);})[_0x80b9('0x40')](function(_0xe3eb38){_0x190337(_0xe3eb38);});}else{originate(_0x318df8,_0xc388a6,![])[_0x80b9('0x3b')](function(_0x3b1b1c){_0x567b1e(_0x3b1b1c);})['catch'](function(_0x1a81c1){_0x190337(_0x1a81c1);});}});};Fax[_0x80b9('0x1f')]['isTrunkReachable']=function(_0x43382d){return!_[_0x80b9('0x6c')](_0x43382d)&&!_[_0x80b9('0x6c')](_0x43382d[_0x80b9('0x26')])&&!_['isNil'](_0x43382d[_0x80b9('0x6d')])&&_0x43382d[_0x80b9('0x6d')]&&!_[_0x80b9('0x6c')](this[_0x80b9('0xe')][util['format']('SIP/%s',_0x43382d[_0x80b9('0x26')])])&&!_['isNil'](this[_0x80b9('0xe')][util[_0x80b9('0x61')](_0x80b9('0x6e'),_0x43382d['name'])]['status'])&&(this[_0x80b9('0xe')][util['format'](_0x80b9('0x6e'),_0x43382d['name'])][_0x80b9('0x30')]===_0x80b9('0x6f')||this[_0x80b9('0xe')][util[_0x80b9('0x61')](_0x80b9('0x6e'),_0x43382d[_0x80b9('0x26')])]['status']===_0x80b9('0x70'));};Fax[_0x80b9('0x1f')][_0x80b9('0x71')]=function(_0x2dc1ae,_0x7a53c8){if(!this[_0x80b9('0x72')](_0x2dc1ae)){ut[_0x80b9('0x4a')]('[Fax][checkTrunk][Trunk\x20not\x20working\x20correctly]',_[_0x80b9('0x6c')](_0x2dc1ae)?'':_0x2dc1ae[_0x80b9('0x26')]+_0x80b9('0x73'));return{'isValid':![],'message':_0x80b9('0x74')};}if(_[_0x80b9('0x6c')](_0x7a53c8[_0x80b9('0x3e')])){ut[_0x80b9('0x4a')](_0x80b9('0x75'),JSON[_0x80b9('0x3f')](_0x7a53c8));return{'isValid':![],'message':'Empty\x20Fax'};}if(_['isNil'](_0x7a53c8[_0x80b9('0x3')])){ut['logger'](_0x80b9('0x76'),JSON[_0x80b9('0x3f')](_0x7a53c8));return{'isValid':![],'message':_0x80b9('0x77')};}return{'isValid':!![],'message':_0x80b9('0x78')};};module[_0x80b9('0x79')]=Fax;
\ No newline at end of file
index e99c2f6..e766f89 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3367=['util','../../../config/logger','../rpc/faxAccount','inspect','notify','catch'];(function(_0xb875ee,_0x583042){var _0x4c7f3a=function(_0x1f6661){while(--_0x1f6661){_0xb875ee['push'](_0xb875ee['shift']());}};_0x4c7f3a(++_0x583042);}(_0x3367,0x138));var _0x7336=function(_0x2f09d9,_0x1be464){_0x2f09d9=_0x2f09d9-0x0;var _0x1208b9=_0x3367[_0x2f09d9];return _0x1208b9;};'use strict';var util=require(_0x7336('0x0'));var BPromise=require('bluebird');var logger=require(_0x7336('0x1'))('preview');var _=require('lodash');var faxAccount=require(_0x7336('0x2'));function loggerCatch(_0x17d35b){return function(_0x2bb5c9){logger['error'](_0x17d35b,util[_0x7336('0x3')](_0x2bb5c9,{'showHidden':![],'depth':null}));};}exports[_0x7336('0x4')]=function(_0x19d442,_0x4326bb){return BPromise['resolve']()['then'](faxAccount[_0x7336('0x4')](_0x19d442,_0x4326bb))[_0x7336('0x5')](loggerCatch('[Notify]\x20'));};
\ No newline at end of file
+var _0x8c72=['../rpc/faxAccount','inspect','notify','resolve','then','catch','util','bluebird','../../../config/logger','lodash'];(function(_0x567547,_0x2b1e90){var _0x44cb73=function(_0x51574a){while(--_0x51574a){_0x567547['push'](_0x567547['shift']());}};_0x44cb73(++_0x2b1e90);}(_0x8c72,0xba));var _0x28c7=function(_0x57b54c,_0x54ce0d){_0x57b54c=_0x57b54c-0x0;var _0x59cc19=_0x8c72[_0x57b54c];return _0x59cc19;};'use strict';var util=require(_0x28c7('0x0'));var BPromise=require(_0x28c7('0x1'));var logger=require(_0x28c7('0x2'))('preview');var _=require(_0x28c7('0x3'));var faxAccount=require(_0x28c7('0x4'));function loggerCatch(_0x52c020){return function(_0x12ad8a){logger['error'](_0x52c020,util[_0x28c7('0x5')](_0x12ad8a,{'showHidden':![],'depth':null}));};}exports[_0x28c7('0x6')]=function(_0x1f71aa,_0x12d312){return BPromise[_0x28c7('0x7')]()[_0x28c7('0x8')](faxAccount[_0x28c7('0x6')](_0x1f71aa,_0x12d312))[_0x28c7('0x9')](loggerCatch('[Notify]\x20'));};
\ No newline at end of file
index 497ae2a..fc8762b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x77de=['info','\x20Error\x20:','inspect','../../../../config/logger','fax','child_process','exec','Exec\x20gs'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x77de,0xe3));var _0xe77d=function(_0x3d5f84,_0x569548){_0x3d5f84=_0x3d5f84-0x0;var _0x1981b8=_0x77de[_0x3d5f84];return _0x1981b8;};'use strict';var util=require('util');var logger=require(_0xe77d('0x0'))(_0xe77d('0x1'));var BPromise=require('bluebird');var exec=require(_0xe77d('0x2'))[_0xe77d('0x3')];exports['execute']=function(_0x25bf1b){return new BPromise(function(_0x431499,_0x285a80){exec(_0x25bf1b,function(_0x404533,_0x73096b,_0x2fad1c){logger['info'](_0xe77d('0x4'),_0x73096b);if(_0x404533){logger[_0xe77d('0x5')](_0xe77d('0x4'),_0xe77d('0x6'),util[_0xe77d('0x7')](_0x404533,{'showHidden':![],'depth':null}),_0x73096b,_0x2fad1c);_0x285a80(_0x404533);}_0x431499(_0x73096b);});});};
\ No newline at end of file
+var _0xf2c7=['Exec\x20gs','\x20Error\x20:','util','fax','exec','execute','info'];(function(_0x2d8501,_0x231868){var _0x2c7601=function(_0xd968dc){while(--_0xd968dc){_0x2d8501['push'](_0x2d8501['shift']());}};_0x2c7601(++_0x231868);}(_0xf2c7,0x152));var _0x7f2c=function(_0x3f2228,_0x3b27d5){_0x3f2228=_0x3f2228-0x0;var _0x285ae4=_0xf2c7[_0x3f2228];return _0x285ae4;};'use strict';var util=require(_0x7f2c('0x0'));var logger=require('../../../../config/logger')(_0x7f2c('0x1'));var BPromise=require('bluebird');var exec=require('child_process')[_0x7f2c('0x2')];exports[_0x7f2c('0x3')]=function(_0x2a1087){return new BPromise(function(_0x4c8d9e,_0x2df02c){exec(_0x2a1087,function(_0x59541a,_0x3b54da,_0x5db543){logger[_0x7f2c('0x4')](_0x7f2c('0x5'),_0x3b54da);if(_0x59541a){logger[_0x7f2c('0x4')]('Exec\x20gs',_0x7f2c('0x6'),util['inspect'](_0x59541a,{'showHidden':![],'depth':null}),_0x3b54da,_0x5db543);_0x2df02c(_0x59541a);}_0x4c8d9e(_0x3b54da);});});};
\ No newline at end of file
index 92aa471..060e250 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe026=['lodash','moment','../../../../config/logger','message','logger','info','ecm','headerinfo','minrate','maxrate','format','\x22%s\x22','modem','gateway','faxdetect','localstationid','variablesAction','uniqueid','originate','channel','xcally-motion-fax','from-sip','\x22%s\x22\x20<%s>','util'];(function(_0x67e20,_0x5c9a58){var _0x2aa936=function(_0x4dea61){while(--_0x4dea61){_0x67e20['push'](_0x67e20['shift']());}};_0x2aa936(++_0x5c9a58);}(_0xe026,0x11f));var _0x6e02=function(_0x1969a7,_0x5a133a){_0x1969a7=_0x1969a7-0x0;var _0x3d665f=_0xe026[_0x1969a7];return _0x3d665f;};'use strict';var util=require(_0x6e02('0x0'));var _=require(_0x6e02('0x1'));var moment=require(_0x6e02('0x2'));var logger=require(_0x6e02('0x3'))('fax');exports[_0x6e02('0x4')]=function(_0x638fce){return{'message':_0x638fce};};exports[_0x6e02('0x5')]=function(_0x49e6b0,_0x23ae90){logger[_0x6e02('0x6')](_0x49e6b0,util['inspect'](_0x23ae90,{'showHidden':![],'depth':null}));};exports['addVariables']=function(_0x180c87,_0x3b465b){var _0x1912c0={'XMF-ECM':_0x3b465b[_0x6e02('0x7')],'XMF-HEADERINFO':_0x3b465b[_0x6e02('0x8')],'XMF-MINRATE':_0x3b465b[_0x6e02('0x9')],'XMF-MAXRATE':_0x3b465b[_0x6e02('0xa')],'XMF-MODEM':util[_0x6e02('0xb')](_0x6e02('0xc'),_0x3b465b[_0x6e02('0xd')]),'XMF-GATEWAY':_0x3b465b[_0x6e02('0xe')],'XMF-FAXDETECT':_0x3b465b[_0x6e02('0xf')],'XMF-T38TIMEOUT':_0x3b465b['t38timeout'],'XMF-LOCALSTATIONID':_0x3b465b[_0x6e02('0x10')],'XMF-PATH':_0x180c87['path']};return _0x1912c0;};exports[_0x6e02('0x11')]=function(_0x4e5579,_0x49a028){return{'actionid':_0x4e5579[_0x6e02('0x12')],'action':_0x6e02('0x13'),'channel':_0x4e5579[_0x6e02('0x14')],'Exten':_0x6e02('0x15'),'Context':_0x6e02('0x16'),'Priority':'1','callerid':util['format'](_0x6e02('0x17'),_0x4e5579[_0x6e02('0x8')]?_0x4e5579['headerinfo']:'',_0x4e5579['localstationid']),'variable':_0x49a028,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x4e5579[_0x6e02('0x12')]};};
\ No newline at end of file
+var _0x7689=['../../../../config/logger','logger','addVariables','ecm','headerinfo','minrate','maxrate','format','\x22%s\x22','modem','gateway','faxdetect','localstationid','variablesAction','uniqueid','originate','channel','xcally-motion-fax','from-sip','util','lodash'];(function(_0x45dc5b,_0x1c532b){var _0x2b67a6=function(_0x740292){while(--_0x740292){_0x45dc5b['push'](_0x45dc5b['shift']());}};_0x2b67a6(++_0x1c532b);}(_0x7689,0x124));var _0x9768=function(_0x4107c1,_0x3adb65){_0x4107c1=_0x4107c1-0x0;var _0x588e29=_0x7689[_0x4107c1];return _0x588e29;};'use strict';var util=require(_0x9768('0x0'));var _=require(_0x9768('0x1'));var moment=require('moment');var logger=require(_0x9768('0x2'))('fax');exports['message']=function(_0x3d2db5){return{'message':_0x3d2db5};};exports[_0x9768('0x3')]=function(_0x30c7d3,_0x1e4bea){logger['info'](_0x30c7d3,util['inspect'](_0x1e4bea,{'showHidden':![],'depth':null}));};exports[_0x9768('0x4')]=function(_0x5d0f6e,_0x3db633){var _0x4fbfa2={'XMF-ECM':_0x3db633[_0x9768('0x5')],'XMF-HEADERINFO':_0x3db633[_0x9768('0x6')],'XMF-MINRATE':_0x3db633[_0x9768('0x7')],'XMF-MAXRATE':_0x3db633[_0x9768('0x8')],'XMF-MODEM':util[_0x9768('0x9')](_0x9768('0xa'),_0x3db633[_0x9768('0xb')]),'XMF-GATEWAY':_0x3db633[_0x9768('0xc')],'XMF-FAXDETECT':_0x3db633[_0x9768('0xd')],'XMF-T38TIMEOUT':_0x3db633['t38timeout'],'XMF-LOCALSTATIONID':_0x3db633[_0x9768('0xe')],'XMF-PATH':_0x5d0f6e['path']};return _0x4fbfa2;};exports[_0x9768('0xf')]=function(_0x5ea216,_0x2d35a0){return{'actionid':_0x5ea216[_0x9768('0x10')],'action':_0x9768('0x11'),'channel':_0x5ea216[_0x9768('0x12')],'Exten':_0x9768('0x13'),'Context':_0x9768('0x14'),'Priority':'1','callerid':util['format']('\x22%s\x22\x20<%s>',_0x5ea216[_0x9768('0x6')]?_0x5ea216[_0x9768('0x6')]:'',_0x5ea216[_0x9768('0xe')]),'variable':_0x2d35a0,'timeout':0x1e*0x3e8,'async':!![],'channelid':_0x5ea216[_0x9768('0x10')]};};
\ No newline at end of file
index 2df99df..d1549c6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x11d9=['./rpc/trunk','./rpc/template','./rpc/cmHopperHistory','./rpc/campaign','./rpc/voiceExtension','./rpc/faxAccount','./rpc/integrations/zendesk','./rpc/integrations/salesforce','./rpc/integrations/sugarcrm','./rpc/integrations/freshdesk','./rpc/integrations/desk','./rpc/integrations/zoho','./rpc/integrations/vtiger','./rpc/integrations/freshsales','./rpc/integrations/dynamics365','../../config/logger','ami','hour','resolve','getAgents','then','initAgents','getTelephones','initTelephones','getTrunks','initTrunks','getVoiceQueues','initVoiceQueues','getTriggers','initTriggers','getTemplates','getZendeskAccounts','initZendeskAccounts','getSalesforceAccounts','initSalesforceAccounts','getSugarcrmAccounts','getFreshdeskAccounts','initFreshdeskAccounts','getDeskAccounts','getZohoAccounts','initZohoAccounts','initVtigerAccounts','getFreshsalesAccounts','getServicenowAccounts','initServicenowAccounts','getDynamics365Accounts','initDynamics365Accounts','getCampaigns','getVoiceExtensions','initVoiceExtensions','getFaxAccounts','initVoiceQueueReports','getVoiceQueueHopperHistory','initVoiceQueueHopperHistory','getCampaignHopperHistory','getVoiceCallReports','initVoiceCallReports','error','[index.js][initParams]','inspect','listen','sync','[index.js][main]','util','moment','./realtime','./acw','./dialer','./preview','./fax','./rpc/voiceQueue','./rpc/voiceCallReport'];(function(_0x187abb,_0x2c8a71){var _0x494276=function(_0x25bc86){while(--_0x25bc86){_0x187abb['push'](_0x187abb['shift']());}};_0x494276(++_0x2c8a71);}(_0x11d9,0x87));var _0x911d=function(_0xcd33cd,_0x4a2a5e){_0xcd33cd=_0xcd33cd-0x0;var _0x5bb82b=_0x11d9[_0xcd33cd];return _0x5bb82b;};'use strict';var util=require(_0x911d('0x0'));var moment=require(_0x911d('0x1'));var server=require('./server');var Realtime=require(_0x911d('0x2'));var Report=require('./report');var Acw=require(_0x911d('0x3'));var Trigger=require('./trigger');var Dialer=require(_0x911d('0x4'));var Preview=require(_0x911d('0x5'));var Fax=require(_0x911d('0x6'));var user=require('./rpc/user');var voiceQueue=require(_0x911d('0x7'));var voiceQueueReport=require('./rpc/voiceQueueReport');var voiceCallReport=require(_0x911d('0x8'));var trunk=require(_0x911d('0x9'));var trigger=require('./rpc/trigger');var template=require(_0x911d('0xa'));var cmHopperHistory=require(_0x911d('0xb'));var campaign=require(_0x911d('0xc'));var voiceExtension=require(_0x911d('0xd'));var faxAccount=require(_0x911d('0xe'));var zendesk=require(_0x911d('0xf'));var salesforce=require(_0x911d('0x10'));var sugarcrm=require(_0x911d('0x11'));var freshdesk=require(_0x911d('0x12'));var desk=require(_0x911d('0x13'));var zoho=require(_0x911d('0x14'));var vtiger=require(_0x911d('0x15'));var freshsales=require(_0x911d('0x16'));var servicenow=require('./rpc/integrations/servicenow');var dynamics365=require(_0x911d('0x17'));var realtime=new Realtime();var report=new Report(realtime);var acw=new Acw(realtime);var channelTrigger=new Trigger(realtime);var preview=new Preview(realtime);var dialer=new Dialer(realtime,preview);var fax=new Fax(realtime);var logger=require(_0x911d('0x18'))(_0x911d('0x19'));var isTrue=!![];var initP=!![];function ifMidnight(){if(moment()['get'](_0x911d('0x1a'))===0x0&&initP){initP=![];isTrue=!![];initParams();}if(moment()['get'](_0x911d('0x1a'))===0x1&&isTrue){isTrue=![];initP=!![];}}function initRealtime(){ifMidnight();return Promise[_0x911d('0x1b')]()['then'](user[_0x911d('0x1c')]())[_0x911d('0x1d')](realtime[_0x911d('0x1e')]())[_0x911d('0x1d')](user[_0x911d('0x1f')]())[_0x911d('0x1d')](realtime[_0x911d('0x20')]())[_0x911d('0x1d')](trunk[_0x911d('0x21')]())[_0x911d('0x1d')](realtime[_0x911d('0x22')]())[_0x911d('0x1d')](voiceQueue[_0x911d('0x23')]())[_0x911d('0x1d')](realtime[_0x911d('0x24')]())[_0x911d('0x1d')](trigger[_0x911d('0x25')]())[_0x911d('0x1d')](realtime[_0x911d('0x26')]())['then'](template[_0x911d('0x27')]())['then'](realtime['initTemplates']())[_0x911d('0x1d')](zendesk[_0x911d('0x28')]())[_0x911d('0x1d')](realtime[_0x911d('0x29')]())[_0x911d('0x1d')](salesforce[_0x911d('0x2a')]())['then'](realtime[_0x911d('0x2b')]())[_0x911d('0x1d')](sugarcrm[_0x911d('0x2c')]())[_0x911d('0x1d')](realtime['initSugarcrmAccounts']())['then'](freshdesk[_0x911d('0x2d')]())[_0x911d('0x1d')](realtime[_0x911d('0x2e')]())['then'](desk[_0x911d('0x2f')]())['then'](realtime['initDeskAccounts']())[_0x911d('0x1d')](zoho[_0x911d('0x30')]())[_0x911d('0x1d')](realtime[_0x911d('0x31')]())[_0x911d('0x1d')](vtiger['getVtigerAccounts']())[_0x911d('0x1d')](realtime[_0x911d('0x32')]())['then'](freshsales[_0x911d('0x33')]())[_0x911d('0x1d')](realtime['initFreshsalesAccounts']())[_0x911d('0x1d')](servicenow[_0x911d('0x34')]())[_0x911d('0x1d')](realtime[_0x911d('0x35')]())['then'](dynamics365[_0x911d('0x36')]())[_0x911d('0x1d')](realtime[_0x911d('0x37')]())[_0x911d('0x1d')](campaign[_0x911d('0x38')]())[_0x911d('0x1d')](realtime['initCampaigns']())[_0x911d('0x1d')](voiceExtension[_0x911d('0x39')]())['then'](realtime[_0x911d('0x3a')]())['then'](faxAccount[_0x911d('0x3b')]())['then'](realtime['initFaxAccounts']())[_0x911d('0x1d')](function(){return realtime;});}function initParams(){return Promise[_0x911d('0x1b')]()[_0x911d('0x1d')](voiceQueueReport['getVoiceQueueReports']())['then'](realtime[_0x911d('0x3c')]())[_0x911d('0x1d')](cmHopperHistory[_0x911d('0x3d')]())['then'](realtime[_0x911d('0x3e')]())[_0x911d('0x1d')](cmHopperHistory[_0x911d('0x3f')]())[_0x911d('0x1d')](realtime['initCampaignHopperHistory']())[_0x911d('0x1d')](voiceCallReport[_0x911d('0x40')]())[_0x911d('0x1d')](realtime[_0x911d('0x41')]())['catch'](function(_0x495c6c){logger[_0x911d('0x42')](_0x911d('0x43'),util[_0x911d('0x44')](_0x495c6c,{'showHidden':![],'depth':null}));});}function main(){return server[_0x911d('0x45')](realtime,preview,fax)[_0x911d('0x1d')](function(){return initRealtime();})[_0x911d('0x1d')](function(){return initParams();})['then'](function(){report[_0x911d('0x46')]();setInterval(initRealtime,0x1388);})['catch'](function(_0x4900ba){logger['error'](_0x911d('0x47'),util[_0x911d('0x44')](_0x4900ba,{'showHidden':![],'depth':null}));});}main();
\ No newline at end of file
+var _0x4f18=['./rpc/integrations/salesforce','./rpc/integrations/desk','./rpc/integrations/zoho','./rpc/integrations/freshsales','./rpc/integrations/servicenow','./rpc/integrations/dynamics365','ami','hour','get','resolve','then','getAgents','initAgents','getTelephones','getTrunks','getVoiceQueues','initVoiceQueues','initTriggers','getZendeskAccounts','initZendeskAccounts','getSalesforceAccounts','initSalesforceAccounts','getSugarcrmAccounts','initSugarcrmAccounts','getFreshdeskAccounts','initFreshdeskAccounts','getDeskAccounts','initZohoAccounts','getVtigerAccounts','initVtigerAccounts','getFreshsalesAccounts','getServicenowAccounts','initServicenowAccounts','initCampaigns','getVoiceExtensions','initVoiceExtensions','getFaxAccounts','initFaxAccounts','getVoiceQueueReports','getVoiceQueueHopperHistory','initVoiceQueueHopperHistory','getCampaignHopperHistory','getVoiceCallReports','error','[index.js][initParams]','inspect','listen','sync','catch','[index.js][main]','util','moment','./server','./realtime','./acw','./trigger','./dialer','./preview','./fax','./rpc/voiceQueue','./rpc/voiceQueueReport','./rpc/voiceCallReport','./rpc/trunk','./rpc/template','./rpc/cmHopperHistory','./rpc/campaign','./rpc/voiceExtension','./rpc/faxAccount','./rpc/integrations/zendesk'];(function(_0x2e9fb9,_0x538aa8){var _0x22572f=function(_0x1e7423){while(--_0x1e7423){_0x2e9fb9['push'](_0x2e9fb9['shift']());}};_0x22572f(++_0x538aa8);}(_0x4f18,0x1d0));var _0x84f1=function(_0x5d2917,_0x2e788e){_0x5d2917=_0x5d2917-0x0;var _0x4fc3e9=_0x4f18[_0x5d2917];return _0x4fc3e9;};'use strict';var util=require(_0x84f1('0x0'));var moment=require(_0x84f1('0x1'));var server=require(_0x84f1('0x2'));var Realtime=require(_0x84f1('0x3'));var Report=require('./report');var Acw=require(_0x84f1('0x4'));var Trigger=require(_0x84f1('0x5'));var Dialer=require(_0x84f1('0x6'));var Preview=require(_0x84f1('0x7'));var Fax=require(_0x84f1('0x8'));var user=require('./rpc/user');var voiceQueue=require(_0x84f1('0x9'));var voiceQueueReport=require(_0x84f1('0xa'));var voiceCallReport=require(_0x84f1('0xb'));var trunk=require(_0x84f1('0xc'));var trigger=require('./rpc/trigger');var template=require(_0x84f1('0xd'));var cmHopperHistory=require(_0x84f1('0xe'));var campaign=require(_0x84f1('0xf'));var voiceExtension=require(_0x84f1('0x10'));var faxAccount=require(_0x84f1('0x11'));var zendesk=require(_0x84f1('0x12'));var salesforce=require(_0x84f1('0x13'));var sugarcrm=require('./rpc/integrations/sugarcrm');var freshdesk=require('./rpc/integrations/freshdesk');var desk=require(_0x84f1('0x14'));var zoho=require(_0x84f1('0x15'));var vtiger=require('./rpc/integrations/vtiger');var freshsales=require(_0x84f1('0x16'));var servicenow=require(_0x84f1('0x17'));var dynamics365=require(_0x84f1('0x18'));var realtime=new Realtime();var report=new Report(realtime);var acw=new Acw(realtime);var channelTrigger=new Trigger(realtime);var preview=new Preview(realtime);var dialer=new Dialer(realtime,preview);var fax=new Fax(realtime);var logger=require('../../config/logger')(_0x84f1('0x19'));var isTrue=!![];var initP=!![];function ifMidnight(){if(moment()['get'](_0x84f1('0x1a'))===0x0&&initP){initP=![];isTrue=!![];initParams();}if(moment()[_0x84f1('0x1b')]('hour')===0x1&&isTrue){isTrue=![];initP=!![];}}function initRealtime(){ifMidnight();return Promise[_0x84f1('0x1c')]()[_0x84f1('0x1d')](user[_0x84f1('0x1e')]())[_0x84f1('0x1d')](realtime[_0x84f1('0x1f')]())[_0x84f1('0x1d')](user[_0x84f1('0x20')]())[_0x84f1('0x1d')](realtime['initTelephones']())[_0x84f1('0x1d')](trunk[_0x84f1('0x21')]())[_0x84f1('0x1d')](realtime['initTrunks']())[_0x84f1('0x1d')](voiceQueue[_0x84f1('0x22')]())['then'](realtime[_0x84f1('0x23')]())['then'](trigger['getTriggers']())[_0x84f1('0x1d')](realtime[_0x84f1('0x24')]())[_0x84f1('0x1d')](template['getTemplates']())['then'](realtime['initTemplates']())[_0x84f1('0x1d')](zendesk[_0x84f1('0x25')]())[_0x84f1('0x1d')](realtime[_0x84f1('0x26')]())[_0x84f1('0x1d')](salesforce[_0x84f1('0x27')]())[_0x84f1('0x1d')](realtime[_0x84f1('0x28')]())['then'](sugarcrm[_0x84f1('0x29')]())[_0x84f1('0x1d')](realtime[_0x84f1('0x2a')]())[_0x84f1('0x1d')](freshdesk[_0x84f1('0x2b')]())[_0x84f1('0x1d')](realtime[_0x84f1('0x2c')]())['then'](desk[_0x84f1('0x2d')]())[_0x84f1('0x1d')](realtime['initDeskAccounts']())[_0x84f1('0x1d')](zoho['getZohoAccounts']())[_0x84f1('0x1d')](realtime[_0x84f1('0x2e')]())['then'](vtiger[_0x84f1('0x2f')]())[_0x84f1('0x1d')](realtime[_0x84f1('0x30')]())[_0x84f1('0x1d')](freshsales[_0x84f1('0x31')]())['then'](realtime['initFreshsalesAccounts']())[_0x84f1('0x1d')](servicenow[_0x84f1('0x32')]())[_0x84f1('0x1d')](realtime[_0x84f1('0x33')]())[_0x84f1('0x1d')](dynamics365['getDynamics365Accounts']())[_0x84f1('0x1d')](realtime['initDynamics365Accounts']())[_0x84f1('0x1d')](campaign['getCampaigns']())[_0x84f1('0x1d')](realtime[_0x84f1('0x34')]())[_0x84f1('0x1d')](voiceExtension[_0x84f1('0x35')]())['then'](realtime[_0x84f1('0x36')]())['then'](faxAccount[_0x84f1('0x37')]())[_0x84f1('0x1d')](realtime[_0x84f1('0x38')]())['then'](function(){return realtime;});}function initParams(){return Promise['resolve']()[_0x84f1('0x1d')](voiceQueueReport[_0x84f1('0x39')]())[_0x84f1('0x1d')](realtime['initVoiceQueueReports']())[_0x84f1('0x1d')](cmHopperHistory[_0x84f1('0x3a')]())[_0x84f1('0x1d')](realtime[_0x84f1('0x3b')]())['then'](cmHopperHistory[_0x84f1('0x3c')]())[_0x84f1('0x1d')](realtime['initCampaignHopperHistory']())[_0x84f1('0x1d')](voiceCallReport[_0x84f1('0x3d')]())['then'](realtime['initVoiceCallReports']())['catch'](function(_0x2ed894){logger[_0x84f1('0x3e')](_0x84f1('0x3f'),util[_0x84f1('0x40')](_0x2ed894,{'showHidden':![],'depth':null}));});}function main(){return server[_0x84f1('0x41')](realtime,preview,fax)['then'](function(){return initRealtime();})[_0x84f1('0x1d')](function(){return initParams();})[_0x84f1('0x1d')](function(){report[_0x84f1('0x42')]();setInterval(initRealtime,0x1388);})[_0x84f1('0x43')](function(_0x5c4141){logger[_0x84f1('0x3e')](_0x84f1('0x44'),util[_0x84f1('0x40')](_0x5c4141,{'showHidden':![],'depth':null}));});}main();
\ No newline at end of file
index d5f5589..5f39934 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5d88=['phone','online','voiceStatusTime','voiceStatusCallerIdNumber','onhold','local','prototype','updateStatusRealtime','toLowerCase','not_inuse','idle','inuse','talking','statePause','toNumber','voiceStatus','voiceStatusQueue','interface','stringify','format','user:ami:update','omit','emit','exports','lodash','util','md5','../../../config/environment','redis','defaults','name','email','accountcode','fullname','state','unknown','stateTime','status','address'];(function(_0x43d11d,_0xccff91){var _0x38cd08=function(_0x131ae2){while(--_0x131ae2){_0x43d11d['push'](_0x43d11d['shift']());}};_0x38cd08(++_0xccff91);}(_0x5d88,0x102));var _0x85d8=function(_0x5df710,_0x273f53){_0x5df710=_0x5df710-0x0;var _0x5402bc=_0x5d88[_0x5df710];return _0x5402bc;};'use strict';var _=require(_0x85d8('0x0'));var util=require(_0x85d8('0x1'));var moment=require('moment');var md5=require(_0x85d8('0x2'));var Redis=require('ioredis');var config=require(_0x85d8('0x3'));config[_0x85d8('0x4')]=_[_0x85d8('0x5')](config[_0x85d8('0x4')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x85d8('0x4')]));function Agent(_0xfc70ba){this['id']=_0xfc70ba['id']||0x0;this[_0x85d8('0x6')]=_0xfc70ba['name']||'';this[_0x85d8('0x7')]=_0xfc70ba[_0x85d8('0x7')]||'';this[_0x85d8('0x8')]=_0xfc70ba[_0x85d8('0x8')]||'';this[_0x85d8('0x9')]=_0xfc70ba[_0x85d8('0x9')]||'';this[_0x85d8('0xa')]=_0x85d8('0xb');this[_0x85d8('0xc')]=0x0;this[_0x85d8('0xd')]=_0x85d8('0xb');this[_0x85d8('0xe')]='';this[_0x85d8('0xf')]='';this['mobile']='';this['interface']='';this['online']=_0xfc70ba[_0x85d8('0x10')]||![];this['voiceStatus']=_0x85d8('0xb');this[_0x85d8('0x11')]=0x0;this[_0x85d8('0x12')]='';this['voiceStatusQueue']='';this[_0x85d8('0x13')]=![];this[_0x85d8('0x14')]=![];this['md5']='';}Agent[_0x85d8('0x15')][_0x85d8('0x16')]=function(_0x5de2df){var _0x5a7392;if(_0x5de2df&&_0x5de2df[_0x85d8('0xa')]){_0x5a7392=_0x5de2df['state'][_0x85d8('0x17')]();switch(_0x5a7392){case _0x85d8('0x18'):_0x5a7392=_0x85d8('0x19');break;case _0x85d8('0x1a'):_0x5a7392=_0x85d8('0x1b');break;}}if(_0x5a7392&&this['voiceStatus']!==_0x5a7392||_0x5de2df[_0x85d8('0x1c')]){this[_0x85d8('0x11')]=_[_0x85d8('0x1d')](moment()['format']('x'));}if(_0x5a7392){this[_0x85d8('0x1e')]=_0x5a7392;}var _0x275832={'id':this['id'],'name':this[_0x85d8('0x6')],'email':this[_0x85d8('0x7')],'accountcode':this[_0x85d8('0x8')],'fullname':this[_0x85d8('0x9')],'state':this[_0x85d8('0xa')],'stateTime':this[_0x85d8('0xc')],'status':this[_0x85d8('0xd')],'address':this[_0x85d8('0xe')],'online':this['online'],'voiceStatus':this[_0x85d8('0x1e')],'voiceStatusTime':this['voiceStatusTime'],'voiceStatusCallerIdNumber':this[_0x85d8('0x12')],'voiceStatusQueue':this[_0x85d8('0x1f')],'interface':this[_0x85d8('0x20')],'onhold':this[_0x85d8('0x13')]};var _0x53ca99=md5(JSON[_0x85d8('0x21')](_0x275832));if(this[_0x85d8('0x2')]!==_0x53ca99){this[_0x85d8('0x2')]=_0x53ca99;io['to'](util[_0x85d8('0x22')]('user:%s',_0x275832[_0x85d8('0x6')]))['emit'](_0x85d8('0x23'),_[_0x85d8('0x24')](_0x275832,[_0x85d8('0x10')]));io[_0x85d8('0x25')]('user:presence',_0x275832);}};module[_0x85d8('0x26')]=Agent;
\ No newline at end of file
+var _0xa4d8=['onhold','local','md5','prototype','updateStatusRealtime','state','toLowerCase','not_inuse','idle','inuse','statePause','toNumber','format','user:%s','emit','user:ami:update','omit','user:presence','ioredis','../../../config/environment','redis','defaults','localhost','socket.io-emitter','name','email','accountcode','fullname','stateTime','status','unknown','address','mobile','interface','online','voiceStatus','voiceStatusTime','voiceStatusCallerIdNumber','voiceStatusQueue'];(function(_0x47ab85,_0x38b5c5){var _0x267043=function(_0x58d58a){while(--_0x58d58a){_0x47ab85['push'](_0x47ab85['shift']());}};_0x267043(++_0x38b5c5);}(_0xa4d8,0x171));var _0x8a4d=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xa4d8[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var util=require('util');var moment=require('moment');var md5=require('md5');var Redis=require(_0x8a4d('0x0'));var config=require(_0x8a4d('0x1'));config[_0x8a4d('0x2')]=_[_0x8a4d('0x3')](config[_0x8a4d('0x2')],{'host':_0x8a4d('0x4'),'port':0x18eb});var io=require(_0x8a4d('0x5'))(new Redis(config['redis']));function Agent(_0x1444bd){this['id']=_0x1444bd['id']||0x0;this['name']=_0x1444bd[_0x8a4d('0x6')]||'';this['email']=_0x1444bd[_0x8a4d('0x7')]||'';this[_0x8a4d('0x8')]=_0x1444bd[_0x8a4d('0x8')]||'';this['fullname']=_0x1444bd[_0x8a4d('0x9')]||'';this['state']='unknown';this[_0x8a4d('0xa')]=0x0;this[_0x8a4d('0xb')]=_0x8a4d('0xc');this[_0x8a4d('0xd')]='';this['phone']='';this[_0x8a4d('0xe')]='';this[_0x8a4d('0xf')]='';this[_0x8a4d('0x10')]=_0x1444bd[_0x8a4d('0x10')]||![];this[_0x8a4d('0x11')]='unknown';this[_0x8a4d('0x12')]=0x0;this[_0x8a4d('0x13')]='';this[_0x8a4d('0x14')]='';this[_0x8a4d('0x15')]=![];this[_0x8a4d('0x16')]=![];this[_0x8a4d('0x17')]='';}Agent[_0x8a4d('0x18')][_0x8a4d('0x19')]=function(_0x662436){var _0x3ac34d;if(_0x662436&&_0x662436[_0x8a4d('0x1a')]){_0x3ac34d=_0x662436['state'][_0x8a4d('0x1b')]();switch(_0x3ac34d){case _0x8a4d('0x1c'):_0x3ac34d=_0x8a4d('0x1d');break;case _0x8a4d('0x1e'):_0x3ac34d='talking';break;}}if(_0x3ac34d&&this[_0x8a4d('0x11')]!==_0x3ac34d||_0x662436[_0x8a4d('0x1f')]){this[_0x8a4d('0x12')]=_[_0x8a4d('0x20')](moment()[_0x8a4d('0x21')]('x'));}if(_0x3ac34d){this[_0x8a4d('0x11')]=_0x3ac34d;}var _0xa02ed0={'id':this['id'],'name':this[_0x8a4d('0x6')],'email':this[_0x8a4d('0x7')],'accountcode':this[_0x8a4d('0x8')],'fullname':this[_0x8a4d('0x9')],'state':this['state'],'stateTime':this[_0x8a4d('0xa')],'status':this[_0x8a4d('0xb')],'address':this[_0x8a4d('0xd')],'online':this['online'],'voiceStatus':this[_0x8a4d('0x11')],'voiceStatusTime':this[_0x8a4d('0x12')],'voiceStatusCallerIdNumber':this['voiceStatusCallerIdNumber'],'voiceStatusQueue':this['voiceStatusQueue'],'interface':this[_0x8a4d('0xf')],'onhold':this['onhold']};var _0x335528=md5(JSON['stringify'](_0xa02ed0));if(this[_0x8a4d('0x17')]!==_0x335528){this[_0x8a4d('0x17')]=_0x335528;io['to'](util[_0x8a4d('0x21')](_0x8a4d('0x22'),_0xa02ed0[_0x8a4d('0x6')]))[_0x8a4d('0x23')](_0x8a4d('0x24'),_[_0x8a4d('0x25')](_0xa02ed0,[_0x8a4d('0x10')]));io['emit'](_0x8a4d('0x26'),_0xa02ed0);}};module['exports']=Agent;
\ No newline at end of file
index 8a11f31..db2f462 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x10d5=['ivrTotalCallsDays','message','sendMessageOneNotActive','active','limitCalls','dialTimezone','dialGlobalInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialOrderByScheduledAt','DESC','dialPrefix','dialRandomLastDigitCallerIdNumber','dialCutDigit','TrunkBackup','Trunk','Interval','SquareProject','dialQueueProject','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','exports','name','type','campaign','originated'];(function(_0x87b0ff,_0x314389){var _0x3bc0b2=function(_0x41682b){while(--_0x41682b){_0x87b0ff['push'](_0x87b0ff['shift']());}};_0x3bc0b2(++_0x314389);}(_0x10d5,0x128));var _0x510d=function(_0x2f6f50,_0x1d21a7){_0x2f6f50=_0x2f6f50-0x0;var _0x2cf365=_0x10d5[_0x2f6f50];return _0x2cf365;};'use strict';function Campaign(_0x33eaa4){this['id']=_0x33eaa4['id']||0x0;this[_0x510d('0x0')]=_0x33eaa4['name']||'';this[_0x510d('0x1')]=_0x33eaa4[_0x510d('0x1')]||_0x510d('0x2');this[_0x510d('0x3')]=0x0;this['temp']=0x0;this['ivrAnswerCallsDay']=0x0;this[_0x510d('0x4')]=0x0;this[_0x510d('0x5')]='';this[_0x510d('0x6')]=!![];this['active']=_0x33eaa4[_0x510d('0x7')];this[_0x510d('0x8')]=_0x33eaa4[_0x510d('0x8')];this[_0x510d('0x9')]=_0x33eaa4['dialTimezone']||null;this['dialGlobalInterval']=_0x33eaa4[_0x510d('0xa')]?_0x33eaa4[_0x510d('0xa')]:null;this[_0x510d('0xb')]=_0x33eaa4['dialOriginateCallerIdName'];this[_0x510d('0xc')]=_0x33eaa4[_0x510d('0xc')];this[_0x510d('0xd')]=_0x33eaa4['dialOriginateTimeout']||0x1e;this[_0x510d('0xe')]=_0x33eaa4[_0x510d('0xe')];this[_0x510d('0xf')]=_0x33eaa4[_0x510d('0xf')];this[_0x510d('0x10')]=_0x33eaa4['dialBusyMaxRetry'];this['dialBusyRetryFrequency']=_0x33eaa4[_0x510d('0x11')];this[_0x510d('0x12')]=_0x33eaa4[_0x510d('0x12')];this[_0x510d('0x13')]=_0x33eaa4[_0x510d('0x13')];this[_0x510d('0x14')]=_0x33eaa4[_0x510d('0x14')];this[_0x510d('0x15')]=_0x33eaa4[_0x510d('0x15')]||0x3;this[_0x510d('0x16')]=_0x33eaa4[_0x510d('0x16')]||0x96;this[_0x510d('0x17')]=_0x33eaa4[_0x510d('0x17')]||0x3;this[_0x510d('0x18')]=_0x33eaa4[_0x510d('0x18')]||0x96;this[_0x510d('0x19')]=_0x33eaa4['dialAbandonedMaxRetry']||0x3;this[_0x510d('0x1a')]=_0x33eaa4[_0x510d('0x1a')]||0x96;this[_0x510d('0x1b')]=_0x33eaa4[_0x510d('0x1b')]||0x3;this['dialMachineRetryFrequency']=_0x33eaa4[_0x510d('0x1c')]||0x96;this[_0x510d('0x1d')]=_0x33eaa4[_0x510d('0x1d')]||0x3;this[_0x510d('0x1e')]=_0x33eaa4[_0x510d('0x1e')]||0x96;this[_0x510d('0x1f')]=_0x33eaa4[_0x510d('0x1f')]||_0x510d('0x20');this[_0x510d('0x21')]=_0x33eaa4[_0x510d('0x21')]||undefined;this['dialRandomLastDigitCallerIdNumber']=_0x33eaa4[_0x510d('0x22')]||undefined;this[_0x510d('0x23')]=_0x33eaa4[_0x510d('0x23')]||undefined;this[_0x510d('0x24')]=_0x33eaa4['TrunkBackup']?_0x33eaa4[_0x510d('0x24')]:undefined;this[_0x510d('0x25')]=_0x33eaa4[_0x510d('0x25')]?_0x33eaa4[_0x510d('0x25')]:undefined;this[_0x510d('0x26')]=_0x33eaa4[_0x510d('0x26')]?_0x33eaa4[_0x510d('0x26')]:undefined;this[_0x510d('0x27')]=_0x33eaa4[_0x510d('0x27')]?_0x33eaa4[_0x510d('0x27')]:undefined;this[_0x510d('0x28')]=_0x33eaa4[_0x510d('0x27')]?_0x33eaa4[_0x510d('0x27')]['name']:undefined;this[_0x510d('0x29')]=_0x33eaa4[_0x510d('0x29')]||![];this['dialAMDInitialSilence']=_0x33eaa4[_0x510d('0x2a')];this[_0x510d('0x2b')]=_0x33eaa4['dialAMDGreeting'];this['dialAMDAfterGreetingSilence']=_0x33eaa4['dialAMDAfterGreetingSilence'];this[_0x510d('0x2c')]=_0x33eaa4[_0x510d('0x2c')];this[_0x510d('0x2d')]=_0x33eaa4[_0x510d('0x2d')];this['dialAMDBetweenWordsSilence']=_0x33eaa4['dialAMDBetweenWordsSilence'];this[_0x510d('0x2e')]=_0x33eaa4[_0x510d('0x2e')];this[_0x510d('0x2f')]=_0x33eaa4[_0x510d('0x2f')];this[_0x510d('0x30')]=_0x33eaa4[_0x510d('0x30')];}module[_0x510d('0x31')]=Campaign;
\ No newline at end of file
+var _0x27ee=['message','active','limitCalls','dialTimezone','dialGlobalInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','dialOrderByScheduledAt','dialPrefix','dialRandomLastDigitCallerIdNumber','dialCutDigit','TrunkBackup','Trunk','Interval','SquareProject','dialQueueProject','dialAMDActive','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','exports','name','type','campaign','temp','ivrAnswerCallsDay','ivrTotalCallsDays'];(function(_0xe9ff15,_0x3f8f34){var _0x448479=function(_0x4cfce0){while(--_0x4cfce0){_0xe9ff15['push'](_0xe9ff15['shift']());}};_0x448479(++_0x3f8f34);}(_0x27ee,0x90));var _0xe27e=function(_0x4896e3,_0x5a8e1b){_0x4896e3=_0x4896e3-0x0;var _0xf06bc=_0x27ee[_0x4896e3];return _0xf06bc;};'use strict';function Campaign(_0x3e41c9){this['id']=_0x3e41c9['id']||0x0;this[_0xe27e('0x0')]=_0x3e41c9[_0xe27e('0x0')]||'';this[_0xe27e('0x1')]=_0x3e41c9[_0xe27e('0x1')]||_0xe27e('0x2');this['originated']=0x0;this[_0xe27e('0x3')]=0x0;this[_0xe27e('0x4')]=0x0;this[_0xe27e('0x5')]=0x0;this[_0xe27e('0x6')]='';this['sendMessageOneNotActive']=!![];this[_0xe27e('0x7')]=_0x3e41c9[_0xe27e('0x7')];this[_0xe27e('0x8')]=_0x3e41c9[_0xe27e('0x8')];this[_0xe27e('0x9')]=_0x3e41c9['dialTimezone']||null;this[_0xe27e('0xa')]=_0x3e41c9[_0xe27e('0xa')]?_0x3e41c9[_0xe27e('0xa')]:null;this['dialOriginateCallerIdName']=_0x3e41c9[_0xe27e('0xb')];this[_0xe27e('0xc')]=_0x3e41c9['dialOriginateCallerIdNumber'];this[_0xe27e('0xd')]=_0x3e41c9[_0xe27e('0xd')]||0x1e;this[_0xe27e('0xe')]=_0x3e41c9[_0xe27e('0xe')];this[_0xe27e('0xf')]=_0x3e41c9['dialCongestionRetryFrequency'];this['dialBusyMaxRetry']=_0x3e41c9[_0xe27e('0x10')];this[_0xe27e('0x11')]=_0x3e41c9[_0xe27e('0x11')];this[_0xe27e('0x12')]=_0x3e41c9[_0xe27e('0x12')];this['dialNoAnswerRetryFrequency']=_0x3e41c9[_0xe27e('0x13')];this[_0xe27e('0x14')]=_0x3e41c9[_0xe27e('0x14')];this[_0xe27e('0x15')]=_0x3e41c9['dialNoSuchNumberMaxRetry']||0x3;this['dialNoSuchNumberRetryFrequency']=_0x3e41c9[_0xe27e('0x16')]||0x96;this[_0xe27e('0x17')]=_0x3e41c9[_0xe27e('0x17')]||0x3;this[_0xe27e('0x18')]=_0x3e41c9[_0xe27e('0x18')]||0x96;this[_0xe27e('0x19')]=_0x3e41c9['dialAbandonedMaxRetry']||0x3;this[_0xe27e('0x1a')]=_0x3e41c9[_0xe27e('0x1a')]||0x96;this[_0xe27e('0x1b')]=_0x3e41c9['dialMachineMaxRetry']||0x3;this[_0xe27e('0x1c')]=_0x3e41c9['dialMachineRetryFrequency']||0x96;this[_0xe27e('0x1d')]=_0x3e41c9['dialAgentRejectMaxRetry']||0x3;this[_0xe27e('0x1e')]=_0x3e41c9[_0xe27e('0x1e')]||0x96;this[_0xe27e('0x1f')]=_0x3e41c9['dialOrderByScheduledAt']||'DESC';this[_0xe27e('0x20')]=_0x3e41c9[_0xe27e('0x20')]||undefined;this[_0xe27e('0x21')]=_0x3e41c9['dialRandomLastDigitCallerIdNumber']||undefined;this[_0xe27e('0x22')]=_0x3e41c9['dialCutDigit']||undefined;this[_0xe27e('0x23')]=_0x3e41c9[_0xe27e('0x23')]?_0x3e41c9[_0xe27e('0x23')]:undefined;this['Trunk']=_0x3e41c9[_0xe27e('0x24')]?_0x3e41c9[_0xe27e('0x24')]:undefined;this[_0xe27e('0x25')]=_0x3e41c9[_0xe27e('0x25')]?_0x3e41c9[_0xe27e('0x25')]:undefined;this[_0xe27e('0x26')]=_0x3e41c9[_0xe27e('0x26')]?_0x3e41c9[_0xe27e('0x26')]:undefined;this[_0xe27e('0x27')]=_0x3e41c9['SquareProject']?_0x3e41c9['SquareProject'][_0xe27e('0x0')]:undefined;this[_0xe27e('0x28')]=_0x3e41c9['dialAMDActive']||![];this['dialAMDInitialSilence']=_0x3e41c9['dialAMDInitialSilence'];this[_0xe27e('0x29')]=_0x3e41c9[_0xe27e('0x29')];this['dialAMDAfterGreetingSilence']=_0x3e41c9[_0xe27e('0x2a')];this[_0xe27e('0x2b')]=_0x3e41c9['dialAMDTotalAnalysisTime'];this[_0xe27e('0x2c')]=_0x3e41c9[_0xe27e('0x2c')];this[_0xe27e('0x2d')]=_0x3e41c9[_0xe27e('0x2d')];this[_0xe27e('0x2e')]=_0x3e41c9[_0xe27e('0x2e')];this[_0xe27e('0x2f')]=_0x3e41c9['dialAMDSilenceThreshold'];this[_0xe27e('0x30')]=_0x3e41c9[_0xe27e('0x30')];}module[_0xe27e('0x31')]=Campaign;
\ No newline at end of file
index a6de76e..0a023db 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x23b3=['context','uniqueid','linkedid','exten','answertime','unmanaged','abandoned','lastdata','duration','billableseconds','type','monitor','queue','transfercalleridnum','transferconnectedlinenum','transferType','mohtime','starttime','channel','calleridnum','calleridname','connectedlinenum','connectedlinename','accountcode'];(function(_0x11c718,_0x1959c8){var _0x58c46a=function(_0xb76c88){while(--_0xb76c88){_0x11c718['push'](_0x11c718['shift']());}};_0x58c46a(++_0x1959c8);}(_0x23b3,0x101));var _0x323b=function(_0x685346,_0x3ef2e5){_0x685346=_0x685346-0x0;var _0x52e15b=_0x23b3[_0x685346];return _0x52e15b;};'use strict';function Channel(){this[_0x323b('0x0')]=null;this[_0x323b('0x1')]='';this['destinationchannel']='';this[_0x323b('0x2')]=0x0;this[_0x323b('0x3')]='';this[_0x323b('0x4')]=undefined;this[_0x323b('0x5')]=undefined;this[_0x323b('0x6')]=0x0;this[_0x323b('0x7')]='';this[_0x323b('0x8')]=0x0;this[_0x323b('0x9')]=0x0;this[_0x323b('0xa')]=0x0;this['answered']=![];this[_0x323b('0xb')]=null;this['endtime']=null;this[_0x323b('0xc')]=![];this[_0x323b('0xd')]=![];this['lastapplication']='';this[_0x323b('0xe')]='';this[_0x323b('0xf')]=0x0;this[_0x323b('0x10')]=0x0;this['holdtime']=0x0;this[_0x323b('0x11')]=null;this['tag']=null;this['disposition']=null;this[_0x323b('0x12')]=![];this['monitorFilename']=null;this[_0x323b('0x13')]=null;this['monitors']=[];this[_0x323b('0x14')]=undefined;this[_0x323b('0x15')]=undefined;this[_0x323b('0x16')]=undefined;this[_0x323b('0x17')]=0x0;}module['exports']=Channel;
\ No newline at end of file
+var _0x5b12=['queue','monitors','transfercalleridnum','transferconnectedlinenum','transferType','mohtime','exports','starttime','channel','destinationchannel','calleridname','connectedlinename','accountcode','uniqueid','answered','unmanaged','abandoned','lastapplication','lastdata','duration','billableseconds','holdtime','type','disposition','monitor','monitorFilename'];(function(_0x45c9f7,_0x586d4b){var _0x3da4d7=function(_0xc73d66){while(--_0xc73d66){_0x45c9f7['push'](_0x45c9f7['shift']());}};_0x3da4d7(++_0x586d4b);}(_0x5b12,0xa3));var _0x25b1=function(_0x236929,_0x5bb511){_0x236929=_0x236929-0x0;var _0xca8a93=_0x5b12[_0x236929];return _0xca8a93;};'use strict';function Channel(){this[_0x25b1('0x0')]=null;this[_0x25b1('0x1')]='';this[_0x25b1('0x2')]='';this['calleridnum']=0x0;this[_0x25b1('0x3')]='';this['connectedlinenum']=undefined;this[_0x25b1('0x4')]=undefined;this[_0x25b1('0x5')]=0x0;this['context']='';this[_0x25b1('0x6')]=0x0;this['linkedid']=0x0;this['exten']=0x0;this[_0x25b1('0x7')]=![];this['answertime']=null;this['endtime']=null;this[_0x25b1('0x8')]=![];this[_0x25b1('0x9')]=![];this[_0x25b1('0xa')]='';this[_0x25b1('0xb')]='';this[_0x25b1('0xc')]=0x0;this[_0x25b1('0xd')]=0x0;this[_0x25b1('0xe')]=0x0;this[_0x25b1('0xf')]=null;this['tag']=null;this[_0x25b1('0x10')]=null;this[_0x25b1('0x11')]=![];this[_0x25b1('0x12')]=null;this[_0x25b1('0x13')]=null;this[_0x25b1('0x14')]=[];this[_0x25b1('0x15')]=undefined;this[_0x25b1('0x16')]=undefined;this[_0x25b1('0x17')]=undefined;this[_0x25b1('0x18')]=0x0;}module[_0x25b1('0x19')]=Channel;
\ No newline at end of file
index da95eb2..8b14104 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x34f0=['username','remoteUri','authType','password','consumerKey','consumerSecret','token','tokenSecret','type','serverUrl','Configurations','exports','name'];(function(_0x2ab688,_0x5236dd){var _0xfb5b50=function(_0x23e2f5){while(--_0x23e2f5){_0x2ab688['push'](_0x2ab688['shift']());}};_0xfb5b50(++_0x5236dd);}(_0x34f0,0x74));var _0x034f=function(_0x3940eb,_0xc269d4){_0x3940eb=_0x3940eb-0x0;var _0x3832dc=_0x34f0[_0x3940eb];return _0x3832dc;};'use strict';function DeskAccount(_0x26fa33){this['id']=_0x26fa33['id']||0x0;this[_0x034f('0x0')]=_0x26fa33['name']||'';this[_0x034f('0x1')]=_0x26fa33['username']||'';this[_0x034f('0x2')]=_0x26fa33[_0x034f('0x2')]||'';this[_0x034f('0x3')]=_0x26fa33['authType']||'';this['password']=_0x26fa33[_0x034f('0x4')]||'';this[_0x034f('0x5')]=_0x26fa33[_0x034f('0x5')]||'';this[_0x034f('0x6')]=_0x26fa33['consumerSecret']||'';this[_0x034f('0x7')]=_0x26fa33[_0x034f('0x7')]||'';this[_0x034f('0x8')]=_0x26fa33[_0x034f('0x8')]||'';this['type']=_0x26fa33[_0x034f('0x9')]||'';this[_0x034f('0xa')]=_0x26fa33['serverUrl']||'';this['Configurations']=_0x26fa33[_0x034f('0xb')]||{};}module[_0x034f('0xc')]=DeskAccount;
\ No newline at end of file
+var _0xb817=['Configurations','exports','name','username','remoteUri','authType','password','consumerKey','consumerSecret','token','tokenSecret','type','serverUrl'];(function(_0x54cc79,_0x12707c){var _0x55c76f=function(_0x456c30){while(--_0x456c30){_0x54cc79['push'](_0x54cc79['shift']());}};_0x55c76f(++_0x12707c);}(_0xb817,0xab));var _0x7b81=function(_0x167cc1,_0x56ef5a){_0x167cc1=_0x167cc1-0x0;var _0x10bc4b=_0xb817[_0x167cc1];return _0x10bc4b;};'use strict';function DeskAccount(_0x54295b){this['id']=_0x54295b['id']||0x0;this['name']=_0x54295b[_0x7b81('0x0')]||'';this[_0x7b81('0x1')]=_0x54295b['username']||'';this[_0x7b81('0x2')]=_0x54295b[_0x7b81('0x2')]||'';this[_0x7b81('0x3')]=_0x54295b[_0x7b81('0x3')]||'';this[_0x7b81('0x4')]=_0x54295b['password']||'';this[_0x7b81('0x5')]=_0x54295b[_0x7b81('0x5')]||'';this['consumerSecret']=_0x54295b[_0x7b81('0x6')]||'';this[_0x7b81('0x7')]=_0x54295b[_0x7b81('0x7')]||'';this[_0x7b81('0x8')]=_0x54295b[_0x7b81('0x8')]||'';this[_0x7b81('0x9')]=_0x54295b[_0x7b81('0x9')]||'';this[_0x7b81('0xa')]=_0x54295b[_0x7b81('0xa')]||'';this[_0x7b81('0xb')]=_0x54295b[_0x7b81('0xb')]||{};}module[_0x7b81('0xc')]=DeskAccount;
\ No newline at end of file
index a522e6a..373fde3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb16b=['clientSecret','serverUrl','modernAuthentication','Configurations','CloudProvider','exports','name','username','password','remoteUri','tenantId','clientId'];(function(_0x26c87f,_0x3dcff5){var _0x13efe3=function(_0x44f4dd){while(--_0x44f4dd){_0x26c87f['push'](_0x26c87f['shift']());}};_0x13efe3(++_0x3dcff5);}(_0xb16b,0x10e));var _0xbb16=function(_0x39cff5,_0x234f0c){_0x39cff5=_0x39cff5-0x0;var _0x430437=_0xb16b[_0x39cff5];return _0x430437;};'use strict';function Dynamics365Account(_0x62ccbf){this['id']=_0x62ccbf['id']||0x0;this[_0xbb16('0x0')]=_0x62ccbf['name']||'';this[_0xbb16('0x1')]=_0x62ccbf['username']||'';this[_0xbb16('0x2')]=_0x62ccbf[_0xbb16('0x2')]||'';this[_0xbb16('0x3')]=_0x62ccbf['remoteUri']||'';this[_0xbb16('0x4')]=_0x62ccbf[_0xbb16('0x4')]||'';this['clientId']=_0x62ccbf[_0xbb16('0x5')]||'';this[_0xbb16('0x6')]=_0x62ccbf['clientSecret']||{};this['serverUrl']=_0x62ccbf[_0xbb16('0x7')]||'';this[_0xbb16('0x8')]=_0x62ccbf[_0xbb16('0x8')]||![];this[_0xbb16('0x9')]=_0x62ccbf[_0xbb16('0x9')]||{};this[_0xbb16('0xa')]=_0x62ccbf[_0xbb16('0xa')]||{};}module[_0xbb16('0xb')]=Dynamics365Account;
\ No newline at end of file
+var _0x3b47=['password','remoteUri','tenantId','clientId','clientSecret','serverUrl','modernAuthentication','Configurations','CloudProvider','exports','name','username'];(function(_0x4812ba,_0x5a186a){var _0x39fd8f=function(_0x277791){while(--_0x277791){_0x4812ba['push'](_0x4812ba['shift']());}};_0x39fd8f(++_0x5a186a);}(_0x3b47,0x1c6));var _0x73b4=function(_0x409ef4,_0x435589){_0x409ef4=_0x409ef4-0x0;var _0x50036b=_0x3b47[_0x409ef4];return _0x50036b;};'use strict';function Dynamics365Account(_0x1169d9){this['id']=_0x1169d9['id']||0x0;this[_0x73b4('0x0')]=_0x1169d9[_0x73b4('0x0')]||'';this[_0x73b4('0x1')]=_0x1169d9[_0x73b4('0x1')]||'';this[_0x73b4('0x2')]=_0x1169d9[_0x73b4('0x2')]||'';this[_0x73b4('0x3')]=_0x1169d9[_0x73b4('0x3')]||'';this[_0x73b4('0x4')]=_0x1169d9[_0x73b4('0x4')]||'';this[_0x73b4('0x5')]=_0x1169d9[_0x73b4('0x5')]||'';this[_0x73b4('0x6')]=_0x1169d9[_0x73b4('0x6')]||{};this[_0x73b4('0x7')]=_0x1169d9[_0x73b4('0x7')]||'';this[_0x73b4('0x8')]=_0x1169d9[_0x73b4('0x8')]||![];this[_0x73b4('0x9')]=_0x1169d9['Configurations']||{};this[_0x73b4('0xa')]=_0x1169d9['CloudProvider']||{};}module[_0x73b4('0xb')]=Dynamics365Account;
\ No newline at end of file
index ea06c1c..8f14772 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x26e7=['t38timeout','tech','Trunk','ListId','key','name','description','ecm','localstationid','minrate','maxrate','modem','v17,v27,v29','gateway','faxdetect'];(function(_0x321bb2,_0x202794){var _0x9c12ed=function(_0x263dd3){while(--_0x263dd3){_0x321bb2['push'](_0x321bb2['shift']());}};_0x9c12ed(++_0x202794);}(_0x26e7,0xaa));var _0x726e=function(_0x5de532,_0x2941c4){_0x5de532=_0x5de532-0x0;var _0x4e9192=_0x26e7[_0x5de532];return _0x4e9192;};'use strict';function FaxAccount(_0x44dce7){this['id']=_0x44dce7['id']||0x0;this['name']=_0x44dce7[_0x726e('0x0')]||'';this[_0x726e('0x1')]=_0x44dce7[_0x726e('0x1')];this[_0x726e('0x2')]=_0x44dce7[_0x726e('0x2')];this['headerinfo']=_0x44dce7['headerinfo'];this[_0x726e('0x3')]=_0x44dce7[_0x726e('0x3')];this[_0x726e('0x4')]=_0x44dce7[_0x726e('0x4')]||0x960;this['maxrate']=_0x44dce7[_0x726e('0x5')]||0x3840;this[_0x726e('0x6')]=_0x44dce7[_0x726e('0x6')]||_0x726e('0x7');this[_0x726e('0x8')]=_0x44dce7[_0x726e('0x8')]||'no';this[_0x726e('0x9')]=_0x44dce7[_0x726e('0x9')]||'no';this[_0x726e('0xa')]=_0x44dce7['t38timeout']||0x1388;this[_0x726e('0xb')]=_0x44dce7['tech']||'SIP';this[_0x726e('0xc')]=_0x44dce7['Trunk']?_0x44dce7[_0x726e('0xc')]:undefined;this[_0x726e('0xd')]=_0x44dce7[_0x726e('0xd')];this['key']=_0x44dce7[_0x726e('0xe')];}module['exports']=FaxAccount;
\ No newline at end of file
+var _0xd367=['localstationid','minrate','maxrate','modem','v17,v27,v29','gateway','t38timeout','tech','SIP','Trunk','ListId','exports','name','description','ecm','headerinfo'];(function(_0x467140,_0x6e75d1){var _0x484984=function(_0x1f2bbd){while(--_0x1f2bbd){_0x467140['push'](_0x467140['shift']());}};_0x484984(++_0x6e75d1);}(_0xd367,0x1dc));var _0x7d36=function(_0x19e35c,_0x29cd1e){_0x19e35c=_0x19e35c-0x0;var _0x3e1fe8=_0xd367[_0x19e35c];return _0x3e1fe8;};'use strict';function FaxAccount(_0x8b657a){this['id']=_0x8b657a['id']||0x0;this[_0x7d36('0x0')]=_0x8b657a[_0x7d36('0x0')]||'';this[_0x7d36('0x1')]=_0x8b657a['description'];this['ecm']=_0x8b657a[_0x7d36('0x2')];this[_0x7d36('0x3')]=_0x8b657a[_0x7d36('0x3')];this[_0x7d36('0x4')]=_0x8b657a[_0x7d36('0x4')];this[_0x7d36('0x5')]=_0x8b657a[_0x7d36('0x5')]||0x960;this[_0x7d36('0x6')]=_0x8b657a[_0x7d36('0x6')]||0x3840;this[_0x7d36('0x7')]=_0x8b657a['modem']||_0x7d36('0x8');this[_0x7d36('0x9')]=_0x8b657a[_0x7d36('0x9')]||'no';this['faxdetect']=_0x8b657a['faxdetect']||'no';this[_0x7d36('0xa')]=_0x8b657a['t38timeout']||0x1388;this[_0x7d36('0xb')]=_0x8b657a['tech']||_0x7d36('0xc');this[_0x7d36('0xd')]=_0x8b657a[_0x7d36('0xd')]?_0x8b657a[_0x7d36('0xd')]:undefined;this[_0x7d36('0xe')]=_0x8b657a[_0x7d36('0xe')];this['key']=_0x8b657a['key'];}module[_0x7d36('0xf')]=FaxAccount;
\ No newline at end of file
index bb6acee..68a442c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9dce=['username','apiKey','token','remoteUri','serverUrl','Configurations','exports','name'];(function(_0x2fe51b,_0x3bb671){var _0x3465c8=function(_0x244ae4){while(--_0x244ae4){_0x2fe51b['push'](_0x2fe51b['shift']());}};_0x3465c8(++_0x3bb671);}(_0x9dce,0x177));var _0xe9dc=function(_0x281a7d,_0x416678){_0x281a7d=_0x281a7d-0x0;var _0x2fd7b5=_0x9dce[_0x281a7d];return _0x2fd7b5;};'use strict';function FreshdeskAccount(_0x48fb54){this['id']=_0x48fb54['id']||0x0;this['name']=_0x48fb54[_0xe9dc('0x0')]||'';this[_0xe9dc('0x1')]=_0x48fb54['username']||'';this[_0xe9dc('0x2')]=_0x48fb54[_0xe9dc('0x3')]||'';this['remoteUri']=_0x48fb54[_0xe9dc('0x4')]||'';this[_0xe9dc('0x5')]=_0x48fb54[_0xe9dc('0x5')]||'';this['Configurations']=_0x48fb54[_0xe9dc('0x6')]||{};}module[_0xe9dc('0x7')]=FreshdeskAccount;
\ No newline at end of file
+var _0x5d4d=['token','remoteUri','serverUrl','Configurations','exports','name','username'];(function(_0xe59625,_0x14ba71){var _0x480f98=function(_0x47e425){while(--_0x47e425){_0xe59625['push'](_0xe59625['shift']());}};_0x480f98(++_0x14ba71);}(_0x5d4d,0x1b0));var _0xd5d4=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x5d4d[_0x3dd15e];return _0x231fd0;};'use strict';function FreshdeskAccount(_0x1e9923){this['id']=_0x1e9923['id']||0x0;this['name']=_0x1e9923[_0xd5d4('0x0')]||'';this[_0xd5d4('0x1')]=_0x1e9923[_0xd5d4('0x1')]||'';this['apiKey']=_0x1e9923[_0xd5d4('0x2')]||'';this[_0xd5d4('0x3')]=_0x1e9923[_0xd5d4('0x3')]||'';this['serverUrl']=_0x1e9923[_0xd5d4('0x4')]||'';this[_0xd5d4('0x5')]=_0x1e9923[_0xd5d4('0x5')]||{};}module[_0xd5d4('0x6')]=FreshdeskAccount;
\ No newline at end of file
index b7face9..ebb4e64 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6726=['remoteUri','serverUrl','Configurations','name','username','apiKey'];(function(_0x181ef4,_0x4c25fc){var _0x410b3d=function(_0x353010){while(--_0x353010){_0x181ef4['push'](_0x181ef4['shift']());}};_0x410b3d(++_0x4c25fc);}(_0x6726,0xdb));var _0x6672=function(_0x1fc84d,_0x3f469d){_0x1fc84d=_0x1fc84d-0x0;var _0x2658fa=_0x6726[_0x1fc84d];return _0x2658fa;};'use strict';function FreshsalesAccount(_0xc4b93b){this['id']=_0xc4b93b['id']||0x0;this[_0x6672('0x0')]=_0xc4b93b[_0x6672('0x0')]||'';this['username']=_0xc4b93b[_0x6672('0x1')]||'';this[_0x6672('0x2')]=_0xc4b93b['token']||'';this[_0x6672('0x3')]=_0xc4b93b['remoteUri']||'';this[_0x6672('0x4')]=_0xc4b93b[_0x6672('0x4')]||'';this[_0x6672('0x5')]=_0xc4b93b[_0x6672('0x5')]||{};}module['exports']=FreshsalesAccount;
\ No newline at end of file
+var _0x102b=['apiKey','token','remoteUri','serverUrl','Configurations','exports','name','username'];(function(_0x40ac5e,_0x2de228){var _0x2839d6=function(_0x123d47){while(--_0x123d47){_0x40ac5e['push'](_0x40ac5e['shift']());}};_0x2839d6(++_0x2de228);}(_0x102b,0x1be));var _0xb102=function(_0x18d1bd,_0x5b3dbd){_0x18d1bd=_0x18d1bd-0x0;var _0x1fba0f=_0x102b[_0x18d1bd];return _0x1fba0f;};'use strict';function FreshsalesAccount(_0x18269b){this['id']=_0x18269b['id']||0x0;this[_0xb102('0x0')]=_0x18269b['name']||'';this[_0xb102('0x1')]=_0x18269b[_0xb102('0x1')]||'';this[_0xb102('0x2')]=_0x18269b[_0xb102('0x3')]||'';this[_0xb102('0x4')]=_0x18269b[_0xb102('0x4')]||'';this[_0xb102('0x5')]=_0x18269b[_0xb102('0x5')]||'';this['Configurations']=_0x18269b[_0xb102('0x6')]||{};}module[_0xb102('0x7')]=FreshsalesAccount;
\ No newline at end of file
index b2aaa16..8c76a63 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7723=['exten','holdtime','assigned','lastAssignedTo','routealias','mohtime','exports','type','inbound','calleridnum','queue','queuecallerjoinAt','queuecallerleaveAt','position','queuecallerabandon','queuecallerabandonAt','queuecallercomplete','queuecallerexitAt','originalposition','channel','connectedlinename','accountcode'];(function(_0x5b6a86,_0x59489c){var _0x425888=function(_0x38fdfd){while(--_0x38fdfd){_0x5b6a86['push'](_0x5b6a86['shift']());}};_0x425888(++_0x59489c);}(_0x7723,0x75));var _0x3772=function(_0xccf6a7,_0x316308){_0xccf6a7=_0xccf6a7-0x0;var _0x19ab2d=_0x7723[_0xccf6a7];return _0x19ab2d;};'use strict';function QueueReport(){this[_0x3772('0x0')]=_0x3772('0x1');this['uniqueid']='';this[_0x3772('0x2')]='';this['calleridname']='';this[_0x3772('0x3')]='';this[_0x3772('0x4')]=null;this[_0x3772('0x5')]=null;this[_0x3772('0x6')]=0x1;this['count']=0x1;this[_0x3772('0x7')]=![];this[_0x3772('0x8')]=null;this[_0x3772('0x9')]=![];this['queuecallercompleteAt']=null;this['queuecallerexit']=![];this[_0x3772('0xa')]=null;this[_0x3772('0xb')]=0x1;this[_0x3772('0xc')]='';this['connectedlinenum']='';this[_0x3772('0xd')]='';this[_0x3772('0xe')]='';this['context']='';this[_0x3772('0xf')]='';this['priority']='';this[_0x3772('0x10')]=0x0;this[_0x3772('0x11')]=![];this[_0x3772('0x12')]='';this['motionChannel']='voice';this[_0x3772('0x13')]=null;this[_0x3772('0x14')]=0x0;this['variables']={};}module[_0x3772('0x15')]=QueueReport;
\ No newline at end of file
+var _0xad9d=['queue','queuecallerjoinAt','position','count','queuecallerabandon','queuecallerabandonAt','queuecallercomplete','queuecallercompleteAt','queuecallerexit','queuecallerexitAt','channel','connectedlinenum','connectedlinename','priority','holdtime','assigned','lastAssignedTo','motionChannel','voice','routealias','mohtime','variables','type','inbound'];(function(_0x11bb1a,_0x379f75){var _0x1bcece=function(_0x46c666){while(--_0x46c666){_0x11bb1a['push'](_0x11bb1a['shift']());}};_0x1bcece(++_0x379f75);}(_0xad9d,0x136));var _0xdad9=function(_0x2b5a00,_0xc8506a){_0x2b5a00=_0x2b5a00-0x0;var _0x495b0e=_0xad9d[_0x2b5a00];return _0x495b0e;};'use strict';function QueueReport(){this[_0xdad9('0x0')]=_0xdad9('0x1');this['uniqueid']='';this['calleridnum']='';this['calleridname']='';this[_0xdad9('0x2')]='';this[_0xdad9('0x3')]=null;this['queuecallerleaveAt']=null;this[_0xdad9('0x4')]=0x1;this[_0xdad9('0x5')]=0x1;this[_0xdad9('0x6')]=![];this[_0xdad9('0x7')]=null;this[_0xdad9('0x8')]=![];this[_0xdad9('0x9')]=null;this[_0xdad9('0xa')]=![];this[_0xdad9('0xb')]=null;this['originalposition']=0x1;this[_0xdad9('0xc')]='';this[_0xdad9('0xd')]='';this[_0xdad9('0xe')]='';this['accountcode']='';this['context']='';this['exten']='';this[_0xdad9('0xf')]='';this[_0xdad9('0x10')]=0x0;this[_0xdad9('0x11')]=![];this[_0xdad9('0x12')]='';this[_0xdad9('0x13')]=_0xdad9('0x14');this[_0xdad9('0x15')]=null;this[_0xdad9('0x16')]=0x0;this[_0xdad9('0x17')]={};}module['exports']=QueueReport;
\ No newline at end of file
index 8d45e92..d42ef0a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe540=['Configurations','exports','name','username','remoteUri','password','clientId','clientSecret','securityToken','type','integrationTab','serverUrl'];(function(_0x2d2c16,_0x4e88b6){var _0x53f2fb=function(_0x6b6dac){while(--_0x6b6dac){_0x2d2c16['push'](_0x2d2c16['shift']());}};_0x53f2fb(++_0x4e88b6);}(_0xe540,0xe6));var _0x0e54=function(_0x4ae6ef,_0xc2af80){_0x4ae6ef=_0x4ae6ef-0x0;var _0x3cbb4e=_0xe540[_0x4ae6ef];return _0x3cbb4e;};'use strict';function SalesforceAccount(_0x5424d9){this['id']=_0x5424d9['id']||0x0;this[_0x0e54('0x0')]=_0x5424d9['name']||'';this[_0x0e54('0x1')]=_0x5424d9[_0x0e54('0x1')]||'';this[_0x0e54('0x2')]=_0x5424d9[_0x0e54('0x2')]||'';this[_0x0e54('0x3')]=_0x5424d9[_0x0e54('0x3')]||'';this[_0x0e54('0x4')]=_0x5424d9[_0x0e54('0x4')]||'';this[_0x0e54('0x5')]=_0x5424d9[_0x0e54('0x5')]||'';this['securityToken']=_0x5424d9[_0x0e54('0x6')]||'';this[_0x0e54('0x7')]=_0x5424d9[_0x0e54('0x7')]||_0x0e54('0x8');this['serverUrl']=_0x5424d9[_0x0e54('0x9')]||'';this[_0x0e54('0xa')]=_0x5424d9[_0x0e54('0xa')]||{};}module[_0x0e54('0xb')]=SalesforceAccount;
\ No newline at end of file
+var _0x4996=['exports','name','username','remoteUri','password','clientId','clientSecret','securityToken','serverUrl','Configurations'];(function(_0x5a0bf0,_0x13c287){var _0x116153=function(_0x69055b){while(--_0x69055b){_0x5a0bf0['push'](_0x5a0bf0['shift']());}};_0x116153(++_0x13c287);}(_0x4996,0x173));var _0x6499=function(_0x32be62,_0x22e6fd){_0x32be62=_0x32be62-0x0;var _0x1a37e9=_0x4996[_0x32be62];return _0x1a37e9;};'use strict';function SalesforceAccount(_0x460868){this['id']=_0x460868['id']||0x0;this[_0x6499('0x0')]=_0x460868[_0x6499('0x0')]||'';this[_0x6499('0x1')]=_0x460868[_0x6499('0x1')]||'';this[_0x6499('0x2')]=_0x460868[_0x6499('0x2')]||'';this[_0x6499('0x3')]=_0x460868[_0x6499('0x3')]||'';this['clientId']=_0x460868[_0x6499('0x4')]||'';this[_0x6499('0x5')]=_0x460868[_0x6499('0x5')]||'';this[_0x6499('0x6')]=_0x460868['securityToken']||'';this['type']=_0x460868['type']||'integrationTab';this[_0x6499('0x7')]=_0x460868[_0x6499('0x7')]||'';this[_0x6499('0x8')]=_0x460868['Configurations']||{};}module[_0x6499('0x9')]=SalesforceAccount;
\ No newline at end of file
index 5d6db78..3390037 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x470b=['remoteUri','serverUrl','exports','name','username','password'];(function(_0x239a37,_0x1675c8){var _0x46db3c=function(_0x3c02a2){while(--_0x3c02a2){_0x239a37['push'](_0x239a37['shift']());}};_0x46db3c(++_0x1675c8);}(_0x470b,0x141));var _0xb470=function(_0x5327fe,_0x18753c){_0x5327fe=_0x5327fe-0x0;var _0x504f13=_0x470b[_0x5327fe];return _0x504f13;};'use strict';function ServicenowAccount(_0x2c672e){this['id']=_0x2c672e['id']||0x0;this[_0xb470('0x0')]=_0x2c672e[_0xb470('0x0')]||'';this[_0xb470('0x1')]=_0x2c672e[_0xb470('0x1')]||'';this['password']=_0x2c672e[_0xb470('0x2')]||'';this[_0xb470('0x3')]=_0x2c672e[_0xb470('0x3')]||'';this['serverUrl']=_0x2c672e[_0xb470('0x4')]||'';this['Configurations']=_0x2c672e['Configurations']||{};}module[_0xb470('0x5')]=ServicenowAccount;
\ No newline at end of file
+var _0x98b6=['remoteUri','serverUrl','Configurations','exports','name','username','password'];(function(_0x342baa,_0x4a110f){var _0x1208f3=function(_0x56a645){while(--_0x56a645){_0x342baa['push'](_0x342baa['shift']());}};_0x1208f3(++_0x4a110f);}(_0x98b6,0x9e));var _0x698b=function(_0x4cf5d9,_0x47e2fd){_0x4cf5d9=_0x4cf5d9-0x0;var _0xb2749a=_0x98b6[_0x4cf5d9];return _0xb2749a;};'use strict';function ServicenowAccount(_0x4e054a){this['id']=_0x4e054a['id']||0x0;this[_0x698b('0x0')]=_0x4e054a['name']||'';this[_0x698b('0x1')]=_0x4e054a[_0x698b('0x1')]||'';this[_0x698b('0x2')]=_0x4e054a[_0x698b('0x2')]||'';this[_0x698b('0x3')]=_0x4e054a[_0x698b('0x3')]||'';this[_0x698b('0x4')]=_0x4e054a[_0x698b('0x4')]||'';this[_0x698b('0x5')]=_0x4e054a['Configurations']||{};}module[_0x698b('0x6')]=ServicenowAccount;
\ No newline at end of file
index 0371c8c..070c7d7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xebe7=['remoteUri','Configurations','exports','name','username','password'];(function(_0x1d2bbb,_0x202267){var _0x38082b=function(_0x27d153){while(--_0x27d153){_0x1d2bbb['push'](_0x1d2bbb['shift']());}};_0x38082b(++_0x202267);}(_0xebe7,0x165));var _0x7ebe=function(_0x44d0ff,_0x59fbb2){_0x44d0ff=_0x44d0ff-0x0;var _0x5e8a6c=_0xebe7[_0x44d0ff];return _0x5e8a6c;};'use strict';function SugarcrmAccount(_0x260981){this['id']=_0x260981['id']||0x0;this[_0x7ebe('0x0')]=_0x260981[_0x7ebe('0x0')]||'';this['username']=_0x260981[_0x7ebe('0x1')]||'';this[_0x7ebe('0x2')]=_0x260981['password']||'';this['remoteUri']=_0x260981[_0x7ebe('0x3')]||'';this['serverUrl']=_0x260981['serverUrl']||'';this[_0x7ebe('0x4')]=_0x260981['Configurations']||{};}module[_0x7ebe('0x5')]=SugarcrmAccount;
\ No newline at end of file
+var _0xf3be=['exports','name','username','password','serverUrl','Configurations'];(function(_0x182ffd,_0x123c11){var _0x399139=function(_0x452999){while(--_0x452999){_0x182ffd['push'](_0x182ffd['shift']());}};_0x399139(++_0x123c11);}(_0xf3be,0x1e1));var _0xef3b=function(_0x3a0b1a,_0x1de176){_0x3a0b1a=_0x3a0b1a-0x0;var _0x118d7f=_0xf3be[_0x3a0b1a];return _0x118d7f;};'use strict';function SugarcrmAccount(_0x4da225){this['id']=_0x4da225['id']||0x0;this[_0xef3b('0x0')]=_0x4da225[_0xef3b('0x0')]||'';this[_0xef3b('0x1')]=_0x4da225['username']||'';this[_0xef3b('0x2')]=_0x4da225['password']||'';this['remoteUri']=_0x4da225['remoteUri']||'';this['serverUrl']=_0x4da225[_0xef3b('0x3')]||'';this[_0xef3b('0x4')]=_0x4da225['Configurations']||{};}module[_0xef3b('0x5')]=SugarcrmAccount;
\ No newline at end of file
index f268af0..f758ad4 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3868=['name','accountcode','state','unknown','stateTime','status','exports'];(function(_0x461058,_0x37094f){var _0xa1003a=function(_0x2463e5){while(--_0x2463e5){_0x461058['push'](_0x461058['shift']());}};_0xa1003a(++_0x37094f);}(_0x3868,0x118));var _0x8386=function(_0x4eb582,_0x272ade){_0x4eb582=_0x4eb582-0x0;var _0x500011=_0x3868[_0x4eb582];return _0x500011;};'use strict';function Telephone(_0x4fde78){this['id']=_0x4fde78['id']||0x0;this[_0x8386('0x0')]=_0x4fde78[_0x8386('0x0')]||'';this[_0x8386('0x1')]=_0x4fde78[_0x8386('0x1')]||'';this[_0x8386('0x2')]=_0x8386('0x3');this[_0x8386('0x4')]=0x0;this[_0x8386('0x5')]=_0x8386('0x3');this['address']='';}module[_0x8386('0x6')]=Telephone;
\ No newline at end of file
+var _0x7f31=['address','exports','name','accountcode','state','unknown','status'];(function(_0x373279,_0x498af0){var _0x13e6a0=function(_0x25ae7d){while(--_0x25ae7d){_0x373279['push'](_0x373279['shift']());}};_0x13e6a0(++_0x498af0);}(_0x7f31,0x13d));var _0x17f3=function(_0x189d3c,_0x5efebf){_0x189d3c=_0x189d3c-0x0;var _0x485959=_0x7f31[_0x189d3c];return _0x485959;};'use strict';function Telephone(_0x210a77){this['id']=_0x210a77['id']||0x0;this[_0x17f3('0x0')]=_0x210a77[_0x17f3('0x0')]||'';this[_0x17f3('0x1')]=_0x210a77[_0x17f3('0x1')]||'';this[_0x17f3('0x2')]=_0x17f3('0x3');this['stateTime']=0x0;this[_0x17f3('0x4')]=_0x17f3('0x3');this[_0x17f3('0x5')]='';}module[_0x17f3('0x6')]=Telephone;
\ No newline at end of file
index 0148150..507b567 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['exports','name'];(function(_0x5493d6,_0x3aea46){var _0x87d253=function(_0x3a7596){while(--_0x3a7596){_0x5493d6['push'](_0x5493d6['shift']());}};_0x87d253(++_0x3aea46);}(_0xa9e0,0x123));var _0x0a9e=function(_0x4bfac3,_0x58324d){_0x4bfac3=_0x4bfac3-0x0;var _0x15f0f2=_0xa9e0[_0x4bfac3];return _0x15f0f2;};'use strict';function template(_0x1f0015){this['id']=_0x1f0015['id']||0x0;this[_0x0a9e('0x0')]=_0x1f0015[_0x0a9e('0x0')]||'';this['html']=_0x1f0015['html']||'';}module[_0x0a9e('0x1')]=template;
\ No newline at end of file
+var _0xb10b=['name','html'];(function(_0x4d693e,_0x346748){var _0x2b9295=function(_0x477c4b){while(--_0x477c4b){_0x4d693e['push'](_0x4d693e['shift']());}};_0x2b9295(++_0x346748);}(_0xb10b,0x12a));var _0xbb10=function(_0x2d7cca,_0x104977){_0x2d7cca=_0x2d7cca-0x0;var _0x347b84=_0xb10b[_0x2d7cca];return _0x347b84;};'use strict';function template(_0x13ce8d){this['id']=_0x13ce8d['id']||0x0;this['name']=_0x13ce8d[_0xbb10('0x0')]||'';this[_0xbb10('0x1')]=_0x13ce8d[_0xbb10('0x1')]||'';}module['exports']=template;
\ No newline at end of file
index cd72e02..9049a62 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbaf0=['Actions','exports','name','channel','voice','status','AllConditions','AnyConditions'];(function(_0x38987f,_0xc79720){var _0x4cb697=function(_0x1af5ae){while(--_0x1af5ae){_0x38987f['push'](_0x38987f['shift']());}};_0x4cb697(++_0xc79720);}(_0xbaf0,0x12a));var _0x0baf=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0xbaf0[_0x2f5ac5];return _0x37c9a8;};'use strict';function Trigger(_0x61caa9){this['id']=_0x61caa9['id']||0x0;this[_0x0baf('0x0')]=_0x61caa9[_0x0baf('0x0')]||'';this[_0x0baf('0x1')]=_0x61caa9[_0x0baf('0x1')]||_0x0baf('0x2');this[_0x0baf('0x3')]=_0x61caa9['status']||![];this[_0x0baf('0x4')]=_0x61caa9[_0x0baf('0x4')]||[];this[_0x0baf('0x5')]=_0x61caa9[_0x0baf('0x5')]||[];this[_0x0baf('0x6')]=_0x61caa9[_0x0baf('0x6')]||[];}module[_0x0baf('0x7')]=Trigger;
\ No newline at end of file
+var _0x5f66=['AllConditions','AnyConditions','Actions','name','channel','voice','status'];(function(_0x2642cb,_0x4b917f){var _0xe6e41=function(_0x281676){while(--_0x281676){_0x2642cb['push'](_0x2642cb['shift']());}};_0xe6e41(++_0x4b917f);}(_0x5f66,0x1a0));var _0x65f6=function(_0x21a9d9,_0x4d5ac8){_0x21a9d9=_0x21a9d9-0x0;var _0x46adce=_0x5f66[_0x21a9d9];return _0x46adce;};'use strict';function Trigger(_0x253044){this['id']=_0x253044['id']||0x0;this[_0x65f6('0x0')]=_0x253044['name']||'';this[_0x65f6('0x1')]=_0x253044[_0x65f6('0x1')]||_0x65f6('0x2');this[_0x65f6('0x3')]=_0x253044[_0x65f6('0x3')]||![];this['AllConditions']=_0x253044[_0x65f6('0x4')]||[];this['AnyConditions']=_0x253044[_0x65f6('0x5')]||[];this[_0x65f6('0x6')]=_0x253044['Actions']||[];}module['exports']=Trigger;
\ No newline at end of file
index 9cb7ff7..e1208a3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9f48=['stateTime','status','registry','indexOf','split','domain','domainport','refresh','stateRegistry','unknown','registrationtime','address','defaultuser','exports','active','name'];(function(_0x525c7b,_0x488fcc){var _0x27b33e=function(_0x56d43b){while(--_0x56d43b){_0x525c7b['push'](_0x525c7b['shift']());}};_0x27b33e(++_0x488fcc);}(_0x9f48,0x19e));var _0x89f4=function(_0x2466ec,_0x4260dc){_0x2466ec=_0x2466ec-0x0;var _0x450c0b=_0x9f48[_0x2466ec];return _0x450c0b;};'use strict';function Trunk(_0x81287a){this['id']=_0x81287a['id']||0x0;this[_0x89f4('0x0')]=_0x81287a[_0x89f4('0x0')]||![];this['name']=_0x81287a[_0x89f4('0x1')]||'';this['state']='unknown';this[_0x89f4('0x2')]=0x0;this[_0x89f4('0x3')]='unknown';this['registry']=_0x81287a[_0x89f4('0x4')]&&_0x81287a['registry'][_0x89f4('0x5')](':')?_0x81287a[_0x89f4('0x4')][_0x89f4('0x6')](':')[0x0]:'';this['host']='';this['port']='';this[_0x89f4('0x7')]='';this[_0x89f4('0x8')]='';this[_0x89f4('0x9')]='';this[_0x89f4('0xa')]=_0x89f4('0xb');this[_0x89f4('0xc')]='';this[_0x89f4('0xd')]='';this[_0x89f4('0xe')]=_0x81287a[_0x89f4('0xe')]||'';}module[_0x89f4('0xf')]=Trunk;
\ No newline at end of file
+var _0x93b6=['stateTime','status','unknown','registry','indexOf','split','host','port','domain','domainport','stateRegistry','registrationtime','address','defaultuser','exports','active','name','state'];(function(_0x4b369d,_0x265eb8){var _0x571a98=function(_0x56341a){while(--_0x56341a){_0x4b369d['push'](_0x4b369d['shift']());}};_0x571a98(++_0x265eb8);}(_0x93b6,0x165));var _0x693b=function(_0x44b73a,_0x4a00b9){_0x44b73a=_0x44b73a-0x0;var _0x4bb2ef=_0x93b6[_0x44b73a];return _0x4bb2ef;};'use strict';function Trunk(_0x398fb4){this['id']=_0x398fb4['id']||0x0;this[_0x693b('0x0')]=_0x398fb4[_0x693b('0x0')]||![];this[_0x693b('0x1')]=_0x398fb4['name']||'';this[_0x693b('0x2')]='unknown';this[_0x693b('0x3')]=0x0;this[_0x693b('0x4')]=_0x693b('0x5');this[_0x693b('0x6')]=_0x398fb4[_0x693b('0x6')]&&_0x398fb4[_0x693b('0x6')][_0x693b('0x7')](':')?_0x398fb4[_0x693b('0x6')][_0x693b('0x8')](':')[0x0]:'';this[_0x693b('0x9')]='';this[_0x693b('0xa')]='';this[_0x693b('0xb')]='';this[_0x693b('0xc')]='';this['refresh']='';this[_0x693b('0xd')]=_0x693b('0x5');this[_0x693b('0xe')]='';this[_0x693b('0xf')]='';this['defaultuser']=_0x398fb4[_0x693b('0x10')]||'';}module[_0x693b('0x11')]=Trunk;
\ No newline at end of file
index 7794649..0f695e2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1e3b=['mandatoryDisposition','exports','exten','none'];(function(_0x4b5813,_0x5769de){var _0x423465=function(_0x18071f){while(--_0x18071f){_0x4b5813['push'](_0x4b5813['shift']());}};_0x423465(++_0x5769de);}(_0x1e3b,0x1be));var _0xb1e3=function(_0x1736cd,_0x24bd0b){_0x1736cd=_0x1736cd-0x0;var _0x12c9da=_0x1e3b[_0x1736cd];return _0x12c9da;};'use strict';function voiceExtension(_0x429e99){this['id']=_0x429e99['id']||0x0;this[_0xb1e3('0x0')]=_0x429e99[_0xb1e3('0x0')]||'';this['recordingFormat']=_0x429e99['recordingFormat']||_0xb1e3('0x1');this[_0xb1e3('0x2')]=_0x429e99[_0xb1e3('0x2')]||![];}module[_0xb1e3('0x3')]=voiceExtension;
\ No newline at end of file
+var _0xbe16=['exten','none','mandatoryDisposition','exports'];(function(_0x1a2635,_0x2a33a8){var _0x2ccd92=function(_0x3874cc){while(--_0x3874cc){_0x1a2635['push'](_0x1a2635['shift']());}};_0x2ccd92(++_0x2a33a8);}(_0xbe16,0x74));var _0x6be1=function(_0x20a558,_0x160e0e){_0x20a558=_0x20a558-0x0;var _0x53d3f7=_0xbe16[_0x20a558];return _0x53d3f7;};'use strict';function voiceExtension(_0x2e81cc){this['id']=_0x2e81cc['id']||0x0;this[_0x6be1('0x0')]=_0x2e81cc['exten']||'';this['recordingFormat']=_0x2e81cc['recordingFormat']||_0x6be1('0x1');this['mandatoryDisposition']=_0x2e81cc[_0x6be1('0x2')]||![];}module[_0x6be1('0x3')]=voiceExtension;
\ No newline at end of file
index 8334e36..66ac581 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc1dc=['leastrecent','random','ringall','rrmemory','rrordered','wrandom','name','monitor_format','type','inbound','waiting','total','sumDuration','sumHoldTime','sumBillable','unmanaged','abandoned','available','inUse','invalid','notInUse','onHold','paused','ringing','ringInUse','talking','unavailable','acw','acwTimeout','autopause','sendMessageOneNotActive','message','statusMessage','originated','temp','dialTimezone','dialGlobalInterval','dialActive','dialMethod','progressive','dialLimitChannel','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dropRate','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','anonymous','dialOriginateCallerIdNumber','dialOriginateTimeout','dialQueueOptions','tTxX','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectRetryFrequency','callAdditionalPhoneAfterMin','dialGlobalMaxRetry','Trunk','TrunkBackup','dialPrefix','Interval','dialOrderByScheduledAt','DESC','dialRandomLastDigitCallerIdNumber','dialCutDigit','strategy','dialAMDActive','dialAMDInitialSilence','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDMaximumWordLength','timeout','outboundAnswerCallsDay','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundUnknownCallsDay','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundReCallsDay','startProgressive','startPredictive','handlePredictive','predictiveIntervalMultiplicativeFactor','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalPauses','predictiveIntervalAvailable','dialPredictiveIntervalMaxThreshold','predictiveIntervalMinThreshold','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','dialRecallMeTimeout','dialRecallInQueue','dialPreviewAutoRecallMe','dialPreviewRecallmeReminder','dialQueueProject2','dialAgiAfterHangupClient','dialAgiAfterHangupAgent','mandatoryDisposition','mandatoryDispositionPause','exports','wav','wav49','gsm'];(function(_0x2acc06,_0x3f9dcf){var _0x18ad24=function(_0x440536){while(--_0x440536){_0x2acc06['push'](_0x2acc06['shift']());}};_0x18ad24(++_0x3f9dcf);}(_0xc1dc,0x84));var _0xcc1d=function(_0x261d3f,_0x11c164){_0x261d3f=_0x261d3f-0x0;var _0x2f25d1=_0xc1dc[_0x261d3f];return _0x2f25d1;};'use strict';var monitorFormat={'wav':_0xcc1d('0x0'),'wav49':_0xcc1d('0x1'),'gsm':_0xcc1d('0x2')};var strategy={'fewestcalls':'fewestcalls','leastrecent':_0xcc1d('0x3'),'linear':'linear','random':_0xcc1d('0x4'),'ringall':_0xcc1d('0x5'),'rr':'roundrobin','rrmemory':_0xcc1d('0x6'),'rrordered':_0xcc1d('0x7'),'wrandom':_0xcc1d('0x8')};function VoiceQueue(_0x104603){this['id']=_0x104603['id']||0x0;this[_0xcc1d('0x9')]=_0x104603['name']||'';this['monitor_format']=_0x104603[_0xcc1d('0xa')]||'';this[_0xcc1d('0xb')]=_0x104603[_0xcc1d('0xb')]||_0xcc1d('0xc');this[_0xcc1d('0xd')]=0x0;this[_0xcc1d('0xe')]=0x0;this['answered']=0x0;this[_0xcc1d('0xf')]=0x0;this[_0xcc1d('0x10')]=0x0;this[_0xcc1d('0x11')]=0x0;this[_0xcc1d('0x12')]=0x0;this[_0xcc1d('0x13')]=0x0;this[_0xcc1d('0x14')]=0x0;this['busy']=0x0;this[_0xcc1d('0x15')]=0x0;this[_0xcc1d('0x16')]=0x0;this['loggedIn']=0x0;this[_0xcc1d('0x17')]=0x0;this[_0xcc1d('0x18')]=0x0;this[_0xcc1d('0x19')]=0x0;this[_0xcc1d('0x1a')]=0x0;this[_0xcc1d('0x1b')]=0x0;this[_0xcc1d('0x1c')]=0x0;this[_0xcc1d('0x1d')]=0x0;this['unknown']=0x0;this['acw']=_0x104603[_0xcc1d('0x1e')]||![];this['acwTimeout']=_0x104603[_0xcc1d('0x1f')]||0xa;this[_0xcc1d('0x20')]=_0x104603[_0xcc1d('0x20')]||'no';this[_0xcc1d('0x21')]=!![];this[_0xcc1d('0x22')]='';this[_0xcc1d('0x23')]='';this[_0xcc1d('0x24')]=0x0;this[_0xcc1d('0x25')]=0x0;this[_0xcc1d('0x26')]=_0x104603[_0xcc1d('0x26')]||null;this['dialGlobalInterval']=_0x104603['dialGlobalInterval']?_0x104603[_0xcc1d('0x27')]:null;this['dialActive']=_0x104603[_0xcc1d('0x28')];this[_0xcc1d('0x29')]=_0x104603[_0xcc1d('0x29')]||_0xcc1d('0x2a');this[_0xcc1d('0x2b')]=_0x104603[_0xcc1d('0x2b')]||0x0;this[_0xcc1d('0x2c')]=_0x104603[_0xcc1d('0x2c')]||0x0;this[_0xcc1d('0x2d')]=_0x104603['dialPowerLevel']||0x1;this[_0xcc1d('0x2e')]=_0x104603['dialPredictiveOptimization']||_0xcc1d('0x2f');this[_0xcc1d('0x30')]=_0x104603[_0xcc1d('0x30')]||0.03;this['dialPredictiveInterval']=_0x104603[_0xcc1d('0x31')]||0x258;this[_0xcc1d('0x32')]=_0x104603[_0xcc1d('0x32')]||_0xcc1d('0x33');this[_0xcc1d('0x34')]=_0x104603['dialOriginateCallerIdNumber']||_0xcc1d('0x33');this['dialOriginateTimeout']=_0x104603[_0xcc1d('0x35')]||0x1e;this[_0xcc1d('0x36')]=_0x104603[_0xcc1d('0x36')]||_0xcc1d('0x37');this[_0xcc1d('0x38')]=_0x104603['dialQueueTimeout']||0x3;this[_0xcc1d('0x39')]=_0x104603[_0xcc1d('0x39')]||undefined;this[_0xcc1d('0x3a')]=_0x104603['dialCongestionMaxRetry']||0x3;this[_0xcc1d('0x3b')]=_0x104603['dialCongestionRetryFrequency']||0x96;this[_0xcc1d('0x3c')]=_0x104603['dialBusyMaxRetry']||0x3;this[_0xcc1d('0x3d')]=_0x104603[_0xcc1d('0x3d')]||0x96;this[_0xcc1d('0x3e')]=_0x104603['dialNoAnswerMaxRetry']||0x3;this[_0xcc1d('0x3f')]=_0x104603[_0xcc1d('0x3f')]||0x96;this[_0xcc1d('0x40')]=_0x104603['dialNoSuchNumberMaxRetry']||0x3;this[_0xcc1d('0x41')]=_0x104603['dialNoSuchNumberRetryFrequency']||0x96;this[_0xcc1d('0x42')]=_0x104603[_0xcc1d('0x42')]||0x3;this[_0xcc1d('0x43')]=_0x104603[_0xcc1d('0x43')]||0x96;this[_0xcc1d('0x44')]=_0x104603['dialAbandonedMaxRetry']||0x3;this[_0xcc1d('0x45')]=_0x104603[_0xcc1d('0x45')]||0x96;this['dialMachineMaxRetry']=_0x104603[_0xcc1d('0x46')]||0x3;this['dialMachineRetryFrequency']=_0x104603[_0xcc1d('0x47')]||0x96;this['dialAgentRejectMaxRetry']=_0x104603['dialAgentRejectMaxRetry']||0x3;this[_0xcc1d('0x48')]=_0x104603['dialAgentRejectRetryFrequency']||0x96;this[_0xcc1d('0x49')]=_0x104603[_0xcc1d('0x49')]||0x3;this[_0xcc1d('0x4a')]=_0x104603[_0xcc1d('0x4a')]||0x4;this[_0xcc1d('0x4b')]=_0x104603[_0xcc1d('0x4b')]?_0x104603['Trunk']:undefined;this[_0xcc1d('0x4c')]=_0x104603['TrunkBackup']?_0x104603[_0xcc1d('0x4c')]:undefined;this[_0xcc1d('0x4d')]=_0x104603[_0xcc1d('0x4d')]||undefined;this[_0xcc1d('0x4e')]=_0x104603['Interval']?_0x104603[_0xcc1d('0x4e')]:undefined;this[_0xcc1d('0x4f')]=_0x104603[_0xcc1d('0x4f')]||_0xcc1d('0x50');this[_0xcc1d('0x51')]=_0x104603[_0xcc1d('0x51')]||undefined;this[_0xcc1d('0x52')]=_0x104603[_0xcc1d('0x52')]||undefined;this[_0xcc1d('0x53')]=strategy[_0x104603[_0xcc1d('0x53')]];this['queueStatusComplete']=!![];this['dialAMDActive']=_0x104603[_0xcc1d('0x54')]||![];this[_0xcc1d('0x55')]=_0x104603['dialAMDInitialSilence'];this['dialAMDGreeting']=_0x104603['dialAMDGreeting'];this[_0xcc1d('0x56')]=_0x104603[_0xcc1d('0x56')];this[_0xcc1d('0x57')]=_0x104603[_0xcc1d('0x57')];this[_0xcc1d('0x58')]=_0x104603[_0xcc1d('0x58')];this[_0xcc1d('0x59')]=_0x104603['dialAMDBetweenWordsSilence'];this[_0xcc1d('0x5a')]=_0x104603['dialAMDMaximumNumberOfWords'];this['dialAMDSilenceThreshold']=_0x104603['dialAMDSilenceThreshold'];this[_0xcc1d('0x5b')]=_0x104603[_0xcc1d('0x5b')];this['outboundRejectCallsDay']=0x0;this['pTalking']=0x0;this[_0xcc1d('0x5c')]=_0x104603['timeout'];this[_0xcc1d('0x5d')]=0x0;this[_0xcc1d('0x5e')]=0x0;this[_0xcc1d('0x5f')]=0x0;this['outboundBusyCallsDay']=0x0;this[_0xcc1d('0x60')]=0x0;this[_0xcc1d('0x61')]=0x0;this[_0xcc1d('0x62')]=0x0;this[_0xcc1d('0x63')]=0x0;this[_0xcc1d('0x64')]=0x0;this[_0xcc1d('0x65')]=0x0;this[_0xcc1d('0x66')]=0x0;this['outboundDropCallsDayACS']=0x0;this[_0xcc1d('0x67')]=0x0;this['outboundAbandonedDay']=0x0;this[_0xcc1d('0x68')]=undefined;this[_0xcc1d('0x69')]=undefined;this[_0xcc1d('0x6a')]=undefined;this[_0xcc1d('0x6b')]=1.05;this[_0xcc1d('0x6c')]=0x0;this[_0xcc1d('0x6d')]=0x0;this[_0xcc1d('0x6e')]=0x0;this[_0xcc1d('0x6f')]=0x0;this[_0xcc1d('0x70')]=0x0;this[_0xcc1d('0x71')]=0x0;this[_0xcc1d('0x72')]=0x0;this[_0xcc1d('0x73')]=0x0;this['predictiveIntervalMaxThreshold']=_0x104603[_0xcc1d('0x74')]||0x14;this[_0xcc1d('0x75')]=_0x104603[_0xcc1d('0x74')]||0xa;this[_0xcc1d('0x76')]=0x0;this[_0xcc1d('0x77')]=0x0;this[_0xcc1d('0x78')]=0x1;this[_0xcc1d('0x79')]=0x0;this[_0xcc1d('0x7a')]=0x0;this[_0xcc1d('0x7b')]=0x0;this[_0xcc1d('0x7c')]=0x0;this[_0xcc1d('0x7d')]=_0x104603['dialRecallMeTimeout']||0x1e;this[_0xcc1d('0x7e')]=_0x104603[_0xcc1d('0x7e')]||![];this[_0xcc1d('0x7f')]=!!_0x104603[_0xcc1d('0x7f')]||![];this[_0xcc1d('0x80')]=!!_0x104603[_0xcc1d('0x80')]||![];this[_0xcc1d('0x81')]=_0x104603[_0xcc1d('0x81')]||undefined;this[_0xcc1d('0x82')]=_0x104603[_0xcc1d('0x82')]||![];this[_0xcc1d('0x83')]=_0x104603[_0xcc1d('0x83')]||![];this[_0xcc1d('0xa')]=monitorFormat[_0x104603[_0xcc1d('0xa')]]?monitorFormat[_0x104603[_0xcc1d('0xa')]]:undefined;this[_0xcc1d('0x84')]=_0x104603[_0xcc1d('0x84')]||![];this[_0xcc1d('0x85')]=_0x104603[_0xcc1d('0x85')]?_0x104603[_0xcc1d('0x85')]:undefined;this['queueSummaryCountersUpdated']=![];}module[_0xcc1d('0x86')]=VoiceQueue;
\ No newline at end of file
+var _0xef9e=['unmanaged','abandoned','available','busy','inUse','invalid','loggedIn','notInUse','paused','ringing','ringInUse','talking','unknown','acw','acwTimeout','autopause','sendMessageOneNotActive','message','statusMessage','originated','dialTimezone','dialGlobalInterval','dialActive','dialMethod','dialLimitChannel','dialLimitQueue','dropRate','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','anonymous','dialOriginateCallerIdNumber','dialOriginateTimeout','tTxX','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','callAdditionalPhoneAfterMin','dialGlobalMaxRetry','Trunk','TrunkBackup','Interval','DESC','dialRandomLastDigitCallerIdNumber','dialCutDigit','strategy','queueStatusComplete','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','pTalking','timeout','outboundAnswerCallsDay','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundBlacklistCallsDay','outboundDropCallsDayTimeout','outboundDropCallsDayACS','outboundReCallsDay','outboundAbandonedDay','handlePredictive','predictiveIntervalMultiplicativeFactor','predictiveIntervalTotalCalls','predictiveIntervalAnsweredCalls','predictiveIntervalDroppedCallsTimeout','predictiveIntervalAvgHoldtime','predictiveIntervalPauses','predictiveIntervalMaxThreshold','dialPredictiveIntervalMaxThreshold','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','dialRecallMeTimeout','dialRecallInQueue','dialPreviewAutoRecallMe','dialPreviewRecallmeReminder','dialQueueProject2','dialAgiAfterHangupClient','dialAgiAfterHangupAgent','mandatoryDisposition','mandatoryDispositionPause','queueSummaryCountersUpdated','exports','wav','gsm','fewestcalls','leastrecent','linear','random','rrmemory','rrordered','name','monitor_format','type','inbound','waiting','total','answered','sumDuration','sumBillable'];(function(_0x2f7aa6,_0x2072e5){var _0x18d006=function(_0x21f07b){while(--_0x21f07b){_0x2f7aa6['push'](_0x2f7aa6['shift']());}};_0x18d006(++_0x2072e5);}(_0xef9e,0x1ef));var _0xeef9=function(_0x4cd739,_0x1a8a12){_0x4cd739=_0x4cd739-0x0;var _0x1b163f=_0xef9e[_0x4cd739];return _0x1b163f;};'use strict';var monitorFormat={'wav':_0xeef9('0x0'),'wav49':'wav49','gsm':_0xeef9('0x1')};var strategy={'fewestcalls':_0xeef9('0x2'),'leastrecent':_0xeef9('0x3'),'linear':_0xeef9('0x4'),'random':_0xeef9('0x5'),'ringall':'ringall','rr':'roundrobin','rrmemory':_0xeef9('0x6'),'rrordered':_0xeef9('0x7'),'wrandom':'wrandom'};function VoiceQueue(_0x4bc3ca){this['id']=_0x4bc3ca['id']||0x0;this[_0xeef9('0x8')]=_0x4bc3ca[_0xeef9('0x8')]||'';this[_0xeef9('0x9')]=_0x4bc3ca['monitor_format']||'';this[_0xeef9('0xa')]=_0x4bc3ca['type']||_0xeef9('0xb');this[_0xeef9('0xc')]=0x0;this[_0xeef9('0xd')]=0x0;this[_0xeef9('0xe')]=0x0;this[_0xeef9('0xf')]=0x0;this['sumHoldTime']=0x0;this[_0xeef9('0x10')]=0x0;this[_0xeef9('0x11')]=0x0;this[_0xeef9('0x12')]=0x0;this[_0xeef9('0x13')]=0x0;this[_0xeef9('0x14')]=0x0;this[_0xeef9('0x15')]=0x0;this[_0xeef9('0x16')]=0x0;this[_0xeef9('0x17')]=0x0;this[_0xeef9('0x18')]=0x0;this['onHold']=0x0;this[_0xeef9('0x19')]=0x0;this[_0xeef9('0x1a')]=0x0;this[_0xeef9('0x1b')]=0x0;this[_0xeef9('0x1c')]=0x0;this['unavailable']=0x0;this[_0xeef9('0x1d')]=0x0;this[_0xeef9('0x1e')]=_0x4bc3ca[_0xeef9('0x1e')]||![];this[_0xeef9('0x1f')]=_0x4bc3ca[_0xeef9('0x1f')]||0xa;this[_0xeef9('0x20')]=_0x4bc3ca['autopause']||'no';this[_0xeef9('0x21')]=!![];this[_0xeef9('0x22')]='';this[_0xeef9('0x23')]='';this[_0xeef9('0x24')]=0x0;this['temp']=0x0;this[_0xeef9('0x25')]=_0x4bc3ca[_0xeef9('0x25')]||null;this['dialGlobalInterval']=_0x4bc3ca['dialGlobalInterval']?_0x4bc3ca[_0xeef9('0x26')]:null;this[_0xeef9('0x27')]=_0x4bc3ca[_0xeef9('0x27')];this['dialMethod']=_0x4bc3ca[_0xeef9('0x28')]||'progressive';this[_0xeef9('0x29')]=_0x4bc3ca[_0xeef9('0x29')]||0x0;this[_0xeef9('0x2a')]=_0x4bc3ca['dialLimitQueue']||0x0;this['dialPowerLevel']=_0x4bc3ca['dialPowerLevel']||0x1;this['dialPredictiveOptimization']=_0x4bc3ca['dialPredictiveOptimization']||_0xeef9('0x2b');this[_0xeef9('0x2c')]=_0x4bc3ca[_0xeef9('0x2c')]||0.03;this[_0xeef9('0x2d')]=_0x4bc3ca['dialPredictiveInterval']||0x258;this[_0xeef9('0x2e')]=_0x4bc3ca[_0xeef9('0x2e')]||_0xeef9('0x2f');this[_0xeef9('0x30')]=_0x4bc3ca[_0xeef9('0x30')]||_0xeef9('0x2f');this[_0xeef9('0x31')]=_0x4bc3ca['dialOriginateTimeout']||0x1e;this['dialQueueOptions']=_0x4bc3ca['dialQueueOptions']||_0xeef9('0x32');this[_0xeef9('0x33')]=_0x4bc3ca[_0xeef9('0x33')]||0x3;this[_0xeef9('0x34')]=_0x4bc3ca[_0xeef9('0x34')]||undefined;this['dialCongestionMaxRetry']=_0x4bc3ca[_0xeef9('0x35')]||0x3;this[_0xeef9('0x36')]=_0x4bc3ca[_0xeef9('0x36')]||0x96;this[_0xeef9('0x37')]=_0x4bc3ca[_0xeef9('0x37')]||0x3;this['dialBusyRetryFrequency']=_0x4bc3ca[_0xeef9('0x38')]||0x96;this[_0xeef9('0x39')]=_0x4bc3ca[_0xeef9('0x39')]||0x3;this[_0xeef9('0x3a')]=_0x4bc3ca['dialNoAnswerRetryFrequency']||0x96;this[_0xeef9('0x3b')]=_0x4bc3ca['dialNoSuchNumberMaxRetry']||0x3;this[_0xeef9('0x3c')]=_0x4bc3ca['dialNoSuchNumberRetryFrequency']||0x96;this[_0xeef9('0x3d')]=_0x4bc3ca[_0xeef9('0x3d')]||0x3;this[_0xeef9('0x3e')]=_0x4bc3ca[_0xeef9('0x3e')]||0x96;this[_0xeef9('0x3f')]=_0x4bc3ca[_0xeef9('0x3f')]||0x3;this[_0xeef9('0x40')]=_0x4bc3ca['dialAbandonedRetryFrequency']||0x96;this[_0xeef9('0x41')]=_0x4bc3ca[_0xeef9('0x41')]||0x3;this[_0xeef9('0x42')]=_0x4bc3ca['dialMachineRetryFrequency']||0x96;this[_0xeef9('0x43')]=_0x4bc3ca[_0xeef9('0x43')]||0x3;this[_0xeef9('0x44')]=_0x4bc3ca['dialAgentRejectRetryFrequency']||0x96;this['callAdditionalPhoneAfterMin']=_0x4bc3ca[_0xeef9('0x45')]||0x3;this[_0xeef9('0x46')]=_0x4bc3ca[_0xeef9('0x46')]||0x4;this[_0xeef9('0x47')]=_0x4bc3ca[_0xeef9('0x47')]?_0x4bc3ca['Trunk']:undefined;this[_0xeef9('0x48')]=_0x4bc3ca['TrunkBackup']?_0x4bc3ca['TrunkBackup']:undefined;this['dialPrefix']=_0x4bc3ca['dialPrefix']||undefined;this['Interval']=_0x4bc3ca[_0xeef9('0x49')]?_0x4bc3ca[_0xeef9('0x49')]:undefined;this['dialOrderByScheduledAt']=_0x4bc3ca['dialOrderByScheduledAt']||_0xeef9('0x4a');this['dialRandomLastDigitCallerIdNumber']=_0x4bc3ca[_0xeef9('0x4b')]||undefined;this[_0xeef9('0x4c')]=_0x4bc3ca['dialCutDigit']||undefined;this[_0xeef9('0x4d')]=strategy[_0x4bc3ca[_0xeef9('0x4d')]];this[_0xeef9('0x4e')]=!![];this[_0xeef9('0x4f')]=_0x4bc3ca[_0xeef9('0x4f')]||![];this[_0xeef9('0x50')]=_0x4bc3ca[_0xeef9('0x50')];this['dialAMDGreeting']=_0x4bc3ca[_0xeef9('0x51')];this[_0xeef9('0x52')]=_0x4bc3ca[_0xeef9('0x52')];this[_0xeef9('0x53')]=_0x4bc3ca[_0xeef9('0x53')];this['dialAMDMinWordLength']=_0x4bc3ca[_0xeef9('0x54')];this[_0xeef9('0x55')]=_0x4bc3ca[_0xeef9('0x55')];this[_0xeef9('0x56')]=_0x4bc3ca[_0xeef9('0x56')];this[_0xeef9('0x57')]=_0x4bc3ca[_0xeef9('0x57')];this[_0xeef9('0x58')]=_0x4bc3ca[_0xeef9('0x58')];this['outboundRejectCallsDay']=0x0;this[_0xeef9('0x59')]=0x0;this[_0xeef9('0x5a')]=_0x4bc3ca[_0xeef9('0x5a')];this[_0xeef9('0x5b')]=0x0;this[_0xeef9('0x5c')]=0x0;this[_0xeef9('0x5d')]=0x0;this[_0xeef9('0x5e')]=0x0;this[_0xeef9('0x5f')]=0x0;this[_0xeef9('0x60')]=0x0;this['outboundUnknownCallsDay']=0x0;this[_0xeef9('0x61')]=0x0;this['outboundOriginateFailureCallsDay']=0x0;this['outboundDropCallsDayCallersExit']=0x0;this[_0xeef9('0x62')]=0x0;this[_0xeef9('0x63')]=0x0;this[_0xeef9('0x64')]=0x0;this[_0xeef9('0x65')]=0x0;this['startProgressive']=undefined;this['startPredictive']=undefined;this[_0xeef9('0x66')]=undefined;this[_0xeef9('0x67')]=1.05;this[_0xeef9('0x68')]=0x0;this[_0xeef9('0x69')]=0x0;this['predictiveIntervalDroppedCallsCallersExit']=0x0;this[_0xeef9('0x6a')]=0x0;this[_0xeef9('0x6b')]=0x0;this['predictiveIntervalAvgTalktime']=0x0;this[_0xeef9('0x6c')]=0x0;this['predictiveIntervalAvailable']=0x0;this[_0xeef9('0x6d')]=_0x4bc3ca['dialPredictiveIntervalMaxThreshold']||0x14;this['predictiveIntervalMinThreshold']=_0x4bc3ca[_0xeef9('0x6e')]||0xa;this[_0xeef9('0x6f')]=0x0;this[_0xeef9('0x70')]=0x0;this[_0xeef9('0x71')]=0x1;this[_0xeef9('0x72')]=0x0;this[_0xeef9('0x73')]=0x0;this[_0xeef9('0x74')]=0x0;this['erlangBusyFactor']=0x0;this[_0xeef9('0x75')]=_0x4bc3ca[_0xeef9('0x75')]||0x1e;this['dialRecallInQueue']=_0x4bc3ca[_0xeef9('0x76')]||![];this[_0xeef9('0x77')]=!!_0x4bc3ca['dialPreviewAutoRecallMe']||![];this['dialPreviewRecallmeReminder']=!!_0x4bc3ca[_0xeef9('0x78')]||![];this[_0xeef9('0x79')]=_0x4bc3ca[_0xeef9('0x79')]||undefined;this[_0xeef9('0x7a')]=_0x4bc3ca[_0xeef9('0x7a')]||![];this[_0xeef9('0x7b')]=_0x4bc3ca[_0xeef9('0x7b')]||![];this['monitor_format']=monitorFormat[_0x4bc3ca[_0xeef9('0x9')]]?monitorFormat[_0x4bc3ca[_0xeef9('0x9')]]:undefined;this[_0xeef9('0x7c')]=_0x4bc3ca[_0xeef9('0x7c')]||![];this[_0xeef9('0x7d')]=_0x4bc3ca[_0xeef9('0x7d')]?_0x4bc3ca[_0xeef9('0x7d')]:undefined;this[_0xeef9('0x7e')]=![];}module[_0xeef9('0x7f')]=VoiceQueue;
\ No newline at end of file
index 6c1ad9f..930f527 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3fa4=['abandoned','busy','invalid','loggedInDb','onHold','paused','ringInUse','sumHoldTime','type','unavailable','unknown','unmanaged','outbound','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialPrefix','temp','outboundAnswerAgiCallsDay','outboundBlacklistCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','outboundUnknownCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','startProgressive','message','statusMessage','Trunk','active','callerid','createReport','notInUse','loggedin','length','SIP/','includes','status','booked','keys','queue','dialer','exten','xcally-motion-preview','prototype','preview','exports','available','ringing','talking','waiting','answered','inUse','loggedIn','originated','outboundAbandonedCallsDay','outboundAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoAnswerCallsDay','outboundReCallsDay','outboundRejectCallsDay','pTalking','sumBillable','sumDuration','total','name','strategy'];(function(_0x142020,_0x1f7233){var _0x40da8f=function(_0x17f0a3){while(--_0x17f0a3){_0x142020['push'](_0x142020['shift']());}};_0x40da8f(++_0x1f7233);}(_0x3fa4,0xf0));var _0x43fa=function(_0x2a5596,_0x42d66c){_0x2a5596=_0x2a5596-0x0;var _0x4c7986=_0x3fa4[_0x2a5596];return _0x4c7986;};'use strict';var INBOUND_COUNTERS=[_0x43fa('0x0'),'loggedIn','loggedInDb','paused',_0x43fa('0x1'),_0x43fa('0x2'),_0x43fa('0x3')];var OUTBOUND_COUNTERS=[_0x43fa('0x0'),_0x43fa('0x4'),_0x43fa('0x5'),_0x43fa('0x6'),'loggedInDb',_0x43fa('0x7'),_0x43fa('0x8'),_0x43fa('0x9'),'outboundBlacklistCallsDay',_0x43fa('0xa'),_0x43fa('0xb'),_0x43fa('0xc'),'outboundNoSuchCallsDay',_0x43fa('0xd'),_0x43fa('0xe'),'outboundUnknownCallsDay','paused',_0x43fa('0xf'),_0x43fa('0x2'),_0x43fa('0x10'),_0x43fa('0x11'),_0x43fa('0x12'),'waiting'];function VoiceQueueSummary(_0x464e7b){this['id']=_0x464e7b['id'];this[_0x43fa('0x13')]=_0x464e7b[_0x43fa('0x13')];this['strategy']=_0x464e7b[_0x43fa('0x14')];this[_0x43fa('0x15')]=_0x464e7b[_0x43fa('0x15')]||0x0;this['answered']=_0x464e7b[_0x43fa('0x4')]||0x0;this['available']=_0x464e7b['available']||0x0;this['busy']=_0x464e7b[_0x43fa('0x16')]||0x0;this['inUse']=_0x464e7b[_0x43fa('0x5')]||0x0;this[_0x43fa('0x17')]=_0x464e7b['invalid']||0x0;this[_0x43fa('0x6')]=_0x464e7b[_0x43fa('0x6')]||0x0;this[_0x43fa('0x18')]=_0x464e7b[_0x43fa('0x18')]||0x0;this[_0x43fa('0x19')]=_0x464e7b[_0x43fa('0x19')]||0x0;this['notInUse']=_0x464e7b['notInUse']||0x0;this[_0x43fa('0x1a')]=_0x464e7b[_0x43fa('0x1a')]||0x0;this[_0x43fa('0x1')]=_0x464e7b[_0x43fa('0x1')]||0x0;this[_0x43fa('0x1b')]=_0x464e7b[_0x43fa('0x1b')];this[_0x43fa('0x10')]=_0x464e7b[_0x43fa('0x10')];this[_0x43fa('0x11')]=_0x464e7b['sumDuration'];this[_0x43fa('0x1c')]=_0x464e7b[_0x43fa('0x1c')]||0x0;this[_0x43fa('0x2')]=_0x464e7b[_0x43fa('0x2')]||0x0;this[_0x43fa('0x12')]=_0x464e7b['total']||0x0;this[_0x43fa('0x1d')]=_0x464e7b[_0x43fa('0x1d')];this[_0x43fa('0x1e')]=_0x464e7b[_0x43fa('0x1e')]||0x0;this[_0x43fa('0x1f')]=_0x464e7b[_0x43fa('0x1f')]||0x0;this[_0x43fa('0x20')]=_0x464e7b[_0x43fa('0x20')]||0x0;this[_0x43fa('0x3')]=_0x464e7b['waiting']||0x0;if(_0x464e7b['type']===_0x43fa('0x21')){this[_0x43fa('0xf')]=_0x464e7b[_0x43fa('0xf')]||0x0;this[_0x43fa('0x22')]=_0x464e7b[_0x43fa('0x22')];this[_0x43fa('0x23')]=_0x464e7b['dialMethod'];this['dialOriginateCallerIdName']=_0x464e7b[_0x43fa('0x24')];this[_0x43fa('0x25')]=_0x464e7b[_0x43fa('0x25')];this[_0x43fa('0x26')]=_0x464e7b['dialOriginateTimeout'];this[_0x43fa('0x27')]=_0x464e7b[_0x43fa('0x27')];this[_0x43fa('0x28')]=_0x464e7b[_0x43fa('0x28')];this['outboundAnswerAgiCallsDay']=_0x464e7b[_0x43fa('0x29')];this[_0x43fa('0x9')]=_0x464e7b[_0x43fa('0x9')];this[_0x43fa('0x2a')]=_0x464e7b[_0x43fa('0x2a')];this[_0x43fa('0xa')]=_0x464e7b[_0x43fa('0xa')];this[_0x43fa('0xb')]=_0x464e7b[_0x43fa('0xb')];this[_0x43fa('0x2b')]=_0x464e7b[_0x43fa('0x2b')];this[_0x43fa('0x2c')]=_0x464e7b['outboundDropCallsDayCallersExit'];this['outboundDropCallsDayTimeout']=_0x464e7b[_0x43fa('0x2d')];this[_0x43fa('0xc')]=_0x464e7b[_0x43fa('0xc')];this[_0x43fa('0x2e')]=_0x464e7b['outboundNoSuchCallsDay'];this[_0x43fa('0x2f')]=_0x464e7b[_0x43fa('0x2f')];this[_0x43fa('0xd')]=_0x464e7b['outboundReCallsDay'];this[_0x43fa('0xe')]=_0x464e7b[_0x43fa('0xe')];this[_0x43fa('0x30')]=_0x464e7b[_0x43fa('0x30')];this['predictiveIntervalAnsweredCalls']=_0x464e7b[_0x43fa('0x31')];this['predictiveIntervalAvgHoldtime']=_0x464e7b[_0x43fa('0x32')];this[_0x43fa('0x33')]=_0x464e7b[_0x43fa('0x33')];this['predictiveIntervalDroppedCallsCallersExit']=_0x464e7b[_0x43fa('0x34')];this['predictiveIntervalDroppedCallsTimeout']=_0x464e7b['predictiveIntervalDroppedCallsTimeout'];this[_0x43fa('0x35')]=_0x464e7b[_0x43fa('0x35')];this[_0x43fa('0x36')]=_0x464e7b['predictiveIntervalErlangCallsDroppedCalls'];this[_0x43fa('0x37')]=_0x464e7b[_0x43fa('0x37')];this[_0x43fa('0x38')]=_0x464e7b[_0x43fa('0x38')];this[_0x43fa('0x39')]=_0x464e7b['predictiveIntervalPauses'];this[_0x43fa('0x3a')]=_0x464e7b[_0x43fa('0x3a')];this[_0x43fa('0x3b')]=_0x464e7b[_0x43fa('0x3b')];this['originated']=_0x464e7b['originated'];this[_0x43fa('0x3c')]=_0x464e7b[_0x43fa('0x3c')];this[_0x43fa('0x3d')]=_0x464e7b[_0x43fa('0x3d')];this[_0x43fa('0x3e')]=_0x464e7b['erlangAbandonmentRate'];this[_0x43fa('0x3f')]=_0x464e7b['erlangBusyFactor'];this['startPredictive']=_0x464e7b[_0x43fa('0x40')];this['startProgressive']=_0x464e7b[_0x43fa('0x41')];this[_0x43fa('0x42')]=_0x464e7b[_0x43fa('0x42')];this[_0x43fa('0x43')]=_0x464e7b['statusMessage'];}if(_0x464e7b['Trunk']){this['Trunk']={'id':_0x464e7b[_0x43fa('0x44')]['id'],'name':_0x464e7b[_0x43fa('0x44')]['name'],'active':_0x464e7b[_0x43fa('0x44')][_0x43fa('0x45')],'callerid':_0x464e7b[_0x43fa('0x44')][_0x43fa('0x46')]};}}VoiceQueueSummary['prototype'][_0x43fa('0x47')]=function(_0x23e156,_0x4ac89a,_0x5e453f,_0x21e7d6){this['loggedInDb']=0x0;this[_0x43fa('0x2')]=0x0;this[_0x43fa('0x1a')]=0x0;this['unknown']=0x0;this[_0x43fa('0x48')]=0x0;this['inUse']=0x0;this[_0x43fa('0x16')]=0x0;this[_0x43fa('0x17')]=0x0;this[_0x43fa('0x1e')]=0x0;this['ringing']=0x0;this[_0x43fa('0x1b')]=0x0;this[_0x43fa('0x19')]=0x0;if(_0x5e453f){if(_0x5e453f[_0x43fa('0x0')]){this[_0x43fa('0x0')]=Number(_0x5e453f[_0x43fa('0x0')]);}if(_0x5e453f[_0x43fa('0x49')]){this['loggedIn']=Number(_0x5e453f[_0x43fa('0x49')]);}if(_0x5e453f['callers']){this[_0x43fa('0x3')]=Number(_0x5e453f['callers']);}}for(var _0x1e6a3c=0x0;_0x1e6a3c<_0x23e156[_0x43fa('0x4a')];_0x1e6a3c++){var _0x132a0b=_0x4ac89a[_0x43fa('0x4b')+_0x23e156[_0x1e6a3c][_0x43fa('0x13')]];if(_0x132a0b&&_0x132a0b['online']){this[_0x43fa('0x18')]+=0x1;}if(_0x23e156[_0x1e6a3c]['incall']==='1'){this['talking']+=0x1;}if(_0x23e156[_0x1e6a3c]['paused']==='1'&&!['2','7','8'][_0x43fa('0x4c')](_0x23e156[_0x1e6a3c][_0x43fa('0x4d')])){this[_0x43fa('0x1a')]+=0x1;}switch(_0x23e156[_0x1e6a3c][_0x43fa('0x4d')]){case'0':this[_0x43fa('0x1f')]+=0x1;break;case'1':this['notInUse']+=0x1;break;case'2':this[_0x43fa('0x5')]+=0x1;break;case'3':this[_0x43fa('0x16')]+=0x1;break;case'4':this[_0x43fa('0x17')]+=0x1;break;case'5':this[_0x43fa('0x1e')]+=0x1;break;case'6':this[_0x43fa('0x1')]+=0x1;break;case'7':this[_0x43fa('0x1b')]+=0x1;break;case'8':this[_0x43fa('0x19')]+=0x1;break;}}if(this[_0x43fa('0x23')]===_0x43fa('0x4e')){var _0x458e11=Object[_0x43fa('0x4f')](_0x21e7d6);for(var _0x52d66f=0x0;_0x52d66f<_0x458e11[_0x43fa('0x4a')];_0x52d66f++){var _0x2a06ff=_0x458e11[_0x52d66f];var _0x4b84f6=_0x21e7d6[_0x2a06ff];if(_0x4b84f6[_0x43fa('0x50')]===this['name']&&_0x4b84f6[_0x43fa('0x1d')]===_0x43fa('0x51')&&_0x4b84f6[_0x43fa('0x52')]===_0x43fa('0x53')){this[_0x43fa('0x2')]+=0x1;}}if(this['talking']>this[_0x43fa('0x5')]){this['talking']=this[_0x43fa('0x5')];}this[_0x43fa('0xf')]=0x0;}return this;};VoiceQueueSummary[_0x43fa('0x54')]['compareToInboundQueue']=function(_0x5cbcd9){var _0xc3f7aa=![];if(_0x5cbcd9){_0xc3f7aa=INBOUND_COUNTERS['some'](function(_0x2ca431){return this[_0x2ca431]!==_0x5cbcd9[_0x2ca431];},this);}return _0xc3f7aa;};VoiceQueueSummary['prototype']['compareToOutboundQueue']=function(_0x2228e0){var _0x393842=![];var _0x4c48b5=![];var _0x43f94c=![];if(_0x2228e0){_0x393842=this[_0x43fa('0x23')]!==_0x2228e0[_0x43fa('0x23')]||this[_0x43fa('0x22')]!==_0x2228e0['dialActive']||this[_0x43fa('0x42')]!==_0x2228e0[_0x43fa('0x42')]||this[_0x43fa('0x43')]!==_0x2228e0[_0x43fa('0x43')];_0x4c48b5=OUTBOUND_COUNTERS['some'](function(_0x4cdf94){return this[_0x4cdf94]!==_0x2228e0[_0x4cdf94];},this);if(this[_0x43fa('0x44')]&&_0x2228e0['Trunk']){_0x43f94c=this['Trunk']['name']!==_0x2228e0[_0x43fa('0x44')][_0x43fa('0x13')]||this[_0x43fa('0x44')][_0x43fa('0x45')]!==_0x2228e0[_0x43fa('0x44')][_0x43fa('0x45')];}}return _0x393842||_0x4c48b5||_0x43f94c;};VoiceQueueSummary[_0x43fa('0x54')]['updateReportFromOutboundQueue']=function(_0x41134e){this[_0x43fa('0x4')]=_0x41134e['answered'];this[_0x43fa('0x42')]=_0x41134e['message'];this[_0x43fa('0x43')]=_0x41134e[_0x43fa('0x43')];this[_0x43fa('0x7')]=_0x41134e[_0x43fa('0x7')];this['outboundAbandonedCallsDay']=_0x41134e['outboundAbandonedCallsDay'];this[_0x43fa('0x9')]=_0x41134e[_0x43fa('0x9')];this[_0x43fa('0x2a')]=_0x41134e[_0x43fa('0x2a')];this['outboundBusyCallsDay']=_0x41134e['outboundBusyCallsDay'];this[_0x43fa('0xb')]=_0x41134e['outboundCongestionCallsDay'];this[_0x43fa('0xc')]=_0x41134e[_0x43fa('0xc')];this[_0x43fa('0x2e')]=_0x41134e[_0x43fa('0x2e')];this['outboundReCallsDay']=_0x41134e['outboundReCallsDay'];this[_0x43fa('0xe')]=_0x41134e['outboundRejectCallsDay'];this[_0x43fa('0x30')]=_0x41134e[_0x43fa('0x30')];this[_0x43fa('0x10')]=_0x41134e[_0x43fa('0x10')];this[_0x43fa('0x11')]=_0x41134e[_0x43fa('0x11')];this[_0x43fa('0x12')]=_0x41134e['total'];if(this[_0x43fa('0x23')]===_0x43fa('0x55')){this[_0x43fa('0xf')]=_0x41134e[_0x43fa('0xf')];}};module[_0x43fa('0x56')]=VoiceQueueSummary;
\ No newline at end of file
+var _0xac9d=['onHold','notInUse','ringInUse','sumHoldTime','type','unavailable','unknown','unmanaged','outbound','dialActive','dialMethod','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','temp','outboundCongestionCallsDay','outboundDropCallsDayACS','outboundDropCallsDayCallersExit','outboundDropCallsDayTimeout','outboundNoSuchCallsDay','outboundOriginateFailureCallsDay','predictiveIntervalAnsweredCalls','predictiveIntervalAvgHoldtime','predictiveIntervalAvgTalktime','predictiveIntervalDroppedCallsCallersExit','predictiveIntervalDroppedCallsTimeout','predictiveIntervalErlangCalls','predictiveIntervalErlangCallsDroppedCalls','predictiveIntervalHitRate','predictiveIntervalMultiplicativeFactor','predictiveIntervalPauses','predictiveIntervalAvailable','predictiveIntervalTotalCalls','erlangCalls','erlangCallToSecond','erlangAbandonmentRate','erlangBusyFactor','startPredictive','startProgressive','message','statusMessage','Trunk','active','callerid','prototype','createReport','loggedin','callers','SIP/','incall','includes','status','booked','keys','length','queue','xcally-motion-preview','compareToInboundQueue','some','compareToOutboundQueue','updateReportFromOutboundQueue','preview','exports','available','loggedIn','loggedInDb','paused','ringing','talking','waiting','inUse','originated','outboundAbandonedCallsDay','outboundAnswerCallsDay','outboundBlacklistCallsDay','outboundBusyCallsDay','outboundNoAnswerCallsDay','outboundReCallsDay','outboundRejectCallsDay','outboundUnknownCallsDay','pTalking','sumBillable','sumDuration','total','name','strategy','abandoned','answered','busy','invalid'];(function(_0x27af45,_0x1b57aa){var _0x18df21=function(_0x4b7679){while(--_0x4b7679){_0x27af45['push'](_0x27af45['shift']());}};_0x18df21(++_0x1b57aa);}(_0xac9d,0x14d));var _0xdac9=function(_0xc28c76,_0x1d2e26){_0xc28c76=_0xc28c76-0x0;var _0x2f0b2a=_0xac9d[_0xc28c76];return _0x2f0b2a;};'use strict';var INBOUND_COUNTERS=[_0xdac9('0x0'),_0xdac9('0x1'),_0xdac9('0x2'),_0xdac9('0x3'),_0xdac9('0x4'),_0xdac9('0x5'),_0xdac9('0x6')];var OUTBOUND_COUNTERS=[_0xdac9('0x0'),'answered',_0xdac9('0x7'),'loggedIn',_0xdac9('0x2'),_0xdac9('0x8'),_0xdac9('0x9'),_0xdac9('0xa'),_0xdac9('0xb'),_0xdac9('0xc'),'outboundCongestionCallsDay',_0xdac9('0xd'),'outboundNoSuchCallsDay',_0xdac9('0xe'),_0xdac9('0xf'),_0xdac9('0x10'),_0xdac9('0x3'),_0xdac9('0x11'),_0xdac9('0x5'),_0xdac9('0x12'),_0xdac9('0x13'),_0xdac9('0x14'),'waiting'];function VoiceQueueSummary(_0x37b316){this['id']=_0x37b316['id'];this[_0xdac9('0x15')]=_0x37b316['name'];this[_0xdac9('0x16')]=_0x37b316[_0xdac9('0x16')];this[_0xdac9('0x17')]=_0x37b316['abandoned']||0x0;this[_0xdac9('0x18')]=_0x37b316[_0xdac9('0x18')]||0x0;this[_0xdac9('0x0')]=_0x37b316['available']||0x0;this['busy']=_0x37b316[_0xdac9('0x19')]||0x0;this[_0xdac9('0x7')]=_0x37b316['inUse']||0x0;this[_0xdac9('0x1a')]=_0x37b316[_0xdac9('0x1a')]||0x0;this[_0xdac9('0x1')]=_0x37b316[_0xdac9('0x1')]||0x0;this[_0xdac9('0x2')]=_0x37b316[_0xdac9('0x2')]||0x0;this[_0xdac9('0x1b')]=_0x37b316[_0xdac9('0x1b')]||0x0;this['notInUse']=_0x37b316[_0xdac9('0x1c')]||0x0;this[_0xdac9('0x3')]=_0x37b316['paused']||0x0;this[_0xdac9('0x4')]=_0x37b316[_0xdac9('0x4')]||0x0;this[_0xdac9('0x1d')]=_0x37b316[_0xdac9('0x1d')];this['sumBillable']=_0x37b316['sumBillable'];this[_0xdac9('0x13')]=_0x37b316[_0xdac9('0x13')];this[_0xdac9('0x1e')]=_0x37b316[_0xdac9('0x1e')]||0x0;this['talking']=_0x37b316[_0xdac9('0x5')]||0x0;this[_0xdac9('0x14')]=_0x37b316[_0xdac9('0x14')]||0x0;this[_0xdac9('0x1f')]=_0x37b316[_0xdac9('0x1f')];this[_0xdac9('0x20')]=_0x37b316[_0xdac9('0x20')]||0x0;this[_0xdac9('0x21')]=_0x37b316[_0xdac9('0x21')]||0x0;this[_0xdac9('0x22')]=_0x37b316['unmanaged']||0x0;this[_0xdac9('0x6')]=_0x37b316[_0xdac9('0x6')]||0x0;if(_0x37b316[_0xdac9('0x1f')]===_0xdac9('0x23')){this['pTalking']=_0x37b316[_0xdac9('0x11')]||0x0;this['dialActive']=_0x37b316[_0xdac9('0x24')];this[_0xdac9('0x25')]=_0x37b316['dialMethod'];this[_0xdac9('0x26')]=_0x37b316['dialOriginateCallerIdName'];this[_0xdac9('0x27')]=_0x37b316[_0xdac9('0x27')];this[_0xdac9('0x28')]=_0x37b316[_0xdac9('0x28')];this['dialPrefix']=_0x37b316['dialPrefix'];this[_0xdac9('0x29')]=_0x37b316[_0xdac9('0x29')];this['outboundAnswerAgiCallsDay']=_0x37b316['outboundAnswerAgiCallsDay'];this[_0xdac9('0xa')]=_0x37b316[_0xdac9('0xa')];this[_0xdac9('0xb')]=_0x37b316[_0xdac9('0xb')];this[_0xdac9('0xc')]=_0x37b316[_0xdac9('0xc')];this[_0xdac9('0x2a')]=_0x37b316[_0xdac9('0x2a')];this[_0xdac9('0x2b')]=_0x37b316[_0xdac9('0x2b')];this[_0xdac9('0x2c')]=_0x37b316[_0xdac9('0x2c')];this[_0xdac9('0x2d')]=_0x37b316[_0xdac9('0x2d')];this[_0xdac9('0xd')]=_0x37b316[_0xdac9('0xd')];this[_0xdac9('0x2e')]=_0x37b316[_0xdac9('0x2e')];this[_0xdac9('0x2f')]=_0x37b316[_0xdac9('0x2f')];this[_0xdac9('0xe')]=_0x37b316['outboundReCallsDay'];this['outboundRejectCallsDay']=_0x37b316[_0xdac9('0xf')];this[_0xdac9('0x10')]=_0x37b316[_0xdac9('0x10')];this[_0xdac9('0x30')]=_0x37b316[_0xdac9('0x30')];this['predictiveIntervalAvgHoldtime']=_0x37b316[_0xdac9('0x31')];this['predictiveIntervalAvgTalktime']=_0x37b316[_0xdac9('0x32')];this[_0xdac9('0x33')]=_0x37b316['predictiveIntervalDroppedCallsCallersExit'];this[_0xdac9('0x34')]=_0x37b316['predictiveIntervalDroppedCallsTimeout'];this['predictiveIntervalErlangCalls']=_0x37b316[_0xdac9('0x35')];this[_0xdac9('0x36')]=_0x37b316[_0xdac9('0x36')];this[_0xdac9('0x37')]=_0x37b316[_0xdac9('0x37')];this[_0xdac9('0x38')]=_0x37b316['predictiveIntervalMultiplicativeFactor'];this[_0xdac9('0x39')]=_0x37b316[_0xdac9('0x39')];this['predictiveIntervalAvailable']=_0x37b316[_0xdac9('0x3a')];this[_0xdac9('0x3b')]=_0x37b316[_0xdac9('0x3b')];this[_0xdac9('0x8')]=_0x37b316[_0xdac9('0x8')];this[_0xdac9('0x3c')]=_0x37b316[_0xdac9('0x3c')];this['erlangCallToSecond']=_0x37b316[_0xdac9('0x3d')];this[_0xdac9('0x3e')]=_0x37b316[_0xdac9('0x3e')];this['erlangBusyFactor']=_0x37b316[_0xdac9('0x3f')];this[_0xdac9('0x40')]=_0x37b316[_0xdac9('0x40')];this[_0xdac9('0x41')]=_0x37b316['startProgressive'];this['message']=_0x37b316[_0xdac9('0x42')];this[_0xdac9('0x43')]=_0x37b316[_0xdac9('0x43')];}if(_0x37b316[_0xdac9('0x44')]){this[_0xdac9('0x44')]={'id':_0x37b316['Trunk']['id'],'name':_0x37b316[_0xdac9('0x44')]['name'],'active':_0x37b316[_0xdac9('0x44')][_0xdac9('0x45')],'callerid':_0x37b316[_0xdac9('0x44')][_0xdac9('0x46')]};}}VoiceQueueSummary[_0xdac9('0x47')][_0xdac9('0x48')]=function(_0x413fb1,_0xb176e0,_0x11362d,_0x8a0538){this[_0xdac9('0x2')]=0x0;this[_0xdac9('0x5')]=0x0;this[_0xdac9('0x3')]=0x0;this[_0xdac9('0x21')]=0x0;this['notInUse']=0x0;this[_0xdac9('0x7')]=0x0;this[_0xdac9('0x19')]=0x0;this['invalid']=0x0;this[_0xdac9('0x20')]=0x0;this[_0xdac9('0x4')]=0x0;this[_0xdac9('0x1d')]=0x0;this[_0xdac9('0x1b')]=0x0;if(_0x11362d){if(_0x11362d[_0xdac9('0x0')]){this[_0xdac9('0x0')]=Number(_0x11362d['available']);}if(_0x11362d[_0xdac9('0x49')]){this['loggedIn']=Number(_0x11362d[_0xdac9('0x49')]);}if(_0x11362d[_0xdac9('0x4a')]){this[_0xdac9('0x6')]=Number(_0x11362d[_0xdac9('0x4a')]);}}for(var _0x5e61ac=0x0;_0x5e61ac<_0x413fb1['length'];_0x5e61ac++){var _0x585f08=_0xb176e0[_0xdac9('0x4b')+_0x413fb1[_0x5e61ac]['name']];if(_0x585f08&&_0x585f08['online']){this[_0xdac9('0x2')]+=0x1;}if(_0x413fb1[_0x5e61ac][_0xdac9('0x4c')]==='1'){this['talking']+=0x1;}if(_0x413fb1[_0x5e61ac]['paused']==='1'&&!['2','7','8'][_0xdac9('0x4d')](_0x413fb1[_0x5e61ac][_0xdac9('0x4e')])){this[_0xdac9('0x3')]+=0x1;}switch(_0x413fb1[_0x5e61ac][_0xdac9('0x4e')]){case'0':this[_0xdac9('0x21')]+=0x1;break;case'1':this[_0xdac9('0x1c')]+=0x1;break;case'2':this[_0xdac9('0x7')]+=0x1;break;case'3':this[_0xdac9('0x19')]+=0x1;break;case'4':this['invalid']+=0x1;break;case'5':this[_0xdac9('0x20')]+=0x1;break;case'6':this[_0xdac9('0x4')]+=0x1;break;case'7':this[_0xdac9('0x1d')]+=0x1;break;case'8':this[_0xdac9('0x1b')]+=0x1;break;}}if(this[_0xdac9('0x25')]===_0xdac9('0x4f')){var _0x1dece7=Object[_0xdac9('0x50')](_0x8a0538);for(var _0x140dc5=0x0;_0x140dc5<_0x1dece7[_0xdac9('0x51')];_0x140dc5++){var _0x257e48=_0x1dece7[_0x140dc5];var _0x446223=_0x8a0538[_0x257e48];if(_0x446223[_0xdac9('0x52')]===this[_0xdac9('0x15')]&&_0x446223['type']==='dialer'&&_0x446223['exten']===_0xdac9('0x53')){this[_0xdac9('0x5')]+=0x1;}}if(this['talking']>this[_0xdac9('0x7')]){this[_0xdac9('0x5')]=this[_0xdac9('0x7')];}this['pTalking']=0x0;}return this;};VoiceQueueSummary[_0xdac9('0x47')][_0xdac9('0x54')]=function(_0x57902f){var _0x53ceb8=![];if(_0x57902f){_0x53ceb8=INBOUND_COUNTERS[_0xdac9('0x55')](function(_0x4469d8){return this[_0x4469d8]!==_0x57902f[_0x4469d8];},this);}return _0x53ceb8;};VoiceQueueSummary[_0xdac9('0x47')][_0xdac9('0x56')]=function(_0x39df88){var _0x426774=![];var _0x7a40ac=![];var _0x3a77e3=![];if(_0x39df88){_0x426774=this[_0xdac9('0x25')]!==_0x39df88[_0xdac9('0x25')]||this[_0xdac9('0x24')]!==_0x39df88[_0xdac9('0x24')]||this[_0xdac9('0x42')]!==_0x39df88[_0xdac9('0x42')]||this[_0xdac9('0x43')]!==_0x39df88['statusMessage'];_0x7a40ac=OUTBOUND_COUNTERS[_0xdac9('0x55')](function(_0x150bba){return this[_0x150bba]!==_0x39df88[_0x150bba];},this);if(this[_0xdac9('0x44')]&&_0x39df88[_0xdac9('0x44')]){_0x3a77e3=this[_0xdac9('0x44')][_0xdac9('0x15')]!==_0x39df88['Trunk'][_0xdac9('0x15')]||this[_0xdac9('0x44')][_0xdac9('0x45')]!==_0x39df88[_0xdac9('0x44')][_0xdac9('0x45')];}}return _0x426774||_0x7a40ac||_0x3a77e3;};VoiceQueueSummary[_0xdac9('0x47')][_0xdac9('0x57')]=function(_0x243862){this[_0xdac9('0x18')]=_0x243862['answered'];this[_0xdac9('0x42')]=_0x243862[_0xdac9('0x42')];this[_0xdac9('0x43')]=_0x243862[_0xdac9('0x43')];this[_0xdac9('0x8')]=_0x243862[_0xdac9('0x8')];this['outboundAbandonedCallsDay']=_0x243862['outboundAbandonedCallsDay'];this[_0xdac9('0xa')]=_0x243862[_0xdac9('0xa')];this[_0xdac9('0xb')]=_0x243862[_0xdac9('0xb')];this[_0xdac9('0xc')]=_0x243862[_0xdac9('0xc')];this['outboundCongestionCallsDay']=_0x243862['outboundCongestionCallsDay'];this['outboundNoAnswerCallsDay']=_0x243862[_0xdac9('0xd')];this[_0xdac9('0x2e')]=_0x243862[_0xdac9('0x2e')];this[_0xdac9('0xe')]=_0x243862['outboundReCallsDay'];this[_0xdac9('0xf')]=_0x243862[_0xdac9('0xf')];this[_0xdac9('0x10')]=_0x243862[_0xdac9('0x10')];this[_0xdac9('0x12')]=_0x243862['sumBillable'];this[_0xdac9('0x13')]=_0x243862['sumDuration'];this[_0xdac9('0x14')]=_0x243862['total'];if(this[_0xdac9('0x25')]===_0xdac9('0x58')){this[_0xdac9('0x11')]=_0x243862[_0xdac9('0x11')];}};module[_0xdac9('0x59')]=VoiceQueueSummary;
\ No newline at end of file
index 81e169d..86840b5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf5dc=['accessKey','remoteUri','serverUrl','Configurations','exports','name','username'];(function(_0x2dab01,_0xceace5){var _0x292ff3=function(_0x493edc){while(--_0x493edc){_0x2dab01['push'](_0x2dab01['shift']());}};_0x292ff3(++_0xceace5);}(_0xf5dc,0x1be));var _0xcf5d=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xf5dc[_0xfae23b];return _0x200640;};'use strict';function VtigerAccount(_0x243f0a){this['id']=_0x243f0a['id']||0x0;this[_0xcf5d('0x0')]=_0x243f0a['name']||'';this[_0xcf5d('0x1')]=_0x243f0a['username']||'';this[_0xcf5d('0x2')]=_0x243f0a['accessKey']||'';this[_0xcf5d('0x3')]=_0x243f0a[_0xcf5d('0x3')]||'';this['serverUrl']=_0x243f0a[_0xcf5d('0x4')]||'';this[_0xcf5d('0x5')]=_0x243f0a['Configurations']||{};}module[_0xcf5d('0x6')]=VtigerAccount;
\ No newline at end of file
+var _0xa518=['name','username','accessKey','remoteUri','Configurations'];(function(_0x2f55c3,_0x6da45e){var _0x958e82=function(_0x42c633){while(--_0x42c633){_0x2f55c3['push'](_0x2f55c3['shift']());}};_0x958e82(++_0x6da45e);}(_0xa518,0x1f4));var _0x8a51=function(_0x3598bb,_0x24befa){_0x3598bb=_0x3598bb-0x0;var _0x13c837=_0xa518[_0x3598bb];return _0x13c837;};'use strict';function VtigerAccount(_0x44b9b4){this['id']=_0x44b9b4['id']||0x0;this[_0x8a51('0x0')]=_0x44b9b4[_0x8a51('0x0')]||'';this['username']=_0x44b9b4[_0x8a51('0x1')]||'';this[_0x8a51('0x2')]=_0x44b9b4['accessKey']||'';this[_0x8a51('0x3')]=_0x44b9b4['remoteUri']||'';this['serverUrl']=_0x44b9b4['serverUrl']||'';this[_0x8a51('0x4')]=_0x44b9b4[_0x8a51('0x4')]||{};}module['exports']=VtigerAccount;
\ No newline at end of file
index 7798a64..0cb8c06 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5fc3=['name','username','password','token','remoteUri','authType','type','serverUrl','Configurations','exports'];(function(_0x1589dd,_0x2b9d22){var _0x1bddd1=function(_0x3687f8){while(--_0x3687f8){_0x1589dd['push'](_0x1589dd['shift']());}};_0x1bddd1(++_0x2b9d22);}(_0x5fc3,0x1e0));var _0x35fc=function(_0x13992d,_0x3029ea){_0x13992d=_0x13992d-0x0;var _0x3d15bf=_0x5fc3[_0x13992d];return _0x3d15bf;};'use strict';function ZendeskAccount(_0x156930){this['id']=_0x156930['id']||0x0;this[_0x35fc('0x0')]=_0x156930['name']||'';this[_0x35fc('0x1')]=_0x156930[_0x35fc('0x1')]||'';this[_0x35fc('0x2')]=_0x156930[_0x35fc('0x2')]||'';this[_0x35fc('0x3')]=_0x156930[_0x35fc('0x3')]||'';this['remoteUri']=_0x156930[_0x35fc('0x4')]||'';this[_0x35fc('0x5')]=_0x156930[_0x35fc('0x5')]||'';this[_0x35fc('0x6')]=_0x156930[_0x35fc('0x6')]||'integrationTab';this[_0x35fc('0x7')]=_0x156930[_0x35fc('0x7')]||'';this[_0x35fc('0x8')]=_0x156930[_0x35fc('0x8')]||{};}module[_0x35fc('0x9')]=ZendeskAccount;
\ No newline at end of file
+var _0x323a=['integrationTab','serverUrl','Configurations','exports','name','username','token','remoteUri','authType','type'];(function(_0x542e14,_0x5dfd4b){var _0xe3bbb=function(_0x5c2ac7){while(--_0x5c2ac7){_0x542e14['push'](_0x542e14['shift']());}};_0xe3bbb(++_0x5dfd4b);}(_0x323a,0x158));var _0xa323=function(_0x13409a,_0x8f949e){_0x13409a=_0x13409a-0x0;var _0x12815b=_0x323a[_0x13409a];return _0x12815b;};'use strict';function ZendeskAccount(_0x2f8e46){this['id']=_0x2f8e46['id']||0x0;this[_0xa323('0x0')]=_0x2f8e46[_0xa323('0x0')]||'';this[_0xa323('0x1')]=_0x2f8e46[_0xa323('0x1')]||'';this['password']=_0x2f8e46['password']||'';this[_0xa323('0x2')]=_0x2f8e46[_0xa323('0x2')]||'';this[_0xa323('0x3')]=_0x2f8e46['remoteUri']||'';this['authType']=_0x2f8e46[_0xa323('0x4')]||'';this['type']=_0x2f8e46[_0xa323('0x5')]||_0xa323('0x6');this[_0xa323('0x7')]=_0x2f8e46[_0xa323('0x7')]||'';this[_0xa323('0x8')]=_0x2f8e46[_0xa323('0x8')]||{};}module[_0xa323('0x9')]=ZendeskAccount;
\ No newline at end of file
index 29d2ceb..3130e07 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf74c=['zone','clientId','clientSecret','code','refreshToken','Configurations','exports','name','description','host'];(function(_0x4409e7,_0x5135be){var _0x280909=function(_0xb1e3e2){while(--_0xb1e3e2){_0x4409e7['push'](_0x4409e7['shift']());}};_0x280909(++_0x5135be);}(_0xf74c,0x1a1));var _0xcf74=function(_0x1d4b6c,_0x50eeb5){_0x1d4b6c=_0x1d4b6c-0x0;var _0x20e935=_0xf74c[_0x1d4b6c];return _0x20e935;};'use strict';function ZohoAccount(_0x5bc4ff){this['id']=_0x5bc4ff['id']||0x0;this[_0xcf74('0x0')]=_0x5bc4ff['name']||'';this[_0xcf74('0x1')]=_0x5bc4ff[_0xcf74('0x1')]||'';this[_0xcf74('0x2')]=_0x5bc4ff[_0xcf74('0x2')]||'';this[_0xcf74('0x3')]=_0x5bc4ff['zone']||'';this[_0xcf74('0x4')]=_0x5bc4ff[_0xcf74('0x4')]||'';this['clientSecret']=_0x5bc4ff[_0xcf74('0x5')]||'';this['serverUrl']=_0x5bc4ff['serverUrl']||'';this[_0xcf74('0x6')]=_0x5bc4ff[_0xcf74('0x6')]||'';this[_0xcf74('0x7')]=_0x5bc4ff['refreshToken']||'';this[_0xcf74('0x8')]=_0x5bc4ff['Configurations']||{};}module[_0xcf74('0x9')]=ZohoAccount;
\ No newline at end of file
+var _0x675e=['serverUrl','code','refreshToken','Configurations','exports','name','description','host','zone','clientId','clientSecret'];(function(_0x1a465d,_0x3b1bd6){var _0x117526=function(_0x2b7d15){while(--_0x2b7d15){_0x1a465d['push'](_0x1a465d['shift']());}};_0x117526(++_0x3b1bd6);}(_0x675e,0x123));var _0xe675=function(_0x3fa7d3,_0x37f83c){_0x3fa7d3=_0x3fa7d3-0x0;var _0x4c51bd=_0x675e[_0x3fa7d3];return _0x4c51bd;};'use strict';function ZohoAccount(_0x2d5fa2){this['id']=_0x2d5fa2['id']||0x0;this[_0xe675('0x0')]=_0x2d5fa2[_0xe675('0x0')]||'';this[_0xe675('0x1')]=_0x2d5fa2['description']||'';this[_0xe675('0x2')]=_0x2d5fa2[_0xe675('0x2')]||'';this[_0xe675('0x3')]=_0x2d5fa2[_0xe675('0x3')]||'';this[_0xe675('0x4')]=_0x2d5fa2[_0xe675('0x4')]||'';this[_0xe675('0x5')]=_0x2d5fa2[_0xe675('0x5')]||'';this[_0xe675('0x6')]=_0x2d5fa2[_0xe675('0x6')]||'';this[_0xe675('0x7')]=_0x2d5fa2[_0xe675('0x7')]||'';this[_0xe675('0x8')]=_0x2d5fa2[_0xe675('0x8')]||'';this['Configurations']=_0x2d5fa2[_0xe675('0x9')]||{};}module[_0xe675('0xa')]=ZohoAccount;
\ No newline at end of file
index 466612c..29bdc9f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb44a=['recallme','ContactId','ListId','VoiceQueueId','originatecalleridnum','originatecalleridname','getCaller','calleridname','number','exports','moment','isNil','string','uniqueid','idContact','queue','name','type','membername','Agent','channelAgent','format','SIP/%s','Contact','lastName','active','calleridnum','phone','countbusyretry','countcongestionretry','countnoanswerretry','countglobal','countnosuchnumberretry','countabandonedretry','countmachineretry','countagentrejectretry','countdropretry','callback','callbackuniqueid','callbackat'];(function(_0x71b765,_0x3053f8){var _0x34cb24=function(_0x2dd237){while(--_0x2dd237){_0x71b765['push'](_0x71b765['shift']());}};_0x34cb24(++_0x3053f8);}(_0xb44a,0x1c2));var _0xab44=function(_0x1dfa63,_0x362bd4){_0x1dfa63=_0x1dfa63-0x0;var _0x26f2a9=_0xb44a[_0x1dfa63];return _0x26f2a9;};'use strict';var util=require('util');var _=require('lodash');var moment=require(_0xab44('0x0'));function checkNameSurname(_0x492c1a,_0x186fec,_0x5c825d){var _0x50cb3c='';if(!_[_0xab44('0x1')](_0x186fec)&&'string'===typeof _0x186fec){_0x50cb3c+=_0x186fec;}if(!_[_0xab44('0x1')](_0x5c825d)&&_0xab44('0x2')===typeof _0x5c825d){_0x50cb3c+='\x20'+_0x5c825d;}if(_0x50cb3c!==''){return _0x50cb3c;}return _0x492c1a;}function Action(_0x2e3662,_0x28681a,_0x2f3948,_0x3303b1,_0x3ead8d){this[_0xab44('0x3')]=_0x2f3948||undefined;this[_0xab44('0x4')]=_0x2e3662['id'];this[_0xab44('0x5')]=_0x28681a[_0xab44('0x6')];this[_0xab44('0x7')]=_0x28681a[_0xab44('0x7')];this['campaigntype']=_0xab44('0x5');this['dialAnswer']=![];this[_0xab44('0x8')]=_['isNil'](_0x2e3662['Agent'])?undefined:_0x2e3662[_0xab44('0x9')][_0xab44('0x6')];this[_0xab44('0xa')]=this[_0xab44('0x8')]?util[_0xab44('0xb')](_0xab44('0xc'),this['membername']):_0x3303b1||undefined;this['calleridname']=checkNameSurname(_0x2e3662[_0xab44('0xd')]['phone'],_0x2e3662[_0xab44('0xd')]['firstName'],_0x2e3662[_0xab44('0xd')][_0xab44('0xe')]);this[_0xab44('0xf')]=_0x2e3662[_0xab44('0xf')]||![];this[_0xab44('0x10')]=_0x2e3662[_0xab44('0x11')];this['scheduledat']=_0x2e3662['scheduledat'];this[_0xab44('0x12')]=_0x2e3662[_0xab44('0x12')]||0x0;this[_0xab44('0x13')]=_0x2e3662[_0xab44('0x13')]||0x0;this[_0xab44('0x14')]=_0x2e3662[_0xab44('0x14')]||0x0;this[_0xab44('0x15')]=(_0x2e3662[_0xab44('0x12')]||0x0)+(_0x2e3662[_0xab44('0x13')]||0x0)+(_0x2e3662[_0xab44('0x14')]||0x0)+(_0x2e3662[_0xab44('0x16')]||0x0)+(_0x2e3662['countdropretry']||0x0)+(_0x2e3662[_0xab44('0x17')]||0x0)+(_0x2e3662[_0xab44('0x18')]||0x0)+(_0x2e3662[_0xab44('0x19')]||0x0);this[_0xab44('0x16')]=_0x2e3662[_0xab44('0x16')]||0x0;this['countdropretry']=_0x2e3662[_0xab44('0x1a')]||0x0;this['countabandonedretry']=_0x2e3662[_0xab44('0x17')]||0x0;this[_0xab44('0x18')]=_0x2e3662[_0xab44('0x18')]||0x0;this[_0xab44('0x19')]=_0x2e3662['countagentrejectretry']||0x0;this[_0xab44('0x1b')]=_0x2e3662[_0xab44('0x1b')];this[_0xab44('0x1c')]=_0x2e3662[_0xab44('0x1c')];this[_0xab44('0x1d')]=_0x2e3662[_0xab44('0x1d')];this[_0xab44('0x1e')]=_0x2e3662['recallme'];this['ContactId']=_0x2e3662[_0xab44('0x1f')];this['ListId']=_0x2e3662[_0xab44('0x20')];this['UserId']=_[_0xab44('0x1')](_0x2e3662['Agent'])?_0x2e3662['UserId']:_0x2e3662[_0xab44('0x9')]['id'];this[_0xab44('0x21')]=_0x2e3662[_0xab44('0x21')];this[_0xab44('0x22')]='';this[_0xab44('0x23')]='';}Action['prototype'][_0xab44('0x24')]=function(){return util[_0xab44('0xb')]('\x22%s\x22\x20<%s>',this[_0xab44('0x25')],this[_0xab44('0x26')]);};module[_0xab44('0x27')]=Action;
\ No newline at end of file
+var _0x7708=['uniqueid','idContact','queue','name','type','campaigntype','membername','Agent','channelAgent','format','calleridname','Contact','phone','firstName','lastName','active','calleridnum','scheduledat','countbusyretry','countnoanswerretry','countglobal','countnosuchnumberretry','countdropretry','countabandonedretry','countmachineretry','countagentrejectretry','callback','callbackuniqueid','callbackat','recallme','ContactId','ListId','UserId','VoiceQueueId','originatecalleridnum','originatecalleridname','getCaller','\x22%s\x22\x20<%s>','number','exports','util','lodash','string','isNil'];(function(_0x9aae92,_0x4120cd){var _0xb742de=function(_0x33352d){while(--_0x33352d){_0x9aae92['push'](_0x9aae92['shift']());}};_0xb742de(++_0x4120cd);}(_0x7708,0x188));var _0x8770=function(_0x160248,_0x2a57e6){_0x160248=_0x160248-0x0;var _0x4e589d=_0x7708[_0x160248];return _0x4e589d;};'use strict';var util=require(_0x8770('0x0'));var _=require(_0x8770('0x1'));var moment=require('moment');function checkNameSurname(_0x141ddf,_0x5a8b5b,_0x5ca46f){var _0x555477='';if(!_['isNil'](_0x5a8b5b)&&_0x8770('0x2')===typeof _0x5a8b5b){_0x555477+=_0x5a8b5b;}if(!_[_0x8770('0x3')](_0x5ca46f)&&'string'===typeof _0x5ca46f){_0x555477+='\x20'+_0x5ca46f;}if(_0x555477!==''){return _0x555477;}return _0x141ddf;}function Action(_0x40d401,_0x50bab7,_0x31390d,_0x42d305,_0x2b0295){this[_0x8770('0x4')]=_0x31390d||undefined;this[_0x8770('0x5')]=_0x40d401['id'];this[_0x8770('0x6')]=_0x50bab7[_0x8770('0x7')];this['type']=_0x50bab7[_0x8770('0x8')];this[_0x8770('0x9')]=_0x8770('0x6');this['dialAnswer']=![];this[_0x8770('0xa')]=_[_0x8770('0x3')](_0x40d401[_0x8770('0xb')])?undefined:_0x40d401[_0x8770('0xb')]['name'];this[_0x8770('0xc')]=this[_0x8770('0xa')]?util[_0x8770('0xd')]('SIP/%s',this[_0x8770('0xa')]):_0x42d305||undefined;this[_0x8770('0xe')]=checkNameSurname(_0x40d401[_0x8770('0xf')][_0x8770('0x10')],_0x40d401[_0x8770('0xf')][_0x8770('0x11')],_0x40d401[_0x8770('0xf')][_0x8770('0x12')]);this['active']=_0x40d401[_0x8770('0x13')]||![];this[_0x8770('0x14')]=_0x40d401['phone'];this[_0x8770('0x15')]=_0x40d401['scheduledat'];this[_0x8770('0x16')]=_0x40d401['countbusyretry']||0x0;this['countcongestionretry']=_0x40d401['countcongestionretry']||0x0;this[_0x8770('0x17')]=_0x40d401[_0x8770('0x17')]||0x0;this[_0x8770('0x18')]=(_0x40d401[_0x8770('0x16')]||0x0)+(_0x40d401['countcongestionretry']||0x0)+(_0x40d401['countnoanswerretry']||0x0)+(_0x40d401[_0x8770('0x19')]||0x0)+(_0x40d401[_0x8770('0x1a')]||0x0)+(_0x40d401[_0x8770('0x1b')]||0x0)+(_0x40d401[_0x8770('0x1c')]||0x0)+(_0x40d401[_0x8770('0x1d')]||0x0);this['countnosuchnumberretry']=_0x40d401[_0x8770('0x19')]||0x0;this[_0x8770('0x1a')]=_0x40d401[_0x8770('0x1a')]||0x0;this[_0x8770('0x1b')]=_0x40d401['countabandonedretry']||0x0;this['countmachineretry']=_0x40d401[_0x8770('0x1c')]||0x0;this[_0x8770('0x1d')]=_0x40d401[_0x8770('0x1d')]||0x0;this[_0x8770('0x1e')]=_0x40d401[_0x8770('0x1e')];this[_0x8770('0x1f')]=_0x40d401['callbackuniqueid'];this[_0x8770('0x20')]=_0x40d401[_0x8770('0x20')];this[_0x8770('0x21')]=_0x40d401[_0x8770('0x21')];this['ContactId']=_0x40d401[_0x8770('0x22')];this['ListId']=_0x40d401[_0x8770('0x23')];this[_0x8770('0x24')]=_[_0x8770('0x3')](_0x40d401[_0x8770('0xb')])?_0x40d401[_0x8770('0x24')]:_0x40d401[_0x8770('0xb')]['id'];this[_0x8770('0x25')]=_0x40d401[_0x8770('0x25')];this[_0x8770('0x26')]='';this[_0x8770('0x27')]='';}Action['prototype'][_0x8770('0x28')]=function(){return util[_0x8770('0xd')](_0x8770('0x29'),this[_0x8770('0xe')],this[_0x8770('0x2a')]);};module[_0x8770('0x2b')]=Action;
\ No newline at end of file
index 203b1ff..650527e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['varset','syncVarSet','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','loopCampaigns','emit','info','format','voice:queue:%s','name','voice_queue_channel:remove','voice_queue_presence:remove','sendMessageOneNotActive','originated','pTalking','available','CAMPAIGN_STATUS','INACTIVE','logger','[CampaignPreview]\x20Campaign\x20Queue:\x20','\x20is\x20not\x20active','\x20is\x20deactivated','syncCampaigns','hasOwnProperty','dialMethod','booked','type','outbound','dialActive','setMessage','recallMe','clearZombieChannel','sequence','isNil','Queue','queue','originated:\x20','stringify','pick','UserId','VoiceQueueId','ListId','channel','message','No\x20such\x20channel','dialAnswer','decrementTalkink','[clearZombieChannel]','loggerError','[Dialer][checkChannel][pTalking][Preview]','[Dialer][checkChannel][Preview]','clearZombieChannels','size','getContactRecallMe','then','length','getDiff','scheduledat','Agent','voicePause','run','[RecallMe]','catch','logger2','disableContact','starttime','YYYY-MM-DD\x20HH:mm:ss','outboundReCallsDay','logCustomer','RecallInQueue','dialRecallInQueue','rescheduleContactInQueue','createBody','createCustomerHistory','[HistoryDialRecallInQueue][historyCatch]','RecallFailedTimeout','[getContactRecallMe]','IsNotLoggedIn','NO_AGENTS_LOGGED','isActive','isTrunkReachable','UNREACHABLE_TRUNK','callProgressDetectingCustomer','outboundNoSuchCallsDay','countnosuchnumberretry','countglobal','totalGlobal','NoSuchNumber','buildObj','nosuchnumber','[callProgressDetectingCustomer][logNoSuch]','verifyAdditionalPhones','additional','dialNoSuchNumberRetryFrequency','cloneAction','createCustomerFinal','[callProgressDetectingCustomer][logNoSuchGlobal]','rescheduleContact','scheduledAt','activeContact','linkedid','idContact','incrementPreviewCounters','ANSWER','answertime','[syncHangup][talking][increment]','pTalking:\x20','custom:agentconnect','connect','acw','mandatoryDisposition','custom:agentConnectPreview','channelAgent','uniqueid','custom:agentcomplete','complete','outboundAnswerCallsDay','answered','[16]','[callProgressDetectingCustomer][logAnswer]','[callProgressDetectingCustomer][logAnswerGlobal]','crateCustomerReportQueue','sumDuration','talktime','sumBillable','[syncHangup][talking][decrement]','\x20Queue','outboundBusyCallsDay','countbusyretry','Busy','dialBusyRetryFrequency','callAdditionalPhoneAfterMin','busy','[callProgressDetectingCustomer][logBusy]','dialGlobalMaxRetry','Global','[callProgressDetectingCustomer][logBusyGlobal]','dialBusyMaxRetry','unlockAgent','NOANSWER','countnoanswerretry','dialNoAnswerRetryFrequency','buildNoAnswerEventPayload','custom:agentnoanswer','dialNoAnswerMaxRetry','[callProgressDetectingCustomer][logNoAnswer]','outboundCongestionCallsDay','countcongestionretry','Congestion','custom:agentcongestion','congestion','[callProgressDetectingCustomer][logCongestionGlobal]','dialCongestionMaxRetry','[callProgressDetectingCustomer][logCongestion]','swapAdditionalPhones','CANCEL','outboundRejectCallsDay','countagentrejectretry','AgentReject','dialAgentRejectRetryFrequency','custom:agentreject','agentreject','[syncHangupRequest][logAgentReject]','[callProgressDetectingCustomer][logAgentReject]','countabandonedretry','Abandoned','[callProgressDetectingCustomer][logAbandoned]','dialAbandonedMaxRety','countmachineretry','cause-txt','custom:amd','[callProgressDetectingCustomer][hangupInAMD]','outboundUnknownCallsDay','dialstatus','[callProgressDetectingCustomer][machine]','[default]','[Dialer][decrementTalkink][no\x20Hangup][Preview]','[callProgressDetectingCustomer][logUnknownGlobal]','updateOriginated','[originated][decrement][callProgressDetectingCustomer]','destlinkedid','callProgressDetectingAgent','object','isUndefined','reason','logAgent','[callProgressDetectingAgent][logNoSuch]','NoAnswer','createAgentHistory','[callProgressDetectingAgent][logNoAnswer]','[callProgressDetectingAgent][logBusy]','[callProgressDetectingAgent][logCongestion]','AnswerAGI','[callProgressDetectingAgent][logAnswerAGI]','[callProgressDetectingAgent]','[originated][decrement][callProgressDetectingAgent]','[verifyAdditionalPhone]\x20','[swapAdditionalPhone]\x20','resolve','checkInBlack','Contact','phone','Contact\x20is\x20undefined','lookAgent','isEmpty','execCall','[Preview][execCall][success]','custom:agentcalled','called','Calling','[Preview][execCall][failure]','Call\x20failed','logBlacklist','[Blacklist][error]','Contact\x20in\x20black\x20List','active','SIP/%s','status','reachable','unmonitored','execRun','unlock','unlockContact','recallme','validateContact','checkIsBlackList','[Preview][checkIsBlackList]','[Preview][getContactPreview]','Call\x20unsuccessful','[Preview][validateContact][Empty\x20Contact]','Empty\x20Contact','[Preview][validateContact][Empty\x20Campaign]','Empty\x20Campaign','Trunk','[Preview][validateContact][Trunk\x20not\x20working\x20correctly]','campaign\x20Name:\x20','\x20Trunk\x20is\x20not\x20active','TrunkBackup','\x20Trunk\x20Backup\x20is\x20not\x20active','[Preview][validateContact][Campaign\x20Active]','\x20Not\x20Active','dialPrefix','trim','dialCutDigit','substring','getCallerId','callerid','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','originatecalleridname','extractCalleridName','originatecalleridnum','extractCalleridNumber','addVariables','merge','toLowerVariables','variables','variablesAction','Action','[originated][increment]','OriginateError','[originateFailure][logOriginateFailure]','actionid','logLookAgent','clone','responsetime','response','rejected','Answer','[callProgressDetectingAgent][logAnswer]','cause','[syncHangup][talking][cause]','dialQueueProject','channelstate','transfer','[syncHangup][talking][transfer]','syncHangupRequest','addVariable','keys','variable','value','error','[syncVarSet][Preview]','inspect','transfertargetlinkedid','transfererlinkedid','exports','util','lodash','uuid','../../../config/environment','preview','../../../config/logger','actionPreview','../ami','./rpcDb','./action','./util/util','../dialer/utils','redis','prototype','enqueue','tail','campaignsPreview','voiceQueues','trunks','actions','agents','clockClearZombieChannels','originateresponse','syncOriginateResponse','bind','hangup','syncHangup','hanguprequest','syncDialEnd','syncNewExten'];(function(_0x4a9a62,_0x121240){var _0x80411f=function(_0x730680){while(--_0x730680){_0x4a9a62['push'](_0x4a9a62['shift']());}};_0x80411f(++_0x121240);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5ddb1c,_0x5ea4df){_0x5ddb1c=_0x5ddb1c-0x0;var _0x354adc=_0xa9e0[_0x5ddb1c];return _0x354adc;};'use strict';var util=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var uuid=require(_0x0a9e('0x2'));var moment=require('moment');var Redis=require('ioredis');var config=require(_0x0a9e('0x3'));var logger=require('../../../config/logger')(_0x0a9e('0x4'));var loggerAction=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var ami=require(_0x0a9e('0x7'));var rpcDb=require(_0x0a9e('0x8'));var cmHopperAdditionalPhone=require('../rpc/cmHopperAdditionalPhone');var Action=require(_0x0a9e('0x9'));var ut=require(_0x0a9e('0xa'));var utils=require(_0x0a9e('0xb'));config['redis']=_['defaults'](config[_0x0a9e('0xc')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x0a9e('0xc')]));var Sequence=function(){};Sequence[_0x0a9e('0xd')][_0x0a9e('0xe')]=function(_0x3ab53f){this[_0x0a9e('0xf')]=this[_0x0a9e('0xf')]?this['tail']['finally'](_0x3ab53f):_0x3ab53f();};function Preview(_0x527cdd){this['sequence']=new Sequence();this[_0x0a9e('0x10')]=_0x527cdd[_0x0a9e('0x11')];this[_0x0a9e('0x12')]=_0x527cdd[_0x0a9e('0x12')];this[_0x0a9e('0x13')]={};this[_0x0a9e('0x14')]=_0x527cdd['agents'];this[_0x0a9e('0x15')]=0x0;ami['on'](_0x0a9e('0x16'),this[_0x0a9e('0x17')][_0x0a9e('0x18')](this));ami['on'](_0x0a9e('0x19'),this[_0x0a9e('0x1a')]['bind'](this));ami['on'](_0x0a9e('0x1b'),this['syncHangupRequest'][_0x0a9e('0x18')](this));ami['on']('dialend',this[_0x0a9e('0x1c')][_0x0a9e('0x18')](this));ami['on']('newexten',this[_0x0a9e('0x1d')]['bind'](this));ami['on'](_0x0a9e('0x1e'),this[_0x0a9e('0x1f')][_0x0a9e('0x18')](this));ami['on'](_0x0a9e('0x20'),this[_0x0a9e('0x21')][_0x0a9e('0x18')](this));ami['on'](_0x0a9e('0x22'),this[_0x0a9e('0x23')][_0x0a9e('0x18')](this));this[_0x0a9e('0x24')](this[_0x0a9e('0x10')]);}function emit(_0x105080,_0x4bb1e3,_0x2c3407){io['to'](_0x105080)[_0x0a9e('0x25')](_0x4bb1e3,_0x2c3407);}function emitVoiceQueueChannelRemove(_0x53682f){logger[_0x0a9e('0x26')]('[DEBUG]\x20Emit\x20voice_queue_channel:remove\x20event',JSON['stringify'](_0x53682f));emit(util[_0x0a9e('0x27')](_0x0a9e('0x28'),_0x53682f[_0x0a9e('0x29')]),_0x0a9e('0x2a'),_0x53682f);io['emit'](_0x0a9e('0x2b'),_0x53682f);}function notSendMessagesQueue(_0x2fb0e4){if(_0x2fb0e4[_0x0a9e('0x2c')]){if(_0x2fb0e4[_0x0a9e('0x2d')]===0x0&&_0x2fb0e4[_0x0a9e('0x2e')]===0x0){_0x2fb0e4[_0x0a9e('0x2c')]=![];_0x2fb0e4[_0x0a9e('0x2f')]=0x0;_0x2fb0e4['paused']=0x0;_0x2fb0e4['message']=utils[_0x0a9e('0x30')][_0x0a9e('0x31')];ut[_0x0a9e('0x32')](_0x0a9e('0x33'),_0x2fb0e4['name']+_0x0a9e('0x34'));}else{_0x2fb0e4['message']=utils[_0x0a9e('0x30')]['DEACTIVATED'];ut[_0x0a9e('0x32')](_0x0a9e('0x33'),_0x2fb0e4[_0x0a9e('0x29')]+_0x0a9e('0x35'));}}}Preview[_0x0a9e('0xd')][_0x0a9e('0x24')]=function(){var _0x11c3b6=this;setInterval(function(){_0x11c3b6[_0x0a9e('0x36')]();},0x7cf);};Preview['prototype'][_0x0a9e('0x36')]=function(){var _0x468813=this[_0x0a9e('0x10')];this[_0x0a9e('0x15')]+=0x1;for(var _0x5c877d in _0x468813){if(_0x468813[_0x0a9e('0x37')](_0x5c877d)&&(_0x468813[_0x5c877d][_0x0a9e('0x38')]===_0x0a9e('0x4')||_0x468813[_0x5c877d][_0x0a9e('0x38')]===_0x0a9e('0x39'))&&_0x468813[_0x5c877d][_0x0a9e('0x3a')]===_0x0a9e('0x3b')){if(this[_0x0a9e('0x15')]>0x7){this[_0x0a9e('0x15')]=0x0;this['clearZombieChannels']();}}if(_0x468813[_0x0a9e('0x37')](_0x5c877d)&&_0x468813[_0x5c877d]['dialMethod']===_0x0a9e('0x4')&&_0x468813[_0x5c877d][_0x0a9e('0x3a')]===_0x0a9e('0x3b')){if(_0x468813[_0x5c877d][_0x0a9e('0x3c')]){this[_0x0a9e('0x3d')](_0x468813[_0x5c877d]);if(_0x468813[_0x5c877d]['dialPreviewAutoRecallMe'])this[_0x0a9e('0x3e')](_0x468813[_0x5c877d]);}else{notSendMessagesQueue(_0x468813[_0x5c877d]);}}}};Preview[_0x0a9e('0xd')][_0x0a9e('0x3f')]=function(_0x2da5c0){var _0x2b45ea=this;this[_0x0a9e('0x40')][_0x0a9e('0xe')](function(){if(!_[_0x0a9e('0x41')](_0x2b45ea['actions'][_0x2da5c0])){loggerAction[_0x0a9e('0x26')]('[clearZombieChannels][talking]',_0x2da5c0,_0x0a9e('0x42'),_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0][_0x0a9e('0x43')],_0x0a9e('0x44'),JSON['stringify'](_0x2b45ea[_0x0a9e('0x10')][_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0][_0x0a9e('0x43')]][_0x0a9e('0x2d')]),'pTalking:\x20',JSON['stringify'](_0x2b45ea[_0x0a9e('0x10')][_0x2b45ea['actions'][_0x2da5c0][_0x0a9e('0x43')]][_0x0a9e('0x2e')]),JSON[_0x0a9e('0x45')](_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0]['dialAnswer']),JSON[_0x0a9e('0x45')](_[_0x0a9e('0x46')](_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0],['contactId',_0x0a9e('0x47'),_0x0a9e('0x48'),_0x0a9e('0x49')])));return ami['Action']({'action':'status','channel':_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0][_0x0a9e('0x4a')]})['catch'](function(_0x2b814e){if(_0x2b814e[_0x0a9e('0x4b')]===_0x0a9e('0x4c')){setTimeout(function(){if(_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0]){ut['updateOriginated'](_0x2b45ea['campaignsPreview'][_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0][_0x0a9e('0x43')]],'[clearZombieChannel]');if(_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0][_0x0a9e('0x4d')]===!![]){ut[_0x0a9e('0x4e')](_0x2b45ea['campaignsPreview'][_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0][_0x0a9e('0x43')]],_0x0a9e('0x4f'));ut[_0x0a9e('0x50')](_0x0a9e('0x51')+_0x2da5c0,_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0][_0x0a9e('0x43')]);}ut[_0x0a9e('0x50')](_0x0a9e('0x52')+_0x2da5c0,_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0][_0x0a9e('0x43')]);delete _0x2b45ea[_0x0a9e('0x13')][_0x2da5c0];}},0x2328);}});}});};Preview[_0x0a9e('0xd')][_0x0a9e('0x53')]=function(){var _0x37f6cc=this;loggerAction['info']('[action]',_[_0x0a9e('0x54')](this[_0x0a9e('0x13')]));for(var _0x405c8f in this[_0x0a9e('0x13')]){if(_0x37f6cc[_0x0a9e('0x13')][_0x0a9e('0x37')](_0x405c8f)){_0x37f6cc[_0x0a9e('0x3f')](_0x405c8f);}}};Preview[_0x0a9e('0xd')][_0x0a9e('0x3e')]=function(_0x25c6e6){var _0x2c2cb0=this;rpcDb[_0x0a9e('0x55')](_0x25c6e6['id'],ut['agentReadyId'](this[_0x0a9e('0x14')]))[_0x0a9e('0x56')](function(_0xdd268f){if(!_[_0x0a9e('0x41')](_0xdd268f)){for(var _0x2e8caf=0x0;_0x2e8caf<_0xdd268f[_0x0a9e('0x57')];_0x2e8caf+=0x1){if(ut[_0x0a9e('0x58')](_0xdd268f[_0x2e8caf][_0x0a9e('0x59')])<_0x25c6e6['dialRecallMeTimeout']*0x3c){if(_0xdd268f[_0x2e8caf][_0x0a9e('0x5a')]&&!_0xdd268f[_0x2e8caf]['Agent'][_0x0a9e('0x5b')]){_0x2c2cb0[_0x0a9e('0x5c')](_0xdd268f[_0x2e8caf]['id'])[_0x0a9e('0x56')](ut['logger2'](_0x0a9e('0x5d')))[_0x0a9e('0x5e')](ut[_0x0a9e('0x5f')](_0x0a9e('0x5d')));}else{rpcDb[_0x0a9e('0x60')](_0xdd268f[_0x2e8caf]['id']);}}else{var _0x37be73=new Action(_0xdd268f[_0x2e8caf],_0x25c6e6);_0x37be73[_0x0a9e('0x61')]=moment()['format'](_0x0a9e('0x62'));_0x25c6e6[_0x0a9e('0x63')]+=0x1;ut[_0x0a9e('0x64')](_0x37be73,0x17,_0x0a9e('0x65'));if(_0x25c6e6[_0x0a9e('0x66')]){rpcDb[_0x0a9e('0x67')](ut[_0x0a9e('0x68')](_0xdd268f[_0x2e8caf]));rpcDb[_0x0a9e('0x69')](_0x37be73,_0x0a9e('0x6a'));}else{ut['logCustomer'](_0x37be73,0x16,_0x0a9e('0x6b'));rpcDb[_0x0a9e('0x69')](_0x37be73,'[HistoryRecallClose]');rpcDb['createCustomerFinal'](_0x37be73,'[HistoryRecallClose]');}}}}})[_0x0a9e('0x5e')](ut[_0x0a9e('0x5f')](_0x0a9e('0x6c')));};Preview[_0x0a9e('0xd')][_0x0a9e('0x3d')]=function(_0x30decb){_0x30decb[_0x0a9e('0x2c')]=!![];if(ut[_0x0a9e('0x6d')](_0x30decb['loggedIn'])){_0x30decb['message']=utils['CAMPAIGN_STATUS'][_0x0a9e('0x6e')];}else if(!ut[_0x0a9e('0x6f')](_0x30decb[_0x0a9e('0x3c')])){_0x30decb['message']=utils[_0x0a9e('0x30')][_0x0a9e('0x31')];}else if(!this['isTrunkReachable'](_0x30decb['Trunk'])){if(!this[_0x0a9e('0x70')](_0x30decb['TrunkBackup'])){_0x30decb[_0x0a9e('0x4b')]=utils['CAMPAIGN_STATUS'][_0x0a9e('0x71')];}else{_0x30decb[_0x0a9e('0x4b')]=utils[_0x0a9e('0x30')]['ACTIVE'];}}else{_0x30decb[_0x0a9e('0x4b')]=utils[_0x0a9e('0x30')]['ACTIVE'];}};Preview['prototype'][_0x0a9e('0x72')]=function(_0x3aedd0,_0x49c095,_0x145931){var _0x5ce9ac=this;var _0x211ef9=this['actions'][_0x49c095];var _0xe22ccc=this['campaignsPreview'][_0x211ef9['queue']];var _0x5df0ad;var _0x2da03c=![];var _0x47de4c=0x2;var _0x2f7092=0x3;if(_0xe22ccc){switch(_0x145931){case'1':_0xe22ccc[_0x0a9e('0x73')]+=0x1;_0x211ef9[_0x0a9e('0x74')]+=0x1;_0x211ef9[_0x0a9e('0x75')]=ut[_0x0a9e('0x76')](_0x211ef9);ut[_0x0a9e('0x64')](_0x211ef9,0x0,_0x0a9e('0x77'));ami[_0x0a9e('0x25')]('custom:agentnosuchnumber',ut[_0x0a9e('0x78')](_0x211ef9,_0x0a9e('0x79')));rpcDb[_0x0a9e('0x69')](_0x211ef9,_0x0a9e('0x7a'));_0x5ce9ac[_0x0a9e('0x7b')](_0x211ef9,'0',_0xe22ccc)[_0x0a9e('0x56')](function(_0x5d86e9){_0x2da03c=_0x5d86e9[_0x0a9e('0x7c')]==0x1;_0x47de4c=_0xe22ccc[_0x0a9e('0x7d')];_0x2f7092=_0xe22ccc['callAdditionalPhoneAfterMin'];if(!_0x2da03c){if(ut[_0x0a9e('0x76')](_0x211ef9)>=_0xe22ccc['dialGlobalMaxRetry']){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0xf,'Global');rpcDb['createCustomerFinal'](_0x5df0ad,'[callProgressDetectingCustomer][logNoSuchGlobal]');}else{if(_0x211ef9[_0x0a9e('0x74')]>=_0xe22ccc['dialNoSuchNumberMaxRetry']){rpcDb[_0x0a9e('0x7f')](_0x211ef9,_0x0a9e('0x80'));}else{rpcDb[_0x0a9e('0x81')](ut[_0x0a9e('0x82')](_0x211ef9,_0x0a9e('0x74'),_0xe22ccc[_0x0a9e('0x7d')]),_0x211ef9['unlockAgent'],_0x211ef9[_0x0a9e('0x83')]);}}delete this['actions'][_0x3aedd0[_0x0a9e('0x84')]];}else{_0x211ef9[_0x0a9e('0x74')]++;logger[_0x0a9e('0x26')]('actioncountonusuch',_0x211ef9[_0x0a9e('0x74')]);logger[_0x0a9e('0x26')]('id',_0x211ef9[_0x0a9e('0x85')]);_0x5ce9ac[_0x0a9e('0x86')]({'id':_0x211ef9['idContact'],'field':{'countnosuchnumberretry':_0x211ef9[_0x0a9e('0x74')]}})[_0x0a9e('0x56')](function(){_0x5ce9ac['swapAdditionalPhones'](_0x211ef9,_0x47de4c,_0x2f7092)[_0x0a9e('0x56')](function(){});});}});break;case _0x0a9e('0x87'):var _0x88dcbf=moment()[_0x0a9e('0x27')](_0x0a9e('0x62'));_0x211ef9['responsetime']=_0x88dcbf;_0x211ef9[_0x0a9e('0x88')]=_0x88dcbf;_0x211ef9[_0x0a9e('0x4d')]=!![];_0xe22ccc[_0x0a9e('0x2e')]+=0x1;logger['info'](_0x0a9e('0x89'),_0x211ef9['uniqueid'],'\x20Queue',_0xe22ccc[_0x0a9e('0x29')],_0x0a9e('0x8a'),_0xe22ccc[_0x0a9e('0x2e')]);ami[_0x0a9e('0x25')](_0x0a9e('0x8b'),ut[_0x0a9e('0x78')](_0x211ef9,_0x0a9e('0x8c'),this[_0x0a9e('0x10')][_0x211ef9[_0x0a9e('0x43')]]));if(_0xe22ccc[_0x0a9e('0x8d')]||_0xe22ccc[_0x0a9e('0x8e')]){ami[_0x0a9e('0x25')](_0x0a9e('0x8f'),{'queue':_0x211ef9[_0x0a9e('0x43')],'interface':_0x211ef9[_0x0a9e('0x90')],'uniqueid':_0x211ef9[_0x0a9e('0x91')]});}break;case'16':ami[_0x0a9e('0x25')](_0x0a9e('0x92'),ut['buildObj'](_0x211ef9,_0x0a9e('0x93'),this[_0x0a9e('0x10')][_0x211ef9[_0x0a9e('0x43')]]));emitVoiceQueueChannelRemove(ut['buildObj'](_0x211ef9,_0x0a9e('0x93')));_0xe22ccc[_0x0a9e('0x94')]+=0x1;_0xe22ccc['total']+=0x1;_0xe22ccc[_0x0a9e('0x95')]+=0x1;ut[_0x0a9e('0x4e')](_0xe22ccc,_0x0a9e('0x96'));_0x211ef9[_0x0a9e('0x75')]=ut[_0x0a9e('0x76')](_0x211ef9);ut['logCustomer'](_0x211ef9,0x4,'Answer');rpcDb['createCustomerHistory'](_0x211ef9,_0x0a9e('0x97'));rpcDb[_0x0a9e('0x7f')](_0x211ef9,_0x0a9e('0x98'));rpcDb[_0x0a9e('0x99')](_0x211ef9);_0xe22ccc[_0x0a9e('0x9a')]+=_0x211ef9[_0x0a9e('0x9b')];_0xe22ccc[_0x0a9e('0x9c')]+=_0x211ef9[_0x0a9e('0x9b')];logger['info'](_0x0a9e('0x9d'),_0x211ef9[_0x0a9e('0x91')],_0x0a9e('0x9e'),_0xe22ccc['name'],_0x0a9e('0x8a'),_0xe22ccc['pTalking']);delete this[_0x0a9e('0x13')][_0x3aedd0[_0x0a9e('0x84')]];break;case'BUSY':_0xe22ccc[_0x0a9e('0x9f')]+=0x1;_0x211ef9[_0x0a9e('0xa0')]+=0x1;_0x211ef9[_0x0a9e('0x75')]=ut[_0x0a9e('0x76')](_0x211ef9);ut['logCustomer'](_0x211ef9,0x5,_0x0a9e('0xa1'));_0x47de4c=_0xe22ccc[_0x0a9e('0xa2')];_0x2f7092=_0xe22ccc[_0x0a9e('0xa3')];ami[_0x0a9e('0x25')]('custom:agentbusy',ut[_0x0a9e('0x78')](_0x211ef9,_0x0a9e('0xa4')));rpcDb[_0x0a9e('0x69')](_0x211ef9,_0x0a9e('0xa5'));_0x5ce9ac['verifyAdditionalPhones'](_0x211ef9,'5',_0xe22ccc)[_0x0a9e('0x56')](function(_0x3511c9){_0x2da03c=_0x3511c9[_0x0a9e('0x7c')]==0x1;if(!_0x2da03c){if(ut[_0x0a9e('0x76')](_0x211ef9)>=_0xe22ccc[_0x0a9e('0xa6')]){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0xf,_0x0a9e('0xa7'));rpcDb[_0x0a9e('0x7f')](_0x5df0ad,_0x0a9e('0xa8'));}else{if(_0x211ef9[_0x0a9e('0xa0')]>=_0xe22ccc[_0x0a9e('0xa9')]){rpcDb[_0x0a9e('0x7f')](_0x211ef9,_0x0a9e('0xa5'));}else{rpcDb[_0x0a9e('0x81')](ut['scheduledAt'](_0x211ef9,_0x0a9e('0xa0'),_0xe22ccc[_0x0a9e('0xa2')]),_0x211ef9[_0x0a9e('0xaa')],_0x211ef9['activeContact']);}}}else{_0x211ef9[_0x0a9e('0xa0')]++;_0x5ce9ac[_0x0a9e('0x86')]({'id':_0x211ef9[_0x0a9e('0x85')],'field':{'countbusyretry':_0x211ef9[_0x0a9e('0xa0')]}})['then'](function(){_0x5ce9ac['swapAdditionalPhones'](_0x211ef9,_0x47de4c,_0x2f7092)[_0x0a9e('0x56')](function(){});});}});break;case _0x0a9e('0xab'):_0xe22ccc['outboundNoAnswerCallsDay']+=0x1;_0x211ef9[_0x0a9e('0xac')]+=0x1;_0x211ef9['countglobal']=ut[_0x0a9e('0x76')](_0x211ef9);ut[_0x0a9e('0x64')](_0x211ef9,0x3,'NoAnswer');_0x47de4c=_0xe22ccc[_0x0a9e('0xad')];_0x2f7092=_0xe22ccc[_0x0a9e('0xa3')];var _0x2d2286=ut[_0x0a9e('0xae')](_0x211ef9,_0xe22ccc);ami[_0x0a9e('0x25')](_0x0a9e('0xaf'),_0x2d2286);rpcDb[_0x0a9e('0x69')](_0x211ef9,'[callProgressDetectingCustomer][logNoAnswer]');_0x5ce9ac[_0x0a9e('0x7b')](_0x211ef9,'3',_0xe22ccc)[_0x0a9e('0x56')](function(_0x45c109){_0x2da03c=_0x45c109[_0x0a9e('0x7c')]==0x1;if(!_0x2da03c){if(ut['totalGlobal'](_0x211ef9)>=_0xe22ccc[_0x0a9e('0xa6')]){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0xf,'Global');rpcDb[_0x0a9e('0x7f')](_0x5df0ad,'[callProgressDetectingCustomer][logNoAnswerGlobal]');}else{if(_0x211ef9[_0x0a9e('0xac')]>=_0xe22ccc[_0x0a9e('0xb0')]){rpcDb[_0x0a9e('0x7f')](_0x211ef9,_0x0a9e('0xb1'));}else{rpcDb['rescheduleContact'](ut['scheduledAt'](_0x211ef9,_0x0a9e('0xac'),_0xe22ccc[_0x0a9e('0xad')]),_0x211ef9[_0x0a9e('0xaa')],_0x211ef9['activeContact']);}}}else{_0x211ef9[_0x0a9e('0xac')]++;_0x5ce9ac[_0x0a9e('0x86')]({'id':_0x211ef9['idContact'],'field':{'countnoanswerretry':_0x211ef9['countnoanswerretry']}})[_0x0a9e('0x56')](function(){_0x5ce9ac['swapAdditionalPhones'](_0x211ef9,_0x47de4c,_0x2f7092)['then'](function(){});});}});break;case'CONGESTION':_0xe22ccc[_0x0a9e('0xb2')]+=0x1;_0x211ef9[_0x0a9e('0xb3')]+=0x1;_0x211ef9[_0x0a9e('0x75')]=ut[_0x0a9e('0x76')](_0x211ef9);ut[_0x0a9e('0x64')](_0x211ef9,0x8,_0x0a9e('0xb4'));_0x47de4c=_0xe22ccc['dialCongestionRetryFrequency'];_0x2f7092=_0xe22ccc[_0x0a9e('0xa3')];ami['emit'](_0x0a9e('0xb5'),ut[_0x0a9e('0x78')](_0x211ef9,_0x0a9e('0xb6')));rpcDb[_0x0a9e('0x69')](_0x211ef9,'[callProgressDetectingCustomer][logCongestion]');_0x5ce9ac[_0x0a9e('0x7b')](_0x211ef9,'8',_0xe22ccc)[_0x0a9e('0x56')](function(_0x1d4877){_0x2da03c=_0x1d4877['additional']==0x1;if(!_0x2da03c){if(ut[_0x0a9e('0x76')](_0x211ef9)>=_0xe22ccc[_0x0a9e('0xa6')]){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0xf,_0x0a9e('0xa7'));rpcDb[_0x0a9e('0x7f')](_0x5df0ad,_0x0a9e('0xb7'));}else{if(_0x211ef9[_0x0a9e('0xb3')]>=_0xe22ccc[_0x0a9e('0xb8')]){rpcDb['createCustomerFinal'](_0x211ef9,_0x0a9e('0xb9'));}else{rpcDb[_0x0a9e('0x81')](ut['scheduledAt'](_0x211ef9,_0x0a9e('0xb3'),_0xe22ccc[_0x0a9e('0xa2')]),_0x211ef9[_0x0a9e('0xaa')],_0x211ef9['activeContact']);}}}else{_0x211ef9[_0x0a9e('0xb3')]++;_0x5ce9ac['incrementPreviewCounters']({'id':_0x211ef9[_0x0a9e('0x85')],'field':{'countcongestionretry':_0x211ef9[_0x0a9e('0xb3')]}})[_0x0a9e('0x56')](function(){_0x5ce9ac[_0x0a9e('0xba')](_0x211ef9,_0x47de4c,_0x2f7092)[_0x0a9e('0x56')](function(){});});}});break;case _0x0a9e('0xbb'):_0xe22ccc[_0x0a9e('0xbc')]+=0x1;_0x211ef9[_0x0a9e('0xbd')]+=0x1;_0x211ef9['countglobal']=ut[_0x0a9e('0x76')](_0x211ef9);ut[_0x0a9e('0x64')](_0x211ef9,0x14,_0x0a9e('0xbe'));_0x47de4c=_0xe22ccc[_0x0a9e('0xbf')];_0x2f7092=_0xe22ccc[_0x0a9e('0xa3')];ami[_0x0a9e('0x25')](_0x0a9e('0xc0'),ut[_0x0a9e('0x78')](_0x211ef9,_0x0a9e('0xc1')));rpcDb[_0x0a9e('0x69')](_0x211ef9,_0x0a9e('0xc2'));_0x5ce9ac[_0x0a9e('0x7b')](_0x211ef9,'20',_0xe22ccc)[_0x0a9e('0x56')](function(_0x4989f9){_0x2da03c=_0x4989f9[_0x0a9e('0x7c')]==0x1;if(!_0x2da03c){if(ut[_0x0a9e('0x76')](_0x211ef9)>=_0xe22ccc[_0x0a9e('0xa6')]){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0x14,_0x0a9e('0xbe'));rpcDb['createCustomerFinal'](_0x5df0ad,_0x0a9e('0xc3'));}else{if(_0x211ef9[_0x0a9e('0xbd')]>=_0xe22ccc['dialAgentRejectMaxRetry']){rpcDb[_0x0a9e('0x7f')](_0x211ef9,'[callProgressDetectingCustomer][logAgentReject]');}else{rpcDb[_0x0a9e('0x81')](ut[_0x0a9e('0x82')](_0x211ef9,_0x0a9e('0xbd'),_0xe22ccc[_0x0a9e('0xbf')]),_0x211ef9['unlockAgent'],_0x211ef9[_0x0a9e('0x83')]);}}}else{_0x211ef9['countnoanswerretry']++;_0x5ce9ac[_0x0a9e('0x86')]({'id':_0x211ef9[_0x0a9e('0x85')],'field':{'countnoanswerretry':_0x211ef9['countnoanswerretry']}})[_0x0a9e('0x56')](function(){_0x5ce9ac[_0x0a9e('0xba')](_0x211ef9,_0x47de4c,_0x2f7092)[_0x0a9e('0x56')](function(){});});}});break;case'ABANDONED':_0xe22ccc['outboundAbandonedCallsDay']+=0x1;_0x211ef9[_0x0a9e('0xc4')]+=0x1;_0x211ef9[_0x0a9e('0x75')]=ut[_0x0a9e('0x76')](_0x211ef9);ut[_0x0a9e('0x64')](_0x211ef9,0xb,_0x0a9e('0xc5'));rpcDb[_0x0a9e('0x69')](_0x211ef9,_0x0a9e('0xc6'));_0x5ce9ac[_0x0a9e('0x7b')](_0x211ef9,'11',_0xe22ccc)[_0x0a9e('0x56')](function(_0x586510){_0x2da03c=_0x586510[_0x0a9e('0x7c')]==0x1;if(!_0x2da03c){if(ut['totalGlobal'](_0x211ef9)>=_0xe22ccc[_0x0a9e('0xa6')]){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0xf,_0x0a9e('0xa7'));rpcDb[_0x0a9e('0x7f')](_0x5df0ad,_0x0a9e('0xc6'));}else{if(_0x211ef9['countabandonedetry']>=_0xe22ccc[_0x0a9e('0xc7')]){rpcDb[_0x0a9e('0x7f')](_0x211ef9,_0x0a9e('0xc6'));}else{rpcDb[_0x0a9e('0x81')](ut[_0x0a9e('0x82')](_0x211ef9,'countabandonedretry',_0xe22ccc['dialAbandonedRetryFrequency']),_0x211ef9[_0x0a9e('0xaa')],_0x211ef9['activeContact']);}}}else{_0x211ef9[_0x0a9e('0xac')]++;_0x5ce9ac[_0x0a9e('0x86')]({'id':_0x211ef9[_0x0a9e('0x85')],'field':{'countnoanswerretry':_0x211ef9[_0x0a9e('0xac')]}})[_0x0a9e('0x56')](function(){_0x5ce9ac[_0x0a9e('0xba')](_0x211ef9,_0x47de4c,_0x2f7092)['then'](function(){});});}});break;case'18':_0xe22ccc['outboundUnknownCallsDay']+=0x1;_0x211ef9[_0x0a9e('0xc8')]+=0x1;_0x211ef9['countglobal']=ut[_0x0a9e('0x76')](_0x211ef9);ut['logCustomer'](_0x211ef9,0x12,_0x3aedd0[_0x0a9e('0xc9')]||_0x3aedd0['dialstatus']);ami['emit'](_0x0a9e('0xca'),ut[_0x0a9e('0x78')](_0x211ef9,'amd'));rpcDb[_0x0a9e('0x69')](_0x211ef9,_0x0a9e('0xcb'));_0x5ce9ac[_0x0a9e('0x7b')](_0x211ef9,'18',_0xe22ccc)[_0x0a9e('0x56')](function(_0x2eb028){_0x2da03c=_0x2eb028['additional']==0x1;if(!_0x2da03c){if(ut['totalGlobal'](_0x211ef9)>=_0xe22ccc[_0x0a9e('0xa6')]){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0x12,_0x0a9e('0xa7'));rpcDb[_0x0a9e('0x7f')](_0x5df0ad,_0x0a9e('0xcb'));}else{rpcDb['createCustomerFinal'](_0x211ef9,_0x0a9e('0xcb'));}}else{_0x211ef9[_0x0a9e('0xac')]++;_0x5ce9ac['incrementPreviewCounters']({'id':_0x211ef9[_0x0a9e('0x85')],'field':{'countnoanswerretry':_0x211ef9[_0x0a9e('0xac')]}})[_0x0a9e('0x56')](function(){_0x5ce9ac[_0x0a9e('0xba')](_0x211ef9,_0x47de4c,_0x2f7092)[_0x0a9e('0x56')](function(){});});}});delete this[_0x0a9e('0x13')][_0x3aedd0[_0x0a9e('0x84')]];break;case'19':_0xe22ccc[_0x0a9e('0xcc')]+=0x1;_0x211ef9[_0x0a9e('0x75')]=ut[_0x0a9e('0x76')](_0x211ef9);ut['logCustomer'](_0x211ef9,0x13,_0x3aedd0[_0x0a9e('0xc9')]||_0x3aedd0[_0x0a9e('0xcd')]);ami[_0x0a9e('0x25')](_0x0a9e('0xca'),ut[_0x0a9e('0x78')](_0x211ef9,'amd'));rpcDb['createCustomerHistory'](_0x211ef9,_0x0a9e('0xce'));_0x5ce9ac[_0x0a9e('0x7b')](_0x211ef9,'18',_0xe22ccc)[_0x0a9e('0x56')](function(_0x2fea95){_0x2da03c=_0x2fea95[_0x0a9e('0x7c')]==0x1;if(!_0x2da03c){if(ut['totalGlobal'](_0x211ef9)>=_0xe22ccc[_0x0a9e('0xa6')]){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0xf,_0x0a9e('0xa7'));rpcDb['createCustomerFinal'](_0x5df0ad,_0x0a9e('0xce'));}else{rpcDb['createCustomerFinal'](_0x211ef9,_0x0a9e('0xce'));}}else{_0x211ef9['countnoanswerretry']++;_0x5ce9ac[_0x0a9e('0x86')]({'id':_0x211ef9[_0x0a9e('0x85')],'field':{'countnoanswerretry':_0x211ef9[_0x0a9e('0xac')]}})['then'](function(){_0x5ce9ac[_0x0a9e('0xba')](_0x211ef9,_0x47de4c,_0x2f7092)['then'](function(){});});}});delete this[_0x0a9e('0x13')][_0x3aedd0[_0x0a9e('0x84')]];break;default:if(_0x211ef9[_0x0a9e('0x4d')]){ut[_0x0a9e('0x4e')](_0xe22ccc,_0x0a9e('0xcf'));ut[_0x0a9e('0x50')](_0x0a9e('0xd0')+_0xe22ccc[_0x0a9e('0x29')],_0x3aedd0);}_0xe22ccc[_0x0a9e('0xcc')]+=0x1;_0x211ef9[_0x0a9e('0x75')]=ut[_0x0a9e('0x76')](_0x211ef9);ut[_0x0a9e('0x64')](_0x211ef9,0xc,_0x3aedd0[_0x0a9e('0xc9')]||_0x3aedd0[_0x0a9e('0xcd')]);_0x47de4c=_0xe22ccc[_0x0a9e('0xbf')];_0x2f7092=_0xe22ccc[_0x0a9e('0xa3')];rpcDb['createCustomerHistory'](_0x211ef9,'[callProgressDetectingCustomer][logUnknown]');_0x5ce9ac[_0x0a9e('0x7b')](_0x211ef9,'20',_0xe22ccc)['then'](function(_0x1d999b){_0x2da03c=_0x1d999b[_0x0a9e('0x7c')]==0x1;if(!_0x2da03c){if(ut['totalGlobal'](_0x211ef9)>=_0xe22ccc[_0x0a9e('0xa6')]){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0xf,_0x0a9e('0xa7'));rpcDb[_0x0a9e('0x7f')](_0x5df0ad,'[callProgressDetectingCustomer][logUnknownGlobal]');}else{rpcDb[_0x0a9e('0x7f')](_0x211ef9,_0x0a9e('0xd1'));}delete this[_0x0a9e('0x13')][_0x3aedd0[_0x0a9e('0x84')]];}else{_0x5ce9ac['swapAdditionalPhones'](_0x211ef9,_0x47de4c,_0x2f7092)[_0x0a9e('0x56')](function(){});}});}if(!(_0x211ef9[_0x0a9e('0x4d')]&&_0x145931==='16')){ut[_0x0a9e('0xd2')](_0xe22ccc,'[callProgressDetectingCustomer]');logger[_0x0a9e('0x26')](_0x0a9e('0xd3'),_0x211ef9[_0x0a9e('0x91')],'\x20Queue',_0xe22ccc[_0x0a9e('0x29')],_0x0a9e('0x44'),_0xe22ccc[_0x0a9e('0x2d')]);}if(_0x145931!==_0x0a9e('0x87')){delete this[_0x0a9e('0x13')][_0x3aedd0['linkedid']];delete this[_0x0a9e('0x13')][_0x3aedd0[_0x0a9e('0xd4')]];}_0xe22ccc['queueSummaryCountersUpdated']=!![];}};Preview[_0x0a9e('0xd')][_0x0a9e('0xd5')]=function(_0x1f6f1c,_0x5822a7,_0x5c3b6f){if(_['isUndefined'](_0x5822a7)&&_0x0a9e('0xd6')!==typeof _0x5822a7){return;}if(_[_0x0a9e('0xd7')](_0x5c3b6f)&&'object'!==typeof _0x5c3b6f){return;}switch(_0x5c3b6f[_0x0a9e('0xd8')]){case'0':ut[_0x0a9e('0xd9')](_0x1f6f1c,0x0,_0x0a9e('0x77'));rpcDb['createAgentHistory'](_0x1f6f1c,_0x0a9e('0xda'));break;case'3':ut[_0x0a9e('0xd9')](_0x1f6f1c,0x3,_0x0a9e('0xdb'));rpcDb[_0x0a9e('0xdc')](_0x1f6f1c,_0x0a9e('0xdd'));break;case'5':ut[_0x0a9e('0xd9')](_0x1f6f1c,0x5,_0x0a9e('0xa1'));rpcDb[_0x0a9e('0xdc')](_0x1f6f1c,_0x0a9e('0xde'));break;case'8':ut['logAgent'](_0x1f6f1c,0x8,_0x0a9e('0xb4'));rpcDb['createAgentHistory'](_0x1f6f1c,_0x0a9e('0xdf'));break;case'22':ut[_0x0a9e('0xd9')](_0x1f6f1c,0x16,_0x0a9e('0xe0'));rpcDb[_0x0a9e('0xdc')](_0x1f6f1c,_0x0a9e('0xe1'));break;default:ut[_0x0a9e('0xd9')](_0x1f6f1c,0xc,_0x5c3b6f['reason']);rpcDb[_0x0a9e('0xdc')](_0x1f6f1c,_0x0a9e('0xdf'));}ut[_0x0a9e('0xd2')](_0x5822a7,_0x0a9e('0xe2'));logger['info'](_0x0a9e('0xe3'),_0x1f6f1c[_0x0a9e('0x91')],_0x0a9e('0x9e'),_0x5822a7[_0x0a9e('0x29')],_0x0a9e('0x44'),_0x5822a7[_0x0a9e('0x2d')]);delete this[_0x0a9e('0x13')][_0x1f6f1c[_0x0a9e('0x91')]];};Preview[_0x0a9e('0xd')][_0x0a9e('0x7b')]=function(_0x57f0ad,_0x2272bc,_0x88b25f){return cmHopperAdditionalPhone[_0x0a9e('0x7b')](_0x57f0ad,_0x2272bc,_0x88b25f)[_0x0a9e('0x5e')](logger[_0x0a9e('0x26')](_0x0a9e('0xe4')));};Preview[_0x0a9e('0xd')][_0x0a9e('0xba')]=function(_0x566b90,_0x3b581c,_0xd2391){return cmHopperAdditionalPhone[_0x0a9e('0xba')](_0x566b90,_0x3b581c,_0xd2391)['catch'](logger[_0x0a9e('0x26')](_0x0a9e('0xe5')));};Preview[_0x0a9e('0xd')][_0x0a9e('0x86')]=function(_0x370b5e){return Promise[_0x0a9e('0xe6')]()[_0x0a9e('0x56')](cmHopperAdditionalPhone[_0x0a9e('0x86')](_0x370b5e))[_0x0a9e('0x5e')](logger[_0x0a9e('0x26')]('[incrementPreviewCounters]\x20'));};Preview[_0x0a9e('0xd')][_0x0a9e('0xe7')]=function(_0x15a9ed,_0x3db98f,_0x2b624e,_0x3942fd,_0x5cb48d){var _0x382687=this;return new Promise(function(_0x4f854b,_0x5bd139){if(_['isNil'](_0x3db98f)||_[_0x0a9e('0x41')](_0x3db98f[_0x0a9e('0xe8')])||_[_0x0a9e('0x41')](_0x3db98f[_0x0a9e('0xe9')])||_['isNil'](_0x3db98f[_0x0a9e('0x48')])){_0x5bd139(ut[_0x0a9e('0x4b')](_0x0a9e('0xea'),_0x3942fd,_0x5cb48d));return;}var _0x1fdb10=uuid['v4']();var _0x2c8d1d=_0x382687['campaignsPreview'][_0x3db98f['Queue'][_0x0a9e('0x29')]];var _0x33bcb2=_0x2b624e?_0x382687[_0x0a9e('0x14')][_0x2b624e]['id']:undefined;_0x382687['actions'][_0x1fdb10]=new Action(_0x3db98f,_0x2c8d1d,_0x1fdb10,_0x2b624e,_0x33bcb2);var _0x319752=_0x382687[_0x0a9e('0x13')][_0x1fdb10];_0x319752[_0x0a9e('0xaa')]=_0x3942fd;_0x319752['activeContact']=_0x5cb48d;_0x319752[_0x0a9e('0xeb')]=_0x2b624e;if(_[_0x0a9e('0xec')](_0x15a9ed)){_0x382687[_0x0a9e('0xed')](_0x319752,_0x2c8d1d,_0x3db98f,_0x2b624e)['then'](function(_0x272291){logger[_0x0a9e('0x26')](_0x0a9e('0xee'),'Queue:\x20'+_0x319752['queue']+'\x20IdHopper:\x20'+_0x319752[_0x0a9e('0x85')],JSON[_0x0a9e('0x45')](_0x272291));ami[_0x0a9e('0x25')](_0x0a9e('0xef'),ut['buildObj'](_0x319752,_0x0a9e('0xf0'),_0x382687['campaignsPreview'][_0x319752[_0x0a9e('0x43')]]));_0x4f854b(ut[_0x0a9e('0x4b')](_0x0a9e('0xf1')));})['catch'](function(_0x33b4b3){ut[_0x0a9e('0x32')](_0x0a9e('0xf2'),_0x33b4b3);_0x5bd139(ut['message'](_0x0a9e('0xf3'),_0x3942fd,_0x5cb48d));});}else{_0x2c8d1d['outboundBlacklistCallsDay']+=0x1;ut[_0x0a9e('0xf4')](_0x319752);rpcDb['createHistory'](_0x319752,_0x0a9e('0xf5'));delete _0x382687['actions'][_0x1fdb10];_0x5bd139(ut[_0x0a9e('0x4b')](_0x0a9e('0xf6'),_0x3942fd,_0x5cb48d));}});};Preview[_0x0a9e('0xd')][_0x0a9e('0x70')]=function(_0x1e306c){return!_[_0x0a9e('0x41')](_0x1e306c)&&!_[_0x0a9e('0x41')](_0x1e306c['name'])&&!_[_0x0a9e('0x41')](_0x1e306c[_0x0a9e('0xf7')])&&_0x1e306c['active']&&!_[_0x0a9e('0x41')](this[_0x0a9e('0x12')][util['format'](_0x0a9e('0xf8'),_0x1e306c[_0x0a9e('0x29')])])&&!_[_0x0a9e('0x41')](this['trunks'][util[_0x0a9e('0x27')](_0x0a9e('0xf8'),_0x1e306c[_0x0a9e('0x29')])][_0x0a9e('0xf9')])&&(this[_0x0a9e('0x12')][util[_0x0a9e('0x27')](_0x0a9e('0xf8'),_0x1e306c[_0x0a9e('0x29')])][_0x0a9e('0xf9')]===_0x0a9e('0xfa')||this['trunks'][util[_0x0a9e('0x27')]('SIP/%s',_0x1e306c[_0x0a9e('0x29')])][_0x0a9e('0xf9')]===_0x0a9e('0xfb'));};Preview[_0x0a9e('0xd')][_0x0a9e('0x5c')]=function(_0x2d45db,_0x5691ac){return this[_0x0a9e('0xfc')](_0x2d45db,_0x5691ac)[_0x0a9e('0x56')](function(_0x2977a7){return _['pick'](_0x2977a7,[_0x0a9e('0x4b')]);})[_0x0a9e('0x5e')](function(_0x4435d2){if(_0x4435d2[_0x0a9e('0xfd')]){rpcDb[_0x0a9e('0xfe')](_0x2d45db);}if(_0x4435d2[_0x0a9e('0xf7')]){rpcDb[_0x0a9e('0x60')](_0x2d45db);}throw _['pick'](_0x4435d2,[_0x0a9e('0x4b')]);});};Preview[_0x0a9e('0xd')][_0x0a9e('0xfc')]=function(_0x2ce3be,_0x3de77e){var _0x241404=this;var _0x8120e,_0x5d6a48;return rpcDb['getContactPreview'](_0x2ce3be)[_0x0a9e('0x56')](function(_0x3f507c){if(!_[_0x0a9e('0x41')](_0x3f507c[0x0])){_0x5d6a48=_0x3f507c[0x0][_0x0a9e('0xff')]?![]:!![];_0x8120e=_0x3f507c[0x0][_0x0a9e('0xff')]?!![]:![];_0x8120e=_0x3de77e?!![]:_0x8120e;}var _0x131da8=_0x241404[_0x0a9e('0x100')](_0x3f507c);if(_0x131da8['isValid']){rpcDb[_0x0a9e('0x101')](_[_0x0a9e('0x46')](_0x3f507c[0x0],[_0x0a9e('0x48'),_0x0a9e('0xe9')]))[_0x0a9e('0x56')](function(_0x3c6082){_0x241404[_0x0a9e('0xe7')](_0x3c6082,_0x3f507c[0x0],_0x3de77e,_0x5d6a48,_0x8120e)['then'](function(_0x311288){return _0x311288;})[_0x0a9e('0x5e')](function(_0x231826){throw _0x231826;});})['catch'](function(_0x2b8ad4){ut[_0x0a9e('0x32')](_0x0a9e('0x102'),_0x2b8ad4);throw ut[_0x0a9e('0x4b')]('Call\x20unsuccessful',_0x5d6a48,_0x8120e);});}else{throw ut[_0x0a9e('0x4b')](_0x131da8[_0x0a9e('0x4b')],_0x5d6a48,_0x8120e);}})[_0x0a9e('0x5e')](function(_0x93d953){ut[_0x0a9e('0x32')](_0x0a9e('0x103'),_0x93d953);throw ut[_0x0a9e('0x4b')](_0x0a9e('0x104'),![],!![]);});};Preview['prototype'][_0x0a9e('0x100')]=function(_0x266aa1){if(_[_0x0a9e('0x41')](_0x266aa1)||_[_0x0a9e('0xec')](_0x266aa1)||!_['isNil'](_0x266aa1[0x0]['Agent'])&&_[_0x0a9e('0x41')](_0x266aa1[0x0][_0x0a9e('0x5a')][_0x0a9e('0x29')])){ut['logger'](_0x0a9e('0x105'),_0x266aa1);return{'isValid':![],'message':_0x0a9e('0x106')};}var _0x4d8a67=this[_0x0a9e('0x10')][_0x266aa1[0x0]['Queue'][_0x0a9e('0x29')]];_0x4d8a67['message']=utils['CAMPAIGN_STATUS']['ACTIVE'];if(_[_0x0a9e('0x41')](_0x4d8a67)){ut[_0x0a9e('0x32')](_0x0a9e('0x107'),_0x4d8a67);return{'isValid':![],'message':_0x0a9e('0x108')};}if(!this[_0x0a9e('0x70')](_0x4d8a67[_0x0a9e('0x109')])){ut['logger'](_0x0a9e('0x10a'),_0x0a9e('0x10b')+_0x4d8a67[_0x0a9e('0x29')]+_0x0a9e('0x10c'));if(!this[_0x0a9e('0x70')](_0x4d8a67[_0x0a9e('0x10d')])){ut[_0x0a9e('0x32')]('[Preview][validateContact][Trunk\x20not\x20working\x20correctly]',_0x4d8a67['name']+_0x0a9e('0x10e'));return{'isValid':![],'message':'Trunk\x20not\x20working\x20correctly'};}}if(!ut[_0x0a9e('0x6f')](_0x4d8a67[_0x0a9e('0x3c')])){ut[_0x0a9e('0x32')](_0x0a9e('0x10f'),_0x4d8a67[_0x0a9e('0x29')]+_0x0a9e('0x110'));return{'isValid':![],'message':'campaign\x20Name:\x20'+_0x4d8a67[_0x0a9e('0x29')]+'\x20Not\x20Active'};}return{'isValid':!![],'message':'Is\x20Valid'};};Preview[_0x0a9e('0xd')]['execCall']=function(_0x38dceb,_0x5dc978,_0x550cbf,_0x26223f){var _0x4a7a3c=this;return new Promise(function(_0x24470a,_0x142e53){var _0xe1ab0d=_0x38dceb['uniqueid'];var _0x4152cd=_0x4a7a3c[_0x0a9e('0x70')](_0x5dc978[_0x0a9e('0x109')])?util['format']('SIP/%s/%s%s',_0x5dc978[_0x0a9e('0x109')][_0x0a9e('0x29')],_[_0x0a9e('0x41')](_0x5dc978[_0x0a9e('0x111')])?'':_0x5dc978[_0x0a9e('0x111')][_0x0a9e('0x112')]()||'',_0x5dc978[_0x0a9e('0x113')]>0x0?_0x550cbf[_0x0a9e('0xe9')][_0x0a9e('0x114')](_0x5dc978[_0x0a9e('0x113')]):_0x550cbf['phone']):util['format']('SIP/%s/%s%s',_[_0x0a9e('0x41')](_0x5dc978[_0x0a9e('0x10d')])?_0x5dc978[_0x0a9e('0x109')][_0x0a9e('0x29')]:_0x5dc978[_0x0a9e('0x10d')][_0x0a9e('0x29')],_[_0x0a9e('0x41')](_0x5dc978[_0x0a9e('0x111')])?'':_0x5dc978['dialPrefix']['trim']()||'',_0x5dc978[_0x0a9e('0x113')]>0x0?_0x550cbf[_0x0a9e('0xe9')]['substring'](_0x5dc978[_0x0a9e('0x113')]):_0x550cbf[_0x0a9e('0xe9')]);var _0x2e2280=_0x4a7a3c[_0x0a9e('0x70')](_0x5dc978[_0x0a9e('0x109')])?ut[_0x0a9e('0x115')](_0x5dc978[_0x0a9e('0x109')][_0x0a9e('0x116')],_0x5dc978[_0x0a9e('0x117')],_0x5dc978[_0x0a9e('0x118')]>0x0?ut[_0x0a9e('0x119')](_0x5dc978[_0x0a9e('0x11a')],_0x5dc978['dialRandomLastDigitCallerIdNumber']):_0x5dc978[_0x0a9e('0x11a')]):ut[_0x0a9e('0x115')](_[_0x0a9e('0x41')](_0x5dc978[_0x0a9e('0x10d')])?_0x5dc978[_0x0a9e('0x109')][_0x0a9e('0x116')]:_0x5dc978[_0x0a9e('0x10d')][_0x0a9e('0x116')],_0x5dc978[_0x0a9e('0x117')],_0x5dc978[_0x0a9e('0x118')]>0x0?ut[_0x0a9e('0x119')](_0x5dc978[_0x0a9e('0x11a')],_0x5dc978['dialRandomLastDigitCallerIdNumber']):_0x5dc978['dialOriginateCallerIdNumber']);if(_0x2e2280){_0x38dceb[_0x0a9e('0x11b')]=ut[_0x0a9e('0x11c')](_0x2e2280);_0x38dceb[_0x0a9e('0x11d')]=ut[_0x0a9e('0x11e')](_0x2e2280);}var _0x33359a=ut[_0x0a9e('0x11f')](_0x5dc978,_0x550cbf,_0x4152cd,_0x2e2280,_0xe1ab0d,_0x38dceb);var _0xa8b5de=utils['setXMDContactVariables'](_0x550cbf[_0x0a9e('0xe8')]);Object['assign'](_0x33359a,_0xa8b5de);_[_0x0a9e('0x120')](_0x38dceb,ut[_0x0a9e('0x121')](_0x33359a));_0x38dceb[_0x0a9e('0x61')]=moment()[_0x0a9e('0x27')](_0x0a9e('0x62'));_0x5dc978[_0x0a9e('0x122')]=_0x33359a;var _0x465003=ut[_0x0a9e('0x123')](_0x38dceb,_0x5dc978,_0x33359a,_0x38dceb[_0x0a9e('0x83')],_0x26223f);return ami[_0x0a9e('0x124')](_0x465003)[_0x0a9e('0x56')](function(_0x8231e5){_0x5dc978[_0x0a9e('0x2d')]+=0x1;logger[_0x0a9e('0x26')](_0x0a9e('0x125'),_0xe1ab0d,_0x0a9e('0x9e'),_0x5dc978['name'],'originated:\x20',_0x5dc978[_0x0a9e('0x2d')]);_0x24470a(_0x8231e5);})[_0x0a9e('0x5e')](function(_0x52b365){ut['logAgent'](_0x38dceb,0xe,_0x0a9e('0x126'));rpcDb[_0x0a9e('0xdc')](_0x38dceb,_0x0a9e('0x127'));_0x142e53(_0x52b365);});});};Preview['prototype'][_0x0a9e('0x1d')]=function(_0x5b6447){if(this[_0x0a9e('0x13')][_0x5b6447['linkedid']]){this[_0x0a9e('0x13')][_0x5b6447['linkedid']][_0x0a9e('0x4a')]=_0x5b6447[_0x0a9e('0x4a')];}};Preview[_0x0a9e('0xd')]['syncOriginateResponse']=function(_0x316b51){var _0x497fda=this;var _0x505ffd=this[_0x0a9e('0x13')][_0x316b51[_0x0a9e('0x128')]];if(_0x505ffd){if(_0x505ffd[_0x0a9e('0xeb')]&&this[_0x0a9e('0x14')][_0x505ffd[_0x0a9e('0xeb')]]){ut[_0x0a9e('0x129')](_0x505ffd,this[_0x0a9e('0x14')][_0x505ffd[_0x0a9e('0xeb')]][_0x0a9e('0x29')],this[_0x0a9e('0x14')][_0x505ffd[_0x0a9e('0xeb')]]['id']);}var _0x98bf26=_[_0x0a9e('0x12a')](_0x505ffd);_0x98bf26[_0x0a9e('0x12b')]=moment()[_0x0a9e('0x27')](_0x0a9e('0x62'));var _0x310026=_0x497fda[_0x0a9e('0x10')][_0x505ffd[_0x0a9e('0x43')]];if(ut['isFailure'](_0x316b51[_0x0a9e('0x12c')])){if(_0x505ffd[_0x0a9e('0xaa')]){rpcDb[_0x0a9e('0xfe')](_0x505ffd[_0x0a9e('0x85')]);}if(_0x505ffd['activeContact']){rpcDb['disableContact'](_0x505ffd['idContact']);}ami[_0x0a9e('0x25')]('custom:agentringnoanswer',ut[_0x0a9e('0x78')](_0x505ffd,_0x0a9e('0x12d'),this[_0x0a9e('0x10')][_0x505ffd[_0x0a9e('0x43')]]));this[_0x0a9e('0xd5')](_0x98bf26,_0x310026,_0x316b51);}else{_0x505ffd[_0x0a9e('0x61')]=moment()[_0x0a9e('0x27')](_0x0a9e('0x62'));ut[_0x0a9e('0xd9')](_0x98bf26,0x4,_0x0a9e('0x12e'));rpcDb['createAgentHistory'](_0x98bf26,_0x0a9e('0x12f'));}}};Preview['prototype'][_0x0a9e('0x1a')]=function(_0x586d2f){var _0xf4de86=this[_0x0a9e('0x13')][_0x586d2f[_0x0a9e('0x84')]];var _0x556bb7;if(_0xf4de86){_0x556bb7=this[_0x0a9e('0x10')][_0xf4de86[_0x0a9e('0x43')]];logger['info']('[syncHangup][talking]',_0x586d2f[_0x0a9e('0x84')],_0x0a9e('0x9e'),_0x556bb7[_0x0a9e('0x29')],'pTalking:\x20',_0x556bb7['pTalking']);}if(this['actions'][_0x586d2f[_0x0a9e('0x84')]]&&_0x586d2f[_0x0a9e('0x84')]!==_0x586d2f[_0x0a9e('0x91')]){if(_0x586d2f[_0x0a9e('0x130')]==='16'&&this[_0x0a9e('0x13')][_0x586d2f[_0x0a9e('0x84')]][_0x0a9e('0x4d')]){this[_0x0a9e('0x72')](_0x586d2f,_0x586d2f[_0x0a9e('0x84')],_0x586d2f[_0x0a9e('0x130')]);}else if(this[_0x0a9e('0x13')][_0x586d2f[_0x0a9e('0x84')]][_0x0a9e('0x4d')]){logger[_0x0a9e('0x26')](_0x0a9e('0x131'),_0x586d2f[_0x0a9e('0x84')],_0x586d2f[_0x0a9e('0x130')],_0x0a9e('0x9e'),_0x556bb7['name'],_0x0a9e('0x8a'),_0x556bb7[_0x0a9e('0x2e')]);this[_0x0a9e('0x72')](_0x586d2f,_0x586d2f[_0x0a9e('0x84')],_0x586d2f[_0x0a9e('0x130')]);}}else if(_0xf4de86&&_[_0x0a9e('0x41')](_0xf4de86['statedesc'])&&_0x556bb7[_0x0a9e('0x132')]&&_0x586d2f[_0x0a9e('0x84')]===_0x586d2f[_0x0a9e('0x91')]&&_[_0x0a9e('0x41')](_0x586d2f[_0x0a9e('0xd8')])&&_0x586d2f[_0x0a9e('0x130')]==='16'&&_0x586d2f[_0x0a9e('0x133')]==='6'&&_[_0x0a9e('0xd7')](_0xf4de86[_0x0a9e('0x134')])){if(_0xf4de86['unlockAgent']){rpcDb['unlockContact'](_0xf4de86[_0x0a9e('0x85')]);}if(_0xf4de86[_0x0a9e('0x83')]){rpcDb['disableContact'](_0xf4de86[_0x0a9e('0x85')]);}_0x586d2f[_0x0a9e('0xd8')]='22';this['callProgressDetectingAgent'](_0xf4de86,_0x556bb7,_0x586d2f);}else if(_0xf4de86&&_0xf4de86[_0x0a9e('0x134')]){if(_0x586d2f['cause']==='16'&&this[_0x0a9e('0x13')][_0x586d2f[_0x0a9e('0x84')]]['dialAnswer']){logger[_0x0a9e('0x26')](_0x0a9e('0x135'),_0x586d2f['linkedid'],_0x586d2f[_0x0a9e('0x130')],_0x0a9e('0x9e'),_0x556bb7['name'],_0x0a9e('0x8a'),_0x556bb7[_0x0a9e('0x2e')]);this[_0x0a9e('0x72')](_0x586d2f,_0x586d2f[_0x0a9e('0x84')],_0x586d2f[_0x0a9e('0x130')]);}else if(this[_0x0a9e('0x13')][_0x586d2f['linkedid']][_0x0a9e('0x4d')]){logger[_0x0a9e('0x26')]('[syncHangup][talking][cause]',_0x586d2f[_0x0a9e('0x84')],_0x586d2f[_0x0a9e('0x130')],_0x0a9e('0x9e'),_0x556bb7[_0x0a9e('0x29')],_0x0a9e('0x8a'),_0x556bb7[_0x0a9e('0x2e')]);this[_0x0a9e('0x72')](_0x586d2f,_0x586d2f['linkedid'],_0x586d2f['cause']);}}};Preview['prototype']['syncDialEnd']=function(_0x5e9817){if(this[_0x0a9e('0x13')][_0x5e9817[_0x0a9e('0xd4')]]&&_0x5e9817['destlinkedid']!==_0x5e9817['destuniqueid']){this[_0x0a9e('0x72')](_0x5e9817,_0x5e9817['destlinkedid'],_0x5e9817[_0x0a9e('0xcd')]);}};Preview[_0x0a9e('0xd')][_0x0a9e('0x136')]=function(_0x175c97){if(this[_0x0a9e('0x13')][_0x175c97[_0x0a9e('0x84')]]&&_0x175c97['linkedid']!==_0x175c97[_0x0a9e('0x91')]&&!this[_0x0a9e('0x13')][_0x175c97['linkedid']][_0x0a9e('0x4d')]){if(_0x175c97[_0x0a9e('0x130')]==='1'){this[_0x0a9e('0x72')](_0x175c97,_0x175c97[_0x0a9e('0x84')],_0x175c97[_0x0a9e('0x130')]);}}};Preview[_0x0a9e('0xd')][_0x0a9e('0x137')]=function(_0x4a36df,_0x331216,_0x508395){if(this[_0x0a9e('0x13')][_0x4a36df]){if(_[_0x0a9e('0x41')](this['actions'][_0x4a36df][_0x0a9e('0x122')])){this[_0x0a9e('0x13')][_0x4a36df]['variables']={};}this[_0x0a9e('0x13')][_0x4a36df]['variables'][_0x331216]=_0x508395;}};Preview[_0x0a9e('0xd')][_0x0a9e('0x1f')]=function(_0x5d0620){try{if(!_[_0x0a9e('0x41')](_0x5d0620)){if(ut['filterKey'](_[_0x0a9e('0x138')](_0x5d0620[_0x0a9e('0x139')])[0x0])){this[_0x0a9e('0x137')](_0x5d0620[_0x0a9e('0x91')],_[_0x0a9e('0x138')](_0x5d0620[_0x0a9e('0x139')])[0x0],_0x5d0620[_0x0a9e('0x13a')]);}}}catch(_0x53b5c2){logger[_0x0a9e('0x13b')](_0x0a9e('0x13c'),util[_0x0a9e('0x13d')](_0x53b5c2,{'showHidden':![],'depth':null}));}};Preview[_0x0a9e('0xd')][_0x0a9e('0x21')]=function(_0x5932ad){if(_0x5932ad){if(this[_0x0a9e('0x13')][_0x5932ad['transfertargetlinkedid']]){this['actions'][_0x5932ad[_0x0a9e('0x13e')]]['transfer']=!![];}}};Preview[_0x0a9e('0xd')][_0x0a9e('0x23')]=function(_0x58d5fd){if(_0x58d5fd){if(this[_0x0a9e('0x13')][_0x58d5fd[_0x0a9e('0x13f')]]){this[_0x0a9e('0x13')][_0x58d5fd[_0x0a9e('0x13f')]][_0x0a9e('0x134')]=!![];}}};module[_0x0a9e('0x140')]=Preview;
\ No newline at end of file
+var _0xa9e0=['varset','syncVarSet','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','loopCampaigns','emit','info','format','voice:queue:%s','name','voice_queue_channel:remove','voice_queue_presence:remove','sendMessageOneNotActive','originated','pTalking','available','CAMPAIGN_STATUS','INACTIVE','logger','[CampaignPreview]\x20Campaign\x20Queue:\x20','\x20is\x20not\x20active','\x20is\x20deactivated','syncCampaigns','hasOwnProperty','dialMethod','booked','type','outbound','dialActive','setMessage','recallMe','clearZombieChannel','sequence','isNil','Queue','queue','originated:\x20','stringify','pick','UserId','VoiceQueueId','ListId','channel','message','No\x20such\x20channel','dialAnswer','decrementTalkink','[clearZombieChannel]','loggerError','[Dialer][checkChannel][pTalking][Preview]','[Dialer][checkChannel][Preview]','clearZombieChannels','size','getContactRecallMe','then','length','getDiff','scheduledat','Agent','voicePause','run','[RecallMe]','catch','logger2','disableContact','starttime','YYYY-MM-DD\x20HH:mm:ss','outboundReCallsDay','logCustomer','RecallInQueue','dialRecallInQueue','rescheduleContactInQueue','createBody','createCustomerHistory','[HistoryDialRecallInQueue][historyCatch]','RecallFailedTimeout','[getContactRecallMe]','IsNotLoggedIn','NO_AGENTS_LOGGED','isActive','isTrunkReachable','UNREACHABLE_TRUNK','callProgressDetectingCustomer','outboundNoSuchCallsDay','countnosuchnumberretry','countglobal','totalGlobal','NoSuchNumber','buildObj','nosuchnumber','[callProgressDetectingCustomer][logNoSuch]','verifyAdditionalPhones','additional','dialNoSuchNumberRetryFrequency','cloneAction','createCustomerFinal','[callProgressDetectingCustomer][logNoSuchGlobal]','rescheduleContact','scheduledAt','activeContact','linkedid','idContact','incrementPreviewCounters','ANSWER','answertime','[syncHangup][talking][increment]','pTalking:\x20','custom:agentconnect','connect','acw','mandatoryDisposition','custom:agentConnectPreview','channelAgent','uniqueid','custom:agentcomplete','complete','outboundAnswerCallsDay','answered','[16]','[callProgressDetectingCustomer][logAnswer]','[callProgressDetectingCustomer][logAnswerGlobal]','crateCustomerReportQueue','sumDuration','talktime','sumBillable','[syncHangup][talking][decrement]','\x20Queue','outboundBusyCallsDay','countbusyretry','Busy','dialBusyRetryFrequency','callAdditionalPhoneAfterMin','busy','[callProgressDetectingCustomer][logBusy]','dialGlobalMaxRetry','Global','[callProgressDetectingCustomer][logBusyGlobal]','dialBusyMaxRetry','unlockAgent','NOANSWER','countnoanswerretry','dialNoAnswerRetryFrequency','buildNoAnswerEventPayload','custom:agentnoanswer','dialNoAnswerMaxRetry','[callProgressDetectingCustomer][logNoAnswer]','outboundCongestionCallsDay','countcongestionretry','Congestion','custom:agentcongestion','congestion','[callProgressDetectingCustomer][logCongestionGlobal]','dialCongestionMaxRetry','[callProgressDetectingCustomer][logCongestion]','swapAdditionalPhones','CANCEL','outboundRejectCallsDay','countagentrejectretry','AgentReject','dialAgentRejectRetryFrequency','custom:agentreject','agentreject','[syncHangupRequest][logAgentReject]','[callProgressDetectingCustomer][logAgentReject]','countabandonedretry','Abandoned','[callProgressDetectingCustomer][logAbandoned]','dialAbandonedMaxRety','countmachineretry','cause-txt','custom:amd','[callProgressDetectingCustomer][hangupInAMD]','outboundUnknownCallsDay','dialstatus','[callProgressDetectingCustomer][machine]','[default]','[Dialer][decrementTalkink][no\x20Hangup][Preview]','[callProgressDetectingCustomer][logUnknownGlobal]','updateOriginated','[originated][decrement][callProgressDetectingCustomer]','destlinkedid','callProgressDetectingAgent','object','isUndefined','reason','logAgent','[callProgressDetectingAgent][logNoSuch]','NoAnswer','createAgentHistory','[callProgressDetectingAgent][logNoAnswer]','[callProgressDetectingAgent][logBusy]','[callProgressDetectingAgent][logCongestion]','AnswerAGI','[callProgressDetectingAgent][logAnswerAGI]','[callProgressDetectingAgent]','[originated][decrement][callProgressDetectingAgent]','[verifyAdditionalPhone]\x20','[swapAdditionalPhone]\x20','resolve','checkInBlack','Contact','phone','Contact\x20is\x20undefined','lookAgent','isEmpty','execCall','[Preview][execCall][success]','custom:agentcalled','called','Calling','[Preview][execCall][failure]','Call\x20failed','logBlacklist','[Blacklist][error]','Contact\x20in\x20black\x20List','active','SIP/%s','status','reachable','unmonitored','execRun','unlock','unlockContact','recallme','validateContact','checkIsBlackList','[Preview][checkIsBlackList]','[Preview][getContactPreview]','Call\x20unsuccessful','[Preview][validateContact][Empty\x20Contact]','Empty\x20Contact','[Preview][validateContact][Empty\x20Campaign]','Empty\x20Campaign','Trunk','[Preview][validateContact][Trunk\x20not\x20working\x20correctly]','campaign\x20Name:\x20','\x20Trunk\x20is\x20not\x20active','TrunkBackup','\x20Trunk\x20Backup\x20is\x20not\x20active','[Preview][validateContact][Campaign\x20Active]','\x20Not\x20Active','dialPrefix','trim','dialCutDigit','substring','getCallerId','callerid','dialOriginateCallerIdName','dialRandomLastDigitCallerIdNumber','getCallerIdRandom','dialOriginateCallerIdNumber','originatecalleridname','extractCalleridName','originatecalleridnum','extractCalleridNumber','addVariables','merge','toLowerVariables','variables','variablesAction','Action','[originated][increment]','OriginateError','[originateFailure][logOriginateFailure]','actionid','logLookAgent','clone','responsetime','response','rejected','Answer','[callProgressDetectingAgent][logAnswer]','cause','[syncHangup][talking][cause]','dialQueueProject','channelstate','transfer','[syncHangup][talking][transfer]','syncHangupRequest','addVariable','keys','variable','value','error','[syncVarSet][Preview]','inspect','transfertargetlinkedid','transfererlinkedid','exports','util','lodash','uuid','../../../config/environment','preview','../../../config/logger','actionPreview','../ami','./rpcDb','./action','./util/util','../dialer/utils','redis','prototype','enqueue','tail','campaignsPreview','voiceQueues','trunks','actions','agents','clockClearZombieChannels','originateresponse','syncOriginateResponse','bind','hangup','syncHangup','hanguprequest','syncDialEnd','syncNewExten'];(function(_0x34b7e1,_0x41f84d){var _0x56fba3=function(_0xf0cd21){while(--_0xf0cd21){_0x34b7e1['push'](_0x34b7e1['shift']());}};_0x56fba3(++_0x41f84d);}(_0xa9e0,0x123));var _0x0a9e=function(_0x45e98e,_0x169b60){_0x45e98e=_0x45e98e-0x0;var _0x374dba=_0xa9e0[_0x45e98e];return _0x374dba;};'use strict';var util=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var uuid=require(_0x0a9e('0x2'));var moment=require('moment');var Redis=require('ioredis');var config=require(_0x0a9e('0x3'));var logger=require('../../../config/logger')(_0x0a9e('0x4'));var loggerAction=require(_0x0a9e('0x5'))(_0x0a9e('0x6'));var ami=require(_0x0a9e('0x7'));var rpcDb=require(_0x0a9e('0x8'));var cmHopperAdditionalPhone=require('../rpc/cmHopperAdditionalPhone');var Action=require(_0x0a9e('0x9'));var ut=require(_0x0a9e('0xa'));var utils=require(_0x0a9e('0xb'));config['redis']=_['defaults'](config[_0x0a9e('0xc')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x0a9e('0xc')]));var Sequence=function(){};Sequence[_0x0a9e('0xd')][_0x0a9e('0xe')]=function(_0x3ab53f){this[_0x0a9e('0xf')]=this[_0x0a9e('0xf')]?this['tail']['finally'](_0x3ab53f):_0x3ab53f();};function Preview(_0x527cdd){this['sequence']=new Sequence();this[_0x0a9e('0x10')]=_0x527cdd[_0x0a9e('0x11')];this[_0x0a9e('0x12')]=_0x527cdd[_0x0a9e('0x12')];this[_0x0a9e('0x13')]={};this[_0x0a9e('0x14')]=_0x527cdd['agents'];this[_0x0a9e('0x15')]=0x0;ami['on'](_0x0a9e('0x16'),this[_0x0a9e('0x17')][_0x0a9e('0x18')](this));ami['on'](_0x0a9e('0x19'),this[_0x0a9e('0x1a')]['bind'](this));ami['on'](_0x0a9e('0x1b'),this['syncHangupRequest'][_0x0a9e('0x18')](this));ami['on']('dialend',this[_0x0a9e('0x1c')][_0x0a9e('0x18')](this));ami['on']('newexten',this[_0x0a9e('0x1d')]['bind'](this));ami['on'](_0x0a9e('0x1e'),this[_0x0a9e('0x1f')][_0x0a9e('0x18')](this));ami['on'](_0x0a9e('0x20'),this[_0x0a9e('0x21')][_0x0a9e('0x18')](this));ami['on'](_0x0a9e('0x22'),this[_0x0a9e('0x23')][_0x0a9e('0x18')](this));this[_0x0a9e('0x24')](this[_0x0a9e('0x10')]);}function emit(_0x105080,_0x4bb1e3,_0x2c3407){io['to'](_0x105080)[_0x0a9e('0x25')](_0x4bb1e3,_0x2c3407);}function emitVoiceQueueChannelRemove(_0x53682f){logger[_0x0a9e('0x26')]('[DEBUG]\x20Emit\x20voice_queue_channel:remove\x20event',JSON['stringify'](_0x53682f));emit(util[_0x0a9e('0x27')](_0x0a9e('0x28'),_0x53682f[_0x0a9e('0x29')]),_0x0a9e('0x2a'),_0x53682f);io['emit'](_0x0a9e('0x2b'),_0x53682f);}function notSendMessagesQueue(_0x2fb0e4){if(_0x2fb0e4[_0x0a9e('0x2c')]){if(_0x2fb0e4[_0x0a9e('0x2d')]===0x0&&_0x2fb0e4[_0x0a9e('0x2e')]===0x0){_0x2fb0e4[_0x0a9e('0x2c')]=![];_0x2fb0e4[_0x0a9e('0x2f')]=0x0;_0x2fb0e4['paused']=0x0;_0x2fb0e4['message']=utils[_0x0a9e('0x30')][_0x0a9e('0x31')];ut[_0x0a9e('0x32')](_0x0a9e('0x33'),_0x2fb0e4['name']+_0x0a9e('0x34'));}else{_0x2fb0e4['message']=utils[_0x0a9e('0x30')]['DEACTIVATED'];ut[_0x0a9e('0x32')](_0x0a9e('0x33'),_0x2fb0e4[_0x0a9e('0x29')]+_0x0a9e('0x35'));}}}Preview[_0x0a9e('0xd')][_0x0a9e('0x24')]=function(){var _0x11c3b6=this;setInterval(function(){_0x11c3b6[_0x0a9e('0x36')]();},0x7cf);};Preview['prototype'][_0x0a9e('0x36')]=function(){var _0x468813=this[_0x0a9e('0x10')];this[_0x0a9e('0x15')]+=0x1;for(var _0x5c877d in _0x468813){if(_0x468813[_0x0a9e('0x37')](_0x5c877d)&&(_0x468813[_0x5c877d][_0x0a9e('0x38')]===_0x0a9e('0x4')||_0x468813[_0x5c877d][_0x0a9e('0x38')]===_0x0a9e('0x39'))&&_0x468813[_0x5c877d][_0x0a9e('0x3a')]===_0x0a9e('0x3b')){if(this[_0x0a9e('0x15')]>0x7){this[_0x0a9e('0x15')]=0x0;this['clearZombieChannels']();}}if(_0x468813[_0x0a9e('0x37')](_0x5c877d)&&_0x468813[_0x5c877d]['dialMethod']===_0x0a9e('0x4')&&_0x468813[_0x5c877d][_0x0a9e('0x3a')]===_0x0a9e('0x3b')){if(_0x468813[_0x5c877d][_0x0a9e('0x3c')]){this[_0x0a9e('0x3d')](_0x468813[_0x5c877d]);if(_0x468813[_0x5c877d]['dialPreviewAutoRecallMe'])this[_0x0a9e('0x3e')](_0x468813[_0x5c877d]);}else{notSendMessagesQueue(_0x468813[_0x5c877d]);}}}};Preview[_0x0a9e('0xd')][_0x0a9e('0x3f')]=function(_0x2da5c0){var _0x2b45ea=this;this[_0x0a9e('0x40')][_0x0a9e('0xe')](function(){if(!_[_0x0a9e('0x41')](_0x2b45ea['actions'][_0x2da5c0])){loggerAction[_0x0a9e('0x26')]('[clearZombieChannels][talking]',_0x2da5c0,_0x0a9e('0x42'),_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0][_0x0a9e('0x43')],_0x0a9e('0x44'),JSON['stringify'](_0x2b45ea[_0x0a9e('0x10')][_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0][_0x0a9e('0x43')]][_0x0a9e('0x2d')]),'pTalking:\x20',JSON['stringify'](_0x2b45ea[_0x0a9e('0x10')][_0x2b45ea['actions'][_0x2da5c0][_0x0a9e('0x43')]][_0x0a9e('0x2e')]),JSON[_0x0a9e('0x45')](_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0]['dialAnswer']),JSON[_0x0a9e('0x45')](_[_0x0a9e('0x46')](_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0],['contactId',_0x0a9e('0x47'),_0x0a9e('0x48'),_0x0a9e('0x49')])));return ami['Action']({'action':'status','channel':_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0][_0x0a9e('0x4a')]})['catch'](function(_0x2b814e){if(_0x2b814e[_0x0a9e('0x4b')]===_0x0a9e('0x4c')){setTimeout(function(){if(_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0]){ut['updateOriginated'](_0x2b45ea['campaignsPreview'][_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0][_0x0a9e('0x43')]],'[clearZombieChannel]');if(_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0][_0x0a9e('0x4d')]===!![]){ut[_0x0a9e('0x4e')](_0x2b45ea['campaignsPreview'][_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0][_0x0a9e('0x43')]],_0x0a9e('0x4f'));ut[_0x0a9e('0x50')](_0x0a9e('0x51')+_0x2da5c0,_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0][_0x0a9e('0x43')]);}ut[_0x0a9e('0x50')](_0x0a9e('0x52')+_0x2da5c0,_0x2b45ea[_0x0a9e('0x13')][_0x2da5c0][_0x0a9e('0x43')]);delete _0x2b45ea[_0x0a9e('0x13')][_0x2da5c0];}},0x2328);}});}});};Preview[_0x0a9e('0xd')][_0x0a9e('0x53')]=function(){var _0x37f6cc=this;loggerAction['info']('[action]',_[_0x0a9e('0x54')](this[_0x0a9e('0x13')]));for(var _0x405c8f in this[_0x0a9e('0x13')]){if(_0x37f6cc[_0x0a9e('0x13')][_0x0a9e('0x37')](_0x405c8f)){_0x37f6cc[_0x0a9e('0x3f')](_0x405c8f);}}};Preview[_0x0a9e('0xd')][_0x0a9e('0x3e')]=function(_0x25c6e6){var _0x2c2cb0=this;rpcDb[_0x0a9e('0x55')](_0x25c6e6['id'],ut['agentReadyId'](this[_0x0a9e('0x14')]))[_0x0a9e('0x56')](function(_0xdd268f){if(!_[_0x0a9e('0x41')](_0xdd268f)){for(var _0x2e8caf=0x0;_0x2e8caf<_0xdd268f[_0x0a9e('0x57')];_0x2e8caf+=0x1){if(ut[_0x0a9e('0x58')](_0xdd268f[_0x2e8caf][_0x0a9e('0x59')])<_0x25c6e6['dialRecallMeTimeout']*0x3c){if(_0xdd268f[_0x2e8caf][_0x0a9e('0x5a')]&&!_0xdd268f[_0x2e8caf]['Agent'][_0x0a9e('0x5b')]){_0x2c2cb0[_0x0a9e('0x5c')](_0xdd268f[_0x2e8caf]['id'])[_0x0a9e('0x56')](ut['logger2'](_0x0a9e('0x5d')))[_0x0a9e('0x5e')](ut[_0x0a9e('0x5f')](_0x0a9e('0x5d')));}else{rpcDb[_0x0a9e('0x60')](_0xdd268f[_0x2e8caf]['id']);}}else{var _0x37be73=new Action(_0xdd268f[_0x2e8caf],_0x25c6e6);_0x37be73[_0x0a9e('0x61')]=moment()['format'](_0x0a9e('0x62'));_0x25c6e6[_0x0a9e('0x63')]+=0x1;ut[_0x0a9e('0x64')](_0x37be73,0x17,_0x0a9e('0x65'));if(_0x25c6e6[_0x0a9e('0x66')]){rpcDb[_0x0a9e('0x67')](ut[_0x0a9e('0x68')](_0xdd268f[_0x2e8caf]));rpcDb[_0x0a9e('0x69')](_0x37be73,_0x0a9e('0x6a'));}else{ut['logCustomer'](_0x37be73,0x16,_0x0a9e('0x6b'));rpcDb[_0x0a9e('0x69')](_0x37be73,'[HistoryRecallClose]');rpcDb['createCustomerFinal'](_0x37be73,'[HistoryRecallClose]');}}}}})[_0x0a9e('0x5e')](ut[_0x0a9e('0x5f')](_0x0a9e('0x6c')));};Preview[_0x0a9e('0xd')][_0x0a9e('0x3d')]=function(_0x30decb){_0x30decb[_0x0a9e('0x2c')]=!![];if(ut[_0x0a9e('0x6d')](_0x30decb['loggedIn'])){_0x30decb['message']=utils['CAMPAIGN_STATUS'][_0x0a9e('0x6e')];}else if(!ut[_0x0a9e('0x6f')](_0x30decb[_0x0a9e('0x3c')])){_0x30decb['message']=utils[_0x0a9e('0x30')][_0x0a9e('0x31')];}else if(!this['isTrunkReachable'](_0x30decb['Trunk'])){if(!this[_0x0a9e('0x70')](_0x30decb['TrunkBackup'])){_0x30decb[_0x0a9e('0x4b')]=utils['CAMPAIGN_STATUS'][_0x0a9e('0x71')];}else{_0x30decb[_0x0a9e('0x4b')]=utils[_0x0a9e('0x30')]['ACTIVE'];}}else{_0x30decb[_0x0a9e('0x4b')]=utils[_0x0a9e('0x30')]['ACTIVE'];}};Preview['prototype'][_0x0a9e('0x72')]=function(_0x3aedd0,_0x49c095,_0x145931){var _0x5ce9ac=this;var _0x211ef9=this['actions'][_0x49c095];var _0xe22ccc=this['campaignsPreview'][_0x211ef9['queue']];var _0x5df0ad;var _0x2da03c=![];var _0x47de4c=0x2;var _0x2f7092=0x3;if(_0xe22ccc){switch(_0x145931){case'1':_0xe22ccc[_0x0a9e('0x73')]+=0x1;_0x211ef9[_0x0a9e('0x74')]+=0x1;_0x211ef9[_0x0a9e('0x75')]=ut[_0x0a9e('0x76')](_0x211ef9);ut[_0x0a9e('0x64')](_0x211ef9,0x0,_0x0a9e('0x77'));ami[_0x0a9e('0x25')]('custom:agentnosuchnumber',ut[_0x0a9e('0x78')](_0x211ef9,_0x0a9e('0x79')));rpcDb[_0x0a9e('0x69')](_0x211ef9,_0x0a9e('0x7a'));_0x5ce9ac[_0x0a9e('0x7b')](_0x211ef9,'0',_0xe22ccc)[_0x0a9e('0x56')](function(_0x5d86e9){_0x2da03c=_0x5d86e9[_0x0a9e('0x7c')]==0x1;_0x47de4c=_0xe22ccc[_0x0a9e('0x7d')];_0x2f7092=_0xe22ccc['callAdditionalPhoneAfterMin'];if(!_0x2da03c){if(ut[_0x0a9e('0x76')](_0x211ef9)>=_0xe22ccc['dialGlobalMaxRetry']){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0xf,'Global');rpcDb['createCustomerFinal'](_0x5df0ad,'[callProgressDetectingCustomer][logNoSuchGlobal]');}else{if(_0x211ef9[_0x0a9e('0x74')]>=_0xe22ccc['dialNoSuchNumberMaxRetry']){rpcDb[_0x0a9e('0x7f')](_0x211ef9,_0x0a9e('0x80'));}else{rpcDb[_0x0a9e('0x81')](ut[_0x0a9e('0x82')](_0x211ef9,_0x0a9e('0x74'),_0xe22ccc[_0x0a9e('0x7d')]),_0x211ef9['unlockAgent'],_0x211ef9[_0x0a9e('0x83')]);}}delete this['actions'][_0x3aedd0[_0x0a9e('0x84')]];}else{_0x211ef9[_0x0a9e('0x74')]++;logger[_0x0a9e('0x26')]('actioncountonusuch',_0x211ef9[_0x0a9e('0x74')]);logger[_0x0a9e('0x26')]('id',_0x211ef9[_0x0a9e('0x85')]);_0x5ce9ac[_0x0a9e('0x86')]({'id':_0x211ef9['idContact'],'field':{'countnosuchnumberretry':_0x211ef9[_0x0a9e('0x74')]}})[_0x0a9e('0x56')](function(){_0x5ce9ac['swapAdditionalPhones'](_0x211ef9,_0x47de4c,_0x2f7092)[_0x0a9e('0x56')](function(){});});}});break;case _0x0a9e('0x87'):var _0x88dcbf=moment()[_0x0a9e('0x27')](_0x0a9e('0x62'));_0x211ef9['responsetime']=_0x88dcbf;_0x211ef9[_0x0a9e('0x88')]=_0x88dcbf;_0x211ef9[_0x0a9e('0x4d')]=!![];_0xe22ccc[_0x0a9e('0x2e')]+=0x1;logger['info'](_0x0a9e('0x89'),_0x211ef9['uniqueid'],'\x20Queue',_0xe22ccc[_0x0a9e('0x29')],_0x0a9e('0x8a'),_0xe22ccc[_0x0a9e('0x2e')]);ami[_0x0a9e('0x25')](_0x0a9e('0x8b'),ut[_0x0a9e('0x78')](_0x211ef9,_0x0a9e('0x8c'),this[_0x0a9e('0x10')][_0x211ef9[_0x0a9e('0x43')]]));if(_0xe22ccc[_0x0a9e('0x8d')]||_0xe22ccc[_0x0a9e('0x8e')]){ami[_0x0a9e('0x25')](_0x0a9e('0x8f'),{'queue':_0x211ef9[_0x0a9e('0x43')],'interface':_0x211ef9[_0x0a9e('0x90')],'uniqueid':_0x211ef9[_0x0a9e('0x91')]});}break;case'16':ami[_0x0a9e('0x25')](_0x0a9e('0x92'),ut['buildObj'](_0x211ef9,_0x0a9e('0x93'),this[_0x0a9e('0x10')][_0x211ef9[_0x0a9e('0x43')]]));emitVoiceQueueChannelRemove(ut['buildObj'](_0x211ef9,_0x0a9e('0x93')));_0xe22ccc[_0x0a9e('0x94')]+=0x1;_0xe22ccc['total']+=0x1;_0xe22ccc[_0x0a9e('0x95')]+=0x1;ut[_0x0a9e('0x4e')](_0xe22ccc,_0x0a9e('0x96'));_0x211ef9[_0x0a9e('0x75')]=ut[_0x0a9e('0x76')](_0x211ef9);ut['logCustomer'](_0x211ef9,0x4,'Answer');rpcDb['createCustomerHistory'](_0x211ef9,_0x0a9e('0x97'));rpcDb[_0x0a9e('0x7f')](_0x211ef9,_0x0a9e('0x98'));rpcDb[_0x0a9e('0x99')](_0x211ef9);_0xe22ccc[_0x0a9e('0x9a')]+=_0x211ef9[_0x0a9e('0x9b')];_0xe22ccc[_0x0a9e('0x9c')]+=_0x211ef9[_0x0a9e('0x9b')];logger['info'](_0x0a9e('0x9d'),_0x211ef9[_0x0a9e('0x91')],_0x0a9e('0x9e'),_0xe22ccc['name'],_0x0a9e('0x8a'),_0xe22ccc['pTalking']);delete this[_0x0a9e('0x13')][_0x3aedd0[_0x0a9e('0x84')]];break;case'BUSY':_0xe22ccc[_0x0a9e('0x9f')]+=0x1;_0x211ef9[_0x0a9e('0xa0')]+=0x1;_0x211ef9[_0x0a9e('0x75')]=ut[_0x0a9e('0x76')](_0x211ef9);ut['logCustomer'](_0x211ef9,0x5,_0x0a9e('0xa1'));_0x47de4c=_0xe22ccc[_0x0a9e('0xa2')];_0x2f7092=_0xe22ccc[_0x0a9e('0xa3')];ami[_0x0a9e('0x25')]('custom:agentbusy',ut[_0x0a9e('0x78')](_0x211ef9,_0x0a9e('0xa4')));rpcDb[_0x0a9e('0x69')](_0x211ef9,_0x0a9e('0xa5'));_0x5ce9ac['verifyAdditionalPhones'](_0x211ef9,'5',_0xe22ccc)[_0x0a9e('0x56')](function(_0x3511c9){_0x2da03c=_0x3511c9[_0x0a9e('0x7c')]==0x1;if(!_0x2da03c){if(ut[_0x0a9e('0x76')](_0x211ef9)>=_0xe22ccc[_0x0a9e('0xa6')]){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0xf,_0x0a9e('0xa7'));rpcDb[_0x0a9e('0x7f')](_0x5df0ad,_0x0a9e('0xa8'));}else{if(_0x211ef9[_0x0a9e('0xa0')]>=_0xe22ccc[_0x0a9e('0xa9')]){rpcDb[_0x0a9e('0x7f')](_0x211ef9,_0x0a9e('0xa5'));}else{rpcDb[_0x0a9e('0x81')](ut['scheduledAt'](_0x211ef9,_0x0a9e('0xa0'),_0xe22ccc[_0x0a9e('0xa2')]),_0x211ef9[_0x0a9e('0xaa')],_0x211ef9['activeContact']);}}}else{_0x211ef9[_0x0a9e('0xa0')]++;_0x5ce9ac[_0x0a9e('0x86')]({'id':_0x211ef9[_0x0a9e('0x85')],'field':{'countbusyretry':_0x211ef9[_0x0a9e('0xa0')]}})['then'](function(){_0x5ce9ac['swapAdditionalPhones'](_0x211ef9,_0x47de4c,_0x2f7092)[_0x0a9e('0x56')](function(){});});}});break;case _0x0a9e('0xab'):_0xe22ccc['outboundNoAnswerCallsDay']+=0x1;_0x211ef9[_0x0a9e('0xac')]+=0x1;_0x211ef9['countglobal']=ut[_0x0a9e('0x76')](_0x211ef9);ut[_0x0a9e('0x64')](_0x211ef9,0x3,'NoAnswer');_0x47de4c=_0xe22ccc[_0x0a9e('0xad')];_0x2f7092=_0xe22ccc[_0x0a9e('0xa3')];var _0x2d2286=ut[_0x0a9e('0xae')](_0x211ef9,_0xe22ccc);ami[_0x0a9e('0x25')](_0x0a9e('0xaf'),_0x2d2286);rpcDb[_0x0a9e('0x69')](_0x211ef9,'[callProgressDetectingCustomer][logNoAnswer]');_0x5ce9ac[_0x0a9e('0x7b')](_0x211ef9,'3',_0xe22ccc)[_0x0a9e('0x56')](function(_0x45c109){_0x2da03c=_0x45c109[_0x0a9e('0x7c')]==0x1;if(!_0x2da03c){if(ut['totalGlobal'](_0x211ef9)>=_0xe22ccc[_0x0a9e('0xa6')]){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0xf,'Global');rpcDb[_0x0a9e('0x7f')](_0x5df0ad,'[callProgressDetectingCustomer][logNoAnswerGlobal]');}else{if(_0x211ef9[_0x0a9e('0xac')]>=_0xe22ccc[_0x0a9e('0xb0')]){rpcDb[_0x0a9e('0x7f')](_0x211ef9,_0x0a9e('0xb1'));}else{rpcDb['rescheduleContact'](ut['scheduledAt'](_0x211ef9,_0x0a9e('0xac'),_0xe22ccc[_0x0a9e('0xad')]),_0x211ef9[_0x0a9e('0xaa')],_0x211ef9['activeContact']);}}}else{_0x211ef9[_0x0a9e('0xac')]++;_0x5ce9ac[_0x0a9e('0x86')]({'id':_0x211ef9['idContact'],'field':{'countnoanswerretry':_0x211ef9['countnoanswerretry']}})[_0x0a9e('0x56')](function(){_0x5ce9ac['swapAdditionalPhones'](_0x211ef9,_0x47de4c,_0x2f7092)['then'](function(){});});}});break;case'CONGESTION':_0xe22ccc[_0x0a9e('0xb2')]+=0x1;_0x211ef9[_0x0a9e('0xb3')]+=0x1;_0x211ef9[_0x0a9e('0x75')]=ut[_0x0a9e('0x76')](_0x211ef9);ut[_0x0a9e('0x64')](_0x211ef9,0x8,_0x0a9e('0xb4'));_0x47de4c=_0xe22ccc['dialCongestionRetryFrequency'];_0x2f7092=_0xe22ccc[_0x0a9e('0xa3')];ami['emit'](_0x0a9e('0xb5'),ut[_0x0a9e('0x78')](_0x211ef9,_0x0a9e('0xb6')));rpcDb[_0x0a9e('0x69')](_0x211ef9,'[callProgressDetectingCustomer][logCongestion]');_0x5ce9ac[_0x0a9e('0x7b')](_0x211ef9,'8',_0xe22ccc)[_0x0a9e('0x56')](function(_0x1d4877){_0x2da03c=_0x1d4877['additional']==0x1;if(!_0x2da03c){if(ut[_0x0a9e('0x76')](_0x211ef9)>=_0xe22ccc[_0x0a9e('0xa6')]){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0xf,_0x0a9e('0xa7'));rpcDb[_0x0a9e('0x7f')](_0x5df0ad,_0x0a9e('0xb7'));}else{if(_0x211ef9[_0x0a9e('0xb3')]>=_0xe22ccc[_0x0a9e('0xb8')]){rpcDb['createCustomerFinal'](_0x211ef9,_0x0a9e('0xb9'));}else{rpcDb[_0x0a9e('0x81')](ut['scheduledAt'](_0x211ef9,_0x0a9e('0xb3'),_0xe22ccc[_0x0a9e('0xa2')]),_0x211ef9[_0x0a9e('0xaa')],_0x211ef9['activeContact']);}}}else{_0x211ef9[_0x0a9e('0xb3')]++;_0x5ce9ac['incrementPreviewCounters']({'id':_0x211ef9[_0x0a9e('0x85')],'field':{'countcongestionretry':_0x211ef9[_0x0a9e('0xb3')]}})[_0x0a9e('0x56')](function(){_0x5ce9ac[_0x0a9e('0xba')](_0x211ef9,_0x47de4c,_0x2f7092)[_0x0a9e('0x56')](function(){});});}});break;case _0x0a9e('0xbb'):_0xe22ccc[_0x0a9e('0xbc')]+=0x1;_0x211ef9[_0x0a9e('0xbd')]+=0x1;_0x211ef9['countglobal']=ut[_0x0a9e('0x76')](_0x211ef9);ut[_0x0a9e('0x64')](_0x211ef9,0x14,_0x0a9e('0xbe'));_0x47de4c=_0xe22ccc[_0x0a9e('0xbf')];_0x2f7092=_0xe22ccc[_0x0a9e('0xa3')];ami[_0x0a9e('0x25')](_0x0a9e('0xc0'),ut[_0x0a9e('0x78')](_0x211ef9,_0x0a9e('0xc1')));rpcDb[_0x0a9e('0x69')](_0x211ef9,_0x0a9e('0xc2'));_0x5ce9ac[_0x0a9e('0x7b')](_0x211ef9,'20',_0xe22ccc)[_0x0a9e('0x56')](function(_0x4989f9){_0x2da03c=_0x4989f9[_0x0a9e('0x7c')]==0x1;if(!_0x2da03c){if(ut[_0x0a9e('0x76')](_0x211ef9)>=_0xe22ccc[_0x0a9e('0xa6')]){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0x14,_0x0a9e('0xbe'));rpcDb['createCustomerFinal'](_0x5df0ad,_0x0a9e('0xc3'));}else{if(_0x211ef9[_0x0a9e('0xbd')]>=_0xe22ccc['dialAgentRejectMaxRetry']){rpcDb[_0x0a9e('0x7f')](_0x211ef9,'[callProgressDetectingCustomer][logAgentReject]');}else{rpcDb[_0x0a9e('0x81')](ut[_0x0a9e('0x82')](_0x211ef9,_0x0a9e('0xbd'),_0xe22ccc[_0x0a9e('0xbf')]),_0x211ef9['unlockAgent'],_0x211ef9[_0x0a9e('0x83')]);}}}else{_0x211ef9['countnoanswerretry']++;_0x5ce9ac[_0x0a9e('0x86')]({'id':_0x211ef9[_0x0a9e('0x85')],'field':{'countnoanswerretry':_0x211ef9['countnoanswerretry']}})[_0x0a9e('0x56')](function(){_0x5ce9ac[_0x0a9e('0xba')](_0x211ef9,_0x47de4c,_0x2f7092)[_0x0a9e('0x56')](function(){});});}});break;case'ABANDONED':_0xe22ccc['outboundAbandonedCallsDay']+=0x1;_0x211ef9[_0x0a9e('0xc4')]+=0x1;_0x211ef9[_0x0a9e('0x75')]=ut[_0x0a9e('0x76')](_0x211ef9);ut[_0x0a9e('0x64')](_0x211ef9,0xb,_0x0a9e('0xc5'));rpcDb[_0x0a9e('0x69')](_0x211ef9,_0x0a9e('0xc6'));_0x5ce9ac[_0x0a9e('0x7b')](_0x211ef9,'11',_0xe22ccc)[_0x0a9e('0x56')](function(_0x586510){_0x2da03c=_0x586510[_0x0a9e('0x7c')]==0x1;if(!_0x2da03c){if(ut['totalGlobal'](_0x211ef9)>=_0xe22ccc[_0x0a9e('0xa6')]){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0xf,_0x0a9e('0xa7'));rpcDb[_0x0a9e('0x7f')](_0x5df0ad,_0x0a9e('0xc6'));}else{if(_0x211ef9['countabandonedetry']>=_0xe22ccc[_0x0a9e('0xc7')]){rpcDb[_0x0a9e('0x7f')](_0x211ef9,_0x0a9e('0xc6'));}else{rpcDb[_0x0a9e('0x81')](ut[_0x0a9e('0x82')](_0x211ef9,'countabandonedretry',_0xe22ccc['dialAbandonedRetryFrequency']),_0x211ef9[_0x0a9e('0xaa')],_0x211ef9['activeContact']);}}}else{_0x211ef9[_0x0a9e('0xac')]++;_0x5ce9ac[_0x0a9e('0x86')]({'id':_0x211ef9[_0x0a9e('0x85')],'field':{'countnoanswerretry':_0x211ef9[_0x0a9e('0xac')]}})[_0x0a9e('0x56')](function(){_0x5ce9ac[_0x0a9e('0xba')](_0x211ef9,_0x47de4c,_0x2f7092)['then'](function(){});});}});break;case'18':_0xe22ccc['outboundUnknownCallsDay']+=0x1;_0x211ef9[_0x0a9e('0xc8')]+=0x1;_0x211ef9['countglobal']=ut[_0x0a9e('0x76')](_0x211ef9);ut['logCustomer'](_0x211ef9,0x12,_0x3aedd0[_0x0a9e('0xc9')]||_0x3aedd0['dialstatus']);ami['emit'](_0x0a9e('0xca'),ut[_0x0a9e('0x78')](_0x211ef9,'amd'));rpcDb[_0x0a9e('0x69')](_0x211ef9,_0x0a9e('0xcb'));_0x5ce9ac[_0x0a9e('0x7b')](_0x211ef9,'18',_0xe22ccc)[_0x0a9e('0x56')](function(_0x2eb028){_0x2da03c=_0x2eb028['additional']==0x1;if(!_0x2da03c){if(ut['totalGlobal'](_0x211ef9)>=_0xe22ccc[_0x0a9e('0xa6')]){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0x12,_0x0a9e('0xa7'));rpcDb[_0x0a9e('0x7f')](_0x5df0ad,_0x0a9e('0xcb'));}else{rpcDb['createCustomerFinal'](_0x211ef9,_0x0a9e('0xcb'));}}else{_0x211ef9[_0x0a9e('0xac')]++;_0x5ce9ac['incrementPreviewCounters']({'id':_0x211ef9[_0x0a9e('0x85')],'field':{'countnoanswerretry':_0x211ef9[_0x0a9e('0xac')]}})[_0x0a9e('0x56')](function(){_0x5ce9ac[_0x0a9e('0xba')](_0x211ef9,_0x47de4c,_0x2f7092)[_0x0a9e('0x56')](function(){});});}});delete this[_0x0a9e('0x13')][_0x3aedd0[_0x0a9e('0x84')]];break;case'19':_0xe22ccc[_0x0a9e('0xcc')]+=0x1;_0x211ef9[_0x0a9e('0x75')]=ut[_0x0a9e('0x76')](_0x211ef9);ut['logCustomer'](_0x211ef9,0x13,_0x3aedd0[_0x0a9e('0xc9')]||_0x3aedd0[_0x0a9e('0xcd')]);ami[_0x0a9e('0x25')](_0x0a9e('0xca'),ut[_0x0a9e('0x78')](_0x211ef9,'amd'));rpcDb['createCustomerHistory'](_0x211ef9,_0x0a9e('0xce'));_0x5ce9ac[_0x0a9e('0x7b')](_0x211ef9,'18',_0xe22ccc)[_0x0a9e('0x56')](function(_0x2fea95){_0x2da03c=_0x2fea95[_0x0a9e('0x7c')]==0x1;if(!_0x2da03c){if(ut['totalGlobal'](_0x211ef9)>=_0xe22ccc[_0x0a9e('0xa6')]){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0xf,_0x0a9e('0xa7'));rpcDb['createCustomerFinal'](_0x5df0ad,_0x0a9e('0xce'));}else{rpcDb['createCustomerFinal'](_0x211ef9,_0x0a9e('0xce'));}}else{_0x211ef9['countnoanswerretry']++;_0x5ce9ac[_0x0a9e('0x86')]({'id':_0x211ef9[_0x0a9e('0x85')],'field':{'countnoanswerretry':_0x211ef9[_0x0a9e('0xac')]}})['then'](function(){_0x5ce9ac[_0x0a9e('0xba')](_0x211ef9,_0x47de4c,_0x2f7092)['then'](function(){});});}});delete this[_0x0a9e('0x13')][_0x3aedd0[_0x0a9e('0x84')]];break;default:if(_0x211ef9[_0x0a9e('0x4d')]){ut[_0x0a9e('0x4e')](_0xe22ccc,_0x0a9e('0xcf'));ut[_0x0a9e('0x50')](_0x0a9e('0xd0')+_0xe22ccc[_0x0a9e('0x29')],_0x3aedd0);}_0xe22ccc[_0x0a9e('0xcc')]+=0x1;_0x211ef9[_0x0a9e('0x75')]=ut[_0x0a9e('0x76')](_0x211ef9);ut[_0x0a9e('0x64')](_0x211ef9,0xc,_0x3aedd0[_0x0a9e('0xc9')]||_0x3aedd0[_0x0a9e('0xcd')]);_0x47de4c=_0xe22ccc[_0x0a9e('0xbf')];_0x2f7092=_0xe22ccc[_0x0a9e('0xa3')];rpcDb['createCustomerHistory'](_0x211ef9,'[callProgressDetectingCustomer][logUnknown]');_0x5ce9ac[_0x0a9e('0x7b')](_0x211ef9,'20',_0xe22ccc)['then'](function(_0x1d999b){_0x2da03c=_0x1d999b[_0x0a9e('0x7c')]==0x1;if(!_0x2da03c){if(ut['totalGlobal'](_0x211ef9)>=_0xe22ccc[_0x0a9e('0xa6')]){_0x5df0ad=ut[_0x0a9e('0x7e')](_0x211ef9,0xf,_0x0a9e('0xa7'));rpcDb[_0x0a9e('0x7f')](_0x5df0ad,'[callProgressDetectingCustomer][logUnknownGlobal]');}else{rpcDb[_0x0a9e('0x7f')](_0x211ef9,_0x0a9e('0xd1'));}delete this[_0x0a9e('0x13')][_0x3aedd0[_0x0a9e('0x84')]];}else{_0x5ce9ac['swapAdditionalPhones'](_0x211ef9,_0x47de4c,_0x2f7092)[_0x0a9e('0x56')](function(){});}});}if(!(_0x211ef9[_0x0a9e('0x4d')]&&_0x145931==='16')){ut[_0x0a9e('0xd2')](_0xe22ccc,'[callProgressDetectingCustomer]');logger[_0x0a9e('0x26')](_0x0a9e('0xd3'),_0x211ef9[_0x0a9e('0x91')],'\x20Queue',_0xe22ccc[_0x0a9e('0x29')],_0x0a9e('0x44'),_0xe22ccc[_0x0a9e('0x2d')]);}if(_0x145931!==_0x0a9e('0x87')){delete this[_0x0a9e('0x13')][_0x3aedd0['linkedid']];delete this[_0x0a9e('0x13')][_0x3aedd0[_0x0a9e('0xd4')]];}_0xe22ccc['queueSummaryCountersUpdated']=!![];}};Preview[_0x0a9e('0xd')][_0x0a9e('0xd5')]=function(_0x1f6f1c,_0x5822a7,_0x5c3b6f){if(_['isUndefined'](_0x5822a7)&&_0x0a9e('0xd6')!==typeof _0x5822a7){return;}if(_[_0x0a9e('0xd7')](_0x5c3b6f)&&'object'!==typeof _0x5c3b6f){return;}switch(_0x5c3b6f[_0x0a9e('0xd8')]){case'0':ut[_0x0a9e('0xd9')](_0x1f6f1c,0x0,_0x0a9e('0x77'));rpcDb['createAgentHistory'](_0x1f6f1c,_0x0a9e('0xda'));break;case'3':ut[_0x0a9e('0xd9')](_0x1f6f1c,0x3,_0x0a9e('0xdb'));rpcDb[_0x0a9e('0xdc')](_0x1f6f1c,_0x0a9e('0xdd'));break;case'5':ut[_0x0a9e('0xd9')](_0x1f6f1c,0x5,_0x0a9e('0xa1'));rpcDb[_0x0a9e('0xdc')](_0x1f6f1c,_0x0a9e('0xde'));break;case'8':ut['logAgent'](_0x1f6f1c,0x8,_0x0a9e('0xb4'));rpcDb['createAgentHistory'](_0x1f6f1c,_0x0a9e('0xdf'));break;case'22':ut[_0x0a9e('0xd9')](_0x1f6f1c,0x16,_0x0a9e('0xe0'));rpcDb[_0x0a9e('0xdc')](_0x1f6f1c,_0x0a9e('0xe1'));break;default:ut[_0x0a9e('0xd9')](_0x1f6f1c,0xc,_0x5c3b6f['reason']);rpcDb[_0x0a9e('0xdc')](_0x1f6f1c,_0x0a9e('0xdf'));}ut[_0x0a9e('0xd2')](_0x5822a7,_0x0a9e('0xe2'));logger['info'](_0x0a9e('0xe3'),_0x1f6f1c[_0x0a9e('0x91')],_0x0a9e('0x9e'),_0x5822a7[_0x0a9e('0x29')],_0x0a9e('0x44'),_0x5822a7[_0x0a9e('0x2d')]);delete this[_0x0a9e('0x13')][_0x1f6f1c[_0x0a9e('0x91')]];};Preview[_0x0a9e('0xd')][_0x0a9e('0x7b')]=function(_0x57f0ad,_0x2272bc,_0x88b25f){return cmHopperAdditionalPhone[_0x0a9e('0x7b')](_0x57f0ad,_0x2272bc,_0x88b25f)[_0x0a9e('0x5e')](logger[_0x0a9e('0x26')](_0x0a9e('0xe4')));};Preview[_0x0a9e('0xd')][_0x0a9e('0xba')]=function(_0x566b90,_0x3b581c,_0xd2391){return cmHopperAdditionalPhone[_0x0a9e('0xba')](_0x566b90,_0x3b581c,_0xd2391)['catch'](logger[_0x0a9e('0x26')](_0x0a9e('0xe5')));};Preview[_0x0a9e('0xd')][_0x0a9e('0x86')]=function(_0x370b5e){return Promise[_0x0a9e('0xe6')]()[_0x0a9e('0x56')](cmHopperAdditionalPhone[_0x0a9e('0x86')](_0x370b5e))[_0x0a9e('0x5e')](logger[_0x0a9e('0x26')]('[incrementPreviewCounters]\x20'));};Preview[_0x0a9e('0xd')][_0x0a9e('0xe7')]=function(_0x15a9ed,_0x3db98f,_0x2b624e,_0x3942fd,_0x5cb48d){var _0x382687=this;return new Promise(function(_0x4f854b,_0x5bd139){if(_['isNil'](_0x3db98f)||_[_0x0a9e('0x41')](_0x3db98f[_0x0a9e('0xe8')])||_[_0x0a9e('0x41')](_0x3db98f[_0x0a9e('0xe9')])||_['isNil'](_0x3db98f[_0x0a9e('0x48')])){_0x5bd139(ut[_0x0a9e('0x4b')](_0x0a9e('0xea'),_0x3942fd,_0x5cb48d));return;}var _0x1fdb10=uuid['v4']();var _0x2c8d1d=_0x382687['campaignsPreview'][_0x3db98f['Queue'][_0x0a9e('0x29')]];var _0x33bcb2=_0x2b624e?_0x382687[_0x0a9e('0x14')][_0x2b624e]['id']:undefined;_0x382687['actions'][_0x1fdb10]=new Action(_0x3db98f,_0x2c8d1d,_0x1fdb10,_0x2b624e,_0x33bcb2);var _0x319752=_0x382687[_0x0a9e('0x13')][_0x1fdb10];_0x319752[_0x0a9e('0xaa')]=_0x3942fd;_0x319752['activeContact']=_0x5cb48d;_0x319752[_0x0a9e('0xeb')]=_0x2b624e;if(_[_0x0a9e('0xec')](_0x15a9ed)){_0x382687[_0x0a9e('0xed')](_0x319752,_0x2c8d1d,_0x3db98f,_0x2b624e)['then'](function(_0x272291){logger[_0x0a9e('0x26')](_0x0a9e('0xee'),'Queue:\x20'+_0x319752['queue']+'\x20IdHopper:\x20'+_0x319752[_0x0a9e('0x85')],JSON[_0x0a9e('0x45')](_0x272291));ami[_0x0a9e('0x25')](_0x0a9e('0xef'),ut['buildObj'](_0x319752,_0x0a9e('0xf0'),_0x382687['campaignsPreview'][_0x319752[_0x0a9e('0x43')]]));_0x4f854b(ut[_0x0a9e('0x4b')](_0x0a9e('0xf1')));})['catch'](function(_0x33b4b3){ut[_0x0a9e('0x32')](_0x0a9e('0xf2'),_0x33b4b3);_0x5bd139(ut['message'](_0x0a9e('0xf3'),_0x3942fd,_0x5cb48d));});}else{_0x2c8d1d['outboundBlacklistCallsDay']+=0x1;ut[_0x0a9e('0xf4')](_0x319752);rpcDb['createHistory'](_0x319752,_0x0a9e('0xf5'));delete _0x382687['actions'][_0x1fdb10];_0x5bd139(ut[_0x0a9e('0x4b')](_0x0a9e('0xf6'),_0x3942fd,_0x5cb48d));}});};Preview[_0x0a9e('0xd')][_0x0a9e('0x70')]=function(_0x1e306c){return!_[_0x0a9e('0x41')](_0x1e306c)&&!_[_0x0a9e('0x41')](_0x1e306c['name'])&&!_[_0x0a9e('0x41')](_0x1e306c[_0x0a9e('0xf7')])&&_0x1e306c['active']&&!_[_0x0a9e('0x41')](this[_0x0a9e('0x12')][util['format'](_0x0a9e('0xf8'),_0x1e306c[_0x0a9e('0x29')])])&&!_[_0x0a9e('0x41')](this['trunks'][util[_0x0a9e('0x27')](_0x0a9e('0xf8'),_0x1e306c[_0x0a9e('0x29')])][_0x0a9e('0xf9')])&&(this[_0x0a9e('0x12')][util[_0x0a9e('0x27')](_0x0a9e('0xf8'),_0x1e306c[_0x0a9e('0x29')])][_0x0a9e('0xf9')]===_0x0a9e('0xfa')||this['trunks'][util[_0x0a9e('0x27')]('SIP/%s',_0x1e306c[_0x0a9e('0x29')])][_0x0a9e('0xf9')]===_0x0a9e('0xfb'));};Preview[_0x0a9e('0xd')][_0x0a9e('0x5c')]=function(_0x2d45db,_0x5691ac){return this[_0x0a9e('0xfc')](_0x2d45db,_0x5691ac)[_0x0a9e('0x56')](function(_0x2977a7){return _['pick'](_0x2977a7,[_0x0a9e('0x4b')]);})[_0x0a9e('0x5e')](function(_0x4435d2){if(_0x4435d2[_0x0a9e('0xfd')]){rpcDb[_0x0a9e('0xfe')](_0x2d45db);}if(_0x4435d2[_0x0a9e('0xf7')]){rpcDb[_0x0a9e('0x60')](_0x2d45db);}throw _['pick'](_0x4435d2,[_0x0a9e('0x4b')]);});};Preview[_0x0a9e('0xd')][_0x0a9e('0xfc')]=function(_0x2ce3be,_0x3de77e){var _0x241404=this;var _0x8120e,_0x5d6a48;return rpcDb['getContactPreview'](_0x2ce3be)[_0x0a9e('0x56')](function(_0x3f507c){if(!_[_0x0a9e('0x41')](_0x3f507c[0x0])){_0x5d6a48=_0x3f507c[0x0][_0x0a9e('0xff')]?![]:!![];_0x8120e=_0x3f507c[0x0][_0x0a9e('0xff')]?!![]:![];_0x8120e=_0x3de77e?!![]:_0x8120e;}var _0x131da8=_0x241404[_0x0a9e('0x100')](_0x3f507c);if(_0x131da8['isValid']){rpcDb[_0x0a9e('0x101')](_[_0x0a9e('0x46')](_0x3f507c[0x0],[_0x0a9e('0x48'),_0x0a9e('0xe9')]))[_0x0a9e('0x56')](function(_0x3c6082){_0x241404[_0x0a9e('0xe7')](_0x3c6082,_0x3f507c[0x0],_0x3de77e,_0x5d6a48,_0x8120e)['then'](function(_0x311288){return _0x311288;})[_0x0a9e('0x5e')](function(_0x231826){throw _0x231826;});})['catch'](function(_0x2b8ad4){ut[_0x0a9e('0x32')](_0x0a9e('0x102'),_0x2b8ad4);throw ut[_0x0a9e('0x4b')]('Call\x20unsuccessful',_0x5d6a48,_0x8120e);});}else{throw ut[_0x0a9e('0x4b')](_0x131da8[_0x0a9e('0x4b')],_0x5d6a48,_0x8120e);}})[_0x0a9e('0x5e')](function(_0x93d953){ut[_0x0a9e('0x32')](_0x0a9e('0x103'),_0x93d953);throw ut[_0x0a9e('0x4b')](_0x0a9e('0x104'),![],!![]);});};Preview['prototype'][_0x0a9e('0x100')]=function(_0x266aa1){if(_[_0x0a9e('0x41')](_0x266aa1)||_[_0x0a9e('0xec')](_0x266aa1)||!_['isNil'](_0x266aa1[0x0]['Agent'])&&_[_0x0a9e('0x41')](_0x266aa1[0x0][_0x0a9e('0x5a')][_0x0a9e('0x29')])){ut['logger'](_0x0a9e('0x105'),_0x266aa1);return{'isValid':![],'message':_0x0a9e('0x106')};}var _0x4d8a67=this[_0x0a9e('0x10')][_0x266aa1[0x0]['Queue'][_0x0a9e('0x29')]];_0x4d8a67['message']=utils['CAMPAIGN_STATUS']['ACTIVE'];if(_[_0x0a9e('0x41')](_0x4d8a67)){ut[_0x0a9e('0x32')](_0x0a9e('0x107'),_0x4d8a67);return{'isValid':![],'message':_0x0a9e('0x108')};}if(!this[_0x0a9e('0x70')](_0x4d8a67[_0x0a9e('0x109')])){ut['logger'](_0x0a9e('0x10a'),_0x0a9e('0x10b')+_0x4d8a67[_0x0a9e('0x29')]+_0x0a9e('0x10c'));if(!this[_0x0a9e('0x70')](_0x4d8a67[_0x0a9e('0x10d')])){ut[_0x0a9e('0x32')]('[Preview][validateContact][Trunk\x20not\x20working\x20correctly]',_0x4d8a67['name']+_0x0a9e('0x10e'));return{'isValid':![],'message':'Trunk\x20not\x20working\x20correctly'};}}if(!ut[_0x0a9e('0x6f')](_0x4d8a67[_0x0a9e('0x3c')])){ut[_0x0a9e('0x32')](_0x0a9e('0x10f'),_0x4d8a67[_0x0a9e('0x29')]+_0x0a9e('0x110'));return{'isValid':![],'message':'campaign\x20Name:\x20'+_0x4d8a67[_0x0a9e('0x29')]+'\x20Not\x20Active'};}return{'isValid':!![],'message':'Is\x20Valid'};};Preview[_0x0a9e('0xd')]['execCall']=function(_0x38dceb,_0x5dc978,_0x550cbf,_0x26223f){var _0x4a7a3c=this;return new Promise(function(_0x24470a,_0x142e53){var _0xe1ab0d=_0x38dceb['uniqueid'];var _0x4152cd=_0x4a7a3c[_0x0a9e('0x70')](_0x5dc978[_0x0a9e('0x109')])?util['format']('SIP/%s/%s%s',_0x5dc978[_0x0a9e('0x109')][_0x0a9e('0x29')],_[_0x0a9e('0x41')](_0x5dc978[_0x0a9e('0x111')])?'':_0x5dc978[_0x0a9e('0x111')][_0x0a9e('0x112')]()||'',_0x5dc978[_0x0a9e('0x113')]>0x0?_0x550cbf[_0x0a9e('0xe9')][_0x0a9e('0x114')](_0x5dc978[_0x0a9e('0x113')]):_0x550cbf['phone']):util['format']('SIP/%s/%s%s',_[_0x0a9e('0x41')](_0x5dc978[_0x0a9e('0x10d')])?_0x5dc978[_0x0a9e('0x109')][_0x0a9e('0x29')]:_0x5dc978[_0x0a9e('0x10d')][_0x0a9e('0x29')],_[_0x0a9e('0x41')](_0x5dc978[_0x0a9e('0x111')])?'':_0x5dc978['dialPrefix']['trim']()||'',_0x5dc978[_0x0a9e('0x113')]>0x0?_0x550cbf[_0x0a9e('0xe9')]['substring'](_0x5dc978[_0x0a9e('0x113')]):_0x550cbf[_0x0a9e('0xe9')]);var _0x2e2280=_0x4a7a3c[_0x0a9e('0x70')](_0x5dc978[_0x0a9e('0x109')])?ut[_0x0a9e('0x115')](_0x5dc978[_0x0a9e('0x109')][_0x0a9e('0x116')],_0x5dc978[_0x0a9e('0x117')],_0x5dc978[_0x0a9e('0x118')]>0x0?ut[_0x0a9e('0x119')](_0x5dc978[_0x0a9e('0x11a')],_0x5dc978['dialRandomLastDigitCallerIdNumber']):_0x5dc978[_0x0a9e('0x11a')]):ut[_0x0a9e('0x115')](_[_0x0a9e('0x41')](_0x5dc978[_0x0a9e('0x10d')])?_0x5dc978[_0x0a9e('0x109')][_0x0a9e('0x116')]:_0x5dc978[_0x0a9e('0x10d')][_0x0a9e('0x116')],_0x5dc978[_0x0a9e('0x117')],_0x5dc978[_0x0a9e('0x118')]>0x0?ut[_0x0a9e('0x119')](_0x5dc978[_0x0a9e('0x11a')],_0x5dc978['dialRandomLastDigitCallerIdNumber']):_0x5dc978['dialOriginateCallerIdNumber']);if(_0x2e2280){_0x38dceb[_0x0a9e('0x11b')]=ut[_0x0a9e('0x11c')](_0x2e2280);_0x38dceb[_0x0a9e('0x11d')]=ut[_0x0a9e('0x11e')](_0x2e2280);}var _0x33359a=ut[_0x0a9e('0x11f')](_0x5dc978,_0x550cbf,_0x4152cd,_0x2e2280,_0xe1ab0d,_0x38dceb);var _0xa8b5de=utils['setXMDContactVariables'](_0x550cbf[_0x0a9e('0xe8')]);Object['assign'](_0x33359a,_0xa8b5de);_[_0x0a9e('0x120')](_0x38dceb,ut[_0x0a9e('0x121')](_0x33359a));_0x38dceb[_0x0a9e('0x61')]=moment()[_0x0a9e('0x27')](_0x0a9e('0x62'));_0x5dc978[_0x0a9e('0x122')]=_0x33359a;var _0x465003=ut[_0x0a9e('0x123')](_0x38dceb,_0x5dc978,_0x33359a,_0x38dceb[_0x0a9e('0x83')],_0x26223f);return ami[_0x0a9e('0x124')](_0x465003)[_0x0a9e('0x56')](function(_0x8231e5){_0x5dc978[_0x0a9e('0x2d')]+=0x1;logger[_0x0a9e('0x26')](_0x0a9e('0x125'),_0xe1ab0d,_0x0a9e('0x9e'),_0x5dc978['name'],'originated:\x20',_0x5dc978[_0x0a9e('0x2d')]);_0x24470a(_0x8231e5);})[_0x0a9e('0x5e')](function(_0x52b365){ut['logAgent'](_0x38dceb,0xe,_0x0a9e('0x126'));rpcDb[_0x0a9e('0xdc')](_0x38dceb,_0x0a9e('0x127'));_0x142e53(_0x52b365);});});};Preview['prototype'][_0x0a9e('0x1d')]=function(_0x5b6447){if(this[_0x0a9e('0x13')][_0x5b6447['linkedid']]){this[_0x0a9e('0x13')][_0x5b6447['linkedid']][_0x0a9e('0x4a')]=_0x5b6447[_0x0a9e('0x4a')];}};Preview[_0x0a9e('0xd')]['syncOriginateResponse']=function(_0x316b51){var _0x497fda=this;var _0x505ffd=this[_0x0a9e('0x13')][_0x316b51[_0x0a9e('0x128')]];if(_0x505ffd){if(_0x505ffd[_0x0a9e('0xeb')]&&this[_0x0a9e('0x14')][_0x505ffd[_0x0a9e('0xeb')]]){ut[_0x0a9e('0x129')](_0x505ffd,this[_0x0a9e('0x14')][_0x505ffd[_0x0a9e('0xeb')]][_0x0a9e('0x29')],this[_0x0a9e('0x14')][_0x505ffd[_0x0a9e('0xeb')]]['id']);}var _0x98bf26=_[_0x0a9e('0x12a')](_0x505ffd);_0x98bf26[_0x0a9e('0x12b')]=moment()[_0x0a9e('0x27')](_0x0a9e('0x62'));var _0x310026=_0x497fda[_0x0a9e('0x10')][_0x505ffd[_0x0a9e('0x43')]];if(ut['isFailure'](_0x316b51[_0x0a9e('0x12c')])){if(_0x505ffd[_0x0a9e('0xaa')]){rpcDb[_0x0a9e('0xfe')](_0x505ffd[_0x0a9e('0x85')]);}if(_0x505ffd['activeContact']){rpcDb['disableContact'](_0x505ffd['idContact']);}ami[_0x0a9e('0x25')]('custom:agentringnoanswer',ut[_0x0a9e('0x78')](_0x505ffd,_0x0a9e('0x12d'),this[_0x0a9e('0x10')][_0x505ffd[_0x0a9e('0x43')]]));this[_0x0a9e('0xd5')](_0x98bf26,_0x310026,_0x316b51);}else{_0x505ffd[_0x0a9e('0x61')]=moment()[_0x0a9e('0x27')](_0x0a9e('0x62'));ut[_0x0a9e('0xd9')](_0x98bf26,0x4,_0x0a9e('0x12e'));rpcDb['createAgentHistory'](_0x98bf26,_0x0a9e('0x12f'));}}};Preview['prototype'][_0x0a9e('0x1a')]=function(_0x586d2f){var _0xf4de86=this[_0x0a9e('0x13')][_0x586d2f[_0x0a9e('0x84')]];var _0x556bb7;if(_0xf4de86){_0x556bb7=this[_0x0a9e('0x10')][_0xf4de86[_0x0a9e('0x43')]];logger['info']('[syncHangup][talking]',_0x586d2f[_0x0a9e('0x84')],_0x0a9e('0x9e'),_0x556bb7[_0x0a9e('0x29')],'pTalking:\x20',_0x556bb7['pTalking']);}if(this['actions'][_0x586d2f[_0x0a9e('0x84')]]&&_0x586d2f[_0x0a9e('0x84')]!==_0x586d2f[_0x0a9e('0x91')]){if(_0x586d2f[_0x0a9e('0x130')]==='16'&&this[_0x0a9e('0x13')][_0x586d2f[_0x0a9e('0x84')]][_0x0a9e('0x4d')]){this[_0x0a9e('0x72')](_0x586d2f,_0x586d2f[_0x0a9e('0x84')],_0x586d2f[_0x0a9e('0x130')]);}else if(this[_0x0a9e('0x13')][_0x586d2f[_0x0a9e('0x84')]][_0x0a9e('0x4d')]){logger[_0x0a9e('0x26')](_0x0a9e('0x131'),_0x586d2f[_0x0a9e('0x84')],_0x586d2f[_0x0a9e('0x130')],_0x0a9e('0x9e'),_0x556bb7['name'],_0x0a9e('0x8a'),_0x556bb7[_0x0a9e('0x2e')]);this[_0x0a9e('0x72')](_0x586d2f,_0x586d2f[_0x0a9e('0x84')],_0x586d2f[_0x0a9e('0x130')]);}}else if(_0xf4de86&&_[_0x0a9e('0x41')](_0xf4de86['statedesc'])&&_0x556bb7[_0x0a9e('0x132')]&&_0x586d2f[_0x0a9e('0x84')]===_0x586d2f[_0x0a9e('0x91')]&&_[_0x0a9e('0x41')](_0x586d2f[_0x0a9e('0xd8')])&&_0x586d2f[_0x0a9e('0x130')]==='16'&&_0x586d2f[_0x0a9e('0x133')]==='6'&&_[_0x0a9e('0xd7')](_0xf4de86[_0x0a9e('0x134')])){if(_0xf4de86['unlockAgent']){rpcDb['unlockContact'](_0xf4de86[_0x0a9e('0x85')]);}if(_0xf4de86[_0x0a9e('0x83')]){rpcDb['disableContact'](_0xf4de86[_0x0a9e('0x85')]);}_0x586d2f[_0x0a9e('0xd8')]='22';this['callProgressDetectingAgent'](_0xf4de86,_0x556bb7,_0x586d2f);}else if(_0xf4de86&&_0xf4de86[_0x0a9e('0x134')]){if(_0x586d2f['cause']==='16'&&this[_0x0a9e('0x13')][_0x586d2f[_0x0a9e('0x84')]]['dialAnswer']){logger[_0x0a9e('0x26')](_0x0a9e('0x135'),_0x586d2f['linkedid'],_0x586d2f[_0x0a9e('0x130')],_0x0a9e('0x9e'),_0x556bb7['name'],_0x0a9e('0x8a'),_0x556bb7[_0x0a9e('0x2e')]);this[_0x0a9e('0x72')](_0x586d2f,_0x586d2f[_0x0a9e('0x84')],_0x586d2f[_0x0a9e('0x130')]);}else if(this[_0x0a9e('0x13')][_0x586d2f['linkedid']][_0x0a9e('0x4d')]){logger[_0x0a9e('0x26')]('[syncHangup][talking][cause]',_0x586d2f[_0x0a9e('0x84')],_0x586d2f[_0x0a9e('0x130')],_0x0a9e('0x9e'),_0x556bb7[_0x0a9e('0x29')],_0x0a9e('0x8a'),_0x556bb7[_0x0a9e('0x2e')]);this[_0x0a9e('0x72')](_0x586d2f,_0x586d2f['linkedid'],_0x586d2f['cause']);}}};Preview['prototype']['syncDialEnd']=function(_0x5e9817){if(this[_0x0a9e('0x13')][_0x5e9817[_0x0a9e('0xd4')]]&&_0x5e9817['destlinkedid']!==_0x5e9817['destuniqueid']){this[_0x0a9e('0x72')](_0x5e9817,_0x5e9817['destlinkedid'],_0x5e9817[_0x0a9e('0xcd')]);}};Preview[_0x0a9e('0xd')][_0x0a9e('0x136')]=function(_0x175c97){if(this[_0x0a9e('0x13')][_0x175c97[_0x0a9e('0x84')]]&&_0x175c97['linkedid']!==_0x175c97[_0x0a9e('0x91')]&&!this[_0x0a9e('0x13')][_0x175c97['linkedid']][_0x0a9e('0x4d')]){if(_0x175c97[_0x0a9e('0x130')]==='1'){this[_0x0a9e('0x72')](_0x175c97,_0x175c97[_0x0a9e('0x84')],_0x175c97[_0x0a9e('0x130')]);}}};Preview[_0x0a9e('0xd')][_0x0a9e('0x137')]=function(_0x4a36df,_0x331216,_0x508395){if(this[_0x0a9e('0x13')][_0x4a36df]){if(_[_0x0a9e('0x41')](this['actions'][_0x4a36df][_0x0a9e('0x122')])){this[_0x0a9e('0x13')][_0x4a36df]['variables']={};}this[_0x0a9e('0x13')][_0x4a36df]['variables'][_0x331216]=_0x508395;}};Preview[_0x0a9e('0xd')][_0x0a9e('0x1f')]=function(_0x5d0620){try{if(!_[_0x0a9e('0x41')](_0x5d0620)){if(ut['filterKey'](_[_0x0a9e('0x138')](_0x5d0620[_0x0a9e('0x139')])[0x0])){this[_0x0a9e('0x137')](_0x5d0620[_0x0a9e('0x91')],_[_0x0a9e('0x138')](_0x5d0620[_0x0a9e('0x139')])[0x0],_0x5d0620[_0x0a9e('0x13a')]);}}}catch(_0x53b5c2){logger[_0x0a9e('0x13b')](_0x0a9e('0x13c'),util[_0x0a9e('0x13d')](_0x53b5c2,{'showHidden':![],'depth':null}));}};Preview[_0x0a9e('0xd')][_0x0a9e('0x21')]=function(_0x5932ad){if(_0x5932ad){if(this[_0x0a9e('0x13')][_0x5932ad['transfertargetlinkedid']]){this['actions'][_0x5932ad[_0x0a9e('0x13e')]]['transfer']=!![];}}};Preview[_0x0a9e('0xd')][_0x0a9e('0x23')]=function(_0x58d5fd){if(_0x58d5fd){if(this[_0x0a9e('0x13')][_0x58d5fd[_0x0a9e('0x13f')]]){this[_0x0a9e('0x13')][_0x58d5fd[_0x0a9e('0x13f')]][_0x0a9e('0x134')]=!![];}}};module[_0x0a9e('0x140')]=Preview;
\ No newline at end of file
index 12d192f..3535771 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd16c=['preview','../rpc/cmHopper','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/agentReportPreview','error','inspect','createHistory','catch','resolve','then','[createHistory]\x20','moveContactManagedDialer','checkIsBlackList','[checkIsBlackList]\x20','getContactPreview','[getContactPreview]\x20','createAgentHistory','createCustomerHistory','createCustomerFinal','active','rescheduleContact','countReScheduled','[countReScheduled]\x20','unlockContact','[unlockContact]\x20','[activeContact]\x20','crateCustomerReportQueue','type','uniqueid','calleridnum','calleridname','answertime','queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt','endtime','connectedlinename','context','from-sip','exten','holdtime','assigned','lastAssignedTo','membername','queuecallerexitreason','create','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','rescheduleContactInQueue','[rescheduleContactInQueue]\x20','bluebird','../../../config/logger'];(function(_0x1ca253,_0x53e908){var _0x1aa355=function(_0x1016df){while(--_0x1016df){_0x1ca253['push'](_0x1ca253['shift']());}};_0x1aa355(++_0x53e908);}(_0xd16c,0x142));var _0xcd16=function(_0x5c4f28,_0x27d574){_0x5c4f28=_0x5c4f28-0x0;var _0x3628e3=_0xd16c[_0x5c4f28];return _0x3628e3;};'use strict';var util=require('util');var BPromise=require(_0xcd16('0x0'));var logger=require(_0xcd16('0x1'))(_0xcd16('0x2'));var cmHopper=require(_0xcd16('0x3'));var cmHopperHistory=require(_0xcd16('0x4'));var cmHopperBlack=require(_0xcd16('0x5'));var agentReportPreview=require(_0xcd16('0x6'));var voiceQueueReport=require('../rpc/voiceQueueReport');function loggerCatch(_0xeab8a){return function(_0x5bf48a){logger[_0xcd16('0x7')](_0xeab8a,util[_0xcd16('0x8')](_0x5bf48a,{'showHidden':![],'depth':null}));};}function create(_0x11b4d4){return cmHopperHistory[_0xcd16('0x9')](_0x11b4d4)[_0xcd16('0xa')](loggerCatch('[createHistory]\x20'));}function createAgent(_0x5277ed){return BPromise[_0xcd16('0xb')]()[_0xcd16('0xc')](agentReportPreview[_0xcd16('0x9')](_0x5277ed))[_0xcd16('0xa')](loggerCatch(_0xcd16('0xd')));}function moveContact(_0x3a419e){return cmHopper[_0xcd16('0xe')](_0x3a419e,!![])[_0xcd16('0xa')](loggerCatch('[moveContactManagedDialer]\x20'));}exports[_0xcd16('0xf')]=function(_0x3d8b69){return cmHopperBlack[_0xcd16('0xf')](_0x3d8b69)['catch'](loggerCatch(_0xcd16('0x10')));};exports[_0xcd16('0x11')]=function(_0x91619e){return BPromise[_0xcd16('0xb')]()['then'](cmHopper[_0xcd16('0x11')](_0x91619e))[_0xcd16('0xa')](loggerCatch(_0xcd16('0x12')));};exports['createHistory']=function(_0x278cad,_0x5f334f){create(_0x278cad)[_0xcd16('0xa')](loggerCatch(_0x5f334f));moveContact(_0x278cad)[_0xcd16('0xa')](loggerCatch(_0x5f334f));};exports[_0xcd16('0x13')]=function(_0x1b2f95,_0x2a4ba0){createAgent(_0x1b2f95)['catch'](loggerCatch(_0x2a4ba0));};exports[_0xcd16('0x14')]=function(_0x4ad910,_0x2a33e1){create(_0x4ad910)['catch'](loggerCatch(_0x2a33e1));};exports[_0xcd16('0x15')]=function(_0x2d676b,_0xd6bc18){moveContact(_0x2d676b)[_0xcd16('0xa')](loggerCatch(_0xd6bc18));};exports['rescheduleContact']=function(_0x580b73,_0x49460a,_0x5423e3){if(_0x49460a){_0x580b73['UserId']=null;}if(_0x5423e3){_0x580b73[_0xcd16('0x16')]=![];}return cmHopper[_0xcd16('0x17')](_0x580b73)[_0xcd16('0xa')](loggerCatch('[rescheduleContact]\x20'));};exports[_0xcd16('0x18')]=function(_0x4164ef){return cmHopper[_0xcd16('0x18')](_0x4164ef)['catch'](loggerCatch(_0xcd16('0x19')));};exports['unlockContact']=function(_0x461455){return cmHopper[_0xcd16('0x1a')]({'UserId':null},_0x461455,0x1)[_0xcd16('0xa')](loggerCatch(_0xcd16('0x1b')));};exports['disableContact']=function(_0x99e2d0){return cmHopper[_0xcd16('0x1a')]({'active':![]},_0x99e2d0,0x1)['catch'](loggerCatch(_0xcd16('0x1c')));};exports[_0xcd16('0x1d')]=function(_0x438462){var _0x9542ed={};_0x9542ed['type']=_0x438462[_0xcd16('0x1e')];_0x9542ed[_0xcd16('0x1f')]=_0x438462[_0xcd16('0x1f')];_0x9542ed[_0xcd16('0x20')]=_0x438462[_0xcd16('0x20')];_0x9542ed['calleridname']=_0x438462[_0xcd16('0x21')];_0x9542ed['queue']=_0x438462['queue'];_0x9542ed['queuecallerjoinAt']=_0x438462[_0xcd16('0x22')];_0x9542ed[_0xcd16('0x23')]=_0x438462[_0xcd16('0x22')];_0x9542ed[_0xcd16('0x24')]=0x1;_0x9542ed[_0xcd16('0x25')]=_0x438462[_0xcd16('0x26')];_0x9542ed[_0xcd16('0x27')]=_0x438462['membername'];_0x9542ed[_0xcd16('0x28')]=_0xcd16('0x29');_0x9542ed[_0xcd16('0x2a')]='xcally-motion-preview';_0x9542ed[_0xcd16('0x2b')]=0x0;_0x9542ed[_0xcd16('0x2c')]=0x1;_0x9542ed[_0xcd16('0x2d')]=_0x438462[_0xcd16('0x2e')];_0x9542ed[_0xcd16('0x2f')]='COMPLETED';return BPromise[_0xcd16('0xb')]()[_0xcd16('0xc')](voiceQueueReport[_0xcd16('0x30')](_0x9542ed))[_0xcd16('0xa')](loggerCatch(_0xcd16('0x31')));};exports[_0xcd16('0x32')]=function(_0x53a15d,_0x289998){return BPromise['resolve']()['then'](cmHopper[_0xcd16('0x32')](_0x53a15d,_0x289998))['catch'](loggerCatch(_0xcd16('0x33')));};exports[_0xcd16('0x34')]=function(_0x587125){return cmHopper['rescheduleContact'](_0x587125,!![],!![])[_0xcd16('0xa')](loggerCatch(_0xcd16('0x35')));};
\ No newline at end of file
+var _0xaeba=['bluebird','../../../config/logger','../rpc/cmHopper','../rpc/cmHopperHistory','../rpc/cmHopperBlack','../rpc/agentReportPreview','error','inspect','createHistory','catch','[createHistory]\x20','resolve','then','[moveContactManagedDialer]\x20','checkIsBlackList','getContactPreview','[getContactPreview]\x20','createCustomerHistory','createCustomerFinal','rescheduleContact','active','[rescheduleContact]\x20','countReScheduled','unlockContact','[unlockContact]\x20','disableContact','[activeContact]\x20','crateCustomerReportQueue','type','uniqueid','calleridnum','calleridname','queue','queuecallerjoinAt','queuecallerleaveAt','answertime','queuecallercomplete','queuecallercompleteAt','endtime','connectedlinename','membername','exten','holdtime','assigned','lastAssignedTo','queuecallerexitreason','COMPLETED','create','[voiceQueueReport]\x20','getContactRecallMe','[GetContactRecallMe]\x20','rescheduleContactInQueue','[rescheduleContactInQueue]\x20','util'];(function(_0x9d639c,_0x524dbe){var _0x1671de=function(_0x27888e){while(--_0x27888e){_0x9d639c['push'](_0x9d639c['shift']());}};_0x1671de(++_0x524dbe);}(_0xaeba,0x1e5));var _0xaaeb=function(_0x86ac62,_0x311ef0){_0x86ac62=_0x86ac62-0x0;var _0x4c9b95=_0xaeba[_0x86ac62];return _0x4c9b95;};'use strict';var util=require(_0xaaeb('0x0'));var BPromise=require(_0xaaeb('0x1'));var logger=require(_0xaaeb('0x2'))('preview');var cmHopper=require(_0xaaeb('0x3'));var cmHopperHistory=require(_0xaaeb('0x4'));var cmHopperBlack=require(_0xaaeb('0x5'));var agentReportPreview=require(_0xaaeb('0x6'));var voiceQueueReport=require('../rpc/voiceQueueReport');function loggerCatch(_0x20a62b){return function(_0x1e566a){logger[_0xaaeb('0x7')](_0x20a62b,util[_0xaaeb('0x8')](_0x1e566a,{'showHidden':![],'depth':null}));};}function create(_0x4f60a6){return cmHopperHistory[_0xaaeb('0x9')](_0x4f60a6)[_0xaaeb('0xa')](loggerCatch(_0xaaeb('0xb')));}function createAgent(_0x5cb398){return BPromise[_0xaaeb('0xc')]()[_0xaaeb('0xd')](agentReportPreview[_0xaaeb('0x9')](_0x5cb398))[_0xaaeb('0xa')](loggerCatch(_0xaaeb('0xb')));}function moveContact(_0x2e34fd){return cmHopper['moveContactManagedDialer'](_0x2e34fd,!![])[_0xaaeb('0xa')](loggerCatch(_0xaaeb('0xe')));}exports[_0xaaeb('0xf')]=function(_0x12a2b2){return cmHopperBlack[_0xaaeb('0xf')](_0x12a2b2)['catch'](loggerCatch('[checkIsBlackList]\x20'));};exports[_0xaaeb('0x10')]=function(_0x5253c8){return BPromise[_0xaaeb('0xc')]()['then'](cmHopper[_0xaaeb('0x10')](_0x5253c8))['catch'](loggerCatch(_0xaaeb('0x11')));};exports[_0xaaeb('0x9')]=function(_0x31b862,_0x4720f3){create(_0x31b862)[_0xaaeb('0xa')](loggerCatch(_0x4720f3));moveContact(_0x31b862)[_0xaaeb('0xa')](loggerCatch(_0x4720f3));};exports['createAgentHistory']=function(_0x2bd40d,_0x43b6b6){createAgent(_0x2bd40d)['catch'](loggerCatch(_0x43b6b6));};exports[_0xaaeb('0x12')]=function(_0x56c23d,_0x538f0f){create(_0x56c23d)[_0xaaeb('0xa')](loggerCatch(_0x538f0f));};exports[_0xaaeb('0x13')]=function(_0x3bf25b,_0x4ec19a){moveContact(_0x3bf25b)[_0xaaeb('0xa')](loggerCatch(_0x4ec19a));};exports[_0xaaeb('0x14')]=function(_0x127848,_0x102f14,_0x4f7887){if(_0x102f14){_0x127848['UserId']=null;}if(_0x4f7887){_0x127848[_0xaaeb('0x15')]=![];}return cmHopper[_0xaaeb('0x14')](_0x127848)['catch'](loggerCatch(_0xaaeb('0x16')));};exports[_0xaaeb('0x17')]=function(_0x498e3a){return cmHopper[_0xaaeb('0x17')](_0x498e3a)[_0xaaeb('0xa')](loggerCatch('[countReScheduled]\x20'));};exports['unlockContact']=function(_0x4ba9cf){return cmHopper[_0xaaeb('0x18')]({'UserId':null},_0x4ba9cf,0x1)['catch'](loggerCatch(_0xaaeb('0x19')));};exports[_0xaaeb('0x1a')]=function(_0x44513c){return cmHopper['unlockContact']({'active':![]},_0x44513c,0x1)[_0xaaeb('0xa')](loggerCatch(_0xaaeb('0x1b')));};exports[_0xaaeb('0x1c')]=function(_0x32c072){var _0xb9784b={};_0xb9784b['type']=_0x32c072[_0xaaeb('0x1d')];_0xb9784b[_0xaaeb('0x1e')]=_0x32c072['uniqueid'];_0xb9784b[_0xaaeb('0x1f')]=_0x32c072[_0xaaeb('0x1f')];_0xb9784b[_0xaaeb('0x20')]=_0x32c072[_0xaaeb('0x20')];_0xb9784b[_0xaaeb('0x21')]=_0x32c072[_0xaaeb('0x21')];_0xb9784b[_0xaaeb('0x22')]=_0x32c072['answertime'];_0xb9784b[_0xaaeb('0x23')]=_0x32c072[_0xaaeb('0x24')];_0xb9784b[_0xaaeb('0x25')]=0x1;_0xb9784b[_0xaaeb('0x26')]=_0x32c072[_0xaaeb('0x27')];_0xb9784b[_0xaaeb('0x28')]=_0x32c072[_0xaaeb('0x29')];_0xb9784b['context']='from-sip';_0xb9784b[_0xaaeb('0x2a')]='xcally-motion-preview';_0xb9784b[_0xaaeb('0x2b')]=0x0;_0xb9784b[_0xaaeb('0x2c')]=0x1;_0xb9784b[_0xaaeb('0x2d')]=_0x32c072[_0xaaeb('0x29')];_0xb9784b[_0xaaeb('0x2e')]=_0xaaeb('0x2f');return BPromise[_0xaaeb('0xc')]()[_0xaaeb('0xd')](voiceQueueReport[_0xaaeb('0x30')](_0xb9784b))[_0xaaeb('0xa')](loggerCatch(_0xaaeb('0x31')));};exports[_0xaaeb('0x32')]=function(_0x42ce40,_0x10e3a5){return BPromise[_0xaaeb('0xc')]()['then'](cmHopper['getContactRecallMe'](_0x42ce40,_0x10e3a5))[_0xaaeb('0xa')](loggerCatch(_0xaaeb('0x33')));};exports[_0xaaeb('0x34')]=function(_0x4ed7f6){return cmHopper[_0xaaeb('0x14')](_0x4ed7f6,!![],!![])['catch'](loggerCatch(_0xaaeb('0x35')));};
\ No newline at end of file
index 43ee6cd..2f852fe 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x355e=['format','\x22%s\x22\x20<%s>','isActive','isNil','addVariables','Queue','name','calleridname','calleridnum','ContactId','dialer','VoiceQueueId','dialOriginateTimeout','\x22rtTxX%s%s\x22','dialQueueProject2','dialPreviewUrl','\x22agi://%s/square,%s\x22','dialQueueProject','NONE','originatecalleridname','xcally-motion-preview','Call-Type:\x20PREVIEW','_XCALLY_MIXMONITOR_FORMAT','monitor_format','_XCALLY_MIXMONITOR_UNIQUEID','toLowerVariables','hasOwnProperty','toLower','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','YYYY-MM-DD\x20HH:mm:ss','statedesc','Blacklist','responsetime','endtime','state','getSeconds','starttime','logLookAgent','membername','UserId','logCustomer','talktime','answertime','isFailure','Failure','variablesAction','BOOKED','originate','channelAgent','timeout','totalGlobal','countcongestionretry','countagentrejectretry','countnosuchnumberretry','cloneAction','clone','Global','scheduledat','minutes','ListId','decrementTalkink','pTalking','[decrementTalkink]\x20object\x20talking\x20is\x20negative','IsNotLoggedIn','queue','motionChannel','voice','mandatoryDisposition','buildObj','agentReadyId','status','reachable','push','getDiff','milliseconds','diff','createBody','CampaignId','filterKey','uniqueid','idContact','type','campaigntype','active','countbusyretry','countnoanswerretry','countglobal','callback','callbackat','sipcallid','xmd-voicequeueid','xmd-queue','xmd-listid','xmd-dialtimeout','xmd-dialoptions','xmd-dialid','xmd-dialchannel','xmd-cdrtype','xmd-callerid','xmd-agiafter','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosloss','rtpaudioqosrtt','rtpaudioqosrttbridged','rtpaudioqoslossbridged','bridgepeer','bridgepvtcallid','\x5cw{0,','pow','replace','random','extractCalleridName','match','extractCalleridNumber','keys','variables','toLowerCase','buildNoAnswerEventPayload','util','lodash','moment','../../../../config/logger','preview','XCALLY_IP_AGI','127.0.0.1','../../dialer/utils','loggerCatch','inspect','info','error','message','isUndefined','isEmpty','string'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x355e,0x79));var _0xe355=function(_0x2f651d,_0x7d2f88){_0x2f651d=_0x2f651d-0x0;var _0x249e3b=_0x355e[_0x2f651d];return _0x249e3b;};'use strict';var util=require(_0xe355('0x0'));var _=require(_0xe355('0x1'));var moment=require(_0xe355('0x2'));var logger=require(_0xe355('0x3'))(_0xe355('0x4'));var ipAgi=process['env'][_0xe355('0x5')]||_0xe355('0x6');var utils=require(_0xe355('0x7'));exports[_0xe355('0x8')]=function(_0x27020b){return function(_0x46a7d4){logger['error'](_0x27020b,util[_0xe355('0x9')](_0x46a7d4,{'showHidden':![],'depth':null}));};};exports['logger']=function(_0x4049d5,_0x4404e3){logger[_0xe355('0xa')](_0x4049d5,util[_0xe355('0x9')](_0x4404e3,{'showHidden':![],'depth':null}));};exports['loggerError']=function(_0xb6b489,_0x1a216a){logger[_0xe355('0xb')](_0xb6b489,util[_0xe355('0x9')](_0x1a216a,{'showHidden':![],'depth':null}));};exports['logger2']=function(_0x26632c){return function(_0x1f6867){logger[_0xe355('0xa')](_0x26632c,util[_0xe355('0x9')](_0x1f6867,{'showHidden':![],'depth':null}));};};exports[_0xe355('0xc')]=function(_0x4d1d6c,_0x4ecd0e,_0x659765){return{'message':_0x4d1d6c,'unlock':_0x4ecd0e,'active':_0x659765};};exports['getCallerId']=function(_0x4cb277,_0x2ca2fe,_0x519c1e){if(!_[_0xe355('0xd')](_0x519c1e)&&'string'===typeof _0x519c1e&&!_[_0xe355('0xe')](_0x519c1e)){if(!_['isUndefined'](_0x2ca2fe)&&_0xe355('0xf')===typeof _0x2ca2fe&&!_['isEmpty'](_0x2ca2fe)){return util[_0xe355('0x10')](_0xe355('0x11'),_0x2ca2fe,_0x519c1e);}return util[_0xe355('0x10')]('\x22%s\x22\x20<%s>',_0x519c1e,_0x519c1e);}if(!_[_0xe355('0xd')](_0x4cb277)&&_0xe355('0xf')===typeof _0x4cb277&&!_[_0xe355('0xe')](_0x4cb277)){return _0x4cb277;}return'\x22\x22\x20<>';};exports[_0xe355('0x12')]=function(_0x2f8d6e){if(_[_0xe355('0x13')](_0x2f8d6e)){return![];}return _0x2f8d6e;};exports[_0xe355('0x14')]=function(_0xd39713,_0x2c5312,_0xc45a82,_0x2fd70f,_0x1ed3ec,_0xa37f5a){var _0x48c089={'XMD-QUEUE':_0x2c5312[_0xe355('0x15')]?_0x2c5312[_0xe355('0x15')][_0xe355('0x16')]:'','XMD-CALLERID':_0x2fd70f,'XMD-CALLERID-PREVIEW':_0xa37f5a?util[_0xe355('0x10')]('\x22%s\x22\x20<%s>',_0xa37f5a[_0xe355('0x17')],_0xa37f5a[_0xe355('0x18')]):_0x2fd70f,'XMD-DIALID':_0x1ed3ec,'XMD-CONTACTID':_0x2c5312[_0xe355('0x19')],'XMD-CDRTYPE':_0xe355('0x1a'),'CALLERID(all)':_0x2fd70f,'XMD-VOICEQUEUEID':_0x2c5312[_0xe355('0x1b')],'XMD-DIALCHANNEL':_0xc45a82,'XMD-DIALTIMEOUT':_0xd39713[_0xe355('0x1c')]||0x1e,'XMD-DIALOPTIONS':util[_0xe355('0x10')](_0xe355('0x1d'),_0xd39713[_0xe355('0x1e')]?'g':'',_[_0xe355('0xe')](_0xd39713['monitor_format'])?'':'U(xcally-mixmonitor-context)'),'XMD-DIALURL':_0xd39713[_0xe355('0x1f')]||'','XMD-AGI':_0xd39713['dialQueueProject']?util['format'](_0xe355('0x20'),ipAgi,_0xd39713[_0xe355('0x21')]):'NONE','XMD-AGIAFTER':_0xd39713[_0xe355('0x1e')]?util[_0xe355('0x10')](_0xe355('0x20'),ipAgi,_0xd39713[_0xe355('0x1e')]):_0xe355('0x22'),'XMD-ORIGINATECALLERIDNUM':_0xa37f5a?_0xa37f5a['originatecalleridnum']:'','XMD-ORIGINATECALLERIDNAME':_0xa37f5a?_0xa37f5a[_0xe355('0x23')]:'','XMD-DESTINATION':_0xe355('0x24'),'SIPADDHEADER':_0xe355('0x25')};if(!_[_0xe355('0xe')](_0xd39713['monitor_format'])){_0x48c089[util[_0xe355('0x10')]('%s',_0xe355('0x26'))]=_0xd39713[_0xe355('0x27')];_0x48c089[util[_0xe355('0x10')]('%s',_0xe355('0x28'))]=_0x1ed3ec;}return _0x48c089;};exports[_0xe355('0x29')]=function(_0x43f98c){var _0x1ea8b={};for(var _0x528a3f in _0x43f98c){if(_0x43f98c[_0xe355('0x2a')](_0x528a3f)){_0x1ea8b[util['format']('%s',_[_0xe355('0x2b')](_0x528a3f))]=_0x43f98c[_0x528a3f];}}return{'variables':_0x1ea8b};};exports['updateOriginated']=function(_0x216126,_0x3fef3f){if(!_['isNil'](_0x216126)){if(_0x216126[_0xe355('0x2a')](_0xe355('0x2c'))){if(_0x216126[_0xe355('0x2c')]>0x0){_0x216126[_0xe355('0x2c')]-=0x1;}else{logger[_0xe355('0xb')](_0xe355('0x2d'),_0x3fef3f);}}}else{logger[_0xe355('0xb')]('[updateOriginated]\x20is\x20null\x20or\x20undefined',_0x3fef3f);}};exports['logBlacklist']=function(_0x4bb9e9){var _0x4339d0=moment()['format'](_0xe355('0x2e'));_0x4bb9e9['state']=0xd;_0x4bb9e9[_0xe355('0x2f')]=_0xe355('0x30');_0x4bb9e9['starttime']=_0x4339d0;_0x4bb9e9[_0xe355('0x31')]=_0x4339d0;_0x4bb9e9[_0xe355('0x32')]=_0x4339d0;};exports['logAgent']=function(_0x40f18f,_0x625470,_0x1ff71a){var _0x27edff=moment()['format'](_0xe355('0x2e'));_0x40f18f[_0xe355('0x33')]=_0x625470;_0x40f18f[_0xe355('0x2f')]=_0x1ff71a;_0x40f18f[_0xe355('0x31')]=_0x27edff;_0x40f18f['ringtime']=utils[_0xe355('0x34')](_0x40f18f[_0xe355('0x31')],_0x40f18f[_0xe355('0x35')]);};exports[_0xe355('0x36')]=function(_0x1493be,_0x24e334,_0x4e56bc){_0x1493be[_0xe355('0x37')]=_0x24e334;_0x1493be[_0xe355('0x38')]=_0x4e56bc;};exports[_0xe355('0x39')]=function(_0x10bad7,_0x528851,_0x33e62c){var _0x25e83d=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x10bad7[_0xe355('0x33')]=_0x528851;_0x10bad7[_0xe355('0x2f')]=_0x33e62c;_0x10bad7['responsetime']=_0x10bad7[_0xe355('0x31')]?_0x10bad7[_0xe355('0x31')]:_0x25e83d;_0x10bad7[_0xe355('0x32')]=_0x10bad7['endtime']?_0x10bad7[_0xe355('0x32')]:_0x25e83d;_0x10bad7['ringtime']=utils[_0xe355('0x34')](_0x10bad7[_0xe355('0x31')]||0x0,_0x10bad7['starttime']||0x0);_0x10bad7[_0xe355('0x3a')]=_0x10bad7[_0xe355('0x3b')]?utils[_0xe355('0x34')](_0x10bad7[_0xe355('0x32')],_0x10bad7[_0xe355('0x3b')]):0x0;};exports[_0xe355('0x3c')]=function(_0x22d6d9){return _0x22d6d9===_0xe355('0x3d');};exports[_0xe355('0x3e')]=function(_0xc45467,_0x561c7a,_0x27cfd6,_0x4ea734,_0x5cf605){var _0x29208a=_0x4ea734?'RECALL':_0xc45467[_0xe355('0x17')];_0x29208a=_0x5cf605?_0xe355('0x3f'):_0x29208a;return{'actionid':_0xc45467['uniqueid'],'action':_0xe355('0x40'),'channel':_0xc45467[_0xe355('0x41')],'callerid':util[_0xe355('0x10')](_0xe355('0x11'),_0x29208a,_0xc45467['calleridnum']),'Exten':'xcally-motion-preview','Context':'from-sip','Priority':'1','variable':_0x27cfd6,'timeout':(_0x561c7a[_0xe355('0x42')]||0x1e)*0x3e8,'async':!![],'channelid':_0xc45467['uniqueid']};};exports[_0xe355('0x43')]=function(_0x2b8653){return _0x2b8653['countbusyretry']+_0x2b8653[_0xe355('0x44')]+_0x2b8653['countnoanswerretry']+_0x2b8653[_0xe355('0x45')]+_0x2b8653[_0xe355('0x46')];};exports[_0xe355('0x47')]=function(_0x2ee764){var _0x2e023=_[_0xe355('0x48')](_0x2ee764);_0x2e023['state']=0xf;_0x2e023[_0xe355('0x2f')]=_0xe355('0x49');return _0x2e023;};exports['scheduledAt']=function(_0x1cfdfc,_0x190eaa,_0x47144b){var _0x3e9dca={};_0x3e9dca[_0x190eaa]=_0x1cfdfc[_0x190eaa];_0x3e9dca['active']=![];_0x3e9dca[_0xe355('0x4a')]=moment()['add'](_0x47144b,_0xe355('0x4b'))[_0xe355('0x10')](_0xe355('0x2e'));_0x3e9dca[_0xe355('0x19')]=_0x1cfdfc[_0xe355('0x19')];_0x3e9dca[_0xe355('0x4c')]=_0x1cfdfc['ListId'];_0x3e9dca['VoiceQueueId']=_0x1cfdfc[_0xe355('0x1b')]||undefined;return _0x3e9dca;};exports[_0xe355('0x4d')]=function(_0x2421df,_0x2ac799){if(!_[_0xe355('0x13')](_0x2421df)){if(_0x2421df[_0xe355('0x4e')]>0x0){_0x2421df[_0xe355('0x4e')]-=0x1;}else{logger[_0xe355('0xb')](_0x2ac799,_0xe355('0x4f'));}}else{logger[_0xe355('0xb')](_0x2ac799,'[decrementTalkink]\x20is\x20null\x20or\x20undefined');}};exports[_0xe355('0x50')]=function(_0x1dea36){if(_0x1dea36<=0x0){return!![];}return![];};function buildObj(_0x25d626,_0x50df69,_0x1c6b0b){_0x25d626['lastevent']=_0x50df69;_0x25d626[_0xe355('0x16')]=_0x25d626[_0xe355('0x51')];_0x25d626['interface']=_0x25d626['channelAgent'];_0x25d626[_0xe355('0x52')]=_0xe355('0x53');if(_0x1c6b0b){_0x25d626[_0xe355('0x54')]=_0x1c6b0b['mandatoryDisposition'];}return _0x25d626;}exports[_0xe355('0x55')]=buildObj;exports[_0xe355('0x56')]=function(_0xd6724){var _0x40bfd9=[];for(var _0x2906ff in _0xd6724){if(_0xd6724[_0xe355('0x2a')](_0x2906ff)){if(!_[_0xe355('0x13')](_0xd6724[_0x2906ff])&&_0xd6724[_0x2906ff][_0xe355('0x33')]==='not_inuse'&&_0xd6724[_0x2906ff][_0xe355('0x57')]===_0xe355('0x58')){_0x40bfd9[_0xe355('0x59')](_0xd6724[_0x2906ff]['id']);}}}return _0x40bfd9;};exports[_0xe355('0x5a')]=function(_0x151f28){var _0x53f4ac=moment()[_0xe355('0x5b')](0x0);var _0x5baa64=moment(_0x151f28)[_0xe355('0x5b')](0x0);return _0x53f4ac[_0xe355('0x5c')](_0x5baa64,'seconds');};exports[_0xe355('0x5d')]=function(_0x4bb993){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x4bb993['ContactId'],'ListId':_0x4bb993['ListId'],'VoiceQueueId':_0x4bb993[_0xe355('0x1b')]||undefined,'CampaignId':_0x4bb993[_0xe355('0x5e')]||undefined};};exports[_0xe355('0x5f')]=function(_0x34d77a){if(_0x34d77a===_0xe355('0x60')||_0x34d77a===_0xe355('0x61')||_0x34d77a===_0xe355('0x51')||_0x34d77a===_0xe355('0x62')||_0x34d77a===_0xe355('0x63')||_0x34d77a==='dialAnswer'||_0x34d77a===_0xe355('0x37')||_0x34d77a===_0xe355('0x41')||_0x34d77a===_0xe355('0x17')||_0x34d77a===_0xe355('0x64')||_0x34d77a===_0xe355('0x18')||_0x34d77a===_0xe355('0x4a')||_0x34d77a===_0xe355('0x65')||_0x34d77a===_0xe355('0x44')||_0x34d77a===_0xe355('0x66')||_0x34d77a===_0xe355('0x67')||_0x34d77a===_0xe355('0x68')||_0x34d77a==='callbackuniqueid'||_0x34d77a===_0xe355('0x69')||_0x34d77a==='recallme'||_0x34d77a===_0xe355('0x19')||_0x34d77a==='ListId'||_0x34d77a===_0xe355('0x38')||_0x34d77a===_0xe355('0x1b')||_0x34d77a===_0xe355('0x6a')||_0x34d77a===_0xe355('0x6b')||_0x34d77a===_0xe355('0x6c')||_0x34d77a==='xmd-phone'||_0x34d77a===_0xe355('0x6d')||_0x34d77a==='xmd-dialurl'||_0x34d77a===_0xe355('0x6e')||_0x34d77a===_0xe355('0x6f')||_0x34d77a===_0xe355('0x70')||_0x34d77a===_0xe355('0x71')||_0x34d77a==='xmd-contactid'||_0x34d77a===_0xe355('0x72')||_0x34d77a===_0xe355('0x73')||_0x34d77a===_0xe355('0x74')||_0x34d77a==='xmd-agi'||_0x34d77a===_0xe355('0x75')||_0x34d77a===_0xe355('0x76')||_0x34d77a===_0xe355('0x77')||_0x34d77a==='rtpaudioqosjitterbridged'||_0x34d77a===_0xe355('0x78')||_0x34d77a==='rtpaudioqoslossbridged'||_0x34d77a===_0xe355('0x79')||_0x34d77a===_0xe355('0x7a')||_0x34d77a===_0xe355('0x75')||_0x34d77a===_0xe355('0x76')||_0x34d77a===_0xe355('0x77')||_0x34d77a==='rtpaudioqosjitterbridged'||_0x34d77a==='rtpaudioqosloss'||_0x34d77a===_0xe355('0x7b')||_0x34d77a==='rtpaudioqosrtt'||_0x34d77a===_0xe355('0x7a')||_0x34d77a===_0xe355('0x7c')||_0x34d77a===_0xe355('0x7d')||_0x34d77a===_0xe355('0x33')||_0x34d77a===_0xe355('0x2f')){return![];}return!![];};exports['getCallerIdRandom']=function(_0x330d90,_0x4137dc){var _0x5402cb,_0x4cb392,_0x53a8fd;if(_0x4137dc<=0x0){_0x4137dc=0x1;}_0x5402cb=new RegExp(_0xe355('0x7e')+_0x4137dc+'}$');_0x4cb392=Math['pow'](0xa,_0x4137dc-0x1);_0x53a8fd=Math[_0xe355('0x7f')](0xa,_0x4137dc)-0x1;return util['format']('%s',_[_0xe355('0x80')](_0x330d90,_0x5402cb,_[_0xe355('0x81')](_0x4cb392,_0x53a8fd)));};exports[_0xe355('0x82')]=function(_0x5df145){var _0x304ed2=_0x5df145[_0xe355('0x83')](/"(.*?)"/);return _0x304ed2?_0x304ed2[0x1]:_0x5df145;};exports[_0xe355('0x84')]=function(_0x20dccb){var _0x3c9138=_0x20dccb[_0xe355('0x83')](/<(.*?)>/);return _0x3c9138?_0x3c9138[0x1]:_0x20dccb;};function buildNoAnswerEventPayload(_0x3d8d0e,_0xd3fb36){var _0x2e628c=buildObj(_0x3d8d0e,'noanswer');if(!_[_0xe355('0xe')](_0xd3fb36['variables'])){Object[_0xe355('0x85')](_0xd3fb36[_0xe355('0x86')])['forEach'](function(_0x45cb7f){_0x2e628c[_0x45cb7f[_0xe355('0x87')]()]=_0xd3fb36[_0xe355('0x86')][_0x45cb7f];});}return _0x2e628c;}exports[_0xe355('0x88')]=buildNoAnswerEventPayload;
\ No newline at end of file
+var _0x64ec=['monitor_format','dialPreviewUrl','dialQueueProject','\x22agi://%s/square,%s\x22','NONE','originatecalleridnum','originatecalleridname','xcally-motion-preview','Call-Type:\x20PREVIEW','_XCALLY_MIXMONITOR_FORMAT','hasOwnProperty','toLower','updateOriginated','originated','[updateOriginated]\x20object\x20originated\x20is\x20negative','[updateOriginated]\x20is\x20null\x20or\x20undefined','logBlacklist','state','statedesc','Blacklist','endtime','logAgent','YYYY-MM-DD\x20HH:mm:ss','responsetime','ringtime','getSeconds','starttime','logLookAgent','membername','UserId','logCustomer','talktime','answertime','isFailure','RECALL','uniqueid','originate','channelAgent','from-sip','timeout','totalGlobal','countbusyretry','countcongestionretry','countnoanswerretry','countagentrejectretry','cloneAction','Global','scheduledAt','active','scheduledat','add','minutes','ContactId','ListId','VoiceQueueId','decrementTalkink','pTalking','[decrementTalkink]\x20object\x20talking\x20is\x20negative','IsNotLoggedIn','lastevent','interface','motionChannel','voice','mandatoryDisposition','buildObj','agentReadyId','not_inuse','status','push','getDiff','milliseconds','diff','seconds','CampaignId','filterKey','queue','dialAnswer','countglobal','callback','callbackuniqueid','callbackat','recallme','xmd-voicequeueid','xmd-queue','xmd-listid','xmd-dialtimeout','xmd-dialoptions','xmd-dialchannel','xmd-cdrtype','xmd-agi','rtpaudioqos','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosbridged','rtpaudioqosrttbridged','bridgepeer','bridgepvtcallid','getCallerIdRandom','\x5cw{0,','pow','replace','random','extractCalleridName','match','extractCalleridNumber','noanswer','keys','variables','forEach','buildNoAnswerEventPayload','util','lodash','moment','../../../../config/logger','preview','env','XCALLY_IP_AGI','127.0.0.1','../../dialer/utils','loggerCatch','error','inspect','logger2','info','message','getCallerId','isUndefined','string','isEmpty','\x22\x22\x20<>','isActive','isNil','Queue','name','\x22%s\x22\x20<%s>','calleridname','calleridnum','dialer','dialOriginateTimeout','format','dialQueueProject2'];(function(_0x31b9cf,_0x1a809b){var _0x357b8a=function(_0x50a273){while(--_0x50a273){_0x31b9cf['push'](_0x31b9cf['shift']());}};_0x357b8a(++_0x1a809b);}(_0x64ec,0x191));var _0xc64e=function(_0x2f7727,_0x3942dd){_0x2f7727=_0x2f7727-0x0;var _0x18a9d6=_0x64ec[_0x2f7727];return _0x18a9d6;};'use strict';var util=require(_0xc64e('0x0'));var _=require(_0xc64e('0x1'));var moment=require(_0xc64e('0x2'));var logger=require(_0xc64e('0x3'))(_0xc64e('0x4'));var ipAgi=process[_0xc64e('0x5')][_0xc64e('0x6')]||_0xc64e('0x7');var utils=require(_0xc64e('0x8'));exports[_0xc64e('0x9')]=function(_0x557604){return function(_0x4a1504){logger[_0xc64e('0xa')](_0x557604,util[_0xc64e('0xb')](_0x4a1504,{'showHidden':![],'depth':null}));};};exports['logger']=function(_0x2d66cf,_0x4d4c24){logger['info'](_0x2d66cf,util[_0xc64e('0xb')](_0x4d4c24,{'showHidden':![],'depth':null}));};exports['loggerError']=function(_0x3d6860,_0x436a2d){logger[_0xc64e('0xa')](_0x3d6860,util['inspect'](_0x436a2d,{'showHidden':![],'depth':null}));};exports[_0xc64e('0xc')]=function(_0x59d763){return function(_0x1ebbe6){logger[_0xc64e('0xd')](_0x59d763,util['inspect'](_0x1ebbe6,{'showHidden':![],'depth':null}));};};exports[_0xc64e('0xe')]=function(_0x5e99f9,_0x114690,_0x3ca226){return{'message':_0x5e99f9,'unlock':_0x114690,'active':_0x3ca226};};exports[_0xc64e('0xf')]=function(_0x5ef8fe,_0xb42bc6,_0xa8421f){if(!_[_0xc64e('0x10')](_0xa8421f)&&_0xc64e('0x11')===typeof _0xa8421f&&!_[_0xc64e('0x12')](_0xa8421f)){if(!_['isUndefined'](_0xb42bc6)&&_0xc64e('0x11')===typeof _0xb42bc6&&!_[_0xc64e('0x12')](_0xb42bc6)){return util['format']('\x22%s\x22\x20<%s>',_0xb42bc6,_0xa8421f);}return util['format']('\x22%s\x22\x20<%s>',_0xa8421f,_0xa8421f);}if(!_[_0xc64e('0x10')](_0x5ef8fe)&&_0xc64e('0x11')===typeof _0x5ef8fe&&!_[_0xc64e('0x12')](_0x5ef8fe)){return _0x5ef8fe;}return _0xc64e('0x13');};exports[_0xc64e('0x14')]=function(_0xc244b2){if(_[_0xc64e('0x15')](_0xc244b2)){return![];}return _0xc244b2;};exports['addVariables']=function(_0x44e3da,_0x500ebd,_0x3d824c,_0x387bce,_0x54a049,_0x5a4998){var _0x599170={'XMD-QUEUE':_0x500ebd['Queue']?_0x500ebd[_0xc64e('0x16')][_0xc64e('0x17')]:'','XMD-CALLERID':_0x387bce,'XMD-CALLERID-PREVIEW':_0x5a4998?util['format'](_0xc64e('0x18'),_0x5a4998[_0xc64e('0x19')],_0x5a4998[_0xc64e('0x1a')]):_0x387bce,'XMD-DIALID':_0x54a049,'XMD-CONTACTID':_0x500ebd['ContactId'],'XMD-CDRTYPE':_0xc64e('0x1b'),'CALLERID(all)':_0x387bce,'XMD-VOICEQUEUEID':_0x500ebd['VoiceQueueId'],'XMD-DIALCHANNEL':_0x3d824c,'XMD-DIALTIMEOUT':_0x44e3da[_0xc64e('0x1c')]||0x1e,'XMD-DIALOPTIONS':util[_0xc64e('0x1d')]('\x22rtTxX%s%s\x22',_0x44e3da[_0xc64e('0x1e')]?'g':'',_[_0xc64e('0x12')](_0x44e3da[_0xc64e('0x1f')])?'':'U(xcally-mixmonitor-context)'),'XMD-DIALURL':_0x44e3da[_0xc64e('0x20')]||'','XMD-AGI':_0x44e3da[_0xc64e('0x21')]?util[_0xc64e('0x1d')]('\x22agi://%s/square,%s\x22',ipAgi,_0x44e3da[_0xc64e('0x21')]):'NONE','XMD-AGIAFTER':_0x44e3da[_0xc64e('0x1e')]?util[_0xc64e('0x1d')](_0xc64e('0x22'),ipAgi,_0x44e3da['dialQueueProject2']):_0xc64e('0x23'),'XMD-ORIGINATECALLERIDNUM':_0x5a4998?_0x5a4998[_0xc64e('0x24')]:'','XMD-ORIGINATECALLERIDNAME':_0x5a4998?_0x5a4998[_0xc64e('0x25')]:'','XMD-DESTINATION':_0xc64e('0x26'),'SIPADDHEADER':_0xc64e('0x27')};if(!_['isEmpty'](_0x44e3da[_0xc64e('0x1f')])){_0x599170[util[_0xc64e('0x1d')]('%s',_0xc64e('0x28'))]=_0x44e3da[_0xc64e('0x1f')];_0x599170[util[_0xc64e('0x1d')]('%s','_XCALLY_MIXMONITOR_UNIQUEID')]=_0x54a049;}return _0x599170;};exports['toLowerVariables']=function(_0x3176c7){var _0xadf225={};for(var _0x46c8b7 in _0x3176c7){if(_0x3176c7[_0xc64e('0x29')](_0x46c8b7)){_0xadf225[util[_0xc64e('0x1d')]('%s',_[_0xc64e('0x2a')](_0x46c8b7))]=_0x3176c7[_0x46c8b7];}}return{'variables':_0xadf225};};exports[_0xc64e('0x2b')]=function(_0x3920b5,_0xde42e0){if(!_[_0xc64e('0x15')](_0x3920b5)){if(_0x3920b5[_0xc64e('0x29')](_0xc64e('0x2c'))){if(_0x3920b5[_0xc64e('0x2c')]>0x0){_0x3920b5[_0xc64e('0x2c')]-=0x1;}else{logger[_0xc64e('0xa')](_0xc64e('0x2d'),_0xde42e0);}}}else{logger[_0xc64e('0xa')](_0xc64e('0x2e'),_0xde42e0);}};exports[_0xc64e('0x2f')]=function(_0x5477e2){var _0x41f751=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x5477e2[_0xc64e('0x30')]=0xd;_0x5477e2[_0xc64e('0x31')]=_0xc64e('0x32');_0x5477e2['starttime']=_0x41f751;_0x5477e2['responsetime']=_0x41f751;_0x5477e2[_0xc64e('0x33')]=_0x41f751;};exports[_0xc64e('0x34')]=function(_0x34f659,_0x4d3b53,_0xadf4a0){var _0xaed1ce=moment()[_0xc64e('0x1d')](_0xc64e('0x35'));_0x34f659[_0xc64e('0x30')]=_0x4d3b53;_0x34f659['statedesc']=_0xadf4a0;_0x34f659[_0xc64e('0x36')]=_0xaed1ce;_0x34f659[_0xc64e('0x37')]=utils[_0xc64e('0x38')](_0x34f659[_0xc64e('0x36')],_0x34f659[_0xc64e('0x39')]);};exports[_0xc64e('0x3a')]=function(_0x220d8d,_0x1d627a,_0x203889){_0x220d8d[_0xc64e('0x3b')]=_0x1d627a;_0x220d8d[_0xc64e('0x3c')]=_0x203889;};exports[_0xc64e('0x3d')]=function(_0x36aae5,_0x2514ab,_0xf15110){var _0x54da07=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x36aae5[_0xc64e('0x30')]=_0x2514ab;_0x36aae5[_0xc64e('0x31')]=_0xf15110;_0x36aae5['responsetime']=_0x36aae5[_0xc64e('0x36')]?_0x36aae5[_0xc64e('0x36')]:_0x54da07;_0x36aae5[_0xc64e('0x33')]=_0x36aae5[_0xc64e('0x33')]?_0x36aae5[_0xc64e('0x33')]:_0x54da07;_0x36aae5['ringtime']=utils['getSeconds'](_0x36aae5[_0xc64e('0x36')]||0x0,_0x36aae5[_0xc64e('0x39')]||0x0);_0x36aae5[_0xc64e('0x3e')]=_0x36aae5[_0xc64e('0x3f')]?utils[_0xc64e('0x38')](_0x36aae5[_0xc64e('0x33')],_0x36aae5[_0xc64e('0x3f')]):0x0;};exports[_0xc64e('0x40')]=function(_0x2126e5){return _0x2126e5==='Failure';};exports['variablesAction']=function(_0x181df6,_0x5a3c81,_0x163658,_0x494e08,_0x55ed36){var _0x41348d=_0x494e08?_0xc64e('0x41'):_0x181df6['calleridname'];_0x41348d=_0x55ed36?'BOOKED':_0x41348d;return{'actionid':_0x181df6[_0xc64e('0x42')],'action':_0xc64e('0x43'),'channel':_0x181df6[_0xc64e('0x44')],'callerid':util['format'](_0xc64e('0x18'),_0x41348d,_0x181df6[_0xc64e('0x1a')]),'Exten':'xcally-motion-preview','Context':_0xc64e('0x45'),'Priority':'1','variable':_0x163658,'timeout':(_0x5a3c81[_0xc64e('0x46')]||0x1e)*0x3e8,'async':!![],'channelid':_0x181df6[_0xc64e('0x42')]};};exports[_0xc64e('0x47')]=function(_0x2323ba){return _0x2323ba[_0xc64e('0x48')]+_0x2323ba[_0xc64e('0x49')]+_0x2323ba[_0xc64e('0x4a')]+_0x2323ba[_0xc64e('0x4b')]+_0x2323ba['countnosuchnumberretry'];};exports[_0xc64e('0x4c')]=function(_0x111635){var _0x43bc72=_['clone'](_0x111635);_0x43bc72[_0xc64e('0x30')]=0xf;_0x43bc72[_0xc64e('0x31')]=_0xc64e('0x4d');return _0x43bc72;};exports[_0xc64e('0x4e')]=function(_0x2b7b41,_0x4cf747,_0x1bd507){var _0x1543ce={};_0x1543ce[_0x4cf747]=_0x2b7b41[_0x4cf747];_0x1543ce[_0xc64e('0x4f')]=![];_0x1543ce[_0xc64e('0x50')]=moment()[_0xc64e('0x51')](_0x1bd507,_0xc64e('0x52'))[_0xc64e('0x1d')]('YYYY-MM-DD\x20HH:mm:ss');_0x1543ce[_0xc64e('0x53')]=_0x2b7b41['ContactId'];_0x1543ce['ListId']=_0x2b7b41[_0xc64e('0x54')];_0x1543ce[_0xc64e('0x55')]=_0x2b7b41['VoiceQueueId']||undefined;return _0x1543ce;};exports[_0xc64e('0x56')]=function(_0x55cfc6,_0x11ac68){if(!_[_0xc64e('0x15')](_0x55cfc6)){if(_0x55cfc6[_0xc64e('0x57')]>0x0){_0x55cfc6[_0xc64e('0x57')]-=0x1;}else{logger['error'](_0x11ac68,_0xc64e('0x58'));}}else{logger[_0xc64e('0xa')](_0x11ac68,'[decrementTalkink]\x20is\x20null\x20or\x20undefined');}};exports[_0xc64e('0x59')]=function(_0x447987){if(_0x447987<=0x0){return!![];}return![];};function buildObj(_0x405dda,_0x5d1255,_0x4310a2){_0x405dda[_0xc64e('0x5a')]=_0x5d1255;_0x405dda[_0xc64e('0x17')]=_0x405dda['queue'];_0x405dda[_0xc64e('0x5b')]=_0x405dda['channelAgent'];_0x405dda[_0xc64e('0x5c')]=_0xc64e('0x5d');if(_0x4310a2){_0x405dda[_0xc64e('0x5e')]=_0x4310a2[_0xc64e('0x5e')];}return _0x405dda;}exports[_0xc64e('0x5f')]=buildObj;exports[_0xc64e('0x60')]=function(_0x3f5620){var _0x6bb99c=[];for(var _0x53a8b2 in _0x3f5620){if(_0x3f5620[_0xc64e('0x29')](_0x53a8b2)){if(!_[_0xc64e('0x15')](_0x3f5620[_0x53a8b2])&&_0x3f5620[_0x53a8b2]['state']===_0xc64e('0x61')&&_0x3f5620[_0x53a8b2][_0xc64e('0x62')]==='reachable'){_0x6bb99c[_0xc64e('0x63')](_0x3f5620[_0x53a8b2]['id']);}}}return _0x6bb99c;};exports[_0xc64e('0x64')]=function(_0x4cd099){var _0x27f382=moment()[_0xc64e('0x65')](0x0);var _0xeadcc5=moment(_0x4cd099)[_0xc64e('0x65')](0x0);return _0x27f382[_0xc64e('0x66')](_0xeadcc5,_0xc64e('0x67'));};exports['createBody']=function(_0x135682){return{'active':![],'recallme':![],'UserId':null,'ContactId':_0x135682[_0xc64e('0x53')],'ListId':_0x135682[_0xc64e('0x54')],'VoiceQueueId':_0x135682[_0xc64e('0x55')]||undefined,'CampaignId':_0x135682[_0xc64e('0x68')]||undefined};};exports[_0xc64e('0x69')]=function(_0x18cc2a){if(_0x18cc2a===_0xc64e('0x42')||_0x18cc2a==='idContact'||_0x18cc2a===_0xc64e('0x6a')||_0x18cc2a==='type'||_0x18cc2a==='campaigntype'||_0x18cc2a===_0xc64e('0x6b')||_0x18cc2a==='membername'||_0x18cc2a===_0xc64e('0x44')||_0x18cc2a===_0xc64e('0x19')||_0x18cc2a==='active'||_0x18cc2a==='calleridnum'||_0x18cc2a===_0xc64e('0x50')||_0x18cc2a===_0xc64e('0x48')||_0x18cc2a==='countcongestionretry'||_0x18cc2a==='countnoanswerretry'||_0x18cc2a===_0xc64e('0x6c')||_0x18cc2a===_0xc64e('0x6d')||_0x18cc2a===_0xc64e('0x6e')||_0x18cc2a===_0xc64e('0x6f')||_0x18cc2a===_0xc64e('0x70')||_0x18cc2a===_0xc64e('0x53')||_0x18cc2a===_0xc64e('0x54')||_0x18cc2a===_0xc64e('0x3c')||_0x18cc2a===_0xc64e('0x55')||_0x18cc2a==='sipcallid'||_0x18cc2a===_0xc64e('0x71')||_0x18cc2a===_0xc64e('0x72')||_0x18cc2a==='xmd-phone'||_0x18cc2a===_0xc64e('0x73')||_0x18cc2a==='xmd-dialurl'||_0x18cc2a===_0xc64e('0x74')||_0x18cc2a===_0xc64e('0x75')||_0x18cc2a==='xmd-dialid'||_0x18cc2a===_0xc64e('0x76')||_0x18cc2a==='xmd-contactid'||_0x18cc2a===_0xc64e('0x77')||_0x18cc2a==='xmd-callerid'||_0x18cc2a==='xmd-agiafter'||_0x18cc2a===_0xc64e('0x78')||_0x18cc2a===_0xc64e('0x79')||_0x18cc2a==='rtpaudioqosbridged'||_0x18cc2a===_0xc64e('0x7a')||_0x18cc2a===_0xc64e('0x7b')||_0x18cc2a===_0xc64e('0x7c')||_0x18cc2a===_0xc64e('0x7d')||_0x18cc2a===_0xc64e('0x7e')||_0x18cc2a==='rtpaudioqosrttbridged'||_0x18cc2a==='rtpaudioqos'||_0x18cc2a===_0xc64e('0x7f')||_0x18cc2a===_0xc64e('0x7a')||_0x18cc2a===_0xc64e('0x7b')||_0x18cc2a===_0xc64e('0x7c')||_0x18cc2a===_0xc64e('0x7d')||_0x18cc2a===_0xc64e('0x7e')||_0x18cc2a===_0xc64e('0x80')||_0x18cc2a===_0xc64e('0x81')||_0x18cc2a===_0xc64e('0x82')||_0x18cc2a===_0xc64e('0x30')||_0x18cc2a===_0xc64e('0x31')){return![];}return!![];};exports[_0xc64e('0x83')]=function(_0x220dd0,_0xcddd02){var _0x14dd01,_0x25a24a,_0x5ab2eb;if(_0xcddd02<=0x0){_0xcddd02=0x1;}_0x14dd01=new RegExp(_0xc64e('0x84')+_0xcddd02+'}$');_0x25a24a=Math[_0xc64e('0x85')](0xa,_0xcddd02-0x1);_0x5ab2eb=Math[_0xc64e('0x85')](0xa,_0xcddd02)-0x1;return util[_0xc64e('0x1d')]('%s',_[_0xc64e('0x86')](_0x220dd0,_0x14dd01,_[_0xc64e('0x87')](_0x25a24a,_0x5ab2eb)));};exports[_0xc64e('0x88')]=function(_0x2225cd){var _0x2ac396=_0x2225cd[_0xc64e('0x89')](/"(.*?)"/);return _0x2ac396?_0x2ac396[0x1]:_0x2225cd;};exports[_0xc64e('0x8a')]=function(_0x107bab){var _0x50b7ca=_0x107bab[_0xc64e('0x89')](/<(.*?)>/);return _0x50b7ca?_0x50b7ca[0x1]:_0x107bab;};function buildNoAnswerEventPayload(_0x24eaba,_0x33ef38){var _0x40f59b=buildObj(_0x24eaba,_0xc64e('0x8b'));if(!_[_0xc64e('0x12')](_0x33ef38['variables'])){Object[_0xc64e('0x8c')](_0x33ef38[_0xc64e('0x8d')])[_0xc64e('0x8e')](function(_0x1445d0){_0x40f59b[_0x1445d0['toLowerCase']()]=_0x33ef38[_0xc64e('0x8d')][_0x1445d0];});}return _0x40f59b;}exports[_0xc64e('0x8f')]=buildNoAnswerEventPayload;
\ No newline at end of file
index 3c73e4a..d667fdd 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x82a5=['voicechannel','voicequeuechannelredirect','string','number','boolean','queueremove','queuepause','reload','voicequeuechannel'];(function(_0x3b4585,_0x16a9c2){var _0x551be9=function(_0x5cea93){while(--_0x5cea93){_0x3b4585['push'](_0x3b4585['shift']());}};_0x551be9(++_0x16a9c2);}(_0x82a5,0x6e));var _0x582a=function(_0xba82a,_0x3e1a7c){_0xba82a=_0xba82a-0x0;var _0x2a397b=_0x82a5[_0xba82a];return _0x2a397b;};'use strict';exports['queueadd']={'queue':{'type':_0x582a('0x0'),'required':!![]},'interface':{'type':_0x582a('0x0'),'required':!![]},'membername':{'type':_0x582a('0x0'),'required':!![]},'penalty':{'type':_0x582a('0x1'),'required':![]},'paused':{'type':_0x582a('0x2'),'required':![]}};exports[_0x582a('0x3')]={'queue':{'type':_0x582a('0x0'),'required':!![]},'interface':{'type':_0x582a('0x0'),'required':!![]}};exports[_0x582a('0x4')]={'interface':{'type':_0x582a('0x0'),'required':!![]},'paused':{'type':_0x582a('0x2')},'reason':{'type':_0x582a('0x0'),'required':![]}};exports[_0x582a('0x5')]={'module':{'type':_0x582a('0x0'),'required':![]}};exports[_0x582a('0x6')]={'uniqueid':{'type':'string','required':!![]}};exports[_0x582a('0x7')]={'uniqueid':{'type':_0x582a('0x0'),'required':!![]},'filename':{'type':'string'},'format':{'type':_0x582a('0x0')},'mixmonitorid':{'type':_0x582a('0x0')}};exports['voicequeuechannelhangup']={'uniqueid':{'type':_0x582a('0x0'),'required':!![]}};exports[_0x582a('0x8')]={'uniqueid':{'type':_0x582a('0x0'),'required':!![]},'exten':{'type':_0x582a('0x0'),'required':!![]},'context':{'type':_0x582a('0x0')}};
\ No newline at end of file
+var _0x7bc7=['boolean','queueremove','reload','voicequeuechannel','voicechannel','voicequeuechannelhangup','voicequeuechannelredirect','queueadd','string','number'];(function(_0x247fec,_0x39eec9){var _0x256b44=function(_0x12e9ec){while(--_0x12e9ec){_0x247fec['push'](_0x247fec['shift']());}};_0x256b44(++_0x39eec9);}(_0x7bc7,0x115));var _0x77bc=function(_0x3a6b50,_0xc56597){_0x3a6b50=_0x3a6b50-0x0;var _0x45755c=_0x7bc7[_0x3a6b50];return _0x45755c;};'use strict';exports[_0x77bc('0x0')]={'queue':{'type':'string','required':!![]},'interface':{'type':_0x77bc('0x1'),'required':!![]},'membername':{'type':_0x77bc('0x1'),'required':!![]},'penalty':{'type':_0x77bc('0x2'),'required':![]},'paused':{'type':_0x77bc('0x3'),'required':![]}};exports[_0x77bc('0x4')]={'queue':{'type':_0x77bc('0x1'),'required':!![]},'interface':{'type':_0x77bc('0x1'),'required':!![]}};exports['queuepause']={'interface':{'type':_0x77bc('0x1'),'required':!![]},'paused':{'type':_0x77bc('0x3')},'reason':{'type':_0x77bc('0x1'),'required':![]}};exports[_0x77bc('0x5')]={'module':{'type':_0x77bc('0x1'),'required':![]}};exports[_0x77bc('0x6')]={'uniqueid':{'type':_0x77bc('0x1'),'required':!![]}};exports[_0x77bc('0x7')]={'uniqueid':{'type':_0x77bc('0x1'),'required':!![]},'filename':{'type':_0x77bc('0x1')},'format':{'type':_0x77bc('0x1')},'mixmonitorid':{'type':_0x77bc('0x1')}};exports[_0x77bc('0x8')]={'uniqueid':{'type':_0x77bc('0x1'),'required':!![]}};exports[_0x77bc('0x9')]={'uniqueid':{'type':_0x77bc('0x1'),'required':!![]},'exten':{'type':_0x77bc('0x1'),'required':!![]},'context':{'type':_0x77bc('0x1')}};
\ No newline at end of file
index 9b5c70e..b36e4e3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5f66=['diff','seconds','disposition','ANSWERED','outbound','duration','billableseconds','initCampaigns','campaigns','dialQueueProject','SquareProject','voiceExtensions','initCampaignHopperHistory','initFaxAccounts','initVoiceQueues','exports','moment','../model/agent','../model/telephone','../model/trunk','../model/voiceQueue','../model/trigger','../model/campaign','../model/zendeskAccount','../model/salesforceAccount','../model/zohoAccount','../model/deskAccount','../model/vtigerAccount','../model/servicenowAccount','../model/dynamics365Account','../model/freshsalesAccount','telephones','trunks','voiceQueues','triggers','templates','channels','outboundChannels','settings','zendeskAccounts','salesforceAccounts','sugarcrmAccounts','freshdeskAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','faxAccounts','mapKeys','hasOwnProperty','isNil','format','interface','total','answered','sumHoldTime','sumBillable','isEmpty','ivrAnswerCallsDay','unmanaged','abandoned','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundCongestionCallsDay','outboundNoSuchCallsDay','outboundUnknownCallsDay','outboundDropCallsDayTimeout','outboundOriginateFailureCallsDay','outboundRejectCallsDay','outboundAnswerCallsDay','queueStatusComplete','prototype','mergeFromDatabase','initAgents','agents','length','name','isUndefined','initTelephones','SIP/%s','initTriggers','initSalesforceAccounts','initFreshdeskAccounts','initDeskAccounts','initSugarcrmAccounts','initVtigerAccounts','initServicenowAccounts','freshsalesAccounts','initVoiceQueueHopperHistory','initVoiceQueueReports','groupBy','queuecallerexit','queuecallerabandon','queuecallerleaveAt','queuecallerjoinAt','sumDuration','queuecallercompleteAt','queuecallerexitAt'];(function(_0x579a39,_0x1cfa9a){var _0x7a47b1=function(_0x4e2a2e){while(--_0x4e2a2e){_0x579a39['push'](_0x579a39['shift']());}};_0x7a47b1(++_0x1cfa9a);}(_0x5f66,0x1a0));var _0x65f6=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x5f66[_0xa464c9];return _0x3d73c4;};'use strict';var _=require('lodash');var moment=require(_0x65f6('0x0'));var util=require('util');var Agent=require(_0x65f6('0x1'));var Telephone=require(_0x65f6('0x2'));var Trunk=require(_0x65f6('0x3'));var VoiceQueue=require(_0x65f6('0x4'));var Trigger=require(_0x65f6('0x5'));var Template=require('../model/template');var Campaign=require(_0x65f6('0x6'));var VoiceExtension=require('../model/voiceExtension');var ZendeskAccount=require(_0x65f6('0x7'));var SalesforceAccount=require(_0x65f6('0x8'));var FreshdeskAccount=require('../model/freshdeskAccount');var SugarcrmAccount=require('../model/sugarcrmAccount');var ZohoAccount=require(_0x65f6('0x9'));var DeskAccount=require(_0x65f6('0xa'));var VtigerAccount=require(_0x65f6('0xb'));var ServicenowAccount=require(_0x65f6('0xc'));var Dynamics365Account=require(_0x65f6('0xd'));var FreshsalesAccount=require(_0x65f6('0xe'));var FaxAccount=require('../model/faxAccount');function Realtime(){this['agents']={};this[_0x65f6('0xf')]={};this[_0x65f6('0x10')]={};this[_0x65f6('0x11')]={};this[_0x65f6('0x12')]={};this['campaigns']={};this[_0x65f6('0x13')]={};this['outbound']={'total':0x0,'answered':0x0,'sumHoldTime':0x0,'sumDuration':0x0,'sumBillable':0x0};this['voiceExtensions']={};this[_0x65f6('0x14')]={};this['queueChannels']={};this[_0x65f6('0x15')]={};this['timers']={};this[_0x65f6('0x16')]={};this[_0x65f6('0x17')]={};this[_0x65f6('0x18')]={};this[_0x65f6('0x19')]={};this[_0x65f6('0x1a')]={};this[_0x65f6('0x1b')]={};this[_0x65f6('0x1c')]={};this[_0x65f6('0x1d')]={};this[_0x65f6('0x1e')]={};this[_0x65f6('0x1f')]={};this['freshsalesAccounts']={};this[_0x65f6('0x20')]={};}function freeIsNotKey(_0x49a913,_0x5dd324,_0x1693e6){var _0x5c69f8=_[_0x65f6('0x21')](_0x49a913,function(_0x1c955c){return _0x1c955c[_0x1693e6];});for(var _0x1b1cbb in _0x5dd324){if(_0x5dd324[_0x65f6('0x22')](_0x1b1cbb)){if(!_0x5c69f8[_0x1b1cbb]){delete _0x5dd324[_0x1b1cbb];}}}}function freeIsNotKeySip(_0xc8660c,_0x18380e){var _0x495dd6=_['mapKeys'](_0xc8660c,function(_0x2d538c){return util['format']('SIP/%s',_0x2d538c['name']);});for(var _0x365159 in _0x18380e){if(_0x18380e[_0x65f6('0x22')](_0x365159)){if(!_0x495dd6[_0x365159]){delete _0x18380e[_0x365159];}}}}function freeIsNotKeyAgent(_0x5114a4,_0x39e19f){var _0x270893=_[_0x65f6('0x21')](_0x5114a4,function(_0x3876ed){var _0x219ab2=_[_0x65f6('0x23')](_0x3876ed['interface'])?util[_0x65f6('0x24')]('SIP/%s',_0x3876ed['name']):_0x3876ed[_0x65f6('0x25')];return _0x219ab2;});for(var _0xd173f4 in _0x39e19f){if(_0x39e19f['hasOwnProperty'](_0xd173f4)){if(!_0x270893[_0xd173f4]){delete _0x39e19f[_0xd173f4];}}}}function clearVoiceCallReports(_0x1eeaaa){_0x1eeaaa[_0x65f6('0x26')]=0x0;_0x1eeaaa[_0x65f6('0x27')]=0x0;_0x1eeaaa[_0x65f6('0x28')]=0x0;_0x1eeaaa['sumDuration']=0x0;_0x1eeaaa[_0x65f6('0x29')]=0x0;}function clearCampaigns(_0x59ea32){if(!_[_0x65f6('0x2a')](_0x59ea32)){for(var _0x5963e0 in _0x59ea32){if(_0x59ea32['hasOwnProperty'](_0x5963e0)){_0x59ea32[_0x5963e0]['ivrTotalCallsDays']=0x0;_0x59ea32[_0x5963e0][_0x65f6('0x2b')]=0x0;}}}}function clearVoiceQueues(_0x16cde8){if(!_['isEmpty'](_0x16cde8)){for(var _0x296cd9 in _0x16cde8){if(_0x16cde8[_0x65f6('0x22')](_0x296cd9)){_0x16cde8[_0x296cd9]['total']=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x27')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x2c')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x2d')]=0x0;_0x16cde8[_0x296cd9]['sumHoldTime']=0x0;_0x16cde8[_0x296cd9]['sumDuration']=0x0;_0x16cde8[_0x296cd9]['sumBillable']=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x2e')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x2f')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x30')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x31')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x32')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x33')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x34')]=0x0;_0x16cde8[_0x296cd9]['outboundDropCallsDayCallersExit']=0x0;_0x16cde8[_0x296cd9]['outboundBlacklistCallsDay']=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x35')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x36')]=0x0;_0x16cde8[_0x296cd9]['outboundReCallsDay']=0x0;_0x16cde8[_0x296cd9]['outboundAnswerAgiCallsDay']=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x37')]=0x0;_0x16cde8[_0x296cd9][_0x65f6('0x38')]=!![];}}}}Realtime[_0x65f6('0x39')][_0x65f6('0x3a')]=function(_0x1217fd,_0x2d32be){for(var _0x5792a0 in _0x2d32be){if(_0x1217fd[_0x65f6('0x22')](_0x5792a0)){_0x1217fd[_0x5792a0]=_0x2d32be[_0x5792a0];}}};Realtime[_0x65f6('0x39')][_0x65f6('0x3b')]=function(){var _0x4bc037=this;return function(_0x217f35){if(_0x217f35){freeIsNotKeyAgent(_0x217f35,_0x4bc037[_0x65f6('0x3c')]);for(var _0xbaed3c=0x0,_0x45510a={};_0xbaed3c<_0x217f35[_0x65f6('0x3d')];_0xbaed3c+=0x1){_0x45510a=_0x217f35[_0xbaed3c];var _0x2f054c=_['isNil'](_0x45510a[_0x65f6('0x25')])?util[_0x65f6('0x24')]('SIP/%s',_0x45510a[_0x65f6('0x3e')]):_0x45510a['interface'];if(_[_0x65f6('0x3f')](_0x4bc037['agents'][_0x2f054c])){_0x4bc037[_0x65f6('0x3c')][_0x2f054c]=new Agent(_0x45510a);}else{_0x4bc037[_0x65f6('0x3a')](_0x4bc037['agents'][_0x2f054c],_0x45510a);}}}return _0x4bc037[_0x65f6('0x3c')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x40')]=function(){var _0x515648=this;return function(_0x582c7e){if(_0x582c7e){freeIsNotKeySip(_0x582c7e,_0x515648[_0x65f6('0xf')]);for(var _0x4c0df4=0x0,_0x26de30={};_0x4c0df4<_0x582c7e['length'];_0x4c0df4+=0x1){_0x26de30=_0x582c7e[_0x4c0df4];if(_[_0x65f6('0x3f')](_0x515648[_0x65f6('0xf')][util['format'](_0x65f6('0x41'),_0x26de30['name'])])){_0x515648['telephones'][util[_0x65f6('0x24')](_0x65f6('0x41'),_0x26de30[_0x65f6('0x3e')])]=new Telephone(_0x26de30);}else{_0x515648[_0x65f6('0x3a')](_0x515648[_0x65f6('0xf')][util[_0x65f6('0x24')](_0x65f6('0x41'),_0x26de30[_0x65f6('0x3e')])],_0x26de30);}}}return _0x515648['telephones'];};};Realtime[_0x65f6('0x39')]['initTrunks']=function(){var _0x12a589=this;return function(_0xa4394a){if(_0xa4394a){freeIsNotKeySip(_0xa4394a,_0x12a589[_0x65f6('0x10')]);for(var _0x2ea7f7=0x0,_0x5ef5c2={};_0x2ea7f7<_0xa4394a[_0x65f6('0x3d')];_0x2ea7f7+=0x1){_0x5ef5c2=_0xa4394a[_0x2ea7f7];if(_[_0x65f6('0x3f')](_0x12a589[_0x65f6('0x10')][util[_0x65f6('0x24')](_0x65f6('0x41'),_0x5ef5c2[_0x65f6('0x3e')])])){_0x12a589[_0x65f6('0x10')][util[_0x65f6('0x24')](_0x65f6('0x41'),_0x5ef5c2['name'])]=new Trunk(_0x5ef5c2);}else{_0x12a589[_0x65f6('0x3a')](_0x12a589[_0x65f6('0x10')][util[_0x65f6('0x24')](_0x65f6('0x41'),_0x5ef5c2[_0x65f6('0x3e')])],_0x5ef5c2);}}}return _0x12a589[_0x65f6('0x10')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x42')]=function(){var _0x461393=this;return function(_0x2abbed){if(_0x2abbed){freeIsNotKey(_0x2abbed,_0x461393[_0x65f6('0x12')],'id');for(var _0x2c008a=0x0,_0x6c4d94={};_0x2c008a<_0x2abbed[_0x65f6('0x3d')];_0x2c008a+=0x1){_0x6c4d94=_0x2abbed[_0x2c008a];if(_[_0x65f6('0x3f')](_0x461393[_0x65f6('0x12')][_0x6c4d94['id']])){_0x461393['triggers'][_0x6c4d94['id']]=new Trigger(_0x6c4d94);}else{_0x461393[_0x65f6('0x3a')](_0x461393[_0x65f6('0x12')][_0x6c4d94['id']],_0x6c4d94);}}}return _0x461393[_0x65f6('0x12')];};};Realtime[_0x65f6('0x39')]['initTemplates']=function(){var _0x1bf5bf=this;return function(_0x2d0dac){if(_0x2d0dac){freeIsNotKey(_0x2d0dac,_0x1bf5bf[_0x65f6('0x13')],'id');for(var _0x5e69b4=0x0,_0x2dbab3={};_0x5e69b4<_0x2d0dac[_0x65f6('0x3d')];_0x5e69b4+=0x1){_0x2dbab3=_0x2d0dac[_0x5e69b4];if(_[_0x65f6('0x3f')](_0x1bf5bf[_0x65f6('0x13')][_0x2dbab3['id']])){_0x1bf5bf['templates'][_0x2dbab3['id']]=new Template(_0x2dbab3);}else{_0x1bf5bf[_0x65f6('0x3a')](_0x1bf5bf['templates'][_0x2dbab3['id']],_0x2dbab3);}}}return _0x1bf5bf[_0x65f6('0x13')];};};Realtime[_0x65f6('0x39')]['initZendeskAccounts']=function(){var _0xf754ee=this;return function(_0x5085db){if(_0x5085db){freeIsNotKey(_0x5085db,_0xf754ee[_0x65f6('0x17')],'id');for(var _0x4d9b76=0x0,_0x2d1706={};_0x4d9b76<_0x5085db[_0x65f6('0x3d')];_0x4d9b76+=0x1){_0x2d1706=_0x5085db[_0x4d9b76];if(_[_0x65f6('0x3f')](_0xf754ee[_0x65f6('0x17')][_0x2d1706['id']])){_0xf754ee['zendeskAccounts'][_0x2d1706['id']]=new ZendeskAccount(_0x2d1706);}else{_0xf754ee['mergeFromDatabase'](_0xf754ee[_0x65f6('0x17')][_0x2d1706['id']],_0x2d1706);}}}return _0xf754ee[_0x65f6('0x17')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x43')]=function(){var _0x3b907c=this;return function(_0x2d6ab9){if(_0x2d6ab9){freeIsNotKey(_0x2d6ab9,_0x3b907c[_0x65f6('0x18')],'id');for(var _0x41690c=0x0,_0x414f49={};_0x41690c<_0x2d6ab9['length'];_0x41690c+=0x1){_0x414f49=_0x2d6ab9[_0x41690c];if(_[_0x65f6('0x3f')](_0x3b907c[_0x65f6('0x18')][_0x414f49['id']])){_0x3b907c[_0x65f6('0x18')][_0x414f49['id']]=new SalesforceAccount(_0x414f49);}else{_0x3b907c['mergeFromDatabase'](_0x3b907c[_0x65f6('0x18')][_0x414f49['id']],_0x414f49);}}}return _0x3b907c[_0x65f6('0x18')];};};Realtime['prototype'][_0x65f6('0x44')]=function(){var _0x253d52=this;return function(_0x57eb04){if(_0x57eb04){freeIsNotKey(_0x57eb04,_0x253d52[_0x65f6('0x1a')],'id');for(var _0x4f96c4=0x0,_0x247be3={};_0x4f96c4<_0x57eb04[_0x65f6('0x3d')];_0x4f96c4+=0x1){_0x247be3=_0x57eb04[_0x4f96c4];if(_[_0x65f6('0x3f')](_0x253d52['freshdeskAccounts'][_0x247be3['id']])){_0x253d52[_0x65f6('0x1a')][_0x247be3['id']]=new FreshdeskAccount(_0x247be3);}else{_0x253d52[_0x65f6('0x3a')](_0x253d52['freshdeskAccounts'][_0x247be3['id']],_0x247be3);}}}return _0x253d52[_0x65f6('0x1a')];};};Realtime[_0x65f6('0x39')]['initZohoAccounts']=function(){var _0x34d6a9=this;return function(_0x344c0e){if(_0x344c0e){freeIsNotKey(_0x344c0e,_0x34d6a9[_0x65f6('0x1b')],'id');for(var _0x25d504=0x0,_0x234fa7={};_0x25d504<_0x344c0e[_0x65f6('0x3d')];_0x25d504+=0x1){_0x234fa7=_0x344c0e[_0x25d504];if(_[_0x65f6('0x3f')](_0x34d6a9[_0x65f6('0x1b')][_0x234fa7['id']])){_0x34d6a9['zohoAccounts'][_0x234fa7['id']]=new ZohoAccount(_0x234fa7);}else{_0x34d6a9['mergeFromDatabase'](_0x34d6a9['zohoAccounts'][_0x234fa7['id']],_0x234fa7);}}}return _0x34d6a9[_0x65f6('0x1b')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x45')]=function(){var _0x20c322=this;return function(_0x545445){if(_0x545445){freeIsNotKey(_0x545445,_0x20c322[_0x65f6('0x1c')],'id');for(var _0x2032b9=0x0,_0x9ff849={};_0x2032b9<_0x545445['length'];_0x2032b9+=0x1){_0x9ff849=_0x545445[_0x2032b9];if(_[_0x65f6('0x3f')](_0x20c322[_0x65f6('0x1c')][_0x9ff849['id']])){_0x20c322[_0x65f6('0x1c')][_0x9ff849['id']]=new DeskAccount(_0x9ff849);}else{_0x20c322['mergeFromDatabase'](_0x20c322['deskAccounts'][_0x9ff849['id']],_0x9ff849);}}}return _0x20c322[_0x65f6('0x1c')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x46')]=function(){var _0x39364f=this;return function(_0x2a76b3){if(_0x2a76b3){freeIsNotKey(_0x2a76b3,_0x39364f[_0x65f6('0x19')],'id');for(var _0x35d77f=0x0,_0x138334={};_0x35d77f<_0x2a76b3[_0x65f6('0x3d')];_0x35d77f+=0x1){_0x138334=_0x2a76b3[_0x35d77f];if(_[_0x65f6('0x3f')](_0x39364f[_0x65f6('0x19')][_0x138334['id']])){_0x39364f[_0x65f6('0x19')][_0x138334['id']]=new SugarcrmAccount(_0x138334);}else{_0x39364f[_0x65f6('0x3a')](_0x39364f[_0x65f6('0x19')][_0x138334['id']],_0x138334);}}}return _0x39364f['sugarcrmAccounts'];};};Realtime[_0x65f6('0x39')][_0x65f6('0x47')]=function(){var _0x42a805=this;return function(_0x4b4efe){if(_0x4b4efe){freeIsNotKey(_0x4b4efe,_0x42a805[_0x65f6('0x1d')],'id');for(var _0x16dec0=0x0,_0x4638c9={};_0x16dec0<_0x4b4efe[_0x65f6('0x3d')];_0x16dec0+=0x1){_0x4638c9=_0x4b4efe[_0x16dec0];if(_['isUndefined'](_0x42a805[_0x65f6('0x1d')][_0x4638c9['id']])){_0x42a805[_0x65f6('0x1d')][_0x4638c9['id']]=new VtigerAccount(_0x4638c9);}else{_0x42a805[_0x65f6('0x3a')](_0x42a805[_0x65f6('0x1d')][_0x4638c9['id']],_0x4638c9);}}}return _0x42a805['vtigerAccounts'];};};Realtime[_0x65f6('0x39')][_0x65f6('0x48')]=function(){var _0x5c55e4=this;return function(_0x28682b){if(_0x28682b){freeIsNotKey(_0x28682b,_0x5c55e4[_0x65f6('0x1e')],'id');for(var _0x36c316=0x0,_0x51549d={};_0x36c316<_0x28682b[_0x65f6('0x3d')];_0x36c316+=0x1){_0x51549d=_0x28682b[_0x36c316];if(_[_0x65f6('0x3f')](_0x5c55e4[_0x65f6('0x1e')][_0x51549d['id']])){_0x5c55e4[_0x65f6('0x1e')][_0x51549d['id']]=new ServicenowAccount(_0x51549d);}else{_0x5c55e4[_0x65f6('0x3a')](_0x5c55e4[_0x65f6('0x1e')][_0x51549d['id']],_0x51549d);}}}return _0x5c55e4['servicenowAccounts'];};};Realtime['prototype']['initDynamics365Accounts']=function(){var _0x336a7d=this;return function(_0x367d95){if(_0x367d95){freeIsNotKey(_0x367d95,_0x336a7d[_0x65f6('0x1f')],'id');for(var _0x471bec=0x0,_0xab6f0={};_0x471bec<_0x367d95[_0x65f6('0x3d')];_0x471bec+=0x1){_0xab6f0=_0x367d95[_0x471bec];if(_['isUndefined'](_0x336a7d[_0x65f6('0x1f')][_0xab6f0['id']])){_0x336a7d[_0x65f6('0x1f')][_0xab6f0['id']]=new Dynamics365Account(_0xab6f0);}else{_0x336a7d['mergeFromDatabase'](_0x336a7d[_0x65f6('0x1f')][_0xab6f0['id']],_0xab6f0);}}}return _0x336a7d[_0x65f6('0x1f')];};};Realtime[_0x65f6('0x39')]['initFreshsalesAccounts']=function(){var _0x23c441=this;return function(_0x448c9a){if(_0x448c9a){freeIsNotKey(_0x448c9a,_0x23c441['freshsalesAccounts'],'id');for(var _0x271d76=0x0,_0x3edc6b={};_0x271d76<_0x448c9a[_0x65f6('0x3d')];_0x271d76+=0x1){_0x3edc6b=_0x448c9a[_0x271d76];if(_[_0x65f6('0x3f')](_0x23c441[_0x65f6('0x49')][_0x3edc6b['id']])){_0x23c441[_0x65f6('0x49')][_0x3edc6b['id']]=new FreshsalesAccount(_0x3edc6b);}else{_0x23c441[_0x65f6('0x3a')](_0x23c441['freshsalesAccounts'][_0x3edc6b['id']],_0x3edc6b);}}}return _0x23c441['freshsalesAccounts'];};};Realtime[_0x65f6('0x39')][_0x65f6('0x4a')]=function(){var _0x4a9524=this;return function(_0x417ba5){for(var _0x5f3df9=0x0;_0x5f3df9<_0x417ba5[_0x65f6('0x3d')];_0x5f3df9+=0x1){_['merge'](_0x4a9524[_0x65f6('0x11')][_0x417ba5[_0x5f3df9][_0x65f6('0x3e')]],_0x417ba5[_0x5f3df9]);}return _0x4a9524[_0x65f6('0x11')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x4b')]=function(){var _0x264e6c=this;return function(_0x1aaf75){clearVoiceQueues(_0x264e6c[_0x65f6('0x11')]);if(_0x1aaf75){_0x1aaf75=_[_0x65f6('0x4c')](_0x1aaf75,'uniqueid');for(var _0x480190 in _0x1aaf75){if(_0x1aaf75[_0x65f6('0x22')](_0x480190)){for(var _0x13ee4b=0x0;_0x13ee4b<_0x1aaf75[_0x480190][_0x65f6('0x3d')];_0x13ee4b+=0x1){var _0x51497f=_0x1aaf75[_0x480190][_0x13ee4b]['queue'];if(_0x264e6c[_0x65f6('0x11')][_0x51497f]){if(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x4d')]){_0x264e6c[_0x65f6('0x11')][_0x51497f][_0x65f6('0x2c')]+=0x1;}if(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x4e')]){_0x264e6c[_0x65f6('0x11')][_0x51497f]['abandoned']+=0x1;}_0x264e6c['voiceQueues'][_0x51497f][_0x65f6('0x28')]+=moment(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x4f')])['diff'](moment(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x50')]),'seconds')||0x0;if(_0x13ee4b===_0x1aaf75[_0x480190][_0x65f6('0x3d')]-0x1){_0x264e6c[_0x65f6('0x11')][_0x51497f][_0x65f6('0x51')]+=moment(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x52')]||_0x1aaf75[_0x480190][_0x13ee4b]['queuecallerabandonAt']||_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x53')])[_0x65f6('0x54')](moment(_0x1aaf75[_0x480190][_0x13ee4b][_0x65f6('0x50')]),'seconds')||0x0;_0x264e6c['voiceQueues'][_0x51497f][_0x65f6('0x26')]+=0x1;if(_0x1aaf75[_0x480190][_0x13ee4b]['queuecallercomplete']){_0x264e6c[_0x65f6('0x11')][_0x51497f][_0x65f6('0x27')]+=0x1;_0x264e6c[_0x65f6('0x11')][_0x51497f][_0x65f6('0x29')]+=moment(_0x1aaf75[_0x480190][_0x13ee4b]['queuecallercompleteAt'])['diff'](moment(_0x1aaf75[_0x480190][_0x13ee4b]['queuecallerleaveAt']),_0x65f6('0x55'))||0x0;}}else{_0x264e6c[_0x65f6('0x11')][_0x51497f][_0x65f6('0x51')]+=_0x264e6c['voiceQueues'][_0x51497f][_0x65f6('0x28')]||0x0;}}}}}}return _0x264e6c[_0x65f6('0x11')];};};Realtime[_0x65f6('0x39')]['initVoiceCallReports']=function(){var _0x40d0f7=this;return function(_0x15809e){clearVoiceCallReports(_0x40d0f7['outbound']);if(_0x15809e){for(var _0x758e80=0x0;_0x758e80<_0x15809e[_0x65f6('0x3d')];_0x758e80+=0x1){_0x40d0f7['outbound'][_0x65f6('0x26')]+=0x1;_0x40d0f7['outbound'][_0x65f6('0x51')]+=_0x15809e[_0x758e80]['duration'];if(_0x15809e[_0x758e80][_0x65f6('0x56')]===_0x65f6('0x57')){_0x40d0f7['outbound'][_0x65f6('0x27')]+=0x1;_0x40d0f7[_0x65f6('0x58')][_0x65f6('0x28')]+=_0x15809e[_0x758e80][_0x65f6('0x59')]-_0x15809e[_0x758e80][_0x65f6('0x5a')]||0x0;_0x40d0f7[_0x65f6('0x58')][_0x65f6('0x29')]+=_0x15809e[_0x758e80][_0x65f6('0x5a')];}}}return _0x40d0f7[_0x65f6('0x58')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x5b')]=function(){var _0x574d84=this;return function(_0x10a661){if(_0x10a661){freeIsNotKey(_0x10a661,_0x574d84[_0x65f6('0x5c')],_0x65f6('0x3e'));for(var _0x219e42=0x0,_0x5694f9={};_0x219e42<_0x10a661[_0x65f6('0x3d')];_0x219e42+=0x1){_0x5694f9=_0x10a661[_0x219e42];if(_[_0x65f6('0x3f')](_0x574d84['campaigns'][_0x5694f9[_0x65f6('0x3e')]])){_0x574d84['campaigns'][_0x5694f9[_0x65f6('0x3e')]]=new Campaign(_0x5694f9);}else{_0x574d84['mergeFromDatabase'](_0x574d84[_0x65f6('0x5c')][_0x5694f9[_0x65f6('0x3e')]],_0x5694f9);_0x574d84['campaigns'][_0x5694f9['name']][_0x65f6('0x5d')]=_0x5694f9[_0x65f6('0x5e')]?_0x5694f9['SquareProject'][_0x65f6('0x3e')]:undefined;}}}return _0x574d84[_0x65f6('0x5c')];};};Realtime[_0x65f6('0x39')]['initVoiceExtensions']=function(){var _0x1348ec=this;return function(_0x246510){if(_0x246510){freeIsNotKey(_0x246510,_0x1348ec['voiceExtensions'],'id');for(var _0x36b8de=0x0,_0x504b39={};_0x36b8de<_0x246510[_0x65f6('0x3d')];_0x36b8de+=0x1){_0x504b39=_0x246510[_0x36b8de];if(_['isUndefined'](_0x1348ec['voiceExtensions'][_0x504b39['id']])){_0x1348ec[_0x65f6('0x5f')][_0x504b39['id']]=new VoiceExtension(_0x504b39);}else{_0x1348ec[_0x65f6('0x3a')](_0x1348ec[_0x65f6('0x5f')][_0x504b39['id']],_0x504b39);}}}return _0x1348ec[_0x65f6('0x5f')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x60')]=function(){var _0x1ac46f=this;return function(_0x1f4e2c){clearCampaigns(_0x1ac46f['campaigns']);for(var _0x494904=0x0;_0x494904<_0x1f4e2c[_0x65f6('0x3d')];_0x494904+=0x1){_['merge'](_0x1ac46f[_0x65f6('0x5c')][_0x1f4e2c[_0x494904][_0x65f6('0x3e')]],_0x1f4e2c[_0x494904]);}return _0x1ac46f[_0x65f6('0x5c')];};};Realtime[_0x65f6('0x39')][_0x65f6('0x61')]=function(){var _0x56bd9d=this;return function(_0x398cac){if(_0x398cac){freeIsNotKey(_0x398cac,_0x56bd9d[_0x65f6('0x20')],'id');for(var _0x14c908=0x0,_0x576ecd={};_0x14c908<_0x398cac[_0x65f6('0x3d')];_0x14c908+=0x1){_0x576ecd=_0x398cac[_0x14c908];if(_[_0x65f6('0x3f')](_0x56bd9d[_0x65f6('0x20')][_0x576ecd['id']])){_0x56bd9d[_0x65f6('0x20')][_0x576ecd['id']]=new FaxAccount(_0x576ecd);}else{_0x56bd9d[_0x65f6('0x3a')](_0x56bd9d[_0x65f6('0x20')][_0x576ecd['id']],_0x576ecd);}}}return _0x56bd9d['faxAccounts'];};};Realtime['prototype'][_0x65f6('0x62')]=function(){var _0x10d744=this;return function(_0x10c916){if(_0x10c916){freeIsNotKey(_0x10c916,_0x10d744[_0x65f6('0x11')],'name');for(var _0x4bda86=0x0,_0x336076={};_0x4bda86<_0x10c916[_0x65f6('0x3d')];_0x4bda86+=0x1){_0x336076=_0x10c916[_0x4bda86];if(_[_0x65f6('0x3f')](_0x10d744[_0x65f6('0x11')][_0x336076[_0x65f6('0x3e')]])){_0x10d744[_0x65f6('0x11')][_0x336076['name']]=new VoiceQueue(_0x336076);}else{_0x10d744['mergeFromDatabase'](_0x10d744['voiceQueues'][_0x336076[_0x65f6('0x3e')]],_0x336076);}}}return _0x10d744[_0x65f6('0x11')];};};module[_0x65f6('0x63')]=Realtime;
\ No newline at end of file
+var _0xb10b=['../model/voiceExtension','../model/zendeskAccount','../model/freshdeskAccount','../model/sugarcrmAccount','../model/deskAccount','../model/vtigerAccount','../model/servicenowAccount','../model/dynamics365Account','../model/freshsalesAccount','../model/faxAccount','agents','telephones','triggers','campaigns','templates','voiceExtensions','queueChannels','outboundChannels','timers','settings','zendeskAccounts','salesforceAccounts','freshdeskAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','freshsalesAccounts','faxAccounts','mapKeys','hasOwnProperty','SIP/%s','name','interface','format','total','answered','sumHoldTime','sumDuration','ivrTotalCallsDays','isEmpty','unmanaged','sumBillable','outboundAnswerAgiCallsDay','outboundNoAnswerCallsDay','outboundBusyCallsDay','outboundNoSuchCallsDay','outboundDropCallsDayTimeout','outboundBlacklistCallsDay','outboundOriginateFailureCallsDay','outboundRejectCallsDay','outboundAnswerCallsDay','queueStatusComplete','mergeFromDatabase','prototype','initAgents','length','isNil','isUndefined','initTelephones','trunks','initTemplates','initZendeskAccounts','initSalesforceAccounts','initFreshdeskAccounts','initDeskAccounts','initSugarcrmAccounts','sugarcrmAccounts','initVtigerAccounts','initVoiceQueueHopperHistory','voiceQueues','groupBy','uniqueid','queue','queuecallerexit','abandoned','queuecallerleaveAt','diff','seconds','queuecallercompleteAt','queuecallerabandonAt','queuecallerexitAt','queuecallercomplete','initVoiceCallReports','outbound','duration','billableseconds','initCampaigns','dialQueueProject','initCampaignHopperHistory','merge','initFaxAccounts','initVoiceQueues','lodash','util','../model/agent','../model/telephone','../model/voiceQueue','../model/trigger','../model/template','../model/campaign'];(function(_0x5903c6,_0x24282a){var _0x7bcab2=function(_0x4dfdd8){while(--_0x4dfdd8){_0x5903c6['push'](_0x5903c6['shift']());}};_0x7bcab2(++_0x24282a);}(_0xb10b,0x12a));var _0xbb10=function(_0x5de97d,_0x1141ee){_0x5de97d=_0x5de97d-0x0;var _0x2da950=_0xb10b[_0x5de97d];return _0x2da950;};'use strict';var _=require(_0xbb10('0x0'));var moment=require('moment');var util=require(_0xbb10('0x1'));var Agent=require(_0xbb10('0x2'));var Telephone=require(_0xbb10('0x3'));var Trunk=require('../model/trunk');var VoiceQueue=require(_0xbb10('0x4'));var Trigger=require(_0xbb10('0x5'));var Template=require(_0xbb10('0x6'));var Campaign=require(_0xbb10('0x7'));var VoiceExtension=require(_0xbb10('0x8'));var ZendeskAccount=require(_0xbb10('0x9'));var SalesforceAccount=require('../model/salesforceAccount');var FreshdeskAccount=require(_0xbb10('0xa'));var SugarcrmAccount=require(_0xbb10('0xb'));var ZohoAccount=require('../model/zohoAccount');var DeskAccount=require(_0xbb10('0xc'));var VtigerAccount=require(_0xbb10('0xd'));var ServicenowAccount=require(_0xbb10('0xe'));var Dynamics365Account=require(_0xbb10('0xf'));var FreshsalesAccount=require(_0xbb10('0x10'));var FaxAccount=require(_0xbb10('0x11'));function Realtime(){this[_0xbb10('0x12')]={};this[_0xbb10('0x13')]={};this['trunks']={};this['voiceQueues']={};this[_0xbb10('0x14')]={};this[_0xbb10('0x15')]={};this[_0xbb10('0x16')]={};this['outbound']={'total':0x0,'answered':0x0,'sumHoldTime':0x0,'sumDuration':0x0,'sumBillable':0x0};this[_0xbb10('0x17')]={};this['channels']={};this[_0xbb10('0x18')]={};this[_0xbb10('0x19')]={};this[_0xbb10('0x1a')]={};this[_0xbb10('0x1b')]={};this[_0xbb10('0x1c')]={};this[_0xbb10('0x1d')]={};this['sugarcrmAccounts']={};this[_0xbb10('0x1e')]={};this[_0xbb10('0x1f')]={};this[_0xbb10('0x20')]={};this[_0xbb10('0x21')]={};this[_0xbb10('0x22')]={};this[_0xbb10('0x23')]={};this[_0xbb10('0x24')]={};this[_0xbb10('0x25')]={};}function freeIsNotKey(_0x3e26f4,_0x2b184e,_0x4a2bfc){var _0x2eca0f=_[_0xbb10('0x26')](_0x3e26f4,function(_0x133ac2){return _0x133ac2[_0x4a2bfc];});for(var _0x42db98 in _0x2b184e){if(_0x2b184e[_0xbb10('0x27')](_0x42db98)){if(!_0x2eca0f[_0x42db98]){delete _0x2b184e[_0x42db98];}}}}function freeIsNotKeySip(_0x1682a4,_0x575cca){var _0x30efc6=_[_0xbb10('0x26')](_0x1682a4,function(_0xe1c665){return util['format'](_0xbb10('0x28'),_0xe1c665[_0xbb10('0x29')]);});for(var _0x388fab in _0x575cca){if(_0x575cca[_0xbb10('0x27')](_0x388fab)){if(!_0x30efc6[_0x388fab]){delete _0x575cca[_0x388fab];}}}}function freeIsNotKeyAgent(_0xdf237d,_0x44e563){var _0x4deb49=_[_0xbb10('0x26')](_0xdf237d,function(_0x12ef77){var _0x50aea1=_['isNil'](_0x12ef77[_0xbb10('0x2a')])?util[_0xbb10('0x2b')](_0xbb10('0x28'),_0x12ef77[_0xbb10('0x29')]):_0x12ef77[_0xbb10('0x2a')];return _0x50aea1;});for(var _0x1824b7 in _0x44e563){if(_0x44e563[_0xbb10('0x27')](_0x1824b7)){if(!_0x4deb49[_0x1824b7]){delete _0x44e563[_0x1824b7];}}}}function clearVoiceCallReports(_0x436104){_0x436104[_0xbb10('0x2c')]=0x0;_0x436104[_0xbb10('0x2d')]=0x0;_0x436104[_0xbb10('0x2e')]=0x0;_0x436104[_0xbb10('0x2f')]=0x0;_0x436104['sumBillable']=0x0;}function clearCampaigns(_0x4fedac){if(!_['isEmpty'](_0x4fedac)){for(var _0xc93a04 in _0x4fedac){if(_0x4fedac[_0xbb10('0x27')](_0xc93a04)){_0x4fedac[_0xc93a04][_0xbb10('0x30')]=0x0;_0x4fedac[_0xc93a04]['ivrAnswerCallsDay']=0x0;}}}}function clearVoiceQueues(_0x2fdde9){if(!_[_0xbb10('0x31')](_0x2fdde9)){for(var _0x6ed43b in _0x2fdde9){if(_0x2fdde9[_0xbb10('0x27')](_0x6ed43b)){_0x2fdde9[_0x6ed43b][_0xbb10('0x2c')]=0x0;_0x2fdde9[_0x6ed43b][_0xbb10('0x2d')]=0x0;_0x2fdde9[_0x6ed43b][_0xbb10('0x32')]=0x0;_0x2fdde9[_0x6ed43b]['abandoned']=0x0;_0x2fdde9[_0x6ed43b][_0xbb10('0x2e')]=0x0;_0x2fdde9[_0x6ed43b][_0xbb10('0x2f')]=0x0;_0x2fdde9[_0x6ed43b][_0xbb10('0x33')]=0x0;_0x2fdde9[_0x6ed43b][_0xbb10('0x34')]=0x0;_0x2fdde9[_0x6ed43b][_0xbb10('0x35')]=0x0;_0x2fdde9[_0x6ed43b][_0xbb10('0x36')]=0x0;_0x2fdde9[_0x6ed43b]['outboundCongestionCallsDay']=0x0;_0x2fdde9[_0x6ed43b][_0xbb10('0x37')]=0x0;_0x2fdde9[_0x6ed43b]['outboundUnknownCallsDay']=0x0;_0x2fdde9[_0x6ed43b][_0xbb10('0x38')]=0x0;_0x2fdde9[_0x6ed43b]['outboundDropCallsDayCallersExit']=0x0;_0x2fdde9[_0x6ed43b][_0xbb10('0x39')]=0x0;_0x2fdde9[_0x6ed43b][_0xbb10('0x3a')]=0x0;_0x2fdde9[_0x6ed43b][_0xbb10('0x3b')]=0x0;_0x2fdde9[_0x6ed43b]['outboundReCallsDay']=0x0;_0x2fdde9[_0x6ed43b]['outboundAnswerAgiCallsDay']=0x0;_0x2fdde9[_0x6ed43b][_0xbb10('0x3c')]=0x0;_0x2fdde9[_0x6ed43b][_0xbb10('0x3d')]=!![];}}}}Realtime['prototype'][_0xbb10('0x3e')]=function(_0x37dde7,_0x2f653f){for(var _0x1c0b57 in _0x2f653f){if(_0x37dde7[_0xbb10('0x27')](_0x1c0b57)){_0x37dde7[_0x1c0b57]=_0x2f653f[_0x1c0b57];}}};Realtime[_0xbb10('0x3f')][_0xbb10('0x40')]=function(){var _0x4975f5=this;return function(_0x25acb3){if(_0x25acb3){freeIsNotKeyAgent(_0x25acb3,_0x4975f5[_0xbb10('0x12')]);for(var _0x441d15=0x0,_0x8c1ce6={};_0x441d15<_0x25acb3[_0xbb10('0x41')];_0x441d15+=0x1){_0x8c1ce6=_0x25acb3[_0x441d15];var _0x9de708=_[_0xbb10('0x42')](_0x8c1ce6[_0xbb10('0x2a')])?util[_0xbb10('0x2b')]('SIP/%s',_0x8c1ce6[_0xbb10('0x29')]):_0x8c1ce6[_0xbb10('0x2a')];if(_[_0xbb10('0x43')](_0x4975f5[_0xbb10('0x12')][_0x9de708])){_0x4975f5['agents'][_0x9de708]=new Agent(_0x8c1ce6);}else{_0x4975f5[_0xbb10('0x3e')](_0x4975f5['agents'][_0x9de708],_0x8c1ce6);}}}return _0x4975f5['agents'];};};Realtime[_0xbb10('0x3f')][_0xbb10('0x44')]=function(){var _0x26e76a=this;return function(_0x120d21){if(_0x120d21){freeIsNotKeySip(_0x120d21,_0x26e76a[_0xbb10('0x13')]);for(var _0x29d11a=0x0,_0x547062={};_0x29d11a<_0x120d21[_0xbb10('0x41')];_0x29d11a+=0x1){_0x547062=_0x120d21[_0x29d11a];if(_[_0xbb10('0x43')](_0x26e76a['telephones'][util['format']('SIP/%s',_0x547062[_0xbb10('0x29')])])){_0x26e76a[_0xbb10('0x13')][util[_0xbb10('0x2b')]('SIP/%s',_0x547062[_0xbb10('0x29')])]=new Telephone(_0x547062);}else{_0x26e76a[_0xbb10('0x3e')](_0x26e76a[_0xbb10('0x13')][util['format'](_0xbb10('0x28'),_0x547062[_0xbb10('0x29')])],_0x547062);}}}return _0x26e76a[_0xbb10('0x13')];};};Realtime[_0xbb10('0x3f')]['initTrunks']=function(){var _0xd238e9=this;return function(_0x110eb5){if(_0x110eb5){freeIsNotKeySip(_0x110eb5,_0xd238e9['trunks']);for(var _0xe2040f=0x0,_0x2e3214={};_0xe2040f<_0x110eb5[_0xbb10('0x41')];_0xe2040f+=0x1){_0x2e3214=_0x110eb5[_0xe2040f];if(_[_0xbb10('0x43')](_0xd238e9[_0xbb10('0x45')][util[_0xbb10('0x2b')]('SIP/%s',_0x2e3214[_0xbb10('0x29')])])){_0xd238e9[_0xbb10('0x45')][util[_0xbb10('0x2b')](_0xbb10('0x28'),_0x2e3214['name'])]=new Trunk(_0x2e3214);}else{_0xd238e9[_0xbb10('0x3e')](_0xd238e9[_0xbb10('0x45')][util[_0xbb10('0x2b')](_0xbb10('0x28'),_0x2e3214['name'])],_0x2e3214);}}}return _0xd238e9[_0xbb10('0x45')];};};Realtime[_0xbb10('0x3f')]['initTriggers']=function(){var _0x5d9a4f=this;return function(_0x38d78f){if(_0x38d78f){freeIsNotKey(_0x38d78f,_0x5d9a4f['triggers'],'id');for(var _0x318984=0x0,_0x180933={};_0x318984<_0x38d78f['length'];_0x318984+=0x1){_0x180933=_0x38d78f[_0x318984];if(_[_0xbb10('0x43')](_0x5d9a4f[_0xbb10('0x14')][_0x180933['id']])){_0x5d9a4f[_0xbb10('0x14')][_0x180933['id']]=new Trigger(_0x180933);}else{_0x5d9a4f['mergeFromDatabase'](_0x5d9a4f[_0xbb10('0x14')][_0x180933['id']],_0x180933);}}}return _0x5d9a4f[_0xbb10('0x14')];};};Realtime[_0xbb10('0x3f')][_0xbb10('0x46')]=function(){var _0x36e1fa=this;return function(_0x19f94d){if(_0x19f94d){freeIsNotKey(_0x19f94d,_0x36e1fa[_0xbb10('0x16')],'id');for(var _0x3efa96=0x0,_0x205bb4={};_0x3efa96<_0x19f94d[_0xbb10('0x41')];_0x3efa96+=0x1){_0x205bb4=_0x19f94d[_0x3efa96];if(_[_0xbb10('0x43')](_0x36e1fa[_0xbb10('0x16')][_0x205bb4['id']])){_0x36e1fa['templates'][_0x205bb4['id']]=new Template(_0x205bb4);}else{_0x36e1fa[_0xbb10('0x3e')](_0x36e1fa[_0xbb10('0x16')][_0x205bb4['id']],_0x205bb4);}}}return _0x36e1fa['templates'];};};Realtime[_0xbb10('0x3f')][_0xbb10('0x47')]=function(){var _0x1a7df6=this;return function(_0x5a5226){if(_0x5a5226){freeIsNotKey(_0x5a5226,_0x1a7df6[_0xbb10('0x1c')],'id');for(var _0x39f0de=0x0,_0x3e06b0={};_0x39f0de<_0x5a5226['length'];_0x39f0de+=0x1){_0x3e06b0=_0x5a5226[_0x39f0de];if(_['isUndefined'](_0x1a7df6[_0xbb10('0x1c')][_0x3e06b0['id']])){_0x1a7df6[_0xbb10('0x1c')][_0x3e06b0['id']]=new ZendeskAccount(_0x3e06b0);}else{_0x1a7df6[_0xbb10('0x3e')](_0x1a7df6['zendeskAccounts'][_0x3e06b0['id']],_0x3e06b0);}}}return _0x1a7df6['zendeskAccounts'];};};Realtime[_0xbb10('0x3f')][_0xbb10('0x48')]=function(){var _0x1bd054=this;return function(_0xf820fe){if(_0xf820fe){freeIsNotKey(_0xf820fe,_0x1bd054[_0xbb10('0x1d')],'id');for(var _0x22b315=0x0,_0x2f2552={};_0x22b315<_0xf820fe[_0xbb10('0x41')];_0x22b315+=0x1){_0x2f2552=_0xf820fe[_0x22b315];if(_[_0xbb10('0x43')](_0x1bd054[_0xbb10('0x1d')][_0x2f2552['id']])){_0x1bd054['salesforceAccounts'][_0x2f2552['id']]=new SalesforceAccount(_0x2f2552);}else{_0x1bd054['mergeFromDatabase'](_0x1bd054[_0xbb10('0x1d')][_0x2f2552['id']],_0x2f2552);}}}return _0x1bd054[_0xbb10('0x1d')];};};Realtime[_0xbb10('0x3f')][_0xbb10('0x49')]=function(){var _0x36aa7d=this;return function(_0x440f9e){if(_0x440f9e){freeIsNotKey(_0x440f9e,_0x36aa7d[_0xbb10('0x1e')],'id');for(var _0x445870=0x0,_0x1c0d8f={};_0x445870<_0x440f9e[_0xbb10('0x41')];_0x445870+=0x1){_0x1c0d8f=_0x440f9e[_0x445870];if(_[_0xbb10('0x43')](_0x36aa7d[_0xbb10('0x1e')][_0x1c0d8f['id']])){_0x36aa7d[_0xbb10('0x1e')][_0x1c0d8f['id']]=new FreshdeskAccount(_0x1c0d8f);}else{_0x36aa7d[_0xbb10('0x3e')](_0x36aa7d[_0xbb10('0x1e')][_0x1c0d8f['id']],_0x1c0d8f);}}}return _0x36aa7d['freshdeskAccounts'];};};Realtime[_0xbb10('0x3f')]['initZohoAccounts']=function(){var _0x33d60a=this;return function(_0x2e21a0){if(_0x2e21a0){freeIsNotKey(_0x2e21a0,_0x33d60a[_0xbb10('0x1f')],'id');for(var _0x3f27ce=0x0,_0x26e66e={};_0x3f27ce<_0x2e21a0[_0xbb10('0x41')];_0x3f27ce+=0x1){_0x26e66e=_0x2e21a0[_0x3f27ce];if(_[_0xbb10('0x43')](_0x33d60a[_0xbb10('0x1f')][_0x26e66e['id']])){_0x33d60a[_0xbb10('0x1f')][_0x26e66e['id']]=new ZohoAccount(_0x26e66e);}else{_0x33d60a[_0xbb10('0x3e')](_0x33d60a[_0xbb10('0x1f')][_0x26e66e['id']],_0x26e66e);}}}return _0x33d60a[_0xbb10('0x1f')];};};Realtime[_0xbb10('0x3f')][_0xbb10('0x4a')]=function(){var _0x4475e1=this;return function(_0x5de0cc){if(_0x5de0cc){freeIsNotKey(_0x5de0cc,_0x4475e1[_0xbb10('0x20')],'id');for(var _0x466eb7=0x0,_0x1b83a9={};_0x466eb7<_0x5de0cc[_0xbb10('0x41')];_0x466eb7+=0x1){_0x1b83a9=_0x5de0cc[_0x466eb7];if(_[_0xbb10('0x43')](_0x4475e1[_0xbb10('0x20')][_0x1b83a9['id']])){_0x4475e1['deskAccounts'][_0x1b83a9['id']]=new DeskAccount(_0x1b83a9);}else{_0x4475e1[_0xbb10('0x3e')](_0x4475e1[_0xbb10('0x20')][_0x1b83a9['id']],_0x1b83a9);}}}return _0x4475e1[_0xbb10('0x20')];};};Realtime[_0xbb10('0x3f')][_0xbb10('0x4b')]=function(){var _0x22de7f=this;return function(_0x175872){if(_0x175872){freeIsNotKey(_0x175872,_0x22de7f[_0xbb10('0x4c')],'id');for(var _0x205e01=0x0,_0x40c4fb={};_0x205e01<_0x175872[_0xbb10('0x41')];_0x205e01+=0x1){_0x40c4fb=_0x175872[_0x205e01];if(_[_0xbb10('0x43')](_0x22de7f[_0xbb10('0x4c')][_0x40c4fb['id']])){_0x22de7f['sugarcrmAccounts'][_0x40c4fb['id']]=new SugarcrmAccount(_0x40c4fb);}else{_0x22de7f['mergeFromDatabase'](_0x22de7f[_0xbb10('0x4c')][_0x40c4fb['id']],_0x40c4fb);}}}return _0x22de7f[_0xbb10('0x4c')];};};Realtime[_0xbb10('0x3f')][_0xbb10('0x4d')]=function(){var _0x5573bb=this;return function(_0x506498){if(_0x506498){freeIsNotKey(_0x506498,_0x5573bb[_0xbb10('0x21')],'id');for(var _0xaf2cc3=0x0,_0x410bef={};_0xaf2cc3<_0x506498[_0xbb10('0x41')];_0xaf2cc3+=0x1){_0x410bef=_0x506498[_0xaf2cc3];if(_[_0xbb10('0x43')](_0x5573bb[_0xbb10('0x21')][_0x410bef['id']])){_0x5573bb[_0xbb10('0x21')][_0x410bef['id']]=new VtigerAccount(_0x410bef);}else{_0x5573bb['mergeFromDatabase'](_0x5573bb[_0xbb10('0x21')][_0x410bef['id']],_0x410bef);}}}return _0x5573bb[_0xbb10('0x21')];};};Realtime['prototype']['initServicenowAccounts']=function(){var _0x5a231f=this;return function(_0x32c1e8){if(_0x32c1e8){freeIsNotKey(_0x32c1e8,_0x5a231f[_0xbb10('0x22')],'id');for(var _0x155dc5=0x0,_0x5bd1c0={};_0x155dc5<_0x32c1e8['length'];_0x155dc5+=0x1){_0x5bd1c0=_0x32c1e8[_0x155dc5];if(_['isUndefined'](_0x5a231f[_0xbb10('0x22')][_0x5bd1c0['id']])){_0x5a231f[_0xbb10('0x22')][_0x5bd1c0['id']]=new ServicenowAccount(_0x5bd1c0);}else{_0x5a231f[_0xbb10('0x3e')](_0x5a231f['servicenowAccounts'][_0x5bd1c0['id']],_0x5bd1c0);}}}return _0x5a231f[_0xbb10('0x22')];};};Realtime[_0xbb10('0x3f')]['initDynamics365Accounts']=function(){var _0x4a560c=this;return function(_0x27d7b9){if(_0x27d7b9){freeIsNotKey(_0x27d7b9,_0x4a560c[_0xbb10('0x23')],'id');for(var _0xd77753=0x0,_0x237246={};_0xd77753<_0x27d7b9['length'];_0xd77753+=0x1){_0x237246=_0x27d7b9[_0xd77753];if(_[_0xbb10('0x43')](_0x4a560c[_0xbb10('0x23')][_0x237246['id']])){_0x4a560c[_0xbb10('0x23')][_0x237246['id']]=new Dynamics365Account(_0x237246);}else{_0x4a560c['mergeFromDatabase'](_0x4a560c[_0xbb10('0x23')][_0x237246['id']],_0x237246);}}}return _0x4a560c[_0xbb10('0x23')];};};Realtime[_0xbb10('0x3f')]['initFreshsalesAccounts']=function(){var _0x2ca491=this;return function(_0x31e85e){if(_0x31e85e){freeIsNotKey(_0x31e85e,_0x2ca491[_0xbb10('0x24')],'id');for(var _0x37b65f=0x0,_0x5e4a6e={};_0x37b65f<_0x31e85e[_0xbb10('0x41')];_0x37b65f+=0x1){_0x5e4a6e=_0x31e85e[_0x37b65f];if(_[_0xbb10('0x43')](_0x2ca491[_0xbb10('0x24')][_0x5e4a6e['id']])){_0x2ca491[_0xbb10('0x24')][_0x5e4a6e['id']]=new FreshsalesAccount(_0x5e4a6e);}else{_0x2ca491['mergeFromDatabase'](_0x2ca491[_0xbb10('0x24')][_0x5e4a6e['id']],_0x5e4a6e);}}}return _0x2ca491[_0xbb10('0x24')];};};Realtime[_0xbb10('0x3f')][_0xbb10('0x4e')]=function(){var _0x12f750=this;return function(_0x17807e){for(var _0x1e4694=0x0;_0x1e4694<_0x17807e['length'];_0x1e4694+=0x1){_['merge'](_0x12f750['voiceQueues'][_0x17807e[_0x1e4694][_0xbb10('0x29')]],_0x17807e[_0x1e4694]);}return _0x12f750[_0xbb10('0x4f')];};};Realtime[_0xbb10('0x3f')]['initVoiceQueueReports']=function(){var _0x5cd089=this;return function(_0x46f462){clearVoiceQueues(_0x5cd089[_0xbb10('0x4f')]);if(_0x46f462){_0x46f462=_[_0xbb10('0x50')](_0x46f462,_0xbb10('0x51'));for(var _0x260e06 in _0x46f462){if(_0x46f462[_0xbb10('0x27')](_0x260e06)){for(var _0x4cf2f3=0x0;_0x4cf2f3<_0x46f462[_0x260e06][_0xbb10('0x41')];_0x4cf2f3+=0x1){var _0x15fae2=_0x46f462[_0x260e06][_0x4cf2f3][_0xbb10('0x52')];if(_0x5cd089[_0xbb10('0x4f')][_0x15fae2]){if(_0x46f462[_0x260e06][_0x4cf2f3][_0xbb10('0x53')]){_0x5cd089['voiceQueues'][_0x15fae2]['unmanaged']+=0x1;}if(_0x46f462[_0x260e06][_0x4cf2f3]['queuecallerabandon']){_0x5cd089[_0xbb10('0x4f')][_0x15fae2][_0xbb10('0x54')]+=0x1;}_0x5cd089[_0xbb10('0x4f')][_0x15fae2][_0xbb10('0x2e')]+=moment(_0x46f462[_0x260e06][_0x4cf2f3][_0xbb10('0x55')])[_0xbb10('0x56')](moment(_0x46f462[_0x260e06][_0x4cf2f3]['queuecallerjoinAt']),_0xbb10('0x57'))||0x0;if(_0x4cf2f3===_0x46f462[_0x260e06]['length']-0x1){_0x5cd089['voiceQueues'][_0x15fae2]['sumDuration']+=moment(_0x46f462[_0x260e06][_0x4cf2f3][_0xbb10('0x58')]||_0x46f462[_0x260e06][_0x4cf2f3][_0xbb10('0x59')]||_0x46f462[_0x260e06][_0x4cf2f3][_0xbb10('0x5a')])[_0xbb10('0x56')](moment(_0x46f462[_0x260e06][_0x4cf2f3]['queuecallerjoinAt']),_0xbb10('0x57'))||0x0;_0x5cd089['voiceQueues'][_0x15fae2]['total']+=0x1;if(_0x46f462[_0x260e06][_0x4cf2f3][_0xbb10('0x5b')]){_0x5cd089[_0xbb10('0x4f')][_0x15fae2][_0xbb10('0x2d')]+=0x1;_0x5cd089[_0xbb10('0x4f')][_0x15fae2][_0xbb10('0x33')]+=moment(_0x46f462[_0x260e06][_0x4cf2f3]['queuecallercompleteAt'])[_0xbb10('0x56')](moment(_0x46f462[_0x260e06][_0x4cf2f3][_0xbb10('0x55')]),_0xbb10('0x57'))||0x0;}}else{_0x5cd089[_0xbb10('0x4f')][_0x15fae2][_0xbb10('0x2f')]+=_0x5cd089[_0xbb10('0x4f')][_0x15fae2][_0xbb10('0x2e')]||0x0;}}}}}}return _0x5cd089['voiceQueues'];};};Realtime[_0xbb10('0x3f')][_0xbb10('0x5c')]=function(){var _0x30f3ea=this;return function(_0x322b41){clearVoiceCallReports(_0x30f3ea[_0xbb10('0x5d')]);if(_0x322b41){for(var _0x172be3=0x0;_0x172be3<_0x322b41[_0xbb10('0x41')];_0x172be3+=0x1){_0x30f3ea[_0xbb10('0x5d')]['total']+=0x1;_0x30f3ea[_0xbb10('0x5d')][_0xbb10('0x2f')]+=_0x322b41[_0x172be3][_0xbb10('0x5e')];if(_0x322b41[_0x172be3]['disposition']==='ANSWERED'){_0x30f3ea['outbound'][_0xbb10('0x2d')]+=0x1;_0x30f3ea['outbound']['sumHoldTime']+=_0x322b41[_0x172be3][_0xbb10('0x5e')]-_0x322b41[_0x172be3][_0xbb10('0x5f')]||0x0;_0x30f3ea[_0xbb10('0x5d')][_0xbb10('0x33')]+=_0x322b41[_0x172be3][_0xbb10('0x5f')];}}}return _0x30f3ea[_0xbb10('0x5d')];};};Realtime[_0xbb10('0x3f')][_0xbb10('0x60')]=function(){var _0x188b97=this;return function(_0x5206e1){if(_0x5206e1){freeIsNotKey(_0x5206e1,_0x188b97[_0xbb10('0x15')],_0xbb10('0x29'));for(var _0x46b6d2=0x0,_0x35b811={};_0x46b6d2<_0x5206e1['length'];_0x46b6d2+=0x1){_0x35b811=_0x5206e1[_0x46b6d2];if(_['isUndefined'](_0x188b97[_0xbb10('0x15')][_0x35b811[_0xbb10('0x29')]])){_0x188b97[_0xbb10('0x15')][_0x35b811[_0xbb10('0x29')]]=new Campaign(_0x35b811);}else{_0x188b97['mergeFromDatabase'](_0x188b97[_0xbb10('0x15')][_0x35b811[_0xbb10('0x29')]],_0x35b811);_0x188b97[_0xbb10('0x15')][_0x35b811[_0xbb10('0x29')]][_0xbb10('0x61')]=_0x35b811['SquareProject']?_0x35b811['SquareProject'][_0xbb10('0x29')]:undefined;}}}return _0x188b97[_0xbb10('0x15')];};};Realtime[_0xbb10('0x3f')]['initVoiceExtensions']=function(){var _0x256b35=this;return function(_0x13e2ab){if(_0x13e2ab){freeIsNotKey(_0x13e2ab,_0x256b35['voiceExtensions'],'id');for(var _0x5caa06=0x0,_0x2f667f={};_0x5caa06<_0x13e2ab[_0xbb10('0x41')];_0x5caa06+=0x1){_0x2f667f=_0x13e2ab[_0x5caa06];if(_[_0xbb10('0x43')](_0x256b35['voiceExtensions'][_0x2f667f['id']])){_0x256b35[_0xbb10('0x17')][_0x2f667f['id']]=new VoiceExtension(_0x2f667f);}else{_0x256b35[_0xbb10('0x3e')](_0x256b35[_0xbb10('0x17')][_0x2f667f['id']],_0x2f667f);}}}return _0x256b35[_0xbb10('0x17')];};};Realtime[_0xbb10('0x3f')][_0xbb10('0x62')]=function(){var _0x45bd4e=this;return function(_0x226363){clearCampaigns(_0x45bd4e[_0xbb10('0x15')]);for(var _0x479d51=0x0;_0x479d51<_0x226363[_0xbb10('0x41')];_0x479d51+=0x1){_[_0xbb10('0x63')](_0x45bd4e[_0xbb10('0x15')][_0x226363[_0x479d51][_0xbb10('0x29')]],_0x226363[_0x479d51]);}return _0x45bd4e[_0xbb10('0x15')];};};Realtime[_0xbb10('0x3f')][_0xbb10('0x64')]=function(){var _0x305d52=this;return function(_0x17ed20){if(_0x17ed20){freeIsNotKey(_0x17ed20,_0x305d52[_0xbb10('0x25')],'id');for(var _0x15e043=0x0,_0x2a4278={};_0x15e043<_0x17ed20['length'];_0x15e043+=0x1){_0x2a4278=_0x17ed20[_0x15e043];if(_['isUndefined'](_0x305d52[_0xbb10('0x25')][_0x2a4278['id']])){_0x305d52[_0xbb10('0x25')][_0x2a4278['id']]=new FaxAccount(_0x2a4278);}else{_0x305d52[_0xbb10('0x3e')](_0x305d52[_0xbb10('0x25')][_0x2a4278['id']],_0x2a4278);}}}return _0x305d52[_0xbb10('0x25')];};};Realtime['prototype'][_0xbb10('0x65')]=function(){var _0x332fbe=this;return function(_0x3b4d0b){if(_0x3b4d0b){freeIsNotKey(_0x3b4d0b,_0x332fbe[_0xbb10('0x4f')],_0xbb10('0x29'));for(var _0x379d49=0x0,_0x546db5={};_0x379d49<_0x3b4d0b[_0xbb10('0x41')];_0x379d49+=0x1){_0x546db5=_0x3b4d0b[_0x379d49];if(_[_0xbb10('0x43')](_0x332fbe['voiceQueues'][_0x546db5[_0xbb10('0x29')]])){_0x332fbe['voiceQueues'][_0x546db5[_0xbb10('0x29')]]=new VoiceQueue(_0x546db5);}else{_0x332fbe[_0xbb10('0x3e')](_0x332fbe[_0xbb10('0x4f')][_0x546db5[_0xbb10('0x29')]],_0x546db5);}}}return _0x332fbe[_0xbb10('0x4f')];};};module['exports']=Realtime;
\ No newline at end of file
index a57b292..04db4f6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3218=['mergeDBDataToRealtime','assign','hasOwnProperty'];(function(_0x15ff2c,_0x305de2){var _0x594127=function(_0x327592){while(--_0x327592){_0x15ff2c['push'](_0x15ff2c['shift']());}};_0x594127(++_0x305de2);}(_0x3218,0x1c3));var _0x8321=function(_0x541260,_0x4c7f2e){_0x541260=_0x541260-0x0;var _0x1dd2b5=_0x3218[_0x541260];return _0x1dd2b5;};'use strict';function mergeDBDataToRealtime(_0x38c355,_0x43e5c4){var _0x25c654=Object[_0x8321('0x0')]({},_0x38c355);for(var _0xeb2d4d in _0x43e5c4){if(_0x25c654[_0x8321('0x1')](_0xeb2d4d)){_0x25c654[_0xeb2d4d]=_0x43e5c4[_0xeb2d4d];}}return _0x25c654;}exports[_0x8321('0x2')]=mergeDBDataToRealtime;
\ No newline at end of file
+var _0x1b01=['assign','hasOwnProperty','mergeDBDataToRealtime'];(function(_0x3fbbfb,_0x459366){var _0x2a00d4=function(_0x239710){while(--_0x239710){_0x3fbbfb['push'](_0x3fbbfb['shift']());}};_0x2a00d4(++_0x459366);}(_0x1b01,0xd8));var _0x11b0=function(_0x22814f,_0x3b4afc){_0x22814f=_0x22814f-0x0;var _0x523be1=_0x1b01[_0x22814f];return _0x523be1;};'use strict';function mergeDBDataToRealtime(_0x373dc9,_0x244ecb){var _0x4ac15b=Object[_0x11b0('0x0')]({},_0x373dc9);for(var _0x41320e in _0x244ecb){if(_0x4ac15b[_0x11b0('0x1')](_0x41320e)){_0x4ac15b[_0x41320e]=_0x244ecb[_0x41320e];}}return _0x4ac15b;}exports[_0x11b0('0x2')]=mergeDBDataToRealtime;
\ No newline at end of file
index 768af13..ed5b3bf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8f3e=['telephones','prototype','sync','xdr','disabled','custom:voiceQueueReport','voiceQueueReport','bind','custom:voiceAgentReport','custom:voiceDialReport','voiceDialReport','blindtransfer','blindTransfer','attendedtransfer','attendedTransfer','findAgent','find','accountcode','name','format','SIP/%s','assigned','lastAssignedTo','interface','isNil','queuecallercomplete','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexit','match','getAgentByInternal','keys','length','getCallType','channel','internal','voiceCallReport','destination','exten','type','dialer','lastapplication','lastdata','context','from-voip-provider','callerid','xcally-motion-preview','calleridpreview','calleridnum','originatecalleridnum','disposition','ANSWERED','connectedlinenum','\x22%s\x22\x20<%s>','transfers','linkedid','transfereelinkedid','UserId','membername','create','monitor','monitorFilename','monitors','filename','createdAt','calleridname','connectedlinename','xcally-motion-dialer','voiceAgentReport','isArray','forEach','startsWith','Local','substring','indexOf','mobile','phone','lastIndexOf','transfererlinkedid','lodash','moment','util','../../../config/environment','../ami','../rpc/voiceAgentReport','../rpc/voiceCallReport','../rpc/voiceDialReport','../rpc/memberReport','../rpc/voiceRecording','../rpc/voiceTransferReport','./voiceAgentReport','./voiceDialReport','./userReport','realtime','agents'];(function(_0x526589,_0x5b9207){var _0x4ea997=function(_0x524516){while(--_0x524516){_0x526589['push'](_0x526589['shift']());}};_0x4ea997(++_0x5b9207);}(_0x8f3e,0x1cb));var _0xe8f3=function(_0x1c5319,_0x3a5250){_0x1c5319=_0x1c5319-0x0;var _0x540520=_0x8f3e[_0x1c5319];return _0x540520;};'use strict';var _=require(_0xe8f3('0x0'));var moment=require(_0xe8f3('0x1'));var util=require(_0xe8f3('0x2'));var config=require(_0xe8f3('0x3'));var ami=require(_0xe8f3('0x4'));var RpcVoiceAgentReport=require(_0xe8f3('0x5'));var RpcVoiceCallReport=require(_0xe8f3('0x6'));var RpcVoiceDialReport=require(_0xe8f3('0x7'));var RpcMemberReport=require(_0xe8f3('0x8'));var RpcVoiceQueueReport=require('../rpc/voiceQueueReport');var RpcVoiceRecording=require(_0xe8f3('0x9'));var RpcVoiceTransferReport=require(_0xe8f3('0xa'));var VoiceQueueReport=require('./voiceQueueReport');var VoiceCallReport=require('./voiceCallReport');var VoiceAgentReport=require(_0xe8f3('0xb'));var VoiceDialReport=require(_0xe8f3('0xc'));var UserReport=require(_0xe8f3('0xd'));function Report(_0x45228d){this[_0xe8f3('0xe')]=_0x45228d;this['agents']=_0x45228d[_0xe8f3('0xf')];this[_0xe8f3('0x10')]=_0x45228d[_0xe8f3('0x10')];}Report[_0xe8f3('0x11')][_0xe8f3('0x12')]=function(_0x1c076a){var _0xbd62a0=new VoiceQueueReport(this[_0xe8f3('0xe')]);var _0x29bdd0=new VoiceAgentReport(this[_0xe8f3('0xe')]);var _0x4d0e9e=new VoiceDialReport(this[_0xe8f3('0xe')]);var _0x2e8c8b=new VoiceCallReport(this[_0xe8f3('0xe')]);var _0x35ead9=new UserReport(this[_0xe8f3('0xe')]);if(config[_0xe8f3('0x13')]&&config['xdr'][_0xe8f3('0x14')]){ami['on'](_0xe8f3('0x15'),this[_0xe8f3('0x16')][_0xe8f3('0x17')](this));ami['on']('custom:voiceCallReport',this['voiceCallReport'][_0xe8f3('0x17')](this));ami['on'](_0xe8f3('0x18'),this['voiceAgentReport'][_0xe8f3('0x17')](this));ami['on'](_0xe8f3('0x19'),this[_0xe8f3('0x1a')][_0xe8f3('0x17')](this));ami['on'](_0xe8f3('0x1b'),this[_0xe8f3('0x1c')][_0xe8f3('0x17')](this));ami['on'](_0xe8f3('0x1d'),this[_0xe8f3('0x1e')][_0xe8f3('0x17')](this));}};Report[_0xe8f3('0x11')][_0xe8f3('0x1f')]=function(_0xebebdc){var _0xa146af;_0xa146af=_[_0xe8f3('0x20')](this[_0xe8f3('0xf')],function(_0x2c15c7){return _0x2c15c7[_0xe8f3('0x21')]==_0xebebdc||_0x2c15c7[_0xe8f3('0x22')]==_0xebebdc;});if(_['isNil'](_0xa146af)){var _0x3a6f53=_['find'](this['telephones'],function(_0x2c0149){return _0x2c0149['accountcode']==_0xebebdc||_0x2c0149[_0xe8f3('0x22')]==_0xebebdc;});if(_0x3a6f53){_0xa146af=_['find'](this[_0xe8f3('0xf')],function(_0x2e989c){return _0x2e989c['interface']==util[_0xe8f3('0x23')](_0xe8f3('0x24'),_0x3a6f53['name']);});}}return _0xa146af;};Report['prototype'][_0xe8f3('0x16')]=function(_0x12a0d1){for(var _0x4b90fd=0x0;_0x4b90fd<_0x12a0d1['length'];_0x4b90fd+=0x1){var _0x4e4b71=this[_0xe8f3('0x1f')](_0x12a0d1[_0x4b90fd]['connectedlinenum']);if(_0x4e4b71){_0x12a0d1[_0x4b90fd][_0xe8f3('0x21')]=_0x4e4b71[_0xe8f3('0x21')];_0x12a0d1[_0x4b90fd][_0xe8f3('0x25')]=!![];_0x12a0d1[_0x4b90fd][_0xe8f3('0x26')]=_0x4e4b71[_0xe8f3('0x22')];_0x12a0d1[_0x4b90fd][_0xe8f3('0x27')]=_[_0xe8f3('0x28')](_0x4e4b71[_0xe8f3('0x27')])?util[_0xe8f3('0x23')](_0xe8f3('0x24'),_0x4e4b71[_0xe8f3('0x22')]):_0x4e4b71['interface'];if(_0x12a0d1[_0x4b90fd][_0xe8f3('0x29')]){_0x12a0d1[_0x4b90fd][_0xe8f3('0x2a')]=moment()[_0xe8f3('0x23')](_0xe8f3('0x2b'));}if(_0x12a0d1[_0x4b90fd][_0xe8f3('0x2c')]){_0x12a0d1[_0x4b90fd]['queuecallerexitAt']=moment()[_0xe8f3('0x23')]('YYYY-MM-DD\x20HH:mm:ss');}RpcMemberReport[_0xe8f3('0x16')](_0x12a0d1[_0x4b90fd]);}RpcVoiceQueueReport['create'](_0x12a0d1[_0x4b90fd]);}};function extractCalleridNumber(_0x9aadff){var _0x5cf43e=_0x9aadff[_0xe8f3('0x2d')](/<(.*?)>/);return _0x5cf43e?_0x5cf43e[0x1]:_0x9aadff;}Report[_0xe8f3('0x11')][_0xe8f3('0x2e')]=function(_0x1e3ac9){for(var _0x4ba83a=0x0;_0x4ba83a<Object[_0xe8f3('0x2f')](this[_0xe8f3('0xf')])[_0xe8f3('0x30')];_0x4ba83a++){var _0x4b363a=Object['keys'](this['agents'])[_0x4ba83a];var _0x44c1b5=this[_0xe8f3('0xf')][_0x4b363a];if(_0x44c1b5['accountcode']===Number(_0x1e3ac9))return _0x44c1b5;}return null;};Report[_0xe8f3('0x11')][_0xe8f3('0x31')]=function(_0x3a8103){var _0x2a1400=_0x3a8103[_0xe8f3('0x32')]['split']('-')[0x0];var _0x4fe312=this[_0xe8f3('0xf')][_0x2a1400];if(!_0x4fe312)_0x4fe312=this[_0xe8f3('0x2e')](_0x3a8103['calleridnum']);return!_0x4fe312?'outbound':_0xe8f3('0x33');};Report[_0xe8f3('0x11')][_0xe8f3('0x34')]=function(_0x4e6ecb){_0x4e6ecb[_0xe8f3('0x35')]=_0x4e6ecb['destination']||_0x4e6ecb[_0xe8f3('0x36')];if(_0x4e6ecb[_0xe8f3('0x37')]==_0xe8f3('0x38')){_0x4e6ecb[_0xe8f3('0x39')]='queue';_0x4e6ecb[_0xe8f3('0x3a')]=_0x4e6ecb['queue'];if(_0x4e6ecb[_0xe8f3('0x3b')]==_0xe8f3('0x3c')){_0x4e6ecb[_0xe8f3('0x21')]='';_0x4e6ecb[_0xe8f3('0x35')]=extractCalleridNumber(_0x4e6ecb[_0xe8f3('0x3d')]);}else if(_0x4e6ecb[_0xe8f3('0x3b')]=='from-sip'){if(_0x4e6ecb[_0xe8f3('0x35')]==_0xe8f3('0x3e')){_0x4e6ecb[_0xe8f3('0x35')]=extractCalleridNumber(_0x4e6ecb[_0xe8f3('0x3f')]);_0x4e6ecb[_0xe8f3('0x40')]=_0x4e6ecb[_0xe8f3('0x41')];_0x4e6ecb['destinationchannel']=[_0x4e6ecb[_0xe8f3('0x32')],_0x4e6ecb[_0xe8f3('0x32')]=_0x4e6ecb['destinationchannel']][0x0];_0x4e6ecb['callerid']=_0x4e6ecb[_0xe8f3('0x3f')];}else{_0x4e6ecb[_0xe8f3('0x35')]=_0x4e6ecb[_0xe8f3('0x40')];_0x4e6ecb[_0xe8f3('0x40')]=_0x4e6ecb['originatecalleridnum'];if(_0x4e6ecb[_0xe8f3('0x42')]==_0xe8f3('0x43')){_0x4e6ecb[_0xe8f3('0x21')]=_0x4e6ecb[_0xe8f3('0x44')];}else{_0x4e6ecb[_0xe8f3('0x21')]='';}}}}else{_0x4e6ecb['callerid']=util[_0xe8f3('0x23')](_0xe8f3('0x45'),_0x4e6ecb['calleridname'],_0x4e6ecb[_0xe8f3('0x40')]);}if(RpcVoiceTransferReport[_0xe8f3('0x46')][_0x4e6ecb[_0xe8f3('0x47')]]){var _0x2e7d5d=RpcVoiceTransferReport[_0xe8f3('0x46')][_0x4e6ecb['linkedid']];_0x2e7d5d[_0xe8f3('0x48')]=_0x4e6ecb['uniqueid'];RpcVoiceTransferReport[_0xe8f3('0x1c')](_0x2e7d5d);delete RpcVoiceTransferReport['transfers'][_0x4e6ecb['linkedid']];}if(_[_0xe8f3('0x28')](_0x4e6ecb[_0xe8f3('0x37')])){_0x4e6ecb[_0xe8f3('0x37')]=this[_0xe8f3('0x31')](_0x4e6ecb);}if(_[_0xe8f3('0x28')](_0x4e6ecb[_0xe8f3('0x49')])){var _0x13dca1=_0x4e6ecb[_0xe8f3('0x32')]['split']('-')[0x0];var _0x5b4380=this[_0xe8f3('0xf')][_0x13dca1];if(!_0x5b4380)_0x5b4380=this[_0xe8f3('0x2e')](_0x4e6ecb[_0xe8f3('0x21')]);if(_0x5b4380){_0x4e6ecb[_0xe8f3('0x49')]=_0x5b4380['id'];_0x4e6ecb[_0xe8f3('0x4a')]=_0x5b4380[_0xe8f3('0x22')];}}RpcVoiceCallReport[_0xe8f3('0x4b')](_0x4e6ecb);if(_0x4e6ecb[_0xe8f3('0x4c')]){for(var _0x408ea5=0x0;_0x408ea5<_0x4e6ecb['monitors'][_0xe8f3('0x30')];_0x408ea5+=0x1){_0x4e6ecb[_0xe8f3('0x4d')]=_0x4e6ecb[_0xe8f3('0x4e')][_0x408ea5][_0xe8f3('0x4f')];_0x4e6ecb[_0xe8f3('0x50')]=_0x4e6ecb[_0xe8f3('0x4e')][_0x408ea5]['createdAt'];if(_0x4e6ecb[_0xe8f3('0x36')]==_0xe8f3('0x3e')){_0x4e6ecb['calleridnum']=_0x4e6ecb[_0xe8f3('0x44')];_0x4e6ecb[_0xe8f3('0x51')]=_0x4e6ecb[_0xe8f3('0x52')];_0x4e6ecb[_0xe8f3('0x44')]=_0x4e6ecb['accountcode'];_0x4e6ecb['connectedlinename']=_0x4e6ecb['membername'];_0x4e6ecb[_0xe8f3('0x36')]=_0x4e6ecb[_0xe8f3('0x41')];}else if(_0x4e6ecb['exten']==_0xe8f3('0x53')){_0x4e6ecb[_0xe8f3('0x40')]=_0x4e6ecb[_0xe8f3('0x35')];_0x4e6ecb['exten']=_0x4e6ecb[_0xe8f3('0x41')];}RpcVoiceRecording[_0xe8f3('0x4b')](_0x4e6ecb);}}};Report['prototype'][_0xe8f3('0x54')]=function(_0x4922b5){if(_[_0xe8f3('0x55')](_0x4922b5)){_0x4922b5[_0xe8f3('0x56')](function(_0x12317d){RpcVoiceAgentReport[_0xe8f3('0x4b')](_0x12317d);});}else{RpcVoiceAgentReport[_0xe8f3('0x4b')](_0x4922b5);}};Report[_0xe8f3('0x11')][_0xe8f3('0x1a')]=function(_0x15f01a){RpcVoiceDialReport[_0xe8f3('0x4b')](_0x15f01a);var _0x1d7b2f;var _0x14379d;var _0xf4739a=_0x15f01a['channel'];if(_[_0xe8f3('0x57')](_0xf4739a,_0xe8f3('0x58'))){_0x14379d=_0xf4739a[_0xe8f3('0x59')](_0xf4739a['indexOf']('/')+0x1,_0xf4739a[_0xe8f3('0x5a')]('@'));_0x1d7b2f=_[_0xe8f3('0x20')](this[_0xe8f3('0xf')],function(_0x597a8d){return _0x597a8d[_0xe8f3('0x5b')]==_0x14379d||_0x597a8d[_0xe8f3('0x5c')]==_0x14379d||_0x597a8d[_0xe8f3('0x21')]==_0x14379d;});}else{_0x14379d=_0xf4739a['substring'](_0xf4739a[_0xe8f3('0x5a')]('/')+0x1,_0xf4739a[_0xe8f3('0x5d')]('-'));_0x1d7b2f=this['findAgent'](_0x14379d);}if(_0x1d7b2f){_0x15f01a['interface']=_[_0xe8f3('0x28')](_0x1d7b2f[_0xe8f3('0x27')])?util[_0xe8f3('0x23')](_0xe8f3('0x24'),_0x1d7b2f[_0xe8f3('0x22')]):_0x1d7b2f[_0xe8f3('0x27')];_0x15f01a[_0xe8f3('0x4a')]=_0x1d7b2f[_0xe8f3('0x22')];_0x15f01a[_0xe8f3('0x21')]=_0x1d7b2f[_0xe8f3('0x21')];RpcMemberReport[_0xe8f3('0x1a')](_0x15f01a);}};Report[_0xe8f3('0x11')][_0xe8f3('0x1c')]=function(_0x4e2804){RpcVoiceTransferReport[_0xe8f3('0x46')][_0x4e2804[_0xe8f3('0x5e')]]=_0x4e2804;};Report[_0xe8f3('0x11')]['attendedTransfer']=function(_0x2c09a3){RpcVoiceTransferReport[_0xe8f3('0x1e')](_0x2c09a3);};module['exports']=Report;
\ No newline at end of file
+var _0xd477=['blindTransfer','attendedtransfer','findAgent','find','accountcode','name','isNil','interface','format','SIP/%s','length','connectedlinenum','queuecallercomplete','queuecallercompleteAt','YYYY-MM-DD\x20HH:mm:ss','queuecallerexit','queuecallerexitAt','voiceQueueReport','create','keys','getCallType','channel','calleridnum','outbound','destination','exten','type','dialer','queue','lastdata','from-voip-provider','callerid','from-sip','xcally-motion-preview','calleridpreview','originatecalleridnum','destinationchannel','ANSWERED','\x22%s\x22\x20<%s>','calleridname','transfers','linkedid','transfereelinkedid','UserId','split','getAgentByInternal','membername','monitor','monitors','monitorFilename','createdAt','xcally-motion-dialer','isArray','forEach','startsWith','Local','substring','indexOf','phone','lastIndexOf','transfererlinkedid','exports','lodash','moment','../../../config/environment','../ami','../rpc/voiceAgentReport','../rpc/voiceCallReport','../rpc/memberReport','../rpc/voiceRecording','./voiceQueueReport','./voiceAgentReport','./userReport','realtime','agents','telephones','prototype','sync','xdr','disabled','custom:voiceQueueReport','custom:voiceCallReport','voiceAgentReport','bind','voiceDialReport','blindtransfer'];(function(_0x54967c,_0x46540e){var _0x1b8975=function(_0x1cda99){while(--_0x1cda99){_0x54967c['push'](_0x54967c['shift']());}};_0x1b8975(++_0x46540e);}(_0xd477,0xea));var _0x7d47=function(_0x5cec18,_0x34d5ea){_0x5cec18=_0x5cec18-0x0;var _0x4b878f=_0xd477[_0x5cec18];return _0x4b878f;};'use strict';var _=require(_0x7d47('0x0'));var moment=require(_0x7d47('0x1'));var util=require('util');var config=require(_0x7d47('0x2'));var ami=require(_0x7d47('0x3'));var RpcVoiceAgentReport=require(_0x7d47('0x4'));var RpcVoiceCallReport=require(_0x7d47('0x5'));var RpcVoiceDialReport=require('../rpc/voiceDialReport');var RpcMemberReport=require(_0x7d47('0x6'));var RpcVoiceQueueReport=require('../rpc/voiceQueueReport');var RpcVoiceRecording=require(_0x7d47('0x7'));var RpcVoiceTransferReport=require('../rpc/voiceTransferReport');var VoiceQueueReport=require(_0x7d47('0x8'));var VoiceCallReport=require('./voiceCallReport');var VoiceAgentReport=require(_0x7d47('0x9'));var VoiceDialReport=require('./voiceDialReport');var UserReport=require(_0x7d47('0xa'));function Report(_0x545f2c){this[_0x7d47('0xb')]=_0x545f2c;this['agents']=_0x545f2c[_0x7d47('0xc')];this[_0x7d47('0xd')]=_0x545f2c[_0x7d47('0xd')];}Report[_0x7d47('0xe')][_0x7d47('0xf')]=function(_0x252fa6){var _0x4d285d=new VoiceQueueReport(this[_0x7d47('0xb')]);var _0x501c90=new VoiceAgentReport(this[_0x7d47('0xb')]);var _0x863ab1=new VoiceDialReport(this[_0x7d47('0xb')]);var _0x45c375=new VoiceCallReport(this[_0x7d47('0xb')]);var _0x4a4088=new UserReport(this['realtime']);if(config[_0x7d47('0x10')]&&config['xdr'][_0x7d47('0x11')]){ami['on'](_0x7d47('0x12'),this['voiceQueueReport']['bind'](this));ami['on'](_0x7d47('0x13'),this['voiceCallReport']['bind'](this));ami['on']('custom:voiceAgentReport',this[_0x7d47('0x14')][_0x7d47('0x15')](this));ami['on']('custom:voiceDialReport',this[_0x7d47('0x16')]['bind'](this));ami['on'](_0x7d47('0x17'),this[_0x7d47('0x18')]['bind'](this));ami['on'](_0x7d47('0x19'),this['attendedTransfer'][_0x7d47('0x15')](this));}};Report[_0x7d47('0xe')][_0x7d47('0x1a')]=function(_0x271c0f){var _0x518680;_0x518680=_[_0x7d47('0x1b')](this[_0x7d47('0xc')],function(_0x54453b){return _0x54453b[_0x7d47('0x1c')]==_0x271c0f||_0x54453b[_0x7d47('0x1d')]==_0x271c0f;});if(_[_0x7d47('0x1e')](_0x518680)){var _0x59dcf0=_[_0x7d47('0x1b')](this['telephones'],function(_0x7b1b39){return _0x7b1b39[_0x7d47('0x1c')]==_0x271c0f||_0x7b1b39[_0x7d47('0x1d')]==_0x271c0f;});if(_0x59dcf0){_0x518680=_[_0x7d47('0x1b')](this['agents'],function(_0x19062e){return _0x19062e[_0x7d47('0x1f')]==util[_0x7d47('0x20')](_0x7d47('0x21'),_0x59dcf0['name']);});}}return _0x518680;};Report[_0x7d47('0xe')]['voiceQueueReport']=function(_0x2b552c){for(var _0x3e476a=0x0;_0x3e476a<_0x2b552c[_0x7d47('0x22')];_0x3e476a+=0x1){var _0x230ac7=this[_0x7d47('0x1a')](_0x2b552c[_0x3e476a][_0x7d47('0x23')]);if(_0x230ac7){_0x2b552c[_0x3e476a]['accountcode']=_0x230ac7['accountcode'];_0x2b552c[_0x3e476a]['assigned']=!![];_0x2b552c[_0x3e476a]['lastAssignedTo']=_0x230ac7['name'];_0x2b552c[_0x3e476a]['interface']=_[_0x7d47('0x1e')](_0x230ac7[_0x7d47('0x1f')])?util['format'](_0x7d47('0x21'),_0x230ac7['name']):_0x230ac7['interface'];if(_0x2b552c[_0x3e476a][_0x7d47('0x24')]){_0x2b552c[_0x3e476a][_0x7d47('0x25')]=moment()['format'](_0x7d47('0x26'));}if(_0x2b552c[_0x3e476a][_0x7d47('0x27')]){_0x2b552c[_0x3e476a][_0x7d47('0x28')]=moment()[_0x7d47('0x20')](_0x7d47('0x26'));}RpcMemberReport[_0x7d47('0x29')](_0x2b552c[_0x3e476a]);}RpcVoiceQueueReport[_0x7d47('0x2a')](_0x2b552c[_0x3e476a]);}};function extractCalleridNumber(_0x313108){var _0x5c24b7=_0x313108['match'](/<(.*?)>/);return _0x5c24b7?_0x5c24b7[0x1]:_0x313108;}Report['prototype']['getAgentByInternal']=function(_0xa3ad11){for(var _0x41bec0=0x0;_0x41bec0<Object[_0x7d47('0x2b')](this[_0x7d47('0xc')])[_0x7d47('0x22')];_0x41bec0++){var _0x2ae099=Object[_0x7d47('0x2b')](this['agents'])[_0x41bec0];var _0x393351=this[_0x7d47('0xc')][_0x2ae099];if(_0x393351[_0x7d47('0x1c')]===Number(_0xa3ad11))return _0x393351;}return null;};Report[_0x7d47('0xe')][_0x7d47('0x2c')]=function(_0x2f563e){var _0x330c04=_0x2f563e[_0x7d47('0x2d')]['split']('-')[0x0];var _0x15fbe9=this[_0x7d47('0xc')][_0x330c04];if(!_0x15fbe9)_0x15fbe9=this['getAgentByInternal'](_0x2f563e[_0x7d47('0x2e')]);return!_0x15fbe9?_0x7d47('0x2f'):'internal';};Report[_0x7d47('0xe')]['voiceCallReport']=function(_0x9637e8){_0x9637e8[_0x7d47('0x30')]=_0x9637e8[_0x7d47('0x30')]||_0x9637e8[_0x7d47('0x31')];if(_0x9637e8[_0x7d47('0x32')]==_0x7d47('0x33')){_0x9637e8['lastapplication']=_0x7d47('0x34');_0x9637e8[_0x7d47('0x35')]=_0x9637e8['queue'];if(_0x9637e8['context']==_0x7d47('0x36')){_0x9637e8[_0x7d47('0x1c')]='';_0x9637e8['destination']=extractCalleridNumber(_0x9637e8[_0x7d47('0x37')]);}else if(_0x9637e8['context']==_0x7d47('0x38')){if(_0x9637e8[_0x7d47('0x30')]==_0x7d47('0x39')){_0x9637e8['destination']=extractCalleridNumber(_0x9637e8[_0x7d47('0x3a')]);_0x9637e8[_0x7d47('0x2e')]=_0x9637e8[_0x7d47('0x3b')];_0x9637e8['destinationchannel']=[_0x9637e8['channel'],_0x9637e8['channel']=_0x9637e8[_0x7d47('0x3c')]][0x0];_0x9637e8[_0x7d47('0x37')]=_0x9637e8[_0x7d47('0x3a')];}else{_0x9637e8['destination']=_0x9637e8[_0x7d47('0x2e')];_0x9637e8[_0x7d47('0x2e')]=_0x9637e8['originatecalleridnum'];if(_0x9637e8['disposition']==_0x7d47('0x3d')){_0x9637e8[_0x7d47('0x1c')]=_0x9637e8[_0x7d47('0x23')];}else{_0x9637e8[_0x7d47('0x1c')]='';}}}}else{_0x9637e8[_0x7d47('0x37')]=util[_0x7d47('0x20')](_0x7d47('0x3e'),_0x9637e8[_0x7d47('0x3f')],_0x9637e8['calleridnum']);}if(RpcVoiceTransferReport[_0x7d47('0x40')][_0x9637e8[_0x7d47('0x41')]]){var _0xfae450=RpcVoiceTransferReport['transfers'][_0x9637e8[_0x7d47('0x41')]];_0xfae450[_0x7d47('0x42')]=_0x9637e8['uniqueid'];RpcVoiceTransferReport[_0x7d47('0x18')](_0xfae450);delete RpcVoiceTransferReport[_0x7d47('0x40')][_0x9637e8[_0x7d47('0x41')]];}if(_[_0x7d47('0x1e')](_0x9637e8[_0x7d47('0x32')])){_0x9637e8[_0x7d47('0x32')]=this[_0x7d47('0x2c')](_0x9637e8);}if(_[_0x7d47('0x1e')](_0x9637e8[_0x7d47('0x43')])){var _0x10b75a=_0x9637e8['channel'][_0x7d47('0x44')]('-')[0x0];var _0x357231=this[_0x7d47('0xc')][_0x10b75a];if(!_0x357231)_0x357231=this[_0x7d47('0x45')](_0x9637e8[_0x7d47('0x1c')]);if(_0x357231){_0x9637e8['UserId']=_0x357231['id'];_0x9637e8[_0x7d47('0x46')]=_0x357231[_0x7d47('0x1d')];}}RpcVoiceCallReport[_0x7d47('0x2a')](_0x9637e8);if(_0x9637e8[_0x7d47('0x47')]){for(var _0x52924d=0x0;_0x52924d<_0x9637e8[_0x7d47('0x48')][_0x7d47('0x22')];_0x52924d+=0x1){_0x9637e8[_0x7d47('0x49')]=_0x9637e8['monitors'][_0x52924d]['filename'];_0x9637e8[_0x7d47('0x4a')]=_0x9637e8[_0x7d47('0x48')][_0x52924d]['createdAt'];if(_0x9637e8[_0x7d47('0x31')]==_0x7d47('0x39')){_0x9637e8[_0x7d47('0x2e')]=_0x9637e8[_0x7d47('0x23')];_0x9637e8[_0x7d47('0x3f')]=_0x9637e8['connectedlinename'];_0x9637e8['connectedlinenum']=_0x9637e8[_0x7d47('0x1c')];_0x9637e8['connectedlinename']=_0x9637e8['membername'];_0x9637e8[_0x7d47('0x31')]=_0x9637e8[_0x7d47('0x3b')];}else if(_0x9637e8[_0x7d47('0x31')]==_0x7d47('0x4b')){_0x9637e8[_0x7d47('0x2e')]=_0x9637e8[_0x7d47('0x30')];_0x9637e8[_0x7d47('0x31')]=_0x9637e8[_0x7d47('0x3b')];}RpcVoiceRecording[_0x7d47('0x2a')](_0x9637e8);}}};Report[_0x7d47('0xe')]['voiceAgentReport']=function(_0x12bf5d){if(_[_0x7d47('0x4c')](_0x12bf5d)){_0x12bf5d[_0x7d47('0x4d')](function(_0x2f849a){RpcVoiceAgentReport['create'](_0x2f849a);});}else{RpcVoiceAgentReport[_0x7d47('0x2a')](_0x12bf5d);}};Report[_0x7d47('0xe')][_0x7d47('0x16')]=function(_0x48ab05){RpcVoiceDialReport['create'](_0x48ab05);var _0x19c6c7;var _0x40f4c9;var _0x2d62e3=_0x48ab05[_0x7d47('0x2d')];if(_[_0x7d47('0x4e')](_0x2d62e3,_0x7d47('0x4f'))){_0x40f4c9=_0x2d62e3[_0x7d47('0x50')](_0x2d62e3['indexOf']('/')+0x1,_0x2d62e3[_0x7d47('0x51')]('@'));_0x19c6c7=_['find'](this[_0x7d47('0xc')],function(_0x486be2){return _0x486be2['mobile']==_0x40f4c9||_0x486be2[_0x7d47('0x52')]==_0x40f4c9||_0x486be2[_0x7d47('0x1c')]==_0x40f4c9;});}else{_0x40f4c9=_0x2d62e3[_0x7d47('0x50')](_0x2d62e3[_0x7d47('0x51')]('/')+0x1,_0x2d62e3[_0x7d47('0x53')]('-'));_0x19c6c7=this[_0x7d47('0x1a')](_0x40f4c9);}if(_0x19c6c7){_0x48ab05[_0x7d47('0x1f')]=_['isNil'](_0x19c6c7[_0x7d47('0x1f')])?util['format']('SIP/%s',_0x19c6c7[_0x7d47('0x1d')]):_0x19c6c7[_0x7d47('0x1f')];_0x48ab05[_0x7d47('0x46')]=_0x19c6c7[_0x7d47('0x1d')];_0x48ab05[_0x7d47('0x1c')]=_0x19c6c7[_0x7d47('0x1c')];RpcMemberReport[_0x7d47('0x16')](_0x48ab05);}};Report[_0x7d47('0xe')]['blindTransfer']=function(_0x5dcb03){RpcVoiceTransferReport['transfers'][_0x5dcb03[_0x7d47('0x54')]]=_0x5dcb03;};Report['prototype']['attendedTransfer']=function(_0x4da7eb){RpcVoiceTransferReport['attendedTransfer'](_0x4da7eb);};module[_0x7d47('0x55')]=Report;
\ No newline at end of file
index 4cb0026..bbdf26a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2591=['syncRegistry','bind','registry','devicestatechange','peerstatus','syncPeerStatus','error','inspect','resolve','then','actionDeviceStateList','catch','[userReport][sippeerstatus]','prototype','syncRealtimeShow','isUndefined','emit','info','[userReport][registry]\x20registry:%s\x20state:%s','username','debug','find','stateRegistry','state','omit','event','[userReport][registry]\x20sending\x20trunk:save\x20event:','format','trunk:%s','trunk:save','[userReport][registry]','syncDeviceState','[userReport][devicestatechange]\x20device:%s\x20state:%s','[userReport][devicestatechange]','device','local','toNumber','toLowerCase','[userReport][devicestatechange]\x20sending\x20telephone:save\x20event:','telephone:%s','telephone:save','stateTime','[userReport][devicestatechange]\x20sending\x20trunk:save\x20event:','name','startsWith','Local','indexOf','mobile','updateStatusRealtime','isNotNull','[userReport][peerstatus]\x20peer:%s\x20address:%s\x20status:%s','peer','address','[userReport][peerstatus]','registered','status','[userReport][peerstatus]\x20sending\x20trunk:save\x20event:','exports','lodash','moment','util','ioredis','../../../config/environment','../../../config/logger','../ami','redis','defaults','socket.io-emitter','trunks','agents','telephones','registryentry'];(function(_0x7c1bb7,_0x341b81){var _0x5dffdf=function(_0x2c02f3){while(--_0x2c02f3){_0x7c1bb7['push'](_0x7c1bb7['shift']());}};_0x5dffdf(++_0x341b81);}(_0x2591,0x1ea));var _0x1259=function(_0x42c360,_0x2c788e){_0x42c360=_0x42c360-0x0;var _0x1851c4=_0x2591[_0x42c360];return _0x1851c4;};'use strict';var _=require(_0x1259('0x0'));var moment=require(_0x1259('0x1'));var util=require(_0x1259('0x2'));var Redis=require(_0x1259('0x3'));var BPromise=require('bluebird');var config=require(_0x1259('0x4'));var logger=require(_0x1259('0x5'))('ami');var ami=require(_0x1259('0x6'));config[_0x1259('0x7')]=_[_0x1259('0x8')](config[_0x1259('0x7')],{'host':'localhost','port':0x18eb});var io=require(_0x1259('0x9'))(new Redis(config[_0x1259('0x7')]));function UserReport(_0x1e4df5){this[_0x1259('0xa')]=_0x1e4df5['trunks'];this[_0x1259('0xb')]=_0x1e4df5[_0x1259('0xb')];this[_0x1259('0xc')]=_0x1e4df5['telephones'];ami['on'](_0x1259('0xd'),this[_0x1259('0xe')][_0x1259('0xf')](this));ami['on'](_0x1259('0x10'),this['syncRegistry']['bind'](this));ami['on'](_0x1259('0x11'),this['syncDeviceState'][_0x1259('0xf')](this));ami['on'](_0x1259('0x12'),this[_0x1259('0x13')][_0x1259('0xf')](this));return this['syncRealtimeShow']();}function showSipRegistrations(){Promise['resolve']()['then'](ami['actionSipShowRegistry']())['catch'](function(_0x18f143){logger[_0x1259('0x14')]('[userReport][sipshowregistry]',util[_0x1259('0x15')](_0x18f143,{'showHidden':![],'depth':null}));});}function listDeviceStates(){Promise[_0x1259('0x16')]()[_0x1259('0x17')](ami[_0x1259('0x18')]())[_0x1259('0x19')](function(_0x456ac6){logger['error']('[userReport][devicestatelist]',util[_0x1259('0x15')](_0x456ac6,{'showHidden':![],'depth':null}));});}function showPeersStatus(){Promise['resolve']()['then'](ami['actionSipPeerStatus']())[_0x1259('0x19')](function(_0x191a0b){logger[_0x1259('0x14')](_0x1259('0x1a'),util[_0x1259('0x15')](_0x191a0b,{'showHidden':![],'depth':null}));});}UserReport[_0x1259('0x1b')][_0x1259('0x1c')]=function(){setInterval(function(){BPromise[_0x1259('0x16')]()['then'](showSipRegistrations())[_0x1259('0x17')](listDeviceStates())['then'](showPeersStatus());},0x32c8);};UserReport[_0x1259('0x1b')]['isNotNull']=function(_0x2c122c){return _0x2c122c!==null&&!_[_0x1259('0x1d')](_0x2c122c);};UserReport['prototype'][_0x1259('0x1e')]=function(_0x5812d8,_0x4dde2f,_0x18b3fa){io['to'](_0x5812d8)['emit'](_0x4dde2f,_0x18b3fa);};UserReport[_0x1259('0x1b')]['syncRegistry']=function(_0x81148d){try{if(this['isNotNull'](_0x81148d)){logger[_0x1259('0x1f')](_0x1259('0x20'),_0x81148d[_0x1259('0x21')],_0x81148d['state']);logger[_0x1259('0x22')]('[userReport][registry]',util[_0x1259('0x15')](_0x81148d,{'showHidden':![],'depth':null}));var _0x18152f=_[_0x1259('0x23')](this[_0x1259('0xa')],{'defaultuser':_0x81148d['username']});if(_0x18152f){_0x81148d[_0x1259('0x24')]=_0x81148d[_0x1259('0x25')];_['merge'](_0x18152f,_[_0x1259('0x26')](_0x81148d,[_0x1259('0x27'),'actionid','username',_0x1259('0x25')]));logger[_0x1259('0x22')](_0x1259('0x28'),util[_0x1259('0x15')](_0x18152f,{'showHidden':![],'depth':null}));this[_0x1259('0x1e')](util[_0x1259('0x29')](_0x1259('0x2a'),_0x18152f['name']),_0x1259('0x2b'),_0x18152f);}}}catch(_0x2377b2){logger[_0x1259('0x14')](_0x1259('0x2c'),util['inspect'](_0x2377b2,{'showHidden':![],'depth':null}));}};UserReport[_0x1259('0x1b')][_0x1259('0x2d')]=function(_0x1e4105){try{if(this['isNotNull'](_0x1e4105)){logger['info'](_0x1259('0x2e'),_0x1e4105['device'],_0x1e4105['state']);logger[_0x1259('0x22')](_0x1259('0x2f'),util[_0x1259('0x15')](_0x1e4105,{'showHidden':![],'depth':null}));if(this[_0x1259('0xb')][_0x1e4105['device']]){if(!this[_0x1259('0xb')][_0x1e4105[_0x1259('0x30')]][_0x1259('0x31')]||_0x1e4105[_0x1259('0x25')]['toLowerCase']()=='inuse'){this[_0x1259('0xb')][_0x1e4105[_0x1259('0x30')]]['local']=![];if(this[_0x1259('0xb')][_0x1e4105[_0x1259('0x30')]][_0x1259('0x25')]!==_0x1e4105[_0x1259('0x25')]['toLowerCase']()){this[_0x1259('0xb')][_0x1e4105['device']]['stateTime']=_[_0x1259('0x32')](moment()[_0x1259('0x29')]('x'));}this[_0x1259('0xb')][_0x1e4105['device']]['state']=_0x1e4105['state']['toLowerCase']();this[_0x1259('0xb')][_0x1e4105[_0x1259('0x30')]]['updateStatusRealtime'](_0x1e4105);}}else if(this['telephones'][_0x1e4105[_0x1259('0x30')]]){if(this[_0x1259('0xc')][_0x1e4105[_0x1259('0x30')]][_0x1259('0x25')]!==_0x1e4105[_0x1259('0x25')]['toLowerCase']()){this[_0x1259('0xc')][_0x1e4105[_0x1259('0x30')]]['stateTime']=_[_0x1259('0x32')](moment()[_0x1259('0x29')]('x'));}this[_0x1259('0xc')][_0x1e4105[_0x1259('0x30')]][_0x1259('0x25')]=_0x1e4105['state'][_0x1259('0x33')]();logger[_0x1259('0x22')](_0x1259('0x34'),util['inspect'](this['telephones'][_0x1e4105[_0x1259('0x30')]],{'showHidden':![],'depth':null}));this[_0x1259('0x1e')](util[_0x1259('0x29')](_0x1259('0x35'),this[_0x1259('0xc')][_0x1e4105['device']]['name']),_0x1259('0x36'),this['telephones'][_0x1e4105[_0x1259('0x30')]]);}else if(this['trunks'][_0x1e4105['device']]){if(this[_0x1259('0xa')][_0x1e4105[_0x1259('0x30')]][_0x1259('0x25')]!==_0x1e4105['state'][_0x1259('0x33')]()){this[_0x1259('0xa')][_0x1e4105[_0x1259('0x30')]][_0x1259('0x37')]=_[_0x1259('0x32')](moment()[_0x1259('0x29')]('x'));}this[_0x1259('0xa')][_0x1e4105[_0x1259('0x30')]][_0x1259('0x25')]=_0x1e4105[_0x1259('0x25')]['toLowerCase']();logger[_0x1259('0x22')](_0x1259('0x38'),util['inspect'](this['trunks'][_0x1e4105[_0x1259('0x30')]],{'showHidden':![],'depth':null}));this[_0x1259('0x1e')](util[_0x1259('0x29')](_0x1259('0x2a'),this[_0x1259('0xa')][_0x1e4105['device']][_0x1259('0x39')]),_0x1259('0x2b'),this[_0x1259('0xa')][_0x1e4105['device']]);}else if(_[_0x1259('0x3a')](_0x1e4105[_0x1259('0x30')],_0x1259('0x3b'))){var _0x4dae3e=_0x1e4105[_0x1259('0x30')];var _0x2cb4fd=_0x4dae3e['substring'](_0x4dae3e[_0x1259('0x3c')]('/')+0x1,_0x4dae3e[_0x1259('0x3c')]('@'));var _0x23cda0=_['find'](this['agents'],function(_0x3cfd96){return _0x3cfd96[_0x1259('0x3d')]==_0x2cb4fd||_0x3cfd96['phone']==_0x2cb4fd||_0x3cfd96['accountcode']==_0x2cb4fd;});if(_0x23cda0){if(_0x23cda0[_0x1259('0x25')]!==_0x1e4105[_0x1259('0x25')][_0x1259('0x33')]()){_0x23cda0[_0x1259('0x37')]=_[_0x1259('0x32')](moment()[_0x1259('0x29')]('x'));}_0x23cda0[_0x1259('0x25')]=_0x1e4105[_0x1259('0x25')][_0x1259('0x33')]();_0x23cda0[_0x1259('0x31')]=!![];_0x23cda0[_0x1259('0x3e')](_0x1e4105);}}}}catch(_0x2081b3){logger[_0x1259('0x14')](_0x1259('0x2f'),util['inspect'](_0x2081b3,{'showHidden':![],'depth':null}));}};UserReport['prototype'][_0x1259('0x13')]=function(_0x4727cb){try{if(this[_0x1259('0x3f')](_0x4727cb)&&this[_0x1259('0x3f')](_0x4727cb[_0x1259('0x12')])){logger[_0x1259('0x1f')](_0x1259('0x40'),_0x4727cb[_0x1259('0x41')],_0x4727cb[_0x1259('0x42')],_0x4727cb[_0x1259('0x12')]);logger['debug'](_0x1259('0x43'),util[_0x1259('0x15')](_0x4727cb,{'showHidden':![],'depth':null}));if(this[_0x1259('0xb')][_0x4727cb[_0x1259('0x41')]]){if(!this[_0x1259('0xb')][_0x4727cb[_0x1259('0x41')]][_0x1259('0x31')]||_0x4727cb['peerstatus'][_0x1259('0x33')]()==_0x1259('0x44')){this['agents'][_0x4727cb[_0x1259('0x41')]][_0x1259('0x31')]=![];this[_0x1259('0xb')][_0x4727cb[_0x1259('0x41')]][_0x1259('0x45')]=_0x4727cb[_0x1259('0x12')]['toLowerCase']();this['agents'][_0x4727cb[_0x1259('0x41')]][_0x1259('0x42')]=_0x4727cb['address'];this[_0x1259('0xb')][_0x4727cb[_0x1259('0x41')]][_0x1259('0x3e')](_0x4727cb);}}else if(this[_0x1259('0xc')][_0x4727cb[_0x1259('0x41')]]){this[_0x1259('0xc')][_0x4727cb[_0x1259('0x41')]][_0x1259('0x45')]=_0x4727cb['peerstatus'][_0x1259('0x33')]();this[_0x1259('0xc')][_0x4727cb['peer']][_0x1259('0x42')]=_0x4727cb['address'];logger[_0x1259('0x22')]('[userReport][peerstatus]\x20sending\x20telephone:save\x20event:',util['inspect'](this[_0x1259('0xc')][_0x4727cb[_0x1259('0x41')]],{'showHidden':![],'depth':null}));this['emit'](util[_0x1259('0x29')](_0x1259('0x35'),this[_0x1259('0xc')][_0x4727cb['peer']]['name']),'telephone:save',this[_0x1259('0xc')][_0x4727cb[_0x1259('0x41')]]);}else if(this[_0x1259('0xa')][_0x4727cb[_0x1259('0x41')]]){this[_0x1259('0xa')][_0x4727cb['peer']][_0x1259('0x45')]=_0x4727cb[_0x1259('0x12')][_0x1259('0x33')]();this[_0x1259('0xa')][_0x4727cb[_0x1259('0x41')]][_0x1259('0x42')]=_0x4727cb[_0x1259('0x42')];logger[_0x1259('0x22')](_0x1259('0x46'),util[_0x1259('0x15')](this[_0x1259('0xa')][_0x4727cb[_0x1259('0x41')]],{'showHidden':![],'depth':null}));this[_0x1259('0x1e')](util[_0x1259('0x29')]('trunk:%s',this[_0x1259('0xa')][_0x4727cb['peer']][_0x1259('0x39')]),_0x1259('0x2b'),this[_0x1259('0xa')][_0x4727cb[_0x1259('0x41')]]);}}}catch(_0x4231a2){logger[_0x1259('0x14')](_0x1259('0x43'),util[_0x1259('0x15')](_0x4231a2,{'showHidden':![],'depth':null}));}};module[_0x1259('0x47')]=UserReport;
\ No newline at end of file
+var _0xde34=['state','debug','find','stateRegistry','omit','event','actionid','trunk:%s','name','trunk:save','[userReport][registry]','device','[userReport][devicestatechange]','local','inuse','toLowerCase','stateTime','format','updateStatusRealtime','toNumber','[userReport][devicestatechange]\x20sending\x20telephone:save\x20event:','telephone:%s','telephone:save','[userReport][devicestatechange]\x20sending\x20trunk:save\x20event:','startsWith','substring','indexOf','mobile','phone','syncPeerStatus','[userReport][peerstatus]\x20peer:%s\x20address:%s\x20status:%s','peer','address','[userReport][peerstatus]','registered','status','[userReport][peerstatus]\x20sending\x20telephone:save\x20event:','[userReport][peerstatus]\x20sending\x20trunk:save\x20event:','exports','moment','util','ioredis','bluebird','../../../config/environment','redis','defaults','localhost','socket.io-emitter','trunks','agents','telephones','registryentry','syncRegistry','bind','registry','devicestatechange','syncDeviceState','peerstatus','syncRealtimeShow','resolve','actionSipShowRegistry','catch','error','[userReport][sipshowregistry]','inspect','then','[userReport][sippeerstatus]','prototype','isNotNull','isUndefined','emit','info','[userReport][registry]\x20registry:%s\x20state:%s','username'];(function(_0x5c9307,_0x5b97e4){var _0x373e29=function(_0xefebbd){while(--_0xefebbd){_0x5c9307['push'](_0x5c9307['shift']());}};_0x373e29(++_0x5b97e4);}(_0xde34,0x1e3));var _0x4de3=function(_0xdae362,_0x1757e9){_0xdae362=_0xdae362-0x0;var _0x1ffb95=_0xde34[_0xdae362];return _0x1ffb95;};'use strict';var _=require('lodash');var moment=require(_0x4de3('0x0'));var util=require(_0x4de3('0x1'));var Redis=require(_0x4de3('0x2'));var BPromise=require(_0x4de3('0x3'));var config=require(_0x4de3('0x4'));var logger=require('../../../config/logger')('ami');var ami=require('../ami');config[_0x4de3('0x5')]=_[_0x4de3('0x6')](config[_0x4de3('0x5')],{'host':_0x4de3('0x7'),'port':0x18eb});var io=require(_0x4de3('0x8'))(new Redis(config['redis']));function UserReport(_0x1c2e65){this[_0x4de3('0x9')]=_0x1c2e65[_0x4de3('0x9')];this['agents']=_0x1c2e65[_0x4de3('0xa')];this[_0x4de3('0xb')]=_0x1c2e65[_0x4de3('0xb')];ami['on'](_0x4de3('0xc'),this[_0x4de3('0xd')][_0x4de3('0xe')](this));ami['on'](_0x4de3('0xf'),this[_0x4de3('0xd')][_0x4de3('0xe')](this));ami['on'](_0x4de3('0x10'),this[_0x4de3('0x11')][_0x4de3('0xe')](this));ami['on'](_0x4de3('0x12'),this['syncPeerStatus'][_0x4de3('0xe')](this));return this[_0x4de3('0x13')]();}function showSipRegistrations(){Promise[_0x4de3('0x14')]()['then'](ami[_0x4de3('0x15')]())[_0x4de3('0x16')](function(_0x28a24b){logger[_0x4de3('0x17')](_0x4de3('0x18'),util[_0x4de3('0x19')](_0x28a24b,{'showHidden':![],'depth':null}));});}function listDeviceStates(){Promise[_0x4de3('0x14')]()[_0x4de3('0x1a')](ami['actionDeviceStateList']())['catch'](function(_0x3993a5){logger['error']('[userReport][devicestatelist]',util[_0x4de3('0x19')](_0x3993a5,{'showHidden':![],'depth':null}));});}function showPeersStatus(){Promise['resolve']()[_0x4de3('0x1a')](ami['actionSipPeerStatus']())[_0x4de3('0x16')](function(_0x54d690){logger['error'](_0x4de3('0x1b'),util[_0x4de3('0x19')](_0x54d690,{'showHidden':![],'depth':null}));});}UserReport[_0x4de3('0x1c')][_0x4de3('0x13')]=function(){setInterval(function(){BPromise[_0x4de3('0x14')]()[_0x4de3('0x1a')](showSipRegistrations())[_0x4de3('0x1a')](listDeviceStates())[_0x4de3('0x1a')](showPeersStatus());},0x32c8);};UserReport[_0x4de3('0x1c')][_0x4de3('0x1d')]=function(_0x568c90){return _0x568c90!==null&&!_[_0x4de3('0x1e')](_0x568c90);};UserReport[_0x4de3('0x1c')][_0x4de3('0x1f')]=function(_0x2d86a8,_0x1b763f,_0xe05b68){io['to'](_0x2d86a8)[_0x4de3('0x1f')](_0x1b763f,_0xe05b68);};UserReport['prototype'][_0x4de3('0xd')]=function(_0x170a8f){try{if(this[_0x4de3('0x1d')](_0x170a8f)){logger[_0x4de3('0x20')](_0x4de3('0x21'),_0x170a8f[_0x4de3('0x22')],_0x170a8f[_0x4de3('0x23')]);logger[_0x4de3('0x24')]('[userReport][registry]',util[_0x4de3('0x19')](_0x170a8f,{'showHidden':![],'depth':null}));var _0x4f0c6e=_[_0x4de3('0x25')](this['trunks'],{'defaultuser':_0x170a8f['username']});if(_0x4f0c6e){_0x170a8f[_0x4de3('0x26')]=_0x170a8f[_0x4de3('0x23')];_['merge'](_0x4f0c6e,_[_0x4de3('0x27')](_0x170a8f,[_0x4de3('0x28'),_0x4de3('0x29'),_0x4de3('0x22'),_0x4de3('0x23')]));logger[_0x4de3('0x24')]('[userReport][registry]\x20sending\x20trunk:save\x20event:',util['inspect'](_0x4f0c6e,{'showHidden':![],'depth':null}));this[_0x4de3('0x1f')](util['format'](_0x4de3('0x2a'),_0x4f0c6e[_0x4de3('0x2b')]),_0x4de3('0x2c'),_0x4f0c6e);}}}catch(_0x4b864e){logger[_0x4de3('0x17')](_0x4de3('0x2d'),util['inspect'](_0x4b864e,{'showHidden':![],'depth':null}));}};UserReport[_0x4de3('0x1c')][_0x4de3('0x11')]=function(_0x53aa0d){try{if(this[_0x4de3('0x1d')](_0x53aa0d)){logger[_0x4de3('0x20')]('[userReport][devicestatechange]\x20device:%s\x20state:%s',_0x53aa0d[_0x4de3('0x2e')],_0x53aa0d[_0x4de3('0x23')]);logger[_0x4de3('0x24')](_0x4de3('0x2f'),util[_0x4de3('0x19')](_0x53aa0d,{'showHidden':![],'depth':null}));if(this[_0x4de3('0xa')][_0x53aa0d[_0x4de3('0x2e')]]){if(!this[_0x4de3('0xa')][_0x53aa0d[_0x4de3('0x2e')]][_0x4de3('0x30')]||_0x53aa0d[_0x4de3('0x23')]['toLowerCase']()==_0x4de3('0x31')){this[_0x4de3('0xa')][_0x53aa0d[_0x4de3('0x2e')]][_0x4de3('0x30')]=![];if(this[_0x4de3('0xa')][_0x53aa0d['device']][_0x4de3('0x23')]!==_0x53aa0d[_0x4de3('0x23')][_0x4de3('0x32')]()){this[_0x4de3('0xa')][_0x53aa0d[_0x4de3('0x2e')]][_0x4de3('0x33')]=_['toNumber'](moment()[_0x4de3('0x34')]('x'));}this['agents'][_0x53aa0d[_0x4de3('0x2e')]][_0x4de3('0x23')]=_0x53aa0d[_0x4de3('0x23')][_0x4de3('0x32')]();this[_0x4de3('0xa')][_0x53aa0d[_0x4de3('0x2e')]][_0x4de3('0x35')](_0x53aa0d);}}else if(this['telephones'][_0x53aa0d[_0x4de3('0x2e')]]){if(this[_0x4de3('0xb')][_0x53aa0d[_0x4de3('0x2e')]]['state']!==_0x53aa0d[_0x4de3('0x23')][_0x4de3('0x32')]()){this[_0x4de3('0xb')][_0x53aa0d[_0x4de3('0x2e')]][_0x4de3('0x33')]=_[_0x4de3('0x36')](moment()[_0x4de3('0x34')]('x'));}this[_0x4de3('0xb')][_0x53aa0d[_0x4de3('0x2e')]]['state']=_0x53aa0d[_0x4de3('0x23')][_0x4de3('0x32')]();logger['debug'](_0x4de3('0x37'),util[_0x4de3('0x19')](this['telephones'][_0x53aa0d[_0x4de3('0x2e')]],{'showHidden':![],'depth':null}));this[_0x4de3('0x1f')](util[_0x4de3('0x34')](_0x4de3('0x38'),this[_0x4de3('0xb')][_0x53aa0d['device']][_0x4de3('0x2b')]),_0x4de3('0x39'),this['telephones'][_0x53aa0d['device']]);}else if(this[_0x4de3('0x9')][_0x53aa0d[_0x4de3('0x2e')]]){if(this[_0x4de3('0x9')][_0x53aa0d['device']][_0x4de3('0x23')]!==_0x53aa0d[_0x4de3('0x23')][_0x4de3('0x32')]()){this[_0x4de3('0x9')][_0x53aa0d[_0x4de3('0x2e')]][_0x4de3('0x33')]=_['toNumber'](moment()[_0x4de3('0x34')]('x'));}this[_0x4de3('0x9')][_0x53aa0d['device']][_0x4de3('0x23')]=_0x53aa0d['state'][_0x4de3('0x32')]();logger[_0x4de3('0x24')](_0x4de3('0x3a'),util[_0x4de3('0x19')](this[_0x4de3('0x9')][_0x53aa0d[_0x4de3('0x2e')]],{'showHidden':![],'depth':null}));this[_0x4de3('0x1f')](util[_0x4de3('0x34')]('trunk:%s',this[_0x4de3('0x9')][_0x53aa0d[_0x4de3('0x2e')]][_0x4de3('0x2b')]),_0x4de3('0x2c'),this[_0x4de3('0x9')][_0x53aa0d[_0x4de3('0x2e')]]);}else if(_[_0x4de3('0x3b')](_0x53aa0d[_0x4de3('0x2e')],'Local')){var _0x18e482=_0x53aa0d[_0x4de3('0x2e')];var _0x1d6654=_0x18e482[_0x4de3('0x3c')](_0x18e482['indexOf']('/')+0x1,_0x18e482[_0x4de3('0x3d')]('@'));var _0x173f71=_[_0x4de3('0x25')](this[_0x4de3('0xa')],function(_0x58fbf0){return _0x58fbf0[_0x4de3('0x3e')]==_0x1d6654||_0x58fbf0[_0x4de3('0x3f')]==_0x1d6654||_0x58fbf0['accountcode']==_0x1d6654;});if(_0x173f71){if(_0x173f71['state']!==_0x53aa0d[_0x4de3('0x23')][_0x4de3('0x32')]()){_0x173f71['stateTime']=_[_0x4de3('0x36')](moment()[_0x4de3('0x34')]('x'));}_0x173f71[_0x4de3('0x23')]=_0x53aa0d[_0x4de3('0x23')][_0x4de3('0x32')]();_0x173f71[_0x4de3('0x30')]=!![];_0x173f71['updateStatusRealtime'](_0x53aa0d);}}}}catch(_0x571374){logger[_0x4de3('0x17')](_0x4de3('0x2f'),util['inspect'](_0x571374,{'showHidden':![],'depth':null}));}};UserReport[_0x4de3('0x1c')][_0x4de3('0x40')]=function(_0x18af5c){try{if(this[_0x4de3('0x1d')](_0x18af5c)&&this[_0x4de3('0x1d')](_0x18af5c[_0x4de3('0x12')])){logger['info'](_0x4de3('0x41'),_0x18af5c[_0x4de3('0x42')],_0x18af5c[_0x4de3('0x43')],_0x18af5c[_0x4de3('0x12')]);logger[_0x4de3('0x24')](_0x4de3('0x44'),util[_0x4de3('0x19')](_0x18af5c,{'showHidden':![],'depth':null}));if(this['agents'][_0x18af5c['peer']]){if(!this['agents'][_0x18af5c[_0x4de3('0x42')]][_0x4de3('0x30')]||_0x18af5c[_0x4de3('0x12')][_0x4de3('0x32')]()==_0x4de3('0x45')){this['agents'][_0x18af5c['peer']][_0x4de3('0x30')]=![];this['agents'][_0x18af5c[_0x4de3('0x42')]][_0x4de3('0x46')]=_0x18af5c['peerstatus'][_0x4de3('0x32')]();this[_0x4de3('0xa')][_0x18af5c['peer']][_0x4de3('0x43')]=_0x18af5c[_0x4de3('0x43')];this[_0x4de3('0xa')][_0x18af5c[_0x4de3('0x42')]][_0x4de3('0x35')](_0x18af5c);}}else if(this[_0x4de3('0xb')][_0x18af5c['peer']]){this[_0x4de3('0xb')][_0x18af5c[_0x4de3('0x42')]]['status']=_0x18af5c[_0x4de3('0x12')]['toLowerCase']();this[_0x4de3('0xb')][_0x18af5c[_0x4de3('0x42')]][_0x4de3('0x43')]=_0x18af5c['address'];logger['debug'](_0x4de3('0x47'),util[_0x4de3('0x19')](this['telephones'][_0x18af5c[_0x4de3('0x42')]],{'showHidden':![],'depth':null}));this[_0x4de3('0x1f')](util[_0x4de3('0x34')]('telephone:%s',this[_0x4de3('0xb')][_0x18af5c['peer']][_0x4de3('0x2b')]),_0x4de3('0x39'),this['telephones'][_0x18af5c['peer']]);}else if(this['trunks'][_0x18af5c[_0x4de3('0x42')]]){this[_0x4de3('0x9')][_0x18af5c[_0x4de3('0x42')]][_0x4de3('0x46')]=_0x18af5c[_0x4de3('0x12')][_0x4de3('0x32')]();this[_0x4de3('0x9')][_0x18af5c[_0x4de3('0x42')]][_0x4de3('0x43')]=_0x18af5c['address'];logger[_0x4de3('0x24')](_0x4de3('0x48'),util[_0x4de3('0x19')](this[_0x4de3('0x9')][_0x18af5c[_0x4de3('0x42')]],{'showHidden':![],'depth':null}));this[_0x4de3('0x1f')](util[_0x4de3('0x34')](_0x4de3('0x2a'),this[_0x4de3('0x9')][_0x18af5c['peer']]['name']),'trunk:save',this[_0x4de3('0x9')][_0x18af5c[_0x4de3('0x42')]]);}}}catch(_0xc40163){logger['error']('[userReport][peerstatus]',util[_0x4de3('0x19')](_0xc40163,{'showHidden':![],'depth':null}));}};module[_0x4de3('0x49')]=UserReport;
\ No newline at end of file
index da37636..1011215 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6f10=['type','inbound','voice','assign','omit','privilege','[%s][voiceAgentReport][agentcalled]\x20sending\x20agentcalled\x20event:','custom:agentcalled','calleridnum','[%s][voiceAgentReport][agentcalled]\x20sending\x20user:called\x20event:','inspect','format','user:%s','error','[%s][voiceAgentReport][agentcalled]','hasOwnProperty','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','agentconnectAt','connectedlinename','connectedlinenum','destchannelstate','destchannelstatedesc','holdtime','lastevent','routealias','pick','destconnectedlinenum','accountcode','custom:agentconnect','user:agentconnect','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:answered_elsewhere','answeredelsewheremembername','answered_elsewhere','reason','[%s][voiceAgentReport][agentconnect]\x20sending\x20agentansweredelsewhere\x20event:','custom:agentansweredelsewhere','[%s][voiceAgentReport][agentconnect]\x20Else\x20path\x20should\x20never\x20be\x20taken','[%s][voiceAgentReport][agentringnoanswer]\x20event:','[%s][voiceAgentReport][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:rejected','rejected','name','user:agentringnoanswer','custom:agentringnoanswer','[%s][voiceAgentReport][agentringnoanswer]','[%s][voiceAgentReport][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned','agentringnoanswerAt','abandoned','[%s][voiceAgentReport][queuecallerabandon]\x20sending\x20agentqueuecallerabandon\x20event:','[%s][voiceAgentReport][queuecallerabandon]','[%s][voiceAgentReport][agentcomplete]\x20event:','agentcompleteAt','complete','transfer','agent','talktime','acw','acwtime','acwTimeout','[%s][voiceAgentReport][agentcomplete]\x20sending\x20agentcomplete\x20event:','custom:agentcomplete','[%s][voiceAgentReport][agentcomplete]\x20sending\x20user:agentcomplete\x20event:','destaccountcode','user:agentcomplete','[%s][voiceAgentReport][varset]\x20event:','addVariable','keys','variable','value','[%s][voiceAgentReport][varset]\x20destuniqueid:%s\x20variable:%s\x20value:%s','[%s][voiceAgentReport][varset]','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosloss','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','bridgepeer','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberpenalty','isNil','includes','[%s][voiceAgentReport][hangup]\x20event:','[%s][voiceAgentReport][hangup]\x20destuniqueid:%s','[%s][voiceAgentReport][hangup]\x20sending\x20voiceAgentReport\x20event:','values','[%s][voiceAgentReport][hangup]','syncAttendedTransfer','[%s][voiceAgentReport][attendedtransfer]\x20event:','transfereeuniqueid','[%s][voiceAgentReport][attendedtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','diff','secondtransfereruniqueid','[%s][voiceAgentReport][attendedtransfer]','[%s][voiceAgentReport][blindtransfer]\x20event:','transfereruniqueid','[%s][voiceAgentReport][blindtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','seconds','[%s][voiceAgentReport][blindtransfer]','channel','substring','lastIndexOf','[%s][voiceAgentReport][musiconholdstart]\x20interface:%s','onhold','[%s][voiceAgentReport][musiconholdstart]','[%s][voiceAgentReport][musiconholdstop]\x20event:','[%s][voiceAgentReport][musiconholdstop]\x20interface:%s','exports','moment','util','ioredis','../../../config/logger','ami','../ami','redis','defaults','socket.io-emitter','channels','voiceChannels','voiceQueues','agents','variables','agentcalled','syncAgentCalled','agentconnect','syncAgentConnect','bind','agentringnoanswer','queuecallerabandon','syncQueueCallerAbandon','agentcomplete','syncAgentComplete','varset','syncVarSet','hangup','syncHangup','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','syncBlindTransfer','emit','prototype','isNotNull','isUndefined','info','[%s][voiceAgentReport][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','uniqueid','membername','debug','[%s][voiceAgentReport][agentcalled]\x20event:','interface','destuniqueid','queue','YYYY-MM-DD\x20HH:mm:ss','called'];(function(_0x2bf141,_0x31eac7){var _0x48277b=function(_0x9fe560){while(--_0x9fe560){_0x2bf141['push'](_0x2bf141['shift']());}};_0x48277b(++_0x31eac7);}(_0x6f10,0x1aa));var _0x06f1=function(_0xaa4db8,_0x146285){_0xaa4db8=_0xaa4db8-0x0;var _0x1f7b31=_0x6f10[_0xaa4db8];return _0x1f7b31;};'use strict';var _=require('lodash');var moment=require(_0x06f1('0x0'));var util=require(_0x06f1('0x1'));var Redis=require(_0x06f1('0x2'));var config=require('../../../config/environment');var logger=require(_0x06f1('0x3'))(_0x06f1('0x4'));var ami=require(_0x06f1('0x5'));config[_0x06f1('0x6')]=_[_0x06f1('0x7')](config[_0x06f1('0x6')],{'host':'localhost','port':0x18eb});var io=require(_0x06f1('0x8'))(new Redis(config[_0x06f1('0x6')]));function VoiceAgentReport(_0x246e92){this[_0x06f1('0x9')]={};this[_0x06f1('0xa')]=_0x246e92[_0x06f1('0x9')];this[_0x06f1('0xb')]=_0x246e92[_0x06f1('0xb')];this[_0x06f1('0xc')]=_0x246e92[_0x06f1('0xc')];this[_0x06f1('0xd')]={};ami['on'](_0x06f1('0xe'),this[_0x06f1('0xf')]['bind'](this));ami['on'](_0x06f1('0x10'),this[_0x06f1('0x11')][_0x06f1('0x12')](this));ami['on'](_0x06f1('0x13'),this['syncAgentRingNoAnswer'][_0x06f1('0x12')](this));ami['on'](_0x06f1('0x14'),this[_0x06f1('0x15')][_0x06f1('0x12')](this));ami['on'](_0x06f1('0x16'),this[_0x06f1('0x17')]['bind'](this));ami['on'](_0x06f1('0x18'),this[_0x06f1('0x19')][_0x06f1('0x12')](this));ami['on'](_0x06f1('0x1a'),this[_0x06f1('0x1b')]['bind'](this));ami['on'](_0x06f1('0x1c'),this[_0x06f1('0x1d')]['bind'](this));ami['on'](_0x06f1('0x1e'),this[_0x06f1('0x1f')][_0x06f1('0x12')](this));ami['on']('attendedtransfer',this['syncAttendedTransfer'][_0x06f1('0x12')](this));ami['on']('blindtransfer',this[_0x06f1('0x20')]['bind'](this));}VoiceAgentReport['prototype'][_0x06f1('0x21')]=function(_0x45f20a,_0x4046ec,_0x163748){io['to'](_0x45f20a)['emit'](_0x4046ec,_0x163748);};VoiceAgentReport[_0x06f1('0x22')][_0x06f1('0x23')]=function(_0x53427d){return _0x53427d!==null&&!_[_0x06f1('0x24')](_0x53427d);};VoiceAgentReport[_0x06f1('0x22')][_0x06f1('0xf')]=function(_0x11ebe1){try{if(this[_0x06f1('0x23')](_0x11ebe1)){logger[_0x06f1('0x25')](_0x06f1('0x26'),_0x11ebe1[_0x06f1('0x27')],_0x11ebe1[_0x06f1('0x28')],_0x11ebe1['destuniqueid']);logger[_0x06f1('0x29')](_0x06f1('0x2a'),_0x11ebe1[_0x06f1('0x27')],util['inspect'](_0x11ebe1,{'showHidden':![],'depth':null}));if(_['isUndefined'](this[_0x06f1('0x9')][_0x11ebe1[_0x06f1('0x27')]])){this[_0x06f1('0x9')][_0x11ebe1['uniqueid']]={};}var _0x34c2ae=this[_0x06f1('0xc')][_0x11ebe1[_0x06f1('0x2b')]];var _0x7a9af1=this[_0x06f1('0x9')][_0x11ebe1[_0x06f1('0x27')]][_0x11ebe1[_0x06f1('0x2c')]];var _0x3fad16=this['voiceQueues'][_0x11ebe1[_0x06f1('0x2d')]];var _0x3c0aad=this[_0x06f1('0xd')][_0x11ebe1[_0x06f1('0x27')]];if(_[_0x06f1('0x24')](_0x7a9af1)){_0x7a9af1={'agentcalledAt':moment()['format'](_0x06f1('0x2e')),'lastevent':_0x06f1('0x2f'),'mandatoryDisposition':_0x3fad16&&_0x3fad16['mandatoryDisposition']?_0x3fad16['mandatoryDisposition']:![],'type':_0x3fad16&&_0x3fad16['type']?_0x3fad16[_0x06f1('0x30')]:_0x06f1('0x31'),'variables':_0x3c0aad,'motionChannel':_0x06f1('0x32')};}Object[_0x06f1('0x33')](_0x7a9af1,_[_0x06f1('0x34')](_0x11ebe1,['event',_0x06f1('0x35')]));this[_0x06f1('0x9')][_0x11ebe1[_0x06f1('0x27')]][_0x11ebe1[_0x06f1('0x2c')]]=_0x7a9af1;logger['debug'](_0x06f1('0x36'),_0x11ebe1['uniqueid'],util['inspect'](_0x7a9af1,{'showHidden':![],'depth':null}));ami[_0x06f1('0x21')](_0x06f1('0x37'),_0x7a9af1);var _0x2d634f={'id':_0x34c2ae['id'],'calleridnum':_0x7a9af1[_0x06f1('0x38')],'queue':_0x7a9af1[_0x06f1('0x2d')],'variables':_0x7a9af1[_0x06f1('0xd')],'uniqueid':_0x11ebe1[_0x06f1('0x27')]};logger['debug'](_0x06f1('0x39'),_0x11ebe1[_0x06f1('0x27')],util[_0x06f1('0x3a')](_0x2d634f,{'showHidden':![],'depth':null}));this['emit'](util[_0x06f1('0x3b')](_0x06f1('0x3c'),_0x11ebe1['membername']),'user:called',_0x2d634f);}}catch(_0x505d5b){logger[_0x06f1('0x3d')](_0x06f1('0x3e'),_0x11ebe1[_0x06f1('0x27')],util['inspect'](_0x505d5b,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x06f1('0x22')][_0x06f1('0x11')]=function(_0x26e094){try{if(this[_0x06f1('0x23')](_0x26e094)){if(this['channels'][_0x26e094[_0x06f1('0x27')]]){for(var _0x557ef6 in this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]]){if(this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x06f1('0x3f')](_0x557ef6)){if(_0x26e094[_0x06f1('0x2c')]===_0x557ef6){logger[_0x06f1('0x25')](_0x06f1('0x40'),_0x26e094['uniqueid'],_0x26e094[_0x06f1('0x28')],_0x26e094[_0x06f1('0x2c')]);this[_0x06f1('0x9')][_0x26e094['uniqueid']][_0x557ef6][_0x06f1('0x41')]=moment()[_0x06f1('0x3b')](_0x06f1('0x2e'));this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x557ef6]['connectedlinename']=_0x26e094[_0x06f1('0x42')];this[_0x06f1('0x9')][_0x26e094['uniqueid']][_0x557ef6][_0x06f1('0x43')]=_0x26e094[_0x06f1('0x43')];this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x557ef6][_0x06f1('0x44')]=_0x26e094[_0x06f1('0x44')];this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x557ef6][_0x06f1('0x45')]=_0x26e094[_0x06f1('0x45')];this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x557ef6]['holdtime']=_0x26e094[_0x06f1('0x46')];this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x557ef6][_0x06f1('0x47')]='connect';if(this[_0x06f1('0xa')][this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x557ef6][_0x06f1('0x27')]]){var _0x4f8a1b=this[_0x06f1('0xa')][this['channels'][_0x26e094['uniqueid']][_0x557ef6][_0x06f1('0x27')]][_0x06f1('0x48')];this['channels'][_0x26e094['uniqueid']][_0x557ef6][_0x06f1('0x48')]=_0x4f8a1b;_0x26e094['routealias']=_0x4f8a1b;}_['merge'](this[_0x06f1('0xc')][_0x26e094[_0x06f1('0x2b')]],_[_0x06f1('0x49')](_0x26e094,[_0x06f1('0x2d'),_0x06f1('0x4a'),_0x06f1('0x48')]));var _0x40eb2f=this[_0x06f1('0xc')][_0x26e094['interface']];var _0x1c7a38={'id':_0x40eb2f['id'],'name':_0x40eb2f['name'],'agentconnected':!![],'destaccountcode':_0x40eb2f[_0x06f1('0x4b')],'destconnectedlinenum':this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x26e094[_0x06f1('0x2c')]]['exten'],'queue':this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x26e094[_0x06f1('0x2c')]][_0x06f1('0x2d')],'routealias':this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x26e094[_0x06f1('0x2c')]][_0x06f1('0x48')],'uniqueid':this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x26e094[_0x06f1('0x2c')]][_0x06f1('0x27')]};ami['emit'](_0x06f1('0x4c'),this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x26e094['destuniqueid']]);this[_0x06f1('0x21')](util[_0x06f1('0x3b')]('user:%s',_0x26e094['membername']),_0x06f1('0x4d'),_0x1c7a38);}else if(!this[_0x06f1('0x9')][_0x26e094['uniqueid']][_0x557ef6][_0x06f1('0x13')]&&!this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x557ef6][_0x06f1('0x16')]){logger[_0x06f1('0x25')](_0x06f1('0x4e'),_0x26e094['uniqueid'],this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x557ef6][_0x06f1('0x28')],_0x557ef6);this[_0x06f1('0x9')][_0x26e094['uniqueid']][_0x557ef6]['agentringnoanswer']=!![];this['channels'][_0x26e094['uniqueid']][_0x557ef6]['agentringnoanswerAt']=moment()['format'](_0x06f1('0x2e'));this['channels'][_0x26e094[_0x06f1('0x27')]][_0x557ef6]['answeredelsewheredestinationuniqueid']=_0x26e094[_0x06f1('0x2c')];this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x557ef6][_0x06f1('0x4f')]=_0x26e094['membername'];this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x557ef6][_0x06f1('0x47')]=_0x06f1('0x50');this[_0x06f1('0x9')][_0x26e094[_0x06f1('0x27')]][_0x557ef6][_0x06f1('0x51')]=_0x06f1('0x50');logger[_0x06f1('0x29')](_0x06f1('0x52'),_0x26e094[_0x06f1('0x27')],util[_0x06f1('0x3a')](this[_0x06f1('0x9')][_0x26e094['uniqueid']][_0x557ef6],{'showHidden':![],'depth':null}));ami[_0x06f1('0x21')](_0x06f1('0x53'),this[_0x06f1('0x9')][_0x26e094['uniqueid']][_0x557ef6]);}else{logger[_0x06f1('0x29')](_0x06f1('0x54'),_0x26e094[_0x06f1('0x27')]);}}}}}}catch(_0x1053dd){logger['error']('[%s][voiceAgentReport][agentconnect]',_0x26e094[_0x06f1('0x27')],util[_0x06f1('0x3a')](_0x1053dd,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x06f1('0x22')]['syncAgentRingNoAnswer']=function(_0x51fd98){try{if(this[_0x06f1('0x23')](_0x51fd98)){logger[_0x06f1('0x29')](_0x06f1('0x55'),_0x51fd98[_0x06f1('0x27')],util[_0x06f1('0x3a')](_0x51fd98,{'showHidden':![],'depth':null}));if(this[_0x06f1('0x9')][_0x51fd98[_0x06f1('0x27')]]&&this['channels'][_0x51fd98[_0x06f1('0x27')]][_0x51fd98[_0x06f1('0x2c')]]){logger[_0x06f1('0x25')](_0x06f1('0x56'),_0x51fd98[_0x06f1('0x27')],_0x51fd98[_0x06f1('0x28')],_0x51fd98['destuniqueid']);var _0x18c5a2=this[_0x06f1('0xc')][_0x51fd98[_0x06f1('0x2b')]];var _0x4e0a80=this[_0x06f1('0x9')][_0x51fd98[_0x06f1('0x27')]][_0x51fd98[_0x06f1('0x2c')]];_0x4e0a80[_0x06f1('0x13')]=!![];_0x4e0a80['agentringnoanswerAt']=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x4e0a80['lastevent']='rejected';_0x4e0a80[_0x06f1('0x51')]=_0x06f1('0x57');var _0x21214e={'id':_0x18c5a2['id'],'name':_0x18c5a2[_0x06f1('0x58')],'queue':_0x4e0a80[_0x06f1('0x2d')],'uniqueid':_0x4e0a80['uniqueid']};logger[_0x06f1('0x29')]('[%s][voiceAgentReport][agentringnoanswer]\x20sending\x20agentringnoanswer\x20event:',_0x51fd98['uniqueid'],util[_0x06f1('0x3a')](_0x21214e,{'showHidden':![],'depth':null}));this[_0x06f1('0x21')](util[_0x06f1('0x3b')]('user:%s',_0x18c5a2[_0x06f1('0x58')]),_0x06f1('0x59'),_0x21214e);ami['emit'](_0x06f1('0x5a'),_0x4e0a80);this['channels'][_0x51fd98['uniqueid']][_0x51fd98[_0x06f1('0x2c')]]=Object['assign']({},_0x4e0a80);}}}catch(_0x4f9d3d){logger['error'](_0x06f1('0x5b'),_0x51fd98['uniqueid'],util[_0x06f1('0x3a')](_0x4f9d3d,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x06f1('0x22')][_0x06f1('0x15')]=function(_0x3d48b5){try{if(this[_0x06f1('0x23')](_0x3d48b5)){logger['debug']('[%s][voiceAgentReport][queuecallerabandon]\x20event:',_0x3d48b5[_0x06f1('0x27')],util['inspect'](_0x3d48b5,{'showHidden':![],'depth':null}));if(this[_0x06f1('0x9')][_0x3d48b5[_0x06f1('0x27')]]){for(var _0x8c886b in this[_0x06f1('0x9')][_0x3d48b5[_0x06f1('0x27')]]){if(this[_0x06f1('0x9')][_0x3d48b5[_0x06f1('0x27')]][_0x06f1('0x3f')](_0x8c886b)&&!this[_0x06f1('0x9')][_0x3d48b5[_0x06f1('0x27')]][_0x8c886b]['agentringnoanswer']&&!this[_0x06f1('0x9')][_0x3d48b5[_0x06f1('0x27')]][_0x8c886b]['agentcomplete']){logger[_0x06f1('0x25')](_0x06f1('0x5c'),_0x3d48b5[_0x06f1('0x27')],this[_0x06f1('0x9')][_0x3d48b5[_0x06f1('0x27')]][_0x8c886b][_0x06f1('0x28')],_0x8c886b);this[_0x06f1('0x9')][_0x3d48b5[_0x06f1('0x27')]][_0x8c886b]['agentringnoanswer']=!![];this[_0x06f1('0x9')][_0x3d48b5[_0x06f1('0x27')]][_0x8c886b][_0x06f1('0x5d')]=moment()[_0x06f1('0x3b')](_0x06f1('0x2e'));this['channels'][_0x3d48b5[_0x06f1('0x27')]][_0x8c886b][_0x06f1('0x47')]=_0x06f1('0x5e');this[_0x06f1('0x9')][_0x3d48b5[_0x06f1('0x27')]][_0x8c886b][_0x06f1('0x51')]=_0x06f1('0x5e');logger[_0x06f1('0x29')](_0x06f1('0x5f'),_0x3d48b5[_0x06f1('0x27')],util[_0x06f1('0x3a')](this[_0x06f1('0x9')][_0x3d48b5['uniqueid']][_0x8c886b],{'showHidden':![],'depth':null}));ami[_0x06f1('0x21')]('custom:agentqueuecallerabandon',this[_0x06f1('0x9')][_0x3d48b5[_0x06f1('0x27')]][_0x8c886b]);}}}}}catch(_0x22ecd4){logger[_0x06f1('0x3d')](_0x06f1('0x60'),_0x3d48b5['uniqueid'],util[_0x06f1('0x3a')](_0x22ecd4,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0x06f1('0x17')]=function(_0x4e8184){try{if(this[_0x06f1('0x23')](_0x4e8184)){logger[_0x06f1('0x29')](_0x06f1('0x61'),_0x4e8184[_0x06f1('0x27')],util[_0x06f1('0x3a')](_0x4e8184,{'showHidden':![],'depth':null}));if(this[_0x06f1('0x9')][_0x4e8184[_0x06f1('0x27')]]){for(var _0x848a7d in this['channels'][_0x4e8184[_0x06f1('0x27')]]){if(this[_0x06f1('0x9')][_0x4e8184[_0x06f1('0x27')]][_0x06f1('0x3f')](_0x848a7d)){if(this['channels'][_0x4e8184[_0x06f1('0x27')]][_0x848a7d][_0x06f1('0x41')]&&!this[_0x06f1('0x9')][_0x4e8184[_0x06f1('0x27')]][_0x848a7d][_0x06f1('0x16')]){logger[_0x06f1('0x25')]('[%s][voiceAgentReport][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete',_0x4e8184[_0x06f1('0x27')],this[_0x06f1('0x9')][_0x4e8184[_0x06f1('0x27')]][_0x848a7d][_0x06f1('0x28')],_0x848a7d);this[_0x06f1('0x9')][_0x4e8184[_0x06f1('0x27')]][_0x848a7d][_0x06f1('0x16')]=!![];this['channels'][_0x4e8184[_0x06f1('0x27')]][_0x848a7d][_0x06f1('0x62')]=moment()[_0x06f1('0x3b')](_0x06f1('0x2e'));this[_0x06f1('0x9')][_0x4e8184['uniqueid']][_0x848a7d][_0x06f1('0x47')]=_0x06f1('0x63');this[_0x06f1('0x9')][_0x4e8184['uniqueid']][_0x848a7d][_0x06f1('0x51')]=_0x4e8184[_0x06f1('0x51')]==_0x06f1('0x64')?_0x06f1('0x65'):_0x4e8184['reason'];this[_0x06f1('0x9')][_0x4e8184[_0x06f1('0x27')]][_0x848a7d][_0x06f1('0x66')]=_0x4e8184['talktime'];if(this[_0x06f1('0xb')][_0x4e8184[_0x06f1('0x2d')]]&&this['voiceQueues'][_0x4e8184[_0x06f1('0x2d')]][_0x06f1('0x67')]){this['channels'][_0x4e8184[_0x06f1('0x27')]][_0x848a7d][_0x06f1('0x68')]=this[_0x06f1('0xb')][_0x4e8184[_0x06f1('0x2d')]][_0x06f1('0x69')];this[_0x06f1('0x9')][_0x4e8184[_0x06f1('0x27')]][_0x848a7d]['agentacw']=!![];}this[_0x06f1('0xc')][_0x4e8184[_0x06f1('0x2b')]]=_[_0x06f1('0x34')](this[_0x06f1('0xc')][_0x4e8184[_0x06f1('0x2b')]],[_0x06f1('0x2d'),_0x06f1('0x4a')]);logger[_0x06f1('0x29')](_0x06f1('0x6a'),_0x4e8184['uniqueid'],util[_0x06f1('0x3a')](this[_0x06f1('0x9')][_0x4e8184[_0x06f1('0x27')]][_0x848a7d],{'showHidden':![],'depth':null}));ami[_0x06f1('0x21')](_0x06f1('0x6b'),this[_0x06f1('0x9')][_0x4e8184[_0x06f1('0x27')]][_0x848a7d]);logger[_0x06f1('0x29')](_0x06f1('0x6c'),_0x4e8184[_0x06f1('0x27')],util[_0x06f1('0x3a')]({'id':this[_0x06f1('0xc')][_0x4e8184[_0x06f1('0x2b')]]['id'],'destaccountcode':_0x4e8184[_0x06f1('0x6d')]},{'showHidden':![],'depth':null}));this[_0x06f1('0x21')](util[_0x06f1('0x3b')](_0x06f1('0x3c'),_0x4e8184[_0x06f1('0x28')]),_0x06f1('0x6e'),{'id':this[_0x06f1('0xc')][_0x4e8184['interface']]['id'],'destaccountcode':Number(_0x4e8184[_0x06f1('0x6d')])});}}}}}}catch(_0x547d2b){logger[_0x06f1('0x3d')]('[%s][voiceAgentReport][agentcomplete]',_0x4e8184[_0x06f1('0x27')],util[_0x06f1('0x3a')](_0x547d2b,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0x06f1('0x19')]=function(_0x2b5eba){try{if(this[_0x06f1('0x23')](_0x2b5eba)){logger['debug'](_0x06f1('0x6f'),_0x2b5eba[_0x06f1('0x27')],util[_0x06f1('0x3a')](_0x2b5eba,{'showHidden':![],'depth':null}));this[_0x06f1('0x70')](_0x2b5eba[_0x06f1('0x27')],_[_0x06f1('0x71')](_0x2b5eba[_0x06f1('0x72')])[0x0],_0x2b5eba[_0x06f1('0x73')]);if(this['channels'][_0x2b5eba['uniqueid']]){for(var _0x233162 in this['channels'][_0x2b5eba[_0x06f1('0x27')]]){if(this[_0x06f1('0x9')][_0x2b5eba['uniqueid']][_0x06f1('0x3f')](_0x233162)){logger[_0x06f1('0x25')](_0x06f1('0x74'),_0x2b5eba['uniqueid'],_0x233162,_[_0x06f1('0x71')](_0x2b5eba['variable'])[0x0],_0x2b5eba[_0x06f1('0x73')]);if(_[_0x06f1('0x24')](this['channels'][_0x2b5eba[_0x06f1('0x27')]][_0x233162][_0x06f1('0xd')])){this[_0x06f1('0x9')][_0x2b5eba[_0x06f1('0x27')]][_0x233162][_0x06f1('0xd')]={};}this[_0x06f1('0x9')][_0x2b5eba[_0x06f1('0x27')]][_0x233162]['variables']=this[_0x06f1('0xd')][_0x2b5eba[_0x06f1('0x27')]];}}}}}catch(_0x13d083){logger[_0x06f1('0x3d')](_0x06f1('0x75'),_0x2b5eba[_0x06f1('0x27')],util[_0x06f1('0x3a')](_0x13d083,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x06f1('0x22')][_0x06f1('0x70')]=function(_0x5d0418,_0x2902a3,_0x2da7f0){var _0x41a02b=[_0x06f1('0x76'),_0x06f1('0x77'),'rtpaudioqosjitter','rtpaudioqosjitterbridged',_0x06f1('0x78'),'rtpaudioqoslossbridged',_0x06f1('0x79'),_0x06f1('0x7a'),_0x06f1('0x7b'),'sipuri',_0x06f1('0x7c'),_0x06f1('0x7d'),_0x06f1('0x7e'),_0x06f1('0x7f'),_0x06f1('0x80'),'memberlastcall',_0x06f1('0x28'),_0x06f1('0x81'),'memberrealtime'];if(!_[_0x06f1('0x82')](_0x2902a3)&&!_[_0x06f1('0x83')](_0x41a02b,_0x2902a3)){if(_[_0x06f1('0x24')](this[_0x06f1('0xd')][_0x5d0418])){this['variables'][_0x5d0418]={};}this[_0x06f1('0xd')][_0x5d0418][_0x2902a3]=_0x2da7f0;}};VoiceAgentReport[_0x06f1('0x22')][_0x06f1('0x1b')]=function(_0x269343){try{if(this['isNotNull'](_0x269343)){logger['debug'](_0x06f1('0x84'),_0x269343['uniqueid'],util['inspect'](_0x269343,{'showHidden':![],'depth':null}));if(this[_0x06f1('0x9')][_0x269343['uniqueid']]){for(var _0x5ae64c in this[_0x06f1('0x9')][_0x269343[_0x06f1('0x27')]]){if(this['channels'][_0x269343[_0x06f1('0x27')]][_0x06f1('0x3f')](_0x5ae64c)){if(this[_0x06f1('0x9')][_0x269343[_0x06f1('0x27')]][_0x5ae64c][_0x06f1('0x51')]==_0x06f1('0x64')&&this[_0x06f1('0x9')][_0x269343[_0x06f1('0x27')]][_0x5ae64c][_0x06f1('0x16')]){logger[_0x06f1('0x25')](_0x06f1('0x85'),_0x269343['uniqueid'],_0x5ae64c);this['channels'][_0x269343['uniqueid']][_0x5ae64c][_0x06f1('0x62')]=moment()[_0x06f1('0x3b')](_0x06f1('0x2e'));}}}logger[_0x06f1('0x29')](_0x06f1('0x86'),_0x269343[_0x06f1('0x27')],util[_0x06f1('0x3a')](_['values'](this[_0x06f1('0x9')][_0x269343['uniqueid']]),{'showHidden':![],'depth':null}));ami[_0x06f1('0x21')]('custom:voiceAgentReport',_[_0x06f1('0x87')](this[_0x06f1('0x9')][_0x269343['uniqueid']]));delete this[_0x06f1('0x9')][_0x269343[_0x06f1('0x27')]];}if(this[_0x06f1('0xd')][_0x269343['uniqueid']]){delete this[_0x06f1('0xd')][_0x269343[_0x06f1('0x27')]];}}}catch(_0x3a67df){logger[_0x06f1('0x3d')](_0x06f1('0x88'),_0x269343[_0x06f1('0x27')],util[_0x06f1('0x3a')](_0x3a67df,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x06f1('0x22')][_0x06f1('0x89')]=function(_0x35329e){try{if(this[_0x06f1('0x23')](_0x35329e)){logger['debug'](_0x06f1('0x8a'),_0x35329e[_0x06f1('0x27')],util[_0x06f1('0x3a')](_0x35329e,{'showHidden':![],'depth':null}));if(this[_0x06f1('0x9')][_0x35329e[_0x06f1('0x8b')]]){for(var _0x36b723 in this['channels'][_0x35329e[_0x06f1('0x8b')]]){if(this[_0x06f1('0x9')][_0x35329e[_0x06f1('0x8b')]][_0x06f1('0x3f')](_0x36b723)){if(_0x35329e['origtransfereruniqueid']===_0x36b723){logger['info'](_0x06f1('0x8c'),_0x35329e[_0x06f1('0x27')],this['channels'][_0x35329e[_0x06f1('0x8b')]][_0x36b723]['membername'],_0x36b723);var _0x5f03e5=moment();this[_0x06f1('0x9')][_0x35329e['transfereeuniqueid']][_0x36b723][_0x06f1('0x16')]=!![];this['channels'][_0x35329e[_0x06f1('0x8b')]][_0x36b723][_0x06f1('0x62')]=moment()[_0x06f1('0x3b')](_0x06f1('0x2e'));this['channels'][_0x35329e['transfereeuniqueid']][_0x36b723][_0x06f1('0x47')]='complete';this[_0x06f1('0x9')][_0x35329e[_0x06f1('0x8b')]][_0x36b723][_0x06f1('0x51')]=_0x06f1('0x64');this[_0x06f1('0x9')][_0x35329e[_0x06f1('0x8b')]][_0x36b723][_0x06f1('0x66')]=_0x5f03e5[_0x06f1('0x8d')](this['channels'][_0x35329e[_0x06f1('0x8b')]][_0x36b723][_0x06f1('0x41')],'seconds');}}}}if(this[_0x06f1('0x9')][_0x35329e[_0x06f1('0x8e')]]){var _0x3bebe0=this[_0x06f1('0x9')][_0x35329e[_0x06f1('0x8e')]];this['channels'][_0x35329e[_0x06f1('0x8e')]]=this[_0x06f1('0x9')][_0x35329e[_0x06f1('0x8b')]];this[_0x06f1('0x9')][_0x35329e[_0x06f1('0x8b')]]=_0x3bebe0;}}}catch(_0x53f140){logger['error'](_0x06f1('0x8f'),_0x35329e['uniqueid'],util[_0x06f1('0x3a')](_0x53f140,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0x06f1('0x20')]=function(_0x3ff685){try{if(this[_0x06f1('0x23')](_0x3ff685)){logger['debug'](_0x06f1('0x90'),_0x3ff685['uniqueid'],util[_0x06f1('0x3a')](_0x3ff685,{'showHidden':![],'depth':null}));if(this[_0x06f1('0x9')][_0x3ff685[_0x06f1('0x8b')]]){for(var _0x4c14b6 in this['channels'][_0x3ff685[_0x06f1('0x8b')]]){if(this[_0x06f1('0x9')][_0x3ff685[_0x06f1('0x8b')]][_0x06f1('0x3f')](_0x4c14b6)){if(_0x3ff685[_0x06f1('0x91')]===_0x4c14b6){logger[_0x06f1('0x25')](_0x06f1('0x92'),_0x3ff685['uniqueid'],this['channels'][_0x3ff685['transfereeuniqueid']][_0x4c14b6]['membername'],_0x4c14b6);var _0x35b122=moment();this[_0x06f1('0x9')][_0x3ff685['transfereeuniqueid']][_0x4c14b6][_0x06f1('0x16')]=!![];this['channels'][_0x3ff685[_0x06f1('0x8b')]][_0x4c14b6]['agentcompleteAt']=_0x35b122;this[_0x06f1('0x9')][_0x3ff685[_0x06f1('0x8b')]][_0x4c14b6][_0x06f1('0x47')]=_0x06f1('0x63');this[_0x06f1('0x9')][_0x3ff685[_0x06f1('0x8b')]][_0x4c14b6][_0x06f1('0x51')]=_0x06f1('0x64');this[_0x06f1('0x9')][_0x3ff685['transfereeuniqueid']][_0x4c14b6][_0x06f1('0x66')]=_0x35b122[_0x06f1('0x8d')](this[_0x06f1('0x9')][_0x3ff685[_0x06f1('0x8b')]][_0x4c14b6][_0x06f1('0x41')],_0x06f1('0x93'));}}}}}}catch(_0x5347f6){logger[_0x06f1('0x3d')](_0x06f1('0x94'),_0x3ff685[_0x06f1('0x27')],util[_0x06f1('0x3a')](_0x5347f6,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0x06f1('0x1d')]=function(_0x3b9f30){var _0x1709b0='';try{if(this[_0x06f1('0x23')](_0x3b9f30)){logger[_0x06f1('0x29')]('[%s][voiceAgentReport][musiconholdstart]\x20event:',_0x3b9f30['uniqueid'],util[_0x06f1('0x3a')](_0x3b9f30,{'showHidden':![],'depth':null}));if(_0x3b9f30[_0x06f1('0x95')]){_0x1709b0=_0x3b9f30[_0x06f1('0x95')][_0x06f1('0x96')](0x0,_0x3b9f30['channel'][_0x06f1('0x97')]('-'));if(this[_0x06f1('0xc')][_0x1709b0]){logger[_0x06f1('0x25')](_0x06f1('0x98'),_0x3b9f30[_0x06f1('0x27')],_0x1709b0);this[_0x06f1('0xc')][_0x1709b0][_0x06f1('0x99')]=!![];}}}}catch(_0x40ff8a){logger[_0x06f1('0x3d')](_0x06f1('0x9a'),_0x3b9f30[_0x06f1('0x27')],util[_0x06f1('0x3a')](_0x40ff8a,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0x06f1('0x22')][_0x06f1('0x1f')]=function(_0x5c6867){var _0x1fecc5='';try{if(this[_0x06f1('0x23')](_0x5c6867)){logger['debug'](_0x06f1('0x9b'),_0x5c6867[_0x06f1('0x27')],util['inspect'](_0x5c6867,{'showHidden':![],'depth':null}));if(_0x5c6867[_0x06f1('0x95')]){_0x1fecc5=_0x5c6867['channel'][_0x06f1('0x96')](0x0,_0x5c6867['channel'][_0x06f1('0x97')]('-'));if(this[_0x06f1('0xc')][_0x1fecc5]){logger[_0x06f1('0x25')](_0x06f1('0x9c'),_0x5c6867[_0x06f1('0x27')],_0x1fecc5);this['agents'][_0x1fecc5][_0x06f1('0x99')]=![];}}}}catch(_0x20835a){logger[_0x06f1('0x3d')]('[%s][voiceAgentReport][musiconholdstop]',_0x5c6867['uniqueid'],util[_0x06f1('0x3a')](_0x20835a,{'showHidden':![],'depth':null}));}};module[_0x06f1('0x9d')]=VoiceAgentReport;
\ No newline at end of file
+var _0xafca=['[%s][voiceAgentReport][agentcomplete]\x20sending\x20user:agentcomplete\x20event:','destaccountcode','user:agentcomplete','[%s][voiceAgentReport][agentcomplete]','[%s][voiceAgentReport][varset]\x20event:','addVariable','keys','variable','value','[%s][voiceAgentReport][varset]','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri','bridgepeer','bridgepvtcallid','membercalls','memberinterface','isNil','syncHangup','[%s][voiceAgentReport][hangup]\x20event:','values','custom:voiceAgentReport','[%s][voiceAgentReport][hangup]','[%s][voiceAgentReport][attendedtransfer]\x20event:','transfereeuniqueid','[%s][voiceAgentReport][attendedtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','diff','seconds','secondtransfereruniqueid','[%s][voiceAgentReport][attendedtransfer]','transfereruniqueid','[%s][voiceAgentReport][blindtransfer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','[%s][voiceAgentReport][blindtransfer]','[%s][voiceAgentReport][musiconholdstart]\x20event:','channel','substring','[%s][voiceAgentReport][musiconholdstart]\x20interface:%s','[%s][voiceAgentReport][musiconholdstop]\x20event:','lastIndexOf','[%s][voiceAgentReport][musiconholdstop]\x20interface:%s','onhold','[%s][voiceAgentReport][musiconholdstop]','exports','lodash','util','ioredis','../../../config/environment','../../../config/logger','../ami','defaults','redis','socket.io-emitter','channels','voiceQueues','agents','variables','agentcalled','syncAgentCalled','agentconnect','syncAgentConnect','bind','agentringnoanswer','syncAgentRingNoAnswer','queuecallerabandon','syncQueueCallerAbandon','agentcomplete','syncVarSet','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','prototype','emit','isNotNull','isUndefined','info','uniqueid','membername','destuniqueid','debug','[%s][voiceAgentReport][agentcalled]\x20event:','inspect','interface','YYYY-MM-DD\x20HH:mm:ss','voice','assign','omit','event','privilege','[%s][voiceAgentReport][agentcalled]\x20sending\x20agentcalled\x20event:','custom:agentcalled','calleridnum','queue','[%s][voiceAgentReport][agentcalled]\x20sending\x20user:called\x20event:','format','user:called','error','hasOwnProperty','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','agentconnectAt','connectedlinename','connectedlinenum','destchannelstate','destchannelstatedesc','holdtime','lastevent','connect','voiceChannels','routealias','pick','destconnectedlinenum','name','exten','custom:agentconnect','user:agentconnect','[%s][voiceAgentReport][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:answered_elsewhere','agentringnoanswerAt','answeredelsewheredestinationuniqueid','answeredelsewheremembername','answered_elsewhere','[%s][voiceAgentReport][agentconnect]\x20sending\x20agentansweredelsewhere\x20event:','custom:agentansweredelsewhere','[%s][voiceAgentReport][agentconnect]','[%s][voiceAgentReport][agentringnoanswer]\x20event:','[%s][voiceAgentReport][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:rejected','rejected','[%s][voiceAgentReport][agentringnoanswer]\x20sending\x20agentringnoanswer\x20event:','user:agentringnoanswer','[%s][voiceAgentReport][agentringnoanswer]','[%s][voiceAgentReport][queuecallerabandon]\x20event:','[%s][voiceAgentReport][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned','abandoned','custom:agentqueuecallerabandon','syncAgentComplete','[%s][voiceAgentReport][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','agentcompleteAt','complete','reason','transfer','talktime','acw','acwTimeout','agentacw','[%s][voiceAgentReport][agentcomplete]\x20sending\x20agentcomplete\x20event:','custom:agentcomplete'];(function(_0x3fe760,_0x2b9f78){var _0x30077b=function(_0x1f9b1e){while(--_0x1f9b1e){_0x3fe760['push'](_0x3fe760['shift']());}};_0x30077b(++_0x2b9f78);}(_0xafca,0xc7));var _0xaafc=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xafca[_0x20a584];return _0x4b41a8;};'use strict';var _=require(_0xaafc('0x0'));var moment=require('moment');var util=require(_0xaafc('0x1'));var Redis=require(_0xaafc('0x2'));var config=require(_0xaafc('0x3'));var logger=require(_0xaafc('0x4'))('ami');var ami=require(_0xaafc('0x5'));config['redis']=_[_0xaafc('0x6')](config[_0xaafc('0x7')],{'host':'localhost','port':0x18eb});var io=require(_0xaafc('0x8'))(new Redis(config['redis']));function VoiceAgentReport(_0xf22b1d){this[_0xaafc('0x9')]={};this['voiceChannels']=_0xf22b1d['channels'];this['voiceQueues']=_0xf22b1d[_0xaafc('0xa')];this[_0xaafc('0xb')]=_0xf22b1d[_0xaafc('0xb')];this[_0xaafc('0xc')]={};ami['on'](_0xaafc('0xd'),this[_0xaafc('0xe')]['bind'](this));ami['on'](_0xaafc('0xf'),this[_0xaafc('0x10')][_0xaafc('0x11')](this));ami['on'](_0xaafc('0x12'),this[_0xaafc('0x13')]['bind'](this));ami['on'](_0xaafc('0x14'),this[_0xaafc('0x15')]['bind'](this));ami['on'](_0xaafc('0x16'),this['syncAgentComplete'][_0xaafc('0x11')](this));ami['on']('varset',this[_0xaafc('0x17')][_0xaafc('0x11')](this));ami['on']('hangup',this['syncHangup']['bind'](this));ami['on']('musiconholdstart',this[_0xaafc('0x18')][_0xaafc('0x11')](this));ami['on'](_0xaafc('0x19'),this[_0xaafc('0x1a')]['bind'](this));ami['on'](_0xaafc('0x1b'),this[_0xaafc('0x1c')][_0xaafc('0x11')](this));ami['on'](_0xaafc('0x1d'),this[_0xaafc('0x1e')][_0xaafc('0x11')](this));}VoiceAgentReport[_0xaafc('0x1f')][_0xaafc('0x20')]=function(_0x2d076a,_0x6eb225,_0x4ada2a){io['to'](_0x2d076a)['emit'](_0x6eb225,_0x4ada2a);};VoiceAgentReport[_0xaafc('0x1f')][_0xaafc('0x21')]=function(_0x5b676a){return _0x5b676a!==null&&!_[_0xaafc('0x22')](_0x5b676a);};VoiceAgentReport[_0xaafc('0x1f')][_0xaafc('0xe')]=function(_0x343d7b){try{if(this['isNotNull'](_0x343d7b)){logger[_0xaafc('0x23')]('[%s][voiceAgentReport][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called',_0x343d7b[_0xaafc('0x24')],_0x343d7b[_0xaafc('0x25')],_0x343d7b[_0xaafc('0x26')]);logger[_0xaafc('0x27')](_0xaafc('0x28'),_0x343d7b[_0xaafc('0x24')],util[_0xaafc('0x29')](_0x343d7b,{'showHidden':![],'depth':null}));if(_[_0xaafc('0x22')](this[_0xaafc('0x9')][_0x343d7b[_0xaafc('0x24')]])){this[_0xaafc('0x9')][_0x343d7b[_0xaafc('0x24')]]={};}var _0x21103a=this[_0xaafc('0xb')][_0x343d7b[_0xaafc('0x2a')]];var _0x85817a=this[_0xaafc('0x9')][_0x343d7b[_0xaafc('0x24')]][_0x343d7b[_0xaafc('0x26')]];var _0x584ae6=this[_0xaafc('0xa')][_0x343d7b['queue']];var _0x1d6eaf=this['variables'][_0x343d7b[_0xaafc('0x24')]];if(_['isUndefined'](_0x85817a)){_0x85817a={'agentcalledAt':moment()['format'](_0xaafc('0x2b')),'lastevent':'called','mandatoryDisposition':_0x584ae6&&_0x584ae6['mandatoryDisposition']?_0x584ae6['mandatoryDisposition']:![],'type':_0x584ae6&&_0x584ae6['type']?_0x584ae6['type']:'inbound','variables':_0x1d6eaf,'motionChannel':_0xaafc('0x2c')};}Object[_0xaafc('0x2d')](_0x85817a,_[_0xaafc('0x2e')](_0x343d7b,[_0xaafc('0x2f'),_0xaafc('0x30')]));this[_0xaafc('0x9')][_0x343d7b[_0xaafc('0x24')]][_0x343d7b[_0xaafc('0x26')]]=_0x85817a;logger[_0xaafc('0x27')](_0xaafc('0x31'),_0x343d7b[_0xaafc('0x24')],util[_0xaafc('0x29')](_0x85817a,{'showHidden':![],'depth':null}));ami[_0xaafc('0x20')](_0xaafc('0x32'),_0x85817a);var _0x2eed38={'id':_0x21103a['id'],'calleridnum':_0x85817a[_0xaafc('0x33')],'queue':_0x85817a[_0xaafc('0x34')],'variables':_0x85817a['variables'],'uniqueid':_0x343d7b[_0xaafc('0x24')]};logger[_0xaafc('0x27')](_0xaafc('0x35'),_0x343d7b['uniqueid'],util[_0xaafc('0x29')](_0x2eed38,{'showHidden':![],'depth':null}));this[_0xaafc('0x20')](util[_0xaafc('0x36')]('user:%s',_0x343d7b[_0xaafc('0x25')]),_0xaafc('0x37'),_0x2eed38);}}catch(_0x599319){logger[_0xaafc('0x38')]('[%s][voiceAgentReport][agentcalled]',_0x343d7b[_0xaafc('0x24')],util['inspect'](_0x599319,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xaafc('0x1f')]['syncAgentConnect']=function(_0x1f0074){try{if(this[_0xaafc('0x21')](_0x1f0074)){if(this[_0xaafc('0x9')][_0x1f0074[_0xaafc('0x24')]]){for(var _0x312b5f in this['channels'][_0x1f0074[_0xaafc('0x24')]]){if(this['channels'][_0x1f0074[_0xaafc('0x24')]][_0xaafc('0x39')](_0x312b5f)){if(_0x1f0074[_0xaafc('0x26')]===_0x312b5f){logger[_0xaafc('0x23')](_0xaafc('0x3a'),_0x1f0074[_0xaafc('0x24')],_0x1f0074['membername'],_0x1f0074[_0xaafc('0x26')]);this[_0xaafc('0x9')][_0x1f0074[_0xaafc('0x24')]][_0x312b5f][_0xaafc('0x3b')]=moment()[_0xaafc('0x36')]('YYYY-MM-DD\x20HH:mm:ss');this['channels'][_0x1f0074[_0xaafc('0x24')]][_0x312b5f][_0xaafc('0x3c')]=_0x1f0074[_0xaafc('0x3c')];this[_0xaafc('0x9')][_0x1f0074[_0xaafc('0x24')]][_0x312b5f][_0xaafc('0x3d')]=_0x1f0074[_0xaafc('0x3d')];this[_0xaafc('0x9')][_0x1f0074['uniqueid']][_0x312b5f][_0xaafc('0x3e')]=_0x1f0074['destchannelstate'];this[_0xaafc('0x9')][_0x1f0074['uniqueid']][_0x312b5f][_0xaafc('0x3f')]=_0x1f0074['destchannelstatedesc'];this['channels'][_0x1f0074['uniqueid']][_0x312b5f][_0xaafc('0x40')]=_0x1f0074[_0xaafc('0x40')];this[_0xaafc('0x9')][_0x1f0074[_0xaafc('0x24')]][_0x312b5f][_0xaafc('0x41')]=_0xaafc('0x42');if(this[_0xaafc('0x43')][this[_0xaafc('0x9')][_0x1f0074[_0xaafc('0x24')]][_0x312b5f][_0xaafc('0x24')]]){var _0x3ab7c2=this[_0xaafc('0x43')][this[_0xaafc('0x9')][_0x1f0074[_0xaafc('0x24')]][_0x312b5f][_0xaafc('0x24')]][_0xaafc('0x44')];this[_0xaafc('0x9')][_0x1f0074[_0xaafc('0x24')]][_0x312b5f][_0xaafc('0x44')]=_0x3ab7c2;_0x1f0074['routealias']=_0x3ab7c2;}_['merge'](this[_0xaafc('0xb')][_0x1f0074[_0xaafc('0x2a')]],_[_0xaafc('0x45')](_0x1f0074,[_0xaafc('0x34'),_0xaafc('0x46'),_0xaafc('0x44')]));var _0x217ef5=this[_0xaafc('0xb')][_0x1f0074[_0xaafc('0x2a')]];var _0x509c5c={'id':_0x217ef5['id'],'name':_0x217ef5[_0xaafc('0x47')],'agentconnected':!![],'destaccountcode':_0x217ef5['accountcode'],'destconnectedlinenum':this[_0xaafc('0x9')][_0x1f0074[_0xaafc('0x24')]][_0x1f0074[_0xaafc('0x26')]][_0xaafc('0x48')],'queue':this[_0xaafc('0x9')][_0x1f0074['uniqueid']][_0x1f0074['destuniqueid']]['queue'],'routealias':this[_0xaafc('0x9')][_0x1f0074['uniqueid']][_0x1f0074[_0xaafc('0x26')]][_0xaafc('0x44')],'uniqueid':this[_0xaafc('0x9')][_0x1f0074[_0xaafc('0x24')]][_0x1f0074[_0xaafc('0x26')]][_0xaafc('0x24')]};ami[_0xaafc('0x20')](_0xaafc('0x49'),this[_0xaafc('0x9')][_0x1f0074[_0xaafc('0x24')]][_0x1f0074[_0xaafc('0x26')]]);this['emit'](util[_0xaafc('0x36')]('user:%s',_0x1f0074[_0xaafc('0x25')]),_0xaafc('0x4a'),_0x509c5c);}else if(!this[_0xaafc('0x9')][_0x1f0074['uniqueid']][_0x312b5f]['agentringnoanswer']&&!this['channels'][_0x1f0074[_0xaafc('0x24')]][_0x312b5f][_0xaafc('0x16')]){logger[_0xaafc('0x23')](_0xaafc('0x4b'),_0x1f0074[_0xaafc('0x24')],this[_0xaafc('0x9')][_0x1f0074[_0xaafc('0x24')]][_0x312b5f][_0xaafc('0x25')],_0x312b5f);this[_0xaafc('0x9')][_0x1f0074[_0xaafc('0x24')]][_0x312b5f][_0xaafc('0x12')]=!![];this[_0xaafc('0x9')][_0x1f0074[_0xaafc('0x24')]][_0x312b5f][_0xaafc('0x4c')]=moment()[_0xaafc('0x36')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xaafc('0x9')][_0x1f0074[_0xaafc('0x24')]][_0x312b5f][_0xaafc('0x4d')]=_0x1f0074['destuniqueid'];this['channels'][_0x1f0074[_0xaafc('0x24')]][_0x312b5f][_0xaafc('0x4e')]=_0x1f0074[_0xaafc('0x25')];this[_0xaafc('0x9')][_0x1f0074['uniqueid']][_0x312b5f]['lastevent']=_0xaafc('0x4f');this['channels'][_0x1f0074[_0xaafc('0x24')]][_0x312b5f]['reason']=_0xaafc('0x4f');logger[_0xaafc('0x27')](_0xaafc('0x50'),_0x1f0074['uniqueid'],util[_0xaafc('0x29')](this[_0xaafc('0x9')][_0x1f0074[_0xaafc('0x24')]][_0x312b5f],{'showHidden':![],'depth':null}));ami[_0xaafc('0x20')](_0xaafc('0x51'),this[_0xaafc('0x9')][_0x1f0074[_0xaafc('0x24')]][_0x312b5f]);}else{logger['debug']('[%s][voiceAgentReport][agentconnect]\x20Else\x20path\x20should\x20never\x20be\x20taken',_0x1f0074[_0xaafc('0x24')]);}}}}}}catch(_0x1682c3){logger[_0xaafc('0x38')](_0xaafc('0x52'),_0x1f0074[_0xaafc('0x24')],util['inspect'](_0x1682c3,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xaafc('0x1f')][_0xaafc('0x13')]=function(_0x410e89){try{if(this['isNotNull'](_0x410e89)){logger[_0xaafc('0x27')](_0xaafc('0x53'),_0x410e89[_0xaafc('0x24')],util[_0xaafc('0x29')](_0x410e89,{'showHidden':![],'depth':null}));if(this[_0xaafc('0x9')][_0x410e89['uniqueid']]&&this[_0xaafc('0x9')][_0x410e89[_0xaafc('0x24')]][_0x410e89[_0xaafc('0x26')]]){logger[_0xaafc('0x23')](_0xaafc('0x54'),_0x410e89['uniqueid'],_0x410e89['membername'],_0x410e89[_0xaafc('0x26')]);var _0x2ff327=this[_0xaafc('0xb')][_0x410e89[_0xaafc('0x2a')]];var _0x50fd6f=this['channels'][_0x410e89[_0xaafc('0x24')]][_0x410e89['destuniqueid']];_0x50fd6f[_0xaafc('0x12')]=!![];_0x50fd6f[_0xaafc('0x4c')]=moment()['format'](_0xaafc('0x2b'));_0x50fd6f[_0xaafc('0x41')]=_0xaafc('0x55');_0x50fd6f['reason']='rejected';var _0x432106={'id':_0x2ff327['id'],'name':_0x2ff327[_0xaafc('0x47')],'queue':_0x50fd6f[_0xaafc('0x34')],'uniqueid':_0x50fd6f[_0xaafc('0x24')]};logger[_0xaafc('0x27')](_0xaafc('0x56'),_0x410e89[_0xaafc('0x24')],util[_0xaafc('0x29')](_0x432106,{'showHidden':![],'depth':null}));this[_0xaafc('0x20')](util[_0xaafc('0x36')]('user:%s',_0x2ff327['name']),_0xaafc('0x57'),_0x432106);ami['emit']('custom:agentringnoanswer',_0x50fd6f);this[_0xaafc('0x9')][_0x410e89['uniqueid']][_0x410e89[_0xaafc('0x26')]]=Object[_0xaafc('0x2d')]({},_0x50fd6f);}}}catch(_0xcbff4d){logger[_0xaafc('0x38')](_0xaafc('0x58'),_0x410e89['uniqueid'],util[_0xaafc('0x29')](_0xcbff4d,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0xaafc('0x15')]=function(_0x2ac40e){try{if(this[_0xaafc('0x21')](_0x2ac40e)){logger[_0xaafc('0x27')](_0xaafc('0x59'),_0x2ac40e[_0xaafc('0x24')],util['inspect'](_0x2ac40e,{'showHidden':![],'depth':null}));if(this[_0xaafc('0x9')][_0x2ac40e[_0xaafc('0x24')]]){for(var _0x167d3c in this[_0xaafc('0x9')][_0x2ac40e[_0xaafc('0x24')]]){if(this['channels'][_0x2ac40e[_0xaafc('0x24')]][_0xaafc('0x39')](_0x167d3c)&&!this[_0xaafc('0x9')][_0x2ac40e[_0xaafc('0x24')]][_0x167d3c][_0xaafc('0x12')]&&!this[_0xaafc('0x9')][_0x2ac40e[_0xaafc('0x24')]][_0x167d3c][_0xaafc('0x16')]){logger[_0xaafc('0x23')](_0xaafc('0x5a'),_0x2ac40e['uniqueid'],this[_0xaafc('0x9')][_0x2ac40e[_0xaafc('0x24')]][_0x167d3c][_0xaafc('0x25')],_0x167d3c);this[_0xaafc('0x9')][_0x2ac40e['uniqueid']][_0x167d3c][_0xaafc('0x12')]=!![];this[_0xaafc('0x9')][_0x2ac40e[_0xaafc('0x24')]][_0x167d3c]['agentringnoanswerAt']=moment()[_0xaafc('0x36')](_0xaafc('0x2b'));this[_0xaafc('0x9')][_0x2ac40e[_0xaafc('0x24')]][_0x167d3c]['lastevent']=_0xaafc('0x5b');this['channels'][_0x2ac40e[_0xaafc('0x24')]][_0x167d3c]['reason']=_0xaafc('0x5b');logger[_0xaafc('0x27')]('[%s][voiceAgentReport][queuecallerabandon]\x20sending\x20agentqueuecallerabandon\x20event:',_0x2ac40e['uniqueid'],util[_0xaafc('0x29')](this['channels'][_0x2ac40e[_0xaafc('0x24')]][_0x167d3c],{'showHidden':![],'depth':null}));ami[_0xaafc('0x20')](_0xaafc('0x5c'),this[_0xaafc('0x9')][_0x2ac40e['uniqueid']][_0x167d3c]);}}}}}catch(_0x5c27de){logger['error']('[%s][voiceAgentReport][queuecallerabandon]',_0x2ac40e[_0xaafc('0x24')],util['inspect'](_0x5c27de,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xaafc('0x1f')][_0xaafc('0x5d')]=function(_0x48cdbc){try{if(this[_0xaafc('0x21')](_0x48cdbc)){logger[_0xaafc('0x27')]('[%s][voiceAgentReport][agentcomplete]\x20event:',_0x48cdbc[_0xaafc('0x24')],util[_0xaafc('0x29')](_0x48cdbc,{'showHidden':![],'depth':null}));if(this[_0xaafc('0x9')][_0x48cdbc['uniqueid']]){for(var _0x298d86 in this['channels'][_0x48cdbc['uniqueid']]){if(this['channels'][_0x48cdbc[_0xaafc('0x24')]][_0xaafc('0x39')](_0x298d86)){if(this['channels'][_0x48cdbc[_0xaafc('0x24')]][_0x298d86][_0xaafc('0x3b')]&&!this['channels'][_0x48cdbc[_0xaafc('0x24')]][_0x298d86][_0xaafc('0x16')]){logger[_0xaafc('0x23')](_0xaafc('0x5e'),_0x48cdbc[_0xaafc('0x24')],this[_0xaafc('0x9')][_0x48cdbc[_0xaafc('0x24')]][_0x298d86][_0xaafc('0x25')],_0x298d86);this[_0xaafc('0x9')][_0x48cdbc[_0xaafc('0x24')]][_0x298d86][_0xaafc('0x16')]=!![];this[_0xaafc('0x9')][_0x48cdbc['uniqueid']][_0x298d86][_0xaafc('0x5f')]=moment()[_0xaafc('0x36')](_0xaafc('0x2b'));this['channels'][_0x48cdbc[_0xaafc('0x24')]][_0x298d86][_0xaafc('0x41')]=_0xaafc('0x60');this['channels'][_0x48cdbc[_0xaafc('0x24')]][_0x298d86]['reason']=_0x48cdbc[_0xaafc('0x61')]==_0xaafc('0x62')?'agent':_0x48cdbc[_0xaafc('0x61')];this[_0xaafc('0x9')][_0x48cdbc[_0xaafc('0x24')]][_0x298d86][_0xaafc('0x63')]=_0x48cdbc['talktime'];if(this[_0xaafc('0xa')][_0x48cdbc['queue']]&&this[_0xaafc('0xa')][_0x48cdbc['queue']][_0xaafc('0x64')]){this[_0xaafc('0x9')][_0x48cdbc[_0xaafc('0x24')]][_0x298d86]['acwtime']=this['voiceQueues'][_0x48cdbc[_0xaafc('0x34')]][_0xaafc('0x65')];this[_0xaafc('0x9')][_0x48cdbc[_0xaafc('0x24')]][_0x298d86][_0xaafc('0x66')]=!![];}this[_0xaafc('0xb')][_0x48cdbc['interface']]=_[_0xaafc('0x2e')](this[_0xaafc('0xb')][_0x48cdbc[_0xaafc('0x2a')]],[_0xaafc('0x34'),'destconnectedlinenum']);logger[_0xaafc('0x27')](_0xaafc('0x67'),_0x48cdbc['uniqueid'],util[_0xaafc('0x29')](this[_0xaafc('0x9')][_0x48cdbc[_0xaafc('0x24')]][_0x298d86],{'showHidden':![],'depth':null}));ami[_0xaafc('0x20')](_0xaafc('0x68'),this[_0xaafc('0x9')][_0x48cdbc[_0xaafc('0x24')]][_0x298d86]);logger[_0xaafc('0x27')](_0xaafc('0x69'),_0x48cdbc['uniqueid'],util[_0xaafc('0x29')]({'id':this[_0xaafc('0xb')][_0x48cdbc[_0xaafc('0x2a')]]['id'],'destaccountcode':_0x48cdbc[_0xaafc('0x6a')]},{'showHidden':![],'depth':null}));this[_0xaafc('0x20')](util[_0xaafc('0x36')]('user:%s',_0x48cdbc[_0xaafc('0x25')]),_0xaafc('0x6b'),{'id':this[_0xaafc('0xb')][_0x48cdbc[_0xaafc('0x2a')]]['id'],'destaccountcode':Number(_0x48cdbc['destaccountcode'])});}}}}}}catch(_0x3673fe){logger[_0xaafc('0x38')](_0xaafc('0x6c'),_0x48cdbc['uniqueid'],util[_0xaafc('0x29')](_0x3673fe,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xaafc('0x1f')][_0xaafc('0x17')]=function(_0x13c685){try{if(this[_0xaafc('0x21')](_0x13c685)){logger['debug'](_0xaafc('0x6d'),_0x13c685[_0xaafc('0x24')],util[_0xaafc('0x29')](_0x13c685,{'showHidden':![],'depth':null}));this[_0xaafc('0x6e')](_0x13c685[_0xaafc('0x24')],_[_0xaafc('0x6f')](_0x13c685[_0xaafc('0x70')])[0x0],_0x13c685[_0xaafc('0x71')]);if(this[_0xaafc('0x9')][_0x13c685['uniqueid']]){for(var _0x57e42c in this[_0xaafc('0x9')][_0x13c685[_0xaafc('0x24')]]){if(this[_0xaafc('0x9')][_0x13c685[_0xaafc('0x24')]]['hasOwnProperty'](_0x57e42c)){logger[_0xaafc('0x23')]('[%s][voiceAgentReport][varset]\x20destuniqueid:%s\x20variable:%s\x20value:%s',_0x13c685[_0xaafc('0x24')],_0x57e42c,_[_0xaafc('0x6f')](_0x13c685['variable'])[0x0],_0x13c685[_0xaafc('0x71')]);if(_[_0xaafc('0x22')](this['channels'][_0x13c685[_0xaafc('0x24')]][_0x57e42c][_0xaafc('0xc')])){this[_0xaafc('0x9')][_0x13c685[_0xaafc('0x24')]][_0x57e42c]['variables']={};}this['channels'][_0x13c685[_0xaafc('0x24')]][_0x57e42c][_0xaafc('0xc')]=this['variables'][_0x13c685[_0xaafc('0x24')]];}}}}}catch(_0x3c4b3d){logger['error'](_0xaafc('0x72'),_0x13c685[_0xaafc('0x24')],util[_0xaafc('0x29')](_0x3c4b3d,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xaafc('0x1f')][_0xaafc('0x6e')]=function(_0x34cc57,_0x366c50,_0x2e77ce){var _0x5772f8=['rtpaudioqos',_0xaafc('0x73'),_0xaafc('0x74'),_0xaafc('0x75'),'rtpaudioqosloss','rtpaudioqoslossbridged',_0xaafc('0x76'),_0xaafc('0x77'),_0xaafc('0x78'),_0xaafc('0x79'),_0xaafc('0x7a'),_0xaafc('0x7b'),_0xaafc('0x7c'),'memberdynamic',_0xaafc('0x7d'),'memberlastcall',_0xaafc('0x25'),'memberpenalty','memberrealtime'];if(!_[_0xaafc('0x7e')](_0x366c50)&&!_['includes'](_0x5772f8,_0x366c50)){if(_[_0xaafc('0x22')](this[_0xaafc('0xc')][_0x34cc57])){this[_0xaafc('0xc')][_0x34cc57]={};}this[_0xaafc('0xc')][_0x34cc57][_0x366c50]=_0x2e77ce;}};VoiceAgentReport[_0xaafc('0x1f')][_0xaafc('0x7f')]=function(_0x3c5085){try{if(this['isNotNull'](_0x3c5085)){logger[_0xaafc('0x27')](_0xaafc('0x80'),_0x3c5085[_0xaafc('0x24')],util[_0xaafc('0x29')](_0x3c5085,{'showHidden':![],'depth':null}));if(this[_0xaafc('0x9')][_0x3c5085[_0xaafc('0x24')]]){for(var _0x259092 in this[_0xaafc('0x9')][_0x3c5085['uniqueid']]){if(this[_0xaafc('0x9')][_0x3c5085[_0xaafc('0x24')]][_0xaafc('0x39')](_0x259092)){if(this['channels'][_0x3c5085[_0xaafc('0x24')]][_0x259092][_0xaafc('0x61')]==_0xaafc('0x62')&&this[_0xaafc('0x9')][_0x3c5085[_0xaafc('0x24')]][_0x259092][_0xaafc('0x16')]){logger['info']('[%s][voiceAgentReport][hangup]\x20destuniqueid:%s',_0x3c5085[_0xaafc('0x24')],_0x259092);this[_0xaafc('0x9')][_0x3c5085[_0xaafc('0x24')]][_0x259092]['agentcompleteAt']=moment()[_0xaafc('0x36')]('YYYY-MM-DD\x20HH:mm:ss');}}}logger[_0xaafc('0x27')]('[%s][voiceAgentReport][hangup]\x20sending\x20voiceAgentReport\x20event:',_0x3c5085[_0xaafc('0x24')],util['inspect'](_[_0xaafc('0x81')](this[_0xaafc('0x9')][_0x3c5085[_0xaafc('0x24')]]),{'showHidden':![],'depth':null}));ami[_0xaafc('0x20')](_0xaafc('0x82'),_[_0xaafc('0x81')](this[_0xaafc('0x9')][_0x3c5085[_0xaafc('0x24')]]));delete this[_0xaafc('0x9')][_0x3c5085[_0xaafc('0x24')]];}if(this[_0xaafc('0xc')][_0x3c5085['uniqueid']]){delete this[_0xaafc('0xc')][_0x3c5085[_0xaafc('0x24')]];}}}catch(_0x3870dd){logger['error'](_0xaafc('0x83'),_0x3c5085[_0xaafc('0x24')],util['inspect'](_0x3870dd,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0xaafc('0x1c')]=function(_0x452cab){try{if(this['isNotNull'](_0x452cab)){logger[_0xaafc('0x27')](_0xaafc('0x84'),_0x452cab[_0xaafc('0x24')],util[_0xaafc('0x29')](_0x452cab,{'showHidden':![],'depth':null}));if(this[_0xaafc('0x9')][_0x452cab[_0xaafc('0x85')]]){for(var _0x3c89b4 in this['channels'][_0x452cab[_0xaafc('0x85')]]){if(this[_0xaafc('0x9')][_0x452cab[_0xaafc('0x85')]][_0xaafc('0x39')](_0x3c89b4)){if(_0x452cab['origtransfereruniqueid']===_0x3c89b4){logger[_0xaafc('0x23')](_0xaafc('0x86'),_0x452cab[_0xaafc('0x24')],this[_0xaafc('0x9')][_0x452cab[_0xaafc('0x85')]][_0x3c89b4][_0xaafc('0x25')],_0x3c89b4);var _0x341bea=moment();this[_0xaafc('0x9')][_0x452cab[_0xaafc('0x85')]][_0x3c89b4][_0xaafc('0x16')]=!![];this[_0xaafc('0x9')][_0x452cab[_0xaafc('0x85')]][_0x3c89b4][_0xaafc('0x5f')]=moment()[_0xaafc('0x36')]('YYYY-MM-DD\x20HH:mm:ss');this[_0xaafc('0x9')][_0x452cab['transfereeuniqueid']][_0x3c89b4]['lastevent']='complete';this[_0xaafc('0x9')][_0x452cab['transfereeuniqueid']][_0x3c89b4]['reason']=_0xaafc('0x62');this[_0xaafc('0x9')][_0x452cab[_0xaafc('0x85')]][_0x3c89b4][_0xaafc('0x63')]=_0x341bea[_0xaafc('0x87')](this['channels'][_0x452cab[_0xaafc('0x85')]][_0x3c89b4][_0xaafc('0x3b')],_0xaafc('0x88'));}}}}if(this[_0xaafc('0x9')][_0x452cab[_0xaafc('0x89')]]){var _0xcd8261=this[_0xaafc('0x9')][_0x452cab[_0xaafc('0x89')]];this[_0xaafc('0x9')][_0x452cab['secondtransfereruniqueid']]=this['channels'][_0x452cab['transfereeuniqueid']];this[_0xaafc('0x9')][_0x452cab['transfereeuniqueid']]=_0xcd8261;}}}catch(_0x366e5b){logger[_0xaafc('0x38')](_0xaafc('0x8a'),_0x452cab[_0xaafc('0x24')],util[_0xaafc('0x29')](_0x366e5b,{'showHidden':![],'depth':null}));}};VoiceAgentReport['prototype'][_0xaafc('0x1e')]=function(_0x3b6f2d){try{if(this[_0xaafc('0x21')](_0x3b6f2d)){logger[_0xaafc('0x27')]('[%s][voiceAgentReport][blindtransfer]\x20event:',_0x3b6f2d[_0xaafc('0x24')],util['inspect'](_0x3b6f2d,{'showHidden':![],'depth':null}));if(this[_0xaafc('0x9')][_0x3b6f2d['transfereeuniqueid']]){for(var _0x510cbb in this[_0xaafc('0x9')][_0x3b6f2d[_0xaafc('0x85')]]){if(this[_0xaafc('0x9')][_0x3b6f2d['transfereeuniqueid']][_0xaafc('0x39')](_0x510cbb)){if(_0x3b6f2d[_0xaafc('0x8b')]===_0x510cbb){logger[_0xaafc('0x23')](_0xaafc('0x8c'),_0x3b6f2d['uniqueid'],this['channels'][_0x3b6f2d['transfereeuniqueid']][_0x510cbb][_0xaafc('0x25')],_0x510cbb);var _0x462312=moment();this[_0xaafc('0x9')][_0x3b6f2d['transfereeuniqueid']][_0x510cbb][_0xaafc('0x16')]=!![];this[_0xaafc('0x9')][_0x3b6f2d['transfereeuniqueid']][_0x510cbb][_0xaafc('0x5f')]=_0x462312;this['channels'][_0x3b6f2d['transfereeuniqueid']][_0x510cbb][_0xaafc('0x41')]=_0xaafc('0x60');this[_0xaafc('0x9')][_0x3b6f2d['transfereeuniqueid']][_0x510cbb][_0xaafc('0x61')]=_0xaafc('0x62');this[_0xaafc('0x9')][_0x3b6f2d['transfereeuniqueid']][_0x510cbb][_0xaafc('0x63')]=_0x462312[_0xaafc('0x87')](this[_0xaafc('0x9')][_0x3b6f2d[_0xaafc('0x85')]][_0x510cbb][_0xaafc('0x3b')],_0xaafc('0x88'));}}}}}}catch(_0x3aa106){logger[_0xaafc('0x38')](_0xaafc('0x8d'),_0x3b6f2d[_0xaafc('0x24')],util[_0xaafc('0x29')](_0x3aa106,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xaafc('0x1f')][_0xaafc('0x18')]=function(_0x208287){var _0x382d3b='';try{if(this['isNotNull'](_0x208287)){logger[_0xaafc('0x27')](_0xaafc('0x8e'),_0x208287['uniqueid'],util[_0xaafc('0x29')](_0x208287,{'showHidden':![],'depth':null}));if(_0x208287[_0xaafc('0x8f')]){_0x382d3b=_0x208287[_0xaafc('0x8f')][_0xaafc('0x90')](0x0,_0x208287['channel']['lastIndexOf']('-'));if(this[_0xaafc('0xb')][_0x382d3b]){logger[_0xaafc('0x23')](_0xaafc('0x91'),_0x208287[_0xaafc('0x24')],_0x382d3b);this[_0xaafc('0xb')][_0x382d3b]['onhold']=!![];}}}}catch(_0x3be1dc){logger[_0xaafc('0x38')]('[%s][voiceAgentReport][musiconholdstart]',_0x208287[_0xaafc('0x24')],util[_0xaafc('0x29')](_0x3be1dc,{'showHidden':![],'depth':null}));}};VoiceAgentReport[_0xaafc('0x1f')][_0xaafc('0x1a')]=function(_0x330623){var _0x5e93c3='';try{if(this[_0xaafc('0x21')](_0x330623)){logger[_0xaafc('0x27')](_0xaafc('0x92'),_0x330623['uniqueid'],util['inspect'](_0x330623,{'showHidden':![],'depth':null}));if(_0x330623[_0xaafc('0x8f')]){_0x5e93c3=_0x330623[_0xaafc('0x8f')][_0xaafc('0x90')](0x0,_0x330623[_0xaafc('0x8f')][_0xaafc('0x93')]('-'));if(this[_0xaafc('0xb')][_0x5e93c3]){logger[_0xaafc('0x23')](_0xaafc('0x94'),_0x330623[_0xaafc('0x24')],_0x5e93c3);this[_0xaafc('0xb')][_0x5e93c3][_0xaafc('0x95')]=![];}}}}catch(_0x349339){logger[_0xaafc('0x38')](_0xaafc('0x96'),_0x330623[_0xaafc('0x24')],util[_0xaafc('0x29')](_0x349339,{'showHidden':![],'depth':null}));}};module[_0xaafc('0x97')]=VoiceAgentReport;
\ No newline at end of file
index 133b9e5..d13ef20 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf299=['transfereecalleridnum','[%s][voiceCallReport][blindtransfer]\x20event:','transfereruniqueid','transfererchannel','[%s][voiceCallReport][blindtransfer]','syncMusicOnHoldStart','[%s][voiceCallReport][musiconholdstart]\x20event:','mohstarttime','[%s][voiceCallReport][musiconholdstart]','[%s][voiceCallReport][musiconholdstop]\x20mohtime:%s','mohtime','[%s][voiceCallReport][musiconholdstop]','exports','moment','util','../../../config/environment','ami','../ami','../model/channel','set','queue','agi','dial','playback','voicemail','NO\x20ANSWER','FAILED','ANSWERED','redis','localhost','socket.io-emitter','channels','agents','blindTransfers','syncNewExten','bind','newexten','newchannel','syncNewChannel','syncNewState','syncVarSet','hangup','syncHangup','syncNewCallerId','attendedtransfer','blindtransfer','musiconholdstart','musiconholdstop','syncMusicOnHoldStop','info','[voiceCallReport][coreshowchannels]\x20started','actionCoreShowChannels','error','[voiceCallReport][coreshowchannels]','inspect','prototype','isUndefined','isNotNull','[%s][voiceCallReport][newcallerid]\x20calleridname:%s\x20calleridnum:%s','uniqueid','calleridname','calleridnum','debug','[%s][voiceCallReport][newcallerid]\x20event:','pick','context','from-sip','channel','xcally-motion-preview','destconnectedlinenum','connectedlinenum','emit','format','user:%s','name','user:agentconnect','accountcode','[%s][voiceCallReport][newchannel]\x20event:','linkedid','[%s][voiceCallReport][newchannel]\x20context:%s\x20exten:%s','exten','starttime','disposition','channelstate','merge','split','[%s][voiceCallReport][newchannel]\x20sending\x20user:agentconnect\x20event:','[%s][voiceCallReport][newchannel]','[%s][voiceCallReport][newexten]\x20event:','OutgoingSpoolFailed','application','toLowerCase','applicationdata','appdata','startsWith','CDR(routeAlias)','[%s][voiceCallReport][newexten]\x20application:%s\x20appdata:%s','duration','subtract','seconds','YYYY-MM-DD\x20HH:mm:ss','keys','lastapplication','lastdata','cdr(','isNil','[%s][voiceCallReport][newexten]','[%s][voiceCallReport][newstate]\x20linkedid:%s\x20calleridname:%s\x20calleridnum:%s','answered','answertime','diff','UserId','destinationchannel','toNumber','routealias','[%s][voiceCallReport][newstate]','monitor','endsWith','.wav49','.WAV','monitorFilename','find','monitors','rec','[%s][voiceCallReport][varset]\x20event:','value','variable','xmd-phone','[%s][voiceCallReport][varset]\x20variable:xmd-phone\x20value:%s','xmd-callerid','[%s][voiceCallReport][varset]\x20variable:xmd-callerid\x20value:%s','xmd-cdrtype','[%s][voiceCallReport][varset]\x20variable:xmd-cdrtype\x20value:%s','type','xmd-originatecalleridnum','[%s][voiceCallReport][varset]\x20variable:xmd-originatecalleridnum\x20value:%s','originatecalleridnum','xmd-destination','xmd-callerid-preview','[%s][voiceCallReport][varset]\x20variable:xmd-callerid-preview\x20value:%s','calleridpreview','xmcs-queue','sipcallid','[%s][voiceCallReport][varset]\x20variable:sipcallid\x20value:%s','parse','[%s][voiceCallReport][varset]\x20variable:mixmonitor_filename\x20value:%s','syncMixMonitorFilename','sipcalllinkedid','[%s][voiceCallReport][varset]','[%s][voiceCallReport][hangup]\x20event:','[%s][voiceCallReport][hangup]\x20reason:%s','endtime','holdtime','billableseconds','omit','user:agentcomplete','transferType','resolve','then','undefined','transferToInternal','getSettings','stopRecordingOnTransfer','Action','StopMixMonitor','catch','finally','webbar:stopmonitors','event','BlindTransfer','[%s][voiceCallReport][hangup]\x20sending\x20hangup\x20event:','[%s][voiceCallReport][hangup]','[%s][voiceCallReport][attendedtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s','origtransferercalleridnum','transfertargetcalleridnum','[%s][voiceCallReport][attendedtransfer]\x20event:','transfereeuniqueid','transfercalleridnum','transferconnectedlinenum','secondtransfereruniqueid','transfertargetuniqueid','origtransfereruniqueid','ATTENDED','some','origtransfererlinkedid','outbound','routeid','[%s][voiceCallReport][attendedtransfer]','syncBlindTransfer'];(function(_0x566369,_0x151390){var _0x348b0a=function(_0x219249){while(--_0x219249){_0x566369['push'](_0x566369['shift']());}};_0x348b0a(++_0x151390);}(_0xf299,0xca));var _0x9f29=function(_0x3d214d,_0x17406f){_0x3d214d=_0x3d214d-0x0;var _0xfc3afc=_0xf299[_0x3d214d];return _0xfc3afc;};'use strict';var _=require('lodash');var moment=require(_0x9f29('0x0'));var util=require(_0x9f29('0x1'));var path=require('path');var Redis=require('ioredis');var config=require(_0x9f29('0x2'));var logger=require('../../../config/logger')(_0x9f29('0x3'));var ami=require(_0x9f29('0x4'));var Channel=require(_0x9f29('0x5'));var RpcSetting=require('../rpc/setting');var applications=[_0x9f29('0x6'),_0x9f29('0x7'),_0x9f29('0x8'),_0x9f29('0x9'),_0x9f29('0xa'),_0x9f29('0xb')];var dispositions=[_0x9f29('0xc'),_0x9f29('0xd'),_0x9f29('0xd'),_0x9f29('0xc'),_0x9f29('0xc'),'NO\x20ANSWER',_0x9f29('0xe'),'BUSY',_0x9f29('0xd'),_0x9f29('0xd'),_0x9f29('0xd')];config[_0x9f29('0xf')]=_['defaults'](config[_0x9f29('0xf')],{'host':_0x9f29('0x10'),'port':0x18eb});var io=require(_0x9f29('0x11'))(new Redis(config[_0x9f29('0xf')]));function VoiceCallReport(_0x5f2319){this[_0x9f29('0x12')]=_0x5f2319[_0x9f29('0x12')];this[_0x9f29('0x13')]=_0x5f2319[_0x9f29('0x13')];this[_0x9f29('0x14')]={};ami['on']('coreshowchannel',this[_0x9f29('0x15')][_0x9f29('0x16')](this));ami['on'](_0x9f29('0x17'),this[_0x9f29('0x15')]['bind'](this));ami['on'](_0x9f29('0x18'),this[_0x9f29('0x19')]['bind'](this));ami['on']('newstate',this[_0x9f29('0x1a')][_0x9f29('0x16')](this));ami['on']('varset',this[_0x9f29('0x1b')][_0x9f29('0x16')](this));ami['on'](_0x9f29('0x1c'),this[_0x9f29('0x1d')]['bind'](this));ami['on']('newcallerid',this[_0x9f29('0x1e')][_0x9f29('0x16')](this));ami['on'](_0x9f29('0x1f'),this['syncAttendedTransfer'][_0x9f29('0x16')](this));ami['on'](_0x9f29('0x20'),this['syncBlindTransfer']['bind'](this));ami['on'](_0x9f29('0x21'),this['syncMusicOnHoldStart']['bind'](this));ami['on'](_0x9f29('0x22'),this[_0x9f29('0x23')][_0x9f29('0x16')](this));try{logger[_0x9f29('0x24')](_0x9f29('0x25'));ami[_0x9f29('0x26')]();}catch(_0x12fffc){logger[_0x9f29('0x27')](_0x9f29('0x28'),util[_0x9f29('0x29')](_0x12fffc,{'showHidden':![],'depth':null}));}}VoiceCallReport[_0x9f29('0x2a')]['isNotNull']=function(_0x1037f0){return _0x1037f0!==null&&!_[_0x9f29('0x2b')](_0x1037f0);};VoiceCallReport[_0x9f29('0x2a')]['emit']=function(_0x937840,_0x18094d,_0x223c4e){io['to'](_0x937840)['emit'](_0x18094d,_0x223c4e);};VoiceCallReport[_0x9f29('0x2a')][_0x9f29('0x1e')]=function(_0x5a2043){try{if(this[_0x9f29('0x2c')](_0x5a2043)){logger[_0x9f29('0x24')](_0x9f29('0x2d'),_0x5a2043[_0x9f29('0x2e')],_0x5a2043[_0x9f29('0x2f')],_0x5a2043[_0x9f29('0x30')]);logger[_0x9f29('0x31')](_0x9f29('0x32'),_0x5a2043[_0x9f29('0x2e')],util['inspect'](_0x5a2043,{'showHidden':![],'depth':null}));if(_0x5a2043['uniqueid']===_0x5a2043['linkedid']){if(!_['isUndefined'](this[_0x9f29('0x12')][_0x5a2043[_0x9f29('0x2e')]])){_['merge'](this[_0x9f29('0x12')][_0x5a2043[_0x9f29('0x2e')]],_[_0x9f29('0x33')](_0x5a2043,_['keys'](this[_0x9f29('0x12')][_0x5a2043[_0x9f29('0x2e')]])));}}if(_0x5a2043[_0x9f29('0x34')]===_0x9f29('0x35')){var _0x330c58=this['agents'][_0x5a2043[_0x9f29('0x36')]['split']('-')[0x0]];if(_0x330c58){if(_0x5a2043['exten']==_0x9f29('0x37')){_0x330c58[_0x9f29('0x38')]=_0x5a2043[_0x9f29('0x39')];this[_0x9f29('0x3a')](util[_0x9f29('0x3b')](_0x9f29('0x3c'),_0x330c58[_0x9f29('0x3d')]),_0x9f29('0x3e'),{'id':_0x330c58['id'],'destaccountcode':_0x330c58[_0x9f29('0x3f')],'destconnectedlinenum':_0x5a2043[_0x9f29('0x39')]});}}}}}catch(_0x53e506){logger[_0x9f29('0x27')]('[%s][voiceCallReport][newcallerid]',_0x5a2043[_0x9f29('0x2e')],util[_0x9f29('0x29')](_0x53e506,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9f29('0x2a')][_0x9f29('0x19')]=function(_0x50d9b5){try{if(this['isNotNull'](_0x50d9b5)){logger['debug'](_0x9f29('0x40'),_0x50d9b5['uniqueid'],util[_0x9f29('0x29')](_0x50d9b5,{'showHidden':![],'depth':null}));if(this[_0x9f29('0x12')][_0x50d9b5[_0x9f29('0x2e')]]){return;}if(_0x50d9b5[_0x9f29('0x36')]==='OutgoingSpoolFailed'){return;}if(_0x50d9b5[_0x9f29('0x2e')]!==_0x50d9b5[_0x9f29('0x41')]&&!this[_0x9f29('0x14')][_0x50d9b5[_0x9f29('0x41')]]){return;}logger['info'](_0x9f29('0x42'),_0x50d9b5['uniqueid'],_0x50d9b5['context'],_0x50d9b5[_0x9f29('0x43')]);this[_0x9f29('0x12')][_0x50d9b5[_0x9f29('0x2e')]]=new Channel();this['channels'][_0x50d9b5[_0x9f29('0x2e')]][_0x9f29('0x44')]=moment()[_0x9f29('0x3b')]('YYYY-MM-DD\x20HH:mm:ss');this[_0x9f29('0x12')][_0x50d9b5[_0x9f29('0x2e')]][_0x9f29('0x45')]=dispositions[_['toNumber'](_0x50d9b5[_0x9f29('0x46')])];_[_0x9f29('0x47')](this[_0x9f29('0x12')][_0x50d9b5[_0x9f29('0x2e')]],_[_0x9f29('0x33')](_0x50d9b5,_['keys'](this[_0x9f29('0x12')][_0x50d9b5[_0x9f29('0x2e')]])));if(_0x50d9b5[_0x9f29('0x34')]===_0x9f29('0x35')){var _0x835a0e=this[_0x9f29('0x13')][_0x50d9b5[_0x9f29('0x36')][_0x9f29('0x48')]('-')[0x0]];if(_0x835a0e&&typeof _0x835a0e[_0x9f29('0x38')]==='undefined'){_0x835a0e[_0x9f29('0x38')]=_0x50d9b5[_0x9f29('0x43')];logger['debug'](_0x9f29('0x49'),_0x50d9b5['uniqueid'],util[_0x9f29('0x29')]({'id':_0x835a0e['id'],'destaccountcode':_0x835a0e[_0x9f29('0x3f')],'destconnectedlinenum':_0x50d9b5[_0x9f29('0x43')]},{'showHidden':![],'depth':null}));this[_0x9f29('0x3a')](util[_0x9f29('0x3b')](_0x9f29('0x3c'),_0x835a0e[_0x9f29('0x3d')]),'user:agentconnect',{'id':_0x835a0e['id'],'destaccountcode':_0x835a0e[_0x9f29('0x3f')],'destconnectedlinenum':_0x50d9b5[_0x9f29('0x43')]});}}}}catch(_0x293bb8){logger[_0x9f29('0x27')](_0x9f29('0x4a'),_0x50d9b5[_0x9f29('0x2e')],util[_0x9f29('0x29')](_0x293bb8,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype']['syncNewExten']=function(_0x20ecc5){try{if(this[_0x9f29('0x2c')](_0x20ecc5)){logger[_0x9f29('0x31')](_0x9f29('0x4b'),_0x20ecc5['uniqueid'],util[_0x9f29('0x29')](_0x20ecc5,{'showHidden':![],'depth':null}));if(_0x20ecc5['channel']===_0x9f29('0x4c')||_0x20ecc5['exten']==='h')return;if(_0x20ecc5[_0x9f29('0x2e')]===_0x20ecc5[_0x9f29('0x41')]||this['blindTransfers'][_0x20ecc5['linkedid']]){_0x20ecc5[_0x9f29('0x4d')]=_0x20ecc5[_0x9f29('0x4d')]?_0x20ecc5[_0x9f29('0x4d')][_0x9f29('0x4e')]():undefined;_0x20ecc5['applicationdata']=_0x20ecc5['appdata']||_0x20ecc5[_0x9f29('0x4f')];if(_0x20ecc5[_0x9f29('0x50')]&&!_0x20ecc5[_0x9f29('0x50')][_0x9f29('0x51')](_0x9f29('0x52'))&&_0x20ecc5['application']!==_0x9f29('0x7')){_0x20ecc5['applicationdata']=_0x20ecc5[_0x9f29('0x4f')]['toLowerCase']();}logger[_0x9f29('0x24')](_0x9f29('0x53'),_0x20ecc5['uniqueid'],_0x20ecc5[_0x9f29('0x4d')],_0x20ecc5['applicationdata']);if(_['isUndefined'](this['channels'][_0x20ecc5[_0x9f29('0x2e')]])){this[_0x9f29('0x12')][_0x20ecc5[_0x9f29('0x2e')]]=new Channel();this['channels'][_0x20ecc5['uniqueid']][_0x9f29('0x44')]=_0x20ecc5[_0x9f29('0x54')]?moment()[_0x9f29('0x55')](moment[_0x9f29('0x54')](_0x20ecc5['duration'])['seconds'](),_0x9f29('0x56'))[_0x9f29('0x3b')](_0x9f29('0x57')):moment()[_0x9f29('0x3b')](_0x9f29('0x57'));this[_0x9f29('0x12')][_0x20ecc5['uniqueid']][_0x9f29('0x45')]=_0x9f29('0xc');}_[_0x9f29('0x47')](this[_0x9f29('0x12')][_0x20ecc5[_0x9f29('0x2e')]],_['pick'](_0x20ecc5,_[_0x9f29('0x58')](this[_0x9f29('0x12')][_0x20ecc5[_0x9f29('0x2e')]])));if(_['includes'](applications,_0x20ecc5['application'])){this[_0x9f29('0x12')][_0x20ecc5[_0x9f29('0x2e')]][_0x9f29('0x59')]=_0x20ecc5[_0x9f29('0x4d')];this['channels'][_0x20ecc5['uniqueid']][_0x9f29('0x5a')]=_0x20ecc5[_0x9f29('0x4f')];if(_0x20ecc5[_0x9f29('0x4d')]===_0x9f29('0x6')&&_[_0x9f29('0x51')](_0x20ecc5[_0x9f29('0x4f')][_0x9f29('0x4e')](),_0x9f29('0x5b'))){var _0x4545c0=_0x20ecc5['applicationdata'][_0x9f29('0x48')]('=');var _0x372013=_0x4545c0[0x0][_0x9f29('0x4e')]()['match'](/cdr\((.*)\)/);if(_0x372013){if(_0x372013[0x1]==='type'&&!_[_0x9f29('0x5c')](this[_0x9f29('0x12')][_0x20ecc5[_0x9f29('0x2e')]][_0x372013[0x1]]))return;this['channels'][_0x20ecc5[_0x9f29('0x2e')]][_0x372013[0x1]]=_0x4545c0[0x1];}}else if(_0x20ecc5[_0x9f29('0x4d')]===_0x9f29('0x7')){this[_0x9f29('0x12')][_0x20ecc5[_0x9f29('0x2e')]][_0x9f29('0x7')]=_0x20ecc5[_0x9f29('0x4f')]['split'](',')[0x0];}}}}}catch(_0x2a5f8e){logger[_0x9f29('0x27')](_0x9f29('0x5d'),_0x20ecc5[_0x9f29('0x2e')],util['inspect'](_0x2a5f8e,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9f29('0x2a')][_0x9f29('0x1a')]=function(_0xc72f2d){try{if(this[_0x9f29('0x2c')](_0xc72f2d)){logger[_0x9f29('0x24')](_0x9f29('0x5e'),_0xc72f2d[_0x9f29('0x2e')],_0xc72f2d[_0x9f29('0x41')],_0xc72f2d['calleridname'],_0xc72f2d[_0x9f29('0x30')]);logger[_0x9f29('0x31')]('[%s][voiceCallReport][newstate]\x20event:',_0xc72f2d[_0x9f29('0x2e')],util['inspect'](_0xc72f2d,{'showHidden':![],'depth':null}));if(_0xc72f2d[_0x9f29('0x46')]!=='6')return;var _0x2bdbe0=this['agents'][_0xc72f2d[_0x9f29('0x36')][_0x9f29('0x48')]('-')[0x0]];if(_0xc72f2d[_0x9f29('0x2e')]!==_0xc72f2d[_0x9f29('0x41')]){var _0x49c368=moment();if(this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x41')]]){if(!this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x41')]]['answered']){this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x41')]][_0x9f29('0x5f')]=!![];this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x41')]][_0x9f29('0x60')]=_0x49c368[_0x9f29('0x3b')]('YYYY-MM-DD\x20HH:mm:ss');if(this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x41')]][_0x9f29('0x44')]){this['channels'][_0xc72f2d[_0x9f29('0x41')]]['holdtime']=_0x49c368[_0x9f29('0x61')](this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x41')]][_0x9f29('0x44')],_0x9f29('0x56'));}}this['channels'][_0xc72f2d['linkedid']][_0x9f29('0x41')]=_0xc72f2d[_0x9f29('0x2e')];if(_0xc72f2d['calleridnum']!==_0x9f29('0x37')){this['channels'][_0xc72f2d[_0x9f29('0x41')]]['connectedlinenum']=_0xc72f2d[_0x9f29('0x30')];}this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x41')]]['connectedlinename']=_0xc72f2d['calleridname'];this['channels'][_0xc72f2d[_0x9f29('0x41')]]['destinationchannel']=_0xc72f2d[_0x9f29('0x36')];this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x41')]]['disposition']=dispositions[_['toNumber'](_0xc72f2d[_0x9f29('0x46')])];if(_0x2bdbe0){this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x41')]][_0x9f29('0x62')]=_0x2bdbe0['id'];this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x41')]]['membername']=_0x2bdbe0[_0x9f29('0x3d')];}}if(this[_0x9f29('0x12')][_0xc72f2d['uniqueid']]){if(!this['channels'][_0xc72f2d[_0x9f29('0x2e')]][_0x9f29('0x5f')]){this['channels'][_0xc72f2d[_0x9f29('0x2e')]][_0x9f29('0x5f')]=!![];this['channels'][_0xc72f2d[_0x9f29('0x2e')]][_0x9f29('0x60')]=_0x49c368[_0x9f29('0x3b')](_0x9f29('0x57'));if(this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x2e')]][_0x9f29('0x44')]){this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x2e')]]['holdtime']=_0x49c368['diff'](this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x2e')]][_0x9f29('0x44')],_0x9f29('0x56'));}}if(_0xc72f2d[_0x9f29('0x30')]!==_0x9f29('0x37')){this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x2e')]][_0x9f29('0x39')]=_0xc72f2d[_0x9f29('0x30')];}this['channels'][_0xc72f2d[_0x9f29('0x2e')]]['connectedlinename']=_0xc72f2d[_0x9f29('0x2f')];this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x2e')]][_0x9f29('0x63')]=_0xc72f2d[_0x9f29('0x36')];this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x2e')]][_0x9f29('0x45')]=dispositions[_[_0x9f29('0x64')](_0xc72f2d['channelstate'])];}}else{if(this[_0x9f29('0x12')][_0xc72f2d['uniqueid']]){if(_0x2bdbe0){this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x2e')]][_0x9f29('0x62')]=_0x2bdbe0['id'];this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x2e')]]['membername']=_0x2bdbe0['name'];}}}if(_0xc72f2d[_0x9f29('0x34')]===_0x9f29('0x35')){if(_0x2bdbe0){_0x2bdbe0[_0x9f29('0x38')]=_0xc72f2d[_0x9f29('0x43')];var _0x370cec,_0x3963f2;if(this[_0x9f29('0x12')][_0xc72f2d['uniqueid']]){_0x370cec=this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x2e')]]['routealias'];_0x3963f2=this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x2e')]]['queue'];}else if(this['channels'][_0xc72f2d[_0x9f29('0x41')]]){_0x370cec=this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x41')]][_0x9f29('0x65')];_0x3963f2=this[_0x9f29('0x12')][_0xc72f2d[_0x9f29('0x41')]][_0x9f29('0x7')];}_0x2bdbe0[_0x9f29('0x7')]=_0x3963f2;_0x2bdbe0[_0x9f29('0x65')]=_0x370cec;var _0x23092a={'id':_0x2bdbe0['id'],'name':_0x2bdbe0[_0x9f29('0x3d')],'agentconnected':!![],'destaccountcode':_0x2bdbe0[_0x9f29('0x3f')],'destconnectedlinenum':_0xc72f2d[_0x9f29('0x43')],'queue':_0x3963f2||undefined,'routealias':_0x370cec,'uniqueid':_0xc72f2d[_0x9f29('0x41')]};logger[_0x9f29('0x31')]('[%s][voiceCallReport][newstate]\x20sending\x20user:agentconnect\x20event:',_0xc72f2d[_0x9f29('0x2e')],util[_0x9f29('0x29')](_0x23092a,{'showHidden':![],'depth':null}));this[_0x9f29('0x3a')](util[_0x9f29('0x3b')]('user:%s',_0x2bdbe0[_0x9f29('0x3d')]),_0x9f29('0x3e'),_0x23092a);}}}}catch(_0x1fcae3){logger[_0x9f29('0x27')](_0x9f29('0x66'),_0xc72f2d[_0x9f29('0x2e')],util['inspect'](_0x1fcae3,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9f29('0x2a')]['syncMixMonitorFilename']=function(_0x59dd45,_0x7fa9d3){try{if(this[_0x9f29('0x12')][_0x59dd45]){logger[_0x9f29('0x24')]('[%s][voiceCallReport][mixMonitorFilename]\x20monitorFilename:%s',_0x59dd45,_0x7fa9d3);this['channels'][_0x59dd45][_0x9f29('0x67')]=!![];if(_[_0x9f29('0x68')](_0x7fa9d3,_0x9f29('0x69'))){_0x7fa9d3=_0x7fa9d3['replace']('.wav49',_0x9f29('0x6a'));}this[_0x9f29('0x12')][_0x59dd45][_0x9f29('0x6b')]=_0x7fa9d3;var _0x3b2922=_[_0x9f29('0x6c')](this[_0x9f29('0x12')][_0x59dd45]['monitors'],{'filename':_0x7fa9d3});if(_[_0x9f29('0x5c')](_0x3b2922)){this[_0x9f29('0x12')][_0x59dd45][_0x9f29('0x6d')]['push']({'filename':_0x7fa9d3,'createdAt':moment()[_0x9f29('0x3b')](_0x9f29('0x57')),'mixmonitorid':'','status':_0x9f29('0x6e')});}}}catch(_0x514ab4){logger[_0x9f29('0x27')]('[%s][voiceCallReport][mixMonitorFilename]',_0x59dd45,util[_0x9f29('0x29')](_0x514ab4,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9f29('0x2a')]['syncVarSet']=function(_0x50b091){try{if(this[_0x9f29('0x2c')](_0x50b091)){logger[_0x9f29('0x31')](_0x9f29('0x6f'),_0x50b091['uniqueid'],util['inspect'](_0x50b091,{'showHidden':![],'depth':null}));if(this[_0x9f29('0x12')][_0x50b091[_0x9f29('0x2e')]]&&_0x50b091[_0x9f29('0x36')]!=_0x9f29('0x4c')){if(this[_0x9f29('0x2c')](_0x50b091['variable'])){if(this['isNotNull'](_0x50b091['variable']['mixmonitor_filename'])){logger[_0x9f29('0x24')]('[%s][voiceCallReport][varset]\x20variable:mixmonitor_filename\x20value:%s',_0x50b091['uniqueid'],_0x50b091['value']);this['syncMixMonitorFilename'](_0x50b091['uniqueid'],_0x50b091[_0x9f29('0x70')]);}else if(this[_0x9f29('0x2c')](_0x50b091[_0x9f29('0x71')][_0x9f29('0x72')])){logger[_0x9f29('0x24')](_0x9f29('0x73'),_0x50b091[_0x9f29('0x2e')],_0x50b091['value']);this[_0x9f29('0x12')][_0x50b091[_0x9f29('0x2e')]][_0x9f29('0x30')]=_0x50b091[_0x9f29('0x70')];}else if(this[_0x9f29('0x2c')](_0x50b091['variable'][_0x9f29('0x74')])){logger['info'](_0x9f29('0x75'),_0x50b091[_0x9f29('0x2e')],_0x50b091[_0x9f29('0x70')]);this[_0x9f29('0x12')][_0x50b091[_0x9f29('0x2e')]]['callerid']=_0x50b091[_0x9f29('0x70')];}else if(this[_0x9f29('0x2c')](_0x50b091['variable'][_0x9f29('0x76')])){logger[_0x9f29('0x24')](_0x9f29('0x77'),_0x50b091['uniqueid'],_0x50b091['value']);this[_0x9f29('0x12')][_0x50b091[_0x9f29('0x2e')]][_0x9f29('0x78')]=_0x50b091['value'];}else if(this[_0x9f29('0x2c')](_0x50b091[_0x9f29('0x71')]['xmd-queue'])){logger['info']('[%s][voiceCallReport][varset]\x20variable:xmd-queue\x20value:%s',_0x50b091[_0x9f29('0x2e')],_0x50b091[_0x9f29('0x70')][_0x9f29('0x48')](',')[0x0]);this['channels'][_0x50b091[_0x9f29('0x2e')]][_0x9f29('0x7')]=_0x50b091['value'][_0x9f29('0x48')](',')[0x0];}else if(this[_0x9f29('0x2c')](_0x50b091[_0x9f29('0x71')][_0x9f29('0x79')])){logger[_0x9f29('0x24')](_0x9f29('0x7a'),_0x50b091['uniqueid'],_0x50b091[_0x9f29('0x70')]);this['channels'][_0x50b091['uniqueid']][_0x9f29('0x7b')]=_0x50b091['value'];}else if(this[_0x9f29('0x2c')](_0x50b091[_0x9f29('0x71')][_0x9f29('0x7c')])){logger['info']('[%s][voiceCallReport][varset]\x20variable:xmd-destination\x20value:%s',_0x50b091[_0x9f29('0x2e')],_0x50b091[_0x9f29('0x70')]);this[_0x9f29('0x12')][_0x50b091['uniqueid']]['destination']=_0x50b091[_0x9f29('0x70')];}else if(this[_0x9f29('0x2c')](_0x50b091[_0x9f29('0x71')][_0x9f29('0x7d')])){logger[_0x9f29('0x24')](_0x9f29('0x7e'),_0x50b091[_0x9f29('0x2e')],_0x50b091[_0x9f29('0x70')]);this['channels'][_0x50b091[_0x9f29('0x2e')]][_0x9f29('0x7f')]=_0x50b091[_0x9f29('0x70')];}else if(this[_0x9f29('0x2c')](_0x50b091[_0x9f29('0x71')][_0x9f29('0x80')])){logger[_0x9f29('0x24')]('[%s][voiceCallReport][varset]\x20variable:xmcs-queue\x20value:%s',_0x50b091[_0x9f29('0x2e')],_0x50b091[_0x9f29('0x70')]);this[_0x9f29('0x12')][_0x50b091[_0x9f29('0x2e')]][_0x9f29('0x7')]=_0x50b091[_0x9f29('0x70')];}else if(this['isNotNull'](_0x50b091[_0x9f29('0x71')][_0x9f29('0x81')])){logger[_0x9f29('0x24')](_0x9f29('0x82'),_0x50b091[_0x9f29('0x2e')],_0x50b091[_0x9f29('0x70')]);this['channels'][_0x50b091[_0x9f29('0x2e')]]['sipcalluniqueid']=_0x50b091['value'];}}}else if(this[_0x9f29('0x2c')](_0x50b091[_0x9f29('0x71')]['mixmonitor_filename'])){if(_0x50b091[_0x9f29('0x70')]){var _0x3c6cb0=path[_0x9f29('0x83')](_0x50b091[_0x9f29('0x70')])['name'];logger[_0x9f29('0x24')](_0x9f29('0x84'),_0x3c6cb0,_0x50b091['value']);this[_0x9f29('0x85')](_0x3c6cb0,_0x50b091[_0x9f29('0x70')]);}}else if(this[_0x9f29('0x12')][_0x50b091[_0x9f29('0x41')]]){if(this[_0x9f29('0x2c')](_0x50b091['variable'])){if(this[_0x9f29('0x2c')](_0x50b091[_0x9f29('0x71')]['sipcallid'])){logger['info'](_0x9f29('0x82'),_0x50b091['linkedid'],_0x50b091[_0x9f29('0x70')]);this['channels'][_0x50b091[_0x9f29('0x41')]][_0x9f29('0x86')]=_0x50b091['value'];}}}}}catch(_0x22c7d2){logger['error'](_0x9f29('0x87'),_0x50b091['uniqueid'],util[_0x9f29('0x29')](_0x22c7d2,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9f29('0x2a')][_0x9f29('0x1d')]=function(_0x284f41){try{if(this[_0x9f29('0x2c')](_0x284f41)){logger[_0x9f29('0x31')](_0x9f29('0x88'),_0x284f41[_0x9f29('0x2e')],util[_0x9f29('0x29')](_0x284f41,{'showHidden':![],'depth':null}));if(this['blindTransfers'][_0x284f41[_0x9f29('0x41')]]){if(this[_0x9f29('0x12')][this['blindTransfers'][_0x284f41[_0x9f29('0x41')]][_0x9f29('0x41')]]){this[_0x9f29('0x12')][this[_0x9f29('0x14')][_0x284f41[_0x9f29('0x41')]][_0x9f29('0x41')]][_0x9f29('0x2e')]=_0x284f41[_0x9f29('0x2e')];this[_0x9f29('0x12')][this['blindTransfers'][_0x284f41[_0x9f29('0x41')]][_0x9f29('0x41')]]['answered']=this[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]]['answered'];this['channels'][this[_0x9f29('0x14')][_0x284f41[_0x9f29('0x41')]][_0x9f29('0x41')]][_0x9f29('0x60')]=this[_0x9f29('0x12')][_0x284f41['uniqueid']][_0x9f29('0x60')];this[_0x9f29('0x12')][this[_0x9f29('0x14')][_0x284f41[_0x9f29('0x41')]][_0x9f29('0x41')]][_0x9f29('0x63')]=this['channels'][this[_0x9f29('0x14')][_0x284f41[_0x9f29('0x41')]][_0x9f29('0x41')]]['channel'];this[_0x9f29('0x12')][this[_0x9f29('0x14')][_0x284f41[_0x9f29('0x41')]][_0x9f29('0x41')]]['disposition']=this[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]][_0x9f29('0x45')];this[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]]=this[_0x9f29('0x12')][this[_0x9f29('0x14')][_0x284f41['linkedid']]['linkedid']];delete this[_0x9f29('0x12')][this[_0x9f29('0x14')][_0x284f41['linkedid']][_0x9f29('0x41')]];}else if(this[_0x9f29('0x12')][this[_0x9f29('0x14')][_0x284f41[_0x9f29('0x41')]][_0x9f29('0x2e')]]){this[_0x9f29('0x12')][this[_0x9f29('0x14')][_0x284f41[_0x9f29('0x41')]][_0x9f29('0x2e')]]['uniqueid']=[this[_0x9f29('0x12')][this[_0x9f29('0x14')][_0x284f41['linkedid']][_0x9f29('0x2e')]][_0x9f29('0x41')],this[_0x9f29('0x12')][this[_0x9f29('0x14')][_0x284f41[_0x9f29('0x41')]][_0x9f29('0x2e')]][_0x9f29('0x41')]=this['channels'][this[_0x9f29('0x14')][_0x284f41['linkedid']]['uniqueid']][_0x9f29('0x2e')]][0x0];this[_0x9f29('0x12')][this[_0x9f29('0x14')][_0x284f41[_0x9f29('0x41')]][_0x9f29('0x2e')]][_0x9f29('0x5f')]=this['channels'][_0x284f41['uniqueid']][_0x9f29('0x5f')];this[_0x9f29('0x12')][this[_0x9f29('0x14')][_0x284f41[_0x9f29('0x41')]][_0x9f29('0x2e')]][_0x9f29('0x60')]=this['channels'][_0x284f41[_0x9f29('0x2e')]][_0x9f29('0x60')];this['channels'][this['blindTransfers'][_0x284f41[_0x9f29('0x41')]][_0x9f29('0x2e')]]['destinationchannel']=this[_0x9f29('0x12')][this[_0x9f29('0x14')][_0x284f41[_0x9f29('0x41')]][_0x9f29('0x2e')]][_0x9f29('0x36')];this[_0x9f29('0x12')][this[_0x9f29('0x14')][_0x284f41[_0x9f29('0x41')]][_0x9f29('0x2e')]][_0x9f29('0x45')]=this[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]]['disposition'];this[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]]=this[_0x9f29('0x12')][this['blindTransfers'][_0x284f41[_0x9f29('0x41')]]['uniqueid']];delete this[_0x9f29('0x12')][this['blindTransfers'][_0x284f41[_0x9f29('0x41')]][_0x9f29('0x2e')]];}}if(this['channels'][_0x284f41['uniqueid']]){logger[_0x9f29('0x24')](_0x9f29('0x89'),_0x284f41[_0x9f29('0x2e')],_0x284f41['cause-txt']);var _0xaf1a1a=moment();this[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]][_0x9f29('0x8a')]=_0xaf1a1a[_0x9f29('0x3b')](_0x9f29('0x57'));this[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]][_0x9f29('0x54')]=_0xaf1a1a[_0x9f29('0x61')](this[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]]['starttime'],_0x9f29('0x56'));if(this[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]]['answered']){this[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]]['billableseconds']=_0xaf1a1a[_0x9f29('0x61')](this[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]][_0x9f29('0x60')],_0x9f29('0x56'));this[_0x9f29('0x12')][_0x284f41['uniqueid']][_0x9f29('0x8b')]=this[_0x9f29('0x12')][_0x284f41['uniqueid']][_0x9f29('0x54')]-this[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]][_0x9f29('0x8c')];}if(_0x284f41['context']===_0x9f29('0x35')){if(this[_0x9f29('0x13')][_0x284f41['channel'][_0x9f29('0x48')]('-')[0x0]]){this[_0x9f29('0x13')][_0x284f41[_0x9f29('0x36')]['split']('-')[0x0]]=_[_0x9f29('0x8d')](this[_0x9f29('0x13')][_0x284f41['channel'][_0x9f29('0x48')]('-')[0x0]],[_0x9f29('0x38')]);logger['debug']('[%s][voiceCallReport][hangup]\x20sending\x20user:agentcomplete\x20event:',_0x284f41[_0x9f29('0x2e')],util[_0x9f29('0x29')]({'id':this[_0x9f29('0x13')][_0x284f41['channel'][_0x9f29('0x48')]('-')[0x0]]['id'],'destaccountcode':this['agents'][_0x284f41[_0x9f29('0x36')][_0x9f29('0x48')]('-')[0x0]][_0x9f29('0x3f')]},{'showHidden':![],'depth':null}));this['emit'](util[_0x9f29('0x3b')](_0x9f29('0x3c'),this[_0x9f29('0x13')][_0x284f41[_0x9f29('0x36')][_0x9f29('0x48')]('-')[0x0]]['name']),_0x9f29('0x8e'),{'id':this['agents'][_0x284f41['channel']['split']('-')[0x0]]['id'],'destaccountcode':this[_0x9f29('0x13')][_0x284f41['channel'][_0x9f29('0x48')]('-')[0x0]][_0x9f29('0x3f')]});for(var _0xa30af7=0x0;_0xa30af7<Object[_0x9f29('0x58')](this['agents'])['length'];_0xa30af7++){var _0x5f028d=Object[_0x9f29('0x58')](this[_0x9f29('0x13')])[_0xa30af7];var _0x5ad3c1=this[_0x9f29('0x13')][_0x5f028d];if(_0x5ad3c1[_0x9f29('0x3f')]===Number(this[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]][_0x9f29('0x39')])){this[_0x9f29('0x3a')](util[_0x9f29('0x3b')](_0x9f29('0x3c'),_0x5ad3c1[_0x9f29('0x3d')]),_0x9f29('0x8e'),{'id':_0x5ad3c1['id'],'destaccountcode':_0x5ad3c1['accountcode'],'transfer':this[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]][_0x9f29('0x8f')]});break;}}}}var _0x2e664b=this;Promise[_0x9f29('0x90')]()[_0x9f29('0x91')](function(){var _0x151e76=_0x2e664b[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]];if(typeof _0x151e76[_0x9f29('0x8f')]===_0x9f29('0x92')){return;}if(_0x151e76[_0x9f29('0x93')]===!![]){return;}if(_['isEmpty'](_0x151e76[_0x9f29('0x6d')])){return;}return RpcSetting[_0x9f29('0x94')]()['then'](function(_0x18fa5e){if(!_0x18fa5e[_0x9f29('0x95')])return;return Promise['resolve']()[_0x9f29('0x91')](function(){return ami[_0x9f29('0x96')]({'action':_0x9f29('0x97'),'channel':_0x151e76[_0x9f29('0x36')]})[_0x9f29('0x98')](function(){});})['then'](function(){return ami[_0x9f29('0x96')]({'action':_0x9f29('0x97'),'channel':_0x151e76[_0x9f29('0x63')]})[_0x9f29('0x98')](function(){})[_0x9f29('0x99')](function(){var _0x4268c4=_0x2e664b[_0x9f29('0x13')][_0x151e76[_0x9f29('0x63')][_0x9f29('0x48')]('-')[0x0]];if(!_0x4268c4)return;io['emit'](_0x9f29('0x9a'),{'agentId':_0x4268c4['id'],'uniqueid':_0x151e76['uniqueid']});});});});})[_0x9f29('0x91')](function(){if(_0x284f41[_0x9f29('0x9b')]===_0x9f29('0x9c')){_0x2e664b[_0x9f29('0x14')][_0x284f41[_0x9f29('0x2e')]]=_0x284f41;}else{if(_0x2e664b[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]]&&_0x2e664b[_0x9f29('0x12')][_0x284f41['uniqueid']][_0x9f29('0x78')]==='outbound'&&_0x2e664b['blindTransfers'][_0x284f41[_0x9f29('0x2e')]]){_0x2e664b['channels'][_0x284f41[_0x9f29('0x2e')]]['uniqueid']=[_0x2e664b[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]][_0x9f29('0x41')],_0x2e664b[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]][_0x9f29('0x41')]=_0x2e664b[_0x9f29('0x12')][_0x284f41['uniqueid']][_0x9f29('0x2e')]][0x0];delete _0x2e664b[_0x9f29('0x14')][_0x284f41[_0x9f29('0x2e')]];}}logger[_0x9f29('0x31')](_0x9f29('0x9d'),_0x284f41['uniqueid'],util[_0x9f29('0x29')](_0x2e664b['channels'][_0x284f41[_0x9f29('0x2e')]],{'showHidden':![],'depth':null}));ami[_0x9f29('0x3a')]('custom:voiceCallReport',_0x2e664b[_0x9f29('0x12')][_0x284f41['uniqueid']]);delete _0x2e664b[_0x9f29('0x12')][_0x284f41[_0x9f29('0x2e')]];});}}}catch(_0x5123d2){logger['error'](_0x9f29('0x9e'),_0x284f41[_0x9f29('0x2e')],util[_0x9f29('0x29')](_0x5123d2,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9f29('0x2a')]['syncAttendedTransfer']=function(_0x47144b){try{if(this[_0x9f29('0x2c')](_0x47144b)){logger[_0x9f29('0x24')](_0x9f29('0x9f'),_0x47144b[_0x9f29('0x2e')],_0x47144b[_0x9f29('0xa0')],_0x47144b[_0x9f29('0xa1')]);logger[_0x9f29('0x31')](_0x9f29('0xa2'),_0x47144b[_0x9f29('0x2e')],util['inspect'](_0x47144b,{'showHidden':![],'depth':null}));var _0x194e59;if(this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xa3')]]){this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xa3')]][_0x9f29('0xa4')]=_0x47144b[_0x9f29('0xa0')];this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xa3')]][_0x9f29('0xa5')]=_0x47144b[_0x9f29('0xa1')];if(this[_0x9f29('0x12')][_0x47144b['secondtransfereruniqueid']]){_0x194e59=this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xa6')]];this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xa6')]]=this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xa3')]];this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xa3')]]=_0x194e59;}this['channels'][_0x47144b[_0x9f29('0xa6')]][_0x9f29('0x8f')]='ATTENDED';}else if(this['channels'][_0x47144b[_0x9f29('0xa7')]]){this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xa7')]]['transfercalleridnum']=_0x47144b[_0x9f29('0xa0')];this['channels'][_0x47144b[_0x9f29('0xa7')]][_0x9f29('0xa5')]=_0x47144b[_0x9f29('0xa1')];if(this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xa8')]]){_0x194e59=this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xa8')]];this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xa8')]]=this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xa7')]];this['channels'][_0x47144b['transfertargetuniqueid']]=_0x194e59;}this['channels'][_0x47144b[_0x9f29('0xa7')]][_0x9f29('0x8f')]=_0x9f29('0xa9');}if((this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xa8')]]||this[_0x9f29('0x12')][_0x47144b['origtransfererlinkedid']])&&this['channels'][_0x47144b[_0x9f29('0xa6')]]){var _0x20d9ca=_[_0x9f29('0xaa')]([this[_0x9f29('0x12')][_0x47144b['origtransfereruniqueid']],this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xab')]],this['channels'][_0x47144b['secondtransfereruniqueid']]],function(_0x2eeefd){return _0x2eeefd&&_0x2eeefd[_0x9f29('0x78')]===_0x9f29('0xac')&&_0x2eeefd[_0x9f29('0xad')];});if(_0x20d9ca){if(this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xa8')]])this['channels'][_0x47144b[_0x9f29('0xa8')]][_0x9f29('0x8f')]=_0x9f29('0xa9');if(this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xab')]])this[_0x9f29('0x12')][_0x47144b['origtransfererlinkedid']][_0x9f29('0x8f')]=_0x9f29('0xa9');this['channels'][_0x47144b[_0x9f29('0xa6')]][_0x9f29('0x8f')]=_0x9f29('0xa9');}else{if(this[_0x9f29('0x12')][_0x47144b['transfereeuniqueid']]){this['channels'][_0x47144b[_0x9f29('0xa6')]][_0x9f29('0x93')]=!![];}if(this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xa7')]]){this[_0x9f29('0x12')][_0x47144b[_0x9f29('0xa7')]][_0x9f29('0x93')]=!![];}}}}}catch(_0x4aeded){logger[_0x9f29('0x27')](_0x9f29('0xae'),_0x47144b[_0x9f29('0x2e')],util['inspect'](_0x4aeded,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9f29('0x2a')][_0x9f29('0xaf')]=function(_0x3692e4){try{if(this[_0x9f29('0x2c')](_0x3692e4)){logger[_0x9f29('0x24')]('[%s][voiceCallReport][blindtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s',_0x3692e4[_0x9f29('0x2e')],_0x3692e4[_0x9f29('0xb0')],_0x3692e4['extension']);logger[_0x9f29('0x31')](_0x9f29('0xb1'),_0x3692e4['uniqueid'],util[_0x9f29('0x29')](_0x3692e4,{'showHidden':![],'depth':null}));if(this['channels'][_0x3692e4['transfereeuniqueid']]){this['channels'][_0x3692e4['transfereeuniqueid']][_0x9f29('0xa4')]=_0x3692e4[_0x9f29('0xb0')];this[_0x9f29('0x12')][_0x3692e4[_0x9f29('0xa3')]]['transferconnectedlinenum']=_0x3692e4['extension'];this[_0x9f29('0x12')][_0x3692e4[_0x9f29('0xa3')]][_0x9f29('0x8f')]='BLIND';this[_0x9f29('0x1d')]({'event':'BlindTransfer','uniqueid':_0x3692e4['transfereeuniqueid'],'linkedid':_0x3692e4[_0x9f29('0xb2')],'context':_0x3692e4['context'],'channel':_0x3692e4[_0x9f29('0xb3')]});}else{this[_0x9f29('0x12')][_0x3692e4[_0x9f29('0xb2')]][_0x9f29('0x8f')]='BLIND';this[_0x9f29('0x1d')]({'event':'BlindTransfer','uniqueid':_0x3692e4[_0x9f29('0xb2')],'linkedid':_0x3692e4['transfereeuniqueid'],'context':_0x3692e4[_0x9f29('0x34')],'channel':_0x3692e4[_0x9f29('0xb3')]});}}}catch(_0x36ba22){logger[_0x9f29('0x27')](_0x9f29('0xb4'),_0x3692e4[_0x9f29('0x2e')],util[_0x9f29('0x29')](_0x36ba22,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9f29('0x2a')][_0x9f29('0xb5')]=function(_0x4655d2){try{if(this[_0x9f29('0x2c')](_0x4655d2)){logger['debug'](_0x9f29('0xb6'),_0x4655d2[_0x9f29('0x2e')],util['inspect'](_0x4655d2,{'showHidden':![],'depth':null}));if(this[_0x9f29('0x12')][_0x4655d2['uniqueid']]){if(!_[_0x9f29('0x5c')](this[_0x9f29('0x12')][_0x4655d2[_0x9f29('0x2e')]][_0x9f29('0x60')])){this[_0x9f29('0x12')][_0x4655d2[_0x9f29('0x2e')]]['mohstarttime']=moment()[_0x9f29('0x3b')](_0x9f29('0x57'));logger[_0x9f29('0x24')]('[%s][voiceCallReport][musiconholdstart]\x20mohstarttime:%s',_0x4655d2['uniqueid'],this[_0x9f29('0x12')][_0x4655d2['uniqueid']][_0x9f29('0xb7')]);}}}}catch(_0x1cf321){logger[_0x9f29('0x27')](_0x9f29('0xb8'),_0x4655d2['uniqueid'],util[_0x9f29('0x29')](_0x1cf321,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9f29('0x2a')][_0x9f29('0x23')]=function(_0x154792){try{if(this[_0x9f29('0x2c')](_0x154792)){logger[_0x9f29('0x31')]('[%s][voiceCallReport][musiconholdstop]\x20event:',_0x154792['uniqueid'],util[_0x9f29('0x29')](_0x154792,{'showHidden':![],'depth':null}));if(this[_0x9f29('0x12')][_0x154792[_0x9f29('0x2e')]]){if(!_['isNil'](this[_0x9f29('0x12')][_0x154792[_0x9f29('0x2e')]][_0x9f29('0xb7')])){this[_0x9f29('0x12')][_0x154792[_0x9f29('0x2e')]]['mohtime']+=moment()['milliseconds'](0x0)[_0x9f29('0x61')](this[_0x9f29('0x12')][_0x154792[_0x9f29('0x2e')]]['mohstarttime'],_0x9f29('0x56'));logger[_0x9f29('0x24')](_0x9f29('0xb9'),_0x154792[_0x9f29('0x2e')],this['channels'][_0x154792['uniqueid']][_0x9f29('0xba')]);delete this['channels'][_0x154792[_0x9f29('0x2e')]]['mohstarttime'];}}}}catch(_0x5e1667){logger['error'](_0x9f29('0xbb'),_0x154792['uniqueid'],util[_0x9f29('0x29')](_0x5e1667,{'showHidden':![],'depth':null}));}};module[_0x9f29('0xbc')]=VoiceCallReport;
\ No newline at end of file
+var _0x5529=['BLIND','transfererchannel','transfereruniqueid','[%s][voiceCallReport][musiconholdstart]\x20event:','mohstarttime','[%s][voiceCallReport][musiconholdstart]\x20mohstarttime:%s','[%s][voiceCallReport][musiconholdstart]','[%s][voiceCallReport][musiconholdstop]\x20event:','mohtime','milliseconds','[%s][voiceCallReport][musiconholdstop]\x20mohtime:%s','[%s][voiceCallReport][musiconholdstop]','lodash','moment','util','ioredis','../../../config/environment','../../../config/logger','ami','../ami','../rpc/setting','set','agi','playback','voicemail','NO\x20ANSWER','ANSWERED','BUSY','FAILED','redis','defaults','localhost','socket.io-emitter','channels','agents','coreshowchannel','syncNewExten','newexten','bind','syncNewChannel','newstate','syncNewState','varset','syncVarSet','syncHangup','newcallerid','syncNewCallerId','attendedtransfer','syncAttendedTransfer','blindtransfer','syncBlindTransfer','musiconholdstart','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','info','[voiceCallReport][coreshowchannels]\x20started','actionCoreShowChannels','error','[voiceCallReport][coreshowchannels]','inspect','isNotNull','emit','[%s][voiceCallReport][newcallerid]\x20calleridname:%s\x20calleridnum:%s','calleridname','calleridnum','debug','[%s][voiceCallReport][newcallerid]\x20event:','uniqueid','linkedid','isUndefined','merge','pick','keys','context','split','xcally-motion-preview','destconnectedlinenum','format','user:%s','name','user:agentconnect','accountcode','connectedlinenum','[%s][voiceCallReport][newcallerid]','prototype','[%s][voiceCallReport][newchannel]\x20event:','OutgoingSpoolFailed','blindTransfers','[%s][voiceCallReport][newchannel]\x20context:%s\x20exten:%s','exten','starttime','disposition','toNumber','from-sip','channel','undefined','[%s][voiceCallReport][newchannel]\x20sending\x20user:agentconnect\x20event:','[%s][voiceCallReport][newchannel]','application','toLowerCase','applicationdata','appdata','CDR(routeAlias)','[%s][voiceCallReport][newexten]\x20application:%s\x20appdata:%s','duration','seconds','YYYY-MM-DD\x20HH:mm:ss','lastapplication','lastdata','cdr(','match','type','isNil','queue','[%s][voiceCallReport][newexten]','[%s][voiceCallReport][newstate]\x20event:','answered','holdtime','diff','connectedlinename','destinationchannel','channelstate','membername','answertime','UserId','routealias','[%s][voiceCallReport][newstate]\x20sending\x20user:agentconnect\x20event:','syncMixMonitorFilename','[%s][voiceCallReport][mixMonitorFilename]\x20monitorFilename:%s','monitor','endsWith','.wav49','.WAV','monitorFilename','monitors','push','rec','[%s][voiceCallReport][mixMonitorFilename]','[%s][voiceCallReport][varset]\x20event:','variable','mixmonitor_filename','value','xmd-phone','xmd-callerid','[%s][voiceCallReport][varset]\x20variable:xmd-callerid\x20value:%s','callerid','xmd-cdrtype','[%s][voiceCallReport][varset]\x20variable:xmd-cdrtype\x20value:%s','xmd-queue','[%s][voiceCallReport][varset]\x20variable:xmd-queue\x20value:%s','xmd-originatecalleridnum','[%s][voiceCallReport][varset]\x20variable:xmd-originatecalleridnum\x20value:%s','originatecalleridnum','xmd-destination','[%s][voiceCallReport][varset]\x20variable:xmd-destination\x20value:%s','xmd-callerid-preview','[%s][voiceCallReport][varset]\x20variable:xmd-callerid-preview\x20value:%s','calleridpreview','[%s][voiceCallReport][varset]\x20variable:xmcs-queue\x20value:%s','sipcallid','[%s][voiceCallReport][varset]\x20variable:sipcallid\x20value:%s','sipcalluniqueid','parse','[%s][voiceCallReport][varset]\x20variable:mixmonitor_filename\x20value:%s','sipcalllinkedid','[%s][voiceCallReport][hangup]\x20event:','[%s][voiceCallReport][hangup]\x20reason:%s','billableseconds','[%s][voiceCallReport][hangup]\x20sending\x20user:agentcomplete\x20event:','length','user:agentcomplete','transferType','resolve','getSettings','then','stopRecordingOnTransfer','Action','StopMixMonitor','catch','BlindTransfer','outbound','[%s][voiceCallReport][hangup]\x20sending\x20hangup\x20event:','custom:voiceCallReport','[%s][voiceCallReport][hangup]','[%s][voiceCallReport][attendedtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s','transfertargetcalleridnum','[%s][voiceCallReport][attendedtransfer]\x20event:','transfereeuniqueid','transferconnectedlinenum','secondtransfereruniqueid','ATTENDED','transfertargetuniqueid','transfercalleridnum','origtransferercalleridnum','origtransfereruniqueid','origtransfererlinkedid','some','routeid','transferToInternal','[%s][voiceCallReport][attendedtransfer]','[%s][voiceCallReport][blindtransfer]\x20transfercalleridnum:%s\x20transferconnectedlinenum:%s','transfereecalleridnum','extension','[%s][voiceCallReport][blindtransfer]\x20event:'];(function(_0x52bb6e,_0x4485fa){var _0x5ecd9=function(_0x5bf14c){while(--_0x5bf14c){_0x52bb6e['push'](_0x52bb6e['shift']());}};_0x5ecd9(++_0x4485fa);}(_0x5529,0xd9));var _0x9552=function(_0x5c012f,_0x586f64){_0x5c012f=_0x5c012f-0x0;var _0x3ec5bc=_0x5529[_0x5c012f];return _0x3ec5bc;};'use strict';var _=require(_0x9552('0x0'));var moment=require(_0x9552('0x1'));var util=require(_0x9552('0x2'));var path=require('path');var Redis=require(_0x9552('0x3'));var config=require(_0x9552('0x4'));var logger=require(_0x9552('0x5'))(_0x9552('0x6'));var ami=require(_0x9552('0x7'));var Channel=require('../model/channel');var RpcSetting=require(_0x9552('0x8'));var applications=[_0x9552('0x9'),'queue',_0x9552('0xa'),'dial',_0x9552('0xb'),_0x9552('0xc')];var dispositions=[_0x9552('0xd'),'FAILED','FAILED','NO\x20ANSWER',_0x9552('0xd'),_0x9552('0xd'),_0x9552('0xe'),_0x9552('0xf'),'FAILED','FAILED',_0x9552('0x10')];config[_0x9552('0x11')]=_[_0x9552('0x12')](config['redis'],{'host':_0x9552('0x13'),'port':0x18eb});var io=require(_0x9552('0x14'))(new Redis(config[_0x9552('0x11')]));function VoiceCallReport(_0x5611d2){this[_0x9552('0x15')]=_0x5611d2[_0x9552('0x15')];this[_0x9552('0x16')]=_0x5611d2['agents'];this['blindTransfers']={};ami['on'](_0x9552('0x17'),this[_0x9552('0x18')]['bind'](this));ami['on'](_0x9552('0x19'),this[_0x9552('0x18')][_0x9552('0x1a')](this));ami['on']('newchannel',this[_0x9552('0x1b')]['bind'](this));ami['on'](_0x9552('0x1c'),this[_0x9552('0x1d')][_0x9552('0x1a')](this));ami['on'](_0x9552('0x1e'),this[_0x9552('0x1f')][_0x9552('0x1a')](this));ami['on']('hangup',this[_0x9552('0x20')]['bind'](this));ami['on'](_0x9552('0x21'),this[_0x9552('0x22')][_0x9552('0x1a')](this));ami['on'](_0x9552('0x23'),this[_0x9552('0x24')][_0x9552('0x1a')](this));ami['on'](_0x9552('0x25'),this[_0x9552('0x26')][_0x9552('0x1a')](this));ami['on'](_0x9552('0x27'),this[_0x9552('0x28')][_0x9552('0x1a')](this));ami['on'](_0x9552('0x29'),this[_0x9552('0x2a')][_0x9552('0x1a')](this));try{logger[_0x9552('0x2b')](_0x9552('0x2c'));ami[_0x9552('0x2d')]();}catch(_0x3ff747){logger[_0x9552('0x2e')](_0x9552('0x2f'),util[_0x9552('0x30')](_0x3ff747,{'showHidden':![],'depth':null}));}}VoiceCallReport['prototype'][_0x9552('0x31')]=function(_0x188f1a){return _0x188f1a!==null&&!_['isUndefined'](_0x188f1a);};VoiceCallReport['prototype'][_0x9552('0x32')]=function(_0x49422f,_0x560294,_0x27726e){io['to'](_0x49422f)[_0x9552('0x32')](_0x560294,_0x27726e);};VoiceCallReport['prototype'][_0x9552('0x22')]=function(_0x1e8527){try{if(this[_0x9552('0x31')](_0x1e8527)){logger[_0x9552('0x2b')](_0x9552('0x33'),_0x1e8527['uniqueid'],_0x1e8527[_0x9552('0x34')],_0x1e8527[_0x9552('0x35')]);logger[_0x9552('0x36')](_0x9552('0x37'),_0x1e8527[_0x9552('0x38')],util[_0x9552('0x30')](_0x1e8527,{'showHidden':![],'depth':null}));if(_0x1e8527[_0x9552('0x38')]===_0x1e8527[_0x9552('0x39')]){if(!_[_0x9552('0x3a')](this['channels'][_0x1e8527[_0x9552('0x38')]])){_[_0x9552('0x3b')](this[_0x9552('0x15')][_0x1e8527['uniqueid']],_[_0x9552('0x3c')](_0x1e8527,_[_0x9552('0x3d')](this['channels'][_0x1e8527['uniqueid']])));}}if(_0x1e8527[_0x9552('0x3e')]==='from-sip'){var _0x2c1ec9=this[_0x9552('0x16')][_0x1e8527['channel'][_0x9552('0x3f')]('-')[0x0]];if(_0x2c1ec9){if(_0x1e8527['exten']==_0x9552('0x40')){_0x2c1ec9[_0x9552('0x41')]=_0x1e8527['connectedlinenum'];this[_0x9552('0x32')](util[_0x9552('0x42')](_0x9552('0x43'),_0x2c1ec9[_0x9552('0x44')]),_0x9552('0x45'),{'id':_0x2c1ec9['id'],'destaccountcode':_0x2c1ec9[_0x9552('0x46')],'destconnectedlinenum':_0x1e8527[_0x9552('0x47')]});}}}}}catch(_0x426639){logger[_0x9552('0x2e')](_0x9552('0x48'),_0x1e8527['uniqueid'],util['inspect'](_0x426639,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9552('0x49')][_0x9552('0x1b')]=function(_0x398564){try{if(this[_0x9552('0x31')](_0x398564)){logger[_0x9552('0x36')](_0x9552('0x4a'),_0x398564[_0x9552('0x38')],util[_0x9552('0x30')](_0x398564,{'showHidden':![],'depth':null}));if(this['channels'][_0x398564[_0x9552('0x38')]]){return;}if(_0x398564['channel']===_0x9552('0x4b')){return;}if(_0x398564['uniqueid']!==_0x398564['linkedid']&&!this[_0x9552('0x4c')][_0x398564[_0x9552('0x39')]]){return;}logger[_0x9552('0x2b')](_0x9552('0x4d'),_0x398564['uniqueid'],_0x398564['context'],_0x398564[_0x9552('0x4e')]);this[_0x9552('0x15')][_0x398564[_0x9552('0x38')]]=new Channel();this[_0x9552('0x15')][_0x398564[_0x9552('0x38')]][_0x9552('0x4f')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');this[_0x9552('0x15')][_0x398564[_0x9552('0x38')]][_0x9552('0x50')]=dispositions[_[_0x9552('0x51')](_0x398564['channelstate'])];_[_0x9552('0x3b')](this['channels'][_0x398564[_0x9552('0x38')]],_[_0x9552('0x3c')](_0x398564,_[_0x9552('0x3d')](this[_0x9552('0x15')][_0x398564['uniqueid']])));if(_0x398564[_0x9552('0x3e')]===_0x9552('0x52')){var _0x1d5041=this[_0x9552('0x16')][_0x398564[_0x9552('0x53')]['split']('-')[0x0]];if(_0x1d5041&&typeof _0x1d5041['destconnectedlinenum']===_0x9552('0x54')){_0x1d5041[_0x9552('0x41')]=_0x398564[_0x9552('0x4e')];logger[_0x9552('0x36')](_0x9552('0x55'),_0x398564[_0x9552('0x38')],util[_0x9552('0x30')]({'id':_0x1d5041['id'],'destaccountcode':_0x1d5041[_0x9552('0x46')],'destconnectedlinenum':_0x398564[_0x9552('0x4e')]},{'showHidden':![],'depth':null}));this[_0x9552('0x32')](util[_0x9552('0x42')](_0x9552('0x43'),_0x1d5041[_0x9552('0x44')]),_0x9552('0x45'),{'id':_0x1d5041['id'],'destaccountcode':_0x1d5041[_0x9552('0x46')],'destconnectedlinenum':_0x398564[_0x9552('0x4e')]});}}}}catch(_0x7de220){logger['error'](_0x9552('0x56'),_0x398564[_0x9552('0x38')],util['inspect'](_0x7de220,{'showHidden':![],'depth':null}));}};VoiceCallReport['prototype'][_0x9552('0x18')]=function(_0x35fa59){try{if(this['isNotNull'](_0x35fa59)){logger['debug']('[%s][voiceCallReport][newexten]\x20event:',_0x35fa59['uniqueid'],util['inspect'](_0x35fa59,{'showHidden':![],'depth':null}));if(_0x35fa59['channel']===_0x9552('0x4b')||_0x35fa59[_0x9552('0x4e')]==='h')return;if(_0x35fa59[_0x9552('0x38')]===_0x35fa59[_0x9552('0x39')]||this['blindTransfers'][_0x35fa59[_0x9552('0x39')]]){_0x35fa59['application']=_0x35fa59[_0x9552('0x57')]?_0x35fa59['application'][_0x9552('0x58')]():undefined;_0x35fa59[_0x9552('0x59')]=_0x35fa59[_0x9552('0x5a')]||_0x35fa59[_0x9552('0x59')];if(_0x35fa59[_0x9552('0x5a')]&&!_0x35fa59[_0x9552('0x5a')]['startsWith'](_0x9552('0x5b'))&&_0x35fa59['application']!=='queue'){_0x35fa59['applicationdata']=_0x35fa59['applicationdata'][_0x9552('0x58')]();}logger['info'](_0x9552('0x5c'),_0x35fa59[_0x9552('0x38')],_0x35fa59[_0x9552('0x57')],_0x35fa59[_0x9552('0x59')]);if(_['isUndefined'](this['channels'][_0x35fa59[_0x9552('0x38')]])){this[_0x9552('0x15')][_0x35fa59[_0x9552('0x38')]]=new Channel();this[_0x9552('0x15')][_0x35fa59[_0x9552('0x38')]][_0x9552('0x4f')]=_0x35fa59[_0x9552('0x5d')]?moment()['subtract'](moment['duration'](_0x35fa59[_0x9552('0x5d')])['seconds'](),_0x9552('0x5e'))[_0x9552('0x42')](_0x9552('0x5f')):moment()['format']('YYYY-MM-DD\x20HH:mm:ss');this[_0x9552('0x15')][_0x35fa59[_0x9552('0x38')]][_0x9552('0x50')]=_0x9552('0xd');}_[_0x9552('0x3b')](this[_0x9552('0x15')][_0x35fa59[_0x9552('0x38')]],_[_0x9552('0x3c')](_0x35fa59,_['keys'](this[_0x9552('0x15')][_0x35fa59[_0x9552('0x38')]])));if(_['includes'](applications,_0x35fa59[_0x9552('0x57')])){this[_0x9552('0x15')][_0x35fa59['uniqueid']][_0x9552('0x60')]=_0x35fa59['application'];this[_0x9552('0x15')][_0x35fa59[_0x9552('0x38')]][_0x9552('0x61')]=_0x35fa59[_0x9552('0x59')];if(_0x35fa59[_0x9552('0x57')]===_0x9552('0x9')&&_['startsWith'](_0x35fa59[_0x9552('0x59')][_0x9552('0x58')](),_0x9552('0x62'))){var _0x54068b=_0x35fa59[_0x9552('0x59')][_0x9552('0x3f')]('=');var _0x5f5512=_0x54068b[0x0]['toLowerCase']()[_0x9552('0x63')](/cdr\((.*)\)/);if(_0x5f5512){if(_0x5f5512[0x1]===_0x9552('0x64')&&!_[_0x9552('0x65')](this['channels'][_0x35fa59[_0x9552('0x38')]][_0x5f5512[0x1]]))return;this[_0x9552('0x15')][_0x35fa59['uniqueid']][_0x5f5512[0x1]]=_0x54068b[0x1];}}else if(_0x35fa59['application']===_0x9552('0x66')){this[_0x9552('0x15')][_0x35fa59['uniqueid']]['queue']=_0x35fa59[_0x9552('0x59')][_0x9552('0x3f')](',')[0x0];}}}}}catch(_0x53bc5f){logger[_0x9552('0x2e')](_0x9552('0x67'),_0x35fa59[_0x9552('0x38')],util[_0x9552('0x30')](_0x53bc5f,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9552('0x49')][_0x9552('0x1d')]=function(_0xae6bbb){try{if(this['isNotNull'](_0xae6bbb)){logger[_0x9552('0x2b')]('[%s][voiceCallReport][newstate]\x20linkedid:%s\x20calleridname:%s\x20calleridnum:%s',_0xae6bbb[_0x9552('0x38')],_0xae6bbb[_0x9552('0x39')],_0xae6bbb[_0x9552('0x34')],_0xae6bbb['calleridnum']);logger[_0x9552('0x36')](_0x9552('0x68'),_0xae6bbb['uniqueid'],util[_0x9552('0x30')](_0xae6bbb,{'showHidden':![],'depth':null}));if(_0xae6bbb['channelstate']!=='6')return;var _0x2203da=this['agents'][_0xae6bbb[_0x9552('0x53')][_0x9552('0x3f')]('-')[0x0]];if(_0xae6bbb['uniqueid']!==_0xae6bbb[_0x9552('0x39')]){var _0x46ffbb=moment();if(this[_0x9552('0x15')][_0xae6bbb['linkedid']]){if(!this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x39')]]['answered']){this[_0x9552('0x15')][_0xae6bbb['linkedid']][_0x9552('0x69')]=!![];this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x39')]]['answertime']=_0x46ffbb[_0x9552('0x42')](_0x9552('0x5f'));if(this[_0x9552('0x15')][_0xae6bbb['linkedid']]['starttime']){this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x39')]][_0x9552('0x6a')]=_0x46ffbb[_0x9552('0x6b')](this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x39')]][_0x9552('0x4f')],'seconds');}}this['channels'][_0xae6bbb[_0x9552('0x39')]][_0x9552('0x39')]=_0xae6bbb[_0x9552('0x38')];if(_0xae6bbb['calleridnum']!==_0x9552('0x40')){this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x39')]]['connectedlinenum']=_0xae6bbb['calleridnum'];}this[_0x9552('0x15')][_0xae6bbb['linkedid']][_0x9552('0x6c')]=_0xae6bbb[_0x9552('0x34')];this['channels'][_0xae6bbb['linkedid']][_0x9552('0x6d')]=_0xae6bbb[_0x9552('0x53')];this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x39')]]['disposition']=dispositions[_[_0x9552('0x51')](_0xae6bbb[_0x9552('0x6e')])];if(_0x2203da){this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x39')]]['UserId']=_0x2203da['id'];this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x39')]][_0x9552('0x6f')]=_0x2203da['name'];}}if(this[_0x9552('0x15')][_0xae6bbb['uniqueid']]){if(!this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x38')]][_0x9552('0x69')]){this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x38')]][_0x9552('0x69')]=!![];this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x38')]][_0x9552('0x70')]=_0x46ffbb[_0x9552('0x42')](_0x9552('0x5f'));if(this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x38')]][_0x9552('0x4f')]){this[_0x9552('0x15')][_0xae6bbb['uniqueid']][_0x9552('0x6a')]=_0x46ffbb[_0x9552('0x6b')](this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x38')]][_0x9552('0x4f')],_0x9552('0x5e'));}}if(_0xae6bbb[_0x9552('0x35')]!=='xcally-motion-preview'){this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x38')]]['connectedlinenum']=_0xae6bbb[_0x9552('0x35')];}this[_0x9552('0x15')][_0xae6bbb['uniqueid']][_0x9552('0x6c')]=_0xae6bbb[_0x9552('0x34')];this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x38')]]['destinationchannel']=_0xae6bbb[_0x9552('0x53')];this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x38')]][_0x9552('0x50')]=dispositions[_[_0x9552('0x51')](_0xae6bbb[_0x9552('0x6e')])];}}else{if(this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x38')]]){if(_0x2203da){this['channels'][_0xae6bbb[_0x9552('0x38')]][_0x9552('0x71')]=_0x2203da['id'];this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x38')]][_0x9552('0x6f')]=_0x2203da[_0x9552('0x44')];}}}if(_0xae6bbb[_0x9552('0x3e')]===_0x9552('0x52')){if(_0x2203da){_0x2203da[_0x9552('0x41')]=_0xae6bbb['exten'];var _0x3af5fe,_0x2a32cc;if(this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x38')]]){_0x3af5fe=this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x38')]][_0x9552('0x72')];_0x2a32cc=this[_0x9552('0x15')][_0xae6bbb['uniqueid']][_0x9552('0x66')];}else if(this['channels'][_0xae6bbb['linkedid']]){_0x3af5fe=this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x39')]][_0x9552('0x72')];_0x2a32cc=this[_0x9552('0x15')][_0xae6bbb[_0x9552('0x39')]][_0x9552('0x66')];}_0x2203da[_0x9552('0x66')]=_0x2a32cc;_0x2203da[_0x9552('0x72')]=_0x3af5fe;var _0x4f334a={'id':_0x2203da['id'],'name':_0x2203da[_0x9552('0x44')],'agentconnected':!![],'destaccountcode':_0x2203da[_0x9552('0x46')],'destconnectedlinenum':_0xae6bbb['exten'],'queue':_0x2a32cc||undefined,'routealias':_0x3af5fe,'uniqueid':_0xae6bbb[_0x9552('0x39')]};logger[_0x9552('0x36')](_0x9552('0x73'),_0xae6bbb[_0x9552('0x38')],util[_0x9552('0x30')](_0x4f334a,{'showHidden':![],'depth':null}));this[_0x9552('0x32')](util[_0x9552('0x42')]('user:%s',_0x2203da['name']),_0x9552('0x45'),_0x4f334a);}}}}catch(_0x1d3283){logger['error']('[%s][voiceCallReport][newstate]',_0xae6bbb[_0x9552('0x38')],util[_0x9552('0x30')](_0x1d3283,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9552('0x49')][_0x9552('0x74')]=function(_0x7d592d,_0x52094a){try{if(this[_0x9552('0x15')][_0x7d592d]){logger[_0x9552('0x2b')](_0x9552('0x75'),_0x7d592d,_0x52094a);this['channels'][_0x7d592d][_0x9552('0x76')]=!![];if(_[_0x9552('0x77')](_0x52094a,_0x9552('0x78'))){_0x52094a=_0x52094a['replace'](_0x9552('0x78'),_0x9552('0x79'));}this[_0x9552('0x15')][_0x7d592d][_0x9552('0x7a')]=_0x52094a;var _0x399838=_['find'](this[_0x9552('0x15')][_0x7d592d]['monitors'],{'filename':_0x52094a});if(_['isNil'](_0x399838)){this['channels'][_0x7d592d][_0x9552('0x7b')][_0x9552('0x7c')]({'filename':_0x52094a,'createdAt':moment()[_0x9552('0x42')]('YYYY-MM-DD\x20HH:mm:ss'),'mixmonitorid':'','status':_0x9552('0x7d')});}}}catch(_0x2b7362){logger[_0x9552('0x2e')](_0x9552('0x7e'),_0x7d592d,util[_0x9552('0x30')](_0x2b7362,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9552('0x49')][_0x9552('0x1f')]=function(_0x524ce0){try{if(this[_0x9552('0x31')](_0x524ce0)){logger[_0x9552('0x36')](_0x9552('0x7f'),_0x524ce0[_0x9552('0x38')],util['inspect'](_0x524ce0,{'showHidden':![],'depth':null}));if(this['channels'][_0x524ce0['uniqueid']]&&_0x524ce0['channel']!=_0x9552('0x4b')){if(this[_0x9552('0x31')](_0x524ce0[_0x9552('0x80')])){if(this['isNotNull'](_0x524ce0['variable'][_0x9552('0x81')])){logger[_0x9552('0x2b')]('[%s][voiceCallReport][varset]\x20variable:mixmonitor_filename\x20value:%s',_0x524ce0[_0x9552('0x38')],_0x524ce0[_0x9552('0x82')]);this[_0x9552('0x74')](_0x524ce0[_0x9552('0x38')],_0x524ce0[_0x9552('0x82')]);}else if(this[_0x9552('0x31')](_0x524ce0[_0x9552('0x80')][_0x9552('0x83')])){logger[_0x9552('0x2b')]('[%s][voiceCallReport][varset]\x20variable:xmd-phone\x20value:%s',_0x524ce0[_0x9552('0x38')],_0x524ce0[_0x9552('0x82')]);this[_0x9552('0x15')][_0x524ce0['uniqueid']][_0x9552('0x35')]=_0x524ce0[_0x9552('0x82')];}else if(this[_0x9552('0x31')](_0x524ce0[_0x9552('0x80')][_0x9552('0x84')])){logger[_0x9552('0x2b')](_0x9552('0x85'),_0x524ce0[_0x9552('0x38')],_0x524ce0[_0x9552('0x82')]);this['channels'][_0x524ce0[_0x9552('0x38')]][_0x9552('0x86')]=_0x524ce0[_0x9552('0x82')];}else if(this[_0x9552('0x31')](_0x524ce0['variable'][_0x9552('0x87')])){logger[_0x9552('0x2b')](_0x9552('0x88'),_0x524ce0[_0x9552('0x38')],_0x524ce0[_0x9552('0x82')]);this[_0x9552('0x15')][_0x524ce0[_0x9552('0x38')]][_0x9552('0x64')]=_0x524ce0['value'];}else if(this[_0x9552('0x31')](_0x524ce0[_0x9552('0x80')][_0x9552('0x89')])){logger['info'](_0x9552('0x8a'),_0x524ce0['uniqueid'],_0x524ce0['value']['split'](',')[0x0]);this[_0x9552('0x15')][_0x524ce0[_0x9552('0x38')]]['queue']=_0x524ce0[_0x9552('0x82')]['split'](',')[0x0];}else if(this[_0x9552('0x31')](_0x524ce0[_0x9552('0x80')][_0x9552('0x8b')])){logger['info'](_0x9552('0x8c'),_0x524ce0['uniqueid'],_0x524ce0[_0x9552('0x82')]);this['channels'][_0x524ce0[_0x9552('0x38')]][_0x9552('0x8d')]=_0x524ce0[_0x9552('0x82')];}else if(this[_0x9552('0x31')](_0x524ce0['variable'][_0x9552('0x8e')])){logger['info'](_0x9552('0x8f'),_0x524ce0[_0x9552('0x38')],_0x524ce0['value']);this[_0x9552('0x15')][_0x524ce0[_0x9552('0x38')]]['destination']=_0x524ce0[_0x9552('0x82')];}else if(this[_0x9552('0x31')](_0x524ce0['variable'][_0x9552('0x90')])){logger['info'](_0x9552('0x91'),_0x524ce0['uniqueid'],_0x524ce0['value']);this[_0x9552('0x15')][_0x524ce0[_0x9552('0x38')]][_0x9552('0x92')]=_0x524ce0['value'];}else if(this[_0x9552('0x31')](_0x524ce0[_0x9552('0x80')]['xmcs-queue'])){logger[_0x9552('0x2b')](_0x9552('0x93'),_0x524ce0[_0x9552('0x38')],_0x524ce0[_0x9552('0x82')]);this[_0x9552('0x15')][_0x524ce0[_0x9552('0x38')]]['queue']=_0x524ce0[_0x9552('0x82')];}else if(this[_0x9552('0x31')](_0x524ce0[_0x9552('0x80')][_0x9552('0x94')])){logger[_0x9552('0x2b')](_0x9552('0x95'),_0x524ce0[_0x9552('0x38')],_0x524ce0['value']);this[_0x9552('0x15')][_0x524ce0['uniqueid']][_0x9552('0x96')]=_0x524ce0[_0x9552('0x82')];}}}else if(this[_0x9552('0x31')](_0x524ce0[_0x9552('0x80')][_0x9552('0x81')])){if(_0x524ce0[_0x9552('0x82')]){var _0x447a3e=path[_0x9552('0x97')](_0x524ce0['value'])[_0x9552('0x44')];logger[_0x9552('0x2b')](_0x9552('0x98'),_0x447a3e,_0x524ce0[_0x9552('0x82')]);this[_0x9552('0x74')](_0x447a3e,_0x524ce0[_0x9552('0x82')]);}}else if(this[_0x9552('0x15')][_0x524ce0[_0x9552('0x39')]]){if(this['isNotNull'](_0x524ce0[_0x9552('0x80')])){if(this[_0x9552('0x31')](_0x524ce0[_0x9552('0x80')][_0x9552('0x94')])){logger[_0x9552('0x2b')](_0x9552('0x95'),_0x524ce0[_0x9552('0x39')],_0x524ce0[_0x9552('0x82')]);this['channels'][_0x524ce0['linkedid']][_0x9552('0x99')]=_0x524ce0[_0x9552('0x82')];}}}}}catch(_0x34a6e6){logger[_0x9552('0x2e')]('[%s][voiceCallReport][varset]',_0x524ce0[_0x9552('0x38')],util['inspect'](_0x34a6e6,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9552('0x49')][_0x9552('0x20')]=function(_0x4a03ea){try{if(this['isNotNull'](_0x4a03ea)){logger[_0x9552('0x36')](_0x9552('0x9a'),_0x4a03ea['uniqueid'],util[_0x9552('0x30')](_0x4a03ea,{'showHidden':![],'depth':null}));if(this['blindTransfers'][_0x4a03ea[_0x9552('0x39')]]){if(this['channels'][this['blindTransfers'][_0x4a03ea[_0x9552('0x39')]]['linkedid']]){this[_0x9552('0x15')][this[_0x9552('0x4c')][_0x4a03ea['linkedid']][_0x9552('0x39')]]['uniqueid']=_0x4a03ea[_0x9552('0x38')];this[_0x9552('0x15')][this[_0x9552('0x4c')][_0x4a03ea[_0x9552('0x39')]][_0x9552('0x39')]][_0x9552('0x69')]=this[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]]['answered'];this[_0x9552('0x15')][this[_0x9552('0x4c')][_0x4a03ea['linkedid']][_0x9552('0x39')]][_0x9552('0x70')]=this[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]]['answertime'];this[_0x9552('0x15')][this[_0x9552('0x4c')][_0x4a03ea[_0x9552('0x39')]]['linkedid']][_0x9552('0x6d')]=this[_0x9552('0x15')][this['blindTransfers'][_0x4a03ea[_0x9552('0x39')]][_0x9552('0x39')]]['channel'];this[_0x9552('0x15')][this[_0x9552('0x4c')][_0x4a03ea[_0x9552('0x39')]][_0x9552('0x39')]][_0x9552('0x50')]=this[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]][_0x9552('0x50')];this[_0x9552('0x15')][_0x4a03ea['uniqueid']]=this['channels'][this[_0x9552('0x4c')][_0x4a03ea[_0x9552('0x39')]][_0x9552('0x39')]];delete this[_0x9552('0x15')][this[_0x9552('0x4c')][_0x4a03ea['linkedid']]['linkedid']];}else if(this[_0x9552('0x15')][this[_0x9552('0x4c')][_0x4a03ea[_0x9552('0x39')]][_0x9552('0x38')]]){this[_0x9552('0x15')][this[_0x9552('0x4c')][_0x4a03ea[_0x9552('0x39')]][_0x9552('0x38')]][_0x9552('0x38')]=[this['channels'][this[_0x9552('0x4c')][_0x4a03ea[_0x9552('0x39')]]['uniqueid']][_0x9552('0x39')],this[_0x9552('0x15')][this[_0x9552('0x4c')][_0x4a03ea[_0x9552('0x39')]]['uniqueid']][_0x9552('0x39')]=this[_0x9552('0x15')][this[_0x9552('0x4c')][_0x4a03ea[_0x9552('0x39')]][_0x9552('0x38')]][_0x9552('0x38')]][0x0];this[_0x9552('0x15')][this[_0x9552('0x4c')][_0x4a03ea[_0x9552('0x39')]][_0x9552('0x38')]][_0x9552('0x69')]=this[_0x9552('0x15')][_0x4a03ea['uniqueid']][_0x9552('0x69')];this[_0x9552('0x15')][this[_0x9552('0x4c')][_0x4a03ea[_0x9552('0x39')]][_0x9552('0x38')]][_0x9552('0x70')]=this[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]][_0x9552('0x70')];this[_0x9552('0x15')][this[_0x9552('0x4c')][_0x4a03ea[_0x9552('0x39')]]['uniqueid']]['destinationchannel']=this['channels'][this['blindTransfers'][_0x4a03ea[_0x9552('0x39')]][_0x9552('0x38')]][_0x9552('0x53')];this[_0x9552('0x15')][this['blindTransfers'][_0x4a03ea[_0x9552('0x39')]]['uniqueid']]['disposition']=this['channels'][_0x4a03ea[_0x9552('0x38')]][_0x9552('0x50')];this[_0x9552('0x15')][_0x4a03ea['uniqueid']]=this['channels'][this[_0x9552('0x4c')][_0x4a03ea[_0x9552('0x39')]]['uniqueid']];delete this[_0x9552('0x15')][this['blindTransfers'][_0x4a03ea[_0x9552('0x39')]][_0x9552('0x38')]];}}if(this[_0x9552('0x15')][_0x4a03ea['uniqueid']]){logger[_0x9552('0x2b')](_0x9552('0x9b'),_0x4a03ea[_0x9552('0x38')],_0x4a03ea['cause-txt']);var _0x10763d=moment();this[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]]['endtime']=_0x10763d[_0x9552('0x42')](_0x9552('0x5f'));this[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]][_0x9552('0x5d')]=_0x10763d[_0x9552('0x6b')](this[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]][_0x9552('0x4f')],'seconds');if(this[_0x9552('0x15')][_0x4a03ea['uniqueid']][_0x9552('0x69')]){this[_0x9552('0x15')][_0x4a03ea['uniqueid']][_0x9552('0x9c')]=_0x10763d[_0x9552('0x6b')](this[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]][_0x9552('0x70')],_0x9552('0x5e'));this[_0x9552('0x15')][_0x4a03ea['uniqueid']][_0x9552('0x6a')]=this[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]][_0x9552('0x5d')]-this[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]][_0x9552('0x9c')];}if(_0x4a03ea[_0x9552('0x3e')]===_0x9552('0x52')){if(this[_0x9552('0x16')][_0x4a03ea['channel']['split']('-')[0x0]]){this[_0x9552('0x16')][_0x4a03ea[_0x9552('0x53')]['split']('-')[0x0]]=_['omit'](this[_0x9552('0x16')][_0x4a03ea[_0x9552('0x53')][_0x9552('0x3f')]('-')[0x0]],[_0x9552('0x41')]);logger[_0x9552('0x36')](_0x9552('0x9d'),_0x4a03ea['uniqueid'],util['inspect']({'id':this['agents'][_0x4a03ea[_0x9552('0x53')]['split']('-')[0x0]]['id'],'destaccountcode':this[_0x9552('0x16')][_0x4a03ea[_0x9552('0x53')][_0x9552('0x3f')]('-')[0x0]][_0x9552('0x46')]},{'showHidden':![],'depth':null}));this[_0x9552('0x32')](util[_0x9552('0x42')](_0x9552('0x43'),this[_0x9552('0x16')][_0x4a03ea[_0x9552('0x53')]['split']('-')[0x0]]['name']),'user:agentcomplete',{'id':this[_0x9552('0x16')][_0x4a03ea[_0x9552('0x53')][_0x9552('0x3f')]('-')[0x0]]['id'],'destaccountcode':this[_0x9552('0x16')][_0x4a03ea[_0x9552('0x53')]['split']('-')[0x0]][_0x9552('0x46')]});for(var _0x5f4d95=0x0;_0x5f4d95<Object['keys'](this[_0x9552('0x16')])[_0x9552('0x9e')];_0x5f4d95++){var _0x3b31ad=Object[_0x9552('0x3d')](this[_0x9552('0x16')])[_0x5f4d95];var _0x1629c2=this[_0x9552('0x16')][_0x3b31ad];if(_0x1629c2[_0x9552('0x46')]===Number(this[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]]['connectedlinenum'])){this[_0x9552('0x32')](util[_0x9552('0x42')](_0x9552('0x43'),_0x1629c2[_0x9552('0x44')]),_0x9552('0x9f'),{'id':_0x1629c2['id'],'destaccountcode':_0x1629c2[_0x9552('0x46')],'transfer':this[_0x9552('0x15')][_0x4a03ea['uniqueid']][_0x9552('0xa0')]});break;}}}}var _0x560bd5=this;Promise[_0x9552('0xa1')]()['then'](function(){var _0x51cae2=_0x560bd5[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]];if(typeof _0x51cae2[_0x9552('0xa0')]===_0x9552('0x54')){return;}if(_0x51cae2['transferToInternal']===!![]){return;}if(_['isEmpty'](_0x51cae2[_0x9552('0x7b')])){return;}return RpcSetting[_0x9552('0xa2')]()[_0x9552('0xa3')](function(_0x22e745){if(!_0x22e745[_0x9552('0xa4')])return;return Promise[_0x9552('0xa1')]()[_0x9552('0xa3')](function(){return ami[_0x9552('0xa5')]({'action':_0x9552('0xa6'),'channel':_0x51cae2['channel']})[_0x9552('0xa7')](function(){});})['then'](function(){return ami[_0x9552('0xa5')]({'action':_0x9552('0xa6'),'channel':_0x51cae2[_0x9552('0x6d')]})[_0x9552('0xa7')](function(){})['finally'](function(){var _0x5cf11f=_0x560bd5['agents'][_0x51cae2['destinationchannel']['split']('-')[0x0]];if(!_0x5cf11f)return;io[_0x9552('0x32')]('webbar:stopmonitors',{'agentId':_0x5cf11f['id'],'uniqueid':_0x51cae2['uniqueid']});});});});})['then'](function(){if(_0x4a03ea['event']===_0x9552('0xa8')){_0x560bd5[_0x9552('0x4c')][_0x4a03ea[_0x9552('0x38')]]=_0x4a03ea;}else{if(_0x560bd5[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]]&&_0x560bd5[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]]['type']===_0x9552('0xa9')&&_0x560bd5[_0x9552('0x4c')][_0x4a03ea[_0x9552('0x38')]]){_0x560bd5[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]][_0x9552('0x38')]=[_0x560bd5[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]][_0x9552('0x39')],_0x560bd5['channels'][_0x4a03ea[_0x9552('0x38')]][_0x9552('0x39')]=_0x560bd5[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]][_0x9552('0x38')]][0x0];delete _0x560bd5['blindTransfers'][_0x4a03ea[_0x9552('0x38')]];}}logger['debug'](_0x9552('0xaa'),_0x4a03ea[_0x9552('0x38')],util[_0x9552('0x30')](_0x560bd5[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]],{'showHidden':![],'depth':null}));ami[_0x9552('0x32')](_0x9552('0xab'),_0x560bd5[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]]);delete _0x560bd5[_0x9552('0x15')][_0x4a03ea[_0x9552('0x38')]];});}}}catch(_0x41e072){logger['error'](_0x9552('0xac'),_0x4a03ea[_0x9552('0x38')],util[_0x9552('0x30')](_0x41e072,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9552('0x49')][_0x9552('0x24')]=function(_0x3d6ffe){try{if(this['isNotNull'](_0x3d6ffe)){logger['info'](_0x9552('0xad'),_0x3d6ffe[_0x9552('0x38')],_0x3d6ffe['origtransferercalleridnum'],_0x3d6ffe[_0x9552('0xae')]);logger[_0x9552('0x36')](_0x9552('0xaf'),_0x3d6ffe[_0x9552('0x38')],util[_0x9552('0x30')](_0x3d6ffe,{'showHidden':![],'depth':null}));var _0x9ed9bb;if(this[_0x9552('0x15')][_0x3d6ffe['transfereeuniqueid']]){this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb0')]]['transfercalleridnum']=_0x3d6ffe['origtransferercalleridnum'];this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb0')]][_0x9552('0xb1')]=_0x3d6ffe['transfertargetcalleridnum'];if(this['channels'][_0x3d6ffe[_0x9552('0xb2')]]){_0x9ed9bb=this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb2')]];this['channels'][_0x3d6ffe[_0x9552('0xb2')]]=this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb0')]];this['channels'][_0x3d6ffe[_0x9552('0xb0')]]=_0x9ed9bb;}this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb2')]][_0x9552('0xa0')]=_0x9552('0xb3');}else if(this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb4')]]){this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb4')]][_0x9552('0xb5')]=_0x3d6ffe[_0x9552('0xb6')];this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb4')]]['transferconnectedlinenum']=_0x3d6ffe['transfertargetcalleridnum'];if(this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb7')]]){_0x9ed9bb=this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb7')]];this[_0x9552('0x15')][_0x3d6ffe['origtransfereruniqueid']]=this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb4')]];this['channels'][_0x3d6ffe[_0x9552('0xb4')]]=_0x9ed9bb;}this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb4')]]['transferType']=_0x9552('0xb3');}if((this[_0x9552('0x15')][_0x3d6ffe['origtransfereruniqueid']]||this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb8')]])&&this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb2')]]){var _0x152a5a=_[_0x9552('0xb9')]([this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb7')]],this[_0x9552('0x15')][_0x3d6ffe['origtransfererlinkedid']],this[_0x9552('0x15')][_0x3d6ffe['secondtransfereruniqueid']]],function(_0xce8bad){return _0xce8bad&&_0xce8bad['type']===_0x9552('0xa9')&&_0xce8bad[_0x9552('0xba')];});if(_0x152a5a){if(this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb7')]])this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb7')]][_0x9552('0xa0')]='ATTENDED';if(this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb8')]])this['channels'][_0x3d6ffe['origtransfererlinkedid']][_0x9552('0xa0')]=_0x9552('0xb3');this['channels'][_0x3d6ffe[_0x9552('0xb2')]][_0x9552('0xa0')]=_0x9552('0xb3');}else{if(this[_0x9552('0x15')][_0x3d6ffe['transfereeuniqueid']]){this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb2')]][_0x9552('0xbb')]=!![];}if(this[_0x9552('0x15')][_0x3d6ffe[_0x9552('0xb4')]]){this['channels'][_0x3d6ffe['transfertargetuniqueid']]['transferToInternal']=!![];}}}}}catch(_0x698615){logger[_0x9552('0x2e')](_0x9552('0xbc'),_0x3d6ffe[_0x9552('0x38')],util[_0x9552('0x30')](_0x698615,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9552('0x49')]['syncBlindTransfer']=function(_0x2fdcbd){try{if(this[_0x9552('0x31')](_0x2fdcbd)){logger[_0x9552('0x2b')](_0x9552('0xbd'),_0x2fdcbd[_0x9552('0x38')],_0x2fdcbd[_0x9552('0xbe')],_0x2fdcbd[_0x9552('0xbf')]);logger[_0x9552('0x36')](_0x9552('0xc0'),_0x2fdcbd[_0x9552('0x38')],util[_0x9552('0x30')](_0x2fdcbd,{'showHidden':![],'depth':null}));if(this['channels'][_0x2fdcbd[_0x9552('0xb0')]]){this[_0x9552('0x15')][_0x2fdcbd[_0x9552('0xb0')]][_0x9552('0xb5')]=_0x2fdcbd[_0x9552('0xbe')];this[_0x9552('0x15')][_0x2fdcbd[_0x9552('0xb0')]]['transferconnectedlinenum']=_0x2fdcbd[_0x9552('0xbf')];this['channels'][_0x2fdcbd[_0x9552('0xb0')]][_0x9552('0xa0')]=_0x9552('0xc1');this[_0x9552('0x20')]({'event':_0x9552('0xa8'),'uniqueid':_0x2fdcbd[_0x9552('0xb0')],'linkedid':_0x2fdcbd['transfereruniqueid'],'context':_0x2fdcbd['context'],'channel':_0x2fdcbd[_0x9552('0xc2')]});}else{this[_0x9552('0x15')][_0x2fdcbd[_0x9552('0xc3')]]['transferType']=_0x9552('0xc1');this[_0x9552('0x20')]({'event':_0x9552('0xa8'),'uniqueid':_0x2fdcbd[_0x9552('0xc3')],'linkedid':_0x2fdcbd[_0x9552('0xb0')],'context':_0x2fdcbd['context'],'channel':_0x2fdcbd[_0x9552('0xc2')]});}}}catch(_0xd28e51){logger[_0x9552('0x2e')]('[%s][voiceCallReport][blindtransfer]',_0x2fdcbd['uniqueid'],util[_0x9552('0x30')](_0xd28e51,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9552('0x49')][_0x9552('0x28')]=function(_0x559834){try{if(this[_0x9552('0x31')](_0x559834)){logger[_0x9552('0x36')](_0x9552('0xc4'),_0x559834['uniqueid'],util[_0x9552('0x30')](_0x559834,{'showHidden':![],'depth':null}));if(this[_0x9552('0x15')][_0x559834[_0x9552('0x38')]]){if(!_[_0x9552('0x65')](this[_0x9552('0x15')][_0x559834[_0x9552('0x38')]][_0x9552('0x70')])){this[_0x9552('0x15')][_0x559834[_0x9552('0x38')]][_0x9552('0xc5')]=moment()['format'](_0x9552('0x5f'));logger[_0x9552('0x2b')](_0x9552('0xc6'),_0x559834[_0x9552('0x38')],this[_0x9552('0x15')][_0x559834[_0x9552('0x38')]][_0x9552('0xc5')]);}}}}catch(_0x304e00){logger[_0x9552('0x2e')](_0x9552('0xc7'),_0x559834[_0x9552('0x38')],util[_0x9552('0x30')](_0x304e00,{'showHidden':![],'depth':null}));}};VoiceCallReport[_0x9552('0x49')][_0x9552('0x2a')]=function(_0x5736e7){try{if(this[_0x9552('0x31')](_0x5736e7)){logger[_0x9552('0x36')](_0x9552('0xc8'),_0x5736e7[_0x9552('0x38')],util[_0x9552('0x30')](_0x5736e7,{'showHidden':![],'depth':null}));if(this['channels'][_0x5736e7[_0x9552('0x38')]]){if(!_[_0x9552('0x65')](this['channels'][_0x5736e7[_0x9552('0x38')]][_0x9552('0xc5')])){this['channels'][_0x5736e7[_0x9552('0x38')]][_0x9552('0xc9')]+=moment()[_0x9552('0xca')](0x0)[_0x9552('0x6b')](this[_0x9552('0x15')][_0x5736e7['uniqueid']][_0x9552('0xc5')],_0x9552('0x5e'));logger['info'](_0x9552('0xcb'),_0x5736e7[_0x9552('0x38')],this['channels'][_0x5736e7[_0x9552('0x38')]]['mohtime']);delete this['channels'][_0x5736e7[_0x9552('0x38')]][_0x9552('0xc5')];}}}}catch(_0x3bef8c){logger[_0x9552('0x2e')](_0x9552('0xcc'),_0x5736e7['uniqueid'],util[_0x9552('0x30')](_0x3bef8c,{'showHidden':![],'depth':null}));}};module['exports']=VoiceCallReport;
\ No newline at end of file
index 9722c56..7368cd7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3eea=['../ami','redis','defaults','localhost','socket.io-emitter','channels','outbound','applications','dialbegin','bind','dialend','syncDialEnd','varset','syncVarSet','syncHangup','prototype','isNotNull','isUndefined','emit','syncDialBegin','[%s][voiceDialReport][dialbegin]\x20event:','uniqueid','inspect','merge','format','YYYY-MM-DD\x20HH:mm:ss','channel','substring','lastIndexOf','omit','privilege','info','[%s][voiceDialReport][dialbegin]\x20agent:%s\x20interface:%s\x20lastevent:called','membername','interface','[%s][voiceDialReport][dialbegin]\x20sending\x20voice_outbound_channel:save\x20event:','voice:outbound','voice_outbound_channel:save','custom:dialbegin','error','[%s][voiceDialReport][dialbegin]','[%s][voiceDialReport][dialend]\x20event:','dialstatus','ANSWER','connectedlinenum','connectedlinename','answertime','lastevent','connect','[%s][voiceDialReport][dialend]\x20agent:%s\x20lastevent:connect','debug','custom:dialconnect','[%s][voiceDialReport][varset]\x20event:','keys','variable','value','outboundrouteid','variables','voice','[%s][voiceDialReport][varset]\x20outboundrouteid:%s\x20variable:%s\x20value:%s','[%s][voiceDialReport][varset]\x20sending\x20voice_outbound_channel:save\x20event:','addVariable','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','sipcallid','sipuri','bridgepeer','bridgepvtcallid','membercalls','memberlastcall','memberrealtime','isNil','includes','[%s][voiceDialReport][hangup]\x20event:','[%s][voiceDialReport][hangup]\x20reason:%s\x20lasteevent:complete','endtime','starttime','seconds','complete','answered','holdtime','diff','billableseconds','sumHoldTime','sumBillable','sumDuration','duration','[%s][voiceDialReport][hangup]\x20sending\x20voiceDialReport\x20event:','[%s][voiceDialReport][hangup]\x20sending\x20dialend\x20event:','custom:dialend','[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound:save\x20event:','voice_outbound_channel:remove','linkedid','destuniqueid','[%s][voiceDialReport][hangup]','syncNewExten','[%s][voiceDialReport][newexten]\x20event:','application','toLowerCase','set','appdata','applicationdata','startsWith','[%s][voiceDialReport][newexten]\x20application:%s\x20appdata:%s','match','[%s][voiceDialReport][newexten]','exports','lodash','util','ioredis','../../../config/environment','../../../config/logger','ami'];(function(_0x16795f,_0x533662){var _0x328f13=function(_0x5b8e28){while(--_0x5b8e28){_0x16795f['push'](_0x16795f['shift']());}};_0x328f13(++_0x533662);}(_0x3eea,0x1ca));var _0xa3ee=function(_0x57d10a,_0x22317b){_0x57d10a=_0x57d10a-0x0;var _0x5ca21c=_0x3eea[_0x57d10a];return _0x5ca21c;};'use strict';var _=require(_0xa3ee('0x0'));var moment=require('moment');var util=require(_0xa3ee('0x1'));var Redis=require(_0xa3ee('0x2'));var config=require(_0xa3ee('0x3'));var logger=require(_0xa3ee('0x4'))(_0xa3ee('0x5'));var ami=require(_0xa3ee('0x6'));config[_0xa3ee('0x7')]=_[_0xa3ee('0x8')](config[_0xa3ee('0x7')],{'host':_0xa3ee('0x9'),'port':0x18eb});var io=require(_0xa3ee('0xa'))(new Redis(config['redis']));function VoiceDialReport(_0x538bf9){this[_0xa3ee('0xb')]=_0x538bf9['outboundChannels'];this[_0xa3ee('0xc')]=_0x538bf9['outbound'];this[_0xa3ee('0xd')]={};this['variables']={};ami['on'](_0xa3ee('0xe'),this['syncDialBegin'][_0xa3ee('0xf')](this));ami['on'](_0xa3ee('0x10'),this[_0xa3ee('0x11')]['bind'](this));ami['on'](_0xa3ee('0x12'),this[_0xa3ee('0x13')]['bind'](this));ami['on']('hangup',this[_0xa3ee('0x14')][_0xa3ee('0xf')](this));}VoiceDialReport[_0xa3ee('0x15')][_0xa3ee('0x16')]=function(_0x594c88){return _0x594c88!==null&&!_[_0xa3ee('0x17')](_0x594c88);};VoiceDialReport['prototype'][_0xa3ee('0x18')]=function(_0x20535f,_0x2c34cf,_0x150e20){io['to'](_0x20535f)['emit'](_0x2c34cf,_0x150e20);};VoiceDialReport[_0xa3ee('0x15')][_0xa3ee('0x19')]=function(_0x5da681){try{if(this['isNotNull'](_0x5da681)){logger['debug'](_0xa3ee('0x1a'),_0x5da681[_0xa3ee('0x1b')],util[_0xa3ee('0x1c')](_0x5da681,{'showHidden':![],'depth':null}));if(this[_0xa3ee('0xb')][_0x5da681['uniqueid']]){_[_0xa3ee('0x1d')](this[_0xa3ee('0xb')][_0x5da681[_0xa3ee('0x1b')]],{'starttime':moment()[_0xa3ee('0x1e')](_0xa3ee('0x1f')),'lastevent':'called','interface':_0x5da681[_0xa3ee('0x20')][_0xa3ee('0x21')](0x0,_0x5da681[_0xa3ee('0x20')][_0xa3ee('0x22')]('-')),'membername':_0x5da681[_0xa3ee('0x20')][_0xa3ee('0x21')](_0x5da681['channel'][_0xa3ee('0x22')]('/')+0x1,_0x5da681[_0xa3ee('0x20')]['lastIndexOf']('-'))},_[_0xa3ee('0x23')](_0x5da681,['event',_0xa3ee('0x24')]));logger[_0xa3ee('0x25')](_0xa3ee('0x26'),_0x5da681[_0xa3ee('0x1b')],this[_0xa3ee('0xb')][_0x5da681[_0xa3ee('0x1b')]][_0xa3ee('0x27')],this[_0xa3ee('0xb')][_0x5da681[_0xa3ee('0x1b')]][_0xa3ee('0x28')]);logger['debug'](_0xa3ee('0x29'),_0x5da681[_0xa3ee('0x1b')],util[_0xa3ee('0x1c')](this[_0xa3ee('0xb')][_0x5da681[_0xa3ee('0x1b')]],{'showHidden':![],'depth':null}));if(this['applications'][_0x5da681[_0xa3ee('0x1b')]])_[_0xa3ee('0x1d')](this[_0xa3ee('0xb')][_0x5da681[_0xa3ee('0x1b')]],this[_0xa3ee('0xd')][_0x5da681[_0xa3ee('0x1b')]]);this[_0xa3ee('0x18')](_0xa3ee('0x2a'),_0xa3ee('0x2b'),this[_0xa3ee('0xb')][_0x5da681['uniqueid']]);logger['debug']('[%s][voiceDialReport][dialbegin]\x20sending\x20dialbegin\x20event:',_0x5da681[_0xa3ee('0x1b')],util['inspect'](this[_0xa3ee('0xb')][_0x5da681[_0xa3ee('0x1b')]],{'showHidden':![],'depth':null}));ami[_0xa3ee('0x18')](_0xa3ee('0x2c'),this[_0xa3ee('0xb')][_0x5da681[_0xa3ee('0x1b')]]);}}}catch(_0x30ba4e){logger[_0xa3ee('0x2d')](_0xa3ee('0x2e'),_0x5da681[_0xa3ee('0x1b')],util['inspect'](_0x30ba4e,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xa3ee('0x15')]['syncDialEnd']=function(_0x439d7a){try{if(this[_0xa3ee('0x16')](_0x439d7a)){logger['debug'](_0xa3ee('0x2f'),_0x439d7a['uniqueid'],util[_0xa3ee('0x1c')](_0x439d7a,{'showHidden':![],'depth':null}));if(this['channels'][_0x439d7a[_0xa3ee('0x1b')]]){this[_0xa3ee('0xb')][_0x439d7a[_0xa3ee('0x1b')]][_0xa3ee('0x30')]=_0x439d7a[_0xa3ee('0x30')];if(_0x439d7a['dialstatus']===_0xa3ee('0x31')){this[_0xa3ee('0xb')][_0x439d7a[_0xa3ee('0x1b')]]['connectedlinenum']=_0x439d7a[_0xa3ee('0x32')];this['channels'][_0x439d7a[_0xa3ee('0x1b')]]['connectedlinename']=_0x439d7a[_0xa3ee('0x33')];this['channels'][_0x439d7a[_0xa3ee('0x1b')]][_0xa3ee('0x34')]=moment()[_0xa3ee('0x1e')](_0xa3ee('0x1f'));this[_0xa3ee('0xb')][_0x439d7a[_0xa3ee('0x1b')]][_0xa3ee('0x35')]=_0xa3ee('0x36');logger[_0xa3ee('0x25')](_0xa3ee('0x37'),_0x439d7a[_0xa3ee('0x1b')],_0x439d7a[_0xa3ee('0x20')][_0xa3ee('0x21')](_0x439d7a['channel'][_0xa3ee('0x22')]('/')+0x1,_0x439d7a[_0xa3ee('0x20')][_0xa3ee('0x22')]('-')));logger[_0xa3ee('0x38')]('[%s][voiceDialReport][dialend]\x20sending\x20dialconnect\x20event:',_0x439d7a[_0xa3ee('0x1b')],util[_0xa3ee('0x1c')](this[_0xa3ee('0xb')][_0x439d7a['uniqueid']],{'showHidden':![],'depth':null}));ami[_0xa3ee('0x18')](_0xa3ee('0x39'),this['channels'][_0x439d7a[_0xa3ee('0x1b')]]);}logger[_0xa3ee('0x38')]('[%s][voiceDialReport][dialend]\x20sending\x20voice_outbound_channel:save\x20event:',_0x439d7a[_0xa3ee('0x1b')],util[_0xa3ee('0x1c')](this[_0xa3ee('0xb')][_0x439d7a[_0xa3ee('0x1b')]],{'showHidden':![],'depth':null}));this[_0xa3ee('0x18')](_0xa3ee('0x2a'),_0xa3ee('0x2b'),this[_0xa3ee('0xb')][_0x439d7a[_0xa3ee('0x1b')]]);}}}catch(_0x2df069){logger[_0xa3ee('0x2d')]('[%s][voiceDialReport][dialend]',_0x439d7a['uniqueid'],util['inspect'](_0x2df069,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xa3ee('0x15')][_0xa3ee('0x13')]=function(_0x5f3aee){try{if(this[_0xa3ee('0x16')](_0x5f3aee)){logger[_0xa3ee('0x38')](_0xa3ee('0x3a'),_0x5f3aee['uniqueid'],util[_0xa3ee('0x1c')](_0x5f3aee,{'showHidden':![],'depth':null}));this['addVariable'](_0x5f3aee[_0xa3ee('0x1b')],_[_0xa3ee('0x3b')](_0x5f3aee[_0xa3ee('0x3c')])[0x0],_0x5f3aee[_0xa3ee('0x3d')]);if(this[_0xa3ee('0x16')](_0x5f3aee[_0xa3ee('0x3c')])&&this[_0xa3ee('0x16')](_0x5f3aee[_0xa3ee('0x3c')][_0xa3ee('0x3e')])){if(_[_0xa3ee('0x17')](this[_0xa3ee('0xb')][_0x5f3aee[_0xa3ee('0x1b')]])){this[_0xa3ee('0xb')][_0x5f3aee[_0xa3ee('0x1b')]]={'routeId':_0x5f3aee[_0xa3ee('0x3d')],'variables':this[_0xa3ee('0x3f')][_0x5f3aee[_0xa3ee('0x1b')]],'motionChannel':_0xa3ee('0x40')};logger['info'](_0xa3ee('0x41'),_0x5f3aee[_0xa3ee('0x1b')],_0x5f3aee[_0xa3ee('0x3c')][_0xa3ee('0x3e')],_['keys'](_0x5f3aee[_0xa3ee('0x3c')])[0x0],_0x5f3aee['value']);logger[_0xa3ee('0x38')](_0xa3ee('0x42'),_0x5f3aee[_0xa3ee('0x1b')],util[_0xa3ee('0x1c')](this[_0xa3ee('0xb')][_0x5f3aee[_0xa3ee('0x1b')]],{'showHidden':![],'depth':null}));this[_0xa3ee('0x18')](_0xa3ee('0x2a'),_0xa3ee('0x2b'),this[_0xa3ee('0xb')][_0x5f3aee['uniqueid']]);}}}}catch(_0x30e4f7){logger['error']('[%s][voiceDialReport][varset]',_0x5f3aee[_0xa3ee('0x1b')],util[_0xa3ee('0x1c')](_0x30e4f7,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xa3ee('0x15')][_0xa3ee('0x43')]=function(_0x400d2c,_0x3e41af,_0x1f8699){var _0x501dad=[_0xa3ee('0x44'),_0xa3ee('0x45'),'rtpaudioqosjitter',_0xa3ee('0x46'),_0xa3ee('0x47'),_0xa3ee('0x48'),'rtpaudioqosrtt','rtpaudioqosrttbridged',_0xa3ee('0x49'),_0xa3ee('0x4a'),_0xa3ee('0x4b'),_0xa3ee('0x4c'),_0xa3ee('0x4d'),'memberdynamic','memberinterface',_0xa3ee('0x4e'),_0xa3ee('0x27'),'memberpenalty',_0xa3ee('0x4f')];if(!_[_0xa3ee('0x50')](_0x3e41af)&&!_[_0xa3ee('0x51')](_0x501dad,_0x3e41af)){if(_['isUndefined'](this['variables'][_0x400d2c])){this[_0xa3ee('0x3f')][_0x400d2c]={};}this['variables'][_0x400d2c][_0x3e41af]=_0x1f8699;}};VoiceDialReport[_0xa3ee('0x15')][_0xa3ee('0x14')]=function(_0x5b8e79){try{if(this[_0xa3ee('0x16')](_0x5b8e79)){logger[_0xa3ee('0x38')](_0xa3ee('0x52'),_0x5b8e79['uniqueid'],util[_0xa3ee('0x1c')](_0x5b8e79,{'showHidden':![],'depth':null}));if(this[_0xa3ee('0xb')][_0x5b8e79['uniqueid']]){logger[_0xa3ee('0x25')](_0xa3ee('0x53'),_0x5b8e79[_0xa3ee('0x1b')],_0x5b8e79['cause-txt']);this['channels'][_0x5b8e79[_0xa3ee('0x1b')]][_0xa3ee('0x54')]=moment()['format'](_0xa3ee('0x1f'));this[_0xa3ee('0xb')][_0x5b8e79['uniqueid']]['duration']=moment(this[_0xa3ee('0xb')][_0x5b8e79[_0xa3ee('0x1b')]][_0xa3ee('0x54')])['diff'](this[_0xa3ee('0xb')][_0x5b8e79[_0xa3ee('0x1b')]][_0xa3ee('0x55')],_0xa3ee('0x56'));this[_0xa3ee('0xb')][_0x5b8e79[_0xa3ee('0x1b')]]['lastevent']=_0xa3ee('0x57');this[_0xa3ee('0xc')]['total']+=0x1;if(this[_0xa3ee('0xb')][_0x5b8e79[_0xa3ee('0x1b')]][_0xa3ee('0x34')]){this[_0xa3ee('0xc')][_0xa3ee('0x58')]+=0x1;this[_0xa3ee('0xb')][_0x5b8e79['uniqueid']][_0xa3ee('0x59')]=moment(this[_0xa3ee('0xb')][_0x5b8e79[_0xa3ee('0x1b')]]['answertime'])[_0xa3ee('0x5a')](this[_0xa3ee('0xb')][_0x5b8e79['uniqueid']]['starttime'],'seconds');this['channels'][_0x5b8e79[_0xa3ee('0x1b')]][_0xa3ee('0x5b')]=moment(this[_0xa3ee('0xb')][_0x5b8e79[_0xa3ee('0x1b')]][_0xa3ee('0x54')])[_0xa3ee('0x5a')](this[_0xa3ee('0xb')][_0x5b8e79['uniqueid']][_0xa3ee('0x34')],_0xa3ee('0x56'));this[_0xa3ee('0xc')][_0xa3ee('0x5c')]+=this[_0xa3ee('0xb')][_0x5b8e79['uniqueid']]['holdtime']||0x0;this[_0xa3ee('0xc')][_0xa3ee('0x5d')]+=this[_0xa3ee('0xb')][_0x5b8e79[_0xa3ee('0x1b')]][_0xa3ee('0x5b')];}this[_0xa3ee('0xc')][_0xa3ee('0x5e')]+=this[_0xa3ee('0xb')][_0x5b8e79[_0xa3ee('0x1b')]][_0xa3ee('0x5f')];logger[_0xa3ee('0x38')](_0xa3ee('0x60'),_0x5b8e79[_0xa3ee('0x1b')],util[_0xa3ee('0x1c')](this[_0xa3ee('0xb')][_0x5b8e79['uniqueid']],{'showHidden':![],'depth':null}));ami[_0xa3ee('0x18')]('custom:voiceDialReport',this['channels'][_0x5b8e79[_0xa3ee('0x1b')]]);logger['debug'](_0xa3ee('0x61'),_0x5b8e79[_0xa3ee('0x1b')],util[_0xa3ee('0x1c')](this[_0xa3ee('0xb')][_0x5b8e79['uniqueid']],{'showHidden':![],'depth':null}));ami[_0xa3ee('0x18')](_0xa3ee('0x62'),this[_0xa3ee('0xb')][_0x5b8e79[_0xa3ee('0x1b')]]);logger['debug'](_0xa3ee('0x63'),_0x5b8e79[_0xa3ee('0x1b')],util['inspect'](this[_0xa3ee('0xb')][_0x5b8e79['uniqueid']],{'showHidden':![],'depth':null}));this['emit'](_0xa3ee('0x2a'),'voice_outbound:save',this['outbound']);logger[_0xa3ee('0x25')]('[DEBUG]\x20Emit\x20voice_outbound_channel:remove\x20event',JSON['stringify'](this[_0xa3ee('0xb')][_0x5b8e79[_0xa3ee('0x1b')]]));logger['debug']('[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound_channel:remove\x20event:',_0x5b8e79['uniqueid'],util[_0xa3ee('0x1c')](this[_0xa3ee('0xb')][_0x5b8e79[_0xa3ee('0x1b')]],{'showHidden':![],'depth':null}));this[_0xa3ee('0x18')](_0xa3ee('0x2a'),_0xa3ee('0x64'),this['channels'][_0x5b8e79['uniqueid']]);delete this[_0xa3ee('0xb')][_0x5b8e79[_0xa3ee('0x1b')]];}else if(this[_0xa3ee('0xb')][_0x5b8e79['linkedid']]){this[_0xa3ee('0xb')][_0x5b8e79[_0xa3ee('0x65')]]['uniqueid']=this[_0xa3ee('0xb')][_0x5b8e79[_0xa3ee('0x65')]][_0xa3ee('0x66')];}if(this[_0xa3ee('0x3f')][_0x5b8e79[_0xa3ee('0x1b')]]){delete this['variables'][_0x5b8e79[_0xa3ee('0x1b')]];}}}catch(_0x432b8a){logger[_0xa3ee('0x2d')](_0xa3ee('0x67'),_0x5b8e79[_0xa3ee('0x1b')],util[_0xa3ee('0x1c')](_0x432b8a,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xa3ee('0x15')][_0xa3ee('0x68')]=function(_0x448f14){try{if(this['isNotNull'](_0x448f14)){logger['debug'](_0xa3ee('0x69'),_0x448f14['uniqueid'],util[_0xa3ee('0x1c')](_0x448f14,{'showHidden':![],'depth':null}));if(_0x448f14[_0xa3ee('0x6a')][_0xa3ee('0x6b')]()===_0xa3ee('0x6c')){_0x448f14['applicationdata']=(_0x448f14[_0xa3ee('0x6d')]||_0x448f14[_0xa3ee('0x6e')])[_0xa3ee('0x6b')]();if(_[_0xa3ee('0x6f')](_0x448f14[_0xa3ee('0x6e')],'cdr(')){if(_[_0xa3ee('0x17')](this[_0xa3ee('0xd')][_0x448f14[_0xa3ee('0x1b')]]))this['applications'][_0x448f14[_0xa3ee('0x1b')]]={};logger['info'](_0xa3ee('0x70'),_0x448f14['uniqueid'],_0x448f14[_0xa3ee('0x6a')],_0x448f14[_0xa3ee('0x6e')]);var _0x119c3d=_0x448f14[_0xa3ee('0x6e')]['split']('=');var _0x36b50d=_0x119c3d[0x0][_0xa3ee('0x71')](/cdr\((.*)\)/);if(_0x36b50d)this['applications'][_0x448f14[_0xa3ee('0x1b')]][_0x36b50d[0x1]]=_0x119c3d[0x1];}}}}catch(_0xa82482){logger[_0xa3ee('0x2d')](_0xa3ee('0x72'),_0x448f14[_0xa3ee('0x1b')],util['inspect'](_0xa82482,{'showHidden':![],'depth':null}));}};module[_0xa3ee('0x73')]=VoiceDialReport;
\ No newline at end of file
+var _0x3f8a=['syncDialEnd','syncVarSet','hangup','syncHangup','prototype','isNotNull','isUndefined','emit','syncDialBegin','debug','[%s][voiceDialReport][dialbegin]\x20event:','uniqueid','inspect','merge','YYYY-MM-DD\x20HH:mm:ss','channel','substring','lastIndexOf','omit','event','privilege','info','[%s][voiceDialReport][dialbegin]\x20agent:%s\x20interface:%s\x20lastevent:called','interface','[%s][voiceDialReport][dialbegin]\x20sending\x20voice_outbound_channel:save\x20event:','voice:outbound','voice_outbound_channel:save','custom:dialbegin','error','[%s][voiceDialReport][dialbegin]','[%s][voiceDialReport][dialend]\x20event:','dialstatus','ANSWER','connectedlinenum','connectedlinename','answertime','connect','[%s][voiceDialReport][dialend]\x20agent:%s\x20lastevent:connect','custom:dialconnect','[%s][voiceDialReport][dialend]\x20sending\x20voice_outbound_channel:save\x20event:','[%s][voiceDialReport][varset]\x20event:','addVariable','keys','variable','value','outboundrouteid','voice','[%s][voiceDialReport][varset]\x20outboundrouteid:%s\x20variable:%s\x20value:%s','[%s][voiceDialReport][varset]\x20sending\x20voice_outbound_channel:save\x20event:','[%s][voiceDialReport][varset]','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','sipuri','bridgepeer','membercalls','memberdynamic','memberinterface','memberlastcall','membername','memberpenalty','memberrealtime','isNil','includes','[%s][voiceDialReport][hangup]\x20event:','[%s][voiceDialReport][hangup]\x20reason:%s\x20lasteevent:complete','cause-txt','endtime','diff','starttime','seconds','lastevent','total','answered','billableseconds','holdtime','sumBillable','sumDuration','duration','[%s][voiceDialReport][hangup]\x20sending\x20voiceDialReport\x20event:','custom:voiceDialReport','custom:dialend','[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound:save\x20event:','voice_outbound:save','[DEBUG]\x20Emit\x20voice_outbound_channel:remove\x20event','stringify','[%s][voiceDialReport][hangup]\x20sending\x20voice_outbound_channel:remove\x20event:','linkedid','destuniqueid','syncNewExten','toLowerCase','set','applicationdata','appdata','cdr(','split','match','[%s][voiceDialReport][newexten]','exports','lodash','moment','util','ioredis','../../../config/logger','ami','../ami','redis','defaults','localhost','socket.io-emitter','channels','outboundChannels','outbound','applications','variables','dialbegin','bind','dialend'];(function(_0x199572,_0x33e667){var _0x13cfa3=function(_0x53c075){while(--_0x53c075){_0x199572['push'](_0x199572['shift']());}};_0x13cfa3(++_0x33e667);}(_0x3f8a,0x1d5));var _0xa3f8=function(_0x1472b0,_0x1d2acc){_0x1472b0=_0x1472b0-0x0;var _0x195fd0=_0x3f8a[_0x1472b0];return _0x195fd0;};'use strict';var _=require(_0xa3f8('0x0'));var moment=require(_0xa3f8('0x1'));var util=require(_0xa3f8('0x2'));var Redis=require(_0xa3f8('0x3'));var config=require('../../../config/environment');var logger=require(_0xa3f8('0x4'))(_0xa3f8('0x5'));var ami=require(_0xa3f8('0x6'));config[_0xa3f8('0x7')]=_[_0xa3f8('0x8')](config[_0xa3f8('0x7')],{'host':_0xa3f8('0x9'),'port':0x18eb});var io=require(_0xa3f8('0xa'))(new Redis(config[_0xa3f8('0x7')]));function VoiceDialReport(_0xf895d9){this[_0xa3f8('0xb')]=_0xf895d9[_0xa3f8('0xc')];this[_0xa3f8('0xd')]=_0xf895d9[_0xa3f8('0xd')];this[_0xa3f8('0xe')]={};this[_0xa3f8('0xf')]={};ami['on'](_0xa3f8('0x10'),this['syncDialBegin'][_0xa3f8('0x11')](this));ami['on'](_0xa3f8('0x12'),this[_0xa3f8('0x13')][_0xa3f8('0x11')](this));ami['on']('varset',this[_0xa3f8('0x14')][_0xa3f8('0x11')](this));ami['on'](_0xa3f8('0x15'),this[_0xa3f8('0x16')][_0xa3f8('0x11')](this));}VoiceDialReport[_0xa3f8('0x17')][_0xa3f8('0x18')]=function(_0x63de8b){return _0x63de8b!==null&&!_[_0xa3f8('0x19')](_0x63de8b);};VoiceDialReport[_0xa3f8('0x17')][_0xa3f8('0x1a')]=function(_0x2c5e15,_0x5b2c33,_0x2d8f74){io['to'](_0x2c5e15)[_0xa3f8('0x1a')](_0x5b2c33,_0x2d8f74);};VoiceDialReport[_0xa3f8('0x17')][_0xa3f8('0x1b')]=function(_0x5caebf){try{if(this[_0xa3f8('0x18')](_0x5caebf)){logger[_0xa3f8('0x1c')](_0xa3f8('0x1d'),_0x5caebf[_0xa3f8('0x1e')],util[_0xa3f8('0x1f')](_0x5caebf,{'showHidden':![],'depth':null}));if(this[_0xa3f8('0xb')][_0x5caebf[_0xa3f8('0x1e')]]){_[_0xa3f8('0x20')](this[_0xa3f8('0xb')][_0x5caebf[_0xa3f8('0x1e')]],{'starttime':moment()['format'](_0xa3f8('0x21')),'lastevent':'called','interface':_0x5caebf[_0xa3f8('0x22')][_0xa3f8('0x23')](0x0,_0x5caebf[_0xa3f8('0x22')][_0xa3f8('0x24')]('-')),'membername':_0x5caebf['channel'][_0xa3f8('0x23')](_0x5caebf['channel'][_0xa3f8('0x24')]('/')+0x1,_0x5caebf['channel'][_0xa3f8('0x24')]('-'))},_[_0xa3f8('0x25')](_0x5caebf,[_0xa3f8('0x26'),_0xa3f8('0x27')]));logger[_0xa3f8('0x28')](_0xa3f8('0x29'),_0x5caebf[_0xa3f8('0x1e')],this['channels'][_0x5caebf[_0xa3f8('0x1e')]]['membername'],this[_0xa3f8('0xb')][_0x5caebf[_0xa3f8('0x1e')]][_0xa3f8('0x2a')]);logger[_0xa3f8('0x1c')](_0xa3f8('0x2b'),_0x5caebf[_0xa3f8('0x1e')],util[_0xa3f8('0x1f')](this[_0xa3f8('0xb')][_0x5caebf[_0xa3f8('0x1e')]],{'showHidden':![],'depth':null}));if(this[_0xa3f8('0xe')][_0x5caebf['uniqueid']])_[_0xa3f8('0x20')](this[_0xa3f8('0xb')][_0x5caebf[_0xa3f8('0x1e')]],this['applications'][_0x5caebf[_0xa3f8('0x1e')]]);this['emit'](_0xa3f8('0x2c'),_0xa3f8('0x2d'),this[_0xa3f8('0xb')][_0x5caebf['uniqueid']]);logger[_0xa3f8('0x1c')]('[%s][voiceDialReport][dialbegin]\x20sending\x20dialbegin\x20event:',_0x5caebf[_0xa3f8('0x1e')],util[_0xa3f8('0x1f')](this[_0xa3f8('0xb')][_0x5caebf[_0xa3f8('0x1e')]],{'showHidden':![],'depth':null}));ami[_0xa3f8('0x1a')](_0xa3f8('0x2e'),this[_0xa3f8('0xb')][_0x5caebf[_0xa3f8('0x1e')]]);}}}catch(_0x25f9f5){logger[_0xa3f8('0x2f')](_0xa3f8('0x30'),_0x5caebf['uniqueid'],util[_0xa3f8('0x1f')](_0x25f9f5,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xa3f8('0x17')][_0xa3f8('0x13')]=function(_0x1954f5){try{if(this[_0xa3f8('0x18')](_0x1954f5)){logger['debug'](_0xa3f8('0x31'),_0x1954f5[_0xa3f8('0x1e')],util['inspect'](_0x1954f5,{'showHidden':![],'depth':null}));if(this[_0xa3f8('0xb')][_0x1954f5[_0xa3f8('0x1e')]]){this['channels'][_0x1954f5[_0xa3f8('0x1e')]]['dialstatus']=_0x1954f5['dialstatus'];if(_0x1954f5[_0xa3f8('0x32')]===_0xa3f8('0x33')){this['channels'][_0x1954f5[_0xa3f8('0x1e')]]['connectedlinenum']=_0x1954f5[_0xa3f8('0x34')];this[_0xa3f8('0xb')][_0x1954f5[_0xa3f8('0x1e')]][_0xa3f8('0x35')]=_0x1954f5['connectedlinename'];this[_0xa3f8('0xb')][_0x1954f5['uniqueid']][_0xa3f8('0x36')]=moment()['format'](_0xa3f8('0x21'));this['channels'][_0x1954f5['uniqueid']]['lastevent']=_0xa3f8('0x37');logger[_0xa3f8('0x28')](_0xa3f8('0x38'),_0x1954f5[_0xa3f8('0x1e')],_0x1954f5['channel'][_0xa3f8('0x23')](_0x1954f5[_0xa3f8('0x22')][_0xa3f8('0x24')]('/')+0x1,_0x1954f5[_0xa3f8('0x22')][_0xa3f8('0x24')]('-')));logger[_0xa3f8('0x1c')]('[%s][voiceDialReport][dialend]\x20sending\x20dialconnect\x20event:',_0x1954f5[_0xa3f8('0x1e')],util[_0xa3f8('0x1f')](this[_0xa3f8('0xb')][_0x1954f5['uniqueid']],{'showHidden':![],'depth':null}));ami[_0xa3f8('0x1a')](_0xa3f8('0x39'),this['channels'][_0x1954f5[_0xa3f8('0x1e')]]);}logger['debug'](_0xa3f8('0x3a'),_0x1954f5['uniqueid'],util[_0xa3f8('0x1f')](this[_0xa3f8('0xb')][_0x1954f5[_0xa3f8('0x1e')]],{'showHidden':![],'depth':null}));this[_0xa3f8('0x1a')](_0xa3f8('0x2c'),'voice_outbound_channel:save',this[_0xa3f8('0xb')][_0x1954f5[_0xa3f8('0x1e')]]);}}}catch(_0x4db9c5){logger[_0xa3f8('0x2f')]('[%s][voiceDialReport][dialend]',_0x1954f5[_0xa3f8('0x1e')],util[_0xa3f8('0x1f')](_0x4db9c5,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xa3f8('0x17')][_0xa3f8('0x14')]=function(_0x357712){try{if(this['isNotNull'](_0x357712)){logger[_0xa3f8('0x1c')](_0xa3f8('0x3b'),_0x357712[_0xa3f8('0x1e')],util[_0xa3f8('0x1f')](_0x357712,{'showHidden':![],'depth':null}));this[_0xa3f8('0x3c')](_0x357712['uniqueid'],_[_0xa3f8('0x3d')](_0x357712[_0xa3f8('0x3e')])[0x0],_0x357712[_0xa3f8('0x3f')]);if(this[_0xa3f8('0x18')](_0x357712[_0xa3f8('0x3e')])&&this[_0xa3f8('0x18')](_0x357712[_0xa3f8('0x3e')][_0xa3f8('0x40')])){if(_[_0xa3f8('0x19')](this[_0xa3f8('0xb')][_0x357712[_0xa3f8('0x1e')]])){this[_0xa3f8('0xb')][_0x357712[_0xa3f8('0x1e')]]={'routeId':_0x357712['value'],'variables':this['variables'][_0x357712['uniqueid']],'motionChannel':_0xa3f8('0x41')};logger[_0xa3f8('0x28')](_0xa3f8('0x42'),_0x357712[_0xa3f8('0x1e')],_0x357712[_0xa3f8('0x3e')][_0xa3f8('0x40')],_['keys'](_0x357712[_0xa3f8('0x3e')])[0x0],_0x357712[_0xa3f8('0x3f')]);logger[_0xa3f8('0x1c')](_0xa3f8('0x43'),_0x357712['uniqueid'],util[_0xa3f8('0x1f')](this[_0xa3f8('0xb')][_0x357712[_0xa3f8('0x1e')]],{'showHidden':![],'depth':null}));this['emit']('voice:outbound','voice_outbound_channel:save',this[_0xa3f8('0xb')][_0x357712[_0xa3f8('0x1e')]]);}}}}catch(_0x5a2a7c){logger[_0xa3f8('0x2f')](_0xa3f8('0x44'),_0x357712[_0xa3f8('0x1e')],util[_0xa3f8('0x1f')](_0x5a2a7c,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xa3f8('0x17')][_0xa3f8('0x3c')]=function(_0x375ffd,_0x37fa3d,_0xbfef86){var _0xe1f66d=[_0xa3f8('0x45'),_0xa3f8('0x46'),_0xa3f8('0x47'),_0xa3f8('0x48'),_0xa3f8('0x49'),_0xa3f8('0x4a'),_0xa3f8('0x4b'),'rtpaudioqosrttbridged','sipcallid',_0xa3f8('0x4c'),_0xa3f8('0x4d'),'bridgepvtcallid',_0xa3f8('0x4e'),_0xa3f8('0x4f'),_0xa3f8('0x50'),_0xa3f8('0x51'),_0xa3f8('0x52'),_0xa3f8('0x53'),_0xa3f8('0x54')];if(!_[_0xa3f8('0x55')](_0x37fa3d)&&!_[_0xa3f8('0x56')](_0xe1f66d,_0x37fa3d)){if(_[_0xa3f8('0x19')](this[_0xa3f8('0xf')][_0x375ffd])){this[_0xa3f8('0xf')][_0x375ffd]={};}this[_0xa3f8('0xf')][_0x375ffd][_0x37fa3d]=_0xbfef86;}};VoiceDialReport[_0xa3f8('0x17')][_0xa3f8('0x16')]=function(_0x3169d3){try{if(this['isNotNull'](_0x3169d3)){logger['debug'](_0xa3f8('0x57'),_0x3169d3['uniqueid'],util[_0xa3f8('0x1f')](_0x3169d3,{'showHidden':![],'depth':null}));if(this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x1e')]]){logger['info'](_0xa3f8('0x58'),_0x3169d3[_0xa3f8('0x1e')],_0x3169d3[_0xa3f8('0x59')]);this[_0xa3f8('0xb')][_0x3169d3['uniqueid']][_0xa3f8('0x5a')]=moment()['format'](_0xa3f8('0x21'));this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x1e')]]['duration']=moment(this['channels'][_0x3169d3[_0xa3f8('0x1e')]][_0xa3f8('0x5a')])[_0xa3f8('0x5b')](this[_0xa3f8('0xb')][_0x3169d3['uniqueid']][_0xa3f8('0x5c')],_0xa3f8('0x5d'));this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x1e')]][_0xa3f8('0x5e')]='complete';this['outbound'][_0xa3f8('0x5f')]+=0x1;if(this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x1e')]][_0xa3f8('0x36')]){this[_0xa3f8('0xd')][_0xa3f8('0x60')]+=0x1;this[_0xa3f8('0xb')][_0x3169d3['uniqueid']]['holdtime']=moment(this['channels'][_0x3169d3[_0xa3f8('0x1e')]][_0xa3f8('0x36')])[_0xa3f8('0x5b')](this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x1e')]][_0xa3f8('0x5c')],_0xa3f8('0x5d'));this[_0xa3f8('0xb')][_0x3169d3['uniqueid']][_0xa3f8('0x61')]=moment(this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x1e')]][_0xa3f8('0x5a')])[_0xa3f8('0x5b')](this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x1e')]]['answertime'],_0xa3f8('0x5d'));this[_0xa3f8('0xd')]['sumHoldTime']+=this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x1e')]][_0xa3f8('0x62')]||0x0;this[_0xa3f8('0xd')][_0xa3f8('0x63')]+=this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x1e')]]['billableseconds'];}this['outbound'][_0xa3f8('0x64')]+=this['channels'][_0x3169d3[_0xa3f8('0x1e')]][_0xa3f8('0x65')];logger[_0xa3f8('0x1c')](_0xa3f8('0x66'),_0x3169d3[_0xa3f8('0x1e')],util[_0xa3f8('0x1f')](this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x1e')]],{'showHidden':![],'depth':null}));ami[_0xa3f8('0x1a')](_0xa3f8('0x67'),this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x1e')]]);logger[_0xa3f8('0x1c')]('[%s][voiceDialReport][hangup]\x20sending\x20dialend\x20event:',_0x3169d3[_0xa3f8('0x1e')],util[_0xa3f8('0x1f')](this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x1e')]],{'showHidden':![],'depth':null}));ami[_0xa3f8('0x1a')](_0xa3f8('0x68'),this['channels'][_0x3169d3[_0xa3f8('0x1e')]]);logger[_0xa3f8('0x1c')](_0xa3f8('0x69'),_0x3169d3[_0xa3f8('0x1e')],util[_0xa3f8('0x1f')](this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x1e')]],{'showHidden':![],'depth':null}));this[_0xa3f8('0x1a')](_0xa3f8('0x2c'),_0xa3f8('0x6a'),this[_0xa3f8('0xd')]);logger['info'](_0xa3f8('0x6b'),JSON[_0xa3f8('0x6c')](this['channels'][_0x3169d3['uniqueid']]));logger[_0xa3f8('0x1c')](_0xa3f8('0x6d'),_0x3169d3[_0xa3f8('0x1e')],util[_0xa3f8('0x1f')](this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x1e')]],{'showHidden':![],'depth':null}));this[_0xa3f8('0x1a')](_0xa3f8('0x2c'),'voice_outbound_channel:remove',this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x1e')]]);delete this[_0xa3f8('0xb')][_0x3169d3['uniqueid']];}else if(this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x6e')]]){this['channels'][_0x3169d3[_0xa3f8('0x6e')]][_0xa3f8('0x1e')]=this[_0xa3f8('0xb')][_0x3169d3[_0xa3f8('0x6e')]][_0xa3f8('0x6f')];}if(this[_0xa3f8('0xf')][_0x3169d3[_0xa3f8('0x1e')]]){delete this[_0xa3f8('0xf')][_0x3169d3[_0xa3f8('0x1e')]];}}}catch(_0x55087e){logger[_0xa3f8('0x2f')]('[%s][voiceDialReport][hangup]',_0x3169d3[_0xa3f8('0x1e')],util['inspect'](_0x55087e,{'showHidden':![],'depth':null}));}};VoiceDialReport[_0xa3f8('0x17')][_0xa3f8('0x70')]=function(_0x407986){try{if(this[_0xa3f8('0x18')](_0x407986)){logger[_0xa3f8('0x1c')]('[%s][voiceDialReport][newexten]\x20event:',_0x407986[_0xa3f8('0x1e')],util[_0xa3f8('0x1f')](_0x407986,{'showHidden':![],'depth':null}));if(_0x407986['application'][_0xa3f8('0x71')]()===_0xa3f8('0x72')){_0x407986[_0xa3f8('0x73')]=(_0x407986[_0xa3f8('0x74')]||_0x407986[_0xa3f8('0x73')])[_0xa3f8('0x71')]();if(_['startsWith'](_0x407986[_0xa3f8('0x73')],_0xa3f8('0x75'))){if(_[_0xa3f8('0x19')](this['applications'][_0x407986[_0xa3f8('0x1e')]]))this['applications'][_0x407986[_0xa3f8('0x1e')]]={};logger['info']('[%s][voiceDialReport][newexten]\x20application:%s\x20appdata:%s',_0x407986[_0xa3f8('0x1e')],_0x407986['application'],_0x407986[_0xa3f8('0x73')]);var _0x5f174a=_0x407986[_0xa3f8('0x73')][_0xa3f8('0x76')]('=');var _0x279131=_0x5f174a[0x0][_0xa3f8('0x77')](/cdr\((.*)\)/);if(_0x279131)this['applications'][_0x407986[_0xa3f8('0x1e')]][_0x279131[0x1]]=_0x5f174a[0x1];}}}}catch(_0x35db48){logger['error'](_0xa3f8('0x78'),_0x407986[_0xa3f8('0x1e')],util[_0xa3f8('0x1f')](_0x35db48,{'showHidden':![],'depth':null}));}};module[_0xa3f8('0x79')]=VoiceDialReport;
\ No newline at end of file
index 6a709ca..f39e840 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7b7d=['summary','bind','syncQueueSummaryComplete','syncQueueMember','syncQueueStatusComplete','queuecallerjoin','syncQueueCallerJoin','queuecallerabandon','syncQueueCallerAbandon','queuecallerleave','syncQueueCallerLeave','agentcomplete','syncAgentComplete','agentconnect','syncAgentConnect','varset','hangup','fullybooted','syncFullyBooted','musiconholdstart','musiconholdstop','syncMusicOnHoldStop','syncAttendedTransfer','blindtransfer','syncBlindTransfer','loopQueueSummary','loopQueueShow','isEmpty','hasOwnProperty','originated','pTalking','waiting','queueStatusComplete','unlockRR','queuecallerexit','queuecallercomplete','clearZombieChannels','switch','isNil','Action','status','channel','catch','message','No\x20such\x20channel','error','[%s][voiceQueueReport][checkChannel]','queueReports','[%s][voiceQueueReport][checkQueueReport]','inspect','variables','[%s][voiceQueueReport][checkVariables]','prototype','[FullyBooted]\x20clear\x20realtime','clearQueueReport','emitVoiceQueueChannelRemove','clearqueuereport','emit','emitVoiceQueueChannelSave','debug',']\x20sending\x20voice_queue_channel:save\x20event:','format','voice:queue:%s','queue','voice_queue_channel:save','voice_queue_presence:save','[%s][voiceQueueReport][',']\x20sending\x20voice_queue_channel:remove\x20event:','uniqueid','queuecallerexitreason','ATTENDEDTRANSFER','voice_queue_channel:remove','voice_queue_presence:remove','emitInboundVoiceQueueSummary','type','inbound','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','isNotNull','queues','[voiceQueueReport][queues]','isRunning','then','actionid','[voiceQueueReport][queuesummary]','createQueueSummaryReport','name','createReport','handleInboundQueueSummaryReport','compareToInboundQueue','assign','queuestatus','outbound','statusRequests','completeEvent','[voiceQueueReport][queuesummary]\x20name:%s','[voiceQueueReport][queuesummarycomplete]\x20event:','custom:queuesummarycomplete','[%s][voiceQueueReport][queuecallerjoin]','isUndefined','queuecallerjoinAt','count','routealias','pick','push','[%s][voiceQueueReport][queuecallerabandon]','last','queuecallercompleteAt','holdtime','originalposition','queuecallerabandonAt','lastAssignedTo','[%s][voiceQueueReport][queuecallerleave]','queuecallerleaveAt','connectedlinenum','connectedlinename','info','[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s','[%s][voiceQueueReport][agentconnect]','COMPLETEDBYAGENT','[%s][voiceQueueReport][agentcomplete]','membername','queuecallerexitAt','transfer','reason','COMPLETED','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED','toLowerCase','local/','linkedid','seconds','FORWARDTRANSFER','transfertype','transferexten','transferuniqueid','toUpperCase','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s','syncVarSet','[%s][voiceQueueReport][varset]','addVariable','variable','value','CONTINUE','TIMEOUT','timeout','YYYY-MM-DD\x20HH:mm:ss','[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:','custom:timeout','queueposition','EXITWITHKEY','[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s','keys','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosjitterbridged','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','bridgepeer','bridgepvtcallid','membercalls','memberdynamic','memberinterface','memberlastcall','memberpenalty','memberrealtime','includes','length','sumHoldTime','diff','sumDuration','milliseconds','total','sumBillable','unmanaged','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerunmanaged\x20event:','custom:queuecallerunmanaged','abandoned','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerabandon\x20event:','custom:queuecallerabandon','[%s][voiceQueueReport][hangup]\x20sending\x20voiceQueueReport\x20event:','custom:voiceQueueReport','[%s][voiceQueueReport][handleHangup]','syncHangup','handleHangup','cause-txt','cause','transferid','[%s][voiceQueueReport][syncHangup]\x20No\x20available\x20data\x20in\x20queueReports\x20structure:\x20clear\x20action\x20in\x20variablea\x20and\x20channels\x20structures\x20needed','[%s][voiceQueueReport][hangup]','[%s][voiceQueueReport][attendedtransfer]','transfereeuniqueid','secondtransfererexten','secondtransfereruniqueid','ATTENDED','[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','transfertargetuniqueid','origtransfererexten','origtransfereruniqueid','[%s][voiceQueueReport][blindtransfer]','BLINDTRANSFER','BLIND','extension','transfererchannel','syncMusicOnHoldStart','[%s][voiceQueueReport][musiconholdstart]','mohstarttime','[%s][voiceQueueReport][musiconholdstart]\x20mohstarttime:%s','mohtime','[%s][voiceQueueReport][musiconholdstop]','syncNewExten','[%s][voiceQueueReport][newexten]\x20event:','application','applicationdata','appdata','startsWith','cdr(','[%s][voiceQueueReport][newexten]\x20application:%s\x20appdata:%s','match','[%s][voiceQueueReport][newexten]','lodash','moment','util','ioredis','../../../config/logger','ami','../ami','../model/voiceQueueSummary','redis','localhost','socket.io-emitter','enqueue','tail','sequence','realtime','agents','channels','voiceQueues','campaigns'];(function(_0x1b828b,_0x344400){var _0x98da1a=function(_0x1a0f5b){while(--_0x1a0f5b){_0x1b828b['push'](_0x1b828b['shift']());}};_0x98da1a(++_0x344400);}(_0x7b7d,0x1cd));var _0xd7b7=function(_0x9e47c6,_0x24f0c5){_0x9e47c6=_0x9e47c6-0x0;var _0x44458c=_0x7b7d[_0x9e47c6];return _0x44458c;};'use strict';var _=require(_0xd7b7('0x0'));var moment=require(_0xd7b7('0x1'));var util=require(_0xd7b7('0x2'));var Redis=require(_0xd7b7('0x3'));var config=require('../../../config/environment');var logger=require(_0xd7b7('0x4'))(_0xd7b7('0x5'));var ami=require(_0xd7b7('0x6'));var QueueReport=require('../model/queueReport');var VoiceQueueSummary=require(_0xd7b7('0x7'));config[_0xd7b7('0x8')]=_['defaults'](config[_0xd7b7('0x8')],{'host':_0xd7b7('0x9'),'port':0x18eb});var io=require(_0xd7b7('0xa'))(new Redis(config[_0xd7b7('0x8')]));var Sequence=function(){};Sequence['prototype'][_0xd7b7('0xb')]=function(_0x28c00f){this[_0xd7b7('0xc')]=this['tail']?this[_0xd7b7('0xc')]['finally'](_0x28c00f):_0x28c00f();};function VoiceQueueReport(_0x17b7ce){this[_0xd7b7('0xd')]=new Sequence();this['queueReports']={};this[_0xd7b7('0xe')]=_0x17b7ce;this[_0xd7b7('0xf')]=_0x17b7ce[_0xd7b7('0xf')];this[_0xd7b7('0x10')]=_0x17b7ce['queueChannels'];this[_0xd7b7('0x11')]=_0x17b7ce[_0xd7b7('0x11')];this[_0xd7b7('0x12')]=_0x17b7ce[_0xd7b7('0x12')];this[_0xd7b7('0x13')]=initializeSummary();this['variables']={};ami['on']('queuesummary',this['syncQueueSummary'][_0xd7b7('0x14')](this));ami['on']('queuesummarycomplete',this[_0xd7b7('0x15')]['bind'](this));ami['on']('queuemember',this[_0xd7b7('0x16')][_0xd7b7('0x14')](this));ami['on']('queuestatuscomplete',this[_0xd7b7('0x17')]['bind'](this));ami['on'](_0xd7b7('0x18'),this[_0xd7b7('0x19')][_0xd7b7('0x14')](this));ami['on'](_0xd7b7('0x1a'),this[_0xd7b7('0x1b')][_0xd7b7('0x14')](this));ami['on'](_0xd7b7('0x1c'),this[_0xd7b7('0x1d')][_0xd7b7('0x14')](this));ami['on'](_0xd7b7('0x1e'),this[_0xd7b7('0x1f')][_0xd7b7('0x14')](this));ami['on'](_0xd7b7('0x20'),this[_0xd7b7('0x21')]['bind'](this));ami['on'](_0xd7b7('0x22'),this['syncVarSet']['bind'](this));ami['on'](_0xd7b7('0x23'),this['syncHangup'][_0xd7b7('0x14')](this));ami['on'](_0xd7b7('0x24'),this[_0xd7b7('0x25')][_0xd7b7('0x14')](this));ami['on'](_0xd7b7('0x26'),this['syncMusicOnHoldStart'][_0xd7b7('0x14')](this));ami['on'](_0xd7b7('0x27'),this[_0xd7b7('0x28')][_0xd7b7('0x14')](this));ami['on']('attendedtransfer',this[_0xd7b7('0x29')][_0xd7b7('0x14')](this));ami['on'](_0xd7b7('0x2a'),this[_0xd7b7('0x2b')][_0xd7b7('0x14')](this));this[_0xd7b7('0x2c')]();this[_0xd7b7('0x2d')]();}function clearChannels(_0x20abef){if(!_[_0xd7b7('0x2e')](_0x20abef)){for(var _0x3354d3 in _0x20abef){if(_0x20abef['hasOwnProperty'](_0x3354d3)){delete _0x20abef[_0x3354d3];}}}}function clearCampaigns(_0x16e3c2){if(!_['isEmpty'](_0x16e3c2)){for(var _0x39b54c in _0x16e3c2){if(_0x16e3c2[_0xd7b7('0x2f')](_0x39b54c)){_0x16e3c2[_0x39b54c][_0xd7b7('0x30')]=0x0;}}}}function clearVoiceQueues(_0x1b17f8){if(!_['isEmpty'](_0x1b17f8)){for(var _0x1c6ec5 in _0x1b17f8){if(_0x1b17f8[_0xd7b7('0x2f')](_0x1c6ec5)){_0x1b17f8[_0x1c6ec5][_0xd7b7('0x30')]=0x0;_0x1b17f8[_0x1c6ec5]['talking']=0x0;_0x1b17f8[_0x1c6ec5][_0xd7b7('0x31')]=0x0;_0x1b17f8[_0x1c6ec5][_0xd7b7('0x32')]=0x0;_0x1b17f8[_0x1c6ec5][_0xd7b7('0x33')]=!![];}}}}function clearAgentBooked(_0x32adcc){if(!_['isEmpty'](_0x32adcc)){for(var _0x49bea8 in _0x32adcc){if(_0x32adcc[_0xd7b7('0x2f')](_0x49bea8)){_0x32adcc[_0x49bea8][_0xd7b7('0x34')]=!![];}}}}function initializeSummary(){return{'id':null,'completeEvent':null,'isRunning':![],'queues':{},'queuestatus':{},'statusRequests':0x0};}function hasCallerLeftTheQueue(_0x21139d){return _0x21139d[_0xd7b7('0x35')]||_0x21139d[_0xd7b7('0x1a')]||_0x21139d[_0xd7b7('0x36')];}VoiceQueueReport['prototype'][_0xd7b7('0x37')]=function(){var _0x178a8f=this;for(var _0x217545 in this['channels']){if(this[_0xd7b7('0x10')]['hasOwnProperty'](_0x217545)&&!this[_0xd7b7('0x10')][_0x217545][_0xd7b7('0x38')]){this['sequence'][_0xd7b7('0xb')](function(){if(!_[_0xd7b7('0x39')](_0x178a8f['channels'][_0x217545])){return ami[_0xd7b7('0x3a')]({'action':_0xd7b7('0x3b'),'channel':_0x178a8f[_0xd7b7('0x10')][_0x217545][_0xd7b7('0x3c')]})[_0xd7b7('0x3d')](function(_0x32e124){if(_0x32e124[_0xd7b7('0x3e')]===_0xd7b7('0x3f')){setTimeout(function(){if(_0x178a8f[_0xd7b7('0x10')][_0x217545]){delete _0x178a8f['channels'][_0x217545];logger[_0xd7b7('0x40')](_0xd7b7('0x41'),_0x217545,util['inspect'](_0x32e124,{'showHidden':![],'depth':null}));}if(_0x178a8f['queueReports'][_0x217545]){delete _0x178a8f[_0xd7b7('0x42')][_0x217545];logger['error'](_0xd7b7('0x43'),_0x217545,util[_0xd7b7('0x44')](_0x32e124,{'showHidden':![],'depth':null}));}if(_0x178a8f['variables'][_0x217545]){delete _0x178a8f[_0xd7b7('0x45')][_0x217545];logger[_0xd7b7('0x40')](_0xd7b7('0x46'),_0x217545,util[_0xd7b7('0x44')](_0x32e124,{'showHidden':![],'depth':null}));}},0x1f40);}});}});}}};VoiceQueueReport[_0xd7b7('0x47')]['syncFullyBooted']=function(){logger[_0xd7b7('0x40')](_0xd7b7('0x48'));clearChannels(this[_0xd7b7('0x10')]);this[_0xd7b7('0x49')](this['queueReports']);clearAgentBooked(this[_0xd7b7('0xf')]);clearVoiceQueues(this[_0xd7b7('0x11')]);clearCampaigns(this[_0xd7b7('0x12')]);this[_0xd7b7('0x13')]=initializeSummary();};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0x49')]=function(_0x5b3da9){var _0x58a31f=this;if(!_[_0xd7b7('0x2e')](_0x5b3da9)){for(var _0x57a247 in _0x5b3da9){if(_0x5b3da9[_0xd7b7('0x2f')](_0x57a247)){_0x58a31f[_0xd7b7('0x4a')](_0x5b3da9[_0x57a247],_0xd7b7('0x4b'));delete _0x5b3da9[_0x57a247];}}}};VoiceQueueReport[_0xd7b7('0x47')]['emit']=function(_0x1f8098,_0x135d33,_0x1730c8){io['to'](_0x1f8098)[_0xd7b7('0x4c')](_0x135d33,_0x1730c8);};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0x4d')]=function(_0x3d9e6a,_0x241ddb){logger[_0xd7b7('0x4e')]('[%s][voiceQueueReport]['+_0x241ddb+_0xd7b7('0x4f'),_0x3d9e6a['uniqueid'],util[_0xd7b7('0x44')](_0x3d9e6a,{'showHidden':![],'depth':null}));this['emit'](util[_0xd7b7('0x50')](_0xd7b7('0x51'),_0x3d9e6a[_0xd7b7('0x52')]),_0xd7b7('0x53'),_0x3d9e6a);io[_0xd7b7('0x4c')](_0xd7b7('0x54'),_0x3d9e6a);};VoiceQueueReport[_0xd7b7('0x47')]['emitVoiceQueueChannelRemove']=function(_0x56abff,_0x1085bc){logger[_0xd7b7('0x4e')](_0xd7b7('0x55')+_0x1085bc+_0xd7b7('0x56'),_0x56abff[_0xd7b7('0x57')],util[_0xd7b7('0x44')](_0x56abff,{'showHidden':![],'depth':null}));if(_0x56abff[_0xd7b7('0x58')]===_0xd7b7('0x59')){return;}this[_0xd7b7('0x4c')](util[_0xd7b7('0x50')](_0xd7b7('0x51'),_0x56abff[_0xd7b7('0x52')]),_0xd7b7('0x5a'),_0x56abff);io[_0xd7b7('0x4c')](_0xd7b7('0x5b'),_0x56abff);};VoiceQueueReport['prototype'][_0xd7b7('0x5c')]=function(_0x1be5a8){if(_0x1be5a8[_0xd7b7('0x5d')]===_0xd7b7('0x5e')){logger['debug'](_0xd7b7('0x5f'),util[_0xd7b7('0x44')](_0x1be5a8,{'showHidden':![],'depth':null}));this[_0xd7b7('0x4c')](util['format'](_0xd7b7('0x51'),_0x1be5a8['name']),'voice_queue:save',_0x1be5a8);}};VoiceQueueReport['prototype'][_0xd7b7('0x60')]=function(_0x2899cd){return _0x2899cd!==null&&!_['isUndefined'](_0x2899cd);};VoiceQueueReport[_0xd7b7('0x47')]['loopQueueShow']=function(){var _0x1febf3=this;setInterval(function(){_0x1febf3['clearZombieChannels']();ami[_0xd7b7('0x3a')]({'action':_0xd7b7('0x61')})[_0xd7b7('0x3d')](function(_0x260ea1){logger[_0xd7b7('0x40')](_0xd7b7('0x62'),util[_0xd7b7('0x44')](_0x260ea1,{'showHidden':![],'depth':null}));});},0x2710);};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0x2c')]=function(){var _0x4b2785=this;setInterval(function(){if(!_0x4b2785['summary'][_0xd7b7('0x63')]){return ami['Action']({'action':'queuesummary'})[_0xd7b7('0x64')](function(_0x6e9e3d){_0x4b2785['summary']['id']=_0x6e9e3d['actionid'];_0x4b2785[_0xd7b7('0x13')][_0xd7b7('0x63')]=!![];_0x4b2785['summary']['queuestatus'][_0x6e9e3d[_0xd7b7('0x65')]]={};})[_0xd7b7('0x3d')](function(_0x2cd5cd){logger[_0xd7b7('0x40')](_0xd7b7('0x66'),util[_0xd7b7('0x44')](_0x2cd5cd,{'showHidden':![],'depth':null}));});}},0x3e8);};VoiceQueueReport['prototype'][_0xd7b7('0x67')]=function(_0x59fe52,_0x5a2ecd){var _0x35aa5c;if(this[_0xd7b7('0x13')]&&this[_0xd7b7('0x13')][_0xd7b7('0x61')]&&this[_0xd7b7('0x13')][_0xd7b7('0x61')][_0x59fe52[_0xd7b7('0x68')]]){_0x35aa5c=this[_0xd7b7('0x13')][_0xd7b7('0x61')][_0x59fe52[_0xd7b7('0x68')]]['summaryEvent'];}var _0x51c2c5=new VoiceQueueSummary(_0x59fe52);return _0x51c2c5[_0xd7b7('0x69')](_0x5a2ecd[_0xd7b7('0xf')],this['agents'],_0x35aa5c,this[_0xd7b7('0xe')][_0xd7b7('0x10')]);};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0x6a')]=function(_0x3778fb,_0x364703){var _0x4d0740=this[_0xd7b7('0x67')](_0x3778fb,_0x364703);var _0x185b5d=![];_0x185b5d=_0x4d0740[_0xd7b7('0x6b')](_0x3778fb);if(_0x185b5d){Object[_0xd7b7('0x6c')](_0x3778fb,_0x4d0740);this[_0xd7b7('0xe')][_0xd7b7('0x11')][_0x3778fb[_0xd7b7('0x68')]]=_0x3778fb;this[_0xd7b7('0x5c')](_0x4d0740);}};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0x17')]=function(_0x3e326a){var _0x1f1ff3=null;var _0x4869d5=this[_0xd7b7('0x13')]['id'];if(this[_0xd7b7('0x13')][_0xd7b7('0x6d')][_0x4869d5]){_0x1f1ff3=this['summary'][_0xd7b7('0x6d')][_0x4869d5][_0x3e326a[_0xd7b7('0x65')]];}if(!_0x1f1ff3){this['summary']=initializeSummary();return;}var _0x38e898=this[_0xd7b7('0x11')][_0x1f1ff3[_0xd7b7('0x52')]];if(_0x38e898[_0xd7b7('0x5d')]==='inbound'){this[_0xd7b7('0x6a')](_0x38e898,_0x1f1ff3);}else if(_0x38e898['type']===_0xd7b7('0x6e')){var _0x430dc5=this[_0xd7b7('0x67')](_0x38e898,_0x1f1ff3);ami[_0xd7b7('0x4c')]('custom:queuesummary',_0x430dc5);}this['summary'][_0xd7b7('0x6f')]-=0x1;var _0x39e6d2=this[_0xd7b7('0x13')][_0xd7b7('0x6f')]>0x0?!![]:![];if(!_0x39e6d2){return this['syncQueueSummaryComplete'](this[_0xd7b7('0x13')][_0xd7b7('0x70')]);}};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0x16')]=function(_0x18de02){var _0x2f645d=this[_0xd7b7('0x13')]['id'];if(this[_0xd7b7('0x13')][_0xd7b7('0x6d')][_0x2f645d]&&this[_0xd7b7('0x13')]['queuestatus'][_0x2f645d][_0x18de02[_0xd7b7('0x65')]]){this['summary'][_0xd7b7('0x6d')][_0x2f645d][_0x18de02['actionid']][_0xd7b7('0xf')]['push'](_0x18de02);}};VoiceQueueReport[_0xd7b7('0x47')]['syncQueueSummary']=function(_0x5f32c4){var _0xf8bf60=this;try{if(this['isNotNull'](_0x5f32c4)&&this[_0xd7b7('0x60')](_0x5f32c4[_0xd7b7('0x52')])){logger[_0xd7b7('0x4e')]('[voiceQueueReport][queuesummary]\x20event:',util[_0xd7b7('0x44')](_0x5f32c4,{'showHidden':![],'depth':null}));var _0x526998=this[_0xd7b7('0x11')][_0x5f32c4[_0xd7b7('0x52')]];if(_0x526998){logger[_0xd7b7('0x4e')](_0xd7b7('0x71'),_0x526998[_0xd7b7('0x68')]);this[_0xd7b7('0x13')]['queues'][_0x526998[_0xd7b7('0x68')]]={'summaryEvent':_0x5f32c4};this[_0xd7b7('0x13')][_0xd7b7('0x6f')]+=0x1;return ami[_0xd7b7('0x3a')]({'action':_0xd7b7('0x6d'),'queue':_0x526998['name']})[_0xd7b7('0x64')](function(_0x1bb62d){if(!_0xf8bf60['summary'][_0xd7b7('0x6d')][_0x5f32c4[_0xd7b7('0x65')]]){_0xf8bf60[_0xd7b7('0x13')][_0xd7b7('0x6d')][_0x5f32c4[_0xd7b7('0x65')]]={};}_0xf8bf60[_0xd7b7('0x13')][_0xd7b7('0x6d')][_0x5f32c4[_0xd7b7('0x65')]][_0x1bb62d[_0xd7b7('0x65')]]={'queue':_0x526998[_0xd7b7('0x68')],'agents':[]};})['catch'](function(_0x58d57a){throw _0x58d57a;});}}}catch(_0x574687){logger['error'](_0xd7b7('0x66'),util[_0xd7b7('0x44')](_0x574687,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0x15')]=function(_0x106564){if(this[_0xd7b7('0x13')]['statusRequests']>0x0){this[_0xd7b7('0x13')][_0xd7b7('0x70')]=_0x106564;return;}logger[_0xd7b7('0x4e')](_0xd7b7('0x72'),util[_0xd7b7('0x44')](_0x106564,{'showHidden':![],'depth':null}));this[_0xd7b7('0x13')]=initializeSummary();ami[_0xd7b7('0x4c')](_0xd7b7('0x73'),{});};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0x19')]=function(_0x5480d9){try{if(this[_0xd7b7('0x60')](_0x5480d9)){logger[_0xd7b7('0x4e')](_0xd7b7('0x74'),_0x5480d9['uniqueid'],util[_0xd7b7('0x44')](_0x5480d9,{'showHidden':![],'depth':null}));if(_[_0xd7b7('0x75')](this[_0xd7b7('0x42')][_0x5480d9[_0xd7b7('0x57')]])){this[_0xd7b7('0x42')][_0x5480d9[_0xd7b7('0x57')]]=[];}if(_[_0xd7b7('0x75')](this[_0xd7b7('0x10')][_0x5480d9['uniqueid']])){this[_0xd7b7('0x10')][_0x5480d9['uniqueid']]={};}var _0x33f0b5=new QueueReport();_0x33f0b5[_0xd7b7('0x52')]=_0x5480d9[_0xd7b7('0x52')];_0x33f0b5['type']=this['voiceQueues'][_0x33f0b5[_0xd7b7('0x52')]]&&this[_0xd7b7('0x11')][_0x33f0b5['queue']][_0xd7b7('0x5d')]?this[_0xd7b7('0x11')][_0x33f0b5[_0xd7b7('0x52')]][_0xd7b7('0x5d')]||'inbound':_0xd7b7('0x5e');_0x33f0b5[_0xd7b7('0x76')]=moment()[_0xd7b7('0x50')]('YYYY-MM-DD\x20HH:mm:ss');_0x33f0b5['position']=_0x5480d9['position'];_0x33f0b5['count']=_0x5480d9[_0xd7b7('0x77')];_0x33f0b5[_0xd7b7('0x57')]=_0x5480d9['uniqueid'];_0x33f0b5[_0xd7b7('0x78')]=this['channels'][_0x5480d9[_0xd7b7('0x57')]][_0xd7b7('0x78')];logger['info']('[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s',_0x33f0b5[_0xd7b7('0x52')],_0x33f0b5[_0xd7b7('0x5d')]);Object[_0xd7b7('0x6c')](_0x33f0b5,_[_0xd7b7('0x79')](_0x5480d9,_['keys'](_0x33f0b5)));this[_0xd7b7('0x42')][_0x5480d9['uniqueid']][_0xd7b7('0x7a')](_0x33f0b5);this[_0xd7b7('0x10')][_0x5480d9[_0xd7b7('0x57')]]=_0x33f0b5;this[_0xd7b7('0x4d')](_0x33f0b5,_0xd7b7('0x18'));}}catch(_0x23a1ea){logger[_0xd7b7('0x40')](_0xd7b7('0x74'),_0x5480d9['uniqueid'],util[_0xd7b7('0x44')](_0x23a1ea,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0x1b')]=function(_0xb7e180){try{if(this['isNotNull'](_0xb7e180)){logger['debug'](_0xd7b7('0x7b'),_0xb7e180[_0xd7b7('0x57')],util[_0xd7b7('0x44')](_0xb7e180,{'showHidden':![],'depth':null}));if(this[_0xd7b7('0x42')][_0xb7e180['uniqueid']]){var _0xbf9b77=_[_0xd7b7('0x7c')](this[_0xd7b7('0x42')][_0xb7e180[_0xd7b7('0x57')]]);_0xbf9b77['queuecallercomplete']=![];_0xbf9b77[_0xd7b7('0x7d')]=null;_0xbf9b77[_0xd7b7('0x7e')]=_0xb7e180[_0xd7b7('0x7e')];_0xbf9b77[_0xd7b7('0x7f')]=_0xb7e180[_0xd7b7('0x7f')];_0xbf9b77[_0xd7b7('0x1a')]=!![];_0xbf9b77[_0xd7b7('0x80')]=moment()[_0xd7b7('0x50')]('YYYY-MM-DD\x20HH:mm:ss');_0xbf9b77[_0xd7b7('0x58')]='ABANDONED';_0xbf9b77[_0xd7b7('0x81')]=null;logger['info']('[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s',_0xbf9b77[_0xd7b7('0x52')],_0xbf9b77[_0xd7b7('0x5d')]);this[_0xd7b7('0x10')][_0xb7e180['uniqueid']]=_0xbf9b77;this[_0xd7b7('0x4a')](_0xbf9b77,_0xd7b7('0x1a'));}}}catch(_0x2cadbc){logger['error'](_0xd7b7('0x7b'),_0xb7e180['uniqueid'],util['inspect'](_0x2cadbc,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0x1d')]=function(_0x1deff9){try{if(this[_0xd7b7('0x60')](_0x1deff9)){logger[_0xd7b7('0x4e')](_0xd7b7('0x82'),_0x1deff9[_0xd7b7('0x57')],util['inspect'](_0x1deff9,{'showHidden':![],'depth':null}));if(this[_0xd7b7('0x42')][_0x1deff9[_0xd7b7('0x57')]]){var _0x278938=_[_0xd7b7('0x7c')](this[_0xd7b7('0x42')][_0x1deff9[_0xd7b7('0x57')]]);_0x278938[_0xd7b7('0x83')]=moment()['format']('YYYY-MM-DD\x20HH:mm:ss');_0x278938['connectedlinenum']=_0x1deff9[_0xd7b7('0x84')];_0x278938['connectedlinename']=_0x1deff9[_0xd7b7('0x85')];logger[_0xd7b7('0x86')](_0xd7b7('0x87'),_0x278938['queue'],_0x278938[_0xd7b7('0x5d')],_0x1deff9[_0xd7b7('0x84')],_0x1deff9['connectedlinename']);this[_0xd7b7('0x10')][_0x1deff9[_0xd7b7('0x57')]]=_0x278938;this[_0xd7b7('0x4d')](_0x278938,_0xd7b7('0x1c'));}}}catch(_0x34b34b){logger[_0xd7b7('0x40')]('[%s][voiceQueueReport][queuecallerleave]',_0x1deff9['uniqueid'],util[_0xd7b7('0x44')](_0x34b34b,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0xd7b7('0x21')]=function(_0x1ea003){try{if(this[_0xd7b7('0x60')](_0x1ea003)){logger[_0xd7b7('0x4e')](_0xd7b7('0x88'),_0x1ea003['uniqueid'],util[_0xd7b7('0x44')](_0x1ea003,{'showHidden':![],'depth':null}));if(this[_0xd7b7('0x42')][_0x1ea003[_0xd7b7('0x57')]]){var _0xa75d5b=_[_0xd7b7('0x7c')](this[_0xd7b7('0x42')][_0x1ea003['uniqueid']]);_0xa75d5b[_0xd7b7('0x36')]=!![];_0xa75d5b[_0xd7b7('0x58')]=_0xd7b7('0x89');logger[_0xd7b7('0x86')]('[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT',_0xa75d5b[_0xd7b7('0x52')],_0xa75d5b[_0xd7b7('0x5d')]);}}}catch(_0x5aa00f){logger[_0xd7b7('0x40')]('[%s][voiceQueueReport][agentconnect]',_0x1ea003[_0xd7b7('0x57')],util[_0xd7b7('0x44')](_0x5aa00f,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0x1f')]=function(_0x1743fe){try{if(this[_0xd7b7('0x60')](_0x1743fe)){logger[_0xd7b7('0x4e')](_0xd7b7('0x8a'),_0x1743fe[_0xd7b7('0x57')],util[_0xd7b7('0x44')](_0x1743fe,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x1743fe[_0xd7b7('0x57')]]){var _0x356264=_[_0xd7b7('0x7c')](this['queueReports'][_0x1743fe[_0xd7b7('0x57')]]);_0x356264[_0xd7b7('0x1a')]=![];_0x356264[_0xd7b7('0x80')]=null;_0x356264['assigned']=!![];_0x356264['lastAssignedTo']=_0x1743fe[_0xd7b7('0x8b')];_0x356264[_0xd7b7('0x7e')]=_0x1743fe[_0xd7b7('0x7e')];_0x356264['queuecallercomplete']=!![];_0x356264['queuecallerexit']=![];_0x356264[_0xd7b7('0x8c')]=null;if(!_0x356264[_0xd7b7('0x8d')]){if(_0x1743fe[_0xd7b7('0x8e')]=='transfer'){_0x356264[_0xd7b7('0x58')]=_0xd7b7('0x8f');logger[_0xd7b7('0x86')](_0xd7b7('0x90'),_0x356264[_0xd7b7('0x52')],_0x356264[_0xd7b7('0x5d')]);}else{if(_['startsWith'](_0x1743fe['channel'][_0xd7b7('0x91')](),_0xd7b7('0x92'))){if(this[_0xd7b7('0x42')][_0x1743fe[_0xd7b7('0x93')]]){var _0x2ae191=_[_0xd7b7('0x7c')](this[_0xd7b7('0x42')][_0x1743fe[_0xd7b7('0x93')]]);_0x2ae191[_0xd7b7('0x36')]=![];_0x2ae191[_0xd7b7('0x35')]=!![];_0x2ae191[_0xd7b7('0x8c')]=moment(_0x356264[_0xd7b7('0x76')])['add'](_0x1743fe[_0xd7b7('0x7e')],_0xd7b7('0x94'))[_0xd7b7('0x50')]('YYYY-MM-DD\x20HH:mm:ss');_0x2ae191[_0xd7b7('0x58')]=_0xd7b7('0x95');_0x2ae191[_0xd7b7('0x8d')]=!![];_0x2ae191[_0xd7b7('0x96')]='FORWARD';_0x2ae191[_0xd7b7('0x97')]=_0x1743fe['destexten'];_0x2ae191[_0xd7b7('0x98')]=_0x1743fe[_0xd7b7('0x57')];logger['info']('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER',_0x2ae191[_0xd7b7('0x52')],_0x2ae191[_0xd7b7('0x5d')]);var _0x374a14=this['queueReports'][_0x1743fe[_0xd7b7('0x93')]];this[_0xd7b7('0x42')][_0x1743fe[_0xd7b7('0x93')]]=this['queueReports'][_0x1743fe[_0xd7b7('0x57')]];this[_0xd7b7('0x42')][_0x1743fe[_0xd7b7('0x57')]]=_0x374a14;}}else{_0x356264['queuecallerexitreason']='COMPLETEDBY'+_0x1743fe[_0xd7b7('0x8e')][_0xd7b7('0x99')]();logger[_0xd7b7('0x86')](_0xd7b7('0x9a'),_0x356264[_0xd7b7('0x52')],_0x356264[_0xd7b7('0x5d')],_0x356264[_0xd7b7('0x58')]);}}}this[_0xd7b7('0x10')][_0x1743fe[_0xd7b7('0x57')]]=_0x356264;}}}catch(_0xd09198){logger[_0xd7b7('0x40')]('[%s][voiceQueueReport][agentcomplete]',_0x1743fe[_0xd7b7('0x57')],util[_0xd7b7('0x44')](_0xd09198,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0x9b')]=function(_0xb6f32a){try{if(this[_0xd7b7('0x60')](_0xb6f32a)){logger[_0xd7b7('0x4e')](_0xd7b7('0x9c'),_0xb6f32a['uniqueid'],util[_0xd7b7('0x44')](_0xb6f32a,{'showHidden':![],'depth':null}));this[_0xd7b7('0x9d')](_0xb6f32a[_0xd7b7('0x57')],_['keys'](_0xb6f32a[_0xd7b7('0x9e')])[0x0],_0xb6f32a['value']);if(this[_0xd7b7('0x42')][_0xb6f32a[_0xd7b7('0x57')]]){var _0x4005ad=_[_0xd7b7('0x7c')](this[_0xd7b7('0x42')][_0xb6f32a[_0xd7b7('0x57')]]);if(_0x4005ad){if(this[_0xd7b7('0x60')](_0xb6f32a[_0xd7b7('0x9e')])&&this[_0xd7b7('0x60')](_0xb6f32a[_0xd7b7('0x9e')][_0xd7b7('0x6d')])){switch(_0xb6f32a[_0xd7b7('0x9f')]){case _0xd7b7('0xa0'):_0x4005ad[_0xd7b7('0x35')]=![];_0x4005ad[_0xd7b7('0x8c')]=null;break;case _0xd7b7('0xa1'):_0x4005ad['lastevent']=_0xd7b7('0xa2');_0x4005ad[_0xd7b7('0x35')]=!![];_0x4005ad[_0xd7b7('0x8c')]=moment()[_0xd7b7('0x50')](_0xd7b7('0xa3'));_0x4005ad[_0xd7b7('0x83')]=moment()[_0xd7b7('0x50')](_0xd7b7('0xa3'));logger[_0xd7b7('0x4e')](_0xd7b7('0xa4'),_0xb6f32a[_0xd7b7('0x57')],util[_0xd7b7('0x44')](_0x4005ad,{'showHidden':![],'depth':null}));ami[_0xd7b7('0x4c')](_0xd7b7('0xa5'),_0x4005ad);break;default:_0x4005ad[_0xd7b7('0x35')]=!![];_0x4005ad['queuecallerexitAt']=moment()['format'](_0xd7b7('0xa3'));_0x4005ad[_0xd7b7('0x83')]=moment()[_0xd7b7('0x50')](_0xd7b7('0xa3'));}_0x4005ad[_0xd7b7('0x1a')]=![];_0x4005ad[_0xd7b7('0x80')]=null;_0x4005ad[_0xd7b7('0x58')]=_0xb6f32a[_0xd7b7('0x9f')];this['channels'][_0xb6f32a[_0xd7b7('0x57')]]=_0x4005ad;this[_0xd7b7('0x4a')](_0x4005ad,_0xd7b7('0x22'));}else if(this[_0xd7b7('0x60')](_0xb6f32a[_0xd7b7('0x9e')])&&this[_0xd7b7('0x60')](_0xb6f32a[_0xd7b7('0x9e')][_0xd7b7('0xa6')])){if(!_0x4005ad[_0xd7b7('0x1a')]){_0x4005ad[_0xd7b7('0x35')]=!![];_0x4005ad[_0xd7b7('0x8c')]=moment()[_0xd7b7('0x50')]('YYYY-MM-DD\x20HH:mm:ss');_0x4005ad['queuecallerexitreason']=_0xd7b7('0xa7');_0x4005ad[_0xd7b7('0x83')]=moment()['format'](_0xd7b7('0xa3'));this[_0xd7b7('0x10')][_0xb6f32a[_0xd7b7('0x57')]]=_0x4005ad;}}logger[_0xd7b7('0x86')](_0xd7b7('0xa8'),_0xb6f32a[_0xd7b7('0x57')],_0x4005ad['queue'],_0x4005ad[_0xd7b7('0x5d')],_[_0xd7b7('0xa9')](_0xb6f32a[_0xd7b7('0x9e')])[0x0],_0xb6f32a[_0xd7b7('0x9f')]);_0x4005ad[_0xd7b7('0x45')]=this[_0xd7b7('0x45')][_0xb6f32a[_0xd7b7('0x57')]];}}}}catch(_0x369eee){logger[_0xd7b7('0x40')](_0xd7b7('0x9c'),_0xb6f32a[_0xd7b7('0x57')],util[_0xd7b7('0x44')](_0x369eee,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xd7b7('0x47')]['addVariable']=function(_0xc64b46,_0x2440bc,_0x5eac97){var _0x5aa850=[_0xd7b7('0xaa'),_0xd7b7('0xab'),_0xd7b7('0xac'),_0xd7b7('0xad'),'rtpaudioqosloss',_0xd7b7('0xae'),_0xd7b7('0xaf'),_0xd7b7('0xb0'),_0xd7b7('0xb1'),'sipuri',_0xd7b7('0xb2'),_0xd7b7('0xb3'),_0xd7b7('0xb4'),_0xd7b7('0xb5'),_0xd7b7('0xb6'),_0xd7b7('0xb7'),'membername',_0xd7b7('0xb8'),_0xd7b7('0xb9')];if(!_['isNil'](_0x2440bc)&&!_[_0xd7b7('0xba')](_0x5aa850,_0x2440bc)){if(_[_0xd7b7('0x75')](this[_0xd7b7('0x45')][_0xc64b46])){this[_0xd7b7('0x45')][_0xc64b46]={};}this[_0xd7b7('0x45')][_0xc64b46][_0x2440bc]=_0x5eac97;}};VoiceQueueReport['prototype']['handleHangup']=function(_0x2256cd,_0x24de25,_0x396afd){try{var _0x155349={};if(this[_0xd7b7('0x42')][_0x2256cd]){for(var _0x3c385a=0x0;_0x3c385a<this[_0xd7b7('0x42')][_0x2256cd][_0xd7b7('0xbb')];_0x3c385a+=0x1){_0x155349=this[_0xd7b7('0x42')][_0x2256cd][_0x3c385a];var _0x32810f=this[_0xd7b7('0x11')][_0x155349[_0xd7b7('0x52')]];if(_0x32810f){_0x32810f[_0xd7b7('0xbc')]+=moment(_0x155349['queuecallerleaveAt'])[_0xd7b7('0xbd')](_0x155349[_0xd7b7('0x76')],_0xd7b7('0x94'))||0x0;if(_0x396afd&&_0x155349[_0xd7b7('0x58')]==='ATTENDEDTRANSFER'){_0x155349['queuecallerexitreason']='COMPLETEDBYAGENT';}if(_0x3c385a===this['queueReports'][_0x2256cd][_0xd7b7('0xbb')]-0x1){_0x32810f[_0xd7b7('0xbe')]+=moment()[_0xd7b7('0xbf')](0x0)[_0xd7b7('0xbd')](_0x155349['queuecallerjoinAt'],_0xd7b7('0x94'));if(hasCallerLeftTheQueue(_0x155349)&&_0x155349[_0xd7b7('0x58')]!=='ATTENDEDTRANSFER'){_0x32810f[_0xd7b7('0xc0')]+=0x1;}if(_0x155349['queuecallercomplete']){_0x32810f['answered']+=0x1;_0x32810f[_0xd7b7('0xc1')]+=moment()['milliseconds'](0x0)[_0xd7b7('0xbd')](_0x155349[_0xd7b7('0x83')],_0xd7b7('0x94'));_0x155349['queuecallercompleteAt']=moment()['format'](_0xd7b7('0xa3'));_0x155349[_0xd7b7('0x35')]=![];_0x155349['queuecallerexitAt']=null;}if(_0x155349[_0xd7b7('0x35')]&&_0x155349['transfer']!=!![]){_0x32810f[_0xd7b7('0xc2')]+=0x1;_0x155349['lastevent']='unmanaged';logger['debug'](_0xd7b7('0xc3'),_0x2256cd,util['inspect'](_0x155349,{'showHidden':![],'depth':null}));ami[_0xd7b7('0x4c')](_0xd7b7('0xc4'),_0x155349);}if(_0x155349[_0xd7b7('0x1a')]){_0x32810f[_0xd7b7('0xc5')]+=0x1;_0x155349['lastevent']='abandoned';logger[_0xd7b7('0x4e')](_0xd7b7('0xc6'),_0x2256cd,util[_0xd7b7('0x44')](_0x155349,{'showHidden':![],'depth':null}));ami['emit'](_0xd7b7('0xc7'),_0x155349);}}else{_0x32810f[_0xd7b7('0xbe')]+=_0x32810f['sumHoldTime'];}logger[_0xd7b7('0x86')]('[%s][voiceQueueReport][hangup]\x20name:%s\x20type:%s\x20reason:%s',_0x2256cd,_0x155349[_0xd7b7('0x52')],_0x155349['type'],_0x24de25);this[_0xd7b7('0x10')][_0x2256cd]=_0x155349;Object[_0xd7b7('0x6c')](this[_0xd7b7('0x11')][_0x155349['queue']],_0x32810f);if(_0x155349[_0xd7b7('0x83')]){this[_0xd7b7('0x4a')](_0x155349,_0xd7b7('0x23'));}}}logger[_0xd7b7('0x4e')](_0xd7b7('0xc8'),_0x2256cd,util[_0xd7b7('0x44')](this[_0xd7b7('0x42')][_0x2256cd],{'showHidden':![],'depth':null}));if(hasCallerLeftTheQueue(_0x155349)&&_0x155349[_0xd7b7('0x58')]!=='ATTENDEDTRANSFER'){ami['emit'](_0xd7b7('0xc9'),this['queueReports'][_0x2256cd]);if(this['queueReports'][_0x2256cd]){delete this['queueReports'][_0x2256cd];}if(this['channels'][_0x2256cd]){delete this[_0xd7b7('0x10')][_0x2256cd];}if(this[_0xd7b7('0x45')][_0x2256cd]){delete this[_0xd7b7('0x45')][_0x2256cd];}}}}catch(_0x4848ce){logger['error'](_0xd7b7('0xca'),_0x2256cd,util[_0xd7b7('0x44')](_0x4848ce,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0xcb')]=function(_0x4b9bb2){try{if(this[_0xd7b7('0x60')](_0x4b9bb2)){logger[_0xd7b7('0x4e')]('[%s][voiceQueueReport][hangup]',_0x4b9bb2[_0xd7b7('0x57')],util[_0xd7b7('0x44')](_0x4b9bb2,{'showHidden':![],'depth':null}));if(this[_0xd7b7('0x42')][_0x4b9bb2['uniqueid']]){return this[_0xd7b7('0xcc')](_0x4b9bb2[_0xd7b7('0x57')],_0x4b9bb2[_0xd7b7('0xcd')],![]);}if(this[_0xd7b7('0x42')][_0x4b9bb2[_0xd7b7('0x93')]]){if(_0x4b9bb2[_0xd7b7('0xce')]==='21'){return;}return this[_0xd7b7('0xcc')](_0x4b9bb2[_0xd7b7('0x93')],_0x4b9bb2[_0xd7b7('0xcd')],!![]);}var _0x192139=Object[_0xd7b7('0xa9')](this['queueReports']);for(var _0x1acbe7=0x0;_0x1acbe7<_0x192139['length'];_0x1acbe7++){var _0x411434=_[_0xd7b7('0x7c')](this[_0xd7b7('0x42')][_0x192139[_0x1acbe7]]);if(_0x411434&&_0x411434[_0xd7b7('0xcf')]===_0x4b9bb2['uniqueid']){return this[_0xd7b7('0xcc')](_0x411434['uniqueid'],_0x4b9bb2[_0xd7b7('0xcd')],!![]);}}if(!this[_0xd7b7('0x42')][_0x4b9bb2[_0xd7b7('0x57')]]){logger[_0xd7b7('0x4e')](_0xd7b7('0xd0'),_0x4b9bb2[_0xd7b7('0x57')]);if(this[_0xd7b7('0x10')][_0x4b9bb2[_0xd7b7('0x57')]]){delete this['channels'][_0x4b9bb2[_0xd7b7('0x57')]];}if(this[_0xd7b7('0x45')][_0x4b9bb2[_0xd7b7('0x57')]]){delete this[_0xd7b7('0x45')][_0x4b9bb2[_0xd7b7('0x57')]];}}}}catch(_0x4143ec){logger[_0xd7b7('0x40')](_0xd7b7('0xd1'),_0x4b9bb2['uniqueid'],util[_0xd7b7('0x44')](_0x4143ec,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0x29')]=function(_0x8546ce){try{if(this[_0xd7b7('0x60')](_0x8546ce)){logger['debug'](_0xd7b7('0xd2'),_0x8546ce[_0xd7b7('0x57')],util[_0xd7b7('0x44')](_0x8546ce,{'showHidden':![],'depth':null}));var _0x21bd01;var _0x2ba30b;var _0x577eb0;if(this[_0xd7b7('0x42')][_0x8546ce['transfereeuniqueid']]){_0x21bd01=_[_0xd7b7('0x7c')](this[_0xd7b7('0x42')][_0x8546ce[_0xd7b7('0xd3')]]);_0x21bd01[_0xd7b7('0x97')]=_0x8546ce[_0xd7b7('0xd4')];_0x21bd01[_0xd7b7('0x98')]=_0x8546ce[_0xd7b7('0xd5')];_0x21bd01[_0xd7b7('0x58')]=_0xd7b7('0x59');_0x21bd01[_0xd7b7('0x8d')]=!![];_0x21bd01[_0xd7b7('0x96')]=_0xd7b7('0xd6');if(this['queueReports'][_0x8546ce[_0xd7b7('0xd5')]]){_0x577eb0=this[_0xd7b7('0x42')][_0x8546ce[_0xd7b7('0xd5')]];this[_0xd7b7('0x42')][_0x8546ce[_0xd7b7('0xd5')]]=this[_0xd7b7('0x42')][_0x8546ce[_0xd7b7('0xd3')]];this[_0xd7b7('0x42')][_0x8546ce['transfereeuniqueid']]=_0x577eb0;_0x2ba30b=_[_0xd7b7('0x7c')](this[_0xd7b7('0x42')][_0x8546ce['transfereeuniqueid']]);_0x2ba30b[_0xd7b7('0x38')]=!![];}logger[_0xd7b7('0x86')](_0xd7b7('0xd7'),_0x8546ce['uniqueid'],_0x21bd01[_0xd7b7('0x52')],_0x21bd01[_0xd7b7('0x5d')],_0x21bd01['transferexten'],_0x21bd01[_0xd7b7('0x98')]);}else if(this['queueReports'][_0x8546ce[_0xd7b7('0xd8')]]){_0x21bd01=_[_0xd7b7('0x7c')](this[_0xd7b7('0x42')][_0x8546ce[_0xd7b7('0xd8')]]);_0x21bd01[_0xd7b7('0x97')]=_0x8546ce[_0xd7b7('0xd9')];_0x21bd01['transferuniqueid']=_0x8546ce[_0xd7b7('0xda')];_0x21bd01[_0xd7b7('0x58')]=_0xd7b7('0x59');_0x21bd01[_0xd7b7('0x8d')]=!![];_0x21bd01[_0xd7b7('0x96')]=_0xd7b7('0xd6');if(this[_0xd7b7('0x42')][_0x8546ce['origtransfereruniqueid']]){_0x577eb0=this[_0xd7b7('0x42')][_0x8546ce[_0xd7b7('0xda')]];this['queueReports'][_0x8546ce[_0xd7b7('0xda')]]=this[_0xd7b7('0x42')][_0x8546ce[_0xd7b7('0xd8')]];this[_0xd7b7('0x42')][_0x8546ce[_0xd7b7('0xd8')]]=_0x577eb0;_0x2ba30b=_[_0xd7b7('0x7c')](this[_0xd7b7('0x42')][_0x8546ce[_0xd7b7('0xd8')]]);_0x2ba30b[_0xd7b7('0x38')]=!![];}logger[_0xd7b7('0x86')](_0xd7b7('0xd7'),_0x8546ce['uniqueid'],_0x21bd01[_0xd7b7('0x52')],_0x21bd01[_0xd7b7('0x5d')],_0x21bd01[_0xd7b7('0x97')],_0x21bd01[_0xd7b7('0x98')]);}else if(this[_0xd7b7('0x42')][_0x8546ce['origtransfereruniqueid']]){_0x21bd01=_[_0xd7b7('0x7c')](this[_0xd7b7('0x42')][_0x8546ce[_0xd7b7('0xda')]]);_0x21bd01['transferexten']=_0x8546ce[_0xd7b7('0xd9')];_0x21bd01[_0xd7b7('0x98')]=_0x8546ce['origtransfereruniqueid'];_0x21bd01[_0xd7b7('0x58')]='ATTENDEDTRANSFER';_0x21bd01[_0xd7b7('0x8d')]=!![];_0x21bd01['transfertype']='ATTENDED';_0x21bd01[_0xd7b7('0x38')]=!![];_0x21bd01[_0xd7b7('0xcf')]=_0x8546ce['transfereeuniqueid'];}else if(this[_0xd7b7('0x42')][_0x8546ce[_0xd7b7('0xd5')]]){_0x21bd01=_[_0xd7b7('0x7c')](this[_0xd7b7('0x42')][_0x8546ce[_0xd7b7('0xd5')]]);_0x21bd01[_0xd7b7('0x97')]=_0x8546ce[_0xd7b7('0xd4')];_0x21bd01[_0xd7b7('0x98')]=_0x8546ce[_0xd7b7('0xd5')];_0x21bd01[_0xd7b7('0x58')]=_0xd7b7('0x59');_0x21bd01['transfer']=!![];_0x21bd01['transfertype']='ATTENDED';_0x21bd01[_0xd7b7('0x38')]=!![];_0x21bd01[_0xd7b7('0xcf')]=_0x8546ce[_0xd7b7('0xd8')];}}}catch(_0x22cab6){logger[_0xd7b7('0x40')](_0xd7b7('0xd2'),_0x8546ce[_0xd7b7('0x57')],util[_0xd7b7('0x44')](_0x22cab6,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0x2b')]=function(_0x374de7){try{if(this[_0xd7b7('0x60')](_0x374de7)){logger['debug'](_0xd7b7('0xdb'),_0x374de7[_0xd7b7('0x57')],util[_0xd7b7('0x44')](_0x374de7,{'showHidden':![],'depth':null}));if(this[_0xd7b7('0x42')][_0x374de7['transfereeuniqueid']]){var _0x3874ad=_[_0xd7b7('0x7c')](this[_0xd7b7('0x42')][_0x374de7[_0xd7b7('0xd3')]]);_0x3874ad[_0xd7b7('0x58')]=_0xd7b7('0xdc');_0x3874ad['transfer']=!![];_0x3874ad[_0xd7b7('0x96')]=_0xd7b7('0xdd');_0x3874ad[_0xd7b7('0x97')]=_0x374de7[_0xd7b7('0xde')];_0x3874ad[_0xd7b7('0x98')]=_0x374de7['transfereeuniqueid'];logger[_0xd7b7('0x86')]('[%s][voiceQueueReport][blindTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s',_0x374de7[_0xd7b7('0x57')],_0x3874ad[_0xd7b7('0x52')],_0x3874ad[_0xd7b7('0x5d')],_0x3874ad[_0xd7b7('0x97')],_0x3874ad[_0xd7b7('0x98')]);this[_0xd7b7('0xcb')]({'event':'BlindTransfer','uniqueid':_0x374de7[_0xd7b7('0xd3')],'context':_0x374de7['context'],'channel':_0x374de7[_0xd7b7('0xdf')]});}}}catch(_0x45cae7){logger[_0xd7b7('0x40')](_0xd7b7('0xdb'),_0x374de7[_0xd7b7('0x57')],util[_0xd7b7('0x44')](_0x45cae7,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0xe0')]=function(_0x4eccd7){try{if(this[_0xd7b7('0x60')](_0x4eccd7)){logger[_0xd7b7('0x4e')](_0xd7b7('0xe1'),_0x4eccd7[_0xd7b7('0x57')],util[_0xd7b7('0x44')](_0x4eccd7,{'showHidden':![],'depth':null}));if(this[_0xd7b7('0x42')][_0x4eccd7[_0xd7b7('0x57')]]){var _0x755667=_[_0xd7b7('0x7c')](this[_0xd7b7('0x42')][_0x4eccd7[_0xd7b7('0x57')]]);if(!_[_0xd7b7('0x39')](_0x755667[_0xd7b7('0x83')])){_0x755667[_0xd7b7('0xe2')]=moment()[_0xd7b7('0x50')]('YYYY-MM-DD\x20HH:mm:ss');logger['info'](_0xd7b7('0xe3'),_0x4eccd7[_0xd7b7('0x57')],_0x755667[_0xd7b7('0xe2')]);}}}}catch(_0x583fdd){logger[_0xd7b7('0x40')](_0xd7b7('0xe1'),_0x4eccd7[_0xd7b7('0x57')],util['inspect'](_0x583fdd,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xd7b7('0x47')]['syncMusicOnHoldStop']=function(_0x5f4678){try{if(this['isNotNull'](_0x5f4678)){logger[_0xd7b7('0x4e')]('[%s][voiceQueueReport][musiconholdstop]',_0x5f4678[_0xd7b7('0x57')],util[_0xd7b7('0x44')](_0x5f4678,{'showHidden':![],'depth':null}));if(this[_0xd7b7('0x42')][_0x5f4678[_0xd7b7('0x57')]]){var _0x2642bf=_[_0xd7b7('0x7c')](this[_0xd7b7('0x42')][_0x5f4678[_0xd7b7('0x57')]]);if(!_[_0xd7b7('0x39')](_0x2642bf[_0xd7b7('0xe2')])){_0x2642bf[_0xd7b7('0xe4')]+=moment()[_0xd7b7('0xbf')](0x0)['diff'](_0x2642bf[_0xd7b7('0xe2')],_0xd7b7('0x94'));logger['info']('[%s][voiceQueueReport][musiconholdstop]\x20mohtime:%s',_0x5f4678[_0xd7b7('0x57')],_0x2642bf[_0xd7b7('0xe4')]);delete _0x2642bf[_0xd7b7('0xe2')];}}}}catch(_0x11c17a){logger[_0xd7b7('0x40')](_0xd7b7('0xe5'),_0x5f4678[_0xd7b7('0x57')],util[_0xd7b7('0x44')](_0x11c17a,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0xd7b7('0x47')][_0xd7b7('0xe6')]=function(_0x6fd2b6){try{if(this['isNotNull'](_0x6fd2b6)){logger['debug'](_0xd7b7('0xe7'),_0x6fd2b6['uniqueid'],util['inspect'](_0x6fd2b6,{'showHidden':![],'depth':null}));if(_0x6fd2b6[_0xd7b7('0xe8')]['toLowerCase']()==='set'){_0x6fd2b6[_0xd7b7('0xe9')]=_0x6fd2b6[_0xd7b7('0xea')]&&_0x6fd2b6[_0xd7b7('0xea')]['startsWith']('CDR(routeAlias)')?_0x6fd2b6[_0xd7b7('0xea')]:(_0x6fd2b6['appdata']||_0x6fd2b6[_0xd7b7('0xe9')])[_0xd7b7('0x91')]();if(_[_0xd7b7('0xeb')](_0x6fd2b6[_0xd7b7('0xe9')][_0xd7b7('0x91')](),_0xd7b7('0xec'))){logger[_0xd7b7('0x86')](_0xd7b7('0xed'),_0x6fd2b6[_0xd7b7('0x57')],_0x6fd2b6['application'],_0x6fd2b6[_0xd7b7('0xe9')]);if(_[_0xd7b7('0x75')](this[_0xd7b7('0x10')][_0x6fd2b6['uniqueid']]))this[_0xd7b7('0x10')][_0x6fd2b6[_0xd7b7('0x57')]]={};var _0x175fea=_0x6fd2b6['applicationdata']['split']('=');var _0x5cda4f=_0x175fea[0x0][_0xd7b7('0x91')]()[_0xd7b7('0xee')](/cdr\((.*)\)/);if(_0x5cda4f)this[_0xd7b7('0x10')][_0x6fd2b6[_0xd7b7('0x57')]][_0x5cda4f[0x1]]=_0x175fea[0x1];}}}}catch(_0x2af003){logger[_0xd7b7('0x40')](_0xd7b7('0xef'),_0x6fd2b6[_0xd7b7('0x57')],util[_0xd7b7('0x44')](_0x2af003,{'showHidden':![],'depth':null}));}};module['exports']=VoiceQueueReport;
\ No newline at end of file
+var _0x2c37=['keys','queuecallerjoin','[%s][voiceQueueReport][queuecallerabandon]','last','queuecallercompleteAt','holdtime','originalposition','queuecallerabandonAt','[voiceQueueReport][queuecallerabandon]\x20name:%s\x20type:%s','[%s][voiceQueueReport][queuecallerleave]','queuecallerleaveAt','connectedlinenum','connectedlinename','[voiceQueueReport][queuecallerleave]\x20name:%s\x20type:%s\x20connectedlinenum:%s\x20connectedlinename:%s','[%s][voiceQueueReport][agentconnect]','COMPLETEDBYAGENT','assigned','lastAssignedTo','queuecallerexitAt','transfer','COMPLETED','[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETED','channel','linkedid','add','seconds','FORWARDTRANSFER','transfertype','FORWARD','transferexten','transferuniqueid','COMPLETEDBY','reason','toUpperCase','[%s][voiceQueueReport][varset]','value','variable','CONTINUE','TIMEOUT','lastevent','timeout','custom:timeout','queueposition','EXITWITHKEY','[%s][voiceQueueReport][varset]\x20name:%s\x20type:%s\x20variable:%s\x20value:%s','addVariable','rtpaudioqos','rtpaudioqosbridged','rtpaudioqosjitter','rtpaudioqosloss','rtpaudioqoslossbridged','rtpaudioqosrtt','rtpaudioqosrttbridged','sipcallid','sipuri','bridgepeer','bridgepvtcallid','memberdynamic','memberinterface','memberlastcall','membername','memberpenalty','memberrealtime','isNil','includes','length','diff','milliseconds','answered','sumBillable','unmanaged','[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerunmanaged\x20event:','custom:queuecallerunmanaged','abandoned','sumDuration','sumHoldTime','[%s][voiceQueueReport][hangup]\x20name:%s\x20type:%s\x20reason:%s','[%s][voiceQueueReport][hangup]\x20sending\x20voiceQueueReport\x20event:','syncHangup','[%s][voiceQueueReport][hangup]','handleHangup','cause-txt','cause','transferid','[%s][voiceQueueReport][syncHangup]\x20No\x20available\x20data\x20in\x20queueReports\x20structure:\x20clear\x20action\x20in\x20variablea\x20and\x20channels\x20structures\x20needed','transfereeuniqueid','secondtransfererexten','ATTENDED','secondtransfereruniqueid','[%s][voiceQueueReport][attendedTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s','transfertargetuniqueid','origtransfererexten','origtransfereruniqueid','[%s][voiceQueueReport][attendedtransfer]','syncBlindTransfer','[%s][voiceQueueReport][blindtransfer]','BLINDTRANSFER','extension','BlindTransfer','context','transfererchannel','[%s][voiceQueueReport][musiconholdstart]','mohstarttime','[%s][voiceQueueReport][musiconholdstart]\x20mohstarttime:%s','[%s][voiceQueueReport][musiconholdstop]','mohtime','[%s][voiceQueueReport][musiconholdstop]\x20mohtime:%s','syncNewExten','[%s][voiceQueueReport][newexten]\x20event:','application','toLowerCase','set','applicationdata','appdata','startsWith','CDR(routeAlias)','cdr(','match','[%s][voiceQueueReport][newexten]','exports','lodash','moment','util','../../../config/environment','../../../config/logger','../ami','../model/queueReport','../model/voiceQueueSummary','redis','defaults','localhost','prototype','tail','finally','sequence','agents','voiceQueues','campaigns','summary','variables','queuesummary','syncQueueSummary','queuesummarycomplete','syncQueueSummaryComplete','queuemember','syncQueueMember','bind','queuestatuscomplete','syncQueueStatusComplete','syncQueueCallerJoin','queuecallerabandon','syncQueueCallerAbandon','queuecallerleave','syncQueueCallerLeave','agentcomplete','syncAgentComplete','agentconnect','syncAgentConnect','varset','hangup','fullybooted','syncFullyBooted','syncMusicOnHoldStart','musiconholdstop','syncMusicOnHoldStop','attendedtransfer','syncAttendedTransfer','blindtransfer','loopQueueShow','isEmpty','hasOwnProperty','originated','pTalking','waiting','queueStatusComplete','unlockRR','queuecallerexit','queuecallercomplete','clearZombieChannels','channels','switch','enqueue','Action','status','catch','message','error','[%s][voiceQueueReport][checkChannel]','inspect','queueReports','[%s][voiceQueueReport][checkQueueReport]','[%s][voiceQueueReport][checkVariables]','[FullyBooted]\x20clear\x20realtime','clearQueueReport','clearqueuereport','emit','emitVoiceQueueChannelSave','debug','[%s][voiceQueueReport][','uniqueid','voice:queue:%s','queue','voice_queue_presence:save','emitVoiceQueueChannelRemove','queuecallerexitreason','ATTENDEDTRANSFER','format','voice_queue_presence:remove','emitInboundVoiceQueueSummary','type','inbound','[voiceQueueReport][queuesummary]\x20sending\x20voice_queue:save\x20event:','name','voice_queue:save','isUndefined','[voiceQueueReport][queues]','loopQueueSummary','isRunning','then','actionid','queuestatus','[voiceQueueReport][queuesummary]','createQueueSummaryReport','queues','summaryEvent','createReport','realtime','handleInboundQueueSummaryReport','assign','outbound','custom:queuesummary','statusRequests','push','isNotNull','[voiceQueueReport][queuesummary]\x20name:%s','[voiceQueueReport][queuesummarycomplete]\x20event:','custom:queuesummarycomplete','[%s][voiceQueueReport][queuecallerjoin]','queuecallerjoinAt','YYYY-MM-DD\x20HH:mm:ss','position','count','routealias','info','[voiceQueueReport][queuecallerjoin]\x20name:%s\x20type:%s','pick'];(function(_0x3bce8b,_0x4e9ce1){var _0x30ad5e=function(_0x3dbe14){while(--_0x3dbe14){_0x3bce8b['push'](_0x3bce8b['shift']());}};_0x30ad5e(++_0x4e9ce1);}(_0x2c37,0x16e));var _0x72c3=function(_0x1e5405,_0x11375b){_0x1e5405=_0x1e5405-0x0;var _0x3bd4ef=_0x2c37[_0x1e5405];return _0x3bd4ef;};'use strict';var _=require(_0x72c3('0x0'));var moment=require(_0x72c3('0x1'));var util=require(_0x72c3('0x2'));var Redis=require('ioredis');var config=require(_0x72c3('0x3'));var logger=require(_0x72c3('0x4'))('ami');var ami=require(_0x72c3('0x5'));var QueueReport=require(_0x72c3('0x6'));var VoiceQueueSummary=require(_0x72c3('0x7'));config[_0x72c3('0x8')]=_[_0x72c3('0x9')](config[_0x72c3('0x8')],{'host':_0x72c3('0xa'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x72c3('0x8')]));var Sequence=function(){};Sequence[_0x72c3('0xb')]['enqueue']=function(_0x3063db){this[_0x72c3('0xc')]=this[_0x72c3('0xc')]?this['tail'][_0x72c3('0xd')](_0x3063db):_0x3063db();};function VoiceQueueReport(_0x1148e1){this[_0x72c3('0xe')]=new Sequence();this['queueReports']={};this['realtime']=_0x1148e1;this[_0x72c3('0xf')]=_0x1148e1[_0x72c3('0xf')];this['channels']=_0x1148e1['queueChannels'];this[_0x72c3('0x10')]=_0x1148e1[_0x72c3('0x10')];this[_0x72c3('0x11')]=_0x1148e1['campaigns'];this[_0x72c3('0x12')]=initializeSummary();this[_0x72c3('0x13')]={};ami['on'](_0x72c3('0x14'),this[_0x72c3('0x15')]['bind'](this));ami['on'](_0x72c3('0x16'),this[_0x72c3('0x17')]['bind'](this));ami['on'](_0x72c3('0x18'),this[_0x72c3('0x19')][_0x72c3('0x1a')](this));ami['on'](_0x72c3('0x1b'),this[_0x72c3('0x1c')][_0x72c3('0x1a')](this));ami['on']('queuecallerjoin',this[_0x72c3('0x1d')][_0x72c3('0x1a')](this));ami['on'](_0x72c3('0x1e'),this[_0x72c3('0x1f')][_0x72c3('0x1a')](this));ami['on'](_0x72c3('0x20'),this[_0x72c3('0x21')][_0x72c3('0x1a')](this));ami['on'](_0x72c3('0x22'),this[_0x72c3('0x23')][_0x72c3('0x1a')](this));ami['on'](_0x72c3('0x24'),this[_0x72c3('0x25')][_0x72c3('0x1a')](this));ami['on'](_0x72c3('0x26'),this['syncVarSet'][_0x72c3('0x1a')](this));ami['on'](_0x72c3('0x27'),this['syncHangup'][_0x72c3('0x1a')](this));ami['on'](_0x72c3('0x28'),this[_0x72c3('0x29')][_0x72c3('0x1a')](this));ami['on']('musiconholdstart',this[_0x72c3('0x2a')][_0x72c3('0x1a')](this));ami['on'](_0x72c3('0x2b'),this[_0x72c3('0x2c')][_0x72c3('0x1a')](this));ami['on'](_0x72c3('0x2d'),this[_0x72c3('0x2e')][_0x72c3('0x1a')](this));ami['on'](_0x72c3('0x2f'),this['syncBlindTransfer']['bind'](this));this['loopQueueSummary']();this[_0x72c3('0x30')]();}function clearChannels(_0x57a397){if(!_[_0x72c3('0x31')](_0x57a397)){for(var _0x208150 in _0x57a397){if(_0x57a397[_0x72c3('0x32')](_0x208150)){delete _0x57a397[_0x208150];}}}}function clearCampaigns(_0xef32f4){if(!_['isEmpty'](_0xef32f4)){for(var _0x2fc3e6 in _0xef32f4){if(_0xef32f4[_0x72c3('0x32')](_0x2fc3e6)){_0xef32f4[_0x2fc3e6][_0x72c3('0x33')]=0x0;}}}}function clearVoiceQueues(_0x37a994){if(!_[_0x72c3('0x31')](_0x37a994)){for(var _0x959c01 in _0x37a994){if(_0x37a994['hasOwnProperty'](_0x959c01)){_0x37a994[_0x959c01][_0x72c3('0x33')]=0x0;_0x37a994[_0x959c01]['talking']=0x0;_0x37a994[_0x959c01][_0x72c3('0x34')]=0x0;_0x37a994[_0x959c01][_0x72c3('0x35')]=0x0;_0x37a994[_0x959c01][_0x72c3('0x36')]=!![];}}}}function clearAgentBooked(_0x48ac9f){if(!_['isEmpty'](_0x48ac9f)){for(var _0x56366 in _0x48ac9f){if(_0x48ac9f[_0x72c3('0x32')](_0x56366)){_0x48ac9f[_0x56366][_0x72c3('0x37')]=!![];}}}}function initializeSummary(){return{'id':null,'completeEvent':null,'isRunning':![],'queues':{},'queuestatus':{},'statusRequests':0x0};}function hasCallerLeftTheQueue(_0x26676f){return _0x26676f[_0x72c3('0x38')]||_0x26676f[_0x72c3('0x1e')]||_0x26676f[_0x72c3('0x39')];}VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0x3a')]=function(){var _0x183063=this;for(var _0x3d91fe in this['channels']){if(this[_0x72c3('0x3b')][_0x72c3('0x32')](_0x3d91fe)&&!this[_0x72c3('0x3b')][_0x3d91fe][_0x72c3('0x3c')]){this[_0x72c3('0xe')][_0x72c3('0x3d')](function(){if(!_['isNil'](_0x183063[_0x72c3('0x3b')][_0x3d91fe])){return ami[_0x72c3('0x3e')]({'action':_0x72c3('0x3f'),'channel':_0x183063[_0x72c3('0x3b')][_0x3d91fe]['channel']})[_0x72c3('0x40')](function(_0x55d440){if(_0x55d440[_0x72c3('0x41')]==='No\x20such\x20channel'){setTimeout(function(){if(_0x183063[_0x72c3('0x3b')][_0x3d91fe]){delete _0x183063[_0x72c3('0x3b')][_0x3d91fe];logger[_0x72c3('0x42')](_0x72c3('0x43'),_0x3d91fe,util[_0x72c3('0x44')](_0x55d440,{'showHidden':![],'depth':null}));}if(_0x183063['queueReports'][_0x3d91fe]){delete _0x183063[_0x72c3('0x45')][_0x3d91fe];logger[_0x72c3('0x42')](_0x72c3('0x46'),_0x3d91fe,util[_0x72c3('0x44')](_0x55d440,{'showHidden':![],'depth':null}));}if(_0x183063[_0x72c3('0x13')][_0x3d91fe]){delete _0x183063[_0x72c3('0x13')][_0x3d91fe];logger[_0x72c3('0x42')](_0x72c3('0x47'),_0x3d91fe,util[_0x72c3('0x44')](_0x55d440,{'showHidden':![],'depth':null}));}},0x1f40);}});}});}}};VoiceQueueReport[_0x72c3('0xb')]['syncFullyBooted']=function(){logger[_0x72c3('0x42')](_0x72c3('0x48'));clearChannels(this['channels']);this['clearQueueReport'](this['queueReports']);clearAgentBooked(this[_0x72c3('0xf')]);clearVoiceQueues(this[_0x72c3('0x10')]);clearCampaigns(this[_0x72c3('0x11')]);this[_0x72c3('0x12')]=initializeSummary();};VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0x49')]=function(_0x3ce7a8){var _0x632569=this;if(!_[_0x72c3('0x31')](_0x3ce7a8)){for(var _0x262a14 in _0x3ce7a8){if(_0x3ce7a8[_0x72c3('0x32')](_0x262a14)){_0x632569['emitVoiceQueueChannelRemove'](_0x3ce7a8[_0x262a14],_0x72c3('0x4a'));delete _0x3ce7a8[_0x262a14];}}}};VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0x4b')]=function(_0x730a88,_0x17ee2f,_0x3e55f6){io['to'](_0x730a88)[_0x72c3('0x4b')](_0x17ee2f,_0x3e55f6);};VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0x4c')]=function(_0x3c049b,_0x533260){logger[_0x72c3('0x4d')](_0x72c3('0x4e')+_0x533260+']\x20sending\x20voice_queue_channel:save\x20event:',_0x3c049b[_0x72c3('0x4f')],util[_0x72c3('0x44')](_0x3c049b,{'showHidden':![],'depth':null}));this[_0x72c3('0x4b')](util['format'](_0x72c3('0x50'),_0x3c049b[_0x72c3('0x51')]),'voice_queue_channel:save',_0x3c049b);io['emit'](_0x72c3('0x52'),_0x3c049b);};VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0x53')]=function(_0x3c5993,_0x4e69ee){logger[_0x72c3('0x4d')](_0x72c3('0x4e')+_0x4e69ee+']\x20sending\x20voice_queue_channel:remove\x20event:',_0x3c5993['uniqueid'],util['inspect'](_0x3c5993,{'showHidden':![],'depth':null}));if(_0x3c5993[_0x72c3('0x54')]===_0x72c3('0x55')){return;}this[_0x72c3('0x4b')](util[_0x72c3('0x56')]('voice:queue:%s',_0x3c5993[_0x72c3('0x51')]),'voice_queue_channel:remove',_0x3c5993);io['emit'](_0x72c3('0x57'),_0x3c5993);};VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0x58')]=function(_0xd72d73){if(_0xd72d73[_0x72c3('0x59')]===_0x72c3('0x5a')){logger[_0x72c3('0x4d')](_0x72c3('0x5b'),util[_0x72c3('0x44')](_0xd72d73,{'showHidden':![],'depth':null}));this[_0x72c3('0x4b')](util[_0x72c3('0x56')]('voice:queue:%s',_0xd72d73[_0x72c3('0x5c')]),_0x72c3('0x5d'),_0xd72d73);}};VoiceQueueReport[_0x72c3('0xb')]['isNotNull']=function(_0x26b11b){return _0x26b11b!==null&&!_[_0x72c3('0x5e')](_0x26b11b);};VoiceQueueReport[_0x72c3('0xb')]['loopQueueShow']=function(){var _0xc3ac9f=this;setInterval(function(){_0xc3ac9f['clearZombieChannels']();ami[_0x72c3('0x3e')]({'action':'queues'})['catch'](function(_0xd7e0b3){logger['error'](_0x72c3('0x5f'),util[_0x72c3('0x44')](_0xd7e0b3,{'showHidden':![],'depth':null}));});},0x2710);};VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0x60')]=function(){var _0x3fc91c=this;setInterval(function(){if(!_0x3fc91c['summary'][_0x72c3('0x61')]){return ami[_0x72c3('0x3e')]({'action':_0x72c3('0x14')})[_0x72c3('0x62')](function(_0x5254e8){_0x3fc91c[_0x72c3('0x12')]['id']=_0x5254e8[_0x72c3('0x63')];_0x3fc91c[_0x72c3('0x12')][_0x72c3('0x61')]=!![];_0x3fc91c[_0x72c3('0x12')][_0x72c3('0x64')][_0x5254e8[_0x72c3('0x63')]]={};})[_0x72c3('0x40')](function(_0x301946){logger[_0x72c3('0x42')](_0x72c3('0x65'),util[_0x72c3('0x44')](_0x301946,{'showHidden':![],'depth':null}));});}},0x3e8);};VoiceQueueReport['prototype'][_0x72c3('0x66')]=function(_0x34ae26,_0x41e54e){var _0x4d0545;if(this[_0x72c3('0x12')]&&this[_0x72c3('0x12')][_0x72c3('0x67')]&&this['summary'][_0x72c3('0x67')][_0x34ae26['name']]){_0x4d0545=this['summary']['queues'][_0x34ae26['name']][_0x72c3('0x68')];}var _0x2cf0d5=new VoiceQueueSummary(_0x34ae26);return _0x2cf0d5[_0x72c3('0x69')](_0x41e54e[_0x72c3('0xf')],this[_0x72c3('0xf')],_0x4d0545,this[_0x72c3('0x6a')][_0x72c3('0x3b')]);};VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0x6b')]=function(_0x2a9b99,_0x156c6b){var _0x3d4af2=this['createQueueSummaryReport'](_0x2a9b99,_0x156c6b);var _0xa97dd0=![];_0xa97dd0=_0x3d4af2['compareToInboundQueue'](_0x2a9b99);if(_0xa97dd0){Object[_0x72c3('0x6c')](_0x2a9b99,_0x3d4af2);this[_0x72c3('0x6a')][_0x72c3('0x10')][_0x2a9b99[_0x72c3('0x5c')]]=_0x2a9b99;this[_0x72c3('0x58')](_0x3d4af2);}};VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0x1c')]=function(_0x4a425f){var _0x10b2f4=null;var _0x10f561=this[_0x72c3('0x12')]['id'];if(this[_0x72c3('0x12')][_0x72c3('0x64')][_0x10f561]){_0x10b2f4=this[_0x72c3('0x12')][_0x72c3('0x64')][_0x10f561][_0x4a425f[_0x72c3('0x63')]];}if(!_0x10b2f4){this[_0x72c3('0x12')]=initializeSummary();return;}var _0x553a1d=this[_0x72c3('0x10')][_0x10b2f4[_0x72c3('0x51')]];if(_0x553a1d['type']===_0x72c3('0x5a')){this[_0x72c3('0x6b')](_0x553a1d,_0x10b2f4);}else if(_0x553a1d[_0x72c3('0x59')]===_0x72c3('0x6d')){var _0x4bdd4c=this['createQueueSummaryReport'](_0x553a1d,_0x10b2f4);ami[_0x72c3('0x4b')](_0x72c3('0x6e'),_0x4bdd4c);}this[_0x72c3('0x12')][_0x72c3('0x6f')]-=0x1;var _0x117af8=this['summary'][_0x72c3('0x6f')]>0x0?!![]:![];if(!_0x117af8){return this[_0x72c3('0x17')](this[_0x72c3('0x12')]['completeEvent']);}};VoiceQueueReport['prototype'][_0x72c3('0x19')]=function(_0x3da0cc){var _0x50a007=this[_0x72c3('0x12')]['id'];if(this[_0x72c3('0x12')]['queuestatus'][_0x50a007]&&this['summary'][_0x72c3('0x64')][_0x50a007][_0x3da0cc[_0x72c3('0x63')]]){this[_0x72c3('0x12')][_0x72c3('0x64')][_0x50a007][_0x3da0cc[_0x72c3('0x63')]][_0x72c3('0xf')][_0x72c3('0x70')](_0x3da0cc);}};VoiceQueueReport['prototype'][_0x72c3('0x15')]=function(_0x4779ad){var _0x9afa7c=this;try{if(this[_0x72c3('0x71')](_0x4779ad)&&this[_0x72c3('0x71')](_0x4779ad[_0x72c3('0x51')])){logger[_0x72c3('0x4d')]('[voiceQueueReport][queuesummary]\x20event:',util[_0x72c3('0x44')](_0x4779ad,{'showHidden':![],'depth':null}));var _0x4890e2=this[_0x72c3('0x10')][_0x4779ad[_0x72c3('0x51')]];if(_0x4890e2){logger[_0x72c3('0x4d')](_0x72c3('0x72'),_0x4890e2[_0x72c3('0x5c')]);this['summary']['queues'][_0x4890e2[_0x72c3('0x5c')]]={'summaryEvent':_0x4779ad};this[_0x72c3('0x12')][_0x72c3('0x6f')]+=0x1;return ami[_0x72c3('0x3e')]({'action':_0x72c3('0x64'),'queue':_0x4890e2[_0x72c3('0x5c')]})[_0x72c3('0x62')](function(_0x4f464f){if(!_0x9afa7c[_0x72c3('0x12')]['queuestatus'][_0x4779ad['actionid']]){_0x9afa7c[_0x72c3('0x12')][_0x72c3('0x64')][_0x4779ad[_0x72c3('0x63')]]={};}_0x9afa7c[_0x72c3('0x12')][_0x72c3('0x64')][_0x4779ad[_0x72c3('0x63')]][_0x4f464f['actionid']]={'queue':_0x4890e2[_0x72c3('0x5c')],'agents':[]};})[_0x72c3('0x40')](function(_0x5c0a0f){throw _0x5c0a0f;});}}}catch(_0x535148){logger['error'](_0x72c3('0x65'),util[_0x72c3('0x44')](_0x535148,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x72c3('0x17')]=function(_0x479f62){if(this[_0x72c3('0x12')][_0x72c3('0x6f')]>0x0){this[_0x72c3('0x12')]['completeEvent']=_0x479f62;return;}logger[_0x72c3('0x4d')](_0x72c3('0x73'),util[_0x72c3('0x44')](_0x479f62,{'showHidden':![],'depth':null}));this[_0x72c3('0x12')]=initializeSummary();ami[_0x72c3('0x4b')](_0x72c3('0x74'),{});};VoiceQueueReport['prototype'][_0x72c3('0x1d')]=function(_0x4d34d1){try{if(this[_0x72c3('0x71')](_0x4d34d1)){logger[_0x72c3('0x4d')](_0x72c3('0x75'),_0x4d34d1[_0x72c3('0x4f')],util[_0x72c3('0x44')](_0x4d34d1,{'showHidden':![],'depth':null}));if(_['isUndefined'](this['queueReports'][_0x4d34d1[_0x72c3('0x4f')]])){this[_0x72c3('0x45')][_0x4d34d1[_0x72c3('0x4f')]]=[];}if(_['isUndefined'](this[_0x72c3('0x3b')][_0x4d34d1[_0x72c3('0x4f')]])){this[_0x72c3('0x3b')][_0x4d34d1[_0x72c3('0x4f')]]={};}var _0x4d509b=new QueueReport();_0x4d509b['queue']=_0x4d34d1[_0x72c3('0x51')];_0x4d509b[_0x72c3('0x59')]=this['voiceQueues'][_0x4d509b['queue']]&&this[_0x72c3('0x10')][_0x4d509b[_0x72c3('0x51')]][_0x72c3('0x59')]?this[_0x72c3('0x10')][_0x4d509b[_0x72c3('0x51')]]['type']||'inbound':'inbound';_0x4d509b[_0x72c3('0x76')]=moment()[_0x72c3('0x56')](_0x72c3('0x77'));_0x4d509b['position']=_0x4d34d1[_0x72c3('0x78')];_0x4d509b['count']=_0x4d34d1[_0x72c3('0x79')];_0x4d509b['uniqueid']=_0x4d34d1[_0x72c3('0x4f')];_0x4d509b[_0x72c3('0x7a')]=this[_0x72c3('0x3b')][_0x4d34d1[_0x72c3('0x4f')]][_0x72c3('0x7a')];logger[_0x72c3('0x7b')](_0x72c3('0x7c'),_0x4d509b[_0x72c3('0x51')],_0x4d509b[_0x72c3('0x59')]);Object[_0x72c3('0x6c')](_0x4d509b,_[_0x72c3('0x7d')](_0x4d34d1,_[_0x72c3('0x7e')](_0x4d509b)));this[_0x72c3('0x45')][_0x4d34d1[_0x72c3('0x4f')]][_0x72c3('0x70')](_0x4d509b);this['channels'][_0x4d34d1[_0x72c3('0x4f')]]=_0x4d509b;this[_0x72c3('0x4c')](_0x4d509b,_0x72c3('0x7f'));}}catch(_0x157198){logger[_0x72c3('0x42')]('[%s][voiceQueueReport][queuecallerjoin]',_0x4d34d1['uniqueid'],util['inspect'](_0x157198,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype']['syncQueueCallerAbandon']=function(_0x17effa){try{if(this['isNotNull'](_0x17effa)){logger[_0x72c3('0x4d')](_0x72c3('0x80'),_0x17effa[_0x72c3('0x4f')],util[_0x72c3('0x44')](_0x17effa,{'showHidden':![],'depth':null}));if(this[_0x72c3('0x45')][_0x17effa['uniqueid']]){var _0x48cbd3=_[_0x72c3('0x81')](this[_0x72c3('0x45')][_0x17effa[_0x72c3('0x4f')]]);_0x48cbd3[_0x72c3('0x39')]=![];_0x48cbd3[_0x72c3('0x82')]=null;_0x48cbd3[_0x72c3('0x83')]=_0x17effa[_0x72c3('0x83')];_0x48cbd3['originalposition']=_0x17effa[_0x72c3('0x84')];_0x48cbd3[_0x72c3('0x1e')]=!![];_0x48cbd3[_0x72c3('0x85')]=moment()[_0x72c3('0x56')](_0x72c3('0x77'));_0x48cbd3[_0x72c3('0x54')]='ABANDONED';_0x48cbd3['lastAssignedTo']=null;logger[_0x72c3('0x7b')](_0x72c3('0x86'),_0x48cbd3['queue'],_0x48cbd3[_0x72c3('0x59')]);this[_0x72c3('0x3b')][_0x17effa[_0x72c3('0x4f')]]=_0x48cbd3;this[_0x72c3('0x53')](_0x48cbd3,_0x72c3('0x1e'));}}}catch(_0x448210){logger[_0x72c3('0x42')]('[%s][voiceQueueReport][queuecallerabandon]',_0x17effa['uniqueid'],util[_0x72c3('0x44')](_0x448210,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0x21')]=function(_0x1615da){try{if(this[_0x72c3('0x71')](_0x1615da)){logger[_0x72c3('0x4d')](_0x72c3('0x87'),_0x1615da['uniqueid'],util[_0x72c3('0x44')](_0x1615da,{'showHidden':![],'depth':null}));if(this[_0x72c3('0x45')][_0x1615da[_0x72c3('0x4f')]]){var _0x665000=_[_0x72c3('0x81')](this[_0x72c3('0x45')][_0x1615da[_0x72c3('0x4f')]]);_0x665000[_0x72c3('0x88')]=moment()['format'](_0x72c3('0x77'));_0x665000[_0x72c3('0x89')]=_0x1615da[_0x72c3('0x89')];_0x665000['connectedlinename']=_0x1615da[_0x72c3('0x8a')];logger['info'](_0x72c3('0x8b'),_0x665000[_0x72c3('0x51')],_0x665000['type'],_0x1615da[_0x72c3('0x89')],_0x1615da[_0x72c3('0x8a')]);this[_0x72c3('0x3b')][_0x1615da['uniqueid']]=_0x665000;this[_0x72c3('0x4c')](_0x665000,_0x72c3('0x20'));}}}catch(_0x534956){logger[_0x72c3('0x42')](_0x72c3('0x87'),_0x1615da['uniqueid'],util['inspect'](_0x534956,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x72c3('0x25')]=function(_0x2576d2){try{if(this[_0x72c3('0x71')](_0x2576d2)){logger[_0x72c3('0x4d')](_0x72c3('0x8c'),_0x2576d2[_0x72c3('0x4f')],util[_0x72c3('0x44')](_0x2576d2,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x2576d2[_0x72c3('0x4f')]]){var _0x369edc=_['last'](this[_0x72c3('0x45')][_0x2576d2[_0x72c3('0x4f')]]);_0x369edc[_0x72c3('0x39')]=!![];_0x369edc[_0x72c3('0x54')]=_0x72c3('0x8d');logger['info']('[voiceQueueReport][agentconnect]\x20name:%s\x20type:%s\x20queuecallerexitreason:COMPLETEDBYAGENT',_0x369edc[_0x72c3('0x51')],_0x369edc[_0x72c3('0x59')]);}}}catch(_0x1ab0a8){logger['error'](_0x72c3('0x8c'),_0x2576d2[_0x72c3('0x4f')],util[_0x72c3('0x44')](_0x1ab0a8,{'showHidden':![],'depth':null}));}};VoiceQueueReport['prototype'][_0x72c3('0x23')]=function(_0x1eac17){try{if(this[_0x72c3('0x71')](_0x1eac17)){logger[_0x72c3('0x4d')]('[%s][voiceQueueReport][agentcomplete]',_0x1eac17[_0x72c3('0x4f')],util[_0x72c3('0x44')](_0x1eac17,{'showHidden':![],'depth':null}));if(this[_0x72c3('0x45')][_0x1eac17['uniqueid']]){var _0x5d8062=_[_0x72c3('0x81')](this['queueReports'][_0x1eac17['uniqueid']]);_0x5d8062[_0x72c3('0x1e')]=![];_0x5d8062[_0x72c3('0x85')]=null;_0x5d8062[_0x72c3('0x8e')]=!![];_0x5d8062[_0x72c3('0x8f')]=_0x1eac17['membername'];_0x5d8062[_0x72c3('0x83')]=_0x1eac17[_0x72c3('0x83')];_0x5d8062[_0x72c3('0x39')]=!![];_0x5d8062[_0x72c3('0x38')]=![];_0x5d8062[_0x72c3('0x90')]=null;if(!_0x5d8062[_0x72c3('0x91')]){if(_0x1eac17['reason']==_0x72c3('0x91')){_0x5d8062['queuecallerexitreason']=_0x72c3('0x92');logger[_0x72c3('0x7b')](_0x72c3('0x93'),_0x5d8062[_0x72c3('0x51')],_0x5d8062[_0x72c3('0x59')]);}else{if(_['startsWith'](_0x1eac17[_0x72c3('0x94')]['toLowerCase'](),'local/')){if(this['queueReports'][_0x1eac17['linkedid']]){var _0x2de7a9=_['last'](this[_0x72c3('0x45')][_0x1eac17[_0x72c3('0x95')]]);_0x2de7a9['queuecallercomplete']=![];_0x2de7a9[_0x72c3('0x38')]=!![];_0x2de7a9[_0x72c3('0x90')]=moment(_0x5d8062['queuecallerjoinAt'])[_0x72c3('0x96')](_0x1eac17[_0x72c3('0x83')],_0x72c3('0x97'))[_0x72c3('0x56')](_0x72c3('0x77'));_0x2de7a9['queuecallerexitreason']=_0x72c3('0x98');_0x2de7a9['transfer']=!![];_0x2de7a9[_0x72c3('0x99')]=_0x72c3('0x9a');_0x2de7a9[_0x72c3('0x9b')]=_0x1eac17['destexten'];_0x2de7a9[_0x72c3('0x9c')]=_0x1eac17[_0x72c3('0x4f')];logger[_0x72c3('0x7b')]('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:FORWARDTRANSFER',_0x2de7a9[_0x72c3('0x51')],_0x2de7a9[_0x72c3('0x59')]);var _0x25c013=this[_0x72c3('0x45')][_0x1eac17[_0x72c3('0x95')]];this[_0x72c3('0x45')][_0x1eac17[_0x72c3('0x95')]]=this[_0x72c3('0x45')][_0x1eac17['uniqueid']];this[_0x72c3('0x45')][_0x1eac17[_0x72c3('0x4f')]]=_0x25c013;}}else{_0x5d8062[_0x72c3('0x54')]=_0x72c3('0x9d')+_0x1eac17[_0x72c3('0x9e')][_0x72c3('0x9f')]();logger[_0x72c3('0x7b')]('[voiceQueueReport][agentcomplete]\x20name:%s\x20type:%s\x20queuecallerexitreason:%s',_0x5d8062[_0x72c3('0x51')],_0x5d8062['type'],_0x5d8062[_0x72c3('0x54')]);}}}this['channels'][_0x1eac17['uniqueid']]=_0x5d8062;}}}catch(_0x30fd15){logger[_0x72c3('0x42')]('[%s][voiceQueueReport][agentcomplete]',_0x1eac17[_0x72c3('0x4f')],util[_0x72c3('0x44')](_0x30fd15,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x72c3('0xb')]['syncVarSet']=function(_0x570a95){try{if(this[_0x72c3('0x71')](_0x570a95)){logger[_0x72c3('0x4d')](_0x72c3('0xa0'),_0x570a95[_0x72c3('0x4f')],util[_0x72c3('0x44')](_0x570a95,{'showHidden':![],'depth':null}));this['addVariable'](_0x570a95[_0x72c3('0x4f')],_[_0x72c3('0x7e')](_0x570a95['variable'])[0x0],_0x570a95[_0x72c3('0xa1')]);if(this[_0x72c3('0x45')][_0x570a95[_0x72c3('0x4f')]]){var _0x401e0b=_[_0x72c3('0x81')](this['queueReports'][_0x570a95[_0x72c3('0x4f')]]);if(_0x401e0b){if(this['isNotNull'](_0x570a95[_0x72c3('0xa2')])&&this[_0x72c3('0x71')](_0x570a95['variable']['queuestatus'])){switch(_0x570a95[_0x72c3('0xa1')]){case _0x72c3('0xa3'):_0x401e0b[_0x72c3('0x38')]=![];_0x401e0b[_0x72c3('0x90')]=null;break;case _0x72c3('0xa4'):_0x401e0b[_0x72c3('0xa5')]=_0x72c3('0xa6');_0x401e0b[_0x72c3('0x38')]=!![];_0x401e0b[_0x72c3('0x90')]=moment()[_0x72c3('0x56')]('YYYY-MM-DD\x20HH:mm:ss');_0x401e0b['queuecallerleaveAt']=moment()[_0x72c3('0x56')](_0x72c3('0x77'));logger['debug']('[%s][voiceQueueReport][varset]\x20sending\x20timeout\x20event:',_0x570a95[_0x72c3('0x4f')],util[_0x72c3('0x44')](_0x401e0b,{'showHidden':![],'depth':null}));ami[_0x72c3('0x4b')](_0x72c3('0xa7'),_0x401e0b);break;default:_0x401e0b[_0x72c3('0x38')]=!![];_0x401e0b[_0x72c3('0x90')]=moment()[_0x72c3('0x56')](_0x72c3('0x77'));_0x401e0b[_0x72c3('0x88')]=moment()['format'](_0x72c3('0x77'));}_0x401e0b[_0x72c3('0x1e')]=![];_0x401e0b[_0x72c3('0x85')]=null;_0x401e0b[_0x72c3('0x54')]=_0x570a95[_0x72c3('0xa1')];this[_0x72c3('0x3b')][_0x570a95[_0x72c3('0x4f')]]=_0x401e0b;this[_0x72c3('0x53')](_0x401e0b,_0x72c3('0x26'));}else if(this['isNotNull'](_0x570a95[_0x72c3('0xa2')])&&this['isNotNull'](_0x570a95[_0x72c3('0xa2')][_0x72c3('0xa8')])){if(!_0x401e0b[_0x72c3('0x1e')]){_0x401e0b[_0x72c3('0x38')]=!![];_0x401e0b[_0x72c3('0x90')]=moment()[_0x72c3('0x56')](_0x72c3('0x77'));_0x401e0b['queuecallerexitreason']=_0x72c3('0xa9');_0x401e0b[_0x72c3('0x88')]=moment()[_0x72c3('0x56')](_0x72c3('0x77'));this[_0x72c3('0x3b')][_0x570a95[_0x72c3('0x4f')]]=_0x401e0b;}}logger[_0x72c3('0x7b')](_0x72c3('0xaa'),_0x570a95[_0x72c3('0x4f')],_0x401e0b['queue'],_0x401e0b[_0x72c3('0x59')],_[_0x72c3('0x7e')](_0x570a95['variable'])[0x0],_0x570a95['value']);_0x401e0b[_0x72c3('0x13')]=this[_0x72c3('0x13')][_0x570a95['uniqueid']];}}}}catch(_0x3299aa){logger[_0x72c3('0x42')](_0x72c3('0xa0'),_0x570a95[_0x72c3('0x4f')],util['inspect'](_0x3299aa,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0xab')]=function(_0x3c1741,_0x3f06bc,_0xed008b){var _0x3fd607=[_0x72c3('0xac'),_0x72c3('0xad'),_0x72c3('0xae'),'rtpaudioqosjitterbridged',_0x72c3('0xaf'),_0x72c3('0xb0'),_0x72c3('0xb1'),_0x72c3('0xb2'),_0x72c3('0xb3'),_0x72c3('0xb4'),_0x72c3('0xb5'),_0x72c3('0xb6'),'membercalls',_0x72c3('0xb7'),_0x72c3('0xb8'),_0x72c3('0xb9'),_0x72c3('0xba'),_0x72c3('0xbb'),_0x72c3('0xbc')];if(!_[_0x72c3('0xbd')](_0x3f06bc)&&!_[_0x72c3('0xbe')](_0x3fd607,_0x3f06bc)){if(_[_0x72c3('0x5e')](this[_0x72c3('0x13')][_0x3c1741])){this[_0x72c3('0x13')][_0x3c1741]={};}this[_0x72c3('0x13')][_0x3c1741][_0x3f06bc]=_0xed008b;}};VoiceQueueReport[_0x72c3('0xb')]['handleHangup']=function(_0x4e67b3,_0x335537,_0x5992e3){try{var _0x382511={};if(this[_0x72c3('0x45')][_0x4e67b3]){for(var _0x1deee0=0x0;_0x1deee0<this[_0x72c3('0x45')][_0x4e67b3][_0x72c3('0xbf')];_0x1deee0+=0x1){_0x382511=this['queueReports'][_0x4e67b3][_0x1deee0];var _0x2177bd=this['voiceQueues'][_0x382511[_0x72c3('0x51')]];if(_0x2177bd){_0x2177bd['sumHoldTime']+=moment(_0x382511[_0x72c3('0x88')])[_0x72c3('0xc0')](_0x382511['queuecallerjoinAt'],'seconds')||0x0;if(_0x5992e3&&_0x382511[_0x72c3('0x54')]==='ATTENDEDTRANSFER'){_0x382511[_0x72c3('0x54')]=_0x72c3('0x8d');}if(_0x1deee0===this[_0x72c3('0x45')][_0x4e67b3][_0x72c3('0xbf')]-0x1){_0x2177bd['sumDuration']+=moment()[_0x72c3('0xc1')](0x0)['diff'](_0x382511[_0x72c3('0x76')],'seconds');if(hasCallerLeftTheQueue(_0x382511)&&_0x382511['queuecallerexitreason']!==_0x72c3('0x55')){_0x2177bd['total']+=0x1;}if(_0x382511['queuecallercomplete']){_0x2177bd[_0x72c3('0xc2')]+=0x1;_0x2177bd[_0x72c3('0xc3')]+=moment()['milliseconds'](0x0)['diff'](_0x382511[_0x72c3('0x88')],_0x72c3('0x97'));_0x382511[_0x72c3('0x82')]=moment()[_0x72c3('0x56')]('YYYY-MM-DD\x20HH:mm:ss');_0x382511[_0x72c3('0x38')]=![];_0x382511[_0x72c3('0x90')]=null;}if(_0x382511['queuecallerexit']&&_0x382511[_0x72c3('0x91')]!=!![]){_0x2177bd['unmanaged']+=0x1;_0x382511[_0x72c3('0xa5')]=_0x72c3('0xc4');logger['debug'](_0x72c3('0xc5'),_0x4e67b3,util['inspect'](_0x382511,{'showHidden':![],'depth':null}));ami[_0x72c3('0x4b')](_0x72c3('0xc6'),_0x382511);}if(_0x382511[_0x72c3('0x1e')]){_0x2177bd[_0x72c3('0xc7')]+=0x1;_0x382511[_0x72c3('0xa5')]='abandoned';logger[_0x72c3('0x4d')]('[%s][voiceQueueReport][hangup]\x20sending\x20queuecallerabandon\x20event:',_0x4e67b3,util[_0x72c3('0x44')](_0x382511,{'showHidden':![],'depth':null}));ami[_0x72c3('0x4b')]('custom:queuecallerabandon',_0x382511);}}else{_0x2177bd[_0x72c3('0xc8')]+=_0x2177bd[_0x72c3('0xc9')];}logger[_0x72c3('0x7b')](_0x72c3('0xca'),_0x4e67b3,_0x382511[_0x72c3('0x51')],_0x382511[_0x72c3('0x59')],_0x335537);this[_0x72c3('0x3b')][_0x4e67b3]=_0x382511;Object[_0x72c3('0x6c')](this[_0x72c3('0x10')][_0x382511[_0x72c3('0x51')]],_0x2177bd);if(_0x382511['queuecallerleaveAt']){this[_0x72c3('0x53')](_0x382511,_0x72c3('0x27'));}}}logger[_0x72c3('0x4d')](_0x72c3('0xcb'),_0x4e67b3,util[_0x72c3('0x44')](this[_0x72c3('0x45')][_0x4e67b3],{'showHidden':![],'depth':null}));if(hasCallerLeftTheQueue(_0x382511)&&_0x382511[_0x72c3('0x54')]!=='ATTENDEDTRANSFER'){ami[_0x72c3('0x4b')]('custom:voiceQueueReport',this['queueReports'][_0x4e67b3]);if(this[_0x72c3('0x45')][_0x4e67b3]){delete this[_0x72c3('0x45')][_0x4e67b3];}if(this[_0x72c3('0x3b')][_0x4e67b3]){delete this['channels'][_0x4e67b3];}if(this[_0x72c3('0x13')][_0x4e67b3]){delete this[_0x72c3('0x13')][_0x4e67b3];}}}}catch(_0xc464fa){logger[_0x72c3('0x42')]('[%s][voiceQueueReport][handleHangup]',_0x4e67b3,util[_0x72c3('0x44')](_0xc464fa,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0xcc')]=function(_0x5deb00){try{if(this[_0x72c3('0x71')](_0x5deb00)){logger[_0x72c3('0x4d')](_0x72c3('0xcd'),_0x5deb00[_0x72c3('0x4f')],util[_0x72c3('0x44')](_0x5deb00,{'showHidden':![],'depth':null}));if(this[_0x72c3('0x45')][_0x5deb00[_0x72c3('0x4f')]]){return this[_0x72c3('0xce')](_0x5deb00['uniqueid'],_0x5deb00[_0x72c3('0xcf')],![]);}if(this[_0x72c3('0x45')][_0x5deb00[_0x72c3('0x95')]]){if(_0x5deb00[_0x72c3('0xd0')]==='21'){return;}return this[_0x72c3('0xce')](_0x5deb00[_0x72c3('0x95')],_0x5deb00[_0x72c3('0xcf')],!![]);}var _0x81e905=Object['keys'](this[_0x72c3('0x45')]);for(var _0x1fbcc9=0x0;_0x1fbcc9<_0x81e905[_0x72c3('0xbf')];_0x1fbcc9++){var _0x4e0dea=_['last'](this['queueReports'][_0x81e905[_0x1fbcc9]]);if(_0x4e0dea&&_0x4e0dea[_0x72c3('0xd1')]===_0x5deb00[_0x72c3('0x4f')]){return this[_0x72c3('0xce')](_0x4e0dea[_0x72c3('0x4f')],_0x5deb00[_0x72c3('0xcf')],!![]);}}if(!this[_0x72c3('0x45')][_0x5deb00[_0x72c3('0x4f')]]){logger['debug'](_0x72c3('0xd2'),_0x5deb00['uniqueid']);if(this[_0x72c3('0x3b')][_0x5deb00[_0x72c3('0x4f')]]){delete this['channels'][_0x5deb00[_0x72c3('0x4f')]];}if(this['variables'][_0x5deb00[_0x72c3('0x4f')]]){delete this[_0x72c3('0x13')][_0x5deb00[_0x72c3('0x4f')]];}}}}catch(_0x46176b){logger[_0x72c3('0x42')](_0x72c3('0xcd'),_0x5deb00['uniqueid'],util[_0x72c3('0x44')](_0x46176b,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0x2e')]=function(_0x112778){try{if(this['isNotNull'](_0x112778)){logger[_0x72c3('0x4d')]('[%s][voiceQueueReport][attendedtransfer]',_0x112778[_0x72c3('0x4f')],util['inspect'](_0x112778,{'showHidden':![],'depth':null}));var _0x3dc80e;var _0x5a040d;var _0x116271;if(this[_0x72c3('0x45')][_0x112778['transfereeuniqueid']]){_0x3dc80e=_['last'](this[_0x72c3('0x45')][_0x112778[_0x72c3('0xd3')]]);_0x3dc80e[_0x72c3('0x9b')]=_0x112778[_0x72c3('0xd4')];_0x3dc80e[_0x72c3('0x9c')]=_0x112778['secondtransfereruniqueid'];_0x3dc80e[_0x72c3('0x54')]=_0x72c3('0x55');_0x3dc80e[_0x72c3('0x91')]=!![];_0x3dc80e[_0x72c3('0x99')]=_0x72c3('0xd5');if(this['queueReports'][_0x112778[_0x72c3('0xd6')]]){_0x116271=this[_0x72c3('0x45')][_0x112778[_0x72c3('0xd6')]];this[_0x72c3('0x45')][_0x112778[_0x72c3('0xd6')]]=this['queueReports'][_0x112778[_0x72c3('0xd3')]];this['queueReports'][_0x112778[_0x72c3('0xd3')]]=_0x116271;_0x5a040d=_['last'](this[_0x72c3('0x45')][_0x112778[_0x72c3('0xd3')]]);_0x5a040d['switch']=!![];}logger[_0x72c3('0x7b')](_0x72c3('0xd7'),_0x112778[_0x72c3('0x4f')],_0x3dc80e[_0x72c3('0x51')],_0x3dc80e[_0x72c3('0x59')],_0x3dc80e[_0x72c3('0x9b')],_0x3dc80e['transferuniqueid']);}else if(this[_0x72c3('0x45')][_0x112778[_0x72c3('0xd8')]]){_0x3dc80e=_[_0x72c3('0x81')](this['queueReports'][_0x112778['transfertargetuniqueid']]);_0x3dc80e['transferexten']=_0x112778[_0x72c3('0xd9')];_0x3dc80e[_0x72c3('0x9c')]=_0x112778[_0x72c3('0xda')];_0x3dc80e[_0x72c3('0x54')]=_0x72c3('0x55');_0x3dc80e[_0x72c3('0x91')]=!![];_0x3dc80e[_0x72c3('0x99')]=_0x72c3('0xd5');if(this[_0x72c3('0x45')][_0x112778[_0x72c3('0xda')]]){_0x116271=this[_0x72c3('0x45')][_0x112778[_0x72c3('0xda')]];this[_0x72c3('0x45')][_0x112778[_0x72c3('0xda')]]=this[_0x72c3('0x45')][_0x112778['transfertargetuniqueid']];this[_0x72c3('0x45')][_0x112778['transfertargetuniqueid']]=_0x116271;_0x5a040d=_['last'](this[_0x72c3('0x45')][_0x112778[_0x72c3('0xd8')]]);_0x5a040d['switch']=!![];}logger[_0x72c3('0x7b')](_0x72c3('0xd7'),_0x112778[_0x72c3('0x4f')],_0x3dc80e['queue'],_0x3dc80e[_0x72c3('0x59')],_0x3dc80e[_0x72c3('0x9b')],_0x3dc80e[_0x72c3('0x9c')]);}else if(this[_0x72c3('0x45')][_0x112778[_0x72c3('0xda')]]){_0x3dc80e=_[_0x72c3('0x81')](this['queueReports'][_0x112778[_0x72c3('0xda')]]);_0x3dc80e[_0x72c3('0x9b')]=_0x112778[_0x72c3('0xd9')];_0x3dc80e[_0x72c3('0x9c')]=_0x112778[_0x72c3('0xda')];_0x3dc80e[_0x72c3('0x54')]=_0x72c3('0x55');_0x3dc80e[_0x72c3('0x91')]=!![];_0x3dc80e[_0x72c3('0x99')]=_0x72c3('0xd5');_0x3dc80e[_0x72c3('0x3c')]=!![];_0x3dc80e[_0x72c3('0xd1')]=_0x112778['transfereeuniqueid'];}else if(this[_0x72c3('0x45')][_0x112778[_0x72c3('0xd6')]]){_0x3dc80e=_['last'](this[_0x72c3('0x45')][_0x112778['secondtransfereruniqueid']]);_0x3dc80e[_0x72c3('0x9b')]=_0x112778[_0x72c3('0xd4')];_0x3dc80e[_0x72c3('0x9c')]=_0x112778[_0x72c3('0xd6')];_0x3dc80e[_0x72c3('0x54')]=_0x72c3('0x55');_0x3dc80e[_0x72c3('0x91')]=!![];_0x3dc80e[_0x72c3('0x99')]=_0x72c3('0xd5');_0x3dc80e[_0x72c3('0x3c')]=!![];_0x3dc80e[_0x72c3('0xd1')]=_0x112778['transfertargetuniqueid'];}}}catch(_0x42d3fe){logger[_0x72c3('0x42')](_0x72c3('0xdb'),_0x112778[_0x72c3('0x4f')],util[_0x72c3('0x44')](_0x42d3fe,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0xdc')]=function(_0x1ae809){try{if(this[_0x72c3('0x71')](_0x1ae809)){logger[_0x72c3('0x4d')](_0x72c3('0xdd'),_0x1ae809[_0x72c3('0x4f')],util['inspect'](_0x1ae809,{'showHidden':![],'depth':null}));if(this[_0x72c3('0x45')][_0x1ae809[_0x72c3('0xd3')]]){var _0x1ce02b=_[_0x72c3('0x81')](this[_0x72c3('0x45')][_0x1ae809[_0x72c3('0xd3')]]);_0x1ce02b[_0x72c3('0x54')]=_0x72c3('0xde');_0x1ce02b[_0x72c3('0x91')]=!![];_0x1ce02b[_0x72c3('0x99')]='BLIND';_0x1ce02b['transferexten']=_0x1ae809[_0x72c3('0xdf')];_0x1ce02b[_0x72c3('0x9c')]=_0x1ae809[_0x72c3('0xd3')];logger[_0x72c3('0x7b')]('[%s][voiceQueueReport][blindTransfer]\x20name:%s\x20type:%s\x20transferexten:%s\x20transferuniqueid:%s',_0x1ae809['uniqueid'],_0x1ce02b['queue'],_0x1ce02b[_0x72c3('0x59')],_0x1ce02b[_0x72c3('0x9b')],_0x1ce02b[_0x72c3('0x9c')]);this['syncHangup']({'event':_0x72c3('0xe0'),'uniqueid':_0x1ae809['transfereeuniqueid'],'context':_0x1ae809[_0x72c3('0xe1')],'channel':_0x1ae809[_0x72c3('0xe2')]});}}}catch(_0x772a64){logger[_0x72c3('0x42')]('[%s][voiceQueueReport][blindtransfer]',_0x1ae809['uniqueid'],util[_0x72c3('0x44')](_0x772a64,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0x2a')]=function(_0x59da38){try{if(this[_0x72c3('0x71')](_0x59da38)){logger[_0x72c3('0x4d')](_0x72c3('0xe3'),_0x59da38['uniqueid'],util[_0x72c3('0x44')](_0x59da38,{'showHidden':![],'depth':null}));if(this['queueReports'][_0x59da38['uniqueid']]){var _0x3f862f=_[_0x72c3('0x81')](this['queueReports'][_0x59da38[_0x72c3('0x4f')]]);if(!_['isNil'](_0x3f862f['queuecallerleaveAt'])){_0x3f862f[_0x72c3('0xe4')]=moment()[_0x72c3('0x56')](_0x72c3('0x77'));logger['info'](_0x72c3('0xe5'),_0x59da38[_0x72c3('0x4f')],_0x3f862f[_0x72c3('0xe4')]);}}}}catch(_0x1d35b4){logger[_0x72c3('0x42')](_0x72c3('0xe3'),_0x59da38[_0x72c3('0x4f')],util[_0x72c3('0x44')](_0x1d35b4,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0x2c')]=function(_0x5635df){try{if(this[_0x72c3('0x71')](_0x5635df)){logger[_0x72c3('0x4d')](_0x72c3('0xe6'),_0x5635df[_0x72c3('0x4f')],util[_0x72c3('0x44')](_0x5635df,{'showHidden':![],'depth':null}));if(this[_0x72c3('0x45')][_0x5635df['uniqueid']]){var _0x51ebe9=_[_0x72c3('0x81')](this[_0x72c3('0x45')][_0x5635df[_0x72c3('0x4f')]]);if(!_['isNil'](_0x51ebe9[_0x72c3('0xe4')])){_0x51ebe9[_0x72c3('0xe7')]+=moment()[_0x72c3('0xc1')](0x0)[_0x72c3('0xc0')](_0x51ebe9['mohstarttime'],_0x72c3('0x97'));logger[_0x72c3('0x7b')](_0x72c3('0xe8'),_0x5635df[_0x72c3('0x4f')],_0x51ebe9[_0x72c3('0xe7')]);delete _0x51ebe9[_0x72c3('0xe4')];}}}}catch(_0x44c6da){logger[_0x72c3('0x42')](_0x72c3('0xe6'),_0x5635df['uniqueid'],util[_0x72c3('0x44')](_0x44c6da,{'showHidden':![],'depth':null}));}};VoiceQueueReport[_0x72c3('0xb')][_0x72c3('0xe9')]=function(_0x146488){try{if(this[_0x72c3('0x71')](_0x146488)){logger[_0x72c3('0x4d')](_0x72c3('0xea'),_0x146488[_0x72c3('0x4f')],util[_0x72c3('0x44')](_0x146488,{'showHidden':![],'depth':null}));if(_0x146488[_0x72c3('0xeb')][_0x72c3('0xec')]()===_0x72c3('0xed')){_0x146488[_0x72c3('0xee')]=_0x146488['appdata']&&_0x146488[_0x72c3('0xef')][_0x72c3('0xf0')](_0x72c3('0xf1'))?_0x146488[_0x72c3('0xef')]:(_0x146488[_0x72c3('0xef')]||_0x146488[_0x72c3('0xee')])[_0x72c3('0xec')]();if(_['startsWith'](_0x146488[_0x72c3('0xee')][_0x72c3('0xec')](),_0x72c3('0xf2'))){logger[_0x72c3('0x7b')]('[%s][voiceQueueReport][newexten]\x20application:%s\x20appdata:%s',_0x146488[_0x72c3('0x4f')],_0x146488['application'],_0x146488[_0x72c3('0xee')]);if(_[_0x72c3('0x5e')](this[_0x72c3('0x3b')][_0x146488[_0x72c3('0x4f')]]))this['channels'][_0x146488[_0x72c3('0x4f')]]={};var _0x176911=_0x146488['applicationdata']['split']('=');var _0x7b765d=_0x176911[0x0]['toLowerCase']()[_0x72c3('0xf3')](/cdr\((.*)\)/);if(_0x7b765d)this['channels'][_0x146488['uniqueid']][_0x7b765d[0x1]]=_0x176911[0x1];}}}}catch(_0x56ce8a){logger[_0x72c3('0x42')](_0x72c3('0xf4'),_0x146488[_0x72c3('0x4f')],util[_0x72c3('0x44')](_0x56ce8a,{'showHidden':![],'depth':null}));}};module[_0x72c3('0xf5')]=VoiceQueueReport;
\ No newline at end of file
index d1d39e3..5295398 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3c0a=['createHistory','campaign','queue','Request','CreateReportAgentPreview'];(function(_0x2d8451,_0x3c87ee){var _0x1e883f=function(_0x24cb3d){while(--_0x24cb3d){_0x2d8451['push'](_0x2d8451['shift']());}};_0x1e883f(++_0x3c87ee);}(_0x3c0a,0x1d1));var _0xa3c0=function(_0x2e485b,_0x37dfbf){_0x2e485b=_0x2e485b-0x0;var _0x11c030=_0x3c0a[_0x2e485b];return _0x11c030;};'use strict';var client=require('../client');exports[_0xa3c0('0x0')]=function(_0xe173d1){return function(){_0xe173d1[_0xa3c0('0x1')]=_0xe173d1[_0xa3c0('0x2')];return client[_0xa3c0('0x3')]('CreateReportAgentPreview',{'body':_0xe173d1,'log':_0xa3c0('0x4')});};};
\ No newline at end of file
+var _0x2a5f=['CreateReportAgentPreview','../client','createHistory','campaign','Request'];(function(_0x2ef321,_0x2b4f04){var _0x587841=function(_0x4a1f37){while(--_0x4a1f37){_0x2ef321['push'](_0x2ef321['shift']());}};_0x587841(++_0x2b4f04);}(_0x2a5f,0x1e1));var _0xf2a5=function(_0x39a2d6,_0x477459){_0x39a2d6=_0x39a2d6-0x0;var _0x23af66=_0x2a5f[_0x39a2d6];return _0x23af66;};'use strict';var client=require(_0xf2a5('0x0'));exports[_0xf2a5('0x1')]=function(_0x59c29e){return function(){_0x59c29e[_0xf2a5('0x2')]=_0x59c29e['queue'];return client[_0xf2a5('0x3')]('CreateReportAgentPreview',{'body':_0x59c29e,'log':_0xf2a5('0x4')});};};
\ No newline at end of file
index 33f30bf..f654920 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc20c=['CreateAttachment','../client','create','Request'];(function(_0x553e1e,_0x5bedef){var _0x3bb17b=function(_0x53ad59){while(--_0x53ad59){_0x553e1e['push'](_0x553e1e['shift']());}};_0x3bb17b(++_0x5bedef);}(_0xc20c,0x139));var _0xcc20=function(_0x383356,_0x33d2f5){_0x383356=_0x383356-0x0;var _0x32ee5a=_0xc20c[_0x383356];return _0x32ee5a;};'use strict';var client=require(_0xcc20('0x0'));exports[_0xcc20('0x1')]=function(_0x44ec67){return client[_0xcc20('0x2')](_0xcc20('0x3'),{'body':_0x44ec67,'log':_0xcc20('0x3')});};
\ No newline at end of file
+var _0xeae6=['../client','create','CreateAttachment'];(function(_0x4d7563,_0x4c3f27){var _0x44946b=function(_0x27798a){while(--_0x27798a){_0x4d7563['push'](_0x4d7563['shift']());}};_0x44946b(++_0x4c3f27);}(_0xeae6,0xc3));var _0x6eae=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xeae6[_0x321bb2];return _0x9c12ed;};'use strict';var client=require(_0x6eae('0x0'));exports[_0x6eae('0x1')]=function(_0x14067c){return client['Request']('CreateAttachment',{'body':_0x14067c,'log':_0x6eae('0x2')});};
\ No newline at end of file
index 223c655..6767379 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialNoSuchNumberMaxRetry','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineRetryFrequency','dialTimezone','dialGlobalInterval','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','dialOrderByScheduledAt','dialPrefix','dialRandomLastDigitCallerIdNumber','dialCutDigit','Trunk','callerid','active','Interval','Intervals','interval','SquareProject','../client','getCampaigns','Request','name','type','limitCalls','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialCongestionMaxRetry','dialBusyMaxRetry'];(function(_0x5ddab0,_0x21c506){var _0x1acd87=function(_0x31abc0){while(--_0x31abc0){_0x5ddab0['push'](_0x5ddab0['shift']());}};_0x1acd87(++_0x21c506);}(_0x7a54,0x106));var _0x47a5=function(_0x2089ea,_0xdf1edf){_0x2089ea=_0x2089ea-0x0;var _0x1a80fe=_0x7a54[_0x2089ea];return _0x1a80fe;};'use strict';var client=require(_0x47a5('0x0'));exports[_0x47a5('0x1')]=function(){return function(){return client[_0x47a5('0x2')]('GetCampaign',{'options':{'raw':![],'attributes':['id',_0x47a5('0x3'),_0x47a5('0x4'),'active',_0x47a5('0x5'),_0x47a5('0x6'),_0x47a5('0x7'),_0x47a5('0x8'),_0x47a5('0x9'),'dialCongestionRetryFrequency',_0x47a5('0xa'),'dialBusyRetryFrequency',_0x47a5('0xb'),_0x47a5('0xc'),'dialGlobalMaxRetry',_0x47a5('0xd'),'dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency',_0x47a5('0xe'),_0x47a5('0xf'),'dialMachineMaxRetry',_0x47a5('0x10'),'dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency',_0x47a5('0x11'),_0x47a5('0x12'),_0x47a5('0x13'),_0x47a5('0x14'),_0x47a5('0x15'),_0x47a5('0x16'),_0x47a5('0x17'),'dialAMDMinWordLength',_0x47a5('0x18'),_0x47a5('0x19'),_0x47a5('0x1a'),_0x47a5('0x1b'),_0x47a5('0x1c'),_0x47a5('0x1d'),_0x47a5('0x1e'),_0x47a5('0x1f')],'include':[{'model':'Trunk','as':_0x47a5('0x20'),'attributes':['id',_0x47a5('0x3'),_0x47a5('0x21'),_0x47a5('0x22')]},{'model':_0x47a5('0x20'),'as':'TrunkBackup','attributes':['id','name',_0x47a5('0x21'),'active']},{'model':'Interval','as':_0x47a5('0x23'),'attributes':['id',_0x47a5('0x3')],'include':[{'model':_0x47a5('0x23'),'as':_0x47a5('0x24'),'attributes':['id',_0x47a5('0x3'),_0x47a5('0x25')]}]},{'model':_0x47a5('0x26'),'as':_0x47a5('0x26'),'attributes':['id',_0x47a5('0x3')]}]},'log':'getCampaign'});};};
\ No newline at end of file
+var _0xdb28=['dialPrefix','dialRandomLastDigitCallerIdNumber','dialCutDigit','Trunk','name','callerid','Interval','interval','SquareProject','getCampaign','../client','getCampaigns','Request','GetCampaign','type','active','limitCalls','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialCongestionMaxRetry','dialCongestionRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectRetryFrequency','dialTimezone','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','dialOrderByScheduledAt'];(function(_0x508dfa,_0x58af22){var _0x2a6e22=function(_0x523c75){while(--_0x523c75){_0x508dfa['push'](_0x508dfa['shift']());}};_0x2a6e22(++_0x58af22);}(_0xdb28,0x106));var _0x8db2=function(_0x544b9f,_0x503a54){_0x544b9f=_0x544b9f-0x0;var _0x2b22a8=_0xdb28[_0x544b9f];return _0x2b22a8;};'use strict';var client=require(_0x8db2('0x0'));exports[_0x8db2('0x1')]=function(){return function(){return client[_0x8db2('0x2')](_0x8db2('0x3'),{'options':{'raw':![],'attributes':['id','name',_0x8db2('0x4'),_0x8db2('0x5'),_0x8db2('0x6'),_0x8db2('0x7'),_0x8db2('0x8'),'dialOriginateTimeout',_0x8db2('0x9'),_0x8db2('0xa'),'dialBusyMaxRetry','dialBusyRetryFrequency',_0x8db2('0xb'),_0x8db2('0xc'),_0x8db2('0xd'),_0x8db2('0xe'),_0x8db2('0xf'),_0x8db2('0x10'),_0x8db2('0x11'),'dialAbandonedMaxRetry',_0x8db2('0x12'),_0x8db2('0x13'),_0x8db2('0x14'),'dialAgentRejectMaxRetry',_0x8db2('0x15'),_0x8db2('0x16'),'dialGlobalInterval',_0x8db2('0x17'),_0x8db2('0x18'),_0x8db2('0x19'),_0x8db2('0x1a'),_0x8db2('0x1b'),'dialAMDMinWordLength','dialAMDBetweenWordsSilence',_0x8db2('0x1c'),_0x8db2('0x1d'),_0x8db2('0x1e'),_0x8db2('0x1f'),_0x8db2('0x20'),_0x8db2('0x21'),_0x8db2('0x22')],'include':[{'model':_0x8db2('0x23'),'as':_0x8db2('0x23'),'attributes':['id',_0x8db2('0x24'),'callerid',_0x8db2('0x5')]},{'model':_0x8db2('0x23'),'as':'TrunkBackup','attributes':['id',_0x8db2('0x24'),_0x8db2('0x25'),_0x8db2('0x5')]},{'model':_0x8db2('0x26'),'as':_0x8db2('0x26'),'attributes':['id',_0x8db2('0x24')],'include':[{'model':'Interval','as':'Intervals','attributes':['id',_0x8db2('0x24'),_0x8db2('0x27')]}]},{'model':_0x8db2('0x28'),'as':_0x8db2('0x28'),'attributes':['id','name']}]},'log':_0x8db2('0x29')});};};
\ No newline at end of file
index 894346d..4637a86 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0b2b=['../client','Request','CreateCmContact','getContacts'];(function(_0x43d77c,_0x1be8c4){var _0xc8ebc7=function(_0xe7678f){while(--_0xe7678f){_0x43d77c['push'](_0x43d77c['shift']());}};_0xc8ebc7(++_0x1be8c4);}(_0x0b2b,0xb8));var _0xb0b2=function(_0x5619eb,_0x55fd6e){_0x5619eb=_0x5619eb-0x0;var _0xbf5a14=_0x0b2b[_0x5619eb];return _0xbf5a14;};'use strict';var client=require(_0xb0b2('0x0'));exports['createContact']=function(_0x351d97){return function(){return client[_0xb0b2('0x1')]('CreateCmContact',{'body':_0x351d97,'log':_0xb0b2('0x2')});};};exports[_0xb0b2('0x3')]=function(_0x442494){return function(){return client['Request']('GetCmContact',{'options':_0x442494,'log':'GetCmContact'});};};
\ No newline at end of file
+var _0x0a83=['Request','CreateCmContact','getContacts','GetCmContact','createContact'];(function(_0x15edfa,_0x44d0b8){var _0x28289a=function(_0x30ea1f){while(--_0x30ea1f){_0x15edfa['push'](_0x15edfa['shift']());}};_0x28289a(++_0x44d0b8);}(_0x0a83,0x153));var _0x30a8=function(_0x303c30,_0x16edcb){_0x303c30=_0x303c30-0x0;var _0x43161b=_0x0a83[_0x303c30];return _0x43161b;};'use strict';var client=require('../client');exports[_0x30a8('0x0')]=function(_0x28ee70){return function(){return client[_0x30a8('0x1')](_0x30a8('0x2'),{'body':_0x28ee70,'log':_0x30a8('0x2')});};};exports[_0x30a8('0x3')]=function(_0x54df7a){return function(){return client[_0x30a8('0x1')](_0x30a8('0x4'),{'options':_0x54df7a,'log':'GetCmContact'});};};
\ No newline at end of file
index f13cda7..f77ed5b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x87d3=['voicePause','db.CmHopper.UserId','resetActiveCalls','ResetActiveCalls','handlePreviewRecallNotifications','../client','moment','getContacts','Request','CmContact','getCmHopper','updateContacts','UpdateCmHopper','format','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','ContactId','VoiceQueueId','CampaignId','destroyContact','DestroyCmHopper','getContactDialer','scheduledat','ASC','GetContactDialer','getContactDialerIvr','priority','GetContactDialerIvr','moveContactManagedDialer','campaign','MoveContactManagedDialer','ListId','countReScheduled','User','Agent','name','VoiceQueue','Queue','unlockContact','getContactRecallMe','GetContactRecallMe','DESC','Contact'];(function(_0x3a99f4,_0x2a81c1){var _0xea0b42=function(_0x41f533){while(--_0x41f533){_0x3a99f4['push'](_0x3a99f4['shift']());}};_0xea0b42(++_0x2a81c1);}(_0x87d3,0x86));var _0x387d=function(_0x5b21eb,_0x540b6d){_0x5b21eb=_0x5b21eb-0x0;var _0x279c63=_0x87d3[_0x5b21eb];return _0x279c63;};'use strict';var client=require(_0x387d('0x0'));var moment=require(_0x387d('0x1'));exports[_0x387d('0x2')]=function(_0xe8799a,_0x928149){return function(){return client[_0x387d('0x3')]('GetCmHopper',{'options':{'where':{'VoiceQueueId':_0xe8799a},'include':[{'model':_0x387d('0x4'),'as':'Contact'}],'limit':_0x928149,'raw':![]},'log':_0x387d('0x5')});};};exports[_0x387d('0x6')]=function(_0x247512,_0x49d349,_0x3e0d03){return function(){return client[_0x387d('0x3')](_0x387d('0x7'),{'body':_0x247512,'options':{'where':{'VoiceQueueId':_0x49d349,'scheduledat':{'$lte':moment()[_0x387d('0x8')](_0x387d('0x9'))}},'limit':_0x3e0d03},'log':_0x387d('0x7')});};};exports[_0x387d('0xa')]=function(_0x3539e5){return client[_0x387d('0x3')](_0x387d('0x7'),{'body':_0x3539e5,'options':{'where':{'ContactId':_0x3539e5[_0x387d('0xb')],'ListId':_0x3539e5['ListId'],'VoiceQueueId':_0x3539e5[_0x387d('0xc')],'CampaignId':_0x3539e5[_0x387d('0xd')]}},'log':_0x387d('0xa')});};exports[_0x387d('0xe')]=function(_0x22fbc5,_0x297689,_0x8d0d87){return function(){return client[_0x387d('0x3')](_0x387d('0xf'),{'options':{'where':{'VoiceQueueId':_0x22fbc5,'ListId':_0x297689,'ContactId':_0x8d0d87}},'log':_0x387d('0xf')});};};exports[_0x387d('0x10')]=function(_0x207f47,_0x368694,_0xbe61c5,_0x11c3bd){return client['Request']('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x207f47,'active':![],'scheduledat':{'$lte':moment()[_0x387d('0x8')]('YYYY-MM-DD\x20HH:mm:ss')},'$or':[{'UserId':null},{'UserId':{'$in':_0x368694}}]},'order':[['priority','DESC'],[_0x387d('0x11'),_0x11c3bd],['id',_0x387d('0x12')]],'raw':!![],'limit':_0xbe61c5},'log':_0x387d('0x13')});};exports[_0x387d('0x14')]=function(_0x3cd7ce,_0x396328,_0x3bbf9f){return client[_0x387d('0x3')]('GetContactDialer',{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x3cd7ce,'active':![],'scheduledat':{'$lte':moment()[_0x387d('0x8')](_0x387d('0x9'))}},'include':[{'model':_0x387d('0x4'),'as':'Contact'}],'order':[[_0x387d('0x15'),'DESC'],[_0x387d('0x11'),_0x3bbf9f],['id','ASC']],'raw':!![],'limit':_0x396328},'log':_0x387d('0x16')});};exports[_0x387d('0x17')]=function(_0x2abd07,_0x37b84b){_0x2abd07[_0x387d('0x18')]=_0x2abd07['queue'];return client['Request'](_0x387d('0x19'),{'body':_0x2abd07,'options':{'where':{'ContactId':_0x2abd07[_0x387d('0xb')],'ListId':_0x2abd07[_0x387d('0x1a')],'VoiceQueueId':_0x2abd07[_0x387d('0xc')],'CampaignId':_0x2abd07[_0x387d('0xd')],'active':_0x37b84b?undefined:!![]}},'log':_0x387d('0x19')});};exports[_0x387d('0x1b')]=function(_0x2be266){return client[_0x387d('0x3')]('CountReScheduled',{'options':{'where':{'VoiceQueueId':_0x2be266['id']?_0x2be266['id']||null:null}},'log':'countReScheduled'});};exports['getContactPreview']=function(_0x463121){return function(){return client['Request']('GetCmHopperPreview',{'options':{'where':{'id':_0x463121},'include':[{'model':'CmContact','as':'Contact'},{'model':_0x387d('0x1c'),'as':_0x387d('0x1d'),'attributes':['id',_0x387d('0x1e')]},{'model':_0x387d('0x1f'),'as':_0x387d('0x20'),'attributes':['id',_0x387d('0x1e')]}],'raw':!![]},'log':_0x387d('0x5')});};};exports[_0x387d('0x21')]=function(_0x193e77,_0x270231,_0x25214f){return client[_0x387d('0x3')](_0x387d('0x7'),{'body':_0x193e77,'options':{'where':{'id':_0x270231},'limit':_0x25214f},'log':_0x387d('0x7')});};exports[_0x387d('0x22')]=function(_0x38c30a,_0x5da92e){return function(){return client[_0x387d('0x3')](_0x387d('0x23'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x38c30a,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()[_0x387d('0x8')]('YYYY-MM-DD\x20HH:mm:ss')},'UserId':{'$in':_0x5da92e}},'order':[[_0x387d('0x15'),_0x387d('0x24')],[_0x387d('0x11'),_0x387d('0x24')],['id',_0x387d('0x12')]],'include':[{'model':'CmContact','as':_0x387d('0x25')},{'model':_0x387d('0x1c'),'as':'Agent','attributes':['id','name',_0x387d('0x26')]}],'group':_0x387d('0x27'),'raw':!![]},'log':_0x387d('0x13')});};};exports[_0x387d('0x28')]=function(_0x159a41,_0x1bdcfb){return client['Request'](_0x387d('0x29'),{'body':_0x159a41,'options':_0x1bdcfb||{},'log':_0x387d('0x29')});};exports[_0x387d('0x2a')]=function(_0x4780d6,_0x383336,_0x24d7ea){return function(){return client[_0x387d('0x3')]('CmHopperHandlePreviewRecallNotifications',{'body':{'where':{'voiceQueueIds':_0x4780d6,'interval':_0x383336,'availableAgentsIds':_0x24d7ea}},'log':_0x387d('0x2a')});};};
\ No newline at end of file
+var _0x49df=['priority','GetContactDialerIvr','moveContactManagedDialer','campaign','queue','ListId','countReScheduled','GetCmHopperPreview','User','Agent','name','VoiceQueue','Queue','getCmHopper','unlockContact','getContactRecallMe','GetContactRecallMe','db.CmHopper.UserId','ResetActiveCalls','handlePreviewRecallNotifications','CmHopperHandlePreviewRecallNotifications','getContacts','Request','GetCmHopper','CmContact','Contact','updateContacts','UpdateCmHopper','YYYY-MM-DD\x20HH:mm:ss','rescheduleContact','VoiceQueueId','CampaignId','getContactDialer','GetContactDialer','format','DESC','scheduledat','ASC'];(function(_0xb5687c,_0x16d21a){var _0x27b4f3=function(_0x751f55){while(--_0x751f55){_0xb5687c['push'](_0xb5687c['shift']());}};_0x27b4f3(++_0x16d21a);}(_0x49df,0xad));var _0xf49d=function(_0x4eff95,_0x329594){_0x4eff95=_0x4eff95-0x0;var _0xf1d5df=_0x49df[_0x4eff95];return _0xf1d5df;};'use strict';var client=require('../client');var moment=require('moment');exports[_0xf49d('0x0')]=function(_0x24d376,_0x4e297){return function(){return client[_0xf49d('0x1')](_0xf49d('0x2'),{'options':{'where':{'VoiceQueueId':_0x24d376},'include':[{'model':_0xf49d('0x3'),'as':_0xf49d('0x4')}],'limit':_0x4e297,'raw':![]},'log':'getCmHopper'});};};exports[_0xf49d('0x5')]=function(_0x3d0e09,_0x325c19,_0xca1090){return function(){return client[_0xf49d('0x1')](_0xf49d('0x6'),{'body':_0x3d0e09,'options':{'where':{'VoiceQueueId':_0x325c19,'scheduledat':{'$lte':moment()['format'](_0xf49d('0x7'))}},'limit':_0xca1090},'log':_0xf49d('0x6')});};};exports[_0xf49d('0x8')]=function(_0x54dfc9){return client['Request'](_0xf49d('0x6'),{'body':_0x54dfc9,'options':{'where':{'ContactId':_0x54dfc9['ContactId'],'ListId':_0x54dfc9['ListId'],'VoiceQueueId':_0x54dfc9[_0xf49d('0x9')],'CampaignId':_0x54dfc9[_0xf49d('0xa')]}},'log':_0xf49d('0x8')});};exports['destroyContact']=function(_0x1d07b9,_0x378a6d,_0x5192df){return function(){return client[_0xf49d('0x1')]('DestroyCmHopper',{'options':{'where':{'VoiceQueueId':_0x1d07b9,'ListId':_0x378a6d,'ContactId':_0x5192df}},'log':'DestroyCmHopper'});};};exports[_0xf49d('0xb')]=function(_0x488f64,_0x2a9041,_0x26be7f,_0xe6c42b){return client['Request'](_0xf49d('0xc'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x488f64,'active':![],'scheduledat':{'$lte':moment()[_0xf49d('0xd')](_0xf49d('0x7'))},'$or':[{'UserId':null},{'UserId':{'$in':_0x2a9041}}]},'order':[['priority',_0xf49d('0xe')],[_0xf49d('0xf'),_0xe6c42b],['id',_0xf49d('0x10')]],'raw':!![],'limit':_0x26be7f},'log':_0xf49d('0xc')});};exports['getContactDialerIvr']=function(_0x2927b9,_0x290ce0,_0x349c20){return client[_0xf49d('0x1')](_0xf49d('0xc'),{'body':{'active':!![]},'options':{'where':{'CampaignId':_0x2927b9,'active':![],'scheduledat':{'$lte':moment()[_0xf49d('0xd')](_0xf49d('0x7'))}},'include':[{'model':_0xf49d('0x3'),'as':'Contact'}],'order':[[_0xf49d('0x11'),_0xf49d('0xe')],[_0xf49d('0xf'),_0x349c20],['id',_0xf49d('0x10')]],'raw':!![],'limit':_0x290ce0},'log':_0xf49d('0x12')});};exports[_0xf49d('0x13')]=function(_0x199f35,_0x3752e8){_0x199f35[_0xf49d('0x14')]=_0x199f35[_0xf49d('0x15')];return client[_0xf49d('0x1')]('MoveContactManagedDialer',{'body':_0x199f35,'options':{'where':{'ContactId':_0x199f35['ContactId'],'ListId':_0x199f35[_0xf49d('0x16')],'VoiceQueueId':_0x199f35[_0xf49d('0x9')],'CampaignId':_0x199f35['CampaignId'],'active':_0x3752e8?undefined:!![]}},'log':'MoveContactManagedDialer'});};exports[_0xf49d('0x17')]=function(_0x2ba02e){return client['Request']('CountReScheduled',{'options':{'where':{'VoiceQueueId':_0x2ba02e['id']?_0x2ba02e['id']||null:null}},'log':_0xf49d('0x17')});};exports['getContactPreview']=function(_0x402097){return function(){return client[_0xf49d('0x1')](_0xf49d('0x18'),{'options':{'where':{'id':_0x402097},'include':[{'model':_0xf49d('0x3'),'as':'Contact'},{'model':_0xf49d('0x19'),'as':_0xf49d('0x1a'),'attributes':['id',_0xf49d('0x1b')]},{'model':_0xf49d('0x1c'),'as':_0xf49d('0x1d'),'attributes':['id',_0xf49d('0x1b')]}],'raw':!![]},'log':_0xf49d('0x1e')});};};exports[_0xf49d('0x1f')]=function(_0x475b3c,_0x42e01f,_0x5dab7b){return client['Request'](_0xf49d('0x6'),{'body':_0x475b3c,'options':{'where':{'id':_0x42e01f},'limit':_0x5dab7b},'log':_0xf49d('0x6')});};exports[_0xf49d('0x20')]=function(_0x1c5cf3,_0x43e868){return function(){return client[_0xf49d('0x1')](_0xf49d('0x21'),{'body':{'active':!![]},'options':{'where':{'VoiceQueueId':_0x1c5cf3,'active':![],'recallme':!![],'scheduledat':{'$lte':moment()['format'](_0xf49d('0x7'))},'UserId':{'$in':_0x43e868}},'order':[[_0xf49d('0x11'),_0xf49d('0xe')],[_0xf49d('0xf'),_0xf49d('0xe')],['id',_0xf49d('0x10')]],'include':[{'model':_0xf49d('0x3'),'as':_0xf49d('0x4')},{'model':_0xf49d('0x19'),'as':_0xf49d('0x1a'),'attributes':['id','name','voicePause']}],'group':_0xf49d('0x22'),'raw':!![]},'log':_0xf49d('0xc')});};};exports['resetActiveCalls']=function(_0x21b2df,_0x17727e){return client[_0xf49d('0x1')]('ResetActiveCalls',{'body':_0x21b2df,'options':_0x17727e||{},'log':_0xf49d('0x23')});};exports[_0xf49d('0x24')]=function(_0x12487,_0x3ecff6,_0xb63772){return function(){return client[_0xf49d('0x1')](_0xf49d('0x25'),{'body':{'where':{'voiceQueueIds':_0x12487,'interval':_0x3ecff6,'availableAgentsIds':_0xb63772}},'log':_0xf49d('0x24')});};};
\ No newline at end of file
index 5755b40..0d3d8da 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9e7f=['../client','verifyAdditionalPhones','Request','VerifyAdditionalPhones','swapAdditionalPhones','SwapAdditionalPhones','incrementPreviewCounters','IncrementPreviewCounters'];(function(_0x17b6e3,_0x4522ed){var _0x3906f3=function(_0x430f87){while(--_0x430f87){_0x17b6e3['push'](_0x17b6e3['shift']());}};_0x3906f3(++_0x4522ed);}(_0x9e7f,0xf8));var _0xf9e7=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x9e7f[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0xf9e7('0x0'));exports[_0xf9e7('0x1')]=function(_0x712046,_0x263856,_0x23b2e4){return client[_0xf9e7('0x2')](_0xf9e7('0x3'),{'body':_0x712046,'reason':_0x263856,'entity':_0x23b2e4,'log':_0xf9e7('0x3')});};exports[_0xf9e7('0x4')]=function(_0x4b785e,_0x4ba9fb,_0x150a65){return client[_0xf9e7('0x2')]('SwapAdditionalPhones',{'body':_0x4b785e,'duration':_0x4ba9fb,'waitTime':_0x150a65,'log':_0xf9e7('0x5')});};exports[_0xf9e7('0x6')]=function(_0x5d6a48){return function(){return client[_0xf9e7('0x2')](_0xf9e7('0x7'),{'body':_0x5d6a48,'log':_0xf9e7('0x7')});};};
\ No newline at end of file
+var _0x66fa=['Request','VerifyAdditionalPhones','swapAdditionalPhones','SwapAdditionalPhones','incrementPreviewCounters','IncrementPreviewCounters','verifyAdditionalPhones'];(function(_0x10e7d0,_0x1395a7){var _0x1becca=function(_0x1a75f2){while(--_0x1a75f2){_0x10e7d0['push'](_0x10e7d0['shift']());}};_0x1becca(++_0x1395a7);}(_0x66fa,0x156));var _0xa66f=function(_0x59f62d,_0x5cb71e){_0x59f62d=_0x59f62d-0x0;var _0x1fc292=_0x66fa[_0x59f62d];return _0x1fc292;};'use strict';var client=require('../client');exports[_0xa66f('0x0')]=function(_0xe41c8c,_0x581051,_0x20632f){return client[_0xa66f('0x1')](_0xa66f('0x2'),{'body':_0xe41c8c,'reason':_0x581051,'entity':_0x20632f,'log':_0xa66f('0x2')});};exports[_0xa66f('0x3')]=function(_0x4b4afc,_0x291b91,_0x2d3d9b){return client[_0xa66f('0x1')](_0xa66f('0x4'),{'body':_0x4b4afc,'duration':_0x291b91,'waitTime':_0x2d3d9b,'log':_0xa66f('0x4')});};exports[_0xa66f('0x5')]=function(_0x1aa354){return function(){return client[_0xa66f('0x1')](_0xa66f('0x6'),{'body':_0x1aa354,'log':'IncrementPreviewCounters'});};};
\ No newline at end of file
index fb51c84..c99703c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x21b0=['../client','checkIsBlackList','Request','GetCmHopperBlack','phone','checkIsBlackListIvr','CampaignId','GetCmHopperBlackIvr'];(function(_0x28f2e6,_0x1d1fb7){var _0x2e16f6=function(_0x230ea4){while(--_0x230ea4){_0x28f2e6['push'](_0x28f2e6['shift']());}};_0x2e16f6(++_0x1d1fb7);}(_0x21b0,0x1c8));var _0x021b=function(_0x122ef9,_0x451d2a){_0x122ef9=_0x122ef9-0x0;var _0x42fba0=_0x21b0[_0x122ef9];return _0x42fba0;};'use strict';var client=require(_0x021b('0x0'));exports[_0x021b('0x1')]=function(_0x2121c4){return client[_0x021b('0x2')](_0x021b('0x3'),{'options':{'where':{'VoiceQueueId':_0x2121c4['VoiceQueueId'],'phone':_0x2121c4[_0x021b('0x4')]},'raw':![]},'log':_0x021b('0x3')});};exports[_0x021b('0x5')]=function(_0x132a7d){return client[_0x021b('0x2')](_0x021b('0x3'),{'options':{'where':{'CampaignId':_0x132a7d[_0x021b('0x6')],'phone':_0x132a7d['phone']},'raw':![]},'log':_0x021b('0x7')});};
\ No newline at end of file
+var _0xfbdd=['GetCmHopperBlackIvr','../client','checkIsBlackList','Request','GetCmHopperBlack','phone'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0xfbdd,0x169));var _0xdfbd=function(_0x1e74e0,_0x17a113){_0x1e74e0=_0x1e74e0-0x0;var _0x5bfb7f=_0xfbdd[_0x1e74e0];return _0x5bfb7f;};'use strict';var client=require(_0xdfbd('0x0'));exports[_0xdfbd('0x1')]=function(_0x3c4718){return client[_0xdfbd('0x2')](_0xdfbd('0x3'),{'options':{'where':{'VoiceQueueId':_0x3c4718['VoiceQueueId'],'phone':_0x3c4718['phone']},'raw':![]},'log':'GetCmHopperBlack'});};exports['checkIsBlackListIvr']=function(_0x2d1396){return client[_0xdfbd('0x2')](_0xdfbd('0x3'),{'options':{'where':{'CampaignId':_0x2d1396['CampaignId'],'phone':_0x2d1396[_0xdfbd('0x4')]},'raw':![]},'log':_0xdfbd('0x5')});};
\ No newline at end of file
index 0e4e5f4..812181c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa6ac=['CreateCmHopperFinal','../client','createContact','Request'];(function(_0x1c37f4,_0x3a9610){var _0xc0552e=function(_0x2fc63d){while(--_0x2fc63d){_0x1c37f4['push'](_0x1c37f4['shift']());}};_0xc0552e(++_0x3a9610);}(_0xa6ac,0x1b9));var _0xca6a=function(_0x356764,_0x5e4bd5){_0x356764=_0x356764-0x0;var _0x42b786=_0xa6ac[_0x356764];return _0x42b786;};'use strict';var client=require(_0xca6a('0x0'));exports[_0xca6a('0x1')]=function(_0x56294a){return function(){_0x56294a['campaign']=_0x56294a['queue'];return client[_0xca6a('0x2')](_0xca6a('0x3'),{'body':_0x56294a,'log':_0xca6a('0x3')});};};
\ No newline at end of file
+var _0x195a=['CreateCmHopperFinal','createContact','campaign'];(function(_0x55c362,_0x2e97e3){var _0x4618ee=function(_0x33bb81){while(--_0x33bb81){_0x55c362['push'](_0x55c362['shift']());}};_0x4618ee(++_0x2e97e3);}(_0x195a,0xb8));var _0xa195=function(_0x3728ab,_0x4ac9d8){_0x3728ab=_0x3728ab-0x0;var _0x481ffd=_0x195a[_0x3728ab];return _0x481ffd;};'use strict';var client=require('../client');exports[_0xa195('0x0')]=function(_0x8157e7){return function(){_0x8157e7[_0xa195('0x1')]=_0x8157e7['queue'];return client['Request'](_0xa195('0x2'),{'body':_0x8157e7,'log':'CreateCmHopperFinal'});};};
\ No newline at end of file
index 76ecacc..d6e1ad0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7d02=['format','YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory','GetVoiceQueueHopperHistory','startOf','day','getCampaignHopperHistory','GetCampaignHopperHistory','endOf','moment','createHistory','queue','Request','CreateCmHopperHistory','avgHandleTime','minutes'];(function(_0x3d259b,_0x29f950){var _0x108d50=function(_0x5b06c9){while(--_0x5b06c9){_0x3d259b['push'](_0x3d259b['shift']());}};_0x108d50(++_0x29f950);}(_0x7d02,0xd9));var _0x27d0=function(_0x58ed5c,_0x3a14cb){_0x58ed5c=_0x58ed5c-0x0;var _0x403c6c=_0x7d02[_0x58ed5c];return _0x403c6c;};'use strict';var client=require('../client');var moment=require(_0x27d0('0x0'));exports[_0x27d0('0x1')]=function(_0x4f8c03){_0x4f8c03['campaign']=_0x4f8c03[_0x27d0('0x2')];return client[_0x27d0('0x3')](_0x27d0('0x4'),{'body':_0x4f8c03,'log':_0x27d0('0x4')});};exports[_0x27d0('0x5')]=function(_0x4892d0){return client[_0x27d0('0x3')]('AvgHandleTime',{'options':{'where':{'endtime':{'$between':[moment()['subtract'](_0x4892d0,_0x27d0('0x6'))[_0x27d0('0x7')](_0x27d0('0x8')),moment()[_0x27d0('0x7')](_0x27d0('0x8'))]}},'raw':![]},'log':_0x27d0('0x9')});};exports['getVoiceQueueHopperHistory']=function(){return function(){return client[_0x27d0('0x3')](_0x27d0('0xa'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x27d0('0xb')]('day')[_0x27d0('0x7')](_0x27d0('0x8')),moment()['endOf'](_0x27d0('0xc'))[_0x27d0('0x7')](_0x27d0('0x8'))]},'campaigntype':_0x27d0('0x2')},'raw':![]},'log':_0x27d0('0xa')});};};exports[_0x27d0('0xd')]=function(){return function(){return client[_0x27d0('0x3')](_0x27d0('0xe'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x27d0('0xb')](_0x27d0('0xc'))[_0x27d0('0x7')]('YYYY-MM-DD\x20HH:mm:ss'),moment()[_0x27d0('0xf')](_0x27d0('0xc'))[_0x27d0('0x7')](_0x27d0('0x8'))]},'campaigntype':'ivr'},'raw':![]},'log':_0x27d0('0xe')});};};
\ No newline at end of file
+var _0xc12f=['GetVoiceQueueHopperHistory','getCampaignHopperHistory','ivr','GetCampaignHopperHistory','../client','moment','createHistory','campaign','Request','avgHandleTime','AvgHandleTime','subtract','minutes','format','YYYY-MM-DD\x20HH:mm:ss','GetCmHopperHistory','day','endOf','queue'];(function(_0x31c968,_0x105a67){var _0x1ed187=function(_0x5ec07a){while(--_0x5ec07a){_0x31c968['push'](_0x31c968['shift']());}};_0x1ed187(++_0x105a67);}(_0xc12f,0xe8));var _0xfc12=function(_0x367e5b,_0x5721e4){_0x367e5b=_0x367e5b-0x0;var _0x4b909e=_0xc12f[_0x367e5b];return _0x4b909e;};'use strict';var client=require(_0xfc12('0x0'));var moment=require(_0xfc12('0x1'));exports[_0xfc12('0x2')]=function(_0x379623){_0x379623[_0xfc12('0x3')]=_0x379623['queue'];return client[_0xfc12('0x4')]('CreateCmHopperHistory',{'body':_0x379623,'log':'CreateCmHopperHistory'});};exports[_0xfc12('0x5')]=function(_0x3b25ac){return client['Request'](_0xfc12('0x6'),{'options':{'where':{'endtime':{'$between':[moment()[_0xfc12('0x7')](_0x3b25ac,_0xfc12('0x8'))[_0xfc12('0x9')](_0xfc12('0xa')),moment()['format'](_0xfc12('0xa'))]}},'raw':![]},'log':_0xfc12('0xb')});};exports['getVoiceQueueHopperHistory']=function(){return function(){return client['Request']('GetVoiceQueueHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()['startOf'](_0xfc12('0xc'))[_0xfc12('0x9')](_0xfc12('0xa')),moment()[_0xfc12('0xd')](_0xfc12('0xc'))['format'](_0xfc12('0xa'))]},'campaigntype':_0xfc12('0xe')},'raw':![]},'log':_0xfc12('0xf')});};};exports[_0xfc12('0x10')]=function(){return function(){return client[_0xfc12('0x4')]('GetCampaignHopperHistory',{'options':{'where':{'createdAt':{'$between':[moment()['startOf']('day')[_0xfc12('0x9')](_0xfc12('0xa')),moment()[_0xfc12('0xd')]('day')['format'](_0xfc12('0xa'))]},'campaigntype':_0xfc12('0x11')},'raw':![]},'log':_0xfc12('0x12')});};};
\ No newline at end of file
index 7a80380..36a2b58 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8814=['notify','Request','NotifyFaxAccount','../client','GetFaxAccount','description','ecm','headerinfo','localstationid','maxrate','modem','gateway','faxdetect','tech','ListId','key','Trunk','callerid','active'];(function(_0x2384ca,_0x48cd6b){var _0x3890e8=function(_0xd7d67d){while(--_0xd7d67d){_0x2384ca['push'](_0x2384ca['shift']());}};_0x3890e8(++_0x48cd6b);}(_0x8814,0x1b8));var _0x4881=function(_0x391c55,_0x168617){_0x391c55=_0x391c55-0x0;var _0xa434e0=_0x8814[_0x391c55];return _0xa434e0;};'use strict';var client=require(_0x4881('0x0'));exports['getFaxAccounts']=function(){return function(){return client['Request'](_0x4881('0x1'),{'options':{'raw':![],'attributes':['id','name',_0x4881('0x2'),_0x4881('0x3'),_0x4881('0x4'),_0x4881('0x5'),'minrate',_0x4881('0x6'),_0x4881('0x7'),_0x4881('0x8'),_0x4881('0x9'),'t38timeout',_0x4881('0xa'),'TrunkId',_0x4881('0xb'),_0x4881('0xc')],'include':[{'model':_0x4881('0xd'),'as':_0x4881('0xd'),'attributes':['id','name',_0x4881('0xe'),_0x4881('0xf')]}]},'log':'getFaxAccount'});};};exports[_0x4881('0x10')]=function(_0x3cd6e7,_0x1431dc){return client[_0x4881('0x11')](_0x4881('0x12'),{'account':{'id':_0x3cd6e7},'body':_0x1431dc,'log':_0x4881('0x12')});};
\ No newline at end of file
+var _0x014c=['NotifyFaxAccount','getFaxAccounts','GetFaxAccount','name','description','localstationid','minrate','maxrate','modem','gateway','t38timeout','tech','ListId','Trunk','active','getFaxAccount','notify','Request'];(function(_0x235d99,_0x2ed287){var _0x177bca=function(_0x498201){while(--_0x498201){_0x235d99['push'](_0x235d99['shift']());}};_0x177bca(++_0x2ed287);}(_0x014c,0x17b));var _0xc014=function(_0x1460f6,_0x59051a){_0x1460f6=_0x1460f6-0x0;var _0x46ce94=_0x014c[_0x1460f6];return _0x46ce94;};'use strict';var client=require('../client');exports[_0xc014('0x0')]=function(){return function(){return client['Request'](_0xc014('0x1'),{'options':{'raw':![],'attributes':['id',_0xc014('0x2'),_0xc014('0x3'),'ecm','headerinfo',_0xc014('0x4'),_0xc014('0x5'),_0xc014('0x6'),_0xc014('0x7'),_0xc014('0x8'),'faxdetect',_0xc014('0x9'),_0xc014('0xa'),'TrunkId',_0xc014('0xb'),'key'],'include':[{'model':_0xc014('0xc'),'as':_0xc014('0xc'),'attributes':['id',_0xc014('0x2'),'callerid',_0xc014('0xd')]}]},'log':_0xc014('0xe')});};};exports[_0xc014('0xf')]=function(_0x41bda0,_0x554c1d){return client[_0xc014('0x10')]('NotifyFaxAccount',{'account':{'id':_0x41bda0},'body':_0x554c1d,'log':_0xc014('0x11')});};
\ No newline at end of file
index 5cc7929..56aff7c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb639=['UpdateFaxMessage','../client','update','Request'];(function(_0x26be11,_0x439a0b){var _0xad84e3=function(_0x2941b8){while(--_0x2941b8){_0x26be11['push'](_0x26be11['shift']());}};_0xad84e3(++_0x439a0b);}(_0xb639,0x185));var _0x9b63=function(_0x1e3671,_0x9ae4fc){_0x1e3671=_0x1e3671-0x0;var _0x48d5f5=_0xb639[_0x1e3671];return _0x48d5f5;};'use strict';var client=require(_0x9b63('0x0'));exports[_0x9b63('0x1')]=function(_0x2bb0af,_0x4d30ed){return client[_0x9b63('0x2')](_0x9b63('0x3'),{'body':_0x4d30ed,'options':{'where':{'AttachmentId':_0x2bb0af}},'log':'UpdateFaxMessage'});};
\ No newline at end of file
+var _0xca0d=['Request','UpdateFaxMessage','update'];(function(_0x19950b,_0x53d0d7){var _0x3c6b41=function(_0x3924ad){while(--_0x3924ad){_0x19950b['push'](_0x19950b['shift']());}};_0x3c6b41(++_0x53d0d7);}(_0xca0d,0x7d));var _0xdca0=function(_0x377230,_0x36a967){_0x377230=_0x377230-0x0;var _0x5e5b18=_0xca0d[_0x377230];return _0x5e5b18;};'use strict';var client=require('../client');exports[_0xdca0('0x0')]=function(_0x2818ee,_0x179a82){return client[_0xdca0('0x1')](_0xdca0('0x2'),{'body':_0x179a82,'options':{'where':{'AttachmentId':_0x2818ee}},'log':_0xdca0('0x2')});};
\ No newline at end of file
index b901a20..1dfecd1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x95ee=['../../client','Request','name','description','username','authType','type','DeskConfiguration','Configurations','DeskField','Variable','Descriptions','content','key','keyType','keyContent','variableName','Fields','nameField','customField','Tags'];(function(_0x504d7c,_0x449ca8){var _0x5a84f4=function(_0x1ead0f){while(--_0x1ead0f){_0x504d7c['push'](_0x504d7c['shift']());}};_0x5a84f4(++_0x449ca8);}(_0x95ee,0x1ce));var _0xe95e=function(_0xa464c9,_0x7c86d8){_0xa464c9=_0xa464c9-0x0;var _0x3d73c4=_0x95ee[_0xa464c9];return _0x3d73c4;};'use strict';var client=require(_0xe95e('0x0'));exports['getDeskAccounts']=function(){return function(_0x5d2606){return client[_0xe95e('0x1')]('GetDeskAccount',{'options':{'raw':![],'attributes':['id',_0xe95e('0x2'),_0xe95e('0x3'),_0xe95e('0x4'),'password','remoteUri',_0xe95e('0x5'),_0xe95e('0x6'),'serverUrl'],'include':[{'model':_0xe95e('0x7'),'as':_0xe95e('0x8'),'attributes':['id',_0xe95e('0x2')],'include':[{'model':_0xe95e('0x9'),'as':'Subjects','attributes':['id','type','content','variableName'],'include':[{'model':_0xe95e('0xa'),'as':_0xe95e('0xa'),'attributes':['id',_0xe95e('0x2')]}]},{'model':_0xe95e('0x9'),'as':_0xe95e('0xb'),'attributes':['id','type',_0xe95e('0xc'),_0xe95e('0xd'),_0xe95e('0xe'),_0xe95e('0xf'),_0xe95e('0x10')],'include':[{'model':_0xe95e('0xa'),'as':_0xe95e('0xa'),'attributes':['id',_0xe95e('0x2')]}]},{'model':_0xe95e('0x9'),'as':_0xe95e('0x11'),'attributes':['id',_0xe95e('0x6'),_0xe95e('0xc'),'idField',_0xe95e('0x12'),_0xe95e('0x13'),_0xe95e('0x10')],'include':[{'model':_0xe95e('0xa'),'as':_0xe95e('0xa'),'attributes':['id',_0xe95e('0x2')]}]},{'model':'Tag','as':_0xe95e('0x14'),'attributes':['id','name']}]}]},'log':'GetDeskAccount'});};};
\ No newline at end of file
+var _0x1fc9=['GetDeskAccount','name','description','username','password','remoteUri','serverUrl','Configurations','DeskField','Subjects','type','content','variableName','Variable','Descriptions','key','keyType','keyContent','Fields','idField','nameField','Tag','Tags','../../client','getDeskAccounts','Request'];(function(_0x529a20,_0x160632){var _0x37b4c3=function(_0x245a4a){while(--_0x245a4a){_0x529a20['push'](_0x529a20['shift']());}};_0x37b4c3(++_0x160632);}(_0x1fc9,0x135));var _0x91fc=function(_0x36414b,_0x49e1f1){_0x36414b=_0x36414b-0x0;var _0x1b45ed=_0x1fc9[_0x36414b];return _0x1b45ed;};'use strict';var client=require(_0x91fc('0x0'));exports[_0x91fc('0x1')]=function(){return function(_0x53039a){return client[_0x91fc('0x2')](_0x91fc('0x3'),{'options':{'raw':![],'attributes':['id',_0x91fc('0x4'),_0x91fc('0x5'),_0x91fc('0x6'),_0x91fc('0x7'),_0x91fc('0x8'),'authType','type',_0x91fc('0x9')],'include':[{'model':'DeskConfiguration','as':_0x91fc('0xa'),'attributes':['id','name'],'include':[{'model':_0x91fc('0xb'),'as':_0x91fc('0xc'),'attributes':['id',_0x91fc('0xd'),_0x91fc('0xe'),_0x91fc('0xf')],'include':[{'model':_0x91fc('0x10'),'as':_0x91fc('0x10'),'attributes':['id',_0x91fc('0x4')]}]},{'model':_0x91fc('0xb'),'as':_0x91fc('0x11'),'attributes':['id','type','content',_0x91fc('0x12'),_0x91fc('0x13'),_0x91fc('0x14'),'variableName'],'include':[{'model':_0x91fc('0x10'),'as':_0x91fc('0x10'),'attributes':['id',_0x91fc('0x4')]}]},{'model':_0x91fc('0xb'),'as':_0x91fc('0x15'),'attributes':['id',_0x91fc('0xd'),_0x91fc('0xe'),_0x91fc('0x16'),_0x91fc('0x17'),'customField',_0x91fc('0xf')],'include':[{'model':'Variable','as':_0x91fc('0x10'),'attributes':['id','name']}]},{'model':_0x91fc('0x18'),'as':_0x91fc('0x19'),'attributes':['id',_0x91fc('0x4')]}]}]},'log':_0x91fc('0x3')});};};
\ No newline at end of file
index 0f63c7c..13775a6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc584=['serverUrl','description','modernAuthentication','Dynamics365Configuration','moduleCreate','additionalSearchContact','openNewTab','Dynamics365Field','Subjects','type','content','variableName','Variable','keyType','keyContent','Fields','idField','nameField','customField','CloudProvider','data2','data5','GetDynamics365Account','getDynamics365Accounts','name','password','remoteUri','tenantId','clientSecret'];(function(_0x37f2ca,_0x54f415){var _0x41a328=function(_0x26c239){while(--_0x26c239){_0x37f2ca['push'](_0x37f2ca['shift']());}};_0x41a328(++_0x54f415);}(_0xc584,0xa8));var _0x4c58=function(_0x1d9dfa,_0x30598d){_0x1d9dfa=_0x1d9dfa-0x0;var _0x252661=_0xc584[_0x1d9dfa];return _0x252661;};'use strict';var client=require('../../client');exports[_0x4c58('0x0')]=function(){return function(_0x1d0f9e){return client['Request']('GetDynamics365Account',{'options':{'raw':![],'attributes':['id',_0x4c58('0x1'),'username',_0x4c58('0x2'),_0x4c58('0x3'),_0x4c58('0x4'),'clientId',_0x4c58('0x5'),_0x4c58('0x6'),_0x4c58('0x7'),_0x4c58('0x8')],'include':[{'model':_0x4c58('0x9'),'as':'Configurations','attributes':['id','name','ticketType',_0x4c58('0xa'),_0x4c58('0xb'),_0x4c58('0xc')],'include':[{'model':_0x4c58('0xd'),'as':_0x4c58('0xe'),'attributes':['id',_0x4c58('0xf'),_0x4c58('0x10'),_0x4c58('0x11')],'include':[{'model':_0x4c58('0x12'),'as':_0x4c58('0x12'),'attributes':['id',_0x4c58('0x1')]}]},{'model':_0x4c58('0xd'),'as':'Descriptions','attributes':['id','type',_0x4c58('0x10'),'key',_0x4c58('0x13'),_0x4c58('0x14'),_0x4c58('0x11')],'include':[{'model':_0x4c58('0x12'),'as':_0x4c58('0x12'),'attributes':['id',_0x4c58('0x1')]}]},{'model':'Dynamics365Field','as':_0x4c58('0x15'),'attributes':['id','type',_0x4c58('0x10'),_0x4c58('0x16'),_0x4c58('0x17'),_0x4c58('0x18'),_0x4c58('0x11')],'include':[{'model':_0x4c58('0x12'),'as':'Variable','attributes':['id',_0x4c58('0x1')]}]}]},{'model':_0x4c58('0x19'),'as':_0x4c58('0x19'),'attributes':['id',_0x4c58('0x1a'),_0x4c58('0x1b'),'data7']}]},'log':_0x4c58('0x1c')});};};
\ No newline at end of file
+var _0xba5a=['openNewTab','Dynamics365Field','Subjects','type','content','variableName','Variable','Descriptions','keyContent','Fields','idField','nameField','customField','CloudProvider','data5','data7','getDynamics365Accounts','Request','username','password','remoteUri','tenantId','description','Dynamics365Configuration','Configurations','name','ticketType','moduleCreate'];(function(_0x308f5f,_0x4a5f73){var _0x36abc6=function(_0x118455){while(--_0x118455){_0x308f5f['push'](_0x308f5f['shift']());}};_0x36abc6(++_0x4a5f73);}(_0xba5a,0x1d0));var _0xaba5=function(_0x1fc122,_0x5e2c17){_0x1fc122=_0x1fc122-0x0;var _0xa2cb13=_0xba5a[_0x1fc122];return _0xa2cb13;};'use strict';var client=require('../../client');exports[_0xaba5('0x0')]=function(){return function(_0x257d17){return client[_0xaba5('0x1')]('GetDynamics365Account',{'options':{'raw':![],'attributes':['id','name',_0xaba5('0x2'),_0xaba5('0x3'),_0xaba5('0x4'),_0xaba5('0x5'),'clientId','clientSecret','serverUrl',_0xaba5('0x6'),'modernAuthentication'],'include':[{'model':_0xaba5('0x7'),'as':_0xaba5('0x8'),'attributes':['id',_0xaba5('0x9'),_0xaba5('0xa'),_0xaba5('0xb'),'additionalSearchContact',_0xaba5('0xc')],'include':[{'model':_0xaba5('0xd'),'as':_0xaba5('0xe'),'attributes':['id',_0xaba5('0xf'),_0xaba5('0x10'),_0xaba5('0x11')],'include':[{'model':_0xaba5('0x12'),'as':_0xaba5('0x12'),'attributes':['id','name']}]},{'model':'Dynamics365Field','as':_0xaba5('0x13'),'attributes':['id','type',_0xaba5('0x10'),'key','keyType',_0xaba5('0x14'),_0xaba5('0x11')],'include':[{'model':_0xaba5('0x12'),'as':_0xaba5('0x12'),'attributes':['id',_0xaba5('0x9')]}]},{'model':_0xaba5('0xd'),'as':_0xaba5('0x15'),'attributes':['id','type','content',_0xaba5('0x16'),_0xaba5('0x17'),_0xaba5('0x18'),_0xaba5('0x11')],'include':[{'model':_0xaba5('0x12'),'as':'Variable','attributes':['id',_0xaba5('0x9')]}]}]},{'model':'CloudProvider','as':_0xaba5('0x19'),'attributes':['id','data2',_0xaba5('0x1a'),_0xaba5('0x1b')]}]},'log':'GetDynamics365Account'});};};
\ No newline at end of file
index 550cecb..e23a9a0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xee4f=['Fields','idField','customField','../../client','Request','GetFreshdeskAccount','name','apiKey','serverUrl','FreshdeskField','Subjects','type','Variable','content','key','keyContent','variableName'];(function(_0x5be98f,_0x291688){var _0x1f66b4=function(_0x27642d){while(--_0x27642d){_0x5be98f['push'](_0x5be98f['shift']());}};_0x1f66b4(++_0x291688);}(_0xee4f,0xad));var _0xfee4=function(_0x20e5f3,_0x19b034){_0x20e5f3=_0x20e5f3-0x0;var _0x2461b4=_0xee4f[_0x20e5f3];return _0x2461b4;};'use strict';var client=require(_0xfee4('0x0'));exports['getFreshdeskAccounts']=function(){return function(_0x56a471){return client[_0xfee4('0x1')](_0xfee4('0x2'),{'options':{'raw':![],'attributes':['id',_0xfee4('0x3'),'username',_0xfee4('0x4'),'remoteUri',_0xfee4('0x5')],'include':[{'model':'FreshdeskConfiguration','as':'Configurations','attributes':['id',_0xfee4('0x3')],'include':[{'model':'Tag','attributes':['id','name']},{'model':_0xfee4('0x6'),'as':_0xfee4('0x7'),'attributes':['id',_0xfee4('0x8'),'content','variableName'],'include':[{'model':_0xfee4('0x9'),'as':_0xfee4('0x9'),'attributes':['id',_0xfee4('0x3')]}]},{'model':'FreshdeskField','as':'Descriptions','attributes':['id',_0xfee4('0x8'),_0xfee4('0xa'),_0xfee4('0xb'),'keyType',_0xfee4('0xc'),_0xfee4('0xd')],'include':[{'model':_0xfee4('0x9'),'as':_0xfee4('0x9'),'attributes':['id',_0xfee4('0x3')]}]},{'model':_0xfee4('0x6'),'as':_0xfee4('0xe'),'attributes':['id','type',_0xfee4('0xa'),_0xfee4('0xf'),'nameField',_0xfee4('0x10'),_0xfee4('0xd')],'include':[{'model':_0xfee4('0x9'),'as':_0xfee4('0x9'),'attributes':['id',_0xfee4('0x3')]}]}]}]},'log':_0xfee4('0x2')});};};
\ No newline at end of file
+var _0x8d08=['Variable','Descriptions','type','key','keyContent','variableName','Fields','../../client','getFreshdeskAccounts','Request','GetFreshdeskAccount','name','username','apiKey','remoteUri','serverUrl','FreshdeskConfiguration','Configurations','Tag','Subjects','content'];(function(_0x5df033,_0x29458b){var _0x445829=function(_0x2c795b){while(--_0x2c795b){_0x5df033['push'](_0x5df033['shift']());}};_0x445829(++_0x29458b);}(_0x8d08,0x118));var _0x88d0=function(_0x1e05c1,_0x3cffa3){_0x1e05c1=_0x1e05c1-0x0;var _0x15f1ca=_0x8d08[_0x1e05c1];return _0x15f1ca;};'use strict';var client=require(_0x88d0('0x0'));exports[_0x88d0('0x1')]=function(){return function(_0x358fc0){return client[_0x88d0('0x2')](_0x88d0('0x3'),{'options':{'raw':![],'attributes':['id',_0x88d0('0x4'),_0x88d0('0x5'),_0x88d0('0x6'),_0x88d0('0x7'),_0x88d0('0x8')],'include':[{'model':_0x88d0('0x9'),'as':_0x88d0('0xa'),'attributes':['id','name'],'include':[{'model':_0x88d0('0xb'),'attributes':['id',_0x88d0('0x4')]},{'model':'FreshdeskField','as':_0x88d0('0xc'),'attributes':['id','type',_0x88d0('0xd'),'variableName'],'include':[{'model':_0x88d0('0xe'),'as':_0x88d0('0xe'),'attributes':['id',_0x88d0('0x4')]}]},{'model':'FreshdeskField','as':_0x88d0('0xf'),'attributes':['id',_0x88d0('0x10'),'content',_0x88d0('0x11'),'keyType',_0x88d0('0x12'),_0x88d0('0x13')],'include':[{'model':_0x88d0('0xe'),'as':'Variable','attributes':['id','name']}]},{'model':'FreshdeskField','as':_0x88d0('0x14'),'attributes':['id',_0x88d0('0x10'),_0x88d0('0xd'),'idField','nameField','customField',_0x88d0('0x13')],'include':[{'model':_0x88d0('0xe'),'as':'Variable','attributes':['id',_0x88d0('0x4')]}]}]}]},'log':_0x88d0('0x3')});};};
\ No newline at end of file
index b8faf2c..a4036d2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x187d=['key','keyType','GetFreshsalesccount','../../client','Request','GetFreshsalesAccount','name','username','apiKey','serverUrl','FreshsalesConfiguration','FreshsalesField','Subjects','type','content','variableName','Variable','Descriptions'];(function(_0x4aa4e6,_0x278c45){var _0x322588=function(_0x19279d){while(--_0x19279d){_0x4aa4e6['push'](_0x4aa4e6['shift']());}};_0x322588(++_0x278c45);}(_0x187d,0x93));var _0xd187=function(_0xbb091,_0x3fe7ee){_0xbb091=_0xbb091-0x0;var _0x467a04=_0x187d[_0xbb091];return _0x467a04;};'use strict';var client=require(_0xd187('0x0'));exports['getFreshsalesAccounts']=function(){return function(_0x3b9b6d){return client[_0xd187('0x1')](_0xd187('0x2'),{'options':{'raw':![],'attributes':['id',_0xd187('0x3'),_0xd187('0x4'),_0xd187('0x5'),'remoteUri',_0xd187('0x6')],'include':[{'model':_0xd187('0x7'),'as':'Configurations','attributes':['id',_0xd187('0x3')],'include':[{'model':_0xd187('0x8'),'as':_0xd187('0x9'),'attributes':['id',_0xd187('0xa'),_0xd187('0xb'),_0xd187('0xc')],'include':[{'model':_0xd187('0xd'),'as':_0xd187('0xd'),'attributes':['id','name']}]},{'model':_0xd187('0x8'),'as':_0xd187('0xe'),'attributes':['id',_0xd187('0xa'),_0xd187('0xb'),_0xd187('0xf'),_0xd187('0x10'),'keyContent',_0xd187('0xc')],'include':[{'model':_0xd187('0xd'),'as':_0xd187('0xd'),'attributes':['id','name']}]}]}]},'log':_0xd187('0x11')});};};
\ No newline at end of file
+var _0xd8fb=['key','keyType','name','../../client','getFreshsalesAccounts','Request','apiKey','remoteUri','FreshsalesConfiguration','Configurations','FreshsalesField','type','variableName','Variable','Descriptions'];(function(_0x590ff1,_0x214717){var _0x3c8028=function(_0x67be1c){while(--_0x67be1c){_0x590ff1['push'](_0x590ff1['shift']());}};_0x3c8028(++_0x214717);}(_0xd8fb,0x99));var _0xbd8f=function(_0x98605a,_0x3ecd52){_0x98605a=_0x98605a-0x0;var _0x5dadd4=_0xd8fb[_0x98605a];return _0x5dadd4;};'use strict';var client=require(_0xbd8f('0x0'));exports[_0xbd8f('0x1')]=function(){return function(_0x1024c1){return client[_0xbd8f('0x2')]('GetFreshsalesAccount',{'options':{'raw':![],'attributes':['id','name','username',_0xbd8f('0x3'),_0xbd8f('0x4'),'serverUrl'],'include':[{'model':_0xbd8f('0x5'),'as':_0xbd8f('0x6'),'attributes':['id','name'],'include':[{'model':_0xbd8f('0x7'),'as':'Subjects','attributes':['id',_0xbd8f('0x8'),'content',_0xbd8f('0x9')],'include':[{'model':_0xbd8f('0xa'),'as':'Variable','attributes':['id','name']}]},{'model':_0xbd8f('0x7'),'as':_0xbd8f('0xb'),'attributes':['id',_0xbd8f('0x8'),'content',_0xbd8f('0xc'),_0xbd8f('0xd'),'keyContent','variableName'],'include':[{'model':_0xbd8f('0xa'),'as':_0xbd8f('0xa'),'attributes':['id',_0xbd8f('0xe')]}]}]}]},'log':'GetFreshsalesccount'});};};
\ No newline at end of file
index 4547e67..fa2839c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x19cb=['Variable','Descriptions','Fields','getSalesforceAccounts','GetSalesforceAccount','username','clientSecret','securityToken','SalesforceConfiguration','Configurations','name','moduleSearch','leadId','additionalSearchAccount','additionalSearchContact','additionalSearchLead','SalesforceField'];(function(_0x1035c1,_0x2d8583){var _0x308d67=function(_0x58ddb6){while(--_0x58ddb6){_0x1035c1['push'](_0x1035c1['shift']());}};_0x308d67(++_0x2d8583);}(_0x19cb,0x146));var _0xb19c=function(_0x39c259,_0x2a432f){_0x39c259=_0x39c259-0x0;var _0x4d66e8=_0x19cb[_0x39c259];return _0x4d66e8;};'use strict';var client=require('../../client');exports[_0xb19c('0x0')]=function(){return function(_0x1d15d0){return client['Request'](_0xb19c('0x1'),{'options':{'raw':![],'attributes':['id','name',_0xb19c('0x2'),'password','remoteUri','clientId',_0xb19c('0x3'),_0xb19c('0x4'),'serverUrl','type'],'include':[{'model':_0xb19c('0x5'),'as':_0xb19c('0x6'),'attributes':['id',_0xb19c('0x7'),_0xb19c('0x8'),'moduleCreate','ticketType',_0xb19c('0x9'),_0xb19c('0xa'),_0xb19c('0xb'),_0xb19c('0xc')],'include':[{'model':_0xb19c('0xd'),'as':'Subjects','include':[{'model':_0xb19c('0xe'),'as':_0xb19c('0xe'),'attributes':['id',_0xb19c('0x7')]}]},{'model':_0xb19c('0xd'),'as':_0xb19c('0xf'),'include':[{'model':_0xb19c('0xe'),'as':'Variable','attributes':['id','name']}]},{'model':'SalesforceField','as':_0xb19c('0x10'),'include':[{'model':_0xb19c('0xe'),'as':_0xb19c('0xe'),'attributes':['id','name']}]}]}]},'log':_0xb19c('0x1')});};};
\ No newline at end of file
+var _0x4171=['additionalSearchLead','SalesforceField','Subjects','Variable','getSalesforceAccounts','Request','GetSalesforceAccount','name','username','password','clientId','securityToken','type','SalesforceConfiguration','Configurations','moduleCreate','additionalSearchContact'];(function(_0x288849,_0x45570b){var _0x5ad70e=function(_0x354999){while(--_0x354999){_0x288849['push'](_0x288849['shift']());}};_0x5ad70e(++_0x45570b);}(_0x4171,0x6a));var _0x1417=function(_0x20f60d,_0x31a4f2){_0x20f60d=_0x20f60d-0x0;var _0x259f35=_0x4171[_0x20f60d];return _0x259f35;};'use strict';var client=require('../../client');exports[_0x1417('0x0')]=function(){return function(_0x23b67b){return client[_0x1417('0x1')](_0x1417('0x2'),{'options':{'raw':![],'attributes':['id',_0x1417('0x3'),_0x1417('0x4'),_0x1417('0x5'),'remoteUri',_0x1417('0x6'),'clientSecret',_0x1417('0x7'),'serverUrl',_0x1417('0x8')],'include':[{'model':_0x1417('0x9'),'as':_0x1417('0xa'),'attributes':['id',_0x1417('0x3'),'moduleSearch',_0x1417('0xb'),'ticketType','leadId','additionalSearchAccount',_0x1417('0xc'),_0x1417('0xd')],'include':[{'model':_0x1417('0xe'),'as':_0x1417('0xf'),'include':[{'model':_0x1417('0x10'),'as':_0x1417('0x10'),'attributes':['id',_0x1417('0x3')]}]},{'model':_0x1417('0xe'),'as':'Descriptions','include':[{'model':'Variable','as':_0x1417('0x10'),'attributes':['id',_0x1417('0x3')]}]},{'model':_0x1417('0xe'),'as':'Fields','include':[{'model':_0x1417('0x10'),'as':_0x1417('0x10'),'attributes':['id',_0x1417('0x3')]}]}]}]},'log':'GetSalesforceAccount'});};};
\ No newline at end of file
index a6512c6..87f1fdc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x31f0=['remoteUri','Subjects','type','content','variableName','Variable','ServicenowField','Descriptions','key','keyType','Fields','idField','nameField','customField','GetServicenowkAccount','../../client','GetServicenowAccount','name','description','username','email'];(function(_0x4bcf75,_0x598df9){var _0x3b39bd=function(_0x4c8ecf){while(--_0x4c8ecf){_0x4bcf75['push'](_0x4bcf75['shift']());}};_0x3b39bd(++_0x598df9);}(_0x31f0,0xb7));var _0x031f=function(_0x49dc51,_0x4166b4){_0x49dc51=_0x49dc51-0x0;var _0xbd78e1=_0x31f0[_0x49dc51];return _0xbd78e1;};'use strict';var client=require(_0x031f('0x0'));exports['getServicenowAccounts']=function(){return function(_0xc4ca54){return client['Request'](_0x031f('0x1'),{'options':{'raw':![],'attributes':['id',_0x031f('0x2'),_0x031f('0x3'),_0x031f('0x4'),'password',_0x031f('0x5'),_0x031f('0x6'),'serverUrl'],'include':[{'model':'ServicenowConfiguration','as':'Configurations','attributes':['id',_0x031f('0x2')],'include':[{'model':'ServicenowField','as':_0x031f('0x7'),'attributes':['id',_0x031f('0x8'),_0x031f('0x9'),_0x031f('0xa')],'include':[{'model':'Variable','as':_0x031f('0xb'),'attributes':['id',_0x031f('0x2')]}]},{'model':_0x031f('0xc'),'as':_0x031f('0xd'),'attributes':['id',_0x031f('0x8'),_0x031f('0x9'),_0x031f('0xe'),_0x031f('0xf'),'keyContent',_0x031f('0xa')],'include':[{'model':_0x031f('0xb'),'as':_0x031f('0xb'),'attributes':['id',_0x031f('0x2')]}]},{'model':_0x031f('0xc'),'as':_0x031f('0x10'),'attributes':['id',_0x031f('0x8'),'content',_0x031f('0x11'),_0x031f('0x12'),_0x031f('0x13'),_0x031f('0xa')],'include':[{'model':_0x031f('0xb'),'as':'Variable','attributes':['id','name']}]}]}]},'log':_0x031f('0x14')});};};
\ No newline at end of file
+var _0x6d38=['ServicenowField','content','variableName','Variable','Descriptions','key','keyType','Fields','type','idField','nameField','GetServicenowkAccount','getServicenowAccounts','Request','description','password','email','remoteUri','ServicenowConfiguration','Configurations','name'];(function(_0x20cb20,_0x256051){var _0x2fcf4b=function(_0x26200b){while(--_0x26200b){_0x20cb20['push'](_0x20cb20['shift']());}};_0x2fcf4b(++_0x256051);}(_0x6d38,0x1ef));var _0x86d3=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0x6d38[_0x2f5ac5];return _0x37c9a8;};'use strict';var client=require('../../client');exports[_0x86d3('0x0')]=function(){return function(_0x4c9c06){return client[_0x86d3('0x1')]('GetServicenowAccount',{'options':{'raw':![],'attributes':['id','name',_0x86d3('0x2'),'username',_0x86d3('0x3'),_0x86d3('0x4'),_0x86d3('0x5'),'serverUrl'],'include':[{'model':_0x86d3('0x6'),'as':_0x86d3('0x7'),'attributes':['id',_0x86d3('0x8')],'include':[{'model':_0x86d3('0x9'),'as':'Subjects','attributes':['id','type',_0x86d3('0xa'),_0x86d3('0xb')],'include':[{'model':_0x86d3('0xc'),'as':'Variable','attributes':['id','name']}]},{'model':_0x86d3('0x9'),'as':_0x86d3('0xd'),'attributes':['id','type','content',_0x86d3('0xe'),_0x86d3('0xf'),'keyContent',_0x86d3('0xb')],'include':[{'model':'Variable','as':_0x86d3('0xc'),'attributes':['id',_0x86d3('0x8')]}]},{'model':_0x86d3('0x9'),'as':_0x86d3('0x10'),'attributes':['id',_0x86d3('0x11'),_0x86d3('0xa'),_0x86d3('0x12'),_0x86d3('0x13'),'customField',_0x86d3('0xb')],'include':[{'model':_0x86d3('0xc'),'as':_0x86d3('0xc'),'attributes':['id',_0x86d3('0x8')]}]}]}]},'log':_0x86d3('0x14')});};};
\ No newline at end of file
index 42a6f49..365f63a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0295=['remoteUri','serverUrl','SugarcrmConfiguration','Configurations','name','SugarcrmField','Subjects','Variable','Descriptions','content','key','keyType','variableName','Fields','customField','GetSugarcrmAccount','../../client','Request','username','password'];(function(_0x5e238b,_0x17ae49){var _0x389bea=function(_0x3cc1c1){while(--_0x3cc1c1){_0x5e238b['push'](_0x5e238b['shift']());}};_0x389bea(++_0x17ae49);}(_0x0295,0x1f0));var _0x5029=function(_0x4154a6,_0x2c0b8e){_0x4154a6=_0x4154a6-0x0;var _0x3b2786=_0x0295[_0x4154a6];return _0x3b2786;};'use strict';var client=require(_0x5029('0x0'));exports['getSugarcrmAccounts']=function(){return function(_0x5e71d0){return client[_0x5029('0x1')]('GetSugarcrmAccount',{'options':{'raw':![],'attributes':['id','name',_0x5029('0x2'),_0x5029('0x3'),_0x5029('0x4'),_0x5029('0x5')],'include':[{'model':_0x5029('0x6'),'as':_0x5029('0x7'),'attributes':['id',_0x5029('0x8')],'include':[{'model':_0x5029('0x9'),'as':_0x5029('0xa'),'attributes':['id','type','content','variableName'],'include':[{'model':_0x5029('0xb'),'as':'Variable','attributes':['id',_0x5029('0x8')]}]},{'model':'SugarcrmField','as':_0x5029('0xc'),'attributes':['id','type',_0x5029('0xd'),_0x5029('0xe'),_0x5029('0xf'),'keyContent',_0x5029('0x10')],'include':[{'model':_0x5029('0xb'),'as':_0x5029('0xb'),'attributes':['id','name']}]},{'model':_0x5029('0x9'),'as':_0x5029('0x11'),'attributes':['id','type','content','idField','nameField',_0x5029('0x12'),_0x5029('0x10')],'include':[{'model':_0x5029('0xb'),'as':_0x5029('0xb'),'attributes':['id',_0x5029('0x8')]}]}]}]},'log':_0x5029('0x13')});};};
\ No newline at end of file
+var _0xda2d=['Subjects','type','content','variableName','Variable','key','keyType','keyContent','idField','nameField','customField','getSugarcrmAccounts','Request','GetSugarcrmAccount','name','serverUrl','SugarcrmConfiguration','Configurations','SugarcrmField'];(function(_0x5d4876,_0x11e6b0){var _0x6927ac=function(_0x2e9a3a){while(--_0x2e9a3a){_0x5d4876['push'](_0x5d4876['shift']());}};_0x6927ac(++_0x11e6b0);}(_0xda2d,0x102));var _0xdda2=function(_0x41373d,_0x797d8){_0x41373d=_0x41373d-0x0;var _0x535169=_0xda2d[_0x41373d];return _0x535169;};'use strict';var client=require('../../client');exports[_0xdda2('0x0')]=function(){return function(_0x35f029){return client[_0xdda2('0x1')](_0xdda2('0x2'),{'options':{'raw':![],'attributes':['id',_0xdda2('0x3'),'username','password','remoteUri',_0xdda2('0x4')],'include':[{'model':_0xdda2('0x5'),'as':_0xdda2('0x6'),'attributes':['id',_0xdda2('0x3')],'include':[{'model':_0xdda2('0x7'),'as':_0xdda2('0x8'),'attributes':['id',_0xdda2('0x9'),_0xdda2('0xa'),_0xdda2('0xb')],'include':[{'model':_0xdda2('0xc'),'as':'Variable','attributes':['id',_0xdda2('0x3')]}]},{'model':_0xdda2('0x7'),'as':'Descriptions','attributes':['id',_0xdda2('0x9'),_0xdda2('0xa'),_0xdda2('0xd'),_0xdda2('0xe'),_0xdda2('0xf'),_0xdda2('0xb')],'include':[{'model':_0xdda2('0xc'),'as':_0xdda2('0xc'),'attributes':['id','name']}]},{'model':'SugarcrmField','as':'Fields','attributes':['id',_0xdda2('0x9'),_0xdda2('0xa'),_0xdda2('0x10'),_0xdda2('0x11'),_0xdda2('0x12'),_0xdda2('0xb')],'include':[{'model':_0xdda2('0xc'),'as':'Variable','attributes':['id',_0xdda2('0x3')]}]}]}]},'log':'GetSugarcrmAccount'});};};
\ No newline at end of file
index ca9561c..ad59798 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x319c=['customField','../../client','getVtigerAccounts','Request','GetVtigerAccount','name','description','username','accessKey','remoteUri','serverUrl','VtigerConfiguration','Configurations','VtigerField','Subjects','type','content','variableName','Variable','key','keyType','keyContent'];(function(_0xfae23b,_0x2be4ba){var _0x200640=function(_0x4ae258){while(--_0x4ae258){_0xfae23b['push'](_0xfae23b['shift']());}};_0x200640(++_0x2be4ba);}(_0x319c,0x85));var _0xc319=function(_0x24f31b,_0x44b8f3){_0x24f31b=_0x24f31b-0x0;var _0x488401=_0x319c[_0x24f31b];return _0x488401;};'use strict';var client=require(_0xc319('0x0'));exports[_0xc319('0x1')]=function(){return function(_0x2438cb){return client[_0xc319('0x2')](_0xc319('0x3'),{'options':{'raw':![],'attributes':['id',_0xc319('0x4'),_0xc319('0x5'),_0xc319('0x6'),_0xc319('0x7'),_0xc319('0x8'),_0xc319('0x9')],'include':[{'model':_0xc319('0xa'),'as':_0xc319('0xb'),'attributes':['id',_0xc319('0x4')],'include':[{'model':_0xc319('0xc'),'as':_0xc319('0xd'),'attributes':['id',_0xc319('0xe'),_0xc319('0xf'),_0xc319('0x10')],'include':[{'model':_0xc319('0x11'),'as':_0xc319('0x11'),'attributes':['id',_0xc319('0x4')]}]},{'model':'VtigerField','as':'Descriptions','attributes':['id',_0xc319('0xe'),'content',_0xc319('0x12'),_0xc319('0x13'),_0xc319('0x14'),'variableName'],'include':[{'model':_0xc319('0x11'),'as':'Variable','attributes':['id',_0xc319('0x4')]}]},{'model':_0xc319('0xc'),'as':'Fields','attributes':['id',_0xc319('0xe'),_0xc319('0xf'),'idField','nameField',_0xc319('0x15'),_0xc319('0x10')],'include':[{'model':_0xc319('0x11'),'as':_0xc319('0x11'),'attributes':['id',_0xc319('0x4')]}]}]}]},'log':_0xc319('0x3')});};};
\ No newline at end of file
+var _0x6d76=['idField','nameField','customField','../../client','Request','GetVtigerAccount','name','description','username','accessKey','remoteUri','serverUrl','VtigerConfiguration','Subjects','type','content','variableName','Variable','VtigerField','key','keyContent'];(function(_0x399482,_0x16075c){var _0x1b5542=function(_0x216053){while(--_0x216053){_0x399482['push'](_0x399482['shift']());}};_0x1b5542(++_0x16075c);}(_0x6d76,0x114));var _0x66d7=function(_0x11af50,_0x40895a){_0x11af50=_0x11af50-0x0;var _0x4d73a6=_0x6d76[_0x11af50];return _0x4d73a6;};'use strict';var client=require(_0x66d7('0x0'));exports['getVtigerAccounts']=function(){return function(_0x297aea){return client[_0x66d7('0x1')](_0x66d7('0x2'),{'options':{'raw':![],'attributes':['id',_0x66d7('0x3'),_0x66d7('0x4'),_0x66d7('0x5'),_0x66d7('0x6'),_0x66d7('0x7'),_0x66d7('0x8')],'include':[{'model':_0x66d7('0x9'),'as':'Configurations','attributes':['id',_0x66d7('0x3')],'include':[{'model':'VtigerField','as':_0x66d7('0xa'),'attributes':['id',_0x66d7('0xb'),_0x66d7('0xc'),_0x66d7('0xd')],'include':[{'model':_0x66d7('0xe'),'as':_0x66d7('0xe'),'attributes':['id',_0x66d7('0x3')]}]},{'model':_0x66d7('0xf'),'as':'Descriptions','attributes':['id',_0x66d7('0xb'),_0x66d7('0xc'),_0x66d7('0x10'),'keyType',_0x66d7('0x11'),_0x66d7('0xd')],'include':[{'model':_0x66d7('0xe'),'as':_0x66d7('0xe'),'attributes':['id',_0x66d7('0x3')]}]},{'model':'VtigerField','as':'Fields','attributes':['id',_0x66d7('0xb'),_0x66d7('0xc'),_0x66d7('0x12'),_0x66d7('0x13'),_0x66d7('0x14'),_0x66d7('0xd')],'include':[{'model':_0x66d7('0xe'),'as':_0x66d7('0xe'),'attributes':['id',_0x66d7('0x3')]}]}]}]},'log':'GetVtigerAccount'});};};
\ No newline at end of file
index 8e7e897..be1efab 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x465c=['variableName','Variable','Descriptions','key','keyType','keyContent','idField','customField','../../client','getZendeskAccounts','Request','GetZendeskAccount','password','token','remoteUri','authType','type','ZendeskConfiguration','Configurations','name','Tag','ZendeskField','Subjects','content'];(function(_0x710815,_0x520da8){var _0x5b3b89=function(_0x2e1a8e){while(--_0x2e1a8e){_0x710815['push'](_0x710815['shift']());}};_0x5b3b89(++_0x520da8);}(_0x465c,0x80));var _0xc465=function(_0x1c1042,_0x201a91){_0x1c1042=_0x1c1042-0x0;var _0x7a8624=_0x465c[_0x1c1042];return _0x7a8624;};'use strict';var client=require(_0xc465('0x0'));exports[_0xc465('0x1')]=function(){return function(_0x5ba794){return client[_0xc465('0x2')](_0xc465('0x3'),{'options':{'raw':![],'attributes':['id','name','username',_0xc465('0x4'),_0xc465('0x5'),_0xc465('0x6'),_0xc465('0x7'),'serverUrl',_0xc465('0x8')],'include':[{'model':_0xc465('0x9'),'as':_0xc465('0xa'),'attributes':['id',_0xc465('0xb')],'include':[{'model':_0xc465('0xc'),'attributes':['id',_0xc465('0xb')]},{'model':_0xc465('0xd'),'as':_0xc465('0xe'),'attributes':['id','type',_0xc465('0xf'),_0xc465('0x10')],'include':[{'model':_0xc465('0x11'),'as':'Variable','attributes':['id',_0xc465('0xb')]}]},{'model':'ZendeskField','as':_0xc465('0x12'),'attributes':['id',_0xc465('0x8'),_0xc465('0xf'),_0xc465('0x13'),_0xc465('0x14'),_0xc465('0x15'),_0xc465('0x10')],'include':[{'model':_0xc465('0x11'),'as':_0xc465('0x11'),'attributes':['id',_0xc465('0xb')]}]},{'model':_0xc465('0xd'),'as':'Fields','attributes':['id',_0xc465('0x8'),_0xc465('0xf'),_0xc465('0x16'),'nameField',_0xc465('0x17'),'variableName'],'include':[{'model':'Variable','as':'Variable','attributes':['id',_0xc465('0xb')]}]}]}]},'log':_0xc465('0x3')});};};
\ No newline at end of file
+var _0xd5fa=['getZendeskAccounts','Request','name','username','token','remoteUri','authType','serverUrl','type','ZendeskConfiguration','Tag','Subjects','content','variableName','Variable','Descriptions','key','keyType','keyContent','ZendeskField','nameField','customField','../../client'];(function(_0x59a036,_0x3d50ca){var _0x557e6e=function(_0x96e1ed){while(--_0x96e1ed){_0x59a036['push'](_0x59a036['shift']());}};_0x557e6e(++_0x3d50ca);}(_0xd5fa,0xb7));var _0xad5f=function(_0x285d41,_0x21abe3){_0x285d41=_0x285d41-0x0;var _0x429153=_0xd5fa[_0x285d41];return _0x429153;};'use strict';var client=require(_0xad5f('0x0'));exports[_0xad5f('0x1')]=function(){return function(_0x16b254){return client[_0xad5f('0x2')]('GetZendeskAccount',{'options':{'raw':![],'attributes':['id',_0xad5f('0x3'),_0xad5f('0x4'),'password',_0xad5f('0x5'),_0xad5f('0x6'),_0xad5f('0x7'),_0xad5f('0x8'),_0xad5f('0x9')],'include':[{'model':_0xad5f('0xa'),'as':'Configurations','attributes':['id',_0xad5f('0x3')],'include':[{'model':_0xad5f('0xb'),'attributes':['id',_0xad5f('0x3')]},{'model':'ZendeskField','as':_0xad5f('0xc'),'attributes':['id','type',_0xad5f('0xd'),_0xad5f('0xe')],'include':[{'model':_0xad5f('0xf'),'as':_0xad5f('0xf'),'attributes':['id','name']}]},{'model':'ZendeskField','as':_0xad5f('0x10'),'attributes':['id',_0xad5f('0x9'),_0xad5f('0xd'),_0xad5f('0x11'),_0xad5f('0x12'),_0xad5f('0x13'),_0xad5f('0xe')],'include':[{'model':_0xad5f('0xf'),'as':'Variable','attributes':['id',_0xad5f('0x3')]}]},{'model':_0xad5f('0x14'),'as':'Fields','attributes':['id',_0xad5f('0x9'),_0xad5f('0xd'),'idField',_0xad5f('0x15'),_0xad5f('0x16'),_0xad5f('0xe')],'include':[{'model':'Variable','as':'Variable','attributes':['id',_0xad5f('0x3')]}]}]}]},'log':'GetZendeskAccount'});};};
\ No newline at end of file
index c6be522..143f60b 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc4b6=['Subjects','content','variableName','Variable','Descriptions','type','keyType','keyContent','Fields','nameField','customField','getZohoAccounts','Request','name','description','host','clientId','clientSecret','serverUrl','code','refreshToken','ZohoConfiguration','Configurations','moduleCreate','moduleSearch','ZohoField'];(function(_0x551d3b,_0x346d60){var _0x279fb2=function(_0x53d5ce){while(--_0x53d5ce){_0x551d3b['push'](_0x551d3b['shift']());}};_0x279fb2(++_0x346d60);}(_0xc4b6,0x73));var _0x6c4b=function(_0x3bb515,_0x1a5f08){_0x3bb515=_0x3bb515-0x0;var _0x3e0a6b=_0xc4b6[_0x3bb515];return _0x3e0a6b;};'use strict';var client=require('../../client');exports[_0x6c4b('0x0')]=function(){return function(_0x29eb36){return client[_0x6c4b('0x1')]('GetZohoAccount',{'options':{'raw':![],'attributes':['id',_0x6c4b('0x2'),_0x6c4b('0x3'),_0x6c4b('0x4'),'zone',_0x6c4b('0x5'),_0x6c4b('0x6'),_0x6c4b('0x7'),_0x6c4b('0x8'),_0x6c4b('0x9')],'include':[{'model':_0x6c4b('0xa'),'as':_0x6c4b('0xb'),'attributes':['id',_0x6c4b('0x2'),_0x6c4b('0xc'),_0x6c4b('0xd'),_0x6c4b('0x3')],'include':[{'model':_0x6c4b('0xe'),'as':_0x6c4b('0xf'),'attributes':['id','type',_0x6c4b('0x10'),_0x6c4b('0x11')],'include':[{'model':_0x6c4b('0x12'),'as':'Variable','attributes':['id',_0x6c4b('0x2')]}]},{'model':_0x6c4b('0xe'),'as':_0x6c4b('0x13'),'attributes':['id',_0x6c4b('0x14'),_0x6c4b('0x10'),'key',_0x6c4b('0x15'),_0x6c4b('0x16'),_0x6c4b('0x11')],'include':[{'model':_0x6c4b('0x12'),'as':_0x6c4b('0x12'),'attributes':['id',_0x6c4b('0x2')]}]},{'model':_0x6c4b('0xe'),'as':_0x6c4b('0x17'),'attributes':['id',_0x6c4b('0x14'),_0x6c4b('0x10'),'idField',_0x6c4b('0x18'),_0x6c4b('0x19'),'variableName'],'include':[{'model':_0x6c4b('0x12'),'as':_0x6c4b('0x12'),'attributes':['id',_0x6c4b('0x2')]}]}]}]},'log':'GetZohoAccount'});};};
\ No newline at end of file
+var _0x7e6e=['keyContent','Fields','idField','GetZohoAccount','getZohoAccounts','host','zone','clientId','clientSecret','serverUrl','code','refreshToken','Configurations','name','moduleCreate','moduleSearch','description','ZohoField','type','Variable','Descriptions','content','keyType'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x7e6e,0x101));var _0xe7e6=function(_0x4c5955,_0x1d2ade){_0x4c5955=_0x4c5955-0x0;var _0x1e083e=_0x7e6e[_0x4c5955];return _0x1e083e;};'use strict';var client=require('../../client');exports[_0xe7e6('0x0')]=function(){return function(_0xd90540){return client['Request']('GetZohoAccount',{'options':{'raw':![],'attributes':['id','name','description',_0xe7e6('0x1'),_0xe7e6('0x2'),_0xe7e6('0x3'),_0xe7e6('0x4'),_0xe7e6('0x5'),_0xe7e6('0x6'),_0xe7e6('0x7')],'include':[{'model':'ZohoConfiguration','as':_0xe7e6('0x8'),'attributes':['id',_0xe7e6('0x9'),_0xe7e6('0xa'),_0xe7e6('0xb'),_0xe7e6('0xc')],'include':[{'model':_0xe7e6('0xd'),'as':'Subjects','attributes':['id',_0xe7e6('0xe'),'content','variableName'],'include':[{'model':_0xe7e6('0xf'),'as':_0xe7e6('0xf'),'attributes':['id','name']}]},{'model':'ZohoField','as':_0xe7e6('0x10'),'attributes':['id',_0xe7e6('0xe'),_0xe7e6('0x11'),'key',_0xe7e6('0x12'),_0xe7e6('0x13'),'variableName'],'include':[{'model':_0xe7e6('0xf'),'as':_0xe7e6('0xf'),'attributes':['id',_0xe7e6('0x9')]}]},{'model':'ZohoField','as':_0xe7e6('0x14'),'attributes':['id',_0xe7e6('0xe'),_0xe7e6('0x11'),_0xe7e6('0x15'),'nameField','customField','variableName'],'include':[{'model':_0xe7e6('0xf'),'as':_0xe7e6('0xf'),'attributes':['id',_0xe7e6('0x9')]}]}]}]},'log':_0xe7e6('0x16')});};};
\ No newline at end of file
index b24df5f..ae272f0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xec74=['isArray','resolve','every','number','string','map','interval','concat','Request','IntervalIftime','intervalIftime','../client','stack','replace','trim','intervalIftime\x20called\x20with'];(function(_0x17f52b,_0x5c6272){var _0x354974=function(_0x590fc4){while(--_0x590fc4){_0x17f52b['push'](_0x17f52b['shift']());}};_0x354974(++_0x5c6272);}(_0xec74,0x1ab));var _0x4ec7=function(_0x3d3b05,_0x334c57){_0x3d3b05=_0x3d3b05-0x0;var _0x2c6ca3=_0xec74[_0x3d3b05];return _0x2c6ca3;};var logger=require('../../../config/logger')('dialer');var client=require(_0x4ec7('0x0'));function intervalIftime(_0x4dd301,_0x372485){const _0x528371=new Error()[_0x4ec7('0x1')][_0x4ec7('0x2')](/^Error/,'')[_0x4ec7('0x3')]();logger['silly'](_0x4ec7('0x4'),_0x4dd301,_0x372485,_0x528371);const _0x4ca39b=Array[_0x4ec7('0x5')](_0x4dd301);if(!_0x4dd301||_0x4ca39b&&_0x4dd301['length']===0x0){return Promise[_0x4ec7('0x6')](![]);}else{var _0x1fdde4=[];var _0x2d301c=[];var _0x118b08=_0x4ca39b?_0x4dd301:[_0x4dd301];var _0x2fafed=_0x118b08[_0x4ec7('0x7')](function(_0x56dafe){return typeof _0x56dafe===_0x4ec7('0x8');});var _0x294a87=_0x118b08[_0x4ec7('0x7')](function(_0x36aa68){return typeof _0x36aa68===_0x4ec7('0x9');});if(!_0x2fafed&&!_0x294a87){_0x1fdde4=_0x118b08[_0x4ec7('0xa')](function(_0x94c028){return _0x94c028['id'];});if(_0x1fdde4['length']===0x0){_0x2d301c=_0x118b08[_0x4ec7('0xa')](function(_0x1e612a){return _0x1e612a[_0x4ec7('0xb')];});}}else{if(_0x2fafed){_0x1fdde4=_0x1fdde4[_0x4ec7('0xc')](_0x118b08);}if(_0x294a87){_0x2d301c=_0x2d301c['concat'](_0x118b08);}}return client[_0x4ec7('0xd')](_0x4ec7('0xe'),{'intervalIds':_0x1fdde4,'intervals':_0x2d301c,'timezone':_0x372485,'log':_0x4ec7('0xe')});}}exports[_0x4ec7('0xf')]=intervalIftime;
\ No newline at end of file
+var _0x45c9=['string','map','interval','concat','Request','IntervalIftime','../../../config/logger','../client','replace','trim','silly','intervalIftime\x20called\x20with','isArray','length','resolve','every','number'];(function(_0x54da13,_0x2aad17){var _0x15bcb2=function(_0x4898d0){while(--_0x4898d0){_0x54da13['push'](_0x54da13['shift']());}};_0x15bcb2(++_0x2aad17);}(_0x45c9,0x149));var _0x945c=function(_0x13e69a,_0x3e9bba){_0x13e69a=_0x13e69a-0x0;var _0x3f7704=_0x45c9[_0x13e69a];return _0x3f7704;};var logger=require(_0x945c('0x0'))('dialer');var client=require(_0x945c('0x1'));function intervalIftime(_0x44a21f,_0x44190b){const _0x43de88=new Error()['stack'][_0x945c('0x2')](/^Error/,'')[_0x945c('0x3')]();logger[_0x945c('0x4')](_0x945c('0x5'),_0x44a21f,_0x44190b,_0x43de88);const _0x3c224b=Array[_0x945c('0x6')](_0x44a21f);if(!_0x44a21f||_0x3c224b&&_0x44a21f[_0x945c('0x7')]===0x0){return Promise[_0x945c('0x8')](![]);}else{var _0x48dbb4=[];var _0x257a05=[];var _0x384c92=_0x3c224b?_0x44a21f:[_0x44a21f];var _0x2d0a85=_0x384c92[_0x945c('0x9')](function(_0x52cead){return typeof _0x52cead===_0x945c('0xa');});var _0x25c975=_0x384c92[_0x945c('0x9')](function(_0x493e80){return typeof _0x493e80===_0x945c('0xb');});if(!_0x2d0a85&&!_0x25c975){_0x48dbb4=_0x384c92[_0x945c('0xc')](function(_0x39a021){return _0x39a021['id'];});if(_0x48dbb4['length']===0x0){_0x257a05=_0x384c92[_0x945c('0xc')](function(_0xe6b3b2){return _0xe6b3b2[_0x945c('0xd')];});}}else{if(_0x2d0a85){_0x48dbb4=_0x48dbb4[_0x945c('0xe')](_0x384c92);}if(_0x25c975){_0x257a05=_0x257a05[_0x945c('0xe')](_0x384c92);}}return client[_0x945c('0xf')](_0x945c('0x10'),{'intervalIds':_0x48dbb4,'intervals':_0x257a05,'timezone':_0x44190b,'log':'IntervalIftime'});}}exports['intervalIftime']=intervalIftime;
\ No newline at end of file
index 782d249..a491e70 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf4b9=['diff','starttime','seconds','outbound','uniqueid','moment','lodash','util','../client','voiceQueueReport','queuecallerexitAt','CreateMemberReport','voice','lastAssignedTo','format','SIP/%s','queuecallerleaveAt','inbound','calleridnum','exten','queue','agent','accountcode','toNumber','membername','interface','endtime'];(function(_0x4cea42,_0x3f4a68){var _0x55ea67=function(_0x4da306){while(--_0x4da306){_0x4cea42['push'](_0x4cea42['shift']());}};_0x55ea67(++_0x3f4a68);}(_0xf4b9,0x71));var _0x9f4b=function(_0x199572,_0x33e667){_0x199572=_0x199572-0x0;var _0x13cfa3=_0xf4b9[_0x199572];return _0x13cfa3;};'use strict';var moment=require(_0x9f4b('0x0'));var _=require(_0x9f4b('0x1'));var util=require(_0x9f4b('0x2'));var client=require(_0x9f4b('0x3'));exports[_0x9f4b('0x4')]=function(_0x30e1e1){var _0xe0be61=_0x30e1e1['queuecallercompleteAt']||_0x30e1e1[_0x9f4b('0x5')];return client['Request'](_0x9f4b('0x6'),{'body':{'channel':_0x9f4b('0x7'),'membername':_0x30e1e1[_0x9f4b('0x8')],'interface':_['isNil'](_0x30e1e1['interface'])?util[_0x9f4b('0x9')](_0x9f4b('0xa'),_0x30e1e1['lastAssignedTo']):_0x30e1e1['interface'],'type':'TALKING','enterAt':_0x30e1e1[_0x9f4b('0xb')],'exitAt':_0xe0be61,'duration':moment(_0xe0be61)['diff'](_0x30e1e1[_0x9f4b('0xb')],'seconds'),'data1':_0x9f4b('0xc'),'data2':_0x30e1e1[_0x9f4b('0xd')],'data3':_0x30e1e1[_0x9f4b('0xe')],'data4':null,'data5':_0x30e1e1[_0x9f4b('0xf')],'role':_0x9f4b('0x10'),'internal':_0x30e1e1[_0x9f4b('0x11')]?_[_0x9f4b('0x12')](_0x30e1e1[_0x9f4b('0x11')]):undefined,'uniqueid':_0x30e1e1['uniqueid']},'log':_0x9f4b('0x6')});};exports['voiceDialReport']=function(_0xe84cf4){return client['Request']('CreateMemberReport',{'body':{'channel':'voice','membername':_0xe84cf4[_0x9f4b('0x13')],'interface':_0xe84cf4[_0x9f4b('0x14')],'type':'TALKING','enterAt':_0xe84cf4['starttime'],'exitAt':_0xe84cf4[_0x9f4b('0x15')],'duration':moment(_0xe84cf4['endtime'])[_0x9f4b('0x16')](_0xe84cf4[_0x9f4b('0x17')],'seconds')>=0x0?moment(_0xe84cf4[_0x9f4b('0x15')])[_0x9f4b('0x16')](_0xe84cf4[_0x9f4b('0x17')],_0x9f4b('0x18')):null,'data1':_0x9f4b('0x19'),'data2':_0xe84cf4[_0x9f4b('0x11')],'data3':_0xe84cf4[_0x9f4b('0xe')],'data4':_0xe84cf4['dialstring']||null,'role':_0x9f4b('0x10'),'internal':_0xe84cf4[_0x9f4b('0x11')]?_[_0x9f4b('0x12')](_0xe84cf4['accountcode']):undefined,'uniqueid':_0xe84cf4[_0x9f4b('0x1a')]},'log':'CreateMemberReport'});};
\ No newline at end of file
+var _0x8ef3=['Request','CreateMemberReport','format','SIP/%s','lastAssignedTo','interface','TALKING','queuecallerleaveAt','diff','seconds','inbound','queue','agent','accountcode','toNumber','uniqueid','voiceDialReport','voice','membername','starttime','endtime','exten','dialstring','moment','lodash','util','../client','voiceQueueReport','queuecallerexitAt'];(function(_0x1a7846,_0x59723e){var _0x48049=function(_0x203ff6){while(--_0x203ff6){_0x1a7846['push'](_0x1a7846['shift']());}};_0x48049(++_0x59723e);}(_0x8ef3,0x8b));var _0x38ef=function(_0x2dafbe,_0x5d04de){_0x2dafbe=_0x2dafbe-0x0;var _0x58a45a=_0x8ef3[_0x2dafbe];return _0x58a45a;};'use strict';var moment=require(_0x38ef('0x0'));var _=require(_0x38ef('0x1'));var util=require(_0x38ef('0x2'));var client=require(_0x38ef('0x3'));exports[_0x38ef('0x4')]=function(_0x525672){var _0x433fba=_0x525672['queuecallercompleteAt']||_0x525672[_0x38ef('0x5')];return client[_0x38ef('0x6')](_0x38ef('0x7'),{'body':{'channel':'voice','membername':_0x525672['lastAssignedTo'],'interface':_['isNil'](_0x525672['interface'])?util[_0x38ef('0x8')](_0x38ef('0x9'),_0x525672[_0x38ef('0xa')]):_0x525672[_0x38ef('0xb')],'type':_0x38ef('0xc'),'enterAt':_0x525672[_0x38ef('0xd')],'exitAt':_0x433fba,'duration':moment(_0x433fba)[_0x38ef('0xe')](_0x525672[_0x38ef('0xd')],_0x38ef('0xf')),'data1':_0x38ef('0x10'),'data2':_0x525672['calleridnum'],'data3':_0x525672['exten'],'data4':null,'data5':_0x525672[_0x38ef('0x11')],'role':_0x38ef('0x12'),'internal':_0x525672[_0x38ef('0x13')]?_[_0x38ef('0x14')](_0x525672[_0x38ef('0x13')]):undefined,'uniqueid':_0x525672[_0x38ef('0x15')]},'log':_0x38ef('0x7')});};exports[_0x38ef('0x16')]=function(_0x156ed3){return client[_0x38ef('0x6')](_0x38ef('0x7'),{'body':{'channel':_0x38ef('0x17'),'membername':_0x156ed3[_0x38ef('0x18')],'interface':_0x156ed3[_0x38ef('0xb')],'type':_0x38ef('0xc'),'enterAt':_0x156ed3[_0x38ef('0x19')],'exitAt':_0x156ed3[_0x38ef('0x1a')],'duration':moment(_0x156ed3[_0x38ef('0x1a')])[_0x38ef('0xe')](_0x156ed3[_0x38ef('0x19')],'seconds')>=0x0?moment(_0x156ed3[_0x38ef('0x1a')])[_0x38ef('0xe')](_0x156ed3[_0x38ef('0x19')],_0x38ef('0xf')):null,'data1':'outbound','data2':_0x156ed3[_0x38ef('0x13')],'data3':_0x156ed3[_0x38ef('0x1b')],'data4':_0x156ed3[_0x38ef('0x1c')]||null,'role':_0x38ef('0x12'),'internal':_0x156ed3['accountcode']?_[_0x38ef('0x14')](_0x156ed3[_0x38ef('0x13')]):undefined,'uniqueid':_0x156ed3[_0x38ef('0x15')]},'log':_0x38ef('0x7')});};
\ No newline at end of file
index e151a04..229167e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd6dc=['previewRecallmeReminderInterval','../client','Request','ShowSetting','stopRecordingOnTransfer'];(function(_0x24b41a,_0x45754d){var _0x136fad=function(_0x183125){while(--_0x183125){_0x24b41a['push'](_0x24b41a['shift']());}};_0x136fad(++_0x45754d);}(_0xd6dc,0x1d7));var _0xcd6d=function(_0x128978,_0x5cdb7d){_0x128978=_0x128978-0x0;var _0x32c9f7=_0xd6dc[_0x128978];return _0x32c9f7;};'use strict';var client=require(_0xcd6d('0x0'));exports['getSettings']=function(){return client[_0xcd6d('0x1')](_0xcd6d('0x2'),{'options':{'raw':!![],'where':{'id':0x1},'attributes':[_0xcd6d('0x3'),_0xcd6d('0x4')]},'log':'GetSettings'});};
\ No newline at end of file
+var _0x74f4=['../client','getSettings','ShowSetting','stopRecordingOnTransfer','GetSettings'];(function(_0x1b349a,_0x22222c){var _0x5d1f7c=function(_0x368d7c){while(--_0x368d7c){_0x1b349a['push'](_0x1b349a['shift']());}};_0x5d1f7c(++_0x22222c);}(_0x74f4,0xaa));var _0x474f=function(_0x4c10ac,_0x3a668d){_0x4c10ac=_0x4c10ac-0x0;var _0x36f544=_0x74f4[_0x4c10ac];return _0x36f544;};'use strict';var client=require(_0x474f('0x0'));exports[_0x474f('0x1')]=function(){return client['Request'](_0x474f('0x2'),{'options':{'raw':!![],'where':{'id':0x1},'attributes':[_0x474f('0x3'),'previewRecallmeReminderInterval']},'log':_0x474f('0x4')});};
\ No newline at end of file
index d3b2daa..31416ff 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1159=['html','../client','getTemplates','Request','name'];(function(_0x1b6a26,_0x1b2d97){var _0x365501=function(_0x4238dc){while(--_0x4238dc){_0x1b6a26['push'](_0x1b6a26['shift']());}};_0x365501(++_0x1b2d97);}(_0x1159,0x119));var _0x9115=function(_0x339030,_0x297c40){_0x339030=_0x339030-0x0;var _0x2fbf28=_0x1159[_0x339030];return _0x2fbf28;};'use strict';var client=require(_0x9115('0x0'));exports[_0x9115('0x1')]=function(_0x1751e6){return function(_0x3e322e){return client[_0x9115('0x2')]('GetTemplate',{'options':{'raw':!![],'attributes':['id',_0x9115('0x3'),_0x9115('0x4')]},'log':'GetTemplate'});};};
\ No newline at end of file
+var _0x7af9=['../client','getTemplates','name','GetTemplate'];(function(_0x271608,_0x54a796){var _0x5c8c31=function(_0x2e1518){while(--_0x2e1518){_0x271608['push'](_0x271608['shift']());}};_0x5c8c31(++_0x54a796);}(_0x7af9,0x7c));var _0x97af=function(_0x95f841,_0x357b1b){_0x95f841=_0x95f841-0x0;var _0x1c68bf=_0x7af9[_0x95f841];return _0x1c68bf;};'use strict';var client=require(_0x97af('0x0'));exports[_0x97af('0x1')]=function(_0x17c8ec){return function(_0x27930f){return client['Request']('GetTemplate',{'options':{'raw':!![],'attributes':['id',_0x97af('0x2'),'html']},'log':_0x97af('0x3')});};};
\ No newline at end of file
index 7e06582..1f174a1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe5ee=['channel','status','Condition','AllConditions','operator','value','AnyConditions','field','Action','data2','data3','data4','data5','data6','data7','../client','getTriggers','GetTrigger','name'];(function(_0x238831,_0x138f83){var _0x10733d=function(_0x5b6c93){while(--_0x5b6c93){_0x238831['push'](_0x238831['shift']());}};_0x10733d(++_0x138f83);}(_0xe5ee,0x1ea));var _0xee5e=function(_0x8ab6b3,_0x1de6c5){_0x8ab6b3=_0x8ab6b3-0x0;var _0x4d3eab=_0xe5ee[_0x8ab6b3];return _0x4d3eab;};'use strict';var client=require(_0xee5e('0x0'));exports[_0xee5e('0x1')]=function(_0x5ba387){return function(_0x1f00f0){return client['Request'](_0xee5e('0x2'),{'options':{'raw':![],'attributes':['id',_0xee5e('0x3'),_0xee5e('0x4'),_0xee5e('0x5')],'include':[{'model':_0xee5e('0x6'),'as':_0xee5e('0x7'),'attributes':['id','field',_0xee5e('0x8'),_0xee5e('0x9')]},{'model':_0xee5e('0x6'),'as':_0xee5e('0xa'),'attributes':['id',_0xee5e('0xb'),_0xee5e('0x8'),_0xee5e('0x9')]},{'model':_0xee5e('0xc'),'as':'Actions','attributes':['id','action','data1',_0xee5e('0xd'),_0xee5e('0xe'),_0xee5e('0xf'),_0xee5e('0x10'),_0xee5e('0x11'),_0xee5e('0x12')]}]},'log':_0xee5e('0x2')});};};
\ No newline at end of file
+var _0x8b08=['Request','GetTrigger','name','Condition','AllConditions','operator','value','Action','action','data1','data2','data4','data5','data6','data7','getTriggers'];(function(_0x5d9df6,_0x1b26d5){var _0x8ebd11=function(_0x4239a3){while(--_0x4239a3){_0x5d9df6['push'](_0x5d9df6['shift']());}};_0x8ebd11(++_0x1b26d5);}(_0x8b08,0x8f));var _0x88b0=function(_0x1307fa,_0x4b6304){_0x1307fa=_0x1307fa-0x0;var _0x357c8b=_0x8b08[_0x1307fa];return _0x357c8b;};'use strict';var client=require('../client');exports[_0x88b0('0x0')]=function(_0x5206c6){return function(_0xafa81a){return client[_0x88b0('0x1')](_0x88b0('0x2'),{'options':{'raw':![],'attributes':['id',_0x88b0('0x3'),'channel','status'],'include':[{'model':_0x88b0('0x4'),'as':_0x88b0('0x5'),'attributes':['id','field',_0x88b0('0x6'),_0x88b0('0x7')]},{'model':_0x88b0('0x4'),'as':'AnyConditions','attributes':['id','field',_0x88b0('0x6'),'value']},{'model':_0x88b0('0x8'),'as':'Actions','attributes':['id',_0x88b0('0x9'),_0x88b0('0xa'),_0x88b0('0xb'),'data3',_0x88b0('0xc'),_0x88b0('0xd'),_0x88b0('0xe'),_0x88b0('0xf')]}]},'log':_0x88b0('0x2')});};};
\ No newline at end of file
index da30a36..dddf8eb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8c39=['Request','GetTrunk','name','defaultuser','../client'];(function(_0x366d19,_0x2f7045){var _0x34425d=function(_0xb3be93){while(--_0xb3be93){_0x366d19['push'](_0x366d19['shift']());}};_0x34425d(++_0x2f7045);}(_0x8c39,0x1df));var _0x98c3=function(_0x22e380,_0x18498e){_0x22e380=_0x22e380-0x0;var _0x4c2854=_0x8c39[_0x22e380];return _0x4c2854;};'use strict';var client=require(_0x98c3('0x0'));exports['getTrunks']=function(_0x1b1b94){return function(_0x116f3d){return client[_0x98c3('0x1')](_0x98c3('0x2'),{'options':{'raw':!![],'where':{'active':0x1},'attributes':['id',_0x98c3('0x3'),'registry',_0x98c3('0x4')]},'log':_0x98c3('0x2')});};};
\ No newline at end of file
+var _0x09d3=['GetTrunk','name','registry','../client','getTrunks','Request'];(function(_0x483ab9,_0x419148){var _0x35043b=function(_0x3453a3){while(--_0x3453a3){_0x483ab9['push'](_0x483ab9['shift']());}};_0x35043b(++_0x419148);}(_0x09d3,0xa5));var _0x309d=function(_0x381961,_0x297382){_0x381961=_0x381961-0x0;var _0x1a2de0=_0x09d3[_0x381961];return _0x1a2de0;};'use strict';var client=require(_0x309d('0x0'));exports[_0x309d('0x1')]=function(_0x380df3){return function(_0x427b73){return client[_0x309d('0x2')](_0x309d('0x3'),{'options':{'raw':!![],'where':{'active':0x1},'attributes':['id',_0x309d('0x4'),_0x309d('0x5'),'defaultuser']},'log':_0x309d('0x3')});};};
\ No newline at end of file
index 8dc921f..0473b26 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xedd9=['mobile','getTelephones','internal','PauseUser','savePause','saveUnpause','UnpauseUser','ShowUser','interface','getAgent','getAgents','Request','GetUser','agent','name','email','accountcode','fullname','lastLoginAt','pauseType','lastPauseAt','voicePause'];(function(_0x32274a,_0x23a5dd){var _0x1e7dd8=function(_0x176708){while(--_0x176708){_0x32274a['push'](_0x32274a['shift']());}};_0x1e7dd8(++_0x23a5dd);}(_0xedd9,0xfc));var _0x9edd=function(_0x595267,_0x571349){_0x595267=_0x595267-0x0;var _0x58d166=_0xedd9[_0x595267];return _0x58d166;};'use strict';var client=require('../client');exports[_0x9edd('0x0')]=function(){return function(){return client[_0x9edd('0x1')](_0x9edd('0x2'),{'options':{'raw':![],'where':{'role':_0x9edd('0x3')},'attributes':['id',_0x9edd('0x4'),_0x9edd('0x5'),_0x9edd('0x6'),_0x9edd('0x7'),'online',_0x9edd('0x8'),_0x9edd('0x9'),_0x9edd('0xa'),_0x9edd('0xb'),'phone',_0x9edd('0xc'),'interface']},'log':_0x9edd('0x0')});};};exports[_0x9edd('0xd')]=function(){return function(){return client[_0x9edd('0x1')](_0x9edd('0x2'),{'options':{'raw':!![],'where':{'role':'telephone'},'attributes':['id',_0x9edd('0x4'),'accountcode',_0x9edd('0xe')]},'log':_0x9edd('0xd')});};};exports['savePause']=function(_0xbf9da6,_0x13dc4f,_0x5b6c00){return client[_0x9edd('0x1')](_0x9edd('0xf'),{'body':{'type':_0x13dc4f,'uniqueid':_0x5b6c00},'options':{'where':{'id':_0xbf9da6['id']}},'log':_0x9edd('0x10')});};exports[_0x9edd('0x11')]=function(_0x287ddd){return client[_0x9edd('0x1')](_0x9edd('0x12'),{'body':{},'options':{'where':{'id':_0x287ddd['id']}},'log':_0x9edd('0x10')});};exports['getAgent']=function(_0x176bfa){return client[_0x9edd('0x1')](_0x9edd('0x13'),{'options':{'raw':![],'where':{'role':_0x9edd('0x3'),'id':_0x176bfa},'attributes':['id',_0x9edd('0x4'),_0x9edd('0x5'),_0x9edd('0x6'),_0x9edd('0x7'),'online',_0x9edd('0x8'),_0x9edd('0x9'),_0x9edd('0xa'),'voicePause',_0x9edd('0x14')]},'log':_0x9edd('0x15')});};
\ No newline at end of file
+var _0x70e0=['getAgents','Request','name','email','accountcode','fullname','lastLoginAt','lastPauseAt','interface','getTelephones','GetUser','telephone','savePause','PauseUser','saveUnpause','getAgent','agent','online','pauseType','../client'];(function(_0x5227a1,_0x2404df){var _0x3a930e=function(_0x37aa64){while(--_0x37aa64){_0x5227a1['push'](_0x5227a1['shift']());}};_0x3a930e(++_0x2404df);}(_0x70e0,0x17b));var _0x070e=function(_0x36f57d,_0x530f3d){_0x36f57d=_0x36f57d-0x0;var _0x545092=_0x70e0[_0x36f57d];return _0x545092;};'use strict';var client=require(_0x070e('0x0'));exports[_0x070e('0x1')]=function(){return function(){return client[_0x070e('0x2')]('GetUser',{'options':{'raw':![],'where':{'role':'agent'},'attributes':['id',_0x070e('0x3'),_0x070e('0x4'),_0x070e('0x5'),_0x070e('0x6'),'online',_0x070e('0x7'),'pauseType',_0x070e('0x8'),'voicePause','phone','mobile',_0x070e('0x9')]},'log':_0x070e('0x1')});};};exports[_0x070e('0xa')]=function(){return function(){return client[_0x070e('0x2')](_0x070e('0xb'),{'options':{'raw':!![],'where':{'role':_0x070e('0xc')},'attributes':['id',_0x070e('0x3'),'accountcode','internal']},'log':_0x070e('0xa')});};};exports[_0x070e('0xd')]=function(_0x12bb37,_0xb8d819,_0xa927a2){return client[_0x070e('0x2')](_0x070e('0xe'),{'body':{'type':_0xb8d819,'uniqueid':_0xa927a2},'options':{'where':{'id':_0x12bb37['id']}},'log':_0x070e('0xd')});};exports[_0x070e('0xf')]=function(_0x5bf079){return client[_0x070e('0x2')]('UnpauseUser',{'body':{},'options':{'where':{'id':_0x5bf079['id']}},'log':'savePause'});};exports[_0x070e('0x10')]=function(_0x56c7ba){return client['Request']('ShowUser',{'options':{'raw':![],'where':{'role':_0x070e('0x11'),'id':_0x56c7ba},'attributes':['id',_0x070e('0x3'),'email','accountcode',_0x070e('0x6'),_0x070e('0x12'),_0x070e('0x7'),_0x070e('0x13'),'lastPauseAt','voicePause',_0x070e('0x9')]},'log':_0x070e('0x10')});};
\ No newline at end of file
index 152e4c4..1d5f5ea 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8aaa=['Request','UpdateVoiceAgentReport','create','CreateVoiceAgentReport'];(function(_0x31a012,_0x95d918){var _0x3be42d=function(_0x352787){while(--_0x352787){_0x31a012['push'](_0x31a012['shift']());}};_0x3be42d(++_0x95d918);}(_0x8aaa,0x18e));var _0xa8aa=function(_0x59ee6f,_0x450239){_0x59ee6f=_0x59ee6f-0x0;var _0x4c0979=_0x8aaa[_0x59ee6f];return _0x4c0979;};'use strict';var client=require('../client');exports[_0xa8aa('0x0')]=function(_0x36299c){return client['Request']('CreateVoiceAgentReport',{'body':_0x36299c,'log':_0xa8aa('0x1')});};exports['update']=function(_0x5236b7,_0x4e5559,_0x5b8c05){return client[_0xa8aa('0x2')](_0xa8aa('0x3'),{'body':_0x5236b7,'options':{'where':{'uniqueid':_0x4e5559,'interface':_0x5b8c05,'agentcomplete':!![]}},'log':_0xa8aa('0x3')});};
\ No newline at end of file
+var _0x0cec=['update','UpdateVoiceAgentReport','../client','Request','CreateVoiceAgentReport'];(function(_0x503306,_0x356f2f){var _0x44a99d=function(_0x1a6ec4){while(--_0x1a6ec4){_0x503306['push'](_0x503306['shift']());}};_0x44a99d(++_0x356f2f);}(_0x0cec,0xe3));var _0xc0ce=function(_0x9f78cc,_0x46779c){_0x9f78cc=_0x9f78cc-0x0;var _0x2ae787=_0x0cec[_0x9f78cc];return _0x2ae787;};'use strict';var client=require(_0xc0ce('0x0'));exports['create']=function(_0x43508c){return client[_0xc0ce('0x1')](_0xc0ce('0x2'),{'body':_0x43508c,'log':_0xc0ce('0x2')});};exports[_0xc0ce('0x3')]=function(_0x3da61c,_0x1b9ce4,_0x172aab){return client[_0xc0ce('0x1')](_0xc0ce('0x4'),{'body':_0x3da61c,'options':{'where':{'uniqueid':_0x1b9ce4,'interface':_0x172aab,'agentcomplete':!![]}},'log':_0xc0ce('0x4')});};
\ No newline at end of file
index e4eefa4..0b1dab6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdc60=['GetVoiceCallReport','startOf','YYYY-MM-DD\x20HH:mm:ss','endOf','day','type','disposition','duration','GetVoiceCallReports','create','Request','CreateVoiceCallReport','merge','calleridnum','context','callerid','DOCUMENTATION','getVoiceCallReports'];(function(_0x343090,_0x433a80){var _0x3ff3e8=function(_0x16c811){while(--_0x16c811){_0x343090['push'](_0x343090['shift']());}};_0x3ff3e8(++_0x433a80);}(_0xdc60,0x129));var _0x0dc6=function(_0x5cc533,_0x22f53a){_0x5cc533=_0x5cc533-0x0;var _0x3b1674=_0xdc60[_0x5cc533];return _0x3b1674;};'use strict';var moment=require('moment');var util=require('util');var _=require('lodash');var client=require('../client');exports[_0x0dc6('0x0')]=function(_0x1553b4){return client[_0x0dc6('0x1')](_0x0dc6('0x2'),{'body':_[_0x0dc6('0x3')](_0x1553b4,{'source':_0x1553b4[_0x0dc6('0x4')],'destinationcontext':_0x1553b4[_0x0dc6('0x5')],'callerid':_0x1553b4[_0x0dc6('0x6')],'amaflags':_0x0dc6('0x7')}),'log':_0x0dc6('0x2')});};exports[_0x0dc6('0x8')]=function(){return function(){return client[_0x0dc6('0x1')](_0x0dc6('0x9'),{'options':{'where':{'type':['outbound'],'createdAt':{'$between':[moment()[_0x0dc6('0xa')]('day')['format'](_0x0dc6('0xb')),moment()[_0x0dc6('0xc')](_0x0dc6('0xd'))['format'](_0x0dc6('0xb'))]}},'attributes':[_0x0dc6('0xe'),_0x0dc6('0xf'),_0x0dc6('0x10'),'billableseconds']},'log':_0x0dc6('0x11')});};};
\ No newline at end of file
+var _0xfadd=['callerid','DOCUMENTATION','getVoiceCallReports','GetVoiceCallReport','outbound','startOf','day','format','YYYY-MM-DD\x20HH:mm:ss','endOf','type','billableseconds','GetVoiceCallReports','moment','util','Request','CreateVoiceCallReport','merge','calleridnum','context'];(function(_0x13e24e,_0x341a15){var _0x9d6c1e=function(_0x4dba4e){while(--_0x4dba4e){_0x13e24e['push'](_0x13e24e['shift']());}};_0x9d6c1e(++_0x341a15);}(_0xfadd,0x161));var _0xdfad=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xfadd[_0x20a584];return _0x4b41a8;};'use strict';var moment=require(_0xdfad('0x0'));var util=require(_0xdfad('0x1'));var _=require('lodash');var client=require('../client');exports['create']=function(_0x279953){return client[_0xdfad('0x2')](_0xdfad('0x3'),{'body':_[_0xdfad('0x4')](_0x279953,{'source':_0x279953[_0xdfad('0x5')],'destinationcontext':_0x279953[_0xdfad('0x6')],'callerid':_0x279953[_0xdfad('0x7')],'amaflags':_0xdfad('0x8')}),'log':_0xdfad('0x3')});};exports[_0xdfad('0x9')]=function(){return function(){return client[_0xdfad('0x2')](_0xdfad('0xa'),{'options':{'where':{'type':[_0xdfad('0xb')],'createdAt':{'$between':[moment()[_0xdfad('0xc')](_0xdfad('0xd'))[_0xdfad('0xe')](_0xdfad('0xf')),moment()[_0xdfad('0x10')](_0xdfad('0xd'))[_0xdfad('0xe')](_0xdfad('0xf'))]}},'attributes':[_0xdfad('0x11'),'disposition','duration',_0xdfad('0x12')]},'log':_0xdfad('0x13')});};};
\ No newline at end of file
index 71dd858..2dcb9a2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa312=['Request','CreateVoiceDialReport','create'];(function(_0x5b5cff,_0x51296e){var _0x16d46b=function(_0x170af5){while(--_0x170af5){_0x5b5cff['push'](_0x5b5cff['shift']());}};_0x16d46b(++_0x51296e);}(_0xa312,0x113));var _0x2a31=function(_0x358806,_0x322b66){_0x358806=_0x358806-0x0;var _0x19fdcb=_0xa312[_0x358806];return _0x19fdcb;};'use strict';var client=require('../client');exports[_0x2a31('0x0')]=function(_0x269a2f){return client[_0x2a31('0x1')](_0x2a31('0x2'),{'body':_0x269a2f,'log':'CreateVoiceDialReport'});};
\ No newline at end of file
+var _0x7e15=['create','Request','CreateVoiceDialReport','../client'];(function(_0x5bff21,_0x17cfa3){var _0x1825a6=function(_0x161dc8){while(--_0x161dc8){_0x5bff21['push'](_0x5bff21['shift']());}};_0x1825a6(++_0x17cfa3);}(_0x7e15,0x14f));var _0x57e1=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x7e15[_0x321bb2];return _0x9c12ed;};'use strict';var client=require(_0x57e1('0x0'));exports[_0x57e1('0x1')]=function(_0x225a8b){return client[_0x57e1('0x2')](_0x57e1('0x3'),{'body':_0x225a8b,'log':_0x57e1('0x3')});};
\ No newline at end of file
index 922a600..dc35125 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a72=['Request','exten','getVoiceExtensions'];(function(_0x47837f,_0x507e0b){var _0x1af92f=function(_0x1482ea){while(--_0x1482ea){_0x47837f['push'](_0x47837f['shift']());}};_0x1af92f(++_0x507e0b);}(_0x7a72,0x1be));var _0x27a7=function(_0x2ed00e,_0xd05221){_0x2ed00e=_0x2ed00e-0x0;var _0x22c9ad=_0x7a72[_0x2ed00e];return _0x22c9ad;};'use strict';var client=require('../client');exports[_0x27a7('0x0')]=function(){return function(){return client[_0x27a7('0x1')]('GetVoiceExtension',{'options':{'raw':!![],'attributes':['id',_0x27a7('0x2'),'recordingFormat'],'where':{'VoiceExtensionId':null}},'log':_0x27a7('0x0')});};};
\ No newline at end of file
+var _0x0901=['exten','recordingFormat','../client','getVoiceExtensions','Request','GetVoiceExtension'];(function(_0x2181cc,_0x38da3a){var _0x34145f=function(_0x5ce602){while(--_0x5ce602){_0x2181cc['push'](_0x2181cc['shift']());}};_0x34145f(++_0x38da3a);}(_0x0901,0x134));var _0x1090=function(_0x1690e9,_0x2fd143){_0x1690e9=_0x1690e9-0x0;var _0x5c3024=_0x0901[_0x1690e9];return _0x5c3024;};'use strict';var client=require(_0x1090('0x0'));exports[_0x1090('0x1')]=function(){return function(){return client[_0x1090('0x2')](_0x1090('0x3'),{'options':{'raw':!![],'attributes':['id',_0x1090('0x4'),_0x1090('0x5')],'where':{'VoiceExtensionId':null}},'log':'getVoiceExtensions'});};};
\ No newline at end of file
index 71e3d15..b7c3e7e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb4b6=['dialAgiAfterHangupAgent','dialAgiAfterHangupClient','dialQueueProject2','strategy','dialRandomLastDigitCallerIdNumber','dialCutDigit','dialNoSuchNumberRetryFrequency','dialDropMaxRetry','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialMachineRetryFrequency','dialAgentRejectMaxRetry','mandatoryDisposition','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','dialPreviewRecallmeReminder','Trunk','callerid','active','Pause','TrunkBackup','Interval','Intervals','../client','getVoiceQueues','Request','GetVoiceQueue','name','acwTimeout','monitor_format','dialActive','dialMethod','dialLimitQueue','dialPowerLevel','dialPredictiveOptimization','dialPredictiveOptimizationPercentage','dialPredictiveInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialOriginateTimeout','dialQueueTimeout','dialQueueProject','dialCongestionMaxRetry','dialBusyRetryFrequency','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialTimezone','dialGlobalInterval','dialPrefix','dialCheckDuplicateType','dialAMDActive','dialAMDInitialSilence','dialAMDGreeting','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDBetweenWordsSilence','dialAMDMaximumNumberOfWords','timeout','dialRecallMeTimeout','dialOrderByScheduledAt'];(function(_0x4789cd,_0x1d18d6){var _0x39f810=function(_0x2bee8b){while(--_0x2bee8b){_0x4789cd['push'](_0x4789cd['shift']());}};_0x39f810(++_0x1d18d6);}(_0xb4b6,0x115));var _0x6b4b=function(_0x46307f,_0x1518e9){_0x46307f=_0x46307f-0x0;var _0x1c47a6=_0xb4b6[_0x46307f];return _0x1c47a6;};'use strict';var client=require(_0x6b4b('0x0'));exports[_0x6b4b('0x1')]=function(){return function(){return client[_0x6b4b('0x2')](_0x6b4b('0x3'),{'options':{'raw':![],'attributes':['id',_0x6b4b('0x4'),'acw',_0x6b4b('0x5'),'autopause',_0x6b4b('0x6'),'type',_0x6b4b('0x7'),_0x6b4b('0x8'),'dialLimitChannel',_0x6b4b('0x9'),_0x6b4b('0xa'),_0x6b4b('0xb'),_0x6b4b('0xc'),_0x6b4b('0xd'),_0x6b4b('0xe'),_0x6b4b('0xf'),_0x6b4b('0x10'),'dialQueueOptions',_0x6b4b('0x11'),_0x6b4b('0x12'),_0x6b4b('0x13'),'dialCongestionRetryFrequency','dialBusyMaxRetry',_0x6b4b('0x14'),'dialNoAnswerMaxRetry',_0x6b4b('0x15'),_0x6b4b('0x16'),_0x6b4b('0x17'),_0x6b4b('0x18'),_0x6b4b('0x19'),_0x6b4b('0x1a'),_0x6b4b('0x1b'),_0x6b4b('0x1c'),_0x6b4b('0x1d'),_0x6b4b('0x1e'),_0x6b4b('0x1f'),_0x6b4b('0x20'),_0x6b4b('0x21'),_0x6b4b('0x22'),'dialAMDSilenceThreshold','dialAMDMaximumWordLength',_0x6b4b('0x23'),_0x6b4b('0x24'),'dialRecallInQueue',_0x6b4b('0x25'),_0x6b4b('0x26'),_0x6b4b('0x27'),_0x6b4b('0x28'),_0x6b4b('0x6'),_0x6b4b('0x29'),_0x6b4b('0x2a'),_0x6b4b('0x2b'),'dialNoSuchNumberMaxRetry',_0x6b4b('0x2c'),_0x6b4b('0x2d'),_0x6b4b('0x2e'),_0x6b4b('0x2f'),_0x6b4b('0x30'),_0x6b4b('0x31'),_0x6b4b('0x32'),_0x6b4b('0x33'),'dialAgentRejectRetryFrequency',_0x6b4b('0x34'),_0x6b4b('0x35'),_0x6b4b('0x36'),'dialPreviewAutoRecallMe',_0x6b4b('0x37')],'include':[{'model':_0x6b4b('0x38'),'as':'Trunk','attributes':['id','name',_0x6b4b('0x39'),_0x6b4b('0x3a')]},{'model':_0x6b4b('0x3b'),'as':'mandatoryDispositionPause','attributes':['id',_0x6b4b('0x4')]},{'model':_0x6b4b('0x38'),'as':_0x6b4b('0x3c'),'attributes':['id','name','callerid',_0x6b4b('0x3a')]},{'model':_0x6b4b('0x3d'),'as':_0x6b4b('0x3d'),'attributes':['id','name'],'include':[{'model':_0x6b4b('0x3d'),'as':_0x6b4b('0x3e'),'attributes':['id',_0x6b4b('0x4'),'interval']}]}]},'log':_0x6b4b('0x1')});};};
\ No newline at end of file
+var _0xf109=['Trunk','active','Pause','mandatoryDispositionPause','Interval','Intervals','interval','getVoiceQueues','../client','Request','GetVoiceQueue','name','acw','acwTimeout','autopause','dialMethod','dialLimitChannel','dialPredictiveOptimization','dialPredictiveInterval','dialOriginateCallerIdName','dialOriginateCallerIdNumber','dialQueueProject','dialCongestionRetryFrequency','dialBusyMaxRetry','dialBusyRetryFrequency','dialNoAnswerMaxRetry','dialNoAnswerRetryFrequency','dialGlobalMaxRetry','dialGlobalInterval','dialPrefix','dialAMDInitialSilence','dialAMDAfterGreetingSilence','dialAMDTotalAnalysisTime','dialAMDMinWordLength','dialAMDMaximumNumberOfWords','dialAMDSilenceThreshold','dialAMDMaximumWordLength','dialRecallMeTimeout','dialRecallInQueue','dialOrderByScheduledAt','dialAgiAfterHangupClient','dialQueueProject2','strategy','dialCutDigit','dialDropRetryFrequency','dialAbandonedMaxRetry','dialAbandonedRetryFrequency','dialMachineMaxRetry','dialAgentRejectMaxRetry','dialAgentRejectRetryFrequency','mandatoryDisposition','dialPredictiveIntervalMaxThreshold','dialPredictiveIntervalMinThreshold','dialPreviewAutoRecallMe','dialPreviewRecallmeReminder'];(function(_0x6982f4,_0x1bdb2d){var _0x4a2a5f=function(_0x432de7){while(--_0x432de7){_0x6982f4['push'](_0x6982f4['shift']());}};_0x4a2a5f(++_0x1bdb2d);}(_0xf109,0x76));var _0x9f10=function(_0x4d613c,_0x55f220){_0x4d613c=_0x4d613c-0x0;var _0x301fe3=_0xf109[_0x4d613c];return _0x301fe3;};'use strict';var client=require(_0x9f10('0x0'));exports['getVoiceQueues']=function(){return function(){return client[_0x9f10('0x1')](_0x9f10('0x2'),{'options':{'raw':![],'attributes':['id',_0x9f10('0x3'),_0x9f10('0x4'),_0x9f10('0x5'),_0x9f10('0x6'),'monitor_format','type','dialActive',_0x9f10('0x7'),_0x9f10('0x8'),'dialLimitQueue','dialPowerLevel',_0x9f10('0x9'),'dialPredictiveOptimizationPercentage',_0x9f10('0xa'),_0x9f10('0xb'),_0x9f10('0xc'),'dialOriginateTimeout','dialQueueOptions','dialQueueTimeout',_0x9f10('0xd'),'dialCongestionMaxRetry',_0x9f10('0xe'),_0x9f10('0xf'),_0x9f10('0x10'),_0x9f10('0x11'),_0x9f10('0x12'),_0x9f10('0x13'),'dialTimezone',_0x9f10('0x14'),_0x9f10('0x15'),'dialCheckDuplicateType','dialAMDActive',_0x9f10('0x16'),'dialAMDGreeting',_0x9f10('0x17'),_0x9f10('0x18'),_0x9f10('0x19'),'dialAMDBetweenWordsSilence',_0x9f10('0x1a'),_0x9f10('0x1b'),_0x9f10('0x1c'),'timeout',_0x9f10('0x1d'),_0x9f10('0x1e'),_0x9f10('0x1f'),'dialAgiAfterHangupAgent',_0x9f10('0x20'),_0x9f10('0x21'),'monitor_format',_0x9f10('0x22'),'dialRandomLastDigitCallerIdNumber',_0x9f10('0x23'),'dialNoSuchNumberMaxRetry','dialNoSuchNumberRetryFrequency','dialDropMaxRetry',_0x9f10('0x24'),_0x9f10('0x25'),_0x9f10('0x26'),_0x9f10('0x27'),'dialMachineRetryFrequency',_0x9f10('0x28'),_0x9f10('0x29'),_0x9f10('0x2a'),_0x9f10('0x2b'),_0x9f10('0x2c'),_0x9f10('0x2d'),_0x9f10('0x2e')],'include':[{'model':_0x9f10('0x2f'),'as':_0x9f10('0x2f'),'attributes':['id',_0x9f10('0x3'),'callerid',_0x9f10('0x30')]},{'model':_0x9f10('0x31'),'as':_0x9f10('0x32'),'attributes':['id',_0x9f10('0x3')]},{'model':'Trunk','as':'TrunkBackup','attributes':['id','name','callerid',_0x9f10('0x30')]},{'model':_0x9f10('0x33'),'as':_0x9f10('0x33'),'attributes':['id','name'],'include':[{'model':_0x9f10('0x33'),'as':_0x9f10('0x34'),'attributes':['id',_0x9f10('0x3'),_0x9f10('0x35')]}]}]},'log':_0x9f10('0x36')});};};
\ No newline at end of file
index 17c6f13..8c4dde1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['queuecallerexit','queuecallerexitAt','moment','lodash','../client','Request','CreateVoiceQueueReport','getVoiceQueueReports','GetVoiceQueueReport','startOf','format','YYYY-MM-DD\x20HH:mm:ss','endOf','queuecallerjoinAt','queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt'];(function(_0x5524b5,_0xf646f5){var _0x392465=function(_0x1d09d9){while(--_0x1d09d9){_0x5524b5['push'](_0x5524b5['shift']());}};_0x392465(++_0xf646f5);}(_0xa9e0,0x123));var _0x0a9e=function(_0x387777,_0x356171){_0x387777=_0x387777-0x0;var _0x3f84c0=_0xa9e0[_0x387777];return _0x3f84c0;};'use strict';var moment=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var client=require(_0x0a9e('0x2'));exports['create']=function(_0x550fbc){return client[_0x0a9e('0x3')]('CreateVoiceQueueReport',{'body':_0x550fbc,'log':_0x0a9e('0x4')});};exports[_0x0a9e('0x5')]=function(){return function(){return client[_0x0a9e('0x3')](_0x0a9e('0x6'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x0a9e('0x7')]('day')[_0x0a9e('0x8')](_0x0a9e('0x9')),moment()[_0x0a9e('0xa')]('day')['format'](_0x0a9e('0x9'))]}},'attributes':['uniqueid','queue',_0x0a9e('0xb'),_0x0a9e('0xc'),_0x0a9e('0xd'),_0x0a9e('0xe'),_0x0a9e('0xf'),_0x0a9e('0x10'),'queuecallerabandon','queuecallerabandonAt']},'log':'GetVoiceQueueReports'});};};
\ No newline at end of file
+var _0xa9e0=['queuecallerexit','queuecallerexitAt','moment','lodash','../client','Request','CreateVoiceQueueReport','getVoiceQueueReports','GetVoiceQueueReport','startOf','format','YYYY-MM-DD\x20HH:mm:ss','endOf','queuecallerjoinAt','queuecallerleaveAt','queuecallercomplete','queuecallercompleteAt'];(function(_0x561f25,_0x17faa2){var _0x5f251a=function(_0x2bbe7e){while(--_0x2bbe7e){_0x561f25['push'](_0x561f25['shift']());}};_0x5f251a(++_0x17faa2);}(_0xa9e0,0x123));var _0x0a9e=function(_0xa1e3e3,_0x29fe0e){_0xa1e3e3=_0xa1e3e3-0x0;var _0xc980e9=_0xa9e0[_0xa1e3e3];return _0xc980e9;};'use strict';var moment=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));var client=require(_0x0a9e('0x2'));exports['create']=function(_0x550fbc){return client[_0x0a9e('0x3')]('CreateVoiceQueueReport',{'body':_0x550fbc,'log':_0x0a9e('0x4')});};exports[_0x0a9e('0x5')]=function(){return function(){return client[_0x0a9e('0x3')](_0x0a9e('0x6'),{'options':{'where':{'createdAt':{'$between':[moment()[_0x0a9e('0x7')]('day')[_0x0a9e('0x8')](_0x0a9e('0x9')),moment()[_0x0a9e('0xa')]('day')['format'](_0x0a9e('0x9'))]}},'attributes':['uniqueid','queue',_0x0a9e('0xb'),_0x0a9e('0xc'),_0x0a9e('0xd'),_0x0a9e('0xe'),_0x0a9e('0xf'),_0x0a9e('0x10'),'queuecallerabandon','queuecallerabandonAt']},'log':'GetVoiceQueueReports'});};};
\ No newline at end of file
index 65669d0..fcd5f75 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x871c=['getVoiceQueueRtPauses','Request'];(function(_0x27206a,_0x20be04){var _0x2169d8=function(_0x436faa){while(--_0x436faa){_0x27206a['push'](_0x27206a['shift']());}};_0x2169d8(++_0x20be04);}(_0x871c,0x1e8));var _0xc871=function(_0xf6a17c,_0x316841){_0xf6a17c=_0xf6a17c-0x0;var _0x525df0=_0x871c[_0xf6a17c];return _0x525df0;};'use strict';var client=require('../client');exports[_0xc871('0x0')]=function(_0xbbf548){return function(){return client[_0xc871('0x1')]('GetVoiceQueueRtPauses',{'options':{'where':{'VoiceQueueId':_0xbbf548,'paused':!![]},'raw':!![]},'log':_0xc871('0x0')});};};
\ No newline at end of file
+var _0x7bcd=['GetVoiceQueueRtPauses','../client','getVoiceQueueRtPauses','Request'];(function(_0x5a6644,_0x45d612){var _0x3a2a5d=function(_0x54159e){while(--_0x54159e){_0x5a6644['push'](_0x5a6644['shift']());}};_0x3a2a5d(++_0x45d612);}(_0x7bcd,0xc5));var _0xd7bc=function(_0x5ef905,_0x564b87){_0x5ef905=_0x5ef905-0x0;var _0x367808=_0x7bcd[_0x5ef905];return _0x367808;};'use strict';var client=require(_0xd7bc('0x0'));exports[_0xd7bc('0x1')]=function(_0x3697f7){return function(){return client[_0xd7bc('0x2')](_0xd7bc('0x3'),{'options':{'where':{'VoiceQueueId':_0x3697f7,'paused':!![]},'raw':!![]},'log':_0xd7bc('0x1')});};};
\ No newline at end of file
index e5c97da..13196c8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9957=['CreateVoiceRecording','merge','monitorFilename','lodash','../client','create'];(function(_0x515c50,_0x58460c){var _0x56e8fe=function(_0x41631b){while(--_0x41631b){_0x515c50['push'](_0x515c50['shift']());}};_0x56e8fe(++_0x58460c);}(_0x9957,0x93));var _0x7995=function(_0x14add3,_0x13ce8d){_0x14add3=_0x14add3-0x0;var _0x4a174f=_0x9957[_0x14add3];return _0x4a174f;};'use strict';var _=require(_0x7995('0x0'));var client=require(_0x7995('0x1'));exports[_0x7995('0x2')]=function(_0x10a05d){return client['Request'](_0x7995('0x3'),{'body':_[_0x7995('0x4')](_0x10a05d,{'value':_0x10a05d[_0x7995('0x5')]}),'log':_0x7995('0x3')});};
\ No newline at end of file
+var _0x7a54=['create','Request','CreateVoiceRecording','monitorFilename','lodash','../client'];(function(_0x5068e3,_0xb3fdd9){var _0x2b5bfc=function(_0x25b585){while(--_0x25b585){_0x5068e3['push'](_0x5068e3['shift']());}};_0x2b5bfc(++_0xb3fdd9);}(_0x7a54,0x106));var _0x47a5=function(_0x18ffd7,_0x23c33e){_0x18ffd7=_0x18ffd7-0x0;var _0xca2d89=_0x7a54[_0x18ffd7];return _0xca2d89;};'use strict';var _=require(_0x47a5('0x0'));var client=require(_0x47a5('0x1'));exports[_0x47a5('0x2')]=function(_0x58157c){return client[_0x47a5('0x3')](_0x47a5('0x4'),{'body':_['merge'](_0x58157c,{'value':_0x58157c[_0x47a5('0x5')]}),'log':_0x47a5('0x4')});};
\ No newline at end of file
index 057ce48..acfb615 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfb66=['transfertargetcalleridnum','transfertargetcalleridname','transfertargetaccountcode','transfertargetcontext','transfertargetlinkedid','origtransfererexten','attended','blindTransfer','Request','CreateVoiceTransferReport','result','transfererchannel','transferercalleridname','transfererconnectedlinenum','transfereraccountcode','transferercontext','transfererlinkedid','transfereechannel','transfereeconnectedlinenum','transfereeaccountcode','transfereeexten','isexternal','context','extension','blind','origtransfererchannel','origtransferercalleridnum','secondtransfererconnectedlinenum','origtransfereraccountcode','secondtransferercontext','secondtransfererexten','origtransfererlinkedid'];(function(_0x28cb85,_0x2e100c){var _0x225eef=function(_0x1948de){while(--_0x1948de){_0x28cb85['push'](_0x28cb85['shift']());}};_0x225eef(++_0x2e100c);}(_0xfb66,0x1e7));var _0x6fb6=function(_0x173441,_0x26b0d9){_0x173441=_0x173441-0x0;var _0x2423a8=_0xfb66[_0x173441];return _0x2423a8;};'use strict';var client=require('../client');exports['transfers']={};exports[_0x6fb6('0x0')]=function(_0x145d7c){return client[_0x6fb6('0x1')](_0x6fb6('0x2'),{'body':{'result':_0x145d7c[_0x6fb6('0x3')],'transfererchannel':_0x145d7c[_0x6fb6('0x4')],'transferercalleridnum':_0x145d7c['transferercalleridnum'],'transferercalleridname':_0x145d7c[_0x6fb6('0x5')],'transfererconnectedlinenum':_0x145d7c[_0x6fb6('0x6')],'transfererconnectedlinename':_0x145d7c['transfererconnectedlinename'],'transfereraccountcode':_0x145d7c[_0x6fb6('0x7')],'transferercontext':_0x145d7c[_0x6fb6('0x8')],'transfererexten':_0x145d7c['transfererexten'],'transfererlinkedid':_0x145d7c[_0x6fb6('0x9')],'transfereechannel':_0x145d7c[_0x6fb6('0xa')],'transfereecalleridnum':_0x145d7c['transfereecalleridnum'],'transfereecalleridname':_0x145d7c['transfereecalleridname'],'transfereeconnectedlinenum':_0x145d7c[_0x6fb6('0xb')],'transfereeconnectedlinename':_0x145d7c['transfereeconnectedlinename'],'transfereeaccountcode':_0x145d7c[_0x6fb6('0xc')],'transfereecontext':_0x145d7c['transfereecontext'],'transfereeexten':_0x145d7c[_0x6fb6('0xd')],'transfereelinkedid':_0x145d7c['transfereelinkedid'],'isexternal':_0x145d7c[_0x6fb6('0xe')],'context':_0x145d7c[_0x6fb6('0xf')],'extension':_0x145d7c[_0x6fb6('0x10')],'type':_0x6fb6('0x11')},'log':'CreateVoiceTransferReport'});};exports['attendedTransfer']=function(_0x572632){return client[_0x6fb6('0x1')](_0x6fb6('0x2'),{'body':{'result':_0x572632['result'],'transfererchannel':_0x572632[_0x6fb6('0x12')],'transferercalleridnum':_0x572632[_0x6fb6('0x13')],'transferercalleridname':_0x572632['origtransferercalleridname'],'transfererconnectedlinenum':_0x572632[_0x6fb6('0x14')],'transfererconnectedlinename':_0x572632['secondtransfererconnectedlinename'],'transfereraccountcode':_0x572632[_0x6fb6('0x15')],'transferercontext':_0x572632[_0x6fb6('0x16')],'transfererexten':_0x572632[_0x6fb6('0x17')],'transfererlinkedid':_0x572632[_0x6fb6('0x18')],'transfereechannel':_0x572632['transfertargetchannel'],'transfereecalleridnum':_0x572632[_0x6fb6('0x19')],'transfereecalleridname':_0x572632[_0x6fb6('0x1a')],'transfereeconnectedlinenum':_0x572632['transfertargetconnectedlinenum'],'transfereeconnectedlinename':_0x572632['transfertargetconnectedlinename'],'transfereeaccountcode':_0x572632[_0x6fb6('0x1b')],'transfereecontext':_0x572632[_0x6fb6('0x1c')],'transfereeexten':_0x572632['transfertargetexten'],'transfereelinkedid':_0x572632[_0x6fb6('0x1d')],'isexternal':_0x572632[_0x6fb6('0xe')],'context':_0x572632['origtransferercontext'],'extension':_0x572632[_0x6fb6('0x1e')],'type':_0x6fb6('0x1f')},'log':_0x6fb6('0x2')});};
\ No newline at end of file
+var _0x1f08=['transfererexten','transfererlinkedid','transfereechannel','transfereecalleridnum','transfereecalleridname','transfereeconnectedlinename','transfereecontext','transfereeexten','isexternal','context','blind','attendedTransfer','origtransfererchannel','origtransferercalleridname','secondtransfererconnectedlinenum','origtransfereraccountcode','secondtransferercontext','secondtransfererexten','origtransfererlinkedid','transfertargetchannel','transfertargetcalleridnum','transfertargetcalleridname','transfertargetaccountcode','transfertargetcontext','transfertargetexten','origtransferercontext','origtransfererexten','attended','../client','transfers','blindTransfer','Request','CreateVoiceTransferReport','result','transfererchannel','transferercalleridnum','transferercalleridname','transfererconnectedlinenum','transfererconnectedlinename','transferercontext'];(function(_0x411add,_0x1aed38){var _0x238242=function(_0x4a1cd5){while(--_0x4a1cd5){_0x411add['push'](_0x411add['shift']());}};_0x238242(++_0x1aed38);}(_0x1f08,0x1d4));var _0x81f0=function(_0x281ef5,_0x597db6){_0x281ef5=_0x281ef5-0x0;var _0x3be7dc=_0x1f08[_0x281ef5];return _0x3be7dc;};'use strict';var client=require(_0x81f0('0x0'));exports[_0x81f0('0x1')]={};exports[_0x81f0('0x2')]=function(_0x1254db){return client[_0x81f0('0x3')](_0x81f0('0x4'),{'body':{'result':_0x1254db[_0x81f0('0x5')],'transfererchannel':_0x1254db[_0x81f0('0x6')],'transferercalleridnum':_0x1254db[_0x81f0('0x7')],'transferercalleridname':_0x1254db[_0x81f0('0x8')],'transfererconnectedlinenum':_0x1254db[_0x81f0('0x9')],'transfererconnectedlinename':_0x1254db[_0x81f0('0xa')],'transfereraccountcode':_0x1254db['transfereraccountcode'],'transferercontext':_0x1254db[_0x81f0('0xb')],'transfererexten':_0x1254db[_0x81f0('0xc')],'transfererlinkedid':_0x1254db[_0x81f0('0xd')],'transfereechannel':_0x1254db[_0x81f0('0xe')],'transfereecalleridnum':_0x1254db[_0x81f0('0xf')],'transfereecalleridname':_0x1254db[_0x81f0('0x10')],'transfereeconnectedlinenum':_0x1254db['transfereeconnectedlinenum'],'transfereeconnectedlinename':_0x1254db[_0x81f0('0x11')],'transfereeaccountcode':_0x1254db['transfereeaccountcode'],'transfereecontext':_0x1254db[_0x81f0('0x12')],'transfereeexten':_0x1254db[_0x81f0('0x13')],'transfereelinkedid':_0x1254db['transfereelinkedid'],'isexternal':_0x1254db[_0x81f0('0x14')],'context':_0x1254db[_0x81f0('0x15')],'extension':_0x1254db['extension'],'type':_0x81f0('0x16')},'log':_0x81f0('0x4')});};exports[_0x81f0('0x17')]=function(_0x4dd812){return client['Request'](_0x81f0('0x4'),{'body':{'result':_0x4dd812['result'],'transfererchannel':_0x4dd812[_0x81f0('0x18')],'transferercalleridnum':_0x4dd812['origtransferercalleridnum'],'transferercalleridname':_0x4dd812[_0x81f0('0x19')],'transfererconnectedlinenum':_0x4dd812[_0x81f0('0x1a')],'transfererconnectedlinename':_0x4dd812['secondtransfererconnectedlinename'],'transfereraccountcode':_0x4dd812[_0x81f0('0x1b')],'transferercontext':_0x4dd812[_0x81f0('0x1c')],'transfererexten':_0x4dd812[_0x81f0('0x1d')],'transfererlinkedid':_0x4dd812[_0x81f0('0x1e')],'transfereechannel':_0x4dd812[_0x81f0('0x1f')],'transfereecalleridnum':_0x4dd812[_0x81f0('0x20')],'transfereecalleridname':_0x4dd812[_0x81f0('0x21')],'transfereeconnectedlinenum':_0x4dd812['transfertargetconnectedlinenum'],'transfereeconnectedlinename':_0x4dd812['transfertargetconnectedlinename'],'transfereeaccountcode':_0x4dd812[_0x81f0('0x22')],'transfereecontext':_0x4dd812[_0x81f0('0x23')],'transfereeexten':_0x4dd812[_0x81f0('0x24')],'transfereelinkedid':_0x4dd812['transfertargetlinkedid'],'isexternal':_0x4dd812[_0x81f0('0x14')],'context':_0x4dd812[_0x81f0('0x25')],'extension':_0x4dd812[_0x81f0('0x26')],'type':_0x81f0('0x27')},'log':'CreateVoiceTransferReport'});};
\ No newline at end of file
index 1cd6e27..8420e4e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb10b=['type','Invalid\x20type\x20parameter.\x20Allowed\x20values:\x20inbound,\x20outbound','filter','count','rows','voicequeuechannel','voicequeuechannelhangup','Hangup','voicequeuechannelredirect','Redirect','telephones','trunks','run','event','Event\x20name\x20mandatory','faxAccounts','send','checkAfterSend','server','http','127.0.0.1','RPC\x20listening\x20on\x20port:','lodash','jayson/promise','validate','moment','../properties','../ami','../model/voiceQueueSummary','listen','format','%s/%s','SIP','name','timers','timer','updateAcw','agents','voiceStatus','pause','QueuePause','isConnected','error','asterisk','username','ami\x20disconnected','join','pick','keys','module','action','Reload','Action','then','message','catch','command','Command','content','voiceQueues','hasOwnProperty','push','length','find','omit','undefined','values','voicechannel','map','channels','uniqueid','channel','%s.%s','filename','wav','ai(mixmonitorid)','/var/spool/asterisk/monitor/','toLowerCase','mixmonitorid','rec','status','MixMonitor\x20Success','Channel\x20doesn\x27t\x20exist','resolve','StopMixMonitor','destinationchannel','monitors','stop','queueChannels','inbound','outbound','includes'];(function(_0x47f4b0,_0x18a2db){var _0x484b9c=function(_0x2ca88e){while(--_0x2ca88e){_0x47f4b0['push'](_0x47f4b0['shift']());}};_0x484b9c(++_0x18a2db);}(_0xb10b,0x12a));var _0xbb10=function(_0x99d37,_0x4e7974){_0x99d37=_0x99d37-0x0;var _0x2db098=_0xb10b[_0x99d37];return _0x2db098;};'use strict';var _=require(_0xbb10('0x0'));var util=require('util');var jayson=require(_0xbb10('0x1'));var schema=require(_0xbb10('0x2'));var moment=require(_0xbb10('0x3'));var config=require('../../../config/environment');var properties=require(_0xbb10('0x4'));var ami=require(_0xbb10('0x5'));var VoiceQueueSummary=require(_0xbb10('0x6'));exports[_0xbb10('0x7')]=function(_0x49baf4,_0x312b72,_0x481979){return new Promise(function(_0x328583,_0x3cdd53){var _0x513741={'QueuePause':function(_0x1b9e94){return new Promise(function(_0x3fb675){var _0x21370f=util[_0xbb10('0x8')](_0xbb10('0x9'),_0xbb10('0xa'),_0x1b9e94[_0xbb10('0xb')]);if(_0x49baf4[_0xbb10('0xc')]&&_0x49baf4['timers'][_0x21370f]&&_0x49baf4['timers'][_0x21370f][_0xbb10('0xd')]){_0x49baf4[_0xbb10('0xc')][_0x21370f][_0xbb10('0xe')]();}if(_0x49baf4['agents'][_0x21370f]){_0x49baf4[_0xbb10('0xf')][_0x21370f]['updateStatusRealtime']({'state':_0x49baf4[_0xbb10('0xf')][_0x21370f][_0xbb10('0x10')],'statePause':_0x1b9e94[_0xbb10('0x11')]?!![]:![]});}_0x3fb675({'code':0xc8,'message':_0xbb10('0x12')});});},'Reload':function(_0x442548){var _0x147230=this;return new Promise(function(_0x58a612,_0x26e021){if(ami[_0xbb10('0x13')]()==![]){return _0x26e021(_0x147230[_0xbb10('0x14')](0x1f4,[config[_0xbb10('0x15')]['ip'],config[_0xbb10('0x15')][_0xbb10('0x16')],_0xbb10('0x17')][_0xbb10('0x18')]('\x20')));}_0x442548=_[_0xbb10('0x19')](_0x442548,_[_0xbb10('0x1a')](properties['reload'][_0xbb10('0x1b')]));_0x442548[_0xbb10('0x1c')]=_0xbb10('0x1d');return ami[_0xbb10('0x1e')](_0x442548)[_0xbb10('0x1f')](function(_0x1682a4){_0x58a612({'code':0xc8,'message':_0x1682a4[_0xbb10('0x20')]});})[_0xbb10('0x21')](function(_0xbf2906){_0x26e021(_0x147230[_0xbb10('0x14')](0x1f5,_0xbf2906['message']));});});},'Command':function(_0x5ff0cf){var _0x19f48d=this;return new Promise(function(_0x388fab,_0x109908){if(ami[_0xbb10('0x13')]()==![]){return _0x109908(_0x19f48d[_0xbb10('0x14')](0x1f4,[config['asterisk']['ip'],config[_0xbb10('0x15')][_0xbb10('0x16')],'ami\x20disconnected']['join']('\x20')));}_0x5ff0cf=_[_0xbb10('0x19')](_0x5ff0cf,_0xbb10('0x22'));_0x5ff0cf[_0xbb10('0x1c')]=_0xbb10('0x23');return ami[_0xbb10('0x1e')](_0x5ff0cf)[_0xbb10('0x1f')](function(_0x407cb4){_0x388fab({'code':0xc8,'message':_0x407cb4[_0xbb10('0x24')]});})[_0xbb10('0x21')](function(_0x395404){_0x109908(_0x19f48d[_0xbb10('0x14')](0x1f5,_0x395404[_0xbb10('0x20')]));});});},'VoiceQueues':function(){return new Promise(function(_0x537898){var _0x4fedac=[];for(var _0x4fb5e0 in _0x49baf4[_0xbb10('0x25')]){if(_0x49baf4[_0xbb10('0x25')][_0xbb10('0x26')](_0x4fb5e0)){var _0x4e25ff=_0x49baf4[_0xbb10('0x25')][_0x4fb5e0];var _0x24d586=new VoiceQueueSummary(_0x4e25ff);_0x4fedac[_0xbb10('0x27')](_0x24d586);}}_0x537898({'count':_0x4fedac[_0xbb10('0x28')],'rows':_0x4fedac});});},'UpdateVoiceQueue':function(_0x1acce9){return new Promise(function(_0x20d946,_0x2a0e8b){var _0x4aabb9=_[_0xbb10('0x29')](_0x49baf4[_0xbb10('0x25')],{'id':parseInt(_0x1acce9['id'])});var _0xfc3595=_[_0xbb10('0x2a')](_0x1acce9,['id']);if(_0x4aabb9){for(var _0x1d30aa in _0xfc3595){if(typeof _0xfc3595[_0x1d30aa]!==_0xbb10('0x2b')&&typeof _0x4aabb9[_0x1d30aa]!=='undefined'){_0x4aabb9[_0x1d30aa]=_0xfc3595[_0x1d30aa];}}_0x20d946(_0x4aabb9);}else{_0x2a0e8b();}});},'VoiceChannels':function(){return new Promise(function(_0x221624){var _0x4ee02e=_[_0xbb10('0x2c')](_0x49baf4['channels']);_0x221624({'count':_0x4ee02e[_0xbb10('0x28')],'rows':_0x4ee02e});});},'VoiceChannelMixMonitor':function(_0x1dcc9c){var _0x1b59f9=this;return new Promise(function(_0x491db4,_0x518d47){if(ami[_0xbb10('0x13')]()==![]){return _0x518d47(_0x1b59f9[_0xbb10('0x14')](0x1f4,[config['asterisk']['ip'],config[_0xbb10('0x15')][_0xbb10('0x16')],_0xbb10('0x17')][_0xbb10('0x18')]('\x20')));}var _0x37a83f=schema(properties[_0xbb10('0x2d')])[_0xbb10('0x2')](_0x1dcc9c);if(_0x37a83f['length']>0x0){return _0x518d47(_0x1b59f9[_0xbb10('0x14')](0x1f4,_[_0xbb10('0x2e')](_0x37a83f,_0xbb10('0x20'))[_0xbb10('0x18')](',\x20')));}var _0xfb2c5e=_[_0xbb10('0x29')](_0x49baf4[_0xbb10('0x2f')],{'uniqueid':_0x1dcc9c[_0xbb10('0x30')]});if(_0xfb2c5e&&_0xfb2c5e[_0xbb10('0x31')]){var _0x56943c=util[_0xbb10('0x8')](_0xbb10('0x32'),_0x1dcc9c[_0xbb10('0x33')]||_0x1dcc9c[_0xbb10('0x30')],_0x1dcc9c['format']||_0xbb10('0x34'));return ami['Action']({'action':'MixMonitor','channel':_0xfb2c5e[_0xbb10('0x31')],'file':_0x56943c,'options':_0xbb10('0x35')})[_0xbb10('0x1f')](function(_0x120d21){var _0x15d895=_[_0xbb10('0x29')](_0xfb2c5e['monitors'],{'filename':_0xbb10('0x36')+_0x56943c[_0xbb10('0x37')]()});if(_['isNil'](_0x15d895)){_0xfb2c5e['monitors']['push']({'filename':_0xbb10('0x36')+_0x56943c[_0xbb10('0x37')](),'createdAt':moment()[_0xbb10('0x8')]('YYYY-MM-DD\x20HH:mm:ss'),'mixmonitorid':_0x120d21[_0xbb10('0x38')],'status':_0xbb10('0x39')});}else{_0x15d895[_0xbb10('0x38')]=_0x120d21['mixmonitorid'];_0x15d895[_0xbb10('0x3a')]=_0xbb10('0x39');}_0x491db4({'code':0xc8,'message':[_0x1dcc9c[_0xbb10('0x30')],_0xbb10('0x3b'),_0x120d21['mixmonitorid']][_0xbb10('0x18')]('\x20'),'mixmonitorid':_0x120d21[_0xbb10('0x38')]});})['catch'](function(_0xe2040f){_0x518d47(_0x1b59f9[_0xbb10('0x14')](0x1f5,[_0x1dcc9c[_0xbb10('0x30')],_0xe2040f[_0xbb10('0x20')][_0xbb10('0x37')]()][_0xbb10('0x18')]('\x20')));});}else{return _0x518d47(_0x1b59f9['error'](0x1f5,_0xbb10('0x3c')));}});},'VoiceChannelStopMixMonitor':function(_0x1c7fae){var _0x3e7b4c=this;return new Promise(function(_0x3d3c41,_0x4943d9){if(ami[_0xbb10('0x13')]()==![]){return _0x4943d9(_0x3e7b4c[_0xbb10('0x14')](0x1f4,[config[_0xbb10('0x15')]['ip'],config[_0xbb10('0x15')]['username'],_0xbb10('0x17')][_0xbb10('0x18')]('\x20')));}var _0x54ac18=schema(properties['voicechannel'])[_0xbb10('0x2')](_0x1c7fae);if(_0x54ac18['length']>0x0){return _0x4943d9(_0x3e7b4c[_0xbb10('0x14')](0x1f4,_[_0xbb10('0x2e')](_0x54ac18,'message')[_0xbb10('0x18')](',\x20')));}var _0x1d82bf=_[_0xbb10('0x29')](_0x49baf4['channels'],{'uniqueid':_0x1c7fae[_0xbb10('0x30')]});if(_0x1d82bf){return Promise[_0xbb10('0x3d')]()[_0xbb10('0x1f')](function(){if(_0x1d82bf[_0xbb10('0x31')]){return ami[_0xbb10('0x1e')]({'action':_0xbb10('0x3e'),'channel':_0x1d82bf[_0xbb10('0x31')],'mixmonitorid':_0x1c7fae[_0xbb10('0x38')]})[_0xbb10('0x21')](function(){});}})[_0xbb10('0x1f')](function(){if(_0x1d82bf[_0xbb10('0x3f')]){return ami[_0xbb10('0x1e')]({'action':'StopMixMonitor','channel':_0x1d82bf[_0xbb10('0x3f')],'mixmonitorid':_0x1c7fae[_0xbb10('0x38')]})['catch'](function(){});}})[_0xbb10('0x1f')](function(){var _0x2f5027=_[_0xbb10('0x29')](_0x1d82bf[_0xbb10('0x40')],{'mixmonitorid':_0x1c7fae[_0xbb10('0x38')]});if(_0x2f5027){_0x2f5027[_0xbb10('0x3a')]=_0xbb10('0x41');}})['then'](function(){var _0x4a9793=util[_0xbb10('0x8')](_0xbb10('0x32'),_0x1c7fae[_0xbb10('0x33')]||_0x1c7fae['uniqueid'],_0x1c7fae['format']||_0xbb10('0x34'));var _0x34cf4e=_[_0xbb10('0x29')](_0x1d82bf[_0xbb10('0x40')],{'filename':_0xbb10('0x36')+_0x4a9793[_0xbb10('0x37')]()});if(_0x34cf4e){_0x34cf4e[_0xbb10('0x3a')]=_0xbb10('0x41');}})[_0xbb10('0x1f')](function(){_0x3d3c41({'code':0xc8,'message':[_0x1c7fae[_0xbb10('0x30')],'StopMixMonitor\x20Success']['join']('\x20')});})[_0xbb10('0x21')](function(_0x467dba){_0x4943d9(_0x3e7b4c[_0xbb10('0x14')](0x1f5,[_0x1c7fae[_0xbb10('0x30')],_0x467dba[_0xbb10('0x20')][_0xbb10('0x37')]()][_0xbb10('0x18')]('\x20')));});}else{return _0x4943d9(_0x3e7b4c[_0xbb10('0x14')](0x1f5,_0xbb10('0x3c')));}});},'VoiceQueuesChannels':function(_0x1214f7){var _0x19ca3e=this;return new Promise(function(_0x20e18a){var _0x61e689=_[_0xbb10('0x2c')](_0x49baf4[_0xbb10('0x42')]);var _0x547a7a={'count':_0x61e689[_0xbb10('0x28')],'rows':_0x61e689};if(_0x1214f7&&_0x1214f7['type']){if(![_0xbb10('0x43'),_0xbb10('0x44')][_0xbb10('0x45')](_0x1214f7[_0xbb10('0x46')])){return _0x3cdd53(_0x19ca3e[_0xbb10('0x14')](0x190,_0xbb10('0x47')));}var _0x2e3326=_[_0xbb10('0x48')](_0x61e689,function(_0x180400){return _0x180400[_0xbb10('0x46')]===_0x1214f7[_0xbb10('0x46')];});_0x547a7a[_0xbb10('0x49')]=_0x2e3326[_0xbb10('0x28')];_0x547a7a[_0xbb10('0x4a')]=_0x2e3326;}_0x20e18a(_0x547a7a);});},'VoiceQueuesChannel':function(_0x4475e1){var _0x5de0cc=this;return new Promise(function(_0x4571b6,_0x466eb7){var _0x1b83a9=schema(properties[_0xbb10('0x4b')])[_0xbb10('0x2')](_0x4475e1);if(_0x1b83a9[_0xbb10('0x28')]>0x0){return _0x466eb7(_0x5de0cc['error'](0x1f4,_[_0xbb10('0x2e')](_0x1b83a9,_0xbb10('0x20'))[_0xbb10('0x18')](',\x20')));}var _0x14fed3=_[_0xbb10('0x29')](_0x49baf4[_0xbb10('0x42')],{'uniqueid':_0x4475e1[_0xbb10('0x30')]});if(_0x14fed3){_0x4571b6(_0x14fed3);}else{return _0x466eb7(_0x5de0cc[_0xbb10('0x14')](0x1f5,_0xbb10('0x3c')));}});},'VoiceQueuesChannelHangup':function(_0x40c4fb){var _0x2eb05a=this;return new Promise(function(_0x2a1ce1,_0x16932f){if(ami['isConnected']()==![]){return _0x16932f(_0x2eb05a['error'](0x1f4,[config[_0xbb10('0x15')]['ip'],config[_0xbb10('0x15')][_0xbb10('0x16')],_0xbb10('0x17')]['join']('\x20')));}var _0x506498=schema(properties[_0xbb10('0x4c')])[_0xbb10('0x2')](_0x40c4fb);if(_0x506498[_0xbb10('0x28')]>0x0){return _0x16932f(_0x2eb05a[_0xbb10('0x14')](0x1f4,_[_0xbb10('0x2e')](_0x506498,_0xbb10('0x20'))[_0xbb10('0x18')](',\x20')));}var _0x4a5fb9=_[_0xbb10('0x29')](_0x49baf4[_0xbb10('0x42')],{'uniqueid':_0x40c4fb['uniqueid']});if(_0x4a5fb9&&_0x4a5fb9['channel']){return ami['Action']({'action':_0xbb10('0x4d'),'channel':_0x4a5fb9[_0xbb10('0x31')]})[_0xbb10('0x1f')](function(_0x5bd1c0){_0x2a1ce1({'code':0xc8,'message':[_0x40c4fb['uniqueid'],_0x5bd1c0['message'][_0xbb10('0x37')]()][_0xbb10('0x18')]('\x20')});})[_0xbb10('0x21')](function(_0x4e9fbd){_0x16932f(_0x2eb05a[_0xbb10('0x14')](0x1f5,[_0x40c4fb[_0xbb10('0x30')],_0x4e9fbd['message']['toLowerCase']()][_0xbb10('0x18')]('\x20')));});}else{return _0x16932f(_0x2eb05a[_0xbb10('0x14')](0x1f5,_0xbb10('0x3c')));}});},'VoiceQueuesChannelRedirect':function(_0x237246){var _0x54b7c5=this;return new Promise(function(_0x43eaec,_0xec48ac){if(ami[_0xbb10('0x13')]()==![]){return _0xec48ac(_0x54b7c5['error'](0x1f4,[config[_0xbb10('0x15')]['ip'],config[_0xbb10('0x15')][_0xbb10('0x16')],'ami\x20disconnected'][_0xbb10('0x18')]('\x20')));}var _0x31e85e=schema(properties[_0xbb10('0x4e')])[_0xbb10('0x2')](_0x237246);if(_0x31e85e['length']>0x0){return _0xec48ac(_0x54b7c5[_0xbb10('0x14')](0x1f4,_[_0xbb10('0x2e')](_0x31e85e,_0xbb10('0x20'))[_0xbb10('0x18')](',\x20')));}var _0x56b3a3=_[_0xbb10('0x29')](_0x49baf4[_0xbb10('0x42')],{'uniqueid':_0x237246[_0xbb10('0x30')]});if(_0x56b3a3&&_0x56b3a3[_0xbb10('0x31')]){return ami[_0xbb10('0x1e')]({'action':_0xbb10('0x4f'),'channel':_0x56b3a3[_0xbb10('0x31')],'exten':_0x237246['exten'],'context':_0x237246['context']||_0x56b3a3['context'],'priority':0x1})[_0xbb10('0x1f')](function(_0x9c672d){_0x43eaec({'code':0xc8,'message':[_0x237246[_0xbb10('0x30')],_0x9c672d['message']['toLowerCase']()][_0xbb10('0x18')]('\x20')});})[_0xbb10('0x21')](function(_0xd9e743){_0xec48ac(_0x54b7c5[_0xbb10('0x14')](0x1f5,[_0x237246[_0xbb10('0x30')],_0xd9e743[_0xbb10('0x20')]['toLowerCase']()][_0xbb10('0x18')]('\x20')));});}else{return _0xec48ac(_0x54b7c5[_0xbb10('0x14')](0x1f5,_0xbb10('0x3c')));}});},'Agents':function(_0x14f16b){return new Promise(function(_0x2aaaa6){var _0x5bfc68=_['values'](_0x49baf4['agents']);if(_0x14f16b&&_0x14f16b['id']){var _0x329da7=_[_0xbb10('0x29')](_0x5bfc68,function(_0x36917f){return _0x36917f['id']===_0x14f16b['id'];});_0x2aaaa6(_0x329da7);}else{_0x2aaaa6({'count':_0x5bfc68[_0xbb10('0x28')],'rows':_0x5bfc68});}});},'Telephones':function(){return new Promise(function(_0x2f7d2a){var _0x1d40b8=_['values'](_0x49baf4[_0xbb10('0x50')]);_0x2f7d2a({'count':_0x1d40b8['length'],'rows':_0x1d40b8});});},'Trunks':function(){return new Promise(function(_0x4fe3b5){var _0x519a54=_[_0xbb10('0x2c')](_0x49baf4[_0xbb10('0x51')]);_0x4fe3b5({'count':_0x519a54[_0xbb10('0x28')],'rows':_0x519a54});});},'OutboundChannels':function(){return new Promise(function(_0x108f99){var _0x5ce94f=_[_0xbb10('0x2c')](_0x49baf4['outboundChannels']);_0x108f99({'count':_0x5ce94f['length'],'rows':_0x5ce94f});});},'Outbound':function(){return new Promise(function(_0x165fe9){_0x165fe9(_0x49baf4[_0xbb10('0x44')]);});},'Campaigns':function(){return new Promise(function(_0x29529c){var _0x2bd2ab=_[_0xbb10('0x2c')](_0x49baf4['campaigns']);_0x29529c({'count':_0x2bd2ab[_0xbb10('0x28')],'rows':_0x2bd2ab});});},'VoiceQueuesPreview':function(_0x19fcec){var _0x2c6429=this;return new Promise(function(_0x3f3d38,_0x43cdb7){_0x312b72[_0xbb10('0x52')](_0x19fcec['id'])[_0xbb10('0x1f')](function(_0x53fa98){_0x3f3d38({'code':0xc8,'message':_0x53fa98[_0xbb10('0x20')]});})[_0xbb10('0x21')](function(_0x30f3ea){_0x43cdb7(_0x2c6429[_0xbb10('0x14')](0x1f4,_0x30f3ea[_0xbb10('0x20')]));});});},'EventManager':function(_0x172be3){var _0xa3b23=this;return new Promise(function(_0x312a08,_0x5a4429){if(!_0x172be3[_0xbb10('0x53')]){return _0x5a4429(_0xa3b23[_0xbb10('0x14')](0x1f4,_0xbb10('0x54')));}ami['emit']('custom:'+_0x172be3['event'],_0x172be3[_0xbb10('0x20')]);_0x312a08({'code':0xc8,'message':_0x172be3});});},'FaxAccounts':function(){return new Promise(function(_0x5a3c44){var _0x4e3d6a=_[_0xbb10('0x2c')](_0x49baf4[_0xbb10('0x55')]);_0x5a3c44({'count':_0x4e3d6a[_0xbb10('0x28')],'rows':_0x4e3d6a});});},'SendFax':function(_0x12ed63){var _0x32ec27=this;return new Promise(function(_0x24dca6,_0x33116){_0x481979[_0xbb10('0x56')](_0x12ed63)[_0xbb10('0x1f')](function(_0x5206e1){_0x24dca6({'code':0xc8,'message':_0x5206e1[_0xbb10('0x20')]});})[_0xbb10('0x21')](function(_0x46b6d2){_0x33116(_0x32ec27[_0xbb10('0x14')](0x1f4,_0x46b6d2['message']));});});},'CheckAfterSend':function(_0x4c0795){var _0x3547a3=this;return new Promise(function(_0x2280bd,_0x30f0a4){_0x481979[_0xbb10('0x57')](_0x4c0795)['then'](function(_0x17d596){_0x2280bd({'code':0xc8,'message':_0x17d596[_0xbb10('0x20')]});})[_0xbb10('0x21')](function(_0xf7b3e1){_0x30f0a4(_0x3547a3[_0xbb10('0x14')](0x1f4,_0xf7b3e1['message']));});});}};var _0x5f0691=jayson[_0xbb10('0x58')](_0x513741)[_0xbb10('0x59')]();_0x5f0691['on'](_0xbb10('0x14'),function(_0x5239da){return _0x3cdd53(_0x5239da);});_0x5f0691[_0xbb10('0x7')](0x232a,_0xbb10('0x5a'),function(){console['log']('AMI\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!',0x232a);return _0x328583(_0xbb10('0x5b')+0x232a);});});};
\ No newline at end of file
+var _0x7a54=['http','127.0.0.1','log','RPC\x20listening\x20on\x20port:','lodash','util','jayson/promise','moment','../../../config/environment','../ami','../model/voiceQueueSummary','listen','name','timers','updateAcw','agents','updateStatusRealtime','voiceStatus','pause','isConnected','error','asterisk','ami\x20disconnected','join','pick','keys','reload','Reload','message','catch','username','command','action','Command','then','voiceQueues','hasOwnProperty','push','length','find','omit','undefined','values','channels','validate','map','uniqueid','channel','format','wav','MixMonitor','ai(mixmonitorid)','monitors','/var/spool/asterisk/monitor/','isNil','toLowerCase','mixmonitorid','rec','status','Channel\x20doesn\x27t\x20exist','Action','StopMixMonitor','destinationchannel','stop','filename','queueChannels','type','outbound','includes','Invalid\x20type\x20parameter.\x20Allowed\x20values:\x20inbound,\x20outbound','filter','count','rows','voicequeuechannelhangup','voicequeuechannelredirect','Redirect','exten','context','telephones','trunks','outboundChannels','run','custom:','event','faxAccounts','send'];(function(_0x1dd9cf,_0x3317ea){var _0x9e3644=function(_0x5bd5a5){while(--_0x5bd5a5){_0x1dd9cf['push'](_0x1dd9cf['shift']());}};_0x9e3644(++_0x3317ea);}(_0x7a54,0x106));var _0x47a5=function(_0x996643,_0x40e4ef){_0x996643=_0x996643-0x0;var _0x2b213c=_0x7a54[_0x996643];return _0x2b213c;};'use strict';var _=require(_0x47a5('0x0'));var util=require(_0x47a5('0x1'));var jayson=require(_0x47a5('0x2'));var schema=require('validate');var moment=require(_0x47a5('0x3'));var config=require(_0x47a5('0x4'));var properties=require('../properties');var ami=require(_0x47a5('0x5'));var VoiceQueueSummary=require(_0x47a5('0x6'));exports[_0x47a5('0x7')]=function(_0x3717e1,_0xfdf934,_0x545a97){return new Promise(function(_0x3d5629,_0x59199c){var _0x343372={'QueuePause':function(_0x30e405){return new Promise(function(_0x506eda){var _0x194fb0=util['format']('%s/%s','SIP',_0x30e405[_0x47a5('0x8')]);if(_0x3717e1[_0x47a5('0x9')]&&_0x3717e1['timers'][_0x194fb0]&&_0x3717e1[_0x47a5('0x9')][_0x194fb0]['timer']){_0x3717e1['timers'][_0x194fb0][_0x47a5('0xa')]();}if(_0x3717e1[_0x47a5('0xb')][_0x194fb0]){_0x3717e1[_0x47a5('0xb')][_0x194fb0][_0x47a5('0xc')]({'state':_0x3717e1[_0x47a5('0xb')][_0x194fb0][_0x47a5('0xd')],'statePause':_0x30e405[_0x47a5('0xe')]?!![]:![]});}_0x506eda({'code':0xc8,'message':'QueuePause'});});},'Reload':function(_0x44bd3e){var _0x221b54=this;return new Promise(function(_0x1cf309,_0x711793){if(ami[_0x47a5('0xf')]()==![]){return _0x711793(_0x221b54[_0x47a5('0x10')](0x1f4,[config[_0x47a5('0x11')]['ip'],config[_0x47a5('0x11')]['username'],_0x47a5('0x12')][_0x47a5('0x13')]('\x20')));}_0x44bd3e=_[_0x47a5('0x14')](_0x44bd3e,_[_0x47a5('0x15')](properties[_0x47a5('0x16')]['module']));_0x44bd3e['action']=_0x47a5('0x17');return ami['Action'](_0x44bd3e)['then'](function(_0x423a81){_0x1cf309({'code':0xc8,'message':_0x423a81[_0x47a5('0x18')]});})[_0x47a5('0x19')](function(_0x1ef371){_0x711793(_0x221b54[_0x47a5('0x10')](0x1f5,_0x1ef371[_0x47a5('0x18')]));});});},'Command':function(_0x2763d6){var _0xe3c618=this;return new Promise(function(_0x3aed38,_0x4a9fcb){if(ami[_0x47a5('0xf')]()==![]){return _0x4a9fcb(_0xe3c618[_0x47a5('0x10')](0x1f4,[config['asterisk']['ip'],config[_0x47a5('0x11')][_0x47a5('0x1a')],_0x47a5('0x12')]['join']('\x20')));}_0x2763d6=_[_0x47a5('0x14')](_0x2763d6,_0x47a5('0x1b'));_0x2763d6[_0x47a5('0x1c')]=_0x47a5('0x1d');return ami['Action'](_0x2763d6)[_0x47a5('0x1e')](function(_0x385687){_0x3aed38({'code':0xc8,'message':_0x385687['content']});})[_0x47a5('0x19')](function(_0xc4cd63){_0x4a9fcb(_0xe3c618[_0x47a5('0x10')](0x1f5,_0xc4cd63[_0x47a5('0x18')]));});});},'VoiceQueues':function(){return new Promise(function(_0x3abd6a){var _0x50bf17=[];for(var _0x53078a in _0x3717e1[_0x47a5('0x1f')]){if(_0x3717e1['voiceQueues'][_0x47a5('0x20')](_0x53078a)){var _0x5b6c4e=_0x3717e1[_0x47a5('0x1f')][_0x53078a];var _0x378208=new VoiceQueueSummary(_0x5b6c4e);_0x50bf17[_0x47a5('0x21')](_0x378208);}}_0x3abd6a({'count':_0x50bf17[_0x47a5('0x22')],'rows':_0x50bf17});});},'UpdateVoiceQueue':function(_0x21f296){return new Promise(function(_0x3ba0b7,_0x24b162){var _0x136b14=_[_0x47a5('0x23')](_0x3717e1[_0x47a5('0x1f')],{'id':parseInt(_0x21f296['id'])});var _0x1127f8=_[_0x47a5('0x24')](_0x21f296,['id']);if(_0x136b14){for(var _0x3ad507 in _0x1127f8){if(typeof _0x1127f8[_0x3ad507]!=='undefined'&&typeof _0x136b14[_0x3ad507]!==_0x47a5('0x25')){_0x136b14[_0x3ad507]=_0x1127f8[_0x3ad507];}}_0x3ba0b7(_0x136b14);}else{_0x24b162();}});},'VoiceChannels':function(){return new Promise(function(_0x51833b){var _0x2ef875=_[_0x47a5('0x26')](_0x3717e1[_0x47a5('0x27')]);_0x51833b({'count':_0x2ef875['length'],'rows':_0x2ef875});});},'VoiceChannelMixMonitor':function(_0x256650){var _0x625952=this;return new Promise(function(_0x39b50b,_0x1f1c68){if(ami['isConnected']()==![]){return _0x1f1c68(_0x625952['error'](0x1f4,[config[_0x47a5('0x11')]['ip'],config[_0x47a5('0x11')]['username'],'ami\x20disconnected'][_0x47a5('0x13')]('\x20')));}var _0x51544e=schema(properties['voicechannel'])[_0x47a5('0x28')](_0x256650);if(_0x51544e['length']>0x0){return _0x1f1c68(_0x625952[_0x47a5('0x10')](0x1f4,_[_0x47a5('0x29')](_0x51544e,'message')['join'](',\x20')));}var _0x274e34=_['find'](_0x3717e1[_0x47a5('0x27')],{'uniqueid':_0x256650[_0x47a5('0x2a')]});if(_0x274e34&&_0x274e34[_0x47a5('0x2b')]){var _0x52749b=util[_0x47a5('0x2c')]('%s.%s',_0x256650['filename']||_0x256650[_0x47a5('0x2a')],_0x256650['format']||_0x47a5('0x2d'));return ami['Action']({'action':_0x47a5('0x2e'),'channel':_0x274e34[_0x47a5('0x2b')],'file':_0x52749b,'options':_0x47a5('0x2f')})[_0x47a5('0x1e')](function(_0x36add5){var _0xed6320=_[_0x47a5('0x23')](_0x274e34[_0x47a5('0x30')],{'filename':_0x47a5('0x31')+_0x52749b['toLowerCase']()});if(_[_0x47a5('0x32')](_0xed6320)){_0x274e34[_0x47a5('0x30')]['push']({'filename':_0x47a5('0x31')+_0x52749b[_0x47a5('0x33')](),'createdAt':moment()[_0x47a5('0x2c')]('YYYY-MM-DD\x20HH:mm:ss'),'mixmonitorid':_0x36add5[_0x47a5('0x34')],'status':_0x47a5('0x35')});}else{_0xed6320['mixmonitorid']=_0x36add5[_0x47a5('0x34')];_0xed6320[_0x47a5('0x36')]='rec';}_0x39b50b({'code':0xc8,'message':[_0x256650['uniqueid'],'MixMonitor\x20Success',_0x36add5[_0x47a5('0x34')]]['join']('\x20'),'mixmonitorid':_0x36add5[_0x47a5('0x34')]});})[_0x47a5('0x19')](function(_0x301a85){_0x1f1c68(_0x625952[_0x47a5('0x10')](0x1f5,[_0x256650[_0x47a5('0x2a')],_0x301a85[_0x47a5('0x18')][_0x47a5('0x33')]()][_0x47a5('0x13')]('\x20')));});}else{return _0x1f1c68(_0x625952[_0x47a5('0x10')](0x1f5,_0x47a5('0x37')));}});},'VoiceChannelStopMixMonitor':function(_0x280500){var _0x1658e8=this;return new Promise(function(_0x23d6d8,_0x56dbbd){if(ami[_0x47a5('0xf')]()==![]){return _0x56dbbd(_0x1658e8[_0x47a5('0x10')](0x1f4,[config[_0x47a5('0x11')]['ip'],config[_0x47a5('0x11')]['username'],_0x47a5('0x12')]['join']('\x20')));}var _0x47c7a2=schema(properties['voicechannel'])['validate'](_0x280500);if(_0x47c7a2[_0x47a5('0x22')]>0x0){return _0x56dbbd(_0x1658e8['error'](0x1f4,_[_0x47a5('0x29')](_0x47c7a2,_0x47a5('0x18'))[_0x47a5('0x13')](',\x20')));}var _0x494526=_[_0x47a5('0x23')](_0x3717e1[_0x47a5('0x27')],{'uniqueid':_0x280500['uniqueid']});if(_0x494526){return Promise['resolve']()[_0x47a5('0x1e')](function(){if(_0x494526['channel']){return ami[_0x47a5('0x38')]({'action':_0x47a5('0x39'),'channel':_0x494526[_0x47a5('0x2b')],'mixmonitorid':_0x280500[_0x47a5('0x34')]})[_0x47a5('0x19')](function(){});}})[_0x47a5('0x1e')](function(){if(_0x494526[_0x47a5('0x3a')]){return ami[_0x47a5('0x38')]({'action':_0x47a5('0x39'),'channel':_0x494526[_0x47a5('0x3a')],'mixmonitorid':_0x280500[_0x47a5('0x34')]})[_0x47a5('0x19')](function(){});}})[_0x47a5('0x1e')](function(){var _0x3574d4=_[_0x47a5('0x23')](_0x494526[_0x47a5('0x30')],{'mixmonitorid':_0x280500['mixmonitorid']});if(_0x3574d4){_0x3574d4[_0x47a5('0x36')]=_0x47a5('0x3b');}})['then'](function(){var _0x52b3a8=util[_0x47a5('0x2c')]('%s.%s',_0x280500[_0x47a5('0x3c')]||_0x280500[_0x47a5('0x2a')],_0x280500['format']||'wav');var _0x3d85cc=_['find'](_0x494526[_0x47a5('0x30')],{'filename':_0x47a5('0x31')+_0x52b3a8[_0x47a5('0x33')]()});if(_0x3d85cc){_0x3d85cc[_0x47a5('0x36')]=_0x47a5('0x3b');}})[_0x47a5('0x1e')](function(){_0x23d6d8({'code':0xc8,'message':[_0x280500[_0x47a5('0x2a')],'StopMixMonitor\x20Success']['join']('\x20')});})[_0x47a5('0x19')](function(_0x411230){_0x56dbbd(_0x1658e8[_0x47a5('0x10')](0x1f5,[_0x280500[_0x47a5('0x2a')],_0x411230[_0x47a5('0x18')][_0x47a5('0x33')]()][_0x47a5('0x13')]('\x20')));});}else{return _0x56dbbd(_0x1658e8['error'](0x1f5,_0x47a5('0x37')));}});},'VoiceQueuesChannels':function(_0x1c9a62){var _0x5f6a=this;return new Promise(function(_0x5c3c75){var _0x12ca40=_['values'](_0x3717e1[_0x47a5('0x3d')]);var _0xe31817={'count':_0x12ca40[_0x47a5('0x22')],'rows':_0x12ca40};if(_0x1c9a62&&_0x1c9a62[_0x47a5('0x3e')]){if(!['inbound',_0x47a5('0x3f')][_0x47a5('0x40')](_0x1c9a62[_0x47a5('0x3e')])){return _0x59199c(_0x5f6a[_0x47a5('0x10')](0x190,_0x47a5('0x41')));}var _0x6a53b3=_[_0x47a5('0x42')](_0x12ca40,function(_0x481089){return _0x481089[_0x47a5('0x3e')]===_0x1c9a62[_0x47a5('0x3e')];});_0xe31817[_0x47a5('0x43')]=_0x6a53b3[_0x47a5('0x22')];_0xe31817[_0x47a5('0x44')]=_0x6a53b3;}_0x5c3c75(_0xe31817);});},'VoiceQueuesChannel':function(_0x1ab0bf){var _0x572233=this;return new Promise(function(_0x1ad6a9,_0x245a15){var _0x1aa581=schema(properties['voicequeuechannel'])[_0x47a5('0x28')](_0x1ab0bf);if(_0x1aa581[_0x47a5('0x22')]>0x0){return _0x245a15(_0x572233[_0x47a5('0x10')](0x1f4,_['map'](_0x1aa581,'message')[_0x47a5('0x13')](',\x20')));}var _0x376e1d=_['find'](_0x3717e1['queueChannels'],{'uniqueid':_0x1ab0bf[_0x47a5('0x2a')]});if(_0x376e1d){_0x1ad6a9(_0x376e1d);}else{return _0x245a15(_0x572233['error'](0x1f5,_0x47a5('0x37')));}});},'VoiceQueuesChannelHangup':function(_0x5d383d){var _0x482de6=this;return new Promise(function(_0x389ed9,_0x46d2d3){if(ami['isConnected']()==![]){return _0x46d2d3(_0x482de6[_0x47a5('0x10')](0x1f4,[config[_0x47a5('0x11')]['ip'],config['asterisk']['username'],_0x47a5('0x12')][_0x47a5('0x13')]('\x20')));}var _0x867da0=schema(properties[_0x47a5('0x45')])['validate'](_0x5d383d);if(_0x867da0[_0x47a5('0x22')]>0x0){return _0x46d2d3(_0x482de6[_0x47a5('0x10')](0x1f4,_[_0x47a5('0x29')](_0x867da0,'message')[_0x47a5('0x13')](',\x20')));}var _0x4db625=_[_0x47a5('0x23')](_0x3717e1[_0x47a5('0x3d')],{'uniqueid':_0x5d383d[_0x47a5('0x2a')]});if(_0x4db625&&_0x4db625[_0x47a5('0x2b')]){return ami[_0x47a5('0x38')]({'action':'Hangup','channel':_0x4db625[_0x47a5('0x2b')]})['then'](function(_0x5cbe97){_0x389ed9({'code':0xc8,'message':[_0x5d383d['uniqueid'],_0x5cbe97['message'][_0x47a5('0x33')]()][_0x47a5('0x13')]('\x20')});})[_0x47a5('0x19')](function(_0x52e3ee){_0x46d2d3(_0x482de6['error'](0x1f5,[_0x5d383d[_0x47a5('0x2a')],_0x52e3ee[_0x47a5('0x18')][_0x47a5('0x33')]()][_0x47a5('0x13')]('\x20')));});}else{return _0x46d2d3(_0x482de6[_0x47a5('0x10')](0x1f5,'Channel\x20doesn\x27t\x20exist'));}});},'VoiceQueuesChannelRedirect':function(_0x3474b7){var _0x519e9e=this;return new Promise(function(_0x22c886,_0x274d31){if(ami['isConnected']()==![]){return _0x274d31(_0x519e9e[_0x47a5('0x10')](0x1f4,[config[_0x47a5('0x11')]['ip'],config[_0x47a5('0x11')][_0x47a5('0x1a')],_0x47a5('0x12')][_0x47a5('0x13')]('\x20')));}var _0x35cca8=schema(properties[_0x47a5('0x46')])['validate'](_0x3474b7);if(_0x35cca8[_0x47a5('0x22')]>0x0){return _0x274d31(_0x519e9e[_0x47a5('0x10')](0x1f4,_[_0x47a5('0x29')](_0x35cca8,_0x47a5('0x18'))[_0x47a5('0x13')](',\x20')));}var _0x4bbe14=_[_0x47a5('0x23')](_0x3717e1[_0x47a5('0x3d')],{'uniqueid':_0x3474b7[_0x47a5('0x2a')]});if(_0x4bbe14&&_0x4bbe14[_0x47a5('0x2b')]){return ami[_0x47a5('0x38')]({'action':_0x47a5('0x47'),'channel':_0x4bbe14[_0x47a5('0x2b')],'exten':_0x3474b7[_0x47a5('0x48')],'context':_0x3474b7[_0x47a5('0x49')]||_0x4bbe14[_0x47a5('0x49')],'priority':0x1})[_0x47a5('0x1e')](function(_0x44fda9){_0x22c886({'code':0xc8,'message':[_0x3474b7[_0x47a5('0x2a')],_0x44fda9[_0x47a5('0x18')][_0x47a5('0x33')]()]['join']('\x20')});})[_0x47a5('0x19')](function(_0x284fb8){_0x274d31(_0x519e9e[_0x47a5('0x10')](0x1f5,[_0x3474b7['uniqueid'],_0x284fb8[_0x47a5('0x18')][_0x47a5('0x33')]()][_0x47a5('0x13')]('\x20')));});}else{return _0x274d31(_0x519e9e[_0x47a5('0x10')](0x1f5,'Channel\x20doesn\x27t\x20exist'));}});},'Agents':function(_0x3ac402){return new Promise(function(_0x522ccf){var _0x2d5ee6=_['values'](_0x3717e1[_0x47a5('0xb')]);if(_0x3ac402&&_0x3ac402['id']){var _0x4cf7c5=_[_0x47a5('0x23')](_0x2d5ee6,function(_0x2f27c3){return _0x2f27c3['id']===_0x3ac402['id'];});_0x522ccf(_0x4cf7c5);}else{_0x522ccf({'count':_0x2d5ee6[_0x47a5('0x22')],'rows':_0x2d5ee6});}});},'Telephones':function(){return new Promise(function(_0x58473b){var _0x4af557=_['values'](_0x3717e1[_0x47a5('0x4a')]);_0x58473b({'count':_0x4af557[_0x47a5('0x22')],'rows':_0x4af557});});},'Trunks':function(){return new Promise(function(_0xe3c0a7){var _0x117510=_['values'](_0x3717e1[_0x47a5('0x4b')]);_0xe3c0a7({'count':_0x117510[_0x47a5('0x22')],'rows':_0x117510});});},'OutboundChannels':function(){return new Promise(function(_0x390bc0){var _0xd5b23f=_[_0x47a5('0x26')](_0x3717e1[_0x47a5('0x4c')]);_0x390bc0({'count':_0xd5b23f[_0x47a5('0x22')],'rows':_0xd5b23f});});},'Outbound':function(){return new Promise(function(_0x39939a){_0x39939a(_0x3717e1[_0x47a5('0x3f')]);});},'Campaigns':function(){return new Promise(function(_0xc69a68){var _0x2e6fcc=_[_0x47a5('0x26')](_0x3717e1['campaigns']);_0xc69a68({'count':_0x2e6fcc[_0x47a5('0x22')],'rows':_0x2e6fcc});});},'VoiceQueuesPreview':function(_0x4833be){var _0x2ad00a=this;return new Promise(function(_0x2ac30f,_0x281e5f){_0xfdf934[_0x47a5('0x4d')](_0x4833be['id'])[_0x47a5('0x1e')](function(_0xa9c853){_0x2ac30f({'code':0xc8,'message':_0xa9c853[_0x47a5('0x18')]});})[_0x47a5('0x19')](function(_0x11c1db){_0x281e5f(_0x2ad00a[_0x47a5('0x10')](0x1f4,_0x11c1db[_0x47a5('0x18')]));});});},'EventManager':function(_0x1f07ac){var _0x8f0035=this;return new Promise(function(_0x2d434c,_0x441d64){if(!_0x1f07ac['event']){return _0x441d64(_0x8f0035['error'](0x1f4,'Event\x20name\x20mandatory'));}ami['emit'](_0x47a5('0x4e')+_0x1f07ac[_0x47a5('0x4f')],_0x1f07ac['message']);_0x2d434c({'code':0xc8,'message':_0x1f07ac});});},'FaxAccounts':function(){return new Promise(function(_0x732e00){var _0x44dda2=_[_0x47a5('0x26')](_0x3717e1[_0x47a5('0x50')]);_0x732e00({'count':_0x44dda2[_0x47a5('0x22')],'rows':_0x44dda2});});},'SendFax':function(_0x930d25){var _0x218dfa=this;return new Promise(function(_0x1c7302,_0x2e9a96){_0x545a97[_0x47a5('0x51')](_0x930d25)[_0x47a5('0x1e')](function(_0x5e5f16){_0x1c7302({'code':0xc8,'message':_0x5e5f16[_0x47a5('0x18')]});})[_0x47a5('0x19')](function(_0x420671){_0x2e9a96(_0x218dfa['error'](0x1f4,_0x420671[_0x47a5('0x18')]));});});},'CheckAfterSend':function(_0x32f393){var _0x17b61d=this;return new Promise(function(_0x5d41d8,_0x19dc8c){_0x545a97['checkAfterSend'](_0x32f393)['then'](function(_0x356e16){_0x5d41d8({'code':0xc8,'message':_0x356e16[_0x47a5('0x18')]});})[_0x47a5('0x19')](function(_0x27333e){_0x19dc8c(_0x17b61d[_0x47a5('0x10')](0x1f4,_0x27333e[_0x47a5('0x18')]));});});}};var _0x479a82=jayson['server'](_0x343372)[_0x47a5('0x52')]();_0x479a82['on']('error',function(_0x24dbee){return _0x59199c(_0x24dbee);});_0x479a82[_0x47a5('0x7')](0x232a,_0x47a5('0x53'),function(){console[_0x47a5('0x54')]('AMI\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!',0x232a);return _0x3d5629(_0x47a5('0x55')+0x232a);});});};
\ No newline at end of file
index c2d7d6e..6ba6a1a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x30a8=['bluebird','ioredis','util','../../../../config/environment','../../../../config/logger','trigger','../../rpc/cmContact','redis','defaults','localhost','socket.io-emitter','info','[CM][%s][%s]','stringify','emit','exec','data1','data2','isNil','data5','xmd-contactid','ListId','data3','split','$or','map','routeId','destcalleridnum','calleridnum','firstName','lastName','phone','mobile','createdAt','scheduledAt','updatedAt','union','then','isEmpty','length','[CM][%s][%s]\x20Contact\x20found:%s','uniqueid','[CM][%s][%s]\x20Multiple\x20contacts\x20found:[%s]','join','data4','calleridname','<unknown>','Unknown','destcalleridname','resolve','createContact','format','user:%s','trigger:%s','action','toLowerCase','merge'];(function(_0x29bd91,_0x3065ff){var _0x37b6eb=function(_0x4882e0){while(--_0x4882e0){_0x29bd91['push'](_0x29bd91['shift']());}};_0x37b6eb(++_0x3065ff);}(_0x30a8,0xab));var _0x830a=function(_0x5b70f5,_0x5ce103){_0x5b70f5=_0x5b70f5-0x0;var _0x54cbfe=_0x30a8[_0x5b70f5];return _0x54cbfe;};'use strict';var _=require('lodash');var BPromise=require(_0x830a('0x0'));var Redis=require(_0x830a('0x1'));var util=require(_0x830a('0x2'));var config=require(_0x830a('0x3'));var logger=require(_0x830a('0x4'))(_0x830a('0x5'));var cmContactRpc=require(_0x830a('0x6'));config[_0x830a('0x7')]=_[_0x830a('0x8')](config['redis'],{'host':_0x830a('0x9'),'port':0x18eb});var io=require(_0x830a('0xa'))(new Redis(config[_0x830a('0x7')]));function emit(_0x260723,_0x3e5f8d,_0x183598,_0x4ab5e3,_0x5bf26c){logger[_0x830a('0xb')](_0x830a('0xc'),_0x260723,_0x3e5f8d['id'],_0x183598,_0x4ab5e3,JSON[_0x830a('0xd')](_0x5bf26c));io['to'](_0x183598)[_0x830a('0xe')](_0x4ab5e3,_0x5bf26c);}exports[_0x830a('0xf')]=function(_0x1eaa7b,_0x2cd1fe,_0x579562,_0x19c4eb){var _0xd93456,_0x5d1c51;var _0x2d348a={};var _0x40c8eb;var _0xb0b327=Number(_0x579562[_0x830a('0x10')]);var _0x17eb01=_0x579562[_0x830a('0x11')]?Boolean(Number(_0x579562[_0x830a('0x11')])):![];var _0x766341;var _0x18ae41=![];if(!_[_0x830a('0x12')](_0x579562[_0x830a('0x13')])){if(_0x579562[_0x830a('0x13')]=='1')_0x18ae41=!![];}if(!_0x18ae41){if(_0x19c4eb[_0x830a('0x14')]){_0x2d348a['id']=_0x19c4eb[_0x830a('0x14')];}}if(!_0x2d348a['id']){_0x2d348a[_0x830a('0x15')]=_0xb0b327;_0x766341=_0x579562[_0x830a('0x16')]&&_0x579562[_0x830a('0x16')]!=='0'?_0x579562['data3'][_0x830a('0x17')](','):['phone'];_0x2d348a[_0x830a('0x18')]=_[_0x830a('0x19')](_0x766341,function(_0x177045){var _0x5a3d30={};_0x5a3d30[_0x177045]=_0x19c4eb[_0x830a('0x1a')]?_0x19c4eb[_0x830a('0x1b')]:_0x19c4eb['calleridnum'];return _0x5a3d30;});_0x40c8eb=_0x19c4eb[_0x830a('0x1a')]?_0x19c4eb[_0x830a('0x1b')]:_0x19c4eb[_0x830a('0x1c')];}var _0x40aa10=['id',_0x830a('0x1d'),_0x830a('0x1e'),_0x830a('0x1f'),_0x830a('0x20'),'fax',_0x830a('0x15'),_0x830a('0x21'),_0x830a('0x22'),_0x830a('0x23')];var _0x397699=_[_0x830a('0x24')](_0x40aa10,_0x766341);BPromise['resolve']()[_0x830a('0x25')](cmContactRpc['getContacts']({'attributes':_0x397699,'where':_0x2d348a,'phone':_0x40c8eb}))[_0x830a('0x25')](function(_0x447764){_0x5d1c51=_0x447764;if(!_[_0x830a('0x26')](_0x5d1c51)){if(_0x5d1c51[_0x830a('0x27')]===0x1){_0xd93456=_0x5d1c51[0x0];logger[_0x830a('0xb')](_0x830a('0x28'),_0x19c4eb[_0x830a('0x29')],_0x2cd1fe['id'],_0xd93456['id']);}else{logger['info'](_0x830a('0x2a'),_0x19c4eb['uniqueid'],_0x2cd1fe['id'],_['map'](_0x5d1c51,'id')[_0x830a('0x2b')](','));}return;}else{logger[_0x830a('0xb')]('[CM][%s][%s]\x20Contact\x20not\x20found',_0x19c4eb[_0x830a('0x29')],_0x2cd1fe['id']);var _0xe7181c={'ListId':_0xb0b327};var _0x5d99fc=_0x579562[_0x830a('0x2c')]&&_0x579562[_0x830a('0x2c')]!=='0'?_0x579562[_0x830a('0x2c')]:_0x830a('0x1f');if(_0x17eb01){logger[_0x830a('0xb')]('[CM][%s][%s]\x20Autocreate\x20enabled',_0x19c4eb['uniqueid'],_0x2cd1fe['id']);_0xe7181c[_0x5d99fc]=_[_0x830a('0x12')](_0x19c4eb[_0x830a('0x1a')])?_0x19c4eb[_0x830a('0x1c')]:_0x19c4eb[_0x830a('0x1b')];if(_[_0x830a('0x12')](_0x19c4eb[_0x830a('0x1a')])){_0xe7181c[_0x830a('0x1d')]=_0x19c4eb[_0x830a('0x2d')]&&_0x19c4eb[_0x830a('0x2d')]!==_0x830a('0x2e')?_0x19c4eb[_0x830a('0x2d')]:_0x830a('0x2f');}else{_0xe7181c[_0x830a('0x1d')]=_0x19c4eb[_0x830a('0x30')]&&_0x19c4eb[_0x830a('0x30')]!==_0x830a('0x2e')?_0x19c4eb['destcalleridname']:_0x830a('0x2f');}return BPromise[_0x830a('0x31')]()[_0x830a('0x25')](cmContactRpc[_0x830a('0x32')](_0xe7181c))[_0x830a('0x25')](function(_0x5df0e7){_0xd93456=_0x5df0e7;_0x5d1c51['push'](_0x5df0e7);if(_0xd93456){logger[_0x830a('0xb')]('[CM][%s][%s]\x20Contact\x20created:%s',_0x19c4eb[_0x830a('0x29')],_0x2cd1fe['id'],_0xd93456['id']);}return;});}else{logger['info']('[CM][%s][%s]\x20Autocreate\x20disabled',_0x19c4eb['uniqueid'],_0x2cd1fe['id']);_0xe7181c[_0x5d99fc]=_[_0x830a('0x12')](_0x19c4eb['routeId'])?_0x19c4eb['calleridnum']:_0x19c4eb['destcalleridnum'];if(_[_0x830a('0x12')](_0x19c4eb[_0x830a('0x1a')])){_0xe7181c[_0x830a('0x1d')]=_0x19c4eb['calleridname']&&_0x19c4eb[_0x830a('0x2d')]!==_0x830a('0x2e')?_0x19c4eb['calleridname']:_0x830a('0x2f');}else{_0xe7181c[_0x830a('0x1d')]=_0x19c4eb[_0x830a('0x30')]&&_0x19c4eb[_0x830a('0x30')]!==_0x830a('0x2e')?_0x19c4eb['destcalleridname']:_0x830a('0x2f');}_0xd93456=_0xe7181c;_0x5d1c51['push'](_0xe7181c);return;}}})['then'](function(){if(_0x1eaa7b){emit(_0x19c4eb['uniqueid'],_0x2cd1fe,util[_0x830a('0x33')](_0x830a('0x34'),_0x1eaa7b['name']),util[_0x830a('0x33')](_0x830a('0x35'),_0x579562[_0x830a('0x36')][_0x830a('0x37')]()),{'evt':_[_0x830a('0x38')](_0x19c4eb,{'autoCreate':_0x17eb01}),'contact':_0xd93456===undefined?{}:_0xd93456,'contacts':_0x5d1c51[_0x830a('0x27')]===0x0?undefined:_0x5d1c51});}});};
\ No newline at end of file
+var _0x4123=['scheduledAt','union','resolve','then','getContacts','isEmpty','info','[CM][%s][%s]\x20Contact\x20found:%s','uniqueid','[CM][%s][%s]\x20Multiple\x20contacts\x20found:[%s]','map','join','[CM][%s][%s]\x20Contact\x20not\x20found','data4','[CM][%s][%s]\x20Autocreate\x20enabled','calleridname','<unknown>','Unknown','destcalleridname','push','name','trigger:%s','action','toLowerCase','length','lodash','bluebird','ioredis','util','../../../../config/environment','../../../../config/logger','trigger','../../rpc/cmContact','redis','localhost','[CM][%s][%s]','stringify','emit','exec','data1','isNil','data5','xmd-contactid','ListId','data3','split','phone','$or','routeId','destcalleridnum','calleridnum','firstName','lastName','fax','createdAt'];(function(_0x483d58,_0x43e486){var _0x1c405a=function(_0xb4dabb){while(--_0xb4dabb){_0x483d58['push'](_0x483d58['shift']());}};_0x1c405a(++_0x43e486);}(_0x4123,0x87));var _0x3412=function(_0x5be795,_0x1cb1b8){_0x5be795=_0x5be795-0x0;var _0x4e8a3b=_0x4123[_0x5be795];return _0x4e8a3b;};'use strict';var _=require(_0x3412('0x0'));var BPromise=require(_0x3412('0x1'));var Redis=require(_0x3412('0x2'));var util=require(_0x3412('0x3'));var config=require(_0x3412('0x4'));var logger=require(_0x3412('0x5'))(_0x3412('0x6'));var cmContactRpc=require(_0x3412('0x7'));config['redis']=_['defaults'](config[_0x3412('0x8')],{'host':_0x3412('0x9'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x3412('0x8')]));function emit(_0x2c6b42,_0x30d18b,_0x43f43c,_0x40c825,_0x2617a6){logger['info'](_0x3412('0xa'),_0x2c6b42,_0x30d18b['id'],_0x43f43c,_0x40c825,JSON[_0x3412('0xb')](_0x2617a6));io['to'](_0x43f43c)[_0x3412('0xc')](_0x40c825,_0x2617a6);}exports[_0x3412('0xd')]=function(_0xf207fe,_0x2afc08,_0x27a434,_0x40698b){var _0x3be34c,_0x4b70e4;var _0x4b1d87={};var _0x2967ee;var _0x151e34=Number(_0x27a434[_0x3412('0xe')]);var _0x4e488d=_0x27a434['data2']?Boolean(Number(_0x27a434['data2'])):![];var _0x644c94;var _0x2f99b3=![];if(!_[_0x3412('0xf')](_0x27a434[_0x3412('0x10')])){if(_0x27a434[_0x3412('0x10')]=='1')_0x2f99b3=!![];}if(!_0x2f99b3){if(_0x40698b[_0x3412('0x11')]){_0x4b1d87['id']=_0x40698b[_0x3412('0x11')];}}if(!_0x4b1d87['id']){_0x4b1d87[_0x3412('0x12')]=_0x151e34;_0x644c94=_0x27a434[_0x3412('0x13')]&&_0x27a434[_0x3412('0x13')]!=='0'?_0x27a434[_0x3412('0x13')][_0x3412('0x14')](','):[_0x3412('0x15')];_0x4b1d87[_0x3412('0x16')]=_['map'](_0x644c94,function(_0x219a0a){var _0x2528b1={};_0x2528b1[_0x219a0a]=_0x40698b['routeId']?_0x40698b['destcalleridnum']:_0x40698b['calleridnum'];return _0x2528b1;});_0x2967ee=_0x40698b[_0x3412('0x17')]?_0x40698b[_0x3412('0x18')]:_0x40698b[_0x3412('0x19')];}var _0x4480a9=['id',_0x3412('0x1a'),_0x3412('0x1b'),'phone','mobile',_0x3412('0x1c'),_0x3412('0x12'),_0x3412('0x1d'),_0x3412('0x1e'),'updatedAt'];var _0x231f00=_[_0x3412('0x1f')](_0x4480a9,_0x644c94);BPromise[_0x3412('0x20')]()[_0x3412('0x21')](cmContactRpc[_0x3412('0x22')]({'attributes':_0x231f00,'where':_0x4b1d87,'phone':_0x2967ee}))[_0x3412('0x21')](function(_0x46cd4b){_0x4b70e4=_0x46cd4b;if(!_[_0x3412('0x23')](_0x4b70e4)){if(_0x4b70e4['length']===0x1){_0x3be34c=_0x4b70e4[0x0];logger[_0x3412('0x24')](_0x3412('0x25'),_0x40698b[_0x3412('0x26')],_0x2afc08['id'],_0x3be34c['id']);}else{logger[_0x3412('0x24')](_0x3412('0x27'),_0x40698b[_0x3412('0x26')],_0x2afc08['id'],_[_0x3412('0x28')](_0x4b70e4,'id')[_0x3412('0x29')](','));}return;}else{logger['info'](_0x3412('0x2a'),_0x40698b[_0x3412('0x26')],_0x2afc08['id']);var _0x318586={'ListId':_0x151e34};var _0x55dfb9=_0x27a434[_0x3412('0x2b')]&&_0x27a434[_0x3412('0x2b')]!=='0'?_0x27a434[_0x3412('0x2b')]:'phone';if(_0x4e488d){logger[_0x3412('0x24')](_0x3412('0x2c'),_0x40698b[_0x3412('0x26')],_0x2afc08['id']);_0x318586[_0x55dfb9]=_[_0x3412('0xf')](_0x40698b[_0x3412('0x17')])?_0x40698b[_0x3412('0x19')]:_0x40698b[_0x3412('0x18')];if(_['isNil'](_0x40698b[_0x3412('0x17')])){_0x318586[_0x3412('0x1a')]=_0x40698b[_0x3412('0x2d')]&&_0x40698b[_0x3412('0x2d')]!==_0x3412('0x2e')?_0x40698b[_0x3412('0x2d')]:_0x3412('0x2f');}else{_0x318586['firstName']=_0x40698b[_0x3412('0x30')]&&_0x40698b['destcalleridname']!=='<unknown>'?_0x40698b[_0x3412('0x30')]:_0x3412('0x2f');}return BPromise[_0x3412('0x20')]()[_0x3412('0x21')](cmContactRpc['createContact'](_0x318586))[_0x3412('0x21')](function(_0x29c40a){_0x3be34c=_0x29c40a;_0x4b70e4[_0x3412('0x31')](_0x29c40a);if(_0x3be34c){logger['info']('[CM][%s][%s]\x20Contact\x20created:%s',_0x40698b[_0x3412('0x26')],_0x2afc08['id'],_0x3be34c['id']);}return;});}else{logger[_0x3412('0x24')]('[CM][%s][%s]\x20Autocreate\x20disabled',_0x40698b[_0x3412('0x26')],_0x2afc08['id']);_0x318586[_0x55dfb9]=_[_0x3412('0xf')](_0x40698b[_0x3412('0x17')])?_0x40698b[_0x3412('0x19')]:_0x40698b['destcalleridnum'];if(_[_0x3412('0xf')](_0x40698b[_0x3412('0x17')])){_0x318586[_0x3412('0x1a')]=_0x40698b[_0x3412('0x2d')]&&_0x40698b['calleridname']!==_0x3412('0x2e')?_0x40698b[_0x3412('0x2d')]:'Unknown';}else{_0x318586[_0x3412('0x1a')]=_0x40698b[_0x3412('0x30')]&&_0x40698b[_0x3412('0x30')]!=='<unknown>'?_0x40698b[_0x3412('0x30')]:'Unknown';}_0x3be34c=_0x318586;_0x4b70e4['push'](_0x318586);return;}}})[_0x3412('0x21')](function(){if(_0xf207fe){emit(_0x40698b[_0x3412('0x26')],_0x2afc08,util['format']('user:%s',_0xf207fe[_0x3412('0x32')]),util['format'](_0x3412('0x33'),_0x27a434[_0x3412('0x34')][_0x3412('0x35')]()),{'evt':_['merge'](_0x40698b,{'autoCreate':_0x4e488d}),'contact':_0x3be34c===undefined?{}:_0x3be34c,'contacts':_0x4b70e4[_0x3412('0x36')]===0x0?undefined:_0x4b70e4});}});};
\ No newline at end of file
index 93bc21a..62325fb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5a43=['hasOwnProperty','status','checkTrigger','merge','variables','Actions','length','action','contactmanager','browser','data1','popup','TemplateId','html','data2','render','template\x20not\x20found','uri','buildUri','data3','isNil','data4','location','uriLocation','data5','800','windowHeight','data6','600','winArguments','format','user:%s','interface','jscripty','name','trigger:%s','toLowerCase','exec','integration','queue','routeId','urlforward','script','query','search','replace','channel','AllConditions','checkConditions','some','AnyConditions','checkTrigger:\x20trigger','evt','field','account','chat','operator','ChatWebsiteId','upperFirst','AccountId','interaction','message','event','agent','membername','value','lastevent','mailSubstatus','substatus','undefined','offlineMessage','created','equals','exports','util','lodash','url','mustache','ioredis','./urlforward','./script','../../../config/logger','trigger','../ami','redis','defaults','localhost','socket.io-emitter','winapp','triggers','agents','voiceQueues','templates','voiceExtensions','zendeskAccounts','freshdeskAccounts','salesforceAccounts','zohoAccounts','deskAccounts','vtigerAccounts','servicenowAccounts','dynamics365Accounts','freshsalesAccounts','accounts','sugarcrmAccounts','custom:agentcalled','syncCustomEvent','bind','custom:agentconnect','custom:agentringnoanswer','custom:agentnosuchnumber','custom:agentnoanswer','custom:agentcongestion','custom:amd','custom:dialbegin','syncAgentDial','custom:dialconnect','custom:dialend','custom:newinteraction','custom:closedinteraction','custom:substatus','custom:incomingmessage','custom:outgoingmessage','custom:offlineMessage','prototype','info','stringify','emit','clone','motionChannel','voice','debug','inspect','checkTriggers'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x5a43,0xd0));var _0x35a4=function(_0x348952,_0x416568){_0x348952=_0x348952-0x0;var _0xceddbf=_0x5a43[_0x348952];return _0xceddbf;};'use strict';var util=require(_0x35a4('0x0'));var _=require(_0x35a4('0x1'));var url=require(_0x35a4('0x2'));var Mustache=require(_0x35a4('0x3'));var Redis=require(_0x35a4('0x4'));var urlforward=require(_0x35a4('0x5'));var integration=require('./integration');var cmContact=require('./cmContact');var script=require(_0x35a4('0x6'));var config=require('../../../config/environment');var logger=require(_0x35a4('0x7'))(_0x35a4('0x8'));var ami=require(_0x35a4('0x9'));config[_0x35a4('0xa')]=_[_0x35a4('0xb')](config[_0x35a4('0xa')],{'host':_0x35a4('0xc'),'port':0x18eb});var io=require(_0x35a4('0xd'))(new Redis(config[_0x35a4('0xa')]));var operators={'equals':function(_0x430bb4,_0x547196){return _0x430bb4==_0x547196;},'not_equals':function(_0x571392,_0x5731a0){return _0x571392!=_0x5731a0;}};var barAndWebActions=['popup',_0x35a4('0x2'),_0x35a4('0xe')];function Trigger(_0x5beb25){this[_0x35a4('0xf')]=_0x5beb25['triggers'];this[_0x35a4('0x10')]=_0x5beb25[_0x35a4('0x10')];this[_0x35a4('0x11')]=_0x5beb25[_0x35a4('0x11')];this[_0x35a4('0x12')]=_0x5beb25[_0x35a4('0x12')];this['voiceExtensions']=_0x5beb25[_0x35a4('0x13')];this[_0x35a4('0x14')]=_0x5beb25['zendeskAccounts'];this[_0x35a4('0x15')]=_0x5beb25[_0x35a4('0x15')];this[_0x35a4('0x16')]=_0x5beb25[_0x35a4('0x16')];this['sugarcrmAccounts']=_0x5beb25['sugarcrmAccounts'];this[_0x35a4('0x17')]=_0x5beb25[_0x35a4('0x17')];this[_0x35a4('0x18')]=_0x5beb25[_0x35a4('0x18')];this[_0x35a4('0x19')]=_0x5beb25[_0x35a4('0x19')];this[_0x35a4('0x1a')]=_0x5beb25['servicenowAccounts'];this[_0x35a4('0x1b')]=_0x5beb25[_0x35a4('0x1b')];this['freshsalesAccounts']=_0x5beb25[_0x35a4('0x1c')];this[_0x35a4('0x1d')]={'zendesk':this['zendeskAccounts'],'salesforce':this['salesforceAccounts'],'freshdesk':this[_0x35a4('0x15')],'sugarcrm':this[_0x35a4('0x1e')],'zoho':this[_0x35a4('0x17')],'desk':this[_0x35a4('0x18')],'vtiger':this[_0x35a4('0x19')],'dynamics365':this[_0x35a4('0x1b')],'freshsales':this[_0x35a4('0x1c')],'servicenow':this[_0x35a4('0x1a')]};ami['on'](_0x35a4('0x1f'),this[_0x35a4('0x20')][_0x35a4('0x21')](this));ami['on'](_0x35a4('0x22'),this['syncCustomEvent'][_0x35a4('0x21')](this));ami['on'](_0x35a4('0x23'),this['syncCustomEvent']['bind'](this));ami['on']('custom:agentcomplete',this['syncCustomEvent']['bind'](this));ami['on'](_0x35a4('0x24'),this['syncCustomEvent'][_0x35a4('0x21')](this));ami['on'](_0x35a4('0x25'),this[_0x35a4('0x20')][_0x35a4('0x21')](this));ami['on']('custom:agentbusy',this['syncCustomEvent'][_0x35a4('0x21')](this));ami['on'](_0x35a4('0x26'),this[_0x35a4('0x20')][_0x35a4('0x21')](this));ami['on']('custom:agentreject',this[_0x35a4('0x20')][_0x35a4('0x21')](this));ami['on'](_0x35a4('0x27'),this['syncCustomEvent']['bind'](this));ami['on']('custom:queuecallerabandon',this['syncCustomEvent']['bind'](this));ami['on']('custom:timeout',this[_0x35a4('0x20')]['bind'](this));ami['on'](_0x35a4('0x28'),this[_0x35a4('0x29')][_0x35a4('0x21')](this));ami['on'](_0x35a4('0x2a'),this[_0x35a4('0x29')][_0x35a4('0x21')](this));ami['on'](_0x35a4('0x2b'),this['syncAgentDial'][_0x35a4('0x21')](this));ami['on'](_0x35a4('0x2c'),this[_0x35a4('0x20')]['bind'](this));ami['on'](_0x35a4('0x2d'),this[_0x35a4('0x20')][_0x35a4('0x21')](this));ami['on'](_0x35a4('0x2e'),this[_0x35a4('0x20')][_0x35a4('0x21')](this));ami['on'](_0x35a4('0x2f'),this[_0x35a4('0x20')][_0x35a4('0x21')](this));ami['on'](_0x35a4('0x30'),this[_0x35a4('0x20')][_0x35a4('0x21')](this));ami['on']('custom:acceptmessage',this['syncCustomEvent'][_0x35a4('0x21')](this));ami['on']('custom:rejectmessage',this[_0x35a4('0x20')][_0x35a4('0x21')](this));ami['on'](_0x35a4('0x31'),this[_0x35a4('0x20')][_0x35a4('0x21')](this));}Trigger[_0x35a4('0x32')]['emit']=function(_0x6966d0,_0x2d9de8,_0x53b3f6){logger[_0x35a4('0x33')](_0x6966d0,_0x2d9de8,JSON[_0x35a4('0x34')](_0x53b3f6));io['to'](_0x6966d0)[_0x35a4('0x35')](_0x2d9de8,_0x53b3f6);};Trigger[_0x35a4('0x32')][_0x35a4('0x20')]=function(_0x55c077){var _0x433081=_[_0x35a4('0x36')](_0x55c077);if(typeof _0x433081['motionChannel']==='undefined'){_0x433081[_0x35a4('0x37')]=_0x35a4('0x38');}logger[_0x35a4('0x39')](_0x35a4('0x20'),util[_0x35a4('0x3a')](_0x433081,{'showHidden':!![],'depth':null}));this[_0x35a4('0x3b')](_0x433081);};Trigger[_0x35a4('0x32')][_0x35a4('0x29')]=function(_0x4e6eda){if(this['agents'][_0x4e6eda['interface']]){this[_0x35a4('0x20')](_0x4e6eda);}};Trigger[_0x35a4('0x32')][_0x35a4('0x3b')]=function(_0x5a4ca8){var _0x44ce3b;for(var _0xcf6eb9 in this[_0x35a4('0xf')]){if(this[_0x35a4('0xf')][_0x35a4('0x3c')](_0xcf6eb9)){if(this[_0x35a4('0xf')][_0xcf6eb9][_0x35a4('0x3d')]){_0x44ce3b=this[_0x35a4('0x3e')](this[_0x35a4('0xf')][_0xcf6eb9],_0x5a4ca8);if(_0x44ce3b){_[_0x35a4('0x3f')](_0x5a4ca8,_0x5a4ca8[_0x35a4('0x40')]);for(var _0x594f48=0x0,_0x165a32,_0xcda96a,_0x2f7a8e;_0x594f48<this[_0x35a4('0xf')][_0xcf6eb9][_0x35a4('0x41')][_0x35a4('0x42')];_0x594f48+=0x1){_0x165a32=this[_0x35a4('0xf')][_0xcf6eb9][_0x35a4('0x41')][_0x594f48];if(this[_0x35a4('0x10')][_0x5a4ca8['interface']]){switch(_0x165a32[_0x35a4('0x43')]['toLowerCase']()){case _0x35a4('0x44'):break;case'motionbar':case _0x35a4('0x45'):var _0x39b8da={};switch(barAndWebActions[_0x165a32[_0x35a4('0x46')]]){case _0x35a4('0x47'):_0x39b8da[_0x35a4('0x48')]=_0x165a32['data2'];_0x39b8da[_0x35a4('0x49')]=this[_0x35a4('0x12')][_0x165a32[_0x35a4('0x4a')]]?Mustache[_0x35a4('0x4b')](this['templates'][_0x165a32[_0x35a4('0x4a')]]['html'],_0x5a4ca8):_0x35a4('0x4c');break;case'url':_0x39b8da[_0x35a4('0x4d')]=this[_0x35a4('0x4e')](_0x165a32[_0x35a4('0x4a')],_0x5a4ca8,_['isNil'](_0x165a32[_0x35a4('0x4f')])?!![]:parseInt(_0x165a32['data3'],0xa));if(_[_0x35a4('0x50')](_0x165a32[_0x35a4('0x51')])){_0x39b8da[_0x35a4('0x52')]='0';}else{_0x39b8da[_0x35a4('0x53')]=_0x165a32[_0x35a4('0x51')];_0x39b8da['windowWidth']=_['isNil'](_0x165a32[_0x35a4('0x54')])?_0x35a4('0x55'):_0x165a32[_0x35a4('0x54')];_0x39b8da[_0x35a4('0x56')]=_[_0x35a4('0x50')](_0x165a32[_0x35a4('0x57')])?_0x35a4('0x58'):_0x165a32[_0x35a4('0x57')];}break;case _0x35a4('0xe'):_0x39b8da['winApplication']=_0x165a32[_0x35a4('0x4a')]?Mustache[_0x35a4('0x4b')](_0x165a32[_0x35a4('0x4a')],_0x5a4ca8):'';_0x39b8da[_0x35a4('0x59')]=_0x165a32[_0x35a4('0x4f')]?Mustache[_0x35a4('0x4b')](_0x165a32[_0x35a4('0x4f')],_0x5a4ca8):'';break;}this[_0x35a4('0x35')](util[_0x35a4('0x5a')](_0x35a4('0x5b'),this[_0x35a4('0x10')][_0x5a4ca8[_0x35a4('0x5c')]]['name']),util['format']('trigger:%s:%s',_0x165a32[_0x35a4('0x43')]['toLowerCase'](),barAndWebActions[_0x165a32['data1']]),_[_0x35a4('0x3f')](_0x39b8da,_0x5a4ca8));break;case _0x35a4('0x5d'):this[_0x35a4('0x35')](util[_0x35a4('0x5a')](_0x35a4('0x5b'),this[_0x35a4('0x10')][_0x5a4ca8[_0x35a4('0x5c')]][_0x35a4('0x5e')]),util['format'](_0x35a4('0x5f'),_0x165a32[_0x35a4('0x43')]['toLowerCase']()),_[_0x35a4('0x3f')]({'ProjectId':parseInt(_0x165a32[_0x35a4('0x46')],0xa)},_0x5a4ca8));break;default:this[_0x35a4('0x35')](util['format'](_0x35a4('0x5b'),this[_0x35a4('0x10')][_0x5a4ca8[_0x35a4('0x5c')]][_0x35a4('0x5e')]),util[_0x35a4('0x5a')](_0x35a4('0x5f'),_0x165a32['action'][_0x35a4('0x60')]()),_[_0x35a4('0x3f')]({},_0x165a32,_0x5a4ca8));}}switch(_0x165a32[_0x35a4('0x43')][_0x35a4('0x60')]()){case _0x35a4('0x44'):cmContact[_0x35a4('0x61')](this['agents'][_0x5a4ca8[_0x35a4('0x5c')]],this[_0x35a4('0xf')][_0xcf6eb9],_0x165a32,_0x5a4ca8);break;case _0x35a4('0x62'):integration['exec'](_0x165a32,_0x5a4ca8,this[_0x35a4('0x1d')],this[_0x35a4('0x10')][_0x5a4ca8[_0x35a4('0x5c')]],this['voiceQueues'][_0x5a4ca8[_0x35a4('0x63')]],this[_0x35a4('0x13')][_0x5a4ca8[_0x35a4('0x64')]]);break;case _0x35a4('0x65'):urlforward['exec'](_0x165a32,_0x5a4ca8);break;case _0x35a4('0x66'):script[_0x35a4('0x61')](_0x165a32,_0x5a4ca8);break;}}}}}}};Trigger['prototype'][_0x35a4('0x4e')]=function(_0x1b72e8,_0x5c7570,_0x57c3d1){var _0x474a24=url['parse'](Mustache[_0x35a4('0x4b')](_0x1b72e8,_0x5c7570),!![]);if(_0x57c3d1){_[_0x35a4('0x3f')](_0x474a24[_0x35a4('0x67')],_0x5c7570);}delete _0x474a24[_0x35a4('0x68')];var _0x5ac406=url[_0x35a4('0x5a')](_0x474a24);_0x5ac406=_0x5ac406[_0x35a4('0x69')](/\/\?/g,'?');return _0x5ac406;};Trigger['prototype'][_0x35a4('0x3e')]=function(_0xa7f4a0,_0x28659f){var _0x463bf5=!![];var _0x31af98=!![];var _0xc3b944=![];if(_0xa7f4a0[_0x35a4('0x6a')]===_0x28659f[_0x35a4('0x37')]){_0xc3b944=!![];}if(_0xa7f4a0['AllConditions'][_0x35a4('0x42')]){_0x463bf5=_['every'](_0xa7f4a0[_0x35a4('0x6b')],this[_0x35a4('0x6c')](_0x28659f,_0xa7f4a0[_0x35a4('0x6a')]));}if(_0xa7f4a0['AnyConditions']['length']){_0x31af98=_[_0x35a4('0x6d')](_0xa7f4a0[_0x35a4('0x6e')],this[_0x35a4('0x6c')](_0x28659f,_0xa7f4a0['channel']));}var _0x42ff4d=_0xc3b944&&_0x463bf5&&_0x31af98;logger[_0x35a4('0x39')](_0x35a4('0x6f'),util[_0x35a4('0x3a')](_0xa7f4a0,{'showHidden':!![],'depth':null}),_0x35a4('0x70'),util[_0x35a4('0x3a')](_0x28659f,{'showHidden':!![],'depth':null}),_0xc3b944,_0x463bf5,_0x31af98);return _0x42ff4d;};Trigger[_0x35a4('0x32')][_0x35a4('0x6c')]=function(_0x53aa90,_0x16a02a){return function(_0x3cdaa1){switch(_0x3cdaa1[_0x35a4('0x71')]){case _0x35a4('0x72'):if(_0x53aa90[_0x35a4('0x6a')]===_0x16a02a){if(_0x16a02a===_0x35a4('0x73')){return _0x53aa90['ChatWebsiteId']?operators[_0x3cdaa1[_0x35a4('0x74')]](Number(_0x3cdaa1['value']),_0x53aa90[_0x35a4('0x75')]):![];}else{return _0x53aa90[_[_0x35a4('0x76')](_0x16a02a)+_0x35a4('0x77')]?operators[_0x3cdaa1[_0x35a4('0x74')]](Number(_0x3cdaa1['value']),_0x53aa90[_[_0x35a4('0x76')](_0x16a02a)+'AccountId']):![];}}break;case _0x35a4('0x78'):case _0x35a4('0x79'):if(_0x53aa90[_0x35a4('0x6a')]===_0x16a02a){return _0x53aa90[_0x35a4('0x7a')]?operators[_0x3cdaa1[_0x35a4('0x74')]](_0x3cdaa1['value'],_0x53aa90[_0x35a4('0x7a')]):![];}break;case _0x35a4('0x63'):return _0x53aa90[_0x35a4('0x63')]?operators[_0x3cdaa1[_0x35a4('0x74')]](_0x3cdaa1['value'],_0x53aa90[_0x35a4('0x63')]):![];case _0x35a4('0x7b'):return _0x53aa90[_0x35a4('0x7c')]?operators[_0x3cdaa1[_0x35a4('0x74')]](_0x3cdaa1[_0x35a4('0x7d')],_0x53aa90['membername']):![];case _0x35a4('0x7e'):return _0x53aa90[_0x35a4('0x7e')]?operators[_0x3cdaa1[_0x35a4('0x74')]](_0x3cdaa1[_0x35a4('0x7d')],_0x53aa90[_0x35a4('0x7e')]):![];case _0x35a4('0x64'):return _0x53aa90['routeId']?operators[_0x3cdaa1['operator']](_0x3cdaa1['value'],_0x53aa90[_0x35a4('0x64')]):![];case _0x35a4('0x7f'):if(_0x3cdaa1[_0x35a4('0x7d')]==='null')_0x3cdaa1[_0x35a4('0x7d')]=null;return typeof _0x53aa90[_0x35a4('0x80')]!==_0x35a4('0x81')?operators[_0x3cdaa1['operator']](_0x3cdaa1[_0x35a4('0x7d')],_0x53aa90['substatus']):![];case _0x35a4('0x82'):if(_0x53aa90['channel']===_0x16a02a){return _0x3cdaa1[_0x35a4('0x7d')]===_0x35a4('0x83')&&_0x3cdaa1['operator']===_0x35a4('0x84')?!![]:![];}break;}return![];};};module[_0x35a4('0x85')]=Trigger;
\ No newline at end of file
+var _0x7eab=['./integration','./script','../../../config/environment','../../../config/logger','trigger','../ami','redis','localhost','socket.io-emitter','popup','winapp','agents','voiceQueues','templates','voiceExtensions','freshdeskAccounts','salesforceAccounts','sugarcrmAccounts','zohoAccounts','deskAccounts','servicenowAccounts','dynamics365Accounts','freshsalesAccounts','accounts','zendeskAccounts','vtigerAccounts','syncCustomEvent','bind','custom:agentringnoanswer','custom:agentcomplete','custom:agentnosuchnumber','custom:agentbusy','custom:agentreject','custom:timeout','custom:dialbegin','custom:dialconnect','syncAgentDial','custom:newinteraction','custom:closedinteraction','custom:incomingmessage','custom:acceptmessage','custom:rejectmessage','custom:offlineMessage','prototype','info','stringify','emit','clone','motionChannel','undefined','voice','debug','inspect','checkTriggers','triggers','hasOwnProperty','status','checkTrigger','merge','variables','length','interface','action','toLowerCase','contactmanager','motionbar','browser','data1','TemplateId','data2','html','render','uri','buildUri','isNil','data4','location','uriLocation','windowWidth','data5','data6','winArguments','data3','name','format','trigger:%s:%s','jscripty','user:%s','trigger:%s','exec','queue','script','query','search','replace','channel','every','AllConditions','checkConditions','some','AnyConditions','checkTrigger:\x20trigger','field','account','chat','ChatWebsiteId','value','upperFirst','AccountId','message','event','operator','membername','lastevent','routeId','mailSubstatus','null','substatus','offlineMessage','created','equals','exports','lodash','url','mustache','ioredis'];(function(_0x34743f,_0x53e16a){var _0x49103b=function(_0x5637d4){while(--_0x5637d4){_0x34743f['push'](_0x34743f['shift']());}};_0x49103b(++_0x53e16a);}(_0x7eab,0xf8));var _0xb7ea=function(_0x1e8ba0,_0x6d4636){_0x1e8ba0=_0x1e8ba0-0x0;var _0x472c2e=_0x7eab[_0x1e8ba0];return _0x472c2e;};'use strict';var util=require('util');var _=require(_0xb7ea('0x0'));var url=require(_0xb7ea('0x1'));var Mustache=require(_0xb7ea('0x2'));var Redis=require(_0xb7ea('0x3'));var urlforward=require('./urlforward');var integration=require(_0xb7ea('0x4'));var cmContact=require('./cmContact');var script=require(_0xb7ea('0x5'));var config=require(_0xb7ea('0x6'));var logger=require(_0xb7ea('0x7'))(_0xb7ea('0x8'));var ami=require(_0xb7ea('0x9'));config[_0xb7ea('0xa')]=_['defaults'](config['redis'],{'host':_0xb7ea('0xb'),'port':0x18eb});var io=require(_0xb7ea('0xc'))(new Redis(config['redis']));var operators={'equals':function(_0x2faaf8,_0x474bf4){return _0x2faaf8==_0x474bf4;},'not_equals':function(_0x25ccc3,_0x102c14){return _0x25ccc3!=_0x102c14;}};var barAndWebActions=[_0xb7ea('0xd'),_0xb7ea('0x1'),_0xb7ea('0xe')];function Trigger(_0x2ecefb){this['triggers']=_0x2ecefb['triggers'];this[_0xb7ea('0xf')]=_0x2ecefb[_0xb7ea('0xf')];this[_0xb7ea('0x10')]=_0x2ecefb[_0xb7ea('0x10')];this['templates']=_0x2ecefb[_0xb7ea('0x11')];this[_0xb7ea('0x12')]=_0x2ecefb[_0xb7ea('0x12')];this['zendeskAccounts']=_0x2ecefb['zendeskAccounts'];this[_0xb7ea('0x13')]=_0x2ecefb['freshdeskAccounts'];this[_0xb7ea('0x14')]=_0x2ecefb[_0xb7ea('0x14')];this[_0xb7ea('0x15')]=_0x2ecefb[_0xb7ea('0x15')];this[_0xb7ea('0x16')]=_0x2ecefb[_0xb7ea('0x16')];this[_0xb7ea('0x17')]=_0x2ecefb[_0xb7ea('0x17')];this['vtigerAccounts']=_0x2ecefb['vtigerAccounts'];this['servicenowAccounts']=_0x2ecefb[_0xb7ea('0x18')];this[_0xb7ea('0x19')]=_0x2ecefb[_0xb7ea('0x19')];this[_0xb7ea('0x1a')]=_0x2ecefb['freshsalesAccounts'];this[_0xb7ea('0x1b')]={'zendesk':this[_0xb7ea('0x1c')],'salesforce':this['salesforceAccounts'],'freshdesk':this[_0xb7ea('0x13')],'sugarcrm':this['sugarcrmAccounts'],'zoho':this[_0xb7ea('0x16')],'desk':this['deskAccounts'],'vtiger':this[_0xb7ea('0x1d')],'dynamics365':this['dynamics365Accounts'],'freshsales':this[_0xb7ea('0x1a')],'servicenow':this['servicenowAccounts']};ami['on']('custom:agentcalled',this[_0xb7ea('0x1e')]['bind'](this));ami['on']('custom:agentconnect',this[_0xb7ea('0x1e')][_0xb7ea('0x1f')](this));ami['on'](_0xb7ea('0x20'),this[_0xb7ea('0x1e')][_0xb7ea('0x1f')](this));ami['on'](_0xb7ea('0x21'),this['syncCustomEvent'][_0xb7ea('0x1f')](this));ami['on'](_0xb7ea('0x22'),this[_0xb7ea('0x1e')][_0xb7ea('0x1f')](this));ami['on']('custom:agentnoanswer',this[_0xb7ea('0x1e')][_0xb7ea('0x1f')](this));ami['on'](_0xb7ea('0x23'),this['syncCustomEvent']['bind'](this));ami['on']('custom:agentcongestion',this[_0xb7ea('0x1e')][_0xb7ea('0x1f')](this));ami['on'](_0xb7ea('0x24'),this[_0xb7ea('0x1e')][_0xb7ea('0x1f')](this));ami['on']('custom:amd',this[_0xb7ea('0x1e')][_0xb7ea('0x1f')](this));ami['on']('custom:queuecallerabandon',this[_0xb7ea('0x1e')][_0xb7ea('0x1f')](this));ami['on'](_0xb7ea('0x25'),this['syncCustomEvent'][_0xb7ea('0x1f')](this));ami['on'](_0xb7ea('0x26'),this['syncAgentDial']['bind'](this));ami['on'](_0xb7ea('0x27'),this['syncAgentDial'][_0xb7ea('0x1f')](this));ami['on']('custom:dialend',this[_0xb7ea('0x28')][_0xb7ea('0x1f')](this));ami['on'](_0xb7ea('0x29'),this[_0xb7ea('0x1e')][_0xb7ea('0x1f')](this));ami['on'](_0xb7ea('0x2a'),this[_0xb7ea('0x1e')][_0xb7ea('0x1f')](this));ami['on']('custom:substatus',this[_0xb7ea('0x1e')]['bind'](this));ami['on'](_0xb7ea('0x2b'),this['syncCustomEvent'][_0xb7ea('0x1f')](this));ami['on']('custom:outgoingmessage',this['syncCustomEvent'][_0xb7ea('0x1f')](this));ami['on'](_0xb7ea('0x2c'),this[_0xb7ea('0x1e')][_0xb7ea('0x1f')](this));ami['on'](_0xb7ea('0x2d'),this[_0xb7ea('0x1e')][_0xb7ea('0x1f')](this));ami['on'](_0xb7ea('0x2e'),this[_0xb7ea('0x1e')][_0xb7ea('0x1f')](this));}Trigger[_0xb7ea('0x2f')]['emit']=function(_0x431f12,_0x3e2539,_0x5b1d27){logger[_0xb7ea('0x30')](_0x431f12,_0x3e2539,JSON[_0xb7ea('0x31')](_0x5b1d27));io['to'](_0x431f12)[_0xb7ea('0x32')](_0x3e2539,_0x5b1d27);};Trigger[_0xb7ea('0x2f')][_0xb7ea('0x1e')]=function(_0x134924){var _0x231cfe=_[_0xb7ea('0x33')](_0x134924);if(typeof _0x231cfe[_0xb7ea('0x34')]===_0xb7ea('0x35')){_0x231cfe['motionChannel']=_0xb7ea('0x36');}logger[_0xb7ea('0x37')](_0xb7ea('0x1e'),util[_0xb7ea('0x38')](_0x231cfe,{'showHidden':!![],'depth':null}));this[_0xb7ea('0x39')](_0x231cfe);};Trigger[_0xb7ea('0x2f')]['syncAgentDial']=function(_0x53d78b){if(this['agents'][_0x53d78b['interface']]){this['syncCustomEvent'](_0x53d78b);}};Trigger[_0xb7ea('0x2f')][_0xb7ea('0x39')]=function(_0x93b201){var _0x1ea657;for(var _0x2469d1 in this[_0xb7ea('0x3a')]){if(this[_0xb7ea('0x3a')][_0xb7ea('0x3b')](_0x2469d1)){if(this['triggers'][_0x2469d1][_0xb7ea('0x3c')]){_0x1ea657=this[_0xb7ea('0x3d')](this[_0xb7ea('0x3a')][_0x2469d1],_0x93b201);if(_0x1ea657){_[_0xb7ea('0x3e')](_0x93b201,_0x93b201[_0xb7ea('0x3f')]);for(var _0xa16422=0x0,_0x3f58ff,_0x20c268,_0x4cc50b;_0xa16422<this[_0xb7ea('0x3a')][_0x2469d1]['Actions'][_0xb7ea('0x40')];_0xa16422+=0x1){_0x3f58ff=this[_0xb7ea('0x3a')][_0x2469d1]['Actions'][_0xa16422];if(this[_0xb7ea('0xf')][_0x93b201[_0xb7ea('0x41')]]){switch(_0x3f58ff[_0xb7ea('0x42')][_0xb7ea('0x43')]()){case _0xb7ea('0x44'):break;case _0xb7ea('0x45'):case _0xb7ea('0x46'):var _0x52636f={};switch(barAndWebActions[_0x3f58ff[_0xb7ea('0x47')]]){case _0xb7ea('0xd'):_0x52636f[_0xb7ea('0x48')]=_0x3f58ff[_0xb7ea('0x49')];_0x52636f[_0xb7ea('0x4a')]=this['templates'][_0x3f58ff[_0xb7ea('0x49')]]?Mustache[_0xb7ea('0x4b')](this[_0xb7ea('0x11')][_0x3f58ff[_0xb7ea('0x49')]][_0xb7ea('0x4a')],_0x93b201):'template\x20not\x20found';break;case'url':_0x52636f[_0xb7ea('0x4c')]=this[_0xb7ea('0x4d')](_0x3f58ff[_0xb7ea('0x49')],_0x93b201,_[_0xb7ea('0x4e')](_0x3f58ff['data3'])?!![]:parseInt(_0x3f58ff['data3'],0xa));if(_[_0xb7ea('0x4e')](_0x3f58ff[_0xb7ea('0x4f')])){_0x52636f[_0xb7ea('0x50')]='0';}else{_0x52636f[_0xb7ea('0x51')]=_0x3f58ff['data4'];_0x52636f[_0xb7ea('0x52')]=_[_0xb7ea('0x4e')](_0x3f58ff[_0xb7ea('0x53')])?'800':_0x3f58ff[_0xb7ea('0x53')];_0x52636f['windowHeight']=_[_0xb7ea('0x4e')](_0x3f58ff['data6'])?'600':_0x3f58ff[_0xb7ea('0x54')];}break;case'winapp':_0x52636f['winApplication']=_0x3f58ff[_0xb7ea('0x49')]?Mustache[_0xb7ea('0x4b')](_0x3f58ff[_0xb7ea('0x49')],_0x93b201):'';_0x52636f[_0xb7ea('0x55')]=_0x3f58ff[_0xb7ea('0x56')]?Mustache['render'](_0x3f58ff[_0xb7ea('0x56')],_0x93b201):'';break;}this['emit'](util['format']('user:%s',this[_0xb7ea('0xf')][_0x93b201['interface']][_0xb7ea('0x57')]),util[_0xb7ea('0x58')](_0xb7ea('0x59'),_0x3f58ff[_0xb7ea('0x42')][_0xb7ea('0x43')](),barAndWebActions[_0x3f58ff[_0xb7ea('0x47')]]),_[_0xb7ea('0x3e')](_0x52636f,_0x93b201));break;case _0xb7ea('0x5a'):this[_0xb7ea('0x32')](util[_0xb7ea('0x58')](_0xb7ea('0x5b'),this['agents'][_0x93b201['interface']]['name']),util[_0xb7ea('0x58')](_0xb7ea('0x5c'),_0x3f58ff[_0xb7ea('0x42')][_0xb7ea('0x43')]()),_[_0xb7ea('0x3e')]({'ProjectId':parseInt(_0x3f58ff['data1'],0xa)},_0x93b201));break;default:this[_0xb7ea('0x32')](util[_0xb7ea('0x58')](_0xb7ea('0x5b'),this[_0xb7ea('0xf')][_0x93b201[_0xb7ea('0x41')]][_0xb7ea('0x57')]),util[_0xb7ea('0x58')](_0xb7ea('0x5c'),_0x3f58ff[_0xb7ea('0x42')][_0xb7ea('0x43')]()),_['merge']({},_0x3f58ff,_0x93b201));}}switch(_0x3f58ff[_0xb7ea('0x42')][_0xb7ea('0x43')]()){case _0xb7ea('0x44'):cmContact[_0xb7ea('0x5d')](this[_0xb7ea('0xf')][_0x93b201[_0xb7ea('0x41')]],this['triggers'][_0x2469d1],_0x3f58ff,_0x93b201);break;case'integration':integration[_0xb7ea('0x5d')](_0x3f58ff,_0x93b201,this[_0xb7ea('0x1b')],this[_0xb7ea('0xf')][_0x93b201[_0xb7ea('0x41')]],this[_0xb7ea('0x10')][_0x93b201[_0xb7ea('0x5e')]],this['voiceExtensions'][_0x93b201['routeId']]);break;case'urlforward':urlforward[_0xb7ea('0x5d')](_0x3f58ff,_0x93b201);break;case _0xb7ea('0x5f'):script[_0xb7ea('0x5d')](_0x3f58ff,_0x93b201);break;}}}}}}};Trigger[_0xb7ea('0x2f')]['buildUri']=function(_0x193251,_0x35f67f,_0x578b67){var _0x3ebd8f=url['parse'](Mustache[_0xb7ea('0x4b')](_0x193251,_0x35f67f),!![]);if(_0x578b67){_[_0xb7ea('0x3e')](_0x3ebd8f[_0xb7ea('0x60')],_0x35f67f);}delete _0x3ebd8f[_0xb7ea('0x61')];var _0xfa951a=url[_0xb7ea('0x58')](_0x3ebd8f);_0xfa951a=_0xfa951a[_0xb7ea('0x62')](/\/\?/g,'?');return _0xfa951a;};Trigger[_0xb7ea('0x2f')][_0xb7ea('0x3d')]=function(_0x179520,_0x49ec3d){var _0x50f785=!![];var _0x2e1886=!![];var _0x52656e=![];if(_0x179520[_0xb7ea('0x63')]===_0x49ec3d[_0xb7ea('0x34')]){_0x52656e=!![];}if(_0x179520['AllConditions'][_0xb7ea('0x40')]){_0x50f785=_[_0xb7ea('0x64')](_0x179520[_0xb7ea('0x65')],this[_0xb7ea('0x66')](_0x49ec3d,_0x179520['channel']));}if(_0x179520['AnyConditions'][_0xb7ea('0x40')]){_0x2e1886=_[_0xb7ea('0x67')](_0x179520[_0xb7ea('0x68')],this[_0xb7ea('0x66')](_0x49ec3d,_0x179520[_0xb7ea('0x63')]));}var _0x118cc0=_0x52656e&&_0x50f785&&_0x2e1886;logger['debug'](_0xb7ea('0x69'),util[_0xb7ea('0x38')](_0x179520,{'showHidden':!![],'depth':null}),'evt',util[_0xb7ea('0x38')](_0x49ec3d,{'showHidden':!![],'depth':null}),_0x52656e,_0x50f785,_0x2e1886);return _0x118cc0;};Trigger[_0xb7ea('0x2f')][_0xb7ea('0x66')]=function(_0x3665b2,_0x425b6f){return function(_0x540950){switch(_0x540950[_0xb7ea('0x6a')]){case _0xb7ea('0x6b'):if(_0x3665b2[_0xb7ea('0x63')]===_0x425b6f){if(_0x425b6f===_0xb7ea('0x6c')){return _0x3665b2[_0xb7ea('0x6d')]?operators[_0x540950['operator']](Number(_0x540950[_0xb7ea('0x6e')]),_0x3665b2[_0xb7ea('0x6d')]):![];}else{return _0x3665b2[_[_0xb7ea('0x6f')](_0x425b6f)+_0xb7ea('0x70')]?operators[_0x540950['operator']](Number(_0x540950[_0xb7ea('0x6e')]),_0x3665b2[_[_0xb7ea('0x6f')](_0x425b6f)+_0xb7ea('0x70')]):![];}}break;case'interaction':case _0xb7ea('0x71'):if(_0x3665b2[_0xb7ea('0x63')]===_0x425b6f){return _0x3665b2[_0xb7ea('0x72')]?operators[_0x540950[_0xb7ea('0x73')]](_0x540950[_0xb7ea('0x6e')],_0x3665b2[_0xb7ea('0x72')]):![];}break;case _0xb7ea('0x5e'):return _0x3665b2[_0xb7ea('0x5e')]?operators[_0x540950[_0xb7ea('0x73')]](_0x540950[_0xb7ea('0x6e')],_0x3665b2[_0xb7ea('0x5e')]):![];case'agent':return _0x3665b2[_0xb7ea('0x74')]?operators[_0x540950['operator']](_0x540950['value'],_0x3665b2[_0xb7ea('0x74')]):![];case _0xb7ea('0x75'):return _0x3665b2[_0xb7ea('0x75')]?operators[_0x540950[_0xb7ea('0x73')]](_0x540950[_0xb7ea('0x6e')],_0x3665b2[_0xb7ea('0x75')]):![];case'routeId':return _0x3665b2[_0xb7ea('0x76')]?operators[_0x540950[_0xb7ea('0x73')]](_0x540950[_0xb7ea('0x6e')],_0x3665b2[_0xb7ea('0x76')]):![];case _0xb7ea('0x77'):if(_0x540950[_0xb7ea('0x6e')]===_0xb7ea('0x78'))_0x540950[_0xb7ea('0x6e')]=null;return typeof _0x3665b2[_0xb7ea('0x79')]!==_0xb7ea('0x35')?operators[_0x540950[_0xb7ea('0x73')]](_0x540950[_0xb7ea('0x6e')],_0x3665b2['substatus']):![];case _0xb7ea('0x7a'):if(_0x3665b2[_0xb7ea('0x63')]===_0x425b6f){return _0x540950[_0xb7ea('0x6e')]===_0xb7ea('0x7b')&&_0x540950[_0xb7ea('0x73')]===_0xb7ea('0x7c')?!![]:![];}break;}return![];};};module[_0xb7ea('0x7d')]=Trigger;
\ No newline at end of file
index 297b5f5..b0a07b7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x55ca=['debug','[HTTP]','stringify','GET','authType','basic','%s:%s','username','token','%s/token:%s','toString','base64','Searching\x20enduser\x20with\x20phone','Enduser\x20found!','_embedded','entries','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','%s/customers','POST','length','forEach','includes','picklist','type','nameField','customField','toLowerCase','content','string','idField','custom_fields','variable','variableName','customVariable','Variable','name','priority','merge','xCALLY','Motion','CTI','concat','Tags','getString','Descriptions','/api/v2/users/%d','user','Fields','stripTrailingSlash','serverUrl','[QUEUE]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','Authorization','email','calleridname','calleridnum','Ticket\x20created!','The\x20Ticket\x20ID\x20is:','integrationTab','user:%s','trigger:desk:display','newTab','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','error','Desk\x20account\x20type\x20not\x20recognized','outbound','recordingFormat','none','[OUTBOUND]','The\x20User\x20ID\x20is:','destcalleridname','destcalleridnum','The\x20Enduser\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent...','%s/agent/tickets/%s','catch','unmanaged','monitor_format','lastevent','toUpperCase','Recording\x20is\x20enabled!','lodash','request-promise','./util','../../../../config/environment','desk','redis','defaults','localhost','socket.io-emitter','application/json','validateEmail','info','Getting\x20agent\x20with\x20email','format','%s/users','remoteUri','then','total_entries','find','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me'];(function(_0x4c2cfb,_0x4b936b){var _0x575307=function(_0x41ebb6){while(--_0x41ebb6){_0x4c2cfb['push'](_0x4c2cfb['shift']());}};_0x575307(++_0x4b936b);}(_0x55ca,0x126));var _0xa55c=function(_0x4c2f30,_0xa91340){_0x4c2f30=_0x4c2f30-0x0;var _0xb8854d=_0x55ca[_0x4c2f30];return _0xb8854d;};'use strict';var _=require(_0xa55c('0x0'));var rp=require(_0xa55c('0x1'));var md5=require('md5');var util=require('util');var Redis=require('ioredis');var intUtil=require(_0xa55c('0x2'));var config=require(_0xa55c('0x3'));var logger=require('../../../../config/logger')(_0xa55c('0x4'));config[_0xa55c('0x5')]=_[_0xa55c('0x6')](config[_0xa55c('0x5')],{'host':_0xa55c('0x7'),'port':0x18eb});var io=require(_0xa55c('0x8'))(new Redis(config[_0xa55c('0x5')]));function emit(_0x4d0624,_0x2121fd,_0x2537f0){io['to'](_0x4d0624)['emit'](_0x2121fd,_0x2537f0);}var headers={'Content-Type':_0xa55c('0x9'),'Accept':_0xa55c('0x9')};function getUser(_0x52a3bc,_0x5849ad){if(intUtil[_0xa55c('0xa')](_0x5849ad)===!![]){logger[_0xa55c('0xb')](_0xa55c('0xc'),_0x5849ad);return request({'uri':util[_0xa55c('0xd')](_0xa55c('0xe'),_0x52a3bc[_0xa55c('0xf')])})[_0xa55c('0x10')](function(_0x70c2de){if(_0x70c2de[_0xa55c('0x11')]){return _[_0xa55c('0x12')](_0x70c2de['_embedded']['entries'],{'email':_0x5849ad});}})[_0xa55c('0x10')](function(_0x576044){if(_0x576044){logger['info']('Agent\x20found!');return _0x576044;}else{logger[_0xa55c('0xb')](_0xa55c('0x13'));return request({'uri':util[_0xa55c('0xd')](_0xa55c('0x14'),_0x52a3bc[_0xa55c('0xf')])});}});}else{logger[_0xa55c('0xb')]('Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!');return request({'uri':util[_0xa55c('0xd')](_0xa55c('0x14'),_0x52a3bc[_0xa55c('0xf')])});}}function request(_0x31e10d){logger[_0xa55c('0x15')](_0xa55c('0x16'),JSON[_0xa55c('0x17')](_0x31e10d));return rp(_[_0xa55c('0x6')](_0x31e10d,{'method':_0xa55c('0x18'),'headers':headers,'json':!![]}));}function getAuth(_0x4cee3c){var _0x3d4c9e;if(_0x4cee3c[_0xa55c('0x19')]===_0xa55c('0x1a')){_0x3d4c9e=util[_0xa55c('0xd')](_0xa55c('0x1b'),_0x4cee3c[_0xa55c('0x1c')],_0x4cee3c['password']);}else if(_0x4cee3c['authType']===_0xa55c('0x1d')){_0x3d4c9e=util[_0xa55c('0xd')](_0xa55c('0x1e'),_0x4cee3c['username'],_0x4cee3c[_0xa55c('0x1d')]);}return util[_0xa55c('0xd')]('Basic\x20%s',new Buffer(_0x3d4c9e)[_0xa55c('0x1f')](_0xa55c('0x20')));}function getEndUser(_0x940f28,_0x1965f1,_0x234372){logger['info'](_0xa55c('0x21'),_0x234372);return request({'uri':util['format']('%s/customers/search',_0x940f28['remoteUri']),'qs':{'phone':_0x234372}})[_0xa55c('0x10')](function(_0x54b038){if(_0x54b038[_0xa55c('0x11')]){logger[_0xa55c('0xb')](_0xa55c('0x22'));return _0x54b038[_0xa55c('0x23')][_0xa55c('0x24')][0x0];}else{logger[_0xa55c('0xb')](_0xa55c('0x25'));return request({'uri':util[_0xa55c('0xd')](_0xa55c('0x26'),_0x940f28[_0xa55c('0xf')]),'method':_0xa55c('0x27'),'body':{'first_name':_0x1965f1,'title':_0x1965f1,'phone_numbers':[{'type':'work','value':_0x234372}]}});}});}function getTags(_0x430d55,_0x28814f){var _0x1c9f6b=[];if(_0x430d55&&_0x430d55[_0xa55c('0x28')]>0x0){_0x1c9f6b=_['map'](_0x430d55,_0x28814f);}return _0x1c9f6b;}function getCustomFields(_0x1377b0,_0x22f6b6){var _0x1b8388=[];var _0x201941={'custom_fields':{}};if(_0x1377b0[_0xa55c('0x28')]>0x0){_[_0xa55c('0x29')](_0x1377b0,function(_0x52d37f){if(_[_0xa55c('0x2a')](['string',_0xa55c('0x2b')],_0x52d37f[_0xa55c('0x2c')])&&_0x52d37f[_0xa55c('0x2d')]&&!_0x52d37f[_0xa55c('0x2e')]){_0x201941[_0x52d37f['nameField'][_0xa55c('0x2f')]()]=_0x52d37f[_0xa55c('0x30')][_0xa55c('0x1f')]();}else if(_[_0xa55c('0x2a')]([_0xa55c('0x31'),_0xa55c('0x2b')],_0x52d37f[_0xa55c('0x2c')])&&_0x52d37f[_0xa55c('0x32')]&&_0x52d37f[_0xa55c('0x2e')]){_0x201941[_0xa55c('0x33')][_0x52d37f[_0xa55c('0x32')]]=_0x52d37f['content']['toString']();}else if(_0x52d37f[_0xa55c('0x2c')]===_0xa55c('0x34')&&_0x52d37f['variableName']&&_0x52d37f[_0xa55c('0x32')]&&_0x52d37f[_0xa55c('0x2e')]){_0x22f6b6[_0x52d37f[_0xa55c('0x35')]]&&(_0x201941[_0xa55c('0x33')][_0x52d37f[_0xa55c('0x32')]]=_0x22f6b6[_0x52d37f[_0xa55c('0x35')]][_0xa55c('0x1f')]());}else if(_0x52d37f[_0xa55c('0x2c')]===_0xa55c('0x36')&&_0x52d37f['Variable']&&_0x52d37f['Variable']['name']&&_0x52d37f[_0xa55c('0x32')]&&_0x52d37f[_0xa55c('0x2e')]){_0x22f6b6[_0x52d37f[_0xa55c('0x37')]['name'][_0xa55c('0x2f')]()]&&(_0x201941['custom_fields'][_0x52d37f[_0xa55c('0x32')]]=_0x22f6b6[_0x52d37f['Variable'][_0xa55c('0x38')][_0xa55c('0x2f')]()][_0xa55c('0x1f')]());}});}if(_0x201941['priority']){_0x201941[_0xa55c('0x39')]=Number(_0x201941[_0xa55c('0x39')]);}return _0x201941;}function getTicket(_0x47e93c,_0x6f9c4c,_0x194e78,_0x4d9083,_0x529ff8){logger[_0xa55c('0xb')]('Creating\x20new\x20ticket...');var _0x1e75dc=_[_0xa55c('0x3a')]({'subject':intUtil['getString'](_0x4d9083['Subjects'],_0x529ff8,'\x20'),'type':'phone','status':'new','labels':[_0xa55c('0x3b'),_0xa55c('0x3c'),_0xa55c('0x3d')][_0xa55c('0x3e')](getTags(_0x4d9083[_0xa55c('0x3f')],'name')),'description':intUtil[_0xa55c('0x40')](_0x4d9083[_0xa55c('0x41')],_0x529ff8,'\x0a'),'_links':{'assigned_user':{'href':util[_0xa55c('0xd')](_0xa55c('0x42'),_0x6f9c4c['id']),'class':_0xa55c('0x43')}},'message':{'direction':'in','body':intUtil[_0xa55c('0x40')](_0x4d9083['Descriptions'],_0x529ff8,'\x0a')}},getCustomFields(_0x4d9083[_0xa55c('0x44')],_0x529ff8));return request({'uri':util['format']('%s/customers/%d/cases',_0x47e93c[_0xa55c('0xf')],_0x194e78['id']),'method':_0xa55c('0x27'),'body':_0x1e75dc});}exports['queue']=function(_0x2bd98b,_0x508bd3,_0x5f25f7,_0x2f8449,_0x3fea03,_0x1630ac){var _0x540337,_0x1b2708;_0x1630ac[_0xa55c('0xf')]=intUtil['stripTrailingSlash'](_0x1630ac[_0xa55c('0xf')]);_0x1630ac['serverUrl']=intUtil[_0xa55c('0x45')](_0x1630ac[_0xa55c('0x46')]);if(_0x3fea03&&_0x3fea03['monitor_format']){logger[_0xa55c('0xb')](_0xa55c('0x47'),'Recording\x20is\x20enabled!');_0x508bd3[_0xa55c('0x48')]=util[_0xa55c('0xd')](_0xa55c('0x49'),_0x1630ac['serverUrl'],_0x508bd3[_0xa55c('0x4a')],md5(_0x508bd3['uniqueid']));}else{_0x508bd3[_0xa55c('0x48')]='';}headers[_0xa55c('0x4b')]=getAuth(_0x1630ac);return getUser(_0x1630ac,_0x2f8449[_0xa55c('0x4c')])['then'](function(_0x41eab1){_0x540337=_0x41eab1;logger[_0xa55c('0xb')]('The\x20User\x20ID\x20is:',_0x540337['id']);return getEndUser(_0x1630ac,_0x508bd3[_0xa55c('0x4d')],_0x508bd3[_0xa55c('0x4e')]);})['then'](function(_0x11ff1d){_0x1b2708=_0x11ff1d;logger[_0xa55c('0xb')]('The\x20Enduser\x20ID\x20is:',_0x1b2708['id']);return getTicket(_0x1630ac,_0x540337,_0x1b2708,_0x5f25f7,_0x508bd3);})[_0xa55c('0x10')](function(_0x81cee8){if(_0x81cee8){logger[_0xa55c('0xb')](_0xa55c('0x4f'));logger['info'](_0xa55c('0x50'),_0x81cee8['id']);switch(_0x1630ac['type']){case _0xa55c('0x51'):logger[_0xa55c('0xb')](_0xa55c('0x47'),'Displaying\x20ticket\x20to\x20agent...');emit(util[_0xa55c('0xd')](_0xa55c('0x52'),_0x2f8449['name']),_0xa55c('0x53'),{'recordId':_0x81cee8['id']});break;case _0xa55c('0x54'):logger[_0xa55c('0xb')](_0xa55c('0x47'),_0xa55c('0x55'));emit(util[_0xa55c('0xd')](_0xa55c('0x52'),_0x2f8449[_0xa55c('0x38')]),_0xa55c('0x56'),{'uri':util[_0xa55c('0xd')]('https://xcally.desk.com/web/agent/case/%d',_0x81cee8['id'])});break;default:logger[_0xa55c('0x57')](_0xa55c('0x47'),_0xa55c('0x58'));}}})['catch'](function(_0x4c3095){console[_0xa55c('0x57')](_0x4c3095);logger['error'](_0xa55c('0x47'),JSON['stringify'](_0x4c3095));});};exports[_0xa55c('0x59')]=function(_0x228df4,_0x181802,_0x3f9313,_0x2ecf79,_0x5b1cf3,_0x44b7c1,_0x4607ca){var _0x4b85cc,_0x3929a6;_0x44b7c1[_0xa55c('0xf')]=intUtil[_0xa55c('0x45')](_0x44b7c1[_0xa55c('0xf')]);_0x44b7c1['serverUrl']=intUtil['stripTrailingSlash'](_0x44b7c1[_0xa55c('0x46')]);if(_0x4607ca&&_0x4607ca[_0xa55c('0x5a')]&&_0x4607ca[_0xa55c('0x5a')]!==_0xa55c('0x5b')){logger['info'](_0xa55c('0x5c'),'Recording\x20is\x20enabled!');_0x181802[_0xa55c('0x48')]=util[_0xa55c('0xd')](_0xa55c('0x49'),_0x44b7c1[_0xa55c('0x46')],_0x181802[_0xa55c('0x4a')],md5(_0x181802['uniqueid']));}headers[_0xa55c('0x4b')]=getAuth(_0x44b7c1);return getUser(_0x44b7c1,_0x2ecf79['email'])[_0xa55c('0x10')](function(_0x157afe){_0x4b85cc=_0x157afe;logger[_0xa55c('0xb')](_0xa55c('0x5d'),_0x4b85cc['id']);return getEndUser(_0x44b7c1,_0x181802[_0xa55c('0x5e')],_0x181802[_0xa55c('0x5f')]);})[_0xa55c('0x10')](function(_0x53e2be){_0x3929a6=_0x53e2be;logger[_0xa55c('0xb')](_0xa55c('0x60'),_0x3929a6['id']);return getTicket(_0x44b7c1,_0x4b85cc,_0x3929a6,_0x3f9313,_0x181802);})[_0xa55c('0x10')](function(_0x23a30e){if(_0x23a30e){logger[_0xa55c('0xb')]('Ticket\x20created!');logger[_0xa55c('0xb')](_0xa55c('0x50'),_0x23a30e['id']);switch(_0x44b7c1[_0xa55c('0x2c')]){case _0xa55c('0x51'):logger[_0xa55c('0xb')]('[QUEUE]',_0xa55c('0x61'));emit(util[_0xa55c('0xd')](_0xa55c('0x52'),_0x2ecf79[_0xa55c('0x38')]),_0xa55c('0x53'),{'recordId':_0x23a30e['id']});break;case'newTab':logger[_0xa55c('0xb')]('[QUEUE]',_0xa55c('0x55'));emit(util['format'](_0xa55c('0x52'),_0x2ecf79['name']),_0xa55c('0x56'),{'uri':util[_0xa55c('0xd')](_0xa55c('0x62'),_0x44b7c1[_0xa55c('0xf')],_0x23a30e['id'])});break;default:logger[_0xa55c('0x57')](_0xa55c('0x5c'),_0xa55c('0x58'));}}})[_0xa55c('0x63')](function(_0x14b515){logger[_0xa55c('0x57')]('[OUTBOUND]',JSON[_0xa55c('0x17')](_0x14b515));});};exports[_0xa55c('0x64')]=function(_0x4ef914,_0x18b928,_0x2b8b88,_0x3e3b4b,_0x9fe234,_0x1b8b06){var _0xa38271,_0x3cef1f;_0x1b8b06[_0xa55c('0xf')]=intUtil['stripTrailingSlash'](_0x1b8b06[_0xa55c('0xf')]);_0x1b8b06[_0xa55c('0x46')]=intUtil[_0xa55c('0x45')](_0x1b8b06[_0xa55c('0x46')]);if(_0x9fe234&&_0x9fe234[_0xa55c('0x65')]){logger[_0xa55c('0xb')]('['+_0x18b928[_0xa55c('0x66')][_0xa55c('0x67')]()+']',_0xa55c('0x68'));_0x18b928['recordingURL']=util[_0xa55c('0xd')](_0xa55c('0x49'),_0x1b8b06[_0xa55c('0x46')],_0x18b928[_0xa55c('0x4a')],md5(_0x18b928[_0xa55c('0x4a')]));}else{_0x18b928[_0xa55c('0x48')]='';}headers[_0xa55c('0x4b')]=getAuth(_0x1b8b06);return getUser(_0x1b8b06)[_0xa55c('0x10')](function(_0x2e4cf7){_0xa38271=_0x2e4cf7;logger[_0xa55c('0xb')](_0xa55c('0x5d'),_0xa38271['id']);return getEndUser(_0x1b8b06,_0x18b928['calleridname'],_0x18b928[_0xa55c('0x4e')]);})['then'](function(_0x1228a4){_0x3cef1f=_0x1228a4;logger[_0xa55c('0xb')](_0xa55c('0x60'),_0x3cef1f['id']);return getTicket(_0x1b8b06,_0xa38271,_0x3cef1f,_0x2b8b88,_0x18b928);})['then'](function(_0x4d9722){if(_0x4d9722){logger[_0xa55c('0xb')](_0xa55c('0x4f'));logger[_0xa55c('0xb')](_0xa55c('0x50'),_0x4d9722['id']);}})['catch'](function(_0x149cb9){logger[_0xa55c('0x57')]('['+_0x18b928[_0xa55c('0x66')][_0xa55c('0x67')]()+']',JSON[_0xa55c('0x17')](_0x149cb9));});};
\ No newline at end of file
+var _0x7217=['format','%s/users','remoteUri','then','total_entries','find','entries','info','Agent\x20found!','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me','debug','stringify','GET','authType','basic','%s:%s','username','password','token','Basic\x20%s','base64','Searching\x20enduser\x20with\x20phone','%s/customers/search','Enduser\x20found!','_embedded','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','length','map','forEach','string','picklist','nameField','customField','content','toString','includes','idField','custom_fields','variable','variableName','type','customVariable','Variable','name','toLowerCase','priority','Creating\x20new\x20ticket...','merge','getString','new','xCALLY','Motion','CTI','Tags','Descriptions','user','%s/customers/%d/cases','queue','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','Authorization','email','The\x20User\x20ID\x20is:','calleridnum','The\x20Enduser\x20ID\x20is:','Ticket\x20created!','integrationTab','Displaying\x20ticket\x20to\x20agent...','user:%s','trigger:desk:display','newTab','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','https://xcally.desk.com/web/agent/case/%d','error','catch','outbound','recordingFormat','none','[OUTBOUND]','uniqueid','The\x20Ticket\x20ID\x20is:','%s/agent/tickets/%s','unmanaged','lastevent','toUpperCase','calleridname','lodash','md5','util','ioredis','./util','../../../../config/environment','redis','defaults','localhost','socket.io-emitter','emit','application/json','validateEmail','Getting\x20agent\x20with\x20email'];(function(_0x2981da,_0x46b945){var _0x11f90d=function(_0x4e3a4d){while(--_0x4e3a4d){_0x2981da['push'](_0x2981da['shift']());}};_0x11f90d(++_0x46b945);}(_0x7217,0x19e));var _0x7721=function(_0xae7c2f,_0xf31e04){_0xae7c2f=_0xae7c2f-0x0;var _0x5d7001=_0x7217[_0xae7c2f];return _0x5d7001;};'use strict';var _=require(_0x7721('0x0'));var rp=require('request-promise');var md5=require(_0x7721('0x1'));var util=require(_0x7721('0x2'));var Redis=require(_0x7721('0x3'));var intUtil=require(_0x7721('0x4'));var config=require(_0x7721('0x5'));var logger=require('../../../../config/logger')('desk');config[_0x7721('0x6')]=_[_0x7721('0x7')](config[_0x7721('0x6')],{'host':_0x7721('0x8'),'port':0x18eb});var io=require(_0x7721('0x9'))(new Redis(config[_0x7721('0x6')]));function emit(_0x18ab6b,_0x21f680,_0x225610){io['to'](_0x18ab6b)[_0x7721('0xa')](_0x21f680,_0x225610);}var headers={'Content-Type':_0x7721('0xb'),'Accept':_0x7721('0xb')};function getUser(_0xfa8835,_0x138740){if(intUtil[_0x7721('0xc')](_0x138740)===!![]){logger['info'](_0x7721('0xd'),_0x138740);return request({'uri':util[_0x7721('0xe')](_0x7721('0xf'),_0xfa8835[_0x7721('0x10')])})[_0x7721('0x11')](function(_0x409b37){if(_0x409b37[_0x7721('0x12')]){return _[_0x7721('0x13')](_0x409b37['_embedded'][_0x7721('0x14')],{'email':_0x138740});}})[_0x7721('0x11')](function(_0x57ff6d){if(_0x57ff6d){logger[_0x7721('0x15')](_0x7721('0x16'));return _0x57ff6d;}else{logger[_0x7721('0x15')](_0x7721('0x17'));return request({'uri':util['format'](_0x7721('0x18'),_0xfa8835[_0x7721('0x10')])});}});}else{logger['info']('Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!');return request({'uri':util['format'](_0x7721('0x18'),_0xfa8835[_0x7721('0x10')])});}}function request(_0x3cc909){logger[_0x7721('0x19')]('[HTTP]',JSON[_0x7721('0x1a')](_0x3cc909));return rp(_['defaults'](_0x3cc909,{'method':_0x7721('0x1b'),'headers':headers,'json':!![]}));}function getAuth(_0x5cb0e6){var _0xfec626;if(_0x5cb0e6[_0x7721('0x1c')]===_0x7721('0x1d')){_0xfec626=util[_0x7721('0xe')](_0x7721('0x1e'),_0x5cb0e6[_0x7721('0x1f')],_0x5cb0e6[_0x7721('0x20')]);}else if(_0x5cb0e6[_0x7721('0x1c')]===_0x7721('0x21')){_0xfec626=util[_0x7721('0xe')]('%s/token:%s',_0x5cb0e6[_0x7721('0x1f')],_0x5cb0e6[_0x7721('0x21')]);}return util[_0x7721('0xe')](_0x7721('0x22'),new Buffer(_0xfec626)['toString'](_0x7721('0x23')));}function getEndUser(_0x512f31,_0xb9e9dd,_0x288e3a){logger[_0x7721('0x15')](_0x7721('0x24'),_0x288e3a);return request({'uri':util[_0x7721('0xe')](_0x7721('0x25'),_0x512f31[_0x7721('0x10')]),'qs':{'phone':_0x288e3a}})['then'](function(_0x216f20){if(_0x216f20[_0x7721('0x12')]){logger[_0x7721('0x15')](_0x7721('0x26'));return _0x216f20[_0x7721('0x27')][_0x7721('0x14')][0x0];}else{logger[_0x7721('0x15')](_0x7721('0x28'));return request({'uri':util[_0x7721('0xe')]('%s/customers',_0x512f31[_0x7721('0x10')]),'method':'POST','body':{'first_name':_0xb9e9dd,'title':_0xb9e9dd,'phone_numbers':[{'type':'work','value':_0x288e3a}]}});}});}function getTags(_0x315202,_0x343c19){var _0x53c904=[];if(_0x315202&&_0x315202[_0x7721('0x29')]>0x0){_0x53c904=_[_0x7721('0x2a')](_0x315202,_0x343c19);}return _0x53c904;}function getCustomFields(_0x37b9f0,_0xd7d703){var _0x1da2d8=[];var _0x5c54f0={'custom_fields':{}};if(_0x37b9f0[_0x7721('0x29')]>0x0){_[_0x7721('0x2b')](_0x37b9f0,function(_0x497f9f){if(_['includes']([_0x7721('0x2c'),_0x7721('0x2d')],_0x497f9f['type'])&&_0x497f9f[_0x7721('0x2e')]&&!_0x497f9f[_0x7721('0x2f')]){_0x5c54f0[_0x497f9f[_0x7721('0x2e')]['toLowerCase']()]=_0x497f9f[_0x7721('0x30')][_0x7721('0x31')]();}else if(_[_0x7721('0x32')]([_0x7721('0x2c'),_0x7721('0x2d')],_0x497f9f['type'])&&_0x497f9f[_0x7721('0x33')]&&_0x497f9f[_0x7721('0x2f')]){_0x5c54f0[_0x7721('0x34')][_0x497f9f['idField']]=_0x497f9f[_0x7721('0x30')][_0x7721('0x31')]();}else if(_0x497f9f['type']===_0x7721('0x35')&&_0x497f9f['variableName']&&_0x497f9f[_0x7721('0x33')]&&_0x497f9f[_0x7721('0x2f')]){_0xd7d703[_0x497f9f[_0x7721('0x36')]]&&(_0x5c54f0[_0x7721('0x34')][_0x497f9f[_0x7721('0x33')]]=_0xd7d703[_0x497f9f[_0x7721('0x36')]][_0x7721('0x31')]());}else if(_0x497f9f[_0x7721('0x37')]===_0x7721('0x38')&&_0x497f9f[_0x7721('0x39')]&&_0x497f9f[_0x7721('0x39')]['name']&&_0x497f9f[_0x7721('0x33')]&&_0x497f9f['customField']){_0xd7d703[_0x497f9f[_0x7721('0x39')][_0x7721('0x3a')][_0x7721('0x3b')]()]&&(_0x5c54f0[_0x7721('0x34')][_0x497f9f[_0x7721('0x33')]]=_0xd7d703[_0x497f9f[_0x7721('0x39')]['name']['toLowerCase']()]['toString']());}});}if(_0x5c54f0['priority']){_0x5c54f0[_0x7721('0x3c')]=Number(_0x5c54f0[_0x7721('0x3c')]);}return _0x5c54f0;}function getTicket(_0x1acc72,_0x22ef35,_0x4a90ce,_0xa389fa,_0x4cf659){logger[_0x7721('0x15')](_0x7721('0x3d'));var _0x5a278e=_[_0x7721('0x3e')]({'subject':intUtil[_0x7721('0x3f')](_0xa389fa['Subjects'],_0x4cf659,'\x20'),'type':'phone','status':_0x7721('0x40'),'labels':[_0x7721('0x41'),_0x7721('0x42'),_0x7721('0x43')]['concat'](getTags(_0xa389fa[_0x7721('0x44')],_0x7721('0x3a'))),'description':intUtil[_0x7721('0x3f')](_0xa389fa[_0x7721('0x45')],_0x4cf659,'\x0a'),'_links':{'assigned_user':{'href':util[_0x7721('0xe')]('/api/v2/users/%d',_0x22ef35['id']),'class':_0x7721('0x46')}},'message':{'direction':'in','body':intUtil['getString'](_0xa389fa[_0x7721('0x45')],_0x4cf659,'\x0a')}},getCustomFields(_0xa389fa['Fields'],_0x4cf659));return request({'uri':util[_0x7721('0xe')](_0x7721('0x47'),_0x1acc72[_0x7721('0x10')],_0x4a90ce['id']),'method':'POST','body':_0x5a278e});}exports[_0x7721('0x48')]=function(_0x11d853,_0x1ad315,_0x481fa8,_0x9f7b1d,_0x754071,_0xdb3033){var _0x2d5f35,_0x135dbc;_0xdb3033[_0x7721('0x10')]=intUtil[_0x7721('0x49')](_0xdb3033['remoteUri']);_0xdb3033['serverUrl']=intUtil[_0x7721('0x49')](_0xdb3033[_0x7721('0x4a')]);if(_0x754071&&_0x754071[_0x7721('0x4b')]){logger[_0x7721('0x15')](_0x7721('0x4c'),_0x7721('0x4d'));_0x1ad315[_0x7721('0x4e')]=util[_0x7721('0xe')](_0x7721('0x4f'),_0xdb3033[_0x7721('0x4a')],_0x1ad315['uniqueid'],md5(_0x1ad315['uniqueid']));}else{_0x1ad315[_0x7721('0x4e')]='';}headers[_0x7721('0x50')]=getAuth(_0xdb3033);return getUser(_0xdb3033,_0x9f7b1d[_0x7721('0x51')])[_0x7721('0x11')](function(_0x589e95){_0x2d5f35=_0x589e95;logger[_0x7721('0x15')](_0x7721('0x52'),_0x2d5f35['id']);return getEndUser(_0xdb3033,_0x1ad315['calleridname'],_0x1ad315[_0x7721('0x53')]);})['then'](function(_0x2682b1){_0x135dbc=_0x2682b1;logger['info'](_0x7721('0x54'),_0x135dbc['id']);return getTicket(_0xdb3033,_0x2d5f35,_0x135dbc,_0x481fa8,_0x1ad315);})[_0x7721('0x11')](function(_0xf17c40){if(_0xf17c40){logger['info'](_0x7721('0x55'));logger[_0x7721('0x15')]('The\x20Ticket\x20ID\x20is:',_0xf17c40['id']);switch(_0xdb3033[_0x7721('0x37')]){case _0x7721('0x56'):logger[_0x7721('0x15')]('[QUEUE]',_0x7721('0x57'));emit(util['format'](_0x7721('0x58'),_0x9f7b1d[_0x7721('0x3a')]),_0x7721('0x59'),{'recordId':_0xf17c40['id']});break;case _0x7721('0x5a'):logger[_0x7721('0x15')](_0x7721('0x4c'),_0x7721('0x5b'));emit(util[_0x7721('0xe')](_0x7721('0x58'),_0x9f7b1d[_0x7721('0x3a')]),_0x7721('0x5c'),{'uri':util[_0x7721('0xe')](_0x7721('0x5d'),_0xf17c40['id'])});break;default:logger[_0x7721('0x5e')](_0x7721('0x4c'),'Desk\x20account\x20type\x20not\x20recognized');}}})[_0x7721('0x5f')](function(_0x2f6f30){console[_0x7721('0x5e')](_0x2f6f30);logger[_0x7721('0x5e')](_0x7721('0x4c'),JSON[_0x7721('0x1a')](_0x2f6f30));});};exports[_0x7721('0x60')]=function(_0x57484c,_0x234bee,_0x17036e,_0x134908,_0x3b7382,_0x1f1e84,_0x9c0d4){var _0x7fbd6c,_0x33287d;_0x1f1e84[_0x7721('0x10')]=intUtil[_0x7721('0x49')](_0x1f1e84[_0x7721('0x10')]);_0x1f1e84['serverUrl']=intUtil[_0x7721('0x49')](_0x1f1e84[_0x7721('0x4a')]);if(_0x9c0d4&&_0x9c0d4[_0x7721('0x61')]&&_0x9c0d4[_0x7721('0x61')]!==_0x7721('0x62')){logger[_0x7721('0x15')](_0x7721('0x63'),_0x7721('0x4d'));_0x234bee[_0x7721('0x4e')]=util[_0x7721('0xe')](_0x7721('0x4f'),_0x1f1e84[_0x7721('0x4a')],_0x234bee[_0x7721('0x64')],md5(_0x234bee[_0x7721('0x64')]));}headers[_0x7721('0x50')]=getAuth(_0x1f1e84);return getUser(_0x1f1e84,_0x134908['email'])['then'](function(_0x4e112e){_0x7fbd6c=_0x4e112e;logger[_0x7721('0x15')]('The\x20User\x20ID\x20is:',_0x7fbd6c['id']);return getEndUser(_0x1f1e84,_0x234bee['destcalleridname'],_0x234bee['destcalleridnum']);})['then'](function(_0x47925a){_0x33287d=_0x47925a;logger[_0x7721('0x15')](_0x7721('0x54'),_0x33287d['id']);return getTicket(_0x1f1e84,_0x7fbd6c,_0x33287d,_0x17036e,_0x234bee);})['then'](function(_0x5181d7){if(_0x5181d7){logger['info']('Ticket\x20created!');logger['info'](_0x7721('0x65'),_0x5181d7['id']);switch(_0x1f1e84['type']){case'integrationTab':logger['info'](_0x7721('0x4c'),_0x7721('0x57'));emit(util[_0x7721('0xe')]('user:%s',_0x134908[_0x7721('0x3a')]),_0x7721('0x59'),{'recordId':_0x5181d7['id']});break;case _0x7721('0x5a'):logger[_0x7721('0x15')](_0x7721('0x4c'),_0x7721('0x5b'));emit(util[_0x7721('0xe')](_0x7721('0x58'),_0x134908[_0x7721('0x3a')]),_0x7721('0x5c'),{'uri':util[_0x7721('0xe')](_0x7721('0x66'),_0x1f1e84[_0x7721('0x10')],_0x5181d7['id'])});break;default:logger[_0x7721('0x5e')](_0x7721('0x63'),'Desk\x20account\x20type\x20not\x20recognized');}}})[_0x7721('0x5f')](function(_0x2c93b0){logger[_0x7721('0x5e')](_0x7721('0x63'),JSON['stringify'](_0x2c93b0));});};exports[_0x7721('0x67')]=function(_0x104f05,_0x4c8284,_0x3e7df3,_0x5d37ad,_0x1f508d,_0x4bfb48){var _0x36a3a6,_0x3f9eaa;_0x4bfb48[_0x7721('0x10')]=intUtil[_0x7721('0x49')](_0x4bfb48[_0x7721('0x10')]);_0x4bfb48[_0x7721('0x4a')]=intUtil[_0x7721('0x49')](_0x4bfb48['serverUrl']);if(_0x1f508d&&_0x1f508d[_0x7721('0x4b')]){logger[_0x7721('0x15')]('['+_0x4c8284[_0x7721('0x68')][_0x7721('0x69')]()+']',_0x7721('0x4d'));_0x4c8284[_0x7721('0x4e')]=util[_0x7721('0xe')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x4bfb48[_0x7721('0x4a')],_0x4c8284[_0x7721('0x64')],md5(_0x4c8284['uniqueid']));}else{_0x4c8284[_0x7721('0x4e')]='';}headers['Authorization']=getAuth(_0x4bfb48);return getUser(_0x4bfb48)[_0x7721('0x11')](function(_0x382800){_0x36a3a6=_0x382800;logger[_0x7721('0x15')](_0x7721('0x52'),_0x36a3a6['id']);return getEndUser(_0x4bfb48,_0x4c8284[_0x7721('0x6a')],_0x4c8284[_0x7721('0x53')]);})[_0x7721('0x11')](function(_0x5dca04){_0x3f9eaa=_0x5dca04;logger[_0x7721('0x15')](_0x7721('0x54'),_0x3f9eaa['id']);return getTicket(_0x4bfb48,_0x36a3a6,_0x3f9eaa,_0x3e7df3,_0x4c8284);})[_0x7721('0x11')](function(_0x5f08cc){if(_0x5f08cc){logger['info']('Ticket\x20created!');logger['info']('The\x20Ticket\x20ID\x20is:',_0x5f08cc['id']);}})[_0x7721('0x5f')](function(_0x2645dd){logger['error']('['+_0x4c8284[_0x7721('0x68')][_0x7721('0x69')]()+']',JSON[_0x7721('0x1a')](_0x2645dd));});};
\ No newline at end of file
index 7c3668a..6afd969 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xcb3f=['\x20eq\x20\x27','replace','%2b','nothing',']\x20Enduser\x20NOT\x20Created\x20-\x20ModuleCreate\x20=\x20Nothing','forEach','includes','string','picklist','type','nameField','customField','indexOf','ticketType','incidents','assign','getString','/contacts(','/systemusers(','Fields','phonecall','callDirection','queue','phonecalls','Subjects','Descriptions','format','%s/main.aspx?pagetype=entityrecord&etn=%s&id=%s','emit','trigger:browser:url','stripTrailingSlash','serverUrl','unmanaged','%s/api/data/v9.0/','uniqueid','recordingFormat','[OUTBOUND]','Recording\x20is\x20enabled!','recordingURL',']\x20The\x20User\x20ID\x20is:',']\x20The\x20User\x20email\x20is:','additionalSearchContact',']\x20The\x20Enduser\x20ID\x20is:',']\x20The\x20Enduser\x20phone\x20is:',']\x20The\x20%s\x20ID\x20is:\x20%s','ticketId',']\x20Call\x20direction:\x20%s','openNewTab','Displaying\x20call\x20in\x20a\x20new\x20tab...','name',']\x20Error\x20running\x20Dynamics365\x20integration','request-promise','util','./util','md5','ioredis','../../../../config/logger','dynamics365','../../../../config/environment','redis','defaults','localhost','socket.io-emitter','modernAuthentication','remoteUri','CloudProvider','data7','tenantId','data2','data5','POST','clientId','password','clientSecret','then','access_token','error',']\x20Wrong\x20credentials!','GET','systemusers?$select=internalemailaddress,isdisabled,systemuserid','Bearer\x20','value','isNil','userEmail','email','internalemailaddress','info','toUpperCase',']\x20Agent\x20found\x20','systemuserid','userId','username','length','catch','message','destcalleridnum','calleridnum','contacts','4.0','body','odata-entityid','substring','lastIndexOf','enduserId','toLowerCase','outbound','contacts?$select=','&$filter='];(function(_0x50a0c2,_0x4befab){var _0x5ebadd=function(_0x3a3342){while(--_0x3a3342){_0x50a0c2['push'](_0x50a0c2['shift']());}};_0x5ebadd(++_0x4befab);}(_0xcb3f,0x9f));var _0xfcb3=function(_0xfae23b,_0x2be4ba){_0xfae23b=_0xfae23b-0x0;var _0x200640=_0xcb3f[_0xfae23b];return _0x200640;};'use strict';var _=require('lodash');var rp=require(_0xfcb3('0x0'));var util=require(_0xfcb3('0x1'));var intUtil=require(_0xfcb3('0x2'));var md5=require(_0xfcb3('0x3'));var Redis=require(_0xfcb3('0x4'));var logger=require(_0xfcb3('0x5'))(_0xfcb3('0x6'));var config=require(_0xfcb3('0x7'));config[_0xfcb3('0x8')]=_[_0xfcb3('0x9')](config[_0xfcb3('0x8')],{'host':_0xfcb3('0xa'),'port':0x18eb});var io=require(_0xfcb3('0xb'))(new Redis(config[_0xfcb3('0x8')]));function getAuthToken(_0x1709f1,_0x586a2e,_0x4eb898){if(_0x1709f1[_0xfcb3('0xc')]){_0x1709f1[_0xfcb3('0xd')]=_0x1709f1[_0xfcb3('0xe')][_0xfcb3('0xf')];_0x1709f1[_0xfcb3('0x10')]=_0x1709f1[_0xfcb3('0xe')][_0xfcb3('0x11')];return Promise['resolve'](_0x1709f1[_0xfcb3('0xe')][_0xfcb3('0x12')]);}var _0x40bb3b={'method':_0xfcb3('0x13'),'uri':_0x586a2e,'form':{'client_id':_0x1709f1[_0xfcb3('0x14')],'resource':_0x1709f1[_0xfcb3('0xd')],'username':_0x1709f1['username'],'password':_0x1709f1['password'],'grant_type':_0xfcb3('0x15'),'client_secret':_0x1709f1[_0xfcb3('0x16')]},'json':!![]};return rp(_0x40bb3b)[_0xfcb3('0x17')](function(_0xed740){return _0xed740[_0xfcb3('0x18')];})['catch'](function(_0x2ba786){logger[_0xfcb3('0x19')]('['+[_0x4eb898['toUpperCase']()]+_0xfcb3('0x1a'));return _0x2ba786['message'];});}function getUser(_0x3de37f,_0x2daf5f,_0x509935,_0x4f6f0b,_0x120345,_0x1b4a0d){return new Promise(function(_0x3314d5,_0x2b15c2){return getAuthToken(_0x2daf5f,_0x4f6f0b,_0x1b4a0d)[_0xfcb3('0x17')](function(_0x4b4b75){var _0x5c3d72={'method':_0xfcb3('0x1b'),'uri':_0x120345+_0xfcb3('0x1c'),'headers':{'Authorization':_0xfcb3('0x1d')+_0x4b4b75,'OData-Version':'4.0'},'json':!![]};return rp(_0x5c3d72);})['then'](function(_0x1b44f1){var _0x14cad5=_0x1b44f1[_0xfcb3('0x1e')];var _0x4aead4=![];var _0x443214=null;if(!_[_0xfcb3('0x1f')](_0x509935)){if(intUtil['validateEmail'](_0x509935['email'])){_0x3de37f[_0xfcb3('0x20')]=_0x509935[_0xfcb3('0x21')];for(_0x443214=0x0;_0x443214<_0x14cad5['length'];_0x443214++){if(_0x14cad5[_0x443214][_0xfcb3('0x22')]===_0x509935['email']&&!_0x14cad5[_0x443214]['isdisabled']){_0x4aead4=!![];logger[_0xfcb3('0x23')]('['+[_0x1b4a0d[_0xfcb3('0x24')]()]+_0xfcb3('0x25')+_0x14cad5[_0x443214][_0xfcb3('0x26')]+'!');_0x3de37f[_0xfcb3('0x27')]=_0x14cad5[_0x443214][_0xfcb3('0x26')];}}}}if(!_0x4aead4){logger[_0xfcb3('0x23')]('['+[_0x1b4a0d['toUpperCase']()]+']\x20Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');_0x3de37f[_0xfcb3('0x20')]=_0x2daf5f[_0xfcb3('0x28')];for(_0x443214=0x0;_0x443214<_0x14cad5[_0xfcb3('0x29')];_0x443214++){if(_0x14cad5[_0x443214][_0xfcb3('0x22')]===_0x2daf5f[_0xfcb3('0x28')]){_0x3de37f[_0xfcb3('0x27')]=_0x14cad5[_0x443214][_0xfcb3('0x26')];}}}_0x3314d5(_0x3de37f);})[_0xfcb3('0x2a')](function(_0x31bc62){_0x2b15c2(_0x31bc62[_0xfcb3('0x2b')]);});});}function createEndUser(_0x3a49e8,_0x2a3ecf,_0x2ba749,_0x17fcea,_0x3e7717,_0x55d8b8,_0x5d9125){return new Promise(function(_0x865ffe,_0x28124c){return getAuthToken(_0x2a3ecf,_0x2ba749,_0x55d8b8)['then'](function(_0x235aad){var _0xa83900=_0x55d8b8['toLowerCase']()==='outbound'?_0x3e7717[_0xfcb3('0x2c')]:_0x3e7717[_0xfcb3('0x2d')];var _0x38e59b={'method':'POST','uri':_0x17fcea+_0xfcb3('0x2e'),'body':{'fullname':_0xa83900,'firstname':_0xa83900,'lastname':'_','mobilephone':null,'address1_telephone1':null,'ownerid@odata.bind':'/systemusers('+_0x3a49e8['userId']+')'},'headers':{'Authorization':_0xfcb3('0x1d')+_0x235aad,'OData-Version':_0xfcb3('0x2f')},'json':!![],'resolveWithFullResponse':!![]};_0x38e59b[_0xfcb3('0x30')][_0x5d9125]=_0xa83900;return rp(_0x38e59b);})[_0xfcb3('0x17')](function(_0x56c029){var _0xc06789=_0x56c029['headers'][_0xfcb3('0x31')];var _0x421eb7=_0xc06789[_0xfcb3('0x32')](_0xc06789[_0xfcb3('0x33')]('(')+0x1,_0xc06789[_0xfcb3('0x33')](')'));_0x3a49e8[_0xfcb3('0x34')]=_0x421eb7;_0x865ffe(_0x3a49e8);})[_0xfcb3('0x2a')](function(_0x21d431){_0x28124c(_0x21d431[_0xfcb3('0x2b')]);});});}function getEndUser(_0x5bba2a,_0x3d4e2b,_0x3f83de,_0x32b4f5,_0x250830,_0x161ca6,_0x5d1e7d,_0x53b483){var _0x1d337f=_0x161ca6[_0xfcb3('0x35')]()===_0xfcb3('0x36')?_0x250830[_0xfcb3('0x2c')]:_0x250830[_0xfcb3('0x2d')];return getAuthToken(_0x3d4e2b,_0x3f83de,_0x161ca6)[_0xfcb3('0x17')](function(_0x4349f0){_0x53b483=_0x53b483?_0x53b483:'telephone1';var _0x29127f={'method':_0xfcb3('0x1b'),'uri':_0x32b4f5+_0xfcb3('0x37')+_0x53b483+_0xfcb3('0x38')+_0x53b483+_0xfcb3('0x39')+_0x1d337f[_0xfcb3('0x3a')]('+',_0xfcb3('0x3b'))+'\x27','headers':{'Authorization':_0xfcb3('0x1d')+_0x4349f0,'If-None-Match':null,'OData-Version':_0xfcb3('0x2f')},'json':!![]};return rp(_0x29127f);})['then'](function(_0x2f4f21){var _0x1c5486=![];if(!_0x2f4f21)return _0x1c5486;var _0x3554c5=_0x2f4f21['value'];for(var _0x3807f8=0x0;_0x3807f8<_0x3554c5[_0xfcb3('0x29')];_0x3807f8++){if(_0x3554c5[_0x3807f8][_0x53b483]===_0x1d337f){_0x1c5486=!![];_0x5bba2a[_0xfcb3('0x34')]=_0x3554c5[_0x3807f8]['contactid'];}}return _0x1c5486;})[_0xfcb3('0x17')](function(_0xae600d){if(_0xae600d)return _0x5bba2a;if(_0x5d1e7d===_0xfcb3('0x3c')){logger[_0xfcb3('0x23')]('['+[_0x161ca6[_0xfcb3('0x24')]()]+_0xfcb3('0x3d'));return _0x5bba2a;}return createEndUser(_0x5bba2a,_0x3d4e2b,_0x3f83de,_0x32b4f5,_0x250830,_0x161ca6,_0x53b483)['then'](function(_0x3eab83){logger[_0xfcb3('0x23')]('['+[_0x161ca6[_0xfcb3('0x24')]()]+']\x20Enduser\x20created!',_0x3eab83[_0xfcb3('0x34')]);return _0x3eab83;});});}function getCustomFields(_0x1fb971,_0x593658,_0x55a772){var _0x34e9a3={};if(_0x1fb971[_0xfcb3('0x29')]>0x0){_[_0xfcb3('0x3e')](_0x1fb971,function(_0x2daf04){if(_[_0xfcb3('0x3f')]([_0xfcb3('0x40'),_0xfcb3('0x41')],_0x2daf04[_0xfcb3('0x42')])&&_0x2daf04[_0xfcb3('0x43')]&&!_0x2daf04[_0xfcb3('0x44')]){var _0x490462=_0x2daf04['idField'][_0xfcb3('0x35')]();var _0x273456=_0x490462[_0xfcb3('0x32')](0x0,_0x490462[_0xfcb3('0x45')]('_'));var _0x168ee2=_0x490462[_0xfcb3('0x32')](_0x490462['indexOf']('_')+0x1);if(_0x273456===_0x55a772){_0x34e9a3[_0x168ee2]=_0x2daf04['content'];}}});}return _0x34e9a3;}function getTicket(_0xa0909f,_0xc0893e,_0x4319fa,_0x6c5a9e,_0x1b2b96,_0x22c6d4,_0x759b65){return new Promise(function(_0x284984,_0x19f78f){var _0x138c7e;return getAuthToken(_0xc0893e,_0x4319fa,_0x759b65)[_0xfcb3('0x17')](function(_0x102868){if(_0x22c6d4[_0xfcb3('0x46')]==='incident'){_0x138c7e={'method':_0xfcb3('0x13'),'uri':_0x6c5a9e+_0xfcb3('0x47'),'body':Object[_0xfcb3('0x48')]({},{'title':intUtil[_0xfcb3('0x49')](_0x22c6d4['Subjects'],_0x1b2b96,'\x20'),'description':intUtil[_0xfcb3('0x49')](_0x22c6d4['Descriptions'],_0x1b2b96,'\x0a'),'customerid_contact@odata.bind':_0xa0909f['enduserId']?_0xfcb3('0x4a')+_0xa0909f[_0xfcb3('0x34')]+')':undefined,'ownerid@odata.bind':_0xfcb3('0x4b')+_0xa0909f[_0xfcb3('0x27')]+')','caseorigincode':'1'},getCustomFields(_0x22c6d4[_0xfcb3('0x4c')],_0x1b2b96,_0x22c6d4[_0xfcb3('0x46')])),'headers':{'Authorization':_0xfcb3('0x1d')+_0x102868,'OData-Version':_0xfcb3('0x2f')},'json':!![],'resolveWithFullResponse':!![]};}if(_0x22c6d4[_0xfcb3('0x46')]===_0xfcb3('0x4d')){var _0x37450e=_0xa0909f[_0xfcb3('0x34')]?[{'partyid_systemuser@odata.bind':_0xfcb3('0x4b')+_0xa0909f[_0xfcb3('0x27')]+')','participationtypemask':_0xa0909f[_0xfcb3('0x4e')]==='queue'?0x2:0x1},{'partyid_contact@odata.bind':_0xfcb3('0x4a')+_0xa0909f[_0xfcb3('0x34')]+')','participationtypemask':_0xa0909f[_0xfcb3('0x4e')]===_0xfcb3('0x4f')?0x1:0x2}]:[{'partyid_systemuser@odata.bind':_0xfcb3('0x4b')+_0xa0909f[_0xfcb3('0x27')]+')','participationtypemask':_0xa0909f[_0xfcb3('0x4e')]==='queue'?0x2:0x1}];_0x138c7e={'method':_0xfcb3('0x13'),'uri':_0x6c5a9e+_0xfcb3('0x50'),'body':Object['assign']({},{'subject':intUtil['getString'](_0x22c6d4[_0xfcb3('0x51')],_0x1b2b96,'\x20'),'phonenumber':String(_0x1b2b96[_0xfcb3('0x2d')]),'description':intUtil['getString'](_0x22c6d4[_0xfcb3('0x52')],_0x1b2b96,'\x0a'),'regardingobjectid_contact@odata.bind':_0xa0909f[_0xfcb3('0x34')]?'/contacts('+_0xa0909f[_0xfcb3('0x34')]+')':undefined,'ownerid@odata.bind':_0xfcb3('0x4b')+_0xa0909f['userId']+')','directioncode':_0xa0909f['callDirection']===_0xfcb3('0x4f')?![]:!![],'phonecall_activity_parties':_0x37450e},getCustomFields(_0x22c6d4[_0xfcb3('0x4c')],_0x1b2b96,_0x22c6d4[_0xfcb3('0x46')])),'headers':{'Authorization':_0xfcb3('0x1d')+_0x102868,'OData-Version':_0xfcb3('0x2f')},'json':!![],'resolveWithFullResponse':!![]};}return rp(_0x138c7e);})[_0xfcb3('0x17')](function(_0xf25dfb){var _0x36e0fe=_0xf25dfb['headers'][_0xfcb3('0x31')];var _0x558263=_0x36e0fe[_0xfcb3('0x32')](_0x36e0fe['lastIndexOf']('(')+0x1,_0x36e0fe[_0xfcb3('0x33')](')'));_0xa0909f['ticketId']=_0x558263;_0x284984(_0xa0909f);})['catch'](function(_0x437a1d){_0x19f78f(_0x437a1d[_0xfcb3('0x2b')]);});});}function emit(_0xeeb49e,_0x39b8eb,_0x587ddd,_0x1a0b89){var _0x4e0f43={'uri':util[_0xfcb3('0x53')](_0xfcb3('0x54'),_0xeeb49e,_0x587ddd,_0x1a0b89)};io['to'](util['format']('user:%s',_0x39b8eb))[_0xfcb3('0x55')](_0xfcb3('0x56'),_0x4e0f43);}exports['cs']=function(_0x1b952d,_0x52fbe0,_0x4cba34,_0x4c0477,_0x31b9a7,_0x25586b,_0x5d6b1b,_0x357afa){var _0x5e445c={};_0x25586b['remoteUri']=_0x25586b[_0xfcb3('0xc')]?intUtil[_0xfcb3('0x57')](_0x25586b[_0xfcb3('0xe')]['data7']):intUtil[_0xfcb3('0x57')](_0x25586b[_0xfcb3('0xd')]);_0x25586b[_0xfcb3('0x58')]=intUtil[_0xfcb3('0x57')](_0x25586b[_0xfcb3('0x58')]);_0x5e445c[_0xfcb3('0x4e')]=_0x357afa===_0xfcb3('0x4f')||_0x357afa===_0xfcb3('0x59')?_0xfcb3('0x4f'):_0xfcb3('0x36');var _0x54aa94=_0x25586b[_0xfcb3('0xc')]?util[_0xfcb3('0x53')](_0xfcb3('0x5a'),_0x25586b[_0xfcb3('0xe')]['data7']):util[_0xfcb3('0x53')](_0xfcb3('0x5a'),_0x25586b['remoteUri']);var _0x110d22=util[_0xfcb3('0x53')]('https://login.microsoftonline.com/%s/oauth2/token',_0x25586b[_0xfcb3('0x10')]);var _0x541e51=util[_0xfcb3('0x53')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x25586b[_0xfcb3('0x58')],_0x52fbe0[_0xfcb3('0x5b')],md5(_0x52fbe0[_0xfcb3('0x5b')]));if(_0x31b9a7&&_0x31b9a7['monitor_format']){logger[_0xfcb3('0x23')]('[QUEUE]','Recording\x20is\x20enabled!');_0x52fbe0['recordingURL']=_0x541e51;}else if(_0x5d6b1b&&_0x5d6b1b[_0xfcb3('0x5c')]&&_0x5d6b1b[_0xfcb3('0x5c')]!=='none'){logger[_0xfcb3('0x23')](_0xfcb3('0x5d'),_0xfcb3('0x5e'));_0x52fbe0[_0xfcb3('0x5f')]=_0x541e51;}else{_0x52fbe0['recordingURL']='';}return getUser(_0x5e445c,_0x25586b,_0x4c0477,_0x110d22,_0x54aa94,_0x357afa)[_0xfcb3('0x17')](function(_0x7c3425){logger[_0xfcb3('0x23')]('['+_0x357afa['toUpperCase']()+_0xfcb3('0x60'),_0x7c3425['userId']);logger[_0xfcb3('0x23')]('['+_0x357afa['toUpperCase']()+_0xfcb3('0x61'),_0x7c3425['userEmail']);return getEndUser(_0x7c3425,_0x25586b,_0x110d22,_0x54aa94,_0x52fbe0,_0x357afa,_0x4cba34['moduleCreate'],_0x4cba34[_0xfcb3('0x62')]);})[_0xfcb3('0x17')](function(_0x422943){logger[_0xfcb3('0x23')]('['+_0x357afa[_0xfcb3('0x24')]()+_0xfcb3('0x63'),_0x422943[_0xfcb3('0x34')]);logger['info']('['+_0x357afa[_0xfcb3('0x24')]()+_0xfcb3('0x64'),_0x52fbe0[_0xfcb3('0x2d')]);return getTicket(_0x422943,_0x25586b,_0x110d22,_0x54aa94,_0x52fbe0,_0x4cba34,_0x357afa);})[_0xfcb3('0x17')](function(_0x28384b){logger['info'](util['format']('['+_0x357afa[_0xfcb3('0x24')]()+_0xfcb3('0x65'),_0x4cba34[_0xfcb3('0x46')],_0x28384b[_0xfcb3('0x66')]));logger['info'](util[_0xfcb3('0x53')]('['+_0x357afa[_0xfcb3('0x24')]()+_0xfcb3('0x67'),_0x357afa));if(_0x357afa!==_0xfcb3('0x59')&&_0x4cba34[_0xfcb3('0x68')]){logger['info']('['+_0x357afa['toUpperCase']()+']',_0xfcb3('0x69'));emit(_0x25586b[_0xfcb3('0xd')],_0x4c0477[_0xfcb3('0x6a')],_0x4cba34[_0xfcb3('0x46')],_0x28384b[_0xfcb3('0x66')]);}})[_0xfcb3('0x2a')](function(_0x37d3b9){logger[_0xfcb3('0x19')]('['+_0x357afa['toUpperCase']()+_0xfcb3('0x6b'),_0x37d3b9[_0xfcb3('0x2b')]);console[_0xfcb3('0x19')]('Error\x20running\x20Dynamics365\x20integration',_0x37d3b9);});};
\ No newline at end of file
+var _0x9204=['userEmail','length','internalemailaddress','isdisabled','info',']\x20Agent\x20found\x20','systemuserid','userId',']\x20Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','destcalleridnum','contacts','/systemusers(','body','headers','odata-entityid','substring','lastIndexOf','enduserId','message','toLowerCase','outbound','calleridnum','GET','contacts?$select=','replace','%2b','nothing',']\x20Enduser\x20created!','includes','string','picklist','type','nameField','idField','content','ticketType','incident','incidents','assign','getString','Descriptions','/contacts(','Fields','phonecall','queue','callDirection','Subjects','format','%s/main.aspx?pagetype=entityrecord&etn=%s&id=%s','user:%s','emit','trigger:browser:url','stripTrailingSlash','serverUrl','unmanaged','%s/api/data/v9.0/','data7','https://login.microsoftonline.com/%s/oauth2/token','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none','[OUTBOUND]',']\x20The\x20User\x20ID\x20is:',']\x20The\x20User\x20email\x20is:','moduleCreate','additionalSearchContact',']\x20The\x20Enduser\x20ID\x20is:',']\x20The\x20%s\x20ID\x20is:\x20%s','ticketId',']\x20Call\x20direction:\x20%s','openNewTab','Displaying\x20call\x20in\x20a\x20new\x20tab...','name',']\x20Error\x20running\x20Dynamics365\x20integration','lodash','request-promise','./util','ioredis','../../../../config/logger','dynamics365','../../../../config/environment','redis','socket.io-emitter','modernAuthentication','remoteUri','tenantId','CloudProvider','data2','resolve','data5','POST','username','password','clientSecret','then','access_token','catch','error','toUpperCase',']\x20Wrong\x20credentials!','Bearer\x20','4.0','value','isNil','validateEmail','email'];(function(_0x7e2384,_0xd8f685){var _0x40656f=function(_0x10c17f){while(--_0x10c17f){_0x7e2384['push'](_0x7e2384['shift']());}};_0x40656f(++_0xd8f685);}(_0x9204,0x194));var _0x4920=function(_0x1b3d86,_0x4463fa){_0x1b3d86=_0x1b3d86-0x0;var _0x171257=_0x9204[_0x1b3d86];return _0x171257;};'use strict';var _=require(_0x4920('0x0'));var rp=require(_0x4920('0x1'));var util=require('util');var intUtil=require(_0x4920('0x2'));var md5=require('md5');var Redis=require(_0x4920('0x3'));var logger=require(_0x4920('0x4'))(_0x4920('0x5'));var config=require(_0x4920('0x6'));config[_0x4920('0x7')]=_['defaults'](config[_0x4920('0x7')],{'host':'localhost','port':0x18eb});var io=require(_0x4920('0x8'))(new Redis(config[_0x4920('0x7')]));function getAuthToken(_0x4e132a,_0x593c37,_0x5ece12){if(_0x4e132a[_0x4920('0x9')]){_0x4e132a[_0x4920('0xa')]=_0x4e132a['CloudProvider']['data7'];_0x4e132a[_0x4920('0xb')]=_0x4e132a[_0x4920('0xc')][_0x4920('0xd')];return Promise[_0x4920('0xe')](_0x4e132a['CloudProvider'][_0x4920('0xf')]);}var _0x4e8518={'method':_0x4920('0x10'),'uri':_0x593c37,'form':{'client_id':_0x4e132a['clientId'],'resource':_0x4e132a['remoteUri'],'username':_0x4e132a[_0x4920('0x11')],'password':_0x4e132a[_0x4920('0x12')],'grant_type':_0x4920('0x12'),'client_secret':_0x4e132a[_0x4920('0x13')]},'json':!![]};return rp(_0x4e8518)[_0x4920('0x14')](function(_0x402e1f){return _0x402e1f[_0x4920('0x15')];})[_0x4920('0x16')](function(_0x2ec27a){logger[_0x4920('0x17')]('['+[_0x5ece12[_0x4920('0x18')]()]+_0x4920('0x19'));return _0x2ec27a['message'];});}function getUser(_0x274b1c,_0x3c401f,_0x5de2fd,_0x2af145,_0x216483,_0x3d6ecb){return new Promise(function(_0x46cc97,_0x4f6d02){return getAuthToken(_0x3c401f,_0x2af145,_0x3d6ecb)[_0x4920('0x14')](function(_0x4e05ad){var _0x3e8072={'method':'GET','uri':_0x216483+'systemusers?$select=internalemailaddress,isdisabled,systemuserid','headers':{'Authorization':_0x4920('0x1a')+_0x4e05ad,'OData-Version':_0x4920('0x1b')},'json':!![]};return rp(_0x3e8072);})[_0x4920('0x14')](function(_0x3aa491){var _0x381167=_0x3aa491[_0x4920('0x1c')];var _0x41091c=![];var _0x51a1c6=null;if(!_[_0x4920('0x1d')](_0x5de2fd)){if(intUtil[_0x4920('0x1e')](_0x5de2fd[_0x4920('0x1f')])){_0x274b1c[_0x4920('0x20')]=_0x5de2fd[_0x4920('0x1f')];for(_0x51a1c6=0x0;_0x51a1c6<_0x381167[_0x4920('0x21')];_0x51a1c6++){if(_0x381167[_0x51a1c6][_0x4920('0x22')]===_0x5de2fd[_0x4920('0x1f')]&&!_0x381167[_0x51a1c6][_0x4920('0x23')]){_0x41091c=!![];logger[_0x4920('0x24')]('['+[_0x3d6ecb[_0x4920('0x18')]()]+_0x4920('0x25')+_0x381167[_0x51a1c6][_0x4920('0x26')]+'!');_0x274b1c[_0x4920('0x27')]=_0x381167[_0x51a1c6]['systemuserid'];}}}}if(!_0x41091c){logger['info']('['+[_0x3d6ecb['toUpperCase']()]+_0x4920('0x28'));_0x274b1c['userEmail']=_0x3c401f['username'];for(_0x51a1c6=0x0;_0x51a1c6<_0x381167[_0x4920('0x21')];_0x51a1c6++){if(_0x381167[_0x51a1c6]['internalemailaddress']===_0x3c401f[_0x4920('0x11')]){_0x274b1c['userId']=_0x381167[_0x51a1c6][_0x4920('0x26')];}}}_0x46cc97(_0x274b1c);})[_0x4920('0x16')](function(_0x395cca){_0x4f6d02(_0x395cca['message']);});});}function createEndUser(_0x47d344,_0x2f5f2b,_0x3454b0,_0x23dccf,_0x12f54d,_0x58657b,_0x357763){return new Promise(function(_0x59af80,_0x256953){return getAuthToken(_0x2f5f2b,_0x3454b0,_0x58657b)[_0x4920('0x14')](function(_0x4a6f00){var _0x4f85d5=_0x58657b['toLowerCase']()==='outbound'?_0x12f54d[_0x4920('0x29')]:_0x12f54d['calleridnum'];var _0x5558f3={'method':_0x4920('0x10'),'uri':_0x23dccf+_0x4920('0x2a'),'body':{'fullname':_0x4f85d5,'firstname':_0x4f85d5,'lastname':'_','mobilephone':null,'address1_telephone1':null,'ownerid@odata.bind':_0x4920('0x2b')+_0x47d344[_0x4920('0x27')]+')'},'headers':{'Authorization':_0x4920('0x1a')+_0x4a6f00,'OData-Version':'4.0'},'json':!![],'resolveWithFullResponse':!![]};_0x5558f3[_0x4920('0x2c')][_0x357763]=_0x4f85d5;return rp(_0x5558f3);})[_0x4920('0x14')](function(_0x4fd3f1){var _0xbe2aef=_0x4fd3f1[_0x4920('0x2d')][_0x4920('0x2e')];var _0x3a5b3e=_0xbe2aef[_0x4920('0x2f')](_0xbe2aef[_0x4920('0x30')]('(')+0x1,_0xbe2aef[_0x4920('0x30')](')'));_0x47d344[_0x4920('0x31')]=_0x3a5b3e;_0x59af80(_0x47d344);})[_0x4920('0x16')](function(_0xb3e648){_0x256953(_0xb3e648[_0x4920('0x32')]);});});}function getEndUser(_0x4919cf,_0x408448,_0x518e34,_0x213220,_0x126e88,_0x4fe21e,_0x4bb338,_0x5d5bfc){var _0x1598ac=_0x4fe21e[_0x4920('0x33')]()===_0x4920('0x34')?_0x126e88[_0x4920('0x29')]:_0x126e88[_0x4920('0x35')];return getAuthToken(_0x408448,_0x518e34,_0x4fe21e)['then'](function(_0x217002){_0x5d5bfc=_0x5d5bfc?_0x5d5bfc:'telephone1';var _0x35905f={'method':_0x4920('0x36'),'uri':_0x213220+_0x4920('0x37')+_0x5d5bfc+'&$filter='+_0x5d5bfc+'\x20eq\x20\x27'+_0x1598ac[_0x4920('0x38')]('+',_0x4920('0x39'))+'\x27','headers':{'Authorization':'Bearer\x20'+_0x217002,'If-None-Match':null,'OData-Version':_0x4920('0x1b')},'json':!![]};return rp(_0x35905f);})[_0x4920('0x14')](function(_0x3894d2){var _0x563a31=![];if(!_0x3894d2)return _0x563a31;var _0x5506b1=_0x3894d2['value'];for(var _0x51c35d=0x0;_0x51c35d<_0x5506b1[_0x4920('0x21')];_0x51c35d++){if(_0x5506b1[_0x51c35d][_0x5d5bfc]===_0x1598ac){_0x563a31=!![];_0x4919cf[_0x4920('0x31')]=_0x5506b1[_0x51c35d]['contactid'];}}return _0x563a31;})[_0x4920('0x14')](function(_0x5648e2){if(_0x5648e2)return _0x4919cf;if(_0x4bb338===_0x4920('0x3a')){logger[_0x4920('0x24')]('['+[_0x4fe21e[_0x4920('0x18')]()]+']\x20Enduser\x20NOT\x20Created\x20-\x20ModuleCreate\x20=\x20Nothing');return _0x4919cf;}return createEndUser(_0x4919cf,_0x408448,_0x518e34,_0x213220,_0x126e88,_0x4fe21e,_0x5d5bfc)[_0x4920('0x14')](function(_0x1c9a76){logger[_0x4920('0x24')]('['+[_0x4fe21e[_0x4920('0x18')]()]+_0x4920('0x3b'),_0x1c9a76[_0x4920('0x31')]);return _0x1c9a76;});});}function getCustomFields(_0x40caf0,_0x45fa56,_0x1a2531){var _0x55403c={};if(_0x40caf0[_0x4920('0x21')]>0x0){_['forEach'](_0x40caf0,function(_0x59076d){if(_[_0x4920('0x3c')]([_0x4920('0x3d'),_0x4920('0x3e')],_0x59076d[_0x4920('0x3f')])&&_0x59076d[_0x4920('0x40')]&&!_0x59076d['customField']){var _0x4a26b6=_0x59076d[_0x4920('0x41')][_0x4920('0x33')]();var _0x11cfcc=_0x4a26b6[_0x4920('0x2f')](0x0,_0x4a26b6['indexOf']('_'));var _0xefdc8c=_0x4a26b6[_0x4920('0x2f')](_0x4a26b6['indexOf']('_')+0x1);if(_0x11cfcc===_0x1a2531){_0x55403c[_0xefdc8c]=_0x59076d[_0x4920('0x42')];}}});}return _0x55403c;}function getTicket(_0x3968f0,_0xa50434,_0x5c8faf,_0x3a1e7c,_0x459f15,_0xd19483,_0x17f6ff){return new Promise(function(_0x3709d8,_0x128cb8){var _0x5218fa;return getAuthToken(_0xa50434,_0x5c8faf,_0x17f6ff)[_0x4920('0x14')](function(_0xe978a5){if(_0xd19483[_0x4920('0x43')]===_0x4920('0x44')){_0x5218fa={'method':_0x4920('0x10'),'uri':_0x3a1e7c+_0x4920('0x45'),'body':Object[_0x4920('0x46')]({},{'title':intUtil[_0x4920('0x47')](_0xd19483['Subjects'],_0x459f15,'\x20'),'description':intUtil[_0x4920('0x47')](_0xd19483[_0x4920('0x48')],_0x459f15,'\x0a'),'customerid_contact@odata.bind':_0x3968f0['enduserId']?_0x4920('0x49')+_0x3968f0[_0x4920('0x31')]+')':undefined,'ownerid@odata.bind':'/systemusers('+_0x3968f0[_0x4920('0x27')]+')','caseorigincode':'1'},getCustomFields(_0xd19483[_0x4920('0x4a')],_0x459f15,_0xd19483[_0x4920('0x43')])),'headers':{'Authorization':'Bearer\x20'+_0xe978a5,'OData-Version':_0x4920('0x1b')},'json':!![],'resolveWithFullResponse':!![]};}if(_0xd19483[_0x4920('0x43')]===_0x4920('0x4b')){var _0x506b09=_0x3968f0[_0x4920('0x31')]?[{'partyid_systemuser@odata.bind':_0x4920('0x2b')+_0x3968f0[_0x4920('0x27')]+')','participationtypemask':_0x3968f0['callDirection']==='queue'?0x2:0x1},{'partyid_contact@odata.bind':'/contacts('+_0x3968f0[_0x4920('0x31')]+')','participationtypemask':_0x3968f0['callDirection']===_0x4920('0x4c')?0x1:0x2}]:[{'partyid_systemuser@odata.bind':_0x4920('0x2b')+_0x3968f0[_0x4920('0x27')]+')','participationtypemask':_0x3968f0[_0x4920('0x4d')]===_0x4920('0x4c')?0x2:0x1}];_0x5218fa={'method':'POST','uri':_0x3a1e7c+'phonecalls','body':Object[_0x4920('0x46')]({},{'subject':intUtil[_0x4920('0x47')](_0xd19483[_0x4920('0x4e')],_0x459f15,'\x20'),'phonenumber':String(_0x459f15[_0x4920('0x35')]),'description':intUtil[_0x4920('0x47')](_0xd19483[_0x4920('0x48')],_0x459f15,'\x0a'),'regardingobjectid_contact@odata.bind':_0x3968f0[_0x4920('0x31')]?_0x4920('0x49')+_0x3968f0[_0x4920('0x31')]+')':undefined,'ownerid@odata.bind':_0x4920('0x2b')+_0x3968f0[_0x4920('0x27')]+')','directioncode':_0x3968f0[_0x4920('0x4d')]===_0x4920('0x4c')?![]:!![],'phonecall_activity_parties':_0x506b09},getCustomFields(_0xd19483['Fields'],_0x459f15,_0xd19483[_0x4920('0x43')])),'headers':{'Authorization':_0x4920('0x1a')+_0xe978a5,'OData-Version':_0x4920('0x1b')},'json':!![],'resolveWithFullResponse':!![]};}return rp(_0x5218fa);})[_0x4920('0x14')](function(_0x60c0e8){var _0x157871=_0x60c0e8[_0x4920('0x2d')][_0x4920('0x2e')];var _0xd1fa2c=_0x157871[_0x4920('0x2f')](_0x157871[_0x4920('0x30')]('(')+0x1,_0x157871[_0x4920('0x30')](')'));_0x3968f0['ticketId']=_0xd1fa2c;_0x3709d8(_0x3968f0);})[_0x4920('0x16')](function(_0x25fa81){_0x128cb8(_0x25fa81[_0x4920('0x32')]);});});}function emit(_0x32ab69,_0x1d95c8,_0x5abfd8,_0x19b96a){var _0x3f8719={'uri':util[_0x4920('0x4f')](_0x4920('0x50'),_0x32ab69,_0x5abfd8,_0x19b96a)};io['to'](util['format'](_0x4920('0x51'),_0x1d95c8))[_0x4920('0x52')](_0x4920('0x53'),_0x3f8719);}exports['cs']=function(_0x420527,_0x37c23a,_0x49f3f6,_0x2523f8,_0x2c6069,_0x29f847,_0x42a750,_0x1272b4){var _0x3d8ddf={};_0x29f847['remoteUri']=_0x29f847['modernAuthentication']?intUtil['stripTrailingSlash'](_0x29f847[_0x4920('0xc')]['data7']):intUtil[_0x4920('0x54')](_0x29f847[_0x4920('0xa')]);_0x29f847[_0x4920('0x55')]=intUtil[_0x4920('0x54')](_0x29f847[_0x4920('0x55')]);_0x3d8ddf['callDirection']=_0x1272b4===_0x4920('0x4c')||_0x1272b4===_0x4920('0x56')?_0x4920('0x4c'):_0x4920('0x34');var _0x3cb78e=_0x29f847['modernAuthentication']?util['format'](_0x4920('0x57'),_0x29f847[_0x4920('0xc')][_0x4920('0x58')]):util[_0x4920('0x4f')](_0x4920('0x57'),_0x29f847[_0x4920('0xa')]);var _0x28e8a8=util[_0x4920('0x4f')](_0x4920('0x59'),_0x29f847[_0x4920('0xb')]);var _0x139923=util[_0x4920('0x4f')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x29f847['serverUrl'],_0x37c23a['uniqueid'],md5(_0x37c23a['uniqueid']));if(_0x2c6069&&_0x2c6069[_0x4920('0x5a')]){logger[_0x4920('0x24')](_0x4920('0x5b'),_0x4920('0x5c'));_0x37c23a[_0x4920('0x5d')]=_0x139923;}else if(_0x42a750&&_0x42a750[_0x4920('0x5e')]&&_0x42a750[_0x4920('0x5e')]!==_0x4920('0x5f')){logger[_0x4920('0x24')](_0x4920('0x60'),'Recording\x20is\x20enabled!');_0x37c23a[_0x4920('0x5d')]=_0x139923;}else{_0x37c23a['recordingURL']='';}return getUser(_0x3d8ddf,_0x29f847,_0x2523f8,_0x28e8a8,_0x3cb78e,_0x1272b4)['then'](function(_0x5e80e7){logger[_0x4920('0x24')]('['+_0x1272b4['toUpperCase']()+_0x4920('0x61'),_0x5e80e7[_0x4920('0x27')]);logger['info']('['+_0x1272b4['toUpperCase']()+_0x4920('0x62'),_0x5e80e7[_0x4920('0x20')]);return getEndUser(_0x5e80e7,_0x29f847,_0x28e8a8,_0x3cb78e,_0x37c23a,_0x1272b4,_0x49f3f6[_0x4920('0x63')],_0x49f3f6[_0x4920('0x64')]);})[_0x4920('0x14')](function(_0x446251){logger['info']('['+_0x1272b4[_0x4920('0x18')]()+_0x4920('0x65'),_0x446251[_0x4920('0x31')]);logger['info']('['+_0x1272b4['toUpperCase']()+']\x20The\x20Enduser\x20phone\x20is:',_0x37c23a[_0x4920('0x35')]);return getTicket(_0x446251,_0x29f847,_0x28e8a8,_0x3cb78e,_0x37c23a,_0x49f3f6,_0x1272b4);})[_0x4920('0x14')](function(_0x177a81){logger[_0x4920('0x24')](util[_0x4920('0x4f')]('['+_0x1272b4['toUpperCase']()+_0x4920('0x66'),_0x49f3f6[_0x4920('0x43')],_0x177a81[_0x4920('0x67')]));logger[_0x4920('0x24')](util[_0x4920('0x4f')]('['+_0x1272b4[_0x4920('0x18')]()+_0x4920('0x68'),_0x1272b4));if(_0x1272b4!=='unmanaged'&&_0x49f3f6[_0x4920('0x69')]){logger[_0x4920('0x24')]('['+_0x1272b4['toUpperCase']()+']',_0x4920('0x6a'));emit(_0x29f847[_0x4920('0xa')],_0x2523f8[_0x4920('0x6b')],_0x49f3f6[_0x4920('0x43')],_0x177a81[_0x4920('0x67')]);}})['catch'](function(_0x23d9a3){logger['error']('['+_0x1272b4[_0x4920('0x18')]()+_0x4920('0x6c'),_0x23d9a3['message']);console['error']('Error\x20running\x20Dynamics365\x20integration',_0x23d9a3);});};
\ No newline at end of file
index c4c4e73..24c35df 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0410=['defaults','socket.io-emitter','application/json','emit','info','Creating\x20new\x20ticket...','format','Caller\x20-\x20%s','calleridnum','Subjects','getString','<br>','Tags','name','Fields','custom_fields','mapValues','keyBy','value','remoteUri','then','Ticket\x20created!','validateEmail','length','Agent\x20found!','find','email','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/api/v2/agents/me','Admin\x20account\x20selected.','%s/api/v2/contacts','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','POST','Enduser\x20created.','apiKey','toString','base64','debug','[HTTP]','GET','map','forEach','string','picklist','type','nameField','customField','toLowerCase','content','includes','idField','push','variable','variableName','Variable','queue','stripTrailingSlash','serverUrl','monitor_format','Recording\x20is\x20enabled!','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','The\x20User\x20ID\x20is:','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','[QUEUE]','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','error','stringify','outbound','recordingFormat','none','Authorization','destcalleridname','trigger:browser:url','%s/helpdesk/tickets/%d','catch','[OUTBOUND]','unmanaged','toUpperCase','calleridname','lastevent','lodash','request-promise','md5','./util','../../../../config/logger','freshdesk','redis'];(function(_0x5be327,_0x4ad045){var _0x1db0b9=function(_0x46dcde){while(--_0x46dcde){_0x5be327['push'](_0x5be327['shift']());}};_0x1db0b9(++_0x4ad045);}(_0x0410,0x169));var _0x0041=function(_0x48113d,_0x18174f){_0x48113d=_0x48113d-0x0;var _0xbf60ab=_0x0410[_0x48113d];return _0xbf60ab;};'use strict';var _=require(_0x0041('0x0'));var rp=require(_0x0041('0x1'));var md5=require(_0x0041('0x2'));var util=require('util');var Redis=require('ioredis');var intUtil=require(_0x0041('0x3'));var config=require('../../../../config/environment');var logger=require(_0x0041('0x4'))(_0x0041('0x5'));config[_0x0041('0x6')]=_[_0x0041('0x7')](config[_0x0041('0x6')],{'host':'localhost','port':0x18eb});var io=require(_0x0041('0x8'))(new Redis(config[_0x0041('0x6')]));var headers={'Content-Type':_0x0041('0x9'),'Accept':'application/json'};function emit(_0x2577a6,_0x265db2,_0x54d2be){io['to'](_0x2577a6)[_0x0041('0xa')](_0x265db2,_0x54d2be);}function getTicket(_0x5be36a,_0xfeae24,_0x129b24,_0x97b396,_0x4b16af){logger[_0x0041('0xb')](_0x0041('0xc'));var _0x31399e=_['merge']({'responder_id':_0xfeae24['id'],'requester_id':_0x129b24['id'],'name':util[_0x0041('0xd')](_0x0041('0xe'),_0x4b16af['calleridname']),'phone':_0x4b16af[_0x0041('0xf')],'source':0x3,'priority':0x1,'status':0x2,'subject':intUtil['getString'](_0x97b396[_0x0041('0x10')],_0x4b16af,'\x20'),'description':intUtil[_0x0041('0x11')](_0x97b396['Descriptions'],_0x4b16af,_0x0041('0x12')),'tags':getTags(_0x97b396[_0x0041('0x13')],_0x0041('0x14'))},getCustomFields(_0x97b396[_0x0041('0x15')],_0x4b16af));_0x31399e[_0x0041('0x16')]=_[_0x0041('0x17')](_[_0x0041('0x18')](_0x31399e[_0x0041('0x16')],'id'),_0x0041('0x19'));return request({'uri':util['format']('%s/api/v2/tickets',_0x5be36a[_0x0041('0x1a')]),'method':'POST','body':_0x31399e})[_0x0041('0x1b')](function(_0x3e755e){logger[_0x0041('0xb')](_0x0041('0x1c'));return _0x3e755e;});}function getUser(_0x84244a,_0x5c522d){if(intUtil[_0x0041('0x1d')](_0x5c522d)){return request({'uri':util[_0x0041('0xd')]('%s/api/v2/agents',_0x84244a[_0x0041('0x1a')]),'qs':{'email':_0x5c522d}})[_0x0041('0x1b')](function(_0x165a34){if(_0x165a34[_0x0041('0x1e')]){logger[_0x0041('0xb')](_0x0041('0x1f'));return _[_0x0041('0x20')](_0x165a34,function(_0x54b267){return _0x54b267['contact'][_0x0041('0x21')]===_0x5c522d;});}else{logger[_0x0041('0xb')](_0x0041('0x22'));return request({'uri':util[_0x0041('0xd')](_0x0041('0x23'),_0x84244a['remoteUri'])})[_0x0041('0x1b')](function(_0x57bb55){logger[_0x0041('0xb')](_0x0041('0x24'));return _0x57bb55;});}});}else{logger[_0x0041('0xb')]('Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!');return request({'uri':util[_0x0041('0xd')](_0x0041('0x23'),_0x84244a[_0x0041('0x1a')])})[_0x0041('0x1b')](function(_0x40221b){logger['info'](_0x0041('0x24'));return _0x40221b;});}}function getEndUser(_0x41d6d1,_0x1f528a,_0x4c59e1){logger['info']('Searching\x20enduser\x20with\x20phone',_0x4c59e1);return request({'uri':util[_0x0041('0xd')](_0x0041('0x25'),_0x41d6d1[_0x0041('0x1a')]),'qs':{'phone':_0x4c59e1}})['then'](function(_0x3ea57e){if(_0x3ea57e[_0x0041('0x1e')]){logger[_0x0041('0xb')](_0x0041('0x26'));return _[_0x0041('0x20')](_0x3ea57e,{'phone':_0x4c59e1});}else{logger[_0x0041('0xb')](_0x0041('0x27'));return request({'uri':util['format']('%s/api/v2/contacts',_0x41d6d1[_0x0041('0x1a')]),'method':_0x0041('0x28'),'body':{'name':_0x1f528a,'phone':_0x4c59e1}})['then'](function(_0x4ea8a7){logger[_0x0041('0xb')](_0x0041('0x29'));return _0x4ea8a7;});}});}function getAuth(_0x4dd8bc){return util['format']('Basic\x20%s',new Buffer(_0x4dd8bc[_0x0041('0x2a')]+':X')[_0x0041('0x2b')](_0x0041('0x2c')));}function request(_0x31751b){logger[_0x0041('0x2d')](_0x0041('0x2e'),JSON['stringify'](_0x31751b));return rp(_[_0x0041('0x7')](_0x31751b,{'method':_0x0041('0x2f'),'headers':headers,'json':!![]}));}function getTags(_0x19606e,_0x5da55c){var _0x4763c8=[];if(_0x19606e&&_0x19606e[_0x0041('0x1e')]>0x0){_0x4763c8=_[_0x0041('0x30')](_0x19606e,_0x5da55c);}return _0x4763c8;}function getCustomFields(_0x46a2c8,_0x1fe123){var _0x383c0a=[];var _0x40a4bd={'custom_fields':[]};if(_0x46a2c8['length']>0x0){_[_0x0041('0x31')](_0x46a2c8,function(_0x542220){if(_['includes']([_0x0041('0x32'),_0x0041('0x33')],_0x542220[_0x0041('0x34')])&&_0x542220[_0x0041('0x35')]&&!_0x542220[_0x0041('0x36')]){_0x40a4bd[_0x542220['nameField'][_0x0041('0x37')]()]=_0x542220[_0x0041('0x38')][_0x0041('0x2b')]();}else if(_[_0x0041('0x39')]([_0x0041('0x32'),_0x0041('0x33')],_0x542220[_0x0041('0x34')])&&_0x542220[_0x0041('0x3a')]&&_0x542220[_0x0041('0x36')]){_0x40a4bd[_0x0041('0x16')][_0x0041('0x3b')]({'id':_0x542220[_0x0041('0x3a')],'value':_0x542220['content'][_0x0041('0x2b')]()});}else if(_0x542220['type']===_0x0041('0x3c')&&_0x542220[_0x0041('0x3d')]&&_0x542220[_0x0041('0x3a')]&&_0x542220['customField']){_0x1fe123[_0x542220['variableName']]&&_0x40a4bd['custom_fields']['push']({'id':_0x542220[_0x0041('0x3a')],'value':_0x1fe123[_0x542220[_0x0041('0x3d')]]['toString']()});}else if(_0x542220[_0x0041('0x34')]==='customVariable'&&_0x542220[_0x0041('0x3e')]&&_0x542220['Variable']['name']&&_0x542220[_0x0041('0x3a')]&&_0x542220[_0x0041('0x36')]){_0x1fe123[_0x542220[_0x0041('0x3e')][_0x0041('0x14')][_0x0041('0x37')]()]&&_0x40a4bd[_0x0041('0x16')][_0x0041('0x3b')]({'id':_0x542220['idField'],'value':_0x1fe123[_0x542220[_0x0041('0x3e')][_0x0041('0x14')][_0x0041('0x37')]()][_0x0041('0x2b')]()});}});}return _0x40a4bd;}exports[_0x0041('0x3f')]=function(_0xf1ec30,_0x2a5b01,_0x4f938d,_0x37c30e,_0x3c522e,_0x230578){var _0x8c67d4,_0x590ee2;_0x230578[_0x0041('0x1a')]=intUtil[_0x0041('0x40')](_0x230578[_0x0041('0x1a')]);_0x230578[_0x0041('0x41')]=intUtil[_0x0041('0x40')](_0x230578[_0x0041('0x41')]);if(_0x3c522e&&_0x3c522e[_0x0041('0x42')]){logger['info']('[QUEUE]',_0x0041('0x43'));_0x2a5b01[_0x0041('0x44')]=util[_0x0041('0xd')](_0x0041('0x45'),_0x230578[_0x0041('0x41')],_0x2a5b01[_0x0041('0x46')],md5(_0x2a5b01[_0x0041('0x46')]));}else{_0x2a5b01['recordingURL']='';}headers['Authorization']=getAuth(_0x230578);return getUser(_0x230578,_0x37c30e[_0x0041('0x21')])[_0x0041('0x1b')](function(_0x362d1d){_0x8c67d4=_0x362d1d;logger[_0x0041('0xb')](_0x0041('0x47'),_0x8c67d4['id']);return getEndUser(_0x230578,_0x2a5b01['calleridname'],_0x2a5b01['calleridnum']);})[_0x0041('0x1b')](function(_0x1f1e21){_0x590ee2=_0x1f1e21;logger[_0x0041('0xb')](_0x0041('0x48'),_0x590ee2['id']);return getTicket(_0x230578,_0x8c67d4,_0x590ee2,_0x4f938d,_0x2a5b01);})['then'](function(_0x12b2b9){if(_0x12b2b9&&_0x12b2b9['id']){logger['info'](_0x0041('0x1c'));logger[_0x0041('0xb')](_0x0041('0x49'),_0x12b2b9['id']);logger[_0x0041('0xb')](_0x0041('0x4a'),_0x0041('0x4b'));emit(util[_0x0041('0xd')](_0x0041('0x4c'),_0x37c30e[_0x0041('0x14')]),'trigger:browser:url',{'uri':util[_0x0041('0xd')]('%s/helpdesk/tickets/%d',_0x230578[_0x0041('0x1a')],_0x12b2b9['id'])});}})['catch'](function(_0x2d8b7b){logger[_0x0041('0x4d')]('[QUEUE]',JSON[_0x0041('0x4e')](_0x2d8b7b));});};exports[_0x0041('0x4f')]=function(_0x55e77e,_0x34d8f4,_0x276c3d,_0x5d4f1a,_0x37edbf,_0x1b89fe,_0x435935){var _0x5de1bd,_0x9b1f3a;_0x1b89fe[_0x0041('0x1a')]=intUtil[_0x0041('0x40')](_0x1b89fe[_0x0041('0x1a')]);_0x1b89fe[_0x0041('0x41')]=intUtil[_0x0041('0x40')](_0x1b89fe[_0x0041('0x41')]);if(_0x435935&&_0x435935[_0x0041('0x50')]&&_0x435935[_0x0041('0x50')]!==_0x0041('0x51')){logger[_0x0041('0xb')]('[OUTBOUND]',_0x0041('0x43'));_0x34d8f4[_0x0041('0x44')]=util[_0x0041('0xd')](_0x0041('0x45'),_0x1b89fe['serverUrl'],_0x34d8f4[_0x0041('0x46')],md5(_0x34d8f4['uniqueid']));}headers[_0x0041('0x52')]=getAuth(_0x1b89fe);return getUser(_0x1b89fe,_0x5d4f1a[_0x0041('0x21')])[_0x0041('0x1b')](function(_0xc08b84){_0x5de1bd=_0xc08b84;logger['info']('The\x20User\x20ID\x20is:',_0x5de1bd['id']);return getEndUser(_0x1b89fe,_0x34d8f4[_0x0041('0x53')],_0x34d8f4['destcalleridnum']);})[_0x0041('0x1b')](function(_0x5d5400){_0x9b1f3a=_0x5d5400;logger['info'](_0x0041('0x48'),_0x9b1f3a['id']);return getTicket(_0x1b89fe,_0x5de1bd,_0x9b1f3a,_0x276c3d,_0x34d8f4);})['then'](function(_0x5bb32f){if(_0x5bb32f&&_0x5bb32f['id']){logger[_0x0041('0xb')](_0x0041('0x1c'));logger[_0x0041('0xb')](_0x0041('0x49'),_0x5bb32f['id']);logger['info']('[OUTBOUND]',_0x0041('0x4b'));emit(util[_0x0041('0xd')](_0x0041('0x4c'),_0x5d4f1a['name']),_0x0041('0x54'),{'uri':util[_0x0041('0xd')](_0x0041('0x55'),_0x1b89fe[_0x0041('0x1a')],_0x5bb32f['id'])});}})[_0x0041('0x56')](function(_0x33ca5a){logger['error'](_0x0041('0x57'),JSON['stringify'](_0x33ca5a));});};exports[_0x0041('0x58')]=function(_0x226588,_0x4729b5,_0x10ecc7,_0x5d24c5,_0x15e239,_0x4a76bb){var _0x2a98f5,_0xd789f4;_0x4a76bb['remoteUri']=intUtil['stripTrailingSlash'](_0x4a76bb[_0x0041('0x1a')]);_0x4a76bb[_0x0041('0x41')]=intUtil[_0x0041('0x40')](_0x4a76bb[_0x0041('0x41')]);if(_0x15e239&&_0x15e239[_0x0041('0x42')]){logger[_0x0041('0xb')]('['+_0x4729b5['lastevent'][_0x0041('0x59')]()+']','Recording\x20is\x20enabled!');_0x4729b5[_0x0041('0x44')]=util[_0x0041('0xd')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x4a76bb[_0x0041('0x41')],_0x4729b5['uniqueid'],md5(_0x4729b5[_0x0041('0x46')]));}else{_0x4729b5['recordingURL']='';}headers[_0x0041('0x52')]=getAuth(_0x4a76bb);return getUser(_0x4a76bb,'')[_0x0041('0x1b')](function(_0x53e529){_0x2a98f5=_0x53e529;logger['info']('The\x20User\x20ID\x20is:',_0x2a98f5['id']);return getEndUser(_0x4a76bb,_0x4729b5[_0x0041('0x5a')],_0x4729b5[_0x0041('0xf')]);})['then'](function(_0x2fea04){_0xd789f4=_0x2fea04;logger[_0x0041('0xb')](_0x0041('0x48'),_0xd789f4['id']);return getTicket(_0x4a76bb,_0x2a98f5,_0xd789f4,_0x10ecc7,_0x4729b5);})[_0x0041('0x1b')](function(_0x1095a3){if(_0x1095a3){logger[_0x0041('0xb')](_0x0041('0x1c'));logger[_0x0041('0xb')]('The\x20Ticket\x20ID\x20is:',_0x1095a3['id']);}})[_0x0041('0x56')](function(_0x11d6ac){logger[_0x0041('0x4d')]('['+_0x4729b5[_0x0041('0x5b')][_0x0041('0x59')]()+']',JSON['stringify'](_0x11d6ac));});};
\ No newline at end of file
+var _0x6937=['[OUTBOUND]','Recording\x20is\x20enabled!','The\x20User\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','user:%s','catch','unmanaged','toUpperCase','lastevent','lodash','util','ioredis','./util','../../../../config/environment','../../../../config/logger','freshdesk','redis','defaults','localhost','socket.io-emitter','application/json','emit','info','Creating\x20new\x20ticket...','merge','format','Caller\x20-\x20%s','calleridname','getString','Subjects','Descriptions','<br>','name','Fields','custom_fields','keyBy','%s/api/v2/tickets','remoteUri','POST','then','Ticket\x20created!','%s/api/v2/agents','length','find','contact','email','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/api/v2/agents/me','Admin\x20account\x20selected.','Invalid\x20email\x20format,\x20using\x20the\x20admin\x20account!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','%s/api/v2/contacts','Enduser\x20created.','Basic\x20%s','apiKey','toString','base64','debug','[HTTP]','stringify','GET','map','forEach','string','picklist','type','nameField','customField','toLowerCase','idField','push','content','variable','variableName','customVariable','Variable','queue','serverUrl','monitor_format','[QUEUE]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','Authorization','The\x20Enduser\x20ID\x20is:','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','%s/helpdesk/tickets/%d','error','outbound','stripTrailingSlash','recordingFormat','none'];(function(_0x286892,_0xe74dd9){var _0x318e28=function(_0x23f50b){while(--_0x23f50b){_0x286892['push'](_0x286892['shift']());}};_0x318e28(++_0xe74dd9);}(_0x6937,0xc3));var _0x7693=function(_0x55cdc5,_0x2b2297){_0x55cdc5=_0x55cdc5-0x0;var _0x29acd5=_0x6937[_0x55cdc5];return _0x29acd5;};'use strict';var _=require(_0x7693('0x0'));var rp=require('request-promise');var md5=require('md5');var util=require(_0x7693('0x1'));var Redis=require(_0x7693('0x2'));var intUtil=require(_0x7693('0x3'));var config=require(_0x7693('0x4'));var logger=require(_0x7693('0x5'))(_0x7693('0x6'));config[_0x7693('0x7')]=_[_0x7693('0x8')](config[_0x7693('0x7')],{'host':_0x7693('0x9'),'port':0x18eb});var io=require(_0x7693('0xa'))(new Redis(config[_0x7693('0x7')]));var headers={'Content-Type':_0x7693('0xb'),'Accept':_0x7693('0xb')};function emit(_0x198ec6,_0x59d66a,_0x1b87e5){io['to'](_0x198ec6)[_0x7693('0xc')](_0x59d66a,_0x1b87e5);}function getTicket(_0x186ecc,_0x164c6f,_0x307322,_0x5ac86a,_0x5d0b13){logger[_0x7693('0xd')](_0x7693('0xe'));var _0x2b82c4=_[_0x7693('0xf')]({'responder_id':_0x164c6f['id'],'requester_id':_0x307322['id'],'name':util[_0x7693('0x10')](_0x7693('0x11'),_0x5d0b13[_0x7693('0x12')]),'phone':_0x5d0b13['calleridnum'],'source':0x3,'priority':0x1,'status':0x2,'subject':intUtil[_0x7693('0x13')](_0x5ac86a[_0x7693('0x14')],_0x5d0b13,'\x20'),'description':intUtil[_0x7693('0x13')](_0x5ac86a[_0x7693('0x15')],_0x5d0b13,_0x7693('0x16')),'tags':getTags(_0x5ac86a['Tags'],_0x7693('0x17'))},getCustomFields(_0x5ac86a[_0x7693('0x18')],_0x5d0b13));_0x2b82c4[_0x7693('0x19')]=_['mapValues'](_[_0x7693('0x1a')](_0x2b82c4[_0x7693('0x19')],'id'),'value');return request({'uri':util[_0x7693('0x10')](_0x7693('0x1b'),_0x186ecc[_0x7693('0x1c')]),'method':_0x7693('0x1d'),'body':_0x2b82c4})[_0x7693('0x1e')](function(_0x487857){logger[_0x7693('0xd')](_0x7693('0x1f'));return _0x487857;});}function getUser(_0x760a8c,_0x4a5075){if(intUtil['validateEmail'](_0x4a5075)){return request({'uri':util[_0x7693('0x10')](_0x7693('0x20'),_0x760a8c[_0x7693('0x1c')]),'qs':{'email':_0x4a5075}})[_0x7693('0x1e')](function(_0x3cf40e){if(_0x3cf40e[_0x7693('0x21')]){logger[_0x7693('0xd')]('Agent\x20found!');return _[_0x7693('0x22')](_0x3cf40e,function(_0x4ffc2a){return _0x4ffc2a[_0x7693('0x23')][_0x7693('0x24')]===_0x4a5075;});}else{logger[_0x7693('0xd')](_0x7693('0x25'));return request({'uri':util[_0x7693('0x10')](_0x7693('0x26'),_0x760a8c[_0x7693('0x1c')])})[_0x7693('0x1e')](function(_0x11e33b){logger['info'](_0x7693('0x27'));return _0x11e33b;});}});}else{logger['info'](_0x7693('0x28'));return request({'uri':util['format'](_0x7693('0x26'),_0x760a8c[_0x7693('0x1c')])})[_0x7693('0x1e')](function(_0x4e23c9){logger[_0x7693('0xd')](_0x7693('0x27'));return _0x4e23c9;});}}function getEndUser(_0x5ce35f,_0x3186f7,_0x5cca19){logger[_0x7693('0xd')]('Searching\x20enduser\x20with\x20phone',_0x5cca19);return request({'uri':util[_0x7693('0x10')]('%s/api/v2/contacts',_0x5ce35f[_0x7693('0x1c')]),'qs':{'phone':_0x5cca19}})['then'](function(_0x26daf3){if(_0x26daf3['length']){logger[_0x7693('0xd')]('Enduser\x20found!');return _[_0x7693('0x22')](_0x26daf3,{'phone':_0x5cca19});}else{logger[_0x7693('0xd')](_0x7693('0x29'));return request({'uri':util[_0x7693('0x10')](_0x7693('0x2a'),_0x5ce35f[_0x7693('0x1c')]),'method':_0x7693('0x1d'),'body':{'name':_0x3186f7,'phone':_0x5cca19}})[_0x7693('0x1e')](function(_0x2b13a4){logger[_0x7693('0xd')](_0x7693('0x2b'));return _0x2b13a4;});}});}function getAuth(_0x55bea3){return util[_0x7693('0x10')](_0x7693('0x2c'),new Buffer(_0x55bea3[_0x7693('0x2d')]+':X')[_0x7693('0x2e')](_0x7693('0x2f')));}function request(_0x4cafeb){logger[_0x7693('0x30')](_0x7693('0x31'),JSON[_0x7693('0x32')](_0x4cafeb));return rp(_[_0x7693('0x8')](_0x4cafeb,{'method':_0x7693('0x33'),'headers':headers,'json':!![]}));}function getTags(_0xf53181,_0x4aa4de){var _0x1190d4=[];if(_0xf53181&&_0xf53181['length']>0x0){_0x1190d4=_[_0x7693('0x34')](_0xf53181,_0x4aa4de);}return _0x1190d4;}function getCustomFields(_0x29a154,_0x150634){var _0x1a9f79=[];var _0x5d5c3a={'custom_fields':[]};if(_0x29a154[_0x7693('0x21')]>0x0){_[_0x7693('0x35')](_0x29a154,function(_0x4032f6){if(_['includes']([_0x7693('0x36'),_0x7693('0x37')],_0x4032f6[_0x7693('0x38')])&&_0x4032f6[_0x7693('0x39')]&&!_0x4032f6[_0x7693('0x3a')]){_0x5d5c3a[_0x4032f6['nameField'][_0x7693('0x3b')]()]=_0x4032f6['content'][_0x7693('0x2e')]();}else if(_['includes']([_0x7693('0x36'),_0x7693('0x37')],_0x4032f6[_0x7693('0x38')])&&_0x4032f6[_0x7693('0x3c')]&&_0x4032f6[_0x7693('0x3a')]){_0x5d5c3a['custom_fields'][_0x7693('0x3d')]({'id':_0x4032f6[_0x7693('0x3c')],'value':_0x4032f6[_0x7693('0x3e')]['toString']()});}else if(_0x4032f6['type']===_0x7693('0x3f')&&_0x4032f6[_0x7693('0x40')]&&_0x4032f6[_0x7693('0x3c')]&&_0x4032f6[_0x7693('0x3a')]){_0x150634[_0x4032f6['variableName']]&&_0x5d5c3a[_0x7693('0x19')][_0x7693('0x3d')]({'id':_0x4032f6[_0x7693('0x3c')],'value':_0x150634[_0x4032f6[_0x7693('0x40')]][_0x7693('0x2e')]()});}else if(_0x4032f6[_0x7693('0x38')]===_0x7693('0x41')&&_0x4032f6['Variable']&&_0x4032f6[_0x7693('0x42')][_0x7693('0x17')]&&_0x4032f6[_0x7693('0x3c')]&&_0x4032f6['customField']){_0x150634[_0x4032f6[_0x7693('0x42')][_0x7693('0x17')]['toLowerCase']()]&&_0x5d5c3a[_0x7693('0x19')]['push']({'id':_0x4032f6[_0x7693('0x3c')],'value':_0x150634[_0x4032f6['Variable'][_0x7693('0x17')][_0x7693('0x3b')]()][_0x7693('0x2e')]()});}});}return _0x5d5c3a;}exports[_0x7693('0x43')]=function(_0x3065ee,_0x220834,_0x51e4b5,_0x57cc6a,_0xb701a8,_0x596adc){var _0x30d991,_0x473d36;_0x596adc[_0x7693('0x1c')]=intUtil['stripTrailingSlash'](_0x596adc[_0x7693('0x1c')]);_0x596adc[_0x7693('0x44')]=intUtil['stripTrailingSlash'](_0x596adc['serverUrl']);if(_0xb701a8&&_0xb701a8[_0x7693('0x45')]){logger[_0x7693('0xd')](_0x7693('0x46'),'Recording\x20is\x20enabled!');_0x220834[_0x7693('0x47')]=util['format'](_0x7693('0x48'),_0x596adc[_0x7693('0x44')],_0x220834[_0x7693('0x49')],md5(_0x220834['uniqueid']));}else{_0x220834[_0x7693('0x47')]='';}headers[_0x7693('0x4a')]=getAuth(_0x596adc);return getUser(_0x596adc,_0x57cc6a[_0x7693('0x24')])[_0x7693('0x1e')](function(_0x5c47ff){_0x30d991=_0x5c47ff;logger['info']('The\x20User\x20ID\x20is:',_0x30d991['id']);return getEndUser(_0x596adc,_0x220834['calleridname'],_0x220834['calleridnum']);})['then'](function(_0x8bf557){_0x473d36=_0x8bf557;logger[_0x7693('0xd')](_0x7693('0x4b'),_0x473d36['id']);return getTicket(_0x596adc,_0x30d991,_0x473d36,_0x51e4b5,_0x220834);})['then'](function(_0x9769eb){if(_0x9769eb&&_0x9769eb['id']){logger['info'](_0x7693('0x1f'));logger[_0x7693('0xd')]('The\x20Ticket\x20ID\x20is:',_0x9769eb['id']);logger[_0x7693('0xd')]('[QUEUE]',_0x7693('0x4c'));emit(util[_0x7693('0x10')]('user:%s',_0x57cc6a['name']),_0x7693('0x4d'),{'uri':util[_0x7693('0x10')](_0x7693('0x4e'),_0x596adc[_0x7693('0x1c')],_0x9769eb['id'])});}})['catch'](function(_0x3b6149){logger[_0x7693('0x4f')](_0x7693('0x46'),JSON[_0x7693('0x32')](_0x3b6149));});};exports[_0x7693('0x50')]=function(_0x21f784,_0x4c0d2d,_0x3b88f8,_0x32be58,_0x3c745a,_0x33fca6,_0x44f3b9){var _0x443aa8,_0x49f0de;_0x33fca6[_0x7693('0x1c')]=intUtil[_0x7693('0x51')](_0x33fca6[_0x7693('0x1c')]);_0x33fca6[_0x7693('0x44')]=intUtil[_0x7693('0x51')](_0x33fca6[_0x7693('0x44')]);if(_0x44f3b9&&_0x44f3b9[_0x7693('0x52')]&&_0x44f3b9[_0x7693('0x52')]!==_0x7693('0x53')){logger[_0x7693('0xd')](_0x7693('0x54'),_0x7693('0x55'));_0x4c0d2d[_0x7693('0x47')]=util[_0x7693('0x10')](_0x7693('0x48'),_0x33fca6[_0x7693('0x44')],_0x4c0d2d['uniqueid'],md5(_0x4c0d2d[_0x7693('0x49')]));}headers[_0x7693('0x4a')]=getAuth(_0x33fca6);return getUser(_0x33fca6,_0x32be58[_0x7693('0x24')])[_0x7693('0x1e')](function(_0x338da4){_0x443aa8=_0x338da4;logger[_0x7693('0xd')](_0x7693('0x56'),_0x443aa8['id']);return getEndUser(_0x33fca6,_0x4c0d2d['destcalleridname'],_0x4c0d2d['destcalleridnum']);})[_0x7693('0x1e')](function(_0x2138b3){_0x49f0de=_0x2138b3;logger[_0x7693('0xd')](_0x7693('0x4b'),_0x49f0de['id']);return getTicket(_0x33fca6,_0x443aa8,_0x49f0de,_0x3b88f8,_0x4c0d2d);})[_0x7693('0x1e')](function(_0x1b029a){if(_0x1b029a&&_0x1b029a['id']){logger[_0x7693('0xd')](_0x7693('0x1f'));logger[_0x7693('0xd')](_0x7693('0x57'),_0x1b029a['id']);logger[_0x7693('0xd')](_0x7693('0x54'),_0x7693('0x4c'));emit(util[_0x7693('0x10')](_0x7693('0x58'),_0x32be58[_0x7693('0x17')]),_0x7693('0x4d'),{'uri':util['format'](_0x7693('0x4e'),_0x33fca6[_0x7693('0x1c')],_0x1b029a['id'])});}})[_0x7693('0x59')](function(_0x55a9e2){logger[_0x7693('0x4f')](_0x7693('0x54'),JSON[_0x7693('0x32')](_0x55a9e2));});};exports[_0x7693('0x5a')]=function(_0x196103,_0x2b2f49,_0xa6917e,_0x5d0fc0,_0x43d881,_0x542413){var _0x281c49,_0x48fcd6;_0x542413['remoteUri']=intUtil[_0x7693('0x51')](_0x542413[_0x7693('0x1c')]);_0x542413[_0x7693('0x44')]=intUtil[_0x7693('0x51')](_0x542413[_0x7693('0x44')]);if(_0x43d881&&_0x43d881['monitor_format']){logger[_0x7693('0xd')]('['+_0x2b2f49['lastevent'][_0x7693('0x5b')]()+']',_0x7693('0x55'));_0x2b2f49[_0x7693('0x47')]=util[_0x7693('0x10')](_0x7693('0x48'),_0x542413[_0x7693('0x44')],_0x2b2f49['uniqueid'],md5(_0x2b2f49[_0x7693('0x49')]));}else{_0x2b2f49['recordingURL']='';}headers[_0x7693('0x4a')]=getAuth(_0x542413);return getUser(_0x542413,'')[_0x7693('0x1e')](function(_0x2447cd){_0x281c49=_0x2447cd;logger[_0x7693('0xd')](_0x7693('0x56'),_0x281c49['id']);return getEndUser(_0x542413,_0x2b2f49[_0x7693('0x12')],_0x2b2f49['calleridnum']);})[_0x7693('0x1e')](function(_0x22487e){_0x48fcd6=_0x22487e;logger[_0x7693('0xd')](_0x7693('0x4b'),_0x48fcd6['id']);return getTicket(_0x542413,_0x281c49,_0x48fcd6,_0xa6917e,_0x2b2f49);})['then'](function(_0x13d6c0){if(_0x13d6c0){logger[_0x7693('0xd')]('Ticket\x20created!');logger[_0x7693('0xd')](_0x7693('0x57'),_0x13d6c0['id']);}})['catch'](function(_0x5d27a2){logger[_0x7693('0x4f')]('['+_0x2b2f49[_0x7693('0x5c')][_0x7693('0x5b')]()+']',JSON[_0x7693('0x32')](_0x5d27a2));});};
\ No newline at end of file
index 1bc695f..00749f8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2343=['toUpperCase','message','Getting\x20user\x20list','agentEmail','Getting\x20user\x20with\x20email','User\x20found:','userId','Admin\x20selected','userEmail','GET','&f=','find','Searching\x20contact\x20with\x20phone\x20%s','contactNumber','mobile_number','endUserId','Contact\x20found\x20mobile_number:','Contact\x20found\x20work_number:','Contact\x20created:','/api/contacts','format','YYYY-MM-DDTHH:mm:ss','Contact\x20not\x20found,\x20creating\x20a\x20new\x20contact','contact','Creating\x20new\x20task','/api/tasks','getString','Descriptions','Contact','add','task','ticketId','/contacts/','user:%s','emit','apiKey','remoteUri','stripTrailingSlash','toLowerCase','destcalleridnum','calleridnum','callDirection','queue','unmanaged','serverUrl','uniqueid','monitor_format','[QUEUE]','recordingFormat','[OUTBOUND]','Recording\x20is\x20enabled!','recordingURL','The\x20ticket\x20ID\x20is:\x20%s','Displaying\x20task\x20in\x20a\x20new\x20tab...','inspect','lodash','request-promise','md5','util','moment','bluebird','../../../../config/environment','../../../../config/logger','freshsales','redis','defaults','localhost','headers','info','Getting\x20admin\x20information','then','users','length','email','adminEmail','adminId','Admin\x20found:','Requested\x20Resource\x20not\x20Found','catch','error'];(function(_0x5a636f,_0x3fec2b){var _0x6a8cfb=function(_0x20e6ca){while(--_0x20e6ca){_0x5a636f['push'](_0x5a636f['shift']());}};_0x6a8cfb(++_0x3fec2b);}(_0x2343,0x87));var _0x3234=function(_0x5e2751,_0x518a55){_0x5e2751=_0x5e2751-0x0;var _0x139a39=_0x2343[_0x5e2751];return _0x139a39;};'use strict';var _=require(_0x3234('0x0'));var rp=require(_0x3234('0x1'));var md5=require(_0x3234('0x2'));var util=require(_0x3234('0x3'));var moment=require(_0x3234('0x4'));var Promise=require(_0x3234('0x5'));var Redis=require('ioredis');var intUtil=require('./util');var config=require(_0x3234('0x6'));var logger=require(_0x3234('0x7'))(_0x3234('0x8'));config[_0x3234('0x9')]=_[_0x3234('0xa')](config['redis'],{'host':_0x3234('0xb'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x3234('0x9')]));function getAdminId(_0x318565,_0x51e91b,_0x3d11db,_0x13857c){return new Promise(function(_0x196e47,_0x399647){var _0x3cfa6c=![];var _0x2ece31={'method':'GET','uri':_0x13857c+'/api/selector/owners','json':!![]};_0x2ece31[_0x3234('0xc')]=_0x3d11db;logger[_0x3234('0xd')](_0x3234('0xe'));return rp(_0x2ece31)[_0x3234('0xf')](function(_0x3841c3){if(_0x3841c3){var _0x247d57=_0x3841c3[_0x3234('0x10')];var _0x375315=null;for(_0x375315=0x0;_0x375315<_0x247d57[_0x3234('0x11')];_0x375315++){if(_0x247d57[_0x375315][_0x3234('0x12')]===_0x318565[_0x3234('0x13')]){_0x318565[_0x3234('0x14')]=_0x247d57[_0x375315]['id'];_0x3cfa6c=!![];}}if(_0x3cfa6c){logger[_0x3234('0xd')](_0x3234('0x15'),_0x318565['adminId']);_0x196e47(_0x318565);}else{_0x399647({'statusCode':0x194,'message':_0x3234('0x16')});}}else{_0x399647({'statusCode':0x194,'message':_0x3234('0x16')});}})[_0x3234('0x17')](function(_0x390e5b){logger[_0x3234('0x18')]('['+[_0x51e91b[_0x3234('0x19')]()]+']',_0x390e5b[_0x3234('0x1a')]);_0x399647(_0x390e5b);});});}function getUser(_0x20e35f,_0x2456dc,_0x556866){return function(_0x42aecb){return new Promise(function(_0x547a8f,_0x4a4f44){var _0x2d5aef={'method':'GET','uri':_0x556866+'/api/selector/owners','json':!![]};_0x2d5aef[_0x3234('0xc')]=_0x2456dc;logger[_0x3234('0xd')](_0x3234('0x1b'));return rp(_0x2d5aef)[_0x3234('0xf')](function(_0x3785f0){if(_0x3785f0){var _0x8bc4d8=_0x3785f0['users'];var _0x148e46=![];var _0x29f685=null;if(_0x42aecb[_0x3234('0x1c')]!==null){logger[_0x3234('0xd')](_0x3234('0x1d'),_0x42aecb[_0x3234('0x1c')]);_0x42aecb['userEmail']=_0x42aecb[_0x3234('0x1c')];for(_0x29f685=0x0;_0x29f685<_0x8bc4d8[_0x3234('0x11')];_0x29f685++){if(_0x8bc4d8[_0x29f685][_0x3234('0x12')]===_0x42aecb['agentEmail']){_0x148e46=!![];_0x42aecb['userId']=_0x8bc4d8[_0x29f685]['id'];logger[_0x3234('0xd')](_0x3234('0x1e'),_0x42aecb[_0x3234('0x1f')]);}}}if(!_0x148e46){logger[_0x3234('0xd')](_0x3234('0x20'));_0x42aecb[_0x3234('0x21')]=_0x42aecb[_0x3234('0x13')];_0x42aecb[_0x3234('0x1f')]=_0x42aecb[_0x3234('0x14')];_0x148e46=!![];}if(_0x148e46){_0x547a8f(_0x42aecb);}else{_0x4a4f44({'statusCode':0x194,'message':_0x3234('0x16')});}}else{_0x4a4f44({'statusCode':0x194,'message':_0x3234('0x16')});}})[_0x3234('0x17')](function(_0x490279){logger['error']('['+[_0x20e35f[_0x3234('0x19')]()]+']',_0x490279[_0x3234('0x1a')]);_0x4a4f44(_0x490279);});});};}function searchContact(_0x4eb123,_0x181268,_0x38fd19,_0x54b413){return new Promise(function(_0x1bf8f2,_0x3cce4f){var _0x4a549d={'method':_0x3234('0x22'),'headers':_0x181268,'uri':_0x4eb123+'/api/lookup?q='+_0x54b413+_0x3234('0x23')+_0x38fd19+'&entities=contact','json':!![]};rp(_0x4a549d)[_0x3234('0xf')](function(_0x1bdb01){var _0x454172=_[_0x3234('0x24')](_0x1bdb01['contacts']['contacts'],[_0x38fd19,_0x54b413]);_0x1bf8f2(_0x454172);})[_0x3234('0x17')](function(_0x265676){_0x3cce4f(_0x265676);});});}function getEndUser(_0xecd1b2,_0xea8ad0,_0x28669c){return function(_0x1dbc11){return new Promise(function(_0x13bae4,_0x10fea7){logger['info'](util['format'](_0x3234('0x25'),_0x1dbc11[_0x3234('0x26')]));searchContact(_0x28669c,_0xea8ad0,_0x3234('0x27'),_0x1dbc11[_0x3234('0x26')])[_0x3234('0xf')](function(_0x3f1bb1){if(_0x3f1bb1){_0x1dbc11[_0x3234('0x28')]=_0x3f1bb1['id'];logger['info'](_0x3234('0x29'),_0x1dbc11[_0x3234('0x28')]);return _0x13bae4(_0x1dbc11);}searchContact(_0x28669c,_0xea8ad0,'work_number',_0x1dbc11[_0x3234('0x26')])['then'](function(_0x9de29b){if(_0x9de29b){_0x1dbc11[_0x3234('0x28')]=_0x9de29b['id'];logger[_0x3234('0xd')](_0x3234('0x2a'),_0x1dbc11['endUserId']);return _0x13bae4(_0x1dbc11);}createEndUser(_0x1dbc11,_0xecd1b2,_0xea8ad0,_0x28669c)['then'](function(_0x10190a){logger[_0x3234('0xd')](_0x3234('0x2b'),_0x10190a[_0x3234('0x28')]);return _0x13bae4(_0x10190a);});});})['catch'](function(_0x39eea0){_0x10fea7(_0x39eea0);});});};}function createEndUser(_0x364562,_0x52f453,_0x44d35e,_0x3c998f){return new Promise(function(_0x444fea,_0x6b42ee){var _0x37fc10=moment();var _0x1a8aaa={'method':'POST','uri':_0x3c998f+_0x3234('0x2c'),'body':{'contact':{'last_name':_0x364562['contactNumber'],'work_number':_0x364562[_0x3234('0x26')],'mobile_number':_0x364562[_0x3234('0x26')],'owner_id':_0x364562[_0x3234('0x1f')],'created_at':_0x37fc10[_0x3234('0x2d')](_0x3234('0x2e'))}},'json':!![]};_0x1a8aaa['headers']=_0x44d35e;logger[_0x3234('0xd')](_0x3234('0x2f'));return rp(_0x1a8aaa)[_0x3234('0xf')](function(_0x3bf6c7){_0x364562['endUserId']=_0x3bf6c7[_0x3234('0x30')]['id'];_0x444fea(_0x364562);})[_0x3234('0x17')](function(_0x5dc3c2){logger['error']('['+[_0x52f453[_0x3234('0x19')]()]+']',_0x5dc3c2[_0x3234('0x1a')]);_0x6b42ee(_0x5dc3c2[_0x3234('0x1a')]);});});}function getTicket(_0x37ba32,_0x56d624,_0xb68513,_0x30862c,_0x265187){return function(_0x1a174e){logger[_0x3234('0xd')](_0x3234('0x31'));return new Promise(function(_0x496e09,_0x589e18){var _0x1bdae4=moment();var _0x5d64cf={'method':'POST','uri':_0xb68513+_0x3234('0x32'),'body':{'title':intUtil[_0x3234('0x33')](_0x30862c['Subjects'],_0x265187,'\x20'),'description':intUtil[_0x3234('0x33')](_0x30862c[_0x3234('0x34')],_0x265187,'\x0a'),'owner_id':_0x1a174e[_0x3234('0x1f')],'creater_id':_0x1a174e[_0x3234('0x14')],'targetable_id':_0x1a174e[_0x3234('0x28')],'targetable_type':_0x3234('0x35'),'created_at':_0x1bdae4[_0x3234('0x2d')]('YYYY-MM-DDTHH:mm:ss'),'due_date':_0x1bdae4[_0x3234('0x36')](0x1e,'m')[_0x3234('0x2d')](_0x3234('0x2e'))},'json':!![]};_0x5d64cf['headers']=_0x56d624;return rp(_0x5d64cf)[_0x3234('0xf')](function(_0x1853c8){_0x1a174e['ticketId']=_0x1853c8[_0x3234('0x37')]['id'];logger[_0x3234('0xd')]('Task\x20created:',_0x1a174e[_0x3234('0x38')]);_0x496e09(_0x1a174e);})['catch'](function(_0x54ad3f){logger[_0x3234('0x18')]('['+[_0x37ba32[_0x3234('0x19')]()]+']',_0x54ad3f[_0x3234('0x1a')]);_0x589e18(_0x54ad3f[_0x3234('0x1a')]);});});};}function emit(_0x5929e4,_0x50384d,_0x1e25bd){var _0x48da38={'uri':_0x5929e4+_0x3234('0x39')+_0x1e25bd};io['to'](util['format'](_0x3234('0x3a'),_0x50384d))[_0x3234('0x3b')]('trigger:browser:url',_0x48da38);}exports['cs']=function(_0x83ae46,_0x3072c3,_0xbb672e,_0x2fd2a0,_0x4c675d,_0x196245,_0x27a465,_0x56ada2){var _0x3957c6={};var _0x4b1bb8={'Authorization':'Token\x20token='+_0x196245[_0x3234('0x3c')]};_0x196245[_0x3234('0x3d')]=intUtil[_0x3234('0x3e')](_0x196245[_0x3234('0x3d')]);_0x196245['serverUrl']=intUtil[_0x3234('0x3e')](_0x196245['serverUrl']);var _0x44b5df=_0x196245[_0x3234('0x3d')];_0x3957c6[_0x3234('0x13')]=_0x196245['username'];_0x3957c6[_0x3234('0x26')]=_0x56ada2[_0x3234('0x3f')]()==='outbound'?_0x3072c3[_0x3234('0x40')]:_0x3072c3[_0x3234('0x41')];_0x3957c6[_0x3234('0x42')]=_0x56ada2===_0x3234('0x43')||_0x56ada2===_0x3234('0x44')?'queue':'outbound';if(_0x2fd2a0){_0x3957c6[_0x3234('0x1c')]=_0x2fd2a0[_0x3234('0x12')];}var _0x4d25ce=util[_0x3234('0x2d')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x196245[_0x3234('0x45')],_0x3072c3['uniqueid'],md5(_0x3072c3[_0x3234('0x46')]));if(_0x4c675d&&_0x4c675d[_0x3234('0x47')]){logger[_0x3234('0xd')](_0x3234('0x48'),'Recording\x20is\x20enabled!');_0x3072c3['recordingURL']=_0x4d25ce;}else if(_0x27a465&&_0x27a465[_0x3234('0x49')]&&_0x27a465[_0x3234('0x49')]!=='none'){logger[_0x3234('0xd')](_0x3234('0x4a'),_0x3234('0x4b'));_0x3072c3[_0x3234('0x4c')]=_0x4d25ce;}else{_0x3072c3[_0x3234('0x4c')]='';}return getAdminId(_0x3957c6,_0x56ada2,_0x4b1bb8,_0x44b5df)[_0x3234('0xf')](getUser(_0x56ada2,_0x4b1bb8,_0x44b5df))[_0x3234('0xf')](getEndUser(_0x56ada2,_0x4b1bb8,_0x44b5df))[_0x3234('0xf')](getTicket(_0x56ada2,_0x4b1bb8,_0x44b5df,_0xbb672e,_0x3072c3))[_0x3234('0xf')](function(_0x3263dd){logger[_0x3234('0xd')](util['format'](_0x3234('0x4d'),_0x3263dd['ticketId']));if(_0x56ada2!==_0x3234('0x44')){logger[_0x3234('0xd')]('['+[_0x56ada2['toUpperCase']()]+']',_0x3234('0x4e'));emit(_0x44b5df,_0x2fd2a0['name'],_0x3263dd[_0x3234('0x28')]);}})[_0x3234('0x17')](function(_0x4003b1){logger[_0x3234('0x18')]('['+[_0x56ada2[_0x3234('0x19')]()]+']\x20Error\x20running\x20Freshsales\x20integration',util[_0x3234('0x4f')](_0x4003b1,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
+var _0xd3f8=['destcalleridnum','calleridnum','queue','outbound','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none','[OUTBOUND]','unmanaged','Displaying\x20task\x20in\x20a\x20new\x20tab...','name','lodash','request-promise','util','ioredis','./util','../../../../config/environment','../../../../config/logger','freshsales','redis','/api/selector/owners','headers','Getting\x20admin\x20information','then','length','email','adminEmail','adminId','info','Admin\x20found:','Requested\x20Resource\x20not\x20Found','error','message','GET','Getting\x20user\x20list','users','agentEmail','Getting\x20user\x20with\x20email','userEmail','User\x20found:','userId','Admin\x20selected','catch','toUpperCase','/api/lookup?q=','&f=','contacts','format','Searching\x20contact\x20with\x20phone\x20%s','contactNumber','mobile_number','endUserId','Contact\x20found\x20mobile_number:','work_number','Contact\x20found\x20work_number:','POST','/api/contacts','Contact\x20not\x20found,\x20creating\x20a\x20new\x20contact','contact','Creating\x20new\x20task','/api/tasks','getString','Descriptions','Contact','add','YYYY-MM-DDTHH:mm:ss','task','Task\x20created:','ticketId','/contacts/','emit','trigger:browser:url','apiKey','stripTrailingSlash','serverUrl','remoteUri','username','toLowerCase'];(function(_0x280f4a,_0x2ed8d6){var _0x1bb157=function(_0x37de94){while(--_0x37de94){_0x280f4a['push'](_0x280f4a['shift']());}};_0x1bb157(++_0x2ed8d6);}(_0xd3f8,0xb3));var _0x8d3f=function(_0xdff6ec,_0x177300){_0xdff6ec=_0xdff6ec-0x0;var _0x3081fe=_0xd3f8[_0xdff6ec];return _0x3081fe;};'use strict';var _=require(_0x8d3f('0x0'));var rp=require(_0x8d3f('0x1'));var md5=require('md5');var util=require(_0x8d3f('0x2'));var moment=require('moment');var Promise=require('bluebird');var Redis=require(_0x8d3f('0x3'));var intUtil=require(_0x8d3f('0x4'));var config=require(_0x8d3f('0x5'));var logger=require(_0x8d3f('0x6'))(_0x8d3f('0x7'));config[_0x8d3f('0x8')]=_['defaults'](config[_0x8d3f('0x8')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x8d3f('0x8')]));function getAdminId(_0x120cec,_0x4a1f8b,_0x472103,_0x4a1880){return new Promise(function(_0xe84495,_0x3f9a5d){var _0x53e1d0=![];var _0x56a932={'method':'GET','uri':_0x4a1880+_0x8d3f('0x9'),'json':!![]};_0x56a932[_0x8d3f('0xa')]=_0x472103;logger['info'](_0x8d3f('0xb'));return rp(_0x56a932)[_0x8d3f('0xc')](function(_0x1e4201){if(_0x1e4201){var _0x508fd8=_0x1e4201['users'];var _0x4bf266=null;for(_0x4bf266=0x0;_0x4bf266<_0x508fd8[_0x8d3f('0xd')];_0x4bf266++){if(_0x508fd8[_0x4bf266][_0x8d3f('0xe')]===_0x120cec[_0x8d3f('0xf')]){_0x120cec[_0x8d3f('0x10')]=_0x508fd8[_0x4bf266]['id'];_0x53e1d0=!![];}}if(_0x53e1d0){logger[_0x8d3f('0x11')](_0x8d3f('0x12'),_0x120cec[_0x8d3f('0x10')]);_0xe84495(_0x120cec);}else{_0x3f9a5d({'statusCode':0x194,'message':_0x8d3f('0x13')});}}else{_0x3f9a5d({'statusCode':0x194,'message':_0x8d3f('0x13')});}})['catch'](function(_0xcbe70e){logger[_0x8d3f('0x14')]('['+[_0x4a1f8b['toUpperCase']()]+']',_0xcbe70e[_0x8d3f('0x15')]);_0x3f9a5d(_0xcbe70e);});});}function getUser(_0x7abe4c,_0x1ca071,_0x813847){return function(_0x36cafe){return new Promise(function(_0x1d957a,_0xb54054){var _0x364f06={'method':_0x8d3f('0x16'),'uri':_0x813847+'/api/selector/owners','json':!![]};_0x364f06[_0x8d3f('0xa')]=_0x1ca071;logger[_0x8d3f('0x11')](_0x8d3f('0x17'));return rp(_0x364f06)['then'](function(_0x2f7b06){if(_0x2f7b06){var _0x48d99e=_0x2f7b06[_0x8d3f('0x18')];var _0x58ee45=![];var _0x3a8680=null;if(_0x36cafe[_0x8d3f('0x19')]!==null){logger['info'](_0x8d3f('0x1a'),_0x36cafe[_0x8d3f('0x19')]);_0x36cafe[_0x8d3f('0x1b')]=_0x36cafe[_0x8d3f('0x19')];for(_0x3a8680=0x0;_0x3a8680<_0x48d99e[_0x8d3f('0xd')];_0x3a8680++){if(_0x48d99e[_0x3a8680][_0x8d3f('0xe')]===_0x36cafe[_0x8d3f('0x19')]){_0x58ee45=!![];_0x36cafe['userId']=_0x48d99e[_0x3a8680]['id'];logger[_0x8d3f('0x11')](_0x8d3f('0x1c'),_0x36cafe[_0x8d3f('0x1d')]);}}}if(!_0x58ee45){logger[_0x8d3f('0x11')](_0x8d3f('0x1e'));_0x36cafe[_0x8d3f('0x1b')]=_0x36cafe[_0x8d3f('0xf')];_0x36cafe['userId']=_0x36cafe[_0x8d3f('0x10')];_0x58ee45=!![];}if(_0x58ee45){_0x1d957a(_0x36cafe);}else{_0xb54054({'statusCode':0x194,'message':_0x8d3f('0x13')});}}else{_0xb54054({'statusCode':0x194,'message':_0x8d3f('0x13')});}})[_0x8d3f('0x1f')](function(_0xc78f2){logger['error']('['+[_0x7abe4c[_0x8d3f('0x20')]()]+']',_0xc78f2[_0x8d3f('0x15')]);_0xb54054(_0xc78f2);});});};}function searchContact(_0x2b285f,_0x3769e0,_0x4138ae,_0x1a980d){return new Promise(function(_0x4c8421,_0x1e1be0){var _0x44344c={'method':_0x8d3f('0x16'),'headers':_0x3769e0,'uri':_0x2b285f+_0x8d3f('0x21')+_0x1a980d+_0x8d3f('0x22')+_0x4138ae+'&entities=contact','json':!![]};rp(_0x44344c)[_0x8d3f('0xc')](function(_0xc607ef){var _0x1c42d6=_['find'](_0xc607ef[_0x8d3f('0x23')][_0x8d3f('0x23')],[_0x4138ae,_0x1a980d]);_0x4c8421(_0x1c42d6);})[_0x8d3f('0x1f')](function(_0x2c87){_0x1e1be0(_0x2c87);});});}function getEndUser(_0x49ee80,_0x13edf2,_0x13f65a){return function(_0x1b2850){return new Promise(function(_0x340fa4,_0x2cb596){logger[_0x8d3f('0x11')](util[_0x8d3f('0x24')](_0x8d3f('0x25'),_0x1b2850[_0x8d3f('0x26')]));searchContact(_0x13f65a,_0x13edf2,_0x8d3f('0x27'),_0x1b2850[_0x8d3f('0x26')])[_0x8d3f('0xc')](function(_0x2eb113){if(_0x2eb113){_0x1b2850[_0x8d3f('0x28')]=_0x2eb113['id'];logger[_0x8d3f('0x11')](_0x8d3f('0x29'),_0x1b2850[_0x8d3f('0x28')]);return _0x340fa4(_0x1b2850);}searchContact(_0x13f65a,_0x13edf2,_0x8d3f('0x2a'),_0x1b2850[_0x8d3f('0x26')])[_0x8d3f('0xc')](function(_0x4c4184){if(_0x4c4184){_0x1b2850[_0x8d3f('0x28')]=_0x4c4184['id'];logger[_0x8d3f('0x11')](_0x8d3f('0x2b'),_0x1b2850[_0x8d3f('0x28')]);return _0x340fa4(_0x1b2850);}createEndUser(_0x1b2850,_0x49ee80,_0x13edf2,_0x13f65a)[_0x8d3f('0xc')](function(_0x315a04){logger[_0x8d3f('0x11')]('Contact\x20created:',_0x315a04[_0x8d3f('0x28')]);return _0x340fa4(_0x315a04);});});})[_0x8d3f('0x1f')](function(_0x5cb882){_0x2cb596(_0x5cb882);});});};}function createEndUser(_0x4f6f37,_0x14009d,_0x24bff7,_0x1f5139){return new Promise(function(_0x5d3576,_0x4a515a){var _0x42414b=moment();var _0x5d1aff={'method':_0x8d3f('0x2c'),'uri':_0x1f5139+_0x8d3f('0x2d'),'body':{'contact':{'last_name':_0x4f6f37[_0x8d3f('0x26')],'work_number':_0x4f6f37[_0x8d3f('0x26')],'mobile_number':_0x4f6f37[_0x8d3f('0x26')],'owner_id':_0x4f6f37[_0x8d3f('0x1d')],'created_at':_0x42414b['format']('YYYY-MM-DDTHH:mm:ss')}},'json':!![]};_0x5d1aff['headers']=_0x24bff7;logger[_0x8d3f('0x11')](_0x8d3f('0x2e'));return rp(_0x5d1aff)[_0x8d3f('0xc')](function(_0x2a4a64){_0x4f6f37[_0x8d3f('0x28')]=_0x2a4a64[_0x8d3f('0x2f')]['id'];_0x5d3576(_0x4f6f37);})[_0x8d3f('0x1f')](function(_0x1f835d){logger[_0x8d3f('0x14')]('['+[_0x14009d[_0x8d3f('0x20')]()]+']',_0x1f835d[_0x8d3f('0x15')]);_0x4a515a(_0x1f835d['message']);});});}function getTicket(_0x56f28d,_0x599ed9,_0x126cb1,_0x3b0b52,_0x5599ad){return function(_0x327cc4){logger[_0x8d3f('0x11')](_0x8d3f('0x30'));return new Promise(function(_0x9fcb8a,_0x1410f3){var _0x2685d9=moment();var _0x2fb4e0={'method':'POST','uri':_0x126cb1+_0x8d3f('0x31'),'body':{'title':intUtil[_0x8d3f('0x32')](_0x3b0b52['Subjects'],_0x5599ad,'\x20'),'description':intUtil[_0x8d3f('0x32')](_0x3b0b52[_0x8d3f('0x33')],_0x5599ad,'\x0a'),'owner_id':_0x327cc4[_0x8d3f('0x1d')],'creater_id':_0x327cc4[_0x8d3f('0x10')],'targetable_id':_0x327cc4[_0x8d3f('0x28')],'targetable_type':_0x8d3f('0x34'),'created_at':_0x2685d9[_0x8d3f('0x24')]('YYYY-MM-DDTHH:mm:ss'),'due_date':_0x2685d9[_0x8d3f('0x35')](0x1e,'m')['format'](_0x8d3f('0x36'))},'json':!![]};_0x2fb4e0[_0x8d3f('0xa')]=_0x599ed9;return rp(_0x2fb4e0)['then'](function(_0x56506d){_0x327cc4['ticketId']=_0x56506d[_0x8d3f('0x37')]['id'];logger['info'](_0x8d3f('0x38'),_0x327cc4[_0x8d3f('0x39')]);_0x9fcb8a(_0x327cc4);})[_0x8d3f('0x1f')](function(_0x4ff8fb){logger[_0x8d3f('0x14')]('['+[_0x56f28d[_0x8d3f('0x20')]()]+']',_0x4ff8fb[_0x8d3f('0x15')]);_0x1410f3(_0x4ff8fb[_0x8d3f('0x15')]);});});};}function emit(_0x2652b6,_0x38485a,_0x3d9b4b){var _0x62021f={'uri':_0x2652b6+_0x8d3f('0x3a')+_0x3d9b4b};io['to'](util[_0x8d3f('0x24')]('user:%s',_0x38485a))[_0x8d3f('0x3b')](_0x8d3f('0x3c'),_0x62021f);}exports['cs']=function(_0x1d47c6,_0x497b5e,_0x5e276f,_0x178b96,_0x5c4e67,_0x2ce40f,_0x56f7c8,_0x44ae58){var _0x2fd1a0={};var _0x47fdc1={'Authorization':'Token\x20token='+_0x2ce40f[_0x8d3f('0x3d')]};_0x2ce40f['remoteUri']=intUtil[_0x8d3f('0x3e')](_0x2ce40f['remoteUri']);_0x2ce40f[_0x8d3f('0x3f')]=intUtil['stripTrailingSlash'](_0x2ce40f[_0x8d3f('0x3f')]);var _0x2b0ccc=_0x2ce40f[_0x8d3f('0x40')];_0x2fd1a0[_0x8d3f('0xf')]=_0x2ce40f[_0x8d3f('0x41')];_0x2fd1a0[_0x8d3f('0x26')]=_0x44ae58[_0x8d3f('0x42')]()==='outbound'?_0x497b5e[_0x8d3f('0x43')]:_0x497b5e[_0x8d3f('0x44')];_0x2fd1a0['callDirection']=_0x44ae58===_0x8d3f('0x45')||_0x44ae58==='unmanaged'?_0x8d3f('0x45'):_0x8d3f('0x46');if(_0x178b96){_0x2fd1a0['agentEmail']=_0x178b96[_0x8d3f('0xe')];}var _0x3ab506=util[_0x8d3f('0x24')](_0x8d3f('0x47'),_0x2ce40f[_0x8d3f('0x3f')],_0x497b5e[_0x8d3f('0x48')],md5(_0x497b5e[_0x8d3f('0x48')]));if(_0x5c4e67&&_0x5c4e67['monitor_format']){logger[_0x8d3f('0x11')](_0x8d3f('0x49'),_0x8d3f('0x4a'));_0x497b5e[_0x8d3f('0x4b')]=_0x3ab506;}else if(_0x56f7c8&&_0x56f7c8[_0x8d3f('0x4c')]&&_0x56f7c8[_0x8d3f('0x4c')]!==_0x8d3f('0x4d')){logger['info'](_0x8d3f('0x4e'),_0x8d3f('0x4a'));_0x497b5e[_0x8d3f('0x4b')]=_0x3ab506;}else{_0x497b5e[_0x8d3f('0x4b')]='';}return getAdminId(_0x2fd1a0,_0x44ae58,_0x47fdc1,_0x2b0ccc)[_0x8d3f('0xc')](getUser(_0x44ae58,_0x47fdc1,_0x2b0ccc))[_0x8d3f('0xc')](getEndUser(_0x44ae58,_0x47fdc1,_0x2b0ccc))[_0x8d3f('0xc')](getTicket(_0x44ae58,_0x47fdc1,_0x2b0ccc,_0x5e276f,_0x497b5e))[_0x8d3f('0xc')](function(_0x1b0ed4){logger['info'](util['format']('The\x20ticket\x20ID\x20is:\x20%s',_0x1b0ed4[_0x8d3f('0x39')]));if(_0x44ae58!==_0x8d3f('0x4f')){logger[_0x8d3f('0x11')]('['+[_0x44ae58[_0x8d3f('0x20')]()]+']',_0x8d3f('0x50'));emit(_0x2b0ccc,_0x178b96[_0x8d3f('0x51')],_0x1b0ed4[_0x8d3f('0x28')]);}})['catch'](function(_0x4c163b){logger[_0x8d3f('0x14')]('['+[_0x44ae58[_0x8d3f('0x20')]()]+']\x20Error\x20running\x20Freshsales\x20integration',util['inspect'](_0x4c163b,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
index d500d7e..17013a7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0512=['./servicenow','./dynamics365','./freshsales','sugarcrm','freshdesk','zoho','desk','vtiger','freshsales','servicenow','includes','data1','toLowerCase','data2','find','Configurations','queue','routeId','outbound','EVENT\x20UNKNOWN','dynamics365','log','unknown\x20integration','error','[EXEC]','format','%s\x20configuration\x20#%s\x20not\x20found','data3','../../../../config/logger','%s\x20account\x20#%s\x20not\x20found','lodash','util','./zendesk','./salesforce','./sugarcrm','./freshdesk','./desk','./vtiger'];(function(_0x5b2682,_0x24b4ce){var _0x30967f=function(_0x499d89){while(--_0x499d89){_0x5b2682['push'](_0x5b2682['shift']());}};_0x30967f(++_0x24b4ce);}(_0x0512,0x1e6));var _0x2051=function(_0x15ecbf,_0x25f928){_0x15ecbf=_0x15ecbf-0x0;var _0x43f192=_0x0512[_0x15ecbf];return _0x43f192;};'use strict';var _=require(_0x2051('0x0'));var util=require(_0x2051('0x1'));var zendesk=require(_0x2051('0x2'));var salesforce=require(_0x2051('0x3'));var sugarcrm=require(_0x2051('0x4'));var freshdesk=require(_0x2051('0x5'));var zoho=require('./zoho');var desk=require(_0x2051('0x6'));var vtiger=require(_0x2051('0x7'));var servicenow=require(_0x2051('0x8'));var dynamics365=require(_0x2051('0x9'));var freshsales=require(_0x2051('0xa'));var integrations=['zendesk','salesforce',_0x2051('0xb'),_0x2051('0xc'),_0x2051('0xd'),_0x2051('0xe'),_0x2051('0xf'),'dynamics365',_0x2051('0x10'),_0x2051('0x11')];exports['exec']=function(_0x2eb232,_0x211a2f,_0xc77ba8,_0x5983f3,_0x36f869,_0x20df34){if(_0xc77ba8){if(_[_0x2051('0x12')](integrations,_0x2eb232[_0x2051('0x13')][_0x2051('0x14')]())){try{var _0x435fa9=null;var _0xb23f69='';var _0x3c4427=_0xc77ba8[_0x2eb232[_0x2051('0x13')]['toLowerCase']()];if(_0x3c4427){var _0x545b16=_0x3c4427[_0x2eb232[_0x2051('0x15')]];if(_0x545b16){var _0x4a9943=_[_0x2051('0x16')](_0x545b16[_0x2051('0x17')],{'id':parseInt(_0x2eb232['data3'],0xa)});if(_0x4a9943){if(_0x5983f3){if(_0x36f869&&_0x211a2f[_0x2051('0x18')]){_0xb23f69='queue';}else if(_0x211a2f[_0x2051('0x19')]){_0xb23f69=_0x2051('0x1a');}else{console['log'](_0x2051('0x1b'),_0x211a2f);}}else{_0xb23f69='unmanaged';}switch(_0x2eb232[_0x2051('0x13')][_0x2051('0x14')]()){case'zendesk':zendesk[_0xb23f69](_0x2eb232,_0x211a2f,_0x4a9943,_0x5983f3,_0x36f869,_0x545b16,_0x20df34);break;case'salesforce':salesforce[_0xb23f69](_0x2eb232,_0x211a2f,_0x4a9943,_0x5983f3,_0x36f869,_0x545b16,_0x20df34);break;case _0x2051('0xb'):sugarcrm[_0xb23f69](_0x2eb232,_0x211a2f,_0x4a9943,_0x5983f3,_0x36f869,_0x545b16,_0x20df34);break;case _0x2051('0xc'):freshdesk[_0xb23f69](_0x2eb232,_0x211a2f,_0x4a9943,_0x5983f3,_0x36f869,_0x545b16,_0x20df34);break;case _0x2051('0xd'):zoho[_0xb23f69](_0x2eb232,_0x211a2f,_0x4a9943,_0x5983f3,_0x36f869,_0x545b16,_0x20df34);break;case _0x2051('0xe'):desk[_0xb23f69](_0x2eb232,_0x211a2f,_0x4a9943,_0x5983f3,_0x36f869,_0x545b16,_0x20df34);break;case _0x2051('0xf'):vtiger[_0xb23f69](_0x2eb232,_0x211a2f,_0x4a9943,_0x5983f3,_0x36f869,_0x545b16,_0x20df34);break;case _0x2051('0x10'):freshsales['cs'](_0x2eb232,_0x211a2f,_0x4a9943,_0x5983f3,_0x36f869,_0x545b16,_0x20df34,_0xb23f69);break;case _0x2051('0x11'):servicenow['cs'](_0x2eb232,_0x211a2f,_0x4a9943,_0x5983f3,_0x36f869,_0x545b16,_0x20df34,_0xb23f69);break;case _0x2051('0x1c'):dynamics365['cs'](_0x2eb232,_0x211a2f,_0x4a9943,_0x5983f3,_0x36f869,_0x545b16,_0x20df34,_0xb23f69);break;default:console[_0x2051('0x1d')](_0x2051('0x1e'));}}else{_0x435fa9=require('../../../../config/logger')(_0x2eb232[_0x2051('0x13')][_0x2051('0x14')]());_0x435fa9[_0x2051('0x1f')](_0x2051('0x20'),util[_0x2051('0x21')](_0x2051('0x22'),_0x2eb232[_0x2051('0x13')]['toLowerCase'](),_0x2eb232[_0x2051('0x23')]));}}else{_0x435fa9=require(_0x2051('0x24'))(_0x2eb232[_0x2051('0x13')]['toLowerCase']());_0x435fa9[_0x2051('0x1f')]('[EXEC]',util['format'](_0x2051('0x25'),_0x2eb232[_0x2051('0x13')][_0x2051('0x14')](),_0x2eb232['data2']));}}else{}}catch(_0x16669e){console[_0x2051('0x1f')](_0x16669e);}}}};
\ No newline at end of file
+var _0x2346=['zoho','vtiger','dynamics365','exec','includes','toLowerCase','data1','data2','find','Configurations','data3','queue','log','EVENT\x20UNKNOWN','unmanaged','desk','freshsales','servicenow','unknown\x20integration','error','[EXEC]','../../../../config/logger','%s\x20account\x20#%s\x20not\x20found','util','./zendesk','./salesforce','./zoho','./desk','./vtiger','./freshsales','zendesk','salesforce','sugarcrm','freshdesk'];(function(_0x530ebf,_0x2a3e00){var _0x583336=function(_0x9da827){while(--_0x9da827){_0x530ebf['push'](_0x530ebf['shift']());}};_0x583336(++_0x2a3e00);}(_0x2346,0x16b));var _0x6234=function(_0x270323,_0x72160){_0x270323=_0x270323-0x0;var _0x48a027=_0x2346[_0x270323];return _0x48a027;};'use strict';var _=require('lodash');var util=require(_0x6234('0x0'));var zendesk=require(_0x6234('0x1'));var salesforce=require(_0x6234('0x2'));var sugarcrm=require('./sugarcrm');var freshdesk=require('./freshdesk');var zoho=require(_0x6234('0x3'));var desk=require(_0x6234('0x4'));var vtiger=require(_0x6234('0x5'));var servicenow=require('./servicenow');var dynamics365=require('./dynamics365');var freshsales=require(_0x6234('0x6'));var integrations=[_0x6234('0x7'),_0x6234('0x8'),_0x6234('0x9'),_0x6234('0xa'),_0x6234('0xb'),'desk',_0x6234('0xc'),_0x6234('0xd'),'freshsales','servicenow'];exports[_0x6234('0xe')]=function(_0x5b7114,_0x3ded5c,_0x55c0cd,_0x5dd7ab,_0x1a46e9,_0x5c2368){if(_0x55c0cd){if(_[_0x6234('0xf')](integrations,_0x5b7114['data1'][_0x6234('0x10')]())){try{var _0x130917=null;var _0x4b5d64='';var _0x1a5f19=_0x55c0cd[_0x5b7114[_0x6234('0x11')]['toLowerCase']()];if(_0x1a5f19){var _0x22dc5c=_0x1a5f19[_0x5b7114[_0x6234('0x12')]];if(_0x22dc5c){var _0xe4db13=_[_0x6234('0x13')](_0x22dc5c[_0x6234('0x14')],{'id':parseInt(_0x5b7114[_0x6234('0x15')],0xa)});if(_0xe4db13){if(_0x5dd7ab){if(_0x1a46e9&&_0x3ded5c['queue']){_0x4b5d64=_0x6234('0x16');}else if(_0x3ded5c['routeId']){_0x4b5d64='outbound';}else{console[_0x6234('0x17')](_0x6234('0x18'),_0x3ded5c);}}else{_0x4b5d64=_0x6234('0x19');}switch(_0x5b7114[_0x6234('0x11')][_0x6234('0x10')]()){case _0x6234('0x7'):zendesk[_0x4b5d64](_0x5b7114,_0x3ded5c,_0xe4db13,_0x5dd7ab,_0x1a46e9,_0x22dc5c,_0x5c2368);break;case _0x6234('0x8'):salesforce[_0x4b5d64](_0x5b7114,_0x3ded5c,_0xe4db13,_0x5dd7ab,_0x1a46e9,_0x22dc5c,_0x5c2368);break;case _0x6234('0x9'):sugarcrm[_0x4b5d64](_0x5b7114,_0x3ded5c,_0xe4db13,_0x5dd7ab,_0x1a46e9,_0x22dc5c,_0x5c2368);break;case _0x6234('0xa'):freshdesk[_0x4b5d64](_0x5b7114,_0x3ded5c,_0xe4db13,_0x5dd7ab,_0x1a46e9,_0x22dc5c,_0x5c2368);break;case _0x6234('0xb'):zoho[_0x4b5d64](_0x5b7114,_0x3ded5c,_0xe4db13,_0x5dd7ab,_0x1a46e9,_0x22dc5c,_0x5c2368);break;case _0x6234('0x1a'):desk[_0x4b5d64](_0x5b7114,_0x3ded5c,_0xe4db13,_0x5dd7ab,_0x1a46e9,_0x22dc5c,_0x5c2368);break;case _0x6234('0xc'):vtiger[_0x4b5d64](_0x5b7114,_0x3ded5c,_0xe4db13,_0x5dd7ab,_0x1a46e9,_0x22dc5c,_0x5c2368);break;case _0x6234('0x1b'):freshsales['cs'](_0x5b7114,_0x3ded5c,_0xe4db13,_0x5dd7ab,_0x1a46e9,_0x22dc5c,_0x5c2368,_0x4b5d64);break;case _0x6234('0x1c'):servicenow['cs'](_0x5b7114,_0x3ded5c,_0xe4db13,_0x5dd7ab,_0x1a46e9,_0x22dc5c,_0x5c2368,_0x4b5d64);break;case _0x6234('0xd'):dynamics365['cs'](_0x5b7114,_0x3ded5c,_0xe4db13,_0x5dd7ab,_0x1a46e9,_0x22dc5c,_0x5c2368,_0x4b5d64);break;default:console[_0x6234('0x17')](_0x6234('0x1d'));}}else{_0x130917=require('../../../../config/logger')(_0x5b7114[_0x6234('0x11')][_0x6234('0x10')]());_0x130917[_0x6234('0x1e')](_0x6234('0x1f'),util['format']('%s\x20configuration\x20#%s\x20not\x20found',_0x5b7114['data1'][_0x6234('0x10')](),_0x5b7114[_0x6234('0x15')]));}}else{_0x130917=require(_0x6234('0x20'))(_0x5b7114[_0x6234('0x11')][_0x6234('0x10')]());_0x130917['error'](_0x6234('0x1f'),util['format'](_0x6234('0x21'),_0x5b7114[_0x6234('0x11')]['toLowerCase'](),_0x5b7114['data2']));}}else{}}catch(_0xb0bb6b){console[_0x6234('0x1e')](_0xb0bb6b);}}}};
\ No newline at end of file
index f0f713e..d43dd0e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x957d=['login','username','serverUrl','stripTrailingSlash','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','email','calleridname','calleridnum','Fields','queue','[QUEUE]\x20Ticket\x20%s\x20created','[QUEUE]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','user:%s','newTab','trigger:browser:url','%s/%s/e','instanceUrl','error','[QUEUE]\x20Salesforce\x20account\x20type\x20not\x20recognized.','catch','[QUEUE]','outbound','recordingFormat','none','[OUTBOUND]','destcalleridname','destcalleridnum','[OUTBOUND]\x20Ticket\x20%s\x20created.','[OUTBOUND]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','integrationTab','trigger:salesforce:display','Salesforce\x20account\x20type\x20not\x20recognized','unmanaged','lastevent','Recording\x20is\x20enabled!','toUpperCase','request-promise','moment','bluebird','md5','jsforce','util','ioredis','./util','../../../../config/environment','../../../../config/logger','salesforce','defaults','localhost','socket.io-emitter','redis','emit','assign','getString','Subjects','Descriptions','ticketType','ActivityDate','utc','IsReminderSet','IsRecurrence','endUserType','contact','lead','WhoId','account','WhatId','Case','ContactId','AccountId','leadId','info','Association\x20between\x20Case\x20and\x20Lead\x20skipped','create','isNil','validateEmail','sobject','find','execute','then','length','resolve','Name','identity','user_id','display_name','Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.','Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.','moduleSearch','contact_lead','cloneDeep','additionalSearchContact','merge','$or','Contact','additionalSearchLead','Lead','account_contact_lead','additionalSearchAccount','Account','first','Phone','attributes','type','toLowerCase','Enduser\x20(%s)\x20with\x20phone\x20%s\x20found','moduleCreate','Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.','LastName','<unknown>','format','Caller\x20-\x20%s','Company','No\x20Company','includes','string','picklist','idField','content','toString','variable','variableName','customVariable','Variable','name','password','concat','Connection','remoteUri','clientSecret'];(function(_0x1b26ac,_0x5ea577){var _0x2d88ec=function(_0x4d6110){while(--_0x4d6110){_0x1b26ac['push'](_0x1b26ac['shift']());}};_0x2d88ec(++_0x5ea577);}(_0x957d,0xaa));var _0xd957=function(_0x5d340f,_0x4bf781){_0x5d340f=_0x5d340f-0x0;var _0x59931c=_0x957d[_0x5d340f];return _0x59931c;};'use strict';var _=require('lodash');var rp=require(_0xd957('0x0'));var moment=require(_0xd957('0x1'));var BPromise=require(_0xd957('0x2'));var md5=require(_0xd957('0x3'));var jsforce=require(_0xd957('0x4'));var util=require(_0xd957('0x5'));var Redis=require(_0xd957('0x6'));var intUtil=require(_0xd957('0x7'));var config=require(_0xd957('0x8'));var logger=require(_0xd957('0x9'))(_0xd957('0xa'));config['redis']=_[_0xd957('0xb')](config['redis'],{'host':_0xd957('0xc'),'port':0x18eb});var io=require(_0xd957('0xd'))(new Redis(config[_0xd957('0xe')]));function emit(_0x307ad9,_0x586ef7,_0x34d107){io['to'](_0x307ad9)[_0xd957('0xf')](_0x586ef7,_0x34d107);}function getTicket(_0x198e7f,_0x4f02e9,_0x528b9d,_0x316f00,_0x540338,_0x17e9d6,_0x28f3b5,_0x5af8a){var _0x168dac=Object[_0xd957('0x10')]({},{'OwnerId':_0x4f02e9['id'],'Subject':intUtil[_0xd957('0x11')](_0x316f00[_0xd957('0x12')],_0x540338,'\x20'),'Description':intUtil['getString'](_0x316f00[_0xd957('0x13')],_0x540338,'\x0a')},getCustomFields(_0x17e9d6,_0x540338));if(_0x528b9d){if(_0x316f00[_0xd957('0x14')]==='Task'){_0x168dac[_0xd957('0x15')]=moment[_0xd957('0x16')]();_0x168dac[_0xd957('0x17')]=![];_0x168dac[_0xd957('0x18')]=![];if(_0x528b9d[_0xd957('0x19')]===_0xd957('0x1a')||_0x528b9d[_0xd957('0x19')]===_0xd957('0x1b')){_0x168dac[_0xd957('0x1c')]=_0x528b9d['id'];}else if(_0x528b9d[_0xd957('0x19')]===_0xd957('0x1d')){_0x168dac[_0xd957('0x1e')]=_0x528b9d['id'];}}else if(_0x316f00[_0xd957('0x14')]===_0xd957('0x1f')){if(_0x528b9d[_0xd957('0x19')]==='contact'){_0x168dac[_0xd957('0x20')]=_0x528b9d['id'];}else if(_0x528b9d[_0xd957('0x19')]===_0xd957('0x1d')){_0x168dac[_0xd957('0x21')]=_0x528b9d['id'];}else if(_0x528b9d[_0xd957('0x19')]===_0xd957('0x1b')&&_0x316f00[_0xd957('0x22')]){_0x168dac[_0x316f00[_0xd957('0x22')]]=_0x528b9d['id'];}else{logger[_0xd957('0x23')](_0xd957('0x24'));}}}return _0x28f3b5['sobject'](_0x316f00[_0xd957('0x14')])[_0xd957('0x25')](_0x168dac);}function getUser(_0x3fa29a,_0x2856c7,_0x7bb145){if(!_[_0xd957('0x26')](_0x2856c7)&&intUtil[_0xd957('0x27')](_0x2856c7)){var _0x494c1c={'Email':_0x2856c7};var _0x4fe5a2={'Id':!![],'Username':!![],'Name':!![],'Email':!![]};return _0x7bb145[_0xd957('0x28')]('User')[_0xd957('0x29')](_0x494c1c,_0x4fe5a2)[_0xd957('0x2a')]()[_0xd957('0x2b')](function(_0xbd5c57){if(_0xbd5c57[_0xd957('0x2c')]){var _0x4e76d6=_[_0xd957('0x29')](_0xbd5c57,function(_0xe674d9){return _0xe674d9['Email']===_0x2856c7;});if(_0x4e76d6){logger['info']('Agent\x20%s\x20found.',_0x2856c7);return BPromise[_0xd957('0x2d')]({'id':_0x4e76d6['Id'],'name':_0x4e76d6[_0xd957('0x2e')]});}}else{logger[_0xd957('0x23')]('Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.',_0x2856c7);return _0x7bb145[_0xd957('0x2f')]()[_0xd957('0x2b')](function(_0x407d7b){return BPromise[_0xd957('0x2d')]({'id':_0x407d7b[_0xd957('0x30')],'name':_0x407d7b[_0xd957('0x31')]});});}});}else{logger[_0xd957('0x23')](_0xd957('0x32'),_0x2856c7);return _0x7bb145['identity']()[_0xd957('0x2b')](function(_0x51da4e){return BPromise[_0xd957('0x2d')]({'id':_0x51da4e[_0xd957('0x30')],'name':_0x51da4e['display_name']});});}}function getEndUser(_0x260452,_0x559062,_0x262191,_0x27b392,_0x57bb92){var _0x610f7e={'$or':{'Phone':_0x27b392}};var _0x39061d={'Id':!![],'Name':!![],'Phone':!![]};return BPromise[_0xd957('0x2d')]()['then'](function(){logger[_0xd957('0x23')](_0xd957('0x33'),_0x27b392,_0x559062[_0xd957('0x34')]);switch(_0x559062[_0xd957('0x34')]){case _0xd957('0x35'):var _0x4261f2=_[_0xd957('0x36')](_0x610f7e);if(_0x559062['additionalSearchContact']){var _0x1e0263={};_0x1e0263[_0x559062[_0xd957('0x37')]]=_0x27b392;_[_0xd957('0x38')](_0x4261f2[_0xd957('0x39')],_0x1e0263);}return _0x57bb92[_0xd957('0x28')](_0xd957('0x3a'))[_0xd957('0x29')](_0x4261f2,_0x39061d)[_0xd957('0x2a')]()['then'](function(_0x42c423){if(_0x42c423&&_0x42c423[_0xd957('0x2c')]){return _0x42c423;}else{var _0x51674d=_[_0xd957('0x36')](_0x610f7e);if(_0x559062[_0xd957('0x3b')]){var _0x5ae287={};_0x5ae287[_0x559062[_0xd957('0x3b')]]=_0x27b392;_[_0xd957('0x38')](_0x51674d['$or'],_0x5ae287);}return _0x57bb92[_0xd957('0x28')](_0xd957('0x3c'))['find'](_0x51674d,_0x39061d);}});case _0xd957('0x3d'):var _0x1fde0b=_[_0xd957('0x36')](_0x610f7e);if(_0x559062[_0xd957('0x3e')]){var _0x1e0263={};_0x1e0263[_0x559062[_0xd957('0x3e')]]=_0x27b392;_[_0xd957('0x38')](_0x1fde0b[_0xd957('0x39')],_0x1e0263);}return _0x57bb92[_0xd957('0x28')]('Account')[_0xd957('0x29')](_0x1fde0b,_0x39061d)['execute']()['then'](function(_0x17a7fe){if(_0x17a7fe&&_0x17a7fe['length']){return _0x17a7fe;}else{var _0x4a5bba=_[_0xd957('0x36')](_0x610f7e);if(_0x559062[_0xd957('0x37')]){var _0x5151a3={};_0x5151a3[_0x559062[_0xd957('0x37')]]=_0x27b392;_[_0xd957('0x38')](_0x4a5bba[_0xd957('0x39')],_0x5151a3);}return _0x57bb92['sobject']('Contact')[_0xd957('0x29')](_0x4a5bba,_0x39061d)[_0xd957('0x2b')](function(_0x2d1b97){if(_0x2d1b97&&_0x2d1b97['length']){return _0x2d1b97;}else{var _0x5b2e66=_['cloneDeep'](_0x610f7e);if(_0x559062[_0xd957('0x3b')]){var _0x576e89={};_0x576e89[_0x559062[_0xd957('0x3b')]]=_0x27b392;_[_0xd957('0x38')](_0x5b2e66[_0xd957('0x39')],_0x576e89);}return _0x57bb92[_0xd957('0x28')](_0xd957('0x3c'))[_0xd957('0x29')](_0x5b2e66,_0x39061d);}});}});case'contact':var _0x4261f2=_['cloneDeep'](_0x610f7e);if(_0x559062['additionalSearchContact']){var _0x1e0263={};_0x1e0263[_0x559062['additionalSearchContact']]=_0x27b392;_[_0xd957('0x38')](_0x4261f2[_0xd957('0x39')],_0x1e0263);}return _0x57bb92['sobject'](_0xd957('0x3a'))['find'](_0x4261f2,_0x39061d)[_0xd957('0x2a')]();case'lead':var _0x73fa0d=_[_0xd957('0x36')](_0x610f7e);if(_0x559062['additionalSearchLead']){var _0x1e0263={};_0x1e0263[_0x559062[_0xd957('0x3b')]]=_0x27b392;_['merge'](_0x73fa0d[_0xd957('0x39')],_0x1e0263);}return _0x57bb92[_0xd957('0x28')](_0xd957('0x3c'))['find'](_0x73fa0d,_0x39061d);case _0xd957('0x1d'):var _0x1fde0b=_[_0xd957('0x36')](_0x610f7e);if(_0x559062['additionalSearchAccount']){var _0x1e0263={};_0x1e0263[_0x559062[_0xd957('0x3e')]]=_0x27b392;_['merge'](_0x1fde0b[_0xd957('0x39')],_0x1e0263);}return _0x57bb92[_0xd957('0x28')](_0xd957('0x3f'))[_0xd957('0x29')](_0x1fde0b,_0x39061d);default:return null;}})['then'](function(_0x28c68f){if(_0x28c68f&&_0x28c68f['length']){var _0x11d5d3=_[_0xd957('0x40')](_0x28c68f);if(_0x11d5d3){return BPromise[_0xd957('0x2d')]({'id':_0x11d5d3['Id'],'name':_0x11d5d3['Name'],'phone':_0x11d5d3[_0xd957('0x41')],'endUserType':_0x11d5d3[_0xd957('0x42')][_0xd957('0x43')][_0xd957('0x44')]()});}}})[_0xd957('0x2b')](function(_0x459aaf){if(_0x459aaf){logger['info'](_0xd957('0x45'),_0x459aaf[_0xd957('0x19')],_0x27b392);return BPromise['resolve'](_0x459aaf);}else{logger['info']('Enduser\x20with\x20phone\x20%s\x20not\x20found',_0x27b392);var _0x45601d={'Phone':_0x27b392};if(_0x559062['moduleCreate']){if(_0x559062[_0xd957('0x46')]==='contact'){logger[_0xd957('0x23')](_0xd957('0x47'),_0x27b392,_0x559062[_0xd957('0x46')]);_0x45601d[_0xd957('0x48')]=_0x262191!==_0xd957('0x49')?_0x262191:util[_0xd957('0x4a')](_0xd957('0x4b'),_0x27b392);}else if(_0x559062[_0xd957('0x46')]==='lead'){logger[_0xd957('0x23')](_0xd957('0x47'),_0x27b392,_0x559062[_0xd957('0x46')]);_0x45601d['LastName']=_0x262191!=='<unknown>'?_0x262191:util[_0xd957('0x4a')](_0xd957('0x4b'),_0x27b392);_0x45601d[_0xd957('0x4c')]=_0xd957('0x4d');}else if(_0x559062[_0xd957('0x46')]===_0xd957('0x1d')){logger['info'](_0xd957('0x47'),_0x27b392,_0x559062[_0xd957('0x46')]);_0x45601d[_0xd957('0x2e')]=_0x262191!==_0xd957('0x49')?_0x262191:util[_0xd957('0x4a')]('Caller\x20-\x20%s',_0x27b392);}else{return null;}}return _0x57bb92['sobject'](_['upperFirst'](_0x559062['moduleCreate']))[_0xd957('0x25')](_0x45601d)['then'](function(_0x58c3f0){return BPromise[_0xd957('0x2d')]({'id':_0x58c3f0['id'],'endUserType':_0x559062[_0xd957('0x46')]});});}});}function getCustomFields(_0x5e2556,_0x29af23){var _0x4e08c1={};if(_0x5e2556[_0xd957('0x2c')]>0x0){_['forEach'](_0x5e2556,function(_0x8b702d){if(_[_0xd957('0x4e')]([_0xd957('0x4f'),_0xd957('0x50')],_0x8b702d[_0xd957('0x43')])&&_0x8b702d[_0xd957('0x51')]){_0x4e08c1[_0x8b702d[_0xd957('0x51')]]=_0x8b702d[_0xd957('0x52')][_0xd957('0x53')]();}else if(_0x8b702d[_0xd957('0x43')]===_0xd957('0x54')&&_0x8b702d[_0xd957('0x55')]&&_0x8b702d[_0xd957('0x51')]){_0x29af23[_0x8b702d[_0xd957('0x55')]]&&(_0x4e08c1[_0x8b702d['idField']]=_0x29af23[_0x8b702d[_0xd957('0x55')]]['toString']());}else if(_0x8b702d[_0xd957('0x43')]===_0xd957('0x56')&&_0x8b702d[_0xd957('0x57')]&&_0x8b702d[_0xd957('0x57')][_0xd957('0x58')]&&_0x8b702d[_0xd957('0x51')]){_0x29af23[_0x8b702d['Variable'][_0xd957('0x58')][_0xd957('0x44')]()]&&(_0x4e08c1[_0x8b702d[_0xd957('0x51')]]=_0x29af23[_0x8b702d['Variable'][_0xd957('0x58')][_0xd957('0x44')]()][_0xd957('0x53')]());}});}return _0x4e08c1;}function getConnection(_0x581f4c){var _0x5832dc=_0x581f4c[_0xd957('0x59')][_0xd957('0x5a')](_0x581f4c['securityToken']);var _0x58d23b=new jsforce[(_0xd957('0x5b'))]({'oauth2':{'loginUrl':_0x581f4c[_0xd957('0x5c')]||'https://login.salesforce.com','clientId':_0x581f4c['clientId'],'clientSecret':_0x581f4c[_0xd957('0x5d')]}});return _0x58d23b[_0xd957('0x5e')](_0x581f4c[_0xd957('0x5f')],_0x5832dc)[_0xd957('0x2b')](function(){logger['info']('Connection\x20established.');return _0x58d23b;});}exports['queue']=function(_0x41b365,_0x1e494f,_0x258f1e,_0x549dfc,_0x2e678d,_0x3ada97){var _0x2eaa8e,_0x53248c,_0x486cb8,_0x281997;_0x3ada97[_0xd957('0x60')]=intUtil[_0xd957('0x61')](_0x3ada97[_0xd957('0x60')]);_0x3ada97[_0xd957('0x5c')]=intUtil[_0xd957('0x61')](_0x3ada97[_0xd957('0x5c')]);if(_0x2e678d&&_0x2e678d['monitor_format']){logger['info']('[QUEUE]','Recording\x20is\x20enabled!');_0x1e494f[_0xd957('0x62')]=util[_0xd957('0x4a')](_0xd957('0x63'),_0x3ada97[_0xd957('0x60')],_0x1e494f['uniqueid'],md5(_0x1e494f[_0xd957('0x64')]));}else{_0x1e494f[_0xd957('0x62')]='';}return getConnection(_0x3ada97)[_0xd957('0x2b')](function(_0x4c7c1){_0x281997=_0x4c7c1;return getUser(_0x3ada97,_0x549dfc[_0xd957('0x65')],_0x281997);})['then'](function(_0x29641f){_0x2eaa8e=_0x29641f;return getEndUser(_0x3ada97,_0x258f1e,_0x1e494f[_0xd957('0x66')],_0x1e494f[_0xd957('0x67')],_0x281997);})[_0xd957('0x2b')](function(_0x22641e){_0x53248c=_0x22641e;return getTicket(_0x3ada97,_0x2eaa8e,_0x53248c,_0x258f1e,_0x1e494f,_0x258f1e[_0xd957('0x68')],_0x281997,_0xd957('0x69'));})['then'](function(_0x2aae15){_0x486cb8=_0x2aae15;logger[_0xd957('0x23')](_0xd957('0x6a'),_0x486cb8['id']);logger[_0xd957('0x23')](_0xd957('0x6b'),_0x486cb8['id'],_0x549dfc[_0xd957('0x58')],_0x3ada97[_0xd957('0x43')]);switch(_0x3ada97[_0xd957('0x43')]){case'integrationTab':emit(util[_0xd957('0x4a')](_0xd957('0x6c'),_0x549dfc[_0xd957('0x58')]),'trigger:salesforce:display',{'recordId':_0x486cb8['id']});break;case _0xd957('0x6d'):emit(util['format'](_0xd957('0x6c'),_0x549dfc['name']),_0xd957('0x6e'),{'uri':util[_0xd957('0x4a')](_0xd957('0x6f'),_0x281997[_0xd957('0x70')],_0x486cb8['id'])});break;default:logger[_0xd957('0x71')](_0xd957('0x72'));}})[_0xd957('0x73')](function(_0x40f729){logger[_0xd957('0x71')](_0xd957('0x74'),_0x40f729);});};exports[_0xd957('0x75')]=function(_0x4c11f2,_0x21317f,_0x246819,_0x1ffeba,_0x56298a,_0x586e2b,_0x40542b){var _0x4140a4,_0x1a570a,_0x2ef6ec,_0x1eaed7;_0x586e2b[_0xd957('0x60')]=intUtil[_0xd957('0x61')](_0x586e2b[_0xd957('0x60')]);_0x586e2b['remoteUri']=intUtil[_0xd957('0x61')](_0x586e2b['remoteUri']);if(_0x40542b&&_0x40542b['recordingFormat']&&_0x40542b[_0xd957('0x76')]!==_0xd957('0x77')){logger[_0xd957('0x23')](_0xd957('0x78'),'Recording\x20is\x20enabled!');_0x21317f[_0xd957('0x62')]=util['format'](_0xd957('0x63'),_0x586e2b['serverUrl'],_0x21317f[_0xd957('0x64')],md5(_0x21317f[_0xd957('0x64')]));}return getConnection(_0x586e2b)[_0xd957('0x2b')](function(_0x246236){_0x1eaed7=_0x246236;return getUser(_0x586e2b,_0x1ffeba[_0xd957('0x65')],_0x1eaed7);})[_0xd957('0x2b')](function(_0x48b204){_0x4140a4=_0x48b204;return getEndUser(_0x586e2b,_0x246819,_0x21317f[_0xd957('0x79')],_0x21317f[_0xd957('0x7a')],_0x1eaed7);})['then'](function(_0x8340){_0x1a570a=_0x8340;return getTicket(_0x586e2b,_0x4140a4,_0x1a570a,_0x246819,_0x21317f,_0x246819[_0xd957('0x68')],_0x1eaed7,'outbound');})[_0xd957('0x2b')](function(_0x50d676){_0x2ef6ec=_0x50d676;logger[_0xd957('0x23')](_0xd957('0x7b'),_0x2ef6ec['id']);logger[_0xd957('0x23')](_0xd957('0x7c'),_0x2ef6ec['id'],_0x1ffeba['name'],_0x586e2b[_0xd957('0x43')]);switch(_0x586e2b[_0xd957('0x43')]){case _0xd957('0x7d'):emit(util['format']('user:%s',_0x1ffeba['name']),_0xd957('0x7e'),{'recordId':_0x2ef6ec['id']});break;case _0xd957('0x6d'):emit(util[_0xd957('0x4a')](_0xd957('0x6c'),_0x1ffeba['name']),_0xd957('0x6e'),{'uri':util[_0xd957('0x4a')](_0xd957('0x6f'),_0x1eaed7[_0xd957('0x70')],_0x2ef6ec['id'])});break;default:logger[_0xd957('0x71')]('[OUTBOUND]',_0xd957('0x7f'));}})[_0xd957('0x73')](function(_0x5cd609){logger[_0xd957('0x71')](_0xd957('0x78'),_0x5cd609);});};exports[_0xd957('0x80')]=function(_0x77ecea,_0x172cbd,_0x650a1d,_0x488b9d,_0x21ad87,_0x298d13){var _0x283665,_0x13c200,_0x301110,_0x1ef730;_0x298d13['serverUrl']=intUtil[_0xd957('0x61')](_0x298d13[_0xd957('0x60')]);_0x298d13[_0xd957('0x5c')]=intUtil['stripTrailingSlash'](_0x298d13[_0xd957('0x5c')]);if(_0x21ad87&&_0x21ad87['monitor_format']){logger[_0xd957('0x23')]('['+_0x172cbd[_0xd957('0x81')]['toUpperCase']()+']',_0xd957('0x82'));_0x172cbd['recordingURL']=util[_0xd957('0x4a')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x298d13[_0xd957('0x60')],_0x172cbd['uniqueid'],md5(_0x172cbd[_0xd957('0x64')]));}else{_0x172cbd['recordingURL']='';}return getConnection(_0x298d13)[_0xd957('0x2b')](function(_0x11c520){_0x1ef730=_0x11c520;if(!_[_0xd957('0x26')](_0x488b9d)){return getUser(_0x298d13,_0x488b9d[_0xd957('0x58')],_0x1ef730);}else{return getUser(_0x298d13,null,_0x1ef730);}})[_0xd957('0x2b')](function(_0x366c1e){_0x283665=_0x366c1e;return getEndUser(_0x298d13,_0x650a1d,_0x172cbd[_0xd957('0x66')],_0x172cbd['calleridnum'],_0x1ef730);})[_0xd957('0x2b')](function(_0x2b000b){_0x13c200=_0x2b000b;return getTicket(_0x298d13,_0x283665,_0x13c200,_0x650a1d,_0x172cbd,_0x650a1d[_0xd957('0x68')],_0x1ef730);})[_0xd957('0x2b')](function(_0x29e310){_0x301110=_0x29e310;logger['info']('['+_0x172cbd['lastevent'][_0xd957('0x83')]()+']\x20Ticket\x20%s\x20created.',_0x301110['id']);logger[_0xd957('0x23')]('['+_0x172cbd[_0xd957('0x81')][_0xd957('0x83')]()+']\x20Integration\x20account\x20type\x20%s.',_0x298d13[_0xd957('0x43')]);})[_0xd957('0x73')](function(_0x5c45b5){logger[_0xd957('0x71')]('['+_0x172cbd[_0xd957('0x81')]['toUpperCase']()+']',_0x5c45b5);});};
\ No newline at end of file
+var _0x87f2=['lead','WhoId','account','WhatId','Case','AccountId','leadId','Association\x20between\x20Case\x20and\x20Lead\x20skipped','create','isNil','find','then','length','Email','Agent\x20%s\x20found.','resolve','Name','info','Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.','identity','user_id','display_name','Searching\x20enduser\x20with\x20phone\x20%s.\x20Serching\x20method\x20used\x20%s.','moduleSearch','cloneDeep','additionalSearchContact','merge','$or','execute','additionalSearchLead','sobject','Lead','additionalSearchAccount','Account','Contact','first','Phone','type','Enduser\x20(%s)\x20with\x20phone\x20%s\x20found','Enduser\x20with\x20phone\x20%s\x20not\x20found','moduleCreate','Enduser\x20with\x20phone\x20%s.\x20Creating\x20method\x20used\x20%s.','<unknown>','LastName','format','Company','No\x20Company','Caller\x20-\x20%s','upperFirst','forEach','includes','string','picklist','idField','variable','variableName','customVariable','Variable','name','toLowerCase','toString','concat','securityToken','remoteUri','https://login.salesforce.com','clientId','clientSecret','login','username','Connection\x20established.','queue','serverUrl','stripTrailingSlash','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','calleridname','Fields','[QUEUE]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','integrationTab','trigger:salesforce:display','newTab','user:%s','trigger:browser:url','instanceUrl','error','catch','outbound','recordingFormat','none','[OUTBOUND]','recordingURL','email','destcalleridname','destcalleridnum','[OUTBOUND]\x20Ticket\x20%s\x20created.','[OUTBOUND]\x20Displaying\x20ticket\x20%s\x20to\x20agent\x20%s.\x20Integration\x20account\x20type\x20%s.','%s/%s/e','Salesforce\x20account\x20type\x20not\x20recognized','lastevent','toUpperCase',']\x20Ticket\x20%s\x20created.',']\x20Integration\x20account\x20type\x20%s.','lodash','request-promise','moment','bluebird','md5','jsforce','util','./util','../../../../config/environment','salesforce','redis','localhost','getString','Subjects','Descriptions','ticketType','Task','ActivityDate','IsReminderSet','IsRecurrence','endUserType','contact'];(function(_0x5cf5ef,_0x2d1f7e){var _0x2de282=function(_0x962dff){while(--_0x962dff){_0x5cf5ef['push'](_0x5cf5ef['shift']());}};_0x2de282(++_0x2d1f7e);}(_0x87f2,0x69));var _0x287f=function(_0x4ccfe8,_0x4581c8){_0x4ccfe8=_0x4ccfe8-0x0;var _0x2f7065=_0x87f2[_0x4ccfe8];return _0x2f7065;};'use strict';var _=require(_0x287f('0x0'));var rp=require(_0x287f('0x1'));var moment=require(_0x287f('0x2'));var BPromise=require(_0x287f('0x3'));var md5=require(_0x287f('0x4'));var jsforce=require(_0x287f('0x5'));var util=require(_0x287f('0x6'));var Redis=require('ioredis');var intUtil=require(_0x287f('0x7'));var config=require(_0x287f('0x8'));var logger=require('../../../../config/logger')(_0x287f('0x9'));config[_0x287f('0xa')]=_['defaults'](config[_0x287f('0xa')],{'host':_0x287f('0xb'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x287f('0xa')]));function emit(_0x2713cb,_0x1be7e8,_0x1c263e){io['to'](_0x2713cb)['emit'](_0x1be7e8,_0x1c263e);}function getTicket(_0x7278a3,_0x3765f6,_0x23c925,_0x188ff7,_0x2b9d05,_0x9df843,_0x5ca43a,_0x30e353){var _0x55bde1=Object['assign']({},{'OwnerId':_0x3765f6['id'],'Subject':intUtil[_0x287f('0xc')](_0x188ff7[_0x287f('0xd')],_0x2b9d05,'\x20'),'Description':intUtil[_0x287f('0xc')](_0x188ff7[_0x287f('0xe')],_0x2b9d05,'\x0a')},getCustomFields(_0x9df843,_0x2b9d05));if(_0x23c925){if(_0x188ff7[_0x287f('0xf')]===_0x287f('0x10')){_0x55bde1[_0x287f('0x11')]=moment['utc']();_0x55bde1[_0x287f('0x12')]=![];_0x55bde1[_0x287f('0x13')]=![];if(_0x23c925[_0x287f('0x14')]===_0x287f('0x15')||_0x23c925['endUserType']===_0x287f('0x16')){_0x55bde1[_0x287f('0x17')]=_0x23c925['id'];}else if(_0x23c925[_0x287f('0x14')]===_0x287f('0x18')){_0x55bde1[_0x287f('0x19')]=_0x23c925['id'];}}else if(_0x188ff7['ticketType']===_0x287f('0x1a')){if(_0x23c925[_0x287f('0x14')]==='contact'){_0x55bde1['ContactId']=_0x23c925['id'];}else if(_0x23c925[_0x287f('0x14')]===_0x287f('0x18')){_0x55bde1[_0x287f('0x1b')]=_0x23c925['id'];}else if(_0x23c925['endUserType']===_0x287f('0x16')&&_0x188ff7[_0x287f('0x1c')]){_0x55bde1[_0x188ff7['leadId']]=_0x23c925['id'];}else{logger['info'](_0x287f('0x1d'));}}}return _0x5ca43a['sobject'](_0x188ff7[_0x287f('0xf')])[_0x287f('0x1e')](_0x55bde1);}function getUser(_0x4fc589,_0x30b39c,_0x308027){if(!_[_0x287f('0x1f')](_0x30b39c)&&intUtil['validateEmail'](_0x30b39c)){var _0x3dba4f={'Email':_0x30b39c};var _0x15f660={'Id':!![],'Username':!![],'Name':!![],'Email':!![]};return _0x308027['sobject']('User')[_0x287f('0x20')](_0x3dba4f,_0x15f660)['execute']()[_0x287f('0x21')](function(_0x59a9cd){if(_0x59a9cd[_0x287f('0x22')]){var _0x39b757=_['find'](_0x59a9cd,function(_0x4a15dd){return _0x4a15dd[_0x287f('0x23')]===_0x30b39c;});if(_0x39b757){logger['info'](_0x287f('0x24'),_0x30b39c);return BPromise[_0x287f('0x25')]({'id':_0x39b757['Id'],'name':_0x39b757[_0x287f('0x26')]});}}else{logger[_0x287f('0x27')](_0x287f('0x28'),_0x30b39c);return _0x308027[_0x287f('0x29')]()[_0x287f('0x21')](function(_0x1c187f){return BPromise[_0x287f('0x25')]({'id':_0x1c187f[_0x287f('0x2a')],'name':_0x1c187f[_0x287f('0x2b')]});});}});}else{logger[_0x287f('0x27')]('Agent\x20%s\x20not\x20found.\x20Switch\x20to\x20the\x20admin\x20account.',_0x30b39c);return _0x308027[_0x287f('0x29')]()[_0x287f('0x21')](function(_0x53ffd4){return BPromise['resolve']({'id':_0x53ffd4[_0x287f('0x2a')],'name':_0x53ffd4['display_name']});});}}function getEndUser(_0x35c9f5,_0x24b68e,_0x12d86c,_0x2c17e5,_0x1bc2a9){var _0x16a7cf={'$or':{'Phone':_0x2c17e5}};var _0x410460={'Id':!![],'Name':!![],'Phone':!![]};return BPromise[_0x287f('0x25')]()[_0x287f('0x21')](function(){logger[_0x287f('0x27')](_0x287f('0x2c'),_0x2c17e5,_0x24b68e[_0x287f('0x2d')]);switch(_0x24b68e[_0x287f('0x2d')]){case'contact_lead':var _0xd0141=_[_0x287f('0x2e')](_0x16a7cf);if(_0x24b68e[_0x287f('0x2f')]){var _0x3b6db9={};_0x3b6db9[_0x24b68e['additionalSearchContact']]=_0x2c17e5;_[_0x287f('0x30')](_0xd0141[_0x287f('0x31')],_0x3b6db9);}return _0x1bc2a9['sobject']('Contact')[_0x287f('0x20')](_0xd0141,_0x410460)[_0x287f('0x32')]()[_0x287f('0x21')](function(_0x534b39){if(_0x534b39&&_0x534b39[_0x287f('0x22')]){return _0x534b39;}else{var _0xcb71ec=_[_0x287f('0x2e')](_0x16a7cf);if(_0x24b68e[_0x287f('0x33')]){var _0x3eb974={};_0x3eb974[_0x24b68e[_0x287f('0x33')]]=_0x2c17e5;_['merge'](_0xcb71ec[_0x287f('0x31')],_0x3eb974);}return _0x1bc2a9[_0x287f('0x34')](_0x287f('0x35'))[_0x287f('0x20')](_0xcb71ec,_0x410460);}});case'account_contact_lead':var _0x4bd52=_[_0x287f('0x2e')](_0x16a7cf);if(_0x24b68e[_0x287f('0x36')]){var _0x3b6db9={};_0x3b6db9[_0x24b68e[_0x287f('0x36')]]=_0x2c17e5;_[_0x287f('0x30')](_0x4bd52['$or'],_0x3b6db9);}return _0x1bc2a9[_0x287f('0x34')](_0x287f('0x37'))[_0x287f('0x20')](_0x4bd52,_0x410460)[_0x287f('0x32')]()[_0x287f('0x21')](function(_0x21422f){if(_0x21422f&&_0x21422f[_0x287f('0x22')]){return _0x21422f;}else{var _0x256321=_['cloneDeep'](_0x16a7cf);if(_0x24b68e['additionalSearchContact']){var _0x5c5bc7={};_0x5c5bc7[_0x24b68e[_0x287f('0x2f')]]=_0x2c17e5;_[_0x287f('0x30')](_0x256321[_0x287f('0x31')],_0x5c5bc7);}return _0x1bc2a9[_0x287f('0x34')](_0x287f('0x38'))['find'](_0x256321,_0x410460)[_0x287f('0x21')](function(_0x1451da){if(_0x1451da&&_0x1451da['length']){return _0x1451da;}else{var _0x1debe6=_[_0x287f('0x2e')](_0x16a7cf);if(_0x24b68e[_0x287f('0x33')]){var _0x17cb8c={};_0x17cb8c[_0x24b68e[_0x287f('0x33')]]=_0x2c17e5;_[_0x287f('0x30')](_0x1debe6['$or'],_0x17cb8c);}return _0x1bc2a9['sobject'](_0x287f('0x35'))[_0x287f('0x20')](_0x1debe6,_0x410460);}});}});case'contact':var _0xd0141=_['cloneDeep'](_0x16a7cf);if(_0x24b68e[_0x287f('0x2f')]){var _0x3b6db9={};_0x3b6db9[_0x24b68e[_0x287f('0x2f')]]=_0x2c17e5;_[_0x287f('0x30')](_0xd0141['$or'],_0x3b6db9);}return _0x1bc2a9[_0x287f('0x34')](_0x287f('0x38'))[_0x287f('0x20')](_0xd0141,_0x410460)[_0x287f('0x32')]();case'lead':var _0x4e0879=_['cloneDeep'](_0x16a7cf);if(_0x24b68e[_0x287f('0x33')]){var _0x3b6db9={};_0x3b6db9[_0x24b68e[_0x287f('0x33')]]=_0x2c17e5;_[_0x287f('0x30')](_0x4e0879['$or'],_0x3b6db9);}return _0x1bc2a9[_0x287f('0x34')](_0x287f('0x35'))[_0x287f('0x20')](_0x4e0879,_0x410460);case _0x287f('0x18'):var _0x4bd52=_[_0x287f('0x2e')](_0x16a7cf);if(_0x24b68e[_0x287f('0x36')]){var _0x3b6db9={};_0x3b6db9[_0x24b68e[_0x287f('0x36')]]=_0x2c17e5;_[_0x287f('0x30')](_0x4bd52[_0x287f('0x31')],_0x3b6db9);}return _0x1bc2a9['sobject'](_0x287f('0x37'))[_0x287f('0x20')](_0x4bd52,_0x410460);default:return null;}})[_0x287f('0x21')](function(_0x319c28){if(_0x319c28&&_0x319c28[_0x287f('0x22')]){var _0x47ebc6=_[_0x287f('0x39')](_0x319c28);if(_0x47ebc6){return BPromise[_0x287f('0x25')]({'id':_0x47ebc6['Id'],'name':_0x47ebc6[_0x287f('0x26')],'phone':_0x47ebc6[_0x287f('0x3a')],'endUserType':_0x47ebc6['attributes'][_0x287f('0x3b')]['toLowerCase']()});}}})[_0x287f('0x21')](function(_0x581b90){if(_0x581b90){logger['info'](_0x287f('0x3c'),_0x581b90[_0x287f('0x14')],_0x2c17e5);return BPromise[_0x287f('0x25')](_0x581b90);}else{logger[_0x287f('0x27')](_0x287f('0x3d'),_0x2c17e5);var _0x1e93ab={'Phone':_0x2c17e5};if(_0x24b68e[_0x287f('0x3e')]){if(_0x24b68e[_0x287f('0x3e')]===_0x287f('0x15')){logger[_0x287f('0x27')](_0x287f('0x3f'),_0x2c17e5,_0x24b68e['moduleCreate']);_0x1e93ab['LastName']=_0x12d86c!==_0x287f('0x40')?_0x12d86c:util['format']('Caller\x20-\x20%s',_0x2c17e5);}else if(_0x24b68e['moduleCreate']==='lead'){logger[_0x287f('0x27')](_0x287f('0x3f'),_0x2c17e5,_0x24b68e[_0x287f('0x3e')]);_0x1e93ab[_0x287f('0x41')]=_0x12d86c!=='<unknown>'?_0x12d86c:util[_0x287f('0x42')]('Caller\x20-\x20%s',_0x2c17e5);_0x1e93ab[_0x287f('0x43')]=_0x287f('0x44');}else if(_0x24b68e['moduleCreate']==='account'){logger['info'](_0x287f('0x3f'),_0x2c17e5,_0x24b68e[_0x287f('0x3e')]);_0x1e93ab[_0x287f('0x26')]=_0x12d86c!==_0x287f('0x40')?_0x12d86c:util['format'](_0x287f('0x45'),_0x2c17e5);}else{return null;}}return _0x1bc2a9[_0x287f('0x34')](_[_0x287f('0x46')](_0x24b68e[_0x287f('0x3e')]))[_0x287f('0x1e')](_0x1e93ab)[_0x287f('0x21')](function(_0x1ebb64){return BPromise[_0x287f('0x25')]({'id':_0x1ebb64['id'],'endUserType':_0x24b68e['moduleCreate']});});}});}function getCustomFields(_0x4c3111,_0x38b975){var _0x4ca4d0={};if(_0x4c3111['length']>0x0){_[_0x287f('0x47')](_0x4c3111,function(_0x2395fb){if(_[_0x287f('0x48')]([_0x287f('0x49'),_0x287f('0x4a')],_0x2395fb['type'])&&_0x2395fb[_0x287f('0x4b')]){_0x4ca4d0[_0x2395fb[_0x287f('0x4b')]]=_0x2395fb['content']['toString']();}else if(_0x2395fb[_0x287f('0x3b')]===_0x287f('0x4c')&&_0x2395fb[_0x287f('0x4d')]&&_0x2395fb[_0x287f('0x4b')]){_0x38b975[_0x2395fb[_0x287f('0x4d')]]&&(_0x4ca4d0[_0x2395fb['idField']]=_0x38b975[_0x2395fb[_0x287f('0x4d')]]['toString']());}else if(_0x2395fb[_0x287f('0x3b')]===_0x287f('0x4e')&&_0x2395fb[_0x287f('0x4f')]&&_0x2395fb[_0x287f('0x4f')]['name']&&_0x2395fb[_0x287f('0x4b')]){_0x38b975[_0x2395fb[_0x287f('0x4f')][_0x287f('0x50')][_0x287f('0x51')]()]&&(_0x4ca4d0[_0x2395fb[_0x287f('0x4b')]]=_0x38b975[_0x2395fb['Variable'][_0x287f('0x50')][_0x287f('0x51')]()][_0x287f('0x52')]());}});}return _0x4ca4d0;}function getConnection(_0x490d93){var _0x1906c1=_0x490d93['password'][_0x287f('0x53')](_0x490d93[_0x287f('0x54')]);var _0x5816f9=new jsforce['Connection']({'oauth2':{'loginUrl':_0x490d93[_0x287f('0x55')]||_0x287f('0x56'),'clientId':_0x490d93[_0x287f('0x57')],'clientSecret':_0x490d93[_0x287f('0x58')]}});return _0x5816f9[_0x287f('0x59')](_0x490d93[_0x287f('0x5a')],_0x1906c1)['then'](function(){logger['info'](_0x287f('0x5b'));return _0x5816f9;});}exports[_0x287f('0x5c')]=function(_0x5106b2,_0x2bac10,_0x381f09,_0x1c84e0,_0x2995bd,_0x3fc608){var _0x182e8b,_0x35eac0,_0x9f323f,_0x5b0ce5;_0x3fc608[_0x287f('0x5d')]=intUtil[_0x287f('0x5e')](_0x3fc608[_0x287f('0x5d')]);_0x3fc608[_0x287f('0x55')]=intUtil[_0x287f('0x5e')](_0x3fc608[_0x287f('0x55')]);if(_0x2995bd&&_0x2995bd[_0x287f('0x5f')]){logger[_0x287f('0x27')](_0x287f('0x60'),_0x287f('0x61'));_0x2bac10['recordingURL']=util[_0x287f('0x42')](_0x287f('0x62'),_0x3fc608['serverUrl'],_0x2bac10[_0x287f('0x63')],md5(_0x2bac10[_0x287f('0x63')]));}else{_0x2bac10['recordingURL']='';}return getConnection(_0x3fc608)['then'](function(_0x45b86f){_0x5b0ce5=_0x45b86f;return getUser(_0x3fc608,_0x1c84e0['email'],_0x5b0ce5);})[_0x287f('0x21')](function(_0x22181e){_0x182e8b=_0x22181e;return getEndUser(_0x3fc608,_0x381f09,_0x2bac10[_0x287f('0x64')],_0x2bac10['calleridnum'],_0x5b0ce5);})[_0x287f('0x21')](function(_0x236420){_0x35eac0=_0x236420;return getTicket(_0x3fc608,_0x182e8b,_0x35eac0,_0x381f09,_0x2bac10,_0x381f09[_0x287f('0x65')],_0x5b0ce5,'queue');})[_0x287f('0x21')](function(_0x51ab6d){_0x9f323f=_0x51ab6d;logger[_0x287f('0x27')]('[QUEUE]\x20Ticket\x20%s\x20created',_0x9f323f['id']);logger[_0x287f('0x27')](_0x287f('0x66'),_0x9f323f['id'],_0x1c84e0[_0x287f('0x50')],_0x3fc608[_0x287f('0x3b')]);switch(_0x3fc608['type']){case _0x287f('0x67'):emit(util[_0x287f('0x42')]('user:%s',_0x1c84e0[_0x287f('0x50')]),_0x287f('0x68'),{'recordId':_0x9f323f['id']});break;case _0x287f('0x69'):emit(util[_0x287f('0x42')](_0x287f('0x6a'),_0x1c84e0[_0x287f('0x50')]),_0x287f('0x6b'),{'uri':util[_0x287f('0x42')]('%s/%s/e',_0x5b0ce5[_0x287f('0x6c')],_0x9f323f['id'])});break;default:logger[_0x287f('0x6d')]('[QUEUE]\x20Salesforce\x20account\x20type\x20not\x20recognized.');}})[_0x287f('0x6e')](function(_0x3f0624){logger[_0x287f('0x6d')]('[QUEUE]',_0x3f0624);});};exports[_0x287f('0x6f')]=function(_0x14643e,_0x12f82f,_0x1eb321,_0x5103b3,_0x57d06d,_0x2958e2,_0x503fc1){var _0x41896b,_0x250b98,_0x210384,_0x384b3d;_0x2958e2[_0x287f('0x5d')]=intUtil[_0x287f('0x5e')](_0x2958e2[_0x287f('0x5d')]);_0x2958e2['remoteUri']=intUtil[_0x287f('0x5e')](_0x2958e2[_0x287f('0x55')]);if(_0x503fc1&&_0x503fc1[_0x287f('0x70')]&&_0x503fc1[_0x287f('0x70')]!==_0x287f('0x71')){logger[_0x287f('0x27')](_0x287f('0x72'),_0x287f('0x61'));_0x12f82f[_0x287f('0x73')]=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x2958e2[_0x287f('0x5d')],_0x12f82f[_0x287f('0x63')],md5(_0x12f82f[_0x287f('0x63')]));}return getConnection(_0x2958e2)[_0x287f('0x21')](function(_0x5c24cc){_0x384b3d=_0x5c24cc;return getUser(_0x2958e2,_0x5103b3[_0x287f('0x74')],_0x384b3d);})[_0x287f('0x21')](function(_0x413747){_0x41896b=_0x413747;return getEndUser(_0x2958e2,_0x1eb321,_0x12f82f[_0x287f('0x75')],_0x12f82f[_0x287f('0x76')],_0x384b3d);})['then'](function(_0x39f520){_0x250b98=_0x39f520;return getTicket(_0x2958e2,_0x41896b,_0x250b98,_0x1eb321,_0x12f82f,_0x1eb321[_0x287f('0x65')],_0x384b3d,_0x287f('0x6f'));})[_0x287f('0x21')](function(_0xc199c3){_0x210384=_0xc199c3;logger[_0x287f('0x27')](_0x287f('0x77'),_0x210384['id']);logger[_0x287f('0x27')](_0x287f('0x78'),_0x210384['id'],_0x5103b3['name'],_0x2958e2['type']);switch(_0x2958e2[_0x287f('0x3b')]){case _0x287f('0x67'):emit(util[_0x287f('0x42')](_0x287f('0x6a'),_0x5103b3['name']),_0x287f('0x68'),{'recordId':_0x210384['id']});break;case'newTab':emit(util[_0x287f('0x42')](_0x287f('0x6a'),_0x5103b3[_0x287f('0x50')]),_0x287f('0x6b'),{'uri':util[_0x287f('0x42')](_0x287f('0x79'),_0x384b3d['instanceUrl'],_0x210384['id'])});break;default:logger[_0x287f('0x6d')]('[OUTBOUND]',_0x287f('0x7a'));}})['catch'](function(_0x1584b4){logger[_0x287f('0x6d')](_0x287f('0x72'),_0x1584b4);});};exports['unmanaged']=function(_0x56756a,_0x40c9ce,_0x409da6,_0x47c918,_0x59b48d,_0x12267c){var _0x503399,_0x507e70,_0x4f190f,_0x5ddeb2;_0x12267c[_0x287f('0x5d')]=intUtil['stripTrailingSlash'](_0x12267c[_0x287f('0x5d')]);_0x12267c[_0x287f('0x55')]=intUtil[_0x287f('0x5e')](_0x12267c['remoteUri']);if(_0x59b48d&&_0x59b48d['monitor_format']){logger[_0x287f('0x27')]('['+_0x40c9ce[_0x287f('0x7b')]['toUpperCase']()+']','Recording\x20is\x20enabled!');_0x40c9ce['recordingURL']=util[_0x287f('0x42')](_0x287f('0x62'),_0x12267c[_0x287f('0x5d')],_0x40c9ce[_0x287f('0x63')],md5(_0x40c9ce[_0x287f('0x63')]));}else{_0x40c9ce[_0x287f('0x73')]='';}return getConnection(_0x12267c)['then'](function(_0x38a8df){_0x5ddeb2=_0x38a8df;if(!_[_0x287f('0x1f')](_0x47c918)){return getUser(_0x12267c,_0x47c918[_0x287f('0x50')],_0x5ddeb2);}else{return getUser(_0x12267c,null,_0x5ddeb2);}})[_0x287f('0x21')](function(_0x5b8109){_0x503399=_0x5b8109;return getEndUser(_0x12267c,_0x409da6,_0x40c9ce['calleridname'],_0x40c9ce['calleridnum'],_0x5ddeb2);})[_0x287f('0x21')](function(_0x169cb9){_0x507e70=_0x169cb9;return getTicket(_0x12267c,_0x503399,_0x507e70,_0x409da6,_0x40c9ce,_0x409da6[_0x287f('0x65')],_0x5ddeb2);})[_0x287f('0x21')](function(_0x24137c){_0x4f190f=_0x24137c;logger[_0x287f('0x27')]('['+_0x40c9ce[_0x287f('0x7b')][_0x287f('0x7c')]()+_0x287f('0x7d'),_0x4f190f['id']);logger[_0x287f('0x27')]('['+_0x40c9ce[_0x287f('0x7b')]['toUpperCase']()+_0x287f('0x7e'),_0x12267c['type']);})['catch'](function(_0x403879){logger['error']('['+_0x40c9ce[_0x287f('0x7b')][_0x287f('0x7c')]()+']',_0x403879);});};
\ No newline at end of file
index 4f8db7f..664db95 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x49d7=['[QUEUE]','Recording\x20is\x20enabled!','recordingURL','recordingFormat','none','The\x20ticket\x20ID\x20is:\x20%s','call\x20direction:\x20%s','Displaying\x20call\x20in\x20a\x20new\x20tab...','ticketId',']\x20Error\x20running\x20ServiceNow\x20integration','lodash','request-promise','md5','./util','../../../../config/logger','servicenow','redis','localhost','sys_user?sysparm_query=user_name%3Dadmin','result','length','adminId','sys_id','info','toUpperCase','],\x20getAdminUser\x20crm','catch','message','],\x20getUser\x20input\x20crm','validateEmail','userEmail','sys_user?sysparm_query=email%3D','],\x20getUser\x20rp\x20obj','then','],\x20getUser\x20entity','active','true','userId','adminEmail','],\x20getUser\x20crm','error','],\x20createEndUser\x20input\x20crm','POST','sys_user?','endUserNumber','System','],\x20EndUser\x20schema','endUserId','sys_user?sysparm_query=phone%3D','],\x20getEndUser\x20crm','],\x20createEndUser\x20crm','forEach','includes','string','picklist','type','nameField','customField','content','idField','toLowerCase','toString','variable','variableName','customVariable','Variable','name',']\x20getTicket\x20input\x20crm','outbound','getString','Subjects','Descriptions','Fields',']\x20POST\x20incident\x20entity\x20schema','ticketNumber','number',']\x20getTicket\x20crm','label','GET','?sysparm_query=name%3D','label_entry','incident','Incident','Incident\x20-\x20','all',']\x20arrayPromises:\x20IDs\x20in\x20table\x20label','push','map','%26sysparm_record_row%3D1%26sysparm_record_rows%3D39','%255EORDERBYDESCnumber','/nav_to.do?uri=incident.do?sys_id%3D','format','user:%s','trigger:browser:url','username','sysparm_limit=1','sysparm_display_value=true','remoteUri','%s/api/now/table/','isNil','email','destcalleridnum','callDirection','queue','unmanaged','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','serverUrl','uniqueid'];(function(_0x563cca,_0x5beec6){var _0x4c9ddd=function(_0x108cf9){while(--_0x108cf9){_0x563cca['push'](_0x563cca['shift']());}};_0x4c9ddd(++_0x5beec6);}(_0x49d7,0x14e));var _0x749d=function(_0x13992d,_0x3029ea){_0x13992d=_0x13992d-0x0;var _0x3d15bf=_0x49d7[_0x13992d];return _0x3d15bf;};'use strict';var _=require(_0x749d('0x0'));var Promise=require('bluebird');var rp=require(_0x749d('0x1'));var util=require('util');var md5=require(_0x749d('0x2'));var Redis=require('ioredis');var intUtil=require(_0x749d('0x3'));var config=require('../../../../config/environment');var logger=require(_0x749d('0x4'))(_0x749d('0x5'));config[_0x749d('0x6')]=_['defaults'](config[_0x749d('0x6')],{'host':_0x749d('0x7'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x749d('0x6')]));function getAdminUser(_0x34901c,_0x4e2413,_0x4076f3,_0x45ac56,_0x20faeb,_0x36e0a6){return new Promise(function(_0x23f6c6,_0x2e80b6){var _0x24e397={'method':'GET','uri':_0x45ac56+_0x749d('0x8')+'&'+_0x20faeb+'&'+_0x36e0a6,'auth':_0x4e2413,'json':!![]};return rp(_0x24e397)['then'](function(_0x3c8b35){if(_0x3c8b35[_0x749d('0x9')][_0x749d('0xa')]>0x0){_0x4076f3[_0x749d('0xb')]=_0x3c8b35[_0x749d('0x9')][0x0][_0x749d('0xc')];}logger[_0x749d('0xd')]('['+[_0x34901c[_0x749d('0xe')]()]+_0x749d('0xf'),_0x4076f3);_0x23f6c6(_0x4076f3);})[_0x749d('0x10')](function(_0xf17b93){logger['error']('['+[_0x34901c[_0x749d('0xe')]()]+']',_0xf17b93['message']);_0x2e80b6(_0xf17b93[_0x749d('0x11')]);});});}function getUser(_0x1cd8f3,_0x459612,_0x1b0cbd,_0x5c1cdc,_0x585a3c){return function(_0x246166){logger[_0x749d('0xd')]('['+[_0x1cd8f3[_0x749d('0xe')]()]+_0x749d('0x12'),_0x246166);return new Promise(function(_0x27d0c2,_0x1344e4){if(intUtil[_0x749d('0x13')](_0x246166[_0x749d('0x14')])){var _0x4442ac={'method':'GET','uri':_0x1b0cbd+_0x749d('0x15')+_0x246166[_0x749d('0x14')]+'&'+_0x5c1cdc+'&'+_0x585a3c,'auth':_0x459612,'json':!![]};logger[_0x749d('0xd')]('['+[_0x1cd8f3[_0x749d('0xe')]()]+_0x749d('0x16'),_0x4442ac);return rp(_0x4442ac)[_0x749d('0x17')](function(_0x5ee9dc){logger['info']('['+[_0x1cd8f3[_0x749d('0xe')]()]+_0x749d('0x18'),_0x5ee9dc);if(_0x5ee9dc[_0x749d('0x9')][_0x749d('0xa')]>0x0&&String(_0x5ee9dc[_0x749d('0x9')][0x0][_0x749d('0x19')])===_0x749d('0x1a')){_0x246166[_0x749d('0x1b')]=_0x5ee9dc[_0x749d('0x9')][0x0][_0x749d('0xc')];}else{_0x246166[_0x749d('0x1b')]=_0x246166[_0x749d('0xb')];_0x246166[_0x749d('0x14')]=_0x246166[_0x749d('0x1c')];}logger[_0x749d('0xd')]('['+[_0x1cd8f3[_0x749d('0xe')]()]+_0x749d('0x1d'),_0x246166);_0x27d0c2(_0x246166);})[_0x749d('0x10')](function(_0x35161a){logger[_0x749d('0x1e')]('['+[_0x1cd8f3[_0x749d('0xe')]()]+']',_0x35161a[_0x749d('0x11')]);_0x1344e4(_0x35161a['message']);});}else{logger[_0x749d('0xd')]('['+[_0x1cd8f3[_0x749d('0xe')]()]+']\x20using\x20admin\x20profile');_0x246166[_0x749d('0x1b')]=_0x246166[_0x749d('0xb')];_0x246166[_0x749d('0x14')]=_0x246166[_0x749d('0x1c')];_0x27d0c2(_0x246166);}});};}function createEndUser(_0x38117a,_0x223411,_0x4f8779,_0x5e9cc6,_0x2c35ff){logger[_0x749d('0xd')]('['+[_0x38117a['toUpperCase']()]+_0x749d('0x1f'),_0x4f8779);return new Promise(function(_0x5af499,_0x3ceeb4){var _0x3ce992={'method':_0x749d('0x20'),'uri':_0x5e9cc6+_0x749d('0x21')+_0x2c35ff,'body':{'user_name':_0x4f8779[_0x749d('0x22')],'roles':'user','first_name':_0x4f8779[_0x749d('0x22')],'active':_0x749d('0x1a'),'date_format':_0x749d('0x23'),'phone':_0x4f8779[_0x749d('0x22')]},'auth':_0x223411,'json':!![]};return rp(_0x3ce992)['then'](function(_0x21e4b2){logger[_0x749d('0xd')]('['+[_0x38117a[_0x749d('0xe')]()]+_0x749d('0x24'),_0x21e4b2[_0x749d('0x9')]);_0x4f8779[_0x749d('0x25')]=_0x21e4b2['result'][_0x749d('0xc')];_0x5af499(_0x4f8779);})['catch'](function(_0x303a83){logger['error']('['+[_0x38117a[_0x749d('0xe')]()]+']',_0x303a83[_0x749d('0x11')]);_0x3ceeb4(_0x303a83[_0x749d('0x11')]);});});}function getEndUser(_0x32297f,_0x202b59,_0x3feaf9,_0x41e85f,_0x16e457){return function(_0x552fad){logger['info']('['+[_0x32297f[_0x749d('0xe')]()]+'],\x20getEndUser\x20input\x20crm',_0x552fad);return new Promise(function(_0x3c2684,_0x3e2490){var _0x36c99b={'method':'GET','uri':_0x3feaf9+_0x749d('0x26')+_0x552fad[_0x749d('0x22')]+'&'+_0x41e85f+'&'+_0x16e457,'auth':_0x202b59,'json':!![]};return rp(_0x36c99b)[_0x749d('0x17')](function(_0x2020c9){if(_0x2020c9[_0x749d('0x9')][_0x749d('0xa')]>0x0){_0x552fad[_0x749d('0x25')]=_0x2020c9[_0x749d('0x9')][0x0][_0x749d('0xc')];logger['info']('['+[_0x32297f[_0x749d('0xe')]()]+_0x749d('0x27'),_0x552fad);_0x3c2684(_0x552fad);}else{return createEndUser(_0x32297f,_0x202b59,_0x552fad,_0x3feaf9,_0x41e85f)['then'](function(_0x4dfdea){logger[_0x749d('0xd')]('['+[_0x32297f['toUpperCase']()]+_0x749d('0x28'),_0x4dfdea);_0x3c2684(_0x4dfdea);});}})['catch'](function(_0x36c648){logger[_0x749d('0x1e')]('['+[_0x32297f['toUpperCase']()]+']',_0x36c648[_0x749d('0x11')]);_0x3e2490(_0x36c648[_0x749d('0x11')]);});});};}function getCustomFields(_0x2c608b,_0xde7138){var _0x2e3531={};if(_0x2c608b[_0x749d('0xa')]>0x0){_[_0x749d('0x29')](_0x2c608b,function(_0x2ddef8){if(_[_0x749d('0x2a')]([_0x749d('0x2b'),_0x749d('0x2c')],_0x2ddef8[_0x749d('0x2d')])&&_0x2ddef8[_0x749d('0x2e')]&&!_0x2ddef8[_0x749d('0x2f')]){_0x2e3531[_0x2ddef8[_0x749d('0x2e')]['toLowerCase']()]=_0x2ddef8[_0x749d('0x30')]['toString']();}else if(_[_0x749d('0x2a')](['string',_0x749d('0x2c')],_0x2ddef8[_0x749d('0x2d')])&&_0x2ddef8[_0x749d('0x31')]&&_0x2ddef8[_0x749d('0x2f')]){_0x2e3531[_0x2ddef8['idField'][_0x749d('0x32')]()]=_0x2ddef8[_0x749d('0x30')][_0x749d('0x33')]();}else if(_0x2ddef8[_0x749d('0x2d')]===_0x749d('0x34')&&_0x2ddef8[_0x749d('0x35')]&&_0x2ddef8[_0x749d('0x31')]&&_0x2ddef8[_0x749d('0x2f')]){_0x2e3531[_0x2ddef8[_0x749d('0x31')][_0x749d('0x32')]()]=_0xde7138[_0x2ddef8[_0x749d('0x35')]][_0x749d('0x33')]();}else if(_0x2ddef8[_0x749d('0x2d')]===_0x749d('0x36')&&_0x2ddef8['Variable']&&_0x2ddef8[_0x749d('0x37')][_0x749d('0x38')]&&_0x2ddef8['idField']&&_0x2ddef8[_0x749d('0x2f')]){_0x2e3531[_0x2ddef8[_0x749d('0x31')][_0x749d('0x32')]()]=_0xde7138[_0x2ddef8[_0x749d('0x37')][_0x749d('0x38')][_0x749d('0x32')]()][_0x749d('0x33')]();}});}return _0x2e3531;}function getTicket(_0x5a7fad,_0x34747b,_0x57709d,_0x5f4b94,_0x53d1be,_0x57be61){return function(_0x429ae2){logger['info']('['+[_0x5a7fad[_0x749d('0xe')]()]+_0x749d('0x39'),_0x429ae2);return new Promise(function(_0x249d88,_0x42a33d){var _0x2742a7=_0x5a7fad['toLowerCase']()===_0x749d('0x3a')?_0x429ae2[_0x749d('0x1b')]:_0x429ae2[_0x749d('0x25')];var _0x58670e={'method':_0x749d('0x20'),'uri':_0x57709d+'incident'+'?'+_0x57be61,'body':Object['assign']({},{'active':'true','caller_id':_0x2742a7,'assigned_to':_0x429ae2[_0x749d('0x1b')],'short_description':intUtil[_0x749d('0x3b')](_0x5f4b94[_0x749d('0x3c')],_0x53d1be,'\x20'),'description':intUtil['getString'](_0x5f4b94[_0x749d('0x3d')],_0x53d1be,'\x0a')},getCustomFields(_0x5f4b94[_0x749d('0x3e')],_0x53d1be)),'auth':_0x34747b,'json':!![]};return rp(_0x58670e)[_0x749d('0x17')](function(_0x1eff86){logger['info']('['+[_0x5a7fad['toUpperCase']()]+_0x749d('0x3f'),_0x1eff86[_0x749d('0x9')]);_0x429ae2['ticketId']=_0x1eff86['result'][_0x749d('0xc')];_0x429ae2[_0x749d('0x40')]=_0x1eff86[_0x749d('0x9')][_0x749d('0x41')];logger[_0x749d('0xd')]('['+[_0x5a7fad[_0x749d('0xe')]()]+_0x749d('0x42'),_0x429ae2);_0x249d88(_0x429ae2);})[_0x749d('0x10')](function(_0xa5786c){logger['error']('['+[_0x5a7fad[_0x749d('0xe')]()]+']',_0xa5786c[_0x749d('0x11')]);_0x42a33d(_0xa5786c[_0x749d('0x11')]);});});};}function createRemoteTag(_0x35383c,_0x58c44,_0x52db6b,_0x6849ea){return new Promise(function(_0xbeb319,_0x302fdb){var _0x4d027d={'method':_0x749d('0x20'),'uri':_0x52db6b+_0x749d('0x43')+'?'+_0x6849ea,'body':{'short_description':_0x35383c,'global':!![],'active':!![],'name':_0x35383c},'auth':_0x58c44,'json':!![]};return rp(_0x4d027d)[_0x749d('0x17')](function(_0x1f3fbc){var _0x81de2=_0x1f3fbc['result'][_0x749d('0xc')];_0xbeb319(_0x81de2);});});}function getRemoteTag(_0x56b6dc,_0x4a2f79,_0x510b51,_0x46e97d,_0x178f26){return new Promise(function(_0x4209fc,_0x30a1a5){var _0x1fdb25={'method':_0x749d('0x44'),'uri':_0x510b51+_0x749d('0x43')+_0x749d('0x45')+_0x56b6dc+'&'+_0x46e97d,'auth':_0x4a2f79,'json':!![]};return rp(_0x1fdb25)[_0x749d('0x17')](function(_0x23c754){if(_0x23c754['result'][_0x749d('0xa')]>0x0){var _0x12f48e=_0x23c754[_0x749d('0x9')][0x0]['sys_id'];_0x4209fc(_0x12f48e);}else{return createRemoteTag(_0x56b6dc,_0x4a2f79,_0x510b51,_0x46e97d)[_0x749d('0x17')](function(_0x25519f){_0x4209fc(_0x25519f);});}});});}function assignTagToIncident(_0x26fa70,_0x574e61,_0x3c0e46,_0x513f77,_0x44decd){return new Promise(function(_0x24ea7d,_0x4d3ec8){var _0x5c0d60={'method':'POST','uri':_0x3c0e46+_0x749d('0x46')+'?'+_0x44decd,'body':{'label':_0x26fa70,'table':_0x749d('0x47'),'id_type':_0x749d('0x48'),'table_key':_0x513f77['ticketId'],'title':_0x749d('0x49')+_0x513f77[_0x749d('0x40')],'id_display':_0x513f77[_0x749d('0x40')]},'auth':_0x574e61,'json':!![]};return rp(_0x5c0d60)[_0x749d('0x17')](function(_0x426430){_0x24ea7d();})[_0x749d('0x10')](function(){_0x24ea7d();});});}function manageTags(_0xabc237,_0x35886c,_0x3ae0fc,_0x3decc5,_0x8ed4ae,_0x86d51e,_0xfe5a5c){return new Promise(function(_0x1ad3d8,_0x4c2477){var _0x3dc36e=[];_0x35886c[_0x749d('0x29')](function(_0x1cbee2){_0x3dc36e['push'](getRemoteTag(_0x1cbee2,_0x3ae0fc,_0x3decc5,_0x86d51e,_0xfe5a5c));});return Promise[_0x749d('0x4a')](_0x3dc36e)['then'](function(_0x8384c0){if(_0x8384c0[_0x749d('0xa')]){logger[_0x749d('0xd')]('['+[_0xabc237[_0x749d('0xe')]()]+_0x749d('0x4b'),_0x8384c0);var _0x24bcfa=[];_0x8384c0['forEach'](function(_0x40b9ed){_0x24bcfa[_0x749d('0x4c')](assignTagToIncident(_0x40b9ed,_0x3ae0fc,_0x3decc5,_0x8ed4ae,_0x86d51e));});return Promise['all'](_0x24bcfa)[_0x749d('0x17')](function(){_0x1ad3d8();})[_0x749d('0x10')](function(){_0x1ad3d8();});}else{_0x1ad3d8();}});});}function getTags(_0x4231f0,_0x2d83e4,_0x34981e,_0xa79105,_0x342cff,_0x184c21){return function(_0x4d3ca8){return new Promise(function(_0x1be808,_0x1959b3){var _0x12ff53=[];var _0x36b594=_0xa79105['Tags'];if(_0x36b594&&_0x36b594[_0x749d('0xa')]>0x0){_0x12ff53=_[_0x749d('0x4d')](_0x36b594,_0x749d('0x38'));}if(_0x12ff53[_0x749d('0xa')]>0x0){return manageTags(_0x4231f0,_0x12ff53,_0x2d83e4,_0x34981e,_0x4d3ca8,_0x342cff,_0x184c21)[_0x749d('0x17')](function(){_0x1be808(_0x4d3ca8);});}else{_0x1be808(_0x4d3ca8);}});};}function emit(_0x3af448,_0x2e9be9,_0x6a55ef){var _0x38da79='%26sysparm_record_target%3Dincident'+_0x749d('0x4e')+'%26sysparm_record_list%3Dactive%253Dtrue'+_0x749d('0x4f');var _0x3f10be={'uri':_0x3af448+_0x749d('0x50')+_0x6a55ef+_0x38da79};io['to'](util[_0x749d('0x51')](_0x749d('0x52'),_0x2e9be9))['emit'](_0x749d('0x53'),_0x3f10be);}exports['cs']=function(_0xba2082,_0x3bf5c0,_0x11073a,_0x4809b0,_0x256741,_0x54a84d,_0x2eafd8,_0x4292c5){var _0x197f11={};var _0x390760={'user':_0x54a84d[_0x749d('0x54')],'pass':_0x54a84d['password']};var _0x1277fc=_0x749d('0x55');var _0x46a0d3=_0x749d('0x56');_0x54a84d[_0x749d('0x57')]=intUtil['stripTrailingSlash'](_0x54a84d[_0x749d('0x57')]);_0x54a84d['serverUrl']=intUtil['stripTrailingSlash'](_0x54a84d['serverUrl']);var _0xa3851f=util[_0x749d('0x51')](_0x749d('0x58'),_0x54a84d['remoteUri']);_0x197f11['userEmail']=!_[_0x749d('0x59')](_0x4809b0)?_0x4809b0[_0x749d('0x5a')]:null;_0x197f11[_0x749d('0x1c')]=_0x54a84d[_0x749d('0x5a')];_0x197f11[_0x749d('0x22')]=_0x4292c5[_0x749d('0x32')]()===_0x749d('0x3a')?_0x3bf5c0[_0x749d('0x5b')]:_0x3bf5c0['calleridnum'];_0x197f11[_0x749d('0x5c')]=_0x4292c5===_0x749d('0x5d')||_0x4292c5===_0x749d('0x5e')?_0x749d('0x5d'):_0x749d('0x3a');var _0x477c78=util[_0x749d('0x51')](_0x749d('0x5f'),_0x54a84d[_0x749d('0x60')],_0x3bf5c0['uniqueid'],md5(_0x3bf5c0[_0x749d('0x61')]));if(_0x256741&&_0x256741['monitor_format']){logger[_0x749d('0xd')](_0x749d('0x62'),_0x749d('0x63'));_0x3bf5c0[_0x749d('0x64')]=_0x477c78;}else if(_0x2eafd8&&_0x2eafd8[_0x749d('0x65')]&&_0x2eafd8[_0x749d('0x65')]!==_0x749d('0x66')){logger[_0x749d('0xd')]('[OUTBOUND]',_0x749d('0x63'));_0x3bf5c0[_0x749d('0x64')]=_0x477c78;}else{_0x3bf5c0['recordingURL']='';}return getAdminUser(_0x4292c5,_0x390760,_0x197f11,_0xa3851f,_0x46a0d3,_0x1277fc)[_0x749d('0x17')](getUser(_0x4292c5,_0x390760,_0xa3851f,_0x46a0d3,_0x1277fc))[_0x749d('0x17')](getEndUser(_0x4292c5,_0x390760,_0xa3851f,_0x46a0d3,_0x1277fc))[_0x749d('0x17')](getTicket(_0x4292c5,_0x390760,_0xa3851f,_0x11073a,_0x3bf5c0,_0x46a0d3))[_0x749d('0x17')](function(_0x4a0781){logger[_0x749d('0xd')](util[_0x749d('0x51')](_0x749d('0x67'),_0x4a0781['ticketId']));logger[_0x749d('0xd')](util[_0x749d('0x51')](_0x749d('0x68'),_0x4292c5));if(_0x4292c5!=='unmanaged'){logger['info']('['+[_0x4292c5['toUpperCase']()]+']',_0x749d('0x69'));emit(_0x54a84d['remoteUri'],_0x4809b0[_0x749d('0x38')],_0x4a0781[_0x749d('0x6a')]);}})[_0x749d('0x10')](function(_0x3ae9ea){logger[_0x749d('0x1e')]('['+[_0x4292c5[_0x749d('0xe')]()]+_0x749d('0x6b'),util['inspect'](_0x3ae9ea,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
+var _0x501e=['Incident','ticketId','Incident\x20-\x20','ticketNumber','forEach','push','all',']\x20arrayPromises:\x20IDs\x20in\x20table\x20label','map','%26sysparm_record_target%3Dincident','%26sysparm_record_row%3D1%26sysparm_record_rows%3D39','%26sysparm_record_list%3Dactive%253Dtrue','%255EORDERBYDESCnumber','/nav_to.do?uri=incident.do?sys_id%3D','format','user:%s','emit','trigger:browser:url','username','sysparm_limit=1','sysparm_display_value=true','remoteUri','stripTrailingSlash','serverUrl','%s/api/now/table/','isNil','email','destcalleridnum','queue','unmanaged','uniqueid','monitor_format','[QUEUE]','recordingURL','recordingFormat','none','[OUTBOUND]','The\x20ticket\x20ID\x20is:\x20%s','inspect','lodash','bluebird','util','md5','ioredis','./util','servicenow','defaults','redis','localhost','socket.io-emitter','GET','sys_user?sysparm_query=user_name%3Dadmin','then','adminId','info','toUpperCase','catch','message','],\x20getUser\x20input\x20crm','validateEmail','userEmail','sys_user?sysparm_query=email%3D','],\x20getUser\x20rp\x20obj','],\x20getUser\x20entity','result','length','active','sys_id','],\x20getUser\x20crm','error','adminEmail','],\x20createEndUser\x20input\x20crm','POST','user','endUserNumber','System','],\x20EndUser\x20schema','],\x20getEndUser\x20input\x20crm','sys_user?sysparm_query=phone%3D','endUserId','],\x20getEndUser\x20crm','],\x20createEndUser\x20crm','includes','string','picklist','type','nameField','customField','toLowerCase','content','toString','idField','variableName','customVariable','Variable','name',']\x20getTicket\x20input\x20crm','outbound','userId','assign','true','getString','Descriptions',']\x20POST\x20incident\x20entity\x20schema',']\x20getTicket\x20crm','label','?sysparm_query=name%3D','label_entry','incident'];(function(_0x13c174,_0xda25fe){var _0x160654=function(_0x1b6ac2){while(--_0x1b6ac2){_0x13c174['push'](_0x13c174['shift']());}};_0x160654(++_0xda25fe);}(_0x501e,0x94));var _0xe501=function(_0x2fd8bc,_0x52e6cf){_0x2fd8bc=_0x2fd8bc-0x0;var _0x530a88=_0x501e[_0x2fd8bc];return _0x530a88;};'use strict';var _=require(_0xe501('0x0'));var Promise=require(_0xe501('0x1'));var rp=require('request-promise');var util=require(_0xe501('0x2'));var md5=require(_0xe501('0x3'));var Redis=require(_0xe501('0x4'));var intUtil=require(_0xe501('0x5'));var config=require('../../../../config/environment');var logger=require('../../../../config/logger')(_0xe501('0x6'));config['redis']=_[_0xe501('0x7')](config[_0xe501('0x8')],{'host':_0xe501('0x9'),'port':0x18eb});var io=require(_0xe501('0xa'))(new Redis(config[_0xe501('0x8')]));function getAdminUser(_0xe56e15,_0x38ac10,_0x2353a,_0x1ceb19,_0x12b2b,_0x5dc432){return new Promise(function(_0x56086b,_0x19c331){var _0x908d0a={'method':_0xe501('0xb'),'uri':_0x1ceb19+_0xe501('0xc')+'&'+_0x12b2b+'&'+_0x5dc432,'auth':_0x38ac10,'json':!![]};return rp(_0x908d0a)[_0xe501('0xd')](function(_0x16a3eb){if(_0x16a3eb['result']['length']>0x0){_0x2353a[_0xe501('0xe')]=_0x16a3eb['result'][0x0]['sys_id'];}logger[_0xe501('0xf')]('['+[_0xe56e15[_0xe501('0x10')]()]+'],\x20getAdminUser\x20crm',_0x2353a);_0x56086b(_0x2353a);})[_0xe501('0x11')](function(_0x1b2def){logger['error']('['+[_0xe56e15[_0xe501('0x10')]()]+']',_0x1b2def[_0xe501('0x12')]);_0x19c331(_0x1b2def[_0xe501('0x12')]);});});}function getUser(_0x4c2d76,_0x53bc2a,_0x34598f,_0xced3b1,_0x2abe48){return function(_0x171bf0){logger[_0xe501('0xf')]('['+[_0x4c2d76[_0xe501('0x10')]()]+_0xe501('0x13'),_0x171bf0);return new Promise(function(_0x581e7c,_0x21047e){if(intUtil[_0xe501('0x14')](_0x171bf0[_0xe501('0x15')])){var _0x27f13f={'method':_0xe501('0xb'),'uri':_0x34598f+_0xe501('0x16')+_0x171bf0[_0xe501('0x15')]+'&'+_0xced3b1+'&'+_0x2abe48,'auth':_0x53bc2a,'json':!![]};logger[_0xe501('0xf')]('['+[_0x4c2d76[_0xe501('0x10')]()]+_0xe501('0x17'),_0x27f13f);return rp(_0x27f13f)[_0xe501('0xd')](function(_0x2d3ef6){logger[_0xe501('0xf')]('['+[_0x4c2d76[_0xe501('0x10')]()]+_0xe501('0x18'),_0x2d3ef6);if(_0x2d3ef6[_0xe501('0x19')][_0xe501('0x1a')]>0x0&&String(_0x2d3ef6[_0xe501('0x19')][0x0][_0xe501('0x1b')])==='true'){_0x171bf0['userId']=_0x2d3ef6[_0xe501('0x19')][0x0][_0xe501('0x1c')];}else{_0x171bf0['userId']=_0x171bf0['adminId'];_0x171bf0[_0xe501('0x15')]=_0x171bf0['adminEmail'];}logger['info']('['+[_0x4c2d76['toUpperCase']()]+_0xe501('0x1d'),_0x171bf0);_0x581e7c(_0x171bf0);})[_0xe501('0x11')](function(_0x251b65){logger[_0xe501('0x1e')]('['+[_0x4c2d76[_0xe501('0x10')]()]+']',_0x251b65[_0xe501('0x12')]);_0x21047e(_0x251b65[_0xe501('0x12')]);});}else{logger[_0xe501('0xf')]('['+[_0x4c2d76[_0xe501('0x10')]()]+']\x20using\x20admin\x20profile');_0x171bf0['userId']=_0x171bf0[_0xe501('0xe')];_0x171bf0[_0xe501('0x15')]=_0x171bf0[_0xe501('0x1f')];_0x581e7c(_0x171bf0);}});};}function createEndUser(_0x2e30e2,_0x590161,_0x455b03,_0x50f548,_0x3b06f7){logger['info']('['+[_0x2e30e2[_0xe501('0x10')]()]+_0xe501('0x20'),_0x455b03);return new Promise(function(_0x126ca6,_0x5737df){var _0x34a1db={'method':_0xe501('0x21'),'uri':_0x50f548+'sys_user?'+_0x3b06f7,'body':{'user_name':_0x455b03['endUserNumber'],'roles':_0xe501('0x22'),'first_name':_0x455b03[_0xe501('0x23')],'active':'true','date_format':_0xe501('0x24'),'phone':_0x455b03[_0xe501('0x23')]},'auth':_0x590161,'json':!![]};return rp(_0x34a1db)['then'](function(_0x215368){logger[_0xe501('0xf')]('['+[_0x2e30e2[_0xe501('0x10')]()]+_0xe501('0x25'),_0x215368[_0xe501('0x19')]);_0x455b03['endUserId']=_0x215368[_0xe501('0x19')][_0xe501('0x1c')];_0x126ca6(_0x455b03);})[_0xe501('0x11')](function(_0x35c9e5){logger[_0xe501('0x1e')]('['+[_0x2e30e2[_0xe501('0x10')]()]+']',_0x35c9e5[_0xe501('0x12')]);_0x5737df(_0x35c9e5['message']);});});}function getEndUser(_0x5dd941,_0xa56719,_0x3dd66a,_0x44d9a6,_0xa5c5d1){return function(_0x3b6406){logger[_0xe501('0xf')]('['+[_0x5dd941[_0xe501('0x10')]()]+_0xe501('0x26'),_0x3b6406);return new Promise(function(_0x8715d6,_0x23e512){var _0xad6e8c={'method':_0xe501('0xb'),'uri':_0x3dd66a+_0xe501('0x27')+_0x3b6406[_0xe501('0x23')]+'&'+_0x44d9a6+'&'+_0xa5c5d1,'auth':_0xa56719,'json':!![]};return rp(_0xad6e8c)[_0xe501('0xd')](function(_0x536af7){if(_0x536af7[_0xe501('0x19')][_0xe501('0x1a')]>0x0){_0x3b6406[_0xe501('0x28')]=_0x536af7['result'][0x0]['sys_id'];logger[_0xe501('0xf')]('['+[_0x5dd941[_0xe501('0x10')]()]+_0xe501('0x29'),_0x3b6406);_0x8715d6(_0x3b6406);}else{return createEndUser(_0x5dd941,_0xa56719,_0x3b6406,_0x3dd66a,_0x44d9a6)[_0xe501('0xd')](function(_0x458461){logger['info']('['+[_0x5dd941[_0xe501('0x10')]()]+_0xe501('0x2a'),_0x458461);_0x8715d6(_0x458461);});}})['catch'](function(_0x423270){logger[_0xe501('0x1e')]('['+[_0x5dd941['toUpperCase']()]+']',_0x423270[_0xe501('0x12')]);_0x23e512(_0x423270[_0xe501('0x12')]);});});};}function getCustomFields(_0xc2f20c,_0x11f38e){var _0x30157f={};if(_0xc2f20c[_0xe501('0x1a')]>0x0){_['forEach'](_0xc2f20c,function(_0xe79783){if(_[_0xe501('0x2b')]([_0xe501('0x2c'),_0xe501('0x2d')],_0xe79783[_0xe501('0x2e')])&&_0xe79783[_0xe501('0x2f')]&&!_0xe79783[_0xe501('0x30')]){_0x30157f[_0xe79783[_0xe501('0x2f')][_0xe501('0x31')]()]=_0xe79783[_0xe501('0x32')][_0xe501('0x33')]();}else if(_[_0xe501('0x2b')]([_0xe501('0x2c'),_0xe501('0x2d')],_0xe79783[_0xe501('0x2e')])&&_0xe79783[_0xe501('0x34')]&&_0xe79783[_0xe501('0x30')]){_0x30157f[_0xe79783[_0xe501('0x34')]['toLowerCase']()]=_0xe79783[_0xe501('0x32')][_0xe501('0x33')]();}else if(_0xe79783['type']==='variable'&&_0xe79783[_0xe501('0x35')]&&_0xe79783[_0xe501('0x34')]&&_0xe79783[_0xe501('0x30')]){_0x30157f[_0xe79783[_0xe501('0x34')][_0xe501('0x31')]()]=_0x11f38e[_0xe79783[_0xe501('0x35')]][_0xe501('0x33')]();}else if(_0xe79783[_0xe501('0x2e')]===_0xe501('0x36')&&_0xe79783[_0xe501('0x37')]&&_0xe79783[_0xe501('0x37')]['name']&&_0xe79783[_0xe501('0x34')]&&_0xe79783[_0xe501('0x30')]){_0x30157f[_0xe79783['idField'][_0xe501('0x31')]()]=_0x11f38e[_0xe79783[_0xe501('0x37')][_0xe501('0x38')][_0xe501('0x31')]()]['toString']();}});}return _0x30157f;}function getTicket(_0x392967,_0x4f35e0,_0x464882,_0x41a2d3,_0x276c8a,_0x1cdc78){return function(_0x40f515){logger[_0xe501('0xf')]('['+[_0x392967[_0xe501('0x10')]()]+_0xe501('0x39'),_0x40f515);return new Promise(function(_0xb8f0fe,_0x69a224){var _0x720a01=_0x392967['toLowerCase']()===_0xe501('0x3a')?_0x40f515[_0xe501('0x3b')]:_0x40f515[_0xe501('0x28')];var _0x26f961={'method':_0xe501('0x21'),'uri':_0x464882+'incident'+'?'+_0x1cdc78,'body':Object[_0xe501('0x3c')]({},{'active':_0xe501('0x3d'),'caller_id':_0x720a01,'assigned_to':_0x40f515['userId'],'short_description':intUtil[_0xe501('0x3e')](_0x41a2d3['Subjects'],_0x276c8a,'\x20'),'description':intUtil[_0xe501('0x3e')](_0x41a2d3[_0xe501('0x3f')],_0x276c8a,'\x0a')},getCustomFields(_0x41a2d3['Fields'],_0x276c8a)),'auth':_0x4f35e0,'json':!![]};return rp(_0x26f961)[_0xe501('0xd')](function(_0xbf9fd4){logger['info']('['+[_0x392967[_0xe501('0x10')]()]+_0xe501('0x40'),_0xbf9fd4[_0xe501('0x19')]);_0x40f515['ticketId']=_0xbf9fd4[_0xe501('0x19')][_0xe501('0x1c')];_0x40f515['ticketNumber']=_0xbf9fd4['result']['number'];logger[_0xe501('0xf')]('['+[_0x392967[_0xe501('0x10')]()]+_0xe501('0x41'),_0x40f515);_0xb8f0fe(_0x40f515);})[_0xe501('0x11')](function(_0x28e473){logger['error']('['+[_0x392967[_0xe501('0x10')]()]+']',_0x28e473[_0xe501('0x12')]);_0x69a224(_0x28e473[_0xe501('0x12')]);});});};}function createRemoteTag(_0x2a3280,_0x5c2ef9,_0xd24857,_0x1631bd){return new Promise(function(_0x5871e2,_0x486db9){var _0x18a4fa={'method':'POST','uri':_0xd24857+_0xe501('0x42')+'?'+_0x1631bd,'body':{'short_description':_0x2a3280,'global':!![],'active':!![],'name':_0x2a3280},'auth':_0x5c2ef9,'json':!![]};return rp(_0x18a4fa)[_0xe501('0xd')](function(_0x32a939){var _0x1108a6=_0x32a939[_0xe501('0x19')][_0xe501('0x1c')];_0x5871e2(_0x1108a6);});});}function getRemoteTag(_0x4e6bb7,_0xbf53f9,_0x13bbda,_0x4185b1,_0x984437){return new Promise(function(_0x3e327d,_0x28a359){var _0x5568fd={'method':_0xe501('0xb'),'uri':_0x13bbda+_0xe501('0x42')+_0xe501('0x43')+_0x4e6bb7+'&'+_0x4185b1,'auth':_0xbf53f9,'json':!![]};return rp(_0x5568fd)[_0xe501('0xd')](function(_0x22c306){if(_0x22c306['result'][_0xe501('0x1a')]>0x0){var _0x266979=_0x22c306[_0xe501('0x19')][0x0][_0xe501('0x1c')];_0x3e327d(_0x266979);}else{return createRemoteTag(_0x4e6bb7,_0xbf53f9,_0x13bbda,_0x4185b1)['then'](function(_0x42b70b){_0x3e327d(_0x42b70b);});}});});}function assignTagToIncident(_0x4fab4d,_0x4c1fdd,_0x16e1d9,_0x480e1d,_0x3c9e0b){return new Promise(function(_0x3bbc14,_0x419255){var _0x4f25f7={'method':_0xe501('0x21'),'uri':_0x16e1d9+_0xe501('0x44')+'?'+_0x3c9e0b,'body':{'label':_0x4fab4d,'table':_0xe501('0x45'),'id_type':_0xe501('0x46'),'table_key':_0x480e1d[_0xe501('0x47')],'title':_0xe501('0x48')+_0x480e1d[_0xe501('0x49')],'id_display':_0x480e1d['ticketNumber']},'auth':_0x4c1fdd,'json':!![]};return rp(_0x4f25f7)['then'](function(_0x21eb00){_0x3bbc14();})[_0xe501('0x11')](function(){_0x3bbc14();});});}function manageTags(_0x1dbc5b,_0x4b864b,_0x4ee6fd,_0x5a2bf8,_0xb06bf1,_0x21f887,_0xa66fdc){return new Promise(function(_0x2588ce,_0x38922d){var _0x5ccbbd=[];_0x4b864b[_0xe501('0x4a')](function(_0x35c0ee){_0x5ccbbd[_0xe501('0x4b')](getRemoteTag(_0x35c0ee,_0x4ee6fd,_0x5a2bf8,_0x21f887,_0xa66fdc));});return Promise[_0xe501('0x4c')](_0x5ccbbd)[_0xe501('0xd')](function(_0x23b70c){if(_0x23b70c[_0xe501('0x1a')]){logger[_0xe501('0xf')]('['+[_0x1dbc5b[_0xe501('0x10')]()]+_0xe501('0x4d'),_0x23b70c);var _0x17e37d=[];_0x23b70c[_0xe501('0x4a')](function(_0x231d72){_0x17e37d[_0xe501('0x4b')](assignTagToIncident(_0x231d72,_0x4ee6fd,_0x5a2bf8,_0xb06bf1,_0x21f887));});return Promise['all'](_0x17e37d)['then'](function(){_0x2588ce();})['catch'](function(){_0x2588ce();});}else{_0x2588ce();}});});}function getTags(_0x17bd62,_0x34bd67,_0x554c04,_0x5206ce,_0x4a23f5,_0x57f936){return function(_0x1649b){return new Promise(function(_0xc9f3bd,_0xd8e05e){var _0xc33744=[];var _0x3de739=_0x5206ce['Tags'];if(_0x3de739&&_0x3de739['length']>0x0){_0xc33744=_[_0xe501('0x4e')](_0x3de739,_0xe501('0x38'));}if(_0xc33744['length']>0x0){return manageTags(_0x17bd62,_0xc33744,_0x34bd67,_0x554c04,_0x1649b,_0x4a23f5,_0x57f936)[_0xe501('0xd')](function(){_0xc9f3bd(_0x1649b);});}else{_0xc9f3bd(_0x1649b);}});};}function emit(_0x328c1,_0xfcf8fa,_0xddbd94){var _0x554c13=_0xe501('0x4f')+_0xe501('0x50')+_0xe501('0x51')+_0xe501('0x52');var _0x1e5100={'uri':_0x328c1+_0xe501('0x53')+_0xddbd94+_0x554c13};io['to'](util[_0xe501('0x54')](_0xe501('0x55'),_0xfcf8fa))[_0xe501('0x56')](_0xe501('0x57'),_0x1e5100);}exports['cs']=function(_0x1d60dc,_0x1350c0,_0x25b8b7,_0x159c1a,_0x502f30,_0x39dd02,_0x2b4d4a,_0x4b8d91){var _0x4b952c={};var _0x5ee967={'user':_0x39dd02[_0xe501('0x58')],'pass':_0x39dd02['password']};var _0x5f3be8=_0xe501('0x59');var _0x4793ad=_0xe501('0x5a');_0x39dd02[_0xe501('0x5b')]=intUtil[_0xe501('0x5c')](_0x39dd02['remoteUri']);_0x39dd02[_0xe501('0x5d')]=intUtil['stripTrailingSlash'](_0x39dd02[_0xe501('0x5d')]);var _0x483314=util[_0xe501('0x54')](_0xe501('0x5e'),_0x39dd02[_0xe501('0x5b')]);_0x4b952c[_0xe501('0x15')]=!_[_0xe501('0x5f')](_0x159c1a)?_0x159c1a[_0xe501('0x60')]:null;_0x4b952c[_0xe501('0x1f')]=_0x39dd02[_0xe501('0x60')];_0x4b952c[_0xe501('0x23')]=_0x4b8d91[_0xe501('0x31')]()===_0xe501('0x3a')?_0x1350c0[_0xe501('0x61')]:_0x1350c0['calleridnum'];_0x4b952c['callDirection']=_0x4b8d91===_0xe501('0x62')||_0x4b8d91===_0xe501('0x63')?'queue':_0xe501('0x3a');var _0x1a4758=util[_0xe501('0x54')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x39dd02[_0xe501('0x5d')],_0x1350c0[_0xe501('0x64')],md5(_0x1350c0['uniqueid']));if(_0x502f30&&_0x502f30[_0xe501('0x65')]){logger[_0xe501('0xf')](_0xe501('0x66'),'Recording\x20is\x20enabled!');_0x1350c0[_0xe501('0x67')]=_0x1a4758;}else if(_0x2b4d4a&&_0x2b4d4a[_0xe501('0x68')]&&_0x2b4d4a['recordingFormat']!==_0xe501('0x69')){logger['info'](_0xe501('0x6a'),'Recording\x20is\x20enabled!');_0x1350c0['recordingURL']=_0x1a4758;}else{_0x1350c0[_0xe501('0x67')]='';}return getAdminUser(_0x4b8d91,_0x5ee967,_0x4b952c,_0x483314,_0x4793ad,_0x5f3be8)['then'](getUser(_0x4b8d91,_0x5ee967,_0x483314,_0x4793ad,_0x5f3be8))[_0xe501('0xd')](getEndUser(_0x4b8d91,_0x5ee967,_0x483314,_0x4793ad,_0x5f3be8))[_0xe501('0xd')](getTicket(_0x4b8d91,_0x5ee967,_0x483314,_0x25b8b7,_0x1350c0,_0x4793ad))['then'](function(_0xb42bc3){logger[_0xe501('0xf')](util['format'](_0xe501('0x6b'),_0xb42bc3[_0xe501('0x47')]));logger[_0xe501('0xf')](util[_0xe501('0x54')]('call\x20direction:\x20%s',_0x4b8d91));if(_0x4b8d91!==_0xe501('0x63')){logger['info']('['+[_0x4b8d91[_0xe501('0x10')]()]+']','Displaying\x20call\x20in\x20a\x20new\x20tab...');emit(_0x39dd02['remoteUri'],_0x159c1a[_0xe501('0x38')],_0xb42bc3['ticketId']);}})['catch'](function(_0x388857){logger['error']('['+[_0x4b8d91[_0xe501('0x10')]()]+']\x20Error\x20running\x20ServiceNow\x20integration',util[_0xe501('0x6c')](_0x388857,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
index 8e4d6af..0d6d7ab 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3607=['duration_minutes','parent_id','parent_type','Contacts','parent_name','length','forEach','variableName','idField','set_entry','JSON','stringify','format','Basic\x20%s','apiKey','toString','base64','get_server_info','isNil','Getting\x20agent\x20with\x20name','Employees','INSTR\x20(\x20users.user_name,\x20\x22%s\x22)\x20>\x200','name','user_name','then','entry_list','find','value','Agent\x20found!','resolve','name_value_list','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','user_id','Agent\x20not\x20available,\x20using\x20the\x20admin\x20account!','Searching\x20enduser\x20with\x20phone','get_entry_list','contacts.phone_home\x20=\x20\x22%s\x22','phone_home','Enduser\x20found!','first_name','Enduser\x20created.','debug','[HTTP]','merge','type','string','customField','nameField','toLowerCase','push','content','variable','custom_fields','Variable','login','username','password','PLAIN','xCALLY\x20Motion\x20integration','sessionID','Account\x20%d\x20is\x20not\x20valid','set_relationship','queue','stripTrailingSlash','serverUrl','uri','%s/service/v4_1/rest.php','remoteUri','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','uniqueid','calleridnum','The\x20Enduser\x20ID\x20is:','Fields','Inbound','The\x20Ticket\x20ID\x20is:','users','charAt','%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s','%s/#bwc/index.php?module=Calls&action=EditView&record=%s','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','catch','outbound','recordingFormat','none','[OUTBOUND]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','The\x20User\x20ID\x20is:','destcalleridname','destcalleridnum','Outbound','Ticket\x20created!','version','user:%s','trigger:browser:url','error','toUpperCase','lastevent','lodash','request-promise','bluebird','md5','util','../../../../config/environment','../../../../config/logger','sugarcrm','defaults','redis','localhost','socket.io-emitter','POST','emit','info','Creating\x20new\x20ticket...','getString','created_by','description','Descriptions','date_start','toISOString','slice','replace','duration_hours'];(function(_0x976e42,_0x2a5e83){var _0x450176=function(_0x315a35){while(--_0x315a35){_0x976e42['push'](_0x976e42['shift']());}};_0x450176(++_0x2a5e83);}(_0x3607,0xe1));var _0x7360=function(_0x2c5d33,_0x5228a9){_0x2c5d33=_0x2c5d33-0x0;var _0xaa8192=_0x3607[_0x2c5d33];return _0xaa8192;};'use strict';var _=require(_0x7360('0x0'));var rp=require(_0x7360('0x1'));var BPromise=require(_0x7360('0x2'));var md5=require(_0x7360('0x3'));var util=require(_0x7360('0x4'));var Redis=require('ioredis');var intUtil=require('./util');var config=require(_0x7360('0x5'));var logger=require(_0x7360('0x6'))(_0x7360('0x7'));config['redis']=_[_0x7360('0x8')](config[_0x7360('0x9')],{'host':_0x7360('0xa'),'port':0x18eb});var io=require(_0x7360('0xb'))(new Redis(config[_0x7360('0x9')]));var def={'method':_0x7360('0xc'),'json':!![]};function emit(_0x4828a2,_0x137015,_0x98aa3a){io['to'](_0x4828a2)[_0x7360('0xd')](_0x137015,_0x98aa3a);}function getTicket(_0x56422b,_0x42cad7,_0x41b635,_0x2b2520,_0x2143cc,_0x58a4b8,_0x1dcff8,_0x16db2b){logger[_0x7360('0xe')](_0x7360('0xf'));var _0x5825ba=new Date();var _0x43036b=[{'name':'name','value':intUtil[_0x7360('0x10')](_0x2b2520['Subjects'],_0x2143cc,'\x20')},{'name':'assigned_user_id','value':_0x42cad7['id']},{'name':_0x7360('0x11'),'value':_0x42cad7['id']},{'name':_0x7360('0x12'),'value':intUtil[_0x7360('0x10')](_0x2b2520[_0x7360('0x13')],_0x2143cc,'\x0a')},{'name':_0x7360('0x14'),'value':_0x5825ba[_0x7360('0x15')]()[_0x7360('0x16')](0x0,0x13)[_0x7360('0x17')]('T','\x20')},{'name':_0x7360('0x18'),'value':'0'},{'name':_0x7360('0x19'),'value':'15'},{'name':_0x7360('0x1a'),'value':_0x41b635['id']},{'name':_0x7360('0x1b'),'value':_0x7360('0x1c')},{'name':_0x7360('0x1d'),'value':_0x41b635['name']},{'name':'direction','value':_0x16db2b}];if(_0x58a4b8[_0x7360('0x1e')]){_[_0x7360('0x1f')](_0x58a4b8,function(_0x41b7fc){if(_0x2143cc[_0x41b7fc[_0x7360('0x20')]]){_0x43036b['push']({'name':_0x41b7fc[_0x7360('0x21')],'value':_0x2143cc[_0x41b7fc[_0x7360('0x20')]]});}});}return request({'form':{'method':_0x7360('0x22'),'input_type':_0x7360('0x23'),'response_type':_0x7360('0x23'),'rest_data':JSON[_0x7360('0x24')]({'session':_0x1dcff8['id'],'module_name':'Calls','name_value_list':_0x43036b})}});}function getAuth(_0x5403d6){return util[_0x7360('0x25')](_0x7360('0x26'),new Buffer(_0x5403d6[_0x7360('0x27')]+':X')[_0x7360('0x28')](_0x7360('0x29')));}function getServerInfo(_0x3a585d){return request({'form':{'method':_0x7360('0x2a'),'input_type':'JSON','response_type':_0x7360('0x23'),'rest_data':JSON[_0x7360('0x24')]({'session':_0x3a585d['id']})}});}function getUser(_0x34df4b,_0x25d97d,_0x453daf){if(!_[_0x7360('0x2b')](_0x25d97d)){logger[_0x7360('0xe')](_0x7360('0x2c'),_0x25d97d);return request({'form':{'method':'get_entry_list','input_type':'JSON','response_type':_0x7360('0x23'),'rest_data':JSON[_0x7360('0x24')]({'session':_0x453daf['id'],'module_name':_0x7360('0x2d'),'query':util[_0x7360('0x25')](_0x7360('0x2e'),_0x25d97d),'order_by':'','offset':'0','select_fields':['id',_0x7360('0x2f'),_0x7360('0x30')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0x7360('0x31')](function(_0x5eb110){if(_0x5eb110[_0x7360('0x32')][_0x7360('0x1e')]){var _0xe92e2c=_[_0x7360('0x33')](_0x5eb110[_0x7360('0x32')],function(_0x65d991){return _0x65d991['name_value_list']['user_name'][_0x7360('0x34')]===_0x25d97d;});if(_0xe92e2c){logger[_0x7360('0xe')](_0x7360('0x35'));return BPromise[_0x7360('0x36')]({'id':_0xe92e2c[_0x7360('0x37')]['id'][_0x7360('0x34')],'name':_0xe92e2c[_0x7360('0x37')]['name']['value']});}}logger['info'](_0x7360('0x38'));return BPromise[_0x7360('0x36')]({'id':_0x453daf[_0x7360('0x37')][_0x7360('0x39')][_0x7360('0x34')],'name':_0x453daf[_0x7360('0x37')][_0x7360('0x30')]['value']});});}else{logger[_0x7360('0xe')](_0x7360('0x3a'));return BPromise[_0x7360('0x36')]({'id':_0x453daf[_0x7360('0x37')][_0x7360('0x39')][_0x7360('0x34')],'name':_0x453daf[_0x7360('0x37')][_0x7360('0x30')]['value']});}}function getEndUser(_0x2d0e55,_0x5d74fa,_0x1f4b99,_0x5822cd){logger['info'](_0x7360('0x3b'),_0x1f4b99);return request({'form':{'method':_0x7360('0x3c'),'input_type':'JSON','response_type':_0x7360('0x23'),'rest_data':JSON[_0x7360('0x24')]({'session':_0x5822cd['id'],'module_name':_0x7360('0x1c'),'query':util['format'](_0x7360('0x3d'),_0x1f4b99),'order_by':'','offset':'0','select_fields':['id','name',_0x7360('0x3e')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0x7360('0x31')](function(_0x19999d){if(_0x19999d[_0x7360('0x32')][_0x7360('0x1e')]){var _0x5d6f45=_['find'](_0x19999d['entry_list'],function(_0x27b7df){return _0x27b7df[_0x7360('0x37')][_0x7360('0x3e')][_0x7360('0x34')]===_0x1f4b99;});if(_0x5d6f45){logger[_0x7360('0xe')](_0x7360('0x3f'));return BPromise[_0x7360('0x36')]({'id':_0x5d6f45[_0x7360('0x37')]['id'][_0x7360('0x34')],'name':_0x5d6f45[_0x7360('0x37')][_0x7360('0x2f')][_0x7360('0x34')],'phone':_0x5d6f45[_0x7360('0x37')][_0x7360('0x3e')]['value']});}}else{logger[_0x7360('0xe')]('Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!');return request({'form':{'method':_0x7360('0x22'),'input_type':_0x7360('0x23'),'response_type':_0x7360('0x23'),'rest_data':JSON[_0x7360('0x24')]({'session':_0x5822cd['id'],'module_name':'Contacts','name_value_list':[{'name':_0x7360('0x40'),'value':_0x5d74fa!=='<unknown>'?_0x5d74fa:util[_0x7360('0x25')]('Caller\x20-\x20%s',_0x1f4b99)},{'name':_0x7360('0x3e'),'value':_0x1f4b99}]})}})[_0x7360('0x31')](function(_0x1c5639){logger[_0x7360('0xe')](_0x7360('0x41'));return BPromise[_0x7360('0x36')]({'id':_0x1c5639['id'],'name':_0x1c5639[_0x7360('0x32')][_0x7360('0x40')][_0x7360('0x34')],'phone':_0x1c5639[_0x7360('0x32')][_0x7360('0x3e')][_0x7360('0x34')]});});}});}function request(_0x93321b){logger[_0x7360('0x42')](_0x7360('0x43'),JSON[_0x7360('0x24')](_0x93321b));return rp(_[_0x7360('0x44')](def,_0x93321b));}function getTags(_0x384c6c,_0x48b196){var _0x41cb90=[];if(_0x384c6c&&_0x384c6c[_0x7360('0x1e')]>0x0){_0x41cb90=_['map'](_0x384c6c,_0x48b196);}return _0x41cb90;}function getCustomFields(_0x3a96e2,_0x241641){var _0x1e4ba6=[];var _0x469d66={'custom_fields':[]};if(_0x3a96e2[_0x7360('0x1e')]>0x0){_[_0x7360('0x1f')](_0x3a96e2,function(_0x317aaa){if(_0x317aaa[_0x7360('0x45')]===_0x7360('0x46')&&_0x317aaa['nameField']&&!_0x317aaa[_0x7360('0x47')]){_0x469d66[_0x317aaa[_0x7360('0x48')][_0x7360('0x49')]()]=_0x317aaa['content'][_0x7360('0x28')]();}else if(_0x317aaa['type']===_0x7360('0x46')&&_0x317aaa[_0x7360('0x21')]&&_0x317aaa['customField']){_0x469d66['custom_fields'][_0x7360('0x4a')]({'id':_0x317aaa[_0x7360('0x21')],'value':_0x317aaa[_0x7360('0x4b')][_0x7360('0x28')]()});}else if(_0x317aaa['type']===_0x7360('0x4c')&&_0x317aaa['variableName']&&_0x317aaa[_0x7360('0x21')]&&_0x317aaa[_0x7360('0x47')]){_0x241641[_0x317aaa['variableName']]&&_0x469d66[_0x7360('0x4d')][_0x7360('0x4a')]({'id':_0x317aaa[_0x7360('0x21')],'value':_0x241641[_0x317aaa[_0x7360('0x20')]][_0x7360('0x28')]()});}else if(_0x317aaa[_0x7360('0x45')]==='customVariable'&&_0x317aaa['Variable']&&_0x317aaa[_0x7360('0x4e')][_0x7360('0x2f')]&&_0x317aaa[_0x7360('0x21')]&&_0x317aaa[_0x7360('0x47')]){_0x241641[_0x317aaa['Variable'][_0x7360('0x2f')][_0x7360('0x49')]()]&&_0x469d66[_0x7360('0x4d')]['push']({'id':_0x317aaa[_0x7360('0x21')],'value':_0x241641[_0x317aaa[_0x7360('0x4e')][_0x7360('0x2f')]['toLowerCase']()]['toString']()});}});}return _0x469d66;}function getConnection(_0x2f5fcd){return request({'method':_0x7360('0xc'),'form':{'method':_0x7360('0x4f'),'input_type':_0x7360('0x23'),'response_type':_0x7360('0x23'),'rest_data':JSON[_0x7360('0x24')]({'user_auth':{'user_name':_0x2f5fcd[_0x7360('0x50')],'password':_0x2f5fcd[_0x7360('0x51')],'encryption':_0x7360('0x52')},'application':_0x7360('0x53')})}})[_0x7360('0x31')](function(_0x49f6bc){var _0x5ae8c1=_0x49f6bc;if(_0x5ae8c1['id']){def[_0x7360('0x54')]=_0x5ae8c1['id'];return BPromise['resolve'](_0x5ae8c1);}else{throw new Error(util[_0x7360('0x25')](_0x7360('0x55'),_0x2f5fcd['id']));}});}function setRelationship(_0x1b380d,_0x3c515f,_0xb47e07,_0x5e8fe9){return request({'form':{'method':_0x7360('0x56'),'input_type':_0x7360('0x23'),'response_type':_0x7360('0x23'),'rest_data':JSON[_0x7360('0x24')]({'session':_0x1b380d['id'],'module_name':'Calls','module_id':_0xb47e07['id'],'link_field_name':_0x5e8fe9,'related_ids':[_0x3c515f['id']],'name_value_list':[],'delete':0x0})}});}exports[_0x7360('0x57')]=function(_0x4702bd,_0x42163c,_0x5a1a44,_0x25d9ed,_0x41a58a,_0x130fa5){var _0x123b4f,_0x5f10a5,_0xa7961f,_0x4134b5;_0x130fa5['remoteUri']=intUtil[_0x7360('0x58')](_0x130fa5['remoteUri']);_0x130fa5['serverUrl']=intUtil[_0x7360('0x58')](_0x130fa5[_0x7360('0x59')]);def[_0x7360('0x5a')]=util['format'](_0x7360('0x5b'),_0x130fa5[_0x7360('0x5c')]);if(_0x41a58a&&_0x41a58a[_0x7360('0x5d')]){logger[_0x7360('0xe')](_0x7360('0x5e'),_0x7360('0x5f'));_0x42163c[_0x7360('0x60')]=util[_0x7360('0x25')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x130fa5[_0x7360('0x59')],_0x42163c[_0x7360('0x61')],md5(_0x42163c[_0x7360('0x61')]));}else{_0x42163c[_0x7360('0x60')]='';}return getConnection(_0x130fa5)[_0x7360('0x31')](function(_0x21f60d){_0x4134b5=_0x21f60d;return getUser(_0x130fa5,_0x25d9ed['name'],_0x4134b5);})['then'](function(_0x26775e){_0x123b4f=_0x26775e;logger['info']('The\x20User\x20ID\x20is:',_0x123b4f['id']);return getEndUser(_0x130fa5,_0x42163c['calleridname'],_0x42163c[_0x7360('0x62')],_0x4134b5);})[_0x7360('0x31')](function(_0x4ef4c4){_0x5f10a5=_0x4ef4c4;logger[_0x7360('0xe')](_0x7360('0x63'),_0x5f10a5['id']);return getTicket(_0x130fa5,_0x123b4f,_0x5f10a5,_0x5a1a44,_0x42163c,_0x5a1a44[_0x7360('0x64')],_0x4134b5,_0x7360('0x65'));})[_0x7360('0x31')](function(_0x57798c){_0xa7961f=_0x57798c;logger[_0x7360('0xe')]('Ticket\x20created!');logger['info'](_0x7360('0x66'),_0xa7961f['id']);return setRelationship(_0x4134b5,_0x123b4f,_0xa7961f,_0x7360('0x67'));})[_0x7360('0x31')](function(){return setRelationship(_0x4134b5,_0x5f10a5,_0xa7961f,'contacts');})[_0x7360('0x31')](function(){return getServerInfo(_0x4134b5);})[_0x7360('0x31')](function(_0x4369e7){var _0x5155d4=parseInt(_0x4369e7['version'][_0x7360('0x68')](0x0));var _0x15fe4e=util[_0x7360('0x25')](_0x7360('0x69'),_0x130fa5[_0x7360('0x5c')],_0xa7961f['id']);if(_0x5155d4>0x6){_0x15fe4e=util[_0x7360('0x25')](_0x7360('0x6a'),_0x130fa5['remoteUri'],_0xa7961f['id']);}logger['info'](_0x7360('0x5e'),_0x7360('0x6b'));emit(util[_0x7360('0x25')]('user:%s',_0x25d9ed[_0x7360('0x2f')]),'trigger:browser:url',{'uri':_0x15fe4e});})[_0x7360('0x6c')](function(_0x465fcd){logger['error'](_0x7360('0x5e'),JSON[_0x7360('0x24')](_0x465fcd));});};exports[_0x7360('0x6d')]=function(_0x18e18c,_0x7f7b31,_0x39e0a3,_0x3bd7ad,_0xff8010,_0x554edf,_0x582bc1){var _0x109ce4,_0x1cf7df,_0x386b01,_0xf3d334;_0x554edf[_0x7360('0x5c')]=intUtil[_0x7360('0x58')](_0x554edf[_0x7360('0x5c')]);_0x554edf['serverUrl']=intUtil['stripTrailingSlash'](_0x554edf['serverUrl']);def[_0x7360('0x5a')]=util[_0x7360('0x25')](_0x7360('0x5b'),_0x554edf['remoteUri']);if(_0x582bc1&&_0x582bc1[_0x7360('0x6e')]&&_0x582bc1['recordingFormat']!==_0x7360('0x6f')){logger[_0x7360('0xe')](_0x7360('0x70'),_0x7360('0x5f'));_0x7f7b31[_0x7360('0x60')]=util[_0x7360('0x25')](_0x7360('0x71'),_0x554edf[_0x7360('0x59')],_0x7f7b31['uniqueid'],md5(_0x7f7b31['uniqueid']));}return getConnection(_0x554edf)[_0x7360('0x31')](function(_0x2bc983){_0xf3d334=_0x2bc983;return getUser(_0x554edf,_0x3bd7ad[_0x7360('0x2f')],_0xf3d334);})['then'](function(_0x3ba8ca){_0x109ce4=_0x3ba8ca;logger[_0x7360('0xe')](_0x7360('0x72'),_0x109ce4['id']);return getEndUser(_0x554edf,_0x7f7b31[_0x7360('0x73')],_0x7f7b31[_0x7360('0x74')],_0xf3d334);})[_0x7360('0x31')](function(_0x4671cd){_0x1cf7df=_0x4671cd;logger[_0x7360('0xe')](_0x7360('0x63'),_0x1cf7df['id']);return getTicket(_0x554edf,_0x109ce4,_0x1cf7df,_0x39e0a3,_0x7f7b31,_0x39e0a3['Fields'],_0xf3d334,_0x7360('0x75'));})['then'](function(_0x145c46){_0x386b01=_0x145c46;logger[_0x7360('0xe')](_0x7360('0x76'));logger[_0x7360('0xe')](_0x7360('0x66'),_0x386b01['id']);return setRelationship(_0xf3d334,_0x109ce4,_0x386b01,_0x7360('0x67'));})[_0x7360('0x31')](function(){return setRelationship(_0xf3d334,_0x1cf7df,_0x386b01,'contacts');})[_0x7360('0x31')](function(){return getServerInfo(_0xf3d334);})[_0x7360('0x31')](function(_0x12bdac){var _0xcdc80c=parseInt(_0x12bdac[_0x7360('0x77')][_0x7360('0x68')](0x0));var _0x4874e8=util['format'](_0x7360('0x69'),_0x554edf[_0x7360('0x5c')],_0x386b01['id']);if(_0xcdc80c>0x6){_0x4874e8=util[_0x7360('0x25')](_0x7360('0x6a'),_0x554edf[_0x7360('0x5c')],_0x386b01['id']);}logger['info']('[OUTBOUND]','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x7360('0x25')](_0x7360('0x78'),_0x3bd7ad['name']),_0x7360('0x79'),{'uri':_0x4874e8});})['catch'](function(_0x4ff835){logger[_0x7360('0x7a')](_0x7360('0x70'),JSON[_0x7360('0x24')](_0x4ff835));});};exports['unmanaged']=function(_0x28135a,_0x43ce28,_0x1d4cc8,_0xe003fb,_0x279d6d,_0x5940fd){var _0x139274,_0x4b7ccd,_0x3d7df2,_0x2e5b64;_0x5940fd[_0x7360('0x5c')]=intUtil[_0x7360('0x58')](_0x5940fd[_0x7360('0x5c')]);_0x5940fd[_0x7360('0x59')]=intUtil[_0x7360('0x58')](_0x5940fd['serverUrl']);def[_0x7360('0x5a')]=util[_0x7360('0x25')]('%s/service/v4_1/rest.php',_0x5940fd[_0x7360('0x5c')]);if(_0x279d6d&&_0x279d6d[_0x7360('0x5d')]){logger[_0x7360('0xe')]('['+_0x43ce28['lastevent'][_0x7360('0x7b')]()+']',_0x7360('0x5f'));_0x43ce28[_0x7360('0x60')]=util['format'](_0x7360('0x71'),_0x5940fd[_0x7360('0x59')],_0x43ce28[_0x7360('0x61')],md5(_0x43ce28[_0x7360('0x61')]));}else{_0x43ce28['recordingURL']='';}return getConnection(_0x5940fd)['then'](function(_0x118ad7){_0x2e5b64=_0x118ad7;if(!_[_0x7360('0x2b')](_0xe003fb)){return getUser(_0x5940fd,_0xe003fb['name'],_0x2e5b64);}else{return getUser(_0x5940fd,null,_0x2e5b64);}})[_0x7360('0x31')](function(_0x1fda83){_0x139274=_0x1fda83;logger[_0x7360('0xe')](_0x7360('0x72'),_0x139274['id']);return getEndUser(_0x5940fd,_0x43ce28['calleridname'],_0x43ce28[_0x7360('0x62')],_0x2e5b64);})[_0x7360('0x31')](function(_0x3b6a0d){_0x4b7ccd=_0x3b6a0d;logger['info']('The\x20Enduser\x20ID\x20is:',_0x4b7ccd['id']);return getTicket(_0x5940fd,_0x139274,_0x4b7ccd,_0x1d4cc8,_0x43ce28,_0x1d4cc8['Fields'],_0x2e5b64,_0x7360('0x65'));})['then'](function(_0xeafd98){_0x3d7df2=_0xeafd98;logger[_0x7360('0xe')](_0x7360('0x76'));logger['info'](_0x7360('0x66'),_0x3d7df2['id']);return setRelationship(_0x2e5b64,_0x139274,_0x3d7df2,'users');})[_0x7360('0x31')](function(){return setRelationship(_0x2e5b64,_0x4b7ccd,_0x3d7df2,'contacts');})[_0x7360('0x31')](function(){return getServerInfo(_0x2e5b64);})[_0x7360('0x6c')](function(_0x54e917){logger[_0x7360('0x7a')]('['+_0x43ce28[_0x7360('0x7c')][_0x7360('0x7b')]()+']',JSON[_0x7360('0x24')](_0x54e917));});};
\ No newline at end of file
+var _0xb778=['forEach','string','nameField','customField','toLowerCase','content','custom_fields','type','Variable','POST','login','username','password','PLAIN','sessionID','Account\x20%d\x20is\x20not\x20valid','set_relationship','Calls','remoteUri','stripTrailingSlash','serverUrl','uri','%s/service/v4_1/rest.php','monitor_format','[QUEUE]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','Fields','Inbound','The\x20Ticket\x20ID\x20is:','users','contacts','version','charAt','%s/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DCalls%26action%3DEditView%26record%3D%s','%s/#bwc/index.php?module=Calls&action=EditView&record=%s','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','error','outbound','recordingFormat','[OUTBOUND]','Recording\x20is\x20enabled!','destcalleridnum','Outbound','Ticket\x20created!','catch','unmanaged','lastevent','isNil','toUpperCase','lodash','request-promise','bluebird','md5','util','../../../../config/logger','sugarcrm','redis','defaults','localhost','socket.io-emitter','info','Creating\x20new\x20ticket...','name','getString','assigned_user_id','created_by','description','Descriptions','date_start','toISOString','slice','replace','duration_hours','duration_minutes','parent_id','Contacts','parent_name','direction','variableName','push','idField','JSON','stringify','Basic\x20%s','apiKey','toString','get_server_info','get_entry_list','Employees','format','INSTR\x20(\x20users.user_name,\x20\x22%s\x22)\x20>\x200','then','entry_list','length','find','value','resolve','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','name_value_list','user_id','user_name','Agent\x20not\x20available,\x20using\x20the\x20admin\x20account!','Searching\x20enduser\x20with\x20phone','contacts.phone_home\x20=\x20\x22%s\x22','phone_home','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','set_entry','first_name','<unknown>','Enduser\x20created.','[HTTP]','merge','map'];(function(_0x187399,_0x40c56d){var _0x40fa92=function(_0x36058c){while(--_0x36058c){_0x187399['push'](_0x187399['shift']());}};_0x40fa92(++_0x40c56d);}(_0xb778,0x1a7));var _0x8b77=function(_0x549fb4,_0x57140c){_0x549fb4=_0x549fb4-0x0;var _0xc64c37=_0xb778[_0x549fb4];return _0xc64c37;};'use strict';var _=require(_0x8b77('0x0'));var rp=require(_0x8b77('0x1'));var BPromise=require(_0x8b77('0x2'));var md5=require(_0x8b77('0x3'));var util=require(_0x8b77('0x4'));var Redis=require('ioredis');var intUtil=require('./util');var config=require('../../../../config/environment');var logger=require(_0x8b77('0x5'))(_0x8b77('0x6'));config[_0x8b77('0x7')]=_[_0x8b77('0x8')](config[_0x8b77('0x7')],{'host':_0x8b77('0x9'),'port':0x18eb});var io=require(_0x8b77('0xa'))(new Redis(config[_0x8b77('0x7')]));var def={'method':'POST','json':!![]};function emit(_0x51bb89,_0x5c3f38,_0x27ad42){io['to'](_0x51bb89)['emit'](_0x5c3f38,_0x27ad42);}function getTicket(_0x1718e3,_0x341e24,_0x1c7bca,_0x16f991,_0x4e12d9,_0x33e4b7,_0x4cb499,_0x44ab58){logger[_0x8b77('0xb')](_0x8b77('0xc'));var _0x578a5e=new Date();var _0x3a4b02=[{'name':_0x8b77('0xd'),'value':intUtil[_0x8b77('0xe')](_0x16f991['Subjects'],_0x4e12d9,'\x20')},{'name':_0x8b77('0xf'),'value':_0x341e24['id']},{'name':_0x8b77('0x10'),'value':_0x341e24['id']},{'name':_0x8b77('0x11'),'value':intUtil['getString'](_0x16f991[_0x8b77('0x12')],_0x4e12d9,'\x0a')},{'name':_0x8b77('0x13'),'value':_0x578a5e[_0x8b77('0x14')]()[_0x8b77('0x15')](0x0,0x13)[_0x8b77('0x16')]('T','\x20')},{'name':_0x8b77('0x17'),'value':'0'},{'name':_0x8b77('0x18'),'value':'15'},{'name':_0x8b77('0x19'),'value':_0x1c7bca['id']},{'name':'parent_type','value':_0x8b77('0x1a')},{'name':_0x8b77('0x1b'),'value':_0x1c7bca[_0x8b77('0xd')]},{'name':_0x8b77('0x1c'),'value':_0x44ab58}];if(_0x33e4b7['length']){_['forEach'](_0x33e4b7,function(_0x1fd012){if(_0x4e12d9[_0x1fd012[_0x8b77('0x1d')]]){_0x3a4b02[_0x8b77('0x1e')]({'name':_0x1fd012[_0x8b77('0x1f')],'value':_0x4e12d9[_0x1fd012[_0x8b77('0x1d')]]});}});}return request({'form':{'method':'set_entry','input_type':_0x8b77('0x20'),'response_type':_0x8b77('0x20'),'rest_data':JSON[_0x8b77('0x21')]({'session':_0x4cb499['id'],'module_name':'Calls','name_value_list':_0x3a4b02})}});}function getAuth(_0x1150a2){return util['format'](_0x8b77('0x22'),new Buffer(_0x1150a2[_0x8b77('0x23')]+':X')[_0x8b77('0x24')]('base64'));}function getServerInfo(_0x915a04){return request({'form':{'method':_0x8b77('0x25'),'input_type':_0x8b77('0x20'),'response_type':_0x8b77('0x20'),'rest_data':JSON[_0x8b77('0x21')]({'session':_0x915a04['id']})}});}function getUser(_0x3cbd9,_0x1f33e6,_0x57434f){if(!_['isNil'](_0x1f33e6)){logger[_0x8b77('0xb')]('Getting\x20agent\x20with\x20name',_0x1f33e6);return request({'form':{'method':_0x8b77('0x26'),'input_type':_0x8b77('0x20'),'response_type':_0x8b77('0x20'),'rest_data':JSON[_0x8b77('0x21')]({'session':_0x57434f['id'],'module_name':_0x8b77('0x27'),'query':util[_0x8b77('0x28')](_0x8b77('0x29'),_0x1f33e6),'order_by':'','offset':'0','select_fields':['id','name','user_name'],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})[_0x8b77('0x2a')](function(_0x350084){if(_0x350084[_0x8b77('0x2b')][_0x8b77('0x2c')]){var _0x504c01=_[_0x8b77('0x2d')](_0x350084[_0x8b77('0x2b')],function(_0x439b06){return _0x439b06['name_value_list']['user_name'][_0x8b77('0x2e')]===_0x1f33e6;});if(_0x504c01){logger['info']('Agent\x20found!');return BPromise[_0x8b77('0x2f')]({'id':_0x504c01['name_value_list']['id'][_0x8b77('0x2e')],'name':_0x504c01['name_value_list'][_0x8b77('0xd')][_0x8b77('0x2e')]});}}logger['info'](_0x8b77('0x30'));return BPromise[_0x8b77('0x2f')]({'id':_0x57434f[_0x8b77('0x31')][_0x8b77('0x32')][_0x8b77('0x2e')],'name':_0x57434f[_0x8b77('0x31')][_0x8b77('0x33')][_0x8b77('0x2e')]});});}else{logger[_0x8b77('0xb')](_0x8b77('0x34'));return BPromise[_0x8b77('0x2f')]({'id':_0x57434f[_0x8b77('0x31')][_0x8b77('0x32')][_0x8b77('0x2e')],'name':_0x57434f[_0x8b77('0x31')][_0x8b77('0x33')][_0x8b77('0x2e')]});}}function getEndUser(_0x4d7926,_0x432bcd,_0x186668,_0x13045e){logger['info'](_0x8b77('0x35'),_0x186668);return request({'form':{'method':_0x8b77('0x26'),'input_type':_0x8b77('0x20'),'response_type':_0x8b77('0x20'),'rest_data':JSON[_0x8b77('0x21')]({'session':_0x13045e['id'],'module_name':_0x8b77('0x1a'),'query':util[_0x8b77('0x28')](_0x8b77('0x36'),_0x186668),'order_by':'','offset':'0','select_fields':['id',_0x8b77('0xd'),_0x8b77('0x37')],'link_name_to_fields_array':[],'max_results':-0x1,'deleted':'0'})}})['then'](function(_0x2f10e7){if(_0x2f10e7[_0x8b77('0x2b')]['length']){var _0xa07b81=_[_0x8b77('0x2d')](_0x2f10e7[_0x8b77('0x2b')],function(_0x4783d5){return _0x4783d5['name_value_list'][_0x8b77('0x37')]['value']===_0x186668;});if(_0xa07b81){logger[_0x8b77('0xb')](_0x8b77('0x38'));return BPromise[_0x8b77('0x2f')]({'id':_0xa07b81[_0x8b77('0x31')]['id'][_0x8b77('0x2e')],'name':_0xa07b81[_0x8b77('0x31')][_0x8b77('0xd')][_0x8b77('0x2e')],'phone':_0xa07b81[_0x8b77('0x31')][_0x8b77('0x37')][_0x8b77('0x2e')]});}}else{logger[_0x8b77('0xb')](_0x8b77('0x39'));return request({'form':{'method':_0x8b77('0x3a'),'input_type':'JSON','response_type':_0x8b77('0x20'),'rest_data':JSON[_0x8b77('0x21')]({'session':_0x13045e['id'],'module_name':_0x8b77('0x1a'),'name_value_list':[{'name':_0x8b77('0x3b'),'value':_0x432bcd!==_0x8b77('0x3c')?_0x432bcd:util[_0x8b77('0x28')]('Caller\x20-\x20%s',_0x186668)},{'name':'phone_home','value':_0x186668}]})}})[_0x8b77('0x2a')](function(_0x5b1517){logger[_0x8b77('0xb')](_0x8b77('0x3d'));return BPromise[_0x8b77('0x2f')]({'id':_0x5b1517['id'],'name':_0x5b1517['entry_list'][_0x8b77('0x3b')][_0x8b77('0x2e')],'phone':_0x5b1517['entry_list']['phone_home'][_0x8b77('0x2e')]});});}});}function request(_0x4533ad){logger['debug'](_0x8b77('0x3e'),JSON[_0x8b77('0x21')](_0x4533ad));return rp(_[_0x8b77('0x3f')](def,_0x4533ad));}function getTags(_0x644857,_0x48c5ed){var _0x53225d=[];if(_0x644857&&_0x644857[_0x8b77('0x2c')]>0x0){_0x53225d=_[_0x8b77('0x40')](_0x644857,_0x48c5ed);}return _0x53225d;}function getCustomFields(_0x4ced35,_0x2e40e4){var _0x6332d9=[];var _0x3908a3={'custom_fields':[]};if(_0x4ced35[_0x8b77('0x2c')]>0x0){_[_0x8b77('0x41')](_0x4ced35,function(_0x144564){if(_0x144564['type']===_0x8b77('0x42')&&_0x144564[_0x8b77('0x43')]&&!_0x144564[_0x8b77('0x44')]){_0x3908a3[_0x144564['nameField'][_0x8b77('0x45')]()]=_0x144564[_0x8b77('0x46')][_0x8b77('0x24')]();}else if(_0x144564['type']==='string'&&_0x144564[_0x8b77('0x1f')]&&_0x144564[_0x8b77('0x44')]){_0x3908a3[_0x8b77('0x47')][_0x8b77('0x1e')]({'id':_0x144564[_0x8b77('0x1f')],'value':_0x144564[_0x8b77('0x46')][_0x8b77('0x24')]()});}else if(_0x144564[_0x8b77('0x48')]==='variable'&&_0x144564[_0x8b77('0x1d')]&&_0x144564[_0x8b77('0x1f')]&&_0x144564[_0x8b77('0x44')]){_0x2e40e4[_0x144564[_0x8b77('0x1d')]]&&_0x3908a3['custom_fields'][_0x8b77('0x1e')]({'id':_0x144564[_0x8b77('0x1f')],'value':_0x2e40e4[_0x144564['variableName']][_0x8b77('0x24')]()});}else if(_0x144564[_0x8b77('0x48')]==='customVariable'&&_0x144564[_0x8b77('0x49')]&&_0x144564[_0x8b77('0x49')][_0x8b77('0xd')]&&_0x144564[_0x8b77('0x1f')]&&_0x144564[_0x8b77('0x44')]){_0x2e40e4[_0x144564[_0x8b77('0x49')][_0x8b77('0xd')][_0x8b77('0x45')]()]&&_0x3908a3['custom_fields']['push']({'id':_0x144564[_0x8b77('0x1f')],'value':_0x2e40e4[_0x144564[_0x8b77('0x49')]['name'][_0x8b77('0x45')]()][_0x8b77('0x24')]()});}});}return _0x3908a3;}function getConnection(_0x4ed3ae){return request({'method':_0x8b77('0x4a'),'form':{'method':_0x8b77('0x4b'),'input_type':_0x8b77('0x20'),'response_type':_0x8b77('0x20'),'rest_data':JSON[_0x8b77('0x21')]({'user_auth':{'user_name':_0x4ed3ae[_0x8b77('0x4c')],'password':_0x4ed3ae[_0x8b77('0x4d')],'encryption':_0x8b77('0x4e')},'application':'xCALLY\x20Motion\x20integration'})}})['then'](function(_0x39b827){var _0x2ac91c=_0x39b827;if(_0x2ac91c['id']){def[_0x8b77('0x4f')]=_0x2ac91c['id'];return BPromise[_0x8b77('0x2f')](_0x2ac91c);}else{throw new Error(util[_0x8b77('0x28')](_0x8b77('0x50'),_0x4ed3ae['id']));}});}function setRelationship(_0x5f13a0,_0x7cde18,_0x9cd8e9,_0x58d022){return request({'form':{'method':_0x8b77('0x51'),'input_type':_0x8b77('0x20'),'response_type':_0x8b77('0x20'),'rest_data':JSON[_0x8b77('0x21')]({'session':_0x5f13a0['id'],'module_name':_0x8b77('0x52'),'module_id':_0x9cd8e9['id'],'link_field_name':_0x58d022,'related_ids':[_0x7cde18['id']],'name_value_list':[],'delete':0x0})}});}exports['queue']=function(_0x4d2d1d,_0x2de1d1,_0x52fe68,_0x3296f6,_0x49783d,_0x26e5b8){var _0x2abe34,_0x372e3e,_0x54152c,_0x1f5495;_0x26e5b8[_0x8b77('0x53')]=intUtil[_0x8b77('0x54')](_0x26e5b8['remoteUri']);_0x26e5b8[_0x8b77('0x55')]=intUtil[_0x8b77('0x54')](_0x26e5b8[_0x8b77('0x55')]);def[_0x8b77('0x56')]=util['format'](_0x8b77('0x57'),_0x26e5b8['remoteUri']);if(_0x49783d&&_0x49783d[_0x8b77('0x58')]){logger[_0x8b77('0xb')](_0x8b77('0x59'),'Recording\x20is\x20enabled!');_0x2de1d1[_0x8b77('0x5a')]=util[_0x8b77('0x28')](_0x8b77('0x5b'),_0x26e5b8[_0x8b77('0x55')],_0x2de1d1[_0x8b77('0x5c')],md5(_0x2de1d1[_0x8b77('0x5c')]));}else{_0x2de1d1[_0x8b77('0x5a')]='';}return getConnection(_0x26e5b8)[_0x8b77('0x2a')](function(_0x5d26be){_0x1f5495=_0x5d26be;return getUser(_0x26e5b8,_0x3296f6[_0x8b77('0xd')],_0x1f5495);})[_0x8b77('0x2a')](function(_0x47c641){_0x2abe34=_0x47c641;logger[_0x8b77('0xb')](_0x8b77('0x5d'),_0x2abe34['id']);return getEndUser(_0x26e5b8,_0x2de1d1[_0x8b77('0x5e')],_0x2de1d1[_0x8b77('0x5f')],_0x1f5495);})[_0x8b77('0x2a')](function(_0x37f081){_0x372e3e=_0x37f081;logger[_0x8b77('0xb')](_0x8b77('0x60'),_0x372e3e['id']);return getTicket(_0x26e5b8,_0x2abe34,_0x372e3e,_0x52fe68,_0x2de1d1,_0x52fe68[_0x8b77('0x61')],_0x1f5495,_0x8b77('0x62'));})[_0x8b77('0x2a')](function(_0xa94057){_0x54152c=_0xa94057;logger['info']('Ticket\x20created!');logger[_0x8b77('0xb')](_0x8b77('0x63'),_0x54152c['id']);return setRelationship(_0x1f5495,_0x2abe34,_0x54152c,_0x8b77('0x64'));})[_0x8b77('0x2a')](function(){return setRelationship(_0x1f5495,_0x372e3e,_0x54152c,_0x8b77('0x65'));})[_0x8b77('0x2a')](function(){return getServerInfo(_0x1f5495);})[_0x8b77('0x2a')](function(_0xf79980){var _0x367c98=parseInt(_0xf79980[_0x8b77('0x66')][_0x8b77('0x67')](0x0));var _0x51150c=util[_0x8b77('0x28')](_0x8b77('0x68'),_0x26e5b8[_0x8b77('0x53')],_0x54152c['id']);if(_0x367c98>0x6){_0x51150c=util[_0x8b77('0x28')](_0x8b77('0x69'),_0x26e5b8[_0x8b77('0x53')],_0x54152c['id']);}logger['info'](_0x8b77('0x59'),_0x8b77('0x6a'));emit(util[_0x8b77('0x28')](_0x8b77('0x6b'),_0x3296f6[_0x8b77('0xd')]),_0x8b77('0x6c'),{'uri':_0x51150c});})['catch'](function(_0x827572){logger[_0x8b77('0x6d')]('[QUEUE]',JSON[_0x8b77('0x21')](_0x827572));});};exports[_0x8b77('0x6e')]=function(_0x360bf1,_0x5d6989,_0x31ae7d,_0x7efa03,_0x66e27,_0x2f942c,_0x3d7ccc){var _0x4abc92,_0x389df4,_0x31d7b5,_0x491d1b;_0x2f942c['remoteUri']=intUtil[_0x8b77('0x54')](_0x2f942c[_0x8b77('0x53')]);_0x2f942c[_0x8b77('0x55')]=intUtil[_0x8b77('0x54')](_0x2f942c[_0x8b77('0x55')]);def[_0x8b77('0x56')]=util[_0x8b77('0x28')]('%s/service/v4_1/rest.php',_0x2f942c[_0x8b77('0x53')]);if(_0x3d7ccc&&_0x3d7ccc['recordingFormat']&&_0x3d7ccc[_0x8b77('0x6f')]!=='none'){logger[_0x8b77('0xb')](_0x8b77('0x70'),_0x8b77('0x71'));_0x5d6989[_0x8b77('0x5a')]=util['format']('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x2f942c[_0x8b77('0x55')],_0x5d6989[_0x8b77('0x5c')],md5(_0x5d6989[_0x8b77('0x5c')]));}return getConnection(_0x2f942c)[_0x8b77('0x2a')](function(_0xe28ee1){_0x491d1b=_0xe28ee1;return getUser(_0x2f942c,_0x7efa03[_0x8b77('0xd')],_0x491d1b);})['then'](function(_0x335586){_0x4abc92=_0x335586;logger[_0x8b77('0xb')]('The\x20User\x20ID\x20is:',_0x4abc92['id']);return getEndUser(_0x2f942c,_0x5d6989['destcalleridname'],_0x5d6989[_0x8b77('0x72')],_0x491d1b);})['then'](function(_0x1952f9){_0x389df4=_0x1952f9;logger['info']('The\x20Enduser\x20ID\x20is:',_0x389df4['id']);return getTicket(_0x2f942c,_0x4abc92,_0x389df4,_0x31ae7d,_0x5d6989,_0x31ae7d[_0x8b77('0x61')],_0x491d1b,_0x8b77('0x73'));})['then'](function(_0x1f729b){_0x31d7b5=_0x1f729b;logger[_0x8b77('0xb')](_0x8b77('0x74'));logger[_0x8b77('0xb')](_0x8b77('0x63'),_0x31d7b5['id']);return setRelationship(_0x491d1b,_0x4abc92,_0x31d7b5,'users');})[_0x8b77('0x2a')](function(){return setRelationship(_0x491d1b,_0x389df4,_0x31d7b5,_0x8b77('0x65'));})[_0x8b77('0x2a')](function(){return getServerInfo(_0x491d1b);})[_0x8b77('0x2a')](function(_0x184940){var _0x92a080=parseInt(_0x184940['version'][_0x8b77('0x67')](0x0));var _0x4c1557=util[_0x8b77('0x28')](_0x8b77('0x68'),_0x2f942c[_0x8b77('0x53')],_0x31d7b5['id']);if(_0x92a080>0x6){_0x4c1557=util['format'](_0x8b77('0x69'),_0x2f942c['remoteUri'],_0x31d7b5['id']);}logger[_0x8b77('0xb')](_0x8b77('0x70'),_0x8b77('0x6a'));emit(util[_0x8b77('0x28')](_0x8b77('0x6b'),_0x7efa03['name']),_0x8b77('0x6c'),{'uri':_0x4c1557});})[_0x8b77('0x75')](function(_0x5f40ee){logger['error'](_0x8b77('0x70'),JSON[_0x8b77('0x21')](_0x5f40ee));});};exports[_0x8b77('0x76')]=function(_0x5f0067,_0x418858,_0x3d93a9,_0x5e2119,_0x14ef70,_0x2825ed){var _0x4c9269,_0x49210a,_0x282797,_0x5007c5;_0x2825ed[_0x8b77('0x53')]=intUtil['stripTrailingSlash'](_0x2825ed['remoteUri']);_0x2825ed[_0x8b77('0x55')]=intUtil[_0x8b77('0x54')](_0x2825ed[_0x8b77('0x55')]);def[_0x8b77('0x56')]=util[_0x8b77('0x28')](_0x8b77('0x57'),_0x2825ed[_0x8b77('0x53')]);if(_0x14ef70&&_0x14ef70[_0x8b77('0x58')]){logger[_0x8b77('0xb')]('['+_0x418858[_0x8b77('0x77')]['toUpperCase']()+']',_0x8b77('0x71'));_0x418858[_0x8b77('0x5a')]=util[_0x8b77('0x28')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x2825ed[_0x8b77('0x55')],_0x418858[_0x8b77('0x5c')],md5(_0x418858[_0x8b77('0x5c')]));}else{_0x418858[_0x8b77('0x5a')]='';}return getConnection(_0x2825ed)[_0x8b77('0x2a')](function(_0x497ebd){_0x5007c5=_0x497ebd;if(!_[_0x8b77('0x78')](_0x5e2119)){return getUser(_0x2825ed,_0x5e2119[_0x8b77('0xd')],_0x5007c5);}else{return getUser(_0x2825ed,null,_0x5007c5);}})['then'](function(_0x5bb803){_0x4c9269=_0x5bb803;logger['info'](_0x8b77('0x5d'),_0x4c9269['id']);return getEndUser(_0x2825ed,_0x418858[_0x8b77('0x5e')],_0x418858['calleridnum'],_0x5007c5);})[_0x8b77('0x2a')](function(_0x262ef8){_0x49210a=_0x262ef8;logger[_0x8b77('0xb')]('The\x20Enduser\x20ID\x20is:',_0x49210a['id']);return getTicket(_0x2825ed,_0x4c9269,_0x49210a,_0x3d93a9,_0x418858,_0x3d93a9[_0x8b77('0x61')],_0x5007c5,'Inbound');})[_0x8b77('0x2a')](function(_0x26a2fa){_0x282797=_0x26a2fa;logger[_0x8b77('0xb')](_0x8b77('0x74'));logger[_0x8b77('0xb')]('The\x20Ticket\x20ID\x20is:',_0x282797['id']);return setRelationship(_0x5007c5,_0x4c9269,_0x282797,'users');})[_0x8b77('0x2a')](function(){return setRelationship(_0x5007c5,_0x49210a,_0x282797,'contacts');})[_0x8b77('0x2a')](function(){return getServerInfo(_0x5007c5);})[_0x8b77('0x75')](function(_0x2df5c8){logger[_0x8b77('0x6d')]('['+_0x418858[_0x8b77('0x77')][_0x8b77('0x79')]()+']',JSON[_0x8b77('0x21')](_0x2df5c8));});};
\ No newline at end of file
index 18d746d..43d843c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb5be=['type','string','push','content','variable','variableName','toString','customVariable','Variable','name','toLowerCase','keyValue','keyType','key','format','join','stripTrailingSlash','slice','substring','validateEmail','test','lodash','getString','sortBy','length'];(function(_0x26253d,_0x5dfc80){var _0x318a82=function(_0x22ae6a){while(--_0x22ae6a){_0x26253d['push'](_0x26253d['shift']());}};_0x318a82(++_0x5dfc80);}(_0xb5be,0x10f));var _0xeb5b=function(_0x17b6e3,_0x4522ed){_0x17b6e3=_0x17b6e3-0x0;var _0x3906f3=_0xb5be[_0x17b6e3];return _0x3906f3;};'use strict';var _=require(_0xeb5b('0x0'));var util=require('util');exports[_0xeb5b('0x1')]=function(_0x57070c,_0x267181,_0x27f78d){var _0x11ffdc=[];if(_0x57070c['length']>0x0){var _0x218d1d=_[_0xeb5b('0x2')](_0x57070c,['id']);for(var _0x41eddb=0x0;_0x41eddb<_0x218d1d[_0xeb5b('0x3')];_0x41eddb++){var _0x1ebf3a=_0x218d1d[_0x41eddb];if(_0x1ebf3a[_0xeb5b('0x4')]===_0xeb5b('0x5')){_0x11ffdc[_0xeb5b('0x6')](_0x1ebf3a[_0xeb5b('0x7')]);}else if(_0x1ebf3a[_0xeb5b('0x4')]===_0xeb5b('0x8')&&_0x1ebf3a[_0xeb5b('0x9')]){_0x267181[_0x1ebf3a[_0xeb5b('0x9')]]&&_0x11ffdc['push'](_0x267181[_0x1ebf3a[_0xeb5b('0x9')]][_0xeb5b('0xa')]());}else if(_0x1ebf3a['type']===_0xeb5b('0xb')&&_0x1ebf3a['Variable']&&_0x1ebf3a[_0xeb5b('0xc')][_0xeb5b('0xd')]){_0x267181[_0x1ebf3a[_0xeb5b('0xc')][_0xeb5b('0xd')][_0xeb5b('0xe')]()]&&_0x11ffdc[_0xeb5b('0x6')](_0x267181[_0x1ebf3a['Variable'][_0xeb5b('0xd')]['toLowerCase']()][_0xeb5b('0xa')]());}else if(_0x1ebf3a['type']===_0xeb5b('0xf')){if(_0x1ebf3a[_0xeb5b('0x10')]===_0xeb5b('0x5')&&_0x1ebf3a[_0xeb5b('0x11')]){_0x11ffdc[_0xeb5b('0x6')](util[_0xeb5b('0x12')]('%s:\x20%s',_0x1ebf3a['key'],_0x1ebf3a['keyContent']));}else if(_0x1ebf3a[_0xeb5b('0x10')]===_0xeb5b('0x8')&&_0x1ebf3a[_0xeb5b('0x9')]&&_0x1ebf3a[_0xeb5b('0x11')]){_0x267181[_0x1ebf3a['variableName']]&&_0x11ffdc['push'](util[_0xeb5b('0x12')]('%s:\x20%s',_0x1ebf3a[_0xeb5b('0x11')],_0x267181[_0x1ebf3a['variableName']]));}else if(_0x1ebf3a[_0xeb5b('0x10')]==='customVariable'&&_0x1ebf3a[_0xeb5b('0xc')]&&_0x1ebf3a['Variable'][_0xeb5b('0xd')]&&_0x1ebf3a[_0xeb5b('0x11')]){_0x267181[_0x1ebf3a[_0xeb5b('0xc')]['name'][_0xeb5b('0xe')]()]&&_0x11ffdc[_0xeb5b('0x6')](util[_0xeb5b('0x12')]('%s:\x20%s',_0x1ebf3a['key'],_0x267181[_0x1ebf3a[_0xeb5b('0xc')][_0xeb5b('0xd')][_0xeb5b('0xe')]()]));}}}}return _0x11ffdc[_0xeb5b('0x13')](_0x27f78d);};exports[_0xeb5b('0x14')]=function(_0x288fca){var _0x45fe70=_0x288fca[_0xeb5b('0x15')](-0x1);if(_0x45fe70==='/'){_0x288fca=_0x288fca[_0xeb5b('0x16')](0x0,_0x288fca['lastIndexOf'](_0x45fe70));}return _0x288fca;};exports[_0xeb5b('0x17')]=function(_0x2e8cd3){if(!_['isNil'](_0x2e8cd3)&&_0x2e8cd3!==''){var _0x3580b1=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return _0x3580b1[_0xeb5b('0x18')](String(_0x2e8cd3)[_0xeb5b('0xe')]());}else{return![];}};
\ No newline at end of file
+var _0xf29a=['toString','customVariable','Variable','name','toLowerCase','keyValue','keyType','key','format','%s:\x20%s','keyContent','join','stripTrailingSlash','slice','substring','lastIndexOf','validateEmail','isNil','test','lodash','util','getString','sortBy','length','type','string','content','variable','variableName','push'];(function(_0x2e4b84,_0x19ad5a){var _0x3a0444=function(_0x2a86db){while(--_0x2a86db){_0x2e4b84['push'](_0x2e4b84['shift']());}};_0x3a0444(++_0x19ad5a);}(_0xf29a,0x1d5));var _0xaf29=function(_0x2b52f5,_0x2c9c36){_0x2b52f5=_0x2b52f5-0x0;var _0x332396=_0xf29a[_0x2b52f5];return _0x332396;};'use strict';var _=require(_0xaf29('0x0'));var util=require(_0xaf29('0x1'));exports[_0xaf29('0x2')]=function(_0x5428c3,_0x5f1eec,_0x2dfe8d){var _0x3556b5=[];if(_0x5428c3['length']>0x0){var _0x2d7396=_[_0xaf29('0x3')](_0x5428c3,['id']);for(var _0x2497b6=0x0;_0x2497b6<_0x2d7396[_0xaf29('0x4')];_0x2497b6++){var _0x49e66b=_0x2d7396[_0x2497b6];if(_0x49e66b[_0xaf29('0x5')]===_0xaf29('0x6')){_0x3556b5['push'](_0x49e66b[_0xaf29('0x7')]);}else if(_0x49e66b[_0xaf29('0x5')]===_0xaf29('0x8')&&_0x49e66b[_0xaf29('0x9')]){_0x5f1eec[_0x49e66b['variableName']]&&_0x3556b5[_0xaf29('0xa')](_0x5f1eec[_0x49e66b[_0xaf29('0x9')]][_0xaf29('0xb')]());}else if(_0x49e66b[_0xaf29('0x5')]===_0xaf29('0xc')&&_0x49e66b[_0xaf29('0xd')]&&_0x49e66b[_0xaf29('0xd')]['name']){_0x5f1eec[_0x49e66b[_0xaf29('0xd')][_0xaf29('0xe')][_0xaf29('0xf')]()]&&_0x3556b5[_0xaf29('0xa')](_0x5f1eec[_0x49e66b[_0xaf29('0xd')][_0xaf29('0xe')][_0xaf29('0xf')]()]['toString']());}else if(_0x49e66b[_0xaf29('0x5')]===_0xaf29('0x10')){if(_0x49e66b[_0xaf29('0x11')]===_0xaf29('0x6')&&_0x49e66b[_0xaf29('0x12')]){_0x3556b5['push'](util[_0xaf29('0x13')](_0xaf29('0x14'),_0x49e66b[_0xaf29('0x12')],_0x49e66b[_0xaf29('0x15')]));}else if(_0x49e66b['keyType']===_0xaf29('0x8')&&_0x49e66b[_0xaf29('0x9')]&&_0x49e66b[_0xaf29('0x12')]){_0x5f1eec[_0x49e66b['variableName']]&&_0x3556b5[_0xaf29('0xa')](util[_0xaf29('0x13')]('%s:\x20%s',_0x49e66b[_0xaf29('0x12')],_0x5f1eec[_0x49e66b[_0xaf29('0x9')]]));}else if(_0x49e66b[_0xaf29('0x11')]===_0xaf29('0xc')&&_0x49e66b[_0xaf29('0xd')]&&_0x49e66b[_0xaf29('0xd')][_0xaf29('0xe')]&&_0x49e66b[_0xaf29('0x12')]){_0x5f1eec[_0x49e66b[_0xaf29('0xd')][_0xaf29('0xe')]['toLowerCase']()]&&_0x3556b5['push'](util[_0xaf29('0x13')](_0xaf29('0x14'),_0x49e66b[_0xaf29('0x12')],_0x5f1eec[_0x49e66b['Variable'][_0xaf29('0xe')][_0xaf29('0xf')]()]));}}}}return _0x3556b5[_0xaf29('0x16')](_0x2dfe8d);};exports[_0xaf29('0x17')]=function(_0xe4fa95){var _0x5ec53f=_0xe4fa95[_0xaf29('0x18')](-0x1);if(_0x5ec53f==='/'){_0xe4fa95=_0xe4fa95[_0xaf29('0x19')](0x0,_0xe4fa95[_0xaf29('0x1a')](_0x5ec53f));}return _0xe4fa95;};exports[_0xaf29('0x1b')]=function(_0x254ed9){if(!_[_0xaf29('0x1c')](_0x254ed9)&&_0x254ed9!==''){var _0x9fdd1c=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;return _0x9fdd1c[_0xaf29('0x1d')](String(_0x254ed9)[_0xaf29('0xf')]());}else{return![];}};
\ No newline at end of file
index febd8cd..eb5b7b2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9c44=['stringify','validateEmail','Getting\x20agent\x20with\x20email','GET','%s/webservice.php','SELECT\x20first_name,\x20last_name,\x20email1\x20FROM\x20Users\x20WHERE\x20email1=\x27%s\x27;','success','length','Agent\x20found!','email1','first_name','last_name','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','userId','getUser','admin','Searching\x20end\x20user\x20with\x20phone','SELECT\x20id,\x20firstname,\x20lastname,\x20email,\x20phone,\x20mobile,\x20homephone,\x20otherphone,\x20assistantphone\x20FROM\x20Contacts\x20WHERE\x20phone\x20=\x20\x27%s\x27\x20OR\x20mobile\x20=\x27%s\x27\x20OR\x20homephone\x20=\x27%s\x27\x20OR\x20otherphone\x20=\x27%s\x27\x20OR\x20assistantphone\x20=\x27%s\x27;','Enduser\x20found!','firstname','lastname','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','Contacts','Enduser\x20created.','phone','getEndUser','accessKey','login','Account\x20%d\x20is\x20not\x20valid','getConnection','[HTTP]','queue','stripTrailingSlash','[QUEUE]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','serverUrl','uniqueid','recordingURL','email','The\x20User\x20ID\x20is:','calleridname','The\x20Enduser\x20ID\x20is:','Fields','The\x20Ticket\x20ID\x20is:','split','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','destcalleridname','destcalleridnum','Ticket\x20created!','%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT','trigger:browser:url','unmanaged','monitor_format','toUpperCase','calleridnum','lastevent','bluebird','md5','util','ioredis','./util','../../../../config/environment','redis','localhost','socket.io-emitter','emit','forEach','string','picklist','idField','content','type','variable','variableName','toString','customVariable','Variable','name','toLowerCase','info','Creating\x20new\x20ticket...','merge','Normal','Open','getString','Subjects','POST','remoteUri','create','username','sessionName','then','resolve','result','format','Ticket\x20could\x20not\x20be\x20created\x20due\x20to:\x20%s','catch','statusCode','error','[vTiger],\x20%s,\x20%s,\x20%s'];(function(_0x192036,_0x2e396b){var _0x16e607=function(_0x51174d){while(--_0x51174d){_0x192036['push'](_0x192036['shift']());}};_0x16e607(++_0x2e396b);}(_0x9c44,0x178));var _0x49c4=function(_0x4b055c,_0x4b870b){_0x4b055c=_0x4b055c-0x0;var _0x4b62bb=_0x9c44[_0x4b055c];return _0x4b62bb;};'use strict';var _=require('lodash');var rp=require('request-promise');var BPromise=require(_0x49c4('0x0'));var md5=require(_0x49c4('0x1'));var util=require(_0x49c4('0x2'));var Redis=require(_0x49c4('0x3'));var intUtil=require(_0x49c4('0x4'));var config=require(_0x49c4('0x5'));var logger=require('../../../../config/logger')('vTiger');config[_0x49c4('0x6')]=_['defaults'](config[_0x49c4('0x6')],{'host':_0x49c4('0x7'),'port':0x18eb});var io=require(_0x49c4('0x8'))(new Redis(config[_0x49c4('0x6')]));function emit(_0x436234,_0x511d53,_0x11c586){io['to'](_0x436234)[_0x49c4('0x9')](_0x511d53,_0x11c586);}function getCustomFields(_0x1d13fb,_0x4487ca){var _0x4c7d3a={};if(_0x1d13fb['length']>0x0){_[_0x49c4('0xa')](_0x1d13fb,function(_0x313e73){if(_['includes']([_0x49c4('0xb'),_0x49c4('0xc')],_0x313e73['type'])&&_0x313e73['idField']){_0x4c7d3a[_0x313e73[_0x49c4('0xd')]]=_0x313e73[_0x49c4('0xe')]['toString']();}else if(_0x313e73[_0x49c4('0xf')]===_0x49c4('0x10')&&_0x313e73['variableName']&&_0x313e73[_0x49c4('0xd')]&&_0x4487ca[_0x313e73[_0x49c4('0x11')]]){_0x4c7d3a[_0x313e73[_0x49c4('0xd')]]=_0x4487ca[_0x313e73[_0x49c4('0x11')]][_0x49c4('0x12')]();}else if(_0x313e73[_0x49c4('0xf')]===_0x49c4('0x13')&&_0x313e73[_0x49c4('0x14')]&&_0x313e73['Variable'][_0x49c4('0x15')]&&_0x313e73[_0x49c4('0xd')]&&_0x4487ca[_0x313e73[_0x49c4('0x14')][_0x49c4('0x15')][_0x49c4('0x16')]()]){_0x4c7d3a[_0x313e73['idField']]=_0x4487ca[_0x313e73[_0x49c4('0x14')][_0x49c4('0x15')]['toLowerCase']()]['toString']();}});}return _0x4c7d3a;}function createTicket(_0x3c782d,_0x2f82d5,_0x3addb2,_0x59f29b,_0x24856d,_0x50b151,_0x2cbd50){logger[_0x49c4('0x17')](_0x49c4('0x18'));var _0x291526=_[_0x49c4('0x19')]({'parent_id':'','assigned_user_id':_0x2f82d5['id'],'ticketpriorities':_0x49c4('0x1a'),'ticketstatus':_0x49c4('0x1b'),'ticket_title':intUtil[_0x49c4('0x1c')](_0x59f29b[_0x49c4('0x1d')],_0x24856d,'\x20'),'description':intUtil['getString'](_0x59f29b['Descriptions'],_0x24856d,'\x0a'),'contact_id':_0x3addb2['id']},getCustomFields(_0x50b151,_0x24856d));var _0x57f502={'method':_0x49c4('0x1e'),'uri':util['format']('%s/webservice.php',_0x3c782d[_0x49c4('0x1f')]),'form':{'operation':_0x49c4('0x20'),'username':_0x3c782d[_0x49c4('0x21')],'sessionName':_0x2cbd50[_0x49c4('0x22')],'elementType':'HelpDesk','element':JSON['stringify'](_0x291526)},'json':!![]};return request(_0x57f502)[_0x49c4('0x23')](function(_0x9cb797){if(_0x9cb797['success']){return BPromise[_0x49c4('0x24')]({'id':_0x9cb797[_0x49c4('0x25')]['id']});}else{throw new Error(util[_0x49c4('0x26')](_0x49c4('0x27'),JSON['stringify'](_0x9cb797['error'])));}})[_0x49c4('0x28')](function(_0x53c199){var _0x3800b7=_0x53c199[_0x49c4('0x29')]||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),'createTicket',_0x3800b7,JSON[_0x49c4('0x2c')](_0x53c199));});}function getUser(_0x2b2793,_0x46e04d,_0x4f28a2){if(intUtil[_0x49c4('0x2d')](_0x46e04d)){logger[_0x49c4('0x17')](_0x49c4('0x2e'),_0x46e04d);return request({'method':_0x49c4('0x2f'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x2b2793[_0x49c4('0x1f')]),'qs':{'operation':'query','username':_0x2b2793['username'],'sessionName':_0x4f28a2['sessionName'],'query':util[_0x49c4('0x26')](_0x49c4('0x31'),_0x46e04d)},'json':!![]})[_0x49c4('0x23')](function(_0x27e467){if(_0x27e467[_0x49c4('0x32')]&&_0x27e467['result'][_0x49c4('0x33')]){logger[_0x49c4('0x17')](_0x49c4('0x34'));return BPromise[_0x49c4('0x24')]({'id':_0x27e467['result'][0x0]['id'],'email':_0x27e467['result'][0x0][_0x49c4('0x35')],'name':_0x27e467[_0x49c4('0x25')][0x0][_0x49c4('0x36')]+'\x20'+_0x27e467[_0x49c4('0x25')][_0x49c4('0x37')]});}else{logger['info'](_0x49c4('0x38'));return BPromise[_0x49c4('0x24')]({'id':_0x4f28a2[_0x49c4('0x39')],'email':_0x2b2793['username'],'name':'admin'});}})[_0x49c4('0x28')](function(_0x1991e9){var _0x3bec0a=_0x1991e9[_0x49c4('0x29')]||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),_0x49c4('0x3a'),_0x3bec0a,JSON[_0x49c4('0x2c')](_0x1991e9));});}else{logger[_0x49c4('0x17')]('Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');return BPromise[_0x49c4('0x24')]({'id':_0x4f28a2['userId'],'email':_0x2b2793[_0x49c4('0x21')],'name':_0x49c4('0x3b')})[_0x49c4('0x28')](function(_0x1c2830){var _0x4ed4f8=_0x1c2830[_0x49c4('0x29')]||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),'getUser',_0x4ed4f8,JSON[_0x49c4('0x2c')](_0x1c2830));});}}function getEndUser(_0x21d8c7,_0x178987,_0x5e5366,_0x1ba7a0){logger[_0x49c4('0x17')](_0x49c4('0x3c'),_0x5e5366);return request({'method':_0x49c4('0x2f'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x21d8c7[_0x49c4('0x1f')]),'qs':{'operation':'query','username':_0x21d8c7[_0x49c4('0x21')],'sessionName':_0x1ba7a0[_0x49c4('0x22')],'query':util[_0x49c4('0x26')](_0x49c4('0x3d'),_0x5e5366,_0x5e5366,_0x5e5366,_0x5e5366,_0x5e5366)},'json':!![]})[_0x49c4('0x23')](function(_0x29dd5d){if(_0x29dd5d[_0x49c4('0x32')]&&_0x29dd5d[_0x49c4('0x25')][_0x49c4('0x33')]){logger[_0x49c4('0x17')](_0x49c4('0x3e'));return BPromise[_0x49c4('0x24')]({'id':_0x29dd5d[_0x49c4('0x25')][0x0]['id'],'name':_0x29dd5d['result'][0x0][_0x49c4('0x3f')]+'\x20'+_0x29dd5d['result'][0x0][_0x49c4('0x40')],'phone':_0x5e5366});}else{logger[_0x49c4('0x17')](_0x49c4('0x41'));return request({'method':_0x49c4('0x1e'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x21d8c7['remoteUri']),'form':{'operation':'create','sessionName':_0x1ba7a0[_0x49c4('0x22')],'elementType':_0x49c4('0x42'),'element':JSON[_0x49c4('0x2c')]({'lastname':_0x178987,'phone':_0x5e5366,'assigned_user_id':'\x20'})},'json':!![]})[_0x49c4('0x23')](function(_0x490823){logger[_0x49c4('0x17')](_0x49c4('0x43'));return BPromise[_0x49c4('0x24')]({'id':_0x490823[_0x49c4('0x25')]['id'],'name':_0x490823[_0x49c4('0x25')][_0x49c4('0x40')],'phone':_0x490823[_0x49c4('0x25')][_0x49c4('0x44')]});})[_0x49c4('0x28')](function(_0x5640d3){var _0x2ad771=_0x5640d3['statusCode']||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),_0x49c4('0x45'),_0x2ad771,JSON[_0x49c4('0x2c')](_0x5640d3));});}});}function getConnection(_0x2d93d8){var _0x5b296d=_0x2d93d8[_0x49c4('0x21')];var _0x15b674=_0x2d93d8[_0x49c4('0x46')];return request({'method':_0x49c4('0x2f'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x2d93d8[_0x49c4('0x1f')]),'qs':{'operation':'getchallenge','username':_0x5b296d},'json':!![]})[_0x49c4('0x23')](function(_0x5cfff9){if(_0x5cfff9[_0x49c4('0x32')]){return request({'method':_0x49c4('0x1e'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x2d93d8[_0x49c4('0x1f')]),'form':{'operation':_0x49c4('0x47'),'username':_0x5b296d,'accessKey':md5(_0x5cfff9[_0x49c4('0x25')]['token']+_0x15b674)},'json':!![]});}})[_0x49c4('0x23')](function(_0x3feaf0){if(_0x3feaf0['success']){return BPromise[_0x49c4('0x24')](_0x3feaf0[_0x49c4('0x25')]);}else{throw new Error(util[_0x49c4('0x26')](_0x49c4('0x48'),_0x2d93d8['id']));}})['catch'](function(_0x5d8bf0){var _0x144fd2=_0x5d8bf0['statusCode']||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),_0x49c4('0x49'),_0x144fd2,JSON[_0x49c4('0x2c')](_0x5d8bf0));});}function request(_0x240c20){logger[_0x49c4('0x17')](_0x49c4('0x4a'),JSON['stringify'](_0x240c20));return rp(_0x240c20);}exports[_0x49c4('0x4b')]=function(_0x1550ce,_0x3936d3,_0x3d944c,_0x17ef75,_0x2644c0,_0x156748){var _0x25d174,_0x1e0b4f,_0x1856be,_0x5b822f;_0x156748['remoteUri']=intUtil[_0x49c4('0x4c')](_0x156748[_0x49c4('0x1f')]);if(_0x2644c0&&_0x2644c0['monitor_format']){logger['info'](_0x49c4('0x4d'),'Recording\x20is\x20enabled!');_0x3936d3['recordingURL']=util[_0x49c4('0x26')](_0x49c4('0x4e'),_0x156748[_0x49c4('0x4f')],_0x3936d3[_0x49c4('0x50')],md5(_0x3936d3[_0x49c4('0x50')]));}else{_0x3936d3[_0x49c4('0x51')]='';}return getConnection(_0x156748)[_0x49c4('0x23')](function(_0x50798e){_0x5b822f=_0x50798e;return getUser(_0x156748,_0x17ef75[_0x49c4('0x52')],_0x5b822f);})[_0x49c4('0x23')](function(_0x207572){_0x25d174=_0x207572;logger[_0x49c4('0x17')](_0x49c4('0x53'),_0x25d174['id']);return getEndUser(_0x156748,_0x3936d3[_0x49c4('0x54')],_0x3936d3['calleridnum'],_0x5b822f);})['then'](function(_0x1ef0c1){_0x1e0b4f=_0x1ef0c1;logger[_0x49c4('0x17')](_0x49c4('0x55'),_0x1e0b4f['id']);return createTicket(_0x156748,_0x25d174,_0x1e0b4f,_0x3d944c,_0x3936d3,_0x3d944c[_0x49c4('0x56')],_0x5b822f);})[_0x49c4('0x23')](function(_0x6b2592){_0x1856be=_0x6b2592;logger[_0x49c4('0x17')]('Ticket\x20created!');logger[_0x49c4('0x17')](_0x49c4('0x57'),_0x1856be['id']);var _0x4ba4eb=util[_0x49c4('0x26')]('%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT',_0x156748[_0x49c4('0x1f')],_[_0x49c4('0x58')](_0x1856be['id'],'x')[0x1]);logger[_0x49c4('0x17')](_0x49c4('0x4d'),_0x49c4('0x59'));emit(util[_0x49c4('0x26')](_0x49c4('0x5a'),_0x17ef75[_0x49c4('0x15')]),'trigger:browser:url',{'uri':_0x4ba4eb});})[_0x49c4('0x28')](function(_0x27b9c2){logger['error'](_0x49c4('0x4d'),JSON[_0x49c4('0x2c')](_0x27b9c2));});};exports['outbound']=function(_0x39c455,_0x42e0e6,_0x4f50bf,_0x4dc54d,_0x589484,_0x513879,_0xc43386){var _0x54947d,_0xb20a5d,_0x32f344,_0x515240;_0x513879[_0x49c4('0x1f')]=intUtil[_0x49c4('0x4c')](_0x513879['remoteUri']);_0x513879[_0x49c4('0x4f')]=intUtil[_0x49c4('0x4c')](_0x513879[_0x49c4('0x4f')]);if(_0xc43386&&_0xc43386[_0x49c4('0x5b')]&&_0xc43386['recordingFormat']!==_0x49c4('0x5c')){logger[_0x49c4('0x17')](_0x49c4('0x5d'),_0x49c4('0x5e'));_0x42e0e6['recordingURL']=util[_0x49c4('0x26')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x513879['serverUrl'],_0x42e0e6['uniqueid'],md5(_0x42e0e6['uniqueid']));}return getConnection(_0x513879)[_0x49c4('0x23')](function(_0x32eaef){_0x515240=_0x32eaef;return getUser(_0x513879,_0x4dc54d[_0x49c4('0x52')],_0x515240);})[_0x49c4('0x23')](function(_0x5b056e){_0x54947d=_0x5b056e;logger['info'](_0x49c4('0x53'),_0x54947d['id']);return getEndUser(_0x513879,_0x42e0e6[_0x49c4('0x5f')],_0x42e0e6[_0x49c4('0x60')],_0x515240);})[_0x49c4('0x23')](function(_0x102c15){_0xb20a5d=_0x102c15;logger[_0x49c4('0x17')](_0x49c4('0x55'),_0xb20a5d['id']);return createTicket(_0x513879,_0x54947d,_0xb20a5d,_0x4f50bf,_0x42e0e6,_0x4f50bf[_0x49c4('0x56')],_0x515240);})['then'](function(_0x2276db){_0x32f344=_0x2276db;logger['info'](_0x49c4('0x61'));logger[_0x49c4('0x17')](_0x49c4('0x57'),_0x32f344['id']);var _0x1ea1b4=util[_0x49c4('0x26')](_0x49c4('0x62'),_0x513879[_0x49c4('0x1f')],_[_0x49c4('0x58')](_0x32f344['id'],'x')[0x1]);logger[_0x49c4('0x17')](_0x49c4('0x5d'),_0x49c4('0x59'));emit(util[_0x49c4('0x26')](_0x49c4('0x5a'),_0x4dc54d[_0x49c4('0x15')]),_0x49c4('0x63'),{'uri':_0x1ea1b4});})[_0x49c4('0x28')](function(_0x371e49){logger[_0x49c4('0x2a')]('[OUTBOUND]',JSON['stringify'](_0x371e49));});};exports[_0x49c4('0x64')]=function(_0x16b3e8,_0x4af680,_0x1a15f3,_0x38ad50,_0x2939fd,_0x16e7b1){var _0x4d6aaa,_0x5a14a5,_0x4a85d4,_0x2e90d8;_0x16e7b1[_0x49c4('0x1f')]=intUtil[_0x49c4('0x4c')](_0x16e7b1[_0x49c4('0x1f')]);_0x16e7b1[_0x49c4('0x4f')]=intUtil[_0x49c4('0x4c')](_0x16e7b1[_0x49c4('0x4f')]);if(_0x2939fd&&_0x2939fd[_0x49c4('0x65')]){logger[_0x49c4('0x17')]('['+_0x4af680['lastevent'][_0x49c4('0x66')]()+']',_0x49c4('0x5e'));_0x4af680[_0x49c4('0x51')]=util['format'](_0x49c4('0x4e'),_0x16e7b1[_0x49c4('0x4f')],_0x4af680[_0x49c4('0x50')],md5(_0x4af680[_0x49c4('0x50')]));}else{_0x4af680[_0x49c4('0x51')]='';}return getConnection(_0x16e7b1)[_0x49c4('0x23')](function(_0x35fa39){_0x2e90d8=_0x35fa39;return getUser(_0x16e7b1,'',_0x2e90d8);})[_0x49c4('0x23')](function(_0x4ba198){_0x4d6aaa=_0x4ba198;logger[_0x49c4('0x17')](_0x49c4('0x53'),_0x4d6aaa['id']);return getEndUser(_0x16e7b1,_0x4af680[_0x49c4('0x54')],_0x4af680[_0x49c4('0x67')],_0x2e90d8);})[_0x49c4('0x23')](function(_0x4a204d){_0x5a14a5=_0x4a204d;logger['info'](_0x49c4('0x55'),_0x5a14a5['id']);return createTicket(_0x16e7b1,_0x4d6aaa,_0x5a14a5,_0x1a15f3,_0x4af680,_0x1a15f3['Fields'],_0x2e90d8);})[_0x49c4('0x23')](function(_0x558880){_0x4a85d4=_0x558880;logger[_0x49c4('0x17')](_0x49c4('0x61'));logger[_0x49c4('0x17')](_0x49c4('0x57'),_0x4a85d4['id']);})['catch'](function(_0x123060){logger[_0x49c4('0x2a')]('['+_0x4af680[_0x49c4('0x68')][_0x49c4('0x66')]()+']',JSON[_0x49c4('0x2c')](_0x123060));});};
\ No newline at end of file
+var _0x9c44=['stringify','validateEmail','Getting\x20agent\x20with\x20email','GET','%s/webservice.php','SELECT\x20first_name,\x20last_name,\x20email1\x20FROM\x20Users\x20WHERE\x20email1=\x27%s\x27;','success','length','Agent\x20found!','email1','first_name','last_name','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','userId','getUser','admin','Searching\x20end\x20user\x20with\x20phone','SELECT\x20id,\x20firstname,\x20lastname,\x20email,\x20phone,\x20mobile,\x20homephone,\x20otherphone,\x20assistantphone\x20FROM\x20Contacts\x20WHERE\x20phone\x20=\x20\x27%s\x27\x20OR\x20mobile\x20=\x27%s\x27\x20OR\x20homephone\x20=\x27%s\x27\x20OR\x20otherphone\x20=\x27%s\x27\x20OR\x20assistantphone\x20=\x27%s\x27;','Enduser\x20found!','firstname','lastname','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','Contacts','Enduser\x20created.','phone','getEndUser','accessKey','login','Account\x20%d\x20is\x20not\x20valid','getConnection','[HTTP]','queue','stripTrailingSlash','[QUEUE]','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','serverUrl','uniqueid','recordingURL','email','The\x20User\x20ID\x20is:','calleridname','The\x20Enduser\x20ID\x20is:','Fields','The\x20Ticket\x20ID\x20is:','split','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','recordingFormat','none','[OUTBOUND]','Recording\x20is\x20enabled!','destcalleridname','destcalleridnum','Ticket\x20created!','%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT','trigger:browser:url','unmanaged','monitor_format','toUpperCase','calleridnum','lastevent','bluebird','md5','util','ioredis','./util','../../../../config/environment','redis','localhost','socket.io-emitter','emit','forEach','string','picklist','idField','content','type','variable','variableName','toString','customVariable','Variable','name','toLowerCase','info','Creating\x20new\x20ticket...','merge','Normal','Open','getString','Subjects','POST','remoteUri','create','username','sessionName','then','resolve','result','format','Ticket\x20could\x20not\x20be\x20created\x20due\x20to:\x20%s','catch','statusCode','error','[vTiger],\x20%s,\x20%s,\x20%s'];(function(_0x254b0a,_0x29057a){var _0x42d376=function(_0xe18919){while(--_0xe18919){_0x254b0a['push'](_0x254b0a['shift']());}};_0x42d376(++_0x29057a);}(_0x9c44,0x178));var _0x49c4=function(_0xb0f7c3,_0x4eae95){_0xb0f7c3=_0xb0f7c3-0x0;var _0x28ea68=_0x9c44[_0xb0f7c3];return _0x28ea68;};'use strict';var _=require('lodash');var rp=require('request-promise');var BPromise=require(_0x49c4('0x0'));var md5=require(_0x49c4('0x1'));var util=require(_0x49c4('0x2'));var Redis=require(_0x49c4('0x3'));var intUtil=require(_0x49c4('0x4'));var config=require(_0x49c4('0x5'));var logger=require('../../../../config/logger')('vTiger');config[_0x49c4('0x6')]=_['defaults'](config[_0x49c4('0x6')],{'host':_0x49c4('0x7'),'port':0x18eb});var io=require(_0x49c4('0x8'))(new Redis(config[_0x49c4('0x6')]));function emit(_0x436234,_0x511d53,_0x11c586){io['to'](_0x436234)[_0x49c4('0x9')](_0x511d53,_0x11c586);}function getCustomFields(_0x1d13fb,_0x4487ca){var _0x4c7d3a={};if(_0x1d13fb['length']>0x0){_[_0x49c4('0xa')](_0x1d13fb,function(_0x313e73){if(_['includes']([_0x49c4('0xb'),_0x49c4('0xc')],_0x313e73['type'])&&_0x313e73['idField']){_0x4c7d3a[_0x313e73[_0x49c4('0xd')]]=_0x313e73[_0x49c4('0xe')]['toString']();}else if(_0x313e73[_0x49c4('0xf')]===_0x49c4('0x10')&&_0x313e73['variableName']&&_0x313e73[_0x49c4('0xd')]&&_0x4487ca[_0x313e73[_0x49c4('0x11')]]){_0x4c7d3a[_0x313e73[_0x49c4('0xd')]]=_0x4487ca[_0x313e73[_0x49c4('0x11')]][_0x49c4('0x12')]();}else if(_0x313e73[_0x49c4('0xf')]===_0x49c4('0x13')&&_0x313e73[_0x49c4('0x14')]&&_0x313e73['Variable'][_0x49c4('0x15')]&&_0x313e73[_0x49c4('0xd')]&&_0x4487ca[_0x313e73[_0x49c4('0x14')][_0x49c4('0x15')][_0x49c4('0x16')]()]){_0x4c7d3a[_0x313e73['idField']]=_0x4487ca[_0x313e73[_0x49c4('0x14')][_0x49c4('0x15')]['toLowerCase']()]['toString']();}});}return _0x4c7d3a;}function createTicket(_0x3c782d,_0x2f82d5,_0x3addb2,_0x59f29b,_0x24856d,_0x50b151,_0x2cbd50){logger[_0x49c4('0x17')](_0x49c4('0x18'));var _0x291526=_[_0x49c4('0x19')]({'parent_id':'','assigned_user_id':_0x2f82d5['id'],'ticketpriorities':_0x49c4('0x1a'),'ticketstatus':_0x49c4('0x1b'),'ticket_title':intUtil[_0x49c4('0x1c')](_0x59f29b[_0x49c4('0x1d')],_0x24856d,'\x20'),'description':intUtil['getString'](_0x59f29b['Descriptions'],_0x24856d,'\x0a'),'contact_id':_0x3addb2['id']},getCustomFields(_0x50b151,_0x24856d));var _0x57f502={'method':_0x49c4('0x1e'),'uri':util['format']('%s/webservice.php',_0x3c782d[_0x49c4('0x1f')]),'form':{'operation':_0x49c4('0x20'),'username':_0x3c782d[_0x49c4('0x21')],'sessionName':_0x2cbd50[_0x49c4('0x22')],'elementType':'HelpDesk','element':JSON['stringify'](_0x291526)},'json':!![]};return request(_0x57f502)[_0x49c4('0x23')](function(_0x9cb797){if(_0x9cb797['success']){return BPromise[_0x49c4('0x24')]({'id':_0x9cb797[_0x49c4('0x25')]['id']});}else{throw new Error(util[_0x49c4('0x26')](_0x49c4('0x27'),JSON['stringify'](_0x9cb797['error'])));}})[_0x49c4('0x28')](function(_0x53c199){var _0x3800b7=_0x53c199[_0x49c4('0x29')]||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),'createTicket',_0x3800b7,JSON[_0x49c4('0x2c')](_0x53c199));});}function getUser(_0x2b2793,_0x46e04d,_0x4f28a2){if(intUtil[_0x49c4('0x2d')](_0x46e04d)){logger[_0x49c4('0x17')](_0x49c4('0x2e'),_0x46e04d);return request({'method':_0x49c4('0x2f'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x2b2793[_0x49c4('0x1f')]),'qs':{'operation':'query','username':_0x2b2793['username'],'sessionName':_0x4f28a2['sessionName'],'query':util[_0x49c4('0x26')](_0x49c4('0x31'),_0x46e04d)},'json':!![]})[_0x49c4('0x23')](function(_0x27e467){if(_0x27e467[_0x49c4('0x32')]&&_0x27e467['result'][_0x49c4('0x33')]){logger[_0x49c4('0x17')](_0x49c4('0x34'));return BPromise[_0x49c4('0x24')]({'id':_0x27e467['result'][0x0]['id'],'email':_0x27e467['result'][0x0][_0x49c4('0x35')],'name':_0x27e467[_0x49c4('0x25')][0x0][_0x49c4('0x36')]+'\x20'+_0x27e467[_0x49c4('0x25')][_0x49c4('0x37')]});}else{logger['info'](_0x49c4('0x38'));return BPromise[_0x49c4('0x24')]({'id':_0x4f28a2[_0x49c4('0x39')],'email':_0x2b2793['username'],'name':'admin'});}})[_0x49c4('0x28')](function(_0x1991e9){var _0x3bec0a=_0x1991e9[_0x49c4('0x29')]||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),_0x49c4('0x3a'),_0x3bec0a,JSON[_0x49c4('0x2c')](_0x1991e9));});}else{logger[_0x49c4('0x17')]('Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!');return BPromise[_0x49c4('0x24')]({'id':_0x4f28a2['userId'],'email':_0x2b2793[_0x49c4('0x21')],'name':_0x49c4('0x3b')})[_0x49c4('0x28')](function(_0x1c2830){var _0x4ed4f8=_0x1c2830[_0x49c4('0x29')]||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),'getUser',_0x4ed4f8,JSON[_0x49c4('0x2c')](_0x1c2830));});}}function getEndUser(_0x21d8c7,_0x178987,_0x5e5366,_0x1ba7a0){logger[_0x49c4('0x17')](_0x49c4('0x3c'),_0x5e5366);return request({'method':_0x49c4('0x2f'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x21d8c7[_0x49c4('0x1f')]),'qs':{'operation':'query','username':_0x21d8c7[_0x49c4('0x21')],'sessionName':_0x1ba7a0[_0x49c4('0x22')],'query':util[_0x49c4('0x26')](_0x49c4('0x3d'),_0x5e5366,_0x5e5366,_0x5e5366,_0x5e5366,_0x5e5366)},'json':!![]})[_0x49c4('0x23')](function(_0x29dd5d){if(_0x29dd5d[_0x49c4('0x32')]&&_0x29dd5d[_0x49c4('0x25')][_0x49c4('0x33')]){logger[_0x49c4('0x17')](_0x49c4('0x3e'));return BPromise[_0x49c4('0x24')]({'id':_0x29dd5d[_0x49c4('0x25')][0x0]['id'],'name':_0x29dd5d['result'][0x0][_0x49c4('0x3f')]+'\x20'+_0x29dd5d['result'][0x0][_0x49c4('0x40')],'phone':_0x5e5366});}else{logger[_0x49c4('0x17')](_0x49c4('0x41'));return request({'method':_0x49c4('0x1e'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x21d8c7['remoteUri']),'form':{'operation':'create','sessionName':_0x1ba7a0[_0x49c4('0x22')],'elementType':_0x49c4('0x42'),'element':JSON[_0x49c4('0x2c')]({'lastname':_0x178987,'phone':_0x5e5366,'assigned_user_id':'\x20'})},'json':!![]})[_0x49c4('0x23')](function(_0x490823){logger[_0x49c4('0x17')](_0x49c4('0x43'));return BPromise[_0x49c4('0x24')]({'id':_0x490823[_0x49c4('0x25')]['id'],'name':_0x490823[_0x49c4('0x25')][_0x49c4('0x40')],'phone':_0x490823[_0x49c4('0x25')][_0x49c4('0x44')]});})[_0x49c4('0x28')](function(_0x5640d3){var _0x2ad771=_0x5640d3['statusCode']||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),_0x49c4('0x45'),_0x2ad771,JSON[_0x49c4('0x2c')](_0x5640d3));});}});}function getConnection(_0x2d93d8){var _0x5b296d=_0x2d93d8[_0x49c4('0x21')];var _0x15b674=_0x2d93d8[_0x49c4('0x46')];return request({'method':_0x49c4('0x2f'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x2d93d8[_0x49c4('0x1f')]),'qs':{'operation':'getchallenge','username':_0x5b296d},'json':!![]})[_0x49c4('0x23')](function(_0x5cfff9){if(_0x5cfff9[_0x49c4('0x32')]){return request({'method':_0x49c4('0x1e'),'uri':util[_0x49c4('0x26')](_0x49c4('0x30'),_0x2d93d8[_0x49c4('0x1f')]),'form':{'operation':_0x49c4('0x47'),'username':_0x5b296d,'accessKey':md5(_0x5cfff9[_0x49c4('0x25')]['token']+_0x15b674)},'json':!![]});}})[_0x49c4('0x23')](function(_0x3feaf0){if(_0x3feaf0['success']){return BPromise[_0x49c4('0x24')](_0x3feaf0[_0x49c4('0x25')]);}else{throw new Error(util[_0x49c4('0x26')](_0x49c4('0x48'),_0x2d93d8['id']));}})['catch'](function(_0x5d8bf0){var _0x144fd2=_0x5d8bf0['statusCode']||0x1f4;logger[_0x49c4('0x2a')](_0x49c4('0x2b'),_0x49c4('0x49'),_0x144fd2,JSON[_0x49c4('0x2c')](_0x5d8bf0));});}function request(_0x240c20){logger[_0x49c4('0x17')](_0x49c4('0x4a'),JSON['stringify'](_0x240c20));return rp(_0x240c20);}exports[_0x49c4('0x4b')]=function(_0x1550ce,_0x3936d3,_0x3d944c,_0x17ef75,_0x2644c0,_0x156748){var _0x25d174,_0x1e0b4f,_0x1856be,_0x5b822f;_0x156748['remoteUri']=intUtil[_0x49c4('0x4c')](_0x156748[_0x49c4('0x1f')]);if(_0x2644c0&&_0x2644c0['monitor_format']){logger['info'](_0x49c4('0x4d'),'Recording\x20is\x20enabled!');_0x3936d3['recordingURL']=util[_0x49c4('0x26')](_0x49c4('0x4e'),_0x156748[_0x49c4('0x4f')],_0x3936d3[_0x49c4('0x50')],md5(_0x3936d3[_0x49c4('0x50')]));}else{_0x3936d3[_0x49c4('0x51')]='';}return getConnection(_0x156748)[_0x49c4('0x23')](function(_0x50798e){_0x5b822f=_0x50798e;return getUser(_0x156748,_0x17ef75[_0x49c4('0x52')],_0x5b822f);})[_0x49c4('0x23')](function(_0x207572){_0x25d174=_0x207572;logger[_0x49c4('0x17')](_0x49c4('0x53'),_0x25d174['id']);return getEndUser(_0x156748,_0x3936d3[_0x49c4('0x54')],_0x3936d3['calleridnum'],_0x5b822f);})['then'](function(_0x1ef0c1){_0x1e0b4f=_0x1ef0c1;logger[_0x49c4('0x17')](_0x49c4('0x55'),_0x1e0b4f['id']);return createTicket(_0x156748,_0x25d174,_0x1e0b4f,_0x3d944c,_0x3936d3,_0x3d944c[_0x49c4('0x56')],_0x5b822f);})[_0x49c4('0x23')](function(_0x6b2592){_0x1856be=_0x6b2592;logger[_0x49c4('0x17')]('Ticket\x20created!');logger[_0x49c4('0x17')](_0x49c4('0x57'),_0x1856be['id']);var _0x4ba4eb=util[_0x49c4('0x26')]('%s/index.php?module=HelpDesk&view=Detail&record=%s&app=SUPPORT',_0x156748[_0x49c4('0x1f')],_[_0x49c4('0x58')](_0x1856be['id'],'x')[0x1]);logger[_0x49c4('0x17')](_0x49c4('0x4d'),_0x49c4('0x59'));emit(util[_0x49c4('0x26')](_0x49c4('0x5a'),_0x17ef75[_0x49c4('0x15')]),'trigger:browser:url',{'uri':_0x4ba4eb});})[_0x49c4('0x28')](function(_0x27b9c2){logger['error'](_0x49c4('0x4d'),JSON[_0x49c4('0x2c')](_0x27b9c2));});};exports['outbound']=function(_0x39c455,_0x42e0e6,_0x4f50bf,_0x4dc54d,_0x589484,_0x513879,_0xc43386){var _0x54947d,_0xb20a5d,_0x32f344,_0x515240;_0x513879[_0x49c4('0x1f')]=intUtil[_0x49c4('0x4c')](_0x513879['remoteUri']);_0x513879[_0x49c4('0x4f')]=intUtil[_0x49c4('0x4c')](_0x513879[_0x49c4('0x4f')]);if(_0xc43386&&_0xc43386[_0x49c4('0x5b')]&&_0xc43386['recordingFormat']!==_0x49c4('0x5c')){logger[_0x49c4('0x17')](_0x49c4('0x5d'),_0x49c4('0x5e'));_0x42e0e6['recordingURL']=util[_0x49c4('0x26')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x513879['serverUrl'],_0x42e0e6['uniqueid'],md5(_0x42e0e6['uniqueid']));}return getConnection(_0x513879)[_0x49c4('0x23')](function(_0x32eaef){_0x515240=_0x32eaef;return getUser(_0x513879,_0x4dc54d[_0x49c4('0x52')],_0x515240);})[_0x49c4('0x23')](function(_0x5b056e){_0x54947d=_0x5b056e;logger['info'](_0x49c4('0x53'),_0x54947d['id']);return getEndUser(_0x513879,_0x42e0e6[_0x49c4('0x5f')],_0x42e0e6[_0x49c4('0x60')],_0x515240);})[_0x49c4('0x23')](function(_0x102c15){_0xb20a5d=_0x102c15;logger[_0x49c4('0x17')](_0x49c4('0x55'),_0xb20a5d['id']);return createTicket(_0x513879,_0x54947d,_0xb20a5d,_0x4f50bf,_0x42e0e6,_0x4f50bf[_0x49c4('0x56')],_0x515240);})['then'](function(_0x2276db){_0x32f344=_0x2276db;logger['info'](_0x49c4('0x61'));logger[_0x49c4('0x17')](_0x49c4('0x57'),_0x32f344['id']);var _0x1ea1b4=util[_0x49c4('0x26')](_0x49c4('0x62'),_0x513879[_0x49c4('0x1f')],_[_0x49c4('0x58')](_0x32f344['id'],'x')[0x1]);logger[_0x49c4('0x17')](_0x49c4('0x5d'),_0x49c4('0x59'));emit(util[_0x49c4('0x26')](_0x49c4('0x5a'),_0x4dc54d[_0x49c4('0x15')]),_0x49c4('0x63'),{'uri':_0x1ea1b4});})[_0x49c4('0x28')](function(_0x371e49){logger[_0x49c4('0x2a')]('[OUTBOUND]',JSON['stringify'](_0x371e49));});};exports[_0x49c4('0x64')]=function(_0x16b3e8,_0x4af680,_0x1a15f3,_0x38ad50,_0x2939fd,_0x16e7b1){var _0x4d6aaa,_0x5a14a5,_0x4a85d4,_0x2e90d8;_0x16e7b1[_0x49c4('0x1f')]=intUtil[_0x49c4('0x4c')](_0x16e7b1[_0x49c4('0x1f')]);_0x16e7b1[_0x49c4('0x4f')]=intUtil[_0x49c4('0x4c')](_0x16e7b1[_0x49c4('0x4f')]);if(_0x2939fd&&_0x2939fd[_0x49c4('0x65')]){logger[_0x49c4('0x17')]('['+_0x4af680['lastevent'][_0x49c4('0x66')]()+']',_0x49c4('0x5e'));_0x4af680[_0x49c4('0x51')]=util['format'](_0x49c4('0x4e'),_0x16e7b1[_0x49c4('0x4f')],_0x4af680[_0x49c4('0x50')],md5(_0x4af680[_0x49c4('0x50')]));}else{_0x4af680[_0x49c4('0x51')]='';}return getConnection(_0x16e7b1)[_0x49c4('0x23')](function(_0x35fa39){_0x2e90d8=_0x35fa39;return getUser(_0x16e7b1,'',_0x2e90d8);})[_0x49c4('0x23')](function(_0x4ba198){_0x4d6aaa=_0x4ba198;logger[_0x49c4('0x17')](_0x49c4('0x53'),_0x4d6aaa['id']);return getEndUser(_0x16e7b1,_0x4af680[_0x49c4('0x54')],_0x4af680[_0x49c4('0x67')],_0x2e90d8);})[_0x49c4('0x23')](function(_0x4a204d){_0x5a14a5=_0x4a204d;logger['info'](_0x49c4('0x55'),_0x5a14a5['id']);return createTicket(_0x16e7b1,_0x4d6aaa,_0x5a14a5,_0x1a15f3,_0x4af680,_0x1a15f3['Fields'],_0x2e90d8);})[_0x49c4('0x23')](function(_0x558880){_0x4a85d4=_0x558880;logger[_0x49c4('0x17')](_0x49c4('0x61'));logger[_0x49c4('0x17')](_0x49c4('0x57'),_0x4a85d4['id']);})['catch'](function(_0x123060){logger[_0x49c4('0x2a')]('['+_0x4af680[_0x49c4('0x68')][_0x49c4('0x66')]()+']',JSON[_0x49c4('0x2c')](_0x123060));});};
\ No newline at end of file
index 9fa910d..84b5a42 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9b15=['integrationTab','%s/channels/voice/agents/%d/tickets/%d/display.json','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','%s/agent/tickets/%s','replace','Zendesk\x20account\x20type\x20not\x20recognized','catch','error','[QUEUE]\x20Error\x20running\x20Zendesk\x20integration','inspect','outbound','recordingFormat','Recording\x20is\x20enabled!','email','The\x20User\x20ID\x20is:','destcalleridnum','[OUTBOUND]','Displaying\x20ticket\x20to\x20agent...','newTab','trigger:browser:url','/api/v2','[OUTBOUND]\x20Error\x20running\x20Zendesk\x20integration','lastevent','toUpperCase','\x20Error\x20running\x20Zendesk\x20integration','lodash','md5','ioredis','../../../../config/environment','../../../../config/logger','zendesk','redis','defaults','socket.io-emitter','emit','application/json','info','Creating\x20new\x20ticket...','format','%s/tickets.json','remoteUri','POST','merge','Tags','name','getString','Subjects','Descriptions','Fields','then','Ticket\x20created!','ticket','validateEmail','Getting\x20agent\x20with\x20email','%s/search.json','type:user\x20role:agent\x20email:%s','count','find','results','agent','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me.json','Admin\x20account\x20selected.','user','filter','end-user','length','first','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','%s/users.json','Caller\x20-\x20%s','authType','%s:%s','username','password','token','Basic\x20%s','toString','debug','[HTTP]','stringify','GET','includes','string','picklist','type','nameField','customField','content','idField','push','variable','variableName','customVariable','Variable','toLowerCase','custom_fields','queue','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','recordingURL','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','uniqueid','Authorization','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:'];(function(_0x1f6ab1,_0x251250){var _0x18e58a=function(_0x544c20){while(--_0x544c20){_0x1f6ab1['push'](_0x1f6ab1['shift']());}};_0x18e58a(++_0x251250);}(_0x9b15,0xf8));var _0x59b1=function(_0x38cfd9,_0xac652b){_0x38cfd9=_0x38cfd9-0x0;var _0x83c895=_0x9b15[_0x38cfd9];return _0x83c895;};'use strict';var _=require(_0x59b1('0x0'));var rp=require('request-promise');var md5=require(_0x59b1('0x1'));var util=require('util');var Redis=require(_0x59b1('0x2'));var intUtil=require('./util');var config=require(_0x59b1('0x3'));var logger=require(_0x59b1('0x4'))(_0x59b1('0x5'));config[_0x59b1('0x6')]=_[_0x59b1('0x7')](config[_0x59b1('0x6')],{'host':'localhost','port':0x18eb});var io=require(_0x59b1('0x8'))(new Redis(config[_0x59b1('0x6')]));function emit(_0xe6126b,_0x5d626c,_0x31e0b4){io['to'](_0xe6126b)[_0x59b1('0x9')](_0x5d626c,_0x31e0b4);}var headers={'Content-Type':'application/json','Accept':_0x59b1('0xa')};function getTicket(_0x30058e,_0x430458,_0x185d71,_0x598881,_0x251e86){logger[_0x59b1('0xb')](_0x59b1('0xc'));return request({'uri':util[_0x59b1('0xd')](_0x59b1('0xe'),_0x30058e[_0x59b1('0xf')]),'method':_0x59b1('0x10'),'body':{'ticket':_[_0x59b1('0x11')]({'requester_id':_0x185d71['id'],'submitter_id':_0x430458?_0x430458['id']:undefined,'assignee_id':_0x430458?_0x430458['id']:undefined,'tags':getTags(_0x598881[_0x59b1('0x12')],_0x59b1('0x13')),'subject':intUtil[_0x59b1('0x14')](_0x598881[_0x59b1('0x15')],_0x251e86,'\x20'),'description':intUtil['getString'](_0x598881[_0x59b1('0x16')],_0x251e86,'\x0a'),'comment':{'public':![],'body':intUtil['getString'](_0x598881[_0x59b1('0x16')],_0x251e86,'\x0a')}},getCustomFields(_0x598881[_0x59b1('0x17')],_0x251e86))}})[_0x59b1('0x18')](function(_0x36284f){logger[_0x59b1('0xb')](_0x59b1('0x19'));return _0x36284f[_0x59b1('0x1a')];});}function getUser(_0x149848,_0x22d213){if(intUtil[_0x59b1('0x1b')](_0x22d213)){logger['info'](_0x59b1('0x1c'),_0x22d213);return request({'uri':util[_0x59b1('0xd')](_0x59b1('0x1d'),_0x149848[_0x59b1('0xf')]),'qs':{'query':util['format'](_0x59b1('0x1e'),_0x22d213)}})['then'](function(_0x3080a4){if(_0x3080a4[_0x59b1('0x1f')]){logger[_0x59b1('0xb')]('Agent\x20found!');return _[_0x59b1('0x20')](_0x3080a4[_0x59b1('0x21')],{'email':_0x22d213,'role':_0x59b1('0x22')});}else{logger[_0x59b1('0xb')](_0x59b1('0x23'));return request({'uri':util['format'](_0x59b1('0x24'),_0x149848[_0x59b1('0xf')])})['then'](function(_0x4ed475){logger[_0x59b1('0xb')](_0x59b1('0x25'));return _0x4ed475['user'];});}});}else{logger['info'](_0x59b1('0x23'));return request({'uri':util['format'](_0x59b1('0x24'),_0x149848['remoteUri'])})[_0x59b1('0x18')](function(_0x35e060){logger[_0x59b1('0xb')](_0x59b1('0x25'));return _0x35e060[_0x59b1('0x26')];});}}function getEndUser(_0x57ece7,_0x9c1690,_0x240303){logger['info']('Searching\x20enduser\x20with\x20phone',_0x240303);return request({'uri':util[_0x59b1('0xd')](_0x59b1('0x1d'),_0x57ece7[_0x59b1('0xf')]),'qs':{'query':util[_0x59b1('0xd')]('type:user\x20role:end-user\x20phone:%s',_0x240303)}})['then'](function(_0x13bf77){var _0x30e3e2;if(_0x13bf77[_0x59b1('0x21')]['length']){_0x13bf77[_0x59b1('0x21')]=_[_0x59b1('0x27')](_0x13bf77['results'],{'suspended':![],'role':_0x59b1('0x28')});if(_0x13bf77['results'][_0x59b1('0x29')]){_0x30e3e2=_[_0x59b1('0x2a')](_0x13bf77[_0x59b1('0x21')]);}}if(_0x30e3e2){logger[_0x59b1('0xb')]('Enduser\x20found!');return _0x30e3e2;}else{logger['info'](_0x59b1('0x2b'));return request({'uri':util['format'](_0x59b1('0x2c'),_0x57ece7['remoteUri']),'method':_0x59b1('0x10'),'body':{'user':{'role':'end-user','name':util['format'](_0x59b1('0x2d'),_0x9c1690||_0x240303),'phone':_0x240303}}})['then'](function(_0x1544ed){logger['info']('Enduser\x20created.');return _0x1544ed[_0x59b1('0x26')];});}});}function getAuth(_0x2180a0){var _0x13f497;if(_0x2180a0[_0x59b1('0x2e')]==='password'){_0x13f497=util[_0x59b1('0xd')](_0x59b1('0x2f'),_0x2180a0[_0x59b1('0x30')],_0x2180a0[_0x59b1('0x31')]);}else if(_0x2180a0[_0x59b1('0x2e')]===_0x59b1('0x32')){_0x13f497=util[_0x59b1('0xd')]('%s/token:%s',_0x2180a0[_0x59b1('0x30')],_0x2180a0[_0x59b1('0x32')]);}return util[_0x59b1('0xd')](_0x59b1('0x33'),new Buffer(_0x13f497)[_0x59b1('0x34')]('base64'));}function request(_0x14de0e){logger[_0x59b1('0x35')](_0x59b1('0x36'),JSON[_0x59b1('0x37')](_0x14de0e));return rp(_['defaults'](_0x14de0e,{'method':_0x59b1('0x38'),'headers':headers,'json':!![]}));}function getTags(_0x555edb,_0x3722be){var _0x76ecb0=[];if(_0x555edb&&_0x555edb[_0x59b1('0x29')]>0x0){_0x76ecb0=_['map'](_0x555edb,_0x3722be);}return _0x76ecb0;}function getCustomFields(_0x3aa4a6,_0x1cd8e3){var _0xf69b52=[];var _0x4eaca8={'custom_fields':[]};if(_0x3aa4a6['length']>0x0){_['forEach'](_0x3aa4a6,function(_0x26d6c6){if(_[_0x59b1('0x39')]([_0x59b1('0x3a'),_0x59b1('0x3b')],_0x26d6c6[_0x59b1('0x3c')])&&_0x26d6c6[_0x59b1('0x3d')]&&!_0x26d6c6[_0x59b1('0x3e')]){_0x4eaca8[_0x26d6c6[_0x59b1('0x3d')]['toLowerCase']()]=_0x26d6c6[_0x59b1('0x3f')]['toString']();}else if(_['includes']([_0x59b1('0x3a'),_0x59b1('0x3b')],_0x26d6c6['type'])&&_0x26d6c6[_0x59b1('0x40')]&&_0x26d6c6['customField']){_0x4eaca8['custom_fields'][_0x59b1('0x41')]({'id':_0x26d6c6[_0x59b1('0x40')],'value':_0x26d6c6[_0x59b1('0x3f')][_0x59b1('0x34')]()});}else if(_0x26d6c6[_0x59b1('0x3c')]===_0x59b1('0x42')&&_0x26d6c6[_0x59b1('0x43')]&&_0x26d6c6[_0x59b1('0x40')]&&_0x26d6c6[_0x59b1('0x3e')]){_0x1cd8e3[_0x26d6c6[_0x59b1('0x43')]]&&_0x4eaca8['custom_fields'][_0x59b1('0x41')]({'id':_0x26d6c6[_0x59b1('0x40')],'value':_0x1cd8e3[_0x26d6c6[_0x59b1('0x43')]][_0x59b1('0x34')]()});}else if(_0x26d6c6['type']===_0x59b1('0x44')&&_0x26d6c6[_0x59b1('0x45')]&&_0x26d6c6[_0x59b1('0x45')][_0x59b1('0x13')]&&_0x26d6c6[_0x59b1('0x40')]&&_0x26d6c6['customField']){_0x1cd8e3[_0x26d6c6['Variable'][_0x59b1('0x13')][_0x59b1('0x46')]()]&&_0x4eaca8[_0x59b1('0x47')][_0x59b1('0x41')]({'id':_0x26d6c6[_0x59b1('0x40')],'value':_0x1cd8e3[_0x26d6c6[_0x59b1('0x45')][_0x59b1('0x13')]['toLowerCase']()][_0x59b1('0x34')]()});}});}return _0x4eaca8;}exports[_0x59b1('0x48')]=function(_0x55e63c,_0x33a95a,_0xdad03,_0x4448d9,_0x2c1b70,_0x5da272){var _0x42d392,_0x367a1c;_0x5da272[_0x59b1('0xf')]=intUtil['stripTrailingSlash'](_0x5da272['remoteUri']);_0x5da272['serverUrl']=intUtil[_0x59b1('0x49')](_0x5da272[_0x59b1('0x4a')]);if(_0x2c1b70&&_0x2c1b70[_0x59b1('0x4b')]){logger['info'](_0x59b1('0x4c'),'Recording\x20is\x20enabled!');_0x33a95a[_0x59b1('0x4d')]=util['format'](_0x59b1('0x4e'),_0x5da272[_0x59b1('0x4a')],_0x33a95a['uniqueid'],md5(_0x33a95a[_0x59b1('0x4f')]));}else{_0x33a95a[_0x59b1('0x4d')]='';}headers[_0x59b1('0x50')]=getAuth(_0x5da272);return getUser(_0x5da272,_0x4448d9['email'])[_0x59b1('0x18')](function(_0x4e3e8c){_0x42d392=_0x4e3e8c;logger[_0x59b1('0xb')]('The\x20User\x20ID\x20is:',_0x42d392['id']);return getEndUser(_0x5da272,_0x33a95a[_0x59b1('0x51')],_0x33a95a[_0x59b1('0x52')]);})[_0x59b1('0x18')](function(_0xdf6a84){_0x367a1c=_0xdf6a84;logger[_0x59b1('0xb')](_0x59b1('0x53'),_0x367a1c['id']);return getTicket(_0x5da272,_0x42d392,_0x367a1c,_0xdad03,_0x33a95a);})[_0x59b1('0x18')](function(_0x9a729){if(_0x9a729){logger['info'](_0x59b1('0x54'),_0x9a729['id']);switch(_0x5da272[_0x59b1('0x3c')]){case _0x59b1('0x55'):logger[_0x59b1('0xb')]('[QUEUE]','Displaying\x20ticket\x20to\x20agent...');return request({'uri':util[_0x59b1('0xd')](_0x59b1('0x56'),_0x5da272['remoteUri'],_0x42d392['id'],_0x9a729['id']),'method':_0x59b1('0x10')});case'newTab':logger[_0x59b1('0xb')](_0x59b1('0x4c'),_0x59b1('0x57'));emit(util[_0x59b1('0xd')](_0x59b1('0x58'),_0x4448d9[_0x59b1('0x13')]),'trigger:browser:url',{'uri':util['format'](_0x59b1('0x59'),_0x5da272[_0x59b1('0xf')][_0x59b1('0x5a')]('/api/v2',''),_0x9a729['id'])});break;default:logger['error'](_0x59b1('0x4c'),_0x59b1('0x5b'));}}})[_0x59b1('0x5c')](function(_0xe2ef9c){logger[_0x59b1('0x5d')](_0x59b1('0x5e'),util[_0x59b1('0x5f')](_0xe2ef9c,{'showHidden':!![],'depth':null}));});};exports[_0x59b1('0x60')]=function(_0x2c9714,_0x416783,_0x18dee0,_0x5603ac,_0x53314a,_0x31ba56,_0x19fd9d){var _0x19d0e6,_0x307cfb;_0x31ba56['remoteUri']=intUtil[_0x59b1('0x49')](_0x31ba56[_0x59b1('0xf')]);_0x31ba56[_0x59b1('0x4a')]=intUtil[_0x59b1('0x49')](_0x31ba56[_0x59b1('0x4a')]);if(_0x19fd9d&&_0x19fd9d['recordingFormat']&&_0x19fd9d[_0x59b1('0x61')]!=='none'){logger[_0x59b1('0xb')]('[OUTBOUND]',_0x59b1('0x62'));_0x416783[_0x59b1('0x4d')]=util[_0x59b1('0xd')](_0x59b1('0x4e'),_0x31ba56[_0x59b1('0x4a')],_0x416783[_0x59b1('0x4f')],md5(_0x416783[_0x59b1('0x4f')]));}headers[_0x59b1('0x50')]=getAuth(_0x31ba56);return getUser(_0x31ba56,_0x5603ac[_0x59b1('0x63')])['then'](function(_0x16fa19){_0x19d0e6=_0x16fa19;logger[_0x59b1('0xb')](_0x59b1('0x64'),_0x19d0e6['id']);return getEndUser(_0x31ba56,_0x416783['destcalleridname'],_0x416783[_0x59b1('0x65')]);})[_0x59b1('0x18')](function(_0x1536ee){_0x307cfb=_0x1536ee;logger[_0x59b1('0xb')](_0x59b1('0x53'),_0x307cfb['id']);return getTicket(_0x31ba56,_0x19d0e6,_0x307cfb,_0x18dee0,_0x416783);})[_0x59b1('0x18')](function(_0x5465af){if(_0x5465af){logger[_0x59b1('0xb')](_0x59b1('0x54'),_0x5465af['id']);switch(_0x31ba56[_0x59b1('0x3c')]){case _0x59b1('0x55'):logger[_0x59b1('0xb')](_0x59b1('0x66'),_0x59b1('0x67'));return request({'uri':util[_0x59b1('0xd')](_0x59b1('0x56'),_0x31ba56[_0x59b1('0xf')],_0x19d0e6['id'],_0x5465af['id']),'method':_0x59b1('0x10')});case _0x59b1('0x68'):logger['info'](_0x59b1('0x66'),'Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x59b1('0xd')](_0x59b1('0x58'),_0x5603ac[_0x59b1('0x13')]),_0x59b1('0x69'),{'uri':util['format']('%s/agent/tickets/%s',_0x31ba56['remoteUri']['replace'](_0x59b1('0x6a'),''),_0x5465af['id'])});break;default:logger[_0x59b1('0x5d')](_0x59b1('0x66'),_0x59b1('0x5b'));}}})[_0x59b1('0x5c')](function(_0x34856e){logger[_0x59b1('0x5d')](_0x59b1('0x6b'),util[_0x59b1('0x5f')](_0x34856e,{'showHidden':!![],'depth':null}));});};exports['unmanaged']=function(_0x2cdf93,_0x597b29,_0x4cb18d,_0x18a69e,_0x1a7f9d,_0x532f89){var _0x496e8e,_0x6c1f7c;_0x532f89[_0x59b1('0xf')]=intUtil[_0x59b1('0x49')](_0x532f89[_0x59b1('0xf')]);_0x532f89[_0x59b1('0x4a')]=intUtil[_0x59b1('0x49')](_0x532f89['serverUrl']);if(_0x1a7f9d&&_0x1a7f9d[_0x59b1('0x4b')]){logger[_0x59b1('0xb')]('['+_0x597b29[_0x59b1('0x6c')][_0x59b1('0x6d')]()+']',_0x59b1('0x62'));_0x597b29[_0x59b1('0x4d')]=util[_0x59b1('0xd')](_0x59b1('0x4e'),_0x532f89[_0x59b1('0x4a')],_0x597b29['uniqueid'],md5(_0x597b29[_0x59b1('0x4f')]));}else{_0x597b29[_0x59b1('0x4d')]='';}headers[_0x59b1('0x50')]=getAuth(_0x532f89);return getUser(_0x532f89)[_0x59b1('0x18')](function(_0x557964){_0x496e8e=_0x557964;logger[_0x59b1('0xb')](_0x59b1('0x64'),_0x496e8e['id']);return getEndUser(_0x532f89,_0x597b29[_0x59b1('0x51')],_0x597b29[_0x59b1('0x52')]);})['then'](function(_0x4b4910){_0x6c1f7c=_0x4b4910;logger[_0x59b1('0xb')](_0x59b1('0x53'),_0x6c1f7c['id']);return getTicket(_0x532f89,_0x496e8e,_0x6c1f7c,_0x4cb18d,_0x597b29);})[_0x59b1('0x18')](function(_0x3e8d70){if(_0x3e8d70){logger[_0x59b1('0xb')](_0x59b1('0x54'),_0x3e8d70['id']);}})[_0x59b1('0x5c')](function(_0x4aa1e7){logger[_0x59b1('0x5d')]('['+_0x597b29['lastevent'][_0x59b1('0x6d')]()+']'+_0x59b1('0x6e'),util[_0x59b1('0x5f')](_0x4aa1e7,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
+var _0x1d29=['unmanaged','lastevent','toUpperCase','\x20Error\x20running\x20Zendesk\x20integration','request-promise','util','ioredis','./util','../../../../config/logger','zendesk','application/json','Creating\x20new\x20ticket...','format','%s/tickets.json','remoteUri','POST','Tags','name','getString','Subjects','Descriptions','Fields','then','Ticket\x20created!','ticket','validateEmail','Getting\x20agent\x20with\x20email','%s/search.json','type:user\x20role:agent\x20email:%s','count','info','Agent\x20found!','find','results','Agent\x20not\x20found,\x20using\x20the\x20admin\x20account!','%s/users/me.json','Admin\x20account\x20selected.','user','type:user\x20role:end-user\x20phone:%s','length','filter','end-user','first','Enduser\x20found!','Enduser\x20not\x20found,\x20creating\x20a\x20new\x20enduser!','%s/users.json','Caller\x20-\x20%s','authType','password','%s:%s','token','Basic\x20%s','base64','debug','[HTTP]','stringify','defaults','GET','map','forEach','includes','string','picklist','type','nameField','toLowerCase','content','toString','idField','customField','custom_fields','push','variable','variableName','Variable','queue','serverUrl','stripTrailingSlash','monitor_format','Recording\x20is\x20enabled!','recordingURL','uniqueid','Authorization','email','The\x20User\x20ID\x20is:','calleridname','calleridnum','The\x20Enduser\x20ID\x20is:','The\x20Ticket\x20ID\x20is:','integrationTab','[QUEUE]','newTab','Displaying\x20ticket\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','%s/agent/tickets/%s','replace','/api/v2','Zendesk\x20account\x20type\x20not\x20recognized','catch','error','[QUEUE]\x20Error\x20running\x20Zendesk\x20integration','inspect','outbound','recordingFormat','none','%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s','destcalleridname','destcalleridnum','[OUTBOUND]','Displaying\x20ticket\x20to\x20agent...','%s/channels/voice/agents/%d/tickets/%d/display.json','[OUTBOUND]\x20Error\x20running\x20Zendesk\x20integration'];(function(_0x2d050a,_0x24afcd){var _0x494ab3=function(_0xa2e984){while(--_0xa2e984){_0x2d050a['push'](_0x2d050a['shift']());}};_0x494ab3(++_0x24afcd);}(_0x1d29,0xe6));var _0x91d2=function(_0x4b5733,_0x345f7a){_0x4b5733=_0x4b5733-0x0;var _0x511d04=_0x1d29[_0x4b5733];return _0x511d04;};'use strict';var _=require('lodash');var rp=require(_0x91d2('0x0'));var md5=require('md5');var util=require(_0x91d2('0x1'));var Redis=require(_0x91d2('0x2'));var intUtil=require(_0x91d2('0x3'));var config=require('../../../../config/environment');var logger=require(_0x91d2('0x4'))(_0x91d2('0x5'));config['redis']=_['defaults'](config['redis'],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function emit(_0x115bee,_0x2a983b,_0x2f16b5){io['to'](_0x115bee)['emit'](_0x2a983b,_0x2f16b5);}var headers={'Content-Type':_0x91d2('0x6'),'Accept':'application/json'};function getTicket(_0x3db016,_0x1d01b6,_0x11e10f,_0x2ec516,_0x36236d){logger['info'](_0x91d2('0x7'));return request({'uri':util[_0x91d2('0x8')](_0x91d2('0x9'),_0x3db016[_0x91d2('0xa')]),'method':_0x91d2('0xb'),'body':{'ticket':_['merge']({'requester_id':_0x11e10f['id'],'submitter_id':_0x1d01b6?_0x1d01b6['id']:undefined,'assignee_id':_0x1d01b6?_0x1d01b6['id']:undefined,'tags':getTags(_0x2ec516[_0x91d2('0xc')],_0x91d2('0xd')),'subject':intUtil[_0x91d2('0xe')](_0x2ec516[_0x91d2('0xf')],_0x36236d,'\x20'),'description':intUtil[_0x91d2('0xe')](_0x2ec516[_0x91d2('0x10')],_0x36236d,'\x0a'),'comment':{'public':![],'body':intUtil[_0x91d2('0xe')](_0x2ec516[_0x91d2('0x10')],_0x36236d,'\x0a')}},getCustomFields(_0x2ec516[_0x91d2('0x11')],_0x36236d))}})[_0x91d2('0x12')](function(_0x15acf8){logger['info'](_0x91d2('0x13'));return _0x15acf8[_0x91d2('0x14')];});}function getUser(_0xe4dcb7,_0x58bd74){if(intUtil[_0x91d2('0x15')](_0x58bd74)){logger['info'](_0x91d2('0x16'),_0x58bd74);return request({'uri':util['format'](_0x91d2('0x17'),_0xe4dcb7[_0x91d2('0xa')]),'qs':{'query':util[_0x91d2('0x8')](_0x91d2('0x18'),_0x58bd74)}})['then'](function(_0x3206f7){if(_0x3206f7[_0x91d2('0x19')]){logger[_0x91d2('0x1a')](_0x91d2('0x1b'));return _[_0x91d2('0x1c')](_0x3206f7[_0x91d2('0x1d')],{'email':_0x58bd74,'role':'agent'});}else{logger[_0x91d2('0x1a')](_0x91d2('0x1e'));return request({'uri':util[_0x91d2('0x8')](_0x91d2('0x1f'),_0xe4dcb7[_0x91d2('0xa')])})[_0x91d2('0x12')](function(_0x369d55){logger[_0x91d2('0x1a')](_0x91d2('0x20'));return _0x369d55[_0x91d2('0x21')];});}});}else{logger[_0x91d2('0x1a')](_0x91d2('0x1e'));return request({'uri':util[_0x91d2('0x8')](_0x91d2('0x1f'),_0xe4dcb7['remoteUri'])})[_0x91d2('0x12')](function(_0x31ecfd){logger[_0x91d2('0x1a')](_0x91d2('0x20'));return _0x31ecfd['user'];});}}function getEndUser(_0x17d47d,_0x444dee,_0x2de48a){logger['info']('Searching\x20enduser\x20with\x20phone',_0x2de48a);return request({'uri':util[_0x91d2('0x8')](_0x91d2('0x17'),_0x17d47d[_0x91d2('0xa')]),'qs':{'query':util['format'](_0x91d2('0x22'),_0x2de48a)}})['then'](function(_0x4f5711){var _0x155784;if(_0x4f5711['results'][_0x91d2('0x23')]){_0x4f5711[_0x91d2('0x1d')]=_[_0x91d2('0x24')](_0x4f5711[_0x91d2('0x1d')],{'suspended':![],'role':_0x91d2('0x25')});if(_0x4f5711[_0x91d2('0x1d')][_0x91d2('0x23')]){_0x155784=_[_0x91d2('0x26')](_0x4f5711[_0x91d2('0x1d')]);}}if(_0x155784){logger[_0x91d2('0x1a')](_0x91d2('0x27'));return _0x155784;}else{logger[_0x91d2('0x1a')](_0x91d2('0x28'));return request({'uri':util[_0x91d2('0x8')](_0x91d2('0x29'),_0x17d47d[_0x91d2('0xa')]),'method':_0x91d2('0xb'),'body':{'user':{'role':_0x91d2('0x25'),'name':util[_0x91d2('0x8')](_0x91d2('0x2a'),_0x444dee||_0x2de48a),'phone':_0x2de48a}}})['then'](function(_0x433b2b){logger[_0x91d2('0x1a')]('Enduser\x20created.');return _0x433b2b[_0x91d2('0x21')];});}});}function getAuth(_0x3babeb){var _0x25d388;if(_0x3babeb[_0x91d2('0x2b')]===_0x91d2('0x2c')){_0x25d388=util[_0x91d2('0x8')](_0x91d2('0x2d'),_0x3babeb['username'],_0x3babeb[_0x91d2('0x2c')]);}else if(_0x3babeb[_0x91d2('0x2b')]===_0x91d2('0x2e')){_0x25d388=util[_0x91d2('0x8')]('%s/token:%s',_0x3babeb['username'],_0x3babeb[_0x91d2('0x2e')]);}return util['format'](_0x91d2('0x2f'),new Buffer(_0x25d388)['toString'](_0x91d2('0x30')));}function request(_0x5cc5b1){logger[_0x91d2('0x31')](_0x91d2('0x32'),JSON[_0x91d2('0x33')](_0x5cc5b1));return rp(_[_0x91d2('0x34')](_0x5cc5b1,{'method':_0x91d2('0x35'),'headers':headers,'json':!![]}));}function getTags(_0x3db45c,_0x41c31f){var _0x76833f=[];if(_0x3db45c&&_0x3db45c[_0x91d2('0x23')]>0x0){_0x76833f=_[_0x91d2('0x36')](_0x3db45c,_0x41c31f);}return _0x76833f;}function getCustomFields(_0x4deb41,_0x386f71){var _0x413a71=[];var _0x17e4d0={'custom_fields':[]};if(_0x4deb41[_0x91d2('0x23')]>0x0){_[_0x91d2('0x37')](_0x4deb41,function(_0x48cdda){if(_[_0x91d2('0x38')]([_0x91d2('0x39'),_0x91d2('0x3a')],_0x48cdda[_0x91d2('0x3b')])&&_0x48cdda[_0x91d2('0x3c')]&&!_0x48cdda['customField']){_0x17e4d0[_0x48cdda[_0x91d2('0x3c')][_0x91d2('0x3d')]()]=_0x48cdda[_0x91d2('0x3e')][_0x91d2('0x3f')]();}else if(_[_0x91d2('0x38')]([_0x91d2('0x39'),_0x91d2('0x3a')],_0x48cdda[_0x91d2('0x3b')])&&_0x48cdda[_0x91d2('0x40')]&&_0x48cdda[_0x91d2('0x41')]){_0x17e4d0[_0x91d2('0x42')][_0x91d2('0x43')]({'id':_0x48cdda[_0x91d2('0x40')],'value':_0x48cdda[_0x91d2('0x3e')][_0x91d2('0x3f')]()});}else if(_0x48cdda[_0x91d2('0x3b')]===_0x91d2('0x44')&&_0x48cdda[_0x91d2('0x45')]&&_0x48cdda['idField']&&_0x48cdda[_0x91d2('0x41')]){_0x386f71[_0x48cdda[_0x91d2('0x45')]]&&_0x17e4d0['custom_fields'][_0x91d2('0x43')]({'id':_0x48cdda[_0x91d2('0x40')],'value':_0x386f71[_0x48cdda[_0x91d2('0x45')]][_0x91d2('0x3f')]()});}else if(_0x48cdda[_0x91d2('0x3b')]==='customVariable'&&_0x48cdda[_0x91d2('0x46')]&&_0x48cdda['Variable'][_0x91d2('0xd')]&&_0x48cdda[_0x91d2('0x40')]&&_0x48cdda[_0x91d2('0x41')]){_0x386f71[_0x48cdda[_0x91d2('0x46')][_0x91d2('0xd')][_0x91d2('0x3d')]()]&&_0x17e4d0['custom_fields']['push']({'id':_0x48cdda[_0x91d2('0x40')],'value':_0x386f71[_0x48cdda[_0x91d2('0x46')][_0x91d2('0xd')]['toLowerCase']()]['toString']()});}});}return _0x17e4d0;}exports[_0x91d2('0x47')]=function(_0x5316f7,_0x41b313,_0x101112,_0x329bbc,_0x1ecc86,_0x2218db){var _0x42a315,_0x5799e9;_0x2218db[_0x91d2('0xa')]=intUtil['stripTrailingSlash'](_0x2218db[_0x91d2('0xa')]);_0x2218db[_0x91d2('0x48')]=intUtil[_0x91d2('0x49')](_0x2218db[_0x91d2('0x48')]);if(_0x1ecc86&&_0x1ecc86[_0x91d2('0x4a')]){logger[_0x91d2('0x1a')]('[QUEUE]',_0x91d2('0x4b'));_0x41b313[_0x91d2('0x4c')]=util[_0x91d2('0x8')]('%s/api/voice/recordings/%s/downloads?type=uniqueid&token=%s',_0x2218db[_0x91d2('0x48')],_0x41b313[_0x91d2('0x4d')],md5(_0x41b313[_0x91d2('0x4d')]));}else{_0x41b313['recordingURL']='';}headers[_0x91d2('0x4e')]=getAuth(_0x2218db);return getUser(_0x2218db,_0x329bbc[_0x91d2('0x4f')])[_0x91d2('0x12')](function(_0x5258ea){_0x42a315=_0x5258ea;logger[_0x91d2('0x1a')](_0x91d2('0x50'),_0x42a315['id']);return getEndUser(_0x2218db,_0x41b313[_0x91d2('0x51')],_0x41b313[_0x91d2('0x52')]);})[_0x91d2('0x12')](function(_0x3ab521){_0x5799e9=_0x3ab521;logger[_0x91d2('0x1a')](_0x91d2('0x53'),_0x5799e9['id']);return getTicket(_0x2218db,_0x42a315,_0x5799e9,_0x101112,_0x41b313);})[_0x91d2('0x12')](function(_0x169e0d){if(_0x169e0d){logger[_0x91d2('0x1a')](_0x91d2('0x54'),_0x169e0d['id']);switch(_0x2218db[_0x91d2('0x3b')]){case _0x91d2('0x55'):logger[_0x91d2('0x1a')](_0x91d2('0x56'),'Displaying\x20ticket\x20to\x20agent...');return request({'uri':util[_0x91d2('0x8')]('%s/channels/voice/agents/%d/tickets/%d/display.json',_0x2218db[_0x91d2('0xa')],_0x42a315['id'],_0x169e0d['id']),'method':'POST'});case _0x91d2('0x57'):logger['info'](_0x91d2('0x56'),_0x91d2('0x58'));emit(util[_0x91d2('0x8')](_0x91d2('0x59'),_0x329bbc[_0x91d2('0xd')]),_0x91d2('0x5a'),{'uri':util[_0x91d2('0x8')](_0x91d2('0x5b'),_0x2218db[_0x91d2('0xa')][_0x91d2('0x5c')](_0x91d2('0x5d'),''),_0x169e0d['id'])});break;default:logger['error'](_0x91d2('0x56'),_0x91d2('0x5e'));}}})[_0x91d2('0x5f')](function(_0x47db46){logger[_0x91d2('0x60')](_0x91d2('0x61'),util[_0x91d2('0x62')](_0x47db46,{'showHidden':!![],'depth':null}));});};exports[_0x91d2('0x63')]=function(_0x54115e,_0x57df72,_0x3446cc,_0xfe20c,_0x4fa4a4,_0x8f0ce6,_0x1db250){var _0x29334a,_0x33f6dd;_0x8f0ce6[_0x91d2('0xa')]=intUtil[_0x91d2('0x49')](_0x8f0ce6[_0x91d2('0xa')]);_0x8f0ce6['serverUrl']=intUtil[_0x91d2('0x49')](_0x8f0ce6[_0x91d2('0x48')]);if(_0x1db250&&_0x1db250[_0x91d2('0x64')]&&_0x1db250[_0x91d2('0x64')]!==_0x91d2('0x65')){logger[_0x91d2('0x1a')]('[OUTBOUND]',_0x91d2('0x4b'));_0x57df72[_0x91d2('0x4c')]=util[_0x91d2('0x8')](_0x91d2('0x66'),_0x8f0ce6[_0x91d2('0x48')],_0x57df72[_0x91d2('0x4d')],md5(_0x57df72[_0x91d2('0x4d')]));}headers[_0x91d2('0x4e')]=getAuth(_0x8f0ce6);return getUser(_0x8f0ce6,_0xfe20c['email'])[_0x91d2('0x12')](function(_0x493f8b){_0x29334a=_0x493f8b;logger['info'](_0x91d2('0x50'),_0x29334a['id']);return getEndUser(_0x8f0ce6,_0x57df72[_0x91d2('0x67')],_0x57df72[_0x91d2('0x68')]);})[_0x91d2('0x12')](function(_0x249ca9){_0x33f6dd=_0x249ca9;logger['info']('The\x20Enduser\x20ID\x20is:',_0x33f6dd['id']);return getTicket(_0x8f0ce6,_0x29334a,_0x33f6dd,_0x3446cc,_0x57df72);})[_0x91d2('0x12')](function(_0x24d214){if(_0x24d214){logger[_0x91d2('0x1a')](_0x91d2('0x54'),_0x24d214['id']);switch(_0x8f0ce6[_0x91d2('0x3b')]){case _0x91d2('0x55'):logger['info'](_0x91d2('0x69'),_0x91d2('0x6a'));return request({'uri':util[_0x91d2('0x8')](_0x91d2('0x6b'),_0x8f0ce6[_0x91d2('0xa')],_0x29334a['id'],_0x24d214['id']),'method':_0x91d2('0xb')});case'newTab':logger[_0x91d2('0x1a')](_0x91d2('0x69'),_0x91d2('0x58'));emit(util['format'](_0x91d2('0x59'),_0xfe20c[_0x91d2('0xd')]),_0x91d2('0x5a'),{'uri':util[_0x91d2('0x8')](_0x91d2('0x5b'),_0x8f0ce6[_0x91d2('0xa')][_0x91d2('0x5c')](_0x91d2('0x5d'),''),_0x24d214['id'])});break;default:logger[_0x91d2('0x60')](_0x91d2('0x69'),_0x91d2('0x5e'));}}})['catch'](function(_0x39200f){logger['error'](_0x91d2('0x6c'),util['inspect'](_0x39200f,{'showHidden':!![],'depth':null}));});};exports[_0x91d2('0x6d')]=function(_0x4b771e,_0x53f9ac,_0x3c0407,_0x2b413c,_0x1d6df2,_0x1de70e){var _0x27970d,_0x547b5e;_0x1de70e['remoteUri']=intUtil['stripTrailingSlash'](_0x1de70e[_0x91d2('0xa')]);_0x1de70e[_0x91d2('0x48')]=intUtil[_0x91d2('0x49')](_0x1de70e[_0x91d2('0x48')]);if(_0x1d6df2&&_0x1d6df2['monitor_format']){logger['info']('['+_0x53f9ac[_0x91d2('0x6e')][_0x91d2('0x6f')]()+']',_0x91d2('0x4b'));_0x53f9ac[_0x91d2('0x4c')]=util[_0x91d2('0x8')](_0x91d2('0x66'),_0x1de70e['serverUrl'],_0x53f9ac[_0x91d2('0x4d')],md5(_0x53f9ac['uniqueid']));}else{_0x53f9ac['recordingURL']='';}headers[_0x91d2('0x4e')]=getAuth(_0x1de70e);return getUser(_0x1de70e)[_0x91d2('0x12')](function(_0x107778){_0x27970d=_0x107778;logger[_0x91d2('0x1a')](_0x91d2('0x50'),_0x27970d['id']);return getEndUser(_0x1de70e,_0x53f9ac[_0x91d2('0x51')],_0x53f9ac[_0x91d2('0x52')]);})[_0x91d2('0x12')](function(_0x2f7119){_0x547b5e=_0x2f7119;logger[_0x91d2('0x1a')](_0x91d2('0x53'),_0x547b5e['id']);return getTicket(_0x1de70e,_0x27970d,_0x547b5e,_0x3c0407,_0x53f9ac);})[_0x91d2('0x12')](function(_0x39daa2){if(_0x39daa2){logger[_0x91d2('0x1a')](_0x91d2('0x54'),_0x39daa2['id']);}})['catch'](function(_0x523ef0){logger[_0x91d2('0x60')]('['+_0x53f9ac[_0x91d2('0x6e')][_0x91d2('0x6f')]()+']'+_0x91d2('0x70'),util['inspect'](_0x523ef0,{'showHidden':!![],'depth':null}));});};
\ No newline at end of file
index 57f4ffc..fbb74d9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xde2a=['Call_Start_Time','agentcalledAt','Inbound','merge','Fields','/crm/v2/Calls','SUCCESS','err','queue','host','stripTrailingSlash','serverUrl','monitor_format','Recording\x20is\x20enabled!','recordingURL','/api/voice/recordings/','uniqueid','/downloads?type=uniqueid&token=','com','email','The\x20User\x20ID\x20is:','calleridname','The\x20Call\x20ID\x20is:','Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...','user:%s','trigger:browser:url','https://crm.','/crm/EntityInfo.do?module=Calls&id=','[QUEUE]','outbound','recordingFormat','none','zoho.eu','destcalleridname','Outbound','[OUTBOUND]','unmanaged','toUpperCase','calleridnum','lodash','md5','./util','ioredis','bluebird','../../../../config/environment','../../../../config/logger','zoho','defaults','redis','localhost','socket.io-emitter','emit','debug','stringify','length','forEach','includes','string','type','idField','content','toString','variable','variableName','customVariable','Variable','name','toLowerCase','indexOf','split','isNil','access_token','isBefore','expires_in','zone','https://accounts.zoho.com.au','https://accounts.zoho.eu','POST','/oauth/v2/token','refreshToken','clientId','refresh_token','then','add','seconds','error','Failing\x20creating\x20the\x20access_token','stack','Search\x20user','GET','https://www.zohoapis.%s/crm/v2/users','ActiveUsers','users','findIndex','info','Using\x20the\x20admin\x20account!','profile','Administrator','user','The\x20failing\x20result\x20is','Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20','catch','enduserType','https://www.zohoapis.','/crm/v2/','startCase','moduleCreate','role','first_name','last_name','Zoho-oauthtoken\x20','data','code','Error:\x20','log','CREATE\x20ERROR','contact_lead','uri','/crm/v2/Contacts/search?criteria=((Phone:equals:','/crm/v2/Leads/search?criteria=((Phone:equals:','Leads','nothing','contact','Contacts','lead','Creating\x20new\x20call...','Owner','Subject','getString','Subjects','Description','Descriptions','Who_Id','Full_Name','First_Name','Last_Name','$se_module','talktime','Call_Duration','utc','format','answertime','endtime','YYYY-MM-DDTHH:mm:ss','diff','starttime','mm:ss','lastevent','called','Call_Result','Called','complete','connect','rejected','abandoned','Abandoned','timeout'];(function(_0xdfaef5,_0x4c76ef){var _0x20286b=function(_0x51a2bc){while(--_0x51a2bc){_0xdfaef5['push'](_0xdfaef5['shift']());}};_0x20286b(++_0x4c76ef);}(_0xde2a,0x161));var _0xade2=function(_0x11ce46,_0x177a85){_0x11ce46=_0x11ce46-0x0;var _0x368a1e=_0xde2a[_0x11ce46];return _0x368a1e;};'use strict';var _=require(_0xade2('0x0'));var rp=require('request-promise');var md5=require(_0xade2('0x1'));var util=require('util');var intUtil=require(_0xade2('0x2'));var moment=require('moment');var Redis=require(_0xade2('0x3'));var BPromise=require(_0xade2('0x4'));var config=require(_0xade2('0x5'));var logger=require(_0xade2('0x6'))(_0xade2('0x7'));config['redis']=_[_0xade2('0x8')](config[_0xade2('0x9')],{'host':_0xade2('0xa'),'port':0x18eb});var io=require(_0xade2('0xb'))(new Redis(config[_0xade2('0x9')]));function emit(_0x534fc5,_0x53e8b8,_0x34e6f4){io['to'](_0x534fc5)[_0xade2('0xc')](_0x53e8b8,_0x34e6f4);}function request(_0x49a1ef){logger[_0xade2('0xd')]('[HTTP]',JSON[_0xade2('0xe')](_0x49a1ef));return rp(_0x49a1ef);}function getCustomFields(_0x519c23,_0xcf64aa){var _0x539eed={};if(_0x519c23[_0xade2('0xf')]>0x0){_[_0xade2('0x10')](_0x519c23,function(_0x2cf56c){if(_[_0xade2('0x11')]([_0xade2('0x12'),'picklist'],_0x2cf56c[_0xade2('0x13')])&&_0x2cf56c[_0xade2('0x14')]){_0x539eed[_0x2cf56c['idField']]=_0x2cf56c[_0xade2('0x15')][_0xade2('0x16')]();}else if(_0x2cf56c['type']===_0xade2('0x17')&&_0x2cf56c[_0xade2('0x18')]&&_0x2cf56c[_0xade2('0x14')]&&_0xcf64aa[_0x2cf56c[_0xade2('0x18')]]){_0x539eed[_0x2cf56c[_0xade2('0x14')]]=_0xcf64aa[_0x2cf56c['variableName']]['toString']();}else if(_0x2cf56c[_0xade2('0x13')]===_0xade2('0x19')&&_0x2cf56c[_0xade2('0x1a')]&&_0x2cf56c[_0xade2('0x1a')][_0xade2('0x1b')]&&_0x2cf56c[_0xade2('0x14')]&&_0xcf64aa[_0x2cf56c[_0xade2('0x1a')][_0xade2('0x1b')]['toLowerCase']()]){_0x539eed[_0x2cf56c['idField']]=_0xcf64aa[_0x2cf56c[_0xade2('0x1a')][_0xade2('0x1b')][_0xade2('0x1c')]()][_0xade2('0x16')]();}});}return _0x539eed;}function getName(_0x3fce3b){if(_0x3fce3b[_0xade2('0x1d')]('\x20')>0x0){var _0x53c288=_0x3fce3b[_0xade2('0x1e')](/ (.+)/);if(_0x53c288[0x1]){return _0x53c288;}}return[_0x3fce3b,_0x3fce3b];}var accountsTokens={};function getAccessToken(_0x55254b){return new Promise(function(_0x5aafd0,_0x3c5a1b){if(!_[_0xade2('0x1f')](accountsTokens[_0x55254b['id']])&&!_[_0xade2('0x1f')](accountsTokens[_0x55254b['id']][_0xade2('0x20')])){if(moment()[_0xade2('0x21')](accountsTokens[_0x55254b['id']][_0xade2('0x22')])){_0x5aafd0(accountsTokens[_0x55254b['id']][_0xade2('0x20')]);}}var _0x139d03;switch(_0x55254b[_0xade2('0x23')]){case'US':_0x139d03='https://accounts.zoho.com';break;case'AU':_0x139d03=_0xade2('0x24');break;case'EU':_0x139d03=_0xade2('0x25');break;case'IN':_0x139d03='https://accounts.zoho.in';break;case'CN':_0x139d03='https://accounts.zoho.com.cn';break;default:_0x139d03=_0xade2('0x25');break;}var _0x35b3aa={'method':_0xade2('0x26'),'uri':_0x139d03+_0xade2('0x27'),'qs':{'refresh_token':_0x55254b[_0xade2('0x28')],'client_id':_0x55254b[_0xade2('0x29')],'client_secret':_0x55254b['clientSecret'],'grant_type':_0xade2('0x2a')},'json':!![]};return rp(_0x35b3aa)[_0xade2('0x2b')](function(_0x52537f){accountsTokens[_0x55254b['id']]={'access_token':_0x52537f['access_token'],'expires_in':moment()[_0xade2('0x2c')](_0x52537f[_0xade2('0x22')],_0xade2('0x2d'))};_0x5aafd0(_0x52537f[_0xade2('0x20')]);})['catch'](function(_0x5f06a3){logger[_0xade2('0x2e')](_0xade2('0x2f'),_0x5f06a3[_0xade2('0x30')]);_0x3c5a1b(_0x5f06a3);});});}function getUser(_0x3210f2,_0x4cf222,_0x40b660,_0x42f715){logger['info'](_0xade2('0x31'));return request({'method':_0xade2('0x32'),'uri':util['format'](_0xade2('0x33'),_0x4cf222),'qs':{'type':_0xade2('0x34')},'headers':{'Authorization':'Zoho-oauthtoken\x20'+_0x3210f2},'json':!![]})[_0xade2('0x2b')](function(_0x38725b){if(_0x38725b[_0xade2('0x35')]){var _0x460e7a=-0x1;if(_['isArrayLikeObject'](_0x38725b[_0xade2('0x35')])){if(!_[_0xade2('0x1f')](_0x42f715)){_0x460e7a=_[_0xade2('0x36')](_0x38725b[_0xade2('0x35')],function(_0x28aa12){return _0x28aa12['email']===_0x42f715;});}if(_0x460e7a>=0x0){logger[_0xade2('0x37')]('Agent\x20found!');}else{logger[_0xade2('0x37')](_0xade2('0x38'));_0x460e7a=_[_0xade2('0x36')](_0x38725b['users'],function(_0x3eb61d){return _0x3eb61d[_0xade2('0x39')][_0xade2('0x1b')]===_0xade2('0x3a');});}return _0x38725b[_0xade2('0x35')][_0x460e7a];}else{if(_0x38725b['user']['profile'][_0xade2('0x1b')]===_0xade2('0x3a')){logger[_0xade2('0x37')]('Using\x20the\x20admin\x20account!');user=_0x38725b[_0xade2('0x3b')];return user;}else{logger[_0xade2('0x2e')](_0xade2('0x3c'),JSON[_0xade2('0xe')](_0x38725b));throw new Error(_0xade2('0x3d')+JSON[_0xade2('0xe')](_0x38725b));}}}else{logger[_0xade2('0x2e')](_0xade2('0x3c'),JSON[_0xade2('0xe')](_0x38725b));throw new Error(_0xade2('0x3d')+JSON[_0xade2('0xe')](_0x38725b));}})[_0xade2('0x3e')](function(_0x340d79){console[_0xade2('0x2e')](_0x340d79);});}function getZohoUser(_0x100f4c,_0x51d9a0){return new BPromise(function(_0xc81149,_0x967bb0){request(_0x100f4c)[_0xade2('0x2b')](function(_0x3536f7){var _0x3d7079=null;if(_0x3536f7){_0x3d7079=_0x3536f7['data'][0x0];_0x3d7079[_0xade2('0x3f')]=_0x51d9a0;}_0xc81149(_0x3d7079);})[_0xade2('0x3e')](function(_0x291717){_0x967bb0(_0x291717);});});}function createEndUser(_0x430b2c,_0x5cffa6,_0x173d05,_0x5414cc,_0x5bb95a,_0x32ecce){var _0x173d05=getName(_0x173d05);return request({'method':'POST','uri':_0xade2('0x40')+_0x5cffa6+_0xade2('0x41')+_[_0xade2('0x42')](_0x32ecce[_0xade2('0x43')])+'s','body':{'data':[{'Last_Name':_0x173d05[0x1],'First_Name':_0x173d05[0x0],'Phone':_0x5414cc,'Owner':{'name':!_[_0xade2('0x1f')](_0x5bb95a[_0xade2('0x44')]['name'])?_0x5bb95a[_0xade2('0x44')][_0xade2('0x1b')]:!_['isNil'](_0x5bb95a[_0xade2('0x45')])?_0x5bb95a[_0xade2('0x45')]+'\x20'+_0x5bb95a['last_name']:_0x5bb95a[_0xade2('0x46')],'id':_0x5bb95a['id']}}]},'headers':{'Authorization':_0xade2('0x47')+_0x430b2c},'json':!![]})[_0xade2('0x2b')](function(_0x8e2fa){if(_0x8e2fa&&_0x8e2fa[_0xade2('0x48')][0x0][_0xade2('0x49')]==='SUCCESS'){var _0x223f5d=_0x8e2fa[_0xade2('0x48')][0x0]['details'];_0x223f5d[_0xade2('0x3f')]=_[_0xade2('0x42')](_0x32ecce[_0xade2('0x43')])+'s';return _0x223f5d;}logger[_0xade2('0x2e')](_0xade2('0x3c'),JSON['stringify'](data));throw new Error(_0xade2('0x4a')+JSON[_0xade2('0xe')](data));})[_0xade2('0x3e')](function(_0x469fa5){console[_0xade2('0x4b')](_0xade2('0x4c'),_0x469fa5);});}function getEndUser(_0x4d298f,_0x529e25,_0x287869,_0x448841,_0x332e3a,_0x23905f,_0x3be933){var _0x493d87={'method':'GET','uri':'','headers':{'Authorization':_0xade2('0x47')+_0x4d298f},'json':!![]};switch(_0x3be933['moduleSearch']){case _0xade2('0x4d'):_0x493d87[_0xade2('0x4e')]=_0xade2('0x40')+_0x529e25+_0xade2('0x4f')+_0x332e3a+'))';return getZohoUser(_0x493d87,'Contacts')[_0xade2('0x2b')](function(_0xf84b46){if(_0xf84b46)return _0xf84b46;_0x493d87['uri']='https://www.zohoapis.'+_0x529e25+_0xade2('0x50')+_0x332e3a+'))';return getZohoUser(_0x493d87,_0xade2('0x51'))[_0xade2('0x2b')](function(_0x54621a){if(_0x54621a)return _0x54621a;if(_0x3be933['moduleCreate']!=_0xade2('0x52')){return createEndUser(_0x4d298f,_0x529e25,_0x448841,_0x332e3a,_0x23905f,_0x3be933);}else{return{};}});});break;case _0xade2('0x53'):_0x493d87[_0xade2('0x4e')]=_0xade2('0x40')+_0x529e25+'/crm/v2/Contacts/search?criteria=((Phone:equals:'+_0x332e3a+'))';return getZohoUser(_0x493d87,_0xade2('0x54'))[_0xade2('0x2b')](function(_0x5bd9ef){if(_0x5bd9ef)return _0x5bd9ef;if(_0x3be933[_0xade2('0x43')]!='nothing'){return createEndUser(_0x4d298f,_0x529e25,_0x448841,_0x332e3a,_0x23905f,_0x3be933);}else{return{};}});break;case _0xade2('0x55'):_0x493d87[_0xade2('0x4e')]='https://www.zohoapis.'+_0x529e25+'/crm/v2/Leads/search?criteria=((Phone:equals:'+_0x332e3a+'))';return getZohoUser(_0x493d87,'Leads')['then'](function(_0x2a7f94){if(_0x2a7f94)return _0x2a7f94;if(_0x3be933[_0xade2('0x43')]!=_0xade2('0x52')){return createEndUser(_0x4d298f,_0x529e25,_0x448841,_0x332e3a,_0x23905f,_0x3be933);}else{return{};}});break;}}function getCall(_0x574020,_0x39648e,_0x2e48b4,_0x3b3612,_0x36c72f,_0x11001a,_0x5c4862,_0x5ac90e){logger[_0xade2('0x37')](_0xade2('0x56'));var _0x67f441={};_0x67f441[_0xade2('0x57')]={'name':!_[_0xade2('0x1f')](_0x3b3612[_0xade2('0x44')][_0xade2('0x1b')])&&!_['isNil'](_0x3b3612[_0xade2('0x39')][_0xade2('0x1b')])&&_0x3b3612[_0xade2('0x39')][_0xade2('0x1b')]==='administrator'?_0x3b3612[_0xade2('0x44')][_0xade2('0x1b')]:!_[_0xade2('0x1f')](_0x3b3612['first_name'])?_0x3b3612[_0xade2('0x45')]+'\x20'+_0x3b3612['last_name']:_0x3b3612['last_name'],'id':_0x3b3612['id']};_0x67f441[_0xade2('0x58')]=intUtil[_0xade2('0x59')](_0x11001a[_0xade2('0x5a')],_0x5c4862,'\x20');_0x67f441[_0xade2('0x5b')]=intUtil[_0xade2('0x59')](_0x11001a[_0xade2('0x5c')],_0x5c4862,'\x0a');if(_0x36c72f['enduserType']==='Contacts'){_0x67f441[_0xade2('0x5d')]={'name':!_[_0xade2('0x1f')](_0x36c72f[_0xade2('0x5e')])?_0x36c72f[_0xade2('0x5e')]:!_[_0xade2('0x1f')](_0x36c72f[_0xade2('0x5f')])?_0x36c72f[_0xade2('0x5f')]+'\x20'+_0x36c72f[_0xade2('0x60')]:_0x36c72f[_0xade2('0x60')],'id':_0x36c72f['id']};}if(_0x36c72f['enduserType']==='Leads'){_0x67f441['What_Id']={'name':!_[_0xade2('0x1f')](_0x36c72f[_0xade2('0x5e')])?_0x36c72f[_0xade2('0x5e')]:!_['isNil'](_0x36c72f['First_Name'])?_0x36c72f[_0xade2('0x5f')]+'\x20'+_0x36c72f[_0xade2('0x60')]:_0x36c72f[_0xade2('0x60')],'id':_0x36c72f['id']};_0x67f441[_0xade2('0x61')]=_[_0xade2('0x42')](_0x36c72f[_0xade2('0x3f')]);}if(_0x5c4862[_0xade2('0x62')]){_0x67f441[_0xade2('0x63')]=moment[_0xade2('0x64')](parseInt(_0x5c4862[_0xade2('0x62')])*0x3e8)[_0xade2('0x65')]('mm:ss');}else if(_0x5c4862[_0xade2('0x66')]&&_0x5c4862[_0xade2('0x67')]){_0x67f441[_0xade2('0x63')]=moment[_0xade2('0x64')](moment(_0x5c4862[_0xade2('0x67')],_0xade2('0x68'))[_0xade2('0x69')](moment(_0x5c4862[_0xade2('0x6a')],_0xade2('0x68'))))[_0xade2('0x65')](_0xade2('0x6b'));}switch(_0x5c4862[_0xade2('0x6c')]){case _0xade2('0x6d'):_0x67f441[_0xade2('0x6e')]=_0xade2('0x6f');break;case _0xade2('0x70'):case _0xade2('0x71'):_0x67f441[_0xade2('0x6e')]='Answered';break;case _0xade2('0x72'):_0x67f441[_0xade2('0x6e')]='Rejected';break;case _0xade2('0x73'):_0x67f441[_0xade2('0x6e')]=_0xade2('0x74');break;case _0xade2('0x75'):_0x67f441[_0xade2('0x6e')]='Timeout';default:}_0x67f441[_0xade2('0x76')]=(_0x5ac90e==='outbound'?moment(_0x5c4862[_0xade2('0x6a')])[_0xade2('0x65')](_0xade2('0x68')):moment(_0x5c4862[_0xade2('0x77')])[_0xade2('0x65')](_0xade2('0x68')))||moment()[_0xade2('0x65')](_0xade2('0x68'));_0x67f441['Call_Type']=_0x5ac90e||_0xade2('0x78');_0x67f441=_[_0xade2('0x79')](_0x67f441,getCustomFields(_0x11001a[_0xade2('0x7a')],_0x5c4862));return request({'method':_0xade2('0x26'),'uri':_0xade2('0x40')+_0x39648e+_0xade2('0x7b'),'headers':{'Authorization':_0xade2('0x47')+_0x574020},'body':{'data':[_0x67f441]},'json':!![]})[_0xade2('0x2b')](function(_0x5d3498){if(_0x5d3498&&_0x5d3498[_0xade2('0x48')][0x0][_0xade2('0x49')]===_0xade2('0x7c')){logger[_0xade2('0x37')]('Call\x20created!');return{'id':_0x5d3498[_0xade2('0x48')][0x0]['details']['id']};}})[_0xade2('0x3e')](function(_0x4c392e){logger[_0xade2('0x37')](_0xade2('0x7d'),_0x4c392e[_0xade2('0x30')]);console['log']('err',_0x4c392e);});}exports[_0xade2('0x7e')]=function(_0x8e831,_0x14f537,_0x4e211f,_0x110477,_0x1a71b6,_0x4540c5){var _0x564b08,_0x3aa070,_0x2dc84e;_0x4540c5[_0xade2('0x7f')]=intUtil[_0xade2('0x80')](_0x4540c5[_0xade2('0x7f')]);_0x4540c5[_0xade2('0x81')]=intUtil[_0xade2('0x80')](_0x4540c5[_0xade2('0x81')]);if(_0x1a71b6&&_0x1a71b6[_0xade2('0x82')]){logger[_0xade2('0x37')]('[QUEUE]',_0xade2('0x83'));_0x14f537[_0xade2('0x84')]=_0x4540c5[_0xade2('0x81')]+_0xade2('0x85')+_0x14f537[_0xade2('0x86')]+_0xade2('0x87')+md5(_0x14f537[_0xade2('0x86')]);}else{_0x14f537['recordingURL']='';}var _0x21f863=_0x4540c5[_0xade2('0x7f')]==='zoho.eu'?'eu':_0xade2('0x88');return getAccessToken(_0x4540c5)[_0xade2('0x2b')](function(_0x520ba3){_0x2dc84e=_0x520ba3;return getUser(_0x2dc84e,_0x21f863,_0x4540c5,_0x110477[_0xade2('0x89')]);})[_0xade2('0x2b')](function(_0x4238e6){_0x564b08=_0x4238e6;logger[_0xade2('0x37')](_0xade2('0x8a'),_0x564b08['id']);return getEndUser(_0x2dc84e,_0x21f863,_0x4540c5,_0x14f537[_0xade2('0x8b')],_0x14f537['calleridnum'],_0x564b08,_0x4e211f);})[_0xade2('0x2b')](function(_0x2c12e8){_0x3aa070=_0x2c12e8;return getCall(_0x2dc84e,_0x21f863,_0x4540c5,_0x564b08,_0x3aa070,_0x4e211f,_0x14f537,'Inbound');})[_0xade2('0x2b')](function(_0x33e362){if(_0x33e362){logger[_0xade2('0x37')](_0xade2('0x8c'),_0x33e362['id']);logger[_0xade2('0x37')]('[QUEUE]',_0xade2('0x8d'));emit(util[_0xade2('0x65')](_0xade2('0x8e'),_0x110477[_0xade2('0x1b')]),_0xade2('0x8f'),{'uri':_0xade2('0x90')+_0x4540c5[_0xade2('0x7f')]+_0xade2('0x91')+_0x33e362['id']});}})[_0xade2('0x3e')](function(_0x3a552e){logger[_0xade2('0x2e')](_0xade2('0x92'),JSON[_0xade2('0xe')](_0x3a552e));});};exports[_0xade2('0x93')]=function(_0x20018b,_0x3ac976,_0x344122,_0xc6d452,_0x4bc29d,_0x19a6e2,_0x543cfc){var _0xe20bc9,_0xed1c24,_0x25c2ce;_0x19a6e2['host']=intUtil[_0xade2('0x80')](_0x19a6e2[_0xade2('0x7f')]);_0x19a6e2[_0xade2('0x81')]=intUtil[_0xade2('0x80')](_0x19a6e2['serverUrl']);if(_0x543cfc&&_0x543cfc[_0xade2('0x94')]&&_0x543cfc[_0xade2('0x94')]!==_0xade2('0x95')){logger['info']('[OUTBOUND]',_0xade2('0x83'));_0x3ac976[_0xade2('0x84')]=_0x19a6e2['serverUrl']+_0xade2('0x85')+_0x3ac976[_0xade2('0x86')]+_0xade2('0x87')+md5(_0x3ac976[_0xade2('0x86')]);}var _0x1e4320=_0x19a6e2[_0xade2('0x7f')]===_0xade2('0x96')?'eu':'com';return getAccessToken(_0x19a6e2)[_0xade2('0x2b')](function(_0x1d58e3){_0x25c2ce=_0x1d58e3;return getUser(_0x25c2ce,_0x1e4320,_0x19a6e2,_0xc6d452[_0xade2('0x89')]);})['then'](function(_0x8a75d2){_0xe20bc9=_0x8a75d2;logger[_0xade2('0x37')](_0xade2('0x8a'),_0xe20bc9['id']);return getEndUser(_0x25c2ce,_0x1e4320,_0x19a6e2,_0x3ac976[_0xade2('0x97')],_0x3ac976['destcalleridnum'],_0xe20bc9,_0x344122);})[_0xade2('0x2b')](function(_0x395668){_0xed1c24=_0x395668;return getCall(_0x25c2ce,_0x1e4320,_0x19a6e2,_0xe20bc9,_0xed1c24,_0x344122,_0x3ac976,_0xade2('0x98'));})[_0xade2('0x2b')](function(_0xf90eec){if(_0xf90eec){logger[_0xade2('0x37')](_0xade2('0x8c'),_0xf90eec['id']);logger[_0xade2('0x37')]('[OUTBOUND]',_0xade2('0x8d'));emit(util['format'](_0xade2('0x8e'),_0xc6d452['name']),_0xade2('0x8f'),{'uri':_0xade2('0x90')+_0x19a6e2[_0xade2('0x7f')]+'/crm/EntityInfo.do?module=Calls&id='+_0xf90eec['id']});}})['catch'](function(_0x2cbb4a){logger[_0xade2('0x2e')](_0xade2('0x99'),JSON['stringify'](_0x2cbb4a));});};exports[_0xade2('0x9a')]=function(_0x1564ff,_0x34cf84,_0x319fa9,_0x4039c5,_0xc842ea,_0x4629e9){var _0x4b07ac,_0xe2fbeb,_0x11af95;_0x4629e9['host']=intUtil['stripTrailingSlash'](_0x4629e9[_0xade2('0x7f')]);_0x4629e9[_0xade2('0x81')]=intUtil['stripTrailingSlash'](_0x4629e9[_0xade2('0x81')]);if(_0xc842ea&&_0xc842ea[_0xade2('0x82')]){logger[_0xade2('0x37')]('['+_0x34cf84[_0xade2('0x6c')][_0xade2('0x9b')]()+']','Recording\x20is\x20enabled!');_0x34cf84[_0xade2('0x84')]=_0x4629e9[_0xade2('0x81')]+_0xade2('0x85')+_0x34cf84[_0xade2('0x86')]+_0xade2('0x87')+md5(_0x34cf84[_0xade2('0x86')]);}else{_0x34cf84[_0xade2('0x84')]='';}var _0x5642f6=_0x4629e9[_0xade2('0x7f')]==='zoho.eu'?'eu':_0xade2('0x88');return getAccessToken(_0x4629e9)[_0xade2('0x2b')](function(_0x3e1ced){_0x11af95=_0x3e1ced;return getUser(_0x11af95,_0x5642f6,_0x4629e9);})['then'](function(_0x56cbb4){_0x4b07ac=_0x56cbb4;logger[_0xade2('0x37')](_0xade2('0x8a'),_0x4b07ac['id']);return getEndUser(_0x11af95,_0x5642f6,_0x4629e9,_0x34cf84[_0xade2('0x8b')],_0x34cf84[_0xade2('0x9c')],_0x4b07ac,_0x319fa9);})[_0xade2('0x2b')](function(_0x1c1644){_0xe2fbeb=_0x1c1644;return getCall(_0x11af95,_0x5642f6,_0x4629e9,_0x4b07ac,_0xe2fbeb,_0x319fa9,_0x34cf84,_0xade2('0x78'));})[_0xade2('0x2b')](function(_0xe6fa4c){if(_0xe6fa4c){logger[_0xade2('0x37')]('The\x20Call\x20ID\x20is:',_0xe6fa4c['id']);}})['catch'](function(_0x246977){logger[_0xade2('0x2e')]('['+_0x34cf84[_0xade2('0x6c')][_0xade2('0x9b')]()+']',JSON[_0xade2('0xe')](_0x246977));});};
\ No newline at end of file
+var _0x3ac6=['POST','https://www.zohoapis.','moduleCreate','role','first_name','last_name','code','SUCCESS','startCase','Error:\x20','log','CREATE\x20ERROR','GET','moduleSearch','/crm/v2/Contacts/search?criteria=((Phone:equals:','Contacts','uri','Leads','contact','nothing','Owner','administrator','Subject','getString','Description','enduserType','Who_Id','Full_Name','First_Name','Last_Name','What_Id','talktime','utc','answertime','endtime','Call_Duration','YYYY-MM-DDTHH:mm:ss','mm:ss','lastevent','called','Call_Result','Called','complete','Answered','Rejected','abandoned','Abandoned','timeout','Timeout','Call_Start_Time','agentcalledAt','Call_Type','Inbound','Fields','/crm/v2/Calls','Call\x20created!','details','err','queue','host','stripTrailingSlash','serverUrl','monitor_format','[QUEUE]','Recording\x20is\x20enabled!','recordingURL','/api/voice/recordings/','/downloads?type=uniqueid&token=','uniqueid','calleridnum','The\x20Call\x20ID\x20is:','user:%s','https://crm.','/crm/EntityInfo.do?module=Calls&id=','recordingFormat','none','[OUTBOUND]','zoho.eu','com','The\x20User\x20ID\x20is:','destcalleridname','destcalleridnum','Outbound','Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...','trigger:browser:url','unmanaged','calleridname','lodash','request-promise','md5','util','./util','moment','bluebird','../../../../config/environment','../../../../config/logger','zoho','defaults','localhost','redis','emit','debug','[HTTP]','stringify','length','string','picklist','type','idField','variableName','toString','customVariable','Variable','name','toLowerCase','indexOf','isNil','access_token','isBefore','expires_in','https://accounts.zoho.eu','https://accounts.zoho.in','/oauth/v2/token','refreshToken','clientId','clientSecret','refresh_token','then','add','catch','error','Failing\x20creating\x20the\x20access_token','stack','info','format','https://www.zohoapis.%s/crm/v2/users','Zoho-oauthtoken\x20','users','email','Agent\x20found!','findIndex','profile','Administrator','user','Using\x20the\x20admin\x20account!','The\x20failing\x20result\x20is','Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20','data'];(function(_0x313878,_0x32bf43){var _0x32b3e3=function(_0x119938){while(--_0x119938){_0x313878['push'](_0x313878['shift']());}};_0x32b3e3(++_0x32bf43);}(_0x3ac6,0xeb));var _0x63ac=function(_0x568cbc,_0x29f300){_0x568cbc=_0x568cbc-0x0;var _0x1afca5=_0x3ac6[_0x568cbc];return _0x1afca5;};'use strict';var _=require(_0x63ac('0x0'));var rp=require(_0x63ac('0x1'));var md5=require(_0x63ac('0x2'));var util=require(_0x63ac('0x3'));var intUtil=require(_0x63ac('0x4'));var moment=require(_0x63ac('0x5'));var Redis=require('ioredis');var BPromise=require(_0x63ac('0x6'));var config=require(_0x63ac('0x7'));var logger=require(_0x63ac('0x8'))(_0x63ac('0x9'));config['redis']=_[_0x63ac('0xa')](config['redis'],{'host':_0x63ac('0xb'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x63ac('0xc')]));function emit(_0xf46973,_0x1ad039,_0x5c1583){io['to'](_0xf46973)[_0x63ac('0xd')](_0x1ad039,_0x5c1583);}function request(_0x2a0608){logger[_0x63ac('0xe')](_0x63ac('0xf'),JSON[_0x63ac('0x10')](_0x2a0608));return rp(_0x2a0608);}function getCustomFields(_0x4f01bf,_0x282425){var _0x25b2ec={};if(_0x4f01bf[_0x63ac('0x11')]>0x0){_['forEach'](_0x4f01bf,function(_0x2901e9){if(_['includes']([_0x63ac('0x12'),_0x63ac('0x13')],_0x2901e9[_0x63ac('0x14')])&&_0x2901e9[_0x63ac('0x15')]){_0x25b2ec[_0x2901e9[_0x63ac('0x15')]]=_0x2901e9['content']['toString']();}else if(_0x2901e9[_0x63ac('0x14')]==='variable'&&_0x2901e9[_0x63ac('0x16')]&&_0x2901e9[_0x63ac('0x15')]&&_0x282425[_0x2901e9[_0x63ac('0x16')]]){_0x25b2ec[_0x2901e9[_0x63ac('0x15')]]=_0x282425[_0x2901e9[_0x63ac('0x16')]][_0x63ac('0x17')]();}else if(_0x2901e9[_0x63ac('0x14')]===_0x63ac('0x18')&&_0x2901e9[_0x63ac('0x19')]&&_0x2901e9[_0x63ac('0x19')][_0x63ac('0x1a')]&&_0x2901e9[_0x63ac('0x15')]&&_0x282425[_0x2901e9[_0x63ac('0x19')][_0x63ac('0x1a')]['toLowerCase']()]){_0x25b2ec[_0x2901e9[_0x63ac('0x15')]]=_0x282425[_0x2901e9[_0x63ac('0x19')][_0x63ac('0x1a')][_0x63ac('0x1b')]()]['toString']();}});}return _0x25b2ec;}function getName(_0x45581d){if(_0x45581d[_0x63ac('0x1c')]('\x20')>0x0){var _0x3be7c6=_0x45581d['split'](/ (.+)/);if(_0x3be7c6[0x1]){return _0x3be7c6;}}return[_0x45581d,_0x45581d];}var accountsTokens={};function getAccessToken(_0x2ad379){return new Promise(function(_0x51d368,_0x1e9701){if(!_['isNil'](accountsTokens[_0x2ad379['id']])&&!_[_0x63ac('0x1d')](accountsTokens[_0x2ad379['id']][_0x63ac('0x1e')])){if(moment()[_0x63ac('0x1f')](accountsTokens[_0x2ad379['id']][_0x63ac('0x20')])){_0x51d368(accountsTokens[_0x2ad379['id']][_0x63ac('0x1e')]);}}var _0x591457;switch(_0x2ad379['zone']){case'US':_0x591457='https://accounts.zoho.com';break;case'AU':_0x591457='https://accounts.zoho.com.au';break;case'EU':_0x591457=_0x63ac('0x21');break;case'IN':_0x591457=_0x63ac('0x22');break;case'CN':_0x591457='https://accounts.zoho.com.cn';break;default:_0x591457=_0x63ac('0x21');break;}var _0x4f6fff={'method':'POST','uri':_0x591457+_0x63ac('0x23'),'qs':{'refresh_token':_0x2ad379[_0x63ac('0x24')],'client_id':_0x2ad379[_0x63ac('0x25')],'client_secret':_0x2ad379[_0x63ac('0x26')],'grant_type':_0x63ac('0x27')},'json':!![]};return rp(_0x4f6fff)[_0x63ac('0x28')](function(_0xe715f5){accountsTokens[_0x2ad379['id']]={'access_token':_0xe715f5[_0x63ac('0x1e')],'expires_in':moment()[_0x63ac('0x29')](_0xe715f5[_0x63ac('0x20')],'seconds')};_0x51d368(_0xe715f5[_0x63ac('0x1e')]);})[_0x63ac('0x2a')](function(_0x4018cf){logger[_0x63ac('0x2b')](_0x63ac('0x2c'),_0x4018cf[_0x63ac('0x2d')]);_0x1e9701(_0x4018cf);});});}function getUser(_0x3663b2,_0x5be36b,_0x268c7a,_0x34d9d1){logger[_0x63ac('0x2e')]('Search\x20user');return request({'method':'GET','uri':util[_0x63ac('0x2f')](_0x63ac('0x30'),_0x5be36b),'qs':{'type':'ActiveUsers'},'headers':{'Authorization':_0x63ac('0x31')+_0x3663b2},'json':!![]})['then'](function(_0x5caa2f){if(_0x5caa2f[_0x63ac('0x32')]){var _0x336b66=-0x1;if(_['isArrayLikeObject'](_0x5caa2f[_0x63ac('0x32')])){if(!_[_0x63ac('0x1d')](_0x34d9d1)){_0x336b66=_['findIndex'](_0x5caa2f[_0x63ac('0x32')],function(_0x2b320b){return _0x2b320b[_0x63ac('0x33')]===_0x34d9d1;});}if(_0x336b66>=0x0){logger[_0x63ac('0x2e')](_0x63ac('0x34'));}else{logger[_0x63ac('0x2e')]('Using\x20the\x20admin\x20account!');_0x336b66=_[_0x63ac('0x35')](_0x5caa2f['users'],function(_0x5411a3){return _0x5411a3[_0x63ac('0x36')]['name']===_0x63ac('0x37');});}return _0x5caa2f[_0x63ac('0x32')][_0x336b66];}else{if(_0x5caa2f[_0x63ac('0x38')][_0x63ac('0x36')][_0x63ac('0x1a')]===_0x63ac('0x37')){logger[_0x63ac('0x2e')](_0x63ac('0x39'));user=_0x5caa2f[_0x63ac('0x38')];return user;}else{logger[_0x63ac('0x2b')](_0x63ac('0x3a'),JSON['stringify'](_0x5caa2f));throw new Error(_0x63ac('0x3b')+JSON['stringify'](_0x5caa2f));}}}else{logger[_0x63ac('0x2b')](_0x63ac('0x3a'),JSON[_0x63ac('0x10')](_0x5caa2f));throw new Error('Unable\x20to\x20retrieve\x20zoho\x20account\x20users:\x20'+JSON[_0x63ac('0x10')](_0x5caa2f));}})[_0x63ac('0x2a')](function(_0x3ff352){console['error'](_0x3ff352);});}function getZohoUser(_0x303c41,_0xb5254b){return new BPromise(function(_0x49a8d2,_0x53179b){request(_0x303c41)[_0x63ac('0x28')](function(_0x2b85ce){var _0x469f62=null;if(_0x2b85ce){_0x469f62=_0x2b85ce[_0x63ac('0x3c')][0x0];_0x469f62['enduserType']=_0xb5254b;}_0x49a8d2(_0x469f62);})[_0x63ac('0x2a')](function(_0x3ac804){_0x53179b(_0x3ac804);});});}function createEndUser(_0x229db1,_0x98bf86,_0x470414,_0x12f357,_0x3369c4,_0x599065){var _0x470414=getName(_0x470414);return request({'method':_0x63ac('0x3d'),'uri':_0x63ac('0x3e')+_0x98bf86+'/crm/v2/'+_['startCase'](_0x599065[_0x63ac('0x3f')])+'s','body':{'data':[{'Last_Name':_0x470414[0x1],'First_Name':_0x470414[0x0],'Phone':_0x12f357,'Owner':{'name':!_['isNil'](_0x3369c4[_0x63ac('0x40')][_0x63ac('0x1a')])?_0x3369c4[_0x63ac('0x40')][_0x63ac('0x1a')]:!_[_0x63ac('0x1d')](_0x3369c4['first_name'])?_0x3369c4[_0x63ac('0x41')]+'\x20'+_0x3369c4[_0x63ac('0x42')]:_0x3369c4['last_name'],'id':_0x3369c4['id']}}]},'headers':{'Authorization':'Zoho-oauthtoken\x20'+_0x229db1},'json':!![]})[_0x63ac('0x28')](function(_0x49359c){if(_0x49359c&&_0x49359c[_0x63ac('0x3c')][0x0][_0x63ac('0x43')]===_0x63ac('0x44')){var _0x350e40=_0x49359c[_0x63ac('0x3c')][0x0]['details'];_0x350e40['enduserType']=_[_0x63ac('0x45')](_0x599065['moduleCreate'])+'s';return _0x350e40;}logger[_0x63ac('0x2b')](_0x63ac('0x3a'),JSON['stringify'](data));throw new Error(_0x63ac('0x46')+JSON[_0x63ac('0x10')](data));})[_0x63ac('0x2a')](function(_0x31a74e){console[_0x63ac('0x47')](_0x63ac('0x48'),_0x31a74e);});}function getEndUser(_0x2cd6ce,_0x334aee,_0x4aaa55,_0x478b26,_0x21b9d8,_0x2d5a95,_0xf5145a){var _0x282e98={'method':_0x63ac('0x49'),'uri':'','headers':{'Authorization':_0x63ac('0x31')+_0x2cd6ce},'json':!![]};switch(_0xf5145a[_0x63ac('0x4a')]){case'contact_lead':_0x282e98['uri']='https://www.zohoapis.'+_0x334aee+_0x63ac('0x4b')+_0x21b9d8+'))';return getZohoUser(_0x282e98,_0x63ac('0x4c'))[_0x63ac('0x28')](function(_0x282a19){if(_0x282a19)return _0x282a19;_0x282e98[_0x63ac('0x4d')]=_0x63ac('0x3e')+_0x334aee+'/crm/v2/Leads/search?criteria=((Phone:equals:'+_0x21b9d8+'))';return getZohoUser(_0x282e98,_0x63ac('0x4e'))[_0x63ac('0x28')](function(_0x828bab){if(_0x828bab)return _0x828bab;if(_0xf5145a[_0x63ac('0x3f')]!='nothing'){return createEndUser(_0x2cd6ce,_0x334aee,_0x478b26,_0x21b9d8,_0x2d5a95,_0xf5145a);}else{return{};}});});break;case _0x63ac('0x4f'):_0x282e98[_0x63ac('0x4d')]=_0x63ac('0x3e')+_0x334aee+_0x63ac('0x4b')+_0x21b9d8+'))';return getZohoUser(_0x282e98,'Contacts')['then'](function(_0x550e70){if(_0x550e70)return _0x550e70;if(_0xf5145a[_0x63ac('0x3f')]!=_0x63ac('0x50')){return createEndUser(_0x2cd6ce,_0x334aee,_0x478b26,_0x21b9d8,_0x2d5a95,_0xf5145a);}else{return{};}});break;case'lead':_0x282e98[_0x63ac('0x4d')]='https://www.zohoapis.'+_0x334aee+'/crm/v2/Leads/search?criteria=((Phone:equals:'+_0x21b9d8+'))';return getZohoUser(_0x282e98,'Leads')[_0x63ac('0x28')](function(_0x4a5f98){if(_0x4a5f98)return _0x4a5f98;if(_0xf5145a['moduleCreate']!='nothing'){return createEndUser(_0x2cd6ce,_0x334aee,_0x478b26,_0x21b9d8,_0x2d5a95,_0xf5145a);}else{return{};}});break;}}function getCall(_0x123a2e,_0x4a8174,_0x403f3b,_0xa9d0f8,_0x4bf198,_0x254790,_0x25d6a7,_0x5aec5c){logger[_0x63ac('0x2e')]('Creating\x20new\x20call...');var _0x2656fe={};_0x2656fe[_0x63ac('0x51')]={'name':!_['isNil'](_0xa9d0f8[_0x63ac('0x40')]['name'])&&!_[_0x63ac('0x1d')](_0xa9d0f8[_0x63ac('0x36')][_0x63ac('0x1a')])&&_0xa9d0f8['profile'][_0x63ac('0x1a')]===_0x63ac('0x52')?_0xa9d0f8[_0x63ac('0x40')][_0x63ac('0x1a')]:!_[_0x63ac('0x1d')](_0xa9d0f8[_0x63ac('0x41')])?_0xa9d0f8[_0x63ac('0x41')]+'\x20'+_0xa9d0f8[_0x63ac('0x42')]:_0xa9d0f8[_0x63ac('0x42')],'id':_0xa9d0f8['id']};_0x2656fe[_0x63ac('0x53')]=intUtil[_0x63ac('0x54')](_0x254790['Subjects'],_0x25d6a7,'\x20');_0x2656fe[_0x63ac('0x55')]=intUtil[_0x63ac('0x54')](_0x254790['Descriptions'],_0x25d6a7,'\x0a');if(_0x4bf198[_0x63ac('0x56')]===_0x63ac('0x4c')){_0x2656fe[_0x63ac('0x57')]={'name':!_['isNil'](_0x4bf198[_0x63ac('0x58')])?_0x4bf198['Full_Name']:!_[_0x63ac('0x1d')](_0x4bf198[_0x63ac('0x59')])?_0x4bf198[_0x63ac('0x59')]+'\x20'+_0x4bf198['Last_Name']:_0x4bf198[_0x63ac('0x5a')],'id':_0x4bf198['id']};}if(_0x4bf198[_0x63ac('0x56')]===_0x63ac('0x4e')){_0x2656fe[_0x63ac('0x5b')]={'name':!_['isNil'](_0x4bf198[_0x63ac('0x58')])?_0x4bf198[_0x63ac('0x58')]:!_[_0x63ac('0x1d')](_0x4bf198['First_Name'])?_0x4bf198[_0x63ac('0x59')]+'\x20'+_0x4bf198[_0x63ac('0x5a')]:_0x4bf198[_0x63ac('0x5a')],'id':_0x4bf198['id']};_0x2656fe['$se_module']=_[_0x63ac('0x45')](_0x4bf198[_0x63ac('0x56')]);}if(_0x25d6a7[_0x63ac('0x5c')]){_0x2656fe['Call_Duration']=moment[_0x63ac('0x5d')](parseInt(_0x25d6a7[_0x63ac('0x5c')])*0x3e8)['format']('mm:ss');}else if(_0x25d6a7[_0x63ac('0x5e')]&&_0x25d6a7[_0x63ac('0x5f')]){_0x2656fe[_0x63ac('0x60')]=moment[_0x63ac('0x5d')](moment(_0x25d6a7['endtime'],_0x63ac('0x61'))['diff'](moment(_0x25d6a7['starttime'],'YYYY-MM-DDTHH:mm:ss')))[_0x63ac('0x2f')](_0x63ac('0x62'));}switch(_0x25d6a7[_0x63ac('0x63')]){case _0x63ac('0x64'):_0x2656fe[_0x63ac('0x65')]=_0x63ac('0x66');break;case _0x63ac('0x67'):case'connect':_0x2656fe[_0x63ac('0x65')]=_0x63ac('0x68');break;case'rejected':_0x2656fe[_0x63ac('0x65')]=_0x63ac('0x69');break;case _0x63ac('0x6a'):_0x2656fe[_0x63ac('0x65')]=_0x63ac('0x6b');break;case _0x63ac('0x6c'):_0x2656fe[_0x63ac('0x65')]=_0x63ac('0x6d');default:}_0x2656fe[_0x63ac('0x6e')]=(_0x5aec5c==='outbound'?moment(_0x25d6a7['starttime'])[_0x63ac('0x2f')]('YYYY-MM-DDTHH:mm:ss'):moment(_0x25d6a7[_0x63ac('0x6f')])['format']('YYYY-MM-DDTHH:mm:ss'))||moment()[_0x63ac('0x2f')](_0x63ac('0x61'));_0x2656fe[_0x63ac('0x70')]=_0x5aec5c||_0x63ac('0x71');_0x2656fe=_['merge'](_0x2656fe,getCustomFields(_0x254790[_0x63ac('0x72')],_0x25d6a7));return request({'method':_0x63ac('0x3d'),'uri':_0x63ac('0x3e')+_0x4a8174+_0x63ac('0x73'),'headers':{'Authorization':_0x63ac('0x31')+_0x123a2e},'body':{'data':[_0x2656fe]},'json':!![]})[_0x63ac('0x28')](function(_0x2eb7b8){if(_0x2eb7b8&&_0x2eb7b8[_0x63ac('0x3c')][0x0][_0x63ac('0x43')]===_0x63ac('0x44')){logger[_0x63ac('0x2e')](_0x63ac('0x74'));return{'id':_0x2eb7b8[_0x63ac('0x3c')][0x0][_0x63ac('0x75')]['id']};}})[_0x63ac('0x2a')](function(_0xb0b82d){logger[_0x63ac('0x2e')](_0x63ac('0x76'),_0xb0b82d[_0x63ac('0x2d')]);console['log'](_0x63ac('0x76'),_0xb0b82d);});}exports[_0x63ac('0x77')]=function(_0xd9009a,_0x52639f,_0x29cbd5,_0x3b8a64,_0x47217f,_0x241ea0){var _0xa8d3b0,_0x571c8c,_0x3e8e3e;_0x241ea0[_0x63ac('0x78')]=intUtil[_0x63ac('0x79')](_0x241ea0[_0x63ac('0x78')]);_0x241ea0[_0x63ac('0x7a')]=intUtil[_0x63ac('0x79')](_0x241ea0['serverUrl']);if(_0x47217f&&_0x47217f[_0x63ac('0x7b')]){logger[_0x63ac('0x2e')](_0x63ac('0x7c'),_0x63ac('0x7d'));_0x52639f[_0x63ac('0x7e')]=_0x241ea0['serverUrl']+_0x63ac('0x7f')+_0x52639f['uniqueid']+_0x63ac('0x80')+md5(_0x52639f[_0x63ac('0x81')]);}else{_0x52639f['recordingURL']='';}var _0x1db7f9=_0x241ea0['host']==='zoho.eu'?'eu':'com';return getAccessToken(_0x241ea0)[_0x63ac('0x28')](function(_0x189393){_0x3e8e3e=_0x189393;return getUser(_0x3e8e3e,_0x1db7f9,_0x241ea0,_0x3b8a64[_0x63ac('0x33')]);})[_0x63ac('0x28')](function(_0x45f633){_0xa8d3b0=_0x45f633;logger[_0x63ac('0x2e')]('The\x20User\x20ID\x20is:',_0xa8d3b0['id']);return getEndUser(_0x3e8e3e,_0x1db7f9,_0x241ea0,_0x52639f['calleridname'],_0x52639f[_0x63ac('0x82')],_0xa8d3b0,_0x29cbd5);})[_0x63ac('0x28')](function(_0x46afeb){_0x571c8c=_0x46afeb;return getCall(_0x3e8e3e,_0x1db7f9,_0x241ea0,_0xa8d3b0,_0x571c8c,_0x29cbd5,_0x52639f,'Inbound');})['then'](function(_0x43368f){if(_0x43368f){logger[_0x63ac('0x2e')](_0x63ac('0x83'),_0x43368f['id']);logger['info'](_0x63ac('0x7c'),'Displaying\x20call\x20to\x20agent\x20in\x20a\x20new\x20tab...');emit(util[_0x63ac('0x2f')](_0x63ac('0x84'),_0x3b8a64[_0x63ac('0x1a')]),'trigger:browser:url',{'uri':_0x63ac('0x85')+_0x241ea0[_0x63ac('0x78')]+_0x63ac('0x86')+_0x43368f['id']});}})[_0x63ac('0x2a')](function(_0x4a00e6){logger['error'](_0x63ac('0x7c'),JSON[_0x63ac('0x10')](_0x4a00e6));});};exports['outbound']=function(_0x2e3546,_0x476540,_0x539f5e,_0xc4b7ae,_0x5273dd,_0x4a427b,_0x517afc){var _0x17511c,_0x5a1dc0,_0x1bfe77;_0x4a427b[_0x63ac('0x78')]=intUtil[_0x63ac('0x79')](_0x4a427b[_0x63ac('0x78')]);_0x4a427b[_0x63ac('0x7a')]=intUtil[_0x63ac('0x79')](_0x4a427b[_0x63ac('0x7a')]);if(_0x517afc&&_0x517afc[_0x63ac('0x87')]&&_0x517afc[_0x63ac('0x87')]!==_0x63ac('0x88')){logger[_0x63ac('0x2e')](_0x63ac('0x89'),_0x63ac('0x7d'));_0x476540['recordingURL']=_0x4a427b['serverUrl']+'/api/voice/recordings/'+_0x476540[_0x63ac('0x81')]+_0x63ac('0x80')+md5(_0x476540[_0x63ac('0x81')]);}var _0x2ce6a5=_0x4a427b[_0x63ac('0x78')]===_0x63ac('0x8a')?'eu':_0x63ac('0x8b');return getAccessToken(_0x4a427b)['then'](function(_0x3c8f15){_0x1bfe77=_0x3c8f15;return getUser(_0x1bfe77,_0x2ce6a5,_0x4a427b,_0xc4b7ae[_0x63ac('0x33')]);})[_0x63ac('0x28')](function(_0x1ed219){_0x17511c=_0x1ed219;logger[_0x63ac('0x2e')](_0x63ac('0x8c'),_0x17511c['id']);return getEndUser(_0x1bfe77,_0x2ce6a5,_0x4a427b,_0x476540[_0x63ac('0x8d')],_0x476540[_0x63ac('0x8e')],_0x17511c,_0x539f5e);})[_0x63ac('0x28')](function(_0x3aa840){_0x5a1dc0=_0x3aa840;return getCall(_0x1bfe77,_0x2ce6a5,_0x4a427b,_0x17511c,_0x5a1dc0,_0x539f5e,_0x476540,_0x63ac('0x8f'));})['then'](function(_0x36be89){if(_0x36be89){logger[_0x63ac('0x2e')](_0x63ac('0x83'),_0x36be89['id']);logger[_0x63ac('0x2e')](_0x63ac('0x89'),_0x63ac('0x90'));emit(util['format']('user:%s',_0xc4b7ae[_0x63ac('0x1a')]),_0x63ac('0x91'),{'uri':_0x63ac('0x85')+_0x4a427b['host']+_0x63ac('0x86')+_0x36be89['id']});}})['catch'](function(_0x12e28e){logger[_0x63ac('0x2b')](_0x63ac('0x89'),JSON[_0x63ac('0x10')](_0x12e28e));});};exports[_0x63ac('0x92')]=function(_0x1cdd37,_0x10b206,_0x4ab76d,_0x1322ff,_0x41779e,_0x45c1c3){var _0x54af10,_0xff33f3,_0x493bf6;_0x45c1c3['host']=intUtil[_0x63ac('0x79')](_0x45c1c3['host']);_0x45c1c3[_0x63ac('0x7a')]=intUtil['stripTrailingSlash'](_0x45c1c3[_0x63ac('0x7a')]);if(_0x41779e&&_0x41779e[_0x63ac('0x7b')]){logger['info']('['+_0x10b206[_0x63ac('0x63')]['toUpperCase']()+']','Recording\x20is\x20enabled!');_0x10b206[_0x63ac('0x7e')]=_0x45c1c3[_0x63ac('0x7a')]+_0x63ac('0x7f')+_0x10b206['uniqueid']+'/downloads?type=uniqueid&token='+md5(_0x10b206[_0x63ac('0x81')]);}else{_0x10b206[_0x63ac('0x7e')]='';}var _0x2fb7a7=_0x45c1c3['host']===_0x63ac('0x8a')?'eu':'com';return getAccessToken(_0x45c1c3)[_0x63ac('0x28')](function(_0x1c05d5){_0x493bf6=_0x1c05d5;return getUser(_0x493bf6,_0x2fb7a7,_0x45c1c3);})[_0x63ac('0x28')](function(_0x3c5231){_0x54af10=_0x3c5231;logger[_0x63ac('0x2e')](_0x63ac('0x8c'),_0x54af10['id']);return getEndUser(_0x493bf6,_0x2fb7a7,_0x45c1c3,_0x10b206[_0x63ac('0x93')],_0x10b206[_0x63ac('0x82')],_0x54af10,_0x4ab76d);})[_0x63ac('0x28')](function(_0x5c8f54){_0xff33f3=_0x5c8f54;return getCall(_0x493bf6,_0x2fb7a7,_0x45c1c3,_0x54af10,_0xff33f3,_0x4ab76d,_0x10b206,_0x63ac('0x71'));})[_0x63ac('0x28')](function(_0x288e14){if(_0x288e14){logger[_0x63ac('0x2e')](_0x63ac('0x83'),_0x288e14['id']);}})['catch'](function(_0x1e81c5){logger[_0x63ac('0x2b')]('['+_0x10b206[_0x63ac('0x63')]['toUpperCase']()+']',JSON[_0x63ac('0x10')](_0x1e81c5));});};
\ No newline at end of file
index 1127600..63db4c1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf4d4=['error','format','info','%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s','shelljs','mustache','exec','data2','Script','data3'];(function(_0x9842fd,_0x35775c){var _0x52c713=function(_0x1a8aaf){while(--_0x1a8aaf){_0x9842fd['push'](_0x9842fd['shift']());}};_0x52c713(++_0x35775c);}(_0xf4d4,0xcc));var _0x4f4d=function(_0x3933f9,_0x89015){_0x3933f9=_0x3933f9-0x0;var _0x1534ad=_0xf4d4[_0x3933f9];return _0x1534ad;};'use strict';var util=require('util');var sh=require(_0x4f4d('0x0'));var Mustache=require(_0x4f4d('0x1'));var logger=require('../../../../config/logger')('trigger');exports[_0x4f4d('0x2')]=function(_0x4981a4,_0x5c8703){var _0x1dbda2=_0x4981a4[_0x4f4d('0x3')]?_0x4981a4[_0x4f4d('0x3')]:_0x4f4d('0x4');var _0x2c14e9=_0x4981a4[_0x4f4d('0x5')]?Mustache['render'](_0x4981a4[_0x4f4d('0x5')],_0x5c8703):_0x5c8703;sh[_0x4f4d('0x2')](_0x2c14e9,function(_0x15b64c,_0x475bd1,_0xf6eb98){if(_0x15b64c!==0x0){logger[_0x4f4d('0x6')](util[_0x4f4d('0x7')]('%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s',_0x1dbda2,_0x2c14e9,_0x15b64c,_0xf6eb98));}else{logger[_0x4f4d('0x8')](util[_0x4f4d('0x7')](_0x4f4d('0x9'),_0x1dbda2,_0x2c14e9,_0x475bd1));}});};
\ No newline at end of file
+var _0x4701=['shelljs','mustache','trigger','exec','data2','Script','data3','render','error','%s\x20\x27%s\x27\x20failed\x20with\x20code\x20%d\x20and\x20error:\x20%s','format'];(function(_0x4478a5,_0x2ca5ec){var _0x225873=function(_0x3ec40c){while(--_0x3ec40c){_0x4478a5['push'](_0x4478a5['shift']());}};_0x225873(++_0x2ca5ec);}(_0x4701,0x79));var _0x1470=function(_0x5cb416,_0x3c85b5){_0x5cb416=_0x5cb416-0x0;var _0x38c095=_0x4701[_0x5cb416];return _0x38c095;};'use strict';var util=require('util');var sh=require(_0x1470('0x0'));var Mustache=require(_0x1470('0x1'));var logger=require('../../../../config/logger')(_0x1470('0x2'));exports[_0x1470('0x3')]=function(_0xeb6471,_0x59b0ec){var _0x2aaa12=_0xeb6471[_0x1470('0x4')]?_0xeb6471['data2']:_0x1470('0x5');var _0x5f47e9=_0xeb6471[_0x1470('0x6')]?Mustache[_0x1470('0x7')](_0xeb6471[_0x1470('0x6')],_0x59b0ec):_0x59b0ec;sh['exec'](_0x5f47e9,function(_0xcc94dd,_0x94424e,_0x4c3b9f){if(_0xcc94dd!==0x0){logger[_0x1470('0x8')](util['format'](_0x1470('0x9'),_0x2aaa12,_0x5f47e9,_0xcc94dd,_0x4c3b9f));}else{logger['info'](util[_0x1470('0xa')]('%s\x20\x27%s\x27\x20succeeded\x20with\x20output:\x20%s',_0x2aaa12,_0x5f47e9,_0x94424e));}});};
\ No newline at end of file
index 06483a2..a21df10 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7b4d=['GET','POST','PUT','data7','body','body\x20has\x20been\x20passed\x20to\x20URLforward\x20in\x20a\x20wrong\x20format','info','format','stringify','then','isNil',',\x20request\x20body:\x20','%s\x20%s\x20succeeded\x20with\x20status:\x20%d\x20and\x20response:\x20%s','statusCode','%s\x20%s\x20failed\x20with\x20status:\x20%d\x20and\x20error:\x20%s\x20%s','name','message','request-promise','util','lodash','exec','data1','toUpperCase','render','data2','data5','number','headers','data6','parse','error','stack'];(function(_0x29817e,_0xf1b822){var _0x5dccac=function(_0x54e4dc){while(--_0x54e4dc){_0x29817e['push'](_0x29817e['shift']());}};_0x5dccac(++_0xf1b822);}(_0x7b4d,0x91));var _0xd7b4=function(_0x4c4037,_0x15054b){_0x4c4037=_0x4c4037-0x0;var _0x357862=_0x7b4d[_0x4c4037];return _0x357862;};'use strict';var rp=require(_0xd7b4('0x0'));var util=require(_0xd7b4('0x1'));var _=require(_0xd7b4('0x2'));var Mustache=require('mustache');var logger=require('../../../../config/logger')('trigger');exports[_0xd7b4('0x3')]=function(_0x55299c,_0x48c941){var _0x46db86,_0x2a6121;var _0xd0fbf2={'method':_0x55299c[_0xd7b4('0x4')][_0xd7b4('0x5')](),'uri':Mustache[_0xd7b4('0x6')](_0x55299c[_0xd7b4('0x7')],_0x48c941),'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x55299c[_0xd7b4('0x8')])===_0xd7b4('0x9')&&parseInt(_0x55299c['data5'])>=0x1&&parseInt(_0x55299c[_0xd7b4('0x8')])<=0xa?parseInt(_0x55299c[_0xd7b4('0x8')])*0x3e8:0x5*0x3e8};try{_0xd0fbf2[_0xd7b4('0xa')]=_0x55299c[_0xd7b4('0xb')]?JSON[_0xd7b4('0xc')](Mustache[_0xd7b4('0x6')](_0x55299c[_0xd7b4('0xb')],_0x48c941)):{};}catch(_0x2c09d3){logger[_0xd7b4('0xd')](_0x2c09d3[_0xd7b4('0xe')]);}switch(_0x55299c[_0xd7b4('0x4')][_0xd7b4('0x5')]()){case _0xd7b4('0xf'):case'DELETE':_0x46db86=null;_0xd0fbf2['qs']=_0x48c941;break;case _0xd7b4('0x10'):case _0xd7b4('0x11'):if(_0x55299c['data7']){try{_0x46db86=JSON[_0xd7b4('0xc')](Mustache['render'](_0x55299c[_0xd7b4('0x12')],_0x48c941));_0xd0fbf2[_0xd7b4('0x13')]=_0x46db86;}catch(_0x3c0c06){logger[_0xd7b4('0xd')](_0x3c0c06['stack']);logger['error'](_0xd7b4('0x14'));}}else{_0x46db86=_0x48c941;_0xd0fbf2[_0xd7b4('0x13')]=_0x46db86;}break;}logger[_0xd7b4('0x15')](util[_0xd7b4('0x16')]('%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s',_0x55299c['data1'],_0x55299c[_0xd7b4('0x7')],JSON[_0xd7b4('0x17')](_0xd0fbf2)));rp(_0xd0fbf2)[_0xd7b4('0x18')](function(_0x3ddd88){_0x46db86=!_[_0xd7b4('0x19')](_0x46db86)?_0xd7b4('0x1a')+_0x46db86:'';_0x2a6121=typeof _0x3ddd88[_0xd7b4('0x13')]==='object'?JSON['stringify'](_0x3ddd88['body']):_0x3ddd88[_0xd7b4('0x13')];logger[_0xd7b4('0x15')](util['format'](_0xd7b4('0x1b'),_0x55299c[_0xd7b4('0x4')],_0x55299c[_0xd7b4('0x7')],_0x3ddd88[_0xd7b4('0x1c')],_0x2a6121));})['catch'](function(_0x3705e7){logger[_0xd7b4('0xd')](util['format'](_0xd7b4('0x1d'),_0x55299c['data1'],_0x55299c[_0xd7b4('0x7')],_0x3705e7[_0xd7b4('0x1c')],_0x3705e7[_0xd7b4('0x1e')],_0x3705e7[_0xd7b4('0x1f')]));});};
\ No newline at end of file
+var _0x555c=['body','info','format','%s\x20%s\x20sending\x20request\x20with\x20following\x20options:\x20%s','data2','stringify','then','isNil','object','%s\x20%s\x20succeeded\x20with\x20status:\x20%d\x20and\x20response:\x20%s','statusCode','catch','%s\x20%s\x20failed\x20with\x20status:\x20%d\x20and\x20error:\x20%s\x20%s','message','request-promise','util','lodash','../../../../config/logger','trigger','render','number','data5','headers','data6','parse','error','stack','data1','toUpperCase','DELETE','POST','PUT','data7'];(function(_0x179cce,_0x239422){var _0x54ac6d=function(_0x21a7f0){while(--_0x21a7f0){_0x179cce['push'](_0x179cce['shift']());}};_0x54ac6d(++_0x239422);}(_0x555c,0x158));var _0xc555=function(_0x56482c,_0x16118d){_0x56482c=_0x56482c-0x0;var _0x5aae7a=_0x555c[_0x56482c];return _0x5aae7a;};'use strict';var rp=require(_0xc555('0x0'));var util=require(_0xc555('0x1'));var _=require(_0xc555('0x2'));var Mustache=require('mustache');var logger=require(_0xc555('0x3'))(_0xc555('0x4'));exports['exec']=function(_0x140fd5,_0x53b65f){var _0x16a5c4,_0x31e200;var _0x5b8398={'method':_0x140fd5['data1']['toUpperCase'](),'uri':Mustache[_0xc555('0x5')](_0x140fd5['data2'],_0x53b65f),'json':!![],'resolveWithFullResponse':!![],'timeout':typeof parseInt(_0x140fd5['data5'])===_0xc555('0x6')&&parseInt(_0x140fd5[_0xc555('0x7')])>=0x1&&parseInt(_0x140fd5[_0xc555('0x7')])<=0xa?parseInt(_0x140fd5['data5'])*0x3e8:0x5*0x3e8};try{_0x5b8398[_0xc555('0x8')]=_0x140fd5[_0xc555('0x9')]?JSON[_0xc555('0xa')](Mustache[_0xc555('0x5')](_0x140fd5[_0xc555('0x9')],_0x53b65f)):{};}catch(_0x2f0720){logger[_0xc555('0xb')](_0x2f0720[_0xc555('0xc')]);}switch(_0x140fd5[_0xc555('0xd')][_0xc555('0xe')]()){case'GET':case _0xc555('0xf'):_0x16a5c4=null;_0x5b8398['qs']=_0x53b65f;break;case _0xc555('0x10'):case _0xc555('0x11'):if(_0x140fd5['data7']){try{_0x16a5c4=JSON[_0xc555('0xa')](Mustache[_0xc555('0x5')](_0x140fd5[_0xc555('0x12')],_0x53b65f));_0x5b8398[_0xc555('0x13')]=_0x16a5c4;}catch(_0x59493e){logger['error'](_0x59493e['stack']);logger[_0xc555('0xb')]('body\x20has\x20been\x20passed\x20to\x20URLforward\x20in\x20a\x20wrong\x20format');}}else{_0x16a5c4=_0x53b65f;_0x5b8398['body']=_0x16a5c4;}break;}logger[_0xc555('0x14')](util[_0xc555('0x15')](_0xc555('0x16'),_0x140fd5[_0xc555('0xd')],_0x140fd5[_0xc555('0x17')],JSON[_0xc555('0x18')](_0x5b8398)));rp(_0x5b8398)[_0xc555('0x19')](function(_0x2c95a1){_0x16a5c4=!_[_0xc555('0x1a')](_0x16a5c4)?',\x20request\x20body:\x20'+_0x16a5c4:'';_0x31e200=typeof _0x2c95a1[_0xc555('0x13')]===_0xc555('0x1b')?JSON['stringify'](_0x2c95a1[_0xc555('0x13')]):_0x2c95a1[_0xc555('0x13')];logger[_0xc555('0x14')](util[_0xc555('0x15')](_0xc555('0x1c'),_0x140fd5[_0xc555('0xd')],_0x140fd5['data2'],_0x2c95a1[_0xc555('0x1d')],_0x31e200));})[_0xc555('0x1e')](function(_0x3a7d62){logger['error'](util['format'](_0xc555('0x1f'),_0x140fd5['data1'],_0x140fd5[_0xc555('0x17')],_0x3a7d62[_0xc555('0x1d')],_0x3a7d62['name'],_0x3a7d62[_0xc555('0x20')]));});};
\ No newline at end of file
index 277bb40..3eebd5e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xec6c=['routing','client','http','Request','request','then','debug','rpc','error','message','result','catch','jayson/promise','bluebird','../../config/logger'];(function(_0x48cb1f,_0x5ca68d){var _0x172c4d=function(_0x85040){while(--_0x85040){_0x48cb1f['push'](_0x48cb1f['shift']());}};_0x172c4d(++_0x5ca68d);}(_0xec6c,0x1bf));var _0xcec6=function(_0x3d393f,_0x523ddc){_0x3d393f=_0x3d393f-0x0;var _0xd5cc33=_0xec6c[_0x3d393f];return _0xd5cc33;};'use strict';var jayson=require(_0xcec6('0x0'));var BPromise=require(_0xcec6('0x1'));var logger=require(_0xcec6('0x2'))(_0xcec6('0x3'));var client=jayson[_0xcec6('0x4')][_0xcec6('0x5')]({'port':0x2329});client[_0xcec6('0x6')]=function(_0x4c0951,_0x3a79af){return new BPromise(function(_0x2e62c9,_0x5ca210){return client[_0xcec6('0x7')](_0x4c0951,_0x3a79af)[_0xcec6('0x8')](function(_0x44705e){logger[_0xcec6('0x9')]('rpc','routing',_0x4c0951,_0x3a79af,_0x44705e);if(_0x44705e['error']){logger['error'](_0xcec6('0xa'),_0xcec6('0x3'),_0x4c0951,_0x44705e[_0xcec6('0xb')][_0xcec6('0xc')],_0x3a79af);return _0x5ca210(_0x44705e[_0xcec6('0xb')]['message']);}else{return _0x2e62c9(_0x44705e[_0xcec6('0xd')]);}})[_0xcec6('0xe')](function(_0x100d55){logger[_0xcec6('0xb')](_0xcec6('0xa'),_0xcec6('0x3'),_0x4c0951,_0x100d55,_0x3a79af);return _0x5ca210(_0x100d55);});});};module['exports']=client;
\ No newline at end of file
+var _0xe9de=['client','Request','request','rpc','error','message','result','catch','exports','jayson/promise','bluebird','../../config/logger','routing'];(function(_0x29d180,_0x3d3868){var _0x19d3e9=function(_0x2a0682){while(--_0x2a0682){_0x29d180['push'](_0x29d180['shift']());}};_0x19d3e9(++_0x3d3868);}(_0xe9de,0xf3));var _0xee9d=function(_0x12cd0e,_0x4a09bb){_0x12cd0e=_0x12cd0e-0x0;var _0x1898f8=_0xe9de[_0x12cd0e];return _0x1898f8;};'use strict';var jayson=require(_0xee9d('0x0'));var BPromise=require(_0xee9d('0x1'));var logger=require(_0xee9d('0x2'))(_0xee9d('0x3'));var client=jayson[_0xee9d('0x4')]['http']({'port':0x2329});client[_0xee9d('0x5')]=function(_0x4dd5c0,_0x4cba26){return new BPromise(function(_0x4262b5,_0x553002){return client[_0xee9d('0x6')](_0x4dd5c0,_0x4cba26)['then'](function(_0x2d29ac){logger['debug'](_0xee9d('0x7'),_0xee9d('0x3'),_0x4dd5c0,_0x4cba26,_0x2d29ac);if(_0x2d29ac[_0xee9d('0x8')]){logger[_0xee9d('0x8')]('rpc',_0xee9d('0x3'),_0x4dd5c0,_0x2d29ac[_0xee9d('0x8')][_0xee9d('0x9')],_0x4cba26);return _0x553002(_0x2d29ac[_0xee9d('0x8')][_0xee9d('0x9')]);}else{return _0x4262b5(_0x2d29ac[_0xee9d('0xa')]);}})[_0xee9d('0xb')](function(_0x8688af){logger['error']('rpc',_0xee9d('0x3'),_0x4dd5c0,_0x8688af,_0x4cba26);return _0x553002(_0x8688af);});});};module[_0xee9d('0xc')]=client;
\ No newline at end of file
index 2ebdbe8..d1dbe49 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc3a8=['./realtime','./lib/email','email','then','getMailAccounts','initMailAccounts','mailAccounts','listen','getSettings','loginMailFrequency','catch','error','Email\x20service\x20initialization','./server'];(function(_0x194cbb,_0x430593){var _0x1306e7=function(_0x40893b){while(--_0x40893b){_0x194cbb['push'](_0x194cbb['shift']());}};_0x1306e7(++_0x430593);}(_0xc3a8,0x16b));var _0x8c3a=function(_0xe1441d,_0x36fb8e){_0xe1441d=_0xe1441d-0x0;var _0x2ef242=_0xc3a8[_0xe1441d];return _0x2ef242;};'use strict';var server=require(_0x8c3a('0x0'));var Realtime=require(_0x8c3a('0x1'));var EmailChannel=require(_0x8c3a('0x2'));var mailAccount=require('./rpc/mailAccount');var setting=require('./rpc/setting');var logger=require('../../config/logger')(_0x8c3a('0x3'));var realtime=new Realtime();var email=new EmailChannel(realtime);function initRealtime(){return Promise['resolve']()[_0x8c3a('0x4')](mailAccount[_0x8c3a('0x5')]())[_0x8c3a('0x4')](realtime[_0x8c3a('0x6')]())[_0x8c3a('0x4')](function(){email['refresh'](realtime[_0x8c3a('0x7')]);return realtime;});}function main(){return server[_0x8c3a('0x8')](realtime,email)['then'](function(){return initRealtime();})['then'](function(){return setting[_0x8c3a('0x9')]();})['then'](function(_0x4356e8){return setInterval(initRealtime,_0x4356e8[_0x8c3a('0xa')]*0x3e8);})[_0x8c3a('0xb')](function(_0x3c8f80){logger[_0x8c3a('0xc')](_0x8c3a('0xd'),_0x3c8f80);});}main();
\ No newline at end of file
+var _0x828d=['./lib/email','./rpc/mailAccount','./rpc/setting','../../config/logger','email','then','initMailAccounts','refresh','mailAccounts','listen','getSettings','loginMailFrequency','catch'];(function(_0xa26666,_0x3e3a4b){var _0x1a113c=function(_0x13eb52){while(--_0x13eb52){_0xa26666['push'](_0xa26666['shift']());}};_0x1a113c(++_0x3e3a4b);}(_0x828d,0xb6));var _0xd828=function(_0x42c5c7,_0x56f69b){_0x42c5c7=_0x42c5c7-0x0;var _0x3d261e=_0x828d[_0x42c5c7];return _0x3d261e;};'use strict';var server=require('./server');var Realtime=require('./realtime');var EmailChannel=require(_0xd828('0x0'));var mailAccount=require(_0xd828('0x1'));var setting=require(_0xd828('0x2'));var logger=require(_0xd828('0x3'))(_0xd828('0x4'));var realtime=new Realtime();var email=new EmailChannel(realtime);function initRealtime(){return Promise['resolve']()[_0xd828('0x5')](mailAccount['getMailAccounts']())[_0xd828('0x5')](realtime[_0xd828('0x6')]())['then'](function(){email[_0xd828('0x7')](realtime[_0xd828('0x8')]);return realtime;});}function main(){return server[_0xd828('0x9')](realtime,email)[_0xd828('0x5')](function(){return initRealtime();})['then'](function(){return setting[_0xd828('0xa')]();})[_0xd828('0x5')](function(_0x207bd0){return setInterval(initRealtime,_0x207bd0[_0xd828('0xb')]*0x3e8);})[_0xd828('0xc')](function(_0x1ec0f1){logger['error']('Email\x20service\x20initialization',_0x1ec0f1);});}main();
\ No newline at end of file
index c4bf23a..4488c43 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5989=['key','active','Imap','status','messageStatus','total','isNil','mailAccount:update','refresh','hasOwnProperty','service','provider','custom','box','handleImapBox','bind','handleImapEmail','handleImapEnd','error','handleImapError','disabled','messages','info','firstName','from','notify','then','catch','Mail\x20not\x20accepted\x20from\x20routing\x20%s','stringify','send','verifySmtp','Smtp','lastSync','verify','verified','bluebird','md5','../../../config/environment','../../../config/logger','email','redis','defaults','localhost','socket.io-emitter','./imap','./smtp','../rpc/mailAccount','start\x20email\x20channel','mailAccounts','imapAccounts','smtp','prototype','emit','name'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0x5989,0x1a5));var _0x9598=function(_0x107df9,_0x4d1825){_0x107df9=_0x107df9-0x0;var _0x2df84a=_0x5989[_0x107df9];return _0x2df84a;};'use strict';var _=require('lodash');var moment=require('moment');var BPromise=require(_0x9598('0x0'));var md5=require(_0x9598('0x1'));var Redis=require('ioredis');var config=require(_0x9598('0x2'));var logger=require(_0x9598('0x3'))(_0x9598('0x4'));config[_0x9598('0x5')]=_[_0x9598('0x6')](config[_0x9598('0x5')],{'host':_0x9598('0x7'),'port':0x18eb});var io=require(_0x9598('0x8'))(new Redis(config['redis']));var EmailImap=require(_0x9598('0x9'));var EmailSmtp=require(_0x9598('0xa'));var mailAccount=require(_0x9598('0xb'));var md5Accounts={};function EmailChannel(_0x23f4fd){logger['info'](_0x9598('0xc'));this['mailAccounts']=_0x23f4fd[_0x9598('0xd')];this[_0x9598('0xe')]={};this[_0x9598('0xf')]=new EmailSmtp();}EmailChannel[_0x9598('0x10')][_0x9598('0x11')]=function(_0x14364d){var _0x51e28b=this[_0x9598('0xd')][_0x14364d];var _0x202664={'id':_0x51e28b['id'],'name':_0x51e28b[_0x9598('0x12')],'key':_0x51e28b[_0x9598('0x13')],'active':_0x51e28b[_0x9598('0x14')],'Imap':{'status':_0x51e28b[_0x9598('0x15')][_0x9598('0x16')],'messageStatus':_0x51e28b[_0x9598('0x15')][_0x9598('0x17')],'total':_0x51e28b[_0x9598('0x15')][_0x9598('0x18')]}};if(_[_0x9598('0x19')](md5Accounts[_0x14364d])){md5Accounts[_0x14364d]={};}var _0x14ec2d=md5(JSON['stringify'](_0x202664));if(md5Accounts[_0x14364d]['md5']!==_0x14ec2d){md5Accounts[_0x14364d][_0x9598('0x1')]=_0x14ec2d;io[_0x9598('0x11')](_0x9598('0x1a'),_0x202664);}};EmailChannel['prototype'][_0x9598('0x1b')]=function(_0xe564e5){for(var _0x5aff4a in _0xe564e5){if(_0xe564e5[_0x9598('0x1c')](_0x5aff4a)){if(_0xe564e5[_0x5aff4a][_0x9598('0x15')]&&_0xe564e5[_0x5aff4a]['active']){var _0x71f595=_0xe564e5[_0x5aff4a][_0x9598('0x15')];if(!_0x71f595[_0x9598('0x1d')]&&_0xe564e5[_0x5aff4a][_0x9598('0x1e')]!==_0x9598('0x1f'))_0x71f595[_0x9598('0x1d')]=_0xe564e5[_0x5aff4a][_0x9598('0x1e')];if(!this['imapAccounts'][_0x9598('0x1c')](_0x71f595['id'])){this[_0x9598('0xe')][_0x71f595['id']]=new EmailImap(_0x71f595,_0xe564e5[_0x5aff4a][_0x9598('0x4')]);this['imapAccounts'][_0x71f595['id']]['on'](_0x9598('0x20'),this[_0x9598('0x21')][_0x9598('0x22')](this,_0x5aff4a));this[_0x9598('0xe')][_0x71f595['id']]['on'](_0x9598('0x4'),this[_0x9598('0x23')][_0x9598('0x22')](this,_0x5aff4a));this[_0x9598('0xe')][_0x71f595['id']]['on']('end',this[_0x9598('0x24')][_0x9598('0x22')](this,_0x5aff4a));this['imapAccounts'][_0x71f595['id']]['on'](_0x9598('0x25'),this[_0x9598('0x26')][_0x9598('0x22')](this,_0x5aff4a));}}else{if(_['isNil'](this['mailAccounts'][_0x5aff4a]['Imap'])){this[_0x9598('0xd')][_0x5aff4a][_0x9598('0x15')]={};}this[_0x9598('0xd')][_0x5aff4a][_0x9598('0x15')][_0x9598('0x16')]=_0x9598('0x27');this[_0x9598('0xd')][_0x5aff4a]['Imap'][_0x9598('0x17')]='';this[_0x9598('0x11')](_0x5aff4a);}}}};EmailChannel[_0x9598('0x10')]['handleImapBox']=function(_0x55a830,_0x32c2de){if(this['mailAccounts'][_0x55a830]){this[_0x9598('0xd')][_0x55a830]['Imap'][_0x9598('0x16')]='connected';this[_0x9598('0xd')][_0x55a830][_0x9598('0x15')][_0x9598('0x17')]=_0x32c2de[_0x9598('0x12')];if(_0x32c2de[_0x9598('0x28')]){this[_0x9598('0xd')][_0x55a830][_0x9598('0x15')][_0x9598('0x18')]=_0x32c2de[_0x9598('0x28')][_0x9598('0x18')];}return this[_0x9598('0x11')](_0x55a830);}};EmailChannel[_0x9598('0x10')]['handleImapEmail']=function(_0x9b3c55,_0x7ef0f2){logger[_0x9598('0x29')]('New\x20email\x20from\x20%s\x20%s\x20%s\x20to\x20%s',_0x7ef0f2[_0x9598('0x2a')],_0x7ef0f2['lastName'],_0x7ef0f2[_0x9598('0x2b')],_0x9b3c55);if(this[_0x9598('0xd')][_0x9b3c55]){return mailAccount[_0x9598('0x2c')](_0x9b3c55,_0x7ef0f2)[_0x9598('0x2d')](function(_0x17ab8a){if(_0x17ab8a){logger[_0x9598('0x29')]('Mail\x20accepted\x20from\x20routing');}})[_0x9598('0x2e')](function(_0x48c8ff){logger['error'](_0x9598('0x2f'),JSON[_0x9598('0x30')](_0x48c8ff));});}};EmailChannel[_0x9598('0x10')][_0x9598('0x24')]=function(_0x5655d9){if(this[_0x9598('0xd')][_0x5655d9]&&this[_0x9598('0xd')][_0x5655d9][_0x9598('0x15')]){if(this[_0x9598('0xe')][this[_0x9598('0xd')][_0x5655d9][_0x9598('0x15')]['id']]){delete this[_0x9598('0xe')][this[_0x9598('0xd')][_0x5655d9][_0x9598('0x15')]['id']];}this[_0x9598('0xd')][_0x5655d9][_0x9598('0x15')]['lastSync']=moment();this['emit'](_0x5655d9);}};EmailChannel[_0x9598('0x10')][_0x9598('0x26')]=function(_0x456bf8,_0x45c30a){if(this[_0x9598('0xd')][_0x456bf8]){this[_0x9598('0xd')][_0x456bf8]['Imap'][_0x9598('0x16')]='error';this[_0x9598('0xd')][_0x456bf8][_0x9598('0x15')][_0x9598('0x17')]=_0x45c30a;return this[_0x9598('0x11')](_0x456bf8);}};EmailChannel['prototype']['sendMail']=function(_0x563cd3,_0x539d20){return this[_0x9598('0xf')][_0x9598('0x31')](_0x563cd3,_0x539d20);};EmailChannel['prototype'][_0x9598('0x32')]=function(_0x3e5873){var _0x48784e=this;if(this['mailAccounts'][_0x3e5873['id']]){if(_['isNil'](this['mailAccounts'][_0x3e5873['id']][_0x9598('0x33')])){this[_0x9598('0xd')][_0x3e5873['id']]['Smtp']={};}this[_0x9598('0xd')][_0x3e5873['id']]['Smtp'][_0x9598('0x34')]=moment();return new BPromise(function(_0x2466b8,_0x27961b){return _0x48784e[_0x9598('0xf')][_0x9598('0x35')](_0x3e5873)[_0x9598('0x2d')](function(_0x24012c){_0x48784e['mailAccounts'][_0x3e5873['id']]['Smtp']['status']=_0x9598('0x36');_0x48784e[_0x9598('0xd')][_0x3e5873['id']][_0x9598('0x33')][_0x9598('0x17')]='';_0x48784e[_0x9598('0x11')](_0x3e5873['id']);_0x2466b8(_0x24012c);})[_0x9598('0x2e')](function(_0x5bcb0a){_0x48784e[_0x9598('0xd')][_0x3e5873['id']][_0x9598('0x33')]['status']=_0x9598('0x25');_0x48784e[_0x9598('0xd')][_0x3e5873['id']][_0x9598('0x33')][_0x9598('0x17')]=_0x5bcb0a;_0x48784e[_0x9598('0x11')](_0x3e5873['id']);_0x27961b(_0x5bcb0a);});});}return this[_0x9598('0xf')][_0x9598('0x35')](_0x3e5873);};module['exports']=EmailChannel;
\ No newline at end of file
+var _0x6952=['Mail\x20not\x20accepted\x20from\x20routing\x20%s','stringify','sendMail','send','verifySmtp','isNil','Smtp','lastSync','verify','exports','lodash','bluebird','md5','ioredis','../../../config/environment','../../../config/logger','email','redis','localhost','./smtp','../rpc/mailAccount','info','start\x20email\x20channel','mailAccounts','imapAccounts','smtp','prototype','emit','name','key','active','Imap','status','messageStatus','total','mailAccount:update','refresh','hasOwnProperty','service','provider','custom','handleImapBox','handleImapEmail','bind','end','handleImapEnd','error','handleImapError','disabled','messages','lastName','from','notify','then','Mail\x20accepted\x20from\x20routing','catch'];(function(_0x85e4ea,_0x6c64bf){var _0x566bbd=function(_0xcdb72a){while(--_0xcdb72a){_0x85e4ea['push'](_0x85e4ea['shift']());}};_0x566bbd(++_0x6c64bf);}(_0x6952,0x1ca));var _0x2695=function(_0x28967e,_0x19648e){_0x28967e=_0x28967e-0x0;var _0x4be5c8=_0x6952[_0x28967e];return _0x4be5c8;};'use strict';var _=require(_0x2695('0x0'));var moment=require('moment');var BPromise=require(_0x2695('0x1'));var md5=require(_0x2695('0x2'));var Redis=require(_0x2695('0x3'));var config=require(_0x2695('0x4'));var logger=require(_0x2695('0x5'))(_0x2695('0x6'));config[_0x2695('0x7')]=_['defaults'](config[_0x2695('0x7')],{'host':_0x2695('0x8'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));var EmailImap=require('./imap');var EmailSmtp=require(_0x2695('0x9'));var mailAccount=require(_0x2695('0xa'));var md5Accounts={};function EmailChannel(_0x58a2b8){logger[_0x2695('0xb')](_0x2695('0xc'));this[_0x2695('0xd')]=_0x58a2b8[_0x2695('0xd')];this[_0x2695('0xe')]={};this[_0x2695('0xf')]=new EmailSmtp();}EmailChannel[_0x2695('0x10')][_0x2695('0x11')]=function(_0x36a198){var _0x21637a=this[_0x2695('0xd')][_0x36a198];var _0x312b66={'id':_0x21637a['id'],'name':_0x21637a[_0x2695('0x12')],'key':_0x21637a[_0x2695('0x13')],'active':_0x21637a[_0x2695('0x14')],'Imap':{'status':_0x21637a[_0x2695('0x15')][_0x2695('0x16')],'messageStatus':_0x21637a[_0x2695('0x15')][_0x2695('0x17')],'total':_0x21637a['Imap'][_0x2695('0x18')]}};if(_['isNil'](md5Accounts[_0x36a198])){md5Accounts[_0x36a198]={};}var _0x3a863d=md5(JSON['stringify'](_0x312b66));if(md5Accounts[_0x36a198][_0x2695('0x2')]!==_0x3a863d){md5Accounts[_0x36a198][_0x2695('0x2')]=_0x3a863d;io[_0x2695('0x11')](_0x2695('0x19'),_0x312b66);}};EmailChannel[_0x2695('0x10')][_0x2695('0x1a')]=function(_0x751a56){for(var _0x7e3c01 in _0x751a56){if(_0x751a56[_0x2695('0x1b')](_0x7e3c01)){if(_0x751a56[_0x7e3c01][_0x2695('0x15')]&&_0x751a56[_0x7e3c01]['active']){var _0x303503=_0x751a56[_0x7e3c01]['Imap'];if(!_0x303503[_0x2695('0x1c')]&&_0x751a56[_0x7e3c01][_0x2695('0x1d')]!==_0x2695('0x1e'))_0x303503[_0x2695('0x1c')]=_0x751a56[_0x7e3c01][_0x2695('0x1d')];if(!this[_0x2695('0xe')]['hasOwnProperty'](_0x303503['id'])){this[_0x2695('0xe')][_0x303503['id']]=new EmailImap(_0x303503,_0x751a56[_0x7e3c01]['email']);this[_0x2695('0xe')][_0x303503['id']]['on']('box',this[_0x2695('0x1f')]['bind'](this,_0x7e3c01));this['imapAccounts'][_0x303503['id']]['on'](_0x2695('0x6'),this[_0x2695('0x20')][_0x2695('0x21')](this,_0x7e3c01));this[_0x2695('0xe')][_0x303503['id']]['on'](_0x2695('0x22'),this[_0x2695('0x23')][_0x2695('0x21')](this,_0x7e3c01));this['imapAccounts'][_0x303503['id']]['on'](_0x2695('0x24'),this[_0x2695('0x25')][_0x2695('0x21')](this,_0x7e3c01));}}else{if(_['isNil'](this[_0x2695('0xd')][_0x7e3c01][_0x2695('0x15')])){this[_0x2695('0xd')][_0x7e3c01][_0x2695('0x15')]={};}this[_0x2695('0xd')][_0x7e3c01][_0x2695('0x15')][_0x2695('0x16')]=_0x2695('0x26');this['mailAccounts'][_0x7e3c01][_0x2695('0x15')][_0x2695('0x17')]='';this[_0x2695('0x11')](_0x7e3c01);}}}};EmailChannel[_0x2695('0x10')]['handleImapBox']=function(_0x3e8475,_0x10588d){if(this[_0x2695('0xd')][_0x3e8475]){this[_0x2695('0xd')][_0x3e8475][_0x2695('0x15')][_0x2695('0x16')]='connected';this[_0x2695('0xd')][_0x3e8475]['Imap']['messageStatus']=_0x10588d['name'];if(_0x10588d[_0x2695('0x27')]){this[_0x2695('0xd')][_0x3e8475]['Imap']['total']=_0x10588d[_0x2695('0x27')][_0x2695('0x18')];}return this['emit'](_0x3e8475);}};EmailChannel['prototype'][_0x2695('0x20')]=function(_0x4ce843,_0x52104e){logger['info']('New\x20email\x20from\x20%s\x20%s\x20%s\x20to\x20%s',_0x52104e['firstName'],_0x52104e[_0x2695('0x28')],_0x52104e[_0x2695('0x29')],_0x4ce843);if(this[_0x2695('0xd')][_0x4ce843]){return mailAccount[_0x2695('0x2a')](_0x4ce843,_0x52104e)[_0x2695('0x2b')](function(_0x224c86){if(_0x224c86){logger['info'](_0x2695('0x2c'));}})[_0x2695('0x2d')](function(_0x562438){logger[_0x2695('0x24')](_0x2695('0x2e'),JSON[_0x2695('0x2f')](_0x562438));});}};EmailChannel[_0x2695('0x10')][_0x2695('0x23')]=function(_0x111db4){if(this[_0x2695('0xd')][_0x111db4]&&this['mailAccounts'][_0x111db4]['Imap']){if(this[_0x2695('0xe')][this[_0x2695('0xd')][_0x111db4][_0x2695('0x15')]['id']]){delete this[_0x2695('0xe')][this['mailAccounts'][_0x111db4]['Imap']['id']];}this[_0x2695('0xd')][_0x111db4][_0x2695('0x15')]['lastSync']=moment();this[_0x2695('0x11')](_0x111db4);}};EmailChannel[_0x2695('0x10')]['handleImapError']=function(_0x3116ae,_0x35f05f){if(this[_0x2695('0xd')][_0x3116ae]){this[_0x2695('0xd')][_0x3116ae]['Imap'][_0x2695('0x16')]=_0x2695('0x24');this[_0x2695('0xd')][_0x3116ae][_0x2695('0x15')]['messageStatus']=_0x35f05f;return this[_0x2695('0x11')](_0x3116ae);}};EmailChannel[_0x2695('0x10')][_0x2695('0x30')]=function(_0x4fecd7,_0x1e5439){return this['smtp'][_0x2695('0x31')](_0x4fecd7,_0x1e5439);};EmailChannel['prototype'][_0x2695('0x32')]=function(_0x13191d){var _0x2e513c=this;if(this[_0x2695('0xd')][_0x13191d['id']]){if(_[_0x2695('0x33')](this['mailAccounts'][_0x13191d['id']]['Smtp'])){this['mailAccounts'][_0x13191d['id']]['Smtp']={};}this['mailAccounts'][_0x13191d['id']][_0x2695('0x34')][_0x2695('0x35')]=moment();return new BPromise(function(_0x4b246c,_0x59987a){return _0x2e513c[_0x2695('0xf')][_0x2695('0x36')](_0x13191d)[_0x2695('0x2b')](function(_0x2d4d30){_0x2e513c['mailAccounts'][_0x13191d['id']][_0x2695('0x34')][_0x2695('0x16')]='verified';_0x2e513c[_0x2695('0xd')][_0x13191d['id']][_0x2695('0x34')]['messageStatus']='';_0x2e513c[_0x2695('0x11')](_0x13191d['id']);_0x4b246c(_0x2d4d30);})[_0x2695('0x2d')](function(_0xca81b4){_0x2e513c[_0x2695('0xd')][_0x13191d['id']][_0x2695('0x34')][_0x2695('0x16')]='error';_0x2e513c[_0x2695('0xd')][_0x13191d['id']][_0x2695('0x34')][_0x2695('0x17')]=_0xca81b4;_0x2e513c['emit'](_0x13191d['id']);_0x59987a(_0xca81b4);});});}return this[_0x2695('0xf')]['verify'](_0x13191d);};module[_0x2695('0x37')]=EmailChannel;
\ No newline at end of file
index 4050cdd..4d7b65f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7517=['ready','handleReady','bind','end','handleEnd','handleError','inherits','connTimeout','service','user','xoauth2','generateXOAuth2Token','CloudProvider','data5','password','anonymous@xcally.com','host','port','tls','required','handleOpenBox','emit','readUnseen','handleCloseBox','prototype','search','handleReadUnseen','length','message','handleFetchMessage','error','handleFetchError','handleFetchEnd','closeBox','body','handleMessageBody','handleMessageEnd','handleSimpleParser','stringify','textCode','hasOwnProperty','upperFirst','exports','imap','mailparser','simpleParser','iconv','Iconv','events','EventEmitter','./utils','../../../config/logger','email','mailbox','account','getAccount','once'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x7517,0x9d));var _0x7751=function(_0x13e741,_0x5d3c24){_0x13e741=_0x13e741-0x0;var _0x3f8bb3=_0x7517[_0x13e741];return _0x3f8bb3;};'use strict';var _=require('lodash');var util=require('util');var Imap=require(_0x7751('0x0'));var simpleParser=require(_0x7751('0x1'))[_0x7751('0x2')];var Iconv=require(_0x7751('0x3'))[_0x7751('0x4')];var EventEmitter=require(_0x7751('0x5'))[_0x7751('0x6')];var utils=require(_0x7751('0x7'));var logger=require(_0x7751('0x8'))(_0x7751('0x9'));function EmailImap(_0x23f5ef,_0x33cf50){this['mailbox']=_0x23f5ef[_0x7751('0xa')];this[_0x7751('0xb')]=this[_0x7751('0xc')](_0x23f5ef,_0x33cf50);this[_0x7751('0x0')]=new Imap(this[_0x7751('0xb')]);this[_0x7751('0x0')][_0x7751('0xd')](_0x7751('0xe'),this[_0x7751('0xf')][_0x7751('0x10')](this));this[_0x7751('0x0')][_0x7751('0xd')](_0x7751('0x11'),this[_0x7751('0x12')][_0x7751('0x10')](this));this['imap']['on']('error',this[_0x7751('0x13')][_0x7751('0x10')](this));this['imap']['connect']();}util[_0x7751('0x14')](EmailImap,EventEmitter);EmailImap['prototype'][_0x7751('0xc')]=function(_0x3bbe1f,_0x32bd4c){var _0x8d49e0={'connTimeout':_0x3bbe1f[_0x7751('0x15')]?_0x3bbe1f[_0x7751('0x15')]*0x3e8:0x2710,'authTimeout':_0x3bbe1f['authTimeout']?_0x3bbe1f['authTimeout']*0x3e8:0x1388};if(_0x3bbe1f[_0x7751('0x16')]){_0x8d49e0[_0x7751('0x17')]=_0x3bbe1f[_0x7751('0x17')];if(_0x3bbe1f['modernAuthentication']){_0x8d49e0[_0x7751('0x18')]=utils[_0x7751('0x19')](_0x3bbe1f[_0x7751('0x1a')][_0x7751('0x1b')],_0x3bbe1f[_0x7751('0x17')]);}else{_0x8d49e0[_0x7751('0x1c')]=_0x3bbe1f[_0x7751('0x1c')];}}else{if(_0x3bbe1f['authentication']){_0x8d49e0['user']=_0x3bbe1f['user'];_0x8d49e0['password']=_0x3bbe1f[_0x7751('0x1c')];}}_0x8d49e0[_0x7751('0x9')]=_0x32bd4c||_0x3bbe1f[_0x7751('0x17')]||_0x7751('0x1d');_0x8d49e0[_0x7751('0x1e')]=_0x3bbe1f['host'];_0x8d49e0[_0x7751('0x1f')]=_0x3bbe1f[_0x7751('0x1f')]||0x3e1;if(_0x3bbe1f[_0x7751('0x20')]){_0x8d49e0['tls']=!![];}else{_0x8d49e0[_0x7751('0x20')]=![];_0x8d49e0['autotls']=_0x7751('0x21');}return _0x8d49e0;};EmailImap['prototype']['handleReady']=function(){this[_0x7751('0x0')]['openBox'](this[_0x7751('0xa')],![],this[_0x7751('0x22')][_0x7751('0x10')](this));};EmailImap['prototype'][_0x7751('0x22')]=function(_0x3c29d0,_0x3d17d9){if(_0x3c29d0){this['handleError'](_0x3c29d0,!![]);}else{this[_0x7751('0x23')]('box',_0x3d17d9);this[_0x7751('0x24')]();}};EmailImap['prototype'][_0x7751('0x25')]=function(_0x2836a5){if(_0x2836a5){this[_0x7751('0x13')](_0x2836a5,!![]);}else{this[_0x7751('0x0')][_0x7751('0x11')]();}};EmailImap[_0x7751('0x26')][_0x7751('0x24')]=function(){this[_0x7751('0x0')][_0x7751('0x27')](['UNSEEN'],this[_0x7751('0x28')][_0x7751('0x10')](this));};EmailImap[_0x7751('0x26')][_0x7751('0x28')]=function(_0x1858bc,_0x5a3fef){if(_0x1858bc){this['handleError'](_0x1858bc,!![]);}else{if(_0x5a3fef[_0x7751('0x29')]){try{var _0x184d36=this[_0x7751('0x0')]['fetch'](_0x5a3fef,{'bodies':'','markSeen':!![]});_0x184d36['on'](_0x7751('0x2a'),this[_0x7751('0x2b')][_0x7751('0x10')](this));_0x184d36[_0x7751('0xd')](_0x7751('0x2c'),this[_0x7751('0x2d')][_0x7751('0x10')](this));_0x184d36[_0x7751('0xd')](_0x7751('0x11'),this[_0x7751('0x2e')][_0x7751('0x10')](this));}catch(_0x1e4aa4){logger['error'](_0x1e4aa4);}}else{this['imap'][_0x7751('0x2f')](!![],this[_0x7751('0x25')][_0x7751('0x10')](this));}}};EmailImap['prototype'][_0x7751('0x2b')]=function(_0x22cb7a){_0x22cb7a['on'](_0x7751('0x30'),this[_0x7751('0x31')][_0x7751('0x10')](this));_0x22cb7a[_0x7751('0xd')]('attributes',this['handleMessageAttributes']['bind'](this));_0x22cb7a[_0x7751('0xd')](_0x7751('0x11'),this[_0x7751('0x32')][_0x7751('0x10')](this));};EmailImap[_0x7751('0x26')][_0x7751('0x31')]=function(_0x44b8ef){simpleParser(_0x44b8ef,{'Iconv':Iconv},this[_0x7751('0x33')]['bind'](this));};EmailImap[_0x7751('0x26')]['handleMessageAttributes']=function(){};EmailImap[_0x7751('0x26')][_0x7751('0x32')]=function(){};EmailImap['prototype'][_0x7751('0x33')]=function(_0x4a1690,_0x3b2fb6){if(_0x4a1690){logger['error'](_0x4a1690);}else{var _0x206761=this;utils['parser'](this[_0x7751('0xb')],_0x3b2fb6,function(_0xcca58c){_0x206761[_0x7751('0x23')]('email',_0xcca58c);});}};EmailImap[_0x7751('0x26')]['handleFetchEnd']=function(){this[_0x7751('0x0')][_0x7751('0x2f')](!![],this['handleCloseBox']['bind'](this));};EmailImap[_0x7751('0x26')]['handleFetchError']=function(_0x3a6b94){this[_0x7751('0x13')](_0x3a6b94);this[_0x7751('0x0')][_0x7751('0x2f')](!![],this[_0x7751('0x25')][_0x7751('0x10')](this));};EmailImap[_0x7751('0x26')][_0x7751('0x12')]=function(){this['emit'](_0x7751('0x11'));};EmailImap[_0x7751('0x26')][_0x7751('0x13')]=function(_0x393e8e,_0x2a6e3e){logger[_0x7751('0x2c')](_0x7751('0x13'),this[_0x7751('0xb')][_0x7751('0x9')],JSON[_0x7751('0x34')](_0x393e8e));var _0x5c947e='';if(_0x393e8e){if(_0x393e8e[_0x7751('0x35')]){_0x5c947e=_0x393e8e['textCode'];}else{for(var _0x26aeb1 in _0x393e8e){if(_0x393e8e[_0x7751('0x36')](_0x26aeb1)){_0x5c947e+=_[_0x7751('0x37')](_0x26aeb1)+':\x20'+_0x393e8e[_0x26aeb1]+'\x0a';}}}}if(_0x2a6e3e){this[_0x7751('0x0')]['end']();}else{this[_0x7751('0x23')](_0x7751('0x2c'),_0x5c947e);this[_0x7751('0x23')](_0x7751('0x11'));}};module[_0x7751('0x38')]=EmailImap;
\ No newline at end of file
+var _0xc582=['ready','bind','end','handleEnd','error','handleError','inherits','prototype','connTimeout','authTimeout','service','user','modernAuthentication','xoauth2','generateXOAuth2Token','CloudProvider','data5','password','authentication','anonymous@xcally.com','host','port','tls','required','handleReady','openBox','handleOpenBox','emit','box','handleCloseBox','readUnseen','search','UNSEEN','handleReadUnseen','length','fetch','message','handleFetchMessage','handleFetchError','closeBox','body','handleMessageBody','attributes','handleMessageAttributes','handleSimpleParser','parser','handleFetchEnd','stringify','textCode','exports','lodash','util','imap','mailparser','simpleParser','iconv','EventEmitter','./utils','../../../config/logger','email','mailbox','account','getAccount','once'];(function(_0x3ff84c,_0x3cacd4){var _0x50ec03=function(_0x1bb6ad){while(--_0x1bb6ad){_0x3ff84c['push'](_0x3ff84c['shift']());}};_0x50ec03(++_0x3cacd4);}(_0xc582,0x132));var _0x2c58=function(_0x19b3f9,_0xade753){_0x19b3f9=_0x19b3f9-0x0;var _0x18c3f6=_0xc582[_0x19b3f9];return _0x18c3f6;};'use strict';var _=require(_0x2c58('0x0'));var util=require(_0x2c58('0x1'));var Imap=require(_0x2c58('0x2'));var simpleParser=require(_0x2c58('0x3'))[_0x2c58('0x4')];var Iconv=require(_0x2c58('0x5'))['Iconv'];var EventEmitter=require('events')[_0x2c58('0x6')];var utils=require(_0x2c58('0x7'));var logger=require(_0x2c58('0x8'))(_0x2c58('0x9'));function EmailImap(_0x300745,_0x38d2b1){this[_0x2c58('0xa')]=_0x300745[_0x2c58('0xa')];this[_0x2c58('0xb')]=this[_0x2c58('0xc')](_0x300745,_0x38d2b1);this[_0x2c58('0x2')]=new Imap(this[_0x2c58('0xb')]);this[_0x2c58('0x2')][_0x2c58('0xd')](_0x2c58('0xe'),this['handleReady'][_0x2c58('0xf')](this));this[_0x2c58('0x2')][_0x2c58('0xd')](_0x2c58('0x10'),this[_0x2c58('0x11')][_0x2c58('0xf')](this));this[_0x2c58('0x2')]['on'](_0x2c58('0x12'),this[_0x2c58('0x13')][_0x2c58('0xf')](this));this[_0x2c58('0x2')]['connect']();}util[_0x2c58('0x14')](EmailImap,EventEmitter);EmailImap[_0x2c58('0x15')][_0x2c58('0xc')]=function(_0x274892,_0x103bc0){var _0x7c14fa={'connTimeout':_0x274892[_0x2c58('0x16')]?_0x274892[_0x2c58('0x16')]*0x3e8:0x2710,'authTimeout':_0x274892['authTimeout']?_0x274892[_0x2c58('0x17')]*0x3e8:0x1388};if(_0x274892[_0x2c58('0x18')]){_0x7c14fa[_0x2c58('0x19')]=_0x274892[_0x2c58('0x19')];if(_0x274892[_0x2c58('0x1a')]){_0x7c14fa[_0x2c58('0x1b')]=utils[_0x2c58('0x1c')](_0x274892[_0x2c58('0x1d')][_0x2c58('0x1e')],_0x274892[_0x2c58('0x19')]);}else{_0x7c14fa[_0x2c58('0x1f')]=_0x274892[_0x2c58('0x1f')];}}else{if(_0x274892[_0x2c58('0x20')]){_0x7c14fa[_0x2c58('0x19')]=_0x274892[_0x2c58('0x19')];_0x7c14fa[_0x2c58('0x1f')]=_0x274892[_0x2c58('0x1f')];}}_0x7c14fa[_0x2c58('0x9')]=_0x103bc0||_0x274892['user']||_0x2c58('0x21');_0x7c14fa[_0x2c58('0x22')]=_0x274892[_0x2c58('0x22')];_0x7c14fa[_0x2c58('0x23')]=_0x274892[_0x2c58('0x23')]||0x3e1;if(_0x274892['tls']){_0x7c14fa[_0x2c58('0x24')]=!![];}else{_0x7c14fa['tls']=![];_0x7c14fa['autotls']=_0x2c58('0x25');}return _0x7c14fa;};EmailImap[_0x2c58('0x15')][_0x2c58('0x26')]=function(){this[_0x2c58('0x2')][_0x2c58('0x27')](this[_0x2c58('0xa')],![],this[_0x2c58('0x28')][_0x2c58('0xf')](this));};EmailImap['prototype'][_0x2c58('0x28')]=function(_0x4e99cf,_0x4df470){if(_0x4e99cf){this[_0x2c58('0x13')](_0x4e99cf,!![]);}else{this[_0x2c58('0x29')](_0x2c58('0x2a'),_0x4df470);this['readUnseen']();}};EmailImap[_0x2c58('0x15')][_0x2c58('0x2b')]=function(_0x3d6162){if(_0x3d6162){this['handleError'](_0x3d6162,!![]);}else{this[_0x2c58('0x2')][_0x2c58('0x10')]();}};EmailImap[_0x2c58('0x15')][_0x2c58('0x2c')]=function(){this[_0x2c58('0x2')][_0x2c58('0x2d')]([_0x2c58('0x2e')],this[_0x2c58('0x2f')][_0x2c58('0xf')](this));};EmailImap[_0x2c58('0x15')][_0x2c58('0x2f')]=function(_0x27ffb6,_0x11f7df){if(_0x27ffb6){this[_0x2c58('0x13')](_0x27ffb6,!![]);}else{if(_0x11f7df[_0x2c58('0x30')]){try{var _0x5f5299=this[_0x2c58('0x2')][_0x2c58('0x31')](_0x11f7df,{'bodies':'','markSeen':!![]});_0x5f5299['on'](_0x2c58('0x32'),this[_0x2c58('0x33')]['bind'](this));_0x5f5299[_0x2c58('0xd')]('error',this[_0x2c58('0x34')][_0x2c58('0xf')](this));_0x5f5299['once']('end',this['handleFetchEnd']['bind'](this));}catch(_0x4c09c){logger[_0x2c58('0x12')](_0x4c09c);}}else{this[_0x2c58('0x2')][_0x2c58('0x35')](!![],this[_0x2c58('0x2b')][_0x2c58('0xf')](this));}}};EmailImap[_0x2c58('0x15')][_0x2c58('0x33')]=function(_0x5506b4){_0x5506b4['on'](_0x2c58('0x36'),this[_0x2c58('0x37')][_0x2c58('0xf')](this));_0x5506b4[_0x2c58('0xd')](_0x2c58('0x38'),this[_0x2c58('0x39')][_0x2c58('0xf')](this));_0x5506b4[_0x2c58('0xd')](_0x2c58('0x10'),this['handleMessageEnd'][_0x2c58('0xf')](this));};EmailImap[_0x2c58('0x15')]['handleMessageBody']=function(_0x357135){simpleParser(_0x357135,{'Iconv':Iconv},this[_0x2c58('0x3a')]['bind'](this));};EmailImap[_0x2c58('0x15')][_0x2c58('0x39')]=function(){};EmailImap[_0x2c58('0x15')]['handleMessageEnd']=function(){};EmailImap[_0x2c58('0x15')][_0x2c58('0x3a')]=function(_0x120899,_0x2403f6){if(_0x120899){logger[_0x2c58('0x12')](_0x120899);}else{var _0x143755=this;utils[_0x2c58('0x3b')](this['account'],_0x2403f6,function(_0x5a61dc){_0x143755[_0x2c58('0x29')]('email',_0x5a61dc);});}};EmailImap[_0x2c58('0x15')][_0x2c58('0x3c')]=function(){this[_0x2c58('0x2')][_0x2c58('0x35')](!![],this[_0x2c58('0x2b')][_0x2c58('0xf')](this));};EmailImap[_0x2c58('0x15')][_0x2c58('0x34')]=function(_0x559e06){this[_0x2c58('0x13')](_0x559e06);this[_0x2c58('0x2')][_0x2c58('0x35')](!![],this[_0x2c58('0x2b')][_0x2c58('0xf')](this));};EmailImap['prototype'][_0x2c58('0x11')]=function(){this[_0x2c58('0x29')](_0x2c58('0x10'));};EmailImap[_0x2c58('0x15')][_0x2c58('0x13')]=function(_0x1ea183,_0x4f9948){logger['error'](_0x2c58('0x13'),this[_0x2c58('0xb')][_0x2c58('0x9')],JSON[_0x2c58('0x3d')](_0x1ea183));var _0x5683cc='';if(_0x1ea183){if(_0x1ea183[_0x2c58('0x3e')]){_0x5683cc=_0x1ea183['textCode'];}else{for(var _0x52b57d in _0x1ea183){if(_0x1ea183['hasOwnProperty'](_0x52b57d)){_0x5683cc+=_['upperFirst'](_0x52b57d)+':\x20'+_0x1ea183[_0x52b57d]+'\x0a';}}}}if(_0x4f9948){this[_0x2c58('0x2')][_0x2c58('0x10')]();}else{this[_0x2c58('0x29')](_0x2c58('0x12'),_0x5683cc);this['emit'](_0x2c58('0x10'));}};module[_0x2c58('0x3f')]=EmailImap;
\ No newline at end of file
index ad0d42f..29e1e37 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x45fa=['exports','prototype','send','createTransport','use','sendMail','toString','Not\x20verifired'];(function(_0x245afe,_0x319cde){var _0x4eefde=function(_0x15a1fa){while(--_0x15a1fa){_0x245afe['push'](_0x245afe['shift']());}};_0x4eefde(++_0x319cde);}(_0x45fa,0xf9));var _0xa45f=function(_0xfad00d,_0x311d9b){_0xfad00d=_0xfad00d-0x0;var _0x28328c=_0x45fa[_0xfad00d];return _0x28328c;};'use strict';var nodemailer=require('nodemailer');var inlineBase64=require('nodemailer-plugin-inline-base64');function EmailSmtp(){}EmailSmtp[_0xa45f('0x0')][_0xa45f('0x1')]=function(_0x1b0a74,_0xff9eac){return new Promise(function(_0x432bd3,_0x270f7c){var _0x3e9b5a=nodemailer[_0xa45f('0x2')](_0x1b0a74);_0x3e9b5a[_0xa45f('0x3')]('compile',inlineBase64());_0x3e9b5a[_0xa45f('0x4')](_0xff9eac,function(_0x50d860,_0x4eb782){if(_0x50d860){_0x270f7c(_0x50d860['toString']());}else{_0x432bd3(_0x4eb782);}});});};EmailSmtp[_0xa45f('0x0')]['verify']=function(_0x52378e){return new Promise(function(_0x1034ef,_0x2d9544){var _0xbc08e1=nodemailer[_0xa45f('0x2')](_0x52378e);_0xbc08e1['verify'](function(_0x546cb0,_0x343a3b){if(_0x546cb0){_0x2d9544(_0x546cb0[_0xa45f('0x5')]());}else{if(_0x343a3b){_0x1034ef(_0x343a3b);}else{_0x2d9544(_0xa45f('0x6'));}}});});};module[_0xa45f('0x7')]=EmailSmtp;
\ No newline at end of file
+var _0xea4c=['Not\x20verifired','exports','nodemailer','nodemailer-plugin-inline-base64','prototype','send','createTransport','use','compile','sendMail','toString','verify'];(function(_0x5c0a70,_0x15df2a){var _0x41f967=function(_0x218bd4){while(--_0x218bd4){_0x5c0a70['push'](_0x5c0a70['shift']());}};_0x41f967(++_0x15df2a);}(_0xea4c,0xc2));var _0xcea4=function(_0x5912f4,_0x47f81e){_0x5912f4=_0x5912f4-0x0;var _0x31a301=_0xea4c[_0x5912f4];return _0x31a301;};'use strict';var nodemailer=require(_0xcea4('0x0'));var inlineBase64=require(_0xcea4('0x1'));function EmailSmtp(){}EmailSmtp[_0xcea4('0x2')][_0xcea4('0x3')]=function(_0x3ed1cd,_0x12d651){return new Promise(function(_0x570155,_0x2e9ef1){var _0x2b19c9=nodemailer[_0xcea4('0x4')](_0x3ed1cd);_0x2b19c9[_0xcea4('0x5')](_0xcea4('0x6'),inlineBase64());_0x2b19c9[_0xcea4('0x7')](_0x12d651,function(_0x7d1a9f,_0xde5e89){if(_0x7d1a9f){_0x2e9ef1(_0x7d1a9f[_0xcea4('0x8')]());}else{_0x570155(_0xde5e89);}});});};EmailSmtp['prototype'][_0xcea4('0x9')]=function(_0x5e9f04){return new Promise(function(_0x42c702,_0x344cb3){var _0x20ad39=nodemailer['createTransport'](_0x5e9f04);_0x20ad39[_0xcea4('0x9')](function(_0x16c6c8,_0x4c14cf){if(_0x16c6c8){_0x344cb3(_0x16c6c8[_0xcea4('0x8')]());}else{if(_0x4c14cf){_0x42c702(_0x4c14cf);}else{_0x344cb3(_0xcea4('0xa'));}}});});};module[_0xcea4('0xb')]=EmailSmtp;
\ No newline at end of file
index 4fe7306..bd1dbce 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc554=['message','originTo','isEmpty','originCc','includes','bcc','attachment','format','now','server/files/attachments/','content','headerLines','Precedence:\x20auto_reply','line','from','subject','messageId','inReplyTo','date','YYYY-MM-DD\x20HH:mm:ss','textAsHtml','filter','info','Email\x20message\x20%s\x20is\x20in\x20TNEF\x20format:\x20message\x20content\x20will\x20be\x20converted\x20by\x20the\x20system','parseBuffer','first','BodyHTML','<p>Empty\x20message</p>','Attachments','Title','Data','generateXOAuth2Token','user=','toString','base64','lodash','moment','randomstring','path','util','node-tnef','email','../../../config/environment','head','value','address','anonymous','generate','@xcally.com','name','substring','indexOf','split','length','slice','join','Anonymous','pop','test','html','replace','<img','attachments','forEach','push','_IMG','<span\x20style=font-weight:bold>\x20[Attachment:\x20','body'];(function(_0x5278c9,_0x192e9e){var _0x3a3a09=function(_0x5ab67f){while(--_0x5ab67f){_0x5278c9['push'](_0x5278c9['shift']());}};_0x3a3a09(++_0x192e9e);}(_0xc554,0x133));var _0x4c55=function(_0x45cd35,_0x41147c){_0x45cd35=_0x45cd35-0x0;var _0x16db84=_0xc554[_0x45cd35];return _0x16db84;};'use strict';var _=require(_0x4c55('0x0'));var moment=require(_0x4c55('0x1'));var random=require(_0x4c55('0x2'));var fs=require('fs');var path=require(_0x4c55('0x3'));var util=require(_0x4c55('0x4'));var tnef=require(_0x4c55('0x5'));var logger=require('../../../config/logger')(_0x4c55('0x6'));var config=require(_0x4c55('0x7'));function getAddress(_0x1a9be6){var _0x5b05fe=_[_0x4c55('0x8')](_0x1a9be6[_0x4c55('0x9')]);return _0x5b05fe&&_0x5b05fe[_0x4c55('0xa')]?_0x5b05fe[_0x4c55('0xa')]:_0x4c55('0xb')+random[_0x4c55('0xc')](0x6)+_0x4c55('0xd');}function getFirstName(_0x2698bf){var _0x125c12=_['head'](_0x2698bf[_0x4c55('0x9')]);if(_0x125c12&&_0x125c12[_0x4c55('0xe')]){if(_0x125c12[_0x4c55('0xe')]==_0x125c12['address']){return _0x125c12[_0x4c55('0xe')][_0x4c55('0xf')](0x0,_0x125c12['name'][_0x4c55('0x10')]('@'));}var _0x52ea61=_0x125c12[_0x4c55('0xe')][_0x4c55('0x11')](/\s+/);return _0x52ea61[_0x4c55('0x12')]>0x1?_0x52ea61[_0x4c55('0x13')](0x0,-0x1)[_0x4c55('0x14')]('\x20'):_0x125c12[_0x4c55('0xe')];}return _0x4c55('0x15');}function getLastName(_0x2b9462){var _0x249317=_[_0x4c55('0x8')](_0x2b9462[_0x4c55('0x9')]);if(_0x249317&&_0x249317[_0x4c55('0xe')]){var _0x22860e=_0x249317[_0x4c55('0xe')][_0x4c55('0x11')](/\s+/);return _0x22860e[_0x4c55('0x12')]>0x1?_0x22860e[_0x4c55('0x16')]():'';}return'';}function getMails(_0x1ab657,_0x3f7a17){var _0x429433='';for(var _0x4fd2fc=0x0;_0x4fd2fc<_0x3f7a17[_0x4c55('0x9')]['length'];_0x4fd2fc+=0x1){if(_0x3f7a17[_0x4c55('0x9')][_0x4fd2fc][_0x4c55('0xa')]!==_0x1ab657){if(!_['isEmpty'](_0x429433)){_0x429433+=',';}_0x429433+=_0x3f7a17[_0x4c55('0x9')][_0x4fd2fc]['name']||_0x3f7a17[_0x4c55('0x9')][_0x4fd2fc][_0x4c55('0xa')]||'';_0x429433+='\x20<';_0x429433+=_0x3f7a17[_0x4c55('0x9')][_0x4fd2fc][_0x4c55('0xa')]?_0x3f7a17[_0x4c55('0x9')][_0x4fd2fc][_0x4c55('0xa')]:'anonymous'+random[_0x4c55('0xc')](0x6)+_0x4c55('0xd');_0x429433+='>';}}return _0x429433;}function parseEmail(_0x6e22c2,_0x4941c1,_0x42addd){if(_0x4941c1['html']){var _0x5e5aef=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;while(_0x5e5aef[_0x4c55('0x17')](_0x4941c1[_0x4c55('0x18')])){_0x4941c1[_0x4c55('0x18')]=_0x4941c1['html'][_0x4c55('0x19')](_0x5e5aef,'');}if(_0x4941c1[_0x4c55('0x18')]['includes'](_0x4c55('0x1a'))){var _0x26d6d1=[];_0x4941c1[_0x4c55('0x1b')][_0x4c55('0x1c')](_0x4c3381=>{_0x26d6d1[_0x4c55('0x1d')](_0x4c3381['filename']);});var _0x47777a=/<img.*? _SRC(.*?)[^>]+>/g;var _0x2832f9=/src="data:image\/([a-zA-Z]*);base64,([^"]*)"/g;var _0x4be6d0=_0x4941c1['html'][_0x4c55('0x19')](_0x2832f9,'_SRC');var _0xfdef51=_0x4be6d0[_0x4c55('0x19')](_0x47777a,_0x4c55('0x1e'));for(let _0x4dc504=0x0;_0x4dc504<_0x26d6d1[_0x4c55('0x12')];_0x4dc504++){var _0x5e420d=_0xfdef51[_0x4c55('0x19')](_0x4c55('0x1e'),_0x4c55('0x1f')+_0x26d6d1[_0x4dc504]+'\x20]</span>');_0xfdef51=_0x5e420d;}_0x4941c1[_0x4c55('0x18')]=_0xfdef51;}_0x42addd[_0x4c55('0x20')]=_0x4941c1[_0x4c55('0x18')];}else{_0x42addd[_0x4c55('0x20')]=_0x4941c1['textAsHtml'];}if(_0x42addd[_0x4c55('0x20')]){_0x42addd['body']=_0x42addd['body'][_0x4c55('0x19')](/<a\s+/gi,'<a\x20target=\x22_blank\x22\x20');}if(_0x4941c1['to']){_0x42addd[_0x4c55('0x21')][_0x4c55('0x22')]=getMails(null,_0x4941c1['to']);var _0x43cb0f=getMails(_0x6e22c2[_0x4c55('0x6')],_0x4941c1['to']);if(!_[_0x4c55('0x23')](_0x43cb0f)){_0x42addd[_0x4c55('0x21')]['cc']+=_0x43cb0f;}}if(_0x4941c1['cc']){_0x42addd[_0x4c55('0x21')][_0x4c55('0x24')]=getMails(null,_0x4941c1['cc']);var _0x102fc6=getMails(_0x6e22c2['email'],_0x4941c1['cc']);if(!_['isEmpty'](_0x102fc6)){if(!_[_0x4c55('0x23')](_0x42addd[_0x4c55('0x21')]['cc'])){_0x42addd['message']['cc']+=',';}_0x42addd[_0x4c55('0x21')]['cc']+=_0x102fc6;}}if(!_[_0x4c55('0x25')](_0x42addd[_0x4c55('0x21')][_0x4c55('0x22')],_0x6e22c2[_0x4c55('0x6')])&&!_[_0x4c55('0x25')](_0x42addd[_0x4c55('0x21')]['originCc'],_0x6e22c2[_0x4c55('0x6')])){_0x42addd[_0x4c55('0x21')][_0x4c55('0x26')]=_0x6e22c2[_0x4c55('0x6')];}if(_0x4941c1[_0x4c55('0x1b')]&&_0x4941c1[_0x4c55('0x1b')][_0x4c55('0x12')]){_0x42addd[_0x4c55('0x21')]['attach']=_0x4941c1[_0x4c55('0x1b')][_0x4c55('0x12')];for(var _0x2337c1=0x0,_0x4ac49f,_0x349bb9,_0x5cf65a;_0x2337c1<_0x4941c1['attachments'][_0x4c55('0x12')];_0x2337c1+=0x1){if(_0x4941c1[_0x4c55('0x1b')][_0x2337c1]['type']===_0x4c55('0x27')){_0x5cf65a=_0x4941c1[_0x4c55('0x1b')][_0x2337c1]['filename']||'attachment-'+_0x2337c1;_0x4ac49f=util[_0x4c55('0x28')]('%s-%s',Date[_0x4c55('0x29')](),_0x5cf65a);_0x349bb9=path[_0x4c55('0x14')](config['root'],_0x4c55('0x2a'),_0x4ac49f);fs['writeFileSync'](_0x349bb9,_0x4941c1[_0x4c55('0x1b')][_0x2337c1][_0x4c55('0x2b')]);_0x42addd[_0x4c55('0x21')][_0x4c55('0x1b')]['push']({'name':_0x5cf65a,'basename':_0x4ac49f,'type':_0x4941c1[_0x4c55('0x1b')][_0x2337c1]['contentType'],'filepath':_0x349bb9});}}}if(_0x4941c1[_0x4c55('0x2c')]&&_0x4941c1[_0x4c55('0x2c')][_0x4c55('0x12')]>0x0){var _0x4a2fb7=['Auto-Submitted:\x20auto-replied','X-Auto-Response-Suppress:\x20All',_0x4c55('0x2d')];for(var _0x5147ba=0x0;_0x5147ba<_0x4941c1['headerLines'][_0x4c55('0x12')];_0x5147ba++){var _0x475ac5=_[_0x4c55('0x10')](_0x4a2fb7,_0x4941c1[_0x4c55('0x2c')][_0x5147ba][_0x4c55('0x2e')]);if(_0x475ac5>=0x0){_0x42addd['isAutoreply']=!![];}}}return _0x42addd;}exports['parser']=function(_0x5a1b06,_0xfc0fd7,_0x2bfddf){var _0x354177={'from':getAddress(_0xfc0fd7[_0x4c55('0x2f')]),'firstName':getFirstName(_0xfc0fd7[_0x4c55('0x2f')]),'lastName':getLastName(_0xfc0fd7['from']),'mapKey':_0x4c55('0x6'),'message':{'from':getMails(_0x5a1b06['email'],_0xfc0fd7[_0x4c55('0x2f')]),'to':_0x5a1b06['email'],'cc':'','subject':_0xfc0fd7[_0x4c55('0x30')]||'','messageId':_0xfc0fd7[_0x4c55('0x31')],'inReplyTo':_0xfc0fd7[_0x4c55('0x32')],'sentAt':moment(_0xfc0fd7[_0x4c55('0x33')])[_0x4c55('0x28')](_0x4c55('0x34')),'attach':![],'attachments':[]}};if(!_0xfc0fd7['html']&&!_0xfc0fd7[_0x4c55('0x35')]){var _0x2fe1c4=_[_0x4c55('0x36')](_0xfc0fd7['attachments'],{'contentType':'application/ms-tnef'});if(_0x2fe1c4['length']){logger[_0x4c55('0x37')](util[_0x4c55('0x28')](_0x4c55('0x38'),_0xfc0fd7['messageId']));tnef[_0x4c55('0x39')](_[_0x4c55('0x3a')](_0x2fe1c4)['content'],function(_0x27ca82,_0x14881c){if(_0x14881c){_0xfc0fd7[_0x4c55('0x18')]=_0x14881c[_0x4c55('0x3b')]||_0x4c55('0x3c');if(_0x14881c[_0x4c55('0x3d')]){for(var _0x4b1fa4=0x0;_0x4b1fa4<_0x14881c['Attachments'][_0x4c55('0x12')];_0x4b1fa4++){var _0x2190c2=_0x14881c['Attachments'][_0x4b1fa4];_0x354177[_0x4c55('0x21')]['attachments'][_0x4c55('0x1d')]({'filename':_0x2190c2[_0x4c55('0x3e')],'content':Buffer[_0x4c55('0x2f')](_0x2190c2[_0x4c55('0x3f')])});}}}_0x2bfddf(parseEmail(_0x5a1b06,_0xfc0fd7,_0x354177));});}else{_0xfc0fd7[_0x4c55('0x18')]=_0x4c55('0x3c');_0x2bfddf(parseEmail(_0x5a1b06,_0xfc0fd7,_0x354177));}}else{_0x2bfddf(parseEmail(_0x5a1b06,_0xfc0fd7,_0x354177));}};exports[_0x4c55('0x40')]=function(_0x2a6869,_0x4d6db0){var _0x381692=[_0x4c55('0x41')+(_0x4d6db0||''),'auth=Bearer\x20'+_0x2a6869,'',''];return Buffer['from'](_0x381692['join']('\ 1'),'utf-8')[_0x4c55('0x42')](_0x4c55('0x43'));};
\ No newline at end of file
+var _0xfbe0=['html','includes','<img','attachments','push','filename','replace','_SRC','_IMG','<span\x20style=font-weight:bold>\x20[Attachment:\x20','\x20]</span>','body','textAsHtml','<a\x20target=\x22_blank\x22\x20','message','originCc','email','type','attachment','format','%s-%s','server/files/attachments/','writeFileSync','content','headerLines','Auto-Submitted:\x20auto-replied','X-Auto-Response-Suppress:\x20All','Precedence:\x20auto_reply','isAutoreply','subject','messageId','inReplyTo','date','YYYY-MM-DD\x20HH:mm:ss','filter','application/ms-tnef','info','Email\x20message\x20%s\x20is\x20in\x20TNEF\x20format:\x20message\x20content\x20will\x20be\x20converted\x20by\x20the\x20system','parseBuffer','first','BodyHTML','<p>Empty\x20message</p>','Attachments','Title','from','generateXOAuth2Token','user=','auth=Bearer\x20','utf-8','toString','base64','lodash','randomstring','util','node-tnef','../../../config/logger','../../../config/environment','value','address','generate','head','name','substring','indexOf','split','length','slice','join','Anonymous','pop','isEmpty','@xcally.com','test'];(function(_0x4b8588,_0x2005db){var _0x136511=function(_0x1ff81e){while(--_0x1ff81e){_0x4b8588['push'](_0x4b8588['shift']());}};_0x136511(++_0x2005db);}(_0xfbe0,0x1e9));var _0x0fbe=function(_0x18fbeb,_0x4d4508){_0x18fbeb=_0x18fbeb-0x0;var _0x5b03a8=_0xfbe0[_0x18fbeb];return _0x5b03a8;};'use strict';var _=require(_0x0fbe('0x0'));var moment=require('moment');var random=require(_0x0fbe('0x1'));var fs=require('fs');var path=require('path');var util=require(_0x0fbe('0x2'));var tnef=require(_0x0fbe('0x3'));var logger=require(_0x0fbe('0x4'))('email');var config=require(_0x0fbe('0x5'));function getAddress(_0xd58a24){var _0x45a11e=_['head'](_0xd58a24[_0x0fbe('0x6')]);return _0x45a11e&&_0x45a11e['address']?_0x45a11e[_0x0fbe('0x7')]:'anonymous'+random[_0x0fbe('0x8')](0x6)+'@xcally.com';}function getFirstName(_0x1aa31e){var _0x2e29b7=_[_0x0fbe('0x9')](_0x1aa31e['value']);if(_0x2e29b7&&_0x2e29b7[_0x0fbe('0xa')]){if(_0x2e29b7[_0x0fbe('0xa')]==_0x2e29b7['address']){return _0x2e29b7[_0x0fbe('0xa')][_0x0fbe('0xb')](0x0,_0x2e29b7['name'][_0x0fbe('0xc')]('@'));}var _0x28500e=_0x2e29b7[_0x0fbe('0xa')][_0x0fbe('0xd')](/\s+/);return _0x28500e[_0x0fbe('0xe')]>0x1?_0x28500e[_0x0fbe('0xf')](0x0,-0x1)[_0x0fbe('0x10')]('\x20'):_0x2e29b7['name'];}return _0x0fbe('0x11');}function getLastName(_0x470d8d){var _0xb79a54=_[_0x0fbe('0x9')](_0x470d8d['value']);if(_0xb79a54&&_0xb79a54[_0x0fbe('0xa')]){var _0x35d311=_0xb79a54[_0x0fbe('0xa')][_0x0fbe('0xd')](/\s+/);return _0x35d311[_0x0fbe('0xe')]>0x1?_0x35d311[_0x0fbe('0x12')]():'';}return'';}function getMails(_0xbcb66,_0x223c3c){var _0x372f94='';for(var _0x24fe2e=0x0;_0x24fe2e<_0x223c3c[_0x0fbe('0x6')][_0x0fbe('0xe')];_0x24fe2e+=0x1){if(_0x223c3c[_0x0fbe('0x6')][_0x24fe2e][_0x0fbe('0x7')]!==_0xbcb66){if(!_[_0x0fbe('0x13')](_0x372f94)){_0x372f94+=',';}_0x372f94+=_0x223c3c[_0x0fbe('0x6')][_0x24fe2e][_0x0fbe('0xa')]||_0x223c3c[_0x0fbe('0x6')][_0x24fe2e]['address']||'';_0x372f94+='\x20<';_0x372f94+=_0x223c3c[_0x0fbe('0x6')][_0x24fe2e][_0x0fbe('0x7')]?_0x223c3c[_0x0fbe('0x6')][_0x24fe2e]['address']:'anonymous'+random[_0x0fbe('0x8')](0x6)+_0x0fbe('0x14');_0x372f94+='>';}}return _0x372f94;}function parseEmail(_0x5ec5b,_0x5aaf59,_0x2c81b4){if(_0x5aaf59['html']){var _0x1ee72b=/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi;while(_0x1ee72b[_0x0fbe('0x15')](_0x5aaf59[_0x0fbe('0x16')])){_0x5aaf59[_0x0fbe('0x16')]=_0x5aaf59[_0x0fbe('0x16')]['replace'](_0x1ee72b,'');}if(_0x5aaf59[_0x0fbe('0x16')][_0x0fbe('0x17')](_0x0fbe('0x18'))){var _0x2a5c98=[];_0x5aaf59[_0x0fbe('0x19')]['forEach'](_0x16d5ef=>{_0x2a5c98[_0x0fbe('0x1a')](_0x16d5ef[_0x0fbe('0x1b')]);});var _0x14797b=/<img.*? _SRC(.*?)[^>]+>/g;var _0x31a61e=/src="data:image\/([a-zA-Z]*);base64,([^"]*)"/g;var _0x336cf1=_0x5aaf59[_0x0fbe('0x16')][_0x0fbe('0x1c')](_0x31a61e,_0x0fbe('0x1d'));var _0x22540e=_0x336cf1['replace'](_0x14797b,_0x0fbe('0x1e'));for(let _0x4dab98=0x0;_0x4dab98<_0x2a5c98[_0x0fbe('0xe')];_0x4dab98++){var _0x574751=_0x22540e['replace'](_0x0fbe('0x1e'),_0x0fbe('0x1f')+_0x2a5c98[_0x4dab98]+_0x0fbe('0x20'));_0x22540e=_0x574751;}_0x5aaf59[_0x0fbe('0x16')]=_0x22540e;}_0x2c81b4[_0x0fbe('0x21')]=_0x5aaf59[_0x0fbe('0x16')];}else{_0x2c81b4[_0x0fbe('0x21')]=_0x5aaf59[_0x0fbe('0x22')];}if(_0x2c81b4[_0x0fbe('0x21')]){_0x2c81b4[_0x0fbe('0x21')]=_0x2c81b4[_0x0fbe('0x21')][_0x0fbe('0x1c')](/<a\s+/gi,_0x0fbe('0x23'));}if(_0x5aaf59['to']){_0x2c81b4[_0x0fbe('0x24')]['originTo']=getMails(null,_0x5aaf59['to']);var _0x3fa999=getMails(_0x5ec5b['email'],_0x5aaf59['to']);if(!_[_0x0fbe('0x13')](_0x3fa999)){_0x2c81b4[_0x0fbe('0x24')]['cc']+=_0x3fa999;}}if(_0x5aaf59['cc']){_0x2c81b4[_0x0fbe('0x24')][_0x0fbe('0x25')]=getMails(null,_0x5aaf59['cc']);var _0x4467c1=getMails(_0x5ec5b[_0x0fbe('0x26')],_0x5aaf59['cc']);if(!_[_0x0fbe('0x13')](_0x4467c1)){if(!_[_0x0fbe('0x13')](_0x2c81b4[_0x0fbe('0x24')]['cc'])){_0x2c81b4['message']['cc']+=',';}_0x2c81b4[_0x0fbe('0x24')]['cc']+=_0x4467c1;}}if(!_[_0x0fbe('0x17')](_0x2c81b4[_0x0fbe('0x24')]['originTo'],_0x5ec5b[_0x0fbe('0x26')])&&!_[_0x0fbe('0x17')](_0x2c81b4[_0x0fbe('0x24')][_0x0fbe('0x25')],_0x5ec5b[_0x0fbe('0x26')])){_0x2c81b4['message']['bcc']=_0x5ec5b[_0x0fbe('0x26')];}if(_0x5aaf59[_0x0fbe('0x19')]&&_0x5aaf59['attachments']['length']){_0x2c81b4[_0x0fbe('0x24')]['attach']=_0x5aaf59[_0x0fbe('0x19')][_0x0fbe('0xe')];for(var _0x21518c=0x0,_0xd9b7ac,_0x2b3564,_0x1d9e7b;_0x21518c<_0x5aaf59[_0x0fbe('0x19')][_0x0fbe('0xe')];_0x21518c+=0x1){if(_0x5aaf59[_0x0fbe('0x19')][_0x21518c][_0x0fbe('0x27')]===_0x0fbe('0x28')){_0x1d9e7b=_0x5aaf59[_0x0fbe('0x19')][_0x21518c][_0x0fbe('0x1b')]||'attachment-'+_0x21518c;_0xd9b7ac=util[_0x0fbe('0x29')](_0x0fbe('0x2a'),Date['now'](),_0x1d9e7b);_0x2b3564=path[_0x0fbe('0x10')](config['root'],_0x0fbe('0x2b'),_0xd9b7ac);fs[_0x0fbe('0x2c')](_0x2b3564,_0x5aaf59['attachments'][_0x21518c][_0x0fbe('0x2d')]);_0x2c81b4[_0x0fbe('0x24')][_0x0fbe('0x19')][_0x0fbe('0x1a')]({'name':_0x1d9e7b,'basename':_0xd9b7ac,'type':_0x5aaf59['attachments'][_0x21518c]['contentType'],'filepath':_0x2b3564});}}}if(_0x5aaf59[_0x0fbe('0x2e')]&&_0x5aaf59[_0x0fbe('0x2e')][_0x0fbe('0xe')]>0x0){var _0x38962f=[_0x0fbe('0x2f'),_0x0fbe('0x30'),_0x0fbe('0x31')];for(var _0x248f01=0x0;_0x248f01<_0x5aaf59[_0x0fbe('0x2e')][_0x0fbe('0xe')];_0x248f01++){var _0x5ea621=_['indexOf'](_0x38962f,_0x5aaf59[_0x0fbe('0x2e')][_0x248f01]['line']);if(_0x5ea621>=0x0){_0x2c81b4[_0x0fbe('0x32')]=!![];}}}return _0x2c81b4;}exports['parser']=function(_0x56d105,_0x50bfde,_0x5f1dea){var _0x529665={'from':getAddress(_0x50bfde['from']),'firstName':getFirstName(_0x50bfde['from']),'lastName':getLastName(_0x50bfde['from']),'mapKey':_0x0fbe('0x26'),'message':{'from':getMails(_0x56d105[_0x0fbe('0x26')],_0x50bfde['from']),'to':_0x56d105[_0x0fbe('0x26')],'cc':'','subject':_0x50bfde[_0x0fbe('0x33')]||'','messageId':_0x50bfde[_0x0fbe('0x34')],'inReplyTo':_0x50bfde[_0x0fbe('0x35')],'sentAt':moment(_0x50bfde[_0x0fbe('0x36')])['format'](_0x0fbe('0x37')),'attach':![],'attachments':[]}};if(!_0x50bfde[_0x0fbe('0x16')]&&!_0x50bfde['textAsHtml']){var _0x57dc70=_[_0x0fbe('0x38')](_0x50bfde[_0x0fbe('0x19')],{'contentType':_0x0fbe('0x39')});if(_0x57dc70[_0x0fbe('0xe')]){logger[_0x0fbe('0x3a')](util[_0x0fbe('0x29')](_0x0fbe('0x3b'),_0x50bfde[_0x0fbe('0x34')]));tnef[_0x0fbe('0x3c')](_[_0x0fbe('0x3d')](_0x57dc70)['content'],function(_0x2f2fc9,_0x321bbe){if(_0x321bbe){_0x50bfde[_0x0fbe('0x16')]=_0x321bbe[_0x0fbe('0x3e')]||_0x0fbe('0x3f');if(_0x321bbe[_0x0fbe('0x40')]){for(var _0x5752f0=0x0;_0x5752f0<_0x321bbe[_0x0fbe('0x40')][_0x0fbe('0xe')];_0x5752f0++){var _0x16b4e2=_0x321bbe['Attachments'][_0x5752f0];_0x529665['message'][_0x0fbe('0x19')][_0x0fbe('0x1a')]({'filename':_0x16b4e2[_0x0fbe('0x41')],'content':Buffer[_0x0fbe('0x42')](_0x16b4e2['Data'])});}}}_0x5f1dea(parseEmail(_0x56d105,_0x50bfde,_0x529665));});}else{_0x50bfde['html']=_0x0fbe('0x3f');_0x5f1dea(parseEmail(_0x56d105,_0x50bfde,_0x529665));}}else{_0x5f1dea(parseEmail(_0x56d105,_0x50bfde,_0x529665));}};exports[_0x0fbe('0x43')]=function(_0x3b55c7,_0x16f38c){var _0xe31bd1=[_0x0fbe('0x44')+(_0x16f38c||''),_0x0fbe('0x45')+_0x3b55c7,'',''];return Buffer[_0x0fbe('0x42')](_0xe31bd1[_0x0fbe('0x10')]('\ 1'),_0x0fbe('0x46'))[_0x0fbe('0x47')](_0x0fbe('0x48'));};
\ No newline at end of file
index 87981b3..d11957e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x991a=['Imap','Smtp','exports','lodash','Service','key','SERV','active'];(function(_0x461826,_0x5812ad){var _0x42cbd3=function(_0x21d928){while(--_0x21d928){_0x461826['push'](_0x461826['shift']());}};_0x42cbd3(++_0x5812ad);}(_0x991a,0x1b3));var _0xa991=function(_0x37eade,_0x4246f8){_0x37eade=_0x37eade-0x0;var _0x1b1156=_0x991a[_0x37eade];return _0x1b1156;};'use strict';var _=require(_0xa991('0x0'));function MailAccount(_0x288d33){this['id']=_0x288d33['id']||0x0;this['name']=_0x288d33['name']||_0xa991('0x1');this[_0xa991('0x2')]=_0x288d33[_0xa991('0x2')]||_0xa991('0x3');this[_0xa991('0x4')]=_0x288d33[_0xa991('0x4')]||![];this[_0xa991('0x5')]=_0x288d33['Imap']||[];this[_0xa991('0x6')]=_0x288d33['Smtp']||[];}module[_0xa991('0x7')]=MailAccount;
\ No newline at end of file
+var _0x90c6=['Imap','Smtp','exports','lodash','name','key','active'];(function(_0x12f688,_0x585c25){var _0x59c3de=function(_0x4ac301){while(--_0x4ac301){_0x12f688['push'](_0x12f688['shift']());}};_0x59c3de(++_0x585c25);}(_0x90c6,0x168));var _0x690c=function(_0x1bbe66,_0x5df375){_0x1bbe66=_0x1bbe66-0x0;var _0x186443=_0x90c6[_0x1bbe66];return _0x186443;};'use strict';var _=require(_0x690c('0x0'));function MailAccount(_0x561653){this['id']=_0x561653['id']||0x0;this[_0x690c('0x1')]=_0x561653[_0x690c('0x1')]||'Service';this['key']=_0x561653[_0x690c('0x2')]||'SERV';this[_0x690c('0x3')]=_0x561653[_0x690c('0x3')]||![];this[_0x690c('0x4')]=_0x561653[_0x690c('0x4')]||[];this[_0x690c('0x5')]=_0x561653[_0x690c('0x5')]||[];}module[_0x690c('0x6')]=MailAccount;
\ No newline at end of file
index 2a7f233..851d9ad 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x687c=['length','merge','exports','lodash','../model/mailAccount','prototype','mergeFromDatabase','initMailAccounts','mailAccounts'];(function(_0x1f0639,_0x306cfb){var _0x1080c2=function(_0x3d6490){while(--_0x3d6490){_0x1f0639['push'](_0x1f0639['shift']());}};_0x1080c2(++_0x306cfb);}(_0x687c,0x111));var _0xc687=function(_0x16515b,_0x5b0e2c){_0x16515b=_0x16515b-0x0;var _0x53c64d=_0x687c[_0x16515b];return _0x53c64d;};'use strict';var _=require(_0xc687('0x0'));var MailAccount=require(_0xc687('0x1'));var Realtime=function(){this['mailAccounts']={};};function freeIsNotKey(_0x4f86ef,_0x4bdd7b,_0x20f630){var _0x142831=_['mapKeys'](_0x4f86ef,function(_0x5f568a,_0x21ac99){return _0x5f568a[_0x20f630];});for(var _0x439c1a in _0x4bdd7b){if(_0x4bdd7b['hasOwnProperty'](_0x439c1a)){if(!_0x142831[_0x439c1a]){delete _0x4bdd7b[_0x439c1a];}}}}Realtime[_0xc687('0x2')][_0xc687('0x3')]=function(_0x5b0247,_0xfaeb73){for(var _0x2beb9c in _0xfaeb73){if(_0x5b0247['hasOwnProperty'](_0x2beb9c)){_0x5b0247[_0x2beb9c]=_0xfaeb73[_0x2beb9c];}}};Realtime[_0xc687('0x2')][_0xc687('0x4')]=function(){var _0x41c263=this;return function(_0xdc41ac){if(_0xdc41ac){freeIsNotKey(_0xdc41ac,_0x41c263[_0xc687('0x5')],'id');for(var _0x6e5a60=0x0,_0x3f2645={},_0x1bd1ca={};_0x6e5a60<_0xdc41ac[_0xc687('0x6')];_0x6e5a60+=0x1){_0x3f2645=_0xdc41ac[_0x6e5a60];if(_['isUndefined'](_0x41c263[_0xc687('0x5')][_0x3f2645['id']])){_0x41c263['mailAccounts'][_0x3f2645['id']]=new MailAccount(_0x3f2645);}else{_[_0xc687('0x7')](_0x41c263['mailAccounts'][_0x3f2645['id']],_0x3f2645);}}}return _0x41c263[_0xc687('0x5')];};};module[_0xc687('0x8')]=Realtime;
\ No newline at end of file
+var _0x3bff=['mapKeys','mergeFromDatabase','hasOwnProperty','prototype','initMailAccounts','isUndefined','exports','../model/mailAccount','mailAccounts'];(function(_0x210718,_0x247b55){var _0x541bfc=function(_0x5dbcad){while(--_0x5dbcad){_0x210718['push'](_0x210718['shift']());}};_0x541bfc(++_0x247b55);}(_0x3bff,0xc4));var _0xf3bf=function(_0x12d75f,_0x3d341b){_0x12d75f=_0x12d75f-0x0;var _0x150016=_0x3bff[_0x12d75f];return _0x150016;};'use strict';var _=require('lodash');var MailAccount=require(_0xf3bf('0x0'));var Realtime=function(){this[_0xf3bf('0x1')]={};};function freeIsNotKey(_0x4c406d,_0x147ee2,_0x3aacbf){var _0x50a3e0=_[_0xf3bf('0x2')](_0x4c406d,function(_0x3f2301,_0x41cd66){return _0x3f2301[_0x3aacbf];});for(var _0x8322ba in _0x147ee2){if(_0x147ee2['hasOwnProperty'](_0x8322ba)){if(!_0x50a3e0[_0x8322ba]){delete _0x147ee2[_0x8322ba];}}}}Realtime['prototype'][_0xf3bf('0x3')]=function(_0x41b006,_0x78a60c){for(var _0x3562a0 in _0x78a60c){if(_0x41b006[_0xf3bf('0x4')](_0x3562a0)){_0x41b006[_0x3562a0]=_0x78a60c[_0x3562a0];}}};Realtime[_0xf3bf('0x5')][_0xf3bf('0x6')]=function(){var _0x408d8c=this;return function(_0x29df25){if(_0x29df25){freeIsNotKey(_0x29df25,_0x408d8c[_0xf3bf('0x1')],'id');for(var _0x311ada=0x0,_0x1571fc={},_0x144e0c={};_0x311ada<_0x29df25['length'];_0x311ada+=0x1){_0x1571fc=_0x29df25[_0x311ada];if(_[_0xf3bf('0x7')](_0x408d8c['mailAccounts'][_0x1571fc['id']])){_0x408d8c['mailAccounts'][_0x1571fc['id']]=new MailAccount(_0x1571fc);}else{_['merge'](_0x408d8c['mailAccounts'][_0x1571fc['id']],_0x1571fc);}}}return _0x408d8c['mailAccounts'];};};module[_0xf3bf('0x8')]=Realtime;
\ No newline at end of file
index 9e99f6c..b28d1ab 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdb70=['key','ListId','TemplateId','MailServerIn','Imap','CloudProvider','type','data5','MailServerOut','Smtp','getMailAccount','notify','NotifyMailAccount','../client','getMailAccounts','Request','name','provider','service','email','active'];(function(_0x4c0e6f,_0x7005be){var _0xd2c6da=function(_0x1755e1){while(--_0x1755e1){_0x4c0e6f['push'](_0x4c0e6f['shift']());}};_0xd2c6da(++_0x7005be);}(_0xdb70,0xa0));var _0x0db7=function(_0x30a331,_0x5d9dc6){_0x30a331=_0x30a331-0x0;var _0x534cc1=_0xdb70[_0x30a331];return _0x534cc1;};'use strict';var client=require(_0x0db7('0x0'));exports[_0x0db7('0x1')]=function(){return function(){return client[_0x0db7('0x2')]('GetMailAccount',{'options':{'attributes':['id',_0x0db7('0x3'),_0x0db7('0x4'),_0x0db7('0x5'),_0x0db7('0x6'),_0x0db7('0x7'),_0x0db7('0x8'),_0x0db7('0x9'),_0x0db7('0xa')],'raw':![],'include':[{'model':_0x0db7('0xb'),'as':_0x0db7('0xc'),'include':[{'model':_0x0db7('0xd'),'attributes':['id','name',_0x0db7('0x5'),_0x0db7('0xe'),_0x0db7('0xf')],'as':_0x0db7('0xd')}]},{'model':_0x0db7('0x10'),'as':_0x0db7('0x11'),'include':[{'model':'CloudProvider','attributes':['id',_0x0db7('0x3'),_0x0db7('0x5'),'type',_0x0db7('0xf')],'as':_0x0db7('0xd')}]}]},'log':_0x0db7('0x12')});};};exports[_0x0db7('0x13')]=function(_0x4e6f65,_0xda8b15){return client['Request'](_0x0db7('0x14'),{'account':{'id':_0x4e6f65},'body':_0xda8b15,'log':_0x0db7('0x14')});};
\ No newline at end of file
+var _0x471a=['email','TemplateId','type','CloudProvider','getMailAccount','notify','NotifyMailAccount','../client','getMailAccounts','Request','name','provider','service'];(function(_0x538375,_0x365e8d){var _0x1c3531=function(_0x7dc57f){while(--_0x7dc57f){_0x538375['push'](_0x538375['shift']());}};_0x1c3531(++_0x365e8d);}(_0x471a,0x18d));var _0xa471=function(_0x2943e9,_0xec3163){_0x2943e9=_0x2943e9-0x0;var _0xf9dfeb=_0x471a[_0x2943e9];return _0xf9dfeb;};'use strict';var client=require(_0xa471('0x0'));exports[_0xa471('0x1')]=function(){return function(){return client[_0xa471('0x2')]('GetMailAccount',{'options':{'attributes':['id',_0xa471('0x3'),_0xa471('0x4'),_0xa471('0x5'),_0xa471('0x6'),'active','key','ListId',_0xa471('0x7')],'raw':![],'include':[{'model':'MailServerIn','as':'Imap','include':[{'model':'CloudProvider','attributes':['id',_0xa471('0x3'),_0xa471('0x5'),_0xa471('0x8'),'data5'],'as':_0xa471('0x9')}]},{'model':'MailServerOut','as':'Smtp','include':[{'model':_0xa471('0x9'),'attributes':['id',_0xa471('0x3'),_0xa471('0x5'),_0xa471('0x8'),'data5'],'as':_0xa471('0x9')}]}]},'log':_0xa471('0xa')});};};exports[_0xa471('0xb')]=function(_0xbabe8f,_0x3640a0){return client[_0xa471('0x2')]('NotifyMailAccount',{'account':{'id':_0xbabe8f},'body':_0x3640a0,'log':_0xa471('0xc')});};
\ No newline at end of file
index 64d14d2..84e5286 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0713=['../client','Request','ShowSetting','loginMailFrequency'];(function(_0x1ee938,_0x22267f){var _0x3ebf3b=function(_0x10611e){while(--_0x10611e){_0x1ee938['push'](_0x1ee938['shift']());}};_0x3ebf3b(++_0x22267f);}(_0x0713,0x110));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0x3071('0x0'));exports['getSettings']=function(){return client[_0x3071('0x1')](_0x3071('0x2'),{'options':{'raw':!![],'where':{'id':0x1},'attributes':[_0x3071('0x3')]},'log':'GetSettings'});};
\ No newline at end of file
+var _0x1e0a=['GetSettings','../client','Request','ShowSetting'];(function(_0x3fa4bd,_0x564a6e){var _0x50601c=function(_0x140d92){while(--_0x140d92){_0x3fa4bd['push'](_0x3fa4bd['shift']());}};_0x50601c(++_0x564a6e);}(_0x1e0a,0x171));var _0xa1e0=function(_0x1a7b94,_0x4b9c23){_0x1a7b94=_0x1a7b94-0x0;var _0x51c85e=_0x1e0a[_0x1a7b94];return _0x51c85e;};'use strict';var client=require(_0xa1e0('0x0'));exports['getSettings']=function(){return client[_0xa1e0('0x1')](_0xa1e0('0x2'),{'options':{'raw':!![],'where':{'id':0x1},'attributes':['loginMailFrequency']},'log':_0xa1e0('0x3')});};
\ No newline at end of file
index 74c2077..eb8772a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['catch','values','mailAccounts','length','Imap','password','Smtp','pass','server','http','stringify','127.0.0.1','log','Email\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','jayson/promise','bluebird','lodash','listen','sendMail','then','error','Verified'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2f3848,_0x48564d){_0x2f3848=_0x2f3848-0x0;var _0x102668=_0xa9e0[_0x2f3848];return _0x102668;};'use strict';var jayson=require(_0x0a9e('0x0'));var BPromise=require(_0x0a9e('0x1'));var _=require(_0x0a9e('0x2'));var logger=require('../../../config/logger')('email');exports[_0x0a9e('0x3')]=function(_0x4ce2f1,_0x333808){return new BPromise(function(_0x432180,_0x2ab90b){var _0x991246={'SendMail':function(_0x981158){var _0x57b080=this;return new Promise(function(_0x219af0,_0x441e3a){_0x333808[_0x0a9e('0x4')](_0x981158['account'],_0x981158['message'])[_0x0a9e('0x5')](function(_0x56465b){_0x219af0({'code':0xc8,'message':_0x56465b});})['catch'](function(_0x39753a){_0x441e3a(_0x57b080[_0x0a9e('0x6')](0x1f4,_0x39753a));});});},'VerifySmtp':function(_0x307b3e){var _0x3ab53f=this;return new Promise(function(_0xfeb75b,_0xbd1168){_0x333808['verifySmtp'](_0x307b3e['account'])['then'](function(_0x4cfe67){_0xfeb75b({'code':0xc8,'message':_0x0a9e('0x7')});})[_0x0a9e('0x8')](function(_0xd5b662){_0xbd1168(_0x3ab53f[_0x0a9e('0x6')](0x1f4,_0xd5b662));});});},'MailAccounts':function(_0x32d742){return new Promise(function(_0x69aeb7,_0x5db4b0){var _0x4283ce=_[_0x0a9e('0x9')](_0x4ce2f1[_0x0a9e('0xa')]);for(var _0x281129=0x0;_0x281129<_0x4283ce[_0x0a9e('0xb')];_0x281129+=0x1){if(_0x4283ce[_0x281129][_0x0a9e('0xc')]&&_0x4283ce[_0x281129]['Imap'][_0x0a9e('0xd')]){delete _0x4283ce[_0x281129]['Imap'][_0x0a9e('0xd')];}if(_0x4283ce[_0x281129]['Smtp']&&_0x4283ce[_0x281129][_0x0a9e('0xe')][_0x0a9e('0xf')]){delete _0x4283ce[_0x281129]['Smtp'][_0x0a9e('0xf')];}}_0x69aeb7({'count':_0x4283ce['length'],'rows':_0x4283ce});});}};var _0x459eb1=jayson[_0x0a9e('0x10')](_0x991246)[_0x0a9e('0x11')]();_0x459eb1['on'](_0x0a9e('0x6'),function(_0x31b1ca){logger[_0x0a9e('0x6')](JSON[_0x0a9e('0x12')](_0x31b1ca));return _0x2ab90b(_0x31b1ca);});_0x459eb1[_0x0a9e('0x3')](0x232b,_0x0a9e('0x13'),function(){console[_0x0a9e('0x14')](_0x0a9e('0x15'),0x232b);return _0x432180(_0x0a9e('0x16')+0x232b);});});};
\ No newline at end of file
+var _0xa9e0=['catch','values','mailAccounts','length','Imap','password','Smtp','pass','server','http','stringify','127.0.0.1','log','Email\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','jayson/promise','bluebird','lodash','listen','sendMail','then','error','Verified'];(function(_0x40a045,_0x516f0e){var _0x1a687c=function(_0x48c9fe){while(--_0x48c9fe){_0x40a045['push'](_0x40a045['shift']());}};_0x1a687c(++_0x516f0e);}(_0xa9e0,0x123));var _0x0a9e=function(_0x34bf97,_0xc60f9d){_0x34bf97=_0x34bf97-0x0;var _0x292719=_0xa9e0[_0x34bf97];return _0x292719;};'use strict';var jayson=require(_0x0a9e('0x0'));var BPromise=require(_0x0a9e('0x1'));var _=require(_0x0a9e('0x2'));var logger=require('../../../config/logger')('email');exports[_0x0a9e('0x3')]=function(_0x4ce2f1,_0x333808){return new BPromise(function(_0x432180,_0x2ab90b){var _0x991246={'SendMail':function(_0x981158){var _0x57b080=this;return new Promise(function(_0x219af0,_0x441e3a){_0x333808[_0x0a9e('0x4')](_0x981158['account'],_0x981158['message'])[_0x0a9e('0x5')](function(_0x56465b){_0x219af0({'code':0xc8,'message':_0x56465b});})['catch'](function(_0x39753a){_0x441e3a(_0x57b080[_0x0a9e('0x6')](0x1f4,_0x39753a));});});},'VerifySmtp':function(_0x307b3e){var _0x3ab53f=this;return new Promise(function(_0xfeb75b,_0xbd1168){_0x333808['verifySmtp'](_0x307b3e['account'])['then'](function(_0x4cfe67){_0xfeb75b({'code':0xc8,'message':_0x0a9e('0x7')});})[_0x0a9e('0x8')](function(_0xd5b662){_0xbd1168(_0x3ab53f[_0x0a9e('0x6')](0x1f4,_0xd5b662));});});},'MailAccounts':function(_0x32d742){return new Promise(function(_0x69aeb7,_0x5db4b0){var _0x4283ce=_[_0x0a9e('0x9')](_0x4ce2f1[_0x0a9e('0xa')]);for(var _0x281129=0x0;_0x281129<_0x4283ce[_0x0a9e('0xb')];_0x281129+=0x1){if(_0x4283ce[_0x281129][_0x0a9e('0xc')]&&_0x4283ce[_0x281129]['Imap'][_0x0a9e('0xd')]){delete _0x4283ce[_0x281129]['Imap'][_0x0a9e('0xd')];}if(_0x4283ce[_0x281129]['Smtp']&&_0x4283ce[_0x281129][_0x0a9e('0xe')][_0x0a9e('0xf')]){delete _0x4283ce[_0x281129]['Smtp'][_0x0a9e('0xf')];}}_0x69aeb7({'count':_0x4283ce['length'],'rows':_0x4283ce});});}};var _0x459eb1=jayson[_0x0a9e('0x10')](_0x991246)[_0x0a9e('0x11')]();_0x459eb1['on'](_0x0a9e('0x6'),function(_0x31b1ca){logger[_0x0a9e('0x6')](JSON[_0x0a9e('0x12')](_0x31b1ca));return _0x2ab90b(_0x31b1ca);});_0x459eb1[_0x0a9e('0x3')](0x232b,_0x0a9e('0x13'),function(){console[_0x0a9e('0x14')](_0x0a9e('0x15'),0x232b);return _0x432180(_0x0a9e('0x16')+0x232b);});});};
\ No newline at end of file
index ba56f24..87e235f 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xda2f=['../../config/environment','createServer','timeout','listen','port','polling','redis','socket.io-redis','../../config/triggers','../../config/socketio','default','../../routes','once','listening','log','Express\x20server\x20listening\x20on\x20port\x20%d!','exports','lodash','http','express','sticky-session','ioredis'];(function(_0x17ec1d,_0x2a1cca){var _0x5c56a0=function(_0x16b9e2){while(--_0x16b9e2){_0x17ec1d['push'](_0x17ec1d['shift']());}};_0x5c56a0(++_0x2a1cca);}(_0xda2f,0xab));var _0xfda2=function(_0x409329,_0x3d0180){_0x409329=_0x409329-0x0;var _0x55768d=_0xda2f[_0x409329];return _0x55768d;};'use strict';var _=require(_0xfda2('0x0'));var http=require(_0xfda2('0x1'));var express=require(_0xfda2('0x2'));var sticky=require(_0xfda2('0x3'));var Redis=require(_0xfda2('0x4'));var config=require(_0xfda2('0x5'));var app=express();var server=http[_0xfda2('0x6')](app);server[_0xfda2('0x7')]=0xdbba0;if(sticky[_0xfda2('0x8')](server,config[_0xfda2('0x9')])){var socketio=require('socket.io')(server,{'transports':['websocket',_0xfda2('0xa')]});config[_0xfda2('0xb')]=_['defaults'](config[_0xfda2('0xb')],{'host':'localhost','port':0x18eb});socketio['adapter'](require(_0xfda2('0xc'))({'pubClient':new Redis(config[_0xfda2('0xb')]),'subClient':new Redis(config[_0xfda2('0xb')])}));require(_0xfda2('0xd'))['default']();require(_0xfda2('0xe'))[_0xfda2('0xf')](socketio);require('../../config/express')['default'](app);require(_0xfda2('0x10'))[_0xfda2('0xf')](app);}else{server[_0xfda2('0x11')](_0xfda2('0x12'),function(){console[_0xfda2('0x13')](_0xfda2('0x14'),config[_0xfda2('0x9')]);});}exports=module[_0xfda2('0x15')]=app;
\ No newline at end of file
+var _0x9d6e=['listening','log','Express\x20server\x20listening\x20on\x20port\x20%d!','port','exports','http','sticky-session','ioredis','../../config/environment','createServer','listen','socket.io','websocket','polling','redis','defaults','localhost','../../config/socketio','default','../../config/express','../../routes','once'];(function(_0x19af09,_0x12ac75){var _0x2c7b04=function(_0x1b4071){while(--_0x1b4071){_0x19af09['push'](_0x19af09['shift']());}};_0x2c7b04(++_0x12ac75);}(_0x9d6e,0x10d));var _0xe9d6=function(_0x3ab51d,_0x2fa01d){_0x3ab51d=_0x3ab51d-0x0;var _0x29a04e=_0x9d6e[_0x3ab51d];return _0x29a04e;};'use strict';var _=require('lodash');var http=require(_0xe9d6('0x0'));var express=require('express');var sticky=require(_0xe9d6('0x1'));var Redis=require(_0xe9d6('0x2'));var config=require(_0xe9d6('0x3'));var app=express();var server=http[_0xe9d6('0x4')](app);server['timeout']=0xdbba0;if(sticky[_0xe9d6('0x5')](server,config['port'])){var socketio=require(_0xe9d6('0x6'))(server,{'transports':[_0xe9d6('0x7'),_0xe9d6('0x8')]});config[_0xe9d6('0x9')]=_[_0xe9d6('0xa')](config[_0xe9d6('0x9')],{'host':_0xe9d6('0xb'),'port':0x18eb});socketio['adapter'](require('socket.io-redis')({'pubClient':new Redis(config[_0xe9d6('0x9')]),'subClient':new Redis(config[_0xe9d6('0x9')])}));require('../../config/triggers')['default']();require(_0xe9d6('0xc'))[_0xe9d6('0xd')](socketio);require(_0xe9d6('0xe'))[_0xe9d6('0xd')](app);require(_0xe9d6('0xf'))[_0xe9d6('0xd')](app);}else{server[_0xe9d6('0x10')](_0xe9d6('0x11'),function(){console[_0xe9d6('0x12')](_0xe9d6('0x13'),config[_0xe9d6('0x14')]);});}exports=module[_0xe9d6('0x15')]=app;
\ No newline at end of file
index bd38749..a969927 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xaa5d=['error','rpc','message','result','catch','exports','jayson/promise','bluebird','routing','http','Request','request','then','debug'];(function(_0x85d5a8,_0x1977be){var _0x20479b=function(_0x125248){while(--_0x125248){_0x85d5a8['push'](_0x85d5a8['shift']());}};_0x20479b(++_0x1977be);}(_0xaa5d,0x84));var _0xdaa5=function(_0x5627e1,_0x1b2dbf){_0x5627e1=_0x5627e1-0x0;var _0x2f013f=_0xaa5d[_0x5627e1];return _0x2f013f;};'use strict';var jayson=require(_0xdaa5('0x0'));var BPromise=require(_0xdaa5('0x1'));var logger=require('../../config/logger')(_0xdaa5('0x2'));var client=jayson['client'][_0xdaa5('0x3')]({'port':0x2329});client[_0xdaa5('0x4')]=function(_0x3c3a64,_0x51fa62){return new BPromise(function(_0x1c98af,_0x44652d){return client[_0xdaa5('0x5')](_0x3c3a64,_0x51fa62)[_0xdaa5('0x6')](function(_0x9d6905){logger[_0xdaa5('0x7')]('rpc',_0xdaa5('0x2'),_0x3c3a64,_0x51fa62,_0x9d6905);if(_0x9d6905[_0xdaa5('0x8')]){logger[_0xdaa5('0x8')](_0xdaa5('0x9'),_0xdaa5('0x2'),_0x3c3a64,_0x9d6905[_0xdaa5('0x8')][_0xdaa5('0xa')],_0x51fa62);return _0x44652d(_0x9d6905[_0xdaa5('0x8')][_0xdaa5('0xa')]);}else{return _0x1c98af(_0x9d6905[_0xdaa5('0xb')]);}})[_0xdaa5('0xc')](function(_0x100a91){logger['error'](_0xdaa5('0x9'),_0xdaa5('0x2'),_0x3c3a64,_0x100a91,_0x51fa62);return _0x44652d(_0x100a91);});});};module[_0xdaa5('0xd')]=client;
\ No newline at end of file
+var _0x1ff3=['debug','rpc','error','message','result','catch','exports','jayson/promise','bluebird','routing','client','http','request','then'];(function(_0x525c7b,_0x488fcc){var _0x27b33e=function(_0x56d43b){while(--_0x56d43b){_0x525c7b['push'](_0x525c7b['shift']());}};_0x27b33e(++_0x488fcc);}(_0x1ff3,0x103));var _0x31ff=function(_0x21e117,_0x4d961e){_0x21e117=_0x21e117-0x0;var _0x214b3a=_0x1ff3[_0x21e117];return _0x214b3a;};'use strict';var jayson=require(_0x31ff('0x0'));var BPromise=require(_0x31ff('0x1'));var logger=require('../../config/logger')(_0x31ff('0x2'));var client=jayson[_0x31ff('0x3')][_0x31ff('0x4')]({'port':0x2329});client['Request']=function(_0x54a4b4,_0x5328aa){return new BPromise(function(_0x556398,_0x36f802){return client[_0x31ff('0x5')](_0x54a4b4,_0x5328aa)[_0x31ff('0x6')](function(_0x1db9b0){logger[_0x31ff('0x7')](_0x31ff('0x8'),_0x31ff('0x2'),_0x54a4b4,_0x5328aa,_0x1db9b0);if(_0x1db9b0[_0x31ff('0x9')]){logger[_0x31ff('0x9')](_0x31ff('0x8'),_0x31ff('0x2'),_0x54a4b4,_0x1db9b0[_0x31ff('0x9')][_0x31ff('0xa')],_0x5328aa);return _0x36f802(_0x1db9b0[_0x31ff('0x9')]['message']);}else{return _0x556398(_0x1db9b0[_0x31ff('0xb')]);}})[_0x31ff('0xc')](function(_0x2ae361){logger[_0x31ff('0x9')](_0x31ff('0x8'),_0x31ff('0x2'),_0x54a4b4,_0x2ae361,_0x5328aa);return _0x36f802(_0x2ae361);});});};module[_0x31ff('0xd')]=client;
\ No newline at end of file
index d2ee8d7..14bfead 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa030=['listen','catch','log','bluebird','./realtime','./rpc/interval','./rpc/openchannelQueue','./rpc/chatQueue','./rpc/smsQueue','./rpc/faxQueue','./rpc/whatsappQueue','resolve','then','getAgents','getIntervals','getChatQueues','initChatQueues','getSmsQueues','initSmsQueues','getMailQueues','initMailQueues','getFaxQueues','initWhatsappQueues'];(function(_0x167cc1,_0x56ef5a){var _0x10bc4b=function(_0xd6a255){while(--_0xd6a255){_0x167cc1['push'](_0x167cc1['shift']());}};_0x10bc4b(++_0x56ef5a);}(_0xa030,0x100));var _0x0a03=function(_0x25b19a,_0x9f16bd){_0x25b19a=_0x25b19a-0x0;var _0x136f7e=_0xa030[_0x25b19a];return _0x136f7e;};'use strict';var BPromise=require(_0x0a03('0x0'));var server=require('./server');var Realtime=require(_0x0a03('0x1'));var user=require('./rpc/user');var interval=require(_0x0a03('0x2'));var openchannelQueue=require(_0x0a03('0x3'));var chatQueue=require(_0x0a03('0x4'));var smsQueue=require(_0x0a03('0x5'));var mailQueue=require('./rpc/mailQueue');var faxQueue=require(_0x0a03('0x6'));var whatsappQueue=require(_0x0a03('0x7'));var realtime=new Realtime();function initRealtime(){return BPromise[_0x0a03('0x8')]()[_0x0a03('0x9')](user[_0x0a03('0xa')]())[_0x0a03('0x9')](realtime['initAgents']())[_0x0a03('0x9')](interval[_0x0a03('0xb')]())['then'](realtime['initIntervals']())[_0x0a03('0x9')](openchannelQueue['getOpenchannelQueues']())['then'](realtime['initOpenchannelQueues']())[_0x0a03('0x9')](chatQueue[_0x0a03('0xc')]())[_0x0a03('0x9')](realtime[_0x0a03('0xd')]())['then'](smsQueue[_0x0a03('0xe')]())[_0x0a03('0x9')](realtime[_0x0a03('0xf')]())['then'](mailQueue[_0x0a03('0x10')]())[_0x0a03('0x9')](realtime[_0x0a03('0x11')]())['then'](faxQueue[_0x0a03('0x12')]())[_0x0a03('0x9')](realtime['initFaxQueues']())[_0x0a03('0x9')](whatsappQueue['getWhatsappQueues']())['then'](realtime[_0x0a03('0x13')]())['then'](function(){return realtime;});}function main(){return server[_0x0a03('0x14')](realtime)[_0x0a03('0x9')](function(_0x350efb){return initRealtime();})[_0x0a03('0x9')](function(_0x52a166){return setInterval(initRealtime,0x1388);})[_0x0a03('0x15')](function(_0xa95385){console[_0x0a03('0x16')](_0xa95385);});}main();
\ No newline at end of file
+var _0xd758=['getIntervals','initOpenchannelQueues','getChatQueues','initChatQueues','getSmsQueues','getMailQueues','initMailQueues','getFaxQueues','initFaxQueues','getWhatsappQueues','initWhatsappQueues','listen','catch','log','bluebird','./server','./realtime','./rpc/interval','./rpc/openchannelQueue','./rpc/chatQueue','./rpc/mailQueue','./rpc/faxQueue','resolve','then','getAgents'];(function(_0x3ec5ab,_0x17b398){var _0x39e35e=function(_0x30d8a5){while(--_0x30d8a5){_0x3ec5ab['push'](_0x3ec5ab['shift']());}};_0x39e35e(++_0x17b398);}(_0xd758,0xbd));var _0x8d75=function(_0xe9a5d3,_0x1b59cc){_0xe9a5d3=_0xe9a5d3-0x0;var _0x2978d7=_0xd758[_0xe9a5d3];return _0x2978d7;};'use strict';var BPromise=require(_0x8d75('0x0'));var server=require(_0x8d75('0x1'));var Realtime=require(_0x8d75('0x2'));var user=require('./rpc/user');var interval=require(_0x8d75('0x3'));var openchannelQueue=require(_0x8d75('0x4'));var chatQueue=require(_0x8d75('0x5'));var smsQueue=require('./rpc/smsQueue');var mailQueue=require(_0x8d75('0x6'));var faxQueue=require(_0x8d75('0x7'));var whatsappQueue=require('./rpc/whatsappQueue');var realtime=new Realtime();function initRealtime(){return BPromise[_0x8d75('0x8')]()[_0x8d75('0x9')](user[_0x8d75('0xa')]())[_0x8d75('0x9')](realtime['initAgents']())[_0x8d75('0x9')](interval[_0x8d75('0xb')]())['then'](realtime['initIntervals']())[_0x8d75('0x9')](openchannelQueue['getOpenchannelQueues']())[_0x8d75('0x9')](realtime[_0x8d75('0xc')]())[_0x8d75('0x9')](chatQueue[_0x8d75('0xd')]())['then'](realtime[_0x8d75('0xe')]())[_0x8d75('0x9')](smsQueue[_0x8d75('0xf')]())[_0x8d75('0x9')](realtime['initSmsQueues']())[_0x8d75('0x9')](mailQueue[_0x8d75('0x10')]())[_0x8d75('0x9')](realtime[_0x8d75('0x11')]())[_0x8d75('0x9')](faxQueue[_0x8d75('0x12')]())[_0x8d75('0x9')](realtime[_0x8d75('0x13')]())[_0x8d75('0x9')](whatsappQueue[_0x8d75('0x14')]())[_0x8d75('0x9')](realtime[_0x8d75('0x15')]())[_0x8d75('0x9')](function(){return realtime;});}function main(){return server[_0x8d75('0x16')](realtime)[_0x8d75('0x9')](function(_0x17759f){return initRealtime();})[_0x8d75('0x9')](function(_0x533748){return setInterval(initRealtime,0x1388);})[_0x8d75('0x17')](function(_0x49017e){console[_0x8d75('0x18')](_0x49017e);});}main();
\ No newline at end of file
index b923b64..20e163c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe14b=['next','restart','condition','noop','findRules','matches','turn','length','prioritize','priority','toJSON','map','toString','fromJSON','isString','object','register','exports','lodash','util','isNil','ignoreFactChanges','inherits','prototype','init','rules','activeRules','isArray','concat','push','sync','filter','orderBy','asc','execute','result','clone','consequence','ruleRef','name','index_','nextTick','call'];(function(_0x43b63a,_0x160d4f){var _0x38dbf2=function(_0x44e93c){while(--_0x44e93c){_0x43b63a['push'](_0x43b63a['shift']());}};_0x38dbf2(++_0x160d4f);}(_0xe14b,0x93));var _0xbe14=function(_0x31e592,_0xf615f3){_0x31e592=_0x31e592-0x0;var _0x1d8e79=_0xe14b[_0x31e592];return _0x1d8e79;};'use strict';var _=require(_0xbe14('0x0'));var util=require(_0xbe14('0x1'));var EventEmitter=require('events')['EventEmitter'];function RuleEngine(_0x11c3a0,_0x36393a){this['init']();if(!_[_0xbe14('0x2')](_0x11c3a0)){this['register'](_0x11c3a0);}if(_0x36393a){this['ignoreFactChanges']=_0x36393a[_0xbe14('0x3')];}return this;}util[_0xbe14('0x4')](RuleEngine,EventEmitter);RuleEngine[_0xbe14('0x5')][_0xbe14('0x6')]=function(_0x1d9ade){this[_0xbe14('0x7')]=[];this[_0xbe14('0x8')]=[];};RuleEngine['prototype']['register']=function(_0x496063){if(Array[_0xbe14('0x9')](_0x496063)){this[_0xbe14('0x7')]=this[_0xbe14('0x7')][_0xbe14('0xa')](_0x496063);}else if(_0x496063!==null&&_['isObject'](_0x496063)){this['rules'][_0xbe14('0xb')](_0x496063);}this[_0xbe14('0xc')]();};RuleEngine['prototype'][_0xbe14('0xc')]=function(){this[_0xbe14('0x8')]=this[_0xbe14('0x7')][_0xbe14('0xd')](function(_0x27792f){if(_[_0xbe14('0x2')](_0x27792f['on'])){_0x27792f['on']=!![];}if(_0x27792f['on']===!![]){return _0x27792f;}});this[_0xbe14('0x8')]=_[_0xbe14('0xe')](this[_0xbe14('0x8')],['p'],[_0xbe14('0xf')]);};RuleEngine[_0xbe14('0x5')][_0xbe14('0x10')]=function(_0x813399,_0x530538){var _0x55b3a7=![];_0x813399[_0xbe14('0x11')]=!![];var _0x3dc4a9=_[_0xbe14('0x12')](_0x813399);var _0x37ce4e=_['clone'](_0x813399);var _0x21c789=this[_0xbe14('0x8')];var _0xfd7b8f=[];var _0x123ede=this[_0xbe14('0x3')];(function FnRuleLoop(_0x29ab73){var _0x17ae86={'rules':function(){return _0x21c789;},'rule':function(){return _0x21c789[_0x29ab73];},'when':function(_0x5ea1f8){if(_0x5ea1f8){var _0x137ee5=_0x21c789[_0x29ab73][_0xbe14('0x13')];_0x137ee5[_0xbe14('0x14')]=_0x21c789[_0x29ab73]['id']||_0x21c789[_0x29ab73][_0xbe14('0x15')]||_0xbe14('0x16')+_0x29ab73;process[_0xbe14('0x17')](function(){_0xfd7b8f['push'](_0x137ee5[_0xbe14('0x14')]);_0x137ee5[_0xbe14('0x18')](_0x3dc4a9,_0x17ae86);});}else{process[_0xbe14('0x17')](function(){_0x17ae86[_0xbe14('0x19')]();});}},'restart':function(){return FnRuleLoop(0x0);},'stop':function(){_0x55b3a7=!![];return FnRuleLoop(0x0);},'next':function(_0x188ec4){if(!_0x123ede&&!_['isEqual'](_0x37ce4e,_0x3dc4a9)){_0x37ce4e=_[_0xbe14('0x12')](_0x3dc4a9);process['nextTick'](function(){_0x17ae86[_0xbe14('0x1a')]();});}else{process['nextTick'](function(){if(_[_0xbe14('0x2')](_0x188ec4)){return FnRuleLoop(_0x29ab73+0x1);}else{return FnRuleLoop(_0x188ec4);}});}}};if(_0x29ab73<_0x21c789['length']&&_0x55b3a7===![]){var _0x274018=_0x21c789[_0x29ab73][_0xbe14('0x1b')];_0x274018['call'](_0x3dc4a9,_0x17ae86);}else{process[_0xbe14('0x17')](function(){_0x3dc4a9['matchPath']=_0xfd7b8f;return _0x530538?_0x530538(_0x3dc4a9):_[_0xbe14('0x1c')]();});}}(0x0));};RuleEngine['prototype'][_0xbe14('0x1d')]=function(_0x5fa043){if(_[_0xbe14('0x2')](_0x5fa043)){return this[_0xbe14('0x7')];}else{var _0x15ef02=_[_0xbe14('0x1e')](_0x5fa043);return _['filter'](this[_0xbe14('0x7')],_0x15ef02);}};RuleEngine[_0xbe14('0x5')][_0xbe14('0x1f')]=function(_0x169369,_0x5dd475){var _0x16f884=_0x169369==='on'||_0x169369==='ON'?!![]:![];var _0x29fc64=this['findRules'](_0x5dd475);for(var _0x3c3613=0x0,_0x3b3e84=_0x29fc64[_0xbe14('0x20')];_0x3c3613<_0x3b3e84;_0x3c3613+=0x1){_0x29fc64[_0x3c3613]['on']=_0x16f884;}this[_0xbe14('0xc')]();};RuleEngine[_0xbe14('0x5')][_0xbe14('0x21')]=function(_0x31a664,_0x2b05cb){_0x31a664=parseInt(_0x31a664,0xa);var _0x4168c8=this[_0xbe14('0x1d')](_0x2b05cb);for(var _0x40538f=0x0,_0x3bf43c=_0x4168c8[_0xbe14('0x20')];_0x40538f<_0x3bf43c;_0x40538f+=0x1){_0x4168c8[_0x40538f][_0xbe14('0x22')]=_0x31a664;}this[_0xbe14('0xc')]();};RuleEngine[_0xbe14('0x5')][_0xbe14('0x23')]=function(){var _0x2ff48e=this[_0xbe14('0x7')];if(_0x2ff48e instanceof Array){_0x2ff48e=_0x2ff48e[_0xbe14('0x24')](function(_0x581e86){_0x581e86[_0xbe14('0x1b')]=_0x581e86['condition']['toString']();_0x581e86[_0xbe14('0x13')]=_0x581e86['consequence'][_0xbe14('0x25')]();return _0x581e86;});}else if(!_[_0xbe14('0x2')](_0x2ff48e)){_0x2ff48e['condition']=_0x2ff48e['condition']['toString']();_0x2ff48e[_0xbe14('0x13')]=_0x2ff48e[_0xbe14('0x13')]['toString']();}return _0x2ff48e;};RuleEngine[_0xbe14('0x5')][_0xbe14('0x26')]=function(_0x452635){this[_0xbe14('0x6')]();if(_[_0xbe14('0x27')](_0x452635)){_0x452635=JSON['parse'](_0x452635);}if(_0x452635 instanceof Array){_0x452635=_0x452635['map'](function(_0x15a997){_0x15a997['condition']=eval('('+_0x15a997['condition']+')');_0x15a997['consequence']=eval('('+_0x15a997[_0xbe14('0x13')]+')');return _0x15a997;});}else if(_0x452635!==null&&typeof _0x452635==_0xbe14('0x28')){_0x452635[_0xbe14('0x1b')]=eval('('+_0x452635[_0xbe14('0x1b')]+')');_0x452635[_0xbe14('0x13')]=eval('('+_0x452635[_0xbe14('0x13')]+')');}this[_0xbe14('0x29')](_0x452635);};module[_0xbe14('0x2a')]=RuleEngine;
\ No newline at end of file
+var _0x1261=['isNil','register','ignoreFactChanges','activeRules','prototype','isArray','rules','concat','isObject','push','sync','filter','orderBy','asc','result','clone','name','nextTick','ruleRef','isEqual','restart','length','condition','noop','findRules','matches','turn','prioritize','priority','toString','consequence','fromJSON','isString','parse','map','object','exports','util','events','EventEmitter','init'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x1261,0x144));var _0x1126=function(_0x5f382f,_0x3f1432){_0x5f382f=_0x5f382f-0x0;var _0x3bb11b=_0x1261[_0x5f382f];return _0x3bb11b;};'use strict';var _=require('lodash');var util=require(_0x1126('0x0'));var EventEmitter=require(_0x1126('0x1'))[_0x1126('0x2')];function RuleEngine(_0x331a2c,_0x39b786){this[_0x1126('0x3')]();if(!_[_0x1126('0x4')](_0x331a2c)){this[_0x1126('0x5')](_0x331a2c);}if(_0x39b786){this[_0x1126('0x6')]=_0x39b786[_0x1126('0x6')];}return this;}util['inherits'](RuleEngine,EventEmitter);RuleEngine['prototype'][_0x1126('0x3')]=function(_0x907180){this['rules']=[];this[_0x1126('0x7')]=[];};RuleEngine[_0x1126('0x8')][_0x1126('0x5')]=function(_0x3abb0b){if(Array[_0x1126('0x9')](_0x3abb0b)){this['rules']=this[_0x1126('0xa')][_0x1126('0xb')](_0x3abb0b);}else if(_0x3abb0b!==null&&_[_0x1126('0xc')](_0x3abb0b)){this['rules'][_0x1126('0xd')](_0x3abb0b);}this['sync']();};RuleEngine['prototype'][_0x1126('0xe')]=function(){this['activeRules']=this[_0x1126('0xa')][_0x1126('0xf')](function(_0xd26a32){if(_[_0x1126('0x4')](_0xd26a32['on'])){_0xd26a32['on']=!![];}if(_0xd26a32['on']===!![]){return _0xd26a32;}});this[_0x1126('0x7')]=_[_0x1126('0x10')](this[_0x1126('0x7')],['p'],[_0x1126('0x11')]);};RuleEngine[_0x1126('0x8')]['execute']=function(_0x5de9a7,_0x1af673){var _0x154e20=![];_0x5de9a7[_0x1126('0x12')]=!![];var _0x4be0c6=_[_0x1126('0x13')](_0x5de9a7);var _0x4794a7=_[_0x1126('0x13')](_0x5de9a7);var _0x42f379=this[_0x1126('0x7')];var _0x4e1c97=[];var _0x245cd7=this[_0x1126('0x6')];(function FnRuleLoop(_0x4a7b49){var _0x4d2b38={'rules':function(){return _0x42f379;},'rule':function(){return _0x42f379[_0x4a7b49];},'when':function(_0x22ae0b){if(_0x22ae0b){var _0x2b2487=_0x42f379[_0x4a7b49]['consequence'];_0x2b2487['ruleRef']=_0x42f379[_0x4a7b49]['id']||_0x42f379[_0x4a7b49][_0x1126('0x14')]||'index_'+_0x4a7b49;process[_0x1126('0x15')](function(){_0x4e1c97[_0x1126('0xd')](_0x2b2487[_0x1126('0x16')]);_0x2b2487['call'](_0x4be0c6,_0x4d2b38);});}else{process[_0x1126('0x15')](function(){_0x4d2b38['next']();});}},'restart':function(){return FnRuleLoop(0x0);},'stop':function(){_0x154e20=!![];return FnRuleLoop(0x0);},'next':function(_0x56efeb){if(!_0x245cd7&&!_[_0x1126('0x17')](_0x4794a7,_0x4be0c6)){_0x4794a7=_[_0x1126('0x13')](_0x4be0c6);process[_0x1126('0x15')](function(){_0x4d2b38[_0x1126('0x18')]();});}else{process['nextTick'](function(){if(_[_0x1126('0x4')](_0x56efeb)){return FnRuleLoop(_0x4a7b49+0x1);}else{return FnRuleLoop(_0x56efeb);}});}}};if(_0x4a7b49<_0x42f379[_0x1126('0x19')]&&_0x154e20===![]){var _0x48a08d=_0x42f379[_0x4a7b49][_0x1126('0x1a')];_0x48a08d['call'](_0x4be0c6,_0x4d2b38);}else{process['nextTick'](function(){_0x4be0c6['matchPath']=_0x4e1c97;return _0x1af673?_0x1af673(_0x4be0c6):_[_0x1126('0x1b')]();});}}(0x0));};RuleEngine[_0x1126('0x8')][_0x1126('0x1c')]=function(_0x34bcf1){if(_[_0x1126('0x4')](_0x34bcf1)){return this[_0x1126('0xa')];}else{var _0xea0971=_[_0x1126('0x1d')](_0x34bcf1);return _['filter'](this[_0x1126('0xa')],_0xea0971);}};RuleEngine[_0x1126('0x8')][_0x1126('0x1e')]=function(_0x5ddf63,_0x541bc9){var _0xeb7d89=_0x5ddf63==='on'||_0x5ddf63==='ON'?!![]:![];var _0x39bf0e=this['findRules'](_0x541bc9);for(var _0x2fb797=0x0,_0x23d2bc=_0x39bf0e['length'];_0x2fb797<_0x23d2bc;_0x2fb797+=0x1){_0x39bf0e[_0x2fb797]['on']=_0xeb7d89;}this[_0x1126('0xe')]();};RuleEngine['prototype'][_0x1126('0x1f')]=function(_0x4bd50b,_0x771bb8){_0x4bd50b=parseInt(_0x4bd50b,0xa);var _0x583ce6=this[_0x1126('0x1c')](_0x771bb8);for(var _0x5f2611=0x0,_0x5252e0=_0x583ce6['length'];_0x5f2611<_0x5252e0;_0x5f2611+=0x1){_0x583ce6[_0x5f2611][_0x1126('0x20')]=_0x4bd50b;}this[_0x1126('0xe')]();};RuleEngine[_0x1126('0x8')]['toJSON']=function(){var _0x2a3055=this[_0x1126('0xa')];if(_0x2a3055 instanceof Array){_0x2a3055=_0x2a3055['map'](function(_0x3dd50e){_0x3dd50e[_0x1126('0x1a')]=_0x3dd50e[_0x1126('0x1a')][_0x1126('0x21')]();_0x3dd50e['consequence']=_0x3dd50e['consequence'][_0x1126('0x21')]();return _0x3dd50e;});}else if(!_[_0x1126('0x4')](_0x2a3055)){_0x2a3055[_0x1126('0x1a')]=_0x2a3055[_0x1126('0x1a')]['toString']();_0x2a3055[_0x1126('0x22')]=_0x2a3055[_0x1126('0x22')][_0x1126('0x21')]();}return _0x2a3055;};RuleEngine[_0x1126('0x8')][_0x1126('0x23')]=function(_0x5df232){this[_0x1126('0x3')]();if(_[_0x1126('0x24')](_0x5df232)){_0x5df232=JSON[_0x1126('0x25')](_0x5df232);}if(_0x5df232 instanceof Array){_0x5df232=_0x5df232[_0x1126('0x26')](function(_0x5c019d){_0x5c019d['condition']=eval('('+_0x5c019d[_0x1126('0x1a')]+')');_0x5c019d[_0x1126('0x22')]=eval('('+_0x5c019d['consequence']+')');return _0x5c019d;});}else if(_0x5df232!==null&&typeof _0x5df232==_0x1126('0x27')){_0x5df232[_0x1126('0x1a')]=eval('('+_0x5df232[_0x1126('0x1a')]+')');_0x5df232['consequence']=eval('('+_0x5df232['consequence']+')');}this[_0x1126('0x5')](_0x5df232);};module[_0x1126('0x28')]=RuleEngine;
\ No newline at end of file
index 280b08c..1e98f0d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x48b7=['catch','sendMailMessage','bluebird','jayson/promise','client','request','then','error','message','result'];(function(_0x322b98,_0x55d0c5){var _0x5e8e29=function(_0x3dc9fb){while(--_0x3dc9fb){_0x322b98['push'](_0x322b98['shift']());}};_0x5e8e29(++_0x55d0c5);}(_0x48b7,0x14c));var _0x748b=function(_0x322e9c,_0x3587a0){_0x322e9c=_0x322e9c-0x0;var _0x2d3f85=_0x48b7[_0x322e9c];return _0x2d3f85;};'use strict';var BPromise=require(_0x748b('0x0'));var jayson=require(_0x748b('0x1'));var client=jayson[_0x748b('0x2')]['http']({'port':0x232b});function request(_0x4271d6,_0x3a1085){return new BPromise(function(_0x22bb99,_0x18f644){return client[_0x748b('0x3')](_0x4271d6,_0x3a1085)[_0x748b('0x4')](function(_0x18ab50){if(_0x18ab50['error']){return _0x18f644(_0x18ab50[_0x748b('0x5')][_0x748b('0x6')]);}else{return _0x22bb99(_0x18ab50[_0x748b('0x7')]);}})[_0x748b('0x8')](function(_0x3da802){return _0x18f644(_0x3da802);});});}exports[_0x748b('0x9')]=function(_0x23d10b,_0x5eae2b){return request('SendMail',{'account':_0x23d10b,'message':_0x5eae2b});};
\ No newline at end of file
+var _0xdad7=['then','error','message','result','catch','SendMail','bluebird','jayson/promise','client','request'];(function(_0x458709,_0x1981ea){var _0x48cbd7=function(_0x358194){while(--_0x358194){_0x458709['push'](_0x458709['shift']());}};_0x48cbd7(++_0x1981ea);}(_0xdad7,0x11e));var _0x7dad=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0xdad7[_0x1facfa];return _0x9ec701;};'use strict';var BPromise=require(_0x7dad('0x0'));var jayson=require(_0x7dad('0x1'));var client=jayson[_0x7dad('0x2')]['http']({'port':0x232b});function request(_0xda467f,_0x1a6696){return new BPromise(function(_0x17e3d5,_0x1c40d8){return client[_0x7dad('0x3')](_0xda467f,_0x1a6696)[_0x7dad('0x4')](function(_0x3eb086){if(_0x3eb086['error']){return _0x1c40d8(_0x3eb086[_0x7dad('0x5')][_0x7dad('0x6')]);}else{return _0x17e3d5(_0x3eb086[_0x7dad('0x7')]);}})[_0x7dad('0x8')](function(_0x38cf63){return _0x1c40d8(_0x38cf63);});});}exports['sendMailMessage']=function(_0x8998d5,_0x5bfbd1){return request(_0x7dad('0x9'),{'account':_0x8998d5,'message':_0x5bfbd1});};
\ No newline at end of file
index 6eee3cd..6377f90 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x90b1=['smsCapacity','smsCurrentCapacity','whatsappStatusTime','whatsappCapacity','openchannelStatus','openchannelStatusTime','openchannelCapacity','openchannelCurrentCapacity','busyQueue','faxWaitingInteractions','smsWaitingInteractions','whatsappWaitingInteractions','updateRealtime','getChannelStatus','CurrentCapacity','Capacity','maxcapacity','prototype','chat','fax','sms','length','Status','StatusTime','whatsappCurrentCapacity','chatWaitingInteractions','mailWaitingInteractions','user:routing:update','omit','exports','lodash','md5','moment','redis','defaults','localhost','name','online','voicePause','chatPause','mailPause','faxPause','smsPause','openchannelPause','chatStatus','chatStatusTime','chatCapacity','chatCurrentCapacity','mailStatus','unknown','mailStatusTime','mailCapacity','mailCurrentCapacity','faxStatus','faxStatusTime','faxCapacity','faxCurrentCapacity','smsStatus','smsStatusTime'];(function(_0x2dafbe,_0x5d04de){var _0x58a45a=function(_0x50ac96){while(--_0x50ac96){_0x2dafbe['push'](_0x2dafbe['shift']());}};_0x58a45a(++_0x5d04de);}(_0x90b1,0x1bb));var _0x190b=function(_0xb618e5,_0x3a4ce4){_0xb618e5=_0xb618e5-0x0;var _0x148d6b=_0x90b1[_0xb618e5];return _0x148d6b;};'use strict';var _=require(_0x190b('0x0'));var md5=require(_0x190b('0x1'));var moment=require(_0x190b('0x2'));var Redis=require('ioredis');var config=require('../../../config/environment');config[_0x190b('0x3')]=_[_0x190b('0x4')](config[_0x190b('0x3')],{'host':_0x190b('0x5'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config['redis']));function Agent(_0x5cbebb){this['id']=_0x5cbebb['id']||0x0;this['name']=_0x5cbebb[_0x190b('0x6')]||'';this[_0x190b('0x7')]=_0x5cbebb[_0x190b('0x7')]||!![];this[_0x190b('0x8')]=_0x5cbebb[_0x190b('0x8')]||![];this[_0x190b('0x9')]=_0x5cbebb[_0x190b('0x9')]||![];this['mailPause']=_0x5cbebb[_0x190b('0xa')]||![];this[_0x190b('0xb')]=_0x5cbebb[_0x190b('0xb')]||![];this[_0x190b('0xc')]=_0x5cbebb[_0x190b('0xc')]||![];this[_0x190b('0xd')]=_0x5cbebb[_0x190b('0xd')]||![];this[_0x190b('0xe')]='unknown';this[_0x190b('0xf')]=0x0;this[_0x190b('0x10')]=_0x5cbebb['chatCapacity']||0x0;this[_0x190b('0x11')]=0x0;this[_0x190b('0x12')]=_0x190b('0x13');this[_0x190b('0x14')]=0x0;this[_0x190b('0x15')]=_0x5cbebb[_0x190b('0x15')]||0x0;this[_0x190b('0x16')]=0x0;this[_0x190b('0x17')]=_0x190b('0x13');this[_0x190b('0x18')]=0x0;this[_0x190b('0x19')]=_0x5cbebb[_0x190b('0x19')]||0x0;this[_0x190b('0x1a')]=0x0;this[_0x190b('0x1b')]=_0x190b('0x13');this[_0x190b('0x1c')]=0x0;this[_0x190b('0x1d')]=_0x5cbebb['smsCapacity']||0x0;this[_0x190b('0x1e')]=0x0;this['whatsappStatus']=_0x190b('0x13');this[_0x190b('0x1f')]=0x0;this[_0x190b('0x20')]=_0x5cbebb[_0x190b('0x20')]||0x0;this['whatsappCurrentCapacity']=0x0;this[_0x190b('0x21')]=_0x190b('0x13');this[_0x190b('0x22')]=0x0;this[_0x190b('0x23')]=_0x5cbebb[_0x190b('0x23')]||0x0;this[_0x190b('0x24')]=0x0;this['busy']=![];this[_0x190b('0x25')]=undefined;this[_0x190b('0x1')]='';this['chatWaitingInteractions']={};this[_0x190b('0x26')]={};this['mailWaitingInteractions']={};this['openchannelWaitingInteractions']={};this[_0x190b('0x27')]={};this[_0x190b('0x28')]={};this[_0x190b('0x29')]();}Agent['prototype'][_0x190b('0x2a')]=function(_0x2e633e){if(this[_0x2e633e+_0x190b('0x2b')]>0x0){if(this[_0x2e633e+_0x190b('0x2c')]>0x0&&this[_0x2e633e+_0x190b('0x2b')]>=this[_0x2e633e+_0x190b('0x2c')]){return _0x190b('0x2d');}else{return'working';}}else{return'idle';}};Agent[_0x190b('0x2e')][_0x190b('0x29')]=function(){var _0x50605b=['mail',_0x190b('0x2f'),'openchannel',_0x190b('0x30'),_0x190b('0x31'),'whatsapp'];for(var _0x3e7a10=0x0;_0x3e7a10<_0x50605b[_0x190b('0x32')];_0x3e7a10+=0x1){var _0x5c89ab=this[_0x190b('0x2a')](_0x50605b[_0x3e7a10]);if(this[_0x50605b[_0x3e7a10]+_0x190b('0x33')]!==_0x5c89ab){this[_0x50605b[_0x3e7a10]+_0x190b('0x34')]=_['toNumber'](moment()['format']('x'));}this[_0x50605b[_0x3e7a10]+_0x190b('0x33')]=_0x5c89ab;}var _0x4d5f3f={'id':this['id'],'name':this[_0x190b('0x6')],'online':this[_0x190b('0x7')],'voicePause':this['voicePause'],'chatPause':this[_0x190b('0x9')],'mailPause':this['mailPause'],'smsPause':this[_0x190b('0xc')],'faxPause':this['faxPause'],'openchannelPause':this[_0x190b('0xd')],'chatStatus':this['chatStatus'],'chatStatusTime':this[_0x190b('0xf')],'chatCapacity':this[_0x190b('0x10')],'chatCurrentCapacity':this['chatCurrentCapacity'],'mailStatus':this[_0x190b('0x12')],'mailStatusTime':this[_0x190b('0x14')],'mailCapacity':this[_0x190b('0x15')],'mailCurrentCapacity':this[_0x190b('0x16')],'faxStatus':this[_0x190b('0x17')],'faxStatusTime':this[_0x190b('0x18')],'faxCapacity':this[_0x190b('0x19')],'faxCurrentCapacity':this[_0x190b('0x1a')],'smsStatus':this['smsStatus'],'smsStatusTime':this['smsStatusTime'],'smsCapacity':this[_0x190b('0x1d')],'smsCurrentCapacity':this[_0x190b('0x1e')],'whatsappStatus':this['whatsappStatus'],'whatsappStatusTime':this[_0x190b('0x1f')],'whatsappCapacity':this[_0x190b('0x20')],'whatsappCurrentCapacity':this[_0x190b('0x35')],'openchannelStatus':this[_0x190b('0x21')],'openchannelStatusTime':this[_0x190b('0x22')],'openchannelCapacity':this[_0x190b('0x23')],'openchannelCurrentCapacity':this[_0x190b('0x24')],'busy':this['busy'],'busyQueue':this['busyQueue'],'chatWaitingInteractions':this[_0x190b('0x36')],'faxWaitingInteractions':this[_0x190b('0x26')],'mailWaitingInteractions':this[_0x190b('0x37')],'openchannelWaitingInteractions':this['openchannelWaitingInteractions'],'smsWaitingInteractions':this[_0x190b('0x27')],'whatsappWaitingInteractions':this[_0x190b('0x28')]};var _0x2e468b=md5(JSON['stringify'](_0x4d5f3f));if(this[_0x190b('0x1')]!==_0x2e468b){this['md5']=_0x2e468b;io['emit'](_0x190b('0x38'),_[_0x190b('0x39')](_0x4d5f3f,['online']));}};module[_0x190b('0x3a')]=Agent;
\ No newline at end of file
+var _0xc6ac=['ioredis','../../../config/environment','redis','defaults','localhost','socket.io-emitter','name','online','voicePause','chatPause','mailPause','faxPause','smsPause','openchannelPause','unknown','chatStatusTime','chatCapacity','mailStatus','mailStatusTime','mailCurrentCapacity','faxStatus','faxStatusTime','faxCapacity','faxCurrentCapacity','smsStatus','smsCapacity','smsCurrentCapacity','whatsappStatus','whatsappStatusTime','whatsappCapacity','whatsappCurrentCapacity','openchannelStatus','openchannelStatusTime','openchannelCapacity','openchannelCurrentCapacity','busy','busyQueue','chatWaitingInteractions','faxWaitingInteractions','mailWaitingInteractions','openchannelWaitingInteractions','smsWaitingInteractions','whatsappWaitingInteractions','updateRealtime','getChannelStatus','CurrentCapacity','Capacity','maxcapacity','working','idle','prototype','mail','chat','fax','sms','length','StatusTime','toNumber','format','chatCurrentCapacity','mailCapacity','smsStatusTime','stringify','emit','user:routing:update','omit','exports','lodash','md5','moment'];(function(_0x2ec4ff,_0x4c85c7){var _0x136e33=function(_0x181029){while(--_0x181029){_0x2ec4ff['push'](_0x2ec4ff['shift']());}};_0x136e33(++_0x4c85c7);}(_0xc6ac,0x15b));var _0xcc6a=function(_0x5a476e,_0x322cf0){_0x5a476e=_0x5a476e-0x0;var _0x28c19c=_0xc6ac[_0x5a476e];return _0x28c19c;};'use strict';var _=require(_0xcc6a('0x0'));var md5=require(_0xcc6a('0x1'));var moment=require(_0xcc6a('0x2'));var Redis=require(_0xcc6a('0x3'));var config=require(_0xcc6a('0x4'));config[_0xcc6a('0x5')]=_[_0xcc6a('0x6')](config[_0xcc6a('0x5')],{'host':_0xcc6a('0x7'),'port':0x18eb});var io=require(_0xcc6a('0x8'))(new Redis(config[_0xcc6a('0x5')]));function Agent(_0x188b05){this['id']=_0x188b05['id']||0x0;this[_0xcc6a('0x9')]=_0x188b05[_0xcc6a('0x9')]||'';this['online']=_0x188b05[_0xcc6a('0xa')]||!![];this[_0xcc6a('0xb')]=_0x188b05[_0xcc6a('0xb')]||![];this['chatPause']=_0x188b05[_0xcc6a('0xc')]||![];this[_0xcc6a('0xd')]=_0x188b05[_0xcc6a('0xd')]||![];this[_0xcc6a('0xe')]=_0x188b05[_0xcc6a('0xe')]||![];this['smsPause']=_0x188b05[_0xcc6a('0xf')]||![];this[_0xcc6a('0x10')]=_0x188b05[_0xcc6a('0x10')]||![];this['chatStatus']=_0xcc6a('0x11');this[_0xcc6a('0x12')]=0x0;this[_0xcc6a('0x13')]=_0x188b05['chatCapacity']||0x0;this['chatCurrentCapacity']=0x0;this[_0xcc6a('0x14')]=_0xcc6a('0x11');this[_0xcc6a('0x15')]=0x0;this['mailCapacity']=_0x188b05['mailCapacity']||0x0;this[_0xcc6a('0x16')]=0x0;this[_0xcc6a('0x17')]=_0xcc6a('0x11');this[_0xcc6a('0x18')]=0x0;this[_0xcc6a('0x19')]=_0x188b05[_0xcc6a('0x19')]||0x0;this[_0xcc6a('0x1a')]=0x0;this[_0xcc6a('0x1b')]='unknown';this['smsStatusTime']=0x0;this['smsCapacity']=_0x188b05[_0xcc6a('0x1c')]||0x0;this[_0xcc6a('0x1d')]=0x0;this[_0xcc6a('0x1e')]=_0xcc6a('0x11');this[_0xcc6a('0x1f')]=0x0;this[_0xcc6a('0x20')]=_0x188b05[_0xcc6a('0x20')]||0x0;this[_0xcc6a('0x21')]=0x0;this[_0xcc6a('0x22')]=_0xcc6a('0x11');this[_0xcc6a('0x23')]=0x0;this['openchannelCapacity']=_0x188b05[_0xcc6a('0x24')]||0x0;this[_0xcc6a('0x25')]=0x0;this[_0xcc6a('0x26')]=![];this[_0xcc6a('0x27')]=undefined;this[_0xcc6a('0x1')]='';this[_0xcc6a('0x28')]={};this[_0xcc6a('0x29')]={};this[_0xcc6a('0x2a')]={};this[_0xcc6a('0x2b')]={};this[_0xcc6a('0x2c')]={};this[_0xcc6a('0x2d')]={};this[_0xcc6a('0x2e')]();}Agent['prototype'][_0xcc6a('0x2f')]=function(_0x3a081e){if(this[_0x3a081e+_0xcc6a('0x30')]>0x0){if(this[_0x3a081e+'Capacity']>0x0&&this[_0x3a081e+_0xcc6a('0x30')]>=this[_0x3a081e+_0xcc6a('0x31')]){return _0xcc6a('0x32');}else{return _0xcc6a('0x33');}}else{return _0xcc6a('0x34');}};Agent[_0xcc6a('0x35')]['updateRealtime']=function(){var _0x26def8=[_0xcc6a('0x36'),_0xcc6a('0x37'),'openchannel',_0xcc6a('0x38'),_0xcc6a('0x39'),'whatsapp'];for(var _0xb377de=0x0;_0xb377de<_0x26def8[_0xcc6a('0x3a')];_0xb377de+=0x1){var _0x3233d1=this[_0xcc6a('0x2f')](_0x26def8[_0xb377de]);if(this[_0x26def8[_0xb377de]+'Status']!==_0x3233d1){this[_0x26def8[_0xb377de]+_0xcc6a('0x3b')]=_[_0xcc6a('0x3c')](moment()[_0xcc6a('0x3d')]('x'));}this[_0x26def8[_0xb377de]+'Status']=_0x3233d1;}var _0x2590a2={'id':this['id'],'name':this['name'],'online':this['online'],'voicePause':this[_0xcc6a('0xb')],'chatPause':this[_0xcc6a('0xc')],'mailPause':this[_0xcc6a('0xd')],'smsPause':this[_0xcc6a('0xf')],'faxPause':this[_0xcc6a('0xe')],'openchannelPause':this[_0xcc6a('0x10')],'chatStatus':this['chatStatus'],'chatStatusTime':this[_0xcc6a('0x12')],'chatCapacity':this[_0xcc6a('0x13')],'chatCurrentCapacity':this[_0xcc6a('0x3e')],'mailStatus':this[_0xcc6a('0x14')],'mailStatusTime':this[_0xcc6a('0x15')],'mailCapacity':this[_0xcc6a('0x3f')],'mailCurrentCapacity':this[_0xcc6a('0x16')],'faxStatus':this[_0xcc6a('0x17')],'faxStatusTime':this['faxStatusTime'],'faxCapacity':this[_0xcc6a('0x19')],'faxCurrentCapacity':this[_0xcc6a('0x1a')],'smsStatus':this[_0xcc6a('0x1b')],'smsStatusTime':this[_0xcc6a('0x40')],'smsCapacity':this[_0xcc6a('0x1c')],'smsCurrentCapacity':this[_0xcc6a('0x1d')],'whatsappStatus':this[_0xcc6a('0x1e')],'whatsappStatusTime':this['whatsappStatusTime'],'whatsappCapacity':this[_0xcc6a('0x20')],'whatsappCurrentCapacity':this['whatsappCurrentCapacity'],'openchannelStatus':this['openchannelStatus'],'openchannelStatusTime':this['openchannelStatusTime'],'openchannelCapacity':this[_0xcc6a('0x24')],'openchannelCurrentCapacity':this[_0xcc6a('0x25')],'busy':this[_0xcc6a('0x26')],'busyQueue':this[_0xcc6a('0x27')],'chatWaitingInteractions':this[_0xcc6a('0x28')],'faxWaitingInteractions':this['faxWaitingInteractions'],'mailWaitingInteractions':this['mailWaitingInteractions'],'openchannelWaitingInteractions':this[_0xcc6a('0x2b')],'smsWaitingInteractions':this[_0xcc6a('0x2c')],'whatsappWaitingInteractions':this[_0xcc6a('0x2d')]};var _0x538ea5=md5(JSON[_0xcc6a('0x41')](_0x2590a2));if(this[_0xcc6a('0x1')]!==_0x538ea5){this[_0xcc6a('0x1')]=_0x538ea5;io[_0xcc6a('0x42')](_0xcc6a('0x43'),_[_0xcc6a('0x44')](_0x2590a2,[_0xcc6a('0xa')]));}};module[_0xcc6a('0x45')]=Agent;
\ No newline at end of file
index 048e705..06ef449 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbc0d=['stringify','format','chat:queue:%s','chat_queue:save','exports','lodash','ioredis','defaults','redis','localhost','socket.io-emitter','name','timeout','strategy','beepall','Agents','mapAgentsId','md5','updateRouting','updateRealtime','prototype','_rr','map','loggedIn','paused','length','online','available','waiting'];(function(_0x4b2251,_0x393f10){var _0x5d22fb=function(_0x10992c){while(--_0x10992c){_0x4b2251['push'](_0x4b2251['shift']());}};_0x5d22fb(++_0x393f10);}(_0xbc0d,0x1f2));var _0xdbc0=function(_0x2b152a,_0x3dd988){_0x2b152a=_0x2b152a-0x0;var _0x2ad4c7=_0xbc0d[_0x2b152a];return _0x2ad4c7;};'use strict';var _=require(_0xdbc0('0x0'));var md5=require('md5');var util=require('util');var Redis=require(_0xdbc0('0x1'));var config=require('../../../config/environment');config['redis']=_[_0xdbc0('0x2')](config[_0xdbc0('0x3')],{'host':_0xdbc0('0x4'),'port':0x18eb});var io=require(_0xdbc0('0x5'))(new Redis(config[_0xdbc0('0x3')]));function ChatQueue(_0x588e91){this['id']=_0x588e91['id']||0x0;this[_0xdbc0('0x6')]=_0x588e91[_0xdbc0('0x6')]||'';this['timeout']=_0x588e91[_0xdbc0('0x7')]||0xa;this[_0xdbc0('0x8')]=_0x588e91[_0xdbc0('0x8')]||_0xdbc0('0x9');this[_0xdbc0('0xa')]=_0x588e91['Agents'];this[_0xdbc0('0xb')]={};this['waiting']=0x0;this[_0xdbc0('0xc')]='';this[_0xdbc0('0xd')]();this[_0xdbc0('0xe')]();}ChatQueue[_0xdbc0('0xf')][_0xdbc0('0xd')]=function(){var _0x58c800=this['mapAgentsId'][_0xdbc0('0x10')];this[_0xdbc0('0xb')]=_[_0xdbc0('0x11')](this['Agents'],'id');this[_0xdbc0('0xb')][_0xdbc0('0x10')]=_0x58c800;};ChatQueue[_0xdbc0('0xf')][_0xdbc0('0xe')]=function(){this[_0xdbc0('0x12')]=0x0;this[_0xdbc0('0x13')]=0x0;for(var _0x3db50c=0x0;_0x3db50c<this[_0xdbc0('0xa')][_0xdbc0('0x14')];_0x3db50c+=0x1){if(this[_0xdbc0('0xa')][_0x3db50c][_0xdbc0('0x15')]){this[_0xdbc0('0x12')]+=0x1;}if(this[_0xdbc0('0xa')][_0x3db50c]['chatPause']){this['paused']+=0x1;}}this['available']=this['loggedIn']-this[_0xdbc0('0x13')];this[_0xdbc0('0x16')]=this[_0xdbc0('0x16')]>=0x0?this['available']:0x0;var _0x3630c4={'id':this['id'],'available':this[_0xdbc0('0x16')],'loggedIn':this[_0xdbc0('0x12')],'name':this[_0xdbc0('0x6')],'paused':this[_0xdbc0('0x13')],'waiting':this[_0xdbc0('0x17')]};var _0x4df616=md5(JSON[_0xdbc0('0x18')](_0x3630c4));if(this['md5']!==_0x4df616){this['md5']=_0x4df616;io['to'](util[_0xdbc0('0x19')](_0xdbc0('0x1a'),_0x3630c4[_0xdbc0('0x6')]))['emit'](_0xdbc0('0x1b'),_0x3630c4);}};module[_0xdbc0('0x1c')]=ChatQueue;
\ No newline at end of file
+var _0x5ce6=['strategy','beepall','Agents','mapAgentsId','waiting','updateRealtime','updateRouting','_rr','map','prototype','loggedIn','paused','length','online','chatPause','available','format','chat:queue:%s','emit','chat_queue:save','exports','lodash','md5','util','ioredis','../../../config/environment','redis','localhost','socket.io-emitter','name','timeout'];(function(_0x34ad72,_0x1e43f6){var _0x5c9aa8=function(_0x144388){while(--_0x144388){_0x34ad72['push'](_0x34ad72['shift']());}};_0x5c9aa8(++_0x1e43f6);}(_0x5ce6,0x91));var _0x65ce=function(_0x11b24f,_0x39a7e3){_0x11b24f=_0x11b24f-0x0;var _0x1b4798=_0x5ce6[_0x11b24f];return _0x1b4798;};'use strict';var _=require(_0x65ce('0x0'));var md5=require(_0x65ce('0x1'));var util=require(_0x65ce('0x2'));var Redis=require(_0x65ce('0x3'));var config=require(_0x65ce('0x4'));config[_0x65ce('0x5')]=_['defaults'](config[_0x65ce('0x5')],{'host':_0x65ce('0x6'),'port':0x18eb});var io=require(_0x65ce('0x7'))(new Redis(config['redis']));function ChatQueue(_0xe7a32b){this['id']=_0xe7a32b['id']||0x0;this[_0x65ce('0x8')]=_0xe7a32b[_0x65ce('0x8')]||'';this[_0x65ce('0x9')]=_0xe7a32b[_0x65ce('0x9')]||0xa;this[_0x65ce('0xa')]=_0xe7a32b['strategy']||_0x65ce('0xb');this[_0x65ce('0xc')]=_0xe7a32b[_0x65ce('0xc')];this[_0x65ce('0xd')]={};this[_0x65ce('0xe')]=0x0;this['md5']='';this['updateRouting']();this[_0x65ce('0xf')]();}ChatQueue['prototype'][_0x65ce('0x10')]=function(){var _0x5620de=this['mapAgentsId'][_0x65ce('0x11')];this[_0x65ce('0xd')]=_[_0x65ce('0x12')](this['Agents'],'id');this[_0x65ce('0xd')]['_rr']=_0x5620de;};ChatQueue[_0x65ce('0x13')][_0x65ce('0xf')]=function(){this[_0x65ce('0x14')]=0x0;this[_0x65ce('0x15')]=0x0;for(var _0x5abf73=0x0;_0x5abf73<this[_0x65ce('0xc')][_0x65ce('0x16')];_0x5abf73+=0x1){if(this[_0x65ce('0xc')][_0x5abf73][_0x65ce('0x17')]){this['loggedIn']+=0x1;}if(this[_0x65ce('0xc')][_0x5abf73][_0x65ce('0x18')]){this[_0x65ce('0x15')]+=0x1;}}this[_0x65ce('0x19')]=this[_0x65ce('0x14')]-this[_0x65ce('0x15')];this[_0x65ce('0x19')]=this['available']>=0x0?this[_0x65ce('0x19')]:0x0;var _0x461392={'id':this['id'],'available':this[_0x65ce('0x19')],'loggedIn':this[_0x65ce('0x14')],'name':this[_0x65ce('0x8')],'paused':this[_0x65ce('0x15')],'waiting':this['waiting']};var _0x47d512=md5(JSON['stringify'](_0x461392));if(this[_0x65ce('0x1')]!==_0x47d512){this[_0x65ce('0x1')]=_0x47d512;io['to'](util[_0x65ce('0x1a')](_0x65ce('0x1b'),_0x461392[_0x65ce('0x8')]))[_0x65ce('0x1c')](_0x65ce('0x1d'),_0x461392);}};module[_0x65ce('0x1e')]=ChatQueue;
\ No newline at end of file
index 5f212d5..850cd98 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2384=['beepall','Agents','mapAgentsId','waiting','md5','updateRealtime','prototype','updateRouting','_rr','map','loggedIn','paused','length','online','faxPause','available','stringify','format','fax:queue:%s','emit','fax_queue:save','exports','lodash','util','../../../config/environment','defaults','redis','socket.io-emitter','name','timeout','strategy'];(function(_0x4565bf,_0x5ad9d6){var _0x5610ba=function(_0x170988){while(--_0x170988){_0x4565bf['push'](_0x4565bf['shift']());}};_0x5610ba(++_0x5ad9d6);}(_0x2384,0x18a));var _0x4238=function(_0x14f39a,_0x1fb54d){_0x14f39a=_0x14f39a-0x0;var _0x45cd18=_0x2384[_0x14f39a];return _0x45cd18;};'use strict';var _=require(_0x4238('0x0'));var md5=require('md5');var util=require(_0x4238('0x1'));var Redis=require('ioredis');var config=require(_0x4238('0x2'));config['redis']=_[_0x4238('0x3')](config[_0x4238('0x4')],{'host':'localhost','port':0x18eb});var io=require(_0x4238('0x5'))(new Redis(config[_0x4238('0x4')]));function FaxQueue(_0x40944a){this['id']=_0x40944a['id']||0x0;this[_0x4238('0x6')]=_0x40944a[_0x4238('0x6')]||'';this[_0x4238('0x7')]=_0x40944a[_0x4238('0x7')]||0xa;this[_0x4238('0x8')]=_0x40944a[_0x4238('0x8')]||_0x4238('0x9');this[_0x4238('0xa')]=_0x40944a['Agents'];this[_0x4238('0xb')]={};this[_0x4238('0xc')]=0x0;this[_0x4238('0xd')]='';this['updateRouting']();this[_0x4238('0xe')]();}FaxQueue[_0x4238('0xf')][_0x4238('0x10')]=function(){var _0x221f88=this[_0x4238('0xb')][_0x4238('0x11')];this[_0x4238('0xb')]=_[_0x4238('0x12')](this[_0x4238('0xa')],'id');this[_0x4238('0xb')][_0x4238('0x11')]=_0x221f88;};FaxQueue[_0x4238('0xf')][_0x4238('0xe')]=function(){this[_0x4238('0x13')]=0x0;this[_0x4238('0x14')]=0x0;for(var _0x31f508=0x0;_0x31f508<this[_0x4238('0xa')][_0x4238('0x15')];_0x31f508+=0x1){if(this['Agents'][_0x31f508][_0x4238('0x16')]){this['loggedIn']+=0x1;}if(this[_0x4238('0xa')][_0x31f508][_0x4238('0x17')]){this[_0x4238('0x14')]+=0x1;}}this[_0x4238('0x18')]=this[_0x4238('0x13')]-this[_0x4238('0x14')];this[_0x4238('0x18')]=this[_0x4238('0x18')]>=0x0?this[_0x4238('0x18')]:0x0;var _0x225297={'id':this['id'],'available':this[_0x4238('0x18')],'loggedIn':this[_0x4238('0x13')],'name':this[_0x4238('0x6')],'paused':this['paused'],'waiting':this[_0x4238('0xc')]};var _0xbcc28f=md5(JSON[_0x4238('0x19')](_0x225297));if(this[_0x4238('0xd')]!==_0xbcc28f){this['md5']=_0xbcc28f;io['to'](util[_0x4238('0x1a')](_0x4238('0x1b'),_0x225297[_0x4238('0x6')]))[_0x4238('0x1c')](_0x4238('0x1d'),_0x225297);}};module[_0x4238('0x1e')]=FaxQueue;
\ No newline at end of file
+var _0xf9ba=['timeout','strategy','beepall','Agents','mapAgentsId','waiting','updateRealtime','prototype','updateRouting','_rr','map','loggedIn','paused','length','online','faxPause','available','stringify','format','fax:queue:%s','emit','exports','lodash','md5','util','../../../config/environment','redis','defaults','localhost','socket.io-emitter','name'];(function(_0x122ef9,_0x451d2a){var _0x42fba0=function(_0x17c9d3){while(--_0x17c9d3){_0x122ef9['push'](_0x122ef9['shift']());}};_0x42fba0(++_0x451d2a);}(_0xf9ba,0xd0));var _0xaf9b=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xf9ba[_0x3dd15e];return _0x231fd0;};'use strict';var _=require(_0xaf9b('0x0'));var md5=require(_0xaf9b('0x1'));var util=require(_0xaf9b('0x2'));var Redis=require('ioredis');var config=require(_0xaf9b('0x3'));config[_0xaf9b('0x4')]=_[_0xaf9b('0x5')](config[_0xaf9b('0x4')],{'host':_0xaf9b('0x6'),'port':0x18eb});var io=require(_0xaf9b('0x7'))(new Redis(config['redis']));function FaxQueue(_0x40f886){this['id']=_0x40f886['id']||0x0;this['name']=_0x40f886[_0xaf9b('0x8')]||'';this[_0xaf9b('0x9')]=_0x40f886[_0xaf9b('0x9')]||0xa;this['strategy']=_0x40f886[_0xaf9b('0xa')]||_0xaf9b('0xb');this['Agents']=_0x40f886[_0xaf9b('0xc')];this[_0xaf9b('0xd')]={};this[_0xaf9b('0xe')]=0x0;this[_0xaf9b('0x1')]='';this['updateRouting']();this[_0xaf9b('0xf')]();}FaxQueue[_0xaf9b('0x10')][_0xaf9b('0x11')]=function(){var _0x187592=this[_0xaf9b('0xd')][_0xaf9b('0x12')];this[_0xaf9b('0xd')]=_[_0xaf9b('0x13')](this['Agents'],'id');this[_0xaf9b('0xd')]['_rr']=_0x187592;};FaxQueue['prototype'][_0xaf9b('0xf')]=function(){this[_0xaf9b('0x14')]=0x0;this[_0xaf9b('0x15')]=0x0;for(var _0x3bb1d5=0x0;_0x3bb1d5<this['Agents'][_0xaf9b('0x16')];_0x3bb1d5+=0x1){if(this[_0xaf9b('0xc')][_0x3bb1d5][_0xaf9b('0x17')]){this[_0xaf9b('0x14')]+=0x1;}if(this['Agents'][_0x3bb1d5][_0xaf9b('0x18')]){this[_0xaf9b('0x15')]+=0x1;}}this['available']=this[_0xaf9b('0x14')]-this['paused'];this[_0xaf9b('0x19')]=this[_0xaf9b('0x19')]>=0x0?this[_0xaf9b('0x19')]:0x0;var _0x5172fa={'id':this['id'],'available':this[_0xaf9b('0x19')],'loggedIn':this[_0xaf9b('0x14')],'name':this[_0xaf9b('0x8')],'paused':this[_0xaf9b('0x15')],'waiting':this[_0xaf9b('0xe')]};var _0x3024ef=md5(JSON[_0xaf9b('0x1a')](_0x5172fa));if(this[_0xaf9b('0x1')]!==_0x3024ef){this['md5']=_0x3024ef;io['to'](util[_0xaf9b('0x1b')](_0xaf9b('0x1c'),_0x5172fa[_0xaf9b('0x8')]))[_0xaf9b('0x1d')]('fax_queue:save',_0x5172fa);}};module[_0xaf9b('0x1e')]=FaxQueue;
\ No newline at end of file
index 575a54e..aa1a62c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb9c9=['exports','name','Intervals'];(function(_0x22f8ab,_0x15d8ff){var _0x2a70e5=function(_0x5e6895){while(--_0x5e6895){_0x22f8ab['push'](_0x22f8ab['shift']());}};_0x2a70e5(++_0x15d8ff);}(_0xb9c9,0x1a8));var _0x9b9c=function(_0x57f8fb,_0x5ddc02){_0x57f8fb=_0x57f8fb-0x0;var _0xe8cfee=_0xb9c9[_0x57f8fb];return _0xe8cfee;};'use strict';function Interval(_0xb334c3){this['id']=_0xb334c3['id']||0x0;this[_0x9b9c('0x0')]=_0xb334c3[_0x9b9c('0x0')]||'';this[_0x9b9c('0x1')]=_0xb334c3['Intervals']||{};}module[_0x9b9c('0x2')]=Interval;
\ No newline at end of file
+var _0x01fc=['name','Intervals'];(function(_0x5e4385,_0x5b5c02){var _0x1d163d=function(_0x5b45ee){while(--_0x5b45ee){_0x5e4385['push'](_0x5e4385['shift']());}};_0x1d163d(++_0x5b5c02);}(_0x01fc,0x146));var _0xc01f=function(_0x574f64,_0x48a509){_0x574f64=_0x574f64-0x0;var _0x26dedb=_0x01fc[_0x574f64];return _0x26dedb;};'use strict';function Interval(_0x31dd9f){this['id']=_0x31dd9f['id']||0x0;this[_0xc01f('0x0')]=_0x31dd9f['name']||'';this[_0xc01f('0x1')]=_0x31dd9f[_0xc01f('0x1')]||{};}module['exports']=Interval;
\ No newline at end of file
index e88d4f7..43e6f95 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc8d6=['length','online','mailPause','available','stringify','mail:queue:%s','emit','mail_queue:save','md5','util','ioredis','defaults','redis','localhost','socket.io-emitter','name','timeout','strategy','Agents','waiting','updateRouting','updateRealtime','prototype','_rr','mapAgentsId','map','loggedIn','paused'];(function(_0x27604f,_0x5ae336){var _0x40d189=function(_0xebacde){while(--_0xebacde){_0x27604f['push'](_0x27604f['shift']());}};_0x40d189(++_0x5ae336);}(_0xc8d6,0x120));var _0x6c8d=function(_0x2207fc,_0x424044){_0x2207fc=_0x2207fc-0x0;var _0x3d7025=_0xc8d6[_0x2207fc];return _0x3d7025;};'use strict';var _=require('lodash');var md5=require(_0x6c8d('0x0'));var util=require(_0x6c8d('0x1'));var Redis=require(_0x6c8d('0x2'));var config=require('../../../config/environment');config['redis']=_[_0x6c8d('0x3')](config[_0x6c8d('0x4')],{'host':_0x6c8d('0x5'),'port':0x18eb});var io=require(_0x6c8d('0x6'))(new Redis(config['redis']));function MailQueue(_0x210dbe){this['id']=_0x210dbe['id']||0x0;this['name']=_0x210dbe[_0x6c8d('0x7')]||'';this[_0x6c8d('0x8')]=_0x210dbe['timeout']||0xa;this[_0x6c8d('0x9')]=_0x210dbe[_0x6c8d('0x9')]||'beepall';this['Agents']=_0x210dbe[_0x6c8d('0xa')];this['mapAgentsId']={};this[_0x6c8d('0xb')]=0x0;this[_0x6c8d('0x0')]='';this[_0x6c8d('0xc')]();this[_0x6c8d('0xd')]();}MailQueue[_0x6c8d('0xe')][_0x6c8d('0xc')]=function(){var _0x1ad5bb=this['mapAgentsId'][_0x6c8d('0xf')];this[_0x6c8d('0x10')]=_[_0x6c8d('0x11')](this[_0x6c8d('0xa')],'id');this[_0x6c8d('0x10')][_0x6c8d('0xf')]=_0x1ad5bb;};MailQueue[_0x6c8d('0xe')][_0x6c8d('0xd')]=function(){this[_0x6c8d('0x12')]=0x0;this[_0x6c8d('0x13')]=0x0;for(var _0x59cc3a=0x0;_0x59cc3a<this[_0x6c8d('0xa')][_0x6c8d('0x14')];_0x59cc3a+=0x1){if(this['Agents'][_0x59cc3a][_0x6c8d('0x15')]){this[_0x6c8d('0x12')]+=0x1;}if(this['Agents'][_0x59cc3a][_0x6c8d('0x16')]){this['paused']+=0x1;}}this[_0x6c8d('0x17')]=this[_0x6c8d('0x12')]-this[_0x6c8d('0x13')];this['available']=this[_0x6c8d('0x17')]>=0x0?this[_0x6c8d('0x17')]:0x0;var _0x569160={'id':this['id'],'available':this[_0x6c8d('0x17')],'loggedIn':this['loggedIn'],'name':this[_0x6c8d('0x7')],'paused':this['paused'],'waiting':this['waiting']};var _0x3bd9b2=md5(JSON[_0x6c8d('0x18')](_0x569160));if(this[_0x6c8d('0x0')]!==_0x3bd9b2){this['md5']=_0x3bd9b2;io['to'](util['format'](_0x6c8d('0x19'),_0x569160[_0x6c8d('0x7')]))[_0x6c8d('0x1a')](_0x6c8d('0x1b'),_0x569160);}};module['exports']=MailQueue;
\ No newline at end of file
+var _0xef7a=['Agents','waiting','updateRouting','updateRealtime','prototype','mapAgentsId','_rr','map','loggedIn','paused','length','mailPause','available','stringify','format','mail:queue:%s','exports','lodash','md5','ioredis','../../../config/environment','redis','defaults','localhost','socket.io-emitter','name','timeout','strategy','beepall'];(function(_0x29b609,_0x19d388){var _0x54c952=function(_0xb3c38d){while(--_0xb3c38d){_0x29b609['push'](_0x29b609['shift']());}};_0x54c952(++_0x19d388);}(_0xef7a,0x133));var _0xaef7=function(_0xe4f1c0,_0x17dae3){_0xe4f1c0=_0xe4f1c0-0x0;var _0x16e788=_0xef7a[_0xe4f1c0];return _0x16e788;};'use strict';var _=require(_0xaef7('0x0'));var md5=require(_0xaef7('0x1'));var util=require('util');var Redis=require(_0xaef7('0x2'));var config=require(_0xaef7('0x3'));config[_0xaef7('0x4')]=_[_0xaef7('0x5')](config[_0xaef7('0x4')],{'host':_0xaef7('0x6'),'port':0x18eb});var io=require(_0xaef7('0x7'))(new Redis(config[_0xaef7('0x4')]));function MailQueue(_0x56f0ac){this['id']=_0x56f0ac['id']||0x0;this[_0xaef7('0x8')]=_0x56f0ac[_0xaef7('0x8')]||'';this[_0xaef7('0x9')]=_0x56f0ac[_0xaef7('0x9')]||0xa;this[_0xaef7('0xa')]=_0x56f0ac['strategy']||_0xaef7('0xb');this['Agents']=_0x56f0ac[_0xaef7('0xc')];this['mapAgentsId']={};this[_0xaef7('0xd')]=0x0;this[_0xaef7('0x1')]='';this[_0xaef7('0xe')]();this[_0xaef7('0xf')]();}MailQueue[_0xaef7('0x10')][_0xaef7('0xe')]=function(){var _0x345e7e=this[_0xaef7('0x11')][_0xaef7('0x12')];this[_0xaef7('0x11')]=_[_0xaef7('0x13')](this[_0xaef7('0xc')],'id');this[_0xaef7('0x11')][_0xaef7('0x12')]=_0x345e7e;};MailQueue[_0xaef7('0x10')][_0xaef7('0xf')]=function(){this[_0xaef7('0x14')]=0x0;this[_0xaef7('0x15')]=0x0;for(var _0x35b9f1=0x0;_0x35b9f1<this[_0xaef7('0xc')][_0xaef7('0x16')];_0x35b9f1+=0x1){if(this[_0xaef7('0xc')][_0x35b9f1]['online']){this['loggedIn']+=0x1;}if(this['Agents'][_0x35b9f1][_0xaef7('0x17')]){this[_0xaef7('0x15')]+=0x1;}}this[_0xaef7('0x18')]=this['loggedIn']-this[_0xaef7('0x15')];this[_0xaef7('0x18')]=this[_0xaef7('0x18')]>=0x0?this[_0xaef7('0x18')]:0x0;var _0x49c649={'id':this['id'],'available':this[_0xaef7('0x18')],'loggedIn':this[_0xaef7('0x14')],'name':this[_0xaef7('0x8')],'paused':this[_0xaef7('0x15')],'waiting':this[_0xaef7('0xd')]};var _0x25a3d2=md5(JSON[_0xaef7('0x19')](_0x49c649));if(this[_0xaef7('0x1')]!==_0x25a3d2){this[_0xaef7('0x1')]=_0x25a3d2;io['to'](util[_0xaef7('0x1a')](_0xaef7('0x1b'),_0x49c649[_0xaef7('0x8')]))['emit']('mail_queue:save',_0x49c649);}};module[_0xaef7('0x1c')]=MailQueue;
\ No newline at end of file
index e1b5b6f..e009dab 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x326f=['exports','lodash','ioredis','../../../config/environment','redis','defaults','localhost','socket.io-emitter','name','timeout','strategy','mapAgentsId','waiting','md5','updateRouting','updateRealtime','Agents','prototype','loggedIn','paused','online','openchannelPause','available','stringify','openchannel:queue:%s','openchannel_queue:save'];(function(_0x173441,_0x26b0d9){var _0x2423a8=function(_0x4d96c2){while(--_0x4d96c2){_0x173441['push'](_0x173441['shift']());}};_0x2423a8(++_0x26b0d9);}(_0x326f,0xd1));var _0xf326=function(_0xd94687,_0x1a09b9){_0xd94687=_0xd94687-0x0;var _0x4d4b3b=_0x326f[_0xd94687];return _0x4d4b3b;};'use strict';var _=require(_0xf326('0x0'));var md5=require('md5');var util=require('util');var Redis=require(_0xf326('0x1'));var config=require(_0xf326('0x2'));config[_0xf326('0x3')]=_[_0xf326('0x4')](config[_0xf326('0x3')],{'host':_0xf326('0x5'),'port':0x18eb});var io=require(_0xf326('0x6'))(new Redis(config[_0xf326('0x3')]));function OpenchannelQueue(_0x1b5a56){this['id']=_0x1b5a56['id']||0x0;this[_0xf326('0x7')]=_0x1b5a56['name']||'';this[_0xf326('0x8')]=_0x1b5a56[_0xf326('0x8')]||0xa;this[_0xf326('0x9')]=_0x1b5a56[_0xf326('0x9')]||'beepall';this['Agents']=_0x1b5a56['Agents'];this[_0xf326('0xa')]={};this[_0xf326('0xb')]=0x0;this[_0xf326('0xc')]='';this[_0xf326('0xd')]();this[_0xf326('0xe')]();}OpenchannelQueue['prototype'][_0xf326('0xd')]=function(){var _0x53cbcd=this[_0xf326('0xa')]['_rr'];this[_0xf326('0xa')]=_['map'](this[_0xf326('0xf')],'id');this[_0xf326('0xa')]['_rr']=_0x53cbcd;};OpenchannelQueue[_0xf326('0x10')][_0xf326('0xe')]=function(){this[_0xf326('0x11')]=0x0;this[_0xf326('0x12')]=0x0;for(var _0x5c8483=0x0;_0x5c8483<this[_0xf326('0xf')]['length'];_0x5c8483+=0x1){if(this['Agents'][_0x5c8483][_0xf326('0x13')]){this[_0xf326('0x11')]+=0x1;}if(this[_0xf326('0xf')][_0x5c8483][_0xf326('0x14')]){this[_0xf326('0x12')]+=0x1;}}this[_0xf326('0x15')]=this[_0xf326('0x11')]-this[_0xf326('0x12')];this['available']=this[_0xf326('0x15')]>=0x0?this[_0xf326('0x15')]:0x0;var _0x18bee3={'id':this['id'],'available':this[_0xf326('0x15')],'loggedIn':this[_0xf326('0x11')],'name':this[_0xf326('0x7')],'paused':this['paused'],'waiting':this['waiting']};var _0x56ad41=md5(JSON[_0xf326('0x16')](_0x18bee3));if(this[_0xf326('0xc')]!==_0x56ad41){this['md5']=_0x56ad41;io['to'](util['format'](_0xf326('0x17'),_0x18bee3['name']))['emit'](_0xf326('0x18'),_0x18bee3);}};module[_0xf326('0x19')]=OpenchannelQueue;
\ No newline at end of file
+var _0x7a54=['exports','lodash','md5','util','../../../config/environment','redis','localhost','socket.io-emitter','name','timeout','strategy','beepall','waiting','updateRealtime','mapAgentsId','_rr','map','Agents','prototype','loggedIn','paused','length','openchannelPause','available','stringify','format','openchannel:queue:%s','emit','openchannel_queue:save'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0x7a54,0x106));var _0x47a5=function(_0x5abb53,_0x884440){_0x5abb53=_0x5abb53-0x0;var _0x2e2c8c=_0x7a54[_0x5abb53];return _0x2e2c8c;};'use strict';var _=require(_0x47a5('0x0'));var md5=require(_0x47a5('0x1'));var util=require(_0x47a5('0x2'));var Redis=require('ioredis');var config=require(_0x47a5('0x3'));config[_0x47a5('0x4')]=_['defaults'](config[_0x47a5('0x4')],{'host':_0x47a5('0x5'),'port':0x18eb});var io=require(_0x47a5('0x6'))(new Redis(config[_0x47a5('0x4')]));function OpenchannelQueue(_0xfdf934){this['id']=_0xfdf934['id']||0x0;this['name']=_0xfdf934[_0x47a5('0x7')]||'';this['timeout']=_0xfdf934[_0x47a5('0x8')]||0xa;this[_0x47a5('0x9')]=_0xfdf934['strategy']||_0x47a5('0xa');this['Agents']=_0xfdf934['Agents'];this['mapAgentsId']={};this[_0x47a5('0xb')]=0x0;this[_0x47a5('0x1')]='';this['updateRouting']();this[_0x47a5('0xc')]();}OpenchannelQueue['prototype']['updateRouting']=function(){var _0x1f47f4=this[_0x47a5('0xd')][_0x47a5('0xe')];this[_0x47a5('0xd')]=_[_0x47a5('0xf')](this[_0x47a5('0x10')],'id');this[_0x47a5('0xd')]['_rr']=_0x1f47f4;};OpenchannelQueue[_0x47a5('0x11')][_0x47a5('0xc')]=function(){this[_0x47a5('0x12')]=0x0;this[_0x47a5('0x13')]=0x0;for(var _0x139f25=0x0;_0x139f25<this[_0x47a5('0x10')][_0x47a5('0x14')];_0x139f25+=0x1){if(this[_0x47a5('0x10')][_0x139f25]['online']){this[_0x47a5('0x12')]+=0x1;}if(this[_0x47a5('0x10')][_0x139f25][_0x47a5('0x15')]){this[_0x47a5('0x13')]+=0x1;}}this[_0x47a5('0x16')]=this['loggedIn']-this['paused'];this[_0x47a5('0x16')]=this['available']>=0x0?this['available']:0x0;var _0x423a81={'id':this['id'],'available':this[_0x47a5('0x16')],'loggedIn':this[_0x47a5('0x12')],'name':this[_0x47a5('0x7')],'paused':this[_0x47a5('0x13')],'waiting':this[_0x47a5('0xb')]};var _0x2763d6=md5(JSON[_0x47a5('0x17')](_0x423a81));if(this[_0x47a5('0x1')]!==_0x2763d6){this['md5']=_0x2763d6;io['to'](util[_0x47a5('0x18')](_0x47a5('0x19'),_0x423a81['name']))[_0x47a5('0x1a')](_0x47a5('0x1b'),_0x423a81);}};module[_0x47a5('0x1c')]=OpenchannelQueue;
\ No newline at end of file
index fd1ee8d..a1cfde3 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7d86=['Agents','mapAgentsId','waiting','md5','updateRouting','updateRealtime','prototype','_rr','map','loggedIn','paused','length','online','available','stringify','format','emit','exports','lodash','util','ioredis','../../../config/environment','redis','defaults','localhost','name','timeout','strategy','beepall'];(function(_0x435fa1,_0x58550a){var _0x845f9f=function(_0x89867e){while(--_0x89867e){_0x435fa1['push'](_0x435fa1['shift']());}};_0x845f9f(++_0x58550a);}(_0x7d86,0x86));var _0x67d8=function(_0x4adf20,_0xe83351){_0x4adf20=_0x4adf20-0x0;var _0x4c8a9d=_0x7d86[_0x4adf20];return _0x4c8a9d;};'use strict';var _=require(_0x67d8('0x0'));var md5=require('md5');var util=require(_0x67d8('0x1'));var Redis=require(_0x67d8('0x2'));var config=require(_0x67d8('0x3'));config[_0x67d8('0x4')]=_[_0x67d8('0x5')](config[_0x67d8('0x4')],{'host':_0x67d8('0x6'),'port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0x67d8('0x4')]));function SmsQueue(_0x33de53){this['id']=_0x33de53['id']||0x0;this[_0x67d8('0x7')]=_0x33de53[_0x67d8('0x7')]||'';this[_0x67d8('0x8')]=_0x33de53[_0x67d8('0x8')]||0xa;this[_0x67d8('0x9')]=_0x33de53[_0x67d8('0x9')]||_0x67d8('0xa');this[_0x67d8('0xb')]=_0x33de53[_0x67d8('0xb')];this[_0x67d8('0xc')]={};this[_0x67d8('0xd')]=0x0;this[_0x67d8('0xe')]='';this[_0x67d8('0xf')]();this[_0x67d8('0x10')]();}SmsQueue[_0x67d8('0x11')][_0x67d8('0xf')]=function(){var _0x38107b=this[_0x67d8('0xc')][_0x67d8('0x12')];this['mapAgentsId']=_[_0x67d8('0x13')](this[_0x67d8('0xb')],'id');this[_0x67d8('0xc')]['_rr']=_0x38107b;};SmsQueue[_0x67d8('0x11')][_0x67d8('0x10')]=function(){this[_0x67d8('0x14')]=0x0;this[_0x67d8('0x15')]=0x0;for(var _0x2d54e6=0x0;_0x2d54e6<this[_0x67d8('0xb')][_0x67d8('0x16')];_0x2d54e6+=0x1){if(this['Agents'][_0x2d54e6][_0x67d8('0x17')]){this[_0x67d8('0x14')]+=0x1;}if(this[_0x67d8('0xb')][_0x2d54e6]['smsPause']){this[_0x67d8('0x15')]+=0x1;}}this[_0x67d8('0x18')]=this['loggedIn']-this[_0x67d8('0x15')];this[_0x67d8('0x18')]=this[_0x67d8('0x18')]>=0x0?this[_0x67d8('0x18')]:0x0;var _0x23328d={'id':this['id'],'available':this[_0x67d8('0x18')],'loggedIn':this['loggedIn'],'name':this[_0x67d8('0x7')],'paused':this[_0x67d8('0x15')],'waiting':this[_0x67d8('0xd')]};var _0x14a81f=md5(JSON[_0x67d8('0x19')](_0x23328d));if(this['md5']!==_0x14a81f){this[_0x67d8('0xe')]=_0x14a81f;io['to'](util[_0x67d8('0x1a')]('sms:queue:%s',_0x23328d['name']))[_0x67d8('0x1b')]('sms_queue:save',_0x23328d);}};module[_0x67d8('0x1c')]=SmsQueue;
\ No newline at end of file
+var _0x84ab=['format','sms:queue:%s','emit','lodash','md5','util','ioredis','../../../config/environment','defaults','redis','socket.io-emitter','timeout','strategy','beepall','Agents','waiting','updateRouting','mapAgentsId','_rr','map','prototype','updateRealtime','loggedIn','paused','length','online','smsPause','available','name','stringify'];(function(_0x1635fe,_0x5f1d9f){var _0x3c512a=function(_0x26b53d){while(--_0x26b53d){_0x1635fe['push'](_0x1635fe['shift']());}};_0x3c512a(++_0x5f1d9f);}(_0x84ab,0x12f));var _0xb84a=function(_0x1ccdf7,_0x215d5a){_0x1ccdf7=_0x1ccdf7-0x0;var _0x52a0ae=_0x84ab[_0x1ccdf7];return _0x52a0ae;};'use strict';var _=require(_0xb84a('0x0'));var md5=require(_0xb84a('0x1'));var util=require(_0xb84a('0x2'));var Redis=require(_0xb84a('0x3'));var config=require(_0xb84a('0x4'));config['redis']=_[_0xb84a('0x5')](config[_0xb84a('0x6')],{'host':'localhost','port':0x18eb});var io=require(_0xb84a('0x7'))(new Redis(config[_0xb84a('0x6')]));function SmsQueue(_0x28c83b){this['id']=_0x28c83b['id']||0x0;this['name']=_0x28c83b['name']||'';this['timeout']=_0x28c83b[_0xb84a('0x8')]||0xa;this['strategy']=_0x28c83b[_0xb84a('0x9')]||_0xb84a('0xa');this['Agents']=_0x28c83b[_0xb84a('0xb')];this['mapAgentsId']={};this[_0xb84a('0xc')]=0x0;this[_0xb84a('0x1')]='';this[_0xb84a('0xd')]();this['updateRealtime']();}SmsQueue['prototype']['updateRouting']=function(){var _0x1e0180=this[_0xb84a('0xe')][_0xb84a('0xf')];this[_0xb84a('0xe')]=_[_0xb84a('0x10')](this['Agents'],'id');this[_0xb84a('0xe')][_0xb84a('0xf')]=_0x1e0180;};SmsQueue[_0xb84a('0x11')][_0xb84a('0x12')]=function(){this[_0xb84a('0x13')]=0x0;this[_0xb84a('0x14')]=0x0;for(var _0x12ccab=0x0;_0x12ccab<this[_0xb84a('0xb')][_0xb84a('0x15')];_0x12ccab+=0x1){if(this[_0xb84a('0xb')][_0x12ccab][_0xb84a('0x16')]){this[_0xb84a('0x13')]+=0x1;}if(this['Agents'][_0x12ccab][_0xb84a('0x17')]){this[_0xb84a('0x14')]+=0x1;}}this[_0xb84a('0x18')]=this[_0xb84a('0x13')]-this[_0xb84a('0x14')];this[_0xb84a('0x18')]=this[_0xb84a('0x18')]>=0x0?this[_0xb84a('0x18')]:0x0;var _0x28fe46={'id':this['id'],'available':this[_0xb84a('0x18')],'loggedIn':this[_0xb84a('0x13')],'name':this[_0xb84a('0x19')],'paused':this[_0xb84a('0x14')],'waiting':this[_0xb84a('0xc')]};var _0x553f79=md5(JSON[_0xb84a('0x1a')](_0x28fe46));if(this[_0xb84a('0x1')]!==_0x553f79){this['md5']=_0x553f79;io['to'](util[_0xb84a('0x1b')](_0xb84a('0x1c'),_0x28fe46[_0xb84a('0x19')]))[_0xb84a('0x1d')]('sms_queue:save',_0x28fe46);}};module['exports']=SmsQueue;
\ No newline at end of file
index d0b4d83..ee78dea 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x70ca=['lodash','md5','ioredis','redis','localhost','socket.io-emitter','name','timeout','strategy','Agents','mapAgentsId','waiting','updateRouting','updateRealtime','prototype','_rr','map','paused','length','loggedIn','available','stringify','whatsapp:queue:%s','emit','whatsapp_queue:save'];(function(_0x27af45,_0x1b57aa){var _0x18df21=function(_0x4b7679){while(--_0x4b7679){_0x27af45['push'](_0x27af45['shift']());}};_0x18df21(++_0x1b57aa);}(_0x70ca,0x64));var _0xa70c=function(_0x459e80,_0x5185dc){_0x459e80=_0x459e80-0x0;var _0x231a6e=_0x70ca[_0x459e80];return _0x231a6e;};'use strict';var _=require(_0xa70c('0x0'));var md5=require(_0xa70c('0x1'));var util=require('util');var Redis=require(_0xa70c('0x2'));var config=require('../../../config/environment');config[_0xa70c('0x3')]=_['defaults'](config[_0xa70c('0x3')],{'host':_0xa70c('0x4'),'port':0x18eb});var io=require(_0xa70c('0x5'))(new Redis(config[_0xa70c('0x3')]));function WhatsappQueue(_0x411f9b){this['id']=_0x411f9b['id']||0x0;this[_0xa70c('0x6')]=_0x411f9b['name']||'';this['timeout']=_0x411f9b[_0xa70c('0x7')]||0xa;this[_0xa70c('0x8')]=_0x411f9b[_0xa70c('0x8')]||'beepall';this[_0xa70c('0x9')]=_0x411f9b['Agents'];this[_0xa70c('0xa')]={};this[_0xa70c('0xb')]=0x0;this[_0xa70c('0x1')]='';this[_0xa70c('0xc')]();this[_0xa70c('0xd')]();}WhatsappQueue[_0xa70c('0xe')][_0xa70c('0xc')]=function(){var _0x4e8a92=this[_0xa70c('0xa')][_0xa70c('0xf')];this[_0xa70c('0xa')]=_[_0xa70c('0x10')](this[_0xa70c('0x9')],'id');this[_0xa70c('0xa')][_0xa70c('0xf')]=_0x4e8a92;};WhatsappQueue[_0xa70c('0xe')]['updateRealtime']=function(){this['loggedIn']=0x0;this[_0xa70c('0x11')]=0x0;for(var _0x10ebb1=0x0;_0x10ebb1<this['Agents'][_0xa70c('0x12')];_0x10ebb1+=0x1){if(this[_0xa70c('0x9')][_0x10ebb1]['online']){this[_0xa70c('0x13')]+=0x1;}if(this[_0xa70c('0x9')][_0x10ebb1]['whatsappPause']){this['paused']+=0x1;}}this[_0xa70c('0x14')]=this[_0xa70c('0x13')]-this[_0xa70c('0x11')];this['available']=this['available']>=0x0?this['available']:0x0;var _0xf54ee2={'id':this['id'],'available':this[_0xa70c('0x14')],'loggedIn':this[_0xa70c('0x13')],'name':this[_0xa70c('0x6')],'paused':this[_0xa70c('0x11')],'waiting':this[_0xa70c('0xb')]};var _0x2539f6=md5(JSON[_0xa70c('0x15')](_0xf54ee2));if(this[_0xa70c('0x1')]!==_0x2539f6){this['md5']=_0x2539f6;io['to'](util['format'](_0xa70c('0x16'),_0xf54ee2[_0xa70c('0x6')]))[_0xa70c('0x17')](_0xa70c('0x18'),_0xf54ee2);}};module['exports']=WhatsappQueue;
\ No newline at end of file
+var _0x4316=['ioredis','../../../config/environment','redis','socket.io-emitter','name','timeout','strategy','beepall','Agents','mapAgentsId','updateRouting','prototype','_rr','map','loggedIn','paused','length','online','whatsappPause','available','stringify','format','emit','lodash','md5','util'];(function(_0xe63dc8,_0x2beca2){var _0x76b07c=function(_0x43b395){while(--_0x43b395){_0xe63dc8['push'](_0xe63dc8['shift']());}};_0x76b07c(++_0x2beca2);}(_0x4316,0x14f));var _0x6431=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0x4316[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0x6431('0x0'));var md5=require(_0x6431('0x1'));var util=require(_0x6431('0x2'));var Redis=require(_0x6431('0x3'));var config=require(_0x6431('0x4'));config[_0x6431('0x5')]=_['defaults'](config[_0x6431('0x5')],{'host':'localhost','port':0x18eb});var io=require(_0x6431('0x6'))(new Redis(config[_0x6431('0x5')]));function WhatsappQueue(_0x5686cc){this['id']=_0x5686cc['id']||0x0;this['name']=_0x5686cc[_0x6431('0x7')]||'';this[_0x6431('0x8')]=_0x5686cc[_0x6431('0x8')]||0xa;this['strategy']=_0x5686cc[_0x6431('0x9')]||_0x6431('0xa');this[_0x6431('0xb')]=_0x5686cc[_0x6431('0xb')];this[_0x6431('0xc')]={};this['waiting']=0x0;this[_0x6431('0x1')]='';this[_0x6431('0xd')]();this['updateRealtime']();}WhatsappQueue[_0x6431('0xe')][_0x6431('0xd')]=function(){var _0x23f5d4=this[_0x6431('0xc')][_0x6431('0xf')];this[_0x6431('0xc')]=_[_0x6431('0x10')](this[_0x6431('0xb')],'id');this[_0x6431('0xc')][_0x6431('0xf')]=_0x23f5d4;};WhatsappQueue[_0x6431('0xe')]['updateRealtime']=function(){this[_0x6431('0x11')]=0x0;this[_0x6431('0x12')]=0x0;for(var _0x5d867f=0x0;_0x5d867f<this[_0x6431('0xb')][_0x6431('0x13')];_0x5d867f+=0x1){if(this[_0x6431('0xb')][_0x5d867f][_0x6431('0x14')]){this[_0x6431('0x11')]+=0x1;}if(this[_0x6431('0xb')][_0x5d867f][_0x6431('0x15')]){this[_0x6431('0x12')]+=0x1;}}this['available']=this[_0x6431('0x11')]-this[_0x6431('0x12')];this[_0x6431('0x16')]=this[_0x6431('0x16')]>=0x0?this['available']:0x0;var _0x36cf46={'id':this['id'],'available':this[_0x6431('0x16')],'loggedIn':this['loggedIn'],'name':this[_0x6431('0x7')],'paused':this[_0x6431('0x12')],'waiting':this['waiting']};var _0x20f378=md5(JSON[_0x6431('0x17')](_0x36cf46));if(this[_0x6431('0x1')]!==_0x20f378){this['md5']=_0x20f378;io['to'](util[_0x6431('0x18')]('whatsapp:queue:%s',_0x36cf46[_0x6431('0x7')]))[_0x6431('0x19')]('whatsapp_queue:save',_0x36cf46);}};module['exports']=WhatsappQueue;
\ No newline at end of file
index 6fe15c8..9f4a449 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['isUndefined','initIntervals','updateRealtime','updateRouting','initSmsQueues','smsQueues','initMailQueues','mailQueues','initWhatsappQueues','whatsappQueues','exports','bluebird','util','lodash','../model/interval','../model/chatQueue','../model/smsQueue','../model/mailQueue','../model/faxQueue','../model/whatsappQueue','intervals','openchannelQueues','chatQueues','faxQueues','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','hasOwnProperty','prototype','mergeFromDatabase','initAgents','agents','length'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa9e0,0x123));var _0x0a9e=function(_0x5e3b04,_0xbb6795){_0x5e3b04=_0x5e3b04-0x0;var _0x1fc44d=_0xa9e0[_0x5e3b04];return _0x1fc44d;};'use strict';var BPromise=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var _=require(_0x0a9e('0x2'));var moment=require('moment');var Agent=require('../model/agent');var Interval=require(_0x0a9e('0x3'));var OpenchannelQueue=require('../model/openchannelQueue');var ChatQueue=require(_0x0a9e('0x4'));var SmsQueue=require(_0x0a9e('0x5'));var MailQueue=require(_0x0a9e('0x6'));var FaxQueue=require(_0x0a9e('0x7'));var WhatsappQueue=require(_0x0a9e('0x8'));var Realtime=function(){this['agents']={};this[_0x0a9e('0x9')]={};this[_0x0a9e('0xa')]={};this[_0x0a9e('0xb')]={};this['smsQueues']={};this['mailQueues']={};this[_0x0a9e('0xc')]={};this['whatsappQueues']={};this['chatQueuesWaitingInteractions']={};this[_0x0a9e('0xd')]={};this[_0x0a9e('0xe')]={};this[_0x0a9e('0xf')]={};this[_0x0a9e('0x10')]={};this[_0x0a9e('0x11')]={};};function freeIsNotKey(_0xbd1168,_0x4a4c56,_0x50dfb2){var _0x527cdd=_['mapKeys'](_0xbd1168,function(_0x273d4d,_0x36471c){return _0x273d4d[_0x50dfb2];});for(var _0xd5b662 in _0x4a4c56){if(_0x4a4c56[_0x0a9e('0x12')](_0xd5b662)){if(!_0x527cdd[_0xd5b662]){delete _0x4a4c56[_0xd5b662];}}}}Realtime[_0x0a9e('0x13')][_0x0a9e('0x14')]=function(_0x5db4b0,_0x4283ce){for(var _0x239b12 in _0x4283ce){if(_0x5db4b0[_0x0a9e('0x12')](_0x239b12)){_0x5db4b0[_0x239b12]=_0x4283ce[_0x239b12];}}};Realtime[_0x0a9e('0x13')][_0x0a9e('0x15')]=function(){var _0x4d5611=this;return function(_0x52a03d){if(_0x52a03d){freeIsNotKey(_0x52a03d,_0x4d5611[_0x0a9e('0x16')],'id');for(var _0x5d0880=0x0,_0x1985b6={},_0x519dfd={};_0x5d0880<_0x52a03d[_0x0a9e('0x17')];_0x5d0880+=0x1){_0x1985b6=_0x52a03d[_0x5d0880];if(_[_0x0a9e('0x18')](_0x4d5611['agents'][_0x1985b6['id']])){_0x4d5611[_0x0a9e('0x16')][_0x1985b6['id']]=new Agent(_0x1985b6);}else{_0x4d5611['mergeFromDatabase'](_0x4d5611[_0x0a9e('0x16')][_0x1985b6['id']],_0x1985b6);}}}return _0x4d5611[_0x0a9e('0x16')];};};Realtime[_0x0a9e('0x13')][_0x0a9e('0x19')]=function(){var _0x31b1ca=this;return function(_0x2eb11f){if(_0x2eb11f){freeIsNotKey(_0x2eb11f,_0x31b1ca[_0x0a9e('0x9')],'id');for(var _0x20559e=0x0,_0x1314ae={},_0x112016={};_0x20559e<_0x2eb11f[_0x0a9e('0x17')];_0x20559e+=0x1){_0x1314ae=_0x2eb11f[_0x20559e];if(_[_0x0a9e('0x18')](_0x31b1ca['intervals'][_0x1314ae['id']])){_0x31b1ca[_0x0a9e('0x9')][_0x1314ae['id']]=new Interval(_0x1314ae);}else{_0x31b1ca[_0x0a9e('0x14')](_0x31b1ca['intervals'][_0x1314ae['id']],_0x1314ae);}}}return _0x31b1ca[_0x0a9e('0x9')];};};Realtime['prototype']['initOpenchannelQueues']=function(){var _0x3a02e1=this;return function(_0x432e56){if(_0x432e56){freeIsNotKey(_0x432e56,_0x3a02e1[_0x0a9e('0xa')],'id');for(var _0x30bae6=0x0,_0x4abc77={},_0xfb6e48={};_0x30bae6<_0x432e56[_0x0a9e('0x17')];_0x30bae6+=0x1){_0x4abc77=_0x432e56[_0x30bae6];if(_[_0x0a9e('0x18')](_0x3a02e1[_0x0a9e('0xa')][_0x4abc77['id']])){_0x3a02e1[_0x0a9e('0xa')][_0x4abc77['id']]=new OpenchannelQueue(_0x4abc77);}else{_0x3a02e1[_0x0a9e('0x14')](_0x3a02e1[_0x0a9e('0xa')][_0x4abc77['id']],_0x4abc77);}_0x3a02e1['openchannelQueues'][_0x4abc77['id']]['updateRouting']();_0x3a02e1[_0x0a9e('0xa')][_0x4abc77['id']][_0x0a9e('0x1a')]();}}return _0x3a02e1[_0x0a9e('0xa')];};};Realtime[_0x0a9e('0x13')]['initChatQueues']=function(){var _0x384319=this;return function(_0x479bc4){if(_0x479bc4){freeIsNotKey(_0x479bc4,_0x384319[_0x0a9e('0xb')],'id');for(var _0x5bfb33=0x0,_0x1dc186={},_0x34dc65={};_0x5bfb33<_0x479bc4[_0x0a9e('0x17')];_0x5bfb33+=0x1){_0x1dc186=_0x479bc4[_0x5bfb33];if(_[_0x0a9e('0x18')](_0x384319[_0x0a9e('0xb')][_0x1dc186['id']])){_0x384319[_0x0a9e('0xb')][_0x1dc186['id']]=new ChatQueue(_0x1dc186);}else{_0x384319[_0x0a9e('0x14')](_0x384319[_0x0a9e('0xb')][_0x1dc186['id']],_0x1dc186);}_0x384319['chatQueues'][_0x1dc186['id']][_0x0a9e('0x1b')]();_0x384319[_0x0a9e('0xb')][_0x1dc186['id']][_0x0a9e('0x1a')]();}}return _0x384319[_0x0a9e('0xb')];};};Realtime['prototype'][_0x0a9e('0x1c')]=function(){var _0x40e7a3=this;return function(_0x1843b2){if(_0x1843b2){freeIsNotKey(_0x1843b2,_0x40e7a3[_0x0a9e('0x1d')],'id');for(var _0x58b06f=0x0,_0x563b45={},_0x296f41={};_0x58b06f<_0x1843b2[_0x0a9e('0x17')];_0x58b06f+=0x1){_0x563b45=_0x1843b2[_0x58b06f];if(_[_0x0a9e('0x18')](_0x40e7a3['smsQueues'][_0x563b45['id']])){_0x40e7a3[_0x0a9e('0x1d')][_0x563b45['id']]=new SmsQueue(_0x563b45);}else{_0x40e7a3['mergeFromDatabase'](_0x40e7a3[_0x0a9e('0x1d')][_0x563b45['id']],_0x563b45);}_0x40e7a3[_0x0a9e('0x1d')][_0x563b45['id']][_0x0a9e('0x1b')]();_0x40e7a3[_0x0a9e('0x1d')][_0x563b45['id']][_0x0a9e('0x1a')]();}}return _0x40e7a3['smsQueues'];};};Realtime[_0x0a9e('0x13')][_0x0a9e('0x1e')]=function(){var _0x40cb85=this;return function(_0x2da5c0){if(_0x2da5c0){freeIsNotKey(_0x2da5c0,_0x40cb85[_0x0a9e('0x1f')],'id');for(var _0x409319=0x0,_0x332d35={},_0x39e565={};_0x409319<_0x2da5c0['length'];_0x409319+=0x1){_0x332d35=_0x2da5c0[_0x409319];if(_[_0x0a9e('0x18')](_0x40cb85['mailQueues'][_0x332d35['id']])){_0x40cb85[_0x0a9e('0x1f')][_0x332d35['id']]=new MailQueue(_0x332d35);}else{_0x40cb85[_0x0a9e('0x14')](_0x40cb85[_0x0a9e('0x1f')][_0x332d35['id']],_0x332d35);}_0x40cb85[_0x0a9e('0x1f')][_0x332d35['id']]['updateRouting']();_0x40cb85[_0x0a9e('0x1f')][_0x332d35['id']][_0x0a9e('0x1a')]();}}return _0x40cb85[_0x0a9e('0x1f')];};};Realtime[_0x0a9e('0x13')]['initFaxQueues']=function(){var _0x54135e=this;return function(_0x1e8694){if(_0x1e8694){freeIsNotKey(_0x1e8694,_0x54135e['faxQueues'],'id');for(var _0x24936a=0x0,_0x3d9717={},_0x381c37={};_0x24936a<_0x1e8694[_0x0a9e('0x17')];_0x24936a+=0x1){_0x3d9717=_0x1e8694[_0x24936a];if(_['isUndefined'](_0x54135e[_0x0a9e('0xc')][_0x3d9717['id']])){_0x54135e[_0x0a9e('0xc')][_0x3d9717['id']]=new FaxQueue(_0x3d9717);}else{_0x54135e[_0x0a9e('0x14')](_0x54135e['faxQueues'][_0x3d9717['id']],_0x3d9717);}_0x54135e[_0x0a9e('0xc')][_0x3d9717['id']][_0x0a9e('0x1b')]();_0x54135e[_0x0a9e('0xc')][_0x3d9717['id']]['updateRealtime']();}}return _0x54135e['faxQueues'];};};Realtime[_0x0a9e('0x13')][_0x0a9e('0x20')]=function(){var _0x5adda1=this;return function(_0x2b814e){if(_0x2b814e){freeIsNotKey(_0x2b814e,_0x5adda1[_0x0a9e('0x21')],'id');for(var _0x2e1b3a=0x0,_0x148f55={},_0x4b38d9={};_0x2e1b3a<_0x2b814e['length'];_0x2e1b3a+=0x1){_0x148f55=_0x2b814e[_0x2e1b3a];if(_[_0x0a9e('0x18')](_0x5adda1[_0x0a9e('0x21')][_0x148f55['id']])){_0x5adda1['whatsappQueues'][_0x148f55['id']]=new WhatsappQueue(_0x148f55);}else{_0x5adda1[_0x0a9e('0x14')](_0x5adda1[_0x0a9e('0x21')][_0x148f55['id']],_0x148f55);}_0x5adda1[_0x0a9e('0x21')][_0x148f55['id']]['updateRouting']();_0x5adda1[_0x0a9e('0x21')][_0x148f55['id']][_0x0a9e('0x1a')]();}}return _0x5adda1[_0x0a9e('0x21')];};};module[_0x0a9e('0x22')]=Realtime;
\ No newline at end of file
+var _0xa9e0=['isUndefined','initIntervals','updateRealtime','updateRouting','initSmsQueues','smsQueues','initMailQueues','mailQueues','initWhatsappQueues','whatsappQueues','exports','bluebird','util','lodash','../model/interval','../model/chatQueue','../model/smsQueue','../model/mailQueue','../model/faxQueue','../model/whatsappQueue','intervals','openchannelQueues','chatQueues','faxQueues','mailQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','hasOwnProperty','prototype','mergeFromDatabase','initAgents','agents','length'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xa9e0,0x123));var _0x0a9e=function(_0x29b609,_0x19d388){_0x29b609=_0x29b609-0x0;var _0x54c952=_0xa9e0[_0x29b609];return _0x54c952;};'use strict';var BPromise=require(_0x0a9e('0x0'));var util=require(_0x0a9e('0x1'));var _=require(_0x0a9e('0x2'));var moment=require('moment');var Agent=require('../model/agent');var Interval=require(_0x0a9e('0x3'));var OpenchannelQueue=require('../model/openchannelQueue');var ChatQueue=require(_0x0a9e('0x4'));var SmsQueue=require(_0x0a9e('0x5'));var MailQueue=require(_0x0a9e('0x6'));var FaxQueue=require(_0x0a9e('0x7'));var WhatsappQueue=require(_0x0a9e('0x8'));var Realtime=function(){this['agents']={};this[_0x0a9e('0x9')]={};this[_0x0a9e('0xa')]={};this[_0x0a9e('0xb')]={};this['smsQueues']={};this['mailQueues']={};this[_0x0a9e('0xc')]={};this['whatsappQueues']={};this['chatQueuesWaitingInteractions']={};this[_0x0a9e('0xd')]={};this[_0x0a9e('0xe')]={};this[_0x0a9e('0xf')]={};this[_0x0a9e('0x10')]={};this[_0x0a9e('0x11')]={};};function freeIsNotKey(_0xbd1168,_0x4a4c56,_0x50dfb2){var _0x527cdd=_['mapKeys'](_0xbd1168,function(_0x273d4d,_0x36471c){return _0x273d4d[_0x50dfb2];});for(var _0xd5b662 in _0x4a4c56){if(_0x4a4c56[_0x0a9e('0x12')](_0xd5b662)){if(!_0x527cdd[_0xd5b662]){delete _0x4a4c56[_0xd5b662];}}}}Realtime[_0x0a9e('0x13')][_0x0a9e('0x14')]=function(_0x5db4b0,_0x4283ce){for(var _0x239b12 in _0x4283ce){if(_0x5db4b0[_0x0a9e('0x12')](_0x239b12)){_0x5db4b0[_0x239b12]=_0x4283ce[_0x239b12];}}};Realtime[_0x0a9e('0x13')][_0x0a9e('0x15')]=function(){var _0x4d5611=this;return function(_0x52a03d){if(_0x52a03d){freeIsNotKey(_0x52a03d,_0x4d5611[_0x0a9e('0x16')],'id');for(var _0x5d0880=0x0,_0x1985b6={},_0x519dfd={};_0x5d0880<_0x52a03d[_0x0a9e('0x17')];_0x5d0880+=0x1){_0x1985b6=_0x52a03d[_0x5d0880];if(_[_0x0a9e('0x18')](_0x4d5611['agents'][_0x1985b6['id']])){_0x4d5611[_0x0a9e('0x16')][_0x1985b6['id']]=new Agent(_0x1985b6);}else{_0x4d5611['mergeFromDatabase'](_0x4d5611[_0x0a9e('0x16')][_0x1985b6['id']],_0x1985b6);}}}return _0x4d5611[_0x0a9e('0x16')];};};Realtime[_0x0a9e('0x13')][_0x0a9e('0x19')]=function(){var _0x31b1ca=this;return function(_0x2eb11f){if(_0x2eb11f){freeIsNotKey(_0x2eb11f,_0x31b1ca[_0x0a9e('0x9')],'id');for(var _0x20559e=0x0,_0x1314ae={},_0x112016={};_0x20559e<_0x2eb11f[_0x0a9e('0x17')];_0x20559e+=0x1){_0x1314ae=_0x2eb11f[_0x20559e];if(_[_0x0a9e('0x18')](_0x31b1ca['intervals'][_0x1314ae['id']])){_0x31b1ca[_0x0a9e('0x9')][_0x1314ae['id']]=new Interval(_0x1314ae);}else{_0x31b1ca[_0x0a9e('0x14')](_0x31b1ca['intervals'][_0x1314ae['id']],_0x1314ae);}}}return _0x31b1ca[_0x0a9e('0x9')];};};Realtime['prototype']['initOpenchannelQueues']=function(){var _0x3a02e1=this;return function(_0x432e56){if(_0x432e56){freeIsNotKey(_0x432e56,_0x3a02e1[_0x0a9e('0xa')],'id');for(var _0x30bae6=0x0,_0x4abc77={},_0xfb6e48={};_0x30bae6<_0x432e56[_0x0a9e('0x17')];_0x30bae6+=0x1){_0x4abc77=_0x432e56[_0x30bae6];if(_[_0x0a9e('0x18')](_0x3a02e1[_0x0a9e('0xa')][_0x4abc77['id']])){_0x3a02e1[_0x0a9e('0xa')][_0x4abc77['id']]=new OpenchannelQueue(_0x4abc77);}else{_0x3a02e1[_0x0a9e('0x14')](_0x3a02e1[_0x0a9e('0xa')][_0x4abc77['id']],_0x4abc77);}_0x3a02e1['openchannelQueues'][_0x4abc77['id']]['updateRouting']();_0x3a02e1[_0x0a9e('0xa')][_0x4abc77['id']][_0x0a9e('0x1a')]();}}return _0x3a02e1[_0x0a9e('0xa')];};};Realtime[_0x0a9e('0x13')]['initChatQueues']=function(){var _0x384319=this;return function(_0x479bc4){if(_0x479bc4){freeIsNotKey(_0x479bc4,_0x384319[_0x0a9e('0xb')],'id');for(var _0x5bfb33=0x0,_0x1dc186={},_0x34dc65={};_0x5bfb33<_0x479bc4[_0x0a9e('0x17')];_0x5bfb33+=0x1){_0x1dc186=_0x479bc4[_0x5bfb33];if(_[_0x0a9e('0x18')](_0x384319[_0x0a9e('0xb')][_0x1dc186['id']])){_0x384319[_0x0a9e('0xb')][_0x1dc186['id']]=new ChatQueue(_0x1dc186);}else{_0x384319[_0x0a9e('0x14')](_0x384319[_0x0a9e('0xb')][_0x1dc186['id']],_0x1dc186);}_0x384319['chatQueues'][_0x1dc186['id']][_0x0a9e('0x1b')]();_0x384319[_0x0a9e('0xb')][_0x1dc186['id']][_0x0a9e('0x1a')]();}}return _0x384319[_0x0a9e('0xb')];};};Realtime['prototype'][_0x0a9e('0x1c')]=function(){var _0x40e7a3=this;return function(_0x1843b2){if(_0x1843b2){freeIsNotKey(_0x1843b2,_0x40e7a3[_0x0a9e('0x1d')],'id');for(var _0x58b06f=0x0,_0x563b45={},_0x296f41={};_0x58b06f<_0x1843b2[_0x0a9e('0x17')];_0x58b06f+=0x1){_0x563b45=_0x1843b2[_0x58b06f];if(_[_0x0a9e('0x18')](_0x40e7a3['smsQueues'][_0x563b45['id']])){_0x40e7a3[_0x0a9e('0x1d')][_0x563b45['id']]=new SmsQueue(_0x563b45);}else{_0x40e7a3['mergeFromDatabase'](_0x40e7a3[_0x0a9e('0x1d')][_0x563b45['id']],_0x563b45);}_0x40e7a3[_0x0a9e('0x1d')][_0x563b45['id']][_0x0a9e('0x1b')]();_0x40e7a3[_0x0a9e('0x1d')][_0x563b45['id']][_0x0a9e('0x1a')]();}}return _0x40e7a3['smsQueues'];};};Realtime[_0x0a9e('0x13')][_0x0a9e('0x1e')]=function(){var _0x40cb85=this;return function(_0x2da5c0){if(_0x2da5c0){freeIsNotKey(_0x2da5c0,_0x40cb85[_0x0a9e('0x1f')],'id');for(var _0x409319=0x0,_0x332d35={},_0x39e565={};_0x409319<_0x2da5c0['length'];_0x409319+=0x1){_0x332d35=_0x2da5c0[_0x409319];if(_[_0x0a9e('0x18')](_0x40cb85['mailQueues'][_0x332d35['id']])){_0x40cb85[_0x0a9e('0x1f')][_0x332d35['id']]=new MailQueue(_0x332d35);}else{_0x40cb85[_0x0a9e('0x14')](_0x40cb85[_0x0a9e('0x1f')][_0x332d35['id']],_0x332d35);}_0x40cb85[_0x0a9e('0x1f')][_0x332d35['id']]['updateRouting']();_0x40cb85[_0x0a9e('0x1f')][_0x332d35['id']][_0x0a9e('0x1a')]();}}return _0x40cb85[_0x0a9e('0x1f')];};};Realtime[_0x0a9e('0x13')]['initFaxQueues']=function(){var _0x54135e=this;return function(_0x1e8694){if(_0x1e8694){freeIsNotKey(_0x1e8694,_0x54135e['faxQueues'],'id');for(var _0x24936a=0x0,_0x3d9717={},_0x381c37={};_0x24936a<_0x1e8694[_0x0a9e('0x17')];_0x24936a+=0x1){_0x3d9717=_0x1e8694[_0x24936a];if(_['isUndefined'](_0x54135e[_0x0a9e('0xc')][_0x3d9717['id']])){_0x54135e[_0x0a9e('0xc')][_0x3d9717['id']]=new FaxQueue(_0x3d9717);}else{_0x54135e[_0x0a9e('0x14')](_0x54135e['faxQueues'][_0x3d9717['id']],_0x3d9717);}_0x54135e[_0x0a9e('0xc')][_0x3d9717['id']][_0x0a9e('0x1b')]();_0x54135e[_0x0a9e('0xc')][_0x3d9717['id']]['updateRealtime']();}}return _0x54135e['faxQueues'];};};Realtime[_0x0a9e('0x13')][_0x0a9e('0x20')]=function(){var _0x5adda1=this;return function(_0x2b814e){if(_0x2b814e){freeIsNotKey(_0x2b814e,_0x5adda1[_0x0a9e('0x21')],'id');for(var _0x2e1b3a=0x0,_0x148f55={},_0x4b38d9={};_0x2e1b3a<_0x2b814e['length'];_0x2e1b3a+=0x1){_0x148f55=_0x2b814e[_0x2e1b3a];if(_[_0x0a9e('0x18')](_0x5adda1[_0x0a9e('0x21')][_0x148f55['id']])){_0x5adda1['whatsappQueues'][_0x148f55['id']]=new WhatsappQueue(_0x148f55);}else{_0x5adda1[_0x0a9e('0x14')](_0x5adda1[_0x0a9e('0x21')][_0x148f55['id']],_0x148f55);}_0x5adda1[_0x0a9e('0x21')][_0x148f55['id']]['updateRouting']();_0x5adda1[_0x0a9e('0x21')][_0x148f55['id']][_0x0a9e('0x1a')]();}}return _0x5adda1[_0x0a9e('0x21')];};};module[_0x0a9e('0x22')]=Realtime;
\ No newline at end of file
index 9a9f6c9..b9716f2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x48c9=['Request','AddTagsToChatInteraction','addTagsToChatInteraction','update','UpdateChatInteraction','addTags'];(function(_0x2a32fe,_0x5899f0){var _0x2e62da=function(_0x45e799){while(--_0x45e799){_0x2a32fe['push'](_0x2a32fe['shift']());}};_0x2e62da(++_0x5899f0);}(_0x48c9,0x105));var _0x948c=function(_0x3b1e3f,_0xf8826b){_0x3b1e3f=_0x3b1e3f-0x0;var _0x3b1cd3=_0x48c9[_0x3b1e3f];return _0x3b1cd3;};'use strict';var client=require('../client');exports[_0x948c('0x0')]=function(_0x394dee,_0x362d0e){return client['Request'](_0x948c('0x1'),{'body':_0x362d0e,'options':{'where':{'id':_0x394dee}},'log':'updateChatInteraction'});};exports[_0x948c('0x2')]=function(_0x524c2a,_0x14963d){return client[_0x948c('0x3')](_0x948c('0x4'),{'body':_0x14963d,'options':{'where':{'id':_0x524c2a}},'log':_0x948c('0x5')});};
\ No newline at end of file
+var _0x2a7a=['Request','UpdateChatInteraction','addTags','AddTagsToChatInteraction','addTagsToChatInteraction','update'];(function(_0xd66745,_0x20d3b1){var _0x501c5a=function(_0x38dea8){while(--_0x38dea8){_0xd66745['push'](_0xd66745['shift']());}};_0x501c5a(++_0x20d3b1);}(_0x2a7a,0x161));var _0xa2a7=function(_0x491fcb,_0x419305){_0x491fcb=_0x491fcb-0x0;var _0x20d08d=_0x2a7a[_0x491fcb];return _0x20d08d;};'use strict';var client=require('../client');exports[_0xa2a7('0x0')]=function(_0x178067,_0x3f4c7a){return client[_0xa2a7('0x1')](_0xa2a7('0x2'),{'body':_0x3f4c7a,'options':{'where':{'id':_0x178067}},'log':'updateChatInteraction'});};exports[_0xa2a7('0x3')]=function(_0x5b6c36,_0x345982){return client['Request'](_0xa2a7('0x4'),{'body':_0x345982,'options':{'where':{'id':_0x5b6c36}},'log':_0xa2a7('0x5')});};
\ No newline at end of file
index 22c5d15..5fd6498 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4ff0=['../client','Request','CreateChatMessage','createChatMessage'];(function(_0x349915,_0x124261){var _0x8be4f3=function(_0x3a82a9){while(--_0x3a82a9){_0x349915['push'](_0x349915['shift']());}};_0x8be4f3(++_0x124261);}(_0x4ff0,0xfc));var _0x04ff=function(_0x24afd3,_0xcc36f0){_0x24afd3=_0x24afd3-0x0;var _0xffe96f=_0x4ff0[_0x24afd3];return _0xffe96f;};'use strict';var client=require(_0x04ff('0x0'));exports['create']=function(_0x5efcd6){return client[_0x04ff('0x1')](_0x04ff('0x2'),{'body':_0x5efcd6,'log':_0x04ff('0x3')});};
\ No newline at end of file
+var _0x84e2=['Request','createChatMessage','create'];(function(_0x2b744e,_0x3de5c7){var _0x8da216=function(_0x5cf995){while(--_0x5cf995){_0x2b744e['push'](_0x2b744e['shift']());}};_0x8da216(++_0x3de5c7);}(_0x84e2,0x89));var _0x284e=function(_0x1d3fdc,_0x2b5c54){_0x1d3fdc=_0x1d3fdc-0x0;var _0x128bb0=_0x84e2[_0x1d3fdc];return _0x128bb0;};'use strict';var client=require('../client');exports[_0x284e('0x0')]=function(_0x1266fc){return client[_0x284e('0x1')]('CreateChatMessage',{'body':_0x1266fc,'log':_0x284e('0x2')});};
\ No newline at end of file
index 841e8b8..4ec8f61 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8c46=['../client','GetChatQueue','strategy','User','Agents','name','online','chatPause','getChatQueues'];(function(_0x489e87,_0xe1be00){var _0x44d28f=function(_0x54c8a4){while(--_0x54c8a4){_0x489e87['push'](_0x489e87['shift']());}};_0x44d28f(++_0xe1be00);}(_0x8c46,0x171));var _0x68c4=function(_0x4a8bc2,_0x4128e0){_0x4a8bc2=_0x4a8bc2-0x0;var _0x587b68=_0x8c46[_0x4a8bc2];return _0x587b68;};'use strict';var client=require(_0x68c4('0x0'));exports['getChatQueues']=function(){return function(){return client['Request'](_0x68c4('0x1'),{'options':{'raw':![],'attributes':['id','name','timeout',_0x68c4('0x2')],'include':[{'model':_0x68c4('0x3'),'as':_0x68c4('0x4'),'attributes':['id',_0x68c4('0x5'),_0x68c4('0x6'),_0x68c4('0x7')]}]},'log':_0x68c4('0x8')});};};
\ No newline at end of file
+var _0x39d9=['User','online','chatPause','../client','getChatQueues','Request','GetChatQueue','name','timeout','strategy'];(function(_0x4719bc,_0x27a905){var _0x305045=function(_0x502b81){while(--_0x502b81){_0x4719bc['push'](_0x4719bc['shift']());}};_0x305045(++_0x27a905);}(_0x39d9,0x17f));var _0x939d=function(_0x1421d4,_0x312eb7){_0x1421d4=_0x1421d4-0x0;var _0x403fa2=_0x39d9[_0x1421d4];return _0x403fa2;};'use strict';var client=require(_0x939d('0x0'));exports[_0x939d('0x1')]=function(){return function(){return client[_0x939d('0x2')](_0x939d('0x3'),{'options':{'raw':![],'attributes':['id',_0x939d('0x4'),_0x939d('0x5'),_0x939d('0x6')],'include':[{'model':_0x939d('0x7'),'as':'Agents','attributes':['id',_0x939d('0x4'),_0x939d('0x8'),_0x939d('0x9')]}]},'log':'getChatQueues'});};};
\ No newline at end of file
index 79dbb5a..89ca86e 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xba33=['update','UpdateChatQueueReport','DESC','../client','create','Request','CreateChatQueueReport'];(function(_0xacb1e2,_0x55e0ab){var _0x463815=function(_0x413c3b){while(--_0x413c3b){_0xacb1e2['push'](_0xacb1e2['shift']());}};_0x463815(++_0x55e0ab);}(_0xba33,0xf1));var _0x3ba3=function(_0x194e6d,_0x15e36a){_0x194e6d=_0x194e6d-0x0;var _0x437fd9=_0xba33[_0x194e6d];return _0x437fd9;};'use strict';var client=require(_0x3ba3('0x0'));exports[_0x3ba3('0x1')]=function(_0x385c61){return client[_0x3ba3('0x2')]('CreateChatQueueReport',{'body':_0x385c61,'log':_0x3ba3('0x3')});};exports[_0x3ba3('0x4')]=function(_0x12472e,_0x77ca36){return client[_0x3ba3('0x2')](_0x3ba3('0x5'),{'body':_0x77ca36,'options':{'where':{'uniqueid':_0x12472e},'order':[['id',_0x3ba3('0x6')]],'limit':0x1},'log':_0x3ba3('0x5')});};
\ No newline at end of file
+var _0xdb13=['CreateChatQueueReport','update','UpdateChatQueueReport','DESC','create','Request'];(function(_0x14ae0c,_0x100691){var _0x15a131=function(_0x2ba14b){while(--_0x2ba14b){_0x14ae0c['push'](_0x14ae0c['shift']());}};_0x15a131(++_0x100691);}(_0xdb13,0x10c));var _0x3db1=function(_0x3958f0,_0x3fe7c3){_0x3958f0=_0x3958f0-0x0;var _0x5cc168=_0xdb13[_0x3958f0];return _0x5cc168;};'use strict';var client=require('../client');exports[_0x3db1('0x0')]=function(_0x366725){return client[_0x3db1('0x1')](_0x3db1('0x2'),{'body':_0x366725,'log':_0x3db1('0x2')});};exports[_0x3db1('0x3')]=function(_0x581a73,_0x3352e3){return client[_0x3db1('0x1')](_0x3db1('0x4'),{'body':_0x3352e3,'options':{'where':{'uniqueid':_0x581a73},'order':[['id',_0x3db1('0x5')]],'limit':0x1},'log':_0x3db1('0x4')});};
\ No newline at end of file
index b86449e..49d180a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7a54=['Request','UpdateFaxInteraction','addTags','AddTagsToFaxInteraction','../client','update'];(function(_0x23e7c1,_0x35110c){var _0x1add43=function(_0x238918){while(--_0x238918){_0x23e7c1['push'](_0x23e7c1['shift']());}};_0x1add43(++_0x35110c);}(_0x7a54,0x106));var _0x47a5=function(_0x5d71f6,_0x4d1928){_0x5d71f6=_0x5d71f6-0x0;var _0x2f1ee1=_0x7a54[_0x5d71f6];return _0x2f1ee1;};'use strict';var client=require(_0x47a5('0x0'));exports[_0x47a5('0x1')]=function(_0x44b31e,_0x58157c){return client[_0x47a5('0x2')](_0x47a5('0x3'),{'body':_0x58157c,'options':{'where':{'id':_0x44b31e}},'log':'updateFaxInteraction'});};exports[_0x47a5('0x4')]=function(_0x11bf85,_0x2a1a7e){return client[_0x47a5('0x2')](_0x47a5('0x5'),{'body':_0x2a1a7e,'options':{'where':{'id':_0x11bf85}},'log':'addTagsToFaxInteraction'});};
\ No newline at end of file
+var _0x9957=['Request','AddTagsToFaxInteraction','addTagsToFaxInteraction','../client','update','UpdateFaxInteraction','updateFaxInteraction','addTags'];(function(_0x1d6960,_0x11a48a){var _0x278934=function(_0x36dd3d){while(--_0x36dd3d){_0x1d6960['push'](_0x1d6960['shift']());}};_0x278934(++_0x11a48a);}(_0x9957,0x93));var _0x7995=function(_0x3947c9,_0x4d6c97){_0x3947c9=_0x3947c9-0x0;var _0x2e7871=_0x9957[_0x3947c9];return _0x2e7871;};'use strict';var client=require(_0x7995('0x0'));exports[_0x7995('0x1')]=function(_0x2722a3,_0x10a05d){return client['Request'](_0x7995('0x2'),{'body':_0x10a05d,'options':{'where':{'id':_0x2722a3}},'log':_0x7995('0x3')});};exports[_0x7995('0x4')]=function(_0x462a03,_0x576d89){return client[_0x7995('0x5')](_0x7995('0x6'),{'body':_0x576d89,'options':{'where':{'id':_0x462a03}},'log':_0x7995('0x7')});};
\ No newline at end of file
index 7d5a4f9..30e1096 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5c10=['Request','CreateFaxMessage','createFaxMessage','../client'];(function(_0x4e45f4,_0x370a01){var _0x1c6632=function(_0x575115){while(--_0x575115){_0x4e45f4['push'](_0x4e45f4['shift']());}};_0x1c6632(++_0x370a01);}(_0x5c10,0x1bf));var _0x05c1=function(_0x4ea349,_0x308124){_0x4ea349=_0x4ea349-0x0;var _0x79a8bd=_0x5c10[_0x4ea349];return _0x79a8bd;};'use strict';var client=require(_0x05c1('0x0'));exports['create']=function(_0x33ca06){return client[_0x05c1('0x1')](_0x05c1('0x2'),{'body':_0x33ca06,'log':_0x05c1('0x3')});};
\ No newline at end of file
+var _0x2109=['CreateFaxMessage','createFaxMessage','../client','create','Request'];(function(_0x21f626,_0x132463){var _0x48d98c=function(_0x5eea1a){while(--_0x5eea1a){_0x21f626['push'](_0x21f626['shift']());}};_0x48d98c(++_0x132463);}(_0x2109,0x1c4));var _0x9210=function(_0x547c7e,_0x371a3b){_0x547c7e=_0x547c7e-0x0;var _0xe39351=_0x2109[_0x547c7e];return _0xe39351;};'use strict';var client=require(_0x9210('0x0'));exports[_0x9210('0x1')]=function(_0x2cf82c){return client[_0x9210('0x2')](_0x9210('0x3'),{'body':_0x2cf82c,'log':_0x9210('0x4')});};
\ No newline at end of file
index 5611f49..2f69386 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe9d1=['GetFaxQueue','Agents','online','../client','getFaxQueues'];(function(_0x4a5356,_0x20f134){var _0x4beb93=function(_0x151541){while(--_0x151541){_0x4a5356['push'](_0x4a5356['shift']());}};_0x4beb93(++_0x20f134);}(_0xe9d1,0x1ac));var _0x1e9d=function(_0x5cc5cd,_0x4b19b2){_0x5cc5cd=_0x5cc5cd-0x0;var _0x44abe4=_0xe9d1[_0x5cc5cd];return _0x44abe4;};'use strict';var client=require(_0x1e9d('0x0'));exports[_0x1e9d('0x1')]=function(){return function(){return client['Request'](_0x1e9d('0x2'),{'options':{'raw':![],'attributes':['id','name','timeout','strategy'],'include':[{'model':'User','as':_0x1e9d('0x3'),'attributes':['id','name',_0x1e9d('0x4'),'faxPause']}]},'log':_0x1e9d('0x1')});};};
\ No newline at end of file
+var _0x3c9d=['getFaxQueues','../client','Request','GetFaxQueue','name','timeout','strategy','Agents'];(function(_0x486517,_0x5d34e9){var _0x239ddd=function(_0xe445ca){while(--_0xe445ca){_0x486517['push'](_0x486517['shift']());}};_0x239ddd(++_0x5d34e9);}(_0x3c9d,0x191));var _0xd3c9=function(_0x18d3d2,_0x48809e){_0x18d3d2=_0x18d3d2-0x0;var _0x582ee2=_0x3c9d[_0x18d3d2];return _0x582ee2;};'use strict';var client=require(_0xd3c9('0x0'));exports['getFaxQueues']=function(){return function(){return client[_0xd3c9('0x1')](_0xd3c9('0x2'),{'options':{'raw':![],'attributes':['id',_0xd3c9('0x3'),_0xd3c9('0x4'),_0xd3c9('0x5')],'include':[{'model':'User','as':_0xd3c9('0x6'),'attributes':['id',_0xd3c9('0x3'),'online','faxPause']}]},'log':_0xd3c9('0x7')});};};
\ No newline at end of file
index b06a338..60076cf 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x75ca=['DESC','../client','create','Request','CreateFaxQueueReport','update','UpdateFaxQueueReport'];(function(_0x398513,_0x4e8314){var _0x520c68=function(_0x4eb625){while(--_0x4eb625){_0x398513['push'](_0x398513['shift']());}};_0x520c68(++_0x4e8314);}(_0x75ca,0x13c));var _0xa75c=function(_0x9e0cb3,_0x9cd497){_0x9e0cb3=_0x9e0cb3-0x0;var _0x5926b7=_0x75ca[_0x9e0cb3];return _0x5926b7;};'use strict';var client=require(_0xa75c('0x0'));exports[_0xa75c('0x1')]=function(_0x17e706){return client[_0xa75c('0x2')]('CreateFaxQueueReport',{'body':_0x17e706,'log':_0xa75c('0x3')});};exports[_0xa75c('0x4')]=function(_0x4de49e,_0x236489){return client[_0xa75c('0x2')](_0xa75c('0x5'),{'body':_0x236489,'options':{'where':{'uniqueid':_0x4de49e},'order':[['id',_0xa75c('0x6')]],'limit':0x1},'log':_0xa75c('0x5')});};
\ No newline at end of file
+var _0x049e=['CreateFaxQueueReport','update','UpdateFaxQueueReport','DESC','../client','create'];(function(_0x5863a9,_0x4b431f){var _0x590554=function(_0x12cbf3){while(--_0x12cbf3){_0x5863a9['push'](_0x5863a9['shift']());}};_0x590554(++_0x4b431f);}(_0x049e,0xd6));var _0xe049=function(_0x4812e0,_0x2ccf3c){_0x4812e0=_0x4812e0-0x0;var _0x252e0f=_0x049e[_0x4812e0];return _0x252e0f;};'use strict';var client=require(_0xe049('0x0'));exports[_0xe049('0x1')]=function(_0x4f5c3a){return client['Request'](_0xe049('0x2'),{'body':_0x4f5c3a,'log':'CreateFaxQueueReport'});};exports[_0xe049('0x3')]=function(_0x583cec,_0x5dbd8c){return client['Request'](_0xe049('0x4'),{'body':_0x5dbd8c,'options':{'where':{'uniqueid':_0x583cec},'order':[['id',_0xe049('0x5')]],'limit':0x1},'log':_0xe049('0x4')});};
\ No newline at end of file
index 7a4fd3b..2988f86 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x27d6=['interval','getIntervals','../client','Request','GetInterval','name','Interval','Intervals'];(function(_0x3947c9,_0x4d6c97){var _0x2e7871=function(_0x1236cc){while(--_0x1236cc){_0x3947c9['push'](_0x3947c9['shift']());}};_0x2e7871(++_0x4d6c97);}(_0x27d6,0x1ca));var _0x627d=function(_0x209941,_0x5c9988){_0x209941=_0x209941-0x0;var _0x1e8729=_0x27d6[_0x209941];return _0x1e8729;};'use strict';var client=require(_0x627d('0x0'));exports['getIntervals']=function(){return function(){return client[_0x627d('0x1')](_0x627d('0x2'),{'options':{'raw':![],'where':{'IntervalId':null},'attributes':['id',_0x627d('0x3')],'include':[{'model':_0x627d('0x4'),'as':_0x627d('0x5'),'attributes':['id',_0x627d('0x3'),_0x627d('0x6')]}]},'log':_0x627d('0x7')});};};
\ No newline at end of file
+var _0xd915=['interval','../client','getIntervals','GetInterval','name','Interval','Intervals'];(function(_0x3b01da,_0x2eb89d){var _0xae3255=function(_0x2643b4){while(--_0x2643b4){_0x3b01da['push'](_0x3b01da['shift']());}};_0xae3255(++_0x2eb89d);}(_0xd915,0x7f));var _0x5d91=function(_0x243b2f,_0x30aa15){_0x243b2f=_0x243b2f-0x0;var _0xcb3c2d=_0xd915[_0x243b2f];return _0xcb3c2d;};'use strict';var client=require(_0x5d91('0x0'));exports[_0x5d91('0x1')]=function(){return function(){return client['Request'](_0x5d91('0x2'),{'options':{'raw':![],'where':{'IntervalId':null},'attributes':['id',_0x5d91('0x3')],'include':[{'model':_0x5d91('0x4'),'as':_0x5d91('0x5'),'attributes':['id',_0x5d91('0x3'),_0x5d91('0x6')]}]},'log':_0x5d91('0x1')});};};
\ No newline at end of file
index 5c2b8ad..6c64b28 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4213=['../client','update','Request','UpdateMailInteraction','updateMailInteraction','AddTagsToMailInteraction','addTagsToChatInteraction'];(function(_0x406be2,_0x4cb62c){var _0x40a1a0=function(_0x39e78c){while(--_0x39e78c){_0x406be2['push'](_0x406be2['shift']());}};_0x40a1a0(++_0x4cb62c);}(_0x4213,0x77));var _0x3421=function(_0x3fcd88,_0x25eb71){_0x3fcd88=_0x3fcd88-0x0;var _0x3938cb=_0x4213[_0x3fcd88];return _0x3938cb;};'use strict';var client=require(_0x3421('0x0'));exports[_0x3421('0x1')]=function(_0x324515,_0x7870a4){return client[_0x3421('0x2')](_0x3421('0x3'),{'body':_0x7870a4,'options':{'where':{'id':_0x324515}},'log':_0x3421('0x4')});};exports['addTags']=function(_0xdbd54e,_0x5c3719){return client[_0x3421('0x2')](_0x3421('0x5'),{'body':_0x5c3719,'options':{'where':{'id':_0xdbd54e}},'log':_0x3421('0x6')});};
\ No newline at end of file
+var _0x7096=['AddTagsToMailInteraction','addTagsToChatInteraction','update','UpdateMailInteraction','updateMailInteraction','addTags','Request'];(function(_0x5ea24f,_0x3bd868){var _0x112afb=function(_0x530fda){while(--_0x530fda){_0x5ea24f['push'](_0x5ea24f['shift']());}};_0x112afb(++_0x3bd868);}(_0x7096,0x10c));var _0x6709=function(_0x46aff0,_0x122890){_0x46aff0=_0x46aff0-0x0;var _0x9d78cf=_0x7096[_0x46aff0];return _0x9d78cf;};'use strict';var client=require('../client');exports[_0x6709('0x0')]=function(_0x5035b7,_0x253760){return client['Request'](_0x6709('0x1'),{'body':_0x253760,'options':{'where':{'id':_0x5035b7}},'log':_0x6709('0x2')});};exports[_0x6709('0x3')]=function(_0xccdcb5,_0x3cd087){return client[_0x6709('0x4')](_0x6709('0x5'),{'body':_0x3cd087,'options':{'where':{'id':_0xccdcb5}},'log':_0x6709('0x6')});};
\ No newline at end of file
index 0ab47a3..c3a7b27 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1540=['Request','createMailMessage','../client','create'];(function(_0x2b8bd1,_0x5b154a){var _0x11e7c0=function(_0x48b8fd){while(--_0x48b8fd){_0x2b8bd1['push'](_0x2b8bd1['shift']());}};_0x11e7c0(++_0x5b154a);}(_0x1540,0x192));var _0x0154=function(_0x57990d,_0x15a98e){_0x57990d=_0x57990d-0x0;var _0x1bf6cf=_0x1540[_0x57990d];return _0x1bf6cf;};'use strict';var client=require(_0x0154('0x0'));exports[_0x0154('0x1')]=function(_0x4c480c){return client[_0x0154('0x2')]('CreateMailMessage',{'body':_0x4c480c,'log':_0x0154('0x3')});};
\ No newline at end of file
+var _0x5c2c=['createMailMessage','../client','create','Request','CreateMailMessage'];(function(_0x3a9555,_0x5c54b0){var _0x146436=function(_0x5beb65){while(--_0x5beb65){_0x3a9555['push'](_0x3a9555['shift']());}};_0x146436(++_0x5c54b0);}(_0x5c2c,0x1e6));var _0xc5c2=function(_0x2211ed,_0x1bca0b){_0x2211ed=_0x2211ed-0x0;var _0x4d78cc=_0x5c2c[_0x2211ed];return _0x4d78cc;};'use strict';var client=require(_0xc5c2('0x0'));exports[_0xc5c2('0x1')]=function(_0x1a08f3){return client[_0xc5c2('0x2')](_0xc5c2('0x3'),{'body':_0x1a08f3,'log':_0xc5c2('0x4')});};
\ No newline at end of file
index c944df8..b28bc94 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2422=['name','timeout','Agents','online','../client','getMailQueues','Request','GetMailQueue'];(function(_0x26462c,_0xd20a35){var _0x509a42=function(_0x1b22c9){while(--_0x1b22c9){_0x26462c['push'](_0x26462c['shift']());}};_0x509a42(++_0xd20a35);}(_0x2422,0x1e4));var _0x2242=function(_0x2fca6b,_0x19a880){_0x2fca6b=_0x2fca6b-0x0;var _0x1f6a2c=_0x2422[_0x2fca6b];return _0x1f6a2c;};'use strict';var client=require(_0x2242('0x0'));exports[_0x2242('0x1')]=function(){return function(){return client[_0x2242('0x2')](_0x2242('0x3'),{'options':{'raw':![],'attributes':['id',_0x2242('0x4'),_0x2242('0x5'),'strategy'],'include':[{'model':'User','as':_0x2242('0x6'),'attributes':['id',_0x2242('0x4'),_0x2242('0x7'),'mailPause']}]},'log':_0x2242('0x1')});};};
\ No newline at end of file
+var _0x26a9=['getMailQueues','Request','GetMailQueue','name','timeout','strategy','User','Agents','mailPause','../client'];(function(_0x3df9dd,_0x26f5cd){var _0x4f11e4=function(_0x1993fe){while(--_0x1993fe){_0x3df9dd['push'](_0x3df9dd['shift']());}};_0x4f11e4(++_0x26f5cd);}(_0x26a9,0x153));var _0x926a=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x26a9[_0x3dd15e];return _0x231fd0;};'use strict';var client=require(_0x926a('0x0'));exports[_0x926a('0x1')]=function(){return function(){return client[_0x926a('0x2')](_0x926a('0x3'),{'options':{'raw':![],'attributes':['id',_0x926a('0x4'),_0x926a('0x5'),_0x926a('0x6')],'include':[{'model':_0x926a('0x7'),'as':_0x926a('0x8'),'attributes':['id',_0x926a('0x4'),'online',_0x926a('0x9')]}]},'log':_0x926a('0x1')});};};
\ No newline at end of file
index 7f8ecf4..1f770b6 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xf0c0=['UpdateMailQueueReport','DESC','../client','create','CreateMailQueueReport','update','Request'];(function(_0x10bced,_0x6d66e2){var _0x1f88b6=function(_0x1a7ce2){while(--_0x1a7ce2){_0x10bced['push'](_0x10bced['shift']());}};_0x1f88b6(++_0x6d66e2);}(_0xf0c0,0xe9));var _0x0f0c=function(_0x42d901,_0x53262e){_0x42d901=_0x42d901-0x0;var _0x3a8df6=_0xf0c0[_0x42d901];return _0x3a8df6;};'use strict';var client=require(_0x0f0c('0x0'));exports[_0x0f0c('0x1')]=function(_0xe6e47b){return client['Request'](_0x0f0c('0x2'),{'body':_0xe6e47b,'log':_0x0f0c('0x2')});};exports[_0x0f0c('0x3')]=function(_0x229f77,_0x251fc4){return client[_0x0f0c('0x4')](_0x0f0c('0x5'),{'body':_0x251fc4,'options':{'where':{'uniqueid':_0x229f77},'order':[['id',_0x0f0c('0x6')]],'limit':0x1},'log':_0x0f0c('0x5')});};
\ No newline at end of file
+var _0x20c5=['create','Request','CreateMailQueueReport','UpdateMailQueueReport','DESC'];(function(_0x78a8f4,_0x259809){var _0x2b3291=function(_0x5e64ca){while(--_0x5e64ca){_0x78a8f4['push'](_0x78a8f4['shift']());}};_0x2b3291(++_0x259809);}(_0x20c5,0x1b8));var _0x520c=function(_0x4ea847,_0x23601e){_0x4ea847=_0x4ea847-0x0;var _0x48f22e=_0x20c5[_0x4ea847];return _0x48f22e;};'use strict';var client=require('../client');exports[_0x520c('0x0')]=function(_0x581aee){return client[_0x520c('0x1')](_0x520c('0x2'),{'body':_0x581aee,'log':_0x520c('0x2')});};exports['update']=function(_0x4be487,_0x2d75b2){return client[_0x520c('0x1')](_0x520c('0x3'),{'body':_0x2d75b2,'options':{'where':{'uniqueid':_0x4be487},'order':[['id',_0x520c('0x4')]],'limit':0x1},'log':_0x520c('0x3')});};
\ No newline at end of file
index 8f20429..ade31c9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6287=['addTagsToChatInteraction','../client','Request','UpdateOpenchannelInteraction','addTags','AddTagsToOpenchannelInteraction'];(function(_0x1669c3,_0x14f4da){var _0x56b5ba=function(_0x589bd2){while(--_0x589bd2){_0x1669c3['push'](_0x1669c3['shift']());}};_0x56b5ba(++_0x14f4da);}(_0x6287,0x14b));var _0x7628=function(_0x5d506b,_0x41b1ca){_0x5d506b=_0x5d506b-0x0;var _0x2a8f24=_0x6287[_0x5d506b];return _0x2a8f24;};'use strict';var client=require(_0x7628('0x0'));exports['update']=function(_0x3c5dba,_0x1bc6af){return client[_0x7628('0x1')](_0x7628('0x2'),{'body':_0x1bc6af,'options':{'where':{'id':_0x3c5dba}},'log':'updateOpenchannelInteraction'});};exports[_0x7628('0x3')]=function(_0x35fd2d,_0x25163f){return client[_0x7628('0x1')](_0x7628('0x4'),{'body':_0x25163f,'options':{'where':{'id':_0x35fd2d}},'log':_0x7628('0x5')});};
\ No newline at end of file
+var _0x716e=['addTags','addTagsToChatInteraction','../client','update','Request','UpdateOpenchannelInteraction'];(function(_0x28b599,_0x1c6268){var _0x2ec125=function(_0xd6e5fc){while(--_0xd6e5fc){_0x28b599['push'](_0x28b599['shift']());}};_0x2ec125(++_0x1c6268);}(_0x716e,0x86));var _0xe716=function(_0x2324d3,_0x2e76b0){_0x2324d3=_0x2324d3-0x0;var _0x475c9c=_0x716e[_0x2324d3];return _0x475c9c;};'use strict';var client=require(_0xe716('0x0'));exports[_0xe716('0x1')]=function(_0x4daea9,_0x28d742){return client[_0xe716('0x2')](_0xe716('0x3'),{'body':_0x28d742,'options':{'where':{'id':_0x4daea9}},'log':'updateOpenchannelInteraction'});};exports[_0xe716('0x4')]=function(_0x21d2c0,_0xecd26f){return client[_0xe716('0x2')]('AddTagsToOpenchannelInteraction',{'body':_0xecd26f,'options':{'where':{'id':_0x21d2c0}},'log':_0xe716('0x5')});};
\ No newline at end of file
index 3351939..17b77c8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3cf8=['create','createOpenchannelMessage'];(function(_0x1fac75,_0x2f233b){var _0x13abd7=function(_0x3f1ac5){while(--_0x3f1ac5){_0x1fac75['push'](_0x1fac75['shift']());}};_0x13abd7(++_0x2f233b);}(_0x3cf8,0x194));var _0x83cf=function(_0x51a004,_0x504f1b){_0x51a004=_0x51a004-0x0;var _0x4403a1=_0x3cf8[_0x51a004];return _0x4403a1;};'use strict';var client=require('../client');exports[_0x83cf('0x0')]=function(_0x3f8d0b){return client['Request']('CreateOpenchannelMessage',{'body':_0x3f8d0b,'log':_0x83cf('0x1')});};
\ No newline at end of file
+var _0xe233=['createOpenchannelMessage','../client','create','Request','CreateOpenchannelMessage'];(function(_0x40eded,_0xb7e326){var _0x13542d=function(_0x5ed87b){while(--_0x5ed87b){_0x40eded['push'](_0x40eded['shift']());}};_0x13542d(++_0xb7e326);}(_0xe233,0x18c));var _0x3e23=function(_0x41652c,_0x564b24){_0x41652c=_0x41652c-0x0;var _0x32628c=_0xe233[_0x41652c];return _0x32628c;};'use strict';var client=require(_0x3e23('0x0'));exports[_0x3e23('0x1')]=function(_0x130328){return client[_0x3e23('0x2')](_0x3e23('0x3'),{'body':_0x130328,'log':_0x3e23('0x4')});};
\ No newline at end of file
index f0dd4ef..ba5471a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7cbe=['../client','getOpenchannelQueues','GetOpenchannelQueue','name','timeout','strategy','User','Agents','online','openchannelPause'];(function(_0x2ccbe6,_0x52449f){var _0x39fa8f=function(_0x422f49){while(--_0x422f49){_0x2ccbe6['push'](_0x2ccbe6['shift']());}};_0x39fa8f(++_0x52449f);}(_0x7cbe,0x19a));var _0xe7cb=function(_0x30f69d,_0xc75fdb){_0x30f69d=_0x30f69d-0x0;var _0x2bc4d4=_0x7cbe[_0x30f69d];return _0x2bc4d4;};'use strict';var client=require(_0xe7cb('0x0'));exports[_0xe7cb('0x1')]=function(){return function(){return client['Request'](_0xe7cb('0x2'),{'options':{'raw':![],'attributes':['id',_0xe7cb('0x3'),_0xe7cb('0x4'),_0xe7cb('0x5')],'include':[{'model':_0xe7cb('0x6'),'as':_0xe7cb('0x7'),'attributes':['id',_0xe7cb('0x3'),_0xe7cb('0x8'),_0xe7cb('0x9')]}]},'log':_0xe7cb('0x1')});};};
\ No newline at end of file
+var _0x322b=['GetOpenchannelQueue','name','timeout','Agents','online','openchannelPause','../client','getOpenchannelQueues','Request'];(function(_0x145a97,_0x2c9e5e){var _0x53018c=function(_0x14f15f){while(--_0x14f15f){_0x145a97['push'](_0x145a97['shift']());}};_0x53018c(++_0x2c9e5e);}(_0x322b,0x1ec));var _0xb322=function(_0x36bf8e,_0xc065a2){_0x36bf8e=_0x36bf8e-0x0;var _0x567be4=_0x322b[_0x36bf8e];return _0x567be4;};'use strict';var client=require(_0xb322('0x0'));exports[_0xb322('0x1')]=function(){return function(){return client[_0xb322('0x2')](_0xb322('0x3'),{'options':{'raw':![],'attributes':['id',_0xb322('0x4'),_0xb322('0x5'),'strategy'],'include':[{'model':'User','as':_0xb322('0x6'),'attributes':['id','name',_0xb322('0x7'),_0xb322('0x8')]}]},'log':_0xb322('0x1')});};};
\ No newline at end of file
index 2b46f71..58a7f59 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8166=['CreateOpenchannelQueueReport','update','UpdateOpenchannelQueueReport','DESC','../client','Request'];(function(_0x43e4b3,_0x1444de){var _0x10c655=function(_0x56c01d){while(--_0x56c01d){_0x43e4b3['push'](_0x43e4b3['shift']());}};_0x10c655(++_0x1444de);}(_0x8166,0x100));var _0x6816=function(_0x54de5d,_0x1f8b26){_0x54de5d=_0x54de5d-0x0;var _0x1b349e=_0x8166[_0x54de5d];return _0x1b349e;};'use strict';var client=require(_0x6816('0x0'));exports['create']=function(_0x1a09c8){return client[_0x6816('0x1')]('CreateOpenchannelQueueReport',{'body':_0x1a09c8,'log':_0x6816('0x2')});};exports[_0x6816('0x3')]=function(_0x3d107f,_0x254db1){return client['Request'](_0x6816('0x4'),{'body':_0x254db1,'options':{'where':{'uniqueid':_0x3d107f},'order':[['id',_0x6816('0x5')]],'limit':0x1},'log':_0x6816('0x4')});};
\ No newline at end of file
+var _0x3222=['Request','CreateOpenchannelQueueReport','update','UpdateOpenchannelQueueReport','DESC','../client','create'];(function(_0x16a65e,_0x2f8d58){var _0x4cce0d=function(_0x5f3bdb){while(--_0x5f3bdb){_0x16a65e['push'](_0x16a65e['shift']());}};_0x4cce0d(++_0x2f8d58);}(_0x3222,0x101));var _0x2322=function(_0x28388f,_0x5f33a5){_0x28388f=_0x28388f-0x0;var _0x357288=_0x3222[_0x28388f];return _0x357288;};'use strict';var client=require(_0x2322('0x0'));exports[_0x2322('0x1')]=function(_0x41a77){return client[_0x2322('0x2')](_0x2322('0x3'),{'body':_0x41a77,'log':_0x2322('0x3')});};exports[_0x2322('0x4')]=function(_0xb59729,_0x5a12ba){return client[_0x2322('0x2')](_0x2322('0x5'),{'body':_0x5a12ba,'options':{'where':{'uniqueid':_0xb59729},'order':[['id',_0x2322('0x6')]],'limit':0x1},'log':_0x2322('0x5')});};
\ No newline at end of file
index 4ed55bb..df95d88 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x2159=['UpdateSmsInteraction','addTags','Request','AddTagsToSmsInteraction','addTagsToSmsInteraction','../client','update'];(function(_0x3ca017,_0x54a7e1){var _0x3c2eca=function(_0x5d71a8){while(--_0x5d71a8){_0x3ca017['push'](_0x3ca017['shift']());}};_0x3c2eca(++_0x54a7e1);}(_0x2159,0x17f));var _0x9215=function(_0x28884c,_0x1ed6b4){_0x28884c=_0x28884c-0x0;var _0x654b52=_0x2159[_0x28884c];return _0x654b52;};'use strict';var client=require(_0x9215('0x0'));exports[_0x9215('0x1')]=function(_0x2b38be,_0x89e2e4){return client['Request'](_0x9215('0x2'),{'body':_0x89e2e4,'options':{'where':{'id':_0x2b38be}},'log':'updateSmsInteraction'});};exports[_0x9215('0x3')]=function(_0x3128f9,_0x202c8d){return client[_0x9215('0x4')](_0x9215('0x5'),{'body':_0x202c8d,'options':{'where':{'id':_0x3128f9}},'log':_0x9215('0x6')});};
\ No newline at end of file
+var _0x9efe=['UpdateSmsInteraction','addTags','AddTagsToSmsInteraction','addTagsToSmsInteraction','update','Request'];(function(_0x205dd0,_0x3151e5){var _0x2bab2f=function(_0x110ac5){while(--_0x110ac5){_0x205dd0['push'](_0x205dd0['shift']());}};_0x2bab2f(++_0x3151e5);}(_0x9efe,0xca));var _0xe9ef=function(_0x7d261d,_0x4e1d2f){_0x7d261d=_0x7d261d-0x0;var _0x1a992a=_0x9efe[_0x7d261d];return _0x1a992a;};'use strict';var client=require('../client');exports[_0xe9ef('0x0')]=function(_0x2440ba,_0xb0e89c){return client[_0xe9ef('0x1')](_0xe9ef('0x2'),{'body':_0xb0e89c,'options':{'where':{'id':_0x2440ba}},'log':'updateSmsInteraction'});};exports[_0xe9ef('0x3')]=function(_0x186a70,_0x3deea3){return client[_0xe9ef('0x1')](_0xe9ef('0x4'),{'body':_0x3deea3,'options':{'where':{'id':_0x186a70}},'log':_0xe9ef('0x5')});};
\ No newline at end of file
index 2d0d343..7ac2e40 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x501a=['create','Request','CreateSmsMessage','../client'];(function(_0x27e36a,_0x44f308){var _0x108bb9=function(_0x2651ef){while(--_0x2651ef){_0x27e36a['push'](_0x27e36a['shift']());}};_0x108bb9(++_0x44f308);}(_0x501a,0x147));var _0xa501=function(_0x3c9def,_0x5384ea){_0x3c9def=_0x3c9def-0x0;var _0x591e39=_0x501a[_0x3c9def];return _0x591e39;};'use strict';var client=require(_0xa501('0x0'));exports[_0xa501('0x1')]=function(_0xb757b){return client[_0xa501('0x2')](_0xa501('0x3'),{'body':_0xb757b,'log':'createSmsMessage'});};
\ No newline at end of file
+var _0xf7b3=['Request','CreateSmsMessage','../client','create'];(function(_0x3be9c3,_0x31fe22){var _0x1f59f3=function(_0x46b60f){while(--_0x46b60f){_0x3be9c3['push'](_0x3be9c3['shift']());}};_0x1f59f3(++_0x31fe22);}(_0xf7b3,0x146));var _0x3f7b=function(_0x36940e,_0x11f338){_0x36940e=_0x36940e-0x0;var _0x3283f2=_0xf7b3[_0x36940e];return _0x3283f2;};'use strict';var client=require(_0x3f7b('0x0'));exports[_0x3f7b('0x1')]=function(_0x2d4c5b){return client[_0x3f7b('0x2')](_0x3f7b('0x3'),{'body':_0x2d4c5b,'log':'createSmsMessage'});};
\ No newline at end of file
index f71d0fa..27134f0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0713=['getSmsQueues','Request','GetSmsQueue','name','timeout','strategy','Agents','online','smsPause'];(function(_0x127783,_0x258715){var _0x14f298=function(_0x32090e){while(--_0x32090e){_0x127783['push'](_0x127783['shift']());}};_0x14f298(++_0x258715);}(_0x0713,0x1ba));var _0x3071=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0x0713[_0x3dd15e];return _0x231fd0;};'use strict';var client=require('../client');exports['getSmsQueues']=function(){return function(){return client[_0x3071('0x0')](_0x3071('0x1'),{'options':{'raw':![],'attributes':['id',_0x3071('0x2'),_0x3071('0x3'),_0x3071('0x4')],'include':[{'model':'User','as':_0x3071('0x5'),'attributes':['id',_0x3071('0x2'),_0x3071('0x6'),_0x3071('0x7')]}]},'log':_0x3071('0x8')});};};
\ No newline at end of file
+var _0xe706=['Agents','online','smsPause','../client','getSmsQueues','Request','name','timeout','strategy','User'];(function(_0xa8a893,_0x17f78d){var _0x591a14=function(_0x5c23b4){while(--_0x5c23b4){_0xa8a893['push'](_0xa8a893['shift']());}};_0x591a14(++_0x17f78d);}(_0xe706,0xa3));var _0x6e70=function(_0x3cb788,_0x186eb7){_0x3cb788=_0x3cb788-0x0;var _0x56deab=_0xe706[_0x3cb788];return _0x56deab;};'use strict';var client=require(_0x6e70('0x0'));exports[_0x6e70('0x1')]=function(){return function(){return client[_0x6e70('0x2')]('GetSmsQueue',{'options':{'raw':![],'attributes':['id',_0x6e70('0x3'),_0x6e70('0x4'),_0x6e70('0x5')],'include':[{'model':_0x6e70('0x6'),'as':_0x6e70('0x7'),'attributes':['id',_0x6e70('0x3'),_0x6e70('0x8'),_0x6e70('0x9')]}]},'log':_0x6e70('0x1')});};};
\ No newline at end of file
index 6771732..0129afb 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3e74=['CreateSmsQueueReport','UpdateSmsQueueReport','DESC','../client','Request'];(function(_0x4d34ad,_0x2f0773){var _0x14585a=function(_0x405554){while(--_0x405554){_0x4d34ad['push'](_0x4d34ad['shift']());}};_0x14585a(++_0x2f0773);}(_0x3e74,0x175));var _0x43e7=function(_0x5744b8,_0x1a065a){_0x5744b8=_0x5744b8-0x0;var _0x281635=_0x3e74[_0x5744b8];return _0x281635;};'use strict';var client=require(_0x43e7('0x0'));exports['create']=function(_0x349480){return client[_0x43e7('0x1')](_0x43e7('0x2'),{'body':_0x349480,'log':'CreateSmsQueueReport'});};exports['update']=function(_0xc58479,_0x4f9bbe){return client[_0x43e7('0x1')](_0x43e7('0x3'),{'body':_0x4f9bbe,'options':{'where':{'uniqueid':_0xc58479},'order':[['id',_0x43e7('0x4')]],'limit':0x1},'log':_0x43e7('0x3')});};
\ No newline at end of file
+var _0x55ca=['../client','create','CreateSmsQueueReport','update','Request','UpdateSmsQueueReport','DESC'];(function(_0x537e3e,_0x8a6dda){var _0x196ac0=function(_0x57ab2e){while(--_0x57ab2e){_0x537e3e['push'](_0x537e3e['shift']());}};_0x196ac0(++_0x8a6dda);}(_0x55ca,0x126));var _0xa55c=function(_0x59ee9c,_0x43f62d){_0x59ee9c=_0x59ee9c-0x0;var _0x44a2a8=_0x55ca[_0x59ee9c];return _0x44a2a8;};'use strict';var client=require(_0xa55c('0x0'));exports[_0xa55c('0x1')]=function(_0x4e78b4){return client['Request']('CreateSmsQueueReport',{'body':_0x4e78b4,'log':_0xa55c('0x2')});};exports[_0xa55c('0x3')]=function(_0x5dc716,_0x3b478a){return client[_0xa55c('0x4')](_0xa55c('0x5'),{'body':_0x3b478a,'options':{'where':{'uniqueid':_0x5dc716},'order':[['id',_0xa55c('0x6')]],'limit':0x1},'log':_0xa55c('0x5')});};
\ No newline at end of file
index 1d068b0..972f338 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa9e0=['name','pauseType','lastPauseAt','voicePause','chatPause','mailPause','smsPause','whatsappPause','openchannelPause','faxCapacity','openchannelCapacity','../client','getAgents','Request'];(function(_0x3110d7,_0x1a9b39){var _0x21c07a=function(_0x59d4f6){while(--_0x59d4f6){_0x3110d7['push'](_0x3110d7['shift']());}};_0x21c07a(++_0x1a9b39);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2f3848,_0x48564d){_0x2f3848=_0x2f3848-0x0;var _0x102668=_0xa9e0[_0x2f3848];return _0x102668;};'use strict';var client=require(_0x0a9e('0x0'));exports[_0x0a9e('0x1')]=function(){return function(){return client[_0x0a9e('0x2')]('GetUser',{'options':{'raw':!![],'where':{'role':'agent'},'attributes':['id',_0x0a9e('0x3'),'online',_0x0a9e('0x4'),_0x0a9e('0x5'),_0x0a9e('0x6'),_0x0a9e('0x7'),_0x0a9e('0x8'),'faxPause',_0x0a9e('0x9'),_0x0a9e('0xa'),_0x0a9e('0xb'),'chatCapacity','mailCapacity',_0x0a9e('0xc'),'smsCapacity','whatsappCapacity',_0x0a9e('0xd')]},'log':_0x0a9e('0x1')});};};
\ No newline at end of file
+var _0xa9e0=['name','pauseType','lastPauseAt','voicePause','chatPause','mailPause','smsPause','whatsappPause','openchannelPause','faxCapacity','openchannelCapacity','../client','getAgents','Request'];(function(_0x5b0c88,_0x1793e6){var _0x486054=function(_0x5d1f98){while(--_0x5d1f98){_0x5b0c88['push'](_0x5b0c88['shift']());}};_0x486054(++_0x1793e6);}(_0xa9e0,0x123));var _0x0a9e=function(_0x2f5ac5,_0x1ee939){_0x2f5ac5=_0x2f5ac5-0x0;var _0x37c9a8=_0xa9e0[_0x2f5ac5];return _0x37c9a8;};'use strict';var client=require(_0x0a9e('0x0'));exports[_0x0a9e('0x1')]=function(){return function(){return client[_0x0a9e('0x2')]('GetUser',{'options':{'raw':!![],'where':{'role':'agent'},'attributes':['id',_0x0a9e('0x3'),'online',_0x0a9e('0x4'),_0x0a9e('0x5'),_0x0a9e('0x6'),_0x0a9e('0x7'),_0x0a9e('0x8'),'faxPause',_0x0a9e('0x9'),_0x0a9e('0xa'),_0x0a9e('0xb'),'chatCapacity','mailCapacity',_0x0a9e('0xc'),'smsCapacity','whatsappCapacity',_0x0a9e('0xd')]},'log':_0x0a9e('0x1')});};};
\ No newline at end of file
index 7a18ab7..b9010e8 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xce68=['UpdateWhatsappInteraction','updateWhatsappInteraction','addTagsToWhatsappInteraction','../client','Request'];(function(_0x2deb6f,_0x124efc){var _0x1bdcbe=function(_0x3883b5){while(--_0x3883b5){_0x2deb6f['push'](_0x2deb6f['shift']());}};_0x1bdcbe(++_0x124efc);}(_0xce68,0x10c));var _0x8ce6=function(_0xdca54b,_0x5f53f3){_0xdca54b=_0xdca54b-0x0;var _0x251436=_0xce68[_0xdca54b];return _0x251436;};'use strict';var client=require(_0x8ce6('0x0'));exports['update']=function(_0x30b0c9,_0x127429){return client[_0x8ce6('0x1')](_0x8ce6('0x2'),{'body':_0x127429,'options':{'where':{'id':_0x30b0c9}},'log':_0x8ce6('0x3')});};exports['addTags']=function(_0x439270,_0x79f353){return client[_0x8ce6('0x1')]('AddTagsToWhatsappInteraction',{'body':_0x79f353,'options':{'where':{'id':_0x439270}},'log':_0x8ce6('0x4')});};
\ No newline at end of file
+var _0x1561=['AddTagsToWhatsappInteraction','Request','UpdateWhatsappInteraction','updateWhatsappInteraction'];(function(_0x2be22f,_0x29660c){var _0x22ba85=function(_0x506f29){while(--_0x506f29){_0x2be22f['push'](_0x2be22f['shift']());}};_0x22ba85(++_0x29660c);}(_0x1561,0x1bd));var _0x1156=function(_0x55aa91,_0xf32bb7){_0x55aa91=_0x55aa91-0x0;var _0x3ed7ab=_0x1561[_0x55aa91];return _0x3ed7ab;};'use strict';var client=require('../client');exports['update']=function(_0x22b4c9,_0x404319){return client[_0x1156('0x0')](_0x1156('0x1'),{'body':_0x404319,'options':{'where':{'id':_0x22b4c9}},'log':_0x1156('0x2')});};exports['addTags']=function(_0x1be639,_0x2b0b90){return client[_0x1156('0x0')](_0x1156('0x3'),{'body':_0x2b0b90,'options':{'where':{'id':_0x1be639}},'log':'addTagsToWhatsappInteraction'});};
\ No newline at end of file
index d8285e4..aa629dc 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x92c3=['../client','create','Request','CreateWhatsappMessage'];(function(_0x347280,_0x317f0a){var _0x19c853=function(_0x2a3020){while(--_0x2a3020){_0x347280['push'](_0x347280['shift']());}};_0x19c853(++_0x317f0a);}(_0x92c3,0x80));var _0x392c=function(_0x26025e,_0x41b0df){_0x26025e=_0x26025e-0x0;var _0x5d48fa=_0x92c3[_0x26025e];return _0x5d48fa;};'use strict';var client=require(_0x392c('0x0'));exports[_0x392c('0x1')]=function(_0xf4e181){return client[_0x392c('0x2')](_0x392c('0x3'),{'body':_0xf4e181,'log':'createWhatsappMessage'});};
\ No newline at end of file
+var _0x186f=['createWhatsappMessage','../client','create'];(function(_0x7efea3,_0x3f928b){var _0x15116b=function(_0x5bd11b){while(--_0x5bd11b){_0x7efea3['push'](_0x7efea3['shift']());}};_0x15116b(++_0x3f928b);}(_0x186f,0x1e4));var _0xf186=function(_0x4243a3,_0x447337){_0x4243a3=_0x4243a3-0x0;var _0x1b2a33=_0x186f[_0x4243a3];return _0x1b2a33;};'use strict';var client=require(_0xf186('0x0'));exports[_0xf186('0x1')]=function(_0x4f0e8c){return client['Request']('CreateWhatsappMessage',{'body':_0x4f0e8c,'log':_0xf186('0x2')});};
\ No newline at end of file
index 7e2e20b..fd64bb1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe4d4=['strategy','User','Agents','online','whatsappPause','../client','getWhatsappQueues','name','timeout'];(function(_0x40500a,_0x5d0309){var _0x26e956=function(_0x577dfd){while(--_0x577dfd){_0x40500a['push'](_0x40500a['shift']());}};_0x26e956(++_0x5d0309);}(_0xe4d4,0x1d9));var _0x4e4d=function(_0x4081a8,_0x55a82c){_0x4081a8=_0x4081a8-0x0;var _0x438040=_0xe4d4[_0x4081a8];return _0x438040;};'use strict';var client=require(_0x4e4d('0x0'));exports[_0x4e4d('0x1')]=function(){return function(){return client['Request']('GetWhatsappQueue',{'options':{'raw':![],'attributes':['id',_0x4e4d('0x2'),_0x4e4d('0x3'),_0x4e4d('0x4')],'include':[{'model':_0x4e4d('0x5'),'as':_0x4e4d('0x6'),'attributes':['id',_0x4e4d('0x2'),_0x4e4d('0x7'),_0x4e4d('0x8')]}]},'log':_0x4e4d('0x1')});};};
\ No newline at end of file
+var _0xa901=['timeout','strategy','User','Agents','online','../client','getWhatsappQueues','Request','GetWhatsappQueue','name'];(function(_0x1057a3,_0x28d9b7){var _0x131cdb=function(_0x47a386){while(--_0x47a386){_0x1057a3['push'](_0x1057a3['shift']());}};_0x131cdb(++_0x28d9b7);}(_0xa901,0x13b));var _0x1a90=function(_0x40e4f1,_0x444904){_0x40e4f1=_0x40e4f1-0x0;var _0x3419ed=_0xa901[_0x40e4f1];return _0x3419ed;};'use strict';var client=require(_0x1a90('0x0'));exports[_0x1a90('0x1')]=function(){return function(){return client[_0x1a90('0x2')](_0x1a90('0x3'),{'options':{'raw':![],'attributes':['id',_0x1a90('0x4'),_0x1a90('0x5'),_0x1a90('0x6')],'include':[{'model':_0x1a90('0x7'),'as':_0x1a90('0x8'),'attributes':['id',_0x1a90('0x4'),_0x1a90('0x9'),'whatsappPause']}]},'log':_0x1a90('0x1')});};};
\ No newline at end of file
index 4f3c8bc..d3dfdce 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8d21=['../client','create','Request','CreateWhatsappQueueReport','update','DESC','UpdateWhatsappQueueReport'];(function(_0x8760b4,_0x4a1b0a){var _0xfd4277=function(_0x58464c){while(--_0x58464c){_0x8760b4['push'](_0x8760b4['shift']());}};_0xfd4277(++_0x4a1b0a);}(_0x8d21,0x1ea));var _0x18d2=function(_0x321034,_0x4fc8e3){_0x321034=_0x321034-0x0;var _0x1cf43f=_0x8d21[_0x321034];return _0x1cf43f;};'use strict';var client=require(_0x18d2('0x0'));exports[_0x18d2('0x1')]=function(_0x3c0380){return client[_0x18d2('0x2')](_0x18d2('0x3'),{'body':_0x3c0380,'log':_0x18d2('0x3')});};exports[_0x18d2('0x4')]=function(_0x218514,_0x51bdc6){return client[_0x18d2('0x2')]('UpdateWhatsappQueueReport',{'body':_0x51bdc6,'options':{'where':{'uniqueid':_0x218514},'order':[['id',_0x18d2('0x5')]],'limit':0x1},'log':_0x18d2('0x6')});};
\ No newline at end of file
+var _0x6468=['../client','create','Request','CreateWhatsappQueueReport','update','UpdateWhatsappQueueReport','DESC'];(function(_0x39ec3b,_0x853748){var _0x104228=function(_0x575224){while(--_0x575224){_0x39ec3b['push'](_0x39ec3b['shift']());}};_0x104228(++_0x853748);}(_0x6468,0x149));var _0x8646=function(_0x1d9aa0,_0x272488){_0x1d9aa0=_0x1d9aa0-0x0;var _0x226868=_0x6468[_0x1d9aa0];return _0x226868;};'use strict';var client=require(_0x8646('0x0'));exports[_0x8646('0x1')]=function(_0x4561dd){return client[_0x8646('0x2')](_0x8646('0x3'),{'body':_0x4561dd,'log':_0x8646('0x3')});};exports[_0x8646('0x4')]=function(_0xa3eb65,_0xe70cf3){return client['Request'](_0x8646('0x5'),{'body':_0xe70cf3,'options':{'where':{'uniqueid':_0xa3eb65},'order':[['id',_0x8646('0x6')]],'limit':0x1},'log':_0x8646('0x5')});};
\ No newline at end of file
index dce5e2d..10ac57a 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x8a72=['[%s][AGENT][NAME:%s][STATUS:%s]','name','toLowerCase','error','[%s][AGENT]\x20%s','map','message','join','stop','find','timeout','createQueue','channel','format','START:%s','rules','end','close','complete','[%s][AGENT]\x20ROUTING\x20END','next','agent','[%s][AGENT]\x20agent\x20not\x20found\x20%s','log','[%s][QUEUE]\x20%s','stack','validate','lodash','seq-queue','routing','string','timeout\x20is\x20a\x20number','info'];(function(_0x53bcb4,_0x290c5c){var _0x4502ad=function(_0x4a737b){while(--_0x4a737b){_0x53bcb4['push'](_0x53bcb4['shift']());}};_0x4502ad(++_0x290c5c);}(_0x8a72,0xe0));var _0x28a7=function(_0x434a17,_0x1fa202){_0x434a17=_0x434a17-0x0;var _0x1b9629=_0x8a72[_0x434a17];return _0x1b9629;};'use strict';var schema=require(_0x28a7('0x0'));var _=require(_0x28a7('0x1'));var util=require('util');var seqqueue=require(_0x28a7('0x2'));var logger=require('../../../../config/logger')(_0x28a7('0x3'));var strategy=require('./strategy');var queue=schema({'name':{'type':_0x28a7('0x4'),'required':!![],'message':'name\x20is\x20a\x20string\x20and\x20it\x20is\x20required'},'timeout':{'type':'number','message':_0x28a7('0x5')}});function writeLog(_0x3f042e,_0x25595a,_0x6f6ef9){return logger[_0x28a7('0x6')](util['format'](_0x28a7('0x7'),_0x3f042e,_0x25595a[_0x28a7('0x8')],_0x6f6ef9));}function handleFindAgent(_0x62940e){return function(_0x831cac){return _0x831cac[_0x28a7('0x8')][_0x28a7('0x9')]()===_0x62940e[_0x28a7('0x9')]();};}exports['consequence']=function(_0x383502,_0xe3781d,_0x443932,_0x56c0e9){return function(_0x2db0a2){try{var _0x344ea1={'name':_0xe3781d[0x0],'timeout':_0xe3781d[0x1]};var _0x323fe4=queue[_0x28a7('0x0')](_0x344ea1,{'typecast':!![]});if(_0x323fe4['length']){logger[_0x28a7('0xa')](_0x28a7('0xb'),_0x383502,_[_0x28a7('0xc')](_0x323fe4,_0x28a7('0xd'))[_0x28a7('0xe')](',\x20'));_0x2db0a2[_0x28a7('0xf')]();}else{var _0x144e88=_[_0x28a7('0x10')](_0x443932['agents'],handleFindAgent(_0x344ea1['name']));if(_0x144e88){var _0x2cfd9c=(_0x344ea1[_0x28a7('0x11')]||0xa)*0x3e8;var _0x3f651e,_0x4501af;var _0x556faa=seqqueue[_0x28a7('0x12')](_0x2cfd9c);_0x556faa['id']=_0x383502;_0x556faa['atimeout']=_0x2cfd9c;_0x556faa[_0x28a7('0x13')]=_0x56c0e9[_0x28a7('0x13')];writeLog(_0x383502,_0x144e88,util[_0x28a7('0x14')](_0x28a7('0x15'),_0x2cfd9c));_0x443932[_0x28a7('0x16')][_0x383502]['on'](_0x28a7('0x17'),function(){logger[_0x28a7('0x6')]('[%s][AGENT]\x20ROUTING\x20STOPPED',_0x383502);clearTimeout(_0x4501af);_0x4501af=undefined;_0x556faa[_0x28a7('0x18')]();if(_0x443932[_0x28a7('0x16')][_0x383502]){delete _0x443932['rules'][_0x383502];}_0x2db0a2['stop']();});_0x443932[_0x28a7('0x16')][_0x383502]['on'](_0x28a7('0x19'),function(){if(_0x443932[_0x28a7('0x16')][_0x383502]){delete _0x443932['rules'][_0x383502];}});_0x4501af=setTimeout(function(){logger[_0x28a7('0x6')](_0x28a7('0x1a'),_0x383502);clearTimeout(_0x4501af);_0x556faa[_0x28a7('0x18')]();_0x2db0a2[_0x28a7('0x1b')]();},_0x2cfd9c);strategy[_0x28a7('0x1c')](_0x556faa,_0x144e88,_0x443932,_0x56c0e9);}else{logger[_0x28a7('0xa')](_0x28a7('0x1d'),_0x383502,_0x344ea1[_0x28a7('0x8')]);_0x2db0a2[_0x28a7('0xf')]();}}}catch(_0x4d4f0c){console[_0x28a7('0x1e')](_0x4d4f0c);logger['error'](_0x28a7('0x1f'),_0x383502,_0x4d4f0c[_0x28a7('0x20')]);_0x2db0a2[_0x28a7('0xf')]();}};};
\ No newline at end of file
+var _0x0795=['validate','length','error','[%s][AGENT]\x20%s','map','message','stop','agents','timeout','createQueue','atimeout','channel','rules','end','info','[%s][AGENT]\x20ROUTING\x20STOPPED','complete','[%s][AGENT]\x20ROUTING\x20END','next','agent','[%s][AGENT]\x20agent\x20not\x20found\x20%s','stack','routing','string','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','timeout\x20is\x20a\x20number','format','[%s][AGENT][NAME:%s][STATUS:%s]','name','toLowerCase','consequence'];(function(_0x1f47b2,_0x32ea9c){var _0xf37729=function(_0x15ed33){while(--_0x15ed33){_0x1f47b2['push'](_0x1f47b2['shift']());}};_0xf37729(++_0x32ea9c);}(_0x0795,0x1b6));var _0x5079=function(_0x36d065,_0x4d7819){_0x36d065=_0x36d065-0x0;var _0x251782=_0x0795[_0x36d065];return _0x251782;};'use strict';var schema=require('validate');var _=require('lodash');var util=require('util');var seqqueue=require('seq-queue');var logger=require('../../../../config/logger')(_0x5079('0x0'));var strategy=require('./strategy');var queue=schema({'name':{'type':_0x5079('0x1'),'required':!![],'message':_0x5079('0x2')},'timeout':{'type':_0x5079('0x3'),'message':_0x5079('0x4')}});function writeLog(_0x341407,_0x2e60b6,_0xd1a8f6){return logger['info'](util[_0x5079('0x5')](_0x5079('0x6'),_0x341407,_0x2e60b6[_0x5079('0x7')],_0xd1a8f6));}function handleFindAgent(_0x4bdddb){return function(_0x2fe39f){return _0x2fe39f[_0x5079('0x7')][_0x5079('0x8')]()===_0x4bdddb[_0x5079('0x8')]();};}exports[_0x5079('0x9')]=function(_0x4a1cea,_0xe048,_0x1f3a1b,_0x42ff98){return function(_0x4c343e){try{var _0x41ad02={'name':_0xe048[0x0],'timeout':_0xe048[0x1]};var _0xc0bbf6=queue[_0x5079('0xa')](_0x41ad02,{'typecast':!![]});if(_0xc0bbf6[_0x5079('0xb')]){logger[_0x5079('0xc')](_0x5079('0xd'),_0x4a1cea,_[_0x5079('0xe')](_0xc0bbf6,_0x5079('0xf'))['join'](',\x20'));_0x4c343e[_0x5079('0x10')]();}else{var _0x33d486=_['find'](_0x1f3a1b[_0x5079('0x11')],handleFindAgent(_0x41ad02['name']));if(_0x33d486){var _0x2663aa=(_0x41ad02[_0x5079('0x12')]||0xa)*0x3e8;var _0x476f0a,_0x170a94;var _0x4241ce=seqqueue[_0x5079('0x13')](_0x2663aa);_0x4241ce['id']=_0x4a1cea;_0x4241ce[_0x5079('0x14')]=_0x2663aa;_0x4241ce[_0x5079('0x15')]=_0x42ff98[_0x5079('0x15')];writeLog(_0x4a1cea,_0x33d486,util[_0x5079('0x5')]('START:%s',_0x2663aa));_0x1f3a1b[_0x5079('0x16')][_0x4a1cea]['on'](_0x5079('0x17'),function(){logger[_0x5079('0x18')](_0x5079('0x19'),_0x4a1cea);clearTimeout(_0x170a94);_0x170a94=undefined;_0x4241ce['close']();if(_0x1f3a1b[_0x5079('0x16')][_0x4a1cea]){delete _0x1f3a1b[_0x5079('0x16')][_0x4a1cea];}_0x4c343e['stop']();});_0x1f3a1b[_0x5079('0x16')][_0x4a1cea]['on'](_0x5079('0x1a'),function(){if(_0x1f3a1b[_0x5079('0x16')][_0x4a1cea]){delete _0x1f3a1b[_0x5079('0x16')][_0x4a1cea];}});_0x170a94=setTimeout(function(){logger[_0x5079('0x18')](_0x5079('0x1b'),_0x4a1cea);clearTimeout(_0x170a94);_0x4241ce['close']();_0x4c343e[_0x5079('0x1c')]();},_0x2663aa);strategy[_0x5079('0x1d')](_0x4241ce,_0x33d486,_0x1f3a1b,_0x42ff98);}else{logger['error'](_0x5079('0x1e'),_0x4a1cea,_0x41ad02[_0x5079('0x7')]);_0x4c343e[_0x5079('0x10')]();}}}catch(_0x4c2f0c){console['log'](_0x4c2f0c);logger[_0x5079('0xc')]('[%s][QUEUE]\x20%s',_0x4a1cea,_0x4c2f0c[_0x5079('0x1f')]);_0x4c343e['stop']();}};};
\ No newline at end of file
index b7a67c5..3208b72 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xfa73=['lodash','aws-sdk','./utils','routing','../../rpc/chatMessage','../../rpc/smsMessage','../../rpc/whatsappMessage','consequence','isNil','interaction','UserId','[%s][AMAZONLEX]\x20%s','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','contact','format','YYYY-MM-DD\x20HH:mm:ss','out','channel','whatsapp','phone','chat','ChatWebsiteId','account','upperFirst','AccountId','InteractionId','created','isEmpty','body','getMustacheRender','Message','create','then','info','catch','error','finally','[%s][AMAZONLEX]\x20Welcome\x20Message\x20has\x20been\x20sent!','stop','[%s][AMAZONLEX]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','LexRuntime','toString','message','next','providerName','amazonlex','providerResponse','stringify','dialogState'];(function(_0x32c384,_0x4e8067){var _0x4e0cdc=function(_0x456fb9){while(--_0x456fb9){_0x32c384['push'](_0x32c384['shift']());}};_0x4e0cdc(++_0x4e8067);}(_0xfa73,0x157));var _0x3fa7=function(_0x1facfa,_0x1acf7d){_0x1facfa=_0x1facfa-0x0;var _0x9ec701=_0xfa73[_0x1facfa];return _0x9ec701;};'use strict';var _=require(_0x3fa7('0x0'));var moment=require('moment');var AWS=require(_0x3fa7('0x1'));var utils=require(_0x3fa7('0x2'));var logger=require('../../../../config/logger')(_0x3fa7('0x3'));var rpc={'chatMessage':require(_0x3fa7('0x4')),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require('../../rpc/mailMessage'),'smsMessage':require(_0x3fa7('0x5')),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require(_0x3fa7('0x6'))};exports[_0x3fa7('0x7')]=function(_0x21ef22,_0x252cdf){return function(_0x24f374){try{if(!_[_0x3fa7('0x8')](this[_0x3fa7('0x9')][_0x3fa7('0xa')])){logger['info'](_0x3fa7('0xb'),_0x21ef22,_0x3fa7('0xc'));return _0x24f374['next']();}var _0x1b5cdd={'ContactId':this[_0x3fa7('0xd')]['id'],'sentAt':moment()[_0x3fa7('0xe')](_0x3fa7('0xf')),'direction':_0x3fa7('0x10')};if(this[_0x3fa7('0x11')]==='sms'||this['channel']===_0x3fa7('0x12')){_0x1b5cdd[_0x3fa7('0x13')]=this['interaction']['phone'];}var _0x4ae9ad=this['channel'];if(_0x4ae9ad===_0x3fa7('0x14')){_0x1b5cdd[_0x3fa7('0x15')]=this[_0x3fa7('0x16')]['id'];}else{_0x1b5cdd[_[_0x3fa7('0x17')](_0x4ae9ad)+_0x3fa7('0x18')]=this['account']['id'];}_0x1b5cdd[_[_0x3fa7('0x17')](_0x4ae9ad)+_0x3fa7('0x19')]=this[_0x3fa7('0x9')]['id'];if(this[_0x3fa7('0x9')][_0x3fa7('0x1a')]){var _0x2110b6=_0x252cdf[0x4];if(!_[_0x3fa7('0x1b')](_0x2110b6)){_0x1b5cdd[_0x3fa7('0x1c')]=utils[_0x3fa7('0x1d')](_0x2110b6,this);return rpc[_0x4ae9ad+_0x3fa7('0x1e')][_0x3fa7('0x1f')](_0x1b5cdd)[_0x3fa7('0x20')](function(_0x34e3c9){logger[_0x3fa7('0x21')]('[%s][AMAZONLEX]\x20%s',_0x21ef22,_0x1b5cdd[_0x3fa7('0x1c')]);})[_0x3fa7('0x22')](function(_0x47ff6c){logger[_0x3fa7('0x23')]('[%s][AMAZONLEX]\x20%s',_0x21ef22,JSON['stringify'](_0x47ff6c));})[_0x3fa7('0x24')](function(){logger['info'](_0x3fa7('0x25'),_0x21ef22);_0x24f374[_0x3fa7('0x26')]();});}else{logger[_0x3fa7('0x21')](_0x3fa7('0x27'),_0x21ef22);_0x24f374['stop']();}}else{var _0x4bef99=this;var _0x241a1b=new AWS[(_0x3fa7('0x28'))]({'accessKeyId':_0x252cdf[0x0],'secretAccessKey':_0x252cdf[0x1],'region':_0x252cdf[0x2]});var _0x5da3bb={'botAlias':'$LATEST','botName':_0x252cdf[0x3],'inputText':this['message'][_0x3fa7('0x1c')],'userId':this['channel']+':'+this[_0x3fa7('0x9')]['id'][_0x3fa7('0x29')]()};_0x241a1b['postText'](_0x5da3bb,function(_0x2674c1,_0x5b2bc0){if(_0x2674c1){logger['error'](_0x3fa7('0xb'),_0x21ef22,_0x2674c1[_0x3fa7('0x2a')]);_0x24f374[_0x3fa7('0x2b')]();}else if(_0x5b2bc0&&_0x5b2bc0[_0x3fa7('0x2a')]){_0x4bef99[_0x3fa7('0x1c')]['amazonlex']=_0x5b2bc0;_0x1b5cdd[_0x3fa7('0x1c')]=_0x5b2bc0['message'];_0x1b5cdd[_0x3fa7('0x2c')]=_0x3fa7('0x2d');_0x1b5cdd[_0x3fa7('0x2e')]=JSON[_0x3fa7('0x2f')](_0x5b2bc0);return rpc[_0x4ae9ad+_0x3fa7('0x1e')][_0x3fa7('0x1f')](_0x1b5cdd)[_0x3fa7('0x20')](function(_0x29fdc3){logger[_0x3fa7('0x21')](_0x3fa7('0xb'),_0x21ef22,_0x1b5cdd[_0x3fa7('0x1c')]);if(_0x5b2bc0[_0x3fa7('0x30')]=='Failed'){_0x24f374[_0x3fa7('0x2b')]();}else{_0x24f374[_0x3fa7('0x26')]();}})[_0x3fa7('0x22')](function(_0x491ab1){logger[_0x3fa7('0x23')]('[%s][AMAZONLEX]\x20%s',_0x21ef22,JSON[_0x3fa7('0x2f')](_0x491ab1));_0x24f374[_0x3fa7('0x2b')]();});}else{_0x24f374[_0x3fa7('0x2b')]();}});}}catch(_0x294e5e){logger[_0x3fa7('0x23')](_0x3fa7('0xb'),_0x21ef22,JSON[_0x3fa7('0x2f')](_0x294e5e));_0x24f374[_0x3fa7('0x26')]();}};};
\ No newline at end of file
+var _0x71f1=['out','channel','whatsapp','interaction','phone','chat','ChatWebsiteId','account','upperFirst','AccountId','InteractionId','isEmpty','body','getMustacheRender','Message','catch','finally','[%s][AMAZONLEX]\x20Welcome\x20Message\x20has\x20been\x20sent!','stop','[%s][AMAZONLEX]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','LexRuntime','$LATEST','message','toString','next','amazonlex','providerName','stringify','create','Failed','error','lodash','moment','./utils','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/mailMessage','consequence','isNil','UserId','info','[%s][AMAZONLEX]\x20%s','contact','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x4709f7,_0x49a0f4){var _0x3b566a=function(_0x2e47b6){while(--_0x2e47b6){_0x4709f7['push'](_0x4709f7['shift']());}};_0x3b566a(++_0x49a0f4);}(_0x71f1,0x187));var _0x171f=function(_0x4f6afc,_0x4dfa88){_0x4f6afc=_0x4f6afc-0x0;var _0x256eeb=_0x71f1[_0x4f6afc];return _0x256eeb;};'use strict';var _=require(_0x171f('0x0'));var moment=require(_0x171f('0x1'));var AWS=require('aws-sdk');var utils=require(_0x171f('0x2'));var logger=require(_0x171f('0x3'))(_0x171f('0x4'));var rpc={'chatMessage':require(_0x171f('0x5')),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require(_0x171f('0x6')),'smsMessage':require('../../rpc/smsMessage'),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require('../../rpc/whatsappMessage')};exports[_0x171f('0x7')]=function(_0x3aaedb,_0x3c39e5){return function(_0x3d23d2){try{if(!_[_0x171f('0x8')](this['interaction'][_0x171f('0x9')])){logger[_0x171f('0xa')](_0x171f('0xb'),_0x3aaedb,'Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.');return _0x3d23d2['next']();}var _0x14256f={'ContactId':this[_0x171f('0xc')]['id'],'sentAt':moment()['format'](_0x171f('0xd')),'direction':_0x171f('0xe')};if(this[_0x171f('0xf')]==='sms'||this[_0x171f('0xf')]===_0x171f('0x10')){_0x14256f['phone']=this[_0x171f('0x11')][_0x171f('0x12')];}var _0x49c299=this['channel'];if(_0x49c299===_0x171f('0x13')){_0x14256f[_0x171f('0x14')]=this[_0x171f('0x15')]['id'];}else{_0x14256f[_[_0x171f('0x16')](_0x49c299)+_0x171f('0x17')]=this[_0x171f('0x15')]['id'];}_0x14256f[_['upperFirst'](_0x49c299)+_0x171f('0x18')]=this['interaction']['id'];if(this[_0x171f('0x11')]['created']){var _0x137264=_0x3c39e5[0x4];if(!_[_0x171f('0x19')](_0x137264)){_0x14256f[_0x171f('0x1a')]=utils[_0x171f('0x1b')](_0x137264,this);return rpc[_0x49c299+_0x171f('0x1c')]['create'](_0x14256f)['then'](function(_0x2974ac){logger['info'](_0x171f('0xb'),_0x3aaedb,_0x14256f[_0x171f('0x1a')]);})[_0x171f('0x1d')](function(_0x4184fc){logger['error']('[%s][AMAZONLEX]\x20%s',_0x3aaedb,JSON['stringify'](_0x4184fc));})[_0x171f('0x1e')](function(){logger[_0x171f('0xa')](_0x171f('0x1f'),_0x3aaedb);_0x3d23d2[_0x171f('0x20')]();});}else{logger[_0x171f('0xa')](_0x171f('0x21'),_0x3aaedb);_0x3d23d2[_0x171f('0x20')]();}}else{var _0xc5b744=this;var _0x42dd12=new AWS[(_0x171f('0x22'))]({'accessKeyId':_0x3c39e5[0x0],'secretAccessKey':_0x3c39e5[0x1],'region':_0x3c39e5[0x2]});var _0x20825e={'botAlias':_0x171f('0x23'),'botName':_0x3c39e5[0x3],'inputText':this[_0x171f('0x24')]['body'],'userId':this[_0x171f('0xf')]+':'+this['interaction']['id'][_0x171f('0x25')]()};_0x42dd12['postText'](_0x20825e,function(_0x57b00b,_0xc4cb96){if(_0x57b00b){logger['error'](_0x171f('0xb'),_0x3aaedb,_0x57b00b[_0x171f('0x24')]);_0x3d23d2[_0x171f('0x26')]();}else if(_0xc4cb96&&_0xc4cb96[_0x171f('0x24')]){_0xc5b744['body'][_0x171f('0x27')]=_0xc4cb96;_0x14256f[_0x171f('0x1a')]=_0xc4cb96[_0x171f('0x24')];_0x14256f[_0x171f('0x28')]='amazonlex';_0x14256f['providerResponse']=JSON[_0x171f('0x29')](_0xc4cb96);return rpc[_0x49c299+_0x171f('0x1c')][_0x171f('0x2a')](_0x14256f)['then'](function(_0x1bf099){logger[_0x171f('0xa')]('[%s][AMAZONLEX]\x20%s',_0x3aaedb,_0x14256f[_0x171f('0x1a')]);if(_0xc4cb96['dialogState']==_0x171f('0x2b')){_0x3d23d2[_0x171f('0x26')]();}else{_0x3d23d2[_0x171f('0x20')]();}})[_0x171f('0x1d')](function(_0x365f08){logger[_0x171f('0x2c')]('[%s][AMAZONLEX]\x20%s',_0x3aaedb,JSON['stringify'](_0x365f08));_0x3d23d2[_0x171f('0x26')]();});}else{_0x3d23d2[_0x171f('0x26')]();}});}}catch(_0x3032e4){logger['error'](_0x171f('0xb'),_0x3aaedb,JSON['stringify'](_0x3032e4));_0x3d23d2[_0x171f('0x20')]();}};};
\ No newline at end of file
index 0bba8b2..1e1a37d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc3ac=['./utils','../../../../config/logger','../../rpc/chatMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/whatsappMessage','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/faxInteraction','../../mailRpc','channel','mail','isAutoreply','info','[%s][AUTOREPLY]\x20%s','next','isNil','interaction','created','Autoreply\x20already\x20sent','One\x20Time\x20already\x20sent','contact','format','YYYY-MM-DD\x20HH:mm:ss','body','getMustacheRender','message','from','phone','read','subject','Re:','chat','ChatWebsiteId','upperFirst','account','InteractionId','Message','messageId','<div\x20id=\x22xm-mail-content\x22>','replace','<div\x20id=\x22xm-mail-content\x22','<div','headers','auto-replied','All','auto_reply','sendMailMessage','smtpOptions','[%s][AUTOREPLY]\x20SMTP\x20SENT','create','then','stringify','catch','error','finally','resolve','Interaction','update','[%s][AUTOREPLY][autoreplyExecuted]\x20%s','[RPC][%s][AUTOREPLY][autoreplyExecuted]\x20%s','autoreplyExecuted','stop','lodash','moment'];(function(_0xf2f6a9,_0x398f00){var _0xa277df=function(_0x415788){while(--_0x415788){_0xf2f6a9['push'](_0xf2f6a9['shift']());}};_0xa277df(++_0x398f00);}(_0xc3ac,0x143));var _0xcc3a=function(_0x50412e,_0xda6a88){_0x50412e=_0x50412e-0x0;var _0x5545a3=_0xc3ac[_0x50412e];return _0x5545a3;};'use strict';var _=require(_0xcc3a('0x0'));var moment=require(_0xcc3a('0x1'));var utils=require(_0xcc3a('0x2'));var logger=require(_0xcc3a('0x3'))('routing');var rpc={'chatMessage':require(_0xcc3a('0x4')),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require(_0xcc3a('0x5')),'smsMessage':require(_0xcc3a('0x6')),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require(_0xcc3a('0x7')),'chatInteraction':require('../../rpc/chatInteraction'),'openchannelInteraction':require(_0xcc3a('0x8')),'mailInteraction':require('../../rpc/mailInteraction'),'smsInteraction':require(_0xcc3a('0x9')),'faxInteraction':require(_0xcc3a('0xa')),'whatsappInteraction':require('../../rpc/whatsappInteraction')};var mailRpc=require(_0xcc3a('0xb'));exports['consequence']=function(_0xda1523,_0x3008c4,_0x121253,_0x8fa5d7){return function(_0x12ce83){try{var _0x2e5ac8=this[_0xcc3a('0xc')];if(_0x2e5ac8===_0xcc3a('0xd')&&_0x8fa5d7['body'][_0xcc3a('0xe')]){logger[_0xcc3a('0xf')](_0xcc3a('0x10'),_0xda1523,'Autoreply\x20not\x20executed\x20(message\x20is\x20autoreply)');return _0x12ce83[_0xcc3a('0x11')]();}if(_0x3008c4[0x0]==='1'&&(_[_0xcc3a('0x12')](this[_0xcc3a('0x13')][_0xcc3a('0x14')])||!this['interaction'][_0xcc3a('0x14')])){logger[_0xcc3a('0xf')](_0xcc3a('0x10'),_0xda1523,_0xcc3a('0x15'));return _0x12ce83[_0xcc3a('0x11')]();}if(_0x3008c4[0x0]==='2'&&this['interaction']['autoreplyExecuted']){logger[_0xcc3a('0xf')]('[%s][AUTOREPLY][autoreplyExecuted]\x20%s',_0xda1523,_0xcc3a('0x16'));return _0x12ce83[_0xcc3a('0x11')]();}var _0x44f5c8={'ContactId':this[_0xcc3a('0x17')]['id'],'sentAt':moment()[_0xcc3a('0x18')](_0xcc3a('0x19')),'direction':'out'};if(this[_0xcc3a('0xc')]===_0xcc3a('0xd')){_0x44f5c8[_0xcc3a('0x1a')]=utils[_0xcc3a('0x1b')](_0x3008c4[0x2],this);}else{_0x44f5c8['body']=utils[_0xcc3a('0x1b')](_0x3008c4[0x1],this);}if(this[_0xcc3a('0x1c')]){_0x44f5c8['to']=this[_0xcc3a('0x1c')][_0xcc3a('0x1d')]||'';if(this[_0xcc3a('0xc')]==='mail'&&_0x3008c4[0x1]==='1'){_0x44f5c8['cc']=this[_0xcc3a('0x1c')]['cc']||'';}_0x44f5c8['from']=this[_0xcc3a('0x1c')]['to']||'';_0x44f5c8[_0xcc3a('0x1e')]=this['message']['phone']||'';_0x44f5c8[_0xcc3a('0x1f')]=!![];if(this[_0xcc3a('0x1c')][_0xcc3a('0x20')]){_0x44f5c8[_0xcc3a('0x20')]='';_0x44f5c8[_0xcc3a('0x20')]+=_['startsWith'](this[_0xcc3a('0x1c')][_0xcc3a('0x20')],_0xcc3a('0x21'))?'':'Re:\x20';_0x44f5c8[_0xcc3a('0x20')]+=this[_0xcc3a('0x1c')][_0xcc3a('0x20')];}}if(this[_0xcc3a('0xc')]===_0xcc3a('0x22')){_0x44f5c8[_0xcc3a('0x23')]=this['account']['id'];}else{_0x44f5c8[_[_0xcc3a('0x24')](this[_0xcc3a('0xc')])+'AccountId']=this[_0xcc3a('0x25')]['id'];}_0x44f5c8[_['upperFirst'](this['channel'])+_0xcc3a('0x26')]=this['interaction']['id'];var _0x10843f=this[_0xcc3a('0x13')];if(rpc[this['channel']+_0xcc3a('0x27')]){if(this['channel']==='mail'){_0x44f5c8['inReplyTo']=this[_0xcc3a('0x1c')][_0xcc3a('0x28')];_0x44f5c8['html']=_0xcc3a('0x29')+_[_0xcc3a('0x2a')](_0x44f5c8[_0xcc3a('0x1a')],_0xcc3a('0x2b'),_0xcc3a('0x2c'))+'</div>';_0x44f5c8[_0xcc3a('0x2d')]={'Auto-Submitted':_0xcc3a('0x2e'),'X-Auto-Response-Suppress':_0xcc3a('0x2f'),'Precedence':_0xcc3a('0x30')};return mailRpc[_0xcc3a('0x31')](this['account'][_0xcc3a('0x32')],_0x44f5c8)['then'](function(_0x3e27bd){logger[_0xcc3a('0xf')](_0xcc3a('0x33'),_0xda1523);_0x44f5c8[_0xcc3a('0x28')]=_0x3e27bd[_0xcc3a('0x1c')][_0xcc3a('0x28')];return rpc[_0x2e5ac8+'Message'][_0xcc3a('0x34')](_0x44f5c8);})[_0xcc3a('0x35')](function(_0x2a1970){logger[_0xcc3a('0xf')](_0xcc3a('0x10'),_0xda1523,JSON[_0xcc3a('0x36')](_0x2a1970));})[_0xcc3a('0x37')](function(_0x3e96eb){logger[_0xcc3a('0x38')]('[RPC][%s][AUTOREPLY]\x20%s',_0xda1523,JSON[_0xcc3a('0x36')](_0x3e96eb));})[_0xcc3a('0x39')](function(){Promise[_0xcc3a('0x3a')]()[_0xcc3a('0x35')](function(){if(_0x3008c4[0x0]!=='2'||_0x10843f['autoreplyExecuted'])return;return rpc[_0x2e5ac8+_0xcc3a('0x3b')][_0xcc3a('0x3c')](_0x10843f['id'],{'autoreplyExecuted':!![]})[_0xcc3a('0x35')](function(_0x52416b){logger[_0xcc3a('0xf')](_0xcc3a('0x3d'),_0xda1523,JSON[_0xcc3a('0x36')](_0x52416b));})[_0xcc3a('0x37')](function(_0x53ddbc){logger[_0xcc3a('0x38')](_0xcc3a('0x3e'),_0xda1523,JSON['stringify'](_0x53ddbc));});})[_0xcc3a('0x35')](function(){_0x12ce83[_0xcc3a('0x11')]();});});}else{return rpc[this['channel']+'Message'][_0xcc3a('0x34')](_0x44f5c8)[_0xcc3a('0x35')](function(){logger[_0xcc3a('0xf')](_0xcc3a('0x10'),_0xda1523,_0x44f5c8[_0xcc3a('0x1a')]);})[_0xcc3a('0x37')](function(_0x40dfae){logger['error']('[%s][AUTOREPLY]\x20%s',_0xda1523,JSON[_0xcc3a('0x36')](_0x40dfae));})['finally'](function(){Promise['resolve']()[_0xcc3a('0x35')](function(){if(_0x3008c4[0x0]!=='2'||_0x10843f[_0xcc3a('0x3f')])return;return rpc[_0x2e5ac8+_0xcc3a('0x3b')][_0xcc3a('0x3c')](_0x10843f['id'],{'autoreplyExecuted':!![]})[_0xcc3a('0x35')](function(_0x15b5cf){logger[_0xcc3a('0xf')](_0xcc3a('0x3d'),_0xda1523,JSON[_0xcc3a('0x36')](_0x15b5cf));})[_0xcc3a('0x37')](function(_0x579f18){logger[_0xcc3a('0x38')]('[RPC][%s][AUTOREPLY][autoreplyExecuted]\x20%s',_0xda1523,JSON[_0xcc3a('0x36')](_0x579f18));});})[_0xcc3a('0x35')](function(){_0x12ce83[_0xcc3a('0x11')]();});});}}}catch(_0x5c7f25){logger[_0xcc3a('0x38')](_0xcc3a('0x10'),_0xda1523,JSON[_0xcc3a('0x36')](_0x5c7f25));_0x12ce83[_0xcc3a('0x40')]();}};};
\ No newline at end of file
+var _0x05a1=['stop','lodash','moment','./utils','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/mailMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/mailInteraction','../../rpc/smsInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction','consequence','channel','mail','body','isAutoreply','info','[%s][AUTOREPLY]\x20%s','Autoreply\x20not\x20executed\x20(message\x20is\x20autoreply)','next','interaction','created','Autoreply\x20already\x20sent','autoreplyExecuted','[%s][AUTOREPLY][autoreplyExecuted]\x20%s','One\x20Time\x20already\x20sent','YYYY-MM-DD\x20HH:mm:ss','out','getMustacheRender','message','from','read','subject','startsWith','Re:\x20','account','AccountId','upperFirst','InteractionId','Message','inReplyTo','messageId','html','<div\x20id=\x22xm-mail-content\x22>','replace','<div\x20id=\x22xm-mail-content\x22','<div','</div>','headers','auto-replied','All','auto_reply','smtpOptions','then','create','stringify','catch','error','finally','resolve','Interaction','update','[RPC][%s][AUTOREPLY][autoreplyExecuted]\x20%s'];(function(_0x57cc16,_0x444378){var _0x5421e5=function(_0xbcb1d3){while(--_0xbcb1d3){_0x57cc16['push'](_0x57cc16['shift']());}};_0x5421e5(++_0x444378);}(_0x05a1,0xcd));var _0x105a=function(_0x3ac061,_0x36b2b0){_0x3ac061=_0x3ac061-0x0;var _0x352171=_0x05a1[_0x3ac061];return _0x352171;};'use strict';var _=require(_0x105a('0x0'));var moment=require(_0x105a('0x1'));var utils=require(_0x105a('0x2'));var logger=require(_0x105a('0x3'))(_0x105a('0x4'));var rpc={'chatMessage':require(_0x105a('0x5')),'openchannelMessage':require('../../rpc/openchannelMessage'),'mailMessage':require(_0x105a('0x6')),'smsMessage':require('../../rpc/smsMessage'),'faxMessage':require(_0x105a('0x7')),'whatsappMessage':require(_0x105a('0x8')),'chatInteraction':require(_0x105a('0x9')),'openchannelInteraction':require(_0x105a('0xa')),'mailInteraction':require(_0x105a('0xb')),'smsInteraction':require(_0x105a('0xc')),'faxInteraction':require(_0x105a('0xd')),'whatsappInteraction':require(_0x105a('0xe'))};var mailRpc=require('../../mailRpc');exports[_0x105a('0xf')]=function(_0x532b2f,_0x459615,_0x4601ec,_0x1582f4){return function(_0x4c49b2){try{var _0x186709=this[_0x105a('0x10')];if(_0x186709===_0x105a('0x11')&&_0x1582f4[_0x105a('0x12')][_0x105a('0x13')]){logger[_0x105a('0x14')](_0x105a('0x15'),_0x532b2f,_0x105a('0x16'));return _0x4c49b2[_0x105a('0x17')]();}if(_0x459615[0x0]==='1'&&(_['isNil'](this[_0x105a('0x18')][_0x105a('0x19')])||!this['interaction'][_0x105a('0x19')])){logger[_0x105a('0x14')](_0x105a('0x15'),_0x532b2f,_0x105a('0x1a'));return _0x4c49b2[_0x105a('0x17')]();}if(_0x459615[0x0]==='2'&&this[_0x105a('0x18')][_0x105a('0x1b')]){logger[_0x105a('0x14')](_0x105a('0x1c'),_0x532b2f,_0x105a('0x1d'));return _0x4c49b2[_0x105a('0x17')]();}var _0x5b57df={'ContactId':this['contact']['id'],'sentAt':moment()['format'](_0x105a('0x1e')),'direction':_0x105a('0x1f')};if(this[_0x105a('0x10')]===_0x105a('0x11')){_0x5b57df[_0x105a('0x12')]=utils[_0x105a('0x20')](_0x459615[0x2],this);}else{_0x5b57df[_0x105a('0x12')]=utils[_0x105a('0x20')](_0x459615[0x1],this);}if(this[_0x105a('0x21')]){_0x5b57df['to']=this[_0x105a('0x21')][_0x105a('0x22')]||'';if(this['channel']==='mail'&&_0x459615[0x1]==='1'){_0x5b57df['cc']=this[_0x105a('0x21')]['cc']||'';}_0x5b57df[_0x105a('0x22')]=this[_0x105a('0x21')]['to']||'';_0x5b57df['phone']=this['message']['phone']||'';_0x5b57df[_0x105a('0x23')]=!![];if(this[_0x105a('0x21')]['subject']){_0x5b57df[_0x105a('0x24')]='';_0x5b57df[_0x105a('0x24')]+=_[_0x105a('0x25')](this['message']['subject'],'Re:')?'':_0x105a('0x26');_0x5b57df[_0x105a('0x24')]+=this['message'][_0x105a('0x24')];}}if(this[_0x105a('0x10')]==='chat'){_0x5b57df['ChatWebsiteId']=this[_0x105a('0x27')]['id'];}else{_0x5b57df[_['upperFirst'](this[_0x105a('0x10')])+_0x105a('0x28')]=this[_0x105a('0x27')]['id'];}_0x5b57df[_[_0x105a('0x29')](this[_0x105a('0x10')])+_0x105a('0x2a')]=this[_0x105a('0x18')]['id'];var _0x6889bd=this[_0x105a('0x18')];if(rpc[this[_0x105a('0x10')]+_0x105a('0x2b')]){if(this[_0x105a('0x10')]===_0x105a('0x11')){_0x5b57df[_0x105a('0x2c')]=this[_0x105a('0x21')][_0x105a('0x2d')];_0x5b57df[_0x105a('0x2e')]=_0x105a('0x2f')+_[_0x105a('0x30')](_0x5b57df['body'],_0x105a('0x31'),_0x105a('0x32'))+_0x105a('0x33');_0x5b57df[_0x105a('0x34')]={'Auto-Submitted':_0x105a('0x35'),'X-Auto-Response-Suppress':_0x105a('0x36'),'Precedence':_0x105a('0x37')};return mailRpc['sendMailMessage'](this[_0x105a('0x27')][_0x105a('0x38')],_0x5b57df)[_0x105a('0x39')](function(_0x18b165){logger[_0x105a('0x14')]('[%s][AUTOREPLY]\x20SMTP\x20SENT',_0x532b2f);_0x5b57df[_0x105a('0x2d')]=_0x18b165[_0x105a('0x21')][_0x105a('0x2d')];return rpc[_0x186709+'Message'][_0x105a('0x3a')](_0x5b57df);})[_0x105a('0x39')](function(_0x4f19db){logger[_0x105a('0x14')](_0x105a('0x15'),_0x532b2f,JSON[_0x105a('0x3b')](_0x4f19db));})[_0x105a('0x3c')](function(_0x50fccf){logger[_0x105a('0x3d')]('[RPC][%s][AUTOREPLY]\x20%s',_0x532b2f,JSON[_0x105a('0x3b')](_0x50fccf));})[_0x105a('0x3e')](function(){Promise[_0x105a('0x3f')]()[_0x105a('0x39')](function(){if(_0x459615[0x0]!=='2'||_0x6889bd[_0x105a('0x1b')])return;return rpc[_0x186709+_0x105a('0x40')][_0x105a('0x41')](_0x6889bd['id'],{'autoreplyExecuted':!![]})['then'](function(_0x4ae0ec){logger[_0x105a('0x14')](_0x105a('0x1c'),_0x532b2f,JSON[_0x105a('0x3b')](_0x4ae0ec));})[_0x105a('0x3c')](function(_0x4ff487){logger[_0x105a('0x3d')](_0x105a('0x42'),_0x532b2f,JSON[_0x105a('0x3b')](_0x4ff487));});})[_0x105a('0x39')](function(){_0x4c49b2[_0x105a('0x17')]();});});}else{return rpc[this[_0x105a('0x10')]+_0x105a('0x2b')][_0x105a('0x3a')](_0x5b57df)['then'](function(){logger['info'](_0x105a('0x15'),_0x532b2f,_0x5b57df[_0x105a('0x12')]);})['catch'](function(_0x5a1b0c){logger['error'](_0x105a('0x15'),_0x532b2f,JSON[_0x105a('0x3b')](_0x5a1b0c));})[_0x105a('0x3e')](function(){Promise[_0x105a('0x3f')]()[_0x105a('0x39')](function(){if(_0x459615[0x0]!=='2'||_0x6889bd[_0x105a('0x1b')])return;return rpc[_0x186709+_0x105a('0x40')][_0x105a('0x41')](_0x6889bd['id'],{'autoreplyExecuted':!![]})['then'](function(_0x319759){logger[_0x105a('0x14')](_0x105a('0x1c'),_0x532b2f,JSON[_0x105a('0x3b')](_0x319759));})[_0x105a('0x3c')](function(_0x25aca9){logger[_0x105a('0x3d')](_0x105a('0x42'),_0x532b2f,JSON[_0x105a('0x3b')](_0x25aca9));});})[_0x105a('0x39')](function(){_0x4c49b2[_0x105a('0x17')]();});});}}}catch(_0x6dfb0b){logger['error'](_0x105a('0x15'),_0x532b2f,JSON[_0x105a('0x3b')](_0x6dfb0b));_0x4c49b2[_0x105a('0x43')]();}};};
\ No newline at end of file
index a6c6cff..18250f1 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x78bf=['error','stringify','finally','stop','moment','../../../../config/logger','routing','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','consequence','[%s][CLOSE]\x20reason\x20%s','format','system','channel','Interaction','update','interaction','then','info','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!'];(function(_0x154183,_0x25d4d2){var _0x579e8d=function(_0x34ed0c){while(--_0x34ed0c){_0x154183['push'](_0x154183['shift']());}};_0x579e8d(++_0x25d4d2);}(_0x78bf,0xbc));var _0xf78b=function(_0x127a60,_0x37f33a){_0x127a60=_0x127a60-0x0;var _0xc1f6a3=_0x78bf[_0x127a60];return _0xc1f6a3;};'use strict';var moment=require(_0xf78b('0x0'));var logger=require(_0xf78b('0x1'))(_0xf78b('0x2'));var rpc={'chatInteraction':require(_0xf78b('0x3')),'openchannelInteraction':require(_0xf78b('0x4')),'smsInteraction':require(_0xf78b('0x5')),'mailInteraction':require(_0xf78b('0x6')),'faxInteraction':require(_0xf78b('0x7')),'whatsappInteraction':require('../../rpc/whatsappInteraction')};exports[_0xf78b('0x8')]=function(_0x49a634,_0x5edb8f,_0x33da1b,_0x55dcdb){return function(_0x1855a7){try{logger['info'](_0xf78b('0x9'),_0x49a634,_0x5edb8f[0x0]);var _0x531db6={'closed':0x1,'closedAt':moment()[_0xf78b('0xa')]('YYYY-MM-DD\x20HH:mm:ss'),'closeReason':_0xf78b('0xb'),'disposition':_0x5edb8f[0x0]};if(rpc[_0x55dcdb[_0xf78b('0xc')]+_0xf78b('0xd')]){rpc[_0x55dcdb[_0xf78b('0xc')]+_0xf78b('0xd')][_0xf78b('0xe')](_0x55dcdb[_0xf78b('0xf')]['id'],_0x531db6)[_0xf78b('0x10')](function(_0xf7ff30){logger[_0xf78b('0x11')](_0xf78b('0x12'),_0x49a634,_0x55dcdb[_0xf78b('0xf')]['id']);})['catch'](function(_0x11391a){logger[_0xf78b('0x13')]('[%s][CLOSE]\x20%s',_0x49a634,JSON[_0xf78b('0x14')](_0x11391a));})[_0xf78b('0x15')](function(){_0x1855a7[_0xf78b('0x16')]();});}}catch(_0x804d43){logger['error']('[%s][CLOSE]\x20%s',_0x49a634,JSON['stringify'](_0x804d43));_0x1855a7[_0xf78b('0x16')]();}};};
\ No newline at end of file
+var _0xb9aa=['moment','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','consequence','info','[%s][CLOSE]\x20reason\x20%s','format','YYYY-MM-DD\x20HH:mm:ss','system','channel','Interaction','update','interaction','then','[%s][CLOSE]\x20interaction\x20%s\x20has\x20been\x20closed!','catch','error','stringify','finally','stop','[%s][CLOSE]\x20%s'];(function(_0x28db62,_0xfe11c1){var _0xbc95be=function(_0x4292d4){while(--_0x4292d4){_0x28db62['push'](_0x28db62['shift']());}};_0xbc95be(++_0xfe11c1);}(_0xb9aa,0x9a));var _0xab9a=function(_0xb08e5d,_0x4d1b6f){_0xb08e5d=_0xb08e5d-0x0;var _0x17ede0=_0xb9aa[_0xb08e5d];return _0x17ede0;};'use strict';var moment=require(_0xab9a('0x0'));var logger=require('../../../../config/logger')('routing');var rpc={'chatInteraction':require('../../rpc/chatInteraction'),'openchannelInteraction':require(_0xab9a('0x1')),'smsInteraction':require(_0xab9a('0x2')),'mailInteraction':require(_0xab9a('0x3')),'faxInteraction':require('../../rpc/faxInteraction'),'whatsappInteraction':require('../../rpc/whatsappInteraction')};exports[_0xab9a('0x4')]=function(_0x4d6a87,_0x49bca8,_0x227ea0,_0x3fc55e){return function(_0x2180ec){try{logger[_0xab9a('0x5')](_0xab9a('0x6'),_0x4d6a87,_0x49bca8[0x0]);var _0x280acf={'closed':0x1,'closedAt':moment()[_0xab9a('0x7')](_0xab9a('0x8')),'closeReason':_0xab9a('0x9'),'disposition':_0x49bca8[0x0]};if(rpc[_0x3fc55e[_0xab9a('0xa')]+'Interaction']){rpc[_0x3fc55e[_0xab9a('0xa')]+_0xab9a('0xb')][_0xab9a('0xc')](_0x3fc55e[_0xab9a('0xd')]['id'],_0x280acf)[_0xab9a('0xe')](function(_0xede977){logger[_0xab9a('0x5')](_0xab9a('0xf'),_0x4d6a87,_0x3fc55e[_0xab9a('0xd')]['id']);})[_0xab9a('0x10')](function(_0x5b4f2c){logger[_0xab9a('0x11')]('[%s][CLOSE]\x20%s',_0x4d6a87,JSON[_0xab9a('0x12')](_0x5b4f2c));})[_0xab9a('0x13')](function(){_0x2180ec[_0xab9a('0x14')]();});}}catch(_0x4333dd){logger[_0xab9a('0x11')](_0xab9a('0x15'),_0x4d6a87,JSON[_0xab9a('0x12')](_0x4333dd));_0x2180ec['stop']();}};};
\ No newline at end of file
index 1cc777b..6f18e4c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x31af=['info','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','next','contact','format','out','channel','sms','phone','chat','ChatWebsiteId','account','upperFirst','AccountId','InteractionId','created','isEmpty','getMustacheRender','Message','create','then','[%s][DIALOGFLOW]\x20%s','body','catch','stringify','[%s][DIALOGFLOW]\x20Welcome\x20Message\x20has\x20been\x20sent!','[%s][DIALOGFLOW]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','textRequest','message','result','fulfillment','endConversation','error','stop','lodash','moment','apiai-promise','../../../../config/logger','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/whatsappMessage','consequence','isNil','interaction','UserId'];(function(_0x3ebe02,_0x1d0d72){var _0x9e3bda=function(_0x3b4434){while(--_0x3b4434){_0x3ebe02['push'](_0x3ebe02['shift']());}};_0x9e3bda(++_0x1d0d72);}(_0x31af,0xde));var _0xf31a=function(_0x3395b1,_0x3dc307){_0x3395b1=_0x3395b1-0x0;var _0x5836b3=_0x31af[_0x3395b1];return _0x5836b3;};'use strict';var _=require(_0xf31a('0x0'));var moment=require(_0xf31a('0x1'));var apiai=require(_0xf31a('0x2'));var md5=require('md5');var utils=require('./utils');var logger=require(_0xf31a('0x3'))('routing');var rpc={'chatMessage':require(_0xf31a('0x4')),'openchannelMessage':require(_0xf31a('0x5')),'mailMessage':require(_0xf31a('0x6')),'smsMessage':require(_0xf31a('0x7')),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require(_0xf31a('0x8'))};exports[_0xf31a('0x9')]=function(_0x405926,_0x1dc7cc){return function(_0x47b7a1){try{if(!_[_0xf31a('0xa')](this[_0xf31a('0xb')][_0xf31a('0xc')])){logger[_0xf31a('0xd')]('[%s][DIALOGFLOW]\x20%s',_0x405926,_0xf31a('0xe'));return _0x47b7a1[_0xf31a('0xf')]();}var _0xcff55c={'ContactId':this[_0xf31a('0x10')]['id'],'sentAt':moment()[_0xf31a('0x11')]('YYYY-MM-DD\x20HH:mm:ss'),'direction':_0xf31a('0x12')};if(this[_0xf31a('0x13')]===_0xf31a('0x14')||this[_0xf31a('0x13')]==='whatsapp'){_0xcff55c[_0xf31a('0x15')]=this[_0xf31a('0xb')]['phone'];}var _0x355f32=this[_0xf31a('0x13')];if(_0x355f32===_0xf31a('0x16')){_0xcff55c[_0xf31a('0x17')]=this[_0xf31a('0x18')]['id'];}else{_0xcff55c[_[_0xf31a('0x19')](_0x355f32)+_0xf31a('0x1a')]=this[_0xf31a('0x18')]['id'];}_0xcff55c[_[_0xf31a('0x19')](_0x355f32)+_0xf31a('0x1b')]=this[_0xf31a('0xb')]['id'];if(this[_0xf31a('0xb')][_0xf31a('0x1c')]){var _0xccfd8b=_0x1dc7cc[0x2];if(!_[_0xf31a('0x1d')](_0xccfd8b)){_0xcff55c['body']=utils[_0xf31a('0x1e')](_0xccfd8b,this);return rpc[_0x355f32+_0xf31a('0x1f')][_0xf31a('0x20')](_0xcff55c)[_0xf31a('0x21')](function(_0x4c3589){logger[_0xf31a('0xd')](_0xf31a('0x22'),_0x405926,_0xcff55c[_0xf31a('0x23')]);})[_0xf31a('0x24')](function(_0x18a97c){logger['error'](_0xf31a('0x22'),_0x405926,JSON[_0xf31a('0x25')](_0x18a97c));})['finally'](function(){logger[_0xf31a('0xd')](_0xf31a('0x26'),_0x405926);_0x47b7a1['stop']();});}else{logger[_0xf31a('0xd')](_0xf31a('0x27'),_0x405926);_0x47b7a1['stop']();}}else{var _0x5724b3=this;var _0x534317=apiai(_0x1dc7cc[0x0],{'language':_0x1dc7cc[0x1]||'en'});return _0x534317[_0xf31a('0x28')](this[_0xf31a('0x29')]['body'],{'sessionId':md5(this[_0xf31a('0xb')]['id'])})[_0xf31a('0x21')](function(_0x5d08ee){_0x5724b3[_0xf31a('0x23')]['dialogflow']=_0x5d08ee;_0xcff55c['body']=_0x5d08ee[_0xf31a('0x2a')][_0xf31a('0x2b')]['speech'];_0xcff55c['providerName']='dialogflow';_0xcff55c['providerResponse']=JSON[_0xf31a('0x25')](_0x5d08ee);return rpc[_0x355f32+_0xf31a('0x1f')][_0xf31a('0x20')](_0xcff55c)['then'](function(_0x2281c5){logger[_0xf31a('0xd')](_0xf31a('0x22'),_0x405926,_0xcff55c[_0xf31a('0x23')]);if(_0x5d08ee[_0xf31a('0x2a')]['metadata'][_0xf31a('0x2c')]){_0x47b7a1[_0xf31a('0xf')]();}else{_0x47b7a1['stop']();}})['catch'](function(_0x203f28){logger[_0xf31a('0x2d')]('[%s][DIALOGFLOW]\x20%s',_0x405926,JSON[_0xf31a('0x25')](_0x203f28));_0x47b7a1[_0xf31a('0xf')]();});})[_0xf31a('0x24')](function(_0x5385ba){logger[_0xf31a('0x2d')](_0xf31a('0x22'),_0x405926,_0x5385ba[_0xf31a('0x29')]);_0x47b7a1[_0xf31a('0xf')]();});}}catch(_0xbddc3b){logger[_0xf31a('0x2d')]('[%s][DIALOGFLOW]\x20%s',_0x405926,JSON[_0xf31a('0x25')](_0xbddc3b));_0x47b7a1[_0xf31a('0x2e')]();}};};
\ No newline at end of file
+var _0x7163=['error','[%s][DIALOGFLOW]\x20Welcome\x20Message\x20has\x20been\x20sent!','[%s][DIALOGFLOW]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','stop','textRequest','message','dialogflow','result','fulfillment','providerName','providerResponse','stringify','Message','metadata','endConversation','lodash','md5','./utils','../../../../config/logger','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','consequence','isNil','interaction','UserId','info','[%s][DIALOGFLOW]\x20%s','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','next','contact','format','YYYY-MM-DD\x20HH:mm:ss','out','channel','sms','whatsapp','phone','chat','ChatWebsiteId','account','InteractionId','created','create','then','body','catch'];(function(_0xaa1b3e,_0x47d976){var _0x454d7d=function(_0x575b32){while(--_0x575b32){_0xaa1b3e['push'](_0xaa1b3e['shift']());}};_0x454d7d(++_0x47d976);}(_0x7163,0x1ef));var _0x3716=function(_0x46efd7,_0x43f84d){_0x46efd7=_0x46efd7-0x0;var _0x5637e4=_0x7163[_0x46efd7];return _0x5637e4;};'use strict';var _=require(_0x3716('0x0'));var moment=require('moment');var apiai=require('apiai-promise');var md5=require(_0x3716('0x1'));var utils=require(_0x3716('0x2'));var logger=require(_0x3716('0x3'))('routing');var rpc={'chatMessage':require(_0x3716('0x4')),'openchannelMessage':require(_0x3716('0x5')),'mailMessage':require(_0x3716('0x6')),'smsMessage':require(_0x3716('0x7')),'faxMessage':require('../../rpc/faxMessage'),'whatsappMessage':require('../../rpc/whatsappMessage')};exports[_0x3716('0x8')]=function(_0x4549b2,_0x4422c3){return function(_0x14bfe0){try{if(!_[_0x3716('0x9')](this[_0x3716('0xa')][_0x3716('0xb')])){logger[_0x3716('0xc')](_0x3716('0xd'),_0x4549b2,_0x3716('0xe'));return _0x14bfe0[_0x3716('0xf')]();}var _0x3d20f4={'ContactId':this[_0x3716('0x10')]['id'],'sentAt':moment()[_0x3716('0x11')](_0x3716('0x12')),'direction':_0x3716('0x13')};if(this[_0x3716('0x14')]===_0x3716('0x15')||this[_0x3716('0x14')]===_0x3716('0x16')){_0x3d20f4[_0x3716('0x17')]=this[_0x3716('0xa')][_0x3716('0x17')];}var _0x3292b5=this[_0x3716('0x14')];if(_0x3292b5===_0x3716('0x18')){_0x3d20f4[_0x3716('0x19')]=this[_0x3716('0x1a')]['id'];}else{_0x3d20f4[_['upperFirst'](_0x3292b5)+'AccountId']=this['account']['id'];}_0x3d20f4[_['upperFirst'](_0x3292b5)+_0x3716('0x1b')]=this['interaction']['id'];if(this[_0x3716('0xa')][_0x3716('0x1c')]){var _0x44680c=_0x4422c3[0x2];if(!_['isEmpty'](_0x44680c)){_0x3d20f4['body']=utils['getMustacheRender'](_0x44680c,this);return rpc[_0x3292b5+'Message'][_0x3716('0x1d')](_0x3d20f4)[_0x3716('0x1e')](function(_0x5d16c4){logger[_0x3716('0xc')](_0x3716('0xd'),_0x4549b2,_0x3d20f4[_0x3716('0x1f')]);})[_0x3716('0x20')](function(_0x22d1b7){logger[_0x3716('0x21')](_0x3716('0xd'),_0x4549b2,JSON['stringify'](_0x22d1b7));})['finally'](function(){logger['info'](_0x3716('0x22'),_0x4549b2);_0x14bfe0['stop']();});}else{logger[_0x3716('0xc')](_0x3716('0x23'),_0x4549b2);_0x14bfe0[_0x3716('0x24')]();}}else{var _0x233517=this;var _0x2b5296=apiai(_0x4422c3[0x0],{'language':_0x4422c3[0x1]||'en'});return _0x2b5296[_0x3716('0x25')](this[_0x3716('0x26')][_0x3716('0x1f')],{'sessionId':md5(this[_0x3716('0xa')]['id'])})['then'](function(_0xec15ce){_0x233517[_0x3716('0x1f')][_0x3716('0x27')]=_0xec15ce;_0x3d20f4['body']=_0xec15ce[_0x3716('0x28')][_0x3716('0x29')]['speech'];_0x3d20f4[_0x3716('0x2a')]='dialogflow';_0x3d20f4[_0x3716('0x2b')]=JSON[_0x3716('0x2c')](_0xec15ce);return rpc[_0x3292b5+_0x3716('0x2d')]['create'](_0x3d20f4)[_0x3716('0x1e')](function(_0x5a4476){logger[_0x3716('0xc')](_0x3716('0xd'),_0x4549b2,_0x3d20f4['body']);if(_0xec15ce[_0x3716('0x28')][_0x3716('0x2e')][_0x3716('0x2f')]){_0x14bfe0[_0x3716('0xf')]();}else{_0x14bfe0[_0x3716('0x24')]();}})['catch'](function(_0x2fdfa1){logger[_0x3716('0x21')](_0x3716('0xd'),_0x4549b2,JSON[_0x3716('0x2c')](_0x2fdfa1));_0x14bfe0['next']();});})[_0x3716('0x20')](function(_0x27553a){logger[_0x3716('0x21')](_0x3716('0xd'),_0x4549b2,_0x27553a[_0x3716('0x26')]);_0x14bfe0['next']();});}}catch(_0x32de5){logger[_0x3716('0x21')](_0x3716('0xd'),_0x4549b2,JSON['stringify'](_0x32de5));_0x14bfe0['stop']();}};};
\ No newline at end of file
index 3404381..87a2ba0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9858=['DIALOGFLOWV2_ENDCONVERSATION','DIALOGFLOWV2_INTENTNAME','intent','name','displayName','DIALOGFLOWV2_ISFALLBACKINTENT','isFallback','DIALOGFLOWV2_LANGUAGECODE','languageCode','DIALOGFLOWV2_QUERYTEXT','queryText','DIALOGFLOWV2_SCORE','providerName','providerResponse','fulfillmentText','push','all','stack','md5','../../../../config/logger','routing','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage','../../rpc/faxMessage','../../rpc/whatsappMessage','body','Message','create','then','info','[%s][DIALOGFLOWV2]\x20%s','catch','error','stringify','interaction','UserId','next','format','YYYY-MM-DD\x20HH:mm:ss','out','sms','channel','whatsapp','phone','ChatWebsiteId','account','upperFirst','isEmpty','getMustacheRender','finally','stop','[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','replace','sessionPath','message','detectIntent','length','dialogflowV2','queryResult','diagnosticInfo','fields','end_conversation','boolValue','DIALOGFLOWV2_ACTION','action','DIALOGFLOWV2_ALLREQUIREDPARAMSPRESENT','allRequiredParamsPresent'];(function(_0x390307,_0x37bbfb){var _0x13853f=function(_0x3abb11){while(--_0x3abb11){_0x390307['push'](_0x390307['shift']());}};_0x13853f(++_0x37bbfb);}(_0x9858,0x1aa));var _0x8985=function(_0x589c02,_0x3dd046){_0x589c02=_0x589c02-0x0;var _0x533f81=_0x9858[_0x589c02];return _0x533f81;};'use strict';var _=require('lodash');var dialogflow=require('dialogflow');var md5=require(_0x8985('0x0'));var moment=require('moment');var Promise=require('bluebird');var logger=require(_0x8985('0x1'))(_0x8985('0x2'));var utils=require('./utils');var rpc={'chatMessage':require('../../rpc/chatMessage'),'openchannelMessage':require(_0x8985('0x3')),'mailMessage':require(_0x8985('0x4')),'smsMessage':require(_0x8985('0x5')),'faxMessage':require(_0x8985('0x6')),'whatsappMessage':require(_0x8985('0x7'))};function createMessage(_0x46eb2e,_0x48e615,_0x1acdf2,_0x424dde){return new Promise(function(_0x1371df,_0x585c97){var _0x40e45a=_['clone'](_0x1acdf2);_0x40e45a[_0x8985('0x8')]=_0x424dde;return rpc[_0x48e615+_0x8985('0x9')][_0x8985('0xa')](_0x40e45a)[_0x8985('0xb')](function(){logger[_0x8985('0xc')](_0x8985('0xd'),_0x46eb2e,_0x40e45a[_0x8985('0x8')]);_0x1371df();})[_0x8985('0xe')](function(_0x2a859f){logger[_0x8985('0xf')](_0x8985('0xd'),_0x46eb2e,JSON[_0x8985('0x10')](_0x2a859f));_0x585c97(_0x2a859f);});});}exports['consequence']=function(_0x20a6a3,_0x5609df){return function(_0x5df4f4){try{if(!_['isNil'](this[_0x8985('0x11')][_0x8985('0x12')])){logger[_0x8985('0xc')]('[%s][DIALOGFLOWV2]\x20%s',_0x20a6a3,'Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.');return _0x5df4f4[_0x8985('0x13')]();}var _0x5b47f7={'ContactId':this['contact']['id'],'sentAt':moment()[_0x8985('0x14')](_0x8985('0x15')),'direction':_0x8985('0x16')};if(this['channel']===_0x8985('0x17')||this[_0x8985('0x18')]===_0x8985('0x19')){_0x5b47f7[_0x8985('0x1a')]=this[_0x8985('0x11')]['phone'];}var _0x519333=this[_0x8985('0x18')];if(_0x519333==='chat'){_0x5b47f7[_0x8985('0x1b')]=this[_0x8985('0x1c')]['id'];}else{_0x5b47f7[_[_0x8985('0x1d')](_0x519333)+'AccountId']=this[_0x8985('0x1c')]['id'];}_0x5b47f7[_[_0x8985('0x1d')](_0x519333)+'InteractionId']=this[_0x8985('0x11')]['id'];if(this['interaction']['created']){var _0x3476c2=_0x5609df[0x4];if(!_[_0x8985('0x1e')](_0x3476c2)){_0x5b47f7[_0x8985('0x8')]=utils[_0x8985('0x1f')](_0x3476c2,this);return rpc[_0x519333+_0x8985('0x9')][_0x8985('0xa')](_0x5b47f7)[_0x8985('0xb')](function(_0x2a9477){logger['info'](_0x8985('0xd'),_0x20a6a3,_0x5b47f7['body']);})[_0x8985('0xe')](function(_0x1fd303){logger['error']('[%s][DIALOGFLOWV2]\x20%s',_0x20a6a3,JSON[_0x8985('0x10')](_0x1fd303));})[_0x8985('0x20')](function(){logger[_0x8985('0xc')]('[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20has\x20been\x20sent!',_0x20a6a3);_0x5df4f4[_0x8985('0x21')]();});}else{logger[_0x8985('0xc')](_0x8985('0x22'),_0x20a6a3);_0x5df4f4[_0x8985('0x21')]();}}else{var _0x56c581=this;var _0x4a30e1=_0x5609df[0x2][_0x8985('0x23')](/\\n/g,'\x0a');var _0x19113c={'credentials':{'private_key':_0x4a30e1,'client_email':_0x5609df[0x1]}};var _0x2bd91d=new dialogflow['SessionsClient'](_0x19113c);var _0x43b5a9=_0x2bd91d[_0x8985('0x24')](_0x5609df[0x0],md5(_0x56c581[_0x8985('0x11')]['id']));var _0x1afced={'session':_0x43b5a9,'queryInput':{'text':{'text':_0x56c581[_0x8985('0x25')][_0x8985('0x8')],'languageCode':_0x5609df[0x3]||'en'}}};return _0x2bd91d[_0x8985('0x26')](_0x1afced)[_0x8985('0xb')](function(_0x351b92){if(_0x351b92&&_0x351b92[_0x8985('0x27')]){_0x56c581[_0x8985('0x8')][_0x8985('0x28')]=_0x351b92;var _0x368a30=_0x351b92[0x0];var _0xf00666=_0x368a30[_0x8985('0x29')][_0x8985('0x2a')]&&_0x368a30['queryResult'][_0x8985('0x2a')]['fields']?_0x368a30[_0x8985('0x29')]['diagnosticInfo'][_0x8985('0x2b')][_0x8985('0x2c')][_0x8985('0x2d')]:![];_0x56c581[_0x8985('0x8')][_0x8985('0x2e')]=_0x368a30[_0x8985('0x29')][_0x8985('0x2f')];_0x56c581['body'][_0x8985('0x30')]=_0x368a30[_0x8985('0x29')][_0x8985('0x31')];_0x56c581['body'][_0x8985('0x32')]=_0x368a30[_0x8985('0x29')][_0x8985('0x2a')]&&_0x368a30[_0x8985('0x29')][_0x8985('0x2a')][_0x8985('0x2b')]?_0x368a30[_0x8985('0x29')][_0x8985('0x2a')][_0x8985('0x2b')]['end_conversation'][_0x8985('0x2d')]:![];_0x56c581[_0x8985('0x8')][_0x8985('0x33')]=_0x368a30['queryResult'][_0x8985('0x34')][_0x8985('0x35')];_0x56c581['body']['DIALOGFLOWV2_INTENTDISPLAYNAME']=_0x368a30[_0x8985('0x29')][_0x8985('0x34')][_0x8985('0x36')];_0x56c581['body'][_0x8985('0x37')]=_0x368a30[_0x8985('0x29')]['intent'][_0x8985('0x38')];_0x56c581[_0x8985('0x8')][_0x8985('0x39')]=_0x368a30[_0x8985('0x29')][_0x8985('0x3a')];_0x56c581[_0x8985('0x8')][_0x8985('0x3b')]=_0x368a30[_0x8985('0x29')][_0x8985('0x3c')];_0x56c581['body'][_0x8985('0x3d')]=_0x368a30[_0x8985('0x29')]['intentDetectionConfidence'];_0x5b47f7[_0x8985('0x3e')]=_0x8985('0x28');_0x5b47f7[_0x8985('0x3f')]=JSON[_0x8985('0x10')](_0x351b92);var _0x48edc9=[];for(var _0x995c25=0x0;_0x995c25<_0x351b92[_0x8985('0x27')];_0x995c25++){var _0x2a2ee9=_0x351b92[_0x995c25];if(_0x2a2ee9&&_0x2a2ee9['queryResult']&&_0x2a2ee9['queryResult'][_0x8985('0x40')]){_0x48edc9[_0x8985('0x41')](createMessage(_0x20a6a3,_0x519333,_0x5b47f7,_0x2a2ee9['queryResult']['fulfillmentText']));}}return Promise[_0x8985('0x42')](_0x48edc9)[_0x8985('0xb')](function(){if(_0xf00666){_0x5df4f4[_0x8985('0x13')]();}else{_0x5df4f4['stop']();}})['catch'](function(_0x5c5096){logger['error']('[%s][DIALOGFLOWV2]\x20%s',_0x20a6a3,JSON[_0x8985('0x10')](_0x5c5096));_0x5df4f4[_0x8985('0x13')]();});}})[_0x8985('0xe')](function(_0x21869e){logger[_0x8985('0xf')](_0x8985('0xd'),_0x20a6a3,_0x21869e[_0x8985('0x25')],_0x21869e[_0x8985('0x43')]);_0x5df4f4[_0x8985('0x13')]();});}}catch(_0x254c9f){logger[_0x8985('0xf')]('[%s][DIALOGFLOWV2]\x20%s',_0x20a6a3,JSON[_0x8985('0x10')](_0x254c9f));_0x5df4f4[_0x8985('0x21')]();}};};
\ No newline at end of file
+var _0x559c=['DIALOGFLOWV2_INTENTNAME','intent','name','DIALOGFLOWV2_INTENTDISPLAYNAME','displayName','isFallback','DIALOGFLOWV2_QUERYTEXT','DIALOGFLOWV2_SCORE','intentDetectionConfidence','providerName','push','fulfillmentText','all','stack','lodash','dialogflow','md5','moment','bluebird','../../../../config/logger','./utils','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/faxMessage','clone','body','Message','then','info','[%s][DIALOGFLOWV2]\x20%s','error','consequence','isNil','UserId','Agent\x20is\x20managing\x20the\x20interaction.\x20Go\x20to\x20next\x20application.','next','contact','format','out','channel','sms','interaction','phone','chat','ChatWebsiteId','account','upperFirst','AccountId','InteractionId','catch','stringify','finally','[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20has\x20been\x20sent!','stop','[%s][DIALOGFLOWV2]\x20Welcome\x20Message\x20is\x20empty.\x20It\x20will\x20wait\x20for\x20a\x20message\x20from\x20customer!','replace','SessionsClient','sessionPath','message','detectIntent','length','dialogflowV2','queryResult','diagnosticInfo','end_conversation','DIALOGFLOWV2_ACTION','DIALOGFLOWV2_ALLREQUIREDPARAMSPRESENT','allRequiredParamsPresent','DIALOGFLOWV2_ENDCONVERSATION','fields','boolValue'];(function(_0xd21040,_0x5e4e1f){var _0x144d26=function(_0x17b7ad){while(--_0x17b7ad){_0xd21040['push'](_0xd21040['shift']());}};_0x144d26(++_0x5e4e1f);}(_0x559c,0xe6));var _0xc559=function(_0x531607,_0x73fa88){_0x531607=_0x531607-0x0;var _0x1b1fbb=_0x559c[_0x531607];return _0x1b1fbb;};'use strict';var _=require(_0xc559('0x0'));var dialogflow=require(_0xc559('0x1'));var md5=require(_0xc559('0x2'));var moment=require(_0xc559('0x3'));var Promise=require(_0xc559('0x4'));var logger=require(_0xc559('0x5'))('routing');var utils=require(_0xc559('0x6'));var rpc={'chatMessage':require(_0xc559('0x7')),'openchannelMessage':require(_0xc559('0x8')),'mailMessage':require(_0xc559('0x9')),'smsMessage':require('../../rpc/smsMessage'),'faxMessage':require(_0xc559('0xa')),'whatsappMessage':require('../../rpc/whatsappMessage')};function createMessage(_0x31b845,_0x5dedcd,_0x46735b,_0x13cdde){return new Promise(function(_0x545f63,_0x3aff3e){var _0x17628f=_[_0xc559('0xb')](_0x46735b);_0x17628f[_0xc559('0xc')]=_0x13cdde;return rpc[_0x5dedcd+_0xc559('0xd')]['create'](_0x17628f)[_0xc559('0xe')](function(){logger[_0xc559('0xf')](_0xc559('0x10'),_0x31b845,_0x17628f[_0xc559('0xc')]);_0x545f63();})['catch'](function(_0x44f12c){logger[_0xc559('0x11')](_0xc559('0x10'),_0x31b845,JSON['stringify'](_0x44f12c));_0x3aff3e(_0x44f12c);});});}exports[_0xc559('0x12')]=function(_0x12abf1,_0x23d191){return function(_0x5c38f2){try{if(!_[_0xc559('0x13')](this['interaction'][_0xc559('0x14')])){logger[_0xc559('0xf')](_0xc559('0x10'),_0x12abf1,_0xc559('0x15'));return _0x5c38f2[_0xc559('0x16')]();}var _0x31d731={'ContactId':this[_0xc559('0x17')]['id'],'sentAt':moment()[_0xc559('0x18')]('YYYY-MM-DD\x20HH:mm:ss'),'direction':_0xc559('0x19')};if(this[_0xc559('0x1a')]===_0xc559('0x1b')||this[_0xc559('0x1a')]==='whatsapp'){_0x31d731['phone']=this[_0xc559('0x1c')][_0xc559('0x1d')];}var _0x1c3d60=this[_0xc559('0x1a')];if(_0x1c3d60===_0xc559('0x1e')){_0x31d731[_0xc559('0x1f')]=this[_0xc559('0x20')]['id'];}else{_0x31d731[_[_0xc559('0x21')](_0x1c3d60)+_0xc559('0x22')]=this['account']['id'];}_0x31d731[_[_0xc559('0x21')](_0x1c3d60)+_0xc559('0x23')]=this[_0xc559('0x1c')]['id'];if(this[_0xc559('0x1c')]['created']){var _0x48d750=_0x23d191[0x4];if(!_['isEmpty'](_0x48d750)){_0x31d731[_0xc559('0xc')]=utils['getMustacheRender'](_0x48d750,this);return rpc[_0x1c3d60+_0xc559('0xd')]['create'](_0x31d731)['then'](function(_0x53b7d4){logger['info'](_0xc559('0x10'),_0x12abf1,_0x31d731[_0xc559('0xc')]);})[_0xc559('0x24')](function(_0x5ecfd3){logger[_0xc559('0x11')](_0xc559('0x10'),_0x12abf1,JSON[_0xc559('0x25')](_0x5ecfd3));})[_0xc559('0x26')](function(){logger[_0xc559('0xf')](_0xc559('0x27'),_0x12abf1);_0x5c38f2[_0xc559('0x28')]();});}else{logger[_0xc559('0xf')](_0xc559('0x29'),_0x12abf1);_0x5c38f2[_0xc559('0x28')]();}}else{var _0xab4e11=this;var _0x2ad823=_0x23d191[0x2][_0xc559('0x2a')](/\\n/g,'\x0a');var _0x2aca02={'credentials':{'private_key':_0x2ad823,'client_email':_0x23d191[0x1]}};var _0x5a245d=new dialogflow[(_0xc559('0x2b'))](_0x2aca02);var _0x1653ec=_0x5a245d[_0xc559('0x2c')](_0x23d191[0x0],md5(_0xab4e11[_0xc559('0x1c')]['id']));var _0x88077e={'session':_0x1653ec,'queryInput':{'text':{'text':_0xab4e11[_0xc559('0x2d')][_0xc559('0xc')],'languageCode':_0x23d191[0x3]||'en'}}};return _0x5a245d[_0xc559('0x2e')](_0x88077e)[_0xc559('0xe')](function(_0x30a4be){if(_0x30a4be&&_0x30a4be[_0xc559('0x2f')]){_0xab4e11[_0xc559('0xc')][_0xc559('0x30')]=_0x30a4be;var _0x4471e2=_0x30a4be[0x0];var _0x16d18c=_0x4471e2[_0xc559('0x31')][_0xc559('0x32')]&&_0x4471e2[_0xc559('0x31')][_0xc559('0x32')]['fields']?_0x4471e2['queryResult']['diagnosticInfo']['fields'][_0xc559('0x33')]['boolValue']:![];_0xab4e11[_0xc559('0xc')][_0xc559('0x34')]=_0x4471e2['queryResult']['action'];_0xab4e11[_0xc559('0xc')][_0xc559('0x35')]=_0x4471e2[_0xc559('0x31')][_0xc559('0x36')];_0xab4e11['body'][_0xc559('0x37')]=_0x4471e2[_0xc559('0x31')][_0xc559('0x32')]&&_0x4471e2[_0xc559('0x31')][_0xc559('0x32')][_0xc559('0x38')]?_0x4471e2[_0xc559('0x31')][_0xc559('0x32')]['fields'][_0xc559('0x33')][_0xc559('0x39')]:![];_0xab4e11['body'][_0xc559('0x3a')]=_0x4471e2['queryResult'][_0xc559('0x3b')][_0xc559('0x3c')];_0xab4e11['body'][_0xc559('0x3d')]=_0x4471e2[_0xc559('0x31')][_0xc559('0x3b')][_0xc559('0x3e')];_0xab4e11[_0xc559('0xc')]['DIALOGFLOWV2_ISFALLBACKINTENT']=_0x4471e2['queryResult'][_0xc559('0x3b')][_0xc559('0x3f')];_0xab4e11['body']['DIALOGFLOWV2_LANGUAGECODE']=_0x4471e2[_0xc559('0x31')]['languageCode'];_0xab4e11[_0xc559('0xc')][_0xc559('0x40')]=_0x4471e2[_0xc559('0x31')]['queryText'];_0xab4e11['body'][_0xc559('0x41')]=_0x4471e2[_0xc559('0x31')][_0xc559('0x42')];_0x31d731[_0xc559('0x43')]='dialogflowV2';_0x31d731['providerResponse']=JSON[_0xc559('0x25')](_0x30a4be);var _0x207227=[];for(var _0x44177f=0x0;_0x44177f<_0x30a4be[_0xc559('0x2f')];_0x44177f++){var _0x531d5a=_0x30a4be[_0x44177f];if(_0x531d5a&&_0x531d5a[_0xc559('0x31')]&&_0x531d5a[_0xc559('0x31')]['fulfillmentText']){_0x207227[_0xc559('0x44')](createMessage(_0x12abf1,_0x1c3d60,_0x31d731,_0x531d5a[_0xc559('0x31')][_0xc559('0x45')]));}}return Promise[_0xc559('0x46')](_0x207227)[_0xc559('0xe')](function(){if(_0x16d18c){_0x5c38f2[_0xc559('0x16')]();}else{_0x5c38f2['stop']();}})[_0xc559('0x24')](function(_0x59e325){logger['error'](_0xc559('0x10'),_0x12abf1,JSON[_0xc559('0x25')](_0x59e325));_0x5c38f2[_0xc559('0x16')]();});}})['catch'](function(_0x5a28ef){logger[_0xc559('0x11')](_0xc559('0x10'),_0x12abf1,_0x5a28ef['message'],_0x5a28ef[_0xc559('0x47')]);_0x5c38f2[_0xc559('0x16')]();});}}catch(_0x3fadce){logger[_0xc559('0x11')]('[%s][DIALOGFLOWV2]\x20%s',_0x12abf1,JSON[_0xc559('0x25')](_0x3fadce));_0x5c38f2[_0xc559('0x28')]();}};};
\ No newline at end of file
index a30f82b..4516376 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xed12=['[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s','condition','next','rules','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','[%s][GOTOIF]\x20priority\x20%s\x20not\x20found','stop','error','[%s][GOTOIF]\x20eval\x20error:\x20%s','lodash','html-to-text','../../../../config/logger','routing','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','priority\x20true\x20is\x20a\x20number','priority\x20false\x20is\x20a\x20number','consequence','fromString','getMustacheRender','replace','validate','length','map','message','join','priorityTrue','priorityFalse','info'];(function(_0x4d9952,_0x53c3d1){var _0x18c159=function(_0x4a42ad){while(--_0x4a42ad){_0x4d9952['push'](_0x4d9952['shift']());}};_0x18c159(++_0x53c3d1);}(_0xed12,0xb7));var _0x2ed1=function(_0x38f702,_0x4d6717){_0x38f702=_0x38f702-0x0;var _0x1d39be=_0xed12[_0x38f702];return _0x1d39be;};'use strict';var schema=require('validate');var _=require(_0x2ed1('0x0'));var htmlToText=require(_0x2ed1('0x1'));var utils=require('./utils');var logger=require(_0x2ed1('0x2'))(_0x2ed1('0x3'));var gotoif=schema({'condition':{'type':'string','required':!![],'message':_0x2ed1('0x4')},'priorityTrue':{'type':_0x2ed1('0x5'),'message':_0x2ed1('0x6')},'priorityFalse':{'type':_0x2ed1('0x5'),'message':_0x2ed1('0x7')}});exports[_0x2ed1('0x8')]=function(_0x1239ae,_0x2e6c2f){return function(_0x565701){try{var _0x179acd={'condition':htmlToText[_0x2ed1('0x9')](utils[_0x2ed1('0xa')](_0x2e6c2f[0x0],this),{'wordwrap':![]})[_0x2ed1('0xb')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x2e6c2f[0x1],'priorityFalse':_0x2e6c2f[0x2]};var _0x2d7ef0=gotoif[_0x2ed1('0xc')](_0x179acd,{'typecast':!![]});if(_0x2d7ef0[_0x2ed1('0xd')]){logger['error']('[%s][GOTOIF]\x20%s',_0x1239ae,_[_0x2ed1('0xe')](_0x2d7ef0,_0x2ed1('0xf'))[_0x2ed1('0x10')](',\x20'));_0x565701['stop']();}else{try{var _0x2cace6=eval('('+_0x179acd['condition']+')');var _0x15a666=_0x2cace6?_0x179acd[_0x2ed1('0x11')]:_0x179acd[_0x2ed1('0x12')];logger[_0x2ed1('0x13')](_0x2ed1('0x14'),_0x1239ae,_0x179acd[_0x2ed1('0x15')],_0x2cace6,_0x15a666||_0x2ed1('0x16'));if(_0x15a666){var _0x14fd49=_['findIndex'](_0x565701[_0x2ed1('0x17')](),{'p':_0x15a666});if(_0x14fd49>=0x0){logger['info'](_0x2ed1('0x18'),_0x1239ae,_0x15a666||_0x2ed1('0x16'),_0x14fd49);_0x565701[_0x2ed1('0x16')](_0x14fd49);}else{logger[_0x2ed1('0x13')](_0x2ed1('0x19'),_0x1239ae,_0x15a666||_0x2ed1('0x16'));_0x565701[_0x2ed1('0x1a')]();}}else{_0x565701[_0x2ed1('0x16')]();}}catch(_0x3abac1){logger[_0x2ed1('0x1b')](_0x2ed1('0x1c'),_0x1239ae,_0x3abac1[_0x2ed1('0xf')]);_0x565701[_0x2ed1('0x1a')]();}}}catch(_0xc6b115){logger['error']('[%s][GOTOIF]\x20%s',_0x1239ae,JSON['stringify'](_0xc6b115));_0x565701[_0x2ed1('0x1a')]();}};};
\ No newline at end of file
+var _0x6f71=['[%s][GOTOIF]\x20eval\x20error:\x20%s','message','[%s][GOTOIF]\x20%s','stringify','lodash','html-to-text','./utils','../../../../config/logger','routing','condition\x20is\x20a\x20string\x20and\x20it\x20is\x20required','priority\x20true\x20is\x20a\x20number','number','consequence','fromString','replace','validate','length','error','join','stop','priorityTrue','info','condition','next','findIndex','[%s][GOTOIF]\x20priority\x20%s\x20found\x20at\x20index:\x20%s'];(function(_0x314d81,_0xa80a08){var _0x463c1f=function(_0x910303){while(--_0x910303){_0x314d81['push'](_0x314d81['shift']());}};_0x463c1f(++_0xa80a08);}(_0x6f71,0x1d8));var _0x16f7=function(_0x3d7cf1,_0x5c5eb0){_0x3d7cf1=_0x3d7cf1-0x0;var _0xe1efeb=_0x6f71[_0x3d7cf1];return _0xe1efeb;};'use strict';var schema=require('validate');var _=require(_0x16f7('0x0'));var htmlToText=require(_0x16f7('0x1'));var utils=require(_0x16f7('0x2'));var logger=require(_0x16f7('0x3'))(_0x16f7('0x4'));var gotoif=schema({'condition':{'type':'string','required':!![],'message':_0x16f7('0x5')},'priorityTrue':{'type':'number','message':_0x16f7('0x6')},'priorityFalse':{'type':_0x16f7('0x7'),'message':'priority\x20false\x20is\x20a\x20number'}});exports[_0x16f7('0x8')]=function(_0x2273c6,_0x40b8a4){return function(_0x258b99){try{var _0x8296e1={'condition':htmlToText[_0x16f7('0x9')](utils['getMustacheRender'](_0x40b8a4[0x0],this),{'wordwrap':![]})[_0x16f7('0xa')](/<\/?[^>]+(>|$)/g,''),'priorityTrue':_0x40b8a4[0x1],'priorityFalse':_0x40b8a4[0x2]};var _0x129cd7=gotoif[_0x16f7('0xb')](_0x8296e1,{'typecast':!![]});if(_0x129cd7[_0x16f7('0xc')]){logger[_0x16f7('0xd')]('[%s][GOTOIF]\x20%s',_0x2273c6,_['map'](_0x129cd7,'message')[_0x16f7('0xe')](',\x20'));_0x258b99[_0x16f7('0xf')]();}else{try{var _0x12d832=eval('('+_0x8296e1['condition']+')');var _0x593d7a=_0x12d832?_0x8296e1[_0x16f7('0x10')]:_0x8296e1['priorityFalse'];logger[_0x16f7('0x11')]('[%s][GOTOIF]\x20condition\x20%s\x20is\x20%s\x20try\x20goto\x20priority\x20%s',_0x2273c6,_0x8296e1[_0x16f7('0x12')],_0x12d832,_0x593d7a||_0x16f7('0x13'));if(_0x593d7a){var _0xebbd72=_[_0x16f7('0x14')](_0x258b99['rules'](),{'p':_0x593d7a});if(_0xebbd72>=0x0){logger['info'](_0x16f7('0x15'),_0x2273c6,_0x593d7a||_0x16f7('0x13'),_0xebbd72);_0x258b99[_0x16f7('0x13')](_0xebbd72);}else{logger[_0x16f7('0x11')]('[%s][GOTOIF]\x20priority\x20%s\x20not\x20found',_0x2273c6,_0x593d7a||_0x16f7('0x13'));_0x258b99[_0x16f7('0xf')]();}}else{_0x258b99[_0x16f7('0x13')]();}}catch(_0x40fb0c){logger['error'](_0x16f7('0x16'),_0x2273c6,_0x40fb0c[_0x16f7('0x17')]);_0x258b99[_0x16f7('0xf')]();}}}catch(_0x26000e){logger[_0x16f7('0xd')](_0x16f7('0x18'),_0x2273c6,JSON[_0x16f7('0x19')](_0x26000e));_0x258b99[_0x16f7('0xf')]();}};};
\ No newline at end of file
index ec91760..04e9dc9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xbed1=['priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required','error','[%s][GOTOP]\x20%s','map','join','info','[%s][GOTOP]\x20priority\x20%s','priority','findIndex','rules','[%s][GOTOP]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next','stop','validate','number'];(function(_0x418c87,_0x10aade){var _0x1fe994=function(_0x147dd7){while(--_0x147dd7){_0x418c87['push'](_0x418c87['shift']());}};_0x1fe994(++_0x10aade);}(_0xbed1,0x1a2));var _0x1bed=function(_0x5d07ff,_0x1f976f){_0x5d07ff=_0x5d07ff-0x0;var _0x5226ad=_0xbed1[_0x5d07ff];return _0x5226ad;};'use strict';var schema=require(_0x1bed('0x0'));var _=require('lodash');var logger=require('../../../../config/logger')('routing');var gotop=schema({'priority':{'type':_0x1bed('0x1'),'required':!![],'message':_0x1bed('0x2')}});exports['consequence']=function(_0x537a7d,_0x574fe4){return function(_0x9ad018){try{var _0x28bb44={'priority':_0x574fe4[0x0]};var _0x29b6de=gotop[_0x1bed('0x0')](_0x28bb44,{'typecast':!![]});if(_0x29b6de['length']){logger[_0x1bed('0x3')](_0x1bed('0x4'),_0x537a7d,_[_0x1bed('0x5')](_0x29b6de,'message')[_0x1bed('0x6')](',\x20'));_0x9ad018['stop']();}else{logger[_0x1bed('0x7')](_0x1bed('0x8'),_0x537a7d,_0x28bb44[_0x1bed('0x9')]);if(_0x28bb44['priority']){var _0xd3803c=_[_0x1bed('0xa')](_0x9ad018[_0x1bed('0xb')](),{'p':_0x28bb44['priority']});if(_0xd3803c>=0x0){logger['info'](_0x1bed('0xc'),_0x537a7d,_0x28bb44[_0x1bed('0x9')]||'next',_0xd3803c);_0x9ad018[_0x1bed('0xd')](_0xd3803c);}else{logger[_0x1bed('0x7')]('[%s][GOTOP]\x20priority\x20%s\x20not\x20found',_0x537a7d,_0x28bb44['priority']||_0x1bed('0xd'));_0x9ad018['stop']();}}else{_0x9ad018['next']();}}}catch(_0x227787){logger['error'](_0x1bed('0x4'),_0x537a7d,JSON['stringify'](_0x227787));_0x9ad018[_0x1bed('0xe')]();}};};
\ No newline at end of file
+var _0x6a95=['consequence','length','map','message','join','stop','info','[%s][GOTOP]\x20priority\x20%s','priority','findIndex','rules','[%s][GOTOP]\x20priority\x20%s\x20found\x20at\x20index:\x20%s','next','[%s][GOTOP]\x20priority\x20%s\x20not\x20found','[%s][GOTOP]\x20%s','stringify','validate','lodash','../../../../config/logger','routing','priority\x20is\x20a\x20number\x20and\x20it\x20is\x20required'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0x6a95,0xe2));var _0x56a9=function(_0x18cd5b,_0x10240b){_0x18cd5b=_0x18cd5b-0x0;var _0x5eaa52=_0x6a95[_0x18cd5b];return _0x5eaa52;};'use strict';var schema=require(_0x56a9('0x0'));var _=require(_0x56a9('0x1'));var logger=require(_0x56a9('0x2'))(_0x56a9('0x3'));var gotop=schema({'priority':{'type':'number','required':!![],'message':_0x56a9('0x4')}});exports[_0x56a9('0x5')]=function(_0x1261ee,_0x2c9be9){return function(_0x3599af){try{var _0x511ad8={'priority':_0x2c9be9[0x0]};var _0x3d8f12=gotop[_0x56a9('0x0')](_0x511ad8,{'typecast':!![]});if(_0x3d8f12[_0x56a9('0x6')]){logger['error']('[%s][GOTOP]\x20%s',_0x1261ee,_[_0x56a9('0x7')](_0x3d8f12,_0x56a9('0x8'))[_0x56a9('0x9')](',\x20'));_0x3599af[_0x56a9('0xa')]();}else{logger[_0x56a9('0xb')](_0x56a9('0xc'),_0x1261ee,_0x511ad8[_0x56a9('0xd')]);if(_0x511ad8[_0x56a9('0xd')]){var _0x2782c6=_[_0x56a9('0xe')](_0x3599af[_0x56a9('0xf')](),{'p':_0x511ad8[_0x56a9('0xd')]});if(_0x2782c6>=0x0){logger[_0x56a9('0xb')](_0x56a9('0x10'),_0x1261ee,_0x511ad8[_0x56a9('0xd')]||'next',_0x2782c6);_0x3599af[_0x56a9('0x11')](_0x2782c6);}else{logger[_0x56a9('0xb')](_0x56a9('0x12'),_0x1261ee,_0x511ad8[_0x56a9('0xd')]||'next');_0x3599af[_0x56a9('0xa')]();}}else{_0x3599af[_0x56a9('0x11')]();}}}catch(_0x321e83){logger['error'](_0x56a9('0x13'),_0x1261ee,JSON[_0x56a9('0x14')](_0x321e83));_0x3599af[_0x56a9('0xa')]();}};};
\ No newline at end of file
index 233bf59..75c10ce 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5eb8=['../../rpc/faxMessage','../../rpc/whatsappMessage','consequence','getMustacheRender','contact','channel','ChatWebsiteId','upperFirst','AccountId','account','InteractionId','Message','create','then','body','catch','error','[%s][MESSAGE]\x20%s','stringify','stop','../../../../config/logger','routing','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/smsMessage'];(function(_0x337897,_0x17f2a3){var _0x326816=function(_0x3cca5e){while(--_0x3cca5e){_0x337897['push'](_0x337897['shift']());}};_0x326816(++_0x17f2a3);}(_0x5eb8,0xb0));var _0x85eb=function(_0x2867d8,_0xef3ee0){_0x2867d8=_0x2867d8-0x0;var _0x3b8176=_0x5eb8[_0x2867d8];return _0x3b8176;};'use strict';var _=require('lodash');var utils=require('./utils');var logger=require(_0x85eb('0x0'))(_0x85eb('0x1'));var rpc={'chatMessage':require(_0x85eb('0x2')),'openchannelMessage':require(_0x85eb('0x3')),'mailMessage':require(_0x85eb('0x4')),'smsMessage':require(_0x85eb('0x5')),'faxMessage':require(_0x85eb('0x6')),'whatsappMessage':require(_0x85eb('0x7'))};exports[_0x85eb('0x8')]=function(_0x1fde1a,_0x2bf83c){return function(_0x1ba1d8){try{var _0x4a8814={'body':utils[_0x85eb('0x9')](_0x2bf83c[0x0],this),'ContactId':this[_0x85eb('0xa')]['id']};if(this[_0x85eb('0xb')]==='chat'){_0x4a8814[_0x85eb('0xc')]=this['account']['id'];}else{_0x4a8814[_[_0x85eb('0xd')](this[_0x85eb('0xb')])+_0x85eb('0xe')]=this[_0x85eb('0xf')]['id'];}_0x4a8814[_[_0x85eb('0xd')](this[_0x85eb('0xb')])+_0x85eb('0x10')]=this['interaction']['id'];if(rpc[this[_0x85eb('0xb')]+_0x85eb('0x11')]){return rpc[this['channel']+_0x85eb('0x11')][_0x85eb('0x12')](_0x4a8814)[_0x85eb('0x13')](function(_0x259f72){logger['info']('[%s][MESSAGE]\x20%s',_0x1fde1a,_0x4a8814[_0x85eb('0x14')]);_0x1ba1d8['next']();})[_0x85eb('0x15')](function(_0x23a82a){logger[_0x85eb('0x16')](_0x85eb('0x17'),_0x1fde1a,JSON[_0x85eb('0x18')](_0x23a82a));_0x1ba1d8['stop']();});}}catch(_0x2e5c0a){logger['error'](_0x85eb('0x17'),_0x1fde1a,JSON[_0x85eb('0x18')](_0x2e5c0a));_0x1ba1d8[_0x85eb('0x19')]();}};};
\ No newline at end of file
+var _0x9519=['contact','channel','chat','ChatWebsiteId','account','upperFirst','InteractionId','interaction','Message','create','then','info','[%s][MESSAGE]\x20%s','body','next','catch','error','stringify','stop','lodash','./utils','../../../../config/logger','../../rpc/chatMessage','../../rpc/openchannelMessage','../../rpc/mailMessage','../../rpc/faxMessage','consequence','getMustacheRender'];(function(_0x343090,_0x433a80){var _0x3ff3e8=function(_0x16c811){while(--_0x16c811){_0x343090['push'](_0x343090['shift']());}};_0x3ff3e8(++_0x433a80);}(_0x9519,0x147));var _0x9951=function(_0x1355b0,_0x411d75){_0x1355b0=_0x1355b0-0x0;var _0x33f246=_0x9519[_0x1355b0];return _0x33f246;};'use strict';var _=require(_0x9951('0x0'));var utils=require(_0x9951('0x1'));var logger=require(_0x9951('0x2'))('routing');var rpc={'chatMessage':require(_0x9951('0x3')),'openchannelMessage':require(_0x9951('0x4')),'mailMessage':require(_0x9951('0x5')),'smsMessage':require('../../rpc/smsMessage'),'faxMessage':require(_0x9951('0x6')),'whatsappMessage':require('../../rpc/whatsappMessage')};exports[_0x9951('0x7')]=function(_0x2b77a7,_0x3addcc){return function(_0x333492){try{var _0x399a4c={'body':utils[_0x9951('0x8')](_0x3addcc[0x0],this),'ContactId':this[_0x9951('0x9')]['id']};if(this[_0x9951('0xa')]===_0x9951('0xb')){_0x399a4c[_0x9951('0xc')]=this[_0x9951('0xd')]['id'];}else{_0x399a4c[_['upperFirst'](this[_0x9951('0xa')])+'AccountId']=this['account']['id'];}_0x399a4c[_[_0x9951('0xe')](this[_0x9951('0xa')])+_0x9951('0xf')]=this[_0x9951('0x10')]['id'];if(rpc[this[_0x9951('0xa')]+_0x9951('0x11')]){return rpc[this[_0x9951('0xa')]+_0x9951('0x11')][_0x9951('0x12')](_0x399a4c)[_0x9951('0x13')](function(_0x4410f9){logger[_0x9951('0x14')](_0x9951('0x15'),_0x2b77a7,_0x399a4c[_0x9951('0x16')]);_0x333492[_0x9951('0x17')]();})[_0x9951('0x18')](function(_0x6d2505){logger[_0x9951('0x19')](_0x9951('0x15'),_0x2b77a7,JSON[_0x9951('0x1a')](_0x6d2505));_0x333492[_0x9951('0x1b')]();});}}catch(_0x44230d){logger[_0x9951('0x19')](_0x9951('0x15'),_0x2b77a7,JSON[_0x9951('0x1a')](_0x44230d));_0x333492[_0x9951('0x1b')]();}};};
\ No newline at end of file
index 79bd415..c769f15 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xc8bc=['stop','./utils','../../../../config/logger','routing','consequence','info','[%s][NOOP]\x20%s','getMustacheRender','error','stringify'];(function(_0x589cdf,_0x53f463){var _0x5f0774=function(_0x530589){while(--_0x530589){_0x589cdf['push'](_0x589cdf['shift']());}};_0x5f0774(++_0x53f463);}(_0xc8bc,0x12d));var _0xcc8b=function(_0x1793de,_0x4d7233){_0x1793de=_0x1793de-0x0;var _0x4f0309=_0xc8bc[_0x1793de];return _0x4f0309;};'use strict';var utils=require(_0xcc8b('0x0'));var logger=require(_0xcc8b('0x1'))(_0xcc8b('0x2'));exports[_0xcc8b('0x3')]=function(_0x3e910e,_0x358fef){return function(_0x3f9ea2){try{logger[_0xcc8b('0x4')](_0xcc8b('0x5'),_0x3e910e,utils[_0xcc8b('0x6')](_0x358fef[0x0],this));_0x3f9ea2['next']();}catch(_0x42638e){logger[_0xcc8b('0x7')]('[%s][NOOP]\x20%s',_0x3e910e,JSON[_0xcc8b('0x8')](_0x42638e));_0x3f9ea2[_0xcc8b('0x9')]();}};};
\ No newline at end of file
+var _0xe234=['info','getMustacheRender','next','error','stringify','./utils','../../../../config/logger','routing','consequence'];(function(_0x19e35c,_0x29cd1e){var _0x3e1fe8=function(_0x17258b){while(--_0x17258b){_0x19e35c['push'](_0x19e35c['shift']());}};_0x3e1fe8(++_0x29cd1e);}(_0xe234,0x191));var _0x4e23=function(_0x4533b0,_0x3eff90){_0x4533b0=_0x4533b0-0x0;var _0x1980e0=_0xe234[_0x4533b0];return _0x1980e0;};'use strict';var utils=require(_0x4e23('0x0'));var logger=require(_0x4e23('0x1'))(_0x4e23('0x2'));exports[_0x4e23('0x3')]=function(_0x5e220b,_0x5ef5b8){return function(_0x3c79ee){try{logger[_0x4e23('0x4')]('[%s][NOOP]\x20%s',_0x5e220b,utils[_0x4e23('0x5')](_0x5ef5b8[0x0],this));_0x3c79ee[_0x4e23('0x6')]();}catch(_0x264631){logger[_0x4e23('0x7')]('[%s][NOOP]\x20%s',_0x5e220b,JSON[_0x4e23('0x8')](_0x264631));_0x3c79ee['stop']();}};};
\ No newline at end of file
index d0e166e..5e105c9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5eee=['Interaction','update','then','timeout','[%s][END:QUEUE][NAME:%s]','catch','update\x20queue\x20report','toLowerCase','length','[%s][QUEUE]\x20%s','stop','Queues','createQueue','qtimeout','rules','end','[%s][QUEUE]\x20ROUTING\x20STOPPED','close','[%s][QUEUE]\x20APPLICATION\x20END','next','rrmemory','beepall','[%s][QUEUE]\x20queue\x20not\x20found\x20%s','validate','lodash','util','seq-queue','moment','ioredis','../../../../config/environment','../../../../config/logger','routing','./strategy','defaults','redis','queue_id','account','joinAt','emit','queue','push','capitalize','%sQueuesWaitingInteractions','pick','format','%s:queue:%s','%s_queue_waiting_interaction:%s','save','../../rpc/openchannelQueueReport','../../rpc/mailQueueReport','../../rpc/whatsappQueueReport','../../rpc/faxInteraction','../../rpc/mailInteraction','../../rpc/openchannelInteraction','../../rpc/whatsappInteraction','timeout\x20is\x20a\x20number','body','from','YYYY-MM-DD\x20HH:mm:ss','contact','list','channel','QueueId','upperFirst','InteractionId','interaction','MessageId','message','chat','AccountId','WebsiteId','info','[%s][START:QUEUE][NAME:%s]','name','QueueReport','create','error','create\x20queue\x20report','waiting','accepted','[%s][STOP:QUEUE][NAME:%s]'];(function(_0x508662,_0x1bd735){var _0x30cc56=function(_0x56690e){while(--_0x56690e){_0x508662['push'](_0x508662['shift']());}};_0x30cc56(++_0x1bd735);}(_0x5eee,0xb9));var _0xe5ee=function(_0x2afcb6,_0x4b181b){_0x2afcb6=_0x2afcb6-0x0;var _0x5d5d68=_0x5eee[_0x2afcb6];return _0x5d5d68;};'use strict';var schema=require(_0xe5ee('0x0'));var _=require(_0xe5ee('0x1'));var util=require(_0xe5ee('0x2'));var seqqueue=require(_0xe5ee('0x3'));var moment=require(_0xe5ee('0x4'));var Redis=require(_0xe5ee('0x5'));var config=require(_0xe5ee('0x6'));var logger=require(_0xe5ee('0x7'))(_0xe5ee('0x8'));var strategy=require(_0xe5ee('0x9'));config['redis']=_[_0xe5ee('0xa')](config[_0xe5ee('0xb')],{'host':'localhost','port':0x18eb});var io=require('socket.io-emitter')(new Redis(config[_0xe5ee('0xb')]));var attributes=['id',_0xe5ee('0xc'),_0xe5ee('0xd'),'queue','from',_0xe5ee('0xe')];function emit(_0x200f3e,_0x5a2628,_0x37f145){io['to'](_0x200f3e)[_0xe5ee('0xf')](_0x5a2628,_0x37f145);}function emitChannelQueueInteraction(_0x1f38cf,_0x195ebf,_0x5988bb,_0x2eaeb2,_0x3de97e,_0x4bdf92,_0x5b35c7,_0x4cac33){var _0x1d44cc=_['clone'](_0x5988bb);_0x1d44cc['queue_id']=_0x4cac33;_0x1d44cc[_0xe5ee('0x10')]=_0x195ebf;_0x1d44cc[_0xe5ee('0xd')]=_0x2eaeb2;_0x1d44cc['id']=_0x3de97e;if(_0x4bdf92){attributes[_0xe5ee('0x11')](_[_0xe5ee('0x12')](_0x1f38cf)+'InteractionId');_0x5b35c7[util['format'](_0xe5ee('0x13'),_0x1f38cf)][_0x3de97e]=_[_0xe5ee('0x14')](_0x1d44cc,attributes);}else{delete _0x5b35c7[util[_0xe5ee('0x15')](_0xe5ee('0x13'),_0x1f38cf)][_0x3de97e];}emit(util[_0xe5ee('0x15')](_0xe5ee('0x16'),_0x1f38cf,_0x195ebf),util[_0xe5ee('0x15')](_0xe5ee('0x17'),_0x1f38cf,_0x4bdf92?_0xe5ee('0x18'):'remove'),_[_0xe5ee('0x14')](_0x1d44cc,attributes));}var rpc={'openchannelQueueReport':require(_0xe5ee('0x19')),'mailQueueReport':require(_0xe5ee('0x1a')),'chatQueueReport':require('../../rpc/chatQueueReport'),'smsQueueReport':require('../../rpc/smsQueueReport'),'faxQueueReport':require('../../rpc/faxQueueReport'),'whatsappQueueReport':require(_0xe5ee('0x1b')),'chatInteraction':require('../../rpc/chatInteraction'),'faxInteraction':require(_0xe5ee('0x1c')),'mailInteraction':require(_0xe5ee('0x1d')),'openchannelInteraction':require(_0xe5ee('0x1e')),'smsInteraction':require('../../rpc/smsInteraction'),'whatsappInteraction':require(_0xe5ee('0x1f'))};var queue=schema({'name':{'type':'string','required':!![],'message':'name\x20is\x20a\x20string\x20and\x20it\x20is\x20required'},'timeout':{'type':'number','message':_0xe5ee('0x20')}});function startRouting(_0x477478,_0x3b0d23,_0x51c13b,_0x1c86d4){if(_0x477478&&_0x3b0d23&&_0x51c13b){_0x3b0d23['waiting']+=0x1;var _0x100ac9={'uniqueid':_0x477478,'from':_0x51c13b[_0xe5ee('0x21')]?_0x51c13b[_0xe5ee('0x21')][_0xe5ee('0x22')]:'','joinAt':moment()[_0xe5ee('0x15')](_0xe5ee('0x23')),'ContactId':_0x51c13b['contact']?_0x51c13b[_0xe5ee('0x24')]['id']:null,'ListId':_0x51c13b[_0xe5ee('0x25')]?_0x51c13b[_0xe5ee('0x25')]['id']:null};_0x100ac9[_['upperFirst'](_0x51c13b[_0xe5ee('0x26')])+_0xe5ee('0x27')]=_0x3b0d23['id']||null;_0x100ac9[_[_0xe5ee('0x28')](_0x51c13b[_0xe5ee('0x26')])+_0xe5ee('0x29')]=_0x51c13b[_0xe5ee('0x2a')]?_0x51c13b['interaction']['id']:null;_0x100ac9[_[_0xe5ee('0x28')](_0x51c13b[_0xe5ee('0x26')])+_0xe5ee('0x2b')]=_0x51c13b[_0xe5ee('0x2c')]?_0x51c13b[_0xe5ee('0x2c')]['id']:null;_0x100ac9[_[_0xe5ee('0x28')](_0x51c13b[_0xe5ee('0x26')])+(_0x51c13b[_0xe5ee('0x26')]!==_0xe5ee('0x2d')?_0xe5ee('0x2e'):_0xe5ee('0x2f'))]=_0x51c13b['account']?_0x51c13b[_0xe5ee('0xd')]['id']:null;logger[_0xe5ee('0x30')](util['format'](_0xe5ee('0x31'),_0x477478,_0x3b0d23[_0xe5ee('0x32')]));emitChannelQueueInteraction(_0x51c13b[_0xe5ee('0x26')],_0x3b0d23['name'],_0x100ac9,_0x51c13b['account'][_0xe5ee('0x32')],_0x51c13b['message']['id'],!![],_0x1c86d4,_0x3b0d23['id']);if(rpc[_0x51c13b[_0xe5ee('0x26')]+_0xe5ee('0x33')]){return rpc[_0x51c13b[_0xe5ee('0x26')]+_0xe5ee('0x33')][_0xe5ee('0x34')](_0x100ac9)['catch'](function(_0x94fd3a){logger[_0xe5ee('0x35')](_0xe5ee('0x36'),_0x94fd3a);});}}}function stopRouting(_0xbe0573,_0x25befb,_0x37cf55,_0xb53f91){if(_0xbe0573&&_0x25befb){_0x25befb[_0xe5ee('0x37')]-=0x1;var _0x56072d={'leaveAt':moment()[_0xe5ee('0x15')](_0xe5ee('0x23')),'acceptAt':moment()[_0xe5ee('0x15')](_0xe5ee('0x23')),'reason':_0xe5ee('0x38')};logger[_0xe5ee('0x30')](util[_0xe5ee('0x15')](_0xe5ee('0x39'),_0xbe0573,_0x25befb[_0xe5ee('0x32')]));emitChannelQueueInteraction(_0x37cf55[_0xe5ee('0x26')],_0x25befb[_0xe5ee('0x32')],_0x37cf55[_0xe5ee('0x21')],_0x37cf55[_0xe5ee('0xd')][_0xe5ee('0x32')],_0x37cf55['message']['id'],![],_0xb53f91,_0x25befb['id']);return rpc[_0x37cf55[_0xe5ee('0x26')]+_0xe5ee('0x3a')][_0xe5ee('0x3b')](_0x37cf55[_0xe5ee('0x2a')]['id'],{'queueId':_0x25befb['id']})[_0xe5ee('0x3c')](function(){if(rpc[_0x37cf55[_0xe5ee('0x26')]+_0xe5ee('0x33')]){return rpc[_0x37cf55['channel']+_0xe5ee('0x33')][_0xe5ee('0x3b')](_0xbe0573,_0x56072d)['catch'](function(_0x13fa57){logger[_0xe5ee('0x35')]('update\x20queue\x20report',_0x13fa57);});}});}}function endRouting(_0x345b2b,_0xa6221e,_0x2806e6,_0x2798de){if(_0x345b2b&&_0xa6221e){_0xa6221e[_0xe5ee('0x37')]-=0x1;var _0x259ab2={'leaveAt':moment()[_0xe5ee('0x15')]('YYYY-MM-DD\x20HH:mm:ss'),'exitAt':moment()['format'](_0xe5ee('0x23')),'reason':_0xe5ee('0x3d')};logger['info'](util[_0xe5ee('0x15')](_0xe5ee('0x3e'),_0x345b2b,_0xa6221e[_0xe5ee('0x32')]));emitChannelQueueInteraction(_0x2806e6[_0xe5ee('0x26')],_0xa6221e[_0xe5ee('0x32')],_0x2806e6['body'],_0x2806e6[_0xe5ee('0xd')][_0xe5ee('0x32')],_0x2806e6[_0xe5ee('0x2c')]['id'],![],_0x2798de);if(rpc[_0x2806e6[_0xe5ee('0x26')]+_0xe5ee('0x33')]){return rpc[_0x2806e6[_0xe5ee('0x26')]+'QueueReport']['update'](_0x345b2b,_0x259ab2)[_0xe5ee('0x3f')](function(_0x2c41ec){logger[_0xe5ee('0x35')](_0xe5ee('0x40'),_0x2c41ec);});}}}function handleFindQueue(_0x208799){return function(_0x5dee73){return _0x5dee73[_0xe5ee('0x32')][_0xe5ee('0x41')]()===_0x208799['toLowerCase']();};}exports['consequence']=function(_0x39e9b7,_0xd9f5a8,_0x5951ef,_0x32ffee){return function(_0x29be81){try{var _0x14639f={'name':_0xd9f5a8[0x0],'timeout':_0xd9f5a8[0x1]};var _0x107f9e=queue[_0xe5ee('0x0')](_0x14639f,{'typecast':!![]});if(_0x107f9e[_0xe5ee('0x42')]){logger[_0xe5ee('0x35')](_0xe5ee('0x43'),_0x39e9b7,_['map'](_0x107f9e,_0xe5ee('0x2c'))['join'](',\x20'));_0x29be81[_0xe5ee('0x44')]();}else{var _0xb204bb=_['find'](_0x5951ef[_0x32ffee[_0xe5ee('0x26')]+_0xe5ee('0x45')],handleFindQueue(_0x14639f[_0xe5ee('0x32')]));if(_0xb204bb){startRouting(_0x39e9b7,_0xb204bb,_0x32ffee,_0x5951ef);var _0x385b6f=(_0xb204bb[_0xe5ee('0x3d')]||0xa)*0x3e8;var _0x30b32c=(_0x14639f['timeout']||0x14)*0x3e8;var _0xffd955;if(_0x385b6f>_0x30b32c){_0x30b32c=_0x385b6f;}var _0x53e30c=seqqueue[_0xe5ee('0x46')](_0x385b6f);_0x53e30c['id']=_0x39e9b7;_0x53e30c['atimeout']=_0x385b6f;_0x53e30c[_0xe5ee('0x47')]=_0x30b32c;_0x53e30c['channel']=_0x32ffee[_0xe5ee('0x26')];_0x5951ef[_0xe5ee('0x48')][_0x39e9b7]['on'](_0xe5ee('0x49'),function(){logger[_0xe5ee('0x30')](_0xe5ee('0x4a'),_0x39e9b7);stopRouting(_0x39e9b7,_0xb204bb,_0x32ffee,_0x5951ef);clearTimeout(_0xffd955);_0xffd955=undefined;_0x53e30c[_0xe5ee('0x4b')](!![]);if(_0x5951ef[_0xe5ee('0x48')][_0x39e9b7]){delete _0x5951ef[_0xe5ee('0x48')][_0x39e9b7];}_0x29be81[_0xe5ee('0x44')]();});_0x5951ef[_0xe5ee('0x48')][_0x39e9b7]['on']('complete',function(){if(_0x5951ef[_0xe5ee('0x48')][_0x39e9b7]){delete _0x5951ef[_0xe5ee('0x48')][_0x39e9b7];}});_0xffd955=setTimeout(function(){logger[_0xe5ee('0x30')](_0xe5ee('0x4c'),_0x39e9b7);endRouting(_0x39e9b7,_0xb204bb,_0x32ffee,_0x5951ef);clearTimeout(_0xffd955);_0x53e30c['close'](!![]);_0x29be81[_0xe5ee('0x4d')]();},_0x30b32c);switch(_0xb204bb['strategy']){case _0xe5ee('0x4e'):strategy[_0xe5ee('0x4e')](_0x53e30c,_0xb204bb,_0x5951ef,_0x32ffee);break;default:strategy[_0xe5ee('0x4f')](_0x53e30c,_0xb204bb,_0x5951ef,_0x32ffee);}}else{logger[_0xe5ee('0x35')](_0xe5ee('0x50'),_0x39e9b7,_0x14639f[_0xe5ee('0x32')]);_0x29be81[_0xe5ee('0x44')]();}}}catch(_0x168874){logger[_0xe5ee('0x35')](_0xe5ee('0x43'),_0x39e9b7,_0x168874['stack']);_0x29be81[_0xe5ee('0x44')]();}};};
\ No newline at end of file
+var _0x4193=['%sQueuesWaitingInteractions','pick','%s:queue:%s','%s_queue_waiting_interaction:%s','save','remove','../../rpc/openchannelQueueReport','../../rpc/chatQueueReport','../../rpc/smsQueueReport','../../rpc/faxQueueReport','../../rpc/whatsappQueueReport','../../rpc/chatInteraction','../../rpc/faxInteraction','../../rpc/mailInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','string','name\x20is\x20a\x20string\x20and\x20it\x20is\x20required','number','timeout\x20is\x20a\x20number','waiting','body','YYYY-MM-DD\x20HH:mm:ss','contact','list','upperFirst','channel','QueueId','InteractionId','interaction','MessageId','message','chat','AccountId','info','[%s][START:QUEUE][NAME:%s]','name','QueueReport','create','catch','accepted','[%s][STOP:QUEUE][NAME:%s]','Interaction','then','error','update\x20queue\x20report','timeout','[%s][END:QUEUE][NAME:%s]','update','toLowerCase','length','[%s][QUEUE]\x20%s','map','join','find','Queues','qtimeout','rules','end','stop','next','strategy','rrmemory','beepall','[%s][QUEUE]\x20queue\x20not\x20found\x20%s','stack','validate','lodash','seq-queue','ioredis','../../../../config/logger','routing','./strategy','redis','defaults','localhost','socket.io-emitter','queue_id','account','queue','from','joinAt','emit','push','format'];(function(_0x5b6da2,_0x11b955){var _0x5550a1=function(_0x1a245c){while(--_0x1a245c){_0x5b6da2['push'](_0x5b6da2['shift']());}};_0x5550a1(++_0x11b955);}(_0x4193,0x1eb));var _0x3419=function(_0x3b48f0,_0x4f3c87){_0x3b48f0=_0x3b48f0-0x0;var _0x5dc733=_0x4193[_0x3b48f0];return _0x5dc733;};'use strict';var schema=require(_0x3419('0x0'));var _=require(_0x3419('0x1'));var util=require('util');var seqqueue=require(_0x3419('0x2'));var moment=require('moment');var Redis=require(_0x3419('0x3'));var config=require('../../../../config/environment');var logger=require(_0x3419('0x4'))(_0x3419('0x5'));var strategy=require(_0x3419('0x6'));config[_0x3419('0x7')]=_[_0x3419('0x8')](config[_0x3419('0x7')],{'host':_0x3419('0x9'),'port':0x18eb});var io=require(_0x3419('0xa'))(new Redis(config[_0x3419('0x7')]));var attributes=['id',_0x3419('0xb'),_0x3419('0xc'),_0x3419('0xd'),_0x3419('0xe'),_0x3419('0xf')];function emit(_0x5a021d,_0x56ab62,_0x2c664b){io['to'](_0x5a021d)[_0x3419('0x10')](_0x56ab62,_0x2c664b);}function emitChannelQueueInteraction(_0x15bd48,_0x23bead,_0x6bc39,_0x3f7fc2,_0x334dad,_0x4cbfc8,_0x373acc,_0x54159e){var _0x4b71b7=_['clone'](_0x6bc39);_0x4b71b7[_0x3419('0xb')]=_0x54159e;_0x4b71b7[_0x3419('0xd')]=_0x23bead;_0x4b71b7[_0x3419('0xc')]=_0x3f7fc2;_0x4b71b7['id']=_0x334dad;if(_0x4cbfc8){attributes[_0x3419('0x11')](_['capitalize'](_0x15bd48)+'InteractionId');_0x373acc[util[_0x3419('0x12')](_0x3419('0x13'),_0x15bd48)][_0x334dad]=_[_0x3419('0x14')](_0x4b71b7,attributes);}else{delete _0x373acc[util[_0x3419('0x12')]('%sQueuesWaitingInteractions',_0x15bd48)][_0x334dad];}emit(util[_0x3419('0x12')](_0x3419('0x15'),_0x15bd48,_0x23bead),util[_0x3419('0x12')](_0x3419('0x16'),_0x15bd48,_0x4cbfc8?_0x3419('0x17'):_0x3419('0x18')),_['pick'](_0x4b71b7,attributes));}var rpc={'openchannelQueueReport':require(_0x3419('0x19')),'mailQueueReport':require('../../rpc/mailQueueReport'),'chatQueueReport':require(_0x3419('0x1a')),'smsQueueReport':require(_0x3419('0x1b')),'faxQueueReport':require(_0x3419('0x1c')),'whatsappQueueReport':require(_0x3419('0x1d')),'chatInteraction':require(_0x3419('0x1e')),'faxInteraction':require(_0x3419('0x1f')),'mailInteraction':require(_0x3419('0x20')),'openchannelInteraction':require(_0x3419('0x21')),'smsInteraction':require(_0x3419('0x22')),'whatsappInteraction':require('../../rpc/whatsappInteraction')};var queue=schema({'name':{'type':_0x3419('0x23'),'required':!![],'message':_0x3419('0x24')},'timeout':{'type':_0x3419('0x25'),'message':_0x3419('0x26')}});function startRouting(_0x540ae6,_0x2e5c03,_0x428036,_0x1ec91c){if(_0x540ae6&&_0x2e5c03&&_0x428036){_0x2e5c03[_0x3419('0x27')]+=0x1;var _0x3b046a={'uniqueid':_0x540ae6,'from':_0x428036[_0x3419('0x28')]?_0x428036['body']['from']:'','joinAt':moment()[_0x3419('0x12')](_0x3419('0x29')),'ContactId':_0x428036[_0x3419('0x2a')]?_0x428036['contact']['id']:null,'ListId':_0x428036[_0x3419('0x2b')]?_0x428036[_0x3419('0x2b')]['id']:null};_0x3b046a[_[_0x3419('0x2c')](_0x428036[_0x3419('0x2d')])+_0x3419('0x2e')]=_0x2e5c03['id']||null;_0x3b046a[_[_0x3419('0x2c')](_0x428036[_0x3419('0x2d')])+_0x3419('0x2f')]=_0x428036[_0x3419('0x30')]?_0x428036[_0x3419('0x30')]['id']:null;_0x3b046a[_[_0x3419('0x2c')](_0x428036['channel'])+_0x3419('0x31')]=_0x428036[_0x3419('0x32')]?_0x428036[_0x3419('0x32')]['id']:null;_0x3b046a[_[_0x3419('0x2c')](_0x428036[_0x3419('0x2d')])+(_0x428036['channel']!==_0x3419('0x33')?_0x3419('0x34'):'WebsiteId')]=_0x428036['account']?_0x428036[_0x3419('0xc')]['id']:null;logger[_0x3419('0x35')](util[_0x3419('0x12')](_0x3419('0x36'),_0x540ae6,_0x2e5c03['name']));emitChannelQueueInteraction(_0x428036['channel'],_0x2e5c03[_0x3419('0x37')],_0x3b046a,_0x428036[_0x3419('0xc')]['name'],_0x428036[_0x3419('0x32')]['id'],!![],_0x1ec91c,_0x2e5c03['id']);if(rpc[_0x428036[_0x3419('0x2d')]+_0x3419('0x38')]){return rpc[_0x428036[_0x3419('0x2d')]+'QueueReport'][_0x3419('0x39')](_0x3b046a)[_0x3419('0x3a')](function(_0x12e4c3){logger['error']('create\x20queue\x20report',_0x12e4c3);});}}}function stopRouting(_0x4b11d8,_0x5ea4a2,_0x2a9ddf,_0x143b46){if(_0x4b11d8&&_0x5ea4a2){_0x5ea4a2[_0x3419('0x27')]-=0x1;var _0x3c6676={'leaveAt':moment()[_0x3419('0x12')](_0x3419('0x29')),'acceptAt':moment()['format'](_0x3419('0x29')),'reason':_0x3419('0x3b')};logger['info'](util[_0x3419('0x12')](_0x3419('0x3c'),_0x4b11d8,_0x5ea4a2[_0x3419('0x37')]));emitChannelQueueInteraction(_0x2a9ddf[_0x3419('0x2d')],_0x5ea4a2['name'],_0x2a9ddf[_0x3419('0x28')],_0x2a9ddf['account'][_0x3419('0x37')],_0x2a9ddf[_0x3419('0x32')]['id'],![],_0x143b46,_0x5ea4a2['id']);return rpc[_0x2a9ddf[_0x3419('0x2d')]+_0x3419('0x3d')]['update'](_0x2a9ddf[_0x3419('0x30')]['id'],{'queueId':_0x5ea4a2['id']})[_0x3419('0x3e')](function(){if(rpc[_0x2a9ddf['channel']+_0x3419('0x38')]){return rpc[_0x2a9ddf[_0x3419('0x2d')]+_0x3419('0x38')]['update'](_0x4b11d8,_0x3c6676)[_0x3419('0x3a')](function(_0x20f227){logger[_0x3419('0x3f')](_0x3419('0x40'),_0x20f227);});}});}}function endRouting(_0x5b4303,_0x65e7b6,_0x5cce8e,_0x2e77fc){if(_0x5b4303&&_0x65e7b6){_0x65e7b6['waiting']-=0x1;var _0x4cca04={'leaveAt':moment()[_0x3419('0x12')]('YYYY-MM-DD\x20HH:mm:ss'),'exitAt':moment()[_0x3419('0x12')](_0x3419('0x29')),'reason':_0x3419('0x41')};logger[_0x3419('0x35')](util['format'](_0x3419('0x42'),_0x5b4303,_0x65e7b6[_0x3419('0x37')]));emitChannelQueueInteraction(_0x5cce8e[_0x3419('0x2d')],_0x65e7b6[_0x3419('0x37')],_0x5cce8e[_0x3419('0x28')],_0x5cce8e[_0x3419('0xc')][_0x3419('0x37')],_0x5cce8e['message']['id'],![],_0x2e77fc);if(rpc[_0x5cce8e[_0x3419('0x2d')]+_0x3419('0x38')]){return rpc[_0x5cce8e['channel']+_0x3419('0x38')][_0x3419('0x43')](_0x5b4303,_0x4cca04)['catch'](function(_0x3b01e5){logger['error']('update\x20queue\x20report',_0x3b01e5);});}}}function handleFindQueue(_0x540929){return function(_0x38c5ac){return _0x38c5ac[_0x3419('0x37')][_0x3419('0x44')]()===_0x540929[_0x3419('0x44')]();};}exports['consequence']=function(_0x29d0f4,_0x3ceff6,_0x58941f,_0x1c8035){return function(_0x21d2d8){try{var _0x147615={'name':_0x3ceff6[0x0],'timeout':_0x3ceff6[0x1]};var _0x3c04a0=queue[_0x3419('0x0')](_0x147615,{'typecast':!![]});if(_0x3c04a0[_0x3419('0x45')]){logger[_0x3419('0x3f')](_0x3419('0x46'),_0x29d0f4,_[_0x3419('0x47')](_0x3c04a0,_0x3419('0x32'))[_0x3419('0x48')](',\x20'));_0x21d2d8['stop']();}else{var _0x2251f9=_[_0x3419('0x49')](_0x58941f[_0x1c8035[_0x3419('0x2d')]+_0x3419('0x4a')],handleFindQueue(_0x147615['name']));if(_0x2251f9){startRouting(_0x29d0f4,_0x2251f9,_0x1c8035,_0x58941f);var _0x4e9c0e=(_0x2251f9[_0x3419('0x41')]||0xa)*0x3e8;var _0x3c9eeb=(_0x147615['timeout']||0x14)*0x3e8;var _0x3db3c9;if(_0x4e9c0e>_0x3c9eeb){_0x3c9eeb=_0x4e9c0e;}var _0x298044=seqqueue['createQueue'](_0x4e9c0e);_0x298044['id']=_0x29d0f4;_0x298044['atimeout']=_0x4e9c0e;_0x298044[_0x3419('0x4b')]=_0x3c9eeb;_0x298044[_0x3419('0x2d')]=_0x1c8035[_0x3419('0x2d')];_0x58941f[_0x3419('0x4c')][_0x29d0f4]['on'](_0x3419('0x4d'),function(){logger[_0x3419('0x35')]('[%s][QUEUE]\x20ROUTING\x20STOPPED',_0x29d0f4);stopRouting(_0x29d0f4,_0x2251f9,_0x1c8035,_0x58941f);clearTimeout(_0x3db3c9);_0x3db3c9=undefined;_0x298044['close'](!![]);if(_0x58941f[_0x3419('0x4c')][_0x29d0f4]){delete _0x58941f['rules'][_0x29d0f4];}_0x21d2d8[_0x3419('0x4e')]();});_0x58941f[_0x3419('0x4c')][_0x29d0f4]['on']('complete',function(){if(_0x58941f[_0x3419('0x4c')][_0x29d0f4]){delete _0x58941f[_0x3419('0x4c')][_0x29d0f4];}});_0x3db3c9=setTimeout(function(){logger[_0x3419('0x35')]('[%s][QUEUE]\x20APPLICATION\x20END',_0x29d0f4);endRouting(_0x29d0f4,_0x2251f9,_0x1c8035,_0x58941f);clearTimeout(_0x3db3c9);_0x298044['close'](!![]);_0x21d2d8[_0x3419('0x4f')]();},_0x3c9eeb);switch(_0x2251f9[_0x3419('0x50')]){case _0x3419('0x51'):strategy[_0x3419('0x51')](_0x298044,_0x2251f9,_0x58941f,_0x1c8035);break;default:strategy[_0x3419('0x52')](_0x298044,_0x2251f9,_0x58941f,_0x1c8035);}}else{logger['error'](_0x3419('0x53'),_0x29d0f4,_0x147615[_0x3419('0x37')]);_0x21d2d8[_0x3419('0x4e')]();}}}catch(_0x4a8a89){logger[_0x3419('0x3f')](_0x3419('0x46'),_0x29d0f4,_0x4a8a89[_0x3419('0x54')]);_0x21d2d8['stop']();}};};
\ No newline at end of file
index afa7175..387ecc0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x04de=['uuid','./util','../../../../../config/logger','routing','notificationId','squeue','push','handleRun','bind','handleTimeout','timeout','drained','handleDrained','prototype','debug','[%s][AGENT]\x20try\x20with\x20%s','agent','isNil','agents','forcedOwnership','isAgentAvailable','realtime','channel','writeLog','RINGING','[%s][AGENT]\x20agent\x20%s\x20is\x20not\x20available','[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s','hideNotification','busy','busyQueue','removeWaitingNotification','exports','lodash'];(function(_0x2d7f0e,_0x3e6fbd){var _0x110b07=function(_0x557b00){while(--_0x557b00){_0x2d7f0e['push'](_0x2d7f0e['shift']());}};_0x110b07(++_0x3e6fbd);}(_0x04de,0x107));var _0xe04d=function(_0x488689,_0x3bb835){_0x488689=_0x488689-0x0;var _0x215ee4=_0x04de[_0x488689];return _0x215ee4;};'use strict';var _=require(_0xe04d('0x0'));var uuid=require(_0xe04d('0x1'));var util=require(_0xe04d('0x2'));var logger=require(_0xe04d('0x3'))(_0xe04d('0x4'));var Agent=function(_0x28f63f,_0x1113af,_0x43c4b1,_0x2593a4){this[_0xe04d('0x5')]=uuid['v4']();this[_0xe04d('0x6')]=_0x28f63f;this['agent']=_0x1113af;this['realtime']=_0x43c4b1;this['routing']=_0x2593a4;this['squeue'][_0xe04d('0x7')](this[_0xe04d('0x8')][_0xe04d('0x9')](this),this[_0xe04d('0xa')][_0xe04d('0x9')](this));this[_0xe04d('0x6')]['on'](_0xe04d('0xb'),this[_0xe04d('0xa')]['bind'](this));this[_0xe04d('0x6')]['on'](_0xe04d('0xc'),this[_0xe04d('0xd')][_0xe04d('0x9')](this));};Agent[_0xe04d('0xe')][_0xe04d('0x7')]=function(){this[_0xe04d('0x6')][_0xe04d('0x7')](this[_0xe04d('0x8')]['bind'](this),this[_0xe04d('0xa')][_0xe04d('0x9')](this));};Agent[_0xe04d('0xe')][_0xe04d('0xd')]=function(){this[_0xe04d('0xa')](!![]);};Agent[_0xe04d('0xe')][_0xe04d('0x8')]=function(){logger[_0xe04d('0xf')](_0xe04d('0x10'),this[_0xe04d('0x6')]['id'],this[_0xe04d('0x11')]['id']);if(_[_0xe04d('0x12')](this['realtime'][_0xe04d('0x13')][this['agent']['id']])){logger[_0xe04d('0xf')]('[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s',this[_0xe04d('0x6')]['id'],this[_0xe04d('0x11')]['id']);setTimeout(this[_0xe04d('0x7')][_0xe04d('0x9')](this),0x3e8);}else{if(this[_0xe04d('0x4')][_0xe04d('0x14')]||util[_0xe04d('0x15')](this[_0xe04d('0x6')]['id'],this[_0xe04d('0x16')]['agents'][this[_0xe04d('0x11')]['id']],this[_0xe04d('0x6')][_0xe04d('0x17')],![])){this[_0xe04d('0x16')][_0xe04d('0x13')][this[_0xe04d('0x11')]['id']]['busy']=!![];this[_0xe04d('0x16')][_0xe04d('0x13')][this['agent']['id']]['busyQueue']=undefined;util['saveWaitingNotification'](this[_0xe04d('0x16')],this['routing'],this['agent'],this[_0xe04d('0x6')][_0xe04d('0x17')]);util['showNotification'](this[_0xe04d('0x5')],this['squeue']['id'],this[_0xe04d('0x16')]['agents'][this[_0xe04d('0x11')]['id']],null,this[_0xe04d('0x4')]);util[_0xe04d('0x18')](this[_0xe04d('0x6')]['id'],this[_0xe04d('0x16')]['agents'][this[_0xe04d('0x11')]['id']],_0xe04d('0x19')+(this[_0xe04d('0x4')][_0xe04d('0x14')]?':FORCED':''));}else{logger[_0xe04d('0xf')](_0xe04d('0x1a'),this[_0xe04d('0x6')]['id'],this['agent']['id']);setTimeout(this[_0xe04d('0x7')]['bind'](this),0x3e8);}}};Agent['prototype']['handleTimeout']=function(_0x25299b){if(_[_0xe04d('0x12')](this['realtime']['agents'][this[_0xe04d('0x11')]['id']])){return logger[_0xe04d('0xf')](_0xe04d('0x1b'),this['squeue']['id'],this[_0xe04d('0x11')]['id']);}else{logger[_0xe04d('0xf')]('[%s][AGENT]\x20timeout\x20with\x20%s',this[_0xe04d('0x6')]['id'],this['agent']['id']);util[_0xe04d('0x1c')](this[_0xe04d('0x5')],this['squeue']['id'],this[_0xe04d('0x16')]['agents'][this[_0xe04d('0x11')]['id']],null,this[_0xe04d('0x4')]);this[_0xe04d('0x16')][_0xe04d('0x13')][this[_0xe04d('0x11')]['id']][_0xe04d('0x1d')]=![];this[_0xe04d('0x16')]['agents'][this[_0xe04d('0x11')]['id']][_0xe04d('0x1e')]=undefined;util[_0xe04d('0x1f')](this[_0xe04d('0x16')],this[_0xe04d('0x4')],this[_0xe04d('0x11')],this[_0xe04d('0x6')][_0xe04d('0x17')]);util[_0xe04d('0x18')](this['squeue']['id'],this[_0xe04d('0x16')]['agents'][this[_0xe04d('0x11')]['id']],_0x25299b?'STOP':'TIMEOUT');}if(!_0x25299b){setTimeout(this[_0xe04d('0x7')][_0xe04d('0x9')](this),0x3e8);}};function agent(_0x261116,_0x2ad374,_0x56e74d,_0xa202ee){return new Agent(_0x261116,_0x2ad374,_0x56e74d,_0xa202ee);}module[_0xe04d('0x20')]=agent;
\ No newline at end of file
+var _0xdb94=['agents','channel','busy','busyQueue','showNotification','notificationId','writeLog','forcedOwnership','[%s][AGENT]\x20agent\x20%s\x20is\x20not\x20available','[%s][AGENT]\x20timeout\x20with\x20%s','removeWaitingNotification','exports','uuid','./util','routing','squeue','realtime','push','handleRun','handleTimeout','bind','timeout','drained','handleDrained','prototype','debug','[%s][AGENT]\x20try\x20with\x20%s','isNil','agent','[%s][AGENT]\x20agent\x20skipped,\x20unknown\x20id\x20%s','isAgentAvailable'];(function(_0x2db12b,_0x30ab1d){var _0x20990b=function(_0x589477){while(--_0x589477){_0x2db12b['push'](_0x2db12b['shift']());}};_0x20990b(++_0x30ab1d);}(_0xdb94,0xe5));var _0x4db9=function(_0x14e4fd,_0x1f2655){_0x14e4fd=_0x14e4fd-0x0;var _0x5ca430=_0xdb94[_0x14e4fd];return _0x5ca430;};'use strict';var _=require('lodash');var uuid=require(_0x4db9('0x0'));var util=require(_0x4db9('0x1'));var logger=require('../../../../../config/logger')(_0x4db9('0x2'));var Agent=function(_0x3b24a6,_0x25b510,_0x2e85f4,_0x1f05d4){this['notificationId']=uuid['v4']();this[_0x4db9('0x3')]=_0x3b24a6;this['agent']=_0x25b510;this[_0x4db9('0x4')]=_0x2e85f4;this[_0x4db9('0x2')]=_0x1f05d4;this[_0x4db9('0x3')][_0x4db9('0x5')](this[_0x4db9('0x6')]['bind'](this),this[_0x4db9('0x7')][_0x4db9('0x8')](this));this[_0x4db9('0x3')]['on'](_0x4db9('0x9'),this[_0x4db9('0x7')]['bind'](this));this[_0x4db9('0x3')]['on'](_0x4db9('0xa'),this[_0x4db9('0xb')][_0x4db9('0x8')](this));};Agent[_0x4db9('0xc')][_0x4db9('0x5')]=function(){this['squeue'][_0x4db9('0x5')](this[_0x4db9('0x6')]['bind'](this),this['handleTimeout'][_0x4db9('0x8')](this));};Agent[_0x4db9('0xc')][_0x4db9('0xb')]=function(){this['handleTimeout'](!![]);};Agent[_0x4db9('0xc')][_0x4db9('0x6')]=function(){logger[_0x4db9('0xd')](_0x4db9('0xe'),this[_0x4db9('0x3')]['id'],this['agent']['id']);if(_[_0x4db9('0xf')](this[_0x4db9('0x4')]['agents'][this[_0x4db9('0x10')]['id']])){logger[_0x4db9('0xd')](_0x4db9('0x11'),this['squeue']['id'],this[_0x4db9('0x10')]['id']);setTimeout(this[_0x4db9('0x5')]['bind'](this),0x3e8);}else{if(this['routing']['forcedOwnership']||util[_0x4db9('0x12')](this[_0x4db9('0x3')]['id'],this['realtime'][_0x4db9('0x13')][this[_0x4db9('0x10')]['id']],this[_0x4db9('0x3')][_0x4db9('0x14')],![])){this[_0x4db9('0x4')][_0x4db9('0x13')][this[_0x4db9('0x10')]['id']][_0x4db9('0x15')]=!![];this[_0x4db9('0x4')][_0x4db9('0x13')][this[_0x4db9('0x10')]['id']][_0x4db9('0x16')]=undefined;util['saveWaitingNotification'](this[_0x4db9('0x4')],this[_0x4db9('0x2')],this['agent'],this[_0x4db9('0x3')][_0x4db9('0x14')]);util[_0x4db9('0x17')](this[_0x4db9('0x18')],this['squeue']['id'],this[_0x4db9('0x4')]['agents'][this[_0x4db9('0x10')]['id']],null,this[_0x4db9('0x2')]);util[_0x4db9('0x19')](this[_0x4db9('0x3')]['id'],this[_0x4db9('0x4')][_0x4db9('0x13')][this[_0x4db9('0x10')]['id']],'RINGING'+(this['routing'][_0x4db9('0x1a')]?':FORCED':''));}else{logger[_0x4db9('0xd')](_0x4db9('0x1b'),this[_0x4db9('0x3')]['id'],this[_0x4db9('0x10')]['id']);setTimeout(this[_0x4db9('0x5')][_0x4db9('0x8')](this),0x3e8);}}};Agent[_0x4db9('0xc')][_0x4db9('0x7')]=function(_0x4c4a47){if(_[_0x4db9('0xf')](this['realtime'][_0x4db9('0x13')][this[_0x4db9('0x10')]['id']])){return logger[_0x4db9('0xd')](_0x4db9('0x11'),this[_0x4db9('0x3')]['id'],this['agent']['id']);}else{logger[_0x4db9('0xd')](_0x4db9('0x1c'),this[_0x4db9('0x3')]['id'],this[_0x4db9('0x10')]['id']);util['hideNotification'](this['notificationId'],this[_0x4db9('0x3')]['id'],this[_0x4db9('0x4')]['agents'][this['agent']['id']],null,this[_0x4db9('0x2')]);this['realtime']['agents'][this[_0x4db9('0x10')]['id']][_0x4db9('0x15')]=![];this['realtime'][_0x4db9('0x13')][this[_0x4db9('0x10')]['id']][_0x4db9('0x16')]=undefined;util[_0x4db9('0x1d')](this['realtime'],this[_0x4db9('0x2')],this['agent'],this['squeue']['channel']);util[_0x4db9('0x19')](this[_0x4db9('0x3')]['id'],this['realtime'][_0x4db9('0x13')][this[_0x4db9('0x10')]['id']],_0x4c4a47?'STOP':'TIMEOUT');}if(!_0x4c4a47){setTimeout(this['push'][_0x4db9('0x8')](this),0x3e8);}};function agent(_0x52613e,_0x29dc69,_0x52711a,_0xaf383e){return new Agent(_0x52613e,_0x29dc69,_0x52711a,_0xaf383e);}module[_0x4db9('0x1e')]=agent;
\ No newline at end of file
index b44bc60..5f27e93 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb2c0=['exports','lodash','routing','notificationId','squeue','push','handleRun','handleTimeout','bind','drained','prototype','handleDrained','isNil','queue','Agents','realtime','agents','[%s][QUEUE]\x20agent\x20skipped,\x20unknown\x20id\x20%s','isAgentAvailable','channel','writeLog','busy','busyQueue','name','saveWaitingNotification','[%s][QUEUE]\x20ALL\x20AGENTS\x20ARE\x20BUSY','debug','[%s][QUEUE]\x20EMPTY','hideNotification','STOP','removeWaitingNotification'];(function(_0x48f8ac,_0x556e00){var _0x235f4e=function(_0x1cc122){while(--_0x1cc122){_0x48f8ac['push'](_0x48f8ac['shift']());}};_0x235f4e(++_0x556e00);}(_0xb2c0,0x156));var _0x0b2c=function(_0x3b380d,_0x4bf247){_0x3b380d=_0x3b380d-0x0;var _0x54502b=_0xb2c0[_0x3b380d];return _0x54502b;};'use strict';var _=require(_0x0b2c('0x0'));var uuid=require('uuid');var util=require('./util');var logger=require('../../../../../config/logger')(_0x0b2c('0x1'));var Beepall=function(_0x577aeb,_0x3a401e,_0x13b5af,_0x39f616){this[_0x0b2c('0x2')]=uuid['v4']();this[_0x0b2c('0x3')]=_0x577aeb;this['queue']=_0x3a401e;this['realtime']=_0x13b5af;this[_0x0b2c('0x1')]=_0x39f616;this['squeue'][_0x0b2c('0x4')](this[_0x0b2c('0x5')]['bind'](this),this[_0x0b2c('0x6')][_0x0b2c('0x7')](this));this[_0x0b2c('0x3')]['on']('timeout',this[_0x0b2c('0x6')]['bind'](this));this[_0x0b2c('0x3')]['on'](_0x0b2c('0x8'),this['handleDrained']['bind'](this));};Beepall[_0x0b2c('0x9')][_0x0b2c('0x4')]=function(){this[_0x0b2c('0x3')]['push'](this[_0x0b2c('0x5')][_0x0b2c('0x7')](this),this[_0x0b2c('0x6')][_0x0b2c('0x7')](this));};Beepall[_0x0b2c('0x9')][_0x0b2c('0xa')]=function(){this[_0x0b2c('0x6')](!![]);};Beepall[_0x0b2c('0x9')][_0x0b2c('0x5')]=function(){var _0x2a4cba=!![];if(!_[_0x0b2c('0xb')](this[_0x0b2c('0xc')])&&!_[_0x0b2c('0xb')](this[_0x0b2c('0xc')][_0x0b2c('0xd')])&&this['queue'][_0x0b2c('0xd')]['length']>0x0){for(var _0x57be31=0x0,_0xbf7334;_0x57be31<this[_0x0b2c('0xc')][_0x0b2c('0xd')]['length'];_0x57be31+=0x1){_0xbf7334=this[_0x0b2c('0xc')][_0x0b2c('0xd')][_0x57be31]['id'];if(_['isNil'](this[_0x0b2c('0xe')][_0x0b2c('0xf')][_0xbf7334])){logger['debug'](_0x0b2c('0x10'),this[_0x0b2c('0x3')]['id'],_0xbf7334);}else{if(util[_0x0b2c('0x11')](this[_0x0b2c('0x3')]['id'],this[_0x0b2c('0xe')][_0x0b2c('0xf')][_0xbf7334],this[_0x0b2c('0x3')][_0x0b2c('0x12')],!![])){_0x2a4cba=![];util[_0x0b2c('0x13')](this[_0x0b2c('0x3')]['id'],this[_0x0b2c('0xe')][_0x0b2c('0xf')][_0xbf7334],'RINGING');this[_0x0b2c('0xe')]['agents'][_0xbf7334][_0x0b2c('0x14')]=!![];this[_0x0b2c('0xe')]['agents'][_0xbf7334][_0x0b2c('0x15')]=this[_0x0b2c('0xc')][_0x0b2c('0x16')];util[_0x0b2c('0x17')](this[_0x0b2c('0xe')],this['routing'],this[_0x0b2c('0xc')][_0x0b2c('0xd')][_0x57be31],this['squeue'][_0x0b2c('0x12')]);util['showNotification'](this[_0x0b2c('0x2')],this[_0x0b2c('0x3')]['id'],this[_0x0b2c('0xe')]['agents'][_0xbf7334],this[_0x0b2c('0xc')],this[_0x0b2c('0x1')]);}}}if(_0x2a4cba){logger['debug'](_0x0b2c('0x18'),this[_0x0b2c('0x3')]['id']);setTimeout(this[_0x0b2c('0x4')][_0x0b2c('0x7')](this),0x3e8);}}else{logger[_0x0b2c('0x19')](_0x0b2c('0x1a'),this['squeue']['id']);setTimeout(this['push']['bind'](this),0x3e8);}};Beepall[_0x0b2c('0x9')][_0x0b2c('0x6')]=function(_0x256f42){if(!_[_0x0b2c('0xb')](this['queue'])&&!_[_0x0b2c('0xb')](this[_0x0b2c('0xc')][_0x0b2c('0xd')])){for(var _0x1ab93c=0x0,_0x43cee5;_0x1ab93c<this[_0x0b2c('0xc')]['Agents']['length'];_0x1ab93c+=0x1){_0x43cee5=this[_0x0b2c('0xc')][_0x0b2c('0xd')][_0x1ab93c]['id'];if(_[_0x0b2c('0xb')](this[_0x0b2c('0xe')][_0x0b2c('0xf')][_0x43cee5])){logger['debug'](_0x0b2c('0x10'),this[_0x0b2c('0x3')]['id'],_0x43cee5);}else{util[_0x0b2c('0x1b')](this['notificationId'],this[_0x0b2c('0x3')]['id'],this[_0x0b2c('0xe')]['agents'][_0x43cee5],this[_0x0b2c('0xc')],this['routing']);util['writeLog'](this['squeue']['id'],this[_0x0b2c('0xe')][_0x0b2c('0xf')][_0x43cee5],_0x256f42?_0x0b2c('0x1c'):'TIMEOUT');this['realtime'][_0x0b2c('0xf')][_0x43cee5][_0x0b2c('0x14')]=![];this['realtime'][_0x0b2c('0xf')][_0x43cee5][_0x0b2c('0x15')]=undefined;util[_0x0b2c('0x1d')](this[_0x0b2c('0xe')],this['routing'],this[_0x0b2c('0xe')][_0x0b2c('0xf')][_0x43cee5],this[_0x0b2c('0x3')][_0x0b2c('0x12')]);}}}if(!_0x256f42){setTimeout(this[_0x0b2c('0x4')][_0x0b2c('0x7')](this),0x3e8);}};function beepall(_0x58f484,_0x3befa0,_0x3be6fb,_0x5e38dc){return new Beepall(_0x58f484,_0x3befa0,_0x3be6fb,_0x5e38dc);}module[_0x0b2c('0x1e')]=beepall;
\ No newline at end of file
+var _0xde5f=['routing','push','handleRun','bind','handleTimeout','drained','prototype','handleDrained','queue','isNil','Agents','length','agents','[%s][QUEUE]\x20agent\x20skipped,\x20unknown\x20id\x20%s','isAgentAvailable','channel','writeLog','RINGING','busyQueue','name','saveWaitingNotification','showNotification','debug','[%s][QUEUE]\x20ALL\x20AGENTS\x20ARE\x20BUSY','hideNotification','TIMEOUT','removeWaitingNotification','exports','./util','../../../../../config/logger','notificationId','squeue','realtime'];(function(_0x530169,_0x47d550){var _0x3ec1c3=function(_0x3f8713){while(--_0x3f8713){_0x530169['push'](_0x530169['shift']());}};_0x3ec1c3(++_0x47d550);}(_0xde5f,0x103));var _0xfde5=function(_0x3dd15e,_0x1f0015){_0x3dd15e=_0x3dd15e-0x0;var _0x231fd0=_0xde5f[_0x3dd15e];return _0x231fd0;};'use strict';var _=require('lodash');var uuid=require('uuid');var util=require(_0xfde5('0x0'));var logger=require(_0xfde5('0x1'))('routing');var Beepall=function(_0x3b9b27,_0x41155a,_0x598b59,_0xf65152){this[_0xfde5('0x2')]=uuid['v4']();this[_0xfde5('0x3')]=_0x3b9b27;this['queue']=_0x41155a;this[_0xfde5('0x4')]=_0x598b59;this[_0xfde5('0x5')]=_0xf65152;this[_0xfde5('0x3')][_0xfde5('0x6')](this[_0xfde5('0x7')][_0xfde5('0x8')](this),this[_0xfde5('0x9')][_0xfde5('0x8')](this));this[_0xfde5('0x3')]['on']('timeout',this[_0xfde5('0x9')][_0xfde5('0x8')](this));this[_0xfde5('0x3')]['on'](_0xfde5('0xa'),this['handleDrained'][_0xfde5('0x8')](this));};Beepall['prototype'][_0xfde5('0x6')]=function(){this[_0xfde5('0x3')][_0xfde5('0x6')](this[_0xfde5('0x7')]['bind'](this),this[_0xfde5('0x9')][_0xfde5('0x8')](this));};Beepall[_0xfde5('0xb')][_0xfde5('0xc')]=function(){this['handleTimeout'](!![]);};Beepall[_0xfde5('0xb')][_0xfde5('0x7')]=function(){var _0x3f1f00=!![];if(!_['isNil'](this[_0xfde5('0xd')])&&!_[_0xfde5('0xe')](this[_0xfde5('0xd')][_0xfde5('0xf')])&&this[_0xfde5('0xd')][_0xfde5('0xf')][_0xfde5('0x10')]>0x0){for(var _0x215579=0x0,_0xaefcc1;_0x215579<this[_0xfde5('0xd')][_0xfde5('0xf')][_0xfde5('0x10')];_0x215579+=0x1){_0xaefcc1=this[_0xfde5('0xd')][_0xfde5('0xf')][_0x215579]['id'];if(_['isNil'](this[_0xfde5('0x4')][_0xfde5('0x11')][_0xaefcc1])){logger['debug'](_0xfde5('0x12'),this[_0xfde5('0x3')]['id'],_0xaefcc1);}else{if(util[_0xfde5('0x13')](this['squeue']['id'],this[_0xfde5('0x4')][_0xfde5('0x11')][_0xaefcc1],this['squeue'][_0xfde5('0x14')],!![])){_0x3f1f00=![];util[_0xfde5('0x15')](this[_0xfde5('0x3')]['id'],this[_0xfde5('0x4')][_0xfde5('0x11')][_0xaefcc1],_0xfde5('0x16'));this[_0xfde5('0x4')][_0xfde5('0x11')][_0xaefcc1]['busy']=!![];this[_0xfde5('0x4')]['agents'][_0xaefcc1][_0xfde5('0x17')]=this['queue'][_0xfde5('0x18')];util[_0xfde5('0x19')](this[_0xfde5('0x4')],this[_0xfde5('0x5')],this[_0xfde5('0xd')][_0xfde5('0xf')][_0x215579],this[_0xfde5('0x3')][_0xfde5('0x14')]);util[_0xfde5('0x1a')](this['notificationId'],this[_0xfde5('0x3')]['id'],this[_0xfde5('0x4')][_0xfde5('0x11')][_0xaefcc1],this['queue'],this['routing']);}}}if(_0x3f1f00){logger[_0xfde5('0x1b')](_0xfde5('0x1c'),this['squeue']['id']);setTimeout(this[_0xfde5('0x6')][_0xfde5('0x8')](this),0x3e8);}}else{logger[_0xfde5('0x1b')]('[%s][QUEUE]\x20EMPTY',this[_0xfde5('0x3')]['id']);setTimeout(this[_0xfde5('0x6')]['bind'](this),0x3e8);}};Beepall[_0xfde5('0xb')][_0xfde5('0x9')]=function(_0x2c322c){if(!_[_0xfde5('0xe')](this[_0xfde5('0xd')])&&!_[_0xfde5('0xe')](this[_0xfde5('0xd')][_0xfde5('0xf')])){for(var _0x5ca18b=0x0,_0x23b26d;_0x5ca18b<this[_0xfde5('0xd')][_0xfde5('0xf')][_0xfde5('0x10')];_0x5ca18b+=0x1){_0x23b26d=this[_0xfde5('0xd')][_0xfde5('0xf')][_0x5ca18b]['id'];if(_[_0xfde5('0xe')](this[_0xfde5('0x4')]['agents'][_0x23b26d])){logger[_0xfde5('0x1b')](_0xfde5('0x12'),this[_0xfde5('0x3')]['id'],_0x23b26d);}else{util[_0xfde5('0x1d')](this[_0xfde5('0x2')],this[_0xfde5('0x3')]['id'],this[_0xfde5('0x4')][_0xfde5('0x11')][_0x23b26d],this['queue'],this[_0xfde5('0x5')]);util[_0xfde5('0x15')](this[_0xfde5('0x3')]['id'],this['realtime'][_0xfde5('0x11')][_0x23b26d],_0x2c322c?'STOP':_0xfde5('0x1e'));this['realtime'][_0xfde5('0x11')][_0x23b26d]['busy']=![];this['realtime'][_0xfde5('0x11')][_0x23b26d]['busyQueue']=undefined;util[_0xfde5('0x1f')](this[_0xfde5('0x4')],this['routing'],this['realtime']['agents'][_0x23b26d],this[_0xfde5('0x3')][_0xfde5('0x14')]);}}}if(!_0x2c322c){setTimeout(this[_0xfde5('0x6')][_0xfde5('0x8')](this),0x3e8);}};function beepall(_0x4ac2ba,_0x13c7e4,_0x2d43f0,_0x1e502b){return new Beepall(_0x4ac2ba,_0x13c7e4,_0x2d43f0,_0x1e502b);}module[_0xfde5('0x20')]=beepall;
\ No newline at end of file
index 2d33293..d9b4dca 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0e53=['./rrmemory','exports'];(function(_0x153716,_0x389011){var _0x369b77=function(_0x2aaa85){while(--_0x2aaa85){_0x153716['push'](_0x153716['shift']());}};_0x369b77(++_0x389011);}(_0x0e53,0x17f));var _0x30e5=function(_0x4bb139,_0x44978c){_0x4bb139=_0x4bb139-0x0;var _0x164e36=_0x0e53[_0x4bb139];return _0x164e36;};'use strict';module[_0x30e5('0x0')]={'rrmemory':require(_0x30e5('0x1')),'beepall':require('./beepall'),'agent':require('./agent')};
\ No newline at end of file
+var _0x7469=['exports','./rrmemory','./beepall','./agent'];(function(_0x53aea7,_0x35902c){var _0x57789e=function(_0x6a1e4a){while(--_0x6a1e4a){_0x53aea7['push'](_0x53aea7['shift']());}};_0x57789e(++_0x35902c);}(_0x7469,0x1d0));var _0x9746=function(_0x2c60b5,_0xca17){_0x2c60b5=_0x2c60b5-0x0;var _0x24ca1d=_0x7469[_0x2c60b5];return _0x24ca1d;};'use strict';module[_0x9746('0x0')]={'rrmemory':require(_0x9746('0x1')),'beepall':require(_0x9746('0x2')),'agent':require(_0x9746('0x3'))};
\ No newline at end of file
index 373ae5e..694dd76 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xe19c=['debug','[%s][QUEUE]\x20try\x20with\x20%s','[%s][QUEUE]\x20agent\x20skipped,\x20unknown\x20id\x20%s','busyQueue','name','saveWaitingNotification','showNotification','RINGING','handleCheckReject','[%s][QUEUE]\x20agent\x20skipped,\x20not\x20available\x20id\x20%s','isNil','writeLog','TIMEOUT','removeWaitingNotification','lodash','./util','../../../../../config/logger','notificationId','squeue','queue','realtime','routing','intervals','push','handleRun','bind','handleTimeout','module','timeout','drained','handleDrained','prototype','isAgentAvailable','agents','channel','[%s][QUEUE]\x20available\x20again\x20%s','agentId','done','mapAgentsId'];(function(_0x18580f,_0x27537a){var _0x37144f=function(_0x32174d){while(--_0x32174d){_0x18580f['push'](_0x18580f['shift']());}};_0x37144f(++_0x27537a);}(_0xe19c,0x11f));var _0xce19=function(_0x47f07d,_0x195757){_0x47f07d=_0x47f07d-0x0;var _0x3fbb32=_0xe19c[_0x47f07d];return _0x3fbb32;};'use strict';var rr=require('rr');var _=require(_0xce19('0x0'));var uuid=require('uuid');var util=require(_0xce19('0x1'));var logger=require(_0xce19('0x2'))('routing');var RRMemory=function(_0xe616ae,_0x403de4,_0x29a416,_0x4888d9){this[_0xce19('0x3')]=uuid['v4']();this[_0xce19('0x4')]=_0xe616ae;this[_0xce19('0x5')]=_0x403de4;this[_0xce19('0x6')]=_0x29a416;this[_0xce19('0x7')]=_0x4888d9;this[_0xce19('0x8')]={};this[_0xce19('0x4')][_0xce19('0x9')](this[_0xce19('0xa')][_0xce19('0xb')](this),this[_0xce19('0xc')][_0xce19('0xb')](this),this[_0xce19('0xd')]);this[_0xce19('0x4')]['on'](_0xce19('0xe'),this['handleTimeout'][_0xce19('0xb')](this));this['squeue']['on'](_0xce19('0xf'),this[_0xce19('0x10')][_0xce19('0xb')](this));};RRMemory[_0xce19('0x11')][_0xce19('0x9')]=function(){this['squeue'][_0xce19('0x9')](this[_0xce19('0xa')][_0xce19('0xb')](this),this[_0xce19('0xc')][_0xce19('0xb')](this));};RRMemory[_0xce19('0x11')][_0xce19('0x10')]=function(){this[_0xce19('0xc')](!![]);};RRMemory[_0xce19('0x11')]['handleCheckReject']=function(_0x18a0d7){if(util[_0xce19('0x12')](this[_0xce19('0x4')]['id'],this[_0xce19('0x6')][_0xce19('0x13')][this['agentId']],this['squeue'][_0xce19('0x14')],!![])){logger['debug'](_0xce19('0x15'),this['squeue']['id'],this['agentId']);clearInterval(this['intervals'][this[_0xce19('0x16')]]);_0x18a0d7[_0xce19('0x17')]();setTimeout(this[_0xce19('0x9')][_0xce19('0xb')](this),0x3e8);}};RRMemory[_0xce19('0x11')]['handleRun']=function(_0x2b2f13){this[_0xce19('0x16')]=rr(this[_0xce19('0x5')][_0xce19('0x18')]);logger[_0xce19('0x19')](_0xce19('0x1a'),this[_0xce19('0x4')]['id'],this[_0xce19('0x16')]);if(_['isNil'](this[_0xce19('0x6')][_0xce19('0x13')][this[_0xce19('0x16')]])){logger[_0xce19('0x19')](_0xce19('0x1b'),this['squeue']['id'],this[_0xce19('0x16')]);_0x2b2f13[_0xce19('0x17')]();setTimeout(this[_0xce19('0x9')][_0xce19('0xb')](this),0x3e8);}else{if(util[_0xce19('0x12')](this[_0xce19('0x4')]['id'],this['realtime'][_0xce19('0x13')][this[_0xce19('0x16')]],this[_0xce19('0x4')][_0xce19('0x14')],!![])){this[_0xce19('0x6')][_0xce19('0x13')][this['agentId']]['busy']=!![];this[_0xce19('0x6')][_0xce19('0x13')][this[_0xce19('0x16')]][_0xce19('0x1c')]=this[_0xce19('0x5')][_0xce19('0x1d')];util[_0xce19('0x1e')](this[_0xce19('0x6')],this[_0xce19('0x7')],this[_0xce19('0x6')]['agents'][this[_0xce19('0x16')]],this[_0xce19('0x4')][_0xce19('0x14')]);util[_0xce19('0x1f')](this[_0xce19('0x3')],this[_0xce19('0x4')]['id'],this['realtime'][_0xce19('0x13')][this[_0xce19('0x16')]],this[_0xce19('0x5')],this[_0xce19('0x7')]);util['writeLog'](this[_0xce19('0x4')]['id'],this[_0xce19('0x6')]['agents'][this[_0xce19('0x16')]],_0xce19('0x20'));this[_0xce19('0x8')][this[_0xce19('0x16')]]=setInterval(this[_0xce19('0x21')]['bind'](this,_0x2b2f13),0x3e8);}else{logger[_0xce19('0x19')](_0xce19('0x22'),this[_0xce19('0x4')]['id'],this['agentId']);_0x2b2f13[_0xce19('0x17')]();setTimeout(this['push'][_0xce19('0xb')](this),0x3e8);}}};RRMemory[_0xce19('0x11')][_0xce19('0xc')]=function(_0xb839e6){logger[_0xce19('0x19')]('[%s][QUEUE]\x20timeout\x20with\x20%s',this[_0xce19('0x4')]['id'],this[_0xce19('0x16')]);if(_[_0xce19('0x23')](this[_0xce19('0x6')]['agents'][this[_0xce19('0x16')]])){logger[_0xce19('0x19')](_0xce19('0x1b'),this['squeue']['id'],this['agentId']);}else{clearInterval(this[_0xce19('0x8')][this[_0xce19('0x16')]]);util['hideNotification'](this[_0xce19('0x3')],this[_0xce19('0x4')]['id'],this['realtime'][_0xce19('0x13')][this[_0xce19('0x16')]],this['queue'],this[_0xce19('0x7')]);util[_0xce19('0x24')](this[_0xce19('0x4')]['id'],this[_0xce19('0x6')]['agents'][this['agentId']],_0xce19('0x25'));this['realtime']['agents'][this['agentId']]['busy']=![];this[_0xce19('0x6')][_0xce19('0x13')][this['agentId']]['busyQueue']=undefined;util[_0xce19('0x26')](this[_0xce19('0x6')],this[_0xce19('0x7')],this[_0xce19('0x6')]['agents'][this[_0xce19('0x16')]],this[_0xce19('0x4')][_0xce19('0x14')]);}if(!_0xb839e6){setTimeout(this[_0xce19('0x9')][_0xce19('0xb')](this),0x3e8);}};function rrmemory(_0xfcb57f,_0x2135d2,_0x32de49,_0x49a5c1){return new RRMemory(_0xfcb57f,_0x2135d2,_0x32de49,_0x49a5c1);}module['exports']=rrmemory;
\ No newline at end of file
+var _0x963b=['isNil','realtime','busyQueue','queue','saveWaitingNotification','showNotification','notificationId','writeLog','intervals','[%s][QUEUE]\x20agent\x20skipped,\x20not\x20available\x20id\x20%s','[%s][QUEUE]\x20agent\x20skipped,\x20unknown\x20id\x20%s','busy','removeWaitingNotification','lodash','uuid','../../../../../config/logger','routing','squeue','push','bind','handleTimeout','module','timeout','drained','prototype','handleRun','handleCheckReject','agents','agentId','channel','debug','[%s][QUEUE]\x20available\x20again\x20%s','done','mapAgentsId','[%s][QUEUE]\x20try\x20with\x20%s'];(function(_0x160c73,_0x2ee678){var _0xd9302=function(_0x169454){while(--_0x169454){_0x160c73['push'](_0x160c73['shift']());}};_0xd9302(++_0x2ee678);}(_0x963b,0x125));var _0xb963=function(_0x4bfade,_0xb26c0e){_0x4bfade=_0x4bfade-0x0;var _0x272465=_0x963b[_0x4bfade];return _0x272465;};'use strict';var rr=require('rr');var _=require(_0xb963('0x0'));var uuid=require(_0xb963('0x1'));var util=require('./util');var logger=require(_0xb963('0x2'))(_0xb963('0x3'));var RRMemory=function(_0x4938f5,_0x41c263,_0x7c9b1e,_0xdbe681){this['notificationId']=uuid['v4']();this[_0xb963('0x4')]=_0x4938f5;this['queue']=_0x41c263;this['realtime']=_0x7c9b1e;this['routing']=_0xdbe681;this['intervals']={};this[_0xb963('0x4')][_0xb963('0x5')](this['handleRun'][_0xb963('0x6')](this),this[_0xb963('0x7')][_0xb963('0x6')](this),this[_0xb963('0x8')]);this[_0xb963('0x4')]['on'](_0xb963('0x9'),this[_0xb963('0x7')][_0xb963('0x6')](this));this[_0xb963('0x4')]['on'](_0xb963('0xa'),this['handleDrained'][_0xb963('0x6')](this));};RRMemory[_0xb963('0xb')]['push']=function(){this[_0xb963('0x4')][_0xb963('0x5')](this[_0xb963('0xc')][_0xb963('0x6')](this),this[_0xb963('0x7')]['bind'](this));};RRMemory[_0xb963('0xb')]['handleDrained']=function(){this[_0xb963('0x7')](!![]);};RRMemory[_0xb963('0xb')][_0xb963('0xd')]=function(_0x5768d6){if(util['isAgentAvailable'](this[_0xb963('0x4')]['id'],this['realtime'][_0xb963('0xe')][this[_0xb963('0xf')]],this[_0xb963('0x4')][_0xb963('0x10')],!![])){logger[_0xb963('0x11')](_0xb963('0x12'),this[_0xb963('0x4')]['id'],this['agentId']);clearInterval(this['intervals'][this['agentId']]);_0x5768d6[_0xb963('0x13')]();setTimeout(this['push']['bind'](this),0x3e8);}};RRMemory[_0xb963('0xb')][_0xb963('0xc')]=function(_0x8f06e5){this[_0xb963('0xf')]=rr(this['queue'][_0xb963('0x14')]);logger[_0xb963('0x11')](_0xb963('0x15'),this[_0xb963('0x4')]['id'],this['agentId']);if(_[_0xb963('0x16')](this['realtime']['agents'][this['agentId']])){logger[_0xb963('0x11')]('[%s][QUEUE]\x20agent\x20skipped,\x20unknown\x20id\x20%s',this['squeue']['id'],this[_0xb963('0xf')]);_0x8f06e5[_0xb963('0x13')]();setTimeout(this['push']['bind'](this),0x3e8);}else{if(util['isAgentAvailable'](this['squeue']['id'],this[_0xb963('0x17')]['agents'][this[_0xb963('0xf')]],this[_0xb963('0x4')][_0xb963('0x10')],!![])){this['realtime'][_0xb963('0xe')][this[_0xb963('0xf')]]['busy']=!![];this[_0xb963('0x17')][_0xb963('0xe')][this['agentId']][_0xb963('0x18')]=this[_0xb963('0x19')]['name'];util[_0xb963('0x1a')](this[_0xb963('0x17')],this['routing'],this['realtime']['agents'][this[_0xb963('0xf')]],this['squeue'][_0xb963('0x10')]);util[_0xb963('0x1b')](this[_0xb963('0x1c')],this[_0xb963('0x4')]['id'],this[_0xb963('0x17')][_0xb963('0xe')][this[_0xb963('0xf')]],this[_0xb963('0x19')],this[_0xb963('0x3')]);util[_0xb963('0x1d')](this['squeue']['id'],this[_0xb963('0x17')][_0xb963('0xe')][this[_0xb963('0xf')]],'RINGING');this[_0xb963('0x1e')][this[_0xb963('0xf')]]=setInterval(this[_0xb963('0xd')]['bind'](this,_0x8f06e5),0x3e8);}else{logger[_0xb963('0x11')](_0xb963('0x1f'),this['squeue']['id'],this[_0xb963('0xf')]);_0x8f06e5[_0xb963('0x13')]();setTimeout(this[_0xb963('0x5')][_0xb963('0x6')](this),0x3e8);}}};RRMemory[_0xb963('0xb')][_0xb963('0x7')]=function(_0x2d5f2f){logger[_0xb963('0x11')]('[%s][QUEUE]\x20timeout\x20with\x20%s',this[_0xb963('0x4')]['id'],this['agentId']);if(_[_0xb963('0x16')](this[_0xb963('0x17')]['agents'][this[_0xb963('0xf')]])){logger[_0xb963('0x11')](_0xb963('0x20'),this[_0xb963('0x4')]['id'],this[_0xb963('0xf')]);}else{clearInterval(this[_0xb963('0x1e')][this[_0xb963('0xf')]]);util['hideNotification'](this[_0xb963('0x1c')],this[_0xb963('0x4')]['id'],this[_0xb963('0x17')]['agents'][this[_0xb963('0xf')]],this[_0xb963('0x19')],this['routing']);util[_0xb963('0x1d')](this[_0xb963('0x4')]['id'],this['realtime'][_0xb963('0xe')][this[_0xb963('0xf')]],'TIMEOUT');this[_0xb963('0x17')][_0xb963('0xe')][this[_0xb963('0xf')]][_0xb963('0x21')]=![];this['realtime'][_0xb963('0xe')][this[_0xb963('0xf')]]['busyQueue']=undefined;util[_0xb963('0x22')](this['realtime'],this[_0xb963('0x3')],this['realtime']['agents'][this['agentId']],this[_0xb963('0x4')][_0xb963('0x10')]);}if(!_0x2d5f2f){setTimeout(this[_0xb963('0x5')][_0xb963('0x6')](this),0x3e8);}};function rrmemory(_0x449702,_0x39bc08,_0x545476,_0x46685a){return new RRMemory(_0x449702,_0x39bc08,_0x545476,_0x46685a);}module['exports']=rrmemory;
\ No newline at end of file
index d583a9c..2a3264d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x0ffc=['showNotification','hideNotification','checkWaitingNotifications','interaction','channel','QueuesWaitingInteractions','InteractionId','agents','some','WaitingInteractions','removeWaitingNotification','util','../utils','../../../../../config/environment','routing','redis','defaults','localhost','socket.io-emitter','split','\x20interaction','notificationSound','notificationShake','body','queue','notificationTemplate','msg','error','format','[%s][QUEUE]\x20%s','message','user:%s','name','emit','notification:%s','save','debug','isAgentAvailable','busy','BUSY','online','OFFLINE','Pause','PAUSE','hasOwnProperty','Capacity','CurrentCapacity','toUpperCase','\x20MAXCAPACITY'];(function(_0x2bebb2,_0x321313){var _0x277503=function(_0x15c37e){while(--_0x15c37e){_0x2bebb2['push'](_0x2bebb2['shift']());}};_0x277503(++_0x321313);}(_0x0ffc,0x9e));var _0xc0ff=function(_0x79028a,_0x5e6a2a){_0x79028a=_0x79028a-0x0;var _0x1daa07=_0x0ffc[_0x79028a];return _0x1daa07;};'use strict';var _=require('lodash');var util=require(_0xc0ff('0x0'));var utils=require(_0xc0ff('0x1'));var Redis=require('ioredis');var config=require(_0xc0ff('0x2'));var logger=require('../../../../../config/logger')(_0xc0ff('0x3'));config[_0xc0ff('0x4')]=_[_0xc0ff('0x5')](config[_0xc0ff('0x4')],{'host':_0xc0ff('0x6'),'port':0x18eb});var io=require(_0xc0ff('0x7'))(new Redis(config[_0xc0ff('0x4')]));function sendNotification(_0x1b69a1,_0x245f10,_0x51695d,_0x29f9b7,_0x2d6559,_0x3799e5){var _0x3479de=_0x3799e5||{};var _0x2b6779=_0x51695d[_0xc0ff('0x8')]('.');var _0xd6241={'uniqueid':_0x245f10,'channel':_0x2b6779[0x0],'id':_0x2b6779[0x1],'title':_0x2b6779[0x0]+_0xc0ff('0x9'),'interactionId':_0x2b6779[0x2],'queue':_0x2d6559?_0x2d6559['name']:null,'sound':_0x3479de['account'][_0xc0ff('0xa')],'shake':_0x3479de['account'][_0xc0ff('0xb')]};try{if(!_0x3479de[_0xc0ff('0xc')]){_0x3479de[_0xc0ff('0xc')]={};}if(_0x2d6559){_0x3479de[_0xc0ff('0xc')]['queue']=_0x2d6559;}else if(_0x3479de[_0xc0ff('0xc')][_0xc0ff('0xd')]){delete _0x3479de['body'][_0xc0ff('0xd')];}_0xd6241['msg']=utils['getMustacheRender'](_0x3479de['account'][_0xc0ff('0xe')],_0x3479de);}catch(_0xa91369){_0xd6241[_0xc0ff('0xf')]='I\x20can\x27t\x20render\x20your\x20template';logger[_0xc0ff('0x10')](util[_0xc0ff('0x11')](_0xc0ff('0x12'),_0x245f10,_0xa91369[_0xc0ff('0x13')]));}io['to'](util[_0xc0ff('0x11')](_0xc0ff('0x14'),_0x29f9b7[_0xc0ff('0x15')]))[_0xc0ff('0x16')](util[_0xc0ff('0x11')](_0xc0ff('0x17'),_0x1b69a1?_0xc0ff('0x18'):'remove'),_0xd6241);}function writeLog(_0x21b852,_0x5939e9,_0x13b3f3){return logger[_0xc0ff('0x19')](util[_0xc0ff('0x11')]('[%s][QUEUE][AGENT:%s][STATUS:%s]',_0x21b852,_0x5939e9[_0xc0ff('0x15')],_0x13b3f3));}exports[_0xc0ff('0x1a')]=function(_0x423b17,_0x212e4f,_0x362db7,_0x1fd7ad){if(_0x212e4f[_0xc0ff('0x1b')]){writeLog(_0x423b17,_0x212e4f,_0xc0ff('0x1c'));return![];}if(!_0x212e4f[_0xc0ff('0x1d')]){writeLog(_0x423b17,_0x212e4f,_0xc0ff('0x1e'));return![];}if(_0x212e4f[_0x362db7+_0xc0ff('0x1f')]){writeLog(_0x423b17,_0x212e4f,_0xc0ff('0x20'));return![];}if(_0x1fd7ad&&_0x212e4f[_0xc0ff('0x21')](_0x362db7+_0xc0ff('0x22'))&&_0x212e4f[_0xc0ff('0x21')](_0x362db7+_0xc0ff('0x23'))){if(_0x212e4f[_0x362db7+'Capacity']>0x0&&_0x212e4f[_0x362db7+_0xc0ff('0x23')]>=_0x212e4f[_0x362db7+'Capacity']){writeLog(_0x423b17,_0x212e4f,_0x362db7[_0xc0ff('0x24')]()+_0xc0ff('0x25'));return![];}}return!![];};exports[_0xc0ff('0x26')]=function(_0x3fc9c3,_0x25f8a0,_0x3b4609,_0x4a62b4,_0x19220d){return sendNotification(!![],_0x3fc9c3,_0x25f8a0,_0x3b4609,_0x4a62b4,_0x19220d);};exports[_0xc0ff('0x27')]=function(_0x538f46,_0x59ce29,_0x37d97c,_0x1ea3a9,_0x2509ce){return sendNotification(![],_0x538f46,_0x59ce29,_0x37d97c,_0x1ea3a9,_0x2509ce);};exports[_0xc0ff('0x28')]=function(_0x2f590f,_0xd0115e,_0x3d5699){var _0xed7156=_0xd0115e[_0xc0ff('0x29')]['UserId'];if(!_0xed7156&&_0x3d5699){_0xed7156=_0x3d5699['id'];}var _0x4cbd46=_['some'](_0x2f590f[_0xd0115e[_0xc0ff('0x2a')]+_0xc0ff('0x2b')],function(_0x34a65c){var _0xf60f5a=_['capitalize'](_0xd0115e[_0xc0ff('0x2a')])+_0xc0ff('0x2c');return _0x34a65c[_0xf60f5a]===_0xd0115e[_0xc0ff('0x29')]['id'];});if(!_0x4cbd46&&_0xed7156&&_0x2f590f[_0xc0ff('0x2d')][_0xed7156]){_0x4cbd46=_[_0xc0ff('0x2e')](_0x2f590f[_0xc0ff('0x2d')][_0xed7156][_0xd0115e[_0xc0ff('0x2a')]+_0xc0ff('0x2f')],function(_0x5f5dbf){return _0x5f5dbf['id']===_0xd0115e[_0xc0ff('0x29')]['id'];});}return _0x4cbd46;};exports['saveWaitingNotification']=function(_0x4d5826,_0x431898,_0x13abef,_0x5651ba){if(_0x13abef&&_0x13abef['id']&&_0x4d5826[_0xc0ff('0x2d')]&&_0x4d5826[_0xc0ff('0x2d')][_0x13abef['id']]){_0x4d5826[_0xc0ff('0x2d')][_0x13abef['id']][_0x5651ba+_0xc0ff('0x2f')][_0x431898[_0xc0ff('0x13')]['id']]={'id':_0x431898[_0xc0ff('0x29')]['id']};}};exports[_0xc0ff('0x30')]=function(_0x5af683,_0x21e094,_0x22818,_0x5c944f){if(_0x22818&&_0x22818['id']&&_0x5af683[_0xc0ff('0x2d')]&&_0x5af683[_0xc0ff('0x2d')][_0x22818['id']]){delete _0x5af683[_0xc0ff('0x2d')][_0x22818['id']][_0x5c944f+_0xc0ff('0x2f')][_0x21e094[_0xc0ff('0x13')]['id']];}};exports['writeLog']=writeLog;
\ No newline at end of file
+var _0x3166=['\x20interaction','name','account','notificationSound','notificationShake','body','queue','getMustacheRender','notificationTemplate','I\x20can\x27t\x20render\x20your\x20template','error','format','message','emit','notification:%s','debug','[%s][QUEUE][AGENT:%s][STATUS:%s]','isAgentAvailable','busy','BUSY','online','OFFLINE','Pause','PAUSE','hasOwnProperty','Capacity','CurrentCapacity','\x20MAXCAPACITY','showNotification','hideNotification','UserId','QueuesWaitingInteractions','InteractionId','interaction','agents','channel','WaitingInteractions','saveWaitingNotification','removeWaitingNotification','writeLog','util','../utils','ioredis','../../../../../config/logger','routing','defaults','redis','socket.io-emitter','split'];(function(_0x157f8e,_0x1293db){var _0xa897c8=function(_0x28d096){while(--_0x28d096){_0x157f8e['push'](_0x157f8e['shift']());}};_0xa897c8(++_0x1293db);}(_0x3166,0xbb));var _0x6316=function(_0x37704e,_0x412814){_0x37704e=_0x37704e-0x0;var _0x2cd4d8=_0x3166[_0x37704e];return _0x2cd4d8;};'use strict';var _=require('lodash');var util=require(_0x6316('0x0'));var utils=require(_0x6316('0x1'));var Redis=require(_0x6316('0x2'));var config=require('../../../../../config/environment');var logger=require(_0x6316('0x3'))(_0x6316('0x4'));config['redis']=_[_0x6316('0x5')](config[_0x6316('0x6')],{'host':'localhost','port':0x18eb});var io=require(_0x6316('0x7'))(new Redis(config[_0x6316('0x6')]));function sendNotification(_0x24f971,_0x24d39c,_0x58058a,_0x2d7d22,_0x31ca1a,_0x56abe5){var _0x380c73=_0x56abe5||{};var _0x2f0701=_0x58058a[_0x6316('0x8')]('.');var _0x39b005={'uniqueid':_0x24d39c,'channel':_0x2f0701[0x0],'id':_0x2f0701[0x1],'title':_0x2f0701[0x0]+_0x6316('0x9'),'interactionId':_0x2f0701[0x2],'queue':_0x31ca1a?_0x31ca1a[_0x6316('0xa')]:null,'sound':_0x380c73[_0x6316('0xb')][_0x6316('0xc')],'shake':_0x380c73[_0x6316('0xb')][_0x6316('0xd')]};try{if(!_0x380c73[_0x6316('0xe')]){_0x380c73['body']={};}if(_0x31ca1a){_0x380c73[_0x6316('0xe')][_0x6316('0xf')]=_0x31ca1a;}else if(_0x380c73[_0x6316('0xe')][_0x6316('0xf')]){delete _0x380c73[_0x6316('0xe')][_0x6316('0xf')];}_0x39b005['msg']=utils[_0x6316('0x10')](_0x380c73[_0x6316('0xb')][_0x6316('0x11')],_0x380c73);}catch(_0xcba5ff){_0x39b005['msg']=_0x6316('0x12');logger[_0x6316('0x13')](util[_0x6316('0x14')]('[%s][QUEUE]\x20%s',_0x24d39c,_0xcba5ff[_0x6316('0x15')]));}io['to'](util[_0x6316('0x14')]('user:%s',_0x2d7d22[_0x6316('0xa')]))[_0x6316('0x16')](util[_0x6316('0x14')](_0x6316('0x17'),_0x24f971?'save':'remove'),_0x39b005);}function writeLog(_0x2eecb9,_0x2a2888,_0xf70772){return logger[_0x6316('0x18')](util[_0x6316('0x14')](_0x6316('0x19'),_0x2eecb9,_0x2a2888[_0x6316('0xa')],_0xf70772));}exports[_0x6316('0x1a')]=function(_0x111a38,_0x3e4543,_0x36db62,_0x5bc355){if(_0x3e4543[_0x6316('0x1b')]){writeLog(_0x111a38,_0x3e4543,_0x6316('0x1c'));return![];}if(!_0x3e4543[_0x6316('0x1d')]){writeLog(_0x111a38,_0x3e4543,_0x6316('0x1e'));return![];}if(_0x3e4543[_0x36db62+_0x6316('0x1f')]){writeLog(_0x111a38,_0x3e4543,_0x6316('0x20'));return![];}if(_0x5bc355&&_0x3e4543[_0x6316('0x21')](_0x36db62+_0x6316('0x22'))&&_0x3e4543['hasOwnProperty'](_0x36db62+_0x6316('0x23'))){if(_0x3e4543[_0x36db62+_0x6316('0x22')]>0x0&&_0x3e4543[_0x36db62+_0x6316('0x23')]>=_0x3e4543[_0x36db62+_0x6316('0x22')]){writeLog(_0x111a38,_0x3e4543,_0x36db62['toUpperCase']()+_0x6316('0x24'));return![];}}return!![];};exports[_0x6316('0x25')]=function(_0x11a2b1,_0x4c5bd7,_0x8dd4f6,_0x443260,_0x271379){return sendNotification(!![],_0x11a2b1,_0x4c5bd7,_0x8dd4f6,_0x443260,_0x271379);};exports[_0x6316('0x26')]=function(_0x1483ba,_0x377ba6,_0x39dd2d,_0x40b04f,_0xed60e){return sendNotification(![],_0x1483ba,_0x377ba6,_0x39dd2d,_0x40b04f,_0xed60e);};exports['checkWaitingNotifications']=function(_0x7315dc,_0x6fc86a,_0x546eae){var _0x30b984=_0x6fc86a['interaction'][_0x6316('0x27')];if(!_0x30b984&&_0x546eae){_0x30b984=_0x546eae['id'];}var _0x2bd2a4=_['some'](_0x7315dc[_0x6fc86a['channel']+_0x6316('0x28')],function(_0x4f97fc){var _0x528f8d=_['capitalize'](_0x6fc86a['channel'])+_0x6316('0x29');return _0x4f97fc[_0x528f8d]===_0x6fc86a[_0x6316('0x2a')]['id'];});if(!_0x2bd2a4&&_0x30b984&&_0x7315dc[_0x6316('0x2b')][_0x30b984]){_0x2bd2a4=_['some'](_0x7315dc[_0x6316('0x2b')][_0x30b984][_0x6fc86a[_0x6316('0x2c')]+_0x6316('0x2d')],function(_0x4474e4){return _0x4474e4['id']===_0x6fc86a[_0x6316('0x2a')]['id'];});}return _0x2bd2a4;};exports[_0x6316('0x2e')]=function(_0xdcfc65,_0x12ee45,_0x5b8e34,_0x4d5a73){if(_0x5b8e34&&_0x5b8e34['id']&&_0xdcfc65[_0x6316('0x2b')]&&_0xdcfc65[_0x6316('0x2b')][_0x5b8e34['id']]){_0xdcfc65[_0x6316('0x2b')][_0x5b8e34['id']][_0x4d5a73+_0x6316('0x2d')][_0x12ee45['message']['id']]={'id':_0x12ee45[_0x6316('0x2a')]['id']};}};exports[_0x6316('0x2f')]=function(_0x5c9ae3,_0x3e7c4a,_0x3ae0fa,_0x282b52){if(_0x3ae0fa&&_0x3ae0fa['id']&&_0x5c9ae3[_0x6316('0x2b')]&&_0x5c9ae3['agents'][_0x3ae0fa['id']]){delete _0x5c9ae3[_0x6316('0x2b')][_0x3ae0fa['id']][_0x282b52+_0x6316('0x2d')][_0x3e7c4a['message']['id']];}};exports[_0x6316('0x30')]=writeLog;
\ No newline at end of file
index b055d88..c864130 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1ef8=['body','next','[%s][SYSTEM]\x20%s','isObject','stringify','validate','routing','string','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','length','error','map','message','join','info','[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','[%s][SYSTEM]\x20commnad:\x20%s','exec','trim','[%s][SYSTEM]\x20result\x20code:\x20%s','replace','isNil','isEmpty','[%s][SYSTEM]\x20no\x20variable','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s'];(function(_0x429373,_0x3e3518){var _0x24ca95=function(_0x314cfb){while(--_0x314cfb){_0x429373['push'](_0x429373['shift']());}};_0x24ca95(++_0x3e3518);}(_0x1ef8,0xd5));var _0x81ef=function(_0x524d8f,_0x2a767f){_0x524d8f=_0x524d8f-0x0;var _0x2cf7eb=_0x1ef8[_0x524d8f];return _0x2cf7eb;};'use strict';var schema=require(_0x81ef('0x0'));var sh=require('shelljs');var _=require('lodash');var utils=require('./utils');var logger=require('../../../../config/logger')(_0x81ef('0x1'));var system=schema({'command':{'type':_0x81ef('0x2'),'required':!![],'message':_0x81ef('0x3')}});exports[_0x81ef('0x4')]=function(_0x28ed6e,_0x4cca02){return function(_0x5ad10c){try{var _0x4a92ea={'command':_0x4cca02[0x0]};var _0x4486ec=system[_0x81ef('0x0')](_0x4a92ea,{'typecast':!![]});if(_0x4486ec[_0x81ef('0x5')]){logger[_0x81ef('0x6')]('[%s][SYSTEM]\x20%s',_0x28ed6e,_[_0x81ef('0x7')](_0x4486ec,_0x81ef('0x8'))[_0x81ef('0x9')](',\x20'));logger[_0x81ef('0xa')](_0x81ef('0xb'),_0x28ed6e);_0x5ad10c['next']();}else{var _0x172a2b=this;var _0x162701=utils['getMustacheRender'](_0x4cca02[0x0],this);logger[_0x81ef('0xa')](_0x81ef('0xc'),_0x28ed6e,_0x162701);sh[_0x81ef('0xd')](_[_0x81ef('0xe')](_0x162701),function(_0x3264ad,_0x2d509d){logger[_0x81ef('0xa')](_0x81ef('0xf'),_0x28ed6e,_0x3264ad);if(_0x3264ad==0x0){var _0x20b1d4=_0x2d509d[_0x81ef('0x10')](/(\r\n|\n|\r)/gm,'');if(_[_0x81ef('0x11')](_0x4cca02[0x1])||_[_0x81ef('0x12')](_0x4cca02[0x1])){logger[_0x81ef('0xa')](_0x81ef('0x13'),_0x28ed6e);_0x172a2b['body'][_0x4cca02[0x1]]=_0x20b1d4;}else{logger[_0x81ef('0xa')](_0x81ef('0x14'),_0x28ed6e,_0x4cca02[0x1],_0x20b1d4);_0x172a2b[_0x81ef('0x15')][_0x4cca02[0x1]]=_0x20b1d4;}}_0x5ad10c[_0x81ef('0x16')]();});}}catch(_0x1a4cb2){logger[_0x81ef('0x6')](_0x81ef('0x17'),_0x28ed6e,_[_0x81ef('0x18')](_0x1a4cb2)?JSON[_0x81ef('0x19')](_0x1a4cb2):_0x1a4cb2);logger['info'](_0x81ef('0xb'),_0x28ed6e);_0x5ad10c['next']();}};};
\ No newline at end of file
+var _0xe27e=['consequence','map','[%s][SYSTEM]\x20no\x20command\x20executed,\x20force\x20next','next','getMustacheRender','info','exec','[%s][SYSTEM]\x20result\x20code:\x20%s','replace','isNil','isEmpty','[%s][SYSTEM]\x20no\x20variable','[%s][SYSTEM]\x20set\x20variable\x20%s:\x20%s','body','error','[%s][SYSTEM]\x20%s','isObject','stringify','validate','lodash','./utils','../../../../config/logger','routing','string','command\x20is\x20a\x20string\x20and\x20it\x20is\x20required'];(function(_0x2d89de,_0xd6c158){var _0x24bbb1=function(_0x38e521){while(--_0x38e521){_0x2d89de['push'](_0x2d89de['shift']());}};_0x24bbb1(++_0xd6c158);}(_0xe27e,0xa8));var _0xee27=function(_0x4dc7b9,_0x319d5a){_0x4dc7b9=_0x4dc7b9-0x0;var _0x3ab114=_0xe27e[_0x4dc7b9];return _0x3ab114;};'use strict';var schema=require(_0xee27('0x0'));var sh=require('shelljs');var _=require(_0xee27('0x1'));var utils=require(_0xee27('0x2'));var logger=require(_0xee27('0x3'))(_0xee27('0x4'));var system=schema({'command':{'type':_0xee27('0x5'),'required':!![],'message':_0xee27('0x6')}});exports[_0xee27('0x7')]=function(_0x1f9d0c,_0x5db5ad){return function(_0x221762){try{var _0x10a79e={'command':_0x5db5ad[0x0]};var _0x3a19b0=system[_0xee27('0x0')](_0x10a79e,{'typecast':!![]});if(_0x3a19b0['length']){logger['error']('[%s][SYSTEM]\x20%s',_0x1f9d0c,_[_0xee27('0x8')](_0x3a19b0,'message')['join'](',\x20'));logger['info'](_0xee27('0x9'),_0x1f9d0c);_0x221762[_0xee27('0xa')]();}else{var _0x115775=this;var _0x97dfcf=utils[_0xee27('0xb')](_0x5db5ad[0x0],this);logger[_0xee27('0xc')]('[%s][SYSTEM]\x20commnad:\x20%s',_0x1f9d0c,_0x97dfcf);sh[_0xee27('0xd')](_['trim'](_0x97dfcf),function(_0x2e9b72,_0x5ce33b){logger['info'](_0xee27('0xe'),_0x1f9d0c,_0x2e9b72);if(_0x2e9b72==0x0){var _0x248e83=_0x5ce33b[_0xee27('0xf')](/(\r\n|\n|\r)/gm,'');if(_[_0xee27('0x10')](_0x5db5ad[0x1])||_[_0xee27('0x11')](_0x5db5ad[0x1])){logger[_0xee27('0xc')](_0xee27('0x12'),_0x1f9d0c);_0x115775['body'][_0x5db5ad[0x1]]=_0x248e83;}else{logger[_0xee27('0xc')](_0xee27('0x13'),_0x1f9d0c,_0x5db5ad[0x1],_0x248e83);_0x115775[_0xee27('0x14')][_0x5db5ad[0x1]]=_0x248e83;}}_0x221762[_0xee27('0xa')]();});}}catch(_0x18b0a8){logger[_0xee27('0x15')](_0xee27('0x16'),_0x1f9d0c,_[_0xee27('0x17')](_0x18b0a8)?JSON[_0xee27('0x18')](_0x18b0a8):_0x18b0a8);logger[_0xee27('0xc')](_0xee27('0x9'),_0x1f9d0c);_0x221762['next']();}};};
\ No newline at end of file
index 91c0112..b27c8b0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x562c=['isObject','stringify','validate','lodash','../../rpc/chatInteraction','../../rpc/smsInteraction','../../rpc/faxInteraction','routing','number','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required','consequence','length','error','map','join','info','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','next','channel','Interaction','addTags','interaction','then','[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s','[%s][TAG]\x20%s','finally'];(function(_0x1259c3,_0x1c8103){var _0x527ff1=function(_0x1ce318){while(--_0x1ce318){_0x1259c3['push'](_0x1259c3['shift']());}};_0x527ff1(++_0x1c8103);}(_0x562c,0x16e));var _0xc562=function(_0x258b26,_0x5928fb){_0x258b26=_0x258b26-0x0;var _0x528924=_0x562c[_0x258b26];return _0x528924;};'use strict';var schema=require(_0xc562('0x0'));var _=require(_0xc562('0x1'));var rpc={'chatInteraction':require(_0xc562('0x2')),'openchannelInteraction':require('../../rpc/openchannelInteraction'),'smsInteraction':require(_0xc562('0x3')),'mailInteraction':require('../../rpc/mailInteraction'),'faxInteraction':require(_0xc562('0x4')),'whatsappInteraction':require('../../rpc/whatsappInteraction')};var logger=require('../../../../config/logger')(_0xc562('0x5'));var tag=schema({'tag':{'type':_0xc562('0x6'),'required':!![],'message':_0xc562('0x7')}});exports[_0xc562('0x8')]=function(_0x3ad7d2,_0x2d75ae,_0x1a7634,_0x414c33){return function(_0x20732f){try{var _0x34ef7d={'tag':_0x2d75ae[0x0]};var _0x402b7e=tag[_0xc562('0x0')](_0x34ef7d,{'typecast':!![]});if(_0x402b7e[_0xc562('0x9')]){logger[_0xc562('0xa')]('[%s][TAG]\x20%s',_0x3ad7d2,_[_0xc562('0xb')](_0x402b7e,'message')[_0xc562('0xc')](',\x20'));logger[_0xc562('0xd')](_0xc562('0xe'),_0x3ad7d2);_0x20732f[_0xc562('0xf')]();}else{var _0x224ec8={'ids':[_0x2d75ae[0x0]]};if(rpc[_0x414c33[_0xc562('0x10')]+_0xc562('0x11')]){rpc[_0x414c33['channel']+_0xc562('0x11')][_0xc562('0x12')](_0x414c33[_0xc562('0x13')]['id'],_0x224ec8)[_0xc562('0x14')](function(_0x5f57db){logger[_0xc562('0xd')](_0xc562('0x15'),_0x3ad7d2,_0x2d75ae[0x1],_0x414c33[_0xc562('0x10')],_0x414c33[_0xc562('0x13')]['id']);})['catch'](function(_0x32a73f){logger[_0xc562('0xa')](_0xc562('0x16'),_0x3ad7d2,JSON['stringify'](_0x32a73f));logger[_0xc562('0xd')](_0xc562('0xe'),_0x3ad7d2);})[_0xc562('0x17')](function(){_0x20732f[_0xc562('0xf')]();});}}}catch(_0x1712e2){logger[_0xc562('0xa')](_0xc562('0x16'),_0x3ad7d2,_[_0xc562('0x18')](_0x1712e2)?JSON[_0xc562('0x19')](_0x1712e2):_0x1712e2);logger[_0xc562('0xd')](_0xc562('0xe'),_0x3ad7d2);_0x20732f[_0xc562('0xf')]();}};};
\ No newline at end of file
+var _0x6cbd=['../../../../config/logger','number','TagId\x20is\x20a\x20string\x20and\x20it\x20is\x20required','validate','error','[%s][TAG]\x20%s','map','message','info','[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next','channel','Interaction','addTags','interaction','then','[%s][TAG]\x20tag\x20\x22%s\x22\x20added\x20to\x20%s\x20interaction\x20%s','finally','next','isObject','stringify','lodash','../../rpc/chatInteraction','../../rpc/openchannelInteraction','../../rpc/smsInteraction','../../rpc/mailInteraction','../../rpc/faxInteraction','../../rpc/whatsappInteraction'];(function(_0x4c4037,_0x15054b){var _0x357862=function(_0x480015){while(--_0x480015){_0x4c4037['push'](_0x4c4037['shift']());}};_0x357862(++_0x15054b);}(_0x6cbd,0x9b));var _0xd6cb=function(_0x1caf6a,_0x26a5bf){_0x1caf6a=_0x1caf6a-0x0;var _0x1bf493=_0x6cbd[_0x1caf6a];return _0x1bf493;};'use strict';var schema=require('validate');var _=require(_0xd6cb('0x0'));var rpc={'chatInteraction':require(_0xd6cb('0x1')),'openchannelInteraction':require(_0xd6cb('0x2')),'smsInteraction':require(_0xd6cb('0x3')),'mailInteraction':require(_0xd6cb('0x4')),'faxInteraction':require(_0xd6cb('0x5')),'whatsappInteraction':require(_0xd6cb('0x6'))};var logger=require(_0xd6cb('0x7'))('routing');var tag=schema({'tag':{'type':_0xd6cb('0x8'),'required':!![],'message':_0xd6cb('0x9')}});exports['consequence']=function(_0x389ce0,_0x101216,_0x24cb10,_0x415d90){return function(_0x489cf8){try{var _0x157726={'tag':_0x101216[0x0]};var _0x5b29a4=tag[_0xd6cb('0xa')](_0x157726,{'typecast':!![]});if(_0x5b29a4['length']){logger[_0xd6cb('0xb')](_0xd6cb('0xc'),_0x389ce0,_[_0xd6cb('0xd')](_0x5b29a4,_0xd6cb('0xe'))['join'](',\x20'));logger[_0xd6cb('0xf')](_0xd6cb('0x10'),_0x389ce0);_0x489cf8['next']();}else{var _0x5dde46={'ids':[_0x101216[0x0]]};if(rpc[_0x415d90['channel']+'Interaction']){rpc[_0x415d90[_0xd6cb('0x11')]+_0xd6cb('0x12')][_0xd6cb('0x13')](_0x415d90[_0xd6cb('0x14')]['id'],_0x5dde46)[_0xd6cb('0x15')](function(_0x14d61f){logger[_0xd6cb('0xf')](_0xd6cb('0x16'),_0x389ce0,_0x101216[0x1],_0x415d90['channel'],_0x415d90['interaction']['id']);})['catch'](function(_0x48e6b6){logger[_0xd6cb('0xb')]('[%s][TAG]\x20%s',_0x389ce0,JSON['stringify'](_0x48e6b6));logger[_0xd6cb('0xf')]('[%s][TAG]\x20no\x20tags\x20saved,\x20force\x20next',_0x389ce0);})[_0xd6cb('0x17')](function(){_0x489cf8[_0xd6cb('0x18')]();});}}}catch(_0x242a81){logger[_0xd6cb('0xb')]('[%s][TAG]\x20%s',_0x389ce0,_[_0xd6cb('0x19')](_0x242a81)?JSON[_0xd6cb('0x1a')](_0x242a81):_0x242a81);logger['info'](_0xd6cb('0x10'),_0x389ce0);_0x489cf8[_0xd6cb('0x18')]();}};};
\ No newline at end of file
index 6094cb7..1922097 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x4dd5=['title','jsonrpc','2.0','method','login','params','stringify','utf8','application/json-rpc','then','parse','result','logged','Unable\x20to\x20login\x20with\x20TVox\x20application','channelId=','&serviceId=','&data=','info','stop','catch','error','[%s][TVOX]\x20%s','[%s][TVOX]\x20Application\x20already\x20executed\x20for\x20the\x20current\x20session,\x20force\x20next','request-promise','../../../../config/logger','routing','\x20-\x20','includes','push','?params='];(function(_0x48a7e5,_0x28e557){var _0x4bd8ea=function(_0x521291){while(--_0x521291){_0x48a7e5['push'](_0x48a7e5['shift']());}};_0x4bd8ea(++_0x28e557);}(_0x4dd5,0x107));var _0x54dd=function(_0x239546,_0x19def0){_0x239546=_0x239546-0x0;var _0x5a43b7=_0x4dd5[_0x239546];return _0x5a43b7;};'use strict';var rp=require(_0x54dd('0x0'));var logger=require(_0x54dd('0x1'))(_0x54dd('0x2'));var _=require('lodash');var arr=[];exports['consequence']=function(_0x23416d,_0x1a0cd5){return function(_0x5268fb){var _0x3f5bda=_0x1a0cd5[0xa];var _0x26989e=_0x1a0cd5[0xb];var _0xf9778b=_0x1a0cd5[0xc];var _0x2b7966=_0x1a0cd5[0xd];var _0x40c398=_0x1a0cd5[0xe];var _0x49b0dd=_0x1a0cd5[0xf]['replace'](/\n/g,_0x54dd('0x3'));var _0x1087dd=_0x1a0cd5[0x10]['replace'](/\n/g,'\x20');if(!arr[_0x54dd('0x4')](_0x26989e)){arr[_0x54dd('0x5')](_0x26989e);var _0x4520f0=_0x1a0cd5[0x3];var _0x2f006a=_0x1a0cd5[0x4];var _0x1e938b=_0x1a0cd5[0x1];var _0x16cdb4=_0x1a0cd5[0x0];var _0x4a3fd3={};_0x4a3fd3['urlOnAnswer']=_0x1a0cd5[0x8]+_0x54dd('0x6')+_0xf9778b+'|'+_0x3f5bda+'|'+_0x2b7966+'|'+_0x26989e+'|'+_0x40c398;_0x4a3fd3['urlOnRing']=_0x1a0cd5[0x7]+_0x54dd('0x6')+_0xf9778b+'|'+_0x3f5bda+'|'+_0x2b7966+'|'+_0x26989e+'|'+_0x40c398+'|'+_0x49b0dd+'|'+_0x1087dd;_0x4a3fd3[_0x54dd('0x7')]=_0x1a0cd5[0x9];var _0x32af3c={};_0x32af3c[_0x54dd('0x8')]=_0x54dd('0x9');_0x32af3c[_0x54dd('0xa')]=_0x54dd('0xb');var _0x251181=[];_0x251181[_0x54dd('0x5')](_0x1a0cd5[0x2]);_0x251181['push'](_0x1a0cd5[0x5]);_0x251181['push'](_0x1a0cd5[0x6]);_0x32af3c[_0x54dd('0xc')]=_0x251181;_0x32af3c['id']=0x1;var _0x2204ae=JSON[_0x54dd('0xd')](_0x32af3c);var _0x1a57bb={'encoding':_0x54dd('0xe'),'method':'POST','timeout':0x2710,'url':_0x4520f0,'headers':{'Content-Type':_0x54dd('0xf')},'body':_0x2204ae};return rp(_0x1a57bb)[_0x54dd('0x10')](function(_0x5a1345){const _0x4fdab9=JSON[_0x54dd('0x11')](_0x5a1345);if(!_0x4fdab9[_0x54dd('0x12')][_0x54dd('0x13')]){throw new Error(_0x54dd('0x14'));}var _0x3b1a90=_0x26989e;var _0x303095=_0x54dd('0x15')+_0x1e938b+_0x54dd('0x16')+_0x16cdb4+'&sessionId='+_0x3b1a90+_0x54dd('0x17')+JSON['stringify'](_0x4a3fd3);var _0x4036e0=_0x2f006a+'?'+_0x303095;return rp(_0x4036e0);})['then'](function(_0x150c62){logger[_0x54dd('0x18')]('[%s][TVOX]\x20Request\x20sent\x20to\x20TVox:\x20%s',_0x23416d,_0x150c62);_0x5268fb[_0x54dd('0x19')]();})[_0x54dd('0x1a')](function(_0x152b27){logger[_0x54dd('0x1b')](_0x54dd('0x1c'),_0x23416d,_['isObject'](_0x152b27)?JSON['stringify'](_0x152b27):_0x152b27);_0x5268fb[_0x54dd('0x19')]();});}else{logger['info'](_0x54dd('0x1d'),_0x23416d);_0x5268fb['next']();}};};
\ No newline at end of file
+var _0x3444=['parse','logged','Unable\x20to\x20login\x20with\x20TVox\x20application','&serviceId=','&sessionId=','info','stop','catch','error','[%s][TVOX]\x20%s','isObject','[%s][TVOX]\x20Application\x20already\x20executed\x20for\x20the\x20current\x20session,\x20force\x20next','../../../../config/logger','routing','lodash','consequence','replace','push','?params=','urlOnRing','title','jsonrpc','login','params','stringify','utf8','POST','application/json-rpc','then'];(function(_0x3b0100,_0x55c7a1){var _0x5c2672=function(_0x44f97e){while(--_0x44f97e){_0x3b0100['push'](_0x3b0100['shift']());}};_0x5c2672(++_0x55c7a1);}(_0x3444,0x111));var _0x4344=function(_0x148a36,_0x1f1d88){_0x148a36=_0x148a36-0x0;var _0x2d7a05=_0x3444[_0x148a36];return _0x2d7a05;};'use strict';var rp=require('request-promise');var logger=require(_0x4344('0x0'))(_0x4344('0x1'));var _=require(_0x4344('0x2'));var arr=[];exports[_0x4344('0x3')]=function(_0x236b4b,_0x11d739){return function(_0x27c604){var _0x3d9ccb=_0x11d739[0xa];var _0x775038=_0x11d739[0xb];var _0x457918=_0x11d739[0xc];var _0xebd3d4=_0x11d739[0xd];var _0x47dad5=_0x11d739[0xe];var _0x32d345=_0x11d739[0xf][_0x4344('0x4')](/\n/g,'\x20-\x20');var _0x734411=_0x11d739[0x10][_0x4344('0x4')](/\n/g,'\x20');if(!arr['includes'](_0x775038)){arr[_0x4344('0x5')](_0x775038);var _0x50b9d6=_0x11d739[0x3];var _0x206bcb=_0x11d739[0x4];var _0x158dde=_0x11d739[0x1];var _0x3b21e4=_0x11d739[0x0];var _0x27d8e0={};_0x27d8e0['urlOnAnswer']=_0x11d739[0x8]+_0x4344('0x6')+_0x457918+'|'+_0x3d9ccb+'|'+_0xebd3d4+'|'+_0x775038+'|'+_0x47dad5;_0x27d8e0[_0x4344('0x7')]=_0x11d739[0x7]+_0x4344('0x6')+_0x457918+'|'+_0x3d9ccb+'|'+_0xebd3d4+'|'+_0x775038+'|'+_0x47dad5+'|'+_0x32d345+'|'+_0x734411;_0x27d8e0[_0x4344('0x8')]=_0x11d739[0x9];var _0x2e50fb={};_0x2e50fb[_0x4344('0x9')]='2.0';_0x2e50fb['method']=_0x4344('0xa');var _0xff5bf1=[];_0xff5bf1['push'](_0x11d739[0x2]);_0xff5bf1[_0x4344('0x5')](_0x11d739[0x5]);_0xff5bf1[_0x4344('0x5')](_0x11d739[0x6]);_0x2e50fb[_0x4344('0xb')]=_0xff5bf1;_0x2e50fb['id']=0x1;var _0x12d03d=JSON[_0x4344('0xc')](_0x2e50fb);var _0x4b00f3={'encoding':_0x4344('0xd'),'method':_0x4344('0xe'),'timeout':0x2710,'url':_0x50b9d6,'headers':{'Content-Type':_0x4344('0xf')},'body':_0x12d03d};return rp(_0x4b00f3)[_0x4344('0x10')](function(_0x59d4bd){const _0x2c070d=JSON[_0x4344('0x11')](_0x59d4bd);if(!_0x2c070d['result'][_0x4344('0x12')]){throw new Error(_0x4344('0x13'));}var _0x78fdcf=_0x775038;var _0x1d89c7='channelId='+_0x158dde+_0x4344('0x14')+_0x3b21e4+_0x4344('0x15')+_0x78fdcf+'&data='+JSON['stringify'](_0x27d8e0);var _0x5cd261=_0x206bcb+'?'+_0x1d89c7;return rp(_0x5cd261);})['then'](function(_0x6bdfa7){logger[_0x4344('0x16')]('[%s][TVOX]\x20Request\x20sent\x20to\x20TVox:\x20%s',_0x236b4b,_0x6bdfa7);_0x27c604[_0x4344('0x17')]();})[_0x4344('0x18')](function(_0xb800ce){logger[_0x4344('0x19')](_0x4344('0x1a'),_0x236b4b,_[_0x4344('0x1b')](_0xb800ce)?JSON[_0x4344('0xc')](_0xb800ce):_0xb800ce);_0x27c604['stop']();});}else{logger['info'](_0x4344('0x1c'),_0x236b4b);_0x27c604['next']();}};};
\ No newline at end of file
index 9609dcb..1c2df32 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd8b0=['merge','body','contact','message','list','mustache','lodash','render'];(function(_0x22fa65,_0x34181f){var _0xf05b62=function(_0xbd0962){while(--_0xbd0962){_0x22fa65['push'](_0x22fa65['shift']());}};_0xf05b62(++_0x34181f);}(_0xd8b0,0xad));var _0x0d8b=function(_0x20a584,_0xe384a5){_0x20a584=_0x20a584-0x0;var _0x4b41a8=_0xd8b0[_0x20a584];return _0x4b41a8;};'use strict';var Mustache=require(_0x0d8b('0x0'));var _=require(_0x0d8b('0x1'));module['exports']={'getMustacheRender':function(_0x585166,_0x4b72b0){return Mustache[_0x0d8b('0x2')](_0x585166,_[_0x0d8b('0x3')](_0x4b72b0[_0x0d8b('0x4')],{'contact':_0x4b72b0[_0x0d8b('0x5')],'message':_0x4b72b0[_0x0d8b('0x6')],'account':_0x4b72b0['account'],'interaction':_0x4b72b0['interaction'],'list':_0x4b72b0[_0x0d8b('0x7')]}))||'';}};
\ No newline at end of file
+var _0xa9e0=['message','account','interaction','mustache','lodash','exports','render','body','contact'];(function(_0x271ae0,_0x2051a){var _0x30e875=function(_0x15025d){while(--_0x15025d){_0x271ae0['push'](_0x271ae0['shift']());}};_0x30e875(++_0x2051a);}(_0xa9e0,0x123));var _0x0a9e=function(_0x3ce3c,_0x319337){_0x3ce3c=_0x3ce3c-0x0;var _0x55a2c9=_0xa9e0[_0x3ce3c];return _0x55a2c9;};'use strict';var Mustache=require(_0x0a9e('0x0'));var _=require(_0x0a9e('0x1'));module[_0x0a9e('0x2')]={'getMustacheRender':function(_0x5dd881,_0x550fbc){return Mustache[_0x0a9e('0x3')](_0x5dd881,_['merge'](_0x550fbc[_0x0a9e('0x4')],{'contact':_0x550fbc[_0x0a9e('0x5')],'message':_0x550fbc[_0x0a9e('0x6')],'account':_0x550fbc[_0x0a9e('0x7')],'interaction':_0x550fbc[_0x0a9e('0x8')],'list':_0x550fbc['list']}))||'';}};
\ No newline at end of file
index 5f15f80..bfddad2 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x68bc=['format','IntervalId','isNil','map','interval','listen','channel','message','interaction','checkWaitingNotifications','applications','isArray','length','join','app','.js','autoreply','appdata','split','push','slice','dialogflow','dialogflowv2','amazonlex','tag','TagId','tvox','getMustacheRender','account','ChatWebsiteId','body','./interval','condition','intervals','info','Push\x20new\x20rule','on\x20interval','\x20|\x20','error','Please\x20create\x20a\x20new\x20file\x20under','rules','execute','Applications\x20executed','stringify','matchPath','complete','Skipped\x20routing\x20for\x20%s','stack','routing\x20is\x20empty','agent','agents','busyQueue','emit','end','QueueReport','update','UserId','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','busy','hasOwnProperty','capacity','CurrentCapacity','updateRealtime','agent\x20not\x20found','values','find','chatQueues','available','loggedIn','name','paused','waiting','mailQueues','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','openchannelQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','http','127.0.0.1','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','lodash','path','bluebird','./applications/utils','./applications/strategy/util','routing','../rpc/openchannelQueueReport','../rpc/mailQueueReport','../rpc/chatQueueReport','../rpc/faxQueueReport','../rpc/whatsappQueueReport','../lib/rule-engine'];(function(_0x2f9e74,_0x1212ac){var _0x4bf31d=function(_0x5c4107){while(--_0x5c4107){_0x2f9e74['push'](_0x2f9e74['shift']());}};_0x4bf31d(++_0x1212ac);}(_0x68bc,0xbc));var _0xc68b=function(_0x2e7877,_0x4df5d4){_0x2e7877=_0x2e7877-0x0;var _0x4e7197=_0x68bc[_0x2e7877];return _0x4e7197;};'use strict';var _=require(_0xc68b('0x0'));var util=require('util');var path=require(_0xc68b('0x1'));var fs=require('fs');var jayson=require('jayson/promise');var BPromise=require(_0xc68b('0x2'));var utils=require(_0xc68b('0x3'));var sUtils=require(_0xc68b('0x4'));var logger=require('../../../config/logger')(_0xc68b('0x5'));var rpc={'openchannelQueueReport':require(_0xc68b('0x6')),'mailQueueReport':require(_0xc68b('0x7')),'chatQueueReport':require(_0xc68b('0x8')),'smsQueueReport':require('../rpc/smsQueueReport'),'faxQueueReport':require(_0xc68b('0x9')),'whatsappQueueReport':require(_0xc68b('0xa'))};var RuleEngine=require(_0xc68b('0xb'));function getId(_0x35b48a,_0x1367fc,_0x29035b){return util[_0xc68b('0xc')]('%s.%s.%s',_0x35b48a,_0x1367fc||0x0,_0x29035b||0x0);}function getIntervals(_0x158daa,_0x1098e4){var _0x3a6b4d=[];if(!_['isNil'](_0x1098e4[_0xc68b('0xd')])&&!_['isNil'](_0x158daa[_0x1098e4[_0xc68b('0xd')]])&&!_[_0xc68b('0xe')](_0x158daa[_0x1098e4[_0xc68b('0xd')]]['Intervals'])){_0x3a6b4d=_[_0xc68b('0xf')](_0x158daa[_0x1098e4[_0xc68b('0xd')]]['Intervals'],_0xc68b('0x10'));}else if(!_[_0xc68b('0xe')](_0x1098e4['interval'])){_0x3a6b4d=[_0x1098e4[_0xc68b('0x10')]];}return _0x3a6b4d;}exports[_0xc68b('0x11')]=function(_0x1616f9){_0x1616f9['rules']={};return new BPromise(function(_0x18b98c,_0x15fb7f){var _0x47e8f3={'Start':function(_0x5c1864){var _0x2a184f=this;return new Promise(function(_0x4a0d6a,_0x3a277f){if(_0x5c1864){try{var _0x35c984=[];var _0x1ac938=getId(_0x5c1864[_0xc68b('0x12')],_0x5c1864[_0xc68b('0x13')]?_0x5c1864[_0xc68b('0x13')]['id']:0x0,_0x5c1864['interaction']?_0x5c1864[_0xc68b('0x14')]['id']:0x0);var _0x19ef67=sUtils[_0xc68b('0x15')](_0x1616f9,_0x5c1864);if(_0x5c1864['transfer']||!_0x19ef67&&_0x5c1864[_0xc68b('0x16')]&&_[_0xc68b('0x17')](_0x5c1864[_0xc68b('0x16')])&&_0x5c1864[_0xc68b('0x16')][_0xc68b('0x18')]){for(var _0x23c62c=0x0;_0x23c62c<_0x5c1864[_0xc68b('0x16')]['length'];_0x23c62c+=0x1){var _0x30610f=_0x5c1864['applications'][_0x23c62c];if(fs['existsSync'](path[_0xc68b('0x19')](__dirname,_0xc68b('0x16'),_0x30610f[_0xc68b('0x1a')]+_0xc68b('0x1b')))){var _0x4b183=[];switch(_0x30610f[_0xc68b('0x1a')]['toLowerCase']()){case _0xc68b('0x1c'):var _0x4ee7b6=_0x30610f[_0xc68b('0x1d')][_0xc68b('0x1e')](',');if(_0x5c1864[_0xc68b('0x12')]==='mail'){_0x4b183[_0xc68b('0x1f')](_0x4ee7b6[0x0]);_0x4b183[_0xc68b('0x1f')](_0x4ee7b6[0x1]);_0x4b183[_0xc68b('0x1f')](_0x4ee7b6[_0xc68b('0x20')](0x2,_0x4ee7b6[_0xc68b('0x18')])['join'](','));}else{_0x4b183[_0xc68b('0x1f')](_0x4ee7b6[0x0]);_0x4b183['push'](_0x4ee7b6[_0xc68b('0x20')](0x1,_0x4ee7b6[_0xc68b('0x18')])[_0xc68b('0x19')](','));}break;case _0xc68b('0x21'):var _0x417533=_0x30610f[_0xc68b('0x1d')][_0xc68b('0x1e')](',');_0x4b183[_0xc68b('0x1f')](_0x417533[0x0]);_0x4b183[_0xc68b('0x1f')](_0x417533[0x1]);_0x4b183['push'](_0x417533[_0xc68b('0x20')](0x2,_0x417533[_0xc68b('0x18')])[_0xc68b('0x19')](','));break;case _0xc68b('0x22'):var _0x21ba01=_0x30610f[_0xc68b('0x1d')][_0xc68b('0x1e')](',');_0x4b183['push'](_0x21ba01[0x0]);_0x4b183[_0xc68b('0x1f')](_0x21ba01[0x1]);_0x4b183[_0xc68b('0x1f')](_0x21ba01[0x2]);_0x4b183[_0xc68b('0x1f')](_0x21ba01[0x3]);_0x4b183[_0xc68b('0x1f')](_0x21ba01['slice'](0x4,_0x21ba01[_0xc68b('0x18')])['join'](','));break;case _0xc68b('0x23'):var _0x1a22b0=_0x30610f['appdata'][_0xc68b('0x1e')](',');_0x4b183[_0xc68b('0x1f')](_0x1a22b0[0x0]);_0x4b183[_0xc68b('0x1f')](_0x1a22b0[0x1]);_0x4b183[_0xc68b('0x1f')](_0x1a22b0[0x2]);_0x4b183[_0xc68b('0x1f')](_0x1a22b0[0x3]);_0x4b183[_0xc68b('0x1f')](_0x1a22b0[_0xc68b('0x20')](0x4,_0x1a22b0[_0xc68b('0x18')])[_0xc68b('0x19')](','));break;case _0xc68b('0x13'):_0x4b183[_0xc68b('0x1f')](_0x30610f[_0xc68b('0x1d')]);break;case _0xc68b('0x24'):_0x4b183[_0xc68b('0x1f')](_0x30610f[_0xc68b('0x25')]);_0x4b183[_0xc68b('0x1f')](_0x30610f[_0xc68b('0x1d')]);break;case _0xc68b('0x26'):var _0x3b1d7f=utils[_0xc68b('0x27')](_0x5c1864[_0xc68b('0x28')]['notificationTemplate'],_0x5c1864);var _0xd8f813=_0x30610f['appdata'][_0xc68b('0x1e')](',');_0x4b183[_0xc68b('0x1f')](_0xd8f813[0x0]);_0x4b183[_0xc68b('0x1f')](_0xd8f813[0x1]);_0x4b183['push'](_0xd8f813[0x2]);_0x4b183[_0xc68b('0x1f')](_0xd8f813[0x3]);_0x4b183['push'](_0xd8f813[0x4]);_0x4b183[_0xc68b('0x1f')](_0xd8f813[0x5]);_0x4b183[_0xc68b('0x1f')](_0xd8f813[0x6]);_0x4b183[_0xc68b('0x1f')](_0xd8f813[0x7]);_0x4b183[_0xc68b('0x1f')](_0xd8f813[0x8]);_0x4b183[_0xc68b('0x1f')](_0xd8f813[0x9]);_0x4b183[_0xc68b('0x1f')](_0xd8f813[0xa]);_0x4b183[_0xc68b('0x1f')](_0x5c1864['interaction']['id']);_0x4b183[_0xc68b('0x1f')](_0x5c1864['message']['id']);_0x4b183[_0xc68b('0x1f')](_0x30610f[_0xc68b('0x29')]);_0x4b183[_0xc68b('0x1f')](_0x5c1864[_0xc68b('0x14')]['ContactId']);_0x4b183[_0xc68b('0x1f')](_0x5c1864[_0xc68b('0x2a')][_0xc68b('0x2a')]);_0x4b183['push'](_0x3b1d7f);break;default:_0x4b183=_[_0xc68b('0xe')](_0x30610f['appdata'])?[]:_0x30610f['appdata']['split'](',');}var _0x4baab8={'id':util[_0xc68b('0xc')]('%s:%s:%s',_0x1ac938,_0x30610f['id'],_0x30610f[_0xc68b('0x1a')]),'condition':require(_0xc68b('0x2b'))[_0xc68b('0x2c')](_0x1ac938,getIntervals(_0x1616f9[_0xc68b('0x2d')],_0x30610f),_0x1616f9),'consequence':require('./applications/'+_0x30610f[_0xc68b('0x1a')])['consequence'](_0x1ac938,_0x4b183,_0x1616f9,_0x5c1864),'p':_0x30610f['priority']||0x0};logger[_0xc68b('0x2e')](_0xc68b('0x2f'),_0x4baab8['id'],_0xc68b('0x30'),getIntervals(_0x1616f9[_0xc68b('0x2d')],_0x30610f)[_0xc68b('0x19')](_0xc68b('0x31')));_0x35c984['push'](_0x4baab8);}else{logger[_0xc68b('0x32')](_0xc68b('0x33'),path[_0xc68b('0x19')](__dirname,'applications',_0x30610f['app']+_0xc68b('0x1b')));}}_0x1616f9[_0xc68b('0x34')][_0x1ac938]=new RuleEngine(_0x35c984);_0x1616f9['rules'][_0x1ac938][_0xc68b('0x35')](_0x5c1864,function(_0x2f8a02){logger[_0xc68b('0x2e')](_0xc68b('0x36'),JSON[_0xc68b('0x37')](_0x2f8a02[_0xc68b('0x38')]));if(_0x1616f9[_0xc68b('0x34')][_0x1ac938]){_0x1616f9[_0xc68b('0x34')][_0x1ac938]['emit'](_0xc68b('0x39'));}});return _0x4a0d6a({'code':0xc8,'message':_0x5c1864});}else{if(_0x19ef67){logger[_0xc68b('0x2e')](util[_0xc68b('0xc')](_0xc68b('0x3a'),_0x1ac938));}else{logger['info']('No\x20applications\x20to\x20execute');}return _0x4a0d6a({'code':0xc8,'message':_0x5c1864});}}catch(_0xd588bf){logger['error'](_0xd588bf[_0xc68b('0x3b')]);return _0x3a277f(_0x2a184f[_0xc68b('0x32')](0x1f4,_0xd588bf));}}return _0x3a277f(_0xc68b('0x3c'));});},'AcceptMessage':function(_0x56187d){var _0x8fb2cc=this;return new Promise(function(_0x33021b,_0x4b09db){if(_0x56187d[_0xc68b('0x3d')]&&_0x56187d['agent']['id']){if(_0x1616f9[_0xc68b('0x3e')][_0x56187d[_0xc68b('0x3d')]['id']]){_0x1616f9[_0xc68b('0x3e')][_0x56187d[_0xc68b('0x3d')]['id']]['busy']=![];_0x1616f9[_0xc68b('0x3e')][_0x56187d[_0xc68b('0x3d')]['id']][_0xc68b('0x3f')]=undefined;}}if(_0x56187d[_0xc68b('0x13')]&&_0x56187d[_0xc68b('0x13')]['id']){try{var _0x4c997e=getId(_0x56187d[_0xc68b('0x12')],_0x56187d[_0xc68b('0x13')]?_0x56187d['message']['id']:0x0,_0x56187d[_0xc68b('0x14')]?_0x56187d[_0xc68b('0x14')]['id']:0x0);if(_0x1616f9['rules'][_0x4c997e]){_0x1616f9['rules'][_0x4c997e][_0xc68b('0x40')](_0xc68b('0x41'));if(rpc[_0x56187d[_0xc68b('0x12')]+'QueueReport']){rpc[_0x56187d[_0xc68b('0x12')]+_0xc68b('0x42')][_0xc68b('0x43')](_0x4c997e,{'UserId':_0x56187d[_0xc68b('0x13')][_0xc68b('0x44')]})[_0xc68b('0x45')](function(){logger['error'](_0xc68b('0x46'));});}}return _0x33021b({'code':0xc8,'message':_0x56187d});}catch(_0x50dd04){logger[_0xc68b('0x32')](_0x50dd04[_0xc68b('0x3b')]);return _0x4b09db(_0x8fb2cc[_0xc68b('0x32')](0x1f4,_0x50dd04));}}logger[_0xc68b('0x32')]('message\x20is\x20empty');return _0x4b09db(_0x8fb2cc[_0xc68b('0x32')](0x1f4,_0xc68b('0x47')));});},'RejectMessage':function(_0x40adf3){var _0x4780f0=this;return new Promise(function(_0x527ffb,_0x12d9b3){if(_0x40adf3['agent']&&_0x40adf3[_0xc68b('0x3d')]['id']){try{if(_0x1616f9[_0xc68b('0x3e')][_0x40adf3['agent']['id']]){_0x1616f9['agents'][_0x40adf3[_0xc68b('0x3d')]['id']][_0xc68b('0x48')]=![];_0x1616f9[_0xc68b('0x3e')][_0x40adf3[_0xc68b('0x3d')]['id']][_0xc68b('0x3f')]=undefined;}return _0x527ffb({'code':0xc8,'message':_0x40adf3});}catch(_0x33ce52){logger[_0xc68b('0x32')](_0x33ce52[_0xc68b('0x3b')]);return _0x12d9b3(_0x4780f0[_0xc68b('0x32')](0x1f4,_0x33ce52));}}logger[_0xc68b('0x32')]('message\x20is\x20empty');return _0x12d9b3(_0x4780f0['error'](0x1f4,'message\x20is\x20empty'));});},'AbandonInteraction':function(_0x46b692){var _0x9e8759=this;return new Promise(function(_0x271576,_0x1996c5){if(_0x46b692[_0xc68b('0x12')]&&_0x46b692['interaction']&&_0x46b692[_0xc68b('0x14')]['id']){try{var _0x51f770=getId(_0x46b692[_0xc68b('0x12')],_0x46b692['message']?_0x46b692[_0xc68b('0x13')]['id']:0x0,_0x46b692['interaction']?_0x46b692['interaction']['id']:0x0);if(_0x1616f9[_0xc68b('0x34')][_0x51f770]){_0x1616f9['rules'][_0x51f770]['emit'](_0xc68b('0x41'));}return _0x271576({'code':0xc8,'message':_0x46b692});}catch(_0x3cb7f1){logger[_0xc68b('0x32')](_0x3cb7f1[_0xc68b('0x3b')]);return _0x1996c5(_0x9e8759[_0xc68b('0x32')](0x1f4,_0x3cb7f1));}}logger[_0xc68b('0x32')](_0xc68b('0x47'));return _0x1996c5(_0x9e8759[_0xc68b('0x32')](0x1f4,_0xc68b('0x47')));});},'AgentCapacity':function(_0x478d93){var _0x19916f=this;return new Promise(function(_0xee1d94,_0x50728f){if(_0x1616f9[_0xc68b('0x3e')][_0xc68b('0x49')](_0x478d93['id'])){for(var _0x2dc950 in _0x478d93[_0xc68b('0x4a')]){if(_0x478d93[_0xc68b('0x4a')][_0xc68b('0x49')](_0x2dc950)){if(_0x1616f9[_0xc68b('0x3e')][_0x478d93['id']][_0xc68b('0x49')](_0x2dc950+_0xc68b('0x4b'))){_0x1616f9[_0xc68b('0x3e')][_0x478d93['id']][_0x2dc950+_0xc68b('0x4b')]=parseInt(_0x478d93['capacity'][_0x2dc950],0xa);}}}_0x1616f9[_0xc68b('0x3e')][_0x478d93['id']][_0xc68b('0x4c')]();return _0xee1d94({'code':0xc8,'message':_0x1616f9[_0xc68b('0x3e')][_0x478d93['id']]});}else{return _0x50728f(_0x19916f[_0xc68b('0x32')](0x1f4,_0xc68b('0x4d')));}});},'Agents':function(_0x18e42f){return new Promise(function(_0x26ac2a){var _0x528b18=_[_0xc68b('0x4e')](_0x1616f9[_0xc68b('0x3e')]);if(_0x18e42f&&_0x18e42f['id']){var _0x58eba3=_[_0xc68b('0x4f')](_0x528b18,function(_0x2a9bb0){return _0x2a9bb0['id']===_0x18e42f['id'];});_0x26ac2a(_0x58eba3);}else{_0x26ac2a({'count':_0x528b18[_0xc68b('0x18')],'rows':_0x528b18});}});},'ChatQueues':function(){return new Promise(function(_0x18e217){var _0x567ae3=[];for(var _0x3ee3af in _0x1616f9[_0xc68b('0x50')]){if(_0x1616f9[_0xc68b('0x50')][_0xc68b('0x49')](_0x3ee3af)){var _0x129cb2=_0x1616f9['chatQueues'][_0x3ee3af];var _0x3b297f={'id':_0x129cb2['id'],'available':_0x129cb2[_0xc68b('0x51')],'loggedIn':_0x129cb2[_0xc68b('0x52')],'name':_0x129cb2[_0xc68b('0x53')],'paused':_0x129cb2[_0xc68b('0x54')],'waiting':_0x129cb2[_0xc68b('0x55')]};_0x567ae3[_0xc68b('0x1f')](_0x3b297f);}}_0x18e217({'count':_0x567ae3['length'],'rows':_0x567ae3});});},'MailQueues':function(){return new Promise(function(_0xe12d2f){var _0x2bb057=[];for(var _0x44ae03 in _0x1616f9['mailQueues']){if(_0x1616f9[_0xc68b('0x56')]['hasOwnProperty'](_0x44ae03)){var _0x168748=_0x1616f9[_0xc68b('0x56')][_0x44ae03];var _0x273b2a={'id':_0x168748['id'],'available':_0x168748[_0xc68b('0x51')],'loggedIn':_0x168748[_0xc68b('0x52')],'name':_0x168748[_0xc68b('0x53')],'paused':_0x168748['paused'],'waiting':_0x168748[_0xc68b('0x55')]};_0x2bb057[_0xc68b('0x1f')](_0x273b2a);}}_0xe12d2f({'count':_0x2bb057['length'],'rows':_0x2bb057});});},'OpenchannelQueues':function(){return new Promise(function(_0x5a71f4){var _0x584dac=[];for(var _0x4fae88 in _0x1616f9['openchannelQueues']){if(_0x1616f9[_0xc68b('0x57')][_0xc68b('0x49')](_0x4fae88)){var _0x273fc8=_0x1616f9[_0xc68b('0x57')][_0x4fae88];var _0x37e445={'id':_0x273fc8['id'],'available':_0x273fc8['available'],'loggedIn':_0x273fc8[_0xc68b('0x52')],'name':_0x273fc8[_0xc68b('0x53')],'paused':_0x273fc8[_0xc68b('0x54')],'waiting':_0x273fc8[_0xc68b('0x55')]};_0x584dac[_0xc68b('0x1f')](_0x37e445);}}_0x5a71f4({'count':_0x584dac[_0xc68b('0x18')],'rows':_0x584dac});});},'SmsQueues':function(){return new Promise(function(_0x8fe084){var _0x442bcd=[];for(var _0x5c428b in _0x1616f9['smsQueues']){if(_0x1616f9[_0xc68b('0x58')]['hasOwnProperty'](_0x5c428b)){var _0x40f6ac=_0x1616f9[_0xc68b('0x58')][_0x5c428b];var _0x4a930a={'id':_0x40f6ac['id'],'available':_0x40f6ac[_0xc68b('0x51')],'loggedIn':_0x40f6ac[_0xc68b('0x52')],'name':_0x40f6ac['name'],'paused':_0x40f6ac[_0xc68b('0x54')],'waiting':_0x40f6ac['waiting']};_0x442bcd[_0xc68b('0x1f')](_0x4a930a);}}_0x8fe084({'count':_0x442bcd[_0xc68b('0x18')],'rows':_0x442bcd});});},'FaxQueues':function(){return new Promise(function(_0x865c22){var _0x247a75=[];for(var _0x2a3e61 in _0x1616f9[_0xc68b('0x59')]){if(_0x1616f9[_0xc68b('0x59')][_0xc68b('0x49')](_0x2a3e61)){var _0x1daad3=_0x1616f9[_0xc68b('0x59')][_0x2a3e61];var _0x4fae48={'id':_0x1daad3['id'],'available':_0x1daad3[_0xc68b('0x51')],'loggedIn':_0x1daad3['loggedIn'],'name':_0x1daad3[_0xc68b('0x53')],'paused':_0x1daad3[_0xc68b('0x54')],'waiting':_0x1daad3[_0xc68b('0x55')]};_0x247a75['push'](_0x4fae48);}}_0x865c22({'count':_0x247a75['length'],'rows':_0x247a75});});},'WhatsappQueues':function(){return new Promise(function(_0x273660){var _0x617be5=[];for(var _0x16149d in _0x1616f9[_0xc68b('0x5a')]){if(_0x1616f9[_0xc68b('0x5a')]['hasOwnProperty'](_0x16149d)){var _0x2feed4=_0x1616f9['whatsappQueues'][_0x16149d];var _0x41c572={'id':_0x2feed4['id'],'available':_0x2feed4[_0xc68b('0x51')],'loggedIn':_0x2feed4['loggedIn'],'name':_0x2feed4[_0xc68b('0x53')],'paused':_0x2feed4[_0xc68b('0x54')],'waiting':_0x2feed4[_0xc68b('0x55')]};_0x617be5[_0xc68b('0x1f')](_0x41c572);}}_0x273660({'count':_0x617be5[_0xc68b('0x18')],'rows':_0x617be5});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x39318e){var _0xbab21c=_[_0xc68b('0x4e')](_0x1616f9[_0xc68b('0x5b')]);_0x39318e({'count':_0xbab21c[_0xc68b('0x18')],'rows':_0xbab21c});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x444b8d){var _0x46018a=_[_0xc68b('0x4e')](_0x1616f9['mailQueuesWaitingInteractions']);_0x444b8d({'count':_0x46018a[_0xc68b('0x18')],'rows':_0x46018a});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x137551){var _0x2f15be=_[_0xc68b('0x4e')](_0x1616f9[_0xc68b('0x5c')]);_0x137551({'count':_0x2f15be[_0xc68b('0x18')],'rows':_0x2f15be});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x3209fc){var _0xdfe7b1=_[_0xc68b('0x4e')](_0x1616f9[_0xc68b('0x5d')]);_0x3209fc({'count':_0xdfe7b1[_0xc68b('0x18')],'rows':_0xdfe7b1});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x2c17a1){var _0x4d9ccd=_[_0xc68b('0x4e')](_0x1616f9[_0xc68b('0x5e')]);_0x2c17a1({'count':_0x4d9ccd[_0xc68b('0x18')],'rows':_0x4d9ccd});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x12f038){var _0xb1aed=_[_0xc68b('0x4e')](_0x1616f9[_0xc68b('0x5f')]);_0x12f038({'count':_0xb1aed['length'],'rows':_0xb1aed});});}};var _0x133599=jayson['server'](_0x47e8f3)[_0xc68b('0x60')]();_0x133599['on']('error',function(_0x4f94ba){logger[_0xc68b('0x32')](JSON[_0xc68b('0x37')](_0x4f94ba));return _0x15fb7f(_0x4f94ba);});_0x133599[_0xc68b('0x11')](0x232c,_0xc68b('0x61'),function(){console[_0xc68b('0x62')](_0xc68b('0x63'),0x232c);return _0x18b98c('RPC\x20listening\x20on\x20port:'+0x232c);});});};
\ No newline at end of file
+var _0xb235=['autoreply','appdata','mail','push','slice','dialogflow','split','amazonlex','tag','TagId','tvox','account','ChatWebsiteId','ContactId','body','%s:%s:%s','condition','intervals','consequence','priority','info','Push\x20new\x20rule','on\x20interval','\x20|\x20','error','Please\x20create\x20a\x20new\x20file\x20under','execute','stringify','complete','No\x20applications\x20to\x20execute','stack','agent','agents','end','QueueReport','update','UserId','catch','error\x20update\x20queue\x20report','message\x20is\x20empty','busy','emit','hasOwnProperty','capacity','CurrentCapacity','updateRealtime','agent\x20not\x20found','values','find','chatQueues','available','name','paused','waiting','mailQueues','loggedIn','openchannelQueues','smsQueues','faxQueues','whatsappQueues','chatQueuesWaitingInteractions','mailQueuesWaitingInteractions','smsQueuesWaitingInteractions','faxQueuesWaitingInteractions','whatsappQueuesWaitingInteractions','127.0.0.1','log','Routing\x20RPC\x20server\x20listening\x20on\x20127.0.0.1:%d!','RPC\x20listening\x20on\x20port:','jayson/promise','bluebird','./applications/utils','./applications/strategy/util','../../../config/logger','routing','../rpc/openchannelQueueReport','../rpc/chatQueueReport','../rpc/smsQueueReport','../rpc/faxQueueReport','../lib/rule-engine','format','isNil','IntervalId','Intervals','map','interval','listen','rules','channel','message','interaction','checkWaitingNotifications','transfer','applications','length','existsSync','join','app','.js','toLowerCase'];(function(_0x3dd15e,_0x1f0015){var _0x231fd0=function(_0x4f680a){while(--_0x4f680a){_0x3dd15e['push'](_0x3dd15e['shift']());}};_0x231fd0(++_0x1f0015);}(_0xb235,0x10d));var _0x5b23=function(_0x522e32,_0x440e6d){_0x522e32=_0x522e32-0x0;var _0x216842=_0xb235[_0x522e32];return _0x216842;};'use strict';var _=require('lodash');var util=require('util');var path=require('path');var fs=require('fs');var jayson=require(_0x5b23('0x0'));var BPromise=require(_0x5b23('0x1'));var utils=require(_0x5b23('0x2'));var sUtils=require(_0x5b23('0x3'));var logger=require(_0x5b23('0x4'))(_0x5b23('0x5'));var rpc={'openchannelQueueReport':require(_0x5b23('0x6')),'mailQueueReport':require('../rpc/mailQueueReport'),'chatQueueReport':require(_0x5b23('0x7')),'smsQueueReport':require(_0x5b23('0x8')),'faxQueueReport':require(_0x5b23('0x9')),'whatsappQueueReport':require('../rpc/whatsappQueueReport')};var RuleEngine=require(_0x5b23('0xa'));function getId(_0x5b86d2,_0x5bea9e,_0x12d845){return util[_0x5b23('0xb')]('%s.%s.%s',_0x5b86d2,_0x5bea9e||0x0,_0x12d845||0x0);}function getIntervals(_0x3a9535,_0x3225a5){var _0x410f6e=[];if(!_[_0x5b23('0xc')](_0x3225a5[_0x5b23('0xd')])&&!_[_0x5b23('0xc')](_0x3a9535[_0x3225a5[_0x5b23('0xd')]])&&!_[_0x5b23('0xc')](_0x3a9535[_0x3225a5[_0x5b23('0xd')]][_0x5b23('0xe')])){_0x410f6e=_[_0x5b23('0xf')](_0x3a9535[_0x3225a5['IntervalId']][_0x5b23('0xe')],_0x5b23('0x10'));}else if(!_[_0x5b23('0xc')](_0x3225a5[_0x5b23('0x10')])){_0x410f6e=[_0x3225a5[_0x5b23('0x10')]];}return _0x410f6e;}exports[_0x5b23('0x11')]=function(_0x5a7b23){_0x5a7b23[_0x5b23('0x12')]={};return new BPromise(function(_0xae2f4d,_0xf69a11){var _0x4a4a38={'Start':function(_0xb84240){var _0x55331d=this;return new Promise(function(_0x4e0f88,_0x3c9db5){if(_0xb84240){try{var _0x311f01=[];var _0xb501ec=getId(_0xb84240[_0x5b23('0x13')],_0xb84240[_0x5b23('0x14')]?_0xb84240[_0x5b23('0x14')]['id']:0x0,_0xb84240[_0x5b23('0x15')]?_0xb84240[_0x5b23('0x15')]['id']:0x0);var _0x2ad9b7=sUtils[_0x5b23('0x16')](_0x5a7b23,_0xb84240);if(_0xb84240[_0x5b23('0x17')]||!_0x2ad9b7&&_0xb84240[_0x5b23('0x18')]&&_['isArray'](_0xb84240[_0x5b23('0x18')])&&_0xb84240[_0x5b23('0x18')]['length']){for(var _0x4ce369=0x0;_0x4ce369<_0xb84240[_0x5b23('0x18')][_0x5b23('0x19')];_0x4ce369+=0x1){var _0x32987a=_0xb84240[_0x5b23('0x18')][_0x4ce369];if(fs[_0x5b23('0x1a')](path[_0x5b23('0x1b')](__dirname,'applications',_0x32987a[_0x5b23('0x1c')]+_0x5b23('0x1d')))){var _0x2ea49b=[];switch(_0x32987a[_0x5b23('0x1c')][_0x5b23('0x1e')]()){case _0x5b23('0x1f'):var _0x1b6af4=_0x32987a[_0x5b23('0x20')]['split'](',');if(_0xb84240[_0x5b23('0x13')]===_0x5b23('0x21')){_0x2ea49b[_0x5b23('0x22')](_0x1b6af4[0x0]);_0x2ea49b[_0x5b23('0x22')](_0x1b6af4[0x1]);_0x2ea49b[_0x5b23('0x22')](_0x1b6af4['slice'](0x2,_0x1b6af4[_0x5b23('0x19')])['join'](','));}else{_0x2ea49b[_0x5b23('0x22')](_0x1b6af4[0x0]);_0x2ea49b[_0x5b23('0x22')](_0x1b6af4[_0x5b23('0x23')](0x1,_0x1b6af4[_0x5b23('0x19')])['join'](','));}break;case _0x5b23('0x24'):var _0x5e71c2=_0x32987a[_0x5b23('0x20')]['split'](',');_0x2ea49b[_0x5b23('0x22')](_0x5e71c2[0x0]);_0x2ea49b[_0x5b23('0x22')](_0x5e71c2[0x1]);_0x2ea49b[_0x5b23('0x22')](_0x5e71c2[_0x5b23('0x23')](0x2,_0x5e71c2[_0x5b23('0x19')])[_0x5b23('0x1b')](','));break;case'dialogflowv2':var _0x31674c=_0x32987a[_0x5b23('0x20')][_0x5b23('0x25')](',');_0x2ea49b[_0x5b23('0x22')](_0x31674c[0x0]);_0x2ea49b[_0x5b23('0x22')](_0x31674c[0x1]);_0x2ea49b[_0x5b23('0x22')](_0x31674c[0x2]);_0x2ea49b[_0x5b23('0x22')](_0x31674c[0x3]);_0x2ea49b['push'](_0x31674c[_0x5b23('0x23')](0x4,_0x31674c['length'])['join'](','));break;case _0x5b23('0x26'):var _0x57e5af=_0x32987a[_0x5b23('0x20')][_0x5b23('0x25')](',');_0x2ea49b[_0x5b23('0x22')](_0x57e5af[0x0]);_0x2ea49b[_0x5b23('0x22')](_0x57e5af[0x1]);_0x2ea49b[_0x5b23('0x22')](_0x57e5af[0x2]);_0x2ea49b['push'](_0x57e5af[0x3]);_0x2ea49b[_0x5b23('0x22')](_0x57e5af[_0x5b23('0x23')](0x4,_0x57e5af[_0x5b23('0x19')])[_0x5b23('0x1b')](','));break;case _0x5b23('0x14'):_0x2ea49b[_0x5b23('0x22')](_0x32987a[_0x5b23('0x20')]);break;case _0x5b23('0x27'):_0x2ea49b[_0x5b23('0x22')](_0x32987a[_0x5b23('0x28')]);_0x2ea49b[_0x5b23('0x22')](_0x32987a[_0x5b23('0x20')]);break;case _0x5b23('0x29'):var _0x321638=utils['getMustacheRender'](_0xb84240[_0x5b23('0x2a')]['notificationTemplate'],_0xb84240);var _0x43a236=_0x32987a['appdata'][_0x5b23('0x25')](',');_0x2ea49b[_0x5b23('0x22')](_0x43a236[0x0]);_0x2ea49b[_0x5b23('0x22')](_0x43a236[0x1]);_0x2ea49b[_0x5b23('0x22')](_0x43a236[0x2]);_0x2ea49b[_0x5b23('0x22')](_0x43a236[0x3]);_0x2ea49b[_0x5b23('0x22')](_0x43a236[0x4]);_0x2ea49b['push'](_0x43a236[0x5]);_0x2ea49b[_0x5b23('0x22')](_0x43a236[0x6]);_0x2ea49b[_0x5b23('0x22')](_0x43a236[0x7]);_0x2ea49b['push'](_0x43a236[0x8]);_0x2ea49b[_0x5b23('0x22')](_0x43a236[0x9]);_0x2ea49b['push'](_0x43a236[0xa]);_0x2ea49b[_0x5b23('0x22')](_0xb84240['interaction']['id']);_0x2ea49b[_0x5b23('0x22')](_0xb84240[_0x5b23('0x14')]['id']);_0x2ea49b[_0x5b23('0x22')](_0x32987a[_0x5b23('0x2b')]);_0x2ea49b[_0x5b23('0x22')](_0xb84240[_0x5b23('0x15')][_0x5b23('0x2c')]);_0x2ea49b[_0x5b23('0x22')](_0xb84240[_0x5b23('0x2d')][_0x5b23('0x2d')]);_0x2ea49b[_0x5b23('0x22')](_0x321638);break;default:_0x2ea49b=_['isNil'](_0x32987a[_0x5b23('0x20')])?[]:_0x32987a[_0x5b23('0x20')][_0x5b23('0x25')](',');}var _0x163078={'id':util[_0x5b23('0xb')](_0x5b23('0x2e'),_0xb501ec,_0x32987a['id'],_0x32987a[_0x5b23('0x1c')]),'condition':require('./interval')[_0x5b23('0x2f')](_0xb501ec,getIntervals(_0x5a7b23[_0x5b23('0x30')],_0x32987a),_0x5a7b23),'consequence':require('./applications/'+_0x32987a['app'])[_0x5b23('0x31')](_0xb501ec,_0x2ea49b,_0x5a7b23,_0xb84240),'p':_0x32987a[_0x5b23('0x32')]||0x0};logger[_0x5b23('0x33')](_0x5b23('0x34'),_0x163078['id'],_0x5b23('0x35'),getIntervals(_0x5a7b23[_0x5b23('0x30')],_0x32987a)['join'](_0x5b23('0x36')));_0x311f01['push'](_0x163078);}else{logger[_0x5b23('0x37')](_0x5b23('0x38'),path[_0x5b23('0x1b')](__dirname,_0x5b23('0x18'),_0x32987a[_0x5b23('0x1c')]+_0x5b23('0x1d')));}}_0x5a7b23['rules'][_0xb501ec]=new RuleEngine(_0x311f01);_0x5a7b23[_0x5b23('0x12')][_0xb501ec][_0x5b23('0x39')](_0xb84240,function(_0x42c95c){logger[_0x5b23('0x33')]('Applications\x20executed',JSON[_0x5b23('0x3a')](_0x42c95c['matchPath']));if(_0x5a7b23['rules'][_0xb501ec]){_0x5a7b23[_0x5b23('0x12')][_0xb501ec]['emit'](_0x5b23('0x3b'));}});return _0x4e0f88({'code':0xc8,'message':_0xb84240});}else{if(_0x2ad9b7){logger['info'](util[_0x5b23('0xb')]('Skipped\x20routing\x20for\x20%s',_0xb501ec));}else{logger['info'](_0x5b23('0x3c'));}return _0x4e0f88({'code':0xc8,'message':_0xb84240});}}catch(_0x22b8f3){logger[_0x5b23('0x37')](_0x22b8f3[_0x5b23('0x3d')]);return _0x3c9db5(_0x55331d[_0x5b23('0x37')](0x1f4,_0x22b8f3));}}return _0x3c9db5('routing\x20is\x20empty');});},'AcceptMessage':function(_0xf99fab){var _0x454c6f=this;return new Promise(function(_0x50869a,_0x7ea309){if(_0xf99fab[_0x5b23('0x3e')]&&_0xf99fab[_0x5b23('0x3e')]['id']){if(_0x5a7b23[_0x5b23('0x3f')][_0xf99fab['agent']['id']]){_0x5a7b23[_0x5b23('0x3f')][_0xf99fab['agent']['id']]['busy']=![];_0x5a7b23[_0x5b23('0x3f')][_0xf99fab[_0x5b23('0x3e')]['id']]['busyQueue']=undefined;}}if(_0xf99fab[_0x5b23('0x14')]&&_0xf99fab[_0x5b23('0x14')]['id']){try{var _0x13df6b=getId(_0xf99fab['channel'],_0xf99fab[_0x5b23('0x14')]?_0xf99fab['message']['id']:0x0,_0xf99fab[_0x5b23('0x15')]?_0xf99fab[_0x5b23('0x15')]['id']:0x0);if(_0x5a7b23[_0x5b23('0x12')][_0x13df6b]){_0x5a7b23[_0x5b23('0x12')][_0x13df6b]['emit'](_0x5b23('0x40'));if(rpc[_0xf99fab['channel']+'QueueReport']){rpc[_0xf99fab[_0x5b23('0x13')]+_0x5b23('0x41')][_0x5b23('0x42')](_0x13df6b,{'UserId':_0xf99fab['message'][_0x5b23('0x43')]})[_0x5b23('0x44')](function(){logger['error'](_0x5b23('0x45'));});}}return _0x50869a({'code':0xc8,'message':_0xf99fab});}catch(_0x45b4d8){logger[_0x5b23('0x37')](_0x45b4d8[_0x5b23('0x3d')]);return _0x7ea309(_0x454c6f[_0x5b23('0x37')](0x1f4,_0x45b4d8));}}logger['error']('message\x20is\x20empty');return _0x7ea309(_0x454c6f[_0x5b23('0x37')](0x1f4,_0x5b23('0x46')));});},'RejectMessage':function(_0x374e55){var _0x5a1abc=this;return new Promise(function(_0x10124c,_0x3101ce){if(_0x374e55[_0x5b23('0x3e')]&&_0x374e55[_0x5b23('0x3e')]['id']){try{if(_0x5a7b23[_0x5b23('0x3f')][_0x374e55[_0x5b23('0x3e')]['id']]){_0x5a7b23['agents'][_0x374e55[_0x5b23('0x3e')]['id']][_0x5b23('0x47')]=![];_0x5a7b23[_0x5b23('0x3f')][_0x374e55[_0x5b23('0x3e')]['id']]['busyQueue']=undefined;}return _0x10124c({'code':0xc8,'message':_0x374e55});}catch(_0x1e320c){logger[_0x5b23('0x37')](_0x1e320c['stack']);return _0x3101ce(_0x5a1abc[_0x5b23('0x37')](0x1f4,_0x1e320c));}}logger['error'](_0x5b23('0x46'));return _0x3101ce(_0x5a1abc[_0x5b23('0x37')](0x1f4,_0x5b23('0x46')));});},'AbandonInteraction':function(_0x142439){var _0x18bd40=this;return new Promise(function(_0x556419,_0x1bcf22){if(_0x142439[_0x5b23('0x13')]&&_0x142439[_0x5b23('0x15')]&&_0x142439[_0x5b23('0x15')]['id']){try{var _0x5b406e=getId(_0x142439[_0x5b23('0x13')],_0x142439['message']?_0x142439[_0x5b23('0x14')]['id']:0x0,_0x142439[_0x5b23('0x15')]?_0x142439[_0x5b23('0x15')]['id']:0x0);if(_0x5a7b23[_0x5b23('0x12')][_0x5b406e]){_0x5a7b23['rules'][_0x5b406e][_0x5b23('0x48')](_0x5b23('0x40'));}return _0x556419({'code':0xc8,'message':_0x142439});}catch(_0x34874c){logger[_0x5b23('0x37')](_0x34874c[_0x5b23('0x3d')]);return _0x1bcf22(_0x18bd40['error'](0x1f4,_0x34874c));}}logger[_0x5b23('0x37')](_0x5b23('0x46'));return _0x1bcf22(_0x18bd40[_0x5b23('0x37')](0x1f4,_0x5b23('0x46')));});},'AgentCapacity':function(_0x3b093e){var _0x3c9673=this;return new Promise(function(_0x276745,_0x245e63){if(_0x5a7b23[_0x5b23('0x3f')][_0x5b23('0x49')](_0x3b093e['id'])){for(var _0x55dc1d in _0x3b093e[_0x5b23('0x4a')]){if(_0x3b093e[_0x5b23('0x4a')][_0x5b23('0x49')](_0x55dc1d)){if(_0x5a7b23['agents'][_0x3b093e['id']]['hasOwnProperty'](_0x55dc1d+'CurrentCapacity')){_0x5a7b23[_0x5b23('0x3f')][_0x3b093e['id']][_0x55dc1d+_0x5b23('0x4b')]=parseInt(_0x3b093e['capacity'][_0x55dc1d],0xa);}}}_0x5a7b23['agents'][_0x3b093e['id']][_0x5b23('0x4c')]();return _0x276745({'code':0xc8,'message':_0x5a7b23[_0x5b23('0x3f')][_0x3b093e['id']]});}else{return _0x245e63(_0x3c9673[_0x5b23('0x37')](0x1f4,_0x5b23('0x4d')));}});},'Agents':function(_0x3c6875){return new Promise(function(_0x38b245){var _0x2f7931=_[_0x5b23('0x4e')](_0x5a7b23[_0x5b23('0x3f')]);if(_0x3c6875&&_0x3c6875['id']){var _0x5289c9=_[_0x5b23('0x4f')](_0x2f7931,function(_0xbfdc26){return _0xbfdc26['id']===_0x3c6875['id'];});_0x38b245(_0x5289c9);}else{_0x38b245({'count':_0x2f7931[_0x5b23('0x19')],'rows':_0x2f7931});}});},'ChatQueues':function(){return new Promise(function(_0x2be261){var _0x483264=[];for(var _0x36eeda in _0x5a7b23[_0x5b23('0x50')]){if(_0x5a7b23['chatQueues']['hasOwnProperty'](_0x36eeda)){var _0x5a9528=_0x5a7b23[_0x5b23('0x50')][_0x36eeda];var _0x21b54d={'id':_0x5a9528['id'],'available':_0x5a9528[_0x5b23('0x51')],'loggedIn':_0x5a9528['loggedIn'],'name':_0x5a9528[_0x5b23('0x52')],'paused':_0x5a9528[_0x5b23('0x53')],'waiting':_0x5a9528[_0x5b23('0x54')]};_0x483264[_0x5b23('0x22')](_0x21b54d);}}_0x2be261({'count':_0x483264['length'],'rows':_0x483264});});},'MailQueues':function(){return new Promise(function(_0x297cc3){var _0x193d26=[];for(var _0x1b715d in _0x5a7b23[_0x5b23('0x55')]){if(_0x5a7b23[_0x5b23('0x55')]['hasOwnProperty'](_0x1b715d)){var _0x5575e7=_0x5a7b23[_0x5b23('0x55')][_0x1b715d];var _0x550e48={'id':_0x5575e7['id'],'available':_0x5575e7[_0x5b23('0x51')],'loggedIn':_0x5575e7[_0x5b23('0x56')],'name':_0x5575e7[_0x5b23('0x52')],'paused':_0x5575e7['paused'],'waiting':_0x5575e7[_0x5b23('0x54')]};_0x193d26[_0x5b23('0x22')](_0x550e48);}}_0x297cc3({'count':_0x193d26['length'],'rows':_0x193d26});});},'OpenchannelQueues':function(){return new Promise(function(_0x57b647){var _0x1fe205=[];for(var _0x1b7ab0 in _0x5a7b23[_0x5b23('0x57')]){if(_0x5a7b23[_0x5b23('0x57')]['hasOwnProperty'](_0x1b7ab0)){var _0x33843f=_0x5a7b23[_0x5b23('0x57')][_0x1b7ab0];var _0xf6796e={'id':_0x33843f['id'],'available':_0x33843f[_0x5b23('0x51')],'loggedIn':_0x33843f[_0x5b23('0x56')],'name':_0x33843f[_0x5b23('0x52')],'paused':_0x33843f[_0x5b23('0x53')],'waiting':_0x33843f[_0x5b23('0x54')]};_0x1fe205['push'](_0xf6796e);}}_0x57b647({'count':_0x1fe205[_0x5b23('0x19')],'rows':_0x1fe205});});},'SmsQueues':function(){return new Promise(function(_0x371119){var _0x16450f=[];for(var _0x3d4056 in _0x5a7b23[_0x5b23('0x58')]){if(_0x5a7b23['smsQueues'][_0x5b23('0x49')](_0x3d4056)){var _0x2595e6=_0x5a7b23[_0x5b23('0x58')][_0x3d4056];var _0x2b4666={'id':_0x2595e6['id'],'available':_0x2595e6[_0x5b23('0x51')],'loggedIn':_0x2595e6['loggedIn'],'name':_0x2595e6[_0x5b23('0x52')],'paused':_0x2595e6[_0x5b23('0x53')],'waiting':_0x2595e6['waiting']};_0x16450f['push'](_0x2b4666);}}_0x371119({'count':_0x16450f[_0x5b23('0x19')],'rows':_0x16450f});});},'FaxQueues':function(){return new Promise(function(_0x2cd001){var _0x115c5e=[];for(var _0x25cfef in _0x5a7b23[_0x5b23('0x59')]){if(_0x5a7b23[_0x5b23('0x59')]['hasOwnProperty'](_0x25cfef)){var _0xf9a73d=_0x5a7b23[_0x5b23('0x59')][_0x25cfef];var _0x58c1d1={'id':_0xf9a73d['id'],'available':_0xf9a73d[_0x5b23('0x51')],'loggedIn':_0xf9a73d[_0x5b23('0x56')],'name':_0xf9a73d['name'],'paused':_0xf9a73d[_0x5b23('0x53')],'waiting':_0xf9a73d[_0x5b23('0x54')]};_0x115c5e[_0x5b23('0x22')](_0x58c1d1);}}_0x2cd001({'count':_0x115c5e['length'],'rows':_0x115c5e});});},'WhatsappQueues':function(){return new Promise(function(_0x26034e){var _0x30b88d=[];for(var _0x1be071 in _0x5a7b23['whatsappQueues']){if(_0x5a7b23[_0x5b23('0x5a')][_0x5b23('0x49')](_0x1be071)){var _0x4adcb0=_0x5a7b23[_0x5b23('0x5a')][_0x1be071];var _0x32e413={'id':_0x4adcb0['id'],'available':_0x4adcb0[_0x5b23('0x51')],'loggedIn':_0x4adcb0[_0x5b23('0x56')],'name':_0x4adcb0[_0x5b23('0x52')],'paused':_0x4adcb0[_0x5b23('0x53')],'waiting':_0x4adcb0[_0x5b23('0x54')]};_0x30b88d['push'](_0x32e413);}}_0x26034e({'count':_0x30b88d[_0x5b23('0x19')],'rows':_0x30b88d});});},'ChatQueuesWaitingInteractions':function(){return new Promise(function(_0x3cb771){var _0x37cccb=_[_0x5b23('0x4e')](_0x5a7b23[_0x5b23('0x5b')]);_0x3cb771({'count':_0x37cccb[_0x5b23('0x19')],'rows':_0x37cccb});});},'MailQueuesWaitingInteractions':function(){return new Promise(function(_0x2781c1){var _0x440925=_[_0x5b23('0x4e')](_0x5a7b23[_0x5b23('0x5c')]);_0x2781c1({'count':_0x440925[_0x5b23('0x19')],'rows':_0x440925});});},'OpenchannelQueuesWaitingInteractions':function(){return new Promise(function(_0x1b7bff){var _0x2a4098=_[_0x5b23('0x4e')](_0x5a7b23['openchannelQueuesWaitingInteractions']);_0x1b7bff({'count':_0x2a4098[_0x5b23('0x19')],'rows':_0x2a4098});});},'SmsQueuesWaitingInteractions':function(){return new Promise(function(_0x337d8a){var _0x5936b2=_[_0x5b23('0x4e')](_0x5a7b23[_0x5b23('0x5d')]);_0x337d8a({'count':_0x5936b2[_0x5b23('0x19')],'rows':_0x5936b2});});},'FaxQueuesWaitingInteractions':function(){return new Promise(function(_0x796010){var _0x1d590c=_[_0x5b23('0x4e')](_0x5a7b23[_0x5b23('0x5e')]);_0x796010({'count':_0x1d590c[_0x5b23('0x19')],'rows':_0x1d590c});});},'WhatsappQueuesWaitingInteractions':function(){return new Promise(function(_0x4194a6){var _0x28cb60=_[_0x5b23('0x4e')](_0x5a7b23[_0x5b23('0x5f')]);_0x4194a6({'count':_0x28cb60[_0x5b23('0x19')],'rows':_0x28cb60});});}};var _0xceb8c1=jayson['server'](_0x4a4a38)['http']();_0xceb8c1['on'](_0x5b23('0x37'),function(_0x5ca922){logger[_0x5b23('0x37')](JSON['stringify'](_0x5ca922));return _0xf69a11(_0x5ca922);});_0xceb8c1[_0x5b23('0x11')](0x232c,_0x5b23('0x60'),function(){console[_0x5b23('0x61')](_0x5b23('0x62'),0x232c);return _0xae2f4d(_0x5b23('0x63')+0x232c);});});};
\ No newline at end of file
index fd256b0..9e31859 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x6713=['\x20|\x20','when','lodash','../../../utils/iftime','../../../config/logger','routing','condition','rules','info','[%s][INTERVAL]\x20ROUTING\x20STOPPED','map','some','join'];(function(_0x6131cd,_0x4c26a1){var _0x47e916=function(_0x1f2bce){while(--_0x1f2bce){_0x6131cd['push'](_0x6131cd['shift']());}};_0x47e916(++_0x4c26a1);}(_0x6713,0x147));var _0x3671=function(_0x1d6a82,_0x37c315){_0x1d6a82=_0x1d6a82-0x0;var _0x5834ac=_0x6713[_0x1d6a82];return _0x5834ac;};'use strict';var _=require(_0x3671('0x0'));var iftime=require(_0x3671('0x1'))['iftime'];var logger=require(_0x3671('0x2'))(_0x3671('0x3'));exports[_0x3671('0x4')]=function(_0x4d5597,_0x5158f0,_0x270c2d){return function(_0x502f69){if(_0x270c2d['rules']&&!_0x270c2d[_0x3671('0x5')][_0x4d5597]){logger[_0x3671('0x6')](_0x3671('0x7'),_0x4d5597);return _0x502f69['stop']();}var _0xed371e=_0x5158f0[_0x3671('0x8')](function(_0x1104a3){return iftime(_0x1104a3);});var _0x2199c8=_[_0x3671('0x9')](_0xed371e);if(_0x2199c8){logger[_0x3671('0x6')]('[%s][INTERVAL\x20VALID]\x20%s\x20%s',_0x4d5597,_0x5158f0[_0x3671('0xa')](_0x3671('0xb')),_0x2199c8);_0x502f69[_0x3671('0xc')](_0x2199c8);}else{logger[_0x3671('0x6')]('[%s][INTERVAL\x20NOT\x20VALID]\x20%s\x20%s',_0x4d5597,_0x5158f0[_0x3671('0xa')](_0x3671('0xb')));_0x502f69['stop']();}};};
\ No newline at end of file
+var _0x13c5=['some','info','[%s][INTERVAL\x20VALID]\x20%s\x20%s','join','\x20|\x20','when','[%s][INTERVAL\x20NOT\x20VALID]\x20%s\x20%s','lodash','iftime','../../../config/logger','routing','condition','rules','[%s][INTERVAL]\x20ROUTING\x20STOPPED','stop'];(function(_0x2a36b6,_0x429807){var _0x29fda2=function(_0x39c6a0){while(--_0x39c6a0){_0x2a36b6['push'](_0x2a36b6['shift']());}};_0x29fda2(++_0x429807);}(_0x13c5,0x151));var _0x513c=function(_0x2a19b8,_0xe48aed){_0x2a19b8=_0x2a19b8-0x0;var _0x400663=_0x13c5[_0x2a19b8];return _0x400663;};'use strict';var _=require(_0x513c('0x0'));var iftime=require('../../../utils/iftime')[_0x513c('0x1')];var logger=require(_0x513c('0x2'))(_0x513c('0x3'));exports[_0x513c('0x4')]=function(_0x2b4188,_0xfcd61b,_0x32a107){return function(_0x3bc5d9){if(_0x32a107['rules']&&!_0x32a107[_0x513c('0x5')][_0x2b4188]){logger['info'](_0x513c('0x6'),_0x2b4188);return _0x3bc5d9[_0x513c('0x7')]();}var _0x4a7762=_0xfcd61b['map'](function(_0x2ec2a8){return iftime(_0x2ec2a8);});var _0x3f3fe0=_[_0x513c('0x8')](_0x4a7762);if(_0x3f3fe0){logger[_0x513c('0x9')](_0x513c('0xa'),_0x2b4188,_0xfcd61b[_0x513c('0xb')](_0x513c('0xc')),_0x3f3fe0);_0x3bc5d9[_0x513c('0xd')](_0x3f3fe0);}else{logger[_0x513c('0x9')](_0x513c('0xe'),_0x2b4188,_0xfcd61b['join']('\x20|\x20'));_0x3bc5d9[_0x513c('0x7')]();}};};
\ No newline at end of file
index 0969472..f7b7cd5 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xb9a7=['connect','answered_elsewhere','answeredelsewheredestinationuniqueid','answeredelsewheremembername','[%s][agents][agentconnect]','[%s][agents][agentcomplete]','[%s][agents][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','diffTime','complete','[%s][agents][blindtransfer]','transfereruniqueid','transfer','transfertype','blind','transferexten','transferuniqueid','origtransfererlinkedid','secondtransfereruniqueid','[%s][agents][attendedtransfer]\x20agent:%s','origtransfereruniqueid','ATTENDED','transfereeuniqueid','calleridname','agententerreason','secondtransfererlinkedid','transfertargetuniqueid','hangup','[%s][agents][hangup]','cause','rejected','splice','agentcompleteAt','agent','[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s','util','info','[%s][agents][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','uniqueid','channel','queue','membername','interface','calleridnum','connectedlinenum','lastevent','then','agentacw','agentcomplete','acwtime','acwTimeout','CreateVoiceAgentReport','request','destuniqueid','agentcalled','debug','format','agentcalledAt','now','called','[%s][agents][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','error','[%s][agents][agentcalled]','agentringnoanswer','isNil','[%s][agents][agentringnoanswer]','[%s][agents][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:timeout','timeout','reason','ringtime','talktime','queuecallerabandon','forIn','includes','agentringnoanswerAt','abandoned','holdtime','[%s][agents][queuecallerabandon]','agentconnect','agentconnectAt','connectedlinename'];(function(_0x214bb3,_0x235d59){var _0x50e1a0=function(_0x18ca99){while(--_0x18ca99){_0x214bb3['push'](_0x214bb3['shift']());}};_0x50e1a0(++_0x235d59);}(_0xb9a7,0x112));var _0x7b9a=function(_0x2070da,_0x45e586){_0x2070da=_0x2070da-0x0;var _0x4f9fe1=_0xb9a7[_0x2070da];return _0x4f9fe1;};'use strict';var _=require('lodash');var util=require(_0x7b9a('0x0'));var utils=require('./utils');var agents={};var transfers={};var unanswered=[];function writeDB(_0x563857,_0x5f1a52){utils[_0x7b9a('0x1')](util['format'](_0x7b9a('0x2'),_0x563857[_0x7b9a('0x3')],_0x563857[_0x7b9a('0x4')],_0x563857[_0x7b9a('0x5')],_0x563857[_0x7b9a('0x6')],_0x563857[_0x7b9a('0x7')],_0x563857[_0x7b9a('0x8')],_0x563857[_0x7b9a('0x9')],_0x563857[_0x7b9a('0xa')]));if(_0x563857[_0x7b9a('0x5')]){utils['getVoiceQueueByName'](_0x563857[_0x7b9a('0x5')])[_0x7b9a('0xb')](function(_0x56a199){if(_0x56a199){_0x563857['type']=_0x56a199['type'];_0x563857[_0x7b9a('0xc')]=_0x563857[_0x7b9a('0xd')]?_0x56a199['acw']:![];_0x563857[_0x7b9a('0xe')]=_0x563857['agentacw']?_0x56a199[_0x7b9a('0xf')]:0x0;}utils['request'](_0x7b9a('0x10'),_0x563857);});}else{utils[_0x7b9a('0x11')](_0x7b9a('0x10'),_0x563857);}if(_0x5f1a52){delete transfers[_0x563857['uniqueid']];}else{delete agents[_0x563857[_0x7b9a('0x12')]];}}exports[_0x7b9a('0x13')]=function(_0x5e3875){try{utils[_0x7b9a('0x14')](util[_0x7b9a('0x15')]('[%s][agents][agentcalled]',_0x5e3875[_0x7b9a('0x3')]),_0x5e3875);agents[_0x5e3875[_0x7b9a('0x12')]]=_0x5e3875;agents[_0x5e3875[_0x7b9a('0x12')]][_0x7b9a('0x16')]=utils[_0x7b9a('0x17')]();agents[_0x5e3875[_0x7b9a('0x12')]][_0x7b9a('0xa')]=_0x7b9a('0x18');agents[_0x5e3875[_0x7b9a('0x12')]]['connectedlinenum']=null;agents[_0x5e3875[_0x7b9a('0x12')]]['connectedlinename']=null;utils[_0x7b9a('0x1')](util[_0x7b9a('0x15')](_0x7b9a('0x19'),_0x5e3875[_0x7b9a('0x3')],agents[_0x5e3875[_0x7b9a('0x12')]][_0x7b9a('0x6')],_0x5e3875[_0x7b9a('0x12')]));}catch(_0x283cc3){utils[_0x7b9a('0x1a')](util[_0x7b9a('0x15')](_0x7b9a('0x1b'),_0x5e3875[_0x7b9a('0x3')]),_0x283cc3);}};exports[_0x7b9a('0x1c')]=function(_0x58aed7){try{if(!_[_0x7b9a('0x1d')](agents[_0x58aed7['destuniqueid']])){utils[_0x7b9a('0x14')](util['format'](_0x7b9a('0x1e'),_0x58aed7[_0x7b9a('0x3')]),_0x58aed7);utils[_0x7b9a('0x1')](util['format'](_0x7b9a('0x1f'),_0x58aed7[_0x7b9a('0x3')],agents[_0x58aed7['destuniqueid']][_0x7b9a('0x6')],_0x58aed7[_0x7b9a('0x12')]));agents[_0x58aed7[_0x7b9a('0x12')]][_0x7b9a('0x1c')]=!![];agents[_0x58aed7[_0x7b9a('0x12')]]['agentringnoanswerAt']=utils[_0x7b9a('0x17')]();agents[_0x58aed7[_0x7b9a('0x12')]]['lastevent']=_0x7b9a('0x20');agents[_0x58aed7['destuniqueid']][_0x7b9a('0x21')]=_0x7b9a('0x20');agents[_0x58aed7['destuniqueid']]['holdtime']=_0x58aed7[_0x7b9a('0x22')]?parseInt(_0x58aed7['ringtime'])/0x3e8:0x0;agents[_0x58aed7['destuniqueid']][_0x7b9a('0x23')]=0x0;unanswered['push'](_0x58aed7['destuniqueid']);}}catch(_0x3847b4){utils['error'](util[_0x7b9a('0x15')](_0x7b9a('0x1e'),_0x58aed7['uniqueid']),_0x3847b4);}};exports[_0x7b9a('0x24')]=function(_0x2e6144){try{_[_0x7b9a('0x25')](agents,function(_0x5b64d7,_0x45ccf5){if(_0x5b64d7[_0x7b9a('0x3')]==_0x2e6144[_0x7b9a('0x3')]&&!_[_0x7b9a('0x26')](unanswered,_0x5b64d7[_0x7b9a('0x12')])){utils[_0x7b9a('0x14')](util['format']('[%s][agents][queuecallerabandon]',_0x2e6144[_0x7b9a('0x3')]),_0x2e6144);utils[_0x7b9a('0x1')](util[_0x7b9a('0x15')]('[%s][agents][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned',_0x2e6144[_0x7b9a('0x3')],_0x5b64d7[_0x7b9a('0x6')],_0x5b64d7['destuniqueid']));_0x5b64d7['agentringnoanswer']=!![];_0x5b64d7[_0x7b9a('0x27')]=utils[_0x7b9a('0x17')]();_0x5b64d7['lastevent']=_0x7b9a('0x28');_0x5b64d7[_0x7b9a('0x21')]=_0x7b9a('0x28');_0x5b64d7[_0x7b9a('0x29')]=_0x2e6144[_0x7b9a('0x29')];_0x5b64d7['talktime']=0x0;writeDB(_0x5b64d7);}});}catch(_0x46bcd0){utils[_0x7b9a('0x1a')](util[_0x7b9a('0x15')](_0x7b9a('0x2a'),_0x2e6144[_0x7b9a('0x3')]),_0x46bcd0);}};exports[_0x7b9a('0x2b')]=function(_0x5f1da4){try{if(agents[_0x5f1da4['destuniqueid']]){utils[_0x7b9a('0x14')](util[_0x7b9a('0x15')]('[%s][agents][agentconnect]',_0x5f1da4[_0x7b9a('0x3')]),_0x5f1da4);utils[_0x7b9a('0x1')](util[_0x7b9a('0x15')]('[%s][agents][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect',_0x5f1da4[_0x7b9a('0x3')],agents[_0x5f1da4[_0x7b9a('0x12')]]['membername'],_0x5f1da4['destuniqueid']));agents[_0x5f1da4[_0x7b9a('0x12')]][_0x7b9a('0x2c')]=utils[_0x7b9a('0x17')]();agents[_0x5f1da4[_0x7b9a('0x12')]][_0x7b9a('0x9')]=_0x5f1da4[_0x7b9a('0x9')];agents[_0x5f1da4[_0x7b9a('0x12')]][_0x7b9a('0x2d')]=_0x5f1da4['connectedlinename'];agents[_0x5f1da4[_0x7b9a('0x12')]]['holdtime']=_0x5f1da4[_0x7b9a('0x22')];agents[_0x5f1da4[_0x7b9a('0x12')]][_0x7b9a('0xa')]=_0x7b9a('0x2e');_[_0x7b9a('0x25')](agents,function(_0x89951b,_0x5e504f){if(_0x89951b[_0x7b9a('0x12')]!=_0x5f1da4[_0x7b9a('0x12')]&&_0x89951b[_0x7b9a('0x3')]==_0x5f1da4[_0x7b9a('0x3')]){_0x89951b['talktime']=0x0;_0x89951b[_0x7b9a('0x29')]=_0x5f1da4[_0x7b9a('0x22')];_0x89951b[_0x7b9a('0x1c')]=!![];_0x89951b[_0x7b9a('0x27')]=utils['now']();_0x89951b[_0x7b9a('0xa')]='answered_elsewhere';_0x89951b[_0x7b9a('0x21')]=_0x7b9a('0x2f');_0x89951b[_0x7b9a('0x30')]=_0x5f1da4[_0x7b9a('0x12')];_0x89951b[_0x7b9a('0x31')]=_0x5f1da4[_0x7b9a('0x6')];writeDB(_0x89951b);}});}}catch(_0x56e274){utils[_0x7b9a('0x1a')](util[_0x7b9a('0x15')](_0x7b9a('0x32'),_0x5f1da4['uniqueid']),_0x56e274);}};exports['agentcomplete']=function(_0x3724fe){try{if(!_[_0x7b9a('0x1d')](agents[_0x3724fe[_0x7b9a('0x12')]])){utils[_0x7b9a('0x14')](util[_0x7b9a('0x15')](_0x7b9a('0x33'),_0x3724fe['uniqueid']),_0x3724fe);utils['info'](util['format'](_0x7b9a('0x34'),_0x3724fe[_0x7b9a('0x3')],agents[_0x3724fe['destuniqueid']][_0x7b9a('0x6')],_0x3724fe[_0x7b9a('0x12')]));agents[_0x3724fe[_0x7b9a('0x12')]]['agentcomplete']=!![];agents[_0x3724fe[_0x7b9a('0x12')]]['agentcompleteAt']=utils[_0x7b9a('0x17')]();agents[_0x3724fe[_0x7b9a('0x12')]][_0x7b9a('0x23')]=utils[_0x7b9a('0x35')](agents[_0x3724fe[_0x7b9a('0x12')]]['agentcompleteAt'],agents[_0x3724fe[_0x7b9a('0x12')]]['agentconnectAt']);agents[_0x3724fe[_0x7b9a('0x12')]]['reason']=_0x3724fe['reason'];agents[_0x3724fe[_0x7b9a('0x12')]][_0x7b9a('0xa')]=_0x7b9a('0x36');writeDB(agents[_0x3724fe[_0x7b9a('0x12')]]);}}catch(_0x1cbd5a){utils[_0x7b9a('0x1a')](util[_0x7b9a('0x15')](_0x7b9a('0x33'),_0x3724fe[_0x7b9a('0x3')]),_0x1cbd5a);}};exports['blindtransfer']=function(_0x1d7957){try{if(!_[_0x7b9a('0x1d')](agents[_0x1d7957['transfereruniqueid']])){utils['debug'](util['format'](_0x7b9a('0x37'),_0x1d7957[_0x7b9a('0x3')]),_0x1d7957);utils[_0x7b9a('0x1')](util[_0x7b9a('0x15')]('[%s][agents][blindtransfer]\x20agent:%s\x20transferuniqueid:%s',_0x1d7957[_0x7b9a('0x3')],agents[_0x1d7957[_0x7b9a('0x38')]][_0x7b9a('0x6')],agents[_0x1d7957[_0x7b9a('0x38')]][_0x7b9a('0x3')]));agents[_0x1d7957['transfereruniqueid']][_0x7b9a('0x39')]=!![];agents[_0x1d7957['transfereruniqueid']][_0x7b9a('0x3a')]=_0x7b9a('0x3b');agents[_0x1d7957[_0x7b9a('0x38')]][_0x7b9a('0x3c')]=_0x1d7957['extension'];agents[_0x1d7957[_0x7b9a('0x38')]][_0x7b9a('0x3d')]=agents[_0x1d7957[_0x7b9a('0x38')]][_0x7b9a('0x3')];}}catch(_0x2b0db5){utils[_0x7b9a('0x1a')](util[_0x7b9a('0x15')]('[%s][agents][blindtransfer]',_0x1d7957['uniqueid']),_0x2b0db5);}};exports['attendedtransfer']=function(_0x12c5bf){try{utils[_0x7b9a('0x14')](util['format']('[%s][agents][attendedtransfer]',_0x12c5bf['origtransfereruniqueid']),_0x12c5bf);if(_0x12c5bf['origtransfereruniqueid']==_0x12c5bf[_0x7b9a('0x3e')]){if(!_[_0x7b9a('0x1d')](agents[_0x12c5bf[_0x7b9a('0x3f')]])){utils[_0x7b9a('0x1')](util[_0x7b9a('0x15')](_0x7b9a('0x40'),_0x12c5bf[_0x7b9a('0x41')],agents[_0x12c5bf[_0x7b9a('0x3f')]]['membername']));agents[_0x12c5bf[_0x7b9a('0x3f')]]['transfer']=!![];agents[_0x12c5bf[_0x7b9a('0x3f')]][_0x7b9a('0x3a')]=_0x7b9a('0x42');agents[_0x12c5bf[_0x7b9a('0x3f')]][_0x7b9a('0x3c')]=_0x12c5bf['origtransfererexten'];agents[_0x12c5bf[_0x7b9a('0x3f')]]['transferuniqueid']=_0x12c5bf[_0x7b9a('0x41')];}if(_0x12c5bf[_0x7b9a('0x43')]&&agents[_0x12c5bf[_0x7b9a('0x43')]]){agents[_0x12c5bf['transfereeuniqueid']]['agententerreason']=0x1;transfers[_0x12c5bf['transfereeuniqueid']]=_['clone'](agents[_0x12c5bf[_0x7b9a('0x43')]]);transfers[_0x12c5bf[_0x7b9a('0x43')]][_0x7b9a('0x8')]=agents[_0x12c5bf['secondtransfereruniqueid']][_0x7b9a('0x8')];transfers[_0x12c5bf[_0x7b9a('0x43')]][_0x7b9a('0x44')]=agents[_0x12c5bf[_0x7b9a('0x3f')]][_0x7b9a('0x44')];transfers[_0x12c5bf['transfereeuniqueid']][_0x7b9a('0x16')]=utils[_0x7b9a('0x17')]();transfers[_0x12c5bf[_0x7b9a('0x43')]]['agentconnectAt']=utils['now']();transfers[_0x12c5bf['transfereeuniqueid']][_0x7b9a('0x29')]=0x0;transfers[_0x12c5bf[_0x7b9a('0x43')]][_0x7b9a('0x45')]=0x2;}}else if(_0x12c5bf['secondtransfereruniqueid']==_0x12c5bf[_0x7b9a('0x46')]){if(!_[_0x7b9a('0x1d')](agents[_0x12c5bf['origtransfereruniqueid']])){utils[_0x7b9a('0x1')](util['format'](_0x7b9a('0x40'),_0x12c5bf['origtransfereruniqueid'],agents[_0x12c5bf[_0x7b9a('0x41')]][_0x7b9a('0x6')]));agents[_0x12c5bf[_0x7b9a('0x41')]][_0x7b9a('0x39')]=!![];agents[_0x12c5bf['origtransfereruniqueid']][_0x7b9a('0x3a')]=_0x7b9a('0x42');agents[_0x12c5bf[_0x7b9a('0x41')]][_0x7b9a('0x3c')]=_0x12c5bf['secondtransfererexten'];agents[_0x12c5bf[_0x7b9a('0x41')]]['transferuniqueid']=_0x12c5bf[_0x7b9a('0x3f')];}if(_0x12c5bf['transfertargetuniqueid']&&agents[_0x12c5bf[_0x7b9a('0x47')]]){agents[_0x12c5bf['transfertargetuniqueid']]['agententerreason']=0x1;transfers[_0x12c5bf['transfertargetuniqueid']]=_['clone'](agents[_0x12c5bf[_0x7b9a('0x47')]]);transfers[_0x12c5bf[_0x7b9a('0x47')]][_0x7b9a('0x8')]=agents[_0x12c5bf[_0x7b9a('0x41')]]['calleridnum'];transfers[_0x12c5bf[_0x7b9a('0x47')]]['calleridname']=agents[_0x12c5bf['origtransfereruniqueid']][_0x7b9a('0x44')];transfers[_0x12c5bf['transfertargetuniqueid']]['agentcalledAt']=utils[_0x7b9a('0x17')]();transfers[_0x12c5bf[_0x7b9a('0x47')]]['agentconnectAt']=utils[_0x7b9a('0x17')]();transfers[_0x12c5bf['transfertargetuniqueid']][_0x7b9a('0x29')]=0x0;transfers[_0x12c5bf[_0x7b9a('0x47')]][_0x7b9a('0x45')]=0x2;}}}catch(_0x5118b3){utils['error'](util['format']('[%s][agents][attendedtransfer]',_0x12c5bf[_0x7b9a('0x41')]),_0x5118b3);}};exports[_0x7b9a('0x48')]=function(_0x3fd697){try{utils[_0x7b9a('0x14')](util[_0x7b9a('0x15')](_0x7b9a('0x49'),_0x3fd697[_0x7b9a('0x3')]),_0x3fd697);if(agents[_0x3fd697['uniqueid']]&&agents[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0x21')]==='timeout'){if(_0x3fd697[_0x7b9a('0x4a')]==='21'){agents[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0x21')]='rejected';agents[_0x3fd697['uniqueid']][_0x7b9a('0xa')]=_0x7b9a('0x4b');}utils['info'](util[_0x7b9a('0x15')]('[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s',_0x3fd697[_0x7b9a('0x3')],agents[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0x6')],agents[_0x3fd697['uniqueid']][_0x7b9a('0x21')],agents[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0xa')]));writeDB(agents[_0x3fd697[_0x7b9a('0x3')]]);var _0x2090ef=unanswered['indexOf'](_0x3fd697['uniqueid']);if(_0x2090ef>-0x1){unanswered[_0x7b9a('0x4c')](_0x2090ef,0x1);}}if(transfers[_0x3fd697[_0x7b9a('0x3')]]){transfers[_0x3fd697['uniqueid']][_0x7b9a('0xd')]=!![];transfers[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0x4d')]=utils['now']();transfers[_0x3fd697['uniqueid']][_0x7b9a('0x23')]=utils[_0x7b9a('0x35')](transfers[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0x4d')],transfers[_0x3fd697['uniqueid']][_0x7b9a('0x2c')]);transfers[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0x21')]='agent';transfers[_0x3fd697['uniqueid']][_0x7b9a('0xa')]=_0x7b9a('0x36');utils[_0x7b9a('0x1')](util[_0x7b9a('0x15')]('[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s',_0x3fd697[_0x7b9a('0x3')],transfers[_0x3fd697[_0x7b9a('0x3')]]['membername'],transfers[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0x21')],transfers[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0xa')]));writeDB(transfers[_0x3fd697[_0x7b9a('0x3')]],!![]);}if(agents[_0x3fd697[_0x7b9a('0x3')]]&&agents[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0x2c')]){agents[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0xd')]=!![];agents[_0x3fd697[_0x7b9a('0x3')]]['agentcompleteAt']=utils['now']();agents[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0x23')]=utils['diffTime'](agents[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0x4d')],agents[_0x3fd697['uniqueid']][_0x7b9a('0x2c')]);agents[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0x21')]=agents[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0x39')]?_0x7b9a('0x39'):_0x7b9a('0x4e');agents[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0xa')]='complete';utils[_0x7b9a('0x1')](util[_0x7b9a('0x15')](_0x7b9a('0x4f'),_0x3fd697[_0x7b9a('0x3')],agents[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0x6')],agents[_0x3fd697[_0x7b9a('0x3')]][_0x7b9a('0x21')],agents[_0x3fd697['uniqueid']][_0x7b9a('0xa')]));writeDB(agents[_0x3fd697[_0x7b9a('0x3')]]);}}catch(_0x3022e0){utils['error'](util[_0x7b9a('0x15')](_0x7b9a('0x49'),_0x3fd697[_0x7b9a('0x3')]),_0x3022e0);}};
\ No newline at end of file
+var _0x3c81=['CreateVoiceAgentReport','destuniqueid','agentcalled','debug','[%s][agents][agentcalled]','agentcalledAt','called','connectedlinename','info','format','[%s][agents][agentcalled]\x20agent:%s\x20destuniqueid:%s\x20lastevent:called','uniqueid','error','agentringnoanswer','[%s][agents][agentringnoanswer]','[%s][agents][agentringnoanswer]\x20agent:%s\x20destuniqueid:%s\x20lastevent:timeout','now','reason','holdtime','talktime','push','queuecallerabandon','forIn','[%s][agents][queuecallerabandon]','[%s][agents][queuecallerabandon]\x20agent:%s\x20destuniqueid:%s\x20lastevent:abandoned','agentringnoanswerAt','abandoned','agentconnect','[%s][agents][agentconnect]','[%s][agents][agentconnect]\x20agent:%s\x20destuniqueid:%s\x20lastevent:connect','agentconnectAt','ringtime','connect','answered_elsewhere','answeredelsewheredestinationuniqueid','answeredelsewheremembername','[%s][agents][agentcomplete]','[%s][agents][agentcomplete]\x20agent:%s\x20destuniqueid:%s\x20lastevent:complete','agentcompleteAt','diffTime','complete','blindtransfer','transfereruniqueid','[%s][agents][blindtransfer]','[%s][agents][blindtransfer]\x20agent:%s\x20transferuniqueid:%s','transfer','transfertype','blind','transferexten','extension','attendedtransfer','[%s][agents][attendedtransfer]','origtransfereruniqueid','origtransfererlinkedid','secondtransfereruniqueid','[%s][agents][attendedtransfer]\x20agent:%s','origtransfererexten','transferuniqueid','transfereeuniqueid','clone','calleridname','agententerreason','secondtransfererlinkedid','isNil','ATTENDED','secondtransfererexten','transfertargetuniqueid','[%s][agents][hangup]','timeout','cause','rejected','[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s','splice','agent','lodash','util','channel','queue','membername','interface','calleridnum','connectedlinenum','lastevent','getVoiceQueueByName','then','type','agentacw','agentcomplete','acw','acwtime','acwTimeout','request'];(function(_0x53c449,_0x1f7488){var _0x40ff03=function(_0x5bc0a9){while(--_0x5bc0a9){_0x53c449['push'](_0x53c449['shift']());}};_0x40ff03(++_0x1f7488);}(_0x3c81,0x102));var _0x13c8=function(_0x182f03,_0x12a63f){_0x182f03=_0x182f03-0x0;var _0x95ca5e=_0x3c81[_0x182f03];return _0x95ca5e;};'use strict';var _=require(_0x13c8('0x0'));var util=require(_0x13c8('0x1'));var utils=require('./utils');var agents={};var transfers={};var unanswered=[];function writeDB(_0x252f26,_0x131d0b){utils['info'](util['format']('[%s][agents][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s',_0x252f26['uniqueid'],_0x252f26[_0x13c8('0x2')],_0x252f26[_0x13c8('0x3')],_0x252f26[_0x13c8('0x4')],_0x252f26[_0x13c8('0x5')],_0x252f26[_0x13c8('0x6')],_0x252f26[_0x13c8('0x7')],_0x252f26[_0x13c8('0x8')]));if(_0x252f26['queue']){utils[_0x13c8('0x9')](_0x252f26['queue'])[_0x13c8('0xa')](function(_0x296463){if(_0x296463){_0x252f26[_0x13c8('0xb')]=_0x296463[_0x13c8('0xb')];_0x252f26[_0x13c8('0xc')]=_0x252f26[_0x13c8('0xd')]?_0x296463[_0x13c8('0xe')]:![];_0x252f26[_0x13c8('0xf')]=_0x252f26[_0x13c8('0xc')]?_0x296463[_0x13c8('0x10')]:0x0;}utils[_0x13c8('0x11')](_0x13c8('0x12'),_0x252f26);});}else{utils[_0x13c8('0x11')](_0x13c8('0x12'),_0x252f26);}if(_0x131d0b){delete transfers[_0x252f26['uniqueid']];}else{delete agents[_0x252f26[_0x13c8('0x13')]];}}exports[_0x13c8('0x14')]=function(_0x2304b5){try{utils[_0x13c8('0x15')](util['format'](_0x13c8('0x16'),_0x2304b5['uniqueid']),_0x2304b5);agents[_0x2304b5['destuniqueid']]=_0x2304b5;agents[_0x2304b5['destuniqueid']][_0x13c8('0x17')]=utils['now']();agents[_0x2304b5[_0x13c8('0x13')]][_0x13c8('0x8')]=_0x13c8('0x18');agents[_0x2304b5[_0x13c8('0x13')]]['connectedlinenum']=null;agents[_0x2304b5[_0x13c8('0x13')]][_0x13c8('0x19')]=null;utils[_0x13c8('0x1a')](util[_0x13c8('0x1b')](_0x13c8('0x1c'),_0x2304b5[_0x13c8('0x1d')],agents[_0x2304b5[_0x13c8('0x13')]][_0x13c8('0x4')],_0x2304b5[_0x13c8('0x13')]));}catch(_0x31d122){utils[_0x13c8('0x1e')](util['format'](_0x13c8('0x16'),_0x2304b5[_0x13c8('0x1d')]),_0x31d122);}};exports[_0x13c8('0x1f')]=function(_0x313ea3){try{if(!_['isNil'](agents[_0x313ea3[_0x13c8('0x13')]])){utils[_0x13c8('0x15')](util[_0x13c8('0x1b')](_0x13c8('0x20'),_0x313ea3[_0x13c8('0x1d')]),_0x313ea3);utils[_0x13c8('0x1a')](util['format'](_0x13c8('0x21'),_0x313ea3[_0x13c8('0x1d')],agents[_0x313ea3[_0x13c8('0x13')]][_0x13c8('0x4')],_0x313ea3['destuniqueid']));agents[_0x313ea3[_0x13c8('0x13')]][_0x13c8('0x1f')]=!![];agents[_0x313ea3['destuniqueid']]['agentringnoanswerAt']=utils[_0x13c8('0x22')]();agents[_0x313ea3[_0x13c8('0x13')]]['lastevent']='timeout';agents[_0x313ea3[_0x13c8('0x13')]][_0x13c8('0x23')]='timeout';agents[_0x313ea3['destuniqueid']][_0x13c8('0x24')]=_0x313ea3['ringtime']?parseInt(_0x313ea3['ringtime'])/0x3e8:0x0;agents[_0x313ea3[_0x13c8('0x13')]][_0x13c8('0x25')]=0x0;unanswered[_0x13c8('0x26')](_0x313ea3['destuniqueid']);}}catch(_0x5ef2f7){utils[_0x13c8('0x1e')](util[_0x13c8('0x1b')](_0x13c8('0x20'),_0x313ea3[_0x13c8('0x1d')]),_0x5ef2f7);}};exports[_0x13c8('0x27')]=function(_0x220d40){try{_[_0x13c8('0x28')](agents,function(_0x4a1b9c,_0x109cb8){if(_0x4a1b9c[_0x13c8('0x1d')]==_0x220d40['uniqueid']&&!_['includes'](unanswered,_0x4a1b9c[_0x13c8('0x13')])){utils[_0x13c8('0x15')](util['format'](_0x13c8('0x29'),_0x220d40[_0x13c8('0x1d')]),_0x220d40);utils['info'](util[_0x13c8('0x1b')](_0x13c8('0x2a'),_0x220d40[_0x13c8('0x1d')],_0x4a1b9c[_0x13c8('0x4')],_0x4a1b9c[_0x13c8('0x13')]));_0x4a1b9c[_0x13c8('0x1f')]=!![];_0x4a1b9c[_0x13c8('0x2b')]=utils[_0x13c8('0x22')]();_0x4a1b9c['lastevent']='abandoned';_0x4a1b9c[_0x13c8('0x23')]=_0x13c8('0x2c');_0x4a1b9c['holdtime']=_0x220d40[_0x13c8('0x24')];_0x4a1b9c['talktime']=0x0;writeDB(_0x4a1b9c);}});}catch(_0x1fdf7d){utils['error'](util[_0x13c8('0x1b')](_0x13c8('0x29'),_0x220d40[_0x13c8('0x1d')]),_0x1fdf7d);}};exports[_0x13c8('0x2d')]=function(_0x2039e7){try{if(agents[_0x2039e7[_0x13c8('0x13')]]){utils[_0x13c8('0x15')](util['format'](_0x13c8('0x2e'),_0x2039e7[_0x13c8('0x1d')]),_0x2039e7);utils['info'](util[_0x13c8('0x1b')](_0x13c8('0x2f'),_0x2039e7[_0x13c8('0x1d')],agents[_0x2039e7['destuniqueid']]['membername'],_0x2039e7['destuniqueid']));agents[_0x2039e7[_0x13c8('0x13')]][_0x13c8('0x30')]=utils[_0x13c8('0x22')]();agents[_0x2039e7[_0x13c8('0x13')]][_0x13c8('0x7')]=_0x2039e7[_0x13c8('0x7')];agents[_0x2039e7[_0x13c8('0x13')]][_0x13c8('0x19')]=_0x2039e7[_0x13c8('0x19')];agents[_0x2039e7['destuniqueid']]['holdtime']=_0x2039e7[_0x13c8('0x31')];agents[_0x2039e7[_0x13c8('0x13')]][_0x13c8('0x8')]=_0x13c8('0x32');_['forIn'](agents,function(_0x35e1e7,_0x4bd627){if(_0x35e1e7[_0x13c8('0x13')]!=_0x2039e7[_0x13c8('0x13')]&&_0x35e1e7[_0x13c8('0x1d')]==_0x2039e7[_0x13c8('0x1d')]){_0x35e1e7[_0x13c8('0x25')]=0x0;_0x35e1e7[_0x13c8('0x24')]=_0x2039e7[_0x13c8('0x31')];_0x35e1e7[_0x13c8('0x1f')]=!![];_0x35e1e7[_0x13c8('0x2b')]=utils[_0x13c8('0x22')]();_0x35e1e7[_0x13c8('0x8')]=_0x13c8('0x33');_0x35e1e7[_0x13c8('0x23')]=_0x13c8('0x33');_0x35e1e7[_0x13c8('0x34')]=_0x2039e7[_0x13c8('0x13')];_0x35e1e7[_0x13c8('0x35')]=_0x2039e7[_0x13c8('0x4')];writeDB(_0x35e1e7);}});}}catch(_0xc5eb86){utils[_0x13c8('0x1e')](util[_0x13c8('0x1b')](_0x13c8('0x2e'),_0x2039e7[_0x13c8('0x1d')]),_0xc5eb86);}};exports[_0x13c8('0xd')]=function(_0x44ee66){try{if(!_['isNil'](agents[_0x44ee66[_0x13c8('0x13')]])){utils[_0x13c8('0x15')](util[_0x13c8('0x1b')](_0x13c8('0x36'),_0x44ee66[_0x13c8('0x1d')]),_0x44ee66);utils['info'](util['format'](_0x13c8('0x37'),_0x44ee66[_0x13c8('0x1d')],agents[_0x44ee66[_0x13c8('0x13')]]['membername'],_0x44ee66['destuniqueid']));agents[_0x44ee66['destuniqueid']][_0x13c8('0xd')]=!![];agents[_0x44ee66['destuniqueid']][_0x13c8('0x38')]=utils['now']();agents[_0x44ee66[_0x13c8('0x13')]][_0x13c8('0x25')]=utils[_0x13c8('0x39')](agents[_0x44ee66[_0x13c8('0x13')]][_0x13c8('0x38')],agents[_0x44ee66[_0x13c8('0x13')]]['agentconnectAt']);agents[_0x44ee66[_0x13c8('0x13')]][_0x13c8('0x23')]=_0x44ee66['reason'];agents[_0x44ee66[_0x13c8('0x13')]][_0x13c8('0x8')]=_0x13c8('0x3a');writeDB(agents[_0x44ee66[_0x13c8('0x13')]]);}}catch(_0x38486a){utils['error'](util[_0x13c8('0x1b')](_0x13c8('0x36'),_0x44ee66[_0x13c8('0x1d')]),_0x38486a);}};exports[_0x13c8('0x3b')]=function(_0x185d18){try{if(!_['isNil'](agents[_0x185d18[_0x13c8('0x3c')]])){utils[_0x13c8('0x15')](util[_0x13c8('0x1b')](_0x13c8('0x3d'),_0x185d18[_0x13c8('0x1d')]),_0x185d18);utils[_0x13c8('0x1a')](util[_0x13c8('0x1b')](_0x13c8('0x3e'),_0x185d18[_0x13c8('0x1d')],agents[_0x185d18[_0x13c8('0x3c')]][_0x13c8('0x4')],agents[_0x185d18['transfereruniqueid']][_0x13c8('0x1d')]));agents[_0x185d18[_0x13c8('0x3c')]][_0x13c8('0x3f')]=!![];agents[_0x185d18[_0x13c8('0x3c')]][_0x13c8('0x40')]=_0x13c8('0x41');agents[_0x185d18['transfereruniqueid']][_0x13c8('0x42')]=_0x185d18[_0x13c8('0x43')];agents[_0x185d18[_0x13c8('0x3c')]]['transferuniqueid']=agents[_0x185d18['transfereruniqueid']][_0x13c8('0x1d')];}}catch(_0x14a738){utils['error'](util[_0x13c8('0x1b')](_0x13c8('0x3d'),_0x185d18['uniqueid']),_0x14a738);}};exports[_0x13c8('0x44')]=function(_0x554792){try{utils[_0x13c8('0x15')](util[_0x13c8('0x1b')](_0x13c8('0x45'),_0x554792['origtransfereruniqueid']),_0x554792);if(_0x554792[_0x13c8('0x46')]==_0x554792[_0x13c8('0x47')]){if(!_['isNil'](agents[_0x554792[_0x13c8('0x48')]])){utils['info'](util[_0x13c8('0x1b')](_0x13c8('0x49'),_0x554792[_0x13c8('0x46')],agents[_0x554792[_0x13c8('0x48')]][_0x13c8('0x4')]));agents[_0x554792['secondtransfereruniqueid']][_0x13c8('0x3f')]=!![];agents[_0x554792['secondtransfereruniqueid']]['transfertype']='ATTENDED';agents[_0x554792['secondtransfereruniqueid']]['transferexten']=_0x554792[_0x13c8('0x4a')];agents[_0x554792[_0x13c8('0x48')]][_0x13c8('0x4b')]=_0x554792[_0x13c8('0x46')];}if(_0x554792[_0x13c8('0x4c')]&&agents[_0x554792[_0x13c8('0x4c')]]){agents[_0x554792[_0x13c8('0x4c')]]['agententerreason']=0x1;transfers[_0x554792['transfereeuniqueid']]=_[_0x13c8('0x4d')](agents[_0x554792[_0x13c8('0x4c')]]);transfers[_0x554792[_0x13c8('0x4c')]][_0x13c8('0x6')]=agents[_0x554792[_0x13c8('0x48')]][_0x13c8('0x6')];transfers[_0x554792[_0x13c8('0x4c')]][_0x13c8('0x4e')]=agents[_0x554792['secondtransfereruniqueid']][_0x13c8('0x4e')];transfers[_0x554792[_0x13c8('0x4c')]]['agentcalledAt']=utils[_0x13c8('0x22')]();transfers[_0x554792[_0x13c8('0x4c')]][_0x13c8('0x30')]=utils[_0x13c8('0x22')]();transfers[_0x554792[_0x13c8('0x4c')]][_0x13c8('0x24')]=0x0;transfers[_0x554792[_0x13c8('0x4c')]][_0x13c8('0x4f')]=0x2;}}else if(_0x554792[_0x13c8('0x48')]==_0x554792[_0x13c8('0x50')]){if(!_[_0x13c8('0x51')](agents[_0x554792[_0x13c8('0x46')]])){utils[_0x13c8('0x1a')](util[_0x13c8('0x1b')](_0x13c8('0x49'),_0x554792[_0x13c8('0x46')],agents[_0x554792['origtransfereruniqueid']][_0x13c8('0x4')]));agents[_0x554792['origtransfereruniqueid']][_0x13c8('0x3f')]=!![];agents[_0x554792[_0x13c8('0x46')]]['transfertype']=_0x13c8('0x52');agents[_0x554792[_0x13c8('0x46')]]['transferexten']=_0x554792[_0x13c8('0x53')];agents[_0x554792[_0x13c8('0x46')]][_0x13c8('0x4b')]=_0x554792[_0x13c8('0x48')];}if(_0x554792[_0x13c8('0x54')]&&agents[_0x554792[_0x13c8('0x54')]]){agents[_0x554792[_0x13c8('0x54')]][_0x13c8('0x4f')]=0x1;transfers[_0x554792[_0x13c8('0x54')]]=_[_0x13c8('0x4d')](agents[_0x554792[_0x13c8('0x54')]]);transfers[_0x554792['transfertargetuniqueid']][_0x13c8('0x6')]=agents[_0x554792[_0x13c8('0x46')]][_0x13c8('0x6')];transfers[_0x554792[_0x13c8('0x54')]][_0x13c8('0x4e')]=agents[_0x554792[_0x13c8('0x46')]]['calleridname'];transfers[_0x554792[_0x13c8('0x54')]][_0x13c8('0x17')]=utils[_0x13c8('0x22')]();transfers[_0x554792['transfertargetuniqueid']][_0x13c8('0x30')]=utils[_0x13c8('0x22')]();transfers[_0x554792[_0x13c8('0x54')]][_0x13c8('0x24')]=0x0;transfers[_0x554792[_0x13c8('0x54')]][_0x13c8('0x4f')]=0x2;}}}catch(_0x55e5ba){utils[_0x13c8('0x1e')](util[_0x13c8('0x1b')](_0x13c8('0x45'),_0x554792[_0x13c8('0x46')]),_0x55e5ba);}};exports['hangup']=function(_0x16b409){try{utils[_0x13c8('0x15')](util[_0x13c8('0x1b')](_0x13c8('0x55'),_0x16b409[_0x13c8('0x1d')]),_0x16b409);if(agents[_0x16b409[_0x13c8('0x1d')]]&&agents[_0x16b409[_0x13c8('0x1d')]]['reason']===_0x13c8('0x56')){if(_0x16b409[_0x13c8('0x57')]==='21'){agents[_0x16b409[_0x13c8('0x1d')]]['reason']=_0x13c8('0x58');agents[_0x16b409[_0x13c8('0x1d')]]['lastevent']='rejected';}utils[_0x13c8('0x1a')](util['format'](_0x13c8('0x59'),_0x16b409['uniqueid'],agents[_0x16b409[_0x13c8('0x1d')]][_0x13c8('0x4')],agents[_0x16b409[_0x13c8('0x1d')]][_0x13c8('0x23')],agents[_0x16b409[_0x13c8('0x1d')]]['lastevent']));writeDB(agents[_0x16b409[_0x13c8('0x1d')]]);var _0x2d8dfe=unanswered['indexOf'](_0x16b409[_0x13c8('0x1d')]);if(_0x2d8dfe>-0x1){unanswered[_0x13c8('0x5a')](_0x2d8dfe,0x1);}}if(transfers[_0x16b409[_0x13c8('0x1d')]]){transfers[_0x16b409[_0x13c8('0x1d')]][_0x13c8('0xd')]=!![];transfers[_0x16b409[_0x13c8('0x1d')]][_0x13c8('0x38')]=utils[_0x13c8('0x22')]();transfers[_0x16b409[_0x13c8('0x1d')]][_0x13c8('0x25')]=utils['diffTime'](transfers[_0x16b409[_0x13c8('0x1d')]][_0x13c8('0x38')],transfers[_0x16b409['uniqueid']]['agentconnectAt']);transfers[_0x16b409[_0x13c8('0x1d')]][_0x13c8('0x23')]=_0x13c8('0x5b');transfers[_0x16b409[_0x13c8('0x1d')]][_0x13c8('0x8')]=_0x13c8('0x3a');utils['info'](util[_0x13c8('0x1b')](_0x13c8('0x59'),_0x16b409[_0x13c8('0x1d')],transfers[_0x16b409[_0x13c8('0x1d')]][_0x13c8('0x4')],transfers[_0x16b409['uniqueid']][_0x13c8('0x23')],transfers[_0x16b409[_0x13c8('0x1d')]]['lastevent']));writeDB(transfers[_0x16b409[_0x13c8('0x1d')]],!![]);}if(agents[_0x16b409[_0x13c8('0x1d')]]&&agents[_0x16b409['uniqueid']][_0x13c8('0x30')]){agents[_0x16b409['uniqueid']][_0x13c8('0xd')]=!![];agents[_0x16b409['uniqueid']][_0x13c8('0x38')]=utils[_0x13c8('0x22')]();agents[_0x16b409[_0x13c8('0x1d')]]['talktime']=utils[_0x13c8('0x39')](agents[_0x16b409['uniqueid']]['agentcompleteAt'],agents[_0x16b409[_0x13c8('0x1d')]][_0x13c8('0x30')]);agents[_0x16b409[_0x13c8('0x1d')]][_0x13c8('0x23')]=agents[_0x16b409['uniqueid']]['transfer']?_0x13c8('0x3f'):'agent';agents[_0x16b409['uniqueid']][_0x13c8('0x8')]=_0x13c8('0x3a');utils[_0x13c8('0x1a')](util[_0x13c8('0x1b')]('[%s][agents][hangup]\x20agent:%s\x20reason:%s\x20lastevent:%s',_0x16b409[_0x13c8('0x1d')],agents[_0x16b409['uniqueid']]['membername'],agents[_0x16b409[_0x13c8('0x1d')]][_0x13c8('0x23')],agents[_0x16b409[_0x13c8('0x1d')]][_0x13c8('0x8')]));writeDB(agents[_0x16b409[_0x13c8('0x1d')]]);}}catch(_0x551563){utils[_0x13c8('0x1e')](util['format'](_0x13c8('0x55'),_0x16b409['uniqueid']),_0x551563);}};
\ No newline at end of file
index 2c2f62a..5fed958 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x371d=['musiconholdstartAt','musiconholdstop','mohtime','[%s][calls][musiconholdstop]\x20mohtime:%s','[%s][calls][musiconholdstop]','varset','[%s][calls][varset]','variable','xmd-originatecalleridnum','source','value','xmd-phone','[%s][calls][varset]\x20variable:xmd-phone\x20value:%s','destination','xmd-callerid-preview','xmd-callerid','[%s][calls][varset]\x20variable:%s\x20value:%s','xmd-queue','xmcs-queue','lastapplication','lastdata','xmd-contactid','[%s][calls][varset]\x20variable:xmd-contactid\x20value:%s','ContactId','[%s][calls][varset]\x20variable:xmd-cdrtype\x20value:%s','type','outboundrouteid','[%s][calls][varset]\x20variable:outboundrouteid\x20value:%s','routeid','sipcallid','newexten','[%s][calls][newexten]','application','appdata','set','startsWith','toLowerCase','split','noop','execif','lodash','./utils','NO\x20ANSWER','FAILED','ANSWERED','BUSY','[%s][calls][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','uniqueid','channel','membername','calleridnum','connectedlinenum','lastevent','accountcode','getUserByInternal','then','UserId','request','CreateVoiceCallReport','newchannel','[%s][calls][newchannel]','linkedid','info','[%s][calls][newchannel]\x20context:%s\x20exten:%s','context','exten','now','DOCUMENTATION','format','newstate','[%s][calls][newstate]','channelstate','[%s][calls][newstate]\x20context:%s\x20channel:%s','isNil','systemanswertime','transfer','[%s][calls][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s','destinationchannel','answertime','disposition','toNumber','error','hangup','debug','[%s][calls][hangup]','callerid','[%s][calls][hangup]\x20callerid:%s\x20reason:%s','cause-txt','endtime','duration','diffTime','starttime','attendedtransfer','localtwolinkedid','[%s][calls][attendedtransfer]','origtransfereruniqueid','transfereechannel','[%s][calls][attendedtransfer]\x20localtwolinkedid:%s\x20destinationchannel:%s','secondtransfererchannel','userfield','_attended','origtransfererchannel'];(function(_0x1c22f0,_0x1924e2){var _0x5a32d8=function(_0x3490e8){while(--_0x3490e8){_0x1c22f0['push'](_0x1c22f0['shift']());}};_0x5a32d8(++_0x1924e2);}(_0x371d,0xf4));var _0xd371=function(_0x1b6709,_0x89d9c){_0x1b6709=_0x1b6709-0x0;var _0xe2876=_0x371d[_0x1b6709];return _0xe2876;};'use strict';var _=require(_0xd371('0x0'));var util=require('util');var utils=require(_0xd371('0x1'));var dispositions=[_0xd371('0x2'),_0xd371('0x3'),_0xd371('0x3'),_0xd371('0x2'),_0xd371('0x2'),'NO\x20ANSWER',_0xd371('0x4'),_0xd371('0x5'),_0xd371('0x3'),_0xd371('0x3'),_0xd371('0x3')];var channels={};function writeDB(_0x4e9af9){utils['info'](util['format'](_0xd371('0x6'),_0x4e9af9[_0xd371('0x7')],_0x4e9af9[_0xd371('0x8')],_0x4e9af9['queue'],_0x4e9af9[_0xd371('0x9')],_0x4e9af9['interface'],_0x4e9af9[_0xd371('0xa')],_0x4e9af9[_0xd371('0xb')],_0x4e9af9[_0xd371('0xc')]));if(_0x4e9af9[_0xd371('0xd')]){utils[_0xd371('0xe')](_0x4e9af9[_0xd371('0xd')])[_0xd371('0xf')](function(_0x5cddbd){if(_0x5cddbd){_0x4e9af9[_0xd371('0x10')]=_0x5cddbd['id'];}utils[_0xd371('0x11')](_0xd371('0x12'),_0x4e9af9);});}else{utils[_0xd371('0x11')](_0xd371('0x12'),_0x4e9af9);}if(channels[_0x4e9af9[_0xd371('0x7')]]){delete channels[_0x4e9af9[_0xd371('0x7')]];}}exports[_0xd371('0x13')]=function(_0x49894d){try{utils['debug'](util['format'](_0xd371('0x14'),_0x49894d[_0xd371('0x7')]),_0x49894d);if(_0x49894d['uniqueid']==_0x49894d[_0xd371('0x15')]&&_0x49894d[_0xd371('0x8')]!='OutgoingSpoolFailed'){utils[_0xd371('0x16')](util['format'](_0xd371('0x17'),_0x49894d[_0xd371('0x7')],_0x49894d[_0xd371('0x18')],_0x49894d['exten']));channels[_0x49894d[_0xd371('0x7')]]={'uniqueid':_0x49894d[_0xd371('0x7')],'accountcode':_0x49894d[_0xd371('0xd')],'source':_0x49894d['calleridnum'],'destination':_0x49894d[_0xd371('0x19')],'destinationcontext':_0x49894d[_0xd371('0x18')],'channel':_0x49894d[_0xd371('0x8')],'starttime':utils[_0xd371('0x1a')](),'answertime':null,'systemanswertime':null,'mohtime':0x0,'disposition':_0xd371('0x2'),'amaflags':_0xd371('0x1b')};}}catch(_0x5225e8){utils['error'](util[_0xd371('0x1c')](_0xd371('0x14'),_0x49894d[_0xd371('0x7')]),_0x5225e8);}};exports[_0xd371('0x1d')]=function(_0x40a367){try{utils['debug'](util[_0xd371('0x1c')](_0xd371('0x1e'),_0x40a367[_0xd371('0x7')]),_0x40a367);if(!_['isNil'](channels[_0x40a367[_0xd371('0x7')]])&&_0x40a367[_0xd371('0x1f')]==0x6){utils[_0xd371('0x16')](util['format'](_0xd371('0x20'),_0x40a367[_0xd371('0x7')],_0x40a367[_0xd371('0x18')],_0x40a367[_0xd371('0x8')]));if(_[_0xd371('0x21')](channels[_0x40a367[_0xd371('0x7')]]['systemanswertime'])){channels[_0x40a367['uniqueid']][_0xd371('0x22')]=utils[_0xd371('0x1a')]();}}else if(!_[_0xd371('0x21')](channels[_0x40a367[_0xd371('0x15')]])&&_0x40a367[_0xd371('0x1f')]==0x6&&_0x40a367[_0xd371('0x18')]!=_0xd371('0x23')){utils[_0xd371('0x16')](util[_0xd371('0x1c')](_0xd371('0x24'),_0x40a367[_0xd371('0x7')],_0x40a367['linkedid'],_0x40a367[_0xd371('0x18')],_0x40a367[_0xd371('0x8')]));channels[_0x40a367['linkedid']][_0xd371('0xd')]=_0x40a367[_0xd371('0xd')];channels[_0x40a367['linkedid']][_0xd371('0x25')]=_0x40a367[_0xd371('0x8')];if(_['isNil'](channels[_0x40a367[_0xd371('0x15')]][_0xd371('0x26')])){channels[_0x40a367[_0xd371('0x15')]][_0xd371('0x26')]=utils['now']();}channels[_0x40a367[_0xd371('0x15')]][_0xd371('0x27')]=dispositions[_[_0xd371('0x28')](_0x40a367[_0xd371('0x1f')])]||_0xd371('0x4');}}catch(_0x4a15d0){utils[_0xd371('0x29')](util['format'](_0xd371('0x1e'),_0x40a367[_0xd371('0x7')]),_0x4a15d0);}};exports[_0xd371('0x2a')]=function(_0x276411){try{if(!_[_0xd371('0x21')](channels[_0x276411[_0xd371('0x7')]])){utils[_0xd371('0x2b')](util['format'](_0xd371('0x2c'),_0x276411['uniqueid']),_0x276411);if(_[_0xd371('0x21')](channels[_0x276411[_0xd371('0x7')]][_0xd371('0x2d')])){channels[_0x276411[_0xd371('0x7')]][_0xd371('0x2d')]=_0x276411['calleridname']+'\x20<'+_0x276411['calleridnum']+'>';}utils[_0xd371('0x16')](util[_0xd371('0x1c')](_0xd371('0x2e'),_0x276411[_0xd371('0x7')],channels[_0x276411[_0xd371('0x7')]][_0xd371('0x2d')],_0x276411[_0xd371('0x2f')]));channels[_0x276411[_0xd371('0x7')]][_0xd371('0x30')]=utils[_0xd371('0x1a')]();channels[_0x276411[_0xd371('0x7')]][_0xd371('0x31')]=utils[_0xd371('0x32')](channels[_0x276411['uniqueid']][_0xd371('0x30')],channels[_0x276411[_0xd371('0x7')]][_0xd371('0x33')]);channels[_0x276411['uniqueid']]['billableseconds']=channels[_0x276411['uniqueid']]['answertime']?utils[_0xd371('0x32')](channels[_0x276411[_0xd371('0x7')]][_0xd371('0x30')],channels[_0x276411[_0xd371('0x7')]][_0xd371('0x26')]):0x0;writeDB(channels[_0x276411[_0xd371('0x7')]]);}}catch(_0xd196cb){utils[_0xd371('0x29')](util[_0xd371('0x1c')](_0xd371('0x2c'),_0x276411[_0xd371('0x7')]),_0xd196cb);}};exports[_0xd371('0x34')]=function(_0x3651fa){try{if(!_[_0xd371('0x21')](channels[_0x3651fa[_0xd371('0x35')]])){utils['debug'](util['format'](_0xd371('0x36'),_0x3651fa[_0xd371('0x37')]),_0x3651fa);if(channels[_0x3651fa[_0xd371('0x35')]][_0xd371('0x8')]==_0x3651fa[_0xd371('0x38')]){utils['info'](util[_0xd371('0x1c')](_0xd371('0x39'),_0x3651fa[_0xd371('0x37')],_0x3651fa[_0xd371('0x35')],_0x3651fa[_0xd371('0x3a')]));channels[_0x3651fa[_0xd371('0x35')]][_0xd371('0x25')]=_0x3651fa['secondtransfererchannel'];channels[_0x3651fa[_0xd371('0x35')]][_0xd371('0x3b')]=_0xd371('0x3c');}else if(channels[_0x3651fa['localtwolinkedid']][_0xd371('0x8')]=_0x3651fa['transfertargetchannel']){utils[_0xd371('0x16')](util['format'](_0xd371('0x39'),_0x3651fa[_0xd371('0x37')],_0x3651fa[_0xd371('0x35')],_0x3651fa['origtransfererchannel']));channels[_0x3651fa[_0xd371('0x35')]][_0xd371('0x25')]=_0x3651fa[_0xd371('0x3d')];channels[_0x3651fa[_0xd371('0x35')]][_0xd371('0x3b')]='_attended';}}}catch(_0xdb57eb){utils[_0xd371('0x29')](util[_0xd371('0x1c')](_0xd371('0x36'),_0x3651fa['origtransfereruniqueid']),_0xdb57eb);}};exports['musiconholdstart']=function(_0x3649bf){try{if(!_[_0xd371('0x21')](channels[_0x3649bf[_0xd371('0x7')]])){utils[_0xd371('0x2b')](util[_0xd371('0x1c')]('[%s][calls][musiconholdstart]',_0x3649bf[_0xd371('0x7')]),_0x3649bf);channels[_0x3649bf[_0xd371('0x7')]][_0xd371('0x3e')]=utils['now']();utils[_0xd371('0x16')](util[_0xd371('0x1c')]('[%s][calls][musiconholdstart]\x20musiconholdstartAt:%s',_0x3649bf[_0xd371('0x7')],channels[_0x3649bf[_0xd371('0x7')]][_0xd371('0x3e')]));}}catch(_0x40bc14){utils['error'](util[_0xd371('0x1c')]('[%s][calls][musiconholdstart]',_0x3649bf[_0xd371('0x7')]),_0x40bc14);}};exports[_0xd371('0x3f')]=function(_0x33d7d7){try{if(!_['isNil'](channels[_0x33d7d7[_0xd371('0x7')]])){utils[_0xd371('0x2b')](util['format']('[%s][calls][musiconholdstop]',_0x33d7d7['uniqueid']),_0x33d7d7);if(!_[_0xd371('0x21')](channels[_0x33d7d7[_0xd371('0x7')]]['musiconholdstartAt'])){channels[_0x33d7d7[_0xd371('0x7')]][_0xd371('0x40')]+=utils[_0xd371('0x32')](utils[_0xd371('0x1a')](),channels[_0x33d7d7[_0xd371('0x7')]][_0xd371('0x3e')]);utils[_0xd371('0x16')](util[_0xd371('0x1c')](_0xd371('0x41'),_0x33d7d7[_0xd371('0x7')],channels[_0x33d7d7[_0xd371('0x7')]][_0xd371('0x40')]));delete channels[_0x33d7d7[_0xd371('0x7')]][_0xd371('0x3e')];}}}catch(_0xa1c3ed){utils['error'](util[_0xd371('0x1c')](_0xd371('0x42'),_0x33d7d7[_0xd371('0x7')]),_0xa1c3ed);}};exports[_0xd371('0x43')]=function(_0x5b2d26){try{if(!_['isNil'](channels[_0x5b2d26[_0xd371('0x7')]])){utils[_0xd371('0x2b')](util['format'](_0xd371('0x44'),_0x5b2d26[_0xd371('0x7')]),_0x5b2d26);if(!_[_0xd371('0x21')](_0x5b2d26[_0xd371('0x45')][_0xd371('0x46')])){utils['info'](util[_0xd371('0x1c')]('[%s][calls][varset]\x20variable:xmd-originatecalleridnum\x20value:%s',_0x5b2d26[_0xd371('0x7')],_0x5b2d26['value']));channels[_0x5b2d26['uniqueid']][_0xd371('0x47')]=_0x5b2d26[_0xd371('0x48')];}if(!_[_0xd371('0x21')](_0x5b2d26[_0xd371('0x45')][_0xd371('0x49')])){utils['info'](util['format'](_0xd371('0x4a'),_0x5b2d26[_0xd371('0x7')],_0x5b2d26[_0xd371('0x48')]));channels[_0x5b2d26[_0xd371('0x7')]][_0xd371('0x4b')]=_0x5b2d26['value'];channels[_0x5b2d26[_0xd371('0x7')]][_0xd371('0x2d')]='\x22'+_0x5b2d26[_0xd371('0x48')]+'\x22\x20<'+_0x5b2d26['value']+'>';}if(!_[_0xd371('0x21')](_0x5b2d26[_0xd371('0x45')][_0xd371('0x4c')])||!_[_0xd371('0x21')](_0x5b2d26[_0xd371('0x45')][_0xd371('0x4d')])){utils['info'](util[_0xd371('0x1c')](_0xd371('0x4e'),_0x5b2d26[_0xd371('0x7')],!_[_0xd371('0x21')](_0x5b2d26[_0xd371('0x45')][_0xd371('0x4c')])?_0xd371('0x4c'):_0xd371('0x4d'),_0x5b2d26[_0xd371('0x48')]));channels[_0x5b2d26[_0xd371('0x7')]][_0xd371('0x2d')]=_0x5b2d26['value'];}if(!_[_0xd371('0x21')](_0x5b2d26[_0xd371('0x45')][_0xd371('0x4f')])||!_[_0xd371('0x21')](_0x5b2d26[_0xd371('0x45')]['xmcs-queue'])){utils['info'](util[_0xd371('0x1c')](_0xd371('0x4e'),_0x5b2d26[_0xd371('0x7')],!_[_0xd371('0x21')](_0x5b2d26['variable'][_0xd371('0x4f')])?_0xd371('0x4f'):_0xd371('0x50'),_0x5b2d26[_0xd371('0x48')]));channels[_0x5b2d26[_0xd371('0x7')]][_0xd371('0x51')]='Queue';channels[_0x5b2d26[_0xd371('0x7')]][_0xd371('0x52')]=_0x5b2d26[_0xd371('0x48')];channels[_0x5b2d26[_0xd371('0x7')]]['queue']=!![];}if(!_[_0xd371('0x21')](_0x5b2d26[_0xd371('0x45')][_0xd371('0x53')])){utils[_0xd371('0x16')](util['format'](_0xd371('0x54'),_0x5b2d26[_0xd371('0x7')],_0x5b2d26[_0xd371('0x48')]));channels[_0x5b2d26[_0xd371('0x7')]][_0xd371('0x55')]=_0x5b2d26[_0xd371('0x48')];}if(!_[_0xd371('0x21')](_0x5b2d26[_0xd371('0x45')]['xmd-cdrtype'])){utils[_0xd371('0x16')](util[_0xd371('0x1c')](_0xd371('0x56'),_0x5b2d26['uniqueid'],_0x5b2d26[_0xd371('0x48')]));channels[_0x5b2d26[_0xd371('0x7')]][_0xd371('0x57')]=_0x5b2d26[_0xd371('0x48')];}if(!_['isNil'](_0x5b2d26[_0xd371('0x45')][_0xd371('0x58')])){utils[_0xd371('0x16')](util[_0xd371('0x1c')](_0xd371('0x59'),_0x5b2d26[_0xd371('0x7')],_0x5b2d26[_0xd371('0x48')]));channels[_0x5b2d26[_0xd371('0x7')]][_0xd371('0x5a')]=_0x5b2d26[_0xd371('0x48')];}if(!_[_0xd371('0x21')](_0x5b2d26['variable'][_0xd371('0x5b')])){utils[_0xd371('0x16')](util[_0xd371('0x1c')]('[%s][calls][varset]\x20variable:sipcallid\x20value:%s',_0x5b2d26[_0xd371('0x7')],_0x5b2d26[_0xd371('0x48')]));channels[_0x5b2d26['uniqueid']][_0xd371('0x5b')]=_0x5b2d26[_0xd371('0x48')];}}}catch(_0x52f5b9){utils[_0xd371('0x29')](util['format']('[%s][calls][varset]',_0x5b2d26[_0xd371('0x7')]),_0x52f5b9);}};exports[_0xd371('0x5c')]=function(_0x35995a){try{if(!_[_0xd371('0x21')](channels[_0x35995a['uniqueid']])){utils[_0xd371('0x2b')](util[_0xd371('0x1c')](_0xd371('0x5d'),_0x35995a['uniqueid']),_0x35995a);utils['info'](util['format']('[%s][calls][newexten]\x20application:%s\x20appdata:%s',_0x35995a[_0xd371('0x7')],_0x35995a[_0xd371('0x5e')],_0x35995a[_0xd371('0x5f')]));if(_0x35995a['application']['toLowerCase']()==_0xd371('0x60')&&_[_0xd371('0x61')](_0x35995a[_0xd371('0x5f')][_0xd371('0x62')](),'cdr')){var _0x47247b=_0x35995a['appdata'][_0xd371('0x63')]('=');var _0x12685f=_0x47247b[0x0]['substring'](_0x47247b[0x0]['lastIndexOf']('(')+0x1,_0x47247b[0x0]['lastIndexOf'](')'));var _0x1827d7=_0x47247b[0x1];channels[_0x35995a[_0xd371('0x7')]][_0x12685f]=_0x1827d7;}if(!_['includes']([_0xd371('0x2a'),_0xd371('0x64'),_0xd371('0x65'),_0xd371('0x60'),'gotoif'],_0x35995a[_0xd371('0x5e')][_0xd371('0x62')]())){channels[_0x35995a[_0xd371('0x7')]]['lastapplication']=_0x35995a[_0xd371('0x5e')];channels[_0x35995a[_0xd371('0x7')]][_0xd371('0x52')]=_0x35995a['appdata'];}}}catch(_0x1dd66c){utils[_0xd371('0x29')](util[_0xd371('0x1c')](_0xd371('0x5d'),_0x35995a['uniqueid']),_0x1dd66c);}};
\ No newline at end of file
+var _0xbfe6=['toNumber','hangup','[%s][calls][hangup]','callerid','calleridname','cause-txt','endtime','duration','diffTime','starttime','attendedtransfer','origtransfereruniqueid','localtwolinkedid','transfereechannel','secondtransfererchannel','userfield','transfertargetchannel','[%s][calls][attendedtransfer]\x20localtwolinkedid:%s\x20destinationchannel:%s','origtransfererchannel','_attended','[%s][calls][attendedtransfer]','musiconholdstart','[%s][calls][musiconholdstart]','musiconholdstartAt','[%s][calls][musiconholdstart]\x20musiconholdstartAt:%s','[%s][calls][musiconholdstop]','mohtime','[%s][calls][musiconholdstop]\x20mohtime:%s','[%s][calls][varset]','variable','xmd-originatecalleridnum','[%s][calls][varset]\x20variable:xmd-originatecalleridnum\x20value:%s','source','value','destination','xmd-callerid-preview','xmd-callerid','[%s][calls][varset]\x20variable:%s\x20value:%s','xmcs-queue','xmd-queue','lastapplication','Queue','lastdata','[%s][calls][varset]\x20variable:xmd-contactid\x20value:%s','ContactId','[%s][calls][varset]\x20variable:xmd-cdrtype\x20value:%s','outboundrouteid','[%s][calls][varset]\x20variable:outboundrouteid\x20value:%s','sipcallid','newexten','[%s][calls][newexten]','[%s][calls][newexten]\x20application:%s\x20appdata:%s','application','toLowerCase','set','appdata','split','substring','lastIndexOf','noop','execif','gotoif','lodash','util','./utils','NO\x20ANSWER','FAILED','ANSWERED','BUSY','info','format','[%s][calls][writeDB]\x20channel:%s\x20queue:%s\x20agent:%s\x20interface:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20lastevent:%s','uniqueid','queue','membername','calleridnum','connectedlinenum','getUserByInternal','accountcode','then','request','CreateVoiceCallReport','newchannel','[%s][calls][newchannel]','linkedid','OutgoingSpoolFailed','[%s][calls][newchannel]\x20context:%s\x20exten:%s','context','exten','now','DOCUMENTATION','error','newstate','debug','isNil','channelstate','[%s][calls][newstate]\x20context:%s\x20channel:%s','channel','systemanswertime','transfer','[%s][calls][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s','destinationchannel','answertime','disposition'];(function(_0x127a60,_0x37f33a){var _0xc1f6a3=function(_0x8ed035){while(--_0x8ed035){_0x127a60['push'](_0x127a60['shift']());}};_0xc1f6a3(++_0x37f33a);}(_0xbfe6,0xa6));var _0x6bfe=function(_0x114294,_0x14e0a3){_0x114294=_0x114294-0x0;var _0x907d61=_0xbfe6[_0x114294];return _0x907d61;};'use strict';var _=require(_0x6bfe('0x0'));var util=require(_0x6bfe('0x1'));var utils=require(_0x6bfe('0x2'));var dispositions=[_0x6bfe('0x3'),'FAILED',_0x6bfe('0x4'),'NO\x20ANSWER',_0x6bfe('0x3'),_0x6bfe('0x3'),_0x6bfe('0x5'),_0x6bfe('0x6'),'FAILED',_0x6bfe('0x4'),_0x6bfe('0x4')];var channels={};function writeDB(_0x1d405c){utils[_0x6bfe('0x7')](util[_0x6bfe('0x8')](_0x6bfe('0x9'),_0x1d405c[_0x6bfe('0xa')],_0x1d405c['channel'],_0x1d405c[_0x6bfe('0xb')],_0x1d405c[_0x6bfe('0xc')],_0x1d405c['interface'],_0x1d405c[_0x6bfe('0xd')],_0x1d405c[_0x6bfe('0xe')],_0x1d405c['lastevent']));if(_0x1d405c['accountcode']){utils[_0x6bfe('0xf')](_0x1d405c[_0x6bfe('0x10')])[_0x6bfe('0x11')](function(_0x3c457c){if(_0x3c457c){_0x1d405c['UserId']=_0x3c457c['id'];}utils[_0x6bfe('0x12')](_0x6bfe('0x13'),_0x1d405c);});}else{utils[_0x6bfe('0x12')](_0x6bfe('0x13'),_0x1d405c);}if(channels[_0x1d405c[_0x6bfe('0xa')]]){delete channels[_0x1d405c[_0x6bfe('0xa')]];}}exports[_0x6bfe('0x14')]=function(_0x34c537){try{utils['debug'](util[_0x6bfe('0x8')](_0x6bfe('0x15'),_0x34c537[_0x6bfe('0xa')]),_0x34c537);if(_0x34c537[_0x6bfe('0xa')]==_0x34c537[_0x6bfe('0x16')]&&_0x34c537['channel']!=_0x6bfe('0x17')){utils[_0x6bfe('0x7')](util[_0x6bfe('0x8')](_0x6bfe('0x18'),_0x34c537[_0x6bfe('0xa')],_0x34c537[_0x6bfe('0x19')],_0x34c537[_0x6bfe('0x1a')]));channels[_0x34c537['uniqueid']]={'uniqueid':_0x34c537['uniqueid'],'accountcode':_0x34c537['accountcode'],'source':_0x34c537['calleridnum'],'destination':_0x34c537[_0x6bfe('0x1a')],'destinationcontext':_0x34c537[_0x6bfe('0x19')],'channel':_0x34c537['channel'],'starttime':utils[_0x6bfe('0x1b')](),'answertime':null,'systemanswertime':null,'mohtime':0x0,'disposition':'NO\x20ANSWER','amaflags':_0x6bfe('0x1c')};}}catch(_0x5656c5){utils[_0x6bfe('0x1d')](util[_0x6bfe('0x8')]('[%s][calls][newchannel]',_0x34c537[_0x6bfe('0xa')]),_0x5656c5);}};exports[_0x6bfe('0x1e')]=function(_0x2c996d){try{utils[_0x6bfe('0x1f')](util[_0x6bfe('0x8')]('[%s][calls][newstate]',_0x2c996d[_0x6bfe('0xa')]),_0x2c996d);if(!_[_0x6bfe('0x20')](channels[_0x2c996d[_0x6bfe('0xa')]])&&_0x2c996d[_0x6bfe('0x21')]==0x6){utils['info'](util[_0x6bfe('0x8')](_0x6bfe('0x22'),_0x2c996d[_0x6bfe('0xa')],_0x2c996d[_0x6bfe('0x19')],_0x2c996d[_0x6bfe('0x23')]));if(_[_0x6bfe('0x20')](channels[_0x2c996d[_0x6bfe('0xa')]][_0x6bfe('0x24')])){channels[_0x2c996d[_0x6bfe('0xa')]][_0x6bfe('0x24')]=utils[_0x6bfe('0x1b')]();}}else if(!_[_0x6bfe('0x20')](channels[_0x2c996d['linkedid']])&&_0x2c996d[_0x6bfe('0x21')]==0x6&&_0x2c996d[_0x6bfe('0x19')]!=_0x6bfe('0x25')){utils[_0x6bfe('0x7')](util[_0x6bfe('0x8')](_0x6bfe('0x26'),_0x2c996d[_0x6bfe('0xa')],_0x2c996d[_0x6bfe('0x16')],_0x2c996d[_0x6bfe('0x19')],_0x2c996d[_0x6bfe('0x23')]));channels[_0x2c996d[_0x6bfe('0x16')]][_0x6bfe('0x10')]=_0x2c996d[_0x6bfe('0x10')];channels[_0x2c996d[_0x6bfe('0x16')]][_0x6bfe('0x27')]=_0x2c996d['channel'];if(_[_0x6bfe('0x20')](channels[_0x2c996d[_0x6bfe('0x16')]][_0x6bfe('0x28')])){channels[_0x2c996d[_0x6bfe('0x16')]]['answertime']=utils['now']();}channels[_0x2c996d[_0x6bfe('0x16')]][_0x6bfe('0x29')]=dispositions[_[_0x6bfe('0x2a')](_0x2c996d['channelstate'])]||_0x6bfe('0x5');}}catch(_0x439285){utils[_0x6bfe('0x1d')](util[_0x6bfe('0x8')]('[%s][calls][newstate]',_0x2c996d[_0x6bfe('0xa')]),_0x439285);}};exports[_0x6bfe('0x2b')]=function(_0x16f0e0){try{if(!_[_0x6bfe('0x20')](channels[_0x16f0e0[_0x6bfe('0xa')]])){utils[_0x6bfe('0x1f')](util['format'](_0x6bfe('0x2c'),_0x16f0e0[_0x6bfe('0xa')]),_0x16f0e0);if(_[_0x6bfe('0x20')](channels[_0x16f0e0[_0x6bfe('0xa')]][_0x6bfe('0x2d')])){channels[_0x16f0e0[_0x6bfe('0xa')]][_0x6bfe('0x2d')]=_0x16f0e0[_0x6bfe('0x2e')]+'\x20<'+_0x16f0e0['calleridnum']+'>';}utils['info'](util['format']('[%s][calls][hangup]\x20callerid:%s\x20reason:%s',_0x16f0e0[_0x6bfe('0xa')],channels[_0x16f0e0[_0x6bfe('0xa')]][_0x6bfe('0x2d')],_0x16f0e0[_0x6bfe('0x2f')]));channels[_0x16f0e0[_0x6bfe('0xa')]][_0x6bfe('0x30')]=utils[_0x6bfe('0x1b')]();channels[_0x16f0e0[_0x6bfe('0xa')]][_0x6bfe('0x31')]=utils[_0x6bfe('0x32')](channels[_0x16f0e0['uniqueid']][_0x6bfe('0x30')],channels[_0x16f0e0['uniqueid']][_0x6bfe('0x33')]);channels[_0x16f0e0['uniqueid']]['billableseconds']=channels[_0x16f0e0[_0x6bfe('0xa')]][_0x6bfe('0x28')]?utils['diffTime'](channels[_0x16f0e0[_0x6bfe('0xa')]][_0x6bfe('0x30')],channels[_0x16f0e0[_0x6bfe('0xa')]]['answertime']):0x0;writeDB(channels[_0x16f0e0[_0x6bfe('0xa')]]);}}catch(_0x5291e5){utils[_0x6bfe('0x1d')](util[_0x6bfe('0x8')](_0x6bfe('0x2c'),_0x16f0e0[_0x6bfe('0xa')]),_0x5291e5);}};exports[_0x6bfe('0x34')]=function(_0x37e1e7){try{if(!_[_0x6bfe('0x20')](channels[_0x37e1e7['localtwolinkedid']])){utils['debug'](util['format']('[%s][calls][attendedtransfer]',_0x37e1e7[_0x6bfe('0x35')]),_0x37e1e7);if(channels[_0x37e1e7[_0x6bfe('0x36')]][_0x6bfe('0x23')]==_0x37e1e7[_0x6bfe('0x37')]){utils[_0x6bfe('0x7')](util[_0x6bfe('0x8')]('[%s][calls][attendedtransfer]\x20localtwolinkedid:%s\x20destinationchannel:%s',_0x37e1e7[_0x6bfe('0x35')],_0x37e1e7['localtwolinkedid'],_0x37e1e7[_0x6bfe('0x38')]));channels[_0x37e1e7[_0x6bfe('0x36')]][_0x6bfe('0x27')]=_0x37e1e7[_0x6bfe('0x38')];channels[_0x37e1e7[_0x6bfe('0x36')]][_0x6bfe('0x39')]='_attended';}else if(channels[_0x37e1e7[_0x6bfe('0x36')]][_0x6bfe('0x23')]=_0x37e1e7[_0x6bfe('0x3a')]){utils['info'](util[_0x6bfe('0x8')](_0x6bfe('0x3b'),_0x37e1e7[_0x6bfe('0x35')],_0x37e1e7[_0x6bfe('0x36')],_0x37e1e7[_0x6bfe('0x3c')]));channels[_0x37e1e7[_0x6bfe('0x36')]][_0x6bfe('0x27')]=_0x37e1e7[_0x6bfe('0x3c')];channels[_0x37e1e7[_0x6bfe('0x36')]][_0x6bfe('0x39')]=_0x6bfe('0x3d');}}}catch(_0x146460){utils[_0x6bfe('0x1d')](util[_0x6bfe('0x8')](_0x6bfe('0x3e'),_0x37e1e7['origtransfereruniqueid']),_0x146460);}};exports[_0x6bfe('0x3f')]=function(_0x7340a2){try{if(!_['isNil'](channels[_0x7340a2[_0x6bfe('0xa')]])){utils[_0x6bfe('0x1f')](util[_0x6bfe('0x8')](_0x6bfe('0x40'),_0x7340a2[_0x6bfe('0xa')]),_0x7340a2);channels[_0x7340a2[_0x6bfe('0xa')]][_0x6bfe('0x41')]=utils[_0x6bfe('0x1b')]();utils[_0x6bfe('0x7')](util[_0x6bfe('0x8')](_0x6bfe('0x42'),_0x7340a2[_0x6bfe('0xa')],channels[_0x7340a2[_0x6bfe('0xa')]][_0x6bfe('0x41')]));}}catch(_0x1f0614){utils[_0x6bfe('0x1d')](util[_0x6bfe('0x8')](_0x6bfe('0x40'),_0x7340a2['uniqueid']),_0x1f0614);}};exports['musiconholdstop']=function(_0x4107cf){try{if(!_[_0x6bfe('0x20')](channels[_0x4107cf[_0x6bfe('0xa')]])){utils[_0x6bfe('0x1f')](util[_0x6bfe('0x8')](_0x6bfe('0x43'),_0x4107cf[_0x6bfe('0xa')]),_0x4107cf);if(!_[_0x6bfe('0x20')](channels[_0x4107cf[_0x6bfe('0xa')]][_0x6bfe('0x41')])){channels[_0x4107cf[_0x6bfe('0xa')]][_0x6bfe('0x44')]+=utils[_0x6bfe('0x32')](utils[_0x6bfe('0x1b')](),channels[_0x4107cf[_0x6bfe('0xa')]]['musiconholdstartAt']);utils[_0x6bfe('0x7')](util['format'](_0x6bfe('0x45'),_0x4107cf[_0x6bfe('0xa')],channels[_0x4107cf[_0x6bfe('0xa')]][_0x6bfe('0x44')]));delete channels[_0x4107cf[_0x6bfe('0xa')]]['musiconholdstartAt'];}}}catch(_0x5dce52){utils['error'](util['format'](_0x6bfe('0x43'),_0x4107cf[_0x6bfe('0xa')]),_0x5dce52);}};exports['varset']=function(_0x3e6e2f){try{if(!_[_0x6bfe('0x20')](channels[_0x3e6e2f[_0x6bfe('0xa')]])){utils[_0x6bfe('0x1f')](util[_0x6bfe('0x8')](_0x6bfe('0x46'),_0x3e6e2f[_0x6bfe('0xa')]),_0x3e6e2f);if(!_[_0x6bfe('0x20')](_0x3e6e2f[_0x6bfe('0x47')][_0x6bfe('0x48')])){utils['info'](util[_0x6bfe('0x8')](_0x6bfe('0x49'),_0x3e6e2f[_0x6bfe('0xa')],_0x3e6e2f['value']));channels[_0x3e6e2f['uniqueid']][_0x6bfe('0x4a')]=_0x3e6e2f[_0x6bfe('0x4b')];}if(!_[_0x6bfe('0x20')](_0x3e6e2f[_0x6bfe('0x47')]['xmd-phone'])){utils[_0x6bfe('0x7')](util[_0x6bfe('0x8')]('[%s][calls][varset]\x20variable:xmd-phone\x20value:%s',_0x3e6e2f[_0x6bfe('0xa')],_0x3e6e2f[_0x6bfe('0x4b')]));channels[_0x3e6e2f[_0x6bfe('0xa')]][_0x6bfe('0x4c')]=_0x3e6e2f[_0x6bfe('0x4b')];channels[_0x3e6e2f[_0x6bfe('0xa')]][_0x6bfe('0x2d')]='\x22'+_0x3e6e2f[_0x6bfe('0x4b')]+'\x22\x20<'+_0x3e6e2f[_0x6bfe('0x4b')]+'>';}if(!_[_0x6bfe('0x20')](_0x3e6e2f[_0x6bfe('0x47')][_0x6bfe('0x4d')])||!_[_0x6bfe('0x20')](_0x3e6e2f['variable'][_0x6bfe('0x4e')])){utils[_0x6bfe('0x7')](util[_0x6bfe('0x8')](_0x6bfe('0x4f'),_0x3e6e2f[_0x6bfe('0xa')],!_[_0x6bfe('0x20')](_0x3e6e2f[_0x6bfe('0x47')][_0x6bfe('0x4d')])?_0x6bfe('0x4d'):_0x6bfe('0x4e'),_0x3e6e2f[_0x6bfe('0x4b')]));channels[_0x3e6e2f[_0x6bfe('0xa')]][_0x6bfe('0x2d')]=_0x3e6e2f[_0x6bfe('0x4b')];}if(!_['isNil'](_0x3e6e2f[_0x6bfe('0x47')]['xmd-queue'])||!_[_0x6bfe('0x20')](_0x3e6e2f[_0x6bfe('0x47')][_0x6bfe('0x50')])){utils[_0x6bfe('0x7')](util[_0x6bfe('0x8')](_0x6bfe('0x4f'),_0x3e6e2f['uniqueid'],!_['isNil'](_0x3e6e2f[_0x6bfe('0x47')]['xmd-queue'])?_0x6bfe('0x51'):_0x6bfe('0x50'),_0x3e6e2f[_0x6bfe('0x4b')]));channels[_0x3e6e2f['uniqueid']][_0x6bfe('0x52')]=_0x6bfe('0x53');channels[_0x3e6e2f['uniqueid']][_0x6bfe('0x54')]=_0x3e6e2f[_0x6bfe('0x4b')];channels[_0x3e6e2f[_0x6bfe('0xa')]][_0x6bfe('0xb')]=!![];}if(!_[_0x6bfe('0x20')](_0x3e6e2f[_0x6bfe('0x47')]['xmd-contactid'])){utils[_0x6bfe('0x7')](util[_0x6bfe('0x8')](_0x6bfe('0x55'),_0x3e6e2f[_0x6bfe('0xa')],_0x3e6e2f[_0x6bfe('0x4b')]));channels[_0x3e6e2f['uniqueid']][_0x6bfe('0x56')]=_0x3e6e2f['value'];}if(!_[_0x6bfe('0x20')](_0x3e6e2f[_0x6bfe('0x47')]['xmd-cdrtype'])){utils[_0x6bfe('0x7')](util['format'](_0x6bfe('0x57'),_0x3e6e2f['uniqueid'],_0x3e6e2f[_0x6bfe('0x4b')]));channels[_0x3e6e2f[_0x6bfe('0xa')]]['type']=_0x3e6e2f[_0x6bfe('0x4b')];}if(!_[_0x6bfe('0x20')](_0x3e6e2f[_0x6bfe('0x47')][_0x6bfe('0x58')])){utils[_0x6bfe('0x7')](util[_0x6bfe('0x8')](_0x6bfe('0x59'),_0x3e6e2f[_0x6bfe('0xa')],_0x3e6e2f[_0x6bfe('0x4b')]));channels[_0x3e6e2f[_0x6bfe('0xa')]]['routeid']=_0x3e6e2f[_0x6bfe('0x4b')];}if(!_['isNil'](_0x3e6e2f[_0x6bfe('0x47')]['sipcallid'])){utils[_0x6bfe('0x7')](util[_0x6bfe('0x8')]('[%s][calls][varset]\x20variable:sipcallid\x20value:%s',_0x3e6e2f[_0x6bfe('0xa')],_0x3e6e2f[_0x6bfe('0x4b')]));channels[_0x3e6e2f['uniqueid']][_0x6bfe('0x5a')]=_0x3e6e2f[_0x6bfe('0x4b')];}}}catch(_0x506307){utils[_0x6bfe('0x1d')](util[_0x6bfe('0x8')](_0x6bfe('0x46'),_0x3e6e2f[_0x6bfe('0xa')]),_0x506307);}};exports[_0x6bfe('0x5b')]=function(_0x45434e){try{if(!_[_0x6bfe('0x20')](channels[_0x45434e[_0x6bfe('0xa')]])){utils[_0x6bfe('0x1f')](util[_0x6bfe('0x8')](_0x6bfe('0x5c'),_0x45434e[_0x6bfe('0xa')]),_0x45434e);utils[_0x6bfe('0x7')](util['format'](_0x6bfe('0x5d'),_0x45434e['uniqueid'],_0x45434e['application'],_0x45434e['appdata']));if(_0x45434e[_0x6bfe('0x5e')][_0x6bfe('0x5f')]()==_0x6bfe('0x60')&&_['startsWith'](_0x45434e[_0x6bfe('0x61')][_0x6bfe('0x5f')](),'cdr')){var _0xc9f2db=_0x45434e[_0x6bfe('0x61')][_0x6bfe('0x62')]('=');var _0x3d5523=_0xc9f2db[0x0][_0x6bfe('0x63')](_0xc9f2db[0x0][_0x6bfe('0x64')]('(')+0x1,_0xc9f2db[0x0][_0x6bfe('0x64')](')'));var _0xba703d=_0xc9f2db[0x1];channels[_0x45434e['uniqueid']][_0x3d5523]=_0xba703d;}if(!_['includes'](['hangup',_0x6bfe('0x65'),_0x6bfe('0x66'),_0x6bfe('0x60'),_0x6bfe('0x67')],_0x45434e[_0x6bfe('0x5e')]['toLowerCase']())){channels[_0x45434e['uniqueid']]['lastapplication']=_0x45434e[_0x6bfe('0x5e')];channels[_0x45434e[_0x6bfe('0xa')]]['lastdata']=_0x45434e[_0x6bfe('0x61')];}}}catch(_0x3de100){utils[_0x6bfe('0x1d')](util[_0x6bfe('0x8')](_0x6bfe('0x5c'),_0x45434e['uniqueid']),_0x3de100);}};
\ No newline at end of file
index 6ac1f69..bc4e304 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x9812=['info','[core]\x20shutdown','fullybooted','error','[core]\x20error','close','[core]\x20close','managerevent','./utils','connect'];(function(_0x1b9a38,_0x81911a){var _0x1d4bc8=function(_0x50b228){while(--_0x50b228){_0x1b9a38['push'](_0x1b9a38['shift']());}};_0x1d4bc8(++_0x81911a);}(_0x9812,0x166));var _0x2981=function(_0x1506d4,_0x60586b){_0x1506d4=_0x1506d4-0x0;var _0x4cb87b=_0x9812[_0x1506d4];return _0x4cb87b;};'use strict';var utils=require(_0x2981('0x0'));exports[_0x2981('0x1')]=function(){utils['info']('[core]\x20connected');};exports['shutdown']=function(){utils[_0x2981('0x2')](_0x2981('0x3'));};exports[_0x2981('0x4')]=function(){utils['info']('[core]\x20fullybooted');};exports[_0x2981('0x5')]=function(_0x11e2cd){utils['error'](_0x2981('0x6'),_0x11e2cd);};exports[_0x2981('0x7')]=function(){utils[_0x2981('0x2')](_0x2981('0x8'));};exports[_0x2981('0x9')]=function(_0x56cb8a){};
\ No newline at end of file
+var _0xf2d8=['[core]\x20shutdown','fullybooted','[core]\x20fullybooted','error','managerevent','./utils','info','[core]\x20connected'];(function(_0x3adf85,_0x430450){var _0x55da44=function(_0x237c4a){while(--_0x237c4a){_0x3adf85['push'](_0x3adf85['shift']());}};_0x55da44(++_0x430450);}(_0xf2d8,0x65));var _0x8f2d=function(_0xeadc11,_0x27e378){_0xeadc11=_0xeadc11-0x0;var _0x4257b6=_0xf2d8[_0xeadc11];return _0x4257b6;};'use strict';var utils=require(_0x8f2d('0x0'));exports['connect']=function(){utils[_0x8f2d('0x1')](_0x8f2d('0x2'));};exports['shutdown']=function(){utils[_0x8f2d('0x1')](_0x8f2d('0x3'));};exports[_0x8f2d('0x4')]=function(){utils[_0x8f2d('0x1')](_0x8f2d('0x5'));};exports['error']=function(_0x28ff85){utils[_0x8f2d('0x6')]('[core]\x20error',_0x28ff85);};exports['close']=function(){utils[_0x8f2d('0x1')]('[core]\x20close');};exports[_0x8f2d('0x7')]=function(_0x26dbb0){};
\ No newline at end of file
index 2821438..d104a55 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd63f=['calleridname','cause-txt','complete','duration','diffTime','endtime','billableseconds','[%s][dials][hangup]','lodash','util','format','dialstring','calleridnum','dialstatus','request','CreateVoiceDialReport','uniqueid','newexten','[%s][dials][newexten]','info','[%s][dials][newexten]\x20application:%s\x20appdata:%s','application','appdata','toLowerCase','startsWith','split','varset','[%s][dials][varset]','variable','outboundrouteid','value','error','dialbegin','isNil','[%s][dials][dialbegin]','starttime','now','lastevent','called','[%s][dials][hangup]\x20starttime:%s\x20lastevent:called','dialend','debug','ANSWER','assign','connect','answertime','[%s][dials][dialend]\x20dialstatus:%s','[%s][dials][dialend]','hangup','[%s][dials][hangup]\x20calleridnum:%s\x20calleridname:%s\x20lastevent:complete\x20reason:%s'];(function(_0x2bdb2f,_0x548aaf){var _0x2de3ce=function(_0x11276d){while(--_0x11276d){_0x2bdb2f['push'](_0x2bdb2f['shift']());}};_0x2de3ce(++_0x548aaf);}(_0xd63f,0x9e));var _0xfd63=function(_0x321bb2,_0x202794){_0x321bb2=_0x321bb2-0x0;var _0x9c12ed=_0xd63f[_0x321bb2];return _0x9c12ed;};'use strict';var _=require(_0xfd63('0x0'));var util=require(_0xfd63('0x1'));var utils=require('./utils');var dials={};function writeDB(_0xe3e766){utils['info'](util[_0xfd63('0x2')]('[%s][dials][writeDB]\x20channel:%s\x20dialstring:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20dialstatus:%s',_0xe3e766['uniqueid'],_0xe3e766['channel'],_0xe3e766[_0xfd63('0x3')],_0xe3e766[_0xfd63('0x4')],_0xe3e766['connectedlinenum'],_0xe3e766[_0xfd63('0x5')]));utils[_0xfd63('0x6')](_0xfd63('0x7'),_0xe3e766);delete dials[_0xe3e766[_0xfd63('0x8')]];}exports[_0xfd63('0x9')]=function(_0x27fef6){try{utils['debug'](util[_0xfd63('0x2')](_0xfd63('0xa'),_0x27fef6[_0xfd63('0x8')]),_0x27fef6);utils[_0xfd63('0xb')](util[_0xfd63('0x2')](_0xfd63('0xc'),_0x27fef6[_0xfd63('0x8')],_0x27fef6[_0xfd63('0xd')],_0x27fef6[_0xfd63('0xe')]));if(_0x27fef6['application'][_0xfd63('0xf')]()=='set'&&_[_0xfd63('0x10')](_0x27fef6[_0xfd63('0xe')][_0xfd63('0xf')](),'cdr(routeid)')){var _0x5a8f67=_0x27fef6[_0xfd63('0xe')][_0xfd63('0x11')]('=');dials[_0x27fef6[_0xfd63('0x8')]]={'routeId':_0x5a8f67[0x1]};}}catch(_0x1a2805){utils['error'](util[_0xfd63('0x2')](_0xfd63('0xa'),_0x27fef6[_0xfd63('0x8')]),_0x1a2805);}};exports[_0xfd63('0x12')]=function(_0x4e4d0c){try{utils['debug'](util[_0xfd63('0x2')](_0xfd63('0x13'),_0x4e4d0c[_0xfd63('0x8')]),_0x4e4d0c);if(!_['isNil'](_0x4e4d0c[_0xfd63('0x14')][_0xfd63('0x15')])){utils[_0xfd63('0xb')](util[_0xfd63('0x2')]('[%s][dials][varset]\x20variable:outboundrouteid\x20value:%s',_0x4e4d0c[_0xfd63('0x8')],_0x4e4d0c['value']));dials[_0x4e4d0c['uniqueid']]={'routeId':_0x4e4d0c[_0xfd63('0x16')]};}}catch(_0x90327){utils[_0xfd63('0x17')](util[_0xfd63('0x2')](_0xfd63('0x13'),_0x4e4d0c[_0xfd63('0x8')]),_0x90327);}};exports[_0xfd63('0x18')]=function(_0x27a714){try{if(!_[_0xfd63('0x19')](dials[_0x27a714[_0xfd63('0x8')]])){utils['debug'](util[_0xfd63('0x2')](_0xfd63('0x1a'),_0x27a714[_0xfd63('0x8')]),_0x27a714);dials[_0x27a714[_0xfd63('0x8')]]=_['assign'](dials[_0x27a714[_0xfd63('0x8')]],_0x27a714);dials[_0x27a714[_0xfd63('0x8')]][_0xfd63('0x1b')]=utils[_0xfd63('0x1c')]();dials[_0x27a714[_0xfd63('0x8')]][_0xfd63('0x1d')]=_0xfd63('0x1e');utils['info'](util[_0xfd63('0x2')](_0xfd63('0x1f'),_0x27a714['uniqueid'],dials[_0x27a714['uniqueid']][_0xfd63('0x1b')]));}}catch(_0x4dcc2f){utils[_0xfd63('0x17')](util[_0xfd63('0x2')](_0xfd63('0x1a'),_0x27a714[_0xfd63('0x8')]),_0x4dcc2f);}};exports[_0xfd63('0x20')]=function(_0x3c130d){try{if(!_[_0xfd63('0x19')](dials[_0x3c130d['uniqueid']])){utils[_0xfd63('0x21')](util[_0xfd63('0x2')]('[%s][dials][dialend]',_0x3c130d['uniqueid']),_0x3c130d);dials[_0x3c130d['uniqueid']][_0xfd63('0x5')]=_0x3c130d[_0xfd63('0x5')];if(_0x3c130d[_0xfd63('0x5')]==_0xfd63('0x22')){dials[_0x3c130d[_0xfd63('0x8')]]=_[_0xfd63('0x23')](dials[_0x3c130d['uniqueid']],_0x3c130d);dials[_0x3c130d[_0xfd63('0x8')]]['answertime']=utils[_0xfd63('0x1c')]();dials[_0x3c130d[_0xfd63('0x8')]][_0xfd63('0x1d')]=_0xfd63('0x24');utils[_0xfd63('0xb')](util['format']('[%s][dials][dialend]\x20dialstatus:%s\x20answertime:%s\x20lastevent:connect',_0x3c130d[_0xfd63('0x8')],_0x3c130d[_0xfd63('0x5')],dials[_0x3c130d['uniqueid']][_0xfd63('0x25')]));}else{utils[_0xfd63('0xb')](util['format'](_0xfd63('0x26'),_0x3c130d[_0xfd63('0x8')],_0x3c130d[_0xfd63('0x5')]));}}}catch(_0x3f2392){utils[_0xfd63('0x17')](util['format'](_0xfd63('0x27'),_0x3c130d[_0xfd63('0x8')]),_0x3f2392);}};exports[_0xfd63('0x28')]=function(_0x43ac0b){try{if(!_[_0xfd63('0x19')](dials[_0x43ac0b['uniqueid']])){utils['debug'](util[_0xfd63('0x2')]('[%s][dials][hangup]',_0x43ac0b[_0xfd63('0x8')]),_0x43ac0b);utils[_0xfd63('0xb')](util['format'](_0xfd63('0x29'),_0x43ac0b['uniqueid'],_0x43ac0b[_0xfd63('0x4')],_0x43ac0b[_0xfd63('0x2a')],_0x43ac0b[_0xfd63('0x2b')]));dials[_0x43ac0b[_0xfd63('0x8')]]=_[_0xfd63('0x23')](dials[_0x43ac0b[_0xfd63('0x8')]],{'endtime':utils[_0xfd63('0x1c')](),'lastevent':_0xfd63('0x2c')});dials[_0x43ac0b['uniqueid']][_0xfd63('0x2d')]=utils[_0xfd63('0x2e')](dials[_0x43ac0b['uniqueid']][_0xfd63('0x2f')],dials[_0x43ac0b['uniqueid']][_0xfd63('0x1b')]);dials[_0x43ac0b['uniqueid']]['holdtime']=utils['diffTime'](dials[_0x43ac0b[_0xfd63('0x8')]][_0xfd63('0x25')]||dials[_0x43ac0b[_0xfd63('0x8')]][_0xfd63('0x2f')],dials[_0x43ac0b['uniqueid']]['starttime']);dials[_0x43ac0b[_0xfd63('0x8')]][_0xfd63('0x30')]=dials[_0x43ac0b[_0xfd63('0x8')]][_0xfd63('0x25')]?utils[_0xfd63('0x2e')](dials[_0x43ac0b[_0xfd63('0x8')]][_0xfd63('0x2f')],dials[_0x43ac0b[_0xfd63('0x8')]]['answertime']):0x0;writeDB(dials[_0x43ac0b[_0xfd63('0x8')]]);}}catch(_0x1a39a2){utils['error'](util['format'](_0xfd63('0x31'),_0x43ac0b[_0xfd63('0x8')]),_0x1a39a2);}};
\ No newline at end of file
+var _0xb997=['holdtime','lodash','./utils','format','[%s][dials][writeDB]\x20channel:%s\x20dialstring:%s\x20calleridnum:%s\x20connectedlinenum:%s\x20dialstatus:%s','channel','dialstring','calleridnum','connectedlinenum','dialstatus','request','uniqueid','newexten','[%s][dials][newexten]','[%s][dials][newexten]\x20application:%s\x20appdata:%s','application','appdata','toLowerCase','startsWith','cdr(routeid)','split','varset','debug','[%s][dials][varset]','isNil','variable','outboundrouteid','info','value','[%s][dials][dialbegin]','now','lastevent','called','[%s][dials][hangup]\x20starttime:%s\x20lastevent:called','starttime','error','[%s][dials][dialend]','ANSWER','assign','answertime','[%s][dials][dialend]\x20dialstatus:%s\x20answertime:%s\x20lastevent:connect','[%s][dials][dialend]\x20dialstatus:%s','hangup','[%s][dials][hangup]','[%s][dials][hangup]\x20calleridnum:%s\x20calleridname:%s\x20lastevent:complete\x20reason:%s','calleridname','cause-txt','complete','diffTime','endtime'];(function(_0x217908,_0x456c70){var _0x4b3ef8=function(_0x5526f5){while(--_0x5526f5){_0x217908['push'](_0x217908['shift']());}};_0x4b3ef8(++_0x456c70);}(_0xb997,0x15f));var _0x7b99=function(_0x4e448b,_0x10dee3){_0x4e448b=_0x4e448b-0x0;var _0x13638d=_0xb997[_0x4e448b];return _0x13638d;};'use strict';var _=require(_0x7b99('0x0'));var util=require('util');var utils=require(_0x7b99('0x1'));var dials={};function writeDB(_0x5cc399){utils['info'](util[_0x7b99('0x2')](_0x7b99('0x3'),_0x5cc399['uniqueid'],_0x5cc399[_0x7b99('0x4')],_0x5cc399[_0x7b99('0x5')],_0x5cc399[_0x7b99('0x6')],_0x5cc399[_0x7b99('0x7')],_0x5cc399[_0x7b99('0x8')]));utils[_0x7b99('0x9')]('CreateVoiceDialReport',_0x5cc399);delete dials[_0x5cc399[_0x7b99('0xa')]];}exports[_0x7b99('0xb')]=function(_0x197965){try{utils['debug'](util[_0x7b99('0x2')](_0x7b99('0xc'),_0x197965[_0x7b99('0xa')]),_0x197965);utils['info'](util['format'](_0x7b99('0xd'),_0x197965['uniqueid'],_0x197965[_0x7b99('0xe')],_0x197965[_0x7b99('0xf')]));if(_0x197965[_0x7b99('0xe')][_0x7b99('0x10')]()=='set'&&_[_0x7b99('0x11')](_0x197965[_0x7b99('0xf')]['toLowerCase'](),_0x7b99('0x12'))){var _0x4de459=_0x197965['appdata'][_0x7b99('0x13')]('=');dials[_0x197965[_0x7b99('0xa')]]={'routeId':_0x4de459[0x1]};}}catch(_0x47a5c6){utils['error'](util['format']('[%s][dials][newexten]',_0x197965[_0x7b99('0xa')]),_0x47a5c6);}};exports[_0x7b99('0x14')]=function(_0x21b708){try{utils[_0x7b99('0x15')](util[_0x7b99('0x2')](_0x7b99('0x16'),_0x21b708[_0x7b99('0xa')]),_0x21b708);if(!_[_0x7b99('0x17')](_0x21b708[_0x7b99('0x18')][_0x7b99('0x19')])){utils[_0x7b99('0x1a')](util[_0x7b99('0x2')]('[%s][dials][varset]\x20variable:outboundrouteid\x20value:%s',_0x21b708['uniqueid'],_0x21b708[_0x7b99('0x1b')]));dials[_0x21b708[_0x7b99('0xa')]]={'routeId':_0x21b708['value']};}}catch(_0x1fda11){utils['error'](util[_0x7b99('0x2')](_0x7b99('0x16'),_0x21b708[_0x7b99('0xa')]),_0x1fda11);}};exports['dialbegin']=function(_0x49de97){try{if(!_['isNil'](dials[_0x49de97[_0x7b99('0xa')]])){utils[_0x7b99('0x15')](util[_0x7b99('0x2')](_0x7b99('0x1c'),_0x49de97[_0x7b99('0xa')]),_0x49de97);dials[_0x49de97['uniqueid']]=_['assign'](dials[_0x49de97[_0x7b99('0xa')]],_0x49de97);dials[_0x49de97[_0x7b99('0xa')]]['starttime']=utils[_0x7b99('0x1d')]();dials[_0x49de97[_0x7b99('0xa')]][_0x7b99('0x1e')]=_0x7b99('0x1f');utils['info'](util[_0x7b99('0x2')](_0x7b99('0x20'),_0x49de97[_0x7b99('0xa')],dials[_0x49de97[_0x7b99('0xa')]][_0x7b99('0x21')]));}}catch(_0x12d3ee){utils[_0x7b99('0x22')](util[_0x7b99('0x2')]('[%s][dials][dialbegin]',_0x49de97[_0x7b99('0xa')]),_0x12d3ee);}};exports['dialend']=function(_0x3a5294){try{if(!_['isNil'](dials[_0x3a5294[_0x7b99('0xa')]])){utils[_0x7b99('0x15')](util[_0x7b99('0x2')](_0x7b99('0x23'),_0x3a5294[_0x7b99('0xa')]),_0x3a5294);dials[_0x3a5294[_0x7b99('0xa')]][_0x7b99('0x8')]=_0x3a5294[_0x7b99('0x8')];if(_0x3a5294[_0x7b99('0x8')]==_0x7b99('0x24')){dials[_0x3a5294['uniqueid']]=_[_0x7b99('0x25')](dials[_0x3a5294[_0x7b99('0xa')]],_0x3a5294);dials[_0x3a5294['uniqueid']][_0x7b99('0x26')]=utils[_0x7b99('0x1d')]();dials[_0x3a5294[_0x7b99('0xa')]][_0x7b99('0x1e')]='connect';utils[_0x7b99('0x1a')](util[_0x7b99('0x2')](_0x7b99('0x27'),_0x3a5294['uniqueid'],_0x3a5294[_0x7b99('0x8')],dials[_0x3a5294[_0x7b99('0xa')]][_0x7b99('0x26')]));}else{utils[_0x7b99('0x1a')](util['format'](_0x7b99('0x28'),_0x3a5294[_0x7b99('0xa')],_0x3a5294['dialstatus']));}}}catch(_0x39e981){utils[_0x7b99('0x22')](util[_0x7b99('0x2')](_0x7b99('0x23'),_0x3a5294['uniqueid']),_0x39e981);}};exports[_0x7b99('0x29')]=function(_0x111b3f){try{if(!_['isNil'](dials[_0x111b3f[_0x7b99('0xa')]])){utils[_0x7b99('0x15')](util['format'](_0x7b99('0x2a'),_0x111b3f[_0x7b99('0xa')]),_0x111b3f);utils[_0x7b99('0x1a')](util[_0x7b99('0x2')](_0x7b99('0x2b'),_0x111b3f[_0x7b99('0xa')],_0x111b3f[_0x7b99('0x6')],_0x111b3f[_0x7b99('0x2c')],_0x111b3f[_0x7b99('0x2d')]));dials[_0x111b3f['uniqueid']]=_[_0x7b99('0x25')](dials[_0x111b3f[_0x7b99('0xa')]],{'endtime':utils[_0x7b99('0x1d')](),'lastevent':_0x7b99('0x2e')});dials[_0x111b3f[_0x7b99('0xa')]]['duration']=utils[_0x7b99('0x2f')](dials[_0x111b3f[_0x7b99('0xa')]][_0x7b99('0x30')],dials[_0x111b3f[_0x7b99('0xa')]]['starttime']);dials[_0x111b3f[_0x7b99('0xa')]][_0x7b99('0x31')]=utils[_0x7b99('0x2f')](dials[_0x111b3f[_0x7b99('0xa')]][_0x7b99('0x26')]||dials[_0x111b3f[_0x7b99('0xa')]]['endtime'],dials[_0x111b3f[_0x7b99('0xa')]][_0x7b99('0x21')]);dials[_0x111b3f[_0x7b99('0xa')]]['billableseconds']=dials[_0x111b3f['uniqueid']][_0x7b99('0x26')]?utils['diffTime'](dials[_0x111b3f[_0x7b99('0xa')]]['endtime'],dials[_0x111b3f['uniqueid']]['answertime']):0x0;writeDB(dials[_0x111b3f[_0x7b99('0xa')]]);}}catch(_0x22d515){utils[_0x7b99('0x22')](util[_0x7b99('0x2')](_0x7b99('0x2a'),_0x111b3f['uniqueid']),_0x22d515);}};
\ No newline at end of file
index c278bd2..bc97a5d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x511c=['debug','format','device','[%s][index][agentcalled]','uniqueid','agentcalled','agentringnoanswer','[%s][index][agentringnoanswer]','agentconnect','[%s][index][agentconnect]','agentcomplete','[%s][index][agentcomplete]','queuecallerabandon','[%s][index][queuecallerabandon]','queuecallerjoin','[%s][index][queuecallerjoin]','queuecallerleave','musiconholdstart','[%s][index][musiconholdstart]','musiconholdstop','[%s][index][musiconholdstop]','newstate','[%s][index][newstate]','[%s][index][hangup]','hangup','cdr','[%s][index][cdr]','blindtransfer','[%s][index][blindtransfer]','attendedtransfer','[%s][index][attendedtransfer]','origtransfereruniqueid','varset','[%s][index][varset]','[%s][index][newexten]','newexten','[%s][index][newchannel]','newchannel','dialbegin','dialend','[%s][index][dialend]','util','xdr','disabled','env','production','local','asterisk','port','keepConnected','info','XDR\x20DISABLED','Asterisk\x20disabled\x20on\x20localhost','./agents.controller','./calls.controller','./recordings.controller','./members.controller','./dials.controller','./transfers.controller','./core.controller','connect','shutdown','fullybooted','error','close','managerevent','devicestatechange'];(function(_0x20f4ab,_0x472de6){var _0x2a391d=function(_0x524eda){while(--_0x524eda){_0x20f4ab['push'](_0x20f4ab['shift']());}};_0x2a391d(++_0x472de6);}(_0x511c,0xaf));var _0xc511=function(_0x45f6e2,_0xe72d77){_0x45f6e2=_0x45f6e2-0x0;var _0x573b09=_0x511c[_0x45f6e2];return _0x573b09;};var AsteriskManager=require('asterisk-manager');var config=require('../../config/environment');var utils=require('./utils');var util=require(_0xc511('0x0'));var isXDREnabled=config[_0xc511('0x1')]&&config[_0xc511('0x1')][_0xc511('0x2')]?!config[_0xc511('0x1')][_0xc511('0x2')]:!![];var isProduction=config[_0xc511('0x3')]===_0xc511('0x4')||![];var isLocalAsterisk=config[_0xc511('0x1')]&&config[_0xc511('0x1')][_0xc511('0x5')]===!![]||![];var ami=new AsteriskManager(config[_0xc511('0x6')][_0xc511('0x7')],config[_0xc511('0x6')]['ip'],config[_0xc511('0x6')]['username'],config[_0xc511('0x6')]['password'],!![]);ami[_0xc511('0x8')]();if(!isXDREnabled){utils[_0xc511('0x9')](_0xc511('0xa'));}else if(!isProduction&&!isLocalAsterisk){utils[_0xc511('0x9')](_0xc511('0xb'));}else{var agents=require(_0xc511('0xc'));var calls=require(_0xc511('0xd'));var queues=require('./queues.controller');var recordings=require(_0xc511('0xe'));var members=require(_0xc511('0xf'));var dials=require(_0xc511('0x10'));var transfers=require(_0xc511('0x11'));var core=require(_0xc511('0x12'));ami['on'](_0xc511('0x13'),core['connect']);ami['on'](_0xc511('0x14'),core['shutdown']);ami['on'](_0xc511('0x15'),core[_0xc511('0x15')]);ami['on'](_0xc511('0x16'),core[_0xc511('0x16')]);ami['on'](_0xc511('0x17'),core[_0xc511('0x17')]);ami['on'](_0xc511('0x18'),core[_0xc511('0x18')]);ami['on'](_0xc511('0x19'),function(_0x101013){try{utils[_0xc511('0x1a')](util[_0xc511('0x1b')]('[%s][index][devicestatechange]',_0x101013[_0xc511('0x1c')]),_0x101013);members[_0xc511('0x19')](_0x101013);}catch(_0x4688a8){utils[_0xc511('0x16')](util['format']('[%s][index][devicestatechange]',_0x101013[_0xc511('0x1c')]),_0x4688a8);}});ami['on']('agentcalled',function(_0x57dc9f){try{utils[_0xc511('0x1a')](util[_0xc511('0x1b')](_0xc511('0x1d'),_0x57dc9f[_0xc511('0x1e')]),_0x57dc9f);agents[_0xc511('0x1f')](_0x57dc9f);}catch(_0x506fd9){utils[_0xc511('0x16')](util['format'](_0xc511('0x1d'),_0x57dc9f[_0xc511('0x1e')]),_0x506fd9);}});ami['on'](_0xc511('0x20'),function(_0x42bdb3){try{utils[_0xc511('0x1a')](util[_0xc511('0x1b')]('[%s][index][agentringnoanswer]',_0x42bdb3[_0xc511('0x1e')]),_0x42bdb3);agents[_0xc511('0x20')](_0x42bdb3);}catch(_0xaa6c7b){utils['error'](util['format'](_0xc511('0x21'),_0x42bdb3[_0xc511('0x1e')]),_0xaa6c7b);}});ami['on'](_0xc511('0x22'),function(_0x283803){try{utils[_0xc511('0x1a')](util[_0xc511('0x1b')](_0xc511('0x23'),_0x283803[_0xc511('0x1e')]),_0x283803);agents[_0xc511('0x22')](_0x283803);queues[_0xc511('0x22')](_0x283803);}catch(_0x258031){utils['error'](util[_0xc511('0x1b')]('[%s][index][agentconnect]',_0x283803[_0xc511('0x1e')]),_0x258031);}});ami['on'](_0xc511('0x24'),function(_0x42b914){try{utils['debug'](util['format'](_0xc511('0x25'),_0x42b914['uniqueid']),_0x42b914);agents[_0xc511('0x24')](_0x42b914);queues[_0xc511('0x24')](_0x42b914);members[_0xc511('0x24')](_0x42b914);}catch(_0x556630){utils[_0xc511('0x16')](util['format']('[%s][index][agentcomplete]',_0x42b914[_0xc511('0x1e')]),_0x556630);}});ami['on'](_0xc511('0x26'),function(_0x3e732c){try{utils[_0xc511('0x1a')](util[_0xc511('0x1b')]('[%s][index][queuecallerabandon]',_0x3e732c[_0xc511('0x1e')]),_0x3e732c);agents['queuecallerabandon'](_0x3e732c);queues[_0xc511('0x26')](_0x3e732c);}catch(_0x2006dc){utils[_0xc511('0x16')](util[_0xc511('0x1b')](_0xc511('0x27'),_0x3e732c[_0xc511('0x1e')]),_0x2006dc);}});ami['on'](_0xc511('0x28'),function(_0x4e0702){try{utils[_0xc511('0x1a')](util['format'](_0xc511('0x29'),_0x4e0702[_0xc511('0x1e')]),_0x4e0702);queues[_0xc511('0x28')](_0x4e0702);recordings[_0xc511('0x28')](_0x4e0702);}catch(_0x45bf5f){utils[_0xc511('0x16')](util[_0xc511('0x1b')](_0xc511('0x29'),_0x4e0702['uniqueid']),_0x45bf5f);}});ami['on'](_0xc511('0x2a'),function(_0x6e455){try{utils['debug'](util['format']('[%s][index][queuecallerleave]',_0x6e455[_0xc511('0x1e')]),_0x6e455);queues[_0xc511('0x2a')](_0x6e455);}catch(_0x28e656){utils['error'](util[_0xc511('0x1b')]('[%s][index][queuecallerleave]',_0x6e455[_0xc511('0x1e')]),_0x28e656);}});ami['on'](_0xc511('0x2b'),function(_0x245446){try{utils['debug'](util[_0xc511('0x1b')]('[%s][index][musiconholdstart]',_0x245446[_0xc511('0x1e')]),_0x245446);queues[_0xc511('0x2b')](_0x245446);calls[_0xc511('0x2b')](_0x245446);}catch(_0x10f61d){utils[_0xc511('0x16')](util[_0xc511('0x1b')](_0xc511('0x2c'),_0x245446[_0xc511('0x1e')]),_0x10f61d);}});ami['on'](_0xc511('0x2d'),function(_0x223af6){try{utils[_0xc511('0x1a')](util[_0xc511('0x1b')]('[%s][index][musiconholdstop]',_0x223af6[_0xc511('0x1e')]),_0x223af6);queues[_0xc511('0x2d')](_0x223af6);calls[_0xc511('0x2d')](_0x223af6);}catch(_0x24ba52){utils[_0xc511('0x16')](util['format'](_0xc511('0x2e'),_0x223af6[_0xc511('0x1e')]),_0x24ba52);}});ami['on'](_0xc511('0x2f'),function(_0x3ea727){try{utils[_0xc511('0x1a')](util[_0xc511('0x1b')]('[%s][index][newstate]',_0x3ea727[_0xc511('0x1e')]),_0x3ea727);calls[_0xc511('0x2f')](_0x3ea727);recordings[_0xc511('0x2f')](_0x3ea727);}catch(_0xd8188d){utils[_0xc511('0x16')](util[_0xc511('0x1b')](_0xc511('0x30'),_0x3ea727[_0xc511('0x1e')]),_0xd8188d);}});ami['on']('hangup',function(_0xfe12ee){try{utils[_0xc511('0x1a')](util['format'](_0xc511('0x31'),_0xfe12ee[_0xc511('0x1e')]),_0xfe12ee);calls['hangup'](_0xfe12ee);recordings['hangup'](_0xfe12ee);dials[_0xc511('0x32')](_0xfe12ee);agents[_0xc511('0x32')](_0xfe12ee);queues['hangup'](_0xfe12ee);}catch(_0x3b54e9){utils[_0xc511('0x16')](util[_0xc511('0x1b')](_0xc511('0x31'),_0xfe12ee[_0xc511('0x1e')]),_0x3b54e9);}});ami['on'](_0xc511('0x33'),function(_0x589939){try{utils[_0xc511('0x1a')](util[_0xc511('0x1b')](_0xc511('0x34'),_0x589939['uniqueid']),_0x589939);members[_0xc511('0x33')](_0x589939);}catch(_0x2213fe){utils[_0xc511('0x16')](util[_0xc511('0x1b')](_0xc511('0x34'),_0x589939[_0xc511('0x1e')]),_0x2213fe);}});ami['on'](_0xc511('0x35'),function(_0x174aca){try{utils[_0xc511('0x1a')](util[_0xc511('0x1b')]('[%s][index][blindtransfer]',_0x174aca[_0xc511('0x1e')]),_0x174aca);queues[_0xc511('0x35')](_0x174aca);agents[_0xc511('0x35')](_0x174aca);transfers[_0xc511('0x35')](_0x174aca);}catch(_0xe143b7){utils[_0xc511('0x16')](util[_0xc511('0x1b')](_0xc511('0x36'),_0x174aca['uniqueid']),_0xe143b7);}});ami['on'](_0xc511('0x37'),function(_0x3741d7){try{utils[_0xc511('0x1a')](util[_0xc511('0x1b')](_0xc511('0x38'),_0x3741d7['origtransfereruniqueid']),_0x3741d7);queues[_0xc511('0x37')](_0x3741d7);transfers['attendedtransfer'](_0x3741d7);agents[_0xc511('0x37')](_0x3741d7);calls[_0xc511('0x37')](_0x3741d7);}catch(_0x1dafe3){utils['error'](util[_0xc511('0x1b')](_0xc511('0x38'),_0x3741d7[_0xc511('0x39')]),_0x1dafe3);}});ami['on'](_0xc511('0x3a'),function(_0x2a30bf){try{utils['debug'](util[_0xc511('0x1b')](_0xc511('0x3b'),_0x2a30bf['uniqueid']),_0x2a30bf);queues['varset'](_0x2a30bf);recordings['varset'](_0x2a30bf);calls[_0xc511('0x3a')](_0x2a30bf);dials[_0xc511('0x3a')](_0x2a30bf);}catch(_0x360389){utils['error'](util['format']('[%s][index][varset]',_0x2a30bf[_0xc511('0x1e')]),_0x360389);}});ami['on']('newexten',function(_0x4fcc73){try{utils[_0xc511('0x1a')](util[_0xc511('0x1b')](_0xc511('0x3c'),_0x4fcc73[_0xc511('0x1e')]),_0x4fcc73);calls['newexten'](_0x4fcc73);recordings[_0xc511('0x3d')](_0x4fcc73);dials[_0xc511('0x3d')](_0x4fcc73);}catch(_0x5db9e8){utils['error'](util[_0xc511('0x1b')]('[%s][index][newexten]',_0x4fcc73[_0xc511('0x1e')]),_0x5db9e8);}});ami['on']('newchannel',function(_0x376ef0){try{utils[_0xc511('0x1a')](util[_0xc511('0x1b')](_0xc511('0x3e'),_0x376ef0[_0xc511('0x1e')]),_0x376ef0);calls[_0xc511('0x3f')](_0x376ef0);recordings[_0xc511('0x3f')](_0x376ef0);}catch(_0x5fef64){utils[_0xc511('0x16')](util[_0xc511('0x1b')](_0xc511('0x3e'),_0x376ef0[_0xc511('0x1e')]),_0x5fef64);}});ami['on'](_0xc511('0x40'),function(_0xb3d3fd){try{utils[_0xc511('0x1a')](util[_0xc511('0x1b')]('[%s][index][dialbegin]',_0xb3d3fd[_0xc511('0x1e')]),_0xb3d3fd);dials['dialbegin'](_0xb3d3fd);}catch(_0x3c9683){utils[_0xc511('0x16')](util[_0xc511('0x1b')]('[%s]dialbegin',_0xb3d3fd['uniqueid']),_0x3c9683);}});ami['on'](_0xc511('0x41'),function(_0x43acff){try{utils[_0xc511('0x1a')](util[_0xc511('0x1b')](_0xc511('0x42'),_0x43acff[_0xc511('0x1e')]),_0x43acff);dials['dialend'](_0x43acff);}catch(_0x29aae0){utils['error'](util['format']('[%s][index][dialend]',_0x43acff[_0xc511('0x1e')]),_0x29aae0);}});}
\ No newline at end of file
+var _0x423a=['[%s][index][queuecallerjoin]','queuecallerjoin','queuecallerleave','[%s][index][queuecallerleave]','musiconholdstart','[%s][index][musiconholdstart]','musiconholdstop','[%s][index][musiconholdstop]','newstate','[%s][index][newstate]','hangup','cdr','[%s][index][cdr]','blindtransfer','[%s][index][blindtransfer]','attendedtransfer','origtransfereruniqueid','[%s][index][attendedtransfer]','[%s][index][varset]','varset','newexten','[%s][index][newexten]','[%s][index][newchannel]','newchannel','[%s]dialbegin','dialend','[%s][index][dialend]','asterisk-manager','./utils','util','xdr','disabled','env','local','port','asterisk','keepConnected','info','XDR\x20DISABLED','Asterisk\x20disabled\x20on\x20localhost','./agents.controller','./queues.controller','./recordings.controller','./members.controller','./transfers.controller','./core.controller','connect','shutdown','fullybooted','error','close','devicestatechange','debug','format','[%s][index][devicestatechange]','device','uniqueid','agentringnoanswer','[%s][index][agentringnoanswer]','agentconnect','[%s][index][agentconnect]','agentcomplete','[%s][index][agentcomplete]','queuecallerabandon','[%s][index][queuecallerabandon]'];(function(_0x437c33,_0x5158cd){var _0x2a3c3e=function(_0x7e0b6b){while(--_0x7e0b6b){_0x437c33['push'](_0x437c33['shift']());}};_0x2a3c3e(++_0x5158cd);}(_0x423a,0x9d));var _0xa423=function(_0x598414,_0x3e2701){_0x598414=_0x598414-0x0;var _0x457052=_0x423a[_0x598414];return _0x457052;};var AsteriskManager=require(_0xa423('0x0'));var config=require('../../config/environment');var utils=require(_0xa423('0x1'));var util=require(_0xa423('0x2'));var isXDREnabled=config[_0xa423('0x3')]&&config['xdr'][_0xa423('0x4')]?!config[_0xa423('0x3')][_0xa423('0x4')]:!![];var isProduction=config[_0xa423('0x5')]==='production'||![];var isLocalAsterisk=config[_0xa423('0x3')]&&config['xdr'][_0xa423('0x6')]===!![]||![];var ami=new AsteriskManager(config['asterisk'][_0xa423('0x7')],config[_0xa423('0x8')]['ip'],config['asterisk']['username'],config['asterisk']['password'],!![]);ami[_0xa423('0x9')]();if(!isXDREnabled){utils[_0xa423('0xa')](_0xa423('0xb'));}else if(!isProduction&&!isLocalAsterisk){utils[_0xa423('0xa')](_0xa423('0xc'));}else{var agents=require(_0xa423('0xd'));var calls=require('./calls.controller');var queues=require(_0xa423('0xe'));var recordings=require(_0xa423('0xf'));var members=require(_0xa423('0x10'));var dials=require('./dials.controller');var transfers=require(_0xa423('0x11'));var core=require(_0xa423('0x12'));ami['on'](_0xa423('0x13'),core[_0xa423('0x13')]);ami['on'](_0xa423('0x14'),core[_0xa423('0x14')]);ami['on'](_0xa423('0x15'),core[_0xa423('0x15')]);ami['on'](_0xa423('0x16'),core[_0xa423('0x16')]);ami['on']('close',core[_0xa423('0x17')]);ami['on']('managerevent',core['managerevent']);ami['on'](_0xa423('0x18'),function(_0x5cd898){try{utils[_0xa423('0x19')](util[_0xa423('0x1a')](_0xa423('0x1b'),_0x5cd898[_0xa423('0x1c')]),_0x5cd898);members[_0xa423('0x18')](_0x5cd898);}catch(_0x3f148b){utils[_0xa423('0x16')](util[_0xa423('0x1a')](_0xa423('0x1b'),_0x5cd898[_0xa423('0x1c')]),_0x3f148b);}});ami['on']('agentcalled',function(_0x26197e){try{utils['debug'](util[_0xa423('0x1a')]('[%s][index][agentcalled]',_0x26197e['uniqueid']),_0x26197e);agents['agentcalled'](_0x26197e);}catch(_0x57b015){utils['error'](util[_0xa423('0x1a')]('[%s][index][agentcalled]',_0x26197e[_0xa423('0x1d')]),_0x57b015);}});ami['on'](_0xa423('0x1e'),function(_0x178536){try{utils[_0xa423('0x19')](util[_0xa423('0x1a')](_0xa423('0x1f'),_0x178536[_0xa423('0x1d')]),_0x178536);agents['agentringnoanswer'](_0x178536);}catch(_0x13b766){utils[_0xa423('0x16')](util[_0xa423('0x1a')](_0xa423('0x1f'),_0x178536['uniqueid']),_0x13b766);}});ami['on'](_0xa423('0x20'),function(_0x3f9037){try{utils[_0xa423('0x19')](util[_0xa423('0x1a')](_0xa423('0x21'),_0x3f9037[_0xa423('0x1d')]),_0x3f9037);agents['agentconnect'](_0x3f9037);queues[_0xa423('0x20')](_0x3f9037);}catch(_0x22a5f1){utils[_0xa423('0x16')](util['format'](_0xa423('0x21'),_0x3f9037[_0xa423('0x1d')]),_0x22a5f1);}});ami['on'](_0xa423('0x22'),function(_0x32b3e1){try{utils['debug'](util[_0xa423('0x1a')](_0xa423('0x23'),_0x32b3e1[_0xa423('0x1d')]),_0x32b3e1);agents[_0xa423('0x22')](_0x32b3e1);queues[_0xa423('0x22')](_0x32b3e1);members[_0xa423('0x22')](_0x32b3e1);}catch(_0x2887fe){utils[_0xa423('0x16')](util[_0xa423('0x1a')]('[%s][index][agentcomplete]',_0x32b3e1[_0xa423('0x1d')]),_0x2887fe);}});ami['on'](_0xa423('0x24'),function(_0x4a3598){try{utils['debug'](util['format']('[%s][index][queuecallerabandon]',_0x4a3598['uniqueid']),_0x4a3598);agents[_0xa423('0x24')](_0x4a3598);queues['queuecallerabandon'](_0x4a3598);}catch(_0x42cee7){utils[_0xa423('0x16')](util[_0xa423('0x1a')](_0xa423('0x25'),_0x4a3598[_0xa423('0x1d')]),_0x42cee7);}});ami['on']('queuecallerjoin',function(_0x2344d4){try{utils[_0xa423('0x19')](util[_0xa423('0x1a')](_0xa423('0x26'),_0x2344d4[_0xa423('0x1d')]),_0x2344d4);queues[_0xa423('0x27')](_0x2344d4);recordings[_0xa423('0x27')](_0x2344d4);}catch(_0x7527cf){utils['error'](util[_0xa423('0x1a')](_0xa423('0x26'),_0x2344d4['uniqueid']),_0x7527cf);}});ami['on'](_0xa423('0x28'),function(_0xa3ed2c){try{utils[_0xa423('0x19')](util[_0xa423('0x1a')](_0xa423('0x29'),_0xa3ed2c[_0xa423('0x1d')]),_0xa3ed2c);queues['queuecallerleave'](_0xa3ed2c);}catch(_0x53dd2a){utils[_0xa423('0x16')](util[_0xa423('0x1a')]('[%s][index][queuecallerleave]',_0xa3ed2c['uniqueid']),_0x53dd2a);}});ami['on'](_0xa423('0x2a'),function(_0x187168){try{utils[_0xa423('0x19')](util['format'](_0xa423('0x2b'),_0x187168[_0xa423('0x1d')]),_0x187168);queues[_0xa423('0x2a')](_0x187168);calls[_0xa423('0x2a')](_0x187168);}catch(_0x11a4f5){utils[_0xa423('0x16')](util[_0xa423('0x1a')](_0xa423('0x2b'),_0x187168[_0xa423('0x1d')]),_0x11a4f5);}});ami['on'](_0xa423('0x2c'),function(_0x5336ec){try{utils[_0xa423('0x19')](util[_0xa423('0x1a')](_0xa423('0x2d'),_0x5336ec[_0xa423('0x1d')]),_0x5336ec);queues[_0xa423('0x2c')](_0x5336ec);calls[_0xa423('0x2c')](_0x5336ec);}catch(_0x34362d){utils[_0xa423('0x16')](util[_0xa423('0x1a')](_0xa423('0x2d'),_0x5336ec[_0xa423('0x1d')]),_0x34362d);}});ami['on']('newstate',function(_0x3f6f3e){try{utils[_0xa423('0x19')](util['format']('[%s][index][newstate]',_0x3f6f3e[_0xa423('0x1d')]),_0x3f6f3e);calls[_0xa423('0x2e')](_0x3f6f3e);recordings[_0xa423('0x2e')](_0x3f6f3e);}catch(_0x5ca1d1){utils[_0xa423('0x16')](util['format'](_0xa423('0x2f'),_0x3f6f3e[_0xa423('0x1d')]),_0x5ca1d1);}});ami['on']('hangup',function(_0x244890){try{utils[_0xa423('0x19')](util['format']('[%s][index][hangup]',_0x244890[_0xa423('0x1d')]),_0x244890);calls['hangup'](_0x244890);recordings[_0xa423('0x30')](_0x244890);dials[_0xa423('0x30')](_0x244890);agents[_0xa423('0x30')](_0x244890);queues[_0xa423('0x30')](_0x244890);}catch(_0x5cd4cd){utils[_0xa423('0x16')](util[_0xa423('0x1a')]('[%s][index][hangup]',_0x244890[_0xa423('0x1d')]),_0x5cd4cd);}});ami['on'](_0xa423('0x31'),function(_0x29edc2){try{utils[_0xa423('0x19')](util[_0xa423('0x1a')](_0xa423('0x32'),_0x29edc2['uniqueid']),_0x29edc2);members[_0xa423('0x31')](_0x29edc2);}catch(_0x54e230){utils[_0xa423('0x16')](util[_0xa423('0x1a')](_0xa423('0x32'),_0x29edc2[_0xa423('0x1d')]),_0x54e230);}});ami['on'](_0xa423('0x33'),function(_0x21a8a0){try{utils[_0xa423('0x19')](util['format'](_0xa423('0x34'),_0x21a8a0[_0xa423('0x1d')]),_0x21a8a0);queues[_0xa423('0x33')](_0x21a8a0);agents[_0xa423('0x33')](_0x21a8a0);transfers['blindtransfer'](_0x21a8a0);}catch(_0x49930d){utils[_0xa423('0x16')](util[_0xa423('0x1a')](_0xa423('0x34'),_0x21a8a0[_0xa423('0x1d')]),_0x49930d);}});ami['on'](_0xa423('0x35'),function(_0x397b57){try{utils[_0xa423('0x19')](util[_0xa423('0x1a')]('[%s][index][attendedtransfer]',_0x397b57[_0xa423('0x36')]),_0x397b57);queues[_0xa423('0x35')](_0x397b57);transfers[_0xa423('0x35')](_0x397b57);agents[_0xa423('0x35')](_0x397b57);calls[_0xa423('0x35')](_0x397b57);}catch(_0x4a8b86){utils[_0xa423('0x16')](util[_0xa423('0x1a')](_0xa423('0x37'),_0x397b57[_0xa423('0x36')]),_0x4a8b86);}});ami['on']('varset',function(_0x74fcf9){try{utils['debug'](util[_0xa423('0x1a')](_0xa423('0x38'),_0x74fcf9[_0xa423('0x1d')]),_0x74fcf9);queues[_0xa423('0x39')](_0x74fcf9);recordings[_0xa423('0x39')](_0x74fcf9);calls[_0xa423('0x39')](_0x74fcf9);dials['varset'](_0x74fcf9);}catch(_0x157fe2){utils['error'](util['format'](_0xa423('0x38'),_0x74fcf9[_0xa423('0x1d')]),_0x157fe2);}});ami['on'](_0xa423('0x3a'),function(_0x2a341f){try{utils[_0xa423('0x19')](util[_0xa423('0x1a')]('[%s][index][newexten]',_0x2a341f[_0xa423('0x1d')]),_0x2a341f);calls[_0xa423('0x3a')](_0x2a341f);recordings[_0xa423('0x3a')](_0x2a341f);dials[_0xa423('0x3a')](_0x2a341f);}catch(_0x499601){utils[_0xa423('0x16')](util[_0xa423('0x1a')](_0xa423('0x3b'),_0x2a341f['uniqueid']),_0x499601);}});ami['on']('newchannel',function(_0xb52de7){try{utils[_0xa423('0x19')](util[_0xa423('0x1a')](_0xa423('0x3c'),_0xb52de7['uniqueid']),_0xb52de7);calls['newchannel'](_0xb52de7);recordings[_0xa423('0x3d')](_0xb52de7);}catch(_0x47458c){utils[_0xa423('0x16')](util[_0xa423('0x1a')](_0xa423('0x3c'),_0xb52de7[_0xa423('0x1d')]),_0x47458c);}});ami['on']('dialbegin',function(_0x1fc4fc){try{utils[_0xa423('0x19')](util[_0xa423('0x1a')]('[%s][index][dialbegin]',_0x1fc4fc['uniqueid']),_0x1fc4fc);dials['dialbegin'](_0x1fc4fc);}catch(_0x1e4f0a){utils[_0xa423('0x16')](util[_0xa423('0x1a')](_0xa423('0x3e'),_0x1fc4fc['uniqueid']),_0x1e4f0a);}});ami['on'](_0xa423('0x3f'),function(_0x3a359d){try{utils[_0xa423('0x19')](util[_0xa423('0x1a')](_0xa423('0x40'),_0x3a359d['uniqueid']),_0x3a359d);dials['dialend'](_0x3a359d);}catch(_0x15b6e3){utils[_0xa423('0x16')](util['format'](_0xa423('0x40'),_0x3a359d[_0xa423('0x1d')]),_0x15b6e3);}});}
\ No newline at end of file
index 1ac5690..ec21337 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x37b4=['[%s][members][writeDB]\x20interface:%s\x20channel:%s\x20data2:%s\x20agent:%s\x20type:%s','uniqueid','data2','type','getUserByInterface','then','name','internal','request','interface','split','CreateMemberReport','catch','some','startsWith','devicestatechange','debug','[%s][members][devicestatechange]','device','INUSE','BUSY','TALKING','now','agent','NOT_INUSE','isNil','exitAt','duration','enterAt','agentcomplete','[%s][members][agentcomplete]','[%s][members][agentcomplete]\x20interface:%s\x20queue:%s','queue','assign','[%s][members][cdr]','channel','data1','source','data3','destination','[%s][members][cdr]\x20type:%s\x20source:%s\x20destination:%s','destinationchannel','error','lodash','./utils','Local/_attended@transfer','Queue:','info','format'];(function(_0x22e751,_0x401a18){var _0x12db93=function(_0x5567f3){while(--_0x5567f3){_0x22e751['push'](_0x22e751['shift']());}};_0x12db93(++_0x401a18);}(_0x37b4,0xef));var _0x437b=function(_0x3eb713,_0x437874){_0x3eb713=_0x3eb713-0x0;var _0x1d7128=_0x37b4[_0x3eb713];return _0x1d7128;};'use strict';var _=require(_0x437b('0x0'));var util=require('util');var utils=require(_0x437b('0x1'));var members={};var exclude=[_0x437b('0x2'),_0x437b('0x3')];function writeDB(_0x5bc1e3){utils[_0x437b('0x4')](util[_0x437b('0x5')](_0x437b('0x6'),_0x5bc1e3[_0x437b('0x7')],_0x5bc1e3['interface'],_0x5bc1e3['channel'],_0x5bc1e3[_0x437b('0x8')],_0x5bc1e3['membername'],_0x5bc1e3[_0x437b('0x9')]));if(_0x5bc1e3['interface']){utils[_0x437b('0xa')](_0x5bc1e3['interface'])[_0x437b('0xb')](function(_0x4eda92){if(_0x4eda92){_0x5bc1e3['membername']=_0x4eda92[_0x437b('0xc')];_0x5bc1e3[_0x437b('0xd')]=_0x4eda92['internal'];utils[_0x437b('0xe')]('CreateMemberReport',_0x5bc1e3);}else{utils['getUserByName'](_0x5bc1e3[_0x437b('0xf')][_0x437b('0x10')]('/')[0x1])[_0x437b('0xb')](function(_0x11e13c){if(_0x11e13c){_0x5bc1e3['membername']=_0x11e13c[_0x437b('0xc')];_0x5bc1e3[_0x437b('0xd')]=_0x11e13c[_0x437b('0xd')];utils['request'](_0x437b('0x11'),_0x5bc1e3);}});}})[_0x437b('0x12')](function(_0x42bcf9){utils['error'](util[_0x437b('0x5')]('[%s][members][writeDB]',_0x5bc1e3[_0x437b('0x7')]),_0x42bcf9);});}delete members[_0x5bc1e3[_0x437b('0xf')]];}function startsWith(_0x3cea79,_0x5f328b){return _[_0x437b('0x13')](_0x3cea79,function(_0x159076){return _[_0x437b('0x14')](_0x5f328b,_0x159076);});}exports[_0x437b('0x15')]=function(_0x1d31af){try{utils[_0x437b('0x16')](util['format'](_0x437b('0x17'),members[_0x1d31af['device']]?members[_0x1d31af[_0x437b('0x18')]][_0x437b('0x7')]:_0x1d31af[_0x437b('0x18')]),_0x1d31af);utils[_0x437b('0x4')](util['format']('[%s][members][devicestatechange]\x20state:%s\x20interface:%s',members[_0x1d31af['device']]?members[_0x1d31af['device']][_0x437b('0x7')]:_0x1d31af[_0x437b('0x18')],_0x1d31af['state'],_0x1d31af[_0x437b('0x18')]));switch(_0x1d31af['state']){case _0x437b('0x19'):case _0x437b('0x1a'):if(!startsWith(exclude,_0x1d31af[_0x437b('0x18')])){members[_0x1d31af['device']]={'channel':'voice','interface':_0x1d31af['device'],'type':_0x437b('0x1b'),'enterAt':utils[_0x437b('0x1c')](),'role':_0x437b('0x1d')};}break;case _0x437b('0x1e'):if(!_[_0x437b('0x1f')](members[_0x1d31af[_0x437b('0x18')]])){members[_0x1d31af[_0x437b('0x18')]][_0x437b('0x20')]=utils[_0x437b('0x1c')]();members[_0x1d31af[_0x437b('0x18')]][_0x437b('0x21')]=utils['diffTime'](members[_0x1d31af[_0x437b('0x18')]][_0x437b('0x20')],members[_0x1d31af[_0x437b('0x18')]][_0x437b('0x22')]);if(members[_0x1d31af[_0x437b('0x18')]]['uniqueid']){writeDB(members[_0x1d31af[_0x437b('0x18')]]);}}break;default:break;}}catch(_0x2dbeb6){utils['error'](util[_0x437b('0x5')]('[%s][members][devicestatechange]',members[_0x1d31af['device']]?members[_0x1d31af['device']][_0x437b('0x7')]:_0x1d31af['device']),_0x2dbeb6);}};exports[_0x437b('0x23')]=function(_0x10b01f){try{if(!_[_0x437b('0x1f')](members[_0x10b01f['interface']])){utils['debug'](util[_0x437b('0x5')](_0x437b('0x24'),_0x10b01f[_0x437b('0x7')]),_0x10b01f);utils[_0x437b('0x4')](util[_0x437b('0x5')](_0x437b('0x25'),_0x10b01f[_0x437b('0x7')],_0x10b01f[_0x437b('0xf')],_0x10b01f[_0x437b('0x26')]));members[_0x10b01f[_0x437b('0xf')]]=_[_0x437b('0x27')](members[_0x10b01f['interface']],{'data4':_0x10b01f[_0x437b('0x26')],'uniqueid':_0x10b01f[_0x437b('0x7')]});}}catch(_0x156773){utils['error'](util[_0x437b('0x5')](_0x437b('0x24'),_0x10b01f[_0x437b('0x7')]),_0x156773);}};exports['cdr']=function(_0x43015d){try{utils['debug'](util[_0x437b('0x5')](_0x437b('0x28'),_0x43015d[_0x437b('0x7')]),_0x43015d);if(_0x43015d[_0x437b('0x29')]){var _0x385a1d=_0x43015d[_0x437b('0x29')]['split']('-')[0x0];if(!_[_0x437b('0x1f')](members[_0x385a1d])){members[_0x385a1d]=_[_0x437b('0x27')](members[_0x385a1d],{'data1':members[_0x385a1d][_0x437b('0x2a')]||_0x43015d[_0x437b('0x9')],'data2':members[_0x385a1d][_0x437b('0x8')]||_0x43015d[_0x437b('0x2b')],'data3':members[_0x385a1d][_0x437b('0x2c')]||_0x43015d[_0x437b('0x2d')],'uniqueid':members[_0x385a1d][_0x437b('0x7')]||_0x43015d[_0x437b('0x7')]});utils[_0x437b('0x4')](util['format'](_0x437b('0x2e'),_0x43015d['uniqueid'],members[_0x385a1d][_0x437b('0x2a')],members[_0x385a1d]['data2'],members[_0x385a1d]['data3']));if(members[_0x385a1d][_0x437b('0x20')]){writeDB(members[_0x385a1d]);}}}if(_0x43015d[_0x437b('0x2f')]){var _0x3c1615=_0x43015d[_0x437b('0x2f')]['split']('-')[0x0];if(!_[_0x437b('0x1f')](members[_0x3c1615])){members[_0x3c1615]=_[_0x437b('0x27')](members[_0x3c1615],{'data1':members[_0x3c1615][_0x437b('0x2a')]||_0x43015d[_0x437b('0x9')],'data2':members[_0x3c1615]['data2']||_0x43015d['source'],'data3':members[_0x3c1615]['data3']||_0x43015d[_0x437b('0x2d')],'uniqueid':members[_0x3c1615][_0x437b('0x7')]||_0x43015d[_0x437b('0x7')]});utils[_0x437b('0x4')](util[_0x437b('0x5')](_0x437b('0x2e'),_0x43015d['uniqueid'],members[_0x3c1615][_0x437b('0x2a')],members[_0x3c1615][_0x437b('0x8')],members[_0x3c1615][_0x437b('0x2c')]));if(members[_0x3c1615]['exitAt']){writeDB(members[_0x3c1615]);}}}}catch(_0x34aee7){utils[_0x437b('0x30')](util['format']('[%s][members][cdr]',_0x43015d['uniqueid']),_0x34aee7);}};
\ No newline at end of file
+var _0x207d=['agent','NOT_INUSE','isNil','exitAt','duration','diffTime','agentcomplete','debug','[%s][members][agentcomplete]\x20interface:%s\x20queue:%s','queue','assign','[%s][members][agentcomplete]','data1','source','data3','destination','destinationchannel','[%s][members][cdr]\x20type:%s\x20source:%s\x20destination:%s','[%s][members][cdr]','lodash','util','./utils','Local/_attended@transfer','format','[%s][members][writeDB]\x20interface:%s\x20channel:%s\x20data2:%s\x20agent:%s\x20type:%s','interface','channel','data2','membername','type','getUserByInterface','then','internal','request','split','CreateMemberReport','catch','error','[%s][members][writeDB]','uniqueid','startsWith','devicestatechange','[%s][members][devicestatechange]','device','info','state','INUSE','BUSY','TALKING','now'];(function(_0x439b2b,_0x32235d){var _0x19ad78=function(_0x4f3fec){while(--_0x4f3fec){_0x439b2b['push'](_0x439b2b['shift']());}};_0x19ad78(++_0x32235d);}(_0x207d,0x10d));var _0xd207=function(_0x45d75f,_0xd5c46b){_0x45d75f=_0x45d75f-0x0;var _0x17bef9=_0x207d[_0x45d75f];return _0x17bef9;};'use strict';var _=require(_0xd207('0x0'));var util=require(_0xd207('0x1'));var utils=require(_0xd207('0x2'));var members={};var exclude=[_0xd207('0x3'),'Queue:'];function writeDB(_0xbc74a3){utils['info'](util[_0xd207('0x4')](_0xd207('0x5'),_0xbc74a3['uniqueid'],_0xbc74a3[_0xd207('0x6')],_0xbc74a3[_0xd207('0x7')],_0xbc74a3[_0xd207('0x8')],_0xbc74a3[_0xd207('0x9')],_0xbc74a3[_0xd207('0xa')]));if(_0xbc74a3[_0xd207('0x6')]){utils[_0xd207('0xb')](_0xbc74a3[_0xd207('0x6')])[_0xd207('0xc')](function(_0x440d20){if(_0x440d20){_0xbc74a3[_0xd207('0x9')]=_0x440d20['name'];_0xbc74a3[_0xd207('0xd')]=_0x440d20[_0xd207('0xd')];utils[_0xd207('0xe')]('CreateMemberReport',_0xbc74a3);}else{utils['getUserByName'](_0xbc74a3[_0xd207('0x6')][_0xd207('0xf')]('/')[0x1])[_0xd207('0xc')](function(_0x5f15c5){if(_0x5f15c5){_0xbc74a3[_0xd207('0x9')]=_0x5f15c5['name'];_0xbc74a3['internal']=_0x5f15c5['internal'];utils[_0xd207('0xe')](_0xd207('0x10'),_0xbc74a3);}});}})[_0xd207('0x11')](function(_0x1f6a3e){utils[_0xd207('0x12')](util[_0xd207('0x4')](_0xd207('0x13'),_0xbc74a3[_0xd207('0x14')]),_0x1f6a3e);});}delete members[_0xbc74a3[_0xd207('0x6')]];}function startsWith(_0x2ab263,_0x1c5a1d){return _['some'](_0x2ab263,function(_0x540c2d){return _[_0xd207('0x15')](_0x1c5a1d,_0x540c2d);});}exports[_0xd207('0x16')]=function(_0x38e8e8){try{utils['debug'](util['format'](_0xd207('0x17'),members[_0x38e8e8[_0xd207('0x18')]]?members[_0x38e8e8[_0xd207('0x18')]][_0xd207('0x14')]:_0x38e8e8['device']),_0x38e8e8);utils[_0xd207('0x19')](util['format']('[%s][members][devicestatechange]\x20state:%s\x20interface:%s',members[_0x38e8e8[_0xd207('0x18')]]?members[_0x38e8e8[_0xd207('0x18')]][_0xd207('0x14')]:_0x38e8e8[_0xd207('0x18')],_0x38e8e8[_0xd207('0x1a')],_0x38e8e8[_0xd207('0x18')]));switch(_0x38e8e8[_0xd207('0x1a')]){case _0xd207('0x1b'):case _0xd207('0x1c'):if(!startsWith(exclude,_0x38e8e8[_0xd207('0x18')])){members[_0x38e8e8['device']]={'channel':'voice','interface':_0x38e8e8['device'],'type':_0xd207('0x1d'),'enterAt':utils[_0xd207('0x1e')](),'role':_0xd207('0x1f')};}break;case _0xd207('0x20'):if(!_[_0xd207('0x21')](members[_0x38e8e8['device']])){members[_0x38e8e8[_0xd207('0x18')]][_0xd207('0x22')]=utils['now']();members[_0x38e8e8[_0xd207('0x18')]][_0xd207('0x23')]=utils[_0xd207('0x24')](members[_0x38e8e8[_0xd207('0x18')]]['exitAt'],members[_0x38e8e8[_0xd207('0x18')]]['enterAt']);if(members[_0x38e8e8[_0xd207('0x18')]][_0xd207('0x14')]){writeDB(members[_0x38e8e8[_0xd207('0x18')]]);}}break;default:break;}}catch(_0x2f88e8){utils[_0xd207('0x12')](util[_0xd207('0x4')]('[%s][members][devicestatechange]',members[_0x38e8e8[_0xd207('0x18')]]?members[_0x38e8e8[_0xd207('0x18')]][_0xd207('0x14')]:_0x38e8e8[_0xd207('0x18')]),_0x2f88e8);}};exports[_0xd207('0x25')]=function(_0x65c87a){try{if(!_[_0xd207('0x21')](members[_0x65c87a[_0xd207('0x6')]])){utils[_0xd207('0x26')](util[_0xd207('0x4')]('[%s][members][agentcomplete]',_0x65c87a[_0xd207('0x14')]),_0x65c87a);utils[_0xd207('0x19')](util[_0xd207('0x4')](_0xd207('0x27'),_0x65c87a[_0xd207('0x14')],_0x65c87a['interface'],_0x65c87a[_0xd207('0x28')]));members[_0x65c87a[_0xd207('0x6')]]=_[_0xd207('0x29')](members[_0x65c87a[_0xd207('0x6')]],{'data4':_0x65c87a[_0xd207('0x28')],'uniqueid':_0x65c87a[_0xd207('0x14')]});}}catch(_0x336e0b){utils[_0xd207('0x12')](util[_0xd207('0x4')](_0xd207('0x2a'),_0x65c87a['uniqueid']),_0x336e0b);}};exports['cdr']=function(_0x5304a6){try{utils[_0xd207('0x26')](util[_0xd207('0x4')]('[%s][members][cdr]',_0x5304a6[_0xd207('0x14')]),_0x5304a6);if(_0x5304a6['channel']){var _0xdeed24=_0x5304a6[_0xd207('0x7')][_0xd207('0xf')]('-')[0x0];if(!_[_0xd207('0x21')](members[_0xdeed24])){members[_0xdeed24]=_[_0xd207('0x29')](members[_0xdeed24],{'data1':members[_0xdeed24][_0xd207('0x2b')]||_0x5304a6[_0xd207('0xa')],'data2':members[_0xdeed24][_0xd207('0x8')]||_0x5304a6[_0xd207('0x2c')],'data3':members[_0xdeed24][_0xd207('0x2d')]||_0x5304a6[_0xd207('0x2e')],'uniqueid':members[_0xdeed24][_0xd207('0x14')]||_0x5304a6[_0xd207('0x14')]});utils[_0xd207('0x19')](util[_0xd207('0x4')]('[%s][members][cdr]\x20type:%s\x20source:%s\x20destination:%s',_0x5304a6[_0xd207('0x14')],members[_0xdeed24][_0xd207('0x2b')],members[_0xdeed24]['data2'],members[_0xdeed24][_0xd207('0x2d')]));if(members[_0xdeed24][_0xd207('0x22')]){writeDB(members[_0xdeed24]);}}}if(_0x5304a6[_0xd207('0x2f')]){var _0x53f081=_0x5304a6[_0xd207('0x2f')][_0xd207('0xf')]('-')[0x0];if(!_[_0xd207('0x21')](members[_0x53f081])){members[_0x53f081]=_[_0xd207('0x29')](members[_0x53f081],{'data1':members[_0x53f081][_0xd207('0x2b')]||_0x5304a6[_0xd207('0xa')],'data2':members[_0x53f081][_0xd207('0x8')]||_0x5304a6[_0xd207('0x2c')],'data3':members[_0x53f081]['data3']||_0x5304a6[_0xd207('0x2e')],'uniqueid':members[_0x53f081][_0xd207('0x14')]||_0x5304a6['uniqueid']});utils['info'](util['format'](_0xd207('0x30'),_0x5304a6[_0xd207('0x14')],members[_0x53f081]['data1'],members[_0x53f081][_0xd207('0x8')],members[_0x53f081][_0xd207('0x2d')]));if(members[_0x53f081][_0xd207('0x22')]){writeDB(members[_0x53f081]);}}}}catch(_0x33e3d4){utils[_0xd207('0x12')](util[_0xd207('0x4')](_0xd207('0x31'),_0x5304a6[_0xd207('0x14')]),_0x33e3d4);}};
\ No newline at end of file
index 573ac71..8d19ca0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xdb67=['mohtime','secondtransfereruniqueid','[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererexten','transfertargetlinkedid','transfertargetuniqueid','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','[%s][queues][musiconholdstart]','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','musiconholdstartAt','musiconholdstop','[%s][queues][musiconholdstop]','[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s','lodash','util','./utils','info','format','lastAssignedTo','accountcode','then','request','CreateVoiceQueueReport','transfereduniqueid','uniqueid','queuecallerjoin','debug','[%s][queues][queuecallerjoin]','position','assign','now','error','hangup','isNil','[%s][queues][hangup]','queuecallerabandon','queuecallerexit','queuecallercomplete','queuecallercompleteAt','queuecallerexitreason','COMPLETEDBYAGENT','name','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','queuecallerenterreason','varset','[%s][queues][varset]','queuestatus','queuecallerabandonAt','queuecallerexitAt','value','variable','queueposition','EXITWITHKEY','[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s','[%s][queues][queuecallerabandon]','ABANDONED','[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s','queuecallerleave','[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s','connectedlinenum','connectedlinename','queuecallerleaveAt','holdtime','diffTime','queuecallerjoinAt','count','[%s][queues][queuecallerleave]','agentconnect','[%s][queues][agentconnect]','[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s','membername','destaccountcode','assigned','agentcomplete','[%s][queues][agentcomplete]','reason','transfer','TRANSFER','COMPLETEDBY','toUpperCase','[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s','blindtransfer','transfereeuniqueid','[%s][queues][blindtransfer]','transfertype','transferexten','extension','transferuniqueid','BLINDTRANSFER','[%s][queues][attendedtransfer]','origtransfereruniqueid','origtransfererlinkedid','secondtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','ATTENDED','origtransfererexten','ATTENDEDTRANSFER','transfereelinkedid','clone','calleridnum','calleridname'];(function(_0x5de01f,_0x5a8eb7){var _0x50e509=function(_0x1e6e50){while(--_0x1e6e50){_0x5de01f['push'](_0x5de01f['shift']());}};_0x50e509(++_0x5a8eb7);}(_0xdb67,0x1a6));var _0x7db6=function(_0x1ff477,_0x189728){_0x1ff477=_0x1ff477-0x0;var _0x3dac5d=_0xdb67[_0x1ff477];return _0x3dac5d;};'use strict';var _=require(_0x7db6('0x0'));var util=require(_0x7db6('0x1'));var utils=require(_0x7db6('0x2'));var queues={};function writeDB(_0x12bcac){utils[_0x7db6('0x3')](util[_0x7db6('0x4')]('[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s',_0x12bcac['uniqueid'],_0x12bcac['channel'],_0x12bcac['queue'],_0x12bcac[_0x7db6('0x5')],_0x12bcac['calleridnum'],_0x12bcac[_0x7db6('0x6')],_0x12bcac['queuecallerexitreason']));if(_0x12bcac['queue']){utils['getVoiceQueueByName'](_0x12bcac['queue'])[_0x7db6('0x7')](function(_0x27da78){if(_0x27da78){_0x12bcac['type']=_0x27da78['type'];}utils[_0x7db6('0x8')](_0x7db6('0x9'),_0x12bcac);});}else{utils[_0x7db6('0x8')](_0x7db6('0x9'),_0x12bcac);}if(_0x12bcac[_0x7db6('0xa')]){delete queues[_0x12bcac[_0x7db6('0xa')]];}else{delete queues[_0x12bcac[_0x7db6('0xb')]];}}exports[_0x7db6('0xc')]=function(_0x25da94){try{utils[_0x7db6('0xd')](util[_0x7db6('0x4')](_0x7db6('0xe'),_0x25da94[_0x7db6('0xb')]),_0x25da94);utils[_0x7db6('0x3')](util[_0x7db6('0x4')]('[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s',_0x25da94[_0x7db6('0xb')],_0x25da94['queue'],_0x25da94[_0x7db6('0xf')]));queues[_0x25da94[_0x7db6('0xb')]]=_[_0x7db6('0x10')](_0x25da94,{'originalposition':_0x25da94[_0x7db6('0xf')],'queuecallerjoinAt':utils[_0x7db6('0x11')](),'mohtime':0x0});}catch(_0x45710a){utils[_0x7db6('0x12')](util[_0x7db6('0x4')](_0x7db6('0xe'),_0x25da94['uniqueid']),_0x45710a);}};exports[_0x7db6('0x13')]=function(_0x48be1e){try{if(!_[_0x7db6('0x14')](queues[_0x48be1e['uniqueid']])){utils[_0x7db6('0xd')](util[_0x7db6('0x4')](_0x7db6('0x15'),_0x48be1e[_0x7db6('0xb')]),_0x48be1e);if(queues[_0x48be1e[_0x7db6('0xb')]]['queuecallerleaveAt']){if(!queues[_0x48be1e[_0x7db6('0xb')]][_0x7db6('0x16')]&&!queues[_0x48be1e[_0x7db6('0xb')]][_0x7db6('0x17')]){queues[_0x48be1e['uniqueid']][_0x7db6('0x18')]=!![];queues[_0x48be1e[_0x7db6('0xb')]][_0x7db6('0x19')]=utils[_0x7db6('0x11')]();queues[_0x48be1e[_0x7db6('0xb')]][_0x7db6('0x1a')]=_0x7db6('0x1b');}utils[_0x7db6('0x3')](util[_0x7db6('0x4')]('[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s',_0x48be1e[_0x7db6('0xb')],queues[_0x48be1e[_0x7db6('0xb')]][_0x7db6('0x1c')],queues[_0x48be1e['uniqueid']][_0x7db6('0x1a')]));writeDB(queues[_0x48be1e[_0x7db6('0xb')]]);}else if(queues[_0x48be1e[_0x7db6('0xb')]]['transfereduniqueid']){utils[_0x7db6('0x3')](util[_0x7db6('0x4')](_0x7db6('0x1d'),_0x48be1e[_0x7db6('0xb')],queues[_0x48be1e[_0x7db6('0xb')]][_0x7db6('0x1c')],queues[_0x48be1e[_0x7db6('0xb')]][_0x7db6('0xa')]));queues[queues[_0x48be1e[_0x7db6('0xb')]][_0x7db6('0xa')]]=queues[_0x48be1e[_0x7db6('0xb')]];queues[queues[_0x48be1e[_0x7db6('0xb')]]['transfereduniqueid']][_0x7db6('0x1e')]=0x2;delete queues[_0x48be1e[_0x7db6('0xb')]];}}}catch(_0x3ee509){utils[_0x7db6('0x12')](util['format'](_0x7db6('0x15'),_0x48be1e[_0x7db6('0xb')]),_0x3ee509);}};exports[_0x7db6('0x1f')]=function(_0x4ccf61){try{utils['debug'](util['format'](_0x7db6('0x20'),_0x4ccf61['uniqueid']),_0x4ccf61);if(!_[_0x7db6('0x14')](_0x4ccf61['variable'][_0x7db6('0x21')])&&_0x4ccf61['value']['toUpperCase']()!=='CONTINUE'){if(!_[_0x7db6('0x14')](queues[_0x4ccf61['uniqueid']])){queues[_0x4ccf61['uniqueid']][_0x7db6('0x16')]=![];queues[_0x4ccf61[_0x7db6('0xb')]][_0x7db6('0x22')]=null;queues[_0x4ccf61[_0x7db6('0xb')]]['queuecallerexit']=!![];queues[_0x4ccf61[_0x7db6('0xb')]][_0x7db6('0x23')]=utils[_0x7db6('0x11')]();queues[_0x4ccf61[_0x7db6('0xb')]][_0x7db6('0x1a')]=_0x4ccf61[_0x7db6('0x24')]['toUpperCase']();utils[_0x7db6('0x3')](util[_0x7db6('0x4')]('[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s',_0x4ccf61['uniqueid'],queues[_0x4ccf61[_0x7db6('0xb')]][_0x7db6('0x1c')],_0x4ccf61['value'],queues[_0x4ccf61[_0x7db6('0xb')]]['queuecallerexitreason']));writeDB(queues[_0x4ccf61[_0x7db6('0xb')]]);}}else if(!_[_0x7db6('0x14')](_0x4ccf61[_0x7db6('0x25')][_0x7db6('0x26')])){if(!_['isNil'](queues[_0x4ccf61[_0x7db6('0xb')]])&&!queues[_0x4ccf61[_0x7db6('0xb')]][_0x7db6('0x16')]){queues[_0x4ccf61[_0x7db6('0xb')]]['queuecallerabandon']=![];queues[_0x4ccf61[_0x7db6('0xb')]][_0x7db6('0x22')]=null;queues[_0x4ccf61[_0x7db6('0xb')]][_0x7db6('0x17')]=!![];queues[_0x4ccf61[_0x7db6('0xb')]]['queuecallerexitAt']=utils['now']();queues[_0x4ccf61[_0x7db6('0xb')]][_0x7db6('0x1a')]=_0x7db6('0x27');utils['info'](util[_0x7db6('0x4')](_0x7db6('0x28'),_0x4ccf61[_0x7db6('0xb')],queues[_0x4ccf61[_0x7db6('0xb')]]['name'],_0x4ccf61['value'],queues[_0x4ccf61[_0x7db6('0xb')]][_0x7db6('0x1a')]));}}}catch(_0x3e3458){utils[_0x7db6('0x12')](util[_0x7db6('0x4')](_0x7db6('0x20'),_0x4ccf61[_0x7db6('0xb')]),_0x3e3458);}};exports[_0x7db6('0x16')]=function(_0x8c25b2){try{if(!_[_0x7db6('0x14')](queues[_0x8c25b2['uniqueid']])){utils[_0x7db6('0xd')](util[_0x7db6('0x4')](_0x7db6('0x29'),_0x8c25b2[_0x7db6('0xb')]),_0x8c25b2);queues[_0x8c25b2['uniqueid']]['queuecallerexit']=![];queues[_0x8c25b2[_0x7db6('0xb')]]['queuecallerexitAt']=null;queues[_0x8c25b2[_0x7db6('0xb')]]['queuecallerabandon']=!![];queues[_0x8c25b2['uniqueid']][_0x7db6('0x22')]=utils['now']();queues[_0x8c25b2[_0x7db6('0xb')]][_0x7db6('0x1a')]=_0x7db6('0x2a');utils[_0x7db6('0x3')](util[_0x7db6('0x4')](_0x7db6('0x2b'),_0x8c25b2[_0x7db6('0xb')],queues[_0x8c25b2[_0x7db6('0xb')]]['name'],queues[_0x8c25b2[_0x7db6('0xb')]][_0x7db6('0x1a')]));}}catch(_0x2b5fc6){utils[_0x7db6('0x12')](util[_0x7db6('0x4')](_0x7db6('0x29'),_0x8c25b2[_0x7db6('0xb')]),_0x2b5fc6);}};exports[_0x7db6('0x2c')]=function(_0x457b0d){try{if(!_['isNil'](queues[_0x457b0d[_0x7db6('0xb')]])){utils[_0x7db6('0xd')](util[_0x7db6('0x4')]('[%s][queues][queuecallerleave]',_0x457b0d[_0x7db6('0xb')]),_0x457b0d);utils['info'](util[_0x7db6('0x4')](_0x7db6('0x2d'),_0x457b0d[_0x7db6('0xb')],queues[_0x457b0d[_0x7db6('0xb')]]['name'],_0x457b0d[_0x7db6('0x2e')],_0x457b0d[_0x7db6('0x2f')]));queues[_0x457b0d[_0x7db6('0xb')]][_0x7db6('0x2c')]=!![];queues[_0x457b0d[_0x7db6('0xb')]][_0x7db6('0x30')]=utils[_0x7db6('0x11')]();queues[_0x457b0d[_0x7db6('0xb')]][_0x7db6('0x31')]=utils[_0x7db6('0x32')](queues[_0x457b0d[_0x7db6('0xb')]][_0x7db6('0x30')],queues[_0x457b0d[_0x7db6('0xb')]][_0x7db6('0x33')]);queues[_0x457b0d['uniqueid']]['position']=_0x457b0d[_0x7db6('0xf')];queues[_0x457b0d[_0x7db6('0xb')]]['count']=_0x457b0d[_0x7db6('0x34')];queues[_0x457b0d[_0x7db6('0xb')]][_0x7db6('0x2e')]=_0x457b0d[_0x7db6('0x2e')];queues[_0x457b0d['uniqueid']][_0x7db6('0x2f')]=_0x457b0d['connectedlinename'];}}catch(_0x4202c0){utils['error'](util['format'](_0x7db6('0x35'),_0x457b0d['uniqueid']),_0x4202c0);}};exports[_0x7db6('0x36')]=function(_0x29177b){try{if(!_['isNil'](queues[_0x29177b[_0x7db6('0xb')]])){utils[_0x7db6('0xd')](util['format'](_0x7db6('0x37'),_0x29177b[_0x7db6('0xb')]),_0x29177b);utils[_0x7db6('0x3')](util[_0x7db6('0x4')](_0x7db6('0x38'),_0x29177b[_0x7db6('0xb')],queues[_0x29177b[_0x7db6('0xb')]][_0x7db6('0x1c')],_0x29177b[_0x7db6('0x39')],_0x29177b[_0x7db6('0x3a')]));queues[_0x29177b[_0x7db6('0xb')]][_0x7db6('0x16')]=![];queues[_0x29177b['uniqueid']][_0x7db6('0x16')]=![];queues[_0x29177b[_0x7db6('0xb')]][_0x7db6('0x22')]=null;queues[_0x29177b['uniqueid']]['queuecallerexit']=![];queues[_0x29177b['uniqueid']][_0x7db6('0x1a')]=null;queues[_0x29177b[_0x7db6('0xb')]]['queuecallerexitAt']=null;queues[_0x29177b[_0x7db6('0xb')]][_0x7db6('0x3b')]=!![];queues[_0x29177b[_0x7db6('0xb')]][_0x7db6('0x6')]=_0x29177b['destaccountcode'];queues[_0x29177b[_0x7db6('0xb')]]['lastAssignedTo']=_0x29177b['membername'];}}catch(_0x172087){utils['error'](util[_0x7db6('0x4')]('[%s][queues][agentconnect]',_0x29177b[_0x7db6('0xb')]),_0x172087);}};exports[_0x7db6('0x3c')]=function(_0x41265d){try{if(!_[_0x7db6('0x14')](queues[_0x41265d[_0x7db6('0xb')]])){if(queues[_0x41265d['uniqueid']][_0x7db6('0x30')]){utils[_0x7db6('0xd')](util[_0x7db6('0x4')](_0x7db6('0x3d'),_0x41265d['uniqueid']),_0x41265d);queues[_0x41265d[_0x7db6('0xb')]][_0x7db6('0x16')]=![];queues[_0x41265d['uniqueid']][_0x7db6('0x16')]=![];queues[_0x41265d['uniqueid']][_0x7db6('0x22')]=null;queues[_0x41265d[_0x7db6('0xb')]][_0x7db6('0x17')]=![];queues[_0x41265d[_0x7db6('0xb')]][_0x7db6('0x23')]=null;queues[_0x41265d[_0x7db6('0xb')]][_0x7db6('0x3b')]=!![];queues[_0x41265d[_0x7db6('0xb')]][_0x7db6('0x5')]=_0x41265d[_0x7db6('0x39')];queues[_0x41265d['uniqueid']]['queuecallercomplete']=!![];queues[_0x41265d[_0x7db6('0xb')]][_0x7db6('0x19')]=utils[_0x7db6('0x11')]();if(_0x41265d[_0x7db6('0x3e')]==_0x7db6('0x3f')){if(!queues[_0x41265d['uniqueid']][_0x7db6('0x3f')]){queues[_0x41265d[_0x7db6('0xb')]]['queuecallerexitreason']=_0x7db6('0x40');}}else{queues[_0x41265d[_0x7db6('0xb')]][_0x7db6('0x1a')]=_0x7db6('0x41')+_0x41265d[_0x7db6('0x3e')][_0x7db6('0x42')]();}utils[_0x7db6('0x3')](util[_0x7db6('0x4')](_0x7db6('0x43'),_0x41265d[_0x7db6('0xb')],queues[_0x41265d[_0x7db6('0xb')]][_0x7db6('0x1c')],_0x41265d['membername'],queues[_0x41265d[_0x7db6('0xb')]][_0x7db6('0x1a')]));writeDB(queues[_0x41265d[_0x7db6('0xb')]]);}}}catch(_0x586212){utils[_0x7db6('0x12')](util[_0x7db6('0x4')](_0x7db6('0x3d'),_0x41265d[_0x7db6('0xb')]),_0x586212);}};exports[_0x7db6('0x44')]=function(_0x142faa){try{if(!_[_0x7db6('0x14')](queues[_0x142faa[_0x7db6('0x45')]])){utils[_0x7db6('0xd')](util[_0x7db6('0x4')](_0x7db6('0x46'),_0x142faa['uniqueid']),_0x142faa);queues[_0x142faa[_0x7db6('0x45')]]['transfer']=!![];queues[_0x142faa[_0x7db6('0x45')]][_0x7db6('0x47')]='BLIND';queues[_0x142faa[_0x7db6('0x45')]][_0x7db6('0x48')]=_0x142faa[_0x7db6('0x49')];queues[_0x142faa[_0x7db6('0x45')]][_0x7db6('0x4a')]=_0x142faa[_0x7db6('0x45')];queues[_0x142faa[_0x7db6('0x45')]][_0x7db6('0x1a')]=_0x7db6('0x4b');utils[_0x7db6('0x3')](util[_0x7db6('0x4')]('[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER',_0x142faa[_0x7db6('0xb')],queues[_0x142faa[_0x7db6('0x45')]][_0x7db6('0x1c')],_0x142faa[_0x7db6('0x45')],_0x142faa[_0x7db6('0x49')]));}}catch(_0x37252a){utils[_0x7db6('0x12')](util['format'](_0x7db6('0x46'),_0x142faa[_0x7db6('0xb')]),_0x37252a);}};exports['attendedtransfer']=function(_0x3639d7){try{utils['debug'](util['format'](_0x7db6('0x4c'),_0x3639d7[_0x7db6('0x4d')]),_0x3639d7);if(_0x3639d7[_0x7db6('0x4d')]==_0x3639d7[_0x7db6('0x4e')]){if(!_[_0x7db6('0x14')](queues[_0x3639d7[_0x7db6('0x4f')]])){utils['info'](util[_0x7db6('0x4')](_0x7db6('0x50'),_0x3639d7[_0x7db6('0x4d')],queues[_0x3639d7['secondtransfererlinkedid']]['name'],_0x3639d7['origtransfererexten']));queues[_0x3639d7[_0x7db6('0x4f')]][_0x7db6('0x3f')]=!![];queues[_0x3639d7[_0x7db6('0x4f')]][_0x7db6('0x47')]=_0x7db6('0x51');queues[_0x3639d7[_0x7db6('0x4f')]][_0x7db6('0x48')]=_0x3639d7[_0x7db6('0x52')];queues[_0x3639d7[_0x7db6('0x4f')]][_0x7db6('0x4a')]=_0x3639d7[_0x7db6('0x4d')];queues[_0x3639d7[_0x7db6('0x4f')]][_0x7db6('0x1a')]=_0x7db6('0x53');}if(!_[_0x7db6('0x14')](queues[_0x3639d7[_0x7db6('0x4e')]])){if(_0x3639d7[_0x7db6('0x54')]&&queues[_0x3639d7[_0x7db6('0x54')]]){queues[_0x3639d7[_0x7db6('0x54')]][_0x7db6('0x1e')]=0x1;queues[_0x3639d7['transfereeuniqueid']]=_[_0x7db6('0x55')](queues[_0x3639d7[_0x7db6('0x54')]]);queues[_0x3639d7['transfereeuniqueid']][_0x7db6('0xa')]=_0x3639d7['transfertargetuniqueid'];queues[_0x3639d7['transfereeuniqueid']]['queuecallerenterreason']=0x2;queues[_0x3639d7[_0x7db6('0x45')]][_0x7db6('0x56')]=queues[_0x3639d7[_0x7db6('0x4f')]][_0x7db6('0x56')];queues[_0x3639d7[_0x7db6('0x45')]][_0x7db6('0x57')]=queues[_0x3639d7[_0x7db6('0x4f')]][_0x7db6('0x57')];queues[_0x3639d7['transfereeuniqueid']]['queuecallerjoinAt']=utils[_0x7db6('0x11')]();queues[_0x3639d7['transfereeuniqueid']][_0x7db6('0x30')]=utils[_0x7db6('0x11')]();queues[_0x3639d7[_0x7db6('0x45')]][_0x7db6('0x31')]=0x0;queues[_0x3639d7[_0x7db6('0x45')]][_0x7db6('0x58')]=0x0;utils[_0x7db6('0x3')](util[_0x7db6('0x4')]('[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s',_0x3639d7['origtransfereruniqueid'],queues[_0x3639d7[_0x7db6('0x45')]]['name'],queues[_0x3639d7[_0x7db6('0x45')]][_0x7db6('0x56')],queues[_0x3639d7['transfereeuniqueid']][_0x7db6('0x57')]));}else{utils['info'](util[_0x7db6('0x4')]('[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s',_0x3639d7['origtransfereruniqueid'],queues[_0x3639d7[_0x7db6('0x4e')]]['name'],_0x3639d7[_0x7db6('0x4f')]));queues[_0x3639d7[_0x7db6('0x4e')]][_0x7db6('0xa')]=_0x3639d7[_0x7db6('0x4f')];}}}else if(_0x3639d7[_0x7db6('0x59')]==_0x3639d7[_0x7db6('0x4f')]){if(!_[_0x7db6('0x14')](queues[_0x3639d7[_0x7db6('0x4e')]])){utils['info'](util['format'](_0x7db6('0x5a'),_0x3639d7[_0x7db6('0x4d')],queues[_0x3639d7['origtransfererlinkedid']][_0x7db6('0x1c')],_0x3639d7[_0x7db6('0x59')],_0x3639d7[_0x7db6('0x5b')]));queues[_0x3639d7[_0x7db6('0x4e')]][_0x7db6('0x3f')]=!![];queues[_0x3639d7[_0x7db6('0x4e')]][_0x7db6('0x47')]=_0x7db6('0x51');queues[_0x3639d7[_0x7db6('0x4e')]][_0x7db6('0x48')]=_0x3639d7[_0x7db6('0x5b')];queues[_0x3639d7[_0x7db6('0x4e')]][_0x7db6('0x4a')]=_0x3639d7[_0x7db6('0x59')];queues[_0x3639d7[_0x7db6('0x4e')]][_0x7db6('0x1a')]='ATTENDEDTRANSFER';}if(!_[_0x7db6('0x14')](queues[_0x3639d7[_0x7db6('0x4f')]])){if(_0x3639d7[_0x7db6('0x5c')]&&queues[_0x3639d7[_0x7db6('0x5c')]]){queues[_0x3639d7['transfertargetlinkedid']][_0x7db6('0x1e')]=0x1;queues[_0x3639d7[_0x7db6('0x5d')]]=_['clone'](queues[_0x3639d7[_0x7db6('0x5c')]]);queues[_0x3639d7['transfertargetuniqueid']][_0x7db6('0xa')]=_0x3639d7[_0x7db6('0x5d')];queues[_0x3639d7[_0x7db6('0x5d')]][_0x7db6('0x1e')]=0x2;queues[_0x3639d7['transfertargetuniqueid']][_0x7db6('0x56')]=queues[_0x3639d7[_0x7db6('0x4e')]][_0x7db6('0x56')];queues[_0x3639d7[_0x7db6('0x5d')]][_0x7db6('0x57')]=queues[_0x3639d7['origtransfererlinkedid']]['calleridname'];queues[_0x3639d7['transfertargetuniqueid']][_0x7db6('0x33')]=utils['now']();queues[_0x3639d7[_0x7db6('0x5d')]][_0x7db6('0x30')]=utils[_0x7db6('0x11')]();queues[_0x3639d7[_0x7db6('0x5d')]][_0x7db6('0x31')]=0x0;queues[_0x3639d7[_0x7db6('0x5d')]][_0x7db6('0x58')]=0x0;utils[_0x7db6('0x3')](util[_0x7db6('0x4')](_0x7db6('0x5e'),_0x3639d7['origtransfereruniqueid'],queues[_0x3639d7[_0x7db6('0x5d')]][_0x7db6('0x1c')],queues[_0x3639d7[_0x7db6('0x5d')]][_0x7db6('0xa')],queues[_0x3639d7['transfertargetuniqueid']]['calleridnum'],queues[_0x3639d7[_0x7db6('0x5d')]][_0x7db6('0x57')]));}else{utils[_0x7db6('0x3')](util[_0x7db6('0x4')](_0x7db6('0x5f'),_0x3639d7[_0x7db6('0x4d')],queues[_0x3639d7['secondtransfererlinkedid']]['name'],_0x3639d7['origtransfererlinkedid']));queues[_0x3639d7[_0x7db6('0x4f')]][_0x7db6('0xa')]=_0x3639d7[_0x7db6('0x4e')];}}}}catch(_0xd8744b){utils['error'](util[_0x7db6('0x4')]('[%s][queues][attendedtransfer]',_0x3639d7['origtransfereruniqueid']),_0xd8744b);}};exports['musiconholdstart']=function(_0x467bf4){try{if(!_['isNil'](queues[_0x467bf4['uniqueid']])){utils[_0x7db6('0xd')](util['format'](_0x7db6('0x60'),_0x467bf4[_0x7db6('0xb')]),_0x467bf4);queues[_0x467bf4[_0x7db6('0xb')]]['musiconholdstartAt']=utils[_0x7db6('0x11')]();utils[_0x7db6('0x3')](util['format'](_0x7db6('0x61'),_0x467bf4['uniqueid'],queues[_0x467bf4[_0x7db6('0xb')]][_0x7db6('0x1c')],queues[_0x467bf4[_0x7db6('0xb')]][_0x7db6('0x62')]));}}catch(_0x5c7177){utils[_0x7db6('0x12')](util[_0x7db6('0x4')]('[%s][queues][musiconholdstart]',_0x467bf4[_0x7db6('0xb')]),_0x5c7177);}};exports[_0x7db6('0x63')]=function(_0x22bbf6){try{if(!_[_0x7db6('0x14')](queues[_0x22bbf6['uniqueid']])){if(!_[_0x7db6('0x14')](queues[_0x22bbf6[_0x7db6('0xb')]][_0x7db6('0x62')])){utils[_0x7db6('0xd')](util[_0x7db6('0x4')](_0x7db6('0x64'),_0x22bbf6[_0x7db6('0xb')]),_0x22bbf6);queues[_0x22bbf6[_0x7db6('0xb')]]['mohtime']+=utils[_0x7db6('0x32')](utils['now'](),queues[_0x22bbf6['uniqueid']][_0x7db6('0x62')]);utils[_0x7db6('0x3')](util['format'](_0x7db6('0x65'),_0x22bbf6['uniqueid'],queues[_0x22bbf6['uniqueid']][_0x7db6('0x1c')],queues[_0x22bbf6[_0x7db6('0xb')]][_0x7db6('0x58')]));delete queues[_0x22bbf6[_0x7db6('0xb')]]['musiconholdstartAt'];}}}catch(_0xe11d68){utils['error'](util['format'](_0x7db6('0x64'),_0x22bbf6[_0x7db6('0xb')]),_0xe11d68);}};
\ No newline at end of file
+var _0xecce=['queuecallerexitAt','value','variable','queueposition','[%s][queues][varset]\x20name:%s\x20variable:queueposition\x20value:%s\x20queuecallerexitreason:%s','[%s][queues][queuecallerabandon]','ABANDONED','[%s][queues][queuecallerabandon]\x20name:%s\x20queuecallerexitreason:%s','queuecallerleave','[%s][queues][queuecallerleave]','connectedlinenum','connectedlinename','holdtime','diffTime','queuecallerjoinAt','count','agentconnect','[%s][queues][agentconnect]','destaccountcode','assigned','membername','agentcomplete','[%s][queues][agentcomplete]','queuecallercomplete','reason','transfer','TRANSFER','[%s][queues][agentcomplete]\x20name:%s\x20agent:%s\x20queuecallerexitreason:%s','blindtransfer','[%s][queues][blindtransfer]','transfereeuniqueid','transfertype','transferexten','transferuniqueid','[%s][queues][blindtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:BLINDTRANSFER','extension','[%s][queues][attendedtransfer]','origtransfereruniqueid','origtransfererlinkedid','secondtransfererlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','origtransfererexten','ATTENDED','transfereelinkedid','clone','transfertargetuniqueid','calleridname','mohtime','[%s][queues][attendedtransfer]\x20name:%s\x20calleridnum:%s\x20calleridname:%s','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s','secondtransfereruniqueid','[%s][queues][attendedtransfer]\x20name:%s\x20transferuniqueid:%s\x20transferexten:%s\x20queuecallerexitreason:ATTENDEDTRANSFER','secondtransfererexten','ATTENDEDTRANSFER','transfertargetlinkedid','[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s\x20calleridnum:%s\x20calleridname:%s','[%s][queues][musiconholdstart]','musiconholdstartAt','[%s][queues][musiconholdstop]\x20name:%s\x20musiconholdstartAt:%s','musiconholdstop','[%s][queues][musiconholdstop]','lodash','util','format','uniqueid','channel','queue','lastAssignedTo','calleridnum','accountcode','queuecallerexitreason','getVoiceQueueByName','then','type','request','CreateVoiceQueueReport','queuecallerjoin','debug','[%s][queues][queuecallerjoin]','info','[%s][queues][queuecallerjoin]\x20name:%s\x20position:%s','position','assign','now','error','hangup','isNil','[%s][queues][hangup]','queuecallerleaveAt','queuecallerabandon','queuecallerexit','queuecallercompleteAt','COMPLETEDBYAGENT','[%s][queues][hangup]\x20name:%s\x20queuecallerexitreason:%s','name','transfereduniqueid','[%s][queues][hangup]\x20name:%s\x20transfereduniqueid:%s','queuecallerenterreason','varset','[%s][queues][varset]','toUpperCase','queuecallerabandonAt'];(function(_0x49724d,_0x410a6a){var _0xcdc19=function(_0x45599d){while(--_0x45599d){_0x49724d['push'](_0x49724d['shift']());}};_0xcdc19(++_0x410a6a);}(_0xecce,0xa3));var _0xeecc=function(_0x3c504b,_0x437693){_0x3c504b=_0x3c504b-0x0;var _0x2e5354=_0xecce[_0x3c504b];return _0x2e5354;};'use strict';var _=require(_0xeecc('0x0'));var util=require(_0xeecc('0x1'));var utils=require('./utils');var queues={};function writeDB(_0x5c5ab7){utils['info'](util[_0xeecc('0x2')]('[%s][queues][writeDB]\x20channel:%s\x20queue:%s\x20lastAssignedTo:%s\x20calleridnum:%s\x20accountcode:%s\x20queuecallerexitreason:%s',_0x5c5ab7[_0xeecc('0x3')],_0x5c5ab7[_0xeecc('0x4')],_0x5c5ab7[_0xeecc('0x5')],_0x5c5ab7[_0xeecc('0x6')],_0x5c5ab7[_0xeecc('0x7')],_0x5c5ab7[_0xeecc('0x8')],_0x5c5ab7[_0xeecc('0x9')]));if(_0x5c5ab7['queue']){utils[_0xeecc('0xa')](_0x5c5ab7[_0xeecc('0x5')])[_0xeecc('0xb')](function(_0x1213d6){if(_0x1213d6){_0x5c5ab7[_0xeecc('0xc')]=_0x1213d6[_0xeecc('0xc')];}utils[_0xeecc('0xd')]('CreateVoiceQueueReport',_0x5c5ab7);});}else{utils[_0xeecc('0xd')](_0xeecc('0xe'),_0x5c5ab7);}if(_0x5c5ab7['transfereduniqueid']){delete queues[_0x5c5ab7['transfereduniqueid']];}else{delete queues[_0x5c5ab7[_0xeecc('0x3')]];}}exports[_0xeecc('0xf')]=function(_0x5f4fce){try{utils[_0xeecc('0x10')](util['format'](_0xeecc('0x11'),_0x5f4fce[_0xeecc('0x3')]),_0x5f4fce);utils[_0xeecc('0x12')](util[_0xeecc('0x2')](_0xeecc('0x13'),_0x5f4fce[_0xeecc('0x3')],_0x5f4fce[_0xeecc('0x5')],_0x5f4fce[_0xeecc('0x14')]));queues[_0x5f4fce[_0xeecc('0x3')]]=_[_0xeecc('0x15')](_0x5f4fce,{'originalposition':_0x5f4fce[_0xeecc('0x14')],'queuecallerjoinAt':utils[_0xeecc('0x16')](),'mohtime':0x0});}catch(_0x32b684){utils[_0xeecc('0x17')](util['format'](_0xeecc('0x11'),_0x5f4fce[_0xeecc('0x3')]),_0x32b684);}};exports[_0xeecc('0x18')]=function(_0x5d41a7){try{if(!_[_0xeecc('0x19')](queues[_0x5d41a7['uniqueid']])){utils['debug'](util[_0xeecc('0x2')](_0xeecc('0x1a'),_0x5d41a7['uniqueid']),_0x5d41a7);if(queues[_0x5d41a7[_0xeecc('0x3')]][_0xeecc('0x1b')]){if(!queues[_0x5d41a7[_0xeecc('0x3')]][_0xeecc('0x1c')]&&!queues[_0x5d41a7[_0xeecc('0x3')]][_0xeecc('0x1d')]){queues[_0x5d41a7[_0xeecc('0x3')]]['queuecallercomplete']=!![];queues[_0x5d41a7[_0xeecc('0x3')]][_0xeecc('0x1e')]=utils[_0xeecc('0x16')]();queues[_0x5d41a7[_0xeecc('0x3')]][_0xeecc('0x9')]=_0xeecc('0x1f');}utils[_0xeecc('0x12')](util[_0xeecc('0x2')](_0xeecc('0x20'),_0x5d41a7[_0xeecc('0x3')],queues[_0x5d41a7['uniqueid']][_0xeecc('0x21')],queues[_0x5d41a7[_0xeecc('0x3')]][_0xeecc('0x9')]));writeDB(queues[_0x5d41a7[_0xeecc('0x3')]]);}else if(queues[_0x5d41a7[_0xeecc('0x3')]][_0xeecc('0x22')]){utils[_0xeecc('0x12')](util['format'](_0xeecc('0x23'),_0x5d41a7[_0xeecc('0x3')],queues[_0x5d41a7[_0xeecc('0x3')]][_0xeecc('0x21')],queues[_0x5d41a7[_0xeecc('0x3')]][_0xeecc('0x22')]));queues[queues[_0x5d41a7[_0xeecc('0x3')]][_0xeecc('0x22')]]=queues[_0x5d41a7[_0xeecc('0x3')]];queues[queues[_0x5d41a7[_0xeecc('0x3')]]['transfereduniqueid']][_0xeecc('0x24')]=0x2;delete queues[_0x5d41a7[_0xeecc('0x3')]];}}}catch(_0x583f34){utils['error'](util[_0xeecc('0x2')](_0xeecc('0x1a'),_0x5d41a7[_0xeecc('0x3')]),_0x583f34);}};exports[_0xeecc('0x25')]=function(_0x3b1204){try{utils[_0xeecc('0x10')](util[_0xeecc('0x2')](_0xeecc('0x26'),_0x3b1204['uniqueid']),_0x3b1204);if(!_[_0xeecc('0x19')](_0x3b1204['variable']['queuestatus'])&&_0x3b1204['value'][_0xeecc('0x27')]()!=='CONTINUE'){if(!_[_0xeecc('0x19')](queues[_0x3b1204[_0xeecc('0x3')]])){queues[_0x3b1204['uniqueid']]['queuecallerabandon']=![];queues[_0x3b1204['uniqueid']][_0xeecc('0x28')]=null;queues[_0x3b1204['uniqueid']]['queuecallerexit']=!![];queues[_0x3b1204[_0xeecc('0x3')]][_0xeecc('0x29')]=utils[_0xeecc('0x16')]();queues[_0x3b1204[_0xeecc('0x3')]][_0xeecc('0x9')]=_0x3b1204[_0xeecc('0x2a')][_0xeecc('0x27')]();utils[_0xeecc('0x12')](util[_0xeecc('0x2')]('[%s][queues][varset]\x20name:%s\x20variable:queuestatus\x20value:%s\x20queuecallerexitreason:%s',_0x3b1204[_0xeecc('0x3')],queues[_0x3b1204[_0xeecc('0x3')]][_0xeecc('0x21')],_0x3b1204[_0xeecc('0x2a')],queues[_0x3b1204[_0xeecc('0x3')]][_0xeecc('0x9')]));writeDB(queues[_0x3b1204[_0xeecc('0x3')]]);}}else if(!_[_0xeecc('0x19')](_0x3b1204[_0xeecc('0x2b')][_0xeecc('0x2c')])){if(!_[_0xeecc('0x19')](queues[_0x3b1204['uniqueid']])&&!queues[_0x3b1204[_0xeecc('0x3')]][_0xeecc('0x1c')]){queues[_0x3b1204[_0xeecc('0x3')]][_0xeecc('0x1c')]=![];queues[_0x3b1204[_0xeecc('0x3')]][_0xeecc('0x28')]=null;queues[_0x3b1204[_0xeecc('0x3')]]['queuecallerexit']=!![];queues[_0x3b1204['uniqueid']]['queuecallerexitAt']=utils['now']();queues[_0x3b1204[_0xeecc('0x3')]][_0xeecc('0x9')]='EXITWITHKEY';utils[_0xeecc('0x12')](util[_0xeecc('0x2')](_0xeecc('0x2d'),_0x3b1204[_0xeecc('0x3')],queues[_0x3b1204[_0xeecc('0x3')]]['name'],_0x3b1204[_0xeecc('0x2a')],queues[_0x3b1204[_0xeecc('0x3')]][_0xeecc('0x9')]));}}}catch(_0x32b99e){utils[_0xeecc('0x17')](util['format']('[%s][queues][varset]',_0x3b1204['uniqueid']),_0x32b99e);}};exports[_0xeecc('0x1c')]=function(_0x92049d){try{if(!_['isNil'](queues[_0x92049d['uniqueid']])){utils[_0xeecc('0x10')](util[_0xeecc('0x2')](_0xeecc('0x2e'),_0x92049d[_0xeecc('0x3')]),_0x92049d);queues[_0x92049d[_0xeecc('0x3')]][_0xeecc('0x1d')]=![];queues[_0x92049d['uniqueid']]['queuecallerexitAt']=null;queues[_0x92049d['uniqueid']][_0xeecc('0x1c')]=!![];queues[_0x92049d[_0xeecc('0x3')]][_0xeecc('0x28')]=utils[_0xeecc('0x16')]();queues[_0x92049d[_0xeecc('0x3')]]['queuecallerexitreason']=_0xeecc('0x2f');utils['info'](util['format'](_0xeecc('0x30'),_0x92049d[_0xeecc('0x3')],queues[_0x92049d[_0xeecc('0x3')]]['name'],queues[_0x92049d[_0xeecc('0x3')]][_0xeecc('0x9')]));}}catch(_0x244040){utils[_0xeecc('0x17')](util[_0xeecc('0x2')](_0xeecc('0x2e'),_0x92049d[_0xeecc('0x3')]),_0x244040);}};exports[_0xeecc('0x31')]=function(_0x15f6e8){try{if(!_[_0xeecc('0x19')](queues[_0x15f6e8[_0xeecc('0x3')]])){utils[_0xeecc('0x10')](util[_0xeecc('0x2')](_0xeecc('0x32'),_0x15f6e8[_0xeecc('0x3')]),_0x15f6e8);utils[_0xeecc('0x12')](util[_0xeecc('0x2')]('[%s][queues][queuecallerleave]\x20name:%s\x20connectedlinenum:%s\x20connectedlinename:%s',_0x15f6e8[_0xeecc('0x3')],queues[_0x15f6e8[_0xeecc('0x3')]]['name'],_0x15f6e8[_0xeecc('0x33')],_0x15f6e8[_0xeecc('0x34')]));queues[_0x15f6e8[_0xeecc('0x3')]]['queuecallerleave']=!![];queues[_0x15f6e8[_0xeecc('0x3')]][_0xeecc('0x1b')]=utils[_0xeecc('0x16')]();queues[_0x15f6e8[_0xeecc('0x3')]][_0xeecc('0x35')]=utils[_0xeecc('0x36')](queues[_0x15f6e8[_0xeecc('0x3')]][_0xeecc('0x1b')],queues[_0x15f6e8[_0xeecc('0x3')]][_0xeecc('0x37')]);queues[_0x15f6e8[_0xeecc('0x3')]][_0xeecc('0x14')]=_0x15f6e8[_0xeecc('0x14')];queues[_0x15f6e8['uniqueid']]['count']=_0x15f6e8[_0xeecc('0x38')];queues[_0x15f6e8[_0xeecc('0x3')]][_0xeecc('0x33')]=_0x15f6e8['connectedlinenum'];queues[_0x15f6e8['uniqueid']][_0xeecc('0x34')]=_0x15f6e8[_0xeecc('0x34')];}}catch(_0x758bcb){utils['error'](util[_0xeecc('0x2')](_0xeecc('0x32'),_0x15f6e8[_0xeecc('0x3')]),_0x758bcb);}};exports[_0xeecc('0x39')]=function(_0x31fa40){try{if(!_[_0xeecc('0x19')](queues[_0x31fa40['uniqueid']])){utils[_0xeecc('0x10')](util['format'](_0xeecc('0x3a'),_0x31fa40[_0xeecc('0x3')]),_0x31fa40);utils[_0xeecc('0x12')](util['format']('[%s][queues][agentconnect]\x20name:%s\x20agent:%s\x20accountcode:%s',_0x31fa40['uniqueid'],queues[_0x31fa40[_0xeecc('0x3')]][_0xeecc('0x21')],_0x31fa40['membername'],_0x31fa40[_0xeecc('0x3b')]));queues[_0x31fa40[_0xeecc('0x3')]][_0xeecc('0x1c')]=![];queues[_0x31fa40[_0xeecc('0x3')]][_0xeecc('0x1c')]=![];queues[_0x31fa40[_0xeecc('0x3')]]['queuecallerabandonAt']=null;queues[_0x31fa40['uniqueid']][_0xeecc('0x1d')]=![];queues[_0x31fa40[_0xeecc('0x3')]][_0xeecc('0x9')]=null;queues[_0x31fa40['uniqueid']][_0xeecc('0x29')]=null;queues[_0x31fa40['uniqueid']][_0xeecc('0x3c')]=!![];queues[_0x31fa40[_0xeecc('0x3')]]['accountcode']=_0x31fa40['destaccountcode'];queues[_0x31fa40[_0xeecc('0x3')]][_0xeecc('0x6')]=_0x31fa40[_0xeecc('0x3d')];}}catch(_0x1583d6){utils[_0xeecc('0x17')](util['format'](_0xeecc('0x3a'),_0x31fa40[_0xeecc('0x3')]),_0x1583d6);}};exports[_0xeecc('0x3e')]=function(_0x2647f7){try{if(!_[_0xeecc('0x19')](queues[_0x2647f7['uniqueid']])){if(queues[_0x2647f7[_0xeecc('0x3')]][_0xeecc('0x1b')]){utils['debug'](util[_0xeecc('0x2')](_0xeecc('0x3f'),_0x2647f7[_0xeecc('0x3')]),_0x2647f7);queues[_0x2647f7[_0xeecc('0x3')]][_0xeecc('0x1c')]=![];queues[_0x2647f7['uniqueid']]['queuecallerabandon']=![];queues[_0x2647f7['uniqueid']]['queuecallerabandonAt']=null;queues[_0x2647f7[_0xeecc('0x3')]]['queuecallerexit']=![];queues[_0x2647f7['uniqueid']][_0xeecc('0x29')]=null;queues[_0x2647f7[_0xeecc('0x3')]][_0xeecc('0x3c')]=!![];queues[_0x2647f7['uniqueid']][_0xeecc('0x6')]=_0x2647f7[_0xeecc('0x3d')];queues[_0x2647f7[_0xeecc('0x3')]][_0xeecc('0x40')]=!![];queues[_0x2647f7[_0xeecc('0x3')]][_0xeecc('0x1e')]=utils[_0xeecc('0x16')]();if(_0x2647f7[_0xeecc('0x41')]=='transfer'){if(!queues[_0x2647f7[_0xeecc('0x3')]][_0xeecc('0x42')]){queues[_0x2647f7[_0xeecc('0x3')]][_0xeecc('0x9')]=_0xeecc('0x43');}}else{queues[_0x2647f7[_0xeecc('0x3')]][_0xeecc('0x9')]='COMPLETEDBY'+_0x2647f7[_0xeecc('0x41')][_0xeecc('0x27')]();}utils[_0xeecc('0x12')](util[_0xeecc('0x2')](_0xeecc('0x44'),_0x2647f7['uniqueid'],queues[_0x2647f7[_0xeecc('0x3')]]['name'],_0x2647f7[_0xeecc('0x3d')],queues[_0x2647f7[_0xeecc('0x3')]][_0xeecc('0x9')]));writeDB(queues[_0x2647f7[_0xeecc('0x3')]]);}}}catch(_0x2651d1){utils['error'](util[_0xeecc('0x2')]('[%s][queues][agentcomplete]',_0x2647f7['uniqueid']),_0x2651d1);}};exports[_0xeecc('0x45')]=function(_0x1170de){try{if(!_['isNil'](queues[_0x1170de['transfereeuniqueid']])){utils[_0xeecc('0x10')](util['format'](_0xeecc('0x46'),_0x1170de[_0xeecc('0x3')]),_0x1170de);queues[_0x1170de[_0xeecc('0x47')]][_0xeecc('0x42')]=!![];queues[_0x1170de[_0xeecc('0x47')]][_0xeecc('0x48')]='BLIND';queues[_0x1170de[_0xeecc('0x47')]][_0xeecc('0x49')]=_0x1170de['extension'];queues[_0x1170de[_0xeecc('0x47')]][_0xeecc('0x4a')]=_0x1170de[_0xeecc('0x47')];queues[_0x1170de[_0xeecc('0x47')]][_0xeecc('0x9')]='BLINDTRANSFER';utils[_0xeecc('0x12')](util[_0xeecc('0x2')](_0xeecc('0x4b'),_0x1170de[_0xeecc('0x3')],queues[_0x1170de[_0xeecc('0x47')]][_0xeecc('0x21')],_0x1170de[_0xeecc('0x47')],_0x1170de[_0xeecc('0x4c')]));}}catch(_0x135ded){utils[_0xeecc('0x17')](util[_0xeecc('0x2')](_0xeecc('0x46'),_0x1170de[_0xeecc('0x3')]),_0x135ded);}};exports['attendedtransfer']=function(_0x4c4b42){try{utils['debug'](util[_0xeecc('0x2')](_0xeecc('0x4d'),_0x4c4b42[_0xeecc('0x4e')]),_0x4c4b42);if(_0x4c4b42[_0xeecc('0x4e')]==_0x4c4b42[_0xeecc('0x4f')]){if(!_[_0xeecc('0x19')](queues[_0x4c4b42[_0xeecc('0x50')]])){utils[_0xeecc('0x12')](util[_0xeecc('0x2')](_0xeecc('0x51'),_0x4c4b42['origtransfereruniqueid'],queues[_0x4c4b42[_0xeecc('0x50')]][_0xeecc('0x21')],_0x4c4b42[_0xeecc('0x52')]));queues[_0x4c4b42[_0xeecc('0x50')]]['transfer']=!![];queues[_0x4c4b42[_0xeecc('0x50')]]['transfertype']=_0xeecc('0x53');queues[_0x4c4b42[_0xeecc('0x50')]][_0xeecc('0x49')]=_0x4c4b42['origtransfererexten'];queues[_0x4c4b42[_0xeecc('0x50')]][_0xeecc('0x4a')]=_0x4c4b42[_0xeecc('0x4e')];queues[_0x4c4b42['secondtransfererlinkedid']][_0xeecc('0x9')]='ATTENDEDTRANSFER';}if(!_['isNil'](queues[_0x4c4b42[_0xeecc('0x4f')]])){if(_0x4c4b42[_0xeecc('0x54')]&&queues[_0x4c4b42[_0xeecc('0x54')]]){queues[_0x4c4b42[_0xeecc('0x54')]][_0xeecc('0x24')]=0x1;queues[_0x4c4b42[_0xeecc('0x47')]]=_[_0xeecc('0x55')](queues[_0x4c4b42[_0xeecc('0x54')]]);queues[_0x4c4b42[_0xeecc('0x47')]][_0xeecc('0x22')]=_0x4c4b42[_0xeecc('0x56')];queues[_0x4c4b42[_0xeecc('0x47')]]['queuecallerenterreason']=0x2;queues[_0x4c4b42[_0xeecc('0x47')]][_0xeecc('0x7')]=queues[_0x4c4b42['secondtransfererlinkedid']][_0xeecc('0x7')];queues[_0x4c4b42[_0xeecc('0x47')]][_0xeecc('0x57')]=queues[_0x4c4b42[_0xeecc('0x50')]]['calleridname'];queues[_0x4c4b42['transfereeuniqueid']][_0xeecc('0x37')]=utils[_0xeecc('0x16')]();queues[_0x4c4b42[_0xeecc('0x47')]][_0xeecc('0x1b')]=utils[_0xeecc('0x16')]();queues[_0x4c4b42[_0xeecc('0x47')]][_0xeecc('0x35')]=0x0;queues[_0x4c4b42[_0xeecc('0x47')]][_0xeecc('0x58')]=0x0;utils[_0xeecc('0x12')](util['format'](_0xeecc('0x59'),_0x4c4b42['origtransfereruniqueid'],queues[_0x4c4b42['transfereeuniqueid']][_0xeecc('0x21')],queues[_0x4c4b42[_0xeecc('0x47')]]['calleridnum'],queues[_0x4c4b42['transfereeuniqueid']][_0xeecc('0x57')]));}else{utils[_0xeecc('0x12')](util[_0xeecc('0x2')](_0xeecc('0x5a'),_0x4c4b42[_0xeecc('0x4e')],queues[_0x4c4b42[_0xeecc('0x4f')]][_0xeecc('0x21')],_0x4c4b42['secondtransfererlinkedid']));queues[_0x4c4b42['origtransfererlinkedid']][_0xeecc('0x22')]=_0x4c4b42[_0xeecc('0x50')];}}}else if(_0x4c4b42[_0xeecc('0x5b')]==_0x4c4b42[_0xeecc('0x50')]){if(!_[_0xeecc('0x19')](queues[_0x4c4b42[_0xeecc('0x4f')]])){utils[_0xeecc('0x12')](util[_0xeecc('0x2')](_0xeecc('0x5c'),_0x4c4b42[_0xeecc('0x4e')],queues[_0x4c4b42[_0xeecc('0x4f')]][_0xeecc('0x21')],_0x4c4b42[_0xeecc('0x5b')],_0x4c4b42[_0xeecc('0x5d')]));queues[_0x4c4b42['origtransfererlinkedid']][_0xeecc('0x42')]=!![];queues[_0x4c4b42[_0xeecc('0x4f')]][_0xeecc('0x48')]='ATTENDED';queues[_0x4c4b42[_0xeecc('0x4f')]][_0xeecc('0x49')]=_0x4c4b42[_0xeecc('0x5d')];queues[_0x4c4b42[_0xeecc('0x4f')]][_0xeecc('0x4a')]=_0x4c4b42['secondtransfereruniqueid'];queues[_0x4c4b42[_0xeecc('0x4f')]]['queuecallerexitreason']=_0xeecc('0x5e');}if(!_['isNil'](queues[_0x4c4b42[_0xeecc('0x50')]])){if(_0x4c4b42['transfertargetlinkedid']&&queues[_0x4c4b42[_0xeecc('0x5f')]]){queues[_0x4c4b42[_0xeecc('0x5f')]]['queuecallerenterreason']=0x1;queues[_0x4c4b42[_0xeecc('0x56')]]=_[_0xeecc('0x55')](queues[_0x4c4b42[_0xeecc('0x5f')]]);queues[_0x4c4b42[_0xeecc('0x56')]][_0xeecc('0x22')]=_0x4c4b42[_0xeecc('0x56')];queues[_0x4c4b42[_0xeecc('0x56')]][_0xeecc('0x24')]=0x2;queues[_0x4c4b42[_0xeecc('0x56')]]['calleridnum']=queues[_0x4c4b42['origtransfererlinkedid']][_0xeecc('0x7')];queues[_0x4c4b42[_0xeecc('0x56')]]['calleridname']=queues[_0x4c4b42[_0xeecc('0x4f')]][_0xeecc('0x57')];queues[_0x4c4b42[_0xeecc('0x56')]]['queuecallerjoinAt']=utils[_0xeecc('0x16')]();queues[_0x4c4b42['transfertargetuniqueid']][_0xeecc('0x1b')]=utils[_0xeecc('0x16')]();queues[_0x4c4b42['transfertargetuniqueid']]['holdtime']=0x0;queues[_0x4c4b42[_0xeecc('0x56')]][_0xeecc('0x58')]=0x0;utils[_0xeecc('0x12')](util[_0xeecc('0x2')](_0xeecc('0x60'),_0x4c4b42[_0xeecc('0x4e')],queues[_0x4c4b42['transfertargetuniqueid']][_0xeecc('0x21')],queues[_0x4c4b42[_0xeecc('0x56')]]['transfereduniqueid'],queues[_0x4c4b42[_0xeecc('0x56')]]['calleridnum'],queues[_0x4c4b42[_0xeecc('0x56')]]['calleridname']));}else{utils[_0xeecc('0x12')](util[_0xeecc('0x2')]('[%s][queues][attendedtransfer]\x20name:%s\x20transfereduniqueid:%s',_0x4c4b42[_0xeecc('0x4e')],queues[_0x4c4b42[_0xeecc('0x50')]][_0xeecc('0x21')],_0x4c4b42['origtransfererlinkedid']));queues[_0x4c4b42[_0xeecc('0x50')]][_0xeecc('0x22')]=_0x4c4b42[_0xeecc('0x4f')];}}}}catch(_0x130c24){utils[_0xeecc('0x17')](util[_0xeecc('0x2')](_0xeecc('0x4d'),_0x4c4b42[_0xeecc('0x4e')]),_0x130c24);}};exports['musiconholdstart']=function(_0x59517a){try{if(!_['isNil'](queues[_0x59517a[_0xeecc('0x3')]])){utils['debug'](util['format'](_0xeecc('0x61'),_0x59517a['uniqueid']),_0x59517a);queues[_0x59517a[_0xeecc('0x3')]][_0xeecc('0x62')]=utils[_0xeecc('0x16')]();utils[_0xeecc('0x12')](util[_0xeecc('0x2')](_0xeecc('0x63'),_0x59517a['uniqueid'],queues[_0x59517a[_0xeecc('0x3')]][_0xeecc('0x21')],queues[_0x59517a[_0xeecc('0x3')]][_0xeecc('0x62')]));}}catch(_0x64da14){utils['error'](util['format']('[%s][queues][musiconholdstart]',_0x59517a[_0xeecc('0x3')]),_0x64da14);}};exports[_0xeecc('0x64')]=function(_0x3e1f9b){try{if(!_[_0xeecc('0x19')](queues[_0x3e1f9b[_0xeecc('0x3')]])){if(!_[_0xeecc('0x19')](queues[_0x3e1f9b['uniqueid']][_0xeecc('0x62')])){utils[_0xeecc('0x10')](util[_0xeecc('0x2')](_0xeecc('0x65'),_0x3e1f9b['uniqueid']),_0x3e1f9b);queues[_0x3e1f9b[_0xeecc('0x3')]]['mohtime']+=utils['diffTime'](utils[_0xeecc('0x16')](),queues[_0x3e1f9b[_0xeecc('0x3')]][_0xeecc('0x62')]);utils[_0xeecc('0x12')](util[_0xeecc('0x2')]('[%s][queues][musiconholdstop]\x20name:%s\x20mohtime:%s',_0x3e1f9b['uniqueid'],queues[_0x3e1f9b[_0xeecc('0x3')]][_0xeecc('0x21')],queues[_0x3e1f9b[_0xeecc('0x3')]][_0xeecc('0x58')]));delete queues[_0x3e1f9b[_0xeecc('0x3')]][_0xeecc('0x62')];}}}catch(_0xa223e6){utils[_0xeecc('0x17')](util[_0xeecc('0x2')]('[%s][queues][musiconholdstop]',_0x3e1f9b[_0xeecc('0x3')]),_0xa223e6);}};
\ No newline at end of file
index d671254..f453365 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x1d51=['[%s][recordings][writeDB]','accountcode','getUserByInternal','then','membername','UserId','request','CreateVoiceRecording','newchannel','debug','format','uniqueid','linkedid','[%s][recordings][newchannel]\x20context:%s\x20exten:%s','context','exten','channel','[%s][recordings][newchannel]','newstate','[%s][recordings][newstate]','isNil','channelstate','[%s][recordings][newstate]\x20context:%s\x20channel:%s','[%s][recordings][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s','varset','variable','mixmonitor_filename','[%s][recordings][varset]\x20variable:%s\x20value:%s','value','endsWith','.wav49','replace','.WAV','monitors','push','error','[%s][recordings][hangup]','[%s][recordings][hangup]\x20calleridnum:%s\x20calleridname:%s\x20reason:%s','calleridnum','calleridname','cause-txt','connectedlinenum','connectedlinename','type','outbound','forEach','newexten','[%s][recordings][newexten]','[%s][recordings][newexten]\x20application:%s\x20appdata:%s','application','appdata','toLowerCase','set','startsWith','cdr','lastIndexOf','queuecallerjoin','[%s][recordings][queuecallerjoin]\x20queue:%s','queue','[%s][recordings][queuecallerjoin]','lodash','util','./utils','info'];(function(_0x495c18,_0xae1131){var _0x27b50d=function(_0x44fbaf){while(--_0x44fbaf){_0x495c18['push'](_0x495c18['shift']());}};_0x27b50d(++_0xae1131);}(_0x1d51,0x13c));var _0x11d5=function(_0x3b1e15,_0x23e39e){_0x3b1e15=_0x3b1e15-0x0;var _0x5f28f0=_0x1d51[_0x3b1e15];return _0x5f28f0;};'use strict';var _=require(_0x11d5('0x0'));var util=require(_0x11d5('0x1'));var utils=require(_0x11d5('0x2'));var recordings={};function writeDB(_0x28a48a){utils[_0x11d5('0x3')](util['format'](_0x11d5('0x4'),_0x28a48a['uniqueid']));if(_0x28a48a[_0x11d5('0x5')]){utils[_0x11d5('0x6')](_0x28a48a[_0x11d5('0x5')])[_0x11d5('0x7')](function(_0x269138){if(_0x269138){_0x28a48a[_0x11d5('0x8')]=_0x269138['name'];_0x28a48a[_0x11d5('0x9')]=_0x269138['id'];}utils[_0x11d5('0xa')](_0x11d5('0xb'),_0x28a48a);});}else{utils['request'](_0x11d5('0xb'),_0x28a48a);}}exports[_0x11d5('0xc')]=function(_0x52ae11){try{utils[_0x11d5('0xd')](util[_0x11d5('0xe')]('[%s][recordings][newchannel]',_0x52ae11[_0x11d5('0xf')]),_0x52ae11);if(_0x52ae11['uniqueid']==_0x52ae11[_0x11d5('0x10')]){utils[_0x11d5('0x3')](util['format'](_0x11d5('0x11'),_0x52ae11[_0x11d5('0xf')],_0x52ae11[_0x11d5('0x12')],_0x52ae11[_0x11d5('0x13')]));recordings[_0x52ae11[_0x11d5('0xf')]]={'uniqueid':_0x52ae11[_0x11d5('0xf')],'accountcode':_0x52ae11[_0x11d5('0x5')],'exten':_0x52ae11['exten'],'context':_0x52ae11[_0x11d5('0x12')],'channel':_0x52ae11[_0x11d5('0x14')],'monitors':[]};}}catch(_0x2ad13b){utils['error'](util[_0x11d5('0xe')](_0x11d5('0x15'),_0x52ae11[_0x11d5('0xf')]),_0x2ad13b);}};exports[_0x11d5('0x16')]=function(_0x1cf7a7){try{utils['debug'](util[_0x11d5('0xe')](_0x11d5('0x17'),_0x1cf7a7[_0x11d5('0xf')]),_0x1cf7a7);if(!_[_0x11d5('0x18')](recordings[_0x1cf7a7['uniqueid']])&&_0x1cf7a7[_0x11d5('0x19')]==0x6){utils[_0x11d5('0x3')](util[_0x11d5('0xe')](_0x11d5('0x1a'),_0x1cf7a7[_0x11d5('0xf')],_0x1cf7a7[_0x11d5('0x12')],_0x1cf7a7[_0x11d5('0x14')]));}else if(!_[_0x11d5('0x18')](recordings[_0x1cf7a7['linkedid']])&&_0x1cf7a7[_0x11d5('0x19')]==0x6&&_0x1cf7a7['context']!='transfer'){utils['info'](util[_0x11d5('0xe')](_0x11d5('0x1b'),_0x1cf7a7[_0x11d5('0xf')],_0x1cf7a7['linkedid'],_0x1cf7a7['context'],_0x1cf7a7[_0x11d5('0x14')]));recordings[_0x1cf7a7['linkedid']][_0x11d5('0x5')]=_0x1cf7a7[_0x11d5('0x5')];}}catch(_0xf28c0f){utils['error'](util['format']('[%s][recordings][newstate]',_0x1cf7a7[_0x11d5('0xf')]),_0xf28c0f);}};exports[_0x11d5('0x1c')]=function(_0x4e15e3){try{if(!_[_0x11d5('0x18')](_0x4e15e3[_0x11d5('0x1d')])&&!_[_0x11d5('0x18')](_0x4e15e3[_0x11d5('0x1d')][_0x11d5('0x1e')])){utils[_0x11d5('0xd')](util[_0x11d5('0xe')]('[%s][recordings][varset]',_0x4e15e3['uniqueid']),_0x4e15e3);utils['info'](util['format'](_0x11d5('0x1f'),_0x4e15e3[_0x11d5('0xf')],_0x4e15e3[_0x11d5('0x1d')],_0x4e15e3[_0x11d5('0x20')]));if(_[_0x11d5('0x21')](_0x4e15e3[_0x11d5('0x20')],_0x11d5('0x22'))){_0x4e15e3[_0x11d5('0x20')]=_0x4e15e3['value'][_0x11d5('0x23')]('.wav49',_0x11d5('0x24'));}if(recordings[_0x4e15e3[_0x11d5('0x10')]]){var _0x287113=_['find'](recordings[_0x4e15e3[_0x11d5('0x10')]][_0x11d5('0x25')],{'value':_0x4e15e3[_0x11d5('0x20')]});if(_[_0x11d5('0x18')](_0x287113)){recordings[_0x4e15e3[_0x11d5('0x10')]]['monitors'][_0x11d5('0x26')]({'value':_0x4e15e3[_0x11d5('0x20')]});}}}}catch(_0x320c05){utils[_0x11d5('0x27')](util[_0x11d5('0xe')]('[%s][recordings][varset]',_0x4e15e3[_0x11d5('0xf')]),_0x320c05);}};exports['hangup']=function(_0x55b07e){try{if(!_[_0x11d5('0x18')](recordings[_0x55b07e[_0x11d5('0xf')]])){utils[_0x11d5('0xd')](util['format'](_0x11d5('0x28'),_0x55b07e[_0x11d5('0xf')]),_0x55b07e);utils[_0x11d5('0x3')](util[_0x11d5('0xe')](_0x11d5('0x29'),_0x55b07e[_0x11d5('0xf')],_0x55b07e[_0x11d5('0x2a')],_0x55b07e[_0x11d5('0x2b')],_0x55b07e[_0x11d5('0x2c')]));recordings[_0x55b07e[_0x11d5('0xf')]]['calleridnum']=_0x55b07e[_0x11d5('0x2a')];recordings[_0x55b07e[_0x11d5('0xf')]][_0x11d5('0x2b')]=_0x55b07e[_0x11d5('0x2b')];recordings[_0x55b07e['uniqueid']][_0x11d5('0x2d')]=_0x55b07e[_0x11d5('0x2d')];recordings[_0x55b07e[_0x11d5('0xf')]]['connectedlinename']=_0x55b07e[_0x11d5('0x2e')];if(recordings[_0x55b07e[_0x11d5('0xf')]][_0x11d5('0x2f')]==_0x11d5('0x30')&&recordings[_0x55b07e[_0x11d5('0xf')]]['accountcode']){recordings[_0x55b07e[_0x11d5('0xf')]]['connectedlinenum']=recordings[_0x55b07e['uniqueid']]['accountcode'];recordings[_0x55b07e[_0x11d5('0xf')]][_0x11d5('0x2e')]='';}recordings[_0x55b07e['uniqueid']]['monitors'][_0x11d5('0x31')](function(_0x58209a){var _0x298cd8=_['clone'](recordings[_0x55b07e[_0x11d5('0xf')]]);_0x298cd8[_0x11d5('0x20')]=_0x58209a[_0x11d5('0x20')];writeDB(_0x298cd8);});delete recordings[_0x55b07e['uniqueid']];}}catch(_0x4bfb05){utils[_0x11d5('0x27')](util[_0x11d5('0xe')](_0x11d5('0x28'),_0x55b07e['uniqueid']),_0x4bfb05);}};exports[_0x11d5('0x32')]=function(_0x343f9c){try{if(!_[_0x11d5('0x18')](recordings[_0x343f9c[_0x11d5('0xf')]])){utils['debug'](util[_0x11d5('0xe')](_0x11d5('0x33'),_0x343f9c[_0x11d5('0xf')]),_0x343f9c);utils[_0x11d5('0x3')](util[_0x11d5('0xe')](_0x11d5('0x34'),_0x343f9c[_0x11d5('0xf')],_0x343f9c[_0x11d5('0x35')],_0x343f9c[_0x11d5('0x36')]));if(_0x343f9c[_0x11d5('0x35')][_0x11d5('0x37')]()==_0x11d5('0x38')&&_[_0x11d5('0x39')](_0x343f9c[_0x11d5('0x36')][_0x11d5('0x37')](),_0x11d5('0x3a'))){var _0x46ec6c=_0x343f9c[_0x11d5('0x36')]['split']('=');var _0x3f448f=_0x46ec6c[0x0]['substring'](_0x46ec6c[0x0][_0x11d5('0x3b')]('(')+0x1,_0x46ec6c[0x0][_0x11d5('0x3b')](')'));var _0x3dce8c=_0x46ec6c[0x1];recordings[_0x343f9c['uniqueid']][_0x3f448f]=_0x3dce8c;}}}catch(_0x597f18){utils[_0x11d5('0x27')](util['format'](_0x11d5('0x33'),_0x343f9c[_0x11d5('0xf')]),_0x597f18);}};exports[_0x11d5('0x3c')]=function(_0x88cb9){try{if(!_[_0x11d5('0x18')](recordings[_0x88cb9['uniqueid']])){utils[_0x11d5('0xd')](util[_0x11d5('0xe')]('[%s][recordings][queuecallerjoin]',_0x88cb9[_0x11d5('0xf')]),_0x88cb9);utils['info'](util['format'](_0x11d5('0x3d'),_0x88cb9[_0x11d5('0xf')],_0x88cb9[_0x11d5('0x3e')]));recordings[_0x88cb9['uniqueid']][_0x11d5('0x3e')]=_0x88cb9[_0x11d5('0x3e')];}}catch(_0x303a50){utils[_0x11d5('0x27')](util['format'](_0x11d5('0x3f'),_0x88cb9[_0x11d5('0xf')]),_0x303a50);}};
\ No newline at end of file
+var _0x9800=['queue','util','info','format','uniqueid','accountcode','then','membername','name','UserId','request','newchannel','debug','[%s][recordings][newchannel]','linkedid','[%s][recordings][newchannel]\x20context:%s\x20exten:%s','exten','channel','error','newstate','[%s][recordings][newstate]','channelstate','[%s][recordings][newstate]\x20context:%s\x20channel:%s','context','varset','isNil','variable','[%s][recordings][varset]','[%s][recordings][varset]\x20variable:%s\x20value:%s','value','.wav49','replace','.WAV','find','monitors','hangup','[%s][recordings][hangup]','[%s][recordings][hangup]\x20calleridnum:%s\x20calleridname:%s\x20reason:%s','calleridnum','calleridname','cause-txt','connectedlinenum','connectedlinename','type','outbound','forEach','clone','newexten','[%s][recordings][newexten]\x20application:%s\x20appdata:%s','appdata','split','substring','lastIndexOf','[%s][recordings][newexten]','queuecallerjoin','[%s][recordings][queuecallerjoin]','[%s][recordings][queuecallerjoin]\x20queue:%s'];(function(_0x5f197e,_0x1a9871){var _0x43639b=function(_0x3f9b49){while(--_0x3f9b49){_0x5f197e['push'](_0x5f197e['shift']());}};_0x43639b(++_0x1a9871);}(_0x9800,0x11e));var _0x0980=function(_0x2f9302,_0xbd0213){_0x2f9302=_0x2f9302-0x0;var _0x38f880=_0x9800[_0x2f9302];return _0x38f880;};'use strict';var _=require('lodash');var util=require(_0x0980('0x0'));var utils=require('./utils');var recordings={};function writeDB(_0x2f4570){utils[_0x0980('0x1')](util[_0x0980('0x2')]('[%s][recordings][writeDB]',_0x2f4570[_0x0980('0x3')]));if(_0x2f4570[_0x0980('0x4')]){utils['getUserByInternal'](_0x2f4570[_0x0980('0x4')])[_0x0980('0x5')](function(_0x5379bd){if(_0x5379bd){_0x2f4570[_0x0980('0x6')]=_0x5379bd[_0x0980('0x7')];_0x2f4570[_0x0980('0x8')]=_0x5379bd['id'];}utils['request']('CreateVoiceRecording',_0x2f4570);});}else{utils[_0x0980('0x9')]('CreateVoiceRecording',_0x2f4570);}}exports[_0x0980('0xa')]=function(_0x318204){try{utils[_0x0980('0xb')](util[_0x0980('0x2')](_0x0980('0xc'),_0x318204[_0x0980('0x3')]),_0x318204);if(_0x318204['uniqueid']==_0x318204[_0x0980('0xd')]){utils['info'](util['format'](_0x0980('0xe'),_0x318204[_0x0980('0x3')],_0x318204['context'],_0x318204[_0x0980('0xf')]));recordings[_0x318204[_0x0980('0x3')]]={'uniqueid':_0x318204[_0x0980('0x3')],'accountcode':_0x318204[_0x0980('0x4')],'exten':_0x318204[_0x0980('0xf')],'context':_0x318204['context'],'channel':_0x318204[_0x0980('0x10')],'monitors':[]};}}catch(_0x4ade7c){utils[_0x0980('0x11')](util['format'](_0x0980('0xc'),_0x318204[_0x0980('0x3')]),_0x4ade7c);}};exports[_0x0980('0x12')]=function(_0x496bd6){try{utils['debug'](util[_0x0980('0x2')](_0x0980('0x13'),_0x496bd6[_0x0980('0x3')]),_0x496bd6);if(!_['isNil'](recordings[_0x496bd6[_0x0980('0x3')]])&&_0x496bd6[_0x0980('0x14')]==0x6){utils[_0x0980('0x1')](util[_0x0980('0x2')](_0x0980('0x15'),_0x496bd6[_0x0980('0x3')],_0x496bd6[_0x0980('0x16')],_0x496bd6[_0x0980('0x10')]));}else if(!_['isNil'](recordings[_0x496bd6['linkedid']])&&_0x496bd6[_0x0980('0x14')]==0x6&&_0x496bd6[_0x0980('0x16')]!='transfer'){utils[_0x0980('0x1')](util[_0x0980('0x2')]('[%s][recordings][newstate]\x20linkedid:%s\x20context:%s\x20channel:%s',_0x496bd6[_0x0980('0x3')],_0x496bd6['linkedid'],_0x496bd6[_0x0980('0x16')],_0x496bd6[_0x0980('0x10')]));recordings[_0x496bd6[_0x0980('0xd')]]['accountcode']=_0x496bd6['accountcode'];}}catch(_0x29a4e7){utils['error'](util['format'](_0x0980('0x13'),_0x496bd6[_0x0980('0x3')]),_0x29a4e7);}};exports[_0x0980('0x17')]=function(_0x60655c){try{if(!_[_0x0980('0x18')](_0x60655c[_0x0980('0x19')])&&!_[_0x0980('0x18')](_0x60655c[_0x0980('0x19')]['mixmonitor_filename'])){utils[_0x0980('0xb')](util['format'](_0x0980('0x1a'),_0x60655c[_0x0980('0x3')]),_0x60655c);utils[_0x0980('0x1')](util['format'](_0x0980('0x1b'),_0x60655c['uniqueid'],_0x60655c['variable'],_0x60655c[_0x0980('0x1c')]));if(_['endsWith'](_0x60655c[_0x0980('0x1c')],_0x0980('0x1d'))){_0x60655c[_0x0980('0x1c')]=_0x60655c[_0x0980('0x1c')][_0x0980('0x1e')](_0x0980('0x1d'),_0x0980('0x1f'));}if(recordings[_0x60655c['linkedid']]){var _0x46ca3c=_[_0x0980('0x20')](recordings[_0x60655c[_0x0980('0xd')]][_0x0980('0x21')],{'value':_0x60655c[_0x0980('0x1c')]});if(_['isNil'](_0x46ca3c)){recordings[_0x60655c[_0x0980('0xd')]]['monitors']['push']({'value':_0x60655c['value']});}}}}catch(_0x3ac31f){utils[_0x0980('0x11')](util[_0x0980('0x2')](_0x0980('0x1a'),_0x60655c[_0x0980('0x3')]),_0x3ac31f);}};exports[_0x0980('0x22')]=function(_0x27d9a7){try{if(!_['isNil'](recordings[_0x27d9a7[_0x0980('0x3')]])){utils[_0x0980('0xb')](util[_0x0980('0x2')](_0x0980('0x23'),_0x27d9a7['uniqueid']),_0x27d9a7);utils[_0x0980('0x1')](util['format'](_0x0980('0x24'),_0x27d9a7[_0x0980('0x3')],_0x27d9a7[_0x0980('0x25')],_0x27d9a7[_0x0980('0x26')],_0x27d9a7[_0x0980('0x27')]));recordings[_0x27d9a7[_0x0980('0x3')]][_0x0980('0x25')]=_0x27d9a7[_0x0980('0x25')];recordings[_0x27d9a7['uniqueid']][_0x0980('0x26')]=_0x27d9a7['calleridname'];recordings[_0x27d9a7[_0x0980('0x3')]][_0x0980('0x28')]=_0x27d9a7[_0x0980('0x28')];recordings[_0x27d9a7[_0x0980('0x3')]][_0x0980('0x29')]=_0x27d9a7[_0x0980('0x29')];if(recordings[_0x27d9a7[_0x0980('0x3')]][_0x0980('0x2a')]==_0x0980('0x2b')&&recordings[_0x27d9a7[_0x0980('0x3')]][_0x0980('0x4')]){recordings[_0x27d9a7[_0x0980('0x3')]][_0x0980('0x28')]=recordings[_0x27d9a7['uniqueid']][_0x0980('0x4')];recordings[_0x27d9a7[_0x0980('0x3')]][_0x0980('0x29')]='';}recordings[_0x27d9a7[_0x0980('0x3')]][_0x0980('0x21')][_0x0980('0x2c')](function(_0x40f335){var _0x347d45=_[_0x0980('0x2d')](recordings[_0x27d9a7[_0x0980('0x3')]]);_0x347d45[_0x0980('0x1c')]=_0x40f335[_0x0980('0x1c')];writeDB(_0x347d45);});delete recordings[_0x27d9a7[_0x0980('0x3')]];}}catch(_0x46574f){utils['error'](util[_0x0980('0x2')](_0x0980('0x23'),_0x27d9a7[_0x0980('0x3')]),_0x46574f);}};exports[_0x0980('0x2e')]=function(_0x15eb86){try{if(!_[_0x0980('0x18')](recordings[_0x15eb86[_0x0980('0x3')]])){utils['debug'](util[_0x0980('0x2')]('[%s][recordings][newexten]',_0x15eb86[_0x0980('0x3')]),_0x15eb86);utils[_0x0980('0x1')](util[_0x0980('0x2')](_0x0980('0x2f'),_0x15eb86[_0x0980('0x3')],_0x15eb86['application'],_0x15eb86[_0x0980('0x30')]));if(_0x15eb86['application']['toLowerCase']()=='set'&&_['startsWith'](_0x15eb86['appdata']['toLowerCase'](),'cdr')){var _0x36c86a=_0x15eb86[_0x0980('0x30')][_0x0980('0x31')]('=');var _0x4b9d85=_0x36c86a[0x0][_0x0980('0x32')](_0x36c86a[0x0][_0x0980('0x33')]('(')+0x1,_0x36c86a[0x0][_0x0980('0x33')](')'));var _0x5ba961=_0x36c86a[0x1];recordings[_0x15eb86['uniqueid']][_0x4b9d85]=_0x5ba961;}}}catch(_0x419559){utils[_0x0980('0x11')](util[_0x0980('0x2')](_0x0980('0x34'),_0x15eb86[_0x0980('0x3')]),_0x419559);}};exports[_0x0980('0x35')]=function(_0x160072){try{if(!_[_0x0980('0x18')](recordings[_0x160072[_0x0980('0x3')]])){utils[_0x0980('0xb')](util[_0x0980('0x2')](_0x0980('0x36'),_0x160072[_0x0980('0x3')]),_0x160072);utils[_0x0980('0x1')](util[_0x0980('0x2')](_0x0980('0x37'),_0x160072[_0x0980('0x3')],_0x160072['queue']));recordings[_0x160072[_0x0980('0x3')]][_0x0980('0x38')]=_0x160072['queue'];}}catch(_0x3c3195){utils[_0x0980('0x11')](util[_0x0980('0x2')](_0x0980('0x36'),_0x160072[_0x0980('0x3')]),_0x3c3195);}};
\ No newline at end of file
index dc59520..4eb9611 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x54e3=['lodash','./utils','format','[%s][transfers][writeDB]\x20type:%s','type','attended','uniqueid','request','CreateVoiceTransferReport','debug','[%s][transfers][blindtransfer]','[%s][transfers][blindtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s','transferercalleridnum','transferercalleridname','transfereecalleridnum','transfereecalleridname','blind','error','attendedtransfer','[%s][transfers][attendedtransfer]','origtransfereruniqueid','[%s][transfers][attendedtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s','origtransferercalleridnum','origtransferercalleridname','transfertargetcalleridnum','transfertargetcalleridname','origtransfererchannel','secondtransfererconnectedlinenum','origtransfereraccountcode','secondtransferercontext','secondtransfererexten','origtransferercontext','origtransfererexten','isNil','transfereechannel','assign','transfertargetchannel','transfertargetconnectedlinename','transfertargetexten','transfertargetlinkedid'];(function(_0x335236,_0x12ea97){var _0x51ac14=function(_0xa818f1){while(--_0xa818f1){_0x335236['push'](_0x335236['shift']());}};_0x51ac14(++_0x12ea97);}(_0x54e3,0x118));var _0x354e=function(_0x44ae3c,_0x44abc9){_0x44ae3c=_0x44ae3c-0x0;var _0x5295fe=_0x54e3[_0x44ae3c];return _0x5295fe;};'use strict';var _=require(_0x354e('0x0'));var util=require('util');var utils=require(_0x354e('0x1'));function writeDB(_0x3dbb2d){utils['info'](util[_0x354e('0x2')](_0x354e('0x3'),_0x3dbb2d[_0x354e('0x4')]===_0x354e('0x5')?_0x3dbb2d['origtransfereruniqueid']:_0x3dbb2d[_0x354e('0x6')],_0x3dbb2d[_0x354e('0x4')]));utils[_0x354e('0x7')](_0x354e('0x8'),_0x3dbb2d);}exports['blindtransfer']=function(_0x173ac1){try{utils[_0x354e('0x9')](util[_0x354e('0x2')](_0x354e('0xa'),_0x173ac1[_0x354e('0x6')]),_0x173ac1);utils['info'](util[_0x354e('0x2')](_0x354e('0xb'),_0x173ac1[_0x354e('0x6')],_0x173ac1[_0x354e('0xc')],_0x173ac1[_0x354e('0xd')],_0x173ac1[_0x354e('0xe')],_0x173ac1[_0x354e('0xf')]));_0x173ac1[_0x354e('0x4')]=_0x354e('0x10');writeDB(_0x173ac1);}catch(_0x342558){utils[_0x354e('0x11')](util[_0x354e('0x2')](_0x354e('0xa'),_0x173ac1[_0x354e('0x6')]),_0x342558);}};exports[_0x354e('0x12')]=function(_0x2b1a67){try{utils[_0x354e('0x9')](util[_0x354e('0x2')](_0x354e('0x13'),_0x2b1a67[_0x354e('0x14')]),_0x2b1a67);utils['info'](util[_0x354e('0x2')](_0x354e('0x15'),_0x2b1a67[_0x354e('0x14')],_0x2b1a67[_0x354e('0x16')],_0x2b1a67[_0x354e('0x17')],_0x2b1a67[_0x354e('0x18')],_0x2b1a67[_0x354e('0x19')]));_0x2b1a67=_['assign'](_0x2b1a67,{'transfererchannel':_0x2b1a67[_0x354e('0x1a')],'transferercalleridnum':_0x2b1a67[_0x354e('0x16')],'transferercalleridname':_0x2b1a67[_0x354e('0x17')],'transfererconnectedlinenum':_0x2b1a67[_0x354e('0x1b')],'transfererconnectedlinename':_0x2b1a67['secondtransfererconnectedlinename'],'transfereraccountcode':_0x2b1a67[_0x354e('0x1c')],'transferercontext':_0x2b1a67[_0x354e('0x1d')],'transfererexten':_0x2b1a67[_0x354e('0x1e')],'transfererlinkedid':_0x2b1a67['origtransfererlinkedid'],'context':_0x2b1a67[_0x354e('0x1f')],'extension':_0x2b1a67[_0x354e('0x20')],'type':_0x354e('0x5')});if(_[_0x354e('0x21')](_0x2b1a67[_0x354e('0x22')])){_0x2b1a67=_[_0x354e('0x23')](_0x2b1a67,{'transfereechannel':_0x2b1a67[_0x354e('0x24')],'transfereecalleridnum':_0x2b1a67[_0x354e('0x18')],'transfereecalleridname':_0x2b1a67[_0x354e('0x19')],'transfereeconnectedlinenum':_0x2b1a67['transfertargetconnectedlinenum'],'transfereeconnectedlinename':_0x2b1a67[_0x354e('0x25')],'transfereeaccountcode':_0x2b1a67['transfertargetaccountcode'],'transfereecontext':_0x2b1a67['transfertargetcontext'],'transfereeexten':_0x2b1a67[_0x354e('0x26')],'transfereelinkedid':_0x2b1a67[_0x354e('0x27')]});}writeDB(_0x2b1a67);}catch(_0x1d8328){utils[_0x354e('0x11')](util['format']('[%s][transfers][attendedtransfer]',_0x2b1a67[_0x354e('0x14')]),_0x1d8328);}};
\ No newline at end of file
+var _0xb071=['transfertargetconnectedlinenum','transfertargetconnectedlinename','transfertargetaccountcode','transfertargetexten','transfertargetlinkedid','error','[%s][transfers][attendedtransfer]','util','./utils','info','format','[%s][transfers][writeDB]\x20type:%s','type','attended','origtransfereruniqueid','uniqueid','request','CreateVoiceTransferReport','blindtransfer','debug','transferercalleridnum','transfereecalleridname','blind','[%s][transfers][blindtransfer]','attendedtransfer','[%s][transfers][attendedtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s','origtransferercalleridnum','origtransferercalleridname','transfertargetcalleridname','secondtransfererconnectedlinenum','secondtransfererconnectedlinename','origtransfereraccountcode','secondtransferercontext','secondtransfererexten','origtransfererlinkedid','origtransferercontext','isNil','transfereechannel','transfertargetcalleridnum'];(function(_0x4a1183,_0x3e78f2){var _0x22936b=function(_0x14a9dc){while(--_0x14a9dc){_0x4a1183['push'](_0x4a1183['shift']());}};_0x22936b(++_0x3e78f2);}(_0xb071,0xa3));var _0x1b07=function(_0x15f347,_0x547ffe){_0x15f347=_0x15f347-0x0;var _0x3045a6=_0xb071[_0x15f347];return _0x3045a6;};'use strict';var _=require('lodash');var util=require(_0x1b07('0x0'));var utils=require(_0x1b07('0x1'));function writeDB(_0x40237a){utils[_0x1b07('0x2')](util[_0x1b07('0x3')](_0x1b07('0x4'),_0x40237a[_0x1b07('0x5')]===_0x1b07('0x6')?_0x40237a[_0x1b07('0x7')]:_0x40237a[_0x1b07('0x8')],_0x40237a[_0x1b07('0x5')]));utils[_0x1b07('0x9')](_0x1b07('0xa'),_0x40237a);}exports[_0x1b07('0xb')]=function(_0x4ea1cd){try{utils[_0x1b07('0xc')](util[_0x1b07('0x3')]('[%s][transfers][blindtransfer]',_0x4ea1cd['uniqueid']),_0x4ea1cd);utils['info'](util[_0x1b07('0x3')]('[%s][transfers][blindtransfer]\x20transferercalleridnum:%s\x20transferercalleridname:%s\x20transfereecalleridnum:%s\x20transfereecalleridname:%s',_0x4ea1cd['uniqueid'],_0x4ea1cd[_0x1b07('0xd')],_0x4ea1cd['transferercalleridname'],_0x4ea1cd['transfereecalleridnum'],_0x4ea1cd[_0x1b07('0xe')]));_0x4ea1cd[_0x1b07('0x5')]=_0x1b07('0xf');writeDB(_0x4ea1cd);}catch(_0x435a2f){utils['error'](util[_0x1b07('0x3')](_0x1b07('0x10'),_0x4ea1cd[_0x1b07('0x8')]),_0x435a2f);}};exports[_0x1b07('0x11')]=function(_0x4de38e){try{utils['debug'](util['format']('[%s][transfers][attendedtransfer]',_0x4de38e[_0x1b07('0x7')]),_0x4de38e);utils[_0x1b07('0x2')](util[_0x1b07('0x3')](_0x1b07('0x12'),_0x4de38e[_0x1b07('0x7')],_0x4de38e[_0x1b07('0x13')],_0x4de38e[_0x1b07('0x14')],_0x4de38e['transfertargetcalleridnum'],_0x4de38e[_0x1b07('0x15')]));_0x4de38e=_['assign'](_0x4de38e,{'transfererchannel':_0x4de38e['origtransfererchannel'],'transferercalleridnum':_0x4de38e[_0x1b07('0x13')],'transferercalleridname':_0x4de38e[_0x1b07('0x14')],'transfererconnectedlinenum':_0x4de38e[_0x1b07('0x16')],'transfererconnectedlinename':_0x4de38e[_0x1b07('0x17')],'transfereraccountcode':_0x4de38e[_0x1b07('0x18')],'transferercontext':_0x4de38e[_0x1b07('0x19')],'transfererexten':_0x4de38e[_0x1b07('0x1a')],'transfererlinkedid':_0x4de38e[_0x1b07('0x1b')],'context':_0x4de38e[_0x1b07('0x1c')],'extension':_0x4de38e['origtransfererexten'],'type':'attended'});if(_[_0x1b07('0x1d')](_0x4de38e[_0x1b07('0x1e')])){_0x4de38e=_['assign'](_0x4de38e,{'transfereechannel':_0x4de38e['transfertargetchannel'],'transfereecalleridnum':_0x4de38e[_0x1b07('0x1f')],'transfereecalleridname':_0x4de38e['transfertargetcalleridname'],'transfereeconnectedlinenum':_0x4de38e[_0x1b07('0x20')],'transfereeconnectedlinename':_0x4de38e[_0x1b07('0x21')],'transfereeaccountcode':_0x4de38e[_0x1b07('0x22')],'transfereecontext':_0x4de38e['transfertargetcontext'],'transfereeexten':_0x4de38e[_0x1b07('0x23')],'transfereelinkedid':_0x4de38e[_0x1b07('0x24')]});}writeDB(_0x4de38e);}catch(_0x18ff49){utils[_0x1b07('0x25')](util[_0x1b07('0x3')](_0x1b07('0x26'),_0x4de38e['origtransfereruniqueid']),_0x18ff49);}};
\ No newline at end of file
index be2b420..e9f59f9 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x5923=['GetVoiceQueue','acw','[utils][getVoiceQueueByName]\x20name:%s','[utils][getVoiceQueueByName]\x20name:%s\x20%s','length','[utils][getVoiceQueueByName]','addTime','add','seconds','YYYY-MM-DD\x20HH:mm:ss','subtractTime','format','diffTime','diff','sumTime','isAfter','isBefore','bluebird','moment','util','client','xdr','info','inspect','debug','error','request','then','[utils][request]\x20name:%s','catch','GetUser','internal','name','interface','stringify','result','getUserByInternal','[utils][getUserByInternal]\x20internal:%s\x20%s','found','notfound','[utils][getUserByInternal]','getUserByInterface','[utils][getUserByInterface]\x20interface:%s\x20%s','[utils][getUserByInterface]','getUserByName','[utils][getUserByName]','getVoiceQueueByName'];(function(_0x540314,_0x30e8a5){var _0xff9b2a=function(_0x292a71){while(--_0x292a71){_0x540314['push'](_0x540314['shift']());}};_0xff9b2a(++_0x30e8a5);}(_0x5923,0x12b));var _0x3592=function(_0x57c0f5,_0x4d1bdf){_0x57c0f5=_0x57c0f5-0x0;var _0x2ffea1=_0x5923[_0x57c0f5];return _0x2ffea1;};'use strict';var BPromise=require(_0x3592('0x0'));var jayson=require('jayson/promise');var moment=require(_0x3592('0x1'));var util=require(_0x3592('0x2'));var client=jayson[_0x3592('0x3')]['http']({'port':0x2329});var logger=require('../../config/logger')(_0x3592('0x4'));exports[_0x3592('0x5')]=function(_0x219274,_0x356ebf){logger['info'](_0x219274,_0x356ebf?util[_0x3592('0x6')](_0x356ebf,{'showHidden':![],'depth':null}):'');};exports[_0x3592('0x7')]=function(_0x1ac7b6,_0x2fb28a){logger[_0x3592('0x7')](_0x1ac7b6,_0x2fb28a?util[_0x3592('0x6')](_0x2fb28a,{'showHidden':![],'depth':null}):'');};exports[_0x3592('0x8')]=function(_0x3d24f2,_0x518907){logger['error'](_0x3d24f2,_0x518907?util[_0x3592('0x6')](_0x518907,{'showHidden':![],'depth':null}):'');};exports['request']=function(_0x548fe9,_0x2d9561){return client[_0x3592('0x9')](_0x548fe9,{'body':_0x2d9561})[_0x3592('0xa')](function(_0x458ff0){logger[_0x3592('0x7')](_0x3592('0xb'),_0x548fe9,_0x458ff0?util[_0x3592('0x6')](_0x458ff0,{'showHidden':![],'depth':null}):'');})[_0x3592('0xc')](function(_0x423290){logger[_0x3592('0x8')](_0x3592('0xb'),_0x548fe9,_0x423290?util[_0x3592('0x6')](_0x423290,{'showHidden':![],'depth':null}):'');});};function getUser(_0x49843e){return client[_0x3592('0x9')](_0x3592('0xd'),{'options':{'raw':!![],'attributes':['id',_0x3592('0xe'),_0x3592('0xf'),_0x3592('0x10')],'where':_0x49843e,'limit':0x1}})[_0x3592('0xa')](function(_0x1da463){logger[_0x3592('0x7')]('[utils][getUser]\x20where:%s',JSON[_0x3592('0x11')](_0x49843e),_0x1da463?util['inspect'](_0x1da463,{'showHidden':![],'depth':null}):'');return _0x1da463['result']['length']?_0x1da463[_0x3592('0x12')][0x0]:null;});}exports[_0x3592('0x13')]=function(_0x4e54b1){return new BPromise(function(_0x5d33c4,_0x58b0ed){if(_0x4e54b1){return getUser({'internal':_0x4e54b1})[_0x3592('0xa')](function(_0x453cc9){logger[_0x3592('0x5')](_0x3592('0x14'),_0x4e54b1,_0x453cc9?_0x3592('0x15'):_0x3592('0x16'));return _0x5d33c4(_0x453cc9);})[_0x3592('0xc')](function(_0x5393e3){logger[_0x3592('0x8')](_0x3592('0x17'),_0x5393e3?util['inspect'](_0x5393e3,{'showHidden':![],'depth':null}):'');return _0x5d33c4(null);});}return _0x5d33c4(null);});};exports[_0x3592('0x18')]=function(_0x2743b5){return new BPromise(function(_0xce8b81,_0x522a56){if(_0x2743b5){return getUser({'interface':_0x2743b5})['then'](function(_0x1b9154){logger[_0x3592('0x5')](_0x3592('0x19'),_0x2743b5,_0x1b9154?_0x3592('0x15'):_0x3592('0x16'));return _0xce8b81(_0x1b9154);})[_0x3592('0xc')](function(_0x2defac){logger['error'](_0x3592('0x1a'),_0x2defac?util['inspect'](_0x2defac,{'showHidden':![],'depth':null}):'');return _0xce8b81(null);});}return _0xce8b81(null);});};exports[_0x3592('0x1b')]=function(_0x117939){return new BPromise(function(_0x39f278,_0x383fa0){if(_0x117939){return getUser({'name':_0x117939})[_0x3592('0xa')](function(_0x7ff6cb){logger[_0x3592('0x5')]('[utils][getUserByName]\x20name:%s\x20%s',_0x117939,_0x7ff6cb?_0x3592('0x15'):_0x3592('0x16'));return _0x39f278(_0x7ff6cb);})['catch'](function(_0x17a805){logger['error'](_0x3592('0x1c'),_0x17a805?util[_0x3592('0x6')](_0x17a805,{'showHidden':![],'depth':null}):'');return _0x39f278(null);});}return _0x39f278(null);});};exports[_0x3592('0x1d')]=function(_0x40e1e1){return new BPromise(function(_0xd66af,_0x1ba058){if(_0x40e1e1){return client[_0x3592('0x9')](_0x3592('0x1e'),{'options':{'raw':!![],'attributes':['id','name','type',_0x3592('0x1f'),'acwTimeout'],'where':{'name':_0x40e1e1},'limit':0x1}})[_0x3592('0xa')](function(_0x3d611c){logger[_0x3592('0x7')](_0x3592('0x20'),_0x40e1e1,_0x3d611c?util[_0x3592('0x6')](_0x3d611c,{'showHidden':![],'depth':null}):'');logger[_0x3592('0x5')](_0x3592('0x21'),_0x40e1e1,_0x3d611c?_0x3592('0x15'):'notfound');return _0xd66af(_0x3d611c[_0x3592('0x12')][_0x3592('0x22')]?_0x3d611c[_0x3592('0x12')][0x0]:null);})[_0x3592('0xc')](function(_0x5ca596){logger[_0x3592('0x8')](_0x3592('0x23'),_0x5ca596?util[_0x3592('0x6')](_0x5ca596,{'showHidden':![],'depth':null}):'');return _0xd66af(null);});}return _0xd66af(null);});};exports[_0x3592('0x24')]=function(_0x3c1d7d,_0xea4844){return moment(_0x3c1d7d)[_0x3592('0x25')](_0xea4844,_0x3592('0x26'))['format'](_0x3592('0x27'));};exports[_0x3592('0x28')]=function(_0x21bbfd,_0x409eb0){return moment(_0x21bbfd)['subtract'](_0x409eb0,_0x3592('0x26'))[_0x3592('0x29')](_0x3592('0x27'));};exports[_0x3592('0x2a')]=function(_0x4b17e9,_0x3075ac){return moment(_0x4b17e9)[_0x3592('0x2b')](moment(_0x3075ac),_0x3592('0x26'));};exports[_0x3592('0x2c')]=function(_0x40d9d3,_0x10bfc4){return parseInt(_0x40d9d3,0xa)+parseInt(_0x10bfc4,0xa);};exports['now']=function(){return moment()[_0x3592('0x29')](_0x3592('0x27'));};exports[_0x3592('0x2d')]=function(_0x5f28e4,_0x219fd4){if(_0x219fd4){return moment(_0x5f28e4)[_0x3592('0x2d')](_0x219fd4);}return!![];};exports[_0x3592('0x2e')]=function(_0x30f19d,_0x21e23c){if(_0x21e23c){return moment(_0x30f19d)[_0x3592('0x2e')](_0x21e23c);}else if(_0x30f19d){return!![];}return![];};
\ No newline at end of file
+var _0xa4f0=['getUserByInterface','[utils][getUserByInterface]\x20interface:%s\x20%s','notfound','getUserByName','[utils][getUserByName]\x20name:%s\x20%s','getVoiceQueueByName','GetVoiceQueue','type','[utils][getVoiceQueueByName]\x20name:%s','[utils][getVoiceQueueByName]\x20name:%s\x20%s','addTime','add','seconds','format','YYYY-MM-DD\x20HH:mm:ss','subtractTime','subtract','diffTime','diff','sumTime','now','isAfter','isBefore','jayson/promise','moment','util','http','../../config/logger','xdr','info','inspect','debug','error','request','catch','name','interface','then','[utils][getUser]\x20where:%s','stringify','result','found','[utils][getUserByInternal]'];(function(_0x1c2979,_0x4bd634){var _0x13df89=function(_0x32f3f1){while(--_0x32f3f1){_0x1c2979['push'](_0x1c2979['shift']());}};_0x13df89(++_0x4bd634);}(_0xa4f0,0x119));var _0x0a4f=function(_0x1cf870,_0x5f172d){_0x1cf870=_0x1cf870-0x0;var _0x439018=_0xa4f0[_0x1cf870];return _0x439018;};'use strict';var BPromise=require('bluebird');var jayson=require(_0x0a4f('0x0'));var moment=require(_0x0a4f('0x1'));var util=require(_0x0a4f('0x2'));var client=jayson['client'][_0x0a4f('0x3')]({'port':0x2329});var logger=require(_0x0a4f('0x4'))(_0x0a4f('0x5'));exports[_0x0a4f('0x6')]=function(_0x23ed51,_0x29c95c){logger[_0x0a4f('0x6')](_0x23ed51,_0x29c95c?util[_0x0a4f('0x7')](_0x29c95c,{'showHidden':![],'depth':null}):'');};exports['debug']=function(_0x12b4c6,_0x3ae820){logger[_0x0a4f('0x8')](_0x12b4c6,_0x3ae820?util[_0x0a4f('0x7')](_0x3ae820,{'showHidden':![],'depth':null}):'');};exports[_0x0a4f('0x9')]=function(_0x43d13d,_0x391df7){logger[_0x0a4f('0x9')](_0x43d13d,_0x391df7?util[_0x0a4f('0x7')](_0x391df7,{'showHidden':![],'depth':null}):'');};exports[_0x0a4f('0xa')]=function(_0x395abc,_0x33b3b7){return client['request'](_0x395abc,{'body':_0x33b3b7})['then'](function(_0x3548ee){logger['debug']('[utils][request]\x20name:%s',_0x395abc,_0x3548ee?util['inspect'](_0x3548ee,{'showHidden':![],'depth':null}):'');})[_0x0a4f('0xb')](function(_0x5cbd14){logger[_0x0a4f('0x9')]('[utils][request]\x20name:%s',_0x395abc,_0x5cbd14?util[_0x0a4f('0x7')](_0x5cbd14,{'showHidden':![],'depth':null}):'');});};function getUser(_0x5f3b1e){return client['request']('GetUser',{'options':{'raw':!![],'attributes':['id','internal',_0x0a4f('0xc'),_0x0a4f('0xd')],'where':_0x5f3b1e,'limit':0x1}})[_0x0a4f('0xe')](function(_0x5160c4){logger[_0x0a4f('0x8')](_0x0a4f('0xf'),JSON[_0x0a4f('0x10')](_0x5f3b1e),_0x5160c4?util['inspect'](_0x5160c4,{'showHidden':![],'depth':null}):'');return _0x5160c4['result']['length']?_0x5160c4[_0x0a4f('0x11')][0x0]:null;});}exports['getUserByInternal']=function(_0x36ec31){return new BPromise(function(_0x2aee1a,_0x4e0a8a){if(_0x36ec31){return getUser({'internal':_0x36ec31})[_0x0a4f('0xe')](function(_0x9d4a62){logger[_0x0a4f('0x6')]('[utils][getUserByInternal]\x20internal:%s\x20%s',_0x36ec31,_0x9d4a62?_0x0a4f('0x12'):'notfound');return _0x2aee1a(_0x9d4a62);})[_0x0a4f('0xb')](function(_0x1f8783){logger['error'](_0x0a4f('0x13'),_0x1f8783?util['inspect'](_0x1f8783,{'showHidden':![],'depth':null}):'');return _0x2aee1a(null);});}return _0x2aee1a(null);});};exports[_0x0a4f('0x14')]=function(_0x5d56c8){return new BPromise(function(_0x2c79cb,_0x207fa1){if(_0x5d56c8){return getUser({'interface':_0x5d56c8})[_0x0a4f('0xe')](function(_0x12c02d){logger['info'](_0x0a4f('0x15'),_0x5d56c8,_0x12c02d?'found':_0x0a4f('0x16'));return _0x2c79cb(_0x12c02d);})[_0x0a4f('0xb')](function(_0x3757c0){logger[_0x0a4f('0x9')]('[utils][getUserByInterface]',_0x3757c0?util[_0x0a4f('0x7')](_0x3757c0,{'showHidden':![],'depth':null}):'');return _0x2c79cb(null);});}return _0x2c79cb(null);});};exports[_0x0a4f('0x17')]=function(_0x20148d){return new BPromise(function(_0x578e94,_0x47f304){if(_0x20148d){return getUser({'name':_0x20148d})[_0x0a4f('0xe')](function(_0x3df47f){logger[_0x0a4f('0x6')](_0x0a4f('0x18'),_0x20148d,_0x3df47f?'found':_0x0a4f('0x16'));return _0x578e94(_0x3df47f);})[_0x0a4f('0xb')](function(_0x494a37){logger[_0x0a4f('0x9')]('[utils][getUserByName]',_0x494a37?util[_0x0a4f('0x7')](_0x494a37,{'showHidden':![],'depth':null}):'');return _0x578e94(null);});}return _0x578e94(null);});};exports[_0x0a4f('0x19')]=function(_0x34dfa7){return new BPromise(function(_0x8e0bb4,_0x431e86){if(_0x34dfa7){return client[_0x0a4f('0xa')](_0x0a4f('0x1a'),{'options':{'raw':!![],'attributes':['id','name',_0x0a4f('0x1b'),'acw','acwTimeout'],'where':{'name':_0x34dfa7},'limit':0x1}})[_0x0a4f('0xe')](function(_0x7363b5){logger[_0x0a4f('0x8')](_0x0a4f('0x1c'),_0x34dfa7,_0x7363b5?util['inspect'](_0x7363b5,{'showHidden':![],'depth':null}):'');logger[_0x0a4f('0x6')](_0x0a4f('0x1d'),_0x34dfa7,_0x7363b5?'found':'notfound');return _0x8e0bb4(_0x7363b5[_0x0a4f('0x11')]['length']?_0x7363b5[_0x0a4f('0x11')][0x0]:null);})[_0x0a4f('0xb')](function(_0x5a25de){logger[_0x0a4f('0x9')]('[utils][getVoiceQueueByName]',_0x5a25de?util[_0x0a4f('0x7')](_0x5a25de,{'showHidden':![],'depth':null}):'');return _0x8e0bb4(null);});}return _0x8e0bb4(null);});};exports[_0x0a4f('0x1e')]=function(_0x2e24f3,_0x5a354a){return moment(_0x2e24f3)[_0x0a4f('0x1f')](_0x5a354a,_0x0a4f('0x20'))[_0x0a4f('0x21')](_0x0a4f('0x22'));};exports[_0x0a4f('0x23')]=function(_0x5e573f,_0x2c74b2){return moment(_0x5e573f)[_0x0a4f('0x24')](_0x2c74b2,_0x0a4f('0x20'))[_0x0a4f('0x21')]('YYYY-MM-DD\x20HH:mm:ss');};exports[_0x0a4f('0x25')]=function(_0x2e0904,_0x477f73){return moment(_0x2e0904)[_0x0a4f('0x26')](moment(_0x477f73),_0x0a4f('0x20'));};exports[_0x0a4f('0x27')]=function(_0x2fc1a2,_0x3629d7){return parseInt(_0x2fc1a2,0xa)+parseInt(_0x3629d7,0xa);};exports[_0x0a4f('0x28')]=function(){return moment()[_0x0a4f('0x21')](_0x0a4f('0x22'));};exports[_0x0a4f('0x29')]=function(_0x4cdd39,_0x50fb62){if(_0x50fb62){return moment(_0x4cdd39)['isAfter'](_0x50fb62);}return!![];};exports[_0x0a4f('0x2a')]=function(_0x535a88,_0x1575af){if(_0x1575af){return moment(_0x535a88)[_0x0a4f('0x2a')](_0x1575af);}else if(_0x535a88){return!![];}return![];};
\ No newline at end of file
index c79108d..347d9b7 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xa215=['fs-extra','lodash','express-winston','path','util','./loggers','fileLogger','./mask-sensitive-data','maskSensitiveData','join','/var','log','xcally','client','name','ensureDir','catch','user','no-user','data','timestamp','error','api','auth','client-side-logger','use','logger','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s','isEmpty','body','\x20body=%s','format','method','headers','x-forwarded-for','connection','remoteAddress','statusCode','role','inspect','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s','agent_id','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s\x20(id=%s\x20name=%s)','url','responseTime','other','agent_name','test','setupLoggers'];(function(_0x17d9e3,_0x1f969c){var _0x14192d=function(_0x159745){while(--_0x159745){_0x17d9e3['push'](_0x17d9e3['shift']());}};_0x14192d(++_0x1f969c);}(_0xa215,0x1b9));var _0x5a21=function(_0x96c15f,_0x538403){_0x96c15f=_0x96c15f-0x0;var _0x202a78=_0xa215[_0x96c15f];return _0x202a78;};var fs=require(_0x5a21('0x0'));var _=require(_0x5a21('0x1'));var ewinston=require(_0x5a21('0x2'));var path=require(_0x5a21('0x3'));var util=require(_0x5a21('0x4'));var fileLogger=require(_0x5a21('0x5'))[_0x5a21('0x6')];var safeTemplate=require('./safe-template')['safeTemplate'];var maskSensitiveData=require(_0x5a21('0x7'))[_0x5a21('0x8')];function ClientSideLogger(){function _0x2aad1a(_0x45d085){var _0x2ecb2b=path[_0x5a21('0x9')](_0x5a21('0xa'),_0x5a21('0xb'),_0x5a21('0xc'));var _0x4f21c1=path[_0x5a21('0x9')](_0x5a21('0xd'),_0x45d085['role']+'-'+_0x45d085[_0x5a21('0xe')]);return fs[_0x5a21('0xf')](path[_0x5a21('0x9')](_0x2ecb2b,_0x4f21c1))['then'](function(){var _0x165967=fileLogger('client',path[_0x5a21('0x9')](_0x2ecb2b,_0x4f21c1));return _0x165967;})[_0x5a21('0x10')](function(_0x3f81da){throw _0x3f81da;});}this[_0x5a21('0xb')]=function(_0xb46c11,_0x45bed0,_0x19bf26,_0x4b55ab){return _0x2aad1a(_0xb46c11['user'])['then'](function(_0x2c3bfd){var _0x1e13b8=_0x2c3bfd[_0x45bed0];return _0x1e13b8;})['then'](function(_0x50fa41){var _0x55baa1=_0xb46c11[_0x5a21('0x11')]?_0xb46c11[_0x5a21('0x11')]['id']:_0x5a21('0x12');var _0x5056b6=_0x4b55ab[_0x5a21('0x13')];var _0x4fe8db=_0x4b55ab[_0x5a21('0x14')];var _0x1e02b9=new Date(Number(_0x4fe8db));return _0x50fa41(_0x55baa1,_0x1e02b9,_0x19bf26,_0x5056b6);})[_0x5a21('0x10')](function(_0x1cad4c){fileLogger('client')[_0x5a21('0x15')](_0x1cad4c);});};}function setupLoggers(_0x13e80e){return new Promise(function(_0x470336){var _0x8a32e5=new ClientSideLogger();var _0x21f554=fileLogger(_0x5a21('0x16'));var _0x9ad147=fileLogger(_0x5a21('0x17'));_0x13e80e['set'](_0x5a21('0x18'),_0x8a32e5);_0x13e80e[_0x5a21('0x19')](ewinston[_0x5a21('0x1a')]({'winstonInstance':_0x21f554,'meta':![],'statusLevels':!![],'msg':function(_0x8d910c,_0x143b7a){var _0x4ee72c=_0x5a21('0x1b');if(!_[_0x5a21('0x1c')](_0x8d910c[_0x5a21('0x1d')])){_0x4ee72c+=_0x5a21('0x1e');var _0x484ede=_0x8d910c[_0x5a21('0x1d')];maskSensitiveData(_0x484ede);}return safeTemplate(util[_0x5a21('0x1f')](_0x4ee72c,_0x8d910c[_0x5a21('0x20')],_0x8d910c[_0x5a21('0x21')][_0x5a21('0x22')]?_0x8d910c[_0x5a21('0x21')][_0x5a21('0x22')]:_0x8d910c[_0x5a21('0x23')][_0x5a21('0x24')]||_0x8d910c['ip'],_0x8d910c['url'],_0x143b7a[_0x5a21('0x25')],_0x143b7a['responseTime'],_0x8d910c[_0x5a21('0x11')]?_0x8d910c['user']['id']:null,_0x8d910c[_0x5a21('0x11')]?_0x8d910c['user'][_0x5a21('0xe')]:null,_0x8d910c[_0x5a21('0x11')]?_0x8d910c['user'][_0x5a21('0x26')]:null,_0x484ede?util[_0x5a21('0x27')](_0x484ede,![],null):''));}}));_0x13e80e[_0x5a21('0x19')](ewinston[_0x5a21('0x1a')]({'winstonInstance':_0x9ad147,'meta':![],'statusLevels':!![],'msg':function(_0x1dedb5,_0x14c421){var _0x59a6b1=_0x5a21('0x28');if(_0x1dedb5[_0x5a21('0x1d')]&&_0x1dedb5[_0x5a21('0x1d')]['device']&&_0x1dedb5[_0x5a21('0x1d')][_0x5a21('0x29')]){_0x59a6b1=_0x5a21('0x2a');}return util[_0x5a21('0x1f')](_0x59a6b1,_0x1dedb5['method'],_0x1dedb5['headers']['x-forwarded-for']?_0x1dedb5['headers'][_0x5a21('0x22')]:_0x1dedb5[_0x5a21('0x23')][_0x5a21('0x24')]||_0x1dedb5['ip'],_0x1dedb5[_0x5a21('0x2b')],_0x14c421[_0x5a21('0x25')],_0x14c421[_0x5a21('0x2c')],_0x1dedb5[_0x5a21('0x11')]?_0x1dedb5['user']['id']:null,_0x1dedb5[_0x5a21('0x11')]?_0x1dedb5['user'][_0x5a21('0xe')]:null,_0x1dedb5[_0x5a21('0x11')]?_0x1dedb5[_0x5a21('0x11')][_0x5a21('0x26')]:null,_0x1dedb5[_0x5a21('0x1d')]&&_0x1dedb5['body']['device']?_0x1dedb5['body']['device']:_0x5a21('0x2d'),_0x1dedb5[_0x5a21('0x1d')]&&_0x1dedb5[_0x5a21('0x1d')][_0x5a21('0x29')]?_0x1dedb5[_0x5a21('0x1d')][_0x5a21('0x29')]:'',_0x1dedb5[_0x5a21('0x1d')]&&_0x1dedb5['body'][_0x5a21('0x2e')]?_0x1dedb5[_0x5a21('0x1d')][_0x5a21('0x2e')]:'');},'ignoreRoute':function(_0x23bdcd){var _0x5b263a=/\/api\/users\/[0-9]+\/(login|logout)/gi;return!_0x5b263a[_0x5a21('0x2f')](_0x23bdcd[_0x5a21('0x2b')]);}}));return _0x470336();});}exports[_0x5a21('0x30')]=setupLoggers;
\ No newline at end of file
+var _0x381a=['data','timestamp','error','api','auth','set','use','logger','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s','body','method','headers','x-forwarded-for','connection','remoteAddress','url','statusCode','name','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s','device','agent_id','%s\x20%s\x20%s\x20%s\x20%sms\x20id=%s\x20name=%s\x20role=%s\x20device=%s\x20(id=%s\x20name=%s)','format','responseTime','agent_name','test','setupLoggers','lodash','path','./loggers','fileLogger','./safe-template','./mask-sensitive-data','maskSensitiveData','join','log','client','role','ensureDir','then','catch','user','no-user'];(function(_0xae7c2f,_0xf31e04){var _0x5d7001=function(_0x4eeadb){while(--_0x4eeadb){_0xae7c2f['push'](_0xae7c2f['shift']());}};_0x5d7001(++_0xf31e04);}(_0x381a,0x71));var _0xa381=function(_0x3afd4e,_0x47a3e9){_0x3afd4e=_0x3afd4e-0x0;var _0x87932c=_0x381a[_0x3afd4e];return _0x87932c;};var fs=require('fs-extra');var _=require(_0xa381('0x0'));var ewinston=require('express-winston');var path=require(_0xa381('0x1'));var util=require('util');var fileLogger=require(_0xa381('0x2'))[_0xa381('0x3')];var safeTemplate=require(_0xa381('0x4'))['safeTemplate'];var maskSensitiveData=require(_0xa381('0x5'))[_0xa381('0x6')];function ClientSideLogger(){function _0x4ecda1(_0x5139c1){var _0x128935=path[_0xa381('0x7')]('/var',_0xa381('0x8'),'xcally');var _0x2e9a6f=path['join'](_0xa381('0x9'),_0x5139c1[_0xa381('0xa')]+'-'+_0x5139c1['name']);return fs[_0xa381('0xb')](path[_0xa381('0x7')](_0x128935,_0x2e9a6f))[_0xa381('0xc')](function(){var _0x37cbf8=fileLogger('client',path[_0xa381('0x7')](_0x128935,_0x2e9a6f));return _0x37cbf8;})[_0xa381('0xd')](function(_0x58897e){throw _0x58897e;});}this['log']=function(_0x251a47,_0xb45ab,_0x2ed710,_0x5bd393){return _0x4ecda1(_0x251a47[_0xa381('0xe')])[_0xa381('0xc')](function(_0x53680e){var _0x4b31fd=_0x53680e[_0xb45ab];return _0x4b31fd;})[_0xa381('0xc')](function(_0x276582){var _0x5b29da=_0x251a47[_0xa381('0xe')]?_0x251a47[_0xa381('0xe')]['id']:_0xa381('0xf');var _0xb8da86=_0x5bd393[_0xa381('0x10')];var _0x556608=_0x5bd393[_0xa381('0x11')];var _0x5ad760=new Date(Number(_0x556608));return _0x276582(_0x5b29da,_0x5ad760,_0x2ed710,_0xb8da86);})[_0xa381('0xd')](function(_0xa309b4){fileLogger(_0xa381('0x9'))[_0xa381('0x12')](_0xa309b4);});};}function setupLoggers(_0x12ea2b){return new Promise(function(_0x5910ab){var _0x499171=new ClientSideLogger();var _0x38615b=fileLogger(_0xa381('0x13'));var _0x539977=fileLogger(_0xa381('0x14'));_0x12ea2b[_0xa381('0x15')]('client-side-logger',_0x499171);_0x12ea2b[_0xa381('0x16')](ewinston[_0xa381('0x17')]({'winstonInstance':_0x38615b,'meta':![],'statusLevels':!![],'msg':function(_0x369cb4,_0x3bffab){var _0x396f79=_0xa381('0x18');if(!_['isEmpty'](_0x369cb4[_0xa381('0x19')])){_0x396f79+='\x20body=%s';var _0x570e22=_0x369cb4['body'];maskSensitiveData(_0x570e22);}return safeTemplate(util['format'](_0x396f79,_0x369cb4[_0xa381('0x1a')],_0x369cb4[_0xa381('0x1b')][_0xa381('0x1c')]?_0x369cb4[_0xa381('0x1b')][_0xa381('0x1c')]:_0x369cb4[_0xa381('0x1d')][_0xa381('0x1e')]||_0x369cb4['ip'],_0x369cb4[_0xa381('0x1f')],_0x3bffab[_0xa381('0x20')],_0x3bffab['responseTime'],_0x369cb4[_0xa381('0xe')]?_0x369cb4['user']['id']:null,_0x369cb4['user']?_0x369cb4[_0xa381('0xe')][_0xa381('0x21')]:null,_0x369cb4[_0xa381('0xe')]?_0x369cb4[_0xa381('0xe')][_0xa381('0xa')]:null,_0x570e22?util['inspect'](_0x570e22,![],null):''));}}));_0x12ea2b['use'](ewinston[_0xa381('0x17')]({'winstonInstance':_0x539977,'meta':![],'statusLevels':!![],'msg':function(_0x3ff690,_0x1eca30){var _0x33abe4=_0xa381('0x22');if(_0x3ff690['body']&&_0x3ff690['body'][_0xa381('0x23')]&&_0x3ff690['body'][_0xa381('0x24')]){_0x33abe4=_0xa381('0x25');}return util[_0xa381('0x26')](_0x33abe4,_0x3ff690[_0xa381('0x1a')],_0x3ff690[_0xa381('0x1b')]['x-forwarded-for']?_0x3ff690[_0xa381('0x1b')]['x-forwarded-for']:_0x3ff690['connection'][_0xa381('0x1e')]||_0x3ff690['ip'],_0x3ff690[_0xa381('0x1f')],_0x1eca30['statusCode'],_0x1eca30[_0xa381('0x27')],_0x3ff690['user']?_0x3ff690['user']['id']:null,_0x3ff690['user']?_0x3ff690[_0xa381('0xe')][_0xa381('0x21')]:null,_0x3ff690[_0xa381('0xe')]?_0x3ff690[_0xa381('0xe')][_0xa381('0xa')]:null,_0x3ff690[_0xa381('0x19')]&&_0x3ff690['body']['device']?_0x3ff690[_0xa381('0x19')][_0xa381('0x23')]:'other',_0x3ff690[_0xa381('0x19')]&&_0x3ff690[_0xa381('0x19')][_0xa381('0x24')]?_0x3ff690[_0xa381('0x19')][_0xa381('0x24')]:'',_0x3ff690['body']&&_0x3ff690[_0xa381('0x19')][_0xa381('0x28')]?_0x3ff690[_0xa381('0x19')][_0xa381('0x28')]:'');},'ignoreRoute':function(_0x57f854){var _0x1d06c9=/\/api\/users\/[0-9]+\/(login|logout)/gi;return!_0x1d06c9[_0xa381('0x29')](_0x57f854[_0xa381('0x1f')]);}}));return _0x5910ab();});}exports[_0xa381('0x2a')]=setupLoggers;
\ No newline at end of file
index 9be26b4..bc6797c 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x7104=['startOf','day','isBetween','format','ddd','includes','dowCompare','date','daysInMonth','min','max','domCompare','MMM','guess','test','isMoment','split','padStart','length','iftime','lodash','moment-timezone','map','join','Interval\x20string\x20not\x20valid','Date\x20not\x20valid','isValid','locale','weekdaysShort','toLowerCase','slice','concat','exports','circularDoWInterval','indexOf','clone','hours','minutes','isBefore'];(function(_0x29696a,_0x504c71){var _0x1cb7fd=function(_0x1d0f2c){while(--_0x1d0f2c){_0x29696a['push'](_0x29696a['shift']());}};_0x1cb7fd(++_0x504c71);}(_0x7104,0x14c));var _0x4710=function(_0x32e878,_0x3d8e58){_0x32e878=_0x32e878-0x0;var _0x592df3=_0x7104[_0x32e878];return _0x592df3;};var _=require(_0x4710('0x0'));var moment=require(_0x4710('0x1'));var timeRx=/(\*|(\d{1,2}:\d{1,2})(-(\d{1,2}:\d{1,2}))?)/;var dowRx=/(\*|((sun|mon|tue|wed|thu|fri|sat)(-(sun|mon|tue|wed|thu|fri|sat))?))/;var domRx=/(\*|(\d{1,2})(-(\d{1,2}))?)/;var moyRx=/(\*|(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)(-(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec))?)/;var globalRx=[timeRx,dowRx,domRx,moyRx][_0x4710('0x2')](function(_0x1c45e8){return _0x1c45e8['source'];})[_0x4710('0x3')](',');var validateRx=new RegExp('^'+globalRx+'$');var EINVALID_STRING=_0x4710('0x4');var EINVALID_DATE=_0x4710('0x5');function throwIfDateNotValid(_0x1e1af1){if(!_0x1e1af1[_0x4710('0x6')]()){throw new Error(EINVALID_DATE);}}function extractTime(_0x5dddeb){var _0x3b5d9e=_0x5dddeb['split'](':')[_0x4710('0x2')](function(_0x22b34f){return parseInt(_0x22b34f,0xa);});var _0x1fe632=_0x3b5d9e[0x0];var _0x3a99f1=_0x3b5d9e[0x1];if(_0x1fe632<0x0||_0x1fe632>0x17||_0x3a99f1<0x0||_0x3a99f1>0x3b){throw new Error(EINVALID_DATE);}return[_0x1fe632,_0x3a99f1];}function circularDoWInterval(_0x557244,_0x4977e1){if(_0x557244===_0x4977e1){return[_0x557244];}else{var _0x550f57=moment[_0x4710('0x7')]();moment['locale']('en');var _0x2ad1b1=moment[_0x4710('0x8')]()[_0x4710('0x2')](function(_0x2ead43){return _0x2ead43[_0x4710('0x9')]();});moment[_0x4710('0x7')](_0x550f57);var _0x3c1109=_0x2ad1b1['indexOf'](_0x557244);var _0x3f5281=_0x2ad1b1['indexOf'](_0x4977e1);if(_0x3f5281>_0x3c1109){return _0x2ad1b1['slice'](_0x3c1109,_0x3f5281+0x1);}else{var _0x1cffcb=_0x2ad1b1[_0x4710('0xa')](0x0,_0x3f5281+0x1);var _0xe4a690=_0x2ad1b1['slice'](_0x3c1109);return _0xe4a690[_0x4710('0xb')](_0x1cffcb);}}}module[_0x4710('0xc')][_0x4710('0xd')]=circularDoWInterval;function circularMonthInterval(_0x222d62,_0xcb5b4d){if(_0x222d62===_0xcb5b4d){return[_0x222d62];}else{var _0x1db7f3=moment[_0x4710('0x7')]();moment[_0x4710('0x7')]('en');var _0x4b877b=moment['monthsShort']()[_0x4710('0x2')](function(_0xb6cef2){return _0xb6cef2[_0x4710('0x9')]();});moment['locale'](_0x1db7f3);var _0x4bcc57=_0x4b877b[_0x4710('0xe')](_0x222d62);var _0x290d8b=_0x4b877b[_0x4710('0xe')](_0xcb5b4d);if(_0x290d8b>_0x4bcc57){return _0x4b877b[_0x4710('0xa')](_0x4bcc57,_0x290d8b+0x1);}else{var _0x248839=_0x4b877b[_0x4710('0xa')](0x0,_0x290d8b+0x1);var _0x20359b=_0x4b877b['slice'](_0x4bcc57);return _0x20359b[_0x4710('0xb')](_0x248839);}}}module[_0x4710('0xc')]['circularMonthInterval']=circularMonthInterval;function parseDom(_0x4b083b){var _0x4693f2=parseInt(_0x4b083b,0xa);if(_0x4693f2<0x1||_0x4693f2>0x1f){throw new Error(EINVALID_DATE);}return _0x4693f2;}function timeCompare(_0x438df4,_0x2466fb,_0x4a8a3f){var _0x179a40=_0x438df4[_0x4710('0xf')]();var _0x220011=extractTime(_0x2466fb);var _0xeca6ef=_0x220011[0x0];var _0x58b934=_0x220011[0x1];var _0x396aa8=_0x438df4['clone']()[_0x4710('0x10')](_0xeca6ef)[_0x4710('0x11')](_0x58b934);throwIfDateNotValid(_0x396aa8);var _0x227f25=extractTime(_0x4a8a3f);var _0x49cf74=_0x227f25[0x0];var _0x176ff1=_0x227f25[0x1];var _0x3f2f56=_0x438df4[_0x4710('0xf')]()[_0x4710('0x10')](_0x49cf74)[_0x4710('0x11')](_0x176ff1);throwIfDateNotValid(_0x3f2f56);if(_0x3f2f56[_0x4710('0x12')](_0x396aa8)){var _0x3b2bfd=_0x179a40[_0x4710('0xf')]()[_0x4710('0x13')](_0x4710('0x14'));var _0xc6eb9b=_0x179a40['clone']()['endOf']('day');return _0x179a40['isBetween'](_0x396aa8,_0xc6eb9b,undefined,'[]')||_0x179a40[_0x4710('0x15')](_0x3b2bfd,_0x3f2f56,undefined,'[]');}else{return _0x179a40['isBetween'](_0x396aa8,_0x3f2f56,undefined,'[]');}}module[_0x4710('0xc')]['timeCompare']=timeCompare;function dowCompare(_0x2273d8,_0x27971c,_0x4f4747){var _0x8f5017=_0x2273d8[_0x4710('0x7')]('en')[_0x4710('0x16')](_0x4710('0x17'))[_0x4710('0x9')]();return circularDoWInterval(_0x27971c,_0x4f4747)[_0x4710('0x18')](_0x8f5017);}module['exports'][_0x4710('0x19')]=dowCompare;function domCompare(_0x306064,_0x5d3328,_0x4ee53d){var _0xc5518c=_0x306064[_0x4710('0x1a')]();if(_0x5d3328===_0x4ee53d){return _0xc5518c===_0x5d3328;}else{var _0x134e38=_0x306064[_0x4710('0x1b')]();var _0x321292=_0x5d3328<_0x4ee53d;let _0x4d5bdd=![];var _0x5ba10d=0x0;var _0x5266c6=0x0;if(_0x321292){_0x5ba10d=Math['max'](0x1,_0x5d3328);_0x5266c6=Math[_0x4710('0x1c')](_0x4ee53d,_0x134e38);_0x4d5bdd=_0xc5518c>=_0x5ba10d&&_0xc5518c<=_0x5266c6;}else{_0x5ba10d=Math[_0x4710('0x1c')](_0x5d3328,_0x134e38);_0x5266c6=Math[_0x4710('0x1d')](0x1,_0x4ee53d);_0x4d5bdd=_0xc5518c>=_0x5ba10d||_0xc5518c<=_0x5266c6;}return _0x4d5bdd;}}module[_0x4710('0xc')][_0x4710('0x1e')]=domCompare;function monthCompare(_0x19efa5,_0x57b6fa,_0xb71474){var _0x4ed849=_0x19efa5[_0x4710('0x7')]('en')[_0x4710('0x16')](_0x4710('0x1f'))[_0x4710('0x9')]();return circularMonthInterval(_0x57b6fa,_0xb71474)[_0x4710('0x18')](_0x4ed849);}module['exports']['monthCompare']=monthCompare;function iftime(_0x531e1c,_0x32b239=moment['tz'][_0x4710('0x20')](),_0x28a1e8=moment()){if(!validateRx[_0x4710('0x21')](_0x531e1c)){throw new Error(EINVALID_STRING);}else{var _0x314ffa=(moment[_0x4710('0x22')](_0x28a1e8)?_0x28a1e8[_0x4710('0xf')]():moment(_0x28a1e8))['tz'](_0x32b239)[_0x4710('0x7')]('en');throwIfDateNotValid(_0x314ffa);var _0x3c3fe3=_0x531e1c['split'](',');var _0x35e4dc=_0x3c3fe3[0x0];var _0x3f9191=_0x3c3fe3[0x1];var _0xcfe95c=_0x3c3fe3[0x2];var _0x3cdfca=_0x3c3fe3[0x3];let _0x2a5a63=!![];if(_0x35e4dc!=='*'){var _0x4e2f5a=_0x35e4dc[_0x4710('0x23')]('-');var _0x1fca9e=_[_0x4710('0x24')](_0x4e2f5a[0x0],0x5,'0');var _0x382b53=_0x4e2f5a['length']===0x2?_[_0x4710('0x24')](_0x4e2f5a[0x1],0x5,'0'):_0x1fca9e;_0x2a5a63=timeCompare(_0x314ffa,_0x1fca9e,_0x382b53);}let _0x1cbe26=!![];if(_0x3f9191!=='*'){var _0x506df7=_0x3f9191['split']('-');var _0xe9c3ea=_0x506df7[0x0];var _0x2216e7=_0x506df7[_0x4710('0x25')]===0x2?_0x506df7[0x1]:_0xe9c3ea;_0x1cbe26=dowCompare(_0x314ffa,_0xe9c3ea,_0x2216e7);}let _0x243b44=!![];if(_0xcfe95c!=='*'){var _0x12f850=_0xcfe95c[_0x4710('0x23')]('-');var _0x3feace=parseDom(_0x12f850[0x0]);var _0x59a68d=_0x12f850[_0x4710('0x25')]===0x2?parseDom(_0x12f850[0x1]):_0x3feace;_0x243b44=domCompare(_0x314ffa,_0x3feace,_0x59a68d);}let _0x28869b=!![];if(_0x3cdfca!=='*'){var _0x1b7d51=_0x3cdfca['split']('-');var _0x382d73=_0x1b7d51[0x0];var _0x4eeac5=_0x1b7d51[_0x4710('0x25')]===0x2?_0x1b7d51[0x1]:_0x1b7d51[0x0];_0x28869b=monthCompare(_0x314ffa,_0x382d73,_0x4eeac5);}return _0x2a5a63&&_0x1cbe26&&_0x243b44&&_0x28869b;}}module[_0x4710('0xc')][_0x4710('0x26')]=iftime;
\ No newline at end of file
+var _0x3722=['test','isMoment','clone','length','padStart','iftime','lodash','map','source','Interval\x20string\x20not\x20valid','Date\x20not\x20valid','isValid','split','weekdaysShort','indexOf','slice','concat','locale','toLowerCase','exports','hours','minutes','endOf','isBetween','timeCompare','format','ddd','dowCompare','date','daysInMonth','min','domCompare','MMM','includes','monthCompare','guess'];(function(_0xe66cf2,_0x32ba5f){var _0x2d84e7=function(_0x58a7d8){while(--_0x58a7d8){_0xe66cf2['push'](_0xe66cf2['shift']());}};_0x2d84e7(++_0x32ba5f);}(_0x3722,0x102));var _0x2372=function(_0x5008c8,_0x342e4a){_0x5008c8=_0x5008c8-0x0;var _0x28d778=_0x3722[_0x5008c8];return _0x28d778;};var _=require(_0x2372('0x0'));var moment=require('moment-timezone');var timeRx=/(\*|(\d{1,2}:\d{1,2})(-(\d{1,2}:\d{1,2}))?)/;var dowRx=/(\*|((sun|mon|tue|wed|thu|fri|sat)(-(sun|mon|tue|wed|thu|fri|sat))?))/;var domRx=/(\*|(\d{1,2})(-(\d{1,2}))?)/;var moyRx=/(\*|(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)(-(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec))?)/;var globalRx=[timeRx,dowRx,domRx,moyRx][_0x2372('0x1')](function(_0x15efc9){return _0x15efc9[_0x2372('0x2')];})['join'](',');var validateRx=new RegExp('^'+globalRx+'$');var EINVALID_STRING=_0x2372('0x3');var EINVALID_DATE=_0x2372('0x4');function throwIfDateNotValid(_0x98e68b){if(!_0x98e68b[_0x2372('0x5')]()){throw new Error(EINVALID_DATE);}}function extractTime(_0xaff261){var _0x3cf2a2=_0xaff261[_0x2372('0x6')](':')[_0x2372('0x1')](function(_0x1f0ab4){return parseInt(_0x1f0ab4,0xa);});var _0x56dd19=_0x3cf2a2[0x0];var _0x4b29d9=_0x3cf2a2[0x1];if(_0x56dd19<0x0||_0x56dd19>0x17||_0x4b29d9<0x0||_0x4b29d9>0x3b){throw new Error(EINVALID_DATE);}return[_0x56dd19,_0x4b29d9];}function circularDoWInterval(_0x4b05e4,_0x4dd350){if(_0x4b05e4===_0x4dd350){return[_0x4b05e4];}else{var _0x2ec378=moment['locale']();moment['locale']('en');var _0x2f5aeb=moment[_0x2372('0x7')]()['map'](function(_0x48d390){return _0x48d390['toLowerCase']();});moment['locale'](_0x2ec378);var _0x1494bf=_0x2f5aeb[_0x2372('0x8')](_0x4b05e4);var _0x3a3d50=_0x2f5aeb[_0x2372('0x8')](_0x4dd350);if(_0x3a3d50>_0x1494bf){return _0x2f5aeb[_0x2372('0x9')](_0x1494bf,_0x3a3d50+0x1);}else{var _0x368fdb=_0x2f5aeb['slice'](0x0,_0x3a3d50+0x1);var _0xb1cfa7=_0x2f5aeb[_0x2372('0x9')](_0x1494bf);return _0xb1cfa7[_0x2372('0xa')](_0x368fdb);}}}module['exports']['circularDoWInterval']=circularDoWInterval;function circularMonthInterval(_0x2e3da7,_0x2195a0){if(_0x2e3da7===_0x2195a0){return[_0x2e3da7];}else{var _0x437310=moment[_0x2372('0xb')]();moment[_0x2372('0xb')]('en');var _0x2b7799=moment['monthsShort']()[_0x2372('0x1')](function(_0x60f62e){return _0x60f62e[_0x2372('0xc')]();});moment[_0x2372('0xb')](_0x437310);var _0xff92fa=_0x2b7799[_0x2372('0x8')](_0x2e3da7);var _0x5b3b8c=_0x2b7799[_0x2372('0x8')](_0x2195a0);if(_0x5b3b8c>_0xff92fa){return _0x2b7799['slice'](_0xff92fa,_0x5b3b8c+0x1);}else{var _0x2f1051=_0x2b7799['slice'](0x0,_0x5b3b8c+0x1);var _0x10ee96=_0x2b7799['slice'](_0xff92fa);return _0x10ee96['concat'](_0x2f1051);}}}module[_0x2372('0xd')]['circularMonthInterval']=circularMonthInterval;function parseDom(_0x277928){var _0x475549=parseInt(_0x277928,0xa);if(_0x475549<0x1||_0x475549>0x1f){throw new Error(EINVALID_DATE);}return _0x475549;}function timeCompare(_0x5acb52,_0x4470d1,_0x27f1ec){var _0x130b3a=_0x5acb52['clone']();var _0xbaa9d1=extractTime(_0x4470d1);var _0x165b19=_0xbaa9d1[0x0];var _0x3579e8=_0xbaa9d1[0x1];var _0x33b6e1=_0x5acb52['clone']()[_0x2372('0xe')](_0x165b19)[_0x2372('0xf')](_0x3579e8);throwIfDateNotValid(_0x33b6e1);var _0x2ae5e4=extractTime(_0x27f1ec);var _0x2386f6=_0x2ae5e4[0x0];var _0x2c5c35=_0x2ae5e4[0x1];var _0x86971=_0x5acb52['clone']()['hours'](_0x2386f6)[_0x2372('0xf')](_0x2c5c35);throwIfDateNotValid(_0x86971);if(_0x86971['isBefore'](_0x33b6e1)){var _0x4ed04d=_0x130b3a['clone']()['startOf']('day');var _0x5e2fa8=_0x130b3a['clone']()[_0x2372('0x10')]('day');return _0x130b3a[_0x2372('0x11')](_0x33b6e1,_0x5e2fa8,undefined,'[]')||_0x130b3a[_0x2372('0x11')](_0x4ed04d,_0x86971,undefined,'[]');}else{return _0x130b3a['isBetween'](_0x33b6e1,_0x86971,undefined,'[]');}}module[_0x2372('0xd')][_0x2372('0x12')]=timeCompare;function dowCompare(_0x12e67f,_0x248022,_0x1ae8e3){var _0x2d0b2a=_0x12e67f['locale']('en')[_0x2372('0x13')](_0x2372('0x14'))[_0x2372('0xc')]();return circularDoWInterval(_0x248022,_0x1ae8e3)['includes'](_0x2d0b2a);}module[_0x2372('0xd')][_0x2372('0x15')]=dowCompare;function domCompare(_0x2b2773,_0x3cc15d,_0x454406){var _0xcd679c=_0x2b2773[_0x2372('0x16')]();if(_0x3cc15d===_0x454406){return _0xcd679c===_0x3cc15d;}else{var _0x570d16=_0x2b2773[_0x2372('0x17')]();var _0x5daf09=_0x3cc15d<_0x454406;let _0x35cce9=![];var _0x578317=0x0;var _0x519fbf=0x0;if(_0x5daf09){_0x578317=Math['max'](0x1,_0x3cc15d);_0x519fbf=Math[_0x2372('0x18')](_0x454406,_0x570d16);_0x35cce9=_0xcd679c>=_0x578317&&_0xcd679c<=_0x519fbf;}else{_0x578317=Math[_0x2372('0x18')](_0x3cc15d,_0x570d16);_0x519fbf=Math['max'](0x1,_0x454406);_0x35cce9=_0xcd679c>=_0x578317||_0xcd679c<=_0x519fbf;}return _0x35cce9;}}module['exports'][_0x2372('0x19')]=domCompare;function monthCompare(_0x2af446,_0x1b0b01,_0x42442d){var _0x2bcd3a=_0x2af446['locale']('en')[_0x2372('0x13')](_0x2372('0x1a'))['toLowerCase']();return circularMonthInterval(_0x1b0b01,_0x42442d)[_0x2372('0x1b')](_0x2bcd3a);}module['exports'][_0x2372('0x1c')]=monthCompare;function iftime(_0x449217,_0x5e8853=moment['tz'][_0x2372('0x1d')](),_0x159286=moment()){if(!validateRx[_0x2372('0x1e')](_0x449217)){throw new Error(EINVALID_STRING);}else{var _0x35cc4a=(moment[_0x2372('0x1f')](_0x159286)?_0x159286[_0x2372('0x20')]():moment(_0x159286))['tz'](_0x5e8853)['locale']('en');throwIfDateNotValid(_0x35cc4a);var _0x691c4c=_0x449217[_0x2372('0x6')](',');var _0x16198c=_0x691c4c[0x0];var _0x380d57=_0x691c4c[0x1];var _0xc3b35b=_0x691c4c[0x2];var _0x431337=_0x691c4c[0x3];let _0x1b3330=!![];if(_0x16198c!=='*'){var _0xb83a5d=_0x16198c['split']('-');var _0x20a027=_['padStart'](_0xb83a5d[0x0],0x5,'0');var _0x3e88bd=_0xb83a5d[_0x2372('0x21')]===0x2?_[_0x2372('0x22')](_0xb83a5d[0x1],0x5,'0'):_0x20a027;_0x1b3330=timeCompare(_0x35cc4a,_0x20a027,_0x3e88bd);}let _0x3e0c94=!![];if(_0x380d57!=='*'){var _0x42e06d=_0x380d57[_0x2372('0x6')]('-');var _0x583b5a=_0x42e06d[0x0];var _0x5b1dbf=_0x42e06d[_0x2372('0x21')]===0x2?_0x42e06d[0x1]:_0x583b5a;_0x3e0c94=dowCompare(_0x35cc4a,_0x583b5a,_0x5b1dbf);}let _0x4519a2=!![];if(_0xc3b35b!=='*'){var _0x22540f=_0xc3b35b[_0x2372('0x6')]('-');var _0x84f526=parseDom(_0x22540f[0x0]);var _0xff52b9=_0x22540f[_0x2372('0x21')]===0x2?parseDom(_0x22540f[0x1]):_0x84f526;_0x4519a2=domCompare(_0x35cc4a,_0x84f526,_0xff52b9);}let _0x5dbc56=!![];if(_0x431337!=='*'){var _0x57cbfa=_0x431337[_0x2372('0x6')]('-');var _0x1fa2b7=_0x57cbfa[0x0];var _0xefe151=_0x57cbfa[_0x2372('0x21')]===0x2?_0x57cbfa[0x1]:_0x57cbfa[0x0];_0x5dbc56=monthCompare(_0x35cc4a,_0x1fa2b7,_0xefe151);}return _0x1b3330&&_0x3e0c94&&_0x4519a2&&_0x5dbc56;}}module['exports'][_0x2372('0x23')]=iftime;
\ No newline at end of file
index 743d11d..095bf21 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x3e03=['level','toUpperCase','meta','length','stringify','[%s]\x20[%s]\x20%s\x20-\x20%s\x20%s','Logger','warn','transports','File','%s-%s','error','consoleLogger','fileLogger','path','util','winston','../config/environment','debugLevel','toLowerCase','info','redBG\x20white','red','bold\x20yellow','white','bold\x20white','bold\x20green','gray','bold\x20magenta','bold\x20cyan','/var/log/xcally','format','%s-%s.log','message','replace','}}}','[%s]\x20[%s]\x20%s\x20-\x20%s','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x2a7b8e,_0x50ffce){var _0x29b5c8=function(_0x131fe0){while(--_0x131fe0){_0x2a7b8e['push'](_0x2a7b8e['shift']());}};_0x29b5c8(++_0x50ffce);}(_0x3e03,0x1d6));var _0x33e0=function(_0x134bfc,_0x144d5f){_0x134bfc=_0x134bfc-0x0;var _0x2f4dcc=_0x3e03[_0x134bfc];return _0x2f4dcc;};'use strict';var path=require(_0x33e0('0x0'));var util=require(_0x33e0('0x1'));var moment=require('moment');var winston=require(_0x33e0('0x2'));var config=require(_0x33e0('0x3'));var debugLevel=config['debugLevel']?config[_0x33e0('0x4')][_0x33e0('0x5')]():_0x33e0('0x6');var XC_LOG_LEVELS={'fatal':0x0,'error':0x0,'warn':0x1,'info':0x2,'print':0x2,'success':0x2,'http':0x3,'verbose':0x4,'debug':0x5,'silly':0x6};var XC_LOG_COLORS={'fatal':_0x33e0('0x7'),'error':_0x33e0('0x8'),'warn':_0x33e0('0x9'),'info':_0x33e0('0xa'),'print':_0x33e0('0xb'),'success':_0x33e0('0xc'),'http':_0x33e0('0xd'),'verbose':_0x33e0('0xe'),'debug':'bold\x20blue','silly':_0x33e0('0xf')};winston['addColors'](XC_LOG_COLORS);function getLogFileName(_0x467ba1,_0x2e14c0,_0x5548cf){var _0x19a10a=_0x467ba1||_0x33e0('0x10');return path['join'](_0x19a10a,util[_0x33e0('0x11')](_0x33e0('0x12'),_0x2e14c0,_0x5548cf));}function formatter(_0x164e49,_0x43d19f){_0x43d19f[_0x33e0('0x13')]=_0x43d19f[_0x33e0('0x13')][_0x33e0('0x14')](/@@{/g,'{{{')['replace'](/}@@/g,_0x33e0('0x15'))[_0x33e0('0x14')](/@{/g,'{{')['replace'](/}@/g,'}}');return util[_0x33e0('0x11')](_0x33e0('0x16'),moment()[_0x33e0('0x11')](_0x33e0('0x17')),_0x43d19f[_0x33e0('0x18')][_0x33e0('0x19')](),_0x164e49,_0x43d19f[_0x33e0('0x13')]);}function fileFormat(_0x5ae257,_0x56807f){_0x56807f['message']=_0x56807f['message'][_0x33e0('0x14')](/@@{/g,'{{{')['replace'](/}@@/g,_0x33e0('0x15'))[_0x33e0('0x14')](/@{/g,'{{')[_0x33e0('0x14')](/}@/g,'}}');var _0x4cf542=_0x56807f[_0x33e0('0x1a')]&&Object['keys'](_0x56807f['meta'])[_0x33e0('0x1b')]?'\x0a\x09'+JSON[_0x33e0('0x1c')](_0x56807f[_0x33e0('0x1a')]):'';return util[_0x33e0('0x11')](_0x33e0('0x1d'),moment()[_0x33e0('0x11')](_0x33e0('0x17')),_0x56807f[_0x33e0('0x18')]['toUpperCase'](),_0x5ae257,_0x56807f['message'],_0x4cf542);}function consoleLogger(){var _0x35bbc9=new winston[(_0x33e0('0x1e'))]({'levels':XC_LOG_LEVELS,'transports':[new winston['transports']['Console']({'level':_0x33e0('0x1f'),'json':![],'formatter':function(_0x2928f7){return formatter('',_0x2928f7);}})]});return _0x35bbc9;}function fileLogger(_0x23c126,_0xab58cc){var _0x4ea911=new winston[(_0x33e0('0x1e'))]({'levels':XC_LOG_LEVELS,'transports':[new winston[(_0x33e0('0x20'))][(_0x33e0('0x21'))]({'name':util[_0x33e0('0x11')](_0x33e0('0x22'),_0x23c126,_0x33e0('0x23')),'filename':getLogFileName(_0xab58cc,_0x23c126,_0x33e0('0x23')),'level':_0x33e0('0x23'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x3b2d1f){return fileFormat(_0x23c126,_0x3b2d1f);}}),new winston[(_0x33e0('0x20'))]['File']({'name':util['format'](_0x33e0('0x22'),_0x23c126,debugLevel),'filename':getLogFileName(_0xab58cc,_0x23c126,debugLevel),'level':debugLevel,'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x47d42f){return fileFormat(_0x23c126,_0x47d42f);}}),new winston['transports']['Console']({'level':'warn','json':![],'formatter':function(_0x27041e){return fileFormat(_0x23c126,_0x27041e);}})]});return _0x4ea911;}exports[_0x33e0('0x24')]=consoleLogger;exports[_0x33e0('0x25')]=fileLogger;
\ No newline at end of file
+var _0x4f92=['level','{{{','meta','keys','length','stringify','toUpperCase','message','Logger','transports','Console','warn','error','File','%s-%s','fileLogger','path','util','moment','winston','../config/environment','debugLevel','toLowerCase','redBG\x20white','red','bold\x20yellow','white','bold\x20green','gray','bold\x20magenta','bold\x20cyan','addColors','/var/log/xcally','join','format','%s-%s.log','}}}','replace','[%s]\x20[%s]\x20%s\x20-\x20%s','YYYY-MM-DD\x20HH:mm:ss'];(function(_0x3f978b,_0x445432){var _0x442bb5=function(_0x3e55ce){while(--_0x3e55ce){_0x3f978b['push'](_0x3f978b['shift']());}};_0x442bb5(++_0x445432);}(_0x4f92,0x1a0));var _0x24f9=function(_0x2ec7f5,_0x4825a2){_0x2ec7f5=_0x2ec7f5-0x0;var _0x1311ea=_0x4f92[_0x2ec7f5];return _0x1311ea;};'use strict';var path=require(_0x24f9('0x0'));var util=require(_0x24f9('0x1'));var moment=require(_0x24f9('0x2'));var winston=require(_0x24f9('0x3'));var config=require(_0x24f9('0x4'));var debugLevel=config[_0x24f9('0x5')]?config[_0x24f9('0x5')][_0x24f9('0x6')]():'info';var XC_LOG_LEVELS={'fatal':0x0,'error':0x0,'warn':0x1,'info':0x2,'print':0x2,'success':0x2,'http':0x3,'verbose':0x4,'debug':0x5,'silly':0x6};var XC_LOG_COLORS={'fatal':_0x24f9('0x7'),'error':_0x24f9('0x8'),'warn':_0x24f9('0x9'),'info':_0x24f9('0xa'),'print':'bold\x20white','success':_0x24f9('0xb'),'http':_0x24f9('0xc'),'verbose':_0x24f9('0xd'),'debug':'bold\x20blue','silly':_0x24f9('0xe')};winston[_0x24f9('0xf')](XC_LOG_COLORS);function getLogFileName(_0xab6897,_0x159562,_0x3a6950){var _0x5e6b74=_0xab6897||_0x24f9('0x10');return path[_0x24f9('0x11')](_0x5e6b74,util[_0x24f9('0x12')](_0x24f9('0x13'),_0x159562,_0x3a6950));}function formatter(_0x562e41,_0x46412c){_0x46412c['message']=_0x46412c['message']['replace'](/@@{/g,'{{{')['replace'](/}@@/g,_0x24f9('0x14'))[_0x24f9('0x15')](/@{/g,'{{')[_0x24f9('0x15')](/}@/g,'}}');return util[_0x24f9('0x12')](_0x24f9('0x16'),moment()[_0x24f9('0x12')](_0x24f9('0x17')),_0x46412c[_0x24f9('0x18')]['toUpperCase'](),_0x562e41,_0x46412c['message']);}function fileFormat(_0x2be06a,_0x4b2317){_0x4b2317['message']=_0x4b2317['message']['replace'](/@@{/g,_0x24f9('0x19'))[_0x24f9('0x15')](/}@@/g,_0x24f9('0x14'))[_0x24f9('0x15')](/@{/g,'{{')['replace'](/}@/g,'}}');var _0x3f382f=_0x4b2317[_0x24f9('0x1a')]&&Object[_0x24f9('0x1b')](_0x4b2317[_0x24f9('0x1a')])[_0x24f9('0x1c')]?'\x0a\x09'+JSON[_0x24f9('0x1d')](_0x4b2317[_0x24f9('0x1a')]):'';return util[_0x24f9('0x12')]('[%s]\x20[%s]\x20%s\x20-\x20%s\x20%s',moment()[_0x24f9('0x12')](_0x24f9('0x17')),_0x4b2317[_0x24f9('0x18')][_0x24f9('0x1e')](),_0x2be06a,_0x4b2317[_0x24f9('0x1f')],_0x3f382f);}function consoleLogger(){var _0x58a00a=new winston[(_0x24f9('0x20'))]({'levels':XC_LOG_LEVELS,'transports':[new winston[(_0x24f9('0x21'))][(_0x24f9('0x22'))]({'level':_0x24f9('0x23'),'json':![],'formatter':function(_0x19cd1a){return formatter('',_0x19cd1a);}})]});return _0x58a00a;}function fileLogger(_0x368ed0,_0x2c5a43){var _0x4d0490=new winston[(_0x24f9('0x20'))]({'levels':XC_LOG_LEVELS,'transports':[new winston[(_0x24f9('0x21'))]['File']({'name':util[_0x24f9('0x12')]('%s-%s',_0x368ed0,_0x24f9('0x24')),'filename':getLogFileName(_0x2c5a43,_0x368ed0,'error'),'level':_0x24f9('0x24'),'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0x653d83){return fileFormat(_0x368ed0,_0x653d83);}}),new winston['transports'][(_0x24f9('0x25'))]({'name':util['format'](_0x24f9('0x26'),_0x368ed0,debugLevel),'filename':getLogFileName(_0x2c5a43,_0x368ed0,debugLevel),'level':debugLevel,'json':![],'maxsize':0xa00000,'maxFiles':0xa,'tailable':!![],'formatter':function(_0xe057e0){return fileFormat(_0x368ed0,_0xe057e0);}}),new winston[(_0x24f9('0x21'))]['Console']({'level':_0x24f9('0x23'),'json':![],'formatter':function(_0x4d0a64){return fileFormat(_0x368ed0,_0x4d0a64);}})]});return _0x4d0490;}exports['consoleLogger']=consoleLogger;exports[_0x24f9('0x27')]=fileLogger;
\ No newline at end of file
index 453f362..3c3ae1d 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0x66fa=['calleridnum','vidaooApiKey','privateKey','secretaccesskey','key','user','localstationid','oldPassword','isPlainObject','length','isString','replace','includes','exports','maskSensitiveData','lodash','username','newPassword','apiKey','firstName','lastName','street','phone','mobile','clientId','clientSecret','securityToken','code','accessKey','token','accessToken','authToken','calleridname'];(function(_0x56629e,_0x3873b2){var _0x2e56e4=function(_0x3376fd){while(--_0x3376fd){_0x56629e['push'](_0x56629e['shift']());}};_0x2e56e4(++_0x3873b2);}(_0x66fa,0x117));var _0xa66f=function(_0x23d9f3,_0x9aaee5){_0x23d9f3=_0x23d9f3-0x0;var _0x2b5dcb=_0x66fa[_0x23d9f3];return _0x2b5dcb;};var _=require(_0xa66f('0x0'));var sensitiveFields=[_0xa66f('0x1'),'password',_0xa66f('0x2'),_0xa66f('0x3'),_0xa66f('0x4'),_0xa66f('0x5'),_0xa66f('0x6'),_0xa66f('0x7'),_0xa66f('0x8'),'fax','email',_0xa66f('0x9'),_0xa66f('0xa'),_0xa66f('0xb'),_0xa66f('0xc'),_0xa66f('0xd'),'tenantId',_0xa66f('0xe'),'channelSecret',_0xa66f('0xf'),'accessTokenSecret',_0xa66f('0x10'),'consumerKey','consumerSecret','membername',_0xa66f('0x11'),_0xa66f('0x12'),'exten',_0xa66f('0x13'),'clientEmail',_0xa66f('0x14'),'accesskeyid',_0xa66f('0x15'),_0xa66f('0x16'),_0xa66f('0x17'),'pass','accountSid',_0xa66f('0x18'),'dsn','secret','registry',_0xa66f('0x19')];function maskSensitiveData(_0x452c37){const _0x267129=/(?!^)[\s\S](?!$)/g;if(_[_0xa66f('0x1a')](_0x452c37)){for(const _0xd348f9 in _0x452c37){if(_['isArray'](_0x452c37[_0xd348f9])){for(let _0x5510dc=0x0;_0x5510dc<_0x452c37[_0xd348f9][_0xa66f('0x1b')];_0x5510dc++){maskSensitiveData(_0x452c37[_0xd348f9][_0x5510dc]);}}else if(_[_0xa66f('0x1a')](_0x452c37[_0xd348f9])){maskSensitiveData(_0x452c37[_0xd348f9]);}else if(_[_0xa66f('0x1c')](_0x452c37[_0xd348f9])){_0x452c37[_0xd348f9]=_0x452c37[_0xd348f9][_0xa66f('0x1d')](/{{{/g,'@@{')[_0xa66f('0x1d')](/}}}/g,'}@@')['replace'](/{{/g,'@{')[_0xa66f('0x1d')](/}}/g,'}@');if(_[_0xa66f('0x1e')](sensitiveFields,_0xd348f9)){_0x452c37[_0xd348f9]=_0x452c37[_0xd348f9][_0xa66f('0x1d')](_0x267129,'*');}}}}}module[_0xa66f('0x1f')][_0xa66f('0x20')]=maskSensitiveData;
\ No newline at end of file
+var _0x7a54=['code','accessKey','token','authToken','consumerKey','membername','exten','vidaooApiKey','clientEmail','privateKey','accesskeyid','secretaccesskey','key','pass','accountSid','localstationid','dsn','secret','registry','oldPassword','isPlainObject','isArray','length','replace','}@@','includes','exports','maskSensitiveData','lodash','username','password','apiKey','firstName','street','phone','mobile','fax','email','clientSecret'];(function(_0x14add3,_0x13ce8d){var _0x4a174f=function(_0x2b3ed7){while(--_0x2b3ed7){_0x14add3['push'](_0x14add3['shift']());}};_0x4a174f(++_0x13ce8d);}(_0x7a54,0x106));var _0x47a5=function(_0x4ee4b6,_0x15588a){_0x4ee4b6=_0x4ee4b6-0x0;var _0x2f2368=_0x7a54[_0x4ee4b6];return _0x2f2368;};var _=require(_0x47a5('0x0'));var sensitiveFields=[_0x47a5('0x1'),_0x47a5('0x2'),'newPassword',_0x47a5('0x3'),_0x47a5('0x4'),'lastName',_0x47a5('0x5'),_0x47a5('0x6'),_0x47a5('0x7'),_0x47a5('0x8'),_0x47a5('0x9'),'clientId',_0x47a5('0xa'),'securityToken',_0x47a5('0xb'),_0x47a5('0xc'),'tenantId',_0x47a5('0xd'),'channelSecret','accessToken','accessTokenSecret',_0x47a5('0xe'),_0x47a5('0xf'),'consumerSecret',_0x47a5('0x10'),'calleridname','calleridnum',_0x47a5('0x11'),_0x47a5('0x12'),_0x47a5('0x13'),_0x47a5('0x14'),_0x47a5('0x15'),_0x47a5('0x16'),_0x47a5('0x17'),'user',_0x47a5('0x18'),_0x47a5('0x19'),_0x47a5('0x1a'),_0x47a5('0x1b'),_0x47a5('0x1c'),_0x47a5('0x1d'),_0x47a5('0x1e')];function maskSensitiveData(_0x190faa){const _0x4e99a8=/(?!^)[\s\S](?!$)/g;if(_[_0x47a5('0x1f')](_0x190faa)){for(const _0x11faf5 in _0x190faa){if(_[_0x47a5('0x20')](_0x190faa[_0x11faf5])){for(let _0x2a2cbb=0x0;_0x2a2cbb<_0x190faa[_0x11faf5][_0x47a5('0x21')];_0x2a2cbb++){maskSensitiveData(_0x190faa[_0x11faf5][_0x2a2cbb]);}}else if(_['isPlainObject'](_0x190faa[_0x11faf5])){maskSensitiveData(_0x190faa[_0x11faf5]);}else if(_['isString'](_0x190faa[_0x11faf5])){_0x190faa[_0x11faf5]=_0x190faa[_0x11faf5][_0x47a5('0x22')](/{{{/g,'@@{')['replace'](/}}}/g,_0x47a5('0x23'))[_0x47a5('0x22')](/{{/g,'@{')[_0x47a5('0x22')](/}}/g,'}@');if(_[_0x47a5('0x24')](sensitiveFields,_0x11faf5)){_0x190faa[_0x11faf5]=_0x190faa[_0x11faf5][_0x47a5('0x22')](_0x4e99a8,'*');}}}}}module[_0x47a5('0x25')][_0x47a5('0x26')]=maskSensitiveData;
\ No newline at end of file
index b6307c9..a9f6838 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xda2d=['exports','safeTemplate','{\x20{\x20','\x20}\x20}','map','isPlainObject','keys','reduce'];(function(_0x40ac5e,_0x2de228){var _0x2839d6=function(_0x123d47){while(--_0x123d47){_0x40ac5e['push'](_0x40ac5e['shift']());}};_0x2839d6(++_0x2de228);}(_0xda2d,0x102));var _0xdda2=function(_0x3e4319,_0x296389){_0x3e4319=_0x3e4319-0x0;var _0x2ef87b=_0xda2d[_0x3e4319];return _0x2ef87b;};var _=require('lodash');var mustacheLikeBracketsRx=/(\{|\}){2}/gm;function bracketsReplacer(_0x14e970){return _0x14e970==='{{'?_0xdda2('0x0'):_0xdda2('0x1');}function safeTemplate(_0x1f1fcc){var _0x329c5e=_0x1f1fcc;if(typeof _0x1f1fcc==='string'){_0x329c5e=_0x1f1fcc['replace'](mustacheLikeBracketsRx,bracketsReplacer);}else if(Array['isArray'](_0x1f1fcc)){_0x329c5e=_0x1f1fcc[_0xdda2('0x2')](function(_0x319129){return safeTemplate(_0x319129);});}else if(_[_0xdda2('0x3')](_0x1f1fcc)){_0x329c5e=Object[_0xdda2('0x4')](_0x1f1fcc)[_0xdda2('0x5')](function(_0xf38e58,_0x2f55dc){_0xf38e58[_0x2f55dc]=safeTemplate(_0x1f1fcc[_0x2f55dc]);return _0xf38e58;},{});}return _0x329c5e;}module[_0xdda2('0x6')][_0xdda2('0x7')]=safeTemplate;
\ No newline at end of file
+var _0xb7e7=['reduce','safeTemplate','lodash','{\x20{\x20','string','isArray','map'];(function(_0x4aa308,_0x26f54c){var _0x3a9bd9=function(_0x2d05dd){while(--_0x2d05dd){_0x4aa308['push'](_0x4aa308['shift']());}};_0x3a9bd9(++_0x26f54c);}(_0xb7e7,0x121));var _0x7b7e=function(_0x1da04e,_0x31024b){_0x1da04e=_0x1da04e-0x0;var _0xdd8c41=_0xb7e7[_0x1da04e];return _0xdd8c41;};var _=require(_0x7b7e('0x0'));var mustacheLikeBracketsRx=/(\{|\}){2}/gm;function bracketsReplacer(_0x545d7d){return _0x545d7d==='{{'?_0x7b7e('0x1'):'\x20}\x20}';}function safeTemplate(_0x1b7cc7){var _0x54a37f=_0x1b7cc7;if(typeof _0x1b7cc7===_0x7b7e('0x2')){_0x54a37f=_0x1b7cc7['replace'](mustacheLikeBracketsRx,bracketsReplacer);}else if(Array[_0x7b7e('0x3')](_0x1b7cc7)){_0x54a37f=_0x1b7cc7[_0x7b7e('0x4')](function(_0x1d9384){return safeTemplate(_0x1d9384);});}else if(_['isPlainObject'](_0x1b7cc7)){_0x54a37f=Object['keys'](_0x1b7cc7)[_0x7b7e('0x5')](function(_0x372bde,_0x7f87e0){_0x372bde[_0x7f87e0]=safeTemplate(_0x1b7cc7[_0x7f87e0]);return _0x372bde;},{});}return _0x54a37f;}module['exports'][_0x7b7e('0x6')]=safeTemplate;
\ No newline at end of file
index 4ec9cbb..2dd31f0 100644 (file)
@@ -15,4 +15,4 @@
 // * treaties. The SOFTWARE PRODUCT is licensed, not sold.                        *
 // *                                                                       *
 // *************************************************************************
-var _0xd350=['string','pathExists','then','readJSON','updated','info','Updating\x20app.json','exports','path','../config/environment','root','resolve','legacy-libs','apps','findIndex','name','motion2','env'];(function(_0x409353,_0xe9f04d){var _0x4f4b59=function(_0x64b587){while(--_0x64b587){_0x409353['push'](_0x409353['shift']());}};_0x4f4b59(++_0xe9f04d);}(_0xd350,0x15e));var _0x0d35=function(_0x239b31,_0x44a64d){_0x239b31=_0x239b31-0x0;var _0x41c8be=_0xd350[_0x239b31];return _0x41c8be;};var fs=require('fs-extra');var path=require(_0x0d35('0x0'));var config=require(_0x0d35('0x1'));var root=config[_0x0d35('0x2')];var APP_JSON_PATH=path[_0x0d35('0x3')](root,'server/app.json');var NODEPATH=path[_0x0d35('0x3')](root,_0x0d35('0x4'));function setLegacyLibsNodeEnvPath(_0x30fd56){let _0x5b9f85=![];if(Array['isArray'](_0x30fd56['apps'])){var _0x420179=_0x30fd56[_0x0d35('0x5')][_0x0d35('0x6')](function(_0x598f35){return _0x598f35[_0x0d35('0x7')]===_0x0d35('0x8');});if(_0x420179>-0x1){var _0x71bfda=_0x30fd56[_0x0d35('0x5')][_0x420179];if(typeof _0x71bfda[_0x0d35('0x9')]['NODE_PATH']!==_0x0d35('0xa')){_0x71bfda['env']['NODE_PATH']=NODEPATH;_0x5b9f85=!![];}}return{'appConfig':_0x30fd56,'updated':_0x5b9f85};}}function updateAppConfig(_0x3ed222){return fs[_0x0d35('0xb')](APP_JSON_PATH)[_0x0d35('0xc')](function(_0x2f731d){if(_0x2f731d){return fs[_0x0d35('0xd')](APP_JSON_PATH)['then'](function(_0x519c2f){var _0x53a393=setLegacyLibsNodeEnvPath(_0x519c2f);if(_0x53a393[_0x0d35('0xe')]){_0x3ed222[_0x0d35('0xf')](_0x0d35('0x10'));return fs['writeJSON'](APP_JSON_PATH,_0x519c2f,{'spaces':0x2});}else{return Promise[_0x0d35('0x3')]();}});}else{return Promise['resolve']();}});}module[_0x0d35('0x11')]=updateAppConfig;
\ No newline at end of file
+var _0x6200=['../config/environment','root','resolve','server/app.json','legacy-libs','isArray','apps','findIndex','name','motion2','env','string','NODE_PATH','pathExists','readJSON','then','updated','info','Updating\x20app.json','writeJSON','fs-extra','path'];(function(_0x5333d8,_0x4cbe38){var _0x3e8edb=function(_0x26fc36){while(--_0x26fc36){_0x5333d8['push'](_0x5333d8['shift']());}};_0x3e8edb(++_0x4cbe38);}(_0x6200,0x82));var _0x0620=function(_0x1d8170,_0x459855){_0x1d8170=_0x1d8170-0x0;var _0x3ca267=_0x6200[_0x1d8170];return _0x3ca267;};var fs=require(_0x0620('0x0'));var path=require(_0x0620('0x1'));var config=require(_0x0620('0x2'));var root=config[_0x0620('0x3')];var APP_JSON_PATH=path[_0x0620('0x4')](root,_0x0620('0x5'));var NODEPATH=path[_0x0620('0x4')](root,_0x0620('0x6'));function setLegacyLibsNodeEnvPath(_0x7e6563){let _0x1595f7=![];if(Array[_0x0620('0x7')](_0x7e6563['apps'])){var _0x47efa0=_0x7e6563[_0x0620('0x8')][_0x0620('0x9')](function(_0x497b8f){return _0x497b8f[_0x0620('0xa')]===_0x0620('0xb');});if(_0x47efa0>-0x1){var _0x4cf67c=_0x7e6563[_0x0620('0x8')][_0x47efa0];if(typeof _0x4cf67c[_0x0620('0xc')]['NODE_PATH']!==_0x0620('0xd')){_0x4cf67c['env'][_0x0620('0xe')]=NODEPATH;_0x1595f7=!![];}}return{'appConfig':_0x7e6563,'updated':_0x1595f7};}}function updateAppConfig(_0x50706a){return fs[_0x0620('0xf')](APP_JSON_PATH)['then'](function(_0x475267){if(_0x475267){return fs[_0x0620('0x10')](APP_JSON_PATH)[_0x0620('0x11')](function(_0x170026){var _0x28d3ba=setLegacyLibsNodeEnvPath(_0x170026);if(_0x28d3ba[_0x0620('0x12')]){_0x50706a[_0x0620('0x13')](_0x0620('0x14'));return fs[_0x0620('0x15')](APP_JSON_PATH,_0x170026,{'spaces':0x2});}else{return Promise[_0x0620('0x4')]();}});}else{return Promise[_0x0620('0x4')]();}});}module['exports']=updateAppConfig;
\ No newline at end of file